debian/0000775000000000000000000000000012316332645007175 5ustar debian/source/0000775000000000000000000000000012275603610010472 5ustar debian/source/options0000664000000000000000000000004712275603610012111 0ustar extend-diff-ignore="^[^/]+\.egg-info/" debian/source/format0000664000000000000000000000001412275603610011700 0ustar 3.0 (quilt) debian/copyright0000664000000000000000000002116112275603610011126 0ustar Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ Upstream-Name: pandas Upstream-Contact: Wes McKinney Source-Location: http://github.com/wesm/pandas Files: * Copyright: 2008-2011 AQR Capital Management, LLC 2011 Wes McKinney and pandas developers 2011-2013, Lambda Foundry, Inc. and PyData Development Team License: BSD-3 Files: pandas/io/auth.py Copyright: 2012, Google Inc. License: Apache Files: pandas/src/datetime Copyright: 2005-2013, NumPy Developers License: BSD-3 Origin: numpy Comment: Listed as derived from Numpy 1.7 Files: pandas/src/headers/ms_* Copyright: 2006, Alexander Chemeris License: BSD-3 Files: pandas/src/klib Copyright: 2008, 2009, 2011 by Attractive Chaos License: Expat Files: pandas/src/skiplist.pyx Copyright: 2009, Raymond Hettinger License: Expat Origin: http://code.activestate.com/recipes/576930/ Comment: it is a Cython code "inspired" by the original Python code by Raymond Files: pandas/util/clipboard.py Copyright: 2010, Albert Sweigart License: BSD-3 Origin: Pyperclip v1.3 Files: scripts/git-mrb Copyright: 2011-2012, Fernando Perez Origin: IPython License: BSD-3 Files: doc/source/themes/agogo/* Copyright: 2007-2011 by the Sphinx team License: BSD-2 Files: doc/sphinxext/* Copyright: 2008, Stefan van der Walt , Pauli Virtanen License: BSD-2 Files: doc/sphinxext/compiler_unparse.py doc/sphinxext/comment_eater.py doc/sphinxext/traitsdoc.py Copyright: 2006, Enthought, Inc. License: BSD-3 Files: doc/sphinxext/only_directives.py doc/sphinxext/plot_directive.py Copyright: 2002-2008, John D. Hunter License: matplotlib Origin: matplotlib Files: debian/* Copyright: 2011-2013, Yaroslav Halchenko License: BSD-3 License: BSD-2 Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: . 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. . THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. License: BSD-3 Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: . * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of the copyright holder nor the names of any contributors may be used to endorse or promote products derived from this software without specific prior written permission. . THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. License: matplotlib 1. This LICENSE AGREEMENT is between John D. Hunter (“JDH”), and the Individual or Organization (“Licensee”) accessing and otherwise using matplotlib software in source or binary form and its associated documentation. 2. Subject to the terms and conditions of this License Agreement, JDH hereby grants Licensee a nonexclusive, royalty-free, world-wide license to reproduce, analyze, test, perform and/or display publicly, prepare derivative works, distribute, and otherwise use matplotlib 0.98.3 alone or in any derivative version, provided, however, that JDH’s License Agreement and JDH’s notice of copyright, i.e., “Copyright (c) 2002-2008 John D. Hunter; All Rights Reserved” are retained in matplotlib 0.98.3 alone or in any derivative version prepared by Licensee. 3. In the event Licensee prepares a derivative work that is based on or incorporates matplotlib 0.98.3 or any part thereof, and wants to make the derivative work available to others as provided herein, then Licensee hereby agrees to include in any such work a brief summary of the changes made to matplotlib 0.98.3. 4. JDH is making matplotlib 0.98.3 available to Licensee on an “AS IS” basis. JDH MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED. BY WAY OF EXAMPLE, BUT NOT LIMITATION, JDH MAKES NO AND DISCLAIMS ANY REPRESENTATION OR WARRANTY OF MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF MATPLOTLIB 0.98.3 WILL NOT INFRINGE ANY THIRD PARTY RIGHTS. 5. JDH SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF MATPLOTLIB 0.98.3 FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR LOSS AS A RESULT OF MODIFYING, DISTRIBUTING, OR OTHERWISE USING MATPLOTLIB 0.98.3, OR ANY DERIVATIVE THEREOF, EVEN IF ADVISED OF THE POSSIBILITY THEREOF. 6. This License Agreement will automatically terminate upon a material breach of its terms and conditions. 7. Nothing in this License Agreement shall be deemed to create any relationship of agency, partnership, or joint venture between JDH and Licensee. This License Agreement does not grant permission to use JDH trademarks or trade name in a trademark sense to endorse or promote products or services of Licensee, or any third party. 8. By copying, installing or otherwise using matplotlib 0.98.3, Licensee agrees to be bound by the terms and conditions of this License Agreement. License: Expat Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: . The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. . THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. License: Apache Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at . http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. . On Debian systems full text of the license could be found in /usr/share/common-licenses/Apache-2.0 . debian/changelog0000664000000000000000000002504212316332645011052 0ustar pandas (0.13.1-2ubuntu2) trusty; urgency=medium * No change rebuild to drop python3.3 compiled extension. -- Dimitri John Ledkov Mon, 31 Mar 2014 19:36:21 +0100 pandas (0.13.1-2ubuntu1) trusty; urgency=low * drop statsmodels build depends to bootstrap arm64 only adds a few more build tests -- Julian Taylor Mon, 10 Feb 2014 20:08:13 +0100 pandas (0.13.1-2) unstable; urgency=low * debian/patches/changeset_6d56e7300d66d3ba76684334bbb44b6cd0ea9f61.diff to fix FTBFS of statsmodels due to failing tests (Closes: #735804) -- Yaroslav Halchenko Sat, 08 Feb 2014 12:46:42 -0500 pandas (0.13.1-1) unstable; urgency=low * Fresh upstream release * debian/patches - deb_skip_test_pytables_failure to mitigate error while testing on amd64 wheezy and ubuntu 12.04 -- Yaroslav Halchenko Tue, 04 Feb 2014 12:09:29 -0500 pandas (0.13.0+git464-g15a8ff7-1) experimental; urgency=low * Fresh pre-release snapshot * debian/patches - removed all cherry-picked patches (should have been upstreamed) -- Yaroslav Halchenko Wed, 29 Jan 2014 21:27:45 -0500 pandas (0.13.0-2) unstable; urgency=low * debian/patches - 0001-BLD-fix-cythonized-msgpack-extension-in-setup.py-GH5.patch to resolve issue with building C++ Cython extension using pre-generated sources - 0001-Add-division-future-import-everywhere.patch 0002-remove-explicit-truediv-kwarg.patch to resolve compatibility issues with elderly Numexpr - 0001-BUG-Yahoo-finance-changed-ichart-url.-Fixed-here.patch - deb_skip_sequencelike_on_armel to prevent FTBFS on armel due to failing test: https://github.com/pydata/pandas/issues/4473 -- Yaroslav Halchenko Fri, 03 Jan 2014 23:13:48 -0500 pandas (0.13.0-1) unstable; urgency=low * Fresh upstream release - resolved compatibility with matplotlib 1.3 (Closes: #733848) * debian/{control,rules} - use xvfb (added to build-depends together with xauth, and xclip) for tests - define http*_proxy to prevent downloads - install .md files not .rst for docs -- were renamed upstream - include .cpp Cython generated files into debian/cythonized-files* -- Yaroslav Halchenko Wed, 01 Jan 2014 18:08:22 -0500 pandas (0.12.0-2) unstable; urgency=low [ Dmitry Shachnev ] * DEP-8 tests improvements: - Use Xvfb for running tests. - Increase verbosity using -v flag. - Fix printing interpreter version in unittests3. * Fix indentaion in debian/control. [ Yaroslav Halchenko ] * debian/control - place python3-matplotlib ahead of elderly python-matplotlib without python3 support since now we have python3-matplotlib in sid * debian/copyright - go through reported missing copyright/license statements (Closes: #700564) Thanks Luca Falavigna for the report * debian/rules,patches - exclude test test_bar_log due to incompatibility with matplotlib 1.3.0 (test adjusted upstream and would be re-enabled for the new release). - debian/patches/changeset_952c5f0bc433622d21df20ed761ee4cb728370eb.diff adds matplotlib 1.3.0 compatibility -- Yaroslav Halchenko Sat, 14 Sep 2013 20:02:58 -0400 pandas (0.12.0-1) unstable; urgency=low * New upstream release: - should address failed tests on 32bit platforms * debian/patches - neurodebian: allow to build for jessie with outdated cython * debian/control - build for Python2 >= 2.7 due to some (probably temporary) incompatibilities in tests with 2.6 -- Yaroslav Halchenko Wed, 24 Jul 2013 23:29:03 -0400 pandas (0.12.0~rc1+git127-gec8920a-1) experimental; urgency=low * New upstream snapshot from origin/master at v0.12.0rc1-127-gec8920a - should address FTBFS due to failing tests on big endians -- Yaroslav Halchenko Sat, 20 Jul 2013 09:23:04 -0400 pandas (0.12.0~rc1+git112-gb79996c-1) experimental; urgency=low * Fresh git snapshot of upstream candidate release. Experimental build to verify functioning across the ports. * debian/control - dedented last "paragraph" to break it away from the 2nd one. Thanks Beatrice Torracca for the detailed report (Closes: #712260) - Depends on python-six now * debian/{,tests/}control - added python{,3}-bs4, python-html5lib to Build-Depends for more thorough testing -- Yaroslav Halchenko Thu, 18 Jul 2013 13:15:19 -0400 pandas (0.11.0-2) unstable; urgency=low [ Yaroslav Halchenko ] * Upload to unstable -- this upstream release addressed Cython 0.19 compatibility issue (Closes: #710608) * Recommends numexpr * Re-cythonized using Cython 0.19 [ Dmitry Shachnev ] * debian/tests/unittests3: use nosetests3 instead of nosetests-3.x. -- Yaroslav Halchenko Mon, 03 Jun 2013 11:57:43 -0400 pandas (0.11.0-1) experimental; urgency=low * New upstream release -- Yaroslav Halchenko Tue, 23 Apr 2013 22:40:15 -0400 pandas (0.10.1-1) experimental; urgency=low * New upstream release -- Yaroslav Halchenko Tue, 22 Jan 2013 13:07:31 -0500 pandas (0.10.0-1) experimental; urgency=low * New upstream release - drops python 2.5 support (we are dropping pyversions in favor of X-Python-Version) * debian/patches: - all previous are in upstream now, dropped locally - added -dsc-patch'es for systems without cython3 * debian/control: - added python-statsmodels for the extended tests coverage -- Yaroslav Halchenko Mon, 17 Dec 2012 12:27:25 -0500 pandas (0.9.1-2) unstable; urgency=low [ Julian Taylor ] * Provide python3 packages * Add autopkgtests * debian/patches: - relax-float-tests.patch: replace float equality tests with almost equal - fix-endian-tests.patch: patch from upstream to fix the test failure on big endian machines [ Yaroslav Halchenko ] * Upload to unstable * Dropping pysupport * debian/rules: - slight reduction of code duplication between python 2 and 3 - cythonize for both python 2 and 3 into separate directories -- Yaroslav Halchenko Sat, 01 Dec 2012 22:57:47 -0500 pandas (0.9.1-1) experimental; urgency=low * New upstream release * Boosted policy to 3.9.3 (no due changes) * debian/rules - Fixed up cleaning up of cythonized files -- Yaroslav Halchenko Wed, 14 Nov 2012 09:44:14 -0500 pandas (0.9.0-1) experimental; urgency=low * New upstream release -- Yaroslav Halchenko Sun, 07 Oct 2012 21:26:23 -0400 pandas (0.9.0~rc2-1) experimental; urgency=low * New upstream release candidate -- Yaroslav Halchenko Fri, 21 Sep 2012 10:27:52 -0400 pandas (0.8.1-1) unstable; urgency=low * Primarily a bugfix upstream release. * up_tag_yahoo_test_requiring_network patch removed. -- Yaroslav Halchenko Sun, 22 Jul 2012 20:13:16 -0400 pandas (0.8.0-2) unstable; urgency=medium * up_tag_yahoo_test_requiring_network patch cherry-picked from upstream GIT so that tests would not be excercised at package build time (Closes: #681449) -- Yaroslav Halchenko Fri, 13 Jul 2012 08:54:41 -0400 pandas (0.8.0-1) unstable; urgency=low * Fresh upstream release * debian/control - drop python-statsmodels from Build-Depends since it might not be yet available on some architectures and is not critical for the test - recommend python-statsmodels instead of deprecated python-scikits.statsmodels -- Yaroslav Halchenko Fri, 29 Jun 2012 13:02:28 -0400 pandas (0.8.0~rc2+git26-g76c6351-1) experimental; urgency=low * Fresh upstream release candidate - all patches dropped (upstreamed) - requires numpy >= 1.6 -- Yaroslav Halchenko Tue, 12 Jun 2012 13:23:27 -0400 pandas (0.7.3-1) unstable; urgency=low * Fresh upstream release - few post-release patches (submitted upstream) to exclude unittests requiring network access * debian/control: - python-openpyxl, python-xlwt, python-xlrd into Build-Depends and Recommends * debian/rules: - exclude running tests marked with @network -- Yaroslav Halchenko Thu, 12 Apr 2012 11:27:31 -0400 pandas (0.7.1+git1-ga2e86c2-1) unstable; urgency=low * New upstream release with a bugfix which followed -- Yaroslav Halchenko Thu, 01 Mar 2012 22:28:10 -0500 pandas (0.7.0-1) unstable; urgency=low * New upstream release * Updated pre-cythoned .c files for older Debian/Ubuntu releases. Added a stamp file with upstream version to assure up-to-dateness of the generated files * Dropped all exclusions of unittests and patches -- shouldn't be necessary any longer * Build only for requested versions (not all supported) of Python * Do nothing for build operation, rely on overloaded install (to avoid undesired re-cythonization on elderly Ubuntus) * Adjusted url in watch due to migration of repository under pydata organization -- Yaroslav Halchenko Mon, 16 Jan 2012 19:31:50 -0500 pandas (0.6.1-1) UNRELEASED; urgency=low * New upstream release * python-tk into Build-Depends * Create matplotlibrc with backend: Agg to allow tests run without $DISPLAY * Carry pre-cythonized .c files for systems with older Cython * Skip few tests known to fail -- Yaroslav Halchenko Tue, 13 Dec 2011 18:36:11 -0500 pandas (0.5.0+git7-gcf32be2-1) unstable; urgency=low * New upstream release with post-release fixes -- Yaroslav Halchenko Tue, 01 Nov 2011 21:15:06 -0400 pandas (0.4.3-1) unstable; urgency=low * New upstream release(s): primarily bugfixes and optimizations but also with some minor API changes and new functionality * Adjusted debian/watch to match new layout on github -- Yaroslav Halchenko Tue, 18 Oct 2011 11:27:50 -0400 pandas (0.4.1-1) unstable; urgency=low * New upstream bugfix release - incorporated all debian/patches * debian/rules: 'clean' removes generated pandas/version.py * debian/copyright: adjusted to become DEP-5 compliant -- Yaroslav Halchenko Sun, 25 Sep 2011 21:48:30 -0400 pandas (0.4.0-1) unstable; urgency=low * Initial Debian release (Closes: #641464) -- Yaroslav Halchenko Tue, 13 Sep 2011 12:24:05 -0400 debian/gbp.conf0000664000000000000000000000035612275603610010615 0ustar [DEFAULT] # the default branch for upstream sources: upstream-branch = master # the default branch for the debian patch: debian-branch = debian # the default tag formats used: upstream-tag = v%(version)s debian-tag = debian/%(version)s debian/cythonized-files/0000775000000000000000000000000012275603610012452 5ustar debian/cythonized-files/VERSION0000664000000000000000000000000712275603610013517 0ustar 0.13.1 debian/cythonized-files/pandas/0000775000000000000000000000000012275603610013720 5ustar debian/cythonized-files/pandas/lib.c0000664000000000000000001202672612275603610014652 0ustar /* Generated by Cython 0.20 on Mon Feb 3 08:41:48 2014 */ #define PY_SSIZE_T_CLEAN #ifndef CYTHON_USE_PYLONG_INTERNALS #ifdef PYLONG_BITS_IN_DIGIT #define CYTHON_USE_PYLONG_INTERNALS 0 #else #include "pyconfig.h" #ifdef PYLONG_BITS_IN_DIGIT #define CYTHON_USE_PYLONG_INTERNALS 1 #else #define CYTHON_USE_PYLONG_INTERNALS 0 #endif #endif #endif #include "Python.h" #ifndef Py_PYTHON_H #error Python headers needed to compile C extensions, please install development version of Python. #elif PY_VERSION_HEX < 0x02040000 #error Cython requires Python 2.4+. #else #define CYTHON_ABI "0_20" #include /* For offsetof */ #ifndef offsetof #define offsetof(type, member) ( (size_t) & ((type*)0) -> member ) #endif #if !defined(WIN32) && !defined(MS_WINDOWS) #ifndef __stdcall #define __stdcall #endif #ifndef __cdecl #define __cdecl #endif #ifndef __fastcall #define __fastcall #endif #endif #ifndef DL_IMPORT #define DL_IMPORT(t) t #endif #ifndef DL_EXPORT #define DL_EXPORT(t) t #endif #ifndef PY_LONG_LONG #define PY_LONG_LONG LONG_LONG #endif #ifndef Py_HUGE_VAL #define Py_HUGE_VAL HUGE_VAL #endif #ifdef PYPY_VERSION #define CYTHON_COMPILING_IN_PYPY 1 #define CYTHON_COMPILING_IN_CPYTHON 0 #else #define CYTHON_COMPILING_IN_PYPY 0 #define CYTHON_COMPILING_IN_CPYTHON 1 #endif #if CYTHON_COMPILING_IN_PYPY #define Py_OptimizeFlag 0 #endif #if PY_VERSION_HEX < 0x02050000 typedef int Py_ssize_t; #define PY_SSIZE_T_MAX INT_MAX #define PY_SSIZE_T_MIN INT_MIN #define PY_FORMAT_SIZE_T "" #define CYTHON_FORMAT_SSIZE_T "" #define PyInt_FromSsize_t(z) PyInt_FromLong(z) #define PyInt_AsSsize_t(o) __Pyx_PyInt_As_int(o) #define PyNumber_Index(o) ((PyNumber_Check(o) && !PyFloat_Check(o)) ? PyNumber_Int(o) : \ (PyErr_Format(PyExc_TypeError, \ "expected index value, got %.200s", Py_TYPE(o)->tp_name), \ (PyObject*)0)) #define __Pyx_PyIndex_Check(o) (PyNumber_Check(o) && !PyFloat_Check(o) && \ !PyComplex_Check(o)) #define PyIndex_Check __Pyx_PyIndex_Check #define PyErr_WarnEx(category, message, stacklevel) PyErr_Warn(category, message) #define __PYX_BUILD_PY_SSIZE_T "i" #else #define __PYX_BUILD_PY_SSIZE_T "n" #define CYTHON_FORMAT_SSIZE_T "z" #define __Pyx_PyIndex_Check PyIndex_Check #endif #if PY_VERSION_HEX < 0x02060000 #define Py_REFCNT(ob) (((PyObject*)(ob))->ob_refcnt) #define Py_TYPE(ob) (((PyObject*)(ob))->ob_type) #define Py_SIZE(ob) (((PyVarObject*)(ob))->ob_size) #define PyVarObject_HEAD_INIT(type, size) \ PyObject_HEAD_INIT(type) size, #define PyType_Modified(t) typedef struct { void *buf; PyObject *obj; Py_ssize_t len; Py_ssize_t itemsize; int readonly; int ndim; char *format; Py_ssize_t *shape; Py_ssize_t *strides; Py_ssize_t *suboffsets; void *internal; } Py_buffer; #define PyBUF_SIMPLE 0 #define PyBUF_WRITABLE 0x0001 #define PyBUF_FORMAT 0x0004 #define PyBUF_ND 0x0008 #define PyBUF_STRIDES (0x0010 | PyBUF_ND) #define PyBUF_C_CONTIGUOUS (0x0020 | PyBUF_STRIDES) #define PyBUF_F_CONTIGUOUS (0x0040 | PyBUF_STRIDES) #define PyBUF_ANY_CONTIGUOUS (0x0080 | PyBUF_STRIDES) #define PyBUF_INDIRECT (0x0100 | PyBUF_STRIDES) #define PyBUF_RECORDS (PyBUF_STRIDES | PyBUF_FORMAT | PyBUF_WRITABLE) #define PyBUF_FULL (PyBUF_INDIRECT | PyBUF_FORMAT | PyBUF_WRITABLE) typedef int (*getbufferproc)(PyObject *, Py_buffer *, int); typedef void (*releasebufferproc)(PyObject *, Py_buffer *); #endif #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, 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 #if PY_VERSION_HEX < 0x02060000 #define PyUnicode_FromString(s) PyUnicode_Decode(s, strlen(s), "UTF-8", "strict") #endif #if PY_MAJOR_VERSION >= 3 #define Py_TPFLAGS_CHECKTYPES 0 #define Py_TPFLAGS_HAVE_INDEX 0 #endif #if (PY_VERSION_HEX < 0x02060000) || (PY_MAJOR_VERSION >= 3) #define Py_TPFLAGS_HAVE_NEWBUFFER 0 #endif #if PY_VERSION_HEX < 0x02060000 #define Py_TPFLAGS_HAVE_VERSION_TAG 0 #endif #if PY_VERSION_HEX < 0x02060000 && !defined(Py_TPFLAGS_IS_ABSTRACT) #define Py_TPFLAGS_IS_ABSTRACT 0 #endif #if PY_VERSION_HEX < 0x030400a1 && !defined(Py_TPFLAGS_HAVE_FINALIZE) #define Py_TPFLAGS_HAVE_FINALIZE 0 #endif #if PY_VERSION_HEX > 0x03030000 && defined(PyUnicode_KIND) #define CYTHON_PEP393_ENABLED 1 #define __Pyx_PyUnicode_READY(op) (likely(PyUnicode_IS_READY(op)) ? \ 0 : _PyUnicode_Ready((PyObject *)(op))) #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_LENGTH(u) #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i) #define __Pyx_PyUnicode_KIND(u) PyUnicode_KIND(u) #define __Pyx_PyUnicode_DATA(u) PyUnicode_DATA(u) #define __Pyx_PyUnicode_READ(k, d, i) PyUnicode_READ(k, d, i) #else #define CYTHON_PEP393_ENABLED 0 #define __Pyx_PyUnicode_READY(op) (0) #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_SIZE(u) #define __Pyx_PyUnicode_READ_CHAR(u, i) ((Py_UCS4)(PyUnicode_AS_UNICODE(u)[i])) #define __Pyx_PyUnicode_KIND(u) (sizeof(Py_UNICODE)) #define __Pyx_PyUnicode_DATA(u) ((void*)PyUnicode_AS_UNICODE(u)) #define __Pyx_PyUnicode_READ(k, d, i) ((void)(k), (Py_UCS4)(((Py_UNICODE*)d)[i])) #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)) #define __Pyx_PyUnicode_Concat(a, b) ((unlikely((a) == Py_None) || unlikely((b) == Py_None)) ? \ PyNumber_Add(a, b) : PyUnicode_Concat(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 #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_VERSION_HEX < 0x02060000 #define PyBytesObject PyStringObject #define PyBytes_Type PyString_Type #define PyBytes_Check PyString_Check #define PyBytes_CheckExact PyString_CheckExact #define PyBytes_FromString PyString_FromString #define PyBytes_FromStringAndSize PyString_FromStringAndSize #define PyBytes_FromFormat PyString_FromFormat #define PyBytes_DecodeEscape PyString_DecodeEscape #define PyBytes_AsString PyString_AsString #define PyBytes_AsStringAndSize PyString_AsStringAndSize #define PyBytes_Size PyString_Size #define PyBytes_AS_STRING PyString_AS_STRING #define PyBytes_GET_SIZE PyString_GET_SIZE #define PyBytes_Repr PyString_Repr #define PyBytes_Concat PyString_Concat #define PyBytes_ConcatAndDel PyString_ConcatAndDel #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_CheckExact(obj) || PyUnicode_CheckExact(obj) || \ PyString_Check(obj) || PyUnicode_Check(obj)) #define __Pyx_PyBaseString_CheckExact(obj) (PyString_CheckExact(obj) || PyUnicode_CheckExact(obj)) #endif #if PY_VERSION_HEX < 0x02060000 #define PySet_Check(obj) PyObject_TypeCheck(obj, &PySet_Type) #define PyFrozenSet_Check(obj) PyObject_TypeCheck(obj, &PyFrozenSet_Type) #endif #ifndef PySet_CheckExact #define PySet_CheckExact(obj) (Py_TYPE(obj) == &PySet_Type) #endif #define __Pyx_TypeCheck(obj, type) PyObject_TypeCheck(obj, (PyTypeObject *)type) #if PY_MAJOR_VERSION >= 3 #define PyIntObject PyLongObject #define PyInt_Type PyLong_Type #define PyInt_Check(op) PyLong_Check(op) #define PyInt_CheckExact(op) PyLong_CheckExact(op) #define PyInt_FromString PyLong_FromString #define PyInt_FromUnicode PyLong_FromUnicode #define PyInt_FromLong PyLong_FromLong #define PyInt_FromSize_t PyLong_FromSize_t #define PyInt_FromSsize_t PyLong_FromSsize_t #define PyInt_AsLong PyLong_AsLong #define PyInt_AS_LONG PyLong_AS_LONG #define PyInt_AsSsize_t PyLong_AsSsize_t #define PyInt_AsUnsignedLongMask PyLong_AsUnsignedLongMask #define PyInt_AsUnsignedLongLongMask PyLong_AsUnsignedLongLongMask #define PyNumber_Int PyNumber_Long #endif #if PY_MAJOR_VERSION >= 3 #define PyBoolObject PyLongObject #endif #if PY_VERSION_HEX < 0x03020000 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) || (PY_VERSION_HEX >= 0x03010300) #define __Pyx_PySequence_GetSlice(obj, a, b) PySequence_GetSlice(obj, a, b) #define __Pyx_PySequence_SetSlice(obj, a, b, value) PySequence_SetSlice(obj, a, b, value) #define __Pyx_PySequence_DelSlice(obj, a, b) PySequence_DelSlice(obj, a, b) #else #define __Pyx_PySequence_GetSlice(obj, a, b) (unlikely(!(obj)) ? \ (PyErr_SetString(PyExc_SystemError, "null argument to internal routine"), (PyObject*)0) : \ (likely((obj)->ob_type->tp_as_mapping) ? (PySequence_GetSlice(obj, a, b)) : \ (PyErr_Format(PyExc_TypeError, "'%.200s' object is unsliceable", (obj)->ob_type->tp_name), (PyObject*)0))) #define __Pyx_PySequence_SetSlice(obj, a, b, value) (unlikely(!(obj)) ? \ (PyErr_SetString(PyExc_SystemError, "null argument to internal routine"), -1) : \ (likely((obj)->ob_type->tp_as_mapping) ? (PySequence_SetSlice(obj, a, b, value)) : \ (PyErr_Format(PyExc_TypeError, "'%.200s' object doesn't support slice assignment", (obj)->ob_type->tp_name), -1))) #define __Pyx_PySequence_DelSlice(obj, a, b) (unlikely(!(obj)) ? \ (PyErr_SetString(PyExc_SystemError, "null argument to internal routine"), -1) : \ (likely((obj)->ob_type->tp_as_mapping) ? (PySequence_DelSlice(obj, a, b)) : \ (PyErr_Format(PyExc_TypeError, "'%.200s' object doesn't support slice deletion", (obj)->ob_type->tp_name), -1))) #endif #if PY_MAJOR_VERSION >= 3 #define PyMethod_New(func, self, klass) ((self) ? PyMethod_New(func, self) : PyInstanceMethod_New(func)) #endif #if PY_VERSION_HEX < 0x02050000 #define __Pyx_GetAttrString(o,n) PyObject_GetAttrString((o),((char *)(n))) #define __Pyx_SetAttrString(o,n,a) PyObject_SetAttrString((o),((char *)(n)),(a)) #define __Pyx_DelAttrString(o,n) PyObject_DelAttrString((o),((char *)(n))) #else #define __Pyx_GetAttrString(o,n) PyObject_GetAttrString((o),(n)) #define __Pyx_SetAttrString(o,n,a) PyObject_SetAttrString((o),(n),(a)) #define __Pyx_DelAttrString(o,n) PyObject_DelAttrString((o),(n)) #endif #if PY_VERSION_HEX < 0x02050000 #define __Pyx_NAMESTR(n) ((char *)(n)) #define __Pyx_DOCSTR(n) ((char *)(n)) #else #define __Pyx_NAMESTR(n) (n) #define __Pyx_DOCSTR(n) (n) #endif #ifndef CYTHON_INLINE #if defined(__GNUC__) #define CYTHON_INLINE __inline__ #elif defined(_MSC_VER) #define CYTHON_INLINE __inline #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L #define CYTHON_INLINE inline #else #define CYTHON_INLINE #endif #endif #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 #ifdef NAN #define __PYX_NAN() ((float) NAN) #else static CYTHON_INLINE float __PYX_NAN() { /* Initialize NaN. The sign is irrelevant, an exponent with all bits 1 and a nonzero mantissa means NaN. If the first bit in the mantissa is 1, it is a quiet NaN. */ float value; memset(&value, 0xFF, sizeof(value)); return value; } #endif #if PY_MAJOR_VERSION >= 3 #define __Pyx_PyNumber_Divide(x,y) PyNumber_TrueDivide(x,y) #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceTrueDivide(x,y) #else #define __Pyx_PyNumber_Divide(x,y) PyNumber_Divide(x,y) #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceDivide(x,y) #endif #ifndef __PYX_EXTERN_C #ifdef __cplusplus #define __PYX_EXTERN_C extern "C" #else #define __PYX_EXTERN_C extern #endif #endif #if defined(WIN32) || defined(MS_WINDOWS) #define _USE_MATH_DEFINES #endif #include #define __PYX_HAVE__pandas__lib #define __PYX_HAVE_API__pandas__lib #include "string.h" #include "stdio.h" #include "stdlib.h" #include "numpy/arrayobject.h" #include "numpy/ufuncobject.h" #include "pythread.h" #include "headers/stdint.h" #include "datetime.h" #include "datetime_helper.h" #include "numpy/ndarrayobject.h" #include "numpy_helper.h" #include "numpy/npy_common.h" #include "datetime/np_datetime.h" #include "datetime/np_datetime_strings.h" #include "math.h" #include "parse_helper.h" #ifdef _OPENMP #include #endif /* _OPENMP */ #ifdef PYREX_WITHOUT_ASSERTIONS #define CYTHON_WITHOUT_ASSERTIONS #endif #ifndef CYTHON_UNUSED # if defined(__GNUC__) # if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)) # define CYTHON_UNUSED __attribute__ ((__unused__)) # else # define CYTHON_UNUSED # endif # elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER)) # define CYTHON_UNUSED __attribute__ ((__unused__)) # else # define CYTHON_UNUSED # endif #endif typedef struct {PyObject **p; char *s; const Py_ssize_t n; const char* encoding; const char is_unicode; const char is_str; const char intern; } __Pyx_StringTabEntry; /*proto*/ #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_fits_Py_ssize_t(v, type, is_signed) ( \ (sizeof(type) < sizeof(Py_ssize_t)) || \ (sizeof(type) > sizeof(Py_ssize_t) && \ likely(v < (type)PY_SSIZE_T_MAX || \ v == (type)PY_SSIZE_T_MAX) && \ (!is_signed || likely(v > (type)PY_SSIZE_T_MIN || \ v == (type)PY_SSIZE_T_MIN))) || \ (sizeof(type) == sizeof(Py_ssize_t) && \ (is_signed || likely(v < (type)PY_SSIZE_T_MAX || \ v == (type)PY_SSIZE_T_MAX))) ) static CYTHON_INLINE char* __Pyx_PyObject_AsString(PyObject*); static CYTHON_INLINE char* __Pyx_PyObject_AsStringAndSize(PyObject*, Py_ssize_t* length); #define __Pyx_PyByteArray_FromString(s) PyByteArray_FromStringAndSize((const char*)s, strlen((const char*)s)) #define __Pyx_PyByteArray_FromStringAndSize(s, l) PyByteArray_FromStringAndSize((const char*)s, l) #define __Pyx_PyBytes_FromString PyBytes_FromString #define __Pyx_PyBytes_FromStringAndSize PyBytes_FromStringAndSize static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(char*); #if PY_MAJOR_VERSION < 3 #define __Pyx_PyStr_FromString __Pyx_PyBytes_FromString #define __Pyx_PyStr_FromStringAndSize __Pyx_PyBytes_FromStringAndSize #else #define __Pyx_PyStr_FromString __Pyx_PyUnicode_FromString #define __Pyx_PyStr_FromStringAndSize __Pyx_PyUnicode_FromStringAndSize #endif #define __Pyx_PyObject_AsSString(s) ((signed char*) __Pyx_PyObject_AsString(s)) #define __Pyx_PyObject_AsUString(s) ((unsigned char*) __Pyx_PyObject_AsString(s)) #define __Pyx_PyObject_FromUString(s) __Pyx_PyObject_FromString((char*)s) #define __Pyx_PyBytes_FromUString(s) __Pyx_PyBytes_FromString((char*)s) #define __Pyx_PyByteArray_FromUString(s) __Pyx_PyByteArray_FromString((char*)s) #define __Pyx_PyStr_FromUString(s) __Pyx_PyStr_FromString((char*)s) #define __Pyx_PyUnicode_FromUString(s) __Pyx_PyUnicode_FromString((char*)s) #if PY_MAJOR_VERSION < 3 static CYTHON_INLINE size_t __Pyx_Py_UNICODE_strlen(const Py_UNICODE *u) { const Py_UNICODE *u_end = u; while (*u_end++) ; return u_end - u - 1; } #else #define __Pyx_Py_UNICODE_strlen Py_UNICODE_strlen #endif #define __Pyx_PyUnicode_FromUnicode(u) PyUnicode_FromUnicode(u, __Pyx_Py_UNICODE_strlen(u)) #define __Pyx_PyUnicode_FromUnicodeAndLength PyUnicode_FromUnicode #define __Pyx_PyUnicode_AsUnicode PyUnicode_AsUnicode #define __Pyx_Owned_Py_None(b) (Py_INCREF(Py_None), Py_None) #define __Pyx_PyBool_FromLong(b) ((b) ? (Py_INCREF(Py_True), Py_True) : (Py_INCREF(Py_False), Py_False)) static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*); static CYTHON_INLINE PyObject* __Pyx_PyNumber_Int(PyObject* x); static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*); static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t); #if CYTHON_COMPILING_IN_CPYTHON #define __pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x)) #else #define __pyx_PyFloat_AsDouble(x) PyFloat_AsDouble(x) #endif #define __pyx_PyFloat_AsFloat(x) ((float) __pyx_PyFloat_AsDouble(x)) #if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII static int __Pyx_sys_getdefaultencoding_not_ascii; static int __Pyx_init_sys_getdefaultencoding_params(void) { PyObject* sys = NULL; PyObject* default_encoding = NULL; PyObject* ascii_chars_u = NULL; PyObject* ascii_chars_b = NULL; sys = PyImport_ImportModule("sys"); if (sys == NULL) goto bad; default_encoding = PyObject_CallMethod(sys, (char*) (const char*) "getdefaultencoding", NULL); if (default_encoding == NULL) goto bad; if (strcmp(PyBytes_AsString(default_encoding), "ascii") == 0) { __Pyx_sys_getdefaultencoding_not_ascii = 0; } else { const char* default_encoding_c = PyBytes_AS_STRING(default_encoding); 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 == NULL) goto bad; ascii_chars_b = PyUnicode_AsEncodedString(ascii_chars_u, default_encoding_c, NULL); if (ascii_chars_b == NULL || strncmp(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_XDECREF(sys); Py_XDECREF(default_encoding); Py_XDECREF(ascii_chars_u); Py_XDECREF(ascii_chars_b); return 0; bad: Py_XDECREF(sys); 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 = NULL; PyObject* default_encoding = NULL; char* default_encoding_c; sys = PyImport_ImportModule("sys"); if (sys == NULL) goto bad; default_encoding = PyObject_CallMethod(sys, (char*) (const char*) "getdefaultencoding", NULL); if (default_encoding == NULL) goto bad; default_encoding_c = PyBytes_AS_STRING(default_encoding); __PYX_DEFAULT_STRING_ENCODING = (char*) malloc(strlen(default_encoding_c)); strcpy(__PYX_DEFAULT_STRING_ENCODING, default_encoding_c); Py_DECREF(sys); Py_DECREF(default_encoding); return 0; bad: Py_XDECREF(sys); Py_XDECREF(default_encoding); return -1; } #endif #endif #ifdef __GNUC__ /* Test for GCC > 2.95 */ #if __GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95)) #define likely(x) __builtin_expect(!!(x), 1) #define unlikely(x) __builtin_expect(!!(x), 0) #else /* __GNUC__ > 2 ... */ #define likely(x) (x) #define unlikely(x) (x) #endif /* __GNUC__ > 2 ... */ #else /* __GNUC__ */ #define likely(x) (x) #define unlikely(x) (x) #endif /* __GNUC__ */ static PyObject *__pyx_m; static PyObject *__pyx_d; static PyObject *__pyx_b; static PyObject *__pyx_empty_tuple; static PyObject *__pyx_empty_bytes; static int __pyx_lineno; static int __pyx_clineno = 0; static const char * __pyx_cfilenm= __FILE__; static const char *__pyx_filename; #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[] = { "reduce.pyx", "inference.pyx", "lib.pyx", "properties.pyx", "datetime.pxd", "numpy.pxd", "util.pxd", "type.pxd", "bool.pxd", "complex.pxd", }; #define IS_UNSIGNED(type) (((type) -1) > 0) struct __Pyx_StructField_; #define __PYX_BUF_FLAGS_PACKED_STRUCT (1 << 0) typedef struct { const char* name; /* for error messages only */ struct __Pyx_StructField_* fields; size_t size; /* sizeof(type) */ size_t arraysize[8]; /* length of array in each dimension */ int ndim; char typegroup; /* _R_eal, _C_omplex, Signed _I_nt, _U_nsigned int, _S_truct, _P_ointer, _O_bject, c_H_ar */ 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; /* "numpy.pxd":726 * # 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; /* "numpy.pxd":727 * * 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; /* "numpy.pxd":728 * 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; /* "numpy.pxd":729 * 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; /* "numpy.pxd":733 * #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; /* "numpy.pxd":734 * * 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; /* "numpy.pxd":735 * 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; /* "numpy.pxd":736 * 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; /* "numpy.pxd":740 * #ctypedef npy_uint128 uint128_t * * ctypedef npy_float16 float16_t # <<<<<<<<<<<<<< * ctypedef npy_float32 float32_t * ctypedef npy_float64 float64_t */ typedef npy_float16 __pyx_t_5numpy_float16_t; /* "numpy.pxd":741 * * ctypedef npy_float16 float16_t * ctypedef npy_float32 float32_t # <<<<<<<<<<<<<< * ctypedef npy_float64 float64_t * #ctypedef npy_float80 float80_t */ typedef npy_float32 __pyx_t_5numpy_float32_t; /* "numpy.pxd":742 * ctypedef npy_float16 float16_t * 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; /* "numpy.pxd":751 * # 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; /* "numpy.pxd":752 * # 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; /* "numpy.pxd":753 * 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; /* "numpy.pxd":755 * 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; /* "numpy.pxd":756 * * ctypedef npy_ulong uint_t * ctypedef npy_ulonglong ulong_t # <<<<<<<<<<<<<< * ctypedef npy_ulonglong ulonglong_t * */ typedef npy_ulonglong __pyx_t_5numpy_ulong_t; /* "numpy.pxd":757 * 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; /* "numpy.pxd":759 * ctypedef npy_ulonglong ulonglong_t * * ctypedef npy_intp intp_t # <<<<<<<<<<<<<< * ctypedef npy_uintp uintp_t * */ typedef npy_intp __pyx_t_5numpy_intp_t; /* "numpy.pxd":760 * * ctypedef npy_intp intp_t * ctypedef npy_uintp uintp_t # <<<<<<<<<<<<<< * * ctypedef npy_double float_t */ typedef npy_uintp __pyx_t_5numpy_uintp_t; /* "numpy.pxd":762 * 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; /* "numpy.pxd":763 * * ctypedef npy_double float_t * ctypedef npy_double double_t # <<<<<<<<<<<<<< * ctypedef npy_longdouble longdouble_t * */ typedef npy_double __pyx_t_5numpy_double_t; /* "numpy.pxd":764 * 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; /* "pandas/lib.pyx":40 * cdef int64_t NPY_NAT = util.get_nat() * * ctypedef unsigned char UChar # <<<<<<<<<<<<<< * * cimport util */ typedef unsigned char __pyx_t_6pandas_3lib_UChar; #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 #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 /*--- Type declarations ---*/ struct __pyx_obj_6pandas_3lib_BlockSlider; struct __pyx_obj_6pandas_3lib_SeriesBinGrouper; struct __pyx_obj_6pandas_3lib_cache_readonly; struct __pyx_obj_6pandas_3lib_AxisProperty; struct __pyx_obj_6pandas_3lib___pyx_scope_struct_1_try_parse_date_and_time; struct __pyx_obj_6pandas_3lib_SeriesGrouper; struct __pyx_obj_6pandas_3lib___pyx_scope_struct__try_parse_dates; struct __pyx_obj_6pandas_3lib__PandasNull; struct __pyx_obj_6pandas_3lib_Reducer; struct __pyx_obj_6pandas_3lib_Slider; /* "numpy.pxd":766 * 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; /* "numpy.pxd":767 * * ctypedef npy_cfloat cfloat_t * ctypedef npy_cdouble cdouble_t # <<<<<<<<<<<<<< * ctypedef npy_clongdouble clongdouble_t * */ typedef npy_cdouble __pyx_t_5numpy_cdouble_t; /* "numpy.pxd":768 * 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; /* "numpy.pxd":770 * 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/src/reduce.pyx":529 * return results, mutated * * cdef class BlockSlider: # <<<<<<<<<<<<<< * ''' * Only capable of sliding on axis=0 */ struct __pyx_obj_6pandas_3lib_BlockSlider { PyObject_HEAD struct __pyx_vtabstruct_6pandas_3lib_BlockSlider *__pyx_vtab; PyObject *frame; PyObject *dummy; int nblocks; struct __pyx_obj_6pandas_3lib_Slider *idx_slider; PyObject *blocks; char **base_ptrs; }; /* "pandas/src/reduce.pyx":157 * * * cdef class SeriesBinGrouper: # <<<<<<<<<<<<<< * ''' * Performs grouping operation according to bin edges, rather than labels */ struct __pyx_obj_6pandas_3lib_SeriesBinGrouper { PyObject_HEAD Py_ssize_t nresults; Py_ssize_t ngroups; int passed_dummy; PyObject *arr; PyObject *index; PyObject *dummy_arr; PyObject *dummy_index; PyObject *values; PyObject *f; PyObject *bins; PyObject *typ; PyObject *name; }; /* "pandas/src/properties.pyx":4 * * * cdef class cache_readonly(object): # <<<<<<<<<<<<<< * * cdef readonly: */ struct __pyx_obj_6pandas_3lib_cache_readonly { PyObject_HEAD PyObject *func; PyObject *name; PyObject *allow_setting; }; /* "pandas/src/properties.pyx":53 * PyDict_SetItem(cache, self.name, value) * * cdef class AxisProperty(object): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t axis */ struct __pyx_obj_6pandas_3lib_AxisProperty { PyObject_HEAD Py_ssize_t axis; }; /* "pandas/src/inference.pyx":677 * return result * * def try_parse_date_and_time(ndarray[object] dates, ndarray[object] times, # <<<<<<<<<<<<<< * date_parser=None, time_parser=None, * dayfirst=False,default=None): */ struct __pyx_obj_6pandas_3lib___pyx_scope_struct_1_try_parse_date_and_time { PyObject_HEAD PyObject *__pyx_v_date; PyObject *__pyx_v_dayfirst; PyObject *__pyx_v_default; PyObject *__pyx_v_parse; PyObject *__pyx_v_time; }; /* "pandas/src/reduce.pyx":285 * * * cdef class SeriesGrouper: # <<<<<<<<<<<<<< * ''' * Performs generic grouping operation while avoiding ndarray construction */ struct __pyx_obj_6pandas_3lib_SeriesGrouper { PyObject_HEAD Py_ssize_t nresults; Py_ssize_t ngroups; int passed_dummy; PyObject *arr; PyObject *index; PyObject *dummy_arr; PyObject *dummy_index; PyObject *f; PyObject *labels; PyObject *values; PyObject *typ; PyObject *name; }; /* "pandas/src/inference.pyx":629 * return maybe_convert_objects(x, try_float=1) * * def try_parse_dates(ndarray[object] values, parser=None, # <<<<<<<<<<<<<< * dayfirst=False,default=None): * cdef: */ struct __pyx_obj_6pandas_3lib___pyx_scope_struct__try_parse_dates { PyObject_HEAD PyObject *__pyx_v_dayfirst; PyObject *__pyx_v_default; PyObject *__pyx_v_parse; }; /* "pandas/lib.pyx":1056 * return counts * * cdef class _PandasNull: # <<<<<<<<<<<<<< * * def __richcmp__(_PandasNull self, object other, int op): */ struct __pyx_obj_6pandas_3lib__PandasNull { PyObject_HEAD }; /* "pandas/src/reduce.pyx":9 * is_numpy_prior_1_6_2 = LooseVersion(np.__version__) < '1.6.2' * * cdef class Reducer: # <<<<<<<<<<<<<< * ''' * Performs generic reduction operation on a C or Fortran-contiguous ndarray */ struct __pyx_obj_6pandas_3lib_Reducer { PyObject_HEAD Py_ssize_t increment; Py_ssize_t chunksize; Py_ssize_t nresults; PyObject *arr; PyObject *dummy; PyObject *f; PyObject *labels; PyObject *typ; PyObject *index; }; /* "pandas/src/reduce.pyx":426 * return res * * cdef class Slider: # <<<<<<<<<<<<<< * ''' * Only handles contiguous data for now */ struct __pyx_obj_6pandas_3lib_Slider { PyObject_HEAD struct __pyx_vtabstruct_6pandas_3lib_Slider *__pyx_vtab; PyArrayObject *values; PyArrayObject *buf; Py_ssize_t stride; Py_ssize_t orig_len; Py_ssize_t orig_stride; char *orig_data; }; struct __pyx_vtabstruct_6pandas_3lib_Slider { PyObject *(*advance)(struct __pyx_obj_6pandas_3lib_Slider *, Py_ssize_t, int __pyx_skip_dispatch); PyObject *(*move)(struct __pyx_obj_6pandas_3lib_Slider *, int, int); PyObject *(*set_length)(struct __pyx_obj_6pandas_3lib_Slider *, Py_ssize_t, int __pyx_skip_dispatch); PyObject *(*reset)(struct __pyx_obj_6pandas_3lib_Slider *, int __pyx_skip_dispatch); }; static struct __pyx_vtabstruct_6pandas_3lib_Slider *__pyx_vtabptr_6pandas_3lib_Slider; /* "pandas/src/reduce.pyx":529 * return results, mutated * * cdef class BlockSlider: # <<<<<<<<<<<<<< * ''' * Only capable of sliding on axis=0 */ struct __pyx_vtabstruct_6pandas_3lib_BlockSlider { PyObject *(*move)(struct __pyx_obj_6pandas_3lib_BlockSlider *, int, int, int __pyx_skip_dispatch); PyObject *(*reset)(struct __pyx_obj_6pandas_3lib_BlockSlider *); }; static struct __pyx_vtabstruct_6pandas_3lib_BlockSlider *__pyx_vtabptr_6pandas_3lib_BlockSlider; #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); /*proto*/ #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 /* CYTHON_REFNANNY */ #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) #if CYTHON_COMPILING_IN_CPYTHON static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name) { PyTypeObject* tp = Py_TYPE(obj); if (likely(tp->tp_getattro)) return tp->tp_getattro(obj, attr_name); #if PY_MAJOR_VERSION < 3 if (likely(tp->tp_getattr)) return tp->tp_getattr(obj, PyString_AS_STRING(attr_name)); #endif return PyObject_GetAttr(obj, attr_name); } #else #define __Pyx_PyObject_GetAttrStr(o,n) PyObject_GetAttr(o,n) #endif static PyObject *__Pyx_GetBuiltinName(PyObject *name); /*proto*/ #define __Pyx_GetItemInt(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck) \ (__Pyx_fits_Py_ssize_t(i, type, is_signed) ? \ __Pyx_GetItemInt_Fast(o, (Py_ssize_t)i, is_list, wraparound, boundscheck) : \ (is_list ? (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL) : \ __Pyx_GetItemInt_Generic(o, to_py_func(i)))) #define __Pyx_GetItemInt_List(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck) \ (__Pyx_fits_Py_ssize_t(i, type, is_signed) ? \ __Pyx_GetItemInt_List_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) : \ (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL)) static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i, int wraparound, int boundscheck); #define __Pyx_GetItemInt_Tuple(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck) \ (__Pyx_fits_Py_ssize_t(i, type, is_signed) ? \ __Pyx_GetItemInt_Tuple_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) : \ (PyErr_SetString(PyExc_IndexError, "tuple index out of range"), (PyObject*)NULL)) static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i, int wraparound, int boundscheck); static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j); static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, int is_list, int wraparound, int boundscheck); static CYTHON_INLINE int __Pyx_ArgTypeTest(PyObject *obj, PyTypeObject *type, int none_allowed, const char *name, int exact); /*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); /*proto*/ static void __Pyx_RaiseDoubleKeywordsError(const char* func_name, PyObject* kw_name); /*proto*/ static int __Pyx_ParseOptionalKeywords(PyObject *kwds, PyObject **argnames[], \ PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args, \ const char* function_name); /*proto*/ static CYTHON_INLINE PyObject *__Pyx_GetModuleGlobalName(PyObject *name); /*proto*/ static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type); /*proto*/ static CYTHON_INLINE int __Pyx_GetBufferAndValidate(Py_buffer* buf, PyObject* obj, __Pyx_TypeInfo* dtype, int flags, int nd, int cast, __Pyx_BufFmt_StackElem* stack); static CYTHON_INLINE void __Pyx_SafeReleaseBuffer(Py_buffer* info); static void __Pyx_RaiseBufferFallbackError(void); /*proto*/ static CYTHON_INLINE int __Pyx_PySequence_Contains(PyObject* item, PyObject* seq, int eq) { int result = PySequence_Contains(seq, item); return unlikely(result < 0) ? result : (result == (eq == Py_EQ)); } static void __Pyx_RaiseBufferIndexError(int axis); /*proto*/ #define __Pyx_BufPtrStrided1d(type, buf, i0, s0) (type)((char*)buf + i0 * s0) static CYTHON_INLINE void __Pyx_ErrRestore(PyObject *type, PyObject *value, PyObject *tb); /*proto*/ static CYTHON_INLINE void __Pyx_ErrFetch(PyObject **type, PyObject **value, PyObject **tb); /*proto*/ static void __Pyx_WriteUnraisable(const char *name, int clineno, int lineno, const char *filename, int full_traceback); /*proto*/ static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected); static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index); static CYTHON_INLINE int __Pyx_IterFinish(void); /*proto*/ static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected); /*proto*/ #define __Pyx_BufPtrStrided2d(type, buf, i0, s0, i1, s1) (type)((char*)buf + i0 * s0 + i1 * s1) static CYTHON_INLINE int __Pyx_PyDict_Contains(PyObject* item, PyObject* dict, int eq) { int result = PyDict_Contains(dict, item); return unlikely(result < 0) ? result : (result == (eq == Py_EQ)); } #if CYTHON_COMPILING_IN_CPYTHON static CYTHON_INLINE int __Pyx_PyList_Append(PyObject* list, PyObject* x) { PyListObject* L = (PyListObject*) list; Py_ssize_t len = Py_SIZE(list); if (likely(L->allocated > len) & likely(len > (L->allocated >> 1))) { Py_INCREF(x); PyList_SET_ITEM(list, len, x); Py_SIZE(list) = len+1; return 0; } return PyList_Append(list, x); } #else #define __Pyx_PyList_Append(L,x) PyList_Append(L,x) #endif static CYTHON_INLINE void __Pyx_ExceptionSave(PyObject **type, PyObject **value, PyObject **tb); /*proto*/ static void __Pyx_ExceptionReset(PyObject *type, PyObject *value, PyObject *tb); /*proto*/ #if PY_MAJOR_VERSION >= 3 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; } #else #define __Pyx_PyDict_GetItem(d, key) PyObject_GetItem(d, key) #endif static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause); /*proto*/ static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name); /*proto*/ static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb); /*proto*/ #define __Pyx_SetItemInt(o, i, v, type, is_signed, to_py_func, is_list, wraparound, boundscheck) \ (__Pyx_fits_Py_ssize_t(i, type, is_signed) ? \ __Pyx_SetItemInt_Fast(o, (Py_ssize_t)i, v, is_list, wraparound, boundscheck) : \ (is_list ? (PyErr_SetString(PyExc_IndexError, "list assignment index out of range"), -1) : \ __Pyx_SetItemInt_Generic(o, to_py_func(i), v))) static CYTHON_INLINE int __Pyx_SetItemInt_Generic(PyObject *o, PyObject *j, PyObject *v); static CYTHON_INLINE int __Pyx_SetItemInt_Fast(PyObject *o, Py_ssize_t i, PyObject *v, int is_list, int wraparound, int boundscheck); #if CYTHON_COMPILING_IN_CPYTHON static CYTHON_INLINE int __Pyx_ListComp_Append(PyObject* list, PyObject* x) { PyListObject* L = (PyListObject*) list; Py_ssize_t len = Py_SIZE(list); if (likely(L->allocated > len)) { Py_INCREF(x); PyList_SET_ITEM(list, len, x); Py_SIZE(list) = len+1; return 0; } return PyList_Append(list, x); } #else #define __Pyx_ListComp_Append(L,x) PyList_Append(L,x) #endif static CYTHON_INLINE int __Pyx_mod_int(int, int); /* proto */ #ifndef __PYX_FORCE_INIT_THREADS #define __PYX_FORCE_INIT_THREADS 0 #endif #define __Pyx_PyObject_DelSlice(obj, cstart, cstop, py_start, py_stop, py_slice, has_cstart, has_cstop, wraparound) \ __Pyx_PyObject_SetSlice(obj, (PyObject*)NULL, cstart, cstop, py_start, py_stop, py_slice, has_cstart, has_cstop, wraparound) static CYTHON_INLINE int __Pyx_PyObject_SetSlice( PyObject* obj, PyObject* value, Py_ssize_t cstart, Py_ssize_t cstop, PyObject** py_start, PyObject** py_stop, PyObject** py_slice, int has_cstart, int has_cstop, int wraparound); static CYTHON_INLINE long __Pyx_mod_long(long, long); /* proto */ #if CYTHON_COMPILING_IN_CPYTHON static CYTHON_INLINE PyObject* __Pyx_PyList_GetSlice(PyObject* src, Py_ssize_t start, Py_ssize_t stop); static CYTHON_INLINE PyObject* __Pyx_PyTuple_GetSlice(PyObject* src, Py_ssize_t start, Py_ssize_t stop); #else #define __Pyx_PyList_GetSlice(seq, start, stop) PySequence_GetSlice(seq, start, stop) #define __Pyx_PyTuple_GetSlice(seq, start, stop) PySequence_GetSlice(seq, start, stop) #endif static CYTHON_INLINE PyObject* __Pyx_PyObject_GetSlice( PyObject* obj, Py_ssize_t cstart, Py_ssize_t cstop, PyObject** py_start, PyObject** py_stop, PyObject** py_slice, int has_cstart, int has_cstop, int wraparound); static CYTHON_INLINE PyObject *__Pyx_GetAttr(PyObject *, PyObject *); /*proto*/ static CYTHON_INLINE PyObject *__Pyx_GetAttr3(PyObject *, PyObject *, PyObject *); /*proto*/ static CYTHON_INLINE void __Pyx_RaiseUnboundLocalError(const char *varname); #if CYTHON_COMPILING_IN_CPYTHON #define __Pyx_PyObject_DelAttrStr(o,n) __Pyx_PyObject_SetAttrStr(o,n,NULL) static CYTHON_INLINE int __Pyx_PyObject_SetAttrStr(PyObject* obj, PyObject* attr_name, PyObject* value) { PyTypeObject* tp = Py_TYPE(obj); if (likely(tp->tp_setattro)) return tp->tp_setattro(obj, attr_name, value); #if PY_MAJOR_VERSION < 3 if (likely(tp->tp_setattr)) return tp->tp_setattr(obj, PyString_AS_STRING(attr_name), value); #endif return PyObject_SetAttr(obj, attr_name, value); } #else #define __Pyx_PyObject_DelAttrStr(o,n) PyObject_DelAttr(o,n) #define __Pyx_PyObject_SetAttrStr(o,n,v) PyObject_SetAttr(o,n,v) #endif static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb); /*proto*/ #define __Pyx_PyDict_Clear(d) (PyDict_Clear(d), 0) static double __Pyx__PyObject_AsDouble(PyObject* obj); /* proto */ #if CYTHON_COMPILING_IN_PYPY #define __Pyx_PyObject_AsDouble(obj) \ (likely(PyFloat_CheckExact(obj)) ? PyFloat_AS_DOUBLE(obj) : \ likely(PyInt_CheckExact(obj)) ? \ PyFloat_AsDouble(obj) : __Pyx__PyObject_AsDouble(obj)) #else #define __Pyx_PyObject_AsDouble(obj) \ ((likely(PyFloat_CheckExact(obj))) ? \ PyFloat_AS_DOUBLE(obj) : __Pyx__PyObject_AsDouble(obj)) #endif static CYTHON_INLINE void __Pyx_RaiseClosureNameError(const char *varname); static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type); #define __Pyx_CyFunction_USED 1 #include #define __Pyx_CYFUNCTION_STATICMETHOD 0x01 #define __Pyx_CYFUNCTION_CLASSMETHOD 0x02 #define __Pyx_CYFUNCTION_CCLASS 0x04 #define __Pyx_CyFunction_GetClosure(f) \ (((__pyx_CyFunctionObject *) (f))->func_closure) #define __Pyx_CyFunction_GetClassObj(f) \ (((__pyx_CyFunctionObject *) (f))->func_classobj) #define __Pyx_CyFunction_Defaults(type, f) \ ((type *)(((__pyx_CyFunctionObject *) (f))->defaults)) #define __Pyx_CyFunction_SetDefaultsGetter(f, g) \ ((__pyx_CyFunctionObject *) (f))->defaults_getter = (g) typedef struct { PyCFunctionObject func; int flags; PyObject *func_dict; PyObject *func_weakreflist; PyObject *func_name; PyObject *func_qualname; PyObject *func_doc; PyObject *func_globals; PyObject *func_code; PyObject *func_closure; PyObject *func_classobj; /* No-args super() class cell */ void *defaults; int defaults_pyobjects; PyObject *defaults_tuple; /* Const defaults tuple */ PyObject *defaults_kwdict; /* Const kwonly defaults dict */ PyObject *(*defaults_getter)(PyObject *); PyObject *func_annotations; /* function annotations dict */ } __pyx_CyFunctionObject; static PyTypeObject *__pyx_CyFunctionType = 0; #define __Pyx_CyFunction_NewEx(ml, flags, qualname, self, module, globals, code) \ __Pyx_CyFunction_New(__pyx_CyFunctionType, ml, flags, qualname, self, module, globals, code) static PyObject *__Pyx_CyFunction_New(PyTypeObject *, PyMethodDef *ml, int flags, PyObject* qualname, PyObject *self, PyObject *module, PyObject *globals, PyObject* code); static CYTHON_INLINE void *__Pyx_CyFunction_InitDefaults(PyObject *m, size_t size, int pyobjects); static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *m, PyObject *tuple); static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *m, PyObject *dict); static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *m, PyObject *dict); static int __Pyx_CyFunction_init(void); #include static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals); /*proto*/ static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals); /*proto*/ #if PY_MAJOR_VERSION >= 3 #define __Pyx_PyString_Equals __Pyx_PyUnicode_Equals #else #define __Pyx_PyString_Equals __Pyx_PyBytes_Equals #endif #if PY_VERSION_HEX < 0x02050000 #ifndef PyAnySet_CheckExact #define PyAnySet_CheckExact(ob) \ ((ob)->ob_type == &PySet_Type || \ (ob)->ob_type == &PyFrozenSet_Type) #define PySet_New(iterable) \ PyObject_CallFunctionObjArgs((PyObject *)&PySet_Type, (iterable), NULL) #define Pyx_PyFrozenSet_New(iterable) \ PyObject_CallFunctionObjArgs((PyObject *)&PyFrozenSet_Type, (iterable), NULL) #define PySet_Size(anyset) \ PyObject_Size((anyset)) #define PySet_Contains(anyset, key) \ PySequence_Contains((anyset), (key)) #define PySet_Pop(set) \ PyObject_CallMethod((set), (char*)"pop", NULL) static CYTHON_INLINE int PySet_Clear(PyObject *set) { PyObject *ret = PyObject_CallMethod(set, (char*)"clear", NULL); if (!ret) return -1; Py_DECREF(ret); return 0; } static CYTHON_INLINE int PySet_Discard(PyObject *set, PyObject *key) { PyObject *ret = PyObject_CallMethod(set, (char*)"discard", (char*)"(O)", key); if (!ret) return -1; Py_DECREF(ret); return 0; } static CYTHON_INLINE int PySet_Add(PyObject *set, PyObject *key) { PyObject *ret = PyObject_CallMethod(set, (char*)"add", (char*)"(O)", key); if (!ret) return -1; Py_DECREF(ret); return 0; } #endif /* PyAnySet_CheckExact (<= Py2.4) */ #endif /* < Py2.5 */ static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void); static int __Pyx_SetVtable(PyObject *dict, void *vtable); /*proto*/ static PyObject *__Pyx_CalculateMetaclass(PyTypeObject *metaclass, PyObject *bases); static PyObject *__Pyx_Py3MetaclassPrepare(PyObject *metaclass, PyObject *bases, PyObject *name, PyObject *qualname, PyObject *mkw, PyObject *modname, PyObject *doc); /*proto*/ static PyObject *__Pyx_Py3ClassCreate(PyObject *metaclass, PyObject *name, PyObject *bases, PyObject *dict, PyObject *mkw, int calculate_metaclass, int allow_py2_metaclass); /*proto*/ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value); static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *); 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 static Py_ssize_t __Pyx_zeros[] = {0, 0, 0, 0, 0, 0, 0, 0}; static Py_ssize_t __Pyx_minusones[] = {-1, -1, -1, -1, -1, -1, -1, -1}; static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level); /*proto*/ static CYTHON_INLINE npy_int64 __Pyx_PyInt_As_npy_int64(PyObject *); static CYTHON_INLINE PyObject* __Pyx_PyInt_From_npy_int64(npy_int64 value); static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value); static CYTHON_INLINE PyObject* __Pyx_PyInt_From_Py_intptr_t(Py_intptr_t value); #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(_WIN32) || defined(__clang__)) && defined(__cplusplus) && CYTHON_CCOMPLEX #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 static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double, double); #if CYTHON_CCOMPLEX #define __Pyx_c_eq(a, b) ((a)==(b)) #define __Pyx_c_sum(a, b) ((a)+(b)) #define __Pyx_c_diff(a, b) ((a)-(b)) #define __Pyx_c_prod(a, b) ((a)*(b)) #define __Pyx_c_quot(a, b) ((a)/(b)) #define __Pyx_c_neg(a) (-(a)) #ifdef __cplusplus #define __Pyx_c_is_zero(z) ((z)==(double)0) #define __Pyx_c_conj(z) (::std::conj(z)) #if 1 #define __Pyx_c_abs(z) (::std::abs(z)) #define __Pyx_c_pow(a, b) (::std::pow(a, b)) #endif #else #define __Pyx_c_is_zero(z) ((z)==0) #define __Pyx_c_conj(z) (conj(z)) #if 1 #define __Pyx_c_abs(z) (cabs(z)) #define __Pyx_c_pow(a, b) (cpow(a, b)) #endif #endif #else static CYTHON_INLINE int __Pyx_c_eq(__pyx_t_double_complex, __pyx_t_double_complex); static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_sum(__pyx_t_double_complex, __pyx_t_double_complex); static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_diff(__pyx_t_double_complex, __pyx_t_double_complex); static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_prod(__pyx_t_double_complex, __pyx_t_double_complex); static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_quot(__pyx_t_double_complex, __pyx_t_double_complex); static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_neg(__pyx_t_double_complex); static CYTHON_INLINE int __Pyx_c_is_zero(__pyx_t_double_complex); static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_conj(__pyx_t_double_complex); #if 1 static CYTHON_INLINE double __Pyx_c_abs(__pyx_t_double_complex); static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_pow(__pyx_t_double_complex, __pyx_t_double_complex); #endif #endif static __pyx_t_double_complex __Pyx_PyComplex_As___pyx_t_double_complex(PyObject*); static CYTHON_INLINE npy_uint8 __Pyx_PyInt_As_npy_uint8(PyObject *); static CYTHON_INLINE npy_int32 __Pyx_PyInt_As_npy_int32(PyObject *); static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float, float); #if CYTHON_CCOMPLEX #define __Pyx_c_eqf(a, b) ((a)==(b)) #define __Pyx_c_sumf(a, b) ((a)+(b)) #define __Pyx_c_difff(a, b) ((a)-(b)) #define __Pyx_c_prodf(a, b) ((a)*(b)) #define __Pyx_c_quotf(a, b) ((a)/(b)) #define __Pyx_c_negf(a) (-(a)) #ifdef __cplusplus #define __Pyx_c_is_zerof(z) ((z)==(float)0) #define __Pyx_c_conjf(z) (::std::conj(z)) #if 1 #define __Pyx_c_absf(z) (::std::abs(z)) #define __Pyx_c_powf(a, b) (::std::pow(a, b)) #endif #else #define __Pyx_c_is_zerof(z) ((z)==0) #define __Pyx_c_conjf(z) (conjf(z)) #if 1 #define __Pyx_c_absf(z) (cabsf(z)) #define __Pyx_c_powf(a, b) (cpowf(a, b)) #endif #endif #else static CYTHON_INLINE int __Pyx_c_eqf(__pyx_t_float_complex, __pyx_t_float_complex); static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_sumf(__pyx_t_float_complex, __pyx_t_float_complex); static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_difff(__pyx_t_float_complex, __pyx_t_float_complex); static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_prodf(__pyx_t_float_complex, __pyx_t_float_complex); static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_quotf(__pyx_t_float_complex, __pyx_t_float_complex); static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_negf(__pyx_t_float_complex); static CYTHON_INLINE int __Pyx_c_is_zerof(__pyx_t_float_complex); static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_conjf(__pyx_t_float_complex); #if 1 static CYTHON_INLINE float __Pyx_c_absf(__pyx_t_float_complex); static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_powf(__pyx_t_float_complex, __pyx_t_float_complex); #endif #endif static CYTHON_INLINE PyObject* __Pyx_PyInt_From_ptrdiff_t(ptrdiff_t value); static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *); static int __Pyx_check_binary_version(void); #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 static PyObject *__Pyx_ImportModule(const char *name); /*proto*/ static PyTypeObject *__Pyx_ImportType(const char *module_name, const char *class_name, size_t size, int strict); /*proto*/ static int __Pyx_ImportFunction(PyObject *module, const char *funcname, void (**f)(void), const char *sig); /*proto*/ typedef struct { int code_line; PyCodeObject* code_object; } __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); static void __Pyx_AddTraceback(const char *funcname, int c_line, int py_line, const char *filename); /*proto*/ static int __Pyx_InitStrings(__Pyx_StringTabEntry *t); /*proto*/ /* Module declarations from 'cpython.buffer' */ /* Module declarations from 'cpython.ref' */ /* Module declarations from 'libc.string' */ /* Module declarations from 'libc.stdio' */ /* Module declarations from 'cpython.object' */ /* Module declarations from 'libc.stdlib' */ /* 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*/ /* Module declarations from 'cython' */ /* Module declarations from 'cpython.version' */ /* Module declarations from 'cpython.exc' */ /* Module declarations from 'cpython.module' */ /* Module declarations from 'cpython.mem' */ /* Module declarations from 'cpython.tuple' */ /* Module declarations from 'cpython.list' */ /* Module declarations from 'cpython.sequence' */ /* Module declarations from 'cpython.mapping' */ /* Module declarations from 'cpython.iterator' */ /* Module declarations from '__builtin__' */ /* Module declarations from 'cpython.type' */ static PyTypeObject *__pyx_ptype_7cpython_4type_type = 0; /* Module declarations from 'cpython.number' */ /* Module declarations from 'cpython.int' */ /* Module declarations from '__builtin__' */ /* Module declarations from 'cpython.bool' */ static PyTypeObject *__pyx_ptype_7cpython_4bool_bool = 0; /* Module declarations from 'cpython.long' */ /* Module declarations from 'cpython.float' */ /* Module declarations from '__builtin__' */ /* Module declarations from 'cpython.complex' */ static PyTypeObject *__pyx_ptype_7cpython_7complex_complex = 0; /* Module declarations from 'cpython.string' */ /* Module declarations from 'cpython.unicode' */ /* Module declarations from 'cpython.dict' */ /* Module declarations from 'cpython.instance' */ /* Module declarations from 'cpython.function' */ /* Module declarations from 'cpython.method' */ /* Module declarations from 'cpython.weakref' */ /* Module declarations from 'cpython.getargs' */ /* Module declarations from 'cpython.pythread' */ /* Module declarations from 'cpython.pystate' */ /* Module declarations from 'cpython.cobject' */ /* Module declarations from 'cpython.oldbuffer' */ /* Module declarations from 'cpython.set' */ /* Module declarations from 'cpython.bytes' */ /* Module declarations from 'cpython.pycapsule' */ /* Module declarations from 'cpython' */ /* Module declarations from 'datetime' */ /* Module declarations from 'datetime' */ static PyTypeObject *__pyx_ptype_8datetime_date = 0; static PyTypeObject *__pyx_ptype_8datetime_datetime = 0; static PyTypeObject *__pyx_ptype_8datetime_timedelta = 0; static CYTHON_INLINE int __pyx_f_8datetime__cstring_to_dts(char *, int, pandas_datetimestruct *); /*proto*/ static CYTHON_INLINE PyObject *__pyx_f_8datetime__dts_to_pydatetime(pandas_datetimestruct *); /*proto*/ /* Module declarations from 'pandas.tslib' */ static PyObject *(*__pyx_f_6pandas_5tslib_convert_to_tsobject)(PyObject *, PyObject *, PyObject *); /*proto*/ static PyObject *(*__pyx_f_6pandas_5tslib_convert_to_timedelta64)(PyObject *, PyObject *, PyObject *); /*proto*/ /* Module declarations from 'util' */ static CYTHON_INLINE PyObject *__pyx_f_4util_get_value_at(PyArrayObject *, PyObject *); /*proto*/ static CYTHON_INLINE PyObject *__pyx_f_4util_set_value_at(PyArrayObject *, PyObject *, PyObject *); /*proto*/ static CYTHON_INLINE PyObject *__pyx_f_4util_is_array(PyObject *); /*proto*/ static CYTHON_INLINE int __pyx_f_4util__checknull(PyObject *); /*proto*/ static CYTHON_INLINE int __pyx_f_4util__checknull_old(PyObject *); /*proto*/ static CYTHON_INLINE int __pyx_f_4util__checknan(PyObject *); /*proto*/ /* Module declarations from 'pandas.lib' */ static PyTypeObject *__pyx_ptype_6pandas_3lib_BlockSlider = 0; static PyTypeObject *__pyx_ptype_6pandas_3lib_SeriesBinGrouper = 0; static PyTypeObject *__pyx_ptype_6pandas_3lib_cache_readonly = 0; static PyTypeObject *__pyx_ptype_6pandas_3lib_AxisProperty = 0; static PyTypeObject *__pyx_ptype_6pandas_3lib___pyx_scope_struct_1_try_parse_date_and_time = 0; static PyTypeObject *__pyx_ptype_6pandas_3lib_SeriesGrouper = 0; static PyTypeObject *__pyx_ptype_6pandas_3lib___pyx_scope_struct__try_parse_dates = 0; static PyTypeObject *__pyx_ptype_6pandas_3lib__PandasNull = 0; static PyTypeObject *__pyx_ptype_6pandas_3lib_Reducer = 0; static PyTypeObject *__pyx_ptype_6pandas_3lib_Slider = 0; static double __pyx_v_6pandas_3lib_NaN; static double __pyx_v_6pandas_3lib_nan; static double __pyx_v_6pandas_3lib_NAN; static __pyx_t_5numpy_int64_t __pyx_v_6pandas_3lib_NPY_NAT; static int __pyx_v_6pandas_3lib__EPOCH_ORD; static double __pyx_v_6pandas_3lib_INF; static double __pyx_v_6pandas_3lib_NEGINF; static double __pyx_v_6pandas_3lib_fINT64_MAX; static double __pyx_v_6pandas_3lib_fINT64_MIN; static PyObject *__pyx_f_6pandas_3lib_map_indices_list(PyObject *, int __pyx_skip_dispatch); /*proto*/ static CYTHON_INLINE __pyx_t_5numpy_int64_t __pyx_f_6pandas_3lib_gmtime(PyObject *); /*proto*/ static PyObject *__pyx_f_6pandas_3lib_to_datetime(__pyx_t_5numpy_int64_t, int __pyx_skip_dispatch); /*proto*/ static PyObject *__pyx_f_6pandas_3lib_to_timestamp(PyObject *, int __pyx_skip_dispatch); /*proto*/ static CYTHON_INLINE __pyx_t_5numpy_int64_t __pyx_f_6pandas_3lib_get_timedelta64_value(PyObject *); /*proto*/ static PyObject *__pyx_f_6pandas_3lib_checknull(PyObject *, int __pyx_skip_dispatch); /*proto*/ static PyObject *__pyx_f_6pandas_3lib_checknull_old(PyObject *, int __pyx_skip_dispatch); /*proto*/ static PyArrayObject *__pyx_f_6pandas_3lib_astype_str(PyArrayObject *, int __pyx_skip_dispatch); /*proto*/ static CYTHON_INLINE PyObject *__pyx_f_6pandas_3lib__extract_result(PyObject *); /*proto*/ static CYTHON_INLINE int __pyx_f_6pandas_3lib_is_null_datetimelike(PyObject *); /*proto*/ static CYTHON_INLINE int __pyx_f_6pandas_3lib_is_datetime(PyObject *); /*proto*/ static CYTHON_INLINE int __pyx_f_6pandas_3lib_is_date(PyObject *); /*proto*/ static CYTHON_INLINE int __pyx_f_6pandas_3lib_is_time(PyObject *); /*proto*/ static CYTHON_INLINE int __pyx_f_6pandas_3lib_is_timedelta(PyObject *); /*proto*/ 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_object = { "Python object", NULL, sizeof(PyObject *), { 0 }, 0, 'O', 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_nn___pyx_t_5numpy_float32_t = { "float32_t", NULL, sizeof(__pyx_t_5numpy_float32_t), { 0 }, 0, 'R', 0, 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___pyx_t_double_complex = { "double complex", NULL, sizeof(__pyx_t_double_complex), { 0 }, 0, 'C', 0, 0 }; #define __Pyx_MODULE_NAME "pandas.lib" int __pyx_module_is_main_pandas__lib = 0; /* Implementation of 'pandas.lib' */ static PyObject *__pyx_builtin_Exception; static PyObject *__pyx_builtin_AttributeError; static PyObject *__pyx_builtin_range; static PyObject *__pyx_builtin_object; static PyObject *__pyx_builtin_ValueError; static PyObject *__pyx_builtin_TypeError; static PyObject *__pyx_builtin_enumerate; static PyObject *__pyx_builtin_OverflowError; static PyObject *__pyx_builtin_ImportError; static PyObject *__pyx_builtin_RuntimeError; static PyObject *__pyx_builtin_IndexError; static PyObject *__pyx_pf_6pandas_3lib_map_indices_list(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_index); /* proto */ static PyObject *__pyx_pf_6pandas_3lib_2ismember(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_arr, PyObject *__pyx_v_values); /* proto */ static PyObject *__pyx_pf_6pandas_3lib_4to_datetime(CYTHON_UNUSED PyObject *__pyx_self, __pyx_t_5numpy_int64_t __pyx_v_timestamp); /* proto */ static PyObject *__pyx_pf_6pandas_3lib_6to_timestamp(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_dt); /* proto */ static PyObject *__pyx_pf_6pandas_3lib_8array_to_timestamp(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_arr); /* proto */ static PyObject *__pyx_pf_6pandas_3lib_10time64_to_datetime(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_arr); /* proto */ static PyObject *__pyx_pf_6pandas_3lib_12checknull(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_val); /* proto */ static PyObject *__pyx_pf_6pandas_3lib_14checknull_old(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_val); /* proto */ static PyObject *__pyx_pf_6pandas_3lib_16isscalar(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_val); /* proto */ static PyObject *__pyx_pf_6pandas_3lib_18isnullobj(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_arr); /* proto */ static PyObject *__pyx_pf_6pandas_3lib_20isnullobj_old(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_arr); /* proto */ static PyObject *__pyx_pf_6pandas_3lib_22isnullobj2d(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_arr); /* proto */ static PyObject *__pyx_pf_6pandas_3lib_24isnullobj_old(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_arr); /* proto */ static PyObject *__pyx_pf_6pandas_3lib_26isnullobj2d_old(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_arr); /* proto */ static PyObject *__pyx_pf_6pandas_3lib_28list_to_object_array(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */ static PyObject *__pyx_pf_6pandas_3lib_30fast_unique(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values); /* proto */ static PyObject *__pyx_pf_6pandas_3lib_32fast_unique_multiple(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_arrays); /* proto */ static PyObject *__pyx_pf_6pandas_3lib_34fast_unique_multiple_list(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_lists); /* proto */ static PyObject *__pyx_pf_6pandas_3lib_36fast_unique_multiple_list_gen(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_gen); /* proto */ static PyObject *__pyx_pf_6pandas_3lib_38dicts_to_array(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_dicts, PyObject *__pyx_v_columns); /* proto */ static PyObject *__pyx_pf_6pandas_3lib_40fast_zip(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_ndarrays); /* proto */ static PyObject *__pyx_pf_6pandas_3lib_42get_reverse_indexer(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_indexer, Py_ssize_t __pyx_v_length); /* proto */ static PyObject *__pyx_pf_6pandas_3lib_44has_infs_f4(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_arr); /* proto */ static PyObject *__pyx_pf_6pandas_3lib_46has_infs_f8(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_arr); /* proto */ static PyObject *__pyx_pf_6pandas_3lib_48convert_timestamps(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values); /* proto */ static PyObject *__pyx_pf_6pandas_3lib_50maybe_indices_to_slice(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_indices); /* proto */ static PyObject *__pyx_pf_6pandas_3lib_52maybe_booleans_to_slice(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_mask); /* proto */ static PyObject *__pyx_pf_6pandas_3lib_54scalar_compare(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyObject *__pyx_v_val, PyObject *__pyx_v_op); /* proto */ static PyObject *__pyx_pf_6pandas_3lib_56vec_compare(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_left, PyArrayObject *__pyx_v_right, PyObject *__pyx_v_op); /* proto */ static PyObject *__pyx_pf_6pandas_3lib_58scalar_binop(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyObject *__pyx_v_val, PyObject *__pyx_v_op); /* proto */ static PyObject *__pyx_pf_6pandas_3lib_60vec_binop(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_left, PyArrayObject *__pyx_v_right, PyObject *__pyx_v_op); /* proto */ static PyObject *__pyx_pf_6pandas_3lib_62astype_intsafe(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_arr, PyObject *__pyx_v_new_dtype); /* proto */ static PyObject *__pyx_pf_6pandas_3lib_64astype_str(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_arr); /* proto */ static PyObject *__pyx_pf_6pandas_3lib_66clean_index_list(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */ static PyObject *__pyx_pf_6pandas_3lib_68max_len_string_array(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_arr); /* proto */ static PyObject *__pyx_pf_6pandas_3lib_70string_array_replace_from_nan_rep(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_arr, PyObject *__pyx_v_nan_rep, PyObject *__pyx_v_replace); /* proto */ static PyObject *__pyx_pf_6pandas_3lib_72write_csv_rows(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_data, PyObject *__pyx_v_data_index, int __pyx_v_nlevels, PyObject *__pyx_v_cols, PyObject *__pyx_v_writer); /* proto */ static PyObject *__pyx_pf_6pandas_3lib_74arrmap(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_index, PyObject *__pyx_v_func); /* proto */ static PyObject *__pyx_pf_6pandas_3lib_76is_lexsorted(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_list_of_arrays); /* proto */ static PyObject *__pyx_pf_6pandas_3lib_78generate_bins_dt64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_binner, PyObject *__pyx_v_closed); /* proto */ static PyObject *__pyx_pf_6pandas_3lib_80row_bool_subset(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_mask); /* proto */ static PyObject *__pyx_pf_6pandas_3lib_82row_bool_subset_object(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_mask); /* proto */ static PyObject *__pyx_pf_6pandas_3lib_84group_count(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, Py_ssize_t __pyx_v_size); /* proto */ static PyObject *__pyx_pf_6pandas_3lib_86lookup_values(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyObject *__pyx_v_mapping); /* proto */ static PyObject *__pyx_pf_6pandas_3lib_88count_level_1d(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_mask, PyArrayObject *__pyx_v_labels, Py_ssize_t __pyx_v_max_bin); /* proto */ static PyObject *__pyx_pf_6pandas_3lib_90count_level_2d(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_mask, PyArrayObject *__pyx_v_labels, Py_ssize_t __pyx_v_max_bin); /* proto */ static PyObject *__pyx_pf_6pandas_3lib_11_PandasNull___richcmp__(CYTHON_UNUSED struct __pyx_obj_6pandas_3lib__PandasNull *__pyx_v_self, PyObject *__pyx_v_other, int __pyx_v_op); /* proto */ static Py_hash_t __pyx_pf_6pandas_3lib_11_PandasNull_2__hash__(CYTHON_UNUSED struct __pyx_obj_6pandas_3lib__PandasNull *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_3lib_92fast_zip_fillna(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_ndarrays, PyObject *__pyx_v_fill_value); /* proto */ static PyObject *__pyx_pf_6pandas_3lib_94duplicated(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyObject *__pyx_v_take_last); /* proto */ static PyObject *__pyx_pf_6pandas_3lib_96generate_slices(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_labels, Py_ssize_t __pyx_v_ngroups); /* proto */ static PyObject *__pyx_pf_6pandas_3lib_98indices_fast(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_index, PyArrayObject *__pyx_v_labels, PyObject *__pyx_v_keys, PyObject *__pyx_v_sorted_labels); /* proto */ static int __pyx_pf_6pandas_3lib_7Reducer___init__(struct __pyx_obj_6pandas_3lib_Reducer *__pyx_v_self, PyObject *__pyx_v_arr, PyObject *__pyx_v_f, PyObject *__pyx_v_axis, PyObject *__pyx_v_dummy, PyObject *__pyx_v_labels); /* proto */ static PyObject *__pyx_pf_6pandas_3lib_7Reducer_2_check_dummy(struct __pyx_obj_6pandas_3lib_Reducer *__pyx_v_self, PyObject *__pyx_v_dummy); /* proto */ static PyObject *__pyx_pf_6pandas_3lib_7Reducer_4get_result(struct __pyx_obj_6pandas_3lib_Reducer *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_3lib_7Reducer_6_get_result_array(struct __pyx_obj_6pandas_3lib_Reducer *__pyx_v_self, PyObject *__pyx_v_res); /* proto */ static int __pyx_pf_6pandas_3lib_16SeriesBinGrouper___init__(struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *__pyx_v_self, PyObject *__pyx_v_series, PyObject *__pyx_v_f, PyObject *__pyx_v_bins, PyObject *__pyx_v_dummy); /* proto */ static PyObject *__pyx_pf_6pandas_3lib_16SeriesBinGrouper_2_check_dummy(struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *__pyx_v_self, PyObject *__pyx_v_dummy); /* proto */ static PyObject *__pyx_pf_6pandas_3lib_16SeriesBinGrouper_4get_result(struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_3lib_16SeriesBinGrouper_6_get_result_array(struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *__pyx_v_self, PyObject *__pyx_v_res); /* proto */ static PyObject *__pyx_pf_6pandas_3lib_16SeriesBinGrouper_3arr___get__(struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *__pyx_v_self); /* proto */ static int __pyx_pf_6pandas_3lib_16SeriesBinGrouper_3arr_2__set__(struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ static int __pyx_pf_6pandas_3lib_16SeriesBinGrouper_3arr_4__del__(struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_3lib_16SeriesBinGrouper_5index___get__(struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *__pyx_v_self); /* proto */ static int __pyx_pf_6pandas_3lib_16SeriesBinGrouper_5index_2__set__(struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ static int __pyx_pf_6pandas_3lib_16SeriesBinGrouper_5index_4__del__(struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_3lib_16SeriesBinGrouper_9dummy_arr___get__(struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *__pyx_v_self); /* proto */ static int __pyx_pf_6pandas_3lib_16SeriesBinGrouper_9dummy_arr_2__set__(struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ static int __pyx_pf_6pandas_3lib_16SeriesBinGrouper_9dummy_arr_4__del__(struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_3lib_16SeriesBinGrouper_11dummy_index___get__(struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *__pyx_v_self); /* proto */ static int __pyx_pf_6pandas_3lib_16SeriesBinGrouper_11dummy_index_2__set__(struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ static int __pyx_pf_6pandas_3lib_16SeriesBinGrouper_11dummy_index_4__del__(struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_3lib_16SeriesBinGrouper_6values___get__(struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *__pyx_v_self); /* proto */ static int __pyx_pf_6pandas_3lib_16SeriesBinGrouper_6values_2__set__(struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ static int __pyx_pf_6pandas_3lib_16SeriesBinGrouper_6values_4__del__(struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_3lib_16SeriesBinGrouper_1f___get__(struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *__pyx_v_self); /* proto */ static int __pyx_pf_6pandas_3lib_16SeriesBinGrouper_1f_2__set__(struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ static int __pyx_pf_6pandas_3lib_16SeriesBinGrouper_1f_4__del__(struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_3lib_16SeriesBinGrouper_4bins___get__(struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *__pyx_v_self); /* proto */ static int __pyx_pf_6pandas_3lib_16SeriesBinGrouper_4bins_2__set__(struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ static int __pyx_pf_6pandas_3lib_16SeriesBinGrouper_4bins_4__del__(struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_3lib_16SeriesBinGrouper_3typ___get__(struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *__pyx_v_self); /* proto */ static int __pyx_pf_6pandas_3lib_16SeriesBinGrouper_3typ_2__set__(struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ static int __pyx_pf_6pandas_3lib_16SeriesBinGrouper_3typ_4__del__(struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_3lib_16SeriesBinGrouper_4name___get__(struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *__pyx_v_self); /* proto */ static int __pyx_pf_6pandas_3lib_16SeriesBinGrouper_4name_2__set__(struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ static int __pyx_pf_6pandas_3lib_16SeriesBinGrouper_4name_4__del__(struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *__pyx_v_self); /* proto */ static int __pyx_pf_6pandas_3lib_13SeriesGrouper___init__(struct __pyx_obj_6pandas_3lib_SeriesGrouper *__pyx_v_self, PyObject *__pyx_v_series, PyObject *__pyx_v_f, PyObject *__pyx_v_labels, Py_ssize_t __pyx_v_ngroups, PyObject *__pyx_v_dummy); /* proto */ static PyObject *__pyx_pf_6pandas_3lib_13SeriesGrouper_2_check_dummy(struct __pyx_obj_6pandas_3lib_SeriesGrouper *__pyx_v_self, PyObject *__pyx_v_dummy); /* proto */ static PyObject *__pyx_pf_6pandas_3lib_13SeriesGrouper_4get_result(struct __pyx_obj_6pandas_3lib_SeriesGrouper *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_3lib_13SeriesGrouper_6_get_result_array(struct __pyx_obj_6pandas_3lib_SeriesGrouper *__pyx_v_self, PyObject *__pyx_v_res); /* proto */ static PyObject *__pyx_pf_6pandas_3lib_13SeriesGrouper_3arr___get__(struct __pyx_obj_6pandas_3lib_SeriesGrouper *__pyx_v_self); /* proto */ static int __pyx_pf_6pandas_3lib_13SeriesGrouper_3arr_2__set__(struct __pyx_obj_6pandas_3lib_SeriesGrouper *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ static int __pyx_pf_6pandas_3lib_13SeriesGrouper_3arr_4__del__(struct __pyx_obj_6pandas_3lib_SeriesGrouper *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_3lib_13SeriesGrouper_5index___get__(struct __pyx_obj_6pandas_3lib_SeriesGrouper *__pyx_v_self); /* proto */ static int __pyx_pf_6pandas_3lib_13SeriesGrouper_5index_2__set__(struct __pyx_obj_6pandas_3lib_SeriesGrouper *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ static int __pyx_pf_6pandas_3lib_13SeriesGrouper_5index_4__del__(struct __pyx_obj_6pandas_3lib_SeriesGrouper *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_3lib_13SeriesGrouper_9dummy_arr___get__(struct __pyx_obj_6pandas_3lib_SeriesGrouper *__pyx_v_self); /* proto */ static int __pyx_pf_6pandas_3lib_13SeriesGrouper_9dummy_arr_2__set__(struct __pyx_obj_6pandas_3lib_SeriesGrouper *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ static int __pyx_pf_6pandas_3lib_13SeriesGrouper_9dummy_arr_4__del__(struct __pyx_obj_6pandas_3lib_SeriesGrouper *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_3lib_13SeriesGrouper_11dummy_index___get__(struct __pyx_obj_6pandas_3lib_SeriesGrouper *__pyx_v_self); /* proto */ static int __pyx_pf_6pandas_3lib_13SeriesGrouper_11dummy_index_2__set__(struct __pyx_obj_6pandas_3lib_SeriesGrouper *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ static int __pyx_pf_6pandas_3lib_13SeriesGrouper_11dummy_index_4__del__(struct __pyx_obj_6pandas_3lib_SeriesGrouper *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_3lib_13SeriesGrouper_1f___get__(struct __pyx_obj_6pandas_3lib_SeriesGrouper *__pyx_v_self); /* proto */ static int __pyx_pf_6pandas_3lib_13SeriesGrouper_1f_2__set__(struct __pyx_obj_6pandas_3lib_SeriesGrouper *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ static int __pyx_pf_6pandas_3lib_13SeriesGrouper_1f_4__del__(struct __pyx_obj_6pandas_3lib_SeriesGrouper *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_3lib_13SeriesGrouper_6labels___get__(struct __pyx_obj_6pandas_3lib_SeriesGrouper *__pyx_v_self); /* proto */ static int __pyx_pf_6pandas_3lib_13SeriesGrouper_6labels_2__set__(struct __pyx_obj_6pandas_3lib_SeriesGrouper *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ static int __pyx_pf_6pandas_3lib_13SeriesGrouper_6labels_4__del__(struct __pyx_obj_6pandas_3lib_SeriesGrouper *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_3lib_13SeriesGrouper_6values___get__(struct __pyx_obj_6pandas_3lib_SeriesGrouper *__pyx_v_self); /* proto */ static int __pyx_pf_6pandas_3lib_13SeriesGrouper_6values_2__set__(struct __pyx_obj_6pandas_3lib_SeriesGrouper *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ static int __pyx_pf_6pandas_3lib_13SeriesGrouper_6values_4__del__(struct __pyx_obj_6pandas_3lib_SeriesGrouper *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_3lib_13SeriesGrouper_3typ___get__(struct __pyx_obj_6pandas_3lib_SeriesGrouper *__pyx_v_self); /* proto */ static int __pyx_pf_6pandas_3lib_13SeriesGrouper_3typ_2__set__(struct __pyx_obj_6pandas_3lib_SeriesGrouper *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ static int __pyx_pf_6pandas_3lib_13SeriesGrouper_3typ_4__del__(struct __pyx_obj_6pandas_3lib_SeriesGrouper *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_3lib_13SeriesGrouper_4name___get__(struct __pyx_obj_6pandas_3lib_SeriesGrouper *__pyx_v_self); /* proto */ static int __pyx_pf_6pandas_3lib_13SeriesGrouper_4name_2__set__(struct __pyx_obj_6pandas_3lib_SeriesGrouper *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ static int __pyx_pf_6pandas_3lib_13SeriesGrouper_4name_4__del__(struct __pyx_obj_6pandas_3lib_SeriesGrouper *__pyx_v_self); /* proto */ static int __pyx_pf_6pandas_3lib_6Slider___init__(struct __pyx_obj_6pandas_3lib_Slider *__pyx_v_self, PyObject *__pyx_v_values, PyObject *__pyx_v_buf); /* proto */ static PyObject *__pyx_pf_6pandas_3lib_6Slider_2advance(struct __pyx_obj_6pandas_3lib_Slider *__pyx_v_self, Py_ssize_t __pyx_v_k); /* proto */ static PyObject *__pyx_pf_6pandas_3lib_6Slider_4set_length(struct __pyx_obj_6pandas_3lib_Slider *__pyx_v_self, Py_ssize_t __pyx_v_length); /* proto */ static PyObject *__pyx_pf_6pandas_3lib_6Slider_6reset(struct __pyx_obj_6pandas_3lib_Slider *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_3lib_100apply_frame_axis0(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_frame, PyObject *__pyx_v_f, PyObject *__pyx_v_names, PyArrayObject *__pyx_v_starts, PyArrayObject *__pyx_v_ends); /* proto */ static int __pyx_pf_6pandas_3lib_11BlockSlider___init__(struct __pyx_obj_6pandas_3lib_BlockSlider *__pyx_v_self, PyObject *__pyx_v_frame); /* proto */ static void __pyx_pf_6pandas_3lib_11BlockSlider_2__dealloc__(struct __pyx_obj_6pandas_3lib_BlockSlider *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_3lib_11BlockSlider_4move(struct __pyx_obj_6pandas_3lib_BlockSlider *__pyx_v_self, int __pyx_v_start, int __pyx_v_end); /* proto */ static PyObject *__pyx_pf_6pandas_3lib_11BlockSlider_5frame___get__(struct __pyx_obj_6pandas_3lib_BlockSlider *__pyx_v_self); /* proto */ static int __pyx_pf_6pandas_3lib_11BlockSlider_5frame_2__set__(struct __pyx_obj_6pandas_3lib_BlockSlider *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ static int __pyx_pf_6pandas_3lib_11BlockSlider_5frame_4__del__(struct __pyx_obj_6pandas_3lib_BlockSlider *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_3lib_11BlockSlider_5dummy___get__(struct __pyx_obj_6pandas_3lib_BlockSlider *__pyx_v_self); /* proto */ static int __pyx_pf_6pandas_3lib_11BlockSlider_5dummy_2__set__(struct __pyx_obj_6pandas_3lib_BlockSlider *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ static int __pyx_pf_6pandas_3lib_11BlockSlider_5dummy_4__del__(struct __pyx_obj_6pandas_3lib_BlockSlider *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_3lib_11BlockSlider_7nblocks___get__(struct __pyx_obj_6pandas_3lib_BlockSlider *__pyx_v_self); /* proto */ static int __pyx_pf_6pandas_3lib_11BlockSlider_7nblocks_2__set__(struct __pyx_obj_6pandas_3lib_BlockSlider *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ static PyObject *__pyx_pf_6pandas_3lib_11BlockSlider_10idx_slider___get__(struct __pyx_obj_6pandas_3lib_BlockSlider *__pyx_v_self); /* proto */ static int __pyx_pf_6pandas_3lib_11BlockSlider_10idx_slider_2__set__(struct __pyx_obj_6pandas_3lib_BlockSlider *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ static int __pyx_pf_6pandas_3lib_11BlockSlider_10idx_slider_4__del__(struct __pyx_obj_6pandas_3lib_BlockSlider *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_3lib_11BlockSlider_6blocks___get__(struct __pyx_obj_6pandas_3lib_BlockSlider *__pyx_v_self); /* proto */ static int __pyx_pf_6pandas_3lib_11BlockSlider_6blocks_2__set__(struct __pyx_obj_6pandas_3lib_BlockSlider *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ static int __pyx_pf_6pandas_3lib_11BlockSlider_6blocks_4__del__(struct __pyx_obj_6pandas_3lib_BlockSlider *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_3lib_102reduce(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_arr, PyObject *__pyx_v_f, PyObject *__pyx_v_axis, PyObject *__pyx_v_dummy, PyObject *__pyx_v_labels); /* proto */ static int __pyx_pf_6pandas_3lib_14cache_readonly___init__(struct __pyx_obj_6pandas_3lib_cache_readonly *__pyx_v_self, PyObject *__pyx_v_func, PyObject *__pyx_v_allow_setting); /* proto */ static PyObject *__pyx_pf_6pandas_3lib_14cache_readonly_2__call__(struct __pyx_obj_6pandas_3lib_cache_readonly *__pyx_v_self, PyObject *__pyx_v_func, CYTHON_UNUSED PyObject *__pyx_v_doc); /* proto */ static PyObject *__pyx_pf_6pandas_3lib_14cache_readonly_4__get__(struct __pyx_obj_6pandas_3lib_cache_readonly *__pyx_v_self, PyObject *__pyx_v_obj, CYTHON_UNUSED PyObject *__pyx_v_typ); /* proto */ static int __pyx_pf_6pandas_3lib_14cache_readonly_6__set__(struct __pyx_obj_6pandas_3lib_cache_readonly *__pyx_v_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_value); /* proto */ static PyObject *__pyx_pf_6pandas_3lib_14cache_readonly_4func___get__(struct __pyx_obj_6pandas_3lib_cache_readonly *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_3lib_14cache_readonly_4name___get__(struct __pyx_obj_6pandas_3lib_cache_readonly *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_3lib_14cache_readonly_13allow_setting___get__(struct __pyx_obj_6pandas_3lib_cache_readonly *__pyx_v_self); /* proto */ static int __pyx_pf_6pandas_3lib_12AxisProperty___init__(struct __pyx_obj_6pandas_3lib_AxisProperty *__pyx_v_self, PyObject *__pyx_v_axis); /* proto */ static PyObject *__pyx_pf_6pandas_3lib_12AxisProperty_2__get__(struct __pyx_obj_6pandas_3lib_AxisProperty *__pyx_v_self, PyObject *__pyx_v_obj, CYTHON_UNUSED PyObject *__pyx_v_type); /* proto */ static int __pyx_pf_6pandas_3lib_12AxisProperty_4__set__(struct __pyx_obj_6pandas_3lib_AxisProperty *__pyx_v_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_value); /* proto */ static PyObject *__pyx_pf_6pandas_3lib_104infer_dtype(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v__values); /* proto */ static PyObject *__pyx_pf_6pandas_3lib_106infer_dtype_list(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_values); /* proto */ static PyObject *__pyx_pf_6pandas_3lib_108is_bool_array(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values); /* proto */ static PyObject *__pyx_pf_6pandas_3lib_110is_integer(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_o); /* proto */ static PyObject *__pyx_pf_6pandas_3lib_112is_integer_array(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values); /* proto */ static PyObject *__pyx_pf_6pandas_3lib_114is_integer_float_array(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values); /* proto */ static PyObject *__pyx_pf_6pandas_3lib_116is_float_array(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values); /* proto */ static PyObject *__pyx_pf_6pandas_3lib_118is_string_array(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values); /* proto */ static PyObject *__pyx_pf_6pandas_3lib_120is_unicode_array(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values); /* proto */ static PyObject *__pyx_pf_6pandas_3lib_122is_datetime_array(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values); /* proto */ static PyObject *__pyx_pf_6pandas_3lib_124is_datetime64_array(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values); /* proto */ static PyObject *__pyx_pf_6pandas_3lib_126is_timedelta_array(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values); /* proto */ static PyObject *__pyx_pf_6pandas_3lib_128is_timedelta64_array(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values); /* proto */ static PyObject *__pyx_pf_6pandas_3lib_130is_timedelta_or_timedelta64_array(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values); /* proto */ static PyObject *__pyx_pf_6pandas_3lib_132is_date_array(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values); /* proto */ static PyObject *__pyx_pf_6pandas_3lib_134is_time_array(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values); /* proto */ static PyObject *__pyx_pf_6pandas_3lib_136is_period(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_o); /* proto */ static PyObject *__pyx_pf_6pandas_3lib_138is_period_array(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values); /* proto */ static PyObject *__pyx_pf_6pandas_3lib_140maybe_convert_numeric(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyObject *__pyx_v_na_values, PyObject *__pyx_v_convert_empty, PyObject *__pyx_v_coerce_numeric); /* proto */ static PyObject *__pyx_pf_6pandas_3lib_142maybe_convert_objects(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_objects, int __pyx_v_try_float, int __pyx_v_safe, int __pyx_v_convert_datetime, int __pyx_v_convert_timedelta); /* proto */ static PyObject *__pyx_pf_6pandas_3lib_144convert_sql_column(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_x); /* proto */ static PyObject *__pyx_pf_6pandas_3lib_15try_parse_dates_parse_date(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_s); /* proto */ static PyObject *__pyx_lambda_funcdef_lambda1(PyObject *__pyx_self, PyObject *__pyx_v_x); /* proto */ static PyObject *__pyx_pf_6pandas_3lib_146try_parse_dates(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyObject *__pyx_v_parser, PyObject *__pyx_v_dayfirst, PyObject *__pyx_v_default); /* proto */ static PyObject *__pyx_pf_6pandas_3lib_23try_parse_date_and_time_parse_date(PyObject *__pyx_self, PyObject *__pyx_v_s); /* proto */ static PyObject *__pyx_pf_6pandas_3lib_23try_parse_date_and_time_2parse_time(PyObject *__pyx_self, PyObject *__pyx_v_s); /* proto */ static PyObject *__pyx_lambda_funcdef_lambda2(PyObject *__pyx_self, PyObject *__pyx_v_x); /* proto */ static PyObject *__pyx_lambda_funcdef_lambda3(PyObject *__pyx_self, PyObject *__pyx_v_x); /* proto */ static PyObject *__pyx_pf_6pandas_3lib_148try_parse_date_and_time(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_dates, PyArrayObject *__pyx_v_times, PyObject *__pyx_v_date_parser, PyObject *__pyx_v_time_parser, PyObject *__pyx_v_dayfirst, PyObject *__pyx_v_default); /* proto */ static PyObject *__pyx_pf_6pandas_3lib_150try_parse_year_month_day(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_years, PyArrayObject *__pyx_v_months, PyArrayObject *__pyx_v_days); /* proto */ static PyObject *__pyx_pf_6pandas_3lib_152try_parse_datetime_components(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_years, PyArrayObject *__pyx_v_months, PyArrayObject *__pyx_v_days, PyArrayObject *__pyx_v_hours, PyArrayObject *__pyx_v_minutes, PyArrayObject *__pyx_v_seconds); /* proto */ static PyObject *__pyx_pf_6pandas_3lib_154sanitize_objects(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyObject *__pyx_v_na_values, PyObject *__pyx_v_convert_empty); /* proto */ static PyObject *__pyx_pf_6pandas_3lib_156maybe_convert_bool(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_arr, PyObject *__pyx_v_true_values, PyObject *__pyx_v_false_values); /* proto */ static PyObject *__pyx_pf_6pandas_3lib_158map_infer_mask(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_arr, PyObject *__pyx_v_f, PyArrayObject *__pyx_v_mask, int __pyx_v_convert); /* proto */ static PyObject *__pyx_pf_6pandas_3lib_160map_infer(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_arr, PyObject *__pyx_v_f, int __pyx_v_convert); /* proto */ static PyObject *__pyx_pf_6pandas_3lib_162to_object_array(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_rows); /* proto */ static PyObject *__pyx_pf_6pandas_3lib_164tuples_to_object_array(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_tuples); /* proto */ static PyObject *__pyx_pf_6pandas_3lib_166to_object_array_tuples(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_rows); /* proto */ static PyObject *__pyx_pf_6pandas_3lib_168fast_multiget(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_mapping, PyArrayObject *__pyx_v_keys, PyObject *__pyx_v_default); /* 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_3lib_BlockSlider(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_6pandas_3lib_SeriesBinGrouper(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_6pandas_3lib_cache_readonly(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_6pandas_3lib_AxisProperty(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_6pandas_3lib___pyx_scope_struct_1_try_parse_date_and_time(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_6pandas_3lib_SeriesGrouper(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_6pandas_3lib___pyx_scope_struct__try_parse_dates(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_6pandas_3lib__PandasNull(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_6pandas_3lib_Reducer(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_6pandas_3lib_Slider(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static char __pyx_k_B[] = "B"; static char __pyx_k_C[] = "C"; static char __pyx_k_F[] = "F"; static char __pyx_k_H[] = "H"; static char __pyx_k_I[] = "I"; static char __pyx_k_L[] = "L"; static char __pyx_k_N[] = "N"; static char __pyx_k_O[] = "O"; static char __pyx_k_Q[] = "Q"; static char __pyx_k_b[] = "b"; static char __pyx_k_d[] = "d"; static char __pyx_k_f[] = "f"; static char __pyx_k_g[] = "g"; static char __pyx_k_h[] = "h"; static char __pyx_k_i[] = "i"; static char __pyx_k_j[] = "j"; static char __pyx_k_k[] = "k"; static char __pyx_k_l[] = "l"; static char __pyx_k_m[] = "m"; static char __pyx_k_n[] = "n"; static char __pyx_k_o[] = "o"; static char __pyx_k_q[] = "q"; static char __pyx_k_s[] = "s"; static char __pyx_k_t[] = "t"; static char __pyx_k_v[] = "v"; static char __pyx_k_x[] = "x"; static char __pyx_k_y[] = "y"; static char __pyx_k_Zd[] = "Zd"; static char __pyx_k_Zf[] = "Zf"; static char __pyx_k_Zg[] = "Zg"; static char __pyx_k_bc[] = "bc"; static char __pyx_k_eq[] = "eq"; static char __pyx_k_f8[] = "f8"; static char __pyx_k_ge[] = "ge"; static char __pyx_k_gt[] = "gt"; static char __pyx_k_i8[] = "i8"; static char __pyx_k_it[] = "it"; static char __pyx_k_le[] = "le"; static char __pyx_k_lt[] = "lt"; static char __pyx_k_ne[] = "ne"; static char __pyx_k_np[] = "np"; static char __pyx_k_ns[] = "ns"; static char __pyx_k_op[] = "op"; static char __pyx_k_vc[] = "vc"; static char __pyx_k_NaN[] = "NaN"; static char __pyx_k_NaT[] = "NaT"; static char __pyx_k__31[] = "."; static char __pyx_k__34[] = ""; static char __pyx_k_arr[] = "arr"; static char __pyx_k_buf[] = "buf"; static char __pyx_k_c16[] = "c16"; static char __pyx_k_col[] = "col"; static char __pyx_k_cur[] = "cur"; static char __pyx_k_day[] = "day"; static char __pyx_k_doc[] = "doc"; static char __pyx_k_end[] = "end"; static char __pyx_k_gen[] = "gen"; static char __pyx_k_gin[] = "gin"; static char __pyx_k_idx[] = "idx"; static char __pyx_k_inf[] = "inf"; static char __pyx_k_lab[] = "lab"; static char __pyx_k_len[] = "__len__"; static char __pyx_k_nan[] = "nan"; static char __pyx_k_now[] = "now"; static char __pyx_k_obj[] = "obj"; static char __pyx_k_out[] = "out"; static char __pyx_k_pos[] = "pos"; static char __pyx_k_pre[] = "pre"; static char __pyx_k_row[] = "row"; static char __pyx_k_sum[] = "sum"; static char __pyx_k_tmp[] = "tmp"; static char __pyx_k_tup[] = "tup"; static char __pyx_k_val[] = "val"; static char __pyx_k_TRUE[] = "TRUE"; static char __pyx_k_True[] = "True"; static char __pyx_k_args[] = "args"; static char __pyx_k_axes[] = "axes"; static char __pyx_k_axis[] = "axis"; static char __pyx_k_bins[] = "bins"; static char __pyx_k_bool[] = "bool_"; static char __pyx_k_cols[] = "cols"; static char __pyx_k_copy[] = "copy"; static char __pyx_k_data[] = "data"; static char __pyx_k_date[] = "date"; static char __pyx_k_days[] = "days"; static char __pyx_k_ends[] = "ends"; static char __pyx_k_fill[] = "fill"; static char __pyx_k_flag[] = "flag"; static char __pyx_k_fnan[] = "fnan"; static char __pyx_k_func[] = "func"; static char __pyx_k_fval[] = "fval"; static char __pyx_k_hour[] = "hour"; static char __pyx_k_iNaT[] = "iNaT"; static char __pyx_k_int8[] = "int8"; static char __pyx_k_ints[] = "ints"; static char __pyx_k_item[] = "item"; static char __pyx_k_keys[] = "keys"; static char __pyx_k_left[] = "left"; static char __pyx_k_main[] = "__main__"; static char __pyx_k_mask[] = "mask"; static char __pyx_k_memo[] = "memo"; static char __pyx_k_move[] = "move"; static char __pyx_k_name[] = "name"; static char __pyx_k_ndim[] = "ndim"; static char __pyx_k_onan[] = "onan"; static char __pyx_k_rows[] = "rows"; static char __pyx_k_safe[] = "safe"; static char __pyx_k_secs[] = "secs"; static char __pyx_k_seen[] = "seen"; static char __pyx_k_size[] = "size"; static char __pyx_k_stub[] = "stub"; static char __pyx_k_test[] = "__test__"; static char __pyx_k_time[] = "time"; static char __pyx_k_true[] = "true"; static char __pyx_k_type[] = "type"; static char __pyx_k_vecs[] = "vecs"; static char __pyx_k_view[] = "view"; static char __pyx_k_year[] = "year"; static char __pyx_k_1_6_2[] = "1.6.2"; static char __pyx_k_FALSE[] = "FALSE"; static char __pyx_k_False[] = "False"; static char __pyx_k_H_M_S[] = "%H:%M:%S"; static char __pyx_k_M8_ns[] = "M8[ns]"; static char __pyx_k_arobj[] = "arobj"; static char __pyx_k_block[] = "_block"; static char __pyx_k_bools[] = "bools"; static char __pyx_k_cache[] = "_cache"; static char __pyx_k_chunk[] = "chunk"; static char __pyx_k_dates[] = "dates"; static char __pyx_k_dicts[] = "dicts"; static char __pyx_k_doc_2[] = "__doc__"; static char __pyx_k_dtype[] = "dtype"; static char __pyx_k_dummy[] = "dummy"; static char __pyx_k_empty[] = "empty"; static char __pyx_k_false[] = "false"; static char __pyx_k_flags[] = "flags"; static char __pyx_k_frame[] = "frame"; static char __pyx_k_hours[] = "hours"; static char __pyx_k_index[] = "index"; static char __pyx_k_int16[] = "int16"; static char __pyx_k_int32[] = "int32"; static char __pyx_k_int64[] = "int64"; static char __pyx_k_isnan[] = "isnan"; static char __pyx_k_l_bin[] = "l_bin"; static char __pyx_k_lists[] = "lists"; static char __pyx_k_m8_ns[] = "m8[ns]"; static char __pyx_k_m_d_Y[] = "%m/%d/%Y"; static char __pyx_k_mixed[] = "mixed"; static char __pyx_k_month[] = "month"; static char __pyx_k_names[] = "names"; static char __pyx_k_ncols[] = "ncols"; static char __pyx_k_numpy[] = "numpy"; static char __pyx_k_parse[] = "parse"; static char __pyx_k_piece[] = "piece"; static char __pyx_k_r_bin[] = "r_bin"; static char __pyx_k_range[] = "range"; static char __pyx_k_ravel[] = "ravel"; static char __pyx_k_reset[] = "reset"; static char __pyx_k_right[] = "right"; static char __pyx_k_shape[] = "shape"; static char __pyx_k_slobj[] = "slobj"; static char __pyx_k_start[] = "start"; static char __pyx_k_table[] = "table"; static char __pyx_k_times[] = "times"; static char __pyx_k_tslib[] = "tslib"; static char __pyx_k_uint8[] = "uint8"; static char __pyx_k_value[] = "value"; static char __pyx_k_years[] = "years"; static char __pyx_k_zeros[] = "zeros"; static char __pyx_k_Period[] = "Period"; static char __pyx_k_arrays[] = "arrays"; static char __pyx_k_arrmap[] = "arrmap"; static char __pyx_k_astype[] = "astype"; static char __pyx_k_binner[] = "binner"; static char __pyx_k_blocks[] = "blocks"; static char __pyx_k_closed[] = "closed"; static char __pyx_k_counts[] = "counts"; static char __pyx_k_data_2[] = "_data"; static char __pyx_k_engine[] = "_engine"; static char __pyx_k_floats[] = "floats"; static char __pyx_k_import[] = "__import__"; static char __pyx_k_labels[] = "labels"; static char __pyx_k_lenbin[] = "lenbin"; static char __pyx_k_length[] = "length"; static char __pyx_k_lenidx[] = "lenidx"; static char __pyx_k_micros[] = "micros"; static char __pyx_k_minute[] = "minute"; static char __pyx_k_module[] = "__module__"; static char __pyx_k_months[] = "months"; static char __pyx_k_name_2[] = "__name__"; static char __pyx_k_neginf[] = "neginf"; static char __pyx_k_objbuf[] = "objbuf"; static char __pyx_k_object[] = "object"; static char __pyx_k_output[] = "output"; static char __pyx_k_pandas[] = "pandas"; static char __pyx_k_parser[] = "parser"; static char __pyx_k_period[] = "period"; static char __pyx_k_pydate[] = "pydate"; static char __pyx_k_reduce[] = "reduce"; static char __pyx_k_result[] = "result"; static char __pyx_k_second[] = "second"; static char __pyx_k_series[] = "series"; static char __pyx_k_slider[] = "slider"; static char __pyx_k_starts[] = "starts"; static char __pyx_k_status[] = "status"; static char __pyx_k_string[] = "string"; static char __pyx_k_tuples[] = "tuples"; static char __pyx_k_uint16[] = "uint16"; static char __pyx_k_uint32[] = "uint32"; static char __pyx_k_uint64[] = "uint64"; static char __pyx_k_values[] = "values"; static char __pyx_k_writer[] = "writer"; static char __pyx_k_advance[] = "advance"; static char __pyx_k_boolean[] = "boolean"; static char __pyx_k_cache_2[] = "cache"; static char __pyx_k_columns[] = "columns"; static char __pyx_k_complex[] = "complex"; static char __pyx_k_convert[] = "convert"; static char __pyx_k_default[] = "default"; static char __pyx_k_float16[] = "float16"; static char __pyx_k_float32[] = "float32"; static char __pyx_k_float64[] = "float64"; static char __pyx_k_index_2[] = "_index"; static char __pyx_k_indexer[] = "indexer"; static char __pyx_k_indices[] = "indices"; static char __pyx_k_integer[] = "integer"; static char __pyx_k_mapping[] = "mapping"; static char __pyx_k_max_bin[] = "max_bin"; static char __pyx_k_minutes[] = "minutes"; static char __pyx_k_mutated[] = "mutated"; static char __pyx_k_nan_rep[] = "nan_rep"; static char __pyx_k_ngroups[] = "ngroups"; static char __pyx_k_nlevels[] = "nlevels"; static char __pyx_k_objects[] = "objects"; static char __pyx_k_prepare[] = "__prepare__"; static char __pyx_k_putmask[] = "putmask"; static char __pyx_k_reducer[] = "reducer"; static char __pyx_k_replace[] = "replace"; static char __pyx_k_results[] = "results"; static char __pyx_k_seconds[] = "seconds"; static char __pyx_k_setattr[] = "__setattr__"; static char __pyx_k_started[] = "started"; static char __pyx_k_strides[] = "strides"; static char __pyx_k_unicode[] = "unicode"; static char __pyx_k_uniques[] = "uniques"; static char __pyx_k_version[] = "__version__"; static char __pyx_k_TYPE_MAP[] = "_TYPE_MAP"; static char __pyx_k_datetime[] = "datetime"; static char __pyx_k_dayfirst[] = "dayfirst"; static char __pyx_k_fast_zip[] = "fast_zip"; static char __pyx_k_finished[] = "finished"; static char __pyx_k_float128[] = "float128"; static char __pyx_k_floating[] = "floating"; static char __pyx_k_ismember[] = "ismember"; static char __pyx_k_isscalar[] = "isscalar"; static char __pyx_k_itemsize[] = "itemsize"; static char __pyx_k_na_count[] = "na_count"; static char __pyx_k_ndarrays[] = "ndarrays"; static char __pyx_k_object_2[] = "object_"; static char __pyx_k_operator[] = "operator"; static char __pyx_k_qualname[] = "__qualname__"; static char __pyx_k_seen_int[] = "seen_int"; static char __pyx_k_set_axis[] = "_set_axis"; static char __pyx_k_string_2[] = "string_"; static char __pyx_k_strptime[] = "strptime"; static char __pyx_k_val_kind[] = "val_kind"; static char __pyx_k_values_2[] = "_values"; static char __pyx_k_Exception[] = "Exception"; static char __pyx_k_Timestamp[] = "Timestamp"; static char __pyx_k_TypeError[] = "TypeError"; static char __pyx_k_complexes[] = "complexes"; static char __pyx_k_converted[] = "converted"; static char __pyx_k_datetimes[] = "datetimes"; static char __pyx_k_enumerate[] = "enumerate"; static char __pyx_k_is_period[] = "is_period"; static char __pyx_k_isnullobj[] = "isnullobj"; static char __pyx_k_map_infer[] = "map_infer"; static char __pyx_k_metaclass[] = "__metaclass__"; static char __pyx_k_na_values[] = "na_values"; static char __pyx_k_new_dtype[] = "new_dtype"; static char __pyx_k_seen_bool[] = "seen_bool"; static char __pyx_k_seen_null[] = "seen_null"; static char __pyx_k_take_last[] = "take_last"; static char __pyx_k_timedelta[] = "timedelta"; static char __pyx_k_toordinal[] = "toordinal"; static char __pyx_k_true_vals[] = "true_vals"; static char __pyx_k_try_float[] = "try_float"; static char __pyx_k_unicode_2[] = "unicode_"; static char __pyx_k_vec_binop[] = "vec_binop"; static char __pyx_k_writerows[] = "writerows"; static char __pyx_k_IndexError[] = "IndexError"; static char __pyx_k_ValueError[] = "ValueError"; static char __pyx_k_all_arrays[] = "all_arrays"; static char __pyx_k_complex128[] = "complex128"; static char __pyx_k_complex256[] = "complex256"; static char __pyx_k_contiguous[] = "contiguous"; static char __pyx_k_data_index[] = "data_index"; static char __pyx_k_datetime64[] = "datetime64"; static char __pyx_k_duplicated[] = "duplicated"; static char __pyx_k_false_vals[] = "false_vals"; static char __pyx_k_fill_value[] = "fill_value"; static char __pyx_k_float_secs[] = "float_secs"; static char __pyx_k_get_result[] = "get_result"; static char __pyx_k_group_size[] = "group_size"; static char __pyx_k_idatetimes[] = "idatetimes"; static char __pyx_k_is_integer[] = "is_integer"; static char __pyx_k_item_cache[] = "_item_cache"; static char __pyx_k_pandas_lib[] = "pandas.lib"; static char __pyx_k_parse_date[] = "parse_date"; static char __pyx_k_parse_time[] = "parse_time"; static char __pyx_k_pydatetime[] = "pydatetime"; static char __pyx_k_pyx_vtable[] = "__pyx_vtable__"; static char __pyx_k_seen_float[] = "seen_float"; static char __pyx_k_set_length[] = "set_length"; static char __pyx_k_timedeltas[] = "timedeltas"; static char __pyx_k_ImportError[] = "ImportError"; static char __pyx_k_check_dummy[] = "_check_dummy"; static char __pyx_k_date_parser[] = "date_parser"; static char __pyx_k_fast_unique[] = "fast_unique"; static char __pyx_k_group_count[] = "group_count"; static char __pyx_k_has_infs_f4[] = "has_infs_f4"; static char __pyx_k_has_infs_f8[] = "has_infs_f8"; static char __pyx_k_infer_dtype[] = "infer_dtype"; static char __pyx_k_is_datelike[] = "is_datelike"; static char __pyx_k_isnullobj2d[] = "isnullobj2d"; static char __pyx_k_itimedeltas[] = "itimedeltas"; static char __pyx_k_microsecond[] = "microsecond"; static char __pyx_k_pandas_null[] = "pandas_null"; static char __pyx_k_rev_indexer[] = "rev_indexer"; static char __pyx_k_seen_object[] = "seen_object"; static char __pyx_k_time_parser[] = "time_parser"; static char __pyx_k_timedelta64[] = "timedelta64"; static char __pyx_k_true_values[] = "true_values"; static char __pyx_k_vec_compare[] = "vec_compare"; static char __pyx_k_InvalidApply[] = "InvalidApply"; static char __pyx_k_LooseVersion[] = "LooseVersion"; static char __pyx_k_RuntimeError[] = "RuntimeError"; static char __pyx_k_c_contiguous[] = "c_contiguous"; static char __pyx_k_f_contiguous[] = "f_contiguous"; static char __pyx_k_false_values[] = "false_values"; static char __pyx_k_indices_fast[] = "indices_fast"; static char __pyx_k_is_lexsorted[] = "is_lexsorted"; static char __pyx_k_item_cache_2[] = "item_cache"; static char __pyx_k_right_closed[] = "right_closed"; static char __pyx_k_scalar_binop[] = "scalar_binop"; static char __pyx_k_seen_complex[] = "seen_complex"; static char __pyx_k_seen_numeric[] = "seen_numeric"; static char __pyx_k_shape_before[] = "shape_before"; static char __pyx_k_OverflowError[] = "OverflowError"; static char __pyx_k_allow_setting[] = "allow_setting"; static char __pyx_k_clear_mapping[] = "clear_mapping"; static char __pyx_k_convert_empty[] = "convert_empty"; static char __pyx_k_fast_multiget[] = "fast_multiget"; static char __pyx_k_fromtimestamp[] = "fromtimestamp"; static char __pyx_k_is_bool_array[] = "is_bool_array"; static char __pyx_k_is_date_array[] = "is_date_array"; static char __pyx_k_is_time_array[] = "is_time_array"; static char __pyx_k_isnullobj_old[] = "isnullobj_old"; static char __pyx_k_lookup_values[] = "lookup_values"; static char __pyx_k_mixed_integer[] = "mixed-integer"; static char __pyx_k_pyx_getbuffer[] = "__pyx_getbuffer"; static char __pyx_k_seen_datetime[] = "seen_datetime"; static char __pyx_k_sorted_labels[] = "sorted_labels"; static char __pyx_k_AttributeError[] = "AttributeError"; static char __pyx_k_astype_intsafe[] = "astype_intsafe"; static char __pyx_k_coerce_numeric[] = "coerce_numeric"; static char __pyx_k_count_level_1d[] = "count_level_1d"; static char __pyx_k_count_level_2d[] = "count_level_2d"; static char __pyx_k_dicts_to_array[] = "dicts_to_array"; static char __pyx_k_is_float_array[] = "is_float_array"; static char __pyx_k_list_of_arrays[] = "list_of_arrays"; static char __pyx_k_map_infer_mask[] = "map_infer_mask"; static char __pyx_k_scalar_compare[] = "scalar_compare"; static char __pyx_k_seen_timedelta[] = "seen_timedelta"; static char __pyx_k_write_csv_rows[] = "write_csv_rows"; static char __pyx_k_dateutil_parser[] = "dateutil.parser"; static char __pyx_k_fast_zip_fillna[] = "fast_zip_fillna"; static char __pyx_k_generate_slices[] = "generate_slices"; static char __pyx_k_is_period_array[] = "is_period_array"; static char __pyx_k_is_string_array[] = "is_string_array"; static char __pyx_k_isnullobj2d_old[] = "isnullobj2d_old"; static char __pyx_k_row_bool_subset[] = "row_bool_subset"; static char __pyx_k_to_object_array[] = "to_object_array"; static char __pyx_k_try_parse_dates[] = "try_parse_dates"; static char __pyx_k_clean_index_list[] = "clean_index_list"; static char __pyx_k_convert_datetime[] = "convert_datetime"; static char __pyx_k_get_result_array[] = "_get_result_array"; static char __pyx_k_infer_dtype_list[] = "infer_dtype_list"; static char __pyx_k_is_integer_array[] = "is_integer_array"; static char __pyx_k_is_unicode_array[] = "is_unicode_array"; static char __pyx_k_repr_timedelta64[] = "repr_timedelta64"; static char __pyx_k_sanitize_objects[] = "sanitize_objects"; static char __pyx_k_utcfromtimestamp[] = "utcfromtimestamp"; static char __pyx_k_Unable_to_parse_s[] = "Unable to parse %s"; static char __pyx_k_apply_frame_axis0[] = "apply_frame_axis0"; static char __pyx_k_convert_timedelta[] = "convert_timedelta"; static char __pyx_k_distutils_version[] = "distutils.version"; static char __pyx_k_is_datetime_array[] = "is_datetime_array"; static char __pyx_k_pyx_releasebuffer[] = "__pyx_releasebuffer"; static char __pyx_k_array_to_timestamp[] = "array_to_timestamp"; static char __pyx_k_convert_sql_column[] = "convert_sql_column"; static char __pyx_k_convert_timestamps[] = "convert_timestamps"; static char __pyx_k_generate_bins_dt64[] = "generate_bins_dt64"; static char __pyx_k_is_timedelta_array[] = "is_timedelta_array"; static char __pyx_k_maybe_convert_bool[] = "maybe_convert_bool"; static char __pyx_k_time64_to_datetime[] = "time64_to_datetime"; static char __pyx_k_Cannot_use_shortcut[] = "Cannot use shortcut"; static char __pyx_k_get_reverse_indexer[] = "get_reverse_indexer"; static char __pyx_k_index_out_of_bounds[] = "index out of bounds"; static char __pyx_k_is_datetime64_array[] = "is_datetime64_array"; static char __pyx_k_mixed_integer_float[] = "mixed-integer-float"; static char __pyx_k_fast_unique_multiple[] = "fast_unique_multiple"; static char __pyx_k_is_numpy_prior_1_6_2[] = "is_numpy_prior_1_6_2"; static char __pyx_k_is_timedelta64_array[] = "is_timedelta64_array"; static char __pyx_k_list_to_object_array[] = "list_to_object_array"; static char __pyx_k_max_len_string_array[] = "max_len_string_array"; static char __pyx_k_Unrecognized_operator[] = "Unrecognized operator"; static char __pyx_k_has_complex_internals[] = "_has_complex_internals"; static char __pyx_k_maybe_convert_numeric[] = "maybe_convert_numeric"; static char __pyx_k_maybe_convert_objects[] = "maybe_convert_objects"; static char __pyx_k_pandas_src_reduce_pyx[] = "pandas/src/reduce.pyx"; static char __pyx_k_pandas_tseries_period[] = "pandas.tseries.period"; static char __pyx_k_is_integer_float_array[] = "is_integer_float_array"; static char __pyx_k_maybe_indices_to_slice[] = "maybe_indices_to_slice"; static char __pyx_k_row_bool_subset_object[] = "row_bool_subset_object"; static char __pyx_k_to_object_array_tuples[] = "to_object_array_tuples"; static char __pyx_k_tuples_to_object_array[] = "tuples_to_object_array"; static char __pyx_k_cannot_set_values_for_s[] = "cannot set values for [%s]"; static char __pyx_k_maybe_booleans_to_slice[] = "maybe_booleans_to_slice"; static char __pyx_k_try_parse_date_and_time[] = "try_parse_date_and_time"; static char __pyx_k_Empty_string_encountered[] = "Empty string encountered"; static char __pyx_k_function_does_not_reduce[] = "function does not reduce"; static char __pyx_k_pandas_src_inference_pyx[] = "pandas/src/inference.pyx"; static char __pyx_k_try_parse_year_month_day[] = "try_parse_year_month_day"; static char __pyx_k_fast_unique_multiple_list[] = "fast_unique_multiple_list"; static char __pyx_k_Values_falls_after_last_bin[] = "Values falls after last bin"; static char __pyx_k_ndarray_is_not_C_contiguous[] = "ndarray is not C contiguous"; static char __pyx_k_Dummy_array_must_be_length_d[] = "Dummy array must be length %d"; static char __pyx_k_Let_this_error_raise_above_us[] = "Let this error raise above us"; static char __pyx_k_Values_falls_before_first_bin[] = "Values falls before first bin"; static char __pyx_k_fast_unique_multiple_list_gen[] = "fast_unique_multiple_list_gen"; static char __pyx_k_try_parse_dates_locals_lambda[] = "try_parse_dates.."; static char __pyx_k_try_parse_datetime_components[] = "try_parse_datetime_components"; static char __pyx_k_Dummy_array_must_be_same_dtype[] = "Dummy array must be same dtype"; static char __pyx_k_Function_unsafe_for_fast_apply[] = "Function unsafe for fast apply"; static char __pyx_k_all_arrays_must_be_same_length[] = "all arrays must be same length"; static char __pyx_k_Arrays_were_different_lengths_d[] = "Arrays were different lengths: %d vs %d"; static char __pyx_k_home_yoh_deb_gits_pkg_exppsy_pa[] = "/home/yoh/deb/gits/pkg-exppsy/pandas/pandas/lib.pyx"; static char __pyx_k_unknown_dtype_code_in_numpy_pxd[] = "unknown dtype code in numpy.pxd (%d)"; static char __pyx_k_Cannot_modify_frame_index_intern[] = "Cannot modify frame index internals"; static char __pyx_k_Format_string_allocated_too_shor[] = "Format string allocated too short, see comment in numpy.pxd"; static char __pyx_k_Invalid_length_for_values_or_for[] = "Invalid length for values or for binner"; static char __pyx_k_Length_of_all_datetime_component[] = "Length of all datetime components must be equal"; static char __pyx_k_Length_of_dates_and_times_must_b[] = "Length of dates and times must be equal"; static char __pyx_k_Length_of_years_months_days_must[] = "Length of years/months/days must all be equal"; static char __pyx_k_Non_native_byte_order_not_suppor[] = "Non-native byte order not supported"; static char __pyx_k_is_timedelta_or_timedelta64_arra[] = "is_timedelta_or_timedelta64_array"; static char __pyx_k_ndarray_is_not_Fortran_contiguou[] = "ndarray is not Fortran contiguous"; static char __pyx_k_string_array_replace_from_nan_re[] = "string_array_replace_from_nan_rep"; static char __pyx_k_try_parse_date_and_time_locals_l[] = "try_parse_date_and_time.."; static char __pyx_k_try_parse_date_and_time_locals_p[] = "try_parse_date_and_time..parse_date"; static char __pyx_k_try_parse_dates_locals_parse_dat[] = "try_parse_dates..parse_date"; static char __pyx_k_Format_string_allocated_too_shor_2[] = "Format string allocated too short."; static char __pyx_k_try_parse_date_and_time_locals_p_2[] = "try_parse_date_and_time..parse_time"; static PyObject *__pyx_kp_s_1_6_2; static PyObject *__pyx_kp_s_Arrays_were_different_lengths_d; static PyObject *__pyx_n_s_AttributeError; static PyObject *__pyx_n_s_C; static PyObject *__pyx_kp_s_Cannot_modify_frame_index_intern; static PyObject *__pyx_kp_s_Cannot_use_shortcut; static PyObject *__pyx_kp_s_Dummy_array_must_be_length_d; static PyObject *__pyx_kp_s_Dummy_array_must_be_same_dtype; static PyObject *__pyx_kp_s_Empty_string_encountered; static PyObject *__pyx_n_s_Exception; static PyObject *__pyx_n_s_F; static PyObject *__pyx_n_s_FALSE; static PyObject *__pyx_n_s_False; static PyObject *__pyx_kp_u_Format_string_allocated_too_shor; static PyObject *__pyx_kp_u_Format_string_allocated_too_shor_2; static PyObject *__pyx_kp_s_Function_unsafe_for_fast_apply; static PyObject *__pyx_kp_s_H_M_S; static PyObject *__pyx_n_s_ImportError; static PyObject *__pyx_n_s_IndexError; static PyObject *__pyx_n_s_InvalidApply; static PyObject *__pyx_kp_s_Invalid_length_for_values_or_for; static PyObject *__pyx_kp_s_Length_of_all_datetime_component; static PyObject *__pyx_kp_s_Length_of_dates_and_times_must_b; static PyObject *__pyx_kp_s_Length_of_years_months_days_must; static PyObject *__pyx_kp_s_Let_this_error_raise_above_us; static PyObject *__pyx_n_s_LooseVersion; static PyObject *__pyx_kp_s_M8_ns; static PyObject *__pyx_n_s_N; static PyObject *__pyx_n_s_NaN; static PyObject *__pyx_n_s_NaT; static PyObject *__pyx_kp_u_Non_native_byte_order_not_suppor; static PyObject *__pyx_n_s_O; static PyObject *__pyx_n_s_OverflowError; static PyObject *__pyx_n_s_Period; static PyObject *__pyx_n_s_RuntimeError; static PyObject *__pyx_n_s_TRUE; static PyObject *__pyx_n_s_TYPE_MAP; static PyObject *__pyx_n_s_Timestamp; static PyObject *__pyx_n_s_True; static PyObject *__pyx_n_s_TypeError; static PyObject *__pyx_kp_s_Unable_to_parse_s; static PyObject *__pyx_kp_s_Unrecognized_operator; static PyObject *__pyx_n_s_ValueError; static PyObject *__pyx_kp_s_Values_falls_after_last_bin; static PyObject *__pyx_kp_s_Values_falls_before_first_bin; static PyObject *__pyx_kp_s__31; static PyObject *__pyx_kp_s__34; static PyObject *__pyx_n_s_advance; static PyObject *__pyx_n_s_all_arrays; static PyObject *__pyx_kp_s_all_arrays_must_be_same_length; static PyObject *__pyx_n_s_allow_setting; static PyObject *__pyx_n_s_apply_frame_axis0; static PyObject *__pyx_n_s_args; static PyObject *__pyx_n_s_arobj; static PyObject *__pyx_n_s_arr; static PyObject *__pyx_n_s_array_to_timestamp; static PyObject *__pyx_n_s_arrays; static PyObject *__pyx_n_s_arrmap; static PyObject *__pyx_n_s_astype; static PyObject *__pyx_n_s_astype_intsafe; static PyObject *__pyx_n_s_axes; static PyObject *__pyx_n_s_axis; static PyObject *__pyx_n_s_bc; static PyObject *__pyx_n_s_binner; static PyObject *__pyx_n_s_bins; static PyObject *__pyx_n_s_block; static PyObject *__pyx_n_s_blocks; static PyObject *__pyx_n_s_bool; static PyObject *__pyx_n_s_boolean; static PyObject *__pyx_n_s_bools; static PyObject *__pyx_n_s_buf; static PyObject *__pyx_n_s_c16; static PyObject *__pyx_n_s_c_contiguous; static PyObject *__pyx_n_s_cache; static PyObject *__pyx_n_s_cache_2; static PyObject *__pyx_kp_s_cannot_set_values_for_s; static PyObject *__pyx_n_s_check_dummy; static PyObject *__pyx_n_s_chunk; static PyObject *__pyx_n_s_clean_index_list; static PyObject *__pyx_n_s_clear_mapping; static PyObject *__pyx_n_s_closed; static PyObject *__pyx_n_s_coerce_numeric; static PyObject *__pyx_n_s_col; static PyObject *__pyx_n_s_cols; static PyObject *__pyx_n_s_columns; static PyObject *__pyx_n_s_complex; static PyObject *__pyx_n_s_complex128; static PyObject *__pyx_n_s_complex256; static PyObject *__pyx_n_s_complexes; static PyObject *__pyx_n_s_contiguous; static PyObject *__pyx_n_s_convert; static PyObject *__pyx_n_s_convert_datetime; static PyObject *__pyx_n_s_convert_empty; static PyObject *__pyx_n_s_convert_sql_column; static PyObject *__pyx_n_s_convert_timedelta; static PyObject *__pyx_n_s_convert_timestamps; static PyObject *__pyx_n_s_converted; static PyObject *__pyx_n_s_copy; static PyObject *__pyx_n_s_count_level_1d; static PyObject *__pyx_n_s_count_level_2d; static PyObject *__pyx_n_s_counts; static PyObject *__pyx_n_s_cur; static PyObject *__pyx_n_s_d; static PyObject *__pyx_n_s_data; static PyObject *__pyx_n_s_data_2; static PyObject *__pyx_n_s_data_index; static PyObject *__pyx_n_s_date; static PyObject *__pyx_n_s_date_parser; static PyObject *__pyx_n_s_dates; static PyObject *__pyx_n_s_datetime; static PyObject *__pyx_n_s_datetime64; static PyObject *__pyx_n_s_datetimes; static PyObject *__pyx_n_s_dateutil_parser; static PyObject *__pyx_n_s_day; static PyObject *__pyx_n_s_dayfirst; static PyObject *__pyx_n_s_days; static PyObject *__pyx_n_s_default; static PyObject *__pyx_n_s_dicts; static PyObject *__pyx_n_s_dicts_to_array; static PyObject *__pyx_n_s_distutils_version; static PyObject *__pyx_n_s_doc; static PyObject *__pyx_n_s_doc_2; static PyObject *__pyx_n_s_dtype; static PyObject *__pyx_n_s_dummy; static PyObject *__pyx_n_s_duplicated; static PyObject *__pyx_n_s_empty; static PyObject *__pyx_n_s_end; static PyObject *__pyx_n_s_ends; static PyObject *__pyx_n_s_engine; static PyObject *__pyx_n_s_enumerate; static PyObject *__pyx_n_s_eq; static PyObject *__pyx_n_s_f; static PyObject *__pyx_n_s_f8; static PyObject *__pyx_n_s_f_contiguous; static PyObject *__pyx_n_s_false; static PyObject *__pyx_n_s_false_vals; static PyObject *__pyx_n_s_false_values; static PyObject *__pyx_n_s_fast_multiget; static PyObject *__pyx_n_s_fast_unique; static PyObject *__pyx_n_s_fast_unique_multiple; static PyObject *__pyx_n_s_fast_unique_multiple_list; static PyObject *__pyx_n_s_fast_unique_multiple_list_gen; static PyObject *__pyx_n_s_fast_zip; static PyObject *__pyx_n_s_fast_zip_fillna; static PyObject *__pyx_n_s_fill; static PyObject *__pyx_n_s_fill_value; static PyObject *__pyx_n_s_finished; static PyObject *__pyx_n_s_flag; static PyObject *__pyx_n_s_flags; static PyObject *__pyx_n_s_float128; static PyObject *__pyx_n_s_float16; static PyObject *__pyx_n_s_float32; static PyObject *__pyx_n_s_float64; static PyObject *__pyx_n_s_float_secs; static PyObject *__pyx_n_s_floating; static PyObject *__pyx_n_s_floats; static PyObject *__pyx_n_s_fnan; static PyObject *__pyx_n_s_frame; static PyObject *__pyx_n_s_fromtimestamp; static PyObject *__pyx_n_s_func; static PyObject *__pyx_kp_s_function_does_not_reduce; static PyObject *__pyx_n_s_fval; static PyObject *__pyx_n_s_ge; static PyObject *__pyx_n_s_gen; static PyObject *__pyx_n_s_generate_bins_dt64; static PyObject *__pyx_n_s_generate_slices; static PyObject *__pyx_n_s_get_result; static PyObject *__pyx_n_s_get_result_array; static PyObject *__pyx_n_s_get_reverse_indexer; static PyObject *__pyx_n_s_gin; static PyObject *__pyx_n_s_group_count; static PyObject *__pyx_n_s_group_size; static PyObject *__pyx_n_s_gt; static PyObject *__pyx_n_s_has_complex_internals; static PyObject *__pyx_n_s_has_infs_f4; static PyObject *__pyx_n_s_has_infs_f8; static PyObject *__pyx_kp_s_home_yoh_deb_gits_pkg_exppsy_pa; static PyObject *__pyx_n_s_hour; static PyObject *__pyx_n_s_hours; static PyObject *__pyx_n_s_i; static PyObject *__pyx_n_s_i8; static PyObject *__pyx_n_s_iNaT; static PyObject *__pyx_n_s_idatetimes; static PyObject *__pyx_n_s_idx; static PyObject *__pyx_n_s_import; static PyObject *__pyx_n_s_index; static PyObject *__pyx_n_s_index_2; static PyObject *__pyx_kp_s_index_out_of_bounds; static PyObject *__pyx_n_s_indexer; static PyObject *__pyx_n_s_indices; static PyObject *__pyx_n_s_indices_fast; static PyObject *__pyx_n_s_inf; static PyObject *__pyx_n_s_infer_dtype; static PyObject *__pyx_n_s_infer_dtype_list; static PyObject *__pyx_n_s_int16; static PyObject *__pyx_n_s_int32; static PyObject *__pyx_n_s_int64; static PyObject *__pyx_n_s_int8; static PyObject *__pyx_n_s_integer; static PyObject *__pyx_n_s_ints; static PyObject *__pyx_n_s_is_bool_array; static PyObject *__pyx_n_s_is_date_array; static PyObject *__pyx_n_s_is_datelike; static PyObject *__pyx_n_s_is_datetime64_array; static PyObject *__pyx_n_s_is_datetime_array; static PyObject *__pyx_n_s_is_float_array; static PyObject *__pyx_n_s_is_integer; static PyObject *__pyx_n_s_is_integer_array; static PyObject *__pyx_n_s_is_integer_float_array; static PyObject *__pyx_n_s_is_lexsorted; static PyObject *__pyx_n_s_is_numpy_prior_1_6_2; static PyObject *__pyx_n_s_is_period; static PyObject *__pyx_n_s_is_period_array; static PyObject *__pyx_n_s_is_string_array; static PyObject *__pyx_n_s_is_time_array; static PyObject *__pyx_n_s_is_timedelta64_array; static PyObject *__pyx_n_s_is_timedelta_array; static PyObject *__pyx_n_s_is_timedelta_or_timedelta64_arra; static PyObject *__pyx_n_s_is_unicode_array; static PyObject *__pyx_n_s_ismember; static PyObject *__pyx_n_s_isnan; static PyObject *__pyx_n_s_isnullobj; static PyObject *__pyx_n_s_isnullobj2d; static PyObject *__pyx_n_s_isnullobj2d_old; static PyObject *__pyx_n_s_isnullobj_old; static PyObject *__pyx_n_s_isscalar; static PyObject *__pyx_n_s_it; static PyObject *__pyx_n_s_item; static PyObject *__pyx_n_s_item_cache; static PyObject *__pyx_n_s_item_cache_2; static PyObject *__pyx_n_s_itemsize; static PyObject *__pyx_n_s_itimedeltas; static PyObject *__pyx_n_s_j; static PyObject *__pyx_n_s_k; static PyObject *__pyx_n_s_keys; static PyObject *__pyx_n_s_l; static PyObject *__pyx_n_s_l_bin; static PyObject *__pyx_n_s_lab; static PyObject *__pyx_n_s_labels; static PyObject *__pyx_n_s_le; static PyObject *__pyx_n_s_left; static PyObject *__pyx_n_s_len; static PyObject *__pyx_n_s_lenbin; static PyObject *__pyx_n_s_length; static PyObject *__pyx_n_s_lenidx; static PyObject *__pyx_n_s_list_of_arrays; static PyObject *__pyx_n_s_list_to_object_array; static PyObject *__pyx_n_s_lists; static PyObject *__pyx_n_s_lookup_values; static PyObject *__pyx_n_s_lt; static PyObject *__pyx_n_s_m; static PyObject *__pyx_kp_s_m8_ns; static PyObject *__pyx_kp_s_m_d_Y; static PyObject *__pyx_n_s_main; static PyObject *__pyx_n_s_map_infer; static PyObject *__pyx_n_s_map_infer_mask; static PyObject *__pyx_n_s_mapping; static PyObject *__pyx_n_s_mask; static PyObject *__pyx_n_s_max_bin; static PyObject *__pyx_n_s_max_len_string_array; static PyObject *__pyx_n_s_maybe_booleans_to_slice; static PyObject *__pyx_n_s_maybe_convert_bool; static PyObject *__pyx_n_s_maybe_convert_numeric; static PyObject *__pyx_n_s_maybe_convert_objects; static PyObject *__pyx_n_s_maybe_indices_to_slice; static PyObject *__pyx_n_s_memo; static PyObject *__pyx_n_s_metaclass; static PyObject *__pyx_n_s_micros; static PyObject *__pyx_n_s_microsecond; static PyObject *__pyx_n_s_minute; static PyObject *__pyx_n_s_minutes; static PyObject *__pyx_n_s_mixed; static PyObject *__pyx_kp_s_mixed_integer; static PyObject *__pyx_kp_s_mixed_integer_float; static PyObject *__pyx_n_s_module; static PyObject *__pyx_n_s_month; static PyObject *__pyx_n_s_months; static PyObject *__pyx_n_s_move; static PyObject *__pyx_n_s_mutated; static PyObject *__pyx_n_s_n; static PyObject *__pyx_n_s_na_count; static PyObject *__pyx_n_s_na_values; static PyObject *__pyx_n_s_name; static PyObject *__pyx_n_s_name_2; static PyObject *__pyx_n_s_names; static PyObject *__pyx_n_s_nan; static PyObject *__pyx_n_s_nan_rep; static PyObject *__pyx_n_s_ncols; 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_ndarrays; static PyObject *__pyx_n_s_ndim; static PyObject *__pyx_n_s_ne; static PyObject *__pyx_n_s_neginf; static PyObject *__pyx_n_s_new_dtype; static PyObject *__pyx_n_s_ngroups; static PyObject *__pyx_n_s_nlevels; static PyObject *__pyx_n_s_now; static PyObject *__pyx_n_s_np; static PyObject *__pyx_n_s_ns; static PyObject *__pyx_n_s_numpy; static PyObject *__pyx_n_s_o; static PyObject *__pyx_n_s_obj; static PyObject *__pyx_n_s_objbuf; static PyObject *__pyx_n_s_object; static PyObject *__pyx_n_s_object_2; static PyObject *__pyx_n_s_objects; static PyObject *__pyx_n_s_onan; static PyObject *__pyx_n_s_op; static PyObject *__pyx_n_s_operator; static PyObject *__pyx_n_s_out; static PyObject *__pyx_n_s_output; static PyObject *__pyx_n_s_pandas; static PyObject *__pyx_n_s_pandas_lib; static PyObject *__pyx_n_s_pandas_null; static PyObject *__pyx_kp_s_pandas_src_inference_pyx; static PyObject *__pyx_kp_s_pandas_src_reduce_pyx; static PyObject *__pyx_n_s_pandas_tseries_period; static PyObject *__pyx_n_s_parse; static PyObject *__pyx_n_s_parse_date; static PyObject *__pyx_n_s_parse_time; static PyObject *__pyx_n_s_parser; static PyObject *__pyx_n_s_period; static PyObject *__pyx_n_s_piece; static PyObject *__pyx_n_s_pos; static PyObject *__pyx_n_s_pre; static PyObject *__pyx_n_s_prepare; static PyObject *__pyx_n_s_putmask; static PyObject *__pyx_n_s_pydate; static PyObject *__pyx_n_s_pydatetime; static PyObject *__pyx_n_s_pyx_getbuffer; static PyObject *__pyx_n_s_pyx_releasebuffer; static PyObject *__pyx_n_s_pyx_vtable; static PyObject *__pyx_n_s_qualname; static PyObject *__pyx_n_s_r_bin; static PyObject *__pyx_n_s_range; static PyObject *__pyx_n_s_ravel; static PyObject *__pyx_n_s_reduce; static PyObject *__pyx_n_s_reducer; static PyObject *__pyx_n_s_replace; static PyObject *__pyx_n_s_repr_timedelta64; static PyObject *__pyx_n_s_reset; static PyObject *__pyx_n_s_result; static PyObject *__pyx_n_s_results; static PyObject *__pyx_n_s_rev_indexer; static PyObject *__pyx_n_s_right; static PyObject *__pyx_n_s_right_closed; static PyObject *__pyx_n_s_row; static PyObject *__pyx_n_s_row_bool_subset; static PyObject *__pyx_n_s_row_bool_subset_object; static PyObject *__pyx_n_s_rows; static PyObject *__pyx_n_s_s; static PyObject *__pyx_n_s_safe; static PyObject *__pyx_n_s_sanitize_objects; static PyObject *__pyx_n_s_scalar_binop; static PyObject *__pyx_n_s_scalar_compare; static PyObject *__pyx_n_s_second; static PyObject *__pyx_n_s_seconds; static PyObject *__pyx_n_s_secs; static PyObject *__pyx_n_s_seen; static PyObject *__pyx_n_s_seen_bool; static PyObject *__pyx_n_s_seen_complex; static PyObject *__pyx_n_s_seen_datetime; static PyObject *__pyx_n_s_seen_float; static PyObject *__pyx_n_s_seen_int; static PyObject *__pyx_n_s_seen_null; static PyObject *__pyx_n_s_seen_numeric; static PyObject *__pyx_n_s_seen_object; static PyObject *__pyx_n_s_seen_timedelta; static PyObject *__pyx_n_s_series; static PyObject *__pyx_n_s_set_axis; static PyObject *__pyx_n_s_set_length; static PyObject *__pyx_n_s_setattr; static PyObject *__pyx_n_s_shape; static PyObject *__pyx_n_s_shape_before; static PyObject *__pyx_n_s_size; static PyObject *__pyx_n_s_slider; static PyObject *__pyx_n_s_slobj; static PyObject *__pyx_n_s_sorted_labels; static PyObject *__pyx_n_s_start; static PyObject *__pyx_n_s_started; static PyObject *__pyx_n_s_starts; static PyObject *__pyx_n_s_status; static PyObject *__pyx_n_s_strides; static PyObject *__pyx_n_s_string; static PyObject *__pyx_n_s_string_2; static PyObject *__pyx_n_s_string_array_replace_from_nan_re; static PyObject *__pyx_n_s_strptime; static PyObject *__pyx_n_s_stub; static PyObject *__pyx_n_s_sum; static PyObject *__pyx_n_s_t; static PyObject *__pyx_n_s_table; static PyObject *__pyx_n_s_take_last; static PyObject *__pyx_n_s_test; static PyObject *__pyx_n_s_time; static PyObject *__pyx_n_s_time64_to_datetime; static PyObject *__pyx_n_s_time_parser; static PyObject *__pyx_n_s_timedelta; static PyObject *__pyx_n_s_timedelta64; static PyObject *__pyx_n_s_timedeltas; static PyObject *__pyx_n_s_times; static PyObject *__pyx_n_s_tmp; static PyObject *__pyx_n_s_to_object_array; static PyObject *__pyx_n_s_to_object_array_tuples; static PyObject *__pyx_n_s_toordinal; static PyObject *__pyx_n_s_true; static PyObject *__pyx_n_s_true_vals; static PyObject *__pyx_n_s_true_values; static PyObject *__pyx_n_s_try_float; static PyObject *__pyx_n_s_try_parse_date_and_time; static PyObject *__pyx_n_s_try_parse_date_and_time_locals_l; static PyObject *__pyx_n_s_try_parse_date_and_time_locals_p; static PyObject *__pyx_n_s_try_parse_date_and_time_locals_p_2; static PyObject *__pyx_n_s_try_parse_dates; static PyObject *__pyx_n_s_try_parse_dates_locals_lambda; static PyObject *__pyx_n_s_try_parse_dates_locals_parse_dat; static PyObject *__pyx_n_s_try_parse_datetime_components; static PyObject *__pyx_n_s_try_parse_year_month_day; static PyObject *__pyx_n_s_tslib; static PyObject *__pyx_n_s_tup; static PyObject *__pyx_n_s_tuples; static PyObject *__pyx_n_s_tuples_to_object_array; static PyObject *__pyx_n_s_type; static PyObject *__pyx_n_s_uint16; static PyObject *__pyx_n_s_uint32; static PyObject *__pyx_n_s_uint64; static PyObject *__pyx_n_s_uint8; static PyObject *__pyx_n_s_unicode; static PyObject *__pyx_n_s_unicode_2; static PyObject *__pyx_n_s_uniques; static PyObject *__pyx_kp_u_unknown_dtype_code_in_numpy_pxd; static PyObject *__pyx_n_s_utcfromtimestamp; static PyObject *__pyx_n_s_v; static PyObject *__pyx_n_s_val; static PyObject *__pyx_n_s_val_kind; static PyObject *__pyx_n_s_value; static PyObject *__pyx_n_s_values; static PyObject *__pyx_n_s_values_2; static PyObject *__pyx_n_s_vc; static PyObject *__pyx_n_s_vec_binop; static PyObject *__pyx_n_s_vec_compare; static PyObject *__pyx_n_s_vecs; static PyObject *__pyx_n_s_version; static PyObject *__pyx_n_s_view; static PyObject *__pyx_n_s_write_csv_rows; static PyObject *__pyx_n_s_writer; static PyObject *__pyx_n_s_writerows; static PyObject *__pyx_n_s_x; static PyObject *__pyx_n_s_y; static PyObject *__pyx_n_s_year; static PyObject *__pyx_n_s_years; static PyObject *__pyx_n_s_zeros; static PyObject *__pyx_int_0; static PyObject *__pyx_int_1; static PyObject *__pyx_int_15; static PyObject *__pyx_int_neg_1; static PyObject *__pyx_k__10; static PyObject *__pyx_k__42; 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_slice__27; 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__25; static PyObject *__pyx_tuple__26; static PyObject *__pyx_tuple__28; static PyObject *__pyx_tuple__29; static PyObject *__pyx_tuple__30; static PyObject *__pyx_tuple__32; static PyObject *__pyx_tuple__35; static PyObject *__pyx_tuple__36; static PyObject *__pyx_tuple__38; static PyObject *__pyx_tuple__40; static PyObject *__pyx_tuple__41; static PyObject *__pyx_tuple__43; static PyObject *__pyx_tuple__44; static PyObject *__pyx_tuple__45; static PyObject *__pyx_tuple__46; static PyObject *__pyx_tuple__47; static PyObject *__pyx_tuple__48; static PyObject *__pyx_tuple__49; static PyObject *__pyx_tuple__50; static PyObject *__pyx_tuple__51; static PyObject *__pyx_tuple__52; static PyObject *__pyx_tuple__54; static PyObject *__pyx_tuple__56; static PyObject *__pyx_tuple__58; static PyObject *__pyx_tuple__60; static PyObject *__pyx_tuple__62; static PyObject *__pyx_tuple__64; static PyObject *__pyx_tuple__66; static PyObject *__pyx_tuple__68; static PyObject *__pyx_tuple__70; static PyObject *__pyx_tuple__72; static PyObject *__pyx_tuple__74; static PyObject *__pyx_tuple__76; static PyObject *__pyx_tuple__78; static PyObject *__pyx_tuple__80; static PyObject *__pyx_tuple__82; static PyObject *__pyx_tuple__84; static PyObject *__pyx_tuple__86; static PyObject *__pyx_tuple__88; static PyObject *__pyx_tuple__90; static PyObject *__pyx_tuple__92; static PyObject *__pyx_tuple__94; static PyObject *__pyx_tuple__96; static PyObject *__pyx_tuple__98; static PyObject *__pyx_tuple__100; static PyObject *__pyx_tuple__102; static PyObject *__pyx_tuple__104; static PyObject *__pyx_tuple__106; static PyObject *__pyx_tuple__108; static PyObject *__pyx_tuple__110; static PyObject *__pyx_tuple__112; static PyObject *__pyx_tuple__114; static PyObject *__pyx_tuple__116; static PyObject *__pyx_tuple__118; static PyObject *__pyx_tuple__120; static PyObject *__pyx_tuple__122; static PyObject *__pyx_tuple__124; static PyObject *__pyx_tuple__126; static PyObject *__pyx_tuple__128; static PyObject *__pyx_tuple__130; static PyObject *__pyx_tuple__132; static PyObject *__pyx_tuple__134; static PyObject *__pyx_tuple__136; static PyObject *__pyx_tuple__138; static PyObject *__pyx_tuple__140; static PyObject *__pyx_tuple__142; static PyObject *__pyx_tuple__144; static PyObject *__pyx_tuple__146; static PyObject *__pyx_tuple__148; static PyObject *__pyx_tuple__150; static PyObject *__pyx_tuple__152; static PyObject *__pyx_tuple__154; static PyObject *__pyx_tuple__156; static PyObject *__pyx_tuple__158; static PyObject *__pyx_tuple__160; static PyObject *__pyx_tuple__162; static PyObject *__pyx_tuple__164; static PyObject *__pyx_tuple__166; static PyObject *__pyx_tuple__168; static PyObject *__pyx_tuple__170; static PyObject *__pyx_tuple__172; static PyObject *__pyx_tuple__174; static PyObject *__pyx_tuple__176; static PyObject *__pyx_tuple__178; static PyObject *__pyx_tuple__180; static PyObject *__pyx_tuple__182; static PyObject *__pyx_tuple__184; static PyObject *__pyx_tuple__186; static PyObject *__pyx_tuple__188; static PyObject *__pyx_tuple__190; static PyObject *__pyx_tuple__192; static PyObject *__pyx_tuple__194; static PyObject *__pyx_tuple__196; static PyObject *__pyx_tuple__198; static PyObject *__pyx_tuple__200; static PyObject *__pyx_tuple__202; static PyObject *__pyx_tuple__204; static PyObject *__pyx_tuple__206; static PyObject *__pyx_tuple__208; static PyObject *__pyx_codeobj__33; static PyObject *__pyx_codeobj__37; static PyObject *__pyx_codeobj__39; static PyObject *__pyx_codeobj__53; static PyObject *__pyx_codeobj__55; static PyObject *__pyx_codeobj__57; static PyObject *__pyx_codeobj__59; static PyObject *__pyx_codeobj__61; static PyObject *__pyx_codeobj__63; static PyObject *__pyx_codeobj__65; static PyObject *__pyx_codeobj__67; static PyObject *__pyx_codeobj__69; static PyObject *__pyx_codeobj__71; static PyObject *__pyx_codeobj__73; static PyObject *__pyx_codeobj__75; static PyObject *__pyx_codeobj__77; static PyObject *__pyx_codeobj__79; static PyObject *__pyx_codeobj__81; static PyObject *__pyx_codeobj__83; static PyObject *__pyx_codeobj__85; static PyObject *__pyx_codeobj__87; static PyObject *__pyx_codeobj__89; static PyObject *__pyx_codeobj__91; static PyObject *__pyx_codeobj__93; static PyObject *__pyx_codeobj__95; static PyObject *__pyx_codeobj__97; static PyObject *__pyx_codeobj__99; static PyObject *__pyx_codeobj__101; static PyObject *__pyx_codeobj__103; static PyObject *__pyx_codeobj__105; static PyObject *__pyx_codeobj__107; static PyObject *__pyx_codeobj__109; static PyObject *__pyx_codeobj__111; static PyObject *__pyx_codeobj__113; static PyObject *__pyx_codeobj__115; static PyObject *__pyx_codeobj__117; static PyObject *__pyx_codeobj__119; static PyObject *__pyx_codeobj__121; static PyObject *__pyx_codeobj__123; static PyObject *__pyx_codeobj__125; static PyObject *__pyx_codeobj__127; static PyObject *__pyx_codeobj__129; static PyObject *__pyx_codeobj__131; static PyObject *__pyx_codeobj__133; static PyObject *__pyx_codeobj__135; static PyObject *__pyx_codeobj__137; static PyObject *__pyx_codeobj__139; static PyObject *__pyx_codeobj__141; static PyObject *__pyx_codeobj__143; static PyObject *__pyx_codeobj__145; static PyObject *__pyx_codeobj__147; static PyObject *__pyx_codeobj__149; static PyObject *__pyx_codeobj__151; static PyObject *__pyx_codeobj__153; static PyObject *__pyx_codeobj__155; static PyObject *__pyx_codeobj__157; static PyObject *__pyx_codeobj__159; static PyObject *__pyx_codeobj__161; static PyObject *__pyx_codeobj__163; static PyObject *__pyx_codeobj__165; static PyObject *__pyx_codeobj__167; static PyObject *__pyx_codeobj__169; static PyObject *__pyx_codeobj__171; static PyObject *__pyx_codeobj__173; static PyObject *__pyx_codeobj__175; static PyObject *__pyx_codeobj__177; static PyObject *__pyx_codeobj__179; static PyObject *__pyx_codeobj__181; static PyObject *__pyx_codeobj__183; static PyObject *__pyx_codeobj__185; static PyObject *__pyx_codeobj__187; static PyObject *__pyx_codeobj__189; static PyObject *__pyx_codeobj__191; static PyObject *__pyx_codeobj__193; static PyObject *__pyx_codeobj__195; static PyObject *__pyx_codeobj__197; static PyObject *__pyx_codeobj__199; static PyObject *__pyx_codeobj__201; static PyObject *__pyx_codeobj__203; static PyObject *__pyx_codeobj__205; static PyObject *__pyx_codeobj__207; static PyObject *__pyx_codeobj__209; /* "pandas/lib.pyx":62 * import_ufunc() * * cpdef map_indices_list(list index): # <<<<<<<<<<<<<< * ''' * Produce a dict mapping the values of the input array to their respective */ static PyObject *__pyx_pw_6pandas_3lib_1map_indices_list(PyObject *__pyx_self, PyObject *__pyx_v_index); /*proto*/ static PyObject *__pyx_f_6pandas_3lib_map_indices_list(PyObject *__pyx_v_index, CYTHON_UNUSED int __pyx_skip_dispatch) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_length; PyObject *__pyx_v_result = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; Py_ssize_t __pyx_t_2; PyObject *__pyx_t_3 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("map_indices_list", 0); /* "pandas/lib.pyx":73 * ''' * cdef Py_ssize_t i, length * cdef dict result = {} # <<<<<<<<<<<<<< * * length = len(index) */ __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 73; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_v_result = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/lib.pyx":75 * cdef dict result = {} * * length = len(index) # <<<<<<<<<<<<<< * * for i from 0 <= i < length: */ if (unlikely(__pyx_v_index == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 75; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_2 = PyList_GET_SIZE(__pyx_v_index); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 75; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_length = __pyx_t_2; /* "pandas/lib.pyx":77 * length = len(index) * * for i from 0 <= i < length: # <<<<<<<<<<<<<< * result[index[i]] = i * */ __pyx_t_2 = __pyx_v_length; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_2; __pyx_v_i++) { /* "pandas/lib.pyx":78 * * for i from 0 <= i < length: * result[index[i]] = i # <<<<<<<<<<<<<< * * return result */ __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_i); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 78; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (unlikely(__pyx_v_index == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 78; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_3 = __Pyx_GetItemInt_List(__pyx_v_index, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1); if (unlikely(__pyx_t_3 == NULL)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 78; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_3); if (unlikely(PyDict_SetItem(__pyx_v_result, __pyx_t_3, __pyx_t_1) < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 78; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } /* "pandas/lib.pyx":80 * result[index[i]] = i * * return result # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_result); __pyx_r = __pyx_v_result; goto __pyx_L0; /* "pandas/lib.pyx":62 * import_ufunc() * * cpdef map_indices_list(list index): # <<<<<<<<<<<<<< * ''' * Produce a dict mapping the values of the input array to their respective */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("pandas.lib.map_indices_list", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_result); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_3lib_1map_indices_list(PyObject *__pyx_self, PyObject *__pyx_v_index); /*proto*/ static char __pyx_doc_6pandas_3lib_map_indices_list[] = "\n Produce a dict mapping the values of the input array to their respective\n locations.\n\n Example:\n array(['hi', 'there']) --> {'hi' : 0 , 'there' : 1}\n\n Better to do this with Cython because of the enormous speed boost.\n "; static PyObject *__pyx_pw_6pandas_3lib_1map_indices_list(PyObject *__pyx_self, PyObject *__pyx_v_index) { CYTHON_UNUSED int __pyx_lineno = 0; CYTHON_UNUSED const char *__pyx_filename = NULL; CYTHON_UNUSED int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("map_indices_list (wrapper)", 0); if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_index), (&PyList_Type), 1, "index", 1))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_3lib_map_indices_list(__pyx_self, ((PyObject*)__pyx_v_index)); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_3lib_map_indices_list(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_index) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("map_indices_list", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_6pandas_3lib_map_indices_list(__pyx_v_index, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __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.lib.map_indices_list", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/lib.pyx":85 * from libc.stdlib cimport malloc, free * * def ismember(ndarray arr, set values): # <<<<<<<<<<<<<< * ''' * Checks whether */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_3lib_3ismember(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6pandas_3lib_2ismember[] = "\n Checks whether\n\n Parameters\n ----------\n arr : ndarray\n values : set\n\n Returns\n -------\n ismember : ndarray (boolean dtype)\n "; static PyMethodDef __pyx_mdef_6pandas_3lib_3ismember = {__Pyx_NAMESTR("ismember"), (PyCFunction)__pyx_pw_6pandas_3lib_3ismember, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_3lib_2ismember)}; static PyObject *__pyx_pw_6pandas_3lib_3ismember(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_arr = 0; PyObject *__pyx_v_values = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("ismember (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_arr,&__pyx_n_s_values,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_arr)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_values)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("ismember", 1, 2, 2, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "ismember") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __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_values = ((PyObject*)values[1]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("ismember", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.lib.ismember", __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_filename = __pyx_f[2]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), (&PySet_Type), 1, "values", 1))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_3lib_2ismember(__pyx_self, __pyx_v_arr, __pyx_v_values); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_3lib_2ismember(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_arr, PyObject *__pyx_v_values) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_n; PyArrayObject *__pyx_v_result = 0; PyObject *__pyx_v_val = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_result; __Pyx_Buffer __pyx_pybuffer_result; 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; int __pyx_t_13; int __pyx_t_14; Py_ssize_t __pyx_t_15; Py_ssize_t __pyx_t_16; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("ismember", 0); __pyx_pybuffer_result.pybuffer.buf = NULL; __pyx_pybuffer_result.refcount = 0; __pyx_pybuffernd_result.data = NULL; __pyx_pybuffernd_result.rcbuffer = &__pyx_pybuffer_result; /* "pandas/lib.pyx":103 * object val * * n = len(arr) # <<<<<<<<<<<<<< * result = np.empty(n, dtype=np.uint8) * for i in range(n): */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_arr)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/lib.pyx":104 * * n = len(arr) * result = np.empty(n, dtype=np.uint8) # <<<<<<<<<<<<<< * for i in range(n): * val = util.get_value_at(arr, i) */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __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_n); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_uint8); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyObject_Call(__pyx_t_3, __pyx_t_4, __pyx_t_2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_7 = ((PyArrayObject *)__pyx_t_6); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_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_result.rcbuffer->pybuffer, (PyObject*)__pyx_v_result, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_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_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_8 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_7 = 0; __pyx_v_result = ((PyArrayObject *)__pyx_t_6); __pyx_t_6 = 0; /* "pandas/lib.pyx":105 * n = len(arr) * result = np.empty(n, dtype=np.uint8) * for i in range(n): # <<<<<<<<<<<<<< * val = util.get_value_at(arr, i) * if val in values: */ __pyx_t_1 = __pyx_v_n; for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_1; __pyx_t_12+=1) { __pyx_v_i = __pyx_t_12; /* "pandas/lib.pyx":106 * result = np.empty(n, dtype=np.uint8) * for i in range(n): * val = util.get_value_at(arr, i) # <<<<<<<<<<<<<< * if val in values: * result[i] = 1 */ __pyx_t_6 = PyInt_FromSsize_t(__pyx_v_i); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 106; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_2 = __pyx_f_4util_get_value_at(__pyx_v_arr, __pyx_t_6); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 106; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF_SET(__pyx_v_val, __pyx_t_2); __pyx_t_2 = 0; /* "pandas/lib.pyx":107 * for i in range(n): * val = util.get_value_at(arr, i) * if val in values: # <<<<<<<<<<<<<< * result[i] = 1 * else: */ __pyx_t_13 = (__Pyx_PySequence_Contains(__pyx_v_val, __pyx_v_values, Py_EQ)); if (unlikely(__pyx_t_13 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_14 = (__pyx_t_13 != 0); if (__pyx_t_14) { /* "pandas/lib.pyx":108 * val = util.get_value_at(arr, i) * if val in values: * result[i] = 1 # <<<<<<<<<<<<<< * else: * result[i] = 0 */ __pyx_t_15 = __pyx_v_i; __pyx_t_8 = -1; if (__pyx_t_15 < 0) { __pyx_t_15 += __pyx_pybuffernd_result.diminfo[0].shape; if (unlikely(__pyx_t_15 < 0)) __pyx_t_8 = 0; } else if (unlikely(__pyx_t_15 >= __pyx_pybuffernd_result.diminfo[0].shape)) __pyx_t_8 = 0; if (unlikely(__pyx_t_8 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_8); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 108; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_result.diminfo[0].strides) = 1; goto __pyx_L5; } /*else*/ { /* "pandas/lib.pyx":110 * result[i] = 1 * else: * result[i] = 0 # <<<<<<<<<<<<<< * * return result.view(np.bool_) */ __pyx_t_16 = __pyx_v_i; __pyx_t_8 = -1; if (__pyx_t_16 < 0) { __pyx_t_16 += __pyx_pybuffernd_result.diminfo[0].shape; if (unlikely(__pyx_t_16 < 0)) __pyx_t_8 = 0; } else if (unlikely(__pyx_t_16 >= __pyx_pybuffernd_result.diminfo[0].shape)) __pyx_t_8 = 0; if (unlikely(__pyx_t_8 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_8); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 110; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_result.diminfo[0].strides) = 0; } __pyx_L5:; } /* "pandas/lib.pyx":112 * result[i] = 0 * * return result.view(np.bool_) # <<<<<<<<<<<<<< * * #---------------------------------------------------------------------- */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_result), __pyx_n_s_view); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 112; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 112; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_bool); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 112; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 112; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyObject_Call(__pyx_t_2, __pyx_t_6, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 112; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; /* "pandas/lib.pyx":85 * from libc.stdlib cimport malloc, free * * def ismember(ndarray arr, set values): # <<<<<<<<<<<<<< * ''' * Checks whether */ /* 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_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.lib.ismember", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_result); __Pyx_XDECREF(__pyx_v_val); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/lib.pyx":121 * from datetime import date as pydate * * cdef inline int64_t gmtime(object date): # <<<<<<<<<<<<<< * cdef int y, m, d, h, mn, s, days * */ static CYTHON_INLINE __pyx_t_5numpy_int64_t __pyx_f_6pandas_3lib_gmtime(PyObject *__pyx_v_date) { int __pyx_v_y; int __pyx_v_m; int __pyx_v_d; int __pyx_v_h; int __pyx_v_mn; int __pyx_v_s; int __pyx_v_days; __pyx_t_5numpy_int64_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; int __pyx_t_5; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("gmtime", 0); /* "pandas/lib.pyx":124 * cdef int y, m, d, h, mn, s, days * * y = PyDateTime_GET_YEAR(date) # <<<<<<<<<<<<<< * m = PyDateTime_GET_MONTH(date) * d = PyDateTime_GET_DAY(date) */ if (!(likely(((__pyx_v_date) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_date, __pyx_ptype_8datetime_date))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 124; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_y = PyDateTime_GET_YEAR(((PyDateTime_Date *)__pyx_v_date)); /* "pandas/lib.pyx":125 * * y = PyDateTime_GET_YEAR(date) * m = PyDateTime_GET_MONTH(date) # <<<<<<<<<<<<<< * d = PyDateTime_GET_DAY(date) * h = PyDateTime_DATE_GET_HOUR(date) */ if (!(likely(((__pyx_v_date) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_date, __pyx_ptype_8datetime_date))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 125; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_m = PyDateTime_GET_MONTH(((PyDateTime_Date *)__pyx_v_date)); /* "pandas/lib.pyx":126 * y = PyDateTime_GET_YEAR(date) * m = PyDateTime_GET_MONTH(date) * d = PyDateTime_GET_DAY(date) # <<<<<<<<<<<<<< * h = PyDateTime_DATE_GET_HOUR(date) * mn = PyDateTime_DATE_GET_MINUTE(date) */ if (!(likely(((__pyx_v_date) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_date, __pyx_ptype_8datetime_date))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 126; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_d = PyDateTime_GET_DAY(((PyDateTime_Date *)__pyx_v_date)); /* "pandas/lib.pyx":127 * m = PyDateTime_GET_MONTH(date) * d = PyDateTime_GET_DAY(date) * h = PyDateTime_DATE_GET_HOUR(date) # <<<<<<<<<<<<<< * mn = PyDateTime_DATE_GET_MINUTE(date) * s = PyDateTime_DATE_GET_SECOND(date) */ __pyx_v_h = PyDateTime_DATE_GET_HOUR(__pyx_v_date); /* "pandas/lib.pyx":128 * d = PyDateTime_GET_DAY(date) * h = PyDateTime_DATE_GET_HOUR(date) * mn = PyDateTime_DATE_GET_MINUTE(date) # <<<<<<<<<<<<<< * s = PyDateTime_DATE_GET_SECOND(date) * */ __pyx_v_mn = PyDateTime_DATE_GET_MINUTE(__pyx_v_date); /* "pandas/lib.pyx":129 * h = PyDateTime_DATE_GET_HOUR(date) * mn = PyDateTime_DATE_GET_MINUTE(date) * s = PyDateTime_DATE_GET_SECOND(date) # <<<<<<<<<<<<<< * * days = pydate(y, m, 1).toordinal() - _EPOCH_ORD + d - 1 */ __pyx_v_s = PyDateTime_DATE_GET_SECOND(__pyx_v_date); /* "pandas/lib.pyx":131 * s = PyDateTime_DATE_GET_SECOND(date) * * days = pydate(y, m, 1).toordinal() - _EPOCH_ORD + d - 1 # <<<<<<<<<<<<<< * return (( (((days * 24 + h) * 60 + mn))) * 60 + s) * 1000 * */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_pydate); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 131; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_y); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 131; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_m); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 131; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 131; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __Pyx_INCREF(__pyx_int_1); PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_int_1); __Pyx_GIVEREF(__pyx_int_1); __pyx_t_2 = 0; __pyx_t_3 = 0; __pyx_t_3 = PyObject_Call(__pyx_t_1, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 131; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_toordinal); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 131; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyObject_Call(__pyx_t_4, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 131; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_6pandas_3lib__EPOCH_ORD); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 131; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_1 = PyNumber_Subtract(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 131; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_d); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 131; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = PyNumber_Add(__pyx_t_1, __pyx_t_4); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 131; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyNumber_Subtract(__pyx_t_3, __pyx_int_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 131; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_t_4); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 131; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_days = __pyx_t_5; /* "pandas/lib.pyx":132 * * days = pydate(y, m, 1).toordinal() - _EPOCH_ORD + d - 1 * return (( (((days * 24 + h) * 60 + mn))) * 60 + s) * 1000 # <<<<<<<<<<<<<< * * cpdef object to_datetime(int64_t timestamp): */ __pyx_r = (((((__pyx_t_5numpy_int64_t)((((__pyx_v_days * 24) + __pyx_v_h) * 60) + __pyx_v_mn)) * 60) + __pyx_v_s) * 1000); goto __pyx_L0; /* "pandas/lib.pyx":121 * from datetime import date as pydate * * cdef inline int64_t gmtime(object date): # <<<<<<<<<<<<<< * cdef int y, m, d, h, mn, s, days * */ /* 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_WriteUnraisable("pandas.lib.gmtime", __pyx_clineno, __pyx_lineno, __pyx_filename, 0); __pyx_r = 0; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/lib.pyx":134 * return (( (((days * 24 + h) * 60 + mn))) * 60 + s) * 1000 * * cpdef object to_datetime(int64_t timestamp): # <<<<<<<<<<<<<< * return pydatetime.utcfromtimestamp(timestamp / 1000.0) * */ static PyObject *__pyx_pw_6pandas_3lib_5to_datetime(PyObject *__pyx_self, PyObject *__pyx_arg_timestamp); /*proto*/ static PyObject *__pyx_f_6pandas_3lib_to_datetime(__pyx_t_5numpy_int64_t __pyx_v_timestamp, CYTHON_UNUSED int __pyx_skip_dispatch) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("to_datetime", 0); /* "pandas/lib.pyx":135 * * cpdef object to_datetime(int64_t timestamp): * return pydatetime.utcfromtimestamp(timestamp / 1000.0) # <<<<<<<<<<<<<< * * cpdef object to_timestamp(object dt): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_pydatetime); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 135; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_utcfromtimestamp); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 135; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyFloat_FromDouble((__pyx_v_timestamp / 1000.0)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 135; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 135; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyObject_Call(__pyx_t_2, __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 135; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "pandas/lib.pyx":134 * return (( (((days * 24 + h) * 60 + mn))) * 60 + s) * 1000 * * cpdef object to_datetime(int64_t timestamp): # <<<<<<<<<<<<<< * return pydatetime.utcfromtimestamp(timestamp / 1000.0) * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("pandas.lib.to_datetime", __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_3lib_5to_datetime(PyObject *__pyx_self, PyObject *__pyx_arg_timestamp); /*proto*/ static PyObject *__pyx_pw_6pandas_3lib_5to_datetime(PyObject *__pyx_self, PyObject *__pyx_arg_timestamp) { __pyx_t_5numpy_int64_t __pyx_v_timestamp; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("to_datetime (wrapper)", 0); assert(__pyx_arg_timestamp); { __pyx_v_timestamp = __Pyx_PyInt_As_npy_int64(__pyx_arg_timestamp); if (unlikely((__pyx_v_timestamp == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 134; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; __Pyx_AddTraceback("pandas.lib.to_datetime", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pandas_3lib_4to_datetime(__pyx_self, ((__pyx_t_5numpy_int64_t)__pyx_v_timestamp)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_3lib_4to_datetime(CYTHON_UNUSED PyObject *__pyx_self, __pyx_t_5numpy_int64_t __pyx_v_timestamp) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("to_datetime", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_6pandas_3lib_to_datetime(__pyx_v_timestamp, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 134; __pyx_clineno = __LINE__; goto __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.lib.to_datetime", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/lib.pyx":137 * return pydatetime.utcfromtimestamp(timestamp / 1000.0) * * cpdef object to_timestamp(object dt): # <<<<<<<<<<<<<< * return gmtime(dt) * */ static PyObject *__pyx_pw_6pandas_3lib_7to_timestamp(PyObject *__pyx_self, PyObject *__pyx_v_dt); /*proto*/ static PyObject *__pyx_f_6pandas_3lib_to_timestamp(PyObject *__pyx_v_dt, CYTHON_UNUSED int __pyx_skip_dispatch) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("to_timestamp", 0); /* "pandas/lib.pyx":138 * * cpdef object to_timestamp(object dt): * return gmtime(dt) # <<<<<<<<<<<<<< * * def array_to_timestamp(ndarray[object, ndim=1] arr): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyInt_From_npy_int64(__pyx_f_6pandas_3lib_gmtime(__pyx_v_dt)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 138; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "pandas/lib.pyx":137 * return pydatetime.utcfromtimestamp(timestamp / 1000.0) * * cpdef object to_timestamp(object dt): # <<<<<<<<<<<<<< * return gmtime(dt) * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas.lib.to_timestamp", __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_3lib_7to_timestamp(PyObject *__pyx_self, PyObject *__pyx_v_dt); /*proto*/ static PyObject *__pyx_pw_6pandas_3lib_7to_timestamp(PyObject *__pyx_self, PyObject *__pyx_v_dt) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("to_timestamp (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_3lib_6to_timestamp(__pyx_self, ((PyObject *)__pyx_v_dt)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_3lib_6to_timestamp(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_dt) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("to_timestamp", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_6pandas_3lib_to_timestamp(__pyx_v_dt, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 137; __pyx_clineno = __LINE__; goto __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.lib.to_timestamp", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/lib.pyx":140 * return gmtime(dt) * * def array_to_timestamp(ndarray[object, ndim=1] arr): # <<<<<<<<<<<<<< * cdef int i, n * cdef ndarray[int64_t, ndim=1] result */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_3lib_9array_to_timestamp(PyObject *__pyx_self, PyObject *__pyx_v_arr); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_3lib_9array_to_timestamp = {__Pyx_NAMESTR("array_to_timestamp"), (PyCFunction)__pyx_pw_6pandas_3lib_9array_to_timestamp, METH_O, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_3lib_9array_to_timestamp(PyObject *__pyx_self, PyObject *__pyx_v_arr) { CYTHON_UNUSED int __pyx_lineno = 0; CYTHON_UNUSED const char *__pyx_filename = NULL; CYTHON_UNUSED int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("array_to_timestamp (wrapper)", 0); if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_arr), __pyx_ptype_5numpy_ndarray, 1, "arr", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 140; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_3lib_8array_to_timestamp(__pyx_self, ((PyArrayObject *)__pyx_v_arr)); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_3lib_8array_to_timestamp(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_arr) { int __pyx_v_i; int __pyx_v_n; PyArrayObject *__pyx_v_result = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_arr; __Pyx_Buffer __pyx_pybuffer_arr; __Pyx_LocalBuf_ND __pyx_pybuffernd_result; __Pyx_Buffer __pyx_pybuffer_result; 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; int __pyx_t_12; int __pyx_t_13; int __pyx_t_14; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("array_to_timestamp", 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_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_filename = __pyx_f[2]; __pyx_lineno = 140; __pyx_clineno = __LINE__; goto __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/lib.pyx":144 * cdef ndarray[int64_t, ndim=1] result * * n = len(arr) # <<<<<<<<<<<<<< * result = np.empty(n, dtype=np.int64) * */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_arr)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 144; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/lib.pyx":145 * * n = len(arr) * result = np.empty(n, dtype=np.int64) # <<<<<<<<<<<<<< * * for i from 0 <= i < n: */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 145; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 145; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_n); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 145; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 145; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 145; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 145; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_int64); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 145; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 145; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyObject_Call(__pyx_t_3, __pyx_t_4, __pyx_t_2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 145; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 145; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_7 = ((PyArrayObject *)__pyx_t_6); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_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_result.rcbuffer->pybuffer, (PyObject*)__pyx_v_result, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_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_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_8 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 145; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_7 = 0; __pyx_v_result = ((PyArrayObject *)__pyx_t_6); __pyx_t_6 = 0; /* "pandas/lib.pyx":147 * result = np.empty(n, dtype=np.int64) * * for i from 0 <= i < n: # <<<<<<<<<<<<<< * result[i] = gmtime(arr[i]) * */ __pyx_t_8 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_8; __pyx_v_i++) { /* "pandas/lib.pyx":148 * * for i from 0 <= i < n: * result[i] = gmtime(arr[i]) # <<<<<<<<<<<<<< * * return result */ __pyx_t_12 = __pyx_v_i; __pyx_t_13 = -1; if (__pyx_t_12 < 0) { __pyx_t_12 += __pyx_pybuffernd_arr.diminfo[0].shape; if (unlikely(__pyx_t_12 < 0)) __pyx_t_13 = 0; } else if (unlikely(__pyx_t_12 >= __pyx_pybuffernd_arr.diminfo[0].shape)) __pyx_t_13 = 0; if (unlikely(__pyx_t_13 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_13); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 148; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_6 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_arr.rcbuffer->pybuffer.buf, __pyx_t_12, __pyx_pybuffernd_arr.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_6); __pyx_t_13 = __pyx_v_i; __pyx_t_14 = -1; if (__pyx_t_13 < 0) { __pyx_t_13 += __pyx_pybuffernd_result.diminfo[0].shape; if (unlikely(__pyx_t_13 < 0)) __pyx_t_14 = 0; } else if (unlikely(__pyx_t_13 >= __pyx_pybuffernd_result.diminfo[0].shape)) __pyx_t_14 = 0; if (unlikely(__pyx_t_14 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_14); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 148; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_result.diminfo[0].strides) = __pyx_f_6pandas_3lib_gmtime(__pyx_t_6); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } /* "pandas/lib.pyx":150 * result[i] = gmtime(arr[i]) * * return result # <<<<<<<<<<<<<< * * def time64_to_datetime(ndarray[int64_t, ndim=1] arr): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_result)); __pyx_r = ((PyObject *)__pyx_v_result); goto __pyx_L0; /* "pandas/lib.pyx":140 * return gmtime(dt) * * def array_to_timestamp(ndarray[object, ndim=1] arr): # <<<<<<<<<<<<<< * cdef int i, n * cdef ndarray[int64_t, ndim=1] result */ /* 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_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_arr.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.lib.array_to_timestamp", __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_result.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_result); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/lib.pyx":152 * return result * * def time64_to_datetime(ndarray[int64_t, ndim=1] arr): # <<<<<<<<<<<<<< * cdef int i, n * cdef ndarray[object, ndim=1] result */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_3lib_11time64_to_datetime(PyObject *__pyx_self, PyObject *__pyx_v_arr); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_3lib_11time64_to_datetime = {__Pyx_NAMESTR("time64_to_datetime"), (PyCFunction)__pyx_pw_6pandas_3lib_11time64_to_datetime, METH_O, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_3lib_11time64_to_datetime(PyObject *__pyx_self, PyObject *__pyx_v_arr) { CYTHON_UNUSED int __pyx_lineno = 0; CYTHON_UNUSED const char *__pyx_filename = NULL; CYTHON_UNUSED int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("time64_to_datetime (wrapper)", 0); if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_arr), __pyx_ptype_5numpy_ndarray, 1, "arr", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 152; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_3lib_10time64_to_datetime(__pyx_self, ((PyArrayObject *)__pyx_v_arr)); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_3lib_10time64_to_datetime(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_arr) { int __pyx_v_i; int __pyx_v_n; PyArrayObject *__pyx_v_result = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_arr; __Pyx_Buffer __pyx_pybuffer_arr; __Pyx_LocalBuf_ND __pyx_pybuffernd_result; __Pyx_Buffer __pyx_pybuffer_result; 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; PyArrayObject *__pyx_t_6 = NULL; int __pyx_t_7; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; int __pyx_t_11; int __pyx_t_12; int __pyx_t_13; PyObject **__pyx_t_14; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("time64_to_datetime", 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_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_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 152; __pyx_clineno = __LINE__; goto __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/lib.pyx":156 * cdef ndarray[object, ndim=1] result * * n = len(arr) # <<<<<<<<<<<<<< * result = np.empty(n, dtype=object) * */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_arr)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 156; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/lib.pyx":157 * * n = len(arr) * result = np.empty(n, dtype=object) # <<<<<<<<<<<<<< * * for i from 0 <= i < n: */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_n); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_dtype, __pyx_builtin_object) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_5 = PyObject_Call(__pyx_t_3, __pyx_t_4, __pyx_t_2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_6 = ((PyArrayObject *)__pyx_t_5); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_object, 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_result.rcbuffer->pybuffer, (PyObject*)__pyx_v_result, &__Pyx_TypeInfo_object, 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_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_7 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_6 = 0; __pyx_v_result = ((PyArrayObject *)__pyx_t_5); __pyx_t_5 = 0; /* "pandas/lib.pyx":159 * result = np.empty(n, dtype=object) * * for i from 0 <= i < n: # <<<<<<<<<<<<<< * result[i] = to_datetime(arr[i]) * */ __pyx_t_7 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_7; __pyx_v_i++) { /* "pandas/lib.pyx":160 * * for i from 0 <= i < n: * result[i] = to_datetime(arr[i]) # <<<<<<<<<<<<<< * * return result */ __pyx_t_11 = __pyx_v_i; __pyx_t_12 = -1; if (__pyx_t_11 < 0) { __pyx_t_11 += __pyx_pybuffernd_arr.diminfo[0].shape; if (unlikely(__pyx_t_11 < 0)) __pyx_t_12 = 0; } else if (unlikely(__pyx_t_11 >= __pyx_pybuffernd_arr.diminfo[0].shape)) __pyx_t_12 = 0; if (unlikely(__pyx_t_12 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_12); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 160; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_5 = __pyx_f_6pandas_3lib_to_datetime((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_arr.rcbuffer->pybuffer.buf, __pyx_t_11, __pyx_pybuffernd_arr.diminfo[0].strides)), 0); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 160; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_12 = __pyx_v_i; __pyx_t_13 = -1; if (__pyx_t_12 < 0) { __pyx_t_12 += __pyx_pybuffernd_result.diminfo[0].shape; if (unlikely(__pyx_t_12 < 0)) __pyx_t_13 = 0; } else if (unlikely(__pyx_t_12 >= __pyx_pybuffernd_result.diminfo[0].shape)) __pyx_t_13 = 0; if (unlikely(__pyx_t_13 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_13); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 160; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_14 = __Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_12, __pyx_pybuffernd_result.diminfo[0].strides); __Pyx_GOTREF(*__pyx_t_14); __Pyx_INCREF(__pyx_t_5); __Pyx_DECREF(*__pyx_t_14); *__pyx_t_14 = __pyx_t_5; __Pyx_GIVEREF(*__pyx_t_14); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } /* "pandas/lib.pyx":162 * result[i] = to_datetime(arr[i]) * * return result # <<<<<<<<<<<<<< * * cdef inline int64_t get_timedelta64_value(val): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_result)); __pyx_r = ((PyObject *)__pyx_v_result); goto __pyx_L0; /* "pandas/lib.pyx":152 * return result * * def time64_to_datetime(ndarray[int64_t, ndim=1] arr): # <<<<<<<<<<<<<< * cdef int i, n * cdef ndarray[object, ndim=1] result */ /* 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); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_arr.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.lib.time64_to_datetime", __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_result.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_result); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/lib.pyx":164 * return result * * cdef inline int64_t get_timedelta64_value(val): # <<<<<<<<<<<<<< * return val.view('i8') * */ static CYTHON_INLINE __pyx_t_5numpy_int64_t __pyx_f_6pandas_3lib_get_timedelta64_value(PyObject *__pyx_v_val) { __pyx_t_5numpy_int64_t __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; __pyx_t_5numpy_int64_t __pyx_t_3; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_timedelta64_value", 0); /* "pandas/lib.pyx":165 * * cdef inline int64_t get_timedelta64_value(val): * return val.view('i8') # <<<<<<<<<<<<<< * * #---------------------------------------------------------------------- */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_val, __pyx_n_s_view); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 165; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyObject_Call(__pyx_t_1, __pyx_tuple_, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 165; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_3 = __Pyx_PyInt_As_npy_int64(__pyx_t_2); if (unlikely((__pyx_t_3 == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 165; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_3; goto __pyx_L0; /* "pandas/lib.pyx":164 * return result * * cdef inline int64_t get_timedelta64_value(val): # <<<<<<<<<<<<<< * return val.view('i8') * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_WriteUnraisable("pandas.lib.get_timedelta64_value", __pyx_clineno, __pyx_lineno, __pyx_filename, 0); __pyx_r = 0; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/lib.pyx":173 * cdef double NEGINF = -INF * * cpdef checknull(object val): # <<<<<<<<<<<<<< * if util.is_float_object(val) or util.is_complex_object(val): * return val != val # and val != INF and val != NEGINF */ static PyObject *__pyx_pw_6pandas_3lib_13checknull(PyObject *__pyx_self, PyObject *__pyx_v_val); /*proto*/ static PyObject *__pyx_f_6pandas_3lib_checknull(PyObject *__pyx_v_val, CYTHON_UNUSED int __pyx_skip_dispatch) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("checknull", 0); /* "pandas/lib.pyx":174 * * cpdef checknull(object val): * if util.is_float_object(val) or util.is_complex_object(val): # <<<<<<<<<<<<<< * return val != val # and val != INF and val != NEGINF * elif util.is_datetime64_object(val): */ __pyx_t_1 = (is_float_object(__pyx_v_val) != 0); if (!__pyx_t_1) { __pyx_t_2 = (is_complex_object(__pyx_v_val) != 0); __pyx_t_3 = __pyx_t_2; } else { __pyx_t_3 = __pyx_t_1; } if (__pyx_t_3) { /* "pandas/lib.pyx":175 * cpdef checknull(object val): * if util.is_float_object(val) or util.is_complex_object(val): * return val != val # and val != INF and val != NEGINF # <<<<<<<<<<<<<< * elif util.is_datetime64_object(val): * return get_datetime64_value(val) == NPY_NAT */ __Pyx_XDECREF(__pyx_r); __pyx_t_4 = PyObject_RichCompare(__pyx_v_val, __pyx_v_val, Py_NE); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 175; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; } /* "pandas/lib.pyx":176 * if util.is_float_object(val) or util.is_complex_object(val): * return val != val # and val != INF and val != NEGINF * elif util.is_datetime64_object(val): # <<<<<<<<<<<<<< * return get_datetime64_value(val) == NPY_NAT * elif val is NaT: */ __pyx_t_3 = (is_datetime64_object(__pyx_v_val) != 0); if (__pyx_t_3) { /* "pandas/lib.pyx":177 * return val != val # and val != INF and val != NEGINF * elif util.is_datetime64_object(val): * return get_datetime64_value(val) == NPY_NAT # <<<<<<<<<<<<<< * elif val is NaT: * return True */ __Pyx_XDECREF(__pyx_r); __pyx_t_4 = __Pyx_PyBool_FromLong((get_datetime64_value(__pyx_v_val) == __pyx_v_6pandas_3lib_NPY_NAT)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 177; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; } /* "pandas/lib.pyx":178 * elif util.is_datetime64_object(val): * return get_datetime64_value(val) == NPY_NAT * elif val is NaT: # <<<<<<<<<<<<<< * return True * elif util.is_timedelta64_object(val): */ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_NaT); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 178; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = (__pyx_v_val == __pyx_t_4); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_1 = (__pyx_t_3 != 0); if (__pyx_t_1) { /* "pandas/lib.pyx":179 * return get_datetime64_value(val) == NPY_NAT * elif val is NaT: * return True # <<<<<<<<<<<<<< * elif util.is_timedelta64_object(val): * return get_timedelta64_value(val) == NPY_NAT */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(Py_True); __pyx_r = Py_True; goto __pyx_L0; } /* "pandas/lib.pyx":180 * elif val is NaT: * return True * elif util.is_timedelta64_object(val): # <<<<<<<<<<<<<< * return get_timedelta64_value(val) == NPY_NAT * elif is_array(val): */ __pyx_t_1 = (is_timedelta64_object(__pyx_v_val) != 0); if (__pyx_t_1) { /* "pandas/lib.pyx":181 * return True * elif util.is_timedelta64_object(val): * return get_timedelta64_value(val) == NPY_NAT # <<<<<<<<<<<<<< * elif is_array(val): * return False */ __Pyx_XDECREF(__pyx_r); __pyx_t_4 = __Pyx_PyBool_FromLong((__pyx_f_6pandas_3lib_get_timedelta64_value(__pyx_v_val) == __pyx_v_6pandas_3lib_NPY_NAT)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 181; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; } /* "pandas/lib.pyx":182 * elif util.is_timedelta64_object(val): * return get_timedelta64_value(val) == NPY_NAT * elif is_array(val): # <<<<<<<<<<<<<< * return False * else: */ __pyx_t_4 = __pyx_f_4util_is_array(__pyx_v_val); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 182; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 182; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_1) { /* "pandas/lib.pyx":183 * return get_timedelta64_value(val) == NPY_NAT * elif is_array(val): * return False # <<<<<<<<<<<<<< * else: * return _checknull(val) */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(Py_False); __pyx_r = Py_False; goto __pyx_L0; } /*else*/ { /* "pandas/lib.pyx":185 * return False * else: * return _checknull(val) # <<<<<<<<<<<<<< * * cpdef checknull_old(object val): */ __Pyx_XDECREF(__pyx_r); __pyx_t_4 = __Pyx_PyBool_FromLong(__pyx_f_4util__checknull(__pyx_v_val)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 185; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; } /* "pandas/lib.pyx":173 * cdef double NEGINF = -INF * * cpdef checknull(object val): # <<<<<<<<<<<<<< * if util.is_float_object(val) or util.is_complex_object(val): * return val != val # and val != INF and val != NEGINF */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("pandas.lib.checknull", __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_3lib_13checknull(PyObject *__pyx_self, PyObject *__pyx_v_val); /*proto*/ static PyObject *__pyx_pw_6pandas_3lib_13checknull(PyObject *__pyx_self, PyObject *__pyx_v_val) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("checknull (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_3lib_12checknull(__pyx_self, ((PyObject *)__pyx_v_val)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_3lib_12checknull(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_val) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("checknull", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_6pandas_3lib_checknull(__pyx_v_val, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 173; __pyx_clineno = __LINE__; goto __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.lib.checknull", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/lib.pyx":187 * return _checknull(val) * * cpdef checknull_old(object val): # <<<<<<<<<<<<<< * if util.is_float_object(val) or util.is_complex_object(val): * return val != val or val == INF or val == NEGINF */ static PyObject *__pyx_pw_6pandas_3lib_15checknull_old(PyObject *__pyx_self, PyObject *__pyx_v_val); /*proto*/ static PyObject *__pyx_f_6pandas_3lib_checknull_old(PyObject *__pyx_v_val, CYTHON_UNUSED int __pyx_skip_dispatch) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("checknull_old", 0); /* "pandas/lib.pyx":188 * * cpdef checknull_old(object val): * if util.is_float_object(val) or util.is_complex_object(val): # <<<<<<<<<<<<<< * return val != val or val == INF or val == NEGINF * elif util.is_datetime64_object(val): */ __pyx_t_1 = (is_float_object(__pyx_v_val) != 0); if (!__pyx_t_1) { __pyx_t_2 = (is_complex_object(__pyx_v_val) != 0); __pyx_t_3 = __pyx_t_2; } else { __pyx_t_3 = __pyx_t_1; } if (__pyx_t_3) { /* "pandas/lib.pyx":189 * cpdef checknull_old(object val): * if util.is_float_object(val) or util.is_complex_object(val): * return val != val or val == INF or val == NEGINF # <<<<<<<<<<<<<< * elif util.is_datetime64_object(val): * return get_datetime64_value(val) == NPY_NAT */ __Pyx_XDECREF(__pyx_r); __pyx_t_4 = PyObject_RichCompare(__pyx_v_val, __pyx_v_val, Py_NE); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 189; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 189; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (!__pyx_t_3) { __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_5 = PyFloat_FromDouble(__pyx_v_6pandas_3lib_INF); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 189; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = PyObject_RichCompare(__pyx_v_val, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 189; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 189; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (!__pyx_t_3) { __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_5 = PyFloat_FromDouble(__pyx_v_6pandas_3lib_NEGINF); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 189; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_7 = PyObject_RichCompare(__pyx_v_val, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 189; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __pyx_t_7; __pyx_t_7 = 0; } else { __pyx_t_5 = __pyx_t_6; __pyx_t_6 = 0; } __pyx_t_6 = __pyx_t_5; __pyx_t_5 = 0; } else { __pyx_t_6 = __pyx_t_4; __pyx_t_4 = 0; } __pyx_r = __pyx_t_6; __pyx_t_6 = 0; goto __pyx_L0; } /* "pandas/lib.pyx":190 * if util.is_float_object(val) or util.is_complex_object(val): * return val != val or val == INF or val == NEGINF * elif util.is_datetime64_object(val): # <<<<<<<<<<<<<< * return get_datetime64_value(val) == NPY_NAT * elif val is NaT: */ __pyx_t_3 = (is_datetime64_object(__pyx_v_val) != 0); if (__pyx_t_3) { /* "pandas/lib.pyx":191 * return val != val or val == INF or val == NEGINF * elif util.is_datetime64_object(val): * return get_datetime64_value(val) == NPY_NAT # <<<<<<<<<<<<<< * elif val is NaT: * return True */ __Pyx_XDECREF(__pyx_r); __pyx_t_6 = __Pyx_PyBool_FromLong((get_datetime64_value(__pyx_v_val) == __pyx_v_6pandas_3lib_NPY_NAT)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 191; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_r = __pyx_t_6; __pyx_t_6 = 0; goto __pyx_L0; } /* "pandas/lib.pyx":192 * elif util.is_datetime64_object(val): * return get_datetime64_value(val) == NPY_NAT * elif val is NaT: # <<<<<<<<<<<<<< * return True * elif util.is_timedelta64_object(val): */ __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_NaT); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 192; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_3 = (__pyx_v_val == __pyx_t_6); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_1 = (__pyx_t_3 != 0); if (__pyx_t_1) { /* "pandas/lib.pyx":193 * return get_datetime64_value(val) == NPY_NAT * elif val is NaT: * return True # <<<<<<<<<<<<<< * elif util.is_timedelta64_object(val): * return get_timedelta64_value(val) == NPY_NAT */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(Py_True); __pyx_r = Py_True; goto __pyx_L0; } /* "pandas/lib.pyx":194 * elif val is NaT: * return True * elif util.is_timedelta64_object(val): # <<<<<<<<<<<<<< * return get_timedelta64_value(val) == NPY_NAT * elif is_array(val): */ __pyx_t_1 = (is_timedelta64_object(__pyx_v_val) != 0); if (__pyx_t_1) { /* "pandas/lib.pyx":195 * return True * elif util.is_timedelta64_object(val): * return get_timedelta64_value(val) == NPY_NAT # <<<<<<<<<<<<<< * elif is_array(val): * return False */ __Pyx_XDECREF(__pyx_r); __pyx_t_6 = __Pyx_PyBool_FromLong((__pyx_f_6pandas_3lib_get_timedelta64_value(__pyx_v_val) == __pyx_v_6pandas_3lib_NPY_NAT)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 195; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_r = __pyx_t_6; __pyx_t_6 = 0; goto __pyx_L0; } /* "pandas/lib.pyx":196 * elif util.is_timedelta64_object(val): * return get_timedelta64_value(val) == NPY_NAT * elif is_array(val): # <<<<<<<<<<<<<< * return False * else: */ __pyx_t_6 = __pyx_f_4util_is_array(__pyx_v_val); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 196; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 196; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (__pyx_t_1) { /* "pandas/lib.pyx":197 * return get_timedelta64_value(val) == NPY_NAT * elif is_array(val): * return False # <<<<<<<<<<<<<< * else: * return util._checknull(val) */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(Py_False); __pyx_r = Py_False; goto __pyx_L0; } /*else*/ { /* "pandas/lib.pyx":199 * return False * else: * return util._checknull(val) # <<<<<<<<<<<<<< * * def isscalar(object val): */ __Pyx_XDECREF(__pyx_r); __pyx_t_6 = __Pyx_PyBool_FromLong(__pyx_f_4util__checknull(__pyx_v_val)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 199; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_r = __pyx_t_6; __pyx_t_6 = 0; goto __pyx_L0; } /* "pandas/lib.pyx":187 * return _checknull(val) * * cpdef checknull_old(object val): # <<<<<<<<<<<<<< * if util.is_float_object(val) or util.is_complex_object(val): * return val != val or val == INF or val == NEGINF */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_AddTraceback("pandas.lib.checknull_old", __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_3lib_15checknull_old(PyObject *__pyx_self, PyObject *__pyx_v_val); /*proto*/ static PyObject *__pyx_pw_6pandas_3lib_15checknull_old(PyObject *__pyx_self, PyObject *__pyx_v_val) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("checknull_old (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_3lib_14checknull_old(__pyx_self, ((PyObject *)__pyx_v_val)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_3lib_14checknull_old(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_val) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("checknull_old", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_6pandas_3lib_checknull_old(__pyx_v_val, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 187; __pyx_clineno = __LINE__; goto __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.lib.checknull_old", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/lib.pyx":201 * return util._checknull(val) * * def isscalar(object val): # <<<<<<<<<<<<<< * return np.isscalar(val) or val is None or PyDateTime_Check(val) * */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_3lib_17isscalar(PyObject *__pyx_self, PyObject *__pyx_v_val); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_3lib_17isscalar = {__Pyx_NAMESTR("isscalar"), (PyCFunction)__pyx_pw_6pandas_3lib_17isscalar, METH_O, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_3lib_17isscalar(PyObject *__pyx_self, PyObject *__pyx_v_val) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("isscalar (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_3lib_16isscalar(__pyx_self, ((PyObject *)__pyx_v_val)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_3lib_16isscalar(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_val) { 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("isscalar", 0); /* "pandas/lib.pyx":202 * * def isscalar(object val): * return np.isscalar(val) or val is None or PyDateTime_Check(val) # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 202; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_isscalar); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 202; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 202; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_val); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_val); __Pyx_GIVEREF(__pyx_v_val); __pyx_t_3 = PyObject_Call(__pyx_t_2, __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 202; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 202; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (!__pyx_t_4) { __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_4 = (__pyx_v_val == Py_None); if (!__pyx_t_4) { __pyx_t_5 = PyDateTime_Check(__pyx_v_val); __pyx_t_6 = __pyx_t_5; } else { __pyx_t_6 = __pyx_t_4; } __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_t_6); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 202; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __pyx_t_1; __pyx_t_1 = 0; } else { __pyx_t_2 = __pyx_t_3; __pyx_t_3 = 0; } __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "pandas/lib.pyx":201 * return util._checknull(val) * * def isscalar(object val): # <<<<<<<<<<<<<< * return np.isscalar(val) or val is None or PyDateTime_Check(val) * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("pandas.lib.isscalar", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/lib.pyx":207 * @cython.wraparound(False) * @cython.boundscheck(False) * def isnullobj(ndarray[object] arr): # <<<<<<<<<<<<<< * cdef Py_ssize_t i, n * cdef object val */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_3lib_19isnullobj(PyObject *__pyx_self, PyObject *__pyx_v_arr); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_3lib_19isnullobj = {__Pyx_NAMESTR("isnullobj"), (PyCFunction)__pyx_pw_6pandas_3lib_19isnullobj, METH_O, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_3lib_19isnullobj(PyObject *__pyx_self, PyObject *__pyx_v_arr) { CYTHON_UNUSED int __pyx_lineno = 0; CYTHON_UNUSED const char *__pyx_filename = NULL; CYTHON_UNUSED int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("isnullobj (wrapper)", 0); if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_arr), __pyx_ptype_5numpy_ndarray, 1, "arr", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 207; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_3lib_18isnullobj(__pyx_self, ((PyArrayObject *)__pyx_v_arr)); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_3lib_18isnullobj(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_arr) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_n; PyArrayObject *__pyx_v_result = 0; PyObject *__pyx_v_arobj = NULL; __Pyx_LocalBuf_ND __pyx_pybuffernd_arr; __Pyx_Buffer __pyx_pybuffer_arr; __Pyx_LocalBuf_ND __pyx_pybuffernd_result; __Pyx_Buffer __pyx_pybuffer_result; 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; int __pyx_t_13; int __pyx_t_14; int __pyx_t_15; Py_ssize_t __pyx_t_16; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("isnullobj", 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_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_filename = __pyx_f[2]; __pyx_lineno = 207; __pyx_clineno = __LINE__; goto __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/lib.pyx":212 * cdef ndarray[uint8_t] result * * n = len(arr) # <<<<<<<<<<<<<< * result = np.zeros(n, dtype=np.uint8) * for i from 0 <= i < n: */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_arr)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 212; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/lib.pyx":213 * * n = len(arr) * result = np.zeros(n, dtype=np.uint8) # <<<<<<<<<<<<<< * for i from 0 <= i < n: * arobj = arr[i] */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 213; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_zeros); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 213; __pyx_clineno = __LINE__; goto __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_n); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 213; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 213; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 213; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 213; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_uint8); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 213; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 213; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyObject_Call(__pyx_t_3, __pyx_t_4, __pyx_t_2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 213; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 213; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_7 = ((PyArrayObject *)__pyx_t_6); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_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_result.rcbuffer->pybuffer, (PyObject*)__pyx_v_result, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_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_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_8 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 213; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_7 = 0; __pyx_v_result = ((PyArrayObject *)__pyx_t_6); __pyx_t_6 = 0; /* "pandas/lib.pyx":214 * n = len(arr) * result = np.zeros(n, dtype=np.uint8) * for i from 0 <= i < n: # <<<<<<<<<<<<<< * arobj = arr[i] * result[i] = arobj is NaT or _checknull(arobj) */ __pyx_t_1 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_1; __pyx_v_i++) { /* "pandas/lib.pyx":215 * result = np.zeros(n, dtype=np.uint8) * for i from 0 <= i < n: * arobj = arr[i] # <<<<<<<<<<<<<< * result[i] = arobj is NaT or _checknull(arobj) * return result.view(np.bool_) */ __pyx_t_12 = __pyx_v_i; __pyx_t_6 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_arr.rcbuffer->pybuffer.buf, __pyx_t_12, __pyx_pybuffernd_arr.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_6); __Pyx_XDECREF_SET(__pyx_v_arobj, __pyx_t_6); __pyx_t_6 = 0; /* "pandas/lib.pyx":216 * for i from 0 <= i < n: * arobj = arr[i] * result[i] = arobj is NaT or _checknull(arobj) # <<<<<<<<<<<<<< * return result.view(np.bool_) * */ __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_NaT); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 216; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_13 = (__pyx_v_arobj == __pyx_t_6); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (!__pyx_t_13) { __pyx_t_14 = __pyx_f_4util__checknull(__pyx_v_arobj); __pyx_t_15 = __pyx_t_14; } else { __pyx_t_15 = __pyx_t_13; } __pyx_t_16 = __pyx_v_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_result.diminfo[0].strides) = __pyx_t_15; } /* "pandas/lib.pyx":217 * arobj = arr[i] * result[i] = arobj is NaT or _checknull(arobj) * return result.view(np.bool_) # <<<<<<<<<<<<<< * * @cython.wraparound(False) */ __Pyx_XDECREF(__pyx_r); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_result), __pyx_n_s_view); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 217; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 217; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_bool); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 217; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 217; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyObject_Call(__pyx_t_6, __pyx_t_2, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 217; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; /* "pandas/lib.pyx":207 * @cython.wraparound(False) * @cython.boundscheck(False) * def isnullobj(ndarray[object] arr): # <<<<<<<<<<<<<< * cdef Py_ssize_t i, n * cdef object val */ /* 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_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_arr.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.lib.isnullobj", __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_result.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_result); __Pyx_XDECREF(__pyx_v_arobj); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/lib.pyx":221 * @cython.wraparound(False) * @cython.boundscheck(False) * def isnullobj_old(ndarray[object] arr): # <<<<<<<<<<<<<< * cdef Py_ssize_t i, n * cdef object val */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_3lib_21isnullobj_old(PyObject *__pyx_self, PyObject *__pyx_v_arr); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_3lib_21isnullobj_old = {__Pyx_NAMESTR("isnullobj_old"), (PyCFunction)__pyx_pw_6pandas_3lib_21isnullobj_old, METH_O, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_3lib_21isnullobj_old(PyObject *__pyx_self, PyObject *__pyx_v_arr) { CYTHON_UNUSED int __pyx_lineno = 0; CYTHON_UNUSED const char *__pyx_filename = NULL; CYTHON_UNUSED int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("isnullobj_old (wrapper)", 0); if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_arr), __pyx_ptype_5numpy_ndarray, 1, "arr", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 221; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_3lib_20isnullobj_old(__pyx_self, ((PyArrayObject *)__pyx_v_arr)); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_3lib_20isnullobj_old(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_arr) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_n; PyArrayObject *__pyx_v_result = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_arr; __Pyx_Buffer __pyx_pybuffer_arr; __Pyx_LocalBuf_ND __pyx_pybuffernd_result; __Pyx_Buffer __pyx_pybuffer_result; 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("isnullobj_old", 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_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_filename = __pyx_f[2]; __pyx_lineno = 221; __pyx_clineno = __LINE__; goto __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/lib.pyx":226 * cdef ndarray[uint8_t] result * * n = len(arr) # <<<<<<<<<<<<<< * result = np.zeros(n, dtype=np.uint8) * for i from 0 <= i < n: */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_arr)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 226; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/lib.pyx":227 * * n = len(arr) * result = np.zeros(n, dtype=np.uint8) # <<<<<<<<<<<<<< * for i from 0 <= i < n: * result[i] = util._checknull_old(arr[i]) */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 227; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_zeros); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 227; __pyx_clineno = __LINE__; goto __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_n); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 227; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 227; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 227; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 227; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_uint8); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 227; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 227; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyObject_Call(__pyx_t_3, __pyx_t_4, __pyx_t_2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 227; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 227; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_7 = ((PyArrayObject *)__pyx_t_6); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_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_result.rcbuffer->pybuffer, (PyObject*)__pyx_v_result, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_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_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_8 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 227; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_7 = 0; __pyx_v_result = ((PyArrayObject *)__pyx_t_6); __pyx_t_6 = 0; /* "pandas/lib.pyx":228 * n = len(arr) * result = np.zeros(n, dtype=np.uint8) * for i from 0 <= i < n: # <<<<<<<<<<<<<< * result[i] = util._checknull_old(arr[i]) * return result.view(np.bool_) */ __pyx_t_1 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_1; __pyx_v_i++) { /* "pandas/lib.pyx":229 * result = np.zeros(n, dtype=np.uint8) * for i from 0 <= i < n: * result[i] = util._checknull_old(arr[i]) # <<<<<<<<<<<<<< * return result.view(np.bool_) * */ __pyx_t_12 = __pyx_v_i; __pyx_t_6 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_arr.rcbuffer->pybuffer.buf, __pyx_t_12, __pyx_pybuffernd_arr.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_6); __pyx_t_13 = __pyx_v_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_result.diminfo[0].strides) = __pyx_f_4util__checknull_old(__pyx_t_6); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } /* "pandas/lib.pyx":230 * for i from 0 <= i < n: * result[i] = util._checknull_old(arr[i]) * return result.view(np.bool_) # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_result), __pyx_n_s_view); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 230; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 230; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_bool); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 230; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 230; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyObject_Call(__pyx_t_6, __pyx_t_2, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 230; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; /* "pandas/lib.pyx":221 * @cython.wraparound(False) * @cython.boundscheck(False) * def isnullobj_old(ndarray[object] arr): # <<<<<<<<<<<<<< * cdef Py_ssize_t i, n * cdef object val */ /* 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_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_arr.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.lib.isnullobj_old", __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_result.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_result); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/lib.pyx":235 * @cython.wraparound(False) * @cython.boundscheck(False) * def isnullobj2d(ndarray[object, ndim=2] arr): # <<<<<<<<<<<<<< * cdef Py_ssize_t i, j, n, m * cdef object val */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_3lib_23isnullobj2d(PyObject *__pyx_self, PyObject *__pyx_v_arr); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_3lib_23isnullobj2d = {__Pyx_NAMESTR("isnullobj2d"), (PyCFunction)__pyx_pw_6pandas_3lib_23isnullobj2d, METH_O, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_3lib_23isnullobj2d(PyObject *__pyx_self, PyObject *__pyx_v_arr) { CYTHON_UNUSED int __pyx_lineno = 0; CYTHON_UNUSED const char *__pyx_filename = NULL; CYTHON_UNUSED int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("isnullobj2d (wrapper)", 0); if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_arr), __pyx_ptype_5numpy_ndarray, 1, "arr", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 235; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_3lib_22isnullobj2d(__pyx_self, ((PyArrayObject *)__pyx_v_arr)); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_3lib_22isnullobj2d(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_arr) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_n; Py_ssize_t __pyx_v_m; PyObject *__pyx_v_val = 0; PyArrayObject *__pyx_v_result = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_arr; __Pyx_Buffer __pyx_pybuffer_arr; __Pyx_LocalBuf_ND __pyx_pybuffernd_result; __Pyx_Buffer __pyx_pybuffer_result; 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 *); Py_ssize_t __pyx_t_6; Py_ssize_t __pyx_t_7; 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; Py_ssize_t __pyx_t_15; int __pyx_t_16; Py_ssize_t __pyx_t_17; Py_ssize_t __pyx_t_18; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("isnullobj2d", 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_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, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 235; __pyx_clineno = __LINE__; goto __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]; __pyx_pybuffernd_arr.diminfo[1].strides = __pyx_pybuffernd_arr.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_arr.diminfo[1].shape = __pyx_pybuffernd_arr.rcbuffer->pybuffer.shape[1]; /* "pandas/lib.pyx":240 * cdef ndarray[uint8_t, ndim=2] result * * n, m = ( arr).shape # <<<<<<<<<<<<<< * result = np.zeros((n, m), dtype=np.uint8) * for i from 0 <= i < n: */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_arr), __pyx_n_s_shape); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 240; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) { PyObject* sequence = __pyx_t_1; #if CYTHON_COMPILING_IN_CPYTHON Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 240; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1); } else { __pyx_t_2 = PyList_GET_ITEM(sequence, 0); __pyx_t_3 = PyList_GET_ITEM(sequence, 1); } __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); #else __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 240; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 240; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } else { Py_ssize_t index = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 240; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_5 = Py_TYPE(__pyx_t_4)->tp_iternext; index = 0; __pyx_t_2 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_2)) goto __pyx_L3_unpacking_failed; __Pyx_GOTREF(__pyx_t_2); index = 1; __pyx_t_3 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_3)) goto __pyx_L3_unpacking_failed; __Pyx_GOTREF(__pyx_t_3); if (__Pyx_IternextUnpackEndCheck(__pyx_t_5(__pyx_t_4), 2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 240; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 240; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_L4_unpacking_done:; } __pyx_t_6 = __Pyx_PyIndex_AsSsize_t(__pyx_t_2); if (unlikely((__pyx_t_6 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 240; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_7 = __Pyx_PyIndex_AsSsize_t(__pyx_t_3); if (unlikely((__pyx_t_7 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 240; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_n = __pyx_t_6; __pyx_v_m = __pyx_t_7; /* "pandas/lib.pyx":241 * * n, m = ( arr).shape * result = np.zeros((n, m), dtype=np.uint8) # <<<<<<<<<<<<<< * for i from 0 <= i < n: * for j from 0 <= j < m: */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 241; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_zeros); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 241; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_n); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 241; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_m); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 241; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 241; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_1 = 0; __pyx_t_2 = 0; __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 241; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyDict_New(); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 241; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 241; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_uint8); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 241; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_dtype, __pyx_t_8) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 241; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_8 = PyObject_Call(__pyx_t_3, __pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 241; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (!(likely(((__pyx_t_8) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_8, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 241; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_9 = ((PyArrayObject *)__pyx_t_8); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __pyx_t_10 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_t_9, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_result.rcbuffer->pybuffer, (PyObject*)__pyx_v_result, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_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]; __pyx_pybuffernd_result.diminfo[1].strides = __pyx_pybuffernd_result.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_result.diminfo[1].shape = __pyx_pybuffernd_result.rcbuffer->pybuffer.shape[1]; if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 241; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_9 = 0; __pyx_v_result = ((PyArrayObject *)__pyx_t_8); __pyx_t_8 = 0; /* "pandas/lib.pyx":242 * n, m = ( arr).shape * result = np.zeros((n, m), dtype=np.uint8) * for i from 0 <= i < n: # <<<<<<<<<<<<<< * for j from 0 <= j < m: * val = arr[i, j] */ __pyx_t_7 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_7; __pyx_v_i++) { /* "pandas/lib.pyx":243 * result = np.zeros((n, m), dtype=np.uint8) * for i from 0 <= i < n: * for j from 0 <= j < m: # <<<<<<<<<<<<<< * val = arr[i, j] * if checknull(val): */ __pyx_t_6 = __pyx_v_m; for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_6; __pyx_v_j++) { /* "pandas/lib.pyx":244 * for i from 0 <= i < n: * for j from 0 <= j < m: * val = arr[i, j] # <<<<<<<<<<<<<< * if checknull(val): * result[i, j] = 1 */ __pyx_t_14 = __pyx_v_i; __pyx_t_15 = __pyx_v_j; __pyx_t_8 = (PyObject *) *__Pyx_BufPtrStrided2d(PyObject **, __pyx_pybuffernd_arr.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_arr.diminfo[0].strides, __pyx_t_15, __pyx_pybuffernd_arr.diminfo[1].strides); __Pyx_INCREF((PyObject*)__pyx_t_8); __Pyx_XDECREF_SET(__pyx_v_val, __pyx_t_8); __pyx_t_8 = 0; /* "pandas/lib.pyx":245 * for j from 0 <= j < m: * val = arr[i, j] * if checknull(val): # <<<<<<<<<<<<<< * result[i, j] = 1 * return result.view(np.bool_) */ __pyx_t_8 = __pyx_f_6pandas_3lib_checknull(__pyx_v_val, 0); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 245; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_16 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_16 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 245; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (__pyx_t_16) { /* "pandas/lib.pyx":246 * val = arr[i, j] * if checknull(val): * result[i, j] = 1 # <<<<<<<<<<<<<< * return result.view(np.bool_) * */ __pyx_t_17 = __pyx_v_i; __pyx_t_18 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_result.diminfo[0].strides, __pyx_t_18, __pyx_pybuffernd_result.diminfo[1].strides) = 1; goto __pyx_L9; } __pyx_L9:; } } /* "pandas/lib.pyx":247 * if checknull(val): * result[i, j] = 1 * return result.view(np.bool_) # <<<<<<<<<<<<<< * * @cython.wraparound(False) */ __Pyx_XDECREF(__pyx_r); __pyx_t_8 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_result), __pyx_n_s_view); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 247; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 247; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_bool); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 247; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 247; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_Call(__pyx_t_8, __pyx_t_4, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 247; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "pandas/lib.pyx":235 * @cython.wraparound(False) * @cython.boundscheck(False) * def isnullobj2d(ndarray[object, ndim=2] arr): # <<<<<<<<<<<<<< * cdef Py_ssize_t i, j, n, m * cdef object val */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_8); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_arr.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.lib.isnullobj2d", __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_result.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF(__pyx_v_val); __Pyx_XDECREF((PyObject *)__pyx_v_result); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/lib.pyx":251 * @cython.wraparound(False) * @cython.boundscheck(False) * def isnullobj_old(ndarray[object] arr): # <<<<<<<<<<<<<< * cdef Py_ssize_t i, n * cdef object val */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_3lib_25isnullobj_old(PyObject *__pyx_self, PyObject *__pyx_v_arr); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_3lib_25isnullobj_old = {__Pyx_NAMESTR("isnullobj_old"), (PyCFunction)__pyx_pw_6pandas_3lib_25isnullobj_old, METH_O, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_3lib_25isnullobj_old(PyObject *__pyx_self, PyObject *__pyx_v_arr) { CYTHON_UNUSED int __pyx_lineno = 0; CYTHON_UNUSED const char *__pyx_filename = NULL; CYTHON_UNUSED int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("isnullobj_old (wrapper)", 0); if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_arr), __pyx_ptype_5numpy_ndarray, 1, "arr", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 251; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_3lib_24isnullobj_old(__pyx_self, ((PyArrayObject *)__pyx_v_arr)); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_3lib_24isnullobj_old(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_arr) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_n; PyArrayObject *__pyx_v_result = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_arr; __Pyx_Buffer __pyx_pybuffer_arr; __Pyx_LocalBuf_ND __pyx_pybuffernd_result; __Pyx_Buffer __pyx_pybuffer_result; 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("isnullobj_old", 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_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_filename = __pyx_f[2]; __pyx_lineno = 251; __pyx_clineno = __LINE__; goto __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/lib.pyx":256 * cdef ndarray[uint8_t] result * * n = len(arr) # <<<<<<<<<<<<<< * result = np.zeros(n, dtype=np.uint8) * for i from 0 <= i < n: */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_arr)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 256; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/lib.pyx":257 * * n = len(arr) * result = np.zeros(n, dtype=np.uint8) # <<<<<<<<<<<<<< * for i from 0 <= i < n: * result[i] = util._checknull_old(arr[i]) */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 257; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_zeros); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 257; __pyx_clineno = __LINE__; goto __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_n); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 257; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 257; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 257; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 257; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_uint8); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 257; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 257; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyObject_Call(__pyx_t_3, __pyx_t_4, __pyx_t_2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 257; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 257; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_7 = ((PyArrayObject *)__pyx_t_6); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_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_result.rcbuffer->pybuffer, (PyObject*)__pyx_v_result, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_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_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_8 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 257; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_7 = 0; __pyx_v_result = ((PyArrayObject *)__pyx_t_6); __pyx_t_6 = 0; /* "pandas/lib.pyx":258 * n = len(arr) * result = np.zeros(n, dtype=np.uint8) * for i from 0 <= i < n: # <<<<<<<<<<<<<< * result[i] = util._checknull_old(arr[i]) * return result.view(np.bool_) */ __pyx_t_1 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_1; __pyx_v_i++) { /* "pandas/lib.pyx":259 * result = np.zeros(n, dtype=np.uint8) * for i from 0 <= i < n: * result[i] = util._checknull_old(arr[i]) # <<<<<<<<<<<<<< * return result.view(np.bool_) * */ __pyx_t_12 = __pyx_v_i; __pyx_t_6 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_arr.rcbuffer->pybuffer.buf, __pyx_t_12, __pyx_pybuffernd_arr.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_6); __pyx_t_13 = __pyx_v_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_result.diminfo[0].strides) = __pyx_f_4util__checknull_old(__pyx_t_6); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } /* "pandas/lib.pyx":260 * for i from 0 <= i < n: * result[i] = util._checknull_old(arr[i]) * return result.view(np.bool_) # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_result), __pyx_n_s_view); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 260; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 260; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_bool); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 260; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 260; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyObject_Call(__pyx_t_6, __pyx_t_2, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 260; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; /* "pandas/lib.pyx":251 * @cython.wraparound(False) * @cython.boundscheck(False) * def isnullobj_old(ndarray[object] arr): # <<<<<<<<<<<<<< * cdef Py_ssize_t i, n * cdef object val */ /* 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_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_arr.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.lib.isnullobj_old", __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_result.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_result); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/lib.pyx":265 * @cython.wraparound(False) * @cython.boundscheck(False) * def isnullobj2d_old(ndarray[object, ndim=2] arr): # <<<<<<<<<<<<<< * cdef Py_ssize_t i, j, n, m * cdef object val */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_3lib_27isnullobj2d_old(PyObject *__pyx_self, PyObject *__pyx_v_arr); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_3lib_27isnullobj2d_old = {__Pyx_NAMESTR("isnullobj2d_old"), (PyCFunction)__pyx_pw_6pandas_3lib_27isnullobj2d_old, METH_O, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_3lib_27isnullobj2d_old(PyObject *__pyx_self, PyObject *__pyx_v_arr) { CYTHON_UNUSED int __pyx_lineno = 0; CYTHON_UNUSED const char *__pyx_filename = NULL; CYTHON_UNUSED int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("isnullobj2d_old (wrapper)", 0); if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_arr), __pyx_ptype_5numpy_ndarray, 1, "arr", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 265; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_3lib_26isnullobj2d_old(__pyx_self, ((PyArrayObject *)__pyx_v_arr)); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_3lib_26isnullobj2d_old(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_arr) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_n; Py_ssize_t __pyx_v_m; PyObject *__pyx_v_val = 0; PyArrayObject *__pyx_v_result = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_arr; __Pyx_Buffer __pyx_pybuffer_arr; __Pyx_LocalBuf_ND __pyx_pybuffernd_result; __Pyx_Buffer __pyx_pybuffer_result; 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 *); Py_ssize_t __pyx_t_6; Py_ssize_t __pyx_t_7; 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; Py_ssize_t __pyx_t_15; int __pyx_t_16; Py_ssize_t __pyx_t_17; Py_ssize_t __pyx_t_18; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("isnullobj2d_old", 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_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, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 265; __pyx_clineno = __LINE__; goto __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]; __pyx_pybuffernd_arr.diminfo[1].strides = __pyx_pybuffernd_arr.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_arr.diminfo[1].shape = __pyx_pybuffernd_arr.rcbuffer->pybuffer.shape[1]; /* "pandas/lib.pyx":270 * cdef ndarray[uint8_t, ndim=2] result * * n, m = ( arr).shape # <<<<<<<<<<<<<< * result = np.zeros((n, m), dtype=np.uint8) * for i from 0 <= i < n: */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_arr), __pyx_n_s_shape); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 270; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) { PyObject* sequence = __pyx_t_1; #if CYTHON_COMPILING_IN_CPYTHON Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 270; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1); } else { __pyx_t_2 = PyList_GET_ITEM(sequence, 0); __pyx_t_3 = PyList_GET_ITEM(sequence, 1); } __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); #else __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 270; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 270; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } else { Py_ssize_t index = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 270; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_5 = Py_TYPE(__pyx_t_4)->tp_iternext; index = 0; __pyx_t_2 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_2)) goto __pyx_L3_unpacking_failed; __Pyx_GOTREF(__pyx_t_2); index = 1; __pyx_t_3 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_3)) goto __pyx_L3_unpacking_failed; __Pyx_GOTREF(__pyx_t_3); if (__Pyx_IternextUnpackEndCheck(__pyx_t_5(__pyx_t_4), 2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 270; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 270; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_L4_unpacking_done:; } __pyx_t_6 = __Pyx_PyIndex_AsSsize_t(__pyx_t_2); if (unlikely((__pyx_t_6 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 270; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_7 = __Pyx_PyIndex_AsSsize_t(__pyx_t_3); if (unlikely((__pyx_t_7 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 270; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_n = __pyx_t_6; __pyx_v_m = __pyx_t_7; /* "pandas/lib.pyx":271 * * n, m = ( arr).shape * result = np.zeros((n, m), dtype=np.uint8) # <<<<<<<<<<<<<< * for i from 0 <= i < n: * for j from 0 <= j < m: */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 271; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_zeros); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 271; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_n); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 271; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_m); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 271; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 271; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_1 = 0; __pyx_t_2 = 0; __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 271; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyDict_New(); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 271; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 271; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_uint8); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 271; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_dtype, __pyx_t_8) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 271; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_8 = PyObject_Call(__pyx_t_3, __pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 271; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (!(likely(((__pyx_t_8) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_8, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 271; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_9 = ((PyArrayObject *)__pyx_t_8); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __pyx_t_10 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_t_9, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_result.rcbuffer->pybuffer, (PyObject*)__pyx_v_result, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_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]; __pyx_pybuffernd_result.diminfo[1].strides = __pyx_pybuffernd_result.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_result.diminfo[1].shape = __pyx_pybuffernd_result.rcbuffer->pybuffer.shape[1]; if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 271; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_9 = 0; __pyx_v_result = ((PyArrayObject *)__pyx_t_8); __pyx_t_8 = 0; /* "pandas/lib.pyx":272 * n, m = ( arr).shape * result = np.zeros((n, m), dtype=np.uint8) * for i from 0 <= i < n: # <<<<<<<<<<<<<< * for j from 0 <= j < m: * val = arr[i, j] */ __pyx_t_7 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_7; __pyx_v_i++) { /* "pandas/lib.pyx":273 * result = np.zeros((n, m), dtype=np.uint8) * for i from 0 <= i < n: * for j from 0 <= j < m: # <<<<<<<<<<<<<< * val = arr[i, j] * if checknull_old(val): */ __pyx_t_6 = __pyx_v_m; for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_6; __pyx_v_j++) { /* "pandas/lib.pyx":274 * for i from 0 <= i < n: * for j from 0 <= j < m: * val = arr[i, j] # <<<<<<<<<<<<<< * if checknull_old(val): * result[i, j] = 1 */ __pyx_t_14 = __pyx_v_i; __pyx_t_15 = __pyx_v_j; __pyx_t_8 = (PyObject *) *__Pyx_BufPtrStrided2d(PyObject **, __pyx_pybuffernd_arr.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_arr.diminfo[0].strides, __pyx_t_15, __pyx_pybuffernd_arr.diminfo[1].strides); __Pyx_INCREF((PyObject*)__pyx_t_8); __Pyx_XDECREF_SET(__pyx_v_val, __pyx_t_8); __pyx_t_8 = 0; /* "pandas/lib.pyx":275 * for j from 0 <= j < m: * val = arr[i, j] * if checknull_old(val): # <<<<<<<<<<<<<< * result[i, j] = 1 * return result.view(np.bool_) */ __pyx_t_8 = __pyx_f_6pandas_3lib_checknull_old(__pyx_v_val, 0); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 275; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_16 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_16 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 275; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (__pyx_t_16) { /* "pandas/lib.pyx":276 * val = arr[i, j] * if checknull_old(val): * result[i, j] = 1 # <<<<<<<<<<<<<< * return result.view(np.bool_) * */ __pyx_t_17 = __pyx_v_i; __pyx_t_18 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_result.diminfo[0].strides, __pyx_t_18, __pyx_pybuffernd_result.diminfo[1].strides) = 1; goto __pyx_L9; } __pyx_L9:; } } /* "pandas/lib.pyx":277 * if checknull_old(val): * result[i, j] = 1 * return result.view(np.bool_) # <<<<<<<<<<<<<< * * def list_to_object_array(list obj): */ __Pyx_XDECREF(__pyx_r); __pyx_t_8 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_result), __pyx_n_s_view); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 277; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 277; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_bool); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 277; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 277; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_Call(__pyx_t_8, __pyx_t_4, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 277; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "pandas/lib.pyx":265 * @cython.wraparound(False) * @cython.boundscheck(False) * def isnullobj2d_old(ndarray[object, ndim=2] arr): # <<<<<<<<<<<<<< * cdef Py_ssize_t i, j, n, m * cdef object val */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_8); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_arr.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.lib.isnullobj2d_old", __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_result.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF(__pyx_v_val); __Pyx_XDECREF((PyObject *)__pyx_v_result); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/lib.pyx":279 * return result.view(np.bool_) * * def list_to_object_array(list obj): # <<<<<<<<<<<<<< * ''' * Convert list to object ndarray. Seriously can't believe I had to write this */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_3lib_29list_to_object_array(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/ static char __pyx_doc_6pandas_3lib_28list_to_object_array[] = "\n Convert list to object ndarray. Seriously can't believe I had to write this\n function\n "; static PyMethodDef __pyx_mdef_6pandas_3lib_29list_to_object_array = {__Pyx_NAMESTR("list_to_object_array"), (PyCFunction)__pyx_pw_6pandas_3lib_29list_to_object_array, METH_O, __Pyx_DOCSTR(__pyx_doc_6pandas_3lib_28list_to_object_array)}; static PyObject *__pyx_pw_6pandas_3lib_29list_to_object_array(PyObject *__pyx_self, PyObject *__pyx_v_obj) { CYTHON_UNUSED int __pyx_lineno = 0; CYTHON_UNUSED const char *__pyx_filename = NULL; CYTHON_UNUSED int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("list_to_object_array (wrapper)", 0); if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_obj), (&PyList_Type), 1, "obj", 1))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 279; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_3lib_28list_to_object_array(__pyx_self, ((PyObject*)__pyx_v_obj)); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_3lib_28list_to_object_array(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_n; PyArrayObject *__pyx_v_arr = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_arr; __Pyx_Buffer __pyx_pybuffer_arr; 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; PyArrayObject *__pyx_t_6 = NULL; 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; PyObject **__pyx_t_12; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("list_to_object_array", 0); __pyx_pybuffer_arr.pybuffer.buf = NULL; __pyx_pybuffer_arr.refcount = 0; __pyx_pybuffernd_arr.data = NULL; __pyx_pybuffernd_arr.rcbuffer = &__pyx_pybuffer_arr; /* "pandas/lib.pyx":288 * ndarray[object] arr * * n = len(obj) # <<<<<<<<<<<<<< * arr = np.empty(n, dtype=object) * */ if (unlikely(__pyx_v_obj == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 288; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_1 = PyList_GET_SIZE(__pyx_v_obj); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 288; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/lib.pyx":289 * * n = len(obj) * arr = np.empty(n, dtype=object) # <<<<<<<<<<<<<< * * for i from 0 <= i < n: */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 289; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 289; __pyx_clineno = __LINE__; goto __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_n); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 289; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 289; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 289; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_dtype, __pyx_builtin_object) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 289; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_5 = PyObject_Call(__pyx_t_3, __pyx_t_4, __pyx_t_2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 289; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 289; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_6 = ((PyArrayObject *)__pyx_t_5); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_arr.rcbuffer->pybuffer); __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_arr.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_object, 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_arr.rcbuffer->pybuffer, (PyObject*)__pyx_v_arr, &__Pyx_TypeInfo_object, 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_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]; if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 289; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_6 = 0; __pyx_v_arr = ((PyArrayObject *)__pyx_t_5); __pyx_t_5 = 0; /* "pandas/lib.pyx":291 * arr = np.empty(n, dtype=object) * * for i from 0 <= i < n: # <<<<<<<<<<<<<< * arr[i] = obj[i] * */ __pyx_t_1 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_1; __pyx_v_i++) { /* "pandas/lib.pyx":292 * * for i from 0 <= i < n: * arr[i] = obj[i] # <<<<<<<<<<<<<< * * return arr */ if (unlikely(__pyx_v_obj == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 292; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_5 = __Pyx_GetItemInt_List(__pyx_v_obj, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1); if (unlikely(__pyx_t_5 == NULL)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 292; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_5); __pyx_t_11 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_11 < 0) { __pyx_t_11 += __pyx_pybuffernd_arr.diminfo[0].shape; if (unlikely(__pyx_t_11 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_11 >= __pyx_pybuffernd_arr.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 292; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_12 = __Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_arr.rcbuffer->pybuffer.buf, __pyx_t_11, __pyx_pybuffernd_arr.diminfo[0].strides); __Pyx_GOTREF(*__pyx_t_12); __Pyx_INCREF(__pyx_t_5); __Pyx_DECREF(*__pyx_t_12); *__pyx_t_12 = __pyx_t_5; __Pyx_GIVEREF(*__pyx_t_12); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } /* "pandas/lib.pyx":294 * arr[i] = obj[i] * * return arr # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_arr)); __pyx_r = ((PyObject *)__pyx_v_arr); goto __pyx_L0; /* "pandas/lib.pyx":279 * return result.view(np.bool_) * * def list_to_object_array(list obj): # <<<<<<<<<<<<<< * ''' * Convert list to object ndarray. Seriously can't believe I had to write this */ /* 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); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_arr.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.lib.list_to_object_array", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_arr.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_arr); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/lib.pyx":299 * @cython.wraparound(False) * @cython.boundscheck(False) * def fast_unique(ndarray[object] values): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = len(values) */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_3lib_31fast_unique(PyObject *__pyx_self, PyObject *__pyx_v_values); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_3lib_31fast_unique = {__Pyx_NAMESTR("fast_unique"), (PyCFunction)__pyx_pw_6pandas_3lib_31fast_unique, METH_O, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_3lib_31fast_unique(PyObject *__pyx_self, PyObject *__pyx_v_values) { CYTHON_UNUSED int __pyx_lineno = 0; CYTHON_UNUSED const char *__pyx_filename = NULL; CYTHON_UNUSED int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("fast_unique (wrapper)", 0); if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 299; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_3lib_30fast_unique(__pyx_self, ((PyArrayObject *)__pyx_v_values)); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_3lib_30fast_unique(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_n; PyObject *__pyx_v_uniques = 0; PyObject *__pyx_v_table = 0; PyObject *__pyx_v_val = 0; PyObject *__pyx_v_stub = 0; __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; Py_ssize_t __pyx_t_3; int __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; int __pyx_t_10; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("fast_unique", 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_object, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 299; __pyx_clineno = __LINE__; goto __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/lib.pyx":301 * def fast_unique(ndarray[object] values): * cdef: * Py_ssize_t i, n = len(values) # <<<<<<<<<<<<<< * list uniques = [] * dict table = {} */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 301; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/lib.pyx":302 * cdef: * Py_ssize_t i, n = len(values) * list uniques = [] # <<<<<<<<<<<<<< * dict table = {} * object val, stub = 0 */ __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 302; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_v_uniques = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; /* "pandas/lib.pyx":303 * Py_ssize_t i, n = len(values) * list uniques = [] * dict table = {} # <<<<<<<<<<<<<< * object val, stub = 0 * */ __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 303; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_v_table = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; /* "pandas/lib.pyx":304 * list uniques = [] * dict table = {} * object val, stub = 0 # <<<<<<<<<<<<<< * * for i from 0 <= i < n: */ __Pyx_INCREF(__pyx_int_0); __pyx_v_stub = __pyx_int_0; /* "pandas/lib.pyx":306 * object val, stub = 0 * * for i from 0 <= i < n: # <<<<<<<<<<<<<< * val = values[i] * if val not in table: */ __pyx_t_1 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_1; __pyx_v_i++) { /* "pandas/lib.pyx":307 * * for i from 0 <= i < n: * val = values[i] # <<<<<<<<<<<<<< * if val not in table: * table[val] = stub */ __pyx_t_3 = __pyx_v_i; __pyx_t_2 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_3, __pyx_pybuffernd_values.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_2); __Pyx_XDECREF_SET(__pyx_v_val, __pyx_t_2); __pyx_t_2 = 0; /* "pandas/lib.pyx":308 * for i from 0 <= i < n: * val = values[i] * if val not in table: # <<<<<<<<<<<<<< * table[val] = stub * uniques.append(val) */ __pyx_t_4 = (__Pyx_PyDict_Contains(__pyx_v_val, __pyx_v_table, Py_NE)); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 308; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_5 = (__pyx_t_4 != 0); if (__pyx_t_5) { /* "pandas/lib.pyx":309 * val = values[i] * if val not in table: * table[val] = stub # <<<<<<<<<<<<<< * uniques.append(val) * try: */ if (unlikely(PyDict_SetItem(__pyx_v_table, __pyx_v_val, __pyx_v_stub) < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 309; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/lib.pyx":310 * if val not in table: * table[val] = stub * uniques.append(val) # <<<<<<<<<<<<<< * try: * uniques.sort() */ __pyx_t_6 = __Pyx_PyList_Append(__pyx_v_uniques, __pyx_v_val); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 310; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L5; } __pyx_L5:; } /* "pandas/lib.pyx":311 * table[val] = stub * uniques.append(val) * try: # <<<<<<<<<<<<<< * uniques.sort() * except Exception: */ { __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9); __Pyx_XGOTREF(__pyx_t_7); __Pyx_XGOTREF(__pyx_t_8); __Pyx_XGOTREF(__pyx_t_9); /*try:*/ { /* "pandas/lib.pyx":312 * uniques.append(val) * try: * uniques.sort() # <<<<<<<<<<<<<< * except Exception: * pass */ __pyx_t_6 = PyList_Sort(__pyx_v_uniques); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 312; __pyx_clineno = __LINE__; goto __pyx_L6_error;} } __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; goto __pyx_L13_try_end; __pyx_L6_error:; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/lib.pyx":313 * try: * uniques.sort() * except Exception: # <<<<<<<<<<<<<< * pass * */ __pyx_t_10 = PyErr_ExceptionMatches(__pyx_builtin_Exception); if (__pyx_t_10) { PyErr_Restore(0,0,0); goto __pyx_L7_exception_handled; } goto __pyx_L8_except_error; __pyx_L8_except_error:; __Pyx_XGIVEREF(__pyx_t_7); __Pyx_XGIVEREF(__pyx_t_8); __Pyx_XGIVEREF(__pyx_t_9); __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9); goto __pyx_L1_error; __pyx_L7_exception_handled:; __Pyx_XGIVEREF(__pyx_t_7); __Pyx_XGIVEREF(__pyx_t_8); __Pyx_XGIVEREF(__pyx_t_9); __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9); __pyx_L13_try_end:; } /* "pandas/lib.pyx":316 * pass * * return uniques # <<<<<<<<<<<<<< * * @cython.wraparound(False) */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_uniques); __pyx_r = __pyx_v_uniques; goto __pyx_L0; /* "pandas/lib.pyx":299 * @cython.wraparound(False) * @cython.boundscheck(False) * def fast_unique(ndarray[object] values): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = len(values) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __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.lib.fast_unique", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF(__pyx_v_uniques); __Pyx_XDECREF(__pyx_v_table); __Pyx_XDECREF(__pyx_v_val); __Pyx_XDECREF(__pyx_v_stub); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/lib.pyx":320 * @cython.wraparound(False) * @cython.boundscheck(False) * def fast_unique_multiple(list arrays): # <<<<<<<<<<<<<< * cdef: * ndarray[object] buf */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_3lib_33fast_unique_multiple(PyObject *__pyx_self, PyObject *__pyx_v_arrays); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_3lib_33fast_unique_multiple = {__Pyx_NAMESTR("fast_unique_multiple"), (PyCFunction)__pyx_pw_6pandas_3lib_33fast_unique_multiple, METH_O, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_3lib_33fast_unique_multiple(PyObject *__pyx_self, PyObject *__pyx_v_arrays) { CYTHON_UNUSED int __pyx_lineno = 0; CYTHON_UNUSED const char *__pyx_filename = NULL; CYTHON_UNUSED int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("fast_unique_multiple (wrapper)", 0); if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_arrays), (&PyList_Type), 1, "arrays", 1))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 320; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_3lib_32fast_unique_multiple(__pyx_self, ((PyObject*)__pyx_v_arrays)); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_3lib_32fast_unique_multiple(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_arrays) { PyArrayObject *__pyx_v_buf = 0; Py_ssize_t __pyx_v_k; Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_n; PyObject *__pyx_v_uniques = 0; PyObject *__pyx_v_table = 0; PyObject *__pyx_v_val = 0; PyObject *__pyx_v_stub = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_buf; __Pyx_Buffer __pyx_pybuffer_buf; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __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; Py_ssize_t __pyx_t_7; Py_ssize_t __pyx_t_8; int __pyx_t_9; int __pyx_t_10; int __pyx_t_11; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("fast_unique_multiple", 0); __pyx_pybuffer_buf.pybuffer.buf = NULL; __pyx_pybuffer_buf.refcount = 0; __pyx_pybuffernd_buf.data = NULL; __pyx_pybuffernd_buf.rcbuffer = &__pyx_pybuffer_buf; /* "pandas/lib.pyx":323 * cdef: * ndarray[object] buf * Py_ssize_t k = len(arrays) # <<<<<<<<<<<<<< * Py_ssize_t i, j, n * list uniques = [] */ if (unlikely(__pyx_v_arrays == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 323; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_1 = PyList_GET_SIZE(__pyx_v_arrays); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 323; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_k = __pyx_t_1; /* "pandas/lib.pyx":325 * Py_ssize_t k = len(arrays) * Py_ssize_t i, j, n * list uniques = [] # <<<<<<<<<<<<<< * dict table = {} * object val, stub = 0 */ __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 325; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_v_uniques = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; /* "pandas/lib.pyx":326 * Py_ssize_t i, j, n * list uniques = [] * dict table = {} # <<<<<<<<<<<<<< * object val, stub = 0 * */ __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 326; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_v_table = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; /* "pandas/lib.pyx":327 * list uniques = [] * dict table = {} * object val, stub = 0 # <<<<<<<<<<<<<< * * for i from 0 <= i < k: */ __Pyx_INCREF(__pyx_int_0); __pyx_v_stub = __pyx_int_0; /* "pandas/lib.pyx":329 * object val, stub = 0 * * for i from 0 <= i < k: # <<<<<<<<<<<<<< * buf = arrays[i] * n = len(buf) */ __pyx_t_1 = __pyx_v_k; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_1; __pyx_v_i++) { /* "pandas/lib.pyx":330 * * for i from 0 <= i < k: * buf = arrays[i] # <<<<<<<<<<<<<< * n = len(buf) * for j from 0 <= j < n: */ if (unlikely(__pyx_v_arrays == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 330; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } if (!(likely(((PyList_GET_ITEM(__pyx_v_arrays, __pyx_v_i)) == Py_None) || likely(__Pyx_TypeTest(PyList_GET_ITEM(__pyx_v_arrays, __pyx_v_i), __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 330; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_2 = PyList_GET_ITEM(__pyx_v_arrays, __pyx_v_i); __Pyx_INCREF(__pyx_t_2); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_buf.rcbuffer->pybuffer); __pyx_t_3 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_buf.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_2), &__Pyx_TypeInfo_object, 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_buf.rcbuffer->pybuffer, (PyObject*)__pyx_v_buf, &__Pyx_TypeInfo_object, 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_pybuffernd_buf.diminfo[0].strides = __pyx_pybuffernd_buf.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_buf.diminfo[0].shape = __pyx_pybuffernd_buf.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 330; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __Pyx_XDECREF_SET(__pyx_v_buf, ((PyArrayObject *)__pyx_t_2)); __pyx_t_2 = 0; /* "pandas/lib.pyx":331 * for i from 0 <= i < k: * buf = arrays[i] * n = len(buf) # <<<<<<<<<<<<<< * for j from 0 <= j < n: * val = buf[j] */ __pyx_t_7 = PyObject_Length(((PyObject *)__pyx_v_buf)); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 331; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_7; /* "pandas/lib.pyx":332 * buf = arrays[i] * n = len(buf) * for j from 0 <= j < n: # <<<<<<<<<<<<<< * val = buf[j] * if val not in table: */ __pyx_t_7 = __pyx_v_n; for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_7; __pyx_v_j++) { /* "pandas/lib.pyx":333 * n = len(buf) * for j from 0 <= j < n: * val = buf[j] # <<<<<<<<<<<<<< * if val not in table: * table[val] = stub */ __pyx_t_8 = __pyx_v_j; __pyx_t_2 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_buf.rcbuffer->pybuffer.buf, __pyx_t_8, __pyx_pybuffernd_buf.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_2); __Pyx_XDECREF_SET(__pyx_v_val, __pyx_t_2); __pyx_t_2 = 0; /* "pandas/lib.pyx":334 * for j from 0 <= j < n: * val = buf[j] * if val not in table: # <<<<<<<<<<<<<< * table[val] = stub * uniques.append(val) */ __pyx_t_9 = (__Pyx_PyDict_Contains(__pyx_v_val, __pyx_v_table, Py_NE)); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 334; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_10 = (__pyx_t_9 != 0); if (__pyx_t_10) { /* "pandas/lib.pyx":335 * val = buf[j] * if val not in table: * table[val] = stub # <<<<<<<<<<<<<< * uniques.append(val) * try: */ if (unlikely(PyDict_SetItem(__pyx_v_table, __pyx_v_val, __pyx_v_stub) < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 335; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/lib.pyx":336 * if val not in table: * table[val] = stub * uniques.append(val) # <<<<<<<<<<<<<< * try: * uniques.sort() */ __pyx_t_11 = __Pyx_PyList_Append(__pyx_v_uniques, __pyx_v_val); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 336; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L7; } __pyx_L7:; } } /* "pandas/lib.pyx":337 * table[val] = stub * uniques.append(val) * try: # <<<<<<<<<<<<<< * uniques.sort() * except Exception: */ { __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_5, &__pyx_t_4); __Pyx_XGOTREF(__pyx_t_6); __Pyx_XGOTREF(__pyx_t_5); __Pyx_XGOTREF(__pyx_t_4); /*try:*/ { /* "pandas/lib.pyx":338 * uniques.append(val) * try: * uniques.sort() # <<<<<<<<<<<<<< * except Exception: * pass */ __pyx_t_11 = PyList_Sort(__pyx_v_uniques); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 338; __pyx_clineno = __LINE__; goto __pyx_L8_error;} } __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; goto __pyx_L15_try_end; __pyx_L8_error:; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/lib.pyx":339 * try: * uniques.sort() * except Exception: # <<<<<<<<<<<<<< * pass * */ __pyx_t_3 = PyErr_ExceptionMatches(__pyx_builtin_Exception); if (__pyx_t_3) { PyErr_Restore(0,0,0); goto __pyx_L9_exception_handled; } goto __pyx_L10_except_error; __pyx_L10_except_error:; __Pyx_XGIVEREF(__pyx_t_6); __Pyx_XGIVEREF(__pyx_t_5); __Pyx_XGIVEREF(__pyx_t_4); __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_5, __pyx_t_4); goto __pyx_L1_error; __pyx_L9_exception_handled:; __Pyx_XGIVEREF(__pyx_t_6); __Pyx_XGIVEREF(__pyx_t_5); __Pyx_XGIVEREF(__pyx_t_4); __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_5, __pyx_t_4); __pyx_L15_try_end:; } /* "pandas/lib.pyx":342 * pass * * return uniques # <<<<<<<<<<<<<< * * @cython.wraparound(False) */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_uniques); __pyx_r = __pyx_v_uniques; goto __pyx_L0; /* "pandas/lib.pyx":320 * @cython.wraparound(False) * @cython.boundscheck(False) * def fast_unique_multiple(list arrays): # <<<<<<<<<<<<<< * cdef: * ndarray[object] buf */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_buf.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.lib.fast_unique_multiple", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_buf.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_buf); __Pyx_XDECREF(__pyx_v_uniques); __Pyx_XDECREF(__pyx_v_table); __Pyx_XDECREF(__pyx_v_val); __Pyx_XDECREF(__pyx_v_stub); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/lib.pyx":346 * @cython.wraparound(False) * @cython.boundscheck(False) * def fast_unique_multiple_list(list lists): # <<<<<<<<<<<<<< * cdef: * list buf */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_3lib_35fast_unique_multiple_list(PyObject *__pyx_self, PyObject *__pyx_v_lists); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_3lib_35fast_unique_multiple_list = {__Pyx_NAMESTR("fast_unique_multiple_list"), (PyCFunction)__pyx_pw_6pandas_3lib_35fast_unique_multiple_list, METH_O, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_3lib_35fast_unique_multiple_list(PyObject *__pyx_self, PyObject *__pyx_v_lists) { CYTHON_UNUSED int __pyx_lineno = 0; CYTHON_UNUSED const char *__pyx_filename = NULL; CYTHON_UNUSED int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("fast_unique_multiple_list (wrapper)", 0); if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_lists), (&PyList_Type), 1, "lists", 1))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 346; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_3lib_34fast_unique_multiple_list(__pyx_self, ((PyObject*)__pyx_v_lists)); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_3lib_34fast_unique_multiple_list(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_lists) { PyObject *__pyx_v_buf = 0; Py_ssize_t __pyx_v_k; Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_n; PyObject *__pyx_v_uniques = 0; PyObject *__pyx_v_table = 0; PyObject *__pyx_v_val = 0; PyObject *__pyx_v_stub = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; PyObject *__pyx_t_2 = NULL; Py_ssize_t __pyx_t_3; int __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; int __pyx_t_10; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("fast_unique_multiple_list", 0); /* "pandas/lib.pyx":349 * cdef: * list buf * Py_ssize_t k = len(lists) # <<<<<<<<<<<<<< * Py_ssize_t i, j, n * list uniques = [] */ if (unlikely(__pyx_v_lists == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 349; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_1 = PyList_GET_SIZE(__pyx_v_lists); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 349; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_k = __pyx_t_1; /* "pandas/lib.pyx":351 * Py_ssize_t k = len(lists) * Py_ssize_t i, j, n * list uniques = [] # <<<<<<<<<<<<<< * dict table = {} * object val, stub = 0 */ __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 351; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_v_uniques = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; /* "pandas/lib.pyx":352 * Py_ssize_t i, j, n * list uniques = [] * dict table = {} # <<<<<<<<<<<<<< * object val, stub = 0 * */ __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 352; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_v_table = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; /* "pandas/lib.pyx":353 * list uniques = [] * dict table = {} * object val, stub = 0 # <<<<<<<<<<<<<< * * for i from 0 <= i < k: */ __Pyx_INCREF(__pyx_int_0); __pyx_v_stub = __pyx_int_0; /* "pandas/lib.pyx":355 * object val, stub = 0 * * for i from 0 <= i < k: # <<<<<<<<<<<<<< * buf = lists[i] * n = len(buf) */ __pyx_t_1 = __pyx_v_k; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_1; __pyx_v_i++) { /* "pandas/lib.pyx":356 * * for i from 0 <= i < k: * buf = lists[i] # <<<<<<<<<<<<<< * n = len(buf) * for j from 0 <= j < n: */ if (unlikely(__pyx_v_lists == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 356; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } if (!(likely(PyList_CheckExact(PyList_GET_ITEM(__pyx_v_lists, __pyx_v_i)))||((PyList_GET_ITEM(__pyx_v_lists, __pyx_v_i)) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(PyList_GET_ITEM(__pyx_v_lists, __pyx_v_i))->tp_name), 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 356; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_2 = PyList_GET_ITEM(__pyx_v_lists, __pyx_v_i); __Pyx_INCREF(__pyx_t_2); __Pyx_XDECREF_SET(__pyx_v_buf, ((PyObject*)__pyx_t_2)); __pyx_t_2 = 0; /* "pandas/lib.pyx":357 * for i from 0 <= i < k: * buf = lists[i] * n = len(buf) # <<<<<<<<<<<<<< * for j from 0 <= j < n: * val = buf[j] */ if (unlikely(__pyx_v_buf == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 357; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_3 = PyList_GET_SIZE(__pyx_v_buf); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 357; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_3; /* "pandas/lib.pyx":358 * buf = lists[i] * n = len(buf) * for j from 0 <= j < n: # <<<<<<<<<<<<<< * val = buf[j] * if val not in table: */ __pyx_t_3 = __pyx_v_n; for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_3; __pyx_v_j++) { /* "pandas/lib.pyx":359 * n = len(buf) * for j from 0 <= j < n: * val = buf[j] # <<<<<<<<<<<<<< * if val not in table: * table[val] = stub */ if (unlikely(__pyx_v_buf == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 359; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_2 = PyList_GET_ITEM(__pyx_v_buf, __pyx_v_j); __Pyx_INCREF(__pyx_t_2); __Pyx_XDECREF_SET(__pyx_v_val, __pyx_t_2); __pyx_t_2 = 0; /* "pandas/lib.pyx":360 * for j from 0 <= j < n: * val = buf[j] * if val not in table: # <<<<<<<<<<<<<< * table[val] = stub * uniques.append(val) */ __pyx_t_4 = (__Pyx_PyDict_Contains(__pyx_v_val, __pyx_v_table, Py_NE)); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 360; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_5 = (__pyx_t_4 != 0); if (__pyx_t_5) { /* "pandas/lib.pyx":361 * val = buf[j] * if val not in table: * table[val] = stub # <<<<<<<<<<<<<< * uniques.append(val) * try: */ if (unlikely(PyDict_SetItem(__pyx_v_table, __pyx_v_val, __pyx_v_stub) < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 361; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/lib.pyx":362 * if val not in table: * table[val] = stub * uniques.append(val) # <<<<<<<<<<<<<< * try: * uniques.sort() */ __pyx_t_6 = __Pyx_PyList_Append(__pyx_v_uniques, __pyx_v_val); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 362; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L7; } __pyx_L7:; } } /* "pandas/lib.pyx":363 * table[val] = stub * uniques.append(val) * try: # <<<<<<<<<<<<<< * uniques.sort() * except Exception: */ { __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9); __Pyx_XGOTREF(__pyx_t_7); __Pyx_XGOTREF(__pyx_t_8); __Pyx_XGOTREF(__pyx_t_9); /*try:*/ { /* "pandas/lib.pyx":364 * uniques.append(val) * try: * uniques.sort() # <<<<<<<<<<<<<< * except Exception: * pass */ __pyx_t_6 = PyList_Sort(__pyx_v_uniques); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 364; __pyx_clineno = __LINE__; goto __pyx_L8_error;} } __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; goto __pyx_L15_try_end; __pyx_L8_error:; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/lib.pyx":365 * try: * uniques.sort() * except Exception: # <<<<<<<<<<<<<< * pass * */ __pyx_t_10 = PyErr_ExceptionMatches(__pyx_builtin_Exception); if (__pyx_t_10) { PyErr_Restore(0,0,0); goto __pyx_L9_exception_handled; } goto __pyx_L10_except_error; __pyx_L10_except_error:; __Pyx_XGIVEREF(__pyx_t_7); __Pyx_XGIVEREF(__pyx_t_8); __Pyx_XGIVEREF(__pyx_t_9); __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9); goto __pyx_L1_error; __pyx_L9_exception_handled:; __Pyx_XGIVEREF(__pyx_t_7); __Pyx_XGIVEREF(__pyx_t_8); __Pyx_XGIVEREF(__pyx_t_9); __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9); __pyx_L15_try_end:; } /* "pandas/lib.pyx":368 * pass * * return uniques # <<<<<<<<<<<<<< * * @cython.wraparound(False) */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_uniques); __pyx_r = __pyx_v_uniques; goto __pyx_L0; /* "pandas/lib.pyx":346 * @cython.wraparound(False) * @cython.boundscheck(False) * def fast_unique_multiple_list(list lists): # <<<<<<<<<<<<<< * cdef: * list buf */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("pandas.lib.fast_unique_multiple_list", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_buf); __Pyx_XDECREF(__pyx_v_uniques); __Pyx_XDECREF(__pyx_v_table); __Pyx_XDECREF(__pyx_v_val); __Pyx_XDECREF(__pyx_v_stub); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/lib.pyx":372 * @cython.wraparound(False) * @cython.boundscheck(False) * def fast_unique_multiple_list_gen(object gen): # <<<<<<<<<<<<<< * cdef: * list buf */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_3lib_37fast_unique_multiple_list_gen(PyObject *__pyx_self, PyObject *__pyx_v_gen); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_3lib_37fast_unique_multiple_list_gen = {__Pyx_NAMESTR("fast_unique_multiple_list_gen"), (PyCFunction)__pyx_pw_6pandas_3lib_37fast_unique_multiple_list_gen, METH_O, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_3lib_37fast_unique_multiple_list_gen(PyObject *__pyx_self, PyObject *__pyx_v_gen) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("fast_unique_multiple_list_gen (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_3lib_36fast_unique_multiple_list_gen(__pyx_self, ((PyObject *)__pyx_v_gen)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_3lib_36fast_unique_multiple_list_gen(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_gen) { PyObject *__pyx_v_buf = 0; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_n; PyObject *__pyx_v_uniques = 0; PyObject *__pyx_v_table = 0; PyObject *__pyx_v_val = 0; PyObject *__pyx_v_stub = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; Py_ssize_t __pyx_t_2; PyObject *(*__pyx_t_3)(PyObject *); PyObject *__pyx_t_4 = NULL; Py_ssize_t __pyx_t_5; int __pyx_t_6; int __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_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("fast_unique_multiple_list_gen", 0); /* "pandas/lib.pyx":376 * list buf * Py_ssize_t j, n * list uniques = [] # <<<<<<<<<<<<<< * dict table = {} * object val, stub = 0 */ __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 376; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_v_uniques = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/lib.pyx":377 * Py_ssize_t j, n * list uniques = [] * dict table = {} # <<<<<<<<<<<<<< * object val, stub = 0 * */ __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 377; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_v_table = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/lib.pyx":378 * list uniques = [] * dict table = {} * object val, stub = 0 # <<<<<<<<<<<<<< * * for buf in gen: */ __Pyx_INCREF(__pyx_int_0); __pyx_v_stub = __pyx_int_0; /* "pandas/lib.pyx":380 * object val, stub = 0 * * for buf in gen: # <<<<<<<<<<<<<< * n = len(buf) * for j from 0 <= j < n: */ if (PyList_CheckExact(__pyx_v_gen) || PyTuple_CheckExact(__pyx_v_gen)) { __pyx_t_1 = __pyx_v_gen; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0; __pyx_t_3 = NULL; } else { __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_gen); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 380; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = Py_TYPE(__pyx_t_1)->tp_iternext; } for (;;) { if (!__pyx_t_3 && PyList_CheckExact(__pyx_t_1)) { if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 380; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 380; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif } else if (!__pyx_t_3 && PyTuple_CheckExact(__pyx_t_1)) { if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 380; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 380; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif } else { __pyx_t_4 = __pyx_t_3(__pyx_t_1); if (unlikely(!__pyx_t_4)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); else {__pyx_filename = __pyx_f[2]; __pyx_lineno = 380; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } break; } __Pyx_GOTREF(__pyx_t_4); } if (!(likely(PyList_CheckExact(__pyx_t_4))||((__pyx_t_4) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_t_4)->tp_name), 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 380; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_XDECREF_SET(__pyx_v_buf, ((PyObject*)__pyx_t_4)); __pyx_t_4 = 0; /* "pandas/lib.pyx":381 * * for buf in gen: * n = len(buf) # <<<<<<<<<<<<<< * for j from 0 <= j < n: * val = buf[j] */ if (unlikely(__pyx_v_buf == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 381; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_5 = PyList_GET_SIZE(__pyx_v_buf); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 381; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_5; /* "pandas/lib.pyx":382 * for buf in gen: * n = len(buf) * for j from 0 <= j < n: # <<<<<<<<<<<<<< * val = buf[j] * if val not in table: */ __pyx_t_5 = __pyx_v_n; for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_5; __pyx_v_j++) { /* "pandas/lib.pyx":383 * n = len(buf) * for j from 0 <= j < n: * val = buf[j] # <<<<<<<<<<<<<< * if val not in table: * table[val] = stub */ if (unlikely(__pyx_v_buf == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 383; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_4 = PyList_GET_ITEM(__pyx_v_buf, __pyx_v_j); __Pyx_INCREF(__pyx_t_4); __Pyx_XDECREF_SET(__pyx_v_val, __pyx_t_4); __pyx_t_4 = 0; /* "pandas/lib.pyx":384 * for j from 0 <= j < n: * val = buf[j] * if val not in table: # <<<<<<<<<<<<<< * table[val] = stub * uniques.append(val) */ __pyx_t_6 = (__Pyx_PyDict_Contains(__pyx_v_val, __pyx_v_table, Py_NE)); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 384; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_7 = (__pyx_t_6 != 0); if (__pyx_t_7) { /* "pandas/lib.pyx":385 * val = buf[j] * if val not in table: * table[val] = stub # <<<<<<<<<<<<<< * uniques.append(val) * */ if (unlikely(PyDict_SetItem(__pyx_v_table, __pyx_v_val, __pyx_v_stub) < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 385; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/lib.pyx":386 * if val not in table: * table[val] = stub * uniques.append(val) # <<<<<<<<<<<<<< * * try: */ __pyx_t_8 = __Pyx_PyList_Append(__pyx_v_uniques, __pyx_v_val); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 386; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L7; } __pyx_L7:; } } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pandas/lib.pyx":388 * uniques.append(val) * * try: # <<<<<<<<<<<<<< * uniques.sort() * except Exception: */ { __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11); __Pyx_XGOTREF(__pyx_t_9); __Pyx_XGOTREF(__pyx_t_10); __Pyx_XGOTREF(__pyx_t_11); /*try:*/ { /* "pandas/lib.pyx":389 * * try: * uniques.sort() # <<<<<<<<<<<<<< * except Exception: * pass */ __pyx_t_8 = PyList_Sort(__pyx_v_uniques); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 389; __pyx_clineno = __LINE__; goto __pyx_L8_error;} } __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; goto __pyx_L15_try_end; __pyx_L8_error:; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pandas/lib.pyx":390 * try: * uniques.sort() * except Exception: # <<<<<<<<<<<<<< * pass * */ __pyx_t_12 = PyErr_ExceptionMatches(__pyx_builtin_Exception); if (__pyx_t_12) { PyErr_Restore(0,0,0); goto __pyx_L9_exception_handled; } goto __pyx_L10_except_error; __pyx_L10_except_error:; __Pyx_XGIVEREF(__pyx_t_9); __Pyx_XGIVEREF(__pyx_t_10); __Pyx_XGIVEREF(__pyx_t_11); __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_10, __pyx_t_11); goto __pyx_L1_error; __pyx_L9_exception_handled:; __Pyx_XGIVEREF(__pyx_t_9); __Pyx_XGIVEREF(__pyx_t_10); __Pyx_XGIVEREF(__pyx_t_11); __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_10, __pyx_t_11); __pyx_L15_try_end:; } /* "pandas/lib.pyx":393 * pass * * return uniques # <<<<<<<<<<<<<< * * @cython.wraparound(False) */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_uniques); __pyx_r = __pyx_v_uniques; goto __pyx_L0; /* "pandas/lib.pyx":372 * @cython.wraparound(False) * @cython.boundscheck(False) * def fast_unique_multiple_list_gen(object gen): # <<<<<<<<<<<<<< * cdef: * list buf */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("pandas.lib.fast_unique_multiple_list_gen", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_buf); __Pyx_XDECREF(__pyx_v_uniques); __Pyx_XDECREF(__pyx_v_table); __Pyx_XDECREF(__pyx_v_val); __Pyx_XDECREF(__pyx_v_stub); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/lib.pyx":397 * @cython.wraparound(False) * @cython.boundscheck(False) * def dicts_to_array(list dicts, list columns): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, j, k, n */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_3lib_39dicts_to_array(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_3lib_39dicts_to_array = {__Pyx_NAMESTR("dicts_to_array"), (PyCFunction)__pyx_pw_6pandas_3lib_39dicts_to_array, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_3lib_39dicts_to_array(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_dicts = 0; PyObject *__pyx_v_columns = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("dicts_to_array (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_dicts,&__pyx_n_s_columns,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_dicts)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_columns)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("dicts_to_array", 1, 2, 2, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 397; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "dicts_to_array") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 397; __pyx_clineno = __LINE__; goto __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_dicts = ((PyObject*)values[0]); __pyx_v_columns = ((PyObject*)values[1]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("dicts_to_array", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 397; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.lib.dicts_to_array", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dicts), (&PyList_Type), 1, "dicts", 1))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 397; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_columns), (&PyList_Type), 1, "columns", 1))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 397; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_3lib_38dicts_to_array(__pyx_self, __pyx_v_dicts, __pyx_v_columns); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_3lib_38dicts_to_array(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_dicts, PyObject *__pyx_v_columns) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_k; Py_ssize_t __pyx_v_n; PyArrayObject *__pyx_v_result = 0; PyObject *__pyx_v_row = 0; PyObject *__pyx_v_col = 0; PyObject *__pyx_v_onan = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_result; __Pyx_Buffer __pyx_pybuffer_result; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; Py_ssize_t __pyx_t_3; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyArrayObject *__pyx_t_6 = NULL; 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; int __pyx_t_14; int __pyx_t_15; Py_ssize_t __pyx_t_16; Py_ssize_t __pyx_t_17; PyObject **__pyx_t_18; Py_ssize_t __pyx_t_19; Py_ssize_t __pyx_t_20; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("dicts_to_array", 0); __pyx_pybuffer_result.pybuffer.buf = NULL; __pyx_pybuffer_result.refcount = 0; __pyx_pybuffernd_result.data = NULL; __pyx_pybuffernd_result.rcbuffer = &__pyx_pybuffer_result; /* "pandas/lib.pyx":402 * ndarray[object, ndim=2] result * dict row * object col, onan = np.nan # <<<<<<<<<<<<<< * * k = len(columns) */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 402; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_nan); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 402; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_onan = __pyx_t_2; __pyx_t_2 = 0; /* "pandas/lib.pyx":404 * object col, onan = np.nan * * k = len(columns) # <<<<<<<<<<<<<< * n = len(dicts) * */ if (unlikely(__pyx_v_columns == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 404; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_3 = PyList_GET_SIZE(__pyx_v_columns); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 404; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_k = __pyx_t_3; /* "pandas/lib.pyx":405 * * k = len(columns) * n = len(dicts) # <<<<<<<<<<<<<< * * result = np.empty((n, k), dtype='O') */ if (unlikely(__pyx_v_dicts == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 405; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_3 = PyList_GET_SIZE(__pyx_v_dicts); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 405; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_3; /* "pandas/lib.pyx":407 * n = len(dicts) * * result = np.empty((n, k), dtype='O') # <<<<<<<<<<<<<< * * for i in range(n): */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 407; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_empty); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 407; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_n); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 407; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = PyInt_FromSsize_t(__pyx_v_k); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 407; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 407; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_2 = 0; __pyx_t_4 = 0; __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 407; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyDict_New(); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 407; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_dtype, __pyx_n_s_O) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 407; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_2 = PyObject_Call(__pyx_t_1, __pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 407; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 407; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_6 = ((PyArrayObject *)__pyx_t_2); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_result.rcbuffer->pybuffer, (PyObject*)__pyx_v_result, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_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]; __pyx_pybuffernd_result.diminfo[1].strides = __pyx_pybuffernd_result.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_result.diminfo[1].shape = __pyx_pybuffernd_result.rcbuffer->pybuffer.shape[1]; if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 407; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_6 = 0; __pyx_v_result = ((PyArrayObject *)__pyx_t_2); __pyx_t_2 = 0; /* "pandas/lib.pyx":409 * result = np.empty((n, k), dtype='O') * * for i in range(n): # <<<<<<<<<<<<<< * row = dicts[i] * for j in range(k): */ __pyx_t_3 = __pyx_v_n; for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_3; __pyx_t_11+=1) { __pyx_v_i = __pyx_t_11; /* "pandas/lib.pyx":410 * * for i in range(n): * row = dicts[i] # <<<<<<<<<<<<<< * for j in range(k): * col = columns[j] */ if (unlikely(__pyx_v_dicts == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 410; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } if (!(likely(PyDict_CheckExact(PyList_GET_ITEM(__pyx_v_dicts, __pyx_v_i)))||((PyList_GET_ITEM(__pyx_v_dicts, __pyx_v_i)) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(PyList_GET_ITEM(__pyx_v_dicts, __pyx_v_i))->tp_name), 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 410; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_2 = PyList_GET_ITEM(__pyx_v_dicts, __pyx_v_i); __Pyx_INCREF(__pyx_t_2); __Pyx_XDECREF_SET(__pyx_v_row, ((PyObject*)__pyx_t_2)); __pyx_t_2 = 0; /* "pandas/lib.pyx":411 * for i in range(n): * row = dicts[i] * for j in range(k): # <<<<<<<<<<<<<< * col = columns[j] * if col in row: */ __pyx_t_12 = __pyx_v_k; for (__pyx_t_13 = 0; __pyx_t_13 < __pyx_t_12; __pyx_t_13+=1) { __pyx_v_j = __pyx_t_13; /* "pandas/lib.pyx":412 * row = dicts[i] * for j in range(k): * col = columns[j] # <<<<<<<<<<<<<< * if col in row: * result[i, j] = row[col] */ if (unlikely(__pyx_v_columns == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 412; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_2 = PyList_GET_ITEM(__pyx_v_columns, __pyx_v_j); __Pyx_INCREF(__pyx_t_2); __Pyx_XDECREF_SET(__pyx_v_col, __pyx_t_2); __pyx_t_2 = 0; /* "pandas/lib.pyx":413 * for j in range(k): * col = columns[j] * if col in row: # <<<<<<<<<<<<<< * result[i, j] = row[col] * else: */ if (unlikely(__pyx_v_row == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 413; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_14 = (__Pyx_PyDict_Contains(__pyx_v_col, __pyx_v_row, Py_EQ)); if (unlikely(__pyx_t_14 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 413; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_15 = (__pyx_t_14 != 0); if (__pyx_t_15) { /* "pandas/lib.pyx":414 * col = columns[j] * if col in row: * result[i, j] = row[col] # <<<<<<<<<<<<<< * else: * result[i, j] = onan */ if (unlikely(__pyx_v_row == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 414; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_2 = __Pyx_PyDict_GetItem(__pyx_v_row, __pyx_v_col); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 414; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_2); __pyx_t_16 = __pyx_v_i; __pyx_t_17 = __pyx_v_j; __pyx_t_18 = __Pyx_BufPtrStrided2d(PyObject **, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_result.diminfo[0].strides, __pyx_t_17, __pyx_pybuffernd_result.diminfo[1].strides); __Pyx_GOTREF(*__pyx_t_18); __Pyx_INCREF(__pyx_t_2); __Pyx_DECREF(*__pyx_t_18); *__pyx_t_18 = __pyx_t_2; __Pyx_GIVEREF(*__pyx_t_18); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; goto __pyx_L7; } /*else*/ { /* "pandas/lib.pyx":416 * result[i, j] = row[col] * else: * result[i, j] = onan # <<<<<<<<<<<<<< * * return result */ __pyx_t_19 = __pyx_v_i; __pyx_t_20 = __pyx_v_j; __pyx_t_18 = __Pyx_BufPtrStrided2d(PyObject **, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_result.diminfo[0].strides, __pyx_t_20, __pyx_pybuffernd_result.diminfo[1].strides); __Pyx_GOTREF(*__pyx_t_18); __Pyx_INCREF(__pyx_v_onan); __Pyx_DECREF(*__pyx_t_18); *__pyx_t_18 = __pyx_v_onan; __Pyx_GIVEREF(*__pyx_t_18); } __pyx_L7:; } } /* "pandas/lib.pyx":418 * result[i, j] = onan * * return result # <<<<<<<<<<<<<< * * def fast_zip(list ndarrays): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_result)); __pyx_r = ((PyObject *)__pyx_v_result); goto __pyx_L0; /* "pandas/lib.pyx":397 * @cython.wraparound(False) * @cython.boundscheck(False) * def dicts_to_array(list dicts, list columns): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, j, k, n */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.lib.dicts_to_array", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_result); __Pyx_XDECREF(__pyx_v_row); __Pyx_XDECREF(__pyx_v_col); __Pyx_XDECREF(__pyx_v_onan); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/lib.pyx":420 * return result * * def fast_zip(list ndarrays): # <<<<<<<<<<<<<< * ''' * For zipping multiple ndarrays into an ndarray of tuples */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_3lib_41fast_zip(PyObject *__pyx_self, PyObject *__pyx_v_ndarrays); /*proto*/ static char __pyx_doc_6pandas_3lib_40fast_zip[] = "\n For zipping multiple ndarrays into an ndarray of tuples\n "; static PyMethodDef __pyx_mdef_6pandas_3lib_41fast_zip = {__Pyx_NAMESTR("fast_zip"), (PyCFunction)__pyx_pw_6pandas_3lib_41fast_zip, METH_O, __Pyx_DOCSTR(__pyx_doc_6pandas_3lib_40fast_zip)}; static PyObject *__pyx_pw_6pandas_3lib_41fast_zip(PyObject *__pyx_self, PyObject *__pyx_v_ndarrays) { CYTHON_UNUSED int __pyx_lineno = 0; CYTHON_UNUSED const char *__pyx_filename = NULL; CYTHON_UNUSED int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("fast_zip (wrapper)", 0); if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ndarrays), (&PyList_Type), 1, "ndarrays", 1))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 420; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_3lib_40fast_zip(__pyx_self, ((PyObject*)__pyx_v_ndarrays)); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_3lib_40fast_zip(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_ndarrays) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_k; Py_ssize_t __pyx_v_n; PyArrayObject *__pyx_v_result = 0; PyArrayIterObject *__pyx_v_it = 0; PyObject *__pyx_v_val = 0; PyObject *__pyx_v_tup = 0; PyObject *__pyx_v_arr = NULL; __Pyx_LocalBuf_ND __pyx_pybuffernd_result; __Pyx_Buffer __pyx_pybuffer_result; 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; PyArrayObject *__pyx_t_6 = NULL; 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; PyObject **__pyx_t_13; Py_ssize_t __pyx_t_14; int __pyx_t_15; Py_ssize_t __pyx_t_16; Py_ssize_t __pyx_t_17; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("fast_zip", 0); __pyx_pybuffer_result.pybuffer.buf = NULL; __pyx_pybuffer_result.refcount = 0; __pyx_pybuffernd_result.data = NULL; __pyx_pybuffernd_result.rcbuffer = &__pyx_pybuffer_result; /* "pandas/lib.pyx":430 * object val, tup * * k = len(ndarrays) # <<<<<<<<<<<<<< * n = len(ndarrays[0]) * */ if (unlikely(__pyx_v_ndarrays == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 430; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_1 = PyList_GET_SIZE(__pyx_v_ndarrays); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 430; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_k = __pyx_t_1; /* "pandas/lib.pyx":431 * * k = len(ndarrays) * n = len(ndarrays[0]) # <<<<<<<<<<<<<< * * result = np.empty(n, dtype=object) */ if (unlikely(__pyx_v_ndarrays == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 431; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_2 = __Pyx_GetItemInt_List(__pyx_v_ndarrays, 0, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 431; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = PyObject_Length(__pyx_t_2); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 431; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_n = __pyx_t_1; /* "pandas/lib.pyx":433 * n = len(ndarrays[0]) * * result = np.empty(n, dtype=object) # <<<<<<<<<<<<<< * * # initialize tuples on first pass */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 433; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 433; __pyx_clineno = __LINE__; goto __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_n); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 433; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 433; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 433; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_dtype, __pyx_builtin_object) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 433; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_5 = PyObject_Call(__pyx_t_3, __pyx_t_4, __pyx_t_2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 433; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 433; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_6 = ((PyArrayObject *)__pyx_t_5); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_object, 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_result.rcbuffer->pybuffer, (PyObject*)__pyx_v_result, &__Pyx_TypeInfo_object, 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_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_7 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 433; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_6 = 0; __pyx_v_result = ((PyArrayObject *)__pyx_t_5); __pyx_t_5 = 0; /* "pandas/lib.pyx":436 * * # initialize tuples on first pass * arr = ndarrays[0] # <<<<<<<<<<<<<< * it = PyArray_IterNew(arr) * for i in range(n): */ if (unlikely(__pyx_v_ndarrays == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 436; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_5 = __Pyx_GetItemInt_List(__pyx_v_ndarrays, 0, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(__pyx_t_5 == NULL)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 436; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_5); __pyx_v_arr = __pyx_t_5; __pyx_t_5 = 0; /* "pandas/lib.pyx":437 * # initialize tuples on first pass * arr = ndarrays[0] * it = PyArray_IterNew(arr) # <<<<<<<<<<<<<< * for i in range(n): * val = PyArray_GETITEM(arr, PyArray_ITER_DATA(it)) */ __pyx_t_5 = PyArray_IterNew(__pyx_v_arr); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 437; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_2 = __pyx_t_5; __Pyx_INCREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_v_it = ((PyArrayIterObject *)__pyx_t_2); __pyx_t_2 = 0; /* "pandas/lib.pyx":438 * arr = ndarrays[0] * it = PyArray_IterNew(arr) * for i in range(n): # <<<<<<<<<<<<<< * val = PyArray_GETITEM(arr, PyArray_ITER_DATA(it)) * tup = PyTuple_New(k) */ __pyx_t_1 = __pyx_v_n; for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_1; __pyx_t_11+=1) { __pyx_v_i = __pyx_t_11; /* "pandas/lib.pyx":439 * it = PyArray_IterNew(arr) * for i in range(n): * val = PyArray_GETITEM(arr, PyArray_ITER_DATA(it)) # <<<<<<<<<<<<<< * tup = PyTuple_New(k) * */ if (!(likely(((__pyx_v_arr) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_arr, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 439; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_2 = PyArray_GETITEM(((PyArrayObject *)__pyx_v_arr), PyArray_ITER_DATA(__pyx_v_it)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 439; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_XDECREF_SET(__pyx_v_val, __pyx_t_2); __pyx_t_2 = 0; /* "pandas/lib.pyx":440 * for i in range(n): * val = PyArray_GETITEM(arr, PyArray_ITER_DATA(it)) * tup = PyTuple_New(k) # <<<<<<<<<<<<<< * * PyTuple_SET_ITEM(tup, 0, val) */ __pyx_t_2 = PyTuple_New(__pyx_v_k); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 440; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_XDECREF_SET(__pyx_v_tup, __pyx_t_2); __pyx_t_2 = 0; /* "pandas/lib.pyx":442 * tup = PyTuple_New(k) * * PyTuple_SET_ITEM(tup, 0, val) # <<<<<<<<<<<<<< * Py_INCREF(val) * result[i] = tup */ PyTuple_SET_ITEM(__pyx_v_tup, 0, __pyx_v_val); /* "pandas/lib.pyx":443 * * PyTuple_SET_ITEM(tup, 0, val) * Py_INCREF(val) # <<<<<<<<<<<<<< * result[i] = tup * PyArray_ITER_NEXT(it) */ Py_INCREF(__pyx_v_val); /* "pandas/lib.pyx":444 * PyTuple_SET_ITEM(tup, 0, val) * Py_INCREF(val) * result[i] = tup # <<<<<<<<<<<<<< * PyArray_ITER_NEXT(it) * */ __pyx_t_12 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_12 < 0) { __pyx_t_12 += __pyx_pybuffernd_result.diminfo[0].shape; if (unlikely(__pyx_t_12 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_12 >= __pyx_pybuffernd_result.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 444; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_13 = __Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_12, __pyx_pybuffernd_result.diminfo[0].strides); __Pyx_GOTREF(*__pyx_t_13); __Pyx_INCREF(__pyx_v_tup); __Pyx_DECREF(*__pyx_t_13); *__pyx_t_13 = __pyx_v_tup; __Pyx_GIVEREF(*__pyx_t_13); /* "pandas/lib.pyx":445 * Py_INCREF(val) * result[i] = tup * PyArray_ITER_NEXT(it) # <<<<<<<<<<<<<< * * for j in range(1, k): */ PyArray_ITER_NEXT(__pyx_v_it); } /* "pandas/lib.pyx":447 * PyArray_ITER_NEXT(it) * * for j in range(1, k): # <<<<<<<<<<<<<< * arr = ndarrays[j] * it = PyArray_IterNew(arr) */ __pyx_t_1 = __pyx_v_k; for (__pyx_t_11 = 1; __pyx_t_11 < __pyx_t_1; __pyx_t_11+=1) { __pyx_v_j = __pyx_t_11; /* "pandas/lib.pyx":448 * * for j in range(1, k): * arr = ndarrays[j] # <<<<<<<<<<<<<< * it = PyArray_IterNew(arr) * if len(arr) != n: */ if (unlikely(__pyx_v_ndarrays == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 448; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_2 = __Pyx_GetItemInt_List(__pyx_v_ndarrays, __pyx_v_j, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 448; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF_SET(__pyx_v_arr, __pyx_t_2); __pyx_t_2 = 0; /* "pandas/lib.pyx":449 * for j in range(1, k): * arr = ndarrays[j] * it = PyArray_IterNew(arr) # <<<<<<<<<<<<<< * if len(arr) != n: * raise ValueError('all arrays must be same length') */ __pyx_t_2 = PyArray_IterNew(__pyx_v_arr); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 449; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = __pyx_t_2; __Pyx_INCREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF_SET(__pyx_v_it, ((PyArrayIterObject *)__pyx_t_5)); __pyx_t_5 = 0; /* "pandas/lib.pyx":450 * arr = ndarrays[j] * it = PyArray_IterNew(arr) * if len(arr) != n: # <<<<<<<<<<<<<< * raise ValueError('all arrays must be same length') * */ __pyx_t_14 = PyObject_Length(__pyx_v_arr); if (unlikely(__pyx_t_14 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 450; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_15 = ((__pyx_t_14 != __pyx_v_n) != 0); if (__pyx_t_15) { /* "pandas/lib.pyx":451 * it = PyArray_IterNew(arr) * if len(arr) != n: * raise ValueError('all arrays must be same length') # <<<<<<<<<<<<<< * * for i in range(n): */ __pyx_t_5 = PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__2, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 451; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_Raise(__pyx_t_5, 0, 0, 0); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; {__pyx_filename = __pyx_f[2]; __pyx_lineno = 451; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } /* "pandas/lib.pyx":453 * raise ValueError('all arrays must be same length') * * for i in range(n): # <<<<<<<<<<<<<< * val = PyArray_GETITEM(arr, PyArray_ITER_DATA(it)) * PyTuple_SET_ITEM(result[i], j, val) */ __pyx_t_14 = __pyx_v_n; for (__pyx_t_16 = 0; __pyx_t_16 < __pyx_t_14; __pyx_t_16+=1) { __pyx_v_i = __pyx_t_16; /* "pandas/lib.pyx":454 * * for i in range(n): * val = PyArray_GETITEM(arr, PyArray_ITER_DATA(it)) # <<<<<<<<<<<<<< * PyTuple_SET_ITEM(result[i], j, val) * Py_INCREF(val) */ if (!(likely(((__pyx_v_arr) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_arr, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 454; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_5 = PyArray_GETITEM(((PyArrayObject *)__pyx_v_arr), PyArray_ITER_DATA(__pyx_v_it)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 454; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_XDECREF_SET(__pyx_v_val, __pyx_t_5); __pyx_t_5 = 0; /* "pandas/lib.pyx":455 * for i in range(n): * val = PyArray_GETITEM(arr, PyArray_ITER_DATA(it)) * PyTuple_SET_ITEM(result[i], j, val) # <<<<<<<<<<<<<< * Py_INCREF(val) * PyArray_ITER_NEXT(it) */ __pyx_t_17 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_17 < 0) { __pyx_t_17 += __pyx_pybuffernd_result.diminfo[0].shape; if (unlikely(__pyx_t_17 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_17 >= __pyx_pybuffernd_result.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 455; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_5 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_result.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_5, __pyx_v_j, __pyx_v_val); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "pandas/lib.pyx":456 * val = PyArray_GETITEM(arr, PyArray_ITER_DATA(it)) * PyTuple_SET_ITEM(result[i], j, val) * Py_INCREF(val) # <<<<<<<<<<<<<< * PyArray_ITER_NEXT(it) * */ Py_INCREF(__pyx_v_val); /* "pandas/lib.pyx":457 * PyTuple_SET_ITEM(result[i], j, val) * Py_INCREF(val) * PyArray_ITER_NEXT(it) # <<<<<<<<<<<<<< * * return result */ PyArray_ITER_NEXT(__pyx_v_it); } } /* "pandas/lib.pyx":459 * PyArray_ITER_NEXT(it) * * return result # <<<<<<<<<<<<<< * * def get_reverse_indexer(ndarray[int64_t] indexer, Py_ssize_t length): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_result)); __pyx_r = ((PyObject *)__pyx_v_result); goto __pyx_L0; /* "pandas/lib.pyx":420 * return result * * def fast_zip(list ndarrays): # <<<<<<<<<<<<<< * ''' * For zipping multiple ndarrays into an ndarray of tuples */ /* 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); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.lib.fast_zip", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_result); __Pyx_XDECREF((PyObject *)__pyx_v_it); __Pyx_XDECREF(__pyx_v_val); __Pyx_XDECREF(__pyx_v_tup); __Pyx_XDECREF(__pyx_v_arr); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/lib.pyx":461 * return result * * def get_reverse_indexer(ndarray[int64_t] indexer, Py_ssize_t length): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = len(indexer) */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_3lib_43get_reverse_indexer(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_3lib_43get_reverse_indexer = {__Pyx_NAMESTR("get_reverse_indexer"), (PyCFunction)__pyx_pw_6pandas_3lib_43get_reverse_indexer, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_3lib_43get_reverse_indexer(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_indexer = 0; Py_ssize_t __pyx_v_length; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("get_reverse_indexer (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_indexer,&__pyx_n_s_length,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_indexer)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_length)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("get_reverse_indexer", 1, 2, 2, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 461; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "get_reverse_indexer") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 461; __pyx_clineno = __LINE__; goto __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_indexer = ((PyArrayObject *)values[0]); __pyx_v_length = __Pyx_PyIndex_AsSsize_t(values[1]); if (unlikely((__pyx_v_length == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 461; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("get_reverse_indexer", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 461; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.lib.get_reverse_indexer", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_indexer), __pyx_ptype_5numpy_ndarray, 1, "indexer", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 461; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_3lib_42get_reverse_indexer(__pyx_self, __pyx_v_indexer, __pyx_v_length); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_3lib_42get_reverse_indexer(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_indexer, Py_ssize_t __pyx_v_length) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_n; PyArrayObject *__pyx_v_rev_indexer = 0; __pyx_t_5numpy_int64_t __pyx_v_idx; __Pyx_LocalBuf_ND __pyx_pybuffernd_indexer; __Pyx_Buffer __pyx_pybuffer_indexer; __Pyx_LocalBuf_ND __pyx_pybuffernd_rev_indexer; __Pyx_Buffer __pyx_pybuffer_rev_indexer; 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; int __pyx_t_14; __pyx_t_5numpy_int64_t __pyx_t_15; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_reverse_indexer", 0); __pyx_pybuffer_rev_indexer.pybuffer.buf = NULL; __pyx_pybuffer_rev_indexer.refcount = 0; __pyx_pybuffernd_rev_indexer.data = NULL; __pyx_pybuffernd_rev_indexer.rcbuffer = &__pyx_pybuffer_rev_indexer; __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_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 461; __pyx_clineno = __LINE__; goto __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]; /* "pandas/lib.pyx":463 * def get_reverse_indexer(ndarray[int64_t] indexer, Py_ssize_t length): * cdef: * Py_ssize_t i, n = len(indexer) # <<<<<<<<<<<<<< * ndarray[int64_t] rev_indexer * int64_t idx */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_indexer)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 463; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/lib.pyx":467 * int64_t idx * * rev_indexer = np.empty(length, dtype=np.int64) # <<<<<<<<<<<<<< * rev_indexer.fill(-1) * for i in range(n): */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 467; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 467; __pyx_clineno = __LINE__; goto __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_length); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 467; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 467; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 467; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 467; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_int64); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 467; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 467; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyObject_Call(__pyx_t_3, __pyx_t_4, __pyx_t_2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 467; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 467; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_7 = ((PyArrayObject *)__pyx_t_6); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_rev_indexer.rcbuffer->pybuffer); __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_rev_indexer.rcbuffer->pybuffer, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_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_rev_indexer.rcbuffer->pybuffer, (PyObject*)__pyx_v_rev_indexer, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_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_pybuffernd_rev_indexer.diminfo[0].strides = __pyx_pybuffernd_rev_indexer.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_rev_indexer.diminfo[0].shape = __pyx_pybuffernd_rev_indexer.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 467; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_7 = 0; __pyx_v_rev_indexer = ((PyArrayObject *)__pyx_t_6); __pyx_t_6 = 0; /* "pandas/lib.pyx":468 * * rev_indexer = np.empty(length, dtype=np.int64) * rev_indexer.fill(-1) # <<<<<<<<<<<<<< * for i in range(n): * idx = indexer[i] */ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_rev_indexer), __pyx_n_s_fill); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 468; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_2 = PyObject_Call(__pyx_t_6, __pyx_tuple__3, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 468; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/lib.pyx":469 * rev_indexer = np.empty(length, dtype=np.int64) * rev_indexer.fill(-1) * for i in range(n): # <<<<<<<<<<<<<< * idx = indexer[i] * if idx != -1: */ __pyx_t_1 = __pyx_v_n; for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_1; __pyx_t_12+=1) { __pyx_v_i = __pyx_t_12; /* "pandas/lib.pyx":470 * rev_indexer.fill(-1) * for i in range(n): * idx = indexer[i] # <<<<<<<<<<<<<< * if idx != -1: * rev_indexer[idx] = i */ __pyx_t_13 = __pyx_v_i; __pyx_t_8 = -1; if (__pyx_t_13 < 0) { __pyx_t_13 += __pyx_pybuffernd_indexer.diminfo[0].shape; if (unlikely(__pyx_t_13 < 0)) __pyx_t_8 = 0; } else if (unlikely(__pyx_t_13 >= __pyx_pybuffernd_indexer.diminfo[0].shape)) __pyx_t_8 = 0; if (unlikely(__pyx_t_8 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_8); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 470; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_idx = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_indexer.diminfo[0].strides)); /* "pandas/lib.pyx":471 * for i in range(n): * idx = indexer[i] * if idx != -1: # <<<<<<<<<<<<<< * rev_indexer[idx] = i * */ __pyx_t_14 = ((__pyx_v_idx != -1) != 0); if (__pyx_t_14) { /* "pandas/lib.pyx":472 * idx = indexer[i] * if idx != -1: * rev_indexer[idx] = i # <<<<<<<<<<<<<< * * return rev_indexer */ __pyx_t_15 = __pyx_v_idx; __pyx_t_8 = -1; if (__pyx_t_15 < 0) { __pyx_t_15 += __pyx_pybuffernd_rev_indexer.diminfo[0].shape; if (unlikely(__pyx_t_15 < 0)) __pyx_t_8 = 0; } else if (unlikely(__pyx_t_15 >= __pyx_pybuffernd_rev_indexer.diminfo[0].shape)) __pyx_t_8 = 0; if (unlikely(__pyx_t_8 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_8); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 472; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_rev_indexer.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_rev_indexer.diminfo[0].strides) = __pyx_v_i; goto __pyx_L5; } __pyx_L5:; } /* "pandas/lib.pyx":474 * rev_indexer[idx] = i * * return rev_indexer # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_rev_indexer)); __pyx_r = ((PyObject *)__pyx_v_rev_indexer); goto __pyx_L0; /* "pandas/lib.pyx":461 * return result * * def get_reverse_indexer(ndarray[int64_t] indexer, Py_ssize_t length): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = len(indexer) */ /* 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_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_rev_indexer.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.lib.get_reverse_indexer", __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_rev_indexer.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_rev_indexer); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/lib.pyx":477 * * * def has_infs_f4(ndarray[float32_t] arr): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = len(arr) */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_3lib_45has_infs_f4(PyObject *__pyx_self, PyObject *__pyx_v_arr); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_3lib_45has_infs_f4 = {__Pyx_NAMESTR("has_infs_f4"), (PyCFunction)__pyx_pw_6pandas_3lib_45has_infs_f4, METH_O, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_3lib_45has_infs_f4(PyObject *__pyx_self, PyObject *__pyx_v_arr) { CYTHON_UNUSED int __pyx_lineno = 0; CYTHON_UNUSED const char *__pyx_filename = NULL; CYTHON_UNUSED int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("has_infs_f4 (wrapper)", 0); if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_arr), __pyx_ptype_5numpy_ndarray, 1, "arr", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 477; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_3lib_44has_infs_f4(__pyx_self, ((PyArrayObject *)__pyx_v_arr)); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_3lib_44has_infs_f4(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_arr) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_n; __pyx_t_5numpy_float32_t __pyx_v_inf; __pyx_t_5numpy_float32_t __pyx_v_neginf; __pyx_t_5numpy_float32_t __pyx_v_val; __Pyx_LocalBuf_ND __pyx_pybuffernd_arr; __Pyx_Buffer __pyx_pybuffer_arr; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; __pyx_t_5numpy_float32_t __pyx_t_4; Py_ssize_t __pyx_t_5; Py_ssize_t __pyx_t_6; int __pyx_t_7; int __pyx_t_8; int __pyx_t_9; int __pyx_t_10; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("has_infs_f4", 0); __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_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 477; __pyx_clineno = __LINE__; goto __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/lib.pyx":479 * def has_infs_f4(ndarray[float32_t] arr): * cdef: * Py_ssize_t i, n = len(arr) # <<<<<<<<<<<<<< * float32_t inf, neginf, val * */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_arr)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 479; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/lib.pyx":482 * float32_t inf, neginf, val * * inf = np.inf # <<<<<<<<<<<<<< * neginf = -inf * */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 482; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_inf); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 482; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_4 = __pyx_PyFloat_AsFloat(__pyx_t_3); if (unlikely((__pyx_t_4 == (npy_float32)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 482; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_inf = __pyx_t_4; /* "pandas/lib.pyx":483 * * inf = np.inf * neginf = -inf # <<<<<<<<<<<<<< * * for i in range(n): */ __pyx_v_neginf = (-__pyx_v_inf); /* "pandas/lib.pyx":485 * neginf = -inf * * for i in range(n): # <<<<<<<<<<<<<< * val = arr[i] * if val == inf or val == neginf: */ __pyx_t_1 = __pyx_v_n; for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_1; __pyx_t_5+=1) { __pyx_v_i = __pyx_t_5; /* "pandas/lib.pyx":486 * * for i in range(n): * val = arr[i] # <<<<<<<<<<<<<< * if val == inf or val == neginf: * return True */ __pyx_t_6 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_6 < 0) { __pyx_t_6 += __pyx_pybuffernd_arr.diminfo[0].shape; if (unlikely(__pyx_t_6 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_6 >= __pyx_pybuffernd_arr.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 486; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_val = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_arr.rcbuffer->pybuffer.buf, __pyx_t_6, __pyx_pybuffernd_arr.diminfo[0].strides)); /* "pandas/lib.pyx":487 * for i in range(n): * val = arr[i] * if val == inf or val == neginf: # <<<<<<<<<<<<<< * return True * return False */ __pyx_t_8 = ((__pyx_v_val == __pyx_v_inf) != 0); if (!__pyx_t_8) { __pyx_t_9 = ((__pyx_v_val == __pyx_v_neginf) != 0); __pyx_t_10 = __pyx_t_9; } else { __pyx_t_10 = __pyx_t_8; } if (__pyx_t_10) { /* "pandas/lib.pyx":488 * val = arr[i] * if val == inf or val == neginf: * return True # <<<<<<<<<<<<<< * return False * */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(Py_True); __pyx_r = Py_True; goto __pyx_L0; } } /* "pandas/lib.pyx":489 * if val == inf or val == neginf: * return True * return False # <<<<<<<<<<<<<< * * def has_infs_f8(ndarray[float64_t] arr): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(Py_False); __pyx_r = Py_False; goto __pyx_L0; /* "pandas/lib.pyx":477 * * * def has_infs_f4(ndarray[float32_t] arr): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = len(arr) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_arr.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.lib.has_infs_f4", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_arr.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/lib.pyx":491 * return False * * def has_infs_f8(ndarray[float64_t] arr): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = len(arr) */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_3lib_47has_infs_f8(PyObject *__pyx_self, PyObject *__pyx_v_arr); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_3lib_47has_infs_f8 = {__Pyx_NAMESTR("has_infs_f8"), (PyCFunction)__pyx_pw_6pandas_3lib_47has_infs_f8, METH_O, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_3lib_47has_infs_f8(PyObject *__pyx_self, PyObject *__pyx_v_arr) { CYTHON_UNUSED int __pyx_lineno = 0; CYTHON_UNUSED const char *__pyx_filename = NULL; CYTHON_UNUSED int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("has_infs_f8 (wrapper)", 0); if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_arr), __pyx_ptype_5numpy_ndarray, 1, "arr", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 491; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_3lib_46has_infs_f8(__pyx_self, ((PyArrayObject *)__pyx_v_arr)); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_3lib_46has_infs_f8(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_arr) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_n; __pyx_t_5numpy_float64_t __pyx_v_inf; __pyx_t_5numpy_float64_t __pyx_v_neginf; __pyx_t_5numpy_float64_t __pyx_v_val; __Pyx_LocalBuf_ND __pyx_pybuffernd_arr; __Pyx_Buffer __pyx_pybuffer_arr; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; __pyx_t_5numpy_float64_t __pyx_t_4; Py_ssize_t __pyx_t_5; Py_ssize_t __pyx_t_6; int __pyx_t_7; int __pyx_t_8; int __pyx_t_9; int __pyx_t_10; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("has_infs_f8", 0); __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_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 491; __pyx_clineno = __LINE__; goto __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/lib.pyx":493 * def has_infs_f8(ndarray[float64_t] arr): * cdef: * Py_ssize_t i, n = len(arr) # <<<<<<<<<<<<<< * float64_t inf, neginf, val * */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_arr)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 493; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/lib.pyx":496 * float64_t inf, neginf, val * * inf = np.inf # <<<<<<<<<<<<<< * neginf = -inf * */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 496; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_inf); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 496; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_4 = __pyx_PyFloat_AsDouble(__pyx_t_3); if (unlikely((__pyx_t_4 == (npy_float64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 496; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_inf = __pyx_t_4; /* "pandas/lib.pyx":497 * * inf = np.inf * neginf = -inf # <<<<<<<<<<<<<< * * for i in range(n): */ __pyx_v_neginf = (-__pyx_v_inf); /* "pandas/lib.pyx":499 * neginf = -inf * * for i in range(n): # <<<<<<<<<<<<<< * val = arr[i] * if val == inf or val == neginf: */ __pyx_t_1 = __pyx_v_n; for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_1; __pyx_t_5+=1) { __pyx_v_i = __pyx_t_5; /* "pandas/lib.pyx":500 * * for i in range(n): * val = arr[i] # <<<<<<<<<<<<<< * if val == inf or val == neginf: * return True */ __pyx_t_6 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_6 < 0) { __pyx_t_6 += __pyx_pybuffernd_arr.diminfo[0].shape; if (unlikely(__pyx_t_6 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_6 >= __pyx_pybuffernd_arr.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 500; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_val = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_arr.rcbuffer->pybuffer.buf, __pyx_t_6, __pyx_pybuffernd_arr.diminfo[0].strides)); /* "pandas/lib.pyx":501 * for i in range(n): * val = arr[i] * if val == inf or val == neginf: # <<<<<<<<<<<<<< * return True * return False */ __pyx_t_8 = ((__pyx_v_val == __pyx_v_inf) != 0); if (!__pyx_t_8) { __pyx_t_9 = ((__pyx_v_val == __pyx_v_neginf) != 0); __pyx_t_10 = __pyx_t_9; } else { __pyx_t_10 = __pyx_t_8; } if (__pyx_t_10) { /* "pandas/lib.pyx":502 * val = arr[i] * if val == inf or val == neginf: * return True # <<<<<<<<<<<<<< * return False * */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(Py_True); __pyx_r = Py_True; goto __pyx_L0; } } /* "pandas/lib.pyx":503 * if val == inf or val == neginf: * return True * return False # <<<<<<<<<<<<<< * * def convert_timestamps(ndarray values): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(Py_False); __pyx_r = Py_False; goto __pyx_L0; /* "pandas/lib.pyx":491 * return False * * def has_infs_f8(ndarray[float64_t] arr): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = len(arr) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_arr.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.lib.has_infs_f8", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_arr.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/lib.pyx":505 * return False * * def convert_timestamps(ndarray values): # <<<<<<<<<<<<<< * cdef: * object val, f, result */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_3lib_49convert_timestamps(PyObject *__pyx_self, PyObject *__pyx_v_values); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_3lib_49convert_timestamps = {__Pyx_NAMESTR("convert_timestamps"), (PyCFunction)__pyx_pw_6pandas_3lib_49convert_timestamps, METH_O, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_3lib_49convert_timestamps(PyObject *__pyx_self, PyObject *__pyx_v_values) { CYTHON_UNUSED int __pyx_lineno = 0; CYTHON_UNUSED const char *__pyx_filename = NULL; CYTHON_UNUSED int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("convert_timestamps (wrapper)", 0); if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 505; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_3lib_48convert_timestamps(__pyx_self, ((PyArrayObject *)__pyx_v_values)); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_3lib_48convert_timestamps(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values) { PyObject *__pyx_v_val = 0; PyObject *__pyx_v_f = 0; PyObject *__pyx_v_cache = 0; Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_n; PyArrayObject *__pyx_v_out = 0; PyObject *__pyx_v_datetime = NULL; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; Py_ssize_t __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyArrayObject *__pyx_t_6 = NULL; 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; int __pyx_t_12; int __pyx_t_13; Py_ssize_t __pyx_t_14; PyObject **__pyx_t_15; Py_ssize_t __pyx_t_16; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("convert_timestamps", 0); __pyx_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; /* "pandas/lib.pyx":508 * cdef: * object val, f, result * dict cache = {} # <<<<<<<<<<<<<< * Py_ssize_t i, n = len(values) * ndarray[object] out */ __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 508; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_v_cache = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/lib.pyx":509 * object val, f, result * dict cache = {} * Py_ssize_t i, n = len(values) # <<<<<<<<<<<<<< * ndarray[object] out * */ __pyx_t_2 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 509; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_2; /* "pandas/lib.pyx":514 * # for HDFStore, a bit temporary but... * * from datetime import datetime # <<<<<<<<<<<<<< * f = datetime.fromtimestamp * */ __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 514; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_n_s_datetime); PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_datetime); __Pyx_GIVEREF(__pyx_n_s_datetime); __pyx_t_3 = __Pyx_Import(__pyx_n_s_datetime, __pyx_t_1, -1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 514; __pyx_clineno = __LINE__; goto __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_datetime); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 514; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_t_1); __pyx_v_datetime = __pyx_t_1; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/lib.pyx":515 * * from datetime import datetime * f = datetime.fromtimestamp # <<<<<<<<<<<<<< * * out = np.empty(n, dtype='O') */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_datetime, __pyx_n_s_fromtimestamp); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 515; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_v_f = __pyx_t_3; __pyx_t_3 = 0; /* "pandas/lib.pyx":517 * f = datetime.fromtimestamp * * out = np.empty(n, dtype='O') # <<<<<<<<<<<<<< * * for i in range(n): */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 517; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_empty); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 517; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyInt_FromSsize_t(__pyx_v_n); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 517; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 517; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 517; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dtype, __pyx_n_s_O) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 517; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_5 = PyObject_Call(__pyx_t_1, __pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 517; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 517; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_6 = ((PyArrayObject *)__pyx_t_5); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_object, 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.rcbuffer->pybuffer, (PyObject*)__pyx_v_out, &__Pyx_TypeInfo_object, 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_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_7 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 517; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_6 = 0; __pyx_v_out = ((PyArrayObject *)__pyx_t_5); __pyx_t_5 = 0; /* "pandas/lib.pyx":519 * out = np.empty(n, dtype='O') * * for i in range(n): # <<<<<<<<<<<<<< * val = util.get_value_1d(values, i) * if val in cache: */ __pyx_t_2 = __pyx_v_n; for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_2; __pyx_t_11+=1) { __pyx_v_i = __pyx_t_11; /* "pandas/lib.pyx":520 * * for i in range(n): * val = util.get_value_1d(values, i) # <<<<<<<<<<<<<< * if val in cache: * out[i] = cache[val] */ __pyx_t_5 = get_value_1d(__pyx_v_values, __pyx_v_i); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 520; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_XDECREF_SET(__pyx_v_val, __pyx_t_5); __pyx_t_5 = 0; /* "pandas/lib.pyx":521 * for i in range(n): * val = util.get_value_1d(values, i) * if val in cache: # <<<<<<<<<<<<<< * out[i] = cache[val] * else: */ __pyx_t_12 = (__Pyx_PyDict_Contains(__pyx_v_val, __pyx_v_cache, Py_EQ)); if (unlikely(__pyx_t_12 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 521; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_13 = (__pyx_t_12 != 0); if (__pyx_t_13) { /* "pandas/lib.pyx":522 * val = util.get_value_1d(values, i) * if val in cache: * out[i] = cache[val] # <<<<<<<<<<<<<< * else: * cache[val] = out[i] = f(val) */ __pyx_t_5 = __Pyx_PyDict_GetItem(__pyx_v_cache, __pyx_v_val); if (unlikely(__pyx_t_5 == NULL)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 522; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_5); __pyx_t_14 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_14 < 0) { __pyx_t_14 += __pyx_pybuffernd_out.diminfo[0].shape; if (unlikely(__pyx_t_14 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_14 >= __pyx_pybuffernd_out.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 522; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_15 = __Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_out.diminfo[0].strides); __Pyx_GOTREF(*__pyx_t_15); __Pyx_INCREF(__pyx_t_5); __Pyx_DECREF(*__pyx_t_15); *__pyx_t_15 = __pyx_t_5; __Pyx_GIVEREF(*__pyx_t_15); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; goto __pyx_L5; } /*else*/ { /* "pandas/lib.pyx":524 * out[i] = cache[val] * else: * cache[val] = out[i] = f(val) # <<<<<<<<<<<<<< * * return out */ __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 524; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_v_val); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_val); __Pyx_GIVEREF(__pyx_v_val); __pyx_t_3 = PyObject_Call(__pyx_v_f, __pyx_t_5, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 524; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(PyDict_SetItem(__pyx_v_cache, __pyx_v_val, __pyx_t_3) < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 524; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_16 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_16 < 0) { __pyx_t_16 += __pyx_pybuffernd_out.diminfo[0].shape; if (unlikely(__pyx_t_16 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_16 >= __pyx_pybuffernd_out.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 524; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_15 = __Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_out.diminfo[0].strides); __Pyx_GOTREF(*__pyx_t_15); __Pyx_INCREF(__pyx_t_3); __Pyx_DECREF(*__pyx_t_15); *__pyx_t_15 = __pyx_t_3; __Pyx_GIVEREF(*__pyx_t_15); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } __pyx_L5:; } /* "pandas/lib.pyx":526 * cache[val] = out[i] = f(val) * * return out # <<<<<<<<<<<<<< * * def maybe_indices_to_slice(ndarray[int64_t] indices): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_out)); __pyx_r = ((PyObject *)__pyx_v_out); goto __pyx_L0; /* "pandas/lib.pyx":505 * return False * * def convert_timestamps(ndarray values): # <<<<<<<<<<<<<< * cdef: * object val, f, result */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.lib.convert_timestamps", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF(__pyx_v_val); __Pyx_XDECREF(__pyx_v_f); __Pyx_XDECREF(__pyx_v_cache); __Pyx_XDECREF((PyObject *)__pyx_v_out); __Pyx_XDECREF(__pyx_v_datetime); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/lib.pyx":528 * return out * * def maybe_indices_to_slice(ndarray[int64_t] indices): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = len(indices) */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_3lib_51maybe_indices_to_slice(PyObject *__pyx_self, PyObject *__pyx_v_indices); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_3lib_51maybe_indices_to_slice = {__Pyx_NAMESTR("maybe_indices_to_slice"), (PyCFunction)__pyx_pw_6pandas_3lib_51maybe_indices_to_slice, METH_O, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_3lib_51maybe_indices_to_slice(PyObject *__pyx_self, PyObject *__pyx_v_indices) { CYTHON_UNUSED int __pyx_lineno = 0; CYTHON_UNUSED const char *__pyx_filename = NULL; CYTHON_UNUSED int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("maybe_indices_to_slice (wrapper)", 0); if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_indices), __pyx_ptype_5numpy_ndarray, 1, "indices", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 528; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_3lib_50maybe_indices_to_slice(__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_3lib_50maybe_indices_to_slice(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_indices) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_n; __Pyx_LocalBuf_ND __pyx_pybuffernd_indices; __Pyx_Buffer __pyx_pybuffer_indices; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; int __pyx_t_2; Py_ssize_t __pyx_t_3; Py_ssize_t __pyx_t_4; int __pyx_t_5; Py_ssize_t __pyx_t_6; long __pyx_t_7; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("maybe_indices_to_slice", 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_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 528; __pyx_clineno = __LINE__; goto __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/lib.pyx":530 * def maybe_indices_to_slice(ndarray[int64_t] indices): * cdef: * Py_ssize_t i, n = len(indices) # <<<<<<<<<<<<<< * * if n == 0: */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_indices)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 530; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/lib.pyx":532 * Py_ssize_t i, n = len(indices) * * if n == 0: # <<<<<<<<<<<<<< * return indices * */ __pyx_t_2 = ((__pyx_v_n == 0) != 0); if (__pyx_t_2) { /* "pandas/lib.pyx":533 * * if n == 0: * return indices # <<<<<<<<<<<<<< * * for i in range(1, n): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_indices)); __pyx_r = ((PyObject *)__pyx_v_indices); goto __pyx_L0; } /* "pandas/lib.pyx":535 * return indices * * for i in range(1, n): # <<<<<<<<<<<<<< * if indices[i] - indices[i - 1] != 1: * return indices */ __pyx_t_1 = __pyx_v_n; for (__pyx_t_3 = 1; __pyx_t_3 < __pyx_t_1; __pyx_t_3+=1) { __pyx_v_i = __pyx_t_3; /* "pandas/lib.pyx":536 * * for i in range(1, n): * if indices[i] - indices[i - 1] != 1: # <<<<<<<<<<<<<< * return indices * return slice(indices[0], indices[n - 1] + 1) */ __pyx_t_4 = __pyx_v_i; __pyx_t_5 = -1; if (__pyx_t_4 < 0) { __pyx_t_4 += __pyx_pybuffernd_indices.diminfo[0].shape; if (unlikely(__pyx_t_4 < 0)) __pyx_t_5 = 0; } else if (unlikely(__pyx_t_4 >= __pyx_pybuffernd_indices.diminfo[0].shape)) __pyx_t_5 = 0; if (unlikely(__pyx_t_5 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_5); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 536; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_6 = (__pyx_v_i - 1); __pyx_t_5 = -1; if (__pyx_t_6 < 0) { __pyx_t_6 += __pyx_pybuffernd_indices.diminfo[0].shape; if (unlikely(__pyx_t_6 < 0)) __pyx_t_5 = 0; } else if (unlikely(__pyx_t_6 >= __pyx_pybuffernd_indices.diminfo[0].shape)) __pyx_t_5 = 0; if (unlikely(__pyx_t_5 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_5); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 536; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_2 = ((((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indices.rcbuffer->pybuffer.buf, __pyx_t_4, __pyx_pybuffernd_indices.diminfo[0].strides)) - (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indices.rcbuffer->pybuffer.buf, __pyx_t_6, __pyx_pybuffernd_indices.diminfo[0].strides))) != 1) != 0); if (__pyx_t_2) { /* "pandas/lib.pyx":537 * for i in range(1, n): * if indices[i] - indices[i - 1] != 1: * return indices # <<<<<<<<<<<<<< * return slice(indices[0], indices[n - 1] + 1) * */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_indices)); __pyx_r = ((PyObject *)__pyx_v_indices); goto __pyx_L0; } } /* "pandas/lib.pyx":538 * if indices[i] - indices[i - 1] != 1: * return indices * return slice(indices[0], indices[n - 1] + 1) # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_7 = 0; __pyx_t_5 = -1; if (__pyx_t_7 < 0) { __pyx_t_7 += __pyx_pybuffernd_indices.diminfo[0].shape; if (unlikely(__pyx_t_7 < 0)) __pyx_t_5 = 0; } else if (unlikely(__pyx_t_7 >= __pyx_pybuffernd_indices.diminfo[0].shape)) __pyx_t_5 = 0; if (unlikely(__pyx_t_5 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_5); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 538; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_8 = __Pyx_PyInt_From_npy_int64((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indices.rcbuffer->pybuffer.buf, __pyx_t_7, __pyx_pybuffernd_indices.diminfo[0].strides))); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 538; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_1 = (__pyx_v_n - 1); __pyx_t_5 = -1; if (__pyx_t_1 < 0) { __pyx_t_1 += __pyx_pybuffernd_indices.diminfo[0].shape; if (unlikely(__pyx_t_1 < 0)) __pyx_t_5 = 0; } else if (unlikely(__pyx_t_1 >= __pyx_pybuffernd_indices.diminfo[0].shape)) __pyx_t_5 = 0; if (unlikely(__pyx_t_5 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_5); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 538; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_9 = __Pyx_PyInt_From_npy_int64(((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indices.rcbuffer->pybuffer.buf, __pyx_t_1, __pyx_pybuffernd_indices.diminfo[0].strides)) + 1)); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 538; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_t_10 = PyTuple_New(2); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 538; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_8); __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_t_9); __Pyx_GIVEREF(__pyx_t_9); __pyx_t_8 = 0; __pyx_t_9 = 0; __pyx_t_9 = PyObject_Call(((PyObject *)((PyObject*)(&PySlice_Type))), __pyx_t_10, NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 538; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_r = __pyx_t_9; __pyx_t_9 = 0; goto __pyx_L0; /* "pandas/lib.pyx":528 * return out * * def maybe_indices_to_slice(ndarray[int64_t] indices): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = len(indices) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); __Pyx_XDECREF(__pyx_t_10); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __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.lib.maybe_indices_to_slice", __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/lib.pyx":541 * * * def maybe_booleans_to_slice(ndarray[uint8_t] mask): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = len(mask) */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_3lib_53maybe_booleans_to_slice(PyObject *__pyx_self, PyObject *__pyx_v_mask); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_3lib_53maybe_booleans_to_slice = {__Pyx_NAMESTR("maybe_booleans_to_slice"), (PyCFunction)__pyx_pw_6pandas_3lib_53maybe_booleans_to_slice, METH_O, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_3lib_53maybe_booleans_to_slice(PyObject *__pyx_self, PyObject *__pyx_v_mask) { CYTHON_UNUSED int __pyx_lineno = 0; CYTHON_UNUSED const char *__pyx_filename = NULL; CYTHON_UNUSED int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("maybe_booleans_to_slice (wrapper)", 0); if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_mask), __pyx_ptype_5numpy_ndarray, 1, "mask", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 541; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_3lib_52maybe_booleans_to_slice(__pyx_self, ((PyArrayObject *)__pyx_v_mask)); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_3lib_52maybe_booleans_to_slice(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_mask) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_n; Py_ssize_t __pyx_v_start; Py_ssize_t __pyx_v_end; int __pyx_v_started; int __pyx_v_finished; __Pyx_LocalBuf_ND __pyx_pybuffernd_mask; __Pyx_Buffer __pyx_pybuffer_mask; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; Py_ssize_t __pyx_t_2; Py_ssize_t __pyx_t_3; int __pyx_t_4; int __pyx_t_5; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("maybe_booleans_to_slice", 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_BufFmt_StackElem __pyx_stack[1]; 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, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 541; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; /* "pandas/lib.pyx":543 * def maybe_booleans_to_slice(ndarray[uint8_t] mask): * cdef: * Py_ssize_t i, n = len(mask) # <<<<<<<<<<<<<< * Py_ssize_t start, end * bint started = 0, finished = 0 */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_mask)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 543; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/lib.pyx":545 * Py_ssize_t i, n = len(mask) * Py_ssize_t start, end * bint started = 0, finished = 0 # <<<<<<<<<<<<<< * * for i in range(n): */ __pyx_v_started = 0; __pyx_v_finished = 0; /* "pandas/lib.pyx":547 * bint started = 0, finished = 0 * * for i in range(n): # <<<<<<<<<<<<<< * if mask[i]: * if finished: */ __pyx_t_1 = __pyx_v_n; for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) { __pyx_v_i = __pyx_t_2; /* "pandas/lib.pyx":548 * * for i in range(n): * if mask[i]: # <<<<<<<<<<<<<< * if finished: * return mask.view(np.bool_) */ __pyx_t_3 = __pyx_v_i; __pyx_t_4 = -1; if (__pyx_t_3 < 0) { __pyx_t_3 += __pyx_pybuffernd_mask.diminfo[0].shape; if (unlikely(__pyx_t_3 < 0)) __pyx_t_4 = 0; } else if (unlikely(__pyx_t_3 >= __pyx_pybuffernd_mask.diminfo[0].shape)) __pyx_t_4 = 0; if (unlikely(__pyx_t_4 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_4); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 548; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_5 = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_mask.rcbuffer->pybuffer.buf, __pyx_t_3, __pyx_pybuffernd_mask.diminfo[0].strides)) != 0); if (__pyx_t_5) { /* "pandas/lib.pyx":549 * for i in range(n): * if mask[i]: * if finished: # <<<<<<<<<<<<<< * return mask.view(np.bool_) * if not started: */ __pyx_t_5 = (__pyx_v_finished != 0); if (__pyx_t_5) { /* "pandas/lib.pyx":550 * if mask[i]: * if finished: * return mask.view(np.bool_) # <<<<<<<<<<<<<< * if not started: * started = 1 */ __Pyx_XDECREF(__pyx_r); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_mask), __pyx_n_s_view); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 550; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 550; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_bool); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 550; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 550; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_8); __Pyx_GIVEREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_8 = PyObject_Call(__pyx_t_6, __pyx_t_7, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 550; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_r = __pyx_t_8; __pyx_t_8 = 0; goto __pyx_L0; } /* "pandas/lib.pyx":551 * if finished: * return mask.view(np.bool_) * if not started: # <<<<<<<<<<<<<< * started = 1 * start = i */ __pyx_t_5 = ((!(__pyx_v_started != 0)) != 0); if (__pyx_t_5) { /* "pandas/lib.pyx":552 * return mask.view(np.bool_) * if not started: * started = 1 # <<<<<<<<<<<<<< * start = i * else: */ __pyx_v_started = 1; /* "pandas/lib.pyx":553 * if not started: * started = 1 * start = i # <<<<<<<<<<<<<< * else: * if finished: */ __pyx_v_start = __pyx_v_i; goto __pyx_L7; } __pyx_L7:; goto __pyx_L5; } /*else*/ { /* "pandas/lib.pyx":555 * start = i * else: * if finished: # <<<<<<<<<<<<<< * continue * */ __pyx_t_5 = (__pyx_v_finished != 0); if (__pyx_t_5) { /* "pandas/lib.pyx":556 * else: * if finished: * continue # <<<<<<<<<<<<<< * * if started: */ goto __pyx_L3_continue; } /* "pandas/lib.pyx":558 * continue * * if started: # <<<<<<<<<<<<<< * end = i * finished = 1 */ __pyx_t_5 = (__pyx_v_started != 0); if (__pyx_t_5) { /* "pandas/lib.pyx":559 * * if started: * end = i # <<<<<<<<<<<<<< * finished = 1 * */ __pyx_v_end = __pyx_v_i; /* "pandas/lib.pyx":560 * if started: * end = i * finished = 1 # <<<<<<<<<<<<<< * * if not started: */ __pyx_v_finished = 1; goto __pyx_L9; } __pyx_L9:; } __pyx_L5:; __pyx_L3_continue:; } /* "pandas/lib.pyx":562 * finished = 1 * * if not started: # <<<<<<<<<<<<<< * return slice(0, 0) * if not finished: */ __pyx_t_5 = ((!(__pyx_v_started != 0)) != 0); if (__pyx_t_5) { /* "pandas/lib.pyx":563 * * if not started: * return slice(0, 0) # <<<<<<<<<<<<<< * if not finished: * return slice(start, None) */ __Pyx_XDECREF(__pyx_r); __pyx_t_8 = PyObject_Call(((PyObject *)((PyObject*)(&PySlice_Type))), __pyx_tuple__4, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 563; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_r = __pyx_t_8; __pyx_t_8 = 0; goto __pyx_L0; } /* "pandas/lib.pyx":564 * if not started: * return slice(0, 0) * if not finished: # <<<<<<<<<<<<<< * return slice(start, None) * else: */ __pyx_t_5 = ((!(__pyx_v_finished != 0)) != 0); if (__pyx_t_5) { /* "pandas/lib.pyx":565 * return slice(0, 0) * if not finished: * return slice(start, None) # <<<<<<<<<<<<<< * else: * return slice(start, end) */ __Pyx_XDECREF(__pyx_r); __pyx_t_8 = PyInt_FromSsize_t(__pyx_v_start); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 565; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 565; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_8); __Pyx_GIVEREF(__pyx_t_8); __Pyx_INCREF(Py_None); PyTuple_SET_ITEM(__pyx_t_7, 1, Py_None); __Pyx_GIVEREF(Py_None); __pyx_t_8 = 0; __pyx_t_8 = PyObject_Call(((PyObject *)((PyObject*)(&PySlice_Type))), __pyx_t_7, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 565; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_r = __pyx_t_8; __pyx_t_8 = 0; goto __pyx_L0; } /*else*/ { /* "pandas/lib.pyx":567 * return slice(start, None) * else: * return slice(start, end) # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_8 = PyInt_FromSsize_t(__pyx_v_start); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 567; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_7 = PyInt_FromSsize_t(__pyx_v_end); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 567; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 567; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_8); __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_7); __Pyx_GIVEREF(__pyx_t_7); __pyx_t_8 = 0; __pyx_t_7 = 0; __pyx_t_7 = PyObject_Call(((PyObject *)((PyObject*)(&PySlice_Type))), __pyx_t_6, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 567; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_r = __pyx_t_7; __pyx_t_7 = 0; goto __pyx_L0; } /* "pandas/lib.pyx":541 * * * def maybe_booleans_to_slice(ndarray[uint8_t] mask): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = len(mask) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_mask.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.lib.maybe_booleans_to_slice", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_mask.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/lib.pyx":572 * @cython.wraparound(False) * @cython.boundscheck(False) * def scalar_compare(ndarray[object] values, object val, object op): # <<<<<<<<<<<<<< * import operator * cdef: */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_3lib_55scalar_compare(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_3lib_55scalar_compare = {__Pyx_NAMESTR("scalar_compare"), (PyCFunction)__pyx_pw_6pandas_3lib_55scalar_compare, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_3lib_55scalar_compare(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_values = 0; PyObject *__pyx_v_val = 0; PyObject *__pyx_v_op = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("scalar_compare (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_values,&__pyx_n_s_val,&__pyx_n_s_op,0}; PyObject* values[3] = {0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_values)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_val)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("scalar_compare", 1, 3, 3, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 572; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_op)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("scalar_compare", 1, 3, 3, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 572; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "scalar_compare") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 572; __pyx_clineno = __LINE__; goto __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_val = values[1]; __pyx_v_op = values[2]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("scalar_compare", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 572; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.lib.scalar_compare", __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_filename = __pyx_f[2]; __pyx_lineno = 572; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_3lib_54scalar_compare(__pyx_self, __pyx_v_values, __pyx_v_val, __pyx_v_op); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_3lib_54scalar_compare(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyObject *__pyx_v_val, PyObject *__pyx_v_op) { PyObject *__pyx_v_operator = NULL; Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_n; PyArrayObject *__pyx_v_result = 0; int __pyx_v_flag; PyObject *__pyx_v_x = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_result; __Pyx_Buffer __pyx_pybuffer_result; __Pyx_LocalBuf_ND __pyx_pybuffernd_values; __Pyx_Buffer __pyx_pybuffer_values; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; 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; PyArrayObject *__pyx_t_8 = NULL; int __pyx_t_9; PyObject *__pyx_t_10 = NULL; PyObject *__pyx_t_11 = NULL; PyObject *__pyx_t_12 = NULL; 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("scalar_compare", 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_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_filename = __pyx_f[2]; __pyx_lineno = 572; __pyx_clineno = __LINE__; goto __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/lib.pyx":573 * @cython.boundscheck(False) * def scalar_compare(ndarray[object] values, object val, object op): * import operator # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = len(values) */ __pyx_t_1 = __Pyx_Import(__pyx_n_s_operator, 0, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 573; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_v_operator = __pyx_t_1; __pyx_t_1 = 0; /* "pandas/lib.pyx":575 * import operator * cdef: * Py_ssize_t i, n = len(values) # <<<<<<<<<<<<<< * ndarray[uint8_t, cast=True] result * int flag */ __pyx_t_2 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 575; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_2; /* "pandas/lib.pyx":580 * object x * * if op is operator.lt: # <<<<<<<<<<<<<< * flag = cpython.Py_LT * elif op is operator.le: */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_operator, __pyx_n_s_lt); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 580; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = (__pyx_v_op == __pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_4 = (__pyx_t_3 != 0); if (__pyx_t_4) { /* "pandas/lib.pyx":581 * * if op is operator.lt: * flag = cpython.Py_LT # <<<<<<<<<<<<<< * elif op is operator.le: * flag = cpython.Py_LE */ __pyx_v_flag = Py_LT; goto __pyx_L3; } /* "pandas/lib.pyx":582 * if op is operator.lt: * flag = cpython.Py_LT * elif op is operator.le: # <<<<<<<<<<<<<< * flag = cpython.Py_LE * elif op is operator.gt: */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_operator, __pyx_n_s_le); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 582; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = (__pyx_v_op == __pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_3 = (__pyx_t_4 != 0); if (__pyx_t_3) { /* "pandas/lib.pyx":583 * flag = cpython.Py_LT * elif op is operator.le: * flag = cpython.Py_LE # <<<<<<<<<<<<<< * elif op is operator.gt: * flag = cpython.Py_GT */ __pyx_v_flag = Py_LE; goto __pyx_L3; } /* "pandas/lib.pyx":584 * elif op is operator.le: * flag = cpython.Py_LE * elif op is operator.gt: # <<<<<<<<<<<<<< * flag = cpython.Py_GT * elif op is operator.ge: */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_operator, __pyx_n_s_gt); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 584; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = (__pyx_v_op == __pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_4 = (__pyx_t_3 != 0); if (__pyx_t_4) { /* "pandas/lib.pyx":585 * flag = cpython.Py_LE * elif op is operator.gt: * flag = cpython.Py_GT # <<<<<<<<<<<<<< * elif op is operator.ge: * flag = cpython.Py_GE */ __pyx_v_flag = Py_GT; goto __pyx_L3; } /* "pandas/lib.pyx":586 * elif op is operator.gt: * flag = cpython.Py_GT * elif op is operator.ge: # <<<<<<<<<<<<<< * flag = cpython.Py_GE * elif op is operator.eq: */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_operator, __pyx_n_s_ge); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 586; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = (__pyx_v_op == __pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_3 = (__pyx_t_4 != 0); if (__pyx_t_3) { /* "pandas/lib.pyx":587 * flag = cpython.Py_GT * elif op is operator.ge: * flag = cpython.Py_GE # <<<<<<<<<<<<<< * elif op is operator.eq: * flag = cpython.Py_EQ */ __pyx_v_flag = Py_GE; goto __pyx_L3; } /* "pandas/lib.pyx":588 * elif op is operator.ge: * flag = cpython.Py_GE * elif op is operator.eq: # <<<<<<<<<<<<<< * flag = cpython.Py_EQ * elif op is operator.ne: */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_operator, __pyx_n_s_eq); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 588; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = (__pyx_v_op == __pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_4 = (__pyx_t_3 != 0); if (__pyx_t_4) { /* "pandas/lib.pyx":589 * flag = cpython.Py_GE * elif op is operator.eq: * flag = cpython.Py_EQ # <<<<<<<<<<<<<< * elif op is operator.ne: * flag = cpython.Py_NE */ __pyx_v_flag = Py_EQ; goto __pyx_L3; } /* "pandas/lib.pyx":590 * elif op is operator.eq: * flag = cpython.Py_EQ * elif op is operator.ne: # <<<<<<<<<<<<<< * flag = cpython.Py_NE * else: */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_operator, __pyx_n_s_ne); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 590; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = (__pyx_v_op == __pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_3 = (__pyx_t_4 != 0); if (__pyx_t_3) { /* "pandas/lib.pyx":591 * flag = cpython.Py_EQ * elif op is operator.ne: * flag = cpython.Py_NE # <<<<<<<<<<<<<< * else: * raise ValueError('Unrecognized operator') */ __pyx_v_flag = Py_NE; goto __pyx_L3; } /*else*/ { /* "pandas/lib.pyx":593 * flag = cpython.Py_NE * else: * raise ValueError('Unrecognized operator') # <<<<<<<<<<<<<< * * result = np.empty(n, dtype=bool).view(np.uint8) */ __pyx_t_1 = PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__5, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 593; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 593; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_L3:; /* "pandas/lib.pyx":595 * raise ValueError('Unrecognized operator') * * result = np.empty(n, dtype=bool).view(np.uint8) # <<<<<<<<<<<<<< * * if flag == cpython.Py_NE: */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 595; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_empty); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 595; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_n); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 595; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 595; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 595; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_dtype, ((PyObject*)&PyBool_Type)) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 595; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_7 = PyObject_Call(__pyx_t_5, __pyx_t_6, __pyx_t_1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 595; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_view); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 595; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 595; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_uint8); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 595; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 595; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyObject_Call(__pyx_t_1, __pyx_t_7, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 595; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 595; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_8 = ((PyArrayObject *)__pyx_t_6); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __pyx_t_9 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_t_8, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 1, __pyx_stack); if (unlikely(__pyx_t_9 < 0)) { PyErr_Fetch(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_v_result, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 1, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_11); Py_XDECREF(__pyx_t_12); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_10, __pyx_t_11, __pyx_t_12); } } __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_9 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 595; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_8 = 0; __pyx_v_result = ((PyArrayObject *)__pyx_t_6); __pyx_t_6 = 0; /* "pandas/lib.pyx":597 * result = np.empty(n, dtype=bool).view(np.uint8) * * if flag == cpython.Py_NE: # <<<<<<<<<<<<<< * for i in range(n): * x = values[i] */ __pyx_t_3 = ((__pyx_v_flag == Py_NE) != 0); if (__pyx_t_3) { /* "pandas/lib.pyx":598 * * if flag == cpython.Py_NE: * for i in range(n): # <<<<<<<<<<<<<< * x = values[i] * if _checknull(x): */ __pyx_t_2 = __pyx_v_n; for (__pyx_t_13 = 0; __pyx_t_13 < __pyx_t_2; __pyx_t_13+=1) { __pyx_v_i = __pyx_t_13; /* "pandas/lib.pyx":599 * if flag == cpython.Py_NE: * for i in range(n): * x = values[i] # <<<<<<<<<<<<<< * if _checknull(x): * result[i] = True */ __pyx_t_14 = __pyx_v_i; __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_x, __pyx_t_6); __pyx_t_6 = 0; /* "pandas/lib.pyx":600 * for i in range(n): * x = values[i] * if _checknull(x): # <<<<<<<<<<<<<< * result[i] = True * else: */ __pyx_t_3 = (__pyx_f_4util__checknull(__pyx_v_x) != 0); if (__pyx_t_3) { /* "pandas/lib.pyx":601 * x = values[i] * if _checknull(x): * result[i] = True # <<<<<<<<<<<<<< * else: * result[i] = cpython.PyObject_RichCompareBool(x, val, flag) */ __pyx_t_15 = __pyx_v_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_result.diminfo[0].strides) = 1; goto __pyx_L7; } /*else*/ { /* "pandas/lib.pyx":603 * result[i] = True * else: * result[i] = cpython.PyObject_RichCompareBool(x, val, flag) # <<<<<<<<<<<<<< * else: * for i in range(n): */ __pyx_t_3 = PyObject_RichCompareBool(__pyx_v_x, __pyx_v_val, __pyx_v_flag); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 603; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_16 = __pyx_v_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_result.diminfo[0].strides) = __pyx_t_3; } __pyx_L7:; } goto __pyx_L4; } /*else*/ { /* "pandas/lib.pyx":605 * result[i] = cpython.PyObject_RichCompareBool(x, val, flag) * else: * for i in range(n): # <<<<<<<<<<<<<< * x = values[i] * if _checknull(x): */ __pyx_t_2 = __pyx_v_n; for (__pyx_t_13 = 0; __pyx_t_13 < __pyx_t_2; __pyx_t_13+=1) { __pyx_v_i = __pyx_t_13; /* "pandas/lib.pyx":606 * else: * for i in range(n): * x = values[i] # <<<<<<<<<<<<<< * if _checknull(x): * result[i] = False */ __pyx_t_17 = __pyx_v_i; __pyx_t_6 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_values.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_6); __Pyx_XDECREF_SET(__pyx_v_x, __pyx_t_6); __pyx_t_6 = 0; /* "pandas/lib.pyx":607 * for i in range(n): * x = values[i] * if _checknull(x): # <<<<<<<<<<<<<< * result[i] = False * else: */ __pyx_t_3 = (__pyx_f_4util__checknull(__pyx_v_x) != 0); if (__pyx_t_3) { /* "pandas/lib.pyx":608 * x = values[i] * if _checknull(x): * result[i] = False # <<<<<<<<<<<<<< * else: * result[i] = cpython.PyObject_RichCompareBool(x, val, flag) */ __pyx_t_18 = __pyx_v_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_result.diminfo[0].strides) = 0; goto __pyx_L10; } /*else*/ { /* "pandas/lib.pyx":610 * result[i] = False * else: * result[i] = cpython.PyObject_RichCompareBool(x, val, flag) # <<<<<<<<<<<<<< * * return result.view(bool) */ __pyx_t_3 = PyObject_RichCompareBool(__pyx_v_x, __pyx_v_val, __pyx_v_flag); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 610; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_19 = __pyx_v_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_result.diminfo[0].strides) = __pyx_t_3; } __pyx_L10:; } } __pyx_L4:; /* "pandas/lib.pyx":612 * result[i] = cpython.PyObject_RichCompareBool(x, val, flag) * * return result.view(bool) # <<<<<<<<<<<<<< * * @cython.wraparound(False) */ __Pyx_XDECREF(__pyx_r); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_result), __pyx_n_s_view); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 612; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 612; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_INCREF(((PyObject*)&PyBool_Type)); PyTuple_SET_ITEM(__pyx_t_7, 0, ((PyObject*)&PyBool_Type)); __Pyx_GIVEREF(((PyObject*)&PyBool_Type)); __pyx_t_1 = PyObject_Call(__pyx_t_6, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 612; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "pandas/lib.pyx":572 * @cython.wraparound(False) * @cython.boundscheck(False) * def scalar_compare(ndarray[object] values, object val, object op): # <<<<<<<<<<<<<< * import operator * cdef: */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.lib.scalar_compare", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF(__pyx_v_operator); __Pyx_XDECREF((PyObject *)__pyx_v_result); __Pyx_XDECREF(__pyx_v_x); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/lib.pyx":616 * @cython.wraparound(False) * @cython.boundscheck(False) * def vec_compare(ndarray[object] left, ndarray[object] right, object op): # <<<<<<<<<<<<<< * import operator * cdef: */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_3lib_57vec_compare(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_3lib_57vec_compare = {__Pyx_NAMESTR("vec_compare"), (PyCFunction)__pyx_pw_6pandas_3lib_57vec_compare, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_3lib_57vec_compare(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_left = 0; PyArrayObject *__pyx_v_right = 0; PyObject *__pyx_v_op = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("vec_compare (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_left,&__pyx_n_s_right,&__pyx_n_s_op,0}; PyObject* values[3] = {0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_left)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_right)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("vec_compare", 1, 3, 3, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 616; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_op)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("vec_compare", 1, 3, 3, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 616; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "vec_compare") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 616; __pyx_clineno = __LINE__; goto __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_left = ((PyArrayObject *)values[0]); __pyx_v_right = ((PyArrayObject *)values[1]); __pyx_v_op = values[2]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("vec_compare", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 616; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.lib.vec_compare", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_left), __pyx_ptype_5numpy_ndarray, 1, "left", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 616; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_right), __pyx_ptype_5numpy_ndarray, 1, "right", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 616; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_3lib_56vec_compare(__pyx_self, __pyx_v_left, __pyx_v_right, __pyx_v_op); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_3lib_56vec_compare(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_left, PyArrayObject *__pyx_v_right, PyObject *__pyx_v_op) { PyObject *__pyx_v_operator = NULL; Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_n; PyArrayObject *__pyx_v_result = 0; int __pyx_v_flag; PyObject *__pyx_v_x = NULL; PyObject *__pyx_v_y = NULL; __Pyx_LocalBuf_ND __pyx_pybuffernd_left; __Pyx_Buffer __pyx_pybuffer_left; __Pyx_LocalBuf_ND __pyx_pybuffernd_result; __Pyx_Buffer __pyx_pybuffer_result; __Pyx_LocalBuf_ND __pyx_pybuffernd_right; __Pyx_Buffer __pyx_pybuffer_right; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; Py_ssize_t __pyx_t_2; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; int __pyx_t_6; PyObject *__pyx_t_7 = NULL; PyArrayObject *__pyx_t_8 = NULL; int __pyx_t_9; PyObject *__pyx_t_10 = NULL; PyObject *__pyx_t_11 = NULL; PyObject *__pyx_t_12 = NULL; Py_ssize_t __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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("vec_compare", 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_left.pybuffer.buf = NULL; __pyx_pybuffer_left.refcount = 0; __pyx_pybuffernd_left.data = NULL; __pyx_pybuffernd_left.rcbuffer = &__pyx_pybuffer_left; __pyx_pybuffer_right.pybuffer.buf = NULL; __pyx_pybuffer_right.refcount = 0; __pyx_pybuffernd_right.data = NULL; __pyx_pybuffernd_right.rcbuffer = &__pyx_pybuffer_right; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_left.rcbuffer->pybuffer, (PyObject*)__pyx_v_left, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 616; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_left.diminfo[0].strides = __pyx_pybuffernd_left.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_left.diminfo[0].shape = __pyx_pybuffernd_left.rcbuffer->pybuffer.shape[0]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_right.rcbuffer->pybuffer, (PyObject*)__pyx_v_right, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 616; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_right.diminfo[0].strides = __pyx_pybuffernd_right.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_right.diminfo[0].shape = __pyx_pybuffernd_right.rcbuffer->pybuffer.shape[0]; /* "pandas/lib.pyx":617 * @cython.boundscheck(False) * def vec_compare(ndarray[object] left, ndarray[object] right, object op): * import operator # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = len(left) */ __pyx_t_1 = __Pyx_Import(__pyx_n_s_operator, 0, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 617; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_v_operator = __pyx_t_1; __pyx_t_1 = 0; /* "pandas/lib.pyx":619 * import operator * cdef: * Py_ssize_t i, n = len(left) # <<<<<<<<<<<<<< * ndarray[uint8_t, cast=True] result * int flag */ __pyx_t_2 = PyObject_Length(((PyObject *)__pyx_v_left)); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 619; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_2; /* "pandas/lib.pyx":623 * int flag * * if n != len(right): # <<<<<<<<<<<<<< * raise ValueError('Arrays were different lengths: %d vs %d' * % (n, len(right))) */ __pyx_t_2 = PyObject_Length(((PyObject *)__pyx_v_right)); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 623; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_3 = ((__pyx_v_n != __pyx_t_2) != 0); if (__pyx_t_3) { /* "pandas/lib.pyx":625 * if n != len(right): * raise ValueError('Arrays were different lengths: %d vs %d' * % (n, len(right))) # <<<<<<<<<<<<<< * * if op is operator.lt: */ __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_n); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 625; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyObject_Length(((PyObject *)__pyx_v_right)); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 625; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_4 = PyInt_FromSsize_t(__pyx_t_2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 625; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 625; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_1 = 0; __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Arrays_were_different_lengths_d, __pyx_t_5); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 625; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "pandas/lib.pyx":624 * * if n != len(right): * raise ValueError('Arrays were different lengths: %d vs %d' # <<<<<<<<<<<<<< * % (n, len(right))) * */ __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 624; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyObject_Call(__pyx_builtin_ValueError, __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 624; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_Raise(__pyx_t_4, 0, 0, 0); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; {__pyx_filename = __pyx_f[2]; __pyx_lineno = 624; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } /* "pandas/lib.pyx":627 * % (n, len(right))) * * if op is operator.lt: # <<<<<<<<<<<<<< * flag = cpython.Py_LT * elif op is operator.le: */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_operator, __pyx_n_s_lt); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 627; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = (__pyx_v_op == __pyx_t_4); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_6 = (__pyx_t_3 != 0); if (__pyx_t_6) { /* "pandas/lib.pyx":628 * * if op is operator.lt: * flag = cpython.Py_LT # <<<<<<<<<<<<<< * elif op is operator.le: * flag = cpython.Py_LE */ __pyx_v_flag = Py_LT; goto __pyx_L4; } /* "pandas/lib.pyx":629 * if op is operator.lt: * flag = cpython.Py_LT * elif op is operator.le: # <<<<<<<<<<<<<< * flag = cpython.Py_LE * elif op is operator.gt: */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_operator, __pyx_n_s_le); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 629; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_6 = (__pyx_v_op == __pyx_t_4); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_3 = (__pyx_t_6 != 0); if (__pyx_t_3) { /* "pandas/lib.pyx":630 * flag = cpython.Py_LT * elif op is operator.le: * flag = cpython.Py_LE # <<<<<<<<<<<<<< * elif op is operator.gt: * flag = cpython.Py_GT */ __pyx_v_flag = Py_LE; goto __pyx_L4; } /* "pandas/lib.pyx":631 * elif op is operator.le: * flag = cpython.Py_LE * elif op is operator.gt: # <<<<<<<<<<<<<< * flag = cpython.Py_GT * elif op is operator.ge: */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_operator, __pyx_n_s_gt); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 631; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = (__pyx_v_op == __pyx_t_4); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_6 = (__pyx_t_3 != 0); if (__pyx_t_6) { /* "pandas/lib.pyx":632 * flag = cpython.Py_LE * elif op is operator.gt: * flag = cpython.Py_GT # <<<<<<<<<<<<<< * elif op is operator.ge: * flag = cpython.Py_GE */ __pyx_v_flag = Py_GT; goto __pyx_L4; } /* "pandas/lib.pyx":633 * elif op is operator.gt: * flag = cpython.Py_GT * elif op is operator.ge: # <<<<<<<<<<<<<< * flag = cpython.Py_GE * elif op is operator.eq: */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_operator, __pyx_n_s_ge); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 633; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_6 = (__pyx_v_op == __pyx_t_4); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_3 = (__pyx_t_6 != 0); if (__pyx_t_3) { /* "pandas/lib.pyx":634 * flag = cpython.Py_GT * elif op is operator.ge: * flag = cpython.Py_GE # <<<<<<<<<<<<<< * elif op is operator.eq: * flag = cpython.Py_EQ */ __pyx_v_flag = Py_GE; goto __pyx_L4; } /* "pandas/lib.pyx":635 * elif op is operator.ge: * flag = cpython.Py_GE * elif op is operator.eq: # <<<<<<<<<<<<<< * flag = cpython.Py_EQ * elif op is operator.ne: */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_operator, __pyx_n_s_eq); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 635; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = (__pyx_v_op == __pyx_t_4); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_6 = (__pyx_t_3 != 0); if (__pyx_t_6) { /* "pandas/lib.pyx":636 * flag = cpython.Py_GE * elif op is operator.eq: * flag = cpython.Py_EQ # <<<<<<<<<<<<<< * elif op is operator.ne: * flag = cpython.Py_NE */ __pyx_v_flag = Py_EQ; goto __pyx_L4; } /* "pandas/lib.pyx":637 * elif op is operator.eq: * flag = cpython.Py_EQ * elif op is operator.ne: # <<<<<<<<<<<<<< * flag = cpython.Py_NE * else: */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_operator, __pyx_n_s_ne); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 637; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_6 = (__pyx_v_op == __pyx_t_4); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_3 = (__pyx_t_6 != 0); if (__pyx_t_3) { /* "pandas/lib.pyx":638 * flag = cpython.Py_EQ * elif op is operator.ne: * flag = cpython.Py_NE # <<<<<<<<<<<<<< * else: * raise ValueError('Unrecognized operator') */ __pyx_v_flag = Py_NE; goto __pyx_L4; } /*else*/ { /* "pandas/lib.pyx":640 * flag = cpython.Py_NE * else: * raise ValueError('Unrecognized operator') # <<<<<<<<<<<<<< * * result = np.empty(n, dtype=bool).view(np.uint8) */ __pyx_t_4 = PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__6, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 640; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 640; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_L4:; /* "pandas/lib.pyx":642 * raise ValueError('Unrecognized operator') * * result = np.empty(n, dtype=bool).view(np.uint8) # <<<<<<<<<<<<<< * * if flag == cpython.Py_NE: */ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 642; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_empty); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 642; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyInt_FromSsize_t(__pyx_v_n); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 642; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 642; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyDict_New(); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 642; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_dtype, ((PyObject*)&PyBool_Type)) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 642; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_7 = PyObject_Call(__pyx_t_5, __pyx_t_1, __pyx_t_4); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 642; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_view); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 642; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 642; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_uint8); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 642; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 642; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyObject_Call(__pyx_t_4, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 642; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 642; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_8 = ((PyArrayObject *)__pyx_t_1); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __pyx_t_9 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_t_8, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 1, __pyx_stack); if (unlikely(__pyx_t_9 < 0)) { PyErr_Fetch(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_v_result, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 1, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_11); Py_XDECREF(__pyx_t_12); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_10, __pyx_t_11, __pyx_t_12); } } __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_9 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 642; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_8 = 0; __pyx_v_result = ((PyArrayObject *)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/lib.pyx":644 * result = np.empty(n, dtype=bool).view(np.uint8) * * if flag == cpython.Py_NE: # <<<<<<<<<<<<<< * for i in range(n): * x = left[i] */ __pyx_t_3 = ((__pyx_v_flag == Py_NE) != 0); if (__pyx_t_3) { /* "pandas/lib.pyx":645 * * if flag == cpython.Py_NE: * for i in range(n): # <<<<<<<<<<<<<< * x = left[i] * y = right[i] */ __pyx_t_2 = __pyx_v_n; for (__pyx_t_13 = 0; __pyx_t_13 < __pyx_t_2; __pyx_t_13+=1) { __pyx_v_i = __pyx_t_13; /* "pandas/lib.pyx":646 * if flag == cpython.Py_NE: * for i in range(n): * x = left[i] # <<<<<<<<<<<<<< * y = right[i] * */ __pyx_t_14 = __pyx_v_i; __pyx_t_1 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_left.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_left.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_1); __Pyx_XDECREF_SET(__pyx_v_x, __pyx_t_1); __pyx_t_1 = 0; /* "pandas/lib.pyx":647 * for i in range(n): * x = left[i] * y = right[i] # <<<<<<<<<<<<<< * * if _checknull(x) or _checknull(y): */ __pyx_t_15 = __pyx_v_i; __pyx_t_1 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_right.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_right.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_1); __Pyx_XDECREF_SET(__pyx_v_y, __pyx_t_1); __pyx_t_1 = 0; /* "pandas/lib.pyx":649 * y = right[i] * * if _checknull(x) or _checknull(y): # <<<<<<<<<<<<<< * result[i] = True * else: */ __pyx_t_3 = (__pyx_f_4util__checknull(__pyx_v_x) != 0); if (!__pyx_t_3) { __pyx_t_6 = (__pyx_f_4util__checknull(__pyx_v_y) != 0); __pyx_t_16 = __pyx_t_6; } else { __pyx_t_16 = __pyx_t_3; } if (__pyx_t_16) { /* "pandas/lib.pyx":650 * * if _checknull(x) or _checknull(y): * result[i] = True # <<<<<<<<<<<<<< * else: * result[i] = cpython.PyObject_RichCompareBool(x, y, flag) */ __pyx_t_17 = __pyx_v_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_result.diminfo[0].strides) = 1; goto __pyx_L8; } /*else*/ { /* "pandas/lib.pyx":652 * result[i] = True * else: * result[i] = cpython.PyObject_RichCompareBool(x, y, flag) # <<<<<<<<<<<<<< * else: * for i in range(n): */ __pyx_t_16 = PyObject_RichCompareBool(__pyx_v_x, __pyx_v_y, __pyx_v_flag); if (unlikely(__pyx_t_16 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 652; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_18 = __pyx_v_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_result.diminfo[0].strides) = __pyx_t_16; } __pyx_L8:; } goto __pyx_L5; } /*else*/ { /* "pandas/lib.pyx":654 * result[i] = cpython.PyObject_RichCompareBool(x, y, flag) * else: * for i in range(n): # <<<<<<<<<<<<<< * x = left[i] * y = right[i] */ __pyx_t_2 = __pyx_v_n; for (__pyx_t_13 = 0; __pyx_t_13 < __pyx_t_2; __pyx_t_13+=1) { __pyx_v_i = __pyx_t_13; /* "pandas/lib.pyx":655 * else: * for i in range(n): * x = left[i] # <<<<<<<<<<<<<< * y = right[i] * */ __pyx_t_19 = __pyx_v_i; __pyx_t_1 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_left.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_left.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_1); __Pyx_XDECREF_SET(__pyx_v_x, __pyx_t_1); __pyx_t_1 = 0; /* "pandas/lib.pyx":656 * for i in range(n): * x = left[i] * y = right[i] # <<<<<<<<<<<<<< * * if _checknull(x) or _checknull(y): */ __pyx_t_20 = __pyx_v_i; __pyx_t_1 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_right.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_right.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_1); __Pyx_XDECREF_SET(__pyx_v_y, __pyx_t_1); __pyx_t_1 = 0; /* "pandas/lib.pyx":658 * y = right[i] * * if _checknull(x) or _checknull(y): # <<<<<<<<<<<<<< * result[i] = False * else: */ __pyx_t_16 = (__pyx_f_4util__checknull(__pyx_v_x) != 0); if (!__pyx_t_16) { __pyx_t_3 = (__pyx_f_4util__checknull(__pyx_v_y) != 0); __pyx_t_6 = __pyx_t_3; } else { __pyx_t_6 = __pyx_t_16; } if (__pyx_t_6) { /* "pandas/lib.pyx":659 * * if _checknull(x) or _checknull(y): * result[i] = False # <<<<<<<<<<<<<< * else: * result[i] = cpython.PyObject_RichCompareBool(x, y, flag) */ __pyx_t_21 = __pyx_v_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_result.diminfo[0].strides) = 0; goto __pyx_L11; } /*else*/ { /* "pandas/lib.pyx":661 * result[i] = False * else: * result[i] = cpython.PyObject_RichCompareBool(x, y, flag) # <<<<<<<<<<<<<< * * return result.view(bool) */ __pyx_t_6 = PyObject_RichCompareBool(__pyx_v_x, __pyx_v_y, __pyx_v_flag); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 661; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_22 = __pyx_v_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_22, __pyx_pybuffernd_result.diminfo[0].strides) = __pyx_t_6; } __pyx_L11:; } } __pyx_L5:; /* "pandas/lib.pyx":663 * result[i] = cpython.PyObject_RichCompareBool(x, y, flag) * * return result.view(bool) # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_result), __pyx_n_s_view); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 663; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 663; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_INCREF(((PyObject*)&PyBool_Type)); PyTuple_SET_ITEM(__pyx_t_7, 0, ((PyObject*)&PyBool_Type)); __Pyx_GIVEREF(((PyObject*)&PyBool_Type)); __pyx_t_4 = PyObject_Call(__pyx_t_1, __pyx_t_7, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 663; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; /* "pandas/lib.pyx":616 * @cython.wraparound(False) * @cython.boundscheck(False) * def vec_compare(ndarray[object] left, ndarray[object] right, object op): # <<<<<<<<<<<<<< * import operator * cdef: */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_7); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_left.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_right.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.lib.vec_compare", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_left.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_right.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF(__pyx_v_operator); __Pyx_XDECREF((PyObject *)__pyx_v_result); __Pyx_XDECREF(__pyx_v_x); __Pyx_XDECREF(__pyx_v_y); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/lib.pyx":668 * @cython.wraparound(False) * @cython.boundscheck(False) * def scalar_binop(ndarray[object] values, object val, object op): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = len(values) */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_3lib_59scalar_binop(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_3lib_59scalar_binop = {__Pyx_NAMESTR("scalar_binop"), (PyCFunction)__pyx_pw_6pandas_3lib_59scalar_binop, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_3lib_59scalar_binop(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_values = 0; PyObject *__pyx_v_val = 0; PyObject *__pyx_v_op = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("scalar_binop (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_values,&__pyx_n_s_val,&__pyx_n_s_op,0}; PyObject* values[3] = {0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_values)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_val)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("scalar_binop", 1, 3, 3, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 668; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_op)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("scalar_binop", 1, 3, 3, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 668; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "scalar_binop") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 668; __pyx_clineno = __LINE__; goto __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_val = values[1]; __pyx_v_op = values[2]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("scalar_binop", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 668; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.lib.scalar_binop", __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_filename = __pyx_f[2]; __pyx_lineno = 668; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_3lib_58scalar_binop(__pyx_self, __pyx_v_values, __pyx_v_val, __pyx_v_op); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_3lib_58scalar_binop(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyObject *__pyx_v_val, PyObject *__pyx_v_op) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_n; PyArrayObject *__pyx_v_result = 0; PyObject *__pyx_v_x = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_result; __Pyx_Buffer __pyx_pybuffer_result; __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; PyArrayObject *__pyx_t_6 = NULL; int __pyx_t_7; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; int __pyx_t_11; Py_ssize_t __pyx_t_12; Py_ssize_t __pyx_t_13; Py_ssize_t __pyx_t_14; PyObject **__pyx_t_15; Py_ssize_t __pyx_t_16; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("scalar_binop", 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_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_filename = __pyx_f[2]; __pyx_lineno = 668; __pyx_clineno = __LINE__; goto __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/lib.pyx":670 * def scalar_binop(ndarray[object] values, object val, object op): * cdef: * Py_ssize_t i, n = len(values) # <<<<<<<<<<<<<< * ndarray[object] result * object x */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 670; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/lib.pyx":674 * object x * * result = np.empty(n, dtype=object) # <<<<<<<<<<<<<< * if util._checknull(val): * result.fill(val) */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 674; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 674; __pyx_clineno = __LINE__; goto __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_n); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 674; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 674; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 674; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_dtype, __pyx_builtin_object) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 674; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_5 = PyObject_Call(__pyx_t_3, __pyx_t_4, __pyx_t_2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 674; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 674; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_6 = ((PyArrayObject *)__pyx_t_5); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_object, 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_result.rcbuffer->pybuffer, (PyObject*)__pyx_v_result, &__Pyx_TypeInfo_object, 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_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_7 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 674; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_6 = 0; __pyx_v_result = ((PyArrayObject *)__pyx_t_5); __pyx_t_5 = 0; /* "pandas/lib.pyx":675 * * result = np.empty(n, dtype=object) * if util._checknull(val): # <<<<<<<<<<<<<< * result.fill(val) * return result */ __pyx_t_11 = (__pyx_f_4util__checknull(__pyx_v_val) != 0); if (__pyx_t_11) { /* "pandas/lib.pyx":676 * result = np.empty(n, dtype=object) * if util._checknull(val): * result.fill(val) # <<<<<<<<<<<<<< * return result * */ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_result), __pyx_n_s_fill); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 676; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 676; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_val); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_val); __Pyx_GIVEREF(__pyx_v_val); __pyx_t_4 = PyObject_Call(__pyx_t_5, __pyx_t_2, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 676; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "pandas/lib.pyx":677 * if util._checknull(val): * result.fill(val) * return result # <<<<<<<<<<<<<< * * for i in range(n): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_result)); __pyx_r = ((PyObject *)__pyx_v_result); goto __pyx_L0; } /* "pandas/lib.pyx":679 * return result * * for i in range(n): # <<<<<<<<<<<<<< * x = values[i] * if util._checknull(x): */ __pyx_t_1 = __pyx_v_n; for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_1; __pyx_t_12+=1) { __pyx_v_i = __pyx_t_12; /* "pandas/lib.pyx":680 * * for i in range(n): * x = values[i] # <<<<<<<<<<<<<< * if util._checknull(x): * result[i] = x */ __pyx_t_13 = __pyx_v_i; __pyx_t_4 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_values.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_4); __Pyx_XDECREF_SET(__pyx_v_x, __pyx_t_4); __pyx_t_4 = 0; /* "pandas/lib.pyx":681 * for i in range(n): * x = values[i] * if util._checknull(x): # <<<<<<<<<<<<<< * result[i] = x * else: */ __pyx_t_11 = (__pyx_f_4util__checknull(__pyx_v_x) != 0); if (__pyx_t_11) { /* "pandas/lib.pyx":682 * x = values[i] * if util._checknull(x): * result[i] = x # <<<<<<<<<<<<<< * else: * result[i] = op(x, val) */ __pyx_t_14 = __pyx_v_i; __pyx_t_15 = __Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_result.diminfo[0].strides); __Pyx_GOTREF(*__pyx_t_15); __Pyx_INCREF(__pyx_v_x); __Pyx_DECREF(*__pyx_t_15); *__pyx_t_15 = __pyx_v_x; __Pyx_GIVEREF(*__pyx_t_15); goto __pyx_L6; } /*else*/ { /* "pandas/lib.pyx":684 * result[i] = x * else: * result[i] = op(x, val) # <<<<<<<<<<<<<< * * return maybe_convert_bool(result) */ __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 684; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_v_x); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_x); __Pyx_GIVEREF(__pyx_v_x); __Pyx_INCREF(__pyx_v_val); PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_val); __Pyx_GIVEREF(__pyx_v_val); __pyx_t_2 = PyObject_Call(__pyx_v_op, __pyx_t_4, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 684; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_16 = __pyx_v_i; __pyx_t_15 = __Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_result.diminfo[0].strides); __Pyx_GOTREF(*__pyx_t_15); __Pyx_INCREF(__pyx_t_2); __Pyx_DECREF(*__pyx_t_15); *__pyx_t_15 = __pyx_t_2; __Pyx_GIVEREF(*__pyx_t_15); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } __pyx_L6:; } /* "pandas/lib.pyx":686 * result[i] = op(x, val) * * return maybe_convert_bool(result) # <<<<<<<<<<<<<< * * @cython.wraparound(False) */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_maybe_convert_bool); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 686; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 686; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(((PyObject *)__pyx_v_result)); PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_v_result)); __Pyx_GIVEREF(((PyObject *)__pyx_v_result)); __pyx_t_5 = PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 686; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_r = __pyx_t_5; __pyx_t_5 = 0; goto __pyx_L0; /* "pandas/lib.pyx":668 * @cython.wraparound(False) * @cython.boundscheck(False) * def scalar_binop(ndarray[object] values, object val, object op): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = len(values) */ /* 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); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.lib.scalar_binop", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_result); __Pyx_XDECREF(__pyx_v_x); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/lib.pyx":690 * @cython.wraparound(False) * @cython.boundscheck(False) * def vec_binop(ndarray[object] left, ndarray[object] right, object op): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = len(left) */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_3lib_61vec_binop(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_3lib_61vec_binop = {__Pyx_NAMESTR("vec_binop"), (PyCFunction)__pyx_pw_6pandas_3lib_61vec_binop, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_3lib_61vec_binop(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_left = 0; PyArrayObject *__pyx_v_right = 0; PyObject *__pyx_v_op = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("vec_binop (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_left,&__pyx_n_s_right,&__pyx_n_s_op,0}; PyObject* values[3] = {0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_left)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_right)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("vec_binop", 1, 3, 3, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 690; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_op)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("vec_binop", 1, 3, 3, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 690; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "vec_binop") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 690; __pyx_clineno = __LINE__; goto __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_left = ((PyArrayObject *)values[0]); __pyx_v_right = ((PyArrayObject *)values[1]); __pyx_v_op = values[2]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("vec_binop", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 690; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.lib.vec_binop", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_left), __pyx_ptype_5numpy_ndarray, 1, "left", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 690; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_right), __pyx_ptype_5numpy_ndarray, 1, "right", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 690; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_3lib_60vec_binop(__pyx_self, __pyx_v_left, __pyx_v_right, __pyx_v_op); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_3lib_60vec_binop(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_left, PyArrayObject *__pyx_v_right, PyObject *__pyx_v_op) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_n; PyArrayObject *__pyx_v_result = 0; PyObject *__pyx_v_x = NULL; PyObject *__pyx_v_y = NULL; __Pyx_LocalBuf_ND __pyx_pybuffernd_left; __Pyx_Buffer __pyx_pybuffer_left; __Pyx_LocalBuf_ND __pyx_pybuffernd_result; __Pyx_Buffer __pyx_pybuffer_result; __Pyx_LocalBuf_ND __pyx_pybuffernd_right; __Pyx_Buffer __pyx_pybuffer_right; 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; 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; Py_ssize_t __pyx_t_15; PyObject **__pyx_t_16; Py_ssize_t __pyx_t_17; Py_ssize_t __pyx_t_18; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("vec_binop", 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_left.pybuffer.buf = NULL; __pyx_pybuffer_left.refcount = 0; __pyx_pybuffernd_left.data = NULL; __pyx_pybuffernd_left.rcbuffer = &__pyx_pybuffer_left; __pyx_pybuffer_right.pybuffer.buf = NULL; __pyx_pybuffer_right.refcount = 0; __pyx_pybuffernd_right.data = NULL; __pyx_pybuffernd_right.rcbuffer = &__pyx_pybuffer_right; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_left.rcbuffer->pybuffer, (PyObject*)__pyx_v_left, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 690; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_left.diminfo[0].strides = __pyx_pybuffernd_left.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_left.diminfo[0].shape = __pyx_pybuffernd_left.rcbuffer->pybuffer.shape[0]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_right.rcbuffer->pybuffer, (PyObject*)__pyx_v_right, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 690; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_right.diminfo[0].strides = __pyx_pybuffernd_right.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_right.diminfo[0].shape = __pyx_pybuffernd_right.rcbuffer->pybuffer.shape[0]; /* "pandas/lib.pyx":692 * def vec_binop(ndarray[object] left, ndarray[object] right, object op): * cdef: * Py_ssize_t i, n = len(left) # <<<<<<<<<<<<<< * ndarray[object] result * */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_left)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 692; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/lib.pyx":695 * ndarray[object] result * * if n != len(right): # <<<<<<<<<<<<<< * raise ValueError('Arrays were different lengths: %d vs %d' * % (n, len(right))) */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_right)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 695; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_2 = ((__pyx_v_n != __pyx_t_1) != 0); if (__pyx_t_2) { /* "pandas/lib.pyx":697 * if n != len(right): * raise ValueError('Arrays were different lengths: %d vs %d' * % (n, len(right))) # <<<<<<<<<<<<<< * * result = np.empty(n, dtype=object) */ __pyx_t_3 = PyInt_FromSsize_t(__pyx_v_n); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 697; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_right)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 697; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_4 = PyInt_FromSsize_t(__pyx_t_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 697; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 697; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_3 = 0; __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Arrays_were_different_lengths_d, __pyx_t_5); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 697; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "pandas/lib.pyx":696 * * if n != len(right): * raise ValueError('Arrays were different lengths: %d vs %d' # <<<<<<<<<<<<<< * % (n, len(right))) * */ __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 696; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyObject_Call(__pyx_builtin_ValueError, __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 696; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_Raise(__pyx_t_4, 0, 0, 0); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; {__pyx_filename = __pyx_f[2]; __pyx_lineno = 696; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } /* "pandas/lib.pyx":699 * % (n, len(right))) * * result = np.empty(n, dtype=object) # <<<<<<<<<<<<<< * * for i in range(n): */ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 699; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_empty); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 699; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyInt_FromSsize_t(__pyx_v_n); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 699; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 699; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyDict_New(); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 699; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_dtype, __pyx_builtin_object) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 699; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_6 = PyObject_Call(__pyx_t_5, __pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 699; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 699; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_7 = ((PyArrayObject *)__pyx_t_6); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_object, 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_result.rcbuffer->pybuffer, (PyObject*)__pyx_v_result, &__Pyx_TypeInfo_object, 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_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_8 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 699; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_7 = 0; __pyx_v_result = ((PyArrayObject *)__pyx_t_6); __pyx_t_6 = 0; /* "pandas/lib.pyx":701 * result = np.empty(n, dtype=object) * * for i in range(n): # <<<<<<<<<<<<<< * x = left[i] * y = right[i] */ __pyx_t_1 = __pyx_v_n; for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_1; __pyx_t_12+=1) { __pyx_v_i = __pyx_t_12; /* "pandas/lib.pyx":702 * * for i in range(n): * x = left[i] # <<<<<<<<<<<<<< * y = right[i] * try: */ __pyx_t_13 = __pyx_v_i; __pyx_t_6 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_left.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_left.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_6); __Pyx_XDECREF_SET(__pyx_v_x, __pyx_t_6); __pyx_t_6 = 0; /* "pandas/lib.pyx":703 * for i in range(n): * x = left[i] * y = right[i] # <<<<<<<<<<<<<< * try: * result[i] = op(x, y) */ __pyx_t_14 = __pyx_v_i; __pyx_t_6 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_right.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_right.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_6); __Pyx_XDECREF_SET(__pyx_v_y, __pyx_t_6); __pyx_t_6 = 0; /* "pandas/lib.pyx":704 * x = left[i] * y = right[i] * try: # <<<<<<<<<<<<<< * result[i] = op(x, y) * except TypeError: */ { __Pyx_ExceptionSave(&__pyx_t_11, &__pyx_t_10, &__pyx_t_9); __Pyx_XGOTREF(__pyx_t_11); __Pyx_XGOTREF(__pyx_t_10); __Pyx_XGOTREF(__pyx_t_9); /*try:*/ { /* "pandas/lib.pyx":705 * y = right[i] * try: * result[i] = op(x, y) # <<<<<<<<<<<<<< * except TypeError: * if util._checknull(x): */ __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 705; __pyx_clineno = __LINE__; goto __pyx_L6_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(__pyx_v_x); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_x); __Pyx_GIVEREF(__pyx_v_x); __Pyx_INCREF(__pyx_v_y); PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_v_y); __Pyx_GIVEREF(__pyx_v_y); __pyx_t_4 = PyObject_Call(__pyx_v_op, __pyx_t_6, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 705; __pyx_clineno = __LINE__; goto __pyx_L6_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_15 = __pyx_v_i; __pyx_t_16 = __Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_result.diminfo[0].strides); __Pyx_GOTREF(*__pyx_t_16); __Pyx_INCREF(__pyx_t_4); __Pyx_DECREF(*__pyx_t_16); *__pyx_t_16 = __pyx_t_4; __Pyx_GIVEREF(*__pyx_t_16); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; goto __pyx_L13_try_end; __pyx_L6_error:; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; /* "pandas/lib.pyx":706 * try: * result[i] = op(x, y) * except TypeError: # <<<<<<<<<<<<<< * if util._checknull(x): * result[i] = x */ __pyx_t_8 = PyErr_ExceptionMatches(__pyx_builtin_TypeError); if (__pyx_t_8) { __Pyx_AddTraceback("pandas.lib.vec_binop", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_6, &__pyx_t_3) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 706; __pyx_clineno = __LINE__; goto __pyx_L8_except_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_GOTREF(__pyx_t_6); __Pyx_GOTREF(__pyx_t_3); /* "pandas/lib.pyx":707 * result[i] = op(x, y) * except TypeError: * if util._checknull(x): # <<<<<<<<<<<<<< * result[i] = x * elif util._checknull(y): */ __pyx_t_2 = (__pyx_f_4util__checknull(__pyx_v_x) != 0); if (__pyx_t_2) { /* "pandas/lib.pyx":708 * except TypeError: * if util._checknull(x): * result[i] = x # <<<<<<<<<<<<<< * elif util._checknull(y): * result[i] = y */ __pyx_t_17 = __pyx_v_i; __pyx_t_16 = __Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_result.diminfo[0].strides); __Pyx_GOTREF(*__pyx_t_16); __Pyx_INCREF(__pyx_v_x); __Pyx_DECREF(*__pyx_t_16); *__pyx_t_16 = __pyx_v_x; __Pyx_GIVEREF(*__pyx_t_16); goto __pyx_L16; } /* "pandas/lib.pyx":709 * if util._checknull(x): * result[i] = x * elif util._checknull(y): # <<<<<<<<<<<<<< * result[i] = y * else: */ __pyx_t_2 = (__pyx_f_4util__checknull(__pyx_v_y) != 0); if (__pyx_t_2) { /* "pandas/lib.pyx":710 * result[i] = x * elif util._checknull(y): * result[i] = y # <<<<<<<<<<<<<< * else: * raise */ __pyx_t_18 = __pyx_v_i; __pyx_t_16 = __Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_result.diminfo[0].strides); __Pyx_GOTREF(*__pyx_t_16); __Pyx_INCREF(__pyx_v_y); __Pyx_DECREF(*__pyx_t_16); *__pyx_t_16 = __pyx_v_y; __Pyx_GIVEREF(*__pyx_t_16); goto __pyx_L16; } /*else*/ { /* "pandas/lib.pyx":712 * result[i] = y * else: * raise # <<<<<<<<<<<<<< * * return maybe_convert_bool(result) */ __Pyx_GIVEREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_6); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ErrRestore(__pyx_t_4, __pyx_t_6, __pyx_t_3); __pyx_t_4 = 0; __pyx_t_6 = 0; __pyx_t_3 = 0; {__pyx_filename = __pyx_f[2]; __pyx_lineno = 712; __pyx_clineno = __LINE__; goto __pyx_L8_except_error;} } __pyx_L16:; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L7_exception_handled; } goto __pyx_L8_except_error; __pyx_L8_except_error:; __Pyx_XGIVEREF(__pyx_t_11); __Pyx_XGIVEREF(__pyx_t_10); __Pyx_XGIVEREF(__pyx_t_9); __Pyx_ExceptionReset(__pyx_t_11, __pyx_t_10, __pyx_t_9); goto __pyx_L1_error; __pyx_L7_exception_handled:; __Pyx_XGIVEREF(__pyx_t_11); __Pyx_XGIVEREF(__pyx_t_10); __Pyx_XGIVEREF(__pyx_t_9); __Pyx_ExceptionReset(__pyx_t_11, __pyx_t_10, __pyx_t_9); __pyx_L13_try_end:; } } /* "pandas/lib.pyx":714 * raise * * return maybe_convert_bool(result) # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_maybe_convert_bool); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 714; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 714; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(((PyObject *)__pyx_v_result)); PyTuple_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_v_result)); __Pyx_GIVEREF(((PyObject *)__pyx_v_result)); __pyx_t_4 = PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 714; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; /* "pandas/lib.pyx":690 * @cython.wraparound(False) * @cython.boundscheck(False) * def vec_binop(ndarray[object] left, ndarray[object] right, object op): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = len(left) */ /* 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_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_left.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_right.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.lib.vec_binop", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_left.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_right.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_result); __Pyx_XDECREF(__pyx_v_x); __Pyx_XDECREF(__pyx_v_y); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/lib.pyx":717 * * * def astype_intsafe(ndarray[object] arr, new_dtype): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = len(arr) */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_3lib_63astype_intsafe(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_3lib_63astype_intsafe = {__Pyx_NAMESTR("astype_intsafe"), (PyCFunction)__pyx_pw_6pandas_3lib_63astype_intsafe, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_3lib_63astype_intsafe(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_arr = 0; PyObject *__pyx_v_new_dtype = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("astype_intsafe (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_arr,&__pyx_n_s_new_dtype,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_arr)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_new_dtype)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("astype_intsafe", 1, 2, 2, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 717; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "astype_intsafe") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 717; __pyx_clineno = __LINE__; goto __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_new_dtype = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("astype_intsafe", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 717; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.lib.astype_intsafe", __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_filename = __pyx_f[2]; __pyx_lineno = 717; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_3lib_62astype_intsafe(__pyx_self, __pyx_v_arr, __pyx_v_new_dtype); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_3lib_62astype_intsafe(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_arr, PyObject *__pyx_v_new_dtype) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_n; PyObject *__pyx_v_v = 0; int __pyx_v_is_datelike; PyArrayObject *__pyx_v_result = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_arr; __Pyx_Buffer __pyx_pybuffer_arr; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_t_4; int __pyx_t_5; int __pyx_t_6; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; Py_ssize_t __pyx_t_9; Py_ssize_t __pyx_t_10; int __pyx_t_11; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("astype_intsafe", 0); __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_filename = __pyx_f[2]; __pyx_lineno = 717; __pyx_clineno = __LINE__; goto __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/lib.pyx":719 * def astype_intsafe(ndarray[object] arr, new_dtype): * cdef: * Py_ssize_t i, n = len(arr) # <<<<<<<<<<<<<< * object v * bint is_datelike */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_arr)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 719; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/lib.pyx":725 * * # on 32-bit, 1.6.2 numpy M8[ns] is a subdtype of integer, which is weird * is_datelike = new_dtype in ['M8[ns]','m8[ns]'] # <<<<<<<<<<<<<< * * result = np.empty(n, dtype=new_dtype) */ __Pyx_INCREF(__pyx_v_new_dtype); __pyx_t_2 = __pyx_v_new_dtype; __pyx_t_3 = PyObject_RichCompare(__pyx_t_2, __pyx_kp_s_M8_ns, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 725; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 725; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (!((int)__pyx_t_4)) { __pyx_t_3 = PyObject_RichCompare(__pyx_t_2, __pyx_kp_s_m8_ns, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 725; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 725; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_6 = ((int)__pyx_t_5); } else { __pyx_t_6 = ((int)__pyx_t_4); } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_is_datelike = __pyx_t_6; /* "pandas/lib.pyx":727 * is_datelike = new_dtype in ['M8[ns]','m8[ns]'] * * result = np.empty(n, dtype=new_dtype) # <<<<<<<<<<<<<< * for i in range(n): * v = arr[i] */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 727; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 727; __pyx_clineno = __LINE__; goto __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_n); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 727; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 727; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 727; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_dtype, __pyx_v_new_dtype) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 727; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_8 = PyObject_Call(__pyx_t_3, __pyx_t_7, __pyx_t_2); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 727; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (!(likely(((__pyx_t_8) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_8, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 727; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_result = ((PyArrayObject *)__pyx_t_8); __pyx_t_8 = 0; /* "pandas/lib.pyx":728 * * result = np.empty(n, dtype=new_dtype) * for i in range(n): # <<<<<<<<<<<<<< * v = arr[i] * if is_datelike and checknull(v): */ __pyx_t_1 = __pyx_v_n; for (__pyx_t_9 = 0; __pyx_t_9 < __pyx_t_1; __pyx_t_9+=1) { __pyx_v_i = __pyx_t_9; /* "pandas/lib.pyx":729 * result = np.empty(n, dtype=new_dtype) * for i in range(n): * v = arr[i] # <<<<<<<<<<<<<< * if is_datelike and checknull(v): * result[i] = NPY_NAT */ __pyx_t_10 = __pyx_v_i; __pyx_t_11 = -1; if (__pyx_t_10 < 0) { __pyx_t_10 += __pyx_pybuffernd_arr.diminfo[0].shape; if (unlikely(__pyx_t_10 < 0)) __pyx_t_11 = 0; } else if (unlikely(__pyx_t_10 >= __pyx_pybuffernd_arr.diminfo[0].shape)) __pyx_t_11 = 0; if (unlikely(__pyx_t_11 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_11); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 729; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_8 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_arr.rcbuffer->pybuffer.buf, __pyx_t_10, __pyx_pybuffernd_arr.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_8); __Pyx_XDECREF_SET(__pyx_v_v, __pyx_t_8); __pyx_t_8 = 0; /* "pandas/lib.pyx":730 * for i in range(n): * v = arr[i] * if is_datelike and checknull(v): # <<<<<<<<<<<<<< * result[i] = NPY_NAT * else: */ __pyx_t_6 = __pyx_v_is_datelike; if (__pyx_t_6) { __pyx_t_8 = __pyx_f_6pandas_3lib_checknull(__pyx_v_v, 0); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 730; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 730; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_5 = __pyx_t_4; } else { __pyx_t_5 = __pyx_t_6; } if (__pyx_t_5) { /* "pandas/lib.pyx":731 * v = arr[i] * if is_datelike and checknull(v): * result[i] = NPY_NAT # <<<<<<<<<<<<<< * else: * util.set_value_at(result, i, v) */ __pyx_t_8 = __Pyx_PyInt_From_npy_int64(__pyx_v_6pandas_3lib_NPY_NAT); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 731; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); if (unlikely(__Pyx_SetItemInt(((PyObject *)__pyx_v_result), __pyx_v_i, __pyx_t_8, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1) < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 731; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; goto __pyx_L5; } /*else*/ { /* "pandas/lib.pyx":733 * result[i] = NPY_NAT * else: * util.set_value_at(result, i, v) # <<<<<<<<<<<<<< * * return result */ __pyx_t_8 = PyInt_FromSsize_t(__pyx_v_i); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 733; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_2 = __pyx_f_4util_set_value_at(__pyx_v_result, __pyx_t_8, __pyx_v_v); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 733; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } __pyx_L5:; } /* "pandas/lib.pyx":735 * util.set_value_at(result, i, v) * * return result # <<<<<<<<<<<<<< * * cpdef ndarray[object] astype_str(ndarray arr): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_result)); __pyx_r = ((PyObject *)__pyx_v_result); goto __pyx_L0; /* "pandas/lib.pyx":717 * * * def astype_intsafe(ndarray[object] arr, new_dtype): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = len(arr) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_arr.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.lib.astype_intsafe", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_arr.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF(__pyx_v_v); __Pyx_XDECREF((PyObject *)__pyx_v_result); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/lib.pyx":737 * return result * * cpdef ndarray[object] astype_str(ndarray arr): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = arr.size */ static PyObject *__pyx_pw_6pandas_3lib_65astype_str(PyObject *__pyx_self, PyObject *__pyx_v_arr); /*proto*/ static PyArrayObject *__pyx_f_6pandas_3lib_astype_str(PyArrayObject *__pyx_v_arr, CYTHON_UNUSED int __pyx_skip_dispatch) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_n; PyArrayObject *__pyx_v_result = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_result; __Pyx_Buffer __pyx_pybuffer_result; PyArrayObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; Py_ssize_t __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyArrayObject *__pyx_t_6 = NULL; Py_ssize_t __pyx_t_7; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("astype_str", 0); __pyx_pybuffer_result.pybuffer.buf = NULL; __pyx_pybuffer_result.refcount = 0; __pyx_pybuffernd_result.data = NULL; __pyx_pybuffernd_result.rcbuffer = &__pyx_pybuffer_result; /* "pandas/lib.pyx":739 * cpdef ndarray[object] astype_str(ndarray arr): * cdef: * Py_ssize_t i, n = arr.size # <<<<<<<<<<<<<< * ndarray[object] result = np.empty(n, dtype=object) * */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_arr), __pyx_n_s_size); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 739; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyIndex_AsSsize_t(__pyx_t_1); if (unlikely((__pyx_t_2 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 739; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_n = __pyx_t_2; /* "pandas/lib.pyx":740 * cdef: * Py_ssize_t i, n = arr.size * ndarray[object] result = np.empty(n, dtype=object) # <<<<<<<<<<<<<< * * for i in range(n): */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 740; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_empty); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 740; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_n); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 740; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 740; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 740; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_dtype, __pyx_builtin_object) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 740; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_5 = PyObject_Call(__pyx_t_3, __pyx_t_4, __pyx_t_1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 740; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__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_filename = __pyx_f[2]; __pyx_lineno = 740; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_6 = ((PyArrayObject *)__pyx_t_5); { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { __pyx_v_result = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_result.rcbuffer->pybuffer.buf = NULL; {__pyx_filename = __pyx_f[2]; __pyx_lineno = 740; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } else {__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]; } } __pyx_t_6 = 0; __pyx_v_result = ((PyArrayObject *)__pyx_t_5); __pyx_t_5 = 0; /* "pandas/lib.pyx":742 * ndarray[object] result = np.empty(n, dtype=object) * * for i in range(n): # <<<<<<<<<<<<<< * util.set_value_at(result, i, str(arr[i])) * */ __pyx_t_2 = __pyx_v_n; for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_2; __pyx_t_7+=1) { __pyx_v_i = __pyx_t_7; /* "pandas/lib.pyx":743 * * for i in range(n): * util.set_value_at(result, i, str(arr[i])) # <<<<<<<<<<<<<< * * return result */ __pyx_t_5 = PyInt_FromSsize_t(__pyx_v_i); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 743; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_1 = __Pyx_GetItemInt(((PyObject *)__pyx_v_arr), __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 743; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 743; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 743; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __pyx_f_4util_set_value_at(((PyArrayObject *)__pyx_v_result), __pyx_t_5, __pyx_t_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 743; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } /* "pandas/lib.pyx":745 * util.set_value_at(result, i, str(arr[i])) * * return result # <<<<<<<<<<<<<< * * def clean_index_list(list obj): */ __Pyx_XDECREF(((PyObject *)__pyx_r)); __Pyx_INCREF(((PyObject *)__pyx_v_result)); __pyx_r = ((PyArrayObject *)__pyx_v_result); goto __pyx_L0; /* "pandas/lib.pyx":737 * return result * * cpdef ndarray[object] astype_str(ndarray arr): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = arr.size */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.lib.astype_str", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_result); __Pyx_XGIVEREF((PyObject *)__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_3lib_65astype_str(PyObject *__pyx_self, PyObject *__pyx_v_arr); /*proto*/ static PyObject *__pyx_pw_6pandas_3lib_65astype_str(PyObject *__pyx_self, PyObject *__pyx_v_arr) { CYTHON_UNUSED int __pyx_lineno = 0; CYTHON_UNUSED const char *__pyx_filename = NULL; CYTHON_UNUSED int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("astype_str (wrapper)", 0); if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_arr), __pyx_ptype_5numpy_ndarray, 1, "arr", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 737; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_3lib_64astype_str(__pyx_self, ((PyArrayObject *)__pyx_v_arr)); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_3lib_64astype_str(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_arr) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("astype_str", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = ((PyObject *)__pyx_f_6pandas_3lib_astype_str(__pyx_v_arr, 0)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 737; __pyx_clineno = __LINE__; goto __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.lib.astype_str", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/lib.pyx":747 * return result * * def clean_index_list(list obj): # <<<<<<<<<<<<<< * ''' * Utility used in pandas.core.index._ensure_index */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_3lib_67clean_index_list(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/ static char __pyx_doc_6pandas_3lib_66clean_index_list[] = "\n Utility used in pandas.core.index._ensure_index\n "; static PyMethodDef __pyx_mdef_6pandas_3lib_67clean_index_list = {__Pyx_NAMESTR("clean_index_list"), (PyCFunction)__pyx_pw_6pandas_3lib_67clean_index_list, METH_O, __Pyx_DOCSTR(__pyx_doc_6pandas_3lib_66clean_index_list)}; static PyObject *__pyx_pw_6pandas_3lib_67clean_index_list(PyObject *__pyx_self, PyObject *__pyx_v_obj) { CYTHON_UNUSED int __pyx_lineno = 0; CYTHON_UNUSED const char *__pyx_filename = NULL; CYTHON_UNUSED int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("clean_index_list (wrapper)", 0); if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_obj), (&PyList_Type), 1, "obj", 1))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 747; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_3lib_66clean_index_list(__pyx_self, ((PyObject*)__pyx_v_obj)); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_3lib_66clean_index_list(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) { PyArrayObject *__pyx_v_converted = 0; Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_n; PyObject *__pyx_v_v = 0; int __pyx_v_all_arrays; __Pyx_LocalBuf_ND __pyx_pybuffernd_converted; __Pyx_Buffer __pyx_pybuffer_converted; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; Py_ssize_t __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; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; PyArrayObject *__pyx_t_10 = NULL; int __pyx_t_11; PyObject *__pyx_t_12 = NULL; PyObject *__pyx_t_13 = NULL; PyObject *__pyx_t_14 = NULL; Py_ssize_t __pyx_t_15; PyObject **__pyx_t_16; Py_ssize_t __pyx_t_17; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("clean_index_list", 0); __pyx_pybuffer_converted.pybuffer.buf = NULL; __pyx_pybuffer_converted.refcount = 0; __pyx_pybuffernd_converted.data = NULL; __pyx_pybuffernd_converted.rcbuffer = &__pyx_pybuffer_converted; /* "pandas/lib.pyx":753 * cdef: * ndarray[object] converted * Py_ssize_t i, n = len(obj) # <<<<<<<<<<<<<< * object v * bint all_arrays = 1 */ if (unlikely(__pyx_v_obj == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 753; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_1 = PyList_GET_SIZE(__pyx_v_obj); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 753; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/lib.pyx":755 * Py_ssize_t i, n = len(obj) * object v * bint all_arrays = 1 # <<<<<<<<<<<<<< * * for i in range(n): */ __pyx_v_all_arrays = 1; /* "pandas/lib.pyx":757 * bint all_arrays = 1 * * for i in range(n): # <<<<<<<<<<<<<< * v = obj[i] * if not (PyList_Check(v) or np.PyArray_Check(v)): */ __pyx_t_1 = __pyx_v_n; for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) { __pyx_v_i = __pyx_t_2; /* "pandas/lib.pyx":758 * * for i in range(n): * v = obj[i] # <<<<<<<<<<<<<< * if not (PyList_Check(v) or np.PyArray_Check(v)): * all_arrays = 0 */ if (unlikely(__pyx_v_obj == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 758; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_3 = __Pyx_GetItemInt_List(__pyx_v_obj, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1); if (unlikely(__pyx_t_3 == NULL)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 758; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_3); __Pyx_XDECREF_SET(__pyx_v_v, __pyx_t_3); __pyx_t_3 = 0; /* "pandas/lib.pyx":759 * for i in range(n): * v = obj[i] * if not (PyList_Check(v) or np.PyArray_Check(v)): # <<<<<<<<<<<<<< * all_arrays = 0 * break */ __pyx_t_4 = (PyList_Check(__pyx_v_v) != 0); if (!__pyx_t_4) { __pyx_t_5 = (PyArray_Check(__pyx_v_v) != 0); __pyx_t_6 = __pyx_t_5; } else { __pyx_t_6 = __pyx_t_4; } __pyx_t_4 = ((!__pyx_t_6) != 0); if (__pyx_t_4) { /* "pandas/lib.pyx":760 * v = obj[i] * if not (PyList_Check(v) or np.PyArray_Check(v)): * all_arrays = 0 # <<<<<<<<<<<<<< * break * */ __pyx_v_all_arrays = 0; /* "pandas/lib.pyx":761 * if not (PyList_Check(v) or np.PyArray_Check(v)): * all_arrays = 0 * break # <<<<<<<<<<<<<< * * if all_arrays: */ goto __pyx_L4_break; } } __pyx_L4_break:; /* "pandas/lib.pyx":763 * break * * if all_arrays: # <<<<<<<<<<<<<< * return obj, all_arrays * */ __pyx_t_4 = (__pyx_v_all_arrays != 0); if (__pyx_t_4) { /* "pandas/lib.pyx":764 * * if all_arrays: * return obj, all_arrays # <<<<<<<<<<<<<< * * converted = np.empty(n, dtype=object) */ __Pyx_XDECREF(__pyx_r); __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_all_arrays); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 764; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 764; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_INCREF(__pyx_v_obj); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_v_obj); __Pyx_GIVEREF(__pyx_v_obj); PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_r = __pyx_t_7; __pyx_t_7 = 0; goto __pyx_L0; } /* "pandas/lib.pyx":766 * return obj, all_arrays * * converted = np.empty(n, dtype=object) # <<<<<<<<<<<<<< * for i in range(n): * v = obj[i] */ __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 766; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_empty); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 766; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_7 = PyInt_FromSsize_t(__pyx_v_n); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 766; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 766; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_7); __Pyx_GIVEREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_7 = PyDict_New(); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 766; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_dtype, __pyx_builtin_object) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 766; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_9 = PyObject_Call(__pyx_t_3, __pyx_t_8, __pyx_t_7); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 766; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (!(likely(((__pyx_t_9) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_9, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 766; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_10 = ((PyArrayObject *)__pyx_t_9); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_converted.rcbuffer->pybuffer); __pyx_t_11 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_converted.rcbuffer->pybuffer, (PyObject*)__pyx_t_10, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_11 < 0)) { PyErr_Fetch(&__pyx_t_12, &__pyx_t_13, &__pyx_t_14); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_converted.rcbuffer->pybuffer, (PyObject*)__pyx_v_converted, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_12); Py_XDECREF(__pyx_t_13); Py_XDECREF(__pyx_t_14); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_12, __pyx_t_13, __pyx_t_14); } } __pyx_pybuffernd_converted.diminfo[0].strides = __pyx_pybuffernd_converted.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_converted.diminfo[0].shape = __pyx_pybuffernd_converted.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_11 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 766; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_10 = 0; __pyx_v_converted = ((PyArrayObject *)__pyx_t_9); __pyx_t_9 = 0; /* "pandas/lib.pyx":767 * * converted = np.empty(n, dtype=object) * for i in range(n): # <<<<<<<<<<<<<< * v = obj[i] * if PyList_Check(v) or np.PyArray_Check(v): */ __pyx_t_1 = __pyx_v_n; for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) { __pyx_v_i = __pyx_t_2; /* "pandas/lib.pyx":768 * converted = np.empty(n, dtype=object) * for i in range(n): * v = obj[i] # <<<<<<<<<<<<<< * if PyList_Check(v) or np.PyArray_Check(v): * converted[i] = tuple(v) */ if (unlikely(__pyx_v_obj == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 768; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_9 = __Pyx_GetItemInt_List(__pyx_v_obj, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1); if (unlikely(__pyx_t_9 == NULL)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 768; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_9); __Pyx_XDECREF_SET(__pyx_v_v, __pyx_t_9); __pyx_t_9 = 0; /* "pandas/lib.pyx":769 * for i in range(n): * v = obj[i] * if PyList_Check(v) or np.PyArray_Check(v): # <<<<<<<<<<<<<< * converted[i] = tuple(v) * else: */ __pyx_t_4 = (PyList_Check(__pyx_v_v) != 0); if (!__pyx_t_4) { __pyx_t_6 = (PyArray_Check(__pyx_v_v) != 0); __pyx_t_5 = __pyx_t_6; } else { __pyx_t_5 = __pyx_t_4; } if (__pyx_t_5) { /* "pandas/lib.pyx":770 * v = obj[i] * if PyList_Check(v) or np.PyArray_Check(v): * converted[i] = tuple(v) # <<<<<<<<<<<<<< * else: * converted[i] = v */ __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 770; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_INCREF(__pyx_v_v); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_v_v); __Pyx_GIVEREF(__pyx_v_v); __pyx_t_7 = PyObject_Call(((PyObject *)((PyObject*)(&PyTuple_Type))), __pyx_t_9, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 770; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_15 = __pyx_v_i; __pyx_t_11 = -1; if (__pyx_t_15 < 0) { __pyx_t_15 += __pyx_pybuffernd_converted.diminfo[0].shape; if (unlikely(__pyx_t_15 < 0)) __pyx_t_11 = 0; } else if (unlikely(__pyx_t_15 >= __pyx_pybuffernd_converted.diminfo[0].shape)) __pyx_t_11 = 0; if (unlikely(__pyx_t_11 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_11); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 770; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_16 = __Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_converted.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_converted.diminfo[0].strides); __Pyx_GOTREF(*__pyx_t_16); __Pyx_INCREF(__pyx_t_7); __Pyx_DECREF(*__pyx_t_16); *__pyx_t_16 = __pyx_t_7; __Pyx_GIVEREF(*__pyx_t_16); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; goto __pyx_L9; } /*else*/ { /* "pandas/lib.pyx":772 * converted[i] = tuple(v) * else: * converted[i] = v # <<<<<<<<<<<<<< * * return maybe_convert_objects(converted), 0 */ __pyx_t_17 = __pyx_v_i; __pyx_t_11 = -1; if (__pyx_t_17 < 0) { __pyx_t_17 += __pyx_pybuffernd_converted.diminfo[0].shape; if (unlikely(__pyx_t_17 < 0)) __pyx_t_11 = 0; } else if (unlikely(__pyx_t_17 >= __pyx_pybuffernd_converted.diminfo[0].shape)) __pyx_t_11 = 0; if (unlikely(__pyx_t_11 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_11); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 772; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_16 = __Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_converted.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_converted.diminfo[0].strides); __Pyx_GOTREF(*__pyx_t_16); __Pyx_INCREF(__pyx_v_v); __Pyx_DECREF(*__pyx_t_16); *__pyx_t_16 = __pyx_v_v; __Pyx_GIVEREF(*__pyx_t_16); } __pyx_L9:; } /* "pandas/lib.pyx":774 * converted[i] = v * * return maybe_convert_objects(converted), 0 # <<<<<<<<<<<<<< * * @cython.boundscheck(False) */ __Pyx_XDECREF(__pyx_r); __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_maybe_convert_objects); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 774; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 774; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_INCREF(((PyObject *)__pyx_v_converted)); PyTuple_SET_ITEM(__pyx_t_9, 0, ((PyObject *)__pyx_v_converted)); __Pyx_GIVEREF(((PyObject *)__pyx_v_converted)); __pyx_t_8 = PyObject_Call(__pyx_t_7, __pyx_t_9, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 774; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_9 = PyTuple_New(2); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 774; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_8); __Pyx_GIVEREF(__pyx_t_8); __Pyx_INCREF(__pyx_int_0); PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_int_0); __Pyx_GIVEREF(__pyx_int_0); __pyx_t_8 = 0; __pyx_r = __pyx_t_9; __pyx_t_9 = 0; goto __pyx_L0; /* "pandas/lib.pyx":747 * return result * * def clean_index_list(list obj): # <<<<<<<<<<<<<< * ''' * Utility used in pandas.core.index._ensure_index */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_converted.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.lib.clean_index_list", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_converted.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_converted); __Pyx_XDECREF(__pyx_v_v); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/lib.pyx":778 * @cython.boundscheck(False) * @cython.wraparound(False) * def max_len_string_array(ndarray[object, ndim=1] arr): # <<<<<<<<<<<<<< * """ return the maximum size of elements in a 1-dim string array """ * cdef: */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_3lib_69max_len_string_array(PyObject *__pyx_self, PyObject *__pyx_v_arr); /*proto*/ static char __pyx_doc_6pandas_3lib_68max_len_string_array[] = " return the maximum size of elements in a 1-dim string array "; static PyMethodDef __pyx_mdef_6pandas_3lib_69max_len_string_array = {__Pyx_NAMESTR("max_len_string_array"), (PyCFunction)__pyx_pw_6pandas_3lib_69max_len_string_array, METH_O, __Pyx_DOCSTR(__pyx_doc_6pandas_3lib_68max_len_string_array)}; static PyObject *__pyx_pw_6pandas_3lib_69max_len_string_array(PyObject *__pyx_self, PyObject *__pyx_v_arr) { CYTHON_UNUSED int __pyx_lineno = 0; CYTHON_UNUSED const char *__pyx_filename = NULL; CYTHON_UNUSED int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("max_len_string_array (wrapper)", 0); if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_arr), __pyx_ptype_5numpy_ndarray, 1, "arr", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 778; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_3lib_68max_len_string_array(__pyx_self, ((PyArrayObject *)__pyx_v_arr)); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_3lib_68max_len_string_array(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_arr) { int __pyx_v_i; int __pyx_v_m; int __pyx_v_l; PyObject *__pyx_v_length = 0; PyObject *__pyx_v_v = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_arr; __Pyx_Buffer __pyx_pybuffer_arr; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; int __pyx_t_3; int __pyx_t_4; int __pyx_t_5; int __pyx_t_6; Py_ssize_t __pyx_t_7; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("max_len_string_array", 0); __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_filename = __pyx_f[2]; __pyx_lineno = 778; __pyx_clineno = __LINE__; goto __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/lib.pyx":782 * cdef: * int i, m, l * length = arr.shape[0] # <<<<<<<<<<<<<< * object v * */ __pyx_t_1 = __Pyx_PyInt_From_Py_intptr_t((__pyx_v_arr->dimensions[0])); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 782; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_v_length = __pyx_t_1; __pyx_t_1 = 0; /* "pandas/lib.pyx":785 * object v * * m = 0 # <<<<<<<<<<<<<< * for i from 0 <= i < length: * v = arr[i] */ __pyx_v_m = 0; /* "pandas/lib.pyx":786 * * m = 0 * for i from 0 <= i < length: # <<<<<<<<<<<<<< * v = arr[i] * if PyString_Check(v) or PyBytes_Check(v): */ __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_v_length); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 786; __pyx_clineno = __LINE__; goto __pyx_L1_error;} for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_2; __pyx_v_i++) { /* "pandas/lib.pyx":787 * m = 0 * for i from 0 <= i < length: * v = arr[i] # <<<<<<<<<<<<<< * if PyString_Check(v) or PyBytes_Check(v): * l = len(v) */ __pyx_t_3 = __pyx_v_i; __pyx_t_1 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_arr.rcbuffer->pybuffer.buf, __pyx_t_3, __pyx_pybuffernd_arr.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_1); __Pyx_XDECREF_SET(__pyx_v_v, __pyx_t_1); __pyx_t_1 = 0; /* "pandas/lib.pyx":788 * for i from 0 <= i < length: * v = arr[i] * if PyString_Check(v) or PyBytes_Check(v): # <<<<<<<<<<<<<< * l = len(v) * */ __pyx_t_4 = (PyString_Check(__pyx_v_v) != 0); if (!__pyx_t_4) { __pyx_t_5 = (PyBytes_Check(__pyx_v_v) != 0); __pyx_t_6 = __pyx_t_5; } else { __pyx_t_6 = __pyx_t_4; } if (__pyx_t_6) { /* "pandas/lib.pyx":789 * v = arr[i] * if PyString_Check(v) or PyBytes_Check(v): * l = len(v) # <<<<<<<<<<<<<< * * if l > m: */ __pyx_t_7 = PyObject_Length(__pyx_v_v); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 789; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_l = __pyx_t_7; /* "pandas/lib.pyx":791 * l = len(v) * * if l > m: # <<<<<<<<<<<<<< * m = l * */ __pyx_t_6 = ((__pyx_v_l > __pyx_v_m) != 0); if (__pyx_t_6) { /* "pandas/lib.pyx":792 * * if l > m: * m = l # <<<<<<<<<<<<<< * * return m */ __pyx_v_m = __pyx_v_l; goto __pyx_L6; } __pyx_L6:; goto __pyx_L5; } __pyx_L5:; } /* "pandas/lib.pyx":794 * m = l * * return m # <<<<<<<<<<<<<< * * @cython.boundscheck(False) */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_m); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 794; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "pandas/lib.pyx":778 * @cython.boundscheck(False) * @cython.wraparound(False) * def max_len_string_array(ndarray[object, ndim=1] arr): # <<<<<<<<<<<<<< * """ return the maximum size of elements in a 1-dim string array """ * cdef: */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_arr.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.lib.max_len_string_array", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_arr.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF(__pyx_v_length); __Pyx_XDECREF(__pyx_v_v); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/lib.pyx":798 * @cython.boundscheck(False) * @cython.wraparound(False) * def string_array_replace_from_nan_rep(ndarray[object, ndim=1] arr, object nan_rep, object replace = None): # <<<<<<<<<<<<<< * """ replace the values in the array with replacement if they are nan_rep; return the same array """ * */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_3lib_71string_array_replace_from_nan_rep(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6pandas_3lib_70string_array_replace_from_nan_rep[] = " replace the values in the array with replacement if they are nan_rep; return the same array "; static PyMethodDef __pyx_mdef_6pandas_3lib_71string_array_replace_from_nan_rep = {__Pyx_NAMESTR("string_array_replace_from_nan_rep"), (PyCFunction)__pyx_pw_6pandas_3lib_71string_array_replace_from_nan_rep, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_3lib_70string_array_replace_from_nan_rep)}; static PyObject *__pyx_pw_6pandas_3lib_71string_array_replace_from_nan_rep(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_arr = 0; PyObject *__pyx_v_nan_rep = 0; PyObject *__pyx_v_replace = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("string_array_replace_from_nan_rep (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_arr,&__pyx_n_s_nan_rep,&__pyx_n_s_replace,0}; PyObject* values[3] = {0,0,0}; values[2] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_arr)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_nan_rep)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("string_array_replace_from_nan_rep", 0, 2, 3, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 798; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_replace); if (value) { values[2] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "string_array_replace_from_nan_rep") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 798; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_arr = ((PyArrayObject *)values[0]); __pyx_v_nan_rep = values[1]; __pyx_v_replace = values[2]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("string_array_replace_from_nan_rep", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 798; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.lib.string_array_replace_from_nan_rep", __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_filename = __pyx_f[2]; __pyx_lineno = 798; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_3lib_70string_array_replace_from_nan_rep(__pyx_self, __pyx_v_arr, __pyx_v_nan_rep, __pyx_v_replace); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_3lib_70string_array_replace_from_nan_rep(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_arr, PyObject *__pyx_v_nan_rep, PyObject *__pyx_v_replace) { int __pyx_v_length; int __pyx_v_i; __Pyx_LocalBuf_ND __pyx_pybuffernd_arr; __Pyx_Buffer __pyx_pybuffer_arr; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; int __pyx_t_5; int __pyx_t_6; int __pyx_t_7; PyObject **__pyx_t_8; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("string_array_replace_from_nan_rep", 0); __Pyx_INCREF(__pyx_v_replace); __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| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 798; __pyx_clineno = __LINE__; goto __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/lib.pyx":801 * """ replace the values in the array with replacement if they are nan_rep; return the same array """ * * cdef int length = arr.shape[0], i = 0 # <<<<<<<<<<<<<< * if replace is None: * replace = np.nan */ __pyx_v_length = (__pyx_v_arr->dimensions[0]); __pyx_v_i = 0; /* "pandas/lib.pyx":802 * * cdef int length = arr.shape[0], i = 0 * if replace is None: # <<<<<<<<<<<<<< * replace = np.nan * */ __pyx_t_1 = (__pyx_v_replace == Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { /* "pandas/lib.pyx":803 * cdef int length = arr.shape[0], i = 0 * if replace is None: * replace = np.nan # <<<<<<<<<<<<<< * * for i from 0 <= i < length: */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 803; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_nan); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 803; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF_SET(__pyx_v_replace, __pyx_t_4); __pyx_t_4 = 0; goto __pyx_L3; } __pyx_L3:; /* "pandas/lib.pyx":805 * replace = np.nan * * for i from 0 <= i < length: # <<<<<<<<<<<<<< * if arr[i] == nan_rep: * arr[i] = replace */ __pyx_t_5 = __pyx_v_length; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_5; __pyx_v_i++) { /* "pandas/lib.pyx":806 * * for i from 0 <= i < length: * if arr[i] == nan_rep: # <<<<<<<<<<<<<< * arr[i] = replace * */ __pyx_t_6 = __pyx_v_i; __pyx_t_4 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_arr.rcbuffer->pybuffer.buf, __pyx_t_6, __pyx_pybuffernd_arr.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_4); __pyx_t_3 = PyObject_RichCompare(__pyx_t_4, __pyx_v_nan_rep, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 806; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 806; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_2) { /* "pandas/lib.pyx":807 * for i from 0 <= i < length: * if arr[i] == nan_rep: * arr[i] = replace # <<<<<<<<<<<<<< * * return arr */ __pyx_t_7 = __pyx_v_i; __pyx_t_8 = __Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_arr.rcbuffer->pybuffer.buf, __pyx_t_7, __pyx_pybuffernd_arr.diminfo[0].strides); __Pyx_GOTREF(*__pyx_t_8); __Pyx_INCREF(__pyx_v_replace); __Pyx_DECREF(*__pyx_t_8); *__pyx_t_8 = __pyx_v_replace; __Pyx_GIVEREF(*__pyx_t_8); goto __pyx_L6; } __pyx_L6:; } /* "pandas/lib.pyx":809 * arr[i] = replace * * return arr # <<<<<<<<<<<<<< * * @cython.boundscheck(False) */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_arr)); __pyx_r = ((PyObject *)__pyx_v_arr); goto __pyx_L0; /* "pandas/lib.pyx":798 * @cython.boundscheck(False) * @cython.wraparound(False) * def string_array_replace_from_nan_rep(ndarray[object, ndim=1] arr, object nan_rep, object replace = None): # <<<<<<<<<<<<<< * """ replace the values in the array with replacement if they are nan_rep; return the same array """ * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_arr.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.lib.string_array_replace_from_nan_rep", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_arr.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF(__pyx_v_replace); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/lib.pyx":813 * @cython.boundscheck(False) * @cython.wraparound(False) * def write_csv_rows(list data, list data_index, int nlevels, list cols, object writer): # <<<<<<<<<<<<<< * * cdef int N, j, i, ncols */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_3lib_73write_csv_rows(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_3lib_73write_csv_rows = {__Pyx_NAMESTR("write_csv_rows"), (PyCFunction)__pyx_pw_6pandas_3lib_73write_csv_rows, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_3lib_73write_csv_rows(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_data = 0; PyObject *__pyx_v_data_index = 0; int __pyx_v_nlevels; PyObject *__pyx_v_cols = 0; PyObject *__pyx_v_writer = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("write_csv_rows (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_data,&__pyx_n_s_data_index,&__pyx_n_s_nlevels,&__pyx_n_s_cols,&__pyx_n_s_writer,0}; PyObject* values[5] = {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 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_data)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_data_index)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("write_csv_rows", 1, 5, 5, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 813; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_nlevels)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("write_csv_rows", 1, 5, 5, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 813; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_cols)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("write_csv_rows", 1, 5, 5, 3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 813; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 4: if (likely((values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_writer)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("write_csv_rows", 1, 5, 5, 4); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 813; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "write_csv_rows") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 813; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 5) { 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); } __pyx_v_data = ((PyObject*)values[0]); __pyx_v_data_index = ((PyObject*)values[1]); __pyx_v_nlevels = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_nlevels == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 813; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_cols = ((PyObject*)values[3]); __pyx_v_writer = values[4]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("write_csv_rows", 1, 5, 5, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 813; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.lib.write_csv_rows", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_data), (&PyList_Type), 1, "data", 1))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 813; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_data_index), (&PyList_Type), 1, "data_index", 1))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 813; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_cols), (&PyList_Type), 1, "cols", 1))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 813; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_3lib_72write_csv_rows(__pyx_self, __pyx_v_data, __pyx_v_data_index, __pyx_v_nlevels, __pyx_v_cols, __pyx_v_writer); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_3lib_72write_csv_rows(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_data, PyObject *__pyx_v_data_index, int __pyx_v_nlevels, PyObject *__pyx_v_cols, PyObject *__pyx_v_writer) { int __pyx_v_N; int __pyx_v_j; int __pyx_v_i; int __pyx_v_ncols; PyObject *__pyx_v_rows = 0; PyObject *__pyx_v_row = NULL; CYTHON_UNUSED int __pyx_v_x; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; PyObject *__pyx_t_2 = NULL; int __pyx_t_3; int __pyx_t_4; PyObject *__pyx_t_5 = NULL; int __pyx_t_6; int __pyx_t_7; long __pyx_t_8; int __pyx_t_9; int __pyx_t_10; PyObject *__pyx_t_11 = NULL; int __pyx_t_12; int __pyx_t_13; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("write_csv_rows", 0); /* "pandas/lib.pyx":820 * * # In crude testing, N>100 yields little marginal improvement * N=100 # <<<<<<<<<<<<<< * * # pre-allocate rows */ __pyx_v_N = 100; /* "pandas/lib.pyx":823 * * # pre-allocate rows * ncols = len(cols) # <<<<<<<<<<<<<< * rows = [[None]*(nlevels+ncols) for x in range(N)] * */ if (unlikely(__pyx_v_cols == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 823; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_1 = PyList_GET_SIZE(__pyx_v_cols); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 823; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_ncols = __pyx_t_1; /* "pandas/lib.pyx":824 * # pre-allocate rows * ncols = len(cols) * rows = [[None]*(nlevels+ncols) for x in range(N)] # <<<<<<<<<<<<<< * * j = -1 */ __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 824; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __pyx_v_N; for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) { __pyx_v_x = __pyx_t_4; __pyx_t_5 = PyList_New(1 * (((__pyx_v_nlevels + __pyx_v_ncols)<0) ? 0:(__pyx_v_nlevels + __pyx_v_ncols))); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 824; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (__pyx_v_nlevels + __pyx_v_ncols); __pyx_temp++) { __Pyx_INCREF(Py_None); PyList_SET_ITEM(__pyx_t_5, __pyx_temp, Py_None); __Pyx_GIVEREF(Py_None); } } if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_5))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 824; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } __pyx_v_rows = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; /* "pandas/lib.pyx":826 * rows = [[None]*(nlevels+ncols) for x in range(N)] * * j = -1 # <<<<<<<<<<<<<< * if nlevels == 1: * for j in range(len(data_index)): */ __pyx_v_j = -1; /* "pandas/lib.pyx":827 * * j = -1 * if nlevels == 1: # <<<<<<<<<<<<<< * for j in range(len(data_index)): * row = rows[j % N] */ __pyx_t_6 = ((__pyx_v_nlevels == 1) != 0); if (__pyx_t_6) { /* "pandas/lib.pyx":828 * j = -1 * if nlevels == 1: * for j in range(len(data_index)): # <<<<<<<<<<<<<< * row = rows[j % N] * row[0] = data_index[j] */ if (unlikely(__pyx_v_data_index == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 828; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_1 = PyList_GET_SIZE(__pyx_v_data_index); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 828; __pyx_clineno = __LINE__; goto __pyx_L1_error;} for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_1; __pyx_t_3+=1) { __pyx_v_j = __pyx_t_3; /* "pandas/lib.pyx":829 * if nlevels == 1: * for j in range(len(data_index)): * row = rows[j % N] # <<<<<<<<<<<<<< * row[0] = data_index[j] * for i in range(ncols): */ if (unlikely(__pyx_v_N == 0)) { #ifdef WITH_THREAD PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure(); #endif PyErr_SetString(PyExc_ZeroDivisionError, "integer division or modulo by zero"); #ifdef WITH_THREAD PyGILState_Release(__pyx_gilstate_save); #endif {__pyx_filename = __pyx_f[2]; __pyx_lineno = 829; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_4 = __Pyx_mod_int(__pyx_v_j, __pyx_v_N); __pyx_t_2 = PyList_GET_ITEM(__pyx_v_rows, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __Pyx_XDECREF_SET(__pyx_v_row, __pyx_t_2); __pyx_t_2 = 0; /* "pandas/lib.pyx":830 * for j in range(len(data_index)): * row = rows[j % N] * row[0] = data_index[j] # <<<<<<<<<<<<<< * for i in range(ncols): * row[1+i] = data[i][j] */ if (unlikely(__pyx_v_data_index == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 830; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_2 = PyList_GET_ITEM(__pyx_v_data_index, __pyx_v_j); __Pyx_INCREF(__pyx_t_2); if (unlikely(__Pyx_SetItemInt(__pyx_v_row, 0, __pyx_t_2, long, 1, __Pyx_PyInt_From_long, 0, 0, 0) < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 830; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/lib.pyx":831 * row = rows[j % N] * row[0] = data_index[j] * for i in range(ncols): # <<<<<<<<<<<<<< * row[1+i] = data[i][j] * */ __pyx_t_4 = __pyx_v_ncols; for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_4; __pyx_t_7+=1) { __pyx_v_i = __pyx_t_7; /* "pandas/lib.pyx":832 * row[0] = data_index[j] * for i in range(ncols): * row[1+i] = data[i][j] # <<<<<<<<<<<<<< * * if j >= N-1 and j % N == N-1: */ if (unlikely(__pyx_v_data == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 832; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_2 = __Pyx_GetItemInt(PyList_GET_ITEM(__pyx_v_data, __pyx_v_i), __pyx_v_j, int, 1, __Pyx_PyInt_From_int, 0, 0, 0); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 832; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_2); __pyx_t_8 = (1 + __pyx_v_i); if (unlikely(__Pyx_SetItemInt(__pyx_v_row, __pyx_t_8, __pyx_t_2, long, 1, __Pyx_PyInt_From_long, 0, 0, 0) < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 832; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } /* "pandas/lib.pyx":834 * row[1+i] = data[i][j] * * if j >= N-1 and j % N == N-1: # <<<<<<<<<<<<<< * writer.writerows(rows) * elif nlevels > 1: */ __pyx_t_6 = ((__pyx_v_j >= (__pyx_v_N - 1)) != 0); if (__pyx_t_6) { if (unlikely(__pyx_v_N == 0)) { #ifdef WITH_THREAD PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure(); #endif PyErr_SetString(PyExc_ZeroDivisionError, "integer division or modulo by zero"); #ifdef WITH_THREAD PyGILState_Release(__pyx_gilstate_save); #endif {__pyx_filename = __pyx_f[2]; __pyx_lineno = 834; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_9 = ((__Pyx_mod_int(__pyx_v_j, __pyx_v_N) == (__pyx_v_N - 1)) != 0); __pyx_t_10 = __pyx_t_9; } else { __pyx_t_10 = __pyx_t_6; } if (__pyx_t_10) { /* "pandas/lib.pyx":835 * * if j >= N-1 and j % N == N-1: * writer.writerows(rows) # <<<<<<<<<<<<<< * elif nlevels > 1: * for j in range(len(data_index)): */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_writer, __pyx_n_s_writerows); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 835; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 835; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_v_rows); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_rows); __Pyx_GIVEREF(__pyx_v_rows); __pyx_t_11 = PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 835; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; goto __pyx_L10; } __pyx_L10:; } goto __pyx_L5; } /* "pandas/lib.pyx":836 * if j >= N-1 and j % N == N-1: * writer.writerows(rows) * elif nlevels > 1: # <<<<<<<<<<<<<< * for j in range(len(data_index)): * row = rows[j % N] */ __pyx_t_10 = ((__pyx_v_nlevels > 1) != 0); if (__pyx_t_10) { /* "pandas/lib.pyx":837 * writer.writerows(rows) * elif nlevels > 1: * for j in range(len(data_index)): # <<<<<<<<<<<<<< * row = rows[j % N] * row[:nlevels] = list(data_index[j]) */ if (unlikely(__pyx_v_data_index == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 837; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_1 = PyList_GET_SIZE(__pyx_v_data_index); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 837; __pyx_clineno = __LINE__; goto __pyx_L1_error;} for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_1; __pyx_t_3+=1) { __pyx_v_j = __pyx_t_3; /* "pandas/lib.pyx":838 * elif nlevels > 1: * for j in range(len(data_index)): * row = rows[j % N] # <<<<<<<<<<<<<< * row[:nlevels] = list(data_index[j]) * for i in range(ncols): */ if (unlikely(__pyx_v_N == 0)) { #ifdef WITH_THREAD PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure(); #endif PyErr_SetString(PyExc_ZeroDivisionError, "integer division or modulo by zero"); #ifdef WITH_THREAD PyGILState_Release(__pyx_gilstate_save); #endif {__pyx_filename = __pyx_f[2]; __pyx_lineno = 838; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_4 = __Pyx_mod_int(__pyx_v_j, __pyx_v_N); __pyx_t_11 = PyList_GET_ITEM(__pyx_v_rows, __pyx_t_4); __Pyx_INCREF(__pyx_t_11); __Pyx_XDECREF_SET(__pyx_v_row, __pyx_t_11); __pyx_t_11 = 0; /* "pandas/lib.pyx":839 * for j in range(len(data_index)): * row = rows[j % N] * row[:nlevels] = list(data_index[j]) # <<<<<<<<<<<<<< * for i in range(ncols): * row[nlevels+i] = data[i][j] */ if (unlikely(__pyx_v_data_index == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 839; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_11 = PyTuple_New(1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 839; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __Pyx_INCREF(PyList_GET_ITEM(__pyx_v_data_index, __pyx_v_j)); PyTuple_SET_ITEM(__pyx_t_11, 0, PyList_GET_ITEM(__pyx_v_data_index, __pyx_v_j)); __Pyx_GIVEREF(PyList_GET_ITEM(__pyx_v_data_index, __pyx_v_j)); __pyx_t_5 = PyObject_Call(((PyObject *)((PyObject*)(&PyList_Type))), __pyx_t_11, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 839; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; if (__Pyx_PyObject_SetSlice(__pyx_v_row, __pyx_t_5, 0, __pyx_v_nlevels, NULL, NULL, NULL, 0, 1, 0) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 839; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "pandas/lib.pyx":840 * row = rows[j % N] * row[:nlevels] = list(data_index[j]) * for i in range(ncols): # <<<<<<<<<<<<<< * row[nlevels+i] = data[i][j] * */ __pyx_t_4 = __pyx_v_ncols; for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_4; __pyx_t_7+=1) { __pyx_v_i = __pyx_t_7; /* "pandas/lib.pyx":841 * row[:nlevels] = list(data_index[j]) * for i in range(ncols): * row[nlevels+i] = data[i][j] # <<<<<<<<<<<<<< * * if j >= N-1 and j % N == N-1: */ if (unlikely(__pyx_v_data == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 841; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_5 = __Pyx_GetItemInt(PyList_GET_ITEM(__pyx_v_data, __pyx_v_i), __pyx_v_j, int, 1, __Pyx_PyInt_From_int, 0, 0, 0); if (unlikely(__pyx_t_5 == NULL)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 841; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_5); __pyx_t_12 = (__pyx_v_nlevels + __pyx_v_i); if (unlikely(__Pyx_SetItemInt(__pyx_v_row, __pyx_t_12, __pyx_t_5, int, 1, __Pyx_PyInt_From_int, 0, 0, 0) < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 841; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } /* "pandas/lib.pyx":843 * row[nlevels+i] = data[i][j] * * if j >= N-1 and j % N == N-1: # <<<<<<<<<<<<<< * writer.writerows(rows) * else: */ __pyx_t_10 = ((__pyx_v_j >= (__pyx_v_N - 1)) != 0); if (__pyx_t_10) { if (unlikely(__pyx_v_N == 0)) { #ifdef WITH_THREAD PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure(); #endif PyErr_SetString(PyExc_ZeroDivisionError, "integer division or modulo by zero"); #ifdef WITH_THREAD PyGILState_Release(__pyx_gilstate_save); #endif {__pyx_filename = __pyx_f[2]; __pyx_lineno = 843; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_6 = ((__Pyx_mod_int(__pyx_v_j, __pyx_v_N) == (__pyx_v_N - 1)) != 0); __pyx_t_9 = __pyx_t_6; } else { __pyx_t_9 = __pyx_t_10; } if (__pyx_t_9) { /* "pandas/lib.pyx":844 * * if j >= N-1 and j % N == N-1: * writer.writerows(rows) # <<<<<<<<<<<<<< * else: * for j in range(len(data_index)): */ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_writer, __pyx_n_s_writerows); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 844; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_11 = PyTuple_New(1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 844; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __Pyx_INCREF(__pyx_v_rows); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_v_rows); __Pyx_GIVEREF(__pyx_v_rows); __pyx_t_2 = PyObject_Call(__pyx_t_5, __pyx_t_11, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 844; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; goto __pyx_L15; } __pyx_L15:; } goto __pyx_L5; } /*else*/ { /* "pandas/lib.pyx":846 * writer.writerows(rows) * else: * for j in range(len(data_index)): # <<<<<<<<<<<<<< * row = rows[j % N] * for i in range(ncols): */ if (unlikely(__pyx_v_data_index == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 846; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_1 = PyList_GET_SIZE(__pyx_v_data_index); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 846; __pyx_clineno = __LINE__; goto __pyx_L1_error;} for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_1; __pyx_t_3+=1) { __pyx_v_j = __pyx_t_3; /* "pandas/lib.pyx":847 * else: * for j in range(len(data_index)): * row = rows[j % N] # <<<<<<<<<<<<<< * for i in range(ncols): * row[i] = data[i][j] */ if (unlikely(__pyx_v_N == 0)) { #ifdef WITH_THREAD PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure(); #endif PyErr_SetString(PyExc_ZeroDivisionError, "integer division or modulo by zero"); #ifdef WITH_THREAD PyGILState_Release(__pyx_gilstate_save); #endif {__pyx_filename = __pyx_f[2]; __pyx_lineno = 847; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_4 = __Pyx_mod_int(__pyx_v_j, __pyx_v_N); __pyx_t_2 = PyList_GET_ITEM(__pyx_v_rows, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __Pyx_XDECREF_SET(__pyx_v_row, __pyx_t_2); __pyx_t_2 = 0; /* "pandas/lib.pyx":848 * for j in range(len(data_index)): * row = rows[j % N] * for i in range(ncols): # <<<<<<<<<<<<<< * row[i] = data[i][j] * */ __pyx_t_4 = __pyx_v_ncols; for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_4; __pyx_t_7+=1) { __pyx_v_i = __pyx_t_7; /* "pandas/lib.pyx":849 * row = rows[j % N] * for i in range(ncols): * row[i] = data[i][j] # <<<<<<<<<<<<<< * * if j >= N-1 and j % N == N-1: */ if (unlikely(__pyx_v_data == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 849; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_2 = __Pyx_GetItemInt(PyList_GET_ITEM(__pyx_v_data, __pyx_v_i), __pyx_v_j, int, 1, __Pyx_PyInt_From_int, 0, 0, 0); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 849; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_2); if (unlikely(__Pyx_SetItemInt(__pyx_v_row, __pyx_v_i, __pyx_t_2, int, 1, __Pyx_PyInt_From_int, 0, 0, 0) < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 849; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } /* "pandas/lib.pyx":851 * row[i] = data[i][j] * * if j >= N-1 and j % N == N-1: # <<<<<<<<<<<<<< * writer.writerows(rows) * */ __pyx_t_9 = ((__pyx_v_j >= (__pyx_v_N - 1)) != 0); if (__pyx_t_9) { if (unlikely(__pyx_v_N == 0)) { #ifdef WITH_THREAD PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure(); #endif PyErr_SetString(PyExc_ZeroDivisionError, "integer division or modulo by zero"); #ifdef WITH_THREAD PyGILState_Release(__pyx_gilstate_save); #endif {__pyx_filename = __pyx_f[2]; __pyx_lineno = 851; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_10 = ((__Pyx_mod_int(__pyx_v_j, __pyx_v_N) == (__pyx_v_N - 1)) != 0); __pyx_t_6 = __pyx_t_10; } else { __pyx_t_6 = __pyx_t_9; } if (__pyx_t_6) { /* "pandas/lib.pyx":852 * * if j >= N-1 and j % N == N-1: * writer.writerows(rows) # <<<<<<<<<<<<<< * * if j >= 0 and (j < N-1 or (j % N) != N-1 ): */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_writer, __pyx_n_s_writerows); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 852; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_11 = PyTuple_New(1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 852; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __Pyx_INCREF(__pyx_v_rows); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_v_rows); __Pyx_GIVEREF(__pyx_v_rows); __pyx_t_5 = PyObject_Call(__pyx_t_2, __pyx_t_11, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 852; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; goto __pyx_L20; } __pyx_L20:; } } __pyx_L5:; /* "pandas/lib.pyx":854 * writer.writerows(rows) * * if j >= 0 and (j < N-1 or (j % N) != N-1 ): # <<<<<<<<<<<<<< * writer.writerows(rows[:((j+1) % N)]) * */ __pyx_t_6 = ((__pyx_v_j >= 0) != 0); if (__pyx_t_6) { __pyx_t_9 = ((__pyx_v_j < (__pyx_v_N - 1)) != 0); if (!__pyx_t_9) { if (unlikely(__pyx_v_N == 0)) { #ifdef WITH_THREAD PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure(); #endif PyErr_SetString(PyExc_ZeroDivisionError, "integer division or modulo by zero"); #ifdef WITH_THREAD PyGILState_Release(__pyx_gilstate_save); #endif {__pyx_filename = __pyx_f[2]; __pyx_lineno = 854; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_10 = ((__Pyx_mod_int(__pyx_v_j, __pyx_v_N) != (__pyx_v_N - 1)) != 0); __pyx_t_13 = __pyx_t_10; } else { __pyx_t_13 = __pyx_t_9; } __pyx_t_9 = __pyx_t_13; } else { __pyx_t_9 = __pyx_t_6; } if (__pyx_t_9) { /* "pandas/lib.pyx":855 * * if j >= 0 and (j < N-1 or (j % N) != N-1 ): * writer.writerows(rows[:((j+1) % N)]) # <<<<<<<<<<<<<< * * #------------------------------------------------------------------------------- */ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_writer, __pyx_n_s_writerows); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 855; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_8 = (__pyx_v_j + 1); if (unlikely(__pyx_v_N == 0)) { #ifdef WITH_THREAD PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure(); #endif PyErr_SetString(PyExc_ZeroDivisionError, "integer division or modulo by zero"); #ifdef WITH_THREAD PyGILState_Release(__pyx_gilstate_save); #endif {__pyx_filename = __pyx_f[2]; __pyx_lineno = 855; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_11 = __Pyx_PyList_GetSlice(__pyx_v_rows, 0, __Pyx_mod_long(__pyx_t_8, __pyx_v_N)); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 855; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 855; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_11); __Pyx_GIVEREF(__pyx_t_11); __pyx_t_11 = 0; __pyx_t_11 = PyObject_Call(__pyx_t_5, __pyx_t_2, NULL); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 855; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; goto __pyx_L21; } __pyx_L21:; /* "pandas/lib.pyx":813 * @cython.boundscheck(False) * @cython.wraparound(False) * def write_csv_rows(list data, list data_index, int nlevels, list cols, object writer): # <<<<<<<<<<<<<< * * cdef int N, j, i, ncols */ /* 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_5); __Pyx_XDECREF(__pyx_t_11); __Pyx_AddTraceback("pandas.lib.write_csv_rows", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_rows); __Pyx_XDECREF(__pyx_v_row); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/lib.pyx":861 * * @cython.boundscheck(False) * def arrmap(ndarray[object] index, object func): # <<<<<<<<<<<<<< * cdef int length = index.shape[0] * cdef int i = 0 */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_3lib_75arrmap(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_3lib_75arrmap = {__Pyx_NAMESTR("arrmap"), (PyCFunction)__pyx_pw_6pandas_3lib_75arrmap, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_3lib_75arrmap(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_index = 0; PyObject *__pyx_v_func = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("arrmap (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_index,&__pyx_n_s_func,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_index)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_func)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("arrmap", 1, 2, 2, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 861; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "arrmap") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 861; __pyx_clineno = __LINE__; goto __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_index = ((PyArrayObject *)values[0]); __pyx_v_func = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("arrmap", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 861; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.lib.arrmap", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_index), __pyx_ptype_5numpy_ndarray, 1, "index", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 861; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_3lib_74arrmap(__pyx_self, __pyx_v_index, __pyx_v_func); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_3lib_74arrmap(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_index, PyObject *__pyx_v_func) { int __pyx_v_length; int __pyx_v_i; PyArrayObject *__pyx_v_result = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_index; __Pyx_Buffer __pyx_pybuffer_index; __Pyx_LocalBuf_ND __pyx_pybuffernd_result; __Pyx_Buffer __pyx_pybuffer_result; 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; int __pyx_t_8; int __pyx_t_9; PyObject **__pyx_t_10; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("arrmap", 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_index.pybuffer.buf = NULL; __pyx_pybuffer_index.refcount = 0; __pyx_pybuffernd_index.data = NULL; __pyx_pybuffernd_index.rcbuffer = &__pyx_pybuffer_index; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_index.rcbuffer->pybuffer, (PyObject*)__pyx_v_index, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 861; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_index.diminfo[0].strides = __pyx_pybuffernd_index.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_index.diminfo[0].shape = __pyx_pybuffernd_index.rcbuffer->pybuffer.shape[0]; /* "pandas/lib.pyx":862 * @cython.boundscheck(False) * def arrmap(ndarray[object] index, object func): * cdef int length = index.shape[0] # <<<<<<<<<<<<<< * cdef int i = 0 * */ __pyx_v_length = (__pyx_v_index->dimensions[0]); /* "pandas/lib.pyx":863 * def arrmap(ndarray[object] index, object func): * cdef int length = index.shape[0] * cdef int i = 0 # <<<<<<<<<<<<<< * * cdef ndarray[object] result = np.empty(length, dtype=np.object_) */ __pyx_v_i = 0; /* "pandas/lib.pyx":865 * cdef int i = 0 * * cdef ndarray[object] result = np.empty(length, dtype=np.object_) # <<<<<<<<<<<<<< * * for i from 0 <= i < length: */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 865; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 865; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_length); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 865; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 865; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 865; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 865; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_object_2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 865; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 865; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyObject_Call(__pyx_t_2, __pyx_t_3, __pyx_t_1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 865; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 865; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_6 = ((PyArrayObject *)__pyx_t_5); { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { __pyx_v_result = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_result.rcbuffer->pybuffer.buf = NULL; {__pyx_filename = __pyx_f[2]; __pyx_lineno = 865; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } else {__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]; } } __pyx_t_6 = 0; __pyx_v_result = ((PyArrayObject *)__pyx_t_5); __pyx_t_5 = 0; /* "pandas/lib.pyx":867 * cdef ndarray[object] result = np.empty(length, dtype=np.object_) * * for i from 0 <= i < length: # <<<<<<<<<<<<<< * result[i] = func(index[i]) * */ __pyx_t_7 = __pyx_v_length; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_7; __pyx_v_i++) { /* "pandas/lib.pyx":868 * * for i from 0 <= i < length: * result[i] = func(index[i]) # <<<<<<<<<<<<<< * * return result */ __pyx_t_8 = __pyx_v_i; if (__pyx_t_8 < 0) __pyx_t_8 += __pyx_pybuffernd_index.diminfo[0].shape; __pyx_t_5 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_index.rcbuffer->pybuffer.buf, __pyx_t_8, __pyx_pybuffernd_index.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_5); __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 868; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyObject_Call(__pyx_v_func, __pyx_t_1, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 868; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_9 = __pyx_v_i; if (__pyx_t_9 < 0) __pyx_t_9 += __pyx_pybuffernd_result.diminfo[0].shape; __pyx_t_10 = __Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_9, __pyx_pybuffernd_result.diminfo[0].strides); __Pyx_GOTREF(*__pyx_t_10); __Pyx_INCREF(__pyx_t_5); __Pyx_DECREF(*__pyx_t_10); *__pyx_t_10 = __pyx_t_5; __Pyx_GIVEREF(*__pyx_t_10); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } /* "pandas/lib.pyx":870 * result[i] = func(index[i]) * * return result # <<<<<<<<<<<<<< * * @cython.wraparound(False) */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_result)); __pyx_r = ((PyObject *)__pyx_v_result); goto __pyx_L0; /* "pandas/lib.pyx":861 * * @cython.boundscheck(False) * def arrmap(ndarray[object] index, object func): # <<<<<<<<<<<<<< * cdef int length = index.shape[0] * cdef int i = 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_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_index.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.lib.arrmap", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_index.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_result); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/lib.pyx":874 * @cython.wraparound(False) * @cython.boundscheck(False) * def is_lexsorted(list list_of_arrays): # <<<<<<<<<<<<<< * cdef: * int i */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_3lib_77is_lexsorted(PyObject *__pyx_self, PyObject *__pyx_v_list_of_arrays); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_3lib_77is_lexsorted = {__Pyx_NAMESTR("is_lexsorted"), (PyCFunction)__pyx_pw_6pandas_3lib_77is_lexsorted, METH_O, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_3lib_77is_lexsorted(PyObject *__pyx_self, PyObject *__pyx_v_list_of_arrays) { CYTHON_UNUSED int __pyx_lineno = 0; CYTHON_UNUSED const char *__pyx_filename = NULL; CYTHON_UNUSED int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("is_lexsorted (wrapper)", 0); if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_list_of_arrays), (&PyList_Type), 1, "list_of_arrays", 1))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 874; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_3lib_76is_lexsorted(__pyx_self, ((PyObject*)__pyx_v_list_of_arrays)); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_3lib_76is_lexsorted(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_list_of_arrays) { int __pyx_v_i; Py_ssize_t __pyx_v_n; Py_ssize_t __pyx_v_nlevels; __pyx_t_5numpy_int64_t __pyx_v_k; __pyx_t_5numpy_int64_t __pyx_v_cur; __pyx_t_5numpy_int64_t __pyx_v_pre; PyArrayObject *__pyx_v_arr = 0; __pyx_t_5numpy_int64_t **__pyx_v_vecs; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; PyObject *__pyx_t_2 = NULL; Py_ssize_t __pyx_t_3; int __pyx_t_4; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("is_lexsorted", 0); /* "pandas/lib.pyx":881 * ndarray arr * * nlevels = len(list_of_arrays) # <<<<<<<<<<<<<< * n = len(list_of_arrays[0]) * */ if (unlikely(__pyx_v_list_of_arrays == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 881; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_1 = PyList_GET_SIZE(__pyx_v_list_of_arrays); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 881; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_nlevels = __pyx_t_1; /* "pandas/lib.pyx":882 * * nlevels = len(list_of_arrays) * n = len(list_of_arrays[0]) # <<<<<<<<<<<<<< * * cdef int64_t **vecs = malloc(nlevels * sizeof(int64_t*)) */ if (unlikely(__pyx_v_list_of_arrays == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 882; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_2 = PyList_GET_ITEM(__pyx_v_list_of_arrays, 0); __Pyx_INCREF(__pyx_t_2); __pyx_t_1 = PyObject_Length(__pyx_t_2); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 882; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_n = __pyx_t_1; /* "pandas/lib.pyx":884 * n = len(list_of_arrays[0]) * * cdef int64_t **vecs = malloc(nlevels * sizeof(int64_t*)) # <<<<<<<<<<<<<< * for i from 0 <= i < nlevels: * # vecs[i] = ( list_of_arrays[i]).data */ __pyx_v_vecs = ((__pyx_t_5numpy_int64_t **)malloc((__pyx_v_nlevels * (sizeof(__pyx_t_5numpy_int64_t *))))); /* "pandas/lib.pyx":885 * * cdef int64_t **vecs = malloc(nlevels * sizeof(int64_t*)) * for i from 0 <= i < nlevels: # <<<<<<<<<<<<<< * # vecs[i] = ( list_of_arrays[i]).data * */ __pyx_t_1 = __pyx_v_nlevels; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_1; __pyx_v_i++) { /* "pandas/lib.pyx":888 * # vecs[i] = ( list_of_arrays[i]).data * * arr = list_of_arrays[i] # <<<<<<<<<<<<<< * vecs[i] = arr.data * # assume uniqueness?? */ if (unlikely(__pyx_v_list_of_arrays == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 888; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } if (!(likely(((PyList_GET_ITEM(__pyx_v_list_of_arrays, __pyx_v_i)) == Py_None) || likely(__Pyx_TypeTest(PyList_GET_ITEM(__pyx_v_list_of_arrays, __pyx_v_i), __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 888; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_2 = PyList_GET_ITEM(__pyx_v_list_of_arrays, __pyx_v_i); __Pyx_INCREF(__pyx_t_2); __Pyx_XDECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_2)); __pyx_t_2 = 0; /* "pandas/lib.pyx":889 * * arr = list_of_arrays[i] * vecs[i] = arr.data # <<<<<<<<<<<<<< * # assume uniqueness?? * */ (__pyx_v_vecs[__pyx_v_i]) = ((__pyx_t_5numpy_int64_t *)__pyx_v_arr->data); } /* "pandas/lib.pyx":892 * # assume uniqueness?? * * for i from 1 <= i < n: # <<<<<<<<<<<<<< * for k from 0 <= k < nlevels: * cur = vecs[k][i] */ __pyx_t_1 = __pyx_v_n; for (__pyx_v_i = 1; __pyx_v_i < __pyx_t_1; __pyx_v_i++) { /* "pandas/lib.pyx":893 * * for i from 1 <= i < n: * for k from 0 <= k < nlevels: # <<<<<<<<<<<<<< * cur = vecs[k][i] * pre = vecs[k][i-1] */ __pyx_t_3 = __pyx_v_nlevels; for (__pyx_v_k = 0; __pyx_v_k < __pyx_t_3; __pyx_v_k++) { /* "pandas/lib.pyx":894 * for i from 1 <= i < n: * for k from 0 <= k < nlevels: * cur = vecs[k][i] # <<<<<<<<<<<<<< * pre = vecs[k][i-1] * if cur == pre: */ __pyx_v_cur = ((__pyx_v_vecs[__pyx_v_k])[__pyx_v_i]); /* "pandas/lib.pyx":895 * for k from 0 <= k < nlevels: * cur = vecs[k][i] * pre = vecs[k][i-1] # <<<<<<<<<<<<<< * if cur == pre: * continue */ __pyx_v_pre = ((__pyx_v_vecs[__pyx_v_k])[(__pyx_v_i - 1)]); /* "pandas/lib.pyx":896 * cur = vecs[k][i] * pre = vecs[k][i-1] * if cur == pre: # <<<<<<<<<<<<<< * continue * elif cur > pre: */ __pyx_t_4 = ((__pyx_v_cur == __pyx_v_pre) != 0); if (__pyx_t_4) { /* "pandas/lib.pyx":897 * pre = vecs[k][i-1] * if cur == pre: * continue # <<<<<<<<<<<<<< * elif cur > pre: * break */ goto __pyx_L7_continue; } /* "pandas/lib.pyx":898 * if cur == pre: * continue * elif cur > pre: # <<<<<<<<<<<<<< * break * else: */ __pyx_t_4 = ((__pyx_v_cur > __pyx_v_pre) != 0); if (__pyx_t_4) { /* "pandas/lib.pyx":899 * continue * elif cur > pre: * break # <<<<<<<<<<<<<< * else: * return False */ goto __pyx_L8_break; } /*else*/ { /* "pandas/lib.pyx":901 * break * else: * return False # <<<<<<<<<<<<<< * free(vecs) * return True */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(Py_False); __pyx_r = Py_False; goto __pyx_L0; } __pyx_L7_continue:; } __pyx_L8_break:; } /* "pandas/lib.pyx":902 * else: * return False * free(vecs) # <<<<<<<<<<<<<< * return True * */ free(__pyx_v_vecs); /* "pandas/lib.pyx":903 * return False * free(vecs) * return True # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(Py_True); __pyx_r = Py_True; goto __pyx_L0; /* "pandas/lib.pyx":874 * @cython.wraparound(False) * @cython.boundscheck(False) * def is_lexsorted(list list_of_arrays): # <<<<<<<<<<<<<< * cdef: * int i */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("pandas.lib.is_lexsorted", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_arr); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/lib.pyx":913 * @cython.boundscheck(False) * @cython.wraparound(False) * def generate_bins_dt64(ndarray[int64_t] values, ndarray[int64_t] binner, # <<<<<<<<<<<<<< * object closed='left'): * """ */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_3lib_79generate_bins_dt64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6pandas_3lib_78generate_bins_dt64[] = "\n Int64 (datetime64) version of generic python version in groupby.py\n "; static PyMethodDef __pyx_mdef_6pandas_3lib_79generate_bins_dt64 = {__Pyx_NAMESTR("generate_bins_dt64"), (PyCFunction)__pyx_pw_6pandas_3lib_79generate_bins_dt64, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_3lib_78generate_bins_dt64)}; static PyObject *__pyx_pw_6pandas_3lib_79generate_bins_dt64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_values = 0; PyArrayObject *__pyx_v_binner = 0; PyObject *__pyx_v_closed = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("generate_bins_dt64 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_values,&__pyx_n_s_binner,&__pyx_n_s_closed,0}; PyObject* values[3] = {0,0,0}; values[2] = ((PyObject *)__pyx_n_s_left); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_values)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_binner)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("generate_bins_dt64", 0, 2, 3, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 913; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_closed); if (value) { values[2] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "generate_bins_dt64") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 913; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_values = ((PyArrayObject *)values[0]); __pyx_v_binner = ((PyArrayObject *)values[1]); __pyx_v_closed = values[2]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("generate_bins_dt64", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 913; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.lib.generate_bins_dt64", __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_filename = __pyx_f[2]; __pyx_lineno = 913; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_binner), __pyx_ptype_5numpy_ndarray, 1, "binner", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 913; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_3lib_78generate_bins_dt64(__pyx_self, __pyx_v_values, __pyx_v_binner, __pyx_v_closed); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_3lib_78generate_bins_dt64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_binner, PyObject *__pyx_v_closed) { Py_ssize_t __pyx_v_lenidx; Py_ssize_t __pyx_v_lenbin; Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_bc; PyArrayObject *__pyx_v_bins = 0; CYTHON_UNUSED __pyx_t_5numpy_int64_t __pyx_v_l_bin; __pyx_t_5numpy_int64_t __pyx_v_r_bin; int __pyx_v_right_closed; __Pyx_LocalBuf_ND __pyx_pybuffernd_binner; __Pyx_Buffer __pyx_pybuffer_binner; __Pyx_LocalBuf_ND __pyx_pybuffernd_bins; __Pyx_Buffer __pyx_pybuffer_bins; __Pyx_LocalBuf_ND __pyx_pybuffernd_values; __Pyx_Buffer __pyx_pybuffer_values; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; Py_ssize_t __pyx_t_3; int __pyx_t_4; int __pyx_t_5; long __pyx_t_6; long __pyx_t_7; Py_ssize_t __pyx_t_8; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; PyObject *__pyx_t_11 = NULL; PyObject *__pyx_t_12 = NULL; PyArrayObject *__pyx_t_13 = NULL; int __pyx_t_14; PyObject *__pyx_t_15 = NULL; PyObject *__pyx_t_16 = NULL; PyObject *__pyx_t_17 = NULL; 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; int __pyx_t_24; Py_ssize_t __pyx_t_25; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("generate_bins_dt64", 0); __pyx_pybuffer_bins.pybuffer.buf = NULL; __pyx_pybuffer_bins.refcount = 0; __pyx_pybuffernd_bins.data = NULL; __pyx_pybuffernd_bins.rcbuffer = &__pyx_pybuffer_bins; __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_binner.pybuffer.buf = NULL; __pyx_pybuffer_binner.refcount = 0; __pyx_pybuffernd_binner.data = NULL; __pyx_pybuffernd_binner.rcbuffer = &__pyx_pybuffer_binner; { __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_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 913; __pyx_clineno = __LINE__; goto __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_binner.rcbuffer->pybuffer, (PyObject*)__pyx_v_binner, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 913; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_binner.diminfo[0].strides = __pyx_pybuffernd_binner.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_binner.diminfo[0].shape = __pyx_pybuffernd_binner.rcbuffer->pybuffer.shape[0]; /* "pandas/lib.pyx":922 * ndarray[int64_t] bins * int64_t l_bin, r_bin * bint right_closed = closed == 'right' # <<<<<<<<<<<<<< * * lenidx = len(values) */ __pyx_t_1 = PyObject_RichCompare(__pyx_v_closed, __pyx_n_s_right, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 922; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 922; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_right_closed = __pyx_t_2; /* "pandas/lib.pyx":924 * bint right_closed = closed == 'right' * * lenidx = len(values) # <<<<<<<<<<<<<< * lenbin = len(binner) * */ __pyx_t_3 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 924; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_lenidx = __pyx_t_3; /* "pandas/lib.pyx":925 * * lenidx = len(values) * lenbin = len(binner) # <<<<<<<<<<<<<< * * if lenidx <= 0 or lenbin <= 0: */ __pyx_t_3 = PyObject_Length(((PyObject *)__pyx_v_binner)); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 925; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_lenbin = __pyx_t_3; /* "pandas/lib.pyx":927 * lenbin = len(binner) * * if lenidx <= 0 or lenbin <= 0: # <<<<<<<<<<<<<< * raise ValueError("Invalid length for values or for binner") * */ __pyx_t_2 = ((__pyx_v_lenidx <= 0) != 0); if (!__pyx_t_2) { __pyx_t_4 = ((__pyx_v_lenbin <= 0) != 0); __pyx_t_5 = __pyx_t_4; } else { __pyx_t_5 = __pyx_t_2; } if (__pyx_t_5) { /* "pandas/lib.pyx":928 * * if lenidx <= 0 or lenbin <= 0: * raise ValueError("Invalid length for values or for binner") # <<<<<<<<<<<<<< * * # check binner fits data */ __pyx_t_1 = PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__7, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 928; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 928; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } /* "pandas/lib.pyx":931 * * # check binner fits data * if values[0] < binner[0]: # <<<<<<<<<<<<<< * raise ValueError("Values falls before first bin") * */ __pyx_t_6 = 0; __pyx_t_7 = 0; __pyx_t_5 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_6, __pyx_pybuffernd_values.diminfo[0].strides)) < (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_binner.rcbuffer->pybuffer.buf, __pyx_t_7, __pyx_pybuffernd_binner.diminfo[0].strides))) != 0); if (__pyx_t_5) { /* "pandas/lib.pyx":932 * # check binner fits data * if values[0] < binner[0]: * raise ValueError("Values falls before first bin") # <<<<<<<<<<<<<< * * if values[lenidx-1] > binner[lenbin-1]: */ __pyx_t_1 = PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__8, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 932; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 932; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } /* "pandas/lib.pyx":934 * raise ValueError("Values falls before first bin") * * if values[lenidx-1] > binner[lenbin-1]: # <<<<<<<<<<<<<< * raise ValueError("Values falls after last bin") * */ __pyx_t_3 = (__pyx_v_lenidx - 1); __pyx_t_8 = (__pyx_v_lenbin - 1); __pyx_t_5 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_3, __pyx_pybuffernd_values.diminfo[0].strides)) > (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_binner.rcbuffer->pybuffer.buf, __pyx_t_8, __pyx_pybuffernd_binner.diminfo[0].strides))) != 0); if (__pyx_t_5) { /* "pandas/lib.pyx":935 * * if values[lenidx-1] > binner[lenbin-1]: * raise ValueError("Values falls after last bin") # <<<<<<<<<<<<<< * * bins = np.empty(lenbin - 1, dtype=np.int64) */ __pyx_t_1 = PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__9, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 935; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 935; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } /* "pandas/lib.pyx":937 * raise ValueError("Values falls after last bin") * * bins = np.empty(lenbin - 1, dtype=np.int64) # <<<<<<<<<<<<<< * * j = 0 # index into values */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 937; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 937; __pyx_clineno = __LINE__; goto __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_lenbin - 1)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 937; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_10 = PyTuple_New(1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 937; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 937; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_11 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 937; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_int64); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 937; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_dtype, __pyx_t_12) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 937; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __pyx_t_12 = PyObject_Call(__pyx_t_9, __pyx_t_10, __pyx_t_1); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 937; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (!(likely(((__pyx_t_12) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_12, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 937; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_13 = ((PyArrayObject *)__pyx_t_12); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_bins.rcbuffer->pybuffer); __pyx_t_14 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_bins.rcbuffer->pybuffer, (PyObject*)__pyx_t_13, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_14 < 0)) { PyErr_Fetch(&__pyx_t_15, &__pyx_t_16, &__pyx_t_17); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_bins.rcbuffer->pybuffer, (PyObject*)__pyx_v_bins, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_15); Py_XDECREF(__pyx_t_16); Py_XDECREF(__pyx_t_17); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_15, __pyx_t_16, __pyx_t_17); } } __pyx_pybuffernd_bins.diminfo[0].strides = __pyx_pybuffernd_bins.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_bins.diminfo[0].shape = __pyx_pybuffernd_bins.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_14 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 937; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_13 = 0; __pyx_v_bins = ((PyArrayObject *)__pyx_t_12); __pyx_t_12 = 0; /* "pandas/lib.pyx":939 * bins = np.empty(lenbin - 1, dtype=np.int64) * * j = 0 # index into values # <<<<<<<<<<<<<< * bc = 0 # bin count * */ __pyx_v_j = 0; /* "pandas/lib.pyx":940 * * j = 0 # index into values * bc = 0 # bin count # <<<<<<<<<<<<<< * * # linear scan */ __pyx_v_bc = 0; /* "pandas/lib.pyx":943 * * # linear scan * for i in range(0, lenbin - 1): # <<<<<<<<<<<<<< * l_bin = binner[i] * r_bin = binner[i+1] */ __pyx_t_18 = (__pyx_v_lenbin - 1); for (__pyx_t_19 = 0; __pyx_t_19 < __pyx_t_18; __pyx_t_19+=1) { __pyx_v_i = __pyx_t_19; /* "pandas/lib.pyx":944 * # linear scan * for i in range(0, lenbin - 1): * l_bin = binner[i] # <<<<<<<<<<<<<< * r_bin = binner[i+1] * */ __pyx_t_20 = __pyx_v_i; __pyx_v_l_bin = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_binner.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_binner.diminfo[0].strides)); /* "pandas/lib.pyx":945 * for i in range(0, lenbin - 1): * l_bin = binner[i] * r_bin = binner[i+1] # <<<<<<<<<<<<<< * * # count values in current bin, advance to next bin */ __pyx_t_21 = (__pyx_v_i + 1); __pyx_v_r_bin = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_binner.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_binner.diminfo[0].strides)); /* "pandas/lib.pyx":948 * * # count values in current bin, advance to next bin * while j < lenidx and (values[j] < r_bin or # <<<<<<<<<<<<<< * (right_closed and values[j] == r_bin)): * j += 1 */ while (1) { __pyx_t_5 = ((__pyx_v_j < __pyx_v_lenidx) != 0); if (__pyx_t_5) { __pyx_t_22 = __pyx_v_j; __pyx_t_2 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_22, __pyx_pybuffernd_values.diminfo[0].strides)) < __pyx_v_r_bin) != 0); if (!__pyx_t_2) { /* "pandas/lib.pyx":949 * # count values in current bin, advance to next bin * while j < lenidx and (values[j] < r_bin or * (right_closed and values[j] == r_bin)): # <<<<<<<<<<<<<< * j += 1 * */ if ((__pyx_v_right_closed != 0)) { __pyx_t_23 = __pyx_v_j; __pyx_t_4 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_23, __pyx_pybuffernd_values.diminfo[0].strides)) == __pyx_v_r_bin) != 0); __pyx_t_24 = __pyx_t_4; } else { __pyx_t_24 = (__pyx_v_right_closed != 0); } __pyx_t_4 = __pyx_t_24; } else { __pyx_t_4 = __pyx_t_2; } __pyx_t_2 = __pyx_t_4; } else { __pyx_t_2 = __pyx_t_5; } if (!__pyx_t_2) break; /* "pandas/lib.pyx":950 * while j < lenidx and (values[j] < r_bin or * (right_closed and values[j] == r_bin)): * j += 1 # <<<<<<<<<<<<<< * * bins[bc] = j */ __pyx_v_j = (__pyx_v_j + 1); } /* "pandas/lib.pyx":952 * j += 1 * * bins[bc] = j # <<<<<<<<<<<<<< * bc += 1 * */ __pyx_t_25 = __pyx_v_bc; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_bins.rcbuffer->pybuffer.buf, __pyx_t_25, __pyx_pybuffernd_bins.diminfo[0].strides) = __pyx_v_j; /* "pandas/lib.pyx":953 * * bins[bc] = j * bc += 1 # <<<<<<<<<<<<<< * * return bins */ __pyx_v_bc = (__pyx_v_bc + 1); } /* "pandas/lib.pyx":955 * bc += 1 * * return bins # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_bins)); __pyx_r = ((PyObject *)__pyx_v_bins); goto __pyx_L0; /* "pandas/lib.pyx":913 * @cython.boundscheck(False) * @cython.wraparound(False) * def generate_bins_dt64(ndarray[int64_t] values, ndarray[int64_t] binner, # <<<<<<<<<<<<<< * object closed='left'): * """ */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_9); __Pyx_XDECREF(__pyx_t_10); __Pyx_XDECREF(__pyx_t_11); __Pyx_XDECREF(__pyx_t_12); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_binner.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_bins.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.lib.generate_bins_dt64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_binner.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_bins.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_bins); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/lib.pyx":962 * @cython.boundscheck(False) * @cython.wraparound(False) * def row_bool_subset(ndarray[float64_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[uint8_t, cast=True] mask): * cdef: */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_3lib_81row_bool_subset(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_3lib_81row_bool_subset = {__Pyx_NAMESTR("row_bool_subset"), (PyCFunction)__pyx_pw_6pandas_3lib_81row_bool_subset, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_3lib_81row_bool_subset(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_values = 0; PyArrayObject *__pyx_v_mask = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("row_bool_subset (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_values,&__pyx_n_s_mask,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_values)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_mask)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("row_bool_subset", 1, 2, 2, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 962; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "row_bool_subset") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 962; __pyx_clineno = __LINE__; goto __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_mask = ((PyArrayObject *)values[1]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("row_bool_subset", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 962; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.lib.row_bool_subset", __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_filename = __pyx_f[2]; __pyx_lineno = 962; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_mask), __pyx_ptype_5numpy_ndarray, 1, "mask", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 963; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_3lib_80row_bool_subset(__pyx_self, __pyx_v_values, __pyx_v_mask); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_3lib_80row_bool_subset(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_mask) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_n; Py_ssize_t __pyx_v_k; Py_ssize_t __pyx_v_pos; PyArrayObject *__pyx_v_out = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_mask; __Pyx_Buffer __pyx_pybuffer_mask; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __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; PyObject *(*__pyx_t_5)(PyObject *); Py_ssize_t __pyx_t_6; Py_ssize_t __pyx_t_7; 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; int __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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("row_bool_subset", 0); __pyx_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; __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_mask.pybuffer.buf = NULL; __pyx_pybuffer_mask.refcount = 0; __pyx_pybuffernd_mask.data = NULL; __pyx_pybuffernd_mask.rcbuffer = &__pyx_pybuffer_mask; { __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, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 962; __pyx_clineno = __LINE__; goto __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_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; 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)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 962; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; /* "pandas/lib.pyx":965 * ndarray[uint8_t, cast=True] mask): * cdef: * Py_ssize_t i, j, n, k, pos = 0 # <<<<<<<<<<<<<< * ndarray[float64_t, ndim=2] out * */ __pyx_v_pos = 0; /* "pandas/lib.pyx":968 * ndarray[float64_t, ndim=2] out * * n, k = ( values).shape # <<<<<<<<<<<<<< * assert(n == len(mask)) * */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_values), __pyx_n_s_shape); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 968; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) { PyObject* sequence = __pyx_t_1; #if CYTHON_COMPILING_IN_CPYTHON Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 968; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1); } else { __pyx_t_2 = PyList_GET_ITEM(sequence, 0); __pyx_t_3 = PyList_GET_ITEM(sequence, 1); } __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); #else __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 968; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 968; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } else { Py_ssize_t index = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 968; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_5 = Py_TYPE(__pyx_t_4)->tp_iternext; index = 0; __pyx_t_2 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_2)) goto __pyx_L3_unpacking_failed; __Pyx_GOTREF(__pyx_t_2); index = 1; __pyx_t_3 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_3)) goto __pyx_L3_unpacking_failed; __Pyx_GOTREF(__pyx_t_3); if (__Pyx_IternextUnpackEndCheck(__pyx_t_5(__pyx_t_4), 2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 968; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 968; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_L4_unpacking_done:; } __pyx_t_6 = __Pyx_PyIndex_AsSsize_t(__pyx_t_2); if (unlikely((__pyx_t_6 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 968; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_7 = __Pyx_PyIndex_AsSsize_t(__pyx_t_3); if (unlikely((__pyx_t_7 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 968; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_n = __pyx_t_6; __pyx_v_k = __pyx_t_7; /* "pandas/lib.pyx":969 * * n, k = ( values).shape * assert(n == len(mask)) # <<<<<<<<<<<<<< * * out = np.empty((mask.sum(), k), dtype=np.float64) */ #ifndef CYTHON_WITHOUT_ASSERTIONS if (unlikely(!Py_OptimizeFlag)) { __pyx_t_7 = PyObject_Length(((PyObject *)__pyx_v_mask)); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 969; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!((__pyx_v_n == __pyx_t_7) != 0))) { PyErr_SetNone(PyExc_AssertionError); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 969; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } } #endif /* "pandas/lib.pyx":971 * assert(n == len(mask)) * * out = np.empty((mask.sum(), k), dtype=np.float64) # <<<<<<<<<<<<<< * * for i in range(n): */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 971; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_empty); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 971; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_mask), __pyx_n_s_sum); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 971; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyObject_Call(__pyx_t_1, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 971; __pyx_clineno = __LINE__; goto __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_k); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 971; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 971; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_2 = 0; __pyx_t_1 = 0; __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 971; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyDict_New(); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 971; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 971; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_float64); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 971; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_dtype, __pyx_t_8) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 971; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_8 = PyObject_Call(__pyx_t_3, __pyx_t_1, __pyx_t_4); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 971; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (!(likely(((__pyx_t_8) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_8, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 971; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_9 = ((PyArrayObject *)__pyx_t_8); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __pyx_t_10 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_t_9, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_out.rcbuffer->pybuffer, (PyObject*)__pyx_v_out, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_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]; __pyx_pybuffernd_out.diminfo[1].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_out.diminfo[1].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[1]; if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 971; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_9 = 0; __pyx_v_out = ((PyArrayObject *)__pyx_t_8); __pyx_t_8 = 0; /* "pandas/lib.pyx":973 * out = np.empty((mask.sum(), k), dtype=np.float64) * * for i in range(n): # <<<<<<<<<<<<<< * if mask[i]: * for j in range(k): */ __pyx_t_7 = __pyx_v_n; for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_7; __pyx_t_6+=1) { __pyx_v_i = __pyx_t_6; /* "pandas/lib.pyx":974 * * for i in range(n): * if mask[i]: # <<<<<<<<<<<<<< * for j in range(k): * out[pos, j] = values[i, j] */ __pyx_t_14 = __pyx_v_i; __pyx_t_15 = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_mask.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_mask.diminfo[0].strides)) != 0); if (__pyx_t_15) { /* "pandas/lib.pyx":975 * for i in range(n): * if mask[i]: * for j in range(k): # <<<<<<<<<<<<<< * out[pos, j] = values[i, j] * pos += 1 */ __pyx_t_16 = __pyx_v_k; for (__pyx_t_17 = 0; __pyx_t_17 < __pyx_t_16; __pyx_t_17+=1) { __pyx_v_j = __pyx_t_17; /* "pandas/lib.pyx":976 * if mask[i]: * for j in range(k): * out[pos, j] = values[i, j] # <<<<<<<<<<<<<< * pos += 1 * */ __pyx_t_18 = __pyx_v_i; __pyx_t_19 = __pyx_v_j; __pyx_t_20 = __pyx_v_pos; __pyx_t_21 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_21, __pyx_pybuffernd_out.diminfo[1].strides) = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_19, __pyx_pybuffernd_values.diminfo[1].strides)); } /* "pandas/lib.pyx":977 * for j in range(k): * out[pos, j] = values[i, j] * pos += 1 # <<<<<<<<<<<<<< * * return out */ __pyx_v_pos = (__pyx_v_pos + 1); goto __pyx_L7; } __pyx_L7:; } /* "pandas/lib.pyx":979 * pos += 1 * * return out # <<<<<<<<<<<<<< * * @cython.boundscheck(False) */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_out)); __pyx_r = ((PyObject *)__pyx_v_out); goto __pyx_L0; /* "pandas/lib.pyx":962 * @cython.boundscheck(False) * @cython.wraparound(False) * def row_bool_subset(ndarray[float64_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[uint8_t, cast=True] mask): * 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_8); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_mask.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.lib.row_bool_subset", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_mask.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_out); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/lib.pyx":983 * @cython.boundscheck(False) * @cython.wraparound(False) * def row_bool_subset_object(ndarray[object, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[uint8_t, cast=True] mask): * cdef: */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_3lib_83row_bool_subset_object(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_3lib_83row_bool_subset_object = {__Pyx_NAMESTR("row_bool_subset_object"), (PyCFunction)__pyx_pw_6pandas_3lib_83row_bool_subset_object, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_3lib_83row_bool_subset_object(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_values = 0; PyArrayObject *__pyx_v_mask = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("row_bool_subset_object (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_values,&__pyx_n_s_mask,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_values)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_mask)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("row_bool_subset_object", 1, 2, 2, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 983; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "row_bool_subset_object") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 983; __pyx_clineno = __LINE__; goto __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_mask = ((PyArrayObject *)values[1]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("row_bool_subset_object", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 983; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.lib.row_bool_subset_object", __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_filename = __pyx_f[2]; __pyx_lineno = 983; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_mask), __pyx_ptype_5numpy_ndarray, 1, "mask", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 984; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_3lib_82row_bool_subset_object(__pyx_self, __pyx_v_values, __pyx_v_mask); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_3lib_82row_bool_subset_object(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_mask) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_n; Py_ssize_t __pyx_v_k; Py_ssize_t __pyx_v_pos; PyArrayObject *__pyx_v_out = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_mask; __Pyx_Buffer __pyx_pybuffer_mask; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __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; PyObject *(*__pyx_t_5)(PyObject *); Py_ssize_t __pyx_t_6; Py_ssize_t __pyx_t_7; PyArrayObject *__pyx_t_8 = NULL; int __pyx_t_9; PyObject *__pyx_t_10 = NULL; PyObject *__pyx_t_11 = NULL; PyObject *__pyx_t_12 = NULL; Py_ssize_t __pyx_t_13; int __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; PyObject **__pyx_t_21; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("row_bool_subset_object", 0); __pyx_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; __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_mask.pybuffer.buf = NULL; __pyx_pybuffer_mask.refcount = 0; __pyx_pybuffernd_mask.data = NULL; __pyx_pybuffernd_mask.rcbuffer = &__pyx_pybuffer_mask; { __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, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 983; __pyx_clineno = __LINE__; goto __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_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; 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)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 983; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; /* "pandas/lib.pyx":986 * ndarray[uint8_t, cast=True] mask): * cdef: * Py_ssize_t i, j, n, k, pos = 0 # <<<<<<<<<<<<<< * ndarray[object, ndim=2] out * */ __pyx_v_pos = 0; /* "pandas/lib.pyx":989 * ndarray[object, ndim=2] out * * n, k = ( values).shape # <<<<<<<<<<<<<< * assert(n == len(mask)) * */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_values), __pyx_n_s_shape); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 989; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) { PyObject* sequence = __pyx_t_1; #if CYTHON_COMPILING_IN_CPYTHON Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 989; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1); } else { __pyx_t_2 = PyList_GET_ITEM(sequence, 0); __pyx_t_3 = PyList_GET_ITEM(sequence, 1); } __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); #else __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 989; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 989; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } else { Py_ssize_t index = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 989; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_5 = Py_TYPE(__pyx_t_4)->tp_iternext; index = 0; __pyx_t_2 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_2)) goto __pyx_L3_unpacking_failed; __Pyx_GOTREF(__pyx_t_2); index = 1; __pyx_t_3 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_3)) goto __pyx_L3_unpacking_failed; __Pyx_GOTREF(__pyx_t_3); if (__Pyx_IternextUnpackEndCheck(__pyx_t_5(__pyx_t_4), 2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 989; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 989; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_L4_unpacking_done:; } __pyx_t_6 = __Pyx_PyIndex_AsSsize_t(__pyx_t_2); if (unlikely((__pyx_t_6 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 989; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_7 = __Pyx_PyIndex_AsSsize_t(__pyx_t_3); if (unlikely((__pyx_t_7 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 989; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_n = __pyx_t_6; __pyx_v_k = __pyx_t_7; /* "pandas/lib.pyx":990 * * n, k = ( values).shape * assert(n == len(mask)) # <<<<<<<<<<<<<< * * out = np.empty((mask.sum(), k), dtype=object) */ #ifndef CYTHON_WITHOUT_ASSERTIONS if (unlikely(!Py_OptimizeFlag)) { __pyx_t_7 = PyObject_Length(((PyObject *)__pyx_v_mask)); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 990; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!((__pyx_v_n == __pyx_t_7) != 0))) { PyErr_SetNone(PyExc_AssertionError); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 990; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } } #endif /* "pandas/lib.pyx":992 * assert(n == len(mask)) * * out = np.empty((mask.sum(), k), dtype=object) # <<<<<<<<<<<<<< * * for i in range(n): */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 992; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_empty); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 992; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_mask), __pyx_n_s_sum); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 992; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyObject_Call(__pyx_t_1, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 992; __pyx_clineno = __LINE__; goto __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_k); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 992; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 992; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_2 = 0; __pyx_t_1 = 0; __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 992; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyDict_New(); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 992; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_dtype, __pyx_builtin_object) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 992; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_2 = PyObject_Call(__pyx_t_3, __pyx_t_1, __pyx_t_4); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 992; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 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_filename = __pyx_f[2]; __pyx_lineno = 992; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_8 = ((PyArrayObject *)__pyx_t_2); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __pyx_t_9 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_t_8, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack); if (unlikely(__pyx_t_9 < 0)) { PyErr_Fetch(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_v_out, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_11); Py_XDECREF(__pyx_t_12); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_10, __pyx_t_11, __pyx_t_12); } } __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]; __pyx_pybuffernd_out.diminfo[1].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_out.diminfo[1].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[1]; if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 992; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_8 = 0; __pyx_v_out = ((PyArrayObject *)__pyx_t_2); __pyx_t_2 = 0; /* "pandas/lib.pyx":994 * out = np.empty((mask.sum(), k), dtype=object) * * for i in range(n): # <<<<<<<<<<<<<< * if mask[i]: * for j in range(k): */ __pyx_t_7 = __pyx_v_n; for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_7; __pyx_t_6+=1) { __pyx_v_i = __pyx_t_6; /* "pandas/lib.pyx":995 * * for i in range(n): * if mask[i]: # <<<<<<<<<<<<<< * for j in range(k): * out[pos, j] = values[i, j] */ __pyx_t_13 = __pyx_v_i; __pyx_t_14 = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_mask.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_mask.diminfo[0].strides)) != 0); if (__pyx_t_14) { /* "pandas/lib.pyx":996 * for i in range(n): * if mask[i]: * for j in range(k): # <<<<<<<<<<<<<< * out[pos, j] = values[i, j] * pos += 1 */ __pyx_t_15 = __pyx_v_k; for (__pyx_t_16 = 0; __pyx_t_16 < __pyx_t_15; __pyx_t_16+=1) { __pyx_v_j = __pyx_t_16; /* "pandas/lib.pyx":997 * if mask[i]: * for j in range(k): * out[pos, j] = values[i, j] # <<<<<<<<<<<<<< * pos += 1 * */ __pyx_t_17 = __pyx_v_i; __pyx_t_18 = __pyx_v_j; __pyx_t_2 = (PyObject *) *__Pyx_BufPtrStrided2d(PyObject **, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_18, __pyx_pybuffernd_values.diminfo[1].strides); __Pyx_INCREF((PyObject*)__pyx_t_2); __pyx_t_19 = __pyx_v_pos; __pyx_t_20 = __pyx_v_j; __pyx_t_21 = __Pyx_BufPtrStrided2d(PyObject **, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_20, __pyx_pybuffernd_out.diminfo[1].strides); __Pyx_GOTREF(*__pyx_t_21); __Pyx_INCREF(__pyx_t_2); __Pyx_DECREF(*__pyx_t_21); *__pyx_t_21 = __pyx_t_2; __Pyx_GIVEREF(*__pyx_t_21); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } /* "pandas/lib.pyx":998 * for j in range(k): * out[pos, j] = values[i, j] * pos += 1 # <<<<<<<<<<<<<< * * return out */ __pyx_v_pos = (__pyx_v_pos + 1); goto __pyx_L7; } __pyx_L7:; } /* "pandas/lib.pyx":1000 * pos += 1 * * return out # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_out)); __pyx_r = ((PyObject *)__pyx_v_out); goto __pyx_L0; /* "pandas/lib.pyx":983 * @cython.boundscheck(False) * @cython.wraparound(False) * def row_bool_subset_object(ndarray[object, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[uint8_t, cast=True] mask): * 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); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_mask.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.lib.row_bool_subset_object", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_mask.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_out); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/lib.pyx":1003 * * * def group_count(ndarray[int64_t] values, Py_ssize_t size): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = len(values) */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_3lib_85group_count(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_3lib_85group_count = {__Pyx_NAMESTR("group_count"), (PyCFunction)__pyx_pw_6pandas_3lib_85group_count, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_3lib_85group_count(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_values = 0; Py_ssize_t __pyx_v_size; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("group_count (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_values,&__pyx_n_s_size,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_values)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_size)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("group_count", 1, 2, 2, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1003; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "group_count") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1003; __pyx_clineno = __LINE__; goto __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_size = __Pyx_PyIndex_AsSsize_t(values[1]); if (unlikely((__pyx_v_size == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1003; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("group_count", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1003; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.lib.group_count", __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_filename = __pyx_f[2]; __pyx_lineno = 1003; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_3lib_84group_count(__pyx_self, __pyx_v_values, __pyx_v_size); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_3lib_84group_count(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, Py_ssize_t __pyx_v_size) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_n; PyArrayObject *__pyx_v_counts = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_counts; __Pyx_Buffer __pyx_pybuffer_counts; __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; __pyx_t_5numpy_int64_t __pyx_t_14; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("group_count", 0); __pyx_pybuffer_counts.pybuffer.buf = NULL; __pyx_pybuffer_counts.refcount = 0; __pyx_pybuffernd_counts.data = NULL; __pyx_pybuffernd_counts.rcbuffer = &__pyx_pybuffer_counts; __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_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1003; __pyx_clineno = __LINE__; goto __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/lib.pyx":1005 * def group_count(ndarray[int64_t] values, Py_ssize_t size): * cdef: * Py_ssize_t i, n = len(values) # <<<<<<<<<<<<<< * ndarray[int64_t] counts * */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1005; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/lib.pyx":1008 * ndarray[int64_t] counts * * counts = np.zeros(size, dtype=np.int64) # <<<<<<<<<<<<<< * for i in range(n): * counts[values[i]] += 1 */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1008; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_zeros); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1008; __pyx_clineno = __LINE__; goto __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_size); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1008; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1008; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1008; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1008; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_int64); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1008; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 1008; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyObject_Call(__pyx_t_3, __pyx_t_4, __pyx_t_2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1008; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 1008; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_7 = ((PyArrayObject *)__pyx_t_6); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_counts.rcbuffer->pybuffer); __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_counts.rcbuffer->pybuffer, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_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_counts.rcbuffer->pybuffer, (PyObject*)__pyx_v_counts, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_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_pybuffernd_counts.diminfo[0].strides = __pyx_pybuffernd_counts.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_counts.diminfo[0].shape = __pyx_pybuffernd_counts.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1008; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_7 = 0; __pyx_v_counts = ((PyArrayObject *)__pyx_t_6); __pyx_t_6 = 0; /* "pandas/lib.pyx":1009 * * counts = np.zeros(size, dtype=np.int64) * for i in range(n): # <<<<<<<<<<<<<< * counts[values[i]] += 1 * return counts */ __pyx_t_1 = __pyx_v_n; for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_1; __pyx_t_12+=1) { __pyx_v_i = __pyx_t_12; /* "pandas/lib.pyx":1010 * counts = np.zeros(size, dtype=np.int64) * for i in range(n): * counts[values[i]] += 1 # <<<<<<<<<<<<<< * return counts * */ __pyx_t_13 = __pyx_v_i; __pyx_t_8 = -1; if (__pyx_t_13 < 0) { __pyx_t_13 += __pyx_pybuffernd_values.diminfo[0].shape; if (unlikely(__pyx_t_13 < 0)) __pyx_t_8 = 0; } else if (unlikely(__pyx_t_13 >= __pyx_pybuffernd_values.diminfo[0].shape)) __pyx_t_8 = 0; if (unlikely(__pyx_t_8 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_8); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1010; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_14 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_values.diminfo[0].strides)); __pyx_t_8 = -1; if (__pyx_t_14 < 0) { __pyx_t_14 += __pyx_pybuffernd_counts.diminfo[0].shape; if (unlikely(__pyx_t_14 < 0)) __pyx_t_8 = 0; } else if (unlikely(__pyx_t_14 >= __pyx_pybuffernd_counts.diminfo[0].shape)) __pyx_t_8 = 0; if (unlikely(__pyx_t_8 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_8); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1010; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_counts.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_counts.diminfo[0].strides) += 1; } /* "pandas/lib.pyx":1011 * for i in range(n): * counts[values[i]] += 1 * return counts # <<<<<<<<<<<<<< * * def lookup_values(ndarray[object] values, dict mapping): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_counts)); __pyx_r = ((PyObject *)__pyx_v_counts); goto __pyx_L0; /* "pandas/lib.pyx":1003 * * * def group_count(ndarray[int64_t] values, Py_ssize_t size): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = len(values) */ /* 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_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_counts.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.lib.group_count", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_counts.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_counts); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/lib.pyx":1013 * return counts * * def lookup_values(ndarray[object] values, dict mapping): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = len(values) */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_3lib_87lookup_values(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_3lib_87lookup_values = {__Pyx_NAMESTR("lookup_values"), (PyCFunction)__pyx_pw_6pandas_3lib_87lookup_values, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_3lib_87lookup_values(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_values = 0; PyObject *__pyx_v_mapping = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("lookup_values (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_values,&__pyx_n_s_mapping,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_values)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_mapping)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("lookup_values", 1, 2, 2, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1013; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "lookup_values") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1013; __pyx_clineno = __LINE__; goto __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_mapping = ((PyObject*)values[1]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("lookup_values", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1013; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.lib.lookup_values", __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_filename = __pyx_f[2]; __pyx_lineno = 1013; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_mapping), (&PyDict_Type), 1, "mapping", 1))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1013; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_3lib_86lookup_values(__pyx_self, __pyx_v_values, __pyx_v_mapping); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_3lib_86lookup_values(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyObject *__pyx_v_mapping) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_n; PyObject *__pyx_v_result = NULL; __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; Py_ssize_t __pyx_t_6; Py_ssize_t __pyx_t_7; int __pyx_t_8; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("lookup_values", 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_object, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1013; __pyx_clineno = __LINE__; goto __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/lib.pyx":1015 * def lookup_values(ndarray[object] values, dict mapping): * cdef: * Py_ssize_t i, n = len(values) # <<<<<<<<<<<<<< * * result = np.empty(n, dtype='O') */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1015; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/lib.pyx":1017 * Py_ssize_t i, n = len(values) * * result = np.empty(n, dtype='O') # <<<<<<<<<<<<<< * for i in range(n): * result[i] = mapping[values[i]] */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1017; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 1017; __pyx_clineno = __LINE__; goto __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_n); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1017; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1017; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1017; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_dtype, __pyx_n_s_O) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1017; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_5 = PyObject_Call(__pyx_t_3, __pyx_t_4, __pyx_t_2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1017; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_result = __pyx_t_5; __pyx_t_5 = 0; /* "pandas/lib.pyx":1018 * * result = np.empty(n, dtype='O') * for i in range(n): # <<<<<<<<<<<<<< * result[i] = mapping[values[i]] * return maybe_convert_objects(result) */ __pyx_t_1 = __pyx_v_n; for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_1; __pyx_t_6+=1) { __pyx_v_i = __pyx_t_6; /* "pandas/lib.pyx":1019 * result = np.empty(n, dtype='O') * for i in range(n): * result[i] = mapping[values[i]] # <<<<<<<<<<<<<< * return maybe_convert_objects(result) * */ if (unlikely(__pyx_v_mapping == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1019; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_7 = __pyx_v_i; __pyx_t_8 = -1; if (__pyx_t_7 < 0) { __pyx_t_7 += __pyx_pybuffernd_values.diminfo[0].shape; if (unlikely(__pyx_t_7 < 0)) __pyx_t_8 = 0; } else if (unlikely(__pyx_t_7 >= __pyx_pybuffernd_values.diminfo[0].shape)) __pyx_t_8 = 0; if (unlikely(__pyx_t_8 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_8); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1019; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_5 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_7, __pyx_pybuffernd_values.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_5); __pyx_t_2 = __Pyx_PyDict_GetItem(__pyx_v_mapping, __pyx_t_5); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1019; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(__Pyx_SetItemInt(__pyx_v_result, __pyx_v_i, __pyx_t_2, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1) < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1019; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } /* "pandas/lib.pyx":1020 * for i in range(n): * result[i] = mapping[values[i]] * return maybe_convert_objects(result) # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_maybe_convert_objects); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1020; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1020; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_v_result); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_result); __Pyx_GIVEREF(__pyx_v_result); __pyx_t_4 = PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1020; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; /* "pandas/lib.pyx":1013 * return counts * * def lookup_values(ndarray[object] values, dict mapping): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = len(values) */ /* 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); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __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.lib.lookup_values", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF(__pyx_v_result); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/lib.pyx":1023 * * * def count_level_1d(ndarray[uint8_t, cast=True] mask, # <<<<<<<<<<<<<< * ndarray[int64_t] labels, Py_ssize_t max_bin): * cdef: */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_3lib_89count_level_1d(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_3lib_89count_level_1d = {__Pyx_NAMESTR("count_level_1d"), (PyCFunction)__pyx_pw_6pandas_3lib_89count_level_1d, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_3lib_89count_level_1d(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_mask = 0; PyArrayObject *__pyx_v_labels = 0; Py_ssize_t __pyx_v_max_bin; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("count_level_1d (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_mask,&__pyx_n_s_labels,&__pyx_n_s_max_bin,0}; PyObject* values[3] = {0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_mask)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_labels)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("count_level_1d", 1, 3, 3, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1023; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_max_bin)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("count_level_1d", 1, 3, 3, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1023; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "count_level_1d") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1023; __pyx_clineno = __LINE__; goto __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_mask = ((PyArrayObject *)values[0]); __pyx_v_labels = ((PyArrayObject *)values[1]); __pyx_v_max_bin = __Pyx_PyIndex_AsSsize_t(values[2]); if (unlikely((__pyx_v_max_bin == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1024; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("count_level_1d", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1023; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.lib.count_level_1d", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_mask), __pyx_ptype_5numpy_ndarray, 1, "mask", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1023; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_labels), __pyx_ptype_5numpy_ndarray, 1, "labels", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1024; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_3lib_88count_level_1d(__pyx_self, __pyx_v_mask, __pyx_v_labels, __pyx_v_max_bin); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_3lib_88count_level_1d(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_mask, PyArrayObject *__pyx_v_labels, Py_ssize_t __pyx_v_max_bin) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_n; PyArrayObject *__pyx_v_counts = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_counts; __Pyx_Buffer __pyx_pybuffer_counts; __Pyx_LocalBuf_ND __pyx_pybuffernd_labels; __Pyx_Buffer __pyx_pybuffer_labels; __Pyx_LocalBuf_ND __pyx_pybuffernd_mask; __Pyx_Buffer __pyx_pybuffer_mask; 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; PyArrayObject *__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; Py_ssize_t __pyx_t_11; int __pyx_t_12; Py_ssize_t __pyx_t_13; __pyx_t_5numpy_int64_t __pyx_t_14; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("count_level_1d", 0); __pyx_pybuffer_counts.pybuffer.buf = NULL; __pyx_pybuffer_counts.refcount = 0; __pyx_pybuffernd_counts.data = NULL; __pyx_pybuffernd_counts.rcbuffer = &__pyx_pybuffer_counts; __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_labels.pybuffer.buf = NULL; __pyx_pybuffer_labels.refcount = 0; __pyx_pybuffernd_labels.data = NULL; __pyx_pybuffernd_labels.rcbuffer = &__pyx_pybuffer_labels; { __Pyx_BufFmt_StackElem __pyx_stack[1]; 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)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1023; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_labels.rcbuffer->pybuffer, (PyObject*)__pyx_v_labels, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1023; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_labels.diminfo[0].strides = __pyx_pybuffernd_labels.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_labels.diminfo[0].shape = __pyx_pybuffernd_labels.rcbuffer->pybuffer.shape[0]; /* "pandas/lib.pyx":1029 * ndarray[int64_t] counts * * counts = np.zeros(max_bin, dtype='i8') # <<<<<<<<<<<<<< * * n = len(mask) */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1029; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_zeros); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1029; __pyx_clineno = __LINE__; goto __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_bin); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1029; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1029; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1029; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_dtype, __pyx_n_s_i8) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1029; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_4 = PyObject_Call(__pyx_t_2, __pyx_t_3, __pyx_t_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1029; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 1029; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_5 = ((PyArrayObject *)__pyx_t_4); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_counts.rcbuffer->pybuffer); __pyx_t_6 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_counts.rcbuffer->pybuffer, (PyObject*)__pyx_t_5, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_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_counts.rcbuffer->pybuffer, (PyObject*)__pyx_v_counts, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_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_pybuffernd_counts.diminfo[0].strides = __pyx_pybuffernd_counts.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_counts.diminfo[0].shape = __pyx_pybuffernd_counts.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1029; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_5 = 0; __pyx_v_counts = ((PyArrayObject *)__pyx_t_4); __pyx_t_4 = 0; /* "pandas/lib.pyx":1031 * counts = np.zeros(max_bin, dtype='i8') * * n = len(mask) # <<<<<<<<<<<<<< * * for i from 0 <= i < n: */ __pyx_t_10 = PyObject_Length(((PyObject *)__pyx_v_mask)); if (unlikely(__pyx_t_10 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1031; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_10; /* "pandas/lib.pyx":1033 * n = len(mask) * * for i from 0 <= i < n: # <<<<<<<<<<<<<< * if mask[i]: * counts[labels[i]] += 1 */ __pyx_t_10 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_10; __pyx_v_i++) { /* "pandas/lib.pyx":1034 * * for i from 0 <= i < n: * if mask[i]: # <<<<<<<<<<<<<< * counts[labels[i]] += 1 * */ __pyx_t_11 = __pyx_v_i; __pyx_t_6 = -1; if (__pyx_t_11 < 0) { __pyx_t_11 += __pyx_pybuffernd_mask.diminfo[0].shape; if (unlikely(__pyx_t_11 < 0)) __pyx_t_6 = 0; } else if (unlikely(__pyx_t_11 >= __pyx_pybuffernd_mask.diminfo[0].shape)) __pyx_t_6 = 0; if (unlikely(__pyx_t_6 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_6); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1034; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_12 = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_mask.rcbuffer->pybuffer.buf, __pyx_t_11, __pyx_pybuffernd_mask.diminfo[0].strides)) != 0); if (__pyx_t_12) { /* "pandas/lib.pyx":1035 * for i from 0 <= i < n: * if mask[i]: * counts[labels[i]] += 1 # <<<<<<<<<<<<<< * * return counts */ __pyx_t_13 = __pyx_v_i; __pyx_t_6 = -1; if (__pyx_t_13 < 0) { __pyx_t_13 += __pyx_pybuffernd_labels.diminfo[0].shape; if (unlikely(__pyx_t_13 < 0)) __pyx_t_6 = 0; } else if (unlikely(__pyx_t_13 >= __pyx_pybuffernd_labels.diminfo[0].shape)) __pyx_t_6 = 0; if (unlikely(__pyx_t_6 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_6); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1035; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_14 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_labels.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_labels.diminfo[0].strides)); __pyx_t_6 = -1; if (__pyx_t_14 < 0) { __pyx_t_14 += __pyx_pybuffernd_counts.diminfo[0].shape; if (unlikely(__pyx_t_14 < 0)) __pyx_t_6 = 0; } else if (unlikely(__pyx_t_14 >= __pyx_pybuffernd_counts.diminfo[0].shape)) __pyx_t_6 = 0; if (unlikely(__pyx_t_6 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_6); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1035; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_counts.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_counts.diminfo[0].strides) += 1; goto __pyx_L5; } __pyx_L5:; } /* "pandas/lib.pyx":1037 * counts[labels[i]] += 1 * * return counts # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_counts)); __pyx_r = ((PyObject *)__pyx_v_counts); goto __pyx_L0; /* "pandas/lib.pyx":1023 * * * def count_level_1d(ndarray[uint8_t, cast=True] mask, # <<<<<<<<<<<<<< * ndarray[int64_t] labels, Py_ssize_t max_bin): * 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); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_counts.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_labels.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_mask.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.lib.count_level_1d", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_counts.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_labels.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_mask.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_counts); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/lib.pyx":1040 * * * def count_level_2d(ndarray[uint8_t, ndim=2, cast=True] mask, # <<<<<<<<<<<<<< * ndarray[int64_t] labels, Py_ssize_t max_bin): * cdef: */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_3lib_91count_level_2d(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_3lib_91count_level_2d = {__Pyx_NAMESTR("count_level_2d"), (PyCFunction)__pyx_pw_6pandas_3lib_91count_level_2d, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_3lib_91count_level_2d(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_mask = 0; PyArrayObject *__pyx_v_labels = 0; Py_ssize_t __pyx_v_max_bin; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("count_level_2d (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_mask,&__pyx_n_s_labels,&__pyx_n_s_max_bin,0}; PyObject* values[3] = {0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_mask)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_labels)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("count_level_2d", 1, 3, 3, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1040; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_max_bin)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("count_level_2d", 1, 3, 3, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1040; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "count_level_2d") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1040; __pyx_clineno = __LINE__; goto __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_mask = ((PyArrayObject *)values[0]); __pyx_v_labels = ((PyArrayObject *)values[1]); __pyx_v_max_bin = __Pyx_PyIndex_AsSsize_t(values[2]); if (unlikely((__pyx_v_max_bin == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1041; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("count_level_2d", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1040; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.lib.count_level_2d", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_mask), __pyx_ptype_5numpy_ndarray, 1, "mask", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1040; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_labels), __pyx_ptype_5numpy_ndarray, 1, "labels", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1041; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_3lib_90count_level_2d(__pyx_self, __pyx_v_mask, __pyx_v_labels, __pyx_v_max_bin); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_3lib_90count_level_2d(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_mask, PyArrayObject *__pyx_v_labels, Py_ssize_t __pyx_v_max_bin) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_k; Py_ssize_t __pyx_v_n; PyArrayObject *__pyx_v_counts = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_counts; __Pyx_Buffer __pyx_pybuffer_counts; __Pyx_LocalBuf_ND __pyx_pybuffernd_labels; __Pyx_Buffer __pyx_pybuffer_labels; __Pyx_LocalBuf_ND __pyx_pybuffernd_mask; __Pyx_Buffer __pyx_pybuffer_mask; 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 *); Py_ssize_t __pyx_t_6; Py_ssize_t __pyx_t_7; PyArrayObject *__pyx_t_8 = NULL; int __pyx_t_9; PyObject *__pyx_t_10 = NULL; PyObject *__pyx_t_11 = NULL; PyObject *__pyx_t_12 = NULL; Py_ssize_t __pyx_t_13; Py_ssize_t __pyx_t_14; int __pyx_t_15; Py_ssize_t __pyx_t_16; __pyx_t_5numpy_int64_t __pyx_t_17; Py_ssize_t __pyx_t_18; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("count_level_2d", 0); __pyx_pybuffer_counts.pybuffer.buf = NULL; __pyx_pybuffer_counts.refcount = 0; __pyx_pybuffernd_counts.data = NULL; __pyx_pybuffernd_counts.rcbuffer = &__pyx_pybuffer_counts; __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_labels.pybuffer.buf = NULL; __pyx_pybuffer_labels.refcount = 0; __pyx_pybuffernd_labels.data = NULL; __pyx_pybuffernd_labels.rcbuffer = &__pyx_pybuffer_labels; { __Pyx_BufFmt_StackElem __pyx_stack[1]; 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, 2, 1, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1040; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; __pyx_pybuffernd_mask.diminfo[1].strides = __pyx_pybuffernd_mask.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_mask.diminfo[1].shape = __pyx_pybuffernd_mask.rcbuffer->pybuffer.shape[1]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_labels.rcbuffer->pybuffer, (PyObject*)__pyx_v_labels, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1040; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_labels.diminfo[0].strides = __pyx_pybuffernd_labels.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_labels.diminfo[0].shape = __pyx_pybuffernd_labels.rcbuffer->pybuffer.shape[0]; /* "pandas/lib.pyx":1046 * ndarray[int64_t, ndim=2] counts * * n, k = ( mask).shape # <<<<<<<<<<<<<< * counts = np.zeros((max_bin, k), dtype='i8') * */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_mask), __pyx_n_s_shape); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1046; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) { PyObject* sequence = __pyx_t_1; #if CYTHON_COMPILING_IN_CPYTHON Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1046; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1); } else { __pyx_t_2 = PyList_GET_ITEM(sequence, 0); __pyx_t_3 = PyList_GET_ITEM(sequence, 1); } __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); #else __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1046; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1046; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } else { Py_ssize_t index = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1046; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_5 = Py_TYPE(__pyx_t_4)->tp_iternext; index = 0; __pyx_t_2 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_2)) goto __pyx_L3_unpacking_failed; __Pyx_GOTREF(__pyx_t_2); index = 1; __pyx_t_3 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_3)) goto __pyx_L3_unpacking_failed; __Pyx_GOTREF(__pyx_t_3); if (__Pyx_IternextUnpackEndCheck(__pyx_t_5(__pyx_t_4), 2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1046; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 1046; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_L4_unpacking_done:; } __pyx_t_6 = __Pyx_PyIndex_AsSsize_t(__pyx_t_2); if (unlikely((__pyx_t_6 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1046; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_7 = __Pyx_PyIndex_AsSsize_t(__pyx_t_3); if (unlikely((__pyx_t_7 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1046; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_n = __pyx_t_6; __pyx_v_k = __pyx_t_7; /* "pandas/lib.pyx":1047 * * n, k = ( mask).shape * counts = np.zeros((max_bin, k), dtype='i8') # <<<<<<<<<<<<<< * * for i from 0 <= i < n: */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1047; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_zeros); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1047; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_max_bin); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1047; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_k); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1047; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1047; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_1 = 0; __pyx_t_2 = 0; __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1047; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyDict_New(); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1047; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_dtype, __pyx_n_s_i8) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1047; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_1 = PyObject_Call(__pyx_t_3, __pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1047; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1047; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_8 = ((PyArrayObject *)__pyx_t_1); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_counts.rcbuffer->pybuffer); __pyx_t_9 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_counts.rcbuffer->pybuffer, (PyObject*)__pyx_t_8, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack); if (unlikely(__pyx_t_9 < 0)) { PyErr_Fetch(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_counts.rcbuffer->pybuffer, (PyObject*)__pyx_v_counts, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_11); Py_XDECREF(__pyx_t_12); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_10, __pyx_t_11, __pyx_t_12); } } __pyx_pybuffernd_counts.diminfo[0].strides = __pyx_pybuffernd_counts.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_counts.diminfo[0].shape = __pyx_pybuffernd_counts.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_counts.diminfo[1].strides = __pyx_pybuffernd_counts.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_counts.diminfo[1].shape = __pyx_pybuffernd_counts.rcbuffer->pybuffer.shape[1]; if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1047; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_8 = 0; __pyx_v_counts = ((PyArrayObject *)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/lib.pyx":1049 * counts = np.zeros((max_bin, k), dtype='i8') * * for i from 0 <= i < n: # <<<<<<<<<<<<<< * for j from 0 <= j < k: * if mask[i, j]: */ __pyx_t_7 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_7; __pyx_v_i++) { /* "pandas/lib.pyx":1050 * * for i from 0 <= i < n: * for j from 0 <= j < k: # <<<<<<<<<<<<<< * if mask[i, j]: * counts[labels[i], j] += 1 */ __pyx_t_6 = __pyx_v_k; for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_6; __pyx_v_j++) { /* "pandas/lib.pyx":1051 * for i from 0 <= i < n: * for j from 0 <= j < k: * if mask[i, j]: # <<<<<<<<<<<<<< * counts[labels[i], j] += 1 * */ __pyx_t_13 = __pyx_v_i; __pyx_t_14 = __pyx_v_j; __pyx_t_9 = -1; if (__pyx_t_13 < 0) { __pyx_t_13 += __pyx_pybuffernd_mask.diminfo[0].shape; if (unlikely(__pyx_t_13 < 0)) __pyx_t_9 = 0; } else if (unlikely(__pyx_t_13 >= __pyx_pybuffernd_mask.diminfo[0].shape)) __pyx_t_9 = 0; if (__pyx_t_14 < 0) { __pyx_t_14 += __pyx_pybuffernd_mask.diminfo[1].shape; if (unlikely(__pyx_t_14 < 0)) __pyx_t_9 = 1; } else if (unlikely(__pyx_t_14 >= __pyx_pybuffernd_mask.diminfo[1].shape)) __pyx_t_9 = 1; if (unlikely(__pyx_t_9 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_9); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1051; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_15 = ((*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_mask.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_mask.diminfo[0].strides, __pyx_t_14, __pyx_pybuffernd_mask.diminfo[1].strides)) != 0); if (__pyx_t_15) { /* "pandas/lib.pyx":1052 * for j from 0 <= j < k: * if mask[i, j]: * counts[labels[i], j] += 1 # <<<<<<<<<<<<<< * * return counts */ __pyx_t_16 = __pyx_v_i; __pyx_t_9 = -1; if (__pyx_t_16 < 0) { __pyx_t_16 += __pyx_pybuffernd_labels.diminfo[0].shape; if (unlikely(__pyx_t_16 < 0)) __pyx_t_9 = 0; } else if (unlikely(__pyx_t_16 >= __pyx_pybuffernd_labels.diminfo[0].shape)) __pyx_t_9 = 0; if (unlikely(__pyx_t_9 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_9); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1052; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_17 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_labels.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_labels.diminfo[0].strides)); __pyx_t_18 = __pyx_v_j; __pyx_t_9 = -1; if (__pyx_t_17 < 0) { __pyx_t_17 += __pyx_pybuffernd_counts.diminfo[0].shape; if (unlikely(__pyx_t_17 < 0)) __pyx_t_9 = 0; } else if (unlikely(__pyx_t_17 >= __pyx_pybuffernd_counts.diminfo[0].shape)) __pyx_t_9 = 0; if (__pyx_t_18 < 0) { __pyx_t_18 += __pyx_pybuffernd_counts.diminfo[1].shape; if (unlikely(__pyx_t_18 < 0)) __pyx_t_9 = 1; } else if (unlikely(__pyx_t_18 >= __pyx_pybuffernd_counts.diminfo[1].shape)) __pyx_t_9 = 1; if (unlikely(__pyx_t_9 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_9); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1052; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_counts.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_counts.diminfo[0].strides, __pyx_t_18, __pyx_pybuffernd_counts.diminfo[1].strides) += 1; goto __pyx_L9; } __pyx_L9:; } } /* "pandas/lib.pyx":1054 * counts[labels[i], j] += 1 * * return counts # <<<<<<<<<<<<<< * * cdef class _PandasNull: */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_counts)); __pyx_r = ((PyObject *)__pyx_v_counts); goto __pyx_L0; /* "pandas/lib.pyx":1040 * * * def count_level_2d(ndarray[uint8_t, ndim=2, cast=True] mask, # <<<<<<<<<<<<<< * ndarray[int64_t] labels, Py_ssize_t max_bin): * 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); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_counts.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_labels.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_mask.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.lib.count_level_2d", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_counts.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_labels.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_mask.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_counts); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/lib.pyx":1058 * cdef class _PandasNull: * * def __richcmp__(_PandasNull self, object other, int op): # <<<<<<<<<<<<<< * if op == 2: # == * return isinstance(other, _PandasNull) */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_3lib_11_PandasNull_1__richcmp__(PyObject *__pyx_v_self, PyObject *__pyx_v_other, int __pyx_v_op); /*proto*/ static PyObject *__pyx_pw_6pandas_3lib_11_PandasNull_1__richcmp__(PyObject *__pyx_v_self, PyObject *__pyx_v_other, int __pyx_v_op) { CYTHON_UNUSED int __pyx_lineno = 0; CYTHON_UNUSED const char *__pyx_filename = NULL; CYTHON_UNUSED int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__richcmp__ (wrapper)", 0); if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_self), __pyx_ptype_6pandas_3lib__PandasNull, 1, "self", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1058; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_3lib_11_PandasNull___richcmp__(((struct __pyx_obj_6pandas_3lib__PandasNull *)__pyx_v_self), ((PyObject *)__pyx_v_other), ((int)__pyx_v_op)); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_3lib_11_PandasNull___richcmp__(CYTHON_UNUSED struct __pyx_obj_6pandas_3lib__PandasNull *__pyx_v_self, PyObject *__pyx_v_other, int __pyx_v_op) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__richcmp__", 0); /* "pandas/lib.pyx":1061 * if op == 2: # == * return isinstance(other, _PandasNull) * elif op == 3: # != # <<<<<<<<<<<<<< * return not isinstance(other, _PandasNull) * else: */ switch (__pyx_v_op) { /* "pandas/lib.pyx":1059 * * def __richcmp__(_PandasNull self, object other, int op): * if op == 2: # == # <<<<<<<<<<<<<< * return isinstance(other, _PandasNull) * elif op == 3: # != */ case 2: /* "pandas/lib.pyx":1060 * def __richcmp__(_PandasNull self, object other, int op): * if op == 2: # == * return isinstance(other, _PandasNull) # <<<<<<<<<<<<<< * elif op == 3: # != * return not isinstance(other, _PandasNull) */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_other, ((PyObject*)__pyx_ptype_6pandas_3lib__PandasNull)); __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1060; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; break; /* "pandas/lib.pyx":1061 * if op == 2: # == * return isinstance(other, _PandasNull) * elif op == 3: # != # <<<<<<<<<<<<<< * return not isinstance(other, _PandasNull) * else: */ case 3: /* "pandas/lib.pyx":1062 * return isinstance(other, _PandasNull) * elif op == 3: # != * return not isinstance(other, _PandasNull) # <<<<<<<<<<<<<< * else: * return False */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_other, ((PyObject*)__pyx_ptype_6pandas_3lib__PandasNull)); __pyx_t_2 = __Pyx_PyBool_FromLong((!(__pyx_t_1 != 0))); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1062; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; break; default: /* "pandas/lib.pyx":1064 * return not isinstance(other, _PandasNull) * else: * return False # <<<<<<<<<<<<<< * * def __hash__(self): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(Py_False); __pyx_r = Py_False; goto __pyx_L0; break; } /* "pandas/lib.pyx":1058 * cdef class _PandasNull: * * def __richcmp__(_PandasNull self, object other, int op): # <<<<<<<<<<<<<< * if op == 2: # == * return isinstance(other, _PandasNull) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("pandas.lib._PandasNull.__richcmp__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/lib.pyx":1066 * return False * * def __hash__(self): # <<<<<<<<<<<<<< * return 0 * */ /* Python wrapper */ static Py_hash_t __pyx_pw_6pandas_3lib_11_PandasNull_3__hash__(PyObject *__pyx_v_self); /*proto*/ static Py_hash_t __pyx_pw_6pandas_3lib_11_PandasNull_3__hash__(PyObject *__pyx_v_self) { Py_hash_t __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__hash__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_3lib_11_PandasNull_2__hash__(((struct __pyx_obj_6pandas_3lib__PandasNull *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static Py_hash_t __pyx_pf_6pandas_3lib_11_PandasNull_2__hash__(CYTHON_UNUSED struct __pyx_obj_6pandas_3lib__PandasNull *__pyx_v_self) { Py_hash_t __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__hash__", 0); /* "pandas/lib.pyx":1067 * * def __hash__(self): * return 0 # <<<<<<<<<<<<<< * * pandas_null = _PandasNull() */ __pyx_r = 0; goto __pyx_L0; /* "pandas/lib.pyx":1066 * return False * * def __hash__(self): # <<<<<<<<<<<<<< * return 0 * */ /* function exit code */ __pyx_L0:; if (unlikely(__pyx_r == -1) && !PyErr_Occurred()) __pyx_r = -2; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/lib.pyx":1071 * pandas_null = _PandasNull() * * def fast_zip_fillna(list ndarrays, fill_value=pandas_null): # <<<<<<<<<<<<<< * ''' * For zipping multiple ndarrays into an ndarray of tuples */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_3lib_93fast_zip_fillna(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6pandas_3lib_92fast_zip_fillna[] = "\n For zipping multiple ndarrays into an ndarray of tuples\n "; static PyMethodDef __pyx_mdef_6pandas_3lib_93fast_zip_fillna = {__Pyx_NAMESTR("fast_zip_fillna"), (PyCFunction)__pyx_pw_6pandas_3lib_93fast_zip_fillna, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_3lib_92fast_zip_fillna)}; static PyObject *__pyx_pw_6pandas_3lib_93fast_zip_fillna(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_ndarrays = 0; PyObject *__pyx_v_fill_value = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("fast_zip_fillna (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ndarrays,&__pyx_n_s_fill_value,0}; PyObject* values[2] = {0,0}; values[1] = __pyx_k__10; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ndarrays)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_fill_value); if (value) { values[1] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "fast_zip_fillna") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1071; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_ndarrays = ((PyObject*)values[0]); __pyx_v_fill_value = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("fast_zip_fillna", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1071; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.lib.fast_zip_fillna", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ndarrays), (&PyList_Type), 1, "ndarrays", 1))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1071; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_3lib_92fast_zip_fillna(__pyx_self, __pyx_v_ndarrays, __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_3lib_92fast_zip_fillna(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_ndarrays, PyObject *__pyx_v_fill_value) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_k; Py_ssize_t __pyx_v_n; PyArrayObject *__pyx_v_result = 0; PyArrayIterObject *__pyx_v_it = 0; PyObject *__pyx_v_val = 0; PyObject *__pyx_v_tup = 0; PyObject *__pyx_v_arr = NULL; __Pyx_LocalBuf_ND __pyx_pybuffernd_result; __Pyx_Buffer __pyx_pybuffer_result; 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; PyArrayObject *__pyx_t_6 = NULL; 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; int __pyx_t_12; Py_ssize_t __pyx_t_13; PyObject **__pyx_t_14; Py_ssize_t __pyx_t_15; Py_ssize_t __pyx_t_16; Py_ssize_t __pyx_t_17; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("fast_zip_fillna", 0); __pyx_pybuffer_result.pybuffer.buf = NULL; __pyx_pybuffer_result.refcount = 0; __pyx_pybuffernd_result.data = NULL; __pyx_pybuffernd_result.rcbuffer = &__pyx_pybuffer_result; /* "pandas/lib.pyx":1081 * object val, tup * * k = len(ndarrays) # <<<<<<<<<<<<<< * n = len(ndarrays[0]) * */ if (unlikely(__pyx_v_ndarrays == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1081; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_1 = PyList_GET_SIZE(__pyx_v_ndarrays); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1081; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_k = __pyx_t_1; /* "pandas/lib.pyx":1082 * * k = len(ndarrays) * n = len(ndarrays[0]) # <<<<<<<<<<<<<< * * result = np.empty(n, dtype=object) */ if (unlikely(__pyx_v_ndarrays == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1082; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_2 = __Pyx_GetItemInt_List(__pyx_v_ndarrays, 0, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1082; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = PyObject_Length(__pyx_t_2); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1082; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_n = __pyx_t_1; /* "pandas/lib.pyx":1084 * n = len(ndarrays[0]) * * result = np.empty(n, dtype=object) # <<<<<<<<<<<<<< * * # initialize tuples on first pass */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1084; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 1084; __pyx_clineno = __LINE__; goto __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_n); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1084; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1084; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1084; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_dtype, __pyx_builtin_object) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1084; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_5 = PyObject_Call(__pyx_t_3, __pyx_t_4, __pyx_t_2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1084; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1084; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_6 = ((PyArrayObject *)__pyx_t_5); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_object, 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_result.rcbuffer->pybuffer, (PyObject*)__pyx_v_result, &__Pyx_TypeInfo_object, 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_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_7 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1084; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_6 = 0; __pyx_v_result = ((PyArrayObject *)__pyx_t_5); __pyx_t_5 = 0; /* "pandas/lib.pyx":1087 * * # initialize tuples on first pass * arr = ndarrays[0] # <<<<<<<<<<<<<< * it = PyArray_IterNew(arr) * for i in range(n): */ if (unlikely(__pyx_v_ndarrays == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1087; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_5 = __Pyx_GetItemInt_List(__pyx_v_ndarrays, 0, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(__pyx_t_5 == NULL)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1087; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_5); __pyx_v_arr = __pyx_t_5; __pyx_t_5 = 0; /* "pandas/lib.pyx":1088 * # initialize tuples on first pass * arr = ndarrays[0] * it = PyArray_IterNew(arr) # <<<<<<<<<<<<<< * for i in range(n): * val = PyArray_GETITEM(arr, PyArray_ITER_DATA(it)) */ __pyx_t_5 = PyArray_IterNew(__pyx_v_arr); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1088; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_2 = __pyx_t_5; __Pyx_INCREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_v_it = ((PyArrayIterObject *)__pyx_t_2); __pyx_t_2 = 0; /* "pandas/lib.pyx":1089 * arr = ndarrays[0] * it = PyArray_IterNew(arr) * for i in range(n): # <<<<<<<<<<<<<< * val = PyArray_GETITEM(arr, PyArray_ITER_DATA(it)) * tup = PyTuple_New(k) */ __pyx_t_1 = __pyx_v_n; for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_1; __pyx_t_11+=1) { __pyx_v_i = __pyx_t_11; /* "pandas/lib.pyx":1090 * it = PyArray_IterNew(arr) * for i in range(n): * val = PyArray_GETITEM(arr, PyArray_ITER_DATA(it)) # <<<<<<<<<<<<<< * tup = PyTuple_New(k) * */ if (!(likely(((__pyx_v_arr) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_arr, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1090; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_2 = PyArray_GETITEM(((PyArrayObject *)__pyx_v_arr), PyArray_ITER_DATA(__pyx_v_it)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1090; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_XDECREF_SET(__pyx_v_val, __pyx_t_2); __pyx_t_2 = 0; /* "pandas/lib.pyx":1091 * for i in range(n): * val = PyArray_GETITEM(arr, PyArray_ITER_DATA(it)) * tup = PyTuple_New(k) # <<<<<<<<<<<<<< * * if val != val: */ __pyx_t_2 = PyTuple_New(__pyx_v_k); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1091; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_XDECREF_SET(__pyx_v_tup, __pyx_t_2); __pyx_t_2 = 0; /* "pandas/lib.pyx":1093 * tup = PyTuple_New(k) * * if val != val: # <<<<<<<<<<<<<< * val = fill_value * */ __pyx_t_2 = PyObject_RichCompare(__pyx_v_val, __pyx_v_val, Py_NE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1093; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_12 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1093; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_12) { /* "pandas/lib.pyx":1094 * * if val != val: * val = fill_value # <<<<<<<<<<<<<< * * PyTuple_SET_ITEM(tup, 0, val) */ __Pyx_INCREF(__pyx_v_fill_value); __Pyx_DECREF_SET(__pyx_v_val, __pyx_v_fill_value); goto __pyx_L5; } __pyx_L5:; /* "pandas/lib.pyx":1096 * val = fill_value * * PyTuple_SET_ITEM(tup, 0, val) # <<<<<<<<<<<<<< * Py_INCREF(val) * result[i] = tup */ PyTuple_SET_ITEM(__pyx_v_tup, 0, __pyx_v_val); /* "pandas/lib.pyx":1097 * * PyTuple_SET_ITEM(tup, 0, val) * Py_INCREF(val) # <<<<<<<<<<<<<< * result[i] = tup * PyArray_ITER_NEXT(it) */ Py_INCREF(__pyx_v_val); /* "pandas/lib.pyx":1098 * PyTuple_SET_ITEM(tup, 0, val) * Py_INCREF(val) * result[i] = tup # <<<<<<<<<<<<<< * PyArray_ITER_NEXT(it) * */ __pyx_t_13 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_13 < 0) { __pyx_t_13 += __pyx_pybuffernd_result.diminfo[0].shape; if (unlikely(__pyx_t_13 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_13 >= __pyx_pybuffernd_result.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1098; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_14 = __Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_result.diminfo[0].strides); __Pyx_GOTREF(*__pyx_t_14); __Pyx_INCREF(__pyx_v_tup); __Pyx_DECREF(*__pyx_t_14); *__pyx_t_14 = __pyx_v_tup; __Pyx_GIVEREF(*__pyx_t_14); /* "pandas/lib.pyx":1099 * Py_INCREF(val) * result[i] = tup * PyArray_ITER_NEXT(it) # <<<<<<<<<<<<<< * * for j in range(1, k): */ PyArray_ITER_NEXT(__pyx_v_it); } /* "pandas/lib.pyx":1101 * PyArray_ITER_NEXT(it) * * for j in range(1, k): # <<<<<<<<<<<<<< * arr = ndarrays[j] * it = PyArray_IterNew(arr) */ __pyx_t_1 = __pyx_v_k; for (__pyx_t_11 = 1; __pyx_t_11 < __pyx_t_1; __pyx_t_11+=1) { __pyx_v_j = __pyx_t_11; /* "pandas/lib.pyx":1102 * * for j in range(1, k): * arr = ndarrays[j] # <<<<<<<<<<<<<< * it = PyArray_IterNew(arr) * if len(arr) != n: */ if (unlikely(__pyx_v_ndarrays == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1102; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_2 = __Pyx_GetItemInt_List(__pyx_v_ndarrays, __pyx_v_j, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1102; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF_SET(__pyx_v_arr, __pyx_t_2); __pyx_t_2 = 0; /* "pandas/lib.pyx":1103 * for j in range(1, k): * arr = ndarrays[j] * it = PyArray_IterNew(arr) # <<<<<<<<<<<<<< * if len(arr) != n: * raise ValueError('all arrays must be same length') */ __pyx_t_2 = PyArray_IterNew(__pyx_v_arr); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1103; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = __pyx_t_2; __Pyx_INCREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF_SET(__pyx_v_it, ((PyArrayIterObject *)__pyx_t_5)); __pyx_t_5 = 0; /* "pandas/lib.pyx":1104 * arr = ndarrays[j] * it = PyArray_IterNew(arr) * if len(arr) != n: # <<<<<<<<<<<<<< * raise ValueError('all arrays must be same length') * */ __pyx_t_15 = PyObject_Length(__pyx_v_arr); if (unlikely(__pyx_t_15 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1104; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_12 = ((__pyx_t_15 != __pyx_v_n) != 0); if (__pyx_t_12) { /* "pandas/lib.pyx":1105 * it = PyArray_IterNew(arr) * if len(arr) != n: * raise ValueError('all arrays must be same length') # <<<<<<<<<<<<<< * * for i in range(n): */ __pyx_t_5 = PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__11, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1105; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_Raise(__pyx_t_5, 0, 0, 0); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1105; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } /* "pandas/lib.pyx":1107 * raise ValueError('all arrays must be same length') * * for i in range(n): # <<<<<<<<<<<<<< * val = PyArray_GETITEM(arr, PyArray_ITER_DATA(it)) * if val != val: */ __pyx_t_15 = __pyx_v_n; for (__pyx_t_16 = 0; __pyx_t_16 < __pyx_t_15; __pyx_t_16+=1) { __pyx_v_i = __pyx_t_16; /* "pandas/lib.pyx":1108 * * for i in range(n): * val = PyArray_GETITEM(arr, PyArray_ITER_DATA(it)) # <<<<<<<<<<<<<< * if val != val: * val = fill_value */ if (!(likely(((__pyx_v_arr) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_arr, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1108; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_5 = PyArray_GETITEM(((PyArrayObject *)__pyx_v_arr), PyArray_ITER_DATA(__pyx_v_it)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1108; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_XDECREF_SET(__pyx_v_val, __pyx_t_5); __pyx_t_5 = 0; /* "pandas/lib.pyx":1109 * for i in range(n): * val = PyArray_GETITEM(arr, PyArray_ITER_DATA(it)) * if val != val: # <<<<<<<<<<<<<< * val = fill_value * */ __pyx_t_5 = PyObject_RichCompare(__pyx_v_val, __pyx_v_val, Py_NE); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1109; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_12 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1109; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_12) { /* "pandas/lib.pyx":1110 * val = PyArray_GETITEM(arr, PyArray_ITER_DATA(it)) * if val != val: * val = fill_value # <<<<<<<<<<<<<< * * PyTuple_SET_ITEM(result[i], j, val) */ __Pyx_INCREF(__pyx_v_fill_value); __Pyx_DECREF_SET(__pyx_v_val, __pyx_v_fill_value); goto __pyx_L11; } __pyx_L11:; /* "pandas/lib.pyx":1112 * val = fill_value * * PyTuple_SET_ITEM(result[i], j, val) # <<<<<<<<<<<<<< * Py_INCREF(val) * PyArray_ITER_NEXT(it) */ __pyx_t_17 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_17 < 0) { __pyx_t_17 += __pyx_pybuffernd_result.diminfo[0].shape; if (unlikely(__pyx_t_17 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_17 >= __pyx_pybuffernd_result.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1112; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_5 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_result.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_5, __pyx_v_j, __pyx_v_val); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "pandas/lib.pyx":1113 * * PyTuple_SET_ITEM(result[i], j, val) * Py_INCREF(val) # <<<<<<<<<<<<<< * PyArray_ITER_NEXT(it) * */ Py_INCREF(__pyx_v_val); /* "pandas/lib.pyx":1114 * PyTuple_SET_ITEM(result[i], j, val) * Py_INCREF(val) * PyArray_ITER_NEXT(it) # <<<<<<<<<<<<<< * * return result */ PyArray_ITER_NEXT(__pyx_v_it); } } /* "pandas/lib.pyx":1116 * PyArray_ITER_NEXT(it) * * return result # <<<<<<<<<<<<<< * * def duplicated(ndarray[object] values, take_last=False): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_result)); __pyx_r = ((PyObject *)__pyx_v_result); goto __pyx_L0; /* "pandas/lib.pyx":1071 * pandas_null = _PandasNull() * * def fast_zip_fillna(list ndarrays, fill_value=pandas_null): # <<<<<<<<<<<<<< * ''' * For zipping multiple ndarrays into an ndarray of tuples */ /* 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); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.lib.fast_zip_fillna", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_result); __Pyx_XDECREF((PyObject *)__pyx_v_it); __Pyx_XDECREF(__pyx_v_val); __Pyx_XDECREF(__pyx_v_tup); __Pyx_XDECREF(__pyx_v_arr); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/lib.pyx":1118 * return result * * def duplicated(ndarray[object] values, take_last=False): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_3lib_95duplicated(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_3lib_95duplicated = {__Pyx_NAMESTR("duplicated"), (PyCFunction)__pyx_pw_6pandas_3lib_95duplicated, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_3lib_95duplicated(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_values = 0; PyObject *__pyx_v_take_last = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("duplicated (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_values,&__pyx_n_s_take_last,0}; PyObject* values[2] = {0,0}; values[1] = ((PyObject *)Py_False); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_values)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_take_last); if (value) { values[1] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "duplicated") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1118; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_values = ((PyArrayObject *)values[0]); __pyx_v_take_last = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("duplicated", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1118; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.lib.duplicated", __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_filename = __pyx_f[2]; __pyx_lineno = 1118; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_3lib_94duplicated(__pyx_self, __pyx_v_values, __pyx_v_take_last); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_3lib_94duplicated(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyObject *__pyx_v_take_last) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_n; PyObject *__pyx_v_seen = 0; PyObject *__pyx_v_row = 0; PyArrayObject *__pyx_v_result = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_result; __Pyx_Buffer __pyx_pybuffer_result; __Pyx_LocalBuf_ND __pyx_pybuffernd_values; __Pyx_Buffer __pyx_pybuffer_values; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; Py_ssize_t __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyArrayObject *__pyx_t_7 = NULL; int __pyx_t_8; int __pyx_t_9; int __pyx_t_10; Py_ssize_t __pyx_t_11; Py_ssize_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_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("duplicated", 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_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_filename = __pyx_f[2]; __pyx_lineno = 1118; __pyx_clineno = __LINE__; goto __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/lib.pyx":1121 * cdef: * Py_ssize_t i, n * dict seen = {} # <<<<<<<<<<<<<< * object row * */ __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1121; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_v_seen = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/lib.pyx":1124 * object row * * n = len(values) # <<<<<<<<<<<<<< * cdef ndarray[uint8_t] result = np.zeros(n, dtype=np.uint8) * */ __pyx_t_2 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1124; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_2; /* "pandas/lib.pyx":1125 * * n = len(values) * cdef ndarray[uint8_t] result = np.zeros(n, dtype=np.uint8) # <<<<<<<<<<<<<< * * if take_last: */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1125; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_zeros); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1125; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_n); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1125; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1125; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1125; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1125; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_uint8); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1125; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_dtype, __pyx_t_6) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1125; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyObject_Call(__pyx_t_3, __pyx_t_4, __pyx_t_1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1125; __pyx_clineno = __LINE__; goto __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_1); __pyx_t_1 = 0; if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1125; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_7 = ((PyArrayObject *)__pyx_t_6); { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { __pyx_v_result = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_result.rcbuffer->pybuffer.buf = NULL; {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1125; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } else {__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]; } } __pyx_t_7 = 0; __pyx_v_result = ((PyArrayObject *)__pyx_t_6); __pyx_t_6 = 0; /* "pandas/lib.pyx":1127 * cdef ndarray[uint8_t] result = np.zeros(n, dtype=np.uint8) * * if take_last: # <<<<<<<<<<<<<< * for i from n > i >= 0: * row = values[i] */ __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_v_take_last); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1127; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__pyx_t_8) { /* "pandas/lib.pyx":1128 * * if take_last: * for i from n > i >= 0: # <<<<<<<<<<<<<< * row = values[i] * */ for (__pyx_v_i = __pyx_v_n-1; __pyx_v_i >= 0; __pyx_v_i--) { /* "pandas/lib.pyx":1129 * if take_last: * for i from n > i >= 0: * row = values[i] # <<<<<<<<<<<<<< * * if row in seen: */ __pyx_t_2 = __pyx_v_i; __pyx_t_9 = -1; if (__pyx_t_2 < 0) { __pyx_t_2 += __pyx_pybuffernd_values.diminfo[0].shape; if (unlikely(__pyx_t_2 < 0)) __pyx_t_9 = 0; } else if (unlikely(__pyx_t_2 >= __pyx_pybuffernd_values.diminfo[0].shape)) __pyx_t_9 = 0; if (unlikely(__pyx_t_9 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_9); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1129; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_6 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_2, __pyx_pybuffernd_values.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_6); __Pyx_XDECREF_SET(__pyx_v_row, __pyx_t_6); __pyx_t_6 = 0; /* "pandas/lib.pyx":1131 * row = values[i] * * if row in seen: # <<<<<<<<<<<<<< * result[i] = 1 * else: */ __pyx_t_8 = (__Pyx_PyDict_Contains(__pyx_v_row, __pyx_v_seen, Py_EQ)); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1131; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_10 = (__pyx_t_8 != 0); if (__pyx_t_10) { /* "pandas/lib.pyx":1132 * * if row in seen: * result[i] = 1 # <<<<<<<<<<<<<< * else: * seen[row] = None */ __pyx_t_11 = __pyx_v_i; __pyx_t_9 = -1; if (__pyx_t_11 < 0) { __pyx_t_11 += __pyx_pybuffernd_result.diminfo[0].shape; if (unlikely(__pyx_t_11 < 0)) __pyx_t_9 = 0; } else if (unlikely(__pyx_t_11 >= __pyx_pybuffernd_result.diminfo[0].shape)) __pyx_t_9 = 0; if (unlikely(__pyx_t_9 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_9); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1132; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_11, __pyx_pybuffernd_result.diminfo[0].strides) = 1; goto __pyx_L6; } /*else*/ { /* "pandas/lib.pyx":1134 * result[i] = 1 * else: * seen[row] = None # <<<<<<<<<<<<<< * result[i] = 0 * else: */ if (unlikely(PyDict_SetItem(__pyx_v_seen, __pyx_v_row, Py_None) < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1134; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/lib.pyx":1135 * else: * seen[row] = None * result[i] = 0 # <<<<<<<<<<<<<< * else: * for i from 0 <= i < n: */ __pyx_t_12 = __pyx_v_i; __pyx_t_9 = -1; if (__pyx_t_12 < 0) { __pyx_t_12 += __pyx_pybuffernd_result.diminfo[0].shape; if (unlikely(__pyx_t_12 < 0)) __pyx_t_9 = 0; } else if (unlikely(__pyx_t_12 >= __pyx_pybuffernd_result.diminfo[0].shape)) __pyx_t_9 = 0; if (unlikely(__pyx_t_9 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_9); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1135; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_12, __pyx_pybuffernd_result.diminfo[0].strides) = 0; } __pyx_L6:; } goto __pyx_L3; } /*else*/ { /* "pandas/lib.pyx":1137 * result[i] = 0 * else: * for i from 0 <= i < n: # <<<<<<<<<<<<<< * row = values[i] * if row in seen: */ __pyx_t_13 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_13; __pyx_v_i++) { /* "pandas/lib.pyx":1138 * else: * for i from 0 <= i < n: * row = values[i] # <<<<<<<<<<<<<< * if row in seen: * result[i] = 1 */ __pyx_t_14 = __pyx_v_i; __pyx_t_9 = -1; if (__pyx_t_14 < 0) { __pyx_t_14 += __pyx_pybuffernd_values.diminfo[0].shape; if (unlikely(__pyx_t_14 < 0)) __pyx_t_9 = 0; } else if (unlikely(__pyx_t_14 >= __pyx_pybuffernd_values.diminfo[0].shape)) __pyx_t_9 = 0; if (unlikely(__pyx_t_9 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_9); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1138; __pyx_clineno = __LINE__; goto __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_row, __pyx_t_6); __pyx_t_6 = 0; /* "pandas/lib.pyx":1139 * for i from 0 <= i < n: * row = values[i] * if row in seen: # <<<<<<<<<<<<<< * result[i] = 1 * else: */ __pyx_t_10 = (__Pyx_PyDict_Contains(__pyx_v_row, __pyx_v_seen, Py_EQ)); if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1139; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_8 = (__pyx_t_10 != 0); if (__pyx_t_8) { /* "pandas/lib.pyx":1140 * row = values[i] * if row in seen: * result[i] = 1 # <<<<<<<<<<<<<< * else: * seen[row] = None */ __pyx_t_15 = __pyx_v_i; __pyx_t_9 = -1; if (__pyx_t_15 < 0) { __pyx_t_15 += __pyx_pybuffernd_result.diminfo[0].shape; if (unlikely(__pyx_t_15 < 0)) __pyx_t_9 = 0; } else if (unlikely(__pyx_t_15 >= __pyx_pybuffernd_result.diminfo[0].shape)) __pyx_t_9 = 0; if (unlikely(__pyx_t_9 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_9); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1140; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_result.diminfo[0].strides) = 1; goto __pyx_L9; } /*else*/ { /* "pandas/lib.pyx":1142 * result[i] = 1 * else: * seen[row] = None # <<<<<<<<<<<<<< * result[i] = 0 * */ if (unlikely(PyDict_SetItem(__pyx_v_seen, __pyx_v_row, Py_None) < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1142; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/lib.pyx":1143 * else: * seen[row] = None * result[i] = 0 # <<<<<<<<<<<<<< * * return result.view(np.bool_) */ __pyx_t_16 = __pyx_v_i; __pyx_t_9 = -1; if (__pyx_t_16 < 0) { __pyx_t_16 += __pyx_pybuffernd_result.diminfo[0].shape; if (unlikely(__pyx_t_16 < 0)) __pyx_t_9 = 0; } else if (unlikely(__pyx_t_16 >= __pyx_pybuffernd_result.diminfo[0].shape)) __pyx_t_9 = 0; if (unlikely(__pyx_t_9 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_9); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1143; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_result.diminfo[0].strides) = 0; } __pyx_L9:; } } __pyx_L3:; /* "pandas/lib.pyx":1145 * result[i] = 0 * * return result.view(np.bool_) # <<<<<<<<<<<<<< * * def generate_slices(ndarray[int64_t] labels, Py_ssize_t ngroups): */ __Pyx_XDECREF(__pyx_r); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_result), __pyx_n_s_view); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1145; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1145; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_bool); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1145; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1145; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyObject_Call(__pyx_t_6, __pyx_t_1, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1145; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; /* "pandas/lib.pyx":1118 * return result * * def duplicated(ndarray[object] values, take_last=False): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.lib.duplicated", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF(__pyx_v_seen); __Pyx_XDECREF(__pyx_v_row); __Pyx_XDECREF((PyObject *)__pyx_v_result); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/lib.pyx":1147 * return result.view(np.bool_) * * def generate_slices(ndarray[int64_t] labels, Py_ssize_t ngroups): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, group_size, n, lab, start */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_3lib_97generate_slices(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_3lib_97generate_slices = {__Pyx_NAMESTR("generate_slices"), (PyCFunction)__pyx_pw_6pandas_3lib_97generate_slices, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_3lib_97generate_slices(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_labels = 0; Py_ssize_t __pyx_v_ngroups; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("generate_slices (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_labels,&__pyx_n_s_ngroups,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_labels)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ngroups)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("generate_slices", 1, 2, 2, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1147; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "generate_slices") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1147; __pyx_clineno = __LINE__; goto __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_labels = ((PyArrayObject *)values[0]); __pyx_v_ngroups = __Pyx_PyIndex_AsSsize_t(values[1]); if (unlikely((__pyx_v_ngroups == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1147; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("generate_slices", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1147; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.lib.generate_slices", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_labels), __pyx_ptype_5numpy_ndarray, 1, "labels", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1147; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_3lib_96generate_slices(__pyx_self, __pyx_v_labels, __pyx_v_ngroups); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_3lib_96generate_slices(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_labels, Py_ssize_t __pyx_v_ngroups) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_group_size; Py_ssize_t __pyx_v_n; Py_ssize_t __pyx_v_lab; Py_ssize_t __pyx_v_start; PyArrayObject *__pyx_v_starts = 0; PyObject *__pyx_v_ends = NULL; __Pyx_LocalBuf_ND __pyx_pybuffernd_labels; __Pyx_Buffer __pyx_pybuffer_labels; __Pyx_LocalBuf_ND __pyx_pybuffernd_starts; __Pyx_Buffer __pyx_pybuffer_starts; 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; int __pyx_t_14; Py_ssize_t __pyx_t_15; int __pyx_t_16; int __pyx_t_17; Py_ssize_t __pyx_t_18; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("generate_slices", 0); __pyx_pybuffer_starts.pybuffer.buf = NULL; __pyx_pybuffer_starts.refcount = 0; __pyx_pybuffernd_starts.data = NULL; __pyx_pybuffernd_starts.rcbuffer = &__pyx_pybuffer_starts; __pyx_pybuffer_labels.pybuffer.buf = NULL; __pyx_pybuffer_labels.refcount = 0; __pyx_pybuffernd_labels.data = NULL; __pyx_pybuffernd_labels.rcbuffer = &__pyx_pybuffer_labels; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_labels.rcbuffer->pybuffer, (PyObject*)__pyx_v_labels, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1147; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_labels.diminfo[0].strides = __pyx_pybuffernd_labels.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_labels.diminfo[0].shape = __pyx_pybuffernd_labels.rcbuffer->pybuffer.shape[0]; /* "pandas/lib.pyx":1153 * ndarray[int64_t] starts * * n = len(labels) # <<<<<<<<<<<<<< * * starts = np.zeros(ngroups, dtype=np.int64) */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_labels)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1153; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/lib.pyx":1155 * n = len(labels) * * starts = np.zeros(ngroups, dtype=np.int64) # <<<<<<<<<<<<<< * ends = np.zeros(ngroups, dtype=np.int64) * */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1155; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_zeros); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1155; __pyx_clineno = __LINE__; goto __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_ngroups); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1155; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1155; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1155; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1155; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_int64); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1155; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 1155; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyObject_Call(__pyx_t_3, __pyx_t_4, __pyx_t_2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1155; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 1155; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_7 = ((PyArrayObject *)__pyx_t_6); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_starts.rcbuffer->pybuffer); __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_starts.rcbuffer->pybuffer, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_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_starts.rcbuffer->pybuffer, (PyObject*)__pyx_v_starts, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_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_pybuffernd_starts.diminfo[0].strides = __pyx_pybuffernd_starts.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_starts.diminfo[0].shape = __pyx_pybuffernd_starts.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1155; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_7 = 0; __pyx_v_starts = ((PyArrayObject *)__pyx_t_6); __pyx_t_6 = 0; /* "pandas/lib.pyx":1156 * * starts = np.zeros(ngroups, dtype=np.int64) * ends = np.zeros(ngroups, dtype=np.int64) # <<<<<<<<<<<<<< * * start = 0 */ __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1156; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_zeros); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1156; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyInt_FromSsize_t(__pyx_v_ngroups); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1156; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1156; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyDict_New(); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1156; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1156; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_int64); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1156; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_dtype, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1156; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyObject_Call(__pyx_t_2, __pyx_t_4, __pyx_t_6); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1156; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_v_ends = __pyx_t_5; __pyx_t_5 = 0; /* "pandas/lib.pyx":1158 * ends = np.zeros(ngroups, dtype=np.int64) * * start = 0 # <<<<<<<<<<<<<< * group_size = 0 * for i in range(n): */ __pyx_v_start = 0; /* "pandas/lib.pyx":1159 * * start = 0 * group_size = 0 # <<<<<<<<<<<<<< * for i in range(n): * group_size += 1 */ __pyx_v_group_size = 0; /* "pandas/lib.pyx":1160 * start = 0 * group_size = 0 * for i in range(n): # <<<<<<<<<<<<<< * group_size += 1 * lab = labels[i] */ __pyx_t_1 = __pyx_v_n; for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_1; __pyx_t_12+=1) { __pyx_v_i = __pyx_t_12; /* "pandas/lib.pyx":1161 * group_size = 0 * for i in range(n): * group_size += 1 # <<<<<<<<<<<<<< * lab = labels[i] * if i == n - 1 or lab != labels[i + 1]: */ __pyx_v_group_size = (__pyx_v_group_size + 1); /* "pandas/lib.pyx":1162 * for i in range(n): * group_size += 1 * lab = labels[i] # <<<<<<<<<<<<<< * if i == n - 1 or lab != labels[i + 1]: * starts[lab] = start */ __pyx_t_13 = __pyx_v_i; __pyx_t_8 = -1; if (__pyx_t_13 < 0) { __pyx_t_13 += __pyx_pybuffernd_labels.diminfo[0].shape; if (unlikely(__pyx_t_13 < 0)) __pyx_t_8 = 0; } else if (unlikely(__pyx_t_13 >= __pyx_pybuffernd_labels.diminfo[0].shape)) __pyx_t_8 = 0; if (unlikely(__pyx_t_8 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_8); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1162; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_lab = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_labels.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_labels.diminfo[0].strides)); /* "pandas/lib.pyx":1163 * group_size += 1 * lab = labels[i] * if i == n - 1 or lab != labels[i + 1]: # <<<<<<<<<<<<<< * starts[lab] = start * ends[lab] = start + group_size */ __pyx_t_14 = ((__pyx_v_i == (__pyx_v_n - 1)) != 0); if (!__pyx_t_14) { __pyx_t_15 = (__pyx_v_i + 1); __pyx_t_8 = -1; if (__pyx_t_15 < 0) { __pyx_t_15 += __pyx_pybuffernd_labels.diminfo[0].shape; if (unlikely(__pyx_t_15 < 0)) __pyx_t_8 = 0; } else if (unlikely(__pyx_t_15 >= __pyx_pybuffernd_labels.diminfo[0].shape)) __pyx_t_8 = 0; if (unlikely(__pyx_t_8 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_8); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1163; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_16 = ((__pyx_v_lab != (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_labels.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_labels.diminfo[0].strides))) != 0); __pyx_t_17 = __pyx_t_16; } else { __pyx_t_17 = __pyx_t_14; } if (__pyx_t_17) { /* "pandas/lib.pyx":1164 * lab = labels[i] * if i == n - 1 or lab != labels[i + 1]: * starts[lab] = start # <<<<<<<<<<<<<< * ends[lab] = start + group_size * start += group_size */ __pyx_t_18 = __pyx_v_lab; __pyx_t_8 = -1; if (__pyx_t_18 < 0) { __pyx_t_18 += __pyx_pybuffernd_starts.diminfo[0].shape; if (unlikely(__pyx_t_18 < 0)) __pyx_t_8 = 0; } else if (unlikely(__pyx_t_18 >= __pyx_pybuffernd_starts.diminfo[0].shape)) __pyx_t_8 = 0; if (unlikely(__pyx_t_8 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_8); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1164; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_starts.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_starts.diminfo[0].strides) = __pyx_v_start; /* "pandas/lib.pyx":1165 * if i == n - 1 or lab != labels[i + 1]: * starts[lab] = start * ends[lab] = start + group_size # <<<<<<<<<<<<<< * start += group_size * group_size = 0 */ __pyx_t_5 = PyInt_FromSsize_t((__pyx_v_start + __pyx_v_group_size)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1165; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); if (unlikely(__Pyx_SetItemInt(__pyx_v_ends, __pyx_v_lab, __pyx_t_5, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1) < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1165; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "pandas/lib.pyx":1166 * starts[lab] = start * ends[lab] = start + group_size * start += group_size # <<<<<<<<<<<<<< * group_size = 0 * */ __pyx_v_start = (__pyx_v_start + __pyx_v_group_size); /* "pandas/lib.pyx":1167 * ends[lab] = start + group_size * start += group_size * group_size = 0 # <<<<<<<<<<<<<< * * return starts, ends */ __pyx_v_group_size = 0; goto __pyx_L5; } __pyx_L5:; } /* "pandas/lib.pyx":1169 * group_size = 0 * * return starts, ends # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1169; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(((PyObject *)__pyx_v_starts)); PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_v_starts)); __Pyx_GIVEREF(((PyObject *)__pyx_v_starts)); __Pyx_INCREF(__pyx_v_ends); PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_v_ends); __Pyx_GIVEREF(__pyx_v_ends); __pyx_r = __pyx_t_5; __pyx_t_5 = 0; goto __pyx_L0; /* "pandas/lib.pyx":1147 * return result.view(np.bool_) * * def generate_slices(ndarray[int64_t] labels, Py_ssize_t ngroups): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, group_size, n, lab, start */ /* 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_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_labels.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_starts.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.lib.generate_slices", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_labels.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_starts.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_starts); __Pyx_XDECREF(__pyx_v_ends); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/lib.pyx":1172 * * * def indices_fast(object index, ndarray[int64_t] labels, list keys, # <<<<<<<<<<<<<< * list sorted_labels): * cdef: */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_3lib_99indices_fast(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_3lib_99indices_fast = {__Pyx_NAMESTR("indices_fast"), (PyCFunction)__pyx_pw_6pandas_3lib_99indices_fast, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_3lib_99indices_fast(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_index = 0; PyArrayObject *__pyx_v_labels = 0; PyObject *__pyx_v_keys = 0; PyObject *__pyx_v_sorted_labels = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("indices_fast (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_index,&__pyx_n_s_labels,&__pyx_n_s_keys,&__pyx_n_s_sorted_labels,0}; PyObject* values[4] = {0,0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_index)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_labels)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("indices_fast", 1, 4, 4, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1172; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_keys)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("indices_fast", 1, 4, 4, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1172; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_sorted_labels)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("indices_fast", 1, 4, 4, 3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1172; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "indices_fast") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1172; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 4) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[3] = PyTuple_GET_ITEM(__pyx_args, 3); } __pyx_v_index = values[0]; __pyx_v_labels = ((PyArrayObject *)values[1]); __pyx_v_keys = ((PyObject*)values[2]); __pyx_v_sorted_labels = ((PyObject*)values[3]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("indices_fast", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1172; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.lib.indices_fast", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_labels), __pyx_ptype_5numpy_ndarray, 1, "labels", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1172; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_keys), (&PyList_Type), 1, "keys", 1))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1172; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_sorted_labels), (&PyList_Type), 1, "sorted_labels", 1))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1173; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_3lib_98indices_fast(__pyx_self, __pyx_v_index, __pyx_v_labels, __pyx_v_keys, __pyx_v_sorted_labels); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_3lib_98indices_fast(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_index, PyArrayObject *__pyx_v_labels, PyObject *__pyx_v_keys, PyObject *__pyx_v_sorted_labels) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_k; Py_ssize_t __pyx_v_lab; Py_ssize_t __pyx_v_cur; Py_ssize_t __pyx_v_start; Py_ssize_t __pyx_v_n; PyObject *__pyx_v_result = 0; PyObject *__pyx_v_tup = 0; PyObject *__pyx_v_val = NULL; __Pyx_LocalBuf_ND __pyx_pybuffernd_labels; __Pyx_Buffer __pyx_pybuffer_labels; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; PyObject *__pyx_t_2 = NULL; int __pyx_t_3; long __pyx_t_4; int __pyx_t_5; Py_ssize_t __pyx_t_6; Py_ssize_t __pyx_t_7; Py_ssize_t __pyx_t_8; Py_ssize_t __pyx_t_9; PyObject *__pyx_t_10 = NULL; Py_ssize_t __pyx_t_11; PyObject *__pyx_t_12 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("indices_fast", 0); __pyx_pybuffer_labels.pybuffer.buf = NULL; __pyx_pybuffer_labels.refcount = 0; __pyx_pybuffernd_labels.data = NULL; __pyx_pybuffernd_labels.rcbuffer = &__pyx_pybuffer_labels; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_labels.rcbuffer->pybuffer, (PyObject*)__pyx_v_labels, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1172; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_labels.diminfo[0].strides = __pyx_pybuffernd_labels.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_labels.diminfo[0].shape = __pyx_pybuffernd_labels.rcbuffer->pybuffer.shape[0]; /* "pandas/lib.pyx":1175 * list sorted_labels): * cdef: * Py_ssize_t i, j, k, lab, cur, start, n = len(labels) # <<<<<<<<<<<<<< * dict result = {} * object tup */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_labels)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1175; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/lib.pyx":1176 * cdef: * Py_ssize_t i, j, k, lab, cur, start, n = len(labels) * dict result = {} # <<<<<<<<<<<<<< * object tup * */ __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1176; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_v_result = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; /* "pandas/lib.pyx":1179 * object tup * * k = len(keys) # <<<<<<<<<<<<<< * * if n == 0: */ if (unlikely(__pyx_v_keys == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1179; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_1 = PyList_GET_SIZE(__pyx_v_keys); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1179; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_k = __pyx_t_1; /* "pandas/lib.pyx":1181 * k = len(keys) * * if n == 0: # <<<<<<<<<<<<<< * return result * */ __pyx_t_3 = ((__pyx_v_n == 0) != 0); if (__pyx_t_3) { /* "pandas/lib.pyx":1182 * * if n == 0: * return result # <<<<<<<<<<<<<< * * start = 0 */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_result); __pyx_r = __pyx_v_result; goto __pyx_L0; } /* "pandas/lib.pyx":1184 * return result * * start = 0 # <<<<<<<<<<<<<< * cur = labels[0] * for i in range(1, n): */ __pyx_v_start = 0; /* "pandas/lib.pyx":1185 * * start = 0 * cur = labels[0] # <<<<<<<<<<<<<< * for i in range(1, n): * lab = labels[i] */ __pyx_t_4 = 0; __pyx_t_5 = -1; if (__pyx_t_4 < 0) { __pyx_t_4 += __pyx_pybuffernd_labels.diminfo[0].shape; if (unlikely(__pyx_t_4 < 0)) __pyx_t_5 = 0; } else if (unlikely(__pyx_t_4 >= __pyx_pybuffernd_labels.diminfo[0].shape)) __pyx_t_5 = 0; if (unlikely(__pyx_t_5 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_5); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1185; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_cur = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_labels.rcbuffer->pybuffer.buf, __pyx_t_4, __pyx_pybuffernd_labels.diminfo[0].strides)); /* "pandas/lib.pyx":1186 * start = 0 * cur = labels[0] * for i in range(1, n): # <<<<<<<<<<<<<< * lab = labels[i] * */ __pyx_t_1 = __pyx_v_n; for (__pyx_t_6 = 1; __pyx_t_6 < __pyx_t_1; __pyx_t_6+=1) { __pyx_v_i = __pyx_t_6; /* "pandas/lib.pyx":1187 * cur = labels[0] * for i in range(1, n): * lab = labels[i] # <<<<<<<<<<<<<< * * if lab != cur: */ __pyx_t_7 = __pyx_v_i; __pyx_t_5 = -1; if (__pyx_t_7 < 0) { __pyx_t_7 += __pyx_pybuffernd_labels.diminfo[0].shape; if (unlikely(__pyx_t_7 < 0)) __pyx_t_5 = 0; } else if (unlikely(__pyx_t_7 >= __pyx_pybuffernd_labels.diminfo[0].shape)) __pyx_t_5 = 0; if (unlikely(__pyx_t_5 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_5); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1187; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_lab = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_labels.rcbuffer->pybuffer.buf, __pyx_t_7, __pyx_pybuffernd_labels.diminfo[0].strides)); /* "pandas/lib.pyx":1189 * lab = labels[i] * * if lab != cur: # <<<<<<<<<<<<<< * if lab != -1: * tup = PyTuple_New(k) */ __pyx_t_3 = ((__pyx_v_lab != __pyx_v_cur) != 0); if (__pyx_t_3) { /* "pandas/lib.pyx":1190 * * if lab != cur: * if lab != -1: # <<<<<<<<<<<<<< * tup = PyTuple_New(k) * for j in range(k): */ __pyx_t_3 = ((__pyx_v_lab != -1) != 0); if (__pyx_t_3) { /* "pandas/lib.pyx":1191 * if lab != cur: * if lab != -1: * tup = PyTuple_New(k) # <<<<<<<<<<<<<< * for j in range(k): * val = util.get_value_at(keys[j], */ __pyx_t_2 = PyTuple_New(__pyx_v_k); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1191; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_XDECREF_SET(__pyx_v_tup, __pyx_t_2); __pyx_t_2 = 0; /* "pandas/lib.pyx":1192 * if lab != -1: * tup = PyTuple_New(k) * for j in range(k): # <<<<<<<<<<<<<< * val = util.get_value_at(keys[j], * sorted_labels[j][i-1]) */ __pyx_t_8 = __pyx_v_k; for (__pyx_t_9 = 0; __pyx_t_9 < __pyx_t_8; __pyx_t_9+=1) { __pyx_v_j = __pyx_t_9; /* "pandas/lib.pyx":1193 * tup = PyTuple_New(k) * for j in range(k): * val = util.get_value_at(keys[j], # <<<<<<<<<<<<<< * sorted_labels[j][i-1]) * PyTuple_SET_ITEM(tup, j, val) */ if (unlikely(__pyx_v_keys == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1193; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_2 = __Pyx_GetItemInt_List(__pyx_v_keys, __pyx_v_j, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1193; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 1193; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/lib.pyx":1194 * for j in range(k): * val = util.get_value_at(keys[j], * sorted_labels[j][i-1]) # <<<<<<<<<<<<<< * PyTuple_SET_ITEM(tup, j, val) * Py_INCREF(val) */ if (unlikely(__pyx_v_sorted_labels == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1194; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_10 = __Pyx_GetItemInt_List(__pyx_v_sorted_labels, __pyx_v_j, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1); if (unlikely(__pyx_t_10 == NULL)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1194; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_10); __pyx_t_11 = (__pyx_v_i - 1); __pyx_t_12 = __Pyx_GetItemInt(__pyx_t_10, __pyx_t_11, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(__pyx_t_12 == NULL)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1194; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; /* "pandas/lib.pyx":1193 * tup = PyTuple_New(k) * for j in range(k): * val = util.get_value_at(keys[j], # <<<<<<<<<<<<<< * sorted_labels[j][i-1]) * PyTuple_SET_ITEM(tup, j, val) */ __pyx_t_10 = __pyx_f_4util_get_value_at(((PyArrayObject *)__pyx_t_2), __pyx_t_12); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1193; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_XDECREF_SET(__pyx_v_val, __pyx_t_10); __pyx_t_10 = 0; /* "pandas/lib.pyx":1195 * val = util.get_value_at(keys[j], * sorted_labels[j][i-1]) * PyTuple_SET_ITEM(tup, j, val) # <<<<<<<<<<<<<< * Py_INCREF(val) * */ PyTuple_SET_ITEM(__pyx_v_tup, __pyx_v_j, __pyx_v_val); /* "pandas/lib.pyx":1196 * sorted_labels[j][i-1]) * PyTuple_SET_ITEM(tup, j, val) * Py_INCREF(val) # <<<<<<<<<<<<<< * * result[tup] = index[start:i] */ Py_INCREF(__pyx_v_val); } /* "pandas/lib.pyx":1198 * Py_INCREF(val) * * result[tup] = index[start:i] # <<<<<<<<<<<<<< * start = i * cur = lab */ __pyx_t_10 = __Pyx_PyObject_GetSlice(__pyx_v_index, __pyx_v_start, __pyx_v_i, NULL, NULL, NULL, 1, 1, 1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1198; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); if (unlikely(PyDict_SetItem(__pyx_v_result, __pyx_v_tup, __pyx_t_10) < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1198; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; goto __pyx_L7; } __pyx_L7:; /* "pandas/lib.pyx":1199 * * result[tup] = index[start:i] * start = i # <<<<<<<<<<<<<< * cur = lab * */ __pyx_v_start = __pyx_v_i; goto __pyx_L6; } __pyx_L6:; /* "pandas/lib.pyx":1200 * result[tup] = index[start:i] * start = i * cur = lab # <<<<<<<<<<<<<< * * tup = PyTuple_New(k) */ __pyx_v_cur = __pyx_v_lab; } /* "pandas/lib.pyx":1202 * cur = lab * * tup = PyTuple_New(k) # <<<<<<<<<<<<<< * for j in range(k): * val = util.get_value_at(keys[j], */ __pyx_t_10 = PyTuple_New(__pyx_v_k); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1202; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_XDECREF_SET(__pyx_v_tup, __pyx_t_10); __pyx_t_10 = 0; /* "pandas/lib.pyx":1203 * * tup = PyTuple_New(k) * for j in range(k): # <<<<<<<<<<<<<< * val = util.get_value_at(keys[j], * sorted_labels[j][n - 1]) */ __pyx_t_1 = __pyx_v_k; for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_1; __pyx_t_6+=1) { __pyx_v_j = __pyx_t_6; /* "pandas/lib.pyx":1204 * tup = PyTuple_New(k) * for j in range(k): * val = util.get_value_at(keys[j], # <<<<<<<<<<<<<< * sorted_labels[j][n - 1]) * PyTuple_SET_ITEM(tup, j, val) */ if (unlikely(__pyx_v_keys == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1204; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_10 = __Pyx_GetItemInt_List(__pyx_v_keys, __pyx_v_j, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1); if (unlikely(__pyx_t_10 == NULL)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1204; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_10); if (!(likely(((__pyx_t_10) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_10, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1204; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/lib.pyx":1205 * for j in range(k): * val = util.get_value_at(keys[j], * sorted_labels[j][n - 1]) # <<<<<<<<<<<<<< * PyTuple_SET_ITEM(tup, j, val) * Py_INCREF(val) */ if (unlikely(__pyx_v_sorted_labels == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1205; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_12 = __Pyx_GetItemInt_List(__pyx_v_sorted_labels, __pyx_v_j, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1); if (unlikely(__pyx_t_12 == NULL)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1205; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_12); __pyx_t_8 = (__pyx_v_n - 1); __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_12, __pyx_t_8, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1205; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; /* "pandas/lib.pyx":1204 * tup = PyTuple_New(k) * for j in range(k): * val = util.get_value_at(keys[j], # <<<<<<<<<<<<<< * sorted_labels[j][n - 1]) * PyTuple_SET_ITEM(tup, j, val) */ __pyx_t_12 = __pyx_f_4util_get_value_at(((PyArrayObject *)__pyx_t_10), __pyx_t_2); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1204; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF_SET(__pyx_v_val, __pyx_t_12); __pyx_t_12 = 0; /* "pandas/lib.pyx":1206 * val = util.get_value_at(keys[j], * sorted_labels[j][n - 1]) * PyTuple_SET_ITEM(tup, j, val) # <<<<<<<<<<<<<< * Py_INCREF(val) * result[tup] = index[start:] */ PyTuple_SET_ITEM(__pyx_v_tup, __pyx_v_j, __pyx_v_val); /* "pandas/lib.pyx":1207 * sorted_labels[j][n - 1]) * PyTuple_SET_ITEM(tup, j, val) * Py_INCREF(val) # <<<<<<<<<<<<<< * result[tup] = index[start:] * */ Py_INCREF(__pyx_v_val); } /* "pandas/lib.pyx":1208 * PyTuple_SET_ITEM(tup, j, val) * Py_INCREF(val) * result[tup] = index[start:] # <<<<<<<<<<<<<< * * return result */ __pyx_t_12 = __Pyx_PyObject_GetSlice(__pyx_v_index, __pyx_v_start, 0, NULL, NULL, NULL, 1, 0, 1); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1208; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); if (unlikely(PyDict_SetItem(__pyx_v_result, __pyx_v_tup, __pyx_t_12) < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1208; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; /* "pandas/lib.pyx":1210 * result[tup] = index[start:] * * return result # <<<<<<<<<<<<<< * * include "reduce.pyx" */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_result); __pyx_r = __pyx_v_result; goto __pyx_L0; /* "pandas/lib.pyx":1172 * * * def indices_fast(object index, ndarray[int64_t] labels, list keys, # <<<<<<<<<<<<<< * list sorted_labels): * cdef: */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_10); __Pyx_XDECREF(__pyx_t_12); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_labels.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.lib.indices_fast", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_labels.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF(__pyx_v_result); __Pyx_XDECREF(__pyx_v_tup); __Pyx_XDECREF(__pyx_v_val); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/reduce.pyx":18 * object arr, dummy, f, labels, typ, index * * def __init__(self, object arr, object f, axis=1, dummy=None, # <<<<<<<<<<<<<< * labels=None): * n, k = arr.shape */ /* Python wrapper */ static int __pyx_pw_6pandas_3lib_7Reducer_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_pw_6pandas_3lib_7Reducer_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_arr = 0; PyObject *__pyx_v_f = 0; PyObject *__pyx_v_axis = 0; PyObject *__pyx_v_dummy = 0; PyObject *__pyx_v_labels = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_arr,&__pyx_n_s_f,&__pyx_n_s_axis,&__pyx_n_s_dummy,&__pyx_n_s_labels,0}; PyObject* values[5] = {0,0,0,0,0}; values[2] = ((PyObject *)__pyx_int_1); values[3] = ((PyObject *)Py_None); /* "pandas/src/reduce.pyx":19 * * def __init__(self, object arr, object f, axis=1, dummy=None, * labels=None): # <<<<<<<<<<<<<< * n, k = arr.shape * */ values[4] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_arr)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_f)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 5, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 18; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_axis); if (value) { values[2] = value; kw_args--; } } case 3: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_dummy); if (value) { values[3] = value; kw_args--; } } case 4: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_labels); if (value) { values[4] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 18; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_arr = values[0]; __pyx_v_f = values[1]; __pyx_v_axis = values[2]; __pyx_v_dummy = values[3]; __pyx_v_labels = values[4]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 5, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 18; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.lib.Reducer.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return -1; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pandas_3lib_7Reducer___init__(((struct __pyx_obj_6pandas_3lib_Reducer *)__pyx_v_self), __pyx_v_arr, __pyx_v_f, __pyx_v_axis, __pyx_v_dummy, __pyx_v_labels); /* "pandas/src/reduce.pyx":18 * object arr, dummy, f, labels, typ, index * * def __init__(self, object arr, object f, axis=1, dummy=None, # <<<<<<<<<<<<<< * labels=None): * n, k = arr.shape */ /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pandas_3lib_7Reducer___init__(struct __pyx_obj_6pandas_3lib_Reducer *__pyx_v_self, PyObject *__pyx_v_arr, PyObject *__pyx_v_f, PyObject *__pyx_v_axis, PyObject *__pyx_v_dummy, PyObject *__pyx_v_labels) { PyObject *__pyx_v_n = NULL; PyObject *__pyx_v_k = NULL; PyObject *__pyx_v_index = NULL; 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)(PyObject *); int __pyx_t_6; int __pyx_t_7; Py_ssize_t __pyx_t_8; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__init__", 0); __Pyx_INCREF(__pyx_v_arr); /* "pandas/src/reduce.pyx":20 * def __init__(self, object arr, object f, axis=1, dummy=None, * labels=None): * n, k = arr.shape # <<<<<<<<<<<<<< * * if axis == 0: */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_arr, __pyx_n_s_shape); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 20; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) { PyObject* sequence = __pyx_t_1; #if CYTHON_COMPILING_IN_CPYTHON Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 20; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1); } else { __pyx_t_2 = PyList_GET_ITEM(sequence, 0); __pyx_t_3 = PyList_GET_ITEM(sequence, 1); } __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); #else __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 20; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 20; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } else { Py_ssize_t index = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 20; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_5 = Py_TYPE(__pyx_t_4)->tp_iternext; index = 0; __pyx_t_2 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_2)) goto __pyx_L3_unpacking_failed; __Pyx_GOTREF(__pyx_t_2); index = 1; __pyx_t_3 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_3)) goto __pyx_L3_unpacking_failed; __Pyx_GOTREF(__pyx_t_3); if (__Pyx_IternextUnpackEndCheck(__pyx_t_5(__pyx_t_4), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 20; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 20; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_L4_unpacking_done:; } __pyx_v_n = __pyx_t_2; __pyx_t_2 = 0; __pyx_v_k = __pyx_t_3; __pyx_t_3 = 0; /* "pandas/src/reduce.pyx":22 * n, k = arr.shape * * if axis == 0: # <<<<<<<<<<<<<< * if not arr.flags.f_contiguous: * arr = arr.copy('F') */ __pyx_t_1 = PyObject_RichCompare(__pyx_v_axis, __pyx_int_0, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 22; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 22; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_6) { /* "pandas/src/reduce.pyx":23 * * if axis == 0: * if not arr.flags.f_contiguous: # <<<<<<<<<<<<<< * arr = arr.copy('F') * */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_arr, __pyx_n_s_flags); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 23; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_f_contiguous); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 23; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 23; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_7 = ((!__pyx_t_6) != 0); if (__pyx_t_7) { /* "pandas/src/reduce.pyx":24 * if axis == 0: * if not arr.flags.f_contiguous: * arr = arr.copy('F') # <<<<<<<<<<<<<< * * self.nresults = k */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_arr, __pyx_n_s_copy); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 24; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = PyObject_Call(__pyx_t_3, __pyx_tuple__12, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 24; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF_SET(__pyx_v_arr, __pyx_t_1); __pyx_t_1 = 0; goto __pyx_L6; } __pyx_L6:; /* "pandas/src/reduce.pyx":26 * arr = arr.copy('F') * * self.nresults = k # <<<<<<<<<<<<<< * self.chunksize = n * self.increment = n * arr.dtype.itemsize */ __pyx_t_8 = __Pyx_PyIndex_AsSsize_t(__pyx_v_k); if (unlikely((__pyx_t_8 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 26; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_self->nresults = __pyx_t_8; /* "pandas/src/reduce.pyx":27 * * self.nresults = k * self.chunksize = n # <<<<<<<<<<<<<< * self.increment = n * arr.dtype.itemsize * else: */ __pyx_t_8 = __Pyx_PyIndex_AsSsize_t(__pyx_v_n); if (unlikely((__pyx_t_8 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 27; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_self->chunksize = __pyx_t_8; /* "pandas/src/reduce.pyx":28 * self.nresults = k * self.chunksize = n * self.increment = n * arr.dtype.itemsize # <<<<<<<<<<<<<< * else: * if not arr.flags.c_contiguous: */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_arr, __pyx_n_s_dtype); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 28; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_itemsize); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 28; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyNumber_Multiply(__pyx_v_n, __pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 28; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_8 = __Pyx_PyIndex_AsSsize_t(__pyx_t_1); if (unlikely((__pyx_t_8 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 28; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_self->increment = __pyx_t_8; goto __pyx_L5; } /*else*/ { /* "pandas/src/reduce.pyx":30 * self.increment = n * arr.dtype.itemsize * else: * if not arr.flags.c_contiguous: # <<<<<<<<<<<<<< * arr = arr.copy('C') * */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_arr, __pyx_n_s_flags); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 30; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_c_contiguous); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 30; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 30; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_6 = ((!__pyx_t_7) != 0); if (__pyx_t_6) { /* "pandas/src/reduce.pyx":31 * else: * if not arr.flags.c_contiguous: * arr = arr.copy('C') # <<<<<<<<<<<<<< * * self.nresults = n */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_arr, __pyx_n_s_copy); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 31; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = PyObject_Call(__pyx_t_3, __pyx_tuple__13, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 31; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF_SET(__pyx_v_arr, __pyx_t_1); __pyx_t_1 = 0; goto __pyx_L7; } __pyx_L7:; /* "pandas/src/reduce.pyx":33 * arr = arr.copy('C') * * self.nresults = n # <<<<<<<<<<<<<< * self.chunksize = k * self.increment = k * arr.dtype.itemsize */ __pyx_t_8 = __Pyx_PyIndex_AsSsize_t(__pyx_v_n); if (unlikely((__pyx_t_8 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 33; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_self->nresults = __pyx_t_8; /* "pandas/src/reduce.pyx":34 * * self.nresults = n * self.chunksize = k # <<<<<<<<<<<<<< * self.increment = k * arr.dtype.itemsize * */ __pyx_t_8 = __Pyx_PyIndex_AsSsize_t(__pyx_v_k); if (unlikely((__pyx_t_8 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 34; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_self->chunksize = __pyx_t_8; /* "pandas/src/reduce.pyx":35 * self.nresults = n * self.chunksize = k * self.increment = k * arr.dtype.itemsize # <<<<<<<<<<<<<< * * */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_arr, __pyx_n_s_dtype); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_itemsize); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyNumber_Multiply(__pyx_v_k, __pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_8 = __Pyx_PyIndex_AsSsize_t(__pyx_t_1); if (unlikely((__pyx_t_8 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_self->increment = __pyx_t_8; } __pyx_L5:; /* "pandas/src/reduce.pyx":38 * * * self.f = f # <<<<<<<<<<<<<< * self.arr = arr * self.typ = None */ __Pyx_INCREF(__pyx_v_f); __Pyx_GIVEREF(__pyx_v_f); __Pyx_GOTREF(__pyx_v_self->f); __Pyx_DECREF(__pyx_v_self->f); __pyx_v_self->f = __pyx_v_f; /* "pandas/src/reduce.pyx":39 * * self.f = f * self.arr = arr # <<<<<<<<<<<<<< * self.typ = None * self.labels = labels */ __Pyx_INCREF(__pyx_v_arr); __Pyx_GIVEREF(__pyx_v_arr); __Pyx_GOTREF(__pyx_v_self->arr); __Pyx_DECREF(__pyx_v_self->arr); __pyx_v_self->arr = __pyx_v_arr; /* "pandas/src/reduce.pyx":40 * self.f = f * self.arr = arr * self.typ = None # <<<<<<<<<<<<<< * self.labels = labels * self.dummy, index = self._check_dummy(dummy=dummy) */ __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->typ); __Pyx_DECREF(__pyx_v_self->typ); __pyx_v_self->typ = Py_None; /* "pandas/src/reduce.pyx":41 * self.arr = arr * self.typ = None * self.labels = labels # <<<<<<<<<<<<<< * self.dummy, index = self._check_dummy(dummy=dummy) * */ __Pyx_INCREF(__pyx_v_labels); __Pyx_GIVEREF(__pyx_v_labels); __Pyx_GOTREF(__pyx_v_self->labels); __Pyx_DECREF(__pyx_v_self->labels); __pyx_v_self->labels = __pyx_v_labels; /* "pandas/src/reduce.pyx":42 * self.typ = None * self.labels = labels * self.dummy, index = self._check_dummy(dummy=dummy) # <<<<<<<<<<<<<< * * self.labels = labels */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_check_dummy); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 42; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 42; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dummy, __pyx_v_dummy) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 42; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_2 = PyObject_Call(__pyx_t_1, __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 42; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if ((likely(PyTuple_CheckExact(__pyx_t_2))) || (PyList_CheckExact(__pyx_t_2))) { PyObject* sequence = __pyx_t_2; #if CYTHON_COMPILING_IN_CPYTHON Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 42; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_1 = PyTuple_GET_ITEM(sequence, 1); } else { __pyx_t_3 = PyList_GET_ITEM(sequence, 0); __pyx_t_1 = PyList_GET_ITEM(sequence, 1); } __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(__pyx_t_1); #else __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 42; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 42; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); #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_filename = __pyx_f[0]; __pyx_lineno = 42; __pyx_clineno = __LINE__; goto __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_3 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_3)) goto __pyx_L8_unpacking_failed; __Pyx_GOTREF(__pyx_t_3); index = 1; __pyx_t_1 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_1)) goto __pyx_L8_unpacking_failed; __Pyx_GOTREF(__pyx_t_1); if (__Pyx_IternextUnpackEndCheck(__pyx_t_5(__pyx_t_4), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 42; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_5 = NULL; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; goto __pyx_L9_unpacking_done; __pyx_L8_unpacking_failed:; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_5 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 42; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_L9_unpacking_done:; } __Pyx_GIVEREF(__pyx_t_3); __Pyx_GOTREF(__pyx_v_self->dummy); __Pyx_DECREF(__pyx_v_self->dummy); __pyx_v_self->dummy = __pyx_t_3; __pyx_t_3 = 0; __pyx_v_index = __pyx_t_1; __pyx_t_1 = 0; /* "pandas/src/reduce.pyx":44 * self.dummy, index = self._check_dummy(dummy=dummy) * * self.labels = labels # <<<<<<<<<<<<<< * self.index = index * */ __Pyx_INCREF(__pyx_v_labels); __Pyx_GIVEREF(__pyx_v_labels); __Pyx_GOTREF(__pyx_v_self->labels); __Pyx_DECREF(__pyx_v_self->labels); __pyx_v_self->labels = __pyx_v_labels; /* "pandas/src/reduce.pyx":45 * * self.labels = labels * self.index = index # <<<<<<<<<<<<<< * * def _check_dummy(self, dummy=None): */ __Pyx_INCREF(__pyx_v_index); __Pyx_GIVEREF(__pyx_v_index); __Pyx_GOTREF(__pyx_v_self->index); __Pyx_DECREF(__pyx_v_self->index); __pyx_v_self->index = __pyx_v_index; /* "pandas/src/reduce.pyx":18 * object arr, dummy, f, labels, typ, index * * def __init__(self, object arr, object f, axis=1, dummy=None, # <<<<<<<<<<<<<< * labels=None): * n, k = arr.shape */ /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("pandas.lib.Reducer.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_XDECREF(__pyx_v_n); __Pyx_XDECREF(__pyx_v_k); __Pyx_XDECREF(__pyx_v_index); __Pyx_XDECREF(__pyx_v_arr); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/reduce.pyx":47 * self.index = index * * def _check_dummy(self, dummy=None): # <<<<<<<<<<<<<< * cdef object index * */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_3lib_7Reducer_3_check_dummy(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_6pandas_3lib_7Reducer_3_check_dummy(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_dummy = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_check_dummy (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_dummy,0}; PyObject* values[1] = {0}; values[0] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_dummy); if (value) { values[0] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_check_dummy") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 47; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_dummy = values[0]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("_check_dummy", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 47; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.lib.Reducer._check_dummy", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pandas_3lib_7Reducer_2_check_dummy(((struct __pyx_obj_6pandas_3lib_Reducer *)__pyx_v_self), __pyx_v_dummy); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_3lib_7Reducer_2_check_dummy(struct __pyx_obj_6pandas_3lib_Reducer *__pyx_v_self, PyObject *__pyx_v_dummy) { PyObject *__pyx_v_index = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; Py_ssize_t __pyx_t_7; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_check_dummy", 0); __Pyx_INCREF(__pyx_v_dummy); /* "pandas/src/reduce.pyx":50 * cdef object index * * if dummy is None: # <<<<<<<<<<<<<< * dummy = np.empty(self.chunksize, dtype=self.arr.dtype) * index = None */ __pyx_t_1 = (__pyx_v_dummy == Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { /* "pandas/src/reduce.pyx":51 * * if dummy is None: * dummy = np.empty(self.chunksize, dtype=self.arr.dtype) # <<<<<<<<<<<<<< * index = None * */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_empty); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyInt_FromSsize_t(__pyx_v_self->chunksize); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->arr, __pyx_n_s_dtype); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dtype, __pyx_t_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyObject_Call(__pyx_t_4, __pyx_t_5, __pyx_t_3); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF_SET(__pyx_v_dummy, __pyx_t_6); __pyx_t_6 = 0; /* "pandas/src/reduce.pyx":52 * if dummy is None: * dummy = np.empty(self.chunksize, dtype=self.arr.dtype) * index = None # <<<<<<<<<<<<<< * * # our ref is stolen later since we are creating this array */ __Pyx_INCREF(Py_None); __pyx_v_index = Py_None; /* "pandas/src/reduce.pyx":56 * # our ref is stolen later since we are creating this array * # in cython, so increment first * Py_INCREF(dummy) # <<<<<<<<<<<<<< * else: * if dummy.dtype != self.arr.dtype: */ Py_INCREF(__pyx_v_dummy); goto __pyx_L3; } /*else*/ { /* "pandas/src/reduce.pyx":58 * Py_INCREF(dummy) * else: * if dummy.dtype != self.arr.dtype: # <<<<<<<<<<<<<< * raise ValueError('Dummy array must be same dtype') * if len(dummy) != self.chunksize: */ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_dummy, __pyx_n_s_dtype); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 58; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->arr, __pyx_n_s_dtype); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 58; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = PyObject_RichCompare(__pyx_t_6, __pyx_t_3, Py_NE); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 58; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 58; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_2) { /* "pandas/src/reduce.pyx":59 * else: * if dummy.dtype != self.arr.dtype: * raise ValueError('Dummy array must be same dtype') # <<<<<<<<<<<<<< * if len(dummy) != self.chunksize: * raise ValueError('Dummy array must be length %d' % */ __pyx_t_5 = PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__14, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 59; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_Raise(__pyx_t_5, 0, 0, 0); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 59; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } /* "pandas/src/reduce.pyx":60 * if dummy.dtype != self.arr.dtype: * raise ValueError('Dummy array must be same dtype') * if len(dummy) != self.chunksize: # <<<<<<<<<<<<<< * raise ValueError('Dummy array must be length %d' % * self.chunksize) */ __pyx_t_7 = PyObject_Length(__pyx_v_dummy); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 60; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_2 = ((__pyx_t_7 != __pyx_v_self->chunksize) != 0); if (__pyx_t_2) { /* "pandas/src/reduce.pyx":62 * if len(dummy) != self.chunksize: * raise ValueError('Dummy array must be length %d' % * self.chunksize) # <<<<<<<<<<<<<< * * # we passed a series-like */ __pyx_t_5 = PyInt_FromSsize_t(__pyx_v_self->chunksize); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); /* "pandas/src/reduce.pyx":61 * raise ValueError('Dummy array must be same dtype') * if len(dummy) != self.chunksize: * raise ValueError('Dummy array must be length %d' % # <<<<<<<<<<<<<< * self.chunksize) * */ __pyx_t_3 = __Pyx_PyString_Format(__pyx_kp_s_Dummy_array_must_be_length_d, __pyx_t_5); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 61; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 61; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyObject_Call(__pyx_builtin_ValueError, __pyx_t_5, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 61; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 61; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } /* "pandas/src/reduce.pyx":65 * * # we passed a series-like * if hasattr(dummy,'values'): # <<<<<<<<<<<<<< * * self.typ = type(dummy) */ __pyx_t_2 = PyObject_HasAttr(__pyx_v_dummy, __pyx_n_s_values); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 65; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_1 = (__pyx_t_2 != 0); if (__pyx_t_1) { /* "pandas/src/reduce.pyx":67 * if hasattr(dummy,'values'): * * self.typ = type(dummy) # <<<<<<<<<<<<<< * index = getattr(dummy,'index',None) * dummy = dummy.values */ __Pyx_INCREF(((PyObject *)Py_TYPE(__pyx_v_dummy))); __Pyx_GIVEREF(((PyObject *)Py_TYPE(__pyx_v_dummy))); __Pyx_GOTREF(__pyx_v_self->typ); __Pyx_DECREF(__pyx_v_self->typ); __pyx_v_self->typ = ((PyObject *)Py_TYPE(__pyx_v_dummy)); /* "pandas/src/reduce.pyx":68 * * self.typ = type(dummy) * index = getattr(dummy,'index',None) # <<<<<<<<<<<<<< * dummy = dummy.values * */ __pyx_t_3 = __Pyx_GetAttr3(__pyx_v_dummy, __pyx_n_s_index, Py_None); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 68; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_v_index = __pyx_t_3; __pyx_t_3 = 0; /* "pandas/src/reduce.pyx":69 * self.typ = type(dummy) * index = getattr(dummy,'index',None) * dummy = dummy.values # <<<<<<<<<<<<<< * * return dummy, index */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_dummy, __pyx_n_s_values); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF_SET(__pyx_v_dummy, __pyx_t_3); __pyx_t_3 = 0; goto __pyx_L6; } __pyx_L6:; } __pyx_L3:; /* "pandas/src/reduce.pyx":71 * dummy = dummy.values * * return dummy, index # <<<<<<<<<<<<<< * * def get_result(self): */ __Pyx_XDECREF(__pyx_r); if (unlikely(!__pyx_v_index)) { __Pyx_RaiseUnboundLocalError("index"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 71; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 71; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_v_dummy); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_dummy); __Pyx_GIVEREF(__pyx_v_dummy); __Pyx_INCREF(__pyx_v_index); PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_index); __Pyx_GIVEREF(__pyx_v_index); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; /* "pandas/src/reduce.pyx":47 * self.index = index * * def _check_dummy(self, dummy=None): # <<<<<<<<<<<<<< * cdef object index * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("pandas.lib.Reducer._check_dummy", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_index); __Pyx_XDECREF(__pyx_v_dummy); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/reduce.pyx":73 * return dummy, index * * def get_result(self): # <<<<<<<<<<<<<< * cdef: * char* dummy_buf */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_3lib_7Reducer_5get_result(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static PyObject *__pyx_pw_6pandas_3lib_7Reducer_5get_result(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("get_result (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_3lib_7Reducer_4get_result(((struct __pyx_obj_6pandas_3lib_Reducer *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_3lib_7Reducer_4get_result(struct __pyx_obj_6pandas_3lib_Reducer *__pyx_v_self) { char *__pyx_v_dummy_buf; PyArrayObject *__pyx_v_arr = 0; PyArrayObject *__pyx_v_result = 0; PyArrayObject *__pyx_v_chunk = 0; Py_ssize_t __pyx_v_i; CYTHON_UNUSED Py_ssize_t __pyx_v_incr; PyArrayIterObject *__pyx_v_it = 0; PyObject *__pyx_v_res = 0; PyObject *__pyx_v_name = 0; PyObject *__pyx_v_labels = 0; PyObject *__pyx_v_index = 0; PyObject *__pyx_v_cached_typ = 0; PyObject *__pyx_v_e = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; char *__pyx_t_2; Py_ssize_t __pyx_t_3; 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; int __pyx_t_9; PyObject *__pyx_t_10 = NULL; PyObject *__pyx_t_11 = NULL; int __pyx_t_12; PyObject *__pyx_t_13 = NULL; PyObject *__pyx_t_14 = NULL; PyObject *__pyx_t_15 = NULL; int __pyx_t_16; char const *__pyx_t_17; PyObject *__pyx_t_18 = NULL; PyObject *__pyx_t_19 = NULL; PyObject *__pyx_t_20 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_result", 0); /* "pandas/src/reduce.pyx":80 * flatiter it * object res, name, labels, index * object cached_typ = None # <<<<<<<<<<<<<< * * arr = self.arr */ __Pyx_INCREF(Py_None); __pyx_v_cached_typ = Py_None; /* "pandas/src/reduce.pyx":82 * object cached_typ = None * * arr = self.arr # <<<<<<<<<<<<<< * chunk = self.dummy * dummy_buf = chunk.data */ if (!(likely(((__pyx_v_self->arr) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_self->arr, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_1 = __pyx_v_self->arr; __Pyx_INCREF(__pyx_t_1); __pyx_v_arr = ((PyArrayObject *)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/reduce.pyx":83 * * arr = self.arr * chunk = self.dummy # <<<<<<<<<<<<<< * dummy_buf = chunk.data * chunk.data = arr.data */ if (!(likely(((__pyx_v_self->dummy) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_self->dummy, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_1 = __pyx_v_self->dummy; __Pyx_INCREF(__pyx_t_1); __pyx_v_chunk = ((PyArrayObject *)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/reduce.pyx":84 * arr = self.arr * chunk = self.dummy * dummy_buf = chunk.data # <<<<<<<<<<<<<< * chunk.data = arr.data * labels = self.labels */ __pyx_t_2 = __pyx_v_chunk->data; __pyx_v_dummy_buf = __pyx_t_2; /* "pandas/src/reduce.pyx":85 * chunk = self.dummy * dummy_buf = chunk.data * chunk.data = arr.data # <<<<<<<<<<<<<< * labels = self.labels * index = self.index */ __pyx_t_2 = __pyx_v_arr->data; __pyx_v_chunk->data = __pyx_t_2; /* "pandas/src/reduce.pyx":86 * dummy_buf = chunk.data * chunk.data = arr.data * labels = self.labels # <<<<<<<<<<<<<< * index = self.index * incr = self.increment */ __pyx_t_1 = __pyx_v_self->labels; __Pyx_INCREF(__pyx_t_1); __pyx_v_labels = __pyx_t_1; __pyx_t_1 = 0; /* "pandas/src/reduce.pyx":87 * chunk.data = arr.data * labels = self.labels * index = self.index # <<<<<<<<<<<<<< * incr = self.increment * */ __pyx_t_1 = __pyx_v_self->index; __Pyx_INCREF(__pyx_t_1); __pyx_v_index = __pyx_t_1; __pyx_t_1 = 0; /* "pandas/src/reduce.pyx":88 * labels = self.labels * index = self.index * incr = self.increment # <<<<<<<<<<<<<< * * try: */ __pyx_t_3 = __pyx_v_self->increment; __pyx_v_incr = __pyx_t_3; /* "pandas/src/reduce.pyx":90 * incr = self.increment * * try: # <<<<<<<<<<<<<< * for i in range(self.nresults): * */ /*try:*/ { { __Pyx_ExceptionSave(&__pyx_t_4, &__pyx_t_5, &__pyx_t_6); __Pyx_XGOTREF(__pyx_t_4); __Pyx_XGOTREF(__pyx_t_5); __Pyx_XGOTREF(__pyx_t_6); /*try:*/ { /* "pandas/src/reduce.pyx":91 * * try: * for i in range(self.nresults): # <<<<<<<<<<<<<< * * if labels is not None: */ __pyx_t_3 = __pyx_v_self->nresults; for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_3; __pyx_t_7+=1) { __pyx_v_i = __pyx_t_7; /* "pandas/src/reduce.pyx":93 * for i in range(self.nresults): * * if labels is not None: # <<<<<<<<<<<<<< * name = util.get_value_at(labels, i) * else: */ __pyx_t_8 = (__pyx_v_labels != Py_None); __pyx_t_9 = (__pyx_t_8 != 0); if (__pyx_t_9) { /* "pandas/src/reduce.pyx":94 * * if labels is not None: * name = util.get_value_at(labels, i) # <<<<<<<<<<<<<< * else: * name = None */ if (!(likely(((__pyx_v_labels) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_labels, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 94; __pyx_clineno = __LINE__; goto __pyx_L6_error;} __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_i); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 94; __pyx_clineno = __LINE__; goto __pyx_L6_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_10 = __pyx_f_4util_get_value_at(((PyArrayObject *)__pyx_v_labels), __pyx_t_1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 94; __pyx_clineno = __LINE__; goto __pyx_L6_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF_SET(__pyx_v_name, __pyx_t_10); __pyx_t_10 = 0; goto __pyx_L16; } /*else*/ { /* "pandas/src/reduce.pyx":96 * name = util.get_value_at(labels, i) * else: * name = None # <<<<<<<<<<<<<< * * # create the cached type */ __Pyx_INCREF(Py_None); __Pyx_XDECREF_SET(__pyx_v_name, Py_None); } __pyx_L16:; /* "pandas/src/reduce.pyx":100 * # create the cached type * # each time just reassign the data * if i == 0: # <<<<<<<<<<<<<< * * if self.typ is not None: */ __pyx_t_9 = ((__pyx_v_i == 0) != 0); if (__pyx_t_9) { /* "pandas/src/reduce.pyx":102 * if i == 0: * * if self.typ is not None: # <<<<<<<<<<<<<< * * # recreate with the index if supplied */ __pyx_t_9 = (__pyx_v_self->typ != Py_None); __pyx_t_8 = (__pyx_t_9 != 0); if (__pyx_t_8) { /* "pandas/src/reduce.pyx":105 * * # recreate with the index if supplied * if index is not None: # <<<<<<<<<<<<<< * * cached_typ = self.typ(chunk, index=index, name=name) */ __pyx_t_8 = (__pyx_v_index != Py_None); __pyx_t_9 = (__pyx_t_8 != 0); if (__pyx_t_9) { /* "pandas/src/reduce.pyx":107 * if index is not None: * * cached_typ = self.typ(chunk, index=index, name=name) # <<<<<<<<<<<<<< * * else: */ __pyx_t_10 = PyTuple_New(1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L6_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_INCREF(((PyObject *)__pyx_v_chunk)); PyTuple_SET_ITEM(__pyx_t_10, 0, ((PyObject *)__pyx_v_chunk)); __Pyx_GIVEREF(((PyObject *)__pyx_v_chunk)); __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L6_error;} __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_index, __pyx_v_index) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L6_error;} if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_name, __pyx_v_name) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L6_error;} __pyx_t_11 = PyObject_Call(__pyx_v_self->typ, __pyx_t_10, __pyx_t_1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L6_error;} __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF_SET(__pyx_v_cached_typ, __pyx_t_11); __pyx_t_11 = 0; goto __pyx_L19; } /*else*/ { /* "pandas/src/reduce.pyx":112 * * # use the passsed typ, sans index * cached_typ = self.typ(chunk, name=name) # <<<<<<<<<<<<<< * * # use the cached_typ if possible */ __pyx_t_11 = PyTuple_New(1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 112; __pyx_clineno = __LINE__; goto __pyx_L6_error;} __Pyx_GOTREF(__pyx_t_11); __Pyx_INCREF(((PyObject *)__pyx_v_chunk)); PyTuple_SET_ITEM(__pyx_t_11, 0, ((PyObject *)__pyx_v_chunk)); __Pyx_GIVEREF(((PyObject *)__pyx_v_chunk)); __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 112; __pyx_clineno = __LINE__; goto __pyx_L6_error;} __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_name, __pyx_v_name) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 112; __pyx_clineno = __LINE__; goto __pyx_L6_error;} __pyx_t_10 = PyObject_Call(__pyx_v_self->typ, __pyx_t_11, __pyx_t_1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 112; __pyx_clineno = __LINE__; goto __pyx_L6_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF_SET(__pyx_v_cached_typ, __pyx_t_10); __pyx_t_10 = 0; } __pyx_L19:; goto __pyx_L18; } __pyx_L18:; goto __pyx_L17; } __pyx_L17:; /* "pandas/src/reduce.pyx":115 * * # use the cached_typ if possible * if cached_typ is not None: # <<<<<<<<<<<<<< * object.__setattr__(cached_typ._data._block, 'values', chunk) * object.__setattr__(cached_typ, 'name', name) */ __pyx_t_9 = (__pyx_v_cached_typ != Py_None); __pyx_t_8 = (__pyx_t_9 != 0); if (__pyx_t_8) { /* "pandas/src/reduce.pyx":116 * # use the cached_typ if possible * if cached_typ is not None: * object.__setattr__(cached_typ._data._block, 'values', chunk) # <<<<<<<<<<<<<< * object.__setattr__(cached_typ, 'name', name) * res = self.f(cached_typ) */ __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_builtin_object, __pyx_n_s_setattr); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 116; __pyx_clineno = __LINE__; goto __pyx_L6_error;} __Pyx_GOTREF(__pyx_t_10); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_cached_typ, __pyx_n_s_data_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 116; __pyx_clineno = __LINE__; goto __pyx_L6_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_block); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 116; __pyx_clineno = __LINE__; goto __pyx_L6_error;} __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 116; __pyx_clineno = __LINE__; goto __pyx_L6_error;} __Pyx_GOTREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_11); __Pyx_GIVEREF(__pyx_t_11); __Pyx_INCREF(__pyx_n_s_values); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_n_s_values); __Pyx_GIVEREF(__pyx_n_s_values); __Pyx_INCREF(((PyObject *)__pyx_v_chunk)); PyTuple_SET_ITEM(__pyx_t_1, 2, ((PyObject *)__pyx_v_chunk)); __Pyx_GIVEREF(((PyObject *)__pyx_v_chunk)); __pyx_t_11 = 0; __pyx_t_11 = PyObject_Call(__pyx_t_10, __pyx_t_1, NULL); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 116; __pyx_clineno = __LINE__; goto __pyx_L6_error;} __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; /* "pandas/src/reduce.pyx":117 * if cached_typ is not None: * object.__setattr__(cached_typ._data._block, 'values', chunk) * object.__setattr__(cached_typ, 'name', name) # <<<<<<<<<<<<<< * res = self.f(cached_typ) * else: */ __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_builtin_object, __pyx_n_s_setattr); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 117; __pyx_clineno = __LINE__; goto __pyx_L6_error;} __Pyx_GOTREF(__pyx_t_11); __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 117; __pyx_clineno = __LINE__; goto __pyx_L6_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_cached_typ); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_cached_typ); __Pyx_GIVEREF(__pyx_v_cached_typ); __Pyx_INCREF(__pyx_n_s_name); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_n_s_name); __Pyx_GIVEREF(__pyx_n_s_name); __Pyx_INCREF(__pyx_v_name); PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_name); __Pyx_GIVEREF(__pyx_v_name); __pyx_t_10 = PyObject_Call(__pyx_t_11, __pyx_t_1, NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 117; __pyx_clineno = __LINE__; goto __pyx_L6_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; /* "pandas/src/reduce.pyx":118 * object.__setattr__(cached_typ._data._block, 'values', chunk) * object.__setattr__(cached_typ, 'name', name) * res = self.f(cached_typ) # <<<<<<<<<<<<<< * else: * res = self.f(chunk) */ __pyx_t_10 = PyTuple_New(1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 118; __pyx_clineno = __LINE__; goto __pyx_L6_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_INCREF(__pyx_v_cached_typ); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_v_cached_typ); __Pyx_GIVEREF(__pyx_v_cached_typ); __pyx_t_1 = PyObject_Call(__pyx_v_self->f, __pyx_t_10, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 118; __pyx_clineno = __LINE__; goto __pyx_L6_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_XDECREF_SET(__pyx_v_res, __pyx_t_1); __pyx_t_1 = 0; goto __pyx_L20; } /*else*/ { /* "pandas/src/reduce.pyx":120 * res = self.f(cached_typ) * else: * res = self.f(chunk) # <<<<<<<<<<<<<< * * if hasattr(res,'values'): */ __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 120; __pyx_clineno = __LINE__; goto __pyx_L6_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)__pyx_v_chunk)); PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_chunk)); __Pyx_GIVEREF(((PyObject *)__pyx_v_chunk)); __pyx_t_10 = PyObject_Call(__pyx_v_self->f, __pyx_t_1, NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 120; __pyx_clineno = __LINE__; goto __pyx_L6_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF_SET(__pyx_v_res, __pyx_t_10); __pyx_t_10 = 0; } __pyx_L20:; /* "pandas/src/reduce.pyx":122 * res = self.f(chunk) * * if hasattr(res,'values'): # <<<<<<<<<<<<<< * res = res.values * */ __pyx_t_8 = PyObject_HasAttr(__pyx_v_res, __pyx_n_s_values); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 122; __pyx_clineno = __LINE__; goto __pyx_L6_error;} __pyx_t_9 = (__pyx_t_8 != 0); if (__pyx_t_9) { /* "pandas/src/reduce.pyx":123 * * if hasattr(res,'values'): * res = res.values # <<<<<<<<<<<<<< * * if i == 0: */ __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_res, __pyx_n_s_values); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 123; __pyx_clineno = __LINE__; goto __pyx_L6_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF_SET(__pyx_v_res, __pyx_t_10); __pyx_t_10 = 0; goto __pyx_L21; } __pyx_L21:; /* "pandas/src/reduce.pyx":125 * res = res.values * * if i == 0: # <<<<<<<<<<<<<< * result = self._get_result_array(res) * it = PyArray_IterNew(result) */ __pyx_t_9 = ((__pyx_v_i == 0) != 0); if (__pyx_t_9) { /* "pandas/src/reduce.pyx":126 * * if i == 0: * result = self._get_result_array(res) # <<<<<<<<<<<<<< * it = PyArray_IterNew(result) * */ __pyx_t_10 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get_result_array); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 126; __pyx_clineno = __LINE__; goto __pyx_L6_error;} __Pyx_GOTREF(__pyx_t_10); __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 126; __pyx_clineno = __LINE__; goto __pyx_L6_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_res); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_res); __Pyx_GIVEREF(__pyx_v_res); __pyx_t_11 = PyObject_Call(__pyx_t_10, __pyx_t_1, NULL); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 126; __pyx_clineno = __LINE__; goto __pyx_L6_error;} __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (!(likely(((__pyx_t_11) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_11, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 126; __pyx_clineno = __LINE__; goto __pyx_L6_error;} __Pyx_XDECREF_SET(__pyx_v_result, ((PyArrayObject *)__pyx_t_11)); __pyx_t_11 = 0; /* "pandas/src/reduce.pyx":127 * if i == 0: * result = self._get_result_array(res) * it = PyArray_IterNew(result) # <<<<<<<<<<<<<< * * PyArray_SETITEM(result, PyArray_ITER_DATA(it), res) */ __pyx_t_11 = PyArray_IterNew(((PyObject *)__pyx_v_result)); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 127; __pyx_clineno = __LINE__; goto __pyx_L6_error;} __Pyx_GOTREF(__pyx_t_11); __pyx_t_1 = __pyx_t_11; __Pyx_INCREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_XDECREF_SET(__pyx_v_it, ((PyArrayIterObject *)__pyx_t_1)); __pyx_t_1 = 0; goto __pyx_L22; } __pyx_L22:; /* "pandas/src/reduce.pyx":129 * it = PyArray_IterNew(result) * * PyArray_SETITEM(result, PyArray_ITER_DATA(it), res) # <<<<<<<<<<<<<< * chunk.data = chunk.data + self.increment * PyArray_ITER_NEXT(it) */ if (unlikely(!__pyx_v_result)) { __Pyx_RaiseUnboundLocalError("result"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 129; __pyx_clineno = __LINE__; goto __pyx_L6_error;} } if (unlikely(!__pyx_v_it)) { __Pyx_RaiseUnboundLocalError("it"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 129; __pyx_clineno = __LINE__; goto __pyx_L6_error;} } PyArray_SETITEM(__pyx_v_result, PyArray_ITER_DATA(__pyx_v_it), __pyx_v_res); /* "pandas/src/reduce.pyx":130 * * PyArray_SETITEM(result, PyArray_ITER_DATA(it), res) * chunk.data = chunk.data + self.increment # <<<<<<<<<<<<<< * PyArray_ITER_NEXT(it) * except Exception, e: */ __pyx_v_chunk->data = (__pyx_v_chunk->data + __pyx_v_self->increment); /* "pandas/src/reduce.pyx":131 * PyArray_SETITEM(result, PyArray_ITER_DATA(it), res) * chunk.data = chunk.data + self.increment * PyArray_ITER_NEXT(it) # <<<<<<<<<<<<<< * except Exception, e: * if hasattr(e, 'args'): */ PyArray_ITER_NEXT(__pyx_v_it); } } __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; goto __pyx_L13_try_end; __pyx_L6_error:; __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/reduce.pyx":132 * chunk.data = chunk.data + self.increment * PyArray_ITER_NEXT(it) * except Exception, e: # <<<<<<<<<<<<<< * if hasattr(e, 'args'): * e.args = e.args + (i,) */ __pyx_t_12 = PyErr_ExceptionMatches(__pyx_builtin_Exception); if (__pyx_t_12) { __Pyx_AddTraceback("pandas.lib.Reducer.get_result", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_11, &__pyx_t_10) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 132; __pyx_clineno = __LINE__; goto __pyx_L8_except_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_GOTREF(__pyx_t_11); __Pyx_GOTREF(__pyx_t_10); __Pyx_INCREF(__pyx_t_11); __pyx_v_e = __pyx_t_11; /* "pandas/src/reduce.pyx":133 * PyArray_ITER_NEXT(it) * except Exception, e: * if hasattr(e, 'args'): # <<<<<<<<<<<<<< * e.args = e.args + (i,) * raise */ __pyx_t_9 = PyObject_HasAttr(__pyx_v_e, __pyx_n_s_args); if (unlikely(__pyx_t_9 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 133; __pyx_clineno = __LINE__; goto __pyx_L8_except_error;} __pyx_t_8 = (__pyx_t_9 != 0); if (__pyx_t_8) { /* "pandas/src/reduce.pyx":134 * except Exception, e: * if hasattr(e, 'args'): * e.args = e.args + (i,) # <<<<<<<<<<<<<< * raise * finally: */ __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_v_e, __pyx_n_s_args); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 134; __pyx_clineno = __LINE__; goto __pyx_L8_except_error;} __Pyx_GOTREF(__pyx_t_13); __pyx_t_14 = PyInt_FromSsize_t(__pyx_v_i); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 134; __pyx_clineno = __LINE__; goto __pyx_L8_except_error;} __Pyx_GOTREF(__pyx_t_14); __pyx_t_15 = PyTuple_New(1); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 134; __pyx_clineno = __LINE__; goto __pyx_L8_except_error;} __Pyx_GOTREF(__pyx_t_15); PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_t_14); __Pyx_GIVEREF(__pyx_t_14); __pyx_t_14 = 0; __pyx_t_14 = PyNumber_Add(__pyx_t_13, __pyx_t_15); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 134; __pyx_clineno = __LINE__; goto __pyx_L8_except_error;} __Pyx_GOTREF(__pyx_t_14); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; if (__Pyx_PyObject_SetAttrStr(__pyx_v_e, __pyx_n_s_args, __pyx_t_14) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 134; __pyx_clineno = __LINE__; goto __pyx_L8_except_error;} __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; goto __pyx_L25; } __pyx_L25:; /* "pandas/src/reduce.pyx":135 * if hasattr(e, 'args'): * e.args = e.args + (i,) * raise # <<<<<<<<<<<<<< * finally: * # so we don't free the wrong memory */ __Pyx_GIVEREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_11); __Pyx_XGIVEREF(__pyx_t_10); __Pyx_ErrRestore(__pyx_t_1, __pyx_t_11, __pyx_t_10); __pyx_t_1 = 0; __pyx_t_11 = 0; __pyx_t_10 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 135; __pyx_clineno = __LINE__; goto __pyx_L8_except_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; goto __pyx_L7_exception_handled; } goto __pyx_L8_except_error; __pyx_L8_except_error:; __Pyx_XGIVEREF(__pyx_t_4); __Pyx_XGIVEREF(__pyx_t_5); __Pyx_XGIVEREF(__pyx_t_6); __Pyx_ExceptionReset(__pyx_t_4, __pyx_t_5, __pyx_t_6); goto __pyx_L4_error; __pyx_L7_exception_handled:; __Pyx_XGIVEREF(__pyx_t_4); __Pyx_XGIVEREF(__pyx_t_5); __Pyx_XGIVEREF(__pyx_t_6); __Pyx_ExceptionReset(__pyx_t_4, __pyx_t_5, __pyx_t_6); __pyx_L13_try_end:; } } /* "pandas/src/reduce.pyx":138 * finally: * # so we don't free the wrong memory * chunk.data = dummy_buf # <<<<<<<<<<<<<< * * if result.dtype == np.object_: */ /*finally:*/ { /*normal exit:*/{ __pyx_v_chunk->data = __pyx_v_dummy_buf; goto __pyx_L5; } /*exception exit:*/{ __pyx_L4_error:; __pyx_t_6 = 0; __pyx_t_5 = 0; __pyx_t_4 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0; __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0; __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_18, &__pyx_t_19, &__pyx_t_20); if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_6, &__pyx_t_5, &__pyx_t_4) < 0)) __Pyx_ErrFetch(&__pyx_t_6, &__pyx_t_5, &__pyx_t_4); __Pyx_XGOTREF(__pyx_t_6); __Pyx_XGOTREF(__pyx_t_5); __Pyx_XGOTREF(__pyx_t_4); __Pyx_XGOTREF(__pyx_t_18); __Pyx_XGOTREF(__pyx_t_19); __Pyx_XGOTREF(__pyx_t_20); __pyx_t_12 = __pyx_lineno; __pyx_t_16 = __pyx_clineno; __pyx_t_17 = __pyx_filename; { __pyx_v_chunk->data = __pyx_v_dummy_buf; } if (PY_MAJOR_VERSION >= 3) { __Pyx_XGIVEREF(__pyx_t_18); __Pyx_XGIVEREF(__pyx_t_19); __Pyx_XGIVEREF(__pyx_t_20); __Pyx_ExceptionReset(__pyx_t_18, __pyx_t_19, __pyx_t_20); } __Pyx_XGIVEREF(__pyx_t_6); __Pyx_XGIVEREF(__pyx_t_5); __Pyx_XGIVEREF(__pyx_t_4); __Pyx_ErrRestore(__pyx_t_6, __pyx_t_5, __pyx_t_4); __pyx_t_6 = 0; __pyx_t_5 = 0; __pyx_t_4 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_lineno = __pyx_t_12; __pyx_clineno = __pyx_t_16; __pyx_filename = __pyx_t_17; goto __pyx_L1_error; } __pyx_L5:; } /* "pandas/src/reduce.pyx":140 * chunk.data = dummy_buf * * if result.dtype == np.object_: # <<<<<<<<<<<<<< * result = maybe_convert_objects(result) * */ if (unlikely(!__pyx_v_result)) { __Pyx_RaiseUnboundLocalError("result"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 140; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_10 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_result), __pyx_n_s_dtype); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 140; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __pyx_t_11 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 140; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_object_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 140; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __pyx_t_11 = PyObject_RichCompare(__pyx_t_10, __pyx_t_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_11); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 140; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_11); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 140; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; if (__pyx_t_8) { /* "pandas/src/reduce.pyx":141 * * if result.dtype == np.object_: * result = maybe_convert_objects(result) # <<<<<<<<<<<<<< * * return result */ __pyx_t_11 = __Pyx_GetModuleGlobalName(__pyx_n_s_maybe_convert_objects); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 141; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 141; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)__pyx_v_result)); PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_result)); __Pyx_GIVEREF(((PyObject *)__pyx_v_result)); __pyx_t_10 = PyObject_Call(__pyx_t_11, __pyx_t_1, NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 141; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (!(likely(((__pyx_t_10) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_10, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 141; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF_SET(__pyx_v_result, ((PyArrayObject *)__pyx_t_10)); __pyx_t_10 = 0; goto __pyx_L28; } __pyx_L28:; /* "pandas/src/reduce.pyx":143 * result = maybe_convert_objects(result) * * return result # <<<<<<<<<<<<<< * * def _get_result_array(self, object res): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_result)); __pyx_r = ((PyObject *)__pyx_v_result); goto __pyx_L0; /* "pandas/src/reduce.pyx":73 * return dummy, index * * def get_result(self): # <<<<<<<<<<<<<< * cdef: * char* dummy_buf */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_10); __Pyx_XDECREF(__pyx_t_11); __Pyx_XDECREF(__pyx_t_13); __Pyx_XDECREF(__pyx_t_14); __Pyx_XDECREF(__pyx_t_15); __Pyx_AddTraceback("pandas.lib.Reducer.get_result", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_arr); __Pyx_XDECREF((PyObject *)__pyx_v_result); __Pyx_XDECREF((PyObject *)__pyx_v_chunk); __Pyx_XDECREF((PyObject *)__pyx_v_it); __Pyx_XDECREF(__pyx_v_res); __Pyx_XDECREF(__pyx_v_name); __Pyx_XDECREF(__pyx_v_labels); __Pyx_XDECREF(__pyx_v_index); __Pyx_XDECREF(__pyx_v_cached_typ); __Pyx_XDECREF(__pyx_v_e); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/reduce.pyx":145 * return result * * def _get_result_array(self, object res): # <<<<<<<<<<<<<< * try: * assert(not isinstance(res, np.ndarray)) */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_3lib_7Reducer_7_get_result_array(PyObject *__pyx_v_self, PyObject *__pyx_v_res); /*proto*/ static PyObject *__pyx_pw_6pandas_3lib_7Reducer_7_get_result_array(PyObject *__pyx_v_self, PyObject *__pyx_v_res) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_get_result_array (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_3lib_7Reducer_6_get_result_array(((struct __pyx_obj_6pandas_3lib_Reducer *)__pyx_v_self), ((PyObject *)__pyx_v_res)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_3lib_7Reducer_6_get_result_array(struct __pyx_obj_6pandas_3lib_Reducer *__pyx_v_self, PyObject *__pyx_v_res) { PyObject *__pyx_v_result = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_t_4; Py_ssize_t __pyx_t_5; PyObject *__pyx_t_6 = NULL; Py_ssize_t __pyx_t_7; int __pyx_t_8; int __pyx_t_9; PyObject *__pyx_t_10 = NULL; PyObject *__pyx_t_11 = NULL; PyObject *__pyx_t_12 = NULL; int __pyx_t_13; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_get_result_array", 0); /* "pandas/src/reduce.pyx":146 * * def _get_result_array(self, object res): * try: # <<<<<<<<<<<<<< * assert(not isinstance(res, np.ndarray)) * assert(not (isinstance(res, list) and len(res) == len(self.dummy))) */ { __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:*/ { /* "pandas/src/reduce.pyx":147 * def _get_result_array(self, object res): * try: * assert(not isinstance(res, np.ndarray)) # <<<<<<<<<<<<<< * assert(not (isinstance(res, list) and len(res) == len(self.dummy))) * */ #ifndef CYTHON_WITHOUT_ASSERTIONS if (unlikely(!Py_OptimizeFlag)) { __pyx_t_4 = __Pyx_TypeCheck(__pyx_v_res, ((PyObject*)__pyx_ptype_5numpy_ndarray)); if (unlikely(!((!(__pyx_t_4 != 0)) != 0))) { PyErr_SetNone(PyExc_AssertionError); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 147; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } #endif /* "pandas/src/reduce.pyx":148 * try: * assert(not isinstance(res, np.ndarray)) * assert(not (isinstance(res, list) and len(res) == len(self.dummy))) # <<<<<<<<<<<<<< * * result = np.empty(self.nresults, dtype='O') */ #ifndef CYTHON_WITHOUT_ASSERTIONS if (unlikely(!Py_OptimizeFlag)) { __pyx_t_4 = PyList_Check(__pyx_v_res); if ((__pyx_t_4 != 0)) { __pyx_t_5 = PyObject_Length(__pyx_v_res); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 148; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_t_6 = __pyx_v_self->dummy; __Pyx_INCREF(__pyx_t_6); __pyx_t_7 = PyObject_Length(__pyx_t_6); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 148; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_8 = ((__pyx_t_5 == __pyx_t_7) != 0); __pyx_t_9 = __pyx_t_8; } else { __pyx_t_9 = (__pyx_t_4 != 0); } if (unlikely(!((!__pyx_t_9) != 0))) { PyErr_SetNone(PyExc_AssertionError); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 148; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } #endif /* "pandas/src/reduce.pyx":150 * assert(not (isinstance(res, list) and len(res) == len(self.dummy))) * * result = np.empty(self.nresults, dtype='O') # <<<<<<<<<<<<<< * result[0] = res * except Exception: */ __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 150; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_empty); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 150; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyInt_FromSsize_t(__pyx_v_self->nresults); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 150; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_11 = PyTuple_New(1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 150; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyDict_New(); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 150; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_6); if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_dtype, __pyx_n_s_O) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 150; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_t_12 = PyObject_Call(__pyx_t_10, __pyx_t_11, __pyx_t_6); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 150; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_v_result = __pyx_t_12; __pyx_t_12 = 0; /* "pandas/src/reduce.pyx":151 * * result = np.empty(self.nresults, dtype='O') * result[0] = res # <<<<<<<<<<<<<< * except Exception: * raise ValueError('function does not reduce') */ if (unlikely(__Pyx_SetItemInt(__pyx_v_result, 0, __pyx_v_res, long, 1, __Pyx_PyInt_From_long, 0, 0, 1) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 151; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L10_try_end; __pyx_L3_error:; __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; /* "pandas/src/reduce.pyx":152 * result = np.empty(self.nresults, dtype='O') * result[0] = res * except Exception: # <<<<<<<<<<<<<< * raise ValueError('function does not reduce') * return result */ __pyx_t_13 = PyErr_ExceptionMatches(__pyx_builtin_Exception); if (__pyx_t_13) { __Pyx_AddTraceback("pandas.lib.Reducer._get_result_array", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_12, &__pyx_t_6, &__pyx_t_11) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 152; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} __Pyx_GOTREF(__pyx_t_12); __Pyx_GOTREF(__pyx_t_6); __Pyx_GOTREF(__pyx_t_11); /* "pandas/src/reduce.pyx":153 * result[0] = res * except Exception: * raise ValueError('function does not reduce') # <<<<<<<<<<<<<< * return result * */ __pyx_t_10 = PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__15, NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 153; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_Raise(__pyx_t_10, 0, 0, 0); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 153; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; goto __pyx_L4_exception_handled; } goto __pyx_L5_except_error; __pyx_L5_except_error:; __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); goto __pyx_L1_error; __pyx_L4_exception_handled:; __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); __pyx_L10_try_end:; } /* "pandas/src/reduce.pyx":154 * except Exception: * raise ValueError('function does not reduce') * return result # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_result); __pyx_r = __pyx_v_result; goto __pyx_L0; /* "pandas/src/reduce.pyx":145 * return result * * def _get_result_array(self, object res): # <<<<<<<<<<<<<< * try: * assert(not isinstance(res, np.ndarray)) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_10); __Pyx_XDECREF(__pyx_t_11); __Pyx_XDECREF(__pyx_t_12); __Pyx_AddTraceback("pandas.lib.Reducer._get_result_array", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_result); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/reduce.pyx":168 * object arr, index, dummy_arr, dummy_index, values, f, bins, typ, name * * def __init__(self, object series, object f, object bins, object dummy): # <<<<<<<<<<<<<< * n = len(series) * */ /* Python wrapper */ static int __pyx_pw_6pandas_3lib_16SeriesBinGrouper_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_pw_6pandas_3lib_16SeriesBinGrouper_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_series = 0; PyObject *__pyx_v_f = 0; PyObject *__pyx_v_bins = 0; PyObject *__pyx_v_dummy = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_series,&__pyx_n_s_f,&__pyx_n_s_bins,&__pyx_n_s_dummy,0}; PyObject* values[4] = {0,0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_series)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_f)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("__init__", 1, 4, 4, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_bins)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("__init__", 1, 4, 4, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_dummy)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("__init__", 1, 4, 4, 3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 4) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[3] = PyTuple_GET_ITEM(__pyx_args, 3); } __pyx_v_series = values[0]; __pyx_v_f = values[1]; __pyx_v_bins = values[2]; __pyx_v_dummy = values[3]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("__init__", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.lib.SeriesBinGrouper.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return -1; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pandas_3lib_16SeriesBinGrouper___init__(((struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *)__pyx_v_self), __pyx_v_series, __pyx_v_f, __pyx_v_bins, __pyx_v_dummy); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pandas_3lib_16SeriesBinGrouper___init__(struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *__pyx_v_self, PyObject *__pyx_v_series, PyObject *__pyx_v_f, PyObject *__pyx_v_bins, PyObject *__pyx_v_dummy) { CYTHON_UNUSED Py_ssize_t __pyx_v_n; PyObject *__pyx_v_values = NULL; int __pyx_r; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_t_4; int __pyx_t_5; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *(*__pyx_t_8)(PyObject *); int __pyx_t_9; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__init__", 0); /* "pandas/src/reduce.pyx":169 * * def __init__(self, object series, object f, object bins, object dummy): * n = len(series) # <<<<<<<<<<<<<< * * self.bins = bins */ __pyx_t_1 = PyObject_Length(__pyx_v_series); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 169; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/src/reduce.pyx":171 * n = len(series) * * self.bins = bins # <<<<<<<<<<<<<< * self.f = f * */ __Pyx_INCREF(__pyx_v_bins); __Pyx_GIVEREF(__pyx_v_bins); __Pyx_GOTREF(__pyx_v_self->bins); __Pyx_DECREF(__pyx_v_self->bins); __pyx_v_self->bins = __pyx_v_bins; /* "pandas/src/reduce.pyx":172 * * self.bins = bins * self.f = f # <<<<<<<<<<<<<< * * values = series.values */ __Pyx_INCREF(__pyx_v_f); __Pyx_GIVEREF(__pyx_v_f); __Pyx_GOTREF(__pyx_v_self->f); __Pyx_DECREF(__pyx_v_self->f); __pyx_v_self->f = __pyx_v_f; /* "pandas/src/reduce.pyx":174 * self.f = f * * values = series.values # <<<<<<<<<<<<<< * if not values.flags.c_contiguous: * values = values.copy('C') */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_series, __pyx_n_s_values); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 174; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_v_values = __pyx_t_2; __pyx_t_2 = 0; /* "pandas/src/reduce.pyx":175 * * values = series.values * if not values.flags.c_contiguous: # <<<<<<<<<<<<<< * values = values.copy('C') * self.arr = values */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_values, __pyx_n_s_flags); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 175; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_c_contiguous); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 175; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 175; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_5 = ((!__pyx_t_4) != 0); if (__pyx_t_5) { /* "pandas/src/reduce.pyx":176 * values = series.values * if not values.flags.c_contiguous: * values = values.copy('C') # <<<<<<<<<<<<<< * self.arr = values * self.index = series.index */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_values, __pyx_n_s_copy); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 176; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = PyObject_Call(__pyx_t_3, __pyx_tuple__16, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 176; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF_SET(__pyx_v_values, __pyx_t_2); __pyx_t_2 = 0; goto __pyx_L3; } __pyx_L3:; /* "pandas/src/reduce.pyx":177 * if not values.flags.c_contiguous: * values = values.copy('C') * self.arr = values # <<<<<<<<<<<<<< * self.index = series.index * self.typ = type(series) */ __Pyx_INCREF(__pyx_v_values); __Pyx_GIVEREF(__pyx_v_values); __Pyx_GOTREF(__pyx_v_self->arr); __Pyx_DECREF(__pyx_v_self->arr); __pyx_v_self->arr = __pyx_v_values; /* "pandas/src/reduce.pyx":178 * values = values.copy('C') * self.arr = values * self.index = series.index # <<<<<<<<<<<<<< * self.typ = type(series) * self.name = getattr(series,'name',None) */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_series, __pyx_n_s_index); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 178; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __Pyx_GOTREF(__pyx_v_self->index); __Pyx_DECREF(__pyx_v_self->index); __pyx_v_self->index = __pyx_t_2; __pyx_t_2 = 0; /* "pandas/src/reduce.pyx":179 * self.arr = values * self.index = series.index * self.typ = type(series) # <<<<<<<<<<<<<< * self.name = getattr(series,'name',None) * */ __Pyx_INCREF(((PyObject *)Py_TYPE(__pyx_v_series))); __Pyx_GIVEREF(((PyObject *)Py_TYPE(__pyx_v_series))); __Pyx_GOTREF(__pyx_v_self->typ); __Pyx_DECREF(__pyx_v_self->typ); __pyx_v_self->typ = ((PyObject *)Py_TYPE(__pyx_v_series)); /* "pandas/src/reduce.pyx":180 * self.index = series.index * self.typ = type(series) * self.name = getattr(series,'name',None) # <<<<<<<<<<<<<< * * self.dummy_arr, self.dummy_index = self._check_dummy(dummy) */ __pyx_t_2 = __Pyx_GetAttr3(__pyx_v_series, __pyx_n_s_name, Py_None); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __Pyx_GOTREF(__pyx_v_self->name); __Pyx_DECREF(__pyx_v_self->name); __pyx_v_self->name = __pyx_t_2; __pyx_t_2 = 0; /* "pandas/src/reduce.pyx":182 * self.name = getattr(series,'name',None) * * self.dummy_arr, self.dummy_index = self._check_dummy(dummy) # <<<<<<<<<<<<<< * self.passed_dummy = dummy is not None * */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_check_dummy); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 182; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 182; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_v_dummy); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_dummy); __Pyx_GIVEREF(__pyx_v_dummy); __pyx_t_6 = PyObject_Call(__pyx_t_2, __pyx_t_3, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 182; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if ((likely(PyTuple_CheckExact(__pyx_t_6))) || (PyList_CheckExact(__pyx_t_6))) { PyObject* sequence = __pyx_t_6; #if CYTHON_COMPILING_IN_CPYTHON Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 182; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_2 = PyTuple_GET_ITEM(sequence, 1); } else { __pyx_t_3 = PyList_GET_ITEM(sequence, 0); __pyx_t_2 = PyList_GET_ITEM(sequence, 1); } __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(__pyx_t_2); #else __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 182; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 182; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); #endif __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } else { Py_ssize_t index = -1; __pyx_t_7 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 182; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_8 = Py_TYPE(__pyx_t_7)->tp_iternext; index = 0; __pyx_t_3 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_3)) goto __pyx_L4_unpacking_failed; __Pyx_GOTREF(__pyx_t_3); index = 1; __pyx_t_2 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_2)) goto __pyx_L4_unpacking_failed; __Pyx_GOTREF(__pyx_t_2); if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_7), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 182; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_8 = NULL; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; goto __pyx_L5_unpacking_done; __pyx_L4_unpacking_failed:; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_8 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 182; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_L5_unpacking_done:; } __Pyx_GIVEREF(__pyx_t_3); __Pyx_GOTREF(__pyx_v_self->dummy_arr); __Pyx_DECREF(__pyx_v_self->dummy_arr); __pyx_v_self->dummy_arr = __pyx_t_3; __pyx_t_3 = 0; __Pyx_GIVEREF(__pyx_t_2); __Pyx_GOTREF(__pyx_v_self->dummy_index); __Pyx_DECREF(__pyx_v_self->dummy_index); __pyx_v_self->dummy_index = __pyx_t_2; __pyx_t_2 = 0; /* "pandas/src/reduce.pyx":183 * * self.dummy_arr, self.dummy_index = self._check_dummy(dummy) * self.passed_dummy = dummy is not None # <<<<<<<<<<<<<< * * # kludge for #1688 */ __pyx_t_5 = (__pyx_v_dummy != Py_None); __pyx_v_self->passed_dummy = __pyx_t_5; /* "pandas/src/reduce.pyx":186 * * # kludge for #1688 * if len(bins) > 0 and bins[-1] == len(series): # <<<<<<<<<<<<<< * self.ngroups = len(bins) * else: */ __pyx_t_1 = PyObject_Length(__pyx_v_bins); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 186; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_5 = (__pyx_t_1 > 0); if (__pyx_t_5) { __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_bins, -1, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(__pyx_t_6 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 186; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_6); __pyx_t_1 = PyObject_Length(__pyx_v_series); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 186; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_2 = PyInt_FromSsize_t(__pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 186; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyObject_RichCompare(__pyx_t_6, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 186; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 186; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_9 = __pyx_t_4; } else { __pyx_t_9 = __pyx_t_5; } if (__pyx_t_9) { /* "pandas/src/reduce.pyx":187 * # kludge for #1688 * if len(bins) > 0 and bins[-1] == len(series): * self.ngroups = len(bins) # <<<<<<<<<<<<<< * else: * self.ngroups = len(bins) + 1 */ __pyx_t_1 = PyObject_Length(__pyx_v_bins); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 187; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_self->ngroups = __pyx_t_1; goto __pyx_L6; } /*else*/ { /* "pandas/src/reduce.pyx":189 * self.ngroups = len(bins) * else: * self.ngroups = len(bins) + 1 # <<<<<<<<<<<<<< * * def _check_dummy(self, dummy=None): */ __pyx_t_1 = PyObject_Length(__pyx_v_bins); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 189; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_self->ngroups = (__pyx_t_1 + 1); } __pyx_L6:; /* "pandas/src/reduce.pyx":168 * object arr, index, dummy_arr, dummy_index, values, f, bins, typ, name * * def __init__(self, object series, object f, object bins, object dummy): # <<<<<<<<<<<<<< * n = len(series) * */ /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_AddTraceback("pandas.lib.SeriesBinGrouper.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_XDECREF(__pyx_v_values); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/reduce.pyx":191 * self.ngroups = len(bins) + 1 * * def _check_dummy(self, dummy=None): # <<<<<<<<<<<<<< * if dummy is None: * values = np.empty(0, dtype=self.arr.dtype) */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_3lib_16SeriesBinGrouper_3_check_dummy(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_6pandas_3lib_16SeriesBinGrouper_3_check_dummy(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_dummy = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_check_dummy (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_dummy,0}; PyObject* values[1] = {0}; values[0] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_dummy); if (value) { values[0] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_check_dummy") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 191; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_dummy = values[0]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("_check_dummy", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 191; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.lib.SeriesBinGrouper._check_dummy", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pandas_3lib_16SeriesBinGrouper_2_check_dummy(((struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *)__pyx_v_self), __pyx_v_dummy); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_3lib_16SeriesBinGrouper_2_check_dummy(struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *__pyx_v_self, PyObject *__pyx_v_dummy) { PyObject *__pyx_v_values = NULL; PyObject *__pyx_v_index = 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_check_dummy", 0); /* "pandas/src/reduce.pyx":192 * * def _check_dummy(self, dummy=None): * if dummy is None: # <<<<<<<<<<<<<< * values = np.empty(0, dtype=self.arr.dtype) * index = None */ __pyx_t_1 = (__pyx_v_dummy == Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { /* "pandas/src/reduce.pyx":193 * def _check_dummy(self, dummy=None): * if dummy is None: * values = np.empty(0, dtype=self.arr.dtype) # <<<<<<<<<<<<<< * index = None * else: */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 193; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_empty); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 193; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 193; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->arr, __pyx_n_s_dtype); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 193; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dtype, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 193; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyObject_Call(__pyx_t_4, __pyx_tuple__17, __pyx_t_3); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 193; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_values = __pyx_t_5; __pyx_t_5 = 0; /* "pandas/src/reduce.pyx":194 * if dummy is None: * values = np.empty(0, dtype=self.arr.dtype) * index = None # <<<<<<<<<<<<<< * else: * if dummy.dtype != self.arr.dtype: */ __Pyx_INCREF(Py_None); __pyx_v_index = Py_None; goto __pyx_L3; } /*else*/ { /* "pandas/src/reduce.pyx":196 * index = None * else: * if dummy.dtype != self.arr.dtype: # <<<<<<<<<<<<<< * raise ValueError('Dummy array must be same dtype') * values = dummy.values */ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_dummy, __pyx_n_s_dtype); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 196; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->arr, __pyx_n_s_dtype); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 196; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PyObject_RichCompare(__pyx_t_5, __pyx_t_3, Py_NE); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 196; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 196; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_2) { /* "pandas/src/reduce.pyx":197 * else: * if dummy.dtype != self.arr.dtype: * raise ValueError('Dummy array must be same dtype') # <<<<<<<<<<<<<< * values = dummy.values * if not values.flags.contiguous: */ __pyx_t_4 = PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__18, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 197; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 197; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } /* "pandas/src/reduce.pyx":198 * if dummy.dtype != self.arr.dtype: * raise ValueError('Dummy array must be same dtype') * values = dummy.values # <<<<<<<<<<<<<< * if not values.flags.contiguous: * values = values.copy() */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_dummy, __pyx_n_s_values); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 198; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_v_values = __pyx_t_4; __pyx_t_4 = 0; /* "pandas/src/reduce.pyx":199 * raise ValueError('Dummy array must be same dtype') * values = dummy.values * if not values.flags.contiguous: # <<<<<<<<<<<<<< * values = values.copy() * index = dummy.index */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_values, __pyx_n_s_flags); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 199; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_contiguous); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 199; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 199; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_1 = ((!__pyx_t_2) != 0); if (__pyx_t_1) { /* "pandas/src/reduce.pyx":200 * values = dummy.values * if not values.flags.contiguous: * values = values.copy() # <<<<<<<<<<<<<< * index = dummy.index * */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_values, __pyx_n_s_copy); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 200; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PyObject_Call(__pyx_t_3, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 200; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF_SET(__pyx_v_values, __pyx_t_4); __pyx_t_4 = 0; goto __pyx_L5; } __pyx_L5:; /* "pandas/src/reduce.pyx":201 * if not values.flags.contiguous: * values = values.copy() * index = dummy.index # <<<<<<<<<<<<<< * * return values, index */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_dummy, __pyx_n_s_index); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 201; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_v_index = __pyx_t_4; __pyx_t_4 = 0; } __pyx_L3:; /* "pandas/src/reduce.pyx":203 * index = dummy.index * * return values, index # <<<<<<<<<<<<<< * * def get_result(self): */ __Pyx_XDECREF(__pyx_r); __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 203; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_v_values); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_values); __Pyx_GIVEREF(__pyx_v_values); __Pyx_INCREF(__pyx_v_index); PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_index); __Pyx_GIVEREF(__pyx_v_index); __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; /* "pandas/src/reduce.pyx":191 * self.ngroups = len(bins) + 1 * * def _check_dummy(self, dummy=None): # <<<<<<<<<<<<<< * if dummy is None: * values = np.empty(0, dtype=self.arr.dtype) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("pandas.lib.SeriesBinGrouper._check_dummy", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_values); __Pyx_XDECREF(__pyx_v_index); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/reduce.pyx":205 * return values, index * * def get_result(self): # <<<<<<<<<<<<<< * cdef: * ndarray arr, result */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_3lib_16SeriesBinGrouper_5get_result(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static PyObject *__pyx_pw_6pandas_3lib_16SeriesBinGrouper_5get_result(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("get_result (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_3lib_16SeriesBinGrouper_4get_result(((struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_3lib_16SeriesBinGrouper_4get_result(struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *__pyx_v_self) { PyArrayObject *__pyx_v_result = 0; PyArrayObject *__pyx_v_counts = 0; Py_ssize_t __pyx_v_i; CYTHON_UNUSED Py_ssize_t __pyx_v_n; Py_ssize_t __pyx_v_group_size; PyObject *__pyx_v_res = 0; int __pyx_v_initialized; struct __pyx_obj_6pandas_3lib_Slider *__pyx_v_vslider = 0; struct __pyx_obj_6pandas_3lib_Slider *__pyx_v_islider = 0; PyObject *__pyx_v_gin = 0; PyObject *__pyx_v_name = 0; PyObject *__pyx_v_cached_typ = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_counts; __Pyx_Buffer __pyx_pybuffer_counts; 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; int __pyx_t_11; __pyx_t_5numpy_int64_t __pyx_t_12; long __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; int __pyx_t_19; int __pyx_t_20; char const *__pyx_t_21; PyObject *__pyx_t_22 = NULL; PyObject *__pyx_t_23 = NULL; PyObject *__pyx_t_24 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_result", 0); __pyx_pybuffer_counts.pybuffer.buf = NULL; __pyx_pybuffer_counts.refcount = 0; __pyx_pybuffernd_counts.data = NULL; __pyx_pybuffernd_counts.rcbuffer = &__pyx_pybuffer_counts; /* "pandas/src/reduce.pyx":211 * Py_ssize_t i, n, group_size * object res * bint initialized = 0 # <<<<<<<<<<<<<< * Slider vslider, islider * object gin, typ, name */ __pyx_v_initialized = 0; /* "pandas/src/reduce.pyx":214 * Slider vslider, islider * object gin, typ, name * object cached_typ = None # <<<<<<<<<<<<<< * * counts = np.zeros(self.ngroups, dtype=np.int64) */ __Pyx_INCREF(Py_None); __pyx_v_cached_typ = Py_None; /* "pandas/src/reduce.pyx":216 * object cached_typ = None * * counts = np.zeros(self.ngroups, dtype=np.int64) # <<<<<<<<<<<<<< * * if self.ngroups > 0: */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 216; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_zeros); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 216; __pyx_clineno = __LINE__; goto __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_self->ngroups); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 216; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 216; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 216; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 216; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_int64); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 216; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 216; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyObject_Call(__pyx_t_2, __pyx_t_3, __pyx_t_1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 216; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 216; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_6 = ((PyArrayObject *)__pyx_t_5); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_counts.rcbuffer->pybuffer); __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_counts.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_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_counts.rcbuffer->pybuffer, (PyObject*)__pyx_v_counts, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_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_pybuffernd_counts.diminfo[0].strides = __pyx_pybuffernd_counts.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_counts.diminfo[0].shape = __pyx_pybuffernd_counts.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 216; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_6 = 0; __pyx_v_counts = ((PyArrayObject *)__pyx_t_5); __pyx_t_5 = 0; /* "pandas/src/reduce.pyx":218 * counts = np.zeros(self.ngroups, dtype=np.int64) * * if self.ngroups > 0: # <<<<<<<<<<<<<< * counts[0] = self.bins[0] * for i in range(1, self.ngroups): */ __pyx_t_11 = ((__pyx_v_self->ngroups > 0) != 0); if (__pyx_t_11) { /* "pandas/src/reduce.pyx":219 * * if self.ngroups > 0: * counts[0] = self.bins[0] # <<<<<<<<<<<<<< * for i in range(1, self.ngroups): * if i == self.ngroups - 1: */ __pyx_t_5 = __Pyx_GetItemInt(__pyx_v_self->bins, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_5 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 219; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_5); __pyx_t_12 = __Pyx_PyInt_As_npy_int64(__pyx_t_5); if (unlikely((__pyx_t_12 == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 219; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_13 = 0; __pyx_t_7 = -1; if (__pyx_t_13 < 0) { __pyx_t_13 += __pyx_pybuffernd_counts.diminfo[0].shape; if (unlikely(__pyx_t_13 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_13 >= __pyx_pybuffernd_counts.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 219; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_counts.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_counts.diminfo[0].strides) = __pyx_t_12; /* "pandas/src/reduce.pyx":220 * if self.ngroups > 0: * counts[0] = self.bins[0] * for i in range(1, self.ngroups): # <<<<<<<<<<<<<< * if i == self.ngroups - 1: * counts[i] = len(self.arr) - self.bins[i-1] */ __pyx_t_14 = __pyx_v_self->ngroups; for (__pyx_t_15 = 1; __pyx_t_15 < __pyx_t_14; __pyx_t_15+=1) { __pyx_v_i = __pyx_t_15; /* "pandas/src/reduce.pyx":221 * counts[0] = self.bins[0] * for i in range(1, self.ngroups): * if i == self.ngroups - 1: # <<<<<<<<<<<<<< * counts[i] = len(self.arr) - self.bins[i-1] * else: */ __pyx_t_11 = ((__pyx_v_i == (__pyx_v_self->ngroups - 1)) != 0); if (__pyx_t_11) { /* "pandas/src/reduce.pyx":222 * for i in range(1, self.ngroups): * if i == self.ngroups - 1: * counts[i] = len(self.arr) - self.bins[i-1] # <<<<<<<<<<<<<< * else: * counts[i] = self.bins[i] - self.bins[i-1] */ __pyx_t_5 = __pyx_v_self->arr; __Pyx_INCREF(__pyx_t_5); __pyx_t_16 = PyObject_Length(__pyx_t_5); if (unlikely(__pyx_t_16 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 222; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyInt_FromSsize_t(__pyx_t_16); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 222; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_16 = (__pyx_v_i - 1); __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_self->bins, __pyx_t_16, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 222; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = PyNumber_Subtract(__pyx_t_5, __pyx_t_1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 222; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_12 = __Pyx_PyInt_As_npy_int64(__pyx_t_3); if (unlikely((__pyx_t_12 == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 222; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_16 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_16 < 0) { __pyx_t_16 += __pyx_pybuffernd_counts.diminfo[0].shape; if (unlikely(__pyx_t_16 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_16 >= __pyx_pybuffernd_counts.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 222; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_counts.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_counts.diminfo[0].strides) = __pyx_t_12; goto __pyx_L6; } /*else*/ { /* "pandas/src/reduce.pyx":224 * counts[i] = len(self.arr) - self.bins[i-1] * else: * counts[i] = self.bins[i] - self.bins[i-1] # <<<<<<<<<<<<<< * * group_size = 0 */ __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_self->bins, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(__pyx_t_3 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 224; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_3); __pyx_t_17 = (__pyx_v_i - 1); __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_self->bins, __pyx_t_17, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 224; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_1); __pyx_t_5 = PyNumber_Subtract(__pyx_t_3, __pyx_t_1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 224; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_12 = __Pyx_PyInt_As_npy_int64(__pyx_t_5); if (unlikely((__pyx_t_12 == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 224; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_17 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_17 < 0) { __pyx_t_17 += __pyx_pybuffernd_counts.diminfo[0].shape; if (unlikely(__pyx_t_17 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_17 >= __pyx_pybuffernd_counts.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 224; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_counts.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_counts.diminfo[0].strides) = __pyx_t_12; } __pyx_L6:; } goto __pyx_L3; } __pyx_L3:; /* "pandas/src/reduce.pyx":226 * counts[i] = self.bins[i] - self.bins[i-1] * * group_size = 0 # <<<<<<<<<<<<<< * n = len(self.arr) * name = self.name */ __pyx_v_group_size = 0; /* "pandas/src/reduce.pyx":227 * * group_size = 0 * n = len(self.arr) # <<<<<<<<<<<<<< * name = self.name * */ __pyx_t_5 = __pyx_v_self->arr; __Pyx_INCREF(__pyx_t_5); __pyx_t_14 = PyObject_Length(__pyx_t_5); if (unlikely(__pyx_t_14 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 227; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_v_n = __pyx_t_14; /* "pandas/src/reduce.pyx":228 * group_size = 0 * n = len(self.arr) * name = self.name # <<<<<<<<<<<<<< * * vslider = Slider(self.arr, self.dummy_arr) */ __pyx_t_5 = __pyx_v_self->name; __Pyx_INCREF(__pyx_t_5); __pyx_v_name = __pyx_t_5; __pyx_t_5 = 0; /* "pandas/src/reduce.pyx":230 * name = self.name * * vslider = Slider(self.arr, self.dummy_arr) # <<<<<<<<<<<<<< * islider = Slider(self.index, self.dummy_index) * */ __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 230; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_v_self->arr); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_self->arr); __Pyx_GIVEREF(__pyx_v_self->arr); __Pyx_INCREF(__pyx_v_self->dummy_arr); PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_v_self->dummy_arr); __Pyx_GIVEREF(__pyx_v_self->dummy_arr); __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_6pandas_3lib_Slider)), __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 230; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_v_vslider = ((struct __pyx_obj_6pandas_3lib_Slider *)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/reduce.pyx":231 * * vslider = Slider(self.arr, self.dummy_arr) * islider = Slider(self.index, self.dummy_index) # <<<<<<<<<<<<<< * * gin = self.dummy_index._engine */ __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 231; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_self->index); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_self->index); __Pyx_GIVEREF(__pyx_v_self->index); __Pyx_INCREF(__pyx_v_self->dummy_index); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_self->dummy_index); __Pyx_GIVEREF(__pyx_v_self->dummy_index); __pyx_t_5 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_6pandas_3lib_Slider)), __pyx_t_1, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 231; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_islider = ((struct __pyx_obj_6pandas_3lib_Slider *)__pyx_t_5); __pyx_t_5 = 0; /* "pandas/src/reduce.pyx":233 * islider = Slider(self.index, self.dummy_index) * * gin = self.dummy_index._engine # <<<<<<<<<<<<<< * * try: */ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->dummy_index, __pyx_n_s_engine); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 233; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_v_gin = __pyx_t_5; __pyx_t_5 = 0; /* "pandas/src/reduce.pyx":235 * gin = self.dummy_index._engine * * try: # <<<<<<<<<<<<<< * for i in range(self.ngroups): * group_size = counts[i] */ /*try:*/ { { __Pyx_ExceptionSave(&__pyx_t_10, &__pyx_t_9, &__pyx_t_8); __Pyx_XGOTREF(__pyx_t_10); __Pyx_XGOTREF(__pyx_t_9); __Pyx_XGOTREF(__pyx_t_8); /*try:*/ { /* "pandas/src/reduce.pyx":236 * * try: * for i in range(self.ngroups): # <<<<<<<<<<<<<< * group_size = counts[i] * */ __pyx_t_14 = __pyx_v_self->ngroups; for (__pyx_t_15 = 0; __pyx_t_15 < __pyx_t_14; __pyx_t_15+=1) { __pyx_v_i = __pyx_t_15; /* "pandas/src/reduce.pyx":237 * try: * for i in range(self.ngroups): * group_size = counts[i] # <<<<<<<<<<<<<< * * islider.set_length(group_size) */ __pyx_t_18 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_18 < 0) { __pyx_t_18 += __pyx_pybuffernd_counts.diminfo[0].shape; if (unlikely(__pyx_t_18 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_18 >= __pyx_pybuffernd_counts.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 237; __pyx_clineno = __LINE__; goto __pyx_L10_error;} } __pyx_v_group_size = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_counts.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_counts.diminfo[0].strides)); /* "pandas/src/reduce.pyx":239 * group_size = counts[i] * * islider.set_length(group_size) # <<<<<<<<<<<<<< * vslider.set_length(group_size) * */ __pyx_t_5 = ((struct __pyx_vtabstruct_6pandas_3lib_Slider *)__pyx_v_islider->__pyx_vtab)->set_length(__pyx_v_islider, __pyx_v_group_size, 0); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 239; __pyx_clineno = __LINE__; goto __pyx_L10_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "pandas/src/reduce.pyx":240 * * islider.set_length(group_size) * vslider.set_length(group_size) # <<<<<<<<<<<<<< * * if cached_typ is None: */ __pyx_t_5 = ((struct __pyx_vtabstruct_6pandas_3lib_Slider *)__pyx_v_vslider->__pyx_vtab)->set_length(__pyx_v_vslider, __pyx_v_group_size, 0); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 240; __pyx_clineno = __LINE__; goto __pyx_L10_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "pandas/src/reduce.pyx":242 * vslider.set_length(group_size) * * if cached_typ is None: # <<<<<<<<<<<<<< * cached_typ = self.typ(vslider.buf, index=islider.buf, * name=name) */ __pyx_t_11 = (__pyx_v_cached_typ == Py_None); __pyx_t_19 = (__pyx_t_11 != 0); if (__pyx_t_19) { /* "pandas/src/reduce.pyx":243 * * if cached_typ is None: * cached_typ = self.typ(vslider.buf, index=islider.buf, # <<<<<<<<<<<<<< * name=name) * else: */ __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L10_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(((PyObject *)__pyx_v_vslider->buf)); PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_v_vslider->buf)); __Pyx_GIVEREF(((PyObject *)__pyx_v_vslider->buf)); __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L10_error;} __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_index, ((PyObject *)__pyx_v_islider->buf)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L10_error;} /* "pandas/src/reduce.pyx":244 * if cached_typ is None: * cached_typ = self.typ(vslider.buf, index=islider.buf, * name=name) # <<<<<<<<<<<<<< * else: * object.__setattr__(cached_typ._data._block, 'values', vslider.buf) */ if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_name, __pyx_v_name) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L10_error;} /* "pandas/src/reduce.pyx":243 * * if cached_typ is None: * cached_typ = self.typ(vslider.buf, index=islider.buf, # <<<<<<<<<<<<<< * name=name) * else: */ __pyx_t_3 = PyObject_Call(__pyx_v_self->typ, __pyx_t_5, __pyx_t_1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L10_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF_SET(__pyx_v_cached_typ, __pyx_t_3); __pyx_t_3 = 0; goto __pyx_L20; } /*else*/ { /* "pandas/src/reduce.pyx":246 * name=name) * else: * object.__setattr__(cached_typ._data._block, 'values', vslider.buf) # <<<<<<<<<<<<<< * object.__setattr__(cached_typ, '_index', islider.buf) * object.__setattr__(cached_typ, 'name', name) */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_builtin_object, __pyx_n_s_setattr); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 246; __pyx_clineno = __LINE__; goto __pyx_L10_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_cached_typ, __pyx_n_s_data_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 246; __pyx_clineno = __LINE__; goto __pyx_L10_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_block); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 246; __pyx_clineno = __LINE__; goto __pyx_L10_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 246; __pyx_clineno = __LINE__; goto __pyx_L10_error;} __Pyx_GOTREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __Pyx_INCREF(__pyx_n_s_values); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_n_s_values); __Pyx_GIVEREF(__pyx_n_s_values); __Pyx_INCREF(((PyObject *)__pyx_v_vslider->buf)); PyTuple_SET_ITEM(__pyx_t_1, 2, ((PyObject *)__pyx_v_vslider->buf)); __Pyx_GIVEREF(((PyObject *)__pyx_v_vslider->buf)); __pyx_t_5 = 0; __pyx_t_5 = PyObject_Call(__pyx_t_3, __pyx_t_1, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 246; __pyx_clineno = __LINE__; goto __pyx_L10_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "pandas/src/reduce.pyx":247 * else: * object.__setattr__(cached_typ._data._block, 'values', vslider.buf) * object.__setattr__(cached_typ, '_index', islider.buf) # <<<<<<<<<<<<<< * object.__setattr__(cached_typ, 'name', name) * */ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_builtin_object, __pyx_n_s_setattr); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 247; __pyx_clineno = __LINE__; goto __pyx_L10_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 247; __pyx_clineno = __LINE__; goto __pyx_L10_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_cached_typ); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_cached_typ); __Pyx_GIVEREF(__pyx_v_cached_typ); __Pyx_INCREF(__pyx_n_s_index_2); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_n_s_index_2); __Pyx_GIVEREF(__pyx_n_s_index_2); __Pyx_INCREF(((PyObject *)__pyx_v_islider->buf)); PyTuple_SET_ITEM(__pyx_t_1, 2, ((PyObject *)__pyx_v_islider->buf)); __Pyx_GIVEREF(((PyObject *)__pyx_v_islider->buf)); __pyx_t_3 = PyObject_Call(__pyx_t_5, __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 247; __pyx_clineno = __LINE__; goto __pyx_L10_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/reduce.pyx":248 * object.__setattr__(cached_typ._data._block, 'values', vslider.buf) * object.__setattr__(cached_typ, '_index', islider.buf) * object.__setattr__(cached_typ, 'name', name) # <<<<<<<<<<<<<< * * res = self.f(cached_typ) */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_builtin_object, __pyx_n_s_setattr); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 248; __pyx_clineno = __LINE__; goto __pyx_L10_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 248; __pyx_clineno = __LINE__; goto __pyx_L10_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_cached_typ); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_cached_typ); __Pyx_GIVEREF(__pyx_v_cached_typ); __Pyx_INCREF(__pyx_n_s_name); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_n_s_name); __Pyx_GIVEREF(__pyx_n_s_name); __Pyx_INCREF(__pyx_v_name); PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_name); __Pyx_GIVEREF(__pyx_v_name); __pyx_t_5 = PyObject_Call(__pyx_t_3, __pyx_t_1, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 248; __pyx_clineno = __LINE__; goto __pyx_L10_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } __pyx_L20:; /* "pandas/src/reduce.pyx":250 * object.__setattr__(cached_typ, 'name', name) * * res = self.f(cached_typ) # <<<<<<<<<<<<<< * res = _extract_result(res) * if not initialized: */ __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 250; __pyx_clineno = __LINE__; goto __pyx_L10_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_v_cached_typ); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_cached_typ); __Pyx_GIVEREF(__pyx_v_cached_typ); __pyx_t_1 = PyObject_Call(__pyx_v_self->f, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 250; __pyx_clineno = __LINE__; goto __pyx_L10_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF_SET(__pyx_v_res, __pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/reduce.pyx":251 * * res = self.f(cached_typ) * res = _extract_result(res) # <<<<<<<<<<<<<< * if not initialized: * result = self._get_result_array(res) */ __pyx_t_1 = __pyx_f_6pandas_3lib__extract_result(__pyx_v_res); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 251; __pyx_clineno = __LINE__; goto __pyx_L10_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF_SET(__pyx_v_res, __pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/reduce.pyx":252 * res = self.f(cached_typ) * res = _extract_result(res) * if not initialized: # <<<<<<<<<<<<<< * result = self._get_result_array(res) * initialized = 1 */ __pyx_t_19 = ((!(__pyx_v_initialized != 0)) != 0); if (__pyx_t_19) { /* "pandas/src/reduce.pyx":253 * res = _extract_result(res) * if not initialized: * result = self._get_result_array(res) # <<<<<<<<<<<<<< * initialized = 1 * */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get_result_array); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 253; __pyx_clineno = __LINE__; goto __pyx_L10_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 253; __pyx_clineno = __LINE__; goto __pyx_L10_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_v_res); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_res); __Pyx_GIVEREF(__pyx_v_res); __pyx_t_3 = PyObject_Call(__pyx_t_1, __pyx_t_5, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 253; __pyx_clineno = __LINE__; goto __pyx_L10_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 253; __pyx_clineno = __LINE__; goto __pyx_L10_error;} __Pyx_XDECREF_SET(__pyx_v_result, ((PyArrayObject *)__pyx_t_3)); __pyx_t_3 = 0; /* "pandas/src/reduce.pyx":254 * if not initialized: * result = self._get_result_array(res) * initialized = 1 # <<<<<<<<<<<<<< * * util.assign_value_1d(result, i, res) */ __pyx_v_initialized = 1; goto __pyx_L21; } __pyx_L21:; /* "pandas/src/reduce.pyx":256 * initialized = 1 * * util.assign_value_1d(result, i, res) # <<<<<<<<<<<<<< * * islider.advance(group_size) */ if (unlikely(!__pyx_v_result)) { __Pyx_RaiseUnboundLocalError("result"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 256; __pyx_clineno = __LINE__; goto __pyx_L10_error;} } __pyx_t_7 = assign_value_1d(__pyx_v_result, __pyx_v_i, __pyx_v_res); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 256; __pyx_clineno = __LINE__; goto __pyx_L10_error;} /* "pandas/src/reduce.pyx":258 * util.assign_value_1d(result, i, res) * * islider.advance(group_size) # <<<<<<<<<<<<<< * vslider.advance(group_size) * */ __pyx_t_3 = ((struct __pyx_vtabstruct_6pandas_3lib_Slider *)__pyx_v_islider->__pyx_vtab)->advance(__pyx_v_islider, __pyx_v_group_size, 0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 258; __pyx_clineno = __LINE__; goto __pyx_L10_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/reduce.pyx":259 * * islider.advance(group_size) * vslider.advance(group_size) # <<<<<<<<<<<<<< * * gin.clear_mapping() */ __pyx_t_3 = ((struct __pyx_vtabstruct_6pandas_3lib_Slider *)__pyx_v_vslider->__pyx_vtab)->advance(__pyx_v_vslider, __pyx_v_group_size, 0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 259; __pyx_clineno = __LINE__; goto __pyx_L10_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/reduce.pyx":261 * vslider.advance(group_size) * * gin.clear_mapping() # <<<<<<<<<<<<<< * except: * raise */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_gin, __pyx_n_s_clear_mapping); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 261; __pyx_clineno = __LINE__; goto __pyx_L10_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = PyObject_Call(__pyx_t_3, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 261; __pyx_clineno = __LINE__; goto __pyx_L10_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } } __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; goto __pyx_L17_try_end; __pyx_L10_error:; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; /* "pandas/src/reduce.pyx":262 * * gin.clear_mapping() * except: # <<<<<<<<<<<<<< * raise * finally: */ /*except:*/ { __Pyx_AddTraceback("pandas.lib.SeriesBinGrouper.get_result", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_3, &__pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 262; __pyx_clineno = __LINE__; goto __pyx_L12_except_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_GOTREF(__pyx_t_3); __Pyx_GOTREF(__pyx_t_1); /* "pandas/src/reduce.pyx":263 * gin.clear_mapping() * except: * raise # <<<<<<<<<<<<<< * finally: * # so we don't free the wrong memory */ __Pyx_GIVEREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_3); __Pyx_XGIVEREF(__pyx_t_1); __Pyx_ErrRestore(__pyx_t_5, __pyx_t_3, __pyx_t_1); __pyx_t_5 = 0; __pyx_t_3 = 0; __pyx_t_1 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 263; __pyx_clineno = __LINE__; goto __pyx_L12_except_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L11_exception_handled; } __pyx_L12_except_error:; __Pyx_XGIVEREF(__pyx_t_10); __Pyx_XGIVEREF(__pyx_t_9); __Pyx_XGIVEREF(__pyx_t_8); __Pyx_ExceptionReset(__pyx_t_10, __pyx_t_9, __pyx_t_8); goto __pyx_L8_error; __pyx_L11_exception_handled:; __Pyx_XGIVEREF(__pyx_t_10); __Pyx_XGIVEREF(__pyx_t_9); __Pyx_XGIVEREF(__pyx_t_8); __Pyx_ExceptionReset(__pyx_t_10, __pyx_t_9, __pyx_t_8); __pyx_L17_try_end:; } } /* "pandas/src/reduce.pyx":266 * finally: * # so we don't free the wrong memory * islider.reset() # <<<<<<<<<<<<<< * vslider.reset() * */ /*finally:*/ { /*normal exit:*/{ __pyx_t_1 = ((struct __pyx_vtabstruct_6pandas_3lib_Slider *)__pyx_v_islider->__pyx_vtab)->reset(__pyx_v_islider, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 266; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/reduce.pyx":267 * # so we don't free the wrong memory * islider.reset() * vslider.reset() # <<<<<<<<<<<<<< * * if result.dtype == np.object_: */ __pyx_t_1 = ((struct __pyx_vtabstruct_6pandas_3lib_Slider *)__pyx_v_vslider->__pyx_vtab)->reset(__pyx_v_vslider, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 267; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L9; } /*exception exit:*/{ __pyx_L8_error:; __pyx_t_8 = 0; __pyx_t_9 = 0; __pyx_t_10 = 0; __pyx_t_22 = 0; __pyx_t_23 = 0; __pyx_t_24 = 0; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_22, &__pyx_t_23, &__pyx_t_24); if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10) < 0)) __Pyx_ErrFetch(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10); __Pyx_XGOTREF(__pyx_t_8); __Pyx_XGOTREF(__pyx_t_9); __Pyx_XGOTREF(__pyx_t_10); __Pyx_XGOTREF(__pyx_t_22); __Pyx_XGOTREF(__pyx_t_23); __Pyx_XGOTREF(__pyx_t_24); __pyx_t_7 = __pyx_lineno; __pyx_t_20 = __pyx_clineno; __pyx_t_21 = __pyx_filename; { /* "pandas/src/reduce.pyx":266 * finally: * # so we don't free the wrong memory * islider.reset() # <<<<<<<<<<<<<< * vslider.reset() * */ __pyx_t_1 = ((struct __pyx_vtabstruct_6pandas_3lib_Slider *)__pyx_v_islider->__pyx_vtab)->reset(__pyx_v_islider, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 266; __pyx_clineno = __LINE__; goto __pyx_L25_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/reduce.pyx":267 * # so we don't free the wrong memory * islider.reset() * vslider.reset() # <<<<<<<<<<<<<< * * if result.dtype == np.object_: */ __pyx_t_1 = ((struct __pyx_vtabstruct_6pandas_3lib_Slider *)__pyx_v_vslider->__pyx_vtab)->reset(__pyx_v_vslider, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 267; __pyx_clineno = __LINE__; goto __pyx_L25_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } if (PY_MAJOR_VERSION >= 3) { __Pyx_XGIVEREF(__pyx_t_22); __Pyx_XGIVEREF(__pyx_t_23); __Pyx_XGIVEREF(__pyx_t_24); __Pyx_ExceptionReset(__pyx_t_22, __pyx_t_23, __pyx_t_24); } __Pyx_XGIVEREF(__pyx_t_8); __Pyx_XGIVEREF(__pyx_t_9); __Pyx_XGIVEREF(__pyx_t_10); __Pyx_ErrRestore(__pyx_t_8, __pyx_t_9, __pyx_t_10); __pyx_t_8 = 0; __pyx_t_9 = 0; __pyx_t_10 = 0; __pyx_t_22 = 0; __pyx_t_23 = 0; __pyx_t_24 = 0; __pyx_lineno = __pyx_t_7; __pyx_clineno = __pyx_t_20; __pyx_filename = __pyx_t_21; goto __pyx_L1_error; __pyx_L25_error:; if (PY_MAJOR_VERSION >= 3) { __Pyx_XGIVEREF(__pyx_t_22); __Pyx_XGIVEREF(__pyx_t_23); __Pyx_XGIVEREF(__pyx_t_24); __Pyx_ExceptionReset(__pyx_t_22, __pyx_t_23, __pyx_t_24); } __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_t_22 = 0; __pyx_t_23 = 0; __pyx_t_24 = 0; goto __pyx_L1_error; } __pyx_L9:; } /* "pandas/src/reduce.pyx":269 * vslider.reset() * * if result.dtype == np.object_: # <<<<<<<<<<<<<< * result = maybe_convert_objects(result) * */ if (unlikely(!__pyx_v_result)) { __Pyx_RaiseUnboundLocalError("result"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 269; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_result), __pyx_n_s_dtype); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 269; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 269; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_object_2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 269; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyObject_RichCompare(__pyx_t_1, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 269; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_19 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_19 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 269; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_19) { /* "pandas/src/reduce.pyx":270 * * if result.dtype == np.object_: * result = maybe_convert_objects(result) # <<<<<<<<<<<<<< * * return result, counts */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_maybe_convert_objects); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 270; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 270; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(((PyObject *)__pyx_v_result)); PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_v_result)); __Pyx_GIVEREF(((PyObject *)__pyx_v_result)); __pyx_t_1 = PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 270; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 270; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF_SET(__pyx_v_result, ((PyArrayObject *)__pyx_t_1)); __pyx_t_1 = 0; goto __pyx_L26; } __pyx_L26:; /* "pandas/src/reduce.pyx":272 * result = maybe_convert_objects(result) * * return result, counts # <<<<<<<<<<<<<< * * def _get_result_array(self, object res): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 272; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)__pyx_v_result)); PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_result)); __Pyx_GIVEREF(((PyObject *)__pyx_v_result)); __Pyx_INCREF(((PyObject *)__pyx_v_counts)); PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject *)__pyx_v_counts)); __Pyx_GIVEREF(((PyObject *)__pyx_v_counts)); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "pandas/src/reduce.pyx":205 * return values, index * * def get_result(self): # <<<<<<<<<<<<<< * cdef: * ndarray arr, result */ /* 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_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_counts.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.lib.SeriesBinGrouper.get_result", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_counts.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_result); __Pyx_XDECREF((PyObject *)__pyx_v_counts); __Pyx_XDECREF(__pyx_v_res); __Pyx_XDECREF((PyObject *)__pyx_v_vslider); __Pyx_XDECREF((PyObject *)__pyx_v_islider); __Pyx_XDECREF(__pyx_v_gin); __Pyx_XDECREF(__pyx_v_name); __Pyx_XDECREF(__pyx_v_cached_typ); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/reduce.pyx":274 * return result, counts * * def _get_result_array(self, object res): # <<<<<<<<<<<<<< * try: * assert(not isinstance(res, np.ndarray)) */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_3lib_16SeriesBinGrouper_7_get_result_array(PyObject *__pyx_v_self, PyObject *__pyx_v_res); /*proto*/ static PyObject *__pyx_pw_6pandas_3lib_16SeriesBinGrouper_7_get_result_array(PyObject *__pyx_v_self, PyObject *__pyx_v_res) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_get_result_array (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_3lib_16SeriesBinGrouper_6_get_result_array(((struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *)__pyx_v_self), ((PyObject *)__pyx_v_res)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_3lib_16SeriesBinGrouper_6_get_result_array(struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *__pyx_v_self, PyObject *__pyx_v_res) { PyObject *__pyx_v_result = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_t_4; Py_ssize_t __pyx_t_5; PyObject *__pyx_t_6 = NULL; Py_ssize_t __pyx_t_7; int __pyx_t_8; int __pyx_t_9; PyObject *__pyx_t_10 = NULL; PyObject *__pyx_t_11 = NULL; PyObject *__pyx_t_12 = NULL; int __pyx_t_13; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_get_result_array", 0); /* "pandas/src/reduce.pyx":275 * * def _get_result_array(self, object res): * try: # <<<<<<<<<<<<<< * assert(not isinstance(res, np.ndarray)) * assert(not (isinstance(res, list) and len(res) == len(self.dummy_arr))) */ { __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:*/ { /* "pandas/src/reduce.pyx":276 * def _get_result_array(self, object res): * try: * assert(not isinstance(res, np.ndarray)) # <<<<<<<<<<<<<< * assert(not (isinstance(res, list) and len(res) == len(self.dummy_arr))) * */ #ifndef CYTHON_WITHOUT_ASSERTIONS if (unlikely(!Py_OptimizeFlag)) { __pyx_t_4 = __Pyx_TypeCheck(__pyx_v_res, ((PyObject*)__pyx_ptype_5numpy_ndarray)); if (unlikely(!((!(__pyx_t_4 != 0)) != 0))) { PyErr_SetNone(PyExc_AssertionError); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 276; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } #endif /* "pandas/src/reduce.pyx":277 * try: * assert(not isinstance(res, np.ndarray)) * assert(not (isinstance(res, list) and len(res) == len(self.dummy_arr))) # <<<<<<<<<<<<<< * * result = np.empty(self.ngroups, dtype='O') */ #ifndef CYTHON_WITHOUT_ASSERTIONS if (unlikely(!Py_OptimizeFlag)) { __pyx_t_4 = PyList_Check(__pyx_v_res); if ((__pyx_t_4 != 0)) { __pyx_t_5 = PyObject_Length(__pyx_v_res); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 277; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_t_6 = __pyx_v_self->dummy_arr; __Pyx_INCREF(__pyx_t_6); __pyx_t_7 = PyObject_Length(__pyx_t_6); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 277; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_8 = ((__pyx_t_5 == __pyx_t_7) != 0); __pyx_t_9 = __pyx_t_8; } else { __pyx_t_9 = (__pyx_t_4 != 0); } if (unlikely(!((!__pyx_t_9) != 0))) { PyErr_SetNone(PyExc_AssertionError); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 277; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } #endif /* "pandas/src/reduce.pyx":279 * assert(not (isinstance(res, list) and len(res) == len(self.dummy_arr))) * * result = np.empty(self.ngroups, dtype='O') # <<<<<<<<<<<<<< * except Exception: * raise ValueError('function does not reduce') */ __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 279; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_empty); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 279; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyInt_FromSsize_t(__pyx_v_self->ngroups); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 279; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_11 = PyTuple_New(1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 279; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyDict_New(); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 279; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_6); if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_dtype, __pyx_n_s_O) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 279; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_t_12 = PyObject_Call(__pyx_t_10, __pyx_t_11, __pyx_t_6); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 279; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_v_result = __pyx_t_12; __pyx_t_12 = 0; } __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L10_try_end; __pyx_L3_error:; __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; /* "pandas/src/reduce.pyx":280 * * result = np.empty(self.ngroups, dtype='O') * except Exception: # <<<<<<<<<<<<<< * raise ValueError('function does not reduce') * return result */ __pyx_t_13 = PyErr_ExceptionMatches(__pyx_builtin_Exception); if (__pyx_t_13) { __Pyx_AddTraceback("pandas.lib.SeriesBinGrouper._get_result_array", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_12, &__pyx_t_6, &__pyx_t_11) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 280; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} __Pyx_GOTREF(__pyx_t_12); __Pyx_GOTREF(__pyx_t_6); __Pyx_GOTREF(__pyx_t_11); /* "pandas/src/reduce.pyx":281 * result = np.empty(self.ngroups, dtype='O') * except Exception: * raise ValueError('function does not reduce') # <<<<<<<<<<<<<< * return result * */ __pyx_t_10 = PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__19, NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 281; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_Raise(__pyx_t_10, 0, 0, 0); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 281; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; goto __pyx_L4_exception_handled; } goto __pyx_L5_except_error; __pyx_L5_except_error:; __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); goto __pyx_L1_error; __pyx_L4_exception_handled:; __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); __pyx_L10_try_end:; } /* "pandas/src/reduce.pyx":282 * except Exception: * raise ValueError('function does not reduce') * return result # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_result); __pyx_r = __pyx_v_result; goto __pyx_L0; /* "pandas/src/reduce.pyx":274 * return result, counts * * def _get_result_array(self, object res): # <<<<<<<<<<<<<< * try: * assert(not isinstance(res, np.ndarray)) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_10); __Pyx_XDECREF(__pyx_t_11); __Pyx_XDECREF(__pyx_t_12); __Pyx_AddTraceback("pandas.lib.SeriesBinGrouper._get_result_array", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_result); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/reduce.pyx":166 * * cdef public: * object arr, index, dummy_arr, dummy_index, values, f, bins, typ, name # <<<<<<<<<<<<<< * * def __init__(self, object series, object f, object bins, object dummy): */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_3lib_16SeriesBinGrouper_3arr_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6pandas_3lib_16SeriesBinGrouper_3arr_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_3lib_16SeriesBinGrouper_3arr___get__(((struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_3lib_16SeriesBinGrouper_3arr___get__(struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_self->arr); __pyx_r = __pyx_v_self->arr; goto __pyx_L0; /* function exit code */ __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pandas_3lib_16SeriesBinGrouper_3arr_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ static int __pyx_pw_6pandas_3lib_16SeriesBinGrouper_3arr_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_3lib_16SeriesBinGrouper_3arr_2__set__(((struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *)__pyx_v_self), ((PyObject *)__pyx_v_value)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pandas_3lib_16SeriesBinGrouper_3arr_2__set__(struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__", 0); __Pyx_INCREF(__pyx_v_value); __Pyx_GIVEREF(__pyx_v_value); __Pyx_GOTREF(__pyx_v_self->arr); __Pyx_DECREF(__pyx_v_self->arr); __pyx_v_self->arr = __pyx_v_value; /* function exit code */ __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pandas_3lib_16SeriesBinGrouper_3arr_5__del__(PyObject *__pyx_v_self); /*proto*/ static int __pyx_pw_6pandas_3lib_16SeriesBinGrouper_3arr_5__del__(PyObject *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_3lib_16SeriesBinGrouper_3arr_4__del__(((struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pandas_3lib_16SeriesBinGrouper_3arr_4__del__(struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__", 0); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->arr); __Pyx_DECREF(__pyx_v_self->arr); __pyx_v_self->arr = Py_None; /* function exit code */ __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_3lib_16SeriesBinGrouper_5index_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6pandas_3lib_16SeriesBinGrouper_5index_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_3lib_16SeriesBinGrouper_5index___get__(((struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_3lib_16SeriesBinGrouper_5index___get__(struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_self->index); __pyx_r = __pyx_v_self->index; goto __pyx_L0; /* function exit code */ __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pandas_3lib_16SeriesBinGrouper_5index_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ static int __pyx_pw_6pandas_3lib_16SeriesBinGrouper_5index_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_3lib_16SeriesBinGrouper_5index_2__set__(((struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *)__pyx_v_self), ((PyObject *)__pyx_v_value)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pandas_3lib_16SeriesBinGrouper_5index_2__set__(struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__", 0); __Pyx_INCREF(__pyx_v_value); __Pyx_GIVEREF(__pyx_v_value); __Pyx_GOTREF(__pyx_v_self->index); __Pyx_DECREF(__pyx_v_self->index); __pyx_v_self->index = __pyx_v_value; /* function exit code */ __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pandas_3lib_16SeriesBinGrouper_5index_5__del__(PyObject *__pyx_v_self); /*proto*/ static int __pyx_pw_6pandas_3lib_16SeriesBinGrouper_5index_5__del__(PyObject *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_3lib_16SeriesBinGrouper_5index_4__del__(((struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pandas_3lib_16SeriesBinGrouper_5index_4__del__(struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__", 0); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->index); __Pyx_DECREF(__pyx_v_self->index); __pyx_v_self->index = Py_None; /* function exit code */ __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_3lib_16SeriesBinGrouper_9dummy_arr_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6pandas_3lib_16SeriesBinGrouper_9dummy_arr_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_3lib_16SeriesBinGrouper_9dummy_arr___get__(((struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_3lib_16SeriesBinGrouper_9dummy_arr___get__(struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_self->dummy_arr); __pyx_r = __pyx_v_self->dummy_arr; goto __pyx_L0; /* function exit code */ __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pandas_3lib_16SeriesBinGrouper_9dummy_arr_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ static int __pyx_pw_6pandas_3lib_16SeriesBinGrouper_9dummy_arr_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_3lib_16SeriesBinGrouper_9dummy_arr_2__set__(((struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *)__pyx_v_self), ((PyObject *)__pyx_v_value)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pandas_3lib_16SeriesBinGrouper_9dummy_arr_2__set__(struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__", 0); __Pyx_INCREF(__pyx_v_value); __Pyx_GIVEREF(__pyx_v_value); __Pyx_GOTREF(__pyx_v_self->dummy_arr); __Pyx_DECREF(__pyx_v_self->dummy_arr); __pyx_v_self->dummy_arr = __pyx_v_value; /* function exit code */ __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pandas_3lib_16SeriesBinGrouper_9dummy_arr_5__del__(PyObject *__pyx_v_self); /*proto*/ static int __pyx_pw_6pandas_3lib_16SeriesBinGrouper_9dummy_arr_5__del__(PyObject *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_3lib_16SeriesBinGrouper_9dummy_arr_4__del__(((struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pandas_3lib_16SeriesBinGrouper_9dummy_arr_4__del__(struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__", 0); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->dummy_arr); __Pyx_DECREF(__pyx_v_self->dummy_arr); __pyx_v_self->dummy_arr = Py_None; /* function exit code */ __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_3lib_16SeriesBinGrouper_11dummy_index_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6pandas_3lib_16SeriesBinGrouper_11dummy_index_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_3lib_16SeriesBinGrouper_11dummy_index___get__(((struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_3lib_16SeriesBinGrouper_11dummy_index___get__(struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_self->dummy_index); __pyx_r = __pyx_v_self->dummy_index; goto __pyx_L0; /* function exit code */ __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pandas_3lib_16SeriesBinGrouper_11dummy_index_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ static int __pyx_pw_6pandas_3lib_16SeriesBinGrouper_11dummy_index_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_3lib_16SeriesBinGrouper_11dummy_index_2__set__(((struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *)__pyx_v_self), ((PyObject *)__pyx_v_value)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pandas_3lib_16SeriesBinGrouper_11dummy_index_2__set__(struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__", 0); __Pyx_INCREF(__pyx_v_value); __Pyx_GIVEREF(__pyx_v_value); __Pyx_GOTREF(__pyx_v_self->dummy_index); __Pyx_DECREF(__pyx_v_self->dummy_index); __pyx_v_self->dummy_index = __pyx_v_value; /* function exit code */ __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pandas_3lib_16SeriesBinGrouper_11dummy_index_5__del__(PyObject *__pyx_v_self); /*proto*/ static int __pyx_pw_6pandas_3lib_16SeriesBinGrouper_11dummy_index_5__del__(PyObject *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_3lib_16SeriesBinGrouper_11dummy_index_4__del__(((struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pandas_3lib_16SeriesBinGrouper_11dummy_index_4__del__(struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__", 0); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->dummy_index); __Pyx_DECREF(__pyx_v_self->dummy_index); __pyx_v_self->dummy_index = Py_None; /* function exit code */ __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_3lib_16SeriesBinGrouper_6values_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6pandas_3lib_16SeriesBinGrouper_6values_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_3lib_16SeriesBinGrouper_6values___get__(((struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_3lib_16SeriesBinGrouper_6values___get__(struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_self->values); __pyx_r = __pyx_v_self->values; goto __pyx_L0; /* function exit code */ __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pandas_3lib_16SeriesBinGrouper_6values_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ static int __pyx_pw_6pandas_3lib_16SeriesBinGrouper_6values_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_3lib_16SeriesBinGrouper_6values_2__set__(((struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *)__pyx_v_self), ((PyObject *)__pyx_v_value)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pandas_3lib_16SeriesBinGrouper_6values_2__set__(struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__", 0); __Pyx_INCREF(__pyx_v_value); __Pyx_GIVEREF(__pyx_v_value); __Pyx_GOTREF(__pyx_v_self->values); __Pyx_DECREF(__pyx_v_self->values); __pyx_v_self->values = __pyx_v_value; /* function exit code */ __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pandas_3lib_16SeriesBinGrouper_6values_5__del__(PyObject *__pyx_v_self); /*proto*/ static int __pyx_pw_6pandas_3lib_16SeriesBinGrouper_6values_5__del__(PyObject *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_3lib_16SeriesBinGrouper_6values_4__del__(((struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pandas_3lib_16SeriesBinGrouper_6values_4__del__(struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__", 0); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->values); __Pyx_DECREF(__pyx_v_self->values); __pyx_v_self->values = Py_None; /* function exit code */ __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_3lib_16SeriesBinGrouper_1f_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6pandas_3lib_16SeriesBinGrouper_1f_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_3lib_16SeriesBinGrouper_1f___get__(((struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_3lib_16SeriesBinGrouper_1f___get__(struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_self->f); __pyx_r = __pyx_v_self->f; goto __pyx_L0; /* function exit code */ __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pandas_3lib_16SeriesBinGrouper_1f_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ static int __pyx_pw_6pandas_3lib_16SeriesBinGrouper_1f_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_3lib_16SeriesBinGrouper_1f_2__set__(((struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *)__pyx_v_self), ((PyObject *)__pyx_v_value)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pandas_3lib_16SeriesBinGrouper_1f_2__set__(struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__", 0); __Pyx_INCREF(__pyx_v_value); __Pyx_GIVEREF(__pyx_v_value); __Pyx_GOTREF(__pyx_v_self->f); __Pyx_DECREF(__pyx_v_self->f); __pyx_v_self->f = __pyx_v_value; /* function exit code */ __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pandas_3lib_16SeriesBinGrouper_1f_5__del__(PyObject *__pyx_v_self); /*proto*/ static int __pyx_pw_6pandas_3lib_16SeriesBinGrouper_1f_5__del__(PyObject *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_3lib_16SeriesBinGrouper_1f_4__del__(((struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pandas_3lib_16SeriesBinGrouper_1f_4__del__(struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__", 0); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->f); __Pyx_DECREF(__pyx_v_self->f); __pyx_v_self->f = Py_None; /* function exit code */ __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_3lib_16SeriesBinGrouper_4bins_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6pandas_3lib_16SeriesBinGrouper_4bins_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_3lib_16SeriesBinGrouper_4bins___get__(((struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_3lib_16SeriesBinGrouper_4bins___get__(struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_self->bins); __pyx_r = __pyx_v_self->bins; goto __pyx_L0; /* function exit code */ __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pandas_3lib_16SeriesBinGrouper_4bins_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ static int __pyx_pw_6pandas_3lib_16SeriesBinGrouper_4bins_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_3lib_16SeriesBinGrouper_4bins_2__set__(((struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *)__pyx_v_self), ((PyObject *)__pyx_v_value)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pandas_3lib_16SeriesBinGrouper_4bins_2__set__(struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__", 0); __Pyx_INCREF(__pyx_v_value); __Pyx_GIVEREF(__pyx_v_value); __Pyx_GOTREF(__pyx_v_self->bins); __Pyx_DECREF(__pyx_v_self->bins); __pyx_v_self->bins = __pyx_v_value; /* function exit code */ __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pandas_3lib_16SeriesBinGrouper_4bins_5__del__(PyObject *__pyx_v_self); /*proto*/ static int __pyx_pw_6pandas_3lib_16SeriesBinGrouper_4bins_5__del__(PyObject *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_3lib_16SeriesBinGrouper_4bins_4__del__(((struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pandas_3lib_16SeriesBinGrouper_4bins_4__del__(struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__", 0); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->bins); __Pyx_DECREF(__pyx_v_self->bins); __pyx_v_self->bins = Py_None; /* function exit code */ __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_3lib_16SeriesBinGrouper_3typ_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6pandas_3lib_16SeriesBinGrouper_3typ_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_3lib_16SeriesBinGrouper_3typ___get__(((struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_3lib_16SeriesBinGrouper_3typ___get__(struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_self->typ); __pyx_r = __pyx_v_self->typ; goto __pyx_L0; /* function exit code */ __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pandas_3lib_16SeriesBinGrouper_3typ_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ static int __pyx_pw_6pandas_3lib_16SeriesBinGrouper_3typ_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_3lib_16SeriesBinGrouper_3typ_2__set__(((struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *)__pyx_v_self), ((PyObject *)__pyx_v_value)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pandas_3lib_16SeriesBinGrouper_3typ_2__set__(struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__", 0); __Pyx_INCREF(__pyx_v_value); __Pyx_GIVEREF(__pyx_v_value); __Pyx_GOTREF(__pyx_v_self->typ); __Pyx_DECREF(__pyx_v_self->typ); __pyx_v_self->typ = __pyx_v_value; /* function exit code */ __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pandas_3lib_16SeriesBinGrouper_3typ_5__del__(PyObject *__pyx_v_self); /*proto*/ static int __pyx_pw_6pandas_3lib_16SeriesBinGrouper_3typ_5__del__(PyObject *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_3lib_16SeriesBinGrouper_3typ_4__del__(((struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pandas_3lib_16SeriesBinGrouper_3typ_4__del__(struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__", 0); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->typ); __Pyx_DECREF(__pyx_v_self->typ); __pyx_v_self->typ = Py_None; /* function exit code */ __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_3lib_16SeriesBinGrouper_4name_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6pandas_3lib_16SeriesBinGrouper_4name_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_3lib_16SeriesBinGrouper_4name___get__(((struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_3lib_16SeriesBinGrouper_4name___get__(struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_self->name); __pyx_r = __pyx_v_self->name; goto __pyx_L0; /* function exit code */ __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pandas_3lib_16SeriesBinGrouper_4name_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ static int __pyx_pw_6pandas_3lib_16SeriesBinGrouper_4name_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_3lib_16SeriesBinGrouper_4name_2__set__(((struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *)__pyx_v_self), ((PyObject *)__pyx_v_value)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pandas_3lib_16SeriesBinGrouper_4name_2__set__(struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__", 0); __Pyx_INCREF(__pyx_v_value); __Pyx_GIVEREF(__pyx_v_value); __Pyx_GOTREF(__pyx_v_self->name); __Pyx_DECREF(__pyx_v_self->name); __pyx_v_self->name = __pyx_v_value; /* function exit code */ __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pandas_3lib_16SeriesBinGrouper_4name_5__del__(PyObject *__pyx_v_self); /*proto*/ static int __pyx_pw_6pandas_3lib_16SeriesBinGrouper_4name_5__del__(PyObject *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_3lib_16SeriesBinGrouper_4name_4__del__(((struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pandas_3lib_16SeriesBinGrouper_4name_4__del__(struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__", 0); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->name); __Pyx_DECREF(__pyx_v_self->name); __pyx_v_self->name = Py_None; /* function exit code */ __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/reduce.pyx":297 * object arr, index, dummy_arr, dummy_index, f, labels, values, typ, name * * def __init__(self, object series, object f, object labels, # <<<<<<<<<<<<<< * Py_ssize_t ngroups, object dummy): * n = len(series) */ /* Python wrapper */ static int __pyx_pw_6pandas_3lib_13SeriesGrouper_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_pw_6pandas_3lib_13SeriesGrouper_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_series = 0; PyObject *__pyx_v_f = 0; PyObject *__pyx_v_labels = 0; Py_ssize_t __pyx_v_ngroups; PyObject *__pyx_v_dummy = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_series,&__pyx_n_s_f,&__pyx_n_s_labels,&__pyx_n_s_ngroups,&__pyx_n_s_dummy,0}; PyObject* values[5] = {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 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_series)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_f)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("__init__", 1, 5, 5, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 297; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_labels)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("__init__", 1, 5, 5, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 297; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ngroups)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("__init__", 1, 5, 5, 3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 297; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 4: if (likely((values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_dummy)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("__init__", 1, 5, 5, 4); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 297; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 297; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 5) { 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); } __pyx_v_series = values[0]; __pyx_v_f = values[1]; __pyx_v_labels = values[2]; __pyx_v_ngroups = __Pyx_PyIndex_AsSsize_t(values[3]); if (unlikely((__pyx_v_ngroups == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 298; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_dummy = values[4]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("__init__", 1, 5, 5, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 297; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.lib.SeriesGrouper.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return -1; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pandas_3lib_13SeriesGrouper___init__(((struct __pyx_obj_6pandas_3lib_SeriesGrouper *)__pyx_v_self), __pyx_v_series, __pyx_v_f, __pyx_v_labels, __pyx_v_ngroups, __pyx_v_dummy); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pandas_3lib_13SeriesGrouper___init__(struct __pyx_obj_6pandas_3lib_SeriesGrouper *__pyx_v_self, PyObject *__pyx_v_series, PyObject *__pyx_v_f, PyObject *__pyx_v_labels, Py_ssize_t __pyx_v_ngroups, PyObject *__pyx_v_dummy) { CYTHON_UNUSED Py_ssize_t __pyx_v_n; PyObject *__pyx_v_values = NULL; int __pyx_r; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_t_4; int __pyx_t_5; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *(*__pyx_t_8)(PyObject *); int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__init__", 0); /* "pandas/src/reduce.pyx":299 * def __init__(self, object series, object f, object labels, * Py_ssize_t ngroups, object dummy): * n = len(series) # <<<<<<<<<<<<<< * * self.labels = labels */ __pyx_t_1 = PyObject_Length(__pyx_v_series); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 299; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/src/reduce.pyx":301 * n = len(series) * * self.labels = labels # <<<<<<<<<<<<<< * self.f = f * */ __Pyx_INCREF(__pyx_v_labels); __Pyx_GIVEREF(__pyx_v_labels); __Pyx_GOTREF(__pyx_v_self->labels); __Pyx_DECREF(__pyx_v_self->labels); __pyx_v_self->labels = __pyx_v_labels; /* "pandas/src/reduce.pyx":302 * * self.labels = labels * self.f = f # <<<<<<<<<<<<<< * * values = series.values */ __Pyx_INCREF(__pyx_v_f); __Pyx_GIVEREF(__pyx_v_f); __Pyx_GOTREF(__pyx_v_self->f); __Pyx_DECREF(__pyx_v_self->f); __pyx_v_self->f = __pyx_v_f; /* "pandas/src/reduce.pyx":304 * self.f = f * * values = series.values # <<<<<<<<<<<<<< * if not values.flags.c_contiguous: * values = values.copy('C') */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_series, __pyx_n_s_values); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 304; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_v_values = __pyx_t_2; __pyx_t_2 = 0; /* "pandas/src/reduce.pyx":305 * * values = series.values * if not values.flags.c_contiguous: # <<<<<<<<<<<<<< * values = values.copy('C') * self.arr = values */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_values, __pyx_n_s_flags); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 305; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_c_contiguous); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 305; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 305; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_5 = ((!__pyx_t_4) != 0); if (__pyx_t_5) { /* "pandas/src/reduce.pyx":306 * values = series.values * if not values.flags.c_contiguous: * values = values.copy('C') # <<<<<<<<<<<<<< * self.arr = values * self.index = series.index */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_values, __pyx_n_s_copy); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 306; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = PyObject_Call(__pyx_t_3, __pyx_tuple__20, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 306; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF_SET(__pyx_v_values, __pyx_t_2); __pyx_t_2 = 0; goto __pyx_L3; } __pyx_L3:; /* "pandas/src/reduce.pyx":307 * if not values.flags.c_contiguous: * values = values.copy('C') * self.arr = values # <<<<<<<<<<<<<< * self.index = series.index * self.typ = type(series) */ __Pyx_INCREF(__pyx_v_values); __Pyx_GIVEREF(__pyx_v_values); __Pyx_GOTREF(__pyx_v_self->arr); __Pyx_DECREF(__pyx_v_self->arr); __pyx_v_self->arr = __pyx_v_values; /* "pandas/src/reduce.pyx":308 * values = values.copy('C') * self.arr = values * self.index = series.index # <<<<<<<<<<<<<< * self.typ = type(series) * self.name = getattr(series,'name',None) */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_series, __pyx_n_s_index); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 308; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __Pyx_GOTREF(__pyx_v_self->index); __Pyx_DECREF(__pyx_v_self->index); __pyx_v_self->index = __pyx_t_2; __pyx_t_2 = 0; /* "pandas/src/reduce.pyx":309 * self.arr = values * self.index = series.index * self.typ = type(series) # <<<<<<<<<<<<<< * self.name = getattr(series,'name',None) * */ __Pyx_INCREF(((PyObject *)Py_TYPE(__pyx_v_series))); __Pyx_GIVEREF(((PyObject *)Py_TYPE(__pyx_v_series))); __Pyx_GOTREF(__pyx_v_self->typ); __Pyx_DECREF(__pyx_v_self->typ); __pyx_v_self->typ = ((PyObject *)Py_TYPE(__pyx_v_series)); /* "pandas/src/reduce.pyx":310 * self.index = series.index * self.typ = type(series) * self.name = getattr(series,'name',None) # <<<<<<<<<<<<<< * * self.dummy_arr, self.dummy_index = self._check_dummy(dummy) */ __pyx_t_2 = __Pyx_GetAttr3(__pyx_v_series, __pyx_n_s_name, Py_None); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 310; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __Pyx_GOTREF(__pyx_v_self->name); __Pyx_DECREF(__pyx_v_self->name); __pyx_v_self->name = __pyx_t_2; __pyx_t_2 = 0; /* "pandas/src/reduce.pyx":312 * self.name = getattr(series,'name',None) * * self.dummy_arr, self.dummy_index = self._check_dummy(dummy) # <<<<<<<<<<<<<< * self.passed_dummy = dummy is not None * self.ngroups = ngroups */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_check_dummy); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 312; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 312; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_v_dummy); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_dummy); __Pyx_GIVEREF(__pyx_v_dummy); __pyx_t_6 = PyObject_Call(__pyx_t_2, __pyx_t_3, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 312; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if ((likely(PyTuple_CheckExact(__pyx_t_6))) || (PyList_CheckExact(__pyx_t_6))) { PyObject* sequence = __pyx_t_6; #if CYTHON_COMPILING_IN_CPYTHON Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 312; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_2 = PyTuple_GET_ITEM(sequence, 1); } else { __pyx_t_3 = PyList_GET_ITEM(sequence, 0); __pyx_t_2 = PyList_GET_ITEM(sequence, 1); } __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(__pyx_t_2); #else __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 312; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 312; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); #endif __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } else { Py_ssize_t index = -1; __pyx_t_7 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 312; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_8 = Py_TYPE(__pyx_t_7)->tp_iternext; index = 0; __pyx_t_3 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_3)) goto __pyx_L4_unpacking_failed; __Pyx_GOTREF(__pyx_t_3); index = 1; __pyx_t_2 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_2)) goto __pyx_L4_unpacking_failed; __Pyx_GOTREF(__pyx_t_2); if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_7), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 312; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_8 = NULL; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; goto __pyx_L5_unpacking_done; __pyx_L4_unpacking_failed:; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_8 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 312; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_L5_unpacking_done:; } __Pyx_GIVEREF(__pyx_t_3); __Pyx_GOTREF(__pyx_v_self->dummy_arr); __Pyx_DECREF(__pyx_v_self->dummy_arr); __pyx_v_self->dummy_arr = __pyx_t_3; __pyx_t_3 = 0; __Pyx_GIVEREF(__pyx_t_2); __Pyx_GOTREF(__pyx_v_self->dummy_index); __Pyx_DECREF(__pyx_v_self->dummy_index); __pyx_v_self->dummy_index = __pyx_t_2; __pyx_t_2 = 0; /* "pandas/src/reduce.pyx":313 * * self.dummy_arr, self.dummy_index = self._check_dummy(dummy) * self.passed_dummy = dummy is not None # <<<<<<<<<<<<<< * self.ngroups = ngroups * */ __pyx_t_5 = (__pyx_v_dummy != Py_None); __pyx_v_self->passed_dummy = __pyx_t_5; /* "pandas/src/reduce.pyx":314 * self.dummy_arr, self.dummy_index = self._check_dummy(dummy) * self.passed_dummy = dummy is not None * self.ngroups = ngroups # <<<<<<<<<<<<<< * * def _check_dummy(self, dummy=None): */ __pyx_v_self->ngroups = __pyx_v_ngroups; /* "pandas/src/reduce.pyx":297 * object arr, index, dummy_arr, dummy_index, f, labels, values, typ, name * * def __init__(self, object series, object f, object labels, # <<<<<<<<<<<<<< * Py_ssize_t ngroups, object dummy): * n = len(series) */ /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_AddTraceback("pandas.lib.SeriesGrouper.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_XDECREF(__pyx_v_values); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/reduce.pyx":316 * self.ngroups = ngroups * * def _check_dummy(self, dummy=None): # <<<<<<<<<<<<<< * if dummy is None: * values = np.empty(0, dtype=self.arr.dtype) */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_3lib_13SeriesGrouper_3_check_dummy(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_6pandas_3lib_13SeriesGrouper_3_check_dummy(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_dummy = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_check_dummy (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_dummy,0}; PyObject* values[1] = {0}; values[0] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_dummy); if (value) { values[0] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_check_dummy") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 316; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_dummy = values[0]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("_check_dummy", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 316; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.lib.SeriesGrouper._check_dummy", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pandas_3lib_13SeriesGrouper_2_check_dummy(((struct __pyx_obj_6pandas_3lib_SeriesGrouper *)__pyx_v_self), __pyx_v_dummy); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_3lib_13SeriesGrouper_2_check_dummy(struct __pyx_obj_6pandas_3lib_SeriesGrouper *__pyx_v_self, PyObject *__pyx_v_dummy) { PyObject *__pyx_v_values = NULL; PyObject *__pyx_v_index = 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_check_dummy", 0); /* "pandas/src/reduce.pyx":317 * * def _check_dummy(self, dummy=None): * if dummy is None: # <<<<<<<<<<<<<< * values = np.empty(0, dtype=self.arr.dtype) * index = None */ __pyx_t_1 = (__pyx_v_dummy == Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { /* "pandas/src/reduce.pyx":318 * def _check_dummy(self, dummy=None): * if dummy is None: * values = np.empty(0, dtype=self.arr.dtype) # <<<<<<<<<<<<<< * index = None * else: */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 318; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_empty); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 318; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 318; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->arr, __pyx_n_s_dtype); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 318; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dtype, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 318; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyObject_Call(__pyx_t_4, __pyx_tuple__21, __pyx_t_3); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 318; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_values = __pyx_t_5; __pyx_t_5 = 0; /* "pandas/src/reduce.pyx":319 * if dummy is None: * values = np.empty(0, dtype=self.arr.dtype) * index = None # <<<<<<<<<<<<<< * else: * if dummy.dtype != self.arr.dtype: */ __Pyx_INCREF(Py_None); __pyx_v_index = Py_None; goto __pyx_L3; } /*else*/ { /* "pandas/src/reduce.pyx":321 * index = None * else: * if dummy.dtype != self.arr.dtype: # <<<<<<<<<<<<<< * raise ValueError('Dummy array must be same dtype') * values = dummy.values */ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_dummy, __pyx_n_s_dtype); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 321; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->arr, __pyx_n_s_dtype); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 321; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PyObject_RichCompare(__pyx_t_5, __pyx_t_3, Py_NE); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 321; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 321; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_2) { /* "pandas/src/reduce.pyx":322 * else: * if dummy.dtype != self.arr.dtype: * raise ValueError('Dummy array must be same dtype') # <<<<<<<<<<<<<< * values = dummy.values * if not values.flags.contiguous: */ __pyx_t_4 = PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__22, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 322; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 322; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } /* "pandas/src/reduce.pyx":323 * if dummy.dtype != self.arr.dtype: * raise ValueError('Dummy array must be same dtype') * values = dummy.values # <<<<<<<<<<<<<< * if not values.flags.contiguous: * values = values.copy() */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_dummy, __pyx_n_s_values); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 323; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_v_values = __pyx_t_4; __pyx_t_4 = 0; /* "pandas/src/reduce.pyx":324 * raise ValueError('Dummy array must be same dtype') * values = dummy.values * if not values.flags.contiguous: # <<<<<<<<<<<<<< * values = values.copy() * index = dummy.index */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_values, __pyx_n_s_flags); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 324; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_contiguous); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 324; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 324; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_1 = ((!__pyx_t_2) != 0); if (__pyx_t_1) { /* "pandas/src/reduce.pyx":325 * values = dummy.values * if not values.flags.contiguous: * values = values.copy() # <<<<<<<<<<<<<< * index = dummy.index * */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_values, __pyx_n_s_copy); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 325; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PyObject_Call(__pyx_t_3, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 325; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF_SET(__pyx_v_values, __pyx_t_4); __pyx_t_4 = 0; goto __pyx_L5; } __pyx_L5:; /* "pandas/src/reduce.pyx":326 * if not values.flags.contiguous: * values = values.copy() * index = dummy.index # <<<<<<<<<<<<<< * * return values, index */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_dummy, __pyx_n_s_index); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 326; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_v_index = __pyx_t_4; __pyx_t_4 = 0; } __pyx_L3:; /* "pandas/src/reduce.pyx":328 * index = dummy.index * * return values, index # <<<<<<<<<<<<<< * * def get_result(self): */ __Pyx_XDECREF(__pyx_r); __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 328; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_v_values); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_values); __Pyx_GIVEREF(__pyx_v_values); __Pyx_INCREF(__pyx_v_index); PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_index); __Pyx_GIVEREF(__pyx_v_index); __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; /* "pandas/src/reduce.pyx":316 * self.ngroups = ngroups * * def _check_dummy(self, dummy=None): # <<<<<<<<<<<<<< * if dummy is None: * values = np.empty(0, dtype=self.arr.dtype) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("pandas.lib.SeriesGrouper._check_dummy", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_values); __Pyx_XDECREF(__pyx_v_index); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/reduce.pyx":330 * return values, index * * def get_result(self): # <<<<<<<<<<<<<< * cdef: * ndarray arr, result */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_3lib_13SeriesGrouper_5get_result(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static PyObject *__pyx_pw_6pandas_3lib_13SeriesGrouper_5get_result(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("get_result (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_3lib_13SeriesGrouper_4get_result(((struct __pyx_obj_6pandas_3lib_SeriesGrouper *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_3lib_13SeriesGrouper_4get_result(struct __pyx_obj_6pandas_3lib_SeriesGrouper *__pyx_v_self) { PyArrayObject *__pyx_v_result = 0; PyArrayObject *__pyx_v_labels = 0; PyArrayObject *__pyx_v_counts = 0; Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_n; Py_ssize_t __pyx_v_group_size; Py_ssize_t __pyx_v_lab; PyObject *__pyx_v_res = 0; int __pyx_v_initialized; struct __pyx_obj_6pandas_3lib_Slider *__pyx_v_vslider = 0; struct __pyx_obj_6pandas_3lib_Slider *__pyx_v_islider = 0; PyObject *__pyx_v_gin = 0; PyObject *__pyx_v_name = 0; PyObject *__pyx_v_cached_typ = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_counts; __Pyx_Buffer __pyx_pybuffer_counts; __Pyx_LocalBuf_ND __pyx_pybuffernd_labels; __Pyx_Buffer __pyx_pybuffer_labels; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; PyArrayObject *__pyx_t_10 = NULL; Py_ssize_t __pyx_t_11; Py_ssize_t __pyx_t_12; Py_ssize_t __pyx_t_13; int __pyx_t_14; Py_ssize_t __pyx_t_15; int __pyx_t_16; int __pyx_t_17; Py_ssize_t __pyx_t_18; int __pyx_t_19; char const *__pyx_t_20; PyObject *__pyx_t_21 = NULL; PyObject *__pyx_t_22 = NULL; PyObject *__pyx_t_23 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_result", 0); __pyx_pybuffer_labels.pybuffer.buf = NULL; __pyx_pybuffer_labels.refcount = 0; __pyx_pybuffernd_labels.data = NULL; __pyx_pybuffernd_labels.rcbuffer = &__pyx_pybuffer_labels; __pyx_pybuffer_counts.pybuffer.buf = NULL; __pyx_pybuffer_counts.refcount = 0; __pyx_pybuffernd_counts.data = NULL; __pyx_pybuffernd_counts.rcbuffer = &__pyx_pybuffer_counts; /* "pandas/src/reduce.pyx":336 * Py_ssize_t i, n, group_size, lab * object res * bint initialized = 0 # <<<<<<<<<<<<<< * Slider vslider, islider * object gin, typ, name */ __pyx_v_initialized = 0; /* "pandas/src/reduce.pyx":339 * Slider vslider, islider * object gin, typ, name * object cached_typ = None # <<<<<<<<<<<<<< * * labels = self.labels */ __Pyx_INCREF(Py_None); __pyx_v_cached_typ = Py_None; /* "pandas/src/reduce.pyx":341 * object cached_typ = None * * labels = self.labels # <<<<<<<<<<<<<< * counts = np.zeros(self.ngroups, dtype=np.int64) * group_size = 0 */ if (!(likely(((__pyx_v_self->labels) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_self->labels, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 341; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_1 = __pyx_v_self->labels; __Pyx_INCREF(__pyx_t_1); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_labels.rcbuffer->pybuffer); __pyx_t_2 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_labels.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_1), &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_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_labels.rcbuffer->pybuffer, (PyObject*)__pyx_v_labels, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_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_pybuffernd_labels.diminfo[0].strides = __pyx_pybuffernd_labels.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_labels.diminfo[0].shape = __pyx_pybuffernd_labels.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 341; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_labels = ((PyArrayObject *)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/reduce.pyx":342 * * labels = self.labels * counts = np.zeros(self.ngroups, dtype=np.int64) # <<<<<<<<<<<<<< * group_size = 0 * n = len(self.arr) */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 342; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_zeros); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 342; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_self->ngroups); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 342; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 342; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 342; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 342; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 342; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_dtype, __pyx_t_9) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 342; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_9 = PyObject_Call(__pyx_t_6, __pyx_t_7, __pyx_t_1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 342; __pyx_clineno = __LINE__; goto __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_1); __pyx_t_1 = 0; if (!(likely(((__pyx_t_9) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_9, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 342; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_10 = ((PyArrayObject *)__pyx_t_9); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_counts.rcbuffer->pybuffer); __pyx_t_2 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_counts.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_2 < 0)) { PyErr_Fetch(&__pyx_t_5, &__pyx_t_4, &__pyx_t_3); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_counts.rcbuffer->pybuffer, (PyObject*)__pyx_v_counts, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_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_pybuffernd_counts.diminfo[0].strides = __pyx_pybuffernd_counts.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_counts.diminfo[0].shape = __pyx_pybuffernd_counts.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 342; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_10 = 0; __pyx_v_counts = ((PyArrayObject *)__pyx_t_9); __pyx_t_9 = 0; /* "pandas/src/reduce.pyx":343 * labels = self.labels * counts = np.zeros(self.ngroups, dtype=np.int64) * group_size = 0 # <<<<<<<<<<<<<< * n = len(self.arr) * name = self.name */ __pyx_v_group_size = 0; /* "pandas/src/reduce.pyx":344 * counts = np.zeros(self.ngroups, dtype=np.int64) * group_size = 0 * n = len(self.arr) # <<<<<<<<<<<<<< * name = self.name * */ __pyx_t_9 = __pyx_v_self->arr; __Pyx_INCREF(__pyx_t_9); __pyx_t_11 = PyObject_Length(__pyx_t_9); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 344; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_v_n = __pyx_t_11; /* "pandas/src/reduce.pyx":345 * group_size = 0 * n = len(self.arr) * name = self.name # <<<<<<<<<<<<<< * * vslider = Slider(self.arr, self.dummy_arr) */ __pyx_t_9 = __pyx_v_self->name; __Pyx_INCREF(__pyx_t_9); __pyx_v_name = __pyx_t_9; __pyx_t_9 = 0; /* "pandas/src/reduce.pyx":347 * name = self.name * * vslider = Slider(self.arr, self.dummy_arr) # <<<<<<<<<<<<<< * islider = Slider(self.index, self.dummy_index) * */ __pyx_t_9 = PyTuple_New(2); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 347; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_INCREF(__pyx_v_self->arr); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_v_self->arr); __Pyx_GIVEREF(__pyx_v_self->arr); __Pyx_INCREF(__pyx_v_self->dummy_arr); PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_v_self->dummy_arr); __Pyx_GIVEREF(__pyx_v_self->dummy_arr); __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_6pandas_3lib_Slider)), __pyx_t_9, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 347; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_v_vslider = ((struct __pyx_obj_6pandas_3lib_Slider *)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/reduce.pyx":348 * * vslider = Slider(self.arr, self.dummy_arr) * islider = Slider(self.index, self.dummy_index) # <<<<<<<<<<<<<< * * gin = self.dummy_index._engine */ __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 348; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_self->index); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_self->index); __Pyx_GIVEREF(__pyx_v_self->index); __Pyx_INCREF(__pyx_v_self->dummy_index); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_self->dummy_index); __Pyx_GIVEREF(__pyx_v_self->dummy_index); __pyx_t_9 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_6pandas_3lib_Slider)), __pyx_t_1, NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 348; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_islider = ((struct __pyx_obj_6pandas_3lib_Slider *)__pyx_t_9); __pyx_t_9 = 0; /* "pandas/src/reduce.pyx":350 * islider = Slider(self.index, self.dummy_index) * * gin = self.dummy_index._engine # <<<<<<<<<<<<<< * * try: */ __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->dummy_index, __pyx_n_s_engine); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 350; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_v_gin = __pyx_t_9; __pyx_t_9 = 0; /* "pandas/src/reduce.pyx":352 * gin = self.dummy_index._engine * * try: # <<<<<<<<<<<<<< * for i in range(n): * group_size += 1 */ /*try:*/ { { __Pyx_ExceptionSave(&__pyx_t_3, &__pyx_t_4, &__pyx_t_5); __Pyx_XGOTREF(__pyx_t_3); __Pyx_XGOTREF(__pyx_t_4); __Pyx_XGOTREF(__pyx_t_5); /*try:*/ { /* "pandas/src/reduce.pyx":353 * * try: * for i in range(n): # <<<<<<<<<<<<<< * group_size += 1 * */ __pyx_t_11 = __pyx_v_n; for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_11; __pyx_t_12+=1) { __pyx_v_i = __pyx_t_12; /* "pandas/src/reduce.pyx":354 * try: * for i in range(n): * group_size += 1 # <<<<<<<<<<<<<< * * lab = labels[i] */ __pyx_v_group_size = (__pyx_v_group_size + 1); /* "pandas/src/reduce.pyx":356 * group_size += 1 * * lab = labels[i] # <<<<<<<<<<<<<< * * if i == n - 1 or lab != labels[i + 1]: */ __pyx_t_13 = __pyx_v_i; __pyx_t_2 = -1; if (__pyx_t_13 < 0) { __pyx_t_13 += __pyx_pybuffernd_labels.diminfo[0].shape; if (unlikely(__pyx_t_13 < 0)) __pyx_t_2 = 0; } else if (unlikely(__pyx_t_13 >= __pyx_pybuffernd_labels.diminfo[0].shape)) __pyx_t_2 = 0; if (unlikely(__pyx_t_2 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 356; __pyx_clineno = __LINE__; goto __pyx_L6_error;} } __pyx_v_lab = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_labels.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_labels.diminfo[0].strides)); /* "pandas/src/reduce.pyx":358 * lab = labels[i] * * if i == n - 1 or lab != labels[i + 1]: # <<<<<<<<<<<<<< * if lab == -1: * islider.advance(group_size) */ __pyx_t_14 = ((__pyx_v_i == (__pyx_v_n - 1)) != 0); if (!__pyx_t_14) { __pyx_t_15 = (__pyx_v_i + 1); __pyx_t_2 = -1; if (__pyx_t_15 < 0) { __pyx_t_15 += __pyx_pybuffernd_labels.diminfo[0].shape; if (unlikely(__pyx_t_15 < 0)) __pyx_t_2 = 0; } else if (unlikely(__pyx_t_15 >= __pyx_pybuffernd_labels.diminfo[0].shape)) __pyx_t_2 = 0; if (unlikely(__pyx_t_2 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 358; __pyx_clineno = __LINE__; goto __pyx_L6_error;} } __pyx_t_16 = ((__pyx_v_lab != (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_labels.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_labels.diminfo[0].strides))) != 0); __pyx_t_17 = __pyx_t_16; } else { __pyx_t_17 = __pyx_t_14; } if (__pyx_t_17) { /* "pandas/src/reduce.pyx":359 * * if i == n - 1 or lab != labels[i + 1]: * if lab == -1: # <<<<<<<<<<<<<< * islider.advance(group_size) * vslider.advance(group_size) */ __pyx_t_17 = ((__pyx_v_lab == -1) != 0); if (__pyx_t_17) { /* "pandas/src/reduce.pyx":360 * if i == n - 1 or lab != labels[i + 1]: * if lab == -1: * islider.advance(group_size) # <<<<<<<<<<<<<< * vslider.advance(group_size) * group_size = 0 */ __pyx_t_9 = ((struct __pyx_vtabstruct_6pandas_3lib_Slider *)__pyx_v_islider->__pyx_vtab)->advance(__pyx_v_islider, __pyx_v_group_size, 0); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 360; __pyx_clineno = __LINE__; goto __pyx_L6_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; /* "pandas/src/reduce.pyx":361 * if lab == -1: * islider.advance(group_size) * vslider.advance(group_size) # <<<<<<<<<<<<<< * group_size = 0 * continue */ __pyx_t_9 = ((struct __pyx_vtabstruct_6pandas_3lib_Slider *)__pyx_v_vslider->__pyx_vtab)->advance(__pyx_v_vslider, __pyx_v_group_size, 0); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 361; __pyx_clineno = __LINE__; goto __pyx_L6_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; /* "pandas/src/reduce.pyx":362 * islider.advance(group_size) * vslider.advance(group_size) * group_size = 0 # <<<<<<<<<<<<<< * continue * */ __pyx_v_group_size = 0; /* "pandas/src/reduce.pyx":363 * vslider.advance(group_size) * group_size = 0 * continue # <<<<<<<<<<<<<< * * islider.set_length(group_size) */ goto __pyx_L14_continue; } /* "pandas/src/reduce.pyx":365 * continue * * islider.set_length(group_size) # <<<<<<<<<<<<<< * vslider.set_length(group_size) * */ __pyx_t_9 = ((struct __pyx_vtabstruct_6pandas_3lib_Slider *)__pyx_v_islider->__pyx_vtab)->set_length(__pyx_v_islider, __pyx_v_group_size, 0); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 365; __pyx_clineno = __LINE__; goto __pyx_L6_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; /* "pandas/src/reduce.pyx":366 * * islider.set_length(group_size) * vslider.set_length(group_size) # <<<<<<<<<<<<<< * * if cached_typ is None: */ __pyx_t_9 = ((struct __pyx_vtabstruct_6pandas_3lib_Slider *)__pyx_v_vslider->__pyx_vtab)->set_length(__pyx_v_vslider, __pyx_v_group_size, 0); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 366; __pyx_clineno = __LINE__; goto __pyx_L6_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; /* "pandas/src/reduce.pyx":368 * vslider.set_length(group_size) * * if cached_typ is None: # <<<<<<<<<<<<<< * cached_typ = self.typ(vslider.buf, index=islider.buf, * name=name) */ __pyx_t_17 = (__pyx_v_cached_typ == Py_None); __pyx_t_14 = (__pyx_t_17 != 0); if (__pyx_t_14) { /* "pandas/src/reduce.pyx":369 * * if cached_typ is None: * cached_typ = self.typ(vslider.buf, index=islider.buf, # <<<<<<<<<<<<<< * name=name) * else: */ __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 369; __pyx_clineno = __LINE__; goto __pyx_L6_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_INCREF(((PyObject *)__pyx_v_vslider->buf)); PyTuple_SET_ITEM(__pyx_t_9, 0, ((PyObject *)__pyx_v_vslider->buf)); __Pyx_GIVEREF(((PyObject *)__pyx_v_vslider->buf)); __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 369; __pyx_clineno = __LINE__; goto __pyx_L6_error;} __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_index, ((PyObject *)__pyx_v_islider->buf)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 369; __pyx_clineno = __LINE__; goto __pyx_L6_error;} /* "pandas/src/reduce.pyx":370 * if cached_typ is None: * cached_typ = self.typ(vslider.buf, index=islider.buf, * name=name) # <<<<<<<<<<<<<< * else: * object.__setattr__(cached_typ._data._block, 'values', vslider.buf) */ if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_name, __pyx_v_name) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 369; __pyx_clineno = __LINE__; goto __pyx_L6_error;} /* "pandas/src/reduce.pyx":369 * * if cached_typ is None: * cached_typ = self.typ(vslider.buf, index=islider.buf, # <<<<<<<<<<<<<< * name=name) * else: */ __pyx_t_7 = PyObject_Call(__pyx_v_self->typ, __pyx_t_9, __pyx_t_1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 369; __pyx_clineno = __LINE__; goto __pyx_L6_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF_SET(__pyx_v_cached_typ, __pyx_t_7); __pyx_t_7 = 0; goto __pyx_L18; } /*else*/ { /* "pandas/src/reduce.pyx":372 * name=name) * else: * object.__setattr__(cached_typ._data._block, 'values', vslider.buf) # <<<<<<<<<<<<<< * object.__setattr__(cached_typ, '_index', islider.buf) * object.__setattr__(cached_typ, 'name', name) */ __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_builtin_object, __pyx_n_s_setattr); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 372; __pyx_clineno = __LINE__; goto __pyx_L6_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_cached_typ, __pyx_n_s_data_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 372; __pyx_clineno = __LINE__; goto __pyx_L6_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_block); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 372; __pyx_clineno = __LINE__; goto __pyx_L6_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 372; __pyx_clineno = __LINE__; goto __pyx_L6_error;} __Pyx_GOTREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_9); __Pyx_GIVEREF(__pyx_t_9); __Pyx_INCREF(__pyx_n_s_values); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_n_s_values); __Pyx_GIVEREF(__pyx_n_s_values); __Pyx_INCREF(((PyObject *)__pyx_v_vslider->buf)); PyTuple_SET_ITEM(__pyx_t_1, 2, ((PyObject *)__pyx_v_vslider->buf)); __Pyx_GIVEREF(((PyObject *)__pyx_v_vslider->buf)); __pyx_t_9 = 0; __pyx_t_9 = PyObject_Call(__pyx_t_7, __pyx_t_1, NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 372; __pyx_clineno = __LINE__; goto __pyx_L6_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; /* "pandas/src/reduce.pyx":373 * else: * object.__setattr__(cached_typ._data._block, 'values', vslider.buf) * object.__setattr__(cached_typ, '_index', islider.buf) # <<<<<<<<<<<<<< * object.__setattr__(cached_typ, 'name', name) * */ __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_builtin_object, __pyx_n_s_setattr); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 373; __pyx_clineno = __LINE__; goto __pyx_L6_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 373; __pyx_clineno = __LINE__; goto __pyx_L6_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_cached_typ); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_cached_typ); __Pyx_GIVEREF(__pyx_v_cached_typ); __Pyx_INCREF(__pyx_n_s_index_2); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_n_s_index_2); __Pyx_GIVEREF(__pyx_n_s_index_2); __Pyx_INCREF(((PyObject *)__pyx_v_islider->buf)); PyTuple_SET_ITEM(__pyx_t_1, 2, ((PyObject *)__pyx_v_islider->buf)); __Pyx_GIVEREF(((PyObject *)__pyx_v_islider->buf)); __pyx_t_7 = PyObject_Call(__pyx_t_9, __pyx_t_1, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 373; __pyx_clineno = __LINE__; goto __pyx_L6_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; /* "pandas/src/reduce.pyx":374 * object.__setattr__(cached_typ._data._block, 'values', vslider.buf) * object.__setattr__(cached_typ, '_index', islider.buf) * object.__setattr__(cached_typ, 'name', name) # <<<<<<<<<<<<<< * * res = self.f(cached_typ) */ __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_builtin_object, __pyx_n_s_setattr); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 374; __pyx_clineno = __LINE__; goto __pyx_L6_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 374; __pyx_clineno = __LINE__; goto __pyx_L6_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_cached_typ); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_cached_typ); __Pyx_GIVEREF(__pyx_v_cached_typ); __Pyx_INCREF(__pyx_n_s_name); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_n_s_name); __Pyx_GIVEREF(__pyx_n_s_name); __Pyx_INCREF(__pyx_v_name); PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_name); __Pyx_GIVEREF(__pyx_v_name); __pyx_t_9 = PyObject_Call(__pyx_t_7, __pyx_t_1, NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 374; __pyx_clineno = __LINE__; goto __pyx_L6_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; } __pyx_L18:; /* "pandas/src/reduce.pyx":376 * object.__setattr__(cached_typ, 'name', name) * * res = self.f(cached_typ) # <<<<<<<<<<<<<< * res = _extract_result(res) * if not initialized: */ __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 376; __pyx_clineno = __LINE__; goto __pyx_L6_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_INCREF(__pyx_v_cached_typ); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_v_cached_typ); __Pyx_GIVEREF(__pyx_v_cached_typ); __pyx_t_1 = PyObject_Call(__pyx_v_self->f, __pyx_t_9, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 376; __pyx_clineno = __LINE__; goto __pyx_L6_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_XDECREF_SET(__pyx_v_res, __pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/reduce.pyx":377 * * res = self.f(cached_typ) * res = _extract_result(res) # <<<<<<<<<<<<<< * if not initialized: * result = self._get_result_array(res) */ __pyx_t_1 = __pyx_f_6pandas_3lib__extract_result(__pyx_v_res); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 377; __pyx_clineno = __LINE__; goto __pyx_L6_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF_SET(__pyx_v_res, __pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/reduce.pyx":378 * res = self.f(cached_typ) * res = _extract_result(res) * if not initialized: # <<<<<<<<<<<<<< * result = self._get_result_array(res) * initialized = 1 */ __pyx_t_14 = ((!(__pyx_v_initialized != 0)) != 0); if (__pyx_t_14) { /* "pandas/src/reduce.pyx":379 * res = _extract_result(res) * if not initialized: * result = self._get_result_array(res) # <<<<<<<<<<<<<< * initialized = 1 * */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get_result_array); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 379; __pyx_clineno = __LINE__; goto __pyx_L6_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 379; __pyx_clineno = __LINE__; goto __pyx_L6_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_INCREF(__pyx_v_res); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_v_res); __Pyx_GIVEREF(__pyx_v_res); __pyx_t_7 = PyObject_Call(__pyx_t_1, __pyx_t_9, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 379; __pyx_clineno = __LINE__; goto __pyx_L6_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; if (!(likely(((__pyx_t_7) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_7, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 379; __pyx_clineno = __LINE__; goto __pyx_L6_error;} __Pyx_XDECREF_SET(__pyx_v_result, ((PyArrayObject *)__pyx_t_7)); __pyx_t_7 = 0; /* "pandas/src/reduce.pyx":380 * if not initialized: * result = self._get_result_array(res) * initialized = 1 # <<<<<<<<<<<<<< * * util.assign_value_1d(result, lab, res) */ __pyx_v_initialized = 1; goto __pyx_L19; } __pyx_L19:; /* "pandas/src/reduce.pyx":382 * initialized = 1 * * util.assign_value_1d(result, lab, res) # <<<<<<<<<<<<<< * counts[lab] = group_size * islider.advance(group_size) */ if (unlikely(!__pyx_v_result)) { __Pyx_RaiseUnboundLocalError("result"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 382; __pyx_clineno = __LINE__; goto __pyx_L6_error;} } __pyx_t_2 = assign_value_1d(__pyx_v_result, __pyx_v_lab, __pyx_v_res); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 382; __pyx_clineno = __LINE__; goto __pyx_L6_error;} /* "pandas/src/reduce.pyx":383 * * util.assign_value_1d(result, lab, res) * counts[lab] = group_size # <<<<<<<<<<<<<< * islider.advance(group_size) * vslider.advance(group_size) */ __pyx_t_18 = __pyx_v_lab; __pyx_t_2 = -1; if (__pyx_t_18 < 0) { __pyx_t_18 += __pyx_pybuffernd_counts.diminfo[0].shape; if (unlikely(__pyx_t_18 < 0)) __pyx_t_2 = 0; } else if (unlikely(__pyx_t_18 >= __pyx_pybuffernd_counts.diminfo[0].shape)) __pyx_t_2 = 0; if (unlikely(__pyx_t_2 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 383; __pyx_clineno = __LINE__; goto __pyx_L6_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_counts.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_counts.diminfo[0].strides) = __pyx_v_group_size; /* "pandas/src/reduce.pyx":384 * util.assign_value_1d(result, lab, res) * counts[lab] = group_size * islider.advance(group_size) # <<<<<<<<<<<<<< * vslider.advance(group_size) * */ __pyx_t_7 = ((struct __pyx_vtabstruct_6pandas_3lib_Slider *)__pyx_v_islider->__pyx_vtab)->advance(__pyx_v_islider, __pyx_v_group_size, 0); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 384; __pyx_clineno = __LINE__; goto __pyx_L6_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; /* "pandas/src/reduce.pyx":385 * counts[lab] = group_size * islider.advance(group_size) * vslider.advance(group_size) # <<<<<<<<<<<<<< * * group_size = 0 */ __pyx_t_7 = ((struct __pyx_vtabstruct_6pandas_3lib_Slider *)__pyx_v_vslider->__pyx_vtab)->advance(__pyx_v_vslider, __pyx_v_group_size, 0); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 385; __pyx_clineno = __LINE__; goto __pyx_L6_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; /* "pandas/src/reduce.pyx":387 * vslider.advance(group_size) * * group_size = 0 # <<<<<<<<<<<<<< * * gin.clear_mapping() */ __pyx_v_group_size = 0; /* "pandas/src/reduce.pyx":389 * group_size = 0 * * gin.clear_mapping() # <<<<<<<<<<<<<< * * except: */ __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_gin, __pyx_n_s_clear_mapping); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 389; __pyx_clineno = __LINE__; goto __pyx_L6_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_t_9 = PyObject_Call(__pyx_t_7, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 389; __pyx_clineno = __LINE__; goto __pyx_L6_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; goto __pyx_L16; } __pyx_L16:; __pyx_L14_continue:; } } __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; goto __pyx_L13_try_end; __pyx_L6_error:; __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; /* "pandas/src/reduce.pyx":391 * gin.clear_mapping() * * except: # <<<<<<<<<<<<<< * raise * finally: */ /*except:*/ { __Pyx_AddTraceback("pandas.lib.SeriesGrouper.get_result", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_9, &__pyx_t_7, &__pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 391; __pyx_clineno = __LINE__; goto __pyx_L8_except_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_GOTREF(__pyx_t_7); __Pyx_GOTREF(__pyx_t_1); /* "pandas/src/reduce.pyx":392 * * except: * raise # <<<<<<<<<<<<<< * finally: * # so we don't free the wrong memory */ __Pyx_GIVEREF(__pyx_t_9); __Pyx_GIVEREF(__pyx_t_7); __Pyx_XGIVEREF(__pyx_t_1); __Pyx_ErrRestore(__pyx_t_9, __pyx_t_7, __pyx_t_1); __pyx_t_9 = 0; __pyx_t_7 = 0; __pyx_t_1 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 392; __pyx_clineno = __LINE__; goto __pyx_L8_except_error;} __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L7_exception_handled; } __pyx_L8_except_error:; __Pyx_XGIVEREF(__pyx_t_3); __Pyx_XGIVEREF(__pyx_t_4); __Pyx_XGIVEREF(__pyx_t_5); __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5); goto __pyx_L4_error; __pyx_L7_exception_handled:; __Pyx_XGIVEREF(__pyx_t_3); __Pyx_XGIVEREF(__pyx_t_4); __Pyx_XGIVEREF(__pyx_t_5); __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5); __pyx_L13_try_end:; } } /* "pandas/src/reduce.pyx":395 * finally: * # so we don't free the wrong memory * islider.reset() # <<<<<<<<<<<<<< * vslider.reset() * */ /*finally:*/ { /*normal exit:*/{ __pyx_t_1 = ((struct __pyx_vtabstruct_6pandas_3lib_Slider *)__pyx_v_islider->__pyx_vtab)->reset(__pyx_v_islider, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 395; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/reduce.pyx":396 * # so we don't free the wrong memory * islider.reset() * vslider.reset() # <<<<<<<<<<<<<< * * if result.dtype == np.object_: */ __pyx_t_1 = ((struct __pyx_vtabstruct_6pandas_3lib_Slider *)__pyx_v_vslider->__pyx_vtab)->reset(__pyx_v_vslider, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 396; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L5; } /*exception exit:*/{ __pyx_L4_error:; __pyx_t_5 = 0; __pyx_t_4 = 0; __pyx_t_3 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0; __pyx_t_23 = 0; __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_21, &__pyx_t_22, &__pyx_t_23); if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_5, &__pyx_t_4, &__pyx_t_3) < 0)) __Pyx_ErrFetch(&__pyx_t_5, &__pyx_t_4, &__pyx_t_3); __Pyx_XGOTREF(__pyx_t_5); __Pyx_XGOTREF(__pyx_t_4); __Pyx_XGOTREF(__pyx_t_3); __Pyx_XGOTREF(__pyx_t_21); __Pyx_XGOTREF(__pyx_t_22); __Pyx_XGOTREF(__pyx_t_23); __pyx_t_2 = __pyx_lineno; __pyx_t_19 = __pyx_clineno; __pyx_t_20 = __pyx_filename; { /* "pandas/src/reduce.pyx":395 * finally: * # so we don't free the wrong memory * islider.reset() # <<<<<<<<<<<<<< * vslider.reset() * */ __pyx_t_1 = ((struct __pyx_vtabstruct_6pandas_3lib_Slider *)__pyx_v_islider->__pyx_vtab)->reset(__pyx_v_islider, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 395; __pyx_clineno = __LINE__; goto __pyx_L23_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/reduce.pyx":396 * # so we don't free the wrong memory * islider.reset() * vslider.reset() # <<<<<<<<<<<<<< * * if result.dtype == np.object_: */ __pyx_t_1 = ((struct __pyx_vtabstruct_6pandas_3lib_Slider *)__pyx_v_vslider->__pyx_vtab)->reset(__pyx_v_vslider, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 396; __pyx_clineno = __LINE__; goto __pyx_L23_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } if (PY_MAJOR_VERSION >= 3) { __Pyx_XGIVEREF(__pyx_t_21); __Pyx_XGIVEREF(__pyx_t_22); __Pyx_XGIVEREF(__pyx_t_23); __Pyx_ExceptionReset(__pyx_t_21, __pyx_t_22, __pyx_t_23); } __Pyx_XGIVEREF(__pyx_t_5); __Pyx_XGIVEREF(__pyx_t_4); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ErrRestore(__pyx_t_5, __pyx_t_4, __pyx_t_3); __pyx_t_5 = 0; __pyx_t_4 = 0; __pyx_t_3 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0; __pyx_t_23 = 0; __pyx_lineno = __pyx_t_2; __pyx_clineno = __pyx_t_19; __pyx_filename = __pyx_t_20; goto __pyx_L1_error; __pyx_L23_error:; if (PY_MAJOR_VERSION >= 3) { __Pyx_XGIVEREF(__pyx_t_21); __Pyx_XGIVEREF(__pyx_t_22); __Pyx_XGIVEREF(__pyx_t_23); __Pyx_ExceptionReset(__pyx_t_21, __pyx_t_22, __pyx_t_23); } __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0; __pyx_t_23 = 0; goto __pyx_L1_error; } __pyx_L5:; } /* "pandas/src/reduce.pyx":398 * vslider.reset() * * if result.dtype == np.object_: # <<<<<<<<<<<<<< * result = maybe_convert_objects(result) * */ if (unlikely(!__pyx_v_result)) { __Pyx_RaiseUnboundLocalError("result"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 398; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_result), __pyx_n_s_dtype); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 398; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 398; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_object_2); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 398; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_7 = PyObject_RichCompare(__pyx_t_1, __pyx_t_9, Py_EQ); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 398; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_14 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_14 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 398; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (__pyx_t_14) { /* "pandas/src/reduce.pyx":399 * * if result.dtype == np.object_: * result = maybe_convert_objects(result) # <<<<<<<<<<<<<< * * return result, counts */ __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_maybe_convert_objects); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 399; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 399; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_INCREF(((PyObject *)__pyx_v_result)); PyTuple_SET_ITEM(__pyx_t_9, 0, ((PyObject *)__pyx_v_result)); __Pyx_GIVEREF(((PyObject *)__pyx_v_result)); __pyx_t_1 = PyObject_Call(__pyx_t_7, __pyx_t_9, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 399; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 399; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF_SET(__pyx_v_result, ((PyArrayObject *)__pyx_t_1)); __pyx_t_1 = 0; goto __pyx_L24; } __pyx_L24:; /* "pandas/src/reduce.pyx":401 * result = maybe_convert_objects(result) * * return result, counts # <<<<<<<<<<<<<< * * def _get_result_array(self, object res): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 401; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)__pyx_v_result)); PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_result)); __Pyx_GIVEREF(((PyObject *)__pyx_v_result)); __Pyx_INCREF(((PyObject *)__pyx_v_counts)); PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject *)__pyx_v_counts)); __Pyx_GIVEREF(((PyObject *)__pyx_v_counts)); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "pandas/src/reduce.pyx":330 * return values, index * * def get_result(self): # <<<<<<<<<<<<<< * cdef: * ndarray arr, result */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_counts.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_labels.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.lib.SeriesGrouper.get_result", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_counts.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_labels.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_result); __Pyx_XDECREF((PyObject *)__pyx_v_labels); __Pyx_XDECREF((PyObject *)__pyx_v_counts); __Pyx_XDECREF(__pyx_v_res); __Pyx_XDECREF((PyObject *)__pyx_v_vslider); __Pyx_XDECREF((PyObject *)__pyx_v_islider); __Pyx_XDECREF(__pyx_v_gin); __Pyx_XDECREF(__pyx_v_name); __Pyx_XDECREF(__pyx_v_cached_typ); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/reduce.pyx":403 * return result, counts * * def _get_result_array(self, object res): # <<<<<<<<<<<<<< * try: * assert(not isinstance(res, np.ndarray)) */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_3lib_13SeriesGrouper_7_get_result_array(PyObject *__pyx_v_self, PyObject *__pyx_v_res); /*proto*/ static PyObject *__pyx_pw_6pandas_3lib_13SeriesGrouper_7_get_result_array(PyObject *__pyx_v_self, PyObject *__pyx_v_res) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_get_result_array (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_3lib_13SeriesGrouper_6_get_result_array(((struct __pyx_obj_6pandas_3lib_SeriesGrouper *)__pyx_v_self), ((PyObject *)__pyx_v_res)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_3lib_13SeriesGrouper_6_get_result_array(struct __pyx_obj_6pandas_3lib_SeriesGrouper *__pyx_v_self, PyObject *__pyx_v_res) { PyObject *__pyx_v_result = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_t_4; Py_ssize_t __pyx_t_5; PyObject *__pyx_t_6 = NULL; Py_ssize_t __pyx_t_7; int __pyx_t_8; int __pyx_t_9; PyObject *__pyx_t_10 = NULL; PyObject *__pyx_t_11 = NULL; PyObject *__pyx_t_12 = NULL; int __pyx_t_13; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_get_result_array", 0); /* "pandas/src/reduce.pyx":404 * * def _get_result_array(self, object res): * try: # <<<<<<<<<<<<<< * assert(not isinstance(res, np.ndarray)) * assert(not (isinstance(res, list) and len(res) == len(self.dummy_arr))) */ { __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:*/ { /* "pandas/src/reduce.pyx":405 * def _get_result_array(self, object res): * try: * assert(not isinstance(res, np.ndarray)) # <<<<<<<<<<<<<< * assert(not (isinstance(res, list) and len(res) == len(self.dummy_arr))) * */ #ifndef CYTHON_WITHOUT_ASSERTIONS if (unlikely(!Py_OptimizeFlag)) { __pyx_t_4 = __Pyx_TypeCheck(__pyx_v_res, ((PyObject*)__pyx_ptype_5numpy_ndarray)); if (unlikely(!((!(__pyx_t_4 != 0)) != 0))) { PyErr_SetNone(PyExc_AssertionError); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 405; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } #endif /* "pandas/src/reduce.pyx":406 * try: * assert(not isinstance(res, np.ndarray)) * assert(not (isinstance(res, list) and len(res) == len(self.dummy_arr))) # <<<<<<<<<<<<<< * * result = np.empty(self.ngroups, dtype='O') */ #ifndef CYTHON_WITHOUT_ASSERTIONS if (unlikely(!Py_OptimizeFlag)) { __pyx_t_4 = PyList_Check(__pyx_v_res); if ((__pyx_t_4 != 0)) { __pyx_t_5 = PyObject_Length(__pyx_v_res); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 406; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_t_6 = __pyx_v_self->dummy_arr; __Pyx_INCREF(__pyx_t_6); __pyx_t_7 = PyObject_Length(__pyx_t_6); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 406; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_8 = ((__pyx_t_5 == __pyx_t_7) != 0); __pyx_t_9 = __pyx_t_8; } else { __pyx_t_9 = (__pyx_t_4 != 0); } if (unlikely(!((!__pyx_t_9) != 0))) { PyErr_SetNone(PyExc_AssertionError); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 406; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } #endif /* "pandas/src/reduce.pyx":408 * assert(not (isinstance(res, list) and len(res) == len(self.dummy_arr))) * * result = np.empty(self.ngroups, dtype='O') # <<<<<<<<<<<<<< * except Exception: * raise ValueError('function does not reduce') */ __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 408; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_empty); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 408; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyInt_FromSsize_t(__pyx_v_self->ngroups); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 408; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_11 = PyTuple_New(1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 408; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyDict_New(); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 408; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_6); if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_dtype, __pyx_n_s_O) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 408; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_t_12 = PyObject_Call(__pyx_t_10, __pyx_t_11, __pyx_t_6); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 408; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_v_result = __pyx_t_12; __pyx_t_12 = 0; } __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L10_try_end; __pyx_L3_error:; __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; /* "pandas/src/reduce.pyx":409 * * result = np.empty(self.ngroups, dtype='O') * except Exception: # <<<<<<<<<<<<<< * raise ValueError('function does not reduce') * return result */ __pyx_t_13 = PyErr_ExceptionMatches(__pyx_builtin_Exception); if (__pyx_t_13) { __Pyx_AddTraceback("pandas.lib.SeriesGrouper._get_result_array", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_12, &__pyx_t_6, &__pyx_t_11) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 409; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} __Pyx_GOTREF(__pyx_t_12); __Pyx_GOTREF(__pyx_t_6); __Pyx_GOTREF(__pyx_t_11); /* "pandas/src/reduce.pyx":410 * result = np.empty(self.ngroups, dtype='O') * except Exception: * raise ValueError('function does not reduce') # <<<<<<<<<<<<<< * return result * */ __pyx_t_10 = PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__23, NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 410; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_Raise(__pyx_t_10, 0, 0, 0); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 410; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; goto __pyx_L4_exception_handled; } goto __pyx_L5_except_error; __pyx_L5_except_error:; __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); goto __pyx_L1_error; __pyx_L4_exception_handled:; __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); __pyx_L10_try_end:; } /* "pandas/src/reduce.pyx":411 * except Exception: * raise ValueError('function does not reduce') * return result # <<<<<<<<<<<<<< * * cdef inline _extract_result(object res): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_result); __pyx_r = __pyx_v_result; goto __pyx_L0; /* "pandas/src/reduce.pyx":403 * return result, counts * * def _get_result_array(self, object res): # <<<<<<<<<<<<<< * try: * assert(not isinstance(res, np.ndarray)) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_10); __Pyx_XDECREF(__pyx_t_11); __Pyx_XDECREF(__pyx_t_12); __Pyx_AddTraceback("pandas.lib.SeriesGrouper._get_result_array", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_result); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/reduce.pyx":295 * * cdef public: * object arr, index, dummy_arr, dummy_index, f, labels, values, typ, name # <<<<<<<<<<<<<< * * def __init__(self, object series, object f, object labels, */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_3lib_13SeriesGrouper_3arr_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6pandas_3lib_13SeriesGrouper_3arr_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_3lib_13SeriesGrouper_3arr___get__(((struct __pyx_obj_6pandas_3lib_SeriesGrouper *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_3lib_13SeriesGrouper_3arr___get__(struct __pyx_obj_6pandas_3lib_SeriesGrouper *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_self->arr); __pyx_r = __pyx_v_self->arr; goto __pyx_L0; /* function exit code */ __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pandas_3lib_13SeriesGrouper_3arr_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ static int __pyx_pw_6pandas_3lib_13SeriesGrouper_3arr_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_3lib_13SeriesGrouper_3arr_2__set__(((struct __pyx_obj_6pandas_3lib_SeriesGrouper *)__pyx_v_self), ((PyObject *)__pyx_v_value)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pandas_3lib_13SeriesGrouper_3arr_2__set__(struct __pyx_obj_6pandas_3lib_SeriesGrouper *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__", 0); __Pyx_INCREF(__pyx_v_value); __Pyx_GIVEREF(__pyx_v_value); __Pyx_GOTREF(__pyx_v_self->arr); __Pyx_DECREF(__pyx_v_self->arr); __pyx_v_self->arr = __pyx_v_value; /* function exit code */ __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pandas_3lib_13SeriesGrouper_3arr_5__del__(PyObject *__pyx_v_self); /*proto*/ static int __pyx_pw_6pandas_3lib_13SeriesGrouper_3arr_5__del__(PyObject *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_3lib_13SeriesGrouper_3arr_4__del__(((struct __pyx_obj_6pandas_3lib_SeriesGrouper *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pandas_3lib_13SeriesGrouper_3arr_4__del__(struct __pyx_obj_6pandas_3lib_SeriesGrouper *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__", 0); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->arr); __Pyx_DECREF(__pyx_v_self->arr); __pyx_v_self->arr = Py_None; /* function exit code */ __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_3lib_13SeriesGrouper_5index_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6pandas_3lib_13SeriesGrouper_5index_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_3lib_13SeriesGrouper_5index___get__(((struct __pyx_obj_6pandas_3lib_SeriesGrouper *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_3lib_13SeriesGrouper_5index___get__(struct __pyx_obj_6pandas_3lib_SeriesGrouper *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_self->index); __pyx_r = __pyx_v_self->index; goto __pyx_L0; /* function exit code */ __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pandas_3lib_13SeriesGrouper_5index_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ static int __pyx_pw_6pandas_3lib_13SeriesGrouper_5index_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_3lib_13SeriesGrouper_5index_2__set__(((struct __pyx_obj_6pandas_3lib_SeriesGrouper *)__pyx_v_self), ((PyObject *)__pyx_v_value)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pandas_3lib_13SeriesGrouper_5index_2__set__(struct __pyx_obj_6pandas_3lib_SeriesGrouper *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__", 0); __Pyx_INCREF(__pyx_v_value); __Pyx_GIVEREF(__pyx_v_value); __Pyx_GOTREF(__pyx_v_self->index); __Pyx_DECREF(__pyx_v_self->index); __pyx_v_self->index = __pyx_v_value; /* function exit code */ __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pandas_3lib_13SeriesGrouper_5index_5__del__(PyObject *__pyx_v_self); /*proto*/ static int __pyx_pw_6pandas_3lib_13SeriesGrouper_5index_5__del__(PyObject *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_3lib_13SeriesGrouper_5index_4__del__(((struct __pyx_obj_6pandas_3lib_SeriesGrouper *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pandas_3lib_13SeriesGrouper_5index_4__del__(struct __pyx_obj_6pandas_3lib_SeriesGrouper *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__", 0); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->index); __Pyx_DECREF(__pyx_v_self->index); __pyx_v_self->index = Py_None; /* function exit code */ __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_3lib_13SeriesGrouper_9dummy_arr_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6pandas_3lib_13SeriesGrouper_9dummy_arr_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_3lib_13SeriesGrouper_9dummy_arr___get__(((struct __pyx_obj_6pandas_3lib_SeriesGrouper *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_3lib_13SeriesGrouper_9dummy_arr___get__(struct __pyx_obj_6pandas_3lib_SeriesGrouper *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_self->dummy_arr); __pyx_r = __pyx_v_self->dummy_arr; goto __pyx_L0; /* function exit code */ __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pandas_3lib_13SeriesGrouper_9dummy_arr_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ static int __pyx_pw_6pandas_3lib_13SeriesGrouper_9dummy_arr_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_3lib_13SeriesGrouper_9dummy_arr_2__set__(((struct __pyx_obj_6pandas_3lib_SeriesGrouper *)__pyx_v_self), ((PyObject *)__pyx_v_value)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pandas_3lib_13SeriesGrouper_9dummy_arr_2__set__(struct __pyx_obj_6pandas_3lib_SeriesGrouper *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__", 0); __Pyx_INCREF(__pyx_v_value); __Pyx_GIVEREF(__pyx_v_value); __Pyx_GOTREF(__pyx_v_self->dummy_arr); __Pyx_DECREF(__pyx_v_self->dummy_arr); __pyx_v_self->dummy_arr = __pyx_v_value; /* function exit code */ __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pandas_3lib_13SeriesGrouper_9dummy_arr_5__del__(PyObject *__pyx_v_self); /*proto*/ static int __pyx_pw_6pandas_3lib_13SeriesGrouper_9dummy_arr_5__del__(PyObject *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_3lib_13SeriesGrouper_9dummy_arr_4__del__(((struct __pyx_obj_6pandas_3lib_SeriesGrouper *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pandas_3lib_13SeriesGrouper_9dummy_arr_4__del__(struct __pyx_obj_6pandas_3lib_SeriesGrouper *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__", 0); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->dummy_arr); __Pyx_DECREF(__pyx_v_self->dummy_arr); __pyx_v_self->dummy_arr = Py_None; /* function exit code */ __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_3lib_13SeriesGrouper_11dummy_index_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6pandas_3lib_13SeriesGrouper_11dummy_index_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_3lib_13SeriesGrouper_11dummy_index___get__(((struct __pyx_obj_6pandas_3lib_SeriesGrouper *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_3lib_13SeriesGrouper_11dummy_index___get__(struct __pyx_obj_6pandas_3lib_SeriesGrouper *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_self->dummy_index); __pyx_r = __pyx_v_self->dummy_index; goto __pyx_L0; /* function exit code */ __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pandas_3lib_13SeriesGrouper_11dummy_index_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ static int __pyx_pw_6pandas_3lib_13SeriesGrouper_11dummy_index_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_3lib_13SeriesGrouper_11dummy_index_2__set__(((struct __pyx_obj_6pandas_3lib_SeriesGrouper *)__pyx_v_self), ((PyObject *)__pyx_v_value)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pandas_3lib_13SeriesGrouper_11dummy_index_2__set__(struct __pyx_obj_6pandas_3lib_SeriesGrouper *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__", 0); __Pyx_INCREF(__pyx_v_value); __Pyx_GIVEREF(__pyx_v_value); __Pyx_GOTREF(__pyx_v_self->dummy_index); __Pyx_DECREF(__pyx_v_self->dummy_index); __pyx_v_self->dummy_index = __pyx_v_value; /* function exit code */ __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pandas_3lib_13SeriesGrouper_11dummy_index_5__del__(PyObject *__pyx_v_self); /*proto*/ static int __pyx_pw_6pandas_3lib_13SeriesGrouper_11dummy_index_5__del__(PyObject *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_3lib_13SeriesGrouper_11dummy_index_4__del__(((struct __pyx_obj_6pandas_3lib_SeriesGrouper *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pandas_3lib_13SeriesGrouper_11dummy_index_4__del__(struct __pyx_obj_6pandas_3lib_SeriesGrouper *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__", 0); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->dummy_index); __Pyx_DECREF(__pyx_v_self->dummy_index); __pyx_v_self->dummy_index = Py_None; /* function exit code */ __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_3lib_13SeriesGrouper_1f_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6pandas_3lib_13SeriesGrouper_1f_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_3lib_13SeriesGrouper_1f___get__(((struct __pyx_obj_6pandas_3lib_SeriesGrouper *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_3lib_13SeriesGrouper_1f___get__(struct __pyx_obj_6pandas_3lib_SeriesGrouper *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_self->f); __pyx_r = __pyx_v_self->f; goto __pyx_L0; /* function exit code */ __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pandas_3lib_13SeriesGrouper_1f_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ static int __pyx_pw_6pandas_3lib_13SeriesGrouper_1f_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_3lib_13SeriesGrouper_1f_2__set__(((struct __pyx_obj_6pandas_3lib_SeriesGrouper *)__pyx_v_self), ((PyObject *)__pyx_v_value)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pandas_3lib_13SeriesGrouper_1f_2__set__(struct __pyx_obj_6pandas_3lib_SeriesGrouper *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__", 0); __Pyx_INCREF(__pyx_v_value); __Pyx_GIVEREF(__pyx_v_value); __Pyx_GOTREF(__pyx_v_self->f); __Pyx_DECREF(__pyx_v_self->f); __pyx_v_self->f = __pyx_v_value; /* function exit code */ __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pandas_3lib_13SeriesGrouper_1f_5__del__(PyObject *__pyx_v_self); /*proto*/ static int __pyx_pw_6pandas_3lib_13SeriesGrouper_1f_5__del__(PyObject *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_3lib_13SeriesGrouper_1f_4__del__(((struct __pyx_obj_6pandas_3lib_SeriesGrouper *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pandas_3lib_13SeriesGrouper_1f_4__del__(struct __pyx_obj_6pandas_3lib_SeriesGrouper *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__", 0); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->f); __Pyx_DECREF(__pyx_v_self->f); __pyx_v_self->f = Py_None; /* function exit code */ __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_3lib_13SeriesGrouper_6labels_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6pandas_3lib_13SeriesGrouper_6labels_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_3lib_13SeriesGrouper_6labels___get__(((struct __pyx_obj_6pandas_3lib_SeriesGrouper *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_3lib_13SeriesGrouper_6labels___get__(struct __pyx_obj_6pandas_3lib_SeriesGrouper *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_self->labels); __pyx_r = __pyx_v_self->labels; goto __pyx_L0; /* function exit code */ __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pandas_3lib_13SeriesGrouper_6labels_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ static int __pyx_pw_6pandas_3lib_13SeriesGrouper_6labels_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_3lib_13SeriesGrouper_6labels_2__set__(((struct __pyx_obj_6pandas_3lib_SeriesGrouper *)__pyx_v_self), ((PyObject *)__pyx_v_value)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pandas_3lib_13SeriesGrouper_6labels_2__set__(struct __pyx_obj_6pandas_3lib_SeriesGrouper *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__", 0); __Pyx_INCREF(__pyx_v_value); __Pyx_GIVEREF(__pyx_v_value); __Pyx_GOTREF(__pyx_v_self->labels); __Pyx_DECREF(__pyx_v_self->labels); __pyx_v_self->labels = __pyx_v_value; /* function exit code */ __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pandas_3lib_13SeriesGrouper_6labels_5__del__(PyObject *__pyx_v_self); /*proto*/ static int __pyx_pw_6pandas_3lib_13SeriesGrouper_6labels_5__del__(PyObject *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_3lib_13SeriesGrouper_6labels_4__del__(((struct __pyx_obj_6pandas_3lib_SeriesGrouper *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pandas_3lib_13SeriesGrouper_6labels_4__del__(struct __pyx_obj_6pandas_3lib_SeriesGrouper *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__", 0); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->labels); __Pyx_DECREF(__pyx_v_self->labels); __pyx_v_self->labels = Py_None; /* function exit code */ __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_3lib_13SeriesGrouper_6values_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6pandas_3lib_13SeriesGrouper_6values_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_3lib_13SeriesGrouper_6values___get__(((struct __pyx_obj_6pandas_3lib_SeriesGrouper *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_3lib_13SeriesGrouper_6values___get__(struct __pyx_obj_6pandas_3lib_SeriesGrouper *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_self->values); __pyx_r = __pyx_v_self->values; goto __pyx_L0; /* function exit code */ __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pandas_3lib_13SeriesGrouper_6values_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ static int __pyx_pw_6pandas_3lib_13SeriesGrouper_6values_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_3lib_13SeriesGrouper_6values_2__set__(((struct __pyx_obj_6pandas_3lib_SeriesGrouper *)__pyx_v_self), ((PyObject *)__pyx_v_value)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pandas_3lib_13SeriesGrouper_6values_2__set__(struct __pyx_obj_6pandas_3lib_SeriesGrouper *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__", 0); __Pyx_INCREF(__pyx_v_value); __Pyx_GIVEREF(__pyx_v_value); __Pyx_GOTREF(__pyx_v_self->values); __Pyx_DECREF(__pyx_v_self->values); __pyx_v_self->values = __pyx_v_value; /* function exit code */ __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pandas_3lib_13SeriesGrouper_6values_5__del__(PyObject *__pyx_v_self); /*proto*/ static int __pyx_pw_6pandas_3lib_13SeriesGrouper_6values_5__del__(PyObject *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_3lib_13SeriesGrouper_6values_4__del__(((struct __pyx_obj_6pandas_3lib_SeriesGrouper *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pandas_3lib_13SeriesGrouper_6values_4__del__(struct __pyx_obj_6pandas_3lib_SeriesGrouper *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__", 0); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->values); __Pyx_DECREF(__pyx_v_self->values); __pyx_v_self->values = Py_None; /* function exit code */ __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_3lib_13SeriesGrouper_3typ_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6pandas_3lib_13SeriesGrouper_3typ_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_3lib_13SeriesGrouper_3typ___get__(((struct __pyx_obj_6pandas_3lib_SeriesGrouper *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_3lib_13SeriesGrouper_3typ___get__(struct __pyx_obj_6pandas_3lib_SeriesGrouper *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_self->typ); __pyx_r = __pyx_v_self->typ; goto __pyx_L0; /* function exit code */ __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pandas_3lib_13SeriesGrouper_3typ_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ static int __pyx_pw_6pandas_3lib_13SeriesGrouper_3typ_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_3lib_13SeriesGrouper_3typ_2__set__(((struct __pyx_obj_6pandas_3lib_SeriesGrouper *)__pyx_v_self), ((PyObject *)__pyx_v_value)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pandas_3lib_13SeriesGrouper_3typ_2__set__(struct __pyx_obj_6pandas_3lib_SeriesGrouper *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__", 0); __Pyx_INCREF(__pyx_v_value); __Pyx_GIVEREF(__pyx_v_value); __Pyx_GOTREF(__pyx_v_self->typ); __Pyx_DECREF(__pyx_v_self->typ); __pyx_v_self->typ = __pyx_v_value; /* function exit code */ __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pandas_3lib_13SeriesGrouper_3typ_5__del__(PyObject *__pyx_v_self); /*proto*/ static int __pyx_pw_6pandas_3lib_13SeriesGrouper_3typ_5__del__(PyObject *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_3lib_13SeriesGrouper_3typ_4__del__(((struct __pyx_obj_6pandas_3lib_SeriesGrouper *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pandas_3lib_13SeriesGrouper_3typ_4__del__(struct __pyx_obj_6pandas_3lib_SeriesGrouper *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__", 0); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->typ); __Pyx_DECREF(__pyx_v_self->typ); __pyx_v_self->typ = Py_None; /* function exit code */ __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_3lib_13SeriesGrouper_4name_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6pandas_3lib_13SeriesGrouper_4name_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_3lib_13SeriesGrouper_4name___get__(((struct __pyx_obj_6pandas_3lib_SeriesGrouper *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_3lib_13SeriesGrouper_4name___get__(struct __pyx_obj_6pandas_3lib_SeriesGrouper *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_self->name); __pyx_r = __pyx_v_self->name; goto __pyx_L0; /* function exit code */ __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pandas_3lib_13SeriesGrouper_4name_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ static int __pyx_pw_6pandas_3lib_13SeriesGrouper_4name_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_3lib_13SeriesGrouper_4name_2__set__(((struct __pyx_obj_6pandas_3lib_SeriesGrouper *)__pyx_v_self), ((PyObject *)__pyx_v_value)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pandas_3lib_13SeriesGrouper_4name_2__set__(struct __pyx_obj_6pandas_3lib_SeriesGrouper *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__", 0); __Pyx_INCREF(__pyx_v_value); __Pyx_GIVEREF(__pyx_v_value); __Pyx_GOTREF(__pyx_v_self->name); __Pyx_DECREF(__pyx_v_self->name); __pyx_v_self->name = __pyx_v_value; /* function exit code */ __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pandas_3lib_13SeriesGrouper_4name_5__del__(PyObject *__pyx_v_self); /*proto*/ static int __pyx_pw_6pandas_3lib_13SeriesGrouper_4name_5__del__(PyObject *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_3lib_13SeriesGrouper_4name_4__del__(((struct __pyx_obj_6pandas_3lib_SeriesGrouper *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pandas_3lib_13SeriesGrouper_4name_4__del__(struct __pyx_obj_6pandas_3lib_SeriesGrouper *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__", 0); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->name); __Pyx_DECREF(__pyx_v_self->name); __pyx_v_self->name = Py_None; /* function exit code */ __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/reduce.pyx":413 * return result * * cdef inline _extract_result(object res): # <<<<<<<<<<<<<< * ''' extract the result object, it might be a 0-dim ndarray * or a len-1 0-dim, or a scalar ''' */ static CYTHON_INLINE PyObject *__pyx_f_6pandas_3lib__extract_result(PyObject *__pyx_v_res) { 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; Py_ssize_t __pyx_t_6; int __pyx_t_7; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_extract_result", 0); __Pyx_INCREF(__pyx_v_res); /* "pandas/src/reduce.pyx":416 * ''' extract the result object, it might be a 0-dim ndarray * or a len-1 0-dim, or a scalar ''' * if hasattr(res,'values'): # <<<<<<<<<<<<<< * res = res.values * if not np.isscalar(res): */ __pyx_t_1 = PyObject_HasAttr(__pyx_v_res, __pyx_n_s_values); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 416; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { /* "pandas/src/reduce.pyx":417 * or a len-1 0-dim, or a scalar ''' * if hasattr(res,'values'): * res = res.values # <<<<<<<<<<<<<< * if not np.isscalar(res): * if isinstance(res, np.ndarray): */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_res, __pyx_n_s_values); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 417; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF_SET(__pyx_v_res, __pyx_t_3); __pyx_t_3 = 0; goto __pyx_L3; } __pyx_L3:; /* "pandas/src/reduce.pyx":418 * if hasattr(res,'values'): * res = res.values * if not np.isscalar(res): # <<<<<<<<<<<<<< * if isinstance(res, np.ndarray): * if res.ndim == 0: */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 418; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_isscalar); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 418; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 418; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_v_res); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_res); __Pyx_GIVEREF(__pyx_v_res); __pyx_t_5 = PyObject_Call(__pyx_t_4, __pyx_t_3, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 418; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 418; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_1 = ((!__pyx_t_2) != 0); if (__pyx_t_1) { /* "pandas/src/reduce.pyx":419 * res = res.values * if not np.isscalar(res): * if isinstance(res, np.ndarray): # <<<<<<<<<<<<<< * if res.ndim == 0: * res = res.item() */ __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_res, ((PyObject*)__pyx_ptype_5numpy_ndarray)); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { /* "pandas/src/reduce.pyx":420 * if not np.isscalar(res): * if isinstance(res, np.ndarray): * if res.ndim == 0: # <<<<<<<<<<<<<< * res = res.item() * elif res.ndim == 1 and len(res) == 1: */ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_res, __pyx_n_s_ndim); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 420; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = PyObject_RichCompare(__pyx_t_5, __pyx_int_0, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 420; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 420; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_2) { /* "pandas/src/reduce.pyx":421 * if isinstance(res, np.ndarray): * if res.ndim == 0: * res = res.item() # <<<<<<<<<<<<<< * elif res.ndim == 1 and len(res) == 1: * res = res[0] */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_res, __pyx_n_s_item); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 421; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = PyObject_Call(__pyx_t_3, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 421; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF_SET(__pyx_v_res, __pyx_t_5); __pyx_t_5 = 0; goto __pyx_L6; } /* "pandas/src/reduce.pyx":422 * if res.ndim == 0: * res = res.item() * elif res.ndim == 1 and len(res) == 1: # <<<<<<<<<<<<<< * res = res[0] * return res */ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_res, __pyx_n_s_ndim); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 422; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = PyObject_RichCompare(__pyx_t_5, __pyx_int_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 422; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 422; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_2) { __pyx_t_6 = PyObject_Length(__pyx_v_res); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 422; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_1 = (__pyx_t_6 == 1); __pyx_t_7 = __pyx_t_1; } else { __pyx_t_7 = __pyx_t_2; } if (__pyx_t_7) { /* "pandas/src/reduce.pyx":423 * res = res.item() * elif res.ndim == 1 and len(res) == 1: * res = res[0] # <<<<<<<<<<<<<< * return res * */ __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_res, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_3 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 423; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF_SET(__pyx_v_res, __pyx_t_3); __pyx_t_3 = 0; goto __pyx_L6; } __pyx_L6:; goto __pyx_L5; } __pyx_L5:; goto __pyx_L4; } __pyx_L4:; /* "pandas/src/reduce.pyx":424 * elif res.ndim == 1 and len(res) == 1: * res = res[0] * return res # <<<<<<<<<<<<<< * * cdef class Slider: */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_res); __pyx_r = __pyx_v_res; goto __pyx_L0; /* "pandas/src/reduce.pyx":413 * return result * * cdef inline _extract_result(object res): # <<<<<<<<<<<<<< * ''' extract the result object, it might be a 0-dim ndarray * or a len-1 0-dim, or a scalar ''' */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("pandas.lib._extract_result", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_res); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/reduce.pyx":435 * char *orig_data * * def __init__(self, object values, object buf): # <<<<<<<<<<<<<< * assert(values.ndim == 1) * if not values.flags.contiguous: */ /* Python wrapper */ static int __pyx_pw_6pandas_3lib_6Slider_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_pw_6pandas_3lib_6Slider_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_values = 0; PyObject *__pyx_v_buf = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_values,&__pyx_n_s_buf,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_values)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_buf)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 435; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 435; __pyx_clineno = __LINE__; goto __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 = values[0]; __pyx_v_buf = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 435; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.lib.Slider.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return -1; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pandas_3lib_6Slider___init__(((struct __pyx_obj_6pandas_3lib_Slider *)__pyx_v_self), __pyx_v_values, __pyx_v_buf); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pandas_3lib_6Slider___init__(struct __pyx_obj_6pandas_3lib_Slider *__pyx_v_self, PyObject *__pyx_v_values, PyObject *__pyx_v_buf) { int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_t_3; int __pyx_t_4; PyObject *__pyx_t_5 = NULL; Py_ssize_t __pyx_t_6; char *__pyx_t_7; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__init__", 0); __Pyx_INCREF(__pyx_v_values); /* "pandas/src/reduce.pyx":436 * * def __init__(self, object values, object buf): * assert(values.ndim == 1) # <<<<<<<<<<<<<< * if not values.flags.contiguous: * values = values.copy() */ #ifndef CYTHON_WITHOUT_ASSERTIONS if (unlikely(!Py_OptimizeFlag)) { __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_values, __pyx_n_s_ndim); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 436; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyObject_RichCompare(__pyx_t_1, __pyx_int_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 436; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 436; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_3)) { PyErr_SetNone(PyExc_AssertionError); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 436; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } } #endif /* "pandas/src/reduce.pyx":437 * def __init__(self, object values, object buf): * assert(values.ndim == 1) * if not values.flags.contiguous: # <<<<<<<<<<<<<< * values = values.copy() * */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_values, __pyx_n_s_flags); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 437; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_contiguous); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 437; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 437; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_4 = ((!__pyx_t_3) != 0); if (__pyx_t_4) { /* "pandas/src/reduce.pyx":438 * assert(values.ndim == 1) * if not values.flags.contiguous: * values = values.copy() # <<<<<<<<<<<<<< * * assert(values.dtype == buf.dtype) */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_values, __pyx_n_s_copy); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 438; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyObject_Call(__pyx_t_1, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 438; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF_SET(__pyx_v_values, __pyx_t_2); __pyx_t_2 = 0; goto __pyx_L3; } __pyx_L3:; /* "pandas/src/reduce.pyx":440 * values = values.copy() * * assert(values.dtype == buf.dtype) # <<<<<<<<<<<<<< * self.values = values * self.buf = buf */ #ifndef CYTHON_WITHOUT_ASSERTIONS if (unlikely(!Py_OptimizeFlag)) { __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_values, __pyx_n_s_dtype); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 440; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_buf, __pyx_n_s_dtype); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 440; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_5 = PyObject_RichCompare(__pyx_t_2, __pyx_t_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 440; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 440; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_4)) { PyErr_SetNone(PyExc_AssertionError); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 440; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } } #endif /* "pandas/src/reduce.pyx":441 * * assert(values.dtype == buf.dtype) * self.values = values # <<<<<<<<<<<<<< * self.buf = buf * self.stride = values.strides[0] */ if (!(likely(((__pyx_v_values) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_values, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 441; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_5 = __pyx_v_values; __Pyx_INCREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __Pyx_GOTREF(__pyx_v_self->values); __Pyx_DECREF(((PyObject *)__pyx_v_self->values)); __pyx_v_self->values = ((PyArrayObject *)__pyx_t_5); __pyx_t_5 = 0; /* "pandas/src/reduce.pyx":442 * assert(values.dtype == buf.dtype) * self.values = values * self.buf = buf # <<<<<<<<<<<<<< * self.stride = values.strides[0] * */ if (!(likely(((__pyx_v_buf) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_buf, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 442; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_5 = __pyx_v_buf; __Pyx_INCREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __Pyx_GOTREF(__pyx_v_self->buf); __Pyx_DECREF(((PyObject *)__pyx_v_self->buf)); __pyx_v_self->buf = ((PyArrayObject *)__pyx_t_5); __pyx_t_5 = 0; /* "pandas/src/reduce.pyx":443 * self.values = values * self.buf = buf * self.stride = values.strides[0] # <<<<<<<<<<<<<< * * self.orig_data = self.buf.data */ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_values, __pyx_n_s_strides); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 443; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_5, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 443; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_6 = __Pyx_PyIndex_AsSsize_t(__pyx_t_1); if (unlikely((__pyx_t_6 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 443; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_self->stride = __pyx_t_6; /* "pandas/src/reduce.pyx":445 * self.stride = values.strides[0] * * self.orig_data = self.buf.data # <<<<<<<<<<<<<< * self.orig_len = self.buf.shape[0] * self.orig_stride = self.buf.strides[0] */ __pyx_t_7 = __pyx_v_self->buf->data; __pyx_v_self->orig_data = __pyx_t_7; /* "pandas/src/reduce.pyx":446 * * self.orig_data = self.buf.data * self.orig_len = self.buf.shape[0] # <<<<<<<<<<<<<< * self.orig_stride = self.buf.strides[0] * */ __pyx_v_self->orig_len = (__pyx_v_self->buf->dimensions[0]); /* "pandas/src/reduce.pyx":447 * self.orig_data = self.buf.data * self.orig_len = self.buf.shape[0] * self.orig_stride = self.buf.strides[0] # <<<<<<<<<<<<<< * * self.buf.data = self.values.data */ __pyx_v_self->orig_stride = (__pyx_v_self->buf->strides[0]); /* "pandas/src/reduce.pyx":449 * self.orig_stride = self.buf.strides[0] * * self.buf.data = self.values.data # <<<<<<<<<<<<<< * self.buf.strides[0] = self.stride * */ __pyx_t_7 = __pyx_v_self->values->data; __pyx_v_self->buf->data = __pyx_t_7; /* "pandas/src/reduce.pyx":450 * * self.buf.data = self.values.data * self.buf.strides[0] = self.stride # <<<<<<<<<<<<<< * * cpdef advance(self, Py_ssize_t k): */ __pyx_t_6 = __pyx_v_self->stride; (__pyx_v_self->buf->strides[0]) = __pyx_t_6; /* "pandas/src/reduce.pyx":435 * char *orig_data * * def __init__(self, object values, object buf): # <<<<<<<<<<<<<< * assert(values.ndim == 1) * if not values.flags.contiguous: */ /* 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_5); __Pyx_AddTraceback("pandas.lib.Slider.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_XDECREF(__pyx_v_values); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/reduce.pyx":452 * self.buf.strides[0] = self.stride * * cpdef advance(self, Py_ssize_t k): # <<<<<<<<<<<<<< * self.buf.data = self.buf.data + self.stride * k * */ static PyObject *__pyx_pw_6pandas_3lib_6Slider_3advance(PyObject *__pyx_v_self, PyObject *__pyx_arg_k); /*proto*/ static PyObject *__pyx_f_6pandas_3lib_6Slider_advance(struct __pyx_obj_6pandas_3lib_Slider *__pyx_v_self, Py_ssize_t __pyx_v_k, int __pyx_skip_dispatch) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("advance", 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_advance); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 452; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_6pandas_3lib_6Slider_3advance)) { __Pyx_XDECREF(__pyx_r); __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_k); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 452; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 452; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_Call(__pyx_t_1, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 452; __pyx_clineno = __LINE__; goto __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/src/reduce.pyx":453 * * cpdef advance(self, Py_ssize_t k): * self.buf.data = self.buf.data + self.stride * k # <<<<<<<<<<<<<< * * cdef move(self, int start, int end): */ __pyx_v_self->buf->data = (((char *)__pyx_v_self->buf->data) + (__pyx_v_self->stride * __pyx_v_k)); /* "pandas/src/reduce.pyx":452 * self.buf.strides[0] = self.stride * * cpdef advance(self, Py_ssize_t k): # <<<<<<<<<<<<<< * self.buf.data = self.buf.data + self.stride * k * */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("pandas.lib.Slider.advance", __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_3lib_6Slider_3advance(PyObject *__pyx_v_self, PyObject *__pyx_arg_k); /*proto*/ static PyObject *__pyx_pw_6pandas_3lib_6Slider_3advance(PyObject *__pyx_v_self, PyObject *__pyx_arg_k) { Py_ssize_t __pyx_v_k; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("advance (wrapper)", 0); assert(__pyx_arg_k); { __pyx_v_k = __Pyx_PyIndex_AsSsize_t(__pyx_arg_k); if (unlikely((__pyx_v_k == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 452; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; __Pyx_AddTraceback("pandas.lib.Slider.advance", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pandas_3lib_6Slider_2advance(((struct __pyx_obj_6pandas_3lib_Slider *)__pyx_v_self), ((Py_ssize_t)__pyx_v_k)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_3lib_6Slider_2advance(struct __pyx_obj_6pandas_3lib_Slider *__pyx_v_self, Py_ssize_t __pyx_v_k) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("advance", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = ((struct __pyx_vtabstruct_6pandas_3lib_Slider *)__pyx_v_self->__pyx_vtab)->advance(__pyx_v_self, __pyx_v_k, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 452; __pyx_clineno = __LINE__; goto __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.lib.Slider.advance", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/reduce.pyx":455 * self.buf.data = self.buf.data + self.stride * k * * cdef move(self, int start, int end): # <<<<<<<<<<<<<< * ''' * For slicing */ static PyObject *__pyx_f_6pandas_3lib_6Slider_move(struct __pyx_obj_6pandas_3lib_Slider *__pyx_v_self, int __pyx_v_start, int __pyx_v_end) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("move", 0); /* "pandas/src/reduce.pyx":459 * For slicing * ''' * self.buf.data = self.values.data + self.stride * start # <<<<<<<<<<<<<< * self.buf.shape[0] = end - start * */ __pyx_v_self->buf->data = (__pyx_v_self->values->data + (__pyx_v_self->stride * __pyx_v_start)); /* "pandas/src/reduce.pyx":460 * ''' * self.buf.data = self.values.data + self.stride * start * self.buf.shape[0] = end - start # <<<<<<<<<<<<<< * * cpdef set_length(self, Py_ssize_t length): */ (__pyx_v_self->buf->dimensions[0]) = (__pyx_v_end - __pyx_v_start); /* "pandas/src/reduce.pyx":455 * self.buf.data = self.buf.data + self.stride * k * * cdef move(self, int start, int end): # <<<<<<<<<<<<<< * ''' * For slicing */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/reduce.pyx":462 * self.buf.shape[0] = end - start * * cpdef set_length(self, Py_ssize_t length): # <<<<<<<<<<<<<< * self.buf.shape[0] = length * */ static PyObject *__pyx_pw_6pandas_3lib_6Slider_5set_length(PyObject *__pyx_v_self, PyObject *__pyx_arg_length); /*proto*/ static PyObject *__pyx_f_6pandas_3lib_6Slider_set_length(struct __pyx_obj_6pandas_3lib_Slider *__pyx_v_self, Py_ssize_t __pyx_v_length, int __pyx_skip_dispatch) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("set_length", 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_set_length); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 462; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_6pandas_3lib_6Slider_5set_length)) { __Pyx_XDECREF(__pyx_r); __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_length); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 462; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 462; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_Call(__pyx_t_1, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 462; __pyx_clineno = __LINE__; goto __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/src/reduce.pyx":463 * * cpdef set_length(self, Py_ssize_t length): * self.buf.shape[0] = length # <<<<<<<<<<<<<< * * cpdef reset(self): */ (__pyx_v_self->buf->dimensions[0]) = __pyx_v_length; /* "pandas/src/reduce.pyx":462 * self.buf.shape[0] = end - start * * cpdef set_length(self, Py_ssize_t length): # <<<<<<<<<<<<<< * self.buf.shape[0] = length * */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("pandas.lib.Slider.set_length", __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_3lib_6Slider_5set_length(PyObject *__pyx_v_self, PyObject *__pyx_arg_length); /*proto*/ static PyObject *__pyx_pw_6pandas_3lib_6Slider_5set_length(PyObject *__pyx_v_self, PyObject *__pyx_arg_length) { Py_ssize_t __pyx_v_length; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("set_length (wrapper)", 0); assert(__pyx_arg_length); { __pyx_v_length = __Pyx_PyIndex_AsSsize_t(__pyx_arg_length); if (unlikely((__pyx_v_length == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 462; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; __Pyx_AddTraceback("pandas.lib.Slider.set_length", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pandas_3lib_6Slider_4set_length(((struct __pyx_obj_6pandas_3lib_Slider *)__pyx_v_self), ((Py_ssize_t)__pyx_v_length)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_3lib_6Slider_4set_length(struct __pyx_obj_6pandas_3lib_Slider *__pyx_v_self, Py_ssize_t __pyx_v_length) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("set_length", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = ((struct __pyx_vtabstruct_6pandas_3lib_Slider *)__pyx_v_self->__pyx_vtab)->set_length(__pyx_v_self, __pyx_v_length, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 462; __pyx_clineno = __LINE__; goto __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.lib.Slider.set_length", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/reduce.pyx":465 * self.buf.shape[0] = length * * cpdef reset(self): # <<<<<<<<<<<<<< * self.buf.shape[0] = self.orig_len * self.buf.data = self.orig_data */ static PyObject *__pyx_pw_6pandas_3lib_6Slider_7reset(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static PyObject *__pyx_f_6pandas_3lib_6Slider_reset(struct __pyx_obj_6pandas_3lib_Slider *__pyx_v_self, int __pyx_skip_dispatch) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; Py_ssize_t __pyx_t_3; char *__pyx_t_4; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("reset", 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_reset); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 465; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_6pandas_3lib_6Slider_7reset)) { __Pyx_XDECREF(__pyx_r); __pyx_t_2 = PyObject_Call(__pyx_t_1, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 465; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } /* "pandas/src/reduce.pyx":466 * * cpdef reset(self): * self.buf.shape[0] = self.orig_len # <<<<<<<<<<<<<< * self.buf.data = self.orig_data * self.buf.strides[0] = self.orig_stride */ __pyx_t_3 = __pyx_v_self->orig_len; (__pyx_v_self->buf->dimensions[0]) = __pyx_t_3; /* "pandas/src/reduce.pyx":467 * cpdef reset(self): * self.buf.shape[0] = self.orig_len * self.buf.data = self.orig_data # <<<<<<<<<<<<<< * self.buf.strides[0] = self.orig_stride * */ __pyx_t_4 = __pyx_v_self->orig_data; __pyx_v_self->buf->data = __pyx_t_4; /* "pandas/src/reduce.pyx":468 * self.buf.shape[0] = self.orig_len * self.buf.data = self.orig_data * self.buf.strides[0] = self.orig_stride # <<<<<<<<<<<<<< * * */ __pyx_t_3 = __pyx_v_self->orig_stride; (__pyx_v_self->buf->strides[0]) = __pyx_t_3; /* "pandas/src/reduce.pyx":465 * self.buf.shape[0] = length * * cpdef reset(self): # <<<<<<<<<<<<<< * self.buf.shape[0] = self.orig_len * self.buf.data = self.orig_data */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("pandas.lib.Slider.reset", __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_3lib_6Slider_7reset(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static PyObject *__pyx_pw_6pandas_3lib_6Slider_7reset(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("reset (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_3lib_6Slider_6reset(((struct __pyx_obj_6pandas_3lib_Slider *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_3lib_6Slider_6reset(struct __pyx_obj_6pandas_3lib_Slider *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("reset", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = ((struct __pyx_vtabstruct_6pandas_3lib_Slider *)__pyx_v_self->__pyx_vtab)->reset(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 465; __pyx_clineno = __LINE__; goto __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.lib.Slider.reset", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/reduce.pyx":474 * pass * * def apply_frame_axis0(object frame, object f, object names, # <<<<<<<<<<<<<< * ndarray[int64_t] starts, ndarray[int64_t] ends): * cdef: */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_3lib_101apply_frame_axis0(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_3lib_101apply_frame_axis0 = {__Pyx_NAMESTR("apply_frame_axis0"), (PyCFunction)__pyx_pw_6pandas_3lib_101apply_frame_axis0, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_3lib_101apply_frame_axis0(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_frame = 0; PyObject *__pyx_v_f = 0; PyObject *__pyx_v_names = 0; PyArrayObject *__pyx_v_starts = 0; PyArrayObject *__pyx_v_ends = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("apply_frame_axis0 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_frame,&__pyx_n_s_f,&__pyx_n_s_names,&__pyx_n_s_starts,&__pyx_n_s_ends,0}; PyObject* values[5] = {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 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_frame)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_f)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("apply_frame_axis0", 1, 5, 5, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 474; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_names)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("apply_frame_axis0", 1, 5, 5, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 474; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_starts)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("apply_frame_axis0", 1, 5, 5, 3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 474; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 4: if (likely((values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ends)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("apply_frame_axis0", 1, 5, 5, 4); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 474; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "apply_frame_axis0") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 474; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 5) { 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); } __pyx_v_frame = values[0]; __pyx_v_f = values[1]; __pyx_v_names = values[2]; __pyx_v_starts = ((PyArrayObject *)values[3]); __pyx_v_ends = ((PyArrayObject *)values[4]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("apply_frame_axis0", 1, 5, 5, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 474; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.lib.apply_frame_axis0", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_starts), __pyx_ptype_5numpy_ndarray, 1, "starts", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 475; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ends), __pyx_ptype_5numpy_ndarray, 1, "ends", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 475; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_3lib_100apply_frame_axis0(__pyx_self, __pyx_v_frame, __pyx_v_f, __pyx_v_names, __pyx_v_starts, __pyx_v_ends); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_3lib_100apply_frame_axis0(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_frame, PyObject *__pyx_v_f, PyObject *__pyx_v_names, PyArrayObject *__pyx_v_starts, PyArrayObject *__pyx_v_ends) { struct __pyx_obj_6pandas_3lib_BlockSlider *__pyx_v_slider = 0; Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_n; PyObject *__pyx_v_results = 0; PyObject *__pyx_v_piece = 0; PyObject *__pyx_v_item_cache = 0; PyObject *__pyx_v_chunk = NULL; CYTHON_UNUSED PyObject *__pyx_v_shape_before = NULL; PyObject *__pyx_v_result = NULL; int __pyx_v_mutated; PyObject *__pyx_v_gin = NULL; __Pyx_LocalBuf_ND __pyx_pybuffernd_ends; __Pyx_Buffer __pyx_pybuffer_ends; __Pyx_LocalBuf_ND __pyx_pybuffernd_starts; __Pyx_Buffer __pyx_pybuffer_starts; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_t_4; long __pyx_t_5; int __pyx_t_6; long __pyx_t_7; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; int __pyx_t_11; PyObject *__pyx_t_12 = NULL; PyObject *__pyx_t_13 = NULL; PyObject *__pyx_t_14 = NULL; Py_ssize_t __pyx_t_15; Py_ssize_t __pyx_t_16; Py_ssize_t __pyx_t_17; int __pyx_t_18; int __pyx_t_19; char const *__pyx_t_20; PyObject *__pyx_t_21 = NULL; PyObject *__pyx_t_22 = NULL; PyObject *__pyx_t_23 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("apply_frame_axis0", 0); __pyx_pybuffer_starts.pybuffer.buf = NULL; __pyx_pybuffer_starts.refcount = 0; __pyx_pybuffernd_starts.data = NULL; __pyx_pybuffernd_starts.rcbuffer = &__pyx_pybuffer_starts; __pyx_pybuffer_ends.pybuffer.buf = NULL; __pyx_pybuffer_ends.refcount = 0; __pyx_pybuffernd_ends.data = NULL; __pyx_pybuffernd_ends.rcbuffer = &__pyx_pybuffer_ends; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_starts.rcbuffer->pybuffer, (PyObject*)__pyx_v_starts, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 474; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_starts.diminfo[0].strides = __pyx_pybuffernd_starts.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_starts.diminfo[0].shape = __pyx_pybuffernd_starts.rcbuffer->pybuffer.shape[0]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_ends.rcbuffer->pybuffer, (PyObject*)__pyx_v_ends, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 474; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_ends.diminfo[0].strides = __pyx_pybuffernd_ends.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_ends.diminfo[0].shape = __pyx_pybuffernd_ends.rcbuffer->pybuffer.shape[0]; /* "pandas/src/reduce.pyx":478 * cdef: * BlockSlider slider * Py_ssize_t i, n = len(starts) # <<<<<<<<<<<<<< * list results * object piece */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_starts)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 478; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/src/reduce.pyx":483 * dict item_cache * * if frame.index._has_complex_internals: # <<<<<<<<<<<<<< * raise InvalidApply('Cannot modify frame index internals') * */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_frame, __pyx_n_s_index); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 483; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_has_complex_internals); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 483; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 483; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_4) { /* "pandas/src/reduce.pyx":484 * * if frame.index._has_complex_internals: * raise InvalidApply('Cannot modify frame index internals') # <<<<<<<<<<<<<< * * */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_InvalidApply); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 484; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = PyObject_Call(__pyx_t_3, __pyx_tuple__24, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 484; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 484; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } /* "pandas/src/reduce.pyx":487 * * * results = [] # <<<<<<<<<<<<<< * * # Need to infer if our low-level mucking is going to cause a segfault */ __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 487; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_v_results = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/reduce.pyx":490 * * # Need to infer if our low-level mucking is going to cause a segfault * if n > 0: # <<<<<<<<<<<<<< * chunk = frame[starts[0]:ends[0]] * shape_before = chunk.shape */ __pyx_t_4 = ((__pyx_v_n > 0) != 0); if (__pyx_t_4) { /* "pandas/src/reduce.pyx":491 * # Need to infer if our low-level mucking is going to cause a segfault * if n > 0: * chunk = frame[starts[0]:ends[0]] # <<<<<<<<<<<<<< * shape_before = chunk.shape * try: */ __pyx_t_5 = 0; __pyx_t_6 = -1; if (__pyx_t_5 < 0) { __pyx_t_5 += __pyx_pybuffernd_starts.diminfo[0].shape; if (unlikely(__pyx_t_5 < 0)) __pyx_t_6 = 0; } else if (unlikely(__pyx_t_5 >= __pyx_pybuffernd_starts.diminfo[0].shape)) __pyx_t_6 = 0; if (unlikely(__pyx_t_6 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_6); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 491; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_7 = 0; __pyx_t_6 = -1; if (__pyx_t_7 < 0) { __pyx_t_7 += __pyx_pybuffernd_ends.diminfo[0].shape; if (unlikely(__pyx_t_7 < 0)) __pyx_t_6 = 0; } else if (unlikely(__pyx_t_7 >= __pyx_pybuffernd_ends.diminfo[0].shape)) __pyx_t_6 = 0; if (unlikely(__pyx_t_6 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_6); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 491; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_2 = __Pyx_PyObject_GetSlice(__pyx_v_frame, (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_starts.rcbuffer->pybuffer.buf, __pyx_t_5, __pyx_pybuffernd_starts.diminfo[0].strides)), (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_ends.rcbuffer->pybuffer.buf, __pyx_t_7, __pyx_pybuffernd_ends.diminfo[0].strides)), NULL, NULL, NULL, 1, 1, 1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 491; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_v_chunk = __pyx_t_2; __pyx_t_2 = 0; /* "pandas/src/reduce.pyx":492 * if n > 0: * chunk = frame[starts[0]:ends[0]] * shape_before = chunk.shape # <<<<<<<<<<<<<< * try: * result = f(chunk) */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_chunk, __pyx_n_s_shape); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 492; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_v_shape_before = __pyx_t_2; __pyx_t_2 = 0; /* "pandas/src/reduce.pyx":493 * chunk = frame[starts[0]:ends[0]] * shape_before = chunk.shape * try: # <<<<<<<<<<<<<< * result = f(chunk) * if result is chunk: */ { __Pyx_ExceptionSave(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10); __Pyx_XGOTREF(__pyx_t_8); __Pyx_XGOTREF(__pyx_t_9); __Pyx_XGOTREF(__pyx_t_10); /*try:*/ { /* "pandas/src/reduce.pyx":494 * shape_before = chunk.shape * try: * result = f(chunk) # <<<<<<<<<<<<<< * if result is chunk: * raise InvalidApply('Function unsafe for fast apply') */ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 494; __pyx_clineno = __LINE__; goto __pyx_L5_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_chunk); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_chunk); __Pyx_GIVEREF(__pyx_v_chunk); __pyx_t_3 = PyObject_Call(__pyx_v_f, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 494; __pyx_clineno = __LINE__; goto __pyx_L5_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_result = __pyx_t_3; __pyx_t_3 = 0; /* "pandas/src/reduce.pyx":495 * try: * result = f(chunk) * if result is chunk: # <<<<<<<<<<<<<< * raise InvalidApply('Function unsafe for fast apply') * except: */ __pyx_t_4 = (__pyx_v_result == __pyx_v_chunk); __pyx_t_11 = (__pyx_t_4 != 0); if (__pyx_t_11) { /* "pandas/src/reduce.pyx":496 * result = f(chunk) * if result is chunk: * raise InvalidApply('Function unsafe for fast apply') # <<<<<<<<<<<<<< * except: * raise InvalidApply('Let this error raise above us') */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_InvalidApply); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 496; __pyx_clineno = __LINE__; goto __pyx_L5_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = PyObject_Call(__pyx_t_3, __pyx_tuple__25, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 496; __pyx_clineno = __LINE__; goto __pyx_L5_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 496; __pyx_clineno = __LINE__; goto __pyx_L5_error;} } } __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; goto __pyx_L12_try_end; __pyx_L5_error:; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/reduce.pyx":497 * if result is chunk: * raise InvalidApply('Function unsafe for fast apply') * except: # <<<<<<<<<<<<<< * raise InvalidApply('Let this error raise above us') * */ /*except:*/ { __Pyx_AddTraceback("pandas.lib.apply_frame_axis0", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_3, &__pyx_t_12) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 497; __pyx_clineno = __LINE__; goto __pyx_L7_except_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_GOTREF(__pyx_t_3); __Pyx_GOTREF(__pyx_t_12); /* "pandas/src/reduce.pyx":498 * raise InvalidApply('Function unsafe for fast apply') * except: * raise InvalidApply('Let this error raise above us') # <<<<<<<<<<<<<< * * slider = BlockSlider(frame) */ __pyx_t_13 = __Pyx_GetModuleGlobalName(__pyx_n_s_InvalidApply); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 498; __pyx_clineno = __LINE__; goto __pyx_L7_except_error;} __Pyx_GOTREF(__pyx_t_13); __pyx_t_14 = PyObject_Call(__pyx_t_13, __pyx_tuple__26, NULL); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 498; __pyx_clineno = __LINE__; goto __pyx_L7_except_error;} __Pyx_GOTREF(__pyx_t_14); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_Raise(__pyx_t_14, 0, 0, 0); __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 498; __pyx_clineno = __LINE__; goto __pyx_L7_except_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; goto __pyx_L6_exception_handled; } __pyx_L7_except_error:; __Pyx_XGIVEREF(__pyx_t_8); __Pyx_XGIVEREF(__pyx_t_9); __Pyx_XGIVEREF(__pyx_t_10); __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_9, __pyx_t_10); goto __pyx_L1_error; __pyx_L6_exception_handled:; __Pyx_XGIVEREF(__pyx_t_8); __Pyx_XGIVEREF(__pyx_t_9); __Pyx_XGIVEREF(__pyx_t_10); __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_9, __pyx_t_10); __pyx_L12_try_end:; } goto __pyx_L4; } __pyx_L4:; /* "pandas/src/reduce.pyx":500 * raise InvalidApply('Let this error raise above us') * * slider = BlockSlider(frame) # <<<<<<<<<<<<<< * * mutated = False */ __pyx_t_12 = PyTuple_New(1); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 500; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __Pyx_INCREF(__pyx_v_frame); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_v_frame); __Pyx_GIVEREF(__pyx_v_frame); __pyx_t_3 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_6pandas_3lib_BlockSlider)), __pyx_t_12, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 500; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __pyx_v_slider = ((struct __pyx_obj_6pandas_3lib_BlockSlider *)__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/reduce.pyx":502 * slider = BlockSlider(frame) * * mutated = False # <<<<<<<<<<<<<< * item_cache = slider.dummy._item_cache * gin = slider.dummy.index._engine # f7u12 */ __pyx_v_mutated = 0; /* "pandas/src/reduce.pyx":503 * * mutated = False * item_cache = slider.dummy._item_cache # <<<<<<<<<<<<<< * gin = slider.dummy.index._engine # f7u12 * try: */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_slider->dummy, __pyx_n_s_item_cache); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 503; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (!(likely(PyDict_CheckExact(__pyx_t_3))||((__pyx_t_3) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_t_3)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 503; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_item_cache = ((PyObject*)__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/reduce.pyx":504 * mutated = False * item_cache = slider.dummy._item_cache * gin = slider.dummy.index._engine # f7u12 # <<<<<<<<<<<<<< * try: * for i in range(n): */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_slider->dummy, __pyx_n_s_index); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 504; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_engine); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 504; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_gin = __pyx_t_12; __pyx_t_12 = 0; /* "pandas/src/reduce.pyx":505 * item_cache = slider.dummy._item_cache * gin = slider.dummy.index._engine # f7u12 * try: # <<<<<<<<<<<<<< * for i in range(n): * slider.move(starts[i], ends[i]) */ /*try:*/ { /* "pandas/src/reduce.pyx":506 * gin = slider.dummy.index._engine # f7u12 * try: * for i in range(n): # <<<<<<<<<<<<<< * slider.move(starts[i], ends[i]) * */ __pyx_t_1 = __pyx_v_n; for (__pyx_t_15 = 0; __pyx_t_15 < __pyx_t_1; __pyx_t_15+=1) { __pyx_v_i = __pyx_t_15; /* "pandas/src/reduce.pyx":507 * try: * for i in range(n): * slider.move(starts[i], ends[i]) # <<<<<<<<<<<<<< * * item_cache.clear() # ugh */ __pyx_t_16 = __pyx_v_i; __pyx_t_6 = -1; if (__pyx_t_16 < 0) { __pyx_t_16 += __pyx_pybuffernd_starts.diminfo[0].shape; if (unlikely(__pyx_t_16 < 0)) __pyx_t_6 = 0; } else if (unlikely(__pyx_t_16 >= __pyx_pybuffernd_starts.diminfo[0].shape)) __pyx_t_6 = 0; if (unlikely(__pyx_t_6 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_6); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 507; __pyx_clineno = __LINE__; goto __pyx_L17_error;} } __pyx_t_17 = __pyx_v_i; __pyx_t_6 = -1; if (__pyx_t_17 < 0) { __pyx_t_17 += __pyx_pybuffernd_ends.diminfo[0].shape; if (unlikely(__pyx_t_17 < 0)) __pyx_t_6 = 0; } else if (unlikely(__pyx_t_17 >= __pyx_pybuffernd_ends.diminfo[0].shape)) __pyx_t_6 = 0; if (unlikely(__pyx_t_6 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_6); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 507; __pyx_clineno = __LINE__; goto __pyx_L17_error;} } __pyx_t_12 = ((struct __pyx_vtabstruct_6pandas_3lib_BlockSlider *)__pyx_v_slider->__pyx_vtab)->move(__pyx_v_slider, (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_starts.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_starts.diminfo[0].strides)), (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_ends.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_ends.diminfo[0].strides)), 0); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 507; __pyx_clineno = __LINE__; goto __pyx_L17_error;} __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; /* "pandas/src/reduce.pyx":509 * slider.move(starts[i], ends[i]) * * item_cache.clear() # ugh # <<<<<<<<<<<<<< * gin.clear_mapping() * */ if (unlikely(__pyx_v_item_cache == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "clear"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 509; __pyx_clineno = __LINE__; goto __pyx_L17_error;} } __pyx_t_18 = __Pyx_PyDict_Clear(__pyx_v_item_cache); if (unlikely(__pyx_t_18 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 509; __pyx_clineno = __LINE__; goto __pyx_L17_error;} /* "pandas/src/reduce.pyx":510 * * item_cache.clear() # ugh * gin.clear_mapping() # <<<<<<<<<<<<<< * * object.__setattr__(slider.dummy, 'name', names[i]) */ __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_gin, __pyx_n_s_clear_mapping); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 510; __pyx_clineno = __LINE__; goto __pyx_L17_error;} __Pyx_GOTREF(__pyx_t_12); __pyx_t_3 = PyObject_Call(__pyx_t_12, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 510; __pyx_clineno = __LINE__; goto __pyx_L17_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/reduce.pyx":512 * gin.clear_mapping() * * object.__setattr__(slider.dummy, 'name', names[i]) # <<<<<<<<<<<<<< * piece = f(slider.dummy) * */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_builtin_object, __pyx_n_s_setattr); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 512; __pyx_clineno = __LINE__; goto __pyx_L17_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_12 = __Pyx_GetItemInt(__pyx_v_names, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(__pyx_t_12 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 512; __pyx_clineno = __LINE__; goto __pyx_L17_error;}; __Pyx_GOTREF(__pyx_t_12); __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 512; __pyx_clineno = __LINE__; goto __pyx_L17_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_slider->dummy); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_slider->dummy); __Pyx_GIVEREF(__pyx_v_slider->dummy); __Pyx_INCREF(__pyx_n_s_name); PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_n_s_name); __Pyx_GIVEREF(__pyx_n_s_name); PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_t_12); __Pyx_GIVEREF(__pyx_t_12); __pyx_t_12 = 0; __pyx_t_12 = PyObject_Call(__pyx_t_3, __pyx_t_2, NULL); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 512; __pyx_clineno = __LINE__; goto __pyx_L17_error;} __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; /* "pandas/src/reduce.pyx":513 * * object.__setattr__(slider.dummy, 'name', names[i]) * piece = f(slider.dummy) # <<<<<<<<<<<<<< * * # I'm paying the price for index-sharing, ugh */ __pyx_t_12 = PyTuple_New(1); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 513; __pyx_clineno = __LINE__; goto __pyx_L17_error;} __Pyx_GOTREF(__pyx_t_12); __Pyx_INCREF(__pyx_v_slider->dummy); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_v_slider->dummy); __Pyx_GIVEREF(__pyx_v_slider->dummy); __pyx_t_2 = PyObject_Call(__pyx_v_f, __pyx_t_12, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 513; __pyx_clineno = __LINE__; goto __pyx_L17_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_XDECREF_SET(__pyx_v_piece, __pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/reduce.pyx":516 * * # I'm paying the price for index-sharing, ugh * try: # <<<<<<<<<<<<<< * if piece.index is slider.dummy.index: * piece = piece.copy() */ { __Pyx_ExceptionSave(&__pyx_t_10, &__pyx_t_9, &__pyx_t_8); __Pyx_XGOTREF(__pyx_t_10); __Pyx_XGOTREF(__pyx_t_9); __Pyx_XGOTREF(__pyx_t_8); /*try:*/ { /* "pandas/src/reduce.pyx":517 * # I'm paying the price for index-sharing, ugh * try: * if piece.index is slider.dummy.index: # <<<<<<<<<<<<<< * piece = piece.copy() * else: */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_piece, __pyx_n_s_index); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 517; __pyx_clineno = __LINE__; goto __pyx_L21_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_slider->dummy, __pyx_n_s_index); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 517; __pyx_clineno = __LINE__; goto __pyx_L21_error;} __Pyx_GOTREF(__pyx_t_12); __pyx_t_11 = (__pyx_t_2 == __pyx_t_12); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __pyx_t_4 = (__pyx_t_11 != 0); if (__pyx_t_4) { /* "pandas/src/reduce.pyx":518 * try: * if piece.index is slider.dummy.index: * piece = piece.copy() # <<<<<<<<<<<<<< * else: * mutated = True */ __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_piece, __pyx_n_s_copy); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 518; __pyx_clineno = __LINE__; goto __pyx_L21_error;} __Pyx_GOTREF(__pyx_t_12); __pyx_t_2 = PyObject_Call(__pyx_t_12, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 518; __pyx_clineno = __LINE__; goto __pyx_L21_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_DECREF_SET(__pyx_v_piece, __pyx_t_2); __pyx_t_2 = 0; goto __pyx_L29; } /*else*/ { /* "pandas/src/reduce.pyx":520 * piece = piece.copy() * else: * mutated = True # <<<<<<<<<<<<<< * except AttributeError: * pass */ __pyx_v_mutated = 1; } __pyx_L29:; } __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; goto __pyx_L28_try_end; __pyx_L21_error:; __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/reduce.pyx":521 * else: * mutated = True * except AttributeError: # <<<<<<<<<<<<<< * pass * results.append(piece) */ __pyx_t_6 = PyErr_ExceptionMatches(__pyx_builtin_AttributeError); if (__pyx_t_6) { PyErr_Restore(0,0,0); goto __pyx_L22_exception_handled; } goto __pyx_L23_except_error; __pyx_L23_except_error:; __Pyx_XGIVEREF(__pyx_t_10); __Pyx_XGIVEREF(__pyx_t_9); __Pyx_XGIVEREF(__pyx_t_8); __Pyx_ExceptionReset(__pyx_t_10, __pyx_t_9, __pyx_t_8); goto __pyx_L17_error; __pyx_L22_exception_handled:; __Pyx_XGIVEREF(__pyx_t_10); __Pyx_XGIVEREF(__pyx_t_9); __Pyx_XGIVEREF(__pyx_t_8); __Pyx_ExceptionReset(__pyx_t_10, __pyx_t_9, __pyx_t_8); __pyx_L28_try_end:; } /* "pandas/src/reduce.pyx":523 * except AttributeError: * pass * results.append(piece) # <<<<<<<<<<<<<< * finally: * slider.reset() */ __pyx_t_18 = __Pyx_PyList_Append(__pyx_v_results, __pyx_v_piece); if (unlikely(__pyx_t_18 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 523; __pyx_clineno = __LINE__; goto __pyx_L17_error;} } } /* "pandas/src/reduce.pyx":525 * results.append(piece) * finally: * slider.reset() # <<<<<<<<<<<<<< * * return results, mutated */ /*finally:*/ { /*normal exit:*/{ __pyx_t_2 = ((struct __pyx_vtabstruct_6pandas_3lib_BlockSlider *)__pyx_v_slider->__pyx_vtab)->reset(__pyx_v_slider); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 525; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; goto __pyx_L18; } /*exception exit:*/{ __pyx_L17_error:; __pyx_t_8 = 0; __pyx_t_9 = 0; __pyx_t_10 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0; __pyx_t_23 = 0; __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_21, &__pyx_t_22, &__pyx_t_23); if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10) < 0)) __Pyx_ErrFetch(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10); __Pyx_XGOTREF(__pyx_t_8); __Pyx_XGOTREF(__pyx_t_9); __Pyx_XGOTREF(__pyx_t_10); __Pyx_XGOTREF(__pyx_t_21); __Pyx_XGOTREF(__pyx_t_22); __Pyx_XGOTREF(__pyx_t_23); __pyx_t_6 = __pyx_lineno; __pyx_t_19 = __pyx_clineno; __pyx_t_20 = __pyx_filename; { __pyx_t_2 = ((struct __pyx_vtabstruct_6pandas_3lib_BlockSlider *)__pyx_v_slider->__pyx_vtab)->reset(__pyx_v_slider); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 525; __pyx_clineno = __LINE__; goto __pyx_L31_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } if (PY_MAJOR_VERSION >= 3) { __Pyx_XGIVEREF(__pyx_t_21); __Pyx_XGIVEREF(__pyx_t_22); __Pyx_XGIVEREF(__pyx_t_23); __Pyx_ExceptionReset(__pyx_t_21, __pyx_t_22, __pyx_t_23); } __Pyx_XGIVEREF(__pyx_t_8); __Pyx_XGIVEREF(__pyx_t_9); __Pyx_XGIVEREF(__pyx_t_10); __Pyx_ErrRestore(__pyx_t_8, __pyx_t_9, __pyx_t_10); __pyx_t_8 = 0; __pyx_t_9 = 0; __pyx_t_10 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0; __pyx_t_23 = 0; __pyx_lineno = __pyx_t_6; __pyx_clineno = __pyx_t_19; __pyx_filename = __pyx_t_20; goto __pyx_L1_error; __pyx_L31_error:; if (PY_MAJOR_VERSION >= 3) { __Pyx_XGIVEREF(__pyx_t_21); __Pyx_XGIVEREF(__pyx_t_22); __Pyx_XGIVEREF(__pyx_t_23); __Pyx_ExceptionReset(__pyx_t_21, __pyx_t_22, __pyx_t_23); } __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0; __pyx_t_23 = 0; goto __pyx_L1_error; } __pyx_L18:; } /* "pandas/src/reduce.pyx":527 * slider.reset() * * return results, mutated # <<<<<<<<<<<<<< * * cdef class BlockSlider: */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_v_mutated); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 527; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_12 = PyTuple_New(2); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 527; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __Pyx_INCREF(__pyx_v_results); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_v_results); __Pyx_GIVEREF(__pyx_v_results); PyTuple_SET_ITEM(__pyx_t_12, 1, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_12; __pyx_t_12 = 0; goto __pyx_L0; /* "pandas/src/reduce.pyx":474 * pass * * def apply_frame_axis0(object frame, object f, object names, # <<<<<<<<<<<<<< * ndarray[int64_t] starts, ndarray[int64_t] ends): * cdef: */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_12); __Pyx_XDECREF(__pyx_t_13); __Pyx_XDECREF(__pyx_t_14); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_ends.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_starts.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.lib.apply_frame_axis0", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_ends.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_starts.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_slider); __Pyx_XDECREF(__pyx_v_results); __Pyx_XDECREF(__pyx_v_piece); __Pyx_XDECREF(__pyx_v_item_cache); __Pyx_XDECREF(__pyx_v_chunk); __Pyx_XDECREF(__pyx_v_shape_before); __Pyx_XDECREF(__pyx_v_result); __Pyx_XDECREF(__pyx_v_gin); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/reduce.pyx":543 * char **base_ptrs * * def __init__(self, frame): # <<<<<<<<<<<<<< * self.frame = frame * self.dummy = frame[:0] */ /* Python wrapper */ static int __pyx_pw_6pandas_3lib_11BlockSlider_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_pw_6pandas_3lib_11BlockSlider_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_frame = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_frame,0}; PyObject* values[1] = {0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_frame)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 543; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); } __pyx_v_frame = values[0]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 543; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.lib.BlockSlider.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return -1; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pandas_3lib_11BlockSlider___init__(((struct __pyx_obj_6pandas_3lib_BlockSlider *)__pyx_v_self), __pyx_v_frame); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pandas_3lib_11BlockSlider___init__(struct __pyx_obj_6pandas_3lib_BlockSlider *__pyx_v_self, PyObject *__pyx_v_frame) { PyObject *__pyx_v_x = NULL; PyObject *__pyx_v_i = NULL; PyObject *__pyx_v_block = NULL; PyObject *__pyx_v_b = NULL; int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; Py_ssize_t __pyx_t_4; PyObject *(*__pyx_t_5)(PyObject *); char *__pyx_t_6; Py_ssize_t __pyx_t_7; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__init__", 0); /* "pandas/src/reduce.pyx":544 * * def __init__(self, frame): * self.frame = frame # <<<<<<<<<<<<<< * self.dummy = frame[:0] * */ __Pyx_INCREF(__pyx_v_frame); __Pyx_GIVEREF(__pyx_v_frame); __Pyx_GOTREF(__pyx_v_self->frame); __Pyx_DECREF(__pyx_v_self->frame); __pyx_v_self->frame = __pyx_v_frame; /* "pandas/src/reduce.pyx":545 * def __init__(self, frame): * self.frame = frame * self.dummy = frame[:0] # <<<<<<<<<<<<<< * * self.blocks = [b.values for b in self.dummy._data.blocks] */ __pyx_t_1 = __Pyx_PyObject_GetSlice(__pyx_v_frame, 0, 0, NULL, NULL, &__pyx_slice__27, 0, 1, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 545; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->dummy); __Pyx_DECREF(__pyx_v_self->dummy); __pyx_v_self->dummy = __pyx_t_1; __pyx_t_1 = 0; /* "pandas/src/reduce.pyx":547 * self.dummy = frame[:0] * * self.blocks = [b.values for b in self.dummy._data.blocks] # <<<<<<<<<<<<<< * * for x in self.blocks: */ __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 547; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->dummy, __pyx_n_s_data_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 547; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_blocks); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 547; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (PyList_CheckExact(__pyx_t_3) || PyTuple_CheckExact(__pyx_t_3)) { __pyx_t_2 = __pyx_t_3; __Pyx_INCREF(__pyx_t_2); __pyx_t_4 = 0; __pyx_t_5 = NULL; } else { __pyx_t_4 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 547; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = Py_TYPE(__pyx_t_2)->tp_iternext; } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; for (;;) { if (!__pyx_t_5 && PyList_CheckExact(__pyx_t_2)) { if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_2)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_3 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_3); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 547; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_3 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 547; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif } else if (!__pyx_t_5 && PyTuple_CheckExact(__pyx_t_2)) { if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_2)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_3); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 547; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_3 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 547; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif } else { __pyx_t_3 = __pyx_t_5(__pyx_t_2); if (unlikely(!__pyx_t_3)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 547; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } break; } __Pyx_GOTREF(__pyx_t_3); } __Pyx_XDECREF_SET(__pyx_v_b, __pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_b, __pyx_n_s_values); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 547; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_3))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 547; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->blocks); __Pyx_DECREF(__pyx_v_self->blocks); __pyx_v_self->blocks = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/reduce.pyx":549 * self.blocks = [b.values for b in self.dummy._data.blocks] * * for x in self.blocks: # <<<<<<<<<<<<<< * util.set_array_not_contiguous(x) * */ if (unlikely(__pyx_v_self->blocks == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 549; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_1 = __pyx_v_self->blocks; __Pyx_INCREF(__pyx_t_1); __pyx_t_4 = 0; for (;;) { if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_1)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 549; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 549; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif __Pyx_XDECREF_SET(__pyx_v_x, __pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/reduce.pyx":550 * * for x in self.blocks: * util.set_array_not_contiguous(x) # <<<<<<<<<<<<<< * * self.nblocks = len(self.blocks) */ if (!(likely(((__pyx_v_x) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_x, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 550; __pyx_clineno = __LINE__; goto __pyx_L1_error;} set_array_not_contiguous(((PyArrayObject *)__pyx_v_x)); } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/reduce.pyx":552 * util.set_array_not_contiguous(x) * * self.nblocks = len(self.blocks) # <<<<<<<<<<<<<< * self.idx_slider = Slider(self.frame.index, self.dummy.index) * */ __pyx_t_1 = __pyx_v_self->blocks; __Pyx_INCREF(__pyx_t_1); if (unlikely(__pyx_t_1 == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 552; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_4 = PyList_GET_SIZE(__pyx_t_1); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 552; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_self->nblocks = __pyx_t_4; /* "pandas/src/reduce.pyx":553 * * self.nblocks = len(self.blocks) * self.idx_slider = Slider(self.frame.index, self.dummy.index) # <<<<<<<<<<<<<< * * self.base_ptrs = malloc(sizeof(char*) * len(self.blocks)) */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->frame, __pyx_n_s_index); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 553; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->dummy, __pyx_n_s_index); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 553; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 553; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_1 = 0; __pyx_t_2 = 0; __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_6pandas_3lib_Slider)), __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 553; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GIVEREF(__pyx_t_2); __Pyx_GOTREF(__pyx_v_self->idx_slider); __Pyx_DECREF(((PyObject *)__pyx_v_self->idx_slider)); __pyx_v_self->idx_slider = ((struct __pyx_obj_6pandas_3lib_Slider *)__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/reduce.pyx":555 * self.idx_slider = Slider(self.frame.index, self.dummy.index) * * self.base_ptrs = malloc(sizeof(char*) * len(self.blocks)) # <<<<<<<<<<<<<< * for i, block in enumerate(self.blocks): * self.base_ptrs[i] = ( block).data */ __pyx_t_2 = __pyx_v_self->blocks; __Pyx_INCREF(__pyx_t_2); if (unlikely(__pyx_t_2 == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 555; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_4 = PyList_GET_SIZE(__pyx_t_2); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 555; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_self->base_ptrs = ((char **)malloc(((sizeof(char *)) * __pyx_t_4))); /* "pandas/src/reduce.pyx":556 * * self.base_ptrs = malloc(sizeof(char*) * len(self.blocks)) * for i, block in enumerate(self.blocks): # <<<<<<<<<<<<<< * self.base_ptrs[i] = ( block).data * */ __Pyx_INCREF(__pyx_int_0); __pyx_t_2 = __pyx_int_0; __pyx_t_3 = __pyx_v_self->blocks; __Pyx_INCREF(__pyx_t_3); __pyx_t_4 = 0; for (;;) { if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_3)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_1 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 556; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_1 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 556; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif __Pyx_XDECREF_SET(__pyx_v_block, __pyx_t_1); __pyx_t_1 = 0; __Pyx_INCREF(__pyx_t_2); __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_2); __pyx_t_1 = PyNumber_Add(__pyx_t_2, __pyx_int_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 556; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = __pyx_t_1; __pyx_t_1 = 0; /* "pandas/src/reduce.pyx":557 * self.base_ptrs = malloc(sizeof(char*) * len(self.blocks)) * for i, block in enumerate(self.blocks): * self.base_ptrs[i] = ( block).data # <<<<<<<<<<<<<< * * def __dealloc__(self): */ __pyx_t_6 = ((PyArrayObject *)__pyx_v_block)->data; __pyx_t_7 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_7 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 557; __pyx_clineno = __LINE__; goto __pyx_L1_error;} (__pyx_v_self->base_ptrs[__pyx_t_7]) = __pyx_t_6; } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/reduce.pyx":543 * char **base_ptrs * * def __init__(self, frame): # <<<<<<<<<<<<<< * self.frame = frame * self.dummy = frame[:0] */ /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("pandas.lib.BlockSlider.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_XDECREF(__pyx_v_x); __Pyx_XDECREF(__pyx_v_i); __Pyx_XDECREF(__pyx_v_block); __Pyx_XDECREF(__pyx_v_b); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/reduce.pyx":559 * self.base_ptrs[i] = ( block).data * * def __dealloc__(self): # <<<<<<<<<<<<<< * free(self.base_ptrs) * */ /* Python wrapper */ static void __pyx_pw_6pandas_3lib_11BlockSlider_3__dealloc__(PyObject *__pyx_v_self); /*proto*/ static void __pyx_pw_6pandas_3lib_11BlockSlider_3__dealloc__(PyObject *__pyx_v_self) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0); __pyx_pf_6pandas_3lib_11BlockSlider_2__dealloc__(((struct __pyx_obj_6pandas_3lib_BlockSlider *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); } static void __pyx_pf_6pandas_3lib_11BlockSlider_2__dealloc__(struct __pyx_obj_6pandas_3lib_BlockSlider *__pyx_v_self) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__dealloc__", 0); /* "pandas/src/reduce.pyx":560 * * def __dealloc__(self): * free(self.base_ptrs) # <<<<<<<<<<<<<< * * cpdef move(self, int start, int end): */ free(__pyx_v_self->base_ptrs); /* "pandas/src/reduce.pyx":559 * self.base_ptrs[i] = ( block).data * * def __dealloc__(self): # <<<<<<<<<<<<<< * free(self.base_ptrs) * */ /* function exit code */ __Pyx_RefNannyFinishContext(); } /* "pandas/src/reduce.pyx":562 * free(self.base_ptrs) * * cpdef move(self, int start, int end): # <<<<<<<<<<<<<< * cdef: * ndarray arr */ static PyObject *__pyx_pw_6pandas_3lib_11BlockSlider_5move(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_6pandas_3lib_11BlockSlider_move(struct __pyx_obj_6pandas_3lib_BlockSlider *__pyx_v_self, int __pyx_v_start, int __pyx_v_end, int __pyx_skip_dispatch) { PyArrayObject *__pyx_v_arr = 0; int __pyx_v_i; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; int __pyx_t_5; int __pyx_t_6; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("move", 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_move); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 562; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_6pandas_3lib_11BlockSlider_5move)) { __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_start); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 562; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_end); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 562; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 562; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_2 = 0; __pyx_t_3 = 0; __pyx_t_3 = PyObject_Call(__pyx_t_1, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 562; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_r = __pyx_t_3; __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } /* "pandas/src/reduce.pyx":567 * * # move blocks * for i in range(self.nblocks): # <<<<<<<<<<<<<< * arr = self.blocks[i] * */ __pyx_t_5 = __pyx_v_self->nblocks; for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) { __pyx_v_i = __pyx_t_6; /* "pandas/src/reduce.pyx":568 * # move blocks * for i in range(self.nblocks): * arr = self.blocks[i] # <<<<<<<<<<<<<< * * # axis=1 is the frame's axis=0 */ if (unlikely(__pyx_v_self->blocks == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 568; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_self->blocks, __pyx_v_i, int, 1, __Pyx_PyInt_From_int, 1, 1, 1); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 568; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 568; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_XDECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_1)); __pyx_t_1 = 0; /* "pandas/src/reduce.pyx":571 * * # axis=1 is the frame's axis=0 * arr.data = self.base_ptrs[i] + arr.strides[1] * start # <<<<<<<<<<<<<< * arr.shape[1] = end - start * */ __pyx_v_arr->data = ((__pyx_v_self->base_ptrs[__pyx_v_i]) + ((__pyx_v_arr->strides[1]) * __pyx_v_start)); /* "pandas/src/reduce.pyx":572 * # axis=1 is the frame's axis=0 * arr.data = self.base_ptrs[i] + arr.strides[1] * start * arr.shape[1] = end - start # <<<<<<<<<<<<<< * * self.idx_slider.move(start, end) */ (__pyx_v_arr->dimensions[1]) = (__pyx_v_end - __pyx_v_start); } /* "pandas/src/reduce.pyx":574 * arr.shape[1] = end - start * * self.idx_slider.move(start, end) # <<<<<<<<<<<<<< * * cdef reset(self): */ __pyx_t_1 = ((struct __pyx_vtabstruct_6pandas_3lib_Slider *)__pyx_v_self->idx_slider->__pyx_vtab)->move(__pyx_v_self->idx_slider, __pyx_v_start, __pyx_v_end); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 574; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/reduce.pyx":562 * free(self.base_ptrs) * * cpdef move(self, int start, int end): # <<<<<<<<<<<<<< * cdef: * ndarray arr */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("pandas.lib.BlockSlider.move", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_arr); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_3lib_11BlockSlider_5move(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_6pandas_3lib_11BlockSlider_5move(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { int __pyx_v_start; int __pyx_v_end; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("move (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_start,&__pyx_n_s_end,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_start)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_end)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("move", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 562; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "move") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 562; __pyx_clineno = __LINE__; goto __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_start = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_start == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 562; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_end = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_end == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 562; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("move", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 562; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.lib.BlockSlider.move", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pandas_3lib_11BlockSlider_4move(((struct __pyx_obj_6pandas_3lib_BlockSlider *)__pyx_v_self), __pyx_v_start, __pyx_v_end); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_3lib_11BlockSlider_4move(struct __pyx_obj_6pandas_3lib_BlockSlider *__pyx_v_self, int __pyx_v_start, int __pyx_v_end) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("move", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = ((struct __pyx_vtabstruct_6pandas_3lib_BlockSlider *)__pyx_v_self->__pyx_vtab)->move(__pyx_v_self, __pyx_v_start, __pyx_v_end, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 562; __pyx_clineno = __LINE__; goto __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.lib.BlockSlider.move", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/reduce.pyx":576 * self.idx_slider.move(start, end) * * cdef reset(self): # <<<<<<<<<<<<<< * cdef: * ndarray arr */ static PyObject *__pyx_f_6pandas_3lib_11BlockSlider_reset(struct __pyx_obj_6pandas_3lib_BlockSlider *__pyx_v_self) { PyArrayObject *__pyx_v_arr = 0; int __pyx_v_i; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("reset", 0); /* "pandas/src/reduce.pyx":581 * * # move blocks * for i in range(self.nblocks): # <<<<<<<<<<<<<< * arr = self.blocks[i] * */ __pyx_t_1 = __pyx_v_self->nblocks; for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) { __pyx_v_i = __pyx_t_2; /* "pandas/src/reduce.pyx":582 * # move blocks * for i in range(self.nblocks): * arr = self.blocks[i] # <<<<<<<<<<<<<< * * # axis=1 is the frame's axis=0 */ if (unlikely(__pyx_v_self->blocks == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 582; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_3 = __Pyx_GetItemInt_List(__pyx_v_self->blocks, __pyx_v_i, int, 1, __Pyx_PyInt_From_int, 1, 1, 1); if (unlikely(__pyx_t_3 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 582; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_3); if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 582; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_XDECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_3)); __pyx_t_3 = 0; /* "pandas/src/reduce.pyx":585 * * # axis=1 is the frame's axis=0 * arr.data = self.base_ptrs[i] # <<<<<<<<<<<<<< * arr.shape[1] = 0 * */ __pyx_v_arr->data = (__pyx_v_self->base_ptrs[__pyx_v_i]); /* "pandas/src/reduce.pyx":586 * # axis=1 is the frame's axis=0 * arr.data = self.base_ptrs[i] * arr.shape[1] = 0 # <<<<<<<<<<<<<< * * self.idx_slider.reset() */ (__pyx_v_arr->dimensions[1]) = 0; } /* "pandas/src/reduce.pyx":588 * arr.shape[1] = 0 * * self.idx_slider.reset() # <<<<<<<<<<<<<< * * */ __pyx_t_3 = ((struct __pyx_vtabstruct_6pandas_3lib_Slider *)__pyx_v_self->idx_slider->__pyx_vtab)->reset(__pyx_v_self->idx_slider, 0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 588; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/reduce.pyx":576 * self.idx_slider.move(start, end) * * cdef reset(self): # <<<<<<<<<<<<<< * cdef: * ndarray arr */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("pandas.lib.BlockSlider.reset", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_arr); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/reduce.pyx":535 * * cdef public: * object frame, dummy # <<<<<<<<<<<<<< * int nblocks * Slider idx_slider */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_3lib_11BlockSlider_5frame_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6pandas_3lib_11BlockSlider_5frame_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_3lib_11BlockSlider_5frame___get__(((struct __pyx_obj_6pandas_3lib_BlockSlider *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_3lib_11BlockSlider_5frame___get__(struct __pyx_obj_6pandas_3lib_BlockSlider *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_self->frame); __pyx_r = __pyx_v_self->frame; goto __pyx_L0; /* function exit code */ __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pandas_3lib_11BlockSlider_5frame_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ static int __pyx_pw_6pandas_3lib_11BlockSlider_5frame_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_3lib_11BlockSlider_5frame_2__set__(((struct __pyx_obj_6pandas_3lib_BlockSlider *)__pyx_v_self), ((PyObject *)__pyx_v_value)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pandas_3lib_11BlockSlider_5frame_2__set__(struct __pyx_obj_6pandas_3lib_BlockSlider *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__", 0); __Pyx_INCREF(__pyx_v_value); __Pyx_GIVEREF(__pyx_v_value); __Pyx_GOTREF(__pyx_v_self->frame); __Pyx_DECREF(__pyx_v_self->frame); __pyx_v_self->frame = __pyx_v_value; /* function exit code */ __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pandas_3lib_11BlockSlider_5frame_5__del__(PyObject *__pyx_v_self); /*proto*/ static int __pyx_pw_6pandas_3lib_11BlockSlider_5frame_5__del__(PyObject *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_3lib_11BlockSlider_5frame_4__del__(((struct __pyx_obj_6pandas_3lib_BlockSlider *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pandas_3lib_11BlockSlider_5frame_4__del__(struct __pyx_obj_6pandas_3lib_BlockSlider *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__", 0); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->frame); __Pyx_DECREF(__pyx_v_self->frame); __pyx_v_self->frame = Py_None; /* function exit code */ __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_3lib_11BlockSlider_5dummy_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6pandas_3lib_11BlockSlider_5dummy_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_3lib_11BlockSlider_5dummy___get__(((struct __pyx_obj_6pandas_3lib_BlockSlider *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_3lib_11BlockSlider_5dummy___get__(struct __pyx_obj_6pandas_3lib_BlockSlider *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_self->dummy); __pyx_r = __pyx_v_self->dummy; goto __pyx_L0; /* function exit code */ __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pandas_3lib_11BlockSlider_5dummy_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ static int __pyx_pw_6pandas_3lib_11BlockSlider_5dummy_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_3lib_11BlockSlider_5dummy_2__set__(((struct __pyx_obj_6pandas_3lib_BlockSlider *)__pyx_v_self), ((PyObject *)__pyx_v_value)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pandas_3lib_11BlockSlider_5dummy_2__set__(struct __pyx_obj_6pandas_3lib_BlockSlider *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__", 0); __Pyx_INCREF(__pyx_v_value); __Pyx_GIVEREF(__pyx_v_value); __Pyx_GOTREF(__pyx_v_self->dummy); __Pyx_DECREF(__pyx_v_self->dummy); __pyx_v_self->dummy = __pyx_v_value; /* function exit code */ __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pandas_3lib_11BlockSlider_5dummy_5__del__(PyObject *__pyx_v_self); /*proto*/ static int __pyx_pw_6pandas_3lib_11BlockSlider_5dummy_5__del__(PyObject *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_3lib_11BlockSlider_5dummy_4__del__(((struct __pyx_obj_6pandas_3lib_BlockSlider *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pandas_3lib_11BlockSlider_5dummy_4__del__(struct __pyx_obj_6pandas_3lib_BlockSlider *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__", 0); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->dummy); __Pyx_DECREF(__pyx_v_self->dummy); __pyx_v_self->dummy = Py_None; /* function exit code */ __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/reduce.pyx":536 * cdef public: * object frame, dummy * int nblocks # <<<<<<<<<<<<<< * Slider idx_slider * list blocks */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_3lib_11BlockSlider_7nblocks_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6pandas_3lib_11BlockSlider_7nblocks_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_3lib_11BlockSlider_7nblocks___get__(((struct __pyx_obj_6pandas_3lib_BlockSlider *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_3lib_11BlockSlider_7nblocks___get__(struct __pyx_obj_6pandas_3lib_BlockSlider *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->nblocks); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 536; __pyx_clineno = __LINE__; goto __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.lib.BlockSlider.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 int __pyx_pw_6pandas_3lib_11BlockSlider_7nblocks_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ static int __pyx_pw_6pandas_3lib_11BlockSlider_7nblocks_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_3lib_11BlockSlider_7nblocks_2__set__(((struct __pyx_obj_6pandas_3lib_BlockSlider *)__pyx_v_self), ((PyObject *)__pyx_v_value)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pandas_3lib_11BlockSlider_7nblocks_2__set__(struct __pyx_obj_6pandas_3lib_BlockSlider *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__set__", 0); __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 536; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_self->nblocks = __pyx_t_1; /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("pandas.lib.BlockSlider.nblocks.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/reduce.pyx":537 * object frame, dummy * int nblocks * Slider idx_slider # <<<<<<<<<<<<<< * list blocks * */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_3lib_11BlockSlider_10idx_slider_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6pandas_3lib_11BlockSlider_10idx_slider_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_3lib_11BlockSlider_10idx_slider___get__(((struct __pyx_obj_6pandas_3lib_BlockSlider *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_3lib_11BlockSlider_10idx_slider___get__(struct __pyx_obj_6pandas_3lib_BlockSlider *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_self->idx_slider)); __pyx_r = ((PyObject *)__pyx_v_self->idx_slider); goto __pyx_L0; /* function exit code */ __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pandas_3lib_11BlockSlider_10idx_slider_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ static int __pyx_pw_6pandas_3lib_11BlockSlider_10idx_slider_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_3lib_11BlockSlider_10idx_slider_2__set__(((struct __pyx_obj_6pandas_3lib_BlockSlider *)__pyx_v_self), ((PyObject *)__pyx_v_value)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pandas_3lib_11BlockSlider_10idx_slider_2__set__(struct __pyx_obj_6pandas_3lib_BlockSlider *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__set__", 0); if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_6pandas_3lib_Slider))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 537; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_1 = __pyx_v_value; __Pyx_INCREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->idx_slider); __Pyx_DECREF(((PyObject *)__pyx_v_self->idx_slider)); __pyx_v_self->idx_slider = ((struct __pyx_obj_6pandas_3lib_Slider *)__pyx_t_1); __pyx_t_1 = 0; /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas.lib.BlockSlider.idx_slider.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pandas_3lib_11BlockSlider_10idx_slider_5__del__(PyObject *__pyx_v_self); /*proto*/ static int __pyx_pw_6pandas_3lib_11BlockSlider_10idx_slider_5__del__(PyObject *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_3lib_11BlockSlider_10idx_slider_4__del__(((struct __pyx_obj_6pandas_3lib_BlockSlider *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pandas_3lib_11BlockSlider_10idx_slider_4__del__(struct __pyx_obj_6pandas_3lib_BlockSlider *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__", 0); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->idx_slider); __Pyx_DECREF(((PyObject *)__pyx_v_self->idx_slider)); __pyx_v_self->idx_slider = ((struct __pyx_obj_6pandas_3lib_Slider *)Py_None); /* function exit code */ __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/reduce.pyx":538 * int nblocks * Slider idx_slider * list blocks # <<<<<<<<<<<<<< * * cdef: */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_3lib_11BlockSlider_6blocks_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6pandas_3lib_11BlockSlider_6blocks_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_3lib_11BlockSlider_6blocks___get__(((struct __pyx_obj_6pandas_3lib_BlockSlider *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_3lib_11BlockSlider_6blocks___get__(struct __pyx_obj_6pandas_3lib_BlockSlider *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_self->blocks); __pyx_r = __pyx_v_self->blocks; goto __pyx_L0; /* function exit code */ __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pandas_3lib_11BlockSlider_6blocks_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ static int __pyx_pw_6pandas_3lib_11BlockSlider_6blocks_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_3lib_11BlockSlider_6blocks_2__set__(((struct __pyx_obj_6pandas_3lib_BlockSlider *)__pyx_v_self), ((PyObject *)__pyx_v_value)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pandas_3lib_11BlockSlider_6blocks_2__set__(struct __pyx_obj_6pandas_3lib_BlockSlider *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__set__", 0); if (!(likely(PyList_CheckExact(__pyx_v_value))||((__pyx_v_value) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_v_value)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 538; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_1 = __pyx_v_value; __Pyx_INCREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->blocks); __Pyx_DECREF(__pyx_v_self->blocks); __pyx_v_self->blocks = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas.lib.BlockSlider.blocks.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pandas_3lib_11BlockSlider_6blocks_5__del__(PyObject *__pyx_v_self); /*proto*/ static int __pyx_pw_6pandas_3lib_11BlockSlider_6blocks_5__del__(PyObject *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_3lib_11BlockSlider_6blocks_4__del__(((struct __pyx_obj_6pandas_3lib_BlockSlider *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pandas_3lib_11BlockSlider_6blocks_4__del__(struct __pyx_obj_6pandas_3lib_BlockSlider *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__", 0); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->blocks); __Pyx_DECREF(__pyx_v_self->blocks); __pyx_v_self->blocks = ((PyObject*)Py_None); /* function exit code */ __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/reduce.pyx":591 * * * def reduce(arr, f, axis=0, dummy=None, labels=None): # <<<<<<<<<<<<<< * if labels._has_complex_internals: * raise Exception('Cannot use shortcut') */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_3lib_103reduce(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_3lib_103reduce = {__Pyx_NAMESTR("reduce"), (PyCFunction)__pyx_pw_6pandas_3lib_103reduce, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_3lib_103reduce(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_arr = 0; PyObject *__pyx_v_f = 0; PyObject *__pyx_v_axis = 0; PyObject *__pyx_v_dummy = 0; PyObject *__pyx_v_labels = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("reduce (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_arr,&__pyx_n_s_f,&__pyx_n_s_axis,&__pyx_n_s_dummy,&__pyx_n_s_labels,0}; PyObject* values[5] = {0,0,0,0,0}; values[2] = ((PyObject *)__pyx_int_0); values[3] = ((PyObject *)Py_None); values[4] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_arr)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_f)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("reduce", 0, 2, 5, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 591; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_axis); if (value) { values[2] = value; kw_args--; } } case 3: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_dummy); if (value) { values[3] = value; kw_args--; } } case 4: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_labels); if (value) { values[4] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "reduce") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 591; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_arr = values[0]; __pyx_v_f = values[1]; __pyx_v_axis = values[2]; __pyx_v_dummy = values[3]; __pyx_v_labels = values[4]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("reduce", 0, 2, 5, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 591; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.lib.reduce", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pandas_3lib_102reduce(__pyx_self, __pyx_v_arr, __pyx_v_f, __pyx_v_axis, __pyx_v_dummy, __pyx_v_labels); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_3lib_102reduce(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_arr, PyObject *__pyx_v_f, PyObject *__pyx_v_axis, PyObject *__pyx_v_dummy, PyObject *__pyx_v_labels) { struct __pyx_obj_6pandas_3lib_Reducer *__pyx_v_reducer = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("reduce", 0); /* "pandas/src/reduce.pyx":592 * * def reduce(arr, f, axis=0, dummy=None, labels=None): * if labels._has_complex_internals: # <<<<<<<<<<<<<< * raise Exception('Cannot use shortcut') * */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_labels, __pyx_n_s_has_complex_internals); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 592; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 592; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_2) { /* "pandas/src/reduce.pyx":593 * def reduce(arr, f, axis=0, dummy=None, labels=None): * if labels._has_complex_internals: * raise Exception('Cannot use shortcut') # <<<<<<<<<<<<<< * * reducer = Reducer(arr, f, axis=axis, dummy=dummy, labels=labels) */ __pyx_t_1 = PyObject_Call(__pyx_builtin_Exception, __pyx_tuple__28, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 593; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 593; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } /* "pandas/src/reduce.pyx":595 * raise Exception('Cannot use shortcut') * * reducer = Reducer(arr, f, axis=axis, dummy=dummy, labels=labels) # <<<<<<<<<<<<<< * return reducer.get_result() */ __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 595; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_arr); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_arr); __Pyx_GIVEREF(__pyx_v_arr); __Pyx_INCREF(__pyx_v_f); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_f); __Pyx_GIVEREF(__pyx_v_f); __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 595; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_axis, __pyx_v_axis) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 595; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dummy, __pyx_v_dummy) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 595; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_labels, __pyx_v_labels) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 595; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_4 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_6pandas_3lib_Reducer)), __pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 595; __pyx_clineno = __LINE__; goto __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_v_reducer = ((struct __pyx_obj_6pandas_3lib_Reducer *)__pyx_t_4); __pyx_t_4 = 0; /* "pandas/src/reduce.pyx":596 * * reducer = Reducer(arr, f, axis=axis, dummy=dummy, labels=labels) * return reducer.get_result() # <<<<<<<<<<<<<< */ __Pyx_XDECREF(__pyx_r); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_reducer), __pyx_n_s_get_result); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 596; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = PyObject_Call(__pyx_t_4, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 596; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; /* "pandas/src/reduce.pyx":591 * * * def reduce(arr, f, axis=0, dummy=None, labels=None): # <<<<<<<<<<<<<< * if labels._has_complex_internals: * raise Exception('Cannot use shortcut') */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("pandas.lib.reduce", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_reducer); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/properties.pyx":9 * object func, name, allow_setting * * def __init__(self, func=None, allow_setting=False): # <<<<<<<<<<<<<< * if func is not None: * self.func = func */ /* Python wrapper */ static int __pyx_pw_6pandas_3lib_14cache_readonly_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_pw_6pandas_3lib_14cache_readonly_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_func = 0; PyObject *__pyx_v_allow_setting = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_func,&__pyx_n_s_allow_setting,0}; PyObject* values[2] = {0,0}; values[0] = ((PyObject *)Py_None); values[1] = ((PyObject *)Py_False); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_func); if (value) { values[0] = value; kw_args--; } } case 1: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_allow_setting); if (value) { values[1] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 9; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_func = values[0]; __pyx_v_allow_setting = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("__init__", 0, 0, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[3]; __pyx_lineno = 9; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.lib.cache_readonly.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return -1; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pandas_3lib_14cache_readonly___init__(((struct __pyx_obj_6pandas_3lib_cache_readonly *)__pyx_v_self), __pyx_v_func, __pyx_v_allow_setting); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pandas_3lib_14cache_readonly___init__(struct __pyx_obj_6pandas_3lib_cache_readonly *__pyx_v_self, PyObject *__pyx_v_func, PyObject *__pyx_v_allow_setting) { int __pyx_r; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__init__", 0); /* "pandas/src/properties.pyx":10 * * def __init__(self, func=None, allow_setting=False): * if func is not None: # <<<<<<<<<<<<<< * self.func = func * self.name = func.__name__ */ __pyx_t_1 = (__pyx_v_func != Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { /* "pandas/src/properties.pyx":11 * def __init__(self, func=None, allow_setting=False): * if func is not None: * self.func = func # <<<<<<<<<<<<<< * self.name = func.__name__ * self.allow_setting = allow_setting */ __Pyx_INCREF(__pyx_v_func); __Pyx_GIVEREF(__pyx_v_func); __Pyx_GOTREF(__pyx_v_self->func); __Pyx_DECREF(__pyx_v_self->func); __pyx_v_self->func = __pyx_v_func; /* "pandas/src/properties.pyx":12 * if func is not None: * self.func = func * self.name = func.__name__ # <<<<<<<<<<<<<< * self.allow_setting = allow_setting * */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_func, __pyx_n_s_name_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 12; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __Pyx_GOTREF(__pyx_v_self->name); __Pyx_DECREF(__pyx_v_self->name); __pyx_v_self->name = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L3; } __pyx_L3:; /* "pandas/src/properties.pyx":13 * self.func = func * self.name = func.__name__ * self.allow_setting = allow_setting # <<<<<<<<<<<<<< * * def __call__(self, func, doc=None): */ __Pyx_INCREF(__pyx_v_allow_setting); __Pyx_GIVEREF(__pyx_v_allow_setting); __Pyx_GOTREF(__pyx_v_self->allow_setting); __Pyx_DECREF(__pyx_v_self->allow_setting); __pyx_v_self->allow_setting = __pyx_v_allow_setting; /* "pandas/src/properties.pyx":9 * object func, name, allow_setting * * def __init__(self, func=None, allow_setting=False): # <<<<<<<<<<<<<< * if func is not None: * self.func = func */ /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("pandas.lib.cache_readonly.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/properties.pyx":15 * self.allow_setting = allow_setting * * def __call__(self, func, doc=None): # <<<<<<<<<<<<<< * self.func = func * self.name = func.__name__ */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_3lib_14cache_readonly_3__call__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_6pandas_3lib_14cache_readonly_3__call__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_func = 0; CYTHON_UNUSED PyObject *__pyx_v_doc = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__call__ (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_func,&__pyx_n_s_doc,0}; PyObject* values[2] = {0,0}; values[1] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_func)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_doc); if (value) { values[1] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__call__") < 0)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 15; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_func = values[0]; __pyx_v_doc = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("__call__", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[3]; __pyx_lineno = 15; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.lib.cache_readonly.__call__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pandas_3lib_14cache_readonly_2__call__(((struct __pyx_obj_6pandas_3lib_cache_readonly *)__pyx_v_self), __pyx_v_func, __pyx_v_doc); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_3lib_14cache_readonly_2__call__(struct __pyx_obj_6pandas_3lib_cache_readonly *__pyx_v_self, PyObject *__pyx_v_func, CYTHON_UNUSED PyObject *__pyx_v_doc) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__call__", 0); /* "pandas/src/properties.pyx":16 * * def __call__(self, func, doc=None): * self.func = func # <<<<<<<<<<<<<< * self.name = func.__name__ * return self */ __Pyx_INCREF(__pyx_v_func); __Pyx_GIVEREF(__pyx_v_func); __Pyx_GOTREF(__pyx_v_self->func); __Pyx_DECREF(__pyx_v_self->func); __pyx_v_self->func = __pyx_v_func; /* "pandas/src/properties.pyx":17 * def __call__(self, func, doc=None): * self.func = func * self.name = func.__name__ # <<<<<<<<<<<<<< * return self * */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_func, __pyx_n_s_name_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 17; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->name); __Pyx_DECREF(__pyx_v_self->name); __pyx_v_self->name = __pyx_t_1; __pyx_t_1 = 0; /* "pandas/src/properties.pyx":18 * self.func = func * self.name = func.__name__ * return self # <<<<<<<<<<<<<< * * def __get__(self, obj, typ): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_self)); __pyx_r = ((PyObject *)__pyx_v_self); goto __pyx_L0; /* "pandas/src/properties.pyx":15 * self.allow_setting = allow_setting * * def __call__(self, func, doc=None): # <<<<<<<<<<<<<< * self.func = func * self.name = func.__name__ */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas.lib.cache_readonly.__call__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/properties.pyx":20 * return self * * def __get__(self, obj, typ): # <<<<<<<<<<<<<< * # Get the cache or set a default one if needed * */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_3lib_14cache_readonly_5__get__(PyObject *__pyx_v_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_typ); /*proto*/ static PyObject *__pyx_pw_6pandas_3lib_14cache_readonly_5__get__(PyObject *__pyx_v_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_typ) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_3lib_14cache_readonly_4__get__(((struct __pyx_obj_6pandas_3lib_cache_readonly *)__pyx_v_self), ((PyObject *)__pyx_v_obj), ((PyObject *)__pyx_v_typ)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_3lib_14cache_readonly_4__get__(struct __pyx_obj_6pandas_3lib_cache_readonly *__pyx_v_self, PyObject *__pyx_v_obj, CYTHON_UNUSED PyObject *__pyx_v_typ) { PyObject *__pyx_v_cache = NULL; PyObject *__pyx_v_val = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; int __pyx_t_7; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); /* "pandas/src/properties.pyx":23 * # Get the cache or set a default one if needed * * cache = getattr(obj, '_cache', None) # <<<<<<<<<<<<<< * if cache is None: * try: */ __pyx_t_1 = __Pyx_GetAttr3(__pyx_v_obj, __pyx_n_s_cache, Py_None); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 23; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_v_cache = __pyx_t_1; __pyx_t_1 = 0; /* "pandas/src/properties.pyx":24 * * cache = getattr(obj, '_cache', None) * if cache is None: # <<<<<<<<<<<<<< * try: * cache = obj._cache = {} */ __pyx_t_2 = (__pyx_v_cache == Py_None); __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { /* "pandas/src/properties.pyx":25 * cache = getattr(obj, '_cache', None) * if cache is None: * try: # <<<<<<<<<<<<<< * cache = obj._cache = {} * except (AttributeError): */ { __Pyx_ExceptionSave(&__pyx_t_4, &__pyx_t_5, &__pyx_t_6); __Pyx_XGOTREF(__pyx_t_4); __Pyx_XGOTREF(__pyx_t_5); __Pyx_XGOTREF(__pyx_t_6); /*try:*/ { /* "pandas/src/properties.pyx":26 * if cache is None: * try: * cache = obj._cache = {} # <<<<<<<<<<<<<< * except (AttributeError): * return */ __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 26; __pyx_clineno = __LINE__; goto __pyx_L4_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_t_1); __Pyx_DECREF_SET(__pyx_v_cache, __pyx_t_1); if (__Pyx_PyObject_SetAttrStr(__pyx_v_obj, __pyx_n_s_cache, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 26; __pyx_clineno = __LINE__; goto __pyx_L4_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; goto __pyx_L11_try_end; __pyx_L4_error:; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/properties.pyx":27 * try: * cache = obj._cache = {} * except (AttributeError): # <<<<<<<<<<<<<< * return * */ __pyx_t_7 = PyErr_ExceptionMatches(__pyx_builtin_AttributeError); if (__pyx_t_7) { __Pyx_AddTraceback("pandas.lib.cache_readonly.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_8, &__pyx_t_9) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 27; __pyx_clineno = __LINE__; goto __pyx_L6_except_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_GOTREF(__pyx_t_8); __Pyx_GOTREF(__pyx_t_9); /* "pandas/src/properties.pyx":28 * cache = obj._cache = {} * except (AttributeError): * return # <<<<<<<<<<<<<< * * if PyDict_Contains(cache, self.name): */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; goto __pyx_L7_except_return; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; goto __pyx_L5_exception_handled; } goto __pyx_L6_except_error; __pyx_L6_except_error:; __Pyx_XGIVEREF(__pyx_t_4); __Pyx_XGIVEREF(__pyx_t_5); __Pyx_XGIVEREF(__pyx_t_6); __Pyx_ExceptionReset(__pyx_t_4, __pyx_t_5, __pyx_t_6); goto __pyx_L1_error; __pyx_L7_except_return:; __Pyx_XGIVEREF(__pyx_t_4); __Pyx_XGIVEREF(__pyx_t_5); __Pyx_XGIVEREF(__pyx_t_6); __Pyx_ExceptionReset(__pyx_t_4, __pyx_t_5, __pyx_t_6); goto __pyx_L0; __pyx_L5_exception_handled:; __Pyx_XGIVEREF(__pyx_t_4); __Pyx_XGIVEREF(__pyx_t_5); __Pyx_XGIVEREF(__pyx_t_6); __Pyx_ExceptionReset(__pyx_t_4, __pyx_t_5, __pyx_t_6); __pyx_L11_try_end:; } goto __pyx_L3; } __pyx_L3:; /* "pandas/src/properties.pyx":30 * return * * if PyDict_Contains(cache, self.name): # <<<<<<<<<<<<<< * # not necessary to Py_INCREF * val = PyDict_GetItem(cache, self.name) */ __pyx_t_9 = __pyx_v_self->name; __Pyx_INCREF(__pyx_t_9); __pyx_t_7 = PyDict_Contains(__pyx_v_cache, __pyx_t_9); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 30; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_3 = (__pyx_t_7 != 0); if (__pyx_t_3) { /* "pandas/src/properties.pyx":32 * if PyDict_Contains(cache, self.name): * # not necessary to Py_INCREF * val = PyDict_GetItem(cache, self.name) # <<<<<<<<<<<<<< * else: * val = self.func(obj) */ __pyx_t_9 = __pyx_v_self->name; __Pyx_INCREF(__pyx_t_9); __pyx_t_10 = PyDict_GetItem(__pyx_v_cache, __pyx_t_9); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_9 = ((PyObject *)__pyx_t_10); __Pyx_INCREF(__pyx_t_9); __pyx_v_val = __pyx_t_9; __pyx_t_9 = 0; goto __pyx_L14; } /*else*/ { /* "pandas/src/properties.pyx":34 * val = PyDict_GetItem(cache, self.name) * else: * val = self.func(obj) # <<<<<<<<<<<<<< * PyDict_SetItem(cache, self.name, val) * return val */ __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 34; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_INCREF(__pyx_v_obj); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_v_obj); __Pyx_GIVEREF(__pyx_v_obj); __pyx_t_8 = PyObject_Call(__pyx_v_self->func, __pyx_t_9, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 34; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_v_val = __pyx_t_8; __pyx_t_8 = 0; /* "pandas/src/properties.pyx":35 * else: * val = self.func(obj) * PyDict_SetItem(cache, self.name, val) # <<<<<<<<<<<<<< * return val * */ __pyx_t_8 = __pyx_v_self->name; __Pyx_INCREF(__pyx_t_8); __pyx_t_7 = PyDict_SetItem(__pyx_v_cache, __pyx_t_8, __pyx_v_val); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } __pyx_L14:; /* "pandas/src/properties.pyx":36 * val = self.func(obj) * PyDict_SetItem(cache, self.name, val) * return val # <<<<<<<<<<<<<< * * def __set__(self, obj, value): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_val); __pyx_r = __pyx_v_val; goto __pyx_L0; /* "pandas/src/properties.pyx":20 * return self * * def __get__(self, obj, typ): # <<<<<<<<<<<<<< * # Get the cache or set a default one if needed * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); __Pyx_AddTraceback("pandas.lib.cache_readonly.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_cache); __Pyx_XDECREF(__pyx_v_val); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/properties.pyx":38 * return val * * def __set__(self, obj, value): # <<<<<<<<<<<<<< * * if not self.allow_setting: */ /* Python wrapper */ static int __pyx_pw_6pandas_3lib_14cache_readonly_7__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_value); /*proto*/ static int __pyx_pw_6pandas_3lib_14cache_readonly_7__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_3lib_14cache_readonly_6__set__(((struct __pyx_obj_6pandas_3lib_cache_readonly *)__pyx_v_self), ((PyObject *)__pyx_v_obj), ((PyObject *)__pyx_v_value)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pandas_3lib_14cache_readonly_6__set__(struct __pyx_obj_6pandas_3lib_cache_readonly *__pyx_v_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_value) { PyObject *__pyx_v_cache = NULL; int __pyx_r; __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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__set__", 0); /* "pandas/src/properties.pyx":40 * def __set__(self, obj, value): * * if not self.allow_setting: # <<<<<<<<<<<<<< * raise Exception("cannot set values for [%s]" % self.name) * */ __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_self->allow_setting); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 40; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_2 = ((!__pyx_t_1) != 0); if (__pyx_t_2) { /* "pandas/src/properties.pyx":41 * * if not self.allow_setting: * raise Exception("cannot set values for [%s]" % self.name) # <<<<<<<<<<<<<< * * # Get the cache or set a default one if needed */ __pyx_t_3 = __Pyx_PyString_Format(__pyx_kp_s_cannot_set_values_for_s, __pyx_v_self->name); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 41; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 41; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyObject_Call(__pyx_builtin_Exception, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 41; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; {__pyx_filename = __pyx_f[3]; __pyx_lineno = 41; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } /* "pandas/src/properties.pyx":44 * * # Get the cache or set a default one if needed * cache = getattr(obj, '_cache', None) # <<<<<<<<<<<<<< * if cache is None: * try: */ __pyx_t_3 = __Pyx_GetAttr3(__pyx_v_obj, __pyx_n_s_cache, Py_None); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 44; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_v_cache = __pyx_t_3; __pyx_t_3 = 0; /* "pandas/src/properties.pyx":45 * # Get the cache or set a default one if needed * cache = getattr(obj, '_cache', None) * if cache is None: # <<<<<<<<<<<<<< * try: * cache = obj._cache = {} */ __pyx_t_2 = (__pyx_v_cache == Py_None); __pyx_t_1 = (__pyx_t_2 != 0); if (__pyx_t_1) { /* "pandas/src/properties.pyx":46 * cache = getattr(obj, '_cache', None) * if cache is None: * try: # <<<<<<<<<<<<<< * cache = obj._cache = {} * except (AttributeError): */ { __Pyx_ExceptionSave(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7); __Pyx_XGOTREF(__pyx_t_5); __Pyx_XGOTREF(__pyx_t_6); __Pyx_XGOTREF(__pyx_t_7); /*try:*/ { /* "pandas/src/properties.pyx":47 * if cache is None: * try: * cache = obj._cache = {} # <<<<<<<<<<<<<< * except (AttributeError): * return */ __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 47; __pyx_clineno = __LINE__; goto __pyx_L5_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_t_3); __Pyx_DECREF_SET(__pyx_v_cache, __pyx_t_3); if (__Pyx_PyObject_SetAttrStr(__pyx_v_obj, __pyx_n_s_cache, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 47; __pyx_clineno = __LINE__; goto __pyx_L5_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; goto __pyx_L12_try_end; __pyx_L5_error:; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/properties.pyx":48 * try: * cache = obj._cache = {} * except (AttributeError): # <<<<<<<<<<<<<< * return * */ __pyx_t_8 = PyErr_ExceptionMatches(__pyx_builtin_AttributeError); if (__pyx_t_8) { __Pyx_AddTraceback("pandas.lib.cache_readonly.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_3, &__pyx_t_4, &__pyx_t_9) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L7_except_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_GOTREF(__pyx_t_4); __Pyx_GOTREF(__pyx_t_9); /* "pandas/src/properties.pyx":49 * cache = obj._cache = {} * except (AttributeError): * return # <<<<<<<<<<<<<< * * PyDict_SetItem(cache, self.name, value) */ __pyx_r = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; goto __pyx_L8_except_return; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; goto __pyx_L6_exception_handled; } goto __pyx_L7_except_error; __pyx_L7_except_error:; __Pyx_XGIVEREF(__pyx_t_5); __Pyx_XGIVEREF(__pyx_t_6); __Pyx_XGIVEREF(__pyx_t_7); __Pyx_ExceptionReset(__pyx_t_5, __pyx_t_6, __pyx_t_7); goto __pyx_L1_error; __pyx_L8_except_return:; __Pyx_XGIVEREF(__pyx_t_5); __Pyx_XGIVEREF(__pyx_t_6); __Pyx_XGIVEREF(__pyx_t_7); __Pyx_ExceptionReset(__pyx_t_5, __pyx_t_6, __pyx_t_7); goto __pyx_L0; __pyx_L6_exception_handled:; __Pyx_XGIVEREF(__pyx_t_5); __Pyx_XGIVEREF(__pyx_t_6); __Pyx_XGIVEREF(__pyx_t_7); __Pyx_ExceptionReset(__pyx_t_5, __pyx_t_6, __pyx_t_7); __pyx_L12_try_end:; } goto __pyx_L4; } __pyx_L4:; /* "pandas/src/properties.pyx":51 * return * * PyDict_SetItem(cache, self.name, value) # <<<<<<<<<<<<<< * * cdef class AxisProperty(object): */ __pyx_t_9 = __pyx_v_self->name; __Pyx_INCREF(__pyx_t_9); __pyx_t_8 = PyDict_SetItem(__pyx_v_cache, __pyx_t_9, __pyx_v_value); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; /* "pandas/src/properties.pyx":38 * return val * * def __set__(self, obj, value): # <<<<<<<<<<<<<< * * if not self.allow_setting: */ /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_9); __Pyx_AddTraceback("pandas.lib.cache_readonly.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_XDECREF(__pyx_v_cache); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/properties.pyx":7 * * cdef readonly: * object func, name, allow_setting # <<<<<<<<<<<<<< * * def __init__(self, func=None, allow_setting=False): */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_3lib_14cache_readonly_4func_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6pandas_3lib_14cache_readonly_4func_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_3lib_14cache_readonly_4func___get__(((struct __pyx_obj_6pandas_3lib_cache_readonly *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_3lib_14cache_readonly_4func___get__(struct __pyx_obj_6pandas_3lib_cache_readonly *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_self->func); __pyx_r = __pyx_v_self->func; goto __pyx_L0; /* function exit code */ __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_3lib_14cache_readonly_4name_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6pandas_3lib_14cache_readonly_4name_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_3lib_14cache_readonly_4name___get__(((struct __pyx_obj_6pandas_3lib_cache_readonly *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_3lib_14cache_readonly_4name___get__(struct __pyx_obj_6pandas_3lib_cache_readonly *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_self->name); __pyx_r = __pyx_v_self->name; goto __pyx_L0; /* function exit code */ __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_3lib_14cache_readonly_13allow_setting_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6pandas_3lib_14cache_readonly_13allow_setting_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_3lib_14cache_readonly_13allow_setting___get__(((struct __pyx_obj_6pandas_3lib_cache_readonly *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_3lib_14cache_readonly_13allow_setting___get__(struct __pyx_obj_6pandas_3lib_cache_readonly *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_self->allow_setting); __pyx_r = __pyx_v_self->allow_setting; goto __pyx_L0; /* function exit code */ __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/properties.pyx":57 * Py_ssize_t axis * * def __init__(self, axis=0): # <<<<<<<<<<<<<< * self.axis = axis * */ /* Python wrapper */ static int __pyx_pw_6pandas_3lib_12AxisProperty_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_pw_6pandas_3lib_12AxisProperty_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_axis = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_axis,0}; PyObject* values[1] = {0}; values[0] = ((PyObject *)__pyx_int_0); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_axis); if (value) { values[0] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 57; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_axis = values[0]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("__init__", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[3]; __pyx_lineno = 57; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.lib.AxisProperty.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return -1; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pandas_3lib_12AxisProperty___init__(((struct __pyx_obj_6pandas_3lib_AxisProperty *)__pyx_v_self), __pyx_v_axis); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pandas_3lib_12AxisProperty___init__(struct __pyx_obj_6pandas_3lib_AxisProperty *__pyx_v_self, PyObject *__pyx_v_axis) { int __pyx_r; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__init__", 0); /* "pandas/src/properties.pyx":58 * * def __init__(self, axis=0): * self.axis = axis # <<<<<<<<<<<<<< * * def __get__(self, obj, type): */ __pyx_t_1 = __Pyx_PyIndex_AsSsize_t(__pyx_v_axis); if (unlikely((__pyx_t_1 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 58; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_self->axis = __pyx_t_1; /* "pandas/src/properties.pyx":57 * Py_ssize_t axis * * def __init__(self, axis=0): # <<<<<<<<<<<<<< * self.axis = axis * */ /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("pandas.lib.AxisProperty.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/properties.pyx":60 * self.axis = axis * * def __get__(self, obj, type): # <<<<<<<<<<<<<< * cdef list axes = obj._data.axes * return axes[self.axis] */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_3lib_12AxisProperty_3__get__(PyObject *__pyx_v_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_type); /*proto*/ static PyObject *__pyx_pw_6pandas_3lib_12AxisProperty_3__get__(PyObject *__pyx_v_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_type) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_3lib_12AxisProperty_2__get__(((struct __pyx_obj_6pandas_3lib_AxisProperty *)__pyx_v_self), ((PyObject *)__pyx_v_obj), ((PyObject *)__pyx_v_type)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_3lib_12AxisProperty_2__get__(struct __pyx_obj_6pandas_3lib_AxisProperty *__pyx_v_self, PyObject *__pyx_v_obj, CYTHON_UNUSED PyObject *__pyx_v_type) { PyObject *__pyx_v_axes = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); /* "pandas/src/properties.pyx":61 * * def __get__(self, obj, type): * cdef list axes = obj._data.axes # <<<<<<<<<<<<<< * return axes[self.axis] * */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_obj, __pyx_n_s_data_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 61; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_axes); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 61; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (!(likely(PyList_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_t_2)->tp_name), 0))) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 61; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_axes = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/properties.pyx":62 * def __get__(self, obj, type): * cdef list axes = obj._data.axes * return axes[self.axis] # <<<<<<<<<<<<<< * * def __set__(self, obj, value): */ __Pyx_XDECREF(__pyx_r); if (unlikely(__pyx_v_axes == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[3]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_2 = __Pyx_GetItemInt_List(__pyx_v_axes, __pyx_v_self->axis, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "pandas/src/properties.pyx":60 * self.axis = axis * * def __get__(self, obj, type): # <<<<<<<<<<<<<< * cdef list axes = obj._data.axes * return axes[self.axis] */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("pandas.lib.AxisProperty.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_axes); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/properties.pyx":64 * return axes[self.axis] * * def __set__(self, obj, value): # <<<<<<<<<<<<<< * obj._set_axis(self.axis, value) */ /* Python wrapper */ static int __pyx_pw_6pandas_3lib_12AxisProperty_5__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_value); /*proto*/ static int __pyx_pw_6pandas_3lib_12AxisProperty_5__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_3lib_12AxisProperty_4__set__(((struct __pyx_obj_6pandas_3lib_AxisProperty *)__pyx_v_self), ((PyObject *)__pyx_v_obj), ((PyObject *)__pyx_v_value)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pandas_3lib_12AxisProperty_4__set__(struct __pyx_obj_6pandas_3lib_AxisProperty *__pyx_v_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__set__", 0); /* "pandas/src/properties.pyx":65 * * def __set__(self, obj, value): * obj._set_axis(self.axis, value) # <<<<<<<<<<<<<< */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_obj, __pyx_n_s_set_axis); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 65; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_self->axis); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 65; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 65; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_value); PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_value); __Pyx_GIVEREF(__pyx_v_value); __pyx_t_2 = 0; __pyx_t_2 = PyObject_Call(__pyx_t_1, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 65; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/properties.pyx":64 * return axes[self.axis] * * def __set__(self, obj, value): # <<<<<<<<<<<<<< * obj._set_axis(self.axis, value) */ /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("pandas.lib.AxisProperty.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/inference.pyx":33 * pass * * def infer_dtype(object _values): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_3lib_105infer_dtype(PyObject *__pyx_self, PyObject *__pyx_v__values); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_3lib_105infer_dtype = {__Pyx_NAMESTR("infer_dtype"), (PyCFunction)__pyx_pw_6pandas_3lib_105infer_dtype, METH_O, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_3lib_105infer_dtype(PyObject *__pyx_self, PyObject *__pyx_v__values) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("infer_dtype (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_3lib_104infer_dtype(__pyx_self, ((PyObject *)__pyx_v__values)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_3lib_104infer_dtype(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v__values) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_n; PyObject *__pyx_v_val = 0; PyArrayObject *__pyx_v_values = 0; PyObject *__pyx_v_val_kind = 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; Py_ssize_t __pyx_t_6; Py_ssize_t __pyx_t_7; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("infer_dtype", 0); __Pyx_INCREF(__pyx_v__values); /* "pandas/src/inference.pyx":39 * ndarray values * * if isinstance(_values, np.ndarray): # <<<<<<<<<<<<<< * values = _values * elif hasattr(_values,'values'): */ __pyx_t_1 = __Pyx_TypeCheck(__pyx_v__values, ((PyObject*)__pyx_ptype_5numpy_ndarray)); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { /* "pandas/src/inference.pyx":40 * * if isinstance(_values, np.ndarray): * values = _values # <<<<<<<<<<<<<< * elif hasattr(_values,'values'): * values = _values.values */ if (!(likely(((__pyx_v__values) == Py_None) || likely(__Pyx_TypeTest(__pyx_v__values, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 40; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_3 = __pyx_v__values; __Pyx_INCREF(__pyx_t_3); __pyx_v_values = ((PyArrayObject *)__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L3; } /* "pandas/src/inference.pyx":41 * if isinstance(_values, np.ndarray): * values = _values * elif hasattr(_values,'values'): # <<<<<<<<<<<<<< * values = _values.values * else: */ __pyx_t_2 = PyObject_HasAttr(__pyx_v__values, __pyx_n_s_values); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 41; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_1 = (__pyx_t_2 != 0); if (__pyx_t_1) { /* "pandas/src/inference.pyx":42 * values = _values * elif hasattr(_values,'values'): * values = _values.values # <<<<<<<<<<<<<< * else: * if not isinstance(_values, list): */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v__values, __pyx_n_s_values); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 42; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 42; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_values = ((PyArrayObject *)__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L3; } /*else*/ { /* "pandas/src/inference.pyx":44 * values = _values.values * else: * if not isinstance(_values, list): # <<<<<<<<<<<<<< * _values = list(_values) * values = list_to_object_array(_values) */ __pyx_t_1 = PyList_Check(__pyx_v__values); __pyx_t_2 = ((!(__pyx_t_1 != 0)) != 0); if (__pyx_t_2) { /* "pandas/src/inference.pyx":45 * else: * if not isinstance(_values, list): * _values = list(_values) # <<<<<<<<<<<<<< * values = list_to_object_array(_values) * */ __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 45; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_v__values); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v__values); __Pyx_GIVEREF(__pyx_v__values); __pyx_t_4 = PyObject_Call(((PyObject *)((PyObject*)(&PyList_Type))), __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 45; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF_SET(__pyx_v__values, __pyx_t_4); __pyx_t_4 = 0; goto __pyx_L4; } __pyx_L4:; /* "pandas/src/inference.pyx":46 * if not isinstance(_values, list): * _values = list(_values) * values = list_to_object_array(_values) # <<<<<<<<<<<<<< * * val_kind = values.dtype.type */ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_list_to_object_array); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 46; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 46; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_v__values); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v__values); __Pyx_GIVEREF(__pyx_v__values); __pyx_t_5 = PyObject_Call(__pyx_t_4, __pyx_t_3, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 46; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 46; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_values = ((PyArrayObject *)__pyx_t_5); __pyx_t_5 = 0; } __pyx_L3:; /* "pandas/src/inference.pyx":48 * values = list_to_object_array(_values) * * val_kind = values.dtype.type # <<<<<<<<<<<<<< * if val_kind in _TYPE_MAP: * return _TYPE_MAP[val_kind] */ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_values), __pyx_n_s_dtype); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_type); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_v_val_kind = __pyx_t_3; __pyx_t_3 = 0; /* "pandas/src/inference.pyx":49 * * val_kind = values.dtype.type * if val_kind in _TYPE_MAP: # <<<<<<<<<<<<<< * return _TYPE_MAP[val_kind] * */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_TYPE_MAP); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = (__Pyx_PySequence_Contains(__pyx_v_val_kind, __pyx_t_3, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_1 = (__pyx_t_2 != 0); if (__pyx_t_1) { /* "pandas/src/inference.pyx":50 * val_kind = values.dtype.type * if val_kind in _TYPE_MAP: * return _TYPE_MAP[val_kind] # <<<<<<<<<<<<<< * * if values.dtype != np.object_: */ __Pyx_XDECREF(__pyx_r); __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_TYPE_MAP); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 50; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = PyObject_GetItem(__pyx_t_3, __pyx_v_val_kind); if (unlikely(__pyx_t_5 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 50; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_r = __pyx_t_5; __pyx_t_5 = 0; goto __pyx_L0; } /* "pandas/src/inference.pyx":52 * return _TYPE_MAP[val_kind] * * if values.dtype != np.object_: # <<<<<<<<<<<<<< * values = values.astype('O') * */ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_values), __pyx_n_s_dtype); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 52; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 52; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_object_2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 52; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyObject_RichCompare(__pyx_t_5, __pyx_t_4, Py_NE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 52; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 52; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_1) { /* "pandas/src/inference.pyx":53 * * if values.dtype != np.object_: * values = values.astype('O') # <<<<<<<<<<<<<< * * n = len(values) */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_values), __pyx_n_s_astype); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 53; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PyObject_Call(__pyx_t_3, __pyx_tuple__29, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 53; __pyx_clineno = __LINE__; goto __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_5numpy_ndarray))))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 53; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF_SET(__pyx_v_values, ((PyArrayObject *)__pyx_t_4)); __pyx_t_4 = 0; goto __pyx_L6; } __pyx_L6:; /* "pandas/src/inference.pyx":55 * values = values.astype('O') * * n = len(values) # <<<<<<<<<<<<<< * if n == 0: * return 'empty' */ __pyx_t_6 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 55; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_6; /* "pandas/src/inference.pyx":56 * * n = len(values) * if n == 0: # <<<<<<<<<<<<<< * return 'empty' * */ __pyx_t_1 = ((__pyx_v_n == 0) != 0); if (__pyx_t_1) { /* "pandas/src/inference.pyx":57 * n = len(values) * if n == 0: * return 'empty' # <<<<<<<<<<<<<< * * # make contiguous */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_n_s_empty); __pyx_r = __pyx_n_s_empty; goto __pyx_L0; } /* "pandas/src/inference.pyx":60 * * # make contiguous * values = values.ravel() # <<<<<<<<<<<<<< * * # try to use a valid value */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_values), __pyx_n_s_ravel); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 60; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = PyObject_Call(__pyx_t_4, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 60; __pyx_clineno = __LINE__; goto __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_5numpy_ndarray))))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 60; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF_SET(__pyx_v_values, ((PyArrayObject *)__pyx_t_3)); __pyx_t_3 = 0; /* "pandas/src/inference.pyx":63 * * # try to use a valid value * for i in range(n): # <<<<<<<<<<<<<< * val = util.get_value_1d(values, i) * if not is_null_datetimelike(val): */ __pyx_t_6 = __pyx_v_n; for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_6; __pyx_t_7+=1) { __pyx_v_i = __pyx_t_7; /* "pandas/src/inference.pyx":64 * # try to use a valid value * for i in range(n): * val = util.get_value_1d(values, i) # <<<<<<<<<<<<<< * if not is_null_datetimelike(val): * break */ __pyx_t_3 = get_value_1d(__pyx_v_values, __pyx_v_i); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 64; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_XDECREF_SET(__pyx_v_val, __pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/inference.pyx":65 * for i in range(n): * val = util.get_value_1d(values, i) * if not is_null_datetimelike(val): # <<<<<<<<<<<<<< * break * */ __pyx_t_1 = ((!(__pyx_f_6pandas_3lib_is_null_datetimelike(__pyx_v_val) != 0)) != 0); if (__pyx_t_1) { /* "pandas/src/inference.pyx":66 * val = util.get_value_1d(values, i) * if not is_null_datetimelike(val): * break # <<<<<<<<<<<<<< * * if util.is_datetime64_object(val) or val is NaT: */ goto __pyx_L9_break; } } __pyx_L9_break:; /* "pandas/src/inference.pyx":68 * break * * if util.is_datetime64_object(val) or val is NaT: # <<<<<<<<<<<<<< * if is_datetime64_array(values): * return 'datetime64' */ if (unlikely(!__pyx_v_val)) { __Pyx_RaiseUnboundLocalError("val"); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 68; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } if (!(is_datetime64_object(__pyx_v_val) != 0)) { __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_NaT); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 68; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = (__pyx_v_val == __pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_2 = __pyx_t_1; } else { __pyx_t_2 = (is_datetime64_object(__pyx_v_val) != 0); } if (__pyx_t_2) { /* "pandas/src/inference.pyx":69 * * if util.is_datetime64_object(val) or val is NaT: * if is_datetime64_array(values): # <<<<<<<<<<<<<< * return 'datetime64' * elif is_timedelta_or_timedelta64_array(values): */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_is_datetime64_array); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(((PyObject *)__pyx_v_values)); PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_v_values)); __Pyx_GIVEREF(((PyObject *)__pyx_v_values)); __pyx_t_5 = PyObject_Call(__pyx_t_3, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_2) { /* "pandas/src/inference.pyx":70 * if util.is_datetime64_object(val) or val is NaT: * if is_datetime64_array(values): * return 'datetime64' # <<<<<<<<<<<<<< * elif is_timedelta_or_timedelta64_array(values): * return 'timedelta' */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_n_s_datetime64); __pyx_r = __pyx_n_s_datetime64; goto __pyx_L0; } /* "pandas/src/inference.pyx":71 * if is_datetime64_array(values): * return 'datetime64' * elif is_timedelta_or_timedelta64_array(values): # <<<<<<<<<<<<<< * return 'timedelta' * */ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_is_timedelta_or_timedelta64_arra); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 71; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 71; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(((PyObject *)__pyx_v_values)); PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_v_values)); __Pyx_GIVEREF(((PyObject *)__pyx_v_values)); __pyx_t_3 = PyObject_Call(__pyx_t_5, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 71; __pyx_clineno = __LINE__; goto __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_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 71; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_2) { /* "pandas/src/inference.pyx":72 * return 'datetime64' * elif is_timedelta_or_timedelta64_array(values): * return 'timedelta' # <<<<<<<<<<<<<< * * elif util.is_integer_object(val): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_n_s_timedelta); __pyx_r = __pyx_n_s_timedelta; goto __pyx_L0; } goto __pyx_L11; } /* "pandas/src/inference.pyx":74 * return 'timedelta' * * elif util.is_integer_object(val): # <<<<<<<<<<<<<< * # a timedelta will show true here as well * if is_timedelta(val): */ __pyx_t_2 = (is_integer_object(__pyx_v_val) != 0); if (__pyx_t_2) { /* "pandas/src/inference.pyx":76 * elif util.is_integer_object(val): * # a timedelta will show true here as well * if is_timedelta(val): # <<<<<<<<<<<<<< * if is_timedelta_or_timedelta64_array(values): * return 'timedelta' */ __pyx_t_2 = (__pyx_f_6pandas_3lib_is_timedelta(__pyx_v_val) != 0); if (__pyx_t_2) { /* "pandas/src/inference.pyx":77 * # a timedelta will show true here as well * if is_timedelta(val): * if is_timedelta_or_timedelta64_array(values): # <<<<<<<<<<<<<< * return 'timedelta' * */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_is_timedelta_or_timedelta64_arra); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 77; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 77; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(((PyObject *)__pyx_v_values)); PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_v_values)); __Pyx_GIVEREF(((PyObject *)__pyx_v_values)); __pyx_t_5 = PyObject_Call(__pyx_t_3, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 77; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 77; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_2) { /* "pandas/src/inference.pyx":78 * if is_timedelta(val): * if is_timedelta_or_timedelta64_array(values): * return 'timedelta' # <<<<<<<<<<<<<< * * if is_integer_array(values): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_n_s_timedelta); __pyx_r = __pyx_n_s_timedelta; goto __pyx_L0; } goto __pyx_L13; } __pyx_L13:; /* "pandas/src/inference.pyx":80 * return 'timedelta' * * if is_integer_array(values): # <<<<<<<<<<<<<< * return 'integer' * elif is_integer_float_array(values): */ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_is_integer_array); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 80; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 80; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(((PyObject *)__pyx_v_values)); PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_v_values)); __Pyx_GIVEREF(((PyObject *)__pyx_v_values)); __pyx_t_3 = PyObject_Call(__pyx_t_5, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 80; __pyx_clineno = __LINE__; goto __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_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 80; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_2) { /* "pandas/src/inference.pyx":81 * * if is_integer_array(values): * return 'integer' # <<<<<<<<<<<<<< * elif is_integer_float_array(values): * return 'mixed-integer-float' */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_n_s_integer); __pyx_r = __pyx_n_s_integer; goto __pyx_L0; } /* "pandas/src/inference.pyx":82 * if is_integer_array(values): * return 'integer' * elif is_integer_float_array(values): # <<<<<<<<<<<<<< * return 'mixed-integer-float' * elif is_timedelta_or_timedelta64_array(values): */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_is_integer_float_array); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(((PyObject *)__pyx_v_values)); PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_v_values)); __Pyx_GIVEREF(((PyObject *)__pyx_v_values)); __pyx_t_5 = PyObject_Call(__pyx_t_3, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_2) { /* "pandas/src/inference.pyx":83 * return 'integer' * elif is_integer_float_array(values): * return 'mixed-integer-float' # <<<<<<<<<<<<<< * elif is_timedelta_or_timedelta64_array(values): * return 'timedelta' */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_kp_s_mixed_integer_float); __pyx_r = __pyx_kp_s_mixed_integer_float; goto __pyx_L0; } /* "pandas/src/inference.pyx":84 * elif is_integer_float_array(values): * return 'mixed-integer-float' * elif is_timedelta_or_timedelta64_array(values): # <<<<<<<<<<<<<< * return 'timedelta' * return 'mixed-integer' */ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_is_timedelta_or_timedelta64_arra); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 84; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 84; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(((PyObject *)__pyx_v_values)); PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_v_values)); __Pyx_GIVEREF(((PyObject *)__pyx_v_values)); __pyx_t_3 = PyObject_Call(__pyx_t_5, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 84; __pyx_clineno = __LINE__; goto __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_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 84; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_2) { /* "pandas/src/inference.pyx":85 * return 'mixed-integer-float' * elif is_timedelta_or_timedelta64_array(values): * return 'timedelta' # <<<<<<<<<<<<<< * return 'mixed-integer' * */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_n_s_timedelta); __pyx_r = __pyx_n_s_timedelta; goto __pyx_L0; } /* "pandas/src/inference.pyx":86 * elif is_timedelta_or_timedelta64_array(values): * return 'timedelta' * return 'mixed-integer' # <<<<<<<<<<<<<< * * elif is_datetime(val): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_kp_s_mixed_integer); __pyx_r = __pyx_kp_s_mixed_integer; goto __pyx_L0; } /* "pandas/src/inference.pyx":88 * return 'mixed-integer' * * elif is_datetime(val): # <<<<<<<<<<<<<< * if is_datetime_array(values): * return 'datetime' */ __pyx_t_2 = (__pyx_f_6pandas_3lib_is_datetime(__pyx_v_val) != 0); if (__pyx_t_2) { /* "pandas/src/inference.pyx":89 * * elif is_datetime(val): * if is_datetime_array(values): # <<<<<<<<<<<<<< * return 'datetime' * */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_is_datetime_array); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 89; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 89; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(((PyObject *)__pyx_v_values)); PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_v_values)); __Pyx_GIVEREF(((PyObject *)__pyx_v_values)); __pyx_t_5 = PyObject_Call(__pyx_t_3, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 89; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 89; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_2) { /* "pandas/src/inference.pyx":90 * elif is_datetime(val): * if is_datetime_array(values): * return 'datetime' # <<<<<<<<<<<<<< * * elif is_date(val): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_n_s_datetime); __pyx_r = __pyx_n_s_datetime; goto __pyx_L0; } goto __pyx_L11; } /* "pandas/src/inference.pyx":92 * return 'datetime' * * elif is_date(val): # <<<<<<<<<<<<<< * if is_date_array(values): * return 'date' */ __pyx_t_2 = (__pyx_f_6pandas_3lib_is_date(__pyx_v_val) != 0); if (__pyx_t_2) { /* "pandas/src/inference.pyx":93 * * elif is_date(val): * if is_date_array(values): # <<<<<<<<<<<<<< * return 'date' * */ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_is_date_array); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 93; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 93; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(((PyObject *)__pyx_v_values)); PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_v_values)); __Pyx_GIVEREF(((PyObject *)__pyx_v_values)); __pyx_t_3 = PyObject_Call(__pyx_t_5, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 93; __pyx_clineno = __LINE__; goto __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_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 93; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_2) { /* "pandas/src/inference.pyx":94 * elif is_date(val): * if is_date_array(values): * return 'date' # <<<<<<<<<<<<<< * * elif is_time(val): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_n_s_date); __pyx_r = __pyx_n_s_date; goto __pyx_L0; } goto __pyx_L11; } /* "pandas/src/inference.pyx":96 * return 'date' * * elif is_time(val): # <<<<<<<<<<<<<< * if is_time_array(values): * return 'time' */ __pyx_t_2 = (__pyx_f_6pandas_3lib_is_time(__pyx_v_val) != 0); if (__pyx_t_2) { /* "pandas/src/inference.pyx":97 * * elif is_time(val): * if is_time_array(values): # <<<<<<<<<<<<<< * return 'time' * */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_is_time_array); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 97; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 97; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(((PyObject *)__pyx_v_values)); PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_v_values)); __Pyx_GIVEREF(((PyObject *)__pyx_v_values)); __pyx_t_5 = PyObject_Call(__pyx_t_3, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 97; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 97; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_2) { /* "pandas/src/inference.pyx":98 * elif is_time(val): * if is_time_array(values): * return 'time' # <<<<<<<<<<<<<< * * elif util.is_float_object(val): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_n_s_time); __pyx_r = __pyx_n_s_time; goto __pyx_L0; } goto __pyx_L11; } /* "pandas/src/inference.pyx":100 * return 'time' * * elif util.is_float_object(val): # <<<<<<<<<<<<<< * if is_float_array(values): * return 'floating' */ __pyx_t_2 = (is_float_object(__pyx_v_val) != 0); if (__pyx_t_2) { /* "pandas/src/inference.pyx":101 * * elif util.is_float_object(val): * if is_float_array(values): # <<<<<<<<<<<<<< * return 'floating' * elif is_integer_float_array(values): */ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_is_float_array); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 101; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 101; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(((PyObject *)__pyx_v_values)); PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_v_values)); __Pyx_GIVEREF(((PyObject *)__pyx_v_values)); __pyx_t_3 = PyObject_Call(__pyx_t_5, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 101; __pyx_clineno = __LINE__; goto __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_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 101; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_2) { /* "pandas/src/inference.pyx":102 * elif util.is_float_object(val): * if is_float_array(values): * return 'floating' # <<<<<<<<<<<<<< * elif is_integer_float_array(values): * return 'mixed-integer-float' */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_n_s_floating); __pyx_r = __pyx_n_s_floating; goto __pyx_L0; } /* "pandas/src/inference.pyx":103 * if is_float_array(values): * return 'floating' * elif is_integer_float_array(values): # <<<<<<<<<<<<<< * return 'mixed-integer-float' * */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_is_integer_float_array); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(((PyObject *)__pyx_v_values)); PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_v_values)); __Pyx_GIVEREF(((PyObject *)__pyx_v_values)); __pyx_t_5 = PyObject_Call(__pyx_t_3, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_2) { /* "pandas/src/inference.pyx":104 * return 'floating' * elif is_integer_float_array(values): * return 'mixed-integer-float' # <<<<<<<<<<<<<< * * elif util.is_bool_object(val): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_kp_s_mixed_integer_float); __pyx_r = __pyx_kp_s_mixed_integer_float; goto __pyx_L0; } goto __pyx_L11; } /* "pandas/src/inference.pyx":106 * return 'mixed-integer-float' * * elif util.is_bool_object(val): # <<<<<<<<<<<<<< * if is_bool_array(values): * return 'boolean' */ __pyx_t_2 = (is_bool_object(__pyx_v_val) != 0); if (__pyx_t_2) { /* "pandas/src/inference.pyx":107 * * elif util.is_bool_object(val): * if is_bool_array(values): # <<<<<<<<<<<<<< * return 'boolean' * */ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_is_bool_array); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(((PyObject *)__pyx_v_values)); PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_v_values)); __Pyx_GIVEREF(((PyObject *)__pyx_v_values)); __pyx_t_3 = PyObject_Call(__pyx_t_5, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __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_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_2) { /* "pandas/src/inference.pyx":108 * elif util.is_bool_object(val): * if is_bool_array(values): * return 'boolean' # <<<<<<<<<<<<<< * * elif PyString_Check(val): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_n_s_boolean); __pyx_r = __pyx_n_s_boolean; goto __pyx_L0; } goto __pyx_L11; } /* "pandas/src/inference.pyx":110 * return 'boolean' * * elif PyString_Check(val): # <<<<<<<<<<<<<< * if is_string_array(values): * return 'string' */ __pyx_t_2 = (PyString_Check(__pyx_v_val) != 0); if (__pyx_t_2) { /* "pandas/src/inference.pyx":111 * * elif PyString_Check(val): * if is_string_array(values): # <<<<<<<<<<<<<< * return 'string' * */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_is_string_array); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 111; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 111; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(((PyObject *)__pyx_v_values)); PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_v_values)); __Pyx_GIVEREF(((PyObject *)__pyx_v_values)); __pyx_t_5 = PyObject_Call(__pyx_t_3, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 111; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 111; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_2) { /* "pandas/src/inference.pyx":112 * elif PyString_Check(val): * if is_string_array(values): * return 'string' # <<<<<<<<<<<<<< * * elif PyUnicode_Check(val): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_n_s_string); __pyx_r = __pyx_n_s_string; goto __pyx_L0; } goto __pyx_L11; } /* "pandas/src/inference.pyx":114 * return 'string' * * elif PyUnicode_Check(val): # <<<<<<<<<<<<<< * if is_unicode_array(values): * return 'unicode' */ __pyx_t_2 = (PyUnicode_Check(__pyx_v_val) != 0); if (__pyx_t_2) { /* "pandas/src/inference.pyx":115 * * elif PyUnicode_Check(val): * if is_unicode_array(values): # <<<<<<<<<<<<<< * return 'unicode' * */ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_is_unicode_array); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 115; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 115; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(((PyObject *)__pyx_v_values)); PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_v_values)); __Pyx_GIVEREF(((PyObject *)__pyx_v_values)); __pyx_t_3 = PyObject_Call(__pyx_t_5, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 115; __pyx_clineno = __LINE__; goto __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_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 115; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_2) { /* "pandas/src/inference.pyx":116 * elif PyUnicode_Check(val): * if is_unicode_array(values): * return 'unicode' # <<<<<<<<<<<<<< * * elif is_timedelta(val): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_n_s_unicode); __pyx_r = __pyx_n_s_unicode; goto __pyx_L0; } goto __pyx_L11; } /* "pandas/src/inference.pyx":118 * return 'unicode' * * elif is_timedelta(val): # <<<<<<<<<<<<<< * if is_timedelta_or_timedelta64_array(values): * return 'timedelta' */ __pyx_t_2 = (__pyx_f_6pandas_3lib_is_timedelta(__pyx_v_val) != 0); if (__pyx_t_2) { /* "pandas/src/inference.pyx":119 * * elif is_timedelta(val): * if is_timedelta_or_timedelta64_array(values): # <<<<<<<<<<<<<< * return 'timedelta' * */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_is_timedelta_or_timedelta64_arra); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 119; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 119; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(((PyObject *)__pyx_v_values)); PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_v_values)); __Pyx_GIVEREF(((PyObject *)__pyx_v_values)); __pyx_t_5 = PyObject_Call(__pyx_t_3, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 119; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 119; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_2) { /* "pandas/src/inference.pyx":120 * elif is_timedelta(val): * if is_timedelta_or_timedelta64_array(values): * return 'timedelta' # <<<<<<<<<<<<<< * * elif is_period(val): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_n_s_timedelta); __pyx_r = __pyx_n_s_timedelta; goto __pyx_L0; } goto __pyx_L11; } /* "pandas/src/inference.pyx":122 * return 'timedelta' * * elif is_period(val): # <<<<<<<<<<<<<< * if is_period_array(values): * return 'period' */ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_is_period); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 122; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 122; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_v_val); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_val); __Pyx_GIVEREF(__pyx_v_val); __pyx_t_3 = PyObject_Call(__pyx_t_5, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 122; __pyx_clineno = __LINE__; goto __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_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 122; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_2) { /* "pandas/src/inference.pyx":123 * * elif is_period(val): * if is_period_array(values): # <<<<<<<<<<<<<< * return 'period' * */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_is_period_array); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 123; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 123; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(((PyObject *)__pyx_v_values)); PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_v_values)); __Pyx_GIVEREF(((PyObject *)__pyx_v_values)); __pyx_t_5 = PyObject_Call(__pyx_t_3, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 123; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 123; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_2) { /* "pandas/src/inference.pyx":124 * elif is_period(val): * if is_period_array(values): * return 'period' # <<<<<<<<<<<<<< * * for i in range(n): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_n_s_period); __pyx_r = __pyx_n_s_period; goto __pyx_L0; } goto __pyx_L11; } __pyx_L11:; /* "pandas/src/inference.pyx":126 * return 'period' * * for i in range(n): # <<<<<<<<<<<<<< * val = util.get_value_1d(values, i) * if util.is_integer_object(val): */ __pyx_t_6 = __pyx_v_n; for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_6; __pyx_t_7+=1) { __pyx_v_i = __pyx_t_7; /* "pandas/src/inference.pyx":127 * * for i in range(n): * val = util.get_value_1d(values, i) # <<<<<<<<<<<<<< * if util.is_integer_object(val): * return 'mixed-integer' */ __pyx_t_5 = get_value_1d(__pyx_v_values, __pyx_v_i); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 127; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF_SET(__pyx_v_val, __pyx_t_5); __pyx_t_5 = 0; /* "pandas/src/inference.pyx":128 * for i in range(n): * val = util.get_value_1d(values, i) * if util.is_integer_object(val): # <<<<<<<<<<<<<< * return 'mixed-integer' * */ __pyx_t_2 = (is_integer_object(__pyx_v_val) != 0); if (__pyx_t_2) { /* "pandas/src/inference.pyx":129 * val = util.get_value_1d(values, i) * if util.is_integer_object(val): * return 'mixed-integer' # <<<<<<<<<<<<<< * * return 'mixed' */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_kp_s_mixed_integer); __pyx_r = __pyx_kp_s_mixed_integer; goto __pyx_L0; } } /* "pandas/src/inference.pyx":131 * return 'mixed-integer' * * return 'mixed' # <<<<<<<<<<<<<< * * def infer_dtype_list(list values): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_n_s_mixed); __pyx_r = __pyx_n_s_mixed; goto __pyx_L0; /* "pandas/src/inference.pyx":33 * pass * * def infer_dtype(object _values): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("pandas.lib.infer_dtype", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_val); __Pyx_XDECREF((PyObject *)__pyx_v_values); __Pyx_XDECREF(__pyx_v_val_kind); __Pyx_XDECREF(__pyx_v__values); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/inference.pyx":133 * return 'mixed' * * def infer_dtype_list(list values): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = len(values) */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_3lib_107infer_dtype_list(PyObject *__pyx_self, PyObject *__pyx_v_values); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_3lib_107infer_dtype_list = {__Pyx_NAMESTR("infer_dtype_list"), (PyCFunction)__pyx_pw_6pandas_3lib_107infer_dtype_list, METH_O, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_3lib_107infer_dtype_list(PyObject *__pyx_self, PyObject *__pyx_v_values) { CYTHON_UNUSED int __pyx_lineno = 0; CYTHON_UNUSED const char *__pyx_filename = NULL; CYTHON_UNUSED int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("infer_dtype_list (wrapper)", 0); if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), (&PyList_Type), 1, "values", 1))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 133; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_3lib_106infer_dtype_list(__pyx_self, ((PyObject*)__pyx_v_values)); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_3lib_106infer_dtype_list(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_values) { CYTHON_UNUSED Py_ssize_t __pyx_v_n; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("infer_dtype_list", 0); /* "pandas/src/inference.pyx":135 * def infer_dtype_list(list values): * cdef: * Py_ssize_t i, n = len(values) # <<<<<<<<<<<<<< * pass * */ if (unlikely(__pyx_v_values == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 135; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_1 = PyList_GET_SIZE(__pyx_v_values); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 135; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/src/inference.pyx":133 * return 'mixed' * * def infer_dtype_list(list values): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = len(values) */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("pandas.lib.infer_dtype_list", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/inference.pyx":139 * * * cdef inline bint is_null_datetimelike(v): # <<<<<<<<<<<<<< * return util._checknull(v) or (util.is_integer_object(v) and v == iNaT) or v is NaT * */ static CYTHON_INLINE int __pyx_f_6pandas_3lib_is_null_datetimelike(PyObject *__pyx_v_v) { int __pyx_r; __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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("is_null_datetimelike", 0); /* "pandas/src/inference.pyx":140 * * cdef inline bint is_null_datetimelike(v): * return util._checknull(v) or (util.is_integer_object(v) and v == iNaT) or v is NaT # <<<<<<<<<<<<<< * * cdef inline bint is_datetime(object o): */ __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_f_4util__checknull(__pyx_v_v)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 140; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 140; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (!__pyx_t_2) { __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_3 = __Pyx_PyInt_From_int(is_integer_object(__pyx_v_v)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 140; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 140; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__pyx_t_2) { __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_iNaT); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 140; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = PyObject_RichCompare(__pyx_v_v, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 140; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __pyx_t_5; __pyx_t_5 = 0; } else { __pyx_t_4 = __pyx_t_3; __pyx_t_3 = 0; } __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 140; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (!__pyx_t_2) { __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_NaT); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 140; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = (__pyx_v_v == __pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 140; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = __pyx_t_3; __pyx_t_3 = 0; } else { __pyx_t_5 = __pyx_t_4; __pyx_t_4 = 0; } __pyx_t_4 = __pyx_t_5; __pyx_t_5 = 0; } else { __pyx_t_4 = __pyx_t_1; __pyx_t_1 = 0; } __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 140; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_r = __pyx_t_2; goto __pyx_L0; /* "pandas/src/inference.pyx":139 * * * cdef inline bint is_null_datetimelike(v): # <<<<<<<<<<<<<< * return util._checknull(v) or (util.is_integer_object(v) and v == iNaT) or v is NaT * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_WriteUnraisable("pandas.lib.is_null_datetimelike", __pyx_clineno, __pyx_lineno, __pyx_filename, 0); __pyx_r = 0; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/inference.pyx":142 * return util._checknull(v) or (util.is_integer_object(v) and v == iNaT) or v is NaT * * cdef inline bint is_datetime(object o): # <<<<<<<<<<<<<< * return PyDateTime_Check(o) * */ static CYTHON_INLINE int __pyx_f_6pandas_3lib_is_datetime(PyObject *__pyx_v_o) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("is_datetime", 0); /* "pandas/src/inference.pyx":143 * * cdef inline bint is_datetime(object o): * return PyDateTime_Check(o) # <<<<<<<<<<<<<< * * cdef inline bint is_date(object o): */ __pyx_r = PyDateTime_Check(__pyx_v_o); goto __pyx_L0; /* "pandas/src/inference.pyx":142 * return util._checknull(v) or (util.is_integer_object(v) and v == iNaT) or v is NaT * * cdef inline bint is_datetime(object o): # <<<<<<<<<<<<<< * return PyDateTime_Check(o) * */ /* function exit code */ __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/inference.pyx":145 * return PyDateTime_Check(o) * * cdef inline bint is_date(object o): # <<<<<<<<<<<<<< * return PyDate_Check(o) * */ static CYTHON_INLINE int __pyx_f_6pandas_3lib_is_date(PyObject *__pyx_v_o) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("is_date", 0); /* "pandas/src/inference.pyx":146 * * cdef inline bint is_date(object o): * return PyDate_Check(o) # <<<<<<<<<<<<<< * * cdef inline bint is_time(object o): */ __pyx_r = PyDate_Check(__pyx_v_o); goto __pyx_L0; /* "pandas/src/inference.pyx":145 * return PyDateTime_Check(o) * * cdef inline bint is_date(object o): # <<<<<<<<<<<<<< * return PyDate_Check(o) * */ /* function exit code */ __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/inference.pyx":148 * return PyDate_Check(o) * * cdef inline bint is_time(object o): # <<<<<<<<<<<<<< * return PyTime_Check(o) * */ static CYTHON_INLINE int __pyx_f_6pandas_3lib_is_time(PyObject *__pyx_v_o) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("is_time", 0); /* "pandas/src/inference.pyx":149 * * cdef inline bint is_time(object o): * return PyTime_Check(o) # <<<<<<<<<<<<<< * * cdef inline bint is_timedelta(object o): */ __pyx_r = PyTime_Check(__pyx_v_o); goto __pyx_L0; /* "pandas/src/inference.pyx":148 * return PyDate_Check(o) * * cdef inline bint is_time(object o): # <<<<<<<<<<<<<< * return PyTime_Check(o) * */ /* function exit code */ __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/inference.pyx":151 * return PyTime_Check(o) * * cdef inline bint is_timedelta(object o): # <<<<<<<<<<<<<< * return PyDelta_Check(o) or util.is_timedelta64_object(o) * */ static CYTHON_INLINE int __pyx_f_6pandas_3lib_is_timedelta(PyObject *__pyx_v_o) { int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("is_timedelta", 0); /* "pandas/src/inference.pyx":152 * * cdef inline bint is_timedelta(object o): * return PyDelta_Check(o) or util.is_timedelta64_object(o) # <<<<<<<<<<<<<< * * def is_bool_array(ndarray values): */ __pyx_t_1 = __Pyx_PyBool_FromLong(PyDelta_Check(__pyx_v_o)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 152; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 152; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (!__pyx_t_2) { __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_3 = __Pyx_PyInt_From_int(is_timedelta64_object(__pyx_v_o)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 152; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __pyx_t_3; __pyx_t_3 = 0; } else { __pyx_t_4 = __pyx_t_1; __pyx_t_1 = 0; } __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 152; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_r = __pyx_t_2; goto __pyx_L0; /* "pandas/src/inference.pyx":151 * return PyTime_Check(o) * * cdef inline bint is_timedelta(object o): # <<<<<<<<<<<<<< * return PyDelta_Check(o) or util.is_timedelta64_object(o) * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_WriteUnraisable("pandas.lib.is_timedelta", __pyx_clineno, __pyx_lineno, __pyx_filename, 0); __pyx_r = 0; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/inference.pyx":154 * return PyDelta_Check(o) or util.is_timedelta64_object(o) * * def is_bool_array(ndarray values): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = len(values) */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_3lib_109is_bool_array(PyObject *__pyx_self, PyObject *__pyx_v_values); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_3lib_109is_bool_array = {__Pyx_NAMESTR("is_bool_array"), (PyCFunction)__pyx_pw_6pandas_3lib_109is_bool_array, METH_O, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_3lib_109is_bool_array(PyObject *__pyx_self, PyObject *__pyx_v_values) { CYTHON_UNUSED int __pyx_lineno = 0; CYTHON_UNUSED const char *__pyx_filename = NULL; CYTHON_UNUSED int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("is_bool_array (wrapper)", 0); if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 154; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_3lib_108is_bool_array(__pyx_self, ((PyArrayObject *)__pyx_v_values)); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_3lib_108is_bool_array(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_n; PyArrayObject *__pyx_v_objbuf = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_objbuf; __Pyx_Buffer __pyx_pybuffer_objbuf; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; int __pyx_t_5; 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("is_bool_array", 0); __pyx_pybuffer_objbuf.pybuffer.buf = NULL; __pyx_pybuffer_objbuf.refcount = 0; __pyx_pybuffernd_objbuf.data = NULL; __pyx_pybuffernd_objbuf.rcbuffer = &__pyx_pybuffer_objbuf; /* "pandas/src/inference.pyx":156 * def is_bool_array(ndarray values): * cdef: * Py_ssize_t i, n = len(values) # <<<<<<<<<<<<<< * ndarray[object] objbuf * object obj */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 156; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/src/inference.pyx":160 * object obj * * if issubclass(values.dtype.type, np.bool_): # <<<<<<<<<<<<<< * return True * elif values.dtype == np.object_: */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_values), __pyx_n_s_dtype); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 160; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_type); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 160; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 160; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_bool); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 160; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_5 = PyObject_IsSubclass(__pyx_t_3, __pyx_t_4); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 160; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_6 = (__pyx_t_5 != 0); if (__pyx_t_6) { /* "pandas/src/inference.pyx":161 * * if issubclass(values.dtype.type, np.bool_): * return True # <<<<<<<<<<<<<< * elif values.dtype == np.object_: * objbuf = values */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(Py_True); __pyx_r = Py_True; goto __pyx_L0; } /* "pandas/src/inference.pyx":162 * if issubclass(values.dtype.type, np.bool_): * return True * elif values.dtype == np.object_: # <<<<<<<<<<<<<< * objbuf = values * */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_values), __pyx_n_s_dtype); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 162; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 162; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_object_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 162; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyObject_RichCompare(__pyx_t_4, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 162; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 162; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_6) { /* "pandas/src/inference.pyx":163 * return True * elif values.dtype == np.object_: * objbuf = values # <<<<<<<<<<<<<< * * if n == 0: */ { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_objbuf.rcbuffer->pybuffer); __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_objbuf.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_v_values), &__Pyx_TypeInfo_object, 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_objbuf.rcbuffer->pybuffer, (PyObject*)__pyx_v_objbuf, &__Pyx_TypeInfo_object, 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_pybuffernd_objbuf.diminfo[0].strides = __pyx_pybuffernd_objbuf.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_objbuf.diminfo[0].shape = __pyx_pybuffernd_objbuf.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 163; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __Pyx_INCREF(((PyObject *)__pyx_v_values)); __pyx_v_objbuf = ((PyArrayObject *)__pyx_v_values); /* "pandas/src/inference.pyx":165 * objbuf = values * * if n == 0: # <<<<<<<<<<<<<< * return False * */ __pyx_t_6 = ((__pyx_v_n == 0) != 0); if (__pyx_t_6) { /* "pandas/src/inference.pyx":166 * * if n == 0: * return False # <<<<<<<<<<<<<< * * for i in range(n): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(Py_False); __pyx_r = Py_False; goto __pyx_L0; } /* "pandas/src/inference.pyx":168 * return False * * for i in range(n): # <<<<<<<<<<<<<< * if not util.is_bool_object(objbuf[i]): * return False */ __pyx_t_1 = __pyx_v_n; for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_1; __pyx_t_11+=1) { __pyx_v_i = __pyx_t_11; /* "pandas/src/inference.pyx":169 * * for i in range(n): * if not util.is_bool_object(objbuf[i]): # <<<<<<<<<<<<<< * return False * return True */ __pyx_t_12 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_12 < 0) { __pyx_t_12 += __pyx_pybuffernd_objbuf.diminfo[0].shape; if (unlikely(__pyx_t_12 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_12 >= __pyx_pybuffernd_objbuf.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 169; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_3 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_objbuf.rcbuffer->pybuffer.buf, __pyx_t_12, __pyx_pybuffernd_objbuf.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_3); __pyx_t_6 = ((!(is_bool_object(__pyx_t_3) != 0)) != 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_6) { /* "pandas/src/inference.pyx":170 * for i in range(n): * if not util.is_bool_object(objbuf[i]): * return False # <<<<<<<<<<<<<< * return True * else: */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(Py_False); __pyx_r = Py_False; goto __pyx_L0; } } /* "pandas/src/inference.pyx":171 * if not util.is_bool_object(objbuf[i]): * return False * return True # <<<<<<<<<<<<<< * else: * return False */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(Py_True); __pyx_r = Py_True; goto __pyx_L0; } /*else*/ { /* "pandas/src/inference.pyx":173 * return True * else: * return False # <<<<<<<<<<<<<< * * def is_integer(object o): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(Py_False); __pyx_r = Py_False; goto __pyx_L0; } /* "pandas/src/inference.pyx":154 * return PyDelta_Check(o) or util.is_timedelta64_object(o) * * def is_bool_array(ndarray values): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = len(values) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_objbuf.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.lib.is_bool_array", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_objbuf.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_objbuf); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/inference.pyx":175 * return False * * def is_integer(object o): # <<<<<<<<<<<<<< * return util.is_integer_object(o) * */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_3lib_111is_integer(PyObject *__pyx_self, PyObject *__pyx_v_o); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_3lib_111is_integer = {__Pyx_NAMESTR("is_integer"), (PyCFunction)__pyx_pw_6pandas_3lib_111is_integer, METH_O, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_3lib_111is_integer(PyObject *__pyx_self, PyObject *__pyx_v_o) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("is_integer (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_3lib_110is_integer(__pyx_self, ((PyObject *)__pyx_v_o)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_3lib_110is_integer(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_o) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("is_integer", 0); /* "pandas/src/inference.pyx":176 * * def is_integer(object o): * return util.is_integer_object(o) # <<<<<<<<<<<<<< * * def is_integer_array(ndarray values): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyInt_From_int(is_integer_object(__pyx_v_o)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 176; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "pandas/src/inference.pyx":175 * return False * * def is_integer(object o): # <<<<<<<<<<<<<< * return util.is_integer_object(o) * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas.lib.is_integer", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/inference.pyx":178 * return util.is_integer_object(o) * * def is_integer_array(ndarray values): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = len(values) */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_3lib_113is_integer_array(PyObject *__pyx_self, PyObject *__pyx_v_values); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_3lib_113is_integer_array = {__Pyx_NAMESTR("is_integer_array"), (PyCFunction)__pyx_pw_6pandas_3lib_113is_integer_array, METH_O, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_3lib_113is_integer_array(PyObject *__pyx_self, PyObject *__pyx_v_values) { CYTHON_UNUSED int __pyx_lineno = 0; CYTHON_UNUSED const char *__pyx_filename = NULL; CYTHON_UNUSED int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("is_integer_array (wrapper)", 0); if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 178; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_3lib_112is_integer_array(__pyx_self, ((PyArrayObject *)__pyx_v_values)); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_3lib_112is_integer_array(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_n; PyArrayObject *__pyx_v_objbuf = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_objbuf; __Pyx_Buffer __pyx_pybuffer_objbuf; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; int __pyx_t_5; 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("is_integer_array", 0); __pyx_pybuffer_objbuf.pybuffer.buf = NULL; __pyx_pybuffer_objbuf.refcount = 0; __pyx_pybuffernd_objbuf.data = NULL; __pyx_pybuffernd_objbuf.rcbuffer = &__pyx_pybuffer_objbuf; /* "pandas/src/inference.pyx":180 * def is_integer_array(ndarray values): * cdef: * Py_ssize_t i, n = len(values) # <<<<<<<<<<<<<< * ndarray[object] objbuf * object obj */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/src/inference.pyx":184 * object obj * * if issubclass(values.dtype.type, np.integer): # <<<<<<<<<<<<<< * return True * elif values.dtype == np.object_: */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_values), __pyx_n_s_dtype); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 184; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_type); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 184; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 184; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_integer); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 184; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_5 = PyObject_IsSubclass(__pyx_t_3, __pyx_t_4); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 184; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_6 = (__pyx_t_5 != 0); if (__pyx_t_6) { /* "pandas/src/inference.pyx":185 * * if issubclass(values.dtype.type, np.integer): * return True # <<<<<<<<<<<<<< * elif values.dtype == np.object_: * objbuf = values */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(Py_True); __pyx_r = Py_True; goto __pyx_L0; } /* "pandas/src/inference.pyx":186 * if issubclass(values.dtype.type, np.integer): * return True * elif values.dtype == np.object_: # <<<<<<<<<<<<<< * objbuf = values * */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_values), __pyx_n_s_dtype); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 186; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 186; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_object_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 186; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyObject_RichCompare(__pyx_t_4, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 186; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 186; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_6) { /* "pandas/src/inference.pyx":187 * return True * elif values.dtype == np.object_: * objbuf = values # <<<<<<<<<<<<<< * * if n == 0: */ { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_objbuf.rcbuffer->pybuffer); __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_objbuf.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_v_values), &__Pyx_TypeInfo_object, 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_objbuf.rcbuffer->pybuffer, (PyObject*)__pyx_v_objbuf, &__Pyx_TypeInfo_object, 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_pybuffernd_objbuf.diminfo[0].strides = __pyx_pybuffernd_objbuf.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_objbuf.diminfo[0].shape = __pyx_pybuffernd_objbuf.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 187; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __Pyx_INCREF(((PyObject *)__pyx_v_values)); __pyx_v_objbuf = ((PyArrayObject *)__pyx_v_values); /* "pandas/src/inference.pyx":189 * objbuf = values * * if n == 0: # <<<<<<<<<<<<<< * return False * */ __pyx_t_6 = ((__pyx_v_n == 0) != 0); if (__pyx_t_6) { /* "pandas/src/inference.pyx":190 * * if n == 0: * return False # <<<<<<<<<<<<<< * * for i in range(n): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(Py_False); __pyx_r = Py_False; goto __pyx_L0; } /* "pandas/src/inference.pyx":192 * return False * * for i in range(n): # <<<<<<<<<<<<<< * if not util.is_integer_object(objbuf[i]): * return False */ __pyx_t_1 = __pyx_v_n; for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_1; __pyx_t_11+=1) { __pyx_v_i = __pyx_t_11; /* "pandas/src/inference.pyx":193 * * for i in range(n): * if not util.is_integer_object(objbuf[i]): # <<<<<<<<<<<<<< * return False * return True */ __pyx_t_12 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_12 < 0) { __pyx_t_12 += __pyx_pybuffernd_objbuf.diminfo[0].shape; if (unlikely(__pyx_t_12 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_12 >= __pyx_pybuffernd_objbuf.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 193; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_3 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_objbuf.rcbuffer->pybuffer.buf, __pyx_t_12, __pyx_pybuffernd_objbuf.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_3); __pyx_t_6 = ((!(is_integer_object(__pyx_t_3) != 0)) != 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_6) { /* "pandas/src/inference.pyx":194 * for i in range(n): * if not util.is_integer_object(objbuf[i]): * return False # <<<<<<<<<<<<<< * return True * else: */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(Py_False); __pyx_r = Py_False; goto __pyx_L0; } } /* "pandas/src/inference.pyx":195 * if not util.is_integer_object(objbuf[i]): * return False * return True # <<<<<<<<<<<<<< * else: * return False */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(Py_True); __pyx_r = Py_True; goto __pyx_L0; } /*else*/ { /* "pandas/src/inference.pyx":197 * return True * else: * return False # <<<<<<<<<<<<<< * * def is_integer_float_array(ndarray values): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(Py_False); __pyx_r = Py_False; goto __pyx_L0; } /* "pandas/src/inference.pyx":178 * return util.is_integer_object(o) * * def is_integer_array(ndarray values): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = len(values) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_objbuf.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.lib.is_integer_array", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_objbuf.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_objbuf); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/inference.pyx":199 * return False * * def is_integer_float_array(ndarray values): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = len(values) */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_3lib_115is_integer_float_array(PyObject *__pyx_self, PyObject *__pyx_v_values); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_3lib_115is_integer_float_array = {__Pyx_NAMESTR("is_integer_float_array"), (PyCFunction)__pyx_pw_6pandas_3lib_115is_integer_float_array, METH_O, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_3lib_115is_integer_float_array(PyObject *__pyx_self, PyObject *__pyx_v_values) { CYTHON_UNUSED int __pyx_lineno = 0; CYTHON_UNUSED const char *__pyx_filename = NULL; CYTHON_UNUSED int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("is_integer_float_array (wrapper)", 0); if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 199; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_3lib_114is_integer_float_array(__pyx_self, ((PyArrayObject *)__pyx_v_values)); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_3lib_114is_integer_float_array(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_n; PyArrayObject *__pyx_v_objbuf = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_objbuf; __Pyx_Buffer __pyx_pybuffer_objbuf; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; int __pyx_t_5; 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; int __pyx_t_14; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("is_integer_float_array", 0); __pyx_pybuffer_objbuf.pybuffer.buf = NULL; __pyx_pybuffer_objbuf.refcount = 0; __pyx_pybuffernd_objbuf.data = NULL; __pyx_pybuffernd_objbuf.rcbuffer = &__pyx_pybuffer_objbuf; /* "pandas/src/inference.pyx":201 * def is_integer_float_array(ndarray values): * cdef: * Py_ssize_t i, n = len(values) # <<<<<<<<<<<<<< * ndarray[object] objbuf * object obj */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 201; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/src/inference.pyx":205 * object obj * * if issubclass(values.dtype.type, np.integer): # <<<<<<<<<<<<<< * return True * elif values.dtype == np.object_: */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_values), __pyx_n_s_dtype); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 205; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_type); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 205; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 205; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_integer); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 205; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_5 = PyObject_IsSubclass(__pyx_t_3, __pyx_t_4); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 205; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_6 = (__pyx_t_5 != 0); if (__pyx_t_6) { /* "pandas/src/inference.pyx":206 * * if issubclass(values.dtype.type, np.integer): * return True # <<<<<<<<<<<<<< * elif values.dtype == np.object_: * objbuf = values */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(Py_True); __pyx_r = Py_True; goto __pyx_L0; } /* "pandas/src/inference.pyx":207 * if issubclass(values.dtype.type, np.integer): * return True * elif values.dtype == np.object_: # <<<<<<<<<<<<<< * objbuf = values * */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_values), __pyx_n_s_dtype); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 207; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 207; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_object_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 207; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyObject_RichCompare(__pyx_t_4, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 207; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 207; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_6) { /* "pandas/src/inference.pyx":208 * return True * elif values.dtype == np.object_: * objbuf = values # <<<<<<<<<<<<<< * * if n == 0: */ { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_objbuf.rcbuffer->pybuffer); __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_objbuf.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_v_values), &__Pyx_TypeInfo_object, 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_objbuf.rcbuffer->pybuffer, (PyObject*)__pyx_v_objbuf, &__Pyx_TypeInfo_object, 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_pybuffernd_objbuf.diminfo[0].strides = __pyx_pybuffernd_objbuf.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_objbuf.diminfo[0].shape = __pyx_pybuffernd_objbuf.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 208; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __Pyx_INCREF(((PyObject *)__pyx_v_values)); __pyx_v_objbuf = ((PyArrayObject *)__pyx_v_values); /* "pandas/src/inference.pyx":210 * objbuf = values * * if n == 0: # <<<<<<<<<<<<<< * return False * */ __pyx_t_6 = ((__pyx_v_n == 0) != 0); if (__pyx_t_6) { /* "pandas/src/inference.pyx":211 * * if n == 0: * return False # <<<<<<<<<<<<<< * * for i in range(n): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(Py_False); __pyx_r = Py_False; goto __pyx_L0; } /* "pandas/src/inference.pyx":213 * return False * * for i in range(n): # <<<<<<<<<<<<<< * if not (util.is_integer_object(objbuf[i]) or * util.is_float_object(objbuf[i])): */ __pyx_t_1 = __pyx_v_n; for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_1; __pyx_t_11+=1) { __pyx_v_i = __pyx_t_11; /* "pandas/src/inference.pyx":214 * * for i in range(n): * if not (util.is_integer_object(objbuf[i]) or # <<<<<<<<<<<<<< * util.is_float_object(objbuf[i])): * */ __pyx_t_12 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_12 < 0) { __pyx_t_12 += __pyx_pybuffernd_objbuf.diminfo[0].shape; if (unlikely(__pyx_t_12 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_12 >= __pyx_pybuffernd_objbuf.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 214; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_3 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_objbuf.rcbuffer->pybuffer.buf, __pyx_t_12, __pyx_pybuffernd_objbuf.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_3); __pyx_t_6 = (is_integer_object(__pyx_t_3) != 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (!__pyx_t_6) { /* "pandas/src/inference.pyx":215 * for i in range(n): * if not (util.is_integer_object(objbuf[i]) or * util.is_float_object(objbuf[i])): # <<<<<<<<<<<<<< * * return False */ __pyx_t_13 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_13 < 0) { __pyx_t_13 += __pyx_pybuffernd_objbuf.diminfo[0].shape; if (unlikely(__pyx_t_13 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_13 >= __pyx_pybuffernd_objbuf.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 215; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_3 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_objbuf.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_objbuf.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_3); __pyx_t_5 = (is_float_object(__pyx_t_3) != 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_14 = __pyx_t_5; } else { __pyx_t_14 = __pyx_t_6; } /* "pandas/src/inference.pyx":214 * * for i in range(n): * if not (util.is_integer_object(objbuf[i]) or # <<<<<<<<<<<<<< * util.is_float_object(objbuf[i])): * */ __pyx_t_6 = ((!__pyx_t_14) != 0); if (__pyx_t_6) { /* "pandas/src/inference.pyx":217 * util.is_float_object(objbuf[i])): * * return False # <<<<<<<<<<<<<< * return True * else: */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(Py_False); __pyx_r = Py_False; goto __pyx_L0; } } /* "pandas/src/inference.pyx":218 * * return False * return True # <<<<<<<<<<<<<< * else: * return False */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(Py_True); __pyx_r = Py_True; goto __pyx_L0; } /*else*/ { /* "pandas/src/inference.pyx":220 * return True * else: * return False # <<<<<<<<<<<<<< * * def is_float_array(ndarray values): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(Py_False); __pyx_r = Py_False; goto __pyx_L0; } /* "pandas/src/inference.pyx":199 * return False * * def is_integer_float_array(ndarray values): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = len(values) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_objbuf.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.lib.is_integer_float_array", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_objbuf.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_objbuf); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/inference.pyx":222 * return False * * def is_float_array(ndarray values): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = len(values) */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_3lib_117is_float_array(PyObject *__pyx_self, PyObject *__pyx_v_values); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_3lib_117is_float_array = {__Pyx_NAMESTR("is_float_array"), (PyCFunction)__pyx_pw_6pandas_3lib_117is_float_array, METH_O, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_3lib_117is_float_array(PyObject *__pyx_self, PyObject *__pyx_v_values) { CYTHON_UNUSED int __pyx_lineno = 0; CYTHON_UNUSED const char *__pyx_filename = NULL; CYTHON_UNUSED int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("is_float_array (wrapper)", 0); if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 222; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_3lib_116is_float_array(__pyx_self, ((PyArrayObject *)__pyx_v_values)); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_3lib_116is_float_array(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_n; PyArrayObject *__pyx_v_objbuf = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_objbuf; __Pyx_Buffer __pyx_pybuffer_objbuf; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; int __pyx_t_5; 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("is_float_array", 0); __pyx_pybuffer_objbuf.pybuffer.buf = NULL; __pyx_pybuffer_objbuf.refcount = 0; __pyx_pybuffernd_objbuf.data = NULL; __pyx_pybuffernd_objbuf.rcbuffer = &__pyx_pybuffer_objbuf; /* "pandas/src/inference.pyx":224 * def is_float_array(ndarray values): * cdef: * Py_ssize_t i, n = len(values) # <<<<<<<<<<<<<< * ndarray[object] objbuf * object obj */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 224; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/src/inference.pyx":228 * object obj * * if issubclass(values.dtype.type, np.floating): # <<<<<<<<<<<<<< * return True * elif values.dtype == np.object_: */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_values), __pyx_n_s_dtype); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 228; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_type); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 228; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 228; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_floating); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 228; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_5 = PyObject_IsSubclass(__pyx_t_3, __pyx_t_4); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 228; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_6 = (__pyx_t_5 != 0); if (__pyx_t_6) { /* "pandas/src/inference.pyx":229 * * if issubclass(values.dtype.type, np.floating): * return True # <<<<<<<<<<<<<< * elif values.dtype == np.object_: * objbuf = values */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(Py_True); __pyx_r = Py_True; goto __pyx_L0; } /* "pandas/src/inference.pyx":230 * if issubclass(values.dtype.type, np.floating): * return True * elif values.dtype == np.object_: # <<<<<<<<<<<<<< * objbuf = values * */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_values), __pyx_n_s_dtype); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 230; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 230; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_object_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 230; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyObject_RichCompare(__pyx_t_4, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 230; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 230; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_6) { /* "pandas/src/inference.pyx":231 * return True * elif values.dtype == np.object_: * objbuf = values # <<<<<<<<<<<<<< * * if n == 0: */ { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_objbuf.rcbuffer->pybuffer); __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_objbuf.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_v_values), &__Pyx_TypeInfo_object, 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_objbuf.rcbuffer->pybuffer, (PyObject*)__pyx_v_objbuf, &__Pyx_TypeInfo_object, 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_pybuffernd_objbuf.diminfo[0].strides = __pyx_pybuffernd_objbuf.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_objbuf.diminfo[0].shape = __pyx_pybuffernd_objbuf.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 231; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __Pyx_INCREF(((PyObject *)__pyx_v_values)); __pyx_v_objbuf = ((PyArrayObject *)__pyx_v_values); /* "pandas/src/inference.pyx":233 * objbuf = values * * if n == 0: # <<<<<<<<<<<<<< * return False * */ __pyx_t_6 = ((__pyx_v_n == 0) != 0); if (__pyx_t_6) { /* "pandas/src/inference.pyx":234 * * if n == 0: * return False # <<<<<<<<<<<<<< * * for i in range(n): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(Py_False); __pyx_r = Py_False; goto __pyx_L0; } /* "pandas/src/inference.pyx":236 * return False * * for i in range(n): # <<<<<<<<<<<<<< * if not util.is_float_object(objbuf[i]): * return False */ __pyx_t_1 = __pyx_v_n; for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_1; __pyx_t_11+=1) { __pyx_v_i = __pyx_t_11; /* "pandas/src/inference.pyx":237 * * for i in range(n): * if not util.is_float_object(objbuf[i]): # <<<<<<<<<<<<<< * return False * return True */ __pyx_t_12 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_12 < 0) { __pyx_t_12 += __pyx_pybuffernd_objbuf.diminfo[0].shape; if (unlikely(__pyx_t_12 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_12 >= __pyx_pybuffernd_objbuf.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 237; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_3 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_objbuf.rcbuffer->pybuffer.buf, __pyx_t_12, __pyx_pybuffernd_objbuf.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_3); __pyx_t_6 = ((!(is_float_object(__pyx_t_3) != 0)) != 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_6) { /* "pandas/src/inference.pyx":238 * for i in range(n): * if not util.is_float_object(objbuf[i]): * return False # <<<<<<<<<<<<<< * return True * else: */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(Py_False); __pyx_r = Py_False; goto __pyx_L0; } } /* "pandas/src/inference.pyx":239 * if not util.is_float_object(objbuf[i]): * return False * return True # <<<<<<<<<<<<<< * else: * return False */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(Py_True); __pyx_r = Py_True; goto __pyx_L0; } /*else*/ { /* "pandas/src/inference.pyx":241 * return True * else: * return False # <<<<<<<<<<<<<< * * def is_string_array(ndarray values): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(Py_False); __pyx_r = Py_False; goto __pyx_L0; } /* "pandas/src/inference.pyx":222 * return False * * def is_float_array(ndarray values): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = len(values) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_objbuf.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.lib.is_float_array", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_objbuf.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_objbuf); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/inference.pyx":243 * return False * * def is_string_array(ndarray values): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = len(values) */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_3lib_119is_string_array(PyObject *__pyx_self, PyObject *__pyx_v_values); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_3lib_119is_string_array = {__Pyx_NAMESTR("is_string_array"), (PyCFunction)__pyx_pw_6pandas_3lib_119is_string_array, METH_O, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_3lib_119is_string_array(PyObject *__pyx_self, PyObject *__pyx_v_values) { CYTHON_UNUSED int __pyx_lineno = 0; CYTHON_UNUSED const char *__pyx_filename = NULL; CYTHON_UNUSED int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("is_string_array (wrapper)", 0); if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_3lib_118is_string_array(__pyx_self, ((PyArrayObject *)__pyx_v_values)); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_3lib_118is_string_array(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_n; PyArrayObject *__pyx_v_objbuf = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_objbuf; __Pyx_Buffer __pyx_pybuffer_objbuf; 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; int __pyx_t_6; int __pyx_t_7; 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("is_string_array", 0); __pyx_pybuffer_objbuf.pybuffer.buf = NULL; __pyx_pybuffer_objbuf.refcount = 0; __pyx_pybuffernd_objbuf.data = NULL; __pyx_pybuffernd_objbuf.rcbuffer = &__pyx_pybuffer_objbuf; /* "pandas/src/inference.pyx":245 * def is_string_array(ndarray values): * cdef: * Py_ssize_t i, n = len(values) # <<<<<<<<<<<<<< * ndarray[object] objbuf * object obj */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 245; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/src/inference.pyx":249 * object obj * * if issubclass(values.dtype.type, (np.string_, np.unicode_)): # <<<<<<<<<<<<<< * return True * elif values.dtype == np.object_: */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_values), __pyx_n_s_dtype); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 249; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_type); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 249; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 249; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_string_2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 249; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 249; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_unicode_2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 249; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 249; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __pyx_t_4 = 0; __pyx_t_5 = 0; __pyx_t_6 = PyObject_IsSubclass(__pyx_t_3, __pyx_t_2); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 249; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_7 = (__pyx_t_6 != 0); if (__pyx_t_7) { /* "pandas/src/inference.pyx":250 * * if issubclass(values.dtype.type, (np.string_, np.unicode_)): * return True # <<<<<<<<<<<<<< * elif values.dtype == np.object_: * objbuf = values */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(Py_True); __pyx_r = Py_True; goto __pyx_L0; } /* "pandas/src/inference.pyx":251 * if issubclass(values.dtype.type, (np.string_, np.unicode_)): * return True * elif values.dtype == np.object_: # <<<<<<<<<<<<<< * objbuf = values * */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_values), __pyx_n_s_dtype); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 251; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 251; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_object_2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 251; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyObject_RichCompare(__pyx_t_2, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 251; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 251; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_7) { /* "pandas/src/inference.pyx":252 * return True * elif values.dtype == np.object_: * objbuf = values # <<<<<<<<<<<<<< * * if n == 0: */ { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_objbuf.rcbuffer->pybuffer); __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_objbuf.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_v_values), &__Pyx_TypeInfo_object, 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_objbuf.rcbuffer->pybuffer, (PyObject*)__pyx_v_objbuf, &__Pyx_TypeInfo_object, 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_pybuffernd_objbuf.diminfo[0].strides = __pyx_pybuffernd_objbuf.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_objbuf.diminfo[0].shape = __pyx_pybuffernd_objbuf.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 252; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __Pyx_INCREF(((PyObject *)__pyx_v_values)); __pyx_v_objbuf = ((PyArrayObject *)__pyx_v_values); /* "pandas/src/inference.pyx":254 * objbuf = values * * if n == 0: # <<<<<<<<<<<<<< * return False * */ __pyx_t_7 = ((__pyx_v_n == 0) != 0); if (__pyx_t_7) { /* "pandas/src/inference.pyx":255 * * if n == 0: * return False # <<<<<<<<<<<<<< * * for i in range(n): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(Py_False); __pyx_r = Py_False; goto __pyx_L0; } /* "pandas/src/inference.pyx":257 * return False * * for i in range(n): # <<<<<<<<<<<<<< * if not PyString_Check(objbuf[i]): * return False */ __pyx_t_1 = __pyx_v_n; for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_1; __pyx_t_12+=1) { __pyx_v_i = __pyx_t_12; /* "pandas/src/inference.pyx":258 * * for i in range(n): * if not PyString_Check(objbuf[i]): # <<<<<<<<<<<<<< * return False * return True */ __pyx_t_13 = __pyx_v_i; __pyx_t_8 = -1; if (__pyx_t_13 < 0) { __pyx_t_13 += __pyx_pybuffernd_objbuf.diminfo[0].shape; if (unlikely(__pyx_t_13 < 0)) __pyx_t_8 = 0; } else if (unlikely(__pyx_t_13 >= __pyx_pybuffernd_objbuf.diminfo[0].shape)) __pyx_t_8 = 0; if (unlikely(__pyx_t_8 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_8); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 258; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_3 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_objbuf.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_objbuf.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_3); __pyx_t_7 = ((!(PyString_Check(__pyx_t_3) != 0)) != 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_7) { /* "pandas/src/inference.pyx":259 * for i in range(n): * if not PyString_Check(objbuf[i]): * return False # <<<<<<<<<<<<<< * return True * else: */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(Py_False); __pyx_r = Py_False; goto __pyx_L0; } } /* "pandas/src/inference.pyx":260 * if not PyString_Check(objbuf[i]): * return False * return True # <<<<<<<<<<<<<< * else: * return False */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(Py_True); __pyx_r = Py_True; goto __pyx_L0; } /*else*/ { /* "pandas/src/inference.pyx":262 * return True * else: * return False # <<<<<<<<<<<<<< * * def is_unicode_array(ndarray values): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(Py_False); __pyx_r = Py_False; goto __pyx_L0; } /* "pandas/src/inference.pyx":243 * return False * * def is_string_array(ndarray values): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = len(values) */ /* 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); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_objbuf.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.lib.is_string_array", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_objbuf.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_objbuf); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/inference.pyx":264 * return False * * def is_unicode_array(ndarray values): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = len(values) */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_3lib_121is_unicode_array(PyObject *__pyx_self, PyObject *__pyx_v_values); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_3lib_121is_unicode_array = {__Pyx_NAMESTR("is_unicode_array"), (PyCFunction)__pyx_pw_6pandas_3lib_121is_unicode_array, METH_O, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_3lib_121is_unicode_array(PyObject *__pyx_self, PyObject *__pyx_v_values) { CYTHON_UNUSED int __pyx_lineno = 0; CYTHON_UNUSED const char *__pyx_filename = NULL; CYTHON_UNUSED int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("is_unicode_array (wrapper)", 0); if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 264; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_3lib_120is_unicode_array(__pyx_self, ((PyArrayObject *)__pyx_v_values)); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_3lib_120is_unicode_array(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_n; PyArrayObject *__pyx_v_objbuf = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_objbuf; __Pyx_Buffer __pyx_pybuffer_objbuf; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; int __pyx_t_5; 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("is_unicode_array", 0); __pyx_pybuffer_objbuf.pybuffer.buf = NULL; __pyx_pybuffer_objbuf.refcount = 0; __pyx_pybuffernd_objbuf.data = NULL; __pyx_pybuffernd_objbuf.rcbuffer = &__pyx_pybuffer_objbuf; /* "pandas/src/inference.pyx":266 * def is_unicode_array(ndarray values): * cdef: * Py_ssize_t i, n = len(values) # <<<<<<<<<<<<<< * ndarray[object] objbuf * object obj */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 266; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/src/inference.pyx":270 * object obj * * if issubclass(values.dtype.type, np.unicode_): # <<<<<<<<<<<<<< * return True * elif values.dtype == np.object_: */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_values), __pyx_n_s_dtype); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 270; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_type); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 270; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 270; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_unicode_2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 270; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_5 = PyObject_IsSubclass(__pyx_t_3, __pyx_t_4); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 270; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_6 = (__pyx_t_5 != 0); if (__pyx_t_6) { /* "pandas/src/inference.pyx":271 * * if issubclass(values.dtype.type, np.unicode_): * return True # <<<<<<<<<<<<<< * elif values.dtype == np.object_: * objbuf = values */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(Py_True); __pyx_r = Py_True; goto __pyx_L0; } /* "pandas/src/inference.pyx":272 * if issubclass(values.dtype.type, np.unicode_): * return True * elif values.dtype == np.object_: # <<<<<<<<<<<<<< * objbuf = values * */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_values), __pyx_n_s_dtype); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 272; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 272; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_object_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 272; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyObject_RichCompare(__pyx_t_4, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 272; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 272; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_6) { /* "pandas/src/inference.pyx":273 * return True * elif values.dtype == np.object_: * objbuf = values # <<<<<<<<<<<<<< * * if n == 0: */ { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_objbuf.rcbuffer->pybuffer); __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_objbuf.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_v_values), &__Pyx_TypeInfo_object, 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_objbuf.rcbuffer->pybuffer, (PyObject*)__pyx_v_objbuf, &__Pyx_TypeInfo_object, 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_pybuffernd_objbuf.diminfo[0].strides = __pyx_pybuffernd_objbuf.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_objbuf.diminfo[0].shape = __pyx_pybuffernd_objbuf.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 273; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __Pyx_INCREF(((PyObject *)__pyx_v_values)); __pyx_v_objbuf = ((PyArrayObject *)__pyx_v_values); /* "pandas/src/inference.pyx":275 * objbuf = values * * if n == 0: # <<<<<<<<<<<<<< * return False * */ __pyx_t_6 = ((__pyx_v_n == 0) != 0); if (__pyx_t_6) { /* "pandas/src/inference.pyx":276 * * if n == 0: * return False # <<<<<<<<<<<<<< * * for i in range(n): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(Py_False); __pyx_r = Py_False; goto __pyx_L0; } /* "pandas/src/inference.pyx":278 * return False * * for i in range(n): # <<<<<<<<<<<<<< * if not PyUnicode_Check(objbuf[i]): * return False */ __pyx_t_1 = __pyx_v_n; for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_1; __pyx_t_11+=1) { __pyx_v_i = __pyx_t_11; /* "pandas/src/inference.pyx":279 * * for i in range(n): * if not PyUnicode_Check(objbuf[i]): # <<<<<<<<<<<<<< * return False * return True */ __pyx_t_12 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_12 < 0) { __pyx_t_12 += __pyx_pybuffernd_objbuf.diminfo[0].shape; if (unlikely(__pyx_t_12 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_12 >= __pyx_pybuffernd_objbuf.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 279; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_3 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_objbuf.rcbuffer->pybuffer.buf, __pyx_t_12, __pyx_pybuffernd_objbuf.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_3); __pyx_t_6 = ((!(PyUnicode_Check(__pyx_t_3) != 0)) != 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_6) { /* "pandas/src/inference.pyx":280 * for i in range(n): * if not PyUnicode_Check(objbuf[i]): * return False # <<<<<<<<<<<<<< * return True * else: */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(Py_False); __pyx_r = Py_False; goto __pyx_L0; } } /* "pandas/src/inference.pyx":281 * if not PyUnicode_Check(objbuf[i]): * return False * return True # <<<<<<<<<<<<<< * else: * return False */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(Py_True); __pyx_r = Py_True; goto __pyx_L0; } /*else*/ { /* "pandas/src/inference.pyx":283 * return True * else: * return False # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(Py_False); __pyx_r = Py_False; goto __pyx_L0; } /* "pandas/src/inference.pyx":264 * return False * * def is_unicode_array(ndarray values): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = len(values) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_objbuf.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.lib.is_unicode_array", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_objbuf.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_objbuf); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/inference.pyx":286 * * * def is_datetime_array(ndarray[object] values): # <<<<<<<<<<<<<< * cdef int i, n = len(values) * cdef object v */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_3lib_123is_datetime_array(PyObject *__pyx_self, PyObject *__pyx_v_values); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_3lib_123is_datetime_array = {__Pyx_NAMESTR("is_datetime_array"), (PyCFunction)__pyx_pw_6pandas_3lib_123is_datetime_array, METH_O, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_3lib_123is_datetime_array(PyObject *__pyx_self, PyObject *__pyx_v_values) { CYTHON_UNUSED int __pyx_lineno = 0; CYTHON_UNUSED const char *__pyx_filename = NULL; CYTHON_UNUSED int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("is_datetime_array (wrapper)", 0); if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 286; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_3lib_122is_datetime_array(__pyx_self, ((PyArrayObject *)__pyx_v_values)); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_3lib_122is_datetime_array(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values) { int __pyx_v_i; int __pyx_v_n; PyObject *__pyx_v_v = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_values; __Pyx_Buffer __pyx_pybuffer_values; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; int __pyx_t_2; int __pyx_t_3; int __pyx_t_4; PyObject *__pyx_t_5 = NULL; int __pyx_t_6; int __pyx_t_7; int __pyx_t_8; int __pyx_t_9; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("is_datetime_array", 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_object, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 286; __pyx_clineno = __LINE__; goto __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/src/inference.pyx":287 * * def is_datetime_array(ndarray[object] values): * cdef int i, n = len(values) # <<<<<<<<<<<<<< * cdef object v * if n == 0: */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 287; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/src/inference.pyx":289 * cdef int i, n = len(values) * cdef object v * if n == 0: # <<<<<<<<<<<<<< * return False * for i in range(n): */ __pyx_t_2 = ((__pyx_v_n == 0) != 0); if (__pyx_t_2) { /* "pandas/src/inference.pyx":290 * cdef object v * if n == 0: * return False # <<<<<<<<<<<<<< * for i in range(n): * v = values[i] */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(Py_False); __pyx_r = Py_False; goto __pyx_L0; } /* "pandas/src/inference.pyx":291 * if n == 0: * return False * for i in range(n): # <<<<<<<<<<<<<< * v = values[i] * if not (is_datetime(v) or is_null_datetimelike(v)): */ __pyx_t_3 = __pyx_v_n; for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) { __pyx_v_i = __pyx_t_4; /* "pandas/src/inference.pyx":292 * return False * for i in range(n): * v = values[i] # <<<<<<<<<<<<<< * if not (is_datetime(v) or is_null_datetimelike(v)): * return False */ __pyx_t_6 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_6 < 0) { __pyx_t_6 += __pyx_pybuffernd_values.diminfo[0].shape; if (unlikely(__pyx_t_6 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_6 >= __pyx_pybuffernd_values.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 292; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_5 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_6, __pyx_pybuffernd_values.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_5); __Pyx_XDECREF_SET(__pyx_v_v, __pyx_t_5); __pyx_t_5 = 0; /* "pandas/src/inference.pyx":293 * for i in range(n): * v = values[i] * if not (is_datetime(v) or is_null_datetimelike(v)): # <<<<<<<<<<<<<< * return False * return True */ __pyx_t_2 = (__pyx_f_6pandas_3lib_is_datetime(__pyx_v_v) != 0); if (!__pyx_t_2) { __pyx_t_8 = (__pyx_f_6pandas_3lib_is_null_datetimelike(__pyx_v_v) != 0); __pyx_t_9 = __pyx_t_8; } else { __pyx_t_9 = __pyx_t_2; } __pyx_t_2 = ((!__pyx_t_9) != 0); if (__pyx_t_2) { /* "pandas/src/inference.pyx":294 * v = values[i] * if not (is_datetime(v) or is_null_datetimelike(v)): * return False # <<<<<<<<<<<<<< * return True * */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(Py_False); __pyx_r = Py_False; goto __pyx_L0; } } /* "pandas/src/inference.pyx":295 * if not (is_datetime(v) or is_null_datetimelike(v)): * return False * return True # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(Py_True); __pyx_r = Py_True; goto __pyx_L0; /* "pandas/src/inference.pyx":286 * * * def is_datetime_array(ndarray[object] values): # <<<<<<<<<<<<<< * cdef int i, n = len(values) * cdef object v */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_5); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __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.lib.is_datetime_array", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF(__pyx_v_v); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/inference.pyx":298 * * * def is_datetime64_array(ndarray values): # <<<<<<<<<<<<<< * cdef int i, n = len(values) * cdef object v */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_3lib_125is_datetime64_array(PyObject *__pyx_self, PyObject *__pyx_v_values); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_3lib_125is_datetime64_array = {__Pyx_NAMESTR("is_datetime64_array"), (PyCFunction)__pyx_pw_6pandas_3lib_125is_datetime64_array, METH_O, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_3lib_125is_datetime64_array(PyObject *__pyx_self, PyObject *__pyx_v_values) { CYTHON_UNUSED int __pyx_lineno = 0; CYTHON_UNUSED const char *__pyx_filename = NULL; CYTHON_UNUSED int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("is_datetime64_array (wrapper)", 0); if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 298; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_3lib_124is_datetime64_array(__pyx_self, ((PyArrayObject *)__pyx_v_values)); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_3lib_124is_datetime64_array(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values) { int __pyx_v_i; int __pyx_v_n; PyObject *__pyx_v_v = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; int __pyx_t_2; int __pyx_t_3; int __pyx_t_4; PyObject *__pyx_t_5 = NULL; int __pyx_t_6; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("is_datetime64_array", 0); /* "pandas/src/inference.pyx":299 * * def is_datetime64_array(ndarray values): * cdef int i, n = len(values) # <<<<<<<<<<<<<< * cdef object v * if n == 0: */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 299; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/src/inference.pyx":301 * cdef int i, n = len(values) * cdef object v * if n == 0: # <<<<<<<<<<<<<< * return False * for i in range(n): */ __pyx_t_2 = ((__pyx_v_n == 0) != 0); if (__pyx_t_2) { /* "pandas/src/inference.pyx":302 * cdef object v * if n == 0: * return False # <<<<<<<<<<<<<< * for i in range(n): * v = values[i] */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(Py_False); __pyx_r = Py_False; goto __pyx_L0; } /* "pandas/src/inference.pyx":303 * if n == 0: * return False * for i in range(n): # <<<<<<<<<<<<<< * v = values[i] * if not (util.is_datetime64_object(v) or is_null_datetimelike(v)): */ __pyx_t_3 = __pyx_v_n; for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) { __pyx_v_i = __pyx_t_4; /* "pandas/src/inference.pyx":304 * return False * for i in range(n): * v = values[i] # <<<<<<<<<<<<<< * if not (util.is_datetime64_object(v) or is_null_datetimelike(v)): * return False */ __pyx_t_5 = __Pyx_GetItemInt(((PyObject *)__pyx_v_values), __pyx_v_i, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(__pyx_t_5 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 304; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_5); __Pyx_XDECREF_SET(__pyx_v_v, __pyx_t_5); __pyx_t_5 = 0; /* "pandas/src/inference.pyx":305 * for i in range(n): * v = values[i] * if not (util.is_datetime64_object(v) or is_null_datetimelike(v)): # <<<<<<<<<<<<<< * return False * return True */ if (!(is_datetime64_object(__pyx_v_v) != 0)) { __pyx_t_2 = __pyx_f_6pandas_3lib_is_null_datetimelike(__pyx_v_v); __pyx_t_6 = __pyx_t_2; } else { __pyx_t_6 = (is_datetime64_object(__pyx_v_v) != 0); } __pyx_t_2 = ((!__pyx_t_6) != 0); if (__pyx_t_2) { /* "pandas/src/inference.pyx":306 * v = values[i] * if not (util.is_datetime64_object(v) or is_null_datetimelike(v)): * return False # <<<<<<<<<<<<<< * return True * */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(Py_False); __pyx_r = Py_False; goto __pyx_L0; } } /* "pandas/src/inference.pyx":307 * if not (util.is_datetime64_object(v) or is_null_datetimelike(v)): * return False * return True # <<<<<<<<<<<<<< * * def is_timedelta_array(ndarray values): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(Py_True); __pyx_r = Py_True; goto __pyx_L0; /* "pandas/src/inference.pyx":298 * * * def is_datetime64_array(ndarray values): # <<<<<<<<<<<<<< * cdef int i, n = len(values) * cdef object v */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("pandas.lib.is_datetime64_array", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_v); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/inference.pyx":309 * return True * * def is_timedelta_array(ndarray values): # <<<<<<<<<<<<<< * cdef int i, n = len(values) * cdef object v */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_3lib_127is_timedelta_array(PyObject *__pyx_self, PyObject *__pyx_v_values); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_3lib_127is_timedelta_array = {__Pyx_NAMESTR("is_timedelta_array"), (PyCFunction)__pyx_pw_6pandas_3lib_127is_timedelta_array, METH_O, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_3lib_127is_timedelta_array(PyObject *__pyx_self, PyObject *__pyx_v_values) { CYTHON_UNUSED int __pyx_lineno = 0; CYTHON_UNUSED const char *__pyx_filename = NULL; CYTHON_UNUSED int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("is_timedelta_array (wrapper)", 0); if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 309; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_3lib_126is_timedelta_array(__pyx_self, ((PyArrayObject *)__pyx_v_values)); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_3lib_126is_timedelta_array(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values) { int __pyx_v_i; int __pyx_v_n; PyObject *__pyx_v_v = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; int __pyx_t_2; int __pyx_t_3; int __pyx_t_4; PyObject *__pyx_t_5 = NULL; int __pyx_t_6; int __pyx_t_7; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("is_timedelta_array", 0); /* "pandas/src/inference.pyx":310 * * def is_timedelta_array(ndarray values): * cdef int i, n = len(values) # <<<<<<<<<<<<<< * cdef object v * if n == 0: */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 310; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/src/inference.pyx":312 * cdef int i, n = len(values) * cdef object v * if n == 0: # <<<<<<<<<<<<<< * return False * for i in range(n): */ __pyx_t_2 = ((__pyx_v_n == 0) != 0); if (__pyx_t_2) { /* "pandas/src/inference.pyx":313 * cdef object v * if n == 0: * return False # <<<<<<<<<<<<<< * for i in range(n): * v = values[i] */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(Py_False); __pyx_r = Py_False; goto __pyx_L0; } /* "pandas/src/inference.pyx":314 * if n == 0: * return False * for i in range(n): # <<<<<<<<<<<<<< * v = values[i] * if not (PyDelta_Check(v) or is_null_datetimelike(v)): */ __pyx_t_3 = __pyx_v_n; for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) { __pyx_v_i = __pyx_t_4; /* "pandas/src/inference.pyx":315 * return False * for i in range(n): * v = values[i] # <<<<<<<<<<<<<< * if not (PyDelta_Check(v) or is_null_datetimelike(v)): * return False */ __pyx_t_5 = __Pyx_GetItemInt(((PyObject *)__pyx_v_values), __pyx_v_i, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(__pyx_t_5 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 315; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_5); __Pyx_XDECREF_SET(__pyx_v_v, __pyx_t_5); __pyx_t_5 = 0; /* "pandas/src/inference.pyx":316 * for i in range(n): * v = values[i] * if not (PyDelta_Check(v) or is_null_datetimelike(v)): # <<<<<<<<<<<<<< * return False * return True */ __pyx_t_2 = (PyDelta_Check(__pyx_v_v) != 0); if (!__pyx_t_2) { __pyx_t_6 = (__pyx_f_6pandas_3lib_is_null_datetimelike(__pyx_v_v) != 0); __pyx_t_7 = __pyx_t_6; } else { __pyx_t_7 = __pyx_t_2; } __pyx_t_2 = ((!__pyx_t_7) != 0); if (__pyx_t_2) { /* "pandas/src/inference.pyx":317 * v = values[i] * if not (PyDelta_Check(v) or is_null_datetimelike(v)): * return False # <<<<<<<<<<<<<< * return True * */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(Py_False); __pyx_r = Py_False; goto __pyx_L0; } } /* "pandas/src/inference.pyx":318 * if not (PyDelta_Check(v) or is_null_datetimelike(v)): * return False * return True # <<<<<<<<<<<<<< * * def is_timedelta64_array(ndarray values): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(Py_True); __pyx_r = Py_True; goto __pyx_L0; /* "pandas/src/inference.pyx":309 * return True * * def is_timedelta_array(ndarray values): # <<<<<<<<<<<<<< * cdef int i, n = len(values) * cdef object v */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("pandas.lib.is_timedelta_array", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_v); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/inference.pyx":320 * return True * * def is_timedelta64_array(ndarray values): # <<<<<<<<<<<<<< * cdef int i, n = len(values) * cdef object v */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_3lib_129is_timedelta64_array(PyObject *__pyx_self, PyObject *__pyx_v_values); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_3lib_129is_timedelta64_array = {__Pyx_NAMESTR("is_timedelta64_array"), (PyCFunction)__pyx_pw_6pandas_3lib_129is_timedelta64_array, METH_O, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_3lib_129is_timedelta64_array(PyObject *__pyx_self, PyObject *__pyx_v_values) { CYTHON_UNUSED int __pyx_lineno = 0; CYTHON_UNUSED const char *__pyx_filename = NULL; CYTHON_UNUSED int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("is_timedelta64_array (wrapper)", 0); if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 320; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_3lib_128is_timedelta64_array(__pyx_self, ((PyArrayObject *)__pyx_v_values)); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_3lib_128is_timedelta64_array(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values) { int __pyx_v_i; int __pyx_v_n; PyObject *__pyx_v_v = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; int __pyx_t_2; int __pyx_t_3; int __pyx_t_4; PyObject *__pyx_t_5 = NULL; int __pyx_t_6; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("is_timedelta64_array", 0); /* "pandas/src/inference.pyx":321 * * def is_timedelta64_array(ndarray values): * cdef int i, n = len(values) # <<<<<<<<<<<<<< * cdef object v * if n == 0: */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 321; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/src/inference.pyx":323 * cdef int i, n = len(values) * cdef object v * if n == 0: # <<<<<<<<<<<<<< * return False * for i in range(n): */ __pyx_t_2 = ((__pyx_v_n == 0) != 0); if (__pyx_t_2) { /* "pandas/src/inference.pyx":324 * cdef object v * if n == 0: * return False # <<<<<<<<<<<<<< * for i in range(n): * v = values[i] */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(Py_False); __pyx_r = Py_False; goto __pyx_L0; } /* "pandas/src/inference.pyx":325 * if n == 0: * return False * for i in range(n): # <<<<<<<<<<<<<< * v = values[i] * if not (util.is_timedelta64_object(v) or is_null_datetimelike(v)): */ __pyx_t_3 = __pyx_v_n; for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) { __pyx_v_i = __pyx_t_4; /* "pandas/src/inference.pyx":326 * return False * for i in range(n): * v = values[i] # <<<<<<<<<<<<<< * if not (util.is_timedelta64_object(v) or is_null_datetimelike(v)): * return False */ __pyx_t_5 = __Pyx_GetItemInt(((PyObject *)__pyx_v_values), __pyx_v_i, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(__pyx_t_5 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 326; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_5); __Pyx_XDECREF_SET(__pyx_v_v, __pyx_t_5); __pyx_t_5 = 0; /* "pandas/src/inference.pyx":327 * for i in range(n): * v = values[i] * if not (util.is_timedelta64_object(v) or is_null_datetimelike(v)): # <<<<<<<<<<<<<< * return False * return True */ if (!(is_timedelta64_object(__pyx_v_v) != 0)) { __pyx_t_2 = __pyx_f_6pandas_3lib_is_null_datetimelike(__pyx_v_v); __pyx_t_6 = __pyx_t_2; } else { __pyx_t_6 = (is_timedelta64_object(__pyx_v_v) != 0); } __pyx_t_2 = ((!__pyx_t_6) != 0); if (__pyx_t_2) { /* "pandas/src/inference.pyx":328 * v = values[i] * if not (util.is_timedelta64_object(v) or is_null_datetimelike(v)): * return False # <<<<<<<<<<<<<< * return True * */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(Py_False); __pyx_r = Py_False; goto __pyx_L0; } } /* "pandas/src/inference.pyx":329 * if not (util.is_timedelta64_object(v) or is_null_datetimelike(v)): * return False * return True # <<<<<<<<<<<<<< * * def is_timedelta_or_timedelta64_array(ndarray values): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(Py_True); __pyx_r = Py_True; goto __pyx_L0; /* "pandas/src/inference.pyx":320 * return True * * def is_timedelta64_array(ndarray values): # <<<<<<<<<<<<<< * cdef int i, n = len(values) * cdef object v */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("pandas.lib.is_timedelta64_array", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_v); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/inference.pyx":331 * return True * * def is_timedelta_or_timedelta64_array(ndarray values): # <<<<<<<<<<<<<< * """ infer with timedeltas and/or nat/none """ * cdef int i, n = len(values) */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_3lib_131is_timedelta_or_timedelta64_array(PyObject *__pyx_self, PyObject *__pyx_v_values); /*proto*/ static char __pyx_doc_6pandas_3lib_130is_timedelta_or_timedelta64_array[] = " infer with timedeltas and/or nat/none "; static PyMethodDef __pyx_mdef_6pandas_3lib_131is_timedelta_or_timedelta64_array = {__Pyx_NAMESTR("is_timedelta_or_timedelta64_array"), (PyCFunction)__pyx_pw_6pandas_3lib_131is_timedelta_or_timedelta64_array, METH_O, __Pyx_DOCSTR(__pyx_doc_6pandas_3lib_130is_timedelta_or_timedelta64_array)}; static PyObject *__pyx_pw_6pandas_3lib_131is_timedelta_or_timedelta64_array(PyObject *__pyx_self, PyObject *__pyx_v_values) { CYTHON_UNUSED int __pyx_lineno = 0; CYTHON_UNUSED const char *__pyx_filename = NULL; CYTHON_UNUSED int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("is_timedelta_or_timedelta64_array (wrapper)", 0); if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 331; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_3lib_130is_timedelta_or_timedelta64_array(__pyx_self, ((PyArrayObject *)__pyx_v_values)); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_3lib_130is_timedelta_or_timedelta64_array(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values) { int __pyx_v_i; int __pyx_v_n; PyObject *__pyx_v_v = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; int __pyx_t_2; int __pyx_t_3; int __pyx_t_4; PyObject *__pyx_t_5 = NULL; int __pyx_t_6; int __pyx_t_7; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("is_timedelta_or_timedelta64_array", 0); /* "pandas/src/inference.pyx":333 * def is_timedelta_or_timedelta64_array(ndarray values): * """ infer with timedeltas and/or nat/none """ * cdef int i, n = len(values) # <<<<<<<<<<<<<< * cdef object v * if n == 0: */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 333; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/src/inference.pyx":335 * cdef int i, n = len(values) * cdef object v * if n == 0: # <<<<<<<<<<<<<< * return False * for i in range(n): */ __pyx_t_2 = ((__pyx_v_n == 0) != 0); if (__pyx_t_2) { /* "pandas/src/inference.pyx":336 * cdef object v * if n == 0: * return False # <<<<<<<<<<<<<< * for i in range(n): * v = values[i] */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(Py_False); __pyx_r = Py_False; goto __pyx_L0; } /* "pandas/src/inference.pyx":337 * if n == 0: * return False * for i in range(n): # <<<<<<<<<<<<<< * v = values[i] * if not (is_timedelta(v) or is_null_datetimelike(v)): */ __pyx_t_3 = __pyx_v_n; for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) { __pyx_v_i = __pyx_t_4; /* "pandas/src/inference.pyx":338 * return False * for i in range(n): * v = values[i] # <<<<<<<<<<<<<< * if not (is_timedelta(v) or is_null_datetimelike(v)): * return False */ __pyx_t_5 = __Pyx_GetItemInt(((PyObject *)__pyx_v_values), __pyx_v_i, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(__pyx_t_5 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 338; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_5); __Pyx_XDECREF_SET(__pyx_v_v, __pyx_t_5); __pyx_t_5 = 0; /* "pandas/src/inference.pyx":339 * for i in range(n): * v = values[i] * if not (is_timedelta(v) or is_null_datetimelike(v)): # <<<<<<<<<<<<<< * return False * return True */ __pyx_t_2 = (__pyx_f_6pandas_3lib_is_timedelta(__pyx_v_v) != 0); if (!__pyx_t_2) { __pyx_t_6 = (__pyx_f_6pandas_3lib_is_null_datetimelike(__pyx_v_v) != 0); __pyx_t_7 = __pyx_t_6; } else { __pyx_t_7 = __pyx_t_2; } __pyx_t_2 = ((!__pyx_t_7) != 0); if (__pyx_t_2) { /* "pandas/src/inference.pyx":340 * v = values[i] * if not (is_timedelta(v) or is_null_datetimelike(v)): * return False # <<<<<<<<<<<<<< * return True * */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(Py_False); __pyx_r = Py_False; goto __pyx_L0; } } /* "pandas/src/inference.pyx":341 * if not (is_timedelta(v) or is_null_datetimelike(v)): * return False * return True # <<<<<<<<<<<<<< * * def is_date_array(ndarray[object] values): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(Py_True); __pyx_r = Py_True; goto __pyx_L0; /* "pandas/src/inference.pyx":331 * return True * * def is_timedelta_or_timedelta64_array(ndarray values): # <<<<<<<<<<<<<< * """ infer with timedeltas and/or nat/none """ * cdef int i, n = len(values) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("pandas.lib.is_timedelta_or_timedelta64_array", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_v); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/inference.pyx":343 * return True * * def is_date_array(ndarray[object] values): # <<<<<<<<<<<<<< * cdef int i, n = len(values) * if n == 0: */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_3lib_133is_date_array(PyObject *__pyx_self, PyObject *__pyx_v_values); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_3lib_133is_date_array = {__Pyx_NAMESTR("is_date_array"), (PyCFunction)__pyx_pw_6pandas_3lib_133is_date_array, METH_O, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_3lib_133is_date_array(PyObject *__pyx_self, PyObject *__pyx_v_values) { CYTHON_UNUSED int __pyx_lineno = 0; CYTHON_UNUSED const char *__pyx_filename = NULL; CYTHON_UNUSED int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("is_date_array (wrapper)", 0); if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 343; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_3lib_132is_date_array(__pyx_self, ((PyArrayObject *)__pyx_v_values)); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_3lib_132is_date_array(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values) { int __pyx_v_i; int __pyx_v_n; __Pyx_LocalBuf_ND __pyx_pybuffernd_values; __Pyx_Buffer __pyx_pybuffer_values; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; int __pyx_t_2; int __pyx_t_3; int __pyx_t_4; PyObject *__pyx_t_5 = NULL; int __pyx_t_6; int __pyx_t_7; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("is_date_array", 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_object, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 343; __pyx_clineno = __LINE__; goto __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/src/inference.pyx":344 * * def is_date_array(ndarray[object] values): * cdef int i, n = len(values) # <<<<<<<<<<<<<< * if n == 0: * return False */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 344; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/src/inference.pyx":345 * def is_date_array(ndarray[object] values): * cdef int i, n = len(values) * if n == 0: # <<<<<<<<<<<<<< * return False * for i in range(n): */ __pyx_t_2 = ((__pyx_v_n == 0) != 0); if (__pyx_t_2) { /* "pandas/src/inference.pyx":346 * cdef int i, n = len(values) * if n == 0: * return False # <<<<<<<<<<<<<< * for i in range(n): * if not is_date(values[i]): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(Py_False); __pyx_r = Py_False; goto __pyx_L0; } /* "pandas/src/inference.pyx":347 * if n == 0: * return False * for i in range(n): # <<<<<<<<<<<<<< * if not is_date(values[i]): * return False */ __pyx_t_3 = __pyx_v_n; for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) { __pyx_v_i = __pyx_t_4; /* "pandas/src/inference.pyx":348 * return False * for i in range(n): * if not is_date(values[i]): # <<<<<<<<<<<<<< * return False * return True */ __pyx_t_6 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_6 < 0) { __pyx_t_6 += __pyx_pybuffernd_values.diminfo[0].shape; if (unlikely(__pyx_t_6 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_6 >= __pyx_pybuffernd_values.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 348; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_5 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_6, __pyx_pybuffernd_values.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_5); __pyx_t_2 = ((!(__pyx_f_6pandas_3lib_is_date(__pyx_t_5) != 0)) != 0); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_2) { /* "pandas/src/inference.pyx":349 * for i in range(n): * if not is_date(values[i]): * return False # <<<<<<<<<<<<<< * return True * */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(Py_False); __pyx_r = Py_False; goto __pyx_L0; } } /* "pandas/src/inference.pyx":350 * if not is_date(values[i]): * return False * return True # <<<<<<<<<<<<<< * * def is_time_array(ndarray[object] values): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(Py_True); __pyx_r = Py_True; goto __pyx_L0; /* "pandas/src/inference.pyx":343 * return True * * def is_date_array(ndarray[object] values): # <<<<<<<<<<<<<< * cdef int i, n = len(values) * if n == 0: */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_5); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __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.lib.is_date_array", __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/src/inference.pyx":352 * return True * * def is_time_array(ndarray[object] values): # <<<<<<<<<<<<<< * cdef int i, n = len(values) * if n == 0: */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_3lib_135is_time_array(PyObject *__pyx_self, PyObject *__pyx_v_values); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_3lib_135is_time_array = {__Pyx_NAMESTR("is_time_array"), (PyCFunction)__pyx_pw_6pandas_3lib_135is_time_array, METH_O, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_3lib_135is_time_array(PyObject *__pyx_self, PyObject *__pyx_v_values) { CYTHON_UNUSED int __pyx_lineno = 0; CYTHON_UNUSED const char *__pyx_filename = NULL; CYTHON_UNUSED int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("is_time_array (wrapper)", 0); if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 352; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_3lib_134is_time_array(__pyx_self, ((PyArrayObject *)__pyx_v_values)); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_3lib_134is_time_array(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values) { int __pyx_v_i; int __pyx_v_n; __Pyx_LocalBuf_ND __pyx_pybuffernd_values; __Pyx_Buffer __pyx_pybuffer_values; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; int __pyx_t_2; int __pyx_t_3; int __pyx_t_4; PyObject *__pyx_t_5 = NULL; int __pyx_t_6; int __pyx_t_7; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("is_time_array", 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_object, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 352; __pyx_clineno = __LINE__; goto __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/src/inference.pyx":353 * * def is_time_array(ndarray[object] values): * cdef int i, n = len(values) # <<<<<<<<<<<<<< * if n == 0: * return False */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 353; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/src/inference.pyx":354 * def is_time_array(ndarray[object] values): * cdef int i, n = len(values) * if n == 0: # <<<<<<<<<<<<<< * return False * for i in range(n): */ __pyx_t_2 = ((__pyx_v_n == 0) != 0); if (__pyx_t_2) { /* "pandas/src/inference.pyx":355 * cdef int i, n = len(values) * if n == 0: * return False # <<<<<<<<<<<<<< * for i in range(n): * if not is_time(values[i]): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(Py_False); __pyx_r = Py_False; goto __pyx_L0; } /* "pandas/src/inference.pyx":356 * if n == 0: * return False * for i in range(n): # <<<<<<<<<<<<<< * if not is_time(values[i]): * return False */ __pyx_t_3 = __pyx_v_n; for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) { __pyx_v_i = __pyx_t_4; /* "pandas/src/inference.pyx":357 * return False * for i in range(n): * if not is_time(values[i]): # <<<<<<<<<<<<<< * return False * return True */ __pyx_t_6 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_6 < 0) { __pyx_t_6 += __pyx_pybuffernd_values.diminfo[0].shape; if (unlikely(__pyx_t_6 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_6 >= __pyx_pybuffernd_values.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 357; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_5 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_6, __pyx_pybuffernd_values.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_5); __pyx_t_2 = ((!(__pyx_f_6pandas_3lib_is_time(__pyx_t_5) != 0)) != 0); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_2) { /* "pandas/src/inference.pyx":358 * for i in range(n): * if not is_time(values[i]): * return False # <<<<<<<<<<<<<< * return True * */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(Py_False); __pyx_r = Py_False; goto __pyx_L0; } } /* "pandas/src/inference.pyx":359 * if not is_time(values[i]): * return False * return True # <<<<<<<<<<<<<< * * def is_period(object o): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(Py_True); __pyx_r = Py_True; goto __pyx_L0; /* "pandas/src/inference.pyx":352 * return True * * def is_time_array(ndarray[object] values): # <<<<<<<<<<<<<< * cdef int i, n = len(values) * if n == 0: */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_5); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __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.lib.is_time_array", __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/src/inference.pyx":361 * return True * * def is_period(object o): # <<<<<<<<<<<<<< * from pandas import Period * return isinstance(o,Period) */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_3lib_137is_period(PyObject *__pyx_self, PyObject *__pyx_v_o); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_3lib_137is_period = {__Pyx_NAMESTR("is_period"), (PyCFunction)__pyx_pw_6pandas_3lib_137is_period, METH_O, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_3lib_137is_period(PyObject *__pyx_self, PyObject *__pyx_v_o) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("is_period (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_3lib_136is_period(__pyx_self, ((PyObject *)__pyx_v_o)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_3lib_136is_period(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_o) { PyObject *__pyx_v_Period = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_t_3; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("is_period", 0); /* "pandas/src/inference.pyx":362 * * def is_period(object o): * from pandas import Period # <<<<<<<<<<<<<< * return isinstance(o,Period) * */ __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 362; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_n_s_Period); PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_Period); __Pyx_GIVEREF(__pyx_n_s_Period); __pyx_t_2 = __Pyx_Import(__pyx_n_s_pandas, __pyx_t_1, -1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 362; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_Period); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 362; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_t_1); __pyx_v_Period = __pyx_t_1; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/inference.pyx":363 * def is_period(object o): * from pandas import Period * return isinstance(o,Period) # <<<<<<<<<<<<<< * * def is_period_array(ndarray[object] values): */ __Pyx_XDECREF(__pyx_r); __pyx_t_3 = PyObject_IsInstance(__pyx_v_o, __pyx_v_Period); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 363; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 363; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "pandas/src/inference.pyx":361 * return True * * def is_period(object o): # <<<<<<<<<<<<<< * from pandas import Period * return isinstance(o,Period) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("pandas.lib.is_period", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_Period); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/inference.pyx":365 * return isinstance(o,Period) * * def is_period_array(ndarray[object] values): # <<<<<<<<<<<<<< * cdef int i, n = len(values) * from pandas.tseries.period import Period */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_3lib_139is_period_array(PyObject *__pyx_self, PyObject *__pyx_v_values); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_3lib_139is_period_array = {__Pyx_NAMESTR("is_period_array"), (PyCFunction)__pyx_pw_6pandas_3lib_139is_period_array, METH_O, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_3lib_139is_period_array(PyObject *__pyx_self, PyObject *__pyx_v_values) { CYTHON_UNUSED int __pyx_lineno = 0; CYTHON_UNUSED const char *__pyx_filename = NULL; CYTHON_UNUSED int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("is_period_array (wrapper)", 0); if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 365; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_3lib_138is_period_array(__pyx_self, ((PyArrayObject *)__pyx_v_values)); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_3lib_138is_period_array(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values) { int __pyx_v_i; int __pyx_v_n; PyObject *__pyx_v_Period = NULL; __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; int __pyx_t_4; int __pyx_t_5; int __pyx_t_6; int __pyx_t_7; int __pyx_t_8; int __pyx_t_9; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("is_period_array", 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_object, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 365; __pyx_clineno = __LINE__; goto __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/src/inference.pyx":366 * * def is_period_array(ndarray[object] values): * cdef int i, n = len(values) # <<<<<<<<<<<<<< * from pandas.tseries.period import Period * */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 366; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/src/inference.pyx":367 * def is_period_array(ndarray[object] values): * cdef int i, n = len(values) * from pandas.tseries.period import Period # <<<<<<<<<<<<<< * * if n == 0: */ __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 367; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_n_s_Period); PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_Period); __Pyx_GIVEREF(__pyx_n_s_Period); __pyx_t_3 = __Pyx_Import(__pyx_n_s_pandas_tseries_period, __pyx_t_2, -1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 367; __pyx_clineno = __LINE__; goto __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_Period); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 367; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_t_2); __pyx_v_Period = __pyx_t_2; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/inference.pyx":369 * from pandas.tseries.period import Period * * if n == 0: # <<<<<<<<<<<<<< * return False * for i in range(n): */ __pyx_t_4 = ((__pyx_v_n == 0) != 0); if (__pyx_t_4) { /* "pandas/src/inference.pyx":370 * * if n == 0: * return False # <<<<<<<<<<<<<< * for i in range(n): * if not isinstance(values[i], Period): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(Py_False); __pyx_r = Py_False; goto __pyx_L0; } /* "pandas/src/inference.pyx":371 * if n == 0: * return False * for i in range(n): # <<<<<<<<<<<<<< * if not isinstance(values[i], Period): * return False */ __pyx_t_5 = __pyx_v_n; for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) { __pyx_v_i = __pyx_t_6; /* "pandas/src/inference.pyx":372 * return False * for i in range(n): * if not isinstance(values[i], Period): # <<<<<<<<<<<<<< * return False * return True */ __pyx_t_7 = __pyx_v_i; __pyx_t_8 = -1; if (__pyx_t_7 < 0) { __pyx_t_7 += __pyx_pybuffernd_values.diminfo[0].shape; if (unlikely(__pyx_t_7 < 0)) __pyx_t_8 = 0; } else if (unlikely(__pyx_t_7 >= __pyx_pybuffernd_values.diminfo[0].shape)) __pyx_t_8 = 0; if (unlikely(__pyx_t_8 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_8); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 372; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_3 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_7, __pyx_pybuffernd_values.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_3); __pyx_t_4 = PyObject_IsInstance(__pyx_t_3, __pyx_v_Period); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 372; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_9 = ((!(__pyx_t_4 != 0)) != 0); if (__pyx_t_9) { /* "pandas/src/inference.pyx":373 * for i in range(n): * if not isinstance(values[i], Period): * return False # <<<<<<<<<<<<<< * return True * */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(Py_False); __pyx_r = Py_False; goto __pyx_L0; } } /* "pandas/src/inference.pyx":374 * if not isinstance(values[i], Period): * return False * return True # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(Py_True); __pyx_r = Py_True; goto __pyx_L0; /* "pandas/src/inference.pyx":365 * return isinstance(o,Period) * * def is_period_array(ndarray[object] values): # <<<<<<<<<<<<<< * cdef int i, n = len(values) * from pandas.tseries.period import Period */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __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.lib.is_period_array", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF(__pyx_v_Period); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/inference.pyx":383 * cdef double fINT64_MIN = INT64_MIN * * def maybe_convert_numeric(ndarray[object] values, set na_values, # <<<<<<<<<<<<<< * convert_empty=True, coerce_numeric=False): * ''' */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_3lib_141maybe_convert_numeric(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6pandas_3lib_140maybe_convert_numeric[] = "\n Type inference function-- convert strings to numeric (potentially) and\n convert to proper dtype array\n "; static PyMethodDef __pyx_mdef_6pandas_3lib_141maybe_convert_numeric = {__Pyx_NAMESTR("maybe_convert_numeric"), (PyCFunction)__pyx_pw_6pandas_3lib_141maybe_convert_numeric, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_3lib_140maybe_convert_numeric)}; static PyObject *__pyx_pw_6pandas_3lib_141maybe_convert_numeric(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_values = 0; PyObject *__pyx_v_na_values = 0; PyObject *__pyx_v_convert_empty = 0; PyObject *__pyx_v_coerce_numeric = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("maybe_convert_numeric (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_values,&__pyx_n_s_na_values,&__pyx_n_s_convert_empty,&__pyx_n_s_coerce_numeric,0}; PyObject* values[4] = {0,0,0,0}; /* "pandas/src/inference.pyx":384 * * def maybe_convert_numeric(ndarray[object] values, set na_values, * convert_empty=True, coerce_numeric=False): # <<<<<<<<<<<<<< * ''' * Type inference function-- convert strings to numeric (potentially) and */ values[2] = ((PyObject *)Py_True); values[3] = ((PyObject *)Py_False); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_values)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_na_values)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("maybe_convert_numeric", 0, 2, 4, 1); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 383; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_convert_empty); if (value) { values[2] = value; kw_args--; } } case 3: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_coerce_numeric); if (value) { values[3] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "maybe_convert_numeric") < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 383; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_values = ((PyArrayObject *)values[0]); __pyx_v_na_values = ((PyObject*)values[1]); __pyx_v_convert_empty = values[2]; __pyx_v_coerce_numeric = values[3]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("maybe_convert_numeric", 0, 2, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 383; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.lib.maybe_convert_numeric", __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_filename = __pyx_f[1]; __pyx_lineno = 383; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_na_values), (&PySet_Type), 1, "na_values", 1))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 383; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_3lib_140maybe_convert_numeric(__pyx_self, __pyx_v_values, __pyx_v_na_values, __pyx_v_convert_empty, __pyx_v_coerce_numeric); /* "pandas/src/inference.pyx":383 * cdef double fINT64_MIN = INT64_MIN * * def maybe_convert_numeric(ndarray[object] values, set na_values, # <<<<<<<<<<<<<< * convert_empty=True, coerce_numeric=False): * ''' */ /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_3lib_140maybe_convert_numeric(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyObject *__pyx_v_na_values, PyObject *__pyx_v_convert_empty, PyObject *__pyx_v_coerce_numeric) { CYTHON_UNUSED int __pyx_v_status; Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_n; PyArrayObject *__pyx_v_floats = 0; PyArrayObject *__pyx_v_complexes = 0; PyArrayObject *__pyx_v_ints = 0; int __pyx_v_seen_float; int __pyx_v_seen_complex; PyObject *__pyx_v_val = 0; __pyx_t_5numpy_float64_t __pyx_v_fval; CYTHON_UNUSED long __pyx_v_seen_int; __Pyx_LocalBuf_ND __pyx_pybuffernd_complexes; __Pyx_Buffer __pyx_pybuffer_complexes; __Pyx_LocalBuf_ND __pyx_pybuffernd_floats; __Pyx_Buffer __pyx_pybuffer_floats; __Pyx_LocalBuf_ND __pyx_pybuffernd_ints; __Pyx_Buffer __pyx_pybuffer_ints; __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; PyArrayObject *__pyx_t_6 = NULL; int __pyx_t_7; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; PyArrayObject *__pyx_t_11 = NULL; PyArrayObject *__pyx_t_12 = NULL; Py_ssize_t __pyx_t_13; int __pyx_t_14; int __pyx_t_15; Py_ssize_t __pyx_t_16; Py_ssize_t __pyx_t_17; __pyx_t_5numpy_float64_t __pyx_t_18; Py_ssize_t __pyx_t_19; __pyx_t_double_complex __pyx_t_20; Py_ssize_t __pyx_t_21; Py_ssize_t __pyx_t_22; __pyx_t_5numpy_int64_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; int __pyx_t_28; Py_ssize_t __pyx_t_29; Py_ssize_t __pyx_t_30; Py_ssize_t __pyx_t_31; int __pyx_t_32; PyObject *__pyx_t_33 = NULL; PyObject *__pyx_t_34 = NULL; PyObject *__pyx_t_35 = NULL; Py_ssize_t __pyx_t_36; Py_ssize_t __pyx_t_37; Py_ssize_t __pyx_t_38; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("maybe_convert_numeric", 0); __pyx_pybuffer_floats.pybuffer.buf = NULL; __pyx_pybuffer_floats.refcount = 0; __pyx_pybuffernd_floats.data = NULL; __pyx_pybuffernd_floats.rcbuffer = &__pyx_pybuffer_floats; __pyx_pybuffer_complexes.pybuffer.buf = NULL; __pyx_pybuffer_complexes.refcount = 0; __pyx_pybuffernd_complexes.data = NULL; __pyx_pybuffernd_complexes.rcbuffer = &__pyx_pybuffer_complexes; __pyx_pybuffer_ints.pybuffer.buf = NULL; __pyx_pybuffer_ints.refcount = 0; __pyx_pybuffernd_ints.data = NULL; __pyx_pybuffernd_ints.rcbuffer = &__pyx_pybuffer_ints; __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_filename = __pyx_f[1]; __pyx_lineno = 383; __pyx_clineno = __LINE__; goto __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/src/inference.pyx":395 * ndarray[complex128_t] complexes * ndarray[int64_t] ints * bint seen_float = 0 # <<<<<<<<<<<<<< * bint seen_complex = 0 * object val */ __pyx_v_seen_float = 0; /* "pandas/src/inference.pyx":396 * ndarray[int64_t] ints * bint seen_float = 0 * bint seen_complex = 0 # <<<<<<<<<<<<<< * object val * float64_t fval */ __pyx_v_seen_complex = 0; /* "pandas/src/inference.pyx":400 * float64_t fval * * n = len(values) # <<<<<<<<<<<<<< * * floats = np.empty(n, dtype='f8') */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 400; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/src/inference.pyx":402 * n = len(values) * * floats = np.empty(n, dtype='f8') # <<<<<<<<<<<<<< * complexes = np.empty(n, dtype='c16') * ints = np.empty(n, dtype='i8') */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 402; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 402; __pyx_clineno = __LINE__; goto __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_n); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 402; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 402; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 402; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_dtype, __pyx_n_s_f8) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 402; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_5 = PyObject_Call(__pyx_t_3, __pyx_t_4, __pyx_t_2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 402; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 402; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_6 = ((PyArrayObject *)__pyx_t_5); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_floats.rcbuffer->pybuffer); __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_floats.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_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_floats.rcbuffer->pybuffer, (PyObject*)__pyx_v_floats, &__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_pybuffernd_floats.diminfo[0].strides = __pyx_pybuffernd_floats.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_floats.diminfo[0].shape = __pyx_pybuffernd_floats.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 402; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_6 = 0; __pyx_v_floats = ((PyArrayObject *)__pyx_t_5); __pyx_t_5 = 0; /* "pandas/src/inference.pyx":403 * * floats = np.empty(n, dtype='f8') * complexes = np.empty(n, dtype='c16') # <<<<<<<<<<<<<< * ints = np.empty(n, dtype='i8') * */ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 403; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_empty); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 403; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyInt_FromSsize_t(__pyx_v_n); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 403; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 403; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyDict_New(); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 403; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_dtype, __pyx_n_s_c16) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 403; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_3 = PyObject_Call(__pyx_t_2, __pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 403; __pyx_clineno = __LINE__; goto __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_5); __pyx_t_5 = 0; if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 403; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_11 = ((PyArrayObject *)__pyx_t_3); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_complexes.rcbuffer->pybuffer); __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_complexes.rcbuffer->pybuffer, (PyObject*)__pyx_t_11, &__Pyx_TypeInfo___pyx_t_double_complex, 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_complexes.rcbuffer->pybuffer, (PyObject*)__pyx_v_complexes, &__Pyx_TypeInfo___pyx_t_double_complex, 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_pybuffernd_complexes.diminfo[0].strides = __pyx_pybuffernd_complexes.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_complexes.diminfo[0].shape = __pyx_pybuffernd_complexes.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 403; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_11 = 0; __pyx_v_complexes = ((PyArrayObject *)__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/inference.pyx":404 * floats = np.empty(n, dtype='f8') * complexes = np.empty(n, dtype='c16') * ints = np.empty(n, dtype='i8') # <<<<<<<<<<<<<< * * for i from 0 <= i < n: */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 404; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_empty); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 404; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyInt_FromSsize_t(__pyx_v_n); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 404; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 404; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 404; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dtype, __pyx_n_s_i8) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 404; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_2 = PyObject_Call(__pyx_t_5, __pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 404; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_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_filename = __pyx_f[1]; __pyx_lineno = 404; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_12 = ((PyArrayObject *)__pyx_t_2); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_ints.rcbuffer->pybuffer); __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_ints.rcbuffer->pybuffer, (PyObject*)__pyx_t_12, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_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_ints.rcbuffer->pybuffer, (PyObject*)__pyx_v_ints, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_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_pybuffernd_ints.diminfo[0].strides = __pyx_pybuffernd_ints.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_ints.diminfo[0].shape = __pyx_pybuffernd_ints.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 404; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_12 = 0; __pyx_v_ints = ((PyArrayObject *)__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/inference.pyx":406 * ints = np.empty(n, dtype='i8') * * for i from 0 <= i < n: # <<<<<<<<<<<<<< * val = values[i] * */ __pyx_t_1 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_1; __pyx_v_i++) { /* "pandas/src/inference.pyx":407 * * for i from 0 <= i < n: * val = values[i] # <<<<<<<<<<<<<< * * if val in na_values: */ __pyx_t_13 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_13 < 0) { __pyx_t_13 += __pyx_pybuffernd_values.diminfo[0].shape; if (unlikely(__pyx_t_13 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_13 >= __pyx_pybuffernd_values.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 407; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_2 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_values.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_2); __Pyx_XDECREF_SET(__pyx_v_val, __pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/inference.pyx":409 * val = values[i] * * if val in na_values: # <<<<<<<<<<<<<< * floats[i] = complexes[i] = nan * seen_float = 1 */ __pyx_t_14 = (__Pyx_PySequence_Contains(__pyx_v_val, __pyx_v_na_values, Py_EQ)); if (unlikely(__pyx_t_14 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 409; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_15 = (__pyx_t_14 != 0); if (__pyx_t_15) { /* "pandas/src/inference.pyx":410 * * if val in na_values: * floats[i] = complexes[i] = nan # <<<<<<<<<<<<<< * seen_float = 1 * elif util.is_float_object(val): */ __pyx_t_16 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_16 < 0) { __pyx_t_16 += __pyx_pybuffernd_floats.diminfo[0].shape; if (unlikely(__pyx_t_16 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_16 >= __pyx_pybuffernd_floats.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 410; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_floats.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_floats.diminfo[0].strides) = __pyx_v_6pandas_3lib_nan; __pyx_t_17 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_17 < 0) { __pyx_t_17 += __pyx_pybuffernd_complexes.diminfo[0].shape; if (unlikely(__pyx_t_17 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_17 >= __pyx_pybuffernd_complexes.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 410; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_double_complex *, __pyx_pybuffernd_complexes.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_complexes.diminfo[0].strides) = __pyx_t_double_complex_from_parts(__pyx_v_6pandas_3lib_nan, 0); /* "pandas/src/inference.pyx":411 * if val in na_values: * floats[i] = complexes[i] = nan * seen_float = 1 # <<<<<<<<<<<<<< * elif util.is_float_object(val): * floats[i] = complexes[i] = val */ __pyx_v_seen_float = 1; goto __pyx_L5; } /* "pandas/src/inference.pyx":412 * floats[i] = complexes[i] = nan * seen_float = 1 * elif util.is_float_object(val): # <<<<<<<<<<<<<< * floats[i] = complexes[i] = val * seen_float = 1 */ __pyx_t_15 = (is_float_object(__pyx_v_val) != 0); if (__pyx_t_15) { /* "pandas/src/inference.pyx":413 * seen_float = 1 * elif util.is_float_object(val): * floats[i] = complexes[i] = val # <<<<<<<<<<<<<< * seen_float = 1 * elif util.is_integer_object(val): */ __pyx_t_18 = __pyx_PyFloat_AsDouble(__pyx_v_val); if (unlikely((__pyx_t_18 == (npy_float64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 413; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_19 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_19 < 0) { __pyx_t_19 += __pyx_pybuffernd_floats.diminfo[0].shape; if (unlikely(__pyx_t_19 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_19 >= __pyx_pybuffernd_floats.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 413; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_floats.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_floats.diminfo[0].strides) = __pyx_t_18; __pyx_t_20 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_v_val); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 413; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_21 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_21 < 0) { __pyx_t_21 += __pyx_pybuffernd_complexes.diminfo[0].shape; if (unlikely(__pyx_t_21 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_21 >= __pyx_pybuffernd_complexes.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 413; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_double_complex *, __pyx_pybuffernd_complexes.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_complexes.diminfo[0].strides) = __pyx_t_20; /* "pandas/src/inference.pyx":414 * elif util.is_float_object(val): * floats[i] = complexes[i] = val * seen_float = 1 # <<<<<<<<<<<<<< * elif util.is_integer_object(val): * floats[i] = ints[i] = val */ __pyx_v_seen_float = 1; goto __pyx_L5; } /* "pandas/src/inference.pyx":415 * floats[i] = complexes[i] = val * seen_float = 1 * elif util.is_integer_object(val): # <<<<<<<<<<<<<< * floats[i] = ints[i] = val * seen_int = 1 */ __pyx_t_15 = (is_integer_object(__pyx_v_val) != 0); if (__pyx_t_15) { /* "pandas/src/inference.pyx":416 * seen_float = 1 * elif util.is_integer_object(val): * floats[i] = ints[i] = val # <<<<<<<<<<<<<< * seen_int = 1 * elif val is None: */ __pyx_t_18 = __pyx_PyFloat_AsDouble(__pyx_v_val); if (unlikely((__pyx_t_18 == (npy_float64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 416; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_22 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_22 < 0) { __pyx_t_22 += __pyx_pybuffernd_floats.diminfo[0].shape; if (unlikely(__pyx_t_22 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_22 >= __pyx_pybuffernd_floats.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 416; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_floats.rcbuffer->pybuffer.buf, __pyx_t_22, __pyx_pybuffernd_floats.diminfo[0].strides) = __pyx_t_18; __pyx_t_23 = __Pyx_PyInt_As_npy_int64(__pyx_v_val); if (unlikely((__pyx_t_23 == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 416; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_24 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_24 < 0) { __pyx_t_24 += __pyx_pybuffernd_ints.diminfo[0].shape; if (unlikely(__pyx_t_24 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_24 >= __pyx_pybuffernd_ints.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 416; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_ints.rcbuffer->pybuffer.buf, __pyx_t_24, __pyx_pybuffernd_ints.diminfo[0].strides) = __pyx_t_23; /* "pandas/src/inference.pyx":417 * elif util.is_integer_object(val): * floats[i] = ints[i] = val * seen_int = 1 # <<<<<<<<<<<<<< * elif val is None: * floats[i] = complexes[i] = nan */ __pyx_v_seen_int = 1; goto __pyx_L5; } /* "pandas/src/inference.pyx":418 * floats[i] = ints[i] = val * seen_int = 1 * elif val is None: # <<<<<<<<<<<<<< * floats[i] = complexes[i] = nan * seen_float = 1 */ __pyx_t_15 = (__pyx_v_val == Py_None); __pyx_t_14 = (__pyx_t_15 != 0); if (__pyx_t_14) { /* "pandas/src/inference.pyx":419 * seen_int = 1 * elif val is None: * floats[i] = complexes[i] = nan # <<<<<<<<<<<<<< * seen_float = 1 * elif hasattr(val,'__len__') and len(val) == 0: */ __pyx_t_25 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_25 < 0) { __pyx_t_25 += __pyx_pybuffernd_floats.diminfo[0].shape; if (unlikely(__pyx_t_25 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_25 >= __pyx_pybuffernd_floats.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 419; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_floats.rcbuffer->pybuffer.buf, __pyx_t_25, __pyx_pybuffernd_floats.diminfo[0].strides) = __pyx_v_6pandas_3lib_nan; __pyx_t_26 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_26 < 0) { __pyx_t_26 += __pyx_pybuffernd_complexes.diminfo[0].shape; if (unlikely(__pyx_t_26 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_26 >= __pyx_pybuffernd_complexes.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 419; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_double_complex *, __pyx_pybuffernd_complexes.rcbuffer->pybuffer.buf, __pyx_t_26, __pyx_pybuffernd_complexes.diminfo[0].strides) = __pyx_t_double_complex_from_parts(__pyx_v_6pandas_3lib_nan, 0); /* "pandas/src/inference.pyx":420 * elif val is None: * floats[i] = complexes[i] = nan * seen_float = 1 # <<<<<<<<<<<<<< * elif hasattr(val,'__len__') and len(val) == 0: * if convert_empty or coerce_numeric: */ __pyx_v_seen_float = 1; goto __pyx_L5; } /* "pandas/src/inference.pyx":421 * floats[i] = complexes[i] = nan * seen_float = 1 * elif hasattr(val,'__len__') and len(val) == 0: # <<<<<<<<<<<<<< * if convert_empty or coerce_numeric: * floats[i] = complexes[i] = nan */ __pyx_t_14 = PyObject_HasAttr(__pyx_v_val, __pyx_n_s_len); if (unlikely(__pyx_t_14 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 421; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if ((__pyx_t_14 != 0)) { __pyx_t_27 = PyObject_Length(__pyx_v_val); if (unlikely(__pyx_t_27 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 421; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_15 = ((__pyx_t_27 == 0) != 0); __pyx_t_28 = __pyx_t_15; } else { __pyx_t_28 = (__pyx_t_14 != 0); } if (__pyx_t_28) { /* "pandas/src/inference.pyx":422 * seen_float = 1 * elif hasattr(val,'__len__') and len(val) == 0: * if convert_empty or coerce_numeric: # <<<<<<<<<<<<<< * floats[i] = complexes[i] = nan * seen_float = 1 */ __pyx_t_28 = __Pyx_PyObject_IsTrue(__pyx_v_convert_empty); if (unlikely(__pyx_t_28 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 422; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (!__pyx_t_28) { __pyx_t_14 = __Pyx_PyObject_IsTrue(__pyx_v_coerce_numeric); if (unlikely(__pyx_t_14 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 422; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_15 = __pyx_t_14; } else { __pyx_t_15 = __pyx_t_28; } if (__pyx_t_15) { /* "pandas/src/inference.pyx":423 * elif hasattr(val,'__len__') and len(val) == 0: * if convert_empty or coerce_numeric: * floats[i] = complexes[i] = nan # <<<<<<<<<<<<<< * seen_float = 1 * else: */ __pyx_t_27 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_27 < 0) { __pyx_t_27 += __pyx_pybuffernd_floats.diminfo[0].shape; if (unlikely(__pyx_t_27 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_27 >= __pyx_pybuffernd_floats.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 423; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_floats.rcbuffer->pybuffer.buf, __pyx_t_27, __pyx_pybuffernd_floats.diminfo[0].strides) = __pyx_v_6pandas_3lib_nan; __pyx_t_29 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_29 < 0) { __pyx_t_29 += __pyx_pybuffernd_complexes.diminfo[0].shape; if (unlikely(__pyx_t_29 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_29 >= __pyx_pybuffernd_complexes.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 423; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_double_complex *, __pyx_pybuffernd_complexes.rcbuffer->pybuffer.buf, __pyx_t_29, __pyx_pybuffernd_complexes.diminfo[0].strides) = __pyx_t_double_complex_from_parts(__pyx_v_6pandas_3lib_nan, 0); /* "pandas/src/inference.pyx":424 * if convert_empty or coerce_numeric: * floats[i] = complexes[i] = nan * seen_float = 1 # <<<<<<<<<<<<<< * else: * raise ValueError('Empty string encountered') */ __pyx_v_seen_float = 1; goto __pyx_L6; } /*else*/ { /* "pandas/src/inference.pyx":426 * seen_float = 1 * else: * raise ValueError('Empty string encountered') # <<<<<<<<<<<<<< * elif util.is_complex_object(val): * complexes[i] = val */ __pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__30, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 426; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 426; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_L6:; goto __pyx_L5; } /* "pandas/src/inference.pyx":427 * else: * raise ValueError('Empty string encountered') * elif util.is_complex_object(val): # <<<<<<<<<<<<<< * complexes[i] = val * seen_complex = 1 */ __pyx_t_15 = (is_complex_object(__pyx_v_val) != 0); if (__pyx_t_15) { /* "pandas/src/inference.pyx":428 * raise ValueError('Empty string encountered') * elif util.is_complex_object(val): * complexes[i] = val # <<<<<<<<<<<<<< * seen_complex = 1 * else: */ __pyx_t_20 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_v_val); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 428; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_30 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_30 < 0) { __pyx_t_30 += __pyx_pybuffernd_complexes.diminfo[0].shape; if (unlikely(__pyx_t_30 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_30 >= __pyx_pybuffernd_complexes.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 428; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_double_complex *, __pyx_pybuffernd_complexes.rcbuffer->pybuffer.buf, __pyx_t_30, __pyx_pybuffernd_complexes.diminfo[0].strides) = __pyx_t_20; /* "pandas/src/inference.pyx":429 * elif util.is_complex_object(val): * complexes[i] = val * seen_complex = 1 # <<<<<<<<<<<<<< * else: * try: */ __pyx_v_seen_complex = 1; goto __pyx_L5; } /*else*/ { /* "pandas/src/inference.pyx":431 * seen_complex = 1 * else: * try: # <<<<<<<<<<<<<< * status = floatify(val, &fval) * floats[i] = fval */ { __Pyx_ExceptionSave(&__pyx_t_10, &__pyx_t_9, &__pyx_t_8); __Pyx_XGOTREF(__pyx_t_10); __Pyx_XGOTREF(__pyx_t_9); __Pyx_XGOTREF(__pyx_t_8); /*try:*/ { /* "pandas/src/inference.pyx":432 * else: * try: * status = floatify(val, &fval) # <<<<<<<<<<<<<< * floats[i] = fval * if not seen_float: */ __pyx_t_7 = floatify(__pyx_v_val, (&__pyx_v_fval)); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 432; __pyx_clineno = __LINE__; goto __pyx_L7_error;} __pyx_v_status = __pyx_t_7; /* "pandas/src/inference.pyx":433 * try: * status = floatify(val, &fval) * floats[i] = fval # <<<<<<<<<<<<<< * if not seen_float: * if '.' in val or fval == INF or fval == NEGINF: */ __pyx_t_31 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_31 < 0) { __pyx_t_31 += __pyx_pybuffernd_floats.diminfo[0].shape; if (unlikely(__pyx_t_31 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_31 >= __pyx_pybuffernd_floats.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 433; __pyx_clineno = __LINE__; goto __pyx_L7_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_floats.rcbuffer->pybuffer.buf, __pyx_t_31, __pyx_pybuffernd_floats.diminfo[0].strides) = __pyx_v_fval; /* "pandas/src/inference.pyx":434 * status = floatify(val, &fval) * floats[i] = fval * if not seen_float: # <<<<<<<<<<<<<< * if '.' in val or fval == INF or fval == NEGINF: * seen_float = 1 */ __pyx_t_15 = ((!(__pyx_v_seen_float != 0)) != 0); if (__pyx_t_15) { /* "pandas/src/inference.pyx":435 * floats[i] = fval * if not seen_float: * if '.' in val or fval == INF or fval == NEGINF: # <<<<<<<<<<<<<< * seen_float = 1 * elif 'inf' in val: # special case to handle +/-inf */ __pyx_t_15 = (__Pyx_PySequence_Contains(__pyx_kp_s__31, __pyx_v_val, Py_EQ)); if (unlikely(__pyx_t_15 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 435; __pyx_clineno = __LINE__; goto __pyx_L7_error;} if (!(__pyx_t_15 != 0)) { __pyx_t_28 = ((__pyx_v_fval == __pyx_v_6pandas_3lib_INF) != 0); if (!__pyx_t_28) { __pyx_t_14 = ((__pyx_v_fval == __pyx_v_6pandas_3lib_NEGINF) != 0); __pyx_t_32 = __pyx_t_14; } else { __pyx_t_32 = __pyx_t_28; } __pyx_t_28 = __pyx_t_32; } else { __pyx_t_28 = (__pyx_t_15 != 0); } if (__pyx_t_28) { /* "pandas/src/inference.pyx":436 * if not seen_float: * if '.' in val or fval == INF or fval == NEGINF: * seen_float = 1 # <<<<<<<<<<<<<< * elif 'inf' in val: # special case to handle +/-inf * seen_float = 1 */ __pyx_v_seen_float = 1; goto __pyx_L16; } /* "pandas/src/inference.pyx":437 * if '.' in val or fval == INF or fval == NEGINF: * seen_float = 1 * elif 'inf' in val: # special case to handle +/-inf # <<<<<<<<<<<<<< * seen_float = 1 * elif fval < fINT64_MAX and fval > fINT64_MIN: */ __pyx_t_28 = (__Pyx_PySequence_Contains(__pyx_n_s_inf, __pyx_v_val, Py_EQ)); if (unlikely(__pyx_t_28 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 437; __pyx_clineno = __LINE__; goto __pyx_L7_error;} __pyx_t_15 = (__pyx_t_28 != 0); if (__pyx_t_15) { /* "pandas/src/inference.pyx":438 * seen_float = 1 * elif 'inf' in val: # special case to handle +/-inf * seen_float = 1 # <<<<<<<<<<<<<< * elif fval < fINT64_MAX and fval > fINT64_MIN: * try: */ __pyx_v_seen_float = 1; goto __pyx_L16; } /* "pandas/src/inference.pyx":439 * elif 'inf' in val: # special case to handle +/-inf * seen_float = 1 * elif fval < fINT64_MAX and fval > fINT64_MIN: # <<<<<<<<<<<<<< * try: * ints[i] = int(val) */ __pyx_t_15 = ((__pyx_v_fval < __pyx_v_6pandas_3lib_fINT64_MAX) != 0); if (__pyx_t_15) { __pyx_t_28 = ((__pyx_v_fval > __pyx_v_6pandas_3lib_fINT64_MIN) != 0); __pyx_t_32 = __pyx_t_28; } else { __pyx_t_32 = __pyx_t_15; } if (__pyx_t_32) { /* "pandas/src/inference.pyx":440 * seen_float = 1 * elif fval < fINT64_MAX and fval > fINT64_MIN: * try: # <<<<<<<<<<<<<< * ints[i] = int(val) * except ValueError: */ { __Pyx_ExceptionSave(&__pyx_t_33, &__pyx_t_34, &__pyx_t_35); __Pyx_XGOTREF(__pyx_t_33); __Pyx_XGOTREF(__pyx_t_34); __Pyx_XGOTREF(__pyx_t_35); /*try:*/ { /* "pandas/src/inference.pyx":441 * elif fval < fINT64_MAX and fval > fINT64_MIN: * try: * ints[i] = int(val) # <<<<<<<<<<<<<< * except ValueError: * ints[i] = fval */ __pyx_t_2 = PyNumber_Int(__pyx_v_val); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 441; __pyx_clineno = __LINE__; goto __pyx_L17_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_23 = __Pyx_PyInt_As_npy_int64(__pyx_t_2); if (unlikely((__pyx_t_23 == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 441; __pyx_clineno = __LINE__; goto __pyx_L17_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_36 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_36 < 0) { __pyx_t_36 += __pyx_pybuffernd_ints.diminfo[0].shape; if (unlikely(__pyx_t_36 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_36 >= __pyx_pybuffernd_ints.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 441; __pyx_clineno = __LINE__; goto __pyx_L17_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_ints.rcbuffer->pybuffer.buf, __pyx_t_36, __pyx_pybuffernd_ints.diminfo[0].strides) = __pyx_t_23; } __Pyx_XDECREF(__pyx_t_33); __pyx_t_33 = 0; __Pyx_XDECREF(__pyx_t_34); __pyx_t_34 = 0; __Pyx_XDECREF(__pyx_t_35); __pyx_t_35 = 0; goto __pyx_L24_try_end; __pyx_L17_error:; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/inference.pyx":442 * try: * ints[i] = int(val) * except ValueError: # <<<<<<<<<<<<<< * ints[i] = fval * else: */ __pyx_t_7 = PyErr_ExceptionMatches(__pyx_builtin_ValueError); if (__pyx_t_7) { __Pyx_AddTraceback("pandas.lib.maybe_convert_numeric", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 442; __pyx_clineno = __LINE__; goto __pyx_L19_except_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_GOTREF(__pyx_t_3); __Pyx_GOTREF(__pyx_t_4); /* "pandas/src/inference.pyx":443 * ints[i] = int(val) * except ValueError: * ints[i] = fval # <<<<<<<<<<<<<< * else: * seen_float = 1 */ __pyx_t_37 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_37 < 0) { __pyx_t_37 += __pyx_pybuffernd_ints.diminfo[0].shape; if (unlikely(__pyx_t_37 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_37 >= __pyx_pybuffernd_ints.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 443; __pyx_clineno = __LINE__; goto __pyx_L19_except_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_ints.rcbuffer->pybuffer.buf, __pyx_t_37, __pyx_pybuffernd_ints.diminfo[0].strides) = ((__pyx_t_5numpy_int64_t)__pyx_v_fval); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; goto __pyx_L18_exception_handled; } goto __pyx_L19_except_error; __pyx_L19_except_error:; __Pyx_XGIVEREF(__pyx_t_33); __Pyx_XGIVEREF(__pyx_t_34); __Pyx_XGIVEREF(__pyx_t_35); __Pyx_ExceptionReset(__pyx_t_33, __pyx_t_34, __pyx_t_35); goto __pyx_L7_error; __pyx_L18_exception_handled:; __Pyx_XGIVEREF(__pyx_t_33); __Pyx_XGIVEREF(__pyx_t_34); __Pyx_XGIVEREF(__pyx_t_35); __Pyx_ExceptionReset(__pyx_t_33, __pyx_t_34, __pyx_t_35); __pyx_L24_try_end:; } goto __pyx_L16; } /*else*/ { /* "pandas/src/inference.pyx":445 * ints[i] = fval * else: * seen_float = 1 # <<<<<<<<<<<<<< * except: * if not coerce_numeric: */ __pyx_v_seen_float = 1; } __pyx_L16:; goto __pyx_L15; } __pyx_L15:; } __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; goto __pyx_L14_try_end; __pyx_L7_error:; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; /* "pandas/src/inference.pyx":446 * else: * seen_float = 1 * except: # <<<<<<<<<<<<<< * if not coerce_numeric: * raise */ /*except:*/ { __Pyx_AddTraceback("pandas.lib.maybe_convert_numeric", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_3, &__pyx_t_2) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 446; __pyx_clineno = __LINE__; goto __pyx_L9_except_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_GOTREF(__pyx_t_3); __Pyx_GOTREF(__pyx_t_2); /* "pandas/src/inference.pyx":447 * seen_float = 1 * except: * if not coerce_numeric: # <<<<<<<<<<<<<< * raise * */ __pyx_t_32 = __Pyx_PyObject_IsTrue(__pyx_v_coerce_numeric); if (unlikely(__pyx_t_32 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 447; __pyx_clineno = __LINE__; goto __pyx_L9_except_error;} __pyx_t_15 = ((!__pyx_t_32) != 0); if (__pyx_t_15) { /* "pandas/src/inference.pyx":448 * except: * if not coerce_numeric: * raise # <<<<<<<<<<<<<< * * floats[i] = nan */ __Pyx_GIVEREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_3); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_ErrRestore(__pyx_t_4, __pyx_t_3, __pyx_t_2); __pyx_t_4 = 0; __pyx_t_3 = 0; __pyx_t_2 = 0; {__pyx_filename = __pyx_f[1]; __pyx_lineno = 448; __pyx_clineno = __LINE__; goto __pyx_L9_except_error;} } /* "pandas/src/inference.pyx":450 * raise * * floats[i] = nan # <<<<<<<<<<<<<< * seen_float = 1 * */ __pyx_t_38 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_38 < 0) { __pyx_t_38 += __pyx_pybuffernd_floats.diminfo[0].shape; if (unlikely(__pyx_t_38 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_38 >= __pyx_pybuffernd_floats.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 450; __pyx_clineno = __LINE__; goto __pyx_L9_except_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_floats.rcbuffer->pybuffer.buf, __pyx_t_38, __pyx_pybuffernd_floats.diminfo[0].strides) = __pyx_v_6pandas_3lib_nan; /* "pandas/src/inference.pyx":451 * * floats[i] = nan * seen_float = 1 # <<<<<<<<<<<<<< * * */ __pyx_v_seen_float = 1; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; goto __pyx_L8_exception_handled; } __pyx_L9_except_error:; __Pyx_XGIVEREF(__pyx_t_10); __Pyx_XGIVEREF(__pyx_t_9); __Pyx_XGIVEREF(__pyx_t_8); __Pyx_ExceptionReset(__pyx_t_10, __pyx_t_9, __pyx_t_8); goto __pyx_L1_error; __pyx_L8_exception_handled:; __Pyx_XGIVEREF(__pyx_t_10); __Pyx_XGIVEREF(__pyx_t_9); __Pyx_XGIVEREF(__pyx_t_8); __Pyx_ExceptionReset(__pyx_t_10, __pyx_t_9, __pyx_t_8); __pyx_L14_try_end:; } } __pyx_L5:; } /* "pandas/src/inference.pyx":454 * * * if seen_complex: # <<<<<<<<<<<<<< * return complexes * elif seen_float: */ __pyx_t_15 = (__pyx_v_seen_complex != 0); if (__pyx_t_15) { /* "pandas/src/inference.pyx":455 * * if seen_complex: * return complexes # <<<<<<<<<<<<<< * elif seen_float: * return floats */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_complexes)); __pyx_r = ((PyObject *)__pyx_v_complexes); goto __pyx_L0; } /* "pandas/src/inference.pyx":456 * if seen_complex: * return complexes * elif seen_float: # <<<<<<<<<<<<<< * return floats * else: */ __pyx_t_15 = (__pyx_v_seen_float != 0); if (__pyx_t_15) { /* "pandas/src/inference.pyx":457 * return complexes * elif seen_float: * return floats # <<<<<<<<<<<<<< * else: * return ints */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_floats)); __pyx_r = ((PyObject *)__pyx_v_floats); goto __pyx_L0; } /*else*/ { /* "pandas/src/inference.pyx":459 * return floats * else: * return ints # <<<<<<<<<<<<<< * * def maybe_convert_objects(ndarray[object] objects, bint try_float=0, */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_ints)); __pyx_r = ((PyObject *)__pyx_v_ints); goto __pyx_L0; } /* "pandas/src/inference.pyx":383 * cdef double fINT64_MIN = INT64_MIN * * def maybe_convert_numeric(ndarray[object] values, set na_values, # <<<<<<<<<<<<<< * convert_empty=True, coerce_numeric=False): * ''' */ /* 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); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_complexes.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_floats.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_ints.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.lib.maybe_convert_numeric", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_complexes.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_floats.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_ints.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_floats); __Pyx_XDECREF((PyObject *)__pyx_v_complexes); __Pyx_XDECREF((PyObject *)__pyx_v_ints); __Pyx_XDECREF(__pyx_v_val); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/inference.pyx":461 * return ints * * def maybe_convert_objects(ndarray[object] objects, bint try_float=0, # <<<<<<<<<<<<<< * bint safe=0, bint convert_datetime=0, bint convert_timedelta=0): * ''' */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_3lib_143maybe_convert_objects(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6pandas_3lib_142maybe_convert_objects[] = "\n Type inference function-- convert object array to proper dtype\n "; static PyMethodDef __pyx_mdef_6pandas_3lib_143maybe_convert_objects = {__Pyx_NAMESTR("maybe_convert_objects"), (PyCFunction)__pyx_pw_6pandas_3lib_143maybe_convert_objects, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_3lib_142maybe_convert_objects)}; static PyObject *__pyx_pw_6pandas_3lib_143maybe_convert_objects(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_objects = 0; int __pyx_v_try_float; int __pyx_v_safe; int __pyx_v_convert_datetime; int __pyx_v_convert_timedelta; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("maybe_convert_objects (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_objects,&__pyx_n_s_try_float,&__pyx_n_s_safe,&__pyx_n_s_convert_datetime,&__pyx_n_s_convert_timedelta,0}; PyObject* values[5] = {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 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_objects)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_try_float); if (value) { values[1] = value; kw_args--; } } case 2: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_safe); if (value) { values[2] = value; kw_args--; } } case 3: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_convert_datetime); if (value) { values[3] = value; kw_args--; } } case 4: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_convert_timedelta); if (value) { values[4] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "maybe_convert_objects") < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 461; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_objects = ((PyArrayObject *)values[0]); if (values[1]) { __pyx_v_try_float = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_try_float == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 461; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } else { __pyx_v_try_float = ((int)0); } if (values[2]) { __pyx_v_safe = __Pyx_PyObject_IsTrue(values[2]); if (unlikely((__pyx_v_safe == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 462; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } else { __pyx_v_safe = ((int)0); } if (values[3]) { __pyx_v_convert_datetime = __Pyx_PyObject_IsTrue(values[3]); if (unlikely((__pyx_v_convert_datetime == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 462; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } else { __pyx_v_convert_datetime = ((int)0); } if (values[4]) { __pyx_v_convert_timedelta = __Pyx_PyObject_IsTrue(values[4]); if (unlikely((__pyx_v_convert_timedelta == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 462; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } else { __pyx_v_convert_timedelta = ((int)0); } } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("maybe_convert_objects", 0, 1, 5, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 461; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.lib.maybe_convert_objects", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_objects), __pyx_ptype_5numpy_ndarray, 1, "objects", 0))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 461; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_3lib_142maybe_convert_objects(__pyx_self, __pyx_v_objects, __pyx_v_try_float, __pyx_v_safe, __pyx_v_convert_datetime, __pyx_v_convert_timedelta); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_3lib_142maybe_convert_objects(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_objects, int __pyx_v_try_float, int __pyx_v_safe, int __pyx_v_convert_datetime, int __pyx_v_convert_timedelta) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_n; PyArrayObject *__pyx_v_floats = 0; PyArrayObject *__pyx_v_complexes = 0; PyArrayObject *__pyx_v_ints = 0; PyArrayObject *__pyx_v_bools = 0; PyArrayObject *__pyx_v_idatetimes = 0; PyArrayObject *__pyx_v_itimedeltas = 0; int __pyx_v_seen_float; int __pyx_v_seen_complex; int __pyx_v_seen_datetime; int __pyx_v_seen_timedelta; int __pyx_v_seen_int; int __pyx_v_seen_bool; int __pyx_v_seen_object; int __pyx_v_seen_null; int __pyx_v_seen_numeric; PyObject *__pyx_v_val = 0; CYTHON_UNUSED PyObject *__pyx_v_onan = 0; __pyx_t_5numpy_float64_t __pyx_v_fnan; PyObject *__pyx_v_datetimes = NULL; PyObject *__pyx_v_timedeltas = NULL; __Pyx_LocalBuf_ND __pyx_pybuffernd_bools; __Pyx_Buffer __pyx_pybuffer_bools; __Pyx_LocalBuf_ND __pyx_pybuffernd_complexes; __Pyx_Buffer __pyx_pybuffer_complexes; __Pyx_LocalBuf_ND __pyx_pybuffernd_floats; __Pyx_Buffer __pyx_pybuffer_floats; __Pyx_LocalBuf_ND __pyx_pybuffernd_idatetimes; __Pyx_Buffer __pyx_pybuffer_idatetimes; __Pyx_LocalBuf_ND __pyx_pybuffernd_ints; __Pyx_Buffer __pyx_pybuffer_ints; __Pyx_LocalBuf_ND __pyx_pybuffernd_itimedeltas; __Pyx_Buffer __pyx_pybuffer_itimedeltas; __Pyx_LocalBuf_ND __pyx_pybuffernd_objects; __Pyx_Buffer __pyx_pybuffer_objects; 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; PyArrayObject *__pyx_t_6 = NULL; int __pyx_t_7; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; PyArrayObject *__pyx_t_11 = NULL; PyArrayObject *__pyx_t_12 = NULL; PyObject *__pyx_t_13 = NULL; PyArrayObject *__pyx_t_14 = NULL; int __pyx_t_15; PyArrayObject *__pyx_t_16 = NULL; PyArrayObject *__pyx_t_17 = NULL; __pyx_t_5numpy_float64_t __pyx_t_18; Py_ssize_t __pyx_t_19; int __pyx_t_20; Py_ssize_t __pyx_t_21; Py_ssize_t __pyx_t_22; __pyx_t_5numpy_uint8_t __pyx_t_23; Py_ssize_t __pyx_t_24; Py_ssize_t __pyx_t_25; __pyx_t_double_complex __pyx_t_26; Py_ssize_t __pyx_t_27; __pyx_t_5numpy_int64_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; double __pyx_t_36; Py_ssize_t __pyx_t_37; Py_ssize_t __pyx_t_38; int __pyx_t_39; int __pyx_t_40; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("maybe_convert_objects", 0); __pyx_pybuffer_floats.pybuffer.buf = NULL; __pyx_pybuffer_floats.refcount = 0; __pyx_pybuffernd_floats.data = NULL; __pyx_pybuffernd_floats.rcbuffer = &__pyx_pybuffer_floats; __pyx_pybuffer_complexes.pybuffer.buf = NULL; __pyx_pybuffer_complexes.refcount = 0; __pyx_pybuffernd_complexes.data = NULL; __pyx_pybuffernd_complexes.rcbuffer = &__pyx_pybuffer_complexes; __pyx_pybuffer_ints.pybuffer.buf = NULL; __pyx_pybuffer_ints.refcount = 0; __pyx_pybuffernd_ints.data = NULL; __pyx_pybuffernd_ints.rcbuffer = &__pyx_pybuffer_ints; __pyx_pybuffer_bools.pybuffer.buf = NULL; __pyx_pybuffer_bools.refcount = 0; __pyx_pybuffernd_bools.data = NULL; __pyx_pybuffernd_bools.rcbuffer = &__pyx_pybuffer_bools; __pyx_pybuffer_idatetimes.pybuffer.buf = NULL; __pyx_pybuffer_idatetimes.refcount = 0; __pyx_pybuffernd_idatetimes.data = NULL; __pyx_pybuffernd_idatetimes.rcbuffer = &__pyx_pybuffer_idatetimes; __pyx_pybuffer_itimedeltas.pybuffer.buf = NULL; __pyx_pybuffer_itimedeltas.refcount = 0; __pyx_pybuffernd_itimedeltas.data = NULL; __pyx_pybuffernd_itimedeltas.rcbuffer = &__pyx_pybuffer_itimedeltas; __pyx_pybuffer_objects.pybuffer.buf = NULL; __pyx_pybuffer_objects.refcount = 0; __pyx_pybuffernd_objects.data = NULL; __pyx_pybuffernd_objects.rcbuffer = &__pyx_pybuffer_objects; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_objects.rcbuffer->pybuffer, (PyObject*)__pyx_v_objects, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 461; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_objects.diminfo[0].strides = __pyx_pybuffernd_objects.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_objects.diminfo[0].shape = __pyx_pybuffernd_objects.rcbuffer->pybuffer.shape[0]; /* "pandas/src/inference.pyx":474 * ndarray[int64_t] idatetimes * ndarray[int64_t] itimedeltas * bint seen_float = 0 # <<<<<<<<<<<<<< * bint seen_complex = 0 * bint seen_datetime = 0 */ __pyx_v_seen_float = 0; /* "pandas/src/inference.pyx":475 * ndarray[int64_t] itimedeltas * bint seen_float = 0 * bint seen_complex = 0 # <<<<<<<<<<<<<< * bint seen_datetime = 0 * bint seen_timedelta = 0 */ __pyx_v_seen_complex = 0; /* "pandas/src/inference.pyx":476 * bint seen_float = 0 * bint seen_complex = 0 * bint seen_datetime = 0 # <<<<<<<<<<<<<< * bint seen_timedelta = 0 * bint seen_int = 0 */ __pyx_v_seen_datetime = 0; /* "pandas/src/inference.pyx":477 * bint seen_complex = 0 * bint seen_datetime = 0 * bint seen_timedelta = 0 # <<<<<<<<<<<<<< * bint seen_int = 0 * bint seen_bool = 0 */ __pyx_v_seen_timedelta = 0; /* "pandas/src/inference.pyx":478 * bint seen_datetime = 0 * bint seen_timedelta = 0 * bint seen_int = 0 # <<<<<<<<<<<<<< * bint seen_bool = 0 * bint seen_object = 0 */ __pyx_v_seen_int = 0; /* "pandas/src/inference.pyx":479 * bint seen_timedelta = 0 * bint seen_int = 0 * bint seen_bool = 0 # <<<<<<<<<<<<<< * bint seen_object = 0 * bint seen_null = 0 */ __pyx_v_seen_bool = 0; /* "pandas/src/inference.pyx":480 * bint seen_int = 0 * bint seen_bool = 0 * bint seen_object = 0 # <<<<<<<<<<<<<< * bint seen_null = 0 * bint seen_numeric = 0 */ __pyx_v_seen_object = 0; /* "pandas/src/inference.pyx":481 * bint seen_bool = 0 * bint seen_object = 0 * bint seen_null = 0 # <<<<<<<<<<<<<< * bint seen_numeric = 0 * object val, onan */ __pyx_v_seen_null = 0; /* "pandas/src/inference.pyx":482 * bint seen_object = 0 * bint seen_null = 0 * bint seen_numeric = 0 # <<<<<<<<<<<<<< * object val, onan * float64_t fval, fnan */ __pyx_v_seen_numeric = 0; /* "pandas/src/inference.pyx":486 * float64_t fval, fnan * * n = len(objects) # <<<<<<<<<<<<<< * * floats = np.empty(n, dtype='f8') */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_objects)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 486; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/src/inference.pyx":488 * n = len(objects) * * floats = np.empty(n, dtype='f8') # <<<<<<<<<<<<<< * complexes = np.empty(n, dtype='c16') * ints = np.empty(n, dtype='i8') */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 488; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 488; __pyx_clineno = __LINE__; goto __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_n); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 488; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 488; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 488; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_dtype, __pyx_n_s_f8) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 488; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_5 = PyObject_Call(__pyx_t_3, __pyx_t_4, __pyx_t_2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 488; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 488; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_6 = ((PyArrayObject *)__pyx_t_5); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_floats.rcbuffer->pybuffer); __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_floats.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_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_floats.rcbuffer->pybuffer, (PyObject*)__pyx_v_floats, &__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_pybuffernd_floats.diminfo[0].strides = __pyx_pybuffernd_floats.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_floats.diminfo[0].shape = __pyx_pybuffernd_floats.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 488; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_6 = 0; __pyx_v_floats = ((PyArrayObject *)__pyx_t_5); __pyx_t_5 = 0; /* "pandas/src/inference.pyx":489 * * floats = np.empty(n, dtype='f8') * complexes = np.empty(n, dtype='c16') # <<<<<<<<<<<<<< * ints = np.empty(n, dtype='i8') * bools = np.empty(n, dtype=np.uint8) */ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 489; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_empty); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 489; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyInt_FromSsize_t(__pyx_v_n); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 489; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 489; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyDict_New(); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 489; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_dtype, __pyx_n_s_c16) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 489; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_3 = PyObject_Call(__pyx_t_2, __pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 489; __pyx_clineno = __LINE__; goto __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_5); __pyx_t_5 = 0; if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 489; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_11 = ((PyArrayObject *)__pyx_t_3); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_complexes.rcbuffer->pybuffer); __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_complexes.rcbuffer->pybuffer, (PyObject*)__pyx_t_11, &__Pyx_TypeInfo___pyx_t_double_complex, 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_complexes.rcbuffer->pybuffer, (PyObject*)__pyx_v_complexes, &__Pyx_TypeInfo___pyx_t_double_complex, 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_pybuffernd_complexes.diminfo[0].strides = __pyx_pybuffernd_complexes.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_complexes.diminfo[0].shape = __pyx_pybuffernd_complexes.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 489; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_11 = 0; __pyx_v_complexes = ((PyArrayObject *)__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/inference.pyx":490 * floats = np.empty(n, dtype='f8') * complexes = np.empty(n, dtype='c16') * ints = np.empty(n, dtype='i8') # <<<<<<<<<<<<<< * bools = np.empty(n, dtype=np.uint8) * */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 490; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_empty); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 490; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyInt_FromSsize_t(__pyx_v_n); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 490; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 490; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 490; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dtype, __pyx_n_s_i8) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 490; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_2 = PyObject_Call(__pyx_t_5, __pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 490; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_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_filename = __pyx_f[1]; __pyx_lineno = 490; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_12 = ((PyArrayObject *)__pyx_t_2); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_ints.rcbuffer->pybuffer); __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_ints.rcbuffer->pybuffer, (PyObject*)__pyx_t_12, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_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_ints.rcbuffer->pybuffer, (PyObject*)__pyx_v_ints, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_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_pybuffernd_ints.diminfo[0].strides = __pyx_pybuffernd_ints.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_ints.diminfo[0].shape = __pyx_pybuffernd_ints.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 490; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_12 = 0; __pyx_v_ints = ((PyArrayObject *)__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/inference.pyx":491 * complexes = np.empty(n, dtype='c16') * ints = np.empty(n, dtype='i8') * bools = np.empty(n, dtype=np.uint8) # <<<<<<<<<<<<<< * * if convert_datetime: */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 491; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 491; __pyx_clineno = __LINE__; goto __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_n); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 491; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 491; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 491; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 491; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_uint8); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 491; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_dtype, __pyx_t_13) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 491; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_13 = PyObject_Call(__pyx_t_3, __pyx_t_4, __pyx_t_2); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 491; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __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_13) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_13, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 491; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_14 = ((PyArrayObject *)__pyx_t_13); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_bools.rcbuffer->pybuffer); __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_bools.rcbuffer->pybuffer, (PyObject*)__pyx_t_14, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_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_bools.rcbuffer->pybuffer, (PyObject*)__pyx_v_bools, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_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_pybuffernd_bools.diminfo[0].strides = __pyx_pybuffernd_bools.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_bools.diminfo[0].shape = __pyx_pybuffernd_bools.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 491; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_14 = 0; __pyx_v_bools = ((PyArrayObject *)__pyx_t_13); __pyx_t_13 = 0; /* "pandas/src/inference.pyx":493 * bools = np.empty(n, dtype=np.uint8) * * if convert_datetime: # <<<<<<<<<<<<<< * datetimes = np.empty(n, dtype='M8[ns]') * idatetimes = datetimes.view(np.int64) */ __pyx_t_15 = (__pyx_v_convert_datetime != 0); if (__pyx_t_15) { /* "pandas/src/inference.pyx":494 * * if convert_datetime: * datetimes = np.empty(n, dtype='M8[ns]') # <<<<<<<<<<<<<< * idatetimes = datetimes.view(np.int64) * */ __pyx_t_13 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 494; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_13, __pyx_n_s_empty); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 494; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_13 = PyInt_FromSsize_t(__pyx_v_n); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 494; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 494; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_13); __Pyx_GIVEREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_13 = PyDict_New(); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 494; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); if (PyDict_SetItem(__pyx_t_13, __pyx_n_s_dtype, __pyx_kp_s_M8_ns) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 494; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_3 = PyObject_Call(__pyx_t_2, __pyx_t_4, __pyx_t_13); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 494; __pyx_clineno = __LINE__; goto __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_13); __pyx_t_13 = 0; __pyx_v_datetimes = __pyx_t_3; __pyx_t_3 = 0; /* "pandas/src/inference.pyx":495 * if convert_datetime: * datetimes = np.empty(n, dtype='M8[ns]') * idatetimes = datetimes.view(np.int64) # <<<<<<<<<<<<<< * * if convert_timedelta: */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_datetimes, __pyx_n_s_view); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 495; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_13 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 495; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_13, __pyx_n_s_int64); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 495; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_13 = PyTuple_New(1); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 495; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyObject_Call(__pyx_t_3, __pyx_t_13, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 495; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 495; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_16 = ((PyArrayObject *)__pyx_t_4); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_idatetimes.rcbuffer->pybuffer); __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_idatetimes.rcbuffer->pybuffer, (PyObject*)__pyx_t_16, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_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_idatetimes.rcbuffer->pybuffer, (PyObject*)__pyx_v_idatetimes, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_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_pybuffernd_idatetimes.diminfo[0].strides = __pyx_pybuffernd_idatetimes.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_idatetimes.diminfo[0].shape = __pyx_pybuffernd_idatetimes.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 495; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_16 = 0; __pyx_v_idatetimes = ((PyArrayObject *)__pyx_t_4); __pyx_t_4 = 0; goto __pyx_L3; } __pyx_L3:; /* "pandas/src/inference.pyx":497 * idatetimes = datetimes.view(np.int64) * * if convert_timedelta: # <<<<<<<<<<<<<< * timedeltas = np.empty(n, dtype='m8[ns]') * itimedeltas = timedeltas.view(np.int64) */ __pyx_t_15 = (__pyx_v_convert_timedelta != 0); if (__pyx_t_15) { /* "pandas/src/inference.pyx":498 * * if convert_timedelta: * timedeltas = np.empty(n, dtype='m8[ns]') # <<<<<<<<<<<<<< * itimedeltas = timedeltas.view(np.int64) * */ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 498; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_empty); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 498; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyInt_FromSsize_t(__pyx_v_n); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 498; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 498; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyDict_New(); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 498; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_dtype, __pyx_kp_s_m8_ns) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 498; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_2 = PyObject_Call(__pyx_t_13, __pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 498; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_timedeltas = __pyx_t_2; __pyx_t_2 = 0; /* "pandas/src/inference.pyx":499 * if convert_timedelta: * timedeltas = np.empty(n, dtype='m8[ns]') * itimedeltas = timedeltas.view(np.int64) # <<<<<<<<<<<<<< * * onan = np.nan */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_timedeltas, __pyx_n_s_view); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 499; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 499; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_int64); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 499; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 499; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 499; __pyx_clineno = __LINE__; goto __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; if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 499; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_17 = ((PyArrayObject *)__pyx_t_3); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_itimedeltas.rcbuffer->pybuffer); __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_itimedeltas.rcbuffer->pybuffer, (PyObject*)__pyx_t_17, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_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_itimedeltas.rcbuffer->pybuffer, (PyObject*)__pyx_v_itimedeltas, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_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_pybuffernd_itimedeltas.diminfo[0].strides = __pyx_pybuffernd_itimedeltas.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_itimedeltas.diminfo[0].shape = __pyx_pybuffernd_itimedeltas.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 499; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_17 = 0; __pyx_v_itimedeltas = ((PyArrayObject *)__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L4; } __pyx_L4:; /* "pandas/src/inference.pyx":501 * itimedeltas = timedeltas.view(np.int64) * * onan = np.nan # <<<<<<<<<<<<<< * fnan = np.nan * */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 501; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_nan); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 501; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_onan = __pyx_t_4; __pyx_t_4 = 0; /* "pandas/src/inference.pyx":502 * * onan = np.nan * fnan = np.nan # <<<<<<<<<<<<<< * * for i from 0 <= i < n: */ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 502; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_nan); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 502; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_18 = __pyx_PyFloat_AsDouble(__pyx_t_3); if (unlikely((__pyx_t_18 == (npy_float64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 502; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_fnan = __pyx_t_18; /* "pandas/src/inference.pyx":504 * fnan = np.nan * * for i from 0 <= i < n: # <<<<<<<<<<<<<< * val = objects[i] * */ __pyx_t_1 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_1; __pyx_v_i++) { /* "pandas/src/inference.pyx":505 * * for i from 0 <= i < n: * val = objects[i] # <<<<<<<<<<<<<< * * if val is None: */ __pyx_t_19 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_19 < 0) { __pyx_t_19 += __pyx_pybuffernd_objects.diminfo[0].shape; if (unlikely(__pyx_t_19 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_19 >= __pyx_pybuffernd_objects.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 505; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_3 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_objects.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_objects.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_3); __Pyx_XDECREF_SET(__pyx_v_val, __pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/inference.pyx":507 * val = objects[i] * * if val is None: # <<<<<<<<<<<<<< * seen_null = 1 * floats[i] = complexes[i] = fnan */ __pyx_t_15 = (__pyx_v_val == Py_None); __pyx_t_20 = (__pyx_t_15 != 0); if (__pyx_t_20) { /* "pandas/src/inference.pyx":508 * * if val is None: * seen_null = 1 # <<<<<<<<<<<<<< * floats[i] = complexes[i] = fnan * elif util.is_bool_object(val): */ __pyx_v_seen_null = 1; /* "pandas/src/inference.pyx":509 * if val is None: * seen_null = 1 * floats[i] = complexes[i] = fnan # <<<<<<<<<<<<<< * elif util.is_bool_object(val): * seen_bool = 1 */ __pyx_t_21 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_21 < 0) { __pyx_t_21 += __pyx_pybuffernd_floats.diminfo[0].shape; if (unlikely(__pyx_t_21 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_21 >= __pyx_pybuffernd_floats.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 509; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_floats.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_floats.diminfo[0].strides) = __pyx_v_fnan; __pyx_t_22 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_22 < 0) { __pyx_t_22 += __pyx_pybuffernd_complexes.diminfo[0].shape; if (unlikely(__pyx_t_22 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_22 >= __pyx_pybuffernd_complexes.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 509; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_double_complex *, __pyx_pybuffernd_complexes.rcbuffer->pybuffer.buf, __pyx_t_22, __pyx_pybuffernd_complexes.diminfo[0].strides) = __pyx_t_double_complex_from_parts(__pyx_v_fnan, 0); goto __pyx_L7; } /* "pandas/src/inference.pyx":510 * seen_null = 1 * floats[i] = complexes[i] = fnan * elif util.is_bool_object(val): # <<<<<<<<<<<<<< * seen_bool = 1 * bools[i] = val */ __pyx_t_20 = (is_bool_object(__pyx_v_val) != 0); if (__pyx_t_20) { /* "pandas/src/inference.pyx":511 * floats[i] = complexes[i] = fnan * elif util.is_bool_object(val): * seen_bool = 1 # <<<<<<<<<<<<<< * bools[i] = val * elif util.is_float_object(val): */ __pyx_v_seen_bool = 1; /* "pandas/src/inference.pyx":512 * elif util.is_bool_object(val): * seen_bool = 1 * bools[i] = val # <<<<<<<<<<<<<< * elif util.is_float_object(val): * floats[i] = complexes[i] = val */ __pyx_t_23 = __Pyx_PyInt_As_npy_uint8(__pyx_v_val); if (unlikely((__pyx_t_23 == (npy_uint8)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 512; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_24 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_24 < 0) { __pyx_t_24 += __pyx_pybuffernd_bools.diminfo[0].shape; if (unlikely(__pyx_t_24 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_24 >= __pyx_pybuffernd_bools.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 512; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_bools.rcbuffer->pybuffer.buf, __pyx_t_24, __pyx_pybuffernd_bools.diminfo[0].strides) = __pyx_t_23; goto __pyx_L7; } /* "pandas/src/inference.pyx":513 * seen_bool = 1 * bools[i] = val * elif util.is_float_object(val): # <<<<<<<<<<<<<< * floats[i] = complexes[i] = val * seen_float = 1 */ __pyx_t_20 = (is_float_object(__pyx_v_val) != 0); if (__pyx_t_20) { /* "pandas/src/inference.pyx":514 * bools[i] = val * elif util.is_float_object(val): * floats[i] = complexes[i] = val # <<<<<<<<<<<<<< * seen_float = 1 * elif util.is_datetime64_object(val): */ __pyx_t_18 = __pyx_PyFloat_AsDouble(__pyx_v_val); if (unlikely((__pyx_t_18 == (npy_float64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 514; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_25 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_25 < 0) { __pyx_t_25 += __pyx_pybuffernd_floats.diminfo[0].shape; if (unlikely(__pyx_t_25 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_25 >= __pyx_pybuffernd_floats.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 514; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_floats.rcbuffer->pybuffer.buf, __pyx_t_25, __pyx_pybuffernd_floats.diminfo[0].strides) = __pyx_t_18; __pyx_t_26 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_v_val); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 514; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_27 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_27 < 0) { __pyx_t_27 += __pyx_pybuffernd_complexes.diminfo[0].shape; if (unlikely(__pyx_t_27 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_27 >= __pyx_pybuffernd_complexes.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 514; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_double_complex *, __pyx_pybuffernd_complexes.rcbuffer->pybuffer.buf, __pyx_t_27, __pyx_pybuffernd_complexes.diminfo[0].strides) = __pyx_t_26; /* "pandas/src/inference.pyx":515 * elif util.is_float_object(val): * floats[i] = complexes[i] = val * seen_float = 1 # <<<<<<<<<<<<<< * elif util.is_datetime64_object(val): * if convert_datetime: */ __pyx_v_seen_float = 1; goto __pyx_L7; } /* "pandas/src/inference.pyx":516 * floats[i] = complexes[i] = val * seen_float = 1 * elif util.is_datetime64_object(val): # <<<<<<<<<<<<<< * if convert_datetime: * idatetimes[i] = convert_to_tsobject(val, None, None).value */ __pyx_t_20 = (is_datetime64_object(__pyx_v_val) != 0); if (__pyx_t_20) { /* "pandas/src/inference.pyx":517 * seen_float = 1 * elif util.is_datetime64_object(val): * if convert_datetime: # <<<<<<<<<<<<<< * idatetimes[i] = convert_to_tsobject(val, None, None).value * seen_datetime = 1 */ __pyx_t_20 = (__pyx_v_convert_datetime != 0); if (__pyx_t_20) { /* "pandas/src/inference.pyx":518 * elif util.is_datetime64_object(val): * if convert_datetime: * idatetimes[i] = convert_to_tsobject(val, None, None).value # <<<<<<<<<<<<<< * seen_datetime = 1 * else: */ __pyx_t_3 = __pyx_f_6pandas_5tslib_convert_to_tsobject(__pyx_v_val, Py_None, Py_None); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 518; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_value); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 518; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_28 = __Pyx_PyInt_As_npy_int64(__pyx_t_4); if (unlikely((__pyx_t_28 == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 518; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_29 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_29 < 0) { __pyx_t_29 += __pyx_pybuffernd_idatetimes.diminfo[0].shape; if (unlikely(__pyx_t_29 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_29 >= __pyx_pybuffernd_idatetimes.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 518; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_idatetimes.rcbuffer->pybuffer.buf, __pyx_t_29, __pyx_pybuffernd_idatetimes.diminfo[0].strides) = __pyx_t_28; /* "pandas/src/inference.pyx":519 * if convert_datetime: * idatetimes[i] = convert_to_tsobject(val, None, None).value * seen_datetime = 1 # <<<<<<<<<<<<<< * else: * seen_object = 1 */ __pyx_v_seen_datetime = 1; goto __pyx_L8; } /*else*/ { /* "pandas/src/inference.pyx":521 * seen_datetime = 1 * else: * seen_object = 1 # <<<<<<<<<<<<<< * # objects[i] = val.astype('O') * break */ __pyx_v_seen_object = 1; /* "pandas/src/inference.pyx":523 * seen_object = 1 * # objects[i] = val.astype('O') * break # <<<<<<<<<<<<<< * elif is_timedelta(val): * if convert_timedelta: */ goto __pyx_L6_break; } __pyx_L8:; goto __pyx_L7; } /* "pandas/src/inference.pyx":524 * # objects[i] = val.astype('O') * break * elif is_timedelta(val): # <<<<<<<<<<<<<< * if convert_timedelta: * itimedeltas[i] = convert_to_timedelta64(val, 'ns', False) */ __pyx_t_20 = (__pyx_f_6pandas_3lib_is_timedelta(__pyx_v_val) != 0); if (__pyx_t_20) { /* "pandas/src/inference.pyx":525 * break * elif is_timedelta(val): * if convert_timedelta: # <<<<<<<<<<<<<< * itimedeltas[i] = convert_to_timedelta64(val, 'ns', False) * seen_timedelta = 1 */ __pyx_t_20 = (__pyx_v_convert_timedelta != 0); if (__pyx_t_20) { /* "pandas/src/inference.pyx":526 * elif is_timedelta(val): * if convert_timedelta: * itimedeltas[i] = convert_to_timedelta64(val, 'ns', False) # <<<<<<<<<<<<<< * seen_timedelta = 1 * else: */ __pyx_t_4 = __pyx_f_6pandas_5tslib_convert_to_timedelta64(__pyx_v_val, __pyx_n_s_ns, Py_False); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 526; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_28 = __Pyx_PyInt_As_npy_int64(__pyx_t_4); if (unlikely((__pyx_t_28 == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 526; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_30 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_30 < 0) { __pyx_t_30 += __pyx_pybuffernd_itimedeltas.diminfo[0].shape; if (unlikely(__pyx_t_30 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_30 >= __pyx_pybuffernd_itimedeltas.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 526; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_itimedeltas.rcbuffer->pybuffer.buf, __pyx_t_30, __pyx_pybuffernd_itimedeltas.diminfo[0].strides) = __pyx_t_28; /* "pandas/src/inference.pyx":527 * if convert_timedelta: * itimedeltas[i] = convert_to_timedelta64(val, 'ns', False) * seen_timedelta = 1 # <<<<<<<<<<<<<< * else: * seen_object = 1 */ __pyx_v_seen_timedelta = 1; goto __pyx_L9; } /*else*/ { /* "pandas/src/inference.pyx":529 * seen_timedelta = 1 * else: * seen_object = 1 # <<<<<<<<<<<<<< * break * elif util.is_integer_object(val): */ __pyx_v_seen_object = 1; /* "pandas/src/inference.pyx":530 * else: * seen_object = 1 * break # <<<<<<<<<<<<<< * elif util.is_integer_object(val): * seen_int = 1 */ goto __pyx_L6_break; } __pyx_L9:; goto __pyx_L7; } /* "pandas/src/inference.pyx":531 * seen_object = 1 * break * elif util.is_integer_object(val): # <<<<<<<<<<<<<< * seen_int = 1 * floats[i] = val */ __pyx_t_20 = (is_integer_object(__pyx_v_val) != 0); if (__pyx_t_20) { /* "pandas/src/inference.pyx":532 * break * elif util.is_integer_object(val): * seen_int = 1 # <<<<<<<<<<<<<< * floats[i] = val * complexes[i] = val */ __pyx_v_seen_int = 1; /* "pandas/src/inference.pyx":533 * elif util.is_integer_object(val): * seen_int = 1 * floats[i] = val # <<<<<<<<<<<<<< * complexes[i] = val * if not seen_null: */ __pyx_t_18 = __pyx_PyFloat_AsDouble(__pyx_v_val); if (unlikely((__pyx_t_18 == (npy_float64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 533; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_31 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_31 < 0) { __pyx_t_31 += __pyx_pybuffernd_floats.diminfo[0].shape; if (unlikely(__pyx_t_31 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_31 >= __pyx_pybuffernd_floats.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 533; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_floats.rcbuffer->pybuffer.buf, __pyx_t_31, __pyx_pybuffernd_floats.diminfo[0].strides) = ((__pyx_t_5numpy_float64_t)__pyx_t_18); /* "pandas/src/inference.pyx":534 * seen_int = 1 * floats[i] = val * complexes[i] = val # <<<<<<<<<<<<<< * if not seen_null: * try: */ __pyx_t_26 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_v_val); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 534; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_32 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_32 < 0) { __pyx_t_32 += __pyx_pybuffernd_complexes.diminfo[0].shape; if (unlikely(__pyx_t_32 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_32 >= __pyx_pybuffernd_complexes.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 534; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_double_complex *, __pyx_pybuffernd_complexes.rcbuffer->pybuffer.buf, __pyx_t_32, __pyx_pybuffernd_complexes.diminfo[0].strides) = __pyx_t_double_complex_from_parts(((double)__Pyx_CREAL(__pyx_t_26)), ((double)__Pyx_CIMAG(__pyx_t_26))); /* "pandas/src/inference.pyx":535 * floats[i] = val * complexes[i] = val * if not seen_null: # <<<<<<<<<<<<<< * try: * ints[i] = val */ __pyx_t_20 = ((!(__pyx_v_seen_null != 0)) != 0); if (__pyx_t_20) { /* "pandas/src/inference.pyx":536 * complexes[i] = val * if not seen_null: * try: # <<<<<<<<<<<<<< * ints[i] = val * except OverflowError: */ { __Pyx_ExceptionSave(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10); __Pyx_XGOTREF(__pyx_t_8); __Pyx_XGOTREF(__pyx_t_9); __Pyx_XGOTREF(__pyx_t_10); /*try:*/ { /* "pandas/src/inference.pyx":537 * if not seen_null: * try: * ints[i] = val # <<<<<<<<<<<<<< * except OverflowError: * seen_object = 1 */ __pyx_t_28 = __Pyx_PyInt_As_npy_int64(__pyx_v_val); if (unlikely((__pyx_t_28 == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 537; __pyx_clineno = __LINE__; goto __pyx_L11_error;} __pyx_t_33 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_33 < 0) { __pyx_t_33 += __pyx_pybuffernd_ints.diminfo[0].shape; if (unlikely(__pyx_t_33 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_33 >= __pyx_pybuffernd_ints.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 537; __pyx_clineno = __LINE__; goto __pyx_L11_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_ints.rcbuffer->pybuffer.buf, __pyx_t_33, __pyx_pybuffernd_ints.diminfo[0].strides) = __pyx_t_28; } __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; goto __pyx_L18_try_end; __pyx_L11_error:; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; /* "pandas/src/inference.pyx":538 * try: * ints[i] = val * except OverflowError: # <<<<<<<<<<<<<< * seen_object = 1 * break */ __pyx_t_7 = PyErr_ExceptionMatches(__pyx_builtin_OverflowError); if (__pyx_t_7) { __Pyx_AddTraceback("pandas.lib.maybe_convert_objects", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_3, &__pyx_t_2) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 538; __pyx_clineno = __LINE__; goto __pyx_L13_except_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_GOTREF(__pyx_t_3); __Pyx_GOTREF(__pyx_t_2); /* "pandas/src/inference.pyx":539 * ints[i] = val * except OverflowError: * seen_object = 1 # <<<<<<<<<<<<<< * break * elif util.is_complex_object(val): */ __pyx_v_seen_object = 1; /* "pandas/src/inference.pyx":540 * except OverflowError: * seen_object = 1 * break # <<<<<<<<<<<<<< * elif util.is_complex_object(val): * complexes[i] = val */ goto __pyx_L19_except_break; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; goto __pyx_L12_exception_handled; __pyx_L19_except_break:; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; goto __pyx_L16_try_break; } goto __pyx_L13_except_error; __pyx_L13_except_error:; __Pyx_XGIVEREF(__pyx_t_8); __Pyx_XGIVEREF(__pyx_t_9); __Pyx_XGIVEREF(__pyx_t_10); __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_9, __pyx_t_10); goto __pyx_L1_error; __pyx_L16_try_break:; __Pyx_XGIVEREF(__pyx_t_8); __Pyx_XGIVEREF(__pyx_t_9); __Pyx_XGIVEREF(__pyx_t_10); __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_9, __pyx_t_10); goto __pyx_L6_break; __pyx_L12_exception_handled:; __Pyx_XGIVEREF(__pyx_t_8); __Pyx_XGIVEREF(__pyx_t_9); __Pyx_XGIVEREF(__pyx_t_10); __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_9, __pyx_t_10); __pyx_L18_try_end:; } goto __pyx_L10; } __pyx_L10:; goto __pyx_L7; } /* "pandas/src/inference.pyx":541 * seen_object = 1 * break * elif util.is_complex_object(val): # <<<<<<<<<<<<<< * complexes[i] = val * seen_complex = 1 */ __pyx_t_20 = (is_complex_object(__pyx_v_val) != 0); if (__pyx_t_20) { /* "pandas/src/inference.pyx":542 * break * elif util.is_complex_object(val): * complexes[i] = val # <<<<<<<<<<<<<< * seen_complex = 1 * elif PyDateTime_Check(val) or util.is_datetime64_object(val): */ __pyx_t_26 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_v_val); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 542; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_34 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_34 < 0) { __pyx_t_34 += __pyx_pybuffernd_complexes.diminfo[0].shape; if (unlikely(__pyx_t_34 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_34 >= __pyx_pybuffernd_complexes.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 542; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_double_complex *, __pyx_pybuffernd_complexes.rcbuffer->pybuffer.buf, __pyx_t_34, __pyx_pybuffernd_complexes.diminfo[0].strides) = __pyx_t_26; /* "pandas/src/inference.pyx":543 * elif util.is_complex_object(val): * complexes[i] = val * seen_complex = 1 # <<<<<<<<<<<<<< * elif PyDateTime_Check(val) or util.is_datetime64_object(val): * if convert_datetime: */ __pyx_v_seen_complex = 1; goto __pyx_L7; } /* "pandas/src/inference.pyx":544 * complexes[i] = val * seen_complex = 1 * elif PyDateTime_Check(val) or util.is_datetime64_object(val): # <<<<<<<<<<<<<< * if convert_datetime: * seen_datetime = 1 */ __pyx_t_20 = PyDateTime_Check(__pyx_v_val); if (!__pyx_t_20) { __pyx_t_15 = (is_datetime64_object(__pyx_v_val) != 0); } else { __pyx_t_15 = __pyx_t_20; } if (__pyx_t_15) { /* "pandas/src/inference.pyx":545 * seen_complex = 1 * elif PyDateTime_Check(val) or util.is_datetime64_object(val): * if convert_datetime: # <<<<<<<<<<<<<< * seen_datetime = 1 * idatetimes[i] = convert_to_tsobject(val, None, None).value */ __pyx_t_15 = (__pyx_v_convert_datetime != 0); if (__pyx_t_15) { /* "pandas/src/inference.pyx":546 * elif PyDateTime_Check(val) or util.is_datetime64_object(val): * if convert_datetime: * seen_datetime = 1 # <<<<<<<<<<<<<< * idatetimes[i] = convert_to_tsobject(val, None, None).value * else: */ __pyx_v_seen_datetime = 1; /* "pandas/src/inference.pyx":547 * if convert_datetime: * seen_datetime = 1 * idatetimes[i] = convert_to_tsobject(val, None, None).value # <<<<<<<<<<<<<< * else: * seen_object = 1 */ __pyx_t_2 = __pyx_f_6pandas_5tslib_convert_to_tsobject(__pyx_v_val, Py_None, Py_None); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 547; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_value); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 547; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_28 = __Pyx_PyInt_As_npy_int64(__pyx_t_3); if (unlikely((__pyx_t_28 == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 547; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_35 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_35 < 0) { __pyx_t_35 += __pyx_pybuffernd_idatetimes.diminfo[0].shape; if (unlikely(__pyx_t_35 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_35 >= __pyx_pybuffernd_idatetimes.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 547; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_idatetimes.rcbuffer->pybuffer.buf, __pyx_t_35, __pyx_pybuffernd_idatetimes.diminfo[0].strides) = __pyx_t_28; goto __pyx_L21; } /*else*/ { /* "pandas/src/inference.pyx":549 * idatetimes[i] = convert_to_tsobject(val, None, None).value * else: * seen_object = 1 # <<<<<<<<<<<<<< * break * elif try_float and not util.is_string_object(val): */ __pyx_v_seen_object = 1; /* "pandas/src/inference.pyx":550 * else: * seen_object = 1 * break # <<<<<<<<<<<<<< * elif try_float and not util.is_string_object(val): * # this will convert Decimal objects */ goto __pyx_L6_break; } __pyx_L21:; goto __pyx_L7; } /* "pandas/src/inference.pyx":551 * seen_object = 1 * break * elif try_float and not util.is_string_object(val): # <<<<<<<<<<<<<< * # this will convert Decimal objects * try: */ if ((__pyx_v_try_float != 0)) { __pyx_t_15 = ((!(is_string_object(__pyx_v_val) != 0)) != 0); __pyx_t_20 = __pyx_t_15; } else { __pyx_t_20 = (__pyx_v_try_float != 0); } if (__pyx_t_20) { /* "pandas/src/inference.pyx":553 * elif try_float and not util.is_string_object(val): * # this will convert Decimal objects * try: # <<<<<<<<<<<<<< * floats[i] = float(val) * complexes[i] = complex(val) */ { __Pyx_ExceptionSave(&__pyx_t_10, &__pyx_t_9, &__pyx_t_8); __Pyx_XGOTREF(__pyx_t_10); __Pyx_XGOTREF(__pyx_t_9); __Pyx_XGOTREF(__pyx_t_8); /*try:*/ { /* "pandas/src/inference.pyx":554 * # this will convert Decimal objects * try: * floats[i] = float(val) # <<<<<<<<<<<<<< * complexes[i] = complex(val) * seen_float = 1 */ __pyx_t_36 = __Pyx_PyObject_AsDouble(__pyx_v_val); if (unlikely(__pyx_t_36 == ((double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 554; __pyx_clineno = __LINE__; goto __pyx_L22_error;} __pyx_t_37 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_37 < 0) { __pyx_t_37 += __pyx_pybuffernd_floats.diminfo[0].shape; if (unlikely(__pyx_t_37 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_37 >= __pyx_pybuffernd_floats.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 554; __pyx_clineno = __LINE__; goto __pyx_L22_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_floats.rcbuffer->pybuffer.buf, __pyx_t_37, __pyx_pybuffernd_floats.diminfo[0].strides) = __pyx_t_36; /* "pandas/src/inference.pyx":555 * try: * floats[i] = float(val) * complexes[i] = complex(val) # <<<<<<<<<<<<<< * seen_float = 1 * except Exception: */ __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 555; __pyx_clineno = __LINE__; goto __pyx_L22_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_v_val); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_val); __Pyx_GIVEREF(__pyx_v_val); __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)(&PyComplex_Type))), __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 555; __pyx_clineno = __LINE__; goto __pyx_L22_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_26 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_2); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 555; __pyx_clineno = __LINE__; goto __pyx_L22_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_38 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_38 < 0) { __pyx_t_38 += __pyx_pybuffernd_complexes.diminfo[0].shape; if (unlikely(__pyx_t_38 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_38 >= __pyx_pybuffernd_complexes.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 555; __pyx_clineno = __LINE__; goto __pyx_L22_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_double_complex *, __pyx_pybuffernd_complexes.rcbuffer->pybuffer.buf, __pyx_t_38, __pyx_pybuffernd_complexes.diminfo[0].strides) = __pyx_t_26; /* "pandas/src/inference.pyx":556 * floats[i] = float(val) * complexes[i] = complex(val) * seen_float = 1 # <<<<<<<<<<<<<< * except Exception: * seen_object = 1 */ __pyx_v_seen_float = 1; } __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; goto __pyx_L29_try_end; __pyx_L22_error:; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/inference.pyx":557 * complexes[i] = complex(val) * seen_float = 1 * except Exception: # <<<<<<<<<<<<<< * seen_object = 1 * break */ __pyx_t_7 = PyErr_ExceptionMatches(__pyx_builtin_Exception); if (__pyx_t_7) { __Pyx_AddTraceback("pandas.lib.maybe_convert_objects", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 557; __pyx_clineno = __LINE__; goto __pyx_L24_except_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_GOTREF(__pyx_t_3); __Pyx_GOTREF(__pyx_t_4); /* "pandas/src/inference.pyx":558 * seen_float = 1 * except Exception: * seen_object = 1 # <<<<<<<<<<<<<< * break * else: */ __pyx_v_seen_object = 1; /* "pandas/src/inference.pyx":559 * except Exception: * seen_object = 1 * break # <<<<<<<<<<<<<< * else: * seen_object = 1 */ goto __pyx_L30_except_break; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; goto __pyx_L23_exception_handled; __pyx_L30_except_break:; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; goto __pyx_L27_try_break; } goto __pyx_L24_except_error; __pyx_L24_except_error:; __Pyx_XGIVEREF(__pyx_t_10); __Pyx_XGIVEREF(__pyx_t_9); __Pyx_XGIVEREF(__pyx_t_8); __Pyx_ExceptionReset(__pyx_t_10, __pyx_t_9, __pyx_t_8); goto __pyx_L1_error; __pyx_L27_try_break:; __Pyx_XGIVEREF(__pyx_t_10); __Pyx_XGIVEREF(__pyx_t_9); __Pyx_XGIVEREF(__pyx_t_8); __Pyx_ExceptionReset(__pyx_t_10, __pyx_t_9, __pyx_t_8); goto __pyx_L6_break; __pyx_L23_exception_handled:; __Pyx_XGIVEREF(__pyx_t_10); __Pyx_XGIVEREF(__pyx_t_9); __Pyx_XGIVEREF(__pyx_t_8); __Pyx_ExceptionReset(__pyx_t_10, __pyx_t_9, __pyx_t_8); __pyx_L29_try_end:; } goto __pyx_L7; } /*else*/ { /* "pandas/src/inference.pyx":561 * break * else: * seen_object = 1 # <<<<<<<<<<<<<< * break * */ __pyx_v_seen_object = 1; /* "pandas/src/inference.pyx":562 * else: * seen_object = 1 * break # <<<<<<<<<<<<<< * * seen_numeric = seen_complex or seen_float or seen_int */ goto __pyx_L6_break; } __pyx_L7:; } __pyx_L6_break:; /* "pandas/src/inference.pyx":564 * break * * seen_numeric = seen_complex or seen_float or seen_int # <<<<<<<<<<<<<< * * if not seen_object: */ if (!__pyx_v_seen_complex) { if (!__pyx_v_seen_float) { __pyx_t_20 = __pyx_v_seen_int; } else { __pyx_t_20 = __pyx_v_seen_float; } __pyx_t_15 = __pyx_t_20; } else { __pyx_t_15 = __pyx_v_seen_complex; } __pyx_v_seen_numeric = __pyx_t_15; /* "pandas/src/inference.pyx":566 * seen_numeric = seen_complex or seen_float or seen_int * * if not seen_object: # <<<<<<<<<<<<<< * * if not safe: */ __pyx_t_15 = ((!(__pyx_v_seen_object != 0)) != 0); if (__pyx_t_15) { /* "pandas/src/inference.pyx":568 * if not seen_object: * * if not safe: # <<<<<<<<<<<<<< * if seen_null: * if not seen_bool and not seen_datetime and not seen_timedelta: */ __pyx_t_15 = ((!(__pyx_v_safe != 0)) != 0); if (__pyx_t_15) { /* "pandas/src/inference.pyx":569 * * if not safe: * if seen_null: # <<<<<<<<<<<<<< * if not seen_bool and not seen_datetime and not seen_timedelta: * if seen_complex: */ __pyx_t_15 = (__pyx_v_seen_null != 0); if (__pyx_t_15) { /* "pandas/src/inference.pyx":570 * if not safe: * if seen_null: * if not seen_bool and not seen_datetime and not seen_timedelta: # <<<<<<<<<<<<<< * if seen_complex: * return complexes */ __pyx_t_15 = ((!(__pyx_v_seen_bool != 0)) != 0); if (__pyx_t_15) { __pyx_t_20 = ((!(__pyx_v_seen_datetime != 0)) != 0); if (__pyx_t_20) { __pyx_t_39 = ((!(__pyx_v_seen_timedelta != 0)) != 0); __pyx_t_40 = __pyx_t_39; } else { __pyx_t_40 = __pyx_t_20; } __pyx_t_20 = __pyx_t_40; } else { __pyx_t_20 = __pyx_t_15; } if (__pyx_t_20) { /* "pandas/src/inference.pyx":571 * if seen_null: * if not seen_bool and not seen_datetime and not seen_timedelta: * if seen_complex: # <<<<<<<<<<<<<< * return complexes * elif seen_float or seen_int: */ __pyx_t_20 = (__pyx_v_seen_complex != 0); if (__pyx_t_20) { /* "pandas/src/inference.pyx":572 * if not seen_bool and not seen_datetime and not seen_timedelta: * if seen_complex: * return complexes # <<<<<<<<<<<<<< * elif seen_float or seen_int: * return floats */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_complexes)); __pyx_r = ((PyObject *)__pyx_v_complexes); goto __pyx_L0; } /* "pandas/src/inference.pyx":573 * if seen_complex: * return complexes * elif seen_float or seen_int: # <<<<<<<<<<<<<< * return floats * else: */ if (!(__pyx_v_seen_float != 0)) { __pyx_t_20 = (__pyx_v_seen_int != 0); } else { __pyx_t_20 = (__pyx_v_seen_float != 0); } if (__pyx_t_20) { /* "pandas/src/inference.pyx":574 * return complexes * elif seen_float or seen_int: * return floats # <<<<<<<<<<<<<< * else: * if not seen_bool: */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_floats)); __pyx_r = ((PyObject *)__pyx_v_floats); goto __pyx_L0; } goto __pyx_L35; } __pyx_L35:; goto __pyx_L34; } /*else*/ { /* "pandas/src/inference.pyx":576 * return floats * else: * if not seen_bool: # <<<<<<<<<<<<<< * if seen_datetime: * if not seen_numeric: */ __pyx_t_20 = ((!(__pyx_v_seen_bool != 0)) != 0); if (__pyx_t_20) { /* "pandas/src/inference.pyx":577 * else: * if not seen_bool: * if seen_datetime: # <<<<<<<<<<<<<< * if not seen_numeric: * return datetimes */ __pyx_t_20 = (__pyx_v_seen_datetime != 0); if (__pyx_t_20) { /* "pandas/src/inference.pyx":578 * if not seen_bool: * if seen_datetime: * if not seen_numeric: # <<<<<<<<<<<<<< * return datetimes * elif seen_timedelta: */ __pyx_t_20 = ((!(__pyx_v_seen_numeric != 0)) != 0); if (__pyx_t_20) { /* "pandas/src/inference.pyx":579 * if seen_datetime: * if not seen_numeric: * return datetimes # <<<<<<<<<<<<<< * elif seen_timedelta: * if not seen_numeric: */ __Pyx_XDECREF(__pyx_r); if (unlikely(!__pyx_v_datetimes)) { __Pyx_RaiseUnboundLocalError("datetimes"); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 579; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __Pyx_INCREF(__pyx_v_datetimes); __pyx_r = __pyx_v_datetimes; goto __pyx_L0; } goto __pyx_L38; } /* "pandas/src/inference.pyx":580 * if not seen_numeric: * return datetimes * elif seen_timedelta: # <<<<<<<<<<<<<< * if not seen_numeric: * return timedeltas */ __pyx_t_20 = (__pyx_v_seen_timedelta != 0); if (__pyx_t_20) { /* "pandas/src/inference.pyx":581 * return datetimes * elif seen_timedelta: * if not seen_numeric: # <<<<<<<<<<<<<< * return timedeltas * else: */ __pyx_t_20 = ((!(__pyx_v_seen_numeric != 0)) != 0); if (__pyx_t_20) { /* "pandas/src/inference.pyx":582 * elif seen_timedelta: * if not seen_numeric: * return timedeltas # <<<<<<<<<<<<<< * else: * if seen_complex: */ __Pyx_XDECREF(__pyx_r); if (unlikely(!__pyx_v_timedeltas)) { __Pyx_RaiseUnboundLocalError("timedeltas"); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 582; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __Pyx_INCREF(__pyx_v_timedeltas); __pyx_r = __pyx_v_timedeltas; goto __pyx_L0; } goto __pyx_L38; } /*else*/ { /* "pandas/src/inference.pyx":584 * return timedeltas * else: * if seen_complex: # <<<<<<<<<<<<<< * return complexes * elif seen_float: */ __pyx_t_20 = (__pyx_v_seen_complex != 0); if (__pyx_t_20) { /* "pandas/src/inference.pyx":585 * else: * if seen_complex: * return complexes # <<<<<<<<<<<<<< * elif seen_float: * return floats */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_complexes)); __pyx_r = ((PyObject *)__pyx_v_complexes); goto __pyx_L0; } /* "pandas/src/inference.pyx":586 * if seen_complex: * return complexes * elif seen_float: # <<<<<<<<<<<<<< * return floats * elif seen_int: */ __pyx_t_20 = (__pyx_v_seen_float != 0); if (__pyx_t_20) { /* "pandas/src/inference.pyx":587 * return complexes * elif seen_float: * return floats # <<<<<<<<<<<<<< * elif seen_int: * return ints */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_floats)); __pyx_r = ((PyObject *)__pyx_v_floats); goto __pyx_L0; } /* "pandas/src/inference.pyx":588 * elif seen_float: * return floats * elif seen_int: # <<<<<<<<<<<<<< * return ints * elif not seen_datetime and not seen_numeric and not seen_timedelta: */ __pyx_t_20 = (__pyx_v_seen_int != 0); if (__pyx_t_20) { /* "pandas/src/inference.pyx":589 * return floats * elif seen_int: * return ints # <<<<<<<<<<<<<< * elif not seen_datetime and not seen_numeric and not seen_timedelta: * return bools.view(np.bool_) */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_ints)); __pyx_r = ((PyObject *)__pyx_v_ints); goto __pyx_L0; } } __pyx_L38:; goto __pyx_L37; } /* "pandas/src/inference.pyx":590 * elif seen_int: * return ints * elif not seen_datetime and not seen_numeric and not seen_timedelta: # <<<<<<<<<<<<<< * return bools.view(np.bool_) * */ __pyx_t_20 = ((!(__pyx_v_seen_datetime != 0)) != 0); if (__pyx_t_20) { __pyx_t_15 = ((!(__pyx_v_seen_numeric != 0)) != 0); if (__pyx_t_15) { __pyx_t_40 = ((!(__pyx_v_seen_timedelta != 0)) != 0); __pyx_t_39 = __pyx_t_40; } else { __pyx_t_39 = __pyx_t_15; } __pyx_t_15 = __pyx_t_39; } else { __pyx_t_15 = __pyx_t_20; } if (__pyx_t_15) { /* "pandas/src/inference.pyx":591 * return ints * elif not seen_datetime and not seen_numeric and not seen_timedelta: * return bools.view(np.bool_) # <<<<<<<<<<<<<< * * else: */ __Pyx_XDECREF(__pyx_r); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_bools), __pyx_n_s_view); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 591; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 591; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_bool); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 591; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 591; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_Call(__pyx_t_4, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 591; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; } __pyx_L37:; } __pyx_L34:; goto __pyx_L33; } /*else*/ { /* "pandas/src/inference.pyx":595 * else: * # don't cast int to float, etc. * if seen_null: # <<<<<<<<<<<<<< * if not seen_bool and not seen_datetime and not seen_timedelta: * if seen_complex: */ __pyx_t_15 = (__pyx_v_seen_null != 0); if (__pyx_t_15) { /* "pandas/src/inference.pyx":596 * # don't cast int to float, etc. * if seen_null: * if not seen_bool and not seen_datetime and not seen_timedelta: # <<<<<<<<<<<<<< * if seen_complex: * if not seen_int: */ __pyx_t_15 = ((!(__pyx_v_seen_bool != 0)) != 0); if (__pyx_t_15) { __pyx_t_20 = ((!(__pyx_v_seen_datetime != 0)) != 0); if (__pyx_t_20) { __pyx_t_39 = ((!(__pyx_v_seen_timedelta != 0)) != 0); __pyx_t_40 = __pyx_t_39; } else { __pyx_t_40 = __pyx_t_20; } __pyx_t_20 = __pyx_t_40; } else { __pyx_t_20 = __pyx_t_15; } if (__pyx_t_20) { /* "pandas/src/inference.pyx":597 * if seen_null: * if not seen_bool and not seen_datetime and not seen_timedelta: * if seen_complex: # <<<<<<<<<<<<<< * if not seen_int: * return complexes */ __pyx_t_20 = (__pyx_v_seen_complex != 0); if (__pyx_t_20) { /* "pandas/src/inference.pyx":598 * if not seen_bool and not seen_datetime and not seen_timedelta: * if seen_complex: * if not seen_int: # <<<<<<<<<<<<<< * return complexes * elif seen_float: */ __pyx_t_20 = ((!(__pyx_v_seen_int != 0)) != 0); if (__pyx_t_20) { /* "pandas/src/inference.pyx":599 * if seen_complex: * if not seen_int: * return complexes # <<<<<<<<<<<<<< * elif seen_float: * if not seen_int: */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_complexes)); __pyx_r = ((PyObject *)__pyx_v_complexes); goto __pyx_L0; } goto __pyx_L44; } /* "pandas/src/inference.pyx":600 * if not seen_int: * return complexes * elif seen_float: # <<<<<<<<<<<<<< * if not seen_int: * return floats */ __pyx_t_20 = (__pyx_v_seen_float != 0); if (__pyx_t_20) { /* "pandas/src/inference.pyx":601 * return complexes * elif seen_float: * if not seen_int: # <<<<<<<<<<<<<< * return floats * else: */ __pyx_t_20 = ((!(__pyx_v_seen_int != 0)) != 0); if (__pyx_t_20) { /* "pandas/src/inference.pyx":602 * elif seen_float: * if not seen_int: * return floats # <<<<<<<<<<<<<< * else: * if not seen_bool: */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_floats)); __pyx_r = ((PyObject *)__pyx_v_floats); goto __pyx_L0; } goto __pyx_L44; } __pyx_L44:; goto __pyx_L43; } __pyx_L43:; goto __pyx_L42; } /*else*/ { /* "pandas/src/inference.pyx":604 * return floats * else: * if not seen_bool: # <<<<<<<<<<<<<< * if seen_datetime: * if not seen_numeric: */ __pyx_t_20 = ((!(__pyx_v_seen_bool != 0)) != 0); if (__pyx_t_20) { /* "pandas/src/inference.pyx":605 * else: * if not seen_bool: * if seen_datetime: # <<<<<<<<<<<<<< * if not seen_numeric: * return datetimes */ __pyx_t_20 = (__pyx_v_seen_datetime != 0); if (__pyx_t_20) { /* "pandas/src/inference.pyx":606 * if not seen_bool: * if seen_datetime: * if not seen_numeric: # <<<<<<<<<<<<<< * return datetimes * elif seen_timedelta: */ __pyx_t_20 = ((!(__pyx_v_seen_numeric != 0)) != 0); if (__pyx_t_20) { /* "pandas/src/inference.pyx":607 * if seen_datetime: * if not seen_numeric: * return datetimes # <<<<<<<<<<<<<< * elif seen_timedelta: * if not seen_numeric: */ __Pyx_XDECREF(__pyx_r); if (unlikely(!__pyx_v_datetimes)) { __Pyx_RaiseUnboundLocalError("datetimes"); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 607; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __Pyx_INCREF(__pyx_v_datetimes); __pyx_r = __pyx_v_datetimes; goto __pyx_L0; } goto __pyx_L48; } /* "pandas/src/inference.pyx":608 * if not seen_numeric: * return datetimes * elif seen_timedelta: # <<<<<<<<<<<<<< * if not seen_numeric: * return timedeltas */ __pyx_t_20 = (__pyx_v_seen_timedelta != 0); if (__pyx_t_20) { /* "pandas/src/inference.pyx":609 * return datetimes * elif seen_timedelta: * if not seen_numeric: # <<<<<<<<<<<<<< * return timedeltas * else: */ __pyx_t_20 = ((!(__pyx_v_seen_numeric != 0)) != 0); if (__pyx_t_20) { /* "pandas/src/inference.pyx":610 * elif seen_timedelta: * if not seen_numeric: * return timedeltas # <<<<<<<<<<<<<< * else: * if seen_complex: */ __Pyx_XDECREF(__pyx_r); if (unlikely(!__pyx_v_timedeltas)) { __Pyx_RaiseUnboundLocalError("timedeltas"); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 610; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __Pyx_INCREF(__pyx_v_timedeltas); __pyx_r = __pyx_v_timedeltas; goto __pyx_L0; } goto __pyx_L48; } /*else*/ { /* "pandas/src/inference.pyx":612 * return timedeltas * else: * if seen_complex: # <<<<<<<<<<<<<< * if not seen_int: * return complexes */ __pyx_t_20 = (__pyx_v_seen_complex != 0); if (__pyx_t_20) { /* "pandas/src/inference.pyx":613 * else: * if seen_complex: * if not seen_int: # <<<<<<<<<<<<<< * return complexes * elif seen_float: */ __pyx_t_20 = ((!(__pyx_v_seen_int != 0)) != 0); if (__pyx_t_20) { /* "pandas/src/inference.pyx":614 * if seen_complex: * if not seen_int: * return complexes # <<<<<<<<<<<<<< * elif seen_float: * if not seen_int: */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_complexes)); __pyx_r = ((PyObject *)__pyx_v_complexes); goto __pyx_L0; } goto __pyx_L51; } /* "pandas/src/inference.pyx":615 * if not seen_int: * return complexes * elif seen_float: # <<<<<<<<<<<<<< * if not seen_int: * return floats */ __pyx_t_20 = (__pyx_v_seen_float != 0); if (__pyx_t_20) { /* "pandas/src/inference.pyx":616 * return complexes * elif seen_float: * if not seen_int: # <<<<<<<<<<<<<< * return floats * elif seen_int: */ __pyx_t_20 = ((!(__pyx_v_seen_int != 0)) != 0); if (__pyx_t_20) { /* "pandas/src/inference.pyx":617 * elif seen_float: * if not seen_int: * return floats # <<<<<<<<<<<<<< * elif seen_int: * return ints */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_floats)); __pyx_r = ((PyObject *)__pyx_v_floats); goto __pyx_L0; } goto __pyx_L51; } /* "pandas/src/inference.pyx":618 * if not seen_int: * return floats * elif seen_int: # <<<<<<<<<<<<<< * return ints * elif not seen_datetime and not seen_numeric and not seen_timedelta: */ __pyx_t_20 = (__pyx_v_seen_int != 0); if (__pyx_t_20) { /* "pandas/src/inference.pyx":619 * return floats * elif seen_int: * return ints # <<<<<<<<<<<<<< * elif not seen_datetime and not seen_numeric and not seen_timedelta: * return bools.view(np.bool_) */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_ints)); __pyx_r = ((PyObject *)__pyx_v_ints); goto __pyx_L0; } __pyx_L51:; } __pyx_L48:; goto __pyx_L47; } /* "pandas/src/inference.pyx":620 * elif seen_int: * return ints * elif not seen_datetime and not seen_numeric and not seen_timedelta: # <<<<<<<<<<<<<< * return bools.view(np.bool_) * */ __pyx_t_20 = ((!(__pyx_v_seen_datetime != 0)) != 0); if (__pyx_t_20) { __pyx_t_15 = ((!(__pyx_v_seen_numeric != 0)) != 0); if (__pyx_t_15) { __pyx_t_40 = ((!(__pyx_v_seen_timedelta != 0)) != 0); __pyx_t_39 = __pyx_t_40; } else { __pyx_t_39 = __pyx_t_15; } __pyx_t_15 = __pyx_t_39; } else { __pyx_t_15 = __pyx_t_20; } if (__pyx_t_15) { /* "pandas/src/inference.pyx":621 * return ints * elif not seen_datetime and not seen_numeric and not seen_timedelta: * return bools.view(np.bool_) # <<<<<<<<<<<<<< * * return objects */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_bools), __pyx_n_s_view); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 621; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 621; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_bool); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 621; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 621; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyObject_Call(__pyx_t_2, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 621; __pyx_clineno = __LINE__; goto __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_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; } __pyx_L47:; } __pyx_L42:; } __pyx_L33:; goto __pyx_L32; } __pyx_L32:; /* "pandas/src/inference.pyx":623 * return bools.view(np.bool_) * * return objects # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_objects)); __pyx_r = ((PyObject *)__pyx_v_objects); goto __pyx_L0; /* "pandas/src/inference.pyx":461 * return ints * * def maybe_convert_objects(ndarray[object] objects, bint try_float=0, # <<<<<<<<<<<<<< * bint safe=0, bint convert_datetime=0, bint convert_timedelta=0): * ''' */ /* 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_13); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_bools.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_complexes.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_floats.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_idatetimes.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_ints.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_itimedeltas.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_objects.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.lib.maybe_convert_objects", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_bools.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_complexes.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_floats.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_idatetimes.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_ints.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_itimedeltas.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_objects.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_floats); __Pyx_XDECREF((PyObject *)__pyx_v_complexes); __Pyx_XDECREF((PyObject *)__pyx_v_ints); __Pyx_XDECREF((PyObject *)__pyx_v_bools); __Pyx_XDECREF((PyObject *)__pyx_v_idatetimes); __Pyx_XDECREF((PyObject *)__pyx_v_itimedeltas); __Pyx_XDECREF(__pyx_v_val); __Pyx_XDECREF(__pyx_v_onan); __Pyx_XDECREF(__pyx_v_datetimes); __Pyx_XDECREF(__pyx_v_timedeltas); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/inference.pyx":626 * * * def convert_sql_column(x): # <<<<<<<<<<<<<< * return maybe_convert_objects(x, try_float=1) * */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_3lib_145convert_sql_column(PyObject *__pyx_self, PyObject *__pyx_v_x); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_3lib_145convert_sql_column = {__Pyx_NAMESTR("convert_sql_column"), (PyCFunction)__pyx_pw_6pandas_3lib_145convert_sql_column, METH_O, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_3lib_145convert_sql_column(PyObject *__pyx_self, PyObject *__pyx_v_x) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("convert_sql_column (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_3lib_144convert_sql_column(__pyx_self, ((PyObject *)__pyx_v_x)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_3lib_144convert_sql_column(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_x) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("convert_sql_column", 0); /* "pandas/src/inference.pyx":627 * * def convert_sql_column(x): * return maybe_convert_objects(x, try_float=1) # <<<<<<<<<<<<<< * * def try_parse_dates(ndarray[object] values, parser=None, */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_maybe_convert_objects); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 627; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 627; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_x); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_x); __Pyx_GIVEREF(__pyx_v_x); __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 627; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_try_float, __pyx_int_1) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 627; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_4 = PyObject_Call(__pyx_t_1, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 627; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; /* "pandas/src/inference.pyx":626 * * * def convert_sql_column(x): # <<<<<<<<<<<<<< * return maybe_convert_objects(x, try_float=1) * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("pandas.lib.convert_sql_column", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/inference.pyx":629 * return maybe_convert_objects(x, try_float=1) * * def try_parse_dates(ndarray[object] values, parser=None, # <<<<<<<<<<<<<< * dayfirst=False,default=None): * cdef: */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_3lib_147try_parse_dates(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_3lib_147try_parse_dates = {__Pyx_NAMESTR("try_parse_dates"), (PyCFunction)__pyx_pw_6pandas_3lib_147try_parse_dates, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_3lib_147try_parse_dates(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_values = 0; PyObject *__pyx_v_parser = 0; PyObject *__pyx_v_dayfirst = 0; PyObject *__pyx_v_default = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("try_parse_dates (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_values,&__pyx_n_s_parser,&__pyx_n_s_dayfirst,&__pyx_n_s_default,0}; PyObject* values[4] = {0,0,0,0}; values[1] = ((PyObject *)Py_None); /* "pandas/src/inference.pyx":630 * * def try_parse_dates(ndarray[object] values, parser=None, * dayfirst=False,default=None): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n */ values[2] = ((PyObject *)Py_False); values[3] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_values)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_parser); if (value) { values[1] = value; kw_args--; } } case 2: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_dayfirst); if (value) { values[2] = value; kw_args--; } } case 3: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_default); if (value) { values[3] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "try_parse_dates") < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 629; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_values = ((PyArrayObject *)values[0]); __pyx_v_parser = values[1]; __pyx_v_dayfirst = values[2]; __pyx_v_default = values[3]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("try_parse_dates", 0, 1, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 629; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.lib.try_parse_dates", __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_filename = __pyx_f[1]; __pyx_lineno = 629; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_3lib_146try_parse_dates(__pyx_self, __pyx_v_values, __pyx_v_parser, __pyx_v_dayfirst, __pyx_v_default); /* "pandas/src/inference.pyx":629 * return maybe_convert_objects(x, try_float=1) * * def try_parse_dates(ndarray[object] values, parser=None, # <<<<<<<<<<<<<< * dayfirst=False,default=None): * cdef: */ /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/inference.pyx":647 * parse_date = lambda x: parse(x, dayfirst=dayfirst,default=default) * except ImportError: # pragma: no cover * def parse_date(s): # <<<<<<<<<<<<<< * try: * return datetime.strptime(s, '%m/%d/%Y') */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_3lib_15try_parse_dates_1parse_date(PyObject *__pyx_self, PyObject *__pyx_v_s); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_3lib_15try_parse_dates_1parse_date = {__Pyx_NAMESTR("parse_date"), (PyCFunction)__pyx_pw_6pandas_3lib_15try_parse_dates_1parse_date, METH_O, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_3lib_15try_parse_dates_1parse_date(PyObject *__pyx_self, PyObject *__pyx_v_s) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("parse_date (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_3lib_15try_parse_dates_parse_date(__pyx_self, ((PyObject *)__pyx_v_s)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_3lib_15try_parse_dates_parse_date(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_s) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; int __pyx_t_7; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("parse_date", 0); /* "pandas/src/inference.pyx":648 * except ImportError: # pragma: no cover * def parse_date(s): * try: # <<<<<<<<<<<<<< * return datetime.strptime(s, '%m/%d/%Y') * except Exception: */ { __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:*/ { /* "pandas/src/inference.pyx":649 * def parse_date(s): * try: * return datetime.strptime(s, '%m/%d/%Y') # <<<<<<<<<<<<<< * except Exception: * return s */ __Pyx_XDECREF(__pyx_r); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)((PyObject*)__pyx_ptype_8datetime_datetime)), __pyx_n_s_strptime); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 649; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 649; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_v_s); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_s); __Pyx_GIVEREF(__pyx_v_s); __Pyx_INCREF(__pyx_kp_s_m_d_Y); PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_kp_s_m_d_Y); __Pyx_GIVEREF(__pyx_kp_s_m_d_Y); __pyx_t_6 = PyObject_Call(__pyx_t_4, __pyx_t_5, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 649; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_r = __pyx_t_6; __pyx_t_6 = 0; goto __pyx_L7_try_return; } __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L10_try_end; __pyx_L3_error:; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; /* "pandas/src/inference.pyx":650 * try: * return datetime.strptime(s, '%m/%d/%Y') * except Exception: # <<<<<<<<<<<<<< * return s * # EAFP here */ __pyx_t_7 = PyErr_ExceptionMatches(__pyx_builtin_Exception); if (__pyx_t_7) { __Pyx_AddTraceback("pandas.lib.try_parse_dates.parse_date", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_5, &__pyx_t_4) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 650; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_GOTREF(__pyx_t_5); __Pyx_GOTREF(__pyx_t_4); /* "pandas/src/inference.pyx":651 * return datetime.strptime(s, '%m/%d/%Y') * except Exception: * return s # <<<<<<<<<<<<<< * # EAFP here * try: */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_s); __pyx_r = __pyx_v_s; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; goto __pyx_L6_except_return; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; goto __pyx_L4_exception_handled; } goto __pyx_L5_except_error; __pyx_L5_except_error:; __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); goto __pyx_L1_error; __pyx_L7_try_return:; __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); goto __pyx_L0; __pyx_L6_except_return:; __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); goto __pyx_L0; __pyx_L4_exception_handled:; __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); __pyx_L10_try_end:; } /* "pandas/src/inference.pyx":647 * parse_date = lambda x: parse(x, dayfirst=dayfirst,default=default) * except ImportError: # pragma: no cover * def parse_date(s): # <<<<<<<<<<<<<< * try: * return datetime.strptime(s, '%m/%d/%Y') */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("pandas.lib.try_parse_dates.parse_date", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/inference.pyx":645 * try: * from dateutil.parser import parse * parse_date = lambda x: parse(x, dayfirst=dayfirst,default=default) # <<<<<<<<<<<<<< * except ImportError: # pragma: no cover * def parse_date(s): */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_3lib_15try_parse_dates_2lambda1(PyObject *__pyx_self, PyObject *__pyx_v_x); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_3lib_15try_parse_dates_2lambda1 = {__Pyx_NAMESTR("lambda1"), (PyCFunction)__pyx_pw_6pandas_3lib_15try_parse_dates_2lambda1, METH_O, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_3lib_15try_parse_dates_2lambda1(PyObject *__pyx_self, PyObject *__pyx_v_x) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("lambda1 (wrapper)", 0); __pyx_r = __pyx_lambda_funcdef_lambda1(__pyx_self, ((PyObject *)__pyx_v_x)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_lambda_funcdef_lambda1(PyObject *__pyx_self, PyObject *__pyx_v_x) { struct __pyx_obj_6pandas_3lib___pyx_scope_struct__try_parse_dates *__pyx_cur_scope; struct __pyx_obj_6pandas_3lib___pyx_scope_struct__try_parse_dates *__pyx_outer_scope; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("lambda1", 0); __pyx_outer_scope = (struct __pyx_obj_6pandas_3lib___pyx_scope_struct__try_parse_dates *) __Pyx_CyFunction_GetClosure(__pyx_self); __pyx_cur_scope = __pyx_outer_scope; __Pyx_XDECREF(__pyx_r); if (unlikely(!__pyx_cur_scope->__pyx_v_parse)) { __Pyx_RaiseClosureNameError("parse"); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 645; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 645; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_x); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_x); __Pyx_GIVEREF(__pyx_v_x); __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 645; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (unlikely(!__pyx_cur_scope->__pyx_v_dayfirst)) { __Pyx_RaiseClosureNameError("dayfirst"); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 645; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_dayfirst, __pyx_cur_scope->__pyx_v_dayfirst) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 645; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__pyx_cur_scope->__pyx_v_default)) { __Pyx_RaiseClosureNameError("default"); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 645; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_default, __pyx_cur_scope->__pyx_v_default) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 645; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_3 = PyObject_Call(__pyx_cur_scope->__pyx_v_parse, __pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 645; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("pandas.lib.try_parse_dates.lambda1", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/inference.pyx":629 * return maybe_convert_objects(x, try_float=1) * * def try_parse_dates(ndarray[object] values, parser=None, # <<<<<<<<<<<<<< * dayfirst=False,default=None): * cdef: */ static PyObject *__pyx_pf_6pandas_3lib_146try_parse_dates(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyObject *__pyx_v_parser, PyObject *__pyx_v_dayfirst, PyObject *__pyx_v_default) { struct __pyx_obj_6pandas_3lib___pyx_scope_struct__try_parse_dates *__pyx_cur_scope; Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_n; PyArrayObject *__pyx_v_result = 0; PyObject *__pyx_v_date = NULL; PyObject *__pyx_v_parse_date = NULL; __Pyx_LocalBuf_ND __pyx_pybuffernd_result; __Pyx_Buffer __pyx_pybuffer_result; __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; PyArrayObject *__pyx_t_6 = NULL; int __pyx_t_7; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; int __pyx_t_11; int __pyx_t_12; Py_ssize_t __pyx_t_13; Py_ssize_t __pyx_t_14; PyObject **__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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("try_parse_dates", 0); __pyx_cur_scope = (struct __pyx_obj_6pandas_3lib___pyx_scope_struct__try_parse_dates *)__pyx_tp_new_6pandas_3lib___pyx_scope_struct__try_parse_dates(__pyx_ptype_6pandas_3lib___pyx_scope_struct__try_parse_dates, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_cur_scope)) { __Pyx_RefNannyFinishContext(); return NULL; } __Pyx_GOTREF(__pyx_cur_scope); __pyx_cur_scope->__pyx_v_dayfirst = __pyx_v_dayfirst; __Pyx_INCREF(__pyx_cur_scope->__pyx_v_dayfirst); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_dayfirst); __pyx_cur_scope->__pyx_v_default = __pyx_v_default; __Pyx_INCREF(__pyx_cur_scope->__pyx_v_default); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_default); __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_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_filename = __pyx_f[1]; __pyx_lineno = 629; __pyx_clineno = __LINE__; goto __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/src/inference.pyx":635 * ndarray[object] result * * n = len(values) # <<<<<<<<<<<<<< * result = np.empty(n, dtype='O') * */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 635; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/src/inference.pyx":636 * * n = len(values) * result = np.empty(n, dtype='O') # <<<<<<<<<<<<<< * * if parser is None: */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 636; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 636; __pyx_clineno = __LINE__; goto __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_n); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 636; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 636; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 636; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_dtype, __pyx_n_s_O) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 636; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_5 = PyObject_Call(__pyx_t_3, __pyx_t_4, __pyx_t_2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 636; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 636; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_6 = ((PyArrayObject *)__pyx_t_5); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_object, 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_result.rcbuffer->pybuffer, (PyObject*)__pyx_v_result, &__Pyx_TypeInfo_object, 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_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_7 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 636; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_6 = 0; __pyx_v_result = ((PyArrayObject *)__pyx_t_5); __pyx_t_5 = 0; /* "pandas/src/inference.pyx":638 * result = np.empty(n, dtype='O') * * if parser is None: # <<<<<<<<<<<<<< * if default is None: # GH2618 * date=datetime.now() */ __pyx_t_11 = (__pyx_v_parser == Py_None); __pyx_t_12 = (__pyx_t_11 != 0); if (__pyx_t_12) { /* "pandas/src/inference.pyx":639 * * if parser is None: * if default is None: # GH2618 # <<<<<<<<<<<<<< * date=datetime.now() * default=datetime(date.year,date.month,1) */ __pyx_t_12 = (__pyx_cur_scope->__pyx_v_default == Py_None); __pyx_t_11 = (__pyx_t_12 != 0); if (__pyx_t_11) { /* "pandas/src/inference.pyx":640 * if parser is None: * if default is None: # GH2618 * date=datetime.now() # <<<<<<<<<<<<<< * default=datetime(date.year,date.month,1) * */ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)((PyObject*)__pyx_ptype_8datetime_datetime)), __pyx_n_s_now); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 640; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_2 = PyObject_Call(__pyx_t_5, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 640; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_v_date = __pyx_t_2; __pyx_t_2 = 0; /* "pandas/src/inference.pyx":641 * if default is None: # GH2618 * date=datetime.now() * default=datetime(date.year,date.month,1) # <<<<<<<<<<<<<< * * try: */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_date, __pyx_n_s_year); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 641; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_date, __pyx_n_s_month); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 641; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 641; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __Pyx_INCREF(__pyx_int_1); PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_int_1); __Pyx_GIVEREF(__pyx_int_1); __pyx_t_2 = 0; __pyx_t_5 = 0; __pyx_t_5 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_8datetime_datetime)), __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 641; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_default); __Pyx_DECREF_SET(__pyx_cur_scope->__pyx_v_default, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __pyx_t_5 = 0; goto __pyx_L4; } __pyx_L4:; /* "pandas/src/inference.pyx":643 * default=datetime(date.year,date.month,1) * * try: # <<<<<<<<<<<<<< * from dateutil.parser import parse * parse_date = lambda x: parse(x, dayfirst=dayfirst,default=default) */ { __Pyx_ExceptionSave(&__pyx_t_10, &__pyx_t_9, &__pyx_t_8); __Pyx_XGOTREF(__pyx_t_10); __Pyx_XGOTREF(__pyx_t_9); __Pyx_XGOTREF(__pyx_t_8); /*try:*/ { /* "pandas/src/inference.pyx":644 * * try: * from dateutil.parser import parse # <<<<<<<<<<<<<< * parse_date = lambda x: parse(x, dayfirst=dayfirst,default=default) * except ImportError: # pragma: no cover */ __pyx_t_5 = PyList_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 644; __pyx_clineno = __LINE__; goto __pyx_L5_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_n_s_parse); PyList_SET_ITEM(__pyx_t_5, 0, __pyx_n_s_parse); __Pyx_GIVEREF(__pyx_n_s_parse); __pyx_t_4 = __Pyx_Import(__pyx_n_s_dateutil_parser, __pyx_t_5, -1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 644; __pyx_clineno = __LINE__; goto __pyx_L5_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_ImportFrom(__pyx_t_4, __pyx_n_s_parse); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 644; __pyx_clineno = __LINE__; goto __pyx_L5_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __pyx_cur_scope->__pyx_v_parse = __pyx_t_5; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "pandas/src/inference.pyx":645 * try: * from dateutil.parser import parse * parse_date = lambda x: parse(x, dayfirst=dayfirst,default=default) # <<<<<<<<<<<<<< * except ImportError: # pragma: no cover * def parse_date(s): */ __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6pandas_3lib_15try_parse_dates_2lambda1, 0, __pyx_n_s_try_parse_dates_locals_lambda, ((PyObject*)__pyx_cur_scope), __pyx_n_s_pandas_lib, PyModule_GetDict(__pyx_m), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 645; __pyx_clineno = __LINE__; goto __pyx_L5_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_v_parse_date = __pyx_t_4; __pyx_t_4 = 0; } __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; goto __pyx_L12_try_end; __pyx_L5_error:; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; /* "pandas/src/inference.pyx":646 * from dateutil.parser import parse * parse_date = lambda x: parse(x, dayfirst=dayfirst,default=default) * except ImportError: # pragma: no cover # <<<<<<<<<<<<<< * def parse_date(s): * try: */ __pyx_t_7 = PyErr_ExceptionMatches(__pyx_builtin_ImportError); if (__pyx_t_7) { __Pyx_AddTraceback("pandas.lib.try_parse_dates", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_5, &__pyx_t_2) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 646; __pyx_clineno = __LINE__; goto __pyx_L7_except_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_GOTREF(__pyx_t_5); __Pyx_GOTREF(__pyx_t_2); /* "pandas/src/inference.pyx":647 * parse_date = lambda x: parse(x, dayfirst=dayfirst,default=default) * except ImportError: # pragma: no cover * def parse_date(s): # <<<<<<<<<<<<<< * try: * return datetime.strptime(s, '%m/%d/%Y') */ __pyx_t_3 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6pandas_3lib_15try_parse_dates_1parse_date, 0, __pyx_n_s_try_parse_dates_locals_parse_dat, NULL, __pyx_n_s_pandas_lib, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__33)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 647; __pyx_clineno = __LINE__; goto __pyx_L7_except_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_XDECREF_SET(__pyx_v_parse_date, __pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; goto __pyx_L6_exception_handled; } goto __pyx_L7_except_error; __pyx_L7_except_error:; __Pyx_XGIVEREF(__pyx_t_10); __Pyx_XGIVEREF(__pyx_t_9); __Pyx_XGIVEREF(__pyx_t_8); __Pyx_ExceptionReset(__pyx_t_10, __pyx_t_9, __pyx_t_8); goto __pyx_L1_error; __pyx_L6_exception_handled:; __Pyx_XGIVEREF(__pyx_t_10); __Pyx_XGIVEREF(__pyx_t_9); __Pyx_XGIVEREF(__pyx_t_8); __Pyx_ExceptionReset(__pyx_t_10, __pyx_t_9, __pyx_t_8); __pyx_L12_try_end:; } /* "pandas/src/inference.pyx":653 * return s * # EAFP here * try: # <<<<<<<<<<<<<< * for i from 0 <= i < n: * if values[i] == '': */ { __Pyx_ExceptionSave(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10); __Pyx_XGOTREF(__pyx_t_8); __Pyx_XGOTREF(__pyx_t_9); __Pyx_XGOTREF(__pyx_t_10); /*try:*/ { /* "pandas/src/inference.pyx":654 * # EAFP here * try: * for i from 0 <= i < n: # <<<<<<<<<<<<<< * if values[i] == '': * result[i] = np.nan */ __pyx_t_1 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_1; __pyx_v_i++) { /* "pandas/src/inference.pyx":655 * try: * for i from 0 <= i < n: * if values[i] == '': # <<<<<<<<<<<<<< * result[i] = np.nan * else: */ __pyx_t_13 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_13 < 0) { __pyx_t_13 += __pyx_pybuffernd_values.diminfo[0].shape; if (unlikely(__pyx_t_13 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_13 >= __pyx_pybuffernd_values.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 655; __pyx_clineno = __LINE__; goto __pyx_L15_error;} } __pyx_t_2 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_values.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_2); __pyx_t_11 = (__Pyx_PyString_Equals(__pyx_t_2, __pyx_kp_s__34, Py_EQ)); if (unlikely(__pyx_t_11 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 655; __pyx_clineno = __LINE__; goto __pyx_L15_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_11) { /* "pandas/src/inference.pyx":656 * for i from 0 <= i < n: * if values[i] == '': * result[i] = np.nan # <<<<<<<<<<<<<< * else: * result[i] = parse_date(values[i]) */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 656; __pyx_clineno = __LINE__; goto __pyx_L15_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_nan); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 656; __pyx_clineno = __LINE__; goto __pyx_L15_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_14 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_14 < 0) { __pyx_t_14 += __pyx_pybuffernd_result.diminfo[0].shape; if (unlikely(__pyx_t_14 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_14 >= __pyx_pybuffernd_result.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 656; __pyx_clineno = __LINE__; goto __pyx_L15_error;} } __pyx_t_15 = __Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_result.diminfo[0].strides); __Pyx_GOTREF(*__pyx_t_15); __Pyx_INCREF(__pyx_t_5); __Pyx_DECREF(*__pyx_t_15); *__pyx_t_15 = __pyx_t_5; __Pyx_GIVEREF(*__pyx_t_15); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; goto __pyx_L25; } /*else*/ { /* "pandas/src/inference.pyx":658 * result[i] = np.nan * else: * result[i] = parse_date(values[i]) # <<<<<<<<<<<<<< * except Exception: * # failed */ __pyx_t_16 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_16 < 0) { __pyx_t_16 += __pyx_pybuffernd_values.diminfo[0].shape; if (unlikely(__pyx_t_16 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_16 >= __pyx_pybuffernd_values.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 658; __pyx_clineno = __LINE__; goto __pyx_L15_error;} } __pyx_t_5 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_values.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_5); __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 658; __pyx_clineno = __LINE__; goto __pyx_L15_error;} __Pyx_GOTREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyObject_Call(__pyx_v_parse_date, __pyx_t_2, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 658; __pyx_clineno = __LINE__; goto __pyx_L15_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_17 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_17 < 0) { __pyx_t_17 += __pyx_pybuffernd_result.diminfo[0].shape; if (unlikely(__pyx_t_17 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_17 >= __pyx_pybuffernd_result.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 658; __pyx_clineno = __LINE__; goto __pyx_L15_error;} } __pyx_t_15 = __Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_result.diminfo[0].strides); __Pyx_GOTREF(*__pyx_t_15); __Pyx_INCREF(__pyx_t_5); __Pyx_DECREF(*__pyx_t_15); *__pyx_t_15 = __pyx_t_5; __Pyx_GIVEREF(*__pyx_t_15); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } __pyx_L25:; } } __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; goto __pyx_L22_try_end; __pyx_L15_error:; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; /* "pandas/src/inference.pyx":659 * else: * result[i] = parse_date(values[i]) * except Exception: # <<<<<<<<<<<<<< * # failed * return values */ __pyx_t_7 = PyErr_ExceptionMatches(__pyx_builtin_Exception); if (__pyx_t_7) { __Pyx_AddTraceback("pandas.lib.try_parse_dates", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_2, &__pyx_t_4) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 659; __pyx_clineno = __LINE__; goto __pyx_L17_except_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_GOTREF(__pyx_t_2); __Pyx_GOTREF(__pyx_t_4); /* "pandas/src/inference.pyx":661 * except Exception: * # failed * return values # <<<<<<<<<<<<<< * else: * parse_date = parser */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_values)); __pyx_r = ((PyObject *)__pyx_v_values); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; goto __pyx_L18_except_return; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; goto __pyx_L16_exception_handled; } goto __pyx_L17_except_error; __pyx_L17_except_error:; __Pyx_XGIVEREF(__pyx_t_8); __Pyx_XGIVEREF(__pyx_t_9); __Pyx_XGIVEREF(__pyx_t_10); __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_9, __pyx_t_10); goto __pyx_L1_error; __pyx_L18_except_return:; __Pyx_XGIVEREF(__pyx_t_8); __Pyx_XGIVEREF(__pyx_t_9); __Pyx_XGIVEREF(__pyx_t_10); __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_9, __pyx_t_10); goto __pyx_L0; __pyx_L16_exception_handled:; __Pyx_XGIVEREF(__pyx_t_8); __Pyx_XGIVEREF(__pyx_t_9); __Pyx_XGIVEREF(__pyx_t_10); __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_9, __pyx_t_10); __pyx_L22_try_end:; } goto __pyx_L3; } /*else*/ { /* "pandas/src/inference.pyx":663 * return values * else: * parse_date = parser # <<<<<<<<<<<<<< * * try: */ __Pyx_INCREF(__pyx_v_parser); __pyx_v_parse_date = __pyx_v_parser; /* "pandas/src/inference.pyx":665 * parse_date = parser * * try: # <<<<<<<<<<<<<< * for i from 0 <= i < n: * if values[i] == '': */ { __Pyx_ExceptionSave(&__pyx_t_10, &__pyx_t_9, &__pyx_t_8); __Pyx_XGOTREF(__pyx_t_10); __Pyx_XGOTREF(__pyx_t_9); __Pyx_XGOTREF(__pyx_t_8); /*try:*/ { /* "pandas/src/inference.pyx":666 * * try: * for i from 0 <= i < n: # <<<<<<<<<<<<<< * if values[i] == '': * result[i] = np.nan */ __pyx_t_1 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_1; __pyx_v_i++) { /* "pandas/src/inference.pyx":667 * try: * for i from 0 <= i < n: * if values[i] == '': # <<<<<<<<<<<<<< * result[i] = np.nan * else: */ __pyx_t_18 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_18 < 0) { __pyx_t_18 += __pyx_pybuffernd_values.diminfo[0].shape; if (unlikely(__pyx_t_18 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_18 >= __pyx_pybuffernd_values.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 667; __pyx_clineno = __LINE__; goto __pyx_L28_error;} } __pyx_t_4 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_values.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_4); __pyx_t_11 = (__Pyx_PyString_Equals(__pyx_t_4, __pyx_kp_s__34, Py_EQ)); if (unlikely(__pyx_t_11 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 667; __pyx_clineno = __LINE__; goto __pyx_L28_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_11) { /* "pandas/src/inference.pyx":668 * for i from 0 <= i < n: * if values[i] == '': * result[i] = np.nan # <<<<<<<<<<<<<< * else: * result[i] = parse_date(values[i]) */ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 668; __pyx_clineno = __LINE__; goto __pyx_L28_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_nan); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 668; __pyx_clineno = __LINE__; goto __pyx_L28_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_19 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_19 < 0) { __pyx_t_19 += __pyx_pybuffernd_result.diminfo[0].shape; if (unlikely(__pyx_t_19 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_19 >= __pyx_pybuffernd_result.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 668; __pyx_clineno = __LINE__; goto __pyx_L28_error;} } __pyx_t_15 = __Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_result.diminfo[0].strides); __Pyx_GOTREF(*__pyx_t_15); __Pyx_INCREF(__pyx_t_2); __Pyx_DECREF(*__pyx_t_15); *__pyx_t_15 = __pyx_t_2; __Pyx_GIVEREF(*__pyx_t_15); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; goto __pyx_L38; } /*else*/ { /* "pandas/src/inference.pyx":670 * result[i] = np.nan * else: * result[i] = parse_date(values[i]) # <<<<<<<<<<<<<< * except Exception: * # raise if passed parser and it failed */ __pyx_t_20 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_20 < 0) { __pyx_t_20 += __pyx_pybuffernd_values.diminfo[0].shape; if (unlikely(__pyx_t_20 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_20 >= __pyx_pybuffernd_values.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 670; __pyx_clineno = __LINE__; goto __pyx_L28_error;} } __pyx_t_2 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_values.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_2); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 670; __pyx_clineno = __LINE__; goto __pyx_L28_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_Call(__pyx_v_parse_date, __pyx_t_4, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 670; __pyx_clineno = __LINE__; goto __pyx_L28_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_21 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_21 < 0) { __pyx_t_21 += __pyx_pybuffernd_result.diminfo[0].shape; if (unlikely(__pyx_t_21 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_21 >= __pyx_pybuffernd_result.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 670; __pyx_clineno = __LINE__; goto __pyx_L28_error;} } __pyx_t_15 = __Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_result.diminfo[0].strides); __Pyx_GOTREF(*__pyx_t_15); __Pyx_INCREF(__pyx_t_2); __Pyx_DECREF(*__pyx_t_15); *__pyx_t_15 = __pyx_t_2; __Pyx_GIVEREF(*__pyx_t_15); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } __pyx_L38:; } } __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; goto __pyx_L35_try_end; __pyx_L28_error:; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/inference.pyx":671 * else: * result[i] = parse_date(values[i]) * except Exception: # <<<<<<<<<<<<<< * # raise if passed parser and it failed * raise */ __pyx_t_7 = PyErr_ExceptionMatches(__pyx_builtin_Exception); if (__pyx_t_7) { __Pyx_AddTraceback("pandas.lib.try_parse_dates", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_4, &__pyx_t_5) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 671; __pyx_clineno = __LINE__; goto __pyx_L30_except_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_GOTREF(__pyx_t_4); __Pyx_GOTREF(__pyx_t_5); /* "pandas/src/inference.pyx":673 * except Exception: * # raise if passed parser and it failed * raise # <<<<<<<<<<<<<< * * return result */ __Pyx_GIVEREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_4); __Pyx_XGIVEREF(__pyx_t_5); __Pyx_ErrRestore(__pyx_t_2, __pyx_t_4, __pyx_t_5); __pyx_t_2 = 0; __pyx_t_4 = 0; __pyx_t_5 = 0; {__pyx_filename = __pyx_f[1]; __pyx_lineno = 673; __pyx_clineno = __LINE__; goto __pyx_L30_except_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; goto __pyx_L29_exception_handled; } goto __pyx_L30_except_error; __pyx_L30_except_error:; __Pyx_XGIVEREF(__pyx_t_10); __Pyx_XGIVEREF(__pyx_t_9); __Pyx_XGIVEREF(__pyx_t_8); __Pyx_ExceptionReset(__pyx_t_10, __pyx_t_9, __pyx_t_8); goto __pyx_L1_error; __pyx_L29_exception_handled:; __Pyx_XGIVEREF(__pyx_t_10); __Pyx_XGIVEREF(__pyx_t_9); __Pyx_XGIVEREF(__pyx_t_8); __Pyx_ExceptionReset(__pyx_t_10, __pyx_t_9, __pyx_t_8); __pyx_L35_try_end:; } } __pyx_L3:; /* "pandas/src/inference.pyx":675 * raise * * return result # <<<<<<<<<<<<<< * * def try_parse_date_and_time(ndarray[object] dates, ndarray[object] times, */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_result)); __pyx_r = ((PyObject *)__pyx_v_result); goto __pyx_L0; /* "pandas/src/inference.pyx":629 * return maybe_convert_objects(x, try_float=1) * * def try_parse_dates(ndarray[object] values, parser=None, # <<<<<<<<<<<<<< * dayfirst=False,default=None): * cdef: */ /* 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); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.lib.try_parse_dates", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_result); __Pyx_XDECREF(__pyx_v_date); __Pyx_XDECREF(__pyx_v_parse_date); __Pyx_DECREF(((PyObject *)__pyx_cur_scope)); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/inference.pyx":677 * return result * * def try_parse_date_and_time(ndarray[object] dates, ndarray[object] times, # <<<<<<<<<<<<<< * date_parser=None, time_parser=None, * dayfirst=False,default=None): */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_3lib_149try_parse_date_and_time(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_3lib_149try_parse_date_and_time = {__Pyx_NAMESTR("try_parse_date_and_time"), (PyCFunction)__pyx_pw_6pandas_3lib_149try_parse_date_and_time, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_3lib_149try_parse_date_and_time(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_dates = 0; PyArrayObject *__pyx_v_times = 0; PyObject *__pyx_v_date_parser = 0; PyObject *__pyx_v_time_parser = 0; PyObject *__pyx_v_dayfirst = 0; PyObject *__pyx_v_default = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("try_parse_date_and_time (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_dates,&__pyx_n_s_times,&__pyx_n_s_date_parser,&__pyx_n_s_time_parser,&__pyx_n_s_dayfirst,&__pyx_n_s_default,0}; PyObject* values[6] = {0,0,0,0,0,0}; /* "pandas/src/inference.pyx":678 * * def try_parse_date_and_time(ndarray[object] dates, ndarray[object] times, * date_parser=None, time_parser=None, # <<<<<<<<<<<<<< * dayfirst=False,default=None): * cdef: */ values[2] = ((PyObject *)Py_None); values[3] = ((PyObject *)Py_None); /* "pandas/src/inference.pyx":679 * def try_parse_date_and_time(ndarray[object] dates, ndarray[object] times, * date_parser=None, time_parser=None, * dayfirst=False,default=None): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n */ values[4] = ((PyObject *)Py_False); values[5] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5); case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_dates)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_times)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("try_parse_date_and_time", 0, 2, 6, 1); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 677; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_date_parser); if (value) { values[2] = value; kw_args--; } } case 3: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_time_parser); if (value) { values[3] = value; kw_args--; } } case 4: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_dayfirst); if (value) { values[4] = value; kw_args--; } } case 5: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_default); if (value) { values[5] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "try_parse_date_and_time") < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 677; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5); case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_dates = ((PyArrayObject *)values[0]); __pyx_v_times = ((PyArrayObject *)values[1]); __pyx_v_date_parser = values[2]; __pyx_v_time_parser = values[3]; __pyx_v_dayfirst = values[4]; __pyx_v_default = values[5]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("try_parse_date_and_time", 0, 2, 6, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 677; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.lib.try_parse_date_and_time", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dates), __pyx_ptype_5numpy_ndarray, 1, "dates", 0))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 677; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_times), __pyx_ptype_5numpy_ndarray, 1, "times", 0))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 677; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_3lib_148try_parse_date_and_time(__pyx_self, __pyx_v_dates, __pyx_v_times, __pyx_v_date_parser, __pyx_v_time_parser, __pyx_v_dayfirst, __pyx_v_default); /* "pandas/src/inference.pyx":677 * return result * * def try_parse_date_and_time(ndarray[object] dates, ndarray[object] times, # <<<<<<<<<<<<<< * date_parser=None, time_parser=None, * dayfirst=False,default=None): */ /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/inference.pyx":700 * parse_date = lambda x: parse(x, dayfirst=dayfirst, default=default) * except ImportError: # pragma: no cover * def parse_date(s): # <<<<<<<<<<<<<< * try: * return date.strptime(s, '%m/%d/%Y') */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_3lib_23try_parse_date_and_time_1parse_date(PyObject *__pyx_self, PyObject *__pyx_v_s); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_3lib_23try_parse_date_and_time_1parse_date = {__Pyx_NAMESTR("parse_date"), (PyCFunction)__pyx_pw_6pandas_3lib_23try_parse_date_and_time_1parse_date, METH_O, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_3lib_23try_parse_date_and_time_1parse_date(PyObject *__pyx_self, PyObject *__pyx_v_s) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("parse_date (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_3lib_23try_parse_date_and_time_parse_date(__pyx_self, ((PyObject *)__pyx_v_s)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_3lib_23try_parse_date_and_time_parse_date(PyObject *__pyx_self, PyObject *__pyx_v_s) { struct __pyx_obj_6pandas_3lib___pyx_scope_struct_1_try_parse_date_and_time *__pyx_cur_scope; struct __pyx_obj_6pandas_3lib___pyx_scope_struct_1_try_parse_date_and_time *__pyx_outer_scope; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; int __pyx_t_7; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("parse_date", 0); __pyx_outer_scope = (struct __pyx_obj_6pandas_3lib___pyx_scope_struct_1_try_parse_date_and_time *) __Pyx_CyFunction_GetClosure(__pyx_self); __pyx_cur_scope = __pyx_outer_scope; /* "pandas/src/inference.pyx":701 * except ImportError: # pragma: no cover * def parse_date(s): * try: # <<<<<<<<<<<<<< * return date.strptime(s, '%m/%d/%Y') * except Exception: */ { __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:*/ { /* "pandas/src/inference.pyx":702 * def parse_date(s): * try: * return date.strptime(s, '%m/%d/%Y') # <<<<<<<<<<<<<< * except Exception: * return s */ __Pyx_XDECREF(__pyx_r); if (unlikely(!__pyx_cur_scope->__pyx_v_date)) { __Pyx_RaiseClosureNameError("date"); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 702; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_date, __pyx_n_s_strptime); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 702; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 702; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_v_s); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_s); __Pyx_GIVEREF(__pyx_v_s); __Pyx_INCREF(__pyx_kp_s_m_d_Y); PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_kp_s_m_d_Y); __Pyx_GIVEREF(__pyx_kp_s_m_d_Y); __pyx_t_6 = PyObject_Call(__pyx_t_4, __pyx_t_5, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 702; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_r = __pyx_t_6; __pyx_t_6 = 0; goto __pyx_L7_try_return; } __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L10_try_end; __pyx_L3_error:; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; /* "pandas/src/inference.pyx":703 * try: * return date.strptime(s, '%m/%d/%Y') * except Exception: # <<<<<<<<<<<<<< * return s * else: */ __pyx_t_7 = PyErr_ExceptionMatches(__pyx_builtin_Exception); if (__pyx_t_7) { __Pyx_AddTraceback("pandas.lib.try_parse_date_and_time.parse_date", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_5, &__pyx_t_4) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 703; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_GOTREF(__pyx_t_5); __Pyx_GOTREF(__pyx_t_4); /* "pandas/src/inference.pyx":704 * return date.strptime(s, '%m/%d/%Y') * except Exception: * return s # <<<<<<<<<<<<<< * else: * parse_date = date_parser */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_s); __pyx_r = __pyx_v_s; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; goto __pyx_L6_except_return; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; goto __pyx_L4_exception_handled; } goto __pyx_L5_except_error; __pyx_L5_except_error:; __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); goto __pyx_L1_error; __pyx_L7_try_return:; __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); goto __pyx_L0; __pyx_L6_except_return:; __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); goto __pyx_L0; __pyx_L4_exception_handled:; __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); __pyx_L10_try_end:; } /* "pandas/src/inference.pyx":700 * parse_date = lambda x: parse(x, dayfirst=dayfirst, default=default) * except ImportError: # pragma: no cover * def parse_date(s): # <<<<<<<<<<<<<< * try: * return date.strptime(s, '%m/%d/%Y') */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("pandas.lib.try_parse_date_and_time.parse_date", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/inference.pyx":713 * parse_time = lambda x: parse(x) * except ImportError: # pragma: no cover * def parse_time(s): # <<<<<<<<<<<<<< * try: * return time.strptime(s, '%H:%M:%S') */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_3lib_23try_parse_date_and_time_3parse_time(PyObject *__pyx_self, PyObject *__pyx_v_s); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_3lib_23try_parse_date_and_time_3parse_time = {__Pyx_NAMESTR("parse_time"), (PyCFunction)__pyx_pw_6pandas_3lib_23try_parse_date_and_time_3parse_time, METH_O, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_3lib_23try_parse_date_and_time_3parse_time(PyObject *__pyx_self, PyObject *__pyx_v_s) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("parse_time (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_3lib_23try_parse_date_and_time_2parse_time(__pyx_self, ((PyObject *)__pyx_v_s)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_3lib_23try_parse_date_and_time_2parse_time(PyObject *__pyx_self, PyObject *__pyx_v_s) { struct __pyx_obj_6pandas_3lib___pyx_scope_struct_1_try_parse_date_and_time *__pyx_cur_scope; struct __pyx_obj_6pandas_3lib___pyx_scope_struct_1_try_parse_date_and_time *__pyx_outer_scope; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; int __pyx_t_7; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("parse_time", 0); __pyx_outer_scope = (struct __pyx_obj_6pandas_3lib___pyx_scope_struct_1_try_parse_date_and_time *) __Pyx_CyFunction_GetClosure(__pyx_self); __pyx_cur_scope = __pyx_outer_scope; /* "pandas/src/inference.pyx":714 * except ImportError: # pragma: no cover * def parse_time(s): * try: # <<<<<<<<<<<<<< * return time.strptime(s, '%H:%M:%S') * except Exception: */ { __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:*/ { /* "pandas/src/inference.pyx":715 * def parse_time(s): * try: * return time.strptime(s, '%H:%M:%S') # <<<<<<<<<<<<<< * except Exception: * return s */ __Pyx_XDECREF(__pyx_r); if (unlikely(!__pyx_cur_scope->__pyx_v_time)) { __Pyx_RaiseClosureNameError("time"); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 715; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_time, __pyx_n_s_strptime); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 715; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 715; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_v_s); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_s); __Pyx_GIVEREF(__pyx_v_s); __Pyx_INCREF(__pyx_kp_s_H_M_S); PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_kp_s_H_M_S); __Pyx_GIVEREF(__pyx_kp_s_H_M_S); __pyx_t_6 = PyObject_Call(__pyx_t_4, __pyx_t_5, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 715; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_r = __pyx_t_6; __pyx_t_6 = 0; goto __pyx_L7_try_return; } __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L10_try_end; __pyx_L3_error:; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; /* "pandas/src/inference.pyx":716 * try: * return time.strptime(s, '%H:%M:%S') * except Exception: # <<<<<<<<<<<<<< * return s * */ __pyx_t_7 = PyErr_ExceptionMatches(__pyx_builtin_Exception); if (__pyx_t_7) { __Pyx_AddTraceback("pandas.lib.try_parse_date_and_time.parse_time", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_5, &__pyx_t_4) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 716; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_GOTREF(__pyx_t_5); __Pyx_GOTREF(__pyx_t_4); /* "pandas/src/inference.pyx":717 * return time.strptime(s, '%H:%M:%S') * except Exception: * return s # <<<<<<<<<<<<<< * * else: */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_s); __pyx_r = __pyx_v_s; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; goto __pyx_L6_except_return; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; goto __pyx_L4_exception_handled; } goto __pyx_L5_except_error; __pyx_L5_except_error:; __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); goto __pyx_L1_error; __pyx_L7_try_return:; __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); goto __pyx_L0; __pyx_L6_except_return:; __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); goto __pyx_L0; __pyx_L4_exception_handled:; __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); __pyx_L10_try_end:; } /* "pandas/src/inference.pyx":713 * parse_time = lambda x: parse(x) * except ImportError: # pragma: no cover * def parse_time(s): # <<<<<<<<<<<<<< * try: * return time.strptime(s, '%H:%M:%S') */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("pandas.lib.try_parse_date_and_time.parse_time", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/inference.pyx":698 * try: * from dateutil.parser import parse * parse_date = lambda x: parse(x, dayfirst=dayfirst, default=default) # <<<<<<<<<<<<<< * except ImportError: # pragma: no cover * def parse_date(s): */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_3lib_23try_parse_date_and_time_4lambda2(PyObject *__pyx_self, PyObject *__pyx_v_x); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_3lib_23try_parse_date_and_time_4lambda2 = {__Pyx_NAMESTR("lambda2"), (PyCFunction)__pyx_pw_6pandas_3lib_23try_parse_date_and_time_4lambda2, METH_O, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_3lib_23try_parse_date_and_time_4lambda2(PyObject *__pyx_self, PyObject *__pyx_v_x) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("lambda2 (wrapper)", 0); __pyx_r = __pyx_lambda_funcdef_lambda2(__pyx_self, ((PyObject *)__pyx_v_x)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_lambda_funcdef_lambda2(PyObject *__pyx_self, PyObject *__pyx_v_x) { struct __pyx_obj_6pandas_3lib___pyx_scope_struct_1_try_parse_date_and_time *__pyx_cur_scope; struct __pyx_obj_6pandas_3lib___pyx_scope_struct_1_try_parse_date_and_time *__pyx_outer_scope; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("lambda2", 0); __pyx_outer_scope = (struct __pyx_obj_6pandas_3lib___pyx_scope_struct_1_try_parse_date_and_time *) __Pyx_CyFunction_GetClosure(__pyx_self); __pyx_cur_scope = __pyx_outer_scope; __Pyx_XDECREF(__pyx_r); if (unlikely(!__pyx_cur_scope->__pyx_v_parse)) { __Pyx_RaiseClosureNameError("parse"); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 698; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 698; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_x); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_x); __Pyx_GIVEREF(__pyx_v_x); __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 698; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (unlikely(!__pyx_cur_scope->__pyx_v_dayfirst)) { __Pyx_RaiseClosureNameError("dayfirst"); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 698; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_dayfirst, __pyx_cur_scope->__pyx_v_dayfirst) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 698; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__pyx_cur_scope->__pyx_v_default)) { __Pyx_RaiseClosureNameError("default"); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 698; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_default, __pyx_cur_scope->__pyx_v_default) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 698; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_3 = PyObject_Call(__pyx_cur_scope->__pyx_v_parse, __pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 698; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("pandas.lib.try_parse_date_and_time.lambda2", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/inference.pyx":711 * try: * from dateutil.parser import parse * parse_time = lambda x: parse(x) # <<<<<<<<<<<<<< * except ImportError: # pragma: no cover * def parse_time(s): */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_3lib_23try_parse_date_and_time_5lambda3(PyObject *__pyx_self, PyObject *__pyx_v_x); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_3lib_23try_parse_date_and_time_5lambda3 = {__Pyx_NAMESTR("lambda3"), (PyCFunction)__pyx_pw_6pandas_3lib_23try_parse_date_and_time_5lambda3, METH_O, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_3lib_23try_parse_date_and_time_5lambda3(PyObject *__pyx_self, PyObject *__pyx_v_x) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("lambda3 (wrapper)", 0); __pyx_r = __pyx_lambda_funcdef_lambda3(__pyx_self, ((PyObject *)__pyx_v_x)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_lambda_funcdef_lambda3(PyObject *__pyx_self, PyObject *__pyx_v_x) { struct __pyx_obj_6pandas_3lib___pyx_scope_struct_1_try_parse_date_and_time *__pyx_cur_scope; struct __pyx_obj_6pandas_3lib___pyx_scope_struct_1_try_parse_date_and_time *__pyx_outer_scope; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("lambda3", 0); __pyx_outer_scope = (struct __pyx_obj_6pandas_3lib___pyx_scope_struct_1_try_parse_date_and_time *) __Pyx_CyFunction_GetClosure(__pyx_self); __pyx_cur_scope = __pyx_outer_scope; __Pyx_XDECREF(__pyx_r); if (unlikely(!__pyx_cur_scope->__pyx_v_parse)) { __Pyx_RaiseClosureNameError("parse"); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 711; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 711; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_x); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_x); __Pyx_GIVEREF(__pyx_v_x); __pyx_t_2 = PyObject_Call(__pyx_cur_scope->__pyx_v_parse, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 711; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("pandas.lib.try_parse_date_and_time.lambda3", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/inference.pyx":677 * return result * * def try_parse_date_and_time(ndarray[object] dates, ndarray[object] times, # <<<<<<<<<<<<<< * date_parser=None, time_parser=None, * dayfirst=False,default=None): */ static PyObject *__pyx_pf_6pandas_3lib_148try_parse_date_and_time(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_dates, PyArrayObject *__pyx_v_times, PyObject *__pyx_v_date_parser, PyObject *__pyx_v_time_parser, PyObject *__pyx_v_dayfirst, PyObject *__pyx_v_default) { struct __pyx_obj_6pandas_3lib___pyx_scope_struct_1_try_parse_date_and_time *__pyx_cur_scope; Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_n; PyArrayObject *__pyx_v_result = 0; PyObject *__pyx_v_datetime = NULL; CYTHON_UNUSED PyObject *__pyx_v_timedelta = NULL; PyObject *__pyx_v_parse_date = NULL; PyObject *__pyx_v_parse_time = NULL; PyObject *__pyx_v_d = NULL; PyObject *__pyx_v_t = NULL; __Pyx_LocalBuf_ND __pyx_pybuffernd_dates; __Pyx_Buffer __pyx_pybuffer_dates; __Pyx_LocalBuf_ND __pyx_pybuffernd_result; __Pyx_Buffer __pyx_pybuffer_result; __Pyx_LocalBuf_ND __pyx_pybuffernd_times; __Pyx_Buffer __pyx_pybuffer_times; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; Py_ssize_t __pyx_t_3; int __pyx_t_4; 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; int __pyx_t_12; Py_ssize_t __pyx_t_13; Py_ssize_t __pyx_t_14; PyObject *__pyx_t_15 = NULL; PyObject *__pyx_t_16 = NULL; PyObject *__pyx_t_17 = NULL; Py_ssize_t __pyx_t_18; PyObject **__pyx_t_19; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("try_parse_date_and_time", 0); __pyx_cur_scope = (struct __pyx_obj_6pandas_3lib___pyx_scope_struct_1_try_parse_date_and_time *)__pyx_tp_new_6pandas_3lib___pyx_scope_struct_1_try_parse_date_and_time(__pyx_ptype_6pandas_3lib___pyx_scope_struct_1_try_parse_date_and_time, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_cur_scope)) { __Pyx_RefNannyFinishContext(); return NULL; } __Pyx_GOTREF(__pyx_cur_scope); __pyx_cur_scope->__pyx_v_dayfirst = __pyx_v_dayfirst; __Pyx_INCREF(__pyx_cur_scope->__pyx_v_dayfirst); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_dayfirst); __pyx_cur_scope->__pyx_v_default = __pyx_v_default; __Pyx_INCREF(__pyx_cur_scope->__pyx_v_default); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_default); __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_dates.pybuffer.buf = NULL; __pyx_pybuffer_dates.refcount = 0; __pyx_pybuffernd_dates.data = NULL; __pyx_pybuffernd_dates.rcbuffer = &__pyx_pybuffer_dates; __pyx_pybuffer_times.pybuffer.buf = NULL; __pyx_pybuffer_times.refcount = 0; __pyx_pybuffernd_times.data = NULL; __pyx_pybuffernd_times.rcbuffer = &__pyx_pybuffer_times; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_dates.rcbuffer->pybuffer, (PyObject*)__pyx_v_dates, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 677; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_dates.diminfo[0].strides = __pyx_pybuffernd_dates.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_dates.diminfo[0].shape = __pyx_pybuffernd_dates.rcbuffer->pybuffer.shape[0]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_times.rcbuffer->pybuffer, (PyObject*)__pyx_v_times, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 677; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_times.diminfo[0].strides = __pyx_pybuffernd_times.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_times.diminfo[0].shape = __pyx_pybuffernd_times.rcbuffer->pybuffer.shape[0]; /* "pandas/src/inference.pyx":684 * ndarray[object] result * * from datetime import date, time, datetime, timedelta # <<<<<<<<<<<<<< * * n = len(dates) */ __pyx_t_1 = PyList_New(4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 684; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_n_s_date); PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_date); __Pyx_GIVEREF(__pyx_n_s_date); __Pyx_INCREF(__pyx_n_s_time); PyList_SET_ITEM(__pyx_t_1, 1, __pyx_n_s_time); __Pyx_GIVEREF(__pyx_n_s_time); __Pyx_INCREF(__pyx_n_s_datetime); PyList_SET_ITEM(__pyx_t_1, 2, __pyx_n_s_datetime); __Pyx_GIVEREF(__pyx_n_s_datetime); __Pyx_INCREF(__pyx_n_s_timedelta); PyList_SET_ITEM(__pyx_t_1, 3, __pyx_n_s_timedelta); __Pyx_GIVEREF(__pyx_n_s_timedelta); __pyx_t_2 = __Pyx_Import(__pyx_n_s_datetime, __pyx_t_1, -1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 684; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_date); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 684; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_cur_scope->__pyx_v_date = __pyx_t_1; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_time); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 684; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_cur_scope->__pyx_v_time = __pyx_t_1; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_datetime); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 684; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_t_1); __pyx_v_datetime = __pyx_t_1; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_timedelta); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 684; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_t_1); __pyx_v_timedelta = __pyx_t_1; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/inference.pyx":686 * from datetime import date, time, datetime, timedelta * * n = len(dates) # <<<<<<<<<<<<<< * if len(times) != n: * raise ValueError('Length of dates and times must be equal') */ __pyx_t_3 = PyObject_Length(((PyObject *)__pyx_v_dates)); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 686; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_3; /* "pandas/src/inference.pyx":687 * * n = len(dates) * if len(times) != n: # <<<<<<<<<<<<<< * raise ValueError('Length of dates and times must be equal') * result = np.empty(n, dtype='O') */ __pyx_t_3 = PyObject_Length(((PyObject *)__pyx_v_times)); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 687; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_4 = ((__pyx_t_3 != __pyx_v_n) != 0); if (__pyx_t_4) { /* "pandas/src/inference.pyx":688 * n = len(dates) * if len(times) != n: * raise ValueError('Length of dates and times must be equal') # <<<<<<<<<<<<<< * result = np.empty(n, dtype='O') * */ __pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__35, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 688; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 688; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } /* "pandas/src/inference.pyx":689 * if len(times) != n: * raise ValueError('Length of dates and times must be equal') * result = np.empty(n, dtype='O') # <<<<<<<<<<<<<< * * if date_parser is None: */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 689; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_empty); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 689; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_n); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 689; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 689; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 689; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_dtype, __pyx_n_s_O) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 689; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_6 = PyObject_Call(__pyx_t_1, __pyx_t_5, __pyx_t_2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 689; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_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_filename = __pyx_f[1]; __pyx_lineno = 689; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_7 = ((PyArrayObject *)__pyx_t_6); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_object, 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_result.rcbuffer->pybuffer, (PyObject*)__pyx_v_result, &__Pyx_TypeInfo_object, 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_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_8 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 689; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_7 = 0; __pyx_v_result = ((PyArrayObject *)__pyx_t_6); __pyx_t_6 = 0; /* "pandas/src/inference.pyx":691 * result = np.empty(n, dtype='O') * * if date_parser is None: # <<<<<<<<<<<<<< * if default is None: # GH2618 * date=datetime.now() */ __pyx_t_4 = (__pyx_v_date_parser == Py_None); __pyx_t_12 = (__pyx_t_4 != 0); if (__pyx_t_12) { /* "pandas/src/inference.pyx":692 * * if date_parser is None: * if default is None: # GH2618 # <<<<<<<<<<<<<< * date=datetime.now() * default=datetime(date.year,date.month,1) */ __pyx_t_12 = (__pyx_cur_scope->__pyx_v_default == Py_None); __pyx_t_4 = (__pyx_t_12 != 0); if (__pyx_t_4) { /* "pandas/src/inference.pyx":693 * if date_parser is None: * if default is None: # GH2618 * date=datetime.now() # <<<<<<<<<<<<<< * default=datetime(date.year,date.month,1) * */ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_datetime, __pyx_n_s_now); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 693; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_2 = PyObject_Call(__pyx_t_6, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 693; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_date); __Pyx_DECREF_SET(__pyx_cur_scope->__pyx_v_date, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/inference.pyx":694 * if default is None: # GH2618 * date=datetime.now() * default=datetime(date.year,date.month,1) # <<<<<<<<<<<<<< * * try: */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_date, __pyx_n_s_year); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 694; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_date, __pyx_n_s_month); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 694; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 694; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_6); __Pyx_INCREF(__pyx_int_1); PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_int_1); __Pyx_GIVEREF(__pyx_int_1); __pyx_t_2 = 0; __pyx_t_6 = 0; __pyx_t_6 = PyObject_Call(__pyx_v_datetime, __pyx_t_5, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 694; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_default); __Pyx_DECREF_SET(__pyx_cur_scope->__pyx_v_default, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_6); __pyx_t_6 = 0; goto __pyx_L5; } __pyx_L5:; /* "pandas/src/inference.pyx":696 * default=datetime(date.year,date.month,1) * * try: # <<<<<<<<<<<<<< * from dateutil.parser import parse * parse_date = lambda x: parse(x, dayfirst=dayfirst, default=default) */ { __Pyx_ExceptionSave(&__pyx_t_11, &__pyx_t_10, &__pyx_t_9); __Pyx_XGOTREF(__pyx_t_11); __Pyx_XGOTREF(__pyx_t_10); __Pyx_XGOTREF(__pyx_t_9); /*try:*/ { /* "pandas/src/inference.pyx":697 * * try: * from dateutil.parser import parse # <<<<<<<<<<<<<< * parse_date = lambda x: parse(x, dayfirst=dayfirst, default=default) * except ImportError: # pragma: no cover */ __pyx_t_6 = PyList_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 697; __pyx_clineno = __LINE__; goto __pyx_L6_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(__pyx_n_s_parse); PyList_SET_ITEM(__pyx_t_6, 0, __pyx_n_s_parse); __Pyx_GIVEREF(__pyx_n_s_parse); __pyx_t_5 = __Pyx_Import(__pyx_n_s_dateutil_parser, __pyx_t_6, -1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 697; __pyx_clineno = __LINE__; goto __pyx_L6_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = __Pyx_ImportFrom(__pyx_t_5, __pyx_n_s_parse); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 697; __pyx_clineno = __LINE__; goto __pyx_L6_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_6); __pyx_cur_scope->__pyx_v_parse = __pyx_t_6; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "pandas/src/inference.pyx":698 * try: * from dateutil.parser import parse * parse_date = lambda x: parse(x, dayfirst=dayfirst, default=default) # <<<<<<<<<<<<<< * except ImportError: # pragma: no cover * def parse_date(s): */ __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6pandas_3lib_23try_parse_date_and_time_4lambda2, 0, __pyx_n_s_try_parse_date_and_time_locals_l, ((PyObject*)__pyx_cur_scope), __pyx_n_s_pandas_lib, PyModule_GetDict(__pyx_m), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 698; __pyx_clineno = __LINE__; goto __pyx_L6_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_v_parse_date = __pyx_t_5; __pyx_t_5 = 0; } __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; goto __pyx_L13_try_end; __pyx_L6_error:; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; /* "pandas/src/inference.pyx":699 * from dateutil.parser import parse * parse_date = lambda x: parse(x, dayfirst=dayfirst, default=default) * except ImportError: # pragma: no cover # <<<<<<<<<<<<<< * def parse_date(s): * try: */ __pyx_t_8 = PyErr_ExceptionMatches(__pyx_builtin_ImportError); if (__pyx_t_8) { __Pyx_AddTraceback("pandas.lib.try_parse_date_and_time", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_2) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 699; __pyx_clineno = __LINE__; goto __pyx_L8_except_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_GOTREF(__pyx_t_6); __Pyx_GOTREF(__pyx_t_2); /* "pandas/src/inference.pyx":700 * parse_date = lambda x: parse(x, dayfirst=dayfirst, default=default) * except ImportError: # pragma: no cover * def parse_date(s): # <<<<<<<<<<<<<< * try: * return date.strptime(s, '%m/%d/%Y') */ __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6pandas_3lib_23try_parse_date_and_time_1parse_date, 0, __pyx_n_s_try_parse_date_and_time_locals_p, ((PyObject*)__pyx_cur_scope), __pyx_n_s_pandas_lib, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__37)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 700; __pyx_clineno = __LINE__; goto __pyx_L8_except_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_XDECREF_SET(__pyx_v_parse_date, __pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; goto __pyx_L7_exception_handled; } goto __pyx_L8_except_error; __pyx_L8_except_error:; __Pyx_XGIVEREF(__pyx_t_11); __Pyx_XGIVEREF(__pyx_t_10); __Pyx_XGIVEREF(__pyx_t_9); __Pyx_ExceptionReset(__pyx_t_11, __pyx_t_10, __pyx_t_9); goto __pyx_L1_error; __pyx_L7_exception_handled:; __Pyx_XGIVEREF(__pyx_t_11); __Pyx_XGIVEREF(__pyx_t_10); __Pyx_XGIVEREF(__pyx_t_9); __Pyx_ExceptionReset(__pyx_t_11, __pyx_t_10, __pyx_t_9); __pyx_L13_try_end:; } goto __pyx_L4; } /*else*/ { /* "pandas/src/inference.pyx":706 * return s * else: * parse_date = date_parser # <<<<<<<<<<<<<< * * if time_parser is None: */ __Pyx_INCREF(__pyx_v_date_parser); __pyx_v_parse_date = __pyx_v_date_parser; } __pyx_L4:; /* "pandas/src/inference.pyx":708 * parse_date = date_parser * * if time_parser is None: # <<<<<<<<<<<<<< * try: * from dateutil.parser import parse */ __pyx_t_4 = (__pyx_v_time_parser == Py_None); __pyx_t_12 = (__pyx_t_4 != 0); if (__pyx_t_12) { /* "pandas/src/inference.pyx":709 * * if time_parser is None: * try: # <<<<<<<<<<<<<< * from dateutil.parser import parse * parse_time = lambda x: parse(x) */ { __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11); __Pyx_XGOTREF(__pyx_t_9); __Pyx_XGOTREF(__pyx_t_10); __Pyx_XGOTREF(__pyx_t_11); /*try:*/ { /* "pandas/src/inference.pyx":710 * if time_parser is None: * try: * from dateutil.parser import parse # <<<<<<<<<<<<<< * parse_time = lambda x: parse(x) * except ImportError: # pragma: no cover */ __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 710; __pyx_clineno = __LINE__; goto __pyx_L17_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_n_s_parse); PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_parse); __Pyx_GIVEREF(__pyx_n_s_parse); __pyx_t_6 = __Pyx_Import(__pyx_n_s_dateutil_parser, __pyx_t_2, -1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 710; __pyx_clineno = __LINE__; goto __pyx_L17_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_6, __pyx_n_s_parse); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 710; __pyx_clineno = __LINE__; goto __pyx_L17_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_t_2); __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_parse); __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_parse, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; /* "pandas/src/inference.pyx":711 * try: * from dateutil.parser import parse * parse_time = lambda x: parse(x) # <<<<<<<<<<<<<< * except ImportError: # pragma: no cover * def parse_time(s): */ __pyx_t_6 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6pandas_3lib_23try_parse_date_and_time_5lambda3, 0, __pyx_n_s_try_parse_date_and_time_locals_l, ((PyObject*)__pyx_cur_scope), __pyx_n_s_pandas_lib, PyModule_GetDict(__pyx_m), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 711; __pyx_clineno = __LINE__; goto __pyx_L17_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_v_parse_time = __pyx_t_6; __pyx_t_6 = 0; } __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; goto __pyx_L24_try_end; __pyx_L17_error:; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; /* "pandas/src/inference.pyx":712 * from dateutil.parser import parse * parse_time = lambda x: parse(x) * except ImportError: # pragma: no cover # <<<<<<<<<<<<<< * def parse_time(s): * try: */ __pyx_t_8 = PyErr_ExceptionMatches(__pyx_builtin_ImportError); if (__pyx_t_8) { __Pyx_AddTraceback("pandas.lib.try_parse_date_and_time", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_2, &__pyx_t_5) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 712; __pyx_clineno = __LINE__; goto __pyx_L19_except_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_GOTREF(__pyx_t_2); __Pyx_GOTREF(__pyx_t_5); /* "pandas/src/inference.pyx":713 * parse_time = lambda x: parse(x) * except ImportError: # pragma: no cover * def parse_time(s): # <<<<<<<<<<<<<< * try: * return time.strptime(s, '%H:%M:%S') */ __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6pandas_3lib_23try_parse_date_and_time_3parse_time, 0, __pyx_n_s_try_parse_date_and_time_locals_p_2, ((PyObject*)__pyx_cur_scope), __pyx_n_s_pandas_lib, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__39)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 713; __pyx_clineno = __LINE__; goto __pyx_L19_except_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_XDECREF_SET(__pyx_v_parse_time, __pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; goto __pyx_L18_exception_handled; } goto __pyx_L19_except_error; __pyx_L19_except_error:; __Pyx_XGIVEREF(__pyx_t_9); __Pyx_XGIVEREF(__pyx_t_10); __Pyx_XGIVEREF(__pyx_t_11); __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_10, __pyx_t_11); goto __pyx_L1_error; __pyx_L18_exception_handled:; __Pyx_XGIVEREF(__pyx_t_9); __Pyx_XGIVEREF(__pyx_t_10); __Pyx_XGIVEREF(__pyx_t_11); __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_10, __pyx_t_11); __pyx_L24_try_end:; } goto __pyx_L16; } /*else*/ { /* "pandas/src/inference.pyx":720 * * else: * parse_time = time_parser # <<<<<<<<<<<<<< * * for i from 0 <= i < n: */ __Pyx_INCREF(__pyx_v_time_parser); __pyx_v_parse_time = __pyx_v_time_parser; } __pyx_L16:; /* "pandas/src/inference.pyx":722 * parse_time = time_parser * * for i from 0 <= i < n: # <<<<<<<<<<<<<< * d = parse_date(str(dates[i])) * t = parse_time(str(times[i])) */ __pyx_t_3 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_3; __pyx_v_i++) { /* "pandas/src/inference.pyx":723 * * for i from 0 <= i < n: * d = parse_date(str(dates[i])) # <<<<<<<<<<<<<< * t = parse_time(str(times[i])) * result[i] = datetime(d.year, d.month, d.day, */ __pyx_t_13 = __pyx_v_i; __pyx_t_8 = -1; if (__pyx_t_13 < 0) { __pyx_t_13 += __pyx_pybuffernd_dates.diminfo[0].shape; if (unlikely(__pyx_t_13 < 0)) __pyx_t_8 = 0; } else if (unlikely(__pyx_t_13 >= __pyx_pybuffernd_dates.diminfo[0].shape)) __pyx_t_8 = 0; if (unlikely(__pyx_t_8 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_8); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 723; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_5 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_dates.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_dates.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_5); __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 723; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), __pyx_t_2, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 723; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 723; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyObject_Call(__pyx_v_parse_date, __pyx_t_2, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 723; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF_SET(__pyx_v_d, __pyx_t_5); __pyx_t_5 = 0; /* "pandas/src/inference.pyx":724 * for i from 0 <= i < n: * d = parse_date(str(dates[i])) * t = parse_time(str(times[i])) # <<<<<<<<<<<<<< * result[i] = datetime(d.year, d.month, d.day, * t.hour, t.minute, t.second) */ __pyx_t_14 = __pyx_v_i; __pyx_t_8 = -1; if (__pyx_t_14 < 0) { __pyx_t_14 += __pyx_pybuffernd_times.diminfo[0].shape; if (unlikely(__pyx_t_14 < 0)) __pyx_t_8 = 0; } else if (unlikely(__pyx_t_14 >= __pyx_pybuffernd_times.diminfo[0].shape)) __pyx_t_8 = 0; if (unlikely(__pyx_t_8 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_8); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 724; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_5 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_times.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_times.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_5); __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 724; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), __pyx_t_2, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 724; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 724; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyObject_Call(__pyx_v_parse_time, __pyx_t_2, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 724; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF_SET(__pyx_v_t, __pyx_t_5); __pyx_t_5 = 0; /* "pandas/src/inference.pyx":725 * d = parse_date(str(dates[i])) * t = parse_time(str(times[i])) * result[i] = datetime(d.year, d.month, d.day, # <<<<<<<<<<<<<< * t.hour, t.minute, t.second) * */ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_d, __pyx_n_s_year); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 725; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_d, __pyx_n_s_month); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 725; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_d, __pyx_n_s_day); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 725; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); /* "pandas/src/inference.pyx":726 * t = parse_time(str(times[i])) * result[i] = datetime(d.year, d.month, d.day, * t.hour, t.minute, t.second) # <<<<<<<<<<<<<< * * return result */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_t, __pyx_n_s_hour); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 726; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_v_t, __pyx_n_s_minute); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 726; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_15); __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_v_t, __pyx_n_s_second); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 726; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_16); /* "pandas/src/inference.pyx":725 * d = parse_date(str(dates[i])) * t = parse_time(str(times[i])) * result[i] = datetime(d.year, d.month, d.day, # <<<<<<<<<<<<<< * t.hour, t.minute, t.second) * */ __pyx_t_17 = PyTuple_New(6); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 725; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_17); PyTuple_SET_ITEM(__pyx_t_17, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_17, 1, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_17, 2, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_17, 3, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_17, 4, __pyx_t_15); __Pyx_GIVEREF(__pyx_t_15); PyTuple_SET_ITEM(__pyx_t_17, 5, __pyx_t_16); __Pyx_GIVEREF(__pyx_t_16); __pyx_t_5 = 0; __pyx_t_2 = 0; __pyx_t_6 = 0; __pyx_t_1 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_16 = PyObject_Call(__pyx_v_datetime, __pyx_t_17, NULL); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 725; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_16); __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; __pyx_t_18 = __pyx_v_i; __pyx_t_8 = -1; if (__pyx_t_18 < 0) { __pyx_t_18 += __pyx_pybuffernd_result.diminfo[0].shape; if (unlikely(__pyx_t_18 < 0)) __pyx_t_8 = 0; } else if (unlikely(__pyx_t_18 >= __pyx_pybuffernd_result.diminfo[0].shape)) __pyx_t_8 = 0; if (unlikely(__pyx_t_8 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_8); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 725; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_19 = __Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_result.diminfo[0].strides); __Pyx_GOTREF(*__pyx_t_19); __Pyx_INCREF(__pyx_t_16); __Pyx_DECREF(*__pyx_t_19); *__pyx_t_19 = __pyx_t_16; __Pyx_GIVEREF(*__pyx_t_19); __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; } /* "pandas/src/inference.pyx":728 * t.hour, t.minute, t.second) * * return result # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_result)); __pyx_r = ((PyObject *)__pyx_v_result); goto __pyx_L0; /* "pandas/src/inference.pyx":677 * return result * * def try_parse_date_and_time(ndarray[object] dates, ndarray[object] times, # <<<<<<<<<<<<<< * date_parser=None, time_parser=None, * dayfirst=False,default=None): */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_15); __Pyx_XDECREF(__pyx_t_16); __Pyx_XDECREF(__pyx_t_17); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_dates.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_times.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.lib.try_parse_date_and_time", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_dates.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_times.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_result); __Pyx_XDECREF(__pyx_v_datetime); __Pyx_XDECREF(__pyx_v_timedelta); __Pyx_XDECREF(__pyx_v_parse_date); __Pyx_XDECREF(__pyx_v_parse_time); __Pyx_XDECREF(__pyx_v_d); __Pyx_XDECREF(__pyx_v_t); __Pyx_DECREF(((PyObject *)__pyx_cur_scope)); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/inference.pyx":731 * * * def try_parse_year_month_day(ndarray[object] years, ndarray[object] months, # <<<<<<<<<<<<<< * ndarray[object] days): * cdef: */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_3lib_151try_parse_year_month_day(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_3lib_151try_parse_year_month_day = {__Pyx_NAMESTR("try_parse_year_month_day"), (PyCFunction)__pyx_pw_6pandas_3lib_151try_parse_year_month_day, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_3lib_151try_parse_year_month_day(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_years = 0; PyArrayObject *__pyx_v_months = 0; PyArrayObject *__pyx_v_days = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("try_parse_year_month_day (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_years,&__pyx_n_s_months,&__pyx_n_s_days,0}; PyObject* values[3] = {0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_years)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_months)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("try_parse_year_month_day", 1, 3, 3, 1); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 731; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_days)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("try_parse_year_month_day", 1, 3, 3, 2); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 731; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "try_parse_year_month_day") < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 731; __pyx_clineno = __LINE__; goto __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_years = ((PyArrayObject *)values[0]); __pyx_v_months = ((PyArrayObject *)values[1]); __pyx_v_days = ((PyArrayObject *)values[2]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("try_parse_year_month_day", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 731; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.lib.try_parse_year_month_day", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_years), __pyx_ptype_5numpy_ndarray, 1, "years", 0))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 731; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_months), __pyx_ptype_5numpy_ndarray, 1, "months", 0))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 731; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_days), __pyx_ptype_5numpy_ndarray, 1, "days", 0))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 732; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_3lib_150try_parse_year_month_day(__pyx_self, __pyx_v_years, __pyx_v_months, __pyx_v_days); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_3lib_150try_parse_year_month_day(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_years, PyArrayObject *__pyx_v_months, PyArrayObject *__pyx_v_days) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_n; PyArrayObject *__pyx_v_result = 0; PyObject *__pyx_v_datetime = NULL; __Pyx_LocalBuf_ND __pyx_pybuffernd_days; __Pyx_Buffer __pyx_pybuffer_days; __Pyx_LocalBuf_ND __pyx_pybuffernd_months; __Pyx_Buffer __pyx_pybuffer_months; __Pyx_LocalBuf_ND __pyx_pybuffernd_result; __Pyx_Buffer __pyx_pybuffer_result; __Pyx_LocalBuf_ND __pyx_pybuffernd_years; __Pyx_Buffer __pyx_pybuffer_years; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; Py_ssize_t __pyx_t_3; int __pyx_t_4; int __pyx_t_5; int __pyx_t_6; 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; Py_ssize_t __pyx_t_15; Py_ssize_t __pyx_t_16; Py_ssize_t __pyx_t_17; PyObject **__pyx_t_18; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("try_parse_year_month_day", 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_years.pybuffer.buf = NULL; __pyx_pybuffer_years.refcount = 0; __pyx_pybuffernd_years.data = NULL; __pyx_pybuffernd_years.rcbuffer = &__pyx_pybuffer_years; __pyx_pybuffer_months.pybuffer.buf = NULL; __pyx_pybuffer_months.refcount = 0; __pyx_pybuffernd_months.data = NULL; __pyx_pybuffernd_months.rcbuffer = &__pyx_pybuffer_months; __pyx_pybuffer_days.pybuffer.buf = NULL; __pyx_pybuffer_days.refcount = 0; __pyx_pybuffernd_days.data = NULL; __pyx_pybuffernd_days.rcbuffer = &__pyx_pybuffer_days; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_years.rcbuffer->pybuffer, (PyObject*)__pyx_v_years, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 731; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_years.diminfo[0].strides = __pyx_pybuffernd_years.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_years.diminfo[0].shape = __pyx_pybuffernd_years.rcbuffer->pybuffer.shape[0]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_months.rcbuffer->pybuffer, (PyObject*)__pyx_v_months, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 731; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_months.diminfo[0].strides = __pyx_pybuffernd_months.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_months.diminfo[0].shape = __pyx_pybuffernd_months.rcbuffer->pybuffer.shape[0]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_days.rcbuffer->pybuffer, (PyObject*)__pyx_v_days, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 731; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_days.diminfo[0].strides = __pyx_pybuffernd_days.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_days.diminfo[0].shape = __pyx_pybuffernd_days.rcbuffer->pybuffer.shape[0]; /* "pandas/src/inference.pyx":737 * ndarray[object] result * * from datetime import datetime # <<<<<<<<<<<<<< * * n = len(years) */ __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 737; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_n_s_datetime); PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_datetime); __Pyx_GIVEREF(__pyx_n_s_datetime); __pyx_t_2 = __Pyx_Import(__pyx_n_s_datetime, __pyx_t_1, -1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 737; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_datetime); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 737; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_t_1); __pyx_v_datetime = __pyx_t_1; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/inference.pyx":739 * from datetime import datetime * * n = len(years) # <<<<<<<<<<<<<< * if len(months) != n or len(days) != n: * raise ValueError('Length of years/months/days must all be equal') */ __pyx_t_3 = PyObject_Length(((PyObject *)__pyx_v_years)); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 739; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_3; /* "pandas/src/inference.pyx":740 * * n = len(years) * if len(months) != n or len(days) != n: # <<<<<<<<<<<<<< * raise ValueError('Length of years/months/days must all be equal') * result = np.empty(n, dtype='O') */ __pyx_t_3 = PyObject_Length(((PyObject *)__pyx_v_months)); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 740; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_4 = ((__pyx_t_3 != __pyx_v_n) != 0); if (!__pyx_t_4) { __pyx_t_3 = PyObject_Length(((PyObject *)__pyx_v_days)); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 740; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_5 = ((__pyx_t_3 != __pyx_v_n) != 0); __pyx_t_6 = __pyx_t_5; } else { __pyx_t_6 = __pyx_t_4; } if (__pyx_t_6) { /* "pandas/src/inference.pyx":741 * n = len(years) * if len(months) != n or len(days) != n: * raise ValueError('Length of years/months/days must all be equal') # <<<<<<<<<<<<<< * result = np.empty(n, dtype='O') * */ __pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__40, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 741; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 741; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } /* "pandas/src/inference.pyx":742 * if len(months) != n or len(days) != n: * raise ValueError('Length of years/months/days must all be equal') * result = np.empty(n, dtype='O') # <<<<<<<<<<<<<< * * for i from 0 <= i < n: */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 742; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_empty); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 742; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_n); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 742; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 742; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 742; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_dtype, __pyx_n_s_O) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 742; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_8 = PyObject_Call(__pyx_t_1, __pyx_t_7, __pyx_t_2); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 742; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (!(likely(((__pyx_t_8) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_8, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 742; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_9 = ((PyArrayObject *)__pyx_t_8); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __pyx_t_10 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_t_9, &__Pyx_TypeInfo_object, 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_result.rcbuffer->pybuffer, (PyObject*)__pyx_v_result, &__Pyx_TypeInfo_object, 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_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_10 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 742; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_9 = 0; __pyx_v_result = ((PyArrayObject *)__pyx_t_8); __pyx_t_8 = 0; /* "pandas/src/inference.pyx":744 * result = np.empty(n, dtype='O') * * for i from 0 <= i < n: # <<<<<<<<<<<<<< * result[i] = datetime(int(years[i]), int(months[i]), int(days[i])) * */ __pyx_t_3 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_3; __pyx_v_i++) { /* "pandas/src/inference.pyx":745 * * for i from 0 <= i < n: * result[i] = datetime(int(years[i]), int(months[i]), int(days[i])) # <<<<<<<<<<<<<< * * return result */ __pyx_t_14 = __pyx_v_i; __pyx_t_10 = -1; if (__pyx_t_14 < 0) { __pyx_t_14 += __pyx_pybuffernd_years.diminfo[0].shape; if (unlikely(__pyx_t_14 < 0)) __pyx_t_10 = 0; } else if (unlikely(__pyx_t_14 >= __pyx_pybuffernd_years.diminfo[0].shape)) __pyx_t_10 = 0; if (unlikely(__pyx_t_10 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_10); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 745; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_8 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_years.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_years.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_8); __pyx_t_2 = PyNumber_Int(__pyx_t_8); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 745; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_15 = __pyx_v_i; __pyx_t_10 = -1; if (__pyx_t_15 < 0) { __pyx_t_15 += __pyx_pybuffernd_months.diminfo[0].shape; if (unlikely(__pyx_t_15 < 0)) __pyx_t_10 = 0; } else if (unlikely(__pyx_t_15 >= __pyx_pybuffernd_months.diminfo[0].shape)) __pyx_t_10 = 0; if (unlikely(__pyx_t_10 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_10); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 745; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_8 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_months.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_months.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_8); __pyx_t_7 = PyNumber_Int(__pyx_t_8); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 745; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_16 = __pyx_v_i; __pyx_t_10 = -1; if (__pyx_t_16 < 0) { __pyx_t_16 += __pyx_pybuffernd_days.diminfo[0].shape; if (unlikely(__pyx_t_16 < 0)) __pyx_t_10 = 0; } else if (unlikely(__pyx_t_16 >= __pyx_pybuffernd_days.diminfo[0].shape)) __pyx_t_10 = 0; if (unlikely(__pyx_t_10 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_10); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 745; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_8 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_days.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_days.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_8); __pyx_t_1 = PyNumber_Int(__pyx_t_8); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 745; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_8 = PyTuple_New(3); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 745; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_7); __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_8, 2, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_2 = 0; __pyx_t_7 = 0; __pyx_t_1 = 0; __pyx_t_1 = PyObject_Call(__pyx_v_datetime, __pyx_t_8, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 745; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_17 = __pyx_v_i; __pyx_t_10 = -1; if (__pyx_t_17 < 0) { __pyx_t_17 += __pyx_pybuffernd_result.diminfo[0].shape; if (unlikely(__pyx_t_17 < 0)) __pyx_t_10 = 0; } else if (unlikely(__pyx_t_17 >= __pyx_pybuffernd_result.diminfo[0].shape)) __pyx_t_10 = 0; if (unlikely(__pyx_t_10 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_10); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 745; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_18 = __Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_result.diminfo[0].strides); __Pyx_GOTREF(*__pyx_t_18); __Pyx_INCREF(__pyx_t_1); __Pyx_DECREF(*__pyx_t_18); *__pyx_t_18 = __pyx_t_1; __Pyx_GIVEREF(*__pyx_t_18); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } /* "pandas/src/inference.pyx":747 * result[i] = datetime(int(years[i]), int(months[i]), int(days[i])) * * return result # <<<<<<<<<<<<<< * * def try_parse_datetime_components(ndarray[object] years, */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_result)); __pyx_r = ((PyObject *)__pyx_v_result); goto __pyx_L0; /* "pandas/src/inference.pyx":731 * * * def try_parse_year_month_day(ndarray[object] years, ndarray[object] months, # <<<<<<<<<<<<<< * ndarray[object] days): * cdef: */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_days.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_months.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_years.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.lib.try_parse_year_month_day", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_days.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_months.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_years.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_result); __Pyx_XDECREF(__pyx_v_datetime); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/inference.pyx":749 * return result * * def try_parse_datetime_components(ndarray[object] years, # <<<<<<<<<<<<<< * ndarray[object] months, * ndarray[object] days, */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_3lib_153try_parse_datetime_components(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_3lib_153try_parse_datetime_components = {__Pyx_NAMESTR("try_parse_datetime_components"), (PyCFunction)__pyx_pw_6pandas_3lib_153try_parse_datetime_components, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_3lib_153try_parse_datetime_components(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_years = 0; PyArrayObject *__pyx_v_months = 0; PyArrayObject *__pyx_v_days = 0; PyArrayObject *__pyx_v_hours = 0; PyArrayObject *__pyx_v_minutes = 0; PyArrayObject *__pyx_v_seconds = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("try_parse_datetime_components (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_years,&__pyx_n_s_months,&__pyx_n_s_days,&__pyx_n_s_hours,&__pyx_n_s_minutes,&__pyx_n_s_seconds,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); case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_years)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_months)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("try_parse_datetime_components", 1, 6, 6, 1); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 749; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_days)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("try_parse_datetime_components", 1, 6, 6, 2); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 749; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_hours)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("try_parse_datetime_components", 1, 6, 6, 3); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 749; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 4: if (likely((values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_minutes)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("try_parse_datetime_components", 1, 6, 6, 4); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 749; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 5: if (likely((values[5] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_seconds)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("try_parse_datetime_components", 1, 6, 6, 5); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 749; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "try_parse_datetime_components") < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 749; __pyx_clineno = __LINE__; goto __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_years = ((PyArrayObject *)values[0]); __pyx_v_months = ((PyArrayObject *)values[1]); __pyx_v_days = ((PyArrayObject *)values[2]); __pyx_v_hours = ((PyArrayObject *)values[3]); __pyx_v_minutes = ((PyArrayObject *)values[4]); __pyx_v_seconds = ((PyArrayObject *)values[5]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("try_parse_datetime_components", 1, 6, 6, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 749; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.lib.try_parse_datetime_components", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_years), __pyx_ptype_5numpy_ndarray, 1, "years", 0))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 749; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_months), __pyx_ptype_5numpy_ndarray, 1, "months", 0))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 750; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_days), __pyx_ptype_5numpy_ndarray, 1, "days", 0))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 751; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_hours), __pyx_ptype_5numpy_ndarray, 1, "hours", 0))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 752; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_minutes), __pyx_ptype_5numpy_ndarray, 1, "minutes", 0))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 753; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_seconds), __pyx_ptype_5numpy_ndarray, 1, "seconds", 0))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 754; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_3lib_152try_parse_datetime_components(__pyx_self, __pyx_v_years, __pyx_v_months, __pyx_v_days, __pyx_v_hours, __pyx_v_minutes, __pyx_v_seconds); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_3lib_152try_parse_datetime_components(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_years, PyArrayObject *__pyx_v_months, PyArrayObject *__pyx_v_days, PyArrayObject *__pyx_v_hours, PyArrayObject *__pyx_v_minutes, PyArrayObject *__pyx_v_seconds) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_n; PyArrayObject *__pyx_v_result = 0; int __pyx_v_secs; double __pyx_v_float_secs; double __pyx_v_micros; PyObject *__pyx_v_datetime = NULL; __Pyx_LocalBuf_ND __pyx_pybuffernd_days; __Pyx_Buffer __pyx_pybuffer_days; __Pyx_LocalBuf_ND __pyx_pybuffernd_hours; __Pyx_Buffer __pyx_pybuffer_hours; __Pyx_LocalBuf_ND __pyx_pybuffernd_minutes; __Pyx_Buffer __pyx_pybuffer_minutes; __Pyx_LocalBuf_ND __pyx_pybuffernd_months; __Pyx_Buffer __pyx_pybuffer_months; __Pyx_LocalBuf_ND __pyx_pybuffernd_result; __Pyx_Buffer __pyx_pybuffer_result; __Pyx_LocalBuf_ND __pyx_pybuffernd_seconds; __Pyx_Buffer __pyx_pybuffer_seconds; __Pyx_LocalBuf_ND __pyx_pybuffernd_years; __Pyx_Buffer __pyx_pybuffer_years; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; Py_ssize_t __pyx_t_3; int __pyx_t_4; int __pyx_t_5; int __pyx_t_6; int __pyx_t_7; int __pyx_t_8; int __pyx_t_9; PyObject *__pyx_t_10 = NULL; PyObject *__pyx_t_11 = NULL; PyArrayObject *__pyx_t_12 = NULL; int __pyx_t_13; PyObject *__pyx_t_14 = NULL; PyObject *__pyx_t_15 = NULL; PyObject *__pyx_t_16 = NULL; Py_ssize_t __pyx_t_17; double __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; PyObject *__pyx_t_23 = NULL; Py_ssize_t __pyx_t_24; PyObject *__pyx_t_25 = NULL; PyObject *__pyx_t_26 = NULL; PyObject *__pyx_t_27 = NULL; Py_ssize_t __pyx_t_28; PyObject **__pyx_t_29; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("try_parse_datetime_components", 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_years.pybuffer.buf = NULL; __pyx_pybuffer_years.refcount = 0; __pyx_pybuffernd_years.data = NULL; __pyx_pybuffernd_years.rcbuffer = &__pyx_pybuffer_years; __pyx_pybuffer_months.pybuffer.buf = NULL; __pyx_pybuffer_months.refcount = 0; __pyx_pybuffernd_months.data = NULL; __pyx_pybuffernd_months.rcbuffer = &__pyx_pybuffer_months; __pyx_pybuffer_days.pybuffer.buf = NULL; __pyx_pybuffer_days.refcount = 0; __pyx_pybuffernd_days.data = NULL; __pyx_pybuffernd_days.rcbuffer = &__pyx_pybuffer_days; __pyx_pybuffer_hours.pybuffer.buf = NULL; __pyx_pybuffer_hours.refcount = 0; __pyx_pybuffernd_hours.data = NULL; __pyx_pybuffernd_hours.rcbuffer = &__pyx_pybuffer_hours; __pyx_pybuffer_minutes.pybuffer.buf = NULL; __pyx_pybuffer_minutes.refcount = 0; __pyx_pybuffernd_minutes.data = NULL; __pyx_pybuffernd_minutes.rcbuffer = &__pyx_pybuffer_minutes; __pyx_pybuffer_seconds.pybuffer.buf = NULL; __pyx_pybuffer_seconds.refcount = 0; __pyx_pybuffernd_seconds.data = NULL; __pyx_pybuffernd_seconds.rcbuffer = &__pyx_pybuffer_seconds; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_years.rcbuffer->pybuffer, (PyObject*)__pyx_v_years, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 749; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_years.diminfo[0].strides = __pyx_pybuffernd_years.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_years.diminfo[0].shape = __pyx_pybuffernd_years.rcbuffer->pybuffer.shape[0]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_months.rcbuffer->pybuffer, (PyObject*)__pyx_v_months, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 749; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_months.diminfo[0].strides = __pyx_pybuffernd_months.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_months.diminfo[0].shape = __pyx_pybuffernd_months.rcbuffer->pybuffer.shape[0]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_days.rcbuffer->pybuffer, (PyObject*)__pyx_v_days, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 749; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_days.diminfo[0].strides = __pyx_pybuffernd_days.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_days.diminfo[0].shape = __pyx_pybuffernd_days.rcbuffer->pybuffer.shape[0]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_hours.rcbuffer->pybuffer, (PyObject*)__pyx_v_hours, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 749; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_hours.diminfo[0].strides = __pyx_pybuffernd_hours.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_hours.diminfo[0].shape = __pyx_pybuffernd_hours.rcbuffer->pybuffer.shape[0]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_minutes.rcbuffer->pybuffer, (PyObject*)__pyx_v_minutes, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 749; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_minutes.diminfo[0].strides = __pyx_pybuffernd_minutes.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_minutes.diminfo[0].shape = __pyx_pybuffernd_minutes.rcbuffer->pybuffer.shape[0]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_seconds.rcbuffer->pybuffer, (PyObject*)__pyx_v_seconds, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 749; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_seconds.diminfo[0].strides = __pyx_pybuffernd_seconds.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_seconds.diminfo[0].shape = __pyx_pybuffernd_seconds.rcbuffer->pybuffer.shape[0]; /* "pandas/src/inference.pyx":763 * double micros * * from datetime import datetime # <<<<<<<<<<<<<< * * n = len(years) */ __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 763; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_n_s_datetime); PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_datetime); __Pyx_GIVEREF(__pyx_n_s_datetime); __pyx_t_2 = __Pyx_Import(__pyx_n_s_datetime, __pyx_t_1, -1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 763; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_datetime); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 763; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_t_1); __pyx_v_datetime = __pyx_t_1; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/inference.pyx":765 * from datetime import datetime * * n = len(years) # <<<<<<<<<<<<<< * if (len(months) != n or len(days) != n or len(hours) != n or * len(minutes) != n or len(seconds) != n): */ __pyx_t_3 = PyObject_Length(((PyObject *)__pyx_v_years)); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 765; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_3; /* "pandas/src/inference.pyx":766 * * n = len(years) * if (len(months) != n or len(days) != n or len(hours) != n or # <<<<<<<<<<<<<< * len(minutes) != n or len(seconds) != n): * raise ValueError('Length of all datetime components must be equal') */ __pyx_t_3 = PyObject_Length(((PyObject *)__pyx_v_months)); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 766; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_4 = ((__pyx_t_3 != __pyx_v_n) != 0); if (!__pyx_t_4) { __pyx_t_3 = PyObject_Length(((PyObject *)__pyx_v_days)); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 766; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_5 = ((__pyx_t_3 != __pyx_v_n) != 0); if (!__pyx_t_5) { __pyx_t_3 = PyObject_Length(((PyObject *)__pyx_v_hours)); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 766; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_6 = ((__pyx_t_3 != __pyx_v_n) != 0); if (!__pyx_t_6) { /* "pandas/src/inference.pyx":767 * n = len(years) * if (len(months) != n or len(days) != n or len(hours) != n or * len(minutes) != n or len(seconds) != n): # <<<<<<<<<<<<<< * raise ValueError('Length of all datetime components must be equal') * result = np.empty(n, dtype='O') */ __pyx_t_3 = PyObject_Length(((PyObject *)__pyx_v_minutes)); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 767; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_7 = ((__pyx_t_3 != __pyx_v_n) != 0); if (!__pyx_t_7) { __pyx_t_3 = PyObject_Length(((PyObject *)__pyx_v_seconds)); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 767; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_8 = ((__pyx_t_3 != __pyx_v_n) != 0); __pyx_t_9 = __pyx_t_8; } else { __pyx_t_9 = __pyx_t_7; } __pyx_t_7 = __pyx_t_9; } else { __pyx_t_7 = __pyx_t_6; } __pyx_t_6 = __pyx_t_7; } else { __pyx_t_6 = __pyx_t_5; } __pyx_t_5 = __pyx_t_6; } else { __pyx_t_5 = __pyx_t_4; } if (__pyx_t_5) { /* "pandas/src/inference.pyx":768 * if (len(months) != n or len(days) != n or len(hours) != n or * len(minutes) != n or len(seconds) != n): * raise ValueError('Length of all datetime components must be equal') # <<<<<<<<<<<<<< * result = np.empty(n, dtype='O') * */ __pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__41, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 768; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 768; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } /* "pandas/src/inference.pyx":769 * len(minutes) != n or len(seconds) != n): * raise ValueError('Length of all datetime components must be equal') * result = np.empty(n, dtype='O') # <<<<<<<<<<<<<< * * for i from 0 <= i < n: */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 769; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_empty); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 769; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_n); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 769; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_10 = PyTuple_New(1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 769; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 769; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_dtype, __pyx_n_s_O) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 769; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_11 = PyObject_Call(__pyx_t_1, __pyx_t_10, __pyx_t_2); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 769; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (!(likely(((__pyx_t_11) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_11, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 769; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_12 = ((PyArrayObject *)__pyx_t_11); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __pyx_t_13 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_t_12, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_13 < 0)) { PyErr_Fetch(&__pyx_t_14, &__pyx_t_15, &__pyx_t_16); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_v_result, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_14); Py_XDECREF(__pyx_t_15); Py_XDECREF(__pyx_t_16); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_14, __pyx_t_15, __pyx_t_16); } } __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_13 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 769; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_12 = 0; __pyx_v_result = ((PyArrayObject *)__pyx_t_11); __pyx_t_11 = 0; /* "pandas/src/inference.pyx":771 * result = np.empty(n, dtype='O') * * for i from 0 <= i < n: # <<<<<<<<<<<<<< * float_secs = float(seconds[i]) * secs = int(float_secs) */ __pyx_t_3 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_3; __pyx_v_i++) { /* "pandas/src/inference.pyx":772 * * for i from 0 <= i < n: * float_secs = float(seconds[i]) # <<<<<<<<<<<<<< * secs = int(float_secs) * */ __pyx_t_17 = __pyx_v_i; __pyx_t_13 = -1; if (__pyx_t_17 < 0) { __pyx_t_17 += __pyx_pybuffernd_seconds.diminfo[0].shape; if (unlikely(__pyx_t_17 < 0)) __pyx_t_13 = 0; } else if (unlikely(__pyx_t_17 >= __pyx_pybuffernd_seconds.diminfo[0].shape)) __pyx_t_13 = 0; if (unlikely(__pyx_t_13 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_13); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 772; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_11 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_seconds.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_seconds.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_11); __pyx_t_18 = __Pyx_PyObject_AsDouble(__pyx_t_11); if (unlikely(__pyx_t_18 == ((double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 772; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __pyx_v_float_secs = __pyx_t_18; /* "pandas/src/inference.pyx":773 * for i from 0 <= i < n: * float_secs = float(seconds[i]) * secs = int(float_secs) # <<<<<<<<<<<<<< * * micros = float_secs - secs */ __pyx_v_secs = ((int)__pyx_v_float_secs); /* "pandas/src/inference.pyx":775 * secs = int(float_secs) * * micros = float_secs - secs # <<<<<<<<<<<<<< * if micros > 0: * micros = micros * 1000000 */ __pyx_v_micros = (__pyx_v_float_secs - __pyx_v_secs); /* "pandas/src/inference.pyx":776 * * micros = float_secs - secs * if micros > 0: # <<<<<<<<<<<<<< * micros = micros * 1000000 * */ __pyx_t_5 = ((__pyx_v_micros > 0.0) != 0); if (__pyx_t_5) { /* "pandas/src/inference.pyx":777 * micros = float_secs - secs * if micros > 0: * micros = micros * 1000000 # <<<<<<<<<<<<<< * * result[i] = datetime(int(years[i]), int(months[i]), int(days[i]), */ __pyx_v_micros = (__pyx_v_micros * 1000000.0); goto __pyx_L6; } __pyx_L6:; /* "pandas/src/inference.pyx":779 * micros = micros * 1000000 * * result[i] = datetime(int(years[i]), int(months[i]), int(days[i]), # <<<<<<<<<<<<<< * int(hours[i]), int(minutes[i]), secs, * int(micros)) */ __pyx_t_19 = __pyx_v_i; __pyx_t_13 = -1; if (__pyx_t_19 < 0) { __pyx_t_19 += __pyx_pybuffernd_years.diminfo[0].shape; if (unlikely(__pyx_t_19 < 0)) __pyx_t_13 = 0; } else if (unlikely(__pyx_t_19 >= __pyx_pybuffernd_years.diminfo[0].shape)) __pyx_t_13 = 0; if (unlikely(__pyx_t_13 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_13); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 779; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_11 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_years.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_years.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_11); __pyx_t_2 = PyNumber_Int(__pyx_t_11); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 779; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __pyx_t_20 = __pyx_v_i; __pyx_t_13 = -1; if (__pyx_t_20 < 0) { __pyx_t_20 += __pyx_pybuffernd_months.diminfo[0].shape; if (unlikely(__pyx_t_20 < 0)) __pyx_t_13 = 0; } else if (unlikely(__pyx_t_20 >= __pyx_pybuffernd_months.diminfo[0].shape)) __pyx_t_13 = 0; if (unlikely(__pyx_t_13 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_13); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 779; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_11 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_months.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_months.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_11); __pyx_t_10 = PyNumber_Int(__pyx_t_11); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 779; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __pyx_t_21 = __pyx_v_i; __pyx_t_13 = -1; if (__pyx_t_21 < 0) { __pyx_t_21 += __pyx_pybuffernd_days.diminfo[0].shape; if (unlikely(__pyx_t_21 < 0)) __pyx_t_13 = 0; } else if (unlikely(__pyx_t_21 >= __pyx_pybuffernd_days.diminfo[0].shape)) __pyx_t_13 = 0; if (unlikely(__pyx_t_13 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_13); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 779; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_11 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_days.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_days.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_11); __pyx_t_1 = PyNumber_Int(__pyx_t_11); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 779; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; /* "pandas/src/inference.pyx":780 * * result[i] = datetime(int(years[i]), int(months[i]), int(days[i]), * int(hours[i]), int(minutes[i]), secs, # <<<<<<<<<<<<<< * int(micros)) * */ __pyx_t_22 = __pyx_v_i; __pyx_t_13 = -1; if (__pyx_t_22 < 0) { __pyx_t_22 += __pyx_pybuffernd_hours.diminfo[0].shape; if (unlikely(__pyx_t_22 < 0)) __pyx_t_13 = 0; } else if (unlikely(__pyx_t_22 >= __pyx_pybuffernd_hours.diminfo[0].shape)) __pyx_t_13 = 0; if (unlikely(__pyx_t_13 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_13); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 780; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_11 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_hours.rcbuffer->pybuffer.buf, __pyx_t_22, __pyx_pybuffernd_hours.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_11); __pyx_t_23 = PyNumber_Int(__pyx_t_11); if (unlikely(!__pyx_t_23)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 780; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_23); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __pyx_t_24 = __pyx_v_i; __pyx_t_13 = -1; if (__pyx_t_24 < 0) { __pyx_t_24 += __pyx_pybuffernd_minutes.diminfo[0].shape; if (unlikely(__pyx_t_24 < 0)) __pyx_t_13 = 0; } else if (unlikely(__pyx_t_24 >= __pyx_pybuffernd_minutes.diminfo[0].shape)) __pyx_t_13 = 0; if (unlikely(__pyx_t_13 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_13); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 780; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_11 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_minutes.rcbuffer->pybuffer.buf, __pyx_t_24, __pyx_pybuffernd_minutes.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_11); __pyx_t_25 = PyNumber_Int(__pyx_t_11); if (unlikely(!__pyx_t_25)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 780; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_25); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __pyx_t_11 = __Pyx_PyInt_From_int(__pyx_v_secs); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 780; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); /* "pandas/src/inference.pyx":781 * result[i] = datetime(int(years[i]), int(months[i]), int(days[i]), * int(hours[i]), int(minutes[i]), secs, * int(micros)) # <<<<<<<<<<<<<< * * return result */ __pyx_t_26 = PyFloat_FromDouble(__pyx_v_micros); if (unlikely(!__pyx_t_26)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 781; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_26); __pyx_t_27 = PyTuple_New(1); if (unlikely(!__pyx_t_27)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 781; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_27); PyTuple_SET_ITEM(__pyx_t_27, 0, __pyx_t_26); __Pyx_GIVEREF(__pyx_t_26); __pyx_t_26 = 0; __pyx_t_26 = PyObject_Call(((PyObject *)((PyObject*)(&PyInt_Type))), __pyx_t_27, NULL); if (unlikely(!__pyx_t_26)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 781; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_26); __Pyx_DECREF(__pyx_t_27); __pyx_t_27 = 0; /* "pandas/src/inference.pyx":779 * micros = micros * 1000000 * * result[i] = datetime(int(years[i]), int(months[i]), int(days[i]), # <<<<<<<<<<<<<< * int(hours[i]), int(minutes[i]), secs, * int(micros)) */ __pyx_t_27 = PyTuple_New(7); if (unlikely(!__pyx_t_27)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 779; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_27); PyTuple_SET_ITEM(__pyx_t_27, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_27, 1, __pyx_t_10); __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_27, 2, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_27, 3, __pyx_t_23); __Pyx_GIVEREF(__pyx_t_23); PyTuple_SET_ITEM(__pyx_t_27, 4, __pyx_t_25); __Pyx_GIVEREF(__pyx_t_25); PyTuple_SET_ITEM(__pyx_t_27, 5, __pyx_t_11); __Pyx_GIVEREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_27, 6, __pyx_t_26); __Pyx_GIVEREF(__pyx_t_26); __pyx_t_2 = 0; __pyx_t_10 = 0; __pyx_t_1 = 0; __pyx_t_23 = 0; __pyx_t_25 = 0; __pyx_t_11 = 0; __pyx_t_26 = 0; __pyx_t_26 = PyObject_Call(__pyx_v_datetime, __pyx_t_27, NULL); if (unlikely(!__pyx_t_26)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 779; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_26); __Pyx_DECREF(__pyx_t_27); __pyx_t_27 = 0; __pyx_t_28 = __pyx_v_i; __pyx_t_13 = -1; if (__pyx_t_28 < 0) { __pyx_t_28 += __pyx_pybuffernd_result.diminfo[0].shape; if (unlikely(__pyx_t_28 < 0)) __pyx_t_13 = 0; } else if (unlikely(__pyx_t_28 >= __pyx_pybuffernd_result.diminfo[0].shape)) __pyx_t_13 = 0; if (unlikely(__pyx_t_13 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_13); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 779; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_29 = __Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_28, __pyx_pybuffernd_result.diminfo[0].strides); __Pyx_GOTREF(*__pyx_t_29); __Pyx_INCREF(__pyx_t_26); __Pyx_DECREF(*__pyx_t_29); *__pyx_t_29 = __pyx_t_26; __Pyx_GIVEREF(*__pyx_t_29); __Pyx_DECREF(__pyx_t_26); __pyx_t_26 = 0; } /* "pandas/src/inference.pyx":783 * int(micros)) * * return result # <<<<<<<<<<<<<< * * def sanitize_objects(ndarray[object] values, set na_values, */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_result)); __pyx_r = ((PyObject *)__pyx_v_result); goto __pyx_L0; /* "pandas/src/inference.pyx":749 * return result * * def try_parse_datetime_components(ndarray[object] years, # <<<<<<<<<<<<<< * ndarray[object] months, * ndarray[object] days, */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_10); __Pyx_XDECREF(__pyx_t_11); __Pyx_XDECREF(__pyx_t_23); __Pyx_XDECREF(__pyx_t_25); __Pyx_XDECREF(__pyx_t_26); __Pyx_XDECREF(__pyx_t_27); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_days.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_hours.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_minutes.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_months.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_seconds.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_years.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.lib.try_parse_datetime_components", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_days.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_hours.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_minutes.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_months.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_seconds.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_years.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_result); __Pyx_XDECREF(__pyx_v_datetime); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/inference.pyx":785 * return result * * def sanitize_objects(ndarray[object] values, set na_values, # <<<<<<<<<<<<<< * convert_empty=True): * cdef: */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_3lib_155sanitize_objects(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_3lib_155sanitize_objects = {__Pyx_NAMESTR("sanitize_objects"), (PyCFunction)__pyx_pw_6pandas_3lib_155sanitize_objects, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_3lib_155sanitize_objects(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_values = 0; PyObject *__pyx_v_na_values = 0; PyObject *__pyx_v_convert_empty = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("sanitize_objects (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_values,&__pyx_n_s_na_values,&__pyx_n_s_convert_empty,0}; PyObject* values[3] = {0,0,0}; /* "pandas/src/inference.pyx":786 * * def sanitize_objects(ndarray[object] values, set na_values, * convert_empty=True): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n */ values[2] = ((PyObject *)Py_True); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_values)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_na_values)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sanitize_objects", 0, 2, 3, 1); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 785; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_convert_empty); if (value) { values[2] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "sanitize_objects") < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 785; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_values = ((PyArrayObject *)values[0]); __pyx_v_na_values = ((PyObject*)values[1]); __pyx_v_convert_empty = values[2]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("sanitize_objects", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 785; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.lib.sanitize_objects", __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_filename = __pyx_f[1]; __pyx_lineno = 785; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_na_values), (&PySet_Type), 1, "na_values", 1))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 785; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_3lib_154sanitize_objects(__pyx_self, __pyx_v_values, __pyx_v_na_values, __pyx_v_convert_empty); /* "pandas/src/inference.pyx":785 * return result * * def sanitize_objects(ndarray[object] values, set na_values, # <<<<<<<<<<<<<< * convert_empty=True): * cdef: */ /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_3lib_154sanitize_objects(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyObject *__pyx_v_na_values, PyObject *__pyx_v_convert_empty) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_n; PyObject *__pyx_v_val = 0; PyObject *__pyx_v_onan = 0; Py_ssize_t __pyx_v_na_count; PyObject *__pyx_v_memo = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_values; __Pyx_Buffer __pyx_pybuffer_values; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; Py_ssize_t __pyx_t_2; PyObject *__pyx_t_3 = NULL; Py_ssize_t __pyx_t_4; int __pyx_t_5; int __pyx_t_6; int __pyx_t_7; int __pyx_t_8; Py_ssize_t __pyx_t_9; PyObject **__pyx_t_10; Py_ssize_t __pyx_t_11; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("sanitize_objects", 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_object, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 785; __pyx_clineno = __LINE__; goto __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/src/inference.pyx":790 * Py_ssize_t i, n * object val, onan * Py_ssize_t na_count = 0 # <<<<<<<<<<<<<< * dict memo = {} * */ __pyx_v_na_count = 0; /* "pandas/src/inference.pyx":791 * object val, onan * Py_ssize_t na_count = 0 * dict memo = {} # <<<<<<<<<<<<<< * * n = len(values) */ __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 791; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_v_memo = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/inference.pyx":793 * dict memo = {} * * n = len(values) # <<<<<<<<<<<<<< * onan = np.nan * */ __pyx_t_2 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 793; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_2; /* "pandas/src/inference.pyx":794 * * n = len(values) * onan = np.nan # <<<<<<<<<<<<<< * * for i from 0 <= i < n: */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 794; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_nan); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 794; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_onan = __pyx_t_3; __pyx_t_3 = 0; /* "pandas/src/inference.pyx":796 * onan = np.nan * * for i from 0 <= i < n: # <<<<<<<<<<<<<< * val = values[i] * if (convert_empty and val == '') or (val in na_values): */ __pyx_t_2 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_2; __pyx_v_i++) { /* "pandas/src/inference.pyx":797 * * for i from 0 <= i < n: * val = values[i] # <<<<<<<<<<<<<< * if (convert_empty and val == '') or (val in na_values): * values[i] = onan */ __pyx_t_4 = __pyx_v_i; __pyx_t_5 = -1; if (__pyx_t_4 < 0) { __pyx_t_4 += __pyx_pybuffernd_values.diminfo[0].shape; if (unlikely(__pyx_t_4 < 0)) __pyx_t_5 = 0; } else if (unlikely(__pyx_t_4 >= __pyx_pybuffernd_values.diminfo[0].shape)) __pyx_t_5 = 0; if (unlikely(__pyx_t_5 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_5); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 797; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_3 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_4, __pyx_pybuffernd_values.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_3); __Pyx_XDECREF_SET(__pyx_v_val, __pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/inference.pyx":798 * for i from 0 <= i < n: * val = values[i] * if (convert_empty and val == '') or (val in na_values): # <<<<<<<<<<<<<< * values[i] = onan * na_count += 1 */ __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_convert_empty); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 798; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__pyx_t_6) { __pyx_t_7 = (__Pyx_PyString_Equals(__pyx_v_val, __pyx_kp_s__34, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 798; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_8 = __pyx_t_7; } else { __pyx_t_8 = __pyx_t_6; } if (!__pyx_t_8) { __pyx_t_6 = (__Pyx_PySequence_Contains(__pyx_v_val, __pyx_v_na_values, Py_EQ)); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 798; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_7 = __pyx_t_6; } else { __pyx_t_7 = __pyx_t_8; } if (__pyx_t_7) { /* "pandas/src/inference.pyx":799 * val = values[i] * if (convert_empty and val == '') or (val in na_values): * values[i] = onan # <<<<<<<<<<<<<< * na_count += 1 * elif val in memo: */ __pyx_t_9 = __pyx_v_i; __pyx_t_5 = -1; if (__pyx_t_9 < 0) { __pyx_t_9 += __pyx_pybuffernd_values.diminfo[0].shape; if (unlikely(__pyx_t_9 < 0)) __pyx_t_5 = 0; } else if (unlikely(__pyx_t_9 >= __pyx_pybuffernd_values.diminfo[0].shape)) __pyx_t_5 = 0; if (unlikely(__pyx_t_5 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_5); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 799; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_10 = __Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_9, __pyx_pybuffernd_values.diminfo[0].strides); __Pyx_GOTREF(*__pyx_t_10); __Pyx_INCREF(__pyx_v_onan); __Pyx_DECREF(*__pyx_t_10); *__pyx_t_10 = __pyx_v_onan; __Pyx_GIVEREF(*__pyx_t_10); /* "pandas/src/inference.pyx":800 * if (convert_empty and val == '') or (val in na_values): * values[i] = onan * na_count += 1 # <<<<<<<<<<<<<< * elif val in memo: * values[i] = memo[val] */ __pyx_v_na_count = (__pyx_v_na_count + 1); goto __pyx_L5; } /* "pandas/src/inference.pyx":801 * values[i] = onan * na_count += 1 * elif val in memo: # <<<<<<<<<<<<<< * values[i] = memo[val] * else: */ __pyx_t_7 = (__Pyx_PyDict_Contains(__pyx_v_val, __pyx_v_memo, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 801; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_8 = (__pyx_t_7 != 0); if (__pyx_t_8) { /* "pandas/src/inference.pyx":802 * na_count += 1 * elif val in memo: * values[i] = memo[val] # <<<<<<<<<<<<<< * else: * memo[val] = val */ __pyx_t_3 = __Pyx_PyDict_GetItem(__pyx_v_memo, __pyx_v_val); if (unlikely(__pyx_t_3 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 802; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_3); __pyx_t_11 = __pyx_v_i; __pyx_t_5 = -1; if (__pyx_t_11 < 0) { __pyx_t_11 += __pyx_pybuffernd_values.diminfo[0].shape; if (unlikely(__pyx_t_11 < 0)) __pyx_t_5 = 0; } else if (unlikely(__pyx_t_11 >= __pyx_pybuffernd_values.diminfo[0].shape)) __pyx_t_5 = 0; if (unlikely(__pyx_t_5 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_5); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 802; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_10 = __Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_11, __pyx_pybuffernd_values.diminfo[0].strides); __Pyx_GOTREF(*__pyx_t_10); __Pyx_INCREF(__pyx_t_3); __Pyx_DECREF(*__pyx_t_10); *__pyx_t_10 = __pyx_t_3; __Pyx_GIVEREF(*__pyx_t_10); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L5; } /*else*/ { /* "pandas/src/inference.pyx":804 * values[i] = memo[val] * else: * memo[val] = val # <<<<<<<<<<<<<< * * return na_count */ if (unlikely(PyDict_SetItem(__pyx_v_memo, __pyx_v_val, __pyx_v_val) < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 804; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_L5:; } /* "pandas/src/inference.pyx":806 * memo[val] = val * * return na_count # <<<<<<<<<<<<<< * * def maybe_convert_bool(ndarray[object] arr, */ __Pyx_XDECREF(__pyx_r); __pyx_t_3 = PyInt_FromSsize_t(__pyx_v_na_count); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 806; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; /* "pandas/src/inference.pyx":785 * return result * * def sanitize_objects(ndarray[object] values, set na_values, # <<<<<<<<<<<<<< * convert_empty=True): * cdef: */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_3); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __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.lib.sanitize_objects", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF(__pyx_v_val); __Pyx_XDECREF(__pyx_v_onan); __Pyx_XDECREF(__pyx_v_memo); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/inference.pyx":808 * return na_count * * def maybe_convert_bool(ndarray[object] arr, # <<<<<<<<<<<<<< * true_values=None, false_values=None): * cdef: */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_3lib_157maybe_convert_bool(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_3lib_157maybe_convert_bool = {__Pyx_NAMESTR("maybe_convert_bool"), (PyCFunction)__pyx_pw_6pandas_3lib_157maybe_convert_bool, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_3lib_157maybe_convert_bool(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_arr = 0; PyObject *__pyx_v_true_values = 0; PyObject *__pyx_v_false_values = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("maybe_convert_bool (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_arr,&__pyx_n_s_true_values,&__pyx_n_s_false_values,0}; PyObject* values[3] = {0,0,0}; /* "pandas/src/inference.pyx":809 * * def maybe_convert_bool(ndarray[object] arr, * true_values=None, false_values=None): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n */ values[1] = ((PyObject *)Py_None); values[2] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_arr)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_true_values); if (value) { values[1] = value; kw_args--; } } case 2: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_false_values); if (value) { values[2] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "maybe_convert_bool") < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 808; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_arr = ((PyArrayObject *)values[0]); __pyx_v_true_values = values[1]; __pyx_v_false_values = values[2]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("maybe_convert_bool", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 808; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.lib.maybe_convert_bool", __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_filename = __pyx_f[1]; __pyx_lineno = 808; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_3lib_156maybe_convert_bool(__pyx_self, __pyx_v_arr, __pyx_v_true_values, __pyx_v_false_values); /* "pandas/src/inference.pyx":808 * return na_count * * def maybe_convert_bool(ndarray[object] arr, # <<<<<<<<<<<<<< * true_values=None, false_values=None): * cdef: */ /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_3lib_156maybe_convert_bool(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_arr, PyObject *__pyx_v_true_values, PyObject *__pyx_v_false_values) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_n; PyArrayObject *__pyx_v_result = 0; PyObject *__pyx_v_val = 0; PyObject *__pyx_v_true_vals = 0; PyObject *__pyx_v_false_vals = 0; int __pyx_v_na_count; PyObject *__pyx_v_mask = NULL; __Pyx_LocalBuf_ND __pyx_pybuffernd_arr; __Pyx_Buffer __pyx_pybuffer_arr; __Pyx_LocalBuf_ND __pyx_pybuffernd_result; __Pyx_Buffer __pyx_pybuffer_result; 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; int __pyx_t_12; int __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; PyArrayObject *__pyx_t_20 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("maybe_convert_bool", 0); __Pyx_INCREF((PyObject *)__pyx_v_arr); __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_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_filename = __pyx_f[1]; __pyx_lineno = 808; __pyx_clineno = __LINE__; goto __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/src/inference.pyx":815 * object val * set true_vals, false_vals * int na_count = 0 # <<<<<<<<<<<<<< * * n = len(arr) */ __pyx_v_na_count = 0; /* "pandas/src/inference.pyx":817 * int na_count = 0 * * n = len(arr) # <<<<<<<<<<<<<< * result = np.empty(n, dtype=np.uint8) * */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_arr)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 817; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/src/inference.pyx":818 * * n = len(arr) * result = np.empty(n, dtype=np.uint8) # <<<<<<<<<<<<<< * * # the defaults */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 818; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 818; __pyx_clineno = __LINE__; goto __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_n); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 818; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 818; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 818; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 818; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_uint8); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 818; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 818; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyObject_Call(__pyx_t_3, __pyx_t_4, __pyx_t_2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 818; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 818; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_7 = ((PyArrayObject *)__pyx_t_6); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_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_result.rcbuffer->pybuffer, (PyObject*)__pyx_v_result, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_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_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_8 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 818; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_7 = 0; __pyx_v_result = ((PyArrayObject *)__pyx_t_6); __pyx_t_6 = 0; /* "pandas/src/inference.pyx":821 * * # the defaults * true_vals = set(('True', 'TRUE', 'true')) # <<<<<<<<<<<<<< * false_vals = set(('False', 'FALSE', 'false')) * */ __pyx_t_6 = PySet_New(0); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 821; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); if (PySet_Add(__pyx_t_6, __pyx_n_s_True) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 821; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (PySet_Add(__pyx_t_6, __pyx_n_s_TRUE) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 821; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (PySet_Add(__pyx_t_6, __pyx_n_s_true) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 821; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_true_vals = ((PyObject*)__pyx_t_6); __pyx_t_6 = 0; /* "pandas/src/inference.pyx":822 * # the defaults * true_vals = set(('True', 'TRUE', 'true')) * false_vals = set(('False', 'FALSE', 'false')) # <<<<<<<<<<<<<< * * if true_values is not None: */ __pyx_t_6 = PySet_New(0); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 822; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); if (PySet_Add(__pyx_t_6, __pyx_n_s_False) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 822; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (PySet_Add(__pyx_t_6, __pyx_n_s_FALSE) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 822; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (PySet_Add(__pyx_t_6, __pyx_n_s_false) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 822; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_false_vals = ((PyObject*)__pyx_t_6); __pyx_t_6 = 0; /* "pandas/src/inference.pyx":824 * false_vals = set(('False', 'FALSE', 'false')) * * if true_values is not None: # <<<<<<<<<<<<<< * true_vals = true_vals | set(true_values) * */ __pyx_t_12 = (__pyx_v_true_values != Py_None); __pyx_t_13 = (__pyx_t_12 != 0); if (__pyx_t_13) { /* "pandas/src/inference.pyx":825 * * if true_values is not None: * true_vals = true_vals | set(true_values) # <<<<<<<<<<<<<< * * if false_values is not None: */ __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 825; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(__pyx_v_true_values); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_true_values); __Pyx_GIVEREF(__pyx_v_true_values); __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)(&PySet_Type))), __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 825; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyNumber_Or(__pyx_v_true_vals, __pyx_t_2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 825; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF_SET(__pyx_v_true_vals, ((PyObject*)__pyx_t_6)); __pyx_t_6 = 0; goto __pyx_L3; } __pyx_L3:; /* "pandas/src/inference.pyx":827 * true_vals = true_vals | set(true_values) * * if false_values is not None: # <<<<<<<<<<<<<< * false_vals = false_vals | set(false_values) * */ __pyx_t_13 = (__pyx_v_false_values != Py_None); __pyx_t_12 = (__pyx_t_13 != 0); if (__pyx_t_12) { /* "pandas/src/inference.pyx":828 * * if false_values is not None: * false_vals = false_vals | set(false_values) # <<<<<<<<<<<<<< * * for i from 0 <= i < n: */ __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 828; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(__pyx_v_false_values); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_false_values); __Pyx_GIVEREF(__pyx_v_false_values); __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)(&PySet_Type))), __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 828; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyNumber_Or(__pyx_v_false_vals, __pyx_t_2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 828; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF_SET(__pyx_v_false_vals, ((PyObject*)__pyx_t_6)); __pyx_t_6 = 0; goto __pyx_L4; } __pyx_L4:; /* "pandas/src/inference.pyx":830 * false_vals = false_vals | set(false_values) * * for i from 0 <= i < n: # <<<<<<<<<<<<<< * val = arr[i] * */ __pyx_t_1 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_1; __pyx_v_i++) { /* "pandas/src/inference.pyx":831 * * for i from 0 <= i < n: * val = arr[i] # <<<<<<<<<<<<<< * * if cpython.PyBool_Check(val): */ __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_filename = __pyx_f[1]; __pyx_lineno = 831; __pyx_clineno = __LINE__; goto __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_val, __pyx_t_6); __pyx_t_6 = 0; /* "pandas/src/inference.pyx":833 * val = arr[i] * * if cpython.PyBool_Check(val): # <<<<<<<<<<<<<< * if val is True: * result[i] = 1 */ __pyx_t_12 = (PyBool_Check(__pyx_v_val) != 0); if (__pyx_t_12) { /* "pandas/src/inference.pyx":834 * * if cpython.PyBool_Check(val): * if val is True: # <<<<<<<<<<<<<< * result[i] = 1 * else: */ __pyx_t_12 = (__pyx_v_val == Py_True); __pyx_t_13 = (__pyx_t_12 != 0); if (__pyx_t_13) { /* "pandas/src/inference.pyx":835 * if cpython.PyBool_Check(val): * if val is True: * result[i] = 1 # <<<<<<<<<<<<<< * else: * result[i] = 0 */ __pyx_t_15 = __pyx_v_i; __pyx_t_8 = -1; if (__pyx_t_15 < 0) { __pyx_t_15 += __pyx_pybuffernd_result.diminfo[0].shape; if (unlikely(__pyx_t_15 < 0)) __pyx_t_8 = 0; } else if (unlikely(__pyx_t_15 >= __pyx_pybuffernd_result.diminfo[0].shape)) __pyx_t_8 = 0; if (unlikely(__pyx_t_8 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_8); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 835; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_result.diminfo[0].strides) = 1; goto __pyx_L8; } /*else*/ { /* "pandas/src/inference.pyx":837 * result[i] = 1 * else: * result[i] = 0 # <<<<<<<<<<<<<< * elif val in true_vals: * result[i] = 1 */ __pyx_t_16 = __pyx_v_i; __pyx_t_8 = -1; if (__pyx_t_16 < 0) { __pyx_t_16 += __pyx_pybuffernd_result.diminfo[0].shape; if (unlikely(__pyx_t_16 < 0)) __pyx_t_8 = 0; } else if (unlikely(__pyx_t_16 >= __pyx_pybuffernd_result.diminfo[0].shape)) __pyx_t_8 = 0; if (unlikely(__pyx_t_8 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_8); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 837; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_result.diminfo[0].strides) = 0; } __pyx_L8:; goto __pyx_L7; } /* "pandas/src/inference.pyx":838 * else: * result[i] = 0 * elif val in true_vals: # <<<<<<<<<<<<<< * result[i] = 1 * elif val in false_vals: */ __pyx_t_13 = (__Pyx_PySequence_Contains(__pyx_v_val, __pyx_v_true_vals, Py_EQ)); if (unlikely(__pyx_t_13 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 838; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_12 = (__pyx_t_13 != 0); if (__pyx_t_12) { /* "pandas/src/inference.pyx":839 * result[i] = 0 * elif val in true_vals: * result[i] = 1 # <<<<<<<<<<<<<< * elif val in false_vals: * result[i] = 0 */ __pyx_t_17 = __pyx_v_i; __pyx_t_8 = -1; if (__pyx_t_17 < 0) { __pyx_t_17 += __pyx_pybuffernd_result.diminfo[0].shape; if (unlikely(__pyx_t_17 < 0)) __pyx_t_8 = 0; } else if (unlikely(__pyx_t_17 >= __pyx_pybuffernd_result.diminfo[0].shape)) __pyx_t_8 = 0; if (unlikely(__pyx_t_8 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_8); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 839; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_result.diminfo[0].strides) = 1; goto __pyx_L7; } /* "pandas/src/inference.pyx":840 * elif val in true_vals: * result[i] = 1 * elif val in false_vals: # <<<<<<<<<<<<<< * result[i] = 0 * elif PyFloat_Check(val): */ __pyx_t_12 = (__Pyx_PySequence_Contains(__pyx_v_val, __pyx_v_false_vals, Py_EQ)); if (unlikely(__pyx_t_12 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 840; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_13 = (__pyx_t_12 != 0); if (__pyx_t_13) { /* "pandas/src/inference.pyx":841 * result[i] = 1 * elif val in false_vals: * result[i] = 0 # <<<<<<<<<<<<<< * elif PyFloat_Check(val): * result[i] = UINT8_MAX */ __pyx_t_18 = __pyx_v_i; __pyx_t_8 = -1; if (__pyx_t_18 < 0) { __pyx_t_18 += __pyx_pybuffernd_result.diminfo[0].shape; if (unlikely(__pyx_t_18 < 0)) __pyx_t_8 = 0; } else if (unlikely(__pyx_t_18 >= __pyx_pybuffernd_result.diminfo[0].shape)) __pyx_t_8 = 0; if (unlikely(__pyx_t_8 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_8); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 841; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_result.diminfo[0].strides) = 0; goto __pyx_L7; } /* "pandas/src/inference.pyx":842 * elif val in false_vals: * result[i] = 0 * elif PyFloat_Check(val): # <<<<<<<<<<<<<< * result[i] = UINT8_MAX * na_count += 1 */ __pyx_t_13 = (PyFloat_Check(__pyx_v_val) != 0); if (__pyx_t_13) { /* "pandas/src/inference.pyx":843 * result[i] = 0 * elif PyFloat_Check(val): * result[i] = UINT8_MAX # <<<<<<<<<<<<<< * na_count += 1 * else: */ __pyx_t_19 = __pyx_v_i; __pyx_t_8 = -1; if (__pyx_t_19 < 0) { __pyx_t_19 += __pyx_pybuffernd_result.diminfo[0].shape; if (unlikely(__pyx_t_19 < 0)) __pyx_t_8 = 0; } else if (unlikely(__pyx_t_19 >= __pyx_pybuffernd_result.diminfo[0].shape)) __pyx_t_8 = 0; if (unlikely(__pyx_t_8 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_8); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 843; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_result.diminfo[0].strides) = UINT8_MAX; /* "pandas/src/inference.pyx":844 * elif PyFloat_Check(val): * result[i] = UINT8_MAX * na_count += 1 # <<<<<<<<<<<<<< * else: * return arr */ __pyx_v_na_count = (__pyx_v_na_count + 1); goto __pyx_L7; } /*else*/ { /* "pandas/src/inference.pyx":846 * na_count += 1 * else: * return arr # <<<<<<<<<<<<<< * * if na_count > 0: */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_arr)); __pyx_r = ((PyObject *)__pyx_v_arr); goto __pyx_L0; } __pyx_L7:; } /* "pandas/src/inference.pyx":848 * return arr * * if na_count > 0: # <<<<<<<<<<<<<< * mask = result == UINT8_MAX * arr = result.view(np.bool_).astype(object) */ __pyx_t_13 = ((__pyx_v_na_count > 0) != 0); if (__pyx_t_13) { /* "pandas/src/inference.pyx":849 * * if na_count > 0: * mask = result == UINT8_MAX # <<<<<<<<<<<<<< * arr = result.view(np.bool_).astype(object) * np.putmask(arr, mask, np.nan) */ __pyx_t_6 = __Pyx_PyInt_From_int(UINT8_MAX); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 849; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_2 = PyObject_RichCompare(((PyObject *)__pyx_v_result), __pyx_t_6, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 849; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_v_mask = __pyx_t_2; __pyx_t_2 = 0; /* "pandas/src/inference.pyx":850 * if na_count > 0: * mask = result == UINT8_MAX * arr = result.view(np.bool_).astype(object) # <<<<<<<<<<<<<< * np.putmask(arr, mask, np.nan) * return arr */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_result), __pyx_n_s_view); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 850; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 850; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_bool); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 850; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 850; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyObject_Call(__pyx_t_2, __pyx_t_6, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 850; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_astype); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 850; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 850; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_builtin_object); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_builtin_object); __Pyx_GIVEREF(__pyx_builtin_object); __pyx_t_2 = PyObject_Call(__pyx_t_6, __pyx_t_4, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 850; __pyx_clineno = __LINE__; goto __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; if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 850; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_20 = ((PyArrayObject *)__pyx_t_2); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_arr.rcbuffer->pybuffer); __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_arr.rcbuffer->pybuffer, (PyObject*)__pyx_t_20, &__Pyx_TypeInfo_object, 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_arr.rcbuffer->pybuffer, (PyObject*)__pyx_v_arr, &__Pyx_TypeInfo_object, 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_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]; if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 850; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_20 = 0; __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_2)); __pyx_t_2 = 0; /* "pandas/src/inference.pyx":851 * mask = result == UINT8_MAX * arr = result.view(np.bool_).astype(object) * np.putmask(arr, mask, np.nan) # <<<<<<<<<<<<<< * return arr * else: */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 851; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_putmask); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 851; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 851; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_nan); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 851; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 851; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(((PyObject *)__pyx_v_arr)); PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_arr)); __Pyx_GIVEREF(((PyObject *)__pyx_v_arr)); __Pyx_INCREF(__pyx_v_mask); PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_mask); __Pyx_GIVEREF(__pyx_v_mask); PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyObject_Call(__pyx_t_4, __pyx_t_2, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 851; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; /* "pandas/src/inference.pyx":852 * arr = result.view(np.bool_).astype(object) * np.putmask(arr, mask, np.nan) * return arr # <<<<<<<<<<<<<< * else: * return result.view(np.bool_) */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_arr)); __pyx_r = ((PyObject *)__pyx_v_arr); goto __pyx_L0; } /*else*/ { /* "pandas/src/inference.pyx":854 * return arr * else: * return result.view(np.bool_) # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_result), __pyx_n_s_view); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 854; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 854; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_bool); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 854; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 854; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyObject_Call(__pyx_t_6, __pyx_t_2, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 854; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; } /* "pandas/src/inference.pyx":808 * return na_count * * def maybe_convert_bool(ndarray[object] arr, # <<<<<<<<<<<<<< * true_values=None, false_values=None): * cdef: */ /* 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_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_arr.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.lib.maybe_convert_bool", __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_result.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_result); __Pyx_XDECREF(__pyx_v_val); __Pyx_XDECREF(__pyx_v_true_vals); __Pyx_XDECREF(__pyx_v_false_vals); __Pyx_XDECREF(__pyx_v_mask); __Pyx_XDECREF((PyObject *)__pyx_v_arr); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/inference.pyx":857 * * * def map_infer_mask(ndarray arr, object f, ndarray[uint8_t] mask, # <<<<<<<<<<<<<< * bint convert=1): * ''' */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_3lib_159map_infer_mask(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6pandas_3lib_158map_infer_mask[] = "\n Substitute for np.vectorize with pandas-friendly dtype inference\n\n Parameters\n ----------\n arr : ndarray\n f : function\n\n Returns\n -------\n mapped : ndarray\n "; static PyMethodDef __pyx_mdef_6pandas_3lib_159map_infer_mask = {__Pyx_NAMESTR("map_infer_mask"), (PyCFunction)__pyx_pw_6pandas_3lib_159map_infer_mask, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_3lib_158map_infer_mask)}; static PyObject *__pyx_pw_6pandas_3lib_159map_infer_mask(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_arr = 0; PyObject *__pyx_v_f = 0; PyArrayObject *__pyx_v_mask = 0; int __pyx_v_convert; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("map_infer_mask (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_arr,&__pyx_n_s_f,&__pyx_n_s_mask,&__pyx_n_s_convert,0}; PyObject* values[4] = {0,0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_arr)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_f)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("map_infer_mask", 0, 3, 4, 1); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 857; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_mask)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("map_infer_mask", 0, 3, 4, 2); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 857; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_convert); if (value) { values[3] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "map_infer_mask") < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 857; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_arr = ((PyArrayObject *)values[0]); __pyx_v_f = values[1]; __pyx_v_mask = ((PyArrayObject *)values[2]); if (values[3]) { __pyx_v_convert = __Pyx_PyObject_IsTrue(values[3]); if (unlikely((__pyx_v_convert == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 858; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } else { __pyx_v_convert = ((int)1); } } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("map_infer_mask", 0, 3, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 857; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.lib.map_infer_mask", __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_filename = __pyx_f[1]; __pyx_lineno = 857; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_mask), __pyx_ptype_5numpy_ndarray, 1, "mask", 0))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 857; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_3lib_158map_infer_mask(__pyx_self, __pyx_v_arr, __pyx_v_f, __pyx_v_mask, __pyx_v_convert); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_3lib_158map_infer_mask(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_arr, PyObject *__pyx_v_f, PyArrayObject *__pyx_v_mask, int __pyx_v_convert) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_n; PyArrayObject *__pyx_v_result = 0; PyObject *__pyx_v_val = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_mask; __Pyx_Buffer __pyx_pybuffer_mask; __Pyx_LocalBuf_ND __pyx_pybuffernd_result; __Pyx_Buffer __pyx_pybuffer_result; 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; PyArrayObject *__pyx_t_6 = NULL; 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; int __pyx_t_13; int __pyx_t_14; int __pyx_t_15; Py_ssize_t __pyx_t_16; PyObject **__pyx_t_17; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("map_infer_mask", 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_mask.pybuffer.buf = NULL; __pyx_pybuffer_mask.refcount = 0; __pyx_pybuffernd_mask.data = NULL; __pyx_pybuffernd_mask.rcbuffer = &__pyx_pybuffer_mask; { __Pyx_BufFmt_StackElem __pyx_stack[1]; 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, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 857; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; /* "pandas/src/inference.pyx":876 * object val * * n = len(arr) # <<<<<<<<<<<<<< * result = np.empty(n, dtype=object) * for i in range(n): */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_arr)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 876; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/src/inference.pyx":877 * * n = len(arr) * result = np.empty(n, dtype=object) # <<<<<<<<<<<<<< * for i in range(n): * if mask[i]: */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 877; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 877; __pyx_clineno = __LINE__; goto __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_n); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 877; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 877; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 877; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_dtype, __pyx_builtin_object) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 877; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_5 = PyObject_Call(__pyx_t_3, __pyx_t_4, __pyx_t_2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 877; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 877; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_6 = ((PyArrayObject *)__pyx_t_5); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_object, 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_result.rcbuffer->pybuffer, (PyObject*)__pyx_v_result, &__Pyx_TypeInfo_object, 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_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_7 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 877; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_6 = 0; __pyx_v_result = ((PyArrayObject *)__pyx_t_5); __pyx_t_5 = 0; /* "pandas/src/inference.pyx":878 * n = len(arr) * result = np.empty(n, dtype=object) * for i in range(n): # <<<<<<<<<<<<<< * if mask[i]: * val = util.get_value_at(arr, i) */ __pyx_t_1 = __pyx_v_n; for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_1; __pyx_t_11+=1) { __pyx_v_i = __pyx_t_11; /* "pandas/src/inference.pyx":879 * result = np.empty(n, dtype=object) * for i in range(n): * if mask[i]: # <<<<<<<<<<<<<< * val = util.get_value_at(arr, i) * else: */ __pyx_t_12 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_12 < 0) { __pyx_t_12 += __pyx_pybuffernd_mask.diminfo[0].shape; if (unlikely(__pyx_t_12 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_12 >= __pyx_pybuffernd_mask.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 879; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_13 = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_mask.rcbuffer->pybuffer.buf, __pyx_t_12, __pyx_pybuffernd_mask.diminfo[0].strides)) != 0); if (__pyx_t_13) { /* "pandas/src/inference.pyx":880 * for i in range(n): * if mask[i]: * val = util.get_value_at(arr, i) # <<<<<<<<<<<<<< * else: * val = f(util.get_value_at(arr, i)) */ __pyx_t_5 = PyInt_FromSsize_t(__pyx_v_i); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 880; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_2 = __pyx_f_4util_get_value_at(__pyx_v_arr, __pyx_t_5); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 880; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF_SET(__pyx_v_val, __pyx_t_2); __pyx_t_2 = 0; goto __pyx_L5; } /*else*/ { /* "pandas/src/inference.pyx":882 * val = util.get_value_at(arr, i) * else: * val = f(util.get_value_at(arr, i)) # <<<<<<<<<<<<<< * * # unbox 0-dim arrays, GH #690 */ __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_i); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 882; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = __pyx_f_4util_get_value_at(__pyx_v_arr, __pyx_t_2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 882; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 882; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyObject_Call(__pyx_v_f, __pyx_t_2, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 882; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF_SET(__pyx_v_val, __pyx_t_5); __pyx_t_5 = 0; /* "pandas/src/inference.pyx":885 * * # unbox 0-dim arrays, GH #690 * if is_array(val) and PyArray_NDIM(val) == 0: # <<<<<<<<<<<<<< * # is there a faster way to unbox? * val = val.item() */ __pyx_t_5 = __pyx_f_4util_is_array(__pyx_v_val); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 885; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_13 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 885; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_13) { if (!(likely(((__pyx_v_val) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_val, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 885; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_14 = (PyArray_NDIM(((PyArrayObject *)__pyx_v_val)) == 0); __pyx_t_15 = __pyx_t_14; } else { __pyx_t_15 = __pyx_t_13; } if (__pyx_t_15) { /* "pandas/src/inference.pyx":887 * if is_array(val) and PyArray_NDIM(val) == 0: * # is there a faster way to unbox? * val = val.item() # <<<<<<<<<<<<<< * * result[i] = val */ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_val, __pyx_n_s_item); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 887; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_2 = PyObject_Call(__pyx_t_5, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 887; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF_SET(__pyx_v_val, __pyx_t_2); __pyx_t_2 = 0; goto __pyx_L6; } __pyx_L6:; } __pyx_L5:; /* "pandas/src/inference.pyx":889 * val = val.item() * * result[i] = val # <<<<<<<<<<<<<< * * if convert: */ __pyx_t_16 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_16 < 0) { __pyx_t_16 += __pyx_pybuffernd_result.diminfo[0].shape; if (unlikely(__pyx_t_16 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_16 >= __pyx_pybuffernd_result.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 889; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_17 = __Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_result.diminfo[0].strides); __Pyx_GOTREF(*__pyx_t_17); __Pyx_INCREF(__pyx_v_val); __Pyx_DECREF(*__pyx_t_17); *__pyx_t_17 = __pyx_v_val; __Pyx_GIVEREF(*__pyx_t_17); } /* "pandas/src/inference.pyx":891 * result[i] = val * * if convert: # <<<<<<<<<<<<<< * return maybe_convert_objects(result, * try_float=0, */ __pyx_t_15 = (__pyx_v_convert != 0); if (__pyx_t_15) { /* "pandas/src/inference.pyx":892 * * if convert: * return maybe_convert_objects(result, # <<<<<<<<<<<<<< * try_float=0, * convert_datetime=0, */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_maybe_convert_objects); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 892; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 892; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(((PyObject *)__pyx_v_result)); PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_v_result)); __Pyx_GIVEREF(((PyObject *)__pyx_v_result)); __pyx_t_4 = PyDict_New(); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 892; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_try_float, __pyx_int_0) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 892; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_convert_datetime, __pyx_int_0) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 892; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_convert_timedelta, __pyx_int_0) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 892; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_3 = PyObject_Call(__pyx_t_2, __pyx_t_5, __pyx_t_4); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 892; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; } /* "pandas/src/inference.pyx":897 * convert_timedelta=0) * * return result # <<<<<<<<<<<<<< * * def map_infer(ndarray arr, object f, bint convert=1): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_result)); __pyx_r = ((PyObject *)__pyx_v_result); goto __pyx_L0; /* "pandas/src/inference.pyx":857 * * * def map_infer_mask(ndarray arr, object f, ndarray[uint8_t] mask, # <<<<<<<<<<<<<< * bint convert=1): * ''' */ /* 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); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_mask.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.lib.map_infer_mask", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_mask.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_result); __Pyx_XDECREF(__pyx_v_val); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/inference.pyx":899 * return result * * def map_infer(ndarray arr, object f, bint convert=1): # <<<<<<<<<<<<<< * ''' * Substitute for np.vectorize with pandas-friendly dtype inference */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_3lib_161map_infer(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6pandas_3lib_160map_infer[] = "\n Substitute for np.vectorize with pandas-friendly dtype inference\n\n Parameters\n ----------\n arr : ndarray\n f : function\n\n Returns\n -------\n mapped : ndarray\n "; static PyMethodDef __pyx_mdef_6pandas_3lib_161map_infer = {__Pyx_NAMESTR("map_infer"), (PyCFunction)__pyx_pw_6pandas_3lib_161map_infer, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_3lib_160map_infer)}; static PyObject *__pyx_pw_6pandas_3lib_161map_infer(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_arr = 0; PyObject *__pyx_v_f = 0; int __pyx_v_convert; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("map_infer (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_arr,&__pyx_n_s_f,&__pyx_n_s_convert,0}; PyObject* values[3] = {0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_arr)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_f)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("map_infer", 0, 2, 3, 1); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 899; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_convert); if (value) { values[2] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "map_infer") < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 899; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_arr = ((PyArrayObject *)values[0]); __pyx_v_f = values[1]; if (values[2]) { __pyx_v_convert = __Pyx_PyObject_IsTrue(values[2]); if (unlikely((__pyx_v_convert == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 899; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } else { __pyx_v_convert = ((int)1); } } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("map_infer", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 899; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.lib.map_infer", __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_filename = __pyx_f[1]; __pyx_lineno = 899; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_3lib_160map_infer(__pyx_self, __pyx_v_arr, __pyx_v_f, __pyx_v_convert); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_3lib_160map_infer(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_arr, PyObject *__pyx_v_f, int __pyx_v_convert) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_n; PyArrayObject *__pyx_v_result = 0; PyObject *__pyx_v_val = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_result; __Pyx_Buffer __pyx_pybuffer_result; 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; PyArrayObject *__pyx_t_6 = NULL; 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; int __pyx_t_12; int __pyx_t_13; int __pyx_t_14; Py_ssize_t __pyx_t_15; PyObject **__pyx_t_16; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("map_infer", 0); __pyx_pybuffer_result.pybuffer.buf = NULL; __pyx_pybuffer_result.refcount = 0; __pyx_pybuffernd_result.data = NULL; __pyx_pybuffernd_result.rcbuffer = &__pyx_pybuffer_result; /* "pandas/src/inference.pyx":917 * object val * * n = len(arr) # <<<<<<<<<<<<<< * result = np.empty(n, dtype=object) * for i in range(n): */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_arr)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 917; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/src/inference.pyx":918 * * n = len(arr) * result = np.empty(n, dtype=object) # <<<<<<<<<<<<<< * for i in range(n): * val = f(util.get_value_at(arr, i)) */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 918; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 918; __pyx_clineno = __LINE__; goto __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_n); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 918; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 918; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 918; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_dtype, __pyx_builtin_object) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 918; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_5 = PyObject_Call(__pyx_t_3, __pyx_t_4, __pyx_t_2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 918; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 918; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_6 = ((PyArrayObject *)__pyx_t_5); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_object, 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_result.rcbuffer->pybuffer, (PyObject*)__pyx_v_result, &__Pyx_TypeInfo_object, 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_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_7 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 918; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_6 = 0; __pyx_v_result = ((PyArrayObject *)__pyx_t_5); __pyx_t_5 = 0; /* "pandas/src/inference.pyx":919 * n = len(arr) * result = np.empty(n, dtype=object) * for i in range(n): # <<<<<<<<<<<<<< * val = f(util.get_value_at(arr, i)) * */ __pyx_t_1 = __pyx_v_n; for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_1; __pyx_t_11+=1) { __pyx_v_i = __pyx_t_11; /* "pandas/src/inference.pyx":920 * result = np.empty(n, dtype=object) * for i in range(n): * val = f(util.get_value_at(arr, i)) # <<<<<<<<<<<<<< * * # unbox 0-dim arrays, GH #690 */ __pyx_t_5 = PyInt_FromSsize_t(__pyx_v_i); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 920; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_2 = __pyx_f_4util_get_value_at(__pyx_v_arr, __pyx_t_5); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 920; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 920; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_Call(__pyx_v_f, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 920; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF_SET(__pyx_v_val, __pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/inference.pyx":923 * * # unbox 0-dim arrays, GH #690 * if is_array(val) and PyArray_NDIM(val) == 0: # <<<<<<<<<<<<<< * # is there a faster way to unbox? * val = val.item() */ __pyx_t_2 = __pyx_f_4util_is_array(__pyx_v_val); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 923; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_12 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 923; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_12) { if (!(likely(((__pyx_v_val) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_val, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 923; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_13 = (PyArray_NDIM(((PyArrayObject *)__pyx_v_val)) == 0); __pyx_t_14 = __pyx_t_13; } else { __pyx_t_14 = __pyx_t_12; } if (__pyx_t_14) { /* "pandas/src/inference.pyx":925 * if is_array(val) and PyArray_NDIM(val) == 0: * # is there a faster way to unbox? * val = val.item() # <<<<<<<<<<<<<< * * result[i] = val */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_val, __pyx_n_s_item); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 925; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = PyObject_Call(__pyx_t_2, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 925; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF_SET(__pyx_v_val, __pyx_t_5); __pyx_t_5 = 0; goto __pyx_L5; } __pyx_L5:; /* "pandas/src/inference.pyx":927 * val = val.item() * * result[i] = val # <<<<<<<<<<<<<< * * if convert: */ __pyx_t_15 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_15 < 0) { __pyx_t_15 += __pyx_pybuffernd_result.diminfo[0].shape; if (unlikely(__pyx_t_15 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_15 >= __pyx_pybuffernd_result.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 927; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_16 = __Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_result.diminfo[0].strides); __Pyx_GOTREF(*__pyx_t_16); __Pyx_INCREF(__pyx_v_val); __Pyx_DECREF(*__pyx_t_16); *__pyx_t_16 = __pyx_v_val; __Pyx_GIVEREF(*__pyx_t_16); } /* "pandas/src/inference.pyx":929 * result[i] = val * * if convert: # <<<<<<<<<<<<<< * return maybe_convert_objects(result, * try_float=0, */ __pyx_t_14 = (__pyx_v_convert != 0); if (__pyx_t_14) { /* "pandas/src/inference.pyx":930 * * if convert: * return maybe_convert_objects(result, # <<<<<<<<<<<<<< * try_float=0, * convert_datetime=0, */ __Pyx_XDECREF(__pyx_r); __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_maybe_convert_objects); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 930; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 930; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(((PyObject *)__pyx_v_result)); PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_result)); __Pyx_GIVEREF(((PyObject *)__pyx_v_result)); __pyx_t_4 = PyDict_New(); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 930; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_try_float, __pyx_int_0) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 930; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_convert_datetime, __pyx_int_0) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 930; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_convert_timedelta, __pyx_int_0) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 930; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_3 = PyObject_Call(__pyx_t_5, __pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 930; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; } /* "pandas/src/inference.pyx":935 * convert_timedelta=0) * * return result # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_result)); __pyx_r = ((PyObject *)__pyx_v_result); goto __pyx_L0; /* "pandas/src/inference.pyx":899 * return result * * def map_infer(ndarray arr, object f, bint convert=1): # <<<<<<<<<<<<<< * ''' * Substitute for np.vectorize with pandas-friendly dtype inference */ /* 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); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.lib.map_infer", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_result); __Pyx_XDECREF(__pyx_v_val); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/inference.pyx":938 * * * def to_object_array(list rows): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, j, n, k, tmp */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_3lib_163to_object_array(PyObject *__pyx_self, PyObject *__pyx_v_rows); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_3lib_163to_object_array = {__Pyx_NAMESTR("to_object_array"), (PyCFunction)__pyx_pw_6pandas_3lib_163to_object_array, METH_O, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_3lib_163to_object_array(PyObject *__pyx_self, PyObject *__pyx_v_rows) { CYTHON_UNUSED int __pyx_lineno = 0; CYTHON_UNUSED const char *__pyx_filename = NULL; CYTHON_UNUSED int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("to_object_array (wrapper)", 0); if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_rows), (&PyList_Type), 1, "rows", 1))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 938; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_3lib_162to_object_array(__pyx_self, ((PyObject*)__pyx_v_rows)); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_3lib_162to_object_array(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_rows) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_n; Py_ssize_t __pyx_v_k; Py_ssize_t __pyx_v_tmp; PyArrayObject *__pyx_v_result = 0; PyObject *__pyx_v_row = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_result; __Pyx_Buffer __pyx_pybuffer_result; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; PyObject *__pyx_t_2 = NULL; Py_ssize_t __pyx_t_3; int __pyx_t_4; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyArrayObject *__pyx_t_8 = NULL; int __pyx_t_9; PyObject *__pyx_t_10 = NULL; PyObject *__pyx_t_11 = NULL; PyObject *__pyx_t_12 = NULL; Py_ssize_t __pyx_t_13; Py_ssize_t __pyx_t_14; PyObject **__pyx_t_15; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("to_object_array", 0); __pyx_pybuffer_result.pybuffer.buf = NULL; __pyx_pybuffer_result.refcount = 0; __pyx_pybuffernd_result.data = NULL; __pyx_pybuffernd_result.rcbuffer = &__pyx_pybuffer_result; /* "pandas/src/inference.pyx":944 * list row * * n = len(rows) # <<<<<<<<<<<<<< * * k = 0 */ if (unlikely(__pyx_v_rows == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 944; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_1 = PyList_GET_SIZE(__pyx_v_rows); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 944; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/src/inference.pyx":946 * n = len(rows) * * k = 0 # <<<<<<<<<<<<<< * for i from 0 <= i < n: * tmp = len(rows[i]) */ __pyx_v_k = 0; /* "pandas/src/inference.pyx":947 * * k = 0 * for i from 0 <= i < n: # <<<<<<<<<<<<<< * tmp = len(rows[i]) * if tmp > k: */ __pyx_t_1 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_1; __pyx_v_i++) { /* "pandas/src/inference.pyx":948 * k = 0 * for i from 0 <= i < n: * tmp = len(rows[i]) # <<<<<<<<<<<<<< * if tmp > k: * k = tmp */ if (unlikely(__pyx_v_rows == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 948; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_2 = __Pyx_GetItemInt_List(__pyx_v_rows, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 948; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyObject_Length(__pyx_t_2); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 948; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_tmp = __pyx_t_3; /* "pandas/src/inference.pyx":949 * for i from 0 <= i < n: * tmp = len(rows[i]) * if tmp > k: # <<<<<<<<<<<<<< * k = tmp * */ __pyx_t_4 = ((__pyx_v_tmp > __pyx_v_k) != 0); if (__pyx_t_4) { /* "pandas/src/inference.pyx":950 * tmp = len(rows[i]) * if tmp > k: * k = tmp # <<<<<<<<<<<<<< * * result = np.empty((n, k), dtype=object) */ __pyx_v_k = __pyx_v_tmp; goto __pyx_L5; } __pyx_L5:; } /* "pandas/src/inference.pyx":952 * k = tmp * * result = np.empty((n, k), dtype=object) # <<<<<<<<<<<<<< * * for i from 0 <= i < n: */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 952; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_empty); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 952; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_n); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 952; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_6 = PyInt_FromSsize_t(__pyx_v_k); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 952; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 952; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_6); __pyx_t_2 = 0; __pyx_t_6 = 0; __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 952; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_7); __Pyx_GIVEREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_7 = PyDict_New(); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 952; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_dtype, __pyx_builtin_object) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 952; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_2 = PyObject_Call(__pyx_t_5, __pyx_t_6, __pyx_t_7); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 952; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 952; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_8 = ((PyArrayObject *)__pyx_t_2); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __pyx_t_9 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_t_8, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack); if (unlikely(__pyx_t_9 < 0)) { PyErr_Fetch(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_v_result, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_11); Py_XDECREF(__pyx_t_12); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_10, __pyx_t_11, __pyx_t_12); } } __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]; __pyx_pybuffernd_result.diminfo[1].strides = __pyx_pybuffernd_result.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_result.diminfo[1].shape = __pyx_pybuffernd_result.rcbuffer->pybuffer.shape[1]; if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 952; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_8 = 0; __pyx_v_result = ((PyArrayObject *)__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/inference.pyx":954 * result = np.empty((n, k), dtype=object) * * for i from 0 <= i < n: # <<<<<<<<<<<<<< * row = rows[i] * */ __pyx_t_1 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_1; __pyx_v_i++) { /* "pandas/src/inference.pyx":955 * * for i from 0 <= i < n: * row = rows[i] # <<<<<<<<<<<<<< * * for j from 0 <= j < len(row): */ if (unlikely(__pyx_v_rows == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 955; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_2 = __Pyx_GetItemInt_List(__pyx_v_rows, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 955; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_2); if (!(likely(PyList_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_t_2)->tp_name), 0))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 955; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_XDECREF_SET(__pyx_v_row, ((PyObject*)__pyx_t_2)); __pyx_t_2 = 0; /* "pandas/src/inference.pyx":957 * row = rows[i] * * for j from 0 <= j < len(row): # <<<<<<<<<<<<<< * result[i, j] = row[j] * */ if (unlikely(__pyx_v_row == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 957; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_3 = PyList_GET_SIZE(__pyx_v_row); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 957; __pyx_clineno = __LINE__; goto __pyx_L1_error;} for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_3; __pyx_v_j++) { /* "pandas/src/inference.pyx":958 * * for j from 0 <= j < len(row): * result[i, j] = row[j] # <<<<<<<<<<<<<< * * return result */ if (unlikely(__pyx_v_row == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 958; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_2 = __Pyx_GetItemInt_List(__pyx_v_row, __pyx_v_j, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 958; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_2); __pyx_t_13 = __pyx_v_i; __pyx_t_14 = __pyx_v_j; __pyx_t_9 = -1; if (__pyx_t_13 < 0) { __pyx_t_13 += __pyx_pybuffernd_result.diminfo[0].shape; if (unlikely(__pyx_t_13 < 0)) __pyx_t_9 = 0; } else if (unlikely(__pyx_t_13 >= __pyx_pybuffernd_result.diminfo[0].shape)) __pyx_t_9 = 0; if (__pyx_t_14 < 0) { __pyx_t_14 += __pyx_pybuffernd_result.diminfo[1].shape; if (unlikely(__pyx_t_14 < 0)) __pyx_t_9 = 1; } else if (unlikely(__pyx_t_14 >= __pyx_pybuffernd_result.diminfo[1].shape)) __pyx_t_9 = 1; if (unlikely(__pyx_t_9 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_9); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 958; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_15 = __Pyx_BufPtrStrided2d(PyObject **, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_result.diminfo[0].strides, __pyx_t_14, __pyx_pybuffernd_result.diminfo[1].strides); __Pyx_GOTREF(*__pyx_t_15); __Pyx_INCREF(__pyx_t_2); __Pyx_DECREF(*__pyx_t_15); *__pyx_t_15 = __pyx_t_2; __Pyx_GIVEREF(*__pyx_t_15); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } } /* "pandas/src/inference.pyx":960 * result[i, j] = row[j] * * return result # <<<<<<<<<<<<<< * * def tuples_to_object_array(ndarray[object] tuples): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_result)); __pyx_r = ((PyObject *)__pyx_v_result); goto __pyx_L0; /* "pandas/src/inference.pyx":938 * * * def to_object_array(list rows): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, j, n, k, tmp */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.lib.to_object_array", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_result); __Pyx_XDECREF(__pyx_v_row); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/inference.pyx":962 * return result * * def tuples_to_object_array(ndarray[object] tuples): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, j, n, k, tmp */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_3lib_165tuples_to_object_array(PyObject *__pyx_self, PyObject *__pyx_v_tuples); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_3lib_165tuples_to_object_array = {__Pyx_NAMESTR("tuples_to_object_array"), (PyCFunction)__pyx_pw_6pandas_3lib_165tuples_to_object_array, METH_O, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_3lib_165tuples_to_object_array(PyObject *__pyx_self, PyObject *__pyx_v_tuples) { CYTHON_UNUSED int __pyx_lineno = 0; CYTHON_UNUSED const char *__pyx_filename = NULL; CYTHON_UNUSED int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("tuples_to_object_array (wrapper)", 0); if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_tuples), __pyx_ptype_5numpy_ndarray, 1, "tuples", 0))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 962; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_3lib_164tuples_to_object_array(__pyx_self, ((PyArrayObject *)__pyx_v_tuples)); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_3lib_164tuples_to_object_array(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_tuples) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_n; Py_ssize_t __pyx_v_k; PyArrayObject *__pyx_v_result = 0; PyObject *__pyx_v_tup = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_result; __Pyx_Buffer __pyx_pybuffer_result; __Pyx_LocalBuf_ND __pyx_pybuffernd_tuples; __Pyx_Buffer __pyx_pybuffer_tuples; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; PyObject *__pyx_t_2 = NULL; long __pyx_t_3; int __pyx_t_4; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyArrayObject *__pyx_t_8 = NULL; 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; Py_ssize_t __pyx_t_15; Py_ssize_t __pyx_t_16; Py_ssize_t __pyx_t_17; PyObject **__pyx_t_18; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("tuples_to_object_array", 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_tuples.pybuffer.buf = NULL; __pyx_pybuffer_tuples.refcount = 0; __pyx_pybuffernd_tuples.data = NULL; __pyx_pybuffernd_tuples.rcbuffer = &__pyx_pybuffer_tuples; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tuples.rcbuffer->pybuffer, (PyObject*)__pyx_v_tuples, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 962; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_tuples.diminfo[0].strides = __pyx_pybuffernd_tuples.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_tuples.diminfo[0].shape = __pyx_pybuffernd_tuples.rcbuffer->pybuffer.shape[0]; /* "pandas/src/inference.pyx":968 * tuple tup * * n = len(tuples) # <<<<<<<<<<<<<< * k = len(tuples[0]) * result = np.empty((n, k), dtype=object) */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_tuples)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 968; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/src/inference.pyx":969 * * n = len(tuples) * k = len(tuples[0]) # <<<<<<<<<<<<<< * result = np.empty((n, k), dtype=object) * for i in range(n): */ __pyx_t_3 = 0; __pyx_t_4 = -1; if (__pyx_t_3 < 0) { __pyx_t_3 += __pyx_pybuffernd_tuples.diminfo[0].shape; if (unlikely(__pyx_t_3 < 0)) __pyx_t_4 = 0; } else if (unlikely(__pyx_t_3 >= __pyx_pybuffernd_tuples.diminfo[0].shape)) __pyx_t_4 = 0; if (unlikely(__pyx_t_4 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_4); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 969; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_2 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_tuples.rcbuffer->pybuffer.buf, __pyx_t_3, __pyx_pybuffernd_tuples.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_2); __pyx_t_1 = PyObject_Length(__pyx_t_2); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 969; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_k = __pyx_t_1; /* "pandas/src/inference.pyx":970 * n = len(tuples) * k = len(tuples[0]) * result = np.empty((n, k), dtype=object) # <<<<<<<<<<<<<< * for i in range(n): * tup = tuples[i] */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 970; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_empty); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 970; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_n); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 970; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_6 = PyInt_FromSsize_t(__pyx_v_k); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 970; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 970; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_6); __pyx_t_2 = 0; __pyx_t_6 = 0; __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 970; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_7); __Pyx_GIVEREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_7 = PyDict_New(); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 970; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_dtype, __pyx_builtin_object) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 970; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_2 = PyObject_Call(__pyx_t_5, __pyx_t_6, __pyx_t_7); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 970; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 970; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_8 = ((PyArrayObject *)__pyx_t_2); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __pyx_t_4 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_t_8, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack); if (unlikely(__pyx_t_4 < 0)) { PyErr_Fetch(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_v_result, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_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]; __pyx_pybuffernd_result.diminfo[1].strides = __pyx_pybuffernd_result.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_result.diminfo[1].shape = __pyx_pybuffernd_result.rcbuffer->pybuffer.shape[1]; if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 970; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_8 = 0; __pyx_v_result = ((PyArrayObject *)__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/inference.pyx":971 * k = len(tuples[0]) * result = np.empty((n, k), dtype=object) * for i in range(n): # <<<<<<<<<<<<<< * tup = tuples[i] * for j in range(k): */ __pyx_t_1 = __pyx_v_n; for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_1; __pyx_t_12+=1) { __pyx_v_i = __pyx_t_12; /* "pandas/src/inference.pyx":972 * result = np.empty((n, k), dtype=object) * for i in range(n): * tup = tuples[i] # <<<<<<<<<<<<<< * for j in range(k): * result[i, j] = tup[j] */ __pyx_t_13 = __pyx_v_i; __pyx_t_4 = -1; if (__pyx_t_13 < 0) { __pyx_t_13 += __pyx_pybuffernd_tuples.diminfo[0].shape; if (unlikely(__pyx_t_13 < 0)) __pyx_t_4 = 0; } else if (unlikely(__pyx_t_13 >= __pyx_pybuffernd_tuples.diminfo[0].shape)) __pyx_t_4 = 0; if (unlikely(__pyx_t_4 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_4); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 972; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_2 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_tuples.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_tuples.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_2); if (!(likely(PyTuple_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_t_2)->tp_name), 0))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 972; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_XDECREF_SET(__pyx_v_tup, ((PyObject*)__pyx_t_2)); __pyx_t_2 = 0; /* "pandas/src/inference.pyx":973 * for i in range(n): * tup = tuples[i] * for j in range(k): # <<<<<<<<<<<<<< * result[i, j] = tup[j] * */ __pyx_t_14 = __pyx_v_k; for (__pyx_t_15 = 0; __pyx_t_15 < __pyx_t_14; __pyx_t_15+=1) { __pyx_v_j = __pyx_t_15; /* "pandas/src/inference.pyx":974 * tup = tuples[i] * for j in range(k): * result[i, j] = tup[j] # <<<<<<<<<<<<<< * * return result */ if (unlikely(__pyx_v_tup == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 974; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_2 = __Pyx_GetItemInt_Tuple(__pyx_v_tup, __pyx_v_j, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 974; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_2); __pyx_t_16 = __pyx_v_i; __pyx_t_17 = __pyx_v_j; __pyx_t_4 = -1; if (__pyx_t_16 < 0) { __pyx_t_16 += __pyx_pybuffernd_result.diminfo[0].shape; if (unlikely(__pyx_t_16 < 0)) __pyx_t_4 = 0; } else if (unlikely(__pyx_t_16 >= __pyx_pybuffernd_result.diminfo[0].shape)) __pyx_t_4 = 0; if (__pyx_t_17 < 0) { __pyx_t_17 += __pyx_pybuffernd_result.diminfo[1].shape; if (unlikely(__pyx_t_17 < 0)) __pyx_t_4 = 1; } else if (unlikely(__pyx_t_17 >= __pyx_pybuffernd_result.diminfo[1].shape)) __pyx_t_4 = 1; if (unlikely(__pyx_t_4 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_4); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 974; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_18 = __Pyx_BufPtrStrided2d(PyObject **, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_result.diminfo[0].strides, __pyx_t_17, __pyx_pybuffernd_result.diminfo[1].strides); __Pyx_GOTREF(*__pyx_t_18); __Pyx_INCREF(__pyx_t_2); __Pyx_DECREF(*__pyx_t_18); *__pyx_t_18 = __pyx_t_2; __Pyx_GIVEREF(*__pyx_t_18); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } } /* "pandas/src/inference.pyx":976 * result[i, j] = tup[j] * * return result # <<<<<<<<<<<<<< * * def to_object_array_tuples(list rows): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_result)); __pyx_r = ((PyObject *)__pyx_v_result); goto __pyx_L0; /* "pandas/src/inference.pyx":962 * return result * * def tuples_to_object_array(ndarray[object] tuples): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, j, n, k, tmp */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tuples.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.lib.tuples_to_object_array", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tuples.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_result); __Pyx_XDECREF(__pyx_v_tup); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/inference.pyx":978 * return result * * def to_object_array_tuples(list rows): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, j, n, k, tmp */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_3lib_167to_object_array_tuples(PyObject *__pyx_self, PyObject *__pyx_v_rows); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_3lib_167to_object_array_tuples = {__Pyx_NAMESTR("to_object_array_tuples"), (PyCFunction)__pyx_pw_6pandas_3lib_167to_object_array_tuples, METH_O, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_3lib_167to_object_array_tuples(PyObject *__pyx_self, PyObject *__pyx_v_rows) { CYTHON_UNUSED int __pyx_lineno = 0; CYTHON_UNUSED const char *__pyx_filename = NULL; CYTHON_UNUSED int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("to_object_array_tuples (wrapper)", 0); if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_rows), (&PyList_Type), 1, "rows", 1))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 978; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_3lib_166to_object_array_tuples(__pyx_self, ((PyObject*)__pyx_v_rows)); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_3lib_166to_object_array_tuples(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_rows) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_n; Py_ssize_t __pyx_v_k; Py_ssize_t __pyx_v_tmp; PyArrayObject *__pyx_v_result = 0; PyObject *__pyx_v_row = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_result; __Pyx_Buffer __pyx_pybuffer_result; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; PyObject *__pyx_t_2 = NULL; Py_ssize_t __pyx_t_3; int __pyx_t_4; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyArrayObject *__pyx_t_8 = NULL; int __pyx_t_9; PyObject *__pyx_t_10 = NULL; PyObject *__pyx_t_11 = NULL; PyObject *__pyx_t_12 = NULL; Py_ssize_t __pyx_t_13; Py_ssize_t __pyx_t_14; Py_ssize_t __pyx_t_15; PyObject **__pyx_t_16; PyObject *__pyx_t_17 = NULL; Py_ssize_t __pyx_t_18; Py_ssize_t __pyx_t_19; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("to_object_array_tuples", 0); __pyx_pybuffer_result.pybuffer.buf = NULL; __pyx_pybuffer_result.refcount = 0; __pyx_pybuffernd_result.data = NULL; __pyx_pybuffernd_result.rcbuffer = &__pyx_pybuffer_result; /* "pandas/src/inference.pyx":984 * tuple row * * n = len(rows) # <<<<<<<<<<<<<< * * k = 0 */ if (unlikely(__pyx_v_rows == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 984; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_1 = PyList_GET_SIZE(__pyx_v_rows); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 984; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/src/inference.pyx":986 * n = len(rows) * * k = 0 # <<<<<<<<<<<<<< * for i from 0 <= i < n: * tmp = len(rows[i]) */ __pyx_v_k = 0; /* "pandas/src/inference.pyx":987 * * k = 0 * for i from 0 <= i < n: # <<<<<<<<<<<<<< * tmp = len(rows[i]) * if tmp > k: */ __pyx_t_1 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_1; __pyx_v_i++) { /* "pandas/src/inference.pyx":988 * k = 0 * for i from 0 <= i < n: * tmp = len(rows[i]) # <<<<<<<<<<<<<< * if tmp > k: * k = tmp */ if (unlikely(__pyx_v_rows == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 988; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_2 = __Pyx_GetItemInt_List(__pyx_v_rows, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 988; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyObject_Length(__pyx_t_2); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 988; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_tmp = __pyx_t_3; /* "pandas/src/inference.pyx":989 * for i from 0 <= i < n: * tmp = len(rows[i]) * if tmp > k: # <<<<<<<<<<<<<< * k = tmp * */ __pyx_t_4 = ((__pyx_v_tmp > __pyx_v_k) != 0); if (__pyx_t_4) { /* "pandas/src/inference.pyx":990 * tmp = len(rows[i]) * if tmp > k: * k = tmp # <<<<<<<<<<<<<< * * result = np.empty((n, k), dtype=object) */ __pyx_v_k = __pyx_v_tmp; goto __pyx_L5; } __pyx_L5:; } /* "pandas/src/inference.pyx":992 * k = tmp * * result = np.empty((n, k), dtype=object) # <<<<<<<<<<<<<< * * try: */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 992; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_empty); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 992; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_n); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 992; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_6 = PyInt_FromSsize_t(__pyx_v_k); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 992; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 992; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_6); __pyx_t_2 = 0; __pyx_t_6 = 0; __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 992; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_7); __Pyx_GIVEREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_7 = PyDict_New(); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 992; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_dtype, __pyx_builtin_object) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 992; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_2 = PyObject_Call(__pyx_t_5, __pyx_t_6, __pyx_t_7); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 992; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 992; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_8 = ((PyArrayObject *)__pyx_t_2); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __pyx_t_9 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_t_8, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack); if (unlikely(__pyx_t_9 < 0)) { PyErr_Fetch(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_v_result, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_11); Py_XDECREF(__pyx_t_12); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_10, __pyx_t_11, __pyx_t_12); } } __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]; __pyx_pybuffernd_result.diminfo[1].strides = __pyx_pybuffernd_result.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_result.diminfo[1].shape = __pyx_pybuffernd_result.rcbuffer->pybuffer.shape[1]; if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 992; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_8 = 0; __pyx_v_result = ((PyArrayObject *)__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/inference.pyx":994 * result = np.empty((n, k), dtype=object) * * try: # <<<<<<<<<<<<<< * for i in range(n): * row = rows[i] */ { __Pyx_ExceptionSave(&__pyx_t_12, &__pyx_t_11, &__pyx_t_10); __Pyx_XGOTREF(__pyx_t_12); __Pyx_XGOTREF(__pyx_t_11); __Pyx_XGOTREF(__pyx_t_10); /*try:*/ { /* "pandas/src/inference.pyx":995 * * try: * for i in range(n): # <<<<<<<<<<<<<< * row = rows[i] * for j from 0 <= j < len(row): */ __pyx_t_1 = __pyx_v_n; for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_1; __pyx_t_3+=1) { __pyx_v_i = __pyx_t_3; /* "pandas/src/inference.pyx":996 * try: * for i in range(n): * row = rows[i] # <<<<<<<<<<<<<< * for j from 0 <= j < len(row): * result[i, j] = row[j] */ if (unlikely(__pyx_v_rows == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 996; __pyx_clineno = __LINE__; goto __pyx_L6_error;} } __pyx_t_2 = __Pyx_GetItemInt_List(__pyx_v_rows, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 996; __pyx_clineno = __LINE__; goto __pyx_L6_error;}; __Pyx_GOTREF(__pyx_t_2); if (!(likely(PyTuple_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_t_2)->tp_name), 0))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 996; __pyx_clineno = __LINE__; goto __pyx_L6_error;} __Pyx_XDECREF_SET(__pyx_v_row, ((PyObject*)__pyx_t_2)); __pyx_t_2 = 0; /* "pandas/src/inference.pyx":997 * for i in range(n): * row = rows[i] * for j from 0 <= j < len(row): # <<<<<<<<<<<<<< * result[i, j] = row[j] * except Exception: */ if (unlikely(__pyx_v_row == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 997; __pyx_clineno = __LINE__; goto __pyx_L6_error;} } __pyx_t_13 = PyTuple_GET_SIZE(__pyx_v_row); if (unlikely(__pyx_t_13 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 997; __pyx_clineno = __LINE__; goto __pyx_L6_error;} for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_13; __pyx_v_j++) { /* "pandas/src/inference.pyx":998 * row = rows[i] * for j from 0 <= j < len(row): * result[i, j] = row[j] # <<<<<<<<<<<<<< * except Exception: * # upcast any subclasses to tuple */ if (unlikely(__pyx_v_row == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 998; __pyx_clineno = __LINE__; goto __pyx_L6_error;} } __pyx_t_2 = __Pyx_GetItemInt_Tuple(__pyx_v_row, __pyx_v_j, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 998; __pyx_clineno = __LINE__; goto __pyx_L6_error;}; __Pyx_GOTREF(__pyx_t_2); __pyx_t_14 = __pyx_v_i; __pyx_t_15 = __pyx_v_j; __pyx_t_9 = -1; if (__pyx_t_14 < 0) { __pyx_t_14 += __pyx_pybuffernd_result.diminfo[0].shape; if (unlikely(__pyx_t_14 < 0)) __pyx_t_9 = 0; } else if (unlikely(__pyx_t_14 >= __pyx_pybuffernd_result.diminfo[0].shape)) __pyx_t_9 = 0; if (__pyx_t_15 < 0) { __pyx_t_15 += __pyx_pybuffernd_result.diminfo[1].shape; if (unlikely(__pyx_t_15 < 0)) __pyx_t_9 = 1; } else if (unlikely(__pyx_t_15 >= __pyx_pybuffernd_result.diminfo[1].shape)) __pyx_t_9 = 1; if (unlikely(__pyx_t_9 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_9); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 998; __pyx_clineno = __LINE__; goto __pyx_L6_error;} } __pyx_t_16 = __Pyx_BufPtrStrided2d(PyObject **, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_result.diminfo[0].strides, __pyx_t_15, __pyx_pybuffernd_result.diminfo[1].strides); __Pyx_GOTREF(*__pyx_t_16); __Pyx_INCREF(__pyx_t_2); __Pyx_DECREF(*__pyx_t_16); *__pyx_t_16 = __pyx_t_2; __Pyx_GIVEREF(*__pyx_t_16); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } } } __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; goto __pyx_L13_try_end; __pyx_L6_error:; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/inference.pyx":999 * for j from 0 <= j < len(row): * result[i, j] = row[j] * except Exception: # <<<<<<<<<<<<<< * # upcast any subclasses to tuple * for i in range(n): */ __pyx_t_9 = PyErr_ExceptionMatches(__pyx_builtin_Exception); if (__pyx_t_9) { __Pyx_AddTraceback("pandas.lib.to_object_array_tuples", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_7, &__pyx_t_6) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 999; __pyx_clineno = __LINE__; goto __pyx_L8_except_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_GOTREF(__pyx_t_7); __Pyx_GOTREF(__pyx_t_6); /* "pandas/src/inference.pyx":1001 * except Exception: * # upcast any subclasses to tuple * for i in range(n): # <<<<<<<<<<<<<< * row = tuple(rows[i]) * for j from 0 <= j < len(row): */ __pyx_t_1 = __pyx_v_n; for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_1; __pyx_t_3+=1) { __pyx_v_i = __pyx_t_3; /* "pandas/src/inference.pyx":1002 * # upcast any subclasses to tuple * for i in range(n): * row = tuple(rows[i]) # <<<<<<<<<<<<<< * for j from 0 <= j < len(row): * result[i, j] = row[j] */ if (unlikely(__pyx_v_rows == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1002; __pyx_clineno = __LINE__; goto __pyx_L8_except_error;} } __pyx_t_5 = __Pyx_GetItemInt_List(__pyx_v_rows, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1); if (unlikely(__pyx_t_5 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1002; __pyx_clineno = __LINE__; goto __pyx_L8_except_error;}; __Pyx_GOTREF(__pyx_t_5); __pyx_t_17 = PyTuple_New(1); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1002; __pyx_clineno = __LINE__; goto __pyx_L8_except_error;} __Pyx_GOTREF(__pyx_t_17); PyTuple_SET_ITEM(__pyx_t_17, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyObject_Call(((PyObject *)((PyObject*)(&PyTuple_Type))), __pyx_t_17, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1002; __pyx_clineno = __LINE__; goto __pyx_L8_except_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; __Pyx_XDECREF_SET(__pyx_v_row, ((PyObject*)__pyx_t_5)); __pyx_t_5 = 0; /* "pandas/src/inference.pyx":1003 * for i in range(n): * row = tuple(rows[i]) * for j from 0 <= j < len(row): # <<<<<<<<<<<<<< * result[i, j] = row[j] * */ __pyx_t_13 = PyTuple_GET_SIZE(__pyx_v_row); if (unlikely(__pyx_t_13 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1003; __pyx_clineno = __LINE__; goto __pyx_L8_except_error;} for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_13; __pyx_v_j++) { /* "pandas/src/inference.pyx":1004 * row = tuple(rows[i]) * for j from 0 <= j < len(row): * result[i, j] = row[j] # <<<<<<<<<<<<<< * * return result */ __pyx_t_5 = __Pyx_GetItemInt_Tuple(__pyx_v_row, __pyx_v_j, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(__pyx_t_5 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1004; __pyx_clineno = __LINE__; goto __pyx_L8_except_error;}; __Pyx_GOTREF(__pyx_t_5); __pyx_t_18 = __pyx_v_i; __pyx_t_19 = __pyx_v_j; __pyx_t_9 = -1; if (__pyx_t_18 < 0) { __pyx_t_18 += __pyx_pybuffernd_result.diminfo[0].shape; if (unlikely(__pyx_t_18 < 0)) __pyx_t_9 = 0; } else if (unlikely(__pyx_t_18 >= __pyx_pybuffernd_result.diminfo[0].shape)) __pyx_t_9 = 0; if (__pyx_t_19 < 0) { __pyx_t_19 += __pyx_pybuffernd_result.diminfo[1].shape; if (unlikely(__pyx_t_19 < 0)) __pyx_t_9 = 1; } else if (unlikely(__pyx_t_19 >= __pyx_pybuffernd_result.diminfo[1].shape)) __pyx_t_9 = 1; if (unlikely(__pyx_t_9 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_9); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1004; __pyx_clineno = __LINE__; goto __pyx_L8_except_error;} } __pyx_t_16 = __Pyx_BufPtrStrided2d(PyObject **, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_result.diminfo[0].strides, __pyx_t_19, __pyx_pybuffernd_result.diminfo[1].strides); __Pyx_GOTREF(*__pyx_t_16); __Pyx_INCREF(__pyx_t_5); __Pyx_DECREF(*__pyx_t_16); *__pyx_t_16 = __pyx_t_5; __Pyx_GIVEREF(*__pyx_t_16); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; goto __pyx_L7_exception_handled; } goto __pyx_L8_except_error; __pyx_L8_except_error:; __Pyx_XGIVEREF(__pyx_t_12); __Pyx_XGIVEREF(__pyx_t_11); __Pyx_XGIVEREF(__pyx_t_10); __Pyx_ExceptionReset(__pyx_t_12, __pyx_t_11, __pyx_t_10); goto __pyx_L1_error; __pyx_L7_exception_handled:; __Pyx_XGIVEREF(__pyx_t_12); __Pyx_XGIVEREF(__pyx_t_11); __Pyx_XGIVEREF(__pyx_t_10); __Pyx_ExceptionReset(__pyx_t_12, __pyx_t_11, __pyx_t_10); __pyx_L13_try_end:; } /* "pandas/src/inference.pyx":1006 * result[i, j] = row[j] * * return result # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_result)); __pyx_r = ((PyObject *)__pyx_v_result); goto __pyx_L0; /* "pandas/src/inference.pyx":978 * return result * * def to_object_array_tuples(list rows): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, j, n, k, tmp */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_17); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.lib.to_object_array_tuples", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_result); __Pyx_XDECREF(__pyx_v_row); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/inference.pyx":1009 * * * def fast_multiget(dict mapping, ndarray keys, default=np.nan): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = len(keys) */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_3lib_169fast_multiget(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_3lib_169fast_multiget = {__Pyx_NAMESTR("fast_multiget"), (PyCFunction)__pyx_pw_6pandas_3lib_169fast_multiget, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_3lib_169fast_multiget(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_mapping = 0; PyArrayObject *__pyx_v_keys = 0; PyObject *__pyx_v_default = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("fast_multiget (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_mapping,&__pyx_n_s_keys,&__pyx_n_s_default,0}; PyObject* values[3] = {0,0,0}; values[2] = __pyx_k__42; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_mapping)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_keys)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("fast_multiget", 0, 2, 3, 1); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1009; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_default); if (value) { values[2] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "fast_multiget") < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1009; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_mapping = ((PyObject*)values[0]); __pyx_v_keys = ((PyArrayObject *)values[1]); __pyx_v_default = values[2]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("fast_multiget", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1009; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.lib.fast_multiget", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_mapping), (&PyDict_Type), 1, "mapping", 1))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1009; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_keys), __pyx_ptype_5numpy_ndarray, 1, "keys", 0))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1009; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_3lib_168fast_multiget(__pyx_self, __pyx_v_mapping, __pyx_v_keys, __pyx_v_default); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_3lib_168fast_multiget(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_mapping, PyArrayObject *__pyx_v_keys, PyObject *__pyx_v_default) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_n; PyObject *__pyx_v_val = 0; PyArrayObject *__pyx_v_output = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_output; __Pyx_Buffer __pyx_pybuffer_output; 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; PyArrayObject *__pyx_t_6 = NULL; int __pyx_t_7; Py_ssize_t __pyx_t_8; int __pyx_t_9; Py_ssize_t __pyx_t_10; int __pyx_t_11; PyObject **__pyx_t_12; Py_ssize_t __pyx_t_13; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("fast_multiget", 0); __pyx_pybuffer_output.pybuffer.buf = NULL; __pyx_pybuffer_output.refcount = 0; __pyx_pybuffernd_output.data = NULL; __pyx_pybuffernd_output.rcbuffer = &__pyx_pybuffer_output; /* "pandas/src/inference.pyx":1011 * def fast_multiget(dict mapping, ndarray keys, default=np.nan): * cdef: * Py_ssize_t i, n = len(keys) # <<<<<<<<<<<<<< * object val * ndarray[object] output = np.empty(n, dtype='O') */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_keys)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1011; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/src/inference.pyx":1013 * Py_ssize_t i, n = len(keys) * object val * ndarray[object] output = np.empty(n, dtype='O') # <<<<<<<<<<<<<< * * if n == 0: */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1013; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 1013; __pyx_clineno = __LINE__; goto __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_n); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1013; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1013; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1013; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_dtype, __pyx_n_s_O) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1013; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_5 = PyObject_Call(__pyx_t_3, __pyx_t_4, __pyx_t_2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1013; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1013; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_6 = ((PyArrayObject *)__pyx_t_5); { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_output.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { __pyx_v_output = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_output.rcbuffer->pybuffer.buf = NULL; {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1013; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } else {__pyx_pybuffernd_output.diminfo[0].strides = __pyx_pybuffernd_output.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_output.diminfo[0].shape = __pyx_pybuffernd_output.rcbuffer->pybuffer.shape[0]; } } __pyx_t_6 = 0; __pyx_v_output = ((PyArrayObject *)__pyx_t_5); __pyx_t_5 = 0; /* "pandas/src/inference.pyx":1015 * ndarray[object] output = np.empty(n, dtype='O') * * if n == 0: # <<<<<<<<<<<<<< * # kludge, for Series * return np.empty(0, dtype='f8') */ __pyx_t_7 = ((__pyx_v_n == 0) != 0); if (__pyx_t_7) { /* "pandas/src/inference.pyx":1017 * if n == 0: * # kludge, for Series * return np.empty(0, dtype='f8') # <<<<<<<<<<<<<< * * for i in range(n): */ __Pyx_XDECREF(__pyx_r); __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1017; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_empty); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1017; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyDict_New(); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1017; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_dtype, __pyx_n_s_f8) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1017; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_4 = PyObject_Call(__pyx_t_2, __pyx_tuple__43, __pyx_t_5); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1017; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; } /* "pandas/src/inference.pyx":1019 * return np.empty(0, dtype='f8') * * for i in range(n): # <<<<<<<<<<<<<< * val = util.get_value_1d(keys, i) * if val in mapping: */ __pyx_t_1 = __pyx_v_n; for (__pyx_t_8 = 0; __pyx_t_8 < __pyx_t_1; __pyx_t_8+=1) { __pyx_v_i = __pyx_t_8; /* "pandas/src/inference.pyx":1020 * * for i in range(n): * val = util.get_value_1d(keys, i) # <<<<<<<<<<<<<< * if val in mapping: * output[i] = mapping[val] */ __pyx_t_4 = get_value_1d(__pyx_v_keys, __pyx_v_i); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1020; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_XDECREF_SET(__pyx_v_val, __pyx_t_4); __pyx_t_4 = 0; /* "pandas/src/inference.pyx":1021 * for i in range(n): * val = util.get_value_1d(keys, i) * if val in mapping: # <<<<<<<<<<<<<< * output[i] = mapping[val] * else: */ if (unlikely(__pyx_v_mapping == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1021; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_7 = (__Pyx_PyDict_Contains(__pyx_v_val, __pyx_v_mapping, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1021; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_9 = (__pyx_t_7 != 0); if (__pyx_t_9) { /* "pandas/src/inference.pyx":1022 * val = util.get_value_1d(keys, i) * if val in mapping: * output[i] = mapping[val] # <<<<<<<<<<<<<< * else: * output[i] = default */ if (unlikely(__pyx_v_mapping == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1022; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_4 = __Pyx_PyDict_GetItem(__pyx_v_mapping, __pyx_v_val); if (unlikely(__pyx_t_4 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1022; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_4); __pyx_t_10 = __pyx_v_i; __pyx_t_11 = -1; if (__pyx_t_10 < 0) { __pyx_t_10 += __pyx_pybuffernd_output.diminfo[0].shape; if (unlikely(__pyx_t_10 < 0)) __pyx_t_11 = 0; } else if (unlikely(__pyx_t_10 >= __pyx_pybuffernd_output.diminfo[0].shape)) __pyx_t_11 = 0; if (unlikely(__pyx_t_11 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_11); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1022; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_12 = __Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_output.rcbuffer->pybuffer.buf, __pyx_t_10, __pyx_pybuffernd_output.diminfo[0].strides); __Pyx_GOTREF(*__pyx_t_12); __Pyx_INCREF(__pyx_t_4); __Pyx_DECREF(*__pyx_t_12); *__pyx_t_12 = __pyx_t_4; __Pyx_GIVEREF(*__pyx_t_12); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; goto __pyx_L6; } /*else*/ { /* "pandas/src/inference.pyx":1024 * output[i] = mapping[val] * else: * output[i] = default # <<<<<<<<<<<<<< * * return maybe_convert_objects(output) */ __pyx_t_13 = __pyx_v_i; __pyx_t_11 = -1; if (__pyx_t_13 < 0) { __pyx_t_13 += __pyx_pybuffernd_output.diminfo[0].shape; if (unlikely(__pyx_t_13 < 0)) __pyx_t_11 = 0; } else if (unlikely(__pyx_t_13 >= __pyx_pybuffernd_output.diminfo[0].shape)) __pyx_t_11 = 0; if (unlikely(__pyx_t_11 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_11); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1024; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_12 = __Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_output.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_output.diminfo[0].strides); __Pyx_GOTREF(*__pyx_t_12); __Pyx_INCREF(__pyx_v_default); __Pyx_DECREF(*__pyx_t_12); *__pyx_t_12 = __pyx_v_default; __Pyx_GIVEREF(*__pyx_t_12); } __pyx_L6:; } /* "pandas/src/inference.pyx":1026 * output[i] = default * * return maybe_convert_objects(output) # <<<<<<<<<<<<<< */ __Pyx_XDECREF(__pyx_r); __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_maybe_convert_objects); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1026; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1026; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(((PyObject *)__pyx_v_output)); PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_v_output)); __Pyx_GIVEREF(((PyObject *)__pyx_v_output)); __pyx_t_2 = PyObject_Call(__pyx_t_4, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1026; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "pandas/src/inference.pyx":1009 * * * def fast_multiget(dict mapping, ndarray keys, default=np.nan): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = len(keys) */ /* 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); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_output.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.lib.fast_multiget", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_output.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF(__pyx_v_val); __Pyx_XDECREF((PyObject *)__pyx_v_output); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "datetime.pxd":126 * * * cdef inline _string_to_dts(object val, pandas_datetimestruct* dts): # <<<<<<<<<<<<<< * cdef int result * cdef char *tmp */ static CYTHON_INLINE PyObject *__pyx_f_8datetime__string_to_dts(PyObject *__pyx_v_val, pandas_datetimestruct *__pyx_v_dts) { int __pyx_v_result; char *__pyx_v_tmp; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; char *__pyx_t_3; Py_ssize_t __pyx_t_4; PyObject *__pyx_t_5 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_string_to_dts", 0); __Pyx_INCREF(__pyx_v_val); /* "datetime.pxd":130 * cdef char *tmp * * if PyUnicode_Check(val): # <<<<<<<<<<<<<< * val = PyUnicode_AsASCIIString(val); * */ __pyx_t_1 = (PyUnicode_Check(__pyx_v_val) != 0); if (__pyx_t_1) { /* "datetime.pxd":131 * * if PyUnicode_Check(val): * val = PyUnicode_AsASCIIString(val); # <<<<<<<<<<<<<< * * tmp = val */ __pyx_t_2 = PyUnicode_AsASCIIString(__pyx_v_val); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 131; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF_SET(__pyx_v_val, __pyx_t_2); __pyx_t_2 = 0; goto __pyx_L3; } __pyx_L3:; /* "datetime.pxd":133 * val = PyUnicode_AsASCIIString(val); * * tmp = val # <<<<<<<<<<<<<< * result = _cstring_to_dts(tmp, len(val), dts) * */ __pyx_t_3 = __Pyx_PyObject_AsString(__pyx_v_val); if (unlikely((!__pyx_t_3) && PyErr_Occurred())) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 133; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_tmp = __pyx_t_3; /* "datetime.pxd":134 * * tmp = val * result = _cstring_to_dts(tmp, len(val), dts) # <<<<<<<<<<<<<< * * if result == -1: */ __pyx_t_4 = PyObject_Length(__pyx_v_val); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 134; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_result = __pyx_f_8datetime__cstring_to_dts(__pyx_v_tmp, __pyx_t_4, __pyx_v_dts); /* "datetime.pxd":136 * result = _cstring_to_dts(tmp, len(val), dts) * * if result == -1: # <<<<<<<<<<<<<< * raise ValueError('Unable to parse %s' % str(val)) * */ __pyx_t_1 = ((__pyx_v_result == -1) != 0); if (__pyx_t_1) { /* "datetime.pxd":137 * * if result == -1: * raise ValueError('Unable to parse %s' % str(val)) # <<<<<<<<<<<<<< * * cdef inline int _cstring_to_dts(char *val, int length, */ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 137; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_val); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_val); __Pyx_GIVEREF(__pyx_v_val); __pyx_t_5 = PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), __pyx_t_2, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 137; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_Unable_to_parse_s, __pyx_t_5); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 137; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 137; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 137; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; {__pyx_filename = __pyx_f[4]; __pyx_lineno = 137; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } /* "datetime.pxd":126 * * * cdef inline _string_to_dts(object val, pandas_datetimestruct* dts): # <<<<<<<<<<<<<< * cdef int result * cdef char *tmp */ /* 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_5); __Pyx_AddTraceback("datetime._string_to_dts", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_val); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "datetime.pxd":139 * raise ValueError('Unable to parse %s' % str(val)) * * cdef inline int _cstring_to_dts(char *val, int length, # <<<<<<<<<<<<<< * pandas_datetimestruct* dts): * cdef: */ static CYTHON_INLINE int __pyx_f_8datetime__cstring_to_dts(char *__pyx_v_val, int __pyx_v_length, pandas_datetimestruct *__pyx_v_dts) { npy_bool __pyx_v_islocal; npy_bool __pyx_v_special; PANDAS_DATETIMEUNIT __pyx_v_out_bestunit; int __pyx_v_result; int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_cstring_to_dts", 0); /* "datetime.pxd":146 * int result * * result = parse_iso_8601_datetime(val, length, PANDAS_FR_ns, # <<<<<<<<<<<<<< * NPY_UNSAFE_CASTING, * dts, &islocal, &out_bestunit, &special) */ __pyx_v_result = parse_iso_8601_datetime(__pyx_v_val, __pyx_v_length, PANDAS_FR_ns, NPY_UNSAFE_CASTING, __pyx_v_dts, (&__pyx_v_islocal), (&__pyx_v_out_bestunit), (&__pyx_v_special)); /* "datetime.pxd":149 * NPY_UNSAFE_CASTING, * dts, &islocal, &out_bestunit, &special) * return result # <<<<<<<<<<<<<< * * */ __pyx_r = __pyx_v_result; goto __pyx_L0; /* "datetime.pxd":139 * raise ValueError('Unable to parse %s' % str(val)) * * cdef inline int _cstring_to_dts(char *val, int length, # <<<<<<<<<<<<<< * pandas_datetimestruct* dts): * cdef: */ /* function exit code */ __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "datetime.pxd":152 * * * cdef inline object _datetime64_to_datetime(int64_t val): # <<<<<<<<<<<<<< * cdef pandas_datetimestruct dts * pandas_datetime_to_datetimestruct(val, PANDAS_FR_ns, &dts) */ static CYTHON_INLINE PyObject *__pyx_f_8datetime__datetime64_to_datetime(__pyx_t_5numpy_int64_t __pyx_v_val) { pandas_datetimestruct __pyx_v_dts; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_datetime64_to_datetime", 0); /* "datetime.pxd":154 * cdef inline object _datetime64_to_datetime(int64_t val): * cdef pandas_datetimestruct dts * pandas_datetime_to_datetimestruct(val, PANDAS_FR_ns, &dts) # <<<<<<<<<<<<<< * return _dts_to_pydatetime(&dts) * */ pandas_datetime_to_datetimestruct(__pyx_v_val, PANDAS_FR_ns, (&__pyx_v_dts)); /* "datetime.pxd":155 * cdef pandas_datetimestruct dts * pandas_datetime_to_datetimestruct(val, PANDAS_FR_ns, &dts) * return _dts_to_pydatetime(&dts) # <<<<<<<<<<<<<< * * cdef inline object _dts_to_pydatetime(pandas_datetimestruct *dts): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_8datetime__dts_to_pydatetime((&__pyx_v_dts)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 155; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "datetime.pxd":152 * * * cdef inline object _datetime64_to_datetime(int64_t val): # <<<<<<<<<<<<<< * cdef pandas_datetimestruct dts * pandas_datetime_to_datetimestruct(val, PANDAS_FR_ns, &dts) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("datetime._datetime64_to_datetime", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "datetime.pxd":157 * return _dts_to_pydatetime(&dts) * * cdef inline object _dts_to_pydatetime(pandas_datetimestruct *dts): # <<<<<<<<<<<<<< * return PyDateTime_FromDateAndTime(dts.year, dts.month, * dts.day, dts.hour, */ static CYTHON_INLINE PyObject *__pyx_f_8datetime__dts_to_pydatetime(pandas_datetimestruct *__pyx_v_dts) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_dts_to_pydatetime", 0); /* "datetime.pxd":158 * * cdef inline object _dts_to_pydatetime(pandas_datetimestruct *dts): * return PyDateTime_FromDateAndTime(dts.year, dts.month, # <<<<<<<<<<<<<< * dts.day, dts.hour, * dts.min, dts.sec, dts.us) */ __Pyx_XDECREF(__pyx_r); /* "datetime.pxd":160 * return PyDateTime_FromDateAndTime(dts.year, dts.month, * dts.day, dts.hour, * dts.min, dts.sec, dts.us) # <<<<<<<<<<<<<< * * cdef inline int64_t _pydatetime_to_dts(object val, pandas_datetimestruct *dts): */ __pyx_t_1 = PyDateTime_FromDateAndTime(__pyx_v_dts->year, __pyx_v_dts->month, __pyx_v_dts->day, __pyx_v_dts->hour, __pyx_v_dts->min, __pyx_v_dts->sec, __pyx_v_dts->us); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 158; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); /* "datetime.pxd":158 * * cdef inline object _dts_to_pydatetime(pandas_datetimestruct *dts): * return PyDateTime_FromDateAndTime(dts.year, dts.month, # <<<<<<<<<<<<<< * dts.day, dts.hour, * dts.min, dts.sec, dts.us) */ __Pyx_INCREF(((PyObject *)__pyx_t_1)); __pyx_r = __pyx_t_1; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; /* "datetime.pxd":157 * return _dts_to_pydatetime(&dts) * * cdef inline object _dts_to_pydatetime(pandas_datetimestruct *dts): # <<<<<<<<<<<<<< * return PyDateTime_FromDateAndTime(dts.year, dts.month, * dts.day, dts.hour, */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("datetime._dts_to_pydatetime", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "datetime.pxd":162 * dts.min, dts.sec, dts.us) * * cdef inline int64_t _pydatetime_to_dts(object val, pandas_datetimestruct *dts): # <<<<<<<<<<<<<< * dts.year = PyDateTime_GET_YEAR(val) * dts.month = PyDateTime_GET_MONTH(val) */ static CYTHON_INLINE __pyx_t_5numpy_int64_t __pyx_f_8datetime__pydatetime_to_dts(PyObject *__pyx_v_val, pandas_datetimestruct *__pyx_v_dts) { __pyx_t_5numpy_int64_t __pyx_r; __Pyx_RefNannyDeclarations int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_pydatetime_to_dts", 0); /* "datetime.pxd":163 * * cdef inline int64_t _pydatetime_to_dts(object val, pandas_datetimestruct *dts): * dts.year = PyDateTime_GET_YEAR(val) # <<<<<<<<<<<<<< * dts.month = PyDateTime_GET_MONTH(val) * dts.day = PyDateTime_GET_DAY(val) */ if (!(likely(((__pyx_v_val) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_val, __pyx_ptype_8datetime_date))))) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 163; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_dts->year = PyDateTime_GET_YEAR(((PyDateTime_Date *)__pyx_v_val)); /* "datetime.pxd":164 * cdef inline int64_t _pydatetime_to_dts(object val, pandas_datetimestruct *dts): * dts.year = PyDateTime_GET_YEAR(val) * dts.month = PyDateTime_GET_MONTH(val) # <<<<<<<<<<<<<< * dts.day = PyDateTime_GET_DAY(val) * dts.hour = PyDateTime_DATE_GET_HOUR(val) */ if (!(likely(((__pyx_v_val) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_val, __pyx_ptype_8datetime_date))))) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 164; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_dts->month = PyDateTime_GET_MONTH(((PyDateTime_Date *)__pyx_v_val)); /* "datetime.pxd":165 * dts.year = PyDateTime_GET_YEAR(val) * dts.month = PyDateTime_GET_MONTH(val) * dts.day = PyDateTime_GET_DAY(val) # <<<<<<<<<<<<<< * dts.hour = PyDateTime_DATE_GET_HOUR(val) * dts.min = PyDateTime_DATE_GET_MINUTE(val) */ if (!(likely(((__pyx_v_val) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_val, __pyx_ptype_8datetime_date))))) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 165; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_dts->day = PyDateTime_GET_DAY(((PyDateTime_Date *)__pyx_v_val)); /* "datetime.pxd":166 * dts.month = PyDateTime_GET_MONTH(val) * dts.day = PyDateTime_GET_DAY(val) * dts.hour = PyDateTime_DATE_GET_HOUR(val) # <<<<<<<<<<<<<< * dts.min = PyDateTime_DATE_GET_MINUTE(val) * dts.sec = PyDateTime_DATE_GET_SECOND(val) */ __pyx_v_dts->hour = PyDateTime_DATE_GET_HOUR(__pyx_v_val); /* "datetime.pxd":167 * dts.day = PyDateTime_GET_DAY(val) * dts.hour = PyDateTime_DATE_GET_HOUR(val) * dts.min = PyDateTime_DATE_GET_MINUTE(val) # <<<<<<<<<<<<<< * dts.sec = PyDateTime_DATE_GET_SECOND(val) * dts.us = PyDateTime_DATE_GET_MICROSECOND(val) */ __pyx_v_dts->min = PyDateTime_DATE_GET_MINUTE(__pyx_v_val); /* "datetime.pxd":168 * dts.hour = PyDateTime_DATE_GET_HOUR(val) * dts.min = PyDateTime_DATE_GET_MINUTE(val) * dts.sec = PyDateTime_DATE_GET_SECOND(val) # <<<<<<<<<<<<<< * dts.us = PyDateTime_DATE_GET_MICROSECOND(val) * dts.ps = dts.as = 0 */ __pyx_v_dts->sec = PyDateTime_DATE_GET_SECOND(__pyx_v_val); /* "datetime.pxd":169 * dts.min = PyDateTime_DATE_GET_MINUTE(val) * dts.sec = PyDateTime_DATE_GET_SECOND(val) * dts.us = PyDateTime_DATE_GET_MICROSECOND(val) # <<<<<<<<<<<<<< * dts.ps = dts.as = 0 * return pandas_datetimestruct_to_datetime(PANDAS_FR_ns, dts) */ __pyx_v_dts->us = PyDateTime_DATE_GET_MICROSECOND(__pyx_v_val); /* "datetime.pxd":170 * dts.sec = PyDateTime_DATE_GET_SECOND(val) * dts.us = PyDateTime_DATE_GET_MICROSECOND(val) * dts.ps = dts.as = 0 # <<<<<<<<<<<<<< * return pandas_datetimestruct_to_datetime(PANDAS_FR_ns, dts) * */ __pyx_v_dts->ps = 0; __pyx_v_dts->as = 0; /* "datetime.pxd":171 * dts.us = PyDateTime_DATE_GET_MICROSECOND(val) * dts.ps = dts.as = 0 * return pandas_datetimestruct_to_datetime(PANDAS_FR_ns, dts) # <<<<<<<<<<<<<< * * cdef inline int64_t _dtlike_to_datetime64(object val, */ __pyx_r = pandas_datetimestruct_to_datetime(PANDAS_FR_ns, __pyx_v_dts); goto __pyx_L0; /* "datetime.pxd":162 * dts.min, dts.sec, dts.us) * * cdef inline int64_t _pydatetime_to_dts(object val, pandas_datetimestruct *dts): # <<<<<<<<<<<<<< * dts.year = PyDateTime_GET_YEAR(val) * dts.month = PyDateTime_GET_MONTH(val) */ /* function exit code */ __pyx_L1_error:; __Pyx_WriteUnraisable("datetime._pydatetime_to_dts", __pyx_clineno, __pyx_lineno, __pyx_filename, 0); __pyx_r = 0; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "datetime.pxd":173 * return pandas_datetimestruct_to_datetime(PANDAS_FR_ns, dts) * * cdef inline int64_t _dtlike_to_datetime64(object val, # <<<<<<<<<<<<<< * pandas_datetimestruct *dts): * dts.year = val.year */ static CYTHON_INLINE __pyx_t_5numpy_int64_t __pyx_f_8datetime__dtlike_to_datetime64(PyObject *__pyx_v_val, pandas_datetimestruct *__pyx_v_dts) { __pyx_t_5numpy_int64_t __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; npy_int64 __pyx_t_2; npy_int32 __pyx_t_3; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_dtlike_to_datetime64", 0); /* "datetime.pxd":175 * cdef inline int64_t _dtlike_to_datetime64(object val, * pandas_datetimestruct *dts): * dts.year = val.year # <<<<<<<<<<<<<< * dts.month = val.month * dts.day = val.day */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_val, __pyx_n_s_year); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 175; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyInt_As_npy_int64(__pyx_t_1); if (unlikely((__pyx_t_2 == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 175; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_dts->year = __pyx_t_2; /* "datetime.pxd":176 * pandas_datetimestruct *dts): * dts.year = val.year * dts.month = val.month # <<<<<<<<<<<<<< * dts.day = val.day * dts.hour = val.hour */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_val, __pyx_n_s_month); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 176; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __Pyx_PyInt_As_npy_int32(__pyx_t_1); if (unlikely((__pyx_t_3 == (npy_int32)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 176; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_dts->month = __pyx_t_3; /* "datetime.pxd":177 * dts.year = val.year * dts.month = val.month * dts.day = val.day # <<<<<<<<<<<<<< * dts.hour = val.hour * dts.min = val.minute */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_val, __pyx_n_s_day); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 177; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __Pyx_PyInt_As_npy_int32(__pyx_t_1); if (unlikely((__pyx_t_3 == (npy_int32)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 177; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_dts->day = __pyx_t_3; /* "datetime.pxd":178 * dts.month = val.month * dts.day = val.day * dts.hour = val.hour # <<<<<<<<<<<<<< * dts.min = val.minute * dts.sec = val.second */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_val, __pyx_n_s_hour); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 178; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __Pyx_PyInt_As_npy_int32(__pyx_t_1); if (unlikely((__pyx_t_3 == (npy_int32)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 178; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_dts->hour = __pyx_t_3; /* "datetime.pxd":179 * dts.day = val.day * dts.hour = val.hour * dts.min = val.minute # <<<<<<<<<<<<<< * dts.sec = val.second * dts.us = val.microsecond */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_val, __pyx_n_s_minute); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 179; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __Pyx_PyInt_As_npy_int32(__pyx_t_1); if (unlikely((__pyx_t_3 == (npy_int32)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 179; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_dts->min = __pyx_t_3; /* "datetime.pxd":180 * dts.hour = val.hour * dts.min = val.minute * dts.sec = val.second # <<<<<<<<<<<<<< * dts.us = val.microsecond * dts.ps = dts.as = 0 */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_val, __pyx_n_s_second); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __Pyx_PyInt_As_npy_int32(__pyx_t_1); if (unlikely((__pyx_t_3 == (npy_int32)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_dts->sec = __pyx_t_3; /* "datetime.pxd":181 * dts.min = val.minute * dts.sec = val.second * dts.us = val.microsecond # <<<<<<<<<<<<<< * dts.ps = dts.as = 0 * return pandas_datetimestruct_to_datetime(PANDAS_FR_ns, dts) */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_val, __pyx_n_s_microsecond); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 181; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __Pyx_PyInt_As_npy_int32(__pyx_t_1); if (unlikely((__pyx_t_3 == (npy_int32)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 181; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_dts->us = __pyx_t_3; /* "datetime.pxd":182 * dts.sec = val.second * dts.us = val.microsecond * dts.ps = dts.as = 0 # <<<<<<<<<<<<<< * return pandas_datetimestruct_to_datetime(PANDAS_FR_ns, dts) * */ __pyx_v_dts->ps = 0; __pyx_v_dts->as = 0; /* "datetime.pxd":183 * dts.us = val.microsecond * dts.ps = dts.as = 0 * return pandas_datetimestruct_to_datetime(PANDAS_FR_ns, dts) # <<<<<<<<<<<<<< * * cdef inline int64_t _date_to_datetime64(object val, */ __pyx_r = pandas_datetimestruct_to_datetime(PANDAS_FR_ns, __pyx_v_dts); goto __pyx_L0; /* "datetime.pxd":173 * return pandas_datetimestruct_to_datetime(PANDAS_FR_ns, dts) * * cdef inline int64_t _dtlike_to_datetime64(object val, # <<<<<<<<<<<<<< * pandas_datetimestruct *dts): * dts.year = val.year */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_WriteUnraisable("datetime._dtlike_to_datetime64", __pyx_clineno, __pyx_lineno, __pyx_filename, 0); __pyx_r = 0; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "datetime.pxd":185 * return pandas_datetimestruct_to_datetime(PANDAS_FR_ns, dts) * * cdef inline int64_t _date_to_datetime64(object val, # <<<<<<<<<<<<<< * pandas_datetimestruct *dts): * dts.year = PyDateTime_GET_YEAR(val) */ static CYTHON_INLINE __pyx_t_5numpy_int64_t __pyx_f_8datetime__date_to_datetime64(PyObject *__pyx_v_val, pandas_datetimestruct *__pyx_v_dts) { __pyx_t_5numpy_int64_t __pyx_r; __Pyx_RefNannyDeclarations int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_date_to_datetime64", 0); /* "datetime.pxd":187 * cdef inline int64_t _date_to_datetime64(object val, * pandas_datetimestruct *dts): * dts.year = PyDateTime_GET_YEAR(val) # <<<<<<<<<<<<<< * dts.month = PyDateTime_GET_MONTH(val) * dts.day = PyDateTime_GET_DAY(val) */ if (!(likely(((__pyx_v_val) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_val, __pyx_ptype_8datetime_date))))) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 187; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_dts->year = PyDateTime_GET_YEAR(((PyDateTime_Date *)__pyx_v_val)); /* "datetime.pxd":188 * pandas_datetimestruct *dts): * dts.year = PyDateTime_GET_YEAR(val) * dts.month = PyDateTime_GET_MONTH(val) # <<<<<<<<<<<<<< * dts.day = PyDateTime_GET_DAY(val) * dts.hour = dts.min = dts.sec = dts.us = 0 */ if (!(likely(((__pyx_v_val) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_val, __pyx_ptype_8datetime_date))))) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 188; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_dts->month = PyDateTime_GET_MONTH(((PyDateTime_Date *)__pyx_v_val)); /* "datetime.pxd":189 * dts.year = PyDateTime_GET_YEAR(val) * dts.month = PyDateTime_GET_MONTH(val) * dts.day = PyDateTime_GET_DAY(val) # <<<<<<<<<<<<<< * dts.hour = dts.min = dts.sec = dts.us = 0 * dts.ps = dts.as = 0 */ if (!(likely(((__pyx_v_val) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_val, __pyx_ptype_8datetime_date))))) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 189; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_dts->day = PyDateTime_GET_DAY(((PyDateTime_Date *)__pyx_v_val)); /* "datetime.pxd":190 * dts.month = PyDateTime_GET_MONTH(val) * dts.day = PyDateTime_GET_DAY(val) * dts.hour = dts.min = dts.sec = dts.us = 0 # <<<<<<<<<<<<<< * dts.ps = dts.as = 0 * return pandas_datetimestruct_to_datetime(PANDAS_FR_ns, dts) */ __pyx_v_dts->hour = 0; __pyx_v_dts->min = 0; __pyx_v_dts->sec = 0; __pyx_v_dts->us = 0; /* "datetime.pxd":191 * dts.day = PyDateTime_GET_DAY(val) * dts.hour = dts.min = dts.sec = dts.us = 0 * dts.ps = dts.as = 0 # <<<<<<<<<<<<<< * return pandas_datetimestruct_to_datetime(PANDAS_FR_ns, dts) * */ __pyx_v_dts->ps = 0; __pyx_v_dts->as = 0; /* "datetime.pxd":192 * dts.hour = dts.min = dts.sec = dts.us = 0 * dts.ps = dts.as = 0 * return pandas_datetimestruct_to_datetime(PANDAS_FR_ns, dts) # <<<<<<<<<<<<<< * */ __pyx_r = pandas_datetimestruct_to_datetime(PANDAS_FR_ns, __pyx_v_dts); goto __pyx_L0; /* "datetime.pxd":185 * return pandas_datetimestruct_to_datetime(PANDAS_FR_ns, dts) * * cdef inline int64_t _date_to_datetime64(object val, # <<<<<<<<<<<<<< * pandas_datetimestruct *dts): * dts.year = PyDateTime_GET_YEAR(val) */ /* function exit code */ __pyx_L1_error:; __Pyx_WriteUnraisable("datetime._date_to_datetime64", __pyx_clineno, __pyx_lineno, __pyx_filename, 0); __pyx_r = 0; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "numpy.pxd":196 * # 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 fullfill 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_copy_shape; 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_v_hasfields; int __pyx_r; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; int __pyx_t_5; int __pyx_t_6; int __pyx_t_7; PyObject *__pyx_t_8 = NULL; char *__pyx_t_9; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__getbuffer__", 0); if (__pyx_v_info != NULL) { __pyx_v_info->obj = Py_None; __Pyx_INCREF(Py_None); __Pyx_GIVEREF(__pyx_v_info->obj); } /* "numpy.pxd":202 * # of flags * * if info == NULL: return # <<<<<<<<<<<<<< * * cdef int copy_shape, i, ndim */ __pyx_t_1 = ((__pyx_v_info == NULL) != 0); if (__pyx_t_1) { __pyx_r = 0; goto __pyx_L0; } /* "numpy.pxd":205 * * cdef int copy_shape, i, ndim * cdef int endian_detector = 1 # <<<<<<<<<<<<<< * cdef bint little_endian = ((&endian_detector)[0] != 0) * */ __pyx_v_endian_detector = 1; /* "numpy.pxd":206 * cdef int copy_shape, 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); /* "numpy.pxd":208 * cdef bint little_endian = ((&endian_detector)[0] != 0) * * ndim = PyArray_NDIM(self) # <<<<<<<<<<<<<< * * if sizeof(npy_intp) != sizeof(Py_ssize_t): */ __pyx_v_ndim = PyArray_NDIM(__pyx_v_self); /* "numpy.pxd":210 * ndim = PyArray_NDIM(self) * * if sizeof(npy_intp) != sizeof(Py_ssize_t): # <<<<<<<<<<<<<< * copy_shape = 1 * else: */ __pyx_t_1 = (((sizeof(npy_intp)) != (sizeof(Py_ssize_t))) != 0); if (__pyx_t_1) { /* "numpy.pxd":211 * * if sizeof(npy_intp) != sizeof(Py_ssize_t): * copy_shape = 1 # <<<<<<<<<<<<<< * else: * copy_shape = 0 */ __pyx_v_copy_shape = 1; goto __pyx_L4; } /*else*/ { /* "numpy.pxd":213 * copy_shape = 1 * else: * copy_shape = 0 # <<<<<<<<<<<<<< * * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) */ __pyx_v_copy_shape = 0; } __pyx_L4:; /* "numpy.pxd":215 * copy_shape = 0 * * 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_1 = (((__pyx_v_flags & PyBUF_C_CONTIGUOUS) == PyBUF_C_CONTIGUOUS) != 0); if (__pyx_t_1) { /* "numpy.pxd":216 * * 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_3 = __pyx_t_2; } else { __pyx_t_3 = __pyx_t_1; } if (__pyx_t_3) { /* "numpy.pxd":217 * 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_4 = PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__44, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 217; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[5]; __pyx_lineno = 217; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } /* "numpy.pxd":219 * 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_3 = (((__pyx_v_flags & PyBUF_F_CONTIGUOUS) == PyBUF_F_CONTIGUOUS) != 0); if (__pyx_t_3) { /* "numpy.pxd":220 * * 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_1 = ((!(PyArray_CHKFLAGS(__pyx_v_self, NPY_F_CONTIGUOUS) != 0)) != 0); __pyx_t_2 = __pyx_t_1; } else { __pyx_t_2 = __pyx_t_3; } if (__pyx_t_2) { /* "numpy.pxd":221 * 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_4 = PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__45, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 221; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[5]; __pyx_lineno = 221; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } /* "numpy.pxd":223 * raise ValueError(u"ndarray is not Fortran contiguous") * * info.buf = PyArray_DATA(self) # <<<<<<<<<<<<<< * info.ndim = ndim * if copy_shape: */ __pyx_v_info->buf = PyArray_DATA(__pyx_v_self); /* "numpy.pxd":224 * * info.buf = PyArray_DATA(self) * info.ndim = ndim # <<<<<<<<<<<<<< * if copy_shape: * # Allocate new buffer for strides and shape info. */ __pyx_v_info->ndim = __pyx_v_ndim; /* "numpy.pxd":225 * info.buf = PyArray_DATA(self) * info.ndim = ndim * if copy_shape: # <<<<<<<<<<<<<< * # Allocate new buffer for strides and shape info. * # This is allocated as one block, strides first. */ __pyx_t_2 = (__pyx_v_copy_shape != 0); if (__pyx_t_2) { /* "numpy.pxd":228 * # Allocate new buffer for strides and shape info. * # This is allocated as one block, strides first. * info.strides = stdlib.malloc(sizeof(Py_ssize_t) * ndim * 2) # <<<<<<<<<<<<<< * info.shape = info.strides + ndim * for i in range(ndim): */ __pyx_v_info->strides = ((Py_ssize_t *)malloc((((sizeof(Py_ssize_t)) * ((size_t)__pyx_v_ndim)) * 2))); /* "numpy.pxd":229 * # This is allocated as one block, strides first. * info.strides = stdlib.malloc(sizeof(Py_ssize_t) * ndim * 2) * 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); /* "numpy.pxd":230 * info.strides = stdlib.malloc(sizeof(Py_ssize_t) * ndim * 2) * 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_5 = __pyx_v_ndim; for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) { __pyx_v_i = __pyx_t_6; /* "numpy.pxd":231 * 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]); /* "numpy.pxd":232 * 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]); } goto __pyx_L7; } /*else*/ { /* "numpy.pxd":234 * info.shape[i] = PyArray_DIMS(self)[i] * else: * info.strides = PyArray_STRIDES(self) # <<<<<<<<<<<<<< * info.shape = PyArray_DIMS(self) * info.suboffsets = NULL */ __pyx_v_info->strides = ((Py_ssize_t *)PyArray_STRIDES(__pyx_v_self)); /* "numpy.pxd":235 * 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_L7:; /* "numpy.pxd":236 * 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; /* "numpy.pxd":237 * 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); /* "numpy.pxd":238 * 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)); /* "numpy.pxd":241 * * cdef int t * cdef char* f = NULL # <<<<<<<<<<<<<< * cdef dtype descr = self.descr * cdef list stack */ __pyx_v_f = NULL; /* "numpy.pxd":242 * cdef int t * cdef char* f = NULL * cdef dtype descr = self.descr # <<<<<<<<<<<<<< * cdef list stack * cdef int offset */ __pyx_t_4 = ((PyObject *)__pyx_v_self->descr); __Pyx_INCREF(__pyx_t_4); __pyx_v_descr = ((PyArray_Descr *)__pyx_t_4); __pyx_t_4 = 0; /* "numpy.pxd":246 * cdef int offset * * cdef bint hasfields = PyDataType_HASFIELDS(descr) # <<<<<<<<<<<<<< * * if not hasfields and not copy_shape: */ __pyx_v_hasfields = PyDataType_HASFIELDS(__pyx_v_descr); /* "numpy.pxd":248 * cdef bint hasfields = PyDataType_HASFIELDS(descr) * * if not hasfields and not copy_shape: # <<<<<<<<<<<<<< * # do not call releasebuffer * info.obj = None */ __pyx_t_2 = ((!(__pyx_v_hasfields != 0)) != 0); if (__pyx_t_2) { __pyx_t_3 = ((!(__pyx_v_copy_shape != 0)) != 0); __pyx_t_1 = __pyx_t_3; } else { __pyx_t_1 = __pyx_t_2; } if (__pyx_t_1) { /* "numpy.pxd":250 * if not hasfields and not copy_shape: * # do not call releasebuffer * info.obj = None # <<<<<<<<<<<<<< * else: * # need to call releasebuffer */ __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_info->obj); __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = Py_None; goto __pyx_L10; } /*else*/ { /* "numpy.pxd":253 * else: * # need to call releasebuffer * info.obj = self # <<<<<<<<<<<<<< * * if not hasfields: */ __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); } __pyx_L10:; /* "numpy.pxd":255 * info.obj = self * * if not hasfields: # <<<<<<<<<<<<<< * t = descr.type_num * if ((descr.byteorder == '>' and little_endian) or */ __pyx_t_1 = ((!(__pyx_v_hasfields != 0)) != 0); if (__pyx_t_1) { /* "numpy.pxd":256 * * if not hasfields: * t = descr.type_num # <<<<<<<<<<<<<< * if ((descr.byteorder == '>' and little_endian) or * (descr.byteorder == '<' and not little_endian)): */ __pyx_t_5 = __pyx_v_descr->type_num; __pyx_v_t = __pyx_t_5; /* "numpy.pxd":257 * if not hasfields: * t = descr.type_num * if ((descr.byteorder == '>' and little_endian) or # <<<<<<<<<<<<<< * (descr.byteorder == '<' and not little_endian)): * raise ValueError(u"Non-native byte order not supported") */ __pyx_t_1 = ((__pyx_v_descr->byteorder == '>') != 0); if (__pyx_t_1) { __pyx_t_2 = (__pyx_v_little_endian != 0); } else { __pyx_t_2 = __pyx_t_1; } if (!__pyx_t_2) { /* "numpy.pxd":258 * t = descr.type_num * if ((descr.byteorder == '>' and little_endian) or * (descr.byteorder == '<' and not little_endian)): # <<<<<<<<<<<<<< * raise ValueError(u"Non-native byte order not supported") * if t == NPY_BYTE: f = "b" */ __pyx_t_1 = ((__pyx_v_descr->byteorder == '<') != 0); if (__pyx_t_1) { __pyx_t_3 = ((!(__pyx_v_little_endian != 0)) != 0); __pyx_t_7 = __pyx_t_3; } else { __pyx_t_7 = __pyx_t_1; } __pyx_t_1 = __pyx_t_7; } else { __pyx_t_1 = __pyx_t_2; } if (__pyx_t_1) { /* "numpy.pxd":259 * if ((descr.byteorder == '>' and little_endian) or * (descr.byteorder == '<' 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_4 = PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__46, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 259; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[5]; __pyx_lineno = 259; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } /* "numpy.pxd":276 * 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) */ switch (__pyx_v_t) { /* "numpy.pxd":260 * (descr.byteorder == '<' 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" */ case NPY_BYTE: __pyx_v_f = __pyx_k_b; break; /* "numpy.pxd":261 * 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 = __pyx_k_B; break; /* "numpy.pxd":262 * 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 = __pyx_k_h; break; /* "numpy.pxd":263 * 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 = __pyx_k_H; break; /* "numpy.pxd":264 * 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 = __pyx_k_i; break; /* "numpy.pxd":265 * 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 = __pyx_k_I; break; /* "numpy.pxd":266 * 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 = __pyx_k_l; break; /* "numpy.pxd":267 * 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 = __pyx_k_L; break; /* "numpy.pxd":268 * 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 = __pyx_k_q; break; /* "numpy.pxd":269 * 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 = __pyx_k_Q; break; /* "numpy.pxd":270 * 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 = __pyx_k_f; break; /* "numpy.pxd":271 * 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 = __pyx_k_d; break; /* "numpy.pxd":272 * 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 = __pyx_k_g; break; /* "numpy.pxd":273 * 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 = __pyx_k_Zf; break; /* "numpy.pxd":274 * 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 = __pyx_k_Zd; break; /* "numpy.pxd":275 * 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 = __pyx_k_Zg; break; /* "numpy.pxd":276 * 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 = __pyx_k_O; break; default: /* "numpy.pxd":278 * elif t == NPY_OBJECT: f = "O" * else: * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) # <<<<<<<<<<<<<< * info.format = f * return */ __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_t); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 278; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_8 = PyUnicode_Format(__pyx_kp_u_unknown_dtype_code_in_numpy_pxd, __pyx_t_4); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 278; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 278; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_8); __Pyx_GIVEREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_8 = PyObject_Call(__pyx_builtin_ValueError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 278; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_Raise(__pyx_t_8, 0, 0, 0); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; {__pyx_filename = __pyx_f[5]; __pyx_lineno = 278; __pyx_clineno = __LINE__; goto __pyx_L1_error;} break; } /* "numpy.pxd":279 * else: * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) * info.format = f # <<<<<<<<<<<<<< * return * else: */ __pyx_v_info->format = __pyx_v_f; /* "numpy.pxd":280 * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) * info.format = f * return # <<<<<<<<<<<<<< * else: * info.format = stdlib.malloc(_buffer_format_string_len) */ __pyx_r = 0; goto __pyx_L0; } /*else*/ { /* "numpy.pxd":282 * return * else: * info.format = stdlib.malloc(_buffer_format_string_len) # <<<<<<<<<<<<<< * info.format[0] = '^' # Native data types, manual alignment * offset = 0 */ __pyx_v_info->format = ((char *)malloc(255)); /* "numpy.pxd":283 * else: * info.format = stdlib.malloc(_buffer_format_string_len) * info.format[0] = '^' # Native data types, manual alignment # <<<<<<<<<<<<<< * offset = 0 * f = _util_dtypestring(descr, info.format + 1, */ (__pyx_v_info->format[0]) = '^'; /* "numpy.pxd":284 * info.format = stdlib.malloc(_buffer_format_string_len) * info.format[0] = '^' # Native data types, manual alignment * offset = 0 # <<<<<<<<<<<<<< * f = _util_dtypestring(descr, info.format + 1, * info.format + _buffer_format_string_len, */ __pyx_v_offset = 0; /* "numpy.pxd":285 * info.format[0] = '^' # Native data types, manual alignment * offset = 0 * f = _util_dtypestring(descr, info.format + 1, # <<<<<<<<<<<<<< * info.format + _buffer_format_string_len, * &offset) */ __pyx_t_9 = __pyx_f_5numpy__util_dtypestring(__pyx_v_descr, (__pyx_v_info->format + 1), (__pyx_v_info->format + 255), (&__pyx_v_offset)); if (unlikely(__pyx_t_9 == NULL)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 285; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_f = __pyx_t_9; /* "numpy.pxd":288 * info.format + _buffer_format_string_len, * &offset) * f[0] = 0 # Terminate format string # <<<<<<<<<<<<<< * * def __releasebuffer__(ndarray self, Py_buffer* info): */ (__pyx_v_f[0]) = 0; } /* "numpy.pxd":196 * # 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 fullfill the PEP. */ /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_8); __Pyx_AddTraceback("numpy.ndarray.__getbuffer__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; if (__pyx_v_info != NULL && __pyx_v_info->obj != NULL) { __Pyx_GOTREF(__pyx_v_info->obj); __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = NULL; } goto __pyx_L2; __pyx_L0:; if (__pyx_v_info != NULL && __pyx_v_info->obj == Py_None) { __Pyx_GOTREF(Py_None); __Pyx_DECREF(Py_None); __pyx_v_info->obj = NULL; } __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_descr); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "numpy.pxd":290 * f[0] = 0 # Terminate format string * * def __releasebuffer__(ndarray self, Py_buffer* info): # <<<<<<<<<<<<<< * if PyArray_HASFIELDS(self): * stdlib.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); /* "numpy.pxd":291 * * def __releasebuffer__(ndarray self, Py_buffer* info): * if PyArray_HASFIELDS(self): # <<<<<<<<<<<<<< * stdlib.free(info.format) * if sizeof(npy_intp) != sizeof(Py_ssize_t): */ __pyx_t_1 = (PyArray_HASFIELDS(__pyx_v_self) != 0); if (__pyx_t_1) { /* "numpy.pxd":292 * def __releasebuffer__(ndarray self, Py_buffer* info): * if PyArray_HASFIELDS(self): * stdlib.free(info.format) # <<<<<<<<<<<<<< * if sizeof(npy_intp) != sizeof(Py_ssize_t): * stdlib.free(info.strides) */ free(__pyx_v_info->format); goto __pyx_L3; } __pyx_L3:; /* "numpy.pxd":293 * if PyArray_HASFIELDS(self): * stdlib.free(info.format) * if sizeof(npy_intp) != sizeof(Py_ssize_t): # <<<<<<<<<<<<<< * stdlib.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) { /* "numpy.pxd":294 * stdlib.free(info.format) * if sizeof(npy_intp) != sizeof(Py_ssize_t): * stdlib.free(info.strides) # <<<<<<<<<<<<<< * # info.shape was stored after info.strides in the same block * */ free(__pyx_v_info->strides); goto __pyx_L4; } __pyx_L4:; /* "numpy.pxd":290 * f[0] = 0 # Terminate format string * * def __releasebuffer__(ndarray self, Py_buffer* info): # <<<<<<<<<<<<<< * if PyArray_HASFIELDS(self): * stdlib.free(info.format) */ /* function exit code */ __Pyx_RefNannyFinishContext(); } /* "numpy.pxd":772 * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PyArray_MultiIterNew1", 0); /* "numpy.pxd":773 * * 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_filename = __pyx_f[5]; __pyx_lineno = 773; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "numpy.pxd":772 * 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; } /* "numpy.pxd":775 * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PyArray_MultiIterNew2", 0); /* "numpy.pxd":776 * * 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_filename = __pyx_f[5]; __pyx_lineno = 776; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "numpy.pxd":775 * 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; } /* "numpy.pxd":778 * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PyArray_MultiIterNew3", 0); /* "numpy.pxd":779 * * 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_filename = __pyx_f[5]; __pyx_lineno = 779; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "numpy.pxd":778 * 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; } /* "numpy.pxd":781 * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PyArray_MultiIterNew4", 0); /* "numpy.pxd":782 * * 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_filename = __pyx_f[5]; __pyx_lineno = 782; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "numpy.pxd":781 * 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; } /* "numpy.pxd":784 * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PyArray_MultiIterNew5", 0); /* "numpy.pxd":785 * * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): * return PyArray_MultiIterNew(5, a, b, c, d, e) # <<<<<<<<<<<<<< * * cdef inline char* _util_dtypestring(dtype descr, char* f, char* end, int* offset) except NULL: */ __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_filename = __pyx_f[5]; __pyx_lineno = 785; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "numpy.pxd":784 * 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; } /* "numpy.pxd":787 * return PyArray_MultiIterNew(5, a, b, c, d, e) * * 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; PyObject *__pyx_t_5 = NULL; int __pyx_t_6; int __pyx_t_7; int __pyx_t_8; int __pyx_t_9; long __pyx_t_10; char *__pyx_t_11; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_util_dtypestring", 0); /* "numpy.pxd":794 * cdef int delta_offset * cdef tuple i * cdef int endian_detector = 1 # <<<<<<<<<<<<<< * cdef bint little_endian = ((&endian_detector)[0] != 0) * cdef tuple fields */ __pyx_v_endian_detector = 1; /* "numpy.pxd":795 * cdef tuple i * 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); /* "numpy.pxd":798 * 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_filename = __pyx_f[5]; __pyx_lineno = 798; __pyx_clineno = __LINE__; goto __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_COMPILING_IN_CPYTHON __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_filename = __pyx_f[5]; __pyx_lineno = 798; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 798; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif __Pyx_XDECREF_SET(__pyx_v_childname, __pyx_t_3); __pyx_t_3 = 0; /* "numpy.pxd":799 * * for childname in descr.names: * fields = descr.fields[childname] # <<<<<<<<<<<<<< * child, new_offset = fields * */ __pyx_t_3 = PyObject_GetItem(__pyx_v_descr->fields, __pyx_v_childname); if (unlikely(__pyx_t_3 == NULL)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 799; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[5]; __pyx_lineno = 799; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_XDECREF_SET(__pyx_v_fields, ((PyObject*)__pyx_t_3)); __pyx_t_3 = 0; /* "numpy.pxd":800 * 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; #if CYTHON_COMPILING_IN_CPYTHON Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); {__pyx_filename = __pyx_f[5]; __pyx_lineno = 800; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON __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_filename = __pyx_f[5]; __pyx_lineno = 800; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 800; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); #endif } else { __Pyx_RaiseNoneNotIterableError(); {__pyx_filename = __pyx_f[5]; __pyx_lineno = 800; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_dtype))))) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 800; __pyx_clineno = __LINE__; goto __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; /* "numpy.pxd":802 * 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_ptrdiff_t((__pyx_v_end - __pyx_v_f)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 802; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = __Pyx_PyInt_From_int((__pyx_v_offset[0])); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 802; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = PyNumber_Subtract(__pyx_v_new_offset, __pyx_t_3); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 802; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyNumber_Subtract(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 802; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyObject_RichCompare(__pyx_t_3, __pyx_int_15, Py_LT); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 802; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 802; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_6) { /* "numpy.pxd":803 * * if (end - f) - (new_offset - offset[0]) < 15: * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") # <<<<<<<<<<<<<< * * if ((child.byteorder == '>' and little_endian) or */ __pyx_t_5 = PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__47, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 803; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_Raise(__pyx_t_5, 0, 0, 0); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; {__pyx_filename = __pyx_f[5]; __pyx_lineno = 803; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } /* "numpy.pxd":805 * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") * * if ((child.byteorder == '>' and little_endian) or # <<<<<<<<<<<<<< * (child.byteorder == '<' and not little_endian)): * raise ValueError(u"Non-native byte order not supported") */ __pyx_t_6 = ((__pyx_v_child->byteorder == '>') != 0); if (__pyx_t_6) { __pyx_t_7 = (__pyx_v_little_endian != 0); } else { __pyx_t_7 = __pyx_t_6; } if (!__pyx_t_7) { /* "numpy.pxd":806 * * if ((child.byteorder == '>' and little_endian) or * (child.byteorder == '<' 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_6 = ((__pyx_v_child->byteorder == '<') != 0); if (__pyx_t_6) { __pyx_t_8 = ((!(__pyx_v_little_endian != 0)) != 0); __pyx_t_9 = __pyx_t_8; } else { __pyx_t_9 = __pyx_t_6; } __pyx_t_6 = __pyx_t_9; } else { __pyx_t_6 = __pyx_t_7; } if (__pyx_t_6) { /* "numpy.pxd":807 * if ((child.byteorder == '>' and little_endian) or * (child.byteorder == '<' 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_5 = PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__48, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 807; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_Raise(__pyx_t_5, 0, 0, 0); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; {__pyx_filename = __pyx_f[5]; __pyx_lineno = 807; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } /* "numpy.pxd":817 * * # Output padding bytes * while offset[0] < new_offset: # <<<<<<<<<<<<<< * f[0] = 120 # "x"; pad byte * f += 1 */ while (1) { __pyx_t_5 = __Pyx_PyInt_From_int((__pyx_v_offset[0])); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 817; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = PyObject_RichCompare(__pyx_t_5, __pyx_v_new_offset, Py_LT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 817; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 817; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (!__pyx_t_6) break; /* "numpy.pxd":818 * # Output padding bytes * while offset[0] < new_offset: * f[0] = 120 # "x"; pad byte # <<<<<<<<<<<<<< * f += 1 * offset[0] += 1 */ (__pyx_v_f[0]) = 120; /* "numpy.pxd":819 * while offset[0] < new_offset: * f[0] = 120 # "x"; pad byte * f += 1 # <<<<<<<<<<<<<< * offset[0] += 1 * */ __pyx_v_f = (__pyx_v_f + 1); /* "numpy.pxd":820 * f[0] = 120 # "x"; pad byte * f += 1 * offset[0] += 1 # <<<<<<<<<<<<<< * * offset[0] += child.itemsize */ __pyx_t_10 = 0; (__pyx_v_offset[__pyx_t_10]) = ((__pyx_v_offset[__pyx_t_10]) + 1); } /* "numpy.pxd":822 * offset[0] += 1 * * offset[0] += child.itemsize # <<<<<<<<<<<<<< * * if not PyDataType_HASFIELDS(child): */ __pyx_t_10 = 0; (__pyx_v_offset[__pyx_t_10]) = ((__pyx_v_offset[__pyx_t_10]) + __pyx_v_child->elsize); /* "numpy.pxd":824 * 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) { /* "numpy.pxd":825 * * if not PyDataType_HASFIELDS(child): * t = child.type_num # <<<<<<<<<<<<<< * if end - f < 5: * raise RuntimeError(u"Format string allocated too short.") */ __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_child->type_num); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 825; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_XDECREF_SET(__pyx_v_t, __pyx_t_3); __pyx_t_3 = 0; /* "numpy.pxd":826 * 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 (__pyx_t_6) { /* "numpy.pxd":827 * 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_3 = PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__49, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 827; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[5]; __pyx_lineno = 827; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } /* "numpy.pxd":830 * * # 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_3 = PyInt_FromLong(NPY_BYTE); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 830; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 830; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 830; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_6) { (__pyx_v_f[0]) = 98; goto __pyx_L11; } /* "numpy.pxd":831 * # 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_5 = PyInt_FromLong(NPY_UBYTE); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 831; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 831; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 831; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_6) { (__pyx_v_f[0]) = 66; goto __pyx_L11; } /* "numpy.pxd":832 * 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_3 = PyInt_FromLong(NPY_SHORT); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 832; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 832; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 832; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_6) { (__pyx_v_f[0]) = 104; goto __pyx_L11; } /* "numpy.pxd":833 * 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_5 = PyInt_FromLong(NPY_USHORT); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 833; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 833; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 833; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_6) { (__pyx_v_f[0]) = 72; goto __pyx_L11; } /* "numpy.pxd":834 * 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_3 = PyInt_FromLong(NPY_INT); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 834; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 834; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 834; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_6) { (__pyx_v_f[0]) = 105; goto __pyx_L11; } /* "numpy.pxd":835 * 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_5 = PyInt_FromLong(NPY_UINT); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 835; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 835; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 835; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_6) { (__pyx_v_f[0]) = 73; goto __pyx_L11; } /* "numpy.pxd":836 * 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_3 = PyInt_FromLong(NPY_LONG); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 836; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 836; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 836; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_6) { (__pyx_v_f[0]) = 108; goto __pyx_L11; } /* "numpy.pxd":837 * 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_5 = PyInt_FromLong(NPY_ULONG); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 837; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 837; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 837; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_6) { (__pyx_v_f[0]) = 76; goto __pyx_L11; } /* "numpy.pxd":838 * 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_3 = PyInt_FromLong(NPY_LONGLONG); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 838; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 838; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 838; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_6) { (__pyx_v_f[0]) = 113; goto __pyx_L11; } /* "numpy.pxd":839 * 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_5 = PyInt_FromLong(NPY_ULONGLONG); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 839; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 839; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 839; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_6) { (__pyx_v_f[0]) = 81; goto __pyx_L11; } /* "numpy.pxd":840 * 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_3 = PyInt_FromLong(NPY_FLOAT); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 840; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 840; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 840; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_6) { (__pyx_v_f[0]) = 102; goto __pyx_L11; } /* "numpy.pxd":841 * 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_5 = PyInt_FromLong(NPY_DOUBLE); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 841; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 841; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 841; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_6) { (__pyx_v_f[0]) = 100; goto __pyx_L11; } /* "numpy.pxd":842 * 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_3 = PyInt_FromLong(NPY_LONGDOUBLE); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 842; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 842; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 842; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_6) { (__pyx_v_f[0]) = 103; goto __pyx_L11; } /* "numpy.pxd":843 * 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_5 = PyInt_FromLong(NPY_CFLOAT); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 843; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 843; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 843; __pyx_clineno = __LINE__; goto __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]) = 102; __pyx_v_f = (__pyx_v_f + 1); goto __pyx_L11; } /* "numpy.pxd":844 * 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_3 = PyInt_FromLong(NPY_CDOUBLE); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 844; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 844; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 844; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_6) { (__pyx_v_f[0]) = 90; (__pyx_v_f[1]) = 100; __pyx_v_f = (__pyx_v_f + 1); goto __pyx_L11; } /* "numpy.pxd":845 * 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_5 = PyInt_FromLong(NPY_CLONGDOUBLE); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 845; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 845; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 845; __pyx_clineno = __LINE__; goto __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]) = 103; __pyx_v_f = (__pyx_v_f + 1); goto __pyx_L11; } /* "numpy.pxd":846 * 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_3 = PyInt_FromLong(NPY_OBJECT); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 846; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 846; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 846; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_6) { (__pyx_v_f[0]) = 79; goto __pyx_L11; } /*else*/ { /* "numpy.pxd":848 * elif t == NPY_OBJECT: f[0] = 79 #"O" * else: * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) # <<<<<<<<<<<<<< * f += 1 * else: */ __pyx_t_5 = PyUnicode_Format(__pyx_kp_u_unknown_dtype_code_in_numpy_pxd, __pyx_v_t); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 848; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 848; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyObject_Call(__pyx_builtin_ValueError, __pyx_t_3, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 848; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_Raise(__pyx_t_5, 0, 0, 0); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; {__pyx_filename = __pyx_f[5]; __pyx_lineno = 848; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_L11:; /* "numpy.pxd":849 * 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); goto __pyx_L9; } /*else*/ { /* "numpy.pxd":853 * # Cython ignores struct boundary information ("T{...}"), * # so don't output it * f = _util_dtypestring(child, f, end, offset) # <<<<<<<<<<<<<< * return f * */ __pyx_t_11 = __pyx_f_5numpy__util_dtypestring(__pyx_v_child, __pyx_v_f, __pyx_v_end, __pyx_v_offset); if (unlikely(__pyx_t_11 == NULL)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 853; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_f = __pyx_t_11; } __pyx_L9:; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "numpy.pxd":854 * # so don't output it * f = _util_dtypestring(child, f, end, offset) * return f # <<<<<<<<<<<<<< * * */ __pyx_r = __pyx_v_f; goto __pyx_L0; /* "numpy.pxd":787 * return PyArray_MultiIterNew(5, a, b, c, d, e) * * 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_XDECREF(__pyx_t_5); __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; } /* "numpy.pxd":969 * * * 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); /* "numpy.pxd":971 * 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) { /* "numpy.pxd":972 * cdef PyObject* baseptr * if base is None: * baseptr = NULL # <<<<<<<<<<<<<< * else: * Py_INCREF(base) # important to do this before decref below! */ __pyx_v_baseptr = NULL; goto __pyx_L3; } /*else*/ { /* "numpy.pxd":974 * baseptr = NULL * else: * Py_INCREF(base) # important to do this before decref below! # <<<<<<<<<<<<<< * baseptr = base * Py_XDECREF(arr.base) */ Py_INCREF(__pyx_v_base); /* "numpy.pxd":975 * 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:; /* "numpy.pxd":976 * 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); /* "numpy.pxd":977 * baseptr = base * Py_XDECREF(arr.base) * arr.base = baseptr # <<<<<<<<<<<<<< * * cdef inline object get_array_base(ndarray arr): */ __pyx_v_arr->base = __pyx_v_baseptr; /* "numpy.pxd":969 * * * cdef inline void set_array_base(ndarray arr, object base): # <<<<<<<<<<<<<< * cdef PyObject* baseptr * if base is None: */ /* function exit code */ __Pyx_RefNannyFinishContext(); } /* "numpy.pxd":979 * 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); /* "numpy.pxd":980 * * 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) { /* "numpy.pxd":981 * cdef inline object get_array_base(ndarray arr): * if arr.base is NULL: * return None # <<<<<<<<<<<<<< * else: * return arr.base */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(Py_None); __pyx_r = Py_None; goto __pyx_L0; } /*else*/ { /* "numpy.pxd":983 * return None * else: * return arr.base # <<<<<<<<<<<<<< */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_arr->base)); __pyx_r = ((PyObject *)__pyx_v_arr->base); goto __pyx_L0; } /* "numpy.pxd":979 * 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; } /* "util.pxd":26 * object sarr_from_data(cnp.dtype, int length, void* data) * * cdef inline object get_value_at(ndarray arr, object loc): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, sz */ static CYTHON_INLINE PyObject *__pyx_f_4util_get_value_at(PyArrayObject *__pyx_v_arr, PyObject *__pyx_v_loc) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_sz; PyObject *__pyx_v_casted = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; Py_ssize_t __pyx_t_3; int __pyx_t_4; int __pyx_t_5; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_value_at", 0); __Pyx_INCREF(__pyx_v_loc); /* "util.pxd":30 * Py_ssize_t i, sz * void* data_ptr * if is_float_object(loc): # <<<<<<<<<<<<<< * casted = int(loc) * if casted == loc: */ __pyx_t_1 = (is_float_object(__pyx_v_loc) != 0); if (__pyx_t_1) { /* "util.pxd":31 * void* data_ptr * if is_float_object(loc): * casted = int(loc) # <<<<<<<<<<<<<< * if casted == loc: * loc = casted */ __pyx_t_2 = PyNumber_Int(__pyx_v_loc); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 31; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_v_casted = __pyx_t_2; __pyx_t_2 = 0; /* "util.pxd":32 * if is_float_object(loc): * casted = int(loc) * if casted == loc: # <<<<<<<<<<<<<< * loc = casted * i = loc */ __pyx_t_2 = PyObject_RichCompare(__pyx_v_casted, __pyx_v_loc, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 32; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 32; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_1) { /* "util.pxd":33 * casted = int(loc) * if casted == loc: * loc = casted # <<<<<<<<<<<<<< * i = loc * sz = cnp.PyArray_SIZE(arr) */ __Pyx_INCREF(__pyx_v_casted); __Pyx_DECREF_SET(__pyx_v_loc, __pyx_v_casted); goto __pyx_L4; } __pyx_L4:; goto __pyx_L3; } __pyx_L3:; /* "util.pxd":34 * if casted == loc: * loc = casted * i = loc # <<<<<<<<<<<<<< * sz = cnp.PyArray_SIZE(arr) * */ __pyx_t_3 = __Pyx_PyIndex_AsSsize_t(__pyx_v_loc); if (unlikely((__pyx_t_3 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 34; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_i = ((Py_ssize_t)__pyx_t_3); /* "util.pxd":35 * loc = casted * i = loc * sz = cnp.PyArray_SIZE(arr) # <<<<<<<<<<<<<< * * if i < 0 and sz > 0: */ __pyx_v_sz = PyArray_SIZE(__pyx_v_arr); /* "util.pxd":37 * sz = cnp.PyArray_SIZE(arr) * * if i < 0 and sz > 0: # <<<<<<<<<<<<<< * i += sz * elif i >= sz or sz == 0: */ __pyx_t_1 = ((__pyx_v_i < 0) != 0); if (__pyx_t_1) { __pyx_t_4 = ((__pyx_v_sz > 0) != 0); __pyx_t_5 = __pyx_t_4; } else { __pyx_t_5 = __pyx_t_1; } if (__pyx_t_5) { /* "util.pxd":38 * * if i < 0 and sz > 0: * i += sz # <<<<<<<<<<<<<< * elif i >= sz or sz == 0: * raise IndexError('index out of bounds') */ __pyx_v_i = (__pyx_v_i + __pyx_v_sz); goto __pyx_L5; } /* "util.pxd":39 * if i < 0 and sz > 0: * i += sz * elif i >= sz or sz == 0: # <<<<<<<<<<<<<< * raise IndexError('index out of bounds') * */ __pyx_t_5 = ((__pyx_v_i >= __pyx_v_sz) != 0); if (!__pyx_t_5) { __pyx_t_1 = ((__pyx_v_sz == 0) != 0); __pyx_t_4 = __pyx_t_1; } else { __pyx_t_4 = __pyx_t_5; } if (__pyx_t_4) { /* "util.pxd":40 * i += sz * elif i >= sz or sz == 0: * raise IndexError('index out of bounds') # <<<<<<<<<<<<<< * * return get_value_1d(arr, i) */ __pyx_t_2 = PyObject_Call(__pyx_builtin_IndexError, __pyx_tuple__50, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 40; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[6]; __pyx_lineno = 40; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_L5:; /* "util.pxd":42 * raise IndexError('index out of bounds') * * return get_value_1d(arr, i) # <<<<<<<<<<<<<< * * cdef inline set_value_at(ndarray arr, object loc, object value): */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = get_value_1d(__pyx_v_arr, __pyx_v_i); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 42; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "util.pxd":26 * object sarr_from_data(cnp.dtype, int length, void* data) * * cdef inline object get_value_at(ndarray arr, object loc): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, sz */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("util.get_value_at", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_casted); __Pyx_XDECREF(__pyx_v_loc); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "util.pxd":44 * return get_value_1d(arr, i) * * cdef inline set_value_at(ndarray arr, object loc, object value): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, sz */ static CYTHON_INLINE PyObject *__pyx_f_4util_set_value_at(PyArrayObject *__pyx_v_arr, PyObject *__pyx_v_loc, PyObject *__pyx_v_value) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_sz; PyObject *__pyx_v_casted = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; Py_ssize_t __pyx_t_3; int __pyx_t_4; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("set_value_at", 0); __Pyx_INCREF(__pyx_v_loc); /* "util.pxd":47 * cdef: * Py_ssize_t i, sz * if is_float_object(loc): # <<<<<<<<<<<<<< * casted = int(loc) * if casted == loc: */ __pyx_t_1 = (is_float_object(__pyx_v_loc) != 0); if (__pyx_t_1) { /* "util.pxd":48 * Py_ssize_t i, sz * if is_float_object(loc): * casted = int(loc) # <<<<<<<<<<<<<< * if casted == loc: * loc = casted */ __pyx_t_2 = PyNumber_Int(__pyx_v_loc); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_v_casted = __pyx_t_2; __pyx_t_2 = 0; /* "util.pxd":49 * if is_float_object(loc): * casted = int(loc) * if casted == loc: # <<<<<<<<<<<<<< * loc = casted * i = loc */ __pyx_t_2 = PyObject_RichCompare(__pyx_v_casted, __pyx_v_loc, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_1) { /* "util.pxd":50 * casted = int(loc) * if casted == loc: * loc = casted # <<<<<<<<<<<<<< * i = loc * sz = cnp.PyArray_SIZE(arr) */ __Pyx_INCREF(__pyx_v_casted); __Pyx_DECREF_SET(__pyx_v_loc, __pyx_v_casted); goto __pyx_L4; } __pyx_L4:; goto __pyx_L3; } __pyx_L3:; /* "util.pxd":51 * if casted == loc: * loc = casted * i = loc # <<<<<<<<<<<<<< * sz = cnp.PyArray_SIZE(arr) * */ __pyx_t_3 = __Pyx_PyIndex_AsSsize_t(__pyx_v_loc); if (unlikely((__pyx_t_3 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_i = ((Py_ssize_t)__pyx_t_3); /* "util.pxd":52 * loc = casted * i = loc * sz = cnp.PyArray_SIZE(arr) # <<<<<<<<<<<<<< * * if i < 0: */ __pyx_v_sz = PyArray_SIZE(__pyx_v_arr); /* "util.pxd":54 * sz = cnp.PyArray_SIZE(arr) * * if i < 0: # <<<<<<<<<<<<<< * i += sz * elif i >= sz: */ __pyx_t_1 = ((__pyx_v_i < 0) != 0); if (__pyx_t_1) { /* "util.pxd":55 * * if i < 0: * i += sz # <<<<<<<<<<<<<< * elif i >= sz: * raise IndexError('index out of bounds') */ __pyx_v_i = (__pyx_v_i + __pyx_v_sz); goto __pyx_L5; } /* "util.pxd":56 * if i < 0: * i += sz * elif i >= sz: # <<<<<<<<<<<<<< * raise IndexError('index out of bounds') * */ __pyx_t_1 = ((__pyx_v_i >= __pyx_v_sz) != 0); if (__pyx_t_1) { /* "util.pxd":57 * i += sz * elif i >= sz: * raise IndexError('index out of bounds') # <<<<<<<<<<<<<< * * assign_value_1d(arr, i, value) */ __pyx_t_2 = PyObject_Call(__pyx_builtin_IndexError, __pyx_tuple__51, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 57; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[6]; __pyx_lineno = 57; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_L5:; /* "util.pxd":59 * raise IndexError('index out of bounds') * * assign_value_1d(arr, i, value) # <<<<<<<<<<<<<< * * cdef inline int is_contiguous(ndarray arr): */ __pyx_t_4 = assign_value_1d(__pyx_v_arr, __pyx_v_i, __pyx_v_value); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 59; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "util.pxd":44 * return get_value_1d(arr, i) * * cdef inline set_value_at(ndarray arr, object loc, object value): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, sz */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("util.set_value_at", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_casted); __Pyx_XDECREF(__pyx_v_loc); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "util.pxd":61 * assign_value_1d(arr, i, value) * * cdef inline int is_contiguous(ndarray arr): # <<<<<<<<<<<<<< * return cnp.PyArray_CHKFLAGS(arr, cnp.NPY_C_CONTIGUOUS) * */ static CYTHON_INLINE int __pyx_f_4util_is_contiguous(PyArrayObject *__pyx_v_arr) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("is_contiguous", 0); /* "util.pxd":62 * * cdef inline int is_contiguous(ndarray arr): * return cnp.PyArray_CHKFLAGS(arr, cnp.NPY_C_CONTIGUOUS) # <<<<<<<<<<<<<< * * cdef inline is_array(object o): */ __pyx_r = PyArray_CHKFLAGS(__pyx_v_arr, NPY_C_CONTIGUOUS); goto __pyx_L0; /* "util.pxd":61 * assign_value_1d(arr, i, value) * * cdef inline int is_contiguous(ndarray arr): # <<<<<<<<<<<<<< * return cnp.PyArray_CHKFLAGS(arr, cnp.NPY_C_CONTIGUOUS) * */ /* function exit code */ __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "util.pxd":64 * return cnp.PyArray_CHKFLAGS(arr, cnp.NPY_C_CONTIGUOUS) * * cdef inline is_array(object o): # <<<<<<<<<<<<<< * return cnp.PyArray_Check(o) * */ static CYTHON_INLINE PyObject *__pyx_f_4util_is_array(PyObject *__pyx_v_o) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("is_array", 0); /* "util.pxd":65 * * cdef inline is_array(object o): * return cnp.PyArray_Check(o) # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyBool_FromLong(PyArray_Check(__pyx_v_o)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 65; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "util.pxd":64 * return cnp.PyArray_CHKFLAGS(arr, cnp.NPY_C_CONTIGUOUS) * * cdef inline is_array(object o): # <<<<<<<<<<<<<< * return cnp.PyArray_Check(o) * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("util.is_array", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "util.pxd":68 * * * cdef inline bint _checknull(object val): # <<<<<<<<<<<<<< * try: * return val is None or (cpython.PyFloat_Check(val) and val != val) */ static CYTHON_INLINE int __pyx_f_4util__checknull(PyObject *__pyx_v_val) { 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; int __pyx_t_9; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_checknull", 0); /* "util.pxd":69 * * cdef inline bint _checknull(object val): * try: # <<<<<<<<<<<<<< * return val is None or (cpython.PyFloat_Check(val) and val != val) * except ValueError: */ { __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:*/ { /* "util.pxd":70 * cdef inline bint _checknull(object val): * try: * return val is None or (cpython.PyFloat_Check(val) and val != val) # <<<<<<<<<<<<<< * except ValueError: * return False */ __pyx_t_4 = (__pyx_v_val == Py_None); __pyx_t_5 = __Pyx_PyBool_FromLong(__pyx_t_4); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L3_error;} if (!__pyx_t_4) { __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_6 = __Pyx_PyBool_FromLong(PyFloat_Check(__pyx_v_val)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L3_error;} if (__pyx_t_4) { __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_7 = PyObject_RichCompare(__pyx_v_val, __pyx_v_val, Py_NE); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_t_8 = __pyx_t_7; __pyx_t_7 = 0; } else { __pyx_t_8 = __pyx_t_6; __pyx_t_6 = 0; } __pyx_t_6 = __pyx_t_8; __pyx_t_8 = 0; } else { __pyx_t_6 = __pyx_t_5; __pyx_t_5 = 0; } __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_r = __pyx_t_4; goto __pyx_L7_try_return; } __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L10_try_end; __pyx_L3_error:; __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; /* "util.pxd":71 * try: * return val is None or (cpython.PyFloat_Check(val) and val != val) * except ValueError: # <<<<<<<<<<<<<< * return False * */ __pyx_t_9 = PyErr_ExceptionMatches(__pyx_builtin_ValueError); if (__pyx_t_9) { __Pyx_AddTraceback("util._checknull", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_5, &__pyx_t_8) < 0) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 71; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_GOTREF(__pyx_t_5); __Pyx_GOTREF(__pyx_t_8); /* "util.pxd":72 * return val is None or (cpython.PyFloat_Check(val) and val != val) * except ValueError: * return False # <<<<<<<<<<<<<< * * cdef inline bint _checknull_old(object val): */ __pyx_r = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; goto __pyx_L6_except_return; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; goto __pyx_L4_exception_handled; } goto __pyx_L5_except_error; __pyx_L5_except_error:; __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); goto __pyx_L1_error; __pyx_L7_try_return:; __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); goto __pyx_L0; __pyx_L6_except_return:; __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); goto __pyx_L0; __pyx_L4_exception_handled:; __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); __pyx_L10_try_end:; } /* "util.pxd":68 * * * cdef inline bint _checknull(object val): # <<<<<<<<<<<<<< * try: * return val is None or (cpython.PyFloat_Check(val) and val != val) */ /* 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_WriteUnraisable("util._checknull", __pyx_clineno, __pyx_lineno, __pyx_filename, 0); __pyx_r = 0; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "util.pxd":74 * return False * * cdef inline bint _checknull_old(object val): # <<<<<<<<<<<<<< * import numpy as np * cdef double INF = np.inf */ static CYTHON_INLINE int __pyx_f_4util__checknull_old(PyObject *__pyx_v_val) { PyObject *__pyx_v_np = NULL; double __pyx_v_INF; double __pyx_v_NEGINF; int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; double __pyx_t_2; 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; int __pyx_t_9; int __pyx_t_10; int __pyx_t_11; int __pyx_t_12; PyObject *__pyx_t_13 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_checknull_old", 0); /* "util.pxd":75 * * cdef inline bint _checknull_old(object val): * import numpy as np # <<<<<<<<<<<<<< * cdef double INF = np.inf * cdef double NEGINF = -INF */ __pyx_t_1 = __Pyx_Import(__pyx_n_s_numpy, 0, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 75; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_v_np = __pyx_t_1; __pyx_t_1 = 0; /* "util.pxd":76 * cdef inline bint _checknull_old(object val): * import numpy as np * cdef double INF = np.inf # <<<<<<<<<<<<<< * cdef double NEGINF = -INF * try: */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_np, __pyx_n_s_inf); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 76; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __pyx_PyFloat_AsDouble(__pyx_t_1); if (unlikely((__pyx_t_2 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 76; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_INF = ((double)__pyx_t_2); /* "util.pxd":77 * import numpy as np * cdef double INF = np.inf * cdef double NEGINF = -INF # <<<<<<<<<<<<<< * try: * return bool(val is None or val != val and val != INF */ __pyx_v_NEGINF = (-__pyx_v_INF); /* "util.pxd":78 * cdef double INF = np.inf * cdef double NEGINF = -INF * try: # <<<<<<<<<<<<<< * return bool(val is None or val != val and val != INF * and val != NEGINF) */ { __Pyx_ExceptionSave(&__pyx_t_3, &__pyx_t_4, &__pyx_t_5); __Pyx_XGOTREF(__pyx_t_3); __Pyx_XGOTREF(__pyx_t_4); __Pyx_XGOTREF(__pyx_t_5); /*try:*/ { /* "util.pxd":79 * cdef double NEGINF = -INF * try: * return bool(val is None or val != val and val != INF # <<<<<<<<<<<<<< * and val != NEGINF) * except ValueError: */ __pyx_t_6 = (__pyx_v_val == Py_None); if (!__pyx_t_6) { __pyx_t_1 = PyObject_RichCompare(__pyx_v_val, __pyx_v_val, Py_NE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_7) { /* "util.pxd":80 * try: * return bool(val is None or val != val and val != INF * and val != NEGINF) # <<<<<<<<<<<<<< * except ValueError: * return False */ __pyx_t_1 = PyFloat_FromDouble(__pyx_v_INF); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 80; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_8 = PyObject_RichCompare(__pyx_v_val, __pyx_t_1, Py_NE); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "util.pxd":79 * cdef double NEGINF = -INF * try: * return bool(val is None or val != val and val != INF # <<<<<<<<<<<<<< * and val != NEGINF) * except ValueError: */ __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (__pyx_t_9) { /* "util.pxd":80 * try: * return bool(val is None or val != val and val != INF * and val != NEGINF) # <<<<<<<<<<<<<< * except ValueError: * return False */ __pyx_t_8 = PyFloat_FromDouble(__pyx_v_NEGINF); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 80; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_1 = PyObject_RichCompare(__pyx_v_val, __pyx_t_8, Py_NE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 80; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 80; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_11 = __pyx_t_10; } else { __pyx_t_11 = __pyx_t_9; } __pyx_t_9 = __pyx_t_11; } else { __pyx_t_9 = __pyx_t_7; } __pyx_t_7 = __pyx_t_9; } else { __pyx_t_7 = __pyx_t_6; } /* "util.pxd":79 * cdef double NEGINF = -INF * try: * return bool(val is None or val != val and val != INF # <<<<<<<<<<<<<< * and val != NEGINF) * except ValueError: */ __pyx_r = (!(!__pyx_t_7)); goto __pyx_L7_try_return; } __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; goto __pyx_L10_try_end; __pyx_L3_error:; __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; /* "util.pxd":81 * return bool(val is None or val != val and val != INF * and val != NEGINF) * except ValueError: # <<<<<<<<<<<<<< * return False * */ __pyx_t_12 = PyErr_ExceptionMatches(__pyx_builtin_ValueError); if (__pyx_t_12) { __Pyx_AddTraceback("util._checknull_old", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_8, &__pyx_t_13) < 0) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_GOTREF(__pyx_t_8); __Pyx_GOTREF(__pyx_t_13); /* "util.pxd":82 * and val != NEGINF) * except ValueError: * return False # <<<<<<<<<<<<<< * * cdef inline bint _checknan(object val): */ __pyx_r = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; goto __pyx_L6_except_return; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; goto __pyx_L4_exception_handled; } goto __pyx_L5_except_error; __pyx_L5_except_error:; __Pyx_XGIVEREF(__pyx_t_3); __Pyx_XGIVEREF(__pyx_t_4); __Pyx_XGIVEREF(__pyx_t_5); __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5); goto __pyx_L1_error; __pyx_L7_try_return:; __Pyx_XGIVEREF(__pyx_t_3); __Pyx_XGIVEREF(__pyx_t_4); __Pyx_XGIVEREF(__pyx_t_5); __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5); goto __pyx_L0; __pyx_L6_except_return:; __Pyx_XGIVEREF(__pyx_t_3); __Pyx_XGIVEREF(__pyx_t_4); __Pyx_XGIVEREF(__pyx_t_5); __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5); goto __pyx_L0; __pyx_L4_exception_handled:; __Pyx_XGIVEREF(__pyx_t_3); __Pyx_XGIVEREF(__pyx_t_4); __Pyx_XGIVEREF(__pyx_t_5); __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5); __pyx_L10_try_end:; } /* "util.pxd":74 * return False * * cdef inline bint _checknull_old(object val): # <<<<<<<<<<<<<< * import numpy as np * cdef double INF = np.inf */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_13); __Pyx_WriteUnraisable("util._checknull_old", __pyx_clineno, __pyx_lineno, __pyx_filename, 0); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_np); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "util.pxd":84 * return False * * cdef inline bint _checknan(object val): # <<<<<<<<<<<<<< * return not cnp.PyArray_Check(val) and val != val */ static CYTHON_INLINE int __pyx_f_4util__checknan(PyObject *__pyx_v_val) { int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_checknan", 0); /* "util.pxd":85 * * cdef inline bint _checknan(object val): * return not cnp.PyArray_Check(val) and val != val # <<<<<<<<<<<<<< */ __pyx_t_1 = __Pyx_PyBool_FromLong((!(PyArray_Check(__pyx_v_val) != 0))); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__pyx_t_2) { __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_3 = PyObject_RichCompare(__pyx_v_val, __pyx_v_val, Py_NE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_4 = __pyx_t_3; __pyx_t_3 = 0; } else { __pyx_t_4 = __pyx_t_1; __pyx_t_1 = 0; } __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_r = __pyx_t_2; goto __pyx_L0; /* "util.pxd":84 * return False * * cdef inline bint _checknan(object val): # <<<<<<<<<<<<<< * return not cnp.PyArray_Check(val) and val != val */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_WriteUnraisable("util._checknan", __pyx_clineno, __pyx_lineno, __pyx_filename, 0); __pyx_r = 0; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static struct __pyx_vtabstruct_6pandas_3lib_BlockSlider __pyx_vtable_6pandas_3lib_BlockSlider; static PyObject *__pyx_tp_new_6pandas_3lib_BlockSlider(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { struct __pyx_obj_6pandas_3lib_BlockSlider *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_3lib_BlockSlider *)o); p->__pyx_vtab = __pyx_vtabptr_6pandas_3lib_BlockSlider; p->frame = Py_None; Py_INCREF(Py_None); p->dummy = Py_None; Py_INCREF(Py_None); p->idx_slider = ((struct __pyx_obj_6pandas_3lib_Slider *)Py_None); Py_INCREF(Py_None); p->blocks = ((PyObject*)Py_None); Py_INCREF(Py_None); return o; } static void __pyx_tp_dealloc_6pandas_3lib_BlockSlider(PyObject *o) { struct __pyx_obj_6pandas_3lib_BlockSlider *p = (struct __pyx_obj_6pandas_3lib_BlockSlider *)o; #if PY_VERSION_HEX >= 0x030400a1 if (unlikely(Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) { if (PyObject_CallFinalizerFromDealloc(o)) return; } #endif PyObject_GC_UnTrack(o); { PyObject *etype, *eval, *etb; PyErr_Fetch(&etype, &eval, &etb); ++Py_REFCNT(o); __pyx_pw_6pandas_3lib_11BlockSlider_3__dealloc__(o); --Py_REFCNT(o); PyErr_Restore(etype, eval, etb); } Py_CLEAR(p->frame); Py_CLEAR(p->dummy); Py_CLEAR(p->idx_slider); Py_CLEAR(p->blocks); (*Py_TYPE(o)->tp_free)(o); } static int __pyx_tp_traverse_6pandas_3lib_BlockSlider(PyObject *o, visitproc v, void *a) { int e; struct __pyx_obj_6pandas_3lib_BlockSlider *p = (struct __pyx_obj_6pandas_3lib_BlockSlider *)o; if (p->frame) { e = (*v)(p->frame, a); if (e) return e; } if (p->dummy) { e = (*v)(p->dummy, a); if (e) return e; } if (p->idx_slider) { e = (*v)(((PyObject*)p->idx_slider), a); if (e) return e; } if (p->blocks) { e = (*v)(p->blocks, a); if (e) return e; } return 0; } static int __pyx_tp_clear_6pandas_3lib_BlockSlider(PyObject *o) { PyObject* tmp; struct __pyx_obj_6pandas_3lib_BlockSlider *p = (struct __pyx_obj_6pandas_3lib_BlockSlider *)o; tmp = ((PyObject*)p->frame); p->frame = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->dummy); p->dummy = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->idx_slider); p->idx_slider = ((struct __pyx_obj_6pandas_3lib_Slider *)Py_None); Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->blocks); p->blocks = ((PyObject*)Py_None); Py_INCREF(Py_None); Py_XDECREF(tmp); return 0; } static PyObject *__pyx_getprop_6pandas_3lib_11BlockSlider_frame(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6pandas_3lib_11BlockSlider_5frame_1__get__(o); } static int __pyx_setprop_6pandas_3lib_11BlockSlider_frame(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { return __pyx_pw_6pandas_3lib_11BlockSlider_5frame_3__set__(o, v); } else { return __pyx_pw_6pandas_3lib_11BlockSlider_5frame_5__del__(o); } } static PyObject *__pyx_getprop_6pandas_3lib_11BlockSlider_dummy(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6pandas_3lib_11BlockSlider_5dummy_1__get__(o); } static int __pyx_setprop_6pandas_3lib_11BlockSlider_dummy(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { return __pyx_pw_6pandas_3lib_11BlockSlider_5dummy_3__set__(o, v); } else { return __pyx_pw_6pandas_3lib_11BlockSlider_5dummy_5__del__(o); } } static PyObject *__pyx_getprop_6pandas_3lib_11BlockSlider_nblocks(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6pandas_3lib_11BlockSlider_7nblocks_1__get__(o); } static int __pyx_setprop_6pandas_3lib_11BlockSlider_nblocks(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { return __pyx_pw_6pandas_3lib_11BlockSlider_7nblocks_3__set__(o, v); } else { PyErr_SetString(PyExc_NotImplementedError, "__del__"); return -1; } } static PyObject *__pyx_getprop_6pandas_3lib_11BlockSlider_idx_slider(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6pandas_3lib_11BlockSlider_10idx_slider_1__get__(o); } static int __pyx_setprop_6pandas_3lib_11BlockSlider_idx_slider(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { return __pyx_pw_6pandas_3lib_11BlockSlider_10idx_slider_3__set__(o, v); } else { return __pyx_pw_6pandas_3lib_11BlockSlider_10idx_slider_5__del__(o); } } static PyObject *__pyx_getprop_6pandas_3lib_11BlockSlider_blocks(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6pandas_3lib_11BlockSlider_6blocks_1__get__(o); } static int __pyx_setprop_6pandas_3lib_11BlockSlider_blocks(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { return __pyx_pw_6pandas_3lib_11BlockSlider_6blocks_3__set__(o, v); } else { return __pyx_pw_6pandas_3lib_11BlockSlider_6blocks_5__del__(o); } } static PyMethodDef __pyx_methods_6pandas_3lib_BlockSlider[] = { {__Pyx_NAMESTR("move"), (PyCFunction)__pyx_pw_6pandas_3lib_11BlockSlider_5move, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}, {0, 0, 0, 0} }; static struct PyGetSetDef __pyx_getsets_6pandas_3lib_BlockSlider[] = { {(char *)"frame", __pyx_getprop_6pandas_3lib_11BlockSlider_frame, __pyx_setprop_6pandas_3lib_11BlockSlider_frame, 0, 0}, {(char *)"dummy", __pyx_getprop_6pandas_3lib_11BlockSlider_dummy, __pyx_setprop_6pandas_3lib_11BlockSlider_dummy, 0, 0}, {(char *)"nblocks", __pyx_getprop_6pandas_3lib_11BlockSlider_nblocks, __pyx_setprop_6pandas_3lib_11BlockSlider_nblocks, 0, 0}, {(char *)"idx_slider", __pyx_getprop_6pandas_3lib_11BlockSlider_idx_slider, __pyx_setprop_6pandas_3lib_11BlockSlider_idx_slider, 0, 0}, {(char *)"blocks", __pyx_getprop_6pandas_3lib_11BlockSlider_blocks, __pyx_setprop_6pandas_3lib_11BlockSlider_blocks, 0, 0}, {0, 0, 0, 0, 0} }; static PyTypeObject __pyx_type_6pandas_3lib_BlockSlider = { PyVarObject_HEAD_INIT(0, 0) __Pyx_NAMESTR("pandas.lib.BlockSlider"), /*tp_name*/ sizeof(struct __pyx_obj_6pandas_3lib_BlockSlider), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_6pandas_3lib_BlockSlider, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #else 0, /*reserved*/ #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*/ __Pyx_DOCSTR("\n Only capable of sliding on axis=0\n "), /*tp_doc*/ __pyx_tp_traverse_6pandas_3lib_BlockSlider, /*tp_traverse*/ __pyx_tp_clear_6pandas_3lib_BlockSlider, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_6pandas_3lib_BlockSlider, /*tp_methods*/ 0, /*tp_members*/ __pyx_getsets_6pandas_3lib_BlockSlider, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ __pyx_pw_6pandas_3lib_11BlockSlider_1__init__, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_6pandas_3lib_BlockSlider, /*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*/ #if PY_VERSION_HEX >= 0x02060000 0, /*tp_version_tag*/ #endif #if PY_VERSION_HEX >= 0x030400a1 0, /*tp_finalize*/ #endif }; static PyObject *__pyx_tp_new_6pandas_3lib_SeriesBinGrouper(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *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_3lib_SeriesBinGrouper *)o); p->arr = Py_None; Py_INCREF(Py_None); p->index = Py_None; Py_INCREF(Py_None); p->dummy_arr = Py_None; Py_INCREF(Py_None); p->dummy_index = Py_None; Py_INCREF(Py_None); p->values = Py_None; Py_INCREF(Py_None); p->f = Py_None; Py_INCREF(Py_None); p->bins = Py_None; Py_INCREF(Py_None); p->typ = Py_None; Py_INCREF(Py_None); p->name = Py_None; Py_INCREF(Py_None); return o; } static void __pyx_tp_dealloc_6pandas_3lib_SeriesBinGrouper(PyObject *o) { struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *p = (struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *)o; #if PY_VERSION_HEX >= 0x030400a1 if (unlikely(Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) { if (PyObject_CallFinalizerFromDealloc(o)) return; } #endif PyObject_GC_UnTrack(o); Py_CLEAR(p->arr); Py_CLEAR(p->index); Py_CLEAR(p->dummy_arr); Py_CLEAR(p->dummy_index); Py_CLEAR(p->values); Py_CLEAR(p->f); Py_CLEAR(p->bins); Py_CLEAR(p->typ); Py_CLEAR(p->name); (*Py_TYPE(o)->tp_free)(o); } static int __pyx_tp_traverse_6pandas_3lib_SeriesBinGrouper(PyObject *o, visitproc v, void *a) { int e; struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *p = (struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *)o; if (p->arr) { e = (*v)(p->arr, a); if (e) return e; } if (p->index) { e = (*v)(p->index, a); if (e) return e; } if (p->dummy_arr) { e = (*v)(p->dummy_arr, a); if (e) return e; } if (p->dummy_index) { e = (*v)(p->dummy_index, a); if (e) return e; } if (p->values) { e = (*v)(p->values, a); if (e) return e; } if (p->f) { e = (*v)(p->f, a); if (e) return e; } if (p->bins) { e = (*v)(p->bins, a); if (e) return e; } if (p->typ) { e = (*v)(p->typ, a); if (e) return e; } if (p->name) { e = (*v)(p->name, a); if (e) return e; } return 0; } static int __pyx_tp_clear_6pandas_3lib_SeriesBinGrouper(PyObject *o) { PyObject* tmp; struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *p = (struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *)o; tmp = ((PyObject*)p->arr); p->arr = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->index); p->index = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->dummy_arr); p->dummy_arr = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->dummy_index); p->dummy_index = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->values); p->values = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->f); p->f = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->bins); p->bins = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->typ); p->typ = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->name); p->name = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); return 0; } static PyObject *__pyx_getprop_6pandas_3lib_16SeriesBinGrouper_arr(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6pandas_3lib_16SeriesBinGrouper_3arr_1__get__(o); } static int __pyx_setprop_6pandas_3lib_16SeriesBinGrouper_arr(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { return __pyx_pw_6pandas_3lib_16SeriesBinGrouper_3arr_3__set__(o, v); } else { return __pyx_pw_6pandas_3lib_16SeriesBinGrouper_3arr_5__del__(o); } } static PyObject *__pyx_getprop_6pandas_3lib_16SeriesBinGrouper_index(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6pandas_3lib_16SeriesBinGrouper_5index_1__get__(o); } static int __pyx_setprop_6pandas_3lib_16SeriesBinGrouper_index(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { return __pyx_pw_6pandas_3lib_16SeriesBinGrouper_5index_3__set__(o, v); } else { return __pyx_pw_6pandas_3lib_16SeriesBinGrouper_5index_5__del__(o); } } static PyObject *__pyx_getprop_6pandas_3lib_16SeriesBinGrouper_dummy_arr(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6pandas_3lib_16SeriesBinGrouper_9dummy_arr_1__get__(o); } static int __pyx_setprop_6pandas_3lib_16SeriesBinGrouper_dummy_arr(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { return __pyx_pw_6pandas_3lib_16SeriesBinGrouper_9dummy_arr_3__set__(o, v); } else { return __pyx_pw_6pandas_3lib_16SeriesBinGrouper_9dummy_arr_5__del__(o); } } static PyObject *__pyx_getprop_6pandas_3lib_16SeriesBinGrouper_dummy_index(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6pandas_3lib_16SeriesBinGrouper_11dummy_index_1__get__(o); } static int __pyx_setprop_6pandas_3lib_16SeriesBinGrouper_dummy_index(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { return __pyx_pw_6pandas_3lib_16SeriesBinGrouper_11dummy_index_3__set__(o, v); } else { return __pyx_pw_6pandas_3lib_16SeriesBinGrouper_11dummy_index_5__del__(o); } } static PyObject *__pyx_getprop_6pandas_3lib_16SeriesBinGrouper_values(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6pandas_3lib_16SeriesBinGrouper_6values_1__get__(o); } static int __pyx_setprop_6pandas_3lib_16SeriesBinGrouper_values(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { return __pyx_pw_6pandas_3lib_16SeriesBinGrouper_6values_3__set__(o, v); } else { return __pyx_pw_6pandas_3lib_16SeriesBinGrouper_6values_5__del__(o); } } static PyObject *__pyx_getprop_6pandas_3lib_16SeriesBinGrouper_f(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6pandas_3lib_16SeriesBinGrouper_1f_1__get__(o); } static int __pyx_setprop_6pandas_3lib_16SeriesBinGrouper_f(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { return __pyx_pw_6pandas_3lib_16SeriesBinGrouper_1f_3__set__(o, v); } else { return __pyx_pw_6pandas_3lib_16SeriesBinGrouper_1f_5__del__(o); } } static PyObject *__pyx_getprop_6pandas_3lib_16SeriesBinGrouper_bins(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6pandas_3lib_16SeriesBinGrouper_4bins_1__get__(o); } static int __pyx_setprop_6pandas_3lib_16SeriesBinGrouper_bins(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { return __pyx_pw_6pandas_3lib_16SeriesBinGrouper_4bins_3__set__(o, v); } else { return __pyx_pw_6pandas_3lib_16SeriesBinGrouper_4bins_5__del__(o); } } static PyObject *__pyx_getprop_6pandas_3lib_16SeriesBinGrouper_typ(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6pandas_3lib_16SeriesBinGrouper_3typ_1__get__(o); } static int __pyx_setprop_6pandas_3lib_16SeriesBinGrouper_typ(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { return __pyx_pw_6pandas_3lib_16SeriesBinGrouper_3typ_3__set__(o, v); } else { return __pyx_pw_6pandas_3lib_16SeriesBinGrouper_3typ_5__del__(o); } } static PyObject *__pyx_getprop_6pandas_3lib_16SeriesBinGrouper_name(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6pandas_3lib_16SeriesBinGrouper_4name_1__get__(o); } static int __pyx_setprop_6pandas_3lib_16SeriesBinGrouper_name(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { return __pyx_pw_6pandas_3lib_16SeriesBinGrouper_4name_3__set__(o, v); } else { return __pyx_pw_6pandas_3lib_16SeriesBinGrouper_4name_5__del__(o); } } static PyMethodDef __pyx_methods_6pandas_3lib_SeriesBinGrouper[] = { {__Pyx_NAMESTR("_check_dummy"), (PyCFunction)__pyx_pw_6pandas_3lib_16SeriesBinGrouper_3_check_dummy, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}, {__Pyx_NAMESTR("get_result"), (PyCFunction)__pyx_pw_6pandas_3lib_16SeriesBinGrouper_5get_result, METH_NOARGS, __Pyx_DOCSTR(0)}, {__Pyx_NAMESTR("_get_result_array"), (PyCFunction)__pyx_pw_6pandas_3lib_16SeriesBinGrouper_7_get_result_array, METH_O, __Pyx_DOCSTR(0)}, {0, 0, 0, 0} }; static struct PyGetSetDef __pyx_getsets_6pandas_3lib_SeriesBinGrouper[] = { {(char *)"arr", __pyx_getprop_6pandas_3lib_16SeriesBinGrouper_arr, __pyx_setprop_6pandas_3lib_16SeriesBinGrouper_arr, 0, 0}, {(char *)"index", __pyx_getprop_6pandas_3lib_16SeriesBinGrouper_index, __pyx_setprop_6pandas_3lib_16SeriesBinGrouper_index, 0, 0}, {(char *)"dummy_arr", __pyx_getprop_6pandas_3lib_16SeriesBinGrouper_dummy_arr, __pyx_setprop_6pandas_3lib_16SeriesBinGrouper_dummy_arr, 0, 0}, {(char *)"dummy_index", __pyx_getprop_6pandas_3lib_16SeriesBinGrouper_dummy_index, __pyx_setprop_6pandas_3lib_16SeriesBinGrouper_dummy_index, 0, 0}, {(char *)"values", __pyx_getprop_6pandas_3lib_16SeriesBinGrouper_values, __pyx_setprop_6pandas_3lib_16SeriesBinGrouper_values, 0, 0}, {(char *)"f", __pyx_getprop_6pandas_3lib_16SeriesBinGrouper_f, __pyx_setprop_6pandas_3lib_16SeriesBinGrouper_f, 0, 0}, {(char *)"bins", __pyx_getprop_6pandas_3lib_16SeriesBinGrouper_bins, __pyx_setprop_6pandas_3lib_16SeriesBinGrouper_bins, 0, 0}, {(char *)"typ", __pyx_getprop_6pandas_3lib_16SeriesBinGrouper_typ, __pyx_setprop_6pandas_3lib_16SeriesBinGrouper_typ, 0, 0}, {(char *)"name", __pyx_getprop_6pandas_3lib_16SeriesBinGrouper_name, __pyx_setprop_6pandas_3lib_16SeriesBinGrouper_name, 0, 0}, {0, 0, 0, 0, 0} }; static PyTypeObject __pyx_type_6pandas_3lib_SeriesBinGrouper = { PyVarObject_HEAD_INIT(0, 0) __Pyx_NAMESTR("pandas.lib.SeriesBinGrouper"), /*tp_name*/ sizeof(struct __pyx_obj_6pandas_3lib_SeriesBinGrouper), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_6pandas_3lib_SeriesBinGrouper, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #else 0, /*reserved*/ #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*/ __Pyx_DOCSTR("\n Performs grouping operation according to bin edges, rather than labels\n "), /*tp_doc*/ __pyx_tp_traverse_6pandas_3lib_SeriesBinGrouper, /*tp_traverse*/ __pyx_tp_clear_6pandas_3lib_SeriesBinGrouper, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_6pandas_3lib_SeriesBinGrouper, /*tp_methods*/ 0, /*tp_members*/ __pyx_getsets_6pandas_3lib_SeriesBinGrouper, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ __pyx_pw_6pandas_3lib_16SeriesBinGrouper_1__init__, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_6pandas_3lib_SeriesBinGrouper, /*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*/ #if PY_VERSION_HEX >= 0x02060000 0, /*tp_version_tag*/ #endif #if PY_VERSION_HEX >= 0x030400a1 0, /*tp_finalize*/ #endif }; static PyObject *__pyx_tp_new_6pandas_3lib_cache_readonly(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { struct __pyx_obj_6pandas_3lib_cache_readonly *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_3lib_cache_readonly *)o); p->func = Py_None; Py_INCREF(Py_None); p->name = Py_None; Py_INCREF(Py_None); p->allow_setting = Py_None; Py_INCREF(Py_None); return o; } static void __pyx_tp_dealloc_6pandas_3lib_cache_readonly(PyObject *o) { struct __pyx_obj_6pandas_3lib_cache_readonly *p = (struct __pyx_obj_6pandas_3lib_cache_readonly *)o; #if PY_VERSION_HEX >= 0x030400a1 if (unlikely(Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) { if (PyObject_CallFinalizerFromDealloc(o)) return; } #endif PyObject_GC_UnTrack(o); Py_CLEAR(p->func); Py_CLEAR(p->name); Py_CLEAR(p->allow_setting); (*Py_TYPE(o)->tp_free)(o); } static int __pyx_tp_traverse_6pandas_3lib_cache_readonly(PyObject *o, visitproc v, void *a) { int e; struct __pyx_obj_6pandas_3lib_cache_readonly *p = (struct __pyx_obj_6pandas_3lib_cache_readonly *)o; if (p->func) { e = (*v)(p->func, a); if (e) return e; } if (p->name) { e = (*v)(p->name, a); if (e) return e; } if (p->allow_setting) { e = (*v)(p->allow_setting, a); if (e) return e; } return 0; } static int __pyx_tp_clear_6pandas_3lib_cache_readonly(PyObject *o) { PyObject* tmp; struct __pyx_obj_6pandas_3lib_cache_readonly *p = (struct __pyx_obj_6pandas_3lib_cache_readonly *)o; tmp = ((PyObject*)p->func); p->func = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->name); p->name = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->allow_setting); p->allow_setting = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); return 0; } static PyObject *__pyx_tp_descr_get_6pandas_3lib_cache_readonly(PyObject *o, PyObject *i, PyObject *c) { PyObject *r = 0; if (!i) i = Py_None; if (!c) c = Py_None; r = __pyx_pw_6pandas_3lib_14cache_readonly_5__get__(o, i, c); return r; } static int __pyx_tp_descr_set_6pandas_3lib_cache_readonly(PyObject *o, PyObject *i, PyObject *v) { if (v) { return __pyx_pw_6pandas_3lib_14cache_readonly_7__set__(o, i, v); } else { PyErr_SetString(PyExc_NotImplementedError, "__delete__"); return -1; } } static PyObject *__pyx_getprop_6pandas_3lib_14cache_readonly_func(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6pandas_3lib_14cache_readonly_4func_1__get__(o); } static PyObject *__pyx_getprop_6pandas_3lib_14cache_readonly_name(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6pandas_3lib_14cache_readonly_4name_1__get__(o); } static PyObject *__pyx_getprop_6pandas_3lib_14cache_readonly_allow_setting(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6pandas_3lib_14cache_readonly_13allow_setting_1__get__(o); } static PyMethodDef __pyx_methods_6pandas_3lib_cache_readonly[] = { {0, 0, 0, 0} }; static struct PyGetSetDef __pyx_getsets_6pandas_3lib_cache_readonly[] = { {(char *)"func", __pyx_getprop_6pandas_3lib_14cache_readonly_func, 0, 0, 0}, {(char *)"name", __pyx_getprop_6pandas_3lib_14cache_readonly_name, 0, 0, 0}, {(char *)"allow_setting", __pyx_getprop_6pandas_3lib_14cache_readonly_allow_setting, 0, 0, 0}, {0, 0, 0, 0, 0} }; static PyTypeObject __pyx_type_6pandas_3lib_cache_readonly = { PyVarObject_HEAD_INIT(0, 0) __Pyx_NAMESTR("pandas.lib.cache_readonly"), /*tp_name*/ sizeof(struct __pyx_obj_6pandas_3lib_cache_readonly), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_6pandas_3lib_cache_readonly, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #else 0, /*reserved*/ #endif 0, /*tp_repr*/ 0, /*tp_as_number*/ 0, /*tp_as_sequence*/ 0, /*tp_as_mapping*/ 0, /*tp_hash*/ __pyx_pw_6pandas_3lib_14cache_readonly_3__call__, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ 0, /*tp_doc*/ __pyx_tp_traverse_6pandas_3lib_cache_readonly, /*tp_traverse*/ __pyx_tp_clear_6pandas_3lib_cache_readonly, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_6pandas_3lib_cache_readonly, /*tp_methods*/ 0, /*tp_members*/ __pyx_getsets_6pandas_3lib_cache_readonly, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ __pyx_tp_descr_get_6pandas_3lib_cache_readonly, /*tp_descr_get*/ __pyx_tp_descr_set_6pandas_3lib_cache_readonly, /*tp_descr_set*/ 0, /*tp_dictoffset*/ __pyx_pw_6pandas_3lib_14cache_readonly_1__init__, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_6pandas_3lib_cache_readonly, /*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*/ #if PY_VERSION_HEX >= 0x02060000 0, /*tp_version_tag*/ #endif #if PY_VERSION_HEX >= 0x030400a1 0, /*tp_finalize*/ #endif }; static PyObject *__pyx_tp_new_6pandas_3lib_AxisProperty(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_3lib_AxisProperty(PyObject *o) { #if PY_VERSION_HEX >= 0x030400a1 if (unlikely(Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) { if (PyObject_CallFinalizerFromDealloc(o)) return; } #endif (*Py_TYPE(o)->tp_free)(o); } static PyObject *__pyx_tp_descr_get_6pandas_3lib_AxisProperty(PyObject *o, PyObject *i, PyObject *c) { PyObject *r = 0; if (!i) i = Py_None; if (!c) c = Py_None; r = __pyx_pw_6pandas_3lib_12AxisProperty_3__get__(o, i, c); return r; } static int __pyx_tp_descr_set_6pandas_3lib_AxisProperty(PyObject *o, PyObject *i, PyObject *v) { if (v) { return __pyx_pw_6pandas_3lib_12AxisProperty_5__set__(o, i, v); } else { PyErr_SetString(PyExc_NotImplementedError, "__delete__"); return -1; } } static PyMethodDef __pyx_methods_6pandas_3lib_AxisProperty[] = { {0, 0, 0, 0} }; static PyTypeObject __pyx_type_6pandas_3lib_AxisProperty = { PyVarObject_HEAD_INIT(0, 0) __Pyx_NAMESTR("pandas.lib.AxisProperty"), /*tp_name*/ sizeof(struct __pyx_obj_6pandas_3lib_AxisProperty), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_6pandas_3lib_AxisProperty, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #else 0, /*reserved*/ #endif 0, /*tp_repr*/ 0, /*tp_as_number*/ 0, /*tp_as_sequence*/ 0, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/ 0, /*tp_doc*/ 0, /*tp_traverse*/ 0, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_6pandas_3lib_AxisProperty, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ __pyx_tp_descr_get_6pandas_3lib_AxisProperty, /*tp_descr_get*/ __pyx_tp_descr_set_6pandas_3lib_AxisProperty, /*tp_descr_set*/ 0, /*tp_dictoffset*/ __pyx_pw_6pandas_3lib_12AxisProperty_1__init__, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_6pandas_3lib_AxisProperty, /*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*/ #if PY_VERSION_HEX >= 0x02060000 0, /*tp_version_tag*/ #endif #if PY_VERSION_HEX >= 0x030400a1 0, /*tp_finalize*/ #endif }; static struct __pyx_obj_6pandas_3lib___pyx_scope_struct_1_try_parse_date_and_time *__pyx_freelist_6pandas_3lib___pyx_scope_struct_1_try_parse_date_and_time[8]; static int __pyx_freecount_6pandas_3lib___pyx_scope_struct_1_try_parse_date_and_time = 0; static PyObject *__pyx_tp_new_6pandas_3lib___pyx_scope_struct_1_try_parse_date_and_time(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { PyObject *o; if (likely((__pyx_freecount_6pandas_3lib___pyx_scope_struct_1_try_parse_date_and_time > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_6pandas_3lib___pyx_scope_struct_1_try_parse_date_and_time)))) { o = (PyObject*)__pyx_freelist_6pandas_3lib___pyx_scope_struct_1_try_parse_date_and_time[--__pyx_freecount_6pandas_3lib___pyx_scope_struct_1_try_parse_date_and_time]; memset(o, 0, sizeof(struct __pyx_obj_6pandas_3lib___pyx_scope_struct_1_try_parse_date_and_time)); (void) PyObject_INIT(o, t); PyObject_GC_Track(o); } else { o = (*t->tp_alloc)(t, 0); if (unlikely(!o)) return 0; } return o; } static void __pyx_tp_dealloc_6pandas_3lib___pyx_scope_struct_1_try_parse_date_and_time(PyObject *o) { struct __pyx_obj_6pandas_3lib___pyx_scope_struct_1_try_parse_date_and_time *p = (struct __pyx_obj_6pandas_3lib___pyx_scope_struct_1_try_parse_date_and_time *)o; PyObject_GC_UnTrack(o); Py_CLEAR(p->__pyx_v_date); Py_CLEAR(p->__pyx_v_dayfirst); Py_CLEAR(p->__pyx_v_default); Py_CLEAR(p->__pyx_v_parse); Py_CLEAR(p->__pyx_v_time); if ((__pyx_freecount_6pandas_3lib___pyx_scope_struct_1_try_parse_date_and_time < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_6pandas_3lib___pyx_scope_struct_1_try_parse_date_and_time))) { __pyx_freelist_6pandas_3lib___pyx_scope_struct_1_try_parse_date_and_time[__pyx_freecount_6pandas_3lib___pyx_scope_struct_1_try_parse_date_and_time++] = ((struct __pyx_obj_6pandas_3lib___pyx_scope_struct_1_try_parse_date_and_time *)o); } else { (*Py_TYPE(o)->tp_free)(o); } } static int __pyx_tp_traverse_6pandas_3lib___pyx_scope_struct_1_try_parse_date_and_time(PyObject *o, visitproc v, void *a) { int e; struct __pyx_obj_6pandas_3lib___pyx_scope_struct_1_try_parse_date_and_time *p = (struct __pyx_obj_6pandas_3lib___pyx_scope_struct_1_try_parse_date_and_time *)o; if (p->__pyx_v_date) { e = (*v)(p->__pyx_v_date, a); if (e) return e; } if (p->__pyx_v_dayfirst) { e = (*v)(p->__pyx_v_dayfirst, a); if (e) return e; } if (p->__pyx_v_default) { e = (*v)(p->__pyx_v_default, a); if (e) return e; } if (p->__pyx_v_parse) { e = (*v)(p->__pyx_v_parse, a); if (e) return e; } if (p->__pyx_v_time) { e = (*v)(p->__pyx_v_time, a); if (e) return e; } return 0; } static int __pyx_tp_clear_6pandas_3lib___pyx_scope_struct_1_try_parse_date_and_time(PyObject *o) { PyObject* tmp; struct __pyx_obj_6pandas_3lib___pyx_scope_struct_1_try_parse_date_and_time *p = (struct __pyx_obj_6pandas_3lib___pyx_scope_struct_1_try_parse_date_and_time *)o; tmp = ((PyObject*)p->__pyx_v_date); p->__pyx_v_date = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->__pyx_v_dayfirst); p->__pyx_v_dayfirst = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->__pyx_v_default); p->__pyx_v_default = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->__pyx_v_parse); p->__pyx_v_parse = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->__pyx_v_time); p->__pyx_v_time = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); return 0; } static PyTypeObject __pyx_type_6pandas_3lib___pyx_scope_struct_1_try_parse_date_and_time = { PyVarObject_HEAD_INIT(0, 0) __Pyx_NAMESTR("pandas.lib.__pyx_scope_struct_1_try_parse_date_and_time"), /*tp_name*/ sizeof(struct __pyx_obj_6pandas_3lib___pyx_scope_struct_1_try_parse_date_and_time), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_6pandas_3lib___pyx_scope_struct_1_try_parse_date_and_time, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #else 0, /*reserved*/ #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_HAVE_GC, /*tp_flags*/ 0, /*tp_doc*/ __pyx_tp_traverse_6pandas_3lib___pyx_scope_struct_1_try_parse_date_and_time, /*tp_traverse*/ __pyx_tp_clear_6pandas_3lib___pyx_scope_struct_1_try_parse_date_and_time, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ 0, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_6pandas_3lib___pyx_scope_struct_1_try_parse_date_and_time, /*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*/ #if PY_VERSION_HEX >= 0x02060000 0, /*tp_version_tag*/ #endif #if PY_VERSION_HEX >= 0x030400a1 0, /*tp_finalize*/ #endif }; static PyObject *__pyx_tp_new_6pandas_3lib_SeriesGrouper(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { struct __pyx_obj_6pandas_3lib_SeriesGrouper *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_3lib_SeriesGrouper *)o); p->arr = Py_None; Py_INCREF(Py_None); p->index = Py_None; Py_INCREF(Py_None); p->dummy_arr = Py_None; Py_INCREF(Py_None); p->dummy_index = Py_None; Py_INCREF(Py_None); p->f = Py_None; Py_INCREF(Py_None); p->labels = Py_None; Py_INCREF(Py_None); p->values = Py_None; Py_INCREF(Py_None); p->typ = Py_None; Py_INCREF(Py_None); p->name = Py_None; Py_INCREF(Py_None); return o; } static void __pyx_tp_dealloc_6pandas_3lib_SeriesGrouper(PyObject *o) { struct __pyx_obj_6pandas_3lib_SeriesGrouper *p = (struct __pyx_obj_6pandas_3lib_SeriesGrouper *)o; #if PY_VERSION_HEX >= 0x030400a1 if (unlikely(Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) { if (PyObject_CallFinalizerFromDealloc(o)) return; } #endif PyObject_GC_UnTrack(o); Py_CLEAR(p->arr); Py_CLEAR(p->index); Py_CLEAR(p->dummy_arr); Py_CLEAR(p->dummy_index); Py_CLEAR(p->f); Py_CLEAR(p->labels); Py_CLEAR(p->values); Py_CLEAR(p->typ); Py_CLEAR(p->name); (*Py_TYPE(o)->tp_free)(o); } static int __pyx_tp_traverse_6pandas_3lib_SeriesGrouper(PyObject *o, visitproc v, void *a) { int e; struct __pyx_obj_6pandas_3lib_SeriesGrouper *p = (struct __pyx_obj_6pandas_3lib_SeriesGrouper *)o; if (p->arr) { e = (*v)(p->arr, a); if (e) return e; } if (p->index) { e = (*v)(p->index, a); if (e) return e; } if (p->dummy_arr) { e = (*v)(p->dummy_arr, a); if (e) return e; } if (p->dummy_index) { e = (*v)(p->dummy_index, a); if (e) return e; } if (p->f) { e = (*v)(p->f, a); if (e) return e; } if (p->labels) { e = (*v)(p->labels, a); if (e) return e; } if (p->values) { e = (*v)(p->values, a); if (e) return e; } if (p->typ) { e = (*v)(p->typ, a); if (e) return e; } if (p->name) { e = (*v)(p->name, a); if (e) return e; } return 0; } static int __pyx_tp_clear_6pandas_3lib_SeriesGrouper(PyObject *o) { PyObject* tmp; struct __pyx_obj_6pandas_3lib_SeriesGrouper *p = (struct __pyx_obj_6pandas_3lib_SeriesGrouper *)o; tmp = ((PyObject*)p->arr); p->arr = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->index); p->index = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->dummy_arr); p->dummy_arr = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->dummy_index); p->dummy_index = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->f); p->f = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->labels); p->labels = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->values); p->values = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->typ); p->typ = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->name); p->name = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); return 0; } static PyObject *__pyx_getprop_6pandas_3lib_13SeriesGrouper_arr(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6pandas_3lib_13SeriesGrouper_3arr_1__get__(o); } static int __pyx_setprop_6pandas_3lib_13SeriesGrouper_arr(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { return __pyx_pw_6pandas_3lib_13SeriesGrouper_3arr_3__set__(o, v); } else { return __pyx_pw_6pandas_3lib_13SeriesGrouper_3arr_5__del__(o); } } static PyObject *__pyx_getprop_6pandas_3lib_13SeriesGrouper_index(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6pandas_3lib_13SeriesGrouper_5index_1__get__(o); } static int __pyx_setprop_6pandas_3lib_13SeriesGrouper_index(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { return __pyx_pw_6pandas_3lib_13SeriesGrouper_5index_3__set__(o, v); } else { return __pyx_pw_6pandas_3lib_13SeriesGrouper_5index_5__del__(o); } } static PyObject *__pyx_getprop_6pandas_3lib_13SeriesGrouper_dummy_arr(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6pandas_3lib_13SeriesGrouper_9dummy_arr_1__get__(o); } static int __pyx_setprop_6pandas_3lib_13SeriesGrouper_dummy_arr(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { return __pyx_pw_6pandas_3lib_13SeriesGrouper_9dummy_arr_3__set__(o, v); } else { return __pyx_pw_6pandas_3lib_13SeriesGrouper_9dummy_arr_5__del__(o); } } static PyObject *__pyx_getprop_6pandas_3lib_13SeriesGrouper_dummy_index(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6pandas_3lib_13SeriesGrouper_11dummy_index_1__get__(o); } static int __pyx_setprop_6pandas_3lib_13SeriesGrouper_dummy_index(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { return __pyx_pw_6pandas_3lib_13SeriesGrouper_11dummy_index_3__set__(o, v); } else { return __pyx_pw_6pandas_3lib_13SeriesGrouper_11dummy_index_5__del__(o); } } static PyObject *__pyx_getprop_6pandas_3lib_13SeriesGrouper_f(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6pandas_3lib_13SeriesGrouper_1f_1__get__(o); } static int __pyx_setprop_6pandas_3lib_13SeriesGrouper_f(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { return __pyx_pw_6pandas_3lib_13SeriesGrouper_1f_3__set__(o, v); } else { return __pyx_pw_6pandas_3lib_13SeriesGrouper_1f_5__del__(o); } } static PyObject *__pyx_getprop_6pandas_3lib_13SeriesGrouper_labels(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6pandas_3lib_13SeriesGrouper_6labels_1__get__(o); } static int __pyx_setprop_6pandas_3lib_13SeriesGrouper_labels(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { return __pyx_pw_6pandas_3lib_13SeriesGrouper_6labels_3__set__(o, v); } else { return __pyx_pw_6pandas_3lib_13SeriesGrouper_6labels_5__del__(o); } } static PyObject *__pyx_getprop_6pandas_3lib_13SeriesGrouper_values(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6pandas_3lib_13SeriesGrouper_6values_1__get__(o); } static int __pyx_setprop_6pandas_3lib_13SeriesGrouper_values(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { return __pyx_pw_6pandas_3lib_13SeriesGrouper_6values_3__set__(o, v); } else { return __pyx_pw_6pandas_3lib_13SeriesGrouper_6values_5__del__(o); } } static PyObject *__pyx_getprop_6pandas_3lib_13SeriesGrouper_typ(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6pandas_3lib_13SeriesGrouper_3typ_1__get__(o); } static int __pyx_setprop_6pandas_3lib_13SeriesGrouper_typ(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { return __pyx_pw_6pandas_3lib_13SeriesGrouper_3typ_3__set__(o, v); } else { return __pyx_pw_6pandas_3lib_13SeriesGrouper_3typ_5__del__(o); } } static PyObject *__pyx_getprop_6pandas_3lib_13SeriesGrouper_name(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6pandas_3lib_13SeriesGrouper_4name_1__get__(o); } static int __pyx_setprop_6pandas_3lib_13SeriesGrouper_name(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { return __pyx_pw_6pandas_3lib_13SeriesGrouper_4name_3__set__(o, v); } else { return __pyx_pw_6pandas_3lib_13SeriesGrouper_4name_5__del__(o); } } static PyMethodDef __pyx_methods_6pandas_3lib_SeriesGrouper[] = { {__Pyx_NAMESTR("_check_dummy"), (PyCFunction)__pyx_pw_6pandas_3lib_13SeriesGrouper_3_check_dummy, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}, {__Pyx_NAMESTR("get_result"), (PyCFunction)__pyx_pw_6pandas_3lib_13SeriesGrouper_5get_result, METH_NOARGS, __Pyx_DOCSTR(0)}, {__Pyx_NAMESTR("_get_result_array"), (PyCFunction)__pyx_pw_6pandas_3lib_13SeriesGrouper_7_get_result_array, METH_O, __Pyx_DOCSTR(0)}, {0, 0, 0, 0} }; static struct PyGetSetDef __pyx_getsets_6pandas_3lib_SeriesGrouper[] = { {(char *)"arr", __pyx_getprop_6pandas_3lib_13SeriesGrouper_arr, __pyx_setprop_6pandas_3lib_13SeriesGrouper_arr, 0, 0}, {(char *)"index", __pyx_getprop_6pandas_3lib_13SeriesGrouper_index, __pyx_setprop_6pandas_3lib_13SeriesGrouper_index, 0, 0}, {(char *)"dummy_arr", __pyx_getprop_6pandas_3lib_13SeriesGrouper_dummy_arr, __pyx_setprop_6pandas_3lib_13SeriesGrouper_dummy_arr, 0, 0}, {(char *)"dummy_index", __pyx_getprop_6pandas_3lib_13SeriesGrouper_dummy_index, __pyx_setprop_6pandas_3lib_13SeriesGrouper_dummy_index, 0, 0}, {(char *)"f", __pyx_getprop_6pandas_3lib_13SeriesGrouper_f, __pyx_setprop_6pandas_3lib_13SeriesGrouper_f, 0, 0}, {(char *)"labels", __pyx_getprop_6pandas_3lib_13SeriesGrouper_labels, __pyx_setprop_6pandas_3lib_13SeriesGrouper_labels, 0, 0}, {(char *)"values", __pyx_getprop_6pandas_3lib_13SeriesGrouper_values, __pyx_setprop_6pandas_3lib_13SeriesGrouper_values, 0, 0}, {(char *)"typ", __pyx_getprop_6pandas_3lib_13SeriesGrouper_typ, __pyx_setprop_6pandas_3lib_13SeriesGrouper_typ, 0, 0}, {(char *)"name", __pyx_getprop_6pandas_3lib_13SeriesGrouper_name, __pyx_setprop_6pandas_3lib_13SeriesGrouper_name, 0, 0}, {0, 0, 0, 0, 0} }; static PyTypeObject __pyx_type_6pandas_3lib_SeriesGrouper = { PyVarObject_HEAD_INIT(0, 0) __Pyx_NAMESTR("pandas.lib.SeriesGrouper"), /*tp_name*/ sizeof(struct __pyx_obj_6pandas_3lib_SeriesGrouper), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_6pandas_3lib_SeriesGrouper, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #else 0, /*reserved*/ #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*/ __Pyx_DOCSTR("\n Performs generic grouping operation while avoiding ndarray construction\n overhead\n "), /*tp_doc*/ __pyx_tp_traverse_6pandas_3lib_SeriesGrouper, /*tp_traverse*/ __pyx_tp_clear_6pandas_3lib_SeriesGrouper, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_6pandas_3lib_SeriesGrouper, /*tp_methods*/ 0, /*tp_members*/ __pyx_getsets_6pandas_3lib_SeriesGrouper, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ __pyx_pw_6pandas_3lib_13SeriesGrouper_1__init__, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_6pandas_3lib_SeriesGrouper, /*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*/ #if PY_VERSION_HEX >= 0x02060000 0, /*tp_version_tag*/ #endif #if PY_VERSION_HEX >= 0x030400a1 0, /*tp_finalize*/ #endif }; static struct __pyx_obj_6pandas_3lib___pyx_scope_struct__try_parse_dates *__pyx_freelist_6pandas_3lib___pyx_scope_struct__try_parse_dates[8]; static int __pyx_freecount_6pandas_3lib___pyx_scope_struct__try_parse_dates = 0; static PyObject *__pyx_tp_new_6pandas_3lib___pyx_scope_struct__try_parse_dates(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { PyObject *o; if (likely((__pyx_freecount_6pandas_3lib___pyx_scope_struct__try_parse_dates > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_6pandas_3lib___pyx_scope_struct__try_parse_dates)))) { o = (PyObject*)__pyx_freelist_6pandas_3lib___pyx_scope_struct__try_parse_dates[--__pyx_freecount_6pandas_3lib___pyx_scope_struct__try_parse_dates]; memset(o, 0, sizeof(struct __pyx_obj_6pandas_3lib___pyx_scope_struct__try_parse_dates)); (void) PyObject_INIT(o, t); PyObject_GC_Track(o); } else { o = (*t->tp_alloc)(t, 0); if (unlikely(!o)) return 0; } return o; } static void __pyx_tp_dealloc_6pandas_3lib___pyx_scope_struct__try_parse_dates(PyObject *o) { struct __pyx_obj_6pandas_3lib___pyx_scope_struct__try_parse_dates *p = (struct __pyx_obj_6pandas_3lib___pyx_scope_struct__try_parse_dates *)o; PyObject_GC_UnTrack(o); Py_CLEAR(p->__pyx_v_dayfirst); Py_CLEAR(p->__pyx_v_default); Py_CLEAR(p->__pyx_v_parse); if ((__pyx_freecount_6pandas_3lib___pyx_scope_struct__try_parse_dates < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_6pandas_3lib___pyx_scope_struct__try_parse_dates))) { __pyx_freelist_6pandas_3lib___pyx_scope_struct__try_parse_dates[__pyx_freecount_6pandas_3lib___pyx_scope_struct__try_parse_dates++] = ((struct __pyx_obj_6pandas_3lib___pyx_scope_struct__try_parse_dates *)o); } else { (*Py_TYPE(o)->tp_free)(o); } } static int __pyx_tp_traverse_6pandas_3lib___pyx_scope_struct__try_parse_dates(PyObject *o, visitproc v, void *a) { int e; struct __pyx_obj_6pandas_3lib___pyx_scope_struct__try_parse_dates *p = (struct __pyx_obj_6pandas_3lib___pyx_scope_struct__try_parse_dates *)o; if (p->__pyx_v_dayfirst) { e = (*v)(p->__pyx_v_dayfirst, a); if (e) return e; } if (p->__pyx_v_default) { e = (*v)(p->__pyx_v_default, a); if (e) return e; } if (p->__pyx_v_parse) { e = (*v)(p->__pyx_v_parse, a); if (e) return e; } return 0; } static int __pyx_tp_clear_6pandas_3lib___pyx_scope_struct__try_parse_dates(PyObject *o) { PyObject* tmp; struct __pyx_obj_6pandas_3lib___pyx_scope_struct__try_parse_dates *p = (struct __pyx_obj_6pandas_3lib___pyx_scope_struct__try_parse_dates *)o; tmp = ((PyObject*)p->__pyx_v_dayfirst); p->__pyx_v_dayfirst = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->__pyx_v_default); p->__pyx_v_default = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->__pyx_v_parse); p->__pyx_v_parse = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); return 0; } static PyTypeObject __pyx_type_6pandas_3lib___pyx_scope_struct__try_parse_dates = { PyVarObject_HEAD_INIT(0, 0) __Pyx_NAMESTR("pandas.lib.__pyx_scope_struct__try_parse_dates"), /*tp_name*/ sizeof(struct __pyx_obj_6pandas_3lib___pyx_scope_struct__try_parse_dates), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_6pandas_3lib___pyx_scope_struct__try_parse_dates, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #else 0, /*reserved*/ #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_HAVE_GC, /*tp_flags*/ 0, /*tp_doc*/ __pyx_tp_traverse_6pandas_3lib___pyx_scope_struct__try_parse_dates, /*tp_traverse*/ __pyx_tp_clear_6pandas_3lib___pyx_scope_struct__try_parse_dates, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ 0, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_6pandas_3lib___pyx_scope_struct__try_parse_dates, /*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*/ #if PY_VERSION_HEX >= 0x02060000 0, /*tp_version_tag*/ #endif #if PY_VERSION_HEX >= 0x030400a1 0, /*tp_finalize*/ #endif }; static PyObject *__pyx_tp_new_6pandas_3lib__PandasNull(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_3lib__PandasNull(PyObject *o) { #if PY_VERSION_HEX >= 0x030400a1 if (unlikely(Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) { if (PyObject_CallFinalizerFromDealloc(o)) return; } #endif (*Py_TYPE(o)->tp_free)(o); } static PyMethodDef __pyx_methods_6pandas_3lib__PandasNull[] = { {0, 0, 0, 0} }; static PyTypeObject __pyx_type_6pandas_3lib__PandasNull = { PyVarObject_HEAD_INIT(0, 0) __Pyx_NAMESTR("pandas.lib._PandasNull"), /*tp_name*/ sizeof(struct __pyx_obj_6pandas_3lib__PandasNull), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_6pandas_3lib__PandasNull, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #else 0, /*reserved*/ #endif 0, /*tp_repr*/ 0, /*tp_as_number*/ 0, /*tp_as_sequence*/ 0, /*tp_as_mapping*/ __pyx_pw_6pandas_3lib_11_PandasNull_3__hash__, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/ 0, /*tp_doc*/ 0, /*tp_traverse*/ 0, /*tp_clear*/ __pyx_pw_6pandas_3lib_11_PandasNull_1__richcmp__, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_6pandas_3lib__PandasNull, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_6pandas_3lib__PandasNull, /*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*/ #if PY_VERSION_HEX >= 0x02060000 0, /*tp_version_tag*/ #endif #if PY_VERSION_HEX >= 0x030400a1 0, /*tp_finalize*/ #endif }; static PyObject *__pyx_tp_new_6pandas_3lib_Reducer(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { struct __pyx_obj_6pandas_3lib_Reducer *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_3lib_Reducer *)o); p->arr = Py_None; Py_INCREF(Py_None); p->dummy = Py_None; Py_INCREF(Py_None); p->f = Py_None; Py_INCREF(Py_None); p->labels = Py_None; Py_INCREF(Py_None); p->typ = Py_None; Py_INCREF(Py_None); p->index = Py_None; Py_INCREF(Py_None); return o; } static void __pyx_tp_dealloc_6pandas_3lib_Reducer(PyObject *o) { struct __pyx_obj_6pandas_3lib_Reducer *p = (struct __pyx_obj_6pandas_3lib_Reducer *)o; #if PY_VERSION_HEX >= 0x030400a1 if (unlikely(Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) { if (PyObject_CallFinalizerFromDealloc(o)) return; } #endif PyObject_GC_UnTrack(o); Py_CLEAR(p->arr); Py_CLEAR(p->dummy); Py_CLEAR(p->f); Py_CLEAR(p->labels); Py_CLEAR(p->typ); Py_CLEAR(p->index); (*Py_TYPE(o)->tp_free)(o); } static int __pyx_tp_traverse_6pandas_3lib_Reducer(PyObject *o, visitproc v, void *a) { int e; struct __pyx_obj_6pandas_3lib_Reducer *p = (struct __pyx_obj_6pandas_3lib_Reducer *)o; if (p->arr) { e = (*v)(p->arr, a); if (e) return e; } if (p->dummy) { e = (*v)(p->dummy, a); if (e) return e; } if (p->f) { e = (*v)(p->f, a); if (e) return e; } if (p->labels) { e = (*v)(p->labels, a); if (e) return e; } if (p->typ) { e = (*v)(p->typ, a); if (e) return e; } if (p->index) { e = (*v)(p->index, a); if (e) return e; } return 0; } static int __pyx_tp_clear_6pandas_3lib_Reducer(PyObject *o) { PyObject* tmp; struct __pyx_obj_6pandas_3lib_Reducer *p = (struct __pyx_obj_6pandas_3lib_Reducer *)o; tmp = ((PyObject*)p->arr); p->arr = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->dummy); p->dummy = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->f); p->f = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->labels); p->labels = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->typ); p->typ = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->index); p->index = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); return 0; } static PyMethodDef __pyx_methods_6pandas_3lib_Reducer[] = { {__Pyx_NAMESTR("_check_dummy"), (PyCFunction)__pyx_pw_6pandas_3lib_7Reducer_3_check_dummy, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}, {__Pyx_NAMESTR("get_result"), (PyCFunction)__pyx_pw_6pandas_3lib_7Reducer_5get_result, METH_NOARGS, __Pyx_DOCSTR(0)}, {__Pyx_NAMESTR("_get_result_array"), (PyCFunction)__pyx_pw_6pandas_3lib_7Reducer_7_get_result_array, METH_O, __Pyx_DOCSTR(0)}, {0, 0, 0, 0} }; static PyTypeObject __pyx_type_6pandas_3lib_Reducer = { PyVarObject_HEAD_INIT(0, 0) __Pyx_NAMESTR("pandas.lib.Reducer"), /*tp_name*/ sizeof(struct __pyx_obj_6pandas_3lib_Reducer), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_6pandas_3lib_Reducer, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #else 0, /*reserved*/ #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*/ __Pyx_DOCSTR("\n Performs generic reduction operation on a C or Fortran-contiguous ndarray\n while avoiding ndarray construction overhead\n "), /*tp_doc*/ __pyx_tp_traverse_6pandas_3lib_Reducer, /*tp_traverse*/ __pyx_tp_clear_6pandas_3lib_Reducer, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_6pandas_3lib_Reducer, /*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_3lib_7Reducer_1__init__, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_6pandas_3lib_Reducer, /*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*/ #if PY_VERSION_HEX >= 0x02060000 0, /*tp_version_tag*/ #endif #if PY_VERSION_HEX >= 0x030400a1 0, /*tp_finalize*/ #endif }; static struct __pyx_vtabstruct_6pandas_3lib_Slider __pyx_vtable_6pandas_3lib_Slider; static PyObject *__pyx_tp_new_6pandas_3lib_Slider(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { struct __pyx_obj_6pandas_3lib_Slider *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_3lib_Slider *)o); p->__pyx_vtab = __pyx_vtabptr_6pandas_3lib_Slider; p->values = ((PyArrayObject *)Py_None); Py_INCREF(Py_None); p->buf = ((PyArrayObject *)Py_None); Py_INCREF(Py_None); return o; } static void __pyx_tp_dealloc_6pandas_3lib_Slider(PyObject *o) { struct __pyx_obj_6pandas_3lib_Slider *p = (struct __pyx_obj_6pandas_3lib_Slider *)o; #if PY_VERSION_HEX >= 0x030400a1 if (unlikely(Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) { if (PyObject_CallFinalizerFromDealloc(o)) return; } #endif PyObject_GC_UnTrack(o); Py_CLEAR(p->values); Py_CLEAR(p->buf); (*Py_TYPE(o)->tp_free)(o); } static int __pyx_tp_traverse_6pandas_3lib_Slider(PyObject *o, visitproc v, void *a) { int e; struct __pyx_obj_6pandas_3lib_Slider *p = (struct __pyx_obj_6pandas_3lib_Slider *)o; if (p->values) { e = (*v)(((PyObject*)p->values), a); if (e) return e; } if (p->buf) { e = (*v)(((PyObject*)p->buf), a); if (e) return e; } return 0; } static int __pyx_tp_clear_6pandas_3lib_Slider(PyObject *o) { PyObject* tmp; struct __pyx_obj_6pandas_3lib_Slider *p = (struct __pyx_obj_6pandas_3lib_Slider *)o; tmp = ((PyObject*)p->values); p->values = ((PyArrayObject *)Py_None); Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->buf); p->buf = ((PyArrayObject *)Py_None); Py_INCREF(Py_None); Py_XDECREF(tmp); return 0; } static PyMethodDef __pyx_methods_6pandas_3lib_Slider[] = { {__Pyx_NAMESTR("advance"), (PyCFunction)__pyx_pw_6pandas_3lib_6Slider_3advance, METH_O, __Pyx_DOCSTR(0)}, {__Pyx_NAMESTR("set_length"), (PyCFunction)__pyx_pw_6pandas_3lib_6Slider_5set_length, METH_O, __Pyx_DOCSTR(0)}, {__Pyx_NAMESTR("reset"), (PyCFunction)__pyx_pw_6pandas_3lib_6Slider_7reset, METH_NOARGS, __Pyx_DOCSTR(0)}, {0, 0, 0, 0} }; static PyTypeObject __pyx_type_6pandas_3lib_Slider = { PyVarObject_HEAD_INIT(0, 0) __Pyx_NAMESTR("pandas.lib.Slider"), /*tp_name*/ sizeof(struct __pyx_obj_6pandas_3lib_Slider), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_6pandas_3lib_Slider, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #else 0, /*reserved*/ #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*/ __Pyx_DOCSTR("\n Only handles contiguous data for now\n "), /*tp_doc*/ __pyx_tp_traverse_6pandas_3lib_Slider, /*tp_traverse*/ __pyx_tp_clear_6pandas_3lib_Slider, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_6pandas_3lib_Slider, /*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_3lib_6Slider_1__init__, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_6pandas_3lib_Slider, /*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*/ #if PY_VERSION_HEX >= 0x02060000 0, /*tp_version_tag*/ #endif #if PY_VERSION_HEX >= 0x030400a1 0, /*tp_finalize*/ #endif }; static PyMethodDef __pyx_methods[] = { {__Pyx_NAMESTR("map_indices_list"), (PyCFunction)__pyx_pw_6pandas_3lib_1map_indices_list, METH_O, __Pyx_DOCSTR(__pyx_doc_6pandas_3lib_map_indices_list)}, {__Pyx_NAMESTR("to_datetime"), (PyCFunction)__pyx_pw_6pandas_3lib_5to_datetime, METH_O, __Pyx_DOCSTR(0)}, {__Pyx_NAMESTR("to_timestamp"), (PyCFunction)__pyx_pw_6pandas_3lib_7to_timestamp, METH_O, __Pyx_DOCSTR(0)}, {__Pyx_NAMESTR("checknull"), (PyCFunction)__pyx_pw_6pandas_3lib_13checknull, METH_O, __Pyx_DOCSTR(0)}, {__Pyx_NAMESTR("checknull_old"), (PyCFunction)__pyx_pw_6pandas_3lib_15checknull_old, METH_O, __Pyx_DOCSTR(0)}, {__Pyx_NAMESTR("astype_str"), (PyCFunction)__pyx_pw_6pandas_3lib_65astype_str, METH_O, __Pyx_DOCSTR(0)}, {0, 0, 0, 0} }; #if PY_MAJOR_VERSION >= 3 static struct PyModuleDef __pyx_moduledef = { #if PY_VERSION_HEX < 0x03020000 { PyObject_HEAD_INIT(NULL) NULL, 0, NULL }, #else PyModuleDef_HEAD_INIT, #endif __Pyx_NAMESTR("lib"), 0, /* m_doc */ -1, /* m_size */ __pyx_methods /* m_methods */, NULL, /* m_reload */ NULL, /* m_traverse */ NULL, /* m_clear */ NULL /* m_free */ }; #endif static __Pyx_StringTabEntry __pyx_string_tab[] = { {&__pyx_kp_s_1_6_2, __pyx_k_1_6_2, sizeof(__pyx_k_1_6_2), 0, 0, 1, 0}, {&__pyx_kp_s_Arrays_were_different_lengths_d, __pyx_k_Arrays_were_different_lengths_d, sizeof(__pyx_k_Arrays_were_different_lengths_d), 0, 0, 1, 0}, {&__pyx_n_s_AttributeError, __pyx_k_AttributeError, sizeof(__pyx_k_AttributeError), 0, 0, 1, 1}, {&__pyx_n_s_C, __pyx_k_C, sizeof(__pyx_k_C), 0, 0, 1, 1}, {&__pyx_kp_s_Cannot_modify_frame_index_intern, __pyx_k_Cannot_modify_frame_index_intern, sizeof(__pyx_k_Cannot_modify_frame_index_intern), 0, 0, 1, 0}, {&__pyx_kp_s_Cannot_use_shortcut, __pyx_k_Cannot_use_shortcut, sizeof(__pyx_k_Cannot_use_shortcut), 0, 0, 1, 0}, {&__pyx_kp_s_Dummy_array_must_be_length_d, __pyx_k_Dummy_array_must_be_length_d, sizeof(__pyx_k_Dummy_array_must_be_length_d), 0, 0, 1, 0}, {&__pyx_kp_s_Dummy_array_must_be_same_dtype, __pyx_k_Dummy_array_must_be_same_dtype, sizeof(__pyx_k_Dummy_array_must_be_same_dtype), 0, 0, 1, 0}, {&__pyx_kp_s_Empty_string_encountered, __pyx_k_Empty_string_encountered, sizeof(__pyx_k_Empty_string_encountered), 0, 0, 1, 0}, {&__pyx_n_s_Exception, __pyx_k_Exception, sizeof(__pyx_k_Exception), 0, 0, 1, 1}, {&__pyx_n_s_F, __pyx_k_F, sizeof(__pyx_k_F), 0, 0, 1, 1}, {&__pyx_n_s_FALSE, __pyx_k_FALSE, sizeof(__pyx_k_FALSE), 0, 0, 1, 1}, {&__pyx_n_s_False, __pyx_k_False, sizeof(__pyx_k_False), 0, 0, 1, 1}, {&__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_kp_s_Function_unsafe_for_fast_apply, __pyx_k_Function_unsafe_for_fast_apply, sizeof(__pyx_k_Function_unsafe_for_fast_apply), 0, 0, 1, 0}, {&__pyx_kp_s_H_M_S, __pyx_k_H_M_S, sizeof(__pyx_k_H_M_S), 0, 0, 1, 0}, {&__pyx_n_s_ImportError, __pyx_k_ImportError, sizeof(__pyx_k_ImportError), 0, 0, 1, 1}, {&__pyx_n_s_IndexError, __pyx_k_IndexError, sizeof(__pyx_k_IndexError), 0, 0, 1, 1}, {&__pyx_n_s_InvalidApply, __pyx_k_InvalidApply, sizeof(__pyx_k_InvalidApply), 0, 0, 1, 1}, {&__pyx_kp_s_Invalid_length_for_values_or_for, __pyx_k_Invalid_length_for_values_or_for, sizeof(__pyx_k_Invalid_length_for_values_or_for), 0, 0, 1, 0}, {&__pyx_kp_s_Length_of_all_datetime_component, __pyx_k_Length_of_all_datetime_component, sizeof(__pyx_k_Length_of_all_datetime_component), 0, 0, 1, 0}, {&__pyx_kp_s_Length_of_dates_and_times_must_b, __pyx_k_Length_of_dates_and_times_must_b, sizeof(__pyx_k_Length_of_dates_and_times_must_b), 0, 0, 1, 0}, {&__pyx_kp_s_Length_of_years_months_days_must, __pyx_k_Length_of_years_months_days_must, sizeof(__pyx_k_Length_of_years_months_days_must), 0, 0, 1, 0}, {&__pyx_kp_s_Let_this_error_raise_above_us, __pyx_k_Let_this_error_raise_above_us, sizeof(__pyx_k_Let_this_error_raise_above_us), 0, 0, 1, 0}, {&__pyx_n_s_LooseVersion, __pyx_k_LooseVersion, sizeof(__pyx_k_LooseVersion), 0, 0, 1, 1}, {&__pyx_kp_s_M8_ns, __pyx_k_M8_ns, sizeof(__pyx_k_M8_ns), 0, 0, 1, 0}, {&__pyx_n_s_N, __pyx_k_N, sizeof(__pyx_k_N), 0, 0, 1, 1}, {&__pyx_n_s_NaN, __pyx_k_NaN, sizeof(__pyx_k_NaN), 0, 0, 1, 1}, {&__pyx_n_s_NaT, __pyx_k_NaT, sizeof(__pyx_k_NaT), 0, 0, 1, 1}, {&__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_O, __pyx_k_O, sizeof(__pyx_k_O), 0, 0, 1, 1}, {&__pyx_n_s_OverflowError, __pyx_k_OverflowError, sizeof(__pyx_k_OverflowError), 0, 0, 1, 1}, {&__pyx_n_s_Period, __pyx_k_Period, sizeof(__pyx_k_Period), 0, 0, 1, 1}, {&__pyx_n_s_RuntimeError, __pyx_k_RuntimeError, sizeof(__pyx_k_RuntimeError), 0, 0, 1, 1}, {&__pyx_n_s_TRUE, __pyx_k_TRUE, sizeof(__pyx_k_TRUE), 0, 0, 1, 1}, {&__pyx_n_s_TYPE_MAP, __pyx_k_TYPE_MAP, sizeof(__pyx_k_TYPE_MAP), 0, 0, 1, 1}, {&__pyx_n_s_Timestamp, __pyx_k_Timestamp, sizeof(__pyx_k_Timestamp), 0, 0, 1, 1}, {&__pyx_n_s_True, __pyx_k_True, sizeof(__pyx_k_True), 0, 0, 1, 1}, {&__pyx_n_s_TypeError, __pyx_k_TypeError, sizeof(__pyx_k_TypeError), 0, 0, 1, 1}, {&__pyx_kp_s_Unable_to_parse_s, __pyx_k_Unable_to_parse_s, sizeof(__pyx_k_Unable_to_parse_s), 0, 0, 1, 0}, {&__pyx_kp_s_Unrecognized_operator, __pyx_k_Unrecognized_operator, sizeof(__pyx_k_Unrecognized_operator), 0, 0, 1, 0}, {&__pyx_n_s_ValueError, __pyx_k_ValueError, sizeof(__pyx_k_ValueError), 0, 0, 1, 1}, {&__pyx_kp_s_Values_falls_after_last_bin, __pyx_k_Values_falls_after_last_bin, sizeof(__pyx_k_Values_falls_after_last_bin), 0, 0, 1, 0}, {&__pyx_kp_s_Values_falls_before_first_bin, __pyx_k_Values_falls_before_first_bin, sizeof(__pyx_k_Values_falls_before_first_bin), 0, 0, 1, 0}, {&__pyx_kp_s__31, __pyx_k__31, sizeof(__pyx_k__31), 0, 0, 1, 0}, {&__pyx_kp_s__34, __pyx_k__34, sizeof(__pyx_k__34), 0, 0, 1, 0}, {&__pyx_n_s_advance, __pyx_k_advance, sizeof(__pyx_k_advance), 0, 0, 1, 1}, {&__pyx_n_s_all_arrays, __pyx_k_all_arrays, sizeof(__pyx_k_all_arrays), 0, 0, 1, 1}, {&__pyx_kp_s_all_arrays_must_be_same_length, __pyx_k_all_arrays_must_be_same_length, sizeof(__pyx_k_all_arrays_must_be_same_length), 0, 0, 1, 0}, {&__pyx_n_s_allow_setting, __pyx_k_allow_setting, sizeof(__pyx_k_allow_setting), 0, 0, 1, 1}, {&__pyx_n_s_apply_frame_axis0, __pyx_k_apply_frame_axis0, sizeof(__pyx_k_apply_frame_axis0), 0, 0, 1, 1}, {&__pyx_n_s_args, __pyx_k_args, sizeof(__pyx_k_args), 0, 0, 1, 1}, {&__pyx_n_s_arobj, __pyx_k_arobj, sizeof(__pyx_k_arobj), 0, 0, 1, 1}, {&__pyx_n_s_arr, __pyx_k_arr, sizeof(__pyx_k_arr), 0, 0, 1, 1}, {&__pyx_n_s_array_to_timestamp, __pyx_k_array_to_timestamp, sizeof(__pyx_k_array_to_timestamp), 0, 0, 1, 1}, {&__pyx_n_s_arrays, __pyx_k_arrays, sizeof(__pyx_k_arrays), 0, 0, 1, 1}, {&__pyx_n_s_arrmap, __pyx_k_arrmap, sizeof(__pyx_k_arrmap), 0, 0, 1, 1}, {&__pyx_n_s_astype, __pyx_k_astype, sizeof(__pyx_k_astype), 0, 0, 1, 1}, {&__pyx_n_s_astype_intsafe, __pyx_k_astype_intsafe, sizeof(__pyx_k_astype_intsafe), 0, 0, 1, 1}, {&__pyx_n_s_axes, __pyx_k_axes, sizeof(__pyx_k_axes), 0, 0, 1, 1}, {&__pyx_n_s_axis, __pyx_k_axis, sizeof(__pyx_k_axis), 0, 0, 1, 1}, {&__pyx_n_s_bc, __pyx_k_bc, sizeof(__pyx_k_bc), 0, 0, 1, 1}, {&__pyx_n_s_binner, __pyx_k_binner, sizeof(__pyx_k_binner), 0, 0, 1, 1}, {&__pyx_n_s_bins, __pyx_k_bins, sizeof(__pyx_k_bins), 0, 0, 1, 1}, {&__pyx_n_s_block, __pyx_k_block, sizeof(__pyx_k_block), 0, 0, 1, 1}, {&__pyx_n_s_blocks, __pyx_k_blocks, sizeof(__pyx_k_blocks), 0, 0, 1, 1}, {&__pyx_n_s_bool, __pyx_k_bool, sizeof(__pyx_k_bool), 0, 0, 1, 1}, {&__pyx_n_s_boolean, __pyx_k_boolean, sizeof(__pyx_k_boolean), 0, 0, 1, 1}, {&__pyx_n_s_bools, __pyx_k_bools, sizeof(__pyx_k_bools), 0, 0, 1, 1}, {&__pyx_n_s_buf, __pyx_k_buf, sizeof(__pyx_k_buf), 0, 0, 1, 1}, {&__pyx_n_s_c16, __pyx_k_c16, sizeof(__pyx_k_c16), 0, 0, 1, 1}, {&__pyx_n_s_c_contiguous, __pyx_k_c_contiguous, sizeof(__pyx_k_c_contiguous), 0, 0, 1, 1}, {&__pyx_n_s_cache, __pyx_k_cache, sizeof(__pyx_k_cache), 0, 0, 1, 1}, {&__pyx_n_s_cache_2, __pyx_k_cache_2, sizeof(__pyx_k_cache_2), 0, 0, 1, 1}, {&__pyx_kp_s_cannot_set_values_for_s, __pyx_k_cannot_set_values_for_s, sizeof(__pyx_k_cannot_set_values_for_s), 0, 0, 1, 0}, {&__pyx_n_s_check_dummy, __pyx_k_check_dummy, sizeof(__pyx_k_check_dummy), 0, 0, 1, 1}, {&__pyx_n_s_chunk, __pyx_k_chunk, sizeof(__pyx_k_chunk), 0, 0, 1, 1}, {&__pyx_n_s_clean_index_list, __pyx_k_clean_index_list, sizeof(__pyx_k_clean_index_list), 0, 0, 1, 1}, {&__pyx_n_s_clear_mapping, __pyx_k_clear_mapping, sizeof(__pyx_k_clear_mapping), 0, 0, 1, 1}, {&__pyx_n_s_closed, __pyx_k_closed, sizeof(__pyx_k_closed), 0, 0, 1, 1}, {&__pyx_n_s_coerce_numeric, __pyx_k_coerce_numeric, sizeof(__pyx_k_coerce_numeric), 0, 0, 1, 1}, {&__pyx_n_s_col, __pyx_k_col, sizeof(__pyx_k_col), 0, 0, 1, 1}, {&__pyx_n_s_cols, __pyx_k_cols, sizeof(__pyx_k_cols), 0, 0, 1, 1}, {&__pyx_n_s_columns, __pyx_k_columns, sizeof(__pyx_k_columns), 0, 0, 1, 1}, {&__pyx_n_s_complex, __pyx_k_complex, sizeof(__pyx_k_complex), 0, 0, 1, 1}, {&__pyx_n_s_complex128, __pyx_k_complex128, sizeof(__pyx_k_complex128), 0, 0, 1, 1}, {&__pyx_n_s_complex256, __pyx_k_complex256, sizeof(__pyx_k_complex256), 0, 0, 1, 1}, {&__pyx_n_s_complexes, __pyx_k_complexes, sizeof(__pyx_k_complexes), 0, 0, 1, 1}, {&__pyx_n_s_contiguous, __pyx_k_contiguous, sizeof(__pyx_k_contiguous), 0, 0, 1, 1}, {&__pyx_n_s_convert, __pyx_k_convert, sizeof(__pyx_k_convert), 0, 0, 1, 1}, {&__pyx_n_s_convert_datetime, __pyx_k_convert_datetime, sizeof(__pyx_k_convert_datetime), 0, 0, 1, 1}, {&__pyx_n_s_convert_empty, __pyx_k_convert_empty, sizeof(__pyx_k_convert_empty), 0, 0, 1, 1}, {&__pyx_n_s_convert_sql_column, __pyx_k_convert_sql_column, sizeof(__pyx_k_convert_sql_column), 0, 0, 1, 1}, {&__pyx_n_s_convert_timedelta, __pyx_k_convert_timedelta, sizeof(__pyx_k_convert_timedelta), 0, 0, 1, 1}, {&__pyx_n_s_convert_timestamps, __pyx_k_convert_timestamps, sizeof(__pyx_k_convert_timestamps), 0, 0, 1, 1}, {&__pyx_n_s_converted, __pyx_k_converted, sizeof(__pyx_k_converted), 0, 0, 1, 1}, {&__pyx_n_s_copy, __pyx_k_copy, sizeof(__pyx_k_copy), 0, 0, 1, 1}, {&__pyx_n_s_count_level_1d, __pyx_k_count_level_1d, sizeof(__pyx_k_count_level_1d), 0, 0, 1, 1}, {&__pyx_n_s_count_level_2d, __pyx_k_count_level_2d, sizeof(__pyx_k_count_level_2d), 0, 0, 1, 1}, {&__pyx_n_s_counts, __pyx_k_counts, sizeof(__pyx_k_counts), 0, 0, 1, 1}, {&__pyx_n_s_cur, __pyx_k_cur, sizeof(__pyx_k_cur), 0, 0, 1, 1}, {&__pyx_n_s_d, __pyx_k_d, sizeof(__pyx_k_d), 0, 0, 1, 1}, {&__pyx_n_s_data, __pyx_k_data, sizeof(__pyx_k_data), 0, 0, 1, 1}, {&__pyx_n_s_data_2, __pyx_k_data_2, sizeof(__pyx_k_data_2), 0, 0, 1, 1}, {&__pyx_n_s_data_index, __pyx_k_data_index, sizeof(__pyx_k_data_index), 0, 0, 1, 1}, {&__pyx_n_s_date, __pyx_k_date, sizeof(__pyx_k_date), 0, 0, 1, 1}, {&__pyx_n_s_date_parser, __pyx_k_date_parser, sizeof(__pyx_k_date_parser), 0, 0, 1, 1}, {&__pyx_n_s_dates, __pyx_k_dates, sizeof(__pyx_k_dates), 0, 0, 1, 1}, {&__pyx_n_s_datetime, __pyx_k_datetime, sizeof(__pyx_k_datetime), 0, 0, 1, 1}, {&__pyx_n_s_datetime64, __pyx_k_datetime64, sizeof(__pyx_k_datetime64), 0, 0, 1, 1}, {&__pyx_n_s_datetimes, __pyx_k_datetimes, sizeof(__pyx_k_datetimes), 0, 0, 1, 1}, {&__pyx_n_s_dateutil_parser, __pyx_k_dateutil_parser, sizeof(__pyx_k_dateutil_parser), 0, 0, 1, 1}, {&__pyx_n_s_day, __pyx_k_day, sizeof(__pyx_k_day), 0, 0, 1, 1}, {&__pyx_n_s_dayfirst, __pyx_k_dayfirst, sizeof(__pyx_k_dayfirst), 0, 0, 1, 1}, {&__pyx_n_s_days, __pyx_k_days, sizeof(__pyx_k_days), 0, 0, 1, 1}, {&__pyx_n_s_default, __pyx_k_default, sizeof(__pyx_k_default), 0, 0, 1, 1}, {&__pyx_n_s_dicts, __pyx_k_dicts, sizeof(__pyx_k_dicts), 0, 0, 1, 1}, {&__pyx_n_s_dicts_to_array, __pyx_k_dicts_to_array, sizeof(__pyx_k_dicts_to_array), 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_doc, __pyx_k_doc, sizeof(__pyx_k_doc), 0, 0, 1, 1}, {&__pyx_n_s_doc_2, __pyx_k_doc_2, sizeof(__pyx_k_doc_2), 0, 0, 1, 1}, {&__pyx_n_s_dtype, __pyx_k_dtype, sizeof(__pyx_k_dtype), 0, 0, 1, 1}, {&__pyx_n_s_dummy, __pyx_k_dummy, sizeof(__pyx_k_dummy), 0, 0, 1, 1}, {&__pyx_n_s_duplicated, __pyx_k_duplicated, sizeof(__pyx_k_duplicated), 0, 0, 1, 1}, {&__pyx_n_s_empty, __pyx_k_empty, sizeof(__pyx_k_empty), 0, 0, 1, 1}, {&__pyx_n_s_end, __pyx_k_end, sizeof(__pyx_k_end), 0, 0, 1, 1}, {&__pyx_n_s_ends, __pyx_k_ends, sizeof(__pyx_k_ends), 0, 0, 1, 1}, {&__pyx_n_s_engine, __pyx_k_engine, sizeof(__pyx_k_engine), 0, 0, 1, 1}, {&__pyx_n_s_enumerate, __pyx_k_enumerate, sizeof(__pyx_k_enumerate), 0, 0, 1, 1}, {&__pyx_n_s_eq, __pyx_k_eq, sizeof(__pyx_k_eq), 0, 0, 1, 1}, {&__pyx_n_s_f, __pyx_k_f, sizeof(__pyx_k_f), 0, 0, 1, 1}, {&__pyx_n_s_f8, __pyx_k_f8, sizeof(__pyx_k_f8), 0, 0, 1, 1}, {&__pyx_n_s_f_contiguous, __pyx_k_f_contiguous, sizeof(__pyx_k_f_contiguous), 0, 0, 1, 1}, {&__pyx_n_s_false, __pyx_k_false, sizeof(__pyx_k_false), 0, 0, 1, 1}, {&__pyx_n_s_false_vals, __pyx_k_false_vals, sizeof(__pyx_k_false_vals), 0, 0, 1, 1}, {&__pyx_n_s_false_values, __pyx_k_false_values, sizeof(__pyx_k_false_values), 0, 0, 1, 1}, {&__pyx_n_s_fast_multiget, __pyx_k_fast_multiget, sizeof(__pyx_k_fast_multiget), 0, 0, 1, 1}, {&__pyx_n_s_fast_unique, __pyx_k_fast_unique, sizeof(__pyx_k_fast_unique), 0, 0, 1, 1}, {&__pyx_n_s_fast_unique_multiple, __pyx_k_fast_unique_multiple, sizeof(__pyx_k_fast_unique_multiple), 0, 0, 1, 1}, {&__pyx_n_s_fast_unique_multiple_list, __pyx_k_fast_unique_multiple_list, sizeof(__pyx_k_fast_unique_multiple_list), 0, 0, 1, 1}, {&__pyx_n_s_fast_unique_multiple_list_gen, __pyx_k_fast_unique_multiple_list_gen, sizeof(__pyx_k_fast_unique_multiple_list_gen), 0, 0, 1, 1}, {&__pyx_n_s_fast_zip, __pyx_k_fast_zip, sizeof(__pyx_k_fast_zip), 0, 0, 1, 1}, {&__pyx_n_s_fast_zip_fillna, __pyx_k_fast_zip_fillna, sizeof(__pyx_k_fast_zip_fillna), 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_finished, __pyx_k_finished, sizeof(__pyx_k_finished), 0, 0, 1, 1}, {&__pyx_n_s_flag, __pyx_k_flag, sizeof(__pyx_k_flag), 0, 0, 1, 1}, {&__pyx_n_s_flags, __pyx_k_flags, sizeof(__pyx_k_flags), 0, 0, 1, 1}, {&__pyx_n_s_float128, __pyx_k_float128, sizeof(__pyx_k_float128), 0, 0, 1, 1}, {&__pyx_n_s_float16, __pyx_k_float16, sizeof(__pyx_k_float16), 0, 0, 1, 1}, {&__pyx_n_s_float32, __pyx_k_float32, sizeof(__pyx_k_float32), 0, 0, 1, 1}, {&__pyx_n_s_float64, __pyx_k_float64, sizeof(__pyx_k_float64), 0, 0, 1, 1}, {&__pyx_n_s_float_secs, __pyx_k_float_secs, sizeof(__pyx_k_float_secs), 0, 0, 1, 1}, {&__pyx_n_s_floating, __pyx_k_floating, sizeof(__pyx_k_floating), 0, 0, 1, 1}, {&__pyx_n_s_floats, __pyx_k_floats, sizeof(__pyx_k_floats), 0, 0, 1, 1}, {&__pyx_n_s_fnan, __pyx_k_fnan, sizeof(__pyx_k_fnan), 0, 0, 1, 1}, {&__pyx_n_s_frame, __pyx_k_frame, sizeof(__pyx_k_frame), 0, 0, 1, 1}, {&__pyx_n_s_fromtimestamp, __pyx_k_fromtimestamp, sizeof(__pyx_k_fromtimestamp), 0, 0, 1, 1}, {&__pyx_n_s_func, __pyx_k_func, sizeof(__pyx_k_func), 0, 0, 1, 1}, {&__pyx_kp_s_function_does_not_reduce, __pyx_k_function_does_not_reduce, sizeof(__pyx_k_function_does_not_reduce), 0, 0, 1, 0}, {&__pyx_n_s_fval, __pyx_k_fval, sizeof(__pyx_k_fval), 0, 0, 1, 1}, {&__pyx_n_s_ge, __pyx_k_ge, sizeof(__pyx_k_ge), 0, 0, 1, 1}, {&__pyx_n_s_gen, __pyx_k_gen, sizeof(__pyx_k_gen), 0, 0, 1, 1}, {&__pyx_n_s_generate_bins_dt64, __pyx_k_generate_bins_dt64, sizeof(__pyx_k_generate_bins_dt64), 0, 0, 1, 1}, {&__pyx_n_s_generate_slices, __pyx_k_generate_slices, sizeof(__pyx_k_generate_slices), 0, 0, 1, 1}, {&__pyx_n_s_get_result, __pyx_k_get_result, sizeof(__pyx_k_get_result), 0, 0, 1, 1}, {&__pyx_n_s_get_result_array, __pyx_k_get_result_array, sizeof(__pyx_k_get_result_array), 0, 0, 1, 1}, {&__pyx_n_s_get_reverse_indexer, __pyx_k_get_reverse_indexer, sizeof(__pyx_k_get_reverse_indexer), 0, 0, 1, 1}, {&__pyx_n_s_gin, __pyx_k_gin, sizeof(__pyx_k_gin), 0, 0, 1, 1}, {&__pyx_n_s_group_count, __pyx_k_group_count, sizeof(__pyx_k_group_count), 0, 0, 1, 1}, {&__pyx_n_s_group_size, __pyx_k_group_size, sizeof(__pyx_k_group_size), 0, 0, 1, 1}, {&__pyx_n_s_gt, __pyx_k_gt, sizeof(__pyx_k_gt), 0, 0, 1, 1}, {&__pyx_n_s_has_complex_internals, __pyx_k_has_complex_internals, sizeof(__pyx_k_has_complex_internals), 0, 0, 1, 1}, {&__pyx_n_s_has_infs_f4, __pyx_k_has_infs_f4, sizeof(__pyx_k_has_infs_f4), 0, 0, 1, 1}, {&__pyx_n_s_has_infs_f8, __pyx_k_has_infs_f8, sizeof(__pyx_k_has_infs_f8), 0, 0, 1, 1}, {&__pyx_kp_s_home_yoh_deb_gits_pkg_exppsy_pa, __pyx_k_home_yoh_deb_gits_pkg_exppsy_pa, sizeof(__pyx_k_home_yoh_deb_gits_pkg_exppsy_pa), 0, 0, 1, 0}, {&__pyx_n_s_hour, __pyx_k_hour, sizeof(__pyx_k_hour), 0, 0, 1, 1}, {&__pyx_n_s_hours, __pyx_k_hours, sizeof(__pyx_k_hours), 0, 0, 1, 1}, {&__pyx_n_s_i, __pyx_k_i, sizeof(__pyx_k_i), 0, 0, 1, 1}, {&__pyx_n_s_i8, __pyx_k_i8, sizeof(__pyx_k_i8), 0, 0, 1, 1}, {&__pyx_n_s_iNaT, __pyx_k_iNaT, sizeof(__pyx_k_iNaT), 0, 0, 1, 1}, {&__pyx_n_s_idatetimes, __pyx_k_idatetimes, sizeof(__pyx_k_idatetimes), 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, __pyx_k_index, sizeof(__pyx_k_index), 0, 0, 1, 1}, {&__pyx_n_s_index_2, __pyx_k_index_2, sizeof(__pyx_k_index_2), 0, 0, 1, 1}, {&__pyx_kp_s_index_out_of_bounds, __pyx_k_index_out_of_bounds, sizeof(__pyx_k_index_out_of_bounds), 0, 0, 1, 0}, {&__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_indices_fast, __pyx_k_indices_fast, sizeof(__pyx_k_indices_fast), 0, 0, 1, 1}, {&__pyx_n_s_inf, __pyx_k_inf, sizeof(__pyx_k_inf), 0, 0, 1, 1}, {&__pyx_n_s_infer_dtype, __pyx_k_infer_dtype, sizeof(__pyx_k_infer_dtype), 0, 0, 1, 1}, {&__pyx_n_s_infer_dtype_list, __pyx_k_infer_dtype_list, sizeof(__pyx_k_infer_dtype_list), 0, 0, 1, 1}, {&__pyx_n_s_int16, __pyx_k_int16, sizeof(__pyx_k_int16), 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_integer, __pyx_k_integer, sizeof(__pyx_k_integer), 0, 0, 1, 1}, {&__pyx_n_s_ints, __pyx_k_ints, sizeof(__pyx_k_ints), 0, 0, 1, 1}, {&__pyx_n_s_is_bool_array, __pyx_k_is_bool_array, sizeof(__pyx_k_is_bool_array), 0, 0, 1, 1}, {&__pyx_n_s_is_date_array, __pyx_k_is_date_array, sizeof(__pyx_k_is_date_array), 0, 0, 1, 1}, {&__pyx_n_s_is_datelike, __pyx_k_is_datelike, sizeof(__pyx_k_is_datelike), 0, 0, 1, 1}, {&__pyx_n_s_is_datetime64_array, __pyx_k_is_datetime64_array, sizeof(__pyx_k_is_datetime64_array), 0, 0, 1, 1}, {&__pyx_n_s_is_datetime_array, __pyx_k_is_datetime_array, sizeof(__pyx_k_is_datetime_array), 0, 0, 1, 1}, {&__pyx_n_s_is_float_array, __pyx_k_is_float_array, sizeof(__pyx_k_is_float_array), 0, 0, 1, 1}, {&__pyx_n_s_is_integer, __pyx_k_is_integer, sizeof(__pyx_k_is_integer), 0, 0, 1, 1}, {&__pyx_n_s_is_integer_array, __pyx_k_is_integer_array, sizeof(__pyx_k_is_integer_array), 0, 0, 1, 1}, {&__pyx_n_s_is_integer_float_array, __pyx_k_is_integer_float_array, sizeof(__pyx_k_is_integer_float_array), 0, 0, 1, 1}, {&__pyx_n_s_is_lexsorted, __pyx_k_is_lexsorted, sizeof(__pyx_k_is_lexsorted), 0, 0, 1, 1}, {&__pyx_n_s_is_numpy_prior_1_6_2, __pyx_k_is_numpy_prior_1_6_2, sizeof(__pyx_k_is_numpy_prior_1_6_2), 0, 0, 1, 1}, {&__pyx_n_s_is_period, __pyx_k_is_period, sizeof(__pyx_k_is_period), 0, 0, 1, 1}, {&__pyx_n_s_is_period_array, __pyx_k_is_period_array, sizeof(__pyx_k_is_period_array), 0, 0, 1, 1}, {&__pyx_n_s_is_string_array, __pyx_k_is_string_array, sizeof(__pyx_k_is_string_array), 0, 0, 1, 1}, {&__pyx_n_s_is_time_array, __pyx_k_is_time_array, sizeof(__pyx_k_is_time_array), 0, 0, 1, 1}, {&__pyx_n_s_is_timedelta64_array, __pyx_k_is_timedelta64_array, sizeof(__pyx_k_is_timedelta64_array), 0, 0, 1, 1}, {&__pyx_n_s_is_timedelta_array, __pyx_k_is_timedelta_array, sizeof(__pyx_k_is_timedelta_array), 0, 0, 1, 1}, {&__pyx_n_s_is_timedelta_or_timedelta64_arra, __pyx_k_is_timedelta_or_timedelta64_arra, sizeof(__pyx_k_is_timedelta_or_timedelta64_arra), 0, 0, 1, 1}, {&__pyx_n_s_is_unicode_array, __pyx_k_is_unicode_array, sizeof(__pyx_k_is_unicode_array), 0, 0, 1, 1}, {&__pyx_n_s_ismember, __pyx_k_ismember, sizeof(__pyx_k_ismember), 0, 0, 1, 1}, {&__pyx_n_s_isnan, __pyx_k_isnan, sizeof(__pyx_k_isnan), 0, 0, 1, 1}, {&__pyx_n_s_isnullobj, __pyx_k_isnullobj, sizeof(__pyx_k_isnullobj), 0, 0, 1, 1}, {&__pyx_n_s_isnullobj2d, __pyx_k_isnullobj2d, sizeof(__pyx_k_isnullobj2d), 0, 0, 1, 1}, {&__pyx_n_s_isnullobj2d_old, __pyx_k_isnullobj2d_old, sizeof(__pyx_k_isnullobj2d_old), 0, 0, 1, 1}, {&__pyx_n_s_isnullobj_old, __pyx_k_isnullobj_old, sizeof(__pyx_k_isnullobj_old), 0, 0, 1, 1}, {&__pyx_n_s_isscalar, __pyx_k_isscalar, sizeof(__pyx_k_isscalar), 0, 0, 1, 1}, {&__pyx_n_s_it, __pyx_k_it, sizeof(__pyx_k_it), 0, 0, 1, 1}, {&__pyx_n_s_item, __pyx_k_item, sizeof(__pyx_k_item), 0, 0, 1, 1}, {&__pyx_n_s_item_cache, __pyx_k_item_cache, sizeof(__pyx_k_item_cache), 0, 0, 1, 1}, {&__pyx_n_s_item_cache_2, __pyx_k_item_cache_2, sizeof(__pyx_k_item_cache_2), 0, 0, 1, 1}, {&__pyx_n_s_itemsize, __pyx_k_itemsize, sizeof(__pyx_k_itemsize), 0, 0, 1, 1}, {&__pyx_n_s_itimedeltas, __pyx_k_itimedeltas, sizeof(__pyx_k_itimedeltas), 0, 0, 1, 1}, {&__pyx_n_s_j, __pyx_k_j, sizeof(__pyx_k_j), 0, 0, 1, 1}, {&__pyx_n_s_k, __pyx_k_k, sizeof(__pyx_k_k), 0, 0, 1, 1}, {&__pyx_n_s_keys, __pyx_k_keys, sizeof(__pyx_k_keys), 0, 0, 1, 1}, {&__pyx_n_s_l, __pyx_k_l, sizeof(__pyx_k_l), 0, 0, 1, 1}, {&__pyx_n_s_l_bin, __pyx_k_l_bin, sizeof(__pyx_k_l_bin), 0, 0, 1, 1}, {&__pyx_n_s_lab, __pyx_k_lab, sizeof(__pyx_k_lab), 0, 0, 1, 1}, {&__pyx_n_s_labels, __pyx_k_labels, sizeof(__pyx_k_labels), 0, 0, 1, 1}, {&__pyx_n_s_le, __pyx_k_le, sizeof(__pyx_k_le), 0, 0, 1, 1}, {&__pyx_n_s_left, __pyx_k_left, sizeof(__pyx_k_left), 0, 0, 1, 1}, {&__pyx_n_s_len, __pyx_k_len, sizeof(__pyx_k_len), 0, 0, 1, 1}, {&__pyx_n_s_lenbin, __pyx_k_lenbin, sizeof(__pyx_k_lenbin), 0, 0, 1, 1}, {&__pyx_n_s_length, __pyx_k_length, sizeof(__pyx_k_length), 0, 0, 1, 1}, {&__pyx_n_s_lenidx, __pyx_k_lenidx, sizeof(__pyx_k_lenidx), 0, 0, 1, 1}, {&__pyx_n_s_list_of_arrays, __pyx_k_list_of_arrays, sizeof(__pyx_k_list_of_arrays), 0, 0, 1, 1}, {&__pyx_n_s_list_to_object_array, __pyx_k_list_to_object_array, sizeof(__pyx_k_list_to_object_array), 0, 0, 1, 1}, {&__pyx_n_s_lists, __pyx_k_lists, sizeof(__pyx_k_lists), 0, 0, 1, 1}, {&__pyx_n_s_lookup_values, __pyx_k_lookup_values, sizeof(__pyx_k_lookup_values), 0, 0, 1, 1}, {&__pyx_n_s_lt, __pyx_k_lt, sizeof(__pyx_k_lt), 0, 0, 1, 1}, {&__pyx_n_s_m, __pyx_k_m, sizeof(__pyx_k_m), 0, 0, 1, 1}, {&__pyx_kp_s_m8_ns, __pyx_k_m8_ns, sizeof(__pyx_k_m8_ns), 0, 0, 1, 0}, {&__pyx_kp_s_m_d_Y, __pyx_k_m_d_Y, sizeof(__pyx_k_m_d_Y), 0, 0, 1, 0}, {&__pyx_n_s_main, __pyx_k_main, sizeof(__pyx_k_main), 0, 0, 1, 1}, {&__pyx_n_s_map_infer, __pyx_k_map_infer, sizeof(__pyx_k_map_infer), 0, 0, 1, 1}, {&__pyx_n_s_map_infer_mask, __pyx_k_map_infer_mask, sizeof(__pyx_k_map_infer_mask), 0, 0, 1, 1}, {&__pyx_n_s_mapping, __pyx_k_mapping, sizeof(__pyx_k_mapping), 0, 0, 1, 1}, {&__pyx_n_s_mask, __pyx_k_mask, sizeof(__pyx_k_mask), 0, 0, 1, 1}, {&__pyx_n_s_max_bin, __pyx_k_max_bin, sizeof(__pyx_k_max_bin), 0, 0, 1, 1}, {&__pyx_n_s_max_len_string_array, __pyx_k_max_len_string_array, sizeof(__pyx_k_max_len_string_array), 0, 0, 1, 1}, {&__pyx_n_s_maybe_booleans_to_slice, __pyx_k_maybe_booleans_to_slice, sizeof(__pyx_k_maybe_booleans_to_slice), 0, 0, 1, 1}, {&__pyx_n_s_maybe_convert_bool, __pyx_k_maybe_convert_bool, sizeof(__pyx_k_maybe_convert_bool), 0, 0, 1, 1}, {&__pyx_n_s_maybe_convert_numeric, __pyx_k_maybe_convert_numeric, sizeof(__pyx_k_maybe_convert_numeric), 0, 0, 1, 1}, {&__pyx_n_s_maybe_convert_objects, __pyx_k_maybe_convert_objects, sizeof(__pyx_k_maybe_convert_objects), 0, 0, 1, 1}, {&__pyx_n_s_maybe_indices_to_slice, __pyx_k_maybe_indices_to_slice, sizeof(__pyx_k_maybe_indices_to_slice), 0, 0, 1, 1}, {&__pyx_n_s_memo, __pyx_k_memo, sizeof(__pyx_k_memo), 0, 0, 1, 1}, {&__pyx_n_s_metaclass, __pyx_k_metaclass, sizeof(__pyx_k_metaclass), 0, 0, 1, 1}, {&__pyx_n_s_micros, __pyx_k_micros, sizeof(__pyx_k_micros), 0, 0, 1, 1}, {&__pyx_n_s_microsecond, __pyx_k_microsecond, sizeof(__pyx_k_microsecond), 0, 0, 1, 1}, {&__pyx_n_s_minute, __pyx_k_minute, sizeof(__pyx_k_minute), 0, 0, 1, 1}, {&__pyx_n_s_minutes, __pyx_k_minutes, sizeof(__pyx_k_minutes), 0, 0, 1, 1}, {&__pyx_n_s_mixed, __pyx_k_mixed, sizeof(__pyx_k_mixed), 0, 0, 1, 1}, {&__pyx_kp_s_mixed_integer, __pyx_k_mixed_integer, sizeof(__pyx_k_mixed_integer), 0, 0, 1, 0}, {&__pyx_kp_s_mixed_integer_float, __pyx_k_mixed_integer_float, sizeof(__pyx_k_mixed_integer_float), 0, 0, 1, 0}, {&__pyx_n_s_module, __pyx_k_module, sizeof(__pyx_k_module), 0, 0, 1, 1}, {&__pyx_n_s_month, __pyx_k_month, sizeof(__pyx_k_month), 0, 0, 1, 1}, {&__pyx_n_s_months, __pyx_k_months, sizeof(__pyx_k_months), 0, 0, 1, 1}, {&__pyx_n_s_move, __pyx_k_move, sizeof(__pyx_k_move), 0, 0, 1, 1}, {&__pyx_n_s_mutated, __pyx_k_mutated, sizeof(__pyx_k_mutated), 0, 0, 1, 1}, {&__pyx_n_s_n, __pyx_k_n, sizeof(__pyx_k_n), 0, 0, 1, 1}, {&__pyx_n_s_na_count, __pyx_k_na_count, sizeof(__pyx_k_na_count), 0, 0, 1, 1}, {&__pyx_n_s_na_values, __pyx_k_na_values, sizeof(__pyx_k_na_values), 0, 0, 1, 1}, {&__pyx_n_s_name, __pyx_k_name, sizeof(__pyx_k_name), 0, 0, 1, 1}, {&__pyx_n_s_name_2, __pyx_k_name_2, sizeof(__pyx_k_name_2), 0, 0, 1, 1}, {&__pyx_n_s_names, __pyx_k_names, sizeof(__pyx_k_names), 0, 0, 1, 1}, {&__pyx_n_s_nan, __pyx_k_nan, sizeof(__pyx_k_nan), 0, 0, 1, 1}, {&__pyx_n_s_nan_rep, __pyx_k_nan_rep, sizeof(__pyx_k_nan_rep), 0, 0, 1, 1}, {&__pyx_n_s_ncols, __pyx_k_ncols, sizeof(__pyx_k_ncols), 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_ndarrays, __pyx_k_ndarrays, sizeof(__pyx_k_ndarrays), 0, 0, 1, 1}, {&__pyx_n_s_ndim, __pyx_k_ndim, sizeof(__pyx_k_ndim), 0, 0, 1, 1}, {&__pyx_n_s_ne, __pyx_k_ne, sizeof(__pyx_k_ne), 0, 0, 1, 1}, {&__pyx_n_s_neginf, __pyx_k_neginf, sizeof(__pyx_k_neginf), 0, 0, 1, 1}, {&__pyx_n_s_new_dtype, __pyx_k_new_dtype, sizeof(__pyx_k_new_dtype), 0, 0, 1, 1}, {&__pyx_n_s_ngroups, __pyx_k_ngroups, sizeof(__pyx_k_ngroups), 0, 0, 1, 1}, {&__pyx_n_s_nlevels, __pyx_k_nlevels, sizeof(__pyx_k_nlevels), 0, 0, 1, 1}, {&__pyx_n_s_now, __pyx_k_now, sizeof(__pyx_k_now), 0, 0, 1, 1}, {&__pyx_n_s_np, __pyx_k_np, sizeof(__pyx_k_np), 0, 0, 1, 1}, {&__pyx_n_s_ns, __pyx_k_ns, sizeof(__pyx_k_ns), 0, 0, 1, 1}, {&__pyx_n_s_numpy, __pyx_k_numpy, sizeof(__pyx_k_numpy), 0, 0, 1, 1}, {&__pyx_n_s_o, __pyx_k_o, sizeof(__pyx_k_o), 0, 0, 1, 1}, {&__pyx_n_s_obj, __pyx_k_obj, sizeof(__pyx_k_obj), 0, 0, 1, 1}, {&__pyx_n_s_objbuf, __pyx_k_objbuf, sizeof(__pyx_k_objbuf), 0, 0, 1, 1}, {&__pyx_n_s_object, __pyx_k_object, sizeof(__pyx_k_object), 0, 0, 1, 1}, {&__pyx_n_s_object_2, __pyx_k_object_2, sizeof(__pyx_k_object_2), 0, 0, 1, 1}, {&__pyx_n_s_objects, __pyx_k_objects, sizeof(__pyx_k_objects), 0, 0, 1, 1}, {&__pyx_n_s_onan, __pyx_k_onan, sizeof(__pyx_k_onan), 0, 0, 1, 1}, {&__pyx_n_s_op, __pyx_k_op, sizeof(__pyx_k_op), 0, 0, 1, 1}, {&__pyx_n_s_operator, __pyx_k_operator, sizeof(__pyx_k_operator), 0, 0, 1, 1}, {&__pyx_n_s_out, __pyx_k_out, sizeof(__pyx_k_out), 0, 0, 1, 1}, {&__pyx_n_s_output, __pyx_k_output, sizeof(__pyx_k_output), 0, 0, 1, 1}, {&__pyx_n_s_pandas, __pyx_k_pandas, sizeof(__pyx_k_pandas), 0, 0, 1, 1}, {&__pyx_n_s_pandas_lib, __pyx_k_pandas_lib, sizeof(__pyx_k_pandas_lib), 0, 0, 1, 1}, {&__pyx_n_s_pandas_null, __pyx_k_pandas_null, sizeof(__pyx_k_pandas_null), 0, 0, 1, 1}, {&__pyx_kp_s_pandas_src_inference_pyx, __pyx_k_pandas_src_inference_pyx, sizeof(__pyx_k_pandas_src_inference_pyx), 0, 0, 1, 0}, {&__pyx_kp_s_pandas_src_reduce_pyx, __pyx_k_pandas_src_reduce_pyx, sizeof(__pyx_k_pandas_src_reduce_pyx), 0, 0, 1, 0}, {&__pyx_n_s_pandas_tseries_period, __pyx_k_pandas_tseries_period, sizeof(__pyx_k_pandas_tseries_period), 0, 0, 1, 1}, {&__pyx_n_s_parse, __pyx_k_parse, sizeof(__pyx_k_parse), 0, 0, 1, 1}, {&__pyx_n_s_parse_date, __pyx_k_parse_date, sizeof(__pyx_k_parse_date), 0, 0, 1, 1}, {&__pyx_n_s_parse_time, __pyx_k_parse_time, sizeof(__pyx_k_parse_time), 0, 0, 1, 1}, {&__pyx_n_s_parser, __pyx_k_parser, sizeof(__pyx_k_parser), 0, 0, 1, 1}, {&__pyx_n_s_period, __pyx_k_period, sizeof(__pyx_k_period), 0, 0, 1, 1}, {&__pyx_n_s_piece, __pyx_k_piece, sizeof(__pyx_k_piece), 0, 0, 1, 1}, {&__pyx_n_s_pos, __pyx_k_pos, sizeof(__pyx_k_pos), 0, 0, 1, 1}, {&__pyx_n_s_pre, __pyx_k_pre, sizeof(__pyx_k_pre), 0, 0, 1, 1}, {&__pyx_n_s_prepare, __pyx_k_prepare, sizeof(__pyx_k_prepare), 0, 0, 1, 1}, {&__pyx_n_s_putmask, __pyx_k_putmask, sizeof(__pyx_k_putmask), 0, 0, 1, 1}, {&__pyx_n_s_pydate, __pyx_k_pydate, sizeof(__pyx_k_pydate), 0, 0, 1, 1}, {&__pyx_n_s_pydatetime, __pyx_k_pydatetime, sizeof(__pyx_k_pydatetime), 0, 0, 1, 1}, {&__pyx_n_s_pyx_getbuffer, __pyx_k_pyx_getbuffer, sizeof(__pyx_k_pyx_getbuffer), 0, 0, 1, 1}, {&__pyx_n_s_pyx_releasebuffer, __pyx_k_pyx_releasebuffer, sizeof(__pyx_k_pyx_releasebuffer), 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_qualname, __pyx_k_qualname, sizeof(__pyx_k_qualname), 0, 0, 1, 1}, {&__pyx_n_s_r_bin, __pyx_k_r_bin, sizeof(__pyx_k_r_bin), 0, 0, 1, 1}, {&__pyx_n_s_range, __pyx_k_range, sizeof(__pyx_k_range), 0, 0, 1, 1}, {&__pyx_n_s_ravel, __pyx_k_ravel, sizeof(__pyx_k_ravel), 0, 0, 1, 1}, {&__pyx_n_s_reduce, __pyx_k_reduce, sizeof(__pyx_k_reduce), 0, 0, 1, 1}, {&__pyx_n_s_reducer, __pyx_k_reducer, sizeof(__pyx_k_reducer), 0, 0, 1, 1}, {&__pyx_n_s_replace, __pyx_k_replace, sizeof(__pyx_k_replace), 0, 0, 1, 1}, {&__pyx_n_s_repr_timedelta64, __pyx_k_repr_timedelta64, sizeof(__pyx_k_repr_timedelta64), 0, 0, 1, 1}, {&__pyx_n_s_reset, __pyx_k_reset, sizeof(__pyx_k_reset), 0, 0, 1, 1}, {&__pyx_n_s_result, __pyx_k_result, sizeof(__pyx_k_result), 0, 0, 1, 1}, {&__pyx_n_s_results, __pyx_k_results, sizeof(__pyx_k_results), 0, 0, 1, 1}, {&__pyx_n_s_rev_indexer, __pyx_k_rev_indexer, sizeof(__pyx_k_rev_indexer), 0, 0, 1, 1}, {&__pyx_n_s_right, __pyx_k_right, sizeof(__pyx_k_right), 0, 0, 1, 1}, {&__pyx_n_s_right_closed, __pyx_k_right_closed, sizeof(__pyx_k_right_closed), 0, 0, 1, 1}, {&__pyx_n_s_row, __pyx_k_row, sizeof(__pyx_k_row), 0, 0, 1, 1}, {&__pyx_n_s_row_bool_subset, __pyx_k_row_bool_subset, sizeof(__pyx_k_row_bool_subset), 0, 0, 1, 1}, {&__pyx_n_s_row_bool_subset_object, __pyx_k_row_bool_subset_object, sizeof(__pyx_k_row_bool_subset_object), 0, 0, 1, 1}, {&__pyx_n_s_rows, __pyx_k_rows, sizeof(__pyx_k_rows), 0, 0, 1, 1}, {&__pyx_n_s_s, __pyx_k_s, sizeof(__pyx_k_s), 0, 0, 1, 1}, {&__pyx_n_s_safe, __pyx_k_safe, sizeof(__pyx_k_safe), 0, 0, 1, 1}, {&__pyx_n_s_sanitize_objects, __pyx_k_sanitize_objects, sizeof(__pyx_k_sanitize_objects), 0, 0, 1, 1}, {&__pyx_n_s_scalar_binop, __pyx_k_scalar_binop, sizeof(__pyx_k_scalar_binop), 0, 0, 1, 1}, {&__pyx_n_s_scalar_compare, __pyx_k_scalar_compare, sizeof(__pyx_k_scalar_compare), 0, 0, 1, 1}, {&__pyx_n_s_second, __pyx_k_second, sizeof(__pyx_k_second), 0, 0, 1, 1}, {&__pyx_n_s_seconds, __pyx_k_seconds, sizeof(__pyx_k_seconds), 0, 0, 1, 1}, {&__pyx_n_s_secs, __pyx_k_secs, sizeof(__pyx_k_secs), 0, 0, 1, 1}, {&__pyx_n_s_seen, __pyx_k_seen, sizeof(__pyx_k_seen), 0, 0, 1, 1}, {&__pyx_n_s_seen_bool, __pyx_k_seen_bool, sizeof(__pyx_k_seen_bool), 0, 0, 1, 1}, {&__pyx_n_s_seen_complex, __pyx_k_seen_complex, sizeof(__pyx_k_seen_complex), 0, 0, 1, 1}, {&__pyx_n_s_seen_datetime, __pyx_k_seen_datetime, sizeof(__pyx_k_seen_datetime), 0, 0, 1, 1}, {&__pyx_n_s_seen_float, __pyx_k_seen_float, sizeof(__pyx_k_seen_float), 0, 0, 1, 1}, {&__pyx_n_s_seen_int, __pyx_k_seen_int, sizeof(__pyx_k_seen_int), 0, 0, 1, 1}, {&__pyx_n_s_seen_null, __pyx_k_seen_null, sizeof(__pyx_k_seen_null), 0, 0, 1, 1}, {&__pyx_n_s_seen_numeric, __pyx_k_seen_numeric, sizeof(__pyx_k_seen_numeric), 0, 0, 1, 1}, {&__pyx_n_s_seen_object, __pyx_k_seen_object, sizeof(__pyx_k_seen_object), 0, 0, 1, 1}, {&__pyx_n_s_seen_timedelta, __pyx_k_seen_timedelta, sizeof(__pyx_k_seen_timedelta), 0, 0, 1, 1}, {&__pyx_n_s_series, __pyx_k_series, sizeof(__pyx_k_series), 0, 0, 1, 1}, {&__pyx_n_s_set_axis, __pyx_k_set_axis, sizeof(__pyx_k_set_axis), 0, 0, 1, 1}, {&__pyx_n_s_set_length, __pyx_k_set_length, sizeof(__pyx_k_set_length), 0, 0, 1, 1}, {&__pyx_n_s_setattr, __pyx_k_setattr, sizeof(__pyx_k_setattr), 0, 0, 1, 1}, {&__pyx_n_s_shape, __pyx_k_shape, sizeof(__pyx_k_shape), 0, 0, 1, 1}, {&__pyx_n_s_shape_before, __pyx_k_shape_before, sizeof(__pyx_k_shape_before), 0, 0, 1, 1}, {&__pyx_n_s_size, __pyx_k_size, sizeof(__pyx_k_size), 0, 0, 1, 1}, {&__pyx_n_s_slider, __pyx_k_slider, sizeof(__pyx_k_slider), 0, 0, 1, 1}, {&__pyx_n_s_slobj, __pyx_k_slobj, sizeof(__pyx_k_slobj), 0, 0, 1, 1}, {&__pyx_n_s_sorted_labels, __pyx_k_sorted_labels, sizeof(__pyx_k_sorted_labels), 0, 0, 1, 1}, {&__pyx_n_s_start, __pyx_k_start, sizeof(__pyx_k_start), 0, 0, 1, 1}, {&__pyx_n_s_started, __pyx_k_started, sizeof(__pyx_k_started), 0, 0, 1, 1}, {&__pyx_n_s_starts, __pyx_k_starts, sizeof(__pyx_k_starts), 0, 0, 1, 1}, {&__pyx_n_s_status, __pyx_k_status, sizeof(__pyx_k_status), 0, 0, 1, 1}, {&__pyx_n_s_strides, __pyx_k_strides, sizeof(__pyx_k_strides), 0, 0, 1, 1}, {&__pyx_n_s_string, __pyx_k_string, sizeof(__pyx_k_string), 0, 0, 1, 1}, {&__pyx_n_s_string_2, __pyx_k_string_2, sizeof(__pyx_k_string_2), 0, 0, 1, 1}, {&__pyx_n_s_string_array_replace_from_nan_re, __pyx_k_string_array_replace_from_nan_re, sizeof(__pyx_k_string_array_replace_from_nan_re), 0, 0, 1, 1}, {&__pyx_n_s_strptime, __pyx_k_strptime, sizeof(__pyx_k_strptime), 0, 0, 1, 1}, {&__pyx_n_s_stub, __pyx_k_stub, sizeof(__pyx_k_stub), 0, 0, 1, 1}, {&__pyx_n_s_sum, __pyx_k_sum, sizeof(__pyx_k_sum), 0, 0, 1, 1}, {&__pyx_n_s_t, __pyx_k_t, sizeof(__pyx_k_t), 0, 0, 1, 1}, {&__pyx_n_s_table, __pyx_k_table, sizeof(__pyx_k_table), 0, 0, 1, 1}, {&__pyx_n_s_take_last, __pyx_k_take_last, sizeof(__pyx_k_take_last), 0, 0, 1, 1}, {&__pyx_n_s_test, __pyx_k_test, sizeof(__pyx_k_test), 0, 0, 1, 1}, {&__pyx_n_s_time, __pyx_k_time, sizeof(__pyx_k_time), 0, 0, 1, 1}, {&__pyx_n_s_time64_to_datetime, __pyx_k_time64_to_datetime, sizeof(__pyx_k_time64_to_datetime), 0, 0, 1, 1}, {&__pyx_n_s_time_parser, __pyx_k_time_parser, sizeof(__pyx_k_time_parser), 0, 0, 1, 1}, {&__pyx_n_s_timedelta, __pyx_k_timedelta, sizeof(__pyx_k_timedelta), 0, 0, 1, 1}, {&__pyx_n_s_timedelta64, __pyx_k_timedelta64, sizeof(__pyx_k_timedelta64), 0, 0, 1, 1}, {&__pyx_n_s_timedeltas, __pyx_k_timedeltas, sizeof(__pyx_k_timedeltas), 0, 0, 1, 1}, {&__pyx_n_s_times, __pyx_k_times, sizeof(__pyx_k_times), 0, 0, 1, 1}, {&__pyx_n_s_tmp, __pyx_k_tmp, sizeof(__pyx_k_tmp), 0, 0, 1, 1}, {&__pyx_n_s_to_object_array, __pyx_k_to_object_array, sizeof(__pyx_k_to_object_array), 0, 0, 1, 1}, {&__pyx_n_s_to_object_array_tuples, __pyx_k_to_object_array_tuples, sizeof(__pyx_k_to_object_array_tuples), 0, 0, 1, 1}, {&__pyx_n_s_toordinal, __pyx_k_toordinal, sizeof(__pyx_k_toordinal), 0, 0, 1, 1}, {&__pyx_n_s_true, __pyx_k_true, sizeof(__pyx_k_true), 0, 0, 1, 1}, {&__pyx_n_s_true_vals, __pyx_k_true_vals, sizeof(__pyx_k_true_vals), 0, 0, 1, 1}, {&__pyx_n_s_true_values, __pyx_k_true_values, sizeof(__pyx_k_true_values), 0, 0, 1, 1}, {&__pyx_n_s_try_float, __pyx_k_try_float, sizeof(__pyx_k_try_float), 0, 0, 1, 1}, {&__pyx_n_s_try_parse_date_and_time, __pyx_k_try_parse_date_and_time, sizeof(__pyx_k_try_parse_date_and_time), 0, 0, 1, 1}, {&__pyx_n_s_try_parse_date_and_time_locals_l, __pyx_k_try_parse_date_and_time_locals_l, sizeof(__pyx_k_try_parse_date_and_time_locals_l), 0, 0, 1, 1}, {&__pyx_n_s_try_parse_date_and_time_locals_p, __pyx_k_try_parse_date_and_time_locals_p, sizeof(__pyx_k_try_parse_date_and_time_locals_p), 0, 0, 1, 1}, {&__pyx_n_s_try_parse_date_and_time_locals_p_2, __pyx_k_try_parse_date_and_time_locals_p_2, sizeof(__pyx_k_try_parse_date_and_time_locals_p_2), 0, 0, 1, 1}, {&__pyx_n_s_try_parse_dates, __pyx_k_try_parse_dates, sizeof(__pyx_k_try_parse_dates), 0, 0, 1, 1}, {&__pyx_n_s_try_parse_dates_locals_lambda, __pyx_k_try_parse_dates_locals_lambda, sizeof(__pyx_k_try_parse_dates_locals_lambda), 0, 0, 1, 1}, {&__pyx_n_s_try_parse_dates_locals_parse_dat, __pyx_k_try_parse_dates_locals_parse_dat, sizeof(__pyx_k_try_parse_dates_locals_parse_dat), 0, 0, 1, 1}, {&__pyx_n_s_try_parse_datetime_components, __pyx_k_try_parse_datetime_components, sizeof(__pyx_k_try_parse_datetime_components), 0, 0, 1, 1}, {&__pyx_n_s_try_parse_year_month_day, __pyx_k_try_parse_year_month_day, sizeof(__pyx_k_try_parse_year_month_day), 0, 0, 1, 1}, {&__pyx_n_s_tslib, __pyx_k_tslib, sizeof(__pyx_k_tslib), 0, 0, 1, 1}, {&__pyx_n_s_tup, __pyx_k_tup, sizeof(__pyx_k_tup), 0, 0, 1, 1}, {&__pyx_n_s_tuples, __pyx_k_tuples, sizeof(__pyx_k_tuples), 0, 0, 1, 1}, {&__pyx_n_s_tuples_to_object_array, __pyx_k_tuples_to_object_array, sizeof(__pyx_k_tuples_to_object_array), 0, 0, 1, 1}, {&__pyx_n_s_type, __pyx_k_type, sizeof(__pyx_k_type), 0, 0, 1, 1}, {&__pyx_n_s_uint16, __pyx_k_uint16, sizeof(__pyx_k_uint16), 0, 0, 1, 1}, {&__pyx_n_s_uint32, __pyx_k_uint32, sizeof(__pyx_k_uint32), 0, 0, 1, 1}, {&__pyx_n_s_uint64, __pyx_k_uint64, sizeof(__pyx_k_uint64), 0, 0, 1, 1}, {&__pyx_n_s_uint8, __pyx_k_uint8, sizeof(__pyx_k_uint8), 0, 0, 1, 1}, {&__pyx_n_s_unicode, __pyx_k_unicode, sizeof(__pyx_k_unicode), 0, 0, 1, 1}, {&__pyx_n_s_unicode_2, __pyx_k_unicode_2, sizeof(__pyx_k_unicode_2), 0, 0, 1, 1}, {&__pyx_n_s_uniques, __pyx_k_uniques, sizeof(__pyx_k_uniques), 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_utcfromtimestamp, __pyx_k_utcfromtimestamp, sizeof(__pyx_k_utcfromtimestamp), 0, 0, 1, 1}, {&__pyx_n_s_v, __pyx_k_v, sizeof(__pyx_k_v), 0, 0, 1, 1}, {&__pyx_n_s_val, __pyx_k_val, sizeof(__pyx_k_val), 0, 0, 1, 1}, {&__pyx_n_s_val_kind, __pyx_k_val_kind, sizeof(__pyx_k_val_kind), 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_values_2, __pyx_k_values_2, sizeof(__pyx_k_values_2), 0, 0, 1, 1}, {&__pyx_n_s_vc, __pyx_k_vc, sizeof(__pyx_k_vc), 0, 0, 1, 1}, {&__pyx_n_s_vec_binop, __pyx_k_vec_binop, sizeof(__pyx_k_vec_binop), 0, 0, 1, 1}, {&__pyx_n_s_vec_compare, __pyx_k_vec_compare, sizeof(__pyx_k_vec_compare), 0, 0, 1, 1}, {&__pyx_n_s_vecs, __pyx_k_vecs, sizeof(__pyx_k_vecs), 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_write_csv_rows, __pyx_k_write_csv_rows, sizeof(__pyx_k_write_csv_rows), 0, 0, 1, 1}, {&__pyx_n_s_writer, __pyx_k_writer, sizeof(__pyx_k_writer), 0, 0, 1, 1}, {&__pyx_n_s_writerows, __pyx_k_writerows, sizeof(__pyx_k_writerows), 0, 0, 1, 1}, {&__pyx_n_s_x, __pyx_k_x, sizeof(__pyx_k_x), 0, 0, 1, 1}, {&__pyx_n_s_y, __pyx_k_y, sizeof(__pyx_k_y), 0, 0, 1, 1}, {&__pyx_n_s_year, __pyx_k_year, sizeof(__pyx_k_year), 0, 0, 1, 1}, {&__pyx_n_s_years, __pyx_k_years, sizeof(__pyx_k_years), 0, 0, 1, 1}, {&__pyx_n_s_zeros, __pyx_k_zeros, sizeof(__pyx_k_zeros), 0, 0, 1, 1}, {0, 0, 0, 0, 0, 0, 0} }; static int __Pyx_InitCachedBuiltins(void) { __pyx_builtin_Exception = __Pyx_GetBuiltinName(__pyx_n_s_Exception); if (!__pyx_builtin_Exception) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 471; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_builtin_AttributeError = __Pyx_GetBuiltinName(__pyx_n_s_AttributeError); if (!__pyx_builtin_AttributeError) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 30; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_range) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 105; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_builtin_object = __Pyx_GetBuiltinName(__pyx_n_s_object); if (!__pyx_builtin_object) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_builtin_ValueError = __Pyx_GetBuiltinName(__pyx_n_s_ValueError); if (!__pyx_builtin_ValueError) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 451; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_builtin_TypeError = __Pyx_GetBuiltinName(__pyx_n_s_TypeError); if (!__pyx_builtin_TypeError) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 706; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_builtin_enumerate = __Pyx_GetBuiltinName(__pyx_n_s_enumerate); if (!__pyx_builtin_enumerate) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 556; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_builtin_OverflowError = __Pyx_GetBuiltinName(__pyx_n_s_OverflowError); if (!__pyx_builtin_OverflowError) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 538; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_builtin_ImportError = __Pyx_GetBuiltinName(__pyx_n_s_ImportError); if (!__pyx_builtin_ImportError) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 646; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_builtin_RuntimeError = __Pyx_GetBuiltinName(__pyx_n_s_RuntimeError); if (!__pyx_builtin_RuntimeError) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 803; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_builtin_IndexError = __Pyx_GetBuiltinName(__pyx_n_s_IndexError); if (!__pyx_builtin_IndexError) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 40; __pyx_clineno = __LINE__; goto __pyx_L1_error;} return 0; __pyx_L1_error:; return -1; } static int __Pyx_InitCachedConstants(void) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0); /* "pandas/lib.pyx":165 * * cdef inline int64_t get_timedelta64_value(val): * return val.view('i8') # <<<<<<<<<<<<<< * * #---------------------------------------------------------------------- */ __pyx_tuple_ = PyTuple_Pack(1, __pyx_n_s_i8); if (unlikely(!__pyx_tuple_)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 165; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple_); __Pyx_GIVEREF(__pyx_tuple_); /* "pandas/lib.pyx":451 * it = PyArray_IterNew(arr) * if len(arr) != n: * raise ValueError('all arrays must be same length') # <<<<<<<<<<<<<< * * for i in range(n): */ __pyx_tuple__2 = PyTuple_Pack(1, __pyx_kp_s_all_arrays_must_be_same_length); if (unlikely(!__pyx_tuple__2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 451; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__2); __Pyx_GIVEREF(__pyx_tuple__2); /* "pandas/lib.pyx":468 * * rev_indexer = np.empty(length, dtype=np.int64) * rev_indexer.fill(-1) # <<<<<<<<<<<<<< * for i in range(n): * idx = indexer[i] */ __pyx_tuple__3 = PyTuple_Pack(1, __pyx_int_neg_1); if (unlikely(!__pyx_tuple__3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 468; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__3); __Pyx_GIVEREF(__pyx_tuple__3); /* "pandas/lib.pyx":563 * * if not started: * return slice(0, 0) # <<<<<<<<<<<<<< * if not finished: * return slice(start, None) */ __pyx_tuple__4 = PyTuple_Pack(2, __pyx_int_0, __pyx_int_0); if (unlikely(!__pyx_tuple__4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 563; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__4); __Pyx_GIVEREF(__pyx_tuple__4); /* "pandas/lib.pyx":593 * flag = cpython.Py_NE * else: * raise ValueError('Unrecognized operator') # <<<<<<<<<<<<<< * * result = np.empty(n, dtype=bool).view(np.uint8) */ __pyx_tuple__5 = PyTuple_Pack(1, __pyx_kp_s_Unrecognized_operator); if (unlikely(!__pyx_tuple__5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 593; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__5); __Pyx_GIVEREF(__pyx_tuple__5); /* "pandas/lib.pyx":640 * flag = cpython.Py_NE * else: * raise ValueError('Unrecognized operator') # <<<<<<<<<<<<<< * * result = np.empty(n, dtype=bool).view(np.uint8) */ __pyx_tuple__6 = PyTuple_Pack(1, __pyx_kp_s_Unrecognized_operator); if (unlikely(!__pyx_tuple__6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 640; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__6); __Pyx_GIVEREF(__pyx_tuple__6); /* "pandas/lib.pyx":928 * * if lenidx <= 0 or lenbin <= 0: * raise ValueError("Invalid length for values or for binner") # <<<<<<<<<<<<<< * * # check binner fits data */ __pyx_tuple__7 = PyTuple_Pack(1, __pyx_kp_s_Invalid_length_for_values_or_for); if (unlikely(!__pyx_tuple__7)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 928; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__7); __Pyx_GIVEREF(__pyx_tuple__7); /* "pandas/lib.pyx":932 * # check binner fits data * if values[0] < binner[0]: * raise ValueError("Values falls before first bin") # <<<<<<<<<<<<<< * * if values[lenidx-1] > binner[lenbin-1]: */ __pyx_tuple__8 = PyTuple_Pack(1, __pyx_kp_s_Values_falls_before_first_bin); if (unlikely(!__pyx_tuple__8)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 932; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__8); __Pyx_GIVEREF(__pyx_tuple__8); /* "pandas/lib.pyx":935 * * if values[lenidx-1] > binner[lenbin-1]: * raise ValueError("Values falls after last bin") # <<<<<<<<<<<<<< * * bins = np.empty(lenbin - 1, dtype=np.int64) */ __pyx_tuple__9 = PyTuple_Pack(1, __pyx_kp_s_Values_falls_after_last_bin); if (unlikely(!__pyx_tuple__9)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 935; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__9); __Pyx_GIVEREF(__pyx_tuple__9); /* "pandas/lib.pyx":1105 * it = PyArray_IterNew(arr) * if len(arr) != n: * raise ValueError('all arrays must be same length') # <<<<<<<<<<<<<< * * for i in range(n): */ __pyx_tuple__11 = PyTuple_Pack(1, __pyx_kp_s_all_arrays_must_be_same_length); if (unlikely(!__pyx_tuple__11)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1105; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__11); __Pyx_GIVEREF(__pyx_tuple__11); /* "pandas/src/reduce.pyx":24 * if axis == 0: * if not arr.flags.f_contiguous: * arr = arr.copy('F') # <<<<<<<<<<<<<< * * self.nresults = k */ __pyx_tuple__12 = PyTuple_Pack(1, __pyx_n_s_F); if (unlikely(!__pyx_tuple__12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 24; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__12); __Pyx_GIVEREF(__pyx_tuple__12); /* "pandas/src/reduce.pyx":31 * else: * if not arr.flags.c_contiguous: * arr = arr.copy('C') # <<<<<<<<<<<<<< * * self.nresults = n */ __pyx_tuple__13 = PyTuple_Pack(1, __pyx_n_s_C); if (unlikely(!__pyx_tuple__13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 31; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__13); __Pyx_GIVEREF(__pyx_tuple__13); /* "pandas/src/reduce.pyx":59 * else: * if dummy.dtype != self.arr.dtype: * raise ValueError('Dummy array must be same dtype') # <<<<<<<<<<<<<< * if len(dummy) != self.chunksize: * raise ValueError('Dummy array must be length %d' % */ __pyx_tuple__14 = PyTuple_Pack(1, __pyx_kp_s_Dummy_array_must_be_same_dtype); if (unlikely(!__pyx_tuple__14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 59; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__14); __Pyx_GIVEREF(__pyx_tuple__14); /* "pandas/src/reduce.pyx":153 * result[0] = res * except Exception: * raise ValueError('function does not reduce') # <<<<<<<<<<<<<< * return result * */ __pyx_tuple__15 = PyTuple_Pack(1, __pyx_kp_s_function_does_not_reduce); if (unlikely(!__pyx_tuple__15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 153; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__15); __Pyx_GIVEREF(__pyx_tuple__15); /* "pandas/src/reduce.pyx":176 * values = series.values * if not values.flags.c_contiguous: * values = values.copy('C') # <<<<<<<<<<<<<< * self.arr = values * self.index = series.index */ __pyx_tuple__16 = PyTuple_Pack(1, __pyx_n_s_C); if (unlikely(!__pyx_tuple__16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 176; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__16); __Pyx_GIVEREF(__pyx_tuple__16); /* "pandas/src/reduce.pyx":193 * def _check_dummy(self, dummy=None): * if dummy is None: * values = np.empty(0, dtype=self.arr.dtype) # <<<<<<<<<<<<<< * index = None * else: */ __pyx_tuple__17 = PyTuple_Pack(1, __pyx_int_0); if (unlikely(!__pyx_tuple__17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 193; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__17); __Pyx_GIVEREF(__pyx_tuple__17); /* "pandas/src/reduce.pyx":197 * else: * if dummy.dtype != self.arr.dtype: * raise ValueError('Dummy array must be same dtype') # <<<<<<<<<<<<<< * values = dummy.values * if not values.flags.contiguous: */ __pyx_tuple__18 = PyTuple_Pack(1, __pyx_kp_s_Dummy_array_must_be_same_dtype); if (unlikely(!__pyx_tuple__18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 197; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__18); __Pyx_GIVEREF(__pyx_tuple__18); /* "pandas/src/reduce.pyx":281 * result = np.empty(self.ngroups, dtype='O') * except Exception: * raise ValueError('function does not reduce') # <<<<<<<<<<<<<< * return result * */ __pyx_tuple__19 = PyTuple_Pack(1, __pyx_kp_s_function_does_not_reduce); if (unlikely(!__pyx_tuple__19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 281; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__19); __Pyx_GIVEREF(__pyx_tuple__19); /* "pandas/src/reduce.pyx":306 * values = series.values * if not values.flags.c_contiguous: * values = values.copy('C') # <<<<<<<<<<<<<< * self.arr = values * self.index = series.index */ __pyx_tuple__20 = PyTuple_Pack(1, __pyx_n_s_C); if (unlikely(!__pyx_tuple__20)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 306; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__20); __Pyx_GIVEREF(__pyx_tuple__20); /* "pandas/src/reduce.pyx":318 * def _check_dummy(self, dummy=None): * if dummy is None: * values = np.empty(0, dtype=self.arr.dtype) # <<<<<<<<<<<<<< * index = None * else: */ __pyx_tuple__21 = PyTuple_Pack(1, __pyx_int_0); if (unlikely(!__pyx_tuple__21)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 318; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__21); __Pyx_GIVEREF(__pyx_tuple__21); /* "pandas/src/reduce.pyx":322 * else: * if dummy.dtype != self.arr.dtype: * raise ValueError('Dummy array must be same dtype') # <<<<<<<<<<<<<< * values = dummy.values * if not values.flags.contiguous: */ __pyx_tuple__22 = PyTuple_Pack(1, __pyx_kp_s_Dummy_array_must_be_same_dtype); if (unlikely(!__pyx_tuple__22)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 322; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__22); __Pyx_GIVEREF(__pyx_tuple__22); /* "pandas/src/reduce.pyx":410 * result = np.empty(self.ngroups, dtype='O') * except Exception: * raise ValueError('function does not reduce') # <<<<<<<<<<<<<< * return result * */ __pyx_tuple__23 = PyTuple_Pack(1, __pyx_kp_s_function_does_not_reduce); if (unlikely(!__pyx_tuple__23)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 410; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__23); __Pyx_GIVEREF(__pyx_tuple__23); /* "pandas/src/reduce.pyx":484 * * if frame.index._has_complex_internals: * raise InvalidApply('Cannot modify frame index internals') # <<<<<<<<<<<<<< * * */ __pyx_tuple__24 = PyTuple_Pack(1, __pyx_kp_s_Cannot_modify_frame_index_intern); if (unlikely(!__pyx_tuple__24)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 484; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__24); __Pyx_GIVEREF(__pyx_tuple__24); /* "pandas/src/reduce.pyx":496 * result = f(chunk) * if result is chunk: * raise InvalidApply('Function unsafe for fast apply') # <<<<<<<<<<<<<< * except: * raise InvalidApply('Let this error raise above us') */ __pyx_tuple__25 = PyTuple_Pack(1, __pyx_kp_s_Function_unsafe_for_fast_apply); if (unlikely(!__pyx_tuple__25)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 496; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__25); __Pyx_GIVEREF(__pyx_tuple__25); /* "pandas/src/reduce.pyx":498 * raise InvalidApply('Function unsafe for fast apply') * except: * raise InvalidApply('Let this error raise above us') # <<<<<<<<<<<<<< * * slider = BlockSlider(frame) */ __pyx_tuple__26 = PyTuple_Pack(1, __pyx_kp_s_Let_this_error_raise_above_us); if (unlikely(!__pyx_tuple__26)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 498; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__26); __Pyx_GIVEREF(__pyx_tuple__26); /* "pandas/src/reduce.pyx":545 * def __init__(self, frame): * self.frame = frame * self.dummy = frame[:0] # <<<<<<<<<<<<<< * * self.blocks = [b.values for b in self.dummy._data.blocks] */ __pyx_slice__27 = PySlice_New(Py_None, __pyx_int_0, Py_None); if (unlikely(!__pyx_slice__27)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 545; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_slice__27); __Pyx_GIVEREF(__pyx_slice__27); /* "pandas/src/reduce.pyx":593 * def reduce(arr, f, axis=0, dummy=None, labels=None): * if labels._has_complex_internals: * raise Exception('Cannot use shortcut') # <<<<<<<<<<<<<< * * reducer = Reducer(arr, f, axis=axis, dummy=dummy, labels=labels) */ __pyx_tuple__28 = PyTuple_Pack(1, __pyx_kp_s_Cannot_use_shortcut); if (unlikely(!__pyx_tuple__28)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 593; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__28); __Pyx_GIVEREF(__pyx_tuple__28); /* "pandas/src/inference.pyx":53 * * if values.dtype != np.object_: * values = values.astype('O') # <<<<<<<<<<<<<< * * n = len(values) */ __pyx_tuple__29 = PyTuple_Pack(1, __pyx_n_s_O); if (unlikely(!__pyx_tuple__29)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 53; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__29); __Pyx_GIVEREF(__pyx_tuple__29); /* "pandas/src/inference.pyx":426 * seen_float = 1 * else: * raise ValueError('Empty string encountered') # <<<<<<<<<<<<<< * elif util.is_complex_object(val): * complexes[i] = val */ __pyx_tuple__30 = PyTuple_Pack(1, __pyx_kp_s_Empty_string_encountered); if (unlikely(!__pyx_tuple__30)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 426; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__30); __Pyx_GIVEREF(__pyx_tuple__30); /* "pandas/src/inference.pyx":647 * parse_date = lambda x: parse(x, dayfirst=dayfirst,default=default) * except ImportError: # pragma: no cover * def parse_date(s): # <<<<<<<<<<<<<< * try: * return datetime.strptime(s, '%m/%d/%Y') */ __pyx_tuple__32 = PyTuple_Pack(1, __pyx_n_s_s); if (unlikely(!__pyx_tuple__32)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 647; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__32); __Pyx_GIVEREF(__pyx_tuple__32); __pyx_codeobj__33 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__32, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pandas_src_inference_pyx, __pyx_n_s_parse_date, 647, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__33)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 647; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/inference.pyx":688 * n = len(dates) * if len(times) != n: * raise ValueError('Length of dates and times must be equal') # <<<<<<<<<<<<<< * result = np.empty(n, dtype='O') * */ __pyx_tuple__35 = PyTuple_Pack(1, __pyx_kp_s_Length_of_dates_and_times_must_b); if (unlikely(!__pyx_tuple__35)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 688; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__35); __Pyx_GIVEREF(__pyx_tuple__35); /* "pandas/src/inference.pyx":700 * parse_date = lambda x: parse(x, dayfirst=dayfirst, default=default) * except ImportError: # pragma: no cover * def parse_date(s): # <<<<<<<<<<<<<< * try: * return date.strptime(s, '%m/%d/%Y') */ __pyx_tuple__36 = PyTuple_Pack(1, __pyx_n_s_s); if (unlikely(!__pyx_tuple__36)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 700; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__36); __Pyx_GIVEREF(__pyx_tuple__36); __pyx_codeobj__37 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__36, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pandas_src_inference_pyx, __pyx_n_s_parse_date, 700, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__37)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 700; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/inference.pyx":713 * parse_time = lambda x: parse(x) * except ImportError: # pragma: no cover * def parse_time(s): # <<<<<<<<<<<<<< * try: * return time.strptime(s, '%H:%M:%S') */ __pyx_tuple__38 = PyTuple_Pack(1, __pyx_n_s_s); if (unlikely(!__pyx_tuple__38)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 713; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__38); __Pyx_GIVEREF(__pyx_tuple__38); __pyx_codeobj__39 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__38, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pandas_src_inference_pyx, __pyx_n_s_parse_time, 713, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__39)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 713; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/inference.pyx":741 * n = len(years) * if len(months) != n or len(days) != n: * raise ValueError('Length of years/months/days must all be equal') # <<<<<<<<<<<<<< * result = np.empty(n, dtype='O') * */ __pyx_tuple__40 = PyTuple_Pack(1, __pyx_kp_s_Length_of_years_months_days_must); if (unlikely(!__pyx_tuple__40)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 741; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__40); __Pyx_GIVEREF(__pyx_tuple__40); /* "pandas/src/inference.pyx":768 * if (len(months) != n or len(days) != n or len(hours) != n or * len(minutes) != n or len(seconds) != n): * raise ValueError('Length of all datetime components must be equal') # <<<<<<<<<<<<<< * result = np.empty(n, dtype='O') * */ __pyx_tuple__41 = PyTuple_Pack(1, __pyx_kp_s_Length_of_all_datetime_component); if (unlikely(!__pyx_tuple__41)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 768; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__41); __Pyx_GIVEREF(__pyx_tuple__41); /* "pandas/src/inference.pyx":1017 * if n == 0: * # kludge, for Series * return np.empty(0, dtype='f8') # <<<<<<<<<<<<<< * * for i in range(n): */ __pyx_tuple__43 = PyTuple_Pack(1, __pyx_int_0); if (unlikely(!__pyx_tuple__43)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1017; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__43); __Pyx_GIVEREF(__pyx_tuple__43); /* "numpy.pxd":217 * 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__44 = PyTuple_Pack(1, __pyx_kp_u_ndarray_is_not_C_contiguous); if (unlikely(!__pyx_tuple__44)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 217; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__44); __Pyx_GIVEREF(__pyx_tuple__44); /* "numpy.pxd":221 * 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__45 = PyTuple_Pack(1, __pyx_kp_u_ndarray_is_not_Fortran_contiguou); if (unlikely(!__pyx_tuple__45)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 221; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__45); __Pyx_GIVEREF(__pyx_tuple__45); /* "numpy.pxd":259 * if ((descr.byteorder == '>' and little_endian) or * (descr.byteorder == '<' 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__46 = PyTuple_Pack(1, __pyx_kp_u_Non_native_byte_order_not_suppor); if (unlikely(!__pyx_tuple__46)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 259; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__46); __Pyx_GIVEREF(__pyx_tuple__46); /* "numpy.pxd":803 * * if (end - f) - (new_offset - offset[0]) < 15: * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") # <<<<<<<<<<<<<< * * if ((child.byteorder == '>' and little_endian) or */ __pyx_tuple__47 = PyTuple_Pack(1, __pyx_kp_u_Format_string_allocated_too_shor); if (unlikely(!__pyx_tuple__47)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 803; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__47); __Pyx_GIVEREF(__pyx_tuple__47); /* "numpy.pxd":807 * if ((child.byteorder == '>' and little_endian) or * (child.byteorder == '<' 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__48 = PyTuple_Pack(1, __pyx_kp_u_Non_native_byte_order_not_suppor); if (unlikely(!__pyx_tuple__48)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 807; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__48); __Pyx_GIVEREF(__pyx_tuple__48); /* "numpy.pxd":827 * 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__49 = PyTuple_Pack(1, __pyx_kp_u_Format_string_allocated_too_shor_2); if (unlikely(!__pyx_tuple__49)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 827; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__49); __Pyx_GIVEREF(__pyx_tuple__49); /* "util.pxd":40 * i += sz * elif i >= sz or sz == 0: * raise IndexError('index out of bounds') # <<<<<<<<<<<<<< * * return get_value_1d(arr, i) */ __pyx_tuple__50 = PyTuple_Pack(1, __pyx_kp_s_index_out_of_bounds); if (unlikely(!__pyx_tuple__50)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 40; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__50); __Pyx_GIVEREF(__pyx_tuple__50); /* "util.pxd":57 * i += sz * elif i >= sz: * raise IndexError('index out of bounds') # <<<<<<<<<<<<<< * * assign_value_1d(arr, i, value) */ __pyx_tuple__51 = PyTuple_Pack(1, __pyx_kp_s_index_out_of_bounds); if (unlikely(!__pyx_tuple__51)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 57; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__51); __Pyx_GIVEREF(__pyx_tuple__51); /* "pandas/lib.pyx":85 * from libc.stdlib cimport malloc, free * * def ismember(ndarray arr, set values): # <<<<<<<<<<<<<< * ''' * Checks whether */ __pyx_tuple__52 = PyTuple_Pack(6, __pyx_n_s_arr, __pyx_n_s_values, __pyx_n_s_i, __pyx_n_s_n, __pyx_n_s_result, __pyx_n_s_val); if (unlikely(!__pyx_tuple__52)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__52); __Pyx_GIVEREF(__pyx_tuple__52); __pyx_codeobj__53 = (PyObject*)__Pyx_PyCode_New(2, 0, 6, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__52, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_yoh_deb_gits_pkg_exppsy_pa, __pyx_n_s_ismember, 85, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__53)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/lib.pyx":140 * return gmtime(dt) * * def array_to_timestamp(ndarray[object, ndim=1] arr): # <<<<<<<<<<<<<< * cdef int i, n * cdef ndarray[int64_t, ndim=1] result */ __pyx_tuple__54 = PyTuple_Pack(4, __pyx_n_s_arr, __pyx_n_s_i, __pyx_n_s_n, __pyx_n_s_result); if (unlikely(!__pyx_tuple__54)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 140; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__54); __Pyx_GIVEREF(__pyx_tuple__54); __pyx_codeobj__55 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__54, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_yoh_deb_gits_pkg_exppsy_pa, __pyx_n_s_array_to_timestamp, 140, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__55)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 140; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/lib.pyx":152 * return result * * def time64_to_datetime(ndarray[int64_t, ndim=1] arr): # <<<<<<<<<<<<<< * cdef int i, n * cdef ndarray[object, ndim=1] result */ __pyx_tuple__56 = PyTuple_Pack(4, __pyx_n_s_arr, __pyx_n_s_i, __pyx_n_s_n, __pyx_n_s_result); if (unlikely(!__pyx_tuple__56)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 152; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__56); __Pyx_GIVEREF(__pyx_tuple__56); __pyx_codeobj__57 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__56, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_yoh_deb_gits_pkg_exppsy_pa, __pyx_n_s_time64_to_datetime, 152, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__57)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 152; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/lib.pyx":201 * return util._checknull(val) * * def isscalar(object val): # <<<<<<<<<<<<<< * return np.isscalar(val) or val is None or PyDateTime_Check(val) * */ __pyx_tuple__58 = PyTuple_Pack(1, __pyx_n_s_val); if (unlikely(!__pyx_tuple__58)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 201; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__58); __Pyx_GIVEREF(__pyx_tuple__58); __pyx_codeobj__59 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__58, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_yoh_deb_gits_pkg_exppsy_pa, __pyx_n_s_isscalar, 201, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__59)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 201; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/lib.pyx":207 * @cython.wraparound(False) * @cython.boundscheck(False) * def isnullobj(ndarray[object] arr): # <<<<<<<<<<<<<< * cdef Py_ssize_t i, n * cdef object val */ __pyx_tuple__60 = PyTuple_Pack(6, __pyx_n_s_arr, __pyx_n_s_i, __pyx_n_s_n, __pyx_n_s_val, __pyx_n_s_result, __pyx_n_s_arobj); if (unlikely(!__pyx_tuple__60)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 207; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__60); __Pyx_GIVEREF(__pyx_tuple__60); __pyx_codeobj__61 = (PyObject*)__Pyx_PyCode_New(1, 0, 6, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__60, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_yoh_deb_gits_pkg_exppsy_pa, __pyx_n_s_isnullobj, 207, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__61)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 207; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/lib.pyx":221 * @cython.wraparound(False) * @cython.boundscheck(False) * def isnullobj_old(ndarray[object] arr): # <<<<<<<<<<<<<< * cdef Py_ssize_t i, n * cdef object val */ __pyx_tuple__62 = PyTuple_Pack(5, __pyx_n_s_arr, __pyx_n_s_i, __pyx_n_s_n, __pyx_n_s_val, __pyx_n_s_result); if (unlikely(!__pyx_tuple__62)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 221; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__62); __Pyx_GIVEREF(__pyx_tuple__62); __pyx_codeobj__63 = (PyObject*)__Pyx_PyCode_New(1, 0, 5, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__62, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_yoh_deb_gits_pkg_exppsy_pa, __pyx_n_s_isnullobj_old, 221, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__63)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 221; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/lib.pyx":235 * @cython.wraparound(False) * @cython.boundscheck(False) * def isnullobj2d(ndarray[object, ndim=2] arr): # <<<<<<<<<<<<<< * cdef Py_ssize_t i, j, n, m * cdef object val */ __pyx_tuple__64 = PyTuple_Pack(7, __pyx_n_s_arr, __pyx_n_s_i, __pyx_n_s_j, __pyx_n_s_n, __pyx_n_s_m, __pyx_n_s_val, __pyx_n_s_result); if (unlikely(!__pyx_tuple__64)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 235; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__64); __Pyx_GIVEREF(__pyx_tuple__64); __pyx_codeobj__65 = (PyObject*)__Pyx_PyCode_New(1, 0, 7, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__64, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_yoh_deb_gits_pkg_exppsy_pa, __pyx_n_s_isnullobj2d, 235, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__65)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 235; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/lib.pyx":251 * @cython.wraparound(False) * @cython.boundscheck(False) * def isnullobj_old(ndarray[object] arr): # <<<<<<<<<<<<<< * cdef Py_ssize_t i, n * cdef object val */ __pyx_tuple__66 = PyTuple_Pack(5, __pyx_n_s_arr, __pyx_n_s_i, __pyx_n_s_n, __pyx_n_s_val, __pyx_n_s_result); if (unlikely(!__pyx_tuple__66)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 251; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__66); __Pyx_GIVEREF(__pyx_tuple__66); __pyx_codeobj__67 = (PyObject*)__Pyx_PyCode_New(1, 0, 5, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__66, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_yoh_deb_gits_pkg_exppsy_pa, __pyx_n_s_isnullobj_old, 251, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__67)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 251; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/lib.pyx":265 * @cython.wraparound(False) * @cython.boundscheck(False) * def isnullobj2d_old(ndarray[object, ndim=2] arr): # <<<<<<<<<<<<<< * cdef Py_ssize_t i, j, n, m * cdef object val */ __pyx_tuple__68 = PyTuple_Pack(7, __pyx_n_s_arr, __pyx_n_s_i, __pyx_n_s_j, __pyx_n_s_n, __pyx_n_s_m, __pyx_n_s_val, __pyx_n_s_result); if (unlikely(!__pyx_tuple__68)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 265; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__68); __Pyx_GIVEREF(__pyx_tuple__68); __pyx_codeobj__69 = (PyObject*)__Pyx_PyCode_New(1, 0, 7, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__68, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_yoh_deb_gits_pkg_exppsy_pa, __pyx_n_s_isnullobj2d_old, 265, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__69)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 265; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/lib.pyx":279 * return result.view(np.bool_) * * def list_to_object_array(list obj): # <<<<<<<<<<<<<< * ''' * Convert list to object ndarray. Seriously can't believe I had to write this */ __pyx_tuple__70 = PyTuple_Pack(4, __pyx_n_s_obj, __pyx_n_s_i, __pyx_n_s_n, __pyx_n_s_arr); if (unlikely(!__pyx_tuple__70)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 279; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__70); __Pyx_GIVEREF(__pyx_tuple__70); __pyx_codeobj__71 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__70, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_yoh_deb_gits_pkg_exppsy_pa, __pyx_n_s_list_to_object_array, 279, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__71)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 279; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/lib.pyx":299 * @cython.wraparound(False) * @cython.boundscheck(False) * def fast_unique(ndarray[object] values): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = len(values) */ __pyx_tuple__72 = PyTuple_Pack(7, __pyx_n_s_values, __pyx_n_s_i, __pyx_n_s_n, __pyx_n_s_uniques, __pyx_n_s_table, __pyx_n_s_val, __pyx_n_s_stub); if (unlikely(!__pyx_tuple__72)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 299; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__72); __Pyx_GIVEREF(__pyx_tuple__72); __pyx_codeobj__73 = (PyObject*)__Pyx_PyCode_New(1, 0, 7, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__72, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_yoh_deb_gits_pkg_exppsy_pa, __pyx_n_s_fast_unique, 299, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__73)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 299; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/lib.pyx":320 * @cython.wraparound(False) * @cython.boundscheck(False) * def fast_unique_multiple(list arrays): # <<<<<<<<<<<<<< * cdef: * ndarray[object] buf */ __pyx_tuple__74 = PyTuple_Pack(10, __pyx_n_s_arrays, __pyx_n_s_buf, __pyx_n_s_k, __pyx_n_s_i, __pyx_n_s_j, __pyx_n_s_n, __pyx_n_s_uniques, __pyx_n_s_table, __pyx_n_s_val, __pyx_n_s_stub); if (unlikely(!__pyx_tuple__74)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 320; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__74); __Pyx_GIVEREF(__pyx_tuple__74); __pyx_codeobj__75 = (PyObject*)__Pyx_PyCode_New(1, 0, 10, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__74, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_yoh_deb_gits_pkg_exppsy_pa, __pyx_n_s_fast_unique_multiple, 320, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__75)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 320; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/lib.pyx":346 * @cython.wraparound(False) * @cython.boundscheck(False) * def fast_unique_multiple_list(list lists): # <<<<<<<<<<<<<< * cdef: * list buf */ __pyx_tuple__76 = PyTuple_Pack(10, __pyx_n_s_lists, __pyx_n_s_buf, __pyx_n_s_k, __pyx_n_s_i, __pyx_n_s_j, __pyx_n_s_n, __pyx_n_s_uniques, __pyx_n_s_table, __pyx_n_s_val, __pyx_n_s_stub); if (unlikely(!__pyx_tuple__76)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 346; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__76); __Pyx_GIVEREF(__pyx_tuple__76); __pyx_codeobj__77 = (PyObject*)__Pyx_PyCode_New(1, 0, 10, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__76, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_yoh_deb_gits_pkg_exppsy_pa, __pyx_n_s_fast_unique_multiple_list, 346, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__77)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 346; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/lib.pyx":372 * @cython.wraparound(False) * @cython.boundscheck(False) * def fast_unique_multiple_list_gen(object gen): # <<<<<<<<<<<<<< * cdef: * list buf */ __pyx_tuple__78 = PyTuple_Pack(8, __pyx_n_s_gen, __pyx_n_s_buf, __pyx_n_s_j, __pyx_n_s_n, __pyx_n_s_uniques, __pyx_n_s_table, __pyx_n_s_val, __pyx_n_s_stub); if (unlikely(!__pyx_tuple__78)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 372; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__78); __Pyx_GIVEREF(__pyx_tuple__78); __pyx_codeobj__79 = (PyObject*)__Pyx_PyCode_New(1, 0, 8, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__78, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_yoh_deb_gits_pkg_exppsy_pa, __pyx_n_s_fast_unique_multiple_list_gen, 372, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__79)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 372; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/lib.pyx":397 * @cython.wraparound(False) * @cython.boundscheck(False) * def dicts_to_array(list dicts, list columns): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, j, k, n */ __pyx_tuple__80 = PyTuple_Pack(10, __pyx_n_s_dicts, __pyx_n_s_columns, __pyx_n_s_i, __pyx_n_s_j, __pyx_n_s_k, __pyx_n_s_n, __pyx_n_s_result, __pyx_n_s_row, __pyx_n_s_col, __pyx_n_s_onan); if (unlikely(!__pyx_tuple__80)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 397; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__80); __Pyx_GIVEREF(__pyx_tuple__80); __pyx_codeobj__81 = (PyObject*)__Pyx_PyCode_New(2, 0, 10, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__80, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_yoh_deb_gits_pkg_exppsy_pa, __pyx_n_s_dicts_to_array, 397, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__81)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 397; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/lib.pyx":420 * return result * * def fast_zip(list ndarrays): # <<<<<<<<<<<<<< * ''' * For zipping multiple ndarrays into an ndarray of tuples */ __pyx_tuple__82 = PyTuple_Pack(10, __pyx_n_s_ndarrays, __pyx_n_s_i, __pyx_n_s_j, __pyx_n_s_k, __pyx_n_s_n, __pyx_n_s_result, __pyx_n_s_it, __pyx_n_s_val, __pyx_n_s_tup, __pyx_n_s_arr); if (unlikely(!__pyx_tuple__82)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 420; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__82); __Pyx_GIVEREF(__pyx_tuple__82); __pyx_codeobj__83 = (PyObject*)__Pyx_PyCode_New(1, 0, 10, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__82, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_yoh_deb_gits_pkg_exppsy_pa, __pyx_n_s_fast_zip, 420, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__83)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 420; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/lib.pyx":461 * return result * * def get_reverse_indexer(ndarray[int64_t] indexer, Py_ssize_t length): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = len(indexer) */ __pyx_tuple__84 = PyTuple_Pack(6, __pyx_n_s_indexer, __pyx_n_s_length, __pyx_n_s_i, __pyx_n_s_n, __pyx_n_s_rev_indexer, __pyx_n_s_idx); if (unlikely(!__pyx_tuple__84)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 461; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__84); __Pyx_GIVEREF(__pyx_tuple__84); __pyx_codeobj__85 = (PyObject*)__Pyx_PyCode_New(2, 0, 6, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__84, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_yoh_deb_gits_pkg_exppsy_pa, __pyx_n_s_get_reverse_indexer, 461, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__85)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 461; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/lib.pyx":477 * * * def has_infs_f4(ndarray[float32_t] arr): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = len(arr) */ __pyx_tuple__86 = PyTuple_Pack(6, __pyx_n_s_arr, __pyx_n_s_i, __pyx_n_s_n, __pyx_n_s_inf, __pyx_n_s_neginf, __pyx_n_s_val); if (unlikely(!__pyx_tuple__86)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 477; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__86); __Pyx_GIVEREF(__pyx_tuple__86); __pyx_codeobj__87 = (PyObject*)__Pyx_PyCode_New(1, 0, 6, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__86, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_yoh_deb_gits_pkg_exppsy_pa, __pyx_n_s_has_infs_f4, 477, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__87)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 477; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/lib.pyx":491 * return False * * def has_infs_f8(ndarray[float64_t] arr): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = len(arr) */ __pyx_tuple__88 = PyTuple_Pack(6, __pyx_n_s_arr, __pyx_n_s_i, __pyx_n_s_n, __pyx_n_s_inf, __pyx_n_s_neginf, __pyx_n_s_val); if (unlikely(!__pyx_tuple__88)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 491; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__88); __Pyx_GIVEREF(__pyx_tuple__88); __pyx_codeobj__89 = (PyObject*)__Pyx_PyCode_New(1, 0, 6, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__88, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_yoh_deb_gits_pkg_exppsy_pa, __pyx_n_s_has_infs_f8, 491, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__89)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 491; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/lib.pyx":505 * return False * * def convert_timestamps(ndarray values): # <<<<<<<<<<<<<< * cdef: * object val, f, result */ __pyx_tuple__90 = PyTuple_Pack(9, __pyx_n_s_values, __pyx_n_s_val, __pyx_n_s_f, __pyx_n_s_result, __pyx_n_s_cache_2, __pyx_n_s_i, __pyx_n_s_n, __pyx_n_s_out, __pyx_n_s_datetime); if (unlikely(!__pyx_tuple__90)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 505; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__90); __Pyx_GIVEREF(__pyx_tuple__90); __pyx_codeobj__91 = (PyObject*)__Pyx_PyCode_New(1, 0, 9, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__90, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_yoh_deb_gits_pkg_exppsy_pa, __pyx_n_s_convert_timestamps, 505, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__91)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 505; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/lib.pyx":528 * return out * * def maybe_indices_to_slice(ndarray[int64_t] indices): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = len(indices) */ __pyx_tuple__92 = PyTuple_Pack(3, __pyx_n_s_indices, __pyx_n_s_i, __pyx_n_s_n); if (unlikely(!__pyx_tuple__92)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 528; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__92); __Pyx_GIVEREF(__pyx_tuple__92); __pyx_codeobj__93 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__92, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_yoh_deb_gits_pkg_exppsy_pa, __pyx_n_s_maybe_indices_to_slice, 528, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__93)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 528; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/lib.pyx":541 * * * def maybe_booleans_to_slice(ndarray[uint8_t] mask): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = len(mask) */ __pyx_tuple__94 = PyTuple_Pack(7, __pyx_n_s_mask, __pyx_n_s_i, __pyx_n_s_n, __pyx_n_s_start, __pyx_n_s_end, __pyx_n_s_started, __pyx_n_s_finished); if (unlikely(!__pyx_tuple__94)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 541; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__94); __Pyx_GIVEREF(__pyx_tuple__94); __pyx_codeobj__95 = (PyObject*)__Pyx_PyCode_New(1, 0, 7, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__94, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_yoh_deb_gits_pkg_exppsy_pa, __pyx_n_s_maybe_booleans_to_slice, 541, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__95)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 541; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/lib.pyx":572 * @cython.wraparound(False) * @cython.boundscheck(False) * def scalar_compare(ndarray[object] values, object val, object op): # <<<<<<<<<<<<<< * import operator * cdef: */ __pyx_tuple__96 = PyTuple_Pack(9, __pyx_n_s_values, __pyx_n_s_val, __pyx_n_s_op, __pyx_n_s_operator, __pyx_n_s_i, __pyx_n_s_n, __pyx_n_s_result, __pyx_n_s_flag, __pyx_n_s_x); if (unlikely(!__pyx_tuple__96)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 572; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__96); __Pyx_GIVEREF(__pyx_tuple__96); __pyx_codeobj__97 = (PyObject*)__Pyx_PyCode_New(3, 0, 9, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__96, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_yoh_deb_gits_pkg_exppsy_pa, __pyx_n_s_scalar_compare, 572, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__97)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 572; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/lib.pyx":616 * @cython.wraparound(False) * @cython.boundscheck(False) * def vec_compare(ndarray[object] left, ndarray[object] right, object op): # <<<<<<<<<<<<<< * import operator * cdef: */ __pyx_tuple__98 = PyTuple_Pack(10, __pyx_n_s_left, __pyx_n_s_right, __pyx_n_s_op, __pyx_n_s_operator, __pyx_n_s_i, __pyx_n_s_n, __pyx_n_s_result, __pyx_n_s_flag, __pyx_n_s_x, __pyx_n_s_y); if (unlikely(!__pyx_tuple__98)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 616; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__98); __Pyx_GIVEREF(__pyx_tuple__98); __pyx_codeobj__99 = (PyObject*)__Pyx_PyCode_New(3, 0, 10, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__98, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_yoh_deb_gits_pkg_exppsy_pa, __pyx_n_s_vec_compare, 616, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__99)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 616; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/lib.pyx":668 * @cython.wraparound(False) * @cython.boundscheck(False) * def scalar_binop(ndarray[object] values, object val, object op): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = len(values) */ __pyx_tuple__100 = PyTuple_Pack(7, __pyx_n_s_values, __pyx_n_s_val, __pyx_n_s_op, __pyx_n_s_i, __pyx_n_s_n, __pyx_n_s_result, __pyx_n_s_x); if (unlikely(!__pyx_tuple__100)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 668; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__100); __Pyx_GIVEREF(__pyx_tuple__100); __pyx_codeobj__101 = (PyObject*)__Pyx_PyCode_New(3, 0, 7, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__100, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_yoh_deb_gits_pkg_exppsy_pa, __pyx_n_s_scalar_binop, 668, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__101)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 668; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/lib.pyx":690 * @cython.wraparound(False) * @cython.boundscheck(False) * def vec_binop(ndarray[object] left, ndarray[object] right, object op): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = len(left) */ __pyx_tuple__102 = PyTuple_Pack(8, __pyx_n_s_left, __pyx_n_s_right, __pyx_n_s_op, __pyx_n_s_i, __pyx_n_s_n, __pyx_n_s_result, __pyx_n_s_x, __pyx_n_s_y); if (unlikely(!__pyx_tuple__102)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 690; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__102); __Pyx_GIVEREF(__pyx_tuple__102); __pyx_codeobj__103 = (PyObject*)__Pyx_PyCode_New(3, 0, 8, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__102, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_yoh_deb_gits_pkg_exppsy_pa, __pyx_n_s_vec_binop, 690, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__103)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 690; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/lib.pyx":717 * * * def astype_intsafe(ndarray[object] arr, new_dtype): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = len(arr) */ __pyx_tuple__104 = PyTuple_Pack(7, __pyx_n_s_arr, __pyx_n_s_new_dtype, __pyx_n_s_i, __pyx_n_s_n, __pyx_n_s_v, __pyx_n_s_is_datelike, __pyx_n_s_result); if (unlikely(!__pyx_tuple__104)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 717; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__104); __Pyx_GIVEREF(__pyx_tuple__104); __pyx_codeobj__105 = (PyObject*)__Pyx_PyCode_New(2, 0, 7, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__104, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_yoh_deb_gits_pkg_exppsy_pa, __pyx_n_s_astype_intsafe, 717, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__105)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 717; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/lib.pyx":747 * return result * * def clean_index_list(list obj): # <<<<<<<<<<<<<< * ''' * Utility used in pandas.core.index._ensure_index */ __pyx_tuple__106 = PyTuple_Pack(6, __pyx_n_s_obj, __pyx_n_s_converted, __pyx_n_s_i, __pyx_n_s_n, __pyx_n_s_v, __pyx_n_s_all_arrays); if (unlikely(!__pyx_tuple__106)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 747; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__106); __Pyx_GIVEREF(__pyx_tuple__106); __pyx_codeobj__107 = (PyObject*)__Pyx_PyCode_New(1, 0, 6, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__106, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_yoh_deb_gits_pkg_exppsy_pa, __pyx_n_s_clean_index_list, 747, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__107)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 747; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/lib.pyx":778 * @cython.boundscheck(False) * @cython.wraparound(False) * def max_len_string_array(ndarray[object, ndim=1] arr): # <<<<<<<<<<<<<< * """ return the maximum size of elements in a 1-dim string array """ * cdef: */ __pyx_tuple__108 = PyTuple_Pack(6, __pyx_n_s_arr, __pyx_n_s_i, __pyx_n_s_m, __pyx_n_s_l, __pyx_n_s_length, __pyx_n_s_v); if (unlikely(!__pyx_tuple__108)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 778; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__108); __Pyx_GIVEREF(__pyx_tuple__108); __pyx_codeobj__109 = (PyObject*)__Pyx_PyCode_New(1, 0, 6, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__108, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_yoh_deb_gits_pkg_exppsy_pa, __pyx_n_s_max_len_string_array, 778, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__109)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 778; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/lib.pyx":798 * @cython.boundscheck(False) * @cython.wraparound(False) * def string_array_replace_from_nan_rep(ndarray[object, ndim=1] arr, object nan_rep, object replace = None): # <<<<<<<<<<<<<< * """ replace the values in the array with replacement if they are nan_rep; return the same array """ * */ __pyx_tuple__110 = PyTuple_Pack(5, __pyx_n_s_arr, __pyx_n_s_nan_rep, __pyx_n_s_replace, __pyx_n_s_length, __pyx_n_s_i); if (unlikely(!__pyx_tuple__110)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 798; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__110); __Pyx_GIVEREF(__pyx_tuple__110); __pyx_codeobj__111 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__110, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_yoh_deb_gits_pkg_exppsy_pa, __pyx_n_s_string_array_replace_from_nan_re, 798, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__111)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 798; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/lib.pyx":813 * @cython.boundscheck(False) * @cython.wraparound(False) * def write_csv_rows(list data, list data_index, int nlevels, list cols, object writer): # <<<<<<<<<<<<<< * * cdef int N, j, i, ncols */ __pyx_tuple__112 = PyTuple_Pack(13, __pyx_n_s_data, __pyx_n_s_data_index, __pyx_n_s_nlevels, __pyx_n_s_cols, __pyx_n_s_writer, __pyx_n_s_N, __pyx_n_s_j, __pyx_n_s_i, __pyx_n_s_ncols, __pyx_n_s_rows, __pyx_n_s_val, __pyx_n_s_row, __pyx_n_s_x); if (unlikely(!__pyx_tuple__112)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 813; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__112); __Pyx_GIVEREF(__pyx_tuple__112); __pyx_codeobj__113 = (PyObject*)__Pyx_PyCode_New(5, 0, 13, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__112, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_yoh_deb_gits_pkg_exppsy_pa, __pyx_n_s_write_csv_rows, 813, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__113)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 813; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/lib.pyx":861 * * @cython.boundscheck(False) * def arrmap(ndarray[object] index, object func): # <<<<<<<<<<<<<< * cdef int length = index.shape[0] * cdef int i = 0 */ __pyx_tuple__114 = PyTuple_Pack(5, __pyx_n_s_index, __pyx_n_s_func, __pyx_n_s_length, __pyx_n_s_i, __pyx_n_s_result); if (unlikely(!__pyx_tuple__114)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 861; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__114); __Pyx_GIVEREF(__pyx_tuple__114); __pyx_codeobj__115 = (PyObject*)__Pyx_PyCode_New(2, 0, 5, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__114, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_yoh_deb_gits_pkg_exppsy_pa, __pyx_n_s_arrmap, 861, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__115)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 861; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/lib.pyx":874 * @cython.wraparound(False) * @cython.boundscheck(False) * def is_lexsorted(list list_of_arrays): # <<<<<<<<<<<<<< * cdef: * int i */ __pyx_tuple__116 = PyTuple_Pack(9, __pyx_n_s_list_of_arrays, __pyx_n_s_i, __pyx_n_s_n, __pyx_n_s_nlevels, __pyx_n_s_k, __pyx_n_s_cur, __pyx_n_s_pre, __pyx_n_s_arr, __pyx_n_s_vecs); if (unlikely(!__pyx_tuple__116)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 874; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__116); __Pyx_GIVEREF(__pyx_tuple__116); __pyx_codeobj__117 = (PyObject*)__Pyx_PyCode_New(1, 0, 9, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__116, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_yoh_deb_gits_pkg_exppsy_pa, __pyx_n_s_is_lexsorted, 874, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__117)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 874; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/lib.pyx":913 * @cython.boundscheck(False) * @cython.wraparound(False) * def generate_bins_dt64(ndarray[int64_t] values, ndarray[int64_t] binner, # <<<<<<<<<<<<<< * object closed='left'): * """ */ __pyx_tuple__118 = PyTuple_Pack(13, __pyx_n_s_values, __pyx_n_s_binner, __pyx_n_s_closed, __pyx_n_s_lenidx, __pyx_n_s_lenbin, __pyx_n_s_i, __pyx_n_s_j, __pyx_n_s_bc, __pyx_n_s_vc, __pyx_n_s_bins, __pyx_n_s_l_bin, __pyx_n_s_r_bin, __pyx_n_s_right_closed); if (unlikely(!__pyx_tuple__118)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 913; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__118); __Pyx_GIVEREF(__pyx_tuple__118); __pyx_codeobj__119 = (PyObject*)__Pyx_PyCode_New(3, 0, 13, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__118, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_yoh_deb_gits_pkg_exppsy_pa, __pyx_n_s_generate_bins_dt64, 913, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__119)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 913; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/lib.pyx":962 * @cython.boundscheck(False) * @cython.wraparound(False) * def row_bool_subset(ndarray[float64_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[uint8_t, cast=True] mask): * cdef: */ __pyx_tuple__120 = PyTuple_Pack(8, __pyx_n_s_values, __pyx_n_s_mask, __pyx_n_s_i, __pyx_n_s_j, __pyx_n_s_n, __pyx_n_s_k, __pyx_n_s_pos, __pyx_n_s_out); if (unlikely(!__pyx_tuple__120)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 962; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__120); __Pyx_GIVEREF(__pyx_tuple__120); __pyx_codeobj__121 = (PyObject*)__Pyx_PyCode_New(2, 0, 8, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__120, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_yoh_deb_gits_pkg_exppsy_pa, __pyx_n_s_row_bool_subset, 962, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__121)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 962; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/lib.pyx":983 * @cython.boundscheck(False) * @cython.wraparound(False) * def row_bool_subset_object(ndarray[object, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[uint8_t, cast=True] mask): * cdef: */ __pyx_tuple__122 = PyTuple_Pack(8, __pyx_n_s_values, __pyx_n_s_mask, __pyx_n_s_i, __pyx_n_s_j, __pyx_n_s_n, __pyx_n_s_k, __pyx_n_s_pos, __pyx_n_s_out); if (unlikely(!__pyx_tuple__122)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 983; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__122); __Pyx_GIVEREF(__pyx_tuple__122); __pyx_codeobj__123 = (PyObject*)__Pyx_PyCode_New(2, 0, 8, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__122, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_yoh_deb_gits_pkg_exppsy_pa, __pyx_n_s_row_bool_subset_object, 983, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__123)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 983; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/lib.pyx":1003 * * * def group_count(ndarray[int64_t] values, Py_ssize_t size): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = len(values) */ __pyx_tuple__124 = PyTuple_Pack(5, __pyx_n_s_values, __pyx_n_s_size, __pyx_n_s_i, __pyx_n_s_n, __pyx_n_s_counts); if (unlikely(!__pyx_tuple__124)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1003; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__124); __Pyx_GIVEREF(__pyx_tuple__124); __pyx_codeobj__125 = (PyObject*)__Pyx_PyCode_New(2, 0, 5, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__124, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_yoh_deb_gits_pkg_exppsy_pa, __pyx_n_s_group_count, 1003, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__125)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1003; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/lib.pyx":1013 * return counts * * def lookup_values(ndarray[object] values, dict mapping): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = len(values) */ __pyx_tuple__126 = PyTuple_Pack(5, __pyx_n_s_values, __pyx_n_s_mapping, __pyx_n_s_i, __pyx_n_s_n, __pyx_n_s_result); if (unlikely(!__pyx_tuple__126)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1013; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__126); __Pyx_GIVEREF(__pyx_tuple__126); __pyx_codeobj__127 = (PyObject*)__Pyx_PyCode_New(2, 0, 5, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__126, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_yoh_deb_gits_pkg_exppsy_pa, __pyx_n_s_lookup_values, 1013, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__127)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1013; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/lib.pyx":1023 * * * def count_level_1d(ndarray[uint8_t, cast=True] mask, # <<<<<<<<<<<<<< * ndarray[int64_t] labels, Py_ssize_t max_bin): * cdef: */ __pyx_tuple__128 = PyTuple_Pack(6, __pyx_n_s_mask, __pyx_n_s_labels, __pyx_n_s_max_bin, __pyx_n_s_i, __pyx_n_s_n, __pyx_n_s_counts); if (unlikely(!__pyx_tuple__128)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1023; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__128); __Pyx_GIVEREF(__pyx_tuple__128); __pyx_codeobj__129 = (PyObject*)__Pyx_PyCode_New(3, 0, 6, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__128, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_yoh_deb_gits_pkg_exppsy_pa, __pyx_n_s_count_level_1d, 1023, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__129)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1023; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/lib.pyx":1040 * * * def count_level_2d(ndarray[uint8_t, ndim=2, cast=True] mask, # <<<<<<<<<<<<<< * ndarray[int64_t] labels, Py_ssize_t max_bin): * cdef: */ __pyx_tuple__130 = PyTuple_Pack(8, __pyx_n_s_mask, __pyx_n_s_labels, __pyx_n_s_max_bin, __pyx_n_s_i, __pyx_n_s_j, __pyx_n_s_k, __pyx_n_s_n, __pyx_n_s_counts); if (unlikely(!__pyx_tuple__130)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1040; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__130); __Pyx_GIVEREF(__pyx_tuple__130); __pyx_codeobj__131 = (PyObject*)__Pyx_PyCode_New(3, 0, 8, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__130, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_yoh_deb_gits_pkg_exppsy_pa, __pyx_n_s_count_level_2d, 1040, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__131)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1040; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/lib.pyx":1071 * pandas_null = _PandasNull() * * def fast_zip_fillna(list ndarrays, fill_value=pandas_null): # <<<<<<<<<<<<<< * ''' * For zipping multiple ndarrays into an ndarray of tuples */ __pyx_tuple__132 = PyTuple_Pack(11, __pyx_n_s_ndarrays, __pyx_n_s_fill_value, __pyx_n_s_i, __pyx_n_s_j, __pyx_n_s_k, __pyx_n_s_n, __pyx_n_s_result, __pyx_n_s_it, __pyx_n_s_val, __pyx_n_s_tup, __pyx_n_s_arr); if (unlikely(!__pyx_tuple__132)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1071; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__132); __Pyx_GIVEREF(__pyx_tuple__132); __pyx_codeobj__133 = (PyObject*)__Pyx_PyCode_New(2, 0, 11, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__132, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_yoh_deb_gits_pkg_exppsy_pa, __pyx_n_s_fast_zip_fillna, 1071, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__133)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1071; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/lib.pyx":1118 * return result * * def duplicated(ndarray[object] values, take_last=False): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n */ __pyx_tuple__134 = PyTuple_Pack(7, __pyx_n_s_values, __pyx_n_s_take_last, __pyx_n_s_i, __pyx_n_s_n, __pyx_n_s_seen, __pyx_n_s_row, __pyx_n_s_result); if (unlikely(!__pyx_tuple__134)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1118; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__134); __Pyx_GIVEREF(__pyx_tuple__134); __pyx_codeobj__135 = (PyObject*)__Pyx_PyCode_New(2, 0, 7, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__134, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_yoh_deb_gits_pkg_exppsy_pa, __pyx_n_s_duplicated, 1118, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__135)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1118; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/lib.pyx":1147 * return result.view(np.bool_) * * def generate_slices(ndarray[int64_t] labels, Py_ssize_t ngroups): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, group_size, n, lab, start */ __pyx_tuple__136 = PyTuple_Pack(10, __pyx_n_s_labels, __pyx_n_s_ngroups, __pyx_n_s_i, __pyx_n_s_group_size, __pyx_n_s_n, __pyx_n_s_lab, __pyx_n_s_start, __pyx_n_s_slobj, __pyx_n_s_starts, __pyx_n_s_ends); if (unlikely(!__pyx_tuple__136)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1147; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__136); __Pyx_GIVEREF(__pyx_tuple__136); __pyx_codeobj__137 = (PyObject*)__Pyx_PyCode_New(2, 0, 10, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__136, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_yoh_deb_gits_pkg_exppsy_pa, __pyx_n_s_generate_slices, 1147, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__137)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1147; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/lib.pyx":1172 * * * def indices_fast(object index, ndarray[int64_t] labels, list keys, # <<<<<<<<<<<<<< * list sorted_labels): * cdef: */ __pyx_tuple__138 = PyTuple_Pack(14, __pyx_n_s_index, __pyx_n_s_labels, __pyx_n_s_keys, __pyx_n_s_sorted_labels, __pyx_n_s_i, __pyx_n_s_j, __pyx_n_s_k, __pyx_n_s_lab, __pyx_n_s_cur, __pyx_n_s_start, __pyx_n_s_n, __pyx_n_s_result, __pyx_n_s_tup, __pyx_n_s_val); if (unlikely(!__pyx_tuple__138)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1172; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__138); __Pyx_GIVEREF(__pyx_tuple__138); __pyx_codeobj__139 = (PyObject*)__Pyx_PyCode_New(4, 0, 14, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__138, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_yoh_deb_gits_pkg_exppsy_pa, __pyx_n_s_indices_fast, 1172, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__139)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1172; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/reduce.pyx":474 * pass * * def apply_frame_axis0(object frame, object f, object names, # <<<<<<<<<<<<<< * ndarray[int64_t] starts, ndarray[int64_t] ends): * cdef: */ __pyx_tuple__140 = PyTuple_Pack(16, __pyx_n_s_frame, __pyx_n_s_f, __pyx_n_s_names, __pyx_n_s_starts, __pyx_n_s_ends, __pyx_n_s_slider, __pyx_n_s_i, __pyx_n_s_n, __pyx_n_s_results, __pyx_n_s_piece, __pyx_n_s_item_cache_2, __pyx_n_s_chunk, __pyx_n_s_shape_before, __pyx_n_s_result, __pyx_n_s_mutated, __pyx_n_s_gin); if (unlikely(!__pyx_tuple__140)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 474; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__140); __Pyx_GIVEREF(__pyx_tuple__140); __pyx_codeobj__141 = (PyObject*)__Pyx_PyCode_New(5, 0, 16, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__140, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pandas_src_reduce_pyx, __pyx_n_s_apply_frame_axis0, 474, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__141)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 474; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/reduce.pyx":591 * * * def reduce(arr, f, axis=0, dummy=None, labels=None): # <<<<<<<<<<<<<< * if labels._has_complex_internals: * raise Exception('Cannot use shortcut') */ __pyx_tuple__142 = PyTuple_Pack(6, __pyx_n_s_arr, __pyx_n_s_f, __pyx_n_s_axis, __pyx_n_s_dummy, __pyx_n_s_labels, __pyx_n_s_reducer); if (unlikely(!__pyx_tuple__142)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 591; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__142); __Pyx_GIVEREF(__pyx_tuple__142); __pyx_codeobj__143 = (PyObject*)__Pyx_PyCode_New(5, 0, 6, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__142, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pandas_src_reduce_pyx, __pyx_n_s_reduce, 591, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__143)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 591; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/inference.pyx":33 * pass * * def infer_dtype(object _values): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n */ __pyx_tuple__144 = PyTuple_Pack(6, __pyx_n_s_values_2, __pyx_n_s_i, __pyx_n_s_n, __pyx_n_s_val, __pyx_n_s_values, __pyx_n_s_val_kind); if (unlikely(!__pyx_tuple__144)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 33; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__144); __Pyx_GIVEREF(__pyx_tuple__144); __pyx_codeobj__145 = (PyObject*)__Pyx_PyCode_New(1, 0, 6, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__144, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pandas_src_inference_pyx, __pyx_n_s_infer_dtype, 33, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__145)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 33; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/inference.pyx":133 * return 'mixed' * * def infer_dtype_list(list values): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = len(values) */ __pyx_tuple__146 = PyTuple_Pack(3, __pyx_n_s_values, __pyx_n_s_i, __pyx_n_s_n); if (unlikely(!__pyx_tuple__146)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 133; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__146); __Pyx_GIVEREF(__pyx_tuple__146); __pyx_codeobj__147 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__146, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pandas_src_inference_pyx, __pyx_n_s_infer_dtype_list, 133, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__147)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 133; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/inference.pyx":154 * return PyDelta_Check(o) or util.is_timedelta64_object(o) * * def is_bool_array(ndarray values): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = len(values) */ __pyx_tuple__148 = PyTuple_Pack(5, __pyx_n_s_values, __pyx_n_s_i, __pyx_n_s_n, __pyx_n_s_objbuf, __pyx_n_s_obj); if (unlikely(!__pyx_tuple__148)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 154; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__148); __Pyx_GIVEREF(__pyx_tuple__148); __pyx_codeobj__149 = (PyObject*)__Pyx_PyCode_New(1, 0, 5, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__148, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pandas_src_inference_pyx, __pyx_n_s_is_bool_array, 154, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__149)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 154; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/inference.pyx":175 * return False * * def is_integer(object o): # <<<<<<<<<<<<<< * return util.is_integer_object(o) * */ __pyx_tuple__150 = PyTuple_Pack(1, __pyx_n_s_o); if (unlikely(!__pyx_tuple__150)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 175; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__150); __Pyx_GIVEREF(__pyx_tuple__150); __pyx_codeobj__151 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__150, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pandas_src_inference_pyx, __pyx_n_s_is_integer, 175, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__151)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 175; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/inference.pyx":178 * return util.is_integer_object(o) * * def is_integer_array(ndarray values): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = len(values) */ __pyx_tuple__152 = PyTuple_Pack(5, __pyx_n_s_values, __pyx_n_s_i, __pyx_n_s_n, __pyx_n_s_objbuf, __pyx_n_s_obj); if (unlikely(!__pyx_tuple__152)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 178; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__152); __Pyx_GIVEREF(__pyx_tuple__152); __pyx_codeobj__153 = (PyObject*)__Pyx_PyCode_New(1, 0, 5, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__152, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pandas_src_inference_pyx, __pyx_n_s_is_integer_array, 178, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__153)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 178; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/inference.pyx":199 * return False * * def is_integer_float_array(ndarray values): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = len(values) */ __pyx_tuple__154 = PyTuple_Pack(5, __pyx_n_s_values, __pyx_n_s_i, __pyx_n_s_n, __pyx_n_s_objbuf, __pyx_n_s_obj); if (unlikely(!__pyx_tuple__154)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 199; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__154); __Pyx_GIVEREF(__pyx_tuple__154); __pyx_codeobj__155 = (PyObject*)__Pyx_PyCode_New(1, 0, 5, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__154, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pandas_src_inference_pyx, __pyx_n_s_is_integer_float_array, 199, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__155)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 199; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/inference.pyx":222 * return False * * def is_float_array(ndarray values): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = len(values) */ __pyx_tuple__156 = PyTuple_Pack(5, __pyx_n_s_values, __pyx_n_s_i, __pyx_n_s_n, __pyx_n_s_objbuf, __pyx_n_s_obj); if (unlikely(!__pyx_tuple__156)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 222; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__156); __Pyx_GIVEREF(__pyx_tuple__156); __pyx_codeobj__157 = (PyObject*)__Pyx_PyCode_New(1, 0, 5, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__156, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pandas_src_inference_pyx, __pyx_n_s_is_float_array, 222, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__157)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 222; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/inference.pyx":243 * return False * * def is_string_array(ndarray values): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = len(values) */ __pyx_tuple__158 = PyTuple_Pack(5, __pyx_n_s_values, __pyx_n_s_i, __pyx_n_s_n, __pyx_n_s_objbuf, __pyx_n_s_obj); if (unlikely(!__pyx_tuple__158)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__158); __Pyx_GIVEREF(__pyx_tuple__158); __pyx_codeobj__159 = (PyObject*)__Pyx_PyCode_New(1, 0, 5, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__158, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pandas_src_inference_pyx, __pyx_n_s_is_string_array, 243, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__159)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/inference.pyx":264 * return False * * def is_unicode_array(ndarray values): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = len(values) */ __pyx_tuple__160 = PyTuple_Pack(5, __pyx_n_s_values, __pyx_n_s_i, __pyx_n_s_n, __pyx_n_s_objbuf, __pyx_n_s_obj); if (unlikely(!__pyx_tuple__160)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 264; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__160); __Pyx_GIVEREF(__pyx_tuple__160); __pyx_codeobj__161 = (PyObject*)__Pyx_PyCode_New(1, 0, 5, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__160, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pandas_src_inference_pyx, __pyx_n_s_is_unicode_array, 264, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__161)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 264; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/inference.pyx":286 * * * def is_datetime_array(ndarray[object] values): # <<<<<<<<<<<<<< * cdef int i, n = len(values) * cdef object v */ __pyx_tuple__162 = PyTuple_Pack(4, __pyx_n_s_values, __pyx_n_s_i, __pyx_n_s_n, __pyx_n_s_v); if (unlikely(!__pyx_tuple__162)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 286; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__162); __Pyx_GIVEREF(__pyx_tuple__162); __pyx_codeobj__163 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__162, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pandas_src_inference_pyx, __pyx_n_s_is_datetime_array, 286, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__163)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 286; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/inference.pyx":298 * * * def is_datetime64_array(ndarray values): # <<<<<<<<<<<<<< * cdef int i, n = len(values) * cdef object v */ __pyx_tuple__164 = PyTuple_Pack(4, __pyx_n_s_values, __pyx_n_s_i, __pyx_n_s_n, __pyx_n_s_v); if (unlikely(!__pyx_tuple__164)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 298; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__164); __Pyx_GIVEREF(__pyx_tuple__164); __pyx_codeobj__165 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__164, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pandas_src_inference_pyx, __pyx_n_s_is_datetime64_array, 298, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__165)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 298; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/inference.pyx":309 * return True * * def is_timedelta_array(ndarray values): # <<<<<<<<<<<<<< * cdef int i, n = len(values) * cdef object v */ __pyx_tuple__166 = PyTuple_Pack(4, __pyx_n_s_values, __pyx_n_s_i, __pyx_n_s_n, __pyx_n_s_v); if (unlikely(!__pyx_tuple__166)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 309; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__166); __Pyx_GIVEREF(__pyx_tuple__166); __pyx_codeobj__167 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__166, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pandas_src_inference_pyx, __pyx_n_s_is_timedelta_array, 309, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__167)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 309; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/inference.pyx":320 * return True * * def is_timedelta64_array(ndarray values): # <<<<<<<<<<<<<< * cdef int i, n = len(values) * cdef object v */ __pyx_tuple__168 = PyTuple_Pack(4, __pyx_n_s_values, __pyx_n_s_i, __pyx_n_s_n, __pyx_n_s_v); if (unlikely(!__pyx_tuple__168)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 320; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__168); __Pyx_GIVEREF(__pyx_tuple__168); __pyx_codeobj__169 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__168, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pandas_src_inference_pyx, __pyx_n_s_is_timedelta64_array, 320, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__169)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 320; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/inference.pyx":331 * return True * * def is_timedelta_or_timedelta64_array(ndarray values): # <<<<<<<<<<<<<< * """ infer with timedeltas and/or nat/none """ * cdef int i, n = len(values) */ __pyx_tuple__170 = PyTuple_Pack(4, __pyx_n_s_values, __pyx_n_s_i, __pyx_n_s_n, __pyx_n_s_v); if (unlikely(!__pyx_tuple__170)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 331; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__170); __Pyx_GIVEREF(__pyx_tuple__170); __pyx_codeobj__171 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__170, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pandas_src_inference_pyx, __pyx_n_s_is_timedelta_or_timedelta64_arra, 331, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__171)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 331; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/inference.pyx":343 * return True * * def is_date_array(ndarray[object] values): # <<<<<<<<<<<<<< * cdef int i, n = len(values) * if n == 0: */ __pyx_tuple__172 = PyTuple_Pack(3, __pyx_n_s_values, __pyx_n_s_i, __pyx_n_s_n); if (unlikely(!__pyx_tuple__172)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 343; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__172); __Pyx_GIVEREF(__pyx_tuple__172); __pyx_codeobj__173 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__172, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pandas_src_inference_pyx, __pyx_n_s_is_date_array, 343, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__173)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 343; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/inference.pyx":352 * return True * * def is_time_array(ndarray[object] values): # <<<<<<<<<<<<<< * cdef int i, n = len(values) * if n == 0: */ __pyx_tuple__174 = PyTuple_Pack(3, __pyx_n_s_values, __pyx_n_s_i, __pyx_n_s_n); if (unlikely(!__pyx_tuple__174)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 352; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__174); __Pyx_GIVEREF(__pyx_tuple__174); __pyx_codeobj__175 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__174, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pandas_src_inference_pyx, __pyx_n_s_is_time_array, 352, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__175)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 352; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/inference.pyx":361 * return True * * def is_period(object o): # <<<<<<<<<<<<<< * from pandas import Period * return isinstance(o,Period) */ __pyx_tuple__176 = PyTuple_Pack(2, __pyx_n_s_o, __pyx_n_s_Period); if (unlikely(!__pyx_tuple__176)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 361; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__176); __Pyx_GIVEREF(__pyx_tuple__176); __pyx_codeobj__177 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__176, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pandas_src_inference_pyx, __pyx_n_s_is_period, 361, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__177)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 361; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/inference.pyx":365 * return isinstance(o,Period) * * def is_period_array(ndarray[object] values): # <<<<<<<<<<<<<< * cdef int i, n = len(values) * from pandas.tseries.period import Period */ __pyx_tuple__178 = PyTuple_Pack(4, __pyx_n_s_values, __pyx_n_s_i, __pyx_n_s_n, __pyx_n_s_Period); if (unlikely(!__pyx_tuple__178)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 365; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__178); __Pyx_GIVEREF(__pyx_tuple__178); __pyx_codeobj__179 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__178, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pandas_src_inference_pyx, __pyx_n_s_is_period_array, 365, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__179)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 365; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/inference.pyx":383 * cdef double fINT64_MIN = INT64_MIN * * def maybe_convert_numeric(ndarray[object] values, set na_values, # <<<<<<<<<<<<<< * convert_empty=True, coerce_numeric=False): * ''' */ __pyx_tuple__180 = PyTuple_Pack(15, __pyx_n_s_values, __pyx_n_s_na_values, __pyx_n_s_convert_empty, __pyx_n_s_coerce_numeric, __pyx_n_s_status, __pyx_n_s_i, __pyx_n_s_n, __pyx_n_s_floats, __pyx_n_s_complexes, __pyx_n_s_ints, __pyx_n_s_seen_float, __pyx_n_s_seen_complex, __pyx_n_s_val, __pyx_n_s_fval, __pyx_n_s_seen_int); if (unlikely(!__pyx_tuple__180)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 383; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__180); __Pyx_GIVEREF(__pyx_tuple__180); __pyx_codeobj__181 = (PyObject*)__Pyx_PyCode_New(4, 0, 15, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__180, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pandas_src_inference_pyx, __pyx_n_s_maybe_convert_numeric, 383, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__181)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 383; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/inference.pyx":461 * return ints * * def maybe_convert_objects(ndarray[object] objects, bint try_float=0, # <<<<<<<<<<<<<< * bint safe=0, bint convert_datetime=0, bint convert_timedelta=0): * ''' */ __pyx_tuple__182 = PyTuple_Pack(28, __pyx_n_s_objects, __pyx_n_s_try_float, __pyx_n_s_safe, __pyx_n_s_convert_datetime, __pyx_n_s_convert_timedelta, __pyx_n_s_i, __pyx_n_s_n, __pyx_n_s_floats, __pyx_n_s_complexes, __pyx_n_s_ints, __pyx_n_s_bools, __pyx_n_s_idatetimes, __pyx_n_s_itimedeltas, __pyx_n_s_seen_float, __pyx_n_s_seen_complex, __pyx_n_s_seen_datetime, __pyx_n_s_seen_timedelta, __pyx_n_s_seen_int, __pyx_n_s_seen_bool, __pyx_n_s_seen_object, __pyx_n_s_seen_null, __pyx_n_s_seen_numeric, __pyx_n_s_val, __pyx_n_s_onan, __pyx_n_s_fval, __pyx_n_s_fnan, __pyx_n_s_datetimes, __pyx_n_s_timedeltas); if (unlikely(!__pyx_tuple__182)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 461; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__182); __Pyx_GIVEREF(__pyx_tuple__182); __pyx_codeobj__183 = (PyObject*)__Pyx_PyCode_New(5, 0, 28, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__182, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pandas_src_inference_pyx, __pyx_n_s_maybe_convert_objects, 461, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__183)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 461; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/inference.pyx":626 * * * def convert_sql_column(x): # <<<<<<<<<<<<<< * return maybe_convert_objects(x, try_float=1) * */ __pyx_tuple__184 = PyTuple_Pack(1, __pyx_n_s_x); if (unlikely(!__pyx_tuple__184)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 626; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__184); __Pyx_GIVEREF(__pyx_tuple__184); __pyx_codeobj__185 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__184, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pandas_src_inference_pyx, __pyx_n_s_convert_sql_column, 626, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__185)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 626; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/inference.pyx":629 * return maybe_convert_objects(x, try_float=1) * * def try_parse_dates(ndarray[object] values, parser=None, # <<<<<<<<<<<<<< * dayfirst=False,default=None): * cdef: */ __pyx_tuple__186 = PyTuple_Pack(11, __pyx_n_s_values, __pyx_n_s_parser, __pyx_n_s_dayfirst, __pyx_n_s_default, __pyx_n_s_i, __pyx_n_s_n, __pyx_n_s_result, __pyx_n_s_date, __pyx_n_s_parse, __pyx_n_s_parse_date, __pyx_n_s_parse_date); if (unlikely(!__pyx_tuple__186)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 629; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__186); __Pyx_GIVEREF(__pyx_tuple__186); __pyx_codeobj__187 = (PyObject*)__Pyx_PyCode_New(4, 0, 11, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__186, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pandas_src_inference_pyx, __pyx_n_s_try_parse_dates, 629, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__187)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 629; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/inference.pyx":677 * return result * * def try_parse_date_and_time(ndarray[object] dates, ndarray[object] times, # <<<<<<<<<<<<<< * date_parser=None, time_parser=None, * dayfirst=False,default=None): */ __pyx_tuple__188 = PyTuple_Pack(20, __pyx_n_s_dates, __pyx_n_s_times, __pyx_n_s_date_parser, __pyx_n_s_time_parser, __pyx_n_s_dayfirst, __pyx_n_s_default, __pyx_n_s_i, __pyx_n_s_n, __pyx_n_s_result, __pyx_n_s_date, __pyx_n_s_time, __pyx_n_s_datetime, __pyx_n_s_timedelta, __pyx_n_s_parse, __pyx_n_s_parse_date, __pyx_n_s_parse_date, __pyx_n_s_parse_time, __pyx_n_s_parse_time, __pyx_n_s_d, __pyx_n_s_t); if (unlikely(!__pyx_tuple__188)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 677; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__188); __Pyx_GIVEREF(__pyx_tuple__188); __pyx_codeobj__189 = (PyObject*)__Pyx_PyCode_New(6, 0, 20, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__188, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pandas_src_inference_pyx, __pyx_n_s_try_parse_date_and_time, 677, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__189)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 677; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/inference.pyx":731 * * * def try_parse_year_month_day(ndarray[object] years, ndarray[object] months, # <<<<<<<<<<<<<< * ndarray[object] days): * cdef: */ __pyx_tuple__190 = PyTuple_Pack(7, __pyx_n_s_years, __pyx_n_s_months, __pyx_n_s_days, __pyx_n_s_i, __pyx_n_s_n, __pyx_n_s_result, __pyx_n_s_datetime); if (unlikely(!__pyx_tuple__190)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 731; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__190); __Pyx_GIVEREF(__pyx_tuple__190); __pyx_codeobj__191 = (PyObject*)__Pyx_PyCode_New(3, 0, 7, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__190, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pandas_src_inference_pyx, __pyx_n_s_try_parse_year_month_day, 731, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__191)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 731; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/inference.pyx":749 * return result * * def try_parse_datetime_components(ndarray[object] years, # <<<<<<<<<<<<<< * ndarray[object] months, * ndarray[object] days, */ __pyx_tuple__192 = PyTuple_Pack(13, __pyx_n_s_years, __pyx_n_s_months, __pyx_n_s_days, __pyx_n_s_hours, __pyx_n_s_minutes, __pyx_n_s_seconds, __pyx_n_s_i, __pyx_n_s_n, __pyx_n_s_result, __pyx_n_s_secs, __pyx_n_s_float_secs, __pyx_n_s_micros, __pyx_n_s_datetime); if (unlikely(!__pyx_tuple__192)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 749; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__192); __Pyx_GIVEREF(__pyx_tuple__192); __pyx_codeobj__193 = (PyObject*)__Pyx_PyCode_New(6, 0, 13, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__192, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pandas_src_inference_pyx, __pyx_n_s_try_parse_datetime_components, 749, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__193)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 749; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/inference.pyx":785 * return result * * def sanitize_objects(ndarray[object] values, set na_values, # <<<<<<<<<<<<<< * convert_empty=True): * cdef: */ __pyx_tuple__194 = PyTuple_Pack(9, __pyx_n_s_values, __pyx_n_s_na_values, __pyx_n_s_convert_empty, __pyx_n_s_i, __pyx_n_s_n, __pyx_n_s_val, __pyx_n_s_onan, __pyx_n_s_na_count, __pyx_n_s_memo); if (unlikely(!__pyx_tuple__194)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 785; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__194); __Pyx_GIVEREF(__pyx_tuple__194); __pyx_codeobj__195 = (PyObject*)__Pyx_PyCode_New(3, 0, 9, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__194, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pandas_src_inference_pyx, __pyx_n_s_sanitize_objects, 785, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__195)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 785; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/inference.pyx":808 * return na_count * * def maybe_convert_bool(ndarray[object] arr, # <<<<<<<<<<<<<< * true_values=None, false_values=None): * cdef: */ __pyx_tuple__196 = PyTuple_Pack(11, __pyx_n_s_arr, __pyx_n_s_true_values, __pyx_n_s_false_values, __pyx_n_s_i, __pyx_n_s_n, __pyx_n_s_result, __pyx_n_s_val, __pyx_n_s_true_vals, __pyx_n_s_false_vals, __pyx_n_s_na_count, __pyx_n_s_mask); if (unlikely(!__pyx_tuple__196)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 808; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__196); __Pyx_GIVEREF(__pyx_tuple__196); __pyx_codeobj__197 = (PyObject*)__Pyx_PyCode_New(3, 0, 11, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__196, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pandas_src_inference_pyx, __pyx_n_s_maybe_convert_bool, 808, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__197)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 808; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/inference.pyx":857 * * * def map_infer_mask(ndarray arr, object f, ndarray[uint8_t] mask, # <<<<<<<<<<<<<< * bint convert=1): * ''' */ __pyx_tuple__198 = PyTuple_Pack(8, __pyx_n_s_arr, __pyx_n_s_f, __pyx_n_s_mask, __pyx_n_s_convert, __pyx_n_s_i, __pyx_n_s_n, __pyx_n_s_result, __pyx_n_s_val); if (unlikely(!__pyx_tuple__198)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 857; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__198); __Pyx_GIVEREF(__pyx_tuple__198); __pyx_codeobj__199 = (PyObject*)__Pyx_PyCode_New(4, 0, 8, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__198, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pandas_src_inference_pyx, __pyx_n_s_map_infer_mask, 857, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__199)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 857; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/inference.pyx":899 * return result * * def map_infer(ndarray arr, object f, bint convert=1): # <<<<<<<<<<<<<< * ''' * Substitute for np.vectorize with pandas-friendly dtype inference */ __pyx_tuple__200 = PyTuple_Pack(7, __pyx_n_s_arr, __pyx_n_s_f, __pyx_n_s_convert, __pyx_n_s_i, __pyx_n_s_n, __pyx_n_s_result, __pyx_n_s_val); if (unlikely(!__pyx_tuple__200)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 899; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__200); __Pyx_GIVEREF(__pyx_tuple__200); __pyx_codeobj__201 = (PyObject*)__Pyx_PyCode_New(3, 0, 7, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__200, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pandas_src_inference_pyx, __pyx_n_s_map_infer, 899, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__201)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 899; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/inference.pyx":938 * * * def to_object_array(list rows): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, j, n, k, tmp */ __pyx_tuple__202 = PyTuple_Pack(8, __pyx_n_s_rows, __pyx_n_s_i, __pyx_n_s_j, __pyx_n_s_n, __pyx_n_s_k, __pyx_n_s_tmp, __pyx_n_s_result, __pyx_n_s_row); if (unlikely(!__pyx_tuple__202)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 938; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__202); __Pyx_GIVEREF(__pyx_tuple__202); __pyx_codeobj__203 = (PyObject*)__Pyx_PyCode_New(1, 0, 8, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__202, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pandas_src_inference_pyx, __pyx_n_s_to_object_array, 938, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__203)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 938; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/inference.pyx":962 * return result * * def tuples_to_object_array(ndarray[object] tuples): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, j, n, k, tmp */ __pyx_tuple__204 = PyTuple_Pack(8, __pyx_n_s_tuples, __pyx_n_s_i, __pyx_n_s_j, __pyx_n_s_n, __pyx_n_s_k, __pyx_n_s_tmp, __pyx_n_s_result, __pyx_n_s_tup); if (unlikely(!__pyx_tuple__204)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 962; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__204); __Pyx_GIVEREF(__pyx_tuple__204); __pyx_codeobj__205 = (PyObject*)__Pyx_PyCode_New(1, 0, 8, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__204, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pandas_src_inference_pyx, __pyx_n_s_tuples_to_object_array, 962, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__205)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 962; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/inference.pyx":978 * return result * * def to_object_array_tuples(list rows): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, j, n, k, tmp */ __pyx_tuple__206 = PyTuple_Pack(8, __pyx_n_s_rows, __pyx_n_s_i, __pyx_n_s_j, __pyx_n_s_n, __pyx_n_s_k, __pyx_n_s_tmp, __pyx_n_s_result, __pyx_n_s_row); if (unlikely(!__pyx_tuple__206)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 978; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__206); __Pyx_GIVEREF(__pyx_tuple__206); __pyx_codeobj__207 = (PyObject*)__Pyx_PyCode_New(1, 0, 8, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__206, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pandas_src_inference_pyx, __pyx_n_s_to_object_array_tuples, 978, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__207)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 978; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/inference.pyx":1009 * * * def fast_multiget(dict mapping, ndarray keys, default=np.nan): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = len(keys) */ __pyx_tuple__208 = PyTuple_Pack(7, __pyx_n_s_mapping, __pyx_n_s_keys, __pyx_n_s_default, __pyx_n_s_i, __pyx_n_s_n, __pyx_n_s_val, __pyx_n_s_output); if (unlikely(!__pyx_tuple__208)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1009; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__208); __Pyx_GIVEREF(__pyx_tuple__208); __pyx_codeobj__209 = (PyObject*)__Pyx_PyCode_New(3, 0, 7, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__208, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pandas_src_inference_pyx, __pyx_n_s_fast_multiget, 1009, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__209)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1009; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __pyx_int_0 = PyInt_FromLong(0); if (unlikely(!__pyx_int_0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_int_1 = PyInt_FromLong(1); if (unlikely(!__pyx_int_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_int_15 = PyInt_FromLong(15); if (unlikely(!__pyx_int_15)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_int_neg_1 = PyInt_FromLong(-1); if (unlikely(!__pyx_int_neg_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} return 0; __pyx_L1_error:; return -1; } #if PY_MAJOR_VERSION < 3 PyMODINIT_FUNC initlib(void); /*proto*/ PyMODINIT_FUNC initlib(void) #else PyMODINIT_FUNC PyInit_lib(void); /*proto*/ PyMODINIT_FUNC PyInit_lib(void) #endif { PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; double __pyx_t_4; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; int __pyx_t_10; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannyDeclarations #if CYTHON_REFNANNY __Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny"); if (!__Pyx_RefNanny) { PyErr_Clear(); __Pyx_RefNanny = __Pyx_RefNannyImportAPI("Cython.Runtime.refnanny"); if (!__Pyx_RefNanny) Py_FatalError("failed to import 'refnanny' module"); } #endif __Pyx_RefNannySetupContext("PyMODINIT_FUNC PyInit_lib(void)", 0); if ( __Pyx_check_binary_version() < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_empty_tuple)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_bytes)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #ifdef __Pyx_CyFunction_USED if (__Pyx_CyFunction_init() < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif #ifdef __Pyx_FusedFunction_USED if (__pyx_FusedFunction_init() < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif #ifdef __Pyx_Generator_USED if (__pyx_Generator_init() < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif /*--- Library function declarations ---*/ /*--- Threads initialization code ---*/ #if defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS #ifdef WITH_THREAD /* Python build with threading support? */ PyEval_InitThreads(); #endif #endif /*--- Module creation code ---*/ #if PY_MAJOR_VERSION < 3 __pyx_m = Py_InitModule4(__Pyx_NAMESTR("lib"), __pyx_methods, 0, 0, PYTHON_API_VERSION); Py_XINCREF(__pyx_m); #else __pyx_m = PyModule_Create(&__pyx_moduledef); #endif if (unlikely(!__pyx_m)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_d)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} Py_INCREF(__pyx_d); __pyx_b = PyImport_AddModule(__Pyx_NAMESTR(__Pyx_BUILTIN_MODULE_NAME)); if (unlikely(!__pyx_b)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #if CYTHON_COMPILING_IN_PYPY Py_INCREF(__pyx_b); #endif if (__Pyx_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; /*--- Initialize various global constants etc. ---*/ if (unlikely(__Pyx_InitGlobals() < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif if (__pyx_module_is_main_pandas__lib) { if (__Pyx_SetAttrString(__pyx_m, "__name__", __pyx_n_s_main) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; } #if PY_MAJOR_VERSION >= 3 { PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (!PyDict_GetItemString(modules, "pandas.lib")) { if (unlikely(PyDict_SetItemString(modules, "pandas.lib", __pyx_m) < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } } #endif /*--- Builtin init code ---*/ if (unlikely(__Pyx_InitCachedBuiltins() < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /*--- Constants init code ---*/ if (unlikely(__Pyx_InitCachedConstants() < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /*--- Global init code ---*/ /*--- Variable export code ---*/ /*--- Function export code ---*/ /*--- Type init code ---*/ __pyx_vtabptr_6pandas_3lib_BlockSlider = &__pyx_vtable_6pandas_3lib_BlockSlider; __pyx_vtable_6pandas_3lib_BlockSlider.move = (PyObject *(*)(struct __pyx_obj_6pandas_3lib_BlockSlider *, int, int, int __pyx_skip_dispatch))__pyx_f_6pandas_3lib_11BlockSlider_move; __pyx_vtable_6pandas_3lib_BlockSlider.reset = (PyObject *(*)(struct __pyx_obj_6pandas_3lib_BlockSlider *))__pyx_f_6pandas_3lib_11BlockSlider_reset; if (PyType_Ready(&__pyx_type_6pandas_3lib_BlockSlider) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 529; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_type_6pandas_3lib_BlockSlider.tp_print = 0; if (__Pyx_SetVtable(__pyx_type_6pandas_3lib_BlockSlider.tp_dict, __pyx_vtabptr_6pandas_3lib_BlockSlider) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 529; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__Pyx_SetAttrString(__pyx_m, "BlockSlider", (PyObject *)&__pyx_type_6pandas_3lib_BlockSlider) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 529; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_6pandas_3lib_BlockSlider = &__pyx_type_6pandas_3lib_BlockSlider; if (PyType_Ready(&__pyx_type_6pandas_3lib_SeriesBinGrouper) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_type_6pandas_3lib_SeriesBinGrouper.tp_print = 0; if (__Pyx_SetAttrString(__pyx_m, "SeriesBinGrouper", (PyObject *)&__pyx_type_6pandas_3lib_SeriesBinGrouper) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_6pandas_3lib_SeriesBinGrouper = &__pyx_type_6pandas_3lib_SeriesBinGrouper; if (PyType_Ready(&__pyx_type_6pandas_3lib_cache_readonly) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 4; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_type_6pandas_3lib_cache_readonly.tp_print = 0; if (__Pyx_SetAttrString(__pyx_m, "cache_readonly", (PyObject *)&__pyx_type_6pandas_3lib_cache_readonly) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 4; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_6pandas_3lib_cache_readonly = &__pyx_type_6pandas_3lib_cache_readonly; if (PyType_Ready(&__pyx_type_6pandas_3lib_AxisProperty) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 53; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_type_6pandas_3lib_AxisProperty.tp_print = 0; if (__Pyx_SetAttrString(__pyx_m, "AxisProperty", (PyObject *)&__pyx_type_6pandas_3lib_AxisProperty) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 53; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_6pandas_3lib_AxisProperty = &__pyx_type_6pandas_3lib_AxisProperty; if (PyType_Ready(&__pyx_type_6pandas_3lib___pyx_scope_struct_1_try_parse_date_and_time) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 677; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_type_6pandas_3lib___pyx_scope_struct_1_try_parse_date_and_time.tp_print = 0; __pyx_ptype_6pandas_3lib___pyx_scope_struct_1_try_parse_date_and_time = &__pyx_type_6pandas_3lib___pyx_scope_struct_1_try_parse_date_and_time; if (PyType_Ready(&__pyx_type_6pandas_3lib_SeriesGrouper) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 285; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_type_6pandas_3lib_SeriesGrouper.tp_print = 0; if (__Pyx_SetAttrString(__pyx_m, "SeriesGrouper", (PyObject *)&__pyx_type_6pandas_3lib_SeriesGrouper) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 285; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_6pandas_3lib_SeriesGrouper = &__pyx_type_6pandas_3lib_SeriesGrouper; if (PyType_Ready(&__pyx_type_6pandas_3lib___pyx_scope_struct__try_parse_dates) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 629; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_type_6pandas_3lib___pyx_scope_struct__try_parse_dates.tp_print = 0; __pyx_ptype_6pandas_3lib___pyx_scope_struct__try_parse_dates = &__pyx_type_6pandas_3lib___pyx_scope_struct__try_parse_dates; if (PyType_Ready(&__pyx_type_6pandas_3lib__PandasNull) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1056; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_type_6pandas_3lib__PandasNull.tp_print = 0; if (__Pyx_SetAttrString(__pyx_m, "_PandasNull", (PyObject *)&__pyx_type_6pandas_3lib__PandasNull) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1056; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_6pandas_3lib__PandasNull = &__pyx_type_6pandas_3lib__PandasNull; if (PyType_Ready(&__pyx_type_6pandas_3lib_Reducer) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 9; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_type_6pandas_3lib_Reducer.tp_print = 0; if (__Pyx_SetAttrString(__pyx_m, "Reducer", (PyObject *)&__pyx_type_6pandas_3lib_Reducer) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 9; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_6pandas_3lib_Reducer = &__pyx_type_6pandas_3lib_Reducer; __pyx_vtabptr_6pandas_3lib_Slider = &__pyx_vtable_6pandas_3lib_Slider; __pyx_vtable_6pandas_3lib_Slider.advance = (PyObject *(*)(struct __pyx_obj_6pandas_3lib_Slider *, Py_ssize_t, int __pyx_skip_dispatch))__pyx_f_6pandas_3lib_6Slider_advance; __pyx_vtable_6pandas_3lib_Slider.move = (PyObject *(*)(struct __pyx_obj_6pandas_3lib_Slider *, int, int))__pyx_f_6pandas_3lib_6Slider_move; __pyx_vtable_6pandas_3lib_Slider.set_length = (PyObject *(*)(struct __pyx_obj_6pandas_3lib_Slider *, Py_ssize_t, int __pyx_skip_dispatch))__pyx_f_6pandas_3lib_6Slider_set_length; __pyx_vtable_6pandas_3lib_Slider.reset = (PyObject *(*)(struct __pyx_obj_6pandas_3lib_Slider *, int __pyx_skip_dispatch))__pyx_f_6pandas_3lib_6Slider_reset; if (PyType_Ready(&__pyx_type_6pandas_3lib_Slider) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 426; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_type_6pandas_3lib_Slider.tp_print = 0; if (__Pyx_SetVtable(__pyx_type_6pandas_3lib_Slider.tp_dict, __pyx_vtabptr_6pandas_3lib_Slider) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 426; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__Pyx_SetAttrString(__pyx_m, "Slider", (PyObject *)&__pyx_type_6pandas_3lib_Slider) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 426; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_6pandas_3lib_Slider = &__pyx_type_6pandas_3lib_Slider; /*--- Type import code ---*/ __pyx_ptype_5numpy_dtype = __Pyx_ImportType("numpy", "dtype", sizeof(PyArray_Descr), 0); if (unlikely(!__pyx_ptype_5numpy_dtype)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_5numpy_flatiter = __Pyx_ImportType("numpy", "flatiter", sizeof(PyArrayIterObject), 0); if (unlikely(!__pyx_ptype_5numpy_flatiter)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 167; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_5numpy_broadcast = __Pyx_ImportType("numpy", "broadcast", sizeof(PyArrayMultiIterObject), 0); if (unlikely(!__pyx_ptype_5numpy_broadcast)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 171; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_5numpy_ndarray = __Pyx_ImportType("numpy", "ndarray", sizeof(PyArrayObject), 0); if (unlikely(!__pyx_ptype_5numpy_ndarray)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_5numpy_ufunc = __Pyx_ImportType("numpy", "ufunc", sizeof(PyUFuncObject), 0); if (unlikely(!__pyx_ptype_5numpy_ufunc)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 865; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_7cpython_4type_type = __Pyx_ImportType(__Pyx_BUILTIN_MODULE_NAME, "type", #if CYTHON_COMPILING_IN_PYPY sizeof(PyTypeObject), #else sizeof(PyHeapTypeObject), #endif 0); if (unlikely(!__pyx_ptype_7cpython_4type_type)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 9; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_7cpython_4bool_bool = __Pyx_ImportType(__Pyx_BUILTIN_MODULE_NAME, "bool", sizeof(PyBoolObject), 0); if (unlikely(!__pyx_ptype_7cpython_4bool_bool)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 8; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_7cpython_7complex_complex = __Pyx_ImportType(__Pyx_BUILTIN_MODULE_NAME, "complex", sizeof(PyComplexObject), 0); if (unlikely(!__pyx_ptype_7cpython_7complex_complex)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 15; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_8datetime_date = __Pyx_ImportType("datetime", "date", sizeof(PyDateTime_Date), 0); if (unlikely(!__pyx_ptype_8datetime_date)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 15; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_8datetime_datetime = __Pyx_ImportType("datetime", "datetime", sizeof(PyDateTime_DateTime), 0); if (unlikely(!__pyx_ptype_8datetime_datetime)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 18; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_8datetime_timedelta = __Pyx_ImportType("datetime", "timedelta", sizeof(PyDateTime_Delta), 0); if (unlikely(!__pyx_ptype_8datetime_timedelta)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 21; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /*--- Variable import code ---*/ /*--- Function import code ---*/ __pyx_t_1 = __Pyx_ImportModule("pandas.tslib"); if (!__pyx_t_1) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__Pyx_ImportFunction(__pyx_t_1, "convert_to_tsobject", (void (**)(void))&__pyx_f_6pandas_5tslib_convert_to_tsobject, "PyObject *(PyObject *, PyObject *, PyObject *)") < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__Pyx_ImportFunction(__pyx_t_1, "convert_to_timedelta64", (void (**)(void))&__pyx_f_6pandas_5tslib_convert_to_timedelta64, "PyObject *(PyObject *, PyObject *, PyObject *)") < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} Py_DECREF(__pyx_t_1); __pyx_t_1 = 0; /*--- Execution code ---*/ /* "pandas/lib.pyx":3 * cimport numpy as np * cimport cython * import numpy as np # <<<<<<<<<<<<<< * * from numpy cimport * */ __pyx_t_2 = __Pyx_Import(__pyx_n_s_numpy, 0, -1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_np, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/lib.pyx":24 * cimport cpython * * isnan = np.isnan # <<<<<<<<<<<<<< * cdef double NaN = np.NaN * cdef double nan = NaN */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 24; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_isnan); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 24; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (PyDict_SetItem(__pyx_d, __pyx_n_s_isnan, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 24; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/lib.pyx":25 * * isnan = np.isnan * cdef double NaN = np.NaN # <<<<<<<<<<<<<< * cdef double nan = NaN * cdef double NAN = nan */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 25; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_NaN); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 25; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_4 = __pyx_PyFloat_AsDouble(__pyx_t_2); if (unlikely((__pyx_t_4 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 25; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_6pandas_3lib_NaN = ((double)__pyx_t_4); /* "pandas/lib.pyx":26 * isnan = np.isnan * cdef double NaN = np.NaN * cdef double nan = NaN # <<<<<<<<<<<<<< * cdef double NAN = nan * */ __pyx_v_6pandas_3lib_nan = __pyx_v_6pandas_3lib_NaN; /* "pandas/lib.pyx":27 * cdef double NaN = np.NaN * cdef double nan = NaN * cdef double NAN = nan # <<<<<<<<<<<<<< * * from datetime import datetime as pydatetime */ __pyx_v_6pandas_3lib_NAN = __pyx_v_6pandas_3lib_nan; /* "pandas/lib.pyx":29 * cdef double NAN = nan * * from datetime import datetime as pydatetime # <<<<<<<<<<<<<< * * # this is our tseries.pxd */ __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 29; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_n_s_datetime); PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_datetime); __Pyx_GIVEREF(__pyx_n_s_datetime); __pyx_t_3 = __Pyx_Import(__pyx_n_s_datetime, __pyx_t_2, -1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 29; __pyx_clineno = __LINE__; goto __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_datetime); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 29; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_pydatetime, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 29; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/lib.pyx":35 * * from tslib cimport convert_to_tsobject, convert_to_timedelta64 * import tslib # <<<<<<<<<<<<<< * from tslib import NaT, Timestamp, repr_timedelta64 * */ __pyx_t_3 = __Pyx_Import(__pyx_n_s_tslib, 0, -1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_tslib, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/lib.pyx":36 * from tslib cimport convert_to_tsobject, convert_to_timedelta64 * import tslib * from tslib import NaT, Timestamp, repr_timedelta64 # <<<<<<<<<<<<<< * * cdef int64_t NPY_NAT = util.get_nat() */ __pyx_t_3 = PyList_New(3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 36; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_n_s_NaT); PyList_SET_ITEM(__pyx_t_3, 0, __pyx_n_s_NaT); __Pyx_GIVEREF(__pyx_n_s_NaT); __Pyx_INCREF(__pyx_n_s_Timestamp); PyList_SET_ITEM(__pyx_t_3, 1, __pyx_n_s_Timestamp); __Pyx_GIVEREF(__pyx_n_s_Timestamp); __Pyx_INCREF(__pyx_n_s_repr_timedelta64); PyList_SET_ITEM(__pyx_t_3, 2, __pyx_n_s_repr_timedelta64); __Pyx_GIVEREF(__pyx_n_s_repr_timedelta64); __pyx_t_2 = __Pyx_Import(__pyx_n_s_tslib, __pyx_t_3, -1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 36; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_NaT); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 36; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_NaT, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 36; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_Timestamp); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 36; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_Timestamp, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 36; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_repr_timedelta64); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 36; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_repr_timedelta64, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 36; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/lib.pyx":38 * from tslib import NaT, Timestamp, repr_timedelta64 * * cdef int64_t NPY_NAT = util.get_nat() # <<<<<<<<<<<<<< * * ctypedef unsigned char UChar */ __pyx_v_6pandas_3lib_NPY_NAT = get_nat(); /* "pandas/lib.pyx":56 * * # import datetime C API * PyDateTime_IMPORT # <<<<<<<<<<<<<< * * # initialize numpy */ PyDateTime_IMPORT; /* "pandas/lib.pyx":59 * * # initialize numpy * import_array() # <<<<<<<<<<<<<< * import_ufunc() * */ import_array(); /* "pandas/lib.pyx":60 * # initialize numpy * import_array() * import_ufunc() # <<<<<<<<<<<<<< * * cpdef map_indices_list(list index): */ import_ufunc(); /* "pandas/lib.pyx":85 * from libc.stdlib cimport malloc, free * * def ismember(ndarray arr, set values): # <<<<<<<<<<<<<< * ''' * Checks whether */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_3ismember, NULL, __pyx_n_s_pandas_lib); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_ismember, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/lib.pyx":117 * # datetime / io related * * cdef int _EPOCH_ORD = 719163 # <<<<<<<<<<<<<< * * from datetime import date as pydate */ __pyx_v_6pandas_3lib__EPOCH_ORD = 719163; /* "pandas/lib.pyx":119 * cdef int _EPOCH_ORD = 719163 * * from datetime import date as pydate # <<<<<<<<<<<<<< * * cdef inline int64_t gmtime(object date): */ __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 119; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_n_s_date); PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_date); __Pyx_GIVEREF(__pyx_n_s_date); __pyx_t_3 = __Pyx_Import(__pyx_n_s_datetime, __pyx_t_2, -1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 119; __pyx_clineno = __LINE__; goto __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_date); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 119; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_pydate, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 119; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/lib.pyx":140 * return gmtime(dt) * * def array_to_timestamp(ndarray[object, ndim=1] arr): # <<<<<<<<<<<<<< * cdef int i, n * cdef ndarray[int64_t, ndim=1] result */ __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_9array_to_timestamp, NULL, __pyx_n_s_pandas_lib); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 140; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_array_to_timestamp, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 140; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/lib.pyx":152 * return result * * def time64_to_datetime(ndarray[int64_t, ndim=1] arr): # <<<<<<<<<<<<<< * cdef int i, n * cdef ndarray[object, ndim=1] result */ __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_11time64_to_datetime, NULL, __pyx_n_s_pandas_lib); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 152; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_time64_to_datetime, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 152; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/lib.pyx":170 * # isnull / notnull related * * cdef double INF = np.inf # <<<<<<<<<<<<<< * cdef double NEGINF = -INF * */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 170; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_inf); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 170; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_4 = __pyx_PyFloat_AsDouble(__pyx_t_2); if (unlikely((__pyx_t_4 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 170; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_6pandas_3lib_INF = ((double)__pyx_t_4); /* "pandas/lib.pyx":171 * * cdef double INF = np.inf * cdef double NEGINF = -INF # <<<<<<<<<<<<<< * * cpdef checknull(object val): */ __pyx_v_6pandas_3lib_NEGINF = (-__pyx_v_6pandas_3lib_INF); /* "pandas/lib.pyx":201 * return util._checknull(val) * * def isscalar(object val): # <<<<<<<<<<<<<< * return np.isscalar(val) or val is None or PyDateTime_Check(val) * */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_17isscalar, NULL, __pyx_n_s_pandas_lib); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 201; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_isscalar, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 201; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/lib.pyx":207 * @cython.wraparound(False) * @cython.boundscheck(False) * def isnullobj(ndarray[object] arr): # <<<<<<<<<<<<<< * cdef Py_ssize_t i, n * cdef object val */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_19isnullobj, NULL, __pyx_n_s_pandas_lib); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 207; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_isnullobj, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 207; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/lib.pyx":221 * @cython.wraparound(False) * @cython.boundscheck(False) * def isnullobj_old(ndarray[object] arr): # <<<<<<<<<<<<<< * cdef Py_ssize_t i, n * cdef object val */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_21isnullobj_old, NULL, __pyx_n_s_pandas_lib); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 221; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_isnullobj_old, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 221; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/lib.pyx":235 * @cython.wraparound(False) * @cython.boundscheck(False) * def isnullobj2d(ndarray[object, ndim=2] arr): # <<<<<<<<<<<<<< * cdef Py_ssize_t i, j, n, m * cdef object val */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_23isnullobj2d, NULL, __pyx_n_s_pandas_lib); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 235; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_isnullobj2d, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 235; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/lib.pyx":251 * @cython.wraparound(False) * @cython.boundscheck(False) * def isnullobj_old(ndarray[object] arr): # <<<<<<<<<<<<<< * cdef Py_ssize_t i, n * cdef object val */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_25isnullobj_old, NULL, __pyx_n_s_pandas_lib); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 251; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_isnullobj_old, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 251; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/lib.pyx":265 * @cython.wraparound(False) * @cython.boundscheck(False) * def isnullobj2d_old(ndarray[object, ndim=2] arr): # <<<<<<<<<<<<<< * cdef Py_ssize_t i, j, n, m * cdef object val */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_27isnullobj2d_old, NULL, __pyx_n_s_pandas_lib); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 265; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_isnullobj2d_old, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 265; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/lib.pyx":279 * return result.view(np.bool_) * * def list_to_object_array(list obj): # <<<<<<<<<<<<<< * ''' * Convert list to object ndarray. Seriously can't believe I had to write this */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_29list_to_object_array, NULL, __pyx_n_s_pandas_lib); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 279; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_list_to_object_array, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 279; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/lib.pyx":299 * @cython.wraparound(False) * @cython.boundscheck(False) * def fast_unique(ndarray[object] values): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = len(values) */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_31fast_unique, NULL, __pyx_n_s_pandas_lib); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 299; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_fast_unique, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 299; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/lib.pyx":320 * @cython.wraparound(False) * @cython.boundscheck(False) * def fast_unique_multiple(list arrays): # <<<<<<<<<<<<<< * cdef: * ndarray[object] buf */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_33fast_unique_multiple, NULL, __pyx_n_s_pandas_lib); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 320; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_fast_unique_multiple, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 320; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/lib.pyx":346 * @cython.wraparound(False) * @cython.boundscheck(False) * def fast_unique_multiple_list(list lists): # <<<<<<<<<<<<<< * cdef: * list buf */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_35fast_unique_multiple_list, NULL, __pyx_n_s_pandas_lib); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 346; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_fast_unique_multiple_list, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 346; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/lib.pyx":372 * @cython.wraparound(False) * @cython.boundscheck(False) * def fast_unique_multiple_list_gen(object gen): # <<<<<<<<<<<<<< * cdef: * list buf */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_37fast_unique_multiple_list_gen, NULL, __pyx_n_s_pandas_lib); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 372; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_fast_unique_multiple_list_gen, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 372; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/lib.pyx":397 * @cython.wraparound(False) * @cython.boundscheck(False) * def dicts_to_array(list dicts, list columns): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, j, k, n */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_39dicts_to_array, NULL, __pyx_n_s_pandas_lib); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 397; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_dicts_to_array, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 397; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/lib.pyx":420 * return result * * def fast_zip(list ndarrays): # <<<<<<<<<<<<<< * ''' * For zipping multiple ndarrays into an ndarray of tuples */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_41fast_zip, NULL, __pyx_n_s_pandas_lib); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 420; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_fast_zip, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 420; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/lib.pyx":461 * return result * * def get_reverse_indexer(ndarray[int64_t] indexer, Py_ssize_t length): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = len(indexer) */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_43get_reverse_indexer, NULL, __pyx_n_s_pandas_lib); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 461; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_get_reverse_indexer, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 461; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/lib.pyx":477 * * * def has_infs_f4(ndarray[float32_t] arr): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = len(arr) */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_45has_infs_f4, NULL, __pyx_n_s_pandas_lib); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 477; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_has_infs_f4, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 477; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/lib.pyx":491 * return False * * def has_infs_f8(ndarray[float64_t] arr): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = len(arr) */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_47has_infs_f8, NULL, __pyx_n_s_pandas_lib); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 491; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_has_infs_f8, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 491; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/lib.pyx":505 * return False * * def convert_timestamps(ndarray values): # <<<<<<<<<<<<<< * cdef: * object val, f, result */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_49convert_timestamps, NULL, __pyx_n_s_pandas_lib); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 505; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_convert_timestamps, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 505; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/lib.pyx":528 * return out * * def maybe_indices_to_slice(ndarray[int64_t] indices): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = len(indices) */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_51maybe_indices_to_slice, NULL, __pyx_n_s_pandas_lib); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 528; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_maybe_indices_to_slice, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 528; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/lib.pyx":541 * * * def maybe_booleans_to_slice(ndarray[uint8_t] mask): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = len(mask) */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_53maybe_booleans_to_slice, NULL, __pyx_n_s_pandas_lib); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 541; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_maybe_booleans_to_slice, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 541; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/lib.pyx":572 * @cython.wraparound(False) * @cython.boundscheck(False) * def scalar_compare(ndarray[object] values, object val, object op): # <<<<<<<<<<<<<< * import operator * cdef: */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_55scalar_compare, NULL, __pyx_n_s_pandas_lib); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 572; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_scalar_compare, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 572; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/lib.pyx":616 * @cython.wraparound(False) * @cython.boundscheck(False) * def vec_compare(ndarray[object] left, ndarray[object] right, object op): # <<<<<<<<<<<<<< * import operator * cdef: */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_57vec_compare, NULL, __pyx_n_s_pandas_lib); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 616; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_vec_compare, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 616; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/lib.pyx":668 * @cython.wraparound(False) * @cython.boundscheck(False) * def scalar_binop(ndarray[object] values, object val, object op): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = len(values) */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_59scalar_binop, NULL, __pyx_n_s_pandas_lib); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 668; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_scalar_binop, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 668; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/lib.pyx":690 * @cython.wraparound(False) * @cython.boundscheck(False) * def vec_binop(ndarray[object] left, ndarray[object] right, object op): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = len(left) */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_61vec_binop, NULL, __pyx_n_s_pandas_lib); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 690; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_vec_binop, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 690; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/lib.pyx":717 * * * def astype_intsafe(ndarray[object] arr, new_dtype): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = len(arr) */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_63astype_intsafe, NULL, __pyx_n_s_pandas_lib); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 717; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_astype_intsafe, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 717; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/lib.pyx":747 * return result * * def clean_index_list(list obj): # <<<<<<<<<<<<<< * ''' * Utility used in pandas.core.index._ensure_index */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_67clean_index_list, NULL, __pyx_n_s_pandas_lib); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 747; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_clean_index_list, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 747; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/lib.pyx":778 * @cython.boundscheck(False) * @cython.wraparound(False) * def max_len_string_array(ndarray[object, ndim=1] arr): # <<<<<<<<<<<<<< * """ return the maximum size of elements in a 1-dim string array """ * cdef: */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_69max_len_string_array, NULL, __pyx_n_s_pandas_lib); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 778; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_max_len_string_array, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 778; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/lib.pyx":798 * @cython.boundscheck(False) * @cython.wraparound(False) * def string_array_replace_from_nan_rep(ndarray[object, ndim=1] arr, object nan_rep, object replace = None): # <<<<<<<<<<<<<< * """ replace the values in the array with replacement if they are nan_rep; return the same array """ * */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_71string_array_replace_from_nan_rep, NULL, __pyx_n_s_pandas_lib); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 798; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_string_array_replace_from_nan_re, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 798; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/lib.pyx":813 * @cython.boundscheck(False) * @cython.wraparound(False) * def write_csv_rows(list data, list data_index, int nlevels, list cols, object writer): # <<<<<<<<<<<<<< * * cdef int N, j, i, ncols */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_73write_csv_rows, NULL, __pyx_n_s_pandas_lib); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 813; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_write_csv_rows, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 813; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/lib.pyx":861 * * @cython.boundscheck(False) * def arrmap(ndarray[object] index, object func): # <<<<<<<<<<<<<< * cdef int length = index.shape[0] * cdef int i = 0 */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_75arrmap, NULL, __pyx_n_s_pandas_lib); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 861; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_arrmap, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 861; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/lib.pyx":874 * @cython.wraparound(False) * @cython.boundscheck(False) * def is_lexsorted(list list_of_arrays): # <<<<<<<<<<<<<< * cdef: * int i */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_77is_lexsorted, NULL, __pyx_n_s_pandas_lib); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 874; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_is_lexsorted, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 874; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/lib.pyx":913 * @cython.boundscheck(False) * @cython.wraparound(False) * def generate_bins_dt64(ndarray[int64_t] values, ndarray[int64_t] binner, # <<<<<<<<<<<<<< * object closed='left'): * """ */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_79generate_bins_dt64, NULL, __pyx_n_s_pandas_lib); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 913; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_generate_bins_dt64, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 913; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/lib.pyx":962 * @cython.boundscheck(False) * @cython.wraparound(False) * def row_bool_subset(ndarray[float64_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[uint8_t, cast=True] mask): * cdef: */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_81row_bool_subset, NULL, __pyx_n_s_pandas_lib); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 962; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_row_bool_subset, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 962; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/lib.pyx":983 * @cython.boundscheck(False) * @cython.wraparound(False) * def row_bool_subset_object(ndarray[object, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[uint8_t, cast=True] mask): * cdef: */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_83row_bool_subset_object, NULL, __pyx_n_s_pandas_lib); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 983; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_row_bool_subset_object, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 983; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/lib.pyx":1003 * * * def group_count(ndarray[int64_t] values, Py_ssize_t size): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = len(values) */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_85group_count, NULL, __pyx_n_s_pandas_lib); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1003; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_group_count, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1003; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/lib.pyx":1013 * return counts * * def lookup_values(ndarray[object] values, dict mapping): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = len(values) */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_87lookup_values, NULL, __pyx_n_s_pandas_lib); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1013; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_lookup_values, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1013; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/lib.pyx":1023 * * * def count_level_1d(ndarray[uint8_t, cast=True] mask, # <<<<<<<<<<<<<< * ndarray[int64_t] labels, Py_ssize_t max_bin): * cdef: */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_89count_level_1d, NULL, __pyx_n_s_pandas_lib); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1023; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_count_level_1d, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1023; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/lib.pyx":1040 * * * def count_level_2d(ndarray[uint8_t, ndim=2, cast=True] mask, # <<<<<<<<<<<<<< * ndarray[int64_t] labels, Py_ssize_t max_bin): * cdef: */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_91count_level_2d, NULL, __pyx_n_s_pandas_lib); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1040; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_count_level_2d, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1040; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/lib.pyx":1069 * return 0 * * pandas_null = _PandasNull() # <<<<<<<<<<<<<< * * def fast_zip_fillna(list ndarrays, fill_value=pandas_null): */ __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_6pandas_3lib__PandasNull)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1069; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_pandas_null, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1069; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/lib.pyx":1071 * pandas_null = _PandasNull() * * def fast_zip_fillna(list ndarrays, fill_value=pandas_null): # <<<<<<<<<<<<<< * ''' * For zipping multiple ndarrays into an ndarray of tuples */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_pandas_null); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1071; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_k__10 = __pyx_t_2; __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_93fast_zip_fillna, NULL, __pyx_n_s_pandas_lib); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1071; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_fast_zip_fillna, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1071; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/lib.pyx":1118 * return result * * def duplicated(ndarray[object] values, take_last=False): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_95duplicated, NULL, __pyx_n_s_pandas_lib); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1118; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_duplicated, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1118; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/lib.pyx":1147 * return result.view(np.bool_) * * def generate_slices(ndarray[int64_t] labels, Py_ssize_t ngroups): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, group_size, n, lab, start */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_97generate_slices, NULL, __pyx_n_s_pandas_lib); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1147; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_generate_slices, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1147; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/lib.pyx":1172 * * * def indices_fast(object index, ndarray[int64_t] labels, list keys, # <<<<<<<<<<<<<< * list sorted_labels): * cdef: */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_99indices_fast, NULL, __pyx_n_s_pandas_lib); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1172; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_indices_fast, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1172; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/reduce.pyx":3 * #cython=False * from numpy cimport * * import numpy as np # <<<<<<<<<<<<<< * * from distutils.version import LooseVersion */ __pyx_t_2 = __Pyx_Import(__pyx_n_s_numpy, 0, -1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_np, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/reduce.pyx":5 * import numpy as np * * from distutils.version import LooseVersion # <<<<<<<<<<<<<< * * is_numpy_prior_1_6_2 = LooseVersion(np.__version__) < '1.6.2' */ __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 5; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_n_s_LooseVersion); PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_LooseVersion); __Pyx_GIVEREF(__pyx_n_s_LooseVersion); __pyx_t_3 = __Pyx_Import(__pyx_n_s_distutils_version, __pyx_t_2, -1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 5; __pyx_clineno = __LINE__; goto __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_LooseVersion); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 5; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_LooseVersion, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 5; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/reduce.pyx":7 * from distutils.version import LooseVersion * * is_numpy_prior_1_6_2 = LooseVersion(np.__version__) < '1.6.2' # <<<<<<<<<<<<<< * * cdef class Reducer: */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_LooseVersion); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 7; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 7; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_version); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 7; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 7; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyObject_Call(__pyx_t_3, __pyx_t_2, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 7; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_RichCompare(__pyx_t_5, __pyx_kp_s_1_6_2, Py_LT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 7; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_d, __pyx_n_s_is_numpy_prior_1_6_2, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 7; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/reduce.pyx":471 * * * class InvalidApply(Exception): # <<<<<<<<<<<<<< * pass * */ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 471; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_builtin_Exception); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_builtin_Exception); __Pyx_GIVEREF(__pyx_builtin_Exception); __pyx_t_5 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 471; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_5, __pyx_t_2, __pyx_n_s_InvalidApply, __pyx_n_s_InvalidApply, (PyObject *) NULL, __pyx_n_s_pandas_lib, (PyObject *) NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 471; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_6 = __Pyx_Py3ClassCreate(__pyx_t_5, __pyx_n_s_InvalidApply, __pyx_t_2, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 471; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); if (PyDict_SetItem(__pyx_d, __pyx_n_s_InvalidApply, __pyx_t_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 471; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/reduce.pyx":474 * pass * * def apply_frame_axis0(object frame, object f, object names, # <<<<<<<<<<<<<< * ndarray[int64_t] starts, ndarray[int64_t] ends): * cdef: */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_101apply_frame_axis0, NULL, __pyx_n_s_pandas_lib); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 474; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_apply_frame_axis0, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 474; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/reduce.pyx":591 * * * def reduce(arr, f, axis=0, dummy=None, labels=None): # <<<<<<<<<<<<<< * if labels._has_complex_internals: * raise Exception('Cannot use shortcut') */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_103reduce, NULL, __pyx_n_s_pandas_lib); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 591; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 591; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/inference.pyx":2 * cimport util * from tslib import NaT # <<<<<<<<<<<<<< * from datetime import datetime, timedelta * iNaT = util.get_nat() */ __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_n_s_NaT); PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_NaT); __Pyx_GIVEREF(__pyx_n_s_NaT); __pyx_t_5 = __Pyx_Import(__pyx_n_s_tslib, __pyx_t_2, -1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_5, __pyx_n_s_NaT); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_NaT, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "pandas/src/inference.pyx":3 * cimport util * from tslib import NaT * from datetime import datetime, timedelta # <<<<<<<<<<<<<< * iNaT = util.get_nat() * */ __pyx_t_5 = PyList_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_n_s_datetime); PyList_SET_ITEM(__pyx_t_5, 0, __pyx_n_s_datetime); __Pyx_GIVEREF(__pyx_n_s_datetime); __Pyx_INCREF(__pyx_n_s_timedelta); PyList_SET_ITEM(__pyx_t_5, 1, __pyx_n_s_timedelta); __Pyx_GIVEREF(__pyx_n_s_timedelta); __pyx_t_2 = __Pyx_Import(__pyx_n_s_datetime, __pyx_t_5, -1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/inference.pyx":4 * from tslib import NaT * from datetime import datetime, timedelta * iNaT = util.get_nat() # <<<<<<<<<<<<<< * * _TYPE_MAP = { */ __pyx_t_2 = __Pyx_PyInt_From_npy_int64(get_nat()); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_iNaT, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/inference.pyx":6 * iNaT = util.get_nat() * * _TYPE_MAP = { # <<<<<<<<<<<<<< * np.int8: 'integer', * np.int16: 'integer', */ __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 6; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); /* "pandas/src/inference.pyx":7 * * _TYPE_MAP = { * np.int8: 'integer', # <<<<<<<<<<<<<< * np.int16: 'integer', * np.int32: 'integer', */ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 7; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_int8); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 7; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_2, __pyx_t_3, __pyx_n_s_integer) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 6; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/inference.pyx":8 * _TYPE_MAP = { * np.int8: 'integer', * np.int16: 'integer', # <<<<<<<<<<<<<< * np.int32: 'integer', * np.int64: 'integer', */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 8; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_int16); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 8; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (PyDict_SetItem(__pyx_t_2, __pyx_t_5, __pyx_n_s_integer) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 6; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "pandas/src/inference.pyx":9 * np.int8: 'integer', * np.int16: 'integer', * np.int32: 'integer', # <<<<<<<<<<<<<< * np.int64: 'integer', * np.uint8: 'integer', */ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 9; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_int32); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 9; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_2, __pyx_t_3, __pyx_n_s_integer) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 6; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/inference.pyx":10 * np.int16: 'integer', * np.int32: 'integer', * np.int64: 'integer', # <<<<<<<<<<<<<< * np.uint8: 'integer', * np.uint16: 'integer', */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 10; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_int64); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 10; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (PyDict_SetItem(__pyx_t_2, __pyx_t_5, __pyx_n_s_integer) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 6; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "pandas/src/inference.pyx":11 * np.int32: 'integer', * np.int64: 'integer', * np.uint8: 'integer', # <<<<<<<<<<<<<< * np.uint16: 'integer', * np.uint32: 'integer', */ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 11; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_uint8); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 11; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_2, __pyx_t_3, __pyx_n_s_integer) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 6; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/inference.pyx":12 * np.int64: 'integer', * np.uint8: 'integer', * np.uint16: 'integer', # <<<<<<<<<<<<<< * np.uint32: 'integer', * np.uint64: 'integer', */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 12; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_uint16); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 12; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (PyDict_SetItem(__pyx_t_2, __pyx_t_5, __pyx_n_s_integer) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 6; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "pandas/src/inference.pyx":13 * np.uint8: 'integer', * np.uint16: 'integer', * np.uint32: 'integer', # <<<<<<<<<<<<<< * np.uint64: 'integer', * np.float32: 'floating', */ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 13; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_uint32); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 13; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_2, __pyx_t_3, __pyx_n_s_integer) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 6; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/inference.pyx":14 * np.uint16: 'integer', * np.uint32: 'integer', * np.uint64: 'integer', # <<<<<<<<<<<<<< * np.float32: 'floating', * np.float64: 'floating', */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 14; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_uint64); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 14; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (PyDict_SetItem(__pyx_t_2, __pyx_t_5, __pyx_n_s_integer) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 6; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "pandas/src/inference.pyx":15 * np.uint32: 'integer', * np.uint64: 'integer', * np.float32: 'floating', # <<<<<<<<<<<<<< * np.float64: 'floating', * np.complex128: 'complex', */ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 15; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_float32); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 15; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_2, __pyx_t_3, __pyx_n_s_floating) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 6; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/inference.pyx":16 * np.uint64: 'integer', * np.float32: 'floating', * np.float64: 'floating', # <<<<<<<<<<<<<< * np.complex128: 'complex', * np.complex128: 'complex', */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 16; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_float64); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 16; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (PyDict_SetItem(__pyx_t_2, __pyx_t_5, __pyx_n_s_floating) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 6; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "pandas/src/inference.pyx":17 * np.float32: 'floating', * np.float64: 'floating', * np.complex128: 'complex', # <<<<<<<<<<<<<< * np.complex128: 'complex', * np.string_: 'string', */ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 17; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_complex128); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 17; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_2, __pyx_t_3, __pyx_n_s_complex) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 6; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/inference.pyx":18 * np.float64: 'floating', * np.complex128: 'complex', * np.complex128: 'complex', # <<<<<<<<<<<<<< * np.string_: 'string', * np.unicode_: 'unicode', */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 18; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_complex128); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 18; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (PyDict_SetItem(__pyx_t_2, __pyx_t_5, __pyx_n_s_complex) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 6; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "pandas/src/inference.pyx":19 * np.complex128: 'complex', * np.complex128: 'complex', * np.string_: 'string', # <<<<<<<<<<<<<< * np.unicode_: 'unicode', * np.bool_: 'boolean', */ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 19; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_string_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 19; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_2, __pyx_t_3, __pyx_n_s_string) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 6; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/inference.pyx":20 * np.complex128: 'complex', * np.string_: 'string', * np.unicode_: 'unicode', # <<<<<<<<<<<<<< * np.bool_: 'boolean', * np.datetime64 : 'datetime64', */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 20; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_unicode_2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 20; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (PyDict_SetItem(__pyx_t_2, __pyx_t_5, __pyx_n_s_unicode) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 6; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "pandas/src/inference.pyx":21 * np.string_: 'string', * np.unicode_: 'unicode', * np.bool_: 'boolean', # <<<<<<<<<<<<<< * np.datetime64 : 'datetime64', * np.timedelta64 : 'timedelta64' */ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 21; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_bool); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 21; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_2, __pyx_t_3, __pyx_n_s_boolean) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 6; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/inference.pyx":22 * np.unicode_: 'unicode', * np.bool_: 'boolean', * np.datetime64 : 'datetime64', # <<<<<<<<<<<<<< * np.timedelta64 : 'timedelta64' * } */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 22; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_datetime64); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 22; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (PyDict_SetItem(__pyx_t_2, __pyx_t_5, __pyx_n_s_datetime64) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 6; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "pandas/src/inference.pyx":23 * np.bool_: 'boolean', * np.datetime64 : 'datetime64', * np.timedelta64 : 'timedelta64' # <<<<<<<<<<<<<< * } * */ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 23; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_timedelta64); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 23; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_2, __pyx_t_3, __pyx_n_s_timedelta64) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 6; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (PyDict_SetItem(__pyx_d, __pyx_n_s_TYPE_MAP, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 6; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/inference.pyx":26 * } * * try: # <<<<<<<<<<<<<< * _TYPE_MAP[np.float128] = 'floating' * _TYPE_MAP[np.complex256] = 'complex' */ { __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9); __Pyx_XGOTREF(__pyx_t_7); __Pyx_XGOTREF(__pyx_t_8); __Pyx_XGOTREF(__pyx_t_9); /*try:*/ { /* "pandas/src/inference.pyx":27 * * try: * _TYPE_MAP[np.float128] = 'floating' # <<<<<<<<<<<<<< * _TYPE_MAP[np.complex256] = 'complex' * _TYPE_MAP[np.float16] = 'floating' */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_TYPE_MAP); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 27; __pyx_clineno = __LINE__; goto __pyx_L2_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 27; __pyx_clineno = __LINE__; goto __pyx_L2_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_float128); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 27; __pyx_clineno = __LINE__; goto __pyx_L2_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(PyObject_SetItem(__pyx_t_2, __pyx_t_5, __pyx_n_s_floating) < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 27; __pyx_clineno = __LINE__; goto __pyx_L2_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "pandas/src/inference.pyx":28 * try: * _TYPE_MAP[np.float128] = 'floating' * _TYPE_MAP[np.complex256] = 'complex' # <<<<<<<<<<<<<< * _TYPE_MAP[np.float16] = 'floating' * except AttributeError: */ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_TYPE_MAP); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 28; __pyx_clineno = __LINE__; goto __pyx_L2_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 28; __pyx_clineno = __LINE__; goto __pyx_L2_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_complex256); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 28; __pyx_clineno = __LINE__; goto __pyx_L2_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(PyObject_SetItem(__pyx_t_5, __pyx_t_3, __pyx_n_s_complex) < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 28; __pyx_clineno = __LINE__; goto __pyx_L2_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/inference.pyx":29 * _TYPE_MAP[np.float128] = 'floating' * _TYPE_MAP[np.complex256] = 'complex' * _TYPE_MAP[np.float16] = 'floating' # <<<<<<<<<<<<<< * except AttributeError: * pass */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_TYPE_MAP); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 29; __pyx_clineno = __LINE__; goto __pyx_L2_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 29; __pyx_clineno = __LINE__; goto __pyx_L2_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_float16); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 29; __pyx_clineno = __LINE__; goto __pyx_L2_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(PyObject_SetItem(__pyx_t_3, __pyx_t_2, __pyx_n_s_floating) < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 29; __pyx_clineno = __LINE__; goto __pyx_L2_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; goto __pyx_L9_try_end; __pyx_L2_error:; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/inference.pyx":30 * _TYPE_MAP[np.complex256] = 'complex' * _TYPE_MAP[np.float16] = 'floating' * except AttributeError: # <<<<<<<<<<<<<< * pass * */ __pyx_t_10 = PyErr_ExceptionMatches(__pyx_builtin_AttributeError); if (__pyx_t_10) { PyErr_Restore(0,0,0); goto __pyx_L3_exception_handled; } goto __pyx_L4_except_error; __pyx_L4_except_error:; __Pyx_XGIVEREF(__pyx_t_7); __Pyx_XGIVEREF(__pyx_t_8); __Pyx_XGIVEREF(__pyx_t_9); __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9); goto __pyx_L1_error; __pyx_L3_exception_handled:; __Pyx_XGIVEREF(__pyx_t_7); __Pyx_XGIVEREF(__pyx_t_8); __Pyx_XGIVEREF(__pyx_t_9); __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9); __pyx_L9_try_end:; } /* "pandas/src/inference.pyx":33 * pass * * def infer_dtype(object _values): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_105infer_dtype, NULL, __pyx_n_s_pandas_lib); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 33; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_infer_dtype, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 33; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/inference.pyx":133 * return 'mixed' * * def infer_dtype_list(list values): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = len(values) */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_107infer_dtype_list, NULL, __pyx_n_s_pandas_lib); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 133; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_infer_dtype_list, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 133; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/inference.pyx":154 * return PyDelta_Check(o) or util.is_timedelta64_object(o) * * def is_bool_array(ndarray values): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = len(values) */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_109is_bool_array, NULL, __pyx_n_s_pandas_lib); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 154; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_is_bool_array, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 154; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/inference.pyx":175 * return False * * def is_integer(object o): # <<<<<<<<<<<<<< * return util.is_integer_object(o) * */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_111is_integer, NULL, __pyx_n_s_pandas_lib); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 175; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_is_integer, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 175; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/inference.pyx":178 * return util.is_integer_object(o) * * def is_integer_array(ndarray values): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = len(values) */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_113is_integer_array, NULL, __pyx_n_s_pandas_lib); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 178; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_is_integer_array, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 178; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/inference.pyx":199 * return False * * def is_integer_float_array(ndarray values): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = len(values) */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_115is_integer_float_array, NULL, __pyx_n_s_pandas_lib); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 199; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_is_integer_float_array, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 199; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/inference.pyx":222 * return False * * def is_float_array(ndarray values): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = len(values) */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_117is_float_array, NULL, __pyx_n_s_pandas_lib); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 222; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_is_float_array, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 222; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/inference.pyx":243 * return False * * def is_string_array(ndarray values): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = len(values) */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_119is_string_array, NULL, __pyx_n_s_pandas_lib); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_is_string_array, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/inference.pyx":264 * return False * * def is_unicode_array(ndarray values): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = len(values) */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_121is_unicode_array, NULL, __pyx_n_s_pandas_lib); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 264; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_is_unicode_array, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 264; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/inference.pyx":286 * * * def is_datetime_array(ndarray[object] values): # <<<<<<<<<<<<<< * cdef int i, n = len(values) * cdef object v */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_123is_datetime_array, NULL, __pyx_n_s_pandas_lib); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 286; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_is_datetime_array, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 286; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/inference.pyx":298 * * * def is_datetime64_array(ndarray values): # <<<<<<<<<<<<<< * cdef int i, n = len(values) * cdef object v */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_125is_datetime64_array, NULL, __pyx_n_s_pandas_lib); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 298; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_is_datetime64_array, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 298; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/inference.pyx":309 * return True * * def is_timedelta_array(ndarray values): # <<<<<<<<<<<<<< * cdef int i, n = len(values) * cdef object v */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_127is_timedelta_array, NULL, __pyx_n_s_pandas_lib); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 309; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_is_timedelta_array, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 309; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/inference.pyx":320 * return True * * def is_timedelta64_array(ndarray values): # <<<<<<<<<<<<<< * cdef int i, n = len(values) * cdef object v */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_129is_timedelta64_array, NULL, __pyx_n_s_pandas_lib); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 320; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_is_timedelta64_array, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 320; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/inference.pyx":331 * return True * * def is_timedelta_or_timedelta64_array(ndarray values): # <<<<<<<<<<<<<< * """ infer with timedeltas and/or nat/none """ * cdef int i, n = len(values) */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_131is_timedelta_or_timedelta64_array, NULL, __pyx_n_s_pandas_lib); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 331; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_is_timedelta_or_timedelta64_arra, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 331; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/inference.pyx":343 * return True * * def is_date_array(ndarray[object] values): # <<<<<<<<<<<<<< * cdef int i, n = len(values) * if n == 0: */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_133is_date_array, NULL, __pyx_n_s_pandas_lib); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 343; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_is_date_array, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 343; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/inference.pyx":352 * return True * * def is_time_array(ndarray[object] values): # <<<<<<<<<<<<<< * cdef int i, n = len(values) * if n == 0: */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_135is_time_array, NULL, __pyx_n_s_pandas_lib); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 352; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_is_time_array, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 352; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/inference.pyx":361 * return True * * def is_period(object o): # <<<<<<<<<<<<<< * from pandas import Period * return isinstance(o,Period) */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_137is_period, NULL, __pyx_n_s_pandas_lib); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 361; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_is_period, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 361; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/inference.pyx":365 * return isinstance(o,Period) * * def is_period_array(ndarray[object] values): # <<<<<<<<<<<<<< * cdef int i, n = len(values) * from pandas.tseries.period import Period */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_139is_period_array, NULL, __pyx_n_s_pandas_lib); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 365; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_is_period_array, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 365; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/inference.pyx":380 * inline int floatify(object, double *result) except -1 * * cdef double fINT64_MAX = INT64_MAX # <<<<<<<<<<<<<< * cdef double fINT64_MIN = INT64_MIN * */ __pyx_v_6pandas_3lib_fINT64_MAX = ((double)INT64_MAX); /* "pandas/src/inference.pyx":381 * * cdef double fINT64_MAX = INT64_MAX * cdef double fINT64_MIN = INT64_MIN # <<<<<<<<<<<<<< * * def maybe_convert_numeric(ndarray[object] values, set na_values, */ __pyx_v_6pandas_3lib_fINT64_MIN = ((double)INT64_MIN); /* "pandas/src/inference.pyx":383 * cdef double fINT64_MIN = INT64_MIN * * def maybe_convert_numeric(ndarray[object] values, set na_values, # <<<<<<<<<<<<<< * convert_empty=True, coerce_numeric=False): * ''' */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_141maybe_convert_numeric, NULL, __pyx_n_s_pandas_lib); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 383; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_maybe_convert_numeric, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 383; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/inference.pyx":461 * return ints * * def maybe_convert_objects(ndarray[object] objects, bint try_float=0, # <<<<<<<<<<<<<< * bint safe=0, bint convert_datetime=0, bint convert_timedelta=0): * ''' */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_143maybe_convert_objects, NULL, __pyx_n_s_pandas_lib); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 461; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_maybe_convert_objects, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 461; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/inference.pyx":626 * * * def convert_sql_column(x): # <<<<<<<<<<<<<< * return maybe_convert_objects(x, try_float=1) * */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_145convert_sql_column, NULL, __pyx_n_s_pandas_lib); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 626; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_convert_sql_column, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 626; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/inference.pyx":629 * return maybe_convert_objects(x, try_float=1) * * def try_parse_dates(ndarray[object] values, parser=None, # <<<<<<<<<<<<<< * dayfirst=False,default=None): * cdef: */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_147try_parse_dates, NULL, __pyx_n_s_pandas_lib); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 629; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_try_parse_dates, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 629; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/inference.pyx":677 * return result * * def try_parse_date_and_time(ndarray[object] dates, ndarray[object] times, # <<<<<<<<<<<<<< * date_parser=None, time_parser=None, * dayfirst=False,default=None): */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_149try_parse_date_and_time, NULL, __pyx_n_s_pandas_lib); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 677; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_try_parse_date_and_time, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 677; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/inference.pyx":731 * * * def try_parse_year_month_day(ndarray[object] years, ndarray[object] months, # <<<<<<<<<<<<<< * ndarray[object] days): * cdef: */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_151try_parse_year_month_day, NULL, __pyx_n_s_pandas_lib); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 731; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_try_parse_year_month_day, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 731; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/inference.pyx":749 * return result * * def try_parse_datetime_components(ndarray[object] years, # <<<<<<<<<<<<<< * ndarray[object] months, * ndarray[object] days, */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_153try_parse_datetime_components, NULL, __pyx_n_s_pandas_lib); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 749; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_try_parse_datetime_components, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 749; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/inference.pyx":785 * return result * * def sanitize_objects(ndarray[object] values, set na_values, # <<<<<<<<<<<<<< * convert_empty=True): * cdef: */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_155sanitize_objects, NULL, __pyx_n_s_pandas_lib); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 785; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_sanitize_objects, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 785; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/inference.pyx":808 * return na_count * * def maybe_convert_bool(ndarray[object] arr, # <<<<<<<<<<<<<< * true_values=None, false_values=None): * cdef: */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_157maybe_convert_bool, NULL, __pyx_n_s_pandas_lib); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 808; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_maybe_convert_bool, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 808; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/inference.pyx":857 * * * def map_infer_mask(ndarray arr, object f, ndarray[uint8_t] mask, # <<<<<<<<<<<<<< * bint convert=1): * ''' */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_159map_infer_mask, NULL, __pyx_n_s_pandas_lib); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 857; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_map_infer_mask, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 857; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/inference.pyx":899 * return result * * def map_infer(ndarray arr, object f, bint convert=1): # <<<<<<<<<<<<<< * ''' * Substitute for np.vectorize with pandas-friendly dtype inference */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_161map_infer, NULL, __pyx_n_s_pandas_lib); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 899; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_map_infer, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 899; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/inference.pyx":938 * * * def to_object_array(list rows): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, j, n, k, tmp */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_163to_object_array, NULL, __pyx_n_s_pandas_lib); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 938; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_to_object_array, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 938; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/inference.pyx":962 * return result * * def tuples_to_object_array(ndarray[object] tuples): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, j, n, k, tmp */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_165tuples_to_object_array, NULL, __pyx_n_s_pandas_lib); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 962; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_tuples_to_object_array, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 962; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/inference.pyx":978 * return result * * def to_object_array_tuples(list rows): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, j, n, k, tmp */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_167to_object_array_tuples, NULL, __pyx_n_s_pandas_lib); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 978; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_to_object_array_tuples, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 978; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/inference.pyx":1009 * * * def fast_multiget(dict mapping, ndarray keys, default=np.nan): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = len(keys) */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1009; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_nan); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1009; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_k__42 = __pyx_t_3; __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_169fast_multiget, NULL, __pyx_n_s_pandas_lib); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1009; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_fast_multiget, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1009; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/lib.pyx":1 * cimport numpy as np # <<<<<<<<<<<<<< * cimport cython * import numpy as np */ __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_test, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "util.pxd":84 * return False * * cdef inline bint _checknan(object val): # <<<<<<<<<<<<<< * return not cnp.PyArray_Check(val) and val != val */ 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_5); __Pyx_XDECREF(__pyx_t_6); if (__pyx_m) { __Pyx_AddTraceback("init pandas.lib", __pyx_clineno, __pyx_lineno, __pyx_filename); Py_DECREF(__pyx_m); __pyx_m = 0; } else if (!PyErr_Occurred()) { PyErr_SetString(PyExc_ImportError, "init pandas.lib"); } __pyx_L0:; __Pyx_RefNannyFinishContext(); #if PY_MAJOR_VERSION < 3 return; #else return __pyx_m; #endif } /* Runtime support code */ #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 /* CYTHON_REFNANNY */ 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; } static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j) { PyObject *r; if (!j) return NULL; r = PyObject_GetItem(o, j); Py_DECREF(j); return r; } static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i, int wraparound, int boundscheck) { #if CYTHON_COMPILING_IN_CPYTHON if (wraparound & unlikely(i < 0)) i += PyList_GET_SIZE(o); if ((!boundscheck) || likely((0 <= i) & (i < PyList_GET_SIZE(o)))) { PyObject *r = PyList_GET_ITEM(o, i); Py_INCREF(r); return r; } return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i)); #else return PySequence_GetItem(o, i); #endif } static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i, int wraparound, int boundscheck) { #if CYTHON_COMPILING_IN_CPYTHON if (wraparound & unlikely(i < 0)) i += PyTuple_GET_SIZE(o); if ((!boundscheck) || likely((0 <= i) & (i < PyTuple_GET_SIZE(o)))) { PyObject *r = PyTuple_GET_ITEM(o, i); Py_INCREF(r); return r; } return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i)); #else return PySequence_GetItem(o, i); #endif } static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, int is_list, int wraparound, int boundscheck) { #if CYTHON_COMPILING_IN_CPYTHON if (is_list || PyList_CheckExact(o)) { Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyList_GET_SIZE(o); if ((!boundscheck) || (likely((n >= 0) & (n < PyList_GET_SIZE(o))))) { PyObject *r = PyList_GET_ITEM(o, n); Py_INCREF(r); return r; } } else if (PyTuple_CheckExact(o)) { Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyTuple_GET_SIZE(o); if ((!boundscheck) || likely((n >= 0) & (n < PyTuple_GET_SIZE(o)))) { PyObject *r = PyTuple_GET_ITEM(o, n); Py_INCREF(r); return r; } } else { PySequenceMethods *m = Py_TYPE(o)->tp_as_sequence; if (likely(m && m->sq_item)) { if (wraparound && unlikely(i < 0) && likely(m->sq_length)) { Py_ssize_t l = m->sq_length(o); if (likely(l >= 0)) { i += l; } else { if (PyErr_ExceptionMatches(PyExc_OverflowError)) PyErr_Clear(); else return NULL; } } 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)); } static void __Pyx_RaiseArgumentTypeInvalid(const char* name, PyObject *obj, PyTypeObject *type) { PyErr_Format(PyExc_TypeError, "Argument '%.200s' has incorrect type (expected %.200s, got %.200s)", name, type->tp_name, Py_TYPE(obj)->tp_name); } static CYTHON_INLINE int __Pyx_ArgTypeTest(PyObject *obj, PyTypeObject *type, int none_allowed, const char *name, int exact) { if (unlikely(!type)) { PyErr_SetString(PyExc_SystemError, "Missing type object"); return 0; } if (none_allowed && obj == Py_None) return 1; else if (exact) { if (likely(Py_TYPE(obj) == type)) return 1; #if PY_MAJOR_VERSION == 2 else if ((type == &PyBaseString_Type) && likely(__Pyx_PyBaseString_CheckExact(obj))) return 1; #endif } else { if (likely(PyObject_TypeCheck(obj, type))) return 1; } __Pyx_RaiseArgumentTypeInvalid(name, obj, type); return 0; } 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); } 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 } 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; } static CYTHON_INLINE PyObject *__Pyx_GetModuleGlobalName(PyObject *name) { PyObject *result; #if CYTHON_COMPILING_IN_CPYTHON result = PyDict_GetItem(__pyx_d, name); if (result) { Py_INCREF(result); } else { #else result = PyObject_GetItem(__pyx_d, name); if (!result) { PyErr_Clear(); #endif result = __Pyx_GetBuiltinName(name); } return result; } static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type) { if (unlikely(!type)) { PyErr_SetString(PyExc_SystemError, "Missing type object"); return 0; } if (likely(PyObject_TypeCheck(obj, type))) return 1; PyErr_Format(PyExc_TypeError, "Cannot convert %.200s to %.200s", Py_TYPE(obj)->tp_name, type->tp_name); return 0; } static CYTHON_INLINE int __Pyx_IsLittleEndian(void) { unsigned int n = 1; return *(unsigned char*)(&n) != 0; } 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) /* First char was not a digit */ 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; /* Consume from buffer string */ while (1) { if (field == &ctx->root) { ctx->head = NULL; if (ctx->enc_count != 0) { __Pyx_BufFmt_RaiseExpected(ctx); return -1; } break; /* breaks both loops as ctx->enc_count == 0 */ } 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; /* empty struct */ 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 CYTHON_INLINE 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 != ')') { if (isspace(*ts)) continue; 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 10: case 13: ++ts; break; case '<': if (!__Pyx_IsLittleEndian()) { PyErr_SetString(PyExc_ValueError, "Little-endian buffer not supported on big-endian compiler"); return NULL; } ctx->new_packmode = '='; ++ts; break; case '>': case '!': if (__Pyx_IsLittleEndian()) { 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': /* substruct */ { 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; /* Erase processed last struct element */ 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 '}': /* end of substruct; either repeat or move on */ { size_t alignment = ctx->struct_alignment; ++ts; if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL; ctx->enc_type = 0; /* Erase processed last struct element */ 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; } /* fall through */ 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 's': case 'p': if (ctx->enc_type == *ts && got_Z == ctx->is_complex && ctx->enc_packmode == ctx->new_packmode) { ctx->enc_count += ctx->new_count; } else { 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; } } } } static CYTHON_INLINE 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 CYTHON_INLINE int __Pyx_GetBufferAndValidate( Py_buffer* buf, PyObject* obj, __Pyx_TypeInfo* dtype, int flags, int nd, int cast, __Pyx_BufFmt_StackElem* stack) { if (obj == Py_None || obj == NULL) { __Pyx_ZeroBuffer(buf); return 0; } buf->buf = NULL; if (__Pyx_GetBuffer(obj, buf, flags) == -1) goto fail; if (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 ((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_ZeroBuffer(buf); return -1; } static CYTHON_INLINE void __Pyx_SafeReleaseBuffer(Py_buffer* info) { if (info->buf == NULL) return; if (info->suboffsets == __Pyx_minusones) info->suboffsets = NULL; __Pyx_ReleaseBuffer(info); } static void __Pyx_RaiseBufferFallbackError(void) { PyErr_SetString(PyExc_ValueError, "Buffer acquisition failed on assignment; and then reacquiring the old buffer failed too!"); } static void __Pyx_RaiseBufferIndexError(int axis) { PyErr_Format(PyExc_IndexError, "Out of bounds on buffer access (axis %d)", axis); } static CYTHON_INLINE void __Pyx_ErrRestore(PyObject *type, PyObject *value, PyObject *tb) { #if CYTHON_COMPILING_IN_CPYTHON PyObject *tmp_type, *tmp_value, *tmp_tb; PyThreadState *tstate = PyThreadState_GET(); 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); #else PyErr_Restore(type, value, tb); #endif } static CYTHON_INLINE void __Pyx_ErrFetch(PyObject **type, PyObject **value, PyObject **tb) { #if CYTHON_COMPILING_IN_CPYTHON PyThreadState *tstate = PyThreadState_GET(); *type = tstate->curexc_type; *value = tstate->curexc_value; *tb = tstate->curexc_traceback; tstate->curexc_type = 0; tstate->curexc_value = 0; tstate->curexc_traceback = 0; #else PyErr_Fetch(type, value, tb); #endif } static void __Pyx_WriteUnraisable(const char *name, CYTHON_UNUSED int clineno, CYTHON_UNUSED int lineno, CYTHON_UNUSED const char *filename, int full_traceback) { PyObject *old_exc, *old_val, *old_tb; PyObject *ctx; __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); } } 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); } 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"); } static CYTHON_INLINE int __Pyx_IterFinish(void) { #if CYTHON_COMPILING_IN_CPYTHON PyThreadState *tstate = PyThreadState_GET(); PyObject* exc_type = tstate->curexc_type; if (unlikely(exc_type)) { if (likely(exc_type == PyExc_StopIteration) || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration)) { PyObject *exc_value, *exc_tb; exc_value = tstate->curexc_value; exc_tb = tstate->curexc_traceback; tstate->curexc_type = 0; tstate->curexc_value = 0; tstate->curexc_traceback = 0; Py_DECREF(exc_type); Py_XDECREF(exc_value); Py_XDECREF(exc_tb); return 0; } else { return -1; } } return 0; #else if (unlikely(PyErr_Occurred())) { if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) { PyErr_Clear(); return 0; } else { return -1; } } return 0; #endif } 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; } static CYTHON_INLINE void __Pyx_ExceptionSave(PyObject **type, PyObject **value, PyObject **tb) { #if CYTHON_COMPILING_IN_CPYTHON PyThreadState *tstate = PyThreadState_GET(); *type = tstate->exc_type; *value = tstate->exc_value; *tb = tstate->exc_traceback; Py_XINCREF(*type); Py_XINCREF(*value); Py_XINCREF(*tb); #else PyErr_GetExcInfo(type, value, tb); #endif } static void __Pyx_ExceptionReset(PyObject *type, PyObject *value, PyObject *tb) { #if CYTHON_COMPILING_IN_CPYTHON PyObject *tmp_type, *tmp_value, *tmp_tb; PyThreadState *tstate = PyThreadState_GET(); tmp_type = tstate->exc_type; tmp_value = tstate->exc_value; tmp_tb = tstate->exc_traceback; tstate->exc_type = type; tstate->exc_value = value; tstate->exc_traceback = tb; Py_XDECREF(tmp_type); Py_XDECREF(tmp_value); Py_XDECREF(tmp_tb); #else PyErr_SetExcInfo(type, value, tb); #endif } #if PY_MAJOR_VERSION < 3 static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, CYTHON_UNUSED PyObject *cause) { 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 PY_VERSION_HEX < 0x02050000 if (PyClass_Check(type)) { #else if (PyType_Check(type)) { #endif #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; #if PY_VERSION_HEX < 0x02050000 if (PyInstance_Check(type)) { type = (PyObject*) ((PyInstanceObject*)type)->in_class; Py_INCREF(type); } else { type = 0; PyErr_SetString(PyExc_TypeError, "raise: exception must be an old-style class or instance"); goto raise_error; } #else 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; } #endif } __Pyx_ErrRestore(type, value, tb); return; raise_error: Py_XDECREF(value); Py_XDECREF(type); Py_XDECREF(tb); return; } #else /* Python 3+ */ 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) { if (PyObject_IsSubclass(instance_class, type)) { type = instance_class; } else { instance_class = NULL; } } } if (!instance_class) { PyObject *args; if (!value) args = PyTuple_New(0); else if (PyTuple_Check(value)) { Py_INCREF(value); args = value; } else args = PyTuple_Pack(1, value); if (!args) goto bad; owned_instance = PyObject_Call(type, args, NULL); Py_DECREF(args); if (!owned_instance) goto bad; value = owned_instance; if (!PyExceptionInstance_Check(value)) { PyErr_Format(PyExc_TypeError, "calling %R should have returned an instance of " "BaseException, not %R", type, Py_TYPE(value)); goto bad; } } } else { PyErr_SetString(PyExc_TypeError, "raise: exception class must be a subclass of BaseException"); goto bad; } #if PY_VERSION_HEX >= 0x03030000 if (cause) { #else if (cause && cause != Py_None) { #endif PyObject *fixed_cause; if (cause == Py_None) { fixed_cause = NULL; } else if (PyExceptionClass_Check(cause)) { fixed_cause = PyObject_CallObject(cause, NULL); if (fixed_cause == NULL) goto bad; } else if (PyExceptionInstance_Check(cause)) { fixed_cause = cause; Py_INCREF(fixed_cause); } else { PyErr_SetString(PyExc_TypeError, "exception causes must derive from " "BaseException"); goto bad; } PyException_SetCause(value, fixed_cause); } PyErr_SetObject(type, value); if (tb) { PyThreadState *tstate = PyThreadState_GET(); PyObject* tmp_tb = tstate->curexc_traceback; if (tb != tmp_tb) { Py_INCREF(tb); tstate->curexc_traceback = tb; Py_XDECREF(tmp_tb); } } bad: Py_XDECREF(owned_instance); return; } #endif 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; } static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb) { PyObject *local_type, *local_value, *local_tb; #if CYTHON_COMPILING_IN_CPYTHON PyObject *tmp_type, *tmp_value, *tmp_tb; PyThreadState *tstate = PyThreadState_GET(); local_type = tstate->curexc_type; local_value = tstate->curexc_value; local_tb = tstate->curexc_traceback; tstate->curexc_type = 0; tstate->curexc_value = 0; tstate->curexc_traceback = 0; #else PyErr_Fetch(&local_type, &local_value, &local_tb); #endif PyErr_NormalizeException(&local_type, &local_value, &local_tb); #if CYTHON_COMPILING_IN_CPYTHON if (unlikely(tstate->curexc_type)) #else if (unlikely(PyErr_Occurred())) #endif goto bad; #if PY_MAJOR_VERSION >= 3 if (local_tb) { if (unlikely(PyException_SetTraceback(local_value, local_tb) < 0)) goto bad; } #endif Py_XINCREF(local_tb); Py_XINCREF(local_type); Py_XINCREF(local_value); *type = local_type; *value = local_value; *tb = local_tb; #if CYTHON_COMPILING_IN_CPYTHON tmp_type = tstate->exc_type; tmp_value = tstate->exc_value; tmp_tb = tstate->exc_traceback; tstate->exc_type = local_type; tstate->exc_value = local_value; tstate->exc_traceback = local_tb; Py_XDECREF(tmp_type); Py_XDECREF(tmp_value); Py_XDECREF(tmp_tb); #else PyErr_SetExcInfo(local_type, local_value, local_tb); #endif return 0; bad: *type = 0; *value = 0; *tb = 0; Py_XDECREF(local_type); Py_XDECREF(local_value); Py_XDECREF(local_tb); return -1; } static CYTHON_INLINE int __Pyx_SetItemInt_Generic(PyObject *o, PyObject *j, PyObject *v) { int r; if (!j) return -1; r = PyObject_SetItem(o, j, v); Py_DECREF(j); return r; } static CYTHON_INLINE int __Pyx_SetItemInt_Fast(PyObject *o, Py_ssize_t i, PyObject *v, int is_list, int wraparound, int boundscheck) { #if CYTHON_COMPILING_IN_CPYTHON if (is_list || PyList_CheckExact(o)) { Py_ssize_t n = (!wraparound) ? i : ((likely(i >= 0)) ? i : i + PyList_GET_SIZE(o)); if ((!boundscheck) || likely((n >= 0) & (n < PyList_GET_SIZE(o)))) { PyObject* old = PyList_GET_ITEM(o, n); Py_INCREF(v); PyList_SET_ITEM(o, n, v); Py_DECREF(old); return 1; } } else { PySequenceMethods *m = Py_TYPE(o)->tp_as_sequence; if (likely(m && m->sq_ass_item)) { if (wraparound && unlikely(i < 0) && likely(m->sq_length)) { Py_ssize_t l = m->sq_length(o); if (likely(l >= 0)) { i += l; } else { if (PyErr_ExceptionMatches(PyExc_OverflowError)) PyErr_Clear(); else return -1; } } return m->sq_ass_item(o, i, v); } } #else #if CYTHON_COMPILING_IN_PYPY if (is_list || (PySequence_Check(o) && !PyDict_Check(o))) { #else if (is_list || PySequence_Check(o)) { #endif return PySequence_SetItem(o, i, v); } #endif return __Pyx_SetItemInt_Generic(o, PyInt_FromSsize_t(i), v); } static CYTHON_INLINE int __Pyx_mod_int(int a, int b) { int r = a % b; r += ((r != 0) & ((r ^ b) < 0)) * b; return r; } static CYTHON_INLINE int __Pyx_PyObject_SetSlice( PyObject* obj, PyObject* value, Py_ssize_t cstart, Py_ssize_t cstop, PyObject** _py_start, PyObject** _py_stop, PyObject** _py_slice, int has_cstart, int has_cstop, CYTHON_UNUSED int wraparound) { #if CYTHON_COMPILING_IN_CPYTHON PyMappingMethods* mp; #if PY_MAJOR_VERSION < 3 PySequenceMethods* ms = Py_TYPE(obj)->tp_as_sequence; if (likely(ms && ms->sq_ass_slice)) { if (!has_cstart) { if (_py_start && (*_py_start != Py_None)) { cstart = __Pyx_PyIndex_AsSsize_t(*_py_start); if ((cstart == (Py_ssize_t)-1) && PyErr_Occurred()) goto bad; } else cstart = 0; } if (!has_cstop) { if (_py_stop && (*_py_stop != Py_None)) { cstop = __Pyx_PyIndex_AsSsize_t(*_py_stop); if ((cstop == (Py_ssize_t)-1) && PyErr_Occurred()) goto bad; } else cstop = PY_SSIZE_T_MAX; } if (wraparound && unlikely((cstart < 0) | (cstop < 0)) && likely(ms->sq_length)) { Py_ssize_t l = ms->sq_length(obj); if (likely(l >= 0)) { if (cstop < 0) { cstop += l; if (cstop < 0) cstop = 0; } if (cstart < 0) { cstart += l; if (cstart < 0) cstart = 0; } } else { if (PyErr_ExceptionMatches(PyExc_OverflowError)) PyErr_Clear(); else goto bad; } } return ms->sq_ass_slice(obj, cstart, cstop, value); } #endif mp = Py_TYPE(obj)->tp_as_mapping; if (likely(mp && mp->mp_ass_subscript)) #endif { int result; PyObject *py_slice, *py_start, *py_stop; if (_py_slice) { py_slice = *_py_slice; } else { PyObject* owned_start = NULL; PyObject* owned_stop = NULL; if (_py_start) { py_start = *_py_start; } else { if (has_cstart) { owned_start = py_start = PyInt_FromSsize_t(cstart); if (unlikely(!py_start)) goto bad; } else py_start = Py_None; } if (_py_stop) { py_stop = *_py_stop; } else { if (has_cstop) { owned_stop = py_stop = PyInt_FromSsize_t(cstop); if (unlikely(!py_stop)) { Py_XDECREF(owned_start); goto bad; } } else py_stop = Py_None; } py_slice = PySlice_New(py_start, py_stop, Py_None); Py_XDECREF(owned_start); Py_XDECREF(owned_stop); if (unlikely(!py_slice)) goto bad; } #if CYTHON_COMPILING_IN_CPYTHON result = mp->mp_ass_subscript(obj, py_slice, value); #else result = value ? PyObject_SetItem(obj, py_slice, value) : PyObject_DelItem(obj, py_slice); #endif if (!_py_slice) { Py_DECREF(py_slice); } return result; } PyErr_Format(PyExc_TypeError, "'%.200s' object does not support slice %.10s", Py_TYPE(obj)->tp_name, value ? "assignment" : "deletion"); bad: return -1; } static CYTHON_INLINE long __Pyx_mod_long(long a, long b) { long r = a % b; r += ((r != 0) & ((r ^ b) < 0)) * b; return r; } #if CYTHON_COMPILING_IN_CPYTHON static CYTHON_INLINE void __Pyx_crop_slice(Py_ssize_t* _start, Py_ssize_t* _stop, Py_ssize_t* _length) { Py_ssize_t start = *_start, stop = *_stop, length = *_length; if (start < 0) { start += length; if (start < 0) start = 0; } if (stop < 0) stop += length; else if (stop > length) stop = length; *_length = stop - start; *_start = start; *_stop = stop; } static CYTHON_INLINE void __Pyx_copy_object_array(PyObject** CYTHON_RESTRICT src, PyObject** CYTHON_RESTRICT dest, Py_ssize_t length) { PyObject *v; Py_ssize_t i; for (i = 0; i < length; i++) { v = dest[i] = src[i]; Py_INCREF(v); } } static CYTHON_INLINE PyObject* __Pyx_PyList_GetSlice( PyObject* src, Py_ssize_t start, Py_ssize_t stop) { PyObject* dest; Py_ssize_t length = PyList_GET_SIZE(src); __Pyx_crop_slice(&start, &stop, &length); if (unlikely(length <= 0)) return PyList_New(0); dest = PyList_New(length); if (unlikely(!dest)) return NULL; __Pyx_copy_object_array( ((PyListObject*)src)->ob_item + start, ((PyListObject*)dest)->ob_item, length); return dest; } static CYTHON_INLINE PyObject* __Pyx_PyTuple_GetSlice( PyObject* src, Py_ssize_t start, Py_ssize_t stop) { PyObject* dest; Py_ssize_t length = PyTuple_GET_SIZE(src); __Pyx_crop_slice(&start, &stop, &length); if (unlikely(length <= 0)) return PyTuple_New(0); dest = PyTuple_New(length); if (unlikely(!dest)) return NULL; __Pyx_copy_object_array( ((PyTupleObject*)src)->ob_item + start, ((PyTupleObject*)dest)->ob_item, length); return dest; } #endif static CYTHON_INLINE PyObject* __Pyx_PyObject_GetSlice( PyObject* obj, Py_ssize_t cstart, Py_ssize_t cstop, PyObject** _py_start, PyObject** _py_stop, PyObject** _py_slice, int has_cstart, int has_cstop, CYTHON_UNUSED int wraparound) { #if CYTHON_COMPILING_IN_CPYTHON PyMappingMethods* mp; #if PY_MAJOR_VERSION < 3 PySequenceMethods* ms = Py_TYPE(obj)->tp_as_sequence; if (likely(ms && ms->sq_slice)) { if (!has_cstart) { if (_py_start && (*_py_start != Py_None)) { cstart = __Pyx_PyIndex_AsSsize_t(*_py_start); if ((cstart == (Py_ssize_t)-1) && PyErr_Occurred()) goto bad; } else cstart = 0; } if (!has_cstop) { if (_py_stop && (*_py_stop != Py_None)) { cstop = __Pyx_PyIndex_AsSsize_t(*_py_stop); if ((cstop == (Py_ssize_t)-1) && PyErr_Occurred()) goto bad; } else cstop = PY_SSIZE_T_MAX; } if (wraparound && unlikely((cstart < 0) | (cstop < 0)) && likely(ms->sq_length)) { Py_ssize_t l = ms->sq_length(obj); if (likely(l >= 0)) { if (cstop < 0) { cstop += l; if (cstop < 0) cstop = 0; } if (cstart < 0) { cstart += l; if (cstart < 0) cstart = 0; } } else { if (PyErr_ExceptionMatches(PyExc_OverflowError)) PyErr_Clear(); else goto bad; } } return ms->sq_slice(obj, cstart, cstop); } #endif mp = Py_TYPE(obj)->tp_as_mapping; if (likely(mp && mp->mp_subscript)) #endif { PyObject* result; PyObject *py_slice, *py_start, *py_stop; if (_py_slice) { py_slice = *_py_slice; } else { PyObject* owned_start = NULL; PyObject* owned_stop = NULL; if (_py_start) { py_start = *_py_start; } else { if (has_cstart) { owned_start = py_start = PyInt_FromSsize_t(cstart); if (unlikely(!py_start)) goto bad; } else py_start = Py_None; } if (_py_stop) { py_stop = *_py_stop; } else { if (has_cstop) { owned_stop = py_stop = PyInt_FromSsize_t(cstop); if (unlikely(!py_stop)) { Py_XDECREF(owned_start); goto bad; } } else py_stop = Py_None; } py_slice = PySlice_New(py_start, py_stop, Py_None); Py_XDECREF(owned_start); Py_XDECREF(owned_stop); if (unlikely(!py_slice)) goto bad; } #if CYTHON_COMPILING_IN_CPYTHON result = mp->mp_subscript(obj, py_slice); #else result = PyObject_GetItem(obj, py_slice); #endif if (!_py_slice) { Py_DECREF(py_slice); } return result; } PyErr_Format(PyExc_TypeError, "'%.200s' object is unsliceable", Py_TYPE(obj)->tp_name); bad: return NULL; } static CYTHON_INLINE PyObject *__Pyx_GetAttr(PyObject *o, PyObject *n) { #if CYTHON_COMPILING_IN_CPYTHON #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); } static CYTHON_INLINE PyObject *__Pyx_GetAttr3(PyObject *o, PyObject *n, PyObject *d) { PyObject *r = __Pyx_GetAttr(o, n); if (unlikely(!r)) { if (!PyErr_ExceptionMatches(PyExc_AttributeError)) goto bad; PyErr_Clear(); r = d; Py_INCREF(d); } return r; bad: return NULL; } static CYTHON_INLINE void __Pyx_RaiseUnboundLocalError(const char *varname) { PyErr_Format(PyExc_UnboundLocalError, "local variable '%s' referenced before assignment", varname); } static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb) { PyObject *tmp_type, *tmp_value, *tmp_tb; #if CYTHON_COMPILING_IN_CPYTHON PyThreadState *tstate = PyThreadState_GET(); 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; #else PyErr_GetExcInfo(&tmp_type, &tmp_value, &tmp_tb); PyErr_SetExcInfo(*type, *value, *tb); #endif *type = tmp_type; *value = tmp_value; *tb = tmp_tb; } static double __Pyx__PyObject_AsDouble(PyObject* obj) { PyObject* float_value; #if CYTHON_COMPILING_IN_PYPY float_value = PyNumber_Float(obj); #else PyNumberMethods *nb = Py_TYPE(obj)->tp_as_number; if (likely(nb) && likely(nb->nb_float)) { float_value = nb->nb_float(obj); if (likely(float_value) && unlikely(!PyFloat_Check(float_value))) { PyErr_Format(PyExc_TypeError, "__float__ returned non-float (type %.200s)", Py_TYPE(float_value)->tp_name); Py_DECREF(float_value); goto bad; } } else if (PyUnicode_CheckExact(obj) || PyBytes_CheckExact(obj)) { #if PY_MAJOR_VERSION >= 3 float_value = PyFloat_FromString(obj); #else float_value = PyFloat_FromString(obj, 0); #endif } else { PyObject* args = PyTuple_New(1); if (unlikely(!args)) goto bad; PyTuple_SET_ITEM(args, 0, obj); float_value = PyObject_Call((PyObject*)&PyFloat_Type, args, 0); PyTuple_SET_ITEM(args, 0, 0); Py_DECREF(args); } #endif if (likely(float_value)) { double value = PyFloat_AS_DOUBLE(float_value); Py_DECREF(float_value); return value; } bad: return (double)-1; } static CYTHON_INLINE void __Pyx_RaiseClosureNameError(const char *varname) { PyErr_Format(PyExc_NameError, "free variable '%s' referenced before assignment in enclosing scope", varname); } static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type) { PyObject* fake_module; PyTypeObject* cached_type = NULL; fake_module = PyImport_AddModule((char*) "_cython_" CYTHON_ABI); if (!fake_module) return NULL; Py_INCREF(fake_module); cached_type = (PyTypeObject*) PyObject_GetAttrString(fake_module, type->tp_name); if (cached_type) { if (!PyType_Check((PyObject*)cached_type)) { PyErr_Format(PyExc_TypeError, "Shared Cython type %.200s is not a type object", type->tp_name); goto bad; } if (cached_type->tp_basicsize != type->tp_basicsize) { PyErr_Format(PyExc_TypeError, "Shared Cython type %.200s has the wrong size, try recompiling", type->tp_name); goto bad; } } else { if (!PyErr_ExceptionMatches(PyExc_AttributeError)) goto bad; PyErr_Clear(); if (PyType_Ready(type) < 0) goto bad; if (PyObject_SetAttrString(fake_module, type->tp_name, (PyObject*) type) < 0) goto bad; Py_INCREF(type); cached_type = type; } done: Py_DECREF(fake_module); return cached_type; bad: Py_XDECREF(cached_type); cached_type = NULL; goto done; } static PyObject * __Pyx_CyFunction_get_doc(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *closure) { if (unlikely(op->func_doc == NULL)) { if (op->func.m_ml->ml_doc) { #if PY_MAJOR_VERSION >= 3 op->func_doc = PyUnicode_FromString(op->func.m_ml->ml_doc); #else op->func_doc = PyString_FromString(op->func.m_ml->ml_doc); #endif if (unlikely(op->func_doc == NULL)) return NULL; } else { Py_INCREF(Py_None); return Py_None; } } Py_INCREF(op->func_doc); return op->func_doc; } static int __Pyx_CyFunction_set_doc(__pyx_CyFunctionObject *op, PyObject *value) { PyObject *tmp = op->func_doc; if (value == NULL) value = Py_None; /* Mark as deleted */ Py_INCREF(value); op->func_doc = value; Py_XDECREF(tmp); return 0; } static PyObject * __Pyx_CyFunction_get_name(__pyx_CyFunctionObject *op) { if (unlikely(op->func_name == NULL)) { #if PY_MAJOR_VERSION >= 3 op->func_name = PyUnicode_InternFromString(op->func.m_ml->ml_name); #else op->func_name = PyString_InternFromString(op->func.m_ml->ml_name); #endif if (unlikely(op->func_name == NULL)) return NULL; } Py_INCREF(op->func_name); return op->func_name; } static int __Pyx_CyFunction_set_name(__pyx_CyFunctionObject *op, PyObject *value) { PyObject *tmp; #if PY_MAJOR_VERSION >= 3 if (unlikely(value == NULL || !PyUnicode_Check(value))) { #else if (unlikely(value == NULL || !PyString_Check(value))) { #endif PyErr_SetString(PyExc_TypeError, "__name__ must be set to a string object"); return -1; } tmp = op->func_name; Py_INCREF(value); op->func_name = value; Py_XDECREF(tmp); return 0; } static PyObject * __Pyx_CyFunction_get_qualname(__pyx_CyFunctionObject *op) { Py_INCREF(op->func_qualname); return op->func_qualname; } static int __Pyx_CyFunction_set_qualname(__pyx_CyFunctionObject *op, PyObject *value) { PyObject *tmp; #if PY_MAJOR_VERSION >= 3 if (unlikely(value == NULL || !PyUnicode_Check(value))) { #else if (unlikely(value == NULL || !PyString_Check(value))) { #endif PyErr_SetString(PyExc_TypeError, "__qualname__ must be set to a string object"); return -1; } tmp = op->func_qualname; Py_INCREF(value); op->func_qualname = value; Py_XDECREF(tmp); return 0; } static PyObject * __Pyx_CyFunction_get_self(__pyx_CyFunctionObject *m, CYTHON_UNUSED void *closure) { PyObject *self; self = m->func_closure; if (self == NULL) self = Py_None; Py_INCREF(self); return self; } static PyObject * __Pyx_CyFunction_get_dict(__pyx_CyFunctionObject *op) { if (unlikely(op->func_dict == NULL)) { op->func_dict = PyDict_New(); if (unlikely(op->func_dict == NULL)) return NULL; } Py_INCREF(op->func_dict); return op->func_dict; } static int __Pyx_CyFunction_set_dict(__pyx_CyFunctionObject *op, PyObject *value) { PyObject *tmp; if (unlikely(value == NULL)) { PyErr_SetString(PyExc_TypeError, "function's dictionary may not be deleted"); return -1; } if (unlikely(!PyDict_Check(value))) { PyErr_SetString(PyExc_TypeError, "setting function's dictionary to a non-dict"); return -1; } tmp = op->func_dict; Py_INCREF(value); op->func_dict = value; Py_XDECREF(tmp); return 0; } static PyObject * __Pyx_CyFunction_get_globals(__pyx_CyFunctionObject *op) { Py_INCREF(op->func_globals); return op->func_globals; } static PyObject * __Pyx_CyFunction_get_closure(CYTHON_UNUSED __pyx_CyFunctionObject *op) { Py_INCREF(Py_None); return Py_None; } static PyObject * __Pyx_CyFunction_get_code(__pyx_CyFunctionObject *op) { PyObject* result = (op->func_code) ? op->func_code : Py_None; Py_INCREF(result); return result; } static int __Pyx_CyFunction_init_defaults(__pyx_CyFunctionObject *op) { PyObject *res = op->defaults_getter((PyObject *) op); if (unlikely(!res)) return -1; op->defaults_tuple = PyTuple_GET_ITEM(res, 0); Py_INCREF(op->defaults_tuple); op->defaults_kwdict = PyTuple_GET_ITEM(res, 1); Py_INCREF(op->defaults_kwdict); Py_DECREF(res); return 0; } static int __Pyx_CyFunction_set_defaults(__pyx_CyFunctionObject *op, PyObject* value) { PyObject* tmp; if (!value) { value = Py_None; } else if (value != Py_None && !PyTuple_Check(value)) { PyErr_SetString(PyExc_TypeError, "__defaults__ must be set to a tuple object"); return -1; } Py_INCREF(value); tmp = op->defaults_tuple; op->defaults_tuple = value; Py_XDECREF(tmp); return 0; } static PyObject * __Pyx_CyFunction_get_defaults(__pyx_CyFunctionObject *op) { PyObject* result = op->defaults_tuple; if (unlikely(!result)) { if (op->defaults_getter) { if (__Pyx_CyFunction_init_defaults(op) < 0) return NULL; result = op->defaults_tuple; } else { result = Py_None; } } Py_INCREF(result); return result; } static int __Pyx_CyFunction_set_kwdefaults(__pyx_CyFunctionObject *op, PyObject* value) { PyObject* tmp; if (!value) { value = Py_None; } else if (value != Py_None && !PyDict_Check(value)) { PyErr_SetString(PyExc_TypeError, "__kwdefaults__ must be set to a dict object"); return -1; } Py_INCREF(value); tmp = op->defaults_kwdict; op->defaults_kwdict = value; Py_XDECREF(tmp); return 0; } static PyObject * __Pyx_CyFunction_get_kwdefaults(__pyx_CyFunctionObject *op) { PyObject* result = op->defaults_kwdict; if (unlikely(!result)) { if (op->defaults_getter) { if (__Pyx_CyFunction_init_defaults(op) < 0) return NULL; result = op->defaults_kwdict; } else { result = Py_None; } } Py_INCREF(result); return result; } static int __Pyx_CyFunction_set_annotations(__pyx_CyFunctionObject *op, PyObject* value) { PyObject* tmp; if (!value || value == Py_None) { value = NULL; } else if (!PyDict_Check(value)) { PyErr_SetString(PyExc_TypeError, "__annotations__ must be set to a dict object"); return -1; } Py_XINCREF(value); tmp = op->func_annotations; op->func_annotations = value; Py_XDECREF(tmp); return 0; } static PyObject * __Pyx_CyFunction_get_annotations(__pyx_CyFunctionObject *op) { PyObject* result = op->func_annotations; if (unlikely(!result)) { result = PyDict_New(); if (unlikely(!result)) return NULL; op->func_annotations = result; } Py_INCREF(result); return result; } static PyGetSetDef __pyx_CyFunction_getsets[] = { {(char *) "func_doc", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0}, {(char *) "__doc__", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0}, {(char *) "func_name", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0}, {(char *) "__name__", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0}, {(char *) "__qualname__", (getter)__Pyx_CyFunction_get_qualname, (setter)__Pyx_CyFunction_set_qualname, 0, 0}, {(char *) "__self__", (getter)__Pyx_CyFunction_get_self, 0, 0, 0}, {(char *) "func_dict", (getter)__Pyx_CyFunction_get_dict, (setter)__Pyx_CyFunction_set_dict, 0, 0}, {(char *) "__dict__", (getter)__Pyx_CyFunction_get_dict, (setter)__Pyx_CyFunction_set_dict, 0, 0}, {(char *) "func_globals", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0}, {(char *) "__globals__", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0}, {(char *) "func_closure", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0}, {(char *) "__closure__", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0}, {(char *) "func_code", (getter)__Pyx_CyFunction_get_code, 0, 0, 0}, {(char *) "__code__", (getter)__Pyx_CyFunction_get_code, 0, 0, 0}, {(char *) "func_defaults", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0}, {(char *) "__defaults__", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0}, {(char *) "__kwdefaults__", (getter)__Pyx_CyFunction_get_kwdefaults, (setter)__Pyx_CyFunction_set_kwdefaults, 0, 0}, {(char *) "__annotations__", (getter)__Pyx_CyFunction_get_annotations, (setter)__Pyx_CyFunction_set_annotations, 0, 0}, {0, 0, 0, 0, 0} }; #ifndef PY_WRITE_RESTRICTED /* < Py2.5 */ #define PY_WRITE_RESTRICTED WRITE_RESTRICTED #endif static PyMemberDef __pyx_CyFunction_members[] = { {(char *) "__module__", T_OBJECT, offsetof(__pyx_CyFunctionObject, func.m_module), PY_WRITE_RESTRICTED, 0}, {0, 0, 0, 0, 0} }; static PyObject * __Pyx_CyFunction_reduce(__pyx_CyFunctionObject *m, CYTHON_UNUSED PyObject *args) { #if PY_MAJOR_VERSION >= 3 return PyUnicode_FromString(m->func.m_ml->ml_name); #else return PyString_FromString(m->func.m_ml->ml_name); #endif } static PyMethodDef __pyx_CyFunction_methods[] = { {__Pyx_NAMESTR("__reduce__"), (PyCFunction)__Pyx_CyFunction_reduce, METH_VARARGS, 0}, {0, 0, 0, 0} }; static PyObject *__Pyx_CyFunction_New(PyTypeObject *type, PyMethodDef *ml, int flags, PyObject* qualname, PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) { __pyx_CyFunctionObject *op = PyObject_GC_New(__pyx_CyFunctionObject, type); if (op == NULL) return NULL; op->flags = flags; op->func_weakreflist = NULL; op->func.m_ml = ml; op->func.m_self = (PyObject *) op; Py_XINCREF(closure); op->func_closure = closure; Py_XINCREF(module); op->func.m_module = module; op->func_dict = NULL; op->func_name = NULL; Py_INCREF(qualname); op->func_qualname = qualname; op->func_doc = NULL; op->func_classobj = NULL; op->func_globals = globals; Py_INCREF(op->func_globals); Py_XINCREF(code); op->func_code = code; op->defaults_pyobjects = 0; op->defaults = NULL; op->defaults_tuple = NULL; op->defaults_kwdict = NULL; op->defaults_getter = NULL; op->func_annotations = NULL; PyObject_GC_Track(op); return (PyObject *) op; } static int __Pyx_CyFunction_clear(__pyx_CyFunctionObject *m) { Py_CLEAR(m->func_closure); Py_CLEAR(m->func.m_module); Py_CLEAR(m->func_dict); Py_CLEAR(m->func_name); Py_CLEAR(m->func_qualname); Py_CLEAR(m->func_doc); Py_CLEAR(m->func_globals); Py_CLEAR(m->func_code); Py_CLEAR(m->func_classobj); Py_CLEAR(m->defaults_tuple); Py_CLEAR(m->defaults_kwdict); Py_CLEAR(m->func_annotations); if (m->defaults) { PyObject **pydefaults = __Pyx_CyFunction_Defaults(PyObject *, m); int i; for (i = 0; i < m->defaults_pyobjects; i++) Py_XDECREF(pydefaults[i]); PyMem_Free(m->defaults); m->defaults = NULL; } return 0; } static void __Pyx_CyFunction_dealloc(__pyx_CyFunctionObject *m) { PyObject_GC_UnTrack(m); if (m->func_weakreflist != NULL) PyObject_ClearWeakRefs((PyObject *) m); __Pyx_CyFunction_clear(m); PyObject_GC_Del(m); } static int __Pyx_CyFunction_traverse(__pyx_CyFunctionObject *m, visitproc visit, void *arg) { Py_VISIT(m->func_closure); Py_VISIT(m->func.m_module); Py_VISIT(m->func_dict); Py_VISIT(m->func_name); Py_VISIT(m->func_qualname); Py_VISIT(m->func_doc); Py_VISIT(m->func_globals); Py_VISIT(m->func_code); Py_VISIT(m->func_classobj); Py_VISIT(m->defaults_tuple); Py_VISIT(m->defaults_kwdict); if (m->defaults) { PyObject **pydefaults = __Pyx_CyFunction_Defaults(PyObject *, m); int i; for (i = 0; i < m->defaults_pyobjects; i++) Py_VISIT(pydefaults[i]); } return 0; } static PyObject *__Pyx_CyFunction_descr_get(PyObject *func, PyObject *obj, PyObject *type) { __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; if (m->flags & __Pyx_CYFUNCTION_STATICMETHOD) { Py_INCREF(func); return func; } if (m->flags & __Pyx_CYFUNCTION_CLASSMETHOD) { if (type == NULL) type = (PyObject *)(Py_TYPE(obj)); return PyMethod_New(func, type, (PyObject *)(Py_TYPE(type))); } if (obj == Py_None) obj = NULL; return PyMethod_New(func, obj, type); } static PyObject* __Pyx_CyFunction_repr(__pyx_CyFunctionObject *op) { #if PY_MAJOR_VERSION >= 3 return PyUnicode_FromFormat("", op->func_qualname, (void *)op); #else return PyString_FromFormat("", PyString_AsString(op->func_qualname), (void *)op); #endif } #if CYTHON_COMPILING_IN_PYPY static PyObject * __Pyx_CyFunction_Call(PyObject *func, PyObject *arg, PyObject *kw) { PyCFunctionObject* f = (PyCFunctionObject*)func; PyCFunction meth = PyCFunction_GET_FUNCTION(func); PyObject *self = PyCFunction_GET_SELF(func); Py_ssize_t size; switch (PyCFunction_GET_FLAGS(func) & ~(METH_CLASS | METH_STATIC | METH_COEXIST)) { case METH_VARARGS: if (likely(kw == NULL) || PyDict_Size(kw) == 0) return (*meth)(self, arg); break; case METH_VARARGS | METH_KEYWORDS: return (*(PyCFunctionWithKeywords)meth)(self, arg, kw); case METH_NOARGS: if (likely(kw == NULL) || PyDict_Size(kw) == 0) { size = PyTuple_GET_SIZE(arg); if (size == 0) return (*meth)(self, NULL); PyErr_Format(PyExc_TypeError, "%.200s() takes no arguments (%zd given)", f->m_ml->ml_name, size); return NULL; } break; case METH_O: if (likely(kw == NULL) || PyDict_Size(kw) == 0) { size = PyTuple_GET_SIZE(arg); if (size == 1) return (*meth)(self, PyTuple_GET_ITEM(arg, 0)); PyErr_Format(PyExc_TypeError, "%.200s() takes exactly one argument (%zd given)", f->m_ml->ml_name, size); return NULL; } break; default: PyErr_SetString(PyExc_SystemError, "Bad call flags in " "__Pyx_CyFunction_Call. METH_OLDARGS is no " "longer supported!"); return NULL; } PyErr_Format(PyExc_TypeError, "%.200s() takes no keyword arguments", f->m_ml->ml_name); return NULL; } #else static PyObject * __Pyx_CyFunction_Call(PyObject *func, PyObject *arg, PyObject *kw) { return PyCFunction_Call(func, arg, kw); } #endif static PyTypeObject __pyx_CyFunctionType_type = { PyVarObject_HEAD_INIT(0, 0) __Pyx_NAMESTR("cython_function_or_method"), /*tp_name*/ sizeof(__pyx_CyFunctionObject), /*tp_basicsize*/ 0, /*tp_itemsize*/ (destructor) __Pyx_CyFunction_dealloc, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #else 0, /*reserved*/ #endif (reprfunc) __Pyx_CyFunction_repr, /*tp_repr*/ 0, /*tp_as_number*/ 0, /*tp_as_sequence*/ 0, /*tp_as_mapping*/ 0, /*tp_hash*/ __Pyx_CyFunction_Call, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC, /* tp_flags*/ 0, /*tp_doc*/ (traverseproc) __Pyx_CyFunction_traverse, /*tp_traverse*/ (inquiry) __Pyx_CyFunction_clear, /*tp_clear*/ 0, /*tp_richcompare*/ offsetof(__pyx_CyFunctionObject, func_weakreflist), /* tp_weaklistoffse */ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_CyFunction_methods, /*tp_methods*/ __pyx_CyFunction_members, /*tp_members*/ __pyx_CyFunction_getsets, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ __Pyx_CyFunction_descr_get, /*tp_descr_get*/ 0, /*tp_descr_set*/ offsetof(__pyx_CyFunctionObject, func_dict),/*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ 0, /*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*/ #if PY_VERSION_HEX >= 0x02060000 0, /*tp_version_tag*/ #endif #if PY_VERSION_HEX >= 0x030400a1 0, /*tp_finalize*/ #endif }; static int __Pyx_CyFunction_init(void) { #if !CYTHON_COMPILING_IN_PYPY __pyx_CyFunctionType_type.tp_call = PyCFunction_Call; #endif __pyx_CyFunctionType = __Pyx_FetchCommonType(&__pyx_CyFunctionType_type); if (__pyx_CyFunctionType == NULL) { return -1; } return 0; } static CYTHON_INLINE void *__Pyx_CyFunction_InitDefaults(PyObject *func, size_t size, int pyobjects) { __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; m->defaults = PyMem_Malloc(size); if (!m->defaults) return PyErr_NoMemory(); memset(m->defaults, 0, size); m->defaults_pyobjects = pyobjects; return m->defaults; } static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *func, PyObject *tuple) { __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; m->defaults_tuple = tuple; Py_INCREF(tuple); } static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *func, PyObject *dict) { __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; m->defaults_kwdict = dict; Py_INCREF(dict); } static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *func, PyObject *dict) { __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; m->func_annotations = dict; Py_INCREF(dict); } static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals) { #if CYTHON_COMPILING_IN_PYPY return PyObject_RichCompareBool(s1, s2, equals); #else if (s1 == s2) { return (equals == Py_EQ); } else if (PyBytes_CheckExact(s1) & PyBytes_CheckExact(s2)) { const char *ps1, *ps2; Py_ssize_t length = PyBytes_GET_SIZE(s1); if (length != PyBytes_GET_SIZE(s2)) return (equals == Py_NE); ps1 = PyBytes_AS_STRING(s1); ps2 = PyBytes_AS_STRING(s2); if (ps1[0] != ps2[0]) { return (equals == Py_NE); } else if (length == 1) { return (equals == Py_EQ); } else { int result = memcmp(ps1, ps2, (size_t)length); return (equals == Py_EQ) ? (result == 0) : (result != 0); } } else if ((s1 == Py_None) & PyBytes_CheckExact(s2)) { return (equals == Py_NE); } else if ((s2 == Py_None) & PyBytes_CheckExact(s1)) { return (equals == Py_NE); } else { int result; PyObject* py_result = PyObject_RichCompare(s1, s2, equals); if (!py_result) return -1; result = __Pyx_PyObject_IsTrue(py_result); Py_DECREF(py_result); return result; } #endif } static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals) { #if CYTHON_COMPILING_IN_PYPY return PyObject_RichCompareBool(s1, s2, equals); #else #if PY_MAJOR_VERSION < 3 PyObject* owned_ref = NULL; #endif int s1_is_unicode, s2_is_unicode; if (s1 == s2) { goto return_eq; } s1_is_unicode = PyUnicode_CheckExact(s1); s2_is_unicode = PyUnicode_CheckExact(s2); #if PY_MAJOR_VERSION < 3 if ((s1_is_unicode & (!s2_is_unicode)) && PyString_CheckExact(s2)) { owned_ref = PyUnicode_FromObject(s2); if (unlikely(!owned_ref)) return -1; s2 = owned_ref; s2_is_unicode = 1; } else if ((s2_is_unicode & (!s1_is_unicode)) && PyString_CheckExact(s1)) { owned_ref = PyUnicode_FromObject(s1); if (unlikely(!owned_ref)) return -1; s1 = owned_ref; s1_is_unicode = 1; } else if (((!s2_is_unicode) & (!s1_is_unicode))) { return __Pyx_PyBytes_Equals(s1, s2, equals); } #endif if (s1_is_unicode & s2_is_unicode) { Py_ssize_t length; int kind; void *data1, *data2; #if CYTHON_PEP393_ENABLED if (unlikely(PyUnicode_READY(s1) < 0) || unlikely(PyUnicode_READY(s2) < 0)) return -1; #endif length = __Pyx_PyUnicode_GET_LENGTH(s1); if (length != __Pyx_PyUnicode_GET_LENGTH(s2)) { goto return_ne; } kind = __Pyx_PyUnicode_KIND(s1); if (kind != __Pyx_PyUnicode_KIND(s2)) { goto return_ne; } data1 = __Pyx_PyUnicode_DATA(s1); data2 = __Pyx_PyUnicode_DATA(s2); if (__Pyx_PyUnicode_READ(kind, data1, 0) != __Pyx_PyUnicode_READ(kind, data2, 0)) { goto return_ne; } else if (length == 1) { goto return_eq; } else { int result = memcmp(data1, data2, length * kind); #if PY_MAJOR_VERSION < 3 Py_XDECREF(owned_ref); #endif return (equals == Py_EQ) ? (result == 0) : (result != 0); } } else if ((s1 == Py_None) & s2_is_unicode) { goto return_ne; } else if ((s2 == Py_None) & s1_is_unicode) { goto return_ne; } else { int result; PyObject* py_result = PyObject_RichCompare(s1, s2, equals); if (!py_result) return -1; result = __Pyx_PyObject_IsTrue(py_result); Py_DECREF(py_result); return result; } return_eq: #if PY_MAJOR_VERSION < 3 Py_XDECREF(owned_ref); #endif return (equals == Py_EQ); return_ne: #if PY_MAJOR_VERSION < 3 Py_XDECREF(owned_ref); #endif return (equals == Py_NE); #endif } static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); } static int __Pyx_SetVtable(PyObject *dict, void *vtable) { #if PY_VERSION_HEX >= 0x02070000 && !(PY_MAJOR_VERSION==3&&PY_MINOR_VERSION==0) 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; } static PyObject *__Pyx_CalculateMetaclass(PyTypeObject *metaclass, PyObject *bases) { Py_ssize_t i, nbases = PyTuple_GET_SIZE(bases); for (i=0; i < nbases; i++) { PyTypeObject *tmptype; PyObject *tmp = PyTuple_GET_ITEM(bases, i); tmptype = Py_TYPE(tmp); #if PY_MAJOR_VERSION < 3 if (tmptype == &PyClass_Type) continue; #endif if (!metaclass) { metaclass = tmptype; continue; } if (PyType_IsSubtype(metaclass, tmptype)) continue; if (PyType_IsSubtype(tmptype, metaclass)) { metaclass = tmptype; continue; } PyErr_SetString(PyExc_TypeError, "metaclass conflict: " "the metaclass of a derived class " "must be a (non-strict) subclass " "of the metaclasses of all its bases"); return NULL; } if (!metaclass) { #if PY_MAJOR_VERSION < 3 metaclass = &PyClass_Type; #else metaclass = &PyType_Type; #endif } Py_INCREF((PyObject*) metaclass); return (PyObject*) metaclass; } static PyObject *__Pyx_Py3MetaclassPrepare(PyObject *metaclass, PyObject *bases, PyObject *name, PyObject *qualname, PyObject *mkw, PyObject *modname, PyObject *doc) { PyObject *ns; if (metaclass) { PyObject *prep = __Pyx_PyObject_GetAttrStr(metaclass, __pyx_n_s_prepare); if (prep) { PyObject *pargs = PyTuple_Pack(2, name, bases); if (unlikely(!pargs)) { Py_DECREF(prep); return NULL; } ns = PyObject_Call(prep, pargs, mkw); Py_DECREF(prep); Py_DECREF(pargs); } else { if (unlikely(!PyErr_ExceptionMatches(PyExc_AttributeError))) return NULL; PyErr_Clear(); ns = PyDict_New(); } } else { ns = PyDict_New(); } if (unlikely(!ns)) return NULL; if (unlikely(PyObject_SetItem(ns, __pyx_n_s_module, modname) < 0)) goto bad; if (unlikely(PyObject_SetItem(ns, __pyx_n_s_qualname, qualname) < 0)) goto bad; if (unlikely(doc && PyObject_SetItem(ns, __pyx_n_s_doc_2, doc) < 0)) goto bad; return ns; bad: Py_DECREF(ns); return NULL; } static PyObject *__Pyx_Py3ClassCreate(PyObject *metaclass, PyObject *name, PyObject *bases, PyObject *dict, PyObject *mkw, int calculate_metaclass, int allow_py2_metaclass) { PyObject *result, *margs; PyObject *owned_metaclass = NULL; if (allow_py2_metaclass) { owned_metaclass = PyObject_GetItem(dict, __pyx_n_s_metaclass); if (owned_metaclass) { metaclass = owned_metaclass; } else if (likely(PyErr_ExceptionMatches(PyExc_KeyError))) { PyErr_Clear(); } else { return NULL; } } if (calculate_metaclass && (!metaclass || PyType_Check(metaclass))) { metaclass = __Pyx_CalculateMetaclass((PyTypeObject*) metaclass, bases); Py_XDECREF(owned_metaclass); if (unlikely(!metaclass)) return NULL; owned_metaclass = metaclass; } margs = PyTuple_Pack(3, name, bases, dict); if (unlikely(!margs)) { result = NULL; } else { result = PyObject_Call(metaclass, margs, mkw); Py_DECREF(margs); } Py_XDECREF(owned_metaclass); return result; } static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value) { const int neg_one = (int) -1, const_zero = 0; const int is_unsigned = neg_one > const_zero; if (is_unsigned) { if (sizeof(int) < sizeof(long)) { return PyInt_FromLong((long) value); } else if (sizeof(int) <= sizeof(unsigned long)) { return PyLong_FromUnsignedLong((unsigned long) value); } else if (sizeof(int) <= sizeof(unsigned long long)) { return PyLong_FromUnsignedLongLong((unsigned long long) value); } } else { if (sizeof(int) <= sizeof(long)) { return PyInt_FromLong((long) value); } else if (sizeof(int) <= sizeof(long long)) { return PyLong_FromLongLong((long long) value); } } { int one = 1; int little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&value; return _PyLong_FromByteArray(bytes, sizeof(int), little, !is_unsigned); } } #define __PYX_VERIFY_RETURN_INT(target_type, func_type, func) \ { \ func_type value = func(x); \ if (sizeof(target_type) < sizeof(func_type)) { \ if (unlikely(value != (func_type) (target_type) value)) { \ func_type zero = 0; \ PyErr_SetString(PyExc_OverflowError, \ (is_unsigned && unlikely(value < zero)) ? \ "can't convert negative value to " #target_type : \ "value too large to convert to " #target_type); \ return (target_type) -1; \ } \ } \ return (target_type) value; \ } #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS #include "longintrepr.h" #endif #endif static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) { const int neg_one = (int) -1, const_zero = 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) } else { long val = PyInt_AS_LONG(x); if (is_unsigned && unlikely(val < 0)) { PyErr_SetString(PyExc_OverflowError, "can't convert negative value to int"); return (int) -1; } return (int) val; } } else #endif if (likely(PyLong_Check(x))) { if (is_unsigned) { #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS if (sizeof(digit) <= sizeof(int)) { switch (Py_SIZE(x)) { case 0: return 0; case 1: return (int) ((PyLongObject*)x)->ob_digit[0]; } } #endif #endif if (unlikely(Py_SIZE(x) < 0)) { PyErr_SetString(PyExc_OverflowError, "can't convert negative value to int"); return (int) -1; } if (sizeof(int) <= sizeof(unsigned long)) { __PYX_VERIFY_RETURN_INT(int, unsigned long, PyLong_AsUnsignedLong) } else if (sizeof(int) <= sizeof(unsigned long long)) { __PYX_VERIFY_RETURN_INT(int, unsigned long long, PyLong_AsUnsignedLongLong) } } else { #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS if (sizeof(digit) <= sizeof(int)) { switch (Py_SIZE(x)) { case 0: return 0; case 1: return +(int) ((PyLongObject*)x)->ob_digit[0]; case -1: return -(int) ((PyLongObject*)x)->ob_digit[0]; } } #endif #endif if (sizeof(int) <= sizeof(long)) { __PYX_VERIFY_RETURN_INT(int, long, PyLong_AsLong) } else if (sizeof(int) <= sizeof(long long)) { __PYX_VERIFY_RETURN_INT(int, long long, PyLong_AsLongLong) } } { #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_Int(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_Int(x); if (!tmp) return (int) -1; val = __Pyx_PyInt_As_int(tmp); Py_DECREF(tmp); return val; } } #if PY_MAJOR_VERSION < 3 static int __Pyx_GetBuffer(PyObject *obj, Py_buffer *view, int flags) { #if PY_VERSION_HEX >= 0x02060000 if (PyObject_CheckBuffer(obj)) return PyObject_GetBuffer(obj, view, flags); #endif if (PyObject_TypeCheck(obj, __pyx_ptype_5numpy_ndarray)) return __pyx_pw_5numpy_7ndarray_1__getbuffer__(obj, view, flags); #if PY_VERSION_HEX < 0x02060000 if (obj->ob_type->tp_dict) { PyObject *getbuffer_cobj = PyObject_GetItem( obj->ob_type->tp_dict, __pyx_n_s_pyx_getbuffer); if (getbuffer_cobj) { getbufferproc func = (getbufferproc) PyCObject_AsVoidPtr(getbuffer_cobj); Py_DECREF(getbuffer_cobj); if (!func) goto fail; return func(obj, view, flags); } else { PyErr_Clear(); } } #endif PyErr_Format(PyExc_TypeError, "'%.200s' does not have the buffer interface", Py_TYPE(obj)->tp_name); #if PY_VERSION_HEX < 0x02060000 fail: #endif return -1; } static void __Pyx_ReleaseBuffer(Py_buffer *view) { PyObject *obj = view->obj; if (!obj) return; #if PY_VERSION_HEX >= 0x02060000 if (PyObject_CheckBuffer(obj)) { PyBuffer_Release(view); return; } #endif if (PyObject_TypeCheck(obj, __pyx_ptype_5numpy_ndarray)) { __pyx_pw_5numpy_7ndarray_3__releasebuffer__(obj, view); return; } #if PY_VERSION_HEX < 0x02060000 if (obj->ob_type->tp_dict) { PyObject *releasebuffer_cobj = PyObject_GetItem( obj->ob_type->tp_dict, __pyx_n_s_pyx_releasebuffer); if (releasebuffer_cobj) { releasebufferproc func = (releasebufferproc) PyCObject_AsVoidPtr(releasebuffer_cobj); Py_DECREF(releasebuffer_cobj); if (!func) goto fail; func(obj, view); return; } else { PyErr_Clear(); } } #endif goto nofail; #if PY_VERSION_HEX < 0x02060000 fail: #endif PyErr_WriteUnraisable(obj); nofail: Py_DECREF(obj); view->obj = NULL; } #endif /* PY_MAJOR_VERSION < 3 */ static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level) { PyObject *empty_list = 0; PyObject *module = 0; PyObject *global_dict = 0; PyObject *empty_dict = 0; PyObject *list; #if PY_VERSION_HEX < 0x03030000 PyObject *py_import; py_import = __Pyx_PyObject_GetAttrStr(__pyx_b, __pyx_n_s_import); if (!py_import) goto bad; #endif if (from_list) list = from_list; else { empty_list = PyList_New(0); if (!empty_list) goto bad; list = empty_list; } global_dict = PyModule_GetDict(__pyx_m); if (!global_dict) goto bad; empty_dict = PyDict_New(); if (!empty_dict) goto bad; #if PY_VERSION_HEX >= 0x02050000 { #if PY_MAJOR_VERSION >= 3 if (level == -1) { if (strchr(__Pyx_MODULE_NAME, '.')) { #if PY_VERSION_HEX < 0x03030000 PyObject *py_level = PyInt_FromLong(1); if (!py_level) goto bad; module = PyObject_CallFunctionObjArgs(py_import, name, global_dict, empty_dict, list, py_level, NULL); Py_DECREF(py_level); #else module = PyImport_ImportModuleLevelObject( name, global_dict, empty_dict, list, 1); #endif if (!module) { if (!PyErr_ExceptionMatches(PyExc_ImportError)) goto bad; PyErr_Clear(); } } level = 0; /* try absolute import on failure */ } #endif if (!module) { #if PY_VERSION_HEX < 0x03030000 PyObject *py_level = PyInt_FromLong(level); if (!py_level) goto bad; module = PyObject_CallFunctionObjArgs(py_import, name, global_dict, empty_dict, list, py_level, NULL); Py_DECREF(py_level); #else module = PyImport_ImportModuleLevelObject( name, global_dict, empty_dict, list, level); #endif } } #else if (level>0) { PyErr_SetString(PyExc_RuntimeError, "Relative import is not supported for Python <=2.4."); goto bad; } module = PyObject_CallFunctionObjArgs(py_import, name, global_dict, empty_dict, list, NULL); #endif bad: #if PY_VERSION_HEX < 0x03030000 Py_XDECREF(py_import); #endif Py_XDECREF(empty_list); Py_XDECREF(empty_dict); return module; } #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS #include "longintrepr.h" #endif #endif static CYTHON_INLINE npy_int64 __Pyx_PyInt_As_npy_int64(PyObject *x) { const npy_int64 neg_one = (npy_int64) -1, const_zero = 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) } else { long val = PyInt_AS_LONG(x); if (is_unsigned && unlikely(val < 0)) { PyErr_SetString(PyExc_OverflowError, "can't convert negative value to npy_int64"); return (npy_int64) -1; } return (npy_int64) val; } } else #endif if (likely(PyLong_Check(x))) { if (is_unsigned) { #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS if (sizeof(digit) <= sizeof(npy_int64)) { switch (Py_SIZE(x)) { case 0: return 0; case 1: return (npy_int64) ((PyLongObject*)x)->ob_digit[0]; } } #endif #endif if (unlikely(Py_SIZE(x) < 0)) { PyErr_SetString(PyExc_OverflowError, "can't convert negative value to npy_int64"); return (npy_int64) -1; } if (sizeof(npy_int64) <= sizeof(unsigned long)) { __PYX_VERIFY_RETURN_INT(npy_int64, unsigned long, PyLong_AsUnsignedLong) } else if (sizeof(npy_int64) <= sizeof(unsigned long long)) { __PYX_VERIFY_RETURN_INT(npy_int64, unsigned long long, PyLong_AsUnsignedLongLong) } } else { #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS if (sizeof(digit) <= sizeof(npy_int64)) { switch (Py_SIZE(x)) { case 0: return 0; case 1: return +(npy_int64) ((PyLongObject*)x)->ob_digit[0]; case -1: return -(npy_int64) ((PyLongObject*)x)->ob_digit[0]; } } #endif #endif if (sizeof(npy_int64) <= sizeof(long)) { __PYX_VERIFY_RETURN_INT(npy_int64, long, PyLong_AsLong) } else if (sizeof(npy_int64) <= sizeof(long long)) { __PYX_VERIFY_RETURN_INT(npy_int64, long long, PyLong_AsLongLong) } } { #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_Int(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_Int(x); if (!tmp) return (npy_int64) -1; val = __Pyx_PyInt_As_npy_int64(tmp); Py_DECREF(tmp); return val; } } static CYTHON_INLINE PyObject* __Pyx_PyInt_From_npy_int64(npy_int64 value) { const npy_int64 neg_one = (npy_int64) -1, const_zero = 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); } else if (sizeof(npy_int64) <= sizeof(unsigned long long)) { return PyLong_FromUnsignedLongLong((unsigned long long) value); } } else { if (sizeof(npy_int64) <= sizeof(long)) { return PyInt_FromLong((long) value); } else if (sizeof(npy_int64) <= sizeof(long long)) { return PyLong_FromLongLong((long long) value); } } { 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); } } static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) { const long neg_one = (long) -1, const_zero = 0; const int is_unsigned = neg_one > const_zero; if (is_unsigned) { if (sizeof(long) < sizeof(long)) { return PyInt_FromLong((long) value); } else if (sizeof(long) <= sizeof(unsigned long)) { return PyLong_FromUnsignedLong((unsigned long) value); } else if (sizeof(long) <= sizeof(unsigned long long)) { return PyLong_FromUnsignedLongLong((unsigned long long) value); } } else { if (sizeof(long) <= sizeof(long)) { return PyInt_FromLong((long) value); } else if (sizeof(long) <= sizeof(long long)) { return PyLong_FromLongLong((long long) value); } } { int one = 1; int little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&value; return _PyLong_FromByteArray(bytes, sizeof(long), little, !is_unsigned); } } static CYTHON_INLINE PyObject* __Pyx_PyInt_From_Py_intptr_t(Py_intptr_t value) { const Py_intptr_t neg_one = (Py_intptr_t) -1, const_zero = 0; const int is_unsigned = neg_one > const_zero; if (is_unsigned) { if (sizeof(Py_intptr_t) < sizeof(long)) { return PyInt_FromLong((long) value); } else if (sizeof(Py_intptr_t) <= sizeof(unsigned long)) { return PyLong_FromUnsignedLong((unsigned long) value); } else if (sizeof(Py_intptr_t) <= sizeof(unsigned long long)) { return PyLong_FromUnsignedLongLong((unsigned long long) value); } } else { if (sizeof(Py_intptr_t) <= sizeof(long)) { return PyInt_FromLong((long) value); } else if (sizeof(Py_intptr_t) <= sizeof(long long)) { return PyLong_FromLongLong((long long) value); } } { int one = 1; int little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&value; return _PyLong_FromByteArray(bytes, sizeof(Py_intptr_t), little, !is_unsigned); } } #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 #if CYTHON_CCOMPLEX #else static CYTHON_INLINE int __Pyx_c_eq(__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(__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(__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(__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; } static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_quot(__pyx_t_double_complex a, __pyx_t_double_complex b) { __pyx_t_double_complex z; double denom = b.real * b.real + b.imag * b.imag; z.real = (a.real * b.real + a.imag * b.imag) / denom; z.imag = (a.imag * b.real - a.real * b.imag) / denom; return z; } static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_neg(__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(__pyx_t_double_complex a) { return (a.real == 0) && (a.imag == 0); } static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_conj(__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(__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(__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(a, a); return __Pyx_c_prod(a, a); case 3: z = __Pyx_c_prod(a, a); return __Pyx_c_prod(z, a); case 4: z = __Pyx_c_prod(a, a); return __Pyx_c_prod(z, z); } } if (a.imag == 0) { if (a.real == 0) { return a; } r = a.real; theta = 0; } else { r = __Pyx_c_abs(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 static __pyx_t_double_complex __Pyx_PyComplex_As___pyx_t_double_complex(PyObject* o) { Py_complex cval; #if CYTHON_COMPILING_IN_CPYTHON if (PyComplex_CheckExact(o)) cval = ((PyComplexObject *)o)->cval; else #endif cval = PyComplex_AsCComplex(o); return __pyx_t_double_complex_from_parts( (double)cval.real, (double)cval.imag); } #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS #include "longintrepr.h" #endif #endif static CYTHON_INLINE npy_uint8 __Pyx_PyInt_As_npy_uint8(PyObject *x) { const npy_uint8 neg_one = (npy_uint8) -1, const_zero = 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) } else { long val = PyInt_AS_LONG(x); if (is_unsigned && unlikely(val < 0)) { PyErr_SetString(PyExc_OverflowError, "can't convert negative value to npy_uint8"); return (npy_uint8) -1; } return (npy_uint8) val; } } else #endif if (likely(PyLong_Check(x))) { if (is_unsigned) { #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS if (sizeof(digit) <= sizeof(npy_uint8)) { switch (Py_SIZE(x)) { case 0: return 0; case 1: return (npy_uint8) ((PyLongObject*)x)->ob_digit[0]; } } #endif #endif if (unlikely(Py_SIZE(x) < 0)) { PyErr_SetString(PyExc_OverflowError, "can't convert negative value to npy_uint8"); return (npy_uint8) -1; } if (sizeof(npy_uint8) <= sizeof(unsigned long)) { __PYX_VERIFY_RETURN_INT(npy_uint8, unsigned long, PyLong_AsUnsignedLong) } else if (sizeof(npy_uint8) <= sizeof(unsigned long long)) { __PYX_VERIFY_RETURN_INT(npy_uint8, unsigned long long, PyLong_AsUnsignedLongLong) } } else { #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS if (sizeof(digit) <= sizeof(npy_uint8)) { switch (Py_SIZE(x)) { case 0: return 0; case 1: return +(npy_uint8) ((PyLongObject*)x)->ob_digit[0]; case -1: return -(npy_uint8) ((PyLongObject*)x)->ob_digit[0]; } } #endif #endif if (sizeof(npy_uint8) <= sizeof(long)) { __PYX_VERIFY_RETURN_INT(npy_uint8, long, PyLong_AsLong) } else if (sizeof(npy_uint8) <= sizeof(long long)) { __PYX_VERIFY_RETURN_INT(npy_uint8, long long, PyLong_AsLongLong) } } { #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_Int(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_Int(x); if (!tmp) return (npy_uint8) -1; val = __Pyx_PyInt_As_npy_uint8(tmp); Py_DECREF(tmp); return val; } } #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS #include "longintrepr.h" #endif #endif static CYTHON_INLINE npy_int32 __Pyx_PyInt_As_npy_int32(PyObject *x) { const npy_int32 neg_one = (npy_int32) -1, const_zero = 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) } else { long val = PyInt_AS_LONG(x); if (is_unsigned && unlikely(val < 0)) { PyErr_SetString(PyExc_OverflowError, "can't convert negative value to npy_int32"); return (npy_int32) -1; } return (npy_int32) val; } } else #endif if (likely(PyLong_Check(x))) { if (is_unsigned) { #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS if (sizeof(digit) <= sizeof(npy_int32)) { switch (Py_SIZE(x)) { case 0: return 0; case 1: return (npy_int32) ((PyLongObject*)x)->ob_digit[0]; } } #endif #endif if (unlikely(Py_SIZE(x) < 0)) { PyErr_SetString(PyExc_OverflowError, "can't convert negative value to npy_int32"); return (npy_int32) -1; } if (sizeof(npy_int32) <= sizeof(unsigned long)) { __PYX_VERIFY_RETURN_INT(npy_int32, unsigned long, PyLong_AsUnsignedLong) } else if (sizeof(npy_int32) <= sizeof(unsigned long long)) { __PYX_VERIFY_RETURN_INT(npy_int32, unsigned long long, PyLong_AsUnsignedLongLong) } } else { #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS if (sizeof(digit) <= sizeof(npy_int32)) { switch (Py_SIZE(x)) { case 0: return 0; case 1: return +(npy_int32) ((PyLongObject*)x)->ob_digit[0]; case -1: return -(npy_int32) ((PyLongObject*)x)->ob_digit[0]; } } #endif #endif if (sizeof(npy_int32) <= sizeof(long)) { __PYX_VERIFY_RETURN_INT(npy_int32, long, PyLong_AsLong) } else if (sizeof(npy_int32) <= sizeof(long long)) { __PYX_VERIFY_RETURN_INT(npy_int32, long long, PyLong_AsLongLong) } } { #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_Int(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_Int(x); if (!tmp) return (npy_int32) -1; val = __Pyx_PyInt_As_npy_int32(tmp); Py_DECREF(tmp); return val; } } #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 #if CYTHON_CCOMPLEX #else static CYTHON_INLINE int __Pyx_c_eqf(__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_sumf(__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_difff(__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_prodf(__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; } static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_quotf(__pyx_t_float_complex a, __pyx_t_float_complex b) { __pyx_t_float_complex z; float denom = b.real * b.real + b.imag * b.imag; z.real = (a.real * b.real + a.imag * b.imag) / denom; z.imag = (a.imag * b.real - a.real * b.imag) / denom; return z; } static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_negf(__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_zerof(__pyx_t_float_complex a) { return (a.real == 0) && (a.imag == 0); } static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_conjf(__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_absf(__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_powf(__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_prodf(a, a); return __Pyx_c_prodf(a, a); case 3: z = __Pyx_c_prodf(a, a); return __Pyx_c_prodf(z, a); case 4: z = __Pyx_c_prodf(a, a); return __Pyx_c_prodf(z, z); } } if (a.imag == 0) { if (a.real == 0) { return a; } r = a.real; theta = 0; } else { r = __Pyx_c_absf(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 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_ptrdiff_t(ptrdiff_t value) { const ptrdiff_t neg_one = (ptrdiff_t) -1, const_zero = 0; const int is_unsigned = neg_one > const_zero; if (is_unsigned) { if (sizeof(ptrdiff_t) < sizeof(long)) { return PyInt_FromLong((long) value); } else if (sizeof(ptrdiff_t) <= sizeof(unsigned long)) { return PyLong_FromUnsignedLong((unsigned long) value); } else if (sizeof(ptrdiff_t) <= sizeof(unsigned long long)) { return PyLong_FromUnsignedLongLong((unsigned long long) value); } } else { if (sizeof(ptrdiff_t) <= sizeof(long)) { return PyInt_FromLong((long) value); } else if (sizeof(ptrdiff_t) <= sizeof(long long)) { return PyLong_FromLongLong((long long) value); } } { int one = 1; int little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&value; return _PyLong_FromByteArray(bytes, sizeof(ptrdiff_t), little, !is_unsigned); } } #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS #include "longintrepr.h" #endif #endif static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) { const long neg_one = (long) -1, const_zero = 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) } else { long val = PyInt_AS_LONG(x); if (is_unsigned && unlikely(val < 0)) { PyErr_SetString(PyExc_OverflowError, "can't convert negative value to long"); return (long) -1; } return (long) val; } } else #endif if (likely(PyLong_Check(x))) { if (is_unsigned) { #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS if (sizeof(digit) <= sizeof(long)) { switch (Py_SIZE(x)) { case 0: return 0; case 1: return (long) ((PyLongObject*)x)->ob_digit[0]; } } #endif #endif if (unlikely(Py_SIZE(x) < 0)) { PyErr_SetString(PyExc_OverflowError, "can't convert negative value to long"); return (long) -1; } if (sizeof(long) <= sizeof(unsigned long)) { __PYX_VERIFY_RETURN_INT(long, unsigned long, PyLong_AsUnsignedLong) } else if (sizeof(long) <= sizeof(unsigned long long)) { __PYX_VERIFY_RETURN_INT(long, unsigned long long, PyLong_AsUnsignedLongLong) } } else { #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS if (sizeof(digit) <= sizeof(long)) { switch (Py_SIZE(x)) { case 0: return 0; case 1: return +(long) ((PyLongObject*)x)->ob_digit[0]; case -1: return -(long) ((PyLongObject*)x)->ob_digit[0]; } } #endif #endif if (sizeof(long) <= sizeof(long)) { __PYX_VERIFY_RETURN_INT(long, long, PyLong_AsLong) } else if (sizeof(long) <= sizeof(long long)) { __PYX_VERIFY_RETURN_INT(long, long long, PyLong_AsLongLong) } } { #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_Int(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_Int(x); if (!tmp) return (long) -1; val = __Pyx_PyInt_As_long(tmp); Py_DECREF(tmp); return val; } } 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); #if PY_VERSION_HEX < 0x02050000 return PyErr_Warn(NULL, message); #else return PyErr_WarnEx(NULL, message, 1); #endif } return 0; } #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 #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", module_name, class_name); #if PY_VERSION_HEX < 0x02050000 if (PyErr_Warn(NULL, warning) < 0) goto bad; #else if (PyErr_WarnEx(NULL, warning, 0) < 0) goto bad; #endif } else if ((size_t)basicsize != size) { PyErr_Format(PyExc_ValueError, "%.200s.%.200s has the wrong size, try recompiling", module_name, class_name); goto bad; } return (PyTypeObject *)result; bad: Py_XDECREF(py_module); Py_XDECREF(result); return NULL; } #endif #ifndef __PYX_HAVE_RT_ImportFunction #define __PYX_HAVE_RT_ImportFunction static int __Pyx_ImportFunction(PyObject *module, const char *funcname, void (**f)(void), const char *sig) { PyObject *d = 0; PyObject *cobj = 0; union { void (*fp)(void); void *p; } tmp; d = PyObject_GetAttrString(module, (char *)"__pyx_capi__"); if (!d) goto bad; cobj = PyDict_GetItemString(d, funcname); if (!cobj) { PyErr_Format(PyExc_ImportError, "%.200s does not export expected C function %.200s", PyModule_GetName(module), funcname); goto bad; } #if PY_VERSION_HEX >= 0x02070000 && !(PY_MAJOR_VERSION==3 && PY_MINOR_VERSION==0) if (!PyCapsule_IsValid(cobj, sig)) { PyErr_Format(PyExc_TypeError, "C function %.200s.%.200s has wrong signature (expected %.500s, got %.500s)", PyModule_GetName(module), funcname, sig, PyCapsule_GetName(cobj)); goto bad; } tmp.p = PyCapsule_GetPointer(cobj, sig); #else {const char *desc, *s1, *s2; desc = (const char *)PyCObject_GetDesc(cobj); if (!desc) goto bad; s1 = desc; s2 = sig; while (*s1 != '\0' && *s1 == *s2) { s1++; s2++; } if (*s1 != *s2) { PyErr_Format(PyExc_TypeError, "C function %.200s.%.200s has wrong signature (expected %.500s, got %.500s)", PyModule_GetName(module), funcname, sig, desc); goto bad; } tmp.p = PyCObject_AsVoidPtr(cobj);} #endif *f = tmp.fp; if (!(*f)) goto bad; Py_DECREF(d); return 0; bad: Py_XDECREF(d); return -1; } #endif 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) / 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, 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); } #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, /*int argcount,*/ 0, /*int kwonlyargcount,*/ 0, /*int nlocals,*/ 0, /*int stacksize,*/ 0, /*int flags,*/ __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, /*int firstlineno,*/ __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; PyObject *py_globals = 0; PyFrameObject *py_frame = 0; py_code = __pyx_find_code_object(c_line ? c_line : py_line); if (!py_code) { py_code = __Pyx_CreateCodeObjectForTraceback( funcname, c_line, py_line, filename); if (!py_code) goto bad; __pyx_insert_code_object(c_line ? c_line : py_line, py_code); } py_globals = PyModule_GetDict(__pyx_m); if (!py_globals) goto bad; py_frame = PyFrame_New( PyThreadState_GET(), /*PyThreadState *tstate,*/ py_code, /*PyCodeObject *code,*/ py_globals, /*PyObject *globals,*/ 0 /*PyObject *locals*/ ); if (!py_frame) goto bad; py_frame->f_lineno = py_line; PyTraceBack_Here(py_frame); bad: Py_XDECREF(py_code); Py_XDECREF(py_frame); } 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 /* Python 3+ has unicode identifiers */ if (t->is_unicode | t->is_str) { if (t->intern) { *t->p = PyUnicode_InternFromString(t->s); } else if (t->encoding) { *t->p = PyUnicode_Decode(t->s, t->n - 1, t->encoding, NULL); } else { *t->p = PyUnicode_FromStringAndSize(t->s, t->n - 1); } } else { *t->p = PyBytes_FromStringAndSize(t->s, t->n - 1); } #endif if (!*t->p) return -1; ++t; } return 0; } static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(char* c_str) { return __Pyx_PyUnicode_FromStringAndSize(c_str, strlen(c_str)); } static CYTHON_INLINE char* __Pyx_PyObject_AsString(PyObject* o) { Py_ssize_t ignore; return __Pyx_PyObject_AsStringAndSize(o, &ignore); } static CYTHON_INLINE char* __Pyx_PyObject_AsStringAndSize(PyObject* o, Py_ssize_t *length) { #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT if ( #if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII __Pyx_sys_getdefaultencoding_not_ascii && #endif PyUnicode_Check(o)) { #if PY_VERSION_HEX < 0x03030000 char* defenc_c; PyObject* defenc = _PyUnicode_AsDefaultEncodedString(o, NULL); if (!defenc) return NULL; defenc_c = PyBytes_AS_STRING(defenc); #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII { char* end = defenc_c + PyBytes_GET_SIZE(defenc); char* c; for (c = defenc_c; c < end; c++) { if ((unsigned char) (*c) >= 128) { PyUnicode_AsASCIIString(o); return NULL; } } } #endif /*__PYX_DEFAULT_STRING_ENCODING_IS_ASCII*/ *length = PyBytes_GET_SIZE(defenc); return defenc_c; #else /* PY_VERSION_HEX < 0x03030000 */ if (PyUnicode_READY(o) == -1) return NULL; #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII if (PyUnicode_IS_ASCII(o)) { *length = PyUnicode_GET_DATA_SIZE(o); return PyUnicode_AsUTF8(o); } else { PyUnicode_AsASCIIString(o); return NULL; } #else /* __PYX_DEFAULT_STRING_ENCODING_IS_ASCII */ return PyUnicode_AsUTF8AndSize(o, length); #endif /* __PYX_DEFAULT_STRING_ENCODING_IS_ASCII */ #endif /* PY_VERSION_HEX < 0x03030000 */ } else #endif /* __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT */ #if PY_VERSION_HEX >= 0x02060000 if (PyByteArray_Check(o)) { *length = PyByteArray_GET_SIZE(o); return PyByteArray_AS_STRING(o); } else #endif { char* result; int r = PyBytes_AsStringAndSize(o, &result, length); if (unlikely(r < 0)) { return NULL; } else { return result; } } } static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject* x) { int is_true = x == Py_True; if (is_true | (x == Py_False) | (x == Py_None)) return is_true; else return PyObject_IsTrue(x); } static CYTHON_INLINE PyObject* __Pyx_PyNumber_Int(PyObject* x) { PyNumberMethods *m; const char *name = NULL; PyObject *res = NULL; #if PY_MAJOR_VERSION < 3 if (PyInt_Check(x) || PyLong_Check(x)) #else if (PyLong_Check(x)) #endif return Py_INCREF(x), x; m = Py_TYPE(x)->tp_as_number; #if PY_MAJOR_VERSION < 3 if (m && m->nb_int) { name = "int"; res = PyNumber_Int(x); } else if (m && m->nb_long) { name = "long"; res = PyNumber_Long(x); } #else if (m && m->nb_int) { name = "int"; res = PyNumber_Long(x); } #endif if (res) { #if PY_MAJOR_VERSION < 3 if (!PyInt_Check(res) && !PyLong_Check(res)) { #else if (!PyLong_Check(res)) { #endif PyErr_Format(PyExc_TypeError, "__%.4s__ returned non-%.4s (type %.200s)", name, name, Py_TYPE(res)->tp_name); Py_DECREF(res); return NULL; } } else if (!PyErr_Occurred()) { PyErr_SetString(PyExc_TypeError, "an integer is required"); } return res; } #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS #include "longintrepr.h" #endif #endif 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))) return PyInt_AS_LONG(b); #endif if (likely(PyLong_CheckExact(b))) { #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS switch (Py_SIZE(b)) { case -1: return -(sdigit)((PyLongObject*)b)->ob_digit[0]; case 0: return 0; case 1: return ((PyLongObject*)b)->ob_digit[0]; } #endif #endif #if PY_VERSION_HEX < 0x02060000 return PyInt_AsSsize_t(b); #else return PyLong_AsSsize_t(b); #endif } 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) { #if PY_VERSION_HEX < 0x02050000 if (ival <= LONG_MAX) return PyInt_FromLong((long)ival); else { unsigned char *bytes = (unsigned char *) &ival; int one = 1; int little = (int)*(unsigned char*)&one; return _PyLong_FromByteArray(bytes, sizeof(size_t), little, 0); } #else return PyInt_FromSize_t(ival); #endif } #endif /* Py_PYTHON_H */ debian/cythonized-files/pandas/msgpack.cpp0000664000000000000000000220357712275603610016071 0ustar /* Generated by Cython 0.20 on Mon Feb 3 08:41:48 2014 */ #define PY_SSIZE_T_CLEAN #ifndef CYTHON_USE_PYLONG_INTERNALS #ifdef PYLONG_BITS_IN_DIGIT #define CYTHON_USE_PYLONG_INTERNALS 0 #else #include "pyconfig.h" #ifdef PYLONG_BITS_IN_DIGIT #define CYTHON_USE_PYLONG_INTERNALS 1 #else #define CYTHON_USE_PYLONG_INTERNALS 0 #endif #endif #endif #include "Python.h" #ifndef Py_PYTHON_H #error Python headers needed to compile C extensions, please install development version of Python. #elif PY_VERSION_HEX < 0x02040000 #error Cython requires Python 2.4+. #else #define CYTHON_ABI "0_20" #include /* For offsetof */ #ifndef offsetof #define offsetof(type, member) ( (size_t) & ((type*)0) -> member ) #endif #if !defined(WIN32) && !defined(MS_WINDOWS) #ifndef __stdcall #define __stdcall #endif #ifndef __cdecl #define __cdecl #endif #ifndef __fastcall #define __fastcall #endif #endif #ifndef DL_IMPORT #define DL_IMPORT(t) t #endif #ifndef DL_EXPORT #define DL_EXPORT(t) t #endif #ifndef PY_LONG_LONG #define PY_LONG_LONG LONG_LONG #endif #ifndef Py_HUGE_VAL #define Py_HUGE_VAL HUGE_VAL #endif #ifdef PYPY_VERSION #define CYTHON_COMPILING_IN_PYPY 1 #define CYTHON_COMPILING_IN_CPYTHON 0 #else #define CYTHON_COMPILING_IN_PYPY 0 #define CYTHON_COMPILING_IN_CPYTHON 1 #endif #if CYTHON_COMPILING_IN_PYPY #define Py_OptimizeFlag 0 #endif #if PY_VERSION_HEX < 0x02050000 typedef int Py_ssize_t; #define PY_SSIZE_T_MAX INT_MAX #define PY_SSIZE_T_MIN INT_MIN #define PY_FORMAT_SIZE_T "" #define CYTHON_FORMAT_SSIZE_T "" #define PyInt_FromSsize_t(z) PyInt_FromLong(z) #define PyInt_AsSsize_t(o) __Pyx_PyInt_As_int(o) #define PyNumber_Index(o) ((PyNumber_Check(o) && !PyFloat_Check(o)) ? PyNumber_Int(o) : \ (PyErr_Format(PyExc_TypeError, \ "expected index value, got %.200s", Py_TYPE(o)->tp_name), \ (PyObject*)0)) #define __Pyx_PyIndex_Check(o) (PyNumber_Check(o) && !PyFloat_Check(o) && \ !PyComplex_Check(o)) #define PyIndex_Check __Pyx_PyIndex_Check #define PyErr_WarnEx(category, message, stacklevel) PyErr_Warn(category, message) #define __PYX_BUILD_PY_SSIZE_T "i" #else #define __PYX_BUILD_PY_SSIZE_T "n" #define CYTHON_FORMAT_SSIZE_T "z" #define __Pyx_PyIndex_Check PyIndex_Check #endif #if PY_VERSION_HEX < 0x02060000 #define Py_REFCNT(ob) (((PyObject*)(ob))->ob_refcnt) #define Py_TYPE(ob) (((PyObject*)(ob))->ob_type) #define Py_SIZE(ob) (((PyVarObject*)(ob))->ob_size) #define PyVarObject_HEAD_INIT(type, size) \ PyObject_HEAD_INIT(type) size, #define PyType_Modified(t) typedef struct { void *buf; PyObject *obj; Py_ssize_t len; Py_ssize_t itemsize; int readonly; int ndim; char *format; Py_ssize_t *shape; Py_ssize_t *strides; Py_ssize_t *suboffsets; void *internal; } Py_buffer; #define PyBUF_SIMPLE 0 #define PyBUF_WRITABLE 0x0001 #define PyBUF_FORMAT 0x0004 #define PyBUF_ND 0x0008 #define PyBUF_STRIDES (0x0010 | PyBUF_ND) #define PyBUF_C_CONTIGUOUS (0x0020 | PyBUF_STRIDES) #define PyBUF_F_CONTIGUOUS (0x0040 | PyBUF_STRIDES) #define PyBUF_ANY_CONTIGUOUS (0x0080 | PyBUF_STRIDES) #define PyBUF_INDIRECT (0x0100 | PyBUF_STRIDES) #define PyBUF_RECORDS (PyBUF_STRIDES | PyBUF_FORMAT | PyBUF_WRITABLE) #define PyBUF_FULL (PyBUF_INDIRECT | PyBUF_FORMAT | PyBUF_WRITABLE) typedef int (*getbufferproc)(PyObject *, Py_buffer *, int); typedef void (*releasebufferproc)(PyObject *, Py_buffer *); #endif #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, 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 #if PY_VERSION_HEX < 0x02060000 #define PyUnicode_FromString(s) PyUnicode_Decode(s, strlen(s), "UTF-8", "strict") #endif #if PY_MAJOR_VERSION >= 3 #define Py_TPFLAGS_CHECKTYPES 0 #define Py_TPFLAGS_HAVE_INDEX 0 #endif #if (PY_VERSION_HEX < 0x02060000) || (PY_MAJOR_VERSION >= 3) #define Py_TPFLAGS_HAVE_NEWBUFFER 0 #endif #if PY_VERSION_HEX < 0x02060000 #define Py_TPFLAGS_HAVE_VERSION_TAG 0 #endif #if PY_VERSION_HEX < 0x02060000 && !defined(Py_TPFLAGS_IS_ABSTRACT) #define Py_TPFLAGS_IS_ABSTRACT 0 #endif #if PY_VERSION_HEX < 0x030400a1 && !defined(Py_TPFLAGS_HAVE_FINALIZE) #define Py_TPFLAGS_HAVE_FINALIZE 0 #endif #if PY_VERSION_HEX > 0x03030000 && defined(PyUnicode_KIND) #define CYTHON_PEP393_ENABLED 1 #define __Pyx_PyUnicode_READY(op) (likely(PyUnicode_IS_READY(op)) ? \ 0 : _PyUnicode_Ready((PyObject *)(op))) #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_LENGTH(u) #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i) #define __Pyx_PyUnicode_KIND(u) PyUnicode_KIND(u) #define __Pyx_PyUnicode_DATA(u) PyUnicode_DATA(u) #define __Pyx_PyUnicode_READ(k, d, i) PyUnicode_READ(k, d, i) #else #define CYTHON_PEP393_ENABLED 0 #define __Pyx_PyUnicode_READY(op) (0) #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_SIZE(u) #define __Pyx_PyUnicode_READ_CHAR(u, i) ((Py_UCS4)(PyUnicode_AS_UNICODE(u)[i])) #define __Pyx_PyUnicode_KIND(u) (sizeof(Py_UNICODE)) #define __Pyx_PyUnicode_DATA(u) ((void*)PyUnicode_AS_UNICODE(u)) #define __Pyx_PyUnicode_READ(k, d, i) ((void)(k), (Py_UCS4)(((Py_UNICODE*)d)[i])) #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)) #define __Pyx_PyUnicode_Concat(a, b) ((unlikely((a) == Py_None) || unlikely((b) == Py_None)) ? \ PyNumber_Add(a, b) : PyUnicode_Concat(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 #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_VERSION_HEX < 0x02060000 #define PyBytesObject PyStringObject #define PyBytes_Type PyString_Type #define PyBytes_Check PyString_Check #define PyBytes_CheckExact PyString_CheckExact #define PyBytes_FromString PyString_FromString #define PyBytes_FromStringAndSize PyString_FromStringAndSize #define PyBytes_FromFormat PyString_FromFormat #define PyBytes_DecodeEscape PyString_DecodeEscape #define PyBytes_AsString PyString_AsString #define PyBytes_AsStringAndSize PyString_AsStringAndSize #define PyBytes_Size PyString_Size #define PyBytes_AS_STRING PyString_AS_STRING #define PyBytes_GET_SIZE PyString_GET_SIZE #define PyBytes_Repr PyString_Repr #define PyBytes_Concat PyString_Concat #define PyBytes_ConcatAndDel PyString_ConcatAndDel #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_CheckExact(obj) || PyUnicode_CheckExact(obj) || \ PyString_Check(obj) || PyUnicode_Check(obj)) #define __Pyx_PyBaseString_CheckExact(obj) (PyString_CheckExact(obj) || PyUnicode_CheckExact(obj)) #endif #if PY_VERSION_HEX < 0x02060000 #define PySet_Check(obj) PyObject_TypeCheck(obj, &PySet_Type) #define PyFrozenSet_Check(obj) PyObject_TypeCheck(obj, &PyFrozenSet_Type) #endif #ifndef PySet_CheckExact #define PySet_CheckExact(obj) (Py_TYPE(obj) == &PySet_Type) #endif #define __Pyx_TypeCheck(obj, type) PyObject_TypeCheck(obj, (PyTypeObject *)type) #if PY_MAJOR_VERSION >= 3 #define PyIntObject PyLongObject #define PyInt_Type PyLong_Type #define PyInt_Check(op) PyLong_Check(op) #define PyInt_CheckExact(op) PyLong_CheckExact(op) #define PyInt_FromString PyLong_FromString #define PyInt_FromUnicode PyLong_FromUnicode #define PyInt_FromLong PyLong_FromLong #define PyInt_FromSize_t PyLong_FromSize_t #define PyInt_FromSsize_t PyLong_FromSsize_t #define PyInt_AsLong PyLong_AsLong #define PyInt_AS_LONG PyLong_AS_LONG #define PyInt_AsSsize_t PyLong_AsSsize_t #define PyInt_AsUnsignedLongMask PyLong_AsUnsignedLongMask #define PyInt_AsUnsignedLongLongMask PyLong_AsUnsignedLongLongMask #define PyNumber_Int PyNumber_Long #endif #if PY_MAJOR_VERSION >= 3 #define PyBoolObject PyLongObject #endif #if PY_VERSION_HEX < 0x03020000 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) || (PY_VERSION_HEX >= 0x03010300) #define __Pyx_PySequence_GetSlice(obj, a, b) PySequence_GetSlice(obj, a, b) #define __Pyx_PySequence_SetSlice(obj, a, b, value) PySequence_SetSlice(obj, a, b, value) #define __Pyx_PySequence_DelSlice(obj, a, b) PySequence_DelSlice(obj, a, b) #else #define __Pyx_PySequence_GetSlice(obj, a, b) (unlikely(!(obj)) ? \ (PyErr_SetString(PyExc_SystemError, "null argument to internal routine"), (PyObject*)0) : \ (likely((obj)->ob_type->tp_as_mapping) ? (PySequence_GetSlice(obj, a, b)) : \ (PyErr_Format(PyExc_TypeError, "'%.200s' object is unsliceable", (obj)->ob_type->tp_name), (PyObject*)0))) #define __Pyx_PySequence_SetSlice(obj, a, b, value) (unlikely(!(obj)) ? \ (PyErr_SetString(PyExc_SystemError, "null argument to internal routine"), -1) : \ (likely((obj)->ob_type->tp_as_mapping) ? (PySequence_SetSlice(obj, a, b, value)) : \ (PyErr_Format(PyExc_TypeError, "'%.200s' object doesn't support slice assignment", (obj)->ob_type->tp_name), -1))) #define __Pyx_PySequence_DelSlice(obj, a, b) (unlikely(!(obj)) ? \ (PyErr_SetString(PyExc_SystemError, "null argument to internal routine"), -1) : \ (likely((obj)->ob_type->tp_as_mapping) ? (PySequence_DelSlice(obj, a, b)) : \ (PyErr_Format(PyExc_TypeError, "'%.200s' object doesn't support slice deletion", (obj)->ob_type->tp_name), -1))) #endif #if PY_MAJOR_VERSION >= 3 #define PyMethod_New(func, self, klass) ((self) ? PyMethod_New(func, self) : PyInstanceMethod_New(func)) #endif #if PY_VERSION_HEX < 0x02050000 #define __Pyx_GetAttrString(o,n) PyObject_GetAttrString((o),((char *)(n))) #define __Pyx_SetAttrString(o,n,a) PyObject_SetAttrString((o),((char *)(n)),(a)) #define __Pyx_DelAttrString(o,n) PyObject_DelAttrString((o),((char *)(n))) #else #define __Pyx_GetAttrString(o,n) PyObject_GetAttrString((o),(n)) #define __Pyx_SetAttrString(o,n,a) PyObject_SetAttrString((o),(n),(a)) #define __Pyx_DelAttrString(o,n) PyObject_DelAttrString((o),(n)) #endif #if PY_VERSION_HEX < 0x02050000 #define __Pyx_NAMESTR(n) ((char *)(n)) #define __Pyx_DOCSTR(n) ((char *)(n)) #else #define __Pyx_NAMESTR(n) (n) #define __Pyx_DOCSTR(n) (n) #endif #ifndef CYTHON_INLINE #if defined(__GNUC__) #define CYTHON_INLINE __inline__ #elif defined(_MSC_VER) #define CYTHON_INLINE __inline #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L #define CYTHON_INLINE inline #else #define CYTHON_INLINE #endif #endif #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 #ifdef NAN #define __PYX_NAN() ((float) NAN) #else static CYTHON_INLINE float __PYX_NAN() { /* Initialize NaN. The sign is irrelevant, an exponent with all bits 1 and a nonzero mantissa means NaN. If the first bit in the mantissa is 1, it is a quiet NaN. */ float value; memset(&value, 0xFF, sizeof(value)); return value; } #endif #if PY_MAJOR_VERSION >= 3 #define __Pyx_PyNumber_Divide(x,y) PyNumber_TrueDivide(x,y) #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceTrueDivide(x,y) #else #define __Pyx_PyNumber_Divide(x,y) PyNumber_Divide(x,y) #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceDivide(x,y) #endif #ifndef __PYX_EXTERN_C #ifdef __cplusplus #define __PYX_EXTERN_C extern "C" #else #define __PYX_EXTERN_C extern #endif #endif #if defined(WIN32) || defined(MS_WINDOWS) #define _USE_MATH_DEFINES #endif #include #define __PYX_HAVE__pandas__msgpack #define __PYX_HAVE_API__pandas__msgpack #include "string.h" #include "stdio.h" #include "pythread.h" #include "stdlib.h" #include "limits.h" #include "numpy/arrayobject.h" #include "numpy/ufuncobject.h" #include "msgpack/unpack.h" #include "msgpack/pack.h" #ifdef _OPENMP #include #endif /* _OPENMP */ #ifdef PYREX_WITHOUT_ASSERTIONS #define CYTHON_WITHOUT_ASSERTIONS #endif #ifndef CYTHON_UNUSED # if defined(__GNUC__) # if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)) # define CYTHON_UNUSED __attribute__ ((__unused__)) # else # define CYTHON_UNUSED # endif # elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER)) # define CYTHON_UNUSED __attribute__ ((__unused__)) # else # define CYTHON_UNUSED # endif #endif typedef struct {PyObject **p; char *s; const Py_ssize_t n; const char* encoding; const char is_unicode; const char is_str; const char intern; } __Pyx_StringTabEntry; /*proto*/ #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_fits_Py_ssize_t(v, type, is_signed) ( \ (sizeof(type) < sizeof(Py_ssize_t)) || \ (sizeof(type) > sizeof(Py_ssize_t) && \ likely(v < (type)PY_SSIZE_T_MAX || \ v == (type)PY_SSIZE_T_MAX) && \ (!is_signed || likely(v > (type)PY_SSIZE_T_MIN || \ v == (type)PY_SSIZE_T_MIN))) || \ (sizeof(type) == sizeof(Py_ssize_t) && \ (is_signed || likely(v < (type)PY_SSIZE_T_MAX || \ v == (type)PY_SSIZE_T_MAX))) ) static CYTHON_INLINE char* __Pyx_PyObject_AsString(PyObject*); static CYTHON_INLINE char* __Pyx_PyObject_AsStringAndSize(PyObject*, Py_ssize_t* length); #define __Pyx_PyByteArray_FromString(s) PyByteArray_FromStringAndSize((const char*)s, strlen((const char*)s)) #define __Pyx_PyByteArray_FromStringAndSize(s, l) PyByteArray_FromStringAndSize((const char*)s, l) #define __Pyx_PyBytes_FromString PyBytes_FromString #define __Pyx_PyBytes_FromStringAndSize PyBytes_FromStringAndSize static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(char*); #if PY_MAJOR_VERSION < 3 #define __Pyx_PyStr_FromString __Pyx_PyBytes_FromString #define __Pyx_PyStr_FromStringAndSize __Pyx_PyBytes_FromStringAndSize #else #define __Pyx_PyStr_FromString __Pyx_PyUnicode_FromString #define __Pyx_PyStr_FromStringAndSize __Pyx_PyUnicode_FromStringAndSize #endif #define __Pyx_PyObject_AsSString(s) ((signed char*) __Pyx_PyObject_AsString(s)) #define __Pyx_PyObject_AsUString(s) ((unsigned char*) __Pyx_PyObject_AsString(s)) #define __Pyx_PyObject_FromUString(s) __Pyx_PyObject_FromString((char*)s) #define __Pyx_PyBytes_FromUString(s) __Pyx_PyBytes_FromString((char*)s) #define __Pyx_PyByteArray_FromUString(s) __Pyx_PyByteArray_FromString((char*)s) #define __Pyx_PyStr_FromUString(s) __Pyx_PyStr_FromString((char*)s) #define __Pyx_PyUnicode_FromUString(s) __Pyx_PyUnicode_FromString((char*)s) #if PY_MAJOR_VERSION < 3 static CYTHON_INLINE size_t __Pyx_Py_UNICODE_strlen(const Py_UNICODE *u) { const Py_UNICODE *u_end = u; while (*u_end++) ; return u_end - u - 1; } #else #define __Pyx_Py_UNICODE_strlen Py_UNICODE_strlen #endif #define __Pyx_PyUnicode_FromUnicode(u) PyUnicode_FromUnicode(u, __Pyx_Py_UNICODE_strlen(u)) #define __Pyx_PyUnicode_FromUnicodeAndLength PyUnicode_FromUnicode #define __Pyx_PyUnicode_AsUnicode PyUnicode_AsUnicode #define __Pyx_Owned_Py_None(b) (Py_INCREF(Py_None), Py_None) #define __Pyx_PyBool_FromLong(b) ((b) ? (Py_INCREF(Py_True), Py_True) : (Py_INCREF(Py_False), Py_False)) static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*); static CYTHON_INLINE PyObject* __Pyx_PyNumber_Int(PyObject* x); static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*); static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t); #if CYTHON_COMPILING_IN_CPYTHON #define __pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x)) #else #define __pyx_PyFloat_AsDouble(x) PyFloat_AsDouble(x) #endif #define __pyx_PyFloat_AsFloat(x) ((float) __pyx_PyFloat_AsDouble(x)) #if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII static int __Pyx_sys_getdefaultencoding_not_ascii; static int __Pyx_init_sys_getdefaultencoding_params(void) { PyObject* sys = NULL; PyObject* default_encoding = NULL; PyObject* ascii_chars_u = NULL; PyObject* ascii_chars_b = NULL; sys = PyImport_ImportModule("sys"); if (sys == NULL) goto bad; default_encoding = PyObject_CallMethod(sys, (char*) (const char*) "getdefaultencoding", NULL); if (default_encoding == NULL) goto bad; if (strcmp(PyBytes_AsString(default_encoding), "ascii") == 0) { __Pyx_sys_getdefaultencoding_not_ascii = 0; } else { const char* default_encoding_c = PyBytes_AS_STRING(default_encoding); 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 == NULL) goto bad; ascii_chars_b = PyUnicode_AsEncodedString(ascii_chars_u, default_encoding_c, NULL); if (ascii_chars_b == NULL || strncmp(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_XDECREF(sys); Py_XDECREF(default_encoding); Py_XDECREF(ascii_chars_u); Py_XDECREF(ascii_chars_b); return 0; bad: Py_XDECREF(sys); 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 = NULL; PyObject* default_encoding = NULL; char* default_encoding_c; sys = PyImport_ImportModule("sys"); if (sys == NULL) goto bad; default_encoding = PyObject_CallMethod(sys, (char*) (const char*) "getdefaultencoding", NULL); if (default_encoding == NULL) goto bad; default_encoding_c = PyBytes_AS_STRING(default_encoding); __PYX_DEFAULT_STRING_ENCODING = (char*) malloc(strlen(default_encoding_c)); strcpy(__PYX_DEFAULT_STRING_ENCODING, default_encoding_c); Py_DECREF(sys); Py_DECREF(default_encoding); return 0; bad: Py_XDECREF(sys); Py_XDECREF(default_encoding); return -1; } #endif #endif #ifdef __GNUC__ /* Test for GCC > 2.95 */ #if __GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95)) #define likely(x) __builtin_expect(!!(x), 1) #define unlikely(x) __builtin_expect(!!(x), 0) #else /* __GNUC__ > 2 ... */ #define likely(x) (x) #define unlikely(x) (x) #endif /* __GNUC__ > 2 ... */ #else /* __GNUC__ */ #define likely(x) (x) #define unlikely(x) (x) #endif /* __GNUC__ */ static PyObject *__pyx_m; static PyObject *__pyx_d; static PyObject *__pyx_b; static PyObject *__pyx_empty_tuple; static PyObject *__pyx_empty_bytes; static int __pyx_lineno; static int __pyx_clineno = 0; static const char * __pyx_cfilenm= __FILE__; static const char *__pyx_filename; #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[] = { "msgpack.pyx", "numpy.pxd", "type.pxd", "bool.pxd", "complex.pxd", }; /* "numpy.pxd":726 * # 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; /* "numpy.pxd":727 * * 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; /* "numpy.pxd":728 * 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; /* "numpy.pxd":729 * 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; /* "numpy.pxd":733 * #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; /* "numpy.pxd":734 * * 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; /* "numpy.pxd":735 * 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; /* "numpy.pxd":736 * 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; /* "numpy.pxd":740 * #ctypedef npy_uint128 uint128_t * * ctypedef npy_float16 float16_t # <<<<<<<<<<<<<< * ctypedef npy_float32 float32_t * ctypedef npy_float64 float64_t */ typedef npy_float16 __pyx_t_5numpy_float16_t; /* "numpy.pxd":741 * * ctypedef npy_float16 float16_t * ctypedef npy_float32 float32_t # <<<<<<<<<<<<<< * ctypedef npy_float64 float64_t * #ctypedef npy_float80 float80_t */ typedef npy_float32 __pyx_t_5numpy_float32_t; /* "numpy.pxd":742 * ctypedef npy_float16 float16_t * 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; /* "numpy.pxd":751 * # 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; /* "numpy.pxd":752 * # 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; /* "numpy.pxd":753 * 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; /* "numpy.pxd":755 * 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; /* "numpy.pxd":756 * * ctypedef npy_ulong uint_t * ctypedef npy_ulonglong ulong_t # <<<<<<<<<<<<<< * ctypedef npy_ulonglong ulonglong_t * */ typedef npy_ulonglong __pyx_t_5numpy_ulong_t; /* "numpy.pxd":757 * 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; /* "numpy.pxd":759 * ctypedef npy_ulonglong ulonglong_t * * ctypedef npy_intp intp_t # <<<<<<<<<<<<<< * ctypedef npy_uintp uintp_t * */ typedef npy_intp __pyx_t_5numpy_intp_t; /* "numpy.pxd":760 * * ctypedef npy_intp intp_t * ctypedef npy_uintp uintp_t # <<<<<<<<<<<<<< * * ctypedef npy_double float_t */ typedef npy_uintp __pyx_t_5numpy_uintp_t; /* "numpy.pxd":762 * 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; /* "numpy.pxd":763 * * ctypedef npy_double float_t * ctypedef npy_double double_t # <<<<<<<<<<<<<< * ctypedef npy_longdouble longdouble_t * */ typedef npy_double __pyx_t_5numpy_double_t; /* "numpy.pxd":764 * 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; #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 #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 /*--- Type declarations ---*/ struct __pyx_obj_6pandas_7msgpack_Packer; struct __pyx_obj_6pandas_7msgpack_Unpacker; /* "numpy.pxd":766 * 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; /* "numpy.pxd":767 * * ctypedef npy_cfloat cfloat_t * ctypedef npy_cdouble cdouble_t # <<<<<<<<<<<<<< * ctypedef npy_clongdouble clongdouble_t * */ typedef npy_cdouble __pyx_t_5numpy_cdouble_t; /* "numpy.pxd":768 * 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; /* "numpy.pxd":770 * ctypedef npy_clongdouble clongdouble_t * * ctypedef npy_cdouble complex_t # <<<<<<<<<<<<<< * * cdef inline object PyArray_MultiIterNew1(a): */ typedef npy_cdouble __pyx_t_5numpy_complex_t; struct __pyx_opt_args_6pandas_7msgpack_6Packer__pack; struct __pyx_opt_args_6pandas_7msgpack_8Unpacker__unpack; /* "pandas/msgpack.pyx":163 * @cython.boundscheck(False) * @cython.wraparound(False) * cdef int _pack(self, object o, int nest_limit=DEFAULT_RECURSE_LIMIT) except -1: # <<<<<<<<<<<<<< * cdef long long llval * cdef unsigned long long ullval */ struct __pyx_opt_args_6pandas_7msgpack_6Packer__pack { int __pyx_n; int nest_limit; }; /* "pandas/msgpack.pyx":585 * self.file_like = None * * cdef object _unpack(self, execute_fn execute, object write_bytes, bint iter=0): # <<<<<<<<<<<<<< * cdef int ret * cdef object obj */ struct __pyx_opt_args_6pandas_7msgpack_8Unpacker__unpack { int __pyx_n; int iter; }; /* "pandas/msgpack.pyx":99 * * * cdef class Packer(object): # <<<<<<<<<<<<<< * """MessagePack Packer * */ struct __pyx_obj_6pandas_7msgpack_Packer { PyObject_HEAD struct __pyx_vtabstruct_6pandas_7msgpack_Packer *__pyx_vtab; struct msgpack_packer pk; PyObject *_default; PyObject *_bencoding; PyObject *_berrors; char *encoding; char *unicode_errors; PyBoolObject *use_float; int autoreset; }; /* "pandas/msgpack.pyx":421 * * * cdef class Unpacker(object): # <<<<<<<<<<<<<< * """ * Streaming unpacker. */ struct __pyx_obj_6pandas_7msgpack_Unpacker { PyObject_HEAD struct __pyx_vtabstruct_6pandas_7msgpack_Unpacker *__pyx_vtab; template_context ctx; char *buf; size_t buf_size; size_t buf_head; size_t buf_tail; PyObject *file_like; PyObject *file_like_read; Py_ssize_t read_size; PyObject *object_hook; PyObject *encoding; PyObject *unicode_errors; size_t max_buffer_size; }; struct __pyx_vtabstruct_6pandas_7msgpack_Unpacker { PyObject *(*append_buffer)(struct __pyx_obj_6pandas_7msgpack_Unpacker *, void *, Py_ssize_t); PyObject *(*read_from_file)(struct __pyx_obj_6pandas_7msgpack_Unpacker *); PyObject *(*_unpack)(struct __pyx_obj_6pandas_7msgpack_Unpacker *, execute_fn, PyObject *, struct __pyx_opt_args_6pandas_7msgpack_8Unpacker__unpack *__pyx_optional_args); }; static struct __pyx_vtabstruct_6pandas_7msgpack_Unpacker *__pyx_vtabptr_6pandas_7msgpack_Unpacker; /* "pandas/msgpack.pyx":99 * * * cdef class Packer(object): # <<<<<<<<<<<<<< * """MessagePack Packer * */ struct __pyx_vtabstruct_6pandas_7msgpack_Packer { int (*_pack)(struct __pyx_obj_6pandas_7msgpack_Packer *, PyObject *, struct __pyx_opt_args_6pandas_7msgpack_6Packer__pack *__pyx_optional_args); PyObject *(*pack)(struct __pyx_obj_6pandas_7msgpack_Packer *, PyObject *, int __pyx_skip_dispatch); PyObject *(*pack_pair)(struct __pyx_obj_6pandas_7msgpack_Packer *, PyObject *, PyObject *, int); }; static struct __pyx_vtabstruct_6pandas_7msgpack_Packer *__pyx_vtabptr_6pandas_7msgpack_Packer; static CYTHON_INLINE PyObject *__pyx_f_6pandas_7msgpack_6Packer_pack_pair(struct __pyx_obj_6pandas_7msgpack_Packer *, PyObject *, PyObject *, int); #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); /*proto*/ #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 /* CYTHON_REFNANNY */ #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) #if CYTHON_COMPILING_IN_CPYTHON static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name) { PyTypeObject* tp = Py_TYPE(obj); if (likely(tp->tp_getattro)) return tp->tp_getattro(obj, attr_name); #if PY_MAJOR_VERSION < 3 if (likely(tp->tp_getattr)) return tp->tp_getattr(obj, PyString_AS_STRING(attr_name)); #endif return PyObject_GetAttr(obj, attr_name); } #else #define __Pyx_PyObject_GetAttrStr(o,n) PyObject_GetAttr(o,n) #endif static PyObject *__Pyx_GetBuiltinName(PyObject *name); /*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); /*proto*/ static void __Pyx_RaiseDoubleKeywordsError(const char* func_name, PyObject* kw_name); /*proto*/ static int __Pyx_ParseOptionalKeywords(PyObject *kwds, PyObject **argnames[], \ PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args, \ const char* function_name); /*proto*/ #if CYTHON_COMPILING_IN_CPYTHON #define __Pyx_PyObject_DelAttrStr(o,n) __Pyx_PyObject_SetAttrStr(o,n,NULL) static CYTHON_INLINE int __Pyx_PyObject_SetAttrStr(PyObject* obj, PyObject* attr_name, PyObject* value) { PyTypeObject* tp = Py_TYPE(obj); if (likely(tp->tp_setattro)) return tp->tp_setattro(obj, attr_name, value); #if PY_MAJOR_VERSION < 3 if (likely(tp->tp_setattr)) return tp->tp_setattr(obj, PyString_AS_STRING(attr_name), value); #endif return PyObject_SetAttr(obj, attr_name, value); } #else #define __Pyx_PyObject_DelAttrStr(o,n) PyObject_DelAttr(o,n) #define __Pyx_PyObject_SetAttrStr(o,n,v) PyObject_SetAttr(o,n,v) #endif static CYTHON_INLINE int __Pyx_CheckKeywordStrings(PyObject *kwdict, const char* function_name, int kw_allowed); /*proto*/ static CYTHON_INLINE void __Pyx_ErrRestore(PyObject *type, PyObject *value, PyObject *tb); /*proto*/ static CYTHON_INLINE void __Pyx_ErrFetch(PyObject **type, PyObject **value, PyObject **tb); /*proto*/ static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause); /*proto*/ static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type); /*proto*/ static CYTHON_INLINE PyObject *__Pyx_GetModuleGlobalName(PyObject *name); /*proto*/ static CYTHON_INLINE int __Pyx_IterFinish(void); /*proto*/ static PyObject* __Pyx_PyObject_CallMethodTuple(PyObject* obj, PyObject* method_name, PyObject* args) { PyObject *method, *result = NULL; if (unlikely(!args)) return NULL; method = __Pyx_PyObject_GetAttrStr(obj, method_name); if (unlikely(!method)) goto bad; result = PyObject_Call(method, args, NULL); Py_DECREF(method); bad: Py_DECREF(args); return result; } #define __Pyx_PyObject_CallMethod3(obj, name, arg1, arg2, arg3) \ __Pyx_PyObject_CallMethodTuple(obj, name, PyTuple_Pack(3, arg1, arg2, arg3)) #define __Pyx_PyObject_CallMethod2(obj, name, arg1, arg2) \ __Pyx_PyObject_CallMethodTuple(obj, name, PyTuple_Pack(2, arg1, arg2)) #define __Pyx_PyObject_CallMethod1(obj, name, arg1) \ __Pyx_PyObject_CallMethodTuple(obj, name, PyTuple_Pack(1, arg1)) #define __Pyx_PyObject_CallMethod0(obj, name) \ __Pyx_PyObject_CallMethodTuple(obj, name, (Py_INCREF(__pyx_empty_tuple), __pyx_empty_tuple)) static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected); static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index); static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void); static void __Pyx_UnpackTupleError(PyObject *, Py_ssize_t index); /*proto*/ static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected); /*proto*/ static CYTHON_INLINE int __Pyx_unpack_tuple2(PyObject* tuple, PyObject** value1, PyObject** value2, int is_tuple, int has_known_size, int decref_tuple); static CYTHON_INLINE PyObject* __Pyx_dict_iterator(PyObject* dict, int is_dict, PyObject* method_name, Py_ssize_t* p_orig_length, int* p_is_dict); static CYTHON_INLINE int __Pyx_dict_iter_next(PyObject* dict_or_iter, Py_ssize_t orig_length, Py_ssize_t* ppos, PyObject** pkey, PyObject** pvalue, PyObject** pitem, int is_dict); static int __Pyx_SetVtable(PyObject *dict, void *vtable); /*proto*/ static PyObject *__Pyx_CalculateMetaclass(PyTypeObject *metaclass, PyObject *bases); static PyObject *__Pyx_Py3MetaclassPrepare(PyObject *metaclass, PyObject *bases, PyObject *name, PyObject *qualname, PyObject *mkw, PyObject *modname, PyObject *doc); /*proto*/ static PyObject *__Pyx_Py3ClassCreate(PyObject *metaclass, PyObject *name, PyObject *bases, PyObject *dict, PyObject *mkw, int calculate_metaclass, int allow_py2_metaclass); /*proto*/ static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type); #define __Pyx_CyFunction_USED 1 #include #define __Pyx_CYFUNCTION_STATICMETHOD 0x01 #define __Pyx_CYFUNCTION_CLASSMETHOD 0x02 #define __Pyx_CYFUNCTION_CCLASS 0x04 #define __Pyx_CyFunction_GetClosure(f) \ (((__pyx_CyFunctionObject *) (f))->func_closure) #define __Pyx_CyFunction_GetClassObj(f) \ (((__pyx_CyFunctionObject *) (f))->func_classobj) #define __Pyx_CyFunction_Defaults(type, f) \ ((type *)(((__pyx_CyFunctionObject *) (f))->defaults)) #define __Pyx_CyFunction_SetDefaultsGetter(f, g) \ ((__pyx_CyFunctionObject *) (f))->defaults_getter = (g) typedef struct { PyCFunctionObject func; int flags; PyObject *func_dict; PyObject *func_weakreflist; PyObject *func_name; PyObject *func_qualname; PyObject *func_doc; PyObject *func_globals; PyObject *func_code; PyObject *func_closure; PyObject *func_classobj; /* No-args super() class cell */ void *defaults; int defaults_pyobjects; PyObject *defaults_tuple; /* Const defaults tuple */ PyObject *defaults_kwdict; /* Const kwonly defaults dict */ PyObject *(*defaults_getter)(PyObject *); PyObject *func_annotations; /* function annotations dict */ } __pyx_CyFunctionObject; static PyTypeObject *__pyx_CyFunctionType = 0; #define __Pyx_CyFunction_NewEx(ml, flags, qualname, self, module, globals, code) \ __Pyx_CyFunction_New(__pyx_CyFunctionType, ml, flags, qualname, self, module, globals, code) static PyObject *__Pyx_CyFunction_New(PyTypeObject *, PyMethodDef *ml, int flags, PyObject* qualname, PyObject *self, PyObject *module, PyObject *globals, PyObject* code); static CYTHON_INLINE void *__Pyx_CyFunction_InitDefaults(PyObject *m, size_t size, int pyobjects); static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *m, PyObject *tuple); static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *m, PyObject *dict); static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *m, PyObject *dict); static int __Pyx_CyFunction_init(void); static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level); /*proto*/ static CYTHON_INLINE size_t __Pyx_PyInt_As_size_t(PyObject *); static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *); static CYTHON_INLINE unsigned PY_LONG_LONG __Pyx_PyInt_As_unsigned_PY_LONG_LONG(PyObject *); static CYTHON_INLINE PY_LONG_LONG __Pyx_PyInt_As_PY_LONG_LONG(PyObject *); static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *); static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value); #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(_WIN32) || defined(__clang__)) && defined(__cplusplus) && CYTHON_CCOMPLEX #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 static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float, float); #if CYTHON_CCOMPLEX #define __Pyx_c_eqf(a, b) ((a)==(b)) #define __Pyx_c_sumf(a, b) ((a)+(b)) #define __Pyx_c_difff(a, b) ((a)-(b)) #define __Pyx_c_prodf(a, b) ((a)*(b)) #define __Pyx_c_quotf(a, b) ((a)/(b)) #define __Pyx_c_negf(a) (-(a)) #ifdef __cplusplus #define __Pyx_c_is_zerof(z) ((z)==(float)0) #define __Pyx_c_conjf(z) (::std::conj(z)) #if 1 #define __Pyx_c_absf(z) (::std::abs(z)) #define __Pyx_c_powf(a, b) (::std::pow(a, b)) #endif #else #define __Pyx_c_is_zerof(z) ((z)==0) #define __Pyx_c_conjf(z) (conjf(z)) #if 1 #define __Pyx_c_absf(z) (cabsf(z)) #define __Pyx_c_powf(a, b) (cpowf(a, b)) #endif #endif #else static CYTHON_INLINE int __Pyx_c_eqf(__pyx_t_float_complex, __pyx_t_float_complex); static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_sumf(__pyx_t_float_complex, __pyx_t_float_complex); static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_difff(__pyx_t_float_complex, __pyx_t_float_complex); static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_prodf(__pyx_t_float_complex, __pyx_t_float_complex); static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_quotf(__pyx_t_float_complex, __pyx_t_float_complex); static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_negf(__pyx_t_float_complex); static CYTHON_INLINE int __Pyx_c_is_zerof(__pyx_t_float_complex); static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_conjf(__pyx_t_float_complex); #if 1 static CYTHON_INLINE float __Pyx_c_absf(__pyx_t_float_complex); static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_powf(__pyx_t_float_complex, __pyx_t_float_complex); #endif #endif static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double, double); #if CYTHON_CCOMPLEX #define __Pyx_c_eq(a, b) ((a)==(b)) #define __Pyx_c_sum(a, b) ((a)+(b)) #define __Pyx_c_diff(a, b) ((a)-(b)) #define __Pyx_c_prod(a, b) ((a)*(b)) #define __Pyx_c_quot(a, b) ((a)/(b)) #define __Pyx_c_neg(a) (-(a)) #ifdef __cplusplus #define __Pyx_c_is_zero(z) ((z)==(double)0) #define __Pyx_c_conj(z) (::std::conj(z)) #if 1 #define __Pyx_c_abs(z) (::std::abs(z)) #define __Pyx_c_pow(a, b) (::std::pow(a, b)) #endif #else #define __Pyx_c_is_zero(z) ((z)==0) #define __Pyx_c_conj(z) (conj(z)) #if 1 #define __Pyx_c_abs(z) (cabs(z)) #define __Pyx_c_pow(a, b) (cpow(a, b)) #endif #endif #else static CYTHON_INLINE int __Pyx_c_eq(__pyx_t_double_complex, __pyx_t_double_complex); static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_sum(__pyx_t_double_complex, __pyx_t_double_complex); static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_diff(__pyx_t_double_complex, __pyx_t_double_complex); static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_prod(__pyx_t_double_complex, __pyx_t_double_complex); static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_quot(__pyx_t_double_complex, __pyx_t_double_complex); static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_neg(__pyx_t_double_complex); static CYTHON_INLINE int __Pyx_c_is_zero(__pyx_t_double_complex); static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_conj(__pyx_t_double_complex); #if 1 static CYTHON_INLINE double __Pyx_c_abs(__pyx_t_double_complex); static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_pow(__pyx_t_double_complex, __pyx_t_double_complex); #endif #endif static CYTHON_INLINE PyObject* __Pyx_PyInt_From_ptrdiff_t(ptrdiff_t value); static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value); static int __Pyx_check_binary_version(void); #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 static PyObject *__Pyx_ImportModule(const char *name); /*proto*/ static PyTypeObject *__Pyx_ImportType(const char *module_name, const char *class_name, size_t size, int strict); /*proto*/ typedef struct { int code_line; PyCodeObject* code_object; } __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); static void __Pyx_AddTraceback(const char *funcname, int c_line, int py_line, const char *filename); /*proto*/ static int __Pyx_InitStrings(__Pyx_StringTabEntry *t); /*proto*/ /* Module declarations from 'cpython.version' */ /* Module declarations from 'cpython.ref' */ /* Module declarations from 'cpython.exc' */ /* Module declarations from 'cpython.module' */ /* Module declarations from 'cpython.mem' */ /* Module declarations from 'cpython.tuple' */ /* Module declarations from 'cpython.list' */ /* Module declarations from 'libc.string' */ /* Module declarations from 'libc.stdio' */ /* Module declarations from 'cpython.object' */ /* Module declarations from 'cpython.sequence' */ /* Module declarations from 'cpython.mapping' */ /* Module declarations from 'cpython.iterator' */ /* Module declarations from '__builtin__' */ /* Module declarations from 'cpython.type' */ static PyTypeObject *__pyx_ptype_7cpython_4type_type = 0; /* Module declarations from 'cpython.number' */ /* Module declarations from 'cpython.int' */ /* Module declarations from '__builtin__' */ /* Module declarations from 'cpython.bool' */ static PyTypeObject *__pyx_ptype_7cpython_4bool_bool = 0; /* Module declarations from 'cpython.long' */ /* Module declarations from 'cpython.float' */ /* Module declarations from '__builtin__' */ /* Module declarations from 'cpython.complex' */ static PyTypeObject *__pyx_ptype_7cpython_7complex_complex = 0; /* Module declarations from 'cpython.string' */ /* Module declarations from 'cpython.unicode' */ /* Module declarations from 'cpython.dict' */ /* Module declarations from 'cpython.instance' */ /* Module declarations from 'cpython.function' */ /* Module declarations from 'cpython.method' */ /* Module declarations from 'cpython.weakref' */ /* Module declarations from 'cpython.getargs' */ /* Module declarations from 'cpython.pythread' */ /* Module declarations from 'cpython.pystate' */ /* Module declarations from 'cpython.cobject' */ /* Module declarations from 'cpython.oldbuffer' */ /* Module declarations from 'cpython.set' */ /* Module declarations from 'cpython.buffer' */ /* Module declarations from 'cpython.bytes' */ /* Module declarations from 'cpython.pycapsule' */ /* Module declarations from 'cpython' */ /* Module declarations from 'libc.stdlib' */ /* Module declarations from 'libc.limits' */ /* Module declarations from 'cython' */ /* 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*/ /* Module declarations from 'pandas.msgpack' */ static PyTypeObject *__pyx_ptype_6pandas_7msgpack_Packer = 0; static PyTypeObject *__pyx_ptype_6pandas_7msgpack_Unpacker = 0; static int __pyx_v_6pandas_7msgpack_DEFAULT_RECURSE_LIMIT; static CYTHON_INLINE PyObject *__pyx_f_6pandas_7msgpack_init_ctx(template_context *, PyObject *, PyObject *, PyObject *, int, char *, char *); /*proto*/ #define __Pyx_MODULE_NAME "pandas.msgpack" int __pyx_module_is_main_pandas__msgpack = 0; /* Implementation of 'pandas.msgpack' */ static PyObject *__pyx_builtin_IOError; static PyObject *__pyx_builtin_ValueError; static PyObject *__pyx_builtin_MemoryError; static PyObject *__pyx_builtin_TypeError; static PyObject *__pyx_builtin_StopIteration; static PyObject *__pyx_builtin_range; static PyObject *__pyx_builtin_RuntimeError; static PyObject *__pyx_pf_6pandas_7msgpack_9ExtraData___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_unpacked, PyObject *__pyx_v_extra); /* proto */ static PyObject *__pyx_pf_6pandas_7msgpack_9ExtraData_2__str__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self); /* proto */ static int __pyx_pf_6pandas_7msgpack_6Packer___cinit__(struct __pyx_obj_6pandas_7msgpack_Packer *__pyx_v_self); /* proto */ static int __pyx_pf_6pandas_7msgpack_6Packer_2__init__(struct __pyx_obj_6pandas_7msgpack_Packer *__pyx_v_self, PyObject *__pyx_v_default, PyObject *__pyx_v_encoding, PyObject *__pyx_v_unicode_errors, PyObject *__pyx_v_use_single_float, int __pyx_v_autoreset); /* proto */ static void __pyx_pf_6pandas_7msgpack_6Packer_4__dealloc__(struct __pyx_obj_6pandas_7msgpack_Packer *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_7msgpack_6Packer_6pack(struct __pyx_obj_6pandas_7msgpack_Packer *__pyx_v_self, PyObject *__pyx_v_obj); /* proto */ static PyObject *__pyx_pf_6pandas_7msgpack_6Packer_8pack_array_header(struct __pyx_obj_6pandas_7msgpack_Packer *__pyx_v_self, size_t __pyx_v_size); /* proto */ static PyObject *__pyx_pf_6pandas_7msgpack_6Packer_10pack_map_header(struct __pyx_obj_6pandas_7msgpack_Packer *__pyx_v_self, size_t __pyx_v_size); /* proto */ static PyObject *__pyx_pf_6pandas_7msgpack_6Packer_12pack_map_pairs(struct __pyx_obj_6pandas_7msgpack_Packer *__pyx_v_self, PyObject *__pyx_v_pairs); /* proto */ static PyObject *__pyx_pf_6pandas_7msgpack_6Packer_14reset(struct __pyx_obj_6pandas_7msgpack_Packer *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_7msgpack_6Packer_16bytes(struct __pyx_obj_6pandas_7msgpack_Packer *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_7msgpack_pack(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_o, PyObject *__pyx_v_stream, PyObject *__pyx_v_default, PyObject *__pyx_v_encoding, PyObject *__pyx_v_unicode_errors); /* proto */ static PyObject *__pyx_pf_6pandas_7msgpack_2packb(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_o, PyObject *__pyx_v_default, PyObject *__pyx_v_encoding, PyObject *__pyx_v_unicode_errors, PyObject *__pyx_v_use_single_float); /* proto */ static PyObject *__pyx_pf_6pandas_7msgpack_4unpackb(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_packed, PyObject *__pyx_v_object_hook, PyObject *__pyx_v_list_hook, int __pyx_v_use_list, PyObject *__pyx_v_encoding, PyObject *__pyx_v_unicode_errors, PyObject *__pyx_v_object_pairs_hook); /* proto */ static PyObject *__pyx_pf_6pandas_7msgpack_6unpack(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_stream, PyObject *__pyx_v_object_hook, PyObject *__pyx_v_list_hook, int __pyx_v_use_list, PyObject *__pyx_v_encoding, PyObject *__pyx_v_unicode_errors, PyObject *__pyx_v_object_pairs_hook); /* proto */ static int __pyx_pf_6pandas_7msgpack_8Unpacker___cinit__(struct __pyx_obj_6pandas_7msgpack_Unpacker *__pyx_v_self); /* proto */ static void __pyx_pf_6pandas_7msgpack_8Unpacker_2__dealloc__(struct __pyx_obj_6pandas_7msgpack_Unpacker *__pyx_v_self); /* proto */ static int __pyx_pf_6pandas_7msgpack_8Unpacker_4__init__(struct __pyx_obj_6pandas_7msgpack_Unpacker *__pyx_v_self, PyObject *__pyx_v_file_like, Py_ssize_t __pyx_v_read_size, int __pyx_v_use_list, PyObject *__pyx_v_object_hook, PyObject *__pyx_v_object_pairs_hook, PyObject *__pyx_v_list_hook, PyObject *__pyx_v_encoding, PyObject *__pyx_v_unicode_errors, int __pyx_v_max_buffer_size); /* proto */ static PyObject *__pyx_pf_6pandas_7msgpack_8Unpacker_6feed(struct __pyx_obj_6pandas_7msgpack_Unpacker *__pyx_v_self, PyObject *__pyx_v_next_bytes); /* proto */ static PyObject *__pyx_pf_6pandas_7msgpack_8Unpacker_8read_bytes(struct __pyx_obj_6pandas_7msgpack_Unpacker *__pyx_v_self, Py_ssize_t __pyx_v_nbytes); /* proto */ static PyObject *__pyx_pf_6pandas_7msgpack_8Unpacker_10unpack(struct __pyx_obj_6pandas_7msgpack_Unpacker *__pyx_v_self, PyObject *__pyx_v_write_bytes); /* proto */ static PyObject *__pyx_pf_6pandas_7msgpack_8Unpacker_12skip(struct __pyx_obj_6pandas_7msgpack_Unpacker *__pyx_v_self, PyObject *__pyx_v_write_bytes); /* proto */ static PyObject *__pyx_pf_6pandas_7msgpack_8Unpacker_14read_array_header(struct __pyx_obj_6pandas_7msgpack_Unpacker *__pyx_v_self, PyObject *__pyx_v_write_bytes); /* proto */ static PyObject *__pyx_pf_6pandas_7msgpack_8Unpacker_16read_map_header(struct __pyx_obj_6pandas_7msgpack_Unpacker *__pyx_v_self, PyObject *__pyx_v_write_bytes); /* proto */ static PyObject *__pyx_pf_6pandas_7msgpack_8Unpacker_18__iter__(struct __pyx_obj_6pandas_7msgpack_Unpacker *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_7msgpack_8Unpacker_20__next__(struct __pyx_obj_6pandas_7msgpack_Unpacker *__pyx_v_self); /* 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_7msgpack_Packer(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_6pandas_7msgpack_Unpacker(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static char __pyx_k_B[] = "B"; static char __pyx_k_H[] = "H"; static char __pyx_k_I[] = "I"; static char __pyx_k_L[] = "L"; static char __pyx_k_O[] = "O"; static char __pyx_k_Q[] = "Q"; static char __pyx_k_b[] = "b"; static char __pyx_k_d[] = "d"; static char __pyx_k_f[] = "f"; static char __pyx_k_g[] = "g"; static char __pyx_k_h[] = "h"; static char __pyx_k_i[] = "i"; static char __pyx_k_l[] = "l"; static char __pyx_k_o[] = "o"; static char __pyx_k_q[] = "q"; static char __pyx_k_Zd[] = "Zd"; static char __pyx_k_Zf[] = "Zf"; static char __pyx_k_Zg[] = "Zg"; static char __pyx_k_np[] = "np"; static char __pyx_k_buf[] = "buf"; static char __pyx_k_ctx[] = "ctx"; static char __pyx_k_doc[] = "__doc__"; static char __pyx_k_obj[] = "obj"; static char __pyx_k_off[] = "off"; static char __pyx_k_ret[] = "ret"; static char __pyx_k_str[] = "__str__"; static char __pyx_k_cenc[] = "cenc"; static char __pyx_k_cerr[] = "cerr"; static char __pyx_k_init[] = "__init__"; static char __pyx_k_main[] = "__main__"; static char __pyx_k_pack[] = "pack"; static char __pyx_k_read[] = "read"; static char __pyx_k_self[] = "self"; static char __pyx_k_test[] = "__test__"; static char __pyx_k_ascii[] = "ascii"; static char __pyx_k_extra[] = "extra"; static char __pyx_k_items[] = "items"; static char __pyx_k_numpy[] = "numpy"; static char __pyx_k_packb[] = "packb"; static char __pyx_k_range[] = "range"; static char __pyx_k_utf_8[] = "utf-8"; static char __pyx_k_write[] = "write"; static char __pyx_k_encode[] = "encode"; static char __pyx_k_import[] = "__import__"; static char __pyx_k_module[] = "__module__"; static char __pyx_k_packed[] = "packed"; static char __pyx_k_packer[] = "packer"; static char __pyx_k_stream[] = "stream"; static char __pyx_k_strict[] = "strict"; static char __pyx_k_unpack[] = "unpack"; static char __pyx_k_IOError[] = "IOError"; static char __pyx_k_buf_len[] = "buf_len"; static char __pyx_k_default[] = "default"; static char __pyx_k_prepare[] = "__prepare__"; static char __pyx_k_unpackb[] = "unpackb"; static char __pyx_k_encoding[] = "encoding"; static char __pyx_k_qualname[] = "__qualname__"; static char __pyx_k_unpacked[] = "unpacked"; static char __pyx_k_use_list[] = "use_list"; static char __pyx_k_ExtraData[] = "ExtraData"; static char __pyx_k_OutOfData[] = "OutOfData"; static char __pyx_k_TypeError[] = "TypeError"; static char __pyx_k_autoreset[] = "autoreset"; static char __pyx_k_file_like[] = "file_like"; static char __pyx_k_iteritems[] = "iteritems"; static char __pyx_k_list_hook[] = "list_hook"; static char __pyx_k_metaclass[] = "__metaclass__"; static char __pyx_k_read_size[] = "read_size"; static char __pyx_k_BufferFull[] = "BufferFull"; static char __pyx_k_ValueError[] = "ValueError"; static char __pyx_k_pyx_vtable[] = "__pyx_vtable__"; static char __pyx_k_MemoryError[] = "MemoryError"; static char __pyx_k_object_hook[] = "object_hook"; static char __pyx_k_write_bytes[] = "write_bytes"; static char __pyx_k_RuntimeError[] = "RuntimeError"; static char __pyx_k_PackException[] = "PackException"; static char __pyx_k_StopIteration[] = "StopIteration"; static char __pyx_k_cannot_pack_s[] = "cannot pack : %s"; static char __pyx_k_PackValueError[] = "PackValueError"; static char __pyx_k_pandas_msgpack[] = "pandas.msgpack"; static char __pyx_k_unicode_errors[] = "unicode_errors"; static char __pyx_k_ExtraData___str[] = "ExtraData.__str__"; static char __pyx_k_UnpackException[] = "UnpackException"; static char __pyx_k_max_buffer_size[] = "max_buffer_size"; static char __pyx_k_ExtraData___init[] = "ExtraData.__init__"; static char __pyx_k_UnpackValueError[] = "UnpackValueError"; static char __pyx_k_use_single_float[] = "use_single_float"; static char __pyx_k_can_t_serialize_r[] = "can't serialize %r"; static char __pyx_k_object_pairs_hook[] = "object_pairs_hook"; static char __pyx_k_Unpack_failed_error_d[] = "Unpack failed: error = %d"; static char __pyx_k_No_more_data_to_unpack[] = "No more data to unpack."; static char __pyx_k_recursion_limit_exceeded[] = "recursion limit exceeded."; static char __pyx_k_default_must_be_a_callable[] = "default must be a callable."; static char __pyx_k_ndarray_is_not_C_contiguous[] = "ndarray is not C contiguous"; static char __pyx_k_list_hook_must_be_a_callable[] = "list_hook must be a callable."; static char __pyx_k_unpack_b_recieved_extra_data[] = "unpack(b) recieved extra data."; static char __pyx_k_object_hook_must_be_a_callable[] = "object_hook must be a callable."; static char __pyx_k_file_like_read_must_be_a_callab[] = "`file_like.read` must be a callable."; static char __pyx_k_home_yoh_deb_gits_pkg_exppsy_pa[] = "/home/yoh/deb/gits/pkg-exppsy/pandas/pandas/msgpack.pyx"; static char __pyx_k_unknown_dtype_code_in_numpy_pxd[] = "unknown dtype code in numpy.pxd (%d)"; static char __pyx_k_unpacker_feed_is_not_be_able_to[] = "unpacker.feed() is not be able to use with `file_like`."; static char __pyx_k_Can_t_encode_unicode_string_no_e[] = "Can't encode unicode string: no encoding is specified"; static char __pyx_k_Format_string_allocated_too_shor[] = "Format string allocated too short, see comment in numpy.pxd"; static char __pyx_k_Non_native_byte_order_not_suppor[] = "Non-native byte order not supported"; static char __pyx_k_Unable_to_allocate_internal_buff[] = "Unable to allocate internal buffer."; static char __pyx_k_Unable_to_enlarge_internal_buffe[] = "Unable to enlarge internal buffer."; static char __pyx_k_ndarray_is_not_Fortran_contiguou[] = "ndarray is not Fortran contiguous"; static char __pyx_k_object_pairs_hook_and_object_hoo[] = "object_pairs_hook and object_hook are mutually exclusive."; static char __pyx_k_object_pairs_hook_must_be_a_call[] = "object_pairs_hook must be a callable."; static char __pyx_k_read_size_should_be_less_or_equa[] = "read_size should be less or equal to max_buffer_size"; static char __pyx_k_Format_string_allocated_too_shor_2[] = "Format string allocated too short."; static PyObject *__pyx_n_s_BufferFull; static PyObject *__pyx_kp_s_Can_t_encode_unicode_string_no_e; static PyObject *__pyx_n_s_ExtraData; static PyObject *__pyx_n_s_ExtraData___init; static PyObject *__pyx_n_s_ExtraData___str; 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_IOError; static PyObject *__pyx_n_s_MemoryError; static PyObject *__pyx_kp_s_No_more_data_to_unpack; static PyObject *__pyx_kp_u_Non_native_byte_order_not_suppor; static PyObject *__pyx_n_s_OutOfData; static PyObject *__pyx_n_s_PackException; static PyObject *__pyx_n_s_PackValueError; static PyObject *__pyx_n_s_RuntimeError; static PyObject *__pyx_n_s_StopIteration; static PyObject *__pyx_n_s_TypeError; static PyObject *__pyx_kp_s_Unable_to_allocate_internal_buff; static PyObject *__pyx_kp_s_Unable_to_enlarge_internal_buffe; static PyObject *__pyx_n_s_UnpackException; static PyObject *__pyx_n_s_UnpackValueError; static PyObject *__pyx_kp_s_Unpack_failed_error_d; static PyObject *__pyx_n_s_ValueError; static PyObject *__pyx_n_s_ascii; static PyObject *__pyx_n_s_autoreset; static PyObject *__pyx_n_s_buf; static PyObject *__pyx_n_s_buf_len; static PyObject *__pyx_kp_s_can_t_serialize_r; static PyObject *__pyx_kp_s_cannot_pack_s; static PyObject *__pyx_n_s_cenc; static PyObject *__pyx_n_s_cerr; static PyObject *__pyx_n_s_ctx; static PyObject *__pyx_n_s_default; static PyObject *__pyx_kp_s_default_must_be_a_callable; static PyObject *__pyx_n_s_doc; static PyObject *__pyx_n_s_encode; static PyObject *__pyx_n_s_encoding; static PyObject *__pyx_n_s_extra; static PyObject *__pyx_n_s_file_like; static PyObject *__pyx_kp_s_file_like_read_must_be_a_callab; static PyObject *__pyx_kp_s_home_yoh_deb_gits_pkg_exppsy_pa; static PyObject *__pyx_n_s_import; static PyObject *__pyx_n_s_init; static PyObject *__pyx_n_s_items; static PyObject *__pyx_n_s_iteritems; static PyObject *__pyx_n_s_list_hook; static PyObject *__pyx_kp_s_list_hook_must_be_a_callable; static PyObject *__pyx_n_s_main; static PyObject *__pyx_n_s_max_buffer_size; static PyObject *__pyx_n_s_metaclass; static PyObject *__pyx_n_s_module; 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_np; static PyObject *__pyx_n_s_numpy; static PyObject *__pyx_n_s_o; static PyObject *__pyx_n_s_obj; static PyObject *__pyx_n_s_object_hook; static PyObject *__pyx_kp_s_object_hook_must_be_a_callable; static PyObject *__pyx_n_s_object_pairs_hook; static PyObject *__pyx_kp_s_object_pairs_hook_and_object_hoo; static PyObject *__pyx_kp_s_object_pairs_hook_must_be_a_call; static PyObject *__pyx_n_s_off; static PyObject *__pyx_n_s_pack; static PyObject *__pyx_n_s_packb; static PyObject *__pyx_n_s_packed; static PyObject *__pyx_n_s_packer; static PyObject *__pyx_n_s_pandas_msgpack; static PyObject *__pyx_n_s_prepare; static PyObject *__pyx_n_s_pyx_vtable; static PyObject *__pyx_n_s_qualname; static PyObject *__pyx_n_s_range; static PyObject *__pyx_n_s_read; static PyObject *__pyx_n_s_read_size; static PyObject *__pyx_kp_s_read_size_should_be_less_or_equa; static PyObject *__pyx_kp_s_recursion_limit_exceeded; static PyObject *__pyx_n_s_ret; static PyObject *__pyx_n_s_self; static PyObject *__pyx_n_s_str; static PyObject *__pyx_n_s_stream; static PyObject *__pyx_n_s_strict; static PyObject *__pyx_n_s_test; static PyObject *__pyx_n_s_unicode_errors; static PyObject *__pyx_kp_u_unknown_dtype_code_in_numpy_pxd; static PyObject *__pyx_n_s_unpack; static PyObject *__pyx_kp_s_unpack_b_recieved_extra_data; static PyObject *__pyx_n_s_unpackb; static PyObject *__pyx_n_s_unpacked; static PyObject *__pyx_kp_s_unpacker_feed_is_not_be_able_to; static PyObject *__pyx_n_s_use_list; static PyObject *__pyx_n_s_use_single_float; static PyObject *__pyx_kp_s_utf_8; static PyObject *__pyx_n_s_write; static PyObject *__pyx_n_s_write_bytes; static PyObject *__pyx_int_0; static PyObject *__pyx_int_15; static int __pyx_k__5; static PyObject *__pyx_tuple_; static PyObject *__pyx_tuple__2; static PyObject *__pyx_tuple__3; static PyObject *__pyx_tuple__4; 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__25; static PyObject *__pyx_tuple__26; static PyObject *__pyx_tuple__27; static PyObject *__pyx_tuple__28; static PyObject *__pyx_tuple__29; static PyObject *__pyx_tuple__31; static PyObject *__pyx_tuple__33; static PyObject *__pyx_tuple__35; static PyObject *__pyx_tuple__37; static PyObject *__pyx_tuple__39; static PyObject *__pyx_codeobj__30; static PyObject *__pyx_codeobj__32; static PyObject *__pyx_codeobj__34; static PyObject *__pyx_codeobj__36; static PyObject *__pyx_codeobj__38; static PyObject *__pyx_codeobj__40; /* "pandas/msgpack.pyx":37 * * class ExtraData(ValueError): * def __init__(self, unpacked, extra): # <<<<<<<<<<<<<< * self.unpacked = unpacked * self.extra = extra */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_7msgpack_9ExtraData_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6pandas_7msgpack_9ExtraData___init__[] = "ExtraData.__init__(self, unpacked, extra)"; static PyMethodDef __pyx_mdef_6pandas_7msgpack_9ExtraData_1__init__ = {__Pyx_NAMESTR("__init__"), (PyCFunction)__pyx_pw_6pandas_7msgpack_9ExtraData_1__init__, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_7msgpack_9ExtraData___init__)}; static PyObject *__pyx_pw_6pandas_7msgpack_9ExtraData_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_self = 0; PyObject *__pyx_v_unpacked = 0; PyObject *__pyx_v_extra = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_unpacked,&__pyx_n_s_extra,0}; PyObject* values[3] = {0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_unpacked)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 37; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_extra)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 37; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 37; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 3) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); } __pyx_v_self = values[0]; __pyx_v_unpacked = values[1]; __pyx_v_extra = values[2]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 37; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.msgpack.ExtraData.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pandas_7msgpack_9ExtraData___init__(__pyx_self, __pyx_v_self, __pyx_v_unpacked, __pyx_v_extra); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_7msgpack_9ExtraData___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_unpacked, PyObject *__pyx_v_extra) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__init__", 0); /* "pandas/msgpack.pyx":38 * class ExtraData(ValueError): * def __init__(self, unpacked, extra): * self.unpacked = unpacked # <<<<<<<<<<<<<< * self.extra = extra * */ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_unpacked, __pyx_v_unpacked) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 38; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/msgpack.pyx":39 * def __init__(self, unpacked, extra): * self.unpacked = unpacked * self.extra = extra # <<<<<<<<<<<<<< * * def __str__(self): */ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_extra, __pyx_v_extra) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 39; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/msgpack.pyx":37 * * class ExtraData(ValueError): * def __init__(self, unpacked, extra): # <<<<<<<<<<<<<< * self.unpacked = unpacked * self.extra = extra */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("pandas.msgpack.ExtraData.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/msgpack.pyx":41 * self.extra = extra * * def __str__(self): # <<<<<<<<<<<<<< * return "unpack(b) recieved extra data." * */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_7msgpack_9ExtraData_3__str__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/ static char __pyx_doc_6pandas_7msgpack_9ExtraData_2__str__[] = "ExtraData.__str__(self)"; static PyMethodDef __pyx_mdef_6pandas_7msgpack_9ExtraData_3__str__ = {__Pyx_NAMESTR("__str__"), (PyCFunction)__pyx_pw_6pandas_7msgpack_9ExtraData_3__str__, METH_O, __Pyx_DOCSTR(__pyx_doc_6pandas_7msgpack_9ExtraData_2__str__)}; static PyObject *__pyx_pw_6pandas_7msgpack_9ExtraData_3__str__(PyObject *__pyx_self, PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__str__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_7msgpack_9ExtraData_2__str__(__pyx_self, ((PyObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_7msgpack_9ExtraData_2__str__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__str__", 0); /* "pandas/msgpack.pyx":42 * * def __str__(self): * return "unpack(b) recieved extra data." # <<<<<<<<<<<<<< * * class PackException(IOError): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_kp_s_unpack_b_recieved_extra_data); __pyx_r = __pyx_kp_s_unpack_b_recieved_extra_data; goto __pyx_L0; /* "pandas/msgpack.pyx":41 * self.extra = extra * * def __str__(self): # <<<<<<<<<<<<<< * return "unpack(b) recieved extra data." * */ /* function exit code */ __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/msgpack.pyx":127 * cdef bint autoreset * * def __cinit__(self): # <<<<<<<<<<<<<< * cdef int buf_size = 1024*1024 * self.pk.buf = malloc(buf_size); */ /* Python wrapper */ static int __pyx_pw_6pandas_7msgpack_6Packer_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_pw_6pandas_7msgpack_6Packer_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return -1;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__cinit__", 0))) return -1; __pyx_r = __pyx_pf_6pandas_7msgpack_6Packer___cinit__(((struct __pyx_obj_6pandas_7msgpack_Packer *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pandas_7msgpack_6Packer___cinit__(struct __pyx_obj_6pandas_7msgpack_Packer *__pyx_v_self) { int __pyx_v_buf_size; int __pyx_r; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__cinit__", 0); /* "pandas/msgpack.pyx":128 * * def __cinit__(self): * cdef int buf_size = 1024*1024 # <<<<<<<<<<<<<< * self.pk.buf = malloc(buf_size); * if self.pk.buf == NULL: */ __pyx_v_buf_size = 1048576; /* "pandas/msgpack.pyx":129 * def __cinit__(self): * cdef int buf_size = 1024*1024 * self.pk.buf = malloc(buf_size); # <<<<<<<<<<<<<< * if self.pk.buf == NULL: * raise MemoryError("Unable to allocate internal buffer.") */ __pyx_v_self->pk.buf = ((char *)malloc(__pyx_v_buf_size)); /* "pandas/msgpack.pyx":130 * cdef int buf_size = 1024*1024 * self.pk.buf = malloc(buf_size); * if self.pk.buf == NULL: # <<<<<<<<<<<<<< * raise MemoryError("Unable to allocate internal buffer.") * self.pk.buf_size = buf_size */ __pyx_t_1 = ((__pyx_v_self->pk.buf == NULL) != 0); if (__pyx_t_1) { /* "pandas/msgpack.pyx":131 * self.pk.buf = malloc(buf_size); * if self.pk.buf == NULL: * raise MemoryError("Unable to allocate internal buffer.") # <<<<<<<<<<<<<< * self.pk.buf_size = buf_size * self.pk.length = 0 */ __pyx_t_2 = PyObject_Call(__pyx_builtin_MemoryError, __pyx_tuple_, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 131; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 131; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } /* "pandas/msgpack.pyx":132 * if self.pk.buf == NULL: * raise MemoryError("Unable to allocate internal buffer.") * self.pk.buf_size = buf_size # <<<<<<<<<<<<<< * self.pk.length = 0 * */ __pyx_v_self->pk.buf_size = __pyx_v_buf_size; /* "pandas/msgpack.pyx":133 * raise MemoryError("Unable to allocate internal buffer.") * self.pk.buf_size = buf_size * self.pk.length = 0 # <<<<<<<<<<<<<< * * def __init__(self, default=None, encoding='utf-8', unicode_errors='strict', */ __pyx_v_self->pk.length = 0; /* "pandas/msgpack.pyx":127 * cdef bint autoreset * * def __cinit__(self): # <<<<<<<<<<<<<< * cdef int buf_size = 1024*1024 * self.pk.buf = malloc(buf_size); */ /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("pandas.msgpack.Packer.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/msgpack.pyx":135 * self.pk.length = 0 * * def __init__(self, default=None, encoding='utf-8', unicode_errors='strict', # <<<<<<<<<<<<<< * use_single_float=False, bint autoreset=1): * self.use_float = use_single_float */ /* Python wrapper */ static int __pyx_pw_6pandas_7msgpack_6Packer_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_pw_6pandas_7msgpack_6Packer_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_default = 0; PyObject *__pyx_v_encoding = 0; PyObject *__pyx_v_unicode_errors = 0; PyObject *__pyx_v_use_single_float = 0; int __pyx_v_autoreset; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_default,&__pyx_n_s_encoding,&__pyx_n_s_unicode_errors,&__pyx_n_s_use_single_float,&__pyx_n_s_autoreset,0}; PyObject* values[5] = {0,0,0,0,0}; values[0] = ((PyObject *)Py_None); values[1] = ((PyObject *)__pyx_kp_s_utf_8); values[2] = ((PyObject *)__pyx_n_s_strict); /* "pandas/msgpack.pyx":136 * * def __init__(self, default=None, encoding='utf-8', unicode_errors='strict', * use_single_float=False, bint autoreset=1): # <<<<<<<<<<<<<< * self.use_float = use_single_float * self.autoreset = autoreset */ values[3] = ((PyObject *)Py_False); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_default); if (value) { values[0] = value; kw_args--; } } case 1: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_encoding); if (value) { values[1] = value; kw_args--; } } case 2: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_unicode_errors); if (value) { values[2] = value; kw_args--; } } case 3: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_use_single_float); if (value) { values[3] = value; kw_args--; } } case 4: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_autoreset); if (value) { values[4] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 135; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_default = values[0]; __pyx_v_encoding = values[1]; __pyx_v_unicode_errors = values[2]; __pyx_v_use_single_float = values[3]; if (values[4]) { __pyx_v_autoreset = __Pyx_PyObject_IsTrue(values[4]); if (unlikely((__pyx_v_autoreset == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 136; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } else { __pyx_v_autoreset = ((int)1); } } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("__init__", 0, 0, 5, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 135; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.msgpack.Packer.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return -1; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pandas_7msgpack_6Packer_2__init__(((struct __pyx_obj_6pandas_7msgpack_Packer *)__pyx_v_self), __pyx_v_default, __pyx_v_encoding, __pyx_v_unicode_errors, __pyx_v_use_single_float, __pyx_v_autoreset); /* "pandas/msgpack.pyx":135 * self.pk.length = 0 * * def __init__(self, default=None, encoding='utf-8', unicode_errors='strict', # <<<<<<<<<<<<<< * use_single_float=False, bint autoreset=1): * self.use_float = use_single_float */ /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pandas_7msgpack_6Packer_2__init__(struct __pyx_obj_6pandas_7msgpack_Packer *__pyx_v_self, PyObject *__pyx_v_default, PyObject *__pyx_v_encoding, PyObject *__pyx_v_unicode_errors, PyObject *__pyx_v_use_single_float, int __pyx_v_autoreset) { int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; char *__pyx_t_5; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__init__", 0); /* "pandas/msgpack.pyx":137 * def __init__(self, default=None, encoding='utf-8', unicode_errors='strict', * use_single_float=False, bint autoreset=1): * self.use_float = use_single_float # <<<<<<<<<<<<<< * self.autoreset = autoreset * if default is not None: */ if (!(likely(((__pyx_v_use_single_float) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_use_single_float, __pyx_ptype_7cpython_4bool_bool))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 137; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_1 = __pyx_v_use_single_float; __Pyx_INCREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->use_float); __Pyx_DECREF(((PyObject *)__pyx_v_self->use_float)); __pyx_v_self->use_float = ((PyBoolObject *)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/msgpack.pyx":138 * use_single_float=False, bint autoreset=1): * self.use_float = use_single_float * self.autoreset = autoreset # <<<<<<<<<<<<<< * if default is not None: * if not PyCallable_Check(default): */ __pyx_v_self->autoreset = __pyx_v_autoreset; /* "pandas/msgpack.pyx":139 * self.use_float = use_single_float * self.autoreset = autoreset * if default is not None: # <<<<<<<<<<<<<< * if not PyCallable_Check(default): * raise TypeError("default must be a callable.") */ __pyx_t_2 = (__pyx_v_default != Py_None); __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { /* "pandas/msgpack.pyx":140 * self.autoreset = autoreset * if default is not None: * if not PyCallable_Check(default): # <<<<<<<<<<<<<< * raise TypeError("default must be a callable.") * self._default = default */ __pyx_t_3 = ((!(PyCallable_Check(__pyx_v_default) != 0)) != 0); if (__pyx_t_3) { /* "pandas/msgpack.pyx":141 * if default is not None: * if not PyCallable_Check(default): * raise TypeError("default must be a callable.") # <<<<<<<<<<<<<< * self._default = default * if encoding is None: */ __pyx_t_1 = PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__2, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 141; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 141; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } goto __pyx_L3; } __pyx_L3:; /* "pandas/msgpack.pyx":142 * if not PyCallable_Check(default): * raise TypeError("default must be a callable.") * self._default = default # <<<<<<<<<<<<<< * if encoding is None: * self.encoding = NULL */ __Pyx_INCREF(__pyx_v_default); __Pyx_GIVEREF(__pyx_v_default); __Pyx_GOTREF(__pyx_v_self->_default); __Pyx_DECREF(__pyx_v_self->_default); __pyx_v_self->_default = __pyx_v_default; /* "pandas/msgpack.pyx":143 * raise TypeError("default must be a callable.") * self._default = default * if encoding is None: # <<<<<<<<<<<<<< * self.encoding = NULL * self.unicode_errors = NULL */ __pyx_t_3 = (__pyx_v_encoding == Py_None); __pyx_t_2 = (__pyx_t_3 != 0); if (__pyx_t_2) { /* "pandas/msgpack.pyx":144 * self._default = default * if encoding is None: * self.encoding = NULL # <<<<<<<<<<<<<< * self.unicode_errors = NULL * else: */ __pyx_v_self->encoding = NULL; /* "pandas/msgpack.pyx":145 * if encoding is None: * self.encoding = NULL * self.unicode_errors = NULL # <<<<<<<<<<<<<< * else: * if isinstance(encoding, unicode): */ __pyx_v_self->unicode_errors = NULL; goto __pyx_L5; } /*else*/ { /* "pandas/msgpack.pyx":147 * self.unicode_errors = NULL * else: * if isinstance(encoding, unicode): # <<<<<<<<<<<<<< * self._bencoding = encoding.encode('ascii') * else: */ __pyx_t_2 = PyUnicode_Check(__pyx_v_encoding); __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { /* "pandas/msgpack.pyx":148 * else: * if isinstance(encoding, unicode): * self._bencoding = encoding.encode('ascii') # <<<<<<<<<<<<<< * else: * self._bencoding = encoding */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_encoding, __pyx_n_s_encode); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 148; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = PyObject_Call(__pyx_t_1, __pyx_tuple__3, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 148; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_GIVEREF(__pyx_t_4); __Pyx_GOTREF(__pyx_v_self->_bencoding); __Pyx_DECREF(__pyx_v_self->_bencoding); __pyx_v_self->_bencoding = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L6; } /*else*/ { /* "pandas/msgpack.pyx":150 * self._bencoding = encoding.encode('ascii') * else: * self._bencoding = encoding # <<<<<<<<<<<<<< * self.encoding = PyBytes_AsString(self._bencoding) * if isinstance(unicode_errors, unicode): */ __Pyx_INCREF(__pyx_v_encoding); __Pyx_GIVEREF(__pyx_v_encoding); __Pyx_GOTREF(__pyx_v_self->_bencoding); __Pyx_DECREF(__pyx_v_self->_bencoding); __pyx_v_self->_bencoding = __pyx_v_encoding; } __pyx_L6:; /* "pandas/msgpack.pyx":151 * else: * self._bencoding = encoding * self.encoding = PyBytes_AsString(self._bencoding) # <<<<<<<<<<<<<< * if isinstance(unicode_errors, unicode): * self._berrors = unicode_errors.encode('ascii') */ __pyx_t_4 = __pyx_v_self->_bencoding; __Pyx_INCREF(__pyx_t_4); __pyx_t_5 = PyBytes_AsString(__pyx_t_4); if (unlikely(__pyx_t_5 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 151; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_self->encoding = __pyx_t_5; /* "pandas/msgpack.pyx":152 * self._bencoding = encoding * self.encoding = PyBytes_AsString(self._bencoding) * if isinstance(unicode_errors, unicode): # <<<<<<<<<<<<<< * self._berrors = unicode_errors.encode('ascii') * else: */ __pyx_t_3 = PyUnicode_Check(__pyx_v_unicode_errors); __pyx_t_2 = (__pyx_t_3 != 0); if (__pyx_t_2) { /* "pandas/msgpack.pyx":153 * self.encoding = PyBytes_AsString(self._bencoding) * if isinstance(unicode_errors, unicode): * self._berrors = unicode_errors.encode('ascii') # <<<<<<<<<<<<<< * else: * self._berrors = unicode_errors */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_unicode_errors, __pyx_n_s_encode); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 153; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_1 = PyObject_Call(__pyx_t_4, __pyx_tuple__4, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 153; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->_berrors); __Pyx_DECREF(__pyx_v_self->_berrors); __pyx_v_self->_berrors = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L7; } /*else*/ { /* "pandas/msgpack.pyx":155 * self._berrors = unicode_errors.encode('ascii') * else: * self._berrors = unicode_errors # <<<<<<<<<<<<<< * self.unicode_errors = PyBytes_AsString(self._berrors) * */ __Pyx_INCREF(__pyx_v_unicode_errors); __Pyx_GIVEREF(__pyx_v_unicode_errors); __Pyx_GOTREF(__pyx_v_self->_berrors); __Pyx_DECREF(__pyx_v_self->_berrors); __pyx_v_self->_berrors = __pyx_v_unicode_errors; } __pyx_L7:; /* "pandas/msgpack.pyx":156 * else: * self._berrors = unicode_errors * self.unicode_errors = PyBytes_AsString(self._berrors) # <<<<<<<<<<<<<< * * def __dealloc__(self): */ __pyx_t_1 = __pyx_v_self->_berrors; __Pyx_INCREF(__pyx_t_1); __pyx_t_5 = PyBytes_AsString(__pyx_t_1); if (unlikely(__pyx_t_5 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 156; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_self->unicode_errors = __pyx_t_5; } __pyx_L5:; /* "pandas/msgpack.pyx":135 * self.pk.length = 0 * * def __init__(self, default=None, encoding='utf-8', unicode_errors='strict', # <<<<<<<<<<<<<< * use_single_float=False, bint autoreset=1): * self.use_float = use_single_float */ /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("pandas.msgpack.Packer.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/msgpack.pyx":158 * self.unicode_errors = PyBytes_AsString(self._berrors) * * def __dealloc__(self): # <<<<<<<<<<<<<< * free(self.pk.buf); * */ /* Python wrapper */ static void __pyx_pw_6pandas_7msgpack_6Packer_5__dealloc__(PyObject *__pyx_v_self); /*proto*/ static void __pyx_pw_6pandas_7msgpack_6Packer_5__dealloc__(PyObject *__pyx_v_self) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0); __pyx_pf_6pandas_7msgpack_6Packer_4__dealloc__(((struct __pyx_obj_6pandas_7msgpack_Packer *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); } static void __pyx_pf_6pandas_7msgpack_6Packer_4__dealloc__(struct __pyx_obj_6pandas_7msgpack_Packer *__pyx_v_self) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__dealloc__", 0); /* "pandas/msgpack.pyx":159 * * def __dealloc__(self): * free(self.pk.buf); # <<<<<<<<<<<<<< * * @cython.boundscheck(False) */ free(__pyx_v_self->pk.buf); /* "pandas/msgpack.pyx":158 * self.unicode_errors = PyBytes_AsString(self._berrors) * * def __dealloc__(self): # <<<<<<<<<<<<<< * free(self.pk.buf); * */ /* function exit code */ __Pyx_RefNannyFinishContext(); } /* "pandas/msgpack.pyx":163 * @cython.boundscheck(False) * @cython.wraparound(False) * cdef int _pack(self, object o, int nest_limit=DEFAULT_RECURSE_LIMIT) except -1: # <<<<<<<<<<<<<< * cdef long long llval * cdef unsigned long long ullval */ static int __pyx_f_6pandas_7msgpack_6Packer__pack(struct __pyx_obj_6pandas_7msgpack_Packer *__pyx_v_self, PyObject *__pyx_v_o, struct __pyx_opt_args_6pandas_7msgpack_6Packer__pack *__pyx_optional_args) { int __pyx_v_nest_limit = __pyx_k__5; PY_LONG_LONG __pyx_v_llval; unsigned PY_LONG_LONG __pyx_v_ullval; long __pyx_v_longval; float __pyx_v_fval; double __pyx_v_dval; char *__pyx_v_rawval; int __pyx_v_ret; PyObject *__pyx_v_d = 0; PyObject *__pyx_v_k = NULL; PyObject *__pyx_v_v = NULL; int __pyx_r; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_t_4; unsigned PY_LONG_LONG __pyx_t_5; PY_LONG_LONG __pyx_t_6; long __pyx_t_7; float __pyx_t_8; double __pyx_t_9; char *__pyx_t_10; Py_ssize_t __pyx_t_11; Py_ssize_t __pyx_t_12; int __pyx_t_13; PyObject *__pyx_t_14 = NULL; int __pyx_t_15; struct __pyx_opt_args_6pandas_7msgpack_6Packer__pack __pyx_t_16; PyObject *(*__pyx_t_17)(PyObject *); PyObject *__pyx_t_18 = NULL; PyObject *__pyx_t_19 = NULL; PyObject *(*__pyx_t_20)(PyObject *); int __pyx_t_21; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_pack", 0); if (__pyx_optional_args) { if (__pyx_optional_args->__pyx_n > 0) { __pyx_v_nest_limit = __pyx_optional_args->nest_limit; } } __Pyx_INCREF(__pyx_v_o); /* "pandas/msgpack.pyx":176 * cdef int n,i * * if nest_limit < 0: # <<<<<<<<<<<<<< * raise PackValueError("recursion limit exceeded.") * */ __pyx_t_1 = ((__pyx_v_nest_limit < 0) != 0); if (__pyx_t_1) { /* "pandas/msgpack.pyx":177 * * if nest_limit < 0: * raise PackValueError("recursion limit exceeded.") # <<<<<<<<<<<<<< * * if o is None: */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_PackValueError); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 177; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyObject_Call(__pyx_t_2, __pyx_tuple__6, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 177; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __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_filename = __pyx_f[0]; __pyx_lineno = 177; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } /* "pandas/msgpack.pyx":179 * raise PackValueError("recursion limit exceeded.") * * if o is None: # <<<<<<<<<<<<<< * ret = msgpack_pack_nil(&self.pk) * elif isinstance(o, bool): */ __pyx_t_1 = (__pyx_v_o == Py_None); __pyx_t_4 = (__pyx_t_1 != 0); if (__pyx_t_4) { /* "pandas/msgpack.pyx":180 * * if o is None: * ret = msgpack_pack_nil(&self.pk) # <<<<<<<<<<<<<< * elif isinstance(o, bool): * if o: */ __pyx_v_ret = msgpack_pack_nil((&__pyx_v_self->pk)); goto __pyx_L4; } /* "pandas/msgpack.pyx":181 * if o is None: * ret = msgpack_pack_nil(&self.pk) * elif isinstance(o, bool): # <<<<<<<<<<<<<< * if o: * ret = msgpack_pack_true(&self.pk) */ __pyx_t_4 = __Pyx_TypeCheck(__pyx_v_o, ((PyObject*)__pyx_ptype_7cpython_4bool_bool)); __pyx_t_1 = (__pyx_t_4 != 0); if (__pyx_t_1) { /* "pandas/msgpack.pyx":182 * ret = msgpack_pack_nil(&self.pk) * elif isinstance(o, bool): * if o: # <<<<<<<<<<<<<< * ret = msgpack_pack_true(&self.pk) * else: */ __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_o); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 182; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__pyx_t_1) { /* "pandas/msgpack.pyx":183 * elif isinstance(o, bool): * if o: * ret = msgpack_pack_true(&self.pk) # <<<<<<<<<<<<<< * else: * ret = msgpack_pack_false(&self.pk) */ __pyx_v_ret = msgpack_pack_true((&__pyx_v_self->pk)); goto __pyx_L5; } /*else*/ { /* "pandas/msgpack.pyx":185 * ret = msgpack_pack_true(&self.pk) * else: * ret = msgpack_pack_false(&self.pk) # <<<<<<<<<<<<<< * elif PyLong_Check(o): * if o > 0: */ __pyx_v_ret = msgpack_pack_false((&__pyx_v_self->pk)); } __pyx_L5:; goto __pyx_L4; } /* "pandas/msgpack.pyx":186 * else: * ret = msgpack_pack_false(&self.pk) * elif PyLong_Check(o): # <<<<<<<<<<<<<< * if o > 0: * ullval = o */ __pyx_t_1 = (PyLong_Check(__pyx_v_o) != 0); if (__pyx_t_1) { /* "pandas/msgpack.pyx":187 * ret = msgpack_pack_false(&self.pk) * elif PyLong_Check(o): * if o > 0: # <<<<<<<<<<<<<< * ullval = o * ret = msgpack_pack_unsigned_long_long(&self.pk, ullval) */ __pyx_t_3 = PyObject_RichCompare(__pyx_v_o, __pyx_int_0, Py_GT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 187; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 187; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_1) { /* "pandas/msgpack.pyx":188 * elif PyLong_Check(o): * if o > 0: * ullval = o # <<<<<<<<<<<<<< * ret = msgpack_pack_unsigned_long_long(&self.pk, ullval) * else: */ __pyx_t_5 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_o); if (unlikely((__pyx_t_5 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 188; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_ullval = __pyx_t_5; /* "pandas/msgpack.pyx":189 * if o > 0: * ullval = o * ret = msgpack_pack_unsigned_long_long(&self.pk, ullval) # <<<<<<<<<<<<<< * else: * llval = o */ __pyx_v_ret = msgpack_pack_unsigned_long_long((&__pyx_v_self->pk), __pyx_v_ullval); goto __pyx_L6; } /*else*/ { /* "pandas/msgpack.pyx":191 * ret = msgpack_pack_unsigned_long_long(&self.pk, ullval) * else: * llval = o # <<<<<<<<<<<<<< * ret = msgpack_pack_long_long(&self.pk, llval) * elif PyInt_Check(o): */ __pyx_t_6 = __Pyx_PyInt_As_PY_LONG_LONG(__pyx_v_o); if (unlikely((__pyx_t_6 == (PY_LONG_LONG)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 191; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_llval = __pyx_t_6; /* "pandas/msgpack.pyx":192 * else: * llval = o * ret = msgpack_pack_long_long(&self.pk, llval) # <<<<<<<<<<<<<< * elif PyInt_Check(o): * longval = o */ __pyx_v_ret = msgpack_pack_long_long((&__pyx_v_self->pk), __pyx_v_llval); } __pyx_L6:; goto __pyx_L4; } /* "pandas/msgpack.pyx":193 * llval = o * ret = msgpack_pack_long_long(&self.pk, llval) * elif PyInt_Check(o): # <<<<<<<<<<<<<< * longval = o * ret = msgpack_pack_long(&self.pk, longval) */ __pyx_t_1 = (PyInt_Check(__pyx_v_o) != 0); if (__pyx_t_1) { /* "pandas/msgpack.pyx":194 * ret = msgpack_pack_long_long(&self.pk, llval) * elif PyInt_Check(o): * longval = o # <<<<<<<<<<<<<< * ret = msgpack_pack_long(&self.pk, longval) * elif PyFloat_Check(o): */ __pyx_t_7 = __Pyx_PyInt_As_long(__pyx_v_o); if (unlikely((__pyx_t_7 == (long)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 194; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_longval = __pyx_t_7; /* "pandas/msgpack.pyx":195 * elif PyInt_Check(o): * longval = o * ret = msgpack_pack_long(&self.pk, longval) # <<<<<<<<<<<<<< * elif PyFloat_Check(o): * if self.use_float: */ __pyx_v_ret = msgpack_pack_long((&__pyx_v_self->pk), __pyx_v_longval); goto __pyx_L4; } /* "pandas/msgpack.pyx":196 * longval = o * ret = msgpack_pack_long(&self.pk, longval) * elif PyFloat_Check(o): # <<<<<<<<<<<<<< * if self.use_float: * fval = o */ __pyx_t_1 = (PyFloat_Check(__pyx_v_o) != 0); if (__pyx_t_1) { /* "pandas/msgpack.pyx":197 * ret = msgpack_pack_long(&self.pk, longval) * elif PyFloat_Check(o): * if self.use_float: # <<<<<<<<<<<<<< * fval = o * ret = msgpack_pack_float(&self.pk, fval) */ __pyx_t_1 = __Pyx_PyObject_IsTrue(((PyObject *)__pyx_v_self->use_float)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 197; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__pyx_t_1) { /* "pandas/msgpack.pyx":198 * elif PyFloat_Check(o): * if self.use_float: * fval = o # <<<<<<<<<<<<<< * ret = msgpack_pack_float(&self.pk, fval) * else: */ __pyx_t_8 = __pyx_PyFloat_AsFloat(__pyx_v_o); if (unlikely((__pyx_t_8 == (float)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 198; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_fval = __pyx_t_8; /* "pandas/msgpack.pyx":199 * if self.use_float: * fval = o * ret = msgpack_pack_float(&self.pk, fval) # <<<<<<<<<<<<<< * else: * dval = o */ __pyx_v_ret = msgpack_pack_float((&__pyx_v_self->pk), __pyx_v_fval); goto __pyx_L7; } /*else*/ { /* "pandas/msgpack.pyx":201 * ret = msgpack_pack_float(&self.pk, fval) * else: * dval = o # <<<<<<<<<<<<<< * ret = msgpack_pack_double(&self.pk, dval) * elif PyBytes_Check(o): */ __pyx_t_9 = __pyx_PyFloat_AsDouble(__pyx_v_o); if (unlikely((__pyx_t_9 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 201; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_dval = __pyx_t_9; /* "pandas/msgpack.pyx":202 * else: * dval = o * ret = msgpack_pack_double(&self.pk, dval) # <<<<<<<<<<<<<< * elif PyBytes_Check(o): * rawval = o */ __pyx_v_ret = msgpack_pack_double((&__pyx_v_self->pk), __pyx_v_dval); } __pyx_L7:; goto __pyx_L4; } /* "pandas/msgpack.pyx":203 * dval = o * ret = msgpack_pack_double(&self.pk, dval) * elif PyBytes_Check(o): # <<<<<<<<<<<<<< * rawval = o * ret = msgpack_pack_raw(&self.pk, len(o)) */ __pyx_t_1 = (PyBytes_Check(__pyx_v_o) != 0); if (__pyx_t_1) { /* "pandas/msgpack.pyx":204 * ret = msgpack_pack_double(&self.pk, dval) * elif PyBytes_Check(o): * rawval = o # <<<<<<<<<<<<<< * ret = msgpack_pack_raw(&self.pk, len(o)) * if ret == 0: */ __pyx_t_10 = __Pyx_PyObject_AsString(__pyx_v_o); if (unlikely((!__pyx_t_10) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 204; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_rawval = __pyx_t_10; /* "pandas/msgpack.pyx":205 * elif PyBytes_Check(o): * rawval = o * ret = msgpack_pack_raw(&self.pk, len(o)) # <<<<<<<<<<<<<< * if ret == 0: * ret = msgpack_pack_raw_body(&self.pk, rawval, len(o)) */ __pyx_t_11 = PyObject_Length(__pyx_v_o); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 205; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_ret = msgpack_pack_raw((&__pyx_v_self->pk), __pyx_t_11); /* "pandas/msgpack.pyx":206 * rawval = o * ret = msgpack_pack_raw(&self.pk, len(o)) * if ret == 0: # <<<<<<<<<<<<<< * ret = msgpack_pack_raw_body(&self.pk, rawval, len(o)) * elif PyUnicode_Check(o): */ __pyx_t_1 = ((__pyx_v_ret == 0) != 0); if (__pyx_t_1) { /* "pandas/msgpack.pyx":207 * ret = msgpack_pack_raw(&self.pk, len(o)) * if ret == 0: * ret = msgpack_pack_raw_body(&self.pk, rawval, len(o)) # <<<<<<<<<<<<<< * elif PyUnicode_Check(o): * if not self.encoding: */ __pyx_t_11 = PyObject_Length(__pyx_v_o); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 207; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_ret = msgpack_pack_raw_body((&__pyx_v_self->pk), __pyx_v_rawval, __pyx_t_11); goto __pyx_L8; } __pyx_L8:; goto __pyx_L4; } /* "pandas/msgpack.pyx":208 * if ret == 0: * ret = msgpack_pack_raw_body(&self.pk, rawval, len(o)) * elif PyUnicode_Check(o): # <<<<<<<<<<<<<< * if not self.encoding: * raise TypeError("Can't encode unicode string: no encoding is specified") */ __pyx_t_1 = (PyUnicode_Check(__pyx_v_o) != 0); if (__pyx_t_1) { /* "pandas/msgpack.pyx":209 * ret = msgpack_pack_raw_body(&self.pk, rawval, len(o)) * elif PyUnicode_Check(o): * if not self.encoding: # <<<<<<<<<<<<<< * raise TypeError("Can't encode unicode string: no encoding is specified") * o = PyUnicode_AsEncodedString(o, self.encoding, self.unicode_errors) */ __pyx_t_1 = ((!(__pyx_v_self->encoding != 0)) != 0); if (__pyx_t_1) { /* "pandas/msgpack.pyx":210 * elif PyUnicode_Check(o): * if not self.encoding: * raise TypeError("Can't encode unicode string: no encoding is specified") # <<<<<<<<<<<<<< * o = PyUnicode_AsEncodedString(o, self.encoding, self.unicode_errors) * rawval = o */ __pyx_t_3 = PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__7, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 210; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 210; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } /* "pandas/msgpack.pyx":211 * if not self.encoding: * raise TypeError("Can't encode unicode string: no encoding is specified") * o = PyUnicode_AsEncodedString(o, self.encoding, self.unicode_errors) # <<<<<<<<<<<<<< * rawval = o * ret = msgpack_pack_raw(&self.pk, len(o)) */ __pyx_t_3 = PyUnicode_AsEncodedString(__pyx_v_o, __pyx_v_self->encoding, __pyx_v_self->unicode_errors); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 211; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF_SET(__pyx_v_o, __pyx_t_3); __pyx_t_3 = 0; /* "pandas/msgpack.pyx":212 * raise TypeError("Can't encode unicode string: no encoding is specified") * o = PyUnicode_AsEncodedString(o, self.encoding, self.unicode_errors) * rawval = o # <<<<<<<<<<<<<< * ret = msgpack_pack_raw(&self.pk, len(o)) * if ret == 0: */ __pyx_t_10 = __Pyx_PyObject_AsString(__pyx_v_o); if (unlikely((!__pyx_t_10) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 212; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_rawval = __pyx_t_10; /* "pandas/msgpack.pyx":213 * o = PyUnicode_AsEncodedString(o, self.encoding, self.unicode_errors) * rawval = o * ret = msgpack_pack_raw(&self.pk, len(o)) # <<<<<<<<<<<<<< * if ret == 0: * ret = msgpack_pack_raw_body(&self.pk, rawval, len(o)) */ __pyx_t_11 = PyObject_Length(__pyx_v_o); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 213; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_ret = msgpack_pack_raw((&__pyx_v_self->pk), __pyx_t_11); /* "pandas/msgpack.pyx":214 * rawval = o * ret = msgpack_pack_raw(&self.pk, len(o)) * if ret == 0: # <<<<<<<<<<<<<< * ret = msgpack_pack_raw_body(&self.pk, rawval, len(o)) * elif PyDict_CheckExact(o): */ __pyx_t_1 = ((__pyx_v_ret == 0) != 0); if (__pyx_t_1) { /* "pandas/msgpack.pyx":215 * ret = msgpack_pack_raw(&self.pk, len(o)) * if ret == 0: * ret = msgpack_pack_raw_body(&self.pk, rawval, len(o)) # <<<<<<<<<<<<<< * elif PyDict_CheckExact(o): * d = o */ __pyx_t_11 = PyObject_Length(__pyx_v_o); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 215; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_ret = msgpack_pack_raw_body((&__pyx_v_self->pk), __pyx_v_rawval, __pyx_t_11); goto __pyx_L10; } __pyx_L10:; goto __pyx_L4; } /* "pandas/msgpack.pyx":216 * if ret == 0: * ret = msgpack_pack_raw_body(&self.pk, rawval, len(o)) * elif PyDict_CheckExact(o): # <<<<<<<<<<<<<< * d = o * ret = msgpack_pack_map(&self.pk, len(d)) */ __pyx_t_1 = (PyDict_CheckExact(__pyx_v_o) != 0); if (__pyx_t_1) { /* "pandas/msgpack.pyx":217 * ret = msgpack_pack_raw_body(&self.pk, rawval, len(o)) * elif PyDict_CheckExact(o): * d = o # <<<<<<<<<<<<<< * ret = msgpack_pack_map(&self.pk, len(d)) * if ret == 0: */ __pyx_t_3 = __pyx_v_o; __Pyx_INCREF(__pyx_t_3); __pyx_v_d = ((PyObject*)__pyx_t_3); __pyx_t_3 = 0; /* "pandas/msgpack.pyx":218 * elif PyDict_CheckExact(o): * d = o * ret = msgpack_pack_map(&self.pk, len(d)) # <<<<<<<<<<<<<< * if ret == 0: * for k, v in d.iteritems(): */ if (unlikely(__pyx_v_d == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 218; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_11 = PyDict_Size(__pyx_v_d); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 218; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_ret = msgpack_pack_map((&__pyx_v_self->pk), __pyx_t_11); /* "pandas/msgpack.pyx":219 * d = o * ret = msgpack_pack_map(&self.pk, len(d)) * if ret == 0: # <<<<<<<<<<<<<< * for k, v in d.iteritems(): * ret = self._pack(k, nest_limit-1) */ __pyx_t_1 = ((__pyx_v_ret == 0) != 0); if (__pyx_t_1) { /* "pandas/msgpack.pyx":220 * ret = msgpack_pack_map(&self.pk, len(d)) * if ret == 0: * for k, v in d.iteritems(): # <<<<<<<<<<<<<< * ret = self._pack(k, nest_limit-1) * if ret != 0: break */ __pyx_t_11 = 0; if (unlikely(__pyx_v_d == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "iteritems"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 220; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_2 = __Pyx_dict_iterator(__pyx_v_d, 1, __pyx_n_s_iteritems, (&__pyx_t_12), (&__pyx_t_13)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 220; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = __pyx_t_2; __pyx_t_2 = 0; while (1) { __pyx_t_15 = __Pyx_dict_iter_next(__pyx_t_3, __pyx_t_12, &__pyx_t_11, &__pyx_t_2, &__pyx_t_14, NULL, __pyx_t_13); if (unlikely(__pyx_t_15 == 0)) break; if (unlikely(__pyx_t_15 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 220; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_GOTREF(__pyx_t_14); __Pyx_XDECREF_SET(__pyx_v_k, __pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF_SET(__pyx_v_v, __pyx_t_14); __pyx_t_14 = 0; /* "pandas/msgpack.pyx":221 * if ret == 0: * for k, v in d.iteritems(): * ret = self._pack(k, nest_limit-1) # <<<<<<<<<<<<<< * if ret != 0: break * ret = self._pack(v, nest_limit-1) */ __pyx_t_16.__pyx_n = 1; __pyx_t_16.nest_limit = (__pyx_v_nest_limit - 1); __pyx_t_15 = ((struct __pyx_vtabstruct_6pandas_7msgpack_Packer *)__pyx_v_self->__pyx_vtab)->_pack(__pyx_v_self, __pyx_v_k, &__pyx_t_16); if (unlikely(__pyx_t_15 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 221; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_ret = __pyx_t_15; /* "pandas/msgpack.pyx":222 * for k, v in d.iteritems(): * ret = self._pack(k, nest_limit-1) * if ret != 0: break # <<<<<<<<<<<<<< * ret = self._pack(v, nest_limit-1) * if ret != 0: break */ __pyx_t_1 = ((__pyx_v_ret != 0) != 0); if (__pyx_t_1) { goto __pyx_L13_break; } /* "pandas/msgpack.pyx":223 * ret = self._pack(k, nest_limit-1) * if ret != 0: break * ret = self._pack(v, nest_limit-1) # <<<<<<<<<<<<<< * if ret != 0: break * elif PyDict_Check(o): */ __pyx_t_16.__pyx_n = 1; __pyx_t_16.nest_limit = (__pyx_v_nest_limit - 1); __pyx_t_15 = ((struct __pyx_vtabstruct_6pandas_7msgpack_Packer *)__pyx_v_self->__pyx_vtab)->_pack(__pyx_v_self, __pyx_v_v, &__pyx_t_16); if (unlikely(__pyx_t_15 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 223; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_ret = __pyx_t_15; /* "pandas/msgpack.pyx":224 * if ret != 0: break * ret = self._pack(v, nest_limit-1) * if ret != 0: break # <<<<<<<<<<<<<< * elif PyDict_Check(o): * ret = msgpack_pack_map(&self.pk, len(o)) */ __pyx_t_1 = ((__pyx_v_ret != 0) != 0); if (__pyx_t_1) { goto __pyx_L13_break; } } __pyx_L13_break:; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L11; } __pyx_L11:; goto __pyx_L4; } /* "pandas/msgpack.pyx":225 * ret = self._pack(v, nest_limit-1) * if ret != 0: break * elif PyDict_Check(o): # <<<<<<<<<<<<<< * ret = msgpack_pack_map(&self.pk, len(o)) * if ret == 0: */ __pyx_t_1 = (PyDict_Check(__pyx_v_o) != 0); if (__pyx_t_1) { /* "pandas/msgpack.pyx":226 * if ret != 0: break * elif PyDict_Check(o): * ret = msgpack_pack_map(&self.pk, len(o)) # <<<<<<<<<<<<<< * if ret == 0: * for k, v in o.items(): */ __pyx_t_12 = PyObject_Length(__pyx_v_o); if (unlikely(__pyx_t_12 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 226; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_ret = msgpack_pack_map((&__pyx_v_self->pk), __pyx_t_12); /* "pandas/msgpack.pyx":227 * elif PyDict_Check(o): * ret = msgpack_pack_map(&self.pk, len(o)) * if ret == 0: # <<<<<<<<<<<<<< * for k, v in o.items(): * ret = self._pack(k, nest_limit-1) */ __pyx_t_1 = ((__pyx_v_ret == 0) != 0); if (__pyx_t_1) { /* "pandas/msgpack.pyx":228 * ret = msgpack_pack_map(&self.pk, len(o)) * if ret == 0: * for k, v in o.items(): # <<<<<<<<<<<<<< * ret = self._pack(k, nest_limit-1) * if ret != 0: break */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_o, __pyx_n_s_items); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 228; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_14 = PyObject_Call(__pyx_t_3, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 228; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_14); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (PyList_CheckExact(__pyx_t_14) || PyTuple_CheckExact(__pyx_t_14)) { __pyx_t_3 = __pyx_t_14; __Pyx_INCREF(__pyx_t_3); __pyx_t_12 = 0; __pyx_t_17 = NULL; } else { __pyx_t_12 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_14); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 228; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_17 = Py_TYPE(__pyx_t_3)->tp_iternext; } __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; for (;;) { if (!__pyx_t_17 && PyList_CheckExact(__pyx_t_3)) { if (__pyx_t_12 >= PyList_GET_SIZE(__pyx_t_3)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_14 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_12); __Pyx_INCREF(__pyx_t_14); __pyx_t_12++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 228; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_14 = PySequence_ITEM(__pyx_t_3, __pyx_t_12); __pyx_t_12++; if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 228; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif } else if (!__pyx_t_17 && PyTuple_CheckExact(__pyx_t_3)) { if (__pyx_t_12 >= PyTuple_GET_SIZE(__pyx_t_3)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_14 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_12); __Pyx_INCREF(__pyx_t_14); __pyx_t_12++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 228; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_14 = PySequence_ITEM(__pyx_t_3, __pyx_t_12); __pyx_t_12++; if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 228; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif } else { __pyx_t_14 = __pyx_t_17(__pyx_t_3); if (unlikely(!__pyx_t_14)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 228; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } break; } __Pyx_GOTREF(__pyx_t_14); } if ((likely(PyTuple_CheckExact(__pyx_t_14))) || (PyList_CheckExact(__pyx_t_14))) { PyObject* sequence = __pyx_t_14; #if CYTHON_COMPILING_IN_CPYTHON Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 228; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_18 = PyTuple_GET_ITEM(sequence, 1); } else { __pyx_t_2 = PyList_GET_ITEM(sequence, 0); __pyx_t_18 = PyList_GET_ITEM(sequence, 1); } __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(__pyx_t_18); #else __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 228; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_18 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 228; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); #endif __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; } else { Py_ssize_t index = -1; __pyx_t_19 = PyObject_GetIter(__pyx_t_14); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 228; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_19); __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; __pyx_t_20 = Py_TYPE(__pyx_t_19)->tp_iternext; index = 0; __pyx_t_2 = __pyx_t_20(__pyx_t_19); if (unlikely(!__pyx_t_2)) goto __pyx_L19_unpacking_failed; __Pyx_GOTREF(__pyx_t_2); index = 1; __pyx_t_18 = __pyx_t_20(__pyx_t_19); if (unlikely(!__pyx_t_18)) goto __pyx_L19_unpacking_failed; __Pyx_GOTREF(__pyx_t_18); if (__Pyx_IternextUnpackEndCheck(__pyx_t_20(__pyx_t_19), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 228; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_20 = NULL; __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0; goto __pyx_L20_unpacking_done; __pyx_L19_unpacking_failed:; __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0; __pyx_t_20 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 228; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_L20_unpacking_done:; } __Pyx_XDECREF_SET(__pyx_v_k, __pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF_SET(__pyx_v_v, __pyx_t_18); __pyx_t_18 = 0; /* "pandas/msgpack.pyx":229 * if ret == 0: * for k, v in o.items(): * ret = self._pack(k, nest_limit-1) # <<<<<<<<<<<<<< * if ret != 0: break * ret = self._pack(v, nest_limit-1) */ __pyx_t_16.__pyx_n = 1; __pyx_t_16.nest_limit = (__pyx_v_nest_limit - 1); __pyx_t_13 = ((struct __pyx_vtabstruct_6pandas_7msgpack_Packer *)__pyx_v_self->__pyx_vtab)->_pack(__pyx_v_self, __pyx_v_k, &__pyx_t_16); if (unlikely(__pyx_t_13 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 229; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_ret = __pyx_t_13; /* "pandas/msgpack.pyx":230 * for k, v in o.items(): * ret = self._pack(k, nest_limit-1) * if ret != 0: break # <<<<<<<<<<<<<< * ret = self._pack(v, nest_limit-1) * if ret != 0: break */ __pyx_t_1 = ((__pyx_v_ret != 0) != 0); if (__pyx_t_1) { goto __pyx_L18_break; } /* "pandas/msgpack.pyx":231 * ret = self._pack(k, nest_limit-1) * if ret != 0: break * ret = self._pack(v, nest_limit-1) # <<<<<<<<<<<<<< * if ret != 0: break * elif PyTuple_Check(o) or PyList_Check(o): */ __pyx_t_16.__pyx_n = 1; __pyx_t_16.nest_limit = (__pyx_v_nest_limit - 1); __pyx_t_13 = ((struct __pyx_vtabstruct_6pandas_7msgpack_Packer *)__pyx_v_self->__pyx_vtab)->_pack(__pyx_v_self, __pyx_v_v, &__pyx_t_16); if (unlikely(__pyx_t_13 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 231; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_ret = __pyx_t_13; /* "pandas/msgpack.pyx":232 * if ret != 0: break * ret = self._pack(v, nest_limit-1) * if ret != 0: break # <<<<<<<<<<<<<< * elif PyTuple_Check(o) or PyList_Check(o): * ret = msgpack_pack_array(&self.pk, len(o)) */ __pyx_t_1 = ((__pyx_v_ret != 0) != 0); if (__pyx_t_1) { goto __pyx_L18_break; } } __pyx_L18_break:; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L16; } __pyx_L16:; goto __pyx_L4; } /* "pandas/msgpack.pyx":233 * ret = self._pack(v, nest_limit-1) * if ret != 0: break * elif PyTuple_Check(o) or PyList_Check(o): # <<<<<<<<<<<<<< * ret = msgpack_pack_array(&self.pk, len(o)) * if ret == 0: */ __pyx_t_1 = (PyTuple_Check(__pyx_v_o) != 0); if (!__pyx_t_1) { __pyx_t_4 = (PyList_Check(__pyx_v_o) != 0); __pyx_t_21 = __pyx_t_4; } else { __pyx_t_21 = __pyx_t_1; } if (__pyx_t_21) { /* "pandas/msgpack.pyx":234 * if ret != 0: break * elif PyTuple_Check(o) or PyList_Check(o): * ret = msgpack_pack_array(&self.pk, len(o)) # <<<<<<<<<<<<<< * if ret == 0: * for v in o: */ __pyx_t_12 = PyObject_Length(__pyx_v_o); if (unlikely(__pyx_t_12 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 234; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_ret = msgpack_pack_array((&__pyx_v_self->pk), __pyx_t_12); /* "pandas/msgpack.pyx":235 * elif PyTuple_Check(o) or PyList_Check(o): * ret = msgpack_pack_array(&self.pk, len(o)) * if ret == 0: # <<<<<<<<<<<<<< * for v in o: * ret = self._pack(v, nest_limit-1) */ __pyx_t_21 = ((__pyx_v_ret == 0) != 0); if (__pyx_t_21) { /* "pandas/msgpack.pyx":236 * ret = msgpack_pack_array(&self.pk, len(o)) * if ret == 0: * for v in o: # <<<<<<<<<<<<<< * ret = self._pack(v, nest_limit-1) * if ret != 0: break */ if (PyList_CheckExact(__pyx_v_o) || PyTuple_CheckExact(__pyx_v_o)) { __pyx_t_3 = __pyx_v_o; __Pyx_INCREF(__pyx_t_3); __pyx_t_12 = 0; __pyx_t_17 = NULL; } else { __pyx_t_12 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_o); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 236; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_17 = Py_TYPE(__pyx_t_3)->tp_iternext; } for (;;) { if (!__pyx_t_17 && PyList_CheckExact(__pyx_t_3)) { if (__pyx_t_12 >= PyList_GET_SIZE(__pyx_t_3)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_14 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_12); __Pyx_INCREF(__pyx_t_14); __pyx_t_12++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 236; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_14 = PySequence_ITEM(__pyx_t_3, __pyx_t_12); __pyx_t_12++; if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 236; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif } else if (!__pyx_t_17 && PyTuple_CheckExact(__pyx_t_3)) { if (__pyx_t_12 >= PyTuple_GET_SIZE(__pyx_t_3)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_14 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_12); __Pyx_INCREF(__pyx_t_14); __pyx_t_12++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 236; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_14 = PySequence_ITEM(__pyx_t_3, __pyx_t_12); __pyx_t_12++; if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 236; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif } else { __pyx_t_14 = __pyx_t_17(__pyx_t_3); if (unlikely(!__pyx_t_14)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 236; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } break; } __Pyx_GOTREF(__pyx_t_14); } __Pyx_XDECREF_SET(__pyx_v_v, __pyx_t_14); __pyx_t_14 = 0; /* "pandas/msgpack.pyx":237 * if ret == 0: * for v in o: * ret = self._pack(v, nest_limit-1) # <<<<<<<<<<<<<< * if ret != 0: break * */ __pyx_t_16.__pyx_n = 1; __pyx_t_16.nest_limit = (__pyx_v_nest_limit - 1); __pyx_t_13 = ((struct __pyx_vtabstruct_6pandas_7msgpack_Packer *)__pyx_v_self->__pyx_vtab)->_pack(__pyx_v_self, __pyx_v_v, &__pyx_t_16); if (unlikely(__pyx_t_13 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 237; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_ret = __pyx_t_13; /* "pandas/msgpack.pyx":238 * for v in o: * ret = self._pack(v, nest_limit-1) * if ret != 0: break # <<<<<<<<<<<<<< * * elif self._default: */ __pyx_t_21 = ((__pyx_v_ret != 0) != 0); if (__pyx_t_21) { goto __pyx_L25_break; } } __pyx_L25_break:; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L23; } __pyx_L23:; goto __pyx_L4; } /* "pandas/msgpack.pyx":240 * if ret != 0: break * * elif self._default: # <<<<<<<<<<<<<< * o = self._default(o) * ret = self._pack(o, nest_limit-1) */ __pyx_t_21 = __Pyx_PyObject_IsTrue(__pyx_v_self->_default); if (unlikely(__pyx_t_21 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 240; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__pyx_t_21) { /* "pandas/msgpack.pyx":241 * * elif self._default: * o = self._default(o) # <<<<<<<<<<<<<< * ret = self._pack(o, nest_limit-1) * else: */ __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 241; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_v_o); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_o); __Pyx_GIVEREF(__pyx_v_o); __pyx_t_14 = PyObject_Call(__pyx_v_self->_default, __pyx_t_3, NULL); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 241; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_14); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF_SET(__pyx_v_o, __pyx_t_14); __pyx_t_14 = 0; /* "pandas/msgpack.pyx":242 * elif self._default: * o = self._default(o) * ret = self._pack(o, nest_limit-1) # <<<<<<<<<<<<<< * else: * raise TypeError("can't serialize %r" % (o,)) */ __pyx_t_16.__pyx_n = 1; __pyx_t_16.nest_limit = (__pyx_v_nest_limit - 1); __pyx_t_13 = ((struct __pyx_vtabstruct_6pandas_7msgpack_Packer *)__pyx_v_self->__pyx_vtab)->_pack(__pyx_v_self, __pyx_v_o, &__pyx_t_16); if (unlikely(__pyx_t_13 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 242; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_ret = __pyx_t_13; goto __pyx_L4; } /*else*/ { /* "pandas/msgpack.pyx":244 * ret = self._pack(o, nest_limit-1) * else: * raise TypeError("can't serialize %r" % (o,)) # <<<<<<<<<<<<<< * return ret * */ __pyx_t_14 = PyTuple_New(1); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 244; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_14); __Pyx_INCREF(__pyx_v_o); PyTuple_SET_ITEM(__pyx_t_14, 0, __pyx_v_o); __Pyx_GIVEREF(__pyx_v_o); __pyx_t_3 = __Pyx_PyString_Format(__pyx_kp_s_can_t_serialize_r, __pyx_t_14); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 244; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; __pyx_t_14 = PyTuple_New(1); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 244; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_14); PyTuple_SET_ITEM(__pyx_t_14, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyObject_Call(__pyx_builtin_TypeError, __pyx_t_14, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 244; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 244; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_L4:; /* "pandas/msgpack.pyx":245 * else: * raise TypeError("can't serialize %r" % (o,)) * return ret # <<<<<<<<<<<<<< * * cpdef pack(self, object obj): */ __pyx_r = __pyx_v_ret; goto __pyx_L0; /* "pandas/msgpack.pyx":163 * @cython.boundscheck(False) * @cython.wraparound(False) * cdef int _pack(self, object o, int nest_limit=DEFAULT_RECURSE_LIMIT) except -1: # <<<<<<<<<<<<<< * cdef long long llval * cdef unsigned long long ullval */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_14); __Pyx_XDECREF(__pyx_t_18); __Pyx_XDECREF(__pyx_t_19); __Pyx_AddTraceback("pandas.msgpack.Packer._pack", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_XDECREF(__pyx_v_d); __Pyx_XDECREF(__pyx_v_k); __Pyx_XDECREF(__pyx_v_v); __Pyx_XDECREF(__pyx_v_o); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/msgpack.pyx":247 * return ret * * cpdef pack(self, object obj): # <<<<<<<<<<<<<< * cdef int ret * ret = self._pack(obj, DEFAULT_RECURSE_LIMIT) */ static PyObject *__pyx_pw_6pandas_7msgpack_6Packer_7pack(PyObject *__pyx_v_self, PyObject *__pyx_v_obj); /*proto*/ static PyObject *__pyx_f_6pandas_7msgpack_6Packer_pack(struct __pyx_obj_6pandas_7msgpack_Packer *__pyx_v_self, PyObject *__pyx_v_obj, int __pyx_skip_dispatch) { int __pyx_v_ret; PyObject *__pyx_v_buf = 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; struct __pyx_opt_args_6pandas_7msgpack_6Packer__pack __pyx_t_5; int __pyx_t_6; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("pack", 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_pack); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 247; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_6pandas_7msgpack_6Packer_7pack)) { __Pyx_XDECREF(__pyx_r); __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 247; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_obj); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_obj); __Pyx_GIVEREF(__pyx_v_obj); __pyx_t_3 = PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 247; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_3; __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } /* "pandas/msgpack.pyx":249 * cpdef pack(self, object obj): * cdef int ret * ret = self._pack(obj, DEFAULT_RECURSE_LIMIT) # <<<<<<<<<<<<<< * if ret == -1: * raise MemoryError */ __pyx_t_5.__pyx_n = 1; __pyx_t_5.nest_limit = __pyx_v_6pandas_7msgpack_DEFAULT_RECURSE_LIMIT; __pyx_t_4 = ((struct __pyx_vtabstruct_6pandas_7msgpack_Packer *)__pyx_v_self->__pyx_vtab)->_pack(__pyx_v_self, __pyx_v_obj, &__pyx_t_5); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 249; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_ret = __pyx_t_4; /* "pandas/msgpack.pyx":250 * cdef int ret * ret = self._pack(obj, DEFAULT_RECURSE_LIMIT) * if ret == -1: # <<<<<<<<<<<<<< * raise MemoryError * elif ret: # should not happen. */ __pyx_t_6 = ((__pyx_v_ret == -1) != 0); if (__pyx_t_6) { /* "pandas/msgpack.pyx":251 * ret = self._pack(obj, DEFAULT_RECURSE_LIMIT) * if ret == -1: * raise MemoryError # <<<<<<<<<<<<<< * elif ret: # should not happen. * raise TypeError */ PyErr_NoMemory(); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 251; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } /* "pandas/msgpack.pyx":252 * if ret == -1: * raise MemoryError * elif ret: # should not happen. # <<<<<<<<<<<<<< * raise TypeError * if self.autoreset: */ __pyx_t_6 = (__pyx_v_ret != 0); if (__pyx_t_6) { /* "pandas/msgpack.pyx":253 * raise MemoryError * elif ret: # should not happen. * raise TypeError # <<<<<<<<<<<<<< * if self.autoreset: * buf = PyBytes_FromStringAndSize(self.pk.buf, self.pk.length) */ __Pyx_Raise(__pyx_builtin_TypeError, 0, 0, 0); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 253; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } /* "pandas/msgpack.pyx":254 * elif ret: # should not happen. * raise TypeError * if self.autoreset: # <<<<<<<<<<<<<< * buf = PyBytes_FromStringAndSize(self.pk.buf, self.pk.length) * self.pk.length = 0 */ __pyx_t_6 = (__pyx_v_self->autoreset != 0); if (__pyx_t_6) { /* "pandas/msgpack.pyx":255 * raise TypeError * if self.autoreset: * buf = PyBytes_FromStringAndSize(self.pk.buf, self.pk.length) # <<<<<<<<<<<<<< * self.pk.length = 0 * return buf */ __pyx_t_1 = PyBytes_FromStringAndSize(__pyx_v_self->pk.buf, __pyx_v_self->pk.length); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 255; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_v_buf = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/msgpack.pyx":256 * if self.autoreset: * buf = PyBytes_FromStringAndSize(self.pk.buf, self.pk.length) * self.pk.length = 0 # <<<<<<<<<<<<<< * return buf * */ __pyx_v_self->pk.length = 0; /* "pandas/msgpack.pyx":257 * buf = PyBytes_FromStringAndSize(self.pk.buf, self.pk.length) * self.pk.length = 0 * return buf # <<<<<<<<<<<<<< * * def pack_array_header(self, size_t size): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_buf); __pyx_r = __pyx_v_buf; goto __pyx_L0; } /* "pandas/msgpack.pyx":247 * return ret * * cpdef pack(self, object obj): # <<<<<<<<<<<<<< * cdef int ret * ret = self._pack(obj, DEFAULT_RECURSE_LIMIT) */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("pandas.msgpack.Packer.pack", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_buf); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_7msgpack_6Packer_7pack(PyObject *__pyx_v_self, PyObject *__pyx_v_obj); /*proto*/ static char __pyx_doc_6pandas_7msgpack_6Packer_6pack[] = "Packer.pack(self, obj)"; static PyObject *__pyx_pw_6pandas_7msgpack_6Packer_7pack(PyObject *__pyx_v_self, PyObject *__pyx_v_obj) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("pack (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_7msgpack_6Packer_6pack(((struct __pyx_obj_6pandas_7msgpack_Packer *)__pyx_v_self), ((PyObject *)__pyx_v_obj)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_7msgpack_6Packer_6pack(struct __pyx_obj_6pandas_7msgpack_Packer *__pyx_v_self, PyObject *__pyx_v_obj) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("pack", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = ((struct __pyx_vtabstruct_6pandas_7msgpack_Packer *)__pyx_v_self->__pyx_vtab)->pack(__pyx_v_self, __pyx_v_obj, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 247; __pyx_clineno = __LINE__; goto __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.msgpack.Packer.pack", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/msgpack.pyx":259 * return buf * * def pack_array_header(self, size_t size): # <<<<<<<<<<<<<< * cdef int ret = msgpack_pack_array(&self.pk, size) * if ret == -1: */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_7msgpack_6Packer_9pack_array_header(PyObject *__pyx_v_self, PyObject *__pyx_arg_size); /*proto*/ static char __pyx_doc_6pandas_7msgpack_6Packer_8pack_array_header[] = "Packer.pack_array_header(self, size_t size)"; static PyObject *__pyx_pw_6pandas_7msgpack_6Packer_9pack_array_header(PyObject *__pyx_v_self, PyObject *__pyx_arg_size) { size_t __pyx_v_size; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("pack_array_header (wrapper)", 0); assert(__pyx_arg_size); { __pyx_v_size = __Pyx_PyInt_As_size_t(__pyx_arg_size); if (unlikely((__pyx_v_size == (size_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 259; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; __Pyx_AddTraceback("pandas.msgpack.Packer.pack_array_header", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pandas_7msgpack_6Packer_8pack_array_header(((struct __pyx_obj_6pandas_7msgpack_Packer *)__pyx_v_self), ((size_t)__pyx_v_size)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_7msgpack_6Packer_8pack_array_header(struct __pyx_obj_6pandas_7msgpack_Packer *__pyx_v_self, size_t __pyx_v_size) { int __pyx_v_ret; PyObject *__pyx_v_buf = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("pack_array_header", 0); /* "pandas/msgpack.pyx":260 * * def pack_array_header(self, size_t size): * cdef int ret = msgpack_pack_array(&self.pk, size) # <<<<<<<<<<<<<< * if ret == -1: * raise MemoryError */ __pyx_v_ret = msgpack_pack_array((&__pyx_v_self->pk), __pyx_v_size); /* "pandas/msgpack.pyx":261 * def pack_array_header(self, size_t size): * cdef int ret = msgpack_pack_array(&self.pk, size) * if ret == -1: # <<<<<<<<<<<<<< * raise MemoryError * elif ret: # should not happen */ __pyx_t_1 = ((__pyx_v_ret == -1) != 0); if (__pyx_t_1) { /* "pandas/msgpack.pyx":262 * cdef int ret = msgpack_pack_array(&self.pk, size) * if ret == -1: * raise MemoryError # <<<<<<<<<<<<<< * elif ret: # should not happen * raise TypeError */ PyErr_NoMemory(); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 262; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } /* "pandas/msgpack.pyx":263 * if ret == -1: * raise MemoryError * elif ret: # should not happen # <<<<<<<<<<<<<< * raise TypeError * if self.autoreset: */ __pyx_t_1 = (__pyx_v_ret != 0); if (__pyx_t_1) { /* "pandas/msgpack.pyx":264 * raise MemoryError * elif ret: # should not happen * raise TypeError # <<<<<<<<<<<<<< * if self.autoreset: * buf = PyBytes_FromStringAndSize(self.pk.buf, self.pk.length) */ __Pyx_Raise(__pyx_builtin_TypeError, 0, 0, 0); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 264; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } /* "pandas/msgpack.pyx":265 * elif ret: # should not happen * raise TypeError * if self.autoreset: # <<<<<<<<<<<<<< * buf = PyBytes_FromStringAndSize(self.pk.buf, self.pk.length) * self.pk.length = 0 */ __pyx_t_1 = (__pyx_v_self->autoreset != 0); if (__pyx_t_1) { /* "pandas/msgpack.pyx":266 * raise TypeError * if self.autoreset: * buf = PyBytes_FromStringAndSize(self.pk.buf, self.pk.length) # <<<<<<<<<<<<<< * self.pk.length = 0 * return buf */ __pyx_t_2 = PyBytes_FromStringAndSize(__pyx_v_self->pk.buf, __pyx_v_self->pk.length); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 266; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_v_buf = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; /* "pandas/msgpack.pyx":267 * if self.autoreset: * buf = PyBytes_FromStringAndSize(self.pk.buf, self.pk.length) * self.pk.length = 0 # <<<<<<<<<<<<<< * return buf * */ __pyx_v_self->pk.length = 0; /* "pandas/msgpack.pyx":268 * buf = PyBytes_FromStringAndSize(self.pk.buf, self.pk.length) * self.pk.length = 0 * return buf # <<<<<<<<<<<<<< * * def pack_map_header(self, size_t size): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_buf); __pyx_r = __pyx_v_buf; goto __pyx_L0; } /* "pandas/msgpack.pyx":259 * return buf * * def pack_array_header(self, size_t size): # <<<<<<<<<<<<<< * cdef int ret = msgpack_pack_array(&self.pk, size) * if ret == -1: */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("pandas.msgpack.Packer.pack_array_header", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_buf); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/msgpack.pyx":270 * return buf * * def pack_map_header(self, size_t size): # <<<<<<<<<<<<<< * cdef int ret = msgpack_pack_map(&self.pk, size) * if ret == -1: */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_7msgpack_6Packer_11pack_map_header(PyObject *__pyx_v_self, PyObject *__pyx_arg_size); /*proto*/ static char __pyx_doc_6pandas_7msgpack_6Packer_10pack_map_header[] = "Packer.pack_map_header(self, size_t size)"; static PyObject *__pyx_pw_6pandas_7msgpack_6Packer_11pack_map_header(PyObject *__pyx_v_self, PyObject *__pyx_arg_size) { size_t __pyx_v_size; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("pack_map_header (wrapper)", 0); assert(__pyx_arg_size); { __pyx_v_size = __Pyx_PyInt_As_size_t(__pyx_arg_size); if (unlikely((__pyx_v_size == (size_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 270; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; __Pyx_AddTraceback("pandas.msgpack.Packer.pack_map_header", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pandas_7msgpack_6Packer_10pack_map_header(((struct __pyx_obj_6pandas_7msgpack_Packer *)__pyx_v_self), ((size_t)__pyx_v_size)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_7msgpack_6Packer_10pack_map_header(struct __pyx_obj_6pandas_7msgpack_Packer *__pyx_v_self, size_t __pyx_v_size) { int __pyx_v_ret; PyObject *__pyx_v_buf = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("pack_map_header", 0); /* "pandas/msgpack.pyx":271 * * def pack_map_header(self, size_t size): * cdef int ret = msgpack_pack_map(&self.pk, size) # <<<<<<<<<<<<<< * if ret == -1: * raise MemoryError */ __pyx_v_ret = msgpack_pack_map((&__pyx_v_self->pk), __pyx_v_size); /* "pandas/msgpack.pyx":272 * def pack_map_header(self, size_t size): * cdef int ret = msgpack_pack_map(&self.pk, size) * if ret == -1: # <<<<<<<<<<<<<< * raise MemoryError * elif ret: # should not happen */ __pyx_t_1 = ((__pyx_v_ret == -1) != 0); if (__pyx_t_1) { /* "pandas/msgpack.pyx":273 * cdef int ret = msgpack_pack_map(&self.pk, size) * if ret == -1: * raise MemoryError # <<<<<<<<<<<<<< * elif ret: # should not happen * raise TypeError */ PyErr_NoMemory(); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 273; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } /* "pandas/msgpack.pyx":274 * if ret == -1: * raise MemoryError * elif ret: # should not happen # <<<<<<<<<<<<<< * raise TypeError * if self.autoreset: */ __pyx_t_1 = (__pyx_v_ret != 0); if (__pyx_t_1) { /* "pandas/msgpack.pyx":275 * raise MemoryError * elif ret: # should not happen * raise TypeError # <<<<<<<<<<<<<< * if self.autoreset: * buf = PyBytes_FromStringAndSize(self.pk.buf, self.pk.length) */ __Pyx_Raise(__pyx_builtin_TypeError, 0, 0, 0); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 275; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } /* "pandas/msgpack.pyx":276 * elif ret: # should not happen * raise TypeError * if self.autoreset: # <<<<<<<<<<<<<< * buf = PyBytes_FromStringAndSize(self.pk.buf, self.pk.length) * self.pk.length = 0 */ __pyx_t_1 = (__pyx_v_self->autoreset != 0); if (__pyx_t_1) { /* "pandas/msgpack.pyx":277 * raise TypeError * if self.autoreset: * buf = PyBytes_FromStringAndSize(self.pk.buf, self.pk.length) # <<<<<<<<<<<<<< * self.pk.length = 0 * return buf */ __pyx_t_2 = PyBytes_FromStringAndSize(__pyx_v_self->pk.buf, __pyx_v_self->pk.length); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 277; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_v_buf = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; /* "pandas/msgpack.pyx":278 * if self.autoreset: * buf = PyBytes_FromStringAndSize(self.pk.buf, self.pk.length) * self.pk.length = 0 # <<<<<<<<<<<<<< * return buf * */ __pyx_v_self->pk.length = 0; /* "pandas/msgpack.pyx":279 * buf = PyBytes_FromStringAndSize(self.pk.buf, self.pk.length) * self.pk.length = 0 * return buf # <<<<<<<<<<<<<< * * def pack_map_pairs(self, object pairs): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_buf); __pyx_r = __pyx_v_buf; goto __pyx_L0; } /* "pandas/msgpack.pyx":270 * return buf * * def pack_map_header(self, size_t size): # <<<<<<<<<<<<<< * cdef int ret = msgpack_pack_map(&self.pk, size) * if ret == -1: */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("pandas.msgpack.Packer.pack_map_header", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_buf); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/msgpack.pyx":281 * return buf * * def pack_map_pairs(self, object pairs): # <<<<<<<<<<<<<< * """ * Pack *pairs* as msgpack map type. */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_7msgpack_6Packer_13pack_map_pairs(PyObject *__pyx_v_self, PyObject *__pyx_v_pairs); /*proto*/ static char __pyx_doc_6pandas_7msgpack_6Packer_12pack_map_pairs[] = "Packer.pack_map_pairs(self, pairs)\n\n Pack *pairs* as msgpack map type.\n\n *pairs* should sequence of pair.\n (`len(pairs)` and `for k, v in *pairs*:` should be supported.)\n "; static PyObject *__pyx_pw_6pandas_7msgpack_6Packer_13pack_map_pairs(PyObject *__pyx_v_self, PyObject *__pyx_v_pairs) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("pack_map_pairs (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_7msgpack_6Packer_12pack_map_pairs(((struct __pyx_obj_6pandas_7msgpack_Packer *)__pyx_v_self), ((PyObject *)__pyx_v_pairs)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_7msgpack_6Packer_12pack_map_pairs(struct __pyx_obj_6pandas_7msgpack_Packer *__pyx_v_self, PyObject *__pyx_v_pairs) { int __pyx_v_ret; PyObject *__pyx_v_k = NULL; PyObject *__pyx_v_v = NULL; PyObject *__pyx_v_buf = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *(*__pyx_t_4)(PyObject *); PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; PyObject *(*__pyx_t_9)(PyObject *); int __pyx_t_10; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("pack_map_pairs", 0); /* "pandas/msgpack.pyx":288 * (`len(pairs)` and `for k, v in *pairs*:` should be supported.) * """ * cdef int ret = msgpack_pack_map(&self.pk, len(pairs)) # <<<<<<<<<<<<<< * if ret == 0: * for k, v in pairs: */ __pyx_t_1 = PyObject_Length(__pyx_v_pairs); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 288; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_ret = msgpack_pack_map((&__pyx_v_self->pk), __pyx_t_1); /* "pandas/msgpack.pyx":289 * """ * cdef int ret = msgpack_pack_map(&self.pk, len(pairs)) * if ret == 0: # <<<<<<<<<<<<<< * for k, v in pairs: * ret = self._pack(k) */ __pyx_t_2 = ((__pyx_v_ret == 0) != 0); if (__pyx_t_2) { /* "pandas/msgpack.pyx":290 * cdef int ret = msgpack_pack_map(&self.pk, len(pairs)) * if ret == 0: * for k, v in pairs: # <<<<<<<<<<<<<< * ret = self._pack(k) * if ret != 0: break */ if (PyList_CheckExact(__pyx_v_pairs) || PyTuple_CheckExact(__pyx_v_pairs)) { __pyx_t_3 = __pyx_v_pairs; __Pyx_INCREF(__pyx_t_3); __pyx_t_1 = 0; __pyx_t_4 = NULL; } else { __pyx_t_1 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_pairs); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 290; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = Py_TYPE(__pyx_t_3)->tp_iternext; } for (;;) { if (!__pyx_t_4 && PyList_CheckExact(__pyx_t_3)) { if (__pyx_t_1 >= PyList_GET_SIZE(__pyx_t_3)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_5 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_1); __Pyx_INCREF(__pyx_t_5); __pyx_t_1++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 290; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_5 = PySequence_ITEM(__pyx_t_3, __pyx_t_1); __pyx_t_1++; if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 290; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif } else if (!__pyx_t_4 && PyTuple_CheckExact(__pyx_t_3)) { if (__pyx_t_1 >= PyTuple_GET_SIZE(__pyx_t_3)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_1); __Pyx_INCREF(__pyx_t_5); __pyx_t_1++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 290; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_5 = PySequence_ITEM(__pyx_t_3, __pyx_t_1); __pyx_t_1++; if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 290; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif } else { __pyx_t_5 = __pyx_t_4(__pyx_t_3); if (unlikely(!__pyx_t_5)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 290; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } break; } __Pyx_GOTREF(__pyx_t_5); } if ((likely(PyTuple_CheckExact(__pyx_t_5))) || (PyList_CheckExact(__pyx_t_5))) { PyObject* sequence = __pyx_t_5; #if CYTHON_COMPILING_IN_CPYTHON Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 290; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_6 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_7 = PyTuple_GET_ITEM(sequence, 1); } else { __pyx_t_6 = PyList_GET_ITEM(sequence, 0); __pyx_t_7 = PyList_GET_ITEM(sequence, 1); } __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(__pyx_t_7); #else __pyx_t_6 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 290; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 290; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); #endif __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } else { Py_ssize_t index = -1; __pyx_t_8 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 290; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_9 = Py_TYPE(__pyx_t_8)->tp_iternext; index = 0; __pyx_t_6 = __pyx_t_9(__pyx_t_8); if (unlikely(!__pyx_t_6)) goto __pyx_L6_unpacking_failed; __Pyx_GOTREF(__pyx_t_6); index = 1; __pyx_t_7 = __pyx_t_9(__pyx_t_8); if (unlikely(!__pyx_t_7)) goto __pyx_L6_unpacking_failed; __Pyx_GOTREF(__pyx_t_7); if (__Pyx_IternextUnpackEndCheck(__pyx_t_9(__pyx_t_8), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 290; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_9 = NULL; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; goto __pyx_L7_unpacking_done; __pyx_L6_unpacking_failed:; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_9 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 290; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_L7_unpacking_done:; } __Pyx_XDECREF_SET(__pyx_v_k, __pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF_SET(__pyx_v_v, __pyx_t_7); __pyx_t_7 = 0; /* "pandas/msgpack.pyx":291 * if ret == 0: * for k, v in pairs: * ret = self._pack(k) # <<<<<<<<<<<<<< * if ret != 0: break * ret = self._pack(v) */ __pyx_t_10 = ((struct __pyx_vtabstruct_6pandas_7msgpack_Packer *)__pyx_v_self->__pyx_vtab)->_pack(__pyx_v_self, __pyx_v_k, NULL); if (unlikely(__pyx_t_10 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 291; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_ret = __pyx_t_10; /* "pandas/msgpack.pyx":292 * for k, v in pairs: * ret = self._pack(k) * if ret != 0: break # <<<<<<<<<<<<<< * ret = self._pack(v) * if ret != 0: break */ __pyx_t_2 = ((__pyx_v_ret != 0) != 0); if (__pyx_t_2) { goto __pyx_L5_break; } /* "pandas/msgpack.pyx":293 * ret = self._pack(k) * if ret != 0: break * ret = self._pack(v) # <<<<<<<<<<<<<< * if ret != 0: break * if ret == -1: */ __pyx_t_10 = ((struct __pyx_vtabstruct_6pandas_7msgpack_Packer *)__pyx_v_self->__pyx_vtab)->_pack(__pyx_v_self, __pyx_v_v, NULL); if (unlikely(__pyx_t_10 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 293; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_ret = __pyx_t_10; /* "pandas/msgpack.pyx":294 * if ret != 0: break * ret = self._pack(v) * if ret != 0: break # <<<<<<<<<<<<<< * if ret == -1: * raise MemoryError */ __pyx_t_2 = ((__pyx_v_ret != 0) != 0); if (__pyx_t_2) { goto __pyx_L5_break; } } __pyx_L5_break:; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L3; } __pyx_L3:; /* "pandas/msgpack.pyx":295 * ret = self._pack(v) * if ret != 0: break * if ret == -1: # <<<<<<<<<<<<<< * raise MemoryError * elif ret: # should not happen */ __pyx_t_2 = ((__pyx_v_ret == -1) != 0); if (__pyx_t_2) { /* "pandas/msgpack.pyx":296 * if ret != 0: break * if ret == -1: * raise MemoryError # <<<<<<<<<<<<<< * elif ret: # should not happen * raise TypeError */ PyErr_NoMemory(); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 296; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } /* "pandas/msgpack.pyx":297 * if ret == -1: * raise MemoryError * elif ret: # should not happen # <<<<<<<<<<<<<< * raise TypeError * if self.autoreset: */ __pyx_t_2 = (__pyx_v_ret != 0); if (__pyx_t_2) { /* "pandas/msgpack.pyx":298 * raise MemoryError * elif ret: # should not happen * raise TypeError # <<<<<<<<<<<<<< * if self.autoreset: * buf = PyBytes_FromStringAndSize(self.pk.buf, self.pk.length) */ __Pyx_Raise(__pyx_builtin_TypeError, 0, 0, 0); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 298; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } /* "pandas/msgpack.pyx":299 * elif ret: # should not happen * raise TypeError * if self.autoreset: # <<<<<<<<<<<<<< * buf = PyBytes_FromStringAndSize(self.pk.buf, self.pk.length) * self.pk.length = 0 */ __pyx_t_2 = (__pyx_v_self->autoreset != 0); if (__pyx_t_2) { /* "pandas/msgpack.pyx":300 * raise TypeError * if self.autoreset: * buf = PyBytes_FromStringAndSize(self.pk.buf, self.pk.length) # <<<<<<<<<<<<<< * self.pk.length = 0 * return buf */ __pyx_t_3 = PyBytes_FromStringAndSize(__pyx_v_self->pk.buf, __pyx_v_self->pk.length); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 300; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_v_buf = ((PyObject*)__pyx_t_3); __pyx_t_3 = 0; /* "pandas/msgpack.pyx":301 * if self.autoreset: * buf = PyBytes_FromStringAndSize(self.pk.buf, self.pk.length) * self.pk.length = 0 # <<<<<<<<<<<<<< * return buf * */ __pyx_v_self->pk.length = 0; /* "pandas/msgpack.pyx":302 * buf = PyBytes_FromStringAndSize(self.pk.buf, self.pk.length) * self.pk.length = 0 * return buf # <<<<<<<<<<<<<< * * def reset(self): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_buf); __pyx_r = __pyx_v_buf; goto __pyx_L0; } /* "pandas/msgpack.pyx":281 * return buf * * def pack_map_pairs(self, object pairs): # <<<<<<<<<<<<<< * """ * Pack *pairs* as msgpack map type. */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_AddTraceback("pandas.msgpack.Packer.pack_map_pairs", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_k); __Pyx_XDECREF(__pyx_v_v); __Pyx_XDECREF(__pyx_v_buf); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/msgpack.pyx":304 * return buf * * def reset(self): # <<<<<<<<<<<<<< * """Clear internal buffer.""" * self.pk.length = 0 */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_7msgpack_6Packer_15reset(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_6pandas_7msgpack_6Packer_14reset[] = "Packer.reset(self)\nClear internal buffer."; static PyObject *__pyx_pw_6pandas_7msgpack_6Packer_15reset(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("reset (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_7msgpack_6Packer_14reset(((struct __pyx_obj_6pandas_7msgpack_Packer *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_7msgpack_6Packer_14reset(struct __pyx_obj_6pandas_7msgpack_Packer *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("reset", 0); /* "pandas/msgpack.pyx":306 * def reset(self): * """Clear internal buffer.""" * self.pk.length = 0 # <<<<<<<<<<<<<< * * def bytes(self): */ __pyx_v_self->pk.length = 0; /* "pandas/msgpack.pyx":304 * return buf * * def reset(self): # <<<<<<<<<<<<<< * """Clear internal buffer.""" * self.pk.length = 0 */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/msgpack.pyx":308 * self.pk.length = 0 * * def bytes(self): # <<<<<<<<<<<<<< * """Return buffer content.""" * return PyBytes_FromStringAndSize(self.pk.buf, self.pk.length) */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_7msgpack_6Packer_17bytes(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_6pandas_7msgpack_6Packer_16bytes[] = "Packer.bytes(self)\nReturn buffer content."; static PyObject *__pyx_pw_6pandas_7msgpack_6Packer_17bytes(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("bytes (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_7msgpack_6Packer_16bytes(((struct __pyx_obj_6pandas_7msgpack_Packer *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_7msgpack_6Packer_16bytes(struct __pyx_obj_6pandas_7msgpack_Packer *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("bytes", 0); /* "pandas/msgpack.pyx":310 * def bytes(self): * """Return buffer content.""" * return PyBytes_FromStringAndSize(self.pk.buf, self.pk.length) # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyBytes_FromStringAndSize(__pyx_v_self->pk.buf, __pyx_v_self->pk.length); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 310; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "pandas/msgpack.pyx":308 * self.pk.length = 0 * * def bytes(self): # <<<<<<<<<<<<<< * """Return buffer content.""" * return PyBytes_FromStringAndSize(self.pk.buf, self.pk.length) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas.msgpack.Packer.bytes", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/msgpack.pyx":313 * * * cdef inline pack_pair(self, object k, object v, int nest_limit): # <<<<<<<<<<<<<< * ret = self._pack(k, nest_limit-1) * if ret != 0: raise PackException("cannot pack : %s" % k) */ static CYTHON_INLINE PyObject *__pyx_f_6pandas_7msgpack_6Packer_pack_pair(struct __pyx_obj_6pandas_7msgpack_Packer *__pyx_v_self, PyObject *__pyx_v_k, PyObject *__pyx_v_v, int __pyx_v_nest_limit) { int __pyx_v_ret; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; struct __pyx_opt_args_6pandas_7msgpack_6Packer__pack __pyx_t_2; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("pack_pair", 0); /* "pandas/msgpack.pyx":314 * * cdef inline pack_pair(self, object k, object v, int nest_limit): * ret = self._pack(k, nest_limit-1) # <<<<<<<<<<<<<< * if ret != 0: raise PackException("cannot pack : %s" % k) * ret = self._pack(v, nest_limit-1) */ __pyx_t_2.__pyx_n = 1; __pyx_t_2.nest_limit = (__pyx_v_nest_limit - 1); __pyx_t_1 = ((struct __pyx_vtabstruct_6pandas_7msgpack_Packer *)__pyx_v_self->__pyx_vtab)->_pack(__pyx_v_self, __pyx_v_k, &__pyx_t_2); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 314; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_ret = __pyx_t_1; /* "pandas/msgpack.pyx":315 * cdef inline pack_pair(self, object k, object v, int nest_limit): * ret = self._pack(k, nest_limit-1) * if ret != 0: raise PackException("cannot pack : %s" % k) # <<<<<<<<<<<<<< * ret = self._pack(v, nest_limit-1) * if ret != 0: raise PackException("cannot pack : %s" % v) */ __pyx_t_3 = ((__pyx_v_ret != 0) != 0); if (__pyx_t_3) { __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_PackException); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 315; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyString_Format(__pyx_kp_s_cannot_pack_s, __pyx_v_k); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 315; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 315; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyObject_Call(__pyx_t_4, __pyx_t_6, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 315; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_Raise(__pyx_t_5, 0, 0, 0); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 315; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } /* "pandas/msgpack.pyx":316 * ret = self._pack(k, nest_limit-1) * if ret != 0: raise PackException("cannot pack : %s" % k) * ret = self._pack(v, nest_limit-1) # <<<<<<<<<<<<<< * if ret != 0: raise PackException("cannot pack : %s" % v) * return ret */ __pyx_t_2.__pyx_n = 1; __pyx_t_2.nest_limit = (__pyx_v_nest_limit - 1); __pyx_t_1 = ((struct __pyx_vtabstruct_6pandas_7msgpack_Packer *)__pyx_v_self->__pyx_vtab)->_pack(__pyx_v_self, __pyx_v_v, &__pyx_t_2); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 316; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_ret = __pyx_t_1; /* "pandas/msgpack.pyx":317 * if ret != 0: raise PackException("cannot pack : %s" % k) * ret = self._pack(v, nest_limit-1) * if ret != 0: raise PackException("cannot pack : %s" % v) # <<<<<<<<<<<<<< * return ret * */ __pyx_t_3 = ((__pyx_v_ret != 0) != 0); if (__pyx_t_3) { __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_PackException); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 317; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyString_Format(__pyx_kp_s_cannot_pack_s, __pyx_v_v); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 317; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 317; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyObject_Call(__pyx_t_5, __pyx_t_4, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 317; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_Raise(__pyx_t_6, 0, 0, 0); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 317; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } /* "pandas/msgpack.pyx":318 * ret = self._pack(v, nest_limit-1) * if ret != 0: raise PackException("cannot pack : %s" % v) * return ret # <<<<<<<<<<<<<< * * def pack(object o, object stream, default=None, encoding='utf-8', unicode_errors='strict'): */ __Pyx_XDECREF(__pyx_r); __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_ret); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 318; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_r = __pyx_t_6; __pyx_t_6 = 0; goto __pyx_L0; /* "pandas/msgpack.pyx":313 * * * cdef inline pack_pair(self, object k, object v, int nest_limit): # <<<<<<<<<<<<<< * ret = self._pack(k, nest_limit-1) * if ret != 0: raise PackException("cannot pack : %s" % k) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("pandas.msgpack.Packer.pack_pair", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/msgpack.pyx":320 * return ret * * def pack(object o, object stream, default=None, encoding='utf-8', unicode_errors='strict'): # <<<<<<<<<<<<<< * """ * pack an object `o` and write it to stream).""" */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_7msgpack_1pack(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6pandas_7msgpack_pack[] = "pack(o, stream, default=None, encoding='utf-8', unicode_errors='strict')\n\n pack an object `o` and write it to stream)."; static PyMethodDef __pyx_mdef_6pandas_7msgpack_1pack = {__Pyx_NAMESTR("pack"), (PyCFunction)__pyx_pw_6pandas_7msgpack_1pack, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_7msgpack_pack)}; static PyObject *__pyx_pw_6pandas_7msgpack_1pack(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_o = 0; PyObject *__pyx_v_stream = 0; PyObject *__pyx_v_default = 0; PyObject *__pyx_v_encoding = 0; PyObject *__pyx_v_unicode_errors = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("pack (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_o,&__pyx_n_s_stream,&__pyx_n_s_default,&__pyx_n_s_encoding,&__pyx_n_s_unicode_errors,0}; PyObject* values[5] = {0,0,0,0,0}; values[2] = ((PyObject *)Py_None); values[3] = ((PyObject *)__pyx_kp_s_utf_8); values[4] = ((PyObject *)__pyx_n_s_strict); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_o)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_stream)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("pack", 0, 2, 5, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 320; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_default); if (value) { values[2] = value; kw_args--; } } case 3: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_encoding); if (value) { values[3] = value; kw_args--; } } case 4: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_unicode_errors); if (value) { values[4] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "pack") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 320; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_o = values[0]; __pyx_v_stream = values[1]; __pyx_v_default = values[2]; __pyx_v_encoding = values[3]; __pyx_v_unicode_errors = values[4]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("pack", 0, 2, 5, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 320; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.msgpack.pack", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pandas_7msgpack_pack(__pyx_self, __pyx_v_o, __pyx_v_stream, __pyx_v_default, __pyx_v_encoding, __pyx_v_unicode_errors); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_7msgpack_pack(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_o, PyObject *__pyx_v_stream, PyObject *__pyx_v_default, PyObject *__pyx_v_encoding, PyObject *__pyx_v_unicode_errors) { struct __pyx_obj_6pandas_7msgpack_Packer *__pyx_v_packer = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("pack", 0); /* "pandas/msgpack.pyx":323 * """ * pack an object `o` and write it to stream).""" * packer = Packer(default=default, encoding=encoding, unicode_errors=unicode_errors) # <<<<<<<<<<<<<< * stream.write(packer.pack(o)) * */ __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 323; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_default, __pyx_v_default) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 323; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_encoding, __pyx_v_encoding) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 323; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_unicode_errors, __pyx_v_unicode_errors) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 323; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_6pandas_7msgpack_Packer)), __pyx_empty_tuple, __pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 323; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_packer = ((struct __pyx_obj_6pandas_7msgpack_Packer *)__pyx_t_2); __pyx_t_2 = 0; /* "pandas/msgpack.pyx":324 * pack an object `o` and write it to stream).""" * packer = Packer(default=default, encoding=encoding, unicode_errors=unicode_errors) * stream.write(packer.pack(o)) # <<<<<<<<<<<<<< * * def packb(object o, default=None, encoding='utf-8', unicode_errors='strict', use_single_float=False): */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_stream, __pyx_n_s_write); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 324; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = ((struct __pyx_vtabstruct_6pandas_7msgpack_Packer *)__pyx_v_packer->__pyx_vtab)->pack(__pyx_v_packer, __pyx_v_o, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 324; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 324; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyObject_Call(__pyx_t_2, __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 324; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pandas/msgpack.pyx":320 * return ret * * def pack(object o, object stream, default=None, encoding='utf-8', unicode_errors='strict'): # <<<<<<<<<<<<<< * """ * pack an object `o` and write it to stream).""" */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("pandas.msgpack.pack", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_packer); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/msgpack.pyx":326 * stream.write(packer.pack(o)) * * def packb(object o, default=None, encoding='utf-8', unicode_errors='strict', use_single_float=False): # <<<<<<<<<<<<<< * """ * pack o and return packed bytes.""" */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_7msgpack_3packb(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6pandas_7msgpack_2packb[] = "packb(o, default=None, encoding='utf-8', unicode_errors='strict', use_single_float=False)\n\n pack o and return packed bytes."; static PyMethodDef __pyx_mdef_6pandas_7msgpack_3packb = {__Pyx_NAMESTR("packb"), (PyCFunction)__pyx_pw_6pandas_7msgpack_3packb, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_7msgpack_2packb)}; static PyObject *__pyx_pw_6pandas_7msgpack_3packb(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_o = 0; PyObject *__pyx_v_default = 0; PyObject *__pyx_v_encoding = 0; PyObject *__pyx_v_unicode_errors = 0; PyObject *__pyx_v_use_single_float = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("packb (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_o,&__pyx_n_s_default,&__pyx_n_s_encoding,&__pyx_n_s_unicode_errors,&__pyx_n_s_use_single_float,0}; PyObject* values[5] = {0,0,0,0,0}; values[1] = ((PyObject *)Py_None); values[2] = ((PyObject *)__pyx_kp_s_utf_8); values[3] = ((PyObject *)__pyx_n_s_strict); values[4] = ((PyObject *)Py_False); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_o)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_default); if (value) { values[1] = value; kw_args--; } } case 2: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_encoding); if (value) { values[2] = value; kw_args--; } } case 3: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_unicode_errors); if (value) { values[3] = value; kw_args--; } } case 4: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_use_single_float); if (value) { values[4] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "packb") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 326; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_o = values[0]; __pyx_v_default = values[1]; __pyx_v_encoding = values[2]; __pyx_v_unicode_errors = values[3]; __pyx_v_use_single_float = values[4]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("packb", 0, 1, 5, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 326; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.msgpack.packb", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pandas_7msgpack_2packb(__pyx_self, __pyx_v_o, __pyx_v_default, __pyx_v_encoding, __pyx_v_unicode_errors, __pyx_v_use_single_float); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_7msgpack_2packb(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_o, PyObject *__pyx_v_default, PyObject *__pyx_v_encoding, PyObject *__pyx_v_unicode_errors, PyObject *__pyx_v_use_single_float) { struct __pyx_obj_6pandas_7msgpack_Packer *__pyx_v_packer = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("packb", 0); /* "pandas/msgpack.pyx":329 * """ * pack o and return packed bytes.""" * packer = Packer(default=default, encoding=encoding, unicode_errors=unicode_errors, # <<<<<<<<<<<<<< * use_single_float=use_single_float) * return packer.pack(o) */ __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 329; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_default, __pyx_v_default) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 329; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_encoding, __pyx_v_encoding) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 329; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_unicode_errors, __pyx_v_unicode_errors) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 329; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/msgpack.pyx":330 * pack o and return packed bytes.""" * packer = Packer(default=default, encoding=encoding, unicode_errors=unicode_errors, * use_single_float=use_single_float) # <<<<<<<<<<<<<< * return packer.pack(o) * */ if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_use_single_float, __pyx_v_use_single_float) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 329; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/msgpack.pyx":329 * """ * pack o and return packed bytes.""" * packer = Packer(default=default, encoding=encoding, unicode_errors=unicode_errors, # <<<<<<<<<<<<<< * use_single_float=use_single_float) * return packer.pack(o) */ __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_6pandas_7msgpack_Packer)), __pyx_empty_tuple, __pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 329; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_packer = ((struct __pyx_obj_6pandas_7msgpack_Packer *)__pyx_t_2); __pyx_t_2 = 0; /* "pandas/msgpack.pyx":331 * packer = Packer(default=default, encoding=encoding, unicode_errors=unicode_errors, * use_single_float=use_single_float) * return packer.pack(o) # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = ((struct __pyx_vtabstruct_6pandas_7msgpack_Packer *)__pyx_v_packer->__pyx_vtab)->pack(__pyx_v_packer, __pyx_v_o, 0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 331; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "pandas/msgpack.pyx":326 * stream.write(packer.pack(o)) * * def packb(object o, default=None, encoding='utf-8', unicode_errors='strict', use_single_float=False): # <<<<<<<<<<<<<< * """ * pack o and return packed bytes.""" */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("pandas.msgpack.packb", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_packer); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/msgpack.pyx":334 * * * cdef inline init_ctx(template_context *ctx, # <<<<<<<<<<<<<< * object object_hook, object object_pairs_hook, object list_hook, * bint use_list, char* encoding, char* unicode_errors): */ static CYTHON_INLINE PyObject *__pyx_f_6pandas_7msgpack_init_ctx(template_context *__pyx_v_ctx, PyObject *__pyx_v_object_hook, PyObject *__pyx_v_object_pairs_hook, PyObject *__pyx_v_list_hook, int __pyx_v_use_list, char *__pyx_v_encoding, char *__pyx_v_unicode_errors) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("init_ctx", 0); /* "pandas/msgpack.pyx":337 * object object_hook, object object_pairs_hook, object list_hook, * bint use_list, char* encoding, char* unicode_errors): * template_init(ctx) # <<<<<<<<<<<<<< * ctx.user.use_list = use_list * ctx.user.object_hook = ctx.user.list_hook = NULL */ template_init(__pyx_v_ctx); /* "pandas/msgpack.pyx":338 * bint use_list, char* encoding, char* unicode_errors): * template_init(ctx) * ctx.user.use_list = use_list # <<<<<<<<<<<<<< * ctx.user.object_hook = ctx.user.list_hook = NULL * */ __pyx_v_ctx->user.use_list = __pyx_v_use_list; /* "pandas/msgpack.pyx":339 * template_init(ctx) * ctx.user.use_list = use_list * ctx.user.object_hook = ctx.user.list_hook = NULL # <<<<<<<<<<<<<< * * if object_hook is not None and object_pairs_hook is not None: */ __pyx_v_ctx->user.object_hook = ((PyObject *)NULL); __pyx_v_ctx->user.list_hook = ((PyObject *)NULL); /* "pandas/msgpack.pyx":341 * ctx.user.object_hook = ctx.user.list_hook = NULL * * if object_hook is not None and object_pairs_hook is not None: # <<<<<<<<<<<<<< * raise ValueError("object_pairs_hook and object_hook are mutually exclusive.") * */ __pyx_t_1 = (__pyx_v_object_hook != Py_None); if ((__pyx_t_1 != 0)) { __pyx_t_2 = (__pyx_v_object_pairs_hook != Py_None); __pyx_t_3 = (__pyx_t_2 != 0); } else { __pyx_t_3 = (__pyx_t_1 != 0); } if (__pyx_t_3) { /* "pandas/msgpack.pyx":342 * * if object_hook is not None and object_pairs_hook is not None: * raise ValueError("object_pairs_hook and object_hook are mutually exclusive.") # <<<<<<<<<<<<<< * * if object_hook is not None: */ __pyx_t_4 = PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__8, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 342; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 342; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } /* "pandas/msgpack.pyx":344 * raise ValueError("object_pairs_hook and object_hook are mutually exclusive.") * * if object_hook is not None: # <<<<<<<<<<<<<< * if not PyCallable_Check(object_hook): * raise TypeError("object_hook must be a callable.") */ __pyx_t_3 = (__pyx_v_object_hook != Py_None); __pyx_t_1 = (__pyx_t_3 != 0); if (__pyx_t_1) { /* "pandas/msgpack.pyx":345 * * if object_hook is not None: * if not PyCallable_Check(object_hook): # <<<<<<<<<<<<<< * raise TypeError("object_hook must be a callable.") * ctx.user.object_hook = object_hook */ __pyx_t_1 = ((!(PyCallable_Check(__pyx_v_object_hook) != 0)) != 0); if (__pyx_t_1) { /* "pandas/msgpack.pyx":346 * if object_hook is not None: * if not PyCallable_Check(object_hook): * raise TypeError("object_hook must be a callable.") # <<<<<<<<<<<<<< * ctx.user.object_hook = object_hook * */ __pyx_t_4 = PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__9, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 346; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 346; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } /* "pandas/msgpack.pyx":347 * if not PyCallable_Check(object_hook): * raise TypeError("object_hook must be a callable.") * ctx.user.object_hook = object_hook # <<<<<<<<<<<<<< * * if object_pairs_hook is None: */ __pyx_v_ctx->user.object_hook = ((PyObject *)__pyx_v_object_hook); goto __pyx_L4; } __pyx_L4:; /* "pandas/msgpack.pyx":349 * ctx.user.object_hook = object_hook * * if object_pairs_hook is None: # <<<<<<<<<<<<<< * ctx.user.has_pairs_hook = False * else: */ __pyx_t_1 = (__pyx_v_object_pairs_hook == Py_None); __pyx_t_3 = (__pyx_t_1 != 0); if (__pyx_t_3) { /* "pandas/msgpack.pyx":350 * * if object_pairs_hook is None: * ctx.user.has_pairs_hook = False # <<<<<<<<<<<<<< * else: * if not PyCallable_Check(object_pairs_hook): */ __pyx_v_ctx->user.has_pairs_hook = 0; goto __pyx_L6; } /*else*/ { /* "pandas/msgpack.pyx":352 * ctx.user.has_pairs_hook = False * else: * if not PyCallable_Check(object_pairs_hook): # <<<<<<<<<<<<<< * raise TypeError("object_pairs_hook must be a callable.") * ctx.user.object_hook = object_pairs_hook */ __pyx_t_3 = ((!(PyCallable_Check(__pyx_v_object_pairs_hook) != 0)) != 0); if (__pyx_t_3) { /* "pandas/msgpack.pyx":353 * else: * if not PyCallable_Check(object_pairs_hook): * raise TypeError("object_pairs_hook must be a callable.") # <<<<<<<<<<<<<< * ctx.user.object_hook = object_pairs_hook * ctx.user.has_pairs_hook = True */ __pyx_t_4 = PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__10, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 353; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 353; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } /* "pandas/msgpack.pyx":354 * if not PyCallable_Check(object_pairs_hook): * raise TypeError("object_pairs_hook must be a callable.") * ctx.user.object_hook = object_pairs_hook # <<<<<<<<<<<<<< * ctx.user.has_pairs_hook = True * */ __pyx_v_ctx->user.object_hook = ((PyObject *)__pyx_v_object_pairs_hook); /* "pandas/msgpack.pyx":355 * raise TypeError("object_pairs_hook must be a callable.") * ctx.user.object_hook = object_pairs_hook * ctx.user.has_pairs_hook = True # <<<<<<<<<<<<<< * * if list_hook is not None: */ __pyx_v_ctx->user.has_pairs_hook = 1; } __pyx_L6:; /* "pandas/msgpack.pyx":357 * ctx.user.has_pairs_hook = True * * if list_hook is not None: # <<<<<<<<<<<<<< * if not PyCallable_Check(list_hook): * raise TypeError("list_hook must be a callable.") */ __pyx_t_3 = (__pyx_v_list_hook != Py_None); __pyx_t_1 = (__pyx_t_3 != 0); if (__pyx_t_1) { /* "pandas/msgpack.pyx":358 * * if list_hook is not None: * if not PyCallable_Check(list_hook): # <<<<<<<<<<<<<< * raise TypeError("list_hook must be a callable.") * ctx.user.list_hook = list_hook */ __pyx_t_1 = ((!(PyCallable_Check(__pyx_v_list_hook) != 0)) != 0); if (__pyx_t_1) { /* "pandas/msgpack.pyx":359 * if list_hook is not None: * if not PyCallable_Check(list_hook): * raise TypeError("list_hook must be a callable.") # <<<<<<<<<<<<<< * ctx.user.list_hook = list_hook * */ __pyx_t_4 = PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__11, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 359; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 359; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } /* "pandas/msgpack.pyx":360 * if not PyCallable_Check(list_hook): * raise TypeError("list_hook must be a callable.") * ctx.user.list_hook = list_hook # <<<<<<<<<<<<<< * * ctx.user.encoding = encoding */ __pyx_v_ctx->user.list_hook = ((PyObject *)__pyx_v_list_hook); goto __pyx_L8; } __pyx_L8:; /* "pandas/msgpack.pyx":362 * ctx.user.list_hook = list_hook * * ctx.user.encoding = encoding # <<<<<<<<<<<<<< * ctx.user.unicode_errors = unicode_errors * */ __pyx_v_ctx->user.encoding = __pyx_v_encoding; /* "pandas/msgpack.pyx":363 * * ctx.user.encoding = encoding * ctx.user.unicode_errors = unicode_errors # <<<<<<<<<<<<<< * * def unpackb(object packed, object object_hook=None, object list_hook=None, */ __pyx_v_ctx->user.unicode_errors = __pyx_v_unicode_errors; /* "pandas/msgpack.pyx":334 * * * cdef inline init_ctx(template_context *ctx, # <<<<<<<<<<<<<< * object object_hook, object object_pairs_hook, object list_hook, * bint use_list, char* encoding, char* unicode_errors): */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("pandas.msgpack.init_ctx", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/msgpack.pyx":365 * ctx.user.unicode_errors = unicode_errors * * def unpackb(object packed, object object_hook=None, object list_hook=None, # <<<<<<<<<<<<<< * bint use_list=1, encoding=None, unicode_errors="strict", * object_pairs_hook=None, */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_7msgpack_5unpackb(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6pandas_7msgpack_4unpackb[] = "unpackb(packed, object_hook=None, list_hook=None, bool use_list=1, encoding=None, unicode_errors='strict', object_pairs_hook=None)\nUnpack packed_bytes to object. Returns an unpacked object.\n\n Raises `ValueError` when `packed` contains extra bytes.\n "; static PyMethodDef __pyx_mdef_6pandas_7msgpack_5unpackb = {__Pyx_NAMESTR("unpackb"), (PyCFunction)__pyx_pw_6pandas_7msgpack_5unpackb, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_7msgpack_4unpackb)}; static PyObject *__pyx_pw_6pandas_7msgpack_5unpackb(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_packed = 0; PyObject *__pyx_v_object_hook = 0; PyObject *__pyx_v_list_hook = 0; int __pyx_v_use_list; PyObject *__pyx_v_encoding = 0; PyObject *__pyx_v_unicode_errors = 0; PyObject *__pyx_v_object_pairs_hook = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("unpackb (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_packed,&__pyx_n_s_object_hook,&__pyx_n_s_list_hook,&__pyx_n_s_use_list,&__pyx_n_s_encoding,&__pyx_n_s_unicode_errors,&__pyx_n_s_object_pairs_hook,0}; PyObject* values[7] = {0,0,0,0,0,0,0}; values[1] = ((PyObject *)Py_None); values[2] = ((PyObject *)Py_None); /* "pandas/msgpack.pyx":366 * * def unpackb(object packed, object object_hook=None, object list_hook=None, * bint use_list=1, encoding=None, unicode_errors="strict", # <<<<<<<<<<<<<< * object_pairs_hook=None, * ): */ values[4] = ((PyObject *)Py_None); values[5] = ((PyObject *)__pyx_n_s_strict); /* "pandas/msgpack.pyx":367 * def unpackb(object packed, object object_hook=None, object list_hook=None, * bint use_list=1, encoding=None, unicode_errors="strict", * object_pairs_hook=None, # <<<<<<<<<<<<<< * ): * """Unpack packed_bytes to object. Returns an unpacked object. */ values[6] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6); case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5); case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_packed)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_object_hook); if (value) { values[1] = value; kw_args--; } } case 2: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_list_hook); if (value) { values[2] = value; kw_args--; } } case 3: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_use_list); if (value) { values[3] = value; kw_args--; } } case 4: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_encoding); if (value) { values[4] = value; kw_args--; } } case 5: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_unicode_errors); if (value) { values[5] = value; kw_args--; } } case 6: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_object_pairs_hook); if (value) { values[6] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "unpackb") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 365; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6); case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5); case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_packed = values[0]; __pyx_v_object_hook = values[1]; __pyx_v_list_hook = values[2]; if (values[3]) { __pyx_v_use_list = __Pyx_PyObject_IsTrue(values[3]); if (unlikely((__pyx_v_use_list == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 366; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } else { __pyx_v_use_list = ((int)1); } __pyx_v_encoding = values[4]; __pyx_v_unicode_errors = values[5]; __pyx_v_object_pairs_hook = values[6]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("unpackb", 0, 1, 7, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 365; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.msgpack.unpackb", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pandas_7msgpack_4unpackb(__pyx_self, __pyx_v_packed, __pyx_v_object_hook, __pyx_v_list_hook, __pyx_v_use_list, __pyx_v_encoding, __pyx_v_unicode_errors, __pyx_v_object_pairs_hook); /* "pandas/msgpack.pyx":365 * ctx.user.unicode_errors = unicode_errors * * def unpackb(object packed, object object_hook=None, object list_hook=None, # <<<<<<<<<<<<<< * bint use_list=1, encoding=None, unicode_errors="strict", * object_pairs_hook=None, */ /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_7msgpack_4unpackb(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_packed, PyObject *__pyx_v_object_hook, PyObject *__pyx_v_list_hook, int __pyx_v_use_list, PyObject *__pyx_v_encoding, PyObject *__pyx_v_unicode_errors, PyObject *__pyx_v_object_pairs_hook) { template_context __pyx_v_ctx; size_t __pyx_v_off; int __pyx_v_ret; char *__pyx_v_buf; Py_ssize_t __pyx_v_buf_len; char *__pyx_v_cenc; char *__pyx_v_cerr; PyObject *__pyx_v_obj = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; char *__pyx_t_6; PyObject *__pyx_t_7 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("unpackb", 0); __Pyx_INCREF(__pyx_v_encoding); __Pyx_INCREF(__pyx_v_unicode_errors); /* "pandas/msgpack.pyx":374 * """ * cdef template_context ctx * cdef size_t off = 0 # <<<<<<<<<<<<<< * cdef int ret * */ __pyx_v_off = 0; /* "pandas/msgpack.pyx":379 * cdef char* buf * cdef Py_ssize_t buf_len * cdef char* cenc = NULL # <<<<<<<<<<<<<< * cdef char* cerr = NULL * */ __pyx_v_cenc = NULL; /* "pandas/msgpack.pyx":380 * cdef Py_ssize_t buf_len * cdef char* cenc = NULL * cdef char* cerr = NULL # <<<<<<<<<<<<<< * * PyObject_AsReadBuffer(packed, &buf, &buf_len) */ __pyx_v_cerr = NULL; /* "pandas/msgpack.pyx":382 * cdef char* cerr = NULL * * PyObject_AsReadBuffer(packed, &buf, &buf_len) # <<<<<<<<<<<<<< * * if encoding is not None: */ __pyx_t_1 = PyObject_AsReadBuffer(__pyx_v_packed, ((const void* *)(&__pyx_v_buf)), (&__pyx_v_buf_len)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 382; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/msgpack.pyx":384 * PyObject_AsReadBuffer(packed, &buf, &buf_len) * * if encoding is not None: # <<<<<<<<<<<<<< * if isinstance(encoding, unicode): * encoding = encoding.encode('ascii') */ __pyx_t_2 = (__pyx_v_encoding != Py_None); __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { /* "pandas/msgpack.pyx":385 * * if encoding is not None: * if isinstance(encoding, unicode): # <<<<<<<<<<<<<< * encoding = encoding.encode('ascii') * cenc = PyBytes_AsString(encoding) */ __pyx_t_3 = PyUnicode_Check(__pyx_v_encoding); __pyx_t_2 = (__pyx_t_3 != 0); if (__pyx_t_2) { /* "pandas/msgpack.pyx":386 * if encoding is not None: * if isinstance(encoding, unicode): * encoding = encoding.encode('ascii') # <<<<<<<<<<<<<< * cenc = PyBytes_AsString(encoding) * */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_encoding, __pyx_n_s_encode); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 386; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = PyObject_Call(__pyx_t_4, __pyx_tuple__12, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 386; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF_SET(__pyx_v_encoding, __pyx_t_5); __pyx_t_5 = 0; goto __pyx_L4; } __pyx_L4:; /* "pandas/msgpack.pyx":387 * if isinstance(encoding, unicode): * encoding = encoding.encode('ascii') * cenc = PyBytes_AsString(encoding) # <<<<<<<<<<<<<< * * if unicode_errors is not None: */ __pyx_t_6 = PyBytes_AsString(__pyx_v_encoding); if (unlikely(__pyx_t_6 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 387; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_cenc = __pyx_t_6; goto __pyx_L3; } __pyx_L3:; /* "pandas/msgpack.pyx":389 * cenc = PyBytes_AsString(encoding) * * if unicode_errors is not None: # <<<<<<<<<<<<<< * if isinstance(unicode_errors, unicode): * unicode_errors = unicode_errors.encode('ascii') */ __pyx_t_2 = (__pyx_v_unicode_errors != Py_None); __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { /* "pandas/msgpack.pyx":390 * * if unicode_errors is not None: * if isinstance(unicode_errors, unicode): # <<<<<<<<<<<<<< * unicode_errors = unicode_errors.encode('ascii') * cerr = PyBytes_AsString(unicode_errors) */ __pyx_t_3 = PyUnicode_Check(__pyx_v_unicode_errors); __pyx_t_2 = (__pyx_t_3 != 0); if (__pyx_t_2) { /* "pandas/msgpack.pyx":391 * if unicode_errors is not None: * if isinstance(unicode_errors, unicode): * unicode_errors = unicode_errors.encode('ascii') # <<<<<<<<<<<<<< * cerr = PyBytes_AsString(unicode_errors) * */ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_unicode_errors, __pyx_n_s_encode); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 391; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = PyObject_Call(__pyx_t_5, __pyx_tuple__13, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 391; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF_SET(__pyx_v_unicode_errors, __pyx_t_4); __pyx_t_4 = 0; goto __pyx_L6; } __pyx_L6:; /* "pandas/msgpack.pyx":392 * if isinstance(unicode_errors, unicode): * unicode_errors = unicode_errors.encode('ascii') * cerr = PyBytes_AsString(unicode_errors) # <<<<<<<<<<<<<< * * init_ctx(&ctx, object_hook, object_pairs_hook, list_hook, use_list, cenc, cerr) */ __pyx_t_6 = PyBytes_AsString(__pyx_v_unicode_errors); if (unlikely(__pyx_t_6 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 392; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_cerr = __pyx_t_6; goto __pyx_L5; } __pyx_L5:; /* "pandas/msgpack.pyx":394 * cerr = PyBytes_AsString(unicode_errors) * * init_ctx(&ctx, object_hook, object_pairs_hook, list_hook, use_list, cenc, cerr) # <<<<<<<<<<<<<< * ret = template_construct(&ctx, buf, buf_len, &off) * if ret == 1: */ __pyx_t_4 = __pyx_f_6pandas_7msgpack_init_ctx((&__pyx_v_ctx), __pyx_v_object_hook, __pyx_v_object_pairs_hook, __pyx_v_list_hook, __pyx_v_use_list, __pyx_v_cenc, __pyx_v_cerr); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 394; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "pandas/msgpack.pyx":395 * * init_ctx(&ctx, object_hook, object_pairs_hook, list_hook, use_list, cenc, cerr) * ret = template_construct(&ctx, buf, buf_len, &off) # <<<<<<<<<<<<<< * if ret == 1: * obj = template_data(&ctx) */ __pyx_t_1 = template_construct((&__pyx_v_ctx), __pyx_v_buf, __pyx_v_buf_len, (&__pyx_v_off)); if (unlikely(__pyx_t_1 == -1 && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 395; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_ret = __pyx_t_1; /* "pandas/msgpack.pyx":396 * init_ctx(&ctx, object_hook, object_pairs_hook, list_hook, use_list, cenc, cerr) * ret = template_construct(&ctx, buf, buf_len, &off) * if ret == 1: # <<<<<<<<<<<<<< * obj = template_data(&ctx) * if off < buf_len: */ __pyx_t_2 = ((__pyx_v_ret == 1) != 0); if (__pyx_t_2) { /* "pandas/msgpack.pyx":397 * ret = template_construct(&ctx, buf, buf_len, &off) * if ret == 1: * obj = template_data(&ctx) # <<<<<<<<<<<<<< * if off < buf_len: * raise ExtraData(obj, PyBytes_FromStringAndSize(buf+off, buf_len-off)) */ __pyx_t_4 = template_data((&__pyx_v_ctx)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 397; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_v_obj = __pyx_t_4; __pyx_t_4 = 0; /* "pandas/msgpack.pyx":398 * if ret == 1: * obj = template_data(&ctx) * if off < buf_len: # <<<<<<<<<<<<<< * raise ExtraData(obj, PyBytes_FromStringAndSize(buf+off, buf_len-off)) * return obj */ __pyx_t_2 = ((__pyx_v_off < __pyx_v_buf_len) != 0); if (__pyx_t_2) { /* "pandas/msgpack.pyx":399 * obj = template_data(&ctx) * if off < buf_len: * raise ExtraData(obj, PyBytes_FromStringAndSize(buf+off, buf_len-off)) # <<<<<<<<<<<<<< * return obj * elif ret < 0: */ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_ExtraData); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 399; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = PyBytes_FromStringAndSize((__pyx_v_buf + __pyx_v_off), (__pyx_v_buf_len - __pyx_v_off)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 399; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 399; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_INCREF(__pyx_v_obj); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_v_obj); __Pyx_GIVEREF(__pyx_v_obj); PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyObject_Call(__pyx_t_4, __pyx_t_7, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 399; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_Raise(__pyx_t_5, 0, 0, 0); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 399; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } /* "pandas/msgpack.pyx":400 * if off < buf_len: * raise ExtraData(obj, PyBytes_FromStringAndSize(buf+off, buf_len-off)) * return obj # <<<<<<<<<<<<<< * elif ret < 0: * raise ValueError("Unpack failed: error = %d" % (ret,)) */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_obj); __pyx_r = __pyx_v_obj; goto __pyx_L0; } /* "pandas/msgpack.pyx":401 * raise ExtraData(obj, PyBytes_FromStringAndSize(buf+off, buf_len-off)) * return obj * elif ret < 0: # <<<<<<<<<<<<<< * raise ValueError("Unpack failed: error = %d" % (ret,)) * else: */ __pyx_t_2 = ((__pyx_v_ret < 0) != 0); if (__pyx_t_2) { /* "pandas/msgpack.pyx":402 * return obj * elif ret < 0: * raise ValueError("Unpack failed: error = %d" % (ret,)) # <<<<<<<<<<<<<< * else: * raise UnpackValueError */ __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_ret); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 402; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 402; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyString_Format(__pyx_kp_s_Unpack_failed_error_d, __pyx_t_7); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 402; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 402; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyObject_Call(__pyx_builtin_ValueError, __pyx_t_7, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 402; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_Raise(__pyx_t_5, 0, 0, 0); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 402; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } /*else*/ { /* "pandas/msgpack.pyx":404 * raise ValueError("Unpack failed: error = %d" % (ret,)) * else: * raise UnpackValueError # <<<<<<<<<<<<<< * * */ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_UnpackValueError); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 404; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_Raise(__pyx_t_5, 0, 0, 0); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 404; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } /* "pandas/msgpack.pyx":365 * ctx.user.unicode_errors = unicode_errors * * def unpackb(object packed, object object_hook=None, object list_hook=None, # <<<<<<<<<<<<<< * bint use_list=1, encoding=None, unicode_errors="strict", * object_pairs_hook=None, */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_7); __Pyx_AddTraceback("pandas.msgpack.unpackb", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_obj); __Pyx_XDECREF(__pyx_v_encoding); __Pyx_XDECREF(__pyx_v_unicode_errors); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/msgpack.pyx":407 * * * def unpack(object stream, object object_hook=None, object list_hook=None, # <<<<<<<<<<<<<< * bint use_list=1, encoding=None, unicode_errors="strict", * object_pairs_hook=None, */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_7msgpack_7unpack(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6pandas_7msgpack_6unpack[] = "unpack(stream, object_hook=None, list_hook=None, bool use_list=1, encoding=None, unicode_errors='strict', object_pairs_hook=None)\nUnpack an object from `stream`.\n\n Raises `ValueError` when `stream` has extra bytes.\n "; static PyMethodDef __pyx_mdef_6pandas_7msgpack_7unpack = {__Pyx_NAMESTR("unpack"), (PyCFunction)__pyx_pw_6pandas_7msgpack_7unpack, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_7msgpack_6unpack)}; static PyObject *__pyx_pw_6pandas_7msgpack_7unpack(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_stream = 0; PyObject *__pyx_v_object_hook = 0; PyObject *__pyx_v_list_hook = 0; int __pyx_v_use_list; PyObject *__pyx_v_encoding = 0; PyObject *__pyx_v_unicode_errors = 0; PyObject *__pyx_v_object_pairs_hook = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("unpack (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_stream,&__pyx_n_s_object_hook,&__pyx_n_s_list_hook,&__pyx_n_s_use_list,&__pyx_n_s_encoding,&__pyx_n_s_unicode_errors,&__pyx_n_s_object_pairs_hook,0}; PyObject* values[7] = {0,0,0,0,0,0,0}; values[1] = ((PyObject *)Py_None); values[2] = ((PyObject *)Py_None); /* "pandas/msgpack.pyx":408 * * def unpack(object stream, object object_hook=None, object list_hook=None, * bint use_list=1, encoding=None, unicode_errors="strict", # <<<<<<<<<<<<<< * object_pairs_hook=None, * ): */ values[4] = ((PyObject *)Py_None); values[5] = ((PyObject *)__pyx_n_s_strict); /* "pandas/msgpack.pyx":409 * def unpack(object stream, object object_hook=None, object list_hook=None, * bint use_list=1, encoding=None, unicode_errors="strict", * object_pairs_hook=None, # <<<<<<<<<<<<<< * ): * """Unpack an object from `stream`. */ values[6] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6); case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5); case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_stream)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_object_hook); if (value) { values[1] = value; kw_args--; } } case 2: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_list_hook); if (value) { values[2] = value; kw_args--; } } case 3: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_use_list); if (value) { values[3] = value; kw_args--; } } case 4: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_encoding); if (value) { values[4] = value; kw_args--; } } case 5: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_unicode_errors); if (value) { values[5] = value; kw_args--; } } case 6: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_object_pairs_hook); if (value) { values[6] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "unpack") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 407; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6); case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5); case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_stream = values[0]; __pyx_v_object_hook = values[1]; __pyx_v_list_hook = values[2]; if (values[3]) { __pyx_v_use_list = __Pyx_PyObject_IsTrue(values[3]); if (unlikely((__pyx_v_use_list == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 408; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } else { __pyx_v_use_list = ((int)1); } __pyx_v_encoding = values[4]; __pyx_v_unicode_errors = values[5]; __pyx_v_object_pairs_hook = values[6]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("unpack", 0, 1, 7, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 407; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.msgpack.unpack", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pandas_7msgpack_6unpack(__pyx_self, __pyx_v_stream, __pyx_v_object_hook, __pyx_v_list_hook, __pyx_v_use_list, __pyx_v_encoding, __pyx_v_unicode_errors, __pyx_v_object_pairs_hook); /* "pandas/msgpack.pyx":407 * * * def unpack(object stream, object object_hook=None, object list_hook=None, # <<<<<<<<<<<<<< * bint use_list=1, encoding=None, unicode_errors="strict", * object_pairs_hook=None, */ /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_7msgpack_6unpack(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_stream, PyObject *__pyx_v_object_hook, PyObject *__pyx_v_list_hook, int __pyx_v_use_list, PyObject *__pyx_v_encoding, PyObject *__pyx_v_unicode_errors, PyObject *__pyx_v_object_pairs_hook) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("unpack", 0); /* "pandas/msgpack.pyx":415 * Raises `ValueError` when `stream` has extra bytes. * """ * return unpackb(stream.read(), use_list=use_list, # <<<<<<<<<<<<<< * object_hook=object_hook, object_pairs_hook=object_pairs_hook, list_hook=list_hook, * encoding=encoding, unicode_errors=unicode_errors, */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_unpackb); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 415; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_stream, __pyx_n_s_read); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 415; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyObject_Call(__pyx_t_2, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 415; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 415; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 415; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyBool_FromLong(__pyx_v_use_list); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 415; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_use_list, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 415; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "pandas/msgpack.pyx":416 * """ * return unpackb(stream.read(), use_list=use_list, * object_hook=object_hook, object_pairs_hook=object_pairs_hook, list_hook=list_hook, # <<<<<<<<<<<<<< * encoding=encoding, unicode_errors=unicode_errors, * ) */ if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_object_hook, __pyx_v_object_hook) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 415; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_object_pairs_hook, __pyx_v_object_pairs_hook) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 415; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_list_hook, __pyx_v_list_hook) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 415; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/msgpack.pyx":417 * return unpackb(stream.read(), use_list=use_list, * object_hook=object_hook, object_pairs_hook=object_pairs_hook, list_hook=list_hook, * encoding=encoding, unicode_errors=unicode_errors, # <<<<<<<<<<<<<< * ) * */ if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_encoding, __pyx_v_encoding) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 415; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_unicode_errors, __pyx_v_unicode_errors) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 415; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/msgpack.pyx":415 * Raises `ValueError` when `stream` has extra bytes. * """ * return unpackb(stream.read(), use_list=use_list, # <<<<<<<<<<<<<< * object_hook=object_hook, object_pairs_hook=object_pairs_hook, list_hook=list_hook, * encoding=encoding, unicode_errors=unicode_errors, */ __pyx_t_4 = PyObject_Call(__pyx_t_1, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 415; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; /* "pandas/msgpack.pyx":407 * * * def unpack(object stream, object object_hook=None, object list_hook=None, # <<<<<<<<<<<<<< * bint use_list=1, encoding=None, unicode_errors="strict", * object_pairs_hook=None, */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("pandas.msgpack.unpack", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/msgpack.pyx":478 * cdef size_t max_buffer_size * * def __cinit__(self): # <<<<<<<<<<<<<< * self.buf = NULL * */ /* Python wrapper */ static int __pyx_pw_6pandas_7msgpack_8Unpacker_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_pw_6pandas_7msgpack_8Unpacker_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return -1;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__cinit__", 0))) return -1; __pyx_r = __pyx_pf_6pandas_7msgpack_8Unpacker___cinit__(((struct __pyx_obj_6pandas_7msgpack_Unpacker *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pandas_7msgpack_8Unpacker___cinit__(struct __pyx_obj_6pandas_7msgpack_Unpacker *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__cinit__", 0); /* "pandas/msgpack.pyx":479 * * def __cinit__(self): * self.buf = NULL # <<<<<<<<<<<<<< * * def __dealloc__(self): */ __pyx_v_self->buf = NULL; /* "pandas/msgpack.pyx":478 * cdef size_t max_buffer_size * * def __cinit__(self): # <<<<<<<<<<<<<< * self.buf = NULL * */ /* function exit code */ __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/msgpack.pyx":481 * self.buf = NULL * * def __dealloc__(self): # <<<<<<<<<<<<<< * free(self.buf) * self.buf = NULL */ /* Python wrapper */ static void __pyx_pw_6pandas_7msgpack_8Unpacker_3__dealloc__(PyObject *__pyx_v_self); /*proto*/ static void __pyx_pw_6pandas_7msgpack_8Unpacker_3__dealloc__(PyObject *__pyx_v_self) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0); __pyx_pf_6pandas_7msgpack_8Unpacker_2__dealloc__(((struct __pyx_obj_6pandas_7msgpack_Unpacker *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); } static void __pyx_pf_6pandas_7msgpack_8Unpacker_2__dealloc__(struct __pyx_obj_6pandas_7msgpack_Unpacker *__pyx_v_self) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__dealloc__", 0); /* "pandas/msgpack.pyx":482 * * def __dealloc__(self): * free(self.buf) # <<<<<<<<<<<<<< * self.buf = NULL * */ free(__pyx_v_self->buf); /* "pandas/msgpack.pyx":483 * def __dealloc__(self): * free(self.buf) * self.buf = NULL # <<<<<<<<<<<<<< * * def __init__(self, file_like=None, Py_ssize_t read_size=0, bint use_list=1, */ __pyx_v_self->buf = NULL; /* "pandas/msgpack.pyx":481 * self.buf = NULL * * def __dealloc__(self): # <<<<<<<<<<<<<< * free(self.buf) * self.buf = NULL */ /* function exit code */ __Pyx_RefNannyFinishContext(); } /* "pandas/msgpack.pyx":485 * self.buf = NULL * * def __init__(self, file_like=None, Py_ssize_t read_size=0, bint use_list=1, # <<<<<<<<<<<<<< * object object_hook=None, object object_pairs_hook=None, object list_hook=None, * encoding=None, unicode_errors='strict', int max_buffer_size=0, */ /* Python wrapper */ static int __pyx_pw_6pandas_7msgpack_8Unpacker_5__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_pw_6pandas_7msgpack_8Unpacker_5__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_file_like = 0; Py_ssize_t __pyx_v_read_size; int __pyx_v_use_list; PyObject *__pyx_v_object_hook = 0; PyObject *__pyx_v_object_pairs_hook = 0; PyObject *__pyx_v_list_hook = 0; PyObject *__pyx_v_encoding = 0; PyObject *__pyx_v_unicode_errors = 0; int __pyx_v_max_buffer_size; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_file_like,&__pyx_n_s_read_size,&__pyx_n_s_use_list,&__pyx_n_s_object_hook,&__pyx_n_s_object_pairs_hook,&__pyx_n_s_list_hook,&__pyx_n_s_encoding,&__pyx_n_s_unicode_errors,&__pyx_n_s_max_buffer_size,0}; PyObject* values[9] = {0,0,0,0,0,0,0,0,0}; values[0] = ((PyObject *)Py_None); /* "pandas/msgpack.pyx":486 * * def __init__(self, file_like=None, Py_ssize_t read_size=0, bint use_list=1, * object object_hook=None, object object_pairs_hook=None, object list_hook=None, # <<<<<<<<<<<<<< * encoding=None, unicode_errors='strict', int max_buffer_size=0, * ): */ values[3] = ((PyObject *)Py_None); values[4] = ((PyObject *)Py_None); values[5] = ((PyObject *)Py_None); /* "pandas/msgpack.pyx":487 * def __init__(self, file_like=None, Py_ssize_t read_size=0, bint use_list=1, * object object_hook=None, object object_pairs_hook=None, object list_hook=None, * encoding=None, unicode_errors='strict', int max_buffer_size=0, # <<<<<<<<<<<<<< * ): * cdef char *cenc=NULL, *cerr=NULL */ values[6] = ((PyObject *)Py_None); values[7] = ((PyObject *)__pyx_n_s_strict); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8); case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7); case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6); case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5); case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_file_like); if (value) { values[0] = value; kw_args--; } } case 1: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_read_size); if (value) { values[1] = value; kw_args--; } } case 2: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_use_list); if (value) { values[2] = value; kw_args--; } } case 3: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_object_hook); if (value) { values[3] = value; kw_args--; } } case 4: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_object_pairs_hook); if (value) { values[4] = value; kw_args--; } } case 5: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_list_hook); if (value) { values[5] = value; kw_args--; } } case 6: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_encoding); if (value) { values[6] = value; kw_args--; } } case 7: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_unicode_errors); if (value) { values[7] = value; kw_args--; } } case 8: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_max_buffer_size); if (value) { values[8] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 485; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8); case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7); case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6); case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5); case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_file_like = values[0]; if (values[1]) { __pyx_v_read_size = __Pyx_PyIndex_AsSsize_t(values[1]); if (unlikely((__pyx_v_read_size == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 485; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } else { __pyx_v_read_size = ((Py_ssize_t)0); } if (values[2]) { __pyx_v_use_list = __Pyx_PyObject_IsTrue(values[2]); if (unlikely((__pyx_v_use_list == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 485; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } else { __pyx_v_use_list = ((int)1); } __pyx_v_object_hook = values[3]; __pyx_v_object_pairs_hook = values[4]; __pyx_v_list_hook = values[5]; __pyx_v_encoding = values[6]; __pyx_v_unicode_errors = values[7]; if (values[8]) { __pyx_v_max_buffer_size = __Pyx_PyInt_As_int(values[8]); if (unlikely((__pyx_v_max_buffer_size == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 487; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } else { __pyx_v_max_buffer_size = ((int)0); } } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("__init__", 0, 0, 9, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 485; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.msgpack.Unpacker.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return -1; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pandas_7msgpack_8Unpacker_4__init__(((struct __pyx_obj_6pandas_7msgpack_Unpacker *)__pyx_v_self), __pyx_v_file_like, __pyx_v_read_size, __pyx_v_use_list, __pyx_v_object_hook, __pyx_v_object_pairs_hook, __pyx_v_list_hook, __pyx_v_encoding, __pyx_v_unicode_errors, __pyx_v_max_buffer_size); /* "pandas/msgpack.pyx":485 * self.buf = NULL * * def __init__(self, file_like=None, Py_ssize_t read_size=0, bint use_list=1, # <<<<<<<<<<<<<< * object object_hook=None, object object_pairs_hook=None, object list_hook=None, * encoding=None, unicode_errors='strict', int max_buffer_size=0, */ /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pandas_7msgpack_8Unpacker_4__init__(struct __pyx_obj_6pandas_7msgpack_Unpacker *__pyx_v_self, PyObject *__pyx_v_file_like, Py_ssize_t __pyx_v_read_size, int __pyx_v_use_list, PyObject *__pyx_v_object_hook, PyObject *__pyx_v_object_pairs_hook, PyObject *__pyx_v_list_hook, PyObject *__pyx_v_encoding, PyObject *__pyx_v_unicode_errors, int __pyx_v_max_buffer_size) { char *__pyx_v_cenc; char *__pyx_v_cerr; int __pyx_r; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; long __pyx_t_3; int __pyx_t_4; long __pyx_t_5; int __pyx_t_6; PyObject *__pyx_t_7 = NULL; char *__pyx_t_8; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__init__", 0); __Pyx_INCREF(__pyx_v_encoding); __Pyx_INCREF(__pyx_v_unicode_errors); /* "pandas/msgpack.pyx":489 * encoding=None, unicode_errors='strict', int max_buffer_size=0, * ): * cdef char *cenc=NULL, *cerr=NULL # <<<<<<<<<<<<<< * * self.file_like = file_like */ __pyx_v_cenc = NULL; __pyx_v_cerr = NULL; /* "pandas/msgpack.pyx":491 * cdef char *cenc=NULL, *cerr=NULL * * self.file_like = file_like # <<<<<<<<<<<<<< * if file_like: * self.file_like_read = file_like.read */ __Pyx_INCREF(__pyx_v_file_like); __Pyx_GIVEREF(__pyx_v_file_like); __Pyx_GOTREF(__pyx_v_self->file_like); __Pyx_DECREF(__pyx_v_self->file_like); __pyx_v_self->file_like = __pyx_v_file_like; /* "pandas/msgpack.pyx":492 * * self.file_like = file_like * if file_like: # <<<<<<<<<<<<<< * self.file_like_read = file_like.read * if not PyCallable_Check(self.file_like_read): */ __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_file_like); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 492; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__pyx_t_1) { /* "pandas/msgpack.pyx":493 * self.file_like = file_like * if file_like: * self.file_like_read = file_like.read # <<<<<<<<<<<<<< * if not PyCallable_Check(self.file_like_read): * raise ValueError("`file_like.read` must be a callable.") */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_file_like, __pyx_n_s_read); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 493; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __Pyx_GOTREF(__pyx_v_self->file_like_read); __Pyx_DECREF(__pyx_v_self->file_like_read); __pyx_v_self->file_like_read = __pyx_t_2; __pyx_t_2 = 0; /* "pandas/msgpack.pyx":494 * if file_like: * self.file_like_read = file_like.read * if not PyCallable_Check(self.file_like_read): # <<<<<<<<<<<<<< * raise ValueError("`file_like.read` must be a callable.") * if not max_buffer_size: */ __pyx_t_2 = __pyx_v_self->file_like_read; __Pyx_INCREF(__pyx_t_2); __pyx_t_1 = ((!(PyCallable_Check(__pyx_t_2) != 0)) != 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_1) { /* "pandas/msgpack.pyx":495 * self.file_like_read = file_like.read * if not PyCallable_Check(self.file_like_read): * raise ValueError("`file_like.read` must be a callable.") # <<<<<<<<<<<<<< * if not max_buffer_size: * max_buffer_size = INT_MAX */ __pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__14, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 495; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 495; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } goto __pyx_L3; } __pyx_L3:; /* "pandas/msgpack.pyx":496 * if not PyCallable_Check(self.file_like_read): * raise ValueError("`file_like.read` must be a callable.") * if not max_buffer_size: # <<<<<<<<<<<<<< * max_buffer_size = INT_MAX * if read_size > max_buffer_size: */ __pyx_t_1 = ((!(__pyx_v_max_buffer_size != 0)) != 0); if (__pyx_t_1) { /* "pandas/msgpack.pyx":497 * raise ValueError("`file_like.read` must be a callable.") * if not max_buffer_size: * max_buffer_size = INT_MAX # <<<<<<<<<<<<<< * if read_size > max_buffer_size: * raise ValueError("read_size should be less or equal to max_buffer_size") */ __pyx_v_max_buffer_size = INT_MAX; goto __pyx_L5; } __pyx_L5:; /* "pandas/msgpack.pyx":498 * if not max_buffer_size: * max_buffer_size = INT_MAX * if read_size > max_buffer_size: # <<<<<<<<<<<<<< * raise ValueError("read_size should be less or equal to max_buffer_size") * if not read_size: */ __pyx_t_1 = ((__pyx_v_read_size > __pyx_v_max_buffer_size) != 0); if (__pyx_t_1) { /* "pandas/msgpack.pyx":499 * max_buffer_size = INT_MAX * if read_size > max_buffer_size: * raise ValueError("read_size should be less or equal to max_buffer_size") # <<<<<<<<<<<<<< * if not read_size: * read_size = min(max_buffer_size, 1024**2) */ __pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__15, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 499; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 499; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } /* "pandas/msgpack.pyx":500 * if read_size > max_buffer_size: * raise ValueError("read_size should be less or equal to max_buffer_size") * if not read_size: # <<<<<<<<<<<<<< * read_size = min(max_buffer_size, 1024**2) * self.max_buffer_size = max_buffer_size */ __pyx_t_1 = ((!(__pyx_v_read_size != 0)) != 0); if (__pyx_t_1) { /* "pandas/msgpack.pyx":501 * raise ValueError("read_size should be less or equal to max_buffer_size") * if not read_size: * read_size = min(max_buffer_size, 1024**2) # <<<<<<<<<<<<<< * self.max_buffer_size = max_buffer_size * self.read_size = read_size */ __pyx_t_3 = 1048576; __pyx_t_4 = __pyx_v_max_buffer_size; if (((__pyx_t_3 < __pyx_t_4) != 0)) { __pyx_t_5 = __pyx_t_3; } else { __pyx_t_5 = __pyx_t_4; } __pyx_v_read_size = __pyx_t_5; goto __pyx_L7; } __pyx_L7:; /* "pandas/msgpack.pyx":502 * if not read_size: * read_size = min(max_buffer_size, 1024**2) * self.max_buffer_size = max_buffer_size # <<<<<<<<<<<<<< * self.read_size = read_size * self.buf = malloc(read_size) */ __pyx_v_self->max_buffer_size = __pyx_v_max_buffer_size; /* "pandas/msgpack.pyx":503 * read_size = min(max_buffer_size, 1024**2) * self.max_buffer_size = max_buffer_size * self.read_size = read_size # <<<<<<<<<<<<<< * self.buf = malloc(read_size) * if self.buf == NULL: */ __pyx_v_self->read_size = __pyx_v_read_size; /* "pandas/msgpack.pyx":504 * self.max_buffer_size = max_buffer_size * self.read_size = read_size * self.buf = malloc(read_size) # <<<<<<<<<<<<<< * if self.buf == NULL: * raise MemoryError("Unable to allocate internal buffer.") */ __pyx_v_self->buf = ((char *)malloc(__pyx_v_read_size)); /* "pandas/msgpack.pyx":505 * self.read_size = read_size * self.buf = malloc(read_size) * if self.buf == NULL: # <<<<<<<<<<<<<< * raise MemoryError("Unable to allocate internal buffer.") * self.buf_size = read_size */ __pyx_t_1 = ((__pyx_v_self->buf == NULL) != 0); if (__pyx_t_1) { /* "pandas/msgpack.pyx":506 * self.buf = malloc(read_size) * if self.buf == NULL: * raise MemoryError("Unable to allocate internal buffer.") # <<<<<<<<<<<<<< * self.buf_size = read_size * self.buf_head = 0 */ __pyx_t_2 = PyObject_Call(__pyx_builtin_MemoryError, __pyx_tuple__16, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 506; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 506; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } /* "pandas/msgpack.pyx":507 * if self.buf == NULL: * raise MemoryError("Unable to allocate internal buffer.") * self.buf_size = read_size # <<<<<<<<<<<<<< * self.buf_head = 0 * self.buf_tail = 0 */ __pyx_v_self->buf_size = __pyx_v_read_size; /* "pandas/msgpack.pyx":508 * raise MemoryError("Unable to allocate internal buffer.") * self.buf_size = read_size * self.buf_head = 0 # <<<<<<<<<<<<<< * self.buf_tail = 0 * */ __pyx_v_self->buf_head = 0; /* "pandas/msgpack.pyx":509 * self.buf_size = read_size * self.buf_head = 0 * self.buf_tail = 0 # <<<<<<<<<<<<<< * * if encoding is not None: */ __pyx_v_self->buf_tail = 0; /* "pandas/msgpack.pyx":511 * self.buf_tail = 0 * * if encoding is not None: # <<<<<<<<<<<<<< * if isinstance(encoding, unicode): * encoding = encoding.encode('ascii') */ __pyx_t_1 = (__pyx_v_encoding != Py_None); __pyx_t_6 = (__pyx_t_1 != 0); if (__pyx_t_6) { /* "pandas/msgpack.pyx":512 * * if encoding is not None: * if isinstance(encoding, unicode): # <<<<<<<<<<<<<< * encoding = encoding.encode('ascii') * self.encoding = encoding */ __pyx_t_6 = PyUnicode_Check(__pyx_v_encoding); __pyx_t_1 = (__pyx_t_6 != 0); if (__pyx_t_1) { /* "pandas/msgpack.pyx":513 * if encoding is not None: * if isinstance(encoding, unicode): * encoding = encoding.encode('ascii') # <<<<<<<<<<<<<< * self.encoding = encoding * cenc = PyBytes_AsString(encoding) */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_encoding, __pyx_n_s_encode); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 513; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_7 = PyObject_Call(__pyx_t_2, __pyx_tuple__17, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 513; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF_SET(__pyx_v_encoding, __pyx_t_7); __pyx_t_7 = 0; goto __pyx_L10; } __pyx_L10:; /* "pandas/msgpack.pyx":514 * if isinstance(encoding, unicode): * encoding = encoding.encode('ascii') * self.encoding = encoding # <<<<<<<<<<<<<< * cenc = PyBytes_AsString(encoding) * */ __Pyx_INCREF(__pyx_v_encoding); __Pyx_GIVEREF(__pyx_v_encoding); __Pyx_GOTREF(__pyx_v_self->encoding); __Pyx_DECREF(__pyx_v_self->encoding); __pyx_v_self->encoding = __pyx_v_encoding; /* "pandas/msgpack.pyx":515 * encoding = encoding.encode('ascii') * self.encoding = encoding * cenc = PyBytes_AsString(encoding) # <<<<<<<<<<<<<< * * if unicode_errors is not None: */ __pyx_t_8 = PyBytes_AsString(__pyx_v_encoding); if (unlikely(__pyx_t_8 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 515; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_cenc = __pyx_t_8; goto __pyx_L9; } __pyx_L9:; /* "pandas/msgpack.pyx":517 * cenc = PyBytes_AsString(encoding) * * if unicode_errors is not None: # <<<<<<<<<<<<<< * if isinstance(unicode_errors, unicode): * unicode_errors = unicode_errors.encode('ascii') */ __pyx_t_1 = (__pyx_v_unicode_errors != Py_None); __pyx_t_6 = (__pyx_t_1 != 0); if (__pyx_t_6) { /* "pandas/msgpack.pyx":518 * * if unicode_errors is not None: * if isinstance(unicode_errors, unicode): # <<<<<<<<<<<<<< * unicode_errors = unicode_errors.encode('ascii') * self.unicode_errors = unicode_errors */ __pyx_t_6 = PyUnicode_Check(__pyx_v_unicode_errors); __pyx_t_1 = (__pyx_t_6 != 0); if (__pyx_t_1) { /* "pandas/msgpack.pyx":519 * if unicode_errors is not None: * if isinstance(unicode_errors, unicode): * unicode_errors = unicode_errors.encode('ascii') # <<<<<<<<<<<<<< * self.unicode_errors = unicode_errors * cerr = PyBytes_AsString(unicode_errors) */ __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_unicode_errors, __pyx_n_s_encode); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 519; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_t_2 = PyObject_Call(__pyx_t_7, __pyx_tuple__18, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 519; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF_SET(__pyx_v_unicode_errors, __pyx_t_2); __pyx_t_2 = 0; goto __pyx_L12; } __pyx_L12:; /* "pandas/msgpack.pyx":520 * if isinstance(unicode_errors, unicode): * unicode_errors = unicode_errors.encode('ascii') * self.unicode_errors = unicode_errors # <<<<<<<<<<<<<< * cerr = PyBytes_AsString(unicode_errors) * */ __Pyx_INCREF(__pyx_v_unicode_errors); __Pyx_GIVEREF(__pyx_v_unicode_errors); __Pyx_GOTREF(__pyx_v_self->unicode_errors); __Pyx_DECREF(__pyx_v_self->unicode_errors); __pyx_v_self->unicode_errors = __pyx_v_unicode_errors; /* "pandas/msgpack.pyx":521 * unicode_errors = unicode_errors.encode('ascii') * self.unicode_errors = unicode_errors * cerr = PyBytes_AsString(unicode_errors) # <<<<<<<<<<<<<< * * init_ctx(&self.ctx, object_hook, object_pairs_hook, list_hook, use_list, cenc, cerr) */ __pyx_t_8 = PyBytes_AsString(__pyx_v_unicode_errors); if (unlikely(__pyx_t_8 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 521; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_cerr = __pyx_t_8; goto __pyx_L11; } __pyx_L11:; /* "pandas/msgpack.pyx":523 * cerr = PyBytes_AsString(unicode_errors) * * init_ctx(&self.ctx, object_hook, object_pairs_hook, list_hook, use_list, cenc, cerr) # <<<<<<<<<<<<<< * * def feed(self, object next_bytes): */ __pyx_t_2 = __pyx_f_6pandas_7msgpack_init_ctx((&__pyx_v_self->ctx), __pyx_v_object_hook, __pyx_v_object_pairs_hook, __pyx_v_list_hook, __pyx_v_use_list, __pyx_v_cenc, __pyx_v_cerr); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 523; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/msgpack.pyx":485 * self.buf = NULL * * def __init__(self, file_like=None, Py_ssize_t read_size=0, bint use_list=1, # <<<<<<<<<<<<<< * object object_hook=None, object object_pairs_hook=None, object list_hook=None, * encoding=None, unicode_errors='strict', int max_buffer_size=0, */ /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_7); __Pyx_AddTraceback("pandas.msgpack.Unpacker.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_XDECREF(__pyx_v_encoding); __Pyx_XDECREF(__pyx_v_unicode_errors); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/msgpack.pyx":525 * init_ctx(&self.ctx, object_hook, object_pairs_hook, list_hook, use_list, cenc, cerr) * * def feed(self, object next_bytes): # <<<<<<<<<<<<<< * """Append `next_bytes` to internal buffer.""" * cdef char* buf */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_7msgpack_8Unpacker_7feed(PyObject *__pyx_v_self, PyObject *__pyx_v_next_bytes); /*proto*/ static char __pyx_doc_6pandas_7msgpack_8Unpacker_6feed[] = "Unpacker.feed(self, next_bytes)\nAppend `next_bytes` to internal buffer."; static PyObject *__pyx_pw_6pandas_7msgpack_8Unpacker_7feed(PyObject *__pyx_v_self, PyObject *__pyx_v_next_bytes) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("feed (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_7msgpack_8Unpacker_6feed(((struct __pyx_obj_6pandas_7msgpack_Unpacker *)__pyx_v_self), ((PyObject *)__pyx_v_next_bytes)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_7msgpack_8Unpacker_6feed(struct __pyx_obj_6pandas_7msgpack_Unpacker *__pyx_v_self, PyObject *__pyx_v_next_bytes) { char *__pyx_v_buf; Py_ssize_t __pyx_v_buf_len; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; int __pyx_t_4; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("feed", 0); /* "pandas/msgpack.pyx":529 * cdef char* buf * cdef Py_ssize_t buf_len * if self.file_like is not None: # <<<<<<<<<<<<<< * raise TypeError( * "unpacker.feed() is not be able to use with `file_like`.") */ __pyx_t_1 = (__pyx_v_self->file_like != Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { /* "pandas/msgpack.pyx":530 * cdef Py_ssize_t buf_len * if self.file_like is not None: * raise TypeError( # <<<<<<<<<<<<<< * "unpacker.feed() is not be able to use with `file_like`.") * PyObject_AsReadBuffer(next_bytes, &buf, &buf_len) */ __pyx_t_3 = PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__19, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 530; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 530; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } /* "pandas/msgpack.pyx":532 * raise TypeError( * "unpacker.feed() is not be able to use with `file_like`.") * PyObject_AsReadBuffer(next_bytes, &buf, &buf_len) # <<<<<<<<<<<<<< * self.append_buffer(buf, buf_len) * */ __pyx_t_4 = PyObject_AsReadBuffer(__pyx_v_next_bytes, ((const void* *)(&__pyx_v_buf)), (&__pyx_v_buf_len)); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 532; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/msgpack.pyx":533 * "unpacker.feed() is not be able to use with `file_like`.") * PyObject_AsReadBuffer(next_bytes, &buf, &buf_len) * self.append_buffer(buf, buf_len) # <<<<<<<<<<<<<< * * cdef append_buffer(self, void* _buf, Py_ssize_t _buf_len): */ __pyx_t_3 = ((struct __pyx_vtabstruct_6pandas_7msgpack_Unpacker *)__pyx_v_self->__pyx_vtab)->append_buffer(__pyx_v_self, __pyx_v_buf, __pyx_v_buf_len); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 533; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/msgpack.pyx":525 * init_ctx(&self.ctx, object_hook, object_pairs_hook, list_hook, use_list, cenc, cerr) * * def feed(self, object next_bytes): # <<<<<<<<<<<<<< * """Append `next_bytes` to internal buffer.""" * cdef char* buf */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("pandas.msgpack.Unpacker.feed", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/msgpack.pyx":535 * self.append_buffer(buf, buf_len) * * cdef append_buffer(self, void* _buf, Py_ssize_t _buf_len): # <<<<<<<<<<<<<< * cdef: * char* buf = self.buf */ static PyObject *__pyx_f_6pandas_7msgpack_8Unpacker_append_buffer(struct __pyx_obj_6pandas_7msgpack_Unpacker *__pyx_v_self, void *__pyx_v__buf, Py_ssize_t __pyx_v__buf_len) { char *__pyx_v_buf; char *__pyx_v_new_buf; size_t __pyx_v_head; size_t __pyx_v_tail; size_t __pyx_v_buf_size; size_t __pyx_v_new_size; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations char *__pyx_t_1; size_t __pyx_t_2; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; size_t __pyx_t_5; size_t __pyx_t_6; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("append_buffer", 0); /* "pandas/msgpack.pyx":537 * cdef append_buffer(self, void* _buf, Py_ssize_t _buf_len): * cdef: * char* buf = self.buf # <<<<<<<<<<<<<< * char* new_buf * size_t head = self.buf_head */ __pyx_t_1 = __pyx_v_self->buf; __pyx_v_buf = __pyx_t_1; /* "pandas/msgpack.pyx":539 * char* buf = self.buf * char* new_buf * size_t head = self.buf_head # <<<<<<<<<<<<<< * size_t tail = self.buf_tail * size_t buf_size = self.buf_size */ __pyx_t_2 = __pyx_v_self->buf_head; __pyx_v_head = __pyx_t_2; /* "pandas/msgpack.pyx":540 * char* new_buf * size_t head = self.buf_head * size_t tail = self.buf_tail # <<<<<<<<<<<<<< * size_t buf_size = self.buf_size * size_t new_size */ __pyx_t_2 = __pyx_v_self->buf_tail; __pyx_v_tail = __pyx_t_2; /* "pandas/msgpack.pyx":541 * size_t head = self.buf_head * size_t tail = self.buf_tail * size_t buf_size = self.buf_size # <<<<<<<<<<<<<< * size_t new_size * */ __pyx_t_2 = __pyx_v_self->buf_size; __pyx_v_buf_size = __pyx_t_2; /* "pandas/msgpack.pyx":544 * size_t new_size * * if tail + _buf_len > buf_size: # <<<<<<<<<<<<<< * if ((tail - head) + _buf_len) <= buf_size: * # move to front. */ __pyx_t_3 = (((__pyx_v_tail + __pyx_v__buf_len) > __pyx_v_buf_size) != 0); if (__pyx_t_3) { /* "pandas/msgpack.pyx":545 * * if tail + _buf_len > buf_size: * if ((tail - head) + _buf_len) <= buf_size: # <<<<<<<<<<<<<< * # move to front. * memmove(buf, buf + head, tail - head) */ __pyx_t_3 = ((((__pyx_v_tail - __pyx_v_head) + __pyx_v__buf_len) <= __pyx_v_buf_size) != 0); if (__pyx_t_3) { /* "pandas/msgpack.pyx":547 * if ((tail - head) + _buf_len) <= buf_size: * # move to front. * memmove(buf, buf + head, tail - head) # <<<<<<<<<<<<<< * tail -= head * head = 0 */ memmove(__pyx_v_buf, (__pyx_v_buf + __pyx_v_head), (__pyx_v_tail - __pyx_v_head)); /* "pandas/msgpack.pyx":548 * # move to front. * memmove(buf, buf + head, tail - head) * tail -= head # <<<<<<<<<<<<<< * head = 0 * else: */ __pyx_v_tail = (__pyx_v_tail - __pyx_v_head); /* "pandas/msgpack.pyx":549 * memmove(buf, buf + head, tail - head) * tail -= head * head = 0 # <<<<<<<<<<<<<< * else: * # expand buffer. */ __pyx_v_head = 0; goto __pyx_L4; } /*else*/ { /* "pandas/msgpack.pyx":552 * else: * # expand buffer. * new_size = (tail-head) + _buf_len # <<<<<<<<<<<<<< * if new_size > self.max_buffer_size: * raise BufferFull */ __pyx_v_new_size = ((__pyx_v_tail - __pyx_v_head) + __pyx_v__buf_len); /* "pandas/msgpack.pyx":553 * # expand buffer. * new_size = (tail-head) + _buf_len * if new_size > self.max_buffer_size: # <<<<<<<<<<<<<< * raise BufferFull * new_size = min(new_size*2, self.max_buffer_size) */ __pyx_t_3 = ((__pyx_v_new_size > __pyx_v_self->max_buffer_size) != 0); if (__pyx_t_3) { /* "pandas/msgpack.pyx":554 * new_size = (tail-head) + _buf_len * if new_size > self.max_buffer_size: * raise BufferFull # <<<<<<<<<<<<<< * new_size = min(new_size*2, self.max_buffer_size) * new_buf = malloc(new_size) */ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_BufferFull); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 554; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 554; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } /* "pandas/msgpack.pyx":555 * if new_size > self.max_buffer_size: * raise BufferFull * new_size = min(new_size*2, self.max_buffer_size) # <<<<<<<<<<<<<< * new_buf = malloc(new_size) * if new_buf == NULL: */ __pyx_t_2 = __pyx_v_self->max_buffer_size; __pyx_t_5 = (__pyx_v_new_size * 2); if (((__pyx_t_2 < __pyx_t_5) != 0)) { __pyx_t_6 = __pyx_t_2; } else { __pyx_t_6 = __pyx_t_5; } __pyx_v_new_size = __pyx_t_6; /* "pandas/msgpack.pyx":556 * raise BufferFull * new_size = min(new_size*2, self.max_buffer_size) * new_buf = malloc(new_size) # <<<<<<<<<<<<<< * if new_buf == NULL: * # self.buf still holds old buffer and will be freed during */ __pyx_v_new_buf = ((char *)malloc(__pyx_v_new_size)); /* "pandas/msgpack.pyx":557 * new_size = min(new_size*2, self.max_buffer_size) * new_buf = malloc(new_size) * if new_buf == NULL: # <<<<<<<<<<<<<< * # self.buf still holds old buffer and will be freed during * # obj destruction */ __pyx_t_3 = ((__pyx_v_new_buf == NULL) != 0); if (__pyx_t_3) { /* "pandas/msgpack.pyx":560 * # self.buf still holds old buffer and will be freed during * # obj destruction * raise MemoryError("Unable to enlarge internal buffer.") # <<<<<<<<<<<<<< * memcpy(new_buf, buf + head, tail - head) * free(buf) */ __pyx_t_4 = PyObject_Call(__pyx_builtin_MemoryError, __pyx_tuple__20, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 560; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 560; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } /* "pandas/msgpack.pyx":561 * # obj destruction * raise MemoryError("Unable to enlarge internal buffer.") * memcpy(new_buf, buf + head, tail - head) # <<<<<<<<<<<<<< * free(buf) * */ memcpy(__pyx_v_new_buf, (__pyx_v_buf + __pyx_v_head), (__pyx_v_tail - __pyx_v_head)); /* "pandas/msgpack.pyx":562 * raise MemoryError("Unable to enlarge internal buffer.") * memcpy(new_buf, buf + head, tail - head) * free(buf) # <<<<<<<<<<<<<< * * buf = new_buf */ free(__pyx_v_buf); /* "pandas/msgpack.pyx":564 * free(buf) * * buf = new_buf # <<<<<<<<<<<<<< * buf_size = new_size * tail -= head */ __pyx_v_buf = __pyx_v_new_buf; /* "pandas/msgpack.pyx":565 * * buf = new_buf * buf_size = new_size # <<<<<<<<<<<<<< * tail -= head * head = 0 */ __pyx_v_buf_size = __pyx_v_new_size; /* "pandas/msgpack.pyx":566 * buf = new_buf * buf_size = new_size * tail -= head # <<<<<<<<<<<<<< * head = 0 * */ __pyx_v_tail = (__pyx_v_tail - __pyx_v_head); /* "pandas/msgpack.pyx":567 * buf_size = new_size * tail -= head * head = 0 # <<<<<<<<<<<<<< * * memcpy(buf + tail, (_buf), _buf_len) */ __pyx_v_head = 0; } __pyx_L4:; goto __pyx_L3; } __pyx_L3:; /* "pandas/msgpack.pyx":569 * head = 0 * * memcpy(buf + tail, (_buf), _buf_len) # <<<<<<<<<<<<<< * self.buf = buf * self.buf_head = head */ memcpy((__pyx_v_buf + __pyx_v_tail), ((char *)__pyx_v__buf), __pyx_v__buf_len); /* "pandas/msgpack.pyx":570 * * memcpy(buf + tail, (_buf), _buf_len) * self.buf = buf # <<<<<<<<<<<<<< * self.buf_head = head * self.buf_size = buf_size */ __pyx_v_self->buf = __pyx_v_buf; /* "pandas/msgpack.pyx":571 * memcpy(buf + tail, (_buf), _buf_len) * self.buf = buf * self.buf_head = head # <<<<<<<<<<<<<< * self.buf_size = buf_size * self.buf_tail = tail + _buf_len */ __pyx_v_self->buf_head = __pyx_v_head; /* "pandas/msgpack.pyx":572 * self.buf = buf * self.buf_head = head * self.buf_size = buf_size # <<<<<<<<<<<<<< * self.buf_tail = tail + _buf_len * */ __pyx_v_self->buf_size = __pyx_v_buf_size; /* "pandas/msgpack.pyx":573 * self.buf_head = head * self.buf_size = buf_size * self.buf_tail = tail + _buf_len # <<<<<<<<<<<<<< * * cdef read_from_file(self): */ __pyx_v_self->buf_tail = (__pyx_v_tail + __pyx_v__buf_len); /* "pandas/msgpack.pyx":535 * self.append_buffer(buf, buf_len) * * cdef append_buffer(self, void* _buf, Py_ssize_t _buf_len): # <<<<<<<<<<<<<< * cdef: * char* buf = self.buf */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("pandas.msgpack.Unpacker.append_buffer", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/msgpack.pyx":575 * self.buf_tail = tail + _buf_len * * cdef read_from_file(self): # <<<<<<<<<<<<<< * next_bytes = self.file_like_read( * min(self.read_size, */ static PyObject *__pyx_f_6pandas_7msgpack_8Unpacker_read_from_file(struct __pyx_obj_6pandas_7msgpack_Unpacker *__pyx_v_self) { PyObject *__pyx_v_next_bytes = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations size_t __pyx_t_1; Py_ssize_t __pyx_t_2; size_t __pyx_t_3; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; int __pyx_t_6; char *__pyx_t_7; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("read_from_file", 0); /* "pandas/msgpack.pyx":578 * next_bytes = self.file_like_read( * min(self.read_size, * self.max_buffer_size - (self.buf_tail - self.buf_head) # <<<<<<<<<<<<<< * )) * if next_bytes: */ __pyx_t_1 = (__pyx_v_self->max_buffer_size - (__pyx_v_self->buf_tail - __pyx_v_self->buf_head)); /* "pandas/msgpack.pyx":577 * cdef read_from_file(self): * next_bytes = self.file_like_read( * min(self.read_size, # <<<<<<<<<<<<<< * self.max_buffer_size - (self.buf_tail - self.buf_head) * )) */ __pyx_t_2 = __pyx_v_self->read_size; /* "pandas/msgpack.pyx":578 * next_bytes = self.file_like_read( * min(self.read_size, * self.max_buffer_size - (self.buf_tail - self.buf_head) # <<<<<<<<<<<<<< * )) * if next_bytes: */ if (((__pyx_t_1 < __pyx_t_2) != 0)) { __pyx_t_3 = __pyx_t_1; } else { __pyx_t_3 = __pyx_t_2; } __pyx_t_4 = __Pyx_PyInt_FromSize_t(__pyx_t_3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 578; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); /* "pandas/msgpack.pyx":576 * * cdef read_from_file(self): * next_bytes = self.file_like_read( # <<<<<<<<<<<<<< * min(self.read_size, * self.max_buffer_size - (self.buf_tail - self.buf_head) */ __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 576; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyObject_Call(__pyx_v_self->file_like_read, __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 576; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_v_next_bytes = __pyx_t_4; __pyx_t_4 = 0; /* "pandas/msgpack.pyx":580 * self.max_buffer_size - (self.buf_tail - self.buf_head) * )) * if next_bytes: # <<<<<<<<<<<<<< * self.append_buffer(PyBytes_AsString(next_bytes), PyBytes_Size(next_bytes)) * else: */ __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_next_bytes); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 580; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__pyx_t_6) { /* "pandas/msgpack.pyx":581 * )) * if next_bytes: * self.append_buffer(PyBytes_AsString(next_bytes), PyBytes_Size(next_bytes)) # <<<<<<<<<<<<<< * else: * self.file_like = None */ __pyx_t_7 = PyBytes_AsString(__pyx_v_next_bytes); if (unlikely(__pyx_t_7 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 581; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_2 = PyBytes_Size(__pyx_v_next_bytes); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 581; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_4 = ((struct __pyx_vtabstruct_6pandas_7msgpack_Unpacker *)__pyx_v_self->__pyx_vtab)->append_buffer(__pyx_v_self, __pyx_t_7, __pyx_t_2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 581; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; goto __pyx_L3; } /*else*/ { /* "pandas/msgpack.pyx":583 * self.append_buffer(PyBytes_AsString(next_bytes), PyBytes_Size(next_bytes)) * else: * self.file_like = None # <<<<<<<<<<<<<< * * cdef object _unpack(self, execute_fn execute, object write_bytes, bint iter=0): */ __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->file_like); __Pyx_DECREF(__pyx_v_self->file_like); __pyx_v_self->file_like = Py_None; } __pyx_L3:; /* "pandas/msgpack.pyx":575 * self.buf_tail = tail + _buf_len * * cdef read_from_file(self): # <<<<<<<<<<<<<< * next_bytes = self.file_like_read( * min(self.read_size, */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("pandas.msgpack.Unpacker.read_from_file", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_next_bytes); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/msgpack.pyx":585 * self.file_like = None * * cdef object _unpack(self, execute_fn execute, object write_bytes, bint iter=0): # <<<<<<<<<<<<<< * cdef int ret * cdef object obj */ static PyObject *__pyx_f_6pandas_7msgpack_8Unpacker__unpack(struct __pyx_obj_6pandas_7msgpack_Unpacker *__pyx_v_self, execute_fn __pyx_v_execute, PyObject *__pyx_v_write_bytes, struct __pyx_opt_args_6pandas_7msgpack_8Unpacker__unpack *__pyx_optional_args) { int __pyx_v_iter = ((int)0); int __pyx_v_ret; PyObject *__pyx_v_obj = 0; size_t __pyx_v_prev_head; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations size_t __pyx_t_1; int __pyx_t_2; int __pyx_t_3; int __pyx_t_4; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_unpack", 0); if (__pyx_optional_args) { if (__pyx_optional_args->__pyx_n > 0) { __pyx_v_iter = __pyx_optional_args->iter; } } /* "pandas/msgpack.pyx":589 * cdef object obj * cdef size_t prev_head * while 1: # <<<<<<<<<<<<<< * prev_head = self.buf_head * ret = execute(&self.ctx, self.buf, self.buf_tail, &self.buf_head) */ while (1) { /* "pandas/msgpack.pyx":590 * cdef size_t prev_head * while 1: * prev_head = self.buf_head # <<<<<<<<<<<<<< * ret = execute(&self.ctx, self.buf, self.buf_tail, &self.buf_head) * if write_bytes is not None: */ __pyx_t_1 = __pyx_v_self->buf_head; __pyx_v_prev_head = __pyx_t_1; /* "pandas/msgpack.pyx":591 * while 1: * prev_head = self.buf_head * ret = execute(&self.ctx, self.buf, self.buf_tail, &self.buf_head) # <<<<<<<<<<<<<< * if write_bytes is not None: * write_bytes(PyBytes_FromStringAndSize(self.buf + prev_head, self.buf_head - prev_head)) */ __pyx_t_2 = __pyx_v_execute((&__pyx_v_self->ctx), __pyx_v_self->buf, __pyx_v_self->buf_tail, (&__pyx_v_self->buf_head)); if (unlikely(__pyx_t_2 == -1 && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 591; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_ret = __pyx_t_2; /* "pandas/msgpack.pyx":592 * prev_head = self.buf_head * ret = execute(&self.ctx, self.buf, self.buf_tail, &self.buf_head) * if write_bytes is not None: # <<<<<<<<<<<<<< * write_bytes(PyBytes_FromStringAndSize(self.buf + prev_head, self.buf_head - prev_head)) * */ __pyx_t_3 = (__pyx_v_write_bytes != Py_None); __pyx_t_4 = (__pyx_t_3 != 0); if (__pyx_t_4) { /* "pandas/msgpack.pyx":593 * ret = execute(&self.ctx, self.buf, self.buf_tail, &self.buf_head) * if write_bytes is not None: * write_bytes(PyBytes_FromStringAndSize(self.buf + prev_head, self.buf_head - prev_head)) # <<<<<<<<<<<<<< * * if ret == 1: */ __pyx_t_5 = PyBytes_FromStringAndSize((__pyx_v_self->buf + __pyx_v_prev_head), (__pyx_v_self->buf_head - __pyx_v_prev_head)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 593; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 593; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyObject_Call(__pyx_v_write_bytes, __pyx_t_6, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 593; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; goto __pyx_L5; } __pyx_L5:; /* "pandas/msgpack.pyx":599 * template_init(&self.ctx) * return obj * elif ret == 0: # <<<<<<<<<<<<<< * if self.file_like is not None: * self.read_from_file() */ switch (__pyx_v_ret) { /* "pandas/msgpack.pyx":595 * write_bytes(PyBytes_FromStringAndSize(self.buf + prev_head, self.buf_head - prev_head)) * * if ret == 1: # <<<<<<<<<<<<<< * obj = template_data(&self.ctx) * template_init(&self.ctx) */ case 1: /* "pandas/msgpack.pyx":596 * * if ret == 1: * obj = template_data(&self.ctx) # <<<<<<<<<<<<<< * template_init(&self.ctx) * return obj */ __pyx_t_5 = template_data((&__pyx_v_self->ctx)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 596; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_v_obj = __pyx_t_5; __pyx_t_5 = 0; /* "pandas/msgpack.pyx":597 * if ret == 1: * obj = template_data(&self.ctx) * template_init(&self.ctx) # <<<<<<<<<<<<<< * return obj * elif ret == 0: */ template_init((&__pyx_v_self->ctx)); /* "pandas/msgpack.pyx":598 * obj = template_data(&self.ctx) * template_init(&self.ctx) * return obj # <<<<<<<<<<<<<< * elif ret == 0: * if self.file_like is not None: */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_obj); __pyx_r = __pyx_v_obj; goto __pyx_L0; break; /* "pandas/msgpack.pyx":599 * template_init(&self.ctx) * return obj * elif ret == 0: # <<<<<<<<<<<<<< * if self.file_like is not None: * self.read_from_file() */ case 0: /* "pandas/msgpack.pyx":600 * return obj * elif ret == 0: * if self.file_like is not None: # <<<<<<<<<<<<<< * self.read_from_file() * continue */ __pyx_t_4 = (__pyx_v_self->file_like != Py_None); __pyx_t_3 = (__pyx_t_4 != 0); if (__pyx_t_3) { /* "pandas/msgpack.pyx":601 * elif ret == 0: * if self.file_like is not None: * self.read_from_file() # <<<<<<<<<<<<<< * continue * if iter: */ __pyx_t_5 = ((struct __pyx_vtabstruct_6pandas_7msgpack_Unpacker *)__pyx_v_self->__pyx_vtab)->read_from_file(__pyx_v_self); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 601; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "pandas/msgpack.pyx":602 * if self.file_like is not None: * self.read_from_file() * continue # <<<<<<<<<<<<<< * if iter: * raise StopIteration("No more data to unpack.") */ goto __pyx_L3_continue; } /* "pandas/msgpack.pyx":603 * self.read_from_file() * continue * if iter: # <<<<<<<<<<<<<< * raise StopIteration("No more data to unpack.") * else: */ __pyx_t_3 = (__pyx_v_iter != 0); if (__pyx_t_3) { /* "pandas/msgpack.pyx":604 * continue * if iter: * raise StopIteration("No more data to unpack.") # <<<<<<<<<<<<<< * else: * raise OutOfData("No more data to unpack.") */ __pyx_t_5 = PyObject_Call(__pyx_builtin_StopIteration, __pyx_tuple__21, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 604; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_Raise(__pyx_t_5, 0, 0, 0); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 604; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } /*else*/ { /* "pandas/msgpack.pyx":606 * raise StopIteration("No more data to unpack.") * else: * raise OutOfData("No more data to unpack.") # <<<<<<<<<<<<<< * else: * raise ValueError("Unpack failed: error = %d" % (ret,)) */ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_OutOfData); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 606; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = PyObject_Call(__pyx_t_5, __pyx_tuple__22, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 606; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_Raise(__pyx_t_6, 0, 0, 0); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 606; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } break; default: /* "pandas/msgpack.pyx":608 * raise OutOfData("No more data to unpack.") * else: * raise ValueError("Unpack failed: error = %d" % (ret,)) # <<<<<<<<<<<<<< * * def read_bytes(self, Py_ssize_t nbytes): */ __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_ret); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 608; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 608; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = __Pyx_PyString_Format(__pyx_kp_s_Unpack_failed_error_d, __pyx_t_5); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 608; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 608; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyObject_Call(__pyx_builtin_ValueError, __pyx_t_5, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 608; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_Raise(__pyx_t_6, 0, 0, 0); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 608; __pyx_clineno = __LINE__; goto __pyx_L1_error;} break; } __pyx_L3_continue:; } /* "pandas/msgpack.pyx":585 * self.file_like = None * * cdef object _unpack(self, execute_fn execute, object write_bytes, bint iter=0): # <<<<<<<<<<<<<< * cdef int ret * cdef object obj */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("pandas.msgpack.Unpacker._unpack", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_obj); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/msgpack.pyx":610 * raise ValueError("Unpack failed: error = %d" % (ret,)) * * def read_bytes(self, Py_ssize_t nbytes): # <<<<<<<<<<<<<< * """read a specified number of raw bytes from the stream""" * cdef size_t nread */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_7msgpack_8Unpacker_9read_bytes(PyObject *__pyx_v_self, PyObject *__pyx_arg_nbytes); /*proto*/ static char __pyx_doc_6pandas_7msgpack_8Unpacker_8read_bytes[] = "Unpacker.read_bytes(self, Py_ssize_t nbytes)\nread a specified number of raw bytes from the stream"; static PyObject *__pyx_pw_6pandas_7msgpack_8Unpacker_9read_bytes(PyObject *__pyx_v_self, PyObject *__pyx_arg_nbytes) { Py_ssize_t __pyx_v_nbytes; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("read_bytes (wrapper)", 0); assert(__pyx_arg_nbytes); { __pyx_v_nbytes = __Pyx_PyIndex_AsSsize_t(__pyx_arg_nbytes); if (unlikely((__pyx_v_nbytes == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 610; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; __Pyx_AddTraceback("pandas.msgpack.Unpacker.read_bytes", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pandas_7msgpack_8Unpacker_8read_bytes(((struct __pyx_obj_6pandas_7msgpack_Unpacker *)__pyx_v_self), ((Py_ssize_t)__pyx_v_nbytes)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_7msgpack_8Unpacker_8read_bytes(struct __pyx_obj_6pandas_7msgpack_Unpacker *__pyx_v_self, Py_ssize_t __pyx_v_nbytes) { size_t __pyx_v_nread; PyObject *__pyx_v_ret = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; size_t __pyx_t_2; size_t __pyx_t_3; PyObject *__pyx_t_4 = NULL; int __pyx_t_5; int __pyx_t_6; int __pyx_t_7; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("read_bytes", 0); /* "pandas/msgpack.pyx":613 * """read a specified number of raw bytes from the stream""" * cdef size_t nread * nread = min(self.buf_tail - self.buf_head, nbytes) # <<<<<<<<<<<<<< * ret = PyBytes_FromStringAndSize(self.buf + self.buf_head, nread) * self.buf_head += nread */ __pyx_t_1 = __pyx_v_nbytes; __pyx_t_2 = (__pyx_v_self->buf_tail - __pyx_v_self->buf_head); if (((__pyx_t_1 < __pyx_t_2) != 0)) { __pyx_t_3 = __pyx_t_1; } else { __pyx_t_3 = __pyx_t_2; } __pyx_v_nread = __pyx_t_3; /* "pandas/msgpack.pyx":614 * cdef size_t nread * nread = min(self.buf_tail - self.buf_head, nbytes) * ret = PyBytes_FromStringAndSize(self.buf + self.buf_head, nread) # <<<<<<<<<<<<<< * self.buf_head += nread * if len(ret) < nbytes and self.file_like is not None: */ __pyx_t_4 = PyBytes_FromStringAndSize((__pyx_v_self->buf + __pyx_v_self->buf_head), __pyx_v_nread); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 614; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_v_ret = __pyx_t_4; __pyx_t_4 = 0; /* "pandas/msgpack.pyx":615 * nread = min(self.buf_tail - self.buf_head, nbytes) * ret = PyBytes_FromStringAndSize(self.buf + self.buf_head, nread) * self.buf_head += nread # <<<<<<<<<<<<<< * if len(ret) < nbytes and self.file_like is not None: * ret += self.file_like.read(nbytes - len(ret)) */ __pyx_v_self->buf_head = (__pyx_v_self->buf_head + __pyx_v_nread); /* "pandas/msgpack.pyx":616 * ret = PyBytes_FromStringAndSize(self.buf + self.buf_head, nread) * self.buf_head += nread * if len(ret) < nbytes and self.file_like is not None: # <<<<<<<<<<<<<< * ret += self.file_like.read(nbytes - len(ret)) * return ret */ __pyx_t_1 = PyObject_Length(__pyx_v_ret); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 616; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_5 = ((__pyx_t_1 < __pyx_v_nbytes) != 0); if (__pyx_t_5) { __pyx_t_6 = (__pyx_v_self->file_like != Py_None); __pyx_t_7 = (__pyx_t_6 != 0); } else { __pyx_t_7 = __pyx_t_5; } if (__pyx_t_7) { /* "pandas/msgpack.pyx":617 * self.buf_head += nread * if len(ret) < nbytes and self.file_like is not None: * ret += self.file_like.read(nbytes - len(ret)) # <<<<<<<<<<<<<< * return ret * */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->file_like, __pyx_n_s_read); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 617; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_1 = PyObject_Length(__pyx_v_ret); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 617; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_8 = PyInt_FromSsize_t((__pyx_v_nbytes - __pyx_t_1)); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 617; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 617; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_8); __Pyx_GIVEREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_8 = PyObject_Call(__pyx_t_4, __pyx_t_9, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 617; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_9 = PyNumber_InPlaceAdd(__pyx_v_ret, __pyx_t_8); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 617; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (!(likely(PyBytes_CheckExact(__pyx_t_9))||((__pyx_t_9) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_t_9)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 617; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF_SET(__pyx_v_ret, ((PyObject*)__pyx_t_9)); __pyx_t_9 = 0; goto __pyx_L3; } __pyx_L3:; /* "pandas/msgpack.pyx":618 * if len(ret) < nbytes and self.file_like is not None: * ret += self.file_like.read(nbytes - len(ret)) * return ret # <<<<<<<<<<<<<< * * def unpack(self, object write_bytes=None): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_ret); __pyx_r = __pyx_v_ret; goto __pyx_L0; /* "pandas/msgpack.pyx":610 * raise ValueError("Unpack failed: error = %d" % (ret,)) * * def read_bytes(self, Py_ssize_t nbytes): # <<<<<<<<<<<<<< * """read a specified number of raw bytes from the stream""" * cdef size_t nread */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); __Pyx_AddTraceback("pandas.msgpack.Unpacker.read_bytes", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_ret); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/msgpack.pyx":620 * return ret * * def unpack(self, object write_bytes=None): # <<<<<<<<<<<<<< * """ * unpack one object */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_7msgpack_8Unpacker_11unpack(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6pandas_7msgpack_8Unpacker_10unpack[] = "Unpacker.unpack(self, write_bytes=None)\n\n unpack one object\n\n If write_bytes is not None, it will be called with parts of the raw\n message as it is unpacked.\n\n Raises `OutOfData` when there are no more bytes to unpack.\n "; static PyObject *__pyx_pw_6pandas_7msgpack_8Unpacker_11unpack(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_write_bytes = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("unpack (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_write_bytes,0}; PyObject* values[1] = {0}; values[0] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_write_bytes); if (value) { values[0] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "unpack") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 620; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_write_bytes = values[0]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("unpack", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 620; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.msgpack.Unpacker.unpack", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pandas_7msgpack_8Unpacker_10unpack(((struct __pyx_obj_6pandas_7msgpack_Unpacker *)__pyx_v_self), __pyx_v_write_bytes); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_7msgpack_8Unpacker_10unpack(struct __pyx_obj_6pandas_7msgpack_Unpacker *__pyx_v_self, PyObject *__pyx_v_write_bytes) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("unpack", 0); /* "pandas/msgpack.pyx":629 * Raises `OutOfData` when there are no more bytes to unpack. * """ * return self._unpack(template_construct, write_bytes) # <<<<<<<<<<<<<< * * def skip(self, object write_bytes=None): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = ((struct __pyx_vtabstruct_6pandas_7msgpack_Unpacker *)__pyx_v_self->__pyx_vtab)->_unpack(__pyx_v_self, template_construct, __pyx_v_write_bytes, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 629; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "pandas/msgpack.pyx":620 * return ret * * def unpack(self, object write_bytes=None): # <<<<<<<<<<<<<< * """ * unpack one object */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas.msgpack.Unpacker.unpack", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/msgpack.pyx":631 * return self._unpack(template_construct, write_bytes) * * def skip(self, object write_bytes=None): # <<<<<<<<<<<<<< * """ * read and ignore one object, returning None */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_7msgpack_8Unpacker_13skip(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6pandas_7msgpack_8Unpacker_12skip[] = "Unpacker.skip(self, write_bytes=None)\n\n read and ignore one object, returning None\n\n If write_bytes is not None, it will be called with parts of the raw\n message as it is unpacked.\n\n Raises `OutOfData` when there are no more bytes to unpack.\n "; static PyObject *__pyx_pw_6pandas_7msgpack_8Unpacker_13skip(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_write_bytes = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("skip (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_write_bytes,0}; PyObject* values[1] = {0}; values[0] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_write_bytes); if (value) { values[0] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "skip") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 631; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_write_bytes = values[0]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("skip", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 631; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.msgpack.Unpacker.skip", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pandas_7msgpack_8Unpacker_12skip(((struct __pyx_obj_6pandas_7msgpack_Unpacker *)__pyx_v_self), __pyx_v_write_bytes); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_7msgpack_8Unpacker_12skip(struct __pyx_obj_6pandas_7msgpack_Unpacker *__pyx_v_self, PyObject *__pyx_v_write_bytes) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("skip", 0); /* "pandas/msgpack.pyx":640 * Raises `OutOfData` when there are no more bytes to unpack. * """ * return self._unpack(template_skip, write_bytes) # <<<<<<<<<<<<<< * * def read_array_header(self, object write_bytes=None): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = ((struct __pyx_vtabstruct_6pandas_7msgpack_Unpacker *)__pyx_v_self->__pyx_vtab)->_unpack(__pyx_v_self, template_skip, __pyx_v_write_bytes, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 640; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "pandas/msgpack.pyx":631 * return self._unpack(template_construct, write_bytes) * * def skip(self, object write_bytes=None): # <<<<<<<<<<<<<< * """ * read and ignore one object, returning None */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas.msgpack.Unpacker.skip", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/msgpack.pyx":642 * return self._unpack(template_skip, write_bytes) * * def read_array_header(self, object write_bytes=None): # <<<<<<<<<<<<<< * """assuming the next object is an array, return its size n, such that * the next n unpack() calls will iterate over its contents. */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_7msgpack_8Unpacker_15read_array_header(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6pandas_7msgpack_8Unpacker_14read_array_header[] = "Unpacker.read_array_header(self, write_bytes=None)\nassuming the next object is an array, return its size n, such that\n the next n unpack() calls will iterate over its contents.\n\n Raises `OutOfData` when there are no more bytes to unpack.\n "; static PyObject *__pyx_pw_6pandas_7msgpack_8Unpacker_15read_array_header(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_write_bytes = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("read_array_header (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_write_bytes,0}; PyObject* values[1] = {0}; values[0] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_write_bytes); if (value) { values[0] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "read_array_header") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 642; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_write_bytes = values[0]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("read_array_header", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 642; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.msgpack.Unpacker.read_array_header", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pandas_7msgpack_8Unpacker_14read_array_header(((struct __pyx_obj_6pandas_7msgpack_Unpacker *)__pyx_v_self), __pyx_v_write_bytes); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_7msgpack_8Unpacker_14read_array_header(struct __pyx_obj_6pandas_7msgpack_Unpacker *__pyx_v_self, PyObject *__pyx_v_write_bytes) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("read_array_header", 0); /* "pandas/msgpack.pyx":648 * Raises `OutOfData` when there are no more bytes to unpack. * """ * return self._unpack(read_array_header, write_bytes) # <<<<<<<<<<<<<< * * def read_map_header(self, object write_bytes=None): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = ((struct __pyx_vtabstruct_6pandas_7msgpack_Unpacker *)__pyx_v_self->__pyx_vtab)->_unpack(__pyx_v_self, read_array_header, __pyx_v_write_bytes, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 648; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "pandas/msgpack.pyx":642 * return self._unpack(template_skip, write_bytes) * * def read_array_header(self, object write_bytes=None): # <<<<<<<<<<<<<< * """assuming the next object is an array, return its size n, such that * the next n unpack() calls will iterate over its contents. */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas.msgpack.Unpacker.read_array_header", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/msgpack.pyx":650 * return self._unpack(read_array_header, write_bytes) * * def read_map_header(self, object write_bytes=None): # <<<<<<<<<<<<<< * """assuming the next object is a map, return its size n, such that the * next n * 2 unpack() calls will iterate over its key-value pairs. */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_7msgpack_8Unpacker_17read_map_header(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6pandas_7msgpack_8Unpacker_16read_map_header[] = "Unpacker.read_map_header(self, write_bytes=None)\nassuming the next object is a map, return its size n, such that the\n next n * 2 unpack() calls will iterate over its key-value pairs.\n\n Raises `OutOfData` when there are no more bytes to unpack.\n "; static PyObject *__pyx_pw_6pandas_7msgpack_8Unpacker_17read_map_header(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_write_bytes = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("read_map_header (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_write_bytes,0}; PyObject* values[1] = {0}; values[0] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_write_bytes); if (value) { values[0] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "read_map_header") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 650; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_write_bytes = values[0]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("read_map_header", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 650; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.msgpack.Unpacker.read_map_header", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pandas_7msgpack_8Unpacker_16read_map_header(((struct __pyx_obj_6pandas_7msgpack_Unpacker *)__pyx_v_self), __pyx_v_write_bytes); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_7msgpack_8Unpacker_16read_map_header(struct __pyx_obj_6pandas_7msgpack_Unpacker *__pyx_v_self, PyObject *__pyx_v_write_bytes) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("read_map_header", 0); /* "pandas/msgpack.pyx":656 * Raises `OutOfData` when there are no more bytes to unpack. * """ * return self._unpack(read_map_header, write_bytes) # <<<<<<<<<<<<<< * * def __iter__(self): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = ((struct __pyx_vtabstruct_6pandas_7msgpack_Unpacker *)__pyx_v_self->__pyx_vtab)->_unpack(__pyx_v_self, read_map_header, __pyx_v_write_bytes, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 656; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "pandas/msgpack.pyx":650 * return self._unpack(read_array_header, write_bytes) * * def read_map_header(self, object write_bytes=None): # <<<<<<<<<<<<<< * """assuming the next object is a map, return its size n, such that the * next n * 2 unpack() calls will iterate over its key-value pairs. */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas.msgpack.Unpacker.read_map_header", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/msgpack.pyx":658 * return self._unpack(read_map_header, write_bytes) * * def __iter__(self): # <<<<<<<<<<<<<< * return self * */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_7msgpack_8Unpacker_19__iter__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6pandas_7msgpack_8Unpacker_19__iter__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__iter__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_7msgpack_8Unpacker_18__iter__(((struct __pyx_obj_6pandas_7msgpack_Unpacker *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_7msgpack_8Unpacker_18__iter__(struct __pyx_obj_6pandas_7msgpack_Unpacker *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__iter__", 0); /* "pandas/msgpack.pyx":659 * * def __iter__(self): * return self # <<<<<<<<<<<<<< * * def __next__(self): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_self)); __pyx_r = ((PyObject *)__pyx_v_self); goto __pyx_L0; /* "pandas/msgpack.pyx":658 * return self._unpack(read_map_header, write_bytes) * * def __iter__(self): # <<<<<<<<<<<<<< * return self * */ /* function exit code */ __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/msgpack.pyx":661 * return self * * def __next__(self): # <<<<<<<<<<<<<< * return self._unpack(template_construct, None, 1) * */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_7msgpack_8Unpacker_21__next__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6pandas_7msgpack_8Unpacker_21__next__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__next__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_7msgpack_8Unpacker_20__next__(((struct __pyx_obj_6pandas_7msgpack_Unpacker *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_7msgpack_8Unpacker_20__next__(struct __pyx_obj_6pandas_7msgpack_Unpacker *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; struct __pyx_opt_args_6pandas_7msgpack_8Unpacker__unpack __pyx_t_2; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__next__", 0); /* "pandas/msgpack.pyx":662 * * def __next__(self): * return self._unpack(template_construct, None, 1) # <<<<<<<<<<<<<< * * # for debug. */ __Pyx_XDECREF(__pyx_r); __pyx_t_2.__pyx_n = 1; __pyx_t_2.iter = 1; __pyx_t_1 = ((struct __pyx_vtabstruct_6pandas_7msgpack_Unpacker *)__pyx_v_self->__pyx_vtab)->_unpack(__pyx_v_self, template_construct, Py_None, &__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 662; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "pandas/msgpack.pyx":661 * return self * * def __next__(self): # <<<<<<<<<<<<<< * return self._unpack(template_construct, None, 1) * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas.msgpack.Unpacker.__next__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "numpy.pxd":196 * # 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 fullfill 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_copy_shape; 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_v_hasfields; int __pyx_r; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; int __pyx_t_5; int __pyx_t_6; int __pyx_t_7; PyObject *__pyx_t_8 = NULL; char *__pyx_t_9; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__getbuffer__", 0); if (__pyx_v_info != NULL) { __pyx_v_info->obj = Py_None; __Pyx_INCREF(Py_None); __Pyx_GIVEREF(__pyx_v_info->obj); } /* "numpy.pxd":202 * # of flags * * if info == NULL: return # <<<<<<<<<<<<<< * * cdef int copy_shape, i, ndim */ __pyx_t_1 = ((__pyx_v_info == NULL) != 0); if (__pyx_t_1) { __pyx_r = 0; goto __pyx_L0; } /* "numpy.pxd":205 * * cdef int copy_shape, i, ndim * cdef int endian_detector = 1 # <<<<<<<<<<<<<< * cdef bint little_endian = ((&endian_detector)[0] != 0) * */ __pyx_v_endian_detector = 1; /* "numpy.pxd":206 * cdef int copy_shape, 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); /* "numpy.pxd":208 * cdef bint little_endian = ((&endian_detector)[0] != 0) * * ndim = PyArray_NDIM(self) # <<<<<<<<<<<<<< * * if sizeof(npy_intp) != sizeof(Py_ssize_t): */ __pyx_v_ndim = PyArray_NDIM(__pyx_v_self); /* "numpy.pxd":210 * ndim = PyArray_NDIM(self) * * if sizeof(npy_intp) != sizeof(Py_ssize_t): # <<<<<<<<<<<<<< * copy_shape = 1 * else: */ __pyx_t_1 = (((sizeof(npy_intp)) != (sizeof(Py_ssize_t))) != 0); if (__pyx_t_1) { /* "numpy.pxd":211 * * if sizeof(npy_intp) != sizeof(Py_ssize_t): * copy_shape = 1 # <<<<<<<<<<<<<< * else: * copy_shape = 0 */ __pyx_v_copy_shape = 1; goto __pyx_L4; } /*else*/ { /* "numpy.pxd":213 * copy_shape = 1 * else: * copy_shape = 0 # <<<<<<<<<<<<<< * * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) */ __pyx_v_copy_shape = 0; } __pyx_L4:; /* "numpy.pxd":215 * copy_shape = 0 * * 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_1 = (((__pyx_v_flags & PyBUF_C_CONTIGUOUS) == PyBUF_C_CONTIGUOUS) != 0); if (__pyx_t_1) { /* "numpy.pxd":216 * * 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_3 = __pyx_t_2; } else { __pyx_t_3 = __pyx_t_1; } if (__pyx_t_3) { /* "numpy.pxd":217 * 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_4 = PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__23, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 217; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 217; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } /* "numpy.pxd":219 * 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_3 = (((__pyx_v_flags & PyBUF_F_CONTIGUOUS) == PyBUF_F_CONTIGUOUS) != 0); if (__pyx_t_3) { /* "numpy.pxd":220 * * 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_1 = ((!(PyArray_CHKFLAGS(__pyx_v_self, NPY_F_CONTIGUOUS) != 0)) != 0); __pyx_t_2 = __pyx_t_1; } else { __pyx_t_2 = __pyx_t_3; } if (__pyx_t_2) { /* "numpy.pxd":221 * 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_4 = PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__24, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 221; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 221; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } /* "numpy.pxd":223 * raise ValueError(u"ndarray is not Fortran contiguous") * * info.buf = PyArray_DATA(self) # <<<<<<<<<<<<<< * info.ndim = ndim * if copy_shape: */ __pyx_v_info->buf = PyArray_DATA(__pyx_v_self); /* "numpy.pxd":224 * * info.buf = PyArray_DATA(self) * info.ndim = ndim # <<<<<<<<<<<<<< * if copy_shape: * # Allocate new buffer for strides and shape info. */ __pyx_v_info->ndim = __pyx_v_ndim; /* "numpy.pxd":225 * info.buf = PyArray_DATA(self) * info.ndim = ndim * if copy_shape: # <<<<<<<<<<<<<< * # Allocate new buffer for strides and shape info. * # This is allocated as one block, strides first. */ __pyx_t_2 = (__pyx_v_copy_shape != 0); if (__pyx_t_2) { /* "numpy.pxd":228 * # Allocate new buffer for strides and shape info. * # This is allocated as one block, strides first. * info.strides = stdlib.malloc(sizeof(Py_ssize_t) * ndim * 2) # <<<<<<<<<<<<<< * info.shape = info.strides + ndim * for i in range(ndim): */ __pyx_v_info->strides = ((Py_ssize_t *)malloc((((sizeof(Py_ssize_t)) * ((size_t)__pyx_v_ndim)) * 2))); /* "numpy.pxd":229 * # This is allocated as one block, strides first. * info.strides = stdlib.malloc(sizeof(Py_ssize_t) * ndim * 2) * 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); /* "numpy.pxd":230 * info.strides = stdlib.malloc(sizeof(Py_ssize_t) * ndim * 2) * 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_5 = __pyx_v_ndim; for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) { __pyx_v_i = __pyx_t_6; /* "numpy.pxd":231 * 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]); /* "numpy.pxd":232 * 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]); } goto __pyx_L7; } /*else*/ { /* "numpy.pxd":234 * info.shape[i] = PyArray_DIMS(self)[i] * else: * info.strides = PyArray_STRIDES(self) # <<<<<<<<<<<<<< * info.shape = PyArray_DIMS(self) * info.suboffsets = NULL */ __pyx_v_info->strides = ((Py_ssize_t *)PyArray_STRIDES(__pyx_v_self)); /* "numpy.pxd":235 * 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_L7:; /* "numpy.pxd":236 * 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; /* "numpy.pxd":237 * 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); /* "numpy.pxd":238 * 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)); /* "numpy.pxd":241 * * cdef int t * cdef char* f = NULL # <<<<<<<<<<<<<< * cdef dtype descr = self.descr * cdef list stack */ __pyx_v_f = NULL; /* "numpy.pxd":242 * cdef int t * cdef char* f = NULL * cdef dtype descr = self.descr # <<<<<<<<<<<<<< * cdef list stack * cdef int offset */ __pyx_t_4 = ((PyObject *)__pyx_v_self->descr); __Pyx_INCREF(__pyx_t_4); __pyx_v_descr = ((PyArray_Descr *)__pyx_t_4); __pyx_t_4 = 0; /* "numpy.pxd":246 * cdef int offset * * cdef bint hasfields = PyDataType_HASFIELDS(descr) # <<<<<<<<<<<<<< * * if not hasfields and not copy_shape: */ __pyx_v_hasfields = PyDataType_HASFIELDS(__pyx_v_descr); /* "numpy.pxd":248 * cdef bint hasfields = PyDataType_HASFIELDS(descr) * * if not hasfields and not copy_shape: # <<<<<<<<<<<<<< * # do not call releasebuffer * info.obj = None */ __pyx_t_2 = ((!(__pyx_v_hasfields != 0)) != 0); if (__pyx_t_2) { __pyx_t_3 = ((!(__pyx_v_copy_shape != 0)) != 0); __pyx_t_1 = __pyx_t_3; } else { __pyx_t_1 = __pyx_t_2; } if (__pyx_t_1) { /* "numpy.pxd":250 * if not hasfields and not copy_shape: * # do not call releasebuffer * info.obj = None # <<<<<<<<<<<<<< * else: * # need to call releasebuffer */ __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_info->obj); __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = Py_None; goto __pyx_L10; } /*else*/ { /* "numpy.pxd":253 * else: * # need to call releasebuffer * info.obj = self # <<<<<<<<<<<<<< * * if not hasfields: */ __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); } __pyx_L10:; /* "numpy.pxd":255 * info.obj = self * * if not hasfields: # <<<<<<<<<<<<<< * t = descr.type_num * if ((descr.byteorder == '>' and little_endian) or */ __pyx_t_1 = ((!(__pyx_v_hasfields != 0)) != 0); if (__pyx_t_1) { /* "numpy.pxd":256 * * if not hasfields: * t = descr.type_num # <<<<<<<<<<<<<< * if ((descr.byteorder == '>' and little_endian) or * (descr.byteorder == '<' and not little_endian)): */ __pyx_t_5 = __pyx_v_descr->type_num; __pyx_v_t = __pyx_t_5; /* "numpy.pxd":257 * if not hasfields: * t = descr.type_num * if ((descr.byteorder == '>' and little_endian) or # <<<<<<<<<<<<<< * (descr.byteorder == '<' and not little_endian)): * raise ValueError(u"Non-native byte order not supported") */ __pyx_t_1 = ((__pyx_v_descr->byteorder == '>') != 0); if (__pyx_t_1) { __pyx_t_2 = (__pyx_v_little_endian != 0); } else { __pyx_t_2 = __pyx_t_1; } if (!__pyx_t_2) { /* "numpy.pxd":258 * t = descr.type_num * if ((descr.byteorder == '>' and little_endian) or * (descr.byteorder == '<' and not little_endian)): # <<<<<<<<<<<<<< * raise ValueError(u"Non-native byte order not supported") * if t == NPY_BYTE: f = "b" */ __pyx_t_1 = ((__pyx_v_descr->byteorder == '<') != 0); if (__pyx_t_1) { __pyx_t_3 = ((!(__pyx_v_little_endian != 0)) != 0); __pyx_t_7 = __pyx_t_3; } else { __pyx_t_7 = __pyx_t_1; } __pyx_t_1 = __pyx_t_7; } else { __pyx_t_1 = __pyx_t_2; } if (__pyx_t_1) { /* "numpy.pxd":259 * if ((descr.byteorder == '>' and little_endian) or * (descr.byteorder == '<' 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_4 = PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__25, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 259; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 259; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } /* "numpy.pxd":276 * 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) */ switch (__pyx_v_t) { /* "numpy.pxd":260 * (descr.byteorder == '<' 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" */ case NPY_BYTE: __pyx_v_f = __pyx_k_b; break; /* "numpy.pxd":261 * 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 = __pyx_k_B; break; /* "numpy.pxd":262 * 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 = __pyx_k_h; break; /* "numpy.pxd":263 * 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 = __pyx_k_H; break; /* "numpy.pxd":264 * 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 = __pyx_k_i; break; /* "numpy.pxd":265 * 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 = __pyx_k_I; break; /* "numpy.pxd":266 * 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 = __pyx_k_l; break; /* "numpy.pxd":267 * 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 = __pyx_k_L; break; /* "numpy.pxd":268 * 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 = __pyx_k_q; break; /* "numpy.pxd":269 * 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 = __pyx_k_Q; break; /* "numpy.pxd":270 * 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 = __pyx_k_f; break; /* "numpy.pxd":271 * 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 = __pyx_k_d; break; /* "numpy.pxd":272 * 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 = __pyx_k_g; break; /* "numpy.pxd":273 * 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 = __pyx_k_Zf; break; /* "numpy.pxd":274 * 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 = __pyx_k_Zd; break; /* "numpy.pxd":275 * 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 = __pyx_k_Zg; break; /* "numpy.pxd":276 * 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 = __pyx_k_O; break; default: /* "numpy.pxd":278 * elif t == NPY_OBJECT: f = "O" * else: * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) # <<<<<<<<<<<<<< * info.format = f * return */ __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_t); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 278; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_8 = PyUnicode_Format(__pyx_kp_u_unknown_dtype_code_in_numpy_pxd, __pyx_t_4); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 278; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 278; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_8); __Pyx_GIVEREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_8 = PyObject_Call(__pyx_builtin_ValueError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 278; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_Raise(__pyx_t_8, 0, 0, 0); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; {__pyx_filename = __pyx_f[1]; __pyx_lineno = 278; __pyx_clineno = __LINE__; goto __pyx_L1_error;} break; } /* "numpy.pxd":279 * else: * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) * info.format = f # <<<<<<<<<<<<<< * return * else: */ __pyx_v_info->format = __pyx_v_f; /* "numpy.pxd":280 * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) * info.format = f * return # <<<<<<<<<<<<<< * else: * info.format = stdlib.malloc(_buffer_format_string_len) */ __pyx_r = 0; goto __pyx_L0; } /*else*/ { /* "numpy.pxd":282 * return * else: * info.format = stdlib.malloc(_buffer_format_string_len) # <<<<<<<<<<<<<< * info.format[0] = '^' # Native data types, manual alignment * offset = 0 */ __pyx_v_info->format = ((char *)malloc(255)); /* "numpy.pxd":283 * else: * info.format = stdlib.malloc(_buffer_format_string_len) * info.format[0] = '^' # Native data types, manual alignment # <<<<<<<<<<<<<< * offset = 0 * f = _util_dtypestring(descr, info.format + 1, */ (__pyx_v_info->format[0]) = '^'; /* "numpy.pxd":284 * info.format = stdlib.malloc(_buffer_format_string_len) * info.format[0] = '^' # Native data types, manual alignment * offset = 0 # <<<<<<<<<<<<<< * f = _util_dtypestring(descr, info.format + 1, * info.format + _buffer_format_string_len, */ __pyx_v_offset = 0; /* "numpy.pxd":285 * info.format[0] = '^' # Native data types, manual alignment * offset = 0 * f = _util_dtypestring(descr, info.format + 1, # <<<<<<<<<<<<<< * info.format + _buffer_format_string_len, * &offset) */ __pyx_t_9 = __pyx_f_5numpy__util_dtypestring(__pyx_v_descr, (__pyx_v_info->format + 1), (__pyx_v_info->format + 255), (&__pyx_v_offset)); if (unlikely(__pyx_t_9 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 285; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_f = __pyx_t_9; /* "numpy.pxd":288 * info.format + _buffer_format_string_len, * &offset) * f[0] = 0 # Terminate format string # <<<<<<<<<<<<<< * * def __releasebuffer__(ndarray self, Py_buffer* info): */ (__pyx_v_f[0]) = 0; } /* "numpy.pxd":196 * # 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 fullfill the PEP. */ /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_8); __Pyx_AddTraceback("numpy.ndarray.__getbuffer__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; if (__pyx_v_info != NULL && __pyx_v_info->obj != NULL) { __Pyx_GOTREF(__pyx_v_info->obj); __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = NULL; } goto __pyx_L2; __pyx_L0:; if (__pyx_v_info != NULL && __pyx_v_info->obj == Py_None) { __Pyx_GOTREF(Py_None); __Pyx_DECREF(Py_None); __pyx_v_info->obj = NULL; } __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_descr); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "numpy.pxd":290 * f[0] = 0 # Terminate format string * * def __releasebuffer__(ndarray self, Py_buffer* info): # <<<<<<<<<<<<<< * if PyArray_HASFIELDS(self): * stdlib.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); /* "numpy.pxd":291 * * def __releasebuffer__(ndarray self, Py_buffer* info): * if PyArray_HASFIELDS(self): # <<<<<<<<<<<<<< * stdlib.free(info.format) * if sizeof(npy_intp) != sizeof(Py_ssize_t): */ __pyx_t_1 = (PyArray_HASFIELDS(__pyx_v_self) != 0); if (__pyx_t_1) { /* "numpy.pxd":292 * def __releasebuffer__(ndarray self, Py_buffer* info): * if PyArray_HASFIELDS(self): * stdlib.free(info.format) # <<<<<<<<<<<<<< * if sizeof(npy_intp) != sizeof(Py_ssize_t): * stdlib.free(info.strides) */ free(__pyx_v_info->format); goto __pyx_L3; } __pyx_L3:; /* "numpy.pxd":293 * if PyArray_HASFIELDS(self): * stdlib.free(info.format) * if sizeof(npy_intp) != sizeof(Py_ssize_t): # <<<<<<<<<<<<<< * stdlib.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) { /* "numpy.pxd":294 * stdlib.free(info.format) * if sizeof(npy_intp) != sizeof(Py_ssize_t): * stdlib.free(info.strides) # <<<<<<<<<<<<<< * # info.shape was stored after info.strides in the same block * */ free(__pyx_v_info->strides); goto __pyx_L4; } __pyx_L4:; /* "numpy.pxd":290 * f[0] = 0 # Terminate format string * * def __releasebuffer__(ndarray self, Py_buffer* info): # <<<<<<<<<<<<<< * if PyArray_HASFIELDS(self): * stdlib.free(info.format) */ /* function exit code */ __Pyx_RefNannyFinishContext(); } /* "numpy.pxd":772 * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PyArray_MultiIterNew1", 0); /* "numpy.pxd":773 * * 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_filename = __pyx_f[1]; __pyx_lineno = 773; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "numpy.pxd":772 * 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; } /* "numpy.pxd":775 * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PyArray_MultiIterNew2", 0); /* "numpy.pxd":776 * * 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_filename = __pyx_f[1]; __pyx_lineno = 776; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "numpy.pxd":775 * 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; } /* "numpy.pxd":778 * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PyArray_MultiIterNew3", 0); /* "numpy.pxd":779 * * 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_filename = __pyx_f[1]; __pyx_lineno = 779; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "numpy.pxd":778 * 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; } /* "numpy.pxd":781 * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PyArray_MultiIterNew4", 0); /* "numpy.pxd":782 * * 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_filename = __pyx_f[1]; __pyx_lineno = 782; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "numpy.pxd":781 * 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; } /* "numpy.pxd":784 * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PyArray_MultiIterNew5", 0); /* "numpy.pxd":785 * * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): * return PyArray_MultiIterNew(5, a, b, c, d, e) # <<<<<<<<<<<<<< * * cdef inline char* _util_dtypestring(dtype descr, char* f, char* end, int* offset) except NULL: */ __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_filename = __pyx_f[1]; __pyx_lineno = 785; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "numpy.pxd":784 * 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; } /* "numpy.pxd":787 * return PyArray_MultiIterNew(5, a, b, c, d, e) * * 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; PyObject *__pyx_t_5 = NULL; int __pyx_t_6; int __pyx_t_7; int __pyx_t_8; int __pyx_t_9; long __pyx_t_10; char *__pyx_t_11; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_util_dtypestring", 0); /* "numpy.pxd":794 * cdef int delta_offset * cdef tuple i * cdef int endian_detector = 1 # <<<<<<<<<<<<<< * cdef bint little_endian = ((&endian_detector)[0] != 0) * cdef tuple fields */ __pyx_v_endian_detector = 1; /* "numpy.pxd":795 * cdef tuple i * 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); /* "numpy.pxd":798 * 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_filename = __pyx_f[1]; __pyx_lineno = 798; __pyx_clineno = __LINE__; goto __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_COMPILING_IN_CPYTHON __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_filename = __pyx_f[1]; __pyx_lineno = 798; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 798; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif __Pyx_XDECREF_SET(__pyx_v_childname, __pyx_t_3); __pyx_t_3 = 0; /* "numpy.pxd":799 * * for childname in descr.names: * fields = descr.fields[childname] # <<<<<<<<<<<<<< * child, new_offset = fields * */ __pyx_t_3 = PyObject_GetItem(__pyx_v_descr->fields, __pyx_v_childname); if (unlikely(__pyx_t_3 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 799; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 799; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_XDECREF_SET(__pyx_v_fields, ((PyObject*)__pyx_t_3)); __pyx_t_3 = 0; /* "numpy.pxd":800 * 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; #if CYTHON_COMPILING_IN_CPYTHON Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 800; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON __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_filename = __pyx_f[1]; __pyx_lineno = 800; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 800; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); #endif } else { __Pyx_RaiseNoneNotIterableError(); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 800; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_dtype))))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 800; __pyx_clineno = __LINE__; goto __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; /* "numpy.pxd":802 * 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_ptrdiff_t((__pyx_v_end - __pyx_v_f)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 802; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = __Pyx_PyInt_From_int((__pyx_v_offset[0])); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 802; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = PyNumber_Subtract(__pyx_v_new_offset, __pyx_t_3); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 802; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyNumber_Subtract(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 802; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyObject_RichCompare(__pyx_t_3, __pyx_int_15, Py_LT); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 802; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 802; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_6) { /* "numpy.pxd":803 * * if (end - f) - (new_offset - offset[0]) < 15: * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") # <<<<<<<<<<<<<< * * if ((child.byteorder == '>' and little_endian) or */ __pyx_t_5 = PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__26, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 803; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_Raise(__pyx_t_5, 0, 0, 0); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; {__pyx_filename = __pyx_f[1]; __pyx_lineno = 803; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } /* "numpy.pxd":805 * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") * * if ((child.byteorder == '>' and little_endian) or # <<<<<<<<<<<<<< * (child.byteorder == '<' and not little_endian)): * raise ValueError(u"Non-native byte order not supported") */ __pyx_t_6 = ((__pyx_v_child->byteorder == '>') != 0); if (__pyx_t_6) { __pyx_t_7 = (__pyx_v_little_endian != 0); } else { __pyx_t_7 = __pyx_t_6; } if (!__pyx_t_7) { /* "numpy.pxd":806 * * if ((child.byteorder == '>' and little_endian) or * (child.byteorder == '<' 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_6 = ((__pyx_v_child->byteorder == '<') != 0); if (__pyx_t_6) { __pyx_t_8 = ((!(__pyx_v_little_endian != 0)) != 0); __pyx_t_9 = __pyx_t_8; } else { __pyx_t_9 = __pyx_t_6; } __pyx_t_6 = __pyx_t_9; } else { __pyx_t_6 = __pyx_t_7; } if (__pyx_t_6) { /* "numpy.pxd":807 * if ((child.byteorder == '>' and little_endian) or * (child.byteorder == '<' 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_5 = PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__27, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 807; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_Raise(__pyx_t_5, 0, 0, 0); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; {__pyx_filename = __pyx_f[1]; __pyx_lineno = 807; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } /* "numpy.pxd":817 * * # Output padding bytes * while offset[0] < new_offset: # <<<<<<<<<<<<<< * f[0] = 120 # "x"; pad byte * f += 1 */ while (1) { __pyx_t_5 = __Pyx_PyInt_From_int((__pyx_v_offset[0])); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 817; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = PyObject_RichCompare(__pyx_t_5, __pyx_v_new_offset, Py_LT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 817; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 817; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (!__pyx_t_6) break; /* "numpy.pxd":818 * # Output padding bytes * while offset[0] < new_offset: * f[0] = 120 # "x"; pad byte # <<<<<<<<<<<<<< * f += 1 * offset[0] += 1 */ (__pyx_v_f[0]) = 120; /* "numpy.pxd":819 * while offset[0] < new_offset: * f[0] = 120 # "x"; pad byte * f += 1 # <<<<<<<<<<<<<< * offset[0] += 1 * */ __pyx_v_f = (__pyx_v_f + 1); /* "numpy.pxd":820 * f[0] = 120 # "x"; pad byte * f += 1 * offset[0] += 1 # <<<<<<<<<<<<<< * * offset[0] += child.itemsize */ __pyx_t_10 = 0; (__pyx_v_offset[__pyx_t_10]) = ((__pyx_v_offset[__pyx_t_10]) + 1); } /* "numpy.pxd":822 * offset[0] += 1 * * offset[0] += child.itemsize # <<<<<<<<<<<<<< * * if not PyDataType_HASFIELDS(child): */ __pyx_t_10 = 0; (__pyx_v_offset[__pyx_t_10]) = ((__pyx_v_offset[__pyx_t_10]) + __pyx_v_child->elsize); /* "numpy.pxd":824 * 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) { /* "numpy.pxd":825 * * if not PyDataType_HASFIELDS(child): * t = child.type_num # <<<<<<<<<<<<<< * if end - f < 5: * raise RuntimeError(u"Format string allocated too short.") */ __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_child->type_num); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 825; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_XDECREF_SET(__pyx_v_t, __pyx_t_3); __pyx_t_3 = 0; /* "numpy.pxd":826 * 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 (__pyx_t_6) { /* "numpy.pxd":827 * 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_3 = PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__28, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 827; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 827; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } /* "numpy.pxd":830 * * # 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_3 = PyInt_FromLong(NPY_BYTE); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 830; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 830; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 830; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_6) { (__pyx_v_f[0]) = 98; goto __pyx_L11; } /* "numpy.pxd":831 * # 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_5 = PyInt_FromLong(NPY_UBYTE); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 831; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 831; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 831; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_6) { (__pyx_v_f[0]) = 66; goto __pyx_L11; } /* "numpy.pxd":832 * 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_3 = PyInt_FromLong(NPY_SHORT); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 832; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 832; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 832; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_6) { (__pyx_v_f[0]) = 104; goto __pyx_L11; } /* "numpy.pxd":833 * 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_5 = PyInt_FromLong(NPY_USHORT); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 833; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 833; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 833; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_6) { (__pyx_v_f[0]) = 72; goto __pyx_L11; } /* "numpy.pxd":834 * 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_3 = PyInt_FromLong(NPY_INT); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 834; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 834; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 834; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_6) { (__pyx_v_f[0]) = 105; goto __pyx_L11; } /* "numpy.pxd":835 * 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_5 = PyInt_FromLong(NPY_UINT); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 835; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 835; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 835; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_6) { (__pyx_v_f[0]) = 73; goto __pyx_L11; } /* "numpy.pxd":836 * 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_3 = PyInt_FromLong(NPY_LONG); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 836; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 836; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 836; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_6) { (__pyx_v_f[0]) = 108; goto __pyx_L11; } /* "numpy.pxd":837 * 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_5 = PyInt_FromLong(NPY_ULONG); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 837; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 837; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 837; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_6) { (__pyx_v_f[0]) = 76; goto __pyx_L11; } /* "numpy.pxd":838 * 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_3 = PyInt_FromLong(NPY_LONGLONG); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 838; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 838; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 838; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_6) { (__pyx_v_f[0]) = 113; goto __pyx_L11; } /* "numpy.pxd":839 * 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_5 = PyInt_FromLong(NPY_ULONGLONG); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 839; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 839; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 839; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_6) { (__pyx_v_f[0]) = 81; goto __pyx_L11; } /* "numpy.pxd":840 * 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_3 = PyInt_FromLong(NPY_FLOAT); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 840; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 840; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 840; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_6) { (__pyx_v_f[0]) = 102; goto __pyx_L11; } /* "numpy.pxd":841 * 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_5 = PyInt_FromLong(NPY_DOUBLE); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 841; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 841; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 841; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_6) { (__pyx_v_f[0]) = 100; goto __pyx_L11; } /* "numpy.pxd":842 * 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_3 = PyInt_FromLong(NPY_LONGDOUBLE); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 842; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 842; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 842; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_6) { (__pyx_v_f[0]) = 103; goto __pyx_L11; } /* "numpy.pxd":843 * 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_5 = PyInt_FromLong(NPY_CFLOAT); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 843; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 843; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 843; __pyx_clineno = __LINE__; goto __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]) = 102; __pyx_v_f = (__pyx_v_f + 1); goto __pyx_L11; } /* "numpy.pxd":844 * 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_3 = PyInt_FromLong(NPY_CDOUBLE); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 844; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 844; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 844; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_6) { (__pyx_v_f[0]) = 90; (__pyx_v_f[1]) = 100; __pyx_v_f = (__pyx_v_f + 1); goto __pyx_L11; } /* "numpy.pxd":845 * 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_5 = PyInt_FromLong(NPY_CLONGDOUBLE); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 845; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 845; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 845; __pyx_clineno = __LINE__; goto __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]) = 103; __pyx_v_f = (__pyx_v_f + 1); goto __pyx_L11; } /* "numpy.pxd":846 * 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_3 = PyInt_FromLong(NPY_OBJECT); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 846; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 846; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 846; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_6) { (__pyx_v_f[0]) = 79; goto __pyx_L11; } /*else*/ { /* "numpy.pxd":848 * elif t == NPY_OBJECT: f[0] = 79 #"O" * else: * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) # <<<<<<<<<<<<<< * f += 1 * else: */ __pyx_t_5 = PyUnicode_Format(__pyx_kp_u_unknown_dtype_code_in_numpy_pxd, __pyx_v_t); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 848; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 848; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyObject_Call(__pyx_builtin_ValueError, __pyx_t_3, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 848; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_Raise(__pyx_t_5, 0, 0, 0); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; {__pyx_filename = __pyx_f[1]; __pyx_lineno = 848; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_L11:; /* "numpy.pxd":849 * 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); goto __pyx_L9; } /*else*/ { /* "numpy.pxd":853 * # Cython ignores struct boundary information ("T{...}"), * # so don't output it * f = _util_dtypestring(child, f, end, offset) # <<<<<<<<<<<<<< * return f * */ __pyx_t_11 = __pyx_f_5numpy__util_dtypestring(__pyx_v_child, __pyx_v_f, __pyx_v_end, __pyx_v_offset); if (unlikely(__pyx_t_11 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 853; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_f = __pyx_t_11; } __pyx_L9:; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "numpy.pxd":854 * # so don't output it * f = _util_dtypestring(child, f, end, offset) * return f # <<<<<<<<<<<<<< * * */ __pyx_r = __pyx_v_f; goto __pyx_L0; /* "numpy.pxd":787 * return PyArray_MultiIterNew(5, a, b, c, d, e) * * 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_XDECREF(__pyx_t_5); __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; } /* "numpy.pxd":969 * * * 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); /* "numpy.pxd":971 * 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) { /* "numpy.pxd":972 * cdef PyObject* baseptr * if base is None: * baseptr = NULL # <<<<<<<<<<<<<< * else: * Py_INCREF(base) # important to do this before decref below! */ __pyx_v_baseptr = NULL; goto __pyx_L3; } /*else*/ { /* "numpy.pxd":974 * baseptr = NULL * else: * Py_INCREF(base) # important to do this before decref below! # <<<<<<<<<<<<<< * baseptr = base * Py_XDECREF(arr.base) */ Py_INCREF(__pyx_v_base); /* "numpy.pxd":975 * 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:; /* "numpy.pxd":976 * 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); /* "numpy.pxd":977 * baseptr = base * Py_XDECREF(arr.base) * arr.base = baseptr # <<<<<<<<<<<<<< * * cdef inline object get_array_base(ndarray arr): */ __pyx_v_arr->base = __pyx_v_baseptr; /* "numpy.pxd":969 * * * cdef inline void set_array_base(ndarray arr, object base): # <<<<<<<<<<<<<< * cdef PyObject* baseptr * if base is None: */ /* function exit code */ __Pyx_RefNannyFinishContext(); } /* "numpy.pxd":979 * 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); /* "numpy.pxd":980 * * 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) { /* "numpy.pxd":981 * cdef inline object get_array_base(ndarray arr): * if arr.base is NULL: * return None # <<<<<<<<<<<<<< * else: * return arr.base */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(Py_None); __pyx_r = Py_None; goto __pyx_L0; } /*else*/ { /* "numpy.pxd":983 * return None * else: * return arr.base # <<<<<<<<<<<<<< */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_arr->base)); __pyx_r = ((PyObject *)__pyx_v_arr->base); goto __pyx_L0; } /* "numpy.pxd":979 * 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; } static struct __pyx_vtabstruct_6pandas_7msgpack_Packer __pyx_vtable_6pandas_7msgpack_Packer; static PyObject *__pyx_tp_new_6pandas_7msgpack_Packer(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { struct __pyx_obj_6pandas_7msgpack_Packer *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_7msgpack_Packer *)o); p->__pyx_vtab = __pyx_vtabptr_6pandas_7msgpack_Packer; p->_default = Py_None; Py_INCREF(Py_None); p->_bencoding = Py_None; Py_INCREF(Py_None); p->_berrors = Py_None; Py_INCREF(Py_None); p->use_float = ((PyBoolObject *)Py_None); Py_INCREF(Py_None); if (unlikely(__pyx_pw_6pandas_7msgpack_6Packer_1__cinit__(o, __pyx_empty_tuple, NULL) < 0)) { Py_DECREF(o); o = 0; } return o; } static void __pyx_tp_dealloc_6pandas_7msgpack_Packer(PyObject *o) { struct __pyx_obj_6pandas_7msgpack_Packer *p = (struct __pyx_obj_6pandas_7msgpack_Packer *)o; #if PY_VERSION_HEX >= 0x030400a1 if (unlikely(Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) { if (PyObject_CallFinalizerFromDealloc(o)) return; } #endif PyObject_GC_UnTrack(o); { PyObject *etype, *eval, *etb; PyErr_Fetch(&etype, &eval, &etb); ++Py_REFCNT(o); __pyx_pw_6pandas_7msgpack_6Packer_5__dealloc__(o); --Py_REFCNT(o); PyErr_Restore(etype, eval, etb); } Py_CLEAR(p->_default); Py_CLEAR(p->_bencoding); Py_CLEAR(p->_berrors); Py_CLEAR(p->use_float); (*Py_TYPE(o)->tp_free)(o); } static int __pyx_tp_traverse_6pandas_7msgpack_Packer(PyObject *o, visitproc v, void *a) { int e; struct __pyx_obj_6pandas_7msgpack_Packer *p = (struct __pyx_obj_6pandas_7msgpack_Packer *)o; if (p->_default) { e = (*v)(p->_default, a); if (e) return e; } if (p->_bencoding) { e = (*v)(p->_bencoding, a); if (e) return e; } if (p->_berrors) { e = (*v)(p->_berrors, a); if (e) return e; } if (p->use_float) { e = (*v)(((PyObject*)p->use_float), a); if (e) return e; } return 0; } static int __pyx_tp_clear_6pandas_7msgpack_Packer(PyObject *o) { PyObject* tmp; struct __pyx_obj_6pandas_7msgpack_Packer *p = (struct __pyx_obj_6pandas_7msgpack_Packer *)o; tmp = ((PyObject*)p->_default); p->_default = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->_bencoding); p->_bencoding = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->_berrors); p->_berrors = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->use_float); p->use_float = ((PyBoolObject *)Py_None); Py_INCREF(Py_None); Py_XDECREF(tmp); return 0; } static PyMethodDef __pyx_methods_6pandas_7msgpack_Packer[] = { {__Pyx_NAMESTR("pack"), (PyCFunction)__pyx_pw_6pandas_7msgpack_6Packer_7pack, METH_O, __Pyx_DOCSTR(__pyx_doc_6pandas_7msgpack_6Packer_6pack)}, {__Pyx_NAMESTR("pack_array_header"), (PyCFunction)__pyx_pw_6pandas_7msgpack_6Packer_9pack_array_header, METH_O, __Pyx_DOCSTR(__pyx_doc_6pandas_7msgpack_6Packer_8pack_array_header)}, {__Pyx_NAMESTR("pack_map_header"), (PyCFunction)__pyx_pw_6pandas_7msgpack_6Packer_11pack_map_header, METH_O, __Pyx_DOCSTR(__pyx_doc_6pandas_7msgpack_6Packer_10pack_map_header)}, {__Pyx_NAMESTR("pack_map_pairs"), (PyCFunction)__pyx_pw_6pandas_7msgpack_6Packer_13pack_map_pairs, METH_O, __Pyx_DOCSTR(__pyx_doc_6pandas_7msgpack_6Packer_12pack_map_pairs)}, {__Pyx_NAMESTR("reset"), (PyCFunction)__pyx_pw_6pandas_7msgpack_6Packer_15reset, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_6pandas_7msgpack_6Packer_14reset)}, {__Pyx_NAMESTR("bytes"), (PyCFunction)__pyx_pw_6pandas_7msgpack_6Packer_17bytes, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_6pandas_7msgpack_6Packer_16bytes)}, {0, 0, 0, 0} }; static PyTypeObject __pyx_type_6pandas_7msgpack_Packer = { PyVarObject_HEAD_INIT(0, 0) __Pyx_NAMESTR("pandas.msgpack.Packer"), /*tp_name*/ sizeof(struct __pyx_obj_6pandas_7msgpack_Packer), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_6pandas_7msgpack_Packer, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #else 0, /*reserved*/ #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*/ __Pyx_DOCSTR("Packer(default=None, encoding='utf-8', unicode_errors='strict', use_single_float=False, bool autoreset=1)\nMessagePack Packer\n\n usage:\n\n packer = Packer()\n astream.write(packer.pack(a))\n astream.write(packer.pack(b))\n\n Packer's constructor has some keyword arguments:\n\n * *defaut* - Convert user type to builtin type that Packer supports.\n See also simplejson's document.\n * *encoding* - Convert unicode to bytes with this encoding. (default: 'utf-8')\n * *unicode_errors* - Error handler for encoding unicode. (default: 'strict')\n * *use_single_float* - Use single precision float type for float. (default: False)\n * *autoreset* - Reset buffer after each pack and return it's content as `bytes`. (default: True).\n If set this to false, use `bytes()` to get content and `.reset()` to clear buffer.\n "), /*tp_doc*/ __pyx_tp_traverse_6pandas_7msgpack_Packer, /*tp_traverse*/ __pyx_tp_clear_6pandas_7msgpack_Packer, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_6pandas_7msgpack_Packer, /*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_7msgpack_6Packer_3__init__, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_6pandas_7msgpack_Packer, /*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*/ #if PY_VERSION_HEX >= 0x02060000 0, /*tp_version_tag*/ #endif #if PY_VERSION_HEX >= 0x030400a1 0, /*tp_finalize*/ #endif }; static struct __pyx_vtabstruct_6pandas_7msgpack_Unpacker __pyx_vtable_6pandas_7msgpack_Unpacker; static PyObject *__pyx_tp_new_6pandas_7msgpack_Unpacker(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { struct __pyx_obj_6pandas_7msgpack_Unpacker *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_7msgpack_Unpacker *)o); p->__pyx_vtab = __pyx_vtabptr_6pandas_7msgpack_Unpacker; p->file_like = Py_None; Py_INCREF(Py_None); p->file_like_read = Py_None; Py_INCREF(Py_None); p->object_hook = Py_None; Py_INCREF(Py_None); p->encoding = Py_None; Py_INCREF(Py_None); p->unicode_errors = Py_None; Py_INCREF(Py_None); if (unlikely(__pyx_pw_6pandas_7msgpack_8Unpacker_1__cinit__(o, __pyx_empty_tuple, NULL) < 0)) { Py_DECREF(o); o = 0; } return o; } static void __pyx_tp_dealloc_6pandas_7msgpack_Unpacker(PyObject *o) { struct __pyx_obj_6pandas_7msgpack_Unpacker *p = (struct __pyx_obj_6pandas_7msgpack_Unpacker *)o; #if PY_VERSION_HEX >= 0x030400a1 if (unlikely(Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) { if (PyObject_CallFinalizerFromDealloc(o)) return; } #endif PyObject_GC_UnTrack(o); { PyObject *etype, *eval, *etb; PyErr_Fetch(&etype, &eval, &etb); ++Py_REFCNT(o); __pyx_pw_6pandas_7msgpack_8Unpacker_3__dealloc__(o); --Py_REFCNT(o); PyErr_Restore(etype, eval, etb); } Py_CLEAR(p->file_like); Py_CLEAR(p->file_like_read); Py_CLEAR(p->object_hook); Py_CLEAR(p->encoding); Py_CLEAR(p->unicode_errors); (*Py_TYPE(o)->tp_free)(o); } static int __pyx_tp_traverse_6pandas_7msgpack_Unpacker(PyObject *o, visitproc v, void *a) { int e; struct __pyx_obj_6pandas_7msgpack_Unpacker *p = (struct __pyx_obj_6pandas_7msgpack_Unpacker *)o; if (p->file_like) { e = (*v)(p->file_like, a); if (e) return e; } if (p->file_like_read) { e = (*v)(p->file_like_read, a); if (e) return e; } if (p->object_hook) { e = (*v)(p->object_hook, a); if (e) return e; } if (p->encoding) { e = (*v)(p->encoding, a); if (e) return e; } if (p->unicode_errors) { e = (*v)(p->unicode_errors, a); if (e) return e; } return 0; } static int __pyx_tp_clear_6pandas_7msgpack_Unpacker(PyObject *o) { PyObject* tmp; struct __pyx_obj_6pandas_7msgpack_Unpacker *p = (struct __pyx_obj_6pandas_7msgpack_Unpacker *)o; tmp = ((PyObject*)p->file_like); p->file_like = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->file_like_read); p->file_like_read = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->object_hook); p->object_hook = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->encoding); p->encoding = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->unicode_errors); p->unicode_errors = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); return 0; } static PyMethodDef __pyx_methods_6pandas_7msgpack_Unpacker[] = { {__Pyx_NAMESTR("feed"), (PyCFunction)__pyx_pw_6pandas_7msgpack_8Unpacker_7feed, METH_O, __Pyx_DOCSTR(__pyx_doc_6pandas_7msgpack_8Unpacker_6feed)}, {__Pyx_NAMESTR("read_bytes"), (PyCFunction)__pyx_pw_6pandas_7msgpack_8Unpacker_9read_bytes, METH_O, __Pyx_DOCSTR(__pyx_doc_6pandas_7msgpack_8Unpacker_8read_bytes)}, {__Pyx_NAMESTR("unpack"), (PyCFunction)__pyx_pw_6pandas_7msgpack_8Unpacker_11unpack, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_7msgpack_8Unpacker_10unpack)}, {__Pyx_NAMESTR("skip"), (PyCFunction)__pyx_pw_6pandas_7msgpack_8Unpacker_13skip, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_7msgpack_8Unpacker_12skip)}, {__Pyx_NAMESTR("read_array_header"), (PyCFunction)__pyx_pw_6pandas_7msgpack_8Unpacker_15read_array_header, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_7msgpack_8Unpacker_14read_array_header)}, {__Pyx_NAMESTR("read_map_header"), (PyCFunction)__pyx_pw_6pandas_7msgpack_8Unpacker_17read_map_header, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_7msgpack_8Unpacker_16read_map_header)}, {__Pyx_NAMESTR("__next__"), (PyCFunction)__pyx_pw_6pandas_7msgpack_8Unpacker_21__next__, METH_NOARGS|METH_COEXIST, __Pyx_DOCSTR(0)}, {0, 0, 0, 0} }; static PyTypeObject __pyx_type_6pandas_7msgpack_Unpacker = { PyVarObject_HEAD_INIT(0, 0) __Pyx_NAMESTR("pandas.msgpack.Unpacker"), /*tp_name*/ sizeof(struct __pyx_obj_6pandas_7msgpack_Unpacker), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_6pandas_7msgpack_Unpacker, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #else 0, /*reserved*/ #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*/ __Pyx_DOCSTR("Unpacker(file_like=None, Py_ssize_t read_size=0, bool use_list=1, object_hook=None, object_pairs_hook=None, list_hook=None, encoding=None, unicode_errors='strict', int max_buffer_size=0)\n\n Streaming unpacker.\n\n `file_like` is a file-like object having `.read(n)` method.\n When `Unpacker` initialized with `file_like`, unpacker reads serialized data\n from it and `.feed()` method is not usable.\n\n `read_size` is used as `file_like.read(read_size)`.\n (default: min(1024**2, max_buffer_size))\n\n If `use_list` is true (default), msgpack list is deserialized to Python list.\n Otherwise, it is deserialized to Python tuple.\n\n `object_hook` is same to simplejson. If it is not None, it should be callable\n and Unpacker calls it with a dict argument after deserializing a map.\n\n `object_pairs_hook` is same to simplejson. If it is not None, it should be callable\n and Unpacker calls it with a list of key-value pairs after deserializing a map.\n\n `encoding` is encoding used for decoding msgpack bytes. If it is None (default),\n msgpack bytes is deserialized to Python bytes.\n\n `unicode_errors` is used for decoding bytes.\n\n `max_buffer_size` limits size of data waiting unpacked.\n 0 means system's INT_MAX (default).\n Raises `BufferFull` exception when it is insufficient.\n You shoud set this parameter when unpacking data from untrasted source.\n\n example of streaming deserialize from file-like object::\n\n unpacker = Unpacker(file_like)\n for o in unpacker:\n do_something(o)\n\n example of streaming deserialize from socket::\n\n unpacker = Unpacker()\n while 1:\n buf = sock.recv(1024**2)\n if not buf:\n break\n unpacker.feed(buf)\n for o in unpacker:\n do_something(o)\n "), /*tp_doc*/ __pyx_tp_traverse_6pandas_7msgpack_Unpacker, /*tp_traverse*/ __pyx_tp_clear_6pandas_7msgpack_Unpacker, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ __pyx_pw_6pandas_7msgpack_8Unpacker_19__iter__, /*tp_iter*/ __pyx_pw_6pandas_7msgpack_8Unpacker_21__next__, /*tp_iternext*/ __pyx_methods_6pandas_7msgpack_Unpacker, /*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_7msgpack_8Unpacker_5__init__, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_6pandas_7msgpack_Unpacker, /*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*/ #if PY_VERSION_HEX >= 0x02060000 0, /*tp_version_tag*/ #endif #if PY_VERSION_HEX >= 0x030400a1 0, /*tp_finalize*/ #endif }; static PyMethodDef __pyx_methods[] = { {0, 0, 0, 0} }; #if PY_MAJOR_VERSION >= 3 static struct PyModuleDef __pyx_moduledef = { #if PY_VERSION_HEX < 0x03020000 { PyObject_HEAD_INIT(NULL) NULL, 0, NULL }, #else PyModuleDef_HEAD_INIT, #endif __Pyx_NAMESTR("msgpack"), 0, /* m_doc */ -1, /* m_size */ __pyx_methods /* m_methods */, NULL, /* m_reload */ NULL, /* m_traverse */ NULL, /* m_clear */ NULL /* m_free */ }; #endif static __Pyx_StringTabEntry __pyx_string_tab[] = { {&__pyx_n_s_BufferFull, __pyx_k_BufferFull, sizeof(__pyx_k_BufferFull), 0, 0, 1, 1}, {&__pyx_kp_s_Can_t_encode_unicode_string_no_e, __pyx_k_Can_t_encode_unicode_string_no_e, sizeof(__pyx_k_Can_t_encode_unicode_string_no_e), 0, 0, 1, 0}, {&__pyx_n_s_ExtraData, __pyx_k_ExtraData, sizeof(__pyx_k_ExtraData), 0, 0, 1, 1}, {&__pyx_n_s_ExtraData___init, __pyx_k_ExtraData___init, sizeof(__pyx_k_ExtraData___init), 0, 0, 1, 1}, {&__pyx_n_s_ExtraData___str, __pyx_k_ExtraData___str, sizeof(__pyx_k_ExtraData___str), 0, 0, 1, 1}, {&__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_IOError, __pyx_k_IOError, sizeof(__pyx_k_IOError), 0, 0, 1, 1}, {&__pyx_n_s_MemoryError, __pyx_k_MemoryError, sizeof(__pyx_k_MemoryError), 0, 0, 1, 1}, {&__pyx_kp_s_No_more_data_to_unpack, __pyx_k_No_more_data_to_unpack, sizeof(__pyx_k_No_more_data_to_unpack), 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_OutOfData, __pyx_k_OutOfData, sizeof(__pyx_k_OutOfData), 0, 0, 1, 1}, {&__pyx_n_s_PackException, __pyx_k_PackException, sizeof(__pyx_k_PackException), 0, 0, 1, 1}, {&__pyx_n_s_PackValueError, __pyx_k_PackValueError, sizeof(__pyx_k_PackValueError), 0, 0, 1, 1}, {&__pyx_n_s_RuntimeError, __pyx_k_RuntimeError, sizeof(__pyx_k_RuntimeError), 0, 0, 1, 1}, {&__pyx_n_s_StopIteration, __pyx_k_StopIteration, sizeof(__pyx_k_StopIteration), 0, 0, 1, 1}, {&__pyx_n_s_TypeError, __pyx_k_TypeError, sizeof(__pyx_k_TypeError), 0, 0, 1, 1}, {&__pyx_kp_s_Unable_to_allocate_internal_buff, __pyx_k_Unable_to_allocate_internal_buff, sizeof(__pyx_k_Unable_to_allocate_internal_buff), 0, 0, 1, 0}, {&__pyx_kp_s_Unable_to_enlarge_internal_buffe, __pyx_k_Unable_to_enlarge_internal_buffe, sizeof(__pyx_k_Unable_to_enlarge_internal_buffe), 0, 0, 1, 0}, {&__pyx_n_s_UnpackException, __pyx_k_UnpackException, sizeof(__pyx_k_UnpackException), 0, 0, 1, 1}, {&__pyx_n_s_UnpackValueError, __pyx_k_UnpackValueError, sizeof(__pyx_k_UnpackValueError), 0, 0, 1, 1}, {&__pyx_kp_s_Unpack_failed_error_d, __pyx_k_Unpack_failed_error_d, sizeof(__pyx_k_Unpack_failed_error_d), 0, 0, 1, 0}, {&__pyx_n_s_ValueError, __pyx_k_ValueError, sizeof(__pyx_k_ValueError), 0, 0, 1, 1}, {&__pyx_n_s_ascii, __pyx_k_ascii, sizeof(__pyx_k_ascii), 0, 0, 1, 1}, {&__pyx_n_s_autoreset, __pyx_k_autoreset, sizeof(__pyx_k_autoreset), 0, 0, 1, 1}, {&__pyx_n_s_buf, __pyx_k_buf, sizeof(__pyx_k_buf), 0, 0, 1, 1}, {&__pyx_n_s_buf_len, __pyx_k_buf_len, sizeof(__pyx_k_buf_len), 0, 0, 1, 1}, {&__pyx_kp_s_can_t_serialize_r, __pyx_k_can_t_serialize_r, sizeof(__pyx_k_can_t_serialize_r), 0, 0, 1, 0}, {&__pyx_kp_s_cannot_pack_s, __pyx_k_cannot_pack_s, sizeof(__pyx_k_cannot_pack_s), 0, 0, 1, 0}, {&__pyx_n_s_cenc, __pyx_k_cenc, sizeof(__pyx_k_cenc), 0, 0, 1, 1}, {&__pyx_n_s_cerr, __pyx_k_cerr, sizeof(__pyx_k_cerr), 0, 0, 1, 1}, {&__pyx_n_s_ctx, __pyx_k_ctx, sizeof(__pyx_k_ctx), 0, 0, 1, 1}, {&__pyx_n_s_default, __pyx_k_default, sizeof(__pyx_k_default), 0, 0, 1, 1}, {&__pyx_kp_s_default_must_be_a_callable, __pyx_k_default_must_be_a_callable, sizeof(__pyx_k_default_must_be_a_callable), 0, 0, 1, 0}, {&__pyx_n_s_doc, __pyx_k_doc, sizeof(__pyx_k_doc), 0, 0, 1, 1}, {&__pyx_n_s_encode, __pyx_k_encode, sizeof(__pyx_k_encode), 0, 0, 1, 1}, {&__pyx_n_s_encoding, __pyx_k_encoding, sizeof(__pyx_k_encoding), 0, 0, 1, 1}, {&__pyx_n_s_extra, __pyx_k_extra, sizeof(__pyx_k_extra), 0, 0, 1, 1}, {&__pyx_n_s_file_like, __pyx_k_file_like, sizeof(__pyx_k_file_like), 0, 0, 1, 1}, {&__pyx_kp_s_file_like_read_must_be_a_callab, __pyx_k_file_like_read_must_be_a_callab, sizeof(__pyx_k_file_like_read_must_be_a_callab), 0, 0, 1, 0}, {&__pyx_kp_s_home_yoh_deb_gits_pkg_exppsy_pa, __pyx_k_home_yoh_deb_gits_pkg_exppsy_pa, sizeof(__pyx_k_home_yoh_deb_gits_pkg_exppsy_pa), 0, 0, 1, 0}, {&__pyx_n_s_import, __pyx_k_import, sizeof(__pyx_k_import), 0, 0, 1, 1}, {&__pyx_n_s_init, __pyx_k_init, sizeof(__pyx_k_init), 0, 0, 1, 1}, {&__pyx_n_s_items, __pyx_k_items, sizeof(__pyx_k_items), 0, 0, 1, 1}, {&__pyx_n_s_iteritems, __pyx_k_iteritems, sizeof(__pyx_k_iteritems), 0, 0, 1, 1}, {&__pyx_n_s_list_hook, __pyx_k_list_hook, sizeof(__pyx_k_list_hook), 0, 0, 1, 1}, {&__pyx_kp_s_list_hook_must_be_a_callable, __pyx_k_list_hook_must_be_a_callable, sizeof(__pyx_k_list_hook_must_be_a_callable), 0, 0, 1, 0}, {&__pyx_n_s_main, __pyx_k_main, sizeof(__pyx_k_main), 0, 0, 1, 1}, {&__pyx_n_s_max_buffer_size, __pyx_k_max_buffer_size, sizeof(__pyx_k_max_buffer_size), 0, 0, 1, 1}, {&__pyx_n_s_metaclass, __pyx_k_metaclass, sizeof(__pyx_k_metaclass), 0, 0, 1, 1}, {&__pyx_n_s_module, __pyx_k_module, sizeof(__pyx_k_module), 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_np, __pyx_k_np, sizeof(__pyx_k_np), 0, 0, 1, 1}, {&__pyx_n_s_numpy, __pyx_k_numpy, sizeof(__pyx_k_numpy), 0, 0, 1, 1}, {&__pyx_n_s_o, __pyx_k_o, sizeof(__pyx_k_o), 0, 0, 1, 1}, {&__pyx_n_s_obj, __pyx_k_obj, sizeof(__pyx_k_obj), 0, 0, 1, 1}, {&__pyx_n_s_object_hook, __pyx_k_object_hook, sizeof(__pyx_k_object_hook), 0, 0, 1, 1}, {&__pyx_kp_s_object_hook_must_be_a_callable, __pyx_k_object_hook_must_be_a_callable, sizeof(__pyx_k_object_hook_must_be_a_callable), 0, 0, 1, 0}, {&__pyx_n_s_object_pairs_hook, __pyx_k_object_pairs_hook, sizeof(__pyx_k_object_pairs_hook), 0, 0, 1, 1}, {&__pyx_kp_s_object_pairs_hook_and_object_hoo, __pyx_k_object_pairs_hook_and_object_hoo, sizeof(__pyx_k_object_pairs_hook_and_object_hoo), 0, 0, 1, 0}, {&__pyx_kp_s_object_pairs_hook_must_be_a_call, __pyx_k_object_pairs_hook_must_be_a_call, sizeof(__pyx_k_object_pairs_hook_must_be_a_call), 0, 0, 1, 0}, {&__pyx_n_s_off, __pyx_k_off, sizeof(__pyx_k_off), 0, 0, 1, 1}, {&__pyx_n_s_pack, __pyx_k_pack, sizeof(__pyx_k_pack), 0, 0, 1, 1}, {&__pyx_n_s_packb, __pyx_k_packb, sizeof(__pyx_k_packb), 0, 0, 1, 1}, {&__pyx_n_s_packed, __pyx_k_packed, sizeof(__pyx_k_packed), 0, 0, 1, 1}, {&__pyx_n_s_packer, __pyx_k_packer, sizeof(__pyx_k_packer), 0, 0, 1, 1}, {&__pyx_n_s_pandas_msgpack, __pyx_k_pandas_msgpack, sizeof(__pyx_k_pandas_msgpack), 0, 0, 1, 1}, {&__pyx_n_s_prepare, __pyx_k_prepare, sizeof(__pyx_k_prepare), 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_qualname, __pyx_k_qualname, sizeof(__pyx_k_qualname), 0, 0, 1, 1}, {&__pyx_n_s_range, __pyx_k_range, sizeof(__pyx_k_range), 0, 0, 1, 1}, {&__pyx_n_s_read, __pyx_k_read, sizeof(__pyx_k_read), 0, 0, 1, 1}, {&__pyx_n_s_read_size, __pyx_k_read_size, sizeof(__pyx_k_read_size), 0, 0, 1, 1}, {&__pyx_kp_s_read_size_should_be_less_or_equa, __pyx_k_read_size_should_be_less_or_equa, sizeof(__pyx_k_read_size_should_be_less_or_equa), 0, 0, 1, 0}, {&__pyx_kp_s_recursion_limit_exceeded, __pyx_k_recursion_limit_exceeded, sizeof(__pyx_k_recursion_limit_exceeded), 0, 0, 1, 0}, {&__pyx_n_s_ret, __pyx_k_ret, sizeof(__pyx_k_ret), 0, 0, 1, 1}, {&__pyx_n_s_self, __pyx_k_self, sizeof(__pyx_k_self), 0, 0, 1, 1}, {&__pyx_n_s_str, __pyx_k_str, sizeof(__pyx_k_str), 0, 0, 1, 1}, {&__pyx_n_s_stream, __pyx_k_stream, sizeof(__pyx_k_stream), 0, 0, 1, 1}, {&__pyx_n_s_strict, __pyx_k_strict, sizeof(__pyx_k_strict), 0, 0, 1, 1}, {&__pyx_n_s_test, __pyx_k_test, sizeof(__pyx_k_test), 0, 0, 1, 1}, {&__pyx_n_s_unicode_errors, __pyx_k_unicode_errors, sizeof(__pyx_k_unicode_errors), 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_unpack, __pyx_k_unpack, sizeof(__pyx_k_unpack), 0, 0, 1, 1}, {&__pyx_kp_s_unpack_b_recieved_extra_data, __pyx_k_unpack_b_recieved_extra_data, sizeof(__pyx_k_unpack_b_recieved_extra_data), 0, 0, 1, 0}, {&__pyx_n_s_unpackb, __pyx_k_unpackb, sizeof(__pyx_k_unpackb), 0, 0, 1, 1}, {&__pyx_n_s_unpacked, __pyx_k_unpacked, sizeof(__pyx_k_unpacked), 0, 0, 1, 1}, {&__pyx_kp_s_unpacker_feed_is_not_be_able_to, __pyx_k_unpacker_feed_is_not_be_able_to, sizeof(__pyx_k_unpacker_feed_is_not_be_able_to), 0, 0, 1, 0}, {&__pyx_n_s_use_list, __pyx_k_use_list, sizeof(__pyx_k_use_list), 0, 0, 1, 1}, {&__pyx_n_s_use_single_float, __pyx_k_use_single_float, sizeof(__pyx_k_use_single_float), 0, 0, 1, 1}, {&__pyx_kp_s_utf_8, __pyx_k_utf_8, sizeof(__pyx_k_utf_8), 0, 0, 1, 0}, {&__pyx_n_s_write, __pyx_k_write, sizeof(__pyx_k_write), 0, 0, 1, 1}, {&__pyx_n_s_write_bytes, __pyx_k_write_bytes, sizeof(__pyx_k_write_bytes), 0, 0, 1, 1}, {0, 0, 0, 0, 0, 0, 0} }; static int __Pyx_InitCachedBuiltins(void) { __pyx_builtin_IOError = __Pyx_GetBuiltinName(__pyx_n_s_IOError); if (!__pyx_builtin_IOError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 20; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_builtin_ValueError = __Pyx_GetBuiltinName(__pyx_n_s_ValueError); if (!__pyx_builtin_ValueError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 32; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_builtin_MemoryError = __Pyx_GetBuiltinName(__pyx_n_s_MemoryError); if (!__pyx_builtin_MemoryError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 131; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_builtin_TypeError = __Pyx_GetBuiltinName(__pyx_n_s_TypeError); if (!__pyx_builtin_TypeError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 141; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_builtin_StopIteration = __Pyx_GetBuiltinName(__pyx_n_s_StopIteration); if (!__pyx_builtin_StopIteration) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 604; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_range) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 230; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_builtin_RuntimeError = __Pyx_GetBuiltinName(__pyx_n_s_RuntimeError); if (!__pyx_builtin_RuntimeError) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 803; __pyx_clineno = __LINE__; goto __pyx_L1_error;} return 0; __pyx_L1_error:; return -1; } static int __Pyx_InitCachedConstants(void) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0); /* "pandas/msgpack.pyx":131 * self.pk.buf = malloc(buf_size); * if self.pk.buf == NULL: * raise MemoryError("Unable to allocate internal buffer.") # <<<<<<<<<<<<<< * self.pk.buf_size = buf_size * self.pk.length = 0 */ __pyx_tuple_ = PyTuple_Pack(1, __pyx_kp_s_Unable_to_allocate_internal_buff); if (unlikely(!__pyx_tuple_)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 131; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple_); __Pyx_GIVEREF(__pyx_tuple_); /* "pandas/msgpack.pyx":141 * if default is not None: * if not PyCallable_Check(default): * raise TypeError("default must be a callable.") # <<<<<<<<<<<<<< * self._default = default * if encoding is None: */ __pyx_tuple__2 = PyTuple_Pack(1, __pyx_kp_s_default_must_be_a_callable); if (unlikely(!__pyx_tuple__2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 141; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__2); __Pyx_GIVEREF(__pyx_tuple__2); /* "pandas/msgpack.pyx":148 * else: * if isinstance(encoding, unicode): * self._bencoding = encoding.encode('ascii') # <<<<<<<<<<<<<< * else: * self._bencoding = encoding */ __pyx_tuple__3 = PyTuple_Pack(1, __pyx_n_s_ascii); if (unlikely(!__pyx_tuple__3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 148; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__3); __Pyx_GIVEREF(__pyx_tuple__3); /* "pandas/msgpack.pyx":153 * self.encoding = PyBytes_AsString(self._bencoding) * if isinstance(unicode_errors, unicode): * self._berrors = unicode_errors.encode('ascii') # <<<<<<<<<<<<<< * else: * self._berrors = unicode_errors */ __pyx_tuple__4 = PyTuple_Pack(1, __pyx_n_s_ascii); if (unlikely(!__pyx_tuple__4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 153; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__4); __Pyx_GIVEREF(__pyx_tuple__4); /* "pandas/msgpack.pyx":177 * * if nest_limit < 0: * raise PackValueError("recursion limit exceeded.") # <<<<<<<<<<<<<< * * if o is None: */ __pyx_tuple__6 = PyTuple_Pack(1, __pyx_kp_s_recursion_limit_exceeded); if (unlikely(!__pyx_tuple__6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 177; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__6); __Pyx_GIVEREF(__pyx_tuple__6); /* "pandas/msgpack.pyx":210 * elif PyUnicode_Check(o): * if not self.encoding: * raise TypeError("Can't encode unicode string: no encoding is specified") # <<<<<<<<<<<<<< * o = PyUnicode_AsEncodedString(o, self.encoding, self.unicode_errors) * rawval = o */ __pyx_tuple__7 = PyTuple_Pack(1, __pyx_kp_s_Can_t_encode_unicode_string_no_e); if (unlikely(!__pyx_tuple__7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 210; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__7); __Pyx_GIVEREF(__pyx_tuple__7); /* "pandas/msgpack.pyx":342 * * if object_hook is not None and object_pairs_hook is not None: * raise ValueError("object_pairs_hook and object_hook are mutually exclusive.") # <<<<<<<<<<<<<< * * if object_hook is not None: */ __pyx_tuple__8 = PyTuple_Pack(1, __pyx_kp_s_object_pairs_hook_and_object_hoo); if (unlikely(!__pyx_tuple__8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 342; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__8); __Pyx_GIVEREF(__pyx_tuple__8); /* "pandas/msgpack.pyx":346 * if object_hook is not None: * if not PyCallable_Check(object_hook): * raise TypeError("object_hook must be a callable.") # <<<<<<<<<<<<<< * ctx.user.object_hook = object_hook * */ __pyx_tuple__9 = PyTuple_Pack(1, __pyx_kp_s_object_hook_must_be_a_callable); if (unlikely(!__pyx_tuple__9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 346; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__9); __Pyx_GIVEREF(__pyx_tuple__9); /* "pandas/msgpack.pyx":353 * else: * if not PyCallable_Check(object_pairs_hook): * raise TypeError("object_pairs_hook must be a callable.") # <<<<<<<<<<<<<< * ctx.user.object_hook = object_pairs_hook * ctx.user.has_pairs_hook = True */ __pyx_tuple__10 = PyTuple_Pack(1, __pyx_kp_s_object_pairs_hook_must_be_a_call); if (unlikely(!__pyx_tuple__10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 353; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__10); __Pyx_GIVEREF(__pyx_tuple__10); /* "pandas/msgpack.pyx":359 * if list_hook is not None: * if not PyCallable_Check(list_hook): * raise TypeError("list_hook must be a callable.") # <<<<<<<<<<<<<< * ctx.user.list_hook = list_hook * */ __pyx_tuple__11 = PyTuple_Pack(1, __pyx_kp_s_list_hook_must_be_a_callable); if (unlikely(!__pyx_tuple__11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 359; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__11); __Pyx_GIVEREF(__pyx_tuple__11); /* "pandas/msgpack.pyx":386 * if encoding is not None: * if isinstance(encoding, unicode): * encoding = encoding.encode('ascii') # <<<<<<<<<<<<<< * cenc = PyBytes_AsString(encoding) * */ __pyx_tuple__12 = PyTuple_Pack(1, __pyx_n_s_ascii); if (unlikely(!__pyx_tuple__12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 386; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__12); __Pyx_GIVEREF(__pyx_tuple__12); /* "pandas/msgpack.pyx":391 * if unicode_errors is not None: * if isinstance(unicode_errors, unicode): * unicode_errors = unicode_errors.encode('ascii') # <<<<<<<<<<<<<< * cerr = PyBytes_AsString(unicode_errors) * */ __pyx_tuple__13 = PyTuple_Pack(1, __pyx_n_s_ascii); if (unlikely(!__pyx_tuple__13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 391; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__13); __Pyx_GIVEREF(__pyx_tuple__13); /* "pandas/msgpack.pyx":495 * self.file_like_read = file_like.read * if not PyCallable_Check(self.file_like_read): * raise ValueError("`file_like.read` must be a callable.") # <<<<<<<<<<<<<< * if not max_buffer_size: * max_buffer_size = INT_MAX */ __pyx_tuple__14 = PyTuple_Pack(1, __pyx_kp_s_file_like_read_must_be_a_callab); if (unlikely(!__pyx_tuple__14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 495; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__14); __Pyx_GIVEREF(__pyx_tuple__14); /* "pandas/msgpack.pyx":499 * max_buffer_size = INT_MAX * if read_size > max_buffer_size: * raise ValueError("read_size should be less or equal to max_buffer_size") # <<<<<<<<<<<<<< * if not read_size: * read_size = min(max_buffer_size, 1024**2) */ __pyx_tuple__15 = PyTuple_Pack(1, __pyx_kp_s_read_size_should_be_less_or_equa); if (unlikely(!__pyx_tuple__15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 499; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__15); __Pyx_GIVEREF(__pyx_tuple__15); /* "pandas/msgpack.pyx":506 * self.buf = malloc(read_size) * if self.buf == NULL: * raise MemoryError("Unable to allocate internal buffer.") # <<<<<<<<<<<<<< * self.buf_size = read_size * self.buf_head = 0 */ __pyx_tuple__16 = PyTuple_Pack(1, __pyx_kp_s_Unable_to_allocate_internal_buff); if (unlikely(!__pyx_tuple__16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 506; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__16); __Pyx_GIVEREF(__pyx_tuple__16); /* "pandas/msgpack.pyx":513 * if encoding is not None: * if isinstance(encoding, unicode): * encoding = encoding.encode('ascii') # <<<<<<<<<<<<<< * self.encoding = encoding * cenc = PyBytes_AsString(encoding) */ __pyx_tuple__17 = PyTuple_Pack(1, __pyx_n_s_ascii); if (unlikely(!__pyx_tuple__17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 513; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__17); __Pyx_GIVEREF(__pyx_tuple__17); /* "pandas/msgpack.pyx":519 * if unicode_errors is not None: * if isinstance(unicode_errors, unicode): * unicode_errors = unicode_errors.encode('ascii') # <<<<<<<<<<<<<< * self.unicode_errors = unicode_errors * cerr = PyBytes_AsString(unicode_errors) */ __pyx_tuple__18 = PyTuple_Pack(1, __pyx_n_s_ascii); if (unlikely(!__pyx_tuple__18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 519; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__18); __Pyx_GIVEREF(__pyx_tuple__18); /* "pandas/msgpack.pyx":530 * cdef Py_ssize_t buf_len * if self.file_like is not None: * raise TypeError( # <<<<<<<<<<<<<< * "unpacker.feed() is not be able to use with `file_like`.") * PyObject_AsReadBuffer(next_bytes, &buf, &buf_len) */ __pyx_tuple__19 = PyTuple_Pack(1, __pyx_kp_s_unpacker_feed_is_not_be_able_to); if (unlikely(!__pyx_tuple__19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 530; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__19); __Pyx_GIVEREF(__pyx_tuple__19); /* "pandas/msgpack.pyx":560 * # self.buf still holds old buffer and will be freed during * # obj destruction * raise MemoryError("Unable to enlarge internal buffer.") # <<<<<<<<<<<<<< * memcpy(new_buf, buf + head, tail - head) * free(buf) */ __pyx_tuple__20 = PyTuple_Pack(1, __pyx_kp_s_Unable_to_enlarge_internal_buffe); if (unlikely(!__pyx_tuple__20)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 560; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__20); __Pyx_GIVEREF(__pyx_tuple__20); /* "pandas/msgpack.pyx":604 * continue * if iter: * raise StopIteration("No more data to unpack.") # <<<<<<<<<<<<<< * else: * raise OutOfData("No more data to unpack.") */ __pyx_tuple__21 = PyTuple_Pack(1, __pyx_kp_s_No_more_data_to_unpack); if (unlikely(!__pyx_tuple__21)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 604; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__21); __Pyx_GIVEREF(__pyx_tuple__21); /* "pandas/msgpack.pyx":606 * raise StopIteration("No more data to unpack.") * else: * raise OutOfData("No more data to unpack.") # <<<<<<<<<<<<<< * else: * raise ValueError("Unpack failed: error = %d" % (ret,)) */ __pyx_tuple__22 = PyTuple_Pack(1, __pyx_kp_s_No_more_data_to_unpack); if (unlikely(!__pyx_tuple__22)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 606; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__22); __Pyx_GIVEREF(__pyx_tuple__22); /* "numpy.pxd":217 * 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__23 = PyTuple_Pack(1, __pyx_kp_u_ndarray_is_not_C_contiguous); if (unlikely(!__pyx_tuple__23)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 217; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__23); __Pyx_GIVEREF(__pyx_tuple__23); /* "numpy.pxd":221 * 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__24 = PyTuple_Pack(1, __pyx_kp_u_ndarray_is_not_Fortran_contiguou); if (unlikely(!__pyx_tuple__24)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 221; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__24); __Pyx_GIVEREF(__pyx_tuple__24); /* "numpy.pxd":259 * if ((descr.byteorder == '>' and little_endian) or * (descr.byteorder == '<' 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__25 = PyTuple_Pack(1, __pyx_kp_u_Non_native_byte_order_not_suppor); if (unlikely(!__pyx_tuple__25)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 259; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__25); __Pyx_GIVEREF(__pyx_tuple__25); /* "numpy.pxd":803 * * if (end - f) - (new_offset - offset[0]) < 15: * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") # <<<<<<<<<<<<<< * * if ((child.byteorder == '>' and little_endian) or */ __pyx_tuple__26 = PyTuple_Pack(1, __pyx_kp_u_Format_string_allocated_too_shor); if (unlikely(!__pyx_tuple__26)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 803; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__26); __Pyx_GIVEREF(__pyx_tuple__26); /* "numpy.pxd":807 * if ((child.byteorder == '>' and little_endian) or * (child.byteorder == '<' 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__27 = PyTuple_Pack(1, __pyx_kp_u_Non_native_byte_order_not_suppor); if (unlikely(!__pyx_tuple__27)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 807; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__27); __Pyx_GIVEREF(__pyx_tuple__27); /* "numpy.pxd":827 * 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__28 = PyTuple_Pack(1, __pyx_kp_u_Format_string_allocated_too_shor_2); if (unlikely(!__pyx_tuple__28)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 827; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__28); __Pyx_GIVEREF(__pyx_tuple__28); /* "pandas/msgpack.pyx":37 * * class ExtraData(ValueError): * def __init__(self, unpacked, extra): # <<<<<<<<<<<<<< * self.unpacked = unpacked * self.extra = extra */ __pyx_tuple__29 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_unpacked, __pyx_n_s_extra); if (unlikely(!__pyx_tuple__29)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 37; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__29); __Pyx_GIVEREF(__pyx_tuple__29); __pyx_codeobj__30 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__29, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_yoh_deb_gits_pkg_exppsy_pa, __pyx_n_s_init, 37, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__30)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 37; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/msgpack.pyx":41 * self.extra = extra * * def __str__(self): # <<<<<<<<<<<<<< * return "unpack(b) recieved extra data." * */ __pyx_tuple__31 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__31)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 41; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__31); __Pyx_GIVEREF(__pyx_tuple__31); __pyx_codeobj__32 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__31, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_yoh_deb_gits_pkg_exppsy_pa, __pyx_n_s_str, 41, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__32)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 41; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/msgpack.pyx":320 * return ret * * def pack(object o, object stream, default=None, encoding='utf-8', unicode_errors='strict'): # <<<<<<<<<<<<<< * """ * pack an object `o` and write it to stream).""" */ __pyx_tuple__33 = PyTuple_Pack(6, __pyx_n_s_o, __pyx_n_s_stream, __pyx_n_s_default, __pyx_n_s_encoding, __pyx_n_s_unicode_errors, __pyx_n_s_packer); if (unlikely(!__pyx_tuple__33)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 320; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__33); __Pyx_GIVEREF(__pyx_tuple__33); __pyx_codeobj__34 = (PyObject*)__Pyx_PyCode_New(5, 0, 6, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__33, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_yoh_deb_gits_pkg_exppsy_pa, __pyx_n_s_pack, 320, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__34)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 320; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/msgpack.pyx":326 * stream.write(packer.pack(o)) * * def packb(object o, default=None, encoding='utf-8', unicode_errors='strict', use_single_float=False): # <<<<<<<<<<<<<< * """ * pack o and return packed bytes.""" */ __pyx_tuple__35 = PyTuple_Pack(6, __pyx_n_s_o, __pyx_n_s_default, __pyx_n_s_encoding, __pyx_n_s_unicode_errors, __pyx_n_s_use_single_float, __pyx_n_s_packer); if (unlikely(!__pyx_tuple__35)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 326; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__35); __Pyx_GIVEREF(__pyx_tuple__35); __pyx_codeobj__36 = (PyObject*)__Pyx_PyCode_New(5, 0, 6, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__35, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_yoh_deb_gits_pkg_exppsy_pa, __pyx_n_s_packb, 326, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__36)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 326; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/msgpack.pyx":365 * ctx.user.unicode_errors = unicode_errors * * def unpackb(object packed, object object_hook=None, object list_hook=None, # <<<<<<<<<<<<<< * bint use_list=1, encoding=None, unicode_errors="strict", * object_pairs_hook=None, */ __pyx_tuple__37 = PyTuple_Pack(15, __pyx_n_s_packed, __pyx_n_s_object_hook, __pyx_n_s_list_hook, __pyx_n_s_use_list, __pyx_n_s_encoding, __pyx_n_s_unicode_errors, __pyx_n_s_object_pairs_hook, __pyx_n_s_ctx, __pyx_n_s_off, __pyx_n_s_ret, __pyx_n_s_buf, __pyx_n_s_buf_len, __pyx_n_s_cenc, __pyx_n_s_cerr, __pyx_n_s_obj); if (unlikely(!__pyx_tuple__37)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 365; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__37); __Pyx_GIVEREF(__pyx_tuple__37); __pyx_codeobj__38 = (PyObject*)__Pyx_PyCode_New(7, 0, 15, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__37, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_yoh_deb_gits_pkg_exppsy_pa, __pyx_n_s_unpackb, 365, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__38)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 365; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/msgpack.pyx":407 * * * def unpack(object stream, object object_hook=None, object list_hook=None, # <<<<<<<<<<<<<< * bint use_list=1, encoding=None, unicode_errors="strict", * object_pairs_hook=None, */ __pyx_tuple__39 = PyTuple_Pack(7, __pyx_n_s_stream, __pyx_n_s_object_hook, __pyx_n_s_list_hook, __pyx_n_s_use_list, __pyx_n_s_encoding, __pyx_n_s_unicode_errors, __pyx_n_s_object_pairs_hook); if (unlikely(!__pyx_tuple__39)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 407; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__39); __Pyx_GIVEREF(__pyx_tuple__39); __pyx_codeobj__40 = (PyObject*)__Pyx_PyCode_New(7, 0, 7, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__39, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_yoh_deb_gits_pkg_exppsy_pa, __pyx_n_s_unpack, 407, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__40)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 407; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __pyx_int_0 = PyInt_FromLong(0); if (unlikely(!__pyx_int_0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_int_15 = PyInt_FromLong(15); if (unlikely(!__pyx_int_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} return 0; __pyx_L1_error:; return -1; } #if PY_MAJOR_VERSION < 3 PyMODINIT_FUNC initmsgpack(void); /*proto*/ PyMODINIT_FUNC initmsgpack(void) #else PyMODINIT_FUNC PyInit_msgpack(void); /*proto*/ PyMODINIT_FUNC PyInit_msgpack(void) #endif { PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannyDeclarations #if CYTHON_REFNANNY __Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny"); if (!__Pyx_RefNanny) { PyErr_Clear(); __Pyx_RefNanny = __Pyx_RefNannyImportAPI("Cython.Runtime.refnanny"); if (!__Pyx_RefNanny) Py_FatalError("failed to import 'refnanny' module"); } #endif __Pyx_RefNannySetupContext("PyMODINIT_FUNC PyInit_msgpack(void)", 0); if ( __Pyx_check_binary_version() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_empty_tuple)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_bytes)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #ifdef __Pyx_CyFunction_USED if (__Pyx_CyFunction_init() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif #ifdef __Pyx_FusedFunction_USED if (__pyx_FusedFunction_init() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif #ifdef __Pyx_Generator_USED if (__pyx_Generator_init() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif /*--- Library function declarations ---*/ /*--- Threads initialization code ---*/ #if defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS #ifdef WITH_THREAD /* Python build with threading support? */ PyEval_InitThreads(); #endif #endif /*--- Module creation code ---*/ #if PY_MAJOR_VERSION < 3 __pyx_m = Py_InitModule4(__Pyx_NAMESTR("msgpack"), __pyx_methods, 0, 0, PYTHON_API_VERSION); Py_XINCREF(__pyx_m); #else __pyx_m = PyModule_Create(&__pyx_moduledef); #endif if (unlikely(!__pyx_m)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_d)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} Py_INCREF(__pyx_d); __pyx_b = PyImport_AddModule(__Pyx_NAMESTR(__Pyx_BUILTIN_MODULE_NAME)); if (unlikely(!__pyx_b)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #if CYTHON_COMPILING_IN_PYPY Py_INCREF(__pyx_b); #endif if (__Pyx_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; /*--- Initialize various global constants etc. ---*/ if (unlikely(__Pyx_InitGlobals() < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif if (__pyx_module_is_main_pandas__msgpack) { if (__Pyx_SetAttrString(__pyx_m, "__name__", __pyx_n_s_main) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; } #if PY_MAJOR_VERSION >= 3 { PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (!PyDict_GetItemString(modules, "pandas.msgpack")) { if (unlikely(PyDict_SetItemString(modules, "pandas.msgpack", __pyx_m) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } } #endif /*--- Builtin init code ---*/ if (unlikely(__Pyx_InitCachedBuiltins() < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /*--- Constants init code ---*/ if (unlikely(__Pyx_InitCachedConstants() < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /*--- Global init code ---*/ /*--- Variable export code ---*/ /*--- Function export code ---*/ /*--- Type init code ---*/ __pyx_vtabptr_6pandas_7msgpack_Packer = &__pyx_vtable_6pandas_7msgpack_Packer; __pyx_vtable_6pandas_7msgpack_Packer._pack = (int (*)(struct __pyx_obj_6pandas_7msgpack_Packer *, PyObject *, struct __pyx_opt_args_6pandas_7msgpack_6Packer__pack *__pyx_optional_args))__pyx_f_6pandas_7msgpack_6Packer__pack; __pyx_vtable_6pandas_7msgpack_Packer.pack = (PyObject *(*)(struct __pyx_obj_6pandas_7msgpack_Packer *, PyObject *, int __pyx_skip_dispatch))__pyx_f_6pandas_7msgpack_6Packer_pack; __pyx_vtable_6pandas_7msgpack_Packer.pack_pair = (PyObject *(*)(struct __pyx_obj_6pandas_7msgpack_Packer *, PyObject *, PyObject *, int))__pyx_f_6pandas_7msgpack_6Packer_pack_pair; if (PyType_Ready(&__pyx_type_6pandas_7msgpack_Packer) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 99; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_type_6pandas_7msgpack_Packer.tp_print = 0; if (__Pyx_SetVtable(__pyx_type_6pandas_7msgpack_Packer.tp_dict, __pyx_vtabptr_6pandas_7msgpack_Packer) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 99; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__Pyx_SetAttrString(__pyx_m, "Packer", (PyObject *)&__pyx_type_6pandas_7msgpack_Packer) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 99; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_6pandas_7msgpack_Packer = &__pyx_type_6pandas_7msgpack_Packer; __pyx_vtabptr_6pandas_7msgpack_Unpacker = &__pyx_vtable_6pandas_7msgpack_Unpacker; __pyx_vtable_6pandas_7msgpack_Unpacker.append_buffer = (PyObject *(*)(struct __pyx_obj_6pandas_7msgpack_Unpacker *, void *, Py_ssize_t))__pyx_f_6pandas_7msgpack_8Unpacker_append_buffer; __pyx_vtable_6pandas_7msgpack_Unpacker.read_from_file = (PyObject *(*)(struct __pyx_obj_6pandas_7msgpack_Unpacker *))__pyx_f_6pandas_7msgpack_8Unpacker_read_from_file; __pyx_vtable_6pandas_7msgpack_Unpacker._unpack = (PyObject *(*)(struct __pyx_obj_6pandas_7msgpack_Unpacker *, execute_fn, PyObject *, struct __pyx_opt_args_6pandas_7msgpack_8Unpacker__unpack *__pyx_optional_args))__pyx_f_6pandas_7msgpack_8Unpacker__unpack; if (PyType_Ready(&__pyx_type_6pandas_7msgpack_Unpacker) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 421; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_type_6pandas_7msgpack_Unpacker.tp_print = 0; if (__Pyx_SetVtable(__pyx_type_6pandas_7msgpack_Unpacker.tp_dict, __pyx_vtabptr_6pandas_7msgpack_Unpacker) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 421; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__Pyx_SetAttrString(__pyx_m, "Unpacker", (PyObject *)&__pyx_type_6pandas_7msgpack_Unpacker) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 421; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_6pandas_7msgpack_Unpacker = &__pyx_type_6pandas_7msgpack_Unpacker; /*--- Type import code ---*/ __pyx_ptype_7cpython_4type_type = __Pyx_ImportType(__Pyx_BUILTIN_MODULE_NAME, "type", #if CYTHON_COMPILING_IN_PYPY sizeof(PyTypeObject), #else sizeof(PyHeapTypeObject), #endif 0); if (unlikely(!__pyx_ptype_7cpython_4type_type)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 9; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_7cpython_4bool_bool = __Pyx_ImportType(__Pyx_BUILTIN_MODULE_NAME, "bool", sizeof(PyBoolObject), 0); if (unlikely(!__pyx_ptype_7cpython_4bool_bool)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 8; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_7cpython_7complex_complex = __Pyx_ImportType(__Pyx_BUILTIN_MODULE_NAME, "complex", sizeof(PyComplexObject), 0); if (unlikely(!__pyx_ptype_7cpython_7complex_complex)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 15; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_5numpy_dtype = __Pyx_ImportType("numpy", "dtype", sizeof(PyArray_Descr), 0); if (unlikely(!__pyx_ptype_5numpy_dtype)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_5numpy_flatiter = __Pyx_ImportType("numpy", "flatiter", sizeof(PyArrayIterObject), 0); if (unlikely(!__pyx_ptype_5numpy_flatiter)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 167; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_5numpy_broadcast = __Pyx_ImportType("numpy", "broadcast", sizeof(PyArrayMultiIterObject), 0); if (unlikely(!__pyx_ptype_5numpy_broadcast)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 171; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_5numpy_ndarray = __Pyx_ImportType("numpy", "ndarray", sizeof(PyArrayObject), 0); if (unlikely(!__pyx_ptype_5numpy_ndarray)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_5numpy_ufunc = __Pyx_ImportType("numpy", "ufunc", sizeof(PyUFuncObject), 0); if (unlikely(!__pyx_ptype_5numpy_ufunc)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 865; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /*--- Variable import code ---*/ /*--- Function import code ---*/ /*--- Execution code ---*/ /* "pandas/msgpack.pyx":17 * * import cython * import numpy as np # <<<<<<<<<<<<<< * from numpy cimport * * */ __pyx_t_1 = __Pyx_Import(__pyx_n_s_numpy, 0, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 17; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_np, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 17; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pandas/msgpack.pyx":20 * from numpy cimport * * * class UnpackException(IOError): # <<<<<<<<<<<<<< * pass * */ __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 20; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_builtin_IOError); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_builtin_IOError); __Pyx_GIVEREF(__pyx_builtin_IOError); __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 20; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_1, __pyx_n_s_UnpackException, __pyx_n_s_UnpackException, (PyObject *) NULL, __pyx_n_s_pandas_msgpack, (PyObject *) NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 20; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_UnpackException, __pyx_t_1, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 20; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); if (PyDict_SetItem(__pyx_d, __pyx_n_s_UnpackException, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 20; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pandas/msgpack.pyx":24 * * * class BufferFull(UnpackException): # <<<<<<<<<<<<<< * pass * */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_UnpackException); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 24; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 24; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 24; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_2, __pyx_n_s_BufferFull, __pyx_n_s_BufferFull, (PyObject *) NULL, __pyx_n_s_pandas_msgpack, (PyObject *) NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 24; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_BufferFull, __pyx_t_2, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 24; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); if (PyDict_SetItem(__pyx_d, __pyx_n_s_BufferFull, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 24; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/msgpack.pyx":28 * * * class OutOfData(UnpackException): # <<<<<<<<<<<<<< * pass * */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_UnpackException); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 28; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 28; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 28; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_1, __pyx_n_s_OutOfData, __pyx_n_s_OutOfData, (PyObject *) NULL, __pyx_n_s_pandas_msgpack, (PyObject *) NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 28; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_OutOfData, __pyx_t_1, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 28; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); if (PyDict_SetItem(__pyx_d, __pyx_n_s_OutOfData, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 28; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pandas/msgpack.pyx":32 * * * class UnpackValueError(UnpackException, ValueError): # <<<<<<<<<<<<<< * pass * */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_UnpackException); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 32; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 32; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_INCREF(__pyx_builtin_ValueError); PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_builtin_ValueError); __Pyx_GIVEREF(__pyx_builtin_ValueError); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 32; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_2, __pyx_n_s_UnpackValueError, __pyx_n_s_UnpackValueError, (PyObject *) NULL, __pyx_n_s_pandas_msgpack, (PyObject *) NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 32; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_UnpackValueError, __pyx_t_2, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 32; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); if (PyDict_SetItem(__pyx_d, __pyx_n_s_UnpackValueError, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 32; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/msgpack.pyx":36 * * * class ExtraData(ValueError): # <<<<<<<<<<<<<< * def __init__(self, unpacked, extra): * self.unpacked = unpacked */ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 36; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_builtin_ValueError); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_builtin_ValueError); __Pyx_GIVEREF(__pyx_builtin_ValueError); __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 36; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_2, __pyx_n_s_ExtraData, __pyx_n_s_ExtraData, (PyObject *) NULL, __pyx_n_s_pandas_msgpack, (PyObject *) NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 36; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); /* "pandas/msgpack.pyx":37 * * class ExtraData(ValueError): * def __init__(self, unpacked, extra): # <<<<<<<<<<<<<< * self.unpacked = unpacked * self.extra = extra */ __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6pandas_7msgpack_9ExtraData_1__init__, 0, __pyx_n_s_ExtraData___init, NULL, __pyx_n_s_pandas_msgpack, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__30)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 37; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_init, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 37; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "pandas/msgpack.pyx":41 * self.extra = extra * * def __str__(self): # <<<<<<<<<<<<<< * return "unpack(b) recieved extra data." * */ __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6pandas_7msgpack_9ExtraData_3__str__, 0, __pyx_n_s_ExtraData___str, NULL, __pyx_n_s_pandas_msgpack, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__32)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 41; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_str, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 41; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "pandas/msgpack.pyx":36 * * * class ExtraData(ValueError): # <<<<<<<<<<<<<< * def __init__(self, unpacked, extra): * self.unpacked = unpacked */ __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_ExtraData, __pyx_t_2, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 36; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); if (PyDict_SetItem(__pyx_d, __pyx_n_s_ExtraData, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 36; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/msgpack.pyx":44 * return "unpack(b) recieved extra data." * * class PackException(IOError): # <<<<<<<<<<<<<< * pass * */ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 44; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_builtin_IOError); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_builtin_IOError); __Pyx_GIVEREF(__pyx_builtin_IOError); __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 44; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_2, __pyx_n_s_PackException, __pyx_n_s_PackException, (PyObject *) NULL, __pyx_n_s_pandas_msgpack, (PyObject *) NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 44; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_PackException, __pyx_t_2, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 44; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); if (PyDict_SetItem(__pyx_d, __pyx_n_s_PackException, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 44; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/msgpack.pyx":47 * pass * * class PackValueError(PackException, ValueError): # <<<<<<<<<<<<<< * pass * */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_PackException); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 47; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 47; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __Pyx_INCREF(__pyx_builtin_ValueError); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_builtin_ValueError); __Pyx_GIVEREF(__pyx_builtin_ValueError); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 47; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_1, __pyx_n_s_PackValueError, __pyx_n_s_PackValueError, (PyObject *) NULL, __pyx_n_s_pandas_msgpack, (PyObject *) NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 47; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_PackValueError, __pyx_t_1, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 47; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); if (PyDict_SetItem(__pyx_d, __pyx_n_s_PackValueError, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 47; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pandas/msgpack.pyx":95 * int msgpack_pack_raw_body(msgpack_packer* pk, char* body, size_t l) * * cdef int DEFAULT_RECURSE_LIMIT=511 # <<<<<<<<<<<<<< * * */ __pyx_v_6pandas_7msgpack_DEFAULT_RECURSE_LIMIT = 511; /* "pandas/msgpack.pyx":163 * @cython.boundscheck(False) * @cython.wraparound(False) * cdef int _pack(self, object o, int nest_limit=DEFAULT_RECURSE_LIMIT) except -1: # <<<<<<<<<<<<<< * cdef long long llval * cdef unsigned long long ullval */ __pyx_k__5 = __pyx_v_6pandas_7msgpack_DEFAULT_RECURSE_LIMIT; /* "pandas/msgpack.pyx":320 * return ret * * def pack(object o, object stream, default=None, encoding='utf-8', unicode_errors='strict'): # <<<<<<<<<<<<<< * """ * pack an object `o` and write it to stream).""" */ __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_6pandas_7msgpack_1pack, NULL, __pyx_n_s_pandas_msgpack); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 320; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_pack, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 320; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pandas/msgpack.pyx":326 * stream.write(packer.pack(o)) * * def packb(object o, default=None, encoding='utf-8', unicode_errors='strict', use_single_float=False): # <<<<<<<<<<<<<< * """ * pack o and return packed bytes.""" */ __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_6pandas_7msgpack_3packb, NULL, __pyx_n_s_pandas_msgpack); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 326; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_packb, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 326; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pandas/msgpack.pyx":365 * ctx.user.unicode_errors = unicode_errors * * def unpackb(object packed, object object_hook=None, object list_hook=None, # <<<<<<<<<<<<<< * bint use_list=1, encoding=None, unicode_errors="strict", * object_pairs_hook=None, */ __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_6pandas_7msgpack_5unpackb, NULL, __pyx_n_s_pandas_msgpack); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 365; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_unpackb, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 365; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pandas/msgpack.pyx":407 * * * def unpack(object stream, object object_hook=None, object list_hook=None, # <<<<<<<<<<<<<< * bint use_list=1, encoding=None, unicode_errors="strict", * object_pairs_hook=None, */ __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_6pandas_7msgpack_7unpack, NULL, __pyx_n_s_pandas_msgpack); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 407; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_unpack, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 407; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pandas/msgpack.pyx":1 * # coding: utf-8 # <<<<<<<<<<<<<< * #cython: embedsignature=True * #cython: profile=False */ __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_test, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "numpy.pxd":979 * arr.base = baseptr * * cdef inline object get_array_base(ndarray arr): # <<<<<<<<<<<<<< * if arr.base is NULL: * return 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); if (__pyx_m) { __Pyx_AddTraceback("init pandas.msgpack", __pyx_clineno, __pyx_lineno, __pyx_filename); Py_DECREF(__pyx_m); __pyx_m = 0; } else if (!PyErr_Occurred()) { PyErr_SetString(PyExc_ImportError, "init pandas.msgpack"); } __pyx_L0:; __Pyx_RefNannyFinishContext(); #if PY_MAJOR_VERSION < 3 return; #else return __pyx_m; #endif } /* Runtime support code */ #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 /* CYTHON_REFNANNY */ 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; } 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); } 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 } 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; } static CYTHON_INLINE int __Pyx_CheckKeywordStrings( PyObject *kwdict, const char* function_name, int kw_allowed) { PyObject* key = 0; Py_ssize_t pos = 0; #if CPYTHON_COMPILING_IN_PYPY if (!kw_allowed && PyDict_Next(kwdict, &pos, &key, 0)) goto invalid_keyword; return 1; #else while (PyDict_Next(kwdict, &pos, &key, 0)) { #if PY_MAJOR_VERSION < 3 if (unlikely(!PyString_CheckExact(key)) && unlikely(!PyString_Check(key))) #endif if (unlikely(!PyUnicode_Check(key))) goto invalid_keyword_type; } if ((!kw_allowed) && unlikely(key)) goto invalid_keyword; return 1; invalid_keyword_type: PyErr_Format(PyExc_TypeError, "%.200s() keywords must be strings", function_name); return 0; #endif invalid_keyword: PyErr_Format(PyExc_TypeError, #if PY_MAJOR_VERSION < 3 "%.200s() got an unexpected keyword argument '%.200s'", function_name, PyString_AsString(key)); #else "%s() got an unexpected keyword argument '%U'", function_name, key); #endif return 0; } static CYTHON_INLINE void __Pyx_ErrRestore(PyObject *type, PyObject *value, PyObject *tb) { #if CYTHON_COMPILING_IN_CPYTHON PyObject *tmp_type, *tmp_value, *tmp_tb; PyThreadState *tstate = PyThreadState_GET(); 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); #else PyErr_Restore(type, value, tb); #endif } static CYTHON_INLINE void __Pyx_ErrFetch(PyObject **type, PyObject **value, PyObject **tb) { #if CYTHON_COMPILING_IN_CPYTHON PyThreadState *tstate = PyThreadState_GET(); *type = tstate->curexc_type; *value = tstate->curexc_value; *tb = tstate->curexc_traceback; tstate->curexc_type = 0; tstate->curexc_value = 0; tstate->curexc_traceback = 0; #else PyErr_Fetch(type, value, tb); #endif } #if PY_MAJOR_VERSION < 3 static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, CYTHON_UNUSED PyObject *cause) { 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 PY_VERSION_HEX < 0x02050000 if (PyClass_Check(type)) { #else if (PyType_Check(type)) { #endif #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; #if PY_VERSION_HEX < 0x02050000 if (PyInstance_Check(type)) { type = (PyObject*) ((PyInstanceObject*)type)->in_class; Py_INCREF(type); } else { type = 0; PyErr_SetString(PyExc_TypeError, "raise: exception must be an old-style class or instance"); goto raise_error; } #else 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; } #endif } __Pyx_ErrRestore(type, value, tb); return; raise_error: Py_XDECREF(value); Py_XDECREF(type); Py_XDECREF(tb); return; } #else /* Python 3+ */ 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) { if (PyObject_IsSubclass(instance_class, type)) { type = instance_class; } else { instance_class = NULL; } } } if (!instance_class) { PyObject *args; if (!value) args = PyTuple_New(0); else if (PyTuple_Check(value)) { Py_INCREF(value); args = value; } else args = PyTuple_Pack(1, value); if (!args) goto bad; owned_instance = PyObject_Call(type, args, NULL); Py_DECREF(args); if (!owned_instance) goto bad; value = owned_instance; if (!PyExceptionInstance_Check(value)) { PyErr_Format(PyExc_TypeError, "calling %R should have returned an instance of " "BaseException, not %R", type, Py_TYPE(value)); goto bad; } } } else { PyErr_SetString(PyExc_TypeError, "raise: exception class must be a subclass of BaseException"); goto bad; } #if PY_VERSION_HEX >= 0x03030000 if (cause) { #else if (cause && cause != Py_None) { #endif PyObject *fixed_cause; if (cause == Py_None) { fixed_cause = NULL; } else if (PyExceptionClass_Check(cause)) { fixed_cause = PyObject_CallObject(cause, NULL); if (fixed_cause == NULL) goto bad; } else if (PyExceptionInstance_Check(cause)) { fixed_cause = cause; Py_INCREF(fixed_cause); } else { PyErr_SetString(PyExc_TypeError, "exception causes must derive from " "BaseException"); goto bad; } PyException_SetCause(value, fixed_cause); } PyErr_SetObject(type, value); if (tb) { PyThreadState *tstate = PyThreadState_GET(); PyObject* tmp_tb = tstate->curexc_traceback; if (tb != tmp_tb) { Py_INCREF(tb); tstate->curexc_traceback = tb; Py_XDECREF(tmp_tb); } } bad: Py_XDECREF(owned_instance); return; } #endif static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type) { if (unlikely(!type)) { PyErr_SetString(PyExc_SystemError, "Missing type object"); return 0; } if (likely(PyObject_TypeCheck(obj, type))) return 1; PyErr_Format(PyExc_TypeError, "Cannot convert %.200s to %.200s", Py_TYPE(obj)->tp_name, type->tp_name); return 0; } static CYTHON_INLINE PyObject *__Pyx_GetModuleGlobalName(PyObject *name) { PyObject *result; #if CYTHON_COMPILING_IN_CPYTHON result = PyDict_GetItem(__pyx_d, name); if (result) { Py_INCREF(result); } else { #else result = PyObject_GetItem(__pyx_d, name); if (!result) { PyErr_Clear(); #endif result = __Pyx_GetBuiltinName(name); } return result; } static CYTHON_INLINE int __Pyx_IterFinish(void) { #if CYTHON_COMPILING_IN_CPYTHON PyThreadState *tstate = PyThreadState_GET(); PyObject* exc_type = tstate->curexc_type; if (unlikely(exc_type)) { if (likely(exc_type == PyExc_StopIteration) || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration)) { PyObject *exc_value, *exc_tb; exc_value = tstate->curexc_value; exc_tb = tstate->curexc_traceback; tstate->curexc_type = 0; tstate->curexc_value = 0; tstate->curexc_traceback = 0; Py_DECREF(exc_type); Py_XDECREF(exc_value); Py_XDECREF(exc_tb); return 0; } else { return -1; } } return 0; #else if (unlikely(PyErr_Occurred())) { if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) { PyErr_Clear(); return 0; } else { return -1; } } return 0; #endif } 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); } 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"); } static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); } static void __Pyx_UnpackTupleError(PyObject *t, Py_ssize_t index) { if (t == Py_None) { __Pyx_RaiseNoneNotIterableError(); } else if (PyTuple_GET_SIZE(t) < index) { __Pyx_RaiseNeedMoreValuesError(PyTuple_GET_SIZE(t)); } else { __Pyx_RaiseTooManyValuesError(index); } } 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; } static CYTHON_INLINE int __Pyx_unpack_tuple2(PyObject* tuple, PyObject** pvalue1, PyObject** pvalue2, int is_tuple, int has_known_size, int decref_tuple) { Py_ssize_t index; PyObject *value1 = NULL, *value2 = NULL, *iter = NULL; if (!is_tuple && unlikely(!PyTuple_Check(tuple))) { iternextfunc iternext; iter = PyObject_GetIter(tuple); if (unlikely(!iter)) goto bad; if (decref_tuple) { Py_DECREF(tuple); tuple = NULL; } iternext = Py_TYPE(iter)->tp_iternext; value1 = iternext(iter); if (unlikely(!value1)) { index = 0; goto unpacking_failed; } value2 = iternext(iter); if (unlikely(!value2)) { index = 1; goto unpacking_failed; } if (!has_known_size && unlikely(__Pyx_IternextUnpackEndCheck(iternext(iter), 2))) goto bad; Py_DECREF(iter); } else { if (!has_known_size && unlikely(PyTuple_GET_SIZE(tuple) != 2)) { __Pyx_UnpackTupleError(tuple, 2); goto bad; } #if CYTHON_COMPILING_IN_PYPY value1 = PySequence_ITEM(tuple, 0); if (unlikely(!value1)) goto bad; value2 = PySequence_ITEM(tuple, 1); if (unlikely(!value2)) goto bad; #else value1 = PyTuple_GET_ITEM(tuple, 0); value2 = PyTuple_GET_ITEM(tuple, 1); Py_INCREF(value1); Py_INCREF(value2); #endif if (decref_tuple) { Py_DECREF(tuple); } } *pvalue1 = value1; *pvalue2 = value2; return 0; unpacking_failed: if (!has_known_size && __Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); bad: Py_XDECREF(iter); Py_XDECREF(value1); Py_XDECREF(value2); if (decref_tuple) { Py_XDECREF(tuple); } return -1; } static CYTHON_INLINE PyObject* __Pyx_dict_iterator(PyObject* iterable, int is_dict, PyObject* method_name, Py_ssize_t* p_orig_length, int* p_source_is_dict) { is_dict = is_dict || likely(PyDict_CheckExact(iterable)); *p_source_is_dict = is_dict; #if !CYTHON_COMPILING_IN_PYPY if (is_dict) { *p_orig_length = PyDict_Size(iterable); Py_INCREF(iterable); return iterable; } #endif *p_orig_length = 0; if (method_name) { PyObject* iter; iterable = __Pyx_PyObject_CallMethod0(iterable, method_name); if (!iterable) return NULL; #if !CYTHON_COMPILING_IN_PYPY if (PyTuple_CheckExact(iterable) || PyList_CheckExact(iterable)) return iterable; #endif iter = PyObject_GetIter(iterable); Py_DECREF(iterable); return iter; } return PyObject_GetIter(iterable); } static CYTHON_INLINE int __Pyx_dict_iter_next(PyObject* iter_obj, Py_ssize_t orig_length, Py_ssize_t* ppos, PyObject** pkey, PyObject** pvalue, PyObject** pitem, int source_is_dict) { PyObject* next_item; #if !CYTHON_COMPILING_IN_PYPY if (source_is_dict) { PyObject *key, *value; if (unlikely(orig_length != PyDict_Size(iter_obj))) { PyErr_SetString(PyExc_RuntimeError, "dictionary changed size during iteration"); return -1; } if (unlikely(!PyDict_Next(iter_obj, ppos, &key, &value))) { return 0; } if (pitem) { PyObject* tuple = PyTuple_New(2); if (unlikely(!tuple)) { return -1; } Py_INCREF(key); Py_INCREF(value); PyTuple_SET_ITEM(tuple, 0, key); PyTuple_SET_ITEM(tuple, 1, value); *pitem = tuple; } else { if (pkey) { Py_INCREF(key); *pkey = key; } if (pvalue) { Py_INCREF(value); *pvalue = value; } } return 1; } else if (PyTuple_CheckExact(iter_obj)) { Py_ssize_t pos = *ppos; if (unlikely(pos >= PyTuple_GET_SIZE(iter_obj))) return 0; *ppos = pos + 1; next_item = PyTuple_GET_ITEM(iter_obj, pos); Py_INCREF(next_item); } else if (PyList_CheckExact(iter_obj)) { Py_ssize_t pos = *ppos; if (unlikely(pos >= PyList_GET_SIZE(iter_obj))) return 0; *ppos = pos + 1; next_item = PyList_GET_ITEM(iter_obj, pos); Py_INCREF(next_item); } else #endif { next_item = PyIter_Next(iter_obj); if (unlikely(!next_item)) { return __Pyx_IterFinish(); } } if (pitem) { *pitem = next_item; } else if (pkey && pvalue) { if (__Pyx_unpack_tuple2(next_item, pkey, pvalue, source_is_dict, source_is_dict, 1)) return -1; } else if (pkey) { *pkey = next_item; } else { *pvalue = next_item; } return 1; } static int __Pyx_SetVtable(PyObject *dict, void *vtable) { #if PY_VERSION_HEX >= 0x02070000 && !(PY_MAJOR_VERSION==3&&PY_MINOR_VERSION==0) 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; } static PyObject *__Pyx_CalculateMetaclass(PyTypeObject *metaclass, PyObject *bases) { Py_ssize_t i, nbases = PyTuple_GET_SIZE(bases); for (i=0; i < nbases; i++) { PyTypeObject *tmptype; PyObject *tmp = PyTuple_GET_ITEM(bases, i); tmptype = Py_TYPE(tmp); #if PY_MAJOR_VERSION < 3 if (tmptype == &PyClass_Type) continue; #endif if (!metaclass) { metaclass = tmptype; continue; } if (PyType_IsSubtype(metaclass, tmptype)) continue; if (PyType_IsSubtype(tmptype, metaclass)) { metaclass = tmptype; continue; } PyErr_SetString(PyExc_TypeError, "metaclass conflict: " "the metaclass of a derived class " "must be a (non-strict) subclass " "of the metaclasses of all its bases"); return NULL; } if (!metaclass) { #if PY_MAJOR_VERSION < 3 metaclass = &PyClass_Type; #else metaclass = &PyType_Type; #endif } Py_INCREF((PyObject*) metaclass); return (PyObject*) metaclass; } static PyObject *__Pyx_Py3MetaclassPrepare(PyObject *metaclass, PyObject *bases, PyObject *name, PyObject *qualname, PyObject *mkw, PyObject *modname, PyObject *doc) { PyObject *ns; if (metaclass) { PyObject *prep = __Pyx_PyObject_GetAttrStr(metaclass, __pyx_n_s_prepare); if (prep) { PyObject *pargs = PyTuple_Pack(2, name, bases); if (unlikely(!pargs)) { Py_DECREF(prep); return NULL; } ns = PyObject_Call(prep, pargs, mkw); Py_DECREF(prep); Py_DECREF(pargs); } else { if (unlikely(!PyErr_ExceptionMatches(PyExc_AttributeError))) return NULL; PyErr_Clear(); ns = PyDict_New(); } } else { ns = PyDict_New(); } if (unlikely(!ns)) return NULL; if (unlikely(PyObject_SetItem(ns, __pyx_n_s_module, modname) < 0)) goto bad; if (unlikely(PyObject_SetItem(ns, __pyx_n_s_qualname, qualname) < 0)) goto bad; if (unlikely(doc && PyObject_SetItem(ns, __pyx_n_s_doc, doc) < 0)) goto bad; return ns; bad: Py_DECREF(ns); return NULL; } static PyObject *__Pyx_Py3ClassCreate(PyObject *metaclass, PyObject *name, PyObject *bases, PyObject *dict, PyObject *mkw, int calculate_metaclass, int allow_py2_metaclass) { PyObject *result, *margs; PyObject *owned_metaclass = NULL; if (allow_py2_metaclass) { owned_metaclass = PyObject_GetItem(dict, __pyx_n_s_metaclass); if (owned_metaclass) { metaclass = owned_metaclass; } else if (likely(PyErr_ExceptionMatches(PyExc_KeyError))) { PyErr_Clear(); } else { return NULL; } } if (calculate_metaclass && (!metaclass || PyType_Check(metaclass))) { metaclass = __Pyx_CalculateMetaclass((PyTypeObject*) metaclass, bases); Py_XDECREF(owned_metaclass); if (unlikely(!metaclass)) return NULL; owned_metaclass = metaclass; } margs = PyTuple_Pack(3, name, bases, dict); if (unlikely(!margs)) { result = NULL; } else { result = PyObject_Call(metaclass, margs, mkw); Py_DECREF(margs); } Py_XDECREF(owned_metaclass); return result; } static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type) { PyObject* fake_module; PyTypeObject* cached_type = NULL; fake_module = PyImport_AddModule((char*) "_cython_" CYTHON_ABI); if (!fake_module) return NULL; Py_INCREF(fake_module); cached_type = (PyTypeObject*) PyObject_GetAttrString(fake_module, type->tp_name); if (cached_type) { if (!PyType_Check((PyObject*)cached_type)) { PyErr_Format(PyExc_TypeError, "Shared Cython type %.200s is not a type object", type->tp_name); goto bad; } if (cached_type->tp_basicsize != type->tp_basicsize) { PyErr_Format(PyExc_TypeError, "Shared Cython type %.200s has the wrong size, try recompiling", type->tp_name); goto bad; } } else { if (!PyErr_ExceptionMatches(PyExc_AttributeError)) goto bad; PyErr_Clear(); if (PyType_Ready(type) < 0) goto bad; if (PyObject_SetAttrString(fake_module, type->tp_name, (PyObject*) type) < 0) goto bad; Py_INCREF(type); cached_type = type; } done: Py_DECREF(fake_module); return cached_type; bad: Py_XDECREF(cached_type); cached_type = NULL; goto done; } static PyObject * __Pyx_CyFunction_get_doc(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *closure) { if (unlikely(op->func_doc == NULL)) { if (op->func.m_ml->ml_doc) { #if PY_MAJOR_VERSION >= 3 op->func_doc = PyUnicode_FromString(op->func.m_ml->ml_doc); #else op->func_doc = PyString_FromString(op->func.m_ml->ml_doc); #endif if (unlikely(op->func_doc == NULL)) return NULL; } else { Py_INCREF(Py_None); return Py_None; } } Py_INCREF(op->func_doc); return op->func_doc; } static int __Pyx_CyFunction_set_doc(__pyx_CyFunctionObject *op, PyObject *value) { PyObject *tmp = op->func_doc; if (value == NULL) value = Py_None; /* Mark as deleted */ Py_INCREF(value); op->func_doc = value; Py_XDECREF(tmp); return 0; } static PyObject * __Pyx_CyFunction_get_name(__pyx_CyFunctionObject *op) { if (unlikely(op->func_name == NULL)) { #if PY_MAJOR_VERSION >= 3 op->func_name = PyUnicode_InternFromString(op->func.m_ml->ml_name); #else op->func_name = PyString_InternFromString(op->func.m_ml->ml_name); #endif if (unlikely(op->func_name == NULL)) return NULL; } Py_INCREF(op->func_name); return op->func_name; } static int __Pyx_CyFunction_set_name(__pyx_CyFunctionObject *op, PyObject *value) { PyObject *tmp; #if PY_MAJOR_VERSION >= 3 if (unlikely(value == NULL || !PyUnicode_Check(value))) { #else if (unlikely(value == NULL || !PyString_Check(value))) { #endif PyErr_SetString(PyExc_TypeError, "__name__ must be set to a string object"); return -1; } tmp = op->func_name; Py_INCREF(value); op->func_name = value; Py_XDECREF(tmp); return 0; } static PyObject * __Pyx_CyFunction_get_qualname(__pyx_CyFunctionObject *op) { Py_INCREF(op->func_qualname); return op->func_qualname; } static int __Pyx_CyFunction_set_qualname(__pyx_CyFunctionObject *op, PyObject *value) { PyObject *tmp; #if PY_MAJOR_VERSION >= 3 if (unlikely(value == NULL || !PyUnicode_Check(value))) { #else if (unlikely(value == NULL || !PyString_Check(value))) { #endif PyErr_SetString(PyExc_TypeError, "__qualname__ must be set to a string object"); return -1; } tmp = op->func_qualname; Py_INCREF(value); op->func_qualname = value; Py_XDECREF(tmp); return 0; } static PyObject * __Pyx_CyFunction_get_self(__pyx_CyFunctionObject *m, CYTHON_UNUSED void *closure) { PyObject *self; self = m->func_closure; if (self == NULL) self = Py_None; Py_INCREF(self); return self; } static PyObject * __Pyx_CyFunction_get_dict(__pyx_CyFunctionObject *op) { if (unlikely(op->func_dict == NULL)) { op->func_dict = PyDict_New(); if (unlikely(op->func_dict == NULL)) return NULL; } Py_INCREF(op->func_dict); return op->func_dict; } static int __Pyx_CyFunction_set_dict(__pyx_CyFunctionObject *op, PyObject *value) { PyObject *tmp; if (unlikely(value == NULL)) { PyErr_SetString(PyExc_TypeError, "function's dictionary may not be deleted"); return -1; } if (unlikely(!PyDict_Check(value))) { PyErr_SetString(PyExc_TypeError, "setting function's dictionary to a non-dict"); return -1; } tmp = op->func_dict; Py_INCREF(value); op->func_dict = value; Py_XDECREF(tmp); return 0; } static PyObject * __Pyx_CyFunction_get_globals(__pyx_CyFunctionObject *op) { Py_INCREF(op->func_globals); return op->func_globals; } static PyObject * __Pyx_CyFunction_get_closure(CYTHON_UNUSED __pyx_CyFunctionObject *op) { Py_INCREF(Py_None); return Py_None; } static PyObject * __Pyx_CyFunction_get_code(__pyx_CyFunctionObject *op) { PyObject* result = (op->func_code) ? op->func_code : Py_None; Py_INCREF(result); return result; } static int __Pyx_CyFunction_init_defaults(__pyx_CyFunctionObject *op) { PyObject *res = op->defaults_getter((PyObject *) op); if (unlikely(!res)) return -1; op->defaults_tuple = PyTuple_GET_ITEM(res, 0); Py_INCREF(op->defaults_tuple); op->defaults_kwdict = PyTuple_GET_ITEM(res, 1); Py_INCREF(op->defaults_kwdict); Py_DECREF(res); return 0; } static int __Pyx_CyFunction_set_defaults(__pyx_CyFunctionObject *op, PyObject* value) { PyObject* tmp; if (!value) { value = Py_None; } else if (value != Py_None && !PyTuple_Check(value)) { PyErr_SetString(PyExc_TypeError, "__defaults__ must be set to a tuple object"); return -1; } Py_INCREF(value); tmp = op->defaults_tuple; op->defaults_tuple = value; Py_XDECREF(tmp); return 0; } static PyObject * __Pyx_CyFunction_get_defaults(__pyx_CyFunctionObject *op) { PyObject* result = op->defaults_tuple; if (unlikely(!result)) { if (op->defaults_getter) { if (__Pyx_CyFunction_init_defaults(op) < 0) return NULL; result = op->defaults_tuple; } else { result = Py_None; } } Py_INCREF(result); return result; } static int __Pyx_CyFunction_set_kwdefaults(__pyx_CyFunctionObject *op, PyObject* value) { PyObject* tmp; if (!value) { value = Py_None; } else if (value != Py_None && !PyDict_Check(value)) { PyErr_SetString(PyExc_TypeError, "__kwdefaults__ must be set to a dict object"); return -1; } Py_INCREF(value); tmp = op->defaults_kwdict; op->defaults_kwdict = value; Py_XDECREF(tmp); return 0; } static PyObject * __Pyx_CyFunction_get_kwdefaults(__pyx_CyFunctionObject *op) { PyObject* result = op->defaults_kwdict; if (unlikely(!result)) { if (op->defaults_getter) { if (__Pyx_CyFunction_init_defaults(op) < 0) return NULL; result = op->defaults_kwdict; } else { result = Py_None; } } Py_INCREF(result); return result; } static int __Pyx_CyFunction_set_annotations(__pyx_CyFunctionObject *op, PyObject* value) { PyObject* tmp; if (!value || value == Py_None) { value = NULL; } else if (!PyDict_Check(value)) { PyErr_SetString(PyExc_TypeError, "__annotations__ must be set to a dict object"); return -1; } Py_XINCREF(value); tmp = op->func_annotations; op->func_annotations = value; Py_XDECREF(tmp); return 0; } static PyObject * __Pyx_CyFunction_get_annotations(__pyx_CyFunctionObject *op) { PyObject* result = op->func_annotations; if (unlikely(!result)) { result = PyDict_New(); if (unlikely(!result)) return NULL; op->func_annotations = result; } Py_INCREF(result); return result; } static PyGetSetDef __pyx_CyFunction_getsets[] = { {(char *) "func_doc", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0}, {(char *) "__doc__", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0}, {(char *) "func_name", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0}, {(char *) "__name__", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0}, {(char *) "__qualname__", (getter)__Pyx_CyFunction_get_qualname, (setter)__Pyx_CyFunction_set_qualname, 0, 0}, {(char *) "__self__", (getter)__Pyx_CyFunction_get_self, 0, 0, 0}, {(char *) "func_dict", (getter)__Pyx_CyFunction_get_dict, (setter)__Pyx_CyFunction_set_dict, 0, 0}, {(char *) "__dict__", (getter)__Pyx_CyFunction_get_dict, (setter)__Pyx_CyFunction_set_dict, 0, 0}, {(char *) "func_globals", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0}, {(char *) "__globals__", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0}, {(char *) "func_closure", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0}, {(char *) "__closure__", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0}, {(char *) "func_code", (getter)__Pyx_CyFunction_get_code, 0, 0, 0}, {(char *) "__code__", (getter)__Pyx_CyFunction_get_code, 0, 0, 0}, {(char *) "func_defaults", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0}, {(char *) "__defaults__", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0}, {(char *) "__kwdefaults__", (getter)__Pyx_CyFunction_get_kwdefaults, (setter)__Pyx_CyFunction_set_kwdefaults, 0, 0}, {(char *) "__annotations__", (getter)__Pyx_CyFunction_get_annotations, (setter)__Pyx_CyFunction_set_annotations, 0, 0}, {0, 0, 0, 0, 0} }; #ifndef PY_WRITE_RESTRICTED /* < Py2.5 */ #define PY_WRITE_RESTRICTED WRITE_RESTRICTED #endif static PyMemberDef __pyx_CyFunction_members[] = { {(char *) "__module__", T_OBJECT, offsetof(__pyx_CyFunctionObject, func.m_module), PY_WRITE_RESTRICTED, 0}, {0, 0, 0, 0, 0} }; static PyObject * __Pyx_CyFunction_reduce(__pyx_CyFunctionObject *m, CYTHON_UNUSED PyObject *args) { #if PY_MAJOR_VERSION >= 3 return PyUnicode_FromString(m->func.m_ml->ml_name); #else return PyString_FromString(m->func.m_ml->ml_name); #endif } static PyMethodDef __pyx_CyFunction_methods[] = { {__Pyx_NAMESTR("__reduce__"), (PyCFunction)__Pyx_CyFunction_reduce, METH_VARARGS, 0}, {0, 0, 0, 0} }; static PyObject *__Pyx_CyFunction_New(PyTypeObject *type, PyMethodDef *ml, int flags, PyObject* qualname, PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) { __pyx_CyFunctionObject *op = PyObject_GC_New(__pyx_CyFunctionObject, type); if (op == NULL) return NULL; op->flags = flags; op->func_weakreflist = NULL; op->func.m_ml = ml; op->func.m_self = (PyObject *) op; Py_XINCREF(closure); op->func_closure = closure; Py_XINCREF(module); op->func.m_module = module; op->func_dict = NULL; op->func_name = NULL; Py_INCREF(qualname); op->func_qualname = qualname; op->func_doc = NULL; op->func_classobj = NULL; op->func_globals = globals; Py_INCREF(op->func_globals); Py_XINCREF(code); op->func_code = code; op->defaults_pyobjects = 0; op->defaults = NULL; op->defaults_tuple = NULL; op->defaults_kwdict = NULL; op->defaults_getter = NULL; op->func_annotations = NULL; PyObject_GC_Track(op); return (PyObject *) op; } static int __Pyx_CyFunction_clear(__pyx_CyFunctionObject *m) { Py_CLEAR(m->func_closure); Py_CLEAR(m->func.m_module); Py_CLEAR(m->func_dict); Py_CLEAR(m->func_name); Py_CLEAR(m->func_qualname); Py_CLEAR(m->func_doc); Py_CLEAR(m->func_globals); Py_CLEAR(m->func_code); Py_CLEAR(m->func_classobj); Py_CLEAR(m->defaults_tuple); Py_CLEAR(m->defaults_kwdict); Py_CLEAR(m->func_annotations); if (m->defaults) { PyObject **pydefaults = __Pyx_CyFunction_Defaults(PyObject *, m); int i; for (i = 0; i < m->defaults_pyobjects; i++) Py_XDECREF(pydefaults[i]); PyMem_Free(m->defaults); m->defaults = NULL; } return 0; } static void __Pyx_CyFunction_dealloc(__pyx_CyFunctionObject *m) { PyObject_GC_UnTrack(m); if (m->func_weakreflist != NULL) PyObject_ClearWeakRefs((PyObject *) m); __Pyx_CyFunction_clear(m); PyObject_GC_Del(m); } static int __Pyx_CyFunction_traverse(__pyx_CyFunctionObject *m, visitproc visit, void *arg) { Py_VISIT(m->func_closure); Py_VISIT(m->func.m_module); Py_VISIT(m->func_dict); Py_VISIT(m->func_name); Py_VISIT(m->func_qualname); Py_VISIT(m->func_doc); Py_VISIT(m->func_globals); Py_VISIT(m->func_code); Py_VISIT(m->func_classobj); Py_VISIT(m->defaults_tuple); Py_VISIT(m->defaults_kwdict); if (m->defaults) { PyObject **pydefaults = __Pyx_CyFunction_Defaults(PyObject *, m); int i; for (i = 0; i < m->defaults_pyobjects; i++) Py_VISIT(pydefaults[i]); } return 0; } static PyObject *__Pyx_CyFunction_descr_get(PyObject *func, PyObject *obj, PyObject *type) { __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; if (m->flags & __Pyx_CYFUNCTION_STATICMETHOD) { Py_INCREF(func); return func; } if (m->flags & __Pyx_CYFUNCTION_CLASSMETHOD) { if (type == NULL) type = (PyObject *)(Py_TYPE(obj)); return PyMethod_New(func, type, (PyObject *)(Py_TYPE(type))); } if (obj == Py_None) obj = NULL; return PyMethod_New(func, obj, type); } static PyObject* __Pyx_CyFunction_repr(__pyx_CyFunctionObject *op) { #if PY_MAJOR_VERSION >= 3 return PyUnicode_FromFormat("", op->func_qualname, (void *)op); #else return PyString_FromFormat("", PyString_AsString(op->func_qualname), (void *)op); #endif } #if CYTHON_COMPILING_IN_PYPY static PyObject * __Pyx_CyFunction_Call(PyObject *func, PyObject *arg, PyObject *kw) { PyCFunctionObject* f = (PyCFunctionObject*)func; PyCFunction meth = PyCFunction_GET_FUNCTION(func); PyObject *self = PyCFunction_GET_SELF(func); Py_ssize_t size; switch (PyCFunction_GET_FLAGS(func) & ~(METH_CLASS | METH_STATIC | METH_COEXIST)) { case METH_VARARGS: if (likely(kw == NULL) || PyDict_Size(kw) == 0) return (*meth)(self, arg); break; case METH_VARARGS | METH_KEYWORDS: return (*(PyCFunctionWithKeywords)meth)(self, arg, kw); case METH_NOARGS: if (likely(kw == NULL) || PyDict_Size(kw) == 0) { size = PyTuple_GET_SIZE(arg); if (size == 0) return (*meth)(self, NULL); PyErr_Format(PyExc_TypeError, "%.200s() takes no arguments (%zd given)", f->m_ml->ml_name, size); return NULL; } break; case METH_O: if (likely(kw == NULL) || PyDict_Size(kw) == 0) { size = PyTuple_GET_SIZE(arg); if (size == 1) return (*meth)(self, PyTuple_GET_ITEM(arg, 0)); PyErr_Format(PyExc_TypeError, "%.200s() takes exactly one argument (%zd given)", f->m_ml->ml_name, size); return NULL; } break; default: PyErr_SetString(PyExc_SystemError, "Bad call flags in " "__Pyx_CyFunction_Call. METH_OLDARGS is no " "longer supported!"); return NULL; } PyErr_Format(PyExc_TypeError, "%.200s() takes no keyword arguments", f->m_ml->ml_name); return NULL; } #else static PyObject * __Pyx_CyFunction_Call(PyObject *func, PyObject *arg, PyObject *kw) { return PyCFunction_Call(func, arg, kw); } #endif static PyTypeObject __pyx_CyFunctionType_type = { PyVarObject_HEAD_INIT(0, 0) __Pyx_NAMESTR("cython_function_or_method"), /*tp_name*/ sizeof(__pyx_CyFunctionObject), /*tp_basicsize*/ 0, /*tp_itemsize*/ (destructor) __Pyx_CyFunction_dealloc, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #else 0, /*reserved*/ #endif (reprfunc) __Pyx_CyFunction_repr, /*tp_repr*/ 0, /*tp_as_number*/ 0, /*tp_as_sequence*/ 0, /*tp_as_mapping*/ 0, /*tp_hash*/ __Pyx_CyFunction_Call, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC, /* tp_flags*/ 0, /*tp_doc*/ (traverseproc) __Pyx_CyFunction_traverse, /*tp_traverse*/ (inquiry) __Pyx_CyFunction_clear, /*tp_clear*/ 0, /*tp_richcompare*/ offsetof(__pyx_CyFunctionObject, func_weakreflist), /* tp_weaklistoffse */ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_CyFunction_methods, /*tp_methods*/ __pyx_CyFunction_members, /*tp_members*/ __pyx_CyFunction_getsets, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ __Pyx_CyFunction_descr_get, /*tp_descr_get*/ 0, /*tp_descr_set*/ offsetof(__pyx_CyFunctionObject, func_dict),/*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ 0, /*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*/ #if PY_VERSION_HEX >= 0x02060000 0, /*tp_version_tag*/ #endif #if PY_VERSION_HEX >= 0x030400a1 0, /*tp_finalize*/ #endif }; static int __Pyx_CyFunction_init(void) { #if !CYTHON_COMPILING_IN_PYPY __pyx_CyFunctionType_type.tp_call = PyCFunction_Call; #endif __pyx_CyFunctionType = __Pyx_FetchCommonType(&__pyx_CyFunctionType_type); if (__pyx_CyFunctionType == NULL) { return -1; } return 0; } static CYTHON_INLINE void *__Pyx_CyFunction_InitDefaults(PyObject *func, size_t size, int pyobjects) { __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; m->defaults = PyMem_Malloc(size); if (!m->defaults) return PyErr_NoMemory(); memset(m->defaults, 0, size); m->defaults_pyobjects = pyobjects; return m->defaults; } static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *func, PyObject *tuple) { __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; m->defaults_tuple = tuple; Py_INCREF(tuple); } static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *func, PyObject *dict) { __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; m->defaults_kwdict = dict; Py_INCREF(dict); } static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *func, PyObject *dict) { __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; m->func_annotations = dict; Py_INCREF(dict); } static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level) { PyObject *empty_list = 0; PyObject *module = 0; PyObject *global_dict = 0; PyObject *empty_dict = 0; PyObject *list; #if PY_VERSION_HEX < 0x03030000 PyObject *py_import; py_import = __Pyx_PyObject_GetAttrStr(__pyx_b, __pyx_n_s_import); if (!py_import) goto bad; #endif if (from_list) list = from_list; else { empty_list = PyList_New(0); if (!empty_list) goto bad; list = empty_list; } global_dict = PyModule_GetDict(__pyx_m); if (!global_dict) goto bad; empty_dict = PyDict_New(); if (!empty_dict) goto bad; #if PY_VERSION_HEX >= 0x02050000 { #if PY_MAJOR_VERSION >= 3 if (level == -1) { if (strchr(__Pyx_MODULE_NAME, '.')) { #if PY_VERSION_HEX < 0x03030000 PyObject *py_level = PyInt_FromLong(1); if (!py_level) goto bad; module = PyObject_CallFunctionObjArgs(py_import, name, global_dict, empty_dict, list, py_level, NULL); Py_DECREF(py_level); #else module = PyImport_ImportModuleLevelObject( name, global_dict, empty_dict, list, 1); #endif if (!module) { if (!PyErr_ExceptionMatches(PyExc_ImportError)) goto bad; PyErr_Clear(); } } level = 0; /* try absolute import on failure */ } #endif if (!module) { #if PY_VERSION_HEX < 0x03030000 PyObject *py_level = PyInt_FromLong(level); if (!py_level) goto bad; module = PyObject_CallFunctionObjArgs(py_import, name, global_dict, empty_dict, list, py_level, NULL); Py_DECREF(py_level); #else module = PyImport_ImportModuleLevelObject( name, global_dict, empty_dict, list, level); #endif } } #else if (level>0) { PyErr_SetString(PyExc_RuntimeError, "Relative import is not supported for Python <=2.4."); goto bad; } module = PyObject_CallFunctionObjArgs(py_import, name, global_dict, empty_dict, list, NULL); #endif bad: #if PY_VERSION_HEX < 0x03030000 Py_XDECREF(py_import); #endif Py_XDECREF(empty_list); Py_XDECREF(empty_dict); return module; } #define __PYX_VERIFY_RETURN_INT(target_type, func_type, func) \ { \ func_type value = func(x); \ if (sizeof(target_type) < sizeof(func_type)) { \ if (unlikely(value != (func_type) (target_type) value)) { \ func_type zero = 0; \ PyErr_SetString(PyExc_OverflowError, \ (is_unsigned && unlikely(value < zero)) ? \ "can't convert negative value to " #target_type : \ "value too large to convert to " #target_type); \ return (target_type) -1; \ } \ } \ return (target_type) value; \ } #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS #include "longintrepr.h" #endif #endif static CYTHON_INLINE size_t __Pyx_PyInt_As_size_t(PyObject *x) { const size_t neg_one = (size_t) -1, const_zero = 0; const int is_unsigned = neg_one > const_zero; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_Check(x))) { if (sizeof(size_t) < sizeof(long)) { __PYX_VERIFY_RETURN_INT(size_t, long, PyInt_AS_LONG) } else { long val = PyInt_AS_LONG(x); if (is_unsigned && unlikely(val < 0)) { PyErr_SetString(PyExc_OverflowError, "can't convert negative value to size_t"); return (size_t) -1; } return (size_t) val; } } else #endif if (likely(PyLong_Check(x))) { if (is_unsigned) { #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS if (sizeof(digit) <= sizeof(size_t)) { switch (Py_SIZE(x)) { case 0: return 0; case 1: return (size_t) ((PyLongObject*)x)->ob_digit[0]; } } #endif #endif if (unlikely(Py_SIZE(x) < 0)) { PyErr_SetString(PyExc_OverflowError, "can't convert negative value to size_t"); return (size_t) -1; } if (sizeof(size_t) <= sizeof(unsigned long)) { __PYX_VERIFY_RETURN_INT(size_t, unsigned long, PyLong_AsUnsignedLong) } else if (sizeof(size_t) <= sizeof(unsigned long long)) { __PYX_VERIFY_RETURN_INT(size_t, unsigned long long, PyLong_AsUnsignedLongLong) } } else { #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS if (sizeof(digit) <= sizeof(size_t)) { switch (Py_SIZE(x)) { case 0: return 0; case 1: return +(size_t) ((PyLongObject*)x)->ob_digit[0]; case -1: return -(size_t) ((PyLongObject*)x)->ob_digit[0]; } } #endif #endif if (sizeof(size_t) <= sizeof(long)) { __PYX_VERIFY_RETURN_INT(size_t, long, PyLong_AsLong) } else if (sizeof(size_t) <= sizeof(long long)) { __PYX_VERIFY_RETURN_INT(size_t, long long, PyLong_AsLongLong) } } { #if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray) PyErr_SetString(PyExc_RuntimeError, "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers"); #else size_t val; PyObject *v = __Pyx_PyNumber_Int(x); #if PY_MAJOR_VERSION < 3 if (likely(v) && !PyLong_Check(v)) { PyObject *tmp = v; v = PyNumber_Long(tmp); Py_DECREF(tmp); } #endif if (likely(v)) { int one = 1; int is_little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&val; int ret = _PyLong_AsByteArray((PyLongObject *)v, bytes, sizeof(val), is_little, !is_unsigned); Py_DECREF(v); if (likely(!ret)) return val; } #endif return (size_t) -1; } } else { size_t val; PyObject *tmp = __Pyx_PyNumber_Int(x); if (!tmp) return (size_t) -1; val = __Pyx_PyInt_As_size_t(tmp); Py_DECREF(tmp); return val; } } #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS #include "longintrepr.h" #endif #endif static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) { const int neg_one = (int) -1, const_zero = 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) } else { long val = PyInt_AS_LONG(x); if (is_unsigned && unlikely(val < 0)) { PyErr_SetString(PyExc_OverflowError, "can't convert negative value to int"); return (int) -1; } return (int) val; } } else #endif if (likely(PyLong_Check(x))) { if (is_unsigned) { #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS if (sizeof(digit) <= sizeof(int)) { switch (Py_SIZE(x)) { case 0: return 0; case 1: return (int) ((PyLongObject*)x)->ob_digit[0]; } } #endif #endif if (unlikely(Py_SIZE(x) < 0)) { PyErr_SetString(PyExc_OverflowError, "can't convert negative value to int"); return (int) -1; } if (sizeof(int) <= sizeof(unsigned long)) { __PYX_VERIFY_RETURN_INT(int, unsigned long, PyLong_AsUnsignedLong) } else if (sizeof(int) <= sizeof(unsigned long long)) { __PYX_VERIFY_RETURN_INT(int, unsigned long long, PyLong_AsUnsignedLongLong) } } else { #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS if (sizeof(digit) <= sizeof(int)) { switch (Py_SIZE(x)) { case 0: return 0; case 1: return +(int) ((PyLongObject*)x)->ob_digit[0]; case -1: return -(int) ((PyLongObject*)x)->ob_digit[0]; } } #endif #endif if (sizeof(int) <= sizeof(long)) { __PYX_VERIFY_RETURN_INT(int, long, PyLong_AsLong) } else if (sizeof(int) <= sizeof(long long)) { __PYX_VERIFY_RETURN_INT(int, long long, PyLong_AsLongLong) } } { #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_Int(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_Int(x); if (!tmp) return (int) -1; val = __Pyx_PyInt_As_int(tmp); Py_DECREF(tmp); return val; } } #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS #include "longintrepr.h" #endif #endif static CYTHON_INLINE unsigned PY_LONG_LONG __Pyx_PyInt_As_unsigned_PY_LONG_LONG(PyObject *x) { const unsigned PY_LONG_LONG neg_one = (unsigned PY_LONG_LONG) -1, const_zero = 0; const int is_unsigned = neg_one > const_zero; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_Check(x))) { if (sizeof(unsigned PY_LONG_LONG) < sizeof(long)) { __PYX_VERIFY_RETURN_INT(unsigned PY_LONG_LONG, long, PyInt_AS_LONG) } else { long val = PyInt_AS_LONG(x); if (is_unsigned && unlikely(val < 0)) { PyErr_SetString(PyExc_OverflowError, "can't convert negative value to unsigned PY_LONG_LONG"); return (unsigned PY_LONG_LONG) -1; } return (unsigned PY_LONG_LONG) val; } } else #endif if (likely(PyLong_Check(x))) { if (is_unsigned) { #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS if (sizeof(digit) <= sizeof(unsigned PY_LONG_LONG)) { switch (Py_SIZE(x)) { case 0: return 0; case 1: return (unsigned PY_LONG_LONG) ((PyLongObject*)x)->ob_digit[0]; } } #endif #endif if (unlikely(Py_SIZE(x) < 0)) { PyErr_SetString(PyExc_OverflowError, "can't convert negative value to unsigned PY_LONG_LONG"); return (unsigned PY_LONG_LONG) -1; } if (sizeof(unsigned PY_LONG_LONG) <= sizeof(unsigned long)) { __PYX_VERIFY_RETURN_INT(unsigned PY_LONG_LONG, unsigned long, PyLong_AsUnsignedLong) } else if (sizeof(unsigned PY_LONG_LONG) <= sizeof(unsigned long long)) { __PYX_VERIFY_RETURN_INT(unsigned PY_LONG_LONG, unsigned long long, PyLong_AsUnsignedLongLong) } } else { #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS if (sizeof(digit) <= sizeof(unsigned PY_LONG_LONG)) { switch (Py_SIZE(x)) { case 0: return 0; case 1: return +(unsigned PY_LONG_LONG) ((PyLongObject*)x)->ob_digit[0]; case -1: return -(unsigned PY_LONG_LONG) ((PyLongObject*)x)->ob_digit[0]; } } #endif #endif if (sizeof(unsigned PY_LONG_LONG) <= sizeof(long)) { __PYX_VERIFY_RETURN_INT(unsigned PY_LONG_LONG, long, PyLong_AsLong) } else if (sizeof(unsigned PY_LONG_LONG) <= sizeof(long long)) { __PYX_VERIFY_RETURN_INT(unsigned PY_LONG_LONG, long long, PyLong_AsLongLong) } } { #if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray) PyErr_SetString(PyExc_RuntimeError, "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers"); #else unsigned PY_LONG_LONG val; PyObject *v = __Pyx_PyNumber_Int(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 (unsigned PY_LONG_LONG) -1; } } else { unsigned PY_LONG_LONG val; PyObject *tmp = __Pyx_PyNumber_Int(x); if (!tmp) return (unsigned PY_LONG_LONG) -1; val = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(tmp); Py_DECREF(tmp); return val; } } #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS #include "longintrepr.h" #endif #endif static CYTHON_INLINE PY_LONG_LONG __Pyx_PyInt_As_PY_LONG_LONG(PyObject *x) { const PY_LONG_LONG neg_one = (PY_LONG_LONG) -1, const_zero = 0; const int is_unsigned = neg_one > const_zero; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_Check(x))) { if (sizeof(PY_LONG_LONG) < sizeof(long)) { __PYX_VERIFY_RETURN_INT(PY_LONG_LONG, long, PyInt_AS_LONG) } else { long val = PyInt_AS_LONG(x); if (is_unsigned && unlikely(val < 0)) { PyErr_SetString(PyExc_OverflowError, "can't convert negative value to PY_LONG_LONG"); return (PY_LONG_LONG) -1; } return (PY_LONG_LONG) val; } } else #endif if (likely(PyLong_Check(x))) { if (is_unsigned) { #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS if (sizeof(digit) <= sizeof(PY_LONG_LONG)) { switch (Py_SIZE(x)) { case 0: return 0; case 1: return (PY_LONG_LONG) ((PyLongObject*)x)->ob_digit[0]; } } #endif #endif if (unlikely(Py_SIZE(x) < 0)) { PyErr_SetString(PyExc_OverflowError, "can't convert negative value to PY_LONG_LONG"); return (PY_LONG_LONG) -1; } if (sizeof(PY_LONG_LONG) <= sizeof(unsigned long)) { __PYX_VERIFY_RETURN_INT(PY_LONG_LONG, unsigned long, PyLong_AsUnsignedLong) } else if (sizeof(PY_LONG_LONG) <= sizeof(unsigned long long)) { __PYX_VERIFY_RETURN_INT(PY_LONG_LONG, unsigned long long, PyLong_AsUnsignedLongLong) } } else { #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS if (sizeof(digit) <= sizeof(PY_LONG_LONG)) { switch (Py_SIZE(x)) { case 0: return 0; case 1: return +(PY_LONG_LONG) ((PyLongObject*)x)->ob_digit[0]; case -1: return -(PY_LONG_LONG) ((PyLongObject*)x)->ob_digit[0]; } } #endif #endif if (sizeof(PY_LONG_LONG) <= sizeof(long)) { __PYX_VERIFY_RETURN_INT(PY_LONG_LONG, long, PyLong_AsLong) } else if (sizeof(PY_LONG_LONG) <= sizeof(long long)) { __PYX_VERIFY_RETURN_INT(PY_LONG_LONG, long long, PyLong_AsLongLong) } } { #if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray) PyErr_SetString(PyExc_RuntimeError, "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers"); #else PY_LONG_LONG val; PyObject *v = __Pyx_PyNumber_Int(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 (PY_LONG_LONG) -1; } } else { PY_LONG_LONG val; PyObject *tmp = __Pyx_PyNumber_Int(x); if (!tmp) return (PY_LONG_LONG) -1; val = __Pyx_PyInt_As_PY_LONG_LONG(tmp); Py_DECREF(tmp); return val; } } #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS #include "longintrepr.h" #endif #endif static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) { const long neg_one = (long) -1, const_zero = 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) } else { long val = PyInt_AS_LONG(x); if (is_unsigned && unlikely(val < 0)) { PyErr_SetString(PyExc_OverflowError, "can't convert negative value to long"); return (long) -1; } return (long) val; } } else #endif if (likely(PyLong_Check(x))) { if (is_unsigned) { #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS if (sizeof(digit) <= sizeof(long)) { switch (Py_SIZE(x)) { case 0: return 0; case 1: return (long) ((PyLongObject*)x)->ob_digit[0]; } } #endif #endif if (unlikely(Py_SIZE(x) < 0)) { PyErr_SetString(PyExc_OverflowError, "can't convert negative value to long"); return (long) -1; } if (sizeof(long) <= sizeof(unsigned long)) { __PYX_VERIFY_RETURN_INT(long, unsigned long, PyLong_AsUnsignedLong) } else if (sizeof(long) <= sizeof(unsigned long long)) { __PYX_VERIFY_RETURN_INT(long, unsigned long long, PyLong_AsUnsignedLongLong) } } else { #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS if (sizeof(digit) <= sizeof(long)) { switch (Py_SIZE(x)) { case 0: return 0; case 1: return +(long) ((PyLongObject*)x)->ob_digit[0]; case -1: return -(long) ((PyLongObject*)x)->ob_digit[0]; } } #endif #endif if (sizeof(long) <= sizeof(long)) { __PYX_VERIFY_RETURN_INT(long, long, PyLong_AsLong) } else if (sizeof(long) <= sizeof(long long)) { __PYX_VERIFY_RETURN_INT(long, long long, PyLong_AsLongLong) } } { #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_Int(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_Int(x); if (!tmp) return (long) -1; val = __Pyx_PyInt_As_long(tmp); Py_DECREF(tmp); return val; } } static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value) { const int neg_one = (int) -1, const_zero = 0; const int is_unsigned = neg_one > const_zero; if (is_unsigned) { if (sizeof(int) < sizeof(long)) { return PyInt_FromLong((long) value); } else if (sizeof(int) <= sizeof(unsigned long)) { return PyLong_FromUnsignedLong((unsigned long) value); } else if (sizeof(int) <= sizeof(unsigned long long)) { return PyLong_FromUnsignedLongLong((unsigned long long) value); } } else { if (sizeof(int) <= sizeof(long)) { return PyInt_FromLong((long) value); } else if (sizeof(int) <= sizeof(long long)) { return PyLong_FromLongLong((long long) value); } } { int one = 1; int little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&value; return _PyLong_FromByteArray(bytes, sizeof(int), little, !is_unsigned); } } #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 #if CYTHON_CCOMPLEX #else static CYTHON_INLINE int __Pyx_c_eqf(__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_sumf(__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_difff(__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_prodf(__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; } static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_quotf(__pyx_t_float_complex a, __pyx_t_float_complex b) { __pyx_t_float_complex z; float denom = b.real * b.real + b.imag * b.imag; z.real = (a.real * b.real + a.imag * b.imag) / denom; z.imag = (a.imag * b.real - a.real * b.imag) / denom; return z; } static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_negf(__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_zerof(__pyx_t_float_complex a) { return (a.real == 0) && (a.imag == 0); } static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_conjf(__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_absf(__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_powf(__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_prodf(a, a); return __Pyx_c_prodf(a, a); case 3: z = __Pyx_c_prodf(a, a); return __Pyx_c_prodf(z, a); case 4: z = __Pyx_c_prodf(a, a); return __Pyx_c_prodf(z, z); } } if (a.imag == 0) { if (a.real == 0) { return a; } r = a.real; theta = 0; } else { r = __Pyx_c_absf(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 #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 #if CYTHON_CCOMPLEX #else static CYTHON_INLINE int __Pyx_c_eq(__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(__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(__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(__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; } static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_quot(__pyx_t_double_complex a, __pyx_t_double_complex b) { __pyx_t_double_complex z; double denom = b.real * b.real + b.imag * b.imag; z.real = (a.real * b.real + a.imag * b.imag) / denom; z.imag = (a.imag * b.real - a.real * b.imag) / denom; return z; } static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_neg(__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(__pyx_t_double_complex a) { return (a.real == 0) && (a.imag == 0); } static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_conj(__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(__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(__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(a, a); return __Pyx_c_prod(a, a); case 3: z = __Pyx_c_prod(a, a); return __Pyx_c_prod(z, a); case 4: z = __Pyx_c_prod(a, a); return __Pyx_c_prod(z, z); } } if (a.imag == 0) { if (a.real == 0) { return a; } r = a.real; theta = 0; } else { r = __Pyx_c_abs(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 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_ptrdiff_t(ptrdiff_t value) { const ptrdiff_t neg_one = (ptrdiff_t) -1, const_zero = 0; const int is_unsigned = neg_one > const_zero; if (is_unsigned) { if (sizeof(ptrdiff_t) < sizeof(long)) { return PyInt_FromLong((long) value); } else if (sizeof(ptrdiff_t) <= sizeof(unsigned long)) { return PyLong_FromUnsignedLong((unsigned long) value); } else if (sizeof(ptrdiff_t) <= sizeof(unsigned long long)) { return PyLong_FromUnsignedLongLong((unsigned long long) value); } } else { if (sizeof(ptrdiff_t) <= sizeof(long)) { return PyInt_FromLong((long) value); } else if (sizeof(ptrdiff_t) <= sizeof(long long)) { return PyLong_FromLongLong((long long) value); } } { int one = 1; int little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&value; return _PyLong_FromByteArray(bytes, sizeof(ptrdiff_t), little, !is_unsigned); } } static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) { const long neg_one = (long) -1, const_zero = 0; const int is_unsigned = neg_one > const_zero; if (is_unsigned) { if (sizeof(long) < sizeof(long)) { return PyInt_FromLong((long) value); } else if (sizeof(long) <= sizeof(unsigned long)) { return PyLong_FromUnsignedLong((unsigned long) value); } else if (sizeof(long) <= sizeof(unsigned long long)) { return PyLong_FromUnsignedLongLong((unsigned long long) value); } } else { if (sizeof(long) <= sizeof(long)) { return PyInt_FromLong((long) value); } else if (sizeof(long) <= sizeof(long long)) { return PyLong_FromLongLong((long long) value); } } { int one = 1; int little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&value; return _PyLong_FromByteArray(bytes, sizeof(long), little, !is_unsigned); } } 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); #if PY_VERSION_HEX < 0x02050000 return PyErr_Warn(NULL, message); #else return PyErr_WarnEx(NULL, message, 1); #endif } return 0; } #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 #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", module_name, class_name); #if PY_VERSION_HEX < 0x02050000 if (PyErr_Warn(NULL, warning) < 0) goto bad; #else if (PyErr_WarnEx(NULL, warning, 0) < 0) goto bad; #endif } else if ((size_t)basicsize != size) { PyErr_Format(PyExc_ValueError, "%.200s.%.200s has the wrong size, try recompiling", module_name, class_name); goto bad; } return (PyTypeObject *)result; bad: Py_XDECREF(py_module); Py_XDECREF(result); return NULL; } #endif 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) / 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, 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); } #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, /*int argcount,*/ 0, /*int kwonlyargcount,*/ 0, /*int nlocals,*/ 0, /*int stacksize,*/ 0, /*int flags,*/ __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, /*int firstlineno,*/ __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; PyObject *py_globals = 0; PyFrameObject *py_frame = 0; py_code = __pyx_find_code_object(c_line ? c_line : py_line); if (!py_code) { py_code = __Pyx_CreateCodeObjectForTraceback( funcname, c_line, py_line, filename); if (!py_code) goto bad; __pyx_insert_code_object(c_line ? c_line : py_line, py_code); } py_globals = PyModule_GetDict(__pyx_m); if (!py_globals) goto bad; py_frame = PyFrame_New( PyThreadState_GET(), /*PyThreadState *tstate,*/ py_code, /*PyCodeObject *code,*/ py_globals, /*PyObject *globals,*/ 0 /*PyObject *locals*/ ); if (!py_frame) goto bad; py_frame->f_lineno = py_line; PyTraceBack_Here(py_frame); bad: Py_XDECREF(py_code); Py_XDECREF(py_frame); } 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 /* Python 3+ has unicode identifiers */ if (t->is_unicode | t->is_str) { if (t->intern) { *t->p = PyUnicode_InternFromString(t->s); } else if (t->encoding) { *t->p = PyUnicode_Decode(t->s, t->n - 1, t->encoding, NULL); } else { *t->p = PyUnicode_FromStringAndSize(t->s, t->n - 1); } } else { *t->p = PyBytes_FromStringAndSize(t->s, t->n - 1); } #endif if (!*t->p) return -1; ++t; } return 0; } static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(char* c_str) { return __Pyx_PyUnicode_FromStringAndSize(c_str, strlen(c_str)); } static CYTHON_INLINE char* __Pyx_PyObject_AsString(PyObject* o) { Py_ssize_t ignore; return __Pyx_PyObject_AsStringAndSize(o, &ignore); } static CYTHON_INLINE char* __Pyx_PyObject_AsStringAndSize(PyObject* o, Py_ssize_t *length) { #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT if ( #if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII __Pyx_sys_getdefaultencoding_not_ascii && #endif PyUnicode_Check(o)) { #if PY_VERSION_HEX < 0x03030000 char* defenc_c; PyObject* defenc = _PyUnicode_AsDefaultEncodedString(o, NULL); if (!defenc) return NULL; defenc_c = PyBytes_AS_STRING(defenc); #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII { char* end = defenc_c + PyBytes_GET_SIZE(defenc); char* c; for (c = defenc_c; c < end; c++) { if ((unsigned char) (*c) >= 128) { PyUnicode_AsASCIIString(o); return NULL; } } } #endif /*__PYX_DEFAULT_STRING_ENCODING_IS_ASCII*/ *length = PyBytes_GET_SIZE(defenc); return defenc_c; #else /* PY_VERSION_HEX < 0x03030000 */ if (PyUnicode_READY(o) == -1) return NULL; #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII if (PyUnicode_IS_ASCII(o)) { *length = PyUnicode_GET_DATA_SIZE(o); return PyUnicode_AsUTF8(o); } else { PyUnicode_AsASCIIString(o); return NULL; } #else /* __PYX_DEFAULT_STRING_ENCODING_IS_ASCII */ return PyUnicode_AsUTF8AndSize(o, length); #endif /* __PYX_DEFAULT_STRING_ENCODING_IS_ASCII */ #endif /* PY_VERSION_HEX < 0x03030000 */ } else #endif /* __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT */ #if PY_VERSION_HEX >= 0x02060000 if (PyByteArray_Check(o)) { *length = PyByteArray_GET_SIZE(o); return PyByteArray_AS_STRING(o); } else #endif { char* result; int r = PyBytes_AsStringAndSize(o, &result, length); if (unlikely(r < 0)) { return NULL; } else { return result; } } } static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject* x) { int is_true = x == Py_True; if (is_true | (x == Py_False) | (x == Py_None)) return is_true; else return PyObject_IsTrue(x); } static CYTHON_INLINE PyObject* __Pyx_PyNumber_Int(PyObject* x) { PyNumberMethods *m; const char *name = NULL; PyObject *res = NULL; #if PY_MAJOR_VERSION < 3 if (PyInt_Check(x) || PyLong_Check(x)) #else if (PyLong_Check(x)) #endif return Py_INCREF(x), x; m = Py_TYPE(x)->tp_as_number; #if PY_MAJOR_VERSION < 3 if (m && m->nb_int) { name = "int"; res = PyNumber_Int(x); } else if (m && m->nb_long) { name = "long"; res = PyNumber_Long(x); } #else if (m && m->nb_int) { name = "int"; res = PyNumber_Long(x); } #endif if (res) { #if PY_MAJOR_VERSION < 3 if (!PyInt_Check(res) && !PyLong_Check(res)) { #else if (!PyLong_Check(res)) { #endif PyErr_Format(PyExc_TypeError, "__%.4s__ returned non-%.4s (type %.200s)", name, name, Py_TYPE(res)->tp_name); Py_DECREF(res); return NULL; } } else if (!PyErr_Occurred()) { PyErr_SetString(PyExc_TypeError, "an integer is required"); } return res; } #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS #include "longintrepr.h" #endif #endif 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))) return PyInt_AS_LONG(b); #endif if (likely(PyLong_CheckExact(b))) { #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS switch (Py_SIZE(b)) { case -1: return -(sdigit)((PyLongObject*)b)->ob_digit[0]; case 0: return 0; case 1: return ((PyLongObject*)b)->ob_digit[0]; } #endif #endif #if PY_VERSION_HEX < 0x02060000 return PyInt_AsSsize_t(b); #else return PyLong_AsSsize_t(b); #endif } 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) { #if PY_VERSION_HEX < 0x02050000 if (ival <= LONG_MAX) return PyInt_FromLong((long)ival); else { unsigned char *bytes = (unsigned char *) &ival; int one = 1; int little = (int)*(unsigned char*)&one; return _PyLong_FromByteArray(bytes, sizeof(size_t), little, 0); } #else return PyInt_FromSize_t(ival); #endif } #endif /* Py_PYTHON_H */ debian/cythonized-files/pandas/parser.c0000664000000000000000000513226112275603610015372 0ustar /* Generated by Cython 0.20 on Mon Feb 3 08:41:48 2014 */ #define PY_SSIZE_T_CLEAN #ifndef CYTHON_USE_PYLONG_INTERNALS #ifdef PYLONG_BITS_IN_DIGIT #define CYTHON_USE_PYLONG_INTERNALS 0 #else #include "pyconfig.h" #ifdef PYLONG_BITS_IN_DIGIT #define CYTHON_USE_PYLONG_INTERNALS 1 #else #define CYTHON_USE_PYLONG_INTERNALS 0 #endif #endif #endif #include "Python.h" #ifndef Py_PYTHON_H #error Python headers needed to compile C extensions, please install development version of Python. #elif PY_VERSION_HEX < 0x02040000 #error Cython requires Python 2.4+. #else #define CYTHON_ABI "0_20" #include /* For offsetof */ #ifndef offsetof #define offsetof(type, member) ( (size_t) & ((type*)0) -> member ) #endif #if !defined(WIN32) && !defined(MS_WINDOWS) #ifndef __stdcall #define __stdcall #endif #ifndef __cdecl #define __cdecl #endif #ifndef __fastcall #define __fastcall #endif #endif #ifndef DL_IMPORT #define DL_IMPORT(t) t #endif #ifndef DL_EXPORT #define DL_EXPORT(t) t #endif #ifndef PY_LONG_LONG #define PY_LONG_LONG LONG_LONG #endif #ifndef Py_HUGE_VAL #define Py_HUGE_VAL HUGE_VAL #endif #ifdef PYPY_VERSION #define CYTHON_COMPILING_IN_PYPY 1 #define CYTHON_COMPILING_IN_CPYTHON 0 #else #define CYTHON_COMPILING_IN_PYPY 0 #define CYTHON_COMPILING_IN_CPYTHON 1 #endif #if CYTHON_COMPILING_IN_PYPY #define Py_OptimizeFlag 0 #endif #if PY_VERSION_HEX < 0x02050000 typedef int Py_ssize_t; #define PY_SSIZE_T_MAX INT_MAX #define PY_SSIZE_T_MIN INT_MIN #define PY_FORMAT_SIZE_T "" #define CYTHON_FORMAT_SSIZE_T "" #define PyInt_FromSsize_t(z) PyInt_FromLong(z) #define PyInt_AsSsize_t(o) __Pyx_PyInt_As_int(o) #define PyNumber_Index(o) ((PyNumber_Check(o) && !PyFloat_Check(o)) ? PyNumber_Int(o) : \ (PyErr_Format(PyExc_TypeError, \ "expected index value, got %.200s", Py_TYPE(o)->tp_name), \ (PyObject*)0)) #define __Pyx_PyIndex_Check(o) (PyNumber_Check(o) && !PyFloat_Check(o) && \ !PyComplex_Check(o)) #define PyIndex_Check __Pyx_PyIndex_Check #define PyErr_WarnEx(category, message, stacklevel) PyErr_Warn(category, message) #define __PYX_BUILD_PY_SSIZE_T "i" #else #define __PYX_BUILD_PY_SSIZE_T "n" #define CYTHON_FORMAT_SSIZE_T "z" #define __Pyx_PyIndex_Check PyIndex_Check #endif #if PY_VERSION_HEX < 0x02060000 #define Py_REFCNT(ob) (((PyObject*)(ob))->ob_refcnt) #define Py_TYPE(ob) (((PyObject*)(ob))->ob_type) #define Py_SIZE(ob) (((PyVarObject*)(ob))->ob_size) #define PyVarObject_HEAD_INIT(type, size) \ PyObject_HEAD_INIT(type) size, #define PyType_Modified(t) typedef struct { void *buf; PyObject *obj; Py_ssize_t len; Py_ssize_t itemsize; int readonly; int ndim; char *format; Py_ssize_t *shape; Py_ssize_t *strides; Py_ssize_t *suboffsets; void *internal; } Py_buffer; #define PyBUF_SIMPLE 0 #define PyBUF_WRITABLE 0x0001 #define PyBUF_FORMAT 0x0004 #define PyBUF_ND 0x0008 #define PyBUF_STRIDES (0x0010 | PyBUF_ND) #define PyBUF_C_CONTIGUOUS (0x0020 | PyBUF_STRIDES) #define PyBUF_F_CONTIGUOUS (0x0040 | PyBUF_STRIDES) #define PyBUF_ANY_CONTIGUOUS (0x0080 | PyBUF_STRIDES) #define PyBUF_INDIRECT (0x0100 | PyBUF_STRIDES) #define PyBUF_RECORDS (PyBUF_STRIDES | PyBUF_FORMAT | PyBUF_WRITABLE) #define PyBUF_FULL (PyBUF_INDIRECT | PyBUF_FORMAT | PyBUF_WRITABLE) typedef int (*getbufferproc)(PyObject *, Py_buffer *, int); typedef void (*releasebufferproc)(PyObject *, Py_buffer *); #endif #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, 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 #if PY_VERSION_HEX < 0x02060000 #define PyUnicode_FromString(s) PyUnicode_Decode(s, strlen(s), "UTF-8", "strict") #endif #if PY_MAJOR_VERSION >= 3 #define Py_TPFLAGS_CHECKTYPES 0 #define Py_TPFLAGS_HAVE_INDEX 0 #endif #if (PY_VERSION_HEX < 0x02060000) || (PY_MAJOR_VERSION >= 3) #define Py_TPFLAGS_HAVE_NEWBUFFER 0 #endif #if PY_VERSION_HEX < 0x02060000 #define Py_TPFLAGS_HAVE_VERSION_TAG 0 #endif #if PY_VERSION_HEX < 0x02060000 && !defined(Py_TPFLAGS_IS_ABSTRACT) #define Py_TPFLAGS_IS_ABSTRACT 0 #endif #if PY_VERSION_HEX < 0x030400a1 && !defined(Py_TPFLAGS_HAVE_FINALIZE) #define Py_TPFLAGS_HAVE_FINALIZE 0 #endif #if PY_VERSION_HEX > 0x03030000 && defined(PyUnicode_KIND) #define CYTHON_PEP393_ENABLED 1 #define __Pyx_PyUnicode_READY(op) (likely(PyUnicode_IS_READY(op)) ? \ 0 : _PyUnicode_Ready((PyObject *)(op))) #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_LENGTH(u) #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i) #define __Pyx_PyUnicode_KIND(u) PyUnicode_KIND(u) #define __Pyx_PyUnicode_DATA(u) PyUnicode_DATA(u) #define __Pyx_PyUnicode_READ(k, d, i) PyUnicode_READ(k, d, i) #else #define CYTHON_PEP393_ENABLED 0 #define __Pyx_PyUnicode_READY(op) (0) #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_SIZE(u) #define __Pyx_PyUnicode_READ_CHAR(u, i) ((Py_UCS4)(PyUnicode_AS_UNICODE(u)[i])) #define __Pyx_PyUnicode_KIND(u) (sizeof(Py_UNICODE)) #define __Pyx_PyUnicode_DATA(u) ((void*)PyUnicode_AS_UNICODE(u)) #define __Pyx_PyUnicode_READ(k, d, i) ((void)(k), (Py_UCS4)(((Py_UNICODE*)d)[i])) #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)) #define __Pyx_PyUnicode_Concat(a, b) ((unlikely((a) == Py_None) || unlikely((b) == Py_None)) ? \ PyNumber_Add(a, b) : PyUnicode_Concat(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 #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_VERSION_HEX < 0x02060000 #define PyBytesObject PyStringObject #define PyBytes_Type PyString_Type #define PyBytes_Check PyString_Check #define PyBytes_CheckExact PyString_CheckExact #define PyBytes_FromString PyString_FromString #define PyBytes_FromStringAndSize PyString_FromStringAndSize #define PyBytes_FromFormat PyString_FromFormat #define PyBytes_DecodeEscape PyString_DecodeEscape #define PyBytes_AsString PyString_AsString #define PyBytes_AsStringAndSize PyString_AsStringAndSize #define PyBytes_Size PyString_Size #define PyBytes_AS_STRING PyString_AS_STRING #define PyBytes_GET_SIZE PyString_GET_SIZE #define PyBytes_Repr PyString_Repr #define PyBytes_Concat PyString_Concat #define PyBytes_ConcatAndDel PyString_ConcatAndDel #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_CheckExact(obj) || PyUnicode_CheckExact(obj) || \ PyString_Check(obj) || PyUnicode_Check(obj)) #define __Pyx_PyBaseString_CheckExact(obj) (PyString_CheckExact(obj) || PyUnicode_CheckExact(obj)) #endif #if PY_VERSION_HEX < 0x02060000 #define PySet_Check(obj) PyObject_TypeCheck(obj, &PySet_Type) #define PyFrozenSet_Check(obj) PyObject_TypeCheck(obj, &PyFrozenSet_Type) #endif #ifndef PySet_CheckExact #define PySet_CheckExact(obj) (Py_TYPE(obj) == &PySet_Type) #endif #define __Pyx_TypeCheck(obj, type) PyObject_TypeCheck(obj, (PyTypeObject *)type) #if PY_MAJOR_VERSION >= 3 #define PyIntObject PyLongObject #define PyInt_Type PyLong_Type #define PyInt_Check(op) PyLong_Check(op) #define PyInt_CheckExact(op) PyLong_CheckExact(op) #define PyInt_FromString PyLong_FromString #define PyInt_FromUnicode PyLong_FromUnicode #define PyInt_FromLong PyLong_FromLong #define PyInt_FromSize_t PyLong_FromSize_t #define PyInt_FromSsize_t PyLong_FromSsize_t #define PyInt_AsLong PyLong_AsLong #define PyInt_AS_LONG PyLong_AS_LONG #define PyInt_AsSsize_t PyLong_AsSsize_t #define PyInt_AsUnsignedLongMask PyLong_AsUnsignedLongMask #define PyInt_AsUnsignedLongLongMask PyLong_AsUnsignedLongLongMask #define PyNumber_Int PyNumber_Long #endif #if PY_MAJOR_VERSION >= 3 #define PyBoolObject PyLongObject #endif #if PY_VERSION_HEX < 0x03020000 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) || (PY_VERSION_HEX >= 0x03010300) #define __Pyx_PySequence_GetSlice(obj, a, b) PySequence_GetSlice(obj, a, b) #define __Pyx_PySequence_SetSlice(obj, a, b, value) PySequence_SetSlice(obj, a, b, value) #define __Pyx_PySequence_DelSlice(obj, a, b) PySequence_DelSlice(obj, a, b) #else #define __Pyx_PySequence_GetSlice(obj, a, b) (unlikely(!(obj)) ? \ (PyErr_SetString(PyExc_SystemError, "null argument to internal routine"), (PyObject*)0) : \ (likely((obj)->ob_type->tp_as_mapping) ? (PySequence_GetSlice(obj, a, b)) : \ (PyErr_Format(PyExc_TypeError, "'%.200s' object is unsliceable", (obj)->ob_type->tp_name), (PyObject*)0))) #define __Pyx_PySequence_SetSlice(obj, a, b, value) (unlikely(!(obj)) ? \ (PyErr_SetString(PyExc_SystemError, "null argument to internal routine"), -1) : \ (likely((obj)->ob_type->tp_as_mapping) ? (PySequence_SetSlice(obj, a, b, value)) : \ (PyErr_Format(PyExc_TypeError, "'%.200s' object doesn't support slice assignment", (obj)->ob_type->tp_name), -1))) #define __Pyx_PySequence_DelSlice(obj, a, b) (unlikely(!(obj)) ? \ (PyErr_SetString(PyExc_SystemError, "null argument to internal routine"), -1) : \ (likely((obj)->ob_type->tp_as_mapping) ? (PySequence_DelSlice(obj, a, b)) : \ (PyErr_Format(PyExc_TypeError, "'%.200s' object doesn't support slice deletion", (obj)->ob_type->tp_name), -1))) #endif #if PY_MAJOR_VERSION >= 3 #define PyMethod_New(func, self, klass) ((self) ? PyMethod_New(func, self) : PyInstanceMethod_New(func)) #endif #if PY_VERSION_HEX < 0x02050000 #define __Pyx_GetAttrString(o,n) PyObject_GetAttrString((o),((char *)(n))) #define __Pyx_SetAttrString(o,n,a) PyObject_SetAttrString((o),((char *)(n)),(a)) #define __Pyx_DelAttrString(o,n) PyObject_DelAttrString((o),((char *)(n))) #else #define __Pyx_GetAttrString(o,n) PyObject_GetAttrString((o),(n)) #define __Pyx_SetAttrString(o,n,a) PyObject_SetAttrString((o),(n),(a)) #define __Pyx_DelAttrString(o,n) PyObject_DelAttrString((o),(n)) #endif #if PY_VERSION_HEX < 0x02050000 #define __Pyx_NAMESTR(n) ((char *)(n)) #define __Pyx_DOCSTR(n) ((char *)(n)) #else #define __Pyx_NAMESTR(n) (n) #define __Pyx_DOCSTR(n) (n) #endif #ifndef CYTHON_INLINE #if defined(__GNUC__) #define CYTHON_INLINE __inline__ #elif defined(_MSC_VER) #define CYTHON_INLINE __inline #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L #define CYTHON_INLINE inline #else #define CYTHON_INLINE #endif #endif #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 #ifdef NAN #define __PYX_NAN() ((float) NAN) #else static CYTHON_INLINE float __PYX_NAN() { /* Initialize NaN. The sign is irrelevant, an exponent with all bits 1 and a nonzero mantissa means NaN. If the first bit in the mantissa is 1, it is a quiet NaN. */ float value; memset(&value, 0xFF, sizeof(value)); return value; } #endif #if PY_MAJOR_VERSION >= 3 #define __Pyx_PyNumber_Divide(x,y) PyNumber_TrueDivide(x,y) #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceTrueDivide(x,y) #else #define __Pyx_PyNumber_Divide(x,y) PyNumber_Divide(x,y) #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceDivide(x,y) #endif #ifndef __PYX_EXTERN_C #ifdef __cplusplus #define __PYX_EXTERN_C extern "C" #else #define __PYX_EXTERN_C extern #endif #endif #if defined(WIN32) || defined(MS_WINDOWS) #define _USE_MATH_DEFINES #endif #include #define __PYX_HAVE__pandas__parser #define __PYX_HAVE_API__pandas__parser #include "string.h" #include "stdio.h" #include "stdlib.h" #include "pythread.h" #include "numpy/arrayobject.h" #include "numpy/ufuncobject.h" #include "numpy_helper.h" #include "khash_python.h" #include "headers/stdint.h" #include "headers/portable.h" #include "parser/tokenizer.h" #include "parser/io.h" #ifdef _OPENMP #include #endif /* _OPENMP */ #ifdef PYREX_WITHOUT_ASSERTIONS #define CYTHON_WITHOUT_ASSERTIONS #endif #ifndef CYTHON_UNUSED # if defined(__GNUC__) # if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)) # define CYTHON_UNUSED __attribute__ ((__unused__)) # else # define CYTHON_UNUSED # endif # elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER)) # define CYTHON_UNUSED __attribute__ ((__unused__)) # else # define CYTHON_UNUSED # endif #endif typedef struct {PyObject **p; char *s; const Py_ssize_t n; const char* encoding; const char is_unicode; const char is_str; const char intern; } __Pyx_StringTabEntry; /*proto*/ #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_fits_Py_ssize_t(v, type, is_signed) ( \ (sizeof(type) < sizeof(Py_ssize_t)) || \ (sizeof(type) > sizeof(Py_ssize_t) && \ likely(v < (type)PY_SSIZE_T_MAX || \ v == (type)PY_SSIZE_T_MAX) && \ (!is_signed || likely(v > (type)PY_SSIZE_T_MIN || \ v == (type)PY_SSIZE_T_MIN))) || \ (sizeof(type) == sizeof(Py_ssize_t) && \ (is_signed || likely(v < (type)PY_SSIZE_T_MAX || \ v == (type)PY_SSIZE_T_MAX))) ) static CYTHON_INLINE char* __Pyx_PyObject_AsString(PyObject*); static CYTHON_INLINE char* __Pyx_PyObject_AsStringAndSize(PyObject*, Py_ssize_t* length); #define __Pyx_PyByteArray_FromString(s) PyByteArray_FromStringAndSize((const char*)s, strlen((const char*)s)) #define __Pyx_PyByteArray_FromStringAndSize(s, l) PyByteArray_FromStringAndSize((const char*)s, l) #define __Pyx_PyBytes_FromString PyBytes_FromString #define __Pyx_PyBytes_FromStringAndSize PyBytes_FromStringAndSize static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(char*); #if PY_MAJOR_VERSION < 3 #define __Pyx_PyStr_FromString __Pyx_PyBytes_FromString #define __Pyx_PyStr_FromStringAndSize __Pyx_PyBytes_FromStringAndSize #else #define __Pyx_PyStr_FromString __Pyx_PyUnicode_FromString #define __Pyx_PyStr_FromStringAndSize __Pyx_PyUnicode_FromStringAndSize #endif #define __Pyx_PyObject_AsSString(s) ((signed char*) __Pyx_PyObject_AsString(s)) #define __Pyx_PyObject_AsUString(s) ((unsigned char*) __Pyx_PyObject_AsString(s)) #define __Pyx_PyObject_FromUString(s) __Pyx_PyObject_FromString((char*)s) #define __Pyx_PyBytes_FromUString(s) __Pyx_PyBytes_FromString((char*)s) #define __Pyx_PyByteArray_FromUString(s) __Pyx_PyByteArray_FromString((char*)s) #define __Pyx_PyStr_FromUString(s) __Pyx_PyStr_FromString((char*)s) #define __Pyx_PyUnicode_FromUString(s) __Pyx_PyUnicode_FromString((char*)s) #if PY_MAJOR_VERSION < 3 static CYTHON_INLINE size_t __Pyx_Py_UNICODE_strlen(const Py_UNICODE *u) { const Py_UNICODE *u_end = u; while (*u_end++) ; return u_end - u - 1; } #else #define __Pyx_Py_UNICODE_strlen Py_UNICODE_strlen #endif #define __Pyx_PyUnicode_FromUnicode(u) PyUnicode_FromUnicode(u, __Pyx_Py_UNICODE_strlen(u)) #define __Pyx_PyUnicode_FromUnicodeAndLength PyUnicode_FromUnicode #define __Pyx_PyUnicode_AsUnicode PyUnicode_AsUnicode #define __Pyx_Owned_Py_None(b) (Py_INCREF(Py_None), Py_None) #define __Pyx_PyBool_FromLong(b) ((b) ? (Py_INCREF(Py_True), Py_True) : (Py_INCREF(Py_False), Py_False)) static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*); static CYTHON_INLINE PyObject* __Pyx_PyNumber_Int(PyObject* x); static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*); static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t); #if CYTHON_COMPILING_IN_CPYTHON #define __pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x)) #else #define __pyx_PyFloat_AsDouble(x) PyFloat_AsDouble(x) #endif #define __pyx_PyFloat_AsFloat(x) ((float) __pyx_PyFloat_AsDouble(x)) #if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII static int __Pyx_sys_getdefaultencoding_not_ascii; static int __Pyx_init_sys_getdefaultencoding_params(void) { PyObject* sys = NULL; PyObject* default_encoding = NULL; PyObject* ascii_chars_u = NULL; PyObject* ascii_chars_b = NULL; sys = PyImport_ImportModule("sys"); if (sys == NULL) goto bad; default_encoding = PyObject_CallMethod(sys, (char*) (const char*) "getdefaultencoding", NULL); if (default_encoding == NULL) goto bad; if (strcmp(PyBytes_AsString(default_encoding), "ascii") == 0) { __Pyx_sys_getdefaultencoding_not_ascii = 0; } else { const char* default_encoding_c = PyBytes_AS_STRING(default_encoding); 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 == NULL) goto bad; ascii_chars_b = PyUnicode_AsEncodedString(ascii_chars_u, default_encoding_c, NULL); if (ascii_chars_b == NULL || strncmp(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_XDECREF(sys); Py_XDECREF(default_encoding); Py_XDECREF(ascii_chars_u); Py_XDECREF(ascii_chars_b); return 0; bad: Py_XDECREF(sys); 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 = NULL; PyObject* default_encoding = NULL; char* default_encoding_c; sys = PyImport_ImportModule("sys"); if (sys == NULL) goto bad; default_encoding = PyObject_CallMethod(sys, (char*) (const char*) "getdefaultencoding", NULL); if (default_encoding == NULL) goto bad; default_encoding_c = PyBytes_AS_STRING(default_encoding); __PYX_DEFAULT_STRING_ENCODING = (char*) malloc(strlen(default_encoding_c)); strcpy(__PYX_DEFAULT_STRING_ENCODING, default_encoding_c); Py_DECREF(sys); Py_DECREF(default_encoding); return 0; bad: Py_XDECREF(sys); Py_XDECREF(default_encoding); return -1; } #endif #endif #ifdef __GNUC__ /* Test for GCC > 2.95 */ #if __GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95)) #define likely(x) __builtin_expect(!!(x), 1) #define unlikely(x) __builtin_expect(!!(x), 0) #else /* __GNUC__ > 2 ... */ #define likely(x) (x) #define unlikely(x) (x) #endif /* __GNUC__ > 2 ... */ #else /* __GNUC__ */ #define likely(x) (x) #define unlikely(x) (x) #endif /* __GNUC__ */ static PyObject *__pyx_m; static PyObject *__pyx_d; static PyObject *__pyx_b; static PyObject *__pyx_empty_tuple; static PyObject *__pyx_empty_bytes; static int __pyx_lineno; static int __pyx_clineno = 0; static const char * __pyx_cfilenm= __FILE__; static const char *__pyx_filename; #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[] = { "parser.pyx", "util.pxd", "numpy.pxd", "type.pxd", "bool.pxd", "complex.pxd", }; #define IS_UNSIGNED(type) (((type) -1) > 0) struct __Pyx_StructField_; #define __PYX_BUF_FLAGS_PACKED_STRUCT (1 << 0) typedef struct { const char* name; /* for error messages only */ struct __Pyx_StructField_* fields; size_t size; /* sizeof(type) */ size_t arraysize[8]; /* length of array in each dimension */ int ndim; char typegroup; /* _R_eal, _C_omplex, Signed _I_nt, _U_nsigned int, _S_truct, _P_ointer, _O_bject, c_H_ar */ 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; /* "numpy.pxd":726 * # 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; /* "numpy.pxd":727 * * 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; /* "numpy.pxd":728 * 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; /* "numpy.pxd":729 * 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; /* "numpy.pxd":733 * #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; /* "numpy.pxd":734 * * 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; /* "numpy.pxd":735 * 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; /* "numpy.pxd":736 * 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; /* "numpy.pxd":740 * #ctypedef npy_uint128 uint128_t * * ctypedef npy_float16 float16_t # <<<<<<<<<<<<<< * ctypedef npy_float32 float32_t * ctypedef npy_float64 float64_t */ typedef npy_float16 __pyx_t_5numpy_float16_t; /* "numpy.pxd":741 * * ctypedef npy_float16 float16_t * ctypedef npy_float32 float32_t # <<<<<<<<<<<<<< * ctypedef npy_float64 float64_t * #ctypedef npy_float80 float80_t */ typedef npy_float32 __pyx_t_5numpy_float32_t; /* "numpy.pxd":742 * ctypedef npy_float16 float16_t * 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; /* "numpy.pxd":751 * # 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; /* "numpy.pxd":752 * # 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; /* "numpy.pxd":753 * 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; /* "numpy.pxd":755 * 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; /* "numpy.pxd":756 * * ctypedef npy_ulong uint_t * ctypedef npy_ulonglong ulong_t # <<<<<<<<<<<<<< * ctypedef npy_ulonglong ulonglong_t * */ typedef npy_ulonglong __pyx_t_5numpy_ulong_t; /* "numpy.pxd":757 * 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; /* "numpy.pxd":759 * ctypedef npy_ulonglong ulonglong_t * * ctypedef npy_intp intp_t # <<<<<<<<<<<<<< * ctypedef npy_uintp uintp_t * */ typedef npy_intp __pyx_t_5numpy_intp_t; /* "numpy.pxd":760 * * ctypedef npy_intp intp_t * ctypedef npy_uintp uintp_t # <<<<<<<<<<<<<< * * ctypedef npy_double float_t */ typedef npy_uintp __pyx_t_5numpy_uintp_t; /* "numpy.pxd":762 * 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; /* "numpy.pxd":763 * * ctypedef npy_double float_t * ctypedef npy_double double_t # <<<<<<<<<<<<<< * ctypedef npy_longdouble longdouble_t * */ typedef npy_double __pyx_t_5numpy_double_t; /* "numpy.pxd":764 * 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; #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 #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 /*--- Type declarations ---*/ struct __pyx_obj_6pandas_6parser_TextReader; /* "numpy.pxd":766 * 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; /* "numpy.pxd":767 * * ctypedef npy_cfloat cfloat_t * ctypedef npy_cdouble cdouble_t # <<<<<<<<<<<<<< * ctypedef npy_clongdouble clongdouble_t * */ typedef npy_cdouble __pyx_t_5numpy_cdouble_t; /* "numpy.pxd":768 * 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; /* "numpy.pxd":770 * 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/parser.pyx":230 * * * cdef class TextReader: # <<<<<<<<<<<<<< * ''' * */ struct __pyx_obj_6pandas_6parser_TextReader { PyObject_HEAD struct __pyx_vtabstruct_6pandas_6parser_TextReader *__pyx_vtab; parser_t *parser; PyObject *file_handle; PyObject *na_fvalues; int na_filter; int verbose; int has_usecols; int has_mi_columns; int parser_start; PyObject *clocks; char *c_encoding; int leading_cols; int table_width; int skip_footer; int buffer_lines; PyObject *allow_leading_cols; PyObject *delimiter; PyObject *converters; PyObject *delim_whitespace; PyObject *na_values; PyObject *true_values; PyObject *false_values; PyObject *memory_map; PyObject *as_recarray; PyObject *header; PyObject *orig_header; PyObject *names; PyObject *header_start; PyObject *header_end; PyObject *index_col; PyObject *low_memory; PyObject *skiprows; PyObject *compact_ints; PyObject *use_unsigned; PyObject *dtype; PyObject *encoding; PyObject *compression; PyObject *mangle_dupe_cols; PyObject *tupleize_cols; PyObject *noconvert; PyObject *usecols; }; struct __pyx_vtabstruct_6pandas_6parser_TextReader { PyObject *(*_make_skiprow_set)(struct __pyx_obj_6pandas_6parser_TextReader *); PyObject *(*_setup_parser_source)(struct __pyx_obj_6pandas_6parser_TextReader *, PyObject *); PyObject *(*_get_header)(struct __pyx_obj_6pandas_6parser_TextReader *); PyObject *(*_implicit_index_count)(struct __pyx_obj_6pandas_6parser_TextReader *); PyObject *(*_read_low_memory)(struct __pyx_obj_6pandas_6parser_TextReader *, PyObject *); PyObject *(*_tokenize_rows)(struct __pyx_obj_6pandas_6parser_TextReader *, size_t); PyObject *(*_read_rows)(struct __pyx_obj_6pandas_6parser_TextReader *, PyObject *, int); PyObject *(*_start_clock)(struct __pyx_obj_6pandas_6parser_TextReader *); PyObject *(*_end_clock)(struct __pyx_obj_6pandas_6parser_TextReader *, PyObject *); PyObject *(*_convert_tokens)(struct __pyx_obj_6pandas_6parser_TextReader *, Py_ssize_t, int, int, PyObject *, int, kh_str_t *, PyObject *); PyObject *(*_convert_with_dtype)(struct __pyx_obj_6pandas_6parser_TextReader *, PyObject *, Py_ssize_t, int, int, int, int, kh_str_t *, PyObject *); PyObject *(*_string_convert)(struct __pyx_obj_6pandas_6parser_TextReader *, Py_ssize_t, int, int, int, kh_str_t *); PyObject *(*_get_na_list)(struct __pyx_obj_6pandas_6parser_TextReader *, PyObject *, PyObject *); PyObject *(*_free_na_set)(struct __pyx_obj_6pandas_6parser_TextReader *, kh_str_t *); PyObject *(*_get_column_name)(struct __pyx_obj_6pandas_6parser_TextReader *, Py_ssize_t, Py_ssize_t); }; static struct __pyx_vtabstruct_6pandas_6parser_TextReader *__pyx_vtabptr_6pandas_6parser_TextReader; static CYTHON_INLINE PyObject *__pyx_f_6pandas_6parser_10TextReader__convert_tokens(struct __pyx_obj_6pandas_6parser_TextReader *, Py_ssize_t, int, int, PyObject *, int, kh_str_t *, PyObject *); #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); /*proto*/ #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 /* CYTHON_REFNANNY */ #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) #if CYTHON_COMPILING_IN_CPYTHON static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name) { PyTypeObject* tp = Py_TYPE(obj); if (likely(tp->tp_getattro)) return tp->tp_getattro(obj, attr_name); #if PY_MAJOR_VERSION < 3 if (likely(tp->tp_getattr)) return tp->tp_getattr(obj, PyString_AS_STRING(attr_name)); #endif return PyObject_GetAttr(obj, attr_name); } #else #define __Pyx_PyObject_GetAttrStr(o,n) PyObject_GetAttr(o,n) #endif static PyObject *__Pyx_GetBuiltinName(PyObject *name); /*proto*/ static void __Pyx_RaiseDoubleKeywordsError(const char* func_name, PyObject* kw_name); /*proto*/ static int __Pyx_ParseOptionalKeywords(PyObject *kwds, PyObject **argnames[], \ PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args, \ const char* function_name); /*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); /*proto*/ static CYTHON_INLINE void __Pyx_ErrRestore(PyObject *type, PyObject *value, PyObject *tb); /*proto*/ static CYTHON_INLINE void __Pyx_ErrFetch(PyObject **type, PyObject **value, PyObject **tb); /*proto*/ static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause); /*proto*/ #if PY_VERSION_HEX < 0x02050000 #ifndef PyAnySet_CheckExact #define PyAnySet_CheckExact(ob) \ ((ob)->ob_type == &PySet_Type || \ (ob)->ob_type == &PyFrozenSet_Type) #define PySet_New(iterable) \ PyObject_CallFunctionObjArgs((PyObject *)&PySet_Type, (iterable), NULL) #define Pyx_PyFrozenSet_New(iterable) \ PyObject_CallFunctionObjArgs((PyObject *)&PyFrozenSet_Type, (iterable), NULL) #define PySet_Size(anyset) \ PyObject_Size((anyset)) #define PySet_Contains(anyset, key) \ PySequence_Contains((anyset), (key)) #define PySet_Pop(set) \ PyObject_CallMethod((set), (char*)"pop", NULL) static CYTHON_INLINE int PySet_Clear(PyObject *set) { PyObject *ret = PyObject_CallMethod(set, (char*)"clear", NULL); if (!ret) return -1; Py_DECREF(ret); return 0; } static CYTHON_INLINE int PySet_Discard(PyObject *set, PyObject *key) { PyObject *ret = PyObject_CallMethod(set, (char*)"discard", (char*)"(O)", key); if (!ret) return -1; Py_DECREF(ret); return 0; } static CYTHON_INLINE int PySet_Add(PyObject *set, PyObject *key) { PyObject *ret = PyObject_CallMethod(set, (char*)"add", (char*)"(O)", key); if (!ret) return -1; Py_DECREF(ret); return 0; } #endif /* PyAnySet_CheckExact (<= Py2.4) */ #endif /* < Py2.5 */ static CYTHON_INLINE PyObject *__Pyx_GetModuleGlobalName(PyObject *name); /*proto*/ #if CYTHON_COMPILING_IN_CPYTHON static CYTHON_INLINE int __Pyx_PyList_Append(PyObject* list, PyObject* x) { PyListObject* L = (PyListObject*) list; Py_ssize_t len = Py_SIZE(list); if (likely(L->allocated > len) & likely(len > (L->allocated >> 1))) { Py_INCREF(x); PyList_SET_ITEM(list, len, x); Py_SIZE(list) = len+1; return 0; } return PyList_Append(list, x); } #else #define __Pyx_PyList_Append(L,x) PyList_Append(L,x) #endif static PyObject* __Pyx_PyObject_CallMethodTuple(PyObject* obj, PyObject* method_name, PyObject* args) { PyObject *method, *result = NULL; if (unlikely(!args)) return NULL; method = __Pyx_PyObject_GetAttrStr(obj, method_name); if (unlikely(!method)) goto bad; result = PyObject_Call(method, args, NULL); Py_DECREF(method); bad: Py_DECREF(args); return result; } #define __Pyx_PyObject_CallMethod3(obj, name, arg1, arg2, arg3) \ __Pyx_PyObject_CallMethodTuple(obj, name, PyTuple_Pack(3, arg1, arg2, arg3)) #define __Pyx_PyObject_CallMethod2(obj, name, arg1, arg2) \ __Pyx_PyObject_CallMethodTuple(obj, name, PyTuple_Pack(2, arg1, arg2)) #define __Pyx_PyObject_CallMethod1(obj, name, arg1) \ __Pyx_PyObject_CallMethodTuple(obj, name, PyTuple_Pack(1, arg1)) #define __Pyx_PyObject_CallMethod0(obj, name) \ __Pyx_PyObject_CallMethodTuple(obj, name, (Py_INCREF(__pyx_empty_tuple), __pyx_empty_tuple)) static CYTHON_INLINE int __Pyx_PyObject_Append(PyObject* L, PyObject* x); /*proto*/ #define __Pyx_GetItemInt(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck) \ (__Pyx_fits_Py_ssize_t(i, type, is_signed) ? \ __Pyx_GetItemInt_Fast(o, (Py_ssize_t)i, is_list, wraparound, boundscheck) : \ (is_list ? (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL) : \ __Pyx_GetItemInt_Generic(o, to_py_func(i)))) #define __Pyx_GetItemInt_List(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck) \ (__Pyx_fits_Py_ssize_t(i, type, is_signed) ? \ __Pyx_GetItemInt_List_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) : \ (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL)) static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i, int wraparound, int boundscheck); #define __Pyx_GetItemInt_Tuple(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck) \ (__Pyx_fits_Py_ssize_t(i, type, is_signed) ? \ __Pyx_GetItemInt_Tuple_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) : \ (PyErr_SetString(PyExc_IndexError, "tuple index out of range"), (PyObject*)NULL)) static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i, int wraparound, int boundscheck); static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j); static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, int is_list, int wraparound, int boundscheck); static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected); static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index); static CYTHON_INLINE int __Pyx_IterFinish(void); /*proto*/ static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected); /*proto*/ static CYTHON_INLINE long __Pyx_div_long(long, long); /* proto */ #ifndef __PYX_FORCE_INIT_THREADS #define __PYX_FORCE_INIT_THREADS 0 #endif #define UNARY_NEG_WOULD_OVERFLOW(x) (((x) < 0) & ((unsigned long)(x) == 0-(unsigned long)(x))) static CYTHON_INLINE int __Pyx_CheckKeywordStrings(PyObject *kwdict, const char* function_name, int kw_allowed); /*proto*/ #include static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals); /*proto*/ static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals); /*proto*/ #if PY_MAJOR_VERSION >= 3 #define __Pyx_PyString_Equals __Pyx_PyUnicode_Equals #else #define __Pyx_PyString_Equals __Pyx_PyBytes_Equals #endif #if PY_MAJOR_VERSION < 3 #define __Pyx_PyString_Join __Pyx_PyBytes_Join #define __Pyx_PyBaseString_Join(s, v) (PyUnicode_CheckExact(s) ? PyUnicode_Join(s, v) : __Pyx_PyBytes_Join(s, v)) #else #define __Pyx_PyString_Join PyUnicode_Join #define __Pyx_PyBaseString_Join PyUnicode_Join #endif #if CYTHON_COMPILING_IN_CPYTHON #if PY_MAJOR_VERSION < 3 #define __Pyx_PyBytes_Join _PyString_Join #else #define __Pyx_PyBytes_Join _PyBytes_Join #endif #else static CYTHON_INLINE PyObject* __Pyx_PyBytes_Join(PyObject* sep, PyObject* values); /*proto*/ #endif #if CYTHON_COMPILING_IN_CPYTHON static CYTHON_INLINE int __Pyx_ListComp_Append(PyObject* list, PyObject* x) { PyListObject* L = (PyListObject*) list; Py_ssize_t len = Py_SIZE(list); if (likely(L->allocated > len)) { Py_INCREF(x); PyList_SET_ITEM(list, len, x); Py_SIZE(list) = len+1; return 0; } return PyList_Append(list, x); } #else #define __Pyx_ListComp_Append(L,x) PyList_Append(L,x) #endif static PyObject* __Pyx_PyDict_GetItemDefault(PyObject* d, PyObject* key, PyObject* default_value); /*proto*/ static CYTHON_INLINE void __Pyx_ExceptionSave(PyObject **type, PyObject **value, PyObject **tb); /*proto*/ static void __Pyx_ExceptionReset(PyObject *type, PyObject *value, PyObject *tb); /*proto*/ static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb); /*proto*/ #define __Pyx_PyObject_PopIndex(L, ix) (PyList_CheckExact(L) ? \ __Pyx_PyList_PopIndex(L, ix) : __Pyx__PyObject_PopIndex(L, ix)) static PyObject* __Pyx_PyList_PopIndex(PyObject* L, Py_ssize_t ix); /*proto*/ static PyObject* __Pyx__PyObject_PopIndex(PyObject* L, Py_ssize_t ix); /*proto*/ static CYTHON_INLINE int __Pyx_PySequence_Contains(PyObject* item, PyObject* seq, int eq) { int result = PySequence_Contains(seq, item); return unlikely(result < 0) ? result : (result == (eq == Py_EQ)); } static CYTHON_INLINE void __Pyx_RaiseUnboundLocalError(const char *varname); static CYTHON_INLINE PyObject* __Pyx_PyObject_GetSlice( PyObject* obj, Py_ssize_t cstart, Py_ssize_t cstop, PyObject** py_start, PyObject** py_stop, PyObject** py_slice, int has_cstart, int has_cstop, int wraparound); static CYTHON_INLINE int __Pyx_ArgTypeTest(PyObject *obj, PyTypeObject *type, int none_allowed, const char *name, int exact); /*proto*/ static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type); /*proto*/ static CYTHON_INLINE int __Pyx_GetBufferAndValidate(Py_buffer* buf, PyObject* obj, __Pyx_TypeInfo* dtype, int flags, int nd, int cast, __Pyx_BufFmt_StackElem* stack); static CYTHON_INLINE void __Pyx_SafeReleaseBuffer(Py_buffer* info); static void __Pyx_RaiseBufferFallbackError(void); /*proto*/ static void __Pyx_RaiseBufferIndexError(int axis); /*proto*/ #define __Pyx_BufPtrStrided1d(type, buf, i0, s0) (type)((char*)buf + i0 * s0) static CYTHON_INLINE PyObject* __Pyx_decode_c_string( const char* cstring, Py_ssize_t start, Py_ssize_t stop, const char* encoding, const char* errors, PyObject* (*decode_func)(const char *s, Py_ssize_t size, const char *errors)); #if PY_MAJOR_VERSION >= 3 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; } #else #define __Pyx_PyDict_GetItem(d, key) PyObject_GetItem(d, key) #endif static CYTHON_INLINE PyObject* __Pyx_PyDict_Values(PyObject* d); /*proto*/ static void __Pyx_WriteUnraisable(const char *name, int clineno, int lineno, const char *filename, int full_traceback); /*proto*/ static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void); static int __Pyx_SetVtable(PyObject *dict, void *vtable); /*proto*/ static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name); /*proto*/ static PyObject *__Pyx_CalculateMetaclass(PyTypeObject *metaclass, PyObject *bases); static PyObject *__Pyx_Py3MetaclassPrepare(PyObject *metaclass, PyObject *bases, PyObject *name, PyObject *qualname, PyObject *mkw, PyObject *modname, PyObject *doc); /*proto*/ static PyObject *__Pyx_Py3ClassCreate(PyObject *metaclass, PyObject *name, PyObject *bases, PyObject *dict, PyObject *mkw, int calculate_metaclass, int allow_py2_metaclass); /*proto*/ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value); static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *); 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 static Py_ssize_t __Pyx_zeros[] = {0, 0, 0, 0, 0, 0, 0, 0}; static Py_ssize_t __Pyx_minusones[] = {-1, -1, -1, -1, -1, -1, -1, -1}; static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level); /*proto*/ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value); static CYTHON_INLINE char __Pyx_PyInt_As_char(PyObject *); static CYTHON_INLINE npy_int64 __Pyx_PyInt_As_npy_int64(PyObject *); static CYTHON_INLINE size_t __Pyx_PyInt_As_size_t(PyObject *); static int __Pyx_Print(PyObject*, PyObject *, int); /*proto*/ #if CYTHON_COMPILING_IN_PYPY || PY_MAJOR_VERSION >= 3 static PyObject* __pyx_print = 0; static PyObject* __pyx_print_kwargs = 0; #endif static int __Pyx_PrintOne(PyObject* stream, PyObject *o); /*proto*/ static CYTHON_INLINE npy_uint8 __Pyx_PyInt_As_npy_uint8(PyObject *); #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(_WIN32) || defined(__clang__)) && defined(__cplusplus) && CYTHON_CCOMPLEX #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 static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float, float); #if CYTHON_CCOMPLEX #define __Pyx_c_eqf(a, b) ((a)==(b)) #define __Pyx_c_sumf(a, b) ((a)+(b)) #define __Pyx_c_difff(a, b) ((a)-(b)) #define __Pyx_c_prodf(a, b) ((a)*(b)) #define __Pyx_c_quotf(a, b) ((a)/(b)) #define __Pyx_c_negf(a) (-(a)) #ifdef __cplusplus #define __Pyx_c_is_zerof(z) ((z)==(float)0) #define __Pyx_c_conjf(z) (::std::conj(z)) #if 1 #define __Pyx_c_absf(z) (::std::abs(z)) #define __Pyx_c_powf(a, b) (::std::pow(a, b)) #endif #else #define __Pyx_c_is_zerof(z) ((z)==0) #define __Pyx_c_conjf(z) (conjf(z)) #if 1 #define __Pyx_c_absf(z) (cabsf(z)) #define __Pyx_c_powf(a, b) (cpowf(a, b)) #endif #endif #else static CYTHON_INLINE int __Pyx_c_eqf(__pyx_t_float_complex, __pyx_t_float_complex); static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_sumf(__pyx_t_float_complex, __pyx_t_float_complex); static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_difff(__pyx_t_float_complex, __pyx_t_float_complex); static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_prodf(__pyx_t_float_complex, __pyx_t_float_complex); static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_quotf(__pyx_t_float_complex, __pyx_t_float_complex); static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_negf(__pyx_t_float_complex); static CYTHON_INLINE int __Pyx_c_is_zerof(__pyx_t_float_complex); static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_conjf(__pyx_t_float_complex); #if 1 static CYTHON_INLINE float __Pyx_c_absf(__pyx_t_float_complex); static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_powf(__pyx_t_float_complex, __pyx_t_float_complex); #endif #endif static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double, double); #if CYTHON_CCOMPLEX #define __Pyx_c_eq(a, b) ((a)==(b)) #define __Pyx_c_sum(a, b) ((a)+(b)) #define __Pyx_c_diff(a, b) ((a)-(b)) #define __Pyx_c_prod(a, b) ((a)*(b)) #define __Pyx_c_quot(a, b) ((a)/(b)) #define __Pyx_c_neg(a) (-(a)) #ifdef __cplusplus #define __Pyx_c_is_zero(z) ((z)==(double)0) #define __Pyx_c_conj(z) (::std::conj(z)) #if 1 #define __Pyx_c_abs(z) (::std::abs(z)) #define __Pyx_c_pow(a, b) (::std::pow(a, b)) #endif #else #define __Pyx_c_is_zero(z) ((z)==0) #define __Pyx_c_conj(z) (conj(z)) #if 1 #define __Pyx_c_abs(z) (cabs(z)) #define __Pyx_c_pow(a, b) (cpow(a, b)) #endif #endif #else static CYTHON_INLINE int __Pyx_c_eq(__pyx_t_double_complex, __pyx_t_double_complex); static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_sum(__pyx_t_double_complex, __pyx_t_double_complex); static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_diff(__pyx_t_double_complex, __pyx_t_double_complex); static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_prod(__pyx_t_double_complex, __pyx_t_double_complex); static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_quot(__pyx_t_double_complex, __pyx_t_double_complex); static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_neg(__pyx_t_double_complex); static CYTHON_INLINE int __Pyx_c_is_zero(__pyx_t_double_complex); static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_conj(__pyx_t_double_complex); #if 1 static CYTHON_INLINE double __Pyx_c_abs(__pyx_t_double_complex); static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_pow(__pyx_t_double_complex, __pyx_t_double_complex); #endif #endif static CYTHON_INLINE PyObject* __Pyx_PyInt_From_ptrdiff_t(ptrdiff_t value); static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *); static int __Pyx_check_binary_version(void); #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 static PyObject *__Pyx_ImportModule(const char *name); /*proto*/ static PyTypeObject *__Pyx_ImportType(const char *module_name, const char *class_name, size_t size, int strict); /*proto*/ typedef struct { int code_line; PyCodeObject* code_object; } __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); static void __Pyx_AddTraceback(const char *funcname, int c_line, int py_line, const char *filename); /*proto*/ static int __Pyx_InitStrings(__Pyx_StringTabEntry *t); /*proto*/ /* Module declarations from 'libc.string' */ /* Module declarations from 'libc.stdio' */ /* Module declarations from 'libc.stdlib' */ /* Module declarations from 'cpython.version' */ /* Module declarations from 'cpython.ref' */ /* Module declarations from 'cpython.exc' */ /* Module declarations from 'cpython.module' */ /* Module declarations from 'cpython.mem' */ /* Module declarations from 'cpython.tuple' */ /* Module declarations from 'cpython.list' */ /* Module declarations from 'cpython.object' */ /* Module declarations from 'cpython.sequence' */ /* Module declarations from 'cpython.mapping' */ /* Module declarations from 'cpython.iterator' */ /* Module declarations from '__builtin__' */ /* Module declarations from 'cpython.type' */ static PyTypeObject *__pyx_ptype_7cpython_4type_type = 0; /* Module declarations from 'cpython.number' */ /* Module declarations from 'cpython.int' */ /* Module declarations from '__builtin__' */ /* Module declarations from 'cpython.bool' */ static PyTypeObject *__pyx_ptype_7cpython_4bool_bool = 0; /* Module declarations from 'cpython.long' */ /* Module declarations from 'cpython.float' */ /* Module declarations from '__builtin__' */ /* Module declarations from 'cpython.complex' */ static PyTypeObject *__pyx_ptype_7cpython_7complex_complex = 0; /* Module declarations from 'cpython.string' */ /* Module declarations from 'cpython.unicode' */ /* Module declarations from 'cpython.dict' */ /* Module declarations from 'cpython.instance' */ /* Module declarations from 'cpython.function' */ /* Module declarations from 'cpython.method' */ /* Module declarations from 'cpython.weakref' */ /* Module declarations from 'cpython.getargs' */ /* Module declarations from 'cpython.pythread' */ /* Module declarations from 'cpython.pystate' */ /* Module declarations from 'cpython.cobject' */ /* Module declarations from 'cpython.oldbuffer' */ /* Module declarations from 'cpython.set' */ /* Module declarations from 'cpython.buffer' */ /* Module declarations from 'cpython.bytes' */ /* Module declarations from 'cpython.pycapsule' */ /* Module declarations from 'cpython' */ /* 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*/ /* Module declarations from 'util' */ /* Module declarations from 'khash' */ /* Module declarations from 'pandas.parser' */ static PyTypeObject *__pyx_ptype_6pandas_6parser_TextReader = 0; static int __pyx_v_6pandas_6parser_PY3; static double __pyx_v_6pandas_6parser_INF; static double __pyx_v_6pandas_6parser_NEGINF; static PyObject *__pyx_v_6pandas_6parser__true_values = 0; static PyObject *__pyx_v_6pandas_6parser__false_values = 0; static char *__pyx_v_6pandas_6parser_cinf; static char *__pyx_v_6pandas_6parser_cneginf; static PyObject *__pyx_v_6pandas_6parser_dtype_cast_order = 0; static PyObject *__pyx_f_6pandas_6parser_asbytes(PyObject *); /*proto*/ static PyObject *__pyx_f_6pandas_6parser__string_box_factorize(parser_t *, int, int, int, int, kh_str_t *); /*proto*/ static PyObject *__pyx_f_6pandas_6parser__string_box_utf8(parser_t *, int, int, int, int, kh_str_t *); /*proto*/ static PyObject *__pyx_f_6pandas_6parser__string_box_decode(parser_t *, int, int, int, int, kh_str_t *, char *); /*proto*/ static PyObject *__pyx_f_6pandas_6parser__to_fw_string(parser_t *, int, int, int, size_t); /*proto*/ static PyObject *__pyx_f_6pandas_6parser__try_double(parser_t *, int, int, int, int, kh_str_t *, PyObject *); /*proto*/ static PyObject *__pyx_f_6pandas_6parser__try_int64(parser_t *, int, int, int, int, kh_str_t *); /*proto*/ static PyObject *__pyx_f_6pandas_6parser__try_bool(parser_t *, int, int, int, int, kh_str_t *); /*proto*/ static PyObject *__pyx_f_6pandas_6parser__try_bool_flex(parser_t *, int, int, int, int, kh_str_t *, kh_str_t *, kh_str_t *); /*proto*/ static kh_str_t *__pyx_f_6pandas_6parser_kset_from_list(PyObject *); /*proto*/ static PyObject *__pyx_f_6pandas_6parser_raise_parser_error(PyObject *, parser_t *); /*proto*/ static PyObject *__pyx_f_6pandas_6parser__apply_converter(PyObject *, parser_t *, int, int, int, char *); /*proto*/ static PyObject *__pyx_f_6pandas_6parser__fill_structured_column(char *, char *, int, int, int, int); /*proto*/ 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_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_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 }; #define __Pyx_MODULE_NAME "pandas.parser" int __pyx_module_is_main_pandas__parser = 0; /* Implementation of 'pandas.parser' */ static PyObject *__pyx_builtin_NameError; static PyObject *__pyx_builtin_Exception; static PyObject *__pyx_builtin_ValueError; static PyObject *__pyx_builtin_ord; static PyObject *__pyx_builtin_range; static PyObject *__pyx_builtin_IOError; static PyObject *__pyx_builtin_enumerate; static PyObject *__pyx_builtin_StopIteration; static PyObject *__pyx_builtin_NotImplementedError; static PyObject *__pyx_builtin_TypeError; static PyObject *__pyx_builtin_object; static PyObject *__pyx_builtin_IndexError; static PyObject *__pyx_builtin_RuntimeError; static int __pyx_pf_6pandas_6parser_10TextReader___cinit__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self, PyObject *__pyx_v_source, PyObject *__pyx_v_delimiter, PyObject *__pyx_v_header, CYTHON_UNUSED PyObject *__pyx_v_header_start, CYTHON_UNUSED PyObject *__pyx_v_header_end, PyObject *__pyx_v_index_col, PyObject *__pyx_v_names, PyObject *__pyx_v_memory_map, PyObject *__pyx_v_tokenize_chunksize, PyObject *__pyx_v_delim_whitespace, PyObject *__pyx_v_compression, PyObject *__pyx_v_converters, PyObject *__pyx_v_as_recarray, PyObject *__pyx_v_skipinitialspace, PyObject *__pyx_v_escapechar, PyObject *__pyx_v_doublequote, PyObject *__pyx_v_quotechar, PyObject *__pyx_v_quoting, PyObject *__pyx_v_lineterminator, PyObject *__pyx_v_encoding, PyObject *__pyx_v_comment, PyObject *__pyx_v_decimal, PyObject *__pyx_v_thousands, PyObject *__pyx_v_dtype, PyObject *__pyx_v_usecols, PyObject *__pyx_v_error_bad_lines, PyObject *__pyx_v_warn_bad_lines, PyObject *__pyx_v_na_filter, PyObject *__pyx_v_na_values, PyObject *__pyx_v_na_fvalues, PyObject *__pyx_v_true_values, PyObject *__pyx_v_false_values, PyObject *__pyx_v_compact_ints, PyObject *__pyx_v_allow_leading_cols, PyObject *__pyx_v_use_unsigned, PyObject *__pyx_v_low_memory, CYTHON_UNUSED PyObject *__pyx_v_buffer_lines, PyObject *__pyx_v_skiprows, PyObject *__pyx_v_skip_footer, PyObject *__pyx_v_verbose, PyObject *__pyx_v_mangle_dupe_cols, PyObject *__pyx_v_tupleize_cols); /* proto */ static int __pyx_pf_6pandas_6parser_10TextReader_2__init__(CYTHON_UNUSED struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_args, CYTHON_UNUSED PyObject *__pyx_v_kwards); /* proto */ static void __pyx_pf_6pandas_6parser_10TextReader_4__dealloc__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_6parser_10TextReader_6set_error_bad_lines(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self, int __pyx_v_status); /* proto */ static PyObject *__pyx_pf_6pandas_6parser_10TextReader_8read(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self, PyObject *__pyx_v_rows); /* proto */ static PyObject *__pyx_pf_6pandas_6parser_10TextReader_10debug_print(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_6parser_10TextReader_12set_noconvert(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self, PyObject *__pyx_v_i); /* proto */ static PyObject *__pyx_pf_6pandas_6parser_10TextReader_14remove_noconvert(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self, PyObject *__pyx_v_i); /* proto */ static PyObject *__pyx_pf_6pandas_6parser_10TextReader_16_convert_column_data(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self, PyObject *__pyx_v_rows, PyObject *__pyx_v_upcast_na, CYTHON_UNUSED PyObject *__pyx_v_footer); /* proto */ static PyObject *__pyx_pf_6pandas_6parser_10TextReader_18_get_converter(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self, PyObject *__pyx_v_i, PyObject *__pyx_v_name); /* proto */ static PyObject *__pyx_pf_6pandas_6parser_10TextReader_12leading_cols___get__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self); /* proto */ static int __pyx_pf_6pandas_6parser_10TextReader_12leading_cols_2__set__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ static PyObject *__pyx_pf_6pandas_6parser_10TextReader_11table_width___get__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self); /* proto */ static int __pyx_pf_6pandas_6parser_10TextReader_11table_width_2__set__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ static PyObject *__pyx_pf_6pandas_6parser_10TextReader_11skip_footer___get__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self); /* proto */ static int __pyx_pf_6pandas_6parser_10TextReader_11skip_footer_2__set__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ static PyObject *__pyx_pf_6pandas_6parser_10TextReader_12buffer_lines___get__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self); /* proto */ static int __pyx_pf_6pandas_6parser_10TextReader_12buffer_lines_2__set__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ static PyObject *__pyx_pf_6pandas_6parser_10TextReader_18allow_leading_cols___get__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self); /* proto */ static int __pyx_pf_6pandas_6parser_10TextReader_18allow_leading_cols_2__set__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ static int __pyx_pf_6pandas_6parser_10TextReader_18allow_leading_cols_4__del__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_6parser_10TextReader_9delimiter___get__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self); /* proto */ static int __pyx_pf_6pandas_6parser_10TextReader_9delimiter_2__set__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ static int __pyx_pf_6pandas_6parser_10TextReader_9delimiter_4__del__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_6parser_10TextReader_10converters___get__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self); /* proto */ static int __pyx_pf_6pandas_6parser_10TextReader_10converters_2__set__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ static int __pyx_pf_6pandas_6parser_10TextReader_10converters_4__del__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_6parser_10TextReader_16delim_whitespace___get__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self); /* proto */ static int __pyx_pf_6pandas_6parser_10TextReader_16delim_whitespace_2__set__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ static int __pyx_pf_6pandas_6parser_10TextReader_16delim_whitespace_4__del__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_6parser_10TextReader_9na_values___get__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self); /* proto */ static int __pyx_pf_6pandas_6parser_10TextReader_9na_values_2__set__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ static int __pyx_pf_6pandas_6parser_10TextReader_9na_values_4__del__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_6parser_10TextReader_11true_values___get__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self); /* proto */ static int __pyx_pf_6pandas_6parser_10TextReader_11true_values_2__set__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ static int __pyx_pf_6pandas_6parser_10TextReader_11true_values_4__del__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_6parser_10TextReader_12false_values___get__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self); /* proto */ static int __pyx_pf_6pandas_6parser_10TextReader_12false_values_2__set__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ static int __pyx_pf_6pandas_6parser_10TextReader_12false_values_4__del__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_6parser_10TextReader_10memory_map___get__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self); /* proto */ static int __pyx_pf_6pandas_6parser_10TextReader_10memory_map_2__set__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ static int __pyx_pf_6pandas_6parser_10TextReader_10memory_map_4__del__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_6parser_10TextReader_11as_recarray___get__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self); /* proto */ static int __pyx_pf_6pandas_6parser_10TextReader_11as_recarray_2__set__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ static int __pyx_pf_6pandas_6parser_10TextReader_11as_recarray_4__del__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_6parser_10TextReader_6header___get__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self); /* proto */ static int __pyx_pf_6pandas_6parser_10TextReader_6header_2__set__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ static int __pyx_pf_6pandas_6parser_10TextReader_6header_4__del__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_6parser_10TextReader_11orig_header___get__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self); /* proto */ static int __pyx_pf_6pandas_6parser_10TextReader_11orig_header_2__set__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ static int __pyx_pf_6pandas_6parser_10TextReader_11orig_header_4__del__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_6parser_10TextReader_5names___get__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self); /* proto */ static int __pyx_pf_6pandas_6parser_10TextReader_5names_2__set__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ static int __pyx_pf_6pandas_6parser_10TextReader_5names_4__del__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_6parser_10TextReader_12header_start___get__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self); /* proto */ static int __pyx_pf_6pandas_6parser_10TextReader_12header_start_2__set__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ static int __pyx_pf_6pandas_6parser_10TextReader_12header_start_4__del__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_6parser_10TextReader_10header_end___get__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self); /* proto */ static int __pyx_pf_6pandas_6parser_10TextReader_10header_end_2__set__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ static int __pyx_pf_6pandas_6parser_10TextReader_10header_end_4__del__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_6parser_10TextReader_9index_col___get__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self); /* proto */ static int __pyx_pf_6pandas_6parser_10TextReader_9index_col_2__set__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ static int __pyx_pf_6pandas_6parser_10TextReader_9index_col_4__del__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_6parser_10TextReader_10low_memory___get__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self); /* proto */ static int __pyx_pf_6pandas_6parser_10TextReader_10low_memory_2__set__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ static int __pyx_pf_6pandas_6parser_10TextReader_10low_memory_4__del__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_6parser_10TextReader_8skiprows___get__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self); /* proto */ static int __pyx_pf_6pandas_6parser_10TextReader_8skiprows_2__set__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ static int __pyx_pf_6pandas_6parser_10TextReader_8skiprows_4__del__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_6parser_10TextReader_12compact_ints___get__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self); /* proto */ static int __pyx_pf_6pandas_6parser_10TextReader_12compact_ints_2__set__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ static int __pyx_pf_6pandas_6parser_10TextReader_12compact_ints_4__del__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_6parser_10TextReader_12use_unsigned___get__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self); /* proto */ static int __pyx_pf_6pandas_6parser_10TextReader_12use_unsigned_2__set__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ static int __pyx_pf_6pandas_6parser_10TextReader_12use_unsigned_4__del__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_6parser_10TextReader_5dtype___get__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self); /* proto */ static int __pyx_pf_6pandas_6parser_10TextReader_5dtype_2__set__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ static int __pyx_pf_6pandas_6parser_10TextReader_5dtype_4__del__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_6parser_10TextReader_8encoding___get__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self); /* proto */ static int __pyx_pf_6pandas_6parser_10TextReader_8encoding_2__set__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ static int __pyx_pf_6pandas_6parser_10TextReader_8encoding_4__del__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_6parser_10TextReader_11compression___get__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self); /* proto */ static int __pyx_pf_6pandas_6parser_10TextReader_11compression_2__set__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ static int __pyx_pf_6pandas_6parser_10TextReader_11compression_4__del__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_6parser_10TextReader_16mangle_dupe_cols___get__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self); /* proto */ static int __pyx_pf_6pandas_6parser_10TextReader_16mangle_dupe_cols_2__set__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ static int __pyx_pf_6pandas_6parser_10TextReader_16mangle_dupe_cols_4__del__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_6parser_10TextReader_13tupleize_cols___get__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self); /* proto */ static int __pyx_pf_6pandas_6parser_10TextReader_13tupleize_cols_2__set__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ static int __pyx_pf_6pandas_6parser_10TextReader_13tupleize_cols_4__del__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_6parser_10TextReader_9noconvert___get__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self); /* proto */ static int __pyx_pf_6pandas_6parser_10TextReader_9noconvert_2__set__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ static int __pyx_pf_6pandas_6parser_10TextReader_9noconvert_4__del__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_6parser_10TextReader_7usecols___get__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self); /* proto */ static int __pyx_pf_6pandas_6parser_10TextReader_7usecols_2__set__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ static int __pyx_pf_6pandas_6parser_10TextReader_7usecols_4__del__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_6parser__ensure_encoded(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_lst); /* proto */ static PyObject *__pyx_pf_6pandas_6parser_2_is_file_like(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */ static PyObject *__pyx_pf_6pandas_6parser_4_maybe_upcast(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_arr); /* proto */ static PyObject *__pyx_pf_6pandas_6parser_6downcast_int64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_arr, int __pyx_v_use_unsigned); /* proto */ static PyObject *__pyx_pf_6pandas_6parser_8_concatenate_chunks(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_chunks); /* proto */ static PyObject *__pyx_pf_6pandas_6parser_10_compute_na_values(CYTHON_UNUSED PyObject *__pyx_self); /* proto */ static PyObject *__pyx_pf_6pandas_6parser_12_to_structured_array(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_columns, PyObject *__pyx_v_names); /* proto */ static PyObject *__pyx_pf_6pandas_6parser_14_maybe_encode(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_values); /* 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_6parser_TextReader(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static char __pyx_k_[] = ","; static char __pyx_k_B[] = "B"; static char __pyx_k_H[] = "H"; static char __pyx_k_I[] = "I"; static char __pyx_k_L[] = "L"; static char __pyx_k_M[] = "M"; static char __pyx_k_O[] = "O"; static char __pyx_k_Q[] = "Q"; static char __pyx_k_S[] = "S"; static char __pyx_k_U[] = "U"; static char __pyx_k_a[] = "a"; static char __pyx_k_b[] = "b"; static char __pyx_k_c[] = "c"; static char __pyx_k_d[] = "%d"; static char __pyx_k_f[] = "f"; static char __pyx_k_g[] = "g"; static char __pyx_k_h[] = "h"; static char __pyx_k_i[] = "i"; static char __pyx_k_k[] = "k"; static char __pyx_k_l[] = "l"; static char __pyx_k_n[] = "n"; static char __pyx_k_q[] = "q"; static char __pyx_k_u[] = "u"; static char __pyx_k_x[] = "x"; static char __pyx_k_NA[] = "NA"; static char __pyx_k_O8[] = "|O8"; static char __pyx_k_Zd[] = "Zd"; static char __pyx_k_Zf[] = "Zf"; static char __pyx_k_Zg[] = "Zg"; static char __pyx_k__3[] = "\""; static char __pyx_k__4[] = "."; static char __pyx_k_b1[] = "|b1"; static char __pyx_k_dt[] = "dt"; static char __pyx_k_f8[] = "f8"; static char __pyx_k_i8[] = "i8"; static char __pyx_k_io[] = "io"; static char __pyx_k_mn[] = "mn"; static char __pyx_k_mx[] = "mx"; static char __pyx_k_np[] = "np"; static char __pyx_k_os[] = "os"; static char __pyx_k_rb[] = "rb"; static char __pyx_k_NaN[] = "NaN"; static char __pyx_k_S_d[] = "|S%d"; static char __pyx_k__17[] = ""; static char __pyx_k__36[] = " "; static char __pyx_k__46[] = "*"; static char __pyx_k_arr[] = "arr"; static char __pyx_k_buf[] = "buf"; static char __pyx_k_bz2[] = "bz2"; static char __pyx_k_d_2[] = "d"; static char __pyx_k_doc[] = "__doc__"; static char __pyx_k_end[] = "end"; static char __pyx_k_get[] = "get"; static char __pyx_k_inf[] = "inf"; static char __pyx_k_lib[] = "lib"; static char __pyx_k_lst[] = "lst"; static char __pyx_k_max[] = "max"; static char __pyx_k_min[] = "min"; static char __pyx_k_nan[] = "nan"; static char __pyx_k_obj[] = "obj"; static char __pyx_k_ord[] = "ord"; static char __pyx_k_pop[] = "pop"; static char __pyx_k_s_d[] = "%s.%d"; static char __pyx_k_str[] = "str"; static char __pyx_k_sys[] = "sys"; static char __pyx_k_val[] = "val"; static char __pyx_k_NA_2[] = "#NA"; static char __pyx_k_NULL[] = "NULL"; static char __pyx_k_TRUE[] = "TRUE"; static char __pyx_k_True[] = "True"; static char __pyx_k_arrs[] = "arrs"; static char __pyx_k_bool[] = "bool_"; static char __pyx_k_f8_2[] = " 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_delimiter); if (value) { values[1] = value; kw_args--; } } case 2: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_header); if (value) { values[2] = value; kw_args--; } } case 3: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_header_start); if (value) { values[3] = value; kw_args--; } } case 4: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_header_end); if (value) { values[4] = value; kw_args--; } } case 5: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_index_col); if (value) { values[5] = value; kw_args--; } } case 6: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_names); if (value) { values[6] = value; kw_args--; } } case 7: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_memory_map); if (value) { values[7] = value; kw_args--; } } case 8: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_tokenize_chunksize); if (value) { values[8] = value; kw_args--; } } case 9: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_delim_whitespace); if (value) { values[9] = value; kw_args--; } } case 10: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_compression); if (value) { values[10] = value; kw_args--; } } case 11: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_converters); if (value) { values[11] = value; kw_args--; } } case 12: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_as_recarray); if (value) { values[12] = value; kw_args--; } } case 13: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_skipinitialspace); if (value) { values[13] = value; kw_args--; } } case 14: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_escapechar); if (value) { values[14] = value; kw_args--; } } case 15: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_doublequote); if (value) { values[15] = value; kw_args--; } } case 16: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_quotechar); if (value) { values[16] = value; kw_args--; } } case 17: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_quoting); if (value) { values[17] = value; kw_args--; } } case 18: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_lineterminator); if (value) { values[18] = value; kw_args--; } } case 19: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_encoding); if (value) { values[19] = value; kw_args--; } } case 20: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_comment); if (value) { values[20] = value; kw_args--; } } case 21: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_decimal); if (value) { values[21] = value; kw_args--; } } case 22: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_thousands); if (value) { values[22] = value; kw_args--; } } case 23: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_dtype); if (value) { values[23] = value; kw_args--; } } case 24: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_usecols); if (value) { values[24] = value; kw_args--; } } case 25: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_error_bad_lines); if (value) { values[25] = value; kw_args--; } } case 26: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_warn_bad_lines); if (value) { values[26] = value; kw_args--; } } case 27: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_na_filter); if (value) { values[27] = value; kw_args--; } } case 28: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_na_values); if (value) { values[28] = value; kw_args--; } } case 29: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_na_fvalues); if (value) { values[29] = value; kw_args--; } } case 30: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_true_values); if (value) { values[30] = value; kw_args--; } } case 31: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_false_values); if (value) { values[31] = value; kw_args--; } } case 32: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_compact_ints); if (value) { values[32] = value; kw_args--; } } case 33: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_allow_leading_cols); if (value) { values[33] = value; kw_args--; } } case 34: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_use_unsigned); if (value) { values[34] = value; kw_args--; } } case 35: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_low_memory); if (value) { values[35] = value; kw_args--; } } case 36: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_buffer_lines); if (value) { values[36] = value; kw_args--; } } case 37: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_skiprows); if (value) { values[37] = value; kw_args--; } } case 38: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_skip_footer); if (value) { values[38] = value; kw_args--; } } case 39: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_verbose); if (value) { values[39] = value; kw_args--; } } case 40: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_mangle_dupe_cols); if (value) { values[40] = value; kw_args--; } } case 41: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_tupleize_cols); if (value) { values[41] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 264; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 42: values[41] = PyTuple_GET_ITEM(__pyx_args, 41); case 41: values[40] = PyTuple_GET_ITEM(__pyx_args, 40); case 40: values[39] = PyTuple_GET_ITEM(__pyx_args, 39); case 39: values[38] = PyTuple_GET_ITEM(__pyx_args, 38); case 38: values[37] = PyTuple_GET_ITEM(__pyx_args, 37); case 37: values[36] = PyTuple_GET_ITEM(__pyx_args, 36); case 36: values[35] = PyTuple_GET_ITEM(__pyx_args, 35); case 35: values[34] = PyTuple_GET_ITEM(__pyx_args, 34); case 34: values[33] = PyTuple_GET_ITEM(__pyx_args, 33); case 33: values[32] = PyTuple_GET_ITEM(__pyx_args, 32); case 32: values[31] = PyTuple_GET_ITEM(__pyx_args, 31); case 31: values[30] = PyTuple_GET_ITEM(__pyx_args, 30); case 30: values[29] = PyTuple_GET_ITEM(__pyx_args, 29); case 29: values[28] = PyTuple_GET_ITEM(__pyx_args, 28); case 28: values[27] = PyTuple_GET_ITEM(__pyx_args, 27); case 27: values[26] = PyTuple_GET_ITEM(__pyx_args, 26); case 26: values[25] = PyTuple_GET_ITEM(__pyx_args, 25); case 25: values[24] = PyTuple_GET_ITEM(__pyx_args, 24); case 24: values[23] = PyTuple_GET_ITEM(__pyx_args, 23); case 23: values[22] = PyTuple_GET_ITEM(__pyx_args, 22); case 22: values[21] = PyTuple_GET_ITEM(__pyx_args, 21); case 21: values[20] = PyTuple_GET_ITEM(__pyx_args, 20); case 20: values[19] = PyTuple_GET_ITEM(__pyx_args, 19); case 19: values[18] = PyTuple_GET_ITEM(__pyx_args, 18); case 18: values[17] = PyTuple_GET_ITEM(__pyx_args, 17); case 17: values[16] = PyTuple_GET_ITEM(__pyx_args, 16); case 16: values[15] = PyTuple_GET_ITEM(__pyx_args, 15); case 15: values[14] = PyTuple_GET_ITEM(__pyx_args, 14); case 14: values[13] = PyTuple_GET_ITEM(__pyx_args, 13); case 13: values[12] = PyTuple_GET_ITEM(__pyx_args, 12); case 12: values[11] = PyTuple_GET_ITEM(__pyx_args, 11); case 11: values[10] = PyTuple_GET_ITEM(__pyx_args, 10); case 10: values[9] = PyTuple_GET_ITEM(__pyx_args, 9); case 9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8); case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7); case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6); case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5); case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_source = values[0]; __pyx_v_delimiter = values[1]; __pyx_v_header = values[2]; __pyx_v_header_start = values[3]; __pyx_v_header_end = values[4]; __pyx_v_index_col = values[5]; __pyx_v_names = values[6]; __pyx_v_memory_map = values[7]; __pyx_v_tokenize_chunksize = values[8]; __pyx_v_delim_whitespace = values[9]; __pyx_v_compression = values[10]; __pyx_v_converters = values[11]; __pyx_v_as_recarray = values[12]; __pyx_v_skipinitialspace = values[13]; __pyx_v_escapechar = values[14]; __pyx_v_doublequote = values[15]; __pyx_v_quotechar = values[16]; __pyx_v_quoting = values[17]; __pyx_v_lineterminator = values[18]; __pyx_v_encoding = values[19]; __pyx_v_comment = values[20]; __pyx_v_decimal = values[21]; __pyx_v_thousands = values[22]; __pyx_v_dtype = values[23]; __pyx_v_usecols = values[24]; __pyx_v_error_bad_lines = values[25]; __pyx_v_warn_bad_lines = values[26]; __pyx_v_na_filter = values[27]; __pyx_v_na_values = values[28]; __pyx_v_na_fvalues = values[29]; __pyx_v_true_values = values[30]; __pyx_v_false_values = values[31]; __pyx_v_compact_ints = values[32]; __pyx_v_allow_leading_cols = values[33]; __pyx_v_use_unsigned = values[34]; __pyx_v_low_memory = values[35]; __pyx_v_buffer_lines = values[36]; __pyx_v_skiprows = values[37]; __pyx_v_skip_footer = values[38]; __pyx_v_verbose = values[39]; __pyx_v_mangle_dupe_cols = values[40]; __pyx_v_tupleize_cols = values[41]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 1, 42, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 264; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.parser.TextReader.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return -1; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pandas_6parser_10TextReader___cinit__(((struct __pyx_obj_6pandas_6parser_TextReader *)__pyx_v_self), __pyx_v_source, __pyx_v_delimiter, __pyx_v_header, __pyx_v_header_start, __pyx_v_header_end, __pyx_v_index_col, __pyx_v_names, __pyx_v_memory_map, __pyx_v_tokenize_chunksize, __pyx_v_delim_whitespace, __pyx_v_compression, __pyx_v_converters, __pyx_v_as_recarray, __pyx_v_skipinitialspace, __pyx_v_escapechar, __pyx_v_doublequote, __pyx_v_quotechar, __pyx_v_quoting, __pyx_v_lineterminator, __pyx_v_encoding, __pyx_v_comment, __pyx_v_decimal, __pyx_v_thousands, __pyx_v_dtype, __pyx_v_usecols, __pyx_v_error_bad_lines, __pyx_v_warn_bad_lines, __pyx_v_na_filter, __pyx_v_na_values, __pyx_v_na_fvalues, __pyx_v_true_values, __pyx_v_false_values, __pyx_v_compact_ints, __pyx_v_allow_leading_cols, __pyx_v_use_unsigned, __pyx_v_low_memory, __pyx_v_buffer_lines, __pyx_v_skiprows, __pyx_v_skip_footer, __pyx_v_verbose, __pyx_v_mangle_dupe_cols, __pyx_v_tupleize_cols); /* "pandas/parser.pyx":264 * set noconvert, usecols * * def __cinit__(self, source, # <<<<<<<<<<<<<< * delimiter=b',', * */ /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pandas_6parser_10TextReader___cinit__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self, PyObject *__pyx_v_source, PyObject *__pyx_v_delimiter, PyObject *__pyx_v_header, CYTHON_UNUSED PyObject *__pyx_v_header_start, CYTHON_UNUSED PyObject *__pyx_v_header_end, PyObject *__pyx_v_index_col, PyObject *__pyx_v_names, PyObject *__pyx_v_memory_map, PyObject *__pyx_v_tokenize_chunksize, PyObject *__pyx_v_delim_whitespace, PyObject *__pyx_v_compression, PyObject *__pyx_v_converters, PyObject *__pyx_v_as_recarray, PyObject *__pyx_v_skipinitialspace, PyObject *__pyx_v_escapechar, PyObject *__pyx_v_doublequote, PyObject *__pyx_v_quotechar, PyObject *__pyx_v_quoting, PyObject *__pyx_v_lineterminator, PyObject *__pyx_v_encoding, PyObject *__pyx_v_comment, PyObject *__pyx_v_decimal, PyObject *__pyx_v_thousands, PyObject *__pyx_v_dtype, PyObject *__pyx_v_usecols, PyObject *__pyx_v_error_bad_lines, PyObject *__pyx_v_warn_bad_lines, PyObject *__pyx_v_na_filter, PyObject *__pyx_v_na_values, PyObject *__pyx_v_na_fvalues, PyObject *__pyx_v_true_values, PyObject *__pyx_v_false_values, PyObject *__pyx_v_compact_ints, PyObject *__pyx_v_allow_leading_cols, PyObject *__pyx_v_use_unsigned, PyObject *__pyx_v_low_memory, CYTHON_UNUSED PyObject *__pyx_v_buffer_lines, PyObject *__pyx_v_skiprows, PyObject *__pyx_v_skip_footer, PyObject *__pyx_v_verbose, PyObject *__pyx_v_mangle_dupe_cols, PyObject *__pyx_v_tupleize_cols) { PyObject *__pyx_v_conv = NULL; PyObject *__pyx_v_k = NULL; PyObject *__pyx_v_v = NULL; long __pyx_v_heuristic; int __pyx_r; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; int __pyx_t_3; Py_ssize_t __pyx_t_4; PyObject *__pyx_t_5 = NULL; char __pyx_t_6; int __pyx_t_7; PyObject *__pyx_t_8 = NULL; char *__pyx_t_9; PyObject *(*__pyx_t_10)(PyObject *); PyObject *__pyx_t_11 = NULL; int __pyx_t_12; PyObject *(*__pyx_t_13)(PyObject *); int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__cinit__", 0); __Pyx_INCREF(__pyx_v_header); __Pyx_INCREF(__pyx_v_encoding); __Pyx_INCREF(__pyx_v_dtype); __Pyx_INCREF(__pyx_v_na_fvalues); /* "pandas/parser.pyx":318 * tupleize_cols=False): * * self.parser = parser_new() # <<<<<<<<<<<<<< * self.parser.chunksize = tokenize_chunksize * */ __pyx_v_self->parser = parser_new(); /* "pandas/parser.pyx":319 * * self.parser = parser_new() * self.parser.chunksize = tokenize_chunksize # <<<<<<<<<<<<<< * * self.mangle_dupe_cols=mangle_dupe_cols */ __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_tokenize_chunksize); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 319; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_self->parser->chunksize = __pyx_t_1; /* "pandas/parser.pyx":321 * self.parser.chunksize = tokenize_chunksize * * self.mangle_dupe_cols=mangle_dupe_cols # <<<<<<<<<<<<<< * self.tupleize_cols=tupleize_cols * */ __Pyx_INCREF(__pyx_v_mangle_dupe_cols); __Pyx_GIVEREF(__pyx_v_mangle_dupe_cols); __Pyx_GOTREF(__pyx_v_self->mangle_dupe_cols); __Pyx_DECREF(__pyx_v_self->mangle_dupe_cols); __pyx_v_self->mangle_dupe_cols = __pyx_v_mangle_dupe_cols; /* "pandas/parser.pyx":322 * * self.mangle_dupe_cols=mangle_dupe_cols * self.tupleize_cols=tupleize_cols # <<<<<<<<<<<<<< * * # For timekeeping */ __Pyx_INCREF(__pyx_v_tupleize_cols); __Pyx_GIVEREF(__pyx_v_tupleize_cols); __Pyx_GOTREF(__pyx_v_self->tupleize_cols); __Pyx_DECREF(__pyx_v_self->tupleize_cols); __pyx_v_self->tupleize_cols = __pyx_v_tupleize_cols; /* "pandas/parser.pyx":325 * * # For timekeeping * self.clocks = [] # <<<<<<<<<<<<<< * * self.compression = compression */ __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 325; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __Pyx_GOTREF(__pyx_v_self->clocks); __Pyx_DECREF(__pyx_v_self->clocks); __pyx_v_self->clocks = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; /* "pandas/parser.pyx":327 * self.clocks = [] * * self.compression = compression # <<<<<<<<<<<<<< * self.memory_map = memory_map * */ __Pyx_INCREF(__pyx_v_compression); __Pyx_GIVEREF(__pyx_v_compression); __Pyx_GOTREF(__pyx_v_self->compression); __Pyx_DECREF(__pyx_v_self->compression); __pyx_v_self->compression = __pyx_v_compression; /* "pandas/parser.pyx":328 * * self.compression = compression * self.memory_map = memory_map # <<<<<<<<<<<<<< * * self._setup_parser_source(source) */ __Pyx_INCREF(__pyx_v_memory_map); __Pyx_GIVEREF(__pyx_v_memory_map); __Pyx_GOTREF(__pyx_v_self->memory_map); __Pyx_DECREF(__pyx_v_self->memory_map); __pyx_v_self->memory_map = __pyx_v_memory_map; /* "pandas/parser.pyx":330 * self.memory_map = memory_map * * self._setup_parser_source(source) # <<<<<<<<<<<<<< * parser_set_default_options(self.parser) * */ __pyx_t_2 = ((struct __pyx_vtabstruct_6pandas_6parser_TextReader *)__pyx_v_self->__pyx_vtab)->_setup_parser_source(__pyx_v_self, __pyx_v_source); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 330; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/parser.pyx":331 * * self._setup_parser_source(source) * parser_set_default_options(self.parser) # <<<<<<<<<<<<<< * * parser_init(self.parser) */ parser_set_default_options(__pyx_v_self->parser); /* "pandas/parser.pyx":333 * parser_set_default_options(self.parser) * * parser_init(self.parser) # <<<<<<<<<<<<<< * * if delim_whitespace: */ parser_init(__pyx_v_self->parser); /* "pandas/parser.pyx":335 * parser_init(self.parser) * * if delim_whitespace: # <<<<<<<<<<<<<< * self.parser.delim_whitespace = delim_whitespace * else: */ __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_delim_whitespace); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 335; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__pyx_t_3) { /* "pandas/parser.pyx":336 * * if delim_whitespace: * self.parser.delim_whitespace = delim_whitespace # <<<<<<<<<<<<<< * else: * if len(delimiter) > 1: */ __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_delim_whitespace); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 336; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_self->parser->delim_whitespace = __pyx_t_1; goto __pyx_L3; } /*else*/ { /* "pandas/parser.pyx":338 * self.parser.delim_whitespace = delim_whitespace * else: * if len(delimiter) > 1: # <<<<<<<<<<<<<< * raise ValueError('only length-1 separators excluded right now') * self.parser.delimiter = ord(delimiter) */ __pyx_t_4 = PyObject_Length(__pyx_v_delimiter); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 338; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_3 = ((__pyx_t_4 > 1) != 0); if (__pyx_t_3) { /* "pandas/parser.pyx":339 * else: * if len(delimiter) > 1: * raise ValueError('only length-1 separators excluded right now') # <<<<<<<<<<<<<< * self.parser.delimiter = ord(delimiter) * */ __pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__5, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 339; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 339; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } /* "pandas/parser.pyx":340 * if len(delimiter) > 1: * raise ValueError('only length-1 separators excluded right now') * self.parser.delimiter = ord(delimiter) # <<<<<<<<<<<<<< * * #---------------------------------------- */ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 340; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_delimiter); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_delimiter); __Pyx_GIVEREF(__pyx_v_delimiter); __pyx_t_5 = PyObject_Call(__pyx_builtin_ord, __pyx_t_2, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 340; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_6 = __Pyx_PyInt_As_char(__pyx_t_5); if (unlikely((__pyx_t_6 == (char)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 340; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_v_self->parser->delimiter = __pyx_t_6; } __pyx_L3:; /* "pandas/parser.pyx":345 * # parser options * * self.parser.doublequote = doublequote # <<<<<<<<<<<<<< * self.parser.skipinitialspace = skipinitialspace * */ __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_doublequote); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 345; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_self->parser->doublequote = __pyx_t_1; /* "pandas/parser.pyx":346 * * self.parser.doublequote = doublequote * self.parser.skipinitialspace = skipinitialspace # <<<<<<<<<<<<<< * * if lineterminator is not None: */ __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_skipinitialspace); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 346; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_self->parser->skipinitialspace = __pyx_t_1; /* "pandas/parser.pyx":348 * self.parser.skipinitialspace = skipinitialspace * * if lineterminator is not None: # <<<<<<<<<<<<<< * if len(lineterminator) != 1: * raise ValueError('Only length-1 line terminators supported') */ __pyx_t_3 = (__pyx_v_lineterminator != Py_None); __pyx_t_7 = (__pyx_t_3 != 0); if (__pyx_t_7) { /* "pandas/parser.pyx":349 * * if lineterminator is not None: * if len(lineterminator) != 1: # <<<<<<<<<<<<<< * raise ValueError('Only length-1 line terminators supported') * self.parser.lineterminator = ord(lineterminator) */ __pyx_t_4 = PyObject_Length(__pyx_v_lineterminator); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 349; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_7 = ((__pyx_t_4 != 1) != 0); if (__pyx_t_7) { /* "pandas/parser.pyx":350 * if lineterminator is not None: * if len(lineterminator) != 1: * raise ValueError('Only length-1 line terminators supported') # <<<<<<<<<<<<<< * self.parser.lineterminator = ord(lineterminator) * */ __pyx_t_5 = PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__6, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 350; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_Raise(__pyx_t_5, 0, 0, 0); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 350; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } /* "pandas/parser.pyx":351 * if len(lineterminator) != 1: * raise ValueError('Only length-1 line terminators supported') * self.parser.lineterminator = ord(lineterminator) # <<<<<<<<<<<<<< * * if len(decimal) != 1: */ __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 351; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_v_lineterminator); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_lineterminator); __Pyx_GIVEREF(__pyx_v_lineterminator); __pyx_t_2 = PyObject_Call(__pyx_builtin_ord, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 351; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_6 = __Pyx_PyInt_As_char(__pyx_t_2); if (unlikely((__pyx_t_6 == (char)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 351; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_self->parser->lineterminator = __pyx_t_6; goto __pyx_L5; } __pyx_L5:; /* "pandas/parser.pyx":353 * self.parser.lineterminator = ord(lineterminator) * * if len(decimal) != 1: # <<<<<<<<<<<<<< * raise ValueError('Only length-1 decimal markers supported') * self.parser.decimal = ord(decimal) */ __pyx_t_4 = PyObject_Length(__pyx_v_decimal); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 353; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_7 = ((__pyx_t_4 != 1) != 0); if (__pyx_t_7) { /* "pandas/parser.pyx":354 * * if len(decimal) != 1: * raise ValueError('Only length-1 decimal markers supported') # <<<<<<<<<<<<<< * self.parser.decimal = ord(decimal) * */ __pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__7, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 354; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 354; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } /* "pandas/parser.pyx":355 * if len(decimal) != 1: * raise ValueError('Only length-1 decimal markers supported') * self.parser.decimal = ord(decimal) # <<<<<<<<<<<<<< * * if thousands is not None: */ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 355; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_decimal); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_decimal); __Pyx_GIVEREF(__pyx_v_decimal); __pyx_t_5 = PyObject_Call(__pyx_builtin_ord, __pyx_t_2, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 355; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_6 = __Pyx_PyInt_As_char(__pyx_t_5); if (unlikely((__pyx_t_6 == (char)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 355; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_v_self->parser->decimal = __pyx_t_6; /* "pandas/parser.pyx":357 * self.parser.decimal = ord(decimal) * * if thousands is not None: # <<<<<<<<<<<<<< * if len(thousands) != 1: * raise ValueError('Only length-1 thousands markers supported') */ __pyx_t_7 = (__pyx_v_thousands != Py_None); __pyx_t_3 = (__pyx_t_7 != 0); if (__pyx_t_3) { /* "pandas/parser.pyx":358 * * if thousands is not None: * if len(thousands) != 1: # <<<<<<<<<<<<<< * raise ValueError('Only length-1 thousands markers supported') * self.parser.thousands = ord(thousands) */ __pyx_t_4 = PyObject_Length(__pyx_v_thousands); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 358; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_3 = ((__pyx_t_4 != 1) != 0); if (__pyx_t_3) { /* "pandas/parser.pyx":359 * if thousands is not None: * if len(thousands) != 1: * raise ValueError('Only length-1 thousands markers supported') # <<<<<<<<<<<<<< * self.parser.thousands = ord(thousands) * */ __pyx_t_5 = PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__8, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 359; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_Raise(__pyx_t_5, 0, 0, 0); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 359; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } /* "pandas/parser.pyx":360 * if len(thousands) != 1: * raise ValueError('Only length-1 thousands markers supported') * self.parser.thousands = ord(thousands) # <<<<<<<<<<<<<< * * if escapechar is not None: */ __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 360; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_v_thousands); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_thousands); __Pyx_GIVEREF(__pyx_v_thousands); __pyx_t_2 = PyObject_Call(__pyx_builtin_ord, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 360; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_6 = __Pyx_PyInt_As_char(__pyx_t_2); if (unlikely((__pyx_t_6 == (char)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 360; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_self->parser->thousands = __pyx_t_6; goto __pyx_L8; } __pyx_L8:; /* "pandas/parser.pyx":362 * self.parser.thousands = ord(thousands) * * if escapechar is not None: # <<<<<<<<<<<<<< * if len(escapechar) != 1: * raise ValueError('Only length-1 escapes supported') */ __pyx_t_3 = (__pyx_v_escapechar != Py_None); __pyx_t_7 = (__pyx_t_3 != 0); if (__pyx_t_7) { /* "pandas/parser.pyx":363 * * if escapechar is not None: * if len(escapechar) != 1: # <<<<<<<<<<<<<< * raise ValueError('Only length-1 escapes supported') * self.parser.escapechar = ord(escapechar) */ __pyx_t_4 = PyObject_Length(__pyx_v_escapechar); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 363; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_7 = ((__pyx_t_4 != 1) != 0); if (__pyx_t_7) { /* "pandas/parser.pyx":364 * if escapechar is not None: * if len(escapechar) != 1: * raise ValueError('Only length-1 escapes supported') # <<<<<<<<<<<<<< * self.parser.escapechar = ord(escapechar) * */ __pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__9, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 364; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 364; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } /* "pandas/parser.pyx":365 * if len(escapechar) != 1: * raise ValueError('Only length-1 escapes supported') * self.parser.escapechar = ord(escapechar) # <<<<<<<<<<<<<< * * self.parser.quotechar = ord(quotechar) */ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 365; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_escapechar); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_escapechar); __Pyx_GIVEREF(__pyx_v_escapechar); __pyx_t_5 = PyObject_Call(__pyx_builtin_ord, __pyx_t_2, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 365; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_6 = __Pyx_PyInt_As_char(__pyx_t_5); if (unlikely((__pyx_t_6 == (char)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 365; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_v_self->parser->escapechar = __pyx_t_6; goto __pyx_L10; } __pyx_L10:; /* "pandas/parser.pyx":367 * self.parser.escapechar = ord(escapechar) * * self.parser.quotechar = ord(quotechar) # <<<<<<<<<<<<<< * self.parser.quoting = quoting * */ __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 367; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_v_quotechar); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_quotechar); __Pyx_GIVEREF(__pyx_v_quotechar); __pyx_t_2 = PyObject_Call(__pyx_builtin_ord, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 367; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_6 = __Pyx_PyInt_As_char(__pyx_t_2); if (unlikely((__pyx_t_6 == (char)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 367; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_self->parser->quotechar = __pyx_t_6; /* "pandas/parser.pyx":368 * * self.parser.quotechar = ord(quotechar) * self.parser.quoting = quoting # <<<<<<<<<<<<<< * * if comment is not None: */ __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_quoting); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 368; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_self->parser->quoting = __pyx_t_1; /* "pandas/parser.pyx":370 * self.parser.quoting = quoting * * if comment is not None: # <<<<<<<<<<<<<< * if len(comment) > 1: * raise ValueError('Only length-1 comment characters supported') */ __pyx_t_7 = (__pyx_v_comment != Py_None); __pyx_t_3 = (__pyx_t_7 != 0); if (__pyx_t_3) { /* "pandas/parser.pyx":371 * * if comment is not None: * if len(comment) > 1: # <<<<<<<<<<<<<< * raise ValueError('Only length-1 comment characters supported') * self.parser.commentchar = ord(comment) */ __pyx_t_4 = PyObject_Length(__pyx_v_comment); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 371; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_3 = ((__pyx_t_4 > 1) != 0); if (__pyx_t_3) { /* "pandas/parser.pyx":372 * if comment is not None: * if len(comment) > 1: * raise ValueError('Only length-1 comment characters supported') # <<<<<<<<<<<<<< * self.parser.commentchar = ord(comment) * */ __pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__10, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 372; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 372; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } /* "pandas/parser.pyx":373 * if len(comment) > 1: * raise ValueError('Only length-1 comment characters supported') * self.parser.commentchar = ord(comment) # <<<<<<<<<<<<<< * * # error handling of bad lines */ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 373; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_comment); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_comment); __Pyx_GIVEREF(__pyx_v_comment); __pyx_t_5 = PyObject_Call(__pyx_builtin_ord, __pyx_t_2, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 373; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_6 = __Pyx_PyInt_As_char(__pyx_t_5); if (unlikely((__pyx_t_6 == (char)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 373; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_v_self->parser->commentchar = __pyx_t_6; goto __pyx_L12; } __pyx_L12:; /* "pandas/parser.pyx":376 * * # error handling of bad lines * self.parser.error_bad_lines = int(error_bad_lines) # <<<<<<<<<<<<<< * self.parser.warn_bad_lines = int(warn_bad_lines) * */ __pyx_t_5 = PyNumber_Int(__pyx_v_error_bad_lines); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 376; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_t_5); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 376; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_v_self->parser->error_bad_lines = __pyx_t_1; /* "pandas/parser.pyx":377 * # error handling of bad lines * self.parser.error_bad_lines = int(error_bad_lines) * self.parser.warn_bad_lines = int(warn_bad_lines) # <<<<<<<<<<<<<< * * self.skiprows = skiprows */ __pyx_t_5 = PyNumber_Int(__pyx_v_warn_bad_lines); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 377; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_t_5); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 377; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_v_self->parser->warn_bad_lines = __pyx_t_1; /* "pandas/parser.pyx":379 * self.parser.warn_bad_lines = int(warn_bad_lines) * * self.skiprows = skiprows # <<<<<<<<<<<<<< * if skiprows is not None: * self._make_skiprow_set() */ __Pyx_INCREF(__pyx_v_skiprows); __Pyx_GIVEREF(__pyx_v_skiprows); __Pyx_GOTREF(__pyx_v_self->skiprows); __Pyx_DECREF(__pyx_v_self->skiprows); __pyx_v_self->skiprows = __pyx_v_skiprows; /* "pandas/parser.pyx":380 * * self.skiprows = skiprows * if skiprows is not None: # <<<<<<<<<<<<<< * self._make_skiprow_set() * */ __pyx_t_3 = (__pyx_v_skiprows != Py_None); __pyx_t_7 = (__pyx_t_3 != 0); if (__pyx_t_7) { /* "pandas/parser.pyx":381 * self.skiprows = skiprows * if skiprows is not None: * self._make_skiprow_set() # <<<<<<<<<<<<<< * * self.skip_footer = skip_footer */ __pyx_t_5 = ((struct __pyx_vtabstruct_6pandas_6parser_TextReader *)__pyx_v_self->__pyx_vtab)->_make_skiprow_set(__pyx_v_self); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 381; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; goto __pyx_L14; } __pyx_L14:; /* "pandas/parser.pyx":383 * self._make_skiprow_set() * * self.skip_footer = skip_footer # <<<<<<<<<<<<<< * * # suboptimal */ __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_skip_footer); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 383; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_self->skip_footer = __pyx_t_1; /* "pandas/parser.pyx":386 * * # suboptimal * if usecols is not None: # <<<<<<<<<<<<<< * self.has_usecols = 1 * self.usecols = set(usecols) */ __pyx_t_7 = (__pyx_v_usecols != Py_None); __pyx_t_3 = (__pyx_t_7 != 0); if (__pyx_t_3) { /* "pandas/parser.pyx":387 * # suboptimal * if usecols is not None: * self.has_usecols = 1 # <<<<<<<<<<<<<< * self.usecols = set(usecols) * */ __pyx_v_self->has_usecols = 1; /* "pandas/parser.pyx":388 * if usecols is not None: * self.has_usecols = 1 * self.usecols = set(usecols) # <<<<<<<<<<<<<< * * # XXX */ __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 388; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_v_usecols); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_usecols); __Pyx_GIVEREF(__pyx_v_usecols); __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)(&PySet_Type))), __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 388; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GIVEREF(__pyx_t_2); __Pyx_GOTREF(__pyx_v_self->usecols); __Pyx_DECREF(__pyx_v_self->usecols); __pyx_v_self->usecols = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; goto __pyx_L15; } __pyx_L15:; /* "pandas/parser.pyx":391 * * # XXX * if skip_footer > 0: # <<<<<<<<<<<<<< * self.parser.error_bad_lines = 0 * self.parser.warn_bad_lines = 0 */ __pyx_t_2 = PyObject_RichCompare(__pyx_v_skip_footer, __pyx_int_0, Py_GT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 391; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 391; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_3) { /* "pandas/parser.pyx":392 * # XXX * if skip_footer > 0: * self.parser.error_bad_lines = 0 # <<<<<<<<<<<<<< * self.parser.warn_bad_lines = 0 * */ __pyx_v_self->parser->error_bad_lines = 0; /* "pandas/parser.pyx":393 * if skip_footer > 0: * self.parser.error_bad_lines = 0 * self.parser.warn_bad_lines = 0 # <<<<<<<<<<<<<< * * self.delimiter = delimiter */ __pyx_v_self->parser->warn_bad_lines = 0; goto __pyx_L16; } __pyx_L16:; /* "pandas/parser.pyx":395 * self.parser.warn_bad_lines = 0 * * self.delimiter = delimiter # <<<<<<<<<<<<<< * self.delim_whitespace = delim_whitespace * */ __Pyx_INCREF(__pyx_v_delimiter); __Pyx_GIVEREF(__pyx_v_delimiter); __Pyx_GOTREF(__pyx_v_self->delimiter); __Pyx_DECREF(__pyx_v_self->delimiter); __pyx_v_self->delimiter = __pyx_v_delimiter; /* "pandas/parser.pyx":396 * * self.delimiter = delimiter * self.delim_whitespace = delim_whitespace # <<<<<<<<<<<<<< * * self.na_values = na_values */ __Pyx_INCREF(__pyx_v_delim_whitespace); __Pyx_GIVEREF(__pyx_v_delim_whitespace); __Pyx_GOTREF(__pyx_v_self->delim_whitespace); __Pyx_DECREF(__pyx_v_self->delim_whitespace); __pyx_v_self->delim_whitespace = __pyx_v_delim_whitespace; /* "pandas/parser.pyx":398 * self.delim_whitespace = delim_whitespace * * self.na_values = na_values # <<<<<<<<<<<<<< * if na_fvalues is None: * na_fvalues = set() */ __Pyx_INCREF(__pyx_v_na_values); __Pyx_GIVEREF(__pyx_v_na_values); __Pyx_GOTREF(__pyx_v_self->na_values); __Pyx_DECREF(__pyx_v_self->na_values); __pyx_v_self->na_values = __pyx_v_na_values; /* "pandas/parser.pyx":399 * * self.na_values = na_values * if na_fvalues is None: # <<<<<<<<<<<<<< * na_fvalues = set() * self.na_fvalues = na_fvalues */ __pyx_t_3 = (__pyx_v_na_fvalues == Py_None); __pyx_t_7 = (__pyx_t_3 != 0); if (__pyx_t_7) { /* "pandas/parser.pyx":400 * self.na_values = na_values * if na_fvalues is None: * na_fvalues = set() # <<<<<<<<<<<<<< * self.na_fvalues = na_fvalues * */ __pyx_t_2 = PySet_New(0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 400; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF_SET(__pyx_v_na_fvalues, __pyx_t_2); __pyx_t_2 = 0; goto __pyx_L17; } __pyx_L17:; /* "pandas/parser.pyx":401 * if na_fvalues is None: * na_fvalues = set() * self.na_fvalues = na_fvalues # <<<<<<<<<<<<<< * * self.true_values = _maybe_encode(true_values) */ __Pyx_INCREF(__pyx_v_na_fvalues); __Pyx_GIVEREF(__pyx_v_na_fvalues); __Pyx_GOTREF(__pyx_v_self->na_fvalues); __Pyx_DECREF(__pyx_v_self->na_fvalues); __pyx_v_self->na_fvalues = __pyx_v_na_fvalues; /* "pandas/parser.pyx":403 * self.na_fvalues = na_fvalues * * self.true_values = _maybe_encode(true_values) # <<<<<<<<<<<<<< * self.false_values = _maybe_encode(false_values) * */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_maybe_encode); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 403; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 403; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_v_true_values); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_true_values); __Pyx_GIVEREF(__pyx_v_true_values); __pyx_t_8 = PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 403; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GIVEREF(__pyx_t_8); __Pyx_GOTREF(__pyx_v_self->true_values); __Pyx_DECREF(__pyx_v_self->true_values); __pyx_v_self->true_values = __pyx_t_8; __pyx_t_8 = 0; /* "pandas/parser.pyx":404 * * self.true_values = _maybe_encode(true_values) * self.false_values = _maybe_encode(false_values) # <<<<<<<<<<<<<< * * self.converters = converters */ __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_maybe_encode); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 404; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 404; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_v_false_values); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_false_values); __Pyx_GIVEREF(__pyx_v_false_values); __pyx_t_2 = PyObject_Call(__pyx_t_8, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 404; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GIVEREF(__pyx_t_2); __Pyx_GOTREF(__pyx_v_self->false_values); __Pyx_DECREF(__pyx_v_self->false_values); __pyx_v_self->false_values = __pyx_t_2; __pyx_t_2 = 0; /* "pandas/parser.pyx":406 * self.false_values = _maybe_encode(false_values) * * self.converters = converters # <<<<<<<<<<<<<< * * self.na_filter = na_filter */ __Pyx_INCREF(__pyx_v_converters); __Pyx_GIVEREF(__pyx_v_converters); __Pyx_GOTREF(__pyx_v_self->converters); __Pyx_DECREF(__pyx_v_self->converters); __pyx_v_self->converters = __pyx_v_converters; /* "pandas/parser.pyx":408 * self.converters = converters * * self.na_filter = na_filter # <<<<<<<<<<<<<< * self.as_recarray = as_recarray * */ __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_v_na_filter); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 408; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_self->na_filter = __pyx_t_7; /* "pandas/parser.pyx":409 * * self.na_filter = na_filter * self.as_recarray = as_recarray # <<<<<<<<<<<<<< * * self.compact_ints = compact_ints */ __Pyx_INCREF(__pyx_v_as_recarray); __Pyx_GIVEREF(__pyx_v_as_recarray); __Pyx_GOTREF(__pyx_v_self->as_recarray); __Pyx_DECREF(__pyx_v_self->as_recarray); __pyx_v_self->as_recarray = __pyx_v_as_recarray; /* "pandas/parser.pyx":411 * self.as_recarray = as_recarray * * self.compact_ints = compact_ints # <<<<<<<<<<<<<< * self.use_unsigned = use_unsigned * */ __Pyx_INCREF(__pyx_v_compact_ints); __Pyx_GIVEREF(__pyx_v_compact_ints); __Pyx_GOTREF(__pyx_v_self->compact_ints); __Pyx_DECREF(__pyx_v_self->compact_ints); __pyx_v_self->compact_ints = __pyx_v_compact_ints; /* "pandas/parser.pyx":412 * * self.compact_ints = compact_ints * self.use_unsigned = use_unsigned # <<<<<<<<<<<<<< * * self.verbose = verbose */ __Pyx_INCREF(__pyx_v_use_unsigned); __Pyx_GIVEREF(__pyx_v_use_unsigned); __Pyx_GOTREF(__pyx_v_self->use_unsigned); __Pyx_DECREF(__pyx_v_self->use_unsigned); __pyx_v_self->use_unsigned = __pyx_v_use_unsigned; /* "pandas/parser.pyx":414 * self.use_unsigned = use_unsigned * * self.verbose = verbose # <<<<<<<<<<<<<< * self.low_memory = low_memory * */ __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_v_verbose); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 414; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_self->verbose = __pyx_t_7; /* "pandas/parser.pyx":415 * * self.verbose = verbose * self.low_memory = low_memory # <<<<<<<<<<<<<< * * # encoding */ __Pyx_INCREF(__pyx_v_low_memory); __Pyx_GIVEREF(__pyx_v_low_memory); __Pyx_GOTREF(__pyx_v_self->low_memory); __Pyx_DECREF(__pyx_v_self->low_memory); __pyx_v_self->low_memory = __pyx_v_low_memory; /* "pandas/parser.pyx":418 * * # encoding * if encoding is not None: # <<<<<<<<<<<<<< * if not isinstance(encoding, bytes): * encoding = encoding.encode('utf-8') */ __pyx_t_7 = (__pyx_v_encoding != Py_None); __pyx_t_3 = (__pyx_t_7 != 0); if (__pyx_t_3) { /* "pandas/parser.pyx":419 * # encoding * if encoding is not None: * if not isinstance(encoding, bytes): # <<<<<<<<<<<<<< * encoding = encoding.encode('utf-8') * encoding = encoding.lower() */ __pyx_t_3 = PyBytes_Check(__pyx_v_encoding); __pyx_t_7 = ((!(__pyx_t_3 != 0)) != 0); if (__pyx_t_7) { /* "pandas/parser.pyx":420 * if encoding is not None: * if not isinstance(encoding, bytes): * encoding = encoding.encode('utf-8') # <<<<<<<<<<<<<< * encoding = encoding.lower() * self.c_encoding = encoding */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_encoding, __pyx_n_s_encode); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 420; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = PyObject_Call(__pyx_t_2, __pyx_tuple__11, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 420; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF_SET(__pyx_v_encoding, __pyx_t_5); __pyx_t_5 = 0; goto __pyx_L19; } __pyx_L19:; /* "pandas/parser.pyx":421 * if not isinstance(encoding, bytes): * encoding = encoding.encode('utf-8') * encoding = encoding.lower() # <<<<<<<<<<<<<< * self.c_encoding = encoding * else: */ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_encoding, __pyx_n_s_lower); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 421; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_2 = PyObject_Call(__pyx_t_5, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 421; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF_SET(__pyx_v_encoding, __pyx_t_2); __pyx_t_2 = 0; /* "pandas/parser.pyx":422 * encoding = encoding.encode('utf-8') * encoding = encoding.lower() * self.c_encoding = encoding # <<<<<<<<<<<<<< * else: * self.c_encoding = NULL */ __pyx_t_9 = __Pyx_PyObject_AsString(__pyx_v_encoding); if (unlikely((!__pyx_t_9) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 422; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_self->c_encoding = ((char *)__pyx_t_9); goto __pyx_L18; } /*else*/ { /* "pandas/parser.pyx":424 * self.c_encoding = encoding * else: * self.c_encoding = NULL # <<<<<<<<<<<<<< * * self.encoding = encoding */ __pyx_v_self->c_encoding = NULL; } __pyx_L18:; /* "pandas/parser.pyx":426 * self.c_encoding = NULL * * self.encoding = encoding # <<<<<<<<<<<<<< * * if isinstance(dtype, dict): */ __Pyx_INCREF(__pyx_v_encoding); __Pyx_GIVEREF(__pyx_v_encoding); __Pyx_GOTREF(__pyx_v_self->encoding); __Pyx_DECREF(__pyx_v_self->encoding); __pyx_v_self->encoding = __pyx_v_encoding; /* "pandas/parser.pyx":428 * self.encoding = encoding * * if isinstance(dtype, dict): # <<<<<<<<<<<<<< * conv = {} * for k in dtype: */ __pyx_t_7 = PyDict_Check(__pyx_v_dtype); __pyx_t_3 = (__pyx_t_7 != 0); if (__pyx_t_3) { /* "pandas/parser.pyx":429 * * if isinstance(dtype, dict): * conv = {} # <<<<<<<<<<<<<< * for k in dtype: * v = dtype[k] */ __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 429; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_v_conv = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; /* "pandas/parser.pyx":430 * if isinstance(dtype, dict): * conv = {} * for k in dtype: # <<<<<<<<<<<<<< * v = dtype[k] * if isinstance(v, basestring): */ if (PyList_CheckExact(__pyx_v_dtype) || PyTuple_CheckExact(__pyx_v_dtype)) { __pyx_t_2 = __pyx_v_dtype; __Pyx_INCREF(__pyx_t_2); __pyx_t_4 = 0; __pyx_t_10 = NULL; } else { __pyx_t_4 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_dtype); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 430; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_10 = Py_TYPE(__pyx_t_2)->tp_iternext; } for (;;) { if (!__pyx_t_10 && PyList_CheckExact(__pyx_t_2)) { if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_2)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_5 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_5); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 430; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_5 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 430; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif } else if (!__pyx_t_10 && PyTuple_CheckExact(__pyx_t_2)) { if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_2)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_5); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 430; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_5 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 430; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif } else { __pyx_t_5 = __pyx_t_10(__pyx_t_2); if (unlikely(!__pyx_t_5)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 430; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } break; } __Pyx_GOTREF(__pyx_t_5); } __Pyx_XDECREF_SET(__pyx_v_k, __pyx_t_5); __pyx_t_5 = 0; /* "pandas/parser.pyx":431 * conv = {} * for k in dtype: * v = dtype[k] # <<<<<<<<<<<<<< * if isinstance(v, basestring): * v = np.dtype(v) */ __pyx_t_5 = PyObject_GetItem(__pyx_v_dtype, __pyx_v_k); if (unlikely(__pyx_t_5 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 431; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_5); __Pyx_XDECREF_SET(__pyx_v_v, __pyx_t_5); __pyx_t_5 = 0; /* "pandas/parser.pyx":432 * for k in dtype: * v = dtype[k] * if isinstance(v, basestring): # <<<<<<<<<<<<<< * v = np.dtype(v) * conv[k] = v */ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_basestring); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 432; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = PyObject_IsInstance(__pyx_v_v, __pyx_t_5); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 432; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_7 = (__pyx_t_3 != 0); if (__pyx_t_7) { /* "pandas/parser.pyx":433 * v = dtype[k] * if isinstance(v, basestring): * v = np.dtype(v) # <<<<<<<<<<<<<< * conv[k] = v * dtype = conv */ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 433; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_dtype); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 433; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 433; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_v_v); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_v); __Pyx_GIVEREF(__pyx_v_v); __pyx_t_11 = PyObject_Call(__pyx_t_8, __pyx_t_5, NULL); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 433; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF_SET(__pyx_v_v, __pyx_t_11); __pyx_t_11 = 0; goto __pyx_L23; } __pyx_L23:; /* "pandas/parser.pyx":434 * if isinstance(v, basestring): * v = np.dtype(v) * conv[k] = v # <<<<<<<<<<<<<< * dtype = conv * elif dtype is not None: */ if (unlikely(PyDict_SetItem(__pyx_v_conv, __pyx_v_k, __pyx_v_v) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 434; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/parser.pyx":435 * v = np.dtype(v) * conv[k] = v * dtype = conv # <<<<<<<<<<<<<< * elif dtype is not None: * dtype = np.dtype(dtype) */ __Pyx_INCREF(__pyx_v_conv); __Pyx_DECREF_SET(__pyx_v_dtype, __pyx_v_conv); goto __pyx_L20; } /* "pandas/parser.pyx":436 * conv[k] = v * dtype = conv * elif dtype is not None: # <<<<<<<<<<<<<< * dtype = np.dtype(dtype) * */ __pyx_t_7 = (__pyx_v_dtype != Py_None); __pyx_t_3 = (__pyx_t_7 != 0); if (__pyx_t_3) { /* "pandas/parser.pyx":437 * dtype = conv * elif dtype is not None: * dtype = np.dtype(dtype) # <<<<<<<<<<<<<< * * self.dtype = dtype */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 437; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_dtype); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 437; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 437; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_dtype); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_dtype); __Pyx_GIVEREF(__pyx_v_dtype); __pyx_t_5 = PyObject_Call(__pyx_t_11, __pyx_t_2, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 437; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF_SET(__pyx_v_dtype, __pyx_t_5); __pyx_t_5 = 0; goto __pyx_L20; } __pyx_L20:; /* "pandas/parser.pyx":439 * dtype = np.dtype(dtype) * * self.dtype = dtype # <<<<<<<<<<<<<< * * # XXX */ __Pyx_INCREF(__pyx_v_dtype); __Pyx_GIVEREF(__pyx_v_dtype); __Pyx_GOTREF(__pyx_v_self->dtype); __Pyx_DECREF(__pyx_v_self->dtype); __pyx_v_self->dtype = __pyx_v_dtype; /* "pandas/parser.pyx":442 * * # XXX * self.noconvert = set() # <<<<<<<<<<<<<< * * self.index_col = index_col */ __pyx_t_5 = PySet_New(0); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 442; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __Pyx_GOTREF(__pyx_v_self->noconvert); __Pyx_DECREF(__pyx_v_self->noconvert); __pyx_v_self->noconvert = ((PyObject*)__pyx_t_5); __pyx_t_5 = 0; /* "pandas/parser.pyx":444 * self.noconvert = set() * * self.index_col = index_col # <<<<<<<<<<<<<< * * #---------------------------------------- */ __Pyx_INCREF(__pyx_v_index_col); __Pyx_GIVEREF(__pyx_v_index_col); __Pyx_GOTREF(__pyx_v_self->index_col); __Pyx_DECREF(__pyx_v_self->index_col); __pyx_v_self->index_col = __pyx_v_index_col; /* "pandas/parser.pyx":449 * # header stuff * * self.allow_leading_cols = allow_leading_cols # <<<<<<<<<<<<<< * self.leading_cols = 0 * */ __Pyx_INCREF(__pyx_v_allow_leading_cols); __Pyx_GIVEREF(__pyx_v_allow_leading_cols); __Pyx_GOTREF(__pyx_v_self->allow_leading_cols); __Pyx_DECREF(__pyx_v_self->allow_leading_cols); __pyx_v_self->allow_leading_cols = __pyx_v_allow_leading_cols; /* "pandas/parser.pyx":450 * * self.allow_leading_cols = allow_leading_cols * self.leading_cols = 0 # <<<<<<<<<<<<<< * * # TODO: no header vs. header is not the first row */ __pyx_v_self->leading_cols = 0; /* "pandas/parser.pyx":453 * * # TODO: no header vs. header is not the first row * self.has_mi_columns = 0 # <<<<<<<<<<<<<< * self.orig_header = header * if header is None: */ __pyx_v_self->has_mi_columns = 0; /* "pandas/parser.pyx":454 * # TODO: no header vs. header is not the first row * self.has_mi_columns = 0 * self.orig_header = header # <<<<<<<<<<<<<< * if header is None: * # sentinel value */ __Pyx_INCREF(__pyx_v_header); __Pyx_GIVEREF(__pyx_v_header); __Pyx_GOTREF(__pyx_v_self->orig_header); __Pyx_DECREF(__pyx_v_self->orig_header); __pyx_v_self->orig_header = __pyx_v_header; /* "pandas/parser.pyx":455 * self.has_mi_columns = 0 * self.orig_header = header * if header is None: # <<<<<<<<<<<<<< * # sentinel value * self.parser.header_start = -1 */ __pyx_t_3 = (__pyx_v_header == Py_None); __pyx_t_7 = (__pyx_t_3 != 0); if (__pyx_t_7) { /* "pandas/parser.pyx":457 * if header is None: * # sentinel value * self.parser.header_start = -1 # <<<<<<<<<<<<<< * self.parser.header_end = -1 * self.parser.header = -1 */ __pyx_v_self->parser->header_start = -1; /* "pandas/parser.pyx":458 * # sentinel value * self.parser.header_start = -1 * self.parser.header_end = -1 # <<<<<<<<<<<<<< * self.parser.header = -1 * self.parser_start = 0 */ __pyx_v_self->parser->header_end = -1; /* "pandas/parser.pyx":459 * self.parser.header_start = -1 * self.parser.header_end = -1 * self.parser.header = -1 # <<<<<<<<<<<<<< * self.parser_start = 0 * self.header = [] */ __pyx_v_self->parser->header = -1; /* "pandas/parser.pyx":460 * self.parser.header_end = -1 * self.parser.header = -1 * self.parser_start = 0 # <<<<<<<<<<<<<< * self.header = [] * else: */ __pyx_v_self->parser_start = 0; /* "pandas/parser.pyx":461 * self.parser.header = -1 * self.parser_start = 0 * self.header = [] # <<<<<<<<<<<<<< * else: * if isinstance(header, list) and len(header): */ __pyx_t_5 = PyList_New(0); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 461; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __Pyx_GOTREF(__pyx_v_self->header); __Pyx_DECREF(__pyx_v_self->header); __pyx_v_self->header = __pyx_t_5; __pyx_t_5 = 0; goto __pyx_L24; } /*else*/ { /* "pandas/parser.pyx":463 * self.header = [] * else: * if isinstance(header, list) and len(header): # <<<<<<<<<<<<<< * # need to artifically skip the final line * # which is still a header line */ __pyx_t_7 = PyList_Check(__pyx_v_header); if (__pyx_t_7) { __pyx_t_4 = PyObject_Length(__pyx_v_header); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 463; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_3 = (__pyx_t_4 != 0); } else { __pyx_t_3 = __pyx_t_7; } if (__pyx_t_3) { /* "pandas/parser.pyx":466 * # need to artifically skip the final line * # which is still a header line * header = list(header) # <<<<<<<<<<<<<< * header.append(header[-1]+1) * */ __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 466; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_v_header); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_header); __Pyx_GIVEREF(__pyx_v_header); __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)(&PyList_Type))), __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 466; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF_SET(__pyx_v_header, __pyx_t_2); __pyx_t_2 = 0; /* "pandas/parser.pyx":467 * # which is still a header line * header = list(header) * header.append(header[-1]+1) # <<<<<<<<<<<<<< * * self.parser.header_start = header[0] */ __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_header, -1, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 467; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = PyNumber_Add(__pyx_t_2, __pyx_int_1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 467; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_12 = __Pyx_PyObject_Append(__pyx_v_header, __pyx_t_5); if (unlikely(__pyx_t_12 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 467; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "pandas/parser.pyx":469 * header.append(header[-1]+1) * * self.parser.header_start = header[0] # <<<<<<<<<<<<<< * self.parser.header_end = header[-1] * self.parser.header = header[0] */ __pyx_t_5 = __Pyx_GetItemInt(__pyx_v_header, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_5 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 469; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_5); __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_t_5); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 469; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_v_self->parser->header_start = __pyx_t_1; /* "pandas/parser.pyx":470 * * self.parser.header_start = header[0] * self.parser.header_end = header[-1] # <<<<<<<<<<<<<< * self.parser.header = header[0] * self.parser_start = header[-1] + 1 */ __pyx_t_5 = __Pyx_GetItemInt(__pyx_v_header, -1, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(__pyx_t_5 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 470; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_5); __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_t_5); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 470; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_v_self->parser->header_end = __pyx_t_1; /* "pandas/parser.pyx":471 * self.parser.header_start = header[0] * self.parser.header_end = header[-1] * self.parser.header = header[0] # <<<<<<<<<<<<<< * self.parser_start = header[-1] + 1 * self.has_mi_columns = 1 */ __pyx_t_5 = __Pyx_GetItemInt(__pyx_v_header, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_5 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 471; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_5); __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_t_5); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 471; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_v_self->parser->header = __pyx_t_1; /* "pandas/parser.pyx":472 * self.parser.header_end = header[-1] * self.parser.header = header[0] * self.parser_start = header[-1] + 1 # <<<<<<<<<<<<<< * self.has_mi_columns = 1 * self.header = header */ __pyx_t_5 = __Pyx_GetItemInt(__pyx_v_header, -1, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(__pyx_t_5 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 472; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_5); __pyx_t_2 = PyNumber_Add(__pyx_t_5, __pyx_int_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 472; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 472; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_self->parser_start = __pyx_t_1; /* "pandas/parser.pyx":473 * self.parser.header = header[0] * self.parser_start = header[-1] + 1 * self.has_mi_columns = 1 # <<<<<<<<<<<<<< * self.header = header * else: */ __pyx_v_self->has_mi_columns = 1; /* "pandas/parser.pyx":474 * self.parser_start = header[-1] + 1 * self.has_mi_columns = 1 * self.header = header # <<<<<<<<<<<<<< * else: * self.parser.header_start = header */ __Pyx_INCREF(__pyx_v_header); __Pyx_GIVEREF(__pyx_v_header); __Pyx_GOTREF(__pyx_v_self->header); __Pyx_DECREF(__pyx_v_self->header); __pyx_v_self->header = __pyx_v_header; goto __pyx_L25; } /*else*/ { /* "pandas/parser.pyx":476 * self.header = header * else: * self.parser.header_start = header # <<<<<<<<<<<<<< * self.parser.header_end = header * self.parser.header = header */ __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_header); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 476; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_self->parser->header_start = __pyx_t_1; /* "pandas/parser.pyx":477 * else: * self.parser.header_start = header * self.parser.header_end = header # <<<<<<<<<<<<<< * self.parser.header = header * self.parser_start = header + 1 */ __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_header); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 477; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_self->parser->header_end = __pyx_t_1; /* "pandas/parser.pyx":478 * self.parser.header_start = header * self.parser.header_end = header * self.parser.header = header # <<<<<<<<<<<<<< * self.parser_start = header + 1 * self.header = [ header ] */ __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_header); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 478; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_self->parser->header = __pyx_t_1; /* "pandas/parser.pyx":479 * self.parser.header_end = header * self.parser.header = header * self.parser_start = header + 1 # <<<<<<<<<<<<<< * self.header = [ header ] * */ __pyx_t_2 = PyNumber_Add(__pyx_v_header, __pyx_int_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 479; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 479; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_self->parser_start = __pyx_t_1; /* "pandas/parser.pyx":480 * self.parser.header = header * self.parser_start = header + 1 * self.header = [ header ] # <<<<<<<<<<<<<< * * self.names = names */ __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 480; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_header); PyList_SET_ITEM(__pyx_t_2, 0, __pyx_v_header); __Pyx_GIVEREF(__pyx_v_header); __Pyx_GIVEREF(__pyx_t_2); __Pyx_GOTREF(__pyx_v_self->header); __Pyx_DECREF(__pyx_v_self->header); __pyx_v_self->header = __pyx_t_2; __pyx_t_2 = 0; } __pyx_L25:; } __pyx_L24:; /* "pandas/parser.pyx":482 * self.header = [ header ] * * self.names = names # <<<<<<<<<<<<<< * self.header, self.table_width = self._get_header() * */ __Pyx_INCREF(__pyx_v_names); __Pyx_GIVEREF(__pyx_v_names); __Pyx_GOTREF(__pyx_v_self->names); __Pyx_DECREF(__pyx_v_self->names); __pyx_v_self->names = __pyx_v_names; /* "pandas/parser.pyx":483 * * self.names = names * self.header, self.table_width = self._get_header() # <<<<<<<<<<<<<< * * if not self.table_width: */ __pyx_t_2 = ((struct __pyx_vtabstruct_6pandas_6parser_TextReader *)__pyx_v_self->__pyx_vtab)->_get_header(__pyx_v_self); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 483; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if ((likely(PyTuple_CheckExact(__pyx_t_2))) || (PyList_CheckExact(__pyx_t_2))) { PyObject* sequence = __pyx_t_2; #if CYTHON_COMPILING_IN_CPYTHON Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 483; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_5 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_11 = PyTuple_GET_ITEM(sequence, 1); } else { __pyx_t_5 = PyList_GET_ITEM(sequence, 0); __pyx_t_11 = PyList_GET_ITEM(sequence, 1); } __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(__pyx_t_11); #else __pyx_t_5 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 483; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_11 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 483; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); #endif __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } else { Py_ssize_t index = -1; __pyx_t_8 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 483; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_13 = Py_TYPE(__pyx_t_8)->tp_iternext; index = 0; __pyx_t_5 = __pyx_t_13(__pyx_t_8); if (unlikely(!__pyx_t_5)) goto __pyx_L26_unpacking_failed; __Pyx_GOTREF(__pyx_t_5); index = 1; __pyx_t_11 = __pyx_t_13(__pyx_t_8); if (unlikely(!__pyx_t_11)) goto __pyx_L26_unpacking_failed; __Pyx_GOTREF(__pyx_t_11); if (__Pyx_IternextUnpackEndCheck(__pyx_t_13(__pyx_t_8), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 483; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_13 = NULL; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; goto __pyx_L27_unpacking_done; __pyx_L26_unpacking_failed:; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_13 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 483; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_L27_unpacking_done:; } __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_t_11); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 483; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_GIVEREF(__pyx_t_5); __Pyx_GOTREF(__pyx_v_self->header); __Pyx_DECREF(__pyx_v_self->header); __pyx_v_self->header = __pyx_t_5; __pyx_t_5 = 0; __pyx_v_self->table_width = __pyx_t_1; /* "pandas/parser.pyx":485 * self.header, self.table_width = self._get_header() * * if not self.table_width: # <<<<<<<<<<<<<< * raise ValueError("No columns to parse from file") * */ __pyx_t_3 = ((!(__pyx_v_self->table_width != 0)) != 0); if (__pyx_t_3) { /* "pandas/parser.pyx":486 * * if not self.table_width: * raise ValueError("No columns to parse from file") # <<<<<<<<<<<<<< * * # compute buffer_lines as function of table width */ __pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__12, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 486; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 486; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } /* "pandas/parser.pyx":489 * * # compute buffer_lines as function of table width * heuristic = 2**20 // self.table_width # <<<<<<<<<<<<<< * self.buffer_lines = 1 * while self.buffer_lines * 2< heuristic: */ if (unlikely(__pyx_v_self->table_width == 0)) { #ifdef WITH_THREAD PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure(); #endif PyErr_SetString(PyExc_ZeroDivisionError, "integer division or modulo by zero"); #ifdef WITH_THREAD PyGILState_Release(__pyx_gilstate_save); #endif {__pyx_filename = __pyx_f[0]; __pyx_lineno = 489; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } else if (sizeof(long) == sizeof(long) && (!(((int)-1) > 0)) && unlikely(__pyx_v_self->table_width == (int)-1) && unlikely(UNARY_NEG_WOULD_OVERFLOW(1048576))) { #ifdef WITH_THREAD PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure(); #endif PyErr_SetString(PyExc_OverflowError, "value too large to perform division"); #ifdef WITH_THREAD PyGILState_Release(__pyx_gilstate_save); #endif {__pyx_filename = __pyx_f[0]; __pyx_lineno = 489; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_heuristic = __Pyx_div_long(1048576, __pyx_v_self->table_width); /* "pandas/parser.pyx":490 * # compute buffer_lines as function of table width * heuristic = 2**20 // self.table_width * self.buffer_lines = 1 # <<<<<<<<<<<<<< * while self.buffer_lines * 2< heuristic: * self.buffer_lines *= 2 */ __pyx_v_self->buffer_lines = 1; /* "pandas/parser.pyx":491 * heuristic = 2**20 // self.table_width * self.buffer_lines = 1 * while self.buffer_lines * 2< heuristic: # <<<<<<<<<<<<<< * self.buffer_lines *= 2 * */ while (1) { __pyx_t_3 = (((__pyx_v_self->buffer_lines * 2) < __pyx_v_heuristic) != 0); if (!__pyx_t_3) break; /* "pandas/parser.pyx":492 * self.buffer_lines = 1 * while self.buffer_lines * 2< heuristic: * self.buffer_lines *= 2 # <<<<<<<<<<<<<< * * def __init__(self, *args, **kwards): */ __pyx_v_self->buffer_lines = (__pyx_v_self->buffer_lines * 2); } /* "pandas/parser.pyx":264 * set noconvert, usecols * * def __cinit__(self, source, # <<<<<<<<<<<<<< * delimiter=b',', * */ /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_11); __Pyx_AddTraceback("pandas.parser.TextReader.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_XDECREF(__pyx_v_conv); __Pyx_XDECREF(__pyx_v_k); __Pyx_XDECREF(__pyx_v_v); __Pyx_XDECREF(__pyx_v_header); __Pyx_XDECREF(__pyx_v_encoding); __Pyx_XDECREF(__pyx_v_dtype); __Pyx_XDECREF(__pyx_v_na_fvalues); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/parser.pyx":494 * self.buffer_lines *= 2 * * def __init__(self, *args, **kwards): # <<<<<<<<<<<<<< * pass * */ /* Python wrapper */ static int __pyx_pw_6pandas_6parser_10TextReader_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_pw_6pandas_6parser_10TextReader_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { CYTHON_UNUSED PyObject *__pyx_v_args = 0; CYTHON_UNUSED PyObject *__pyx_v_kwards = 0; int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); if (unlikely(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__init__", 1))) return -1; __pyx_v_kwards = (__pyx_kwds) ? PyDict_Copy(__pyx_kwds) : PyDict_New(); if (unlikely(!__pyx_v_kwards)) return -1; __Pyx_GOTREF(__pyx_v_kwards); __Pyx_INCREF(__pyx_args); __pyx_v_args = __pyx_args; __pyx_r = __pyx_pf_6pandas_6parser_10TextReader_2__init__(((struct __pyx_obj_6pandas_6parser_TextReader *)__pyx_v_self), __pyx_v_args, __pyx_v_kwards); /* function exit code */ __Pyx_XDECREF(__pyx_v_args); __Pyx_XDECREF(__pyx_v_kwards); __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pandas_6parser_10TextReader_2__init__(CYTHON_UNUSED struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_args, CYTHON_UNUSED PyObject *__pyx_v_kwards) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__init__", 0); /* function exit code */ __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/parser.pyx":497 * pass * * def __dealloc__(self): # <<<<<<<<<<<<<< * parser_free(self.parser) * */ /* Python wrapper */ static void __pyx_pw_6pandas_6parser_10TextReader_5__dealloc__(PyObject *__pyx_v_self); /*proto*/ static void __pyx_pw_6pandas_6parser_10TextReader_5__dealloc__(PyObject *__pyx_v_self) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0); __pyx_pf_6pandas_6parser_10TextReader_4__dealloc__(((struct __pyx_obj_6pandas_6parser_TextReader *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); } static void __pyx_pf_6pandas_6parser_10TextReader_4__dealloc__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__dealloc__", 0); /* "pandas/parser.pyx":498 * * def __dealloc__(self): * parser_free(self.parser) # <<<<<<<<<<<<<< * * def set_error_bad_lines(self, int status): */ parser_free(__pyx_v_self->parser); /* "pandas/parser.pyx":497 * pass * * def __dealloc__(self): # <<<<<<<<<<<<<< * parser_free(self.parser) * */ /* function exit code */ __Pyx_RefNannyFinishContext(); } /* "pandas/parser.pyx":500 * parser_free(self.parser) * * def set_error_bad_lines(self, int status): # <<<<<<<<<<<<<< * self.parser.error_bad_lines = status * */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_6parser_10TextReader_7set_error_bad_lines(PyObject *__pyx_v_self, PyObject *__pyx_arg_status); /*proto*/ static PyObject *__pyx_pw_6pandas_6parser_10TextReader_7set_error_bad_lines(PyObject *__pyx_v_self, PyObject *__pyx_arg_status) { int __pyx_v_status; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("set_error_bad_lines (wrapper)", 0); assert(__pyx_arg_status); { __pyx_v_status = __Pyx_PyInt_As_int(__pyx_arg_status); if (unlikely((__pyx_v_status == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 500; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; __Pyx_AddTraceback("pandas.parser.TextReader.set_error_bad_lines", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pandas_6parser_10TextReader_6set_error_bad_lines(((struct __pyx_obj_6pandas_6parser_TextReader *)__pyx_v_self), ((int)__pyx_v_status)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_6parser_10TextReader_6set_error_bad_lines(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self, int __pyx_v_status) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("set_error_bad_lines", 0); /* "pandas/parser.pyx":501 * * def set_error_bad_lines(self, int status): * self.parser.error_bad_lines = status # <<<<<<<<<<<<<< * * cdef _make_skiprow_set(self): */ __pyx_v_self->parser->error_bad_lines = __pyx_v_status; /* "pandas/parser.pyx":500 * parser_free(self.parser) * * def set_error_bad_lines(self, int status): # <<<<<<<<<<<<<< * self.parser.error_bad_lines = status * */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/parser.pyx":503 * self.parser.error_bad_lines = status * * cdef _make_skiprow_set(self): # <<<<<<<<<<<<<< * if isinstance(self.skiprows, (int, np.integer)): * self.skiprows = range(self.skiprows) */ static PyObject *__pyx_f_6pandas_6parser_10TextReader__make_skiprow_set(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self) { PyObject *__pyx_v_i = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_t_4; int __pyx_t_5; Py_ssize_t __pyx_t_6; PyObject *(*__pyx_t_7)(PyObject *); __pyx_t_5numpy_int64_t __pyx_t_8; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_make_skiprow_set", 0); /* "pandas/parser.pyx":504 * * cdef _make_skiprow_set(self): * if isinstance(self.skiprows, (int, np.integer)): # <<<<<<<<<<<<<< * self.skiprows = range(self.skiprows) * */ __pyx_t_1 = __pyx_v_self->skiprows; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 504; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_integer); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 504; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 504; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(((PyObject *)((PyObject*)(&PyInt_Type)))); PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)((PyObject*)(&PyInt_Type)))); __Pyx_GIVEREF(((PyObject *)((PyObject*)(&PyInt_Type)))); PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_4 = PyObject_IsInstance(__pyx_t_1, __pyx_t_2); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 504; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_5 = (__pyx_t_4 != 0); if (__pyx_t_5) { /* "pandas/parser.pyx":505 * cdef _make_skiprow_set(self): * if isinstance(self.skiprows, (int, np.integer)): * self.skiprows = range(self.skiprows) # <<<<<<<<<<<<<< * * for i in self.skiprows: */ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 505; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_self->skiprows); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_self->skiprows); __Pyx_GIVEREF(__pyx_v_self->skiprows); __pyx_t_1 = PyObject_Call(__pyx_builtin_range, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 505; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->skiprows); __Pyx_DECREF(__pyx_v_self->skiprows); __pyx_v_self->skiprows = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L3; } __pyx_L3:; /* "pandas/parser.pyx":507 * self.skiprows = range(self.skiprows) * * for i in self.skiprows: # <<<<<<<<<<<<<< * parser_add_skiprow(self.parser, i) * */ if (PyList_CheckExact(__pyx_v_self->skiprows) || PyTuple_CheckExact(__pyx_v_self->skiprows)) { __pyx_t_1 = __pyx_v_self->skiprows; __Pyx_INCREF(__pyx_t_1); __pyx_t_6 = 0; __pyx_t_7 = NULL; } else { __pyx_t_6 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_self->skiprows); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 507; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_7 = Py_TYPE(__pyx_t_1)->tp_iternext; } for (;;) { if (!__pyx_t_7 && PyList_CheckExact(__pyx_t_1)) { if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_1)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_6); __Pyx_INCREF(__pyx_t_2); __pyx_t_6++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 507; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 507; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif } else if (!__pyx_t_7 && PyTuple_CheckExact(__pyx_t_1)) { if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_1)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_6); __Pyx_INCREF(__pyx_t_2); __pyx_t_6++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 507; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 507; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif } else { __pyx_t_2 = __pyx_t_7(__pyx_t_1); if (unlikely(!__pyx_t_2)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 507; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } break; } __Pyx_GOTREF(__pyx_t_2); } __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_2); __pyx_t_2 = 0; /* "pandas/parser.pyx":508 * * for i in self.skiprows: * parser_add_skiprow(self.parser, i) # <<<<<<<<<<<<<< * * cdef _setup_parser_source(self, source): */ __pyx_t_8 = __Pyx_PyInt_As_npy_int64(__pyx_v_i); if (unlikely((__pyx_t_8 == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 508; __pyx_clineno = __LINE__; goto __pyx_L1_error;} parser_add_skiprow(__pyx_v_self->parser, __pyx_t_8); } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pandas/parser.pyx":503 * self.parser.error_bad_lines = status * * cdef _make_skiprow_set(self): # <<<<<<<<<<<<<< * if isinstance(self.skiprows, (int, np.integer)): * self.skiprows = range(self.skiprows) */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("pandas.parser.TextReader._make_skiprow_set", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_i); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/parser.pyx":510 * parser_add_skiprow(self.parser, i) * * cdef _setup_parser_source(self, source): # <<<<<<<<<<<<<< * cdef: * int status */ static PyObject *__pyx_f_6pandas_6parser_10TextReader__setup_parser_source(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self, PyObject *__pyx_v_source) { void *__pyx_v_ptr; PyObject *__pyx_v_gzip = NULL; PyObject *__pyx_v_bz2 = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; char *__pyx_t_6; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_setup_parser_source", 0); __Pyx_INCREF(__pyx_v_source); /* "pandas/parser.pyx":515 * void *ptr * * self.parser.cb_io = NULL # <<<<<<<<<<<<<< * self.parser.cb_cleanup = NULL * */ __pyx_v_self->parser->cb_io = NULL; /* "pandas/parser.pyx":516 * * self.parser.cb_io = NULL * self.parser.cb_cleanup = NULL # <<<<<<<<<<<<<< * * if self.compression: */ __pyx_v_self->parser->cb_cleanup = NULL; /* "pandas/parser.pyx":518 * self.parser.cb_cleanup = NULL * * if self.compression: # <<<<<<<<<<<<<< * if self.compression == 'gzip': * import gzip */ __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_self->compression); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 518; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__pyx_t_1) { /* "pandas/parser.pyx":519 * * if self.compression: * if self.compression == 'gzip': # <<<<<<<<<<<<<< * import gzip * if isinstance(source, basestring): */ __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_self->compression, __pyx_n_s_gzip, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 519; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__pyx_t_1) { /* "pandas/parser.pyx":520 * if self.compression: * if self.compression == 'gzip': * import gzip # <<<<<<<<<<<<<< * if isinstance(source, basestring): * source = gzip.GzipFile(source, 'rb') */ __pyx_t_2 = __Pyx_Import(__pyx_n_s_gzip, 0, -1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 520; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_v_gzip = __pyx_t_2; __pyx_t_2 = 0; /* "pandas/parser.pyx":521 * if self.compression == 'gzip': * import gzip * if isinstance(source, basestring): # <<<<<<<<<<<<<< * source = gzip.GzipFile(source, 'rb') * else: */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_basestring); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 521; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = PyObject_IsInstance(__pyx_v_source, __pyx_t_2); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 521; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_3 = (__pyx_t_1 != 0); if (__pyx_t_3) { /* "pandas/parser.pyx":522 * import gzip * if isinstance(source, basestring): * source = gzip.GzipFile(source, 'rb') # <<<<<<<<<<<<<< * else: * source = gzip.GzipFile(fileobj=source) */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_gzip, __pyx_n_s_GzipFile); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 522; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 522; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_v_source); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_source); __Pyx_GIVEREF(__pyx_v_source); __Pyx_INCREF(__pyx_n_s_rb); PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_n_s_rb); __Pyx_GIVEREF(__pyx_n_s_rb); __pyx_t_5 = PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 522; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF_SET(__pyx_v_source, __pyx_t_5); __pyx_t_5 = 0; goto __pyx_L5; } /*else*/ { /* "pandas/parser.pyx":524 * source = gzip.GzipFile(source, 'rb') * else: * source = gzip.GzipFile(fileobj=source) # <<<<<<<<<<<<<< * elif self.compression == 'bz2': * import bz2 */ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_gzip, __pyx_n_s_GzipFile); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 524; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = PyDict_New(); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 524; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_fileobj, __pyx_v_source) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 524; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_2 = PyObject_Call(__pyx_t_5, __pyx_empty_tuple, __pyx_t_4); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 524; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF_SET(__pyx_v_source, __pyx_t_2); __pyx_t_2 = 0; } __pyx_L5:; goto __pyx_L4; } /* "pandas/parser.pyx":525 * else: * source = gzip.GzipFile(fileobj=source) * elif self.compression == 'bz2': # <<<<<<<<<<<<<< * import bz2 * if isinstance(source, basestring): */ __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_v_self->compression, __pyx_n_s_bz2, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 525; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__pyx_t_3) { /* "pandas/parser.pyx":526 * source = gzip.GzipFile(fileobj=source) * elif self.compression == 'bz2': * import bz2 # <<<<<<<<<<<<<< * if isinstance(source, basestring): * source = bz2.BZ2File(source, 'rb') */ __pyx_t_2 = __Pyx_Import(__pyx_n_s_bz2, 0, -1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 526; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_v_bz2 = __pyx_t_2; __pyx_t_2 = 0; /* "pandas/parser.pyx":527 * elif self.compression == 'bz2': * import bz2 * if isinstance(source, basestring): # <<<<<<<<<<<<<< * source = bz2.BZ2File(source, 'rb') * else: */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_basestring); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 527; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyObject_IsInstance(__pyx_v_source, __pyx_t_2); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 527; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_1 = (__pyx_t_3 != 0); if (__pyx_t_1) { /* "pandas/parser.pyx":528 * import bz2 * if isinstance(source, basestring): * source = bz2.BZ2File(source, 'rb') # <<<<<<<<<<<<<< * else: * raise ValueError('Python cannot read bz2 from open file ' */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_bz2, __pyx_n_s_BZ2File); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 528; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 528; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_v_source); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_source); __Pyx_GIVEREF(__pyx_v_source); __Pyx_INCREF(__pyx_n_s_rb); PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_n_s_rb); __Pyx_GIVEREF(__pyx_n_s_rb); __pyx_t_5 = PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 528; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF_SET(__pyx_v_source, __pyx_t_5); __pyx_t_5 = 0; goto __pyx_L6; } /*else*/ { /* "pandas/parser.pyx":530 * source = bz2.BZ2File(source, 'rb') * else: * raise ValueError('Python cannot read bz2 from open file ' # <<<<<<<<<<<<<< * 'handle') * else: */ __pyx_t_5 = PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__13, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 530; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_Raise(__pyx_t_5, 0, 0, 0); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 530; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_L6:; goto __pyx_L4; } /*else*/ { /* "pandas/parser.pyx":533 * 'handle') * else: * raise ValueError('Unrecognized compression type: %s' % # <<<<<<<<<<<<<< * self.compression) * */ __pyx_t_5 = __Pyx_PyString_Format(__pyx_kp_s_Unrecognized_compression_type_s, __pyx_v_self->compression); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 533; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 533; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyObject_Call(__pyx_builtin_ValueError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 533; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_Raise(__pyx_t_5, 0, 0, 0); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 533; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_L4:; goto __pyx_L3; } __pyx_L3:; /* "pandas/parser.pyx":536 * self.compression) * * if isinstance(source, basestring): # <<<<<<<<<<<<<< * if not isinstance(source, bytes): * source = source.encode('utf-8') */ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_basestring); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 536; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_1 = PyObject_IsInstance(__pyx_v_source, __pyx_t_5); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 536; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_3 = (__pyx_t_1 != 0); if (__pyx_t_3) { /* "pandas/parser.pyx":537 * * if isinstance(source, basestring): * if not isinstance(source, bytes): # <<<<<<<<<<<<<< * source = source.encode('utf-8') * */ __pyx_t_3 = PyBytes_Check(__pyx_v_source); __pyx_t_1 = ((!(__pyx_t_3 != 0)) != 0); if (__pyx_t_1) { /* "pandas/parser.pyx":538 * if isinstance(source, basestring): * if not isinstance(source, bytes): * source = source.encode('utf-8') # <<<<<<<<<<<<<< * * if self.memory_map: */ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_source, __pyx_n_s_encode); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 538; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = PyObject_Call(__pyx_t_5, __pyx_tuple__14, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 538; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF_SET(__pyx_v_source, __pyx_t_4); __pyx_t_4 = 0; goto __pyx_L8; } __pyx_L8:; /* "pandas/parser.pyx":540 * source = source.encode('utf-8') * * if self.memory_map: # <<<<<<<<<<<<<< * ptr = new_mmap(source) * if ptr == NULL: */ __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_self->memory_map); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 540; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__pyx_t_1) { /* "pandas/parser.pyx":541 * * if self.memory_map: * ptr = new_mmap(source) # <<<<<<<<<<<<<< * if ptr == NULL: * # fall back */ __pyx_t_6 = __Pyx_PyObject_AsString(__pyx_v_source); if (unlikely((!__pyx_t_6) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 541; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_ptr = new_mmap(__pyx_t_6); /* "pandas/parser.pyx":542 * if self.memory_map: * ptr = new_mmap(source) * if ptr == NULL: # <<<<<<<<<<<<<< * # fall back * ptr = new_file_source(source, self.parser.chunksize) */ __pyx_t_1 = ((__pyx_v_ptr == NULL) != 0); if (__pyx_t_1) { /* "pandas/parser.pyx":544 * if ptr == NULL: * # fall back * ptr = new_file_source(source, self.parser.chunksize) # <<<<<<<<<<<<<< * self.parser.cb_io = &buffer_file_bytes * self.parser.cb_cleanup = &del_file_source */ __pyx_t_6 = __Pyx_PyObject_AsString(__pyx_v_source); if (unlikely((!__pyx_t_6) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 544; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_ptr = new_file_source(__pyx_t_6, __pyx_v_self->parser->chunksize); /* "pandas/parser.pyx":545 * # fall back * ptr = new_file_source(source, self.parser.chunksize) * self.parser.cb_io = &buffer_file_bytes # <<<<<<<<<<<<<< * self.parser.cb_cleanup = &del_file_source * else: */ __pyx_v_self->parser->cb_io = (&buffer_file_bytes); /* "pandas/parser.pyx":546 * ptr = new_file_source(source, self.parser.chunksize) * self.parser.cb_io = &buffer_file_bytes * self.parser.cb_cleanup = &del_file_source # <<<<<<<<<<<<<< * else: * self.parser.cb_io = &buffer_mmap_bytes */ __pyx_v_self->parser->cb_cleanup = (&del_file_source); goto __pyx_L10; } /*else*/ { /* "pandas/parser.pyx":548 * self.parser.cb_cleanup = &del_file_source * else: * self.parser.cb_io = &buffer_mmap_bytes # <<<<<<<<<<<<<< * self.parser.cb_cleanup = &del_mmap * else: */ __pyx_v_self->parser->cb_io = (&buffer_mmap_bytes); /* "pandas/parser.pyx":549 * else: * self.parser.cb_io = &buffer_mmap_bytes * self.parser.cb_cleanup = &del_mmap # <<<<<<<<<<<<<< * else: * ptr = new_file_source(source, self.parser.chunksize) */ __pyx_v_self->parser->cb_cleanup = (&del_mmap); } __pyx_L10:; goto __pyx_L9; } /*else*/ { /* "pandas/parser.pyx":551 * self.parser.cb_cleanup = &del_mmap * else: * ptr = new_file_source(source, self.parser.chunksize) # <<<<<<<<<<<<<< * self.parser.cb_io = &buffer_file_bytes * self.parser.cb_cleanup = &del_file_source */ __pyx_t_6 = __Pyx_PyObject_AsString(__pyx_v_source); if (unlikely((!__pyx_t_6) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 551; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_ptr = new_file_source(__pyx_t_6, __pyx_v_self->parser->chunksize); /* "pandas/parser.pyx":552 * else: * ptr = new_file_source(source, self.parser.chunksize) * self.parser.cb_io = &buffer_file_bytes # <<<<<<<<<<<<<< * self.parser.cb_cleanup = &del_file_source * */ __pyx_v_self->parser->cb_io = (&buffer_file_bytes); /* "pandas/parser.pyx":553 * ptr = new_file_source(source, self.parser.chunksize) * self.parser.cb_io = &buffer_file_bytes * self.parser.cb_cleanup = &del_file_source # <<<<<<<<<<<<<< * * if ptr == NULL: */ __pyx_v_self->parser->cb_cleanup = (&del_file_source); } __pyx_L9:; /* "pandas/parser.pyx":555 * self.parser.cb_cleanup = &del_file_source * * if ptr == NULL: # <<<<<<<<<<<<<< * if not os.path.exists(source): * raise IOError('File %s does not exist' % source) */ __pyx_t_1 = ((__pyx_v_ptr == NULL) != 0); if (__pyx_t_1) { /* "pandas/parser.pyx":556 * * if ptr == NULL: * if not os.path.exists(source): # <<<<<<<<<<<<<< * raise IOError('File %s does not exist' % source) * raise IOError('Initializing from file failed') */ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_os); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 556; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_path); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 556; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_exists); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 556; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 556; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_v_source); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_source); __Pyx_GIVEREF(__pyx_v_source); __pyx_t_2 = PyObject_Call(__pyx_t_4, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 556; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 556; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_3 = ((!__pyx_t_1) != 0); if (__pyx_t_3) { /* "pandas/parser.pyx":557 * if ptr == NULL: * if not os.path.exists(source): * raise IOError('File %s does not exist' % source) # <<<<<<<<<<<<<< * raise IOError('Initializing from file failed') * */ __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_File_s_does_not_exist, __pyx_v_source); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 557; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 557; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_Call(__pyx_builtin_IOError, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 557; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 557; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } /* "pandas/parser.pyx":558 * if not os.path.exists(source): * raise IOError('File %s does not exist' % source) * raise IOError('Initializing from file failed') # <<<<<<<<<<<<<< * * self.parser.source = ptr */ __pyx_t_2 = PyObject_Call(__pyx_builtin_IOError, __pyx_tuple__15, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 558; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 558; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } /* "pandas/parser.pyx":560 * raise IOError('Initializing from file failed') * * self.parser.source = ptr # <<<<<<<<<<<<<< * * elif hasattr(source, 'read'): */ __pyx_v_self->parser->source = __pyx_v_ptr; goto __pyx_L7; } /* "pandas/parser.pyx":562 * self.parser.source = ptr * * elif hasattr(source, 'read'): # <<<<<<<<<<<<<< * # e.g., StringIO * */ __pyx_t_3 = PyObject_HasAttr(__pyx_v_source, __pyx_n_s_read); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 562; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_1 = (__pyx_t_3 != 0); if (__pyx_t_1) { /* "pandas/parser.pyx":565 * # e.g., StringIO * * ptr = new_rd_source(source) # <<<<<<<<<<<<<< * if ptr == NULL: * raise IOError('Initializing parser from file-like ' */ __pyx_v_ptr = new_rd_source(__pyx_v_source); /* "pandas/parser.pyx":566 * * ptr = new_rd_source(source) * if ptr == NULL: # <<<<<<<<<<<<<< * raise IOError('Initializing parser from file-like ' * 'object failed') */ __pyx_t_1 = ((__pyx_v_ptr == NULL) != 0); if (__pyx_t_1) { /* "pandas/parser.pyx":567 * ptr = new_rd_source(source) * if ptr == NULL: * raise IOError('Initializing parser from file-like ' # <<<<<<<<<<<<<< * 'object failed') * */ __pyx_t_2 = PyObject_Call(__pyx_builtin_IOError, __pyx_tuple__16, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 567; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 567; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } /* "pandas/parser.pyx":570 * 'object failed') * * self.parser.source = ptr # <<<<<<<<<<<<<< * self.parser.cb_io = &buffer_rd_bytes * self.parser.cb_cleanup = &del_rd_source */ __pyx_v_self->parser->source = __pyx_v_ptr; /* "pandas/parser.pyx":571 * * self.parser.source = ptr * self.parser.cb_io = &buffer_rd_bytes # <<<<<<<<<<<<<< * self.parser.cb_cleanup = &del_rd_source * else: */ __pyx_v_self->parser->cb_io = (&buffer_rd_bytes); /* "pandas/parser.pyx":572 * self.parser.source = ptr * self.parser.cb_io = &buffer_rd_bytes * self.parser.cb_cleanup = &del_rd_source # <<<<<<<<<<<<<< * else: * raise IOError('Expected file path name or file-like object,' */ __pyx_v_self->parser->cb_cleanup = (&del_rd_source); goto __pyx_L7; } /*else*/ { /* "pandas/parser.pyx":575 * else: * raise IOError('Expected file path name or file-like object,' * ' got %s type' % type(source)) # <<<<<<<<<<<<<< * * cdef _get_header(self): */ __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_Expected_file_path_name_or_file, ((PyObject *)Py_TYPE(__pyx_v_source))); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 575; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); /* "pandas/parser.pyx":574 * self.parser.cb_cleanup = &del_rd_source * else: * raise IOError('Expected file path name or file-like object,' # <<<<<<<<<<<<<< * ' got %s type' % type(source)) * */ __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 574; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_Call(__pyx_builtin_IOError, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 574; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 574; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_L7:; /* "pandas/parser.pyx":510 * parser_add_skiprow(self.parser, i) * * cdef _setup_parser_source(self, source): # <<<<<<<<<<<<<< * cdef: * int status */ /* 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_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("pandas.parser.TextReader._setup_parser_source", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_gzip); __Pyx_XDECREF(__pyx_v_bz2); __Pyx_XDECREF(__pyx_v_source); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/parser.pyx":577 * ' got %s type' % type(source)) * * cdef _get_header(self): # <<<<<<<<<<<<<< * # header is now a list of lists, so field_count should use header[0] * */ static PyObject *__pyx_f_6pandas_6parser_10TextReader__get_header(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self) { size_t __pyx_v_i; size_t __pyx_v_start; size_t __pyx_v_data_line; size_t __pyx_v_field_count; size_t __pyx_v_passed_count; size_t __pyx_v_hr; size_t __pyx_v_unnamed_count; char *__pyx_v_word; PyObject *__pyx_v_name = 0; char *__pyx_v_errors; PyObject *__pyx_v_header = NULL; PyObject *__pyx_v_level = NULL; PyObject *__pyx_v_this_header = NULL; PyObject *__pyx_v_msg = NULL; PyObject *__pyx_v_counts = NULL; PyObject *__pyx_v_count = NULL; PyObject *__pyx_v_lc = NULL; PyObject *__pyx_v_ic = NULL; Py_ssize_t __pyx_v_nuse; PyObject *__pyx_v_m = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; Py_ssize_t __pyx_t_4; PyObject *(*__pyx_t_5)(PyObject *); PyObject *__pyx_t_6 = NULL; size_t __pyx_t_7; int __pyx_t_8; PyObject *__pyx_t_9 = NULL; Py_ssize_t __pyx_t_10; PyObject *(*__pyx_t_11)(PyObject *); PyObject *__pyx_t_12 = NULL; PyObject *__pyx_t_13 = NULL; size_t __pyx_t_14; int __pyx_t_15; int __pyx_t_16; int __pyx_t_17; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_get_header", 0); /* "pandas/parser.pyx":586 * int status * Py_ssize_t size * char *errors = "strict" # <<<<<<<<<<<<<< * * header = [] */ __pyx_v_errors = __pyx_k_strict; /* "pandas/parser.pyx":588 * char *errors = "strict" * * header = [] # <<<<<<<<<<<<<< * * if self.parser.header_start >= 0: */ __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 588; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_v_header = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/parser.pyx":590 * header = [] * * if self.parser.header_start >= 0: # <<<<<<<<<<<<<< * * # Header is in the file */ __pyx_t_2 = ((__pyx_v_self->parser->header_start >= 0) != 0); if (__pyx_t_2) { /* "pandas/parser.pyx":593 * * # Header is in the file * for level, hr in enumerate(self.header): # <<<<<<<<<<<<<< * * this_header = [] */ __Pyx_INCREF(__pyx_int_0); __pyx_t_1 = __pyx_int_0; if (PyList_CheckExact(__pyx_v_self->header) || PyTuple_CheckExact(__pyx_v_self->header)) { __pyx_t_3 = __pyx_v_self->header; __Pyx_INCREF(__pyx_t_3); __pyx_t_4 = 0; __pyx_t_5 = NULL; } else { __pyx_t_4 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_self->header); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 593; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = Py_TYPE(__pyx_t_3)->tp_iternext; } for (;;) { if (!__pyx_t_5 && PyList_CheckExact(__pyx_t_3)) { if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_3)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_6 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_6); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 593; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_6 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 593; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif } else if (!__pyx_t_5 && PyTuple_CheckExact(__pyx_t_3)) { if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_3)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_6); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 593; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_6 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 593; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif } else { __pyx_t_6 = __pyx_t_5(__pyx_t_3); if (unlikely(!__pyx_t_6)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 593; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } break; } __Pyx_GOTREF(__pyx_t_6); } __pyx_t_7 = __Pyx_PyInt_As_size_t(__pyx_t_6); if (unlikely((__pyx_t_7 == (size_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 593; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_v_hr = __pyx_t_7; __Pyx_INCREF(__pyx_t_1); __Pyx_XDECREF_SET(__pyx_v_level, __pyx_t_1); __pyx_t_6 = PyNumber_Add(__pyx_t_1, __pyx_int_1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 593; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = __pyx_t_6; __pyx_t_6 = 0; /* "pandas/parser.pyx":595 * for level, hr in enumerate(self.header): * * this_header = [] # <<<<<<<<<<<<<< * * if self.parser.lines < hr + 1: */ __pyx_t_6 = PyList_New(0); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 595; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_XDECREF_SET(__pyx_v_this_header, ((PyObject*)__pyx_t_6)); __pyx_t_6 = 0; /* "pandas/parser.pyx":597 * this_header = [] * * if self.parser.lines < hr + 1: # <<<<<<<<<<<<<< * self._tokenize_rows(hr + 2) * */ __pyx_t_2 = ((__pyx_v_self->parser->lines < (__pyx_v_hr + 1)) != 0); if (__pyx_t_2) { /* "pandas/parser.pyx":598 * * if self.parser.lines < hr + 1: * self._tokenize_rows(hr + 2) # <<<<<<<<<<<<<< * * # e.g., if header=3 and file only has 2 lines */ __pyx_t_6 = ((struct __pyx_vtabstruct_6pandas_6parser_TextReader *)__pyx_v_self->__pyx_vtab)->_tokenize_rows(__pyx_v_self, (__pyx_v_hr + 2)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 598; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; goto __pyx_L6; } __pyx_L6:; /* "pandas/parser.pyx":601 * * # e.g., if header=3 and file only has 2 lines * if self.parser.lines < hr + 1: # <<<<<<<<<<<<<< * msg = self.orig_header * if isinstance(msg,list): */ __pyx_t_2 = ((__pyx_v_self->parser->lines < (__pyx_v_hr + 1)) != 0); if (__pyx_t_2) { /* "pandas/parser.pyx":602 * # e.g., if header=3 and file only has 2 lines * if self.parser.lines < hr + 1: * msg = self.orig_header # <<<<<<<<<<<<<< * if isinstance(msg,list): * msg = "[%s], len of %d," % (','.join([ str(m) for m in msg ]),len(msg)) */ __pyx_t_6 = __pyx_v_self->orig_header; __Pyx_INCREF(__pyx_t_6); __pyx_v_msg = __pyx_t_6; __pyx_t_6 = 0; /* "pandas/parser.pyx":603 * if self.parser.lines < hr + 1: * msg = self.orig_header * if isinstance(msg,list): # <<<<<<<<<<<<<< * msg = "[%s], len of %d," % (','.join([ str(m) for m in msg ]),len(msg)) * raise CParserError('Passed header=%s but only %d lines in file' */ __pyx_t_2 = PyList_Check(__pyx_v_msg); __pyx_t_8 = (__pyx_t_2 != 0); if (__pyx_t_8) { /* "pandas/parser.pyx":604 * msg = self.orig_header * if isinstance(msg,list): * msg = "[%s], len of %d," % (','.join([ str(m) for m in msg ]),len(msg)) # <<<<<<<<<<<<<< * raise CParserError('Passed header=%s but only %d lines in file' * % (msg, self.parser.lines)) */ __pyx_t_6 = PyList_New(0); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 604; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); if (PyList_CheckExact(__pyx_v_msg) || PyTuple_CheckExact(__pyx_v_msg)) { __pyx_t_9 = __pyx_v_msg; __Pyx_INCREF(__pyx_t_9); __pyx_t_10 = 0; __pyx_t_11 = NULL; } else { __pyx_t_10 = -1; __pyx_t_9 = PyObject_GetIter(__pyx_v_msg); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 604; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_t_11 = Py_TYPE(__pyx_t_9)->tp_iternext; } for (;;) { if (!__pyx_t_11 && PyList_CheckExact(__pyx_t_9)) { if (__pyx_t_10 >= PyList_GET_SIZE(__pyx_t_9)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_12 = PyList_GET_ITEM(__pyx_t_9, __pyx_t_10); __Pyx_INCREF(__pyx_t_12); __pyx_t_10++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 604; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_12 = PySequence_ITEM(__pyx_t_9, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 604; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif } else if (!__pyx_t_11 && PyTuple_CheckExact(__pyx_t_9)) { if (__pyx_t_10 >= PyTuple_GET_SIZE(__pyx_t_9)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_12 = PyTuple_GET_ITEM(__pyx_t_9, __pyx_t_10); __Pyx_INCREF(__pyx_t_12); __pyx_t_10++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 604; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_12 = PySequence_ITEM(__pyx_t_9, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 604; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif } else { __pyx_t_12 = __pyx_t_11(__pyx_t_9); if (unlikely(!__pyx_t_12)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 604; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } break; } __Pyx_GOTREF(__pyx_t_12); } __Pyx_XDECREF_SET(__pyx_v_m, __pyx_t_12); __pyx_t_12 = 0; __pyx_t_12 = PyTuple_New(1); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 604; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __Pyx_INCREF(__pyx_v_m); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_v_m); __Pyx_GIVEREF(__pyx_v_m); __pyx_t_13 = PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), __pyx_t_12, NULL); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 604; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; if (unlikely(__Pyx_ListComp_Append(__pyx_t_6, (PyObject*)__pyx_t_13))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 604; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; } __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_9 = __Pyx_PyString_Join(__pyx_kp_s_, __pyx_t_6); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 604; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_10 = PyObject_Length(__pyx_v_msg); if (unlikely(__pyx_t_10 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 604; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_6 = PyInt_FromSsize_t(__pyx_t_10); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 604; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_13 = PyTuple_New(2); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 604; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_t_9); __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_13, 1, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_6); __pyx_t_9 = 0; __pyx_t_6 = 0; __pyx_t_6 = __Pyx_PyString_Format(__pyx_kp_s_s_len_of_d, __pyx_t_13); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 604; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_DECREF_SET(__pyx_v_msg, __pyx_t_6); __pyx_t_6 = 0; goto __pyx_L8; } __pyx_L8:; /* "pandas/parser.pyx":605 * if isinstance(msg,list): * msg = "[%s], len of %d," % (','.join([ str(m) for m in msg ]),len(msg)) * raise CParserError('Passed header=%s but only %d lines in file' # <<<<<<<<<<<<<< * % (msg, self.parser.lines)) * */ __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_CParserError); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 605; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); /* "pandas/parser.pyx":606 * msg = "[%s], len of %d," % (','.join([ str(m) for m in msg ]),len(msg)) * raise CParserError('Passed header=%s but only %d lines in file' * % (msg, self.parser.lines)) # <<<<<<<<<<<<<< * * field_count = self.parser.line_fields[hr] */ __pyx_t_13 = __Pyx_PyInt_From_int(__pyx_v_self->parser->lines); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 606; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __pyx_t_9 = PyTuple_New(2); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 606; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_INCREF(__pyx_v_msg); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_v_msg); __Pyx_GIVEREF(__pyx_v_msg); PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_t_13); __Pyx_GIVEREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_13 = __Pyx_PyString_Format(__pyx_kp_s_Passed_header_s_but_only_d_lines, __pyx_t_9); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 606; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; /* "pandas/parser.pyx":605 * if isinstance(msg,list): * msg = "[%s], len of %d," % (','.join([ str(m) for m in msg ]),len(msg)) * raise CParserError('Passed header=%s but only %d lines in file' # <<<<<<<<<<<<<< * % (msg, self.parser.lines)) * */ __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 605; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_13); __Pyx_GIVEREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_13 = PyObject_Call(__pyx_t_6, __pyx_t_9, NULL); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 605; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_Raise(__pyx_t_13, 0, 0, 0); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 605; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } /* "pandas/parser.pyx":608 * % (msg, self.parser.lines)) * * field_count = self.parser.line_fields[hr] # <<<<<<<<<<<<<< * start = self.parser.line_start[hr] * */ __pyx_v_field_count = (__pyx_v_self->parser->line_fields[__pyx_v_hr]); /* "pandas/parser.pyx":609 * * field_count = self.parser.line_fields[hr] * start = self.parser.line_start[hr] # <<<<<<<<<<<<<< * * # TODO: Py3 vs. Py2 */ __pyx_v_start = (__pyx_v_self->parser->line_start[__pyx_v_hr]); /* "pandas/parser.pyx":612 * * # TODO: Py3 vs. Py2 * counts = {} # <<<<<<<<<<<<<< * unnamed_count = 0 * for i in range(field_count): */ __pyx_t_13 = PyDict_New(); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 612; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __Pyx_XDECREF_SET(__pyx_v_counts, ((PyObject*)__pyx_t_13)); __pyx_t_13 = 0; /* "pandas/parser.pyx":613 * # TODO: Py3 vs. Py2 * counts = {} * unnamed_count = 0 # <<<<<<<<<<<<<< * for i in range(field_count): * word = self.parser.words[start + i] */ __pyx_v_unnamed_count = 0; /* "pandas/parser.pyx":614 * counts = {} * unnamed_count = 0 * for i in range(field_count): # <<<<<<<<<<<<<< * word = self.parser.words[start + i] * */ __pyx_t_7 = __pyx_v_field_count; for (__pyx_t_14 = 0; __pyx_t_14 < __pyx_t_7; __pyx_t_14+=1) { __pyx_v_i = __pyx_t_14; /* "pandas/parser.pyx":615 * unnamed_count = 0 * for i in range(field_count): * word = self.parser.words[start + i] # <<<<<<<<<<<<<< * * if self.c_encoding == NULL and not PY3: */ __pyx_v_word = (__pyx_v_self->parser->words[(__pyx_v_start + __pyx_v_i)]); /* "pandas/parser.pyx":617 * word = self.parser.words[start + i] * * if self.c_encoding == NULL and not PY3: # <<<<<<<<<<<<<< * name = PyBytes_FromString(word) * else: */ __pyx_t_8 = ((__pyx_v_self->c_encoding == NULL) != 0); if (__pyx_t_8) { __pyx_t_2 = ((!(__pyx_v_6pandas_6parser_PY3 != 0)) != 0); __pyx_t_15 = __pyx_t_2; } else { __pyx_t_15 = __pyx_t_8; } if (__pyx_t_15) { /* "pandas/parser.pyx":618 * * if self.c_encoding == NULL and not PY3: * name = PyBytes_FromString(word) # <<<<<<<<<<<<<< * else: * if self.c_encoding == NULL or self.c_encoding == b'utf-8': */ __pyx_t_13 = PyBytes_FromString(__pyx_v_word); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 618; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __Pyx_XDECREF_SET(__pyx_v_name, __pyx_t_13); __pyx_t_13 = 0; goto __pyx_L13; } /*else*/ { /* "pandas/parser.pyx":620 * name = PyBytes_FromString(word) * else: * if self.c_encoding == NULL or self.c_encoding == b'utf-8': # <<<<<<<<<<<<<< * name = PyUnicode_FromString(word) * else: */ __pyx_t_15 = (__pyx_v_self->c_encoding == NULL); if (!__pyx_t_15) { __pyx_t_13 = __Pyx_PyBytes_FromString(__pyx_v_self->c_encoding); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 620; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __pyx_t_8 = (__Pyx_PyBytes_Equals(__pyx_t_13, __pyx_kp_b_utf_8, Py_EQ)); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 620; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_2 = __pyx_t_8; } else { __pyx_t_2 = __pyx_t_15; } if (__pyx_t_2) { /* "pandas/parser.pyx":621 * else: * if self.c_encoding == NULL or self.c_encoding == b'utf-8': * name = PyUnicode_FromString(word) # <<<<<<<<<<<<<< * else: * name = PyUnicode_Decode(word, strlen(word), */ __pyx_t_13 = PyUnicode_FromString(__pyx_v_word); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 621; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __Pyx_XDECREF_SET(__pyx_v_name, __pyx_t_13); __pyx_t_13 = 0; goto __pyx_L14; } /*else*/ { /* "pandas/parser.pyx":623 * name = PyUnicode_FromString(word) * else: * name = PyUnicode_Decode(word, strlen(word), # <<<<<<<<<<<<<< * self.c_encoding, errors) * */ __pyx_t_13 = PyUnicode_Decode(__pyx_v_word, strlen(__pyx_v_word), __pyx_v_self->c_encoding, __pyx_v_errors); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 623; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __Pyx_XDECREF_SET(__pyx_v_name, __pyx_t_13); __pyx_t_13 = 0; } __pyx_L14:; } __pyx_L13:; /* "pandas/parser.pyx":626 * self.c_encoding, errors) * * if name == '': # <<<<<<<<<<<<<< * if self.has_mi_columns: * name = 'Unnamed: %d_level_%d' % (i,level) */ __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_v_name, __pyx_kp_s__17, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 626; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__pyx_t_2) { /* "pandas/parser.pyx":627 * * if name == '': * if self.has_mi_columns: # <<<<<<<<<<<<<< * name = 'Unnamed: %d_level_%d' % (i,level) * else: */ __pyx_t_2 = (__pyx_v_self->has_mi_columns != 0); if (__pyx_t_2) { /* "pandas/parser.pyx":628 * if name == '': * if self.has_mi_columns: * name = 'Unnamed: %d_level_%d' % (i,level) # <<<<<<<<<<<<<< * else: * name = 'Unnamed: %d' % i */ __pyx_t_13 = __Pyx_PyInt_FromSize_t(__pyx_v_i); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 628; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __pyx_t_9 = PyTuple_New(2); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 628; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_13); __Pyx_GIVEREF(__pyx_t_13); __Pyx_INCREF(__pyx_v_level); PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_v_level); __Pyx_GIVEREF(__pyx_v_level); __pyx_t_13 = 0; __pyx_t_13 = __Pyx_PyString_Format(__pyx_kp_s_Unnamed_d_level__d, __pyx_t_9); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 628; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF_SET(__pyx_v_name, __pyx_t_13); __pyx_t_13 = 0; goto __pyx_L16; } /*else*/ { /* "pandas/parser.pyx":630 * name = 'Unnamed: %d_level_%d' % (i,level) * else: * name = 'Unnamed: %d' % i # <<<<<<<<<<<<<< * unnamed_count += 1 * */ __pyx_t_13 = __Pyx_PyInt_FromSize_t(__pyx_v_i); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 630; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __pyx_t_9 = __Pyx_PyString_Format(__pyx_kp_s_Unnamed_d, __pyx_t_13); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 630; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_DECREF_SET(__pyx_v_name, __pyx_t_9); __pyx_t_9 = 0; } __pyx_L16:; /* "pandas/parser.pyx":631 * else: * name = 'Unnamed: %d' % i * unnamed_count += 1 # <<<<<<<<<<<<<< * * count = counts.get(name, 0) */ __pyx_v_unnamed_count = (__pyx_v_unnamed_count + 1); goto __pyx_L15; } __pyx_L15:; /* "pandas/parser.pyx":633 * unnamed_count += 1 * * count = counts.get(name, 0) # <<<<<<<<<<<<<< * if count > 0 and self.mangle_dupe_cols and not self.has_mi_columns: * this_header.append('%s.%d' % (name, count)) */ __pyx_t_9 = __Pyx_PyDict_GetItemDefault(__pyx_v_counts, __pyx_v_name, __pyx_int_0); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 633; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_XDECREF_SET(__pyx_v_count, __pyx_t_9); __pyx_t_9 = 0; /* "pandas/parser.pyx":634 * * count = counts.get(name, 0) * if count > 0 and self.mangle_dupe_cols and not self.has_mi_columns: # <<<<<<<<<<<<<< * this_header.append('%s.%d' % (name, count)) * else: */ __pyx_t_9 = PyObject_RichCompare(__pyx_v_count, __pyx_int_0, Py_GT); __Pyx_XGOTREF(__pyx_t_9); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 634; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 634; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; if (__pyx_t_2) { __pyx_t_15 = __Pyx_PyObject_IsTrue(__pyx_v_self->mangle_dupe_cols); if (unlikely(__pyx_t_15 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 634; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__pyx_t_15) { __pyx_t_8 = (!(__pyx_v_self->has_mi_columns != 0)); __pyx_t_16 = __pyx_t_8; } else { __pyx_t_16 = __pyx_t_15; } __pyx_t_15 = __pyx_t_16; } else { __pyx_t_15 = __pyx_t_2; } if (__pyx_t_15) { /* "pandas/parser.pyx":635 * count = counts.get(name, 0) * if count > 0 and self.mangle_dupe_cols and not self.has_mi_columns: * this_header.append('%s.%d' % (name, count)) # <<<<<<<<<<<<<< * else: * this_header.append(name) */ __pyx_t_9 = PyTuple_New(2); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 635; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_INCREF(__pyx_v_name); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_v_name); __Pyx_GIVEREF(__pyx_v_name); __Pyx_INCREF(__pyx_v_count); PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_v_count); __Pyx_GIVEREF(__pyx_v_count); __pyx_t_13 = __Pyx_PyString_Format(__pyx_kp_s_s_d, __pyx_t_9); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 635; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_17 = __Pyx_PyList_Append(__pyx_v_this_header, __pyx_t_13); if (unlikely(__pyx_t_17 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 635; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; goto __pyx_L17; } /*else*/ { /* "pandas/parser.pyx":637 * this_header.append('%s.%d' % (name, count)) * else: * this_header.append(name) # <<<<<<<<<<<<<< * counts[name] = count + 1 * */ __pyx_t_17 = __Pyx_PyList_Append(__pyx_v_this_header, __pyx_v_name); if (unlikely(__pyx_t_17 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 637; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_L17:; /* "pandas/parser.pyx":638 * else: * this_header.append(name) * counts[name] = count + 1 # <<<<<<<<<<<<<< * * if self.has_mi_columns: */ __pyx_t_13 = PyNumber_Add(__pyx_v_count, __pyx_int_1); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 638; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); if (unlikely(PyDict_SetItem(__pyx_v_counts, __pyx_v_name, __pyx_t_13) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 638; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; } /* "pandas/parser.pyx":640 * counts[name] = count + 1 * * if self.has_mi_columns: # <<<<<<<<<<<<<< * * # if we have grabbed an extra line, but its not in our format */ __pyx_t_15 = (__pyx_v_self->has_mi_columns != 0); if (__pyx_t_15) { /* "pandas/parser.pyx":645 * # so save in the buffer, and create an blank extra line for the rest of the * # parsing code * if hr == self.header[-1]: # <<<<<<<<<<<<<< * lc = len(this_header) * ic = len(self.index_col) if self.index_col is not None else 0 */ __pyx_t_13 = __Pyx_PyInt_FromSize_t(__pyx_v_hr); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 645; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __pyx_t_9 = __Pyx_GetItemInt(__pyx_v_self->header, -1, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(__pyx_t_9 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 645; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_9); __pyx_t_6 = PyObject_RichCompare(__pyx_t_13, __pyx_t_9, Py_EQ); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 645; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_15 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_15 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 645; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (__pyx_t_15) { /* "pandas/parser.pyx":646 * # parsing code * if hr == self.header[-1]: * lc = len(this_header) # <<<<<<<<<<<<<< * ic = len(self.index_col) if self.index_col is not None else 0 * if lc != unnamed_count and lc-ic > unnamed_count: */ __pyx_t_10 = PyList_GET_SIZE(__pyx_v_this_header); if (unlikely(__pyx_t_10 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 646; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_6 = PyInt_FromSsize_t(__pyx_t_10); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 646; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_XDECREF_SET(__pyx_v_lc, __pyx_t_6); __pyx_t_6 = 0; /* "pandas/parser.pyx":647 * if hr == self.header[-1]: * lc = len(this_header) * ic = len(self.index_col) if self.index_col is not None else 0 # <<<<<<<<<<<<<< * if lc != unnamed_count and lc-ic > unnamed_count: * hr -= 1 */ __pyx_t_15 = (__pyx_v_self->index_col != Py_None); if ((__pyx_t_15 != 0)) { __pyx_t_9 = __pyx_v_self->index_col; __Pyx_INCREF(__pyx_t_9); __pyx_t_10 = PyObject_Length(__pyx_t_9); if (unlikely(__pyx_t_10 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 647; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_9 = PyInt_FromSsize_t(__pyx_t_10); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 647; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_t_6 = __pyx_t_9; __pyx_t_9 = 0; } else { __Pyx_INCREF(__pyx_int_0); __pyx_t_6 = __pyx_int_0; } __Pyx_XDECREF_SET(__pyx_v_ic, __pyx_t_6); __pyx_t_6 = 0; /* "pandas/parser.pyx":648 * lc = len(this_header) * ic = len(self.index_col) if self.index_col is not None else 0 * if lc != unnamed_count and lc-ic > unnamed_count: # <<<<<<<<<<<<<< * hr -= 1 * self.parser_start -= 1 */ __pyx_t_6 = __Pyx_PyInt_FromSize_t(__pyx_v_unnamed_count); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 648; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_9 = PyObject_RichCompare(__pyx_v_lc, __pyx_t_6, Py_NE); __Pyx_XGOTREF(__pyx_t_9); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 648; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_15 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_15 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 648; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; if (__pyx_t_15) { __pyx_t_9 = PyNumber_Subtract(__pyx_v_lc, __pyx_v_ic); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 648; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_t_6 = __Pyx_PyInt_FromSize_t(__pyx_v_unnamed_count); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 648; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_13 = PyObject_RichCompare(__pyx_t_9, __pyx_t_6, Py_GT); __Pyx_XGOTREF(__pyx_t_13); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 648; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_13); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 648; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_16 = __pyx_t_2; } else { __pyx_t_16 = __pyx_t_15; } if (__pyx_t_16) { /* "pandas/parser.pyx":649 * ic = len(self.index_col) if self.index_col is not None else 0 * if lc != unnamed_count and lc-ic > unnamed_count: * hr -= 1 # <<<<<<<<<<<<<< * self.parser_start -= 1 * this_header = [ None ] * lc */ __pyx_v_hr = (__pyx_v_hr - 1); /* "pandas/parser.pyx":650 * if lc != unnamed_count and lc-ic > unnamed_count: * hr -= 1 * self.parser_start -= 1 # <<<<<<<<<<<<<< * this_header = [ None ] * lc * */ __pyx_v_self->parser_start = (__pyx_v_self->parser_start - 1); /* "pandas/parser.pyx":651 * hr -= 1 * self.parser_start -= 1 * this_header = [ None ] * lc # <<<<<<<<<<<<<< * * data_line = hr + 1 */ __pyx_t_13 = PyList_New(1); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 651; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __Pyx_INCREF(Py_None); PyList_SET_ITEM(__pyx_t_13, 0, Py_None); __Pyx_GIVEREF(Py_None); { PyObject* __pyx_temp = PyNumber_InPlaceMultiply(__pyx_t_13, __pyx_v_lc); if (unlikely(!__pyx_temp)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 651; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_temp); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = __pyx_temp; } __Pyx_DECREF_SET(__pyx_v_this_header, ((PyObject*)__pyx_t_13)); __pyx_t_13 = 0; goto __pyx_L20; } __pyx_L20:; goto __pyx_L19; } __pyx_L19:; goto __pyx_L18; } __pyx_L18:; /* "pandas/parser.pyx":653 * this_header = [ None ] * lc * * data_line = hr + 1 # <<<<<<<<<<<<<< * header.append(this_header) * */ __pyx_v_data_line = (__pyx_v_hr + 1); /* "pandas/parser.pyx":654 * * data_line = hr + 1 * header.append(this_header) # <<<<<<<<<<<<<< * * if self.names is not None: */ __pyx_t_17 = __Pyx_PyList_Append(__pyx_v_header, __pyx_v_this_header); if (unlikely(__pyx_t_17 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 654; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pandas/parser.pyx":656 * header.append(this_header) * * if self.names is not None: # <<<<<<<<<<<<<< * header = [ self.names ] * */ __pyx_t_16 = (__pyx_v_self->names != Py_None); __pyx_t_15 = (__pyx_t_16 != 0); if (__pyx_t_15) { /* "pandas/parser.pyx":657 * * if self.names is not None: * header = [ self.names ] # <<<<<<<<<<<<<< * * elif self.names is not None: */ __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 657; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_self->names); PyList_SET_ITEM(__pyx_t_1, 0, __pyx_v_self->names); __Pyx_GIVEREF(__pyx_v_self->names); __Pyx_DECREF_SET(__pyx_v_header, ((PyObject*)__pyx_t_1)); __pyx_t_1 = 0; goto __pyx_L21; } __pyx_L21:; goto __pyx_L3; } /* "pandas/parser.pyx":659 * header = [ self.names ] * * elif self.names is not None: # <<<<<<<<<<<<<< * # Enforce this unless usecols * if not self.has_usecols: */ __pyx_t_15 = (__pyx_v_self->names != Py_None); __pyx_t_16 = (__pyx_t_15 != 0); if (__pyx_t_16) { /* "pandas/parser.pyx":661 * elif self.names is not None: * # Enforce this unless usecols * if not self.has_usecols: # <<<<<<<<<<<<<< * self.parser.expected_fields = len(self.names) * */ __pyx_t_16 = ((!(__pyx_v_self->has_usecols != 0)) != 0); if (__pyx_t_16) { /* "pandas/parser.pyx":662 * # Enforce this unless usecols * if not self.has_usecols: * self.parser.expected_fields = len(self.names) # <<<<<<<<<<<<<< * * # Names passed */ __pyx_t_1 = __pyx_v_self->names; __Pyx_INCREF(__pyx_t_1); __pyx_t_4 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 662; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_self->parser->expected_fields = __pyx_t_4; goto __pyx_L22; } __pyx_L22:; /* "pandas/parser.pyx":665 * * # Names passed * if self.parser.lines < 1: # <<<<<<<<<<<<<< * self._tokenize_rows(1) * */ __pyx_t_16 = ((__pyx_v_self->parser->lines < 1) != 0); if (__pyx_t_16) { /* "pandas/parser.pyx":666 * # Names passed * if self.parser.lines < 1: * self._tokenize_rows(1) # <<<<<<<<<<<<<< * * header = [ self.names ] */ __pyx_t_1 = ((struct __pyx_vtabstruct_6pandas_6parser_TextReader *)__pyx_v_self->__pyx_vtab)->_tokenize_rows(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 666; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L23; } __pyx_L23:; /* "pandas/parser.pyx":668 * self._tokenize_rows(1) * * header = [ self.names ] # <<<<<<<<<<<<<< * data_line = 0 * */ __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 668; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_self->names); PyList_SET_ITEM(__pyx_t_1, 0, __pyx_v_self->names); __Pyx_GIVEREF(__pyx_v_self->names); __Pyx_DECREF_SET(__pyx_v_header, ((PyObject*)__pyx_t_1)); __pyx_t_1 = 0; /* "pandas/parser.pyx":669 * * header = [ self.names ] * data_line = 0 # <<<<<<<<<<<<<< * * if self.parser.lines < 1: */ __pyx_v_data_line = 0; /* "pandas/parser.pyx":671 * data_line = 0 * * if self.parser.lines < 1: # <<<<<<<<<<<<<< * field_count = len(header[0]) * else: */ __pyx_t_16 = ((__pyx_v_self->parser->lines < 1) != 0); if (__pyx_t_16) { /* "pandas/parser.pyx":672 * * if self.parser.lines < 1: * field_count = len(header[0]) # <<<<<<<<<<<<<< * else: * field_count = self.parser.line_fields[data_line] */ __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_header, 0, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 672; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 672; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_field_count = __pyx_t_4; goto __pyx_L24; } /*else*/ { /* "pandas/parser.pyx":674 * field_count = len(header[0]) * else: * field_count = self.parser.line_fields[data_line] # <<<<<<<<<<<<<< * else: * # No header passed nor to be found in the file */ __pyx_v_field_count = (__pyx_v_self->parser->line_fields[__pyx_v_data_line]); } __pyx_L24:; goto __pyx_L3; } /*else*/ { /* "pandas/parser.pyx":677 * else: * # No header passed nor to be found in the file * if self.parser.lines < 1: # <<<<<<<<<<<<<< * self._tokenize_rows(1) * */ __pyx_t_16 = ((__pyx_v_self->parser->lines < 1) != 0); if (__pyx_t_16) { /* "pandas/parser.pyx":678 * # No header passed nor to be found in the file * if self.parser.lines < 1: * self._tokenize_rows(1) # <<<<<<<<<<<<<< * * return None, self.parser.line_fields[0] */ __pyx_t_1 = ((struct __pyx_vtabstruct_6pandas_6parser_TextReader *)__pyx_v_self->__pyx_vtab)->_tokenize_rows(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 678; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L25; } __pyx_L25:; /* "pandas/parser.pyx":680 * self._tokenize_rows(1) * * return None, self.parser.line_fields[0] # <<<<<<<<<<<<<< * * # Corner case, not enough lines in the file */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyInt_From_int((__pyx_v_self->parser->line_fields[0])); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 680; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 680; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(Py_None); PyTuple_SET_ITEM(__pyx_t_3, 0, Py_None); __Pyx_GIVEREF(Py_None); PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; } __pyx_L3:; /* "pandas/parser.pyx":683 * * # Corner case, not enough lines in the file * if self.parser.lines < data_line + 1: # <<<<<<<<<<<<<< * field_count = len(header[0]) * else: # not self.has_usecols: */ __pyx_t_16 = ((__pyx_v_self->parser->lines < (__pyx_v_data_line + 1)) != 0); if (__pyx_t_16) { /* "pandas/parser.pyx":684 * # Corner case, not enough lines in the file * if self.parser.lines < data_line + 1: * field_count = len(header[0]) # <<<<<<<<<<<<<< * else: # not self.has_usecols: * */ __pyx_t_3 = __Pyx_GetItemInt_List(__pyx_v_header, 0, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(__pyx_t_3 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 684; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PyObject_Length(__pyx_t_3); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 684; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_field_count = __pyx_t_4; goto __pyx_L26; } /*else*/ { /* "pandas/parser.pyx":687 * else: # not self.has_usecols: * * field_count = self.parser.line_fields[data_line] # <<<<<<<<<<<<<< * * # #2981 */ __pyx_v_field_count = (__pyx_v_self->parser->line_fields[__pyx_v_data_line]); /* "pandas/parser.pyx":690 * * # #2981 * if self.names is not None: # <<<<<<<<<<<<<< * field_count = max(field_count, len(self.names)) * */ __pyx_t_16 = (__pyx_v_self->names != Py_None); __pyx_t_15 = (__pyx_t_16 != 0); if (__pyx_t_15) { /* "pandas/parser.pyx":691 * # #2981 * if self.names is not None: * field_count = max(field_count, len(self.names)) # <<<<<<<<<<<<<< * * passed_count = len(header[0]) */ __pyx_t_3 = __pyx_v_self->names; __Pyx_INCREF(__pyx_t_3); __pyx_t_4 = PyObject_Length(__pyx_t_3); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 691; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_7 = __pyx_v_field_count; if (((__pyx_t_4 > __pyx_t_7) != 0)) { __pyx_t_14 = __pyx_t_4; } else { __pyx_t_14 = __pyx_t_7; } __pyx_v_field_count = __pyx_t_14; goto __pyx_L27; } __pyx_L27:; /* "pandas/parser.pyx":693 * field_count = max(field_count, len(self.names)) * * passed_count = len(header[0]) # <<<<<<<<<<<<<< * * # if passed_count > field_count: */ __pyx_t_3 = __Pyx_GetItemInt_List(__pyx_v_header, 0, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(__pyx_t_3 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 693; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PyObject_Length(__pyx_t_3); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 693; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_passed_count = __pyx_t_4; /* "pandas/parser.pyx":700 * # % (passed_count, field_count)) * * if self.has_usecols: # <<<<<<<<<<<<<< * nuse = len(self.usecols) * if nuse == passed_count: */ __pyx_t_15 = (__pyx_v_self->has_usecols != 0); if (__pyx_t_15) { /* "pandas/parser.pyx":701 * * if self.has_usecols: * nuse = len(self.usecols) # <<<<<<<<<<<<<< * if nuse == passed_count: * self.leading_cols = 0 */ __pyx_t_3 = __pyx_v_self->usecols; __Pyx_INCREF(__pyx_t_3); if (unlikely(__pyx_t_3 == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 701; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_4 = PySet_Size(__pyx_t_3); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 701; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_nuse = __pyx_t_4; /* "pandas/parser.pyx":702 * if self.has_usecols: * nuse = len(self.usecols) * if nuse == passed_count: # <<<<<<<<<<<<<< * self.leading_cols = 0 * elif self.names is None and nuse < passed_count: */ __pyx_t_15 = ((__pyx_v_nuse == __pyx_v_passed_count) != 0); if (__pyx_t_15) { /* "pandas/parser.pyx":703 * nuse = len(self.usecols) * if nuse == passed_count: * self.leading_cols = 0 # <<<<<<<<<<<<<< * elif self.names is None and nuse < passed_count: * self.leading_cols = field_count - passed_count */ __pyx_v_self->leading_cols = 0; goto __pyx_L29; } /* "pandas/parser.pyx":704 * if nuse == passed_count: * self.leading_cols = 0 * elif self.names is None and nuse < passed_count: # <<<<<<<<<<<<<< * self.leading_cols = field_count - passed_count * elif passed_count != field_count: */ __pyx_t_15 = (__pyx_v_self->names == Py_None); if ((__pyx_t_15 != 0)) { __pyx_t_16 = ((__pyx_v_nuse < __pyx_v_passed_count) != 0); __pyx_t_2 = __pyx_t_16; } else { __pyx_t_2 = (__pyx_t_15 != 0); } if (__pyx_t_2) { /* "pandas/parser.pyx":705 * self.leading_cols = 0 * elif self.names is None and nuse < passed_count: * self.leading_cols = field_count - passed_count # <<<<<<<<<<<<<< * elif passed_count != field_count: * raise ValueError('Passed header names ' */ __pyx_v_self->leading_cols = (__pyx_v_field_count - __pyx_v_passed_count); goto __pyx_L29; } /* "pandas/parser.pyx":706 * elif self.names is None and nuse < passed_count: * self.leading_cols = field_count - passed_count * elif passed_count != field_count: # <<<<<<<<<<<<<< * raise ValueError('Passed header names ' * 'mismatches usecols') */ __pyx_t_2 = ((__pyx_v_passed_count != __pyx_v_field_count) != 0); if (__pyx_t_2) { /* "pandas/parser.pyx":707 * self.leading_cols = field_count - passed_count * elif passed_count != field_count: * raise ValueError('Passed header names ' # <<<<<<<<<<<<<< * 'mismatches usecols') * # oh boy, #2442, #2981 */ __pyx_t_3 = PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__18, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 707; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 707; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_L29:; goto __pyx_L28; } /* "pandas/parser.pyx":710 * 'mismatches usecols') * # oh boy, #2442, #2981 * elif self.allow_leading_cols and passed_count < field_count: # <<<<<<<<<<<<<< * self.leading_cols = field_count - passed_count * */ __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_self->allow_leading_cols); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 710; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__pyx_t_2) { __pyx_t_15 = (__pyx_v_passed_count < __pyx_v_field_count); __pyx_t_16 = __pyx_t_15; } else { __pyx_t_16 = __pyx_t_2; } if (__pyx_t_16) { /* "pandas/parser.pyx":711 * # oh boy, #2442, #2981 * elif self.allow_leading_cols and passed_count < field_count: * self.leading_cols = field_count - passed_count # <<<<<<<<<<<<<< * * return header, field_count */ __pyx_v_self->leading_cols = (__pyx_v_field_count - __pyx_v_passed_count); goto __pyx_L28; } __pyx_L28:; } __pyx_L26:; /* "pandas/parser.pyx":713 * self.leading_cols = field_count - passed_count * * return header, field_count # <<<<<<<<<<<<<< * * cdef _implicit_index_count(self): */ __Pyx_XDECREF(__pyx_r); __pyx_t_3 = __Pyx_PyInt_FromSize_t(__pyx_v_field_count); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 713; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 713; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_header); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_header); __Pyx_GIVEREF(__pyx_v_header); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "pandas/parser.pyx":577 * ' got %s type' % type(source)) * * cdef _get_header(self): # <<<<<<<<<<<<<< * # header is now a list of lists, so field_count should use header[0] * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_9); __Pyx_XDECREF(__pyx_t_12); __Pyx_XDECREF(__pyx_t_13); __Pyx_AddTraceback("pandas.parser.TextReader._get_header", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_name); __Pyx_XDECREF(__pyx_v_header); __Pyx_XDECREF(__pyx_v_level); __Pyx_XDECREF(__pyx_v_this_header); __Pyx_XDECREF(__pyx_v_msg); __Pyx_XDECREF(__pyx_v_counts); __Pyx_XDECREF(__pyx_v_count); __Pyx_XDECREF(__pyx_v_lc); __Pyx_XDECREF(__pyx_v_ic); __Pyx_XDECREF(__pyx_v_m); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/parser.pyx":715 * return header, field_count * * cdef _implicit_index_count(self): # <<<<<<<<<<<<<< * pass * */ static PyObject *__pyx_f_6pandas_6parser_10TextReader__implicit_index_count(CYTHON_UNUSED struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_implicit_index_count", 0); /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/parser.pyx":718 * pass * * def read(self, rows=None): # <<<<<<<<<<<<<< * """ * rows=None --> read all rows */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_6parser_10TextReader_9read(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6pandas_6parser_10TextReader_8read[] = "\n rows=None --> read all rows\n "; static PyObject *__pyx_pw_6pandas_6parser_10TextReader_9read(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_rows = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("read (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_rows,0}; PyObject* values[1] = {0}; values[0] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_rows); if (value) { values[0] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "read") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 718; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_rows = values[0]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("read", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 718; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.parser.TextReader.read", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pandas_6parser_10TextReader_8read(((struct __pyx_obj_6pandas_6parser_TextReader *)__pyx_v_self), __pyx_v_rows); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_6parser_10TextReader_8read(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self, PyObject *__pyx_v_rows) { PyObject *__pyx_v_columns = NULL; PyObject *__pyx_v_result = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("read", 0); /* "pandas/parser.pyx":725 * int status * * if self.low_memory: # <<<<<<<<<<<<<< * # Conserve intermediate space * columns = self._read_low_memory(rows) */ __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_self->low_memory); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 725; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__pyx_t_1) { /* "pandas/parser.pyx":727 * if self.low_memory: * # Conserve intermediate space * columns = self._read_low_memory(rows) # <<<<<<<<<<<<<< * else: * # Don't care about memory usage */ __pyx_t_2 = ((struct __pyx_vtabstruct_6pandas_6parser_TextReader *)__pyx_v_self->__pyx_vtab)->_read_low_memory(__pyx_v_self, __pyx_v_rows); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 727; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_v_columns = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L3; } /*else*/ { /* "pandas/parser.pyx":730 * else: * # Don't care about memory usage * columns = self._read_rows(rows, 1) # <<<<<<<<<<<<<< * * if self.as_recarray: */ __pyx_t_2 = ((struct __pyx_vtabstruct_6pandas_6parser_TextReader *)__pyx_v_self->__pyx_vtab)->_read_rows(__pyx_v_self, __pyx_v_rows, 1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 730; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_v_columns = __pyx_t_2; __pyx_t_2 = 0; } __pyx_L3:; /* "pandas/parser.pyx":732 * columns = self._read_rows(rows, 1) * * if self.as_recarray: # <<<<<<<<<<<<<< * self._start_clock() * result = _to_structured_array(columns, self.header) */ __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_self->as_recarray); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 732; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__pyx_t_1) { /* "pandas/parser.pyx":733 * * if self.as_recarray: * self._start_clock() # <<<<<<<<<<<<<< * result = _to_structured_array(columns, self.header) * self._end_clock('Conversion to structured array') */ __pyx_t_2 = ((struct __pyx_vtabstruct_6pandas_6parser_TextReader *)__pyx_v_self->__pyx_vtab)->_start_clock(__pyx_v_self); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 733; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/parser.pyx":734 * if self.as_recarray: * self._start_clock() * result = _to_structured_array(columns, self.header) # <<<<<<<<<<<<<< * self._end_clock('Conversion to structured array') * */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_to_structured_array); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 734; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 734; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_v_columns); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_columns); __Pyx_GIVEREF(__pyx_v_columns); __Pyx_INCREF(__pyx_v_self->header); PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_self->header); __Pyx_GIVEREF(__pyx_v_self->header); __pyx_t_4 = PyObject_Call(__pyx_t_2, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 734; __pyx_clineno = __LINE__; goto __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_result = __pyx_t_4; __pyx_t_4 = 0; /* "pandas/parser.pyx":735 * self._start_clock() * result = _to_structured_array(columns, self.header) * self._end_clock('Conversion to structured array') # <<<<<<<<<<<<<< * * return result */ __pyx_t_4 = ((struct __pyx_vtabstruct_6pandas_6parser_TextReader *)__pyx_v_self->__pyx_vtab)->_end_clock(__pyx_v_self, __pyx_kp_s_Conversion_to_structured_array); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 735; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "pandas/parser.pyx":737 * self._end_clock('Conversion to structured array') * * return result # <<<<<<<<<<<<<< * else: * return columns */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_result); __pyx_r = __pyx_v_result; goto __pyx_L0; } /*else*/ { /* "pandas/parser.pyx":739 * return result * else: * return columns # <<<<<<<<<<<<<< * * cdef _read_low_memory(self, rows): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_columns); __pyx_r = __pyx_v_columns; goto __pyx_L0; } /* "pandas/parser.pyx":718 * pass * * def read(self, rows=None): # <<<<<<<<<<<<<< * """ * rows=None --> read all rows */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("pandas.parser.TextReader.read", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_columns); __Pyx_XDECREF(__pyx_v_result); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/parser.pyx":741 * return columns * * cdef _read_low_memory(self, rows): # <<<<<<<<<<<<<< * cdef: * size_t rows_read = 0 */ static PyObject *__pyx_f_6pandas_6parser_10TextReader__read_low_memory(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self, PyObject *__pyx_v_rows) { size_t __pyx_v_rows_read; PyObject *__pyx_v_chunks = 0; PyObject *__pyx_v_chunk = NULL; PyObject *__pyx_v_crows = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; Py_ssize_t __pyx_t_8; int __pyx_t_9; int __pyx_t_10; PyObject *__pyx_t_11 = NULL; PyObject *__pyx_t_12 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_read_low_memory", 0); /* "pandas/parser.pyx":743 * cdef _read_low_memory(self, rows): * cdef: * size_t rows_read = 0 # <<<<<<<<<<<<<< * chunks = [] * */ __pyx_v_rows_read = 0; /* "pandas/parser.pyx":744 * cdef: * size_t rows_read = 0 * chunks = [] # <<<<<<<<<<<<<< * * if rows is None: */ __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 744; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_v_chunks = __pyx_t_1; __pyx_t_1 = 0; /* "pandas/parser.pyx":746 * chunks = [] * * if rows is None: # <<<<<<<<<<<<<< * while True: * try: */ __pyx_t_2 = (__pyx_v_rows == Py_None); __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { /* "pandas/parser.pyx":747 * * if rows is None: * while True: # <<<<<<<<<<<<<< * try: * chunk = self._read_rows(self.buffer_lines, 0) */ while (1) { /* "pandas/parser.pyx":748 * if rows is None: * while True: * try: # <<<<<<<<<<<<<< * chunk = self._read_rows(self.buffer_lines, 0) * if len(chunk) == 0: */ { __Pyx_ExceptionSave(&__pyx_t_4, &__pyx_t_5, &__pyx_t_6); __Pyx_XGOTREF(__pyx_t_4); __Pyx_XGOTREF(__pyx_t_5); __Pyx_XGOTREF(__pyx_t_6); /*try:*/ { /* "pandas/parser.pyx":749 * while True: * try: * chunk = self._read_rows(self.buffer_lines, 0) # <<<<<<<<<<<<<< * if len(chunk) == 0: * break */ __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->buffer_lines); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 749; __pyx_clineno = __LINE__; goto __pyx_L6_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_7 = ((struct __pyx_vtabstruct_6pandas_6parser_TextReader *)__pyx_v_self->__pyx_vtab)->_read_rows(__pyx_v_self, __pyx_t_1, 0); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 749; __pyx_clineno = __LINE__; goto __pyx_L6_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF_SET(__pyx_v_chunk, __pyx_t_7); __pyx_t_7 = 0; /* "pandas/parser.pyx":750 * try: * chunk = self._read_rows(self.buffer_lines, 0) * if len(chunk) == 0: # <<<<<<<<<<<<<< * break * except StopIteration: */ __pyx_t_8 = PyObject_Length(__pyx_v_chunk); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 750; __pyx_clineno = __LINE__; goto __pyx_L6_error;} __pyx_t_3 = ((__pyx_t_8 == 0) != 0); if (__pyx_t_3) { /* "pandas/parser.pyx":751 * chunk = self._read_rows(self.buffer_lines, 0) * if len(chunk) == 0: * break # <<<<<<<<<<<<<< * except StopIteration: * break */ goto __pyx_L11_try_break; } } /*else:*/ { /* "pandas/parser.pyx":755 * break * else: * chunks.append(chunk) # <<<<<<<<<<<<<< * else: * while rows_read < rows: */ __pyx_t_9 = __Pyx_PyObject_Append(__pyx_v_chunks, __pyx_v_chunk); if (unlikely(__pyx_t_9 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 755; __pyx_clineno = __LINE__; goto __pyx_L8_except_error;} } __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; goto __pyx_L13_try_end; __pyx_L6_error:; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; /* "pandas/parser.pyx":752 * if len(chunk) == 0: * break * except StopIteration: # <<<<<<<<<<<<<< * break * else: */ __pyx_t_10 = PyErr_ExceptionMatches(__pyx_builtin_StopIteration); if (__pyx_t_10) { __Pyx_AddTraceback("pandas.parser.TextReader._read_low_memory", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_7, &__pyx_t_1, &__pyx_t_11) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 752; __pyx_clineno = __LINE__; goto __pyx_L8_except_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_GOTREF(__pyx_t_1); __Pyx_GOTREF(__pyx_t_11); /* "pandas/parser.pyx":753 * break * except StopIteration: * break # <<<<<<<<<<<<<< * else: * chunks.append(chunk) */ goto __pyx_L15_except_break; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; goto __pyx_L7_exception_handled; __pyx_L15_except_break:; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; goto __pyx_L11_try_break; } goto __pyx_L8_except_error; __pyx_L8_except_error:; __Pyx_XGIVEREF(__pyx_t_4); __Pyx_XGIVEREF(__pyx_t_5); __Pyx_XGIVEREF(__pyx_t_6); __Pyx_ExceptionReset(__pyx_t_4, __pyx_t_5, __pyx_t_6); goto __pyx_L1_error; __pyx_L11_try_break:; __Pyx_XGIVEREF(__pyx_t_4); __Pyx_XGIVEREF(__pyx_t_5); __Pyx_XGIVEREF(__pyx_t_6); __Pyx_ExceptionReset(__pyx_t_4, __pyx_t_5, __pyx_t_6); goto __pyx_L5_break; __pyx_L7_exception_handled:; __Pyx_XGIVEREF(__pyx_t_4); __Pyx_XGIVEREF(__pyx_t_5); __Pyx_XGIVEREF(__pyx_t_6); __Pyx_ExceptionReset(__pyx_t_4, __pyx_t_5, __pyx_t_6); __pyx_L13_try_end:; } } __pyx_L5_break:; goto __pyx_L3; } /*else*/ { /* "pandas/parser.pyx":757 * chunks.append(chunk) * else: * while rows_read < rows: # <<<<<<<<<<<<<< * try: * crows = min(self.buffer_lines, rows - rows_read) */ while (1) { __pyx_t_11 = __Pyx_PyInt_FromSize_t(__pyx_v_rows_read); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 757; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __pyx_t_1 = PyObject_RichCompare(__pyx_t_11, __pyx_v_rows, Py_LT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 757; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 757; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (!__pyx_t_3) break; /* "pandas/parser.pyx":758 * else: * while rows_read < rows: * try: # <<<<<<<<<<<<<< * crows = min(self.buffer_lines, rows - rows_read) * */ { __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_5, &__pyx_t_4); __Pyx_XGOTREF(__pyx_t_6); __Pyx_XGOTREF(__pyx_t_5); __Pyx_XGOTREF(__pyx_t_4); /*try:*/ { /* "pandas/parser.pyx":759 * while rows_read < rows: * try: * crows = min(self.buffer_lines, rows - rows_read) # <<<<<<<<<<<<<< * * chunk = self._read_rows(crows, 0) */ __pyx_t_1 = __Pyx_PyInt_FromSize_t(__pyx_v_rows_read); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 759; __pyx_clineno = __LINE__; goto __pyx_L19_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_11 = PyNumber_Subtract(__pyx_v_rows, __pyx_t_1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 759; __pyx_clineno = __LINE__; goto __pyx_L19_error;} __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_10 = __pyx_v_self->buffer_lines; __pyx_t_7 = __Pyx_PyInt_From_int(__pyx_t_10); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 759; __pyx_clineno = __LINE__; goto __pyx_L19_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_t_12 = PyObject_RichCompare(__pyx_t_11, __pyx_t_7, Py_LT); __Pyx_XGOTREF(__pyx_t_12); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 759; __pyx_clineno = __LINE__; goto __pyx_L19_error;} __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_12); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 759; __pyx_clineno = __LINE__; goto __pyx_L19_error;} __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; if (__pyx_t_3) { __Pyx_INCREF(__pyx_t_11); __pyx_t_1 = __pyx_t_11; } else { __pyx_t_12 = __Pyx_PyInt_From_int(__pyx_t_10); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 759; __pyx_clineno = __LINE__; goto __pyx_L19_error;} __Pyx_GOTREF(__pyx_t_12); __pyx_t_1 = __pyx_t_12; __pyx_t_12 = 0; } __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __pyx_t_11 = __pyx_t_1; __Pyx_INCREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF_SET(__pyx_v_crows, __pyx_t_11); __pyx_t_11 = 0; /* "pandas/parser.pyx":761 * crows = min(self.buffer_lines, rows - rows_read) * * chunk = self._read_rows(crows, 0) # <<<<<<<<<<<<<< * if len(chunk) == 0: * break */ __pyx_t_11 = ((struct __pyx_vtabstruct_6pandas_6parser_TextReader *)__pyx_v_self->__pyx_vtab)->_read_rows(__pyx_v_self, __pyx_v_crows, 0); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 761; __pyx_clineno = __LINE__; goto __pyx_L19_error;} __Pyx_GOTREF(__pyx_t_11); __Pyx_XDECREF_SET(__pyx_v_chunk, __pyx_t_11); __pyx_t_11 = 0; /* "pandas/parser.pyx":762 * * chunk = self._read_rows(crows, 0) * if len(chunk) == 0: # <<<<<<<<<<<<<< * break * */ __pyx_t_8 = PyObject_Length(__pyx_v_chunk); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 762; __pyx_clineno = __LINE__; goto __pyx_L19_error;} __pyx_t_3 = ((__pyx_t_8 == 0) != 0); if (__pyx_t_3) { /* "pandas/parser.pyx":763 * chunk = self._read_rows(crows, 0) * if len(chunk) == 0: * break # <<<<<<<<<<<<<< * * rows_read += len(list(chunk.values())[0]) */ goto __pyx_L24_try_break; } /* "pandas/parser.pyx":765 * break * * rows_read += len(list(chunk.values())[0]) # <<<<<<<<<<<<<< * except StopIteration: * break */ __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_chunk, __pyx_n_s_values); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 765; __pyx_clineno = __LINE__; goto __pyx_L19_error;} __Pyx_GOTREF(__pyx_t_11); __pyx_t_1 = PyObject_Call(__pyx_t_11, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 765; __pyx_clineno = __LINE__; goto __pyx_L19_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __pyx_t_11 = PyTuple_New(1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 765; __pyx_clineno = __LINE__; goto __pyx_L19_error;} __Pyx_GOTREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)(&PyList_Type))), __pyx_t_11, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 765; __pyx_clineno = __LINE__; goto __pyx_L19_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __pyx_t_11 = __Pyx_GetItemInt_List(__pyx_t_1, 0, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(__pyx_t_11 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 765; __pyx_clineno = __LINE__; goto __pyx_L19_error;}; __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_8 = PyObject_Length(__pyx_t_11); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 765; __pyx_clineno = __LINE__; goto __pyx_L19_error;} __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __pyx_v_rows_read = (__pyx_v_rows_read + __pyx_t_8); } /*else:*/ { /* "pandas/parser.pyx":769 * break * else: * chunks.append(chunk) # <<<<<<<<<<<<<< * * parser_trim_buffers(self.parser) */ __pyx_t_9 = __Pyx_PyObject_Append(__pyx_v_chunks, __pyx_v_chunk); if (unlikely(__pyx_t_9 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 769; __pyx_clineno = __LINE__; goto __pyx_L21_except_error;} } __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; goto __pyx_L26_try_end; __pyx_L19_error:; __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; /* "pandas/parser.pyx":766 * * rows_read += len(list(chunk.values())[0]) * except StopIteration: # <<<<<<<<<<<<<< * break * else: */ __pyx_t_10 = PyErr_ExceptionMatches(__pyx_builtin_StopIteration); if (__pyx_t_10) { __Pyx_AddTraceback("pandas.parser.TextReader._read_low_memory", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_11, &__pyx_t_1, &__pyx_t_12) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 766; __pyx_clineno = __LINE__; goto __pyx_L21_except_error;} __Pyx_GOTREF(__pyx_t_11); __Pyx_GOTREF(__pyx_t_1); __Pyx_GOTREF(__pyx_t_12); /* "pandas/parser.pyx":767 * rows_read += len(list(chunk.values())[0]) * except StopIteration: * break # <<<<<<<<<<<<<< * else: * chunks.append(chunk) */ goto __pyx_L28_except_break; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; goto __pyx_L20_exception_handled; __pyx_L28_except_break:; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; goto __pyx_L24_try_break; } goto __pyx_L21_except_error; __pyx_L21_except_error:; __Pyx_XGIVEREF(__pyx_t_6); __Pyx_XGIVEREF(__pyx_t_5); __Pyx_XGIVEREF(__pyx_t_4); __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_5, __pyx_t_4); goto __pyx_L1_error; __pyx_L24_try_break:; __Pyx_XGIVEREF(__pyx_t_6); __Pyx_XGIVEREF(__pyx_t_5); __Pyx_XGIVEREF(__pyx_t_4); __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_5, __pyx_t_4); goto __pyx_L18_break; __pyx_L20_exception_handled:; __Pyx_XGIVEREF(__pyx_t_6); __Pyx_XGIVEREF(__pyx_t_5); __Pyx_XGIVEREF(__pyx_t_4); __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_5, __pyx_t_4); __pyx_L26_try_end:; } } __pyx_L18_break:; } __pyx_L3:; /* "pandas/parser.pyx":771 * chunks.append(chunk) * * parser_trim_buffers(self.parser) # <<<<<<<<<<<<<< * * if len(chunks) == 0: */ parser_trim_buffers(__pyx_v_self->parser); /* "pandas/parser.pyx":773 * parser_trim_buffers(self.parser) * * if len(chunks) == 0: # <<<<<<<<<<<<<< * raise StopIteration * */ __pyx_t_8 = PyObject_Length(__pyx_v_chunks); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 773; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_3 = ((__pyx_t_8 == 0) != 0); if (__pyx_t_3) { /* "pandas/parser.pyx":774 * * if len(chunks) == 0: * raise StopIteration # <<<<<<<<<<<<<< * * # destructive to chunks */ __Pyx_Raise(__pyx_builtin_StopIteration, 0, 0, 0); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 774; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } /* "pandas/parser.pyx":777 * * # destructive to chunks * return _concatenate_chunks(chunks) # <<<<<<<<<<<<<< * * cdef _tokenize_rows(self, size_t nrows): */ __Pyx_XDECREF(__pyx_r); __pyx_t_12 = __Pyx_GetModuleGlobalName(__pyx_n_s_concatenate_chunks); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 777; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 777; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_chunks); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_chunks); __Pyx_GIVEREF(__pyx_v_chunks); __pyx_t_11 = PyObject_Call(__pyx_t_12, __pyx_t_1, NULL); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 777; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_11; __pyx_t_11 = 0; goto __pyx_L0; /* "pandas/parser.pyx":741 * return columns * * cdef _read_low_memory(self, rows): # <<<<<<<<<<<<<< * cdef: * size_t rows_read = 0 */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_11); __Pyx_XDECREF(__pyx_t_12); __Pyx_AddTraceback("pandas.parser.TextReader._read_low_memory", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_chunks); __Pyx_XDECREF(__pyx_v_chunk); __Pyx_XDECREF(__pyx_v_crows); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/parser.pyx":779 * return _concatenate_chunks(chunks) * * cdef _tokenize_rows(self, size_t nrows): # <<<<<<<<<<<<<< * cdef int status * status = tokenize_nrows(self.parser, nrows) */ static PyObject *__pyx_f_6pandas_6parser_10TextReader__tokenize_rows(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self, size_t __pyx_v_nrows) { int __pyx_v_status; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_tokenize_rows", 0); /* "pandas/parser.pyx":781 * cdef _tokenize_rows(self, size_t nrows): * cdef int status * status = tokenize_nrows(self.parser, nrows) # <<<<<<<<<<<<<< * * if self.parser.warn_msg != NULL: */ __pyx_v_status = tokenize_nrows(__pyx_v_self->parser, __pyx_v_nrows); /* "pandas/parser.pyx":783 * status = tokenize_nrows(self.parser, nrows) * * if self.parser.warn_msg != NULL: # <<<<<<<<<<<<<< * print >> sys.stderr, self.parser.warn_msg * free(self.parser.warn_msg) */ __pyx_t_1 = ((__pyx_v_self->parser->warn_msg != NULL) != 0); if (__pyx_t_1) { /* "pandas/parser.pyx":784 * * if self.parser.warn_msg != NULL: * print >> sys.stderr, self.parser.warn_msg # <<<<<<<<<<<<<< * free(self.parser.warn_msg) * self.parser.warn_msg = NULL */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_sys); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 784; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_stderr); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 784; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyBytes_FromString(__pyx_v_self->parser->warn_msg); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 784; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (__Pyx_PrintOne(__pyx_t_3, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 784; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/parser.pyx":785 * if self.parser.warn_msg != NULL: * print >> sys.stderr, self.parser.warn_msg * free(self.parser.warn_msg) # <<<<<<<<<<<<<< * self.parser.warn_msg = NULL * */ free(__pyx_v_self->parser->warn_msg); /* "pandas/parser.pyx":786 * print >> sys.stderr, self.parser.warn_msg * free(self.parser.warn_msg) * self.parser.warn_msg = NULL # <<<<<<<<<<<<<< * * if status < 0: */ __pyx_v_self->parser->warn_msg = NULL; goto __pyx_L3; } __pyx_L3:; /* "pandas/parser.pyx":788 * self.parser.warn_msg = NULL * * if status < 0: # <<<<<<<<<<<<<< * raise_parser_error('Error tokenizing data', self.parser) * */ __pyx_t_1 = ((__pyx_v_status < 0) != 0); if (__pyx_t_1) { /* "pandas/parser.pyx":789 * * if status < 0: * raise_parser_error('Error tokenizing data', self.parser) # <<<<<<<<<<<<<< * * cdef _read_rows(self, rows, bint trim): */ __pyx_t_3 = __pyx_f_6pandas_6parser_raise_parser_error(__pyx_kp_s_Error_tokenizing_data, __pyx_v_self->parser); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 789; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L4; } __pyx_L4:; /* "pandas/parser.pyx":779 * return _concatenate_chunks(chunks) * * cdef _tokenize_rows(self, size_t nrows): # <<<<<<<<<<<<<< * cdef int status * status = tokenize_nrows(self.parser, nrows) */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("pandas.parser.TextReader._tokenize_rows", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/parser.pyx":791 * raise_parser_error('Error tokenizing data', self.parser) * * cdef _read_rows(self, rows, bint trim): # <<<<<<<<<<<<<< * cdef: * int buffered_lines */ static PyObject *__pyx_f_6pandas_6parser_10TextReader__read_rows(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self, PyObject *__pyx_v_rows, int __pyx_v_trim) { int __pyx_v_buffered_lines; int __pyx_v_irows; int __pyx_v_footer; int __pyx_v_status; PyObject *__pyx_v_columns = NULL; PyObject *__pyx_v_rows_read = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; int __pyx_t_3; int __pyx_t_4; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; Py_ssize_t __pyx_t_7; size_t __pyx_t_8; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_read_rows", 0); /* "pandas/parser.pyx":794 * cdef: * int buffered_lines * int irows, footer = 0 # <<<<<<<<<<<<<< * * self._start_clock() */ __pyx_v_footer = 0; /* "pandas/parser.pyx":796 * int irows, footer = 0 * * self._start_clock() # <<<<<<<<<<<<<< * * if rows is not None: */ __pyx_t_1 = ((struct __pyx_vtabstruct_6pandas_6parser_TextReader *)__pyx_v_self->__pyx_vtab)->_start_clock(__pyx_v_self); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 796; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pandas/parser.pyx":798 * self._start_clock() * * if rows is not None: # <<<<<<<<<<<<<< * irows = rows * buffered_lines = self.parser.lines - self.parser_start */ __pyx_t_2 = (__pyx_v_rows != Py_None); __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { /* "pandas/parser.pyx":799 * * if rows is not None: * irows = rows # <<<<<<<<<<<<<< * buffered_lines = self.parser.lines - self.parser_start * if buffered_lines < irows: */ __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_v_rows); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 799; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_irows = __pyx_t_4; /* "pandas/parser.pyx":800 * if rows is not None: * irows = rows * buffered_lines = self.parser.lines - self.parser_start # <<<<<<<<<<<<<< * if buffered_lines < irows: * self._tokenize_rows(irows - buffered_lines) */ __pyx_v_buffered_lines = (__pyx_v_self->parser->lines - __pyx_v_self->parser_start); /* "pandas/parser.pyx":801 * irows = rows * buffered_lines = self.parser.lines - self.parser_start * if buffered_lines < irows: # <<<<<<<<<<<<<< * self._tokenize_rows(irows - buffered_lines) * */ __pyx_t_3 = ((__pyx_v_buffered_lines < __pyx_v_irows) != 0); if (__pyx_t_3) { /* "pandas/parser.pyx":802 * buffered_lines = self.parser.lines - self.parser_start * if buffered_lines < irows: * self._tokenize_rows(irows - buffered_lines) # <<<<<<<<<<<<<< * * if self.skip_footer > 0: */ __pyx_t_1 = ((struct __pyx_vtabstruct_6pandas_6parser_TextReader *)__pyx_v_self->__pyx_vtab)->_tokenize_rows(__pyx_v_self, (__pyx_v_irows - __pyx_v_buffered_lines)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 802; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L4; } __pyx_L4:; /* "pandas/parser.pyx":804 * self._tokenize_rows(irows - buffered_lines) * * if self.skip_footer > 0: # <<<<<<<<<<<<<< * raise ValueError('skip_footer can only be used to read ' * 'the whole file') */ __pyx_t_3 = ((__pyx_v_self->skip_footer > 0) != 0); if (__pyx_t_3) { /* "pandas/parser.pyx":805 * * if self.skip_footer > 0: * raise ValueError('skip_footer can only be used to read ' # <<<<<<<<<<<<<< * 'the whole file') * else: */ __pyx_t_1 = PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__19, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 805; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 805; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } goto __pyx_L3; } /*else*/ { /* "pandas/parser.pyx":808 * 'the whole file') * else: * status = tokenize_all_rows(self.parser) # <<<<<<<<<<<<<< * * if self.parser.warn_msg != NULL: */ __pyx_v_status = tokenize_all_rows(__pyx_v_self->parser); /* "pandas/parser.pyx":810 * status = tokenize_all_rows(self.parser) * * if self.parser.warn_msg != NULL: # <<<<<<<<<<<<<< * print >> sys.stderr, self.parser.warn_msg * free(self.parser.warn_msg) */ __pyx_t_3 = ((__pyx_v_self->parser->warn_msg != NULL) != 0); if (__pyx_t_3) { /* "pandas/parser.pyx":811 * * if self.parser.warn_msg != NULL: * print >> sys.stderr, self.parser.warn_msg # <<<<<<<<<<<<<< * free(self.parser.warn_msg) * self.parser.warn_msg = NULL */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_sys); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 811; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_stderr); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 811; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_PyBytes_FromString(__pyx_v_self->parser->warn_msg); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 811; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (__Pyx_PrintOne(__pyx_t_5, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 811; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "pandas/parser.pyx":812 * if self.parser.warn_msg != NULL: * print >> sys.stderr, self.parser.warn_msg * free(self.parser.warn_msg) # <<<<<<<<<<<<<< * self.parser.warn_msg = NULL * */ free(__pyx_v_self->parser->warn_msg); /* "pandas/parser.pyx":813 * print >> sys.stderr, self.parser.warn_msg * free(self.parser.warn_msg) * self.parser.warn_msg = NULL # <<<<<<<<<<<<<< * * if status < 0: */ __pyx_v_self->parser->warn_msg = NULL; goto __pyx_L6; } __pyx_L6:; /* "pandas/parser.pyx":815 * self.parser.warn_msg = NULL * * if status < 0: # <<<<<<<<<<<<<< * raise_parser_error('Error tokenizing data', self.parser) * footer = self.skip_footer */ __pyx_t_3 = ((__pyx_v_status < 0) != 0); if (__pyx_t_3) { /* "pandas/parser.pyx":816 * * if status < 0: * raise_parser_error('Error tokenizing data', self.parser) # <<<<<<<<<<<<<< * footer = self.skip_footer * */ __pyx_t_5 = __pyx_f_6pandas_6parser_raise_parser_error(__pyx_kp_s_Error_tokenizing_data, __pyx_v_self->parser); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 816; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; goto __pyx_L7; } __pyx_L7:; /* "pandas/parser.pyx":817 * if status < 0: * raise_parser_error('Error tokenizing data', self.parser) * footer = self.skip_footer # <<<<<<<<<<<<<< * * if self.parser_start == self.parser.lines: */ __pyx_t_4 = __pyx_v_self->skip_footer; __pyx_v_footer = __pyx_t_4; } __pyx_L3:; /* "pandas/parser.pyx":819 * footer = self.skip_footer * * if self.parser_start == self.parser.lines: # <<<<<<<<<<<<<< * raise StopIteration * self._end_clock('Tokenization') */ __pyx_t_3 = ((__pyx_v_self->parser_start == __pyx_v_self->parser->lines) != 0); if (__pyx_t_3) { /* "pandas/parser.pyx":820 * * if self.parser_start == self.parser.lines: * raise StopIteration # <<<<<<<<<<<<<< * self._end_clock('Tokenization') * */ __Pyx_Raise(__pyx_builtin_StopIteration, 0, 0, 0); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 820; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } /* "pandas/parser.pyx":821 * if self.parser_start == self.parser.lines: * raise StopIteration * self._end_clock('Tokenization') # <<<<<<<<<<<<<< * * self._start_clock() */ __pyx_t_5 = ((struct __pyx_vtabstruct_6pandas_6parser_TextReader *)__pyx_v_self->__pyx_vtab)->_end_clock(__pyx_v_self, __pyx_n_s_Tokenization); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 821; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "pandas/parser.pyx":823 * self._end_clock('Tokenization') * * self._start_clock() # <<<<<<<<<<<<<< * columns = self._convert_column_data(rows=rows, * footer=footer, */ __pyx_t_5 = ((struct __pyx_vtabstruct_6pandas_6parser_TextReader *)__pyx_v_self->__pyx_vtab)->_start_clock(__pyx_v_self); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 823; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "pandas/parser.pyx":824 * * self._start_clock() * columns = self._convert_column_data(rows=rows, # <<<<<<<<<<<<<< * footer=footer, * upcast_na=not self.as_recarray) */ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_convert_column_data); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 824; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 824; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_rows, __pyx_v_rows) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 824; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/parser.pyx":825 * self._start_clock() * columns = self._convert_column_data(rows=rows, * footer=footer, # <<<<<<<<<<<<<< * upcast_na=not self.as_recarray) * self._end_clock('Type conversion') */ __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_footer); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 825; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_footer, __pyx_t_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 824; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; /* "pandas/parser.pyx":826 * columns = self._convert_column_data(rows=rows, * footer=footer, * upcast_na=not self.as_recarray) # <<<<<<<<<<<<<< * self._end_clock('Type conversion') * */ __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_self->as_recarray); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 826; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_6 = __Pyx_PyBool_FromLong((!__pyx_t_3)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 826; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_upcast_na, __pyx_t_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 824; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; /* "pandas/parser.pyx":824 * * self._start_clock() * columns = self._convert_column_data(rows=rows, # <<<<<<<<<<<<<< * footer=footer, * upcast_na=not self.as_recarray) */ __pyx_t_6 = PyObject_Call(__pyx_t_5, __pyx_empty_tuple, __pyx_t_1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 824; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_columns = __pyx_t_6; __pyx_t_6 = 0; /* "pandas/parser.pyx":827 * footer=footer, * upcast_na=not self.as_recarray) * self._end_clock('Type conversion') # <<<<<<<<<<<<<< * * self._start_clock() */ __pyx_t_6 = ((struct __pyx_vtabstruct_6pandas_6parser_TextReader *)__pyx_v_self->__pyx_vtab)->_end_clock(__pyx_v_self, __pyx_kp_s_Type_conversion); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 827; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; /* "pandas/parser.pyx":829 * self._end_clock('Type conversion') * * self._start_clock() # <<<<<<<<<<<<<< * if len(columns) > 0: * rows_read = len(list(columns.values())[0]) */ __pyx_t_6 = ((struct __pyx_vtabstruct_6pandas_6parser_TextReader *)__pyx_v_self->__pyx_vtab)->_start_clock(__pyx_v_self); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 829; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; /* "pandas/parser.pyx":830 * * self._start_clock() * if len(columns) > 0: # <<<<<<<<<<<<<< * rows_read = len(list(columns.values())[0]) * # trim */ __pyx_t_7 = PyObject_Length(__pyx_v_columns); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 830; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_3 = ((__pyx_t_7 > 0) != 0); if (__pyx_t_3) { /* "pandas/parser.pyx":831 * self._start_clock() * if len(columns) > 0: * rows_read = len(list(columns.values())[0]) # <<<<<<<<<<<<<< * # trim * parser_consume_rows(self.parser, rows_read) */ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_columns, __pyx_n_s_values); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 831; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_1 = PyObject_Call(__pyx_t_6, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 831; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 831; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)(&PyList_Type))), __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 831; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = __Pyx_GetItemInt_List(__pyx_t_1, 0, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(__pyx_t_6 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 831; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_7 = PyObject_Length(__pyx_t_6); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 831; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyInt_FromSsize_t(__pyx_t_7); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 831; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_v_rows_read = __pyx_t_6; __pyx_t_6 = 0; /* "pandas/parser.pyx":833 * rows_read = len(list(columns.values())[0]) * # trim * parser_consume_rows(self.parser, rows_read) # <<<<<<<<<<<<<< * if trim: * parser_trim_buffers(self.parser) */ __pyx_t_8 = __Pyx_PyInt_As_size_t(__pyx_v_rows_read); if (unlikely((__pyx_t_8 == (size_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 833; __pyx_clineno = __LINE__; goto __pyx_L1_error;} parser_consume_rows(__pyx_v_self->parser, __pyx_t_8); /* "pandas/parser.pyx":834 * # trim * parser_consume_rows(self.parser, rows_read) * if trim: # <<<<<<<<<<<<<< * parser_trim_buffers(self.parser) * self.parser_start -= rows_read */ __pyx_t_3 = (__pyx_v_trim != 0); if (__pyx_t_3) { /* "pandas/parser.pyx":835 * parser_consume_rows(self.parser, rows_read) * if trim: * parser_trim_buffers(self.parser) # <<<<<<<<<<<<<< * self.parser_start -= rows_read * */ parser_trim_buffers(__pyx_v_self->parser); goto __pyx_L10; } __pyx_L10:; /* "pandas/parser.pyx":836 * if trim: * parser_trim_buffers(self.parser) * self.parser_start -= rows_read # <<<<<<<<<<<<<< * * self._end_clock('Parser memory cleanup') */ __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_self->parser_start); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 836; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_1 = PyNumber_InPlaceSubtract(__pyx_t_6, __pyx_v_rows_read); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 836; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 836; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_self->parser_start = __pyx_t_4; goto __pyx_L9; } __pyx_L9:; /* "pandas/parser.pyx":838 * self.parser_start -= rows_read * * self._end_clock('Parser memory cleanup') # <<<<<<<<<<<<<< * * return columns */ __pyx_t_1 = ((struct __pyx_vtabstruct_6pandas_6parser_TextReader *)__pyx_v_self->__pyx_vtab)->_end_clock(__pyx_v_self, __pyx_kp_s_Parser_memory_cleanup); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 838; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pandas/parser.pyx":840 * self._end_clock('Parser memory cleanup') * * return columns # <<<<<<<<<<<<<< * * def debug_print(self): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_columns); __pyx_r = __pyx_v_columns; goto __pyx_L0; /* "pandas/parser.pyx":791 * raise_parser_error('Error tokenizing data', self.parser) * * cdef _read_rows(self, rows, bint trim): # <<<<<<<<<<<<<< * cdef: * int buffered_lines */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("pandas.parser.TextReader._read_rows", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_columns); __Pyx_XDECREF(__pyx_v_rows_read); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/parser.pyx":842 * return columns * * def debug_print(self): # <<<<<<<<<<<<<< * debug_print_parser(self.parser) * */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_6parser_10TextReader_11debug_print(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static PyObject *__pyx_pw_6pandas_6parser_10TextReader_11debug_print(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("debug_print (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_6parser_10TextReader_10debug_print(((struct __pyx_obj_6pandas_6parser_TextReader *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_6parser_10TextReader_10debug_print(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("debug_print", 0); /* "pandas/parser.pyx":843 * * def debug_print(self): * debug_print_parser(self.parser) # <<<<<<<<<<<<<< * * cdef _start_clock(self): */ debug_print_parser(__pyx_v_self->parser); /* "pandas/parser.pyx":842 * return columns * * def debug_print(self): # <<<<<<<<<<<<<< * debug_print_parser(self.parser) * */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/parser.pyx":845 * debug_print_parser(self.parser) * * cdef _start_clock(self): # <<<<<<<<<<<<<< * self.clocks.append(time.time()) * */ static PyObject *__pyx_f_6pandas_6parser_10TextReader__start_clock(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_t_3; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_start_clock", 0); /* "pandas/parser.pyx":846 * * cdef _start_clock(self): * self.clocks.append(time.time()) # <<<<<<<<<<<<<< * * cdef _end_clock(self, what): */ if (unlikely(__pyx_v_self->clocks == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "append"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 846; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_time); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 846; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_time); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 846; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyObject_Call(__pyx_t_2, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 846; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_3 = __Pyx_PyList_Append(__pyx_v_self->clocks, __pyx_t_1); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 846; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pandas/parser.pyx":845 * debug_print_parser(self.parser) * * cdef _start_clock(self): # <<<<<<<<<<<<<< * self.clocks.append(time.time()) * */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("pandas.parser.TextReader._start_clock", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/parser.pyx":848 * self.clocks.append(time.time()) * * cdef _end_clock(self, what): # <<<<<<<<<<<<<< * if self.verbose: * elapsed = time.time() - self.clocks.pop(-1) */ static PyObject *__pyx_f_6pandas_6parser_10TextReader__end_clock(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self, PyObject *__pyx_v_what) { PyObject *__pyx_v_elapsed = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_end_clock", 0); /* "pandas/parser.pyx":849 * * cdef _end_clock(self, what): * if self.verbose: # <<<<<<<<<<<<<< * elapsed = time.time() - self.clocks.pop(-1) * print '%s took: %.2f ms' % (what, elapsed * 1000) */ __pyx_t_1 = (__pyx_v_self->verbose != 0); if (__pyx_t_1) { /* "pandas/parser.pyx":850 * cdef _end_clock(self, what): * if self.verbose: * elapsed = time.time() - self.clocks.pop(-1) # <<<<<<<<<<<<<< * print '%s took: %.2f ms' % (what, elapsed * 1000) * */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_time); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 850; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_time); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 850; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_Call(__pyx_t_3, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 850; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(__pyx_v_self->clocks == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "pop"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 850; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_3 = __Pyx_PyList_PopIndex(__pyx_v_self->clocks, -1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 850; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PyNumber_Subtract(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 850; __pyx_clineno = __LINE__; goto __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_elapsed = __pyx_t_4; __pyx_t_4 = 0; /* "pandas/parser.pyx":851 * if self.verbose: * elapsed = time.time() - self.clocks.pop(-1) * print '%s took: %.2f ms' % (what, elapsed * 1000) # <<<<<<<<<<<<<< * * def set_noconvert(self, i): */ __pyx_t_4 = PyNumber_Multiply(__pyx_v_elapsed, __pyx_int_1000); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 851; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 851; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_v_what); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_what); __Pyx_GIVEREF(__pyx_v_what); PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_s_took_2f_ms, __pyx_t_3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 851; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__Pyx_PrintOne(0, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 851; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; goto __pyx_L3; } __pyx_L3:; /* "pandas/parser.pyx":848 * self.clocks.append(time.time()) * * cdef _end_clock(self, what): # <<<<<<<<<<<<<< * if self.verbose: * elapsed = time.time() - self.clocks.pop(-1) */ /* 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.parser.TextReader._end_clock", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_elapsed); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/parser.pyx":853 * print '%s took: %.2f ms' % (what, elapsed * 1000) * * def set_noconvert(self, i): # <<<<<<<<<<<<<< * self.noconvert.add(i) * */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_6parser_10TextReader_13set_noconvert(PyObject *__pyx_v_self, PyObject *__pyx_v_i); /*proto*/ static PyObject *__pyx_pw_6pandas_6parser_10TextReader_13set_noconvert(PyObject *__pyx_v_self, PyObject *__pyx_v_i) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("set_noconvert (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_6parser_10TextReader_12set_noconvert(((struct __pyx_obj_6pandas_6parser_TextReader *)__pyx_v_self), ((PyObject *)__pyx_v_i)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_6parser_10TextReader_12set_noconvert(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self, PyObject *__pyx_v_i) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("set_noconvert", 0); /* "pandas/parser.pyx":854 * * def set_noconvert(self, i): * self.noconvert.add(i) # <<<<<<<<<<<<<< * * def remove_noconvert(self, i): */ if (unlikely(__pyx_v_self->noconvert == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "add"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 854; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_1 = PySet_Add(__pyx_v_self->noconvert, __pyx_v_i); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 854; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/parser.pyx":853 * print '%s took: %.2f ms' % (what, elapsed * 1000) * * def set_noconvert(self, i): # <<<<<<<<<<<<<< * self.noconvert.add(i) * */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("pandas.parser.TextReader.set_noconvert", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/parser.pyx":856 * self.noconvert.add(i) * * def remove_noconvert(self, i): # <<<<<<<<<<<<<< * self.noconvert.remove(i) * */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_6parser_10TextReader_15remove_noconvert(PyObject *__pyx_v_self, PyObject *__pyx_v_i); /*proto*/ static PyObject *__pyx_pw_6pandas_6parser_10TextReader_15remove_noconvert(PyObject *__pyx_v_self, PyObject *__pyx_v_i) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("remove_noconvert (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_6parser_10TextReader_14remove_noconvert(((struct __pyx_obj_6pandas_6parser_TextReader *)__pyx_v_self), ((PyObject *)__pyx_v_i)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_6parser_10TextReader_14remove_noconvert(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self, PyObject *__pyx_v_i) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("remove_noconvert", 0); /* "pandas/parser.pyx":857 * * def remove_noconvert(self, i): * self.noconvert.remove(i) # <<<<<<<<<<<<<< * * def _convert_column_data(self, rows=None, upcast_na=False, footer=0): */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->noconvert, __pyx_n_s_remove); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 857; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 857; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_i); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_i); __Pyx_GIVEREF(__pyx_v_i); __pyx_t_3 = PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 857; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/parser.pyx":856 * self.noconvert.add(i) * * def remove_noconvert(self, i): # <<<<<<<<<<<<<< * self.noconvert.remove(i) * */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("pandas.parser.TextReader.remove_noconvert", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/parser.pyx":859 * self.noconvert.remove(i) * * def _convert_column_data(self, rows=None, upcast_na=False, footer=0): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, nused */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_6parser_10TextReader_17_convert_column_data(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_6pandas_6parser_10TextReader_17_convert_column_data(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_rows = 0; PyObject *__pyx_v_upcast_na = 0; CYTHON_UNUSED PyObject *__pyx_v_footer = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_convert_column_data (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_rows,&__pyx_n_s_upcast_na,&__pyx_n_s_footer,0}; PyObject* values[3] = {0,0,0}; values[0] = ((PyObject *)Py_None); values[1] = ((PyObject *)Py_False); values[2] = ((PyObject *)__pyx_int_0); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_rows); if (value) { values[0] = value; kw_args--; } } case 1: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_upcast_na); if (value) { values[1] = value; kw_args--; } } case 2: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_footer); if (value) { values[2] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_convert_column_data") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 859; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_rows = values[0]; __pyx_v_upcast_na = values[1]; __pyx_v_footer = values[2]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("_convert_column_data", 0, 0, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 859; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.parser.TextReader._convert_column_data", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pandas_6parser_10TextReader_16_convert_column_data(((struct __pyx_obj_6pandas_6parser_TextReader *)__pyx_v_self), __pyx_v_rows, __pyx_v_upcast_na, __pyx_v_footer); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_6parser_10TextReader_16_convert_column_data(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self, PyObject *__pyx_v_rows, PyObject *__pyx_v_upcast_na, CYTHON_UNUSED PyObject *__pyx_v_footer) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_nused; kh_str_t *__pyx_v_na_hashset; int __pyx_v_start; int __pyx_v_end; PyObject *__pyx_v_name = 0; PyObject *__pyx_v_na_flist = 0; int __pyx_v_na_filter; Py_ssize_t __pyx_v_num_cols; PyObject *__pyx_v_results = NULL; PyObject *__pyx_v_conv = NULL; PyObject *__pyx_v_na_list = NULL; PyObject *__pyx_v_col_res = NULL; PyObject *__pyx_v_na_count = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; Py_ssize_t __pyx_t_8; Py_ssize_t __pyx_t_9; int __pyx_t_10; PyObject *(*__pyx_t_11)(PyObject *); kh_str_t *__pyx_t_12; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_convert_column_data", 0); /* "pandas/parser.pyx":862 * cdef: * Py_ssize_t i, nused * kh_str_t *na_hashset = NULL # <<<<<<<<<<<<<< * int start, end * object name, na_flist */ __pyx_v_na_hashset = NULL; /* "pandas/parser.pyx":865 * int start, end * object name, na_flist * bint na_filter = 0 # <<<<<<<<<<<<<< * Py_ssize_t num_cols * */ __pyx_v_na_filter = 0; /* "pandas/parser.pyx":868 * Py_ssize_t num_cols * * start = self.parser_start # <<<<<<<<<<<<<< * * if rows is None: */ __pyx_t_1 = __pyx_v_self->parser_start; __pyx_v_start = __pyx_t_1; /* "pandas/parser.pyx":870 * start = self.parser_start * * if rows is None: # <<<<<<<<<<<<<< * end = self.parser.lines * else: */ __pyx_t_2 = (__pyx_v_rows == Py_None); __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { /* "pandas/parser.pyx":871 * * if rows is None: * end = self.parser.lines # <<<<<<<<<<<<<< * else: * end = min(start + rows, self.parser.lines) */ __pyx_t_1 = __pyx_v_self->parser->lines; __pyx_v_end = __pyx_t_1; goto __pyx_L3; } /*else*/ { /* "pandas/parser.pyx":873 * end = self.parser.lines * else: * end = min(start + rows, self.parser.lines) # <<<<<<<<<<<<<< * * # # skip footer */ __pyx_t_1 = __pyx_v_self->parser->lines; __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_start); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 873; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = PyNumber_Add(__pyx_t_4, __pyx_v_rows); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 873; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_t_1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 873; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = PyObject_RichCompare(__pyx_t_6, __pyx_t_5, Py_LT); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 873; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 873; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (__pyx_t_3) { __pyx_t_7 = __Pyx_PyInt_From_int(__pyx_t_1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 873; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_t_4 = __pyx_t_7; __pyx_t_7 = 0; } else { __Pyx_INCREF(__pyx_t_5); __pyx_t_4 = __pyx_t_5; } __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_t_4); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 873; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_end = __pyx_t_1; } __pyx_L3:; /* "pandas/parser.pyx":886 * #print >> sys.stderr, self.header * #print >> sys.stderr, "index" * num_cols = -1 # <<<<<<<<<<<<<< * for i in range(self.parser.lines): * num_cols = (num_cols < self.parser.line_fields[i]) * self.parser.line_fields[i] +\ */ __pyx_v_num_cols = -1; /* "pandas/parser.pyx":887 * #print >> sys.stderr, "index" * num_cols = -1 * for i in range(self.parser.lines): # <<<<<<<<<<<<<< * num_cols = (num_cols < self.parser.line_fields[i]) * self.parser.line_fields[i] +\ * (num_cols >= self.parser.line_fields[i]) * num_cols */ __pyx_t_1 = __pyx_v_self->parser->lines; for (__pyx_t_8 = 0; __pyx_t_8 < __pyx_t_1; __pyx_t_8+=1) { __pyx_v_i = __pyx_t_8; /* "pandas/parser.pyx":888 * num_cols = -1 * for i in range(self.parser.lines): * num_cols = (num_cols < self.parser.line_fields[i]) * self.parser.line_fields[i] +\ # <<<<<<<<<<<<<< * (num_cols >= self.parser.line_fields[i]) * num_cols * */ __pyx_v_num_cols = (((__pyx_v_num_cols < (__pyx_v_self->parser->line_fields[__pyx_v_i])) * (__pyx_v_self->parser->line_fields[__pyx_v_i])) + ((__pyx_v_num_cols >= (__pyx_v_self->parser->line_fields[__pyx_v_i])) * __pyx_v_num_cols)); } /* "pandas/parser.pyx":891 * (num_cols >= self.parser.line_fields[i]) * num_cols * * if self.table_width - self.leading_cols > num_cols: # <<<<<<<<<<<<<< * raise CParserError("Too many columns specified: expected %s and found %s" % * (self.table_width - self.leading_cols, num_cols)) */ __pyx_t_3 = (((__pyx_v_self->table_width - __pyx_v_self->leading_cols) > __pyx_v_num_cols) != 0); if (__pyx_t_3) { /* "pandas/parser.pyx":892 * * if self.table_width - self.leading_cols > num_cols: * raise CParserError("Too many columns specified: expected %s and found %s" % # <<<<<<<<<<<<<< * (self.table_width - self.leading_cols, num_cols)) * */ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_CParserError); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 892; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); /* "pandas/parser.pyx":893 * if self.table_width - self.leading_cols > num_cols: * raise CParserError("Too many columns specified: expected %s and found %s" % * (self.table_width - self.leading_cols, num_cols)) # <<<<<<<<<<<<<< * * results = {} */ __pyx_t_5 = __Pyx_PyInt_From_int((__pyx_v_self->table_width - __pyx_v_self->leading_cols)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 893; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_7 = PyInt_FromSsize_t(__pyx_v_num_cols); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 893; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 893; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_7); __Pyx_GIVEREF(__pyx_t_7); __pyx_t_5 = 0; __pyx_t_7 = 0; /* "pandas/parser.pyx":892 * * if self.table_width - self.leading_cols > num_cols: * raise CParserError("Too many columns specified: expected %s and found %s" % # <<<<<<<<<<<<<< * (self.table_width - self.leading_cols, num_cols)) * */ __pyx_t_7 = __Pyx_PyString_Format(__pyx_kp_s_Too_many_columns_specified_expec, __pyx_t_6); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 892; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 892; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_7); __Pyx_GIVEREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_7 = PyObject_Call(__pyx_t_4, __pyx_t_6, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 892; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_Raise(__pyx_t_7, 0, 0, 0); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 892; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } /* "pandas/parser.pyx":895 * (self.table_width - self.leading_cols, num_cols)) * * results = {} # <<<<<<<<<<<<<< * nused = 0 * for i in range(self.table_width): */ __pyx_t_7 = PyDict_New(); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 895; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_v_results = ((PyObject*)__pyx_t_7); __pyx_t_7 = 0; /* "pandas/parser.pyx":896 * * results = {} * nused = 0 # <<<<<<<<<<<<<< * for i in range(self.table_width): * if i < self.leading_cols: */ __pyx_v_nused = 0; /* "pandas/parser.pyx":897 * results = {} * nused = 0 * for i in range(self.table_width): # <<<<<<<<<<<<<< * if i < self.leading_cols: * # Pass through leading columns always */ __pyx_t_1 = __pyx_v_self->table_width; for (__pyx_t_8 = 0; __pyx_t_8 < __pyx_t_1; __pyx_t_8+=1) { __pyx_v_i = __pyx_t_8; /* "pandas/parser.pyx":898 * nused = 0 * for i in range(self.table_width): * if i < self.leading_cols: # <<<<<<<<<<<<<< * # Pass through leading columns always * name = i */ __pyx_t_3 = ((__pyx_v_i < __pyx_v_self->leading_cols) != 0); if (__pyx_t_3) { /* "pandas/parser.pyx":900 * if i < self.leading_cols: * # Pass through leading columns always * name = i # <<<<<<<<<<<<<< * elif self.usecols and nused == len(self.usecols): * # Once we've gathered all requested columns, stop. GH5766 */ __pyx_t_7 = PyInt_FromSsize_t(__pyx_v_i); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 900; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_XDECREF_SET(__pyx_v_name, __pyx_t_7); __pyx_t_7 = 0; goto __pyx_L9; } /* "pandas/parser.pyx":901 * # Pass through leading columns always * name = i * elif self.usecols and nused == len(self.usecols): # <<<<<<<<<<<<<< * # Once we've gathered all requested columns, stop. GH5766 * break */ __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_self->usecols); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 901; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__pyx_t_3) { __pyx_t_7 = __pyx_v_self->usecols; __Pyx_INCREF(__pyx_t_7); if (unlikely(__pyx_t_7 == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 901; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_9 = PySet_Size(__pyx_t_7); if (unlikely(__pyx_t_9 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 901; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_2 = (__pyx_v_nused == __pyx_t_9); __pyx_t_10 = __pyx_t_2; } else { __pyx_t_10 = __pyx_t_3; } if (__pyx_t_10) { /* "pandas/parser.pyx":903 * elif self.usecols and nused == len(self.usecols): * # Once we've gathered all requested columns, stop. GH5766 * break # <<<<<<<<<<<<<< * else: * name = self._get_column_name(i, nused) */ goto __pyx_L8_break; } /*else*/ { /* "pandas/parser.pyx":905 * break * else: * name = self._get_column_name(i, nused) # <<<<<<<<<<<<<< * if self.has_usecols and not (i in self.usecols or * name in self.usecols): */ __pyx_t_7 = ((struct __pyx_vtabstruct_6pandas_6parser_TextReader *)__pyx_v_self->__pyx_vtab)->_get_column_name(__pyx_v_self, __pyx_v_i, __pyx_v_nused); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 905; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_XDECREF_SET(__pyx_v_name, __pyx_t_7); __pyx_t_7 = 0; /* "pandas/parser.pyx":906 * else: * name = self._get_column_name(i, nused) * if self.has_usecols and not (i in self.usecols or # <<<<<<<<<<<<<< * name in self.usecols): * continue */ if ((__pyx_v_self->has_usecols != 0)) { __pyx_t_7 = PyInt_FromSsize_t(__pyx_v_i); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 906; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_t_10 = (__Pyx_PySequence_Contains(__pyx_t_7, __pyx_v_self->usecols, Py_EQ)); if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 906; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (!(__pyx_t_10 != 0)) { /* "pandas/parser.pyx":907 * name = self._get_column_name(i, nused) * if self.has_usecols and not (i in self.usecols or * name in self.usecols): # <<<<<<<<<<<<<< * continue * nused += 1 */ __pyx_t_3 = (__Pyx_PySequence_Contains(__pyx_v_name, __pyx_v_self->usecols, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 907; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_2 = (__pyx_t_3 != 0); } else { __pyx_t_2 = (__pyx_t_10 != 0); } /* "pandas/parser.pyx":906 * else: * name = self._get_column_name(i, nused) * if self.has_usecols and not (i in self.usecols or # <<<<<<<<<<<<<< * name in self.usecols): * continue */ __pyx_t_10 = ((!__pyx_t_2) != 0); __pyx_t_2 = __pyx_t_10; } else { __pyx_t_2 = (__pyx_v_self->has_usecols != 0); } if (__pyx_t_2) { /* "pandas/parser.pyx":908 * if self.has_usecols and not (i in self.usecols or * name in self.usecols): * continue # <<<<<<<<<<<<<< * nused += 1 * */ goto __pyx_L7_continue; } /* "pandas/parser.pyx":909 * name in self.usecols): * continue * nused += 1 # <<<<<<<<<<<<<< * * conv = self._get_converter(i, name) */ __pyx_v_nused = (__pyx_v_nused + 1); } __pyx_L9:; /* "pandas/parser.pyx":911 * nused += 1 * * conv = self._get_converter(i, name) # <<<<<<<<<<<<<< * * # XXX */ __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get_converter); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 911; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_t_6 = PyInt_FromSsize_t(__pyx_v_i); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 911; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 911; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_6); __Pyx_INCREF(__pyx_v_name); PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_name); __Pyx_GIVEREF(__pyx_v_name); __pyx_t_6 = 0; __pyx_t_6 = PyObject_Call(__pyx_t_7, __pyx_t_4, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 911; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF_SET(__pyx_v_conv, __pyx_t_6); __pyx_t_6 = 0; /* "pandas/parser.pyx":914 * * # XXX * na_flist = set() # <<<<<<<<<<<<<< * if self.na_filter: * na_list, na_flist = self._get_na_list(i, name) */ __pyx_t_6 = PySet_New(0); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 914; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_XDECREF_SET(__pyx_v_na_flist, __pyx_t_6); __pyx_t_6 = 0; /* "pandas/parser.pyx":915 * # XXX * na_flist = set() * if self.na_filter: # <<<<<<<<<<<<<< * na_list, na_flist = self._get_na_list(i, name) * if na_list is None: */ __pyx_t_2 = (__pyx_v_self->na_filter != 0); if (__pyx_t_2) { /* "pandas/parser.pyx":916 * na_flist = set() * if self.na_filter: * na_list, na_flist = self._get_na_list(i, name) # <<<<<<<<<<<<<< * if na_list is None: * na_filter = 0 */ __pyx_t_6 = PyInt_FromSsize_t(__pyx_v_i); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 916; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_4 = ((struct __pyx_vtabstruct_6pandas_6parser_TextReader *)__pyx_v_self->__pyx_vtab)->_get_na_list(__pyx_v_self, __pyx_t_6, __pyx_v_name); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 916; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if ((likely(PyTuple_CheckExact(__pyx_t_4))) || (PyList_CheckExact(__pyx_t_4))) { PyObject* sequence = __pyx_t_4; #if CYTHON_COMPILING_IN_CPYTHON Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 916; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_6 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_7 = PyTuple_GET_ITEM(sequence, 1); } else { __pyx_t_6 = PyList_GET_ITEM(sequence, 0); __pyx_t_7 = PyList_GET_ITEM(sequence, 1); } __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(__pyx_t_7); #else __pyx_t_6 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 916; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 916; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); #endif __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else { Py_ssize_t index = -1; __pyx_t_5 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 916; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_11 = Py_TYPE(__pyx_t_5)->tp_iternext; index = 0; __pyx_t_6 = __pyx_t_11(__pyx_t_5); if (unlikely(!__pyx_t_6)) goto __pyx_L12_unpacking_failed; __Pyx_GOTREF(__pyx_t_6); index = 1; __pyx_t_7 = __pyx_t_11(__pyx_t_5); if (unlikely(!__pyx_t_7)) goto __pyx_L12_unpacking_failed; __Pyx_GOTREF(__pyx_t_7); if (__Pyx_IternextUnpackEndCheck(__pyx_t_11(__pyx_t_5), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 916; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_11 = NULL; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; goto __pyx_L13_unpacking_done; __pyx_L12_unpacking_failed:; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_11 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 916; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_L13_unpacking_done:; } __Pyx_XDECREF_SET(__pyx_v_na_list, __pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF_SET(__pyx_v_na_flist, __pyx_t_7); __pyx_t_7 = 0; /* "pandas/parser.pyx":917 * if self.na_filter: * na_list, na_flist = self._get_na_list(i, name) * if na_list is None: # <<<<<<<<<<<<<< * na_filter = 0 * else: */ __pyx_t_2 = (__pyx_v_na_list == Py_None); __pyx_t_10 = (__pyx_t_2 != 0); if (__pyx_t_10) { /* "pandas/parser.pyx":918 * na_list, na_flist = self._get_na_list(i, name) * if na_list is None: * na_filter = 0 # <<<<<<<<<<<<<< * else: * na_filter = 1 */ __pyx_v_na_filter = 0; goto __pyx_L14; } /*else*/ { /* "pandas/parser.pyx":920 * na_filter = 0 * else: * na_filter = 1 # <<<<<<<<<<<<<< * na_hashset = kset_from_list(na_list) * else: */ __pyx_v_na_filter = 1; /* "pandas/parser.pyx":921 * else: * na_filter = 1 * na_hashset = kset_from_list(na_list) # <<<<<<<<<<<<<< * else: * na_filter = 0 */ if (!(likely(PyList_CheckExact(__pyx_v_na_list))||((__pyx_v_na_list) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_v_na_list)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 921; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_12 = __pyx_f_6pandas_6parser_kset_from_list(((PyObject*)__pyx_v_na_list)); if (unlikely(__pyx_t_12 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 921; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_na_hashset = __pyx_t_12; } __pyx_L14:; goto __pyx_L11; } /*else*/ { /* "pandas/parser.pyx":923 * na_hashset = kset_from_list(na_list) * else: * na_filter = 0 # <<<<<<<<<<<<<< * * if conv: */ __pyx_v_na_filter = 0; } __pyx_L11:; /* "pandas/parser.pyx":925 * na_filter = 0 * * if conv: # <<<<<<<<<<<<<< * results[i] = _apply_converter(conv, self.parser, i, start, end, * self.c_encoding) */ __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_v_conv); if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 925; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__pyx_t_10) { /* "pandas/parser.pyx":926 * * if conv: * results[i] = _apply_converter(conv, self.parser, i, start, end, # <<<<<<<<<<<<<< * self.c_encoding) * continue */ __pyx_t_4 = __pyx_f_6pandas_6parser__apply_converter(__pyx_v_conv, __pyx_v_self->parser, __pyx_v_i, __pyx_v_start, __pyx_v_end, __pyx_v_self->c_encoding); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 926; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_7 = PyInt_FromSsize_t(__pyx_v_i); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 926; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); if (unlikely(PyDict_SetItem(__pyx_v_results, __pyx_t_7, __pyx_t_4) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 926; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "pandas/parser.pyx":928 * results[i] = _apply_converter(conv, self.parser, i, start, end, * self.c_encoding) * continue # <<<<<<<<<<<<<< * * # Should return as the desired dtype (inferred or specified) */ goto __pyx_L7_continue; } /* "pandas/parser.pyx":931 * * # Should return as the desired dtype (inferred or specified) * col_res, na_count = self._convert_tokens(i, start, end, name, # <<<<<<<<<<<<<< * na_filter, na_hashset, na_flist) * */ __pyx_t_4 = __pyx_f_6pandas_6parser_10TextReader__convert_tokens(__pyx_v_self, __pyx_v_i, __pyx_v_start, __pyx_v_end, __pyx_v_name, __pyx_v_na_filter, __pyx_v_na_hashset, __pyx_v_na_flist); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 931; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); if ((likely(PyTuple_CheckExact(__pyx_t_4))) || (PyList_CheckExact(__pyx_t_4))) { PyObject* sequence = __pyx_t_4; #if CYTHON_COMPILING_IN_CPYTHON Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 931; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_7 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_6 = PyTuple_GET_ITEM(sequence, 1); } else { __pyx_t_7 = PyList_GET_ITEM(sequence, 0); __pyx_t_6 = PyList_GET_ITEM(sequence, 1); } __Pyx_INCREF(__pyx_t_7); __Pyx_INCREF(__pyx_t_6); #else __pyx_t_7 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 931; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 931; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); #endif __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else { Py_ssize_t index = -1; __pyx_t_5 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 931; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_11 = Py_TYPE(__pyx_t_5)->tp_iternext; index = 0; __pyx_t_7 = __pyx_t_11(__pyx_t_5); if (unlikely(!__pyx_t_7)) goto __pyx_L16_unpacking_failed; __Pyx_GOTREF(__pyx_t_7); index = 1; __pyx_t_6 = __pyx_t_11(__pyx_t_5); if (unlikely(!__pyx_t_6)) goto __pyx_L16_unpacking_failed; __Pyx_GOTREF(__pyx_t_6); if (__Pyx_IternextUnpackEndCheck(__pyx_t_11(__pyx_t_5), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 931; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_11 = NULL; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; goto __pyx_L17_unpacking_done; __pyx_L16_unpacking_failed:; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_11 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 931; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_L17_unpacking_done:; } __Pyx_XDECREF_SET(__pyx_v_col_res, __pyx_t_7); __pyx_t_7 = 0; __Pyx_XDECREF_SET(__pyx_v_na_count, __pyx_t_6); __pyx_t_6 = 0; /* "pandas/parser.pyx":934 * na_filter, na_hashset, na_flist) * * if na_filter: # <<<<<<<<<<<<<< * self._free_na_set(na_hashset) * */ __pyx_t_10 = (__pyx_v_na_filter != 0); if (__pyx_t_10) { /* "pandas/parser.pyx":935 * * if na_filter: * self._free_na_set(na_hashset) # <<<<<<<<<<<<<< * * if upcast_na and na_count > 0: */ __pyx_t_4 = ((struct __pyx_vtabstruct_6pandas_6parser_TextReader *)__pyx_v_self->__pyx_vtab)->_free_na_set(__pyx_v_self, __pyx_v_na_hashset); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 935; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; goto __pyx_L18; } __pyx_L18:; /* "pandas/parser.pyx":937 * self._free_na_set(na_hashset) * * if upcast_na and na_count > 0: # <<<<<<<<<<<<<< * col_res = _maybe_upcast(col_res) * */ __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_v_upcast_na); if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 937; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__pyx_t_10) { __pyx_t_4 = PyObject_RichCompare(__pyx_v_na_count, __pyx_int_0, Py_GT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 937; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 937; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_3 = __pyx_t_2; } else { __pyx_t_3 = __pyx_t_10; } if (__pyx_t_3) { /* "pandas/parser.pyx":938 * * if upcast_na and na_count > 0: * col_res = _maybe_upcast(col_res) # <<<<<<<<<<<<<< * * if issubclass(col_res.dtype.type, np.integer) and self.compact_ints: */ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_maybe_upcast); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 938; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 938; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(__pyx_v_col_res); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_col_res); __Pyx_GIVEREF(__pyx_v_col_res); __pyx_t_7 = PyObject_Call(__pyx_t_4, __pyx_t_6, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 938; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF_SET(__pyx_v_col_res, __pyx_t_7); __pyx_t_7 = 0; goto __pyx_L19; } __pyx_L19:; /* "pandas/parser.pyx":940 * col_res = _maybe_upcast(col_res) * * if issubclass(col_res.dtype.type, np.integer) and self.compact_ints: # <<<<<<<<<<<<<< * col_res = downcast_int64(col_res, self.use_unsigned) * */ __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_col_res, __pyx_n_s_dtype); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 940; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_type); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 940; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 940; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_integer); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 940; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_3 = PyObject_IsSubclass(__pyx_t_6, __pyx_t_4); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 940; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_3) { __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_v_self->compact_ints); if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 940; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_2 = __pyx_t_10; } else { __pyx_t_2 = __pyx_t_3; } if (__pyx_t_2) { /* "pandas/parser.pyx":941 * * if issubclass(col_res.dtype.type, np.integer) and self.compact_ints: * col_res = downcast_int64(col_res, self.use_unsigned) # <<<<<<<<<<<<<< * * if col_res is None: */ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_downcast_int64); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 941; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 941; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(__pyx_v_col_res); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_col_res); __Pyx_GIVEREF(__pyx_v_col_res); __Pyx_INCREF(__pyx_v_self->use_unsigned); PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_v_self->use_unsigned); __Pyx_GIVEREF(__pyx_v_self->use_unsigned); __pyx_t_7 = PyObject_Call(__pyx_t_4, __pyx_t_6, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 941; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF_SET(__pyx_v_col_res, __pyx_t_7); __pyx_t_7 = 0; goto __pyx_L20; } __pyx_L20:; /* "pandas/parser.pyx":943 * col_res = downcast_int64(col_res, self.use_unsigned) * * if col_res is None: # <<<<<<<<<<<<<< * raise Exception('Unable to parse column %d' % i) * */ __pyx_t_2 = (__pyx_v_col_res == Py_None); __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { /* "pandas/parser.pyx":944 * * if col_res is None: * raise Exception('Unable to parse column %d' % i) # <<<<<<<<<<<<<< * * results[i] = col_res */ __pyx_t_7 = PyInt_FromSsize_t(__pyx_v_i); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 944; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_t_6 = __Pyx_PyString_Format(__pyx_kp_s_Unable_to_parse_column_d, __pyx_t_7); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 944; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 944; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyObject_Call(__pyx_builtin_Exception, __pyx_t_7, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 944; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_Raise(__pyx_t_6, 0, 0, 0); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 944; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } /* "pandas/parser.pyx":946 * raise Exception('Unable to parse column %d' % i) * * results[i] = col_res # <<<<<<<<<<<<<< * * self.parser_start += end - start */ __pyx_t_6 = PyInt_FromSsize_t(__pyx_v_i); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 946; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); if (unlikely(PyDict_SetItem(__pyx_v_results, __pyx_t_6, __pyx_v_col_res) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 946; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_L7_continue:; } __pyx_L8_break:; /* "pandas/parser.pyx":948 * results[i] = col_res * * self.parser_start += end - start # <<<<<<<<<<<<<< * * return results */ __pyx_v_self->parser_start = (__pyx_v_self->parser_start + (__pyx_v_end - __pyx_v_start)); /* "pandas/parser.pyx":950 * self.parser_start += end - start * * return results # <<<<<<<<<<<<<< * * cdef inline _convert_tokens(self, Py_ssize_t i, int start, int end, */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_results); __pyx_r = __pyx_v_results; goto __pyx_L0; /* "pandas/parser.pyx":859 * self.noconvert.remove(i) * * def _convert_column_data(self, rows=None, upcast_na=False, footer=0): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, nused */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_AddTraceback("pandas.parser.TextReader._convert_column_data", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_name); __Pyx_XDECREF(__pyx_v_na_flist); __Pyx_XDECREF(__pyx_v_results); __Pyx_XDECREF(__pyx_v_conv); __Pyx_XDECREF(__pyx_v_na_list); __Pyx_XDECREF(__pyx_v_col_res); __Pyx_XDECREF(__pyx_v_na_count); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/parser.pyx":952 * return results * * cdef inline _convert_tokens(self, Py_ssize_t i, int start, int end, # <<<<<<<<<<<<<< * object name, bint na_filter, * kh_str_t *na_hashset, */ static CYTHON_INLINE PyObject *__pyx_f_6pandas_6parser_10TextReader__convert_tokens(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self, Py_ssize_t __pyx_v_i, int __pyx_v_start, int __pyx_v_end, PyObject *__pyx_v_name, int __pyx_v_na_filter, kh_str_t *__pyx_v_na_hashset, PyObject *__pyx_v_na_flist) { PyObject *__pyx_v_col_dtype = 0; PyObject *__pyx_v_col_res = NULL; PyObject *__pyx_v_dt = NULL; PyObject *__pyx_v_na_count = 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; Py_ssize_t __pyx_t_6; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; PyObject *__pyx_t_11 = NULL; PyObject *(*__pyx_t_12)(PyObject *); int __pyx_t_13; PyObject *__pyx_t_14 = NULL; PyObject *__pyx_t_15 = NULL; PyObject *__pyx_t_16 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_convert_tokens", 0); /* "pandas/parser.pyx":957 * object na_flist): * cdef: * object col_dtype = None # <<<<<<<<<<<<<< * * if self.dtype is not None: */ __Pyx_INCREF(Py_None); __pyx_v_col_dtype = Py_None; /* "pandas/parser.pyx":959 * object col_dtype = None * * if self.dtype is not None: # <<<<<<<<<<<<<< * if isinstance(self.dtype, dict): * if name in self.dtype: */ __pyx_t_1 = (__pyx_v_self->dtype != Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { /* "pandas/parser.pyx":960 * * if self.dtype is not None: * if isinstance(self.dtype, dict): # <<<<<<<<<<<<<< * if name in self.dtype: * col_dtype = self.dtype[name] */ __pyx_t_3 = __pyx_v_self->dtype; __Pyx_INCREF(__pyx_t_3); __pyx_t_2 = PyDict_Check(__pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_1 = (__pyx_t_2 != 0); if (__pyx_t_1) { /* "pandas/parser.pyx":961 * if self.dtype is not None: * if isinstance(self.dtype, dict): * if name in self.dtype: # <<<<<<<<<<<<<< * col_dtype = self.dtype[name] * elif i in self.dtype: */ __pyx_t_1 = (__Pyx_PySequence_Contains(__pyx_v_name, __pyx_v_self->dtype, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 961; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { /* "pandas/parser.pyx":962 * if isinstance(self.dtype, dict): * if name in self.dtype: * col_dtype = self.dtype[name] # <<<<<<<<<<<<<< * elif i in self.dtype: * col_dtype = self.dtype[i] */ __pyx_t_3 = PyObject_GetItem(__pyx_v_self->dtype, __pyx_v_name); if (unlikely(__pyx_t_3 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 962; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF_SET(__pyx_v_col_dtype, __pyx_t_3); __pyx_t_3 = 0; goto __pyx_L5; } /* "pandas/parser.pyx":963 * if name in self.dtype: * col_dtype = self.dtype[name] * elif i in self.dtype: # <<<<<<<<<<<<<< * col_dtype = self.dtype[i] * else: */ __pyx_t_3 = PyInt_FromSsize_t(__pyx_v_i); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 963; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = (__Pyx_PySequence_Contains(__pyx_t_3, __pyx_v_self->dtype, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 963; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_1 = (__pyx_t_2 != 0); if (__pyx_t_1) { /* "pandas/parser.pyx":964 * col_dtype = self.dtype[name] * elif i in self.dtype: * col_dtype = self.dtype[i] # <<<<<<<<<<<<<< * else: * if self.dtype.names: */ __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_self->dtype, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(__pyx_t_3 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 964; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF_SET(__pyx_v_col_dtype, __pyx_t_3); __pyx_t_3 = 0; goto __pyx_L5; } __pyx_L5:; goto __pyx_L4; } /*else*/ { /* "pandas/parser.pyx":966 * col_dtype = self.dtype[i] * else: * if self.dtype.names: # <<<<<<<<<<<<<< * col_dtype = self.dtype.descr[i][1] * else: */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->dtype, __pyx_n_s_names); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 966; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 966; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_1) { /* "pandas/parser.pyx":967 * else: * if self.dtype.names: * col_dtype = self.dtype.descr[i][1] # <<<<<<<<<<<<<< * else: * col_dtype = self.dtype */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->dtype, __pyx_n_s_descr); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 967; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_3, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(__pyx_t_4 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 967; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_4, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_3 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 967; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF_SET(__pyx_v_col_dtype, __pyx_t_3); __pyx_t_3 = 0; goto __pyx_L6; } /*else*/ { /* "pandas/parser.pyx":969 * col_dtype = self.dtype.descr[i][1] * else: * col_dtype = self.dtype # <<<<<<<<<<<<<< * * if col_dtype is not None: */ __pyx_t_3 = __pyx_v_self->dtype; __Pyx_INCREF(__pyx_t_3); __Pyx_DECREF_SET(__pyx_v_col_dtype, __pyx_t_3); __pyx_t_3 = 0; } __pyx_L6:; } __pyx_L4:; /* "pandas/parser.pyx":971 * col_dtype = self.dtype * * if col_dtype is not None: # <<<<<<<<<<<<<< * if not isinstance(col_dtype, basestring): * if isinstance(col_dtype, np.dtype): */ __pyx_t_1 = (__pyx_v_col_dtype != Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { /* "pandas/parser.pyx":972 * * if col_dtype is not None: * if not isinstance(col_dtype, basestring): # <<<<<<<<<<<<<< * if isinstance(col_dtype, np.dtype): * col_dtype = col_dtype.str */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_basestring); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 972; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = PyObject_IsInstance(__pyx_v_col_dtype, __pyx_t_3); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 972; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_1 = ((!(__pyx_t_2 != 0)) != 0); if (__pyx_t_1) { /* "pandas/parser.pyx":973 * if col_dtype is not None: * if not isinstance(col_dtype, basestring): * if isinstance(col_dtype, np.dtype): # <<<<<<<<<<<<<< * col_dtype = col_dtype.str * else: */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 973; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_dtype); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 973; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_1 = PyObject_IsInstance(__pyx_v_col_dtype, __pyx_t_4); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 973; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { /* "pandas/parser.pyx":974 * if not isinstance(col_dtype, basestring): * if isinstance(col_dtype, np.dtype): * col_dtype = col_dtype.str # <<<<<<<<<<<<<< * else: * col_dtype = np.dtype(col_dtype).str */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_col_dtype, __pyx_n_s_str); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 974; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF_SET(__pyx_v_col_dtype, __pyx_t_4); __pyx_t_4 = 0; goto __pyx_L9; } /*else*/ { /* "pandas/parser.pyx":976 * col_dtype = col_dtype.str * else: * col_dtype = np.dtype(col_dtype).str # <<<<<<<<<<<<<< * * return self._convert_with_dtype(col_dtype, i, start, end, */ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 976; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_dtype); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 976; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 976; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_v_col_dtype); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_col_dtype); __Pyx_GIVEREF(__pyx_v_col_dtype); __pyx_t_5 = PyObject_Call(__pyx_t_3, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 976; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_str); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 976; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF_SET(__pyx_v_col_dtype, __pyx_t_4); __pyx_t_4 = 0; } __pyx_L9:; goto __pyx_L8; } __pyx_L8:; /* "pandas/parser.pyx":978 * col_dtype = np.dtype(col_dtype).str * * return self._convert_with_dtype(col_dtype, i, start, end, # <<<<<<<<<<<<<< * na_filter, 1, na_hashset, na_flist) * */ __Pyx_XDECREF(__pyx_r); /* "pandas/parser.pyx":979 * * return self._convert_with_dtype(col_dtype, i, start, end, * na_filter, 1, na_hashset, na_flist) # <<<<<<<<<<<<<< * * if i in self.noconvert: */ __pyx_t_4 = ((struct __pyx_vtabstruct_6pandas_6parser_TextReader *)__pyx_v_self->__pyx_vtab)->_convert_with_dtype(__pyx_v_self, __pyx_v_col_dtype, __pyx_v_i, __pyx_v_start, __pyx_v_end, __pyx_v_na_filter, 1, __pyx_v_na_hashset, __pyx_v_na_flist); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 978; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; } goto __pyx_L3; } __pyx_L3:; /* "pandas/parser.pyx":981 * na_filter, 1, na_hashset, na_flist) * * if i in self.noconvert: # <<<<<<<<<<<<<< * return self._string_convert(i, start, end, na_filter, na_hashset) * else: */ __pyx_t_4 = PyInt_FromSsize_t(__pyx_v_i); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 981; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_2 = (__Pyx_PySequence_Contains(__pyx_t_4, __pyx_v_self->noconvert, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 981; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_1 = (__pyx_t_2 != 0); if (__pyx_t_1) { /* "pandas/parser.pyx":982 * * if i in self.noconvert: * return self._string_convert(i, start, end, na_filter, na_hashset) # <<<<<<<<<<<<<< * else: * col_res = None */ __Pyx_XDECREF(__pyx_r); __pyx_t_4 = ((struct __pyx_vtabstruct_6pandas_6parser_TextReader *)__pyx_v_self->__pyx_vtab)->_string_convert(__pyx_v_self, __pyx_v_i, __pyx_v_start, __pyx_v_end, __pyx_v_na_filter, __pyx_v_na_hashset); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 982; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; } /*else*/ { /* "pandas/parser.pyx":984 * return self._string_convert(i, start, end, na_filter, na_hashset) * else: * col_res = None # <<<<<<<<<<<<<< * for dt in dtype_cast_order: * try: */ __Pyx_INCREF(Py_None); __pyx_v_col_res = Py_None; /* "pandas/parser.pyx":985 * else: * col_res = None * for dt in dtype_cast_order: # <<<<<<<<<<<<<< * try: * col_res, na_count = self._convert_with_dtype( */ if (unlikely(__pyx_v_6pandas_6parser_dtype_cast_order == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 985; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_4 = __pyx_v_6pandas_6parser_dtype_cast_order; __Pyx_INCREF(__pyx_t_4); __pyx_t_6 = 0; for (;;) { if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_4)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_5 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_6); __Pyx_INCREF(__pyx_t_5); __pyx_t_6++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 985; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_5 = PySequence_ITEM(__pyx_t_4, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 985; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif __Pyx_XDECREF_SET(__pyx_v_dt, __pyx_t_5); __pyx_t_5 = 0; /* "pandas/parser.pyx":986 * col_res = None * for dt in dtype_cast_order: * try: # <<<<<<<<<<<<<< * col_res, na_count = self._convert_with_dtype( * dt, i, start, end, na_filter, 0, na_hashset, na_flist) */ { __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9); __Pyx_XGOTREF(__pyx_t_7); __Pyx_XGOTREF(__pyx_t_8); __Pyx_XGOTREF(__pyx_t_9); /*try:*/ { /* "pandas/parser.pyx":987 * for dt in dtype_cast_order: * try: * col_res, na_count = self._convert_with_dtype( # <<<<<<<<<<<<<< * dt, i, start, end, na_filter, 0, na_hashset, na_flist) * except OverflowError: */ __pyx_t_5 = ((struct __pyx_vtabstruct_6pandas_6parser_TextReader *)__pyx_v_self->__pyx_vtab)->_convert_with_dtype(__pyx_v_self, __pyx_v_dt, __pyx_v_i, __pyx_v_start, __pyx_v_end, __pyx_v_na_filter, 0, __pyx_v_na_hashset, __pyx_v_na_flist); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 987; __pyx_clineno = __LINE__; goto __pyx_L13_error;} __Pyx_GOTREF(__pyx_t_5); if ((likely(PyTuple_CheckExact(__pyx_t_5))) || (PyList_CheckExact(__pyx_t_5))) { PyObject* sequence = __pyx_t_5; #if CYTHON_COMPILING_IN_CPYTHON Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 987; __pyx_clineno = __LINE__; goto __pyx_L13_error;} } #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_10 = PyTuple_GET_ITEM(sequence, 1); } else { __pyx_t_3 = PyList_GET_ITEM(sequence, 0); __pyx_t_10 = PyList_GET_ITEM(sequence, 1); } __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(__pyx_t_10); #else __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 987; __pyx_clineno = __LINE__; goto __pyx_L13_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_10 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 987; __pyx_clineno = __LINE__; goto __pyx_L13_error;} __Pyx_GOTREF(__pyx_t_10); #endif __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } else { Py_ssize_t index = -1; __pyx_t_11 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 987; __pyx_clineno = __LINE__; goto __pyx_L13_error;} __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_12 = Py_TYPE(__pyx_t_11)->tp_iternext; index = 0; __pyx_t_3 = __pyx_t_12(__pyx_t_11); if (unlikely(!__pyx_t_3)) goto __pyx_L21_unpacking_failed; __Pyx_GOTREF(__pyx_t_3); index = 1; __pyx_t_10 = __pyx_t_12(__pyx_t_11); if (unlikely(!__pyx_t_10)) goto __pyx_L21_unpacking_failed; __Pyx_GOTREF(__pyx_t_10); if (__Pyx_IternextUnpackEndCheck(__pyx_t_12(__pyx_t_11), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 987; __pyx_clineno = __LINE__; goto __pyx_L13_error;} __pyx_t_12 = NULL; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; goto __pyx_L22_unpacking_done; __pyx_L21_unpacking_failed:; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __pyx_t_12 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 987; __pyx_clineno = __LINE__; goto __pyx_L13_error;} __pyx_L22_unpacking_done:; } __Pyx_DECREF_SET(__pyx_v_col_res, __pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF_SET(__pyx_v_na_count, __pyx_t_10); __pyx_t_10 = 0; } __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; goto __pyx_L20_try_end; __pyx_L13_error:; __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; /* "pandas/parser.pyx":989 * col_res, na_count = self._convert_with_dtype( * dt, i, start, end, na_filter, 0, na_hashset, na_flist) * except OverflowError: # <<<<<<<<<<<<<< * col_res, na_count = self._convert_with_dtype( * '|O8', i, start, end, na_filter, 0, na_hashset, na_flist) */ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_OverflowError); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 989; __pyx_clineno = __LINE__; goto __pyx_L15_except_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_13 = PyErr_ExceptionMatches(__pyx_t_5); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_13) { __Pyx_AddTraceback("pandas.parser.TextReader._convert_tokens", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_10, &__pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 989; __pyx_clineno = __LINE__; goto __pyx_L15_except_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_GOTREF(__pyx_t_10); __Pyx_GOTREF(__pyx_t_3); /* "pandas/parser.pyx":990 * dt, i, start, end, na_filter, 0, na_hashset, na_flist) * except OverflowError: * col_res, na_count = self._convert_with_dtype( # <<<<<<<<<<<<<< * '|O8', i, start, end, na_filter, 0, na_hashset, na_flist) * */ __pyx_t_11 = ((struct __pyx_vtabstruct_6pandas_6parser_TextReader *)__pyx_v_self->__pyx_vtab)->_convert_with_dtype(__pyx_v_self, __pyx_kp_s_O8, __pyx_v_i, __pyx_v_start, __pyx_v_end, __pyx_v_na_filter, 0, __pyx_v_na_hashset, __pyx_v_na_flist); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 990; __pyx_clineno = __LINE__; goto __pyx_L15_except_error;} __Pyx_GOTREF(__pyx_t_11); if ((likely(PyTuple_CheckExact(__pyx_t_11))) || (PyList_CheckExact(__pyx_t_11))) { PyObject* sequence = __pyx_t_11; #if CYTHON_COMPILING_IN_CPYTHON Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 990; __pyx_clineno = __LINE__; goto __pyx_L15_except_error;} } #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_14 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_15 = PyTuple_GET_ITEM(sequence, 1); } else { __pyx_t_14 = PyList_GET_ITEM(sequence, 0); __pyx_t_15 = PyList_GET_ITEM(sequence, 1); } __Pyx_INCREF(__pyx_t_14); __Pyx_INCREF(__pyx_t_15); #else __pyx_t_14 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 990; __pyx_clineno = __LINE__; goto __pyx_L15_except_error;} __Pyx_GOTREF(__pyx_t_14); __pyx_t_15 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 990; __pyx_clineno = __LINE__; goto __pyx_L15_except_error;} __Pyx_GOTREF(__pyx_t_15); #endif __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; } else { Py_ssize_t index = -1; __pyx_t_16 = PyObject_GetIter(__pyx_t_11); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 990; __pyx_clineno = __LINE__; goto __pyx_L15_except_error;} __Pyx_GOTREF(__pyx_t_16); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __pyx_t_12 = Py_TYPE(__pyx_t_16)->tp_iternext; index = 0; __pyx_t_14 = __pyx_t_12(__pyx_t_16); if (unlikely(!__pyx_t_14)) goto __pyx_L25_unpacking_failed; __Pyx_GOTREF(__pyx_t_14); index = 1; __pyx_t_15 = __pyx_t_12(__pyx_t_16); if (unlikely(!__pyx_t_15)) goto __pyx_L25_unpacking_failed; __Pyx_GOTREF(__pyx_t_15); if (__Pyx_IternextUnpackEndCheck(__pyx_t_12(__pyx_t_16), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 990; __pyx_clineno = __LINE__; goto __pyx_L15_except_error;} __pyx_t_12 = NULL; __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; goto __pyx_L26_unpacking_done; __pyx_L25_unpacking_failed:; __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; __pyx_t_12 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 990; __pyx_clineno = __LINE__; goto __pyx_L15_except_error;} __pyx_L26_unpacking_done:; } __Pyx_DECREF_SET(__pyx_v_col_res, __pyx_t_14); __pyx_t_14 = 0; __Pyx_XDECREF_SET(__pyx_v_na_count, __pyx_t_15); __pyx_t_15 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L14_exception_handled; } goto __pyx_L15_except_error; __pyx_L15_except_error:; __Pyx_XGIVEREF(__pyx_t_7); __Pyx_XGIVEREF(__pyx_t_8); __Pyx_XGIVEREF(__pyx_t_9); __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9); goto __pyx_L1_error; __pyx_L14_exception_handled:; __Pyx_XGIVEREF(__pyx_t_7); __Pyx_XGIVEREF(__pyx_t_8); __Pyx_XGIVEREF(__pyx_t_9); __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9); __pyx_L20_try_end:; } /* "pandas/parser.pyx":993 * '|O8', i, start, end, na_filter, 0, na_hashset, na_flist) * * if col_res is not None: # <<<<<<<<<<<<<< * break * */ __pyx_t_1 = (__pyx_v_col_res != Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { /* "pandas/parser.pyx":994 * * if col_res is not None: * break # <<<<<<<<<<<<<< * * return col_res, na_count */ goto __pyx_L12_break; } } __pyx_L12_break:; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } /* "pandas/parser.pyx":996 * break * * return col_res, na_count # <<<<<<<<<<<<<< * * cdef _convert_with_dtype(self, object dtype, Py_ssize_t i, */ __Pyx_XDECREF(__pyx_r); if (unlikely(!__pyx_v_na_count)) { __Pyx_RaiseUnboundLocalError("na_count"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 996; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 996; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_v_col_res); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_col_res); __Pyx_GIVEREF(__pyx_v_col_res); __Pyx_INCREF(__pyx_v_na_count); PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_na_count); __Pyx_GIVEREF(__pyx_v_na_count); __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; /* "pandas/parser.pyx":952 * return results * * cdef inline _convert_tokens(self, Py_ssize_t i, int start, int end, # <<<<<<<<<<<<<< * object name, bint na_filter, * kh_str_t *na_hashset, */ /* 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_10); __Pyx_XDECREF(__pyx_t_11); __Pyx_XDECREF(__pyx_t_14); __Pyx_XDECREF(__pyx_t_15); __Pyx_XDECREF(__pyx_t_16); __Pyx_AddTraceback("pandas.parser.TextReader._convert_tokens", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_col_dtype); __Pyx_XDECREF(__pyx_v_col_res); __Pyx_XDECREF(__pyx_v_dt); __Pyx_XDECREF(__pyx_v_na_count); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/parser.pyx":998 * return col_res, na_count * * cdef _convert_with_dtype(self, object dtype, Py_ssize_t i, # <<<<<<<<<<<<<< * int start, int end, * bint na_filter, */ static PyObject *__pyx_f_6pandas_6parser_10TextReader__convert_with_dtype(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self, PyObject *__pyx_v_dtype, Py_ssize_t __pyx_v_i, int __pyx_v_start, int __pyx_v_end, int __pyx_v_na_filter, int __pyx_v_user_dtype, kh_str_t *__pyx_v_na_hashset, PyObject *__pyx_v_na_flist) { kh_str_t *__pyx_v_true_set; kh_str_t *__pyx_v_false_set; PyObject *__pyx_v_result = NULL; PyObject *__pyx_v_na_count = NULL; PyObject *__pyx_v_width = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __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)(PyObject *); kh_str_t *__pyx_t_9; size_t __pyx_t_10; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_convert_with_dtype", 0); /* "pandas/parser.pyx":1006 * cdef kh_str_t *true_set, *false_set * * if dtype[1] == 'i' or dtype[1] == 'u': # <<<<<<<<<<<<<< * result, na_count = _try_int64(self.parser, i, start, end, * na_filter, na_hashset) */ __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_dtype, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1006; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_n_s_i, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1006; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (!__pyx_t_2) { __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_dtype, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1006; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_n_s_u, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1006; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_4 = __pyx_t_3; } else { __pyx_t_4 = __pyx_t_2; } if (__pyx_t_4) { /* "pandas/parser.pyx":1007 * * if dtype[1] == 'i' or dtype[1] == 'u': * result, na_count = _try_int64(self.parser, i, start, end, # <<<<<<<<<<<<<< * na_filter, na_hashset) * if user_dtype and na_count > 0: */ __pyx_t_1 = __pyx_f_6pandas_6parser__try_int64(__pyx_v_self->parser, __pyx_v_i, __pyx_v_start, __pyx_v_end, __pyx_v_na_filter, __pyx_v_na_hashset); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1007; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) { PyObject* sequence = __pyx_t_1; #if CYTHON_COMPILING_IN_CPYTHON Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1007; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_5 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_6 = PyTuple_GET_ITEM(sequence, 1); } else { __pyx_t_5 = PyList_GET_ITEM(sequence, 0); __pyx_t_6 = PyList_GET_ITEM(sequence, 1); } __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(__pyx_t_6); #else __pyx_t_5 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1007; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1007; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } else { Py_ssize_t index = -1; __pyx_t_7 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1007; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_8 = Py_TYPE(__pyx_t_7)->tp_iternext; index = 0; __pyx_t_5 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_5)) goto __pyx_L4_unpacking_failed; __Pyx_GOTREF(__pyx_t_5); index = 1; __pyx_t_6 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_6)) goto __pyx_L4_unpacking_failed; __Pyx_GOTREF(__pyx_t_6); if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_7), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1007; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_8 = NULL; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; goto __pyx_L5_unpacking_done; __pyx_L4_unpacking_failed:; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_8 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1007; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_L5_unpacking_done:; } __pyx_v_result = __pyx_t_5; __pyx_t_5 = 0; __pyx_v_na_count = __pyx_t_6; __pyx_t_6 = 0; /* "pandas/parser.pyx":1009 * result, na_count = _try_int64(self.parser, i, start, end, * na_filter, na_hashset) * if user_dtype and na_count > 0: # <<<<<<<<<<<<<< * raise Exception('Integer column has NA values') * */ __pyx_t_4 = __pyx_v_user_dtype; if (__pyx_t_4) { __pyx_t_1 = PyObject_RichCompare(__pyx_v_na_count, __pyx_int_0, Py_GT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1009; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1009; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_3 = __pyx_t_2; } else { __pyx_t_3 = __pyx_t_4; } if (__pyx_t_3) { /* "pandas/parser.pyx":1010 * na_filter, na_hashset) * if user_dtype and na_count > 0: * raise Exception('Integer column has NA values') # <<<<<<<<<<<<<< * * if dtype[1:] != 'i8': */ __pyx_t_1 = PyObject_Call(__pyx_builtin_Exception, __pyx_tuple__20, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1010; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 1010; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } /* "pandas/parser.pyx":1012 * raise Exception('Integer column has NA values') * * if dtype[1:] != 'i8': # <<<<<<<<<<<<<< * result = result.astype(dtype) * */ __pyx_t_1 = __Pyx_PyObject_GetSlice(__pyx_v_dtype, 1, 0, NULL, NULL, &__pyx_slice__21, 1, 0, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1012; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_n_s_i8, Py_NE)); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1012; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_3) { /* "pandas/parser.pyx":1013 * * if dtype[1:] != 'i8': * result = result.astype(dtype) # <<<<<<<<<<<<<< * * return result, na_count */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_result, __pyx_n_s_astype); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1013; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1013; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(__pyx_v_dtype); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_dtype); __Pyx_GIVEREF(__pyx_v_dtype); __pyx_t_5 = PyObject_Call(__pyx_t_1, __pyx_t_6, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1013; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF_SET(__pyx_v_result, __pyx_t_5); __pyx_t_5 = 0; goto __pyx_L7; } __pyx_L7:; /* "pandas/parser.pyx":1015 * result = result.astype(dtype) * * return result, na_count # <<<<<<<<<<<<<< * * elif dtype[1] == 'f': */ __Pyx_XDECREF(__pyx_r); __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1015; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_v_result); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_result); __Pyx_GIVEREF(__pyx_v_result); __Pyx_INCREF(__pyx_v_na_count); PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_v_na_count); __Pyx_GIVEREF(__pyx_v_na_count); __pyx_r = __pyx_t_5; __pyx_t_5 = 0; goto __pyx_L0; } /* "pandas/parser.pyx":1017 * return result, na_count * * elif dtype[1] == 'f': # <<<<<<<<<<<<<< * result, na_count = _try_double(self.parser, i, start, end, * na_filter, na_hashset, na_flist) */ __pyx_t_5 = __Pyx_GetItemInt(__pyx_v_dtype, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_5 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1017; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_t_5, __pyx_n_s_f, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1017; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_3) { /* "pandas/parser.pyx":1018 * * elif dtype[1] == 'f': * result, na_count = _try_double(self.parser, i, start, end, # <<<<<<<<<<<<<< * na_filter, na_hashset, na_flist) * */ __pyx_t_5 = __pyx_f_6pandas_6parser__try_double(__pyx_v_self->parser, __pyx_v_i, __pyx_v_start, __pyx_v_end, __pyx_v_na_filter, __pyx_v_na_hashset, __pyx_v_na_flist); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1018; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); if ((likely(PyTuple_CheckExact(__pyx_t_5))) || (PyList_CheckExact(__pyx_t_5))) { PyObject* sequence = __pyx_t_5; #if CYTHON_COMPILING_IN_CPYTHON Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1018; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_6 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_1 = PyTuple_GET_ITEM(sequence, 1); } else { __pyx_t_6 = PyList_GET_ITEM(sequence, 0); __pyx_t_1 = PyList_GET_ITEM(sequence, 1); } __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(__pyx_t_1); #else __pyx_t_6 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1018; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_1 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1018; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); #endif __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } else { Py_ssize_t index = -1; __pyx_t_7 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1018; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_8 = Py_TYPE(__pyx_t_7)->tp_iternext; index = 0; __pyx_t_6 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_6)) goto __pyx_L8_unpacking_failed; __Pyx_GOTREF(__pyx_t_6); index = 1; __pyx_t_1 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_1)) goto __pyx_L8_unpacking_failed; __Pyx_GOTREF(__pyx_t_1); if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_7), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1018; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_8 = NULL; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; goto __pyx_L9_unpacking_done; __pyx_L8_unpacking_failed:; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_8 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1018; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_L9_unpacking_done:; } __pyx_v_result = __pyx_t_6; __pyx_t_6 = 0; __pyx_v_na_count = __pyx_t_1; __pyx_t_1 = 0; /* "pandas/parser.pyx":1021 * na_filter, na_hashset, na_flist) * * if dtype[1:] != 'f8': # <<<<<<<<<<<<<< * result = result.astype(dtype) * return result, na_count */ __pyx_t_5 = __Pyx_PyObject_GetSlice(__pyx_v_dtype, 1, 0, NULL, NULL, &__pyx_slice__22, 1, 0, 1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1021; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_t_5, __pyx_n_s_f8, Py_NE)); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1021; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_3) { /* "pandas/parser.pyx":1022 * * if dtype[1:] != 'f8': * result = result.astype(dtype) # <<<<<<<<<<<<<< * return result, na_count * */ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_result, __pyx_n_s_astype); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1022; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1022; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_dtype); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_dtype); __Pyx_GIVEREF(__pyx_v_dtype); __pyx_t_6 = PyObject_Call(__pyx_t_5, __pyx_t_1, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1022; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF_SET(__pyx_v_result, __pyx_t_6); __pyx_t_6 = 0; goto __pyx_L10; } __pyx_L10:; /* "pandas/parser.pyx":1023 * if dtype[1:] != 'f8': * result = result.astype(dtype) * return result, na_count # <<<<<<<<<<<<<< * * elif dtype[1] == 'b': */ __Pyx_XDECREF(__pyx_r); __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1023; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(__pyx_v_result); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_result); __Pyx_GIVEREF(__pyx_v_result); __Pyx_INCREF(__pyx_v_na_count); PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_v_na_count); __Pyx_GIVEREF(__pyx_v_na_count); __pyx_r = __pyx_t_6; __pyx_t_6 = 0; goto __pyx_L0; } /* "pandas/parser.pyx":1025 * return result, na_count * * elif dtype[1] == 'b': # <<<<<<<<<<<<<< * if self.true_values is not None or self.false_values is not None: * */ __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_dtype, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_6 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1025; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_6); __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_t_6, __pyx_n_s_b, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1025; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (__pyx_t_3) { /* "pandas/parser.pyx":1026 * * elif dtype[1] == 'b': * if self.true_values is not None or self.false_values is not None: # <<<<<<<<<<<<<< * * true_set = kset_from_list(self.true_values + _true_values) */ __pyx_t_3 = (__pyx_v_self->true_values != Py_None); if (!(__pyx_t_3 != 0)) { __pyx_t_4 = (__pyx_v_self->false_values != Py_None); __pyx_t_2 = (__pyx_t_4 != 0); } else { __pyx_t_2 = (__pyx_t_3 != 0); } if (__pyx_t_2) { /* "pandas/parser.pyx":1028 * if self.true_values is not None or self.false_values is not None: * * true_set = kset_from_list(self.true_values + _true_values) # <<<<<<<<<<<<<< * false_set = kset_from_list(self.false_values + _false_values) * result, na_count = _try_bool_flex(self.parser, i, start, end, */ __pyx_t_6 = PyNumber_Add(__pyx_v_self->true_values, __pyx_v_6pandas_6parser__true_values); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1028; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); if (!(likely(PyList_CheckExact(__pyx_t_6))||((__pyx_t_6) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_t_6)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1028; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_9 = __pyx_f_6pandas_6parser_kset_from_list(((PyObject*)__pyx_t_6)); if (unlikely(__pyx_t_9 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1028; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_v_true_set = __pyx_t_9; /* "pandas/parser.pyx":1029 * * true_set = kset_from_list(self.true_values + _true_values) * false_set = kset_from_list(self.false_values + _false_values) # <<<<<<<<<<<<<< * result, na_count = _try_bool_flex(self.parser, i, start, end, * na_filter, na_hashset, */ __pyx_t_6 = PyNumber_Add(__pyx_v_self->false_values, __pyx_v_6pandas_6parser__false_values); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1029; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); if (!(likely(PyList_CheckExact(__pyx_t_6))||((__pyx_t_6) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_t_6)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1029; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_9 = __pyx_f_6pandas_6parser_kset_from_list(((PyObject*)__pyx_t_6)); if (unlikely(__pyx_t_9 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1029; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_v_false_set = __pyx_t_9; /* "pandas/parser.pyx":1030 * true_set = kset_from_list(self.true_values + _true_values) * false_set = kset_from_list(self.false_values + _false_values) * result, na_count = _try_bool_flex(self.parser, i, start, end, # <<<<<<<<<<<<<< * na_filter, na_hashset, * true_set, false_set) */ __pyx_t_6 = __pyx_f_6pandas_6parser__try_bool_flex(__pyx_v_self->parser, __pyx_v_i, __pyx_v_start, __pyx_v_end, __pyx_v_na_filter, __pyx_v_na_hashset, __pyx_v_true_set, __pyx_v_false_set); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1030; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); if ((likely(PyTuple_CheckExact(__pyx_t_6))) || (PyList_CheckExact(__pyx_t_6))) { PyObject* sequence = __pyx_t_6; #if CYTHON_COMPILING_IN_CPYTHON Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1030; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_1 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_5 = PyTuple_GET_ITEM(sequence, 1); } else { __pyx_t_1 = PyList_GET_ITEM(sequence, 0); __pyx_t_5 = PyList_GET_ITEM(sequence, 1); } __Pyx_INCREF(__pyx_t_1); __Pyx_INCREF(__pyx_t_5); #else __pyx_t_1 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1030; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_5 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1030; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); #endif __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } else { Py_ssize_t index = -1; __pyx_t_7 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1030; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_8 = Py_TYPE(__pyx_t_7)->tp_iternext; index = 0; __pyx_t_1 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_1)) goto __pyx_L12_unpacking_failed; __Pyx_GOTREF(__pyx_t_1); index = 1; __pyx_t_5 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_5)) goto __pyx_L12_unpacking_failed; __Pyx_GOTREF(__pyx_t_5); if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_7), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1030; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_8 = NULL; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; goto __pyx_L13_unpacking_done; __pyx_L12_unpacking_failed:; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_8 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1030; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_L13_unpacking_done:; } __pyx_v_result = __pyx_t_1; __pyx_t_1 = 0; __pyx_v_na_count = __pyx_t_5; __pyx_t_5 = 0; /* "pandas/parser.pyx":1033 * na_filter, na_hashset, * true_set, false_set) * kh_destroy_str(true_set) # <<<<<<<<<<<<<< * kh_destroy_str(false_set) * else: */ kh_destroy_str(__pyx_v_true_set); /* "pandas/parser.pyx":1034 * true_set, false_set) * kh_destroy_str(true_set) * kh_destroy_str(false_set) # <<<<<<<<<<<<<< * else: * result, na_count = _try_bool(self.parser, i, start, end, */ kh_destroy_str(__pyx_v_false_set); goto __pyx_L11; } /*else*/ { /* "pandas/parser.pyx":1036 * kh_destroy_str(false_set) * else: * result, na_count = _try_bool(self.parser, i, start, end, # <<<<<<<<<<<<<< * na_filter, na_hashset) * return result, na_count */ __pyx_t_6 = __pyx_f_6pandas_6parser__try_bool(__pyx_v_self->parser, __pyx_v_i, __pyx_v_start, __pyx_v_end, __pyx_v_na_filter, __pyx_v_na_hashset); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1036; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); if ((likely(PyTuple_CheckExact(__pyx_t_6))) || (PyList_CheckExact(__pyx_t_6))) { PyObject* sequence = __pyx_t_6; #if CYTHON_COMPILING_IN_CPYTHON Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1036; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_5 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_1 = PyTuple_GET_ITEM(sequence, 1); } else { __pyx_t_5 = PyList_GET_ITEM(sequence, 0); __pyx_t_1 = PyList_GET_ITEM(sequence, 1); } __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(__pyx_t_1); #else __pyx_t_5 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1036; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_1 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1036; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); #endif __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } else { Py_ssize_t index = -1; __pyx_t_7 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1036; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_8 = Py_TYPE(__pyx_t_7)->tp_iternext; index = 0; __pyx_t_5 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_5)) goto __pyx_L14_unpacking_failed; __Pyx_GOTREF(__pyx_t_5); index = 1; __pyx_t_1 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_1)) goto __pyx_L14_unpacking_failed; __Pyx_GOTREF(__pyx_t_1); if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_7), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1036; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_8 = NULL; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; goto __pyx_L15_unpacking_done; __pyx_L14_unpacking_failed:; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_8 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1036; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_L15_unpacking_done:; } __pyx_v_result = __pyx_t_5; __pyx_t_5 = 0; __pyx_v_na_count = __pyx_t_1; __pyx_t_1 = 0; } __pyx_L11:; /* "pandas/parser.pyx":1038 * result, na_count = _try_bool(self.parser, i, start, end, * na_filter, na_hashset) * return result, na_count # <<<<<<<<<<<<<< * elif dtype[1] == 'c': * raise NotImplementedError("the dtype %s is not supported for parsing" % dtype) */ __Pyx_XDECREF(__pyx_r); __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1038; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(__pyx_v_result); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_result); __Pyx_GIVEREF(__pyx_v_result); __Pyx_INCREF(__pyx_v_na_count); PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_v_na_count); __Pyx_GIVEREF(__pyx_v_na_count); __pyx_r = __pyx_t_6; __pyx_t_6 = 0; goto __pyx_L0; } /* "pandas/parser.pyx":1039 * na_filter, na_hashset) * return result, na_count * elif dtype[1] == 'c': # <<<<<<<<<<<<<< * raise NotImplementedError("the dtype %s is not supported for parsing" % dtype) * */ __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_dtype, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_6 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1039; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_6); __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_t_6, __pyx_n_s_c, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1039; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (__pyx_t_2) { /* "pandas/parser.pyx":1040 * return result, na_count * elif dtype[1] == 'c': * raise NotImplementedError("the dtype %s is not supported for parsing" % dtype) # <<<<<<<<<<<<<< * * elif dtype[1] == 'S': */ __pyx_t_6 = __Pyx_PyString_Format(__pyx_kp_s_the_dtype_s_is_not_supported_for, __pyx_v_dtype); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1040; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1040; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyObject_Call(__pyx_builtin_NotImplementedError, __pyx_t_1, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1040; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_Raise(__pyx_t_6, 0, 0, 0); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1040; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } /* "pandas/parser.pyx":1042 * raise NotImplementedError("the dtype %s is not supported for parsing" % dtype) * * elif dtype[1] == 'S': # <<<<<<<<<<<<<< * # TODO: na handling * width = int(dtype[2:]) */ __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_dtype, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_6 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1042; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_6); __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_t_6, __pyx_n_s_S, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1042; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (__pyx_t_2) { /* "pandas/parser.pyx":1044 * elif dtype[1] == 'S': * # TODO: na handling * width = int(dtype[2:]) # <<<<<<<<<<<<<< * if width > 0: * result = _to_fw_string(self.parser, i, start, end, width) */ __pyx_t_6 = __Pyx_PyObject_GetSlice(__pyx_v_dtype, 2, 0, NULL, NULL, &__pyx_slice__23, 1, 0, 1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1044; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_1 = PyNumber_Int(__pyx_t_6); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1044; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_v_width = __pyx_t_1; __pyx_t_1 = 0; /* "pandas/parser.pyx":1045 * # TODO: na handling * width = int(dtype[2:]) * if width > 0: # <<<<<<<<<<<<<< * result = _to_fw_string(self.parser, i, start, end, width) * return result, 0 */ __pyx_t_1 = PyObject_RichCompare(__pyx_v_width, __pyx_int_0, Py_GT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1045; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1045; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_2) { /* "pandas/parser.pyx":1046 * width = int(dtype[2:]) * if width > 0: * result = _to_fw_string(self.parser, i, start, end, width) # <<<<<<<<<<<<<< * return result, 0 * */ __pyx_t_10 = __Pyx_PyInt_As_size_t(__pyx_v_width); if (unlikely((__pyx_t_10 == (size_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1046; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_1 = __pyx_f_6pandas_6parser__to_fw_string(__pyx_v_self->parser, __pyx_v_i, __pyx_v_start, __pyx_v_end, __pyx_t_10); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1046; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_v_result = __pyx_t_1; __pyx_t_1 = 0; /* "pandas/parser.pyx":1047 * if width > 0: * result = _to_fw_string(self.parser, i, start, end, width) * return result, 0 # <<<<<<<<<<<<<< * * # treat as a regular string parsing */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1047; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_result); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_result); __Pyx_GIVEREF(__pyx_v_result); __Pyx_INCREF(__pyx_int_0); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_0); __Pyx_GIVEREF(__pyx_int_0); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; } /* "pandas/parser.pyx":1050 * * # treat as a regular string parsing * return self._string_convert(i, start, end, na_filter, # <<<<<<<<<<<<<< * na_hashset) * elif dtype[1] == 'U': */ __Pyx_XDECREF(__pyx_r); /* "pandas/parser.pyx":1051 * # treat as a regular string parsing * return self._string_convert(i, start, end, na_filter, * na_hashset) # <<<<<<<<<<<<<< * elif dtype[1] == 'U': * width = int(dtype[2:]) */ __pyx_t_1 = ((struct __pyx_vtabstruct_6pandas_6parser_TextReader *)__pyx_v_self->__pyx_vtab)->_string_convert(__pyx_v_self, __pyx_v_i, __pyx_v_start, __pyx_v_end, __pyx_v_na_filter, __pyx_v_na_hashset); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1050; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; } /* "pandas/parser.pyx":1052 * return self._string_convert(i, start, end, na_filter, * na_hashset) * elif dtype[1] == 'U': # <<<<<<<<<<<<<< * width = int(dtype[2:]) * if width > 0: */ __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_dtype, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1052; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_n_s_U, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1052; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_2) { /* "pandas/parser.pyx":1053 * na_hashset) * elif dtype[1] == 'U': * width = int(dtype[2:]) # <<<<<<<<<<<<<< * if width > 0: * raise NotImplementedError("the dtype %s is not supported for parsing" % dtype) */ __pyx_t_1 = __Pyx_PyObject_GetSlice(__pyx_v_dtype, 2, 0, NULL, NULL, &__pyx_slice__24, 1, 0, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1053; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_6 = PyNumber_Int(__pyx_t_1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1053; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_width = __pyx_t_6; __pyx_t_6 = 0; /* "pandas/parser.pyx":1054 * elif dtype[1] == 'U': * width = int(dtype[2:]) * if width > 0: # <<<<<<<<<<<<<< * raise NotImplementedError("the dtype %s is not supported for parsing" % dtype) * */ __pyx_t_6 = PyObject_RichCompare(__pyx_v_width, __pyx_int_0, Py_GT); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1054; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1054; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (__pyx_t_2) { /* "pandas/parser.pyx":1055 * width = int(dtype[2:]) * if width > 0: * raise NotImplementedError("the dtype %s is not supported for parsing" % dtype) # <<<<<<<<<<<<<< * * # unicode variable width */ __pyx_t_6 = __Pyx_PyString_Format(__pyx_kp_s_the_dtype_s_is_not_supported_for, __pyx_v_dtype); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1055; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1055; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyObject_Call(__pyx_builtin_NotImplementedError, __pyx_t_1, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1055; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_Raise(__pyx_t_6, 0, 0, 0); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1055; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } /* "pandas/parser.pyx":1058 * * # unicode variable width * return self._string_convert(i, start, end, na_filter, # <<<<<<<<<<<<<< * na_hashset) * */ __Pyx_XDECREF(__pyx_r); /* "pandas/parser.pyx":1059 * # unicode variable width * return self._string_convert(i, start, end, na_filter, * na_hashset) # <<<<<<<<<<<<<< * * */ __pyx_t_6 = ((struct __pyx_vtabstruct_6pandas_6parser_TextReader *)__pyx_v_self->__pyx_vtab)->_string_convert(__pyx_v_self, __pyx_v_i, __pyx_v_start, __pyx_v_end, __pyx_v_na_filter, __pyx_v_na_hashset); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1058; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_r = __pyx_t_6; __pyx_t_6 = 0; goto __pyx_L0; } /* "pandas/parser.pyx":1062 * * * elif dtype[1] == 'O': # <<<<<<<<<<<<<< * return self._string_convert(i, start, end, na_filter, * na_hashset) */ __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_dtype, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_6 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1062; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_6); __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_t_6, __pyx_n_s_O, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1062; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (__pyx_t_2) { /* "pandas/parser.pyx":1063 * * elif dtype[1] == 'O': * return self._string_convert(i, start, end, na_filter, # <<<<<<<<<<<<<< * na_hashset) * else: */ __Pyx_XDECREF(__pyx_r); /* "pandas/parser.pyx":1064 * elif dtype[1] == 'O': * return self._string_convert(i, start, end, na_filter, * na_hashset) # <<<<<<<<<<<<<< * else: * if dtype[1] == 'M': */ __pyx_t_6 = ((struct __pyx_vtabstruct_6pandas_6parser_TextReader *)__pyx_v_self->__pyx_vtab)->_string_convert(__pyx_v_self, __pyx_v_i, __pyx_v_start, __pyx_v_end, __pyx_v_na_filter, __pyx_v_na_hashset); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1063; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_r = __pyx_t_6; __pyx_t_6 = 0; goto __pyx_L0; } /*else*/ { /* "pandas/parser.pyx":1066 * na_hashset) * else: * if dtype[1] == 'M': # <<<<<<<<<<<<<< * raise TypeError("the dtype %s is not supported for parsing, " * "pass this column using parse_dates instead" % dtype) */ __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_dtype, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_6 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1066; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_6); __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_t_6, __pyx_n_s_M, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1066; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (__pyx_t_2) { /* "pandas/parser.pyx":1068 * if dtype[1] == 'M': * raise TypeError("the dtype %s is not supported for parsing, " * "pass this column using parse_dates instead" % dtype) # <<<<<<<<<<<<<< * raise TypeError("the dtype %s is not supported for parsing" % dtype) * */ __pyx_t_6 = __Pyx_PyString_Format(__pyx_kp_s_the_dtype_s_is_not_supported_for_2, __pyx_v_dtype); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1068; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); /* "pandas/parser.pyx":1067 * else: * if dtype[1] == 'M': * raise TypeError("the dtype %s is not supported for parsing, " # <<<<<<<<<<<<<< * "pass this column using parse_dates instead" % dtype) * raise TypeError("the dtype %s is not supported for parsing" % dtype) */ __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1067; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyObject_Call(__pyx_builtin_TypeError, __pyx_t_1, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1067; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_Raise(__pyx_t_6, 0, 0, 0); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1067; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } /* "pandas/parser.pyx":1069 * raise TypeError("the dtype %s is not supported for parsing, " * "pass this column using parse_dates instead" % dtype) * raise TypeError("the dtype %s is not supported for parsing" % dtype) # <<<<<<<<<<<<<< * * cdef _string_convert(self, Py_ssize_t i, int start, int end, */ __pyx_t_6 = __Pyx_PyString_Format(__pyx_kp_s_the_dtype_s_is_not_supported_for, __pyx_v_dtype); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1069; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1069; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyObject_Call(__pyx_builtin_TypeError, __pyx_t_1, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1069; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_Raise(__pyx_t_6, 0, 0, 0); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1069; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } /* "pandas/parser.pyx":998 * return col_res, na_count * * cdef _convert_with_dtype(self, object dtype, Py_ssize_t i, # <<<<<<<<<<<<<< * int start, int end, * bint na_filter, */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_AddTraceback("pandas.parser.TextReader._convert_with_dtype", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_result); __Pyx_XDECREF(__pyx_v_na_count); __Pyx_XDECREF(__pyx_v_width); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/parser.pyx":1071 * raise TypeError("the dtype %s is not supported for parsing" % dtype) * * cdef _string_convert(self, Py_ssize_t i, int start, int end, # <<<<<<<<<<<<<< * bint na_filter, kh_str_t *na_hashset): * if PY3: */ static PyObject *__pyx_f_6pandas_6parser_10TextReader__string_convert(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self, Py_ssize_t __pyx_v_i, int __pyx_v_start, int __pyx_v_end, int __pyx_v_na_filter, kh_str_t *__pyx_v_na_hashset) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_string_convert", 0); /* "pandas/parser.pyx":1073 * cdef _string_convert(self, Py_ssize_t i, int start, int end, * bint na_filter, kh_str_t *na_hashset): * if PY3: # <<<<<<<<<<<<<< * if self.c_encoding != NULL: * if self.c_encoding == b"utf-8": */ __pyx_t_1 = (__pyx_v_6pandas_6parser_PY3 != 0); if (__pyx_t_1) { /* "pandas/parser.pyx":1074 * bint na_filter, kh_str_t *na_hashset): * if PY3: * if self.c_encoding != NULL: # <<<<<<<<<<<<<< * if self.c_encoding == b"utf-8": * return _string_box_utf8(self.parser, i, start, end, */ __pyx_t_1 = ((__pyx_v_self->c_encoding != NULL) != 0); if (__pyx_t_1) { /* "pandas/parser.pyx":1075 * if PY3: * if self.c_encoding != NULL: * if self.c_encoding == b"utf-8": # <<<<<<<<<<<<<< * return _string_box_utf8(self.parser, i, start, end, * na_filter, na_hashset) */ __pyx_t_2 = __Pyx_PyBytes_FromString(__pyx_v_self->c_encoding); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1075; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = (__Pyx_PyBytes_Equals(__pyx_t_2, __pyx_kp_b_utf_8, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1075; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_1) { /* "pandas/parser.pyx":1076 * if self.c_encoding != NULL: * if self.c_encoding == b"utf-8": * return _string_box_utf8(self.parser, i, start, end, # <<<<<<<<<<<<<< * na_filter, na_hashset) * else: */ __Pyx_XDECREF(__pyx_r); /* "pandas/parser.pyx":1077 * if self.c_encoding == b"utf-8": * return _string_box_utf8(self.parser, i, start, end, * na_filter, na_hashset) # <<<<<<<<<<<<<< * else: * return _string_box_decode(self.parser, i, start, end, */ __pyx_t_2 = __pyx_f_6pandas_6parser__string_box_utf8(__pyx_v_self->parser, __pyx_v_i, __pyx_v_start, __pyx_v_end, __pyx_v_na_filter, __pyx_v_na_hashset); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1076; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; } /*else*/ { /* "pandas/parser.pyx":1079 * na_filter, na_hashset) * else: * return _string_box_decode(self.parser, i, start, end, # <<<<<<<<<<<<<< * na_filter, na_hashset, * self.c_encoding) */ __Pyx_XDECREF(__pyx_r); /* "pandas/parser.pyx":1081 * return _string_box_decode(self.parser, i, start, end, * na_filter, na_hashset, * self.c_encoding) # <<<<<<<<<<<<<< * else: * return _string_box_utf8(self.parser, i, start, end, */ __pyx_t_2 = __pyx_f_6pandas_6parser__string_box_decode(__pyx_v_self->parser, __pyx_v_i, __pyx_v_start, __pyx_v_end, __pyx_v_na_filter, __pyx_v_na_hashset, __pyx_v_self->c_encoding); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1079; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; } } /*else*/ { /* "pandas/parser.pyx":1083 * self.c_encoding) * else: * return _string_box_utf8(self.parser, i, start, end, # <<<<<<<<<<<<<< * na_filter, na_hashset) * else: */ __Pyx_XDECREF(__pyx_r); /* "pandas/parser.pyx":1084 * else: * return _string_box_utf8(self.parser, i, start, end, * na_filter, na_hashset) # <<<<<<<<<<<<<< * else: * if self.c_encoding != NULL: */ __pyx_t_2 = __pyx_f_6pandas_6parser__string_box_utf8(__pyx_v_self->parser, __pyx_v_i, __pyx_v_start, __pyx_v_end, __pyx_v_na_filter, __pyx_v_na_hashset); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1083; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; } } /*else*/ { /* "pandas/parser.pyx":1086 * na_filter, na_hashset) * else: * if self.c_encoding != NULL: # <<<<<<<<<<<<<< * if self.c_encoding == b"utf-8": * return _string_box_utf8(self.parser, i, start, end, */ __pyx_t_1 = ((__pyx_v_self->c_encoding != NULL) != 0); if (__pyx_t_1) { /* "pandas/parser.pyx":1087 * else: * if self.c_encoding != NULL: * if self.c_encoding == b"utf-8": # <<<<<<<<<<<<<< * return _string_box_utf8(self.parser, i, start, end, * na_filter, na_hashset) */ __pyx_t_2 = __Pyx_PyBytes_FromString(__pyx_v_self->c_encoding); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1087; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = (__Pyx_PyBytes_Equals(__pyx_t_2, __pyx_kp_b_utf_8, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1087; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_1) { /* "pandas/parser.pyx":1088 * if self.c_encoding != NULL: * if self.c_encoding == b"utf-8": * return _string_box_utf8(self.parser, i, start, end, # <<<<<<<<<<<<<< * na_filter, na_hashset) * else: */ __Pyx_XDECREF(__pyx_r); /* "pandas/parser.pyx":1089 * if self.c_encoding == b"utf-8": * return _string_box_utf8(self.parser, i, start, end, * na_filter, na_hashset) # <<<<<<<<<<<<<< * else: * return _string_box_decode(self.parser, i, start, end, */ __pyx_t_2 = __pyx_f_6pandas_6parser__string_box_utf8(__pyx_v_self->parser, __pyx_v_i, __pyx_v_start, __pyx_v_end, __pyx_v_na_filter, __pyx_v_na_hashset); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1088; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; } /*else*/ { /* "pandas/parser.pyx":1091 * na_filter, na_hashset) * else: * return _string_box_decode(self.parser, i, start, end, # <<<<<<<<<<<<<< * na_filter, na_hashset, * self.c_encoding) */ __Pyx_XDECREF(__pyx_r); /* "pandas/parser.pyx":1093 * return _string_box_decode(self.parser, i, start, end, * na_filter, na_hashset, * self.c_encoding) # <<<<<<<<<<<<<< * else: * return _string_box_factorize(self.parser, i, start, end, */ __pyx_t_2 = __pyx_f_6pandas_6parser__string_box_decode(__pyx_v_self->parser, __pyx_v_i, __pyx_v_start, __pyx_v_end, __pyx_v_na_filter, __pyx_v_na_hashset, __pyx_v_self->c_encoding); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1091; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; } } /*else*/ { /* "pandas/parser.pyx":1095 * self.c_encoding) * else: * return _string_box_factorize(self.parser, i, start, end, # <<<<<<<<<<<<<< * na_filter, na_hashset) * */ __Pyx_XDECREF(__pyx_r); /* "pandas/parser.pyx":1096 * else: * return _string_box_factorize(self.parser, i, start, end, * na_filter, na_hashset) # <<<<<<<<<<<<<< * * def _get_converter(self, i, name): */ __pyx_t_2 = __pyx_f_6pandas_6parser__string_box_factorize(__pyx_v_self->parser, __pyx_v_i, __pyx_v_start, __pyx_v_end, __pyx_v_na_filter, __pyx_v_na_hashset); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1095; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; } } /* "pandas/parser.pyx":1071 * raise TypeError("the dtype %s is not supported for parsing" % dtype) * * cdef _string_convert(self, Py_ssize_t i, int start, int end, # <<<<<<<<<<<<<< * bint na_filter, kh_str_t *na_hashset): * if PY3: */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("pandas.parser.TextReader._string_convert", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/parser.pyx":1098 * na_filter, na_hashset) * * def _get_converter(self, i, name): # <<<<<<<<<<<<<< * if self.converters is None: * return None */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_6parser_10TextReader_19_get_converter(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_6pandas_6parser_10TextReader_19_get_converter(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_i = 0; PyObject *__pyx_v_name = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_get_converter (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_i,&__pyx_n_s_name,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_name)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("_get_converter", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1098; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_get_converter") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1098; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } __pyx_v_i = values[0]; __pyx_v_name = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("_get_converter", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1098; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.parser.TextReader._get_converter", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pandas_6parser_10TextReader_18_get_converter(((struct __pyx_obj_6pandas_6parser_TextReader *)__pyx_v_self), __pyx_v_i, __pyx_v_name); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_6parser_10TextReader_18_get_converter(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self, PyObject *__pyx_v_i, PyObject *__pyx_v_name) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_get_converter", 0); /* "pandas/parser.pyx":1099 * * def _get_converter(self, i, name): * if self.converters is None: # <<<<<<<<<<<<<< * return None * */ __pyx_t_1 = (__pyx_v_self->converters == Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { /* "pandas/parser.pyx":1100 * def _get_converter(self, i, name): * if self.converters is None: * return None # <<<<<<<<<<<<<< * * if name is not None and name in self.converters: */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(Py_None); __pyx_r = Py_None; goto __pyx_L0; } /* "pandas/parser.pyx":1102 * return None * * if name is not None and name in self.converters: # <<<<<<<<<<<<<< * return self.converters[name] * */ __pyx_t_2 = (__pyx_v_name != Py_None); if ((__pyx_t_2 != 0)) { __pyx_t_1 = (__Pyx_PySequence_Contains(__pyx_v_name, __pyx_v_self->converters, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1102; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_3 = (__pyx_t_1 != 0); } else { __pyx_t_3 = (__pyx_t_2 != 0); } if (__pyx_t_3) { /* "pandas/parser.pyx":1103 * * if name is not None and name in self.converters: * return self.converters[name] # <<<<<<<<<<<<<< * * # Converter for position, if any */ __Pyx_XDECREF(__pyx_r); __pyx_t_4 = PyObject_GetItem(__pyx_v_self->converters, __pyx_v_name); if (unlikely(__pyx_t_4 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1103; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_4); __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; } /* "pandas/parser.pyx":1106 * * # Converter for position, if any * return self.converters.get(i) # <<<<<<<<<<<<<< * * cdef _get_na_list(self, i, name): */ __Pyx_XDECREF(__pyx_r); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->converters, __pyx_n_s_get); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1106; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1106; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_v_i); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_i); __Pyx_GIVEREF(__pyx_v_i); __pyx_t_6 = PyObject_Call(__pyx_t_4, __pyx_t_5, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1106; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_r = __pyx_t_6; __pyx_t_6 = 0; goto __pyx_L0; /* "pandas/parser.pyx":1098 * na_filter, na_hashset) * * def _get_converter(self, i, name): # <<<<<<<<<<<<<< * if self.converters is None: * return None */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("pandas.parser.TextReader._get_converter", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/parser.pyx":1108 * return self.converters.get(i) * * cdef _get_na_list(self, i, name): # <<<<<<<<<<<<<< * if self.na_values is None: * return None, set() */ static PyObject *__pyx_f_6pandas_6parser_10TextReader__get_na_list(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self, PyObject *__pyx_v_i, PyObject *__pyx_v_name) { PyObject *__pyx_v_values = NULL; PyObject *__pyx_v_fvalues = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; int __pyx_t_5; PyObject *__pyx_t_6 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_get_na_list", 0); /* "pandas/parser.pyx":1109 * * cdef _get_na_list(self, i, name): * if self.na_values is None: # <<<<<<<<<<<<<< * return None, set() * */ __pyx_t_1 = (__pyx_v_self->na_values == Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { /* "pandas/parser.pyx":1110 * cdef _get_na_list(self, i, name): * if self.na_values is None: * return None, set() # <<<<<<<<<<<<<< * * if isinstance(self.na_values, dict): */ __Pyx_XDECREF(__pyx_r); __pyx_t_3 = PySet_New(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1110; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1110; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(Py_None); PyTuple_SET_ITEM(__pyx_t_4, 0, Py_None); __Pyx_GIVEREF(Py_None); PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; } /* "pandas/parser.pyx":1112 * return None, set() * * if isinstance(self.na_values, dict): # <<<<<<<<<<<<<< * values = None * if name is not None and name in self.na_values: */ __pyx_t_4 = __pyx_v_self->na_values; __Pyx_INCREF(__pyx_t_4); __pyx_t_2 = PyDict_Check(__pyx_t_4); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_1 = (__pyx_t_2 != 0); if (__pyx_t_1) { /* "pandas/parser.pyx":1113 * * if isinstance(self.na_values, dict): * values = None # <<<<<<<<<<<<<< * if name is not None and name in self.na_values: * values = self.na_values[name] */ __Pyx_INCREF(Py_None); __pyx_v_values = Py_None; /* "pandas/parser.pyx":1114 * if isinstance(self.na_values, dict): * values = None * if name is not None and name in self.na_values: # <<<<<<<<<<<<<< * values = self.na_values[name] * if values is not None and not isinstance(values, list): */ __pyx_t_1 = (__pyx_v_name != Py_None); if ((__pyx_t_1 != 0)) { __pyx_t_2 = (__Pyx_PySequence_Contains(__pyx_v_name, __pyx_v_self->na_values, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1114; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_5 = (__pyx_t_2 != 0); } else { __pyx_t_5 = (__pyx_t_1 != 0); } if (__pyx_t_5) { /* "pandas/parser.pyx":1115 * values = None * if name is not None and name in self.na_values: * values = self.na_values[name] # <<<<<<<<<<<<<< * if values is not None and not isinstance(values, list): * values = list(values) */ __pyx_t_4 = PyObject_GetItem(__pyx_v_self->na_values, __pyx_v_name); if (unlikely(__pyx_t_4 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1115; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF_SET(__pyx_v_values, __pyx_t_4); __pyx_t_4 = 0; /* "pandas/parser.pyx":1116 * if name is not None and name in self.na_values: * values = self.na_values[name] * if values is not None and not isinstance(values, list): # <<<<<<<<<<<<<< * values = list(values) * fvalues = self.na_fvalues[name] */ __pyx_t_5 = (__pyx_v_values != Py_None); if ((__pyx_t_5 != 0)) { __pyx_t_1 = PyList_Check(__pyx_v_values); __pyx_t_2 = ((!(__pyx_t_1 != 0)) != 0); __pyx_t_1 = __pyx_t_2; } else { __pyx_t_1 = (__pyx_t_5 != 0); } if (__pyx_t_1) { /* "pandas/parser.pyx":1117 * values = self.na_values[name] * if values is not None and not isinstance(values, list): * values = list(values) # <<<<<<<<<<<<<< * fvalues = self.na_fvalues[name] * if fvalues is not None and not isinstance(fvalues, set): */ __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1117; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_v_values); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_values); __Pyx_GIVEREF(__pyx_v_values); __pyx_t_3 = PyObject_Call(((PyObject *)((PyObject*)(&PyList_Type))), __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1117; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF_SET(__pyx_v_values, __pyx_t_3); __pyx_t_3 = 0; goto __pyx_L6; } __pyx_L6:; /* "pandas/parser.pyx":1118 * if values is not None and not isinstance(values, list): * values = list(values) * fvalues = self.na_fvalues[name] # <<<<<<<<<<<<<< * if fvalues is not None and not isinstance(fvalues, set): * fvalues = set(fvalues) */ __pyx_t_3 = PyObject_GetItem(__pyx_v_self->na_fvalues, __pyx_v_name); if (unlikely(__pyx_t_3 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1118; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_3); __pyx_v_fvalues = __pyx_t_3; __pyx_t_3 = 0; /* "pandas/parser.pyx":1119 * values = list(values) * fvalues = self.na_fvalues[name] * if fvalues is not None and not isinstance(fvalues, set): # <<<<<<<<<<<<<< * fvalues = set(fvalues) * else: */ __pyx_t_1 = (__pyx_v_fvalues != Py_None); if ((__pyx_t_1 != 0)) { __pyx_t_5 = PySet_Check(__pyx_v_fvalues); __pyx_t_2 = ((!(__pyx_t_5 != 0)) != 0); __pyx_t_5 = __pyx_t_2; } else { __pyx_t_5 = (__pyx_t_1 != 0); } if (__pyx_t_5) { /* "pandas/parser.pyx":1120 * fvalues = self.na_fvalues[name] * if fvalues is not None and not isinstance(fvalues, set): * fvalues = set(fvalues) # <<<<<<<<<<<<<< * else: * if i in self.na_values: */ __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1120; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_v_fvalues); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_fvalues); __Pyx_GIVEREF(__pyx_v_fvalues); __pyx_t_4 = PyObject_Call(((PyObject *)((PyObject*)(&PySet_Type))), __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1120; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF_SET(__pyx_v_fvalues, __pyx_t_4); __pyx_t_4 = 0; goto __pyx_L7; } __pyx_L7:; goto __pyx_L5; } /*else*/ { /* "pandas/parser.pyx":1122 * fvalues = set(fvalues) * else: * if i in self.na_values: # <<<<<<<<<<<<<< * return self.na_values[i], self.na_fvalues[i] * else: */ __pyx_t_5 = (__Pyx_PySequence_Contains(__pyx_v_i, __pyx_v_self->na_values, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1122; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_1 = (__pyx_t_5 != 0); if (__pyx_t_1) { /* "pandas/parser.pyx":1123 * else: * if i in self.na_values: * return self.na_values[i], self.na_fvalues[i] # <<<<<<<<<<<<<< * else: * return _NA_VALUES, set() */ __Pyx_XDECREF(__pyx_r); __pyx_t_4 = PyObject_GetItem(__pyx_v_self->na_values, __pyx_v_i); if (unlikely(__pyx_t_4 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1123; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = PyObject_GetItem(__pyx_v_self->na_fvalues, __pyx_v_i); if (unlikely(__pyx_t_3 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1123; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_3); __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1123; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_4 = 0; __pyx_t_3 = 0; __pyx_r = __pyx_t_6; __pyx_t_6 = 0; goto __pyx_L0; } /*else*/ { /* "pandas/parser.pyx":1125 * return self.na_values[i], self.na_fvalues[i] * else: * return _NA_VALUES, set() # <<<<<<<<<<<<<< * * return _ensure_encoded(values), fvalues */ __Pyx_XDECREF(__pyx_r); __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_NA_VALUES); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1125; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_3 = PySet_New(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1125; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1125; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_6 = 0; __pyx_t_3 = 0; __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; } } __pyx_L5:; /* "pandas/parser.pyx":1127 * return _NA_VALUES, set() * * return _ensure_encoded(values), fvalues # <<<<<<<<<<<<<< * else: * if not isinstance(self.na_values, list): */ __Pyx_XDECREF(__pyx_r); __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_ensure_encoded); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1127; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1127; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_v_values); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_values); __Pyx_GIVEREF(__pyx_v_values); __pyx_t_6 = PyObject_Call(__pyx_t_4, __pyx_t_3, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1127; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1127; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_6); __Pyx_INCREF(__pyx_v_fvalues); PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_fvalues); __Pyx_GIVEREF(__pyx_v_fvalues); __pyx_t_6 = 0; __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; } /*else*/ { /* "pandas/parser.pyx":1129 * return _ensure_encoded(values), fvalues * else: * if not isinstance(self.na_values, list): # <<<<<<<<<<<<<< * self.na_values = list(self.na_values) * if not isinstance(self.na_fvalues, set): */ __pyx_t_3 = __pyx_v_self->na_values; __Pyx_INCREF(__pyx_t_3); __pyx_t_1 = PyList_Check(__pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_5 = ((!(__pyx_t_1 != 0)) != 0); if (__pyx_t_5) { /* "pandas/parser.pyx":1130 * else: * if not isinstance(self.na_values, list): * self.na_values = list(self.na_values) # <<<<<<<<<<<<<< * if not isinstance(self.na_fvalues, set): * self.na_fvalues = set(self.na_fvalues) */ __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1130; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_v_self->na_values); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_self->na_values); __Pyx_GIVEREF(__pyx_v_self->na_values); __pyx_t_6 = PyObject_Call(((PyObject *)((PyObject*)(&PyList_Type))), __pyx_t_3, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1130; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GIVEREF(__pyx_t_6); __Pyx_GOTREF(__pyx_v_self->na_values); __Pyx_DECREF(__pyx_v_self->na_values); __pyx_v_self->na_values = __pyx_t_6; __pyx_t_6 = 0; goto __pyx_L9; } __pyx_L9:; /* "pandas/parser.pyx":1131 * if not isinstance(self.na_values, list): * self.na_values = list(self.na_values) * if not isinstance(self.na_fvalues, set): # <<<<<<<<<<<<<< * self.na_fvalues = set(self.na_fvalues) * */ __pyx_t_6 = __pyx_v_self->na_fvalues; __Pyx_INCREF(__pyx_t_6); __pyx_t_5 = PySet_Check(__pyx_t_6); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_1 = ((!(__pyx_t_5 != 0)) != 0); if (__pyx_t_1) { /* "pandas/parser.pyx":1132 * self.na_values = list(self.na_values) * if not isinstance(self.na_fvalues, set): * self.na_fvalues = set(self.na_fvalues) # <<<<<<<<<<<<<< * * return _ensure_encoded(self.na_values), self.na_fvalues */ __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1132; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(__pyx_v_self->na_fvalues); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_self->na_fvalues); __Pyx_GIVEREF(__pyx_v_self->na_fvalues); __pyx_t_3 = PyObject_Call(((PyObject *)((PyObject*)(&PySet_Type))), __pyx_t_6, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1132; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GIVEREF(__pyx_t_3); __Pyx_GOTREF(__pyx_v_self->na_fvalues); __Pyx_DECREF(__pyx_v_self->na_fvalues); __pyx_v_self->na_fvalues = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L10; } __pyx_L10:; /* "pandas/parser.pyx":1134 * self.na_fvalues = set(self.na_fvalues) * * return _ensure_encoded(self.na_values), self.na_fvalues # <<<<<<<<<<<<<< * * cdef _free_na_set(self, kh_str_t *table): */ __Pyx_XDECREF(__pyx_r); __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_ensure_encoded); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1134; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1134; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(__pyx_v_self->na_values); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_self->na_values); __Pyx_GIVEREF(__pyx_v_self->na_values); __pyx_t_4 = PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1134; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1134; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __Pyx_INCREF(__pyx_v_self->na_fvalues); PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_v_self->na_fvalues); __Pyx_GIVEREF(__pyx_v_self->na_fvalues); __pyx_t_4 = 0; __pyx_r = __pyx_t_6; __pyx_t_6 = 0; goto __pyx_L0; } /* "pandas/parser.pyx":1108 * return self.converters.get(i) * * cdef _get_na_list(self, i, name): # <<<<<<<<<<<<<< * if self.na_values is None: * return None, set() */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("pandas.parser.TextReader._get_na_list", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_values); __Pyx_XDECREF(__pyx_v_fvalues); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/parser.pyx":1136 * return _ensure_encoded(self.na_values), self.na_fvalues * * cdef _free_na_set(self, kh_str_t *table): # <<<<<<<<<<<<<< * kh_destroy_str(table) * */ static PyObject *__pyx_f_6pandas_6parser_10TextReader__free_na_set(CYTHON_UNUSED struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self, kh_str_t *__pyx_v_table) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_free_na_set", 0); /* "pandas/parser.pyx":1137 * * cdef _free_na_set(self, kh_str_t *table): * kh_destroy_str(table) # <<<<<<<<<<<<<< * * cdef _get_column_name(self, Py_ssize_t i, Py_ssize_t nused): */ kh_destroy_str(__pyx_v_table); /* "pandas/parser.pyx":1136 * return _ensure_encoded(self.na_values), self.na_fvalues * * cdef _free_na_set(self, kh_str_t *table): # <<<<<<<<<<<<<< * kh_destroy_str(table) * */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/parser.pyx":1139 * kh_destroy_str(table) * * cdef _get_column_name(self, Py_ssize_t i, Py_ssize_t nused): # <<<<<<<<<<<<<< * if self.has_usecols and self.names is not None: * if len(self.names) == len(self.usecols): */ static PyObject *__pyx_f_6pandas_6parser_10TextReader__get_column_name(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self, Py_ssize_t __pyx_v_i, Py_ssize_t __pyx_v_nused) { Py_ssize_t __pyx_v_j; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; Py_ssize_t __pyx_t_4; Py_ssize_t __pyx_t_5; PyObject *__pyx_t_6 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_get_column_name", 0); /* "pandas/parser.pyx":1140 * * cdef _get_column_name(self, Py_ssize_t i, Py_ssize_t nused): * if self.has_usecols and self.names is not None: # <<<<<<<<<<<<<< * if len(self.names) == len(self.usecols): * return self.names[nused] */ if ((__pyx_v_self->has_usecols != 0)) { __pyx_t_1 = (__pyx_v_self->names != Py_None); __pyx_t_2 = (__pyx_t_1 != 0); } else { __pyx_t_2 = (__pyx_v_self->has_usecols != 0); } if (__pyx_t_2) { /* "pandas/parser.pyx":1141 * cdef _get_column_name(self, Py_ssize_t i, Py_ssize_t nused): * if self.has_usecols and self.names is not None: * if len(self.names) == len(self.usecols): # <<<<<<<<<<<<<< * return self.names[nused] * else: */ __pyx_t_3 = __pyx_v_self->names; __Pyx_INCREF(__pyx_t_3); __pyx_t_4 = PyObject_Length(__pyx_t_3); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1141; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __pyx_v_self->usecols; __Pyx_INCREF(__pyx_t_3); if (unlikely(__pyx_t_3 == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1141; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_5 = PySet_Size(__pyx_t_3); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1141; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_2 = ((__pyx_t_4 == __pyx_t_5) != 0); if (__pyx_t_2) { /* "pandas/parser.pyx":1142 * if self.has_usecols and self.names is not None: * if len(self.names) == len(self.usecols): * return self.names[nused] # <<<<<<<<<<<<<< * else: * return self.names[i - self.leading_cols] */ __Pyx_XDECREF(__pyx_r); __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_self->names, __pyx_v_nused, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(__pyx_t_3 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1142; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; } /*else*/ { /* "pandas/parser.pyx":1144 * return self.names[nused] * else: * return self.names[i - self.leading_cols] # <<<<<<<<<<<<<< * else: * if self.header is not None: */ __Pyx_XDECREF(__pyx_r); __pyx_t_5 = (__pyx_v_i - __pyx_v_self->leading_cols); __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_self->names, __pyx_t_5, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(__pyx_t_3 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1144; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; } } /*else*/ { /* "pandas/parser.pyx":1146 * return self.names[i - self.leading_cols] * else: * if self.header is not None: # <<<<<<<<<<<<<< * j = i - self.leading_cols * # hack for #2442 */ __pyx_t_2 = (__pyx_v_self->header != Py_None); __pyx_t_1 = (__pyx_t_2 != 0); if (__pyx_t_1) { /* "pandas/parser.pyx":1147 * else: * if self.header is not None: * j = i - self.leading_cols # <<<<<<<<<<<<<< * # hack for #2442 * if j == len(self.header[0]): */ __pyx_v_j = (__pyx_v_i - __pyx_v_self->leading_cols); /* "pandas/parser.pyx":1149 * j = i - self.leading_cols * # hack for #2442 * if j == len(self.header[0]): # <<<<<<<<<<<<<< * return j * else: */ __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_self->header, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_3 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1149; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = PyObject_Length(__pyx_t_3); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1149; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_1 = ((__pyx_v_j == __pyx_t_5) != 0); if (__pyx_t_1) { /* "pandas/parser.pyx":1150 * # hack for #2442 * if j == len(self.header[0]): * return j # <<<<<<<<<<<<<< * else: * return self.header[0][j] */ __Pyx_XDECREF(__pyx_r); __pyx_t_3 = PyInt_FromSsize_t(__pyx_v_j); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1150; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; } /*else*/ { /* "pandas/parser.pyx":1152 * return j * else: * return self.header[0][j] # <<<<<<<<<<<<<< * else: * return None */ __Pyx_XDECREF(__pyx_r); __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_self->header, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_3 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1152; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_3); __pyx_t_6 = __Pyx_GetItemInt(__pyx_t_3, __pyx_v_j, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(__pyx_t_6 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1152; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_r = __pyx_t_6; __pyx_t_6 = 0; goto __pyx_L0; } } /*else*/ { /* "pandas/parser.pyx":1154 * return self.header[0][j] * else: * return None # <<<<<<<<<<<<<< * * class CParserError(Exception): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(Py_None); __pyx_r = Py_None; goto __pyx_L0; } } /* "pandas/parser.pyx":1139 * kh_destroy_str(table) * * cdef _get_column_name(self, Py_ssize_t i, Py_ssize_t nused): # <<<<<<<<<<<<<< * if self.has_usecols and self.names is not None: * if len(self.names) == len(self.usecols): */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("pandas.parser.TextReader._get_column_name", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/parser.pyx":246 * * cdef public: * int leading_cols, table_width, skip_footer, buffer_lines # <<<<<<<<<<<<<< * object allow_leading_cols * object delimiter, converters, delim_whitespace */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_6parser_10TextReader_12leading_cols_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6pandas_6parser_10TextReader_12leading_cols_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_6parser_10TextReader_12leading_cols___get__(((struct __pyx_obj_6pandas_6parser_TextReader *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_6parser_10TextReader_12leading_cols___get__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->leading_cols); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 246; __pyx_clineno = __LINE__; goto __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.parser.TextReader.leading_cols.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pandas_6parser_10TextReader_12leading_cols_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ static int __pyx_pw_6pandas_6parser_10TextReader_12leading_cols_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_6parser_10TextReader_12leading_cols_2__set__(((struct __pyx_obj_6pandas_6parser_TextReader *)__pyx_v_self), ((PyObject *)__pyx_v_value)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pandas_6parser_10TextReader_12leading_cols_2__set__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__set__", 0); __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 246; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_self->leading_cols = __pyx_t_1; /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("pandas.parser.TextReader.leading_cols.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_6parser_10TextReader_11table_width_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6pandas_6parser_10TextReader_11table_width_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_6parser_10TextReader_11table_width___get__(((struct __pyx_obj_6pandas_6parser_TextReader *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_6parser_10TextReader_11table_width___get__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->table_width); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 246; __pyx_clineno = __LINE__; goto __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.parser.TextReader.table_width.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pandas_6parser_10TextReader_11table_width_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ static int __pyx_pw_6pandas_6parser_10TextReader_11table_width_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_6parser_10TextReader_11table_width_2__set__(((struct __pyx_obj_6pandas_6parser_TextReader *)__pyx_v_self), ((PyObject *)__pyx_v_value)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pandas_6parser_10TextReader_11table_width_2__set__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__set__", 0); __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 246; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_self->table_width = __pyx_t_1; /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("pandas.parser.TextReader.table_width.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_6parser_10TextReader_11skip_footer_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6pandas_6parser_10TextReader_11skip_footer_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_6parser_10TextReader_11skip_footer___get__(((struct __pyx_obj_6pandas_6parser_TextReader *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_6parser_10TextReader_11skip_footer___get__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->skip_footer); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 246; __pyx_clineno = __LINE__; goto __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.parser.TextReader.skip_footer.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pandas_6parser_10TextReader_11skip_footer_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ static int __pyx_pw_6pandas_6parser_10TextReader_11skip_footer_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_6parser_10TextReader_11skip_footer_2__set__(((struct __pyx_obj_6pandas_6parser_TextReader *)__pyx_v_self), ((PyObject *)__pyx_v_value)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pandas_6parser_10TextReader_11skip_footer_2__set__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__set__", 0); __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 246; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_self->skip_footer = __pyx_t_1; /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("pandas.parser.TextReader.skip_footer.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_6parser_10TextReader_12buffer_lines_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6pandas_6parser_10TextReader_12buffer_lines_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_6parser_10TextReader_12buffer_lines___get__(((struct __pyx_obj_6pandas_6parser_TextReader *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_6parser_10TextReader_12buffer_lines___get__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->buffer_lines); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 246; __pyx_clineno = __LINE__; goto __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.parser.TextReader.buffer_lines.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pandas_6parser_10TextReader_12buffer_lines_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ static int __pyx_pw_6pandas_6parser_10TextReader_12buffer_lines_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_6parser_10TextReader_12buffer_lines_2__set__(((struct __pyx_obj_6pandas_6parser_TextReader *)__pyx_v_self), ((PyObject *)__pyx_v_value)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pandas_6parser_10TextReader_12buffer_lines_2__set__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__set__", 0); __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 246; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_self->buffer_lines = __pyx_t_1; /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("pandas.parser.TextReader.buffer_lines.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/parser.pyx":247 * cdef public: * int leading_cols, table_width, skip_footer, buffer_lines * object allow_leading_cols # <<<<<<<<<<<<<< * object delimiter, converters, delim_whitespace * object na_values, true_values, false_values */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_6parser_10TextReader_18allow_leading_cols_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6pandas_6parser_10TextReader_18allow_leading_cols_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_6parser_10TextReader_18allow_leading_cols___get__(((struct __pyx_obj_6pandas_6parser_TextReader *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_6parser_10TextReader_18allow_leading_cols___get__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_self->allow_leading_cols); __pyx_r = __pyx_v_self->allow_leading_cols; goto __pyx_L0; /* function exit code */ __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pandas_6parser_10TextReader_18allow_leading_cols_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ static int __pyx_pw_6pandas_6parser_10TextReader_18allow_leading_cols_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_6parser_10TextReader_18allow_leading_cols_2__set__(((struct __pyx_obj_6pandas_6parser_TextReader *)__pyx_v_self), ((PyObject *)__pyx_v_value)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pandas_6parser_10TextReader_18allow_leading_cols_2__set__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__", 0); __Pyx_INCREF(__pyx_v_value); __Pyx_GIVEREF(__pyx_v_value); __Pyx_GOTREF(__pyx_v_self->allow_leading_cols); __Pyx_DECREF(__pyx_v_self->allow_leading_cols); __pyx_v_self->allow_leading_cols = __pyx_v_value; /* function exit code */ __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pandas_6parser_10TextReader_18allow_leading_cols_5__del__(PyObject *__pyx_v_self); /*proto*/ static int __pyx_pw_6pandas_6parser_10TextReader_18allow_leading_cols_5__del__(PyObject *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_6parser_10TextReader_18allow_leading_cols_4__del__(((struct __pyx_obj_6pandas_6parser_TextReader *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pandas_6parser_10TextReader_18allow_leading_cols_4__del__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__", 0); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->allow_leading_cols); __Pyx_DECREF(__pyx_v_self->allow_leading_cols); __pyx_v_self->allow_leading_cols = Py_None; /* function exit code */ __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/parser.pyx":248 * int leading_cols, table_width, skip_footer, buffer_lines * object allow_leading_cols * object delimiter, converters, delim_whitespace # <<<<<<<<<<<<<< * object na_values, true_values, false_values * object memory_map */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_6parser_10TextReader_9delimiter_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6pandas_6parser_10TextReader_9delimiter_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_6parser_10TextReader_9delimiter___get__(((struct __pyx_obj_6pandas_6parser_TextReader *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_6parser_10TextReader_9delimiter___get__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_self->delimiter); __pyx_r = __pyx_v_self->delimiter; goto __pyx_L0; /* function exit code */ __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pandas_6parser_10TextReader_9delimiter_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ static int __pyx_pw_6pandas_6parser_10TextReader_9delimiter_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_6parser_10TextReader_9delimiter_2__set__(((struct __pyx_obj_6pandas_6parser_TextReader *)__pyx_v_self), ((PyObject *)__pyx_v_value)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pandas_6parser_10TextReader_9delimiter_2__set__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__", 0); __Pyx_INCREF(__pyx_v_value); __Pyx_GIVEREF(__pyx_v_value); __Pyx_GOTREF(__pyx_v_self->delimiter); __Pyx_DECREF(__pyx_v_self->delimiter); __pyx_v_self->delimiter = __pyx_v_value; /* function exit code */ __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pandas_6parser_10TextReader_9delimiter_5__del__(PyObject *__pyx_v_self); /*proto*/ static int __pyx_pw_6pandas_6parser_10TextReader_9delimiter_5__del__(PyObject *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_6parser_10TextReader_9delimiter_4__del__(((struct __pyx_obj_6pandas_6parser_TextReader *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pandas_6parser_10TextReader_9delimiter_4__del__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__", 0); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->delimiter); __Pyx_DECREF(__pyx_v_self->delimiter); __pyx_v_self->delimiter = Py_None; /* function exit code */ __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_6parser_10TextReader_10converters_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6pandas_6parser_10TextReader_10converters_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_6parser_10TextReader_10converters___get__(((struct __pyx_obj_6pandas_6parser_TextReader *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_6parser_10TextReader_10converters___get__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_self->converters); __pyx_r = __pyx_v_self->converters; goto __pyx_L0; /* function exit code */ __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pandas_6parser_10TextReader_10converters_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ static int __pyx_pw_6pandas_6parser_10TextReader_10converters_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_6parser_10TextReader_10converters_2__set__(((struct __pyx_obj_6pandas_6parser_TextReader *)__pyx_v_self), ((PyObject *)__pyx_v_value)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pandas_6parser_10TextReader_10converters_2__set__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__", 0); __Pyx_INCREF(__pyx_v_value); __Pyx_GIVEREF(__pyx_v_value); __Pyx_GOTREF(__pyx_v_self->converters); __Pyx_DECREF(__pyx_v_self->converters); __pyx_v_self->converters = __pyx_v_value; /* function exit code */ __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pandas_6parser_10TextReader_10converters_5__del__(PyObject *__pyx_v_self); /*proto*/ static int __pyx_pw_6pandas_6parser_10TextReader_10converters_5__del__(PyObject *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_6parser_10TextReader_10converters_4__del__(((struct __pyx_obj_6pandas_6parser_TextReader *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pandas_6parser_10TextReader_10converters_4__del__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__", 0); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->converters); __Pyx_DECREF(__pyx_v_self->converters); __pyx_v_self->converters = Py_None; /* function exit code */ __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_6parser_10TextReader_16delim_whitespace_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6pandas_6parser_10TextReader_16delim_whitespace_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_6parser_10TextReader_16delim_whitespace___get__(((struct __pyx_obj_6pandas_6parser_TextReader *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_6parser_10TextReader_16delim_whitespace___get__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_self->delim_whitespace); __pyx_r = __pyx_v_self->delim_whitespace; goto __pyx_L0; /* function exit code */ __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pandas_6parser_10TextReader_16delim_whitespace_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ static int __pyx_pw_6pandas_6parser_10TextReader_16delim_whitespace_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_6parser_10TextReader_16delim_whitespace_2__set__(((struct __pyx_obj_6pandas_6parser_TextReader *)__pyx_v_self), ((PyObject *)__pyx_v_value)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pandas_6parser_10TextReader_16delim_whitespace_2__set__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__", 0); __Pyx_INCREF(__pyx_v_value); __Pyx_GIVEREF(__pyx_v_value); __Pyx_GOTREF(__pyx_v_self->delim_whitespace); __Pyx_DECREF(__pyx_v_self->delim_whitespace); __pyx_v_self->delim_whitespace = __pyx_v_value; /* function exit code */ __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pandas_6parser_10TextReader_16delim_whitespace_5__del__(PyObject *__pyx_v_self); /*proto*/ static int __pyx_pw_6pandas_6parser_10TextReader_16delim_whitespace_5__del__(PyObject *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_6parser_10TextReader_16delim_whitespace_4__del__(((struct __pyx_obj_6pandas_6parser_TextReader *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pandas_6parser_10TextReader_16delim_whitespace_4__del__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__", 0); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->delim_whitespace); __Pyx_DECREF(__pyx_v_self->delim_whitespace); __pyx_v_self->delim_whitespace = Py_None; /* function exit code */ __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/parser.pyx":249 * object allow_leading_cols * object delimiter, converters, delim_whitespace * object na_values, true_values, false_values # <<<<<<<<<<<<<< * object memory_map * object as_recarray */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_6parser_10TextReader_9na_values_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6pandas_6parser_10TextReader_9na_values_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_6parser_10TextReader_9na_values___get__(((struct __pyx_obj_6pandas_6parser_TextReader *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_6parser_10TextReader_9na_values___get__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_self->na_values); __pyx_r = __pyx_v_self->na_values; goto __pyx_L0; /* function exit code */ __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pandas_6parser_10TextReader_9na_values_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ static int __pyx_pw_6pandas_6parser_10TextReader_9na_values_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_6parser_10TextReader_9na_values_2__set__(((struct __pyx_obj_6pandas_6parser_TextReader *)__pyx_v_self), ((PyObject *)__pyx_v_value)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pandas_6parser_10TextReader_9na_values_2__set__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__", 0); __Pyx_INCREF(__pyx_v_value); __Pyx_GIVEREF(__pyx_v_value); __Pyx_GOTREF(__pyx_v_self->na_values); __Pyx_DECREF(__pyx_v_self->na_values); __pyx_v_self->na_values = __pyx_v_value; /* function exit code */ __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pandas_6parser_10TextReader_9na_values_5__del__(PyObject *__pyx_v_self); /*proto*/ static int __pyx_pw_6pandas_6parser_10TextReader_9na_values_5__del__(PyObject *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_6parser_10TextReader_9na_values_4__del__(((struct __pyx_obj_6pandas_6parser_TextReader *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pandas_6parser_10TextReader_9na_values_4__del__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__", 0); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->na_values); __Pyx_DECREF(__pyx_v_self->na_values); __pyx_v_self->na_values = Py_None; /* function exit code */ __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_6parser_10TextReader_11true_values_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6pandas_6parser_10TextReader_11true_values_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_6parser_10TextReader_11true_values___get__(((struct __pyx_obj_6pandas_6parser_TextReader *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_6parser_10TextReader_11true_values___get__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_self->true_values); __pyx_r = __pyx_v_self->true_values; goto __pyx_L0; /* function exit code */ __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pandas_6parser_10TextReader_11true_values_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ static int __pyx_pw_6pandas_6parser_10TextReader_11true_values_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_6parser_10TextReader_11true_values_2__set__(((struct __pyx_obj_6pandas_6parser_TextReader *)__pyx_v_self), ((PyObject *)__pyx_v_value)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pandas_6parser_10TextReader_11true_values_2__set__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__", 0); __Pyx_INCREF(__pyx_v_value); __Pyx_GIVEREF(__pyx_v_value); __Pyx_GOTREF(__pyx_v_self->true_values); __Pyx_DECREF(__pyx_v_self->true_values); __pyx_v_self->true_values = __pyx_v_value; /* function exit code */ __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pandas_6parser_10TextReader_11true_values_5__del__(PyObject *__pyx_v_self); /*proto*/ static int __pyx_pw_6pandas_6parser_10TextReader_11true_values_5__del__(PyObject *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_6parser_10TextReader_11true_values_4__del__(((struct __pyx_obj_6pandas_6parser_TextReader *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pandas_6parser_10TextReader_11true_values_4__del__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__", 0); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->true_values); __Pyx_DECREF(__pyx_v_self->true_values); __pyx_v_self->true_values = Py_None; /* function exit code */ __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_6parser_10TextReader_12false_values_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6pandas_6parser_10TextReader_12false_values_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_6parser_10TextReader_12false_values___get__(((struct __pyx_obj_6pandas_6parser_TextReader *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_6parser_10TextReader_12false_values___get__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_self->false_values); __pyx_r = __pyx_v_self->false_values; goto __pyx_L0; /* function exit code */ __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pandas_6parser_10TextReader_12false_values_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ static int __pyx_pw_6pandas_6parser_10TextReader_12false_values_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_6parser_10TextReader_12false_values_2__set__(((struct __pyx_obj_6pandas_6parser_TextReader *)__pyx_v_self), ((PyObject *)__pyx_v_value)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pandas_6parser_10TextReader_12false_values_2__set__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__", 0); __Pyx_INCREF(__pyx_v_value); __Pyx_GIVEREF(__pyx_v_value); __Pyx_GOTREF(__pyx_v_self->false_values); __Pyx_DECREF(__pyx_v_self->false_values); __pyx_v_self->false_values = __pyx_v_value; /* function exit code */ __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pandas_6parser_10TextReader_12false_values_5__del__(PyObject *__pyx_v_self); /*proto*/ static int __pyx_pw_6pandas_6parser_10TextReader_12false_values_5__del__(PyObject *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_6parser_10TextReader_12false_values_4__del__(((struct __pyx_obj_6pandas_6parser_TextReader *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pandas_6parser_10TextReader_12false_values_4__del__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__", 0); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->false_values); __Pyx_DECREF(__pyx_v_self->false_values); __pyx_v_self->false_values = Py_None; /* function exit code */ __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/parser.pyx":250 * object delimiter, converters, delim_whitespace * object na_values, true_values, false_values * object memory_map # <<<<<<<<<<<<<< * object as_recarray * object header, orig_header, names, header_start, header_end */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_6parser_10TextReader_10memory_map_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6pandas_6parser_10TextReader_10memory_map_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_6parser_10TextReader_10memory_map___get__(((struct __pyx_obj_6pandas_6parser_TextReader *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_6parser_10TextReader_10memory_map___get__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_self->memory_map); __pyx_r = __pyx_v_self->memory_map; goto __pyx_L0; /* function exit code */ __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pandas_6parser_10TextReader_10memory_map_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ static int __pyx_pw_6pandas_6parser_10TextReader_10memory_map_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_6parser_10TextReader_10memory_map_2__set__(((struct __pyx_obj_6pandas_6parser_TextReader *)__pyx_v_self), ((PyObject *)__pyx_v_value)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pandas_6parser_10TextReader_10memory_map_2__set__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__", 0); __Pyx_INCREF(__pyx_v_value); __Pyx_GIVEREF(__pyx_v_value); __Pyx_GOTREF(__pyx_v_self->memory_map); __Pyx_DECREF(__pyx_v_self->memory_map); __pyx_v_self->memory_map = __pyx_v_value; /* function exit code */ __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pandas_6parser_10TextReader_10memory_map_5__del__(PyObject *__pyx_v_self); /*proto*/ static int __pyx_pw_6pandas_6parser_10TextReader_10memory_map_5__del__(PyObject *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_6parser_10TextReader_10memory_map_4__del__(((struct __pyx_obj_6pandas_6parser_TextReader *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pandas_6parser_10TextReader_10memory_map_4__del__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__", 0); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->memory_map); __Pyx_DECREF(__pyx_v_self->memory_map); __pyx_v_self->memory_map = Py_None; /* function exit code */ __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/parser.pyx":251 * object na_values, true_values, false_values * object memory_map * object as_recarray # <<<<<<<<<<<<<< * object header, orig_header, names, header_start, header_end * object index_col */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_6parser_10TextReader_11as_recarray_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6pandas_6parser_10TextReader_11as_recarray_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_6parser_10TextReader_11as_recarray___get__(((struct __pyx_obj_6pandas_6parser_TextReader *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_6parser_10TextReader_11as_recarray___get__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_self->as_recarray); __pyx_r = __pyx_v_self->as_recarray; goto __pyx_L0; /* function exit code */ __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pandas_6parser_10TextReader_11as_recarray_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ static int __pyx_pw_6pandas_6parser_10TextReader_11as_recarray_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_6parser_10TextReader_11as_recarray_2__set__(((struct __pyx_obj_6pandas_6parser_TextReader *)__pyx_v_self), ((PyObject *)__pyx_v_value)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pandas_6parser_10TextReader_11as_recarray_2__set__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__", 0); __Pyx_INCREF(__pyx_v_value); __Pyx_GIVEREF(__pyx_v_value); __Pyx_GOTREF(__pyx_v_self->as_recarray); __Pyx_DECREF(__pyx_v_self->as_recarray); __pyx_v_self->as_recarray = __pyx_v_value; /* function exit code */ __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pandas_6parser_10TextReader_11as_recarray_5__del__(PyObject *__pyx_v_self); /*proto*/ static int __pyx_pw_6pandas_6parser_10TextReader_11as_recarray_5__del__(PyObject *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_6parser_10TextReader_11as_recarray_4__del__(((struct __pyx_obj_6pandas_6parser_TextReader *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pandas_6parser_10TextReader_11as_recarray_4__del__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__", 0); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->as_recarray); __Pyx_DECREF(__pyx_v_self->as_recarray); __pyx_v_self->as_recarray = Py_None; /* function exit code */ __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/parser.pyx":252 * object memory_map * object as_recarray * object header, orig_header, names, header_start, header_end # <<<<<<<<<<<<<< * object index_col * object low_memory */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_6parser_10TextReader_6header_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6pandas_6parser_10TextReader_6header_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_6parser_10TextReader_6header___get__(((struct __pyx_obj_6pandas_6parser_TextReader *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_6parser_10TextReader_6header___get__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_self->header); __pyx_r = __pyx_v_self->header; goto __pyx_L0; /* function exit code */ __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pandas_6parser_10TextReader_6header_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ static int __pyx_pw_6pandas_6parser_10TextReader_6header_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_6parser_10TextReader_6header_2__set__(((struct __pyx_obj_6pandas_6parser_TextReader *)__pyx_v_self), ((PyObject *)__pyx_v_value)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pandas_6parser_10TextReader_6header_2__set__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__", 0); __Pyx_INCREF(__pyx_v_value); __Pyx_GIVEREF(__pyx_v_value); __Pyx_GOTREF(__pyx_v_self->header); __Pyx_DECREF(__pyx_v_self->header); __pyx_v_self->header = __pyx_v_value; /* function exit code */ __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pandas_6parser_10TextReader_6header_5__del__(PyObject *__pyx_v_self); /*proto*/ static int __pyx_pw_6pandas_6parser_10TextReader_6header_5__del__(PyObject *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_6parser_10TextReader_6header_4__del__(((struct __pyx_obj_6pandas_6parser_TextReader *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pandas_6parser_10TextReader_6header_4__del__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__", 0); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->header); __Pyx_DECREF(__pyx_v_self->header); __pyx_v_self->header = Py_None; /* function exit code */ __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_6parser_10TextReader_11orig_header_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6pandas_6parser_10TextReader_11orig_header_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_6parser_10TextReader_11orig_header___get__(((struct __pyx_obj_6pandas_6parser_TextReader *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_6parser_10TextReader_11orig_header___get__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_self->orig_header); __pyx_r = __pyx_v_self->orig_header; goto __pyx_L0; /* function exit code */ __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pandas_6parser_10TextReader_11orig_header_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ static int __pyx_pw_6pandas_6parser_10TextReader_11orig_header_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_6parser_10TextReader_11orig_header_2__set__(((struct __pyx_obj_6pandas_6parser_TextReader *)__pyx_v_self), ((PyObject *)__pyx_v_value)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pandas_6parser_10TextReader_11orig_header_2__set__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__", 0); __Pyx_INCREF(__pyx_v_value); __Pyx_GIVEREF(__pyx_v_value); __Pyx_GOTREF(__pyx_v_self->orig_header); __Pyx_DECREF(__pyx_v_self->orig_header); __pyx_v_self->orig_header = __pyx_v_value; /* function exit code */ __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pandas_6parser_10TextReader_11orig_header_5__del__(PyObject *__pyx_v_self); /*proto*/ static int __pyx_pw_6pandas_6parser_10TextReader_11orig_header_5__del__(PyObject *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_6parser_10TextReader_11orig_header_4__del__(((struct __pyx_obj_6pandas_6parser_TextReader *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pandas_6parser_10TextReader_11orig_header_4__del__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__", 0); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->orig_header); __Pyx_DECREF(__pyx_v_self->orig_header); __pyx_v_self->orig_header = Py_None; /* function exit code */ __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_6parser_10TextReader_5names_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6pandas_6parser_10TextReader_5names_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_6parser_10TextReader_5names___get__(((struct __pyx_obj_6pandas_6parser_TextReader *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_6parser_10TextReader_5names___get__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_self->names); __pyx_r = __pyx_v_self->names; goto __pyx_L0; /* function exit code */ __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pandas_6parser_10TextReader_5names_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ static int __pyx_pw_6pandas_6parser_10TextReader_5names_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_6parser_10TextReader_5names_2__set__(((struct __pyx_obj_6pandas_6parser_TextReader *)__pyx_v_self), ((PyObject *)__pyx_v_value)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pandas_6parser_10TextReader_5names_2__set__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__", 0); __Pyx_INCREF(__pyx_v_value); __Pyx_GIVEREF(__pyx_v_value); __Pyx_GOTREF(__pyx_v_self->names); __Pyx_DECREF(__pyx_v_self->names); __pyx_v_self->names = __pyx_v_value; /* function exit code */ __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pandas_6parser_10TextReader_5names_5__del__(PyObject *__pyx_v_self); /*proto*/ static int __pyx_pw_6pandas_6parser_10TextReader_5names_5__del__(PyObject *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_6parser_10TextReader_5names_4__del__(((struct __pyx_obj_6pandas_6parser_TextReader *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pandas_6parser_10TextReader_5names_4__del__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__", 0); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->names); __Pyx_DECREF(__pyx_v_self->names); __pyx_v_self->names = Py_None; /* function exit code */ __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_6parser_10TextReader_12header_start_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6pandas_6parser_10TextReader_12header_start_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_6parser_10TextReader_12header_start___get__(((struct __pyx_obj_6pandas_6parser_TextReader *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_6parser_10TextReader_12header_start___get__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_self->header_start); __pyx_r = __pyx_v_self->header_start; goto __pyx_L0; /* function exit code */ __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pandas_6parser_10TextReader_12header_start_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ static int __pyx_pw_6pandas_6parser_10TextReader_12header_start_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_6parser_10TextReader_12header_start_2__set__(((struct __pyx_obj_6pandas_6parser_TextReader *)__pyx_v_self), ((PyObject *)__pyx_v_value)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pandas_6parser_10TextReader_12header_start_2__set__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__", 0); __Pyx_INCREF(__pyx_v_value); __Pyx_GIVEREF(__pyx_v_value); __Pyx_GOTREF(__pyx_v_self->header_start); __Pyx_DECREF(__pyx_v_self->header_start); __pyx_v_self->header_start = __pyx_v_value; /* function exit code */ __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pandas_6parser_10TextReader_12header_start_5__del__(PyObject *__pyx_v_self); /*proto*/ static int __pyx_pw_6pandas_6parser_10TextReader_12header_start_5__del__(PyObject *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_6parser_10TextReader_12header_start_4__del__(((struct __pyx_obj_6pandas_6parser_TextReader *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pandas_6parser_10TextReader_12header_start_4__del__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__", 0); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->header_start); __Pyx_DECREF(__pyx_v_self->header_start); __pyx_v_self->header_start = Py_None; /* function exit code */ __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_6parser_10TextReader_10header_end_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6pandas_6parser_10TextReader_10header_end_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_6parser_10TextReader_10header_end___get__(((struct __pyx_obj_6pandas_6parser_TextReader *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_6parser_10TextReader_10header_end___get__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_self->header_end); __pyx_r = __pyx_v_self->header_end; goto __pyx_L0; /* function exit code */ __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pandas_6parser_10TextReader_10header_end_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ static int __pyx_pw_6pandas_6parser_10TextReader_10header_end_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_6parser_10TextReader_10header_end_2__set__(((struct __pyx_obj_6pandas_6parser_TextReader *)__pyx_v_self), ((PyObject *)__pyx_v_value)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pandas_6parser_10TextReader_10header_end_2__set__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__", 0); __Pyx_INCREF(__pyx_v_value); __Pyx_GIVEREF(__pyx_v_value); __Pyx_GOTREF(__pyx_v_self->header_end); __Pyx_DECREF(__pyx_v_self->header_end); __pyx_v_self->header_end = __pyx_v_value; /* function exit code */ __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pandas_6parser_10TextReader_10header_end_5__del__(PyObject *__pyx_v_self); /*proto*/ static int __pyx_pw_6pandas_6parser_10TextReader_10header_end_5__del__(PyObject *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_6parser_10TextReader_10header_end_4__del__(((struct __pyx_obj_6pandas_6parser_TextReader *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pandas_6parser_10TextReader_10header_end_4__del__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__", 0); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->header_end); __Pyx_DECREF(__pyx_v_self->header_end); __pyx_v_self->header_end = Py_None; /* function exit code */ __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/parser.pyx":253 * object as_recarray * object header, orig_header, names, header_start, header_end * object index_col # <<<<<<<<<<<<<< * object low_memory * object skiprows */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_6parser_10TextReader_9index_col_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6pandas_6parser_10TextReader_9index_col_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_6parser_10TextReader_9index_col___get__(((struct __pyx_obj_6pandas_6parser_TextReader *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_6parser_10TextReader_9index_col___get__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_self->index_col); __pyx_r = __pyx_v_self->index_col; goto __pyx_L0; /* function exit code */ __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pandas_6parser_10TextReader_9index_col_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ static int __pyx_pw_6pandas_6parser_10TextReader_9index_col_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_6parser_10TextReader_9index_col_2__set__(((struct __pyx_obj_6pandas_6parser_TextReader *)__pyx_v_self), ((PyObject *)__pyx_v_value)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pandas_6parser_10TextReader_9index_col_2__set__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__", 0); __Pyx_INCREF(__pyx_v_value); __Pyx_GIVEREF(__pyx_v_value); __Pyx_GOTREF(__pyx_v_self->index_col); __Pyx_DECREF(__pyx_v_self->index_col); __pyx_v_self->index_col = __pyx_v_value; /* function exit code */ __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pandas_6parser_10TextReader_9index_col_5__del__(PyObject *__pyx_v_self); /*proto*/ static int __pyx_pw_6pandas_6parser_10TextReader_9index_col_5__del__(PyObject *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_6parser_10TextReader_9index_col_4__del__(((struct __pyx_obj_6pandas_6parser_TextReader *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pandas_6parser_10TextReader_9index_col_4__del__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__", 0); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->index_col); __Pyx_DECREF(__pyx_v_self->index_col); __pyx_v_self->index_col = Py_None; /* function exit code */ __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/parser.pyx":254 * object header, orig_header, names, header_start, header_end * object index_col * object low_memory # <<<<<<<<<<<<<< * object skiprows * object compact_ints, use_unsigned */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_6parser_10TextReader_10low_memory_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6pandas_6parser_10TextReader_10low_memory_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_6parser_10TextReader_10low_memory___get__(((struct __pyx_obj_6pandas_6parser_TextReader *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_6parser_10TextReader_10low_memory___get__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_self->low_memory); __pyx_r = __pyx_v_self->low_memory; goto __pyx_L0; /* function exit code */ __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pandas_6parser_10TextReader_10low_memory_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ static int __pyx_pw_6pandas_6parser_10TextReader_10low_memory_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_6parser_10TextReader_10low_memory_2__set__(((struct __pyx_obj_6pandas_6parser_TextReader *)__pyx_v_self), ((PyObject *)__pyx_v_value)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pandas_6parser_10TextReader_10low_memory_2__set__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__", 0); __Pyx_INCREF(__pyx_v_value); __Pyx_GIVEREF(__pyx_v_value); __Pyx_GOTREF(__pyx_v_self->low_memory); __Pyx_DECREF(__pyx_v_self->low_memory); __pyx_v_self->low_memory = __pyx_v_value; /* function exit code */ __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pandas_6parser_10TextReader_10low_memory_5__del__(PyObject *__pyx_v_self); /*proto*/ static int __pyx_pw_6pandas_6parser_10TextReader_10low_memory_5__del__(PyObject *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_6parser_10TextReader_10low_memory_4__del__(((struct __pyx_obj_6pandas_6parser_TextReader *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pandas_6parser_10TextReader_10low_memory_4__del__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__", 0); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->low_memory); __Pyx_DECREF(__pyx_v_self->low_memory); __pyx_v_self->low_memory = Py_None; /* function exit code */ __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/parser.pyx":255 * object index_col * object low_memory * object skiprows # <<<<<<<<<<<<<< * object compact_ints, use_unsigned * object dtype */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_6parser_10TextReader_8skiprows_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6pandas_6parser_10TextReader_8skiprows_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_6parser_10TextReader_8skiprows___get__(((struct __pyx_obj_6pandas_6parser_TextReader *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_6parser_10TextReader_8skiprows___get__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_self->skiprows); __pyx_r = __pyx_v_self->skiprows; goto __pyx_L0; /* function exit code */ __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pandas_6parser_10TextReader_8skiprows_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ static int __pyx_pw_6pandas_6parser_10TextReader_8skiprows_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_6parser_10TextReader_8skiprows_2__set__(((struct __pyx_obj_6pandas_6parser_TextReader *)__pyx_v_self), ((PyObject *)__pyx_v_value)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pandas_6parser_10TextReader_8skiprows_2__set__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__", 0); __Pyx_INCREF(__pyx_v_value); __Pyx_GIVEREF(__pyx_v_value); __Pyx_GOTREF(__pyx_v_self->skiprows); __Pyx_DECREF(__pyx_v_self->skiprows); __pyx_v_self->skiprows = __pyx_v_value; /* function exit code */ __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pandas_6parser_10TextReader_8skiprows_5__del__(PyObject *__pyx_v_self); /*proto*/ static int __pyx_pw_6pandas_6parser_10TextReader_8skiprows_5__del__(PyObject *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_6parser_10TextReader_8skiprows_4__del__(((struct __pyx_obj_6pandas_6parser_TextReader *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pandas_6parser_10TextReader_8skiprows_4__del__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__", 0); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->skiprows); __Pyx_DECREF(__pyx_v_self->skiprows); __pyx_v_self->skiprows = Py_None; /* function exit code */ __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/parser.pyx":256 * object low_memory * object skiprows * object compact_ints, use_unsigned # <<<<<<<<<<<<<< * object dtype * object encoding */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_6parser_10TextReader_12compact_ints_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6pandas_6parser_10TextReader_12compact_ints_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_6parser_10TextReader_12compact_ints___get__(((struct __pyx_obj_6pandas_6parser_TextReader *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_6parser_10TextReader_12compact_ints___get__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_self->compact_ints); __pyx_r = __pyx_v_self->compact_ints; goto __pyx_L0; /* function exit code */ __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pandas_6parser_10TextReader_12compact_ints_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ static int __pyx_pw_6pandas_6parser_10TextReader_12compact_ints_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_6parser_10TextReader_12compact_ints_2__set__(((struct __pyx_obj_6pandas_6parser_TextReader *)__pyx_v_self), ((PyObject *)__pyx_v_value)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pandas_6parser_10TextReader_12compact_ints_2__set__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__", 0); __Pyx_INCREF(__pyx_v_value); __Pyx_GIVEREF(__pyx_v_value); __Pyx_GOTREF(__pyx_v_self->compact_ints); __Pyx_DECREF(__pyx_v_self->compact_ints); __pyx_v_self->compact_ints = __pyx_v_value; /* function exit code */ __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pandas_6parser_10TextReader_12compact_ints_5__del__(PyObject *__pyx_v_self); /*proto*/ static int __pyx_pw_6pandas_6parser_10TextReader_12compact_ints_5__del__(PyObject *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_6parser_10TextReader_12compact_ints_4__del__(((struct __pyx_obj_6pandas_6parser_TextReader *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pandas_6parser_10TextReader_12compact_ints_4__del__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__", 0); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->compact_ints); __Pyx_DECREF(__pyx_v_self->compact_ints); __pyx_v_self->compact_ints = Py_None; /* function exit code */ __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_6parser_10TextReader_12use_unsigned_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6pandas_6parser_10TextReader_12use_unsigned_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_6parser_10TextReader_12use_unsigned___get__(((struct __pyx_obj_6pandas_6parser_TextReader *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_6parser_10TextReader_12use_unsigned___get__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_self->use_unsigned); __pyx_r = __pyx_v_self->use_unsigned; goto __pyx_L0; /* function exit code */ __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pandas_6parser_10TextReader_12use_unsigned_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ static int __pyx_pw_6pandas_6parser_10TextReader_12use_unsigned_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_6parser_10TextReader_12use_unsigned_2__set__(((struct __pyx_obj_6pandas_6parser_TextReader *)__pyx_v_self), ((PyObject *)__pyx_v_value)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pandas_6parser_10TextReader_12use_unsigned_2__set__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__", 0); __Pyx_INCREF(__pyx_v_value); __Pyx_GIVEREF(__pyx_v_value); __Pyx_GOTREF(__pyx_v_self->use_unsigned); __Pyx_DECREF(__pyx_v_self->use_unsigned); __pyx_v_self->use_unsigned = __pyx_v_value; /* function exit code */ __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pandas_6parser_10TextReader_12use_unsigned_5__del__(PyObject *__pyx_v_self); /*proto*/ static int __pyx_pw_6pandas_6parser_10TextReader_12use_unsigned_5__del__(PyObject *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_6parser_10TextReader_12use_unsigned_4__del__(((struct __pyx_obj_6pandas_6parser_TextReader *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pandas_6parser_10TextReader_12use_unsigned_4__del__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__", 0); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->use_unsigned); __Pyx_DECREF(__pyx_v_self->use_unsigned); __pyx_v_self->use_unsigned = Py_None; /* function exit code */ __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/parser.pyx":257 * object skiprows * object compact_ints, use_unsigned * object dtype # <<<<<<<<<<<<<< * object encoding * object compression */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_6parser_10TextReader_5dtype_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6pandas_6parser_10TextReader_5dtype_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_6parser_10TextReader_5dtype___get__(((struct __pyx_obj_6pandas_6parser_TextReader *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_6parser_10TextReader_5dtype___get__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_self->dtype); __pyx_r = __pyx_v_self->dtype; goto __pyx_L0; /* function exit code */ __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pandas_6parser_10TextReader_5dtype_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ static int __pyx_pw_6pandas_6parser_10TextReader_5dtype_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_6parser_10TextReader_5dtype_2__set__(((struct __pyx_obj_6pandas_6parser_TextReader *)__pyx_v_self), ((PyObject *)__pyx_v_value)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pandas_6parser_10TextReader_5dtype_2__set__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__", 0); __Pyx_INCREF(__pyx_v_value); __Pyx_GIVEREF(__pyx_v_value); __Pyx_GOTREF(__pyx_v_self->dtype); __Pyx_DECREF(__pyx_v_self->dtype); __pyx_v_self->dtype = __pyx_v_value; /* function exit code */ __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pandas_6parser_10TextReader_5dtype_5__del__(PyObject *__pyx_v_self); /*proto*/ static int __pyx_pw_6pandas_6parser_10TextReader_5dtype_5__del__(PyObject *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_6parser_10TextReader_5dtype_4__del__(((struct __pyx_obj_6pandas_6parser_TextReader *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pandas_6parser_10TextReader_5dtype_4__del__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__", 0); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->dtype); __Pyx_DECREF(__pyx_v_self->dtype); __pyx_v_self->dtype = Py_None; /* function exit code */ __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/parser.pyx":258 * object compact_ints, use_unsigned * object dtype * object encoding # <<<<<<<<<<<<<< * object compression * object mangle_dupe_cols */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_6parser_10TextReader_8encoding_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6pandas_6parser_10TextReader_8encoding_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_6parser_10TextReader_8encoding___get__(((struct __pyx_obj_6pandas_6parser_TextReader *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_6parser_10TextReader_8encoding___get__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_self->encoding); __pyx_r = __pyx_v_self->encoding; goto __pyx_L0; /* function exit code */ __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pandas_6parser_10TextReader_8encoding_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ static int __pyx_pw_6pandas_6parser_10TextReader_8encoding_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_6parser_10TextReader_8encoding_2__set__(((struct __pyx_obj_6pandas_6parser_TextReader *)__pyx_v_self), ((PyObject *)__pyx_v_value)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pandas_6parser_10TextReader_8encoding_2__set__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__", 0); __Pyx_INCREF(__pyx_v_value); __Pyx_GIVEREF(__pyx_v_value); __Pyx_GOTREF(__pyx_v_self->encoding); __Pyx_DECREF(__pyx_v_self->encoding); __pyx_v_self->encoding = __pyx_v_value; /* function exit code */ __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pandas_6parser_10TextReader_8encoding_5__del__(PyObject *__pyx_v_self); /*proto*/ static int __pyx_pw_6pandas_6parser_10TextReader_8encoding_5__del__(PyObject *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_6parser_10TextReader_8encoding_4__del__(((struct __pyx_obj_6pandas_6parser_TextReader *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pandas_6parser_10TextReader_8encoding_4__del__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__", 0); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->encoding); __Pyx_DECREF(__pyx_v_self->encoding); __pyx_v_self->encoding = Py_None; /* function exit code */ __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/parser.pyx":259 * object dtype * object encoding * object compression # <<<<<<<<<<<<<< * object mangle_dupe_cols * object tupleize_cols */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_6parser_10TextReader_11compression_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6pandas_6parser_10TextReader_11compression_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_6parser_10TextReader_11compression___get__(((struct __pyx_obj_6pandas_6parser_TextReader *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_6parser_10TextReader_11compression___get__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_self->compression); __pyx_r = __pyx_v_self->compression; goto __pyx_L0; /* function exit code */ __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pandas_6parser_10TextReader_11compression_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ static int __pyx_pw_6pandas_6parser_10TextReader_11compression_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_6parser_10TextReader_11compression_2__set__(((struct __pyx_obj_6pandas_6parser_TextReader *)__pyx_v_self), ((PyObject *)__pyx_v_value)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pandas_6parser_10TextReader_11compression_2__set__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__", 0); __Pyx_INCREF(__pyx_v_value); __Pyx_GIVEREF(__pyx_v_value); __Pyx_GOTREF(__pyx_v_self->compression); __Pyx_DECREF(__pyx_v_self->compression); __pyx_v_self->compression = __pyx_v_value; /* function exit code */ __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pandas_6parser_10TextReader_11compression_5__del__(PyObject *__pyx_v_self); /*proto*/ static int __pyx_pw_6pandas_6parser_10TextReader_11compression_5__del__(PyObject *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_6parser_10TextReader_11compression_4__del__(((struct __pyx_obj_6pandas_6parser_TextReader *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pandas_6parser_10TextReader_11compression_4__del__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__", 0); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->compression); __Pyx_DECREF(__pyx_v_self->compression); __pyx_v_self->compression = Py_None; /* function exit code */ __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/parser.pyx":260 * object encoding * object compression * object mangle_dupe_cols # <<<<<<<<<<<<<< * object tupleize_cols * set noconvert, usecols */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_6parser_10TextReader_16mangle_dupe_cols_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6pandas_6parser_10TextReader_16mangle_dupe_cols_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_6parser_10TextReader_16mangle_dupe_cols___get__(((struct __pyx_obj_6pandas_6parser_TextReader *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_6parser_10TextReader_16mangle_dupe_cols___get__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_self->mangle_dupe_cols); __pyx_r = __pyx_v_self->mangle_dupe_cols; goto __pyx_L0; /* function exit code */ __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pandas_6parser_10TextReader_16mangle_dupe_cols_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ static int __pyx_pw_6pandas_6parser_10TextReader_16mangle_dupe_cols_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_6parser_10TextReader_16mangle_dupe_cols_2__set__(((struct __pyx_obj_6pandas_6parser_TextReader *)__pyx_v_self), ((PyObject *)__pyx_v_value)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pandas_6parser_10TextReader_16mangle_dupe_cols_2__set__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__", 0); __Pyx_INCREF(__pyx_v_value); __Pyx_GIVEREF(__pyx_v_value); __Pyx_GOTREF(__pyx_v_self->mangle_dupe_cols); __Pyx_DECREF(__pyx_v_self->mangle_dupe_cols); __pyx_v_self->mangle_dupe_cols = __pyx_v_value; /* function exit code */ __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pandas_6parser_10TextReader_16mangle_dupe_cols_5__del__(PyObject *__pyx_v_self); /*proto*/ static int __pyx_pw_6pandas_6parser_10TextReader_16mangle_dupe_cols_5__del__(PyObject *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_6parser_10TextReader_16mangle_dupe_cols_4__del__(((struct __pyx_obj_6pandas_6parser_TextReader *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pandas_6parser_10TextReader_16mangle_dupe_cols_4__del__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__", 0); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->mangle_dupe_cols); __Pyx_DECREF(__pyx_v_self->mangle_dupe_cols); __pyx_v_self->mangle_dupe_cols = Py_None; /* function exit code */ __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/parser.pyx":261 * object compression * object mangle_dupe_cols * object tupleize_cols # <<<<<<<<<<<<<< * set noconvert, usecols * */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_6parser_10TextReader_13tupleize_cols_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6pandas_6parser_10TextReader_13tupleize_cols_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_6parser_10TextReader_13tupleize_cols___get__(((struct __pyx_obj_6pandas_6parser_TextReader *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_6parser_10TextReader_13tupleize_cols___get__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_self->tupleize_cols); __pyx_r = __pyx_v_self->tupleize_cols; goto __pyx_L0; /* function exit code */ __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pandas_6parser_10TextReader_13tupleize_cols_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ static int __pyx_pw_6pandas_6parser_10TextReader_13tupleize_cols_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_6parser_10TextReader_13tupleize_cols_2__set__(((struct __pyx_obj_6pandas_6parser_TextReader *)__pyx_v_self), ((PyObject *)__pyx_v_value)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pandas_6parser_10TextReader_13tupleize_cols_2__set__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__", 0); __Pyx_INCREF(__pyx_v_value); __Pyx_GIVEREF(__pyx_v_value); __Pyx_GOTREF(__pyx_v_self->tupleize_cols); __Pyx_DECREF(__pyx_v_self->tupleize_cols); __pyx_v_self->tupleize_cols = __pyx_v_value; /* function exit code */ __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pandas_6parser_10TextReader_13tupleize_cols_5__del__(PyObject *__pyx_v_self); /*proto*/ static int __pyx_pw_6pandas_6parser_10TextReader_13tupleize_cols_5__del__(PyObject *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_6parser_10TextReader_13tupleize_cols_4__del__(((struct __pyx_obj_6pandas_6parser_TextReader *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pandas_6parser_10TextReader_13tupleize_cols_4__del__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__", 0); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->tupleize_cols); __Pyx_DECREF(__pyx_v_self->tupleize_cols); __pyx_v_self->tupleize_cols = Py_None; /* function exit code */ __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/parser.pyx":262 * object mangle_dupe_cols * object tupleize_cols * set noconvert, usecols # <<<<<<<<<<<<<< * * def __cinit__(self, source, */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_6parser_10TextReader_9noconvert_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6pandas_6parser_10TextReader_9noconvert_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_6parser_10TextReader_9noconvert___get__(((struct __pyx_obj_6pandas_6parser_TextReader *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_6parser_10TextReader_9noconvert___get__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_self->noconvert); __pyx_r = __pyx_v_self->noconvert; goto __pyx_L0; /* function exit code */ __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pandas_6parser_10TextReader_9noconvert_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ static int __pyx_pw_6pandas_6parser_10TextReader_9noconvert_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_6parser_10TextReader_9noconvert_2__set__(((struct __pyx_obj_6pandas_6parser_TextReader *)__pyx_v_self), ((PyObject *)__pyx_v_value)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pandas_6parser_10TextReader_9noconvert_2__set__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__set__", 0); if (!(likely(PySet_CheckExact(__pyx_v_value))||((__pyx_v_value) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "set", Py_TYPE(__pyx_v_value)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 262; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_1 = __pyx_v_value; __Pyx_INCREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->noconvert); __Pyx_DECREF(__pyx_v_self->noconvert); __pyx_v_self->noconvert = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas.parser.TextReader.noconvert.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pandas_6parser_10TextReader_9noconvert_5__del__(PyObject *__pyx_v_self); /*proto*/ static int __pyx_pw_6pandas_6parser_10TextReader_9noconvert_5__del__(PyObject *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_6parser_10TextReader_9noconvert_4__del__(((struct __pyx_obj_6pandas_6parser_TextReader *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pandas_6parser_10TextReader_9noconvert_4__del__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__", 0); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->noconvert); __Pyx_DECREF(__pyx_v_self->noconvert); __pyx_v_self->noconvert = ((PyObject*)Py_None); /* function exit code */ __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_6parser_10TextReader_7usecols_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6pandas_6parser_10TextReader_7usecols_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_6parser_10TextReader_7usecols___get__(((struct __pyx_obj_6pandas_6parser_TextReader *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_6parser_10TextReader_7usecols___get__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_self->usecols); __pyx_r = __pyx_v_self->usecols; goto __pyx_L0; /* function exit code */ __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pandas_6parser_10TextReader_7usecols_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ static int __pyx_pw_6pandas_6parser_10TextReader_7usecols_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_6parser_10TextReader_7usecols_2__set__(((struct __pyx_obj_6pandas_6parser_TextReader *)__pyx_v_self), ((PyObject *)__pyx_v_value)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pandas_6parser_10TextReader_7usecols_2__set__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__set__", 0); if (!(likely(PySet_CheckExact(__pyx_v_value))||((__pyx_v_value) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "set", Py_TYPE(__pyx_v_value)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 262; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_1 = __pyx_v_value; __Pyx_INCREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->usecols); __Pyx_DECREF(__pyx_v_self->usecols); __pyx_v_self->usecols = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas.parser.TextReader.usecols.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pandas_6parser_10TextReader_7usecols_5__del__(PyObject *__pyx_v_self); /*proto*/ static int __pyx_pw_6pandas_6parser_10TextReader_7usecols_5__del__(PyObject *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_6parser_10TextReader_7usecols_4__del__(((struct __pyx_obj_6pandas_6parser_TextReader *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pandas_6parser_10TextReader_7usecols_4__del__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__", 0); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->usecols); __Pyx_DECREF(__pyx_v_self->usecols); __pyx_v_self->usecols = ((PyObject*)Py_None); /* function exit code */ __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/parser.pyx":1167 * * * def _ensure_encoded(list lst): # <<<<<<<<<<<<<< * cdef list result = [] * for x in lst: */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_6parser_1_ensure_encoded(PyObject *__pyx_self, PyObject *__pyx_v_lst); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_6parser_1_ensure_encoded = {__Pyx_NAMESTR("_ensure_encoded"), (PyCFunction)__pyx_pw_6pandas_6parser_1_ensure_encoded, METH_O, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_6parser_1_ensure_encoded(PyObject *__pyx_self, PyObject *__pyx_v_lst) { CYTHON_UNUSED int __pyx_lineno = 0; CYTHON_UNUSED const char *__pyx_filename = NULL; CYTHON_UNUSED int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_ensure_encoded (wrapper)", 0); if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_lst), (&PyList_Type), 1, "lst", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1167; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_6parser__ensure_encoded(__pyx_self, ((PyObject*)__pyx_v_lst)); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_6parser__ensure_encoded(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_lst) { PyObject *__pyx_v_result = 0; PyObject *__pyx_v_x = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; Py_ssize_t __pyx_t_2; PyObject *__pyx_t_3 = NULL; int __pyx_t_4; int __pyx_t_5; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_ensure_encoded", 0); /* "pandas/parser.pyx":1168 * * def _ensure_encoded(list lst): * cdef list result = [] # <<<<<<<<<<<<<< * for x in lst: * if PyUnicode_Check(x): */ __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1168; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_v_result = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/parser.pyx":1169 * def _ensure_encoded(list lst): * cdef list result = [] * for x in lst: # <<<<<<<<<<<<<< * if PyUnicode_Check(x): * x = PyUnicode_AsUTF8String(x) */ if (unlikely(__pyx_v_lst == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1169; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_1 = __pyx_v_lst; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0; for (;;) { if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_3 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1169; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1169; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif __Pyx_XDECREF_SET(__pyx_v_x, __pyx_t_3); __pyx_t_3 = 0; /* "pandas/parser.pyx":1170 * cdef list result = [] * for x in lst: * if PyUnicode_Check(x): # <<<<<<<<<<<<<< * x = PyUnicode_AsUTF8String(x) * elif not PyBytes_Check(x): */ __pyx_t_4 = (PyUnicode_Check(__pyx_v_x) != 0); if (__pyx_t_4) { /* "pandas/parser.pyx":1171 * for x in lst: * if PyUnicode_Check(x): * x = PyUnicode_AsUTF8String(x) # <<<<<<<<<<<<<< * elif not PyBytes_Check(x): * x = asbytes(x) */ __pyx_t_3 = PyUnicode_AsUTF8String(__pyx_v_x); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1171; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF_SET(__pyx_v_x, __pyx_t_3); __pyx_t_3 = 0; goto __pyx_L5; } /* "pandas/parser.pyx":1172 * if PyUnicode_Check(x): * x = PyUnicode_AsUTF8String(x) * elif not PyBytes_Check(x): # <<<<<<<<<<<<<< * x = asbytes(x) * */ __pyx_t_4 = ((!(PyBytes_Check(__pyx_v_x) != 0)) != 0); if (__pyx_t_4) { /* "pandas/parser.pyx":1173 * x = PyUnicode_AsUTF8String(x) * elif not PyBytes_Check(x): * x = asbytes(x) # <<<<<<<<<<<<<< * * result.append(x) */ __pyx_t_3 = __pyx_f_6pandas_6parser_asbytes(__pyx_v_x); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1173; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF_SET(__pyx_v_x, __pyx_t_3); __pyx_t_3 = 0; goto __pyx_L5; } __pyx_L5:; /* "pandas/parser.pyx":1175 * x = asbytes(x) * * result.append(x) # <<<<<<<<<<<<<< * return result * */ __pyx_t_5 = __Pyx_PyList_Append(__pyx_v_result, __pyx_v_x); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1175; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pandas/parser.pyx":1176 * * result.append(x) * return result # <<<<<<<<<<<<<< * * cdef asbytes(object o): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_result); __pyx_r = __pyx_v_result; goto __pyx_L0; /* "pandas/parser.pyx":1167 * * * def _ensure_encoded(list lst): # <<<<<<<<<<<<<< * cdef list result = [] * for x in lst: */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("pandas.parser._ensure_encoded", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_result); __Pyx_XDECREF(__pyx_v_x); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/parser.pyx":1178 * return result * * cdef asbytes(object o): # <<<<<<<<<<<<<< * if PY3: * return str(o).encode('utf-8') */ static PyObject *__pyx_f_6pandas_6parser_asbytes(PyObject *__pyx_v_o) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("asbytes", 0); /* "pandas/parser.pyx":1179 * * cdef asbytes(object o): * if PY3: # <<<<<<<<<<<<<< * return str(o).encode('utf-8') * else: */ __pyx_t_1 = (__pyx_v_6pandas_6parser_PY3 != 0); if (__pyx_t_1) { /* "pandas/parser.pyx":1180 * cdef asbytes(object o): * if PY3: * return str(o).encode('utf-8') # <<<<<<<<<<<<<< * else: * return str(o) */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1180; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_o); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_o); __Pyx_GIVEREF(__pyx_v_o); __pyx_t_3 = PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1180; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_encode); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1180; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyObject_Call(__pyx_t_2, __pyx_tuple__25, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1180; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; } /*else*/ { /* "pandas/parser.pyx":1182 * return str(o).encode('utf-8') * else: * return str(o) # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1182; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_v_o); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_o); __Pyx_GIVEREF(__pyx_v_o); __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1182; __pyx_clineno = __LINE__; goto __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/parser.pyx":1178 * return result * * cdef asbytes(object o): # <<<<<<<<<<<<<< * if PY3: * return str(o).encode('utf-8') */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("pandas.parser.asbytes", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/parser.pyx":1185 * * * def _is_file_like(obj): # <<<<<<<<<<<<<< * if PY3: * import io */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_6parser_3_is_file_like(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_6parser_3_is_file_like = {__Pyx_NAMESTR("_is_file_like"), (PyCFunction)__pyx_pw_6pandas_6parser_3_is_file_like, METH_O, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_6parser_3_is_file_like(PyObject *__pyx_self, PyObject *__pyx_v_obj) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_is_file_like (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_6parser_2_is_file_like(__pyx_self, ((PyObject *)__pyx_v_obj)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_6parser_2_is_file_like(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) { PyObject *__pyx_v_io = NULL; PyObject *__pyx_v_file = NULL; PyObject *__pyx_v___builtin__ = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_is_file_like", 0); /* "pandas/parser.pyx":1186 * * def _is_file_like(obj): * if PY3: # <<<<<<<<<<<<<< * import io * if isinstance(obj, io.TextIOWrapper): */ __pyx_t_1 = (__pyx_v_6pandas_6parser_PY3 != 0); if (__pyx_t_1) { /* "pandas/parser.pyx":1187 * def _is_file_like(obj): * if PY3: * import io # <<<<<<<<<<<<<< * if isinstance(obj, io.TextIOWrapper): * raise CParserError('Cannot handle open unicode files (yet)') */ __pyx_t_2 = __Pyx_Import(__pyx_n_s_io, 0, -1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1187; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_v_io = __pyx_t_2; __pyx_t_2 = 0; /* "pandas/parser.pyx":1188 * if PY3: * import io * if isinstance(obj, io.TextIOWrapper): # <<<<<<<<<<<<<< * raise CParserError('Cannot handle open unicode files (yet)') * */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_io, __pyx_n_s_TextIOWrapper); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1188; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = PyObject_IsInstance(__pyx_v_obj, __pyx_t_2); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1188; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_3 = (__pyx_t_1 != 0); if (__pyx_t_3) { /* "pandas/parser.pyx":1189 * import io * if isinstance(obj, io.TextIOWrapper): * raise CParserError('Cannot handle open unicode files (yet)') # <<<<<<<<<<<<<< * * # BufferedReader is a byte reader for Python 3 */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_CParserError); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1189; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = PyObject_Call(__pyx_t_2, __pyx_tuple__26, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1189; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_Raise(__pyx_t_4, 0, 0, 0); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1189; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } /* "pandas/parser.pyx":1192 * * # BufferedReader is a byte reader for Python 3 * file = io.BufferedReader # <<<<<<<<<<<<<< * else: * import __builtin__ */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_io, __pyx_n_s_BufferedReader); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1192; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_v_file = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L3; } /*else*/ { /* "pandas/parser.pyx":1194 * file = io.BufferedReader * else: * import __builtin__ # <<<<<<<<<<<<<< * file = __builtin__.file * */ __pyx_t_4 = __Pyx_Import(__pyx_n_s_builtin, 0, -1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1194; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_v___builtin__ = __pyx_t_4; __pyx_t_4 = 0; /* "pandas/parser.pyx":1195 * else: * import __builtin__ * file = __builtin__.file # <<<<<<<<<<<<<< * * return isinstance(obj, (basestring, file)) */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v___builtin__, __pyx_n_s_file); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1195; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_v_file = __pyx_t_4; __pyx_t_4 = 0; } __pyx_L3:; /* "pandas/parser.pyx":1197 * file = __builtin__.file * * return isinstance(obj, (basestring, file)) # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_basestring); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1197; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1197; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __Pyx_INCREF(__pyx_v_file); PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_file); __Pyx_GIVEREF(__pyx_v_file); __pyx_t_4 = 0; __pyx_t_3 = PyObject_IsInstance(__pyx_v_obj, __pyx_t_2); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1197; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1197; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "pandas/parser.pyx":1185 * * * def _is_file_like(obj): # <<<<<<<<<<<<<< * if PY3: * import io */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("pandas.parser._is_file_like", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_io); __Pyx_XDECREF(__pyx_v_file); __Pyx_XDECREF(__pyx_v___builtin__); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/parser.pyx":1200 * * * def _maybe_upcast(arr): # <<<<<<<<<<<<<< * """ * */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_6parser_5_maybe_upcast(PyObject *__pyx_self, PyObject *__pyx_v_arr); /*proto*/ static char __pyx_doc_6pandas_6parser_4_maybe_upcast[] = "\n\n "; static PyMethodDef __pyx_mdef_6pandas_6parser_5_maybe_upcast = {__Pyx_NAMESTR("_maybe_upcast"), (PyCFunction)__pyx_pw_6pandas_6parser_5_maybe_upcast, METH_O, __Pyx_DOCSTR(__pyx_doc_6pandas_6parser_4_maybe_upcast)}; static PyObject *__pyx_pw_6pandas_6parser_5_maybe_upcast(PyObject *__pyx_self, PyObject *__pyx_v_arr) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_maybe_upcast (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_6parser_4_maybe_upcast(__pyx_self, ((PyObject *)__pyx_v_arr)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_6parser_4_maybe_upcast(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_arr) { PyObject *__pyx_v_na_value = NULL; PyObject *__pyx_v_mask = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_t_4; int __pyx_t_5; PyObject *__pyx_t_6 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_maybe_upcast", 0); __Pyx_INCREF(__pyx_v_arr); /* "pandas/parser.pyx":1204 * * """ * if issubclass(arr.dtype.type, np.integer): # <<<<<<<<<<<<<< * na_value = na_values[arr.dtype] * arr = arr.astype(float) */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_arr, __pyx_n_s_dtype); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1204; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_type); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1204; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1204; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_integer); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1204; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_4 = PyObject_IsSubclass(__pyx_t_2, __pyx_t_3); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1204; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_5 = (__pyx_t_4 != 0); if (__pyx_t_5) { /* "pandas/parser.pyx":1205 * """ * if issubclass(arr.dtype.type, np.integer): * na_value = na_values[arr.dtype] # <<<<<<<<<<<<<< * arr = arr.astype(float) * np.putmask(arr, arr == na_value, np.nan) */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_na_values); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1205; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_arr, __pyx_n_s_dtype); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1205; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = PyObject_GetItem(__pyx_t_3, __pyx_t_2); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1205; __pyx_clineno = __LINE__; goto __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_v_na_value = __pyx_t_1; __pyx_t_1 = 0; /* "pandas/parser.pyx":1206 * if issubclass(arr.dtype.type, np.integer): * na_value = na_values[arr.dtype] * arr = arr.astype(float) # <<<<<<<<<<<<<< * np.putmask(arr, arr == na_value, np.nan) * elif arr.dtype == np.bool_: */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_arr, __pyx_n_s_astype); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1206; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1206; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(((PyObject *)((PyObject*)(&PyFloat_Type)))); PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)((PyObject*)(&PyFloat_Type)))); __Pyx_GIVEREF(((PyObject *)((PyObject*)(&PyFloat_Type)))); __pyx_t_3 = PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1206; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF_SET(__pyx_v_arr, __pyx_t_3); __pyx_t_3 = 0; /* "pandas/parser.pyx":1207 * na_value = na_values[arr.dtype] * arr = arr.astype(float) * np.putmask(arr, arr == na_value, np.nan) # <<<<<<<<<<<<<< * elif arr.dtype == np.bool_: * mask = arr.view(np.uint8) == na_values[np.uint8] */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1207; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_putmask); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1207; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyObject_RichCompare(__pyx_v_arr, __pyx_v_na_value, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1207; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1207; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_nan); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1207; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1207; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_arr); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_arr); __Pyx_GIVEREF(__pyx_v_arr); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_6); __pyx_t_3 = 0; __pyx_t_6 = 0; __pyx_t_6 = PyObject_Call(__pyx_t_2, __pyx_t_1, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1207; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; goto __pyx_L3; } /* "pandas/parser.pyx":1208 * arr = arr.astype(float) * np.putmask(arr, arr == na_value, np.nan) * elif arr.dtype == np.bool_: # <<<<<<<<<<<<<< * mask = arr.view(np.uint8) == na_values[np.uint8] * arr = arr.astype(object) */ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_arr, __pyx_n_s_dtype); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1208; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1208; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_bool); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1208; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyObject_RichCompare(__pyx_t_6, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1208; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1208; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_5) { /* "pandas/parser.pyx":1209 * np.putmask(arr, arr == na_value, np.nan) * elif arr.dtype == np.bool_: * mask = arr.view(np.uint8) == na_values[np.uint8] # <<<<<<<<<<<<<< * arr = arr.astype(object) * np.putmask(arr, mask, np.nan) */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_arr, __pyx_n_s_view); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1209; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1209; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_uint8); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1209; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1209; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1209; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_na_values); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1209; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1209; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_uint8); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1209; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyObject_GetItem(__pyx_t_2, __pyx_t_3); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1209; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyObject_RichCompare(__pyx_t_6, __pyx_t_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1209; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_mask = __pyx_t_3; __pyx_t_3 = 0; /* "pandas/parser.pyx":1210 * elif arr.dtype == np.bool_: * mask = arr.view(np.uint8) == na_values[np.uint8] * arr = arr.astype(object) # <<<<<<<<<<<<<< * np.putmask(arr, mask, np.nan) * */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_arr, __pyx_n_s_astype); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1210; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1210; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_builtin_object); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_builtin_object); __Pyx_GIVEREF(__pyx_builtin_object); __pyx_t_6 = PyObject_Call(__pyx_t_3, __pyx_t_1, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1210; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF_SET(__pyx_v_arr, __pyx_t_6); __pyx_t_6 = 0; /* "pandas/parser.pyx":1211 * mask = arr.view(np.uint8) == na_values[np.uint8] * arr = arr.astype(object) * np.putmask(arr, mask, np.nan) # <<<<<<<<<<<<<< * * return arr */ __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1211; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_putmask); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1211; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1211; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_nan); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1211; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1211; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(__pyx_v_arr); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_arr); __Pyx_GIVEREF(__pyx_v_arr); __Pyx_INCREF(__pyx_v_mask); PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_v_mask); __Pyx_GIVEREF(__pyx_v_mask); PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyObject_Call(__pyx_t_1, __pyx_t_6, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1211; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L3; } __pyx_L3:; /* "pandas/parser.pyx":1213 * np.putmask(arr, mask, np.nan) * * return arr # <<<<<<<<<<<<<< * * # ---------------------------------------------------------------------- */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_arr); __pyx_r = __pyx_v_arr; goto __pyx_L0; /* "pandas/parser.pyx":1200 * * * def _maybe_upcast(arr): # <<<<<<<<<<<<<< * """ * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("pandas.parser._maybe_upcast", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_na_value); __Pyx_XDECREF(__pyx_v_mask); __Pyx_XDECREF(__pyx_v_arr); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/parser.pyx":1218 * # Type conversions / inference support code * * cdef _string_box_factorize(parser_t *parser, int col, # <<<<<<<<<<<<<< * int line_start, int line_end, * bint na_filter, kh_str_t *na_hashset): */ static PyObject *__pyx_f_6pandas_6parser__string_box_factorize(parser_t *__pyx_v_parser, int __pyx_v_col, int __pyx_v_line_start, int __pyx_v_line_end, int __pyx_v_na_filter, kh_str_t *__pyx_v_na_hashset) { int __pyx_v_na_count; Py_ssize_t __pyx_v_i; size_t __pyx_v_lines; coliter_t __pyx_v_it; char *__pyx_v_word; PyArrayObject *__pyx_v_result = 0; int __pyx_v_ret; kh_strbox_t *__pyx_v_table; PyObject *__pyx_v_pyval = 0; PyObject *__pyx_v_NA = 0; khiter_t __pyx_v_k; __Pyx_LocalBuf_ND __pyx_pybuffernd_result; __Pyx_Buffer __pyx_pybuffer_result; 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; size_t __pyx_t_11; Py_ssize_t __pyx_t_12; int __pyx_t_13; Py_ssize_t __pyx_t_14; PyObject **__pyx_t_15; Py_ssize_t __pyx_t_16; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_string_box_factorize", 0); __pyx_pybuffer_result.pybuffer.buf = NULL; __pyx_pybuffer_result.refcount = 0; __pyx_pybuffernd_result.data = NULL; __pyx_pybuffernd_result.rcbuffer = &__pyx_pybuffer_result; /* "pandas/parser.pyx":1222 * bint na_filter, kh_str_t *na_hashset): * cdef: * int error, na_count = 0 # <<<<<<<<<<<<<< * Py_ssize_t i * size_t lines */ __pyx_v_na_count = 0; /* "pandas/parser.pyx":1229 * ndarray[object] result * * int ret = 0 # <<<<<<<<<<<<<< * kh_strbox_t *table * */ __pyx_v_ret = 0; /* "pandas/parser.pyx":1234 * object pyval * * object NA = na_values[np.object_] # <<<<<<<<<<<<<< * khiter_t k * */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_na_values); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1234; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1234; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_object_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1234; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_GetItem(__pyx_t_1, __pyx_t_3); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1234; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_NA = __pyx_t_2; __pyx_t_2 = 0; /* "pandas/parser.pyx":1237 * khiter_t k * * table = kh_init_strbox() # <<<<<<<<<<<<<< * lines = line_end - line_start * result = np.empty(lines, dtype=np.object_) */ __pyx_v_table = kh_init_strbox(); /* "pandas/parser.pyx":1238 * * table = kh_init_strbox() * lines = line_end - line_start # <<<<<<<<<<<<<< * result = np.empty(lines, dtype=np.object_) * coliter_setup(&it, parser, col, line_start) */ __pyx_v_lines = (__pyx_v_line_end - __pyx_v_line_start); /* "pandas/parser.pyx":1239 * table = kh_init_strbox() * lines = line_end - line_start * result = np.empty(lines, dtype=np.object_) # <<<<<<<<<<<<<< * coliter_setup(&it, parser, col, line_start) * */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1239; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 1239; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyInt_FromSize_t(__pyx_v_lines); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1239; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1239; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1239; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1239; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_object_2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1239; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_dtype, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1239; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyObject_Call(__pyx_t_3, __pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1239; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1239; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_6 = ((PyArrayObject *)__pyx_t_5); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_object, 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_result.rcbuffer->pybuffer, (PyObject*)__pyx_v_result, &__Pyx_TypeInfo_object, 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_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_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1239; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_6 = 0; __pyx_v_result = ((PyArrayObject *)__pyx_t_5); __pyx_t_5 = 0; /* "pandas/parser.pyx":1240 * lines = line_end - line_start * result = np.empty(lines, dtype=np.object_) * coliter_setup(&it, parser, col, line_start) # <<<<<<<<<<<<<< * * for i in range(lines): */ coliter_setup((&__pyx_v_it), __pyx_v_parser, __pyx_v_col, __pyx_v_line_start); /* "pandas/parser.pyx":1242 * coliter_setup(&it, parser, col, line_start) * * for i in range(lines): # <<<<<<<<<<<<<< * word = COLITER_NEXT(it) * */ __pyx_t_11 = __pyx_v_lines; for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_11; __pyx_t_12+=1) { __pyx_v_i = __pyx_t_12; /* "pandas/parser.pyx":1243 * * for i in range(lines): * word = COLITER_NEXT(it) # <<<<<<<<<<<<<< * * if na_filter: */ __pyx_v_word = COLITER_NEXT(__pyx_v_it); /* "pandas/parser.pyx":1245 * word = COLITER_NEXT(it) * * if na_filter: # <<<<<<<<<<<<<< * k = kh_get_str(na_hashset, word) * # in the hash table */ __pyx_t_13 = (__pyx_v_na_filter != 0); if (__pyx_t_13) { /* "pandas/parser.pyx":1246 * * if na_filter: * k = kh_get_str(na_hashset, word) # <<<<<<<<<<<<<< * # in the hash table * if k != na_hashset.n_buckets: */ __pyx_v_k = kh_get_str(__pyx_v_na_hashset, __pyx_v_word); /* "pandas/parser.pyx":1248 * k = kh_get_str(na_hashset, word) * # in the hash table * if k != na_hashset.n_buckets: # <<<<<<<<<<<<<< * na_count += 1 * result[i] = NA */ __pyx_t_13 = ((__pyx_v_k != __pyx_v_na_hashset->n_buckets) != 0); if (__pyx_t_13) { /* "pandas/parser.pyx":1249 * # in the hash table * if k != na_hashset.n_buckets: * na_count += 1 # <<<<<<<<<<<<<< * result[i] = NA * continue */ __pyx_v_na_count = (__pyx_v_na_count + 1); /* "pandas/parser.pyx":1250 * if k != na_hashset.n_buckets: * na_count += 1 * result[i] = NA # <<<<<<<<<<<<<< * continue * */ __pyx_t_14 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_14 < 0) { __pyx_t_14 += __pyx_pybuffernd_result.diminfo[0].shape; if (unlikely(__pyx_t_14 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_14 >= __pyx_pybuffernd_result.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1250; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_15 = __Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_result.diminfo[0].strides); __Pyx_GOTREF(*__pyx_t_15); __Pyx_INCREF(__pyx_v_NA); __Pyx_DECREF(*__pyx_t_15); *__pyx_t_15 = __pyx_v_NA; __Pyx_GIVEREF(*__pyx_t_15); /* "pandas/parser.pyx":1251 * na_count += 1 * result[i] = NA * continue # <<<<<<<<<<<<<< * * k = kh_get_strbox(table, word) */ goto __pyx_L3_continue; } goto __pyx_L5; } __pyx_L5:; /* "pandas/parser.pyx":1253 * continue * * k = kh_get_strbox(table, word) # <<<<<<<<<<<<<< * * # in the hash table */ __pyx_v_k = kh_get_strbox(__pyx_v_table, __pyx_v_word); /* "pandas/parser.pyx":1256 * * # in the hash table * if k != table.n_buckets: # <<<<<<<<<<<<<< * # this increments the refcount, but need to test * pyval = table.vals[k] */ __pyx_t_13 = ((__pyx_v_k != __pyx_v_table->n_buckets) != 0); if (__pyx_t_13) { /* "pandas/parser.pyx":1258 * if k != table.n_buckets: * # this increments the refcount, but need to test * pyval = table.vals[k] # <<<<<<<<<<<<<< * else: * # box it. new ref? */ __pyx_t_5 = ((PyObject *)(__pyx_v_table->vals[__pyx_v_k])); __Pyx_INCREF(__pyx_t_5); __Pyx_XDECREF_SET(__pyx_v_pyval, __pyx_t_5); __pyx_t_5 = 0; goto __pyx_L7; } /*else*/ { /* "pandas/parser.pyx":1261 * else: * # box it. new ref? * pyval = PyBytes_FromString(word) # <<<<<<<<<<<<<< * * k = kh_put_strbox(table, word, &ret) */ __pyx_t_5 = PyBytes_FromString(__pyx_v_word); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1261; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_XDECREF_SET(__pyx_v_pyval, __pyx_t_5); __pyx_t_5 = 0; /* "pandas/parser.pyx":1263 * pyval = PyBytes_FromString(word) * * k = kh_put_strbox(table, word, &ret) # <<<<<<<<<<<<<< * table.vals[k] = pyval * */ __pyx_v_k = kh_put_strbox(__pyx_v_table, __pyx_v_word, (&__pyx_v_ret)); /* "pandas/parser.pyx":1264 * * k = kh_put_strbox(table, word, &ret) * table.vals[k] = pyval # <<<<<<<<<<<<<< * * result[i] = pyval */ (__pyx_v_table->vals[__pyx_v_k]) = ((PyObject *)__pyx_v_pyval); } __pyx_L7:; /* "pandas/parser.pyx":1266 * table.vals[k] = pyval * * result[i] = pyval # <<<<<<<<<<<<<< * * kh_destroy_strbox(table) */ __pyx_t_16 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_16 < 0) { __pyx_t_16 += __pyx_pybuffernd_result.diminfo[0].shape; if (unlikely(__pyx_t_16 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_16 >= __pyx_pybuffernd_result.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1266; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_15 = __Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_result.diminfo[0].strides); __Pyx_GOTREF(*__pyx_t_15); __Pyx_INCREF(__pyx_v_pyval); __Pyx_DECREF(*__pyx_t_15); *__pyx_t_15 = __pyx_v_pyval; __Pyx_GIVEREF(*__pyx_t_15); __pyx_L3_continue:; } /* "pandas/parser.pyx":1268 * result[i] = pyval * * kh_destroy_strbox(table) # <<<<<<<<<<<<<< * * return result, na_count */ kh_destroy_strbox(__pyx_v_table); /* "pandas/parser.pyx":1270 * kh_destroy_strbox(table) * * return result, na_count # <<<<<<<<<<<<<< * * cdef _string_box_utf8(parser_t *parser, int col, */ __Pyx_XDECREF(__pyx_r); __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_na_count); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1270; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1270; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(((PyObject *)__pyx_v_result)); PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_result)); __Pyx_GIVEREF(((PyObject *)__pyx_v_result)); PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "pandas/parser.pyx":1218 * # Type conversions / inference support code * * cdef _string_box_factorize(parser_t *parser, int col, # <<<<<<<<<<<<<< * int line_start, int line_end, * bint na_filter, kh_str_t *na_hashset): */ /* 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_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.parser._string_box_factorize", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_result); __Pyx_XDECREF(__pyx_v_pyval); __Pyx_XDECREF(__pyx_v_NA); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/parser.pyx":1272 * return result, na_count * * cdef _string_box_utf8(parser_t *parser, int col, # <<<<<<<<<<<<<< * int line_start, int line_end, * bint na_filter, kh_str_t *na_hashset): */ static PyObject *__pyx_f_6pandas_6parser__string_box_utf8(parser_t *__pyx_v_parser, int __pyx_v_col, int __pyx_v_line_start, int __pyx_v_line_end, int __pyx_v_na_filter, kh_str_t *__pyx_v_na_hashset) { int __pyx_v_na_count; Py_ssize_t __pyx_v_i; size_t __pyx_v_lines; coliter_t __pyx_v_it; char *__pyx_v_word; PyArrayObject *__pyx_v_result = 0; int __pyx_v_ret; kh_strbox_t *__pyx_v_table; PyObject *__pyx_v_pyval = 0; PyObject *__pyx_v_NA = 0; khiter_t __pyx_v_k; __Pyx_LocalBuf_ND __pyx_pybuffernd_result; __Pyx_Buffer __pyx_pybuffer_result; 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; size_t __pyx_t_11; Py_ssize_t __pyx_t_12; int __pyx_t_13; Py_ssize_t __pyx_t_14; PyObject **__pyx_t_15; Py_ssize_t __pyx_t_16; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_string_box_utf8", 0); __pyx_pybuffer_result.pybuffer.buf = NULL; __pyx_pybuffer_result.refcount = 0; __pyx_pybuffernd_result.data = NULL; __pyx_pybuffernd_result.rcbuffer = &__pyx_pybuffer_result; /* "pandas/parser.pyx":1276 * bint na_filter, kh_str_t *na_hashset): * cdef: * int error, na_count = 0 # <<<<<<<<<<<<<< * Py_ssize_t i * size_t lines */ __pyx_v_na_count = 0; /* "pandas/parser.pyx":1283 * ndarray[object] result * * int ret = 0 # <<<<<<<<<<<<<< * kh_strbox_t *table * */ __pyx_v_ret = 0; /* "pandas/parser.pyx":1288 * object pyval * * object NA = na_values[np.object_] # <<<<<<<<<<<<<< * khiter_t k * */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_na_values); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1288; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1288; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_object_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1288; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_GetItem(__pyx_t_1, __pyx_t_3); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1288; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_NA = __pyx_t_2; __pyx_t_2 = 0; /* "pandas/parser.pyx":1291 * khiter_t k * * table = kh_init_strbox() # <<<<<<<<<<<<<< * lines = line_end - line_start * result = np.empty(lines, dtype=np.object_) */ __pyx_v_table = kh_init_strbox(); /* "pandas/parser.pyx":1292 * * table = kh_init_strbox() * lines = line_end - line_start # <<<<<<<<<<<<<< * result = np.empty(lines, dtype=np.object_) * coliter_setup(&it, parser, col, line_start) */ __pyx_v_lines = (__pyx_v_line_end - __pyx_v_line_start); /* "pandas/parser.pyx":1293 * table = kh_init_strbox() * lines = line_end - line_start * result = np.empty(lines, dtype=np.object_) # <<<<<<<<<<<<<< * coliter_setup(&it, parser, col, line_start) * */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1293; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 1293; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyInt_FromSize_t(__pyx_v_lines); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1293; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1293; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1293; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1293; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_object_2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1293; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_dtype, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1293; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyObject_Call(__pyx_t_3, __pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1293; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1293; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_6 = ((PyArrayObject *)__pyx_t_5); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_object, 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_result.rcbuffer->pybuffer, (PyObject*)__pyx_v_result, &__Pyx_TypeInfo_object, 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_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_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1293; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_6 = 0; __pyx_v_result = ((PyArrayObject *)__pyx_t_5); __pyx_t_5 = 0; /* "pandas/parser.pyx":1294 * lines = line_end - line_start * result = np.empty(lines, dtype=np.object_) * coliter_setup(&it, parser, col, line_start) # <<<<<<<<<<<<<< * * for i in range(lines): */ coliter_setup((&__pyx_v_it), __pyx_v_parser, __pyx_v_col, __pyx_v_line_start); /* "pandas/parser.pyx":1296 * coliter_setup(&it, parser, col, line_start) * * for i in range(lines): # <<<<<<<<<<<<<< * word = COLITER_NEXT(it) * */ __pyx_t_11 = __pyx_v_lines; for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_11; __pyx_t_12+=1) { __pyx_v_i = __pyx_t_12; /* "pandas/parser.pyx":1297 * * for i in range(lines): * word = COLITER_NEXT(it) # <<<<<<<<<<<<<< * * if na_filter: */ __pyx_v_word = COLITER_NEXT(__pyx_v_it); /* "pandas/parser.pyx":1299 * word = COLITER_NEXT(it) * * if na_filter: # <<<<<<<<<<<<<< * k = kh_get_str(na_hashset, word) * # in the hash table */ __pyx_t_13 = (__pyx_v_na_filter != 0); if (__pyx_t_13) { /* "pandas/parser.pyx":1300 * * if na_filter: * k = kh_get_str(na_hashset, word) # <<<<<<<<<<<<<< * # in the hash table * if k != na_hashset.n_buckets: */ __pyx_v_k = kh_get_str(__pyx_v_na_hashset, __pyx_v_word); /* "pandas/parser.pyx":1302 * k = kh_get_str(na_hashset, word) * # in the hash table * if k != na_hashset.n_buckets: # <<<<<<<<<<<<<< * na_count += 1 * result[i] = NA */ __pyx_t_13 = ((__pyx_v_k != __pyx_v_na_hashset->n_buckets) != 0); if (__pyx_t_13) { /* "pandas/parser.pyx":1303 * # in the hash table * if k != na_hashset.n_buckets: * na_count += 1 # <<<<<<<<<<<<<< * result[i] = NA * continue */ __pyx_v_na_count = (__pyx_v_na_count + 1); /* "pandas/parser.pyx":1304 * if k != na_hashset.n_buckets: * na_count += 1 * result[i] = NA # <<<<<<<<<<<<<< * continue * */ __pyx_t_14 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_14 < 0) { __pyx_t_14 += __pyx_pybuffernd_result.diminfo[0].shape; if (unlikely(__pyx_t_14 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_14 >= __pyx_pybuffernd_result.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1304; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_15 = __Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_result.diminfo[0].strides); __Pyx_GOTREF(*__pyx_t_15); __Pyx_INCREF(__pyx_v_NA); __Pyx_DECREF(*__pyx_t_15); *__pyx_t_15 = __pyx_v_NA; __Pyx_GIVEREF(*__pyx_t_15); /* "pandas/parser.pyx":1305 * na_count += 1 * result[i] = NA * continue # <<<<<<<<<<<<<< * * k = kh_get_strbox(table, word) */ goto __pyx_L3_continue; } goto __pyx_L5; } __pyx_L5:; /* "pandas/parser.pyx":1307 * continue * * k = kh_get_strbox(table, word) # <<<<<<<<<<<<<< * * # in the hash table */ __pyx_v_k = kh_get_strbox(__pyx_v_table, __pyx_v_word); /* "pandas/parser.pyx":1310 * * # in the hash table * if k != table.n_buckets: # <<<<<<<<<<<<<< * # this increments the refcount, but need to test * pyval = table.vals[k] */ __pyx_t_13 = ((__pyx_v_k != __pyx_v_table->n_buckets) != 0); if (__pyx_t_13) { /* "pandas/parser.pyx":1312 * if k != table.n_buckets: * # this increments the refcount, but need to test * pyval = table.vals[k] # <<<<<<<<<<<<<< * else: * # box it. new ref? */ __pyx_t_5 = ((PyObject *)(__pyx_v_table->vals[__pyx_v_k])); __Pyx_INCREF(__pyx_t_5); __Pyx_XDECREF_SET(__pyx_v_pyval, __pyx_t_5); __pyx_t_5 = 0; goto __pyx_L7; } /*else*/ { /* "pandas/parser.pyx":1315 * else: * # box it. new ref? * pyval = PyUnicode_FromString(word) # <<<<<<<<<<<<<< * * k = kh_put_strbox(table, word, &ret) */ __pyx_t_5 = PyUnicode_FromString(__pyx_v_word); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1315; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_XDECREF_SET(__pyx_v_pyval, __pyx_t_5); __pyx_t_5 = 0; /* "pandas/parser.pyx":1317 * pyval = PyUnicode_FromString(word) * * k = kh_put_strbox(table, word, &ret) # <<<<<<<<<<<<<< * table.vals[k] = pyval * */ __pyx_v_k = kh_put_strbox(__pyx_v_table, __pyx_v_word, (&__pyx_v_ret)); /* "pandas/parser.pyx":1318 * * k = kh_put_strbox(table, word, &ret) * table.vals[k] = pyval # <<<<<<<<<<<<<< * * result[i] = pyval */ (__pyx_v_table->vals[__pyx_v_k]) = ((PyObject *)__pyx_v_pyval); } __pyx_L7:; /* "pandas/parser.pyx":1320 * table.vals[k] = pyval * * result[i] = pyval # <<<<<<<<<<<<<< * * kh_destroy_strbox(table) */ __pyx_t_16 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_16 < 0) { __pyx_t_16 += __pyx_pybuffernd_result.diminfo[0].shape; if (unlikely(__pyx_t_16 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_16 >= __pyx_pybuffernd_result.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1320; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_15 = __Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_result.diminfo[0].strides); __Pyx_GOTREF(*__pyx_t_15); __Pyx_INCREF(__pyx_v_pyval); __Pyx_DECREF(*__pyx_t_15); *__pyx_t_15 = __pyx_v_pyval; __Pyx_GIVEREF(*__pyx_t_15); __pyx_L3_continue:; } /* "pandas/parser.pyx":1322 * result[i] = pyval * * kh_destroy_strbox(table) # <<<<<<<<<<<<<< * * return result, na_count */ kh_destroy_strbox(__pyx_v_table); /* "pandas/parser.pyx":1324 * kh_destroy_strbox(table) * * return result, na_count # <<<<<<<<<<<<<< * * cdef _string_box_decode(parser_t *parser, int col, */ __Pyx_XDECREF(__pyx_r); __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_na_count); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1324; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1324; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(((PyObject *)__pyx_v_result)); PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_result)); __Pyx_GIVEREF(((PyObject *)__pyx_v_result)); PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "pandas/parser.pyx":1272 * return result, na_count * * cdef _string_box_utf8(parser_t *parser, int col, # <<<<<<<<<<<<<< * int line_start, int line_end, * bint na_filter, kh_str_t *na_hashset): */ /* 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_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.parser._string_box_utf8", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_result); __Pyx_XDECREF(__pyx_v_pyval); __Pyx_XDECREF(__pyx_v_NA); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/parser.pyx":1326 * return result, na_count * * cdef _string_box_decode(parser_t *parser, int col, # <<<<<<<<<<<<<< * int line_start, int line_end, * bint na_filter, kh_str_t *na_hashset, */ static PyObject *__pyx_f_6pandas_6parser__string_box_decode(parser_t *__pyx_v_parser, int __pyx_v_col, int __pyx_v_line_start, int __pyx_v_line_end, int __pyx_v_na_filter, kh_str_t *__pyx_v_na_hashset, char *__pyx_v_encoding) { int __pyx_v_na_count; Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_size; size_t __pyx_v_lines; coliter_t __pyx_v_it; char *__pyx_v_word; PyArrayObject *__pyx_v_result = 0; int __pyx_v_ret; kh_strbox_t *__pyx_v_table; char *__pyx_v_errors; PyObject *__pyx_v_pyval = 0; PyObject *__pyx_v_NA = 0; khiter_t __pyx_v_k; __Pyx_LocalBuf_ND __pyx_pybuffernd_result; __Pyx_Buffer __pyx_pybuffer_result; 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; size_t __pyx_t_11; Py_ssize_t __pyx_t_12; int __pyx_t_13; Py_ssize_t __pyx_t_14; PyObject **__pyx_t_15; Py_ssize_t __pyx_t_16; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_string_box_decode", 0); __pyx_pybuffer_result.pybuffer.buf = NULL; __pyx_pybuffer_result.refcount = 0; __pyx_pybuffernd_result.data = NULL; __pyx_pybuffernd_result.rcbuffer = &__pyx_pybuffer_result; /* "pandas/parser.pyx":1331 * char *encoding): * cdef: * int error, na_count = 0 # <<<<<<<<<<<<<< * Py_ssize_t i, size * size_t lines */ __pyx_v_na_count = 0; /* "pandas/parser.pyx":1338 * ndarray[object] result * * int ret = 0 # <<<<<<<<<<<<<< * kh_strbox_t *table * */ __pyx_v_ret = 0; /* "pandas/parser.pyx":1341 * kh_strbox_t *table * * char *errors = "strict" # <<<<<<<<<<<<<< * * object pyval */ __pyx_v_errors = __pyx_k_strict; /* "pandas/parser.pyx":1345 * object pyval * * object NA = na_values[np.object_] # <<<<<<<<<<<<<< * khiter_t k * */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_na_values); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1345; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1345; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_object_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1345; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_GetItem(__pyx_t_1, __pyx_t_3); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1345; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_NA = __pyx_t_2; __pyx_t_2 = 0; /* "pandas/parser.pyx":1348 * khiter_t k * * table = kh_init_strbox() # <<<<<<<<<<<<<< * lines = line_end - line_start * result = np.empty(lines, dtype=np.object_) */ __pyx_v_table = kh_init_strbox(); /* "pandas/parser.pyx":1349 * * table = kh_init_strbox() * lines = line_end - line_start # <<<<<<<<<<<<<< * result = np.empty(lines, dtype=np.object_) * coliter_setup(&it, parser, col, line_start) */ __pyx_v_lines = (__pyx_v_line_end - __pyx_v_line_start); /* "pandas/parser.pyx":1350 * table = kh_init_strbox() * lines = line_end - line_start * result = np.empty(lines, dtype=np.object_) # <<<<<<<<<<<<<< * coliter_setup(&it, parser, col, line_start) * */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1350; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 1350; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyInt_FromSize_t(__pyx_v_lines); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1350; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1350; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1350; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1350; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_object_2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1350; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_dtype, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1350; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyObject_Call(__pyx_t_3, __pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1350; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1350; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_6 = ((PyArrayObject *)__pyx_t_5); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_object, 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_result.rcbuffer->pybuffer, (PyObject*)__pyx_v_result, &__Pyx_TypeInfo_object, 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_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_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1350; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_6 = 0; __pyx_v_result = ((PyArrayObject *)__pyx_t_5); __pyx_t_5 = 0; /* "pandas/parser.pyx":1351 * lines = line_end - line_start * result = np.empty(lines, dtype=np.object_) * coliter_setup(&it, parser, col, line_start) # <<<<<<<<<<<<<< * * for i in range(lines): */ coliter_setup((&__pyx_v_it), __pyx_v_parser, __pyx_v_col, __pyx_v_line_start); /* "pandas/parser.pyx":1353 * coliter_setup(&it, parser, col, line_start) * * for i in range(lines): # <<<<<<<<<<<<<< * word = COLITER_NEXT(it) * */ __pyx_t_11 = __pyx_v_lines; for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_11; __pyx_t_12+=1) { __pyx_v_i = __pyx_t_12; /* "pandas/parser.pyx":1354 * * for i in range(lines): * word = COLITER_NEXT(it) # <<<<<<<<<<<<<< * * if na_filter: */ __pyx_v_word = COLITER_NEXT(__pyx_v_it); /* "pandas/parser.pyx":1356 * word = COLITER_NEXT(it) * * if na_filter: # <<<<<<<<<<<<<< * k = kh_get_str(na_hashset, word) * # in the hash table */ __pyx_t_13 = (__pyx_v_na_filter != 0); if (__pyx_t_13) { /* "pandas/parser.pyx":1357 * * if na_filter: * k = kh_get_str(na_hashset, word) # <<<<<<<<<<<<<< * # in the hash table * if k != na_hashset.n_buckets: */ __pyx_v_k = kh_get_str(__pyx_v_na_hashset, __pyx_v_word); /* "pandas/parser.pyx":1359 * k = kh_get_str(na_hashset, word) * # in the hash table * if k != na_hashset.n_buckets: # <<<<<<<<<<<<<< * na_count += 1 * result[i] = NA */ __pyx_t_13 = ((__pyx_v_k != __pyx_v_na_hashset->n_buckets) != 0); if (__pyx_t_13) { /* "pandas/parser.pyx":1360 * # in the hash table * if k != na_hashset.n_buckets: * na_count += 1 # <<<<<<<<<<<<<< * result[i] = NA * continue */ __pyx_v_na_count = (__pyx_v_na_count + 1); /* "pandas/parser.pyx":1361 * if k != na_hashset.n_buckets: * na_count += 1 * result[i] = NA # <<<<<<<<<<<<<< * continue * */ __pyx_t_14 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_14 < 0) { __pyx_t_14 += __pyx_pybuffernd_result.diminfo[0].shape; if (unlikely(__pyx_t_14 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_14 >= __pyx_pybuffernd_result.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1361; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_15 = __Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_result.diminfo[0].strides); __Pyx_GOTREF(*__pyx_t_15); __Pyx_INCREF(__pyx_v_NA); __Pyx_DECREF(*__pyx_t_15); *__pyx_t_15 = __pyx_v_NA; __Pyx_GIVEREF(*__pyx_t_15); /* "pandas/parser.pyx":1362 * na_count += 1 * result[i] = NA * continue # <<<<<<<<<<<<<< * * k = kh_get_strbox(table, word) */ goto __pyx_L3_continue; } goto __pyx_L5; } __pyx_L5:; /* "pandas/parser.pyx":1364 * continue * * k = kh_get_strbox(table, word) # <<<<<<<<<<<<<< * * # in the hash table */ __pyx_v_k = kh_get_strbox(__pyx_v_table, __pyx_v_word); /* "pandas/parser.pyx":1367 * * # in the hash table * if k != table.n_buckets: # <<<<<<<<<<<<<< * # this increments the refcount, but need to test * pyval = table.vals[k] */ __pyx_t_13 = ((__pyx_v_k != __pyx_v_table->n_buckets) != 0); if (__pyx_t_13) { /* "pandas/parser.pyx":1369 * if k != table.n_buckets: * # this increments the refcount, but need to test * pyval = table.vals[k] # <<<<<<<<<<<<<< * else: * # box it. new ref? */ __pyx_t_5 = ((PyObject *)(__pyx_v_table->vals[__pyx_v_k])); __Pyx_INCREF(__pyx_t_5); __Pyx_XDECREF_SET(__pyx_v_pyval, __pyx_t_5); __pyx_t_5 = 0; goto __pyx_L7; } /*else*/ { /* "pandas/parser.pyx":1372 * else: * # box it. new ref? * size = strlen(word) # <<<<<<<<<<<<<< * pyval = PyUnicode_Decode(word, size, encoding, errors) * */ __pyx_v_size = strlen(__pyx_v_word); /* "pandas/parser.pyx":1373 * # box it. new ref? * size = strlen(word) * pyval = PyUnicode_Decode(word, size, encoding, errors) # <<<<<<<<<<<<<< * * k = kh_put_strbox(table, word, &ret) */ __pyx_t_5 = PyUnicode_Decode(__pyx_v_word, __pyx_v_size, __pyx_v_encoding, __pyx_v_errors); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1373; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_XDECREF_SET(__pyx_v_pyval, __pyx_t_5); __pyx_t_5 = 0; /* "pandas/parser.pyx":1375 * pyval = PyUnicode_Decode(word, size, encoding, errors) * * k = kh_put_strbox(table, word, &ret) # <<<<<<<<<<<<<< * table.vals[k] = pyval * */ __pyx_v_k = kh_put_strbox(__pyx_v_table, __pyx_v_word, (&__pyx_v_ret)); /* "pandas/parser.pyx":1376 * * k = kh_put_strbox(table, word, &ret) * table.vals[k] = pyval # <<<<<<<<<<<<<< * * result[i] = pyval */ (__pyx_v_table->vals[__pyx_v_k]) = ((PyObject *)__pyx_v_pyval); } __pyx_L7:; /* "pandas/parser.pyx":1378 * table.vals[k] = pyval * * result[i] = pyval # <<<<<<<<<<<<<< * * kh_destroy_strbox(table) */ __pyx_t_16 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_16 < 0) { __pyx_t_16 += __pyx_pybuffernd_result.diminfo[0].shape; if (unlikely(__pyx_t_16 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_16 >= __pyx_pybuffernd_result.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1378; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_15 = __Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_result.diminfo[0].strides); __Pyx_GOTREF(*__pyx_t_15); __Pyx_INCREF(__pyx_v_pyval); __Pyx_DECREF(*__pyx_t_15); *__pyx_t_15 = __pyx_v_pyval; __Pyx_GIVEREF(*__pyx_t_15); __pyx_L3_continue:; } /* "pandas/parser.pyx":1380 * result[i] = pyval * * kh_destroy_strbox(table) # <<<<<<<<<<<<<< * * return result, na_count */ kh_destroy_strbox(__pyx_v_table); /* "pandas/parser.pyx":1382 * kh_destroy_strbox(table) * * return result, na_count # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_na_count); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1382; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1382; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(((PyObject *)__pyx_v_result)); PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_result)); __Pyx_GIVEREF(((PyObject *)__pyx_v_result)); PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "pandas/parser.pyx":1326 * return result, na_count * * cdef _string_box_decode(parser_t *parser, int col, # <<<<<<<<<<<<<< * int line_start, int line_end, * bint na_filter, kh_str_t *na_hashset, */ /* 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_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.parser._string_box_decode", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_result); __Pyx_XDECREF(__pyx_v_pyval); __Pyx_XDECREF(__pyx_v_NA); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/parser.pyx":1385 * * * cdef _to_fw_string(parser_t *parser, int col, int line_start, # <<<<<<<<<<<<<< * int line_end, size_t width): * cdef: */ static PyObject *__pyx_f_6pandas_6parser__to_fw_string(parser_t *__pyx_v_parser, int __pyx_v_col, int __pyx_v_line_start, int __pyx_v_line_end, size_t __pyx_v_width) { CYTHON_UNUSED Py_ssize_t __pyx_v_i; coliter_t __pyx_v_it; char *__pyx_v_word; char *__pyx_v_data; PyArrayObject *__pyx_v_result = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; int __pyx_t_6; Py_ssize_t __pyx_t_7; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_to_fw_string", 0); /* "pandas/parser.pyx":1394 * ndarray result * * result = np.empty(line_end - line_start, dtype='|S%d' % width) # <<<<<<<<<<<<<< * data = result.data * */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1394; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 1394; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_PyInt_From_int((__pyx_v_line_end - __pyx_v_line_start)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1394; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1394; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1394; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = __Pyx_PyInt_FromSize_t(__pyx_v_width); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1394; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyString_Format(__pyx_kp_s_S_d, __pyx_t_4); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1394; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 1394; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyObject_Call(__pyx_t_2, __pyx_t_3, __pyx_t_1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1394; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 1394; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_result = ((PyArrayObject *)__pyx_t_5); __pyx_t_5 = 0; /* "pandas/parser.pyx":1395 * * result = np.empty(line_end - line_start, dtype='|S%d' % width) * data = result.data # <<<<<<<<<<<<<< * * coliter_setup(&it, parser, col, line_start) */ __pyx_v_data = ((char *)__pyx_v_result->data); /* "pandas/parser.pyx":1397 * data = result.data * * coliter_setup(&it, parser, col, line_start) # <<<<<<<<<<<<<< * * for i in range(line_end - line_start): */ coliter_setup((&__pyx_v_it), __pyx_v_parser, __pyx_v_col, __pyx_v_line_start); /* "pandas/parser.pyx":1399 * coliter_setup(&it, parser, col, line_start) * * for i in range(line_end - line_start): # <<<<<<<<<<<<<< * word = COLITER_NEXT(it) * strncpy(data, word, width) */ __pyx_t_6 = (__pyx_v_line_end - __pyx_v_line_start); for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_6; __pyx_t_7+=1) { __pyx_v_i = __pyx_t_7; /* "pandas/parser.pyx":1400 * * for i in range(line_end - line_start): * word = COLITER_NEXT(it) # <<<<<<<<<<<<<< * strncpy(data, word, width) * data += width */ __pyx_v_word = COLITER_NEXT(__pyx_v_it); /* "pandas/parser.pyx":1401 * for i in range(line_end - line_start): * word = COLITER_NEXT(it) * strncpy(data, word, width) # <<<<<<<<<<<<<< * data += width * */ strncpy(__pyx_v_data, __pyx_v_word, __pyx_v_width); /* "pandas/parser.pyx":1402 * word = COLITER_NEXT(it) * strncpy(data, word, width) * data += width # <<<<<<<<<<<<<< * * return result */ __pyx_v_data = (__pyx_v_data + __pyx_v_width); } /* "pandas/parser.pyx":1404 * data += width * * return result # <<<<<<<<<<<<<< * * cdef char* cinf = b'inf' */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_result)); __pyx_r = ((PyObject *)__pyx_v_result); goto __pyx_L0; /* "pandas/parser.pyx":1385 * * * cdef _to_fw_string(parser_t *parser, int col, int line_start, # <<<<<<<<<<<<<< * int line_end, size_t width): * 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_AddTraceback("pandas.parser._to_fw_string", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_result); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/parser.pyx":1409 * cdef char* cneginf = b'-inf' * * cdef _try_double(parser_t *parser, int col, int line_start, int line_end, # <<<<<<<<<<<<<< * bint na_filter, kh_str_t *na_hashset, object na_flist): * cdef: */ static PyObject *__pyx_f_6pandas_6parser__try_double(parser_t *__pyx_v_parser, int __pyx_v_col, int __pyx_v_line_start, int __pyx_v_line_end, int __pyx_v_na_filter, kh_str_t *__pyx_v_na_hashset, PyObject *__pyx_v_na_flist) { int __pyx_v_error; int __pyx_v_na_count; CYTHON_UNUSED size_t __pyx_v_i; size_t __pyx_v_lines; coliter_t __pyx_v_it; char *__pyx_v_word; double *__pyx_v_data; double __pyx_v_NA; PyArrayObject *__pyx_v_result = 0; khiter_t __pyx_v_k; int __pyx_v_use_na_flist; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; double __pyx_t_4; Py_ssize_t __pyx_t_5; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; int __pyx_t_8; size_t __pyx_t_9; size_t __pyx_t_10; int __pyx_t_11; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_try_double", 0); /* "pandas/parser.pyx":1412 * bint na_filter, kh_str_t *na_hashset, object na_flist): * cdef: * int error, na_count = 0 # <<<<<<<<<<<<<< * size_t i, lines * coliter_t it */ __pyx_v_na_count = 0; /* "pandas/parser.pyx":1417 * char *word * double *data * double NA = na_values[np.float64] # <<<<<<<<<<<<<< * ndarray result * khiter_t k */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_na_values); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1417; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1417; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_float64); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1417; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_GetItem(__pyx_t_1, __pyx_t_3); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1417; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_4 = __pyx_PyFloat_AsDouble(__pyx_t_2); if (unlikely((__pyx_t_4 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1417; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_NA = __pyx_t_4; /* "pandas/parser.pyx":1420 * ndarray result * khiter_t k * bint use_na_flist = len(na_flist) > 0 # <<<<<<<<<<<<<< * * lines = line_end - line_start */ __pyx_t_5 = PyObject_Length(__pyx_v_na_flist); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1420; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_use_na_flist = (__pyx_t_5 > 0); /* "pandas/parser.pyx":1422 * bint use_na_flist = len(na_flist) > 0 * * lines = line_end - line_start # <<<<<<<<<<<<<< * result = np.empty(lines, dtype=np.float64) * data = result.data */ __pyx_v_lines = (__pyx_v_line_end - __pyx_v_line_start); /* "pandas/parser.pyx":1423 * * lines = line_end - line_start * result = np.empty(lines, dtype=np.float64) # <<<<<<<<<<<<<< * data = result.data * coliter_setup(&it, parser, col, line_start) */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1423; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 1423; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyInt_FromSize_t(__pyx_v_lines); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1423; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1423; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1423; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1423; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_float64); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1423; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_dtype, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1423; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_7 = PyObject_Call(__pyx_t_3, __pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1423; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (!(likely(((__pyx_t_7) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_7, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1423; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_result = ((PyArrayObject *)__pyx_t_7); __pyx_t_7 = 0; /* "pandas/parser.pyx":1424 * lines = line_end - line_start * result = np.empty(lines, dtype=np.float64) * data = result.data # <<<<<<<<<<<<<< * coliter_setup(&it, parser, col, line_start) * */ __pyx_v_data = ((double *)__pyx_v_result->data); /* "pandas/parser.pyx":1425 * result = np.empty(lines, dtype=np.float64) * data = result.data * coliter_setup(&it, parser, col, line_start) # <<<<<<<<<<<<<< * * if na_filter: */ coliter_setup((&__pyx_v_it), __pyx_v_parser, __pyx_v_col, __pyx_v_line_start); /* "pandas/parser.pyx":1427 * coliter_setup(&it, parser, col, line_start) * * if na_filter: # <<<<<<<<<<<<<< * for i in range(lines): * word = COLITER_NEXT(it) */ __pyx_t_8 = (__pyx_v_na_filter != 0); if (__pyx_t_8) { /* "pandas/parser.pyx":1428 * * if na_filter: * for i in range(lines): # <<<<<<<<<<<<<< * word = COLITER_NEXT(it) * */ __pyx_t_9 = __pyx_v_lines; for (__pyx_t_10 = 0; __pyx_t_10 < __pyx_t_9; __pyx_t_10+=1) { __pyx_v_i = __pyx_t_10; /* "pandas/parser.pyx":1429 * if na_filter: * for i in range(lines): * word = COLITER_NEXT(it) # <<<<<<<<<<<<<< * * k = kh_get_str(na_hashset, word) */ __pyx_v_word = COLITER_NEXT(__pyx_v_it); /* "pandas/parser.pyx":1431 * word = COLITER_NEXT(it) * * k = kh_get_str(na_hashset, word) # <<<<<<<<<<<<<< * # in the hash table * if k != na_hashset.n_buckets: */ __pyx_v_k = kh_get_str(__pyx_v_na_hashset, __pyx_v_word); /* "pandas/parser.pyx":1433 * k = kh_get_str(na_hashset, word) * # in the hash table * if k != na_hashset.n_buckets: # <<<<<<<<<<<<<< * na_count += 1 * data[0] = NA */ __pyx_t_8 = ((__pyx_v_k != __pyx_v_na_hashset->n_buckets) != 0); if (__pyx_t_8) { /* "pandas/parser.pyx":1434 * # in the hash table * if k != na_hashset.n_buckets: * na_count += 1 # <<<<<<<<<<<<<< * data[0] = NA * else: */ __pyx_v_na_count = (__pyx_v_na_count + 1); /* "pandas/parser.pyx":1435 * if k != na_hashset.n_buckets: * na_count += 1 * data[0] = NA # <<<<<<<<<<<<<< * else: * error = to_double(word, data, parser.sci, parser.decimal, parser.thousands) */ (__pyx_v_data[0]) = __pyx_v_NA; goto __pyx_L6; } /*else*/ { /* "pandas/parser.pyx":1437 * data[0] = NA * else: * error = to_double(word, data, parser.sci, parser.decimal, parser.thousands) # <<<<<<<<<<<<<< * if error != 1: * if strcasecmp(word, cinf) == 0: */ __pyx_v_error = to_double(__pyx_v_word, __pyx_v_data, __pyx_v_parser->sci, __pyx_v_parser->decimal, __pyx_v_parser->thousands); /* "pandas/parser.pyx":1438 * else: * error = to_double(word, data, parser.sci, parser.decimal, parser.thousands) * if error != 1: # <<<<<<<<<<<<<< * if strcasecmp(word, cinf) == 0: * data[0] = INF */ __pyx_t_8 = ((__pyx_v_error != 1) != 0); if (__pyx_t_8) { /* "pandas/parser.pyx":1439 * error = to_double(word, data, parser.sci, parser.decimal, parser.thousands) * if error != 1: * if strcasecmp(word, cinf) == 0: # <<<<<<<<<<<<<< * data[0] = INF * elif strcasecmp(word, cneginf) == 0: */ __pyx_t_8 = ((strcasecmp(__pyx_v_word, __pyx_v_6pandas_6parser_cinf) == 0) != 0); if (__pyx_t_8) { /* "pandas/parser.pyx":1440 * if error != 1: * if strcasecmp(word, cinf) == 0: * data[0] = INF # <<<<<<<<<<<<<< * elif strcasecmp(word, cneginf) == 0: * data[0] = NEGINF */ (__pyx_v_data[0]) = __pyx_v_6pandas_6parser_INF; goto __pyx_L8; } /* "pandas/parser.pyx":1441 * if strcasecmp(word, cinf) == 0: * data[0] = INF * elif strcasecmp(word, cneginf) == 0: # <<<<<<<<<<<<<< * data[0] = NEGINF * else: */ __pyx_t_8 = ((strcasecmp(__pyx_v_word, __pyx_v_6pandas_6parser_cneginf) == 0) != 0); if (__pyx_t_8) { /* "pandas/parser.pyx":1442 * data[0] = INF * elif strcasecmp(word, cneginf) == 0: * data[0] = NEGINF # <<<<<<<<<<<<<< * else: * return None, None */ (__pyx_v_data[0]) = __pyx_v_6pandas_6parser_NEGINF; goto __pyx_L8; } /*else*/ { /* "pandas/parser.pyx":1444 * data[0] = NEGINF * else: * return None, None # <<<<<<<<<<<<<< * if use_na_flist: * if data[0] in na_flist: */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_tuple__27); __pyx_r = __pyx_tuple__27; goto __pyx_L0; } __pyx_L8:; goto __pyx_L7; } __pyx_L7:; /* "pandas/parser.pyx":1445 * else: * return None, None * if use_na_flist: # <<<<<<<<<<<<<< * if data[0] in na_flist: * na_count += 1 */ __pyx_t_8 = (__pyx_v_use_na_flist != 0); if (__pyx_t_8) { /* "pandas/parser.pyx":1446 * return None, None * if use_na_flist: * if data[0] in na_flist: # <<<<<<<<<<<<<< * na_count += 1 * data[0] = NA */ __pyx_t_7 = PyFloat_FromDouble((__pyx_v_data[0])); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1446; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_t_8 = (__Pyx_PySequence_Contains(__pyx_t_7, __pyx_v_na_flist, Py_EQ)); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1446; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_11 = (__pyx_t_8 != 0); if (__pyx_t_11) { /* "pandas/parser.pyx":1447 * if use_na_flist: * if data[0] in na_flist: * na_count += 1 # <<<<<<<<<<<<<< * data[0] = NA * data += 1 */ __pyx_v_na_count = (__pyx_v_na_count + 1); /* "pandas/parser.pyx":1448 * if data[0] in na_flist: * na_count += 1 * data[0] = NA # <<<<<<<<<<<<<< * data += 1 * else: */ (__pyx_v_data[0]) = __pyx_v_NA; goto __pyx_L10; } __pyx_L10:; goto __pyx_L9; } __pyx_L9:; } __pyx_L6:; /* "pandas/parser.pyx":1449 * na_count += 1 * data[0] = NA * data += 1 # <<<<<<<<<<<<<< * else: * for i in range(lines): */ __pyx_v_data = (__pyx_v_data + 1); } goto __pyx_L3; } /*else*/ { /* "pandas/parser.pyx":1451 * data += 1 * else: * for i in range(lines): # <<<<<<<<<<<<<< * word = COLITER_NEXT(it) * error = to_double(word, data, parser.sci, parser.decimal, parser.thousands) */ __pyx_t_9 = __pyx_v_lines; for (__pyx_t_10 = 0; __pyx_t_10 < __pyx_t_9; __pyx_t_10+=1) { __pyx_v_i = __pyx_t_10; /* "pandas/parser.pyx":1452 * else: * for i in range(lines): * word = COLITER_NEXT(it) # <<<<<<<<<<<<<< * error = to_double(word, data, parser.sci, parser.decimal, parser.thousands) * if error != 1: */ __pyx_v_word = COLITER_NEXT(__pyx_v_it); /* "pandas/parser.pyx":1453 * for i in range(lines): * word = COLITER_NEXT(it) * error = to_double(word, data, parser.sci, parser.decimal, parser.thousands) # <<<<<<<<<<<<<< * if error != 1: * if strcasecmp(word, cinf) == 0: */ __pyx_v_error = to_double(__pyx_v_word, __pyx_v_data, __pyx_v_parser->sci, __pyx_v_parser->decimal, __pyx_v_parser->thousands); /* "pandas/parser.pyx":1454 * word = COLITER_NEXT(it) * error = to_double(word, data, parser.sci, parser.decimal, parser.thousands) * if error != 1: # <<<<<<<<<<<<<< * if strcasecmp(word, cinf) == 0: * data[0] = INF */ __pyx_t_11 = ((__pyx_v_error != 1) != 0); if (__pyx_t_11) { /* "pandas/parser.pyx":1455 * error = to_double(word, data, parser.sci, parser.decimal, parser.thousands) * if error != 1: * if strcasecmp(word, cinf) == 0: # <<<<<<<<<<<<<< * data[0] = INF * elif strcasecmp(word, cneginf) == 0: */ __pyx_t_11 = ((strcasecmp(__pyx_v_word, __pyx_v_6pandas_6parser_cinf) == 0) != 0); if (__pyx_t_11) { /* "pandas/parser.pyx":1456 * if error != 1: * if strcasecmp(word, cinf) == 0: * data[0] = INF # <<<<<<<<<<<<<< * elif strcasecmp(word, cneginf) == 0: * data[0] = NEGINF */ (__pyx_v_data[0]) = __pyx_v_6pandas_6parser_INF; goto __pyx_L14; } /* "pandas/parser.pyx":1457 * if strcasecmp(word, cinf) == 0: * data[0] = INF * elif strcasecmp(word, cneginf) == 0: # <<<<<<<<<<<<<< * data[0] = NEGINF * else: */ __pyx_t_11 = ((strcasecmp(__pyx_v_word, __pyx_v_6pandas_6parser_cneginf) == 0) != 0); if (__pyx_t_11) { /* "pandas/parser.pyx":1458 * data[0] = INF * elif strcasecmp(word, cneginf) == 0: * data[0] = NEGINF # <<<<<<<<<<<<<< * else: * return None, None */ (__pyx_v_data[0]) = __pyx_v_6pandas_6parser_NEGINF; goto __pyx_L14; } /*else*/ { /* "pandas/parser.pyx":1460 * data[0] = NEGINF * else: * return None, None # <<<<<<<<<<<<<< * data += 1 * */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_tuple__28); __pyx_r = __pyx_tuple__28; goto __pyx_L0; } __pyx_L14:; goto __pyx_L13; } __pyx_L13:; /* "pandas/parser.pyx":1461 * else: * return None, None * data += 1 # <<<<<<<<<<<<<< * * return result, na_count */ __pyx_v_data = (__pyx_v_data + 1); } } __pyx_L3:; /* "pandas/parser.pyx":1463 * data += 1 * * return result, na_count # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_7 = __Pyx_PyInt_From_int(__pyx_v_na_count); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1463; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1463; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(((PyObject *)__pyx_v_result)); PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_result)); __Pyx_GIVEREF(((PyObject *)__pyx_v_result)); PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_7); __Pyx_GIVEREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "pandas/parser.pyx":1409 * cdef char* cneginf = b'-inf' * * cdef _try_double(parser_t *parser, int col, int line_start, int line_end, # <<<<<<<<<<<<<< * bint na_filter, kh_str_t *na_hashset, object na_flist): * 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_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_AddTraceback("pandas.parser._try_double", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_result); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/parser.pyx":1466 * * * cdef _try_int64(parser_t *parser, int col, int line_start, int line_end, # <<<<<<<<<<<<<< * bint na_filter, kh_str_t *na_hashset): * cdef: */ static PyObject *__pyx_f_6pandas_6parser__try_int64(parser_t *__pyx_v_parser, int __pyx_v_col, int __pyx_v_line_start, int __pyx_v_line_end, int __pyx_v_na_filter, kh_str_t *__pyx_v_na_hashset) { int __pyx_v_error; int __pyx_v_na_count; size_t __pyx_v_i; size_t __pyx_v_lines; coliter_t __pyx_v_it; char *__pyx_v_word; __pyx_t_5numpy_int64_t *__pyx_v_data; PyArrayObject *__pyx_v_result = 0; __pyx_t_5numpy_int64_t __pyx_v_NA; khiter_t __pyx_v_k; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; __pyx_t_5numpy_int64_t __pyx_t_4; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; int __pyx_t_7; size_t __pyx_t_8; size_t __pyx_t_9; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_try_int64", 0); /* "pandas/parser.pyx":1469 * bint na_filter, kh_str_t *na_hashset): * cdef: * int error, na_count = 0 # <<<<<<<<<<<<<< * size_t i, lines * coliter_t it */ __pyx_v_na_count = 0; /* "pandas/parser.pyx":1476 * ndarray result * * int64_t NA = na_values[np.int64] # <<<<<<<<<<<<<< * khiter_t k * */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_na_values); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1476; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1476; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_int64); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1476; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_GetItem(__pyx_t_1, __pyx_t_3); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1476; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_4 = __Pyx_PyInt_As_npy_int64(__pyx_t_2); if (unlikely((__pyx_t_4 == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1476; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_NA = __pyx_t_4; /* "pandas/parser.pyx":1479 * khiter_t k * * lines = line_end - line_start # <<<<<<<<<<<<<< * result = np.empty(lines, dtype=np.int64) * data = result.data */ __pyx_v_lines = (__pyx_v_line_end - __pyx_v_line_start); /* "pandas/parser.pyx":1480 * * lines = line_end - line_start * result = np.empty(lines, dtype=np.int64) # <<<<<<<<<<<<<< * data = result.data * coliter_setup(&it, parser, col, line_start) */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1480; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 1480; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyInt_FromSize_t(__pyx_v_lines); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1480; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1480; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1480; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1480; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_int64); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1480; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 1480; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyObject_Call(__pyx_t_3, __pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1480; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 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_filename = __pyx_f[0]; __pyx_lineno = 1480; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_result = ((PyArrayObject *)__pyx_t_6); __pyx_t_6 = 0; /* "pandas/parser.pyx":1481 * lines = line_end - line_start * result = np.empty(lines, dtype=np.int64) * data = result.data # <<<<<<<<<<<<<< * coliter_setup(&it, parser, col, line_start) * */ __pyx_v_data = ((__pyx_t_5numpy_int64_t *)__pyx_v_result->data); /* "pandas/parser.pyx":1482 * result = np.empty(lines, dtype=np.int64) * data = result.data * coliter_setup(&it, parser, col, line_start) # <<<<<<<<<<<<<< * * if na_filter: */ coliter_setup((&__pyx_v_it), __pyx_v_parser, __pyx_v_col, __pyx_v_line_start); /* "pandas/parser.pyx":1484 * coliter_setup(&it, parser, col, line_start) * * if na_filter: # <<<<<<<<<<<<<< * for i in range(lines): * word = COLITER_NEXT(it) */ __pyx_t_7 = (__pyx_v_na_filter != 0); if (__pyx_t_7) { /* "pandas/parser.pyx":1485 * * if na_filter: * for i in range(lines): # <<<<<<<<<<<<<< * word = COLITER_NEXT(it) * k = kh_get_str(na_hashset, word) */ __pyx_t_8 = __pyx_v_lines; for (__pyx_t_9 = 0; __pyx_t_9 < __pyx_t_8; __pyx_t_9+=1) { __pyx_v_i = __pyx_t_9; /* "pandas/parser.pyx":1486 * if na_filter: * for i in range(lines): * word = COLITER_NEXT(it) # <<<<<<<<<<<<<< * k = kh_get_str(na_hashset, word) * # in the hash table */ __pyx_v_word = COLITER_NEXT(__pyx_v_it); /* "pandas/parser.pyx":1487 * for i in range(lines): * word = COLITER_NEXT(it) * k = kh_get_str(na_hashset, word) # <<<<<<<<<<<<<< * # in the hash table * if k != na_hashset.n_buckets: */ __pyx_v_k = kh_get_str(__pyx_v_na_hashset, __pyx_v_word); /* "pandas/parser.pyx":1489 * k = kh_get_str(na_hashset, word) * # in the hash table * if k != na_hashset.n_buckets: # <<<<<<<<<<<<<< * na_count += 1 * data[i] = NA */ __pyx_t_7 = ((__pyx_v_k != __pyx_v_na_hashset->n_buckets) != 0); if (__pyx_t_7) { /* "pandas/parser.pyx":1490 * # in the hash table * if k != na_hashset.n_buckets: * na_count += 1 # <<<<<<<<<<<<<< * data[i] = NA * continue */ __pyx_v_na_count = (__pyx_v_na_count + 1); /* "pandas/parser.pyx":1491 * if k != na_hashset.n_buckets: * na_count += 1 * data[i] = NA # <<<<<<<<<<<<<< * continue * */ (__pyx_v_data[__pyx_v_i]) = __pyx_v_NA; /* "pandas/parser.pyx":1492 * na_count += 1 * data[i] = NA * continue # <<<<<<<<<<<<<< * * data[i] = str_to_int64(word, INT64_MIN, INT64_MAX, */ goto __pyx_L4_continue; } /* "pandas/parser.pyx":1494 * continue * * data[i] = str_to_int64(word, INT64_MIN, INT64_MAX, # <<<<<<<<<<<<<< * &error, parser.thousands) * if error != 0: */ (__pyx_v_data[__pyx_v_i]) = str_to_int64(__pyx_v_word, INT64_MIN, INT64_MAX, (&__pyx_v_error), __pyx_v_parser->thousands); /* "pandas/parser.pyx":1496 * data[i] = str_to_int64(word, INT64_MIN, INT64_MAX, * &error, parser.thousands) * if error != 0: # <<<<<<<<<<<<<< * if error == ERROR_OVERFLOW: * raise OverflowError(word) */ __pyx_t_7 = ((__pyx_v_error != 0) != 0); if (__pyx_t_7) { /* "pandas/parser.pyx":1497 * &error, parser.thousands) * if error != 0: * if error == ERROR_OVERFLOW: # <<<<<<<<<<<<<< * raise OverflowError(word) * */ __pyx_t_7 = ((__pyx_v_error == ERROR_OVERFLOW) != 0); if (__pyx_t_7) { /* "pandas/parser.pyx":1498 * if error != 0: * if error == ERROR_OVERFLOW: * raise OverflowError(word) # <<<<<<<<<<<<<< * * return None, None */ __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_OverflowError); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1498; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_2 = __Pyx_PyBytes_FromString(__pyx_v_word); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1498; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1498; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_Call(__pyx_t_6, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1498; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1498; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } /* "pandas/parser.pyx":1500 * raise OverflowError(word) * * return None, None # <<<<<<<<<<<<<< * else: * for i in range(lines): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_tuple__29); __pyx_r = __pyx_tuple__29; goto __pyx_L0; } __pyx_L4_continue:; } goto __pyx_L3; } /*else*/ { /* "pandas/parser.pyx":1502 * return None, None * else: * for i in range(lines): # <<<<<<<<<<<<<< * word = COLITER_NEXT(it) * data[i] = str_to_int64(word, INT64_MIN, INT64_MAX, */ __pyx_t_8 = __pyx_v_lines; for (__pyx_t_9 = 0; __pyx_t_9 < __pyx_t_8; __pyx_t_9+=1) { __pyx_v_i = __pyx_t_9; /* "pandas/parser.pyx":1503 * else: * for i in range(lines): * word = COLITER_NEXT(it) # <<<<<<<<<<<<<< * data[i] = str_to_int64(word, INT64_MIN, INT64_MAX, * &error, parser.thousands) */ __pyx_v_word = COLITER_NEXT(__pyx_v_it); /* "pandas/parser.pyx":1504 * for i in range(lines): * word = COLITER_NEXT(it) * data[i] = str_to_int64(word, INT64_MIN, INT64_MAX, # <<<<<<<<<<<<<< * &error, parser.thousands) * if error != 0: */ (__pyx_v_data[__pyx_v_i]) = str_to_int64(__pyx_v_word, INT64_MIN, INT64_MAX, (&__pyx_v_error), __pyx_v_parser->thousands); /* "pandas/parser.pyx":1506 * data[i] = str_to_int64(word, INT64_MIN, INT64_MAX, * &error, parser.thousands) * if error != 0: # <<<<<<<<<<<<<< * if error == ERROR_OVERFLOW: * raise OverflowError(word) */ __pyx_t_7 = ((__pyx_v_error != 0) != 0); if (__pyx_t_7) { /* "pandas/parser.pyx":1507 * &error, parser.thousands) * if error != 0: * if error == ERROR_OVERFLOW: # <<<<<<<<<<<<<< * raise OverflowError(word) * return None, None */ __pyx_t_7 = ((__pyx_v_error == ERROR_OVERFLOW) != 0); if (__pyx_t_7) { /* "pandas/parser.pyx":1508 * if error != 0: * if error == ERROR_OVERFLOW: * raise OverflowError(word) # <<<<<<<<<<<<<< * return None, None * */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_OverflowError); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1508; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __Pyx_PyBytes_FromString(__pyx_v_word); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1508; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1508; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyObject_Call(__pyx_t_2, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1508; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1508; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } /* "pandas/parser.pyx":1509 * if error == ERROR_OVERFLOW: * raise OverflowError(word) * return None, None # <<<<<<<<<<<<<< * * return result, na_count */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_tuple__30); __pyx_r = __pyx_tuple__30; goto __pyx_L0; } } } __pyx_L3:; /* "pandas/parser.pyx":1511 * return None, None * * return result, na_count # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_na_count); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1511; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1511; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(((PyObject *)__pyx_v_result)); PyTuple_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_v_result)); __Pyx_GIVEREF(((PyObject *)__pyx_v_result)); PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_6; __pyx_t_6 = 0; goto __pyx_L0; /* "pandas/parser.pyx":1466 * * * cdef _try_int64(parser_t *parser, int col, int line_start, int line_end, # <<<<<<<<<<<<<< * bint na_filter, kh_str_t *na_hashset): * 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_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("pandas.parser._try_int64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_result); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/parser.pyx":1514 * * * cdef _try_bool(parser_t *parser, int col, int line_start, int line_end, # <<<<<<<<<<<<<< * bint na_filter, kh_str_t *na_hashset): * cdef: */ static PyObject *__pyx_f_6pandas_6parser__try_bool(parser_t *__pyx_v_parser, int __pyx_v_col, int __pyx_v_line_start, int __pyx_v_line_end, int __pyx_v_na_filter, kh_str_t *__pyx_v_na_hashset) { int __pyx_v_error; int __pyx_v_na_count; CYTHON_UNUSED size_t __pyx_v_i; size_t __pyx_v_lines; coliter_t __pyx_v_it; char *__pyx_v_word; __pyx_t_5numpy_uint8_t *__pyx_v_data; PyArrayObject *__pyx_v_result = 0; __pyx_t_5numpy_uint8_t __pyx_v_NA; khiter_t __pyx_v_k; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; __pyx_t_5numpy_uint8_t __pyx_t_4; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; int __pyx_t_7; size_t __pyx_t_8; size_t __pyx_t_9; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_try_bool", 0); /* "pandas/parser.pyx":1517 * bint na_filter, kh_str_t *na_hashset): * cdef: * int error, na_count = 0 # <<<<<<<<<<<<<< * size_t i, lines * coliter_t it */ __pyx_v_na_count = 0; /* "pandas/parser.pyx":1524 * ndarray result * * uint8_t NA = na_values[np.bool_] # <<<<<<<<<<<<<< * khiter_t k * */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_na_values); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1524; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1524; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_bool); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1524; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_GetItem(__pyx_t_1, __pyx_t_3); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1524; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_4 = __Pyx_PyInt_As_npy_uint8(__pyx_t_2); if (unlikely((__pyx_t_4 == (npy_uint8)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1524; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_NA = __pyx_t_4; /* "pandas/parser.pyx":1527 * khiter_t k * * lines = line_end - line_start # <<<<<<<<<<<<<< * result = np.empty(lines, dtype=np.uint8) * data = result.data */ __pyx_v_lines = (__pyx_v_line_end - __pyx_v_line_start); /* "pandas/parser.pyx":1528 * * lines = line_end - line_start * result = np.empty(lines, dtype=np.uint8) # <<<<<<<<<<<<<< * data = result.data * coliter_setup(&it, parser, col, line_start) */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1528; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 1528; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyInt_FromSize_t(__pyx_v_lines); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1528; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1528; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1528; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1528; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_uint8); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1528; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 1528; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyObject_Call(__pyx_t_3, __pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1528; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 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_filename = __pyx_f[0]; __pyx_lineno = 1528; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_result = ((PyArrayObject *)__pyx_t_6); __pyx_t_6 = 0; /* "pandas/parser.pyx":1529 * lines = line_end - line_start * result = np.empty(lines, dtype=np.uint8) * data = result.data # <<<<<<<<<<<<<< * coliter_setup(&it, parser, col, line_start) * */ __pyx_v_data = ((__pyx_t_5numpy_uint8_t *)__pyx_v_result->data); /* "pandas/parser.pyx":1530 * result = np.empty(lines, dtype=np.uint8) * data = result.data * coliter_setup(&it, parser, col, line_start) # <<<<<<<<<<<<<< * * if na_filter: */ coliter_setup((&__pyx_v_it), __pyx_v_parser, __pyx_v_col, __pyx_v_line_start); /* "pandas/parser.pyx":1532 * coliter_setup(&it, parser, col, line_start) * * if na_filter: # <<<<<<<<<<<<<< * for i in range(lines): * word = COLITER_NEXT(it) */ __pyx_t_7 = (__pyx_v_na_filter != 0); if (__pyx_t_7) { /* "pandas/parser.pyx":1533 * * if na_filter: * for i in range(lines): # <<<<<<<<<<<<<< * word = COLITER_NEXT(it) * */ __pyx_t_8 = __pyx_v_lines; for (__pyx_t_9 = 0; __pyx_t_9 < __pyx_t_8; __pyx_t_9+=1) { __pyx_v_i = __pyx_t_9; /* "pandas/parser.pyx":1534 * if na_filter: * for i in range(lines): * word = COLITER_NEXT(it) # <<<<<<<<<<<<<< * * k = kh_get_str(na_hashset, word) */ __pyx_v_word = COLITER_NEXT(__pyx_v_it); /* "pandas/parser.pyx":1536 * word = COLITER_NEXT(it) * * k = kh_get_str(na_hashset, word) # <<<<<<<<<<<<<< * # in the hash table * if k != na_hashset.n_buckets: */ __pyx_v_k = kh_get_str(__pyx_v_na_hashset, __pyx_v_word); /* "pandas/parser.pyx":1538 * k = kh_get_str(na_hashset, word) * # in the hash table * if k != na_hashset.n_buckets: # <<<<<<<<<<<<<< * na_count += 1 * data[0] = NA */ __pyx_t_7 = ((__pyx_v_k != __pyx_v_na_hashset->n_buckets) != 0); if (__pyx_t_7) { /* "pandas/parser.pyx":1539 * # in the hash table * if k != na_hashset.n_buckets: * na_count += 1 # <<<<<<<<<<<<<< * data[0] = NA * data += 1 */ __pyx_v_na_count = (__pyx_v_na_count + 1); /* "pandas/parser.pyx":1540 * if k != na_hashset.n_buckets: * na_count += 1 * data[0] = NA # <<<<<<<<<<<<<< * data += 1 * continue */ (__pyx_v_data[0]) = __pyx_v_NA; /* "pandas/parser.pyx":1541 * na_count += 1 * data[0] = NA * data += 1 # <<<<<<<<<<<<<< * continue * */ __pyx_v_data = (__pyx_v_data + 1); /* "pandas/parser.pyx":1542 * data[0] = NA * data += 1 * continue # <<<<<<<<<<<<<< * * error = to_boolean(word, data) */ goto __pyx_L4_continue; } /* "pandas/parser.pyx":1544 * continue * * error = to_boolean(word, data) # <<<<<<<<<<<<<< * if error != 0: * return None, None */ __pyx_v_error = to_boolean(__pyx_v_word, __pyx_v_data); /* "pandas/parser.pyx":1545 * * error = to_boolean(word, data) * if error != 0: # <<<<<<<<<<<<<< * return None, None * data += 1 */ __pyx_t_7 = ((__pyx_v_error != 0) != 0); if (__pyx_t_7) { /* "pandas/parser.pyx":1546 * error = to_boolean(word, data) * if error != 0: * return None, None # <<<<<<<<<<<<<< * data += 1 * else: */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_tuple__31); __pyx_r = __pyx_tuple__31; goto __pyx_L0; } /* "pandas/parser.pyx":1547 * if error != 0: * return None, None * data += 1 # <<<<<<<<<<<<<< * else: * for i in range(lines): */ __pyx_v_data = (__pyx_v_data + 1); __pyx_L4_continue:; } goto __pyx_L3; } /*else*/ { /* "pandas/parser.pyx":1549 * data += 1 * else: * for i in range(lines): # <<<<<<<<<<<<<< * word = COLITER_NEXT(it) * */ __pyx_t_8 = __pyx_v_lines; for (__pyx_t_9 = 0; __pyx_t_9 < __pyx_t_8; __pyx_t_9+=1) { __pyx_v_i = __pyx_t_9; /* "pandas/parser.pyx":1550 * else: * for i in range(lines): * word = COLITER_NEXT(it) # <<<<<<<<<<<<<< * * error = to_boolean(word, data) */ __pyx_v_word = COLITER_NEXT(__pyx_v_it); /* "pandas/parser.pyx":1552 * word = COLITER_NEXT(it) * * error = to_boolean(word, data) # <<<<<<<<<<<<<< * if error != 0: * return None, None */ __pyx_v_error = to_boolean(__pyx_v_word, __pyx_v_data); /* "pandas/parser.pyx":1553 * * error = to_boolean(word, data) * if error != 0: # <<<<<<<<<<<<<< * return None, None * data += 1 */ __pyx_t_7 = ((__pyx_v_error != 0) != 0); if (__pyx_t_7) { /* "pandas/parser.pyx":1554 * error = to_boolean(word, data) * if error != 0: * return None, None # <<<<<<<<<<<<<< * data += 1 * */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_tuple__32); __pyx_r = __pyx_tuple__32; goto __pyx_L0; } /* "pandas/parser.pyx":1555 * if error != 0: * return None, None * data += 1 # <<<<<<<<<<<<<< * * return result.view(np.bool_), na_count */ __pyx_v_data = (__pyx_v_data + 1); } } __pyx_L3:; /* "pandas/parser.pyx":1557 * data += 1 * * return result.view(np.bool_), na_count # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_result), __pyx_n_s_view); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1557; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1557; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_bool); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1557; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1557; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyObject_Call(__pyx_t_6, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1557; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_na_count); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1557; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1557; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_1 = 0; __pyx_t_2 = 0; __pyx_r = __pyx_t_6; __pyx_t_6 = 0; goto __pyx_L0; /* "pandas/parser.pyx":1514 * * * cdef _try_bool(parser_t *parser, int col, int line_start, int line_end, # <<<<<<<<<<<<<< * bint na_filter, kh_str_t *na_hashset): * 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_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("pandas.parser._try_bool", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_result); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/parser.pyx":1560 * * * cdef _try_bool_flex(parser_t *parser, int col, int line_start, int line_end, # <<<<<<<<<<<<<< * bint na_filter, kh_str_t *na_hashset, * kh_str_t *true_hashset, kh_str_t *false_hashset): */ static PyObject *__pyx_f_6pandas_6parser__try_bool_flex(parser_t *__pyx_v_parser, int __pyx_v_col, int __pyx_v_line_start, int __pyx_v_line_end, int __pyx_v_na_filter, kh_str_t *__pyx_v_na_hashset, kh_str_t *__pyx_v_true_hashset, kh_str_t *__pyx_v_false_hashset) { int __pyx_v_error; int __pyx_v_na_count; CYTHON_UNUSED size_t __pyx_v_i; size_t __pyx_v_lines; coliter_t __pyx_v_it; char *__pyx_v_word; __pyx_t_5numpy_uint8_t *__pyx_v_data; PyArrayObject *__pyx_v_result = 0; __pyx_t_5numpy_uint8_t __pyx_v_NA; khiter_t __pyx_v_k; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; __pyx_t_5numpy_uint8_t __pyx_t_4; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; int __pyx_t_7; size_t __pyx_t_8; size_t __pyx_t_9; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_try_bool_flex", 0); /* "pandas/parser.pyx":1564 * kh_str_t *true_hashset, kh_str_t *false_hashset): * cdef: * int error, na_count = 0 # <<<<<<<<<<<<<< * size_t i, lines * coliter_t it */ __pyx_v_na_count = 0; /* "pandas/parser.pyx":1571 * ndarray result * * uint8_t NA = na_values[np.bool_] # <<<<<<<<<<<<<< * khiter_t k * */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_na_values); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1571; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1571; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_bool); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1571; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_GetItem(__pyx_t_1, __pyx_t_3); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1571; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_4 = __Pyx_PyInt_As_npy_uint8(__pyx_t_2); if (unlikely((__pyx_t_4 == (npy_uint8)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1571; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_NA = __pyx_t_4; /* "pandas/parser.pyx":1574 * khiter_t k * * lines = line_end - line_start # <<<<<<<<<<<<<< * result = np.empty(lines, dtype=np.uint8) * data = result.data */ __pyx_v_lines = (__pyx_v_line_end - __pyx_v_line_start); /* "pandas/parser.pyx":1575 * * lines = line_end - line_start * result = np.empty(lines, dtype=np.uint8) # <<<<<<<<<<<<<< * data = result.data * coliter_setup(&it, parser, col, line_start) */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1575; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 1575; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyInt_FromSize_t(__pyx_v_lines); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1575; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1575; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1575; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1575; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_uint8); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1575; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 1575; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyObject_Call(__pyx_t_3, __pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1575; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 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_filename = __pyx_f[0]; __pyx_lineno = 1575; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_result = ((PyArrayObject *)__pyx_t_6); __pyx_t_6 = 0; /* "pandas/parser.pyx":1576 * lines = line_end - line_start * result = np.empty(lines, dtype=np.uint8) * data = result.data # <<<<<<<<<<<<<< * coliter_setup(&it, parser, col, line_start) * */ __pyx_v_data = ((__pyx_t_5numpy_uint8_t *)__pyx_v_result->data); /* "pandas/parser.pyx":1577 * result = np.empty(lines, dtype=np.uint8) * data = result.data * coliter_setup(&it, parser, col, line_start) # <<<<<<<<<<<<<< * * if na_filter: */ coliter_setup((&__pyx_v_it), __pyx_v_parser, __pyx_v_col, __pyx_v_line_start); /* "pandas/parser.pyx":1579 * coliter_setup(&it, parser, col, line_start) * * if na_filter: # <<<<<<<<<<<<<< * for i in range(lines): * word = COLITER_NEXT(it) */ __pyx_t_7 = (__pyx_v_na_filter != 0); if (__pyx_t_7) { /* "pandas/parser.pyx":1580 * * if na_filter: * for i in range(lines): # <<<<<<<<<<<<<< * word = COLITER_NEXT(it) * */ __pyx_t_8 = __pyx_v_lines; for (__pyx_t_9 = 0; __pyx_t_9 < __pyx_t_8; __pyx_t_9+=1) { __pyx_v_i = __pyx_t_9; /* "pandas/parser.pyx":1581 * if na_filter: * for i in range(lines): * word = COLITER_NEXT(it) # <<<<<<<<<<<<<< * * k = kh_get_str(na_hashset, word) */ __pyx_v_word = COLITER_NEXT(__pyx_v_it); /* "pandas/parser.pyx":1583 * word = COLITER_NEXT(it) * * k = kh_get_str(na_hashset, word) # <<<<<<<<<<<<<< * # in the hash table * if k != na_hashset.n_buckets: */ __pyx_v_k = kh_get_str(__pyx_v_na_hashset, __pyx_v_word); /* "pandas/parser.pyx":1585 * k = kh_get_str(na_hashset, word) * # in the hash table * if k != na_hashset.n_buckets: # <<<<<<<<<<<<<< * na_count += 1 * data[0] = NA */ __pyx_t_7 = ((__pyx_v_k != __pyx_v_na_hashset->n_buckets) != 0); if (__pyx_t_7) { /* "pandas/parser.pyx":1586 * # in the hash table * if k != na_hashset.n_buckets: * na_count += 1 # <<<<<<<<<<<<<< * data[0] = NA * data += 1 */ __pyx_v_na_count = (__pyx_v_na_count + 1); /* "pandas/parser.pyx":1587 * if k != na_hashset.n_buckets: * na_count += 1 * data[0] = NA # <<<<<<<<<<<<<< * data += 1 * continue */ (__pyx_v_data[0]) = __pyx_v_NA; /* "pandas/parser.pyx":1588 * na_count += 1 * data[0] = NA * data += 1 # <<<<<<<<<<<<<< * continue * */ __pyx_v_data = (__pyx_v_data + 1); /* "pandas/parser.pyx":1589 * data[0] = NA * data += 1 * continue # <<<<<<<<<<<<<< * * k = kh_get_str(true_hashset, word) */ goto __pyx_L4_continue; } /* "pandas/parser.pyx":1591 * continue * * k = kh_get_str(true_hashset, word) # <<<<<<<<<<<<<< * if k != true_hashset.n_buckets: * data[0] = 1 */ __pyx_v_k = kh_get_str(__pyx_v_true_hashset, __pyx_v_word); /* "pandas/parser.pyx":1592 * * k = kh_get_str(true_hashset, word) * if k != true_hashset.n_buckets: # <<<<<<<<<<<<<< * data[0] = 1 * data += 1 */ __pyx_t_7 = ((__pyx_v_k != __pyx_v_true_hashset->n_buckets) != 0); if (__pyx_t_7) { /* "pandas/parser.pyx":1593 * k = kh_get_str(true_hashset, word) * if k != true_hashset.n_buckets: * data[0] = 1 # <<<<<<<<<<<<<< * data += 1 * continue */ (__pyx_v_data[0]) = 1; /* "pandas/parser.pyx":1594 * if k != true_hashset.n_buckets: * data[0] = 1 * data += 1 # <<<<<<<<<<<<<< * continue * */ __pyx_v_data = (__pyx_v_data + 1); /* "pandas/parser.pyx":1595 * data[0] = 1 * data += 1 * continue # <<<<<<<<<<<<<< * * k = kh_get_str(false_hashset, word) */ goto __pyx_L4_continue; } /* "pandas/parser.pyx":1597 * continue * * k = kh_get_str(false_hashset, word) # <<<<<<<<<<<<<< * if k != false_hashset.n_buckets: * data[0] = 0 */ __pyx_v_k = kh_get_str(__pyx_v_false_hashset, __pyx_v_word); /* "pandas/parser.pyx":1598 * * k = kh_get_str(false_hashset, word) * if k != false_hashset.n_buckets: # <<<<<<<<<<<<<< * data[0] = 0 * data += 1 */ __pyx_t_7 = ((__pyx_v_k != __pyx_v_false_hashset->n_buckets) != 0); if (__pyx_t_7) { /* "pandas/parser.pyx":1599 * k = kh_get_str(false_hashset, word) * if k != false_hashset.n_buckets: * data[0] = 0 # <<<<<<<<<<<<<< * data += 1 * continue */ (__pyx_v_data[0]) = 0; /* "pandas/parser.pyx":1600 * if k != false_hashset.n_buckets: * data[0] = 0 * data += 1 # <<<<<<<<<<<<<< * continue * */ __pyx_v_data = (__pyx_v_data + 1); /* "pandas/parser.pyx":1601 * data[0] = 0 * data += 1 * continue # <<<<<<<<<<<<<< * * error = to_boolean(word, data) */ goto __pyx_L4_continue; } /* "pandas/parser.pyx":1603 * continue * * error = to_boolean(word, data) # <<<<<<<<<<<<<< * if error != 0: * return None, None */ __pyx_v_error = to_boolean(__pyx_v_word, __pyx_v_data); /* "pandas/parser.pyx":1604 * * error = to_boolean(word, data) * if error != 0: # <<<<<<<<<<<<<< * return None, None * data += 1 */ __pyx_t_7 = ((__pyx_v_error != 0) != 0); if (__pyx_t_7) { /* "pandas/parser.pyx":1605 * error = to_boolean(word, data) * if error != 0: * return None, None # <<<<<<<<<<<<<< * data += 1 * else: */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_tuple__33); __pyx_r = __pyx_tuple__33; goto __pyx_L0; } /* "pandas/parser.pyx":1606 * if error != 0: * return None, None * data += 1 # <<<<<<<<<<<<<< * else: * for i in range(lines): */ __pyx_v_data = (__pyx_v_data + 1); __pyx_L4_continue:; } goto __pyx_L3; } /*else*/ { /* "pandas/parser.pyx":1608 * data += 1 * else: * for i in range(lines): # <<<<<<<<<<<<<< * word = COLITER_NEXT(it) * */ __pyx_t_8 = __pyx_v_lines; for (__pyx_t_9 = 0; __pyx_t_9 < __pyx_t_8; __pyx_t_9+=1) { __pyx_v_i = __pyx_t_9; /* "pandas/parser.pyx":1609 * else: * for i in range(lines): * word = COLITER_NEXT(it) # <<<<<<<<<<<<<< * * k = kh_get_str(true_hashset, word) */ __pyx_v_word = COLITER_NEXT(__pyx_v_it); /* "pandas/parser.pyx":1611 * word = COLITER_NEXT(it) * * k = kh_get_str(true_hashset, word) # <<<<<<<<<<<<<< * if k != true_hashset.n_buckets: * data[0] = 1 */ __pyx_v_k = kh_get_str(__pyx_v_true_hashset, __pyx_v_word); /* "pandas/parser.pyx":1612 * * k = kh_get_str(true_hashset, word) * if k != true_hashset.n_buckets: # <<<<<<<<<<<<<< * data[0] = 1 * data += 1 */ __pyx_t_7 = ((__pyx_v_k != __pyx_v_true_hashset->n_buckets) != 0); if (__pyx_t_7) { /* "pandas/parser.pyx":1613 * k = kh_get_str(true_hashset, word) * if k != true_hashset.n_buckets: * data[0] = 1 # <<<<<<<<<<<<<< * data += 1 * continue */ (__pyx_v_data[0]) = 1; /* "pandas/parser.pyx":1614 * if k != true_hashset.n_buckets: * data[0] = 1 * data += 1 # <<<<<<<<<<<<<< * continue * */ __pyx_v_data = (__pyx_v_data + 1); /* "pandas/parser.pyx":1615 * data[0] = 1 * data += 1 * continue # <<<<<<<<<<<<<< * * k = kh_get_str(false_hashset, word) */ goto __pyx_L10_continue; } /* "pandas/parser.pyx":1617 * continue * * k = kh_get_str(false_hashset, word) # <<<<<<<<<<<<<< * if k != false_hashset.n_buckets: * data[0] = 0 */ __pyx_v_k = kh_get_str(__pyx_v_false_hashset, __pyx_v_word); /* "pandas/parser.pyx":1618 * * k = kh_get_str(false_hashset, word) * if k != false_hashset.n_buckets: # <<<<<<<<<<<<<< * data[0] = 0 * data += 1 */ __pyx_t_7 = ((__pyx_v_k != __pyx_v_false_hashset->n_buckets) != 0); if (__pyx_t_7) { /* "pandas/parser.pyx":1619 * k = kh_get_str(false_hashset, word) * if k != false_hashset.n_buckets: * data[0] = 0 # <<<<<<<<<<<<<< * data += 1 * continue */ (__pyx_v_data[0]) = 0; /* "pandas/parser.pyx":1620 * if k != false_hashset.n_buckets: * data[0] = 0 * data += 1 # <<<<<<<<<<<<<< * continue * */ __pyx_v_data = (__pyx_v_data + 1); /* "pandas/parser.pyx":1621 * data[0] = 0 * data += 1 * continue # <<<<<<<<<<<<<< * * error = to_boolean(word, data) */ goto __pyx_L10_continue; } /* "pandas/parser.pyx":1623 * continue * * error = to_boolean(word, data) # <<<<<<<<<<<<<< * if error != 0: * return None, None */ __pyx_v_error = to_boolean(__pyx_v_word, __pyx_v_data); /* "pandas/parser.pyx":1624 * * error = to_boolean(word, data) * if error != 0: # <<<<<<<<<<<<<< * return None, None * data += 1 */ __pyx_t_7 = ((__pyx_v_error != 0) != 0); if (__pyx_t_7) { /* "pandas/parser.pyx":1625 * error = to_boolean(word, data) * if error != 0: * return None, None # <<<<<<<<<<<<<< * data += 1 * */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_tuple__34); __pyx_r = __pyx_tuple__34; goto __pyx_L0; } /* "pandas/parser.pyx":1626 * if error != 0: * return None, None * data += 1 # <<<<<<<<<<<<<< * * return result.view(np.bool_), na_count */ __pyx_v_data = (__pyx_v_data + 1); __pyx_L10_continue:; } } __pyx_L3:; /* "pandas/parser.pyx":1628 * data += 1 * * return result.view(np.bool_), na_count # <<<<<<<<<<<<<< * * cdef _get_na_mask(parser_t *parser, int col, int line_start, int line_end, */ __Pyx_XDECREF(__pyx_r); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_result), __pyx_n_s_view); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1628; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1628; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_bool); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1628; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1628; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyObject_Call(__pyx_t_6, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1628; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_na_count); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1628; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1628; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_1 = 0; __pyx_t_2 = 0; __pyx_r = __pyx_t_6; __pyx_t_6 = 0; goto __pyx_L0; /* "pandas/parser.pyx":1560 * * * cdef _try_bool_flex(parser_t *parser, int col, int line_start, int line_end, # <<<<<<<<<<<<<< * bint na_filter, kh_str_t *na_hashset, * kh_str_t *true_hashset, kh_str_t *false_hashset): */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("pandas.parser._try_bool_flex", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_result); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/parser.pyx":1630 * return result.view(np.bool_), na_count * * cdef _get_na_mask(parser_t *parser, int col, int line_start, int line_end, # <<<<<<<<<<<<<< * kh_str_t *na_hashset): * cdef: */ static PyObject *__pyx_f_6pandas_6parser__get_na_mask(parser_t *__pyx_v_parser, int __pyx_v_col, int __pyx_v_line_start, int __pyx_v_line_end, kh_str_t *__pyx_v_na_hashset) { Py_ssize_t __pyx_v_i; size_t __pyx_v_lines; coliter_t __pyx_v_it; char *__pyx_v_word; PyArrayObject *__pyx_v_result = 0; khiter_t __pyx_v_k; __Pyx_LocalBuf_ND __pyx_pybuffernd_result; __Pyx_Buffer __pyx_pybuffer_result; 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; size_t __pyx_t_11; Py_ssize_t __pyx_t_12; int __pyx_t_13; Py_ssize_t __pyx_t_14; Py_ssize_t __pyx_t_15; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_get_na_mask", 0); __pyx_pybuffer_result.pybuffer.buf = NULL; __pyx_pybuffer_result.refcount = 0; __pyx_pybuffernd_result.data = NULL; __pyx_pybuffernd_result.rcbuffer = &__pyx_pybuffer_result; /* "pandas/parser.pyx":1641 * khiter_t k * * lines = line_end - line_start # <<<<<<<<<<<<<< * result = np.empty(lines, dtype=np.bool_) * */ __pyx_v_lines = (__pyx_v_line_end - __pyx_v_line_start); /* "pandas/parser.pyx":1642 * * lines = line_end - line_start * result = np.empty(lines, dtype=np.bool_) # <<<<<<<<<<<<<< * * coliter_setup(&it, parser, col, line_start) */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1642; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 1642; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_PyInt_FromSize_t(__pyx_v_lines); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1642; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1642; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1642; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1642; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_bool); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1642; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 1642; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyObject_Call(__pyx_t_2, __pyx_t_3, __pyx_t_1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1642; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 1642; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_6 = ((PyArrayObject *)__pyx_t_5); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 1, __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_result.rcbuffer->pybuffer, (PyObject*)__pyx_v_result, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 1, __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_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_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1642; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_6 = 0; __pyx_v_result = ((PyArrayObject *)__pyx_t_5); __pyx_t_5 = 0; /* "pandas/parser.pyx":1644 * result = np.empty(lines, dtype=np.bool_) * * coliter_setup(&it, parser, col, line_start) # <<<<<<<<<<<<<< * for i in range(lines): * word = COLITER_NEXT(it) */ coliter_setup((&__pyx_v_it), __pyx_v_parser, __pyx_v_col, __pyx_v_line_start); /* "pandas/parser.pyx":1645 * * coliter_setup(&it, parser, col, line_start) * for i in range(lines): # <<<<<<<<<<<<<< * word = COLITER_NEXT(it) * */ __pyx_t_11 = __pyx_v_lines; for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_11; __pyx_t_12+=1) { __pyx_v_i = __pyx_t_12; /* "pandas/parser.pyx":1646 * coliter_setup(&it, parser, col, line_start) * for i in range(lines): * word = COLITER_NEXT(it) # <<<<<<<<<<<<<< * * k = kh_get_str(na_hashset, word) */ __pyx_v_word = COLITER_NEXT(__pyx_v_it); /* "pandas/parser.pyx":1648 * word = COLITER_NEXT(it) * * k = kh_get_str(na_hashset, word) # <<<<<<<<<<<<<< * # in the hash table * if k != na_hashset.n_buckets: */ __pyx_v_k = kh_get_str(__pyx_v_na_hashset, __pyx_v_word); /* "pandas/parser.pyx":1650 * k = kh_get_str(na_hashset, word) * # in the hash table * if k != na_hashset.n_buckets: # <<<<<<<<<<<<<< * result[i] = 1 * else: */ __pyx_t_13 = ((__pyx_v_k != __pyx_v_na_hashset->n_buckets) != 0); if (__pyx_t_13) { /* "pandas/parser.pyx":1651 * # in the hash table * if k != na_hashset.n_buckets: * result[i] = 1 # <<<<<<<<<<<<<< * else: * result[i] = 0 */ __pyx_t_14 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_14 < 0) { __pyx_t_14 += __pyx_pybuffernd_result.diminfo[0].shape; if (unlikely(__pyx_t_14 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_14 >= __pyx_pybuffernd_result.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1651; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_result.diminfo[0].strides) = 1; goto __pyx_L5; } /*else*/ { /* "pandas/parser.pyx":1653 * result[i] = 1 * else: * result[i] = 0 # <<<<<<<<<<<<<< * * return result */ __pyx_t_15 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_15 < 0) { __pyx_t_15 += __pyx_pybuffernd_result.diminfo[0].shape; if (unlikely(__pyx_t_15 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_15 >= __pyx_pybuffernd_result.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1653; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_result.diminfo[0].strides) = 0; } __pyx_L5:; } /* "pandas/parser.pyx":1655 * result[i] = 0 * * return result # <<<<<<<<<<<<<< * * cdef kh_str_t* kset_from_list(list values) except NULL: */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_result)); __pyx_r = ((PyObject *)__pyx_v_result); goto __pyx_L0; /* "pandas/parser.pyx":1630 * return result.view(np.bool_), na_count * * cdef _get_na_mask(parser_t *parser, int col, int line_start, int line_end, # <<<<<<<<<<<<<< * kh_str_t *na_hashset): * 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_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.parser._get_na_mask", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_result); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/parser.pyx":1657 * return result * * cdef kh_str_t* kset_from_list(list values) except NULL: # <<<<<<<<<<<<<< * # caller takes responsibility for freeing the hash table * cdef: */ static kh_str_t *__pyx_f_6pandas_6parser_kset_from_list(PyObject *__pyx_v_values) { Py_ssize_t __pyx_v_i; CYTHON_UNUSED khiter_t __pyx_v_k; kh_str_t *__pyx_v_table; int __pyx_v_ret; PyObject *__pyx_v_val = 0; kh_str_t *__pyx_r; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; Py_ssize_t __pyx_t_2; PyObject *__pyx_t_3 = NULL; int __pyx_t_4; char *__pyx_t_5; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("kset_from_list", 0); /* "pandas/parser.pyx":1663 * khiter_t k * kh_str_t *table * int ret = 0 # <<<<<<<<<<<<<< * * object val */ __pyx_v_ret = 0; /* "pandas/parser.pyx":1667 * object val * * table = kh_init_str() # <<<<<<<<<<<<<< * * for i in range(len(values)): */ __pyx_v_table = kh_init_str(); /* "pandas/parser.pyx":1669 * table = kh_init_str() * * for i in range(len(values)): # <<<<<<<<<<<<<< * val = values[i] * */ if (unlikely(__pyx_v_values == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1669; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_1 = PyList_GET_SIZE(__pyx_v_values); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1669; __pyx_clineno = __LINE__; goto __pyx_L1_error;} for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) { __pyx_v_i = __pyx_t_2; /* "pandas/parser.pyx":1670 * * for i in range(len(values)): * val = values[i] # <<<<<<<<<<<<<< * * # None creeps in sometimes, which isn't possible here */ if (unlikely(__pyx_v_values == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1670; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_3 = __Pyx_GetItemInt_List(__pyx_v_values, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1); if (unlikely(__pyx_t_3 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1670; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_3); __Pyx_XDECREF_SET(__pyx_v_val, __pyx_t_3); __pyx_t_3 = 0; /* "pandas/parser.pyx":1673 * * # None creeps in sometimes, which isn't possible here * if not PyBytes_Check(val): # <<<<<<<<<<<<<< * raise Exception('Must be all encoded bytes') * */ __pyx_t_4 = ((!(PyBytes_Check(__pyx_v_val) != 0)) != 0); if (__pyx_t_4) { /* "pandas/parser.pyx":1674 * # None creeps in sometimes, which isn't possible here * if not PyBytes_Check(val): * raise Exception('Must be all encoded bytes') # <<<<<<<<<<<<<< * * k = kh_put_str(table, PyBytes_AsString(val), &ret) */ __pyx_t_3 = PyObject_Call(__pyx_builtin_Exception, __pyx_tuple__35, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1674; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 1674; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } /* "pandas/parser.pyx":1676 * raise Exception('Must be all encoded bytes') * * k = kh_put_str(table, PyBytes_AsString(val), &ret) # <<<<<<<<<<<<<< * * return table */ __pyx_t_5 = PyBytes_AsString(__pyx_v_val); if (unlikely(__pyx_t_5 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1676; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_k = kh_put_str(__pyx_v_table, __pyx_t_5, (&__pyx_v_ret)); } /* "pandas/parser.pyx":1678 * k = kh_put_str(table, PyBytes_AsString(val), &ret) * * return table # <<<<<<<<<<<<<< * * */ __pyx_r = __pyx_v_table; goto __pyx_L0; /* "pandas/parser.pyx":1657 * return result * * cdef kh_str_t* kset_from_list(list values) except NULL: # <<<<<<<<<<<<<< * # caller takes responsibility for freeing the hash table * cdef: */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("pandas.parser.kset_from_list", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_val); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/parser.pyx":1687 * * * cdef raise_parser_error(object base, parser_t *parser): # <<<<<<<<<<<<<< * message = '%s. C error: ' % base * if parser.error_msg != NULL: */ static PyObject *__pyx_f_6pandas_6parser_raise_parser_error(PyObject *__pyx_v_base, parser_t *__pyx_v_parser) { PyObject *__pyx_v_message = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; char *__pyx_t_3; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("raise_parser_error", 0); /* "pandas/parser.pyx":1688 * * cdef raise_parser_error(object base, parser_t *parser): * message = '%s. C error: ' % base # <<<<<<<<<<<<<< * if parser.error_msg != NULL: * if PY3: */ __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_s_C_error, __pyx_v_base); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1688; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_v_message = __pyx_t_1; __pyx_t_1 = 0; /* "pandas/parser.pyx":1689 * cdef raise_parser_error(object base, parser_t *parser): * message = '%s. C error: ' % base * if parser.error_msg != NULL: # <<<<<<<<<<<<<< * if PY3: * message += parser.error_msg.decode('utf-8') */ __pyx_t_2 = ((__pyx_v_parser->error_msg != NULL) != 0); if (__pyx_t_2) { /* "pandas/parser.pyx":1690 * message = '%s. C error: ' % base * if parser.error_msg != NULL: * if PY3: # <<<<<<<<<<<<<< * message += parser.error_msg.decode('utf-8') * else: */ __pyx_t_2 = (__pyx_v_6pandas_6parser_PY3 != 0); if (__pyx_t_2) { /* "pandas/parser.pyx":1691 * if parser.error_msg != NULL: * if PY3: * message += parser.error_msg.decode('utf-8') # <<<<<<<<<<<<<< * else: * message += parser.error_msg */ __pyx_t_3 = __pyx_v_parser->error_msg; __pyx_t_1 = __Pyx_decode_c_string(__pyx_t_3, 0, strlen(__pyx_t_3), NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1691; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = __Pyx_PyUnicode_Concat(__pyx_v_message, __pyx_t_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1691; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (!(likely(__Pyx_PyBaseString_CheckExact(__pyx_t_4))||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", (PY_MAJOR_VERSION < 3 ? "basestring" : "str"), Py_TYPE(__pyx_t_4)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1691; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF_SET(__pyx_v_message, ((PyObject*)__pyx_t_4)); __pyx_t_4 = 0; goto __pyx_L4; } /*else*/ { /* "pandas/parser.pyx":1693 * message += parser.error_msg.decode('utf-8') * else: * message += parser.error_msg # <<<<<<<<<<<<<< * else: * message += 'no error message set' */ __pyx_t_4 = __Pyx_PyBytes_FromString(__pyx_v_parser->error_msg); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1693; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_message, __pyx_t_4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1693; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF_SET(__pyx_v_message, ((PyObject*)__pyx_t_1)); __pyx_t_1 = 0; } __pyx_L4:; goto __pyx_L3; } /*else*/ { /* "pandas/parser.pyx":1695 * message += parser.error_msg * else: * message += 'no error message set' # <<<<<<<<<<<<<< * * raise CParserError(message) */ __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_message, __pyx_kp_s_no_error_message_set); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1695; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF_SET(__pyx_v_message, ((PyObject*)__pyx_t_1)); __pyx_t_1 = 0; } __pyx_L3:; /* "pandas/parser.pyx":1697 * message += 'no error message set' * * raise CParserError(message) # <<<<<<<<<<<<<< * * */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_CParserError); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1697; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1697; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_v_message); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_message); __Pyx_GIVEREF(__pyx_v_message); __pyx_t_5 = PyObject_Call(__pyx_t_1, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1697; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_Raise(__pyx_t_5, 0, 0, 0); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1697; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/parser.pyx":1687 * * * cdef raise_parser_error(object base, parser_t *parser): # <<<<<<<<<<<<<< * message = '%s. C error: ' % base * if parser.error_msg != NULL: */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("pandas.parser.raise_parser_error", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __Pyx_XDECREF(__pyx_v_message); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/parser.pyx":1700 * * * def downcast_int64(ndarray[int64_t] arr, bint use_unsigned=0): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = len(arr) */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_6parser_7downcast_int64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_6parser_7downcast_int64 = {__Pyx_NAMESTR("downcast_int64"), (PyCFunction)__pyx_pw_6pandas_6parser_7downcast_int64, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_6parser_7downcast_int64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_arr = 0; int __pyx_v_use_unsigned; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("downcast_int64 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_arr,&__pyx_n_s_use_unsigned,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_arr)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_use_unsigned); if (value) { values[1] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "downcast_int64") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1700; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_arr = ((PyArrayObject *)values[0]); if (values[1]) { __pyx_v_use_unsigned = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_use_unsigned == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1700; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } else { __pyx_v_use_unsigned = ((int)0); } } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("downcast_int64", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1700; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.parser.downcast_int64", __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_filename = __pyx_f[0]; __pyx_lineno = 1700; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_6parser_6downcast_int64(__pyx_self, __pyx_v_arr, __pyx_v_use_unsigned); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_6parser_6downcast_int64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_arr, int __pyx_v_use_unsigned) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_n; __pyx_t_5numpy_int64_t __pyx_v_mx; __pyx_t_5numpy_int64_t __pyx_v_mn; __pyx_t_5numpy_int64_t __pyx_v_NA; __pyx_t_5numpy_int64_t __pyx_v_val; PyArrayObject *__pyx_v_mask = 0; int __pyx_v_na_count; PyObject *__pyx_v__mask = NULL; PyObject *__pyx_v_result = NULL; __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; __pyx_t_5numpy_int64_t __pyx_t_5; 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; int __pyx_t_14; Py_ssize_t __pyx_t_15; Py_ssize_t __pyx_t_16; int __pyx_t_17; int __pyx_t_18; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("downcast_int64", 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_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1700; __pyx_clineno = __LINE__; goto __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/parser.pyx":1702 * def downcast_int64(ndarray[int64_t] arr, bint use_unsigned=0): * cdef: * Py_ssize_t i, n = len(arr) # <<<<<<<<<<<<<< * int64_t mx = INT64_MIN + 1, mn = INT64_MAX * int64_t NA = na_values[np.int64] */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_arr)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1702; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/parser.pyx":1703 * cdef: * Py_ssize_t i, n = len(arr) * int64_t mx = INT64_MIN + 1, mn = INT64_MAX # <<<<<<<<<<<<<< * int64_t NA = na_values[np.int64] * int64_t val */ __pyx_v_mx = (INT64_MIN + 1); __pyx_v_mn = INT64_MAX; /* "pandas/parser.pyx":1704 * Py_ssize_t i, n = len(arr) * int64_t mx = INT64_MIN + 1, mn = INT64_MAX * int64_t NA = na_values[np.int64] # <<<<<<<<<<<<<< * int64_t val * ndarray[uint8_t] mask */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_na_values); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1704; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1704; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_int64); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1704; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyObject_GetItem(__pyx_t_2, __pyx_t_4); if (unlikely(__pyx_t_3 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1704; __pyx_clineno = __LINE__; goto __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_t_5 = __Pyx_PyInt_As_npy_int64(__pyx_t_3); if (unlikely((__pyx_t_5 == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1704; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_NA = __pyx_t_5; /* "pandas/parser.pyx":1707 * int64_t val * ndarray[uint8_t] mask * int na_count = 0 # <<<<<<<<<<<<<< * * _mask = np.empty(n, dtype=bool) */ __pyx_v_na_count = 0; /* "pandas/parser.pyx":1709 * int na_count = 0 * * _mask = np.empty(n, dtype=bool) # <<<<<<<<<<<<<< * mask = _mask.view(np.uint8) * */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1709; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_empty); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1709; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyInt_FromSsize_t(__pyx_v_n); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1709; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1709; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1709; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dtype, ((PyObject*)&PyBool_Type)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1709; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_6 = PyObject_Call(__pyx_t_4, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1709; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v__mask = __pyx_t_6; __pyx_t_6 = 0; /* "pandas/parser.pyx":1710 * * _mask = np.empty(n, dtype=bool) * mask = _mask.view(np.uint8) # <<<<<<<<<<<<<< * * for i in range(n): */ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v__mask, __pyx_n_s_view); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1710; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1710; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_uint8); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1710; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1710; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_Call(__pyx_t_6, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1710; __pyx_clineno = __LINE__; goto __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; if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1710; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_7 = ((PyArrayObject *)__pyx_t_2); { __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_uint8_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_uint8_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_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_filename = __pyx_f[0]; __pyx_lineno = 1710; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_7 = 0; __pyx_v_mask = ((PyArrayObject *)__pyx_t_2); __pyx_t_2 = 0; /* "pandas/parser.pyx":1712 * mask = _mask.view(np.uint8) * * for i in range(n): # <<<<<<<<<<<<<< * val = arr[i] * */ __pyx_t_1 = __pyx_v_n; for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_1; __pyx_t_12+=1) { __pyx_v_i = __pyx_t_12; /* "pandas/parser.pyx":1713 * * for i in range(n): * val = arr[i] # <<<<<<<<<<<<<< * * if val == NA: */ __pyx_t_13 = __pyx_v_i; __pyx_t_8 = -1; if (__pyx_t_13 < 0) { __pyx_t_13 += __pyx_pybuffernd_arr.diminfo[0].shape; if (unlikely(__pyx_t_13 < 0)) __pyx_t_8 = 0; } else if (unlikely(__pyx_t_13 >= __pyx_pybuffernd_arr.diminfo[0].shape)) __pyx_t_8 = 0; if (unlikely(__pyx_t_8 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_8); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1713; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_val = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_arr.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_arr.diminfo[0].strides)); /* "pandas/parser.pyx":1715 * val = arr[i] * * if val == NA: # <<<<<<<<<<<<<< * mask[i] = 1 * na_count += 1 */ __pyx_t_14 = ((__pyx_v_val == __pyx_v_NA) != 0); if (__pyx_t_14) { /* "pandas/parser.pyx":1716 * * if val == NA: * mask[i] = 1 # <<<<<<<<<<<<<< * na_count += 1 * continue */ __pyx_t_15 = __pyx_v_i; __pyx_t_8 = -1; if (__pyx_t_15 < 0) { __pyx_t_15 += __pyx_pybuffernd_mask.diminfo[0].shape; if (unlikely(__pyx_t_15 < 0)) __pyx_t_8 = 0; } else if (unlikely(__pyx_t_15 >= __pyx_pybuffernd_mask.diminfo[0].shape)) __pyx_t_8 = 0; if (unlikely(__pyx_t_8 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_8); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1716; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_mask.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_mask.diminfo[0].strides) = 1; /* "pandas/parser.pyx":1717 * if val == NA: * mask[i] = 1 * na_count += 1 # <<<<<<<<<<<<<< * continue * */ __pyx_v_na_count = (__pyx_v_na_count + 1); /* "pandas/parser.pyx":1718 * mask[i] = 1 * na_count += 1 * continue # <<<<<<<<<<<<<< * * # not NA */ goto __pyx_L3_continue; } /* "pandas/parser.pyx":1721 * * # not NA * mask[i] = 0 # <<<<<<<<<<<<<< * * if val > mx: */ __pyx_t_16 = __pyx_v_i; __pyx_t_8 = -1; if (__pyx_t_16 < 0) { __pyx_t_16 += __pyx_pybuffernd_mask.diminfo[0].shape; if (unlikely(__pyx_t_16 < 0)) __pyx_t_8 = 0; } else if (unlikely(__pyx_t_16 >= __pyx_pybuffernd_mask.diminfo[0].shape)) __pyx_t_8 = 0; if (unlikely(__pyx_t_8 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_8); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1721; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_mask.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_mask.diminfo[0].strides) = 0; /* "pandas/parser.pyx":1723 * mask[i] = 0 * * if val > mx: # <<<<<<<<<<<<<< * mx = val * */ __pyx_t_14 = ((__pyx_v_val > __pyx_v_mx) != 0); if (__pyx_t_14) { /* "pandas/parser.pyx":1724 * * if val > mx: * mx = val # <<<<<<<<<<<<<< * * if val < mn: */ __pyx_v_mx = __pyx_v_val; goto __pyx_L6; } __pyx_L6:; /* "pandas/parser.pyx":1726 * mx = val * * if val < mn: # <<<<<<<<<<<<<< * mn = val * */ __pyx_t_14 = ((__pyx_v_val < __pyx_v_mn) != 0); if (__pyx_t_14) { /* "pandas/parser.pyx":1727 * * if val < mn: * mn = val # <<<<<<<<<<<<<< * * if mn >= 0 and use_unsigned: */ __pyx_v_mn = __pyx_v_val; goto __pyx_L7; } __pyx_L7:; __pyx_L3_continue:; } /* "pandas/parser.pyx":1729 * mn = val * * if mn >= 0 and use_unsigned: # <<<<<<<<<<<<<< * if mx <= UINT8_MAX - 1: * result = arr.astype(np.uint8) */ __pyx_t_14 = ((__pyx_v_mn >= 0) != 0); if (__pyx_t_14) { __pyx_t_17 = (__pyx_v_use_unsigned != 0); } else { __pyx_t_17 = __pyx_t_14; } if (__pyx_t_17) { /* "pandas/parser.pyx":1730 * * if mn >= 0 and use_unsigned: * if mx <= UINT8_MAX - 1: # <<<<<<<<<<<<<< * result = arr.astype(np.uint8) * if na_count: */ __pyx_t_17 = ((__pyx_v_mx <= (UINT8_MAX - 1)) != 0); if (__pyx_t_17) { /* "pandas/parser.pyx":1731 * if mn >= 0 and use_unsigned: * if mx <= UINT8_MAX - 1: * result = arr.astype(np.uint8) # <<<<<<<<<<<<<< * if na_count: * np.putmask(result, _mask, na_values[np.uint8]) */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_arr), __pyx_n_s_astype); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1731; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1731; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_uint8); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1731; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1731; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyObject_Call(__pyx_t_2, __pyx_t_3, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1731; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_result = __pyx_t_6; __pyx_t_6 = 0; /* "pandas/parser.pyx":1732 * if mx <= UINT8_MAX - 1: * result = arr.astype(np.uint8) * if na_count: # <<<<<<<<<<<<<< * np.putmask(result, _mask, na_values[np.uint8]) * return result */ __pyx_t_17 = (__pyx_v_na_count != 0); if (__pyx_t_17) { /* "pandas/parser.pyx":1733 * result = arr.astype(np.uint8) * if na_count: * np.putmask(result, _mask, na_values[np.uint8]) # <<<<<<<<<<<<<< * return result * */ __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1733; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_putmask); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1733; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_na_values); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1733; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1733; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_uint8); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1733; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_GetItem(__pyx_t_6, __pyx_t_4); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1733; __pyx_clineno = __LINE__; goto __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_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1733; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_v_result); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_result); __Pyx_GIVEREF(__pyx_v_result); __Pyx_INCREF(__pyx_v__mask); PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v__mask); __Pyx_GIVEREF(__pyx_v__mask); PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_Call(__pyx_t_3, __pyx_t_4, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1733; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; goto __pyx_L10; } __pyx_L10:; /* "pandas/parser.pyx":1734 * if na_count: * np.putmask(result, _mask, na_values[np.uint8]) * return result # <<<<<<<<<<<<<< * * if mx <= UINT16_MAX - 1: */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_result); __pyx_r = __pyx_v_result; goto __pyx_L0; } /* "pandas/parser.pyx":1736 * return result * * if mx <= UINT16_MAX - 1: # <<<<<<<<<<<<<< * result = arr.astype(np.uint16) * if na_count: */ __pyx_t_17 = ((__pyx_v_mx <= (UINT16_MAX - 1)) != 0); if (__pyx_t_17) { /* "pandas/parser.pyx":1737 * * if mx <= UINT16_MAX - 1: * result = arr.astype(np.uint16) # <<<<<<<<<<<<<< * if na_count: * np.putmask(result, _mask, na_values[np.uint16]) */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_arr), __pyx_n_s_astype); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1737; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1737; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_uint16); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1737; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1737; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1737; __pyx_clineno = __LINE__; goto __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_v_result = __pyx_t_3; __pyx_t_3 = 0; /* "pandas/parser.pyx":1738 * if mx <= UINT16_MAX - 1: * result = arr.astype(np.uint16) * if na_count: # <<<<<<<<<<<<<< * np.putmask(result, _mask, na_values[np.uint16]) * return result */ __pyx_t_17 = (__pyx_v_na_count != 0); if (__pyx_t_17) { /* "pandas/parser.pyx":1739 * result = arr.astype(np.uint16) * if na_count: * np.putmask(result, _mask, na_values[np.uint16]) # <<<<<<<<<<<<<< * return result * */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1739; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_putmask); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1739; __pyx_clineno = __LINE__; goto __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_na_values); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1739; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1739; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_uint16); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1739; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_GetItem(__pyx_t_3, __pyx_t_6); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1739; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1739; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(__pyx_v_result); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_result); __Pyx_GIVEREF(__pyx_v_result); __Pyx_INCREF(__pyx_v__mask); PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_v__mask); __Pyx_GIVEREF(__pyx_v__mask); PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_Call(__pyx_t_4, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1739; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; goto __pyx_L12; } __pyx_L12:; /* "pandas/parser.pyx":1740 * if na_count: * np.putmask(result, _mask, na_values[np.uint16]) * return result # <<<<<<<<<<<<<< * * if mx <= UINT32_MAX - 1: */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_result); __pyx_r = __pyx_v_result; goto __pyx_L0; } /* "pandas/parser.pyx":1742 * return result * * if mx <= UINT32_MAX - 1: # <<<<<<<<<<<<<< * result = arr.astype(np.uint32) * if na_count: */ __pyx_t_17 = ((__pyx_v_mx <= (UINT32_MAX - 1)) != 0); if (__pyx_t_17) { /* "pandas/parser.pyx":1743 * * if mx <= UINT32_MAX - 1: * result = arr.astype(np.uint32) # <<<<<<<<<<<<<< * if na_count: * np.putmask(result, _mask, na_values[np.uint32]) */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_arr), __pyx_n_s_astype); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1743; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1743; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_uint32); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1743; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1743; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyObject_Call(__pyx_t_2, __pyx_t_6, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1743; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_v_result = __pyx_t_4; __pyx_t_4 = 0; /* "pandas/parser.pyx":1744 * if mx <= UINT32_MAX - 1: * result = arr.astype(np.uint32) * if na_count: # <<<<<<<<<<<<<< * np.putmask(result, _mask, na_values[np.uint32]) * return result */ __pyx_t_17 = (__pyx_v_na_count != 0); if (__pyx_t_17) { /* "pandas/parser.pyx":1745 * result = arr.astype(np.uint32) * if na_count: * np.putmask(result, _mask, na_values[np.uint32]) # <<<<<<<<<<<<<< * return result * */ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1745; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_putmask); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1745; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_na_values); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1745; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1745; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_uint32); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1745; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_GetItem(__pyx_t_4, __pyx_t_3); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1745; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1745; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_v_result); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_result); __Pyx_GIVEREF(__pyx_v_result); __Pyx_INCREF(__pyx_v__mask); PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v__mask); __Pyx_GIVEREF(__pyx_v__mask); PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_Call(__pyx_t_6, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1745; __pyx_clineno = __LINE__; goto __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_DECREF(__pyx_t_2); __pyx_t_2 = 0; goto __pyx_L14; } __pyx_L14:; /* "pandas/parser.pyx":1746 * if na_count: * np.putmask(result, _mask, na_values[np.uint32]) * return result # <<<<<<<<<<<<<< * * else: */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_result); __pyx_r = __pyx_v_result; goto __pyx_L0; } goto __pyx_L8; } /*else*/ { /* "pandas/parser.pyx":1749 * * else: * if mn >= INT8_MIN + 1 and mx <= INT8_MAX: # <<<<<<<<<<<<<< * result = arr.astype(np.int8) * if na_count: */ __pyx_t_17 = ((__pyx_v_mn >= (INT8_MIN + 1)) != 0); if (__pyx_t_17) { __pyx_t_14 = ((__pyx_v_mx <= INT8_MAX) != 0); __pyx_t_18 = __pyx_t_14; } else { __pyx_t_18 = __pyx_t_17; } if (__pyx_t_18) { /* "pandas/parser.pyx":1750 * else: * if mn >= INT8_MIN + 1 and mx <= INT8_MAX: * result = arr.astype(np.int8) # <<<<<<<<<<<<<< * if na_count: * np.putmask(result, _mask, na_values[np.int8]) */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_arr), __pyx_n_s_astype); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1750; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1750; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_int8); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1750; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1750; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyObject_Call(__pyx_t_2, __pyx_t_3, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1750; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_result = __pyx_t_6; __pyx_t_6 = 0; /* "pandas/parser.pyx":1751 * if mn >= INT8_MIN + 1 and mx <= INT8_MAX: * result = arr.astype(np.int8) * if na_count: # <<<<<<<<<<<<<< * np.putmask(result, _mask, na_values[np.int8]) * return result */ __pyx_t_18 = (__pyx_v_na_count != 0); if (__pyx_t_18) { /* "pandas/parser.pyx":1752 * result = arr.astype(np.int8) * if na_count: * np.putmask(result, _mask, na_values[np.int8]) # <<<<<<<<<<<<<< * return result * */ __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1752; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_putmask); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1752; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_na_values); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1752; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1752; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_int8); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1752; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_GetItem(__pyx_t_6, __pyx_t_4); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1752; __pyx_clineno = __LINE__; goto __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_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1752; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_v_result); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_result); __Pyx_GIVEREF(__pyx_v_result); __Pyx_INCREF(__pyx_v__mask); PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v__mask); __Pyx_GIVEREF(__pyx_v__mask); PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_Call(__pyx_t_3, __pyx_t_4, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1752; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; goto __pyx_L16; } __pyx_L16:; /* "pandas/parser.pyx":1753 * if na_count: * np.putmask(result, _mask, na_values[np.int8]) * return result # <<<<<<<<<<<<<< * * if mn >= INT16_MIN + 1 and mx <= INT16_MAX: */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_result); __pyx_r = __pyx_v_result; goto __pyx_L0; } /* "pandas/parser.pyx":1755 * return result * * if mn >= INT16_MIN + 1 and mx <= INT16_MAX: # <<<<<<<<<<<<<< * result = arr.astype(np.int16) * if na_count: */ __pyx_t_18 = ((__pyx_v_mn >= (INT16_MIN + 1)) != 0); if (__pyx_t_18) { __pyx_t_17 = ((__pyx_v_mx <= INT16_MAX) != 0); __pyx_t_14 = __pyx_t_17; } else { __pyx_t_14 = __pyx_t_18; } if (__pyx_t_14) { /* "pandas/parser.pyx":1756 * * if mn >= INT16_MIN + 1 and mx <= INT16_MAX: * result = arr.astype(np.int16) # <<<<<<<<<<<<<< * if na_count: * np.putmask(result, _mask, na_values[np.int16]) */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_arr), __pyx_n_s_astype); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1756; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1756; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_int16); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1756; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1756; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1756; __pyx_clineno = __LINE__; goto __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_v_result = __pyx_t_3; __pyx_t_3 = 0; /* "pandas/parser.pyx":1757 * if mn >= INT16_MIN + 1 and mx <= INT16_MAX: * result = arr.astype(np.int16) * if na_count: # <<<<<<<<<<<<<< * np.putmask(result, _mask, na_values[np.int16]) * return result */ __pyx_t_14 = (__pyx_v_na_count != 0); if (__pyx_t_14) { /* "pandas/parser.pyx":1758 * result = arr.astype(np.int16) * if na_count: * np.putmask(result, _mask, na_values[np.int16]) # <<<<<<<<<<<<<< * return result * */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1758; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_putmask); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1758; __pyx_clineno = __LINE__; goto __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_na_values); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1758; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1758; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_int16); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1758; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_GetItem(__pyx_t_3, __pyx_t_6); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1758; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1758; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(__pyx_v_result); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_result); __Pyx_GIVEREF(__pyx_v_result); __Pyx_INCREF(__pyx_v__mask); PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_v__mask); __Pyx_GIVEREF(__pyx_v__mask); PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_Call(__pyx_t_4, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1758; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; goto __pyx_L18; } __pyx_L18:; /* "pandas/parser.pyx":1759 * if na_count: * np.putmask(result, _mask, na_values[np.int16]) * return result # <<<<<<<<<<<<<< * * if mn >= INT32_MIN + 1 and mx <= INT32_MAX: */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_result); __pyx_r = __pyx_v_result; goto __pyx_L0; } /* "pandas/parser.pyx":1761 * return result * * if mn >= INT32_MIN + 1 and mx <= INT32_MAX: # <<<<<<<<<<<<<< * result = arr.astype(np.int32) * if na_count: */ __pyx_t_14 = ((__pyx_v_mn >= (INT32_MIN + 1)) != 0); if (__pyx_t_14) { __pyx_t_18 = ((__pyx_v_mx <= INT32_MAX) != 0); __pyx_t_17 = __pyx_t_18; } else { __pyx_t_17 = __pyx_t_14; } if (__pyx_t_17) { /* "pandas/parser.pyx":1762 * * if mn >= INT32_MIN + 1 and mx <= INT32_MAX: * result = arr.astype(np.int32) # <<<<<<<<<<<<<< * if na_count: * np.putmask(result, _mask, na_values[np.int32]) */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_arr), __pyx_n_s_astype); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1762; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1762; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_int32); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1762; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1762; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyObject_Call(__pyx_t_2, __pyx_t_6, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1762; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_v_result = __pyx_t_4; __pyx_t_4 = 0; /* "pandas/parser.pyx":1763 * if mn >= INT32_MIN + 1 and mx <= INT32_MAX: * result = arr.astype(np.int32) * if na_count: # <<<<<<<<<<<<<< * np.putmask(result, _mask, na_values[np.int32]) * return result */ __pyx_t_17 = (__pyx_v_na_count != 0); if (__pyx_t_17) { /* "pandas/parser.pyx":1764 * result = arr.astype(np.int32) * if na_count: * np.putmask(result, _mask, na_values[np.int32]) # <<<<<<<<<<<<<< * return result * */ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1764; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_putmask); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1764; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_na_values); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1764; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1764; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_int32); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1764; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_GetItem(__pyx_t_4, __pyx_t_3); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1764; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1764; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_v_result); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_result); __Pyx_GIVEREF(__pyx_v_result); __Pyx_INCREF(__pyx_v__mask); PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v__mask); __Pyx_GIVEREF(__pyx_v__mask); PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_Call(__pyx_t_6, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1764; __pyx_clineno = __LINE__; goto __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_DECREF(__pyx_t_2); __pyx_t_2 = 0; goto __pyx_L20; } __pyx_L20:; /* "pandas/parser.pyx":1765 * if na_count: * np.putmask(result, _mask, na_values[np.int32]) * return result # <<<<<<<<<<<<<< * * return arr */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_result); __pyx_r = __pyx_v_result; goto __pyx_L0; } } __pyx_L8:; /* "pandas/parser.pyx":1767 * return result * * return arr # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_arr)); __pyx_r = ((PyObject *)__pyx_v_arr); goto __pyx_L0; /* "pandas/parser.pyx":1700 * * * def downcast_int64(ndarray[int64_t] arr, bint use_unsigned=0): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = len(arr) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_6); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __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.parser.downcast_int64", __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((PyObject *)__pyx_v_mask); __Pyx_XDECREF(__pyx_v__mask); __Pyx_XDECREF(__pyx_v_result); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/parser.pyx":1770 * * * def _concatenate_chunks(list chunks): # <<<<<<<<<<<<<< * cdef: * list names = list(chunks[0].keys()) */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_6parser_9_concatenate_chunks(PyObject *__pyx_self, PyObject *__pyx_v_chunks); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_6parser_9_concatenate_chunks = {__Pyx_NAMESTR("_concatenate_chunks"), (PyCFunction)__pyx_pw_6pandas_6parser_9_concatenate_chunks, METH_O, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_6parser_9_concatenate_chunks(PyObject *__pyx_self, PyObject *__pyx_v_chunks) { CYTHON_UNUSED int __pyx_lineno = 0; CYTHON_UNUSED const char *__pyx_filename = NULL; CYTHON_UNUSED int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_concatenate_chunks (wrapper)", 0); if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_chunks), (&PyList_Type), 1, "chunks", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1770; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_6parser_8_concatenate_chunks(__pyx_self, ((PyObject*)__pyx_v_chunks)); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_6parser_8_concatenate_chunks(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_chunks) { PyObject *__pyx_v_names = 0; PyObject *__pyx_v_name = 0; PyObject *__pyx_v_warning_columns = 0; PyObject *__pyx_v_warning_names = 0; PyObject *__pyx_v_common_type = 0; PyObject *__pyx_v_result = NULL; PyObject *__pyx_v_arrs = NULL; PyObject *__pyx_v_dtypes = NULL; PyObject *__pyx_v_warning_message = NULL; PyObject *__pyx_v_chunk = NULL; PyObject *__pyx_v_a = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; Py_ssize_t __pyx_t_3; PyObject *__pyx_t_4 = NULL; Py_ssize_t __pyx_t_5; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; int __pyx_t_9; int __pyx_t_10; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_concatenate_chunks", 0); /* "pandas/parser.pyx":1772 * def _concatenate_chunks(list chunks): * cdef: * list names = list(chunks[0].keys()) # <<<<<<<<<<<<<< * object name * list warning_columns */ if (unlikely(__pyx_v_chunks == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1772; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_chunks, 0, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1772; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_keys); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1772; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyObject_Call(__pyx_t_2, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1772; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1772; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)(&PyList_Type))), __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1772; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_names = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/parser.pyx":1778 * object common_type * * result = {} # <<<<<<<<<<<<<< * warning_columns = list() * for name in names: */ __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1778; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_v_result = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/parser.pyx":1779 * * result = {} * warning_columns = list() # <<<<<<<<<<<<<< * for name in names: * arrs = [chunk.pop(name) for chunk in chunks] */ __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1779; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_v_warning_columns = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/parser.pyx":1780 * result = {} * warning_columns = list() * for name in names: # <<<<<<<<<<<<<< * arrs = [chunk.pop(name) for chunk in chunks] * # Check each arr for consistent types. */ __pyx_t_1 = __pyx_v_names; __Pyx_INCREF(__pyx_t_1); __pyx_t_3 = 0; for (;;) { if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_1)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_3); __Pyx_INCREF(__pyx_t_2); __pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1780; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1780; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif __Pyx_XDECREF_SET(__pyx_v_name, __pyx_t_2); __pyx_t_2 = 0; /* "pandas/parser.pyx":1781 * warning_columns = list() * for name in names: * arrs = [chunk.pop(name) for chunk in chunks] # <<<<<<<<<<<<<< * # Check each arr for consistent types. * dtypes = set([a.dtype for a in arrs]) */ __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1781; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (unlikely(__pyx_v_chunks == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1781; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_4 = __pyx_v_chunks; __Pyx_INCREF(__pyx_t_4); __pyx_t_5 = 0; for (;;) { if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_4)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_6 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_6); __pyx_t_5++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1781; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_6 = PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1781; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif __Pyx_XDECREF_SET(__pyx_v_chunk, __pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_chunk, __pyx_n_s_pop); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1781; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1781; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_INCREF(__pyx_v_name); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_v_name); __Pyx_GIVEREF(__pyx_v_name); __pyx_t_8 = PyObject_Call(__pyx_t_6, __pyx_t_7, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1781; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_8))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1781; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF_SET(__pyx_v_arrs, ((PyObject*)__pyx_t_2)); __pyx_t_2 = 0; /* "pandas/parser.pyx":1783 * arrs = [chunk.pop(name) for chunk in chunks] * # Check each arr for consistent types. * dtypes = set([a.dtype for a in arrs]) # <<<<<<<<<<<<<< * if len(dtypes) > 1: * common_type = np.find_common_type(dtypes, []) */ __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1783; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __pyx_v_arrs; __Pyx_INCREF(__pyx_t_4); __pyx_t_5 = 0; for (;;) { if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_4)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_8 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_8); __pyx_t_5++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1783; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_8 = PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1783; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif __Pyx_XDECREF_SET(__pyx_v_a, __pyx_t_8); __pyx_t_8 = 0; __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_a, __pyx_n_s_dtype); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1783; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_8))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1783; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1783; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)(&PySet_Type))), __pyx_t_4, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1783; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF_SET(__pyx_v_dtypes, ((PyObject*)__pyx_t_2)); __pyx_t_2 = 0; /* "pandas/parser.pyx":1784 * # Check each arr for consistent types. * dtypes = set([a.dtype for a in arrs]) * if len(dtypes) > 1: # <<<<<<<<<<<<<< * common_type = np.find_common_type(dtypes, []) * if common_type == np.object: */ __pyx_t_5 = PySet_Size(__pyx_v_dtypes); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1784; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_9 = ((__pyx_t_5 > 1) != 0); if (__pyx_t_9) { /* "pandas/parser.pyx":1785 * dtypes = set([a.dtype for a in arrs]) * if len(dtypes) > 1: * common_type = np.find_common_type(dtypes, []) # <<<<<<<<<<<<<< * if common_type == np.object: * warning_columns.append(str(name)) */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1785; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_find_common_type); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1785; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1785; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1785; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_INCREF(__pyx_v_dtypes); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_v_dtypes); __Pyx_GIVEREF(__pyx_v_dtypes); PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_Call(__pyx_t_4, __pyx_t_8, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1785; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_XDECREF_SET(__pyx_v_common_type, __pyx_t_2); __pyx_t_2 = 0; /* "pandas/parser.pyx":1786 * if len(dtypes) > 1: * common_type = np.find_common_type(dtypes, []) * if common_type == np.object: # <<<<<<<<<<<<<< * warning_columns.append(str(name)) * result[name] = np.concatenate(arrs) */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1786; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_object); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1786; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_RichCompare(__pyx_v_common_type, __pyx_t_8, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1786; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1786; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_9) { /* "pandas/parser.pyx":1787 * common_type = np.find_common_type(dtypes, []) * if common_type == np.object: * warning_columns.append(str(name)) # <<<<<<<<<<<<<< * result[name] = np.concatenate(arrs) * */ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1787; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_name); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_name); __Pyx_GIVEREF(__pyx_v_name); __pyx_t_8 = PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), __pyx_t_2, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1787; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_10 = __Pyx_PyList_Append(__pyx_v_warning_columns, __pyx_t_8); if (unlikely(__pyx_t_10 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1787; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; goto __pyx_L10; } __pyx_L10:; goto __pyx_L9; } __pyx_L9:; /* "pandas/parser.pyx":1788 * if common_type == np.object: * warning_columns.append(str(name)) * result[name] = np.concatenate(arrs) # <<<<<<<<<<<<<< * * if warning_columns: */ __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1788; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_concatenate); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1788; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1788; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_INCREF(__pyx_v_arrs); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_v_arrs); __Pyx_GIVEREF(__pyx_v_arrs); __pyx_t_4 = PyObject_Call(__pyx_t_2, __pyx_t_8, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1788; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (unlikely(PyDict_SetItem(__pyx_v_result, __pyx_v_name, __pyx_t_4) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1788; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pandas/parser.pyx":1790 * result[name] = np.concatenate(arrs) * * if warning_columns: # <<<<<<<<<<<<<< * warning_names = ','.join(warning_columns) * warning_message = " ".join(["Columns (%s) have mixed types." % warning_names, */ __pyx_t_9 = (__pyx_v_warning_columns != Py_None) && (PyList_GET_SIZE(__pyx_v_warning_columns) != 0); if (__pyx_t_9) { /* "pandas/parser.pyx":1791 * * if warning_columns: * warning_names = ','.join(warning_columns) # <<<<<<<<<<<<<< * warning_message = " ".join(["Columns (%s) have mixed types." % warning_names, * "Specify dtype option on import or set low_memory=False." */ __pyx_t_1 = __Pyx_PyString_Join(__pyx_kp_s_, __pyx_v_warning_columns); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1791; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_v_warning_names = __pyx_t_1; __pyx_t_1 = 0; /* "pandas/parser.pyx":1792 * if warning_columns: * warning_names = ','.join(warning_columns) * warning_message = " ".join(["Columns (%s) have mixed types." % warning_names, # <<<<<<<<<<<<<< * "Specify dtype option on import or set low_memory=False." * ]) */ __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_Columns_s_have_mixed_types, __pyx_v_warning_names); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1792; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = PyList_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1792; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyList_SET_ITEM(__pyx_t_4, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_INCREF(__pyx_kp_s_Specify_dtype_option_on_import_o); PyList_SET_ITEM(__pyx_t_4, 1, __pyx_kp_s_Specify_dtype_option_on_import_o); __Pyx_GIVEREF(__pyx_kp_s_Specify_dtype_option_on_import_o); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_PyString_Join(__pyx_kp_s__36, __pyx_t_4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1792; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_warning_message = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/parser.pyx":1795 * "Specify dtype option on import or set low_memory=False." * ]) * warnings.warn(warning_message, DtypeWarning) # <<<<<<<<<<<<<< * return result * */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_warnings); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1795; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_warn); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1795; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_DtypeWarning); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1795; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1795; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_INCREF(__pyx_v_warning_message); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_v_warning_message); __Pyx_GIVEREF(__pyx_v_warning_message); PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyObject_Call(__pyx_t_4, __pyx_t_8, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1795; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L11; } __pyx_L11:; /* "pandas/parser.pyx":1796 * ]) * warnings.warn(warning_message, DtypeWarning) * return result # <<<<<<<<<<<<<< * * #---------------------------------------------------------------------- */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_result); __pyx_r = __pyx_v_result; goto __pyx_L0; /* "pandas/parser.pyx":1770 * * * def _concatenate_chunks(list chunks): # <<<<<<<<<<<<<< * cdef: * list names = list(chunks[0].keys()) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_AddTraceback("pandas.parser._concatenate_chunks", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_names); __Pyx_XDECREF(__pyx_v_name); __Pyx_XDECREF(__pyx_v_warning_columns); __Pyx_XDECREF(__pyx_v_warning_names); __Pyx_XDECREF(__pyx_v_common_type); __Pyx_XDECREF(__pyx_v_result); __Pyx_XDECREF(__pyx_v_arrs); __Pyx_XDECREF(__pyx_v_dtypes); __Pyx_XDECREF(__pyx_v_warning_message); __Pyx_XDECREF(__pyx_v_chunk); __Pyx_XDECREF(__pyx_v_a); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/parser.pyx":1801 * * # NA values * def _compute_na_values(): # <<<<<<<<<<<<<< * int64info = np.iinfo(np.int64) * int32info = np.iinfo(np.int32) */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_6parser_11_compute_na_values(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_6parser_11_compute_na_values = {__Pyx_NAMESTR("_compute_na_values"), (PyCFunction)__pyx_pw_6pandas_6parser_11_compute_na_values, METH_NOARGS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_6parser_11_compute_na_values(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_compute_na_values (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_6parser_10_compute_na_values(__pyx_self); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_6parser_10_compute_na_values(CYTHON_UNUSED PyObject *__pyx_self) { PyObject *__pyx_v_int64info = NULL; PyObject *__pyx_v_int32info = NULL; PyObject *__pyx_v_int16info = NULL; PyObject *__pyx_v_int8info = NULL; PyObject *__pyx_v_uint64info = NULL; PyObject *__pyx_v_uint32info = NULL; PyObject *__pyx_v_uint16info = NULL; PyObject *__pyx_v_uint8info = NULL; PyObject *__pyx_v_na_values = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_compute_na_values", 0); /* "pandas/parser.pyx":1802 * # NA values * def _compute_na_values(): * int64info = np.iinfo(np.int64) # <<<<<<<<<<<<<< * int32info = np.iinfo(np.int32) * int16info = np.iinfo(np.int16) */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1802; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_iinfo); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1802; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1802; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_int64); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1802; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1802; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyObject_Call(__pyx_t_2, __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1802; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_int64info = __pyx_t_3; __pyx_t_3 = 0; /* "pandas/parser.pyx":1803 * def _compute_na_values(): * int64info = np.iinfo(np.int64) * int32info = np.iinfo(np.int32) # <<<<<<<<<<<<<< * int16info = np.iinfo(np.int16) * int8info = np.iinfo(np.int8) */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1803; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_iinfo); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1803; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1803; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_int32); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1803; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1803; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_Call(__pyx_t_1, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1803; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_int32info = __pyx_t_2; __pyx_t_2 = 0; /* "pandas/parser.pyx":1804 * int64info = np.iinfo(np.int64) * int32info = np.iinfo(np.int32) * int16info = np.iinfo(np.int16) # <<<<<<<<<<<<<< * int8info = np.iinfo(np.int8) * uint64info = np.iinfo(np.uint64) */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1804; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_iinfo); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1804; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1804; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_int16); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1804; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1804; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyObject_Call(__pyx_t_3, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1804; __pyx_clineno = __LINE__; goto __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_v_int16info = __pyx_t_1; __pyx_t_1 = 0; /* "pandas/parser.pyx":1805 * int32info = np.iinfo(np.int32) * int16info = np.iinfo(np.int16) * int8info = np.iinfo(np.int8) # <<<<<<<<<<<<<< * uint64info = np.iinfo(np.uint64) * uint32info = np.iinfo(np.uint32) */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1805; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_iinfo); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1805; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1805; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_int8); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1805; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1805; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyObject_Call(__pyx_t_2, __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1805; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_int8info = __pyx_t_3; __pyx_t_3 = 0; /* "pandas/parser.pyx":1806 * int16info = np.iinfo(np.int16) * int8info = np.iinfo(np.int8) * uint64info = np.iinfo(np.uint64) # <<<<<<<<<<<<<< * uint32info = np.iinfo(np.uint32) * uint16info = np.iinfo(np.uint16) */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1806; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_iinfo); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1806; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1806; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_uint64); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1806; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1806; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_Call(__pyx_t_1, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1806; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_uint64info = __pyx_t_2; __pyx_t_2 = 0; /* "pandas/parser.pyx":1807 * int8info = np.iinfo(np.int8) * uint64info = np.iinfo(np.uint64) * uint32info = np.iinfo(np.uint32) # <<<<<<<<<<<<<< * uint16info = np.iinfo(np.uint16) * uint8info = np.iinfo(np.uint8) */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1807; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_iinfo); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1807; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1807; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_uint32); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1807; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1807; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyObject_Call(__pyx_t_3, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1807; __pyx_clineno = __LINE__; goto __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_v_uint32info = __pyx_t_1; __pyx_t_1 = 0; /* "pandas/parser.pyx":1808 * uint64info = np.iinfo(np.uint64) * uint32info = np.iinfo(np.uint32) * uint16info = np.iinfo(np.uint16) # <<<<<<<<<<<<<< * uint8info = np.iinfo(np.uint8) * na_values = { */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1808; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_iinfo); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1808; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1808; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_uint16); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1808; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1808; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyObject_Call(__pyx_t_2, __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1808; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_uint16info = __pyx_t_3; __pyx_t_3 = 0; /* "pandas/parser.pyx":1809 * uint32info = np.iinfo(np.uint32) * uint16info = np.iinfo(np.uint16) * uint8info = np.iinfo(np.uint8) # <<<<<<<<<<<<<< * na_values = { * np.float64 : np.nan, */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1809; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_iinfo); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1809; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1809; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_uint8); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1809; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1809; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_Call(__pyx_t_1, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1809; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_uint8info = __pyx_t_2; __pyx_t_2 = 0; /* "pandas/parser.pyx":1810 * uint16info = np.iinfo(np.uint16) * uint8info = np.iinfo(np.uint8) * na_values = { # <<<<<<<<<<<<<< * np.float64 : np.nan, * np.int64 : int64info.min, */ __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1810; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); /* "pandas/parser.pyx":1811 * uint8info = np.iinfo(np.uint8) * na_values = { * np.float64 : np.nan, # <<<<<<<<<<<<<< * np.int64 : int64info.min, * np.int32 : int32info.min, */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1811; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_float64); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1811; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1811; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_nan); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1811; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (PyDict_SetItem(__pyx_t_2, __pyx_t_1, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1810; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "pandas/parser.pyx":1812 * na_values = { * np.float64 : np.nan, * np.int64 : int64info.min, # <<<<<<<<<<<<<< * np.int32 : int32info.min, * np.int16 : int16info.min, */ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1812; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_int64); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1812; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_int64info, __pyx_n_s_min); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1812; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); if (PyDict_SetItem(__pyx_t_2, __pyx_t_1, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1810; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "pandas/parser.pyx":1813 * np.float64 : np.nan, * np.int64 : int64info.min, * np.int32 : int32info.min, # <<<<<<<<<<<<<< * np.int16 : int16info.min, * np.int8 : int8info.min, */ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1813; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_int32); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1813; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_int32info, __pyx_n_s_min); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1813; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); if (PyDict_SetItem(__pyx_t_2, __pyx_t_1, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1810; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "pandas/parser.pyx":1814 * np.int64 : int64info.min, * np.int32 : int32info.min, * np.int16 : int16info.min, # <<<<<<<<<<<<<< * np.int8 : int8info.min, * np.uint64 : uint64info.max, */ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1814; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_int16); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1814; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_int16info, __pyx_n_s_min); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1814; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); if (PyDict_SetItem(__pyx_t_2, __pyx_t_1, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1810; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "pandas/parser.pyx":1815 * np.int32 : int32info.min, * np.int16 : int16info.min, * np.int8 : int8info.min, # <<<<<<<<<<<<<< * np.uint64 : uint64info.max, * np.uint32 : uint32info.max, */ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1815; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_int8); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1815; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_int8info, __pyx_n_s_min); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1815; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); if (PyDict_SetItem(__pyx_t_2, __pyx_t_1, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1810; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "pandas/parser.pyx":1816 * np.int16 : int16info.min, * np.int8 : int8info.min, * np.uint64 : uint64info.max, # <<<<<<<<<<<<<< * np.uint32 : uint32info.max, * np.uint16 : uint16info.max, */ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1816; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_uint64); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1816; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_uint64info, __pyx_n_s_max); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1816; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); if (PyDict_SetItem(__pyx_t_2, __pyx_t_1, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1810; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "pandas/parser.pyx":1817 * np.int8 : int8info.min, * np.uint64 : uint64info.max, * np.uint32 : uint32info.max, # <<<<<<<<<<<<<< * np.uint16 : uint16info.max, * np.uint8 : uint8info.max, */ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1817; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_uint32); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1817; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_uint32info, __pyx_n_s_max); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1817; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); if (PyDict_SetItem(__pyx_t_2, __pyx_t_1, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1810; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "pandas/parser.pyx":1818 * np.uint64 : uint64info.max, * np.uint32 : uint32info.max, * np.uint16 : uint16info.max, # <<<<<<<<<<<<<< * np.uint8 : uint8info.max, * np.bool_ : uint8info.max, */ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1818; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_uint16); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1818; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_uint16info, __pyx_n_s_max); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1818; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); if (PyDict_SetItem(__pyx_t_2, __pyx_t_1, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1810; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "pandas/parser.pyx":1819 * np.uint32 : uint32info.max, * np.uint16 : uint16info.max, * np.uint8 : uint8info.max, # <<<<<<<<<<<<<< * np.bool_ : uint8info.max, * np.object_ : np.nan # oof */ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1819; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_uint8); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1819; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_uint8info, __pyx_n_s_max); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1819; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); if (PyDict_SetItem(__pyx_t_2, __pyx_t_1, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1810; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "pandas/parser.pyx":1820 * np.uint16 : uint16info.max, * np.uint8 : uint8info.max, * np.bool_ : uint8info.max, # <<<<<<<<<<<<<< * np.object_ : np.nan # oof * } */ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1820; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_bool); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1820; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_uint8info, __pyx_n_s_max); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1820; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); if (PyDict_SetItem(__pyx_t_2, __pyx_t_1, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1810; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "pandas/parser.pyx":1821 * np.uint8 : uint8info.max, * np.bool_ : uint8info.max, * np.object_ : np.nan # oof # <<<<<<<<<<<<<< * } * return na_values */ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1821; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_object_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1821; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1821; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_nan); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1821; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (PyDict_SetItem(__pyx_t_2, __pyx_t_1, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1810; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_na_values = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; /* "pandas/parser.pyx":1823 * np.object_ : np.nan # oof * } * return na_values # <<<<<<<<<<<<<< * * na_values = _compute_na_values() */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_na_values); __pyx_r = __pyx_v_na_values; goto __pyx_L0; /* "pandas/parser.pyx":1801 * * # NA values * def _compute_na_values(): # <<<<<<<<<<<<<< * int64info = np.iinfo(np.int64) * int32info = np.iinfo(np.int32) */ /* 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.parser._compute_na_values", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_int64info); __Pyx_XDECREF(__pyx_v_int32info); __Pyx_XDECREF(__pyx_v_int16info); __Pyx_XDECREF(__pyx_v_int8info); __Pyx_XDECREF(__pyx_v_uint64info); __Pyx_XDECREF(__pyx_v_uint32info); __Pyx_XDECREF(__pyx_v_uint16info); __Pyx_XDECREF(__pyx_v_uint8info); __Pyx_XDECREF(__pyx_v_na_values); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/parser.pyx":1831 * * * cdef _apply_converter(object f, parser_t *parser, int col, # <<<<<<<<<<<<<< * int line_start, int line_end, * char* c_encoding): */ static PyObject *__pyx_f_6pandas_6parser__apply_converter(PyObject *__pyx_v_f, parser_t *__pyx_v_parser, int __pyx_v_col, int __pyx_v_line_start, int __pyx_v_line_end, char *__pyx_v_c_encoding) { Py_ssize_t __pyx_v_i; size_t __pyx_v_lines; coliter_t __pyx_v_it; char *__pyx_v_word; char *__pyx_v_errors; PyArrayObject *__pyx_v_result = 0; PyObject *__pyx_v_val = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_result; __Pyx_Buffer __pyx_pybuffer_result; 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; int __pyx_t_11; int __pyx_t_12; int __pyx_t_13; size_t __pyx_t_14; Py_ssize_t __pyx_t_15; Py_ssize_t __pyx_t_16; PyObject **__pyx_t_17; Py_ssize_t __pyx_t_18; Py_ssize_t __pyx_t_19; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_apply_converter", 0); __pyx_pybuffer_result.pybuffer.buf = NULL; __pyx_pybuffer_result.refcount = 0; __pyx_pybuffernd_result.data = NULL; __pyx_pybuffernd_result.rcbuffer = &__pyx_pybuffer_result; /* "pandas/parser.pyx":1840 * coliter_t it * char *word * char *errors = "strict" # <<<<<<<<<<<<<< * ndarray[object] result * object val */ __pyx_v_errors = __pyx_k_strict; /* "pandas/parser.pyx":1844 * object val * * lines = line_end - line_start # <<<<<<<<<<<<<< * result = np.empty(lines, dtype=np.object_) * */ __pyx_v_lines = (__pyx_v_line_end - __pyx_v_line_start); /* "pandas/parser.pyx":1845 * * lines = line_end - line_start * result = np.empty(lines, dtype=np.object_) # <<<<<<<<<<<<<< * * coliter_setup(&it, parser, col, line_start) */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1845; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 1845; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_PyInt_FromSize_t(__pyx_v_lines); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1845; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1845; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1845; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1845; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_object_2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1845; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 1845; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyObject_Call(__pyx_t_2, __pyx_t_3, __pyx_t_1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1845; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 1845; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_6 = ((PyArrayObject *)__pyx_t_5); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_object, 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_result.rcbuffer->pybuffer, (PyObject*)__pyx_v_result, &__Pyx_TypeInfo_object, 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_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_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1845; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_6 = 0; __pyx_v_result = ((PyArrayObject *)__pyx_t_5); __pyx_t_5 = 0; /* "pandas/parser.pyx":1847 * result = np.empty(lines, dtype=np.object_) * * coliter_setup(&it, parser, col, line_start) # <<<<<<<<<<<<<< * * if not PY3 and c_encoding == NULL: */ coliter_setup((&__pyx_v_it), __pyx_v_parser, __pyx_v_col, __pyx_v_line_start); /* "pandas/parser.pyx":1849 * coliter_setup(&it, parser, col, line_start) * * if not PY3 and c_encoding == NULL: # <<<<<<<<<<<<<< * for i in range(lines): * word = COLITER_NEXT(it) */ __pyx_t_11 = ((!(__pyx_v_6pandas_6parser_PY3 != 0)) != 0); if (__pyx_t_11) { __pyx_t_12 = ((__pyx_v_c_encoding == NULL) != 0); __pyx_t_13 = __pyx_t_12; } else { __pyx_t_13 = __pyx_t_11; } if (__pyx_t_13) { /* "pandas/parser.pyx":1850 * * if not PY3 and c_encoding == NULL: * for i in range(lines): # <<<<<<<<<<<<<< * word = COLITER_NEXT(it) * val = PyBytes_FromString(word) */ __pyx_t_14 = __pyx_v_lines; for (__pyx_t_15 = 0; __pyx_t_15 < __pyx_t_14; __pyx_t_15+=1) { __pyx_v_i = __pyx_t_15; /* "pandas/parser.pyx":1851 * if not PY3 and c_encoding == NULL: * for i in range(lines): * word = COLITER_NEXT(it) # <<<<<<<<<<<<<< * val = PyBytes_FromString(word) * result[i] = f(val) */ __pyx_v_word = COLITER_NEXT(__pyx_v_it); /* "pandas/parser.pyx":1852 * for i in range(lines): * word = COLITER_NEXT(it) * val = PyBytes_FromString(word) # <<<<<<<<<<<<<< * result[i] = f(val) * elif ((PY3 and c_encoding == NULL) or c_encoding == b'utf-8'): */ __pyx_t_5 = PyBytes_FromString(__pyx_v_word); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1852; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_XDECREF_SET(__pyx_v_val, __pyx_t_5); __pyx_t_5 = 0; /* "pandas/parser.pyx":1853 * word = COLITER_NEXT(it) * val = PyBytes_FromString(word) * result[i] = f(val) # <<<<<<<<<<<<<< * elif ((PY3 and c_encoding == NULL) or c_encoding == b'utf-8'): * for i in range(lines): */ __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1853; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_v_val); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_val); __Pyx_GIVEREF(__pyx_v_val); __pyx_t_1 = PyObject_Call(__pyx_v_f, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1853; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_16 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_16 < 0) { __pyx_t_16 += __pyx_pybuffernd_result.diminfo[0].shape; if (unlikely(__pyx_t_16 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_16 >= __pyx_pybuffernd_result.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1853; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_17 = __Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_result.diminfo[0].strides); __Pyx_GOTREF(*__pyx_t_17); __Pyx_INCREF(__pyx_t_1); __Pyx_DECREF(*__pyx_t_17); *__pyx_t_17 = __pyx_t_1; __Pyx_GIVEREF(*__pyx_t_17); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } goto __pyx_L3; } /* "pandas/parser.pyx":1854 * val = PyBytes_FromString(word) * result[i] = f(val) * elif ((PY3 and c_encoding == NULL) or c_encoding == b'utf-8'): # <<<<<<<<<<<<<< * for i in range(lines): * word = COLITER_NEXT(it) */ if (__pyx_v_6pandas_6parser_PY3) { __pyx_t_13 = (__pyx_v_c_encoding == NULL); __pyx_t_11 = __pyx_t_13; } else { __pyx_t_11 = __pyx_v_6pandas_6parser_PY3; } if (!__pyx_t_11) { __pyx_t_1 = __Pyx_PyBytes_FromString(__pyx_v_c_encoding); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1854; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_13 = (__Pyx_PyBytes_Equals(__pyx_t_1, __pyx_kp_b_utf_8, Py_EQ)); if (unlikely(__pyx_t_13 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1854; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_12 = __pyx_t_13; } else { __pyx_t_12 = __pyx_t_11; } if (__pyx_t_12) { /* "pandas/parser.pyx":1855 * result[i] = f(val) * elif ((PY3 and c_encoding == NULL) or c_encoding == b'utf-8'): * for i in range(lines): # <<<<<<<<<<<<<< * word = COLITER_NEXT(it) * val = PyUnicode_FromString(word) */ __pyx_t_14 = __pyx_v_lines; for (__pyx_t_15 = 0; __pyx_t_15 < __pyx_t_14; __pyx_t_15+=1) { __pyx_v_i = __pyx_t_15; /* "pandas/parser.pyx":1856 * elif ((PY3 and c_encoding == NULL) or c_encoding == b'utf-8'): * for i in range(lines): * word = COLITER_NEXT(it) # <<<<<<<<<<<<<< * val = PyUnicode_FromString(word) * result[i] = f(val) */ __pyx_v_word = COLITER_NEXT(__pyx_v_it); /* "pandas/parser.pyx":1857 * for i in range(lines): * word = COLITER_NEXT(it) * val = PyUnicode_FromString(word) # <<<<<<<<<<<<<< * result[i] = f(val) * else: */ __pyx_t_1 = PyUnicode_FromString(__pyx_v_word); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1857; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_XDECREF_SET(__pyx_v_val, __pyx_t_1); __pyx_t_1 = 0; /* "pandas/parser.pyx":1858 * word = COLITER_NEXT(it) * val = PyUnicode_FromString(word) * result[i] = f(val) # <<<<<<<<<<<<<< * else: * for i in range(lines): */ __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1858; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_val); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_val); __Pyx_GIVEREF(__pyx_v_val); __pyx_t_5 = PyObject_Call(__pyx_v_f, __pyx_t_1, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1858; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_18 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_18 < 0) { __pyx_t_18 += __pyx_pybuffernd_result.diminfo[0].shape; if (unlikely(__pyx_t_18 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_18 >= __pyx_pybuffernd_result.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1858; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_17 = __Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_result.diminfo[0].strides); __Pyx_GOTREF(*__pyx_t_17); __Pyx_INCREF(__pyx_t_5); __Pyx_DECREF(*__pyx_t_17); *__pyx_t_17 = __pyx_t_5; __Pyx_GIVEREF(*__pyx_t_17); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } goto __pyx_L3; } /*else*/ { /* "pandas/parser.pyx":1860 * result[i] = f(val) * else: * for i in range(lines): # <<<<<<<<<<<<<< * word = COLITER_NEXT(it) * val = PyUnicode_Decode(word, strlen(word), */ __pyx_t_14 = __pyx_v_lines; for (__pyx_t_15 = 0; __pyx_t_15 < __pyx_t_14; __pyx_t_15+=1) { __pyx_v_i = __pyx_t_15; /* "pandas/parser.pyx":1861 * else: * for i in range(lines): * word = COLITER_NEXT(it) # <<<<<<<<<<<<<< * val = PyUnicode_Decode(word, strlen(word), * c_encoding, errors) */ __pyx_v_word = COLITER_NEXT(__pyx_v_it); /* "pandas/parser.pyx":1862 * for i in range(lines): * word = COLITER_NEXT(it) * val = PyUnicode_Decode(word, strlen(word), # <<<<<<<<<<<<<< * c_encoding, errors) * result[i] = f(val) */ __pyx_t_5 = PyUnicode_Decode(__pyx_v_word, strlen(__pyx_v_word), __pyx_v_c_encoding, __pyx_v_errors); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1862; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_XDECREF_SET(__pyx_v_val, __pyx_t_5); __pyx_t_5 = 0; /* "pandas/parser.pyx":1864 * val = PyUnicode_Decode(word, strlen(word), * c_encoding, errors) * result[i] = f(val) # <<<<<<<<<<<<<< * * return lib.maybe_convert_objects(result) */ __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1864; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_v_val); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_val); __Pyx_GIVEREF(__pyx_v_val); __pyx_t_1 = PyObject_Call(__pyx_v_f, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1864; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_19 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_19 < 0) { __pyx_t_19 += __pyx_pybuffernd_result.diminfo[0].shape; if (unlikely(__pyx_t_19 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_19 >= __pyx_pybuffernd_result.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1864; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_17 = __Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_result.diminfo[0].strides); __Pyx_GOTREF(*__pyx_t_17); __Pyx_INCREF(__pyx_t_1); __Pyx_DECREF(*__pyx_t_17); *__pyx_t_17 = __pyx_t_1; __Pyx_GIVEREF(*__pyx_t_17); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } } __pyx_L3:; /* "pandas/parser.pyx":1866 * result[i] = f(val) * * return lib.maybe_convert_objects(result) # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_lib); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1866; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_maybe_convert_objects); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1866; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1866; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)__pyx_v_result)); PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_result)); __Pyx_GIVEREF(((PyObject *)__pyx_v_result)); __pyx_t_3 = PyObject_Call(__pyx_t_5, __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1866; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; /* "pandas/parser.pyx":1831 * * * cdef _apply_converter(object f, parser_t *parser, int col, # <<<<<<<<<<<<<< * int line_start, int line_end, * char* c_encoding): */ /* 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_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.parser._apply_converter", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_result); __Pyx_XDECREF(__pyx_v_val); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/parser.pyx":1869 * * * def _to_structured_array(dict columns, object names): # <<<<<<<<<<<<<< * cdef: * ndarray recs, column */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_6parser_13_to_structured_array(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_6parser_13_to_structured_array = {__Pyx_NAMESTR("_to_structured_array"), (PyCFunction)__pyx_pw_6pandas_6parser_13_to_structured_array, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_6parser_13_to_structured_array(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_columns = 0; PyObject *__pyx_v_names = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_to_structured_array (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_columns,&__pyx_n_s_names,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_columns)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_names)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("_to_structured_array", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1869; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_to_structured_array") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1869; __pyx_clineno = __LINE__; goto __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_columns = ((PyObject*)values[0]); __pyx_v_names = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("_to_structured_array", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1869; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.parser._to_structured_array", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_columns), (&PyDict_Type), 1, "columns", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1869; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_6parser_12_to_structured_array(__pyx_self, __pyx_v_columns, __pyx_v_names); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_6parser_12_to_structured_array(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_columns, PyObject *__pyx_v_names) { PyArrayObject *__pyx_v_recs = 0; PyArrayObject *__pyx_v_column = 0; PyArray_Descr *__pyx_v_dt = 0; PyObject *__pyx_v_fields = 0; PyObject *__pyx_v_name = 0; PyObject *__pyx_v_fnames = 0; PyObject *__pyx_v_field_type = 0; Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_offset; Py_ssize_t __pyx_v_nfields; Py_ssize_t __pyx_v_length; int __pyx_v_stride; int __pyx_v_elsize; char *__pyx_v_buf; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; Py_ssize_t __pyx_t_4; Py_ssize_t __pyx_t_5; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *(*__pyx_t_8)(PyObject *); PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; PyObject *__pyx_t_11 = NULL; int __pyx_t_12; Py_ssize_t __pyx_t_13; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_to_structured_array", 0); __Pyx_INCREF(__pyx_v_names); /* "pandas/parser.pyx":1880 * char *buf * * if names is None: # <<<<<<<<<<<<<< * names = ['%d' % i for i in range(len(columns))] * else: */ __pyx_t_1 = (__pyx_v_names == Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { /* "pandas/parser.pyx":1881 * * if names is None: * names = ['%d' % i for i in range(len(columns))] # <<<<<<<<<<<<<< * else: * # single line header */ __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1881; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (unlikely(__pyx_v_columns == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1881; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_4 = PyDict_Size(__pyx_v_columns); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1881; __pyx_clineno = __LINE__; goto __pyx_L1_error;} for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) { __pyx_v_i = __pyx_t_5; __pyx_t_6 = PyInt_FromSsize_t(__pyx_v_i); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1881; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = __Pyx_PyString_Format(__pyx_kp_s_d, __pyx_t_6); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1881; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(__Pyx_ListComp_Append(__pyx_t_3, (PyObject*)__pyx_t_7))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1881; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } __Pyx_DECREF_SET(__pyx_v_names, __pyx_t_3); __pyx_t_3 = 0; goto __pyx_L3; } /*else*/ { /* "pandas/parser.pyx":1884 * else: * # single line header * names = names[0] # <<<<<<<<<<<<<< * * dt = np.dtype([(str(name), columns[i].dtype) */ __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_names, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_3 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1884; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF_SET(__pyx_v_names, __pyx_t_3); __pyx_t_3 = 0; } __pyx_L3:; /* "pandas/parser.pyx":1886 * names = names[0] * * dt = np.dtype([(str(name), columns[i].dtype) # <<<<<<<<<<<<<< * for i, name in enumerate(names)]) * fnames = dt.names */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1886; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_dtype); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1886; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1886; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = 0; /* "pandas/parser.pyx":1887 * * dt = np.dtype([(str(name), columns[i].dtype) * for i, name in enumerate(names)]) # <<<<<<<<<<<<<< * fnames = dt.names * fields = dt.fields */ if (PyList_CheckExact(__pyx_v_names) || PyTuple_CheckExact(__pyx_v_names)) { __pyx_t_6 = __pyx_v_names; __Pyx_INCREF(__pyx_t_6); __pyx_t_5 = 0; __pyx_t_8 = NULL; } else { __pyx_t_5 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_v_names); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1887; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_8 = Py_TYPE(__pyx_t_6)->tp_iternext; } for (;;) { if (!__pyx_t_8 && PyList_CheckExact(__pyx_t_6)) { if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_6)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_9 = PyList_GET_ITEM(__pyx_t_6, __pyx_t_5); __Pyx_INCREF(__pyx_t_9); __pyx_t_5++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1887; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_9 = PySequence_ITEM(__pyx_t_6, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1887; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif } else if (!__pyx_t_8 && PyTuple_CheckExact(__pyx_t_6)) { if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_6)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_9 = PyTuple_GET_ITEM(__pyx_t_6, __pyx_t_5); __Pyx_INCREF(__pyx_t_9); __pyx_t_5++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1887; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_9 = PySequence_ITEM(__pyx_t_6, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1887; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif } else { __pyx_t_9 = __pyx_t_8(__pyx_t_6); if (unlikely(!__pyx_t_9)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1887; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } break; } __Pyx_GOTREF(__pyx_t_9); } __Pyx_XDECREF_SET(__pyx_v_name, __pyx_t_9); __pyx_t_9 = 0; __pyx_v_i = __pyx_t_4; __pyx_t_4 = (__pyx_t_4 + 1); /* "pandas/parser.pyx":1886 * names = names[0] * * dt = np.dtype([(str(name), columns[i].dtype) # <<<<<<<<<<<<<< * for i, name in enumerate(names)]) * fnames = dt.names */ __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1886; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_INCREF(__pyx_v_name); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_v_name); __Pyx_GIVEREF(__pyx_v_name); __pyx_t_10 = PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), __pyx_t_9, NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1886; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; if (unlikely(__pyx_v_columns == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1886; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_9 = PyInt_FromSsize_t(__pyx_v_i); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1886; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_t_11 = __Pyx_PyDict_GetItem(__pyx_v_columns, __pyx_t_9); if (unlikely(__pyx_t_11 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1886; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_dtype); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1886; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __pyx_t_11 = PyTuple_New(2); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1886; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_10); __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_11, 1, __pyx_t_9); __Pyx_GIVEREF(__pyx_t_9); __pyx_t_10 = 0; __pyx_t_9 = 0; if (unlikely(__Pyx_ListComp_Append(__pyx_t_3, (PyObject*)__pyx_t_11))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1886; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; } __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1886; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyObject_Call(__pyx_t_7, __pyx_t_6, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1886; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_dtype))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1886; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_dt = ((PyArray_Descr *)__pyx_t_3); __pyx_t_3 = 0; /* "pandas/parser.pyx":1888 * dt = np.dtype([(str(name), columns[i].dtype) * for i, name in enumerate(names)]) * fnames = dt.names # <<<<<<<<<<<<<< * fields = dt.fields * */ __pyx_t_3 = __pyx_v_dt->names; __Pyx_INCREF(__pyx_t_3); __pyx_v_fnames = __pyx_t_3; __pyx_t_3 = 0; /* "pandas/parser.pyx":1889 * for i, name in enumerate(names)]) * fnames = dt.names * fields = dt.fields # <<<<<<<<<<<<<< * * nfields = len(fields) */ if (!(likely(PyDict_CheckExact(__pyx_v_dt->fields))||((__pyx_v_dt->fields) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_v_dt->fields)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1889; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_3 = __pyx_v_dt->fields; __Pyx_INCREF(__pyx_t_3); __pyx_v_fields = ((PyObject*)__pyx_t_3); __pyx_t_3 = 0; /* "pandas/parser.pyx":1891 * fields = dt.fields * * nfields = len(fields) # <<<<<<<<<<<<<< * * if PY3: */ if (unlikely(__pyx_v_fields == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1891; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_4 = PyDict_Size(__pyx_v_fields); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1891; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_nfields = __pyx_t_4; /* "pandas/parser.pyx":1893 * nfields = len(fields) * * if PY3: # <<<<<<<<<<<<<< * length = len(list(columns.values())[0]) * else: */ __pyx_t_2 = (__pyx_v_6pandas_6parser_PY3 != 0); if (__pyx_t_2) { /* "pandas/parser.pyx":1894 * * if PY3: * length = len(list(columns.values())[0]) # <<<<<<<<<<<<<< * else: * length = len(columns.values()[0]) */ if (unlikely(__pyx_v_columns == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "values"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1894; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_3 = __Pyx_PyDict_Values(__pyx_v_columns); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1894; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1894; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyObject_Call(((PyObject *)((PyObject*)(&PyList_Type))), __pyx_t_6, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1894; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = __Pyx_GetItemInt_List(__pyx_t_3, 0, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(__pyx_t_6 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1894; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_4 = PyObject_Length(__pyx_t_6); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1894; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_v_length = __pyx_t_4; goto __pyx_L8; } /*else*/ { /* "pandas/parser.pyx":1896 * length = len(list(columns.values())[0]) * else: * length = len(columns.values()[0]) # <<<<<<<<<<<<<< * * stride = dt.itemsize */ if (unlikely(__pyx_v_columns == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "values"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1896; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_6 = __Pyx_PyDict_Values(__pyx_v_columns); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1896; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_6, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_3 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1896; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_4 = PyObject_Length(__pyx_t_3); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1896; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_length = __pyx_t_4; } __pyx_L8:; /* "pandas/parser.pyx":1898 * length = len(columns.values()[0]) * * stride = dt.itemsize # <<<<<<<<<<<<<< * * # start = time.time() */ __pyx_t_12 = __pyx_v_dt->elsize; __pyx_v_stride = __pyx_t_12; /* "pandas/parser.pyx":1903 * * # we own the data * buf = malloc(length * stride) # <<<<<<<<<<<<<< * * recs = util.sarr_from_data(dt, length, buf) */ __pyx_v_buf = ((char *)malloc((__pyx_v_length * __pyx_v_stride))); /* "pandas/parser.pyx":1905 * buf = malloc(length * stride) * * recs = util.sarr_from_data(dt, length, buf) # <<<<<<<<<<<<<< * assert(recs.flags.owndata) * */ __pyx_t_3 = sarr_from_data(__pyx_v_dt, __pyx_v_length, __pyx_v_buf); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1905; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1905; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_recs = ((PyArrayObject *)__pyx_t_3); __pyx_t_3 = 0; /* "pandas/parser.pyx":1906 * * recs = util.sarr_from_data(dt, length, buf) * assert(recs.flags.owndata) # <<<<<<<<<<<<<< * * # buf = recs.data */ #ifndef CYTHON_WITHOUT_ASSERTIONS if (unlikely(!Py_OptimizeFlag)) { __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_recs), __pyx_n_s_flags); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1906; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_owndata); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1906; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1906; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(!__pyx_t_2)) { PyErr_SetNone(PyExc_AssertionError); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1906; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } } #endif /* "pandas/parser.pyx":1912 * # print 'took %.4f' % (end - start) * * for i in range(nfields): # <<<<<<<<<<<<<< * # start = time.clock() * # name = names[i] */ __pyx_t_4 = __pyx_v_nfields; for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) { __pyx_v_i = __pyx_t_5; /* "pandas/parser.pyx":1917 * * # XXX * field_type = fields[fnames[i]] # <<<<<<<<<<<<<< * * # (dtype, stride) tuple */ if (unlikely(__pyx_v_fields == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1917; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_fnames, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(__pyx_t_6 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1917; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_6); __pyx_t_3 = __Pyx_PyDict_GetItem(__pyx_v_fields, __pyx_t_6); if (unlikely(__pyx_t_3 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1917; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF_SET(__pyx_v_field_type, __pyx_t_3); __pyx_t_3 = 0; /* "pandas/parser.pyx":1920 * * # (dtype, stride) tuple * offset = field_type[1] # <<<<<<<<<<<<<< * elsize = field_type[0].itemsize * column = columns[i] */ __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_field_type, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_3 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1920; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_3); __pyx_t_13 = __Pyx_PyIndex_AsSsize_t(__pyx_t_3); if (unlikely((__pyx_t_13 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1920; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_offset = __pyx_t_13; /* "pandas/parser.pyx":1921 * # (dtype, stride) tuple * offset = field_type[1] * elsize = field_type[0].itemsize # <<<<<<<<<<<<<< * column = columns[i] * */ __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_field_type, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_3 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1921; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_3); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_itemsize); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1921; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_12 = __Pyx_PyInt_As_int(__pyx_t_6); if (unlikely((__pyx_t_12 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1921; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_v_elsize = __pyx_t_12; /* "pandas/parser.pyx":1922 * offset = field_type[1] * elsize = field_type[0].itemsize * column = columns[i] # <<<<<<<<<<<<<< * * _fill_structured_column(buf + offset, column.data, */ if (unlikely(__pyx_v_columns == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1922; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_6 = PyInt_FromSsize_t(__pyx_v_i); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1922; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_3 = __Pyx_PyDict_GetItem(__pyx_v_columns, __pyx_t_6); if (unlikely(__pyx_t_3 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1922; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1922; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_XDECREF_SET(__pyx_v_column, ((PyArrayObject *)__pyx_t_3)); __pyx_t_3 = 0; /* "pandas/parser.pyx":1926 * _fill_structured_column(buf + offset, column.data, * elsize, stride, length, * field_type[0] == np.object_) # <<<<<<<<<<<<<< * * # print 'Transfer of %s took %.4f' % (str(field_type), */ __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_field_type, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_3 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1926; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_3); __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1926; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_object_2); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1926; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyObject_RichCompare(__pyx_t_3, __pyx_t_7, Py_EQ); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1926; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1926; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; /* "pandas/parser.pyx":1924 * column = columns[i] * * _fill_structured_column(buf + offset, column.data, # <<<<<<<<<<<<<< * elsize, stride, length, * field_type[0] == np.object_) */ __pyx_t_6 = __pyx_f_6pandas_6parser__fill_structured_column((__pyx_v_buf + __pyx_v_offset), ((char *)__pyx_v_column->data), __pyx_v_elsize, __pyx_v_stride, __pyx_v_length, __pyx_t_2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1924; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } /* "pandas/parser.pyx":1931 * # time.clock() - start) * * return recs # <<<<<<<<<<<<<< * * cdef _fill_structured_column(char *dst, char* src, int elsize, */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_recs)); __pyx_r = ((PyObject *)__pyx_v_recs); goto __pyx_L0; /* "pandas/parser.pyx":1869 * * * def _to_structured_array(dict columns, object names): # <<<<<<<<<<<<<< * cdef: * ndarray recs, column */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_9); __Pyx_XDECREF(__pyx_t_10); __Pyx_XDECREF(__pyx_t_11); __Pyx_AddTraceback("pandas.parser._to_structured_array", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_recs); __Pyx_XDECREF((PyObject *)__pyx_v_column); __Pyx_XDECREF((PyObject *)__pyx_v_dt); __Pyx_XDECREF(__pyx_v_fields); __Pyx_XDECREF(__pyx_v_name); __Pyx_XDECREF(__pyx_v_fnames); __Pyx_XDECREF(__pyx_v_field_type); __Pyx_XDECREF(__pyx_v_names); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/parser.pyx":1933 * return recs * * cdef _fill_structured_column(char *dst, char* src, int elsize, # <<<<<<<<<<<<<< * int stride, int length, bint incref): * cdef: */ static PyObject *__pyx_f_6pandas_6parser__fill_structured_column(char *__pyx_v_dst, char *__pyx_v_src, int __pyx_v_elsize, int __pyx_v_stride, int __pyx_v_length, int __pyx_v_incref) { CYTHON_UNUSED size_t __pyx_v_i; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; size_t __pyx_t_3; __Pyx_RefNannySetupContext("_fill_structured_column", 0); /* "pandas/parser.pyx":1938 * size_t i * * if incref: # <<<<<<<<<<<<<< * util.transfer_object_column(dst, src, stride, length) * else: */ __pyx_t_1 = (__pyx_v_incref != 0); if (__pyx_t_1) { /* "pandas/parser.pyx":1939 * * if incref: * util.transfer_object_column(dst, src, stride, length) # <<<<<<<<<<<<<< * else: * for i in range(length): */ transfer_object_column(__pyx_v_dst, __pyx_v_src, __pyx_v_stride, __pyx_v_length); goto __pyx_L3; } /*else*/ { /* "pandas/parser.pyx":1941 * util.transfer_object_column(dst, src, stride, length) * else: * for i in range(length): # <<<<<<<<<<<<<< * memcpy(dst, src, elsize) * dst += stride */ __pyx_t_2 = __pyx_v_length; for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) { __pyx_v_i = __pyx_t_3; /* "pandas/parser.pyx":1942 * else: * for i in range(length): * memcpy(dst, src, elsize) # <<<<<<<<<<<<<< * dst += stride * src += elsize */ memcpy(__pyx_v_dst, __pyx_v_src, __pyx_v_elsize); /* "pandas/parser.pyx":1943 * for i in range(length): * memcpy(dst, src, elsize) * dst += stride # <<<<<<<<<<<<<< * src += elsize * */ __pyx_v_dst = (__pyx_v_dst + __pyx_v_stride); /* "pandas/parser.pyx":1944 * memcpy(dst, src, elsize) * dst += stride * src += elsize # <<<<<<<<<<<<<< * * */ __pyx_v_src = (__pyx_v_src + __pyx_v_elsize); } } __pyx_L3:; /* "pandas/parser.pyx":1933 * return recs * * cdef _fill_structured_column(char *dst, char* src, int elsize, # <<<<<<<<<<<<<< * int stride, int length, bint incref): * cdef: */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/parser.pyx":1948 * * * def _maybe_encode(values): # <<<<<<<<<<<<<< * if values is None: * return [] */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_6parser_15_maybe_encode(PyObject *__pyx_self, PyObject *__pyx_v_values); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_6parser_15_maybe_encode = {__Pyx_NAMESTR("_maybe_encode"), (PyCFunction)__pyx_pw_6pandas_6parser_15_maybe_encode, METH_O, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_6parser_15_maybe_encode(PyObject *__pyx_self, PyObject *__pyx_v_values) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_maybe_encode (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_6parser_14_maybe_encode(__pyx_self, ((PyObject *)__pyx_v_values)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_6parser_14_maybe_encode(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_values) { PyObject *__pyx_v_x = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; Py_ssize_t __pyx_t_5; PyObject *(*__pyx_t_6)(PyObject *); PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_maybe_encode", 0); /* "pandas/parser.pyx":1949 * * def _maybe_encode(values): * if values is None: # <<<<<<<<<<<<<< * return [] * return [x.encode('utf-8') if isinstance(x, unicode) else x for x in values] */ __pyx_t_1 = (__pyx_v_values == Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { /* "pandas/parser.pyx":1950 * def _maybe_encode(values): * if values is None: * return [] # <<<<<<<<<<<<<< * return [x.encode('utf-8') if isinstance(x, unicode) else x for x in values] */ __Pyx_XDECREF(__pyx_r); __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1950; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; } /* "pandas/parser.pyx":1951 * if values is None: * return [] * return [x.encode('utf-8') if isinstance(x, unicode) else x for x in values] # <<<<<<<<<<<<<< */ __Pyx_XDECREF(__pyx_r); __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1951; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyList_CheckExact(__pyx_v_values) || PyTuple_CheckExact(__pyx_v_values)) { __pyx_t_4 = __pyx_v_values; __Pyx_INCREF(__pyx_t_4); __pyx_t_5 = 0; __pyx_t_6 = NULL; } else { __pyx_t_5 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_v_values); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1951; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_6 = Py_TYPE(__pyx_t_4)->tp_iternext; } for (;;) { if (!__pyx_t_6 && PyList_CheckExact(__pyx_t_4)) { if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_4)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_7 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_7); __pyx_t_5++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1951; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_7 = PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1951; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif } else if (!__pyx_t_6 && PyTuple_CheckExact(__pyx_t_4)) { if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_4)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_7 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_7); __pyx_t_5++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1951; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_7 = PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1951; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif } else { __pyx_t_7 = __pyx_t_6(__pyx_t_4); if (unlikely(!__pyx_t_7)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1951; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } break; } __Pyx_GOTREF(__pyx_t_7); } __Pyx_XDECREF_SET(__pyx_v_x, __pyx_t_7); __pyx_t_7 = 0; __pyx_t_2 = PyUnicode_Check(__pyx_v_x); if ((__pyx_t_2 != 0)) { __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_x, __pyx_n_s_encode); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1951; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_9 = PyObject_Call(__pyx_t_8, __pyx_tuple__37, NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1951; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_7 = __pyx_t_9; __pyx_t_9 = 0; } else { __Pyx_INCREF(__pyx_v_x); __pyx_t_7 = __pyx_v_x; } if (unlikely(__Pyx_ListComp_Append(__pyx_t_3, (PyObject*)__pyx_t_7))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1951; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; /* "pandas/parser.pyx":1948 * * * def _maybe_encode(values): # <<<<<<<<<<<<<< * if values is None: * return [] */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); __Pyx_AddTraceback("pandas.parser._maybe_encode", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_x); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "util.pxd":26 * object sarr_from_data(cnp.dtype, int length, void* data) * * cdef inline object get_value_at(ndarray arr, object loc): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, sz */ static CYTHON_INLINE PyObject *__pyx_f_4util_get_value_at(PyArrayObject *__pyx_v_arr, PyObject *__pyx_v_loc) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_sz; PyObject *__pyx_v_casted = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; Py_ssize_t __pyx_t_3; int __pyx_t_4; int __pyx_t_5; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_value_at", 0); __Pyx_INCREF(__pyx_v_loc); /* "util.pxd":30 * Py_ssize_t i, sz * void* data_ptr * if is_float_object(loc): # <<<<<<<<<<<<<< * casted = int(loc) * if casted == loc: */ __pyx_t_1 = (is_float_object(__pyx_v_loc) != 0); if (__pyx_t_1) { /* "util.pxd":31 * void* data_ptr * if is_float_object(loc): * casted = int(loc) # <<<<<<<<<<<<<< * if casted == loc: * loc = casted */ __pyx_t_2 = PyNumber_Int(__pyx_v_loc); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 31; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_v_casted = __pyx_t_2; __pyx_t_2 = 0; /* "util.pxd":32 * if is_float_object(loc): * casted = int(loc) * if casted == loc: # <<<<<<<<<<<<<< * loc = casted * i = loc */ __pyx_t_2 = PyObject_RichCompare(__pyx_v_casted, __pyx_v_loc, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 32; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 32; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_1) { /* "util.pxd":33 * casted = int(loc) * if casted == loc: * loc = casted # <<<<<<<<<<<<<< * i = loc * sz = cnp.PyArray_SIZE(arr) */ __Pyx_INCREF(__pyx_v_casted); __Pyx_DECREF_SET(__pyx_v_loc, __pyx_v_casted); goto __pyx_L4; } __pyx_L4:; goto __pyx_L3; } __pyx_L3:; /* "util.pxd":34 * if casted == loc: * loc = casted * i = loc # <<<<<<<<<<<<<< * sz = cnp.PyArray_SIZE(arr) * */ __pyx_t_3 = __Pyx_PyIndex_AsSsize_t(__pyx_v_loc); if (unlikely((__pyx_t_3 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 34; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_i = ((Py_ssize_t)__pyx_t_3); /* "util.pxd":35 * loc = casted * i = loc * sz = cnp.PyArray_SIZE(arr) # <<<<<<<<<<<<<< * * if i < 0 and sz > 0: */ __pyx_v_sz = PyArray_SIZE(__pyx_v_arr); /* "util.pxd":37 * sz = cnp.PyArray_SIZE(arr) * * if i < 0 and sz > 0: # <<<<<<<<<<<<<< * i += sz * elif i >= sz or sz == 0: */ __pyx_t_1 = ((__pyx_v_i < 0) != 0); if (__pyx_t_1) { __pyx_t_4 = ((__pyx_v_sz > 0) != 0); __pyx_t_5 = __pyx_t_4; } else { __pyx_t_5 = __pyx_t_1; } if (__pyx_t_5) { /* "util.pxd":38 * * if i < 0 and sz > 0: * i += sz # <<<<<<<<<<<<<< * elif i >= sz or sz == 0: * raise IndexError('index out of bounds') */ __pyx_v_i = (__pyx_v_i + __pyx_v_sz); goto __pyx_L5; } /* "util.pxd":39 * if i < 0 and sz > 0: * i += sz * elif i >= sz or sz == 0: # <<<<<<<<<<<<<< * raise IndexError('index out of bounds') * */ __pyx_t_5 = ((__pyx_v_i >= __pyx_v_sz) != 0); if (!__pyx_t_5) { __pyx_t_1 = ((__pyx_v_sz == 0) != 0); __pyx_t_4 = __pyx_t_1; } else { __pyx_t_4 = __pyx_t_5; } if (__pyx_t_4) { /* "util.pxd":40 * i += sz * elif i >= sz or sz == 0: * raise IndexError('index out of bounds') # <<<<<<<<<<<<<< * * return get_value_1d(arr, i) */ __pyx_t_2 = PyObject_Call(__pyx_builtin_IndexError, __pyx_tuple__38, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 40; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 40; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_L5:; /* "util.pxd":42 * raise IndexError('index out of bounds') * * return get_value_1d(arr, i) # <<<<<<<<<<<<<< * * cdef inline set_value_at(ndarray arr, object loc, object value): */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = get_value_1d(__pyx_v_arr, __pyx_v_i); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 42; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "util.pxd":26 * object sarr_from_data(cnp.dtype, int length, void* data) * * cdef inline object get_value_at(ndarray arr, object loc): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, sz */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("util.get_value_at", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_casted); __Pyx_XDECREF(__pyx_v_loc); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "util.pxd":44 * return get_value_1d(arr, i) * * cdef inline set_value_at(ndarray arr, object loc, object value): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, sz */ static CYTHON_INLINE PyObject *__pyx_f_4util_set_value_at(PyArrayObject *__pyx_v_arr, PyObject *__pyx_v_loc, PyObject *__pyx_v_value) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_sz; PyObject *__pyx_v_casted = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; Py_ssize_t __pyx_t_3; int __pyx_t_4; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("set_value_at", 0); __Pyx_INCREF(__pyx_v_loc); /* "util.pxd":47 * cdef: * Py_ssize_t i, sz * if is_float_object(loc): # <<<<<<<<<<<<<< * casted = int(loc) * if casted == loc: */ __pyx_t_1 = (is_float_object(__pyx_v_loc) != 0); if (__pyx_t_1) { /* "util.pxd":48 * Py_ssize_t i, sz * if is_float_object(loc): * casted = int(loc) # <<<<<<<<<<<<<< * if casted == loc: * loc = casted */ __pyx_t_2 = PyNumber_Int(__pyx_v_loc); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_v_casted = __pyx_t_2; __pyx_t_2 = 0; /* "util.pxd":49 * if is_float_object(loc): * casted = int(loc) * if casted == loc: # <<<<<<<<<<<<<< * loc = casted * i = loc */ __pyx_t_2 = PyObject_RichCompare(__pyx_v_casted, __pyx_v_loc, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_1) { /* "util.pxd":50 * casted = int(loc) * if casted == loc: * loc = casted # <<<<<<<<<<<<<< * i = loc * sz = cnp.PyArray_SIZE(arr) */ __Pyx_INCREF(__pyx_v_casted); __Pyx_DECREF_SET(__pyx_v_loc, __pyx_v_casted); goto __pyx_L4; } __pyx_L4:; goto __pyx_L3; } __pyx_L3:; /* "util.pxd":51 * if casted == loc: * loc = casted * i = loc # <<<<<<<<<<<<<< * sz = cnp.PyArray_SIZE(arr) * */ __pyx_t_3 = __Pyx_PyIndex_AsSsize_t(__pyx_v_loc); if (unlikely((__pyx_t_3 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_i = ((Py_ssize_t)__pyx_t_3); /* "util.pxd":52 * loc = casted * i = loc * sz = cnp.PyArray_SIZE(arr) # <<<<<<<<<<<<<< * * if i < 0: */ __pyx_v_sz = PyArray_SIZE(__pyx_v_arr); /* "util.pxd":54 * sz = cnp.PyArray_SIZE(arr) * * if i < 0: # <<<<<<<<<<<<<< * i += sz * elif i >= sz: */ __pyx_t_1 = ((__pyx_v_i < 0) != 0); if (__pyx_t_1) { /* "util.pxd":55 * * if i < 0: * i += sz # <<<<<<<<<<<<<< * elif i >= sz: * raise IndexError('index out of bounds') */ __pyx_v_i = (__pyx_v_i + __pyx_v_sz); goto __pyx_L5; } /* "util.pxd":56 * if i < 0: * i += sz * elif i >= sz: # <<<<<<<<<<<<<< * raise IndexError('index out of bounds') * */ __pyx_t_1 = ((__pyx_v_i >= __pyx_v_sz) != 0); if (__pyx_t_1) { /* "util.pxd":57 * i += sz * elif i >= sz: * raise IndexError('index out of bounds') # <<<<<<<<<<<<<< * * assign_value_1d(arr, i, value) */ __pyx_t_2 = PyObject_Call(__pyx_builtin_IndexError, __pyx_tuple__39, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 57; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 57; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_L5:; /* "util.pxd":59 * raise IndexError('index out of bounds') * * assign_value_1d(arr, i, value) # <<<<<<<<<<<<<< * * cdef inline int is_contiguous(ndarray arr): */ __pyx_t_4 = assign_value_1d(__pyx_v_arr, __pyx_v_i, __pyx_v_value); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 59; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "util.pxd":44 * return get_value_1d(arr, i) * * cdef inline set_value_at(ndarray arr, object loc, object value): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, sz */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("util.set_value_at", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_casted); __Pyx_XDECREF(__pyx_v_loc); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "util.pxd":61 * assign_value_1d(arr, i, value) * * cdef inline int is_contiguous(ndarray arr): # <<<<<<<<<<<<<< * return cnp.PyArray_CHKFLAGS(arr, cnp.NPY_C_CONTIGUOUS) * */ static CYTHON_INLINE int __pyx_f_4util_is_contiguous(PyArrayObject *__pyx_v_arr) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("is_contiguous", 0); /* "util.pxd":62 * * cdef inline int is_contiguous(ndarray arr): * return cnp.PyArray_CHKFLAGS(arr, cnp.NPY_C_CONTIGUOUS) # <<<<<<<<<<<<<< * * cdef inline is_array(object o): */ __pyx_r = PyArray_CHKFLAGS(__pyx_v_arr, NPY_C_CONTIGUOUS); goto __pyx_L0; /* "util.pxd":61 * assign_value_1d(arr, i, value) * * cdef inline int is_contiguous(ndarray arr): # <<<<<<<<<<<<<< * return cnp.PyArray_CHKFLAGS(arr, cnp.NPY_C_CONTIGUOUS) * */ /* function exit code */ __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "util.pxd":64 * return cnp.PyArray_CHKFLAGS(arr, cnp.NPY_C_CONTIGUOUS) * * cdef inline is_array(object o): # <<<<<<<<<<<<<< * return cnp.PyArray_Check(o) * */ static CYTHON_INLINE PyObject *__pyx_f_4util_is_array(PyObject *__pyx_v_o) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("is_array", 0); /* "util.pxd":65 * * cdef inline is_array(object o): * return cnp.PyArray_Check(o) # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyBool_FromLong(PyArray_Check(__pyx_v_o)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 65; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "util.pxd":64 * return cnp.PyArray_CHKFLAGS(arr, cnp.NPY_C_CONTIGUOUS) * * cdef inline is_array(object o): # <<<<<<<<<<<<<< * return cnp.PyArray_Check(o) * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("util.is_array", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "util.pxd":68 * * * cdef inline bint _checknull(object val): # <<<<<<<<<<<<<< * try: * return val is None or (cpython.PyFloat_Check(val) and val != val) */ static CYTHON_INLINE int __pyx_f_4util__checknull(PyObject *__pyx_v_val) { 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; int __pyx_t_9; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_checknull", 0); /* "util.pxd":69 * * cdef inline bint _checknull(object val): * try: # <<<<<<<<<<<<<< * return val is None or (cpython.PyFloat_Check(val) and val != val) * except ValueError: */ { __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:*/ { /* "util.pxd":70 * cdef inline bint _checknull(object val): * try: * return val is None or (cpython.PyFloat_Check(val) and val != val) # <<<<<<<<<<<<<< * except ValueError: * return False */ __pyx_t_4 = (__pyx_v_val == Py_None); __pyx_t_5 = __Pyx_PyBool_FromLong(__pyx_t_4); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L3_error;} if (!__pyx_t_4) { __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_6 = __Pyx_PyBool_FromLong(PyFloat_Check(__pyx_v_val)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L3_error;} if (__pyx_t_4) { __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_7 = PyObject_RichCompare(__pyx_v_val, __pyx_v_val, Py_NE); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_t_8 = __pyx_t_7; __pyx_t_7 = 0; } else { __pyx_t_8 = __pyx_t_6; __pyx_t_6 = 0; } __pyx_t_6 = __pyx_t_8; __pyx_t_8 = 0; } else { __pyx_t_6 = __pyx_t_5; __pyx_t_5 = 0; } __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_r = __pyx_t_4; goto __pyx_L7_try_return; } __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L10_try_end; __pyx_L3_error:; __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; /* "util.pxd":71 * try: * return val is None or (cpython.PyFloat_Check(val) and val != val) * except ValueError: # <<<<<<<<<<<<<< * return False * */ __pyx_t_9 = PyErr_ExceptionMatches(__pyx_builtin_ValueError); if (__pyx_t_9) { __Pyx_AddTraceback("util._checknull", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_5, &__pyx_t_8) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 71; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_GOTREF(__pyx_t_5); __Pyx_GOTREF(__pyx_t_8); /* "util.pxd":72 * return val is None or (cpython.PyFloat_Check(val) and val != val) * except ValueError: * return False # <<<<<<<<<<<<<< * * cdef inline bint _checknull_old(object val): */ __pyx_r = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; goto __pyx_L6_except_return; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; goto __pyx_L4_exception_handled; } goto __pyx_L5_except_error; __pyx_L5_except_error:; __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); goto __pyx_L1_error; __pyx_L7_try_return:; __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); goto __pyx_L0; __pyx_L6_except_return:; __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); goto __pyx_L0; __pyx_L4_exception_handled:; __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); __pyx_L10_try_end:; } /* "util.pxd":68 * * * cdef inline bint _checknull(object val): # <<<<<<<<<<<<<< * try: * return val is None or (cpython.PyFloat_Check(val) and val != val) */ /* 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_WriteUnraisable("util._checknull", __pyx_clineno, __pyx_lineno, __pyx_filename, 0); __pyx_r = 0; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "util.pxd":74 * return False * * cdef inline bint _checknull_old(object val): # <<<<<<<<<<<<<< * import numpy as np * cdef double INF = np.inf */ static CYTHON_INLINE int __pyx_f_4util__checknull_old(PyObject *__pyx_v_val) { PyObject *__pyx_v_np = NULL; double __pyx_v_INF; double __pyx_v_NEGINF; int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; double __pyx_t_2; 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; int __pyx_t_9; int __pyx_t_10; int __pyx_t_11; int __pyx_t_12; PyObject *__pyx_t_13 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_checknull_old", 0); /* "util.pxd":75 * * cdef inline bint _checknull_old(object val): * import numpy as np # <<<<<<<<<<<<<< * cdef double INF = np.inf * cdef double NEGINF = -INF */ __pyx_t_1 = __Pyx_Import(__pyx_n_s_numpy, 0, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 75; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_v_np = __pyx_t_1; __pyx_t_1 = 0; /* "util.pxd":76 * cdef inline bint _checknull_old(object val): * import numpy as np * cdef double INF = np.inf # <<<<<<<<<<<<<< * cdef double NEGINF = -INF * try: */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_np, __pyx_n_s_inf); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 76; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __pyx_PyFloat_AsDouble(__pyx_t_1); if (unlikely((__pyx_t_2 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 76; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_INF = ((double)__pyx_t_2); /* "util.pxd":77 * import numpy as np * cdef double INF = np.inf * cdef double NEGINF = -INF # <<<<<<<<<<<<<< * try: * return bool(val is None or val != val and val != INF */ __pyx_v_NEGINF = (-__pyx_v_INF); /* "util.pxd":78 * cdef double INF = np.inf * cdef double NEGINF = -INF * try: # <<<<<<<<<<<<<< * return bool(val is None or val != val and val != INF * and val != NEGINF) */ { __Pyx_ExceptionSave(&__pyx_t_3, &__pyx_t_4, &__pyx_t_5); __Pyx_XGOTREF(__pyx_t_3); __Pyx_XGOTREF(__pyx_t_4); __Pyx_XGOTREF(__pyx_t_5); /*try:*/ { /* "util.pxd":79 * cdef double NEGINF = -INF * try: * return bool(val is None or val != val and val != INF # <<<<<<<<<<<<<< * and val != NEGINF) * except ValueError: */ __pyx_t_6 = (__pyx_v_val == Py_None); if (!__pyx_t_6) { __pyx_t_1 = PyObject_RichCompare(__pyx_v_val, __pyx_v_val, Py_NE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_7) { /* "util.pxd":80 * try: * return bool(val is None or val != val and val != INF * and val != NEGINF) # <<<<<<<<<<<<<< * except ValueError: * return False */ __pyx_t_1 = PyFloat_FromDouble(__pyx_v_INF); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 80; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_8 = PyObject_RichCompare(__pyx_v_val, __pyx_t_1, Py_NE); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "util.pxd":79 * cdef double NEGINF = -INF * try: * return bool(val is None or val != val and val != INF # <<<<<<<<<<<<<< * and val != NEGINF) * except ValueError: */ __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (__pyx_t_9) { /* "util.pxd":80 * try: * return bool(val is None or val != val and val != INF * and val != NEGINF) # <<<<<<<<<<<<<< * except ValueError: * return False */ __pyx_t_8 = PyFloat_FromDouble(__pyx_v_NEGINF); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 80; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_1 = PyObject_RichCompare(__pyx_v_val, __pyx_t_8, Py_NE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 80; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 80; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_11 = __pyx_t_10; } else { __pyx_t_11 = __pyx_t_9; } __pyx_t_9 = __pyx_t_11; } else { __pyx_t_9 = __pyx_t_7; } __pyx_t_7 = __pyx_t_9; } else { __pyx_t_7 = __pyx_t_6; } /* "util.pxd":79 * cdef double NEGINF = -INF * try: * return bool(val is None or val != val and val != INF # <<<<<<<<<<<<<< * and val != NEGINF) * except ValueError: */ __pyx_r = (!(!__pyx_t_7)); goto __pyx_L7_try_return; } __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; goto __pyx_L10_try_end; __pyx_L3_error:; __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; /* "util.pxd":81 * return bool(val is None or val != val and val != INF * and val != NEGINF) * except ValueError: # <<<<<<<<<<<<<< * return False * */ __pyx_t_12 = PyErr_ExceptionMatches(__pyx_builtin_ValueError); if (__pyx_t_12) { __Pyx_AddTraceback("util._checknull_old", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_8, &__pyx_t_13) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_GOTREF(__pyx_t_8); __Pyx_GOTREF(__pyx_t_13); /* "util.pxd":82 * and val != NEGINF) * except ValueError: * return False # <<<<<<<<<<<<<< * * cdef inline bint _checknan(object val): */ __pyx_r = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; goto __pyx_L6_except_return; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; goto __pyx_L4_exception_handled; } goto __pyx_L5_except_error; __pyx_L5_except_error:; __Pyx_XGIVEREF(__pyx_t_3); __Pyx_XGIVEREF(__pyx_t_4); __Pyx_XGIVEREF(__pyx_t_5); __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5); goto __pyx_L1_error; __pyx_L7_try_return:; __Pyx_XGIVEREF(__pyx_t_3); __Pyx_XGIVEREF(__pyx_t_4); __Pyx_XGIVEREF(__pyx_t_5); __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5); goto __pyx_L0; __pyx_L6_except_return:; __Pyx_XGIVEREF(__pyx_t_3); __Pyx_XGIVEREF(__pyx_t_4); __Pyx_XGIVEREF(__pyx_t_5); __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5); goto __pyx_L0; __pyx_L4_exception_handled:; __Pyx_XGIVEREF(__pyx_t_3); __Pyx_XGIVEREF(__pyx_t_4); __Pyx_XGIVEREF(__pyx_t_5); __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5); __pyx_L10_try_end:; } /* "util.pxd":74 * return False * * cdef inline bint _checknull_old(object val): # <<<<<<<<<<<<<< * import numpy as np * cdef double INF = np.inf */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_13); __Pyx_WriteUnraisable("util._checknull_old", __pyx_clineno, __pyx_lineno, __pyx_filename, 0); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_np); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "util.pxd":84 * return False * * cdef inline bint _checknan(object val): # <<<<<<<<<<<<<< * return not cnp.PyArray_Check(val) and val != val */ static CYTHON_INLINE int __pyx_f_4util__checknan(PyObject *__pyx_v_val) { int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_checknan", 0); /* "util.pxd":85 * * cdef inline bint _checknan(object val): * return not cnp.PyArray_Check(val) and val != val # <<<<<<<<<<<<<< */ __pyx_t_1 = __Pyx_PyBool_FromLong((!(PyArray_Check(__pyx_v_val) != 0))); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__pyx_t_2) { __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_3 = PyObject_RichCompare(__pyx_v_val, __pyx_v_val, Py_NE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_4 = __pyx_t_3; __pyx_t_3 = 0; } else { __pyx_t_4 = __pyx_t_1; __pyx_t_1 = 0; } __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_r = __pyx_t_2; goto __pyx_L0; /* "util.pxd":84 * return False * * cdef inline bint _checknan(object val): # <<<<<<<<<<<<<< * return not cnp.PyArray_Check(val) and val != val */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_WriteUnraisable("util._checknan", __pyx_clineno, __pyx_lineno, __pyx_filename, 0); __pyx_r = 0; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "numpy.pxd":196 * # 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 fullfill 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_copy_shape; 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_v_hasfields; int __pyx_r; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; int __pyx_t_5; int __pyx_t_6; int __pyx_t_7; PyObject *__pyx_t_8 = NULL; char *__pyx_t_9; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__getbuffer__", 0); if (__pyx_v_info != NULL) { __pyx_v_info->obj = Py_None; __Pyx_INCREF(Py_None); __Pyx_GIVEREF(__pyx_v_info->obj); } /* "numpy.pxd":202 * # of flags * * if info == NULL: return # <<<<<<<<<<<<<< * * cdef int copy_shape, i, ndim */ __pyx_t_1 = ((__pyx_v_info == NULL) != 0); if (__pyx_t_1) { __pyx_r = 0; goto __pyx_L0; } /* "numpy.pxd":205 * * cdef int copy_shape, i, ndim * cdef int endian_detector = 1 # <<<<<<<<<<<<<< * cdef bint little_endian = ((&endian_detector)[0] != 0) * */ __pyx_v_endian_detector = 1; /* "numpy.pxd":206 * cdef int copy_shape, 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); /* "numpy.pxd":208 * cdef bint little_endian = ((&endian_detector)[0] != 0) * * ndim = PyArray_NDIM(self) # <<<<<<<<<<<<<< * * if sizeof(npy_intp) != sizeof(Py_ssize_t): */ __pyx_v_ndim = PyArray_NDIM(__pyx_v_self); /* "numpy.pxd":210 * ndim = PyArray_NDIM(self) * * if sizeof(npy_intp) != sizeof(Py_ssize_t): # <<<<<<<<<<<<<< * copy_shape = 1 * else: */ __pyx_t_1 = (((sizeof(npy_intp)) != (sizeof(Py_ssize_t))) != 0); if (__pyx_t_1) { /* "numpy.pxd":211 * * if sizeof(npy_intp) != sizeof(Py_ssize_t): * copy_shape = 1 # <<<<<<<<<<<<<< * else: * copy_shape = 0 */ __pyx_v_copy_shape = 1; goto __pyx_L4; } /*else*/ { /* "numpy.pxd":213 * copy_shape = 1 * else: * copy_shape = 0 # <<<<<<<<<<<<<< * * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) */ __pyx_v_copy_shape = 0; } __pyx_L4:; /* "numpy.pxd":215 * copy_shape = 0 * * 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_1 = (((__pyx_v_flags & PyBUF_C_CONTIGUOUS) == PyBUF_C_CONTIGUOUS) != 0); if (__pyx_t_1) { /* "numpy.pxd":216 * * 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_3 = __pyx_t_2; } else { __pyx_t_3 = __pyx_t_1; } if (__pyx_t_3) { /* "numpy.pxd":217 * 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_4 = PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__40, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 217; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 217; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } /* "numpy.pxd":219 * 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_3 = (((__pyx_v_flags & PyBUF_F_CONTIGUOUS) == PyBUF_F_CONTIGUOUS) != 0); if (__pyx_t_3) { /* "numpy.pxd":220 * * 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_1 = ((!(PyArray_CHKFLAGS(__pyx_v_self, NPY_F_CONTIGUOUS) != 0)) != 0); __pyx_t_2 = __pyx_t_1; } else { __pyx_t_2 = __pyx_t_3; } if (__pyx_t_2) { /* "numpy.pxd":221 * 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_4 = PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__41, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 221; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 221; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } /* "numpy.pxd":223 * raise ValueError(u"ndarray is not Fortran contiguous") * * info.buf = PyArray_DATA(self) # <<<<<<<<<<<<<< * info.ndim = ndim * if copy_shape: */ __pyx_v_info->buf = PyArray_DATA(__pyx_v_self); /* "numpy.pxd":224 * * info.buf = PyArray_DATA(self) * info.ndim = ndim # <<<<<<<<<<<<<< * if copy_shape: * # Allocate new buffer for strides and shape info. */ __pyx_v_info->ndim = __pyx_v_ndim; /* "numpy.pxd":225 * info.buf = PyArray_DATA(self) * info.ndim = ndim * if copy_shape: # <<<<<<<<<<<<<< * # Allocate new buffer for strides and shape info. * # This is allocated as one block, strides first. */ __pyx_t_2 = (__pyx_v_copy_shape != 0); if (__pyx_t_2) { /* "numpy.pxd":228 * # Allocate new buffer for strides and shape info. * # This is allocated as one block, strides first. * info.strides = stdlib.malloc(sizeof(Py_ssize_t) * ndim * 2) # <<<<<<<<<<<<<< * info.shape = info.strides + ndim * for i in range(ndim): */ __pyx_v_info->strides = ((Py_ssize_t *)malloc((((sizeof(Py_ssize_t)) * ((size_t)__pyx_v_ndim)) * 2))); /* "numpy.pxd":229 * # This is allocated as one block, strides first. * info.strides = stdlib.malloc(sizeof(Py_ssize_t) * ndim * 2) * 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); /* "numpy.pxd":230 * info.strides = stdlib.malloc(sizeof(Py_ssize_t) * ndim * 2) * 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_5 = __pyx_v_ndim; for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) { __pyx_v_i = __pyx_t_6; /* "numpy.pxd":231 * 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]); /* "numpy.pxd":232 * 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]); } goto __pyx_L7; } /*else*/ { /* "numpy.pxd":234 * info.shape[i] = PyArray_DIMS(self)[i] * else: * info.strides = PyArray_STRIDES(self) # <<<<<<<<<<<<<< * info.shape = PyArray_DIMS(self) * info.suboffsets = NULL */ __pyx_v_info->strides = ((Py_ssize_t *)PyArray_STRIDES(__pyx_v_self)); /* "numpy.pxd":235 * 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_L7:; /* "numpy.pxd":236 * 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; /* "numpy.pxd":237 * 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); /* "numpy.pxd":238 * 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)); /* "numpy.pxd":241 * * cdef int t * cdef char* f = NULL # <<<<<<<<<<<<<< * cdef dtype descr = self.descr * cdef list stack */ __pyx_v_f = NULL; /* "numpy.pxd":242 * cdef int t * cdef char* f = NULL * cdef dtype descr = self.descr # <<<<<<<<<<<<<< * cdef list stack * cdef int offset */ __pyx_t_4 = ((PyObject *)__pyx_v_self->descr); __Pyx_INCREF(__pyx_t_4); __pyx_v_descr = ((PyArray_Descr *)__pyx_t_4); __pyx_t_4 = 0; /* "numpy.pxd":246 * cdef int offset * * cdef bint hasfields = PyDataType_HASFIELDS(descr) # <<<<<<<<<<<<<< * * if not hasfields and not copy_shape: */ __pyx_v_hasfields = PyDataType_HASFIELDS(__pyx_v_descr); /* "numpy.pxd":248 * cdef bint hasfields = PyDataType_HASFIELDS(descr) * * if not hasfields and not copy_shape: # <<<<<<<<<<<<<< * # do not call releasebuffer * info.obj = None */ __pyx_t_2 = ((!(__pyx_v_hasfields != 0)) != 0); if (__pyx_t_2) { __pyx_t_3 = ((!(__pyx_v_copy_shape != 0)) != 0); __pyx_t_1 = __pyx_t_3; } else { __pyx_t_1 = __pyx_t_2; } if (__pyx_t_1) { /* "numpy.pxd":250 * if not hasfields and not copy_shape: * # do not call releasebuffer * info.obj = None # <<<<<<<<<<<<<< * else: * # need to call releasebuffer */ __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_info->obj); __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = Py_None; goto __pyx_L10; } /*else*/ { /* "numpy.pxd":253 * else: * # need to call releasebuffer * info.obj = self # <<<<<<<<<<<<<< * * if not hasfields: */ __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); } __pyx_L10:; /* "numpy.pxd":255 * info.obj = self * * if not hasfields: # <<<<<<<<<<<<<< * t = descr.type_num * if ((descr.byteorder == '>' and little_endian) or */ __pyx_t_1 = ((!(__pyx_v_hasfields != 0)) != 0); if (__pyx_t_1) { /* "numpy.pxd":256 * * if not hasfields: * t = descr.type_num # <<<<<<<<<<<<<< * if ((descr.byteorder == '>' and little_endian) or * (descr.byteorder == '<' and not little_endian)): */ __pyx_t_5 = __pyx_v_descr->type_num; __pyx_v_t = __pyx_t_5; /* "numpy.pxd":257 * if not hasfields: * t = descr.type_num * if ((descr.byteorder == '>' and little_endian) or # <<<<<<<<<<<<<< * (descr.byteorder == '<' and not little_endian)): * raise ValueError(u"Non-native byte order not supported") */ __pyx_t_1 = ((__pyx_v_descr->byteorder == '>') != 0); if (__pyx_t_1) { __pyx_t_2 = (__pyx_v_little_endian != 0); } else { __pyx_t_2 = __pyx_t_1; } if (!__pyx_t_2) { /* "numpy.pxd":258 * t = descr.type_num * if ((descr.byteorder == '>' and little_endian) or * (descr.byteorder == '<' and not little_endian)): # <<<<<<<<<<<<<< * raise ValueError(u"Non-native byte order not supported") * if t == NPY_BYTE: f = "b" */ __pyx_t_1 = ((__pyx_v_descr->byteorder == '<') != 0); if (__pyx_t_1) { __pyx_t_3 = ((!(__pyx_v_little_endian != 0)) != 0); __pyx_t_7 = __pyx_t_3; } else { __pyx_t_7 = __pyx_t_1; } __pyx_t_1 = __pyx_t_7; } else { __pyx_t_1 = __pyx_t_2; } if (__pyx_t_1) { /* "numpy.pxd":259 * if ((descr.byteorder == '>' and little_endian) or * (descr.byteorder == '<' 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_4 = PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__42, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 259; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 259; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } /* "numpy.pxd":276 * 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) */ switch (__pyx_v_t) { /* "numpy.pxd":260 * (descr.byteorder == '<' 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" */ case NPY_BYTE: __pyx_v_f = __pyx_k_b; break; /* "numpy.pxd":261 * 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 = __pyx_k_B; break; /* "numpy.pxd":262 * 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 = __pyx_k_h; break; /* "numpy.pxd":263 * 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 = __pyx_k_H; break; /* "numpy.pxd":264 * 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 = __pyx_k_i; break; /* "numpy.pxd":265 * 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 = __pyx_k_I; break; /* "numpy.pxd":266 * 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 = __pyx_k_l; break; /* "numpy.pxd":267 * 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 = __pyx_k_L; break; /* "numpy.pxd":268 * 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 = __pyx_k_q; break; /* "numpy.pxd":269 * 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 = __pyx_k_Q; break; /* "numpy.pxd":270 * 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 = __pyx_k_f; break; /* "numpy.pxd":271 * 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 = __pyx_k_d_2; break; /* "numpy.pxd":272 * 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 = __pyx_k_g; break; /* "numpy.pxd":273 * 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 = __pyx_k_Zf; break; /* "numpy.pxd":274 * 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 = __pyx_k_Zd; break; /* "numpy.pxd":275 * 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 = __pyx_k_Zg; break; /* "numpy.pxd":276 * 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 = __pyx_k_O; break; default: /* "numpy.pxd":278 * elif t == NPY_OBJECT: f = "O" * else: * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) # <<<<<<<<<<<<<< * info.format = f * return */ __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_t); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 278; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_8 = PyUnicode_Format(__pyx_kp_u_unknown_dtype_code_in_numpy_pxd, __pyx_t_4); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 278; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 278; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_8); __Pyx_GIVEREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_8 = PyObject_Call(__pyx_builtin_ValueError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 278; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_Raise(__pyx_t_8, 0, 0, 0); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; {__pyx_filename = __pyx_f[2]; __pyx_lineno = 278; __pyx_clineno = __LINE__; goto __pyx_L1_error;} break; } /* "numpy.pxd":279 * else: * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) * info.format = f # <<<<<<<<<<<<<< * return * else: */ __pyx_v_info->format = __pyx_v_f; /* "numpy.pxd":280 * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) * info.format = f * return # <<<<<<<<<<<<<< * else: * info.format = stdlib.malloc(_buffer_format_string_len) */ __pyx_r = 0; goto __pyx_L0; } /*else*/ { /* "numpy.pxd":282 * return * else: * info.format = stdlib.malloc(_buffer_format_string_len) # <<<<<<<<<<<<<< * info.format[0] = '^' # Native data types, manual alignment * offset = 0 */ __pyx_v_info->format = ((char *)malloc(255)); /* "numpy.pxd":283 * else: * info.format = stdlib.malloc(_buffer_format_string_len) * info.format[0] = '^' # Native data types, manual alignment # <<<<<<<<<<<<<< * offset = 0 * f = _util_dtypestring(descr, info.format + 1, */ (__pyx_v_info->format[0]) = '^'; /* "numpy.pxd":284 * info.format = stdlib.malloc(_buffer_format_string_len) * info.format[0] = '^' # Native data types, manual alignment * offset = 0 # <<<<<<<<<<<<<< * f = _util_dtypestring(descr, info.format + 1, * info.format + _buffer_format_string_len, */ __pyx_v_offset = 0; /* "numpy.pxd":285 * info.format[0] = '^' # Native data types, manual alignment * offset = 0 * f = _util_dtypestring(descr, info.format + 1, # <<<<<<<<<<<<<< * info.format + _buffer_format_string_len, * &offset) */ __pyx_t_9 = __pyx_f_5numpy__util_dtypestring(__pyx_v_descr, (__pyx_v_info->format + 1), (__pyx_v_info->format + 255), (&__pyx_v_offset)); if (unlikely(__pyx_t_9 == NULL)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 285; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_f = __pyx_t_9; /* "numpy.pxd":288 * info.format + _buffer_format_string_len, * &offset) * f[0] = 0 # Terminate format string # <<<<<<<<<<<<<< * * def __releasebuffer__(ndarray self, Py_buffer* info): */ (__pyx_v_f[0]) = 0; } /* "numpy.pxd":196 * # 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 fullfill the PEP. */ /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_8); __Pyx_AddTraceback("numpy.ndarray.__getbuffer__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; if (__pyx_v_info != NULL && __pyx_v_info->obj != NULL) { __Pyx_GOTREF(__pyx_v_info->obj); __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = NULL; } goto __pyx_L2; __pyx_L0:; if (__pyx_v_info != NULL && __pyx_v_info->obj == Py_None) { __Pyx_GOTREF(Py_None); __Pyx_DECREF(Py_None); __pyx_v_info->obj = NULL; } __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_descr); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "numpy.pxd":290 * f[0] = 0 # Terminate format string * * def __releasebuffer__(ndarray self, Py_buffer* info): # <<<<<<<<<<<<<< * if PyArray_HASFIELDS(self): * stdlib.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); /* "numpy.pxd":291 * * def __releasebuffer__(ndarray self, Py_buffer* info): * if PyArray_HASFIELDS(self): # <<<<<<<<<<<<<< * stdlib.free(info.format) * if sizeof(npy_intp) != sizeof(Py_ssize_t): */ __pyx_t_1 = (PyArray_HASFIELDS(__pyx_v_self) != 0); if (__pyx_t_1) { /* "numpy.pxd":292 * def __releasebuffer__(ndarray self, Py_buffer* info): * if PyArray_HASFIELDS(self): * stdlib.free(info.format) # <<<<<<<<<<<<<< * if sizeof(npy_intp) != sizeof(Py_ssize_t): * stdlib.free(info.strides) */ free(__pyx_v_info->format); goto __pyx_L3; } __pyx_L3:; /* "numpy.pxd":293 * if PyArray_HASFIELDS(self): * stdlib.free(info.format) * if sizeof(npy_intp) != sizeof(Py_ssize_t): # <<<<<<<<<<<<<< * stdlib.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) { /* "numpy.pxd":294 * stdlib.free(info.format) * if sizeof(npy_intp) != sizeof(Py_ssize_t): * stdlib.free(info.strides) # <<<<<<<<<<<<<< * # info.shape was stored after info.strides in the same block * */ free(__pyx_v_info->strides); goto __pyx_L4; } __pyx_L4:; /* "numpy.pxd":290 * f[0] = 0 # Terminate format string * * def __releasebuffer__(ndarray self, Py_buffer* info): # <<<<<<<<<<<<<< * if PyArray_HASFIELDS(self): * stdlib.free(info.format) */ /* function exit code */ __Pyx_RefNannyFinishContext(); } /* "numpy.pxd":772 * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PyArray_MultiIterNew1", 0); /* "numpy.pxd":773 * * 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_filename = __pyx_f[2]; __pyx_lineno = 773; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "numpy.pxd":772 * 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; } /* "numpy.pxd":775 * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PyArray_MultiIterNew2", 0); /* "numpy.pxd":776 * * 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_filename = __pyx_f[2]; __pyx_lineno = 776; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "numpy.pxd":775 * 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; } /* "numpy.pxd":778 * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PyArray_MultiIterNew3", 0); /* "numpy.pxd":779 * * 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_filename = __pyx_f[2]; __pyx_lineno = 779; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "numpy.pxd":778 * 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; } /* "numpy.pxd":781 * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PyArray_MultiIterNew4", 0); /* "numpy.pxd":782 * * 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_filename = __pyx_f[2]; __pyx_lineno = 782; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "numpy.pxd":781 * 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; } /* "numpy.pxd":784 * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PyArray_MultiIterNew5", 0); /* "numpy.pxd":785 * * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): * return PyArray_MultiIterNew(5, a, b, c, d, e) # <<<<<<<<<<<<<< * * cdef inline char* _util_dtypestring(dtype descr, char* f, char* end, int* offset) except NULL: */ __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_filename = __pyx_f[2]; __pyx_lineno = 785; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "numpy.pxd":784 * 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; } /* "numpy.pxd":787 * return PyArray_MultiIterNew(5, a, b, c, d, e) * * 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; PyObject *__pyx_t_5 = NULL; int __pyx_t_6; int __pyx_t_7; int __pyx_t_8; int __pyx_t_9; long __pyx_t_10; char *__pyx_t_11; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_util_dtypestring", 0); /* "numpy.pxd":794 * cdef int delta_offset * cdef tuple i * cdef int endian_detector = 1 # <<<<<<<<<<<<<< * cdef bint little_endian = ((&endian_detector)[0] != 0) * cdef tuple fields */ __pyx_v_endian_detector = 1; /* "numpy.pxd":795 * cdef tuple i * 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); /* "numpy.pxd":798 * 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_filename = __pyx_f[2]; __pyx_lineno = 798; __pyx_clineno = __LINE__; goto __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_COMPILING_IN_CPYTHON __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_filename = __pyx_f[2]; __pyx_lineno = 798; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 798; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif __Pyx_XDECREF_SET(__pyx_v_childname, __pyx_t_3); __pyx_t_3 = 0; /* "numpy.pxd":799 * * for childname in descr.names: * fields = descr.fields[childname] # <<<<<<<<<<<<<< * child, new_offset = fields * */ __pyx_t_3 = PyObject_GetItem(__pyx_v_descr->fields, __pyx_v_childname); if (unlikely(__pyx_t_3 == NULL)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 799; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 799; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_XDECREF_SET(__pyx_v_fields, ((PyObject*)__pyx_t_3)); __pyx_t_3 = 0; /* "numpy.pxd":800 * 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; #if CYTHON_COMPILING_IN_CPYTHON Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 800; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON __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_filename = __pyx_f[2]; __pyx_lineno = 800; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 800; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); #endif } else { __Pyx_RaiseNoneNotIterableError(); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 800; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_dtype))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 800; __pyx_clineno = __LINE__; goto __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; /* "numpy.pxd":802 * 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_ptrdiff_t((__pyx_v_end - __pyx_v_f)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 802; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = __Pyx_PyInt_From_int((__pyx_v_offset[0])); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 802; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = PyNumber_Subtract(__pyx_v_new_offset, __pyx_t_3); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 802; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyNumber_Subtract(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 802; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyObject_RichCompare(__pyx_t_3, __pyx_int_15, Py_LT); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 802; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 802; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_6) { /* "numpy.pxd":803 * * if (end - f) - (new_offset - offset[0]) < 15: * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") # <<<<<<<<<<<<<< * * if ((child.byteorder == '>' and little_endian) or */ __pyx_t_5 = PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__43, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 803; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_Raise(__pyx_t_5, 0, 0, 0); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; {__pyx_filename = __pyx_f[2]; __pyx_lineno = 803; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } /* "numpy.pxd":805 * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") * * if ((child.byteorder == '>' and little_endian) or # <<<<<<<<<<<<<< * (child.byteorder == '<' and not little_endian)): * raise ValueError(u"Non-native byte order not supported") */ __pyx_t_6 = ((__pyx_v_child->byteorder == '>') != 0); if (__pyx_t_6) { __pyx_t_7 = (__pyx_v_little_endian != 0); } else { __pyx_t_7 = __pyx_t_6; } if (!__pyx_t_7) { /* "numpy.pxd":806 * * if ((child.byteorder == '>' and little_endian) or * (child.byteorder == '<' 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_6 = ((__pyx_v_child->byteorder == '<') != 0); if (__pyx_t_6) { __pyx_t_8 = ((!(__pyx_v_little_endian != 0)) != 0); __pyx_t_9 = __pyx_t_8; } else { __pyx_t_9 = __pyx_t_6; } __pyx_t_6 = __pyx_t_9; } else { __pyx_t_6 = __pyx_t_7; } if (__pyx_t_6) { /* "numpy.pxd":807 * if ((child.byteorder == '>' and little_endian) or * (child.byteorder == '<' 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_5 = PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__44, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 807; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_Raise(__pyx_t_5, 0, 0, 0); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; {__pyx_filename = __pyx_f[2]; __pyx_lineno = 807; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } /* "numpy.pxd":817 * * # Output padding bytes * while offset[0] < new_offset: # <<<<<<<<<<<<<< * f[0] = 120 # "x"; pad byte * f += 1 */ while (1) { __pyx_t_5 = __Pyx_PyInt_From_int((__pyx_v_offset[0])); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 817; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = PyObject_RichCompare(__pyx_t_5, __pyx_v_new_offset, Py_LT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 817; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 817; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (!__pyx_t_6) break; /* "numpy.pxd":818 * # Output padding bytes * while offset[0] < new_offset: * f[0] = 120 # "x"; pad byte # <<<<<<<<<<<<<< * f += 1 * offset[0] += 1 */ (__pyx_v_f[0]) = 120; /* "numpy.pxd":819 * while offset[0] < new_offset: * f[0] = 120 # "x"; pad byte * f += 1 # <<<<<<<<<<<<<< * offset[0] += 1 * */ __pyx_v_f = (__pyx_v_f + 1); /* "numpy.pxd":820 * f[0] = 120 # "x"; pad byte * f += 1 * offset[0] += 1 # <<<<<<<<<<<<<< * * offset[0] += child.itemsize */ __pyx_t_10 = 0; (__pyx_v_offset[__pyx_t_10]) = ((__pyx_v_offset[__pyx_t_10]) + 1); } /* "numpy.pxd":822 * offset[0] += 1 * * offset[0] += child.itemsize # <<<<<<<<<<<<<< * * if not PyDataType_HASFIELDS(child): */ __pyx_t_10 = 0; (__pyx_v_offset[__pyx_t_10]) = ((__pyx_v_offset[__pyx_t_10]) + __pyx_v_child->elsize); /* "numpy.pxd":824 * 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) { /* "numpy.pxd":825 * * if not PyDataType_HASFIELDS(child): * t = child.type_num # <<<<<<<<<<<<<< * if end - f < 5: * raise RuntimeError(u"Format string allocated too short.") */ __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_child->type_num); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 825; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_XDECREF_SET(__pyx_v_t, __pyx_t_3); __pyx_t_3 = 0; /* "numpy.pxd":826 * 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 (__pyx_t_6) { /* "numpy.pxd":827 * 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_3 = PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__45, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 827; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 827; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } /* "numpy.pxd":830 * * # 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_3 = PyInt_FromLong(NPY_BYTE); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 830; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 830; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 830; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_6) { (__pyx_v_f[0]) = 98; goto __pyx_L11; } /* "numpy.pxd":831 * # 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_5 = PyInt_FromLong(NPY_UBYTE); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 831; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 831; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 831; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_6) { (__pyx_v_f[0]) = 66; goto __pyx_L11; } /* "numpy.pxd":832 * 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_3 = PyInt_FromLong(NPY_SHORT); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 832; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 832; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 832; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_6) { (__pyx_v_f[0]) = 104; goto __pyx_L11; } /* "numpy.pxd":833 * 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_5 = PyInt_FromLong(NPY_USHORT); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 833; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 833; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 833; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_6) { (__pyx_v_f[0]) = 72; goto __pyx_L11; } /* "numpy.pxd":834 * 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_3 = PyInt_FromLong(NPY_INT); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 834; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 834; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 834; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_6) { (__pyx_v_f[0]) = 105; goto __pyx_L11; } /* "numpy.pxd":835 * 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_5 = PyInt_FromLong(NPY_UINT); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 835; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 835; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 835; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_6) { (__pyx_v_f[0]) = 73; goto __pyx_L11; } /* "numpy.pxd":836 * 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_3 = PyInt_FromLong(NPY_LONG); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 836; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 836; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 836; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_6) { (__pyx_v_f[0]) = 108; goto __pyx_L11; } /* "numpy.pxd":837 * 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_5 = PyInt_FromLong(NPY_ULONG); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 837; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 837; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 837; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_6) { (__pyx_v_f[0]) = 76; goto __pyx_L11; } /* "numpy.pxd":838 * 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_3 = PyInt_FromLong(NPY_LONGLONG); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 838; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 838; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 838; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_6) { (__pyx_v_f[0]) = 113; goto __pyx_L11; } /* "numpy.pxd":839 * 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_5 = PyInt_FromLong(NPY_ULONGLONG); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 839; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 839; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 839; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_6) { (__pyx_v_f[0]) = 81; goto __pyx_L11; } /* "numpy.pxd":840 * 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_3 = PyInt_FromLong(NPY_FLOAT); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 840; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 840; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 840; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_6) { (__pyx_v_f[0]) = 102; goto __pyx_L11; } /* "numpy.pxd":841 * 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_5 = PyInt_FromLong(NPY_DOUBLE); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 841; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 841; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 841; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_6) { (__pyx_v_f[0]) = 100; goto __pyx_L11; } /* "numpy.pxd":842 * 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_3 = PyInt_FromLong(NPY_LONGDOUBLE); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 842; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 842; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 842; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_6) { (__pyx_v_f[0]) = 103; goto __pyx_L11; } /* "numpy.pxd":843 * 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_5 = PyInt_FromLong(NPY_CFLOAT); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 843; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 843; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 843; __pyx_clineno = __LINE__; goto __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]) = 102; __pyx_v_f = (__pyx_v_f + 1); goto __pyx_L11; } /* "numpy.pxd":844 * 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_3 = PyInt_FromLong(NPY_CDOUBLE); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 844; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 844; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 844; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_6) { (__pyx_v_f[0]) = 90; (__pyx_v_f[1]) = 100; __pyx_v_f = (__pyx_v_f + 1); goto __pyx_L11; } /* "numpy.pxd":845 * 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_5 = PyInt_FromLong(NPY_CLONGDOUBLE); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 845; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 845; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 845; __pyx_clineno = __LINE__; goto __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]) = 103; __pyx_v_f = (__pyx_v_f + 1); goto __pyx_L11; } /* "numpy.pxd":846 * 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_3 = PyInt_FromLong(NPY_OBJECT); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 846; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 846; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 846; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_6) { (__pyx_v_f[0]) = 79; goto __pyx_L11; } /*else*/ { /* "numpy.pxd":848 * elif t == NPY_OBJECT: f[0] = 79 #"O" * else: * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) # <<<<<<<<<<<<<< * f += 1 * else: */ __pyx_t_5 = PyUnicode_Format(__pyx_kp_u_unknown_dtype_code_in_numpy_pxd, __pyx_v_t); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 848; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 848; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyObject_Call(__pyx_builtin_ValueError, __pyx_t_3, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 848; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_Raise(__pyx_t_5, 0, 0, 0); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; {__pyx_filename = __pyx_f[2]; __pyx_lineno = 848; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_L11:; /* "numpy.pxd":849 * 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); goto __pyx_L9; } /*else*/ { /* "numpy.pxd":853 * # Cython ignores struct boundary information ("T{...}"), * # so don't output it * f = _util_dtypestring(child, f, end, offset) # <<<<<<<<<<<<<< * return f * */ __pyx_t_11 = __pyx_f_5numpy__util_dtypestring(__pyx_v_child, __pyx_v_f, __pyx_v_end, __pyx_v_offset); if (unlikely(__pyx_t_11 == NULL)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 853; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_f = __pyx_t_11; } __pyx_L9:; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "numpy.pxd":854 * # so don't output it * f = _util_dtypestring(child, f, end, offset) * return f # <<<<<<<<<<<<<< * * */ __pyx_r = __pyx_v_f; goto __pyx_L0; /* "numpy.pxd":787 * return PyArray_MultiIterNew(5, a, b, c, d, e) * * 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_XDECREF(__pyx_t_5); __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; } /* "numpy.pxd":969 * * * 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); /* "numpy.pxd":971 * 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) { /* "numpy.pxd":972 * cdef PyObject* baseptr * if base is None: * baseptr = NULL # <<<<<<<<<<<<<< * else: * Py_INCREF(base) # important to do this before decref below! */ __pyx_v_baseptr = NULL; goto __pyx_L3; } /*else*/ { /* "numpy.pxd":974 * baseptr = NULL * else: * Py_INCREF(base) # important to do this before decref below! # <<<<<<<<<<<<<< * baseptr = base * Py_XDECREF(arr.base) */ Py_INCREF(__pyx_v_base); /* "numpy.pxd":975 * 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:; /* "numpy.pxd":976 * 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); /* "numpy.pxd":977 * baseptr = base * Py_XDECREF(arr.base) * arr.base = baseptr # <<<<<<<<<<<<<< * * cdef inline object get_array_base(ndarray arr): */ __pyx_v_arr->base = __pyx_v_baseptr; /* "numpy.pxd":969 * * * cdef inline void set_array_base(ndarray arr, object base): # <<<<<<<<<<<<<< * cdef PyObject* baseptr * if base is None: */ /* function exit code */ __Pyx_RefNannyFinishContext(); } /* "numpy.pxd":979 * 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); /* "numpy.pxd":980 * * 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) { /* "numpy.pxd":981 * cdef inline object get_array_base(ndarray arr): * if arr.base is NULL: * return None # <<<<<<<<<<<<<< * else: * return arr.base */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(Py_None); __pyx_r = Py_None; goto __pyx_L0; } /*else*/ { /* "numpy.pxd":983 * return None * else: * return arr.base # <<<<<<<<<<<<<< */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_arr->base)); __pyx_r = ((PyObject *)__pyx_v_arr->base); goto __pyx_L0; } /* "numpy.pxd":979 * 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; } static struct __pyx_vtabstruct_6pandas_6parser_TextReader __pyx_vtable_6pandas_6parser_TextReader; static PyObject *__pyx_tp_new_6pandas_6parser_TextReader(PyTypeObject *t, PyObject *a, PyObject *k) { struct __pyx_obj_6pandas_6parser_TextReader *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_6parser_TextReader *)o); p->__pyx_vtab = __pyx_vtabptr_6pandas_6parser_TextReader; p->file_handle = Py_None; Py_INCREF(Py_None); p->na_fvalues = Py_None; Py_INCREF(Py_None); p->clocks = ((PyObject*)Py_None); Py_INCREF(Py_None); p->allow_leading_cols = Py_None; Py_INCREF(Py_None); p->delimiter = Py_None; Py_INCREF(Py_None); p->converters = Py_None; Py_INCREF(Py_None); p->delim_whitespace = Py_None; Py_INCREF(Py_None); p->na_values = Py_None; Py_INCREF(Py_None); p->true_values = Py_None; Py_INCREF(Py_None); p->false_values = Py_None; Py_INCREF(Py_None); p->memory_map = Py_None; Py_INCREF(Py_None); p->as_recarray = Py_None; Py_INCREF(Py_None); p->header = Py_None; Py_INCREF(Py_None); p->orig_header = Py_None; Py_INCREF(Py_None); p->names = Py_None; Py_INCREF(Py_None); p->header_start = Py_None; Py_INCREF(Py_None); p->header_end = Py_None; Py_INCREF(Py_None); p->index_col = Py_None; Py_INCREF(Py_None); p->low_memory = Py_None; Py_INCREF(Py_None); p->skiprows = Py_None; Py_INCREF(Py_None); p->compact_ints = Py_None; Py_INCREF(Py_None); p->use_unsigned = Py_None; Py_INCREF(Py_None); p->dtype = Py_None; Py_INCREF(Py_None); p->encoding = Py_None; Py_INCREF(Py_None); p->compression = Py_None; Py_INCREF(Py_None); p->mangle_dupe_cols = Py_None; Py_INCREF(Py_None); p->tupleize_cols = Py_None; Py_INCREF(Py_None); p->noconvert = ((PyObject*)Py_None); Py_INCREF(Py_None); p->usecols = ((PyObject*)Py_None); Py_INCREF(Py_None); if (unlikely(__pyx_pw_6pandas_6parser_10TextReader_1__cinit__(o, a, k) < 0)) { Py_DECREF(o); o = 0; } return o; } static void __pyx_tp_dealloc_6pandas_6parser_TextReader(PyObject *o) { struct __pyx_obj_6pandas_6parser_TextReader *p = (struct __pyx_obj_6pandas_6parser_TextReader *)o; #if PY_VERSION_HEX >= 0x030400a1 if (unlikely(Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) { if (PyObject_CallFinalizerFromDealloc(o)) return; } #endif PyObject_GC_UnTrack(o); { PyObject *etype, *eval, *etb; PyErr_Fetch(&etype, &eval, &etb); ++Py_REFCNT(o); __pyx_pw_6pandas_6parser_10TextReader_5__dealloc__(o); --Py_REFCNT(o); PyErr_Restore(etype, eval, etb); } Py_CLEAR(p->file_handle); Py_CLEAR(p->na_fvalues); Py_CLEAR(p->clocks); Py_CLEAR(p->allow_leading_cols); Py_CLEAR(p->delimiter); Py_CLEAR(p->converters); Py_CLEAR(p->delim_whitespace); Py_CLEAR(p->na_values); Py_CLEAR(p->true_values); Py_CLEAR(p->false_values); Py_CLEAR(p->memory_map); Py_CLEAR(p->as_recarray); Py_CLEAR(p->header); Py_CLEAR(p->orig_header); Py_CLEAR(p->names); Py_CLEAR(p->header_start); Py_CLEAR(p->header_end); Py_CLEAR(p->index_col); Py_CLEAR(p->low_memory); Py_CLEAR(p->skiprows); Py_CLEAR(p->compact_ints); Py_CLEAR(p->use_unsigned); Py_CLEAR(p->dtype); Py_CLEAR(p->encoding); Py_CLEAR(p->compression); Py_CLEAR(p->mangle_dupe_cols); Py_CLEAR(p->tupleize_cols); Py_CLEAR(p->noconvert); Py_CLEAR(p->usecols); (*Py_TYPE(o)->tp_free)(o); } static int __pyx_tp_traverse_6pandas_6parser_TextReader(PyObject *o, visitproc v, void *a) { int e; struct __pyx_obj_6pandas_6parser_TextReader *p = (struct __pyx_obj_6pandas_6parser_TextReader *)o; if (p->file_handle) { e = (*v)(p->file_handle, a); if (e) return e; } if (p->na_fvalues) { e = (*v)(p->na_fvalues, a); if (e) return e; } if (p->clocks) { e = (*v)(p->clocks, a); if (e) return e; } if (p->allow_leading_cols) { e = (*v)(p->allow_leading_cols, a); if (e) return e; } if (p->delimiter) { e = (*v)(p->delimiter, a); if (e) return e; } if (p->converters) { e = (*v)(p->converters, a); if (e) return e; } if (p->delim_whitespace) { e = (*v)(p->delim_whitespace, a); if (e) return e; } if (p->na_values) { e = (*v)(p->na_values, a); if (e) return e; } if (p->true_values) { e = (*v)(p->true_values, a); if (e) return e; } if (p->false_values) { e = (*v)(p->false_values, a); if (e) return e; } if (p->memory_map) { e = (*v)(p->memory_map, a); if (e) return e; } if (p->as_recarray) { e = (*v)(p->as_recarray, a); if (e) return e; } if (p->header) { e = (*v)(p->header, a); if (e) return e; } if (p->orig_header) { e = (*v)(p->orig_header, a); if (e) return e; } if (p->names) { e = (*v)(p->names, a); if (e) return e; } if (p->header_start) { e = (*v)(p->header_start, a); if (e) return e; } if (p->header_end) { e = (*v)(p->header_end, a); if (e) return e; } if (p->index_col) { e = (*v)(p->index_col, a); if (e) return e; } if (p->low_memory) { e = (*v)(p->low_memory, a); if (e) return e; } if (p->skiprows) { e = (*v)(p->skiprows, a); if (e) return e; } if (p->compact_ints) { e = (*v)(p->compact_ints, a); if (e) return e; } if (p->use_unsigned) { e = (*v)(p->use_unsigned, a); if (e) return e; } if (p->dtype) { e = (*v)(p->dtype, a); if (e) return e; } if (p->encoding) { e = (*v)(p->encoding, a); if (e) return e; } if (p->compression) { e = (*v)(p->compression, a); if (e) return e; } if (p->mangle_dupe_cols) { e = (*v)(p->mangle_dupe_cols, a); if (e) return e; } if (p->tupleize_cols) { e = (*v)(p->tupleize_cols, a); if (e) return e; } if (p->noconvert) { e = (*v)(p->noconvert, a); if (e) return e; } if (p->usecols) { e = (*v)(p->usecols, a); if (e) return e; } return 0; } static int __pyx_tp_clear_6pandas_6parser_TextReader(PyObject *o) { PyObject* tmp; struct __pyx_obj_6pandas_6parser_TextReader *p = (struct __pyx_obj_6pandas_6parser_TextReader *)o; tmp = ((PyObject*)p->file_handle); p->file_handle = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->na_fvalues); p->na_fvalues = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->clocks); p->clocks = ((PyObject*)Py_None); Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->allow_leading_cols); p->allow_leading_cols = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->delimiter); p->delimiter = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->converters); p->converters = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->delim_whitespace); p->delim_whitespace = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->na_values); p->na_values = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->true_values); p->true_values = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->false_values); p->false_values = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->memory_map); p->memory_map = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->as_recarray); p->as_recarray = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->header); p->header = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->orig_header); p->orig_header = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->names); p->names = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->header_start); p->header_start = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->header_end); p->header_end = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->index_col); p->index_col = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->low_memory); p->low_memory = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->skiprows); p->skiprows = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->compact_ints); p->compact_ints = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->use_unsigned); p->use_unsigned = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->dtype); p->dtype = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->encoding); p->encoding = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->compression); p->compression = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->mangle_dupe_cols); p->mangle_dupe_cols = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->tupleize_cols); p->tupleize_cols = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->noconvert); p->noconvert = ((PyObject*)Py_None); Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->usecols); p->usecols = ((PyObject*)Py_None); Py_INCREF(Py_None); Py_XDECREF(tmp); return 0; } static PyObject *__pyx_getprop_6pandas_6parser_10TextReader_leading_cols(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6pandas_6parser_10TextReader_12leading_cols_1__get__(o); } static int __pyx_setprop_6pandas_6parser_10TextReader_leading_cols(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { return __pyx_pw_6pandas_6parser_10TextReader_12leading_cols_3__set__(o, v); } else { PyErr_SetString(PyExc_NotImplementedError, "__del__"); return -1; } } static PyObject *__pyx_getprop_6pandas_6parser_10TextReader_table_width(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6pandas_6parser_10TextReader_11table_width_1__get__(o); } static int __pyx_setprop_6pandas_6parser_10TextReader_table_width(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { return __pyx_pw_6pandas_6parser_10TextReader_11table_width_3__set__(o, v); } else { PyErr_SetString(PyExc_NotImplementedError, "__del__"); return -1; } } static PyObject *__pyx_getprop_6pandas_6parser_10TextReader_skip_footer(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6pandas_6parser_10TextReader_11skip_footer_1__get__(o); } static int __pyx_setprop_6pandas_6parser_10TextReader_skip_footer(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { return __pyx_pw_6pandas_6parser_10TextReader_11skip_footer_3__set__(o, v); } else { PyErr_SetString(PyExc_NotImplementedError, "__del__"); return -1; } } static PyObject *__pyx_getprop_6pandas_6parser_10TextReader_buffer_lines(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6pandas_6parser_10TextReader_12buffer_lines_1__get__(o); } static int __pyx_setprop_6pandas_6parser_10TextReader_buffer_lines(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { return __pyx_pw_6pandas_6parser_10TextReader_12buffer_lines_3__set__(o, v); } else { PyErr_SetString(PyExc_NotImplementedError, "__del__"); return -1; } } static PyObject *__pyx_getprop_6pandas_6parser_10TextReader_allow_leading_cols(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6pandas_6parser_10TextReader_18allow_leading_cols_1__get__(o); } static int __pyx_setprop_6pandas_6parser_10TextReader_allow_leading_cols(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { return __pyx_pw_6pandas_6parser_10TextReader_18allow_leading_cols_3__set__(o, v); } else { return __pyx_pw_6pandas_6parser_10TextReader_18allow_leading_cols_5__del__(o); } } static PyObject *__pyx_getprop_6pandas_6parser_10TextReader_delimiter(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6pandas_6parser_10TextReader_9delimiter_1__get__(o); } static int __pyx_setprop_6pandas_6parser_10TextReader_delimiter(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { return __pyx_pw_6pandas_6parser_10TextReader_9delimiter_3__set__(o, v); } else { return __pyx_pw_6pandas_6parser_10TextReader_9delimiter_5__del__(o); } } static PyObject *__pyx_getprop_6pandas_6parser_10TextReader_converters(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6pandas_6parser_10TextReader_10converters_1__get__(o); } static int __pyx_setprop_6pandas_6parser_10TextReader_converters(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { return __pyx_pw_6pandas_6parser_10TextReader_10converters_3__set__(o, v); } else { return __pyx_pw_6pandas_6parser_10TextReader_10converters_5__del__(o); } } static PyObject *__pyx_getprop_6pandas_6parser_10TextReader_delim_whitespace(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6pandas_6parser_10TextReader_16delim_whitespace_1__get__(o); } static int __pyx_setprop_6pandas_6parser_10TextReader_delim_whitespace(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { return __pyx_pw_6pandas_6parser_10TextReader_16delim_whitespace_3__set__(o, v); } else { return __pyx_pw_6pandas_6parser_10TextReader_16delim_whitespace_5__del__(o); } } static PyObject *__pyx_getprop_6pandas_6parser_10TextReader_na_values(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6pandas_6parser_10TextReader_9na_values_1__get__(o); } static int __pyx_setprop_6pandas_6parser_10TextReader_na_values(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { return __pyx_pw_6pandas_6parser_10TextReader_9na_values_3__set__(o, v); } else { return __pyx_pw_6pandas_6parser_10TextReader_9na_values_5__del__(o); } } static PyObject *__pyx_getprop_6pandas_6parser_10TextReader_true_values(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6pandas_6parser_10TextReader_11true_values_1__get__(o); } static int __pyx_setprop_6pandas_6parser_10TextReader_true_values(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { return __pyx_pw_6pandas_6parser_10TextReader_11true_values_3__set__(o, v); } else { return __pyx_pw_6pandas_6parser_10TextReader_11true_values_5__del__(o); } } static PyObject *__pyx_getprop_6pandas_6parser_10TextReader_false_values(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6pandas_6parser_10TextReader_12false_values_1__get__(o); } static int __pyx_setprop_6pandas_6parser_10TextReader_false_values(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { return __pyx_pw_6pandas_6parser_10TextReader_12false_values_3__set__(o, v); } else { return __pyx_pw_6pandas_6parser_10TextReader_12false_values_5__del__(o); } } static PyObject *__pyx_getprop_6pandas_6parser_10TextReader_memory_map(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6pandas_6parser_10TextReader_10memory_map_1__get__(o); } static int __pyx_setprop_6pandas_6parser_10TextReader_memory_map(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { return __pyx_pw_6pandas_6parser_10TextReader_10memory_map_3__set__(o, v); } else { return __pyx_pw_6pandas_6parser_10TextReader_10memory_map_5__del__(o); } } static PyObject *__pyx_getprop_6pandas_6parser_10TextReader_as_recarray(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6pandas_6parser_10TextReader_11as_recarray_1__get__(o); } static int __pyx_setprop_6pandas_6parser_10TextReader_as_recarray(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { return __pyx_pw_6pandas_6parser_10TextReader_11as_recarray_3__set__(o, v); } else { return __pyx_pw_6pandas_6parser_10TextReader_11as_recarray_5__del__(o); } } static PyObject *__pyx_getprop_6pandas_6parser_10TextReader_header(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6pandas_6parser_10TextReader_6header_1__get__(o); } static int __pyx_setprop_6pandas_6parser_10TextReader_header(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { return __pyx_pw_6pandas_6parser_10TextReader_6header_3__set__(o, v); } else { return __pyx_pw_6pandas_6parser_10TextReader_6header_5__del__(o); } } static PyObject *__pyx_getprop_6pandas_6parser_10TextReader_orig_header(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6pandas_6parser_10TextReader_11orig_header_1__get__(o); } static int __pyx_setprop_6pandas_6parser_10TextReader_orig_header(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { return __pyx_pw_6pandas_6parser_10TextReader_11orig_header_3__set__(o, v); } else { return __pyx_pw_6pandas_6parser_10TextReader_11orig_header_5__del__(o); } } static PyObject *__pyx_getprop_6pandas_6parser_10TextReader_names(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6pandas_6parser_10TextReader_5names_1__get__(o); } static int __pyx_setprop_6pandas_6parser_10TextReader_names(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { return __pyx_pw_6pandas_6parser_10TextReader_5names_3__set__(o, v); } else { return __pyx_pw_6pandas_6parser_10TextReader_5names_5__del__(o); } } static PyObject *__pyx_getprop_6pandas_6parser_10TextReader_header_start(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6pandas_6parser_10TextReader_12header_start_1__get__(o); } static int __pyx_setprop_6pandas_6parser_10TextReader_header_start(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { return __pyx_pw_6pandas_6parser_10TextReader_12header_start_3__set__(o, v); } else { return __pyx_pw_6pandas_6parser_10TextReader_12header_start_5__del__(o); } } static PyObject *__pyx_getprop_6pandas_6parser_10TextReader_header_end(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6pandas_6parser_10TextReader_10header_end_1__get__(o); } static int __pyx_setprop_6pandas_6parser_10TextReader_header_end(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { return __pyx_pw_6pandas_6parser_10TextReader_10header_end_3__set__(o, v); } else { return __pyx_pw_6pandas_6parser_10TextReader_10header_end_5__del__(o); } } static PyObject *__pyx_getprop_6pandas_6parser_10TextReader_index_col(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6pandas_6parser_10TextReader_9index_col_1__get__(o); } static int __pyx_setprop_6pandas_6parser_10TextReader_index_col(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { return __pyx_pw_6pandas_6parser_10TextReader_9index_col_3__set__(o, v); } else { return __pyx_pw_6pandas_6parser_10TextReader_9index_col_5__del__(o); } } static PyObject *__pyx_getprop_6pandas_6parser_10TextReader_low_memory(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6pandas_6parser_10TextReader_10low_memory_1__get__(o); } static int __pyx_setprop_6pandas_6parser_10TextReader_low_memory(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { return __pyx_pw_6pandas_6parser_10TextReader_10low_memory_3__set__(o, v); } else { return __pyx_pw_6pandas_6parser_10TextReader_10low_memory_5__del__(o); } } static PyObject *__pyx_getprop_6pandas_6parser_10TextReader_skiprows(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6pandas_6parser_10TextReader_8skiprows_1__get__(o); } static int __pyx_setprop_6pandas_6parser_10TextReader_skiprows(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { return __pyx_pw_6pandas_6parser_10TextReader_8skiprows_3__set__(o, v); } else { return __pyx_pw_6pandas_6parser_10TextReader_8skiprows_5__del__(o); } } static PyObject *__pyx_getprop_6pandas_6parser_10TextReader_compact_ints(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6pandas_6parser_10TextReader_12compact_ints_1__get__(o); } static int __pyx_setprop_6pandas_6parser_10TextReader_compact_ints(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { return __pyx_pw_6pandas_6parser_10TextReader_12compact_ints_3__set__(o, v); } else { return __pyx_pw_6pandas_6parser_10TextReader_12compact_ints_5__del__(o); } } static PyObject *__pyx_getprop_6pandas_6parser_10TextReader_use_unsigned(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6pandas_6parser_10TextReader_12use_unsigned_1__get__(o); } static int __pyx_setprop_6pandas_6parser_10TextReader_use_unsigned(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { return __pyx_pw_6pandas_6parser_10TextReader_12use_unsigned_3__set__(o, v); } else { return __pyx_pw_6pandas_6parser_10TextReader_12use_unsigned_5__del__(o); } } static PyObject *__pyx_getprop_6pandas_6parser_10TextReader_dtype(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6pandas_6parser_10TextReader_5dtype_1__get__(o); } static int __pyx_setprop_6pandas_6parser_10TextReader_dtype(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { return __pyx_pw_6pandas_6parser_10TextReader_5dtype_3__set__(o, v); } else { return __pyx_pw_6pandas_6parser_10TextReader_5dtype_5__del__(o); } } static PyObject *__pyx_getprop_6pandas_6parser_10TextReader_encoding(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6pandas_6parser_10TextReader_8encoding_1__get__(o); } static int __pyx_setprop_6pandas_6parser_10TextReader_encoding(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { return __pyx_pw_6pandas_6parser_10TextReader_8encoding_3__set__(o, v); } else { return __pyx_pw_6pandas_6parser_10TextReader_8encoding_5__del__(o); } } static PyObject *__pyx_getprop_6pandas_6parser_10TextReader_compression(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6pandas_6parser_10TextReader_11compression_1__get__(o); } static int __pyx_setprop_6pandas_6parser_10TextReader_compression(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { return __pyx_pw_6pandas_6parser_10TextReader_11compression_3__set__(o, v); } else { return __pyx_pw_6pandas_6parser_10TextReader_11compression_5__del__(o); } } static PyObject *__pyx_getprop_6pandas_6parser_10TextReader_mangle_dupe_cols(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6pandas_6parser_10TextReader_16mangle_dupe_cols_1__get__(o); } static int __pyx_setprop_6pandas_6parser_10TextReader_mangle_dupe_cols(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { return __pyx_pw_6pandas_6parser_10TextReader_16mangle_dupe_cols_3__set__(o, v); } else { return __pyx_pw_6pandas_6parser_10TextReader_16mangle_dupe_cols_5__del__(o); } } static PyObject *__pyx_getprop_6pandas_6parser_10TextReader_tupleize_cols(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6pandas_6parser_10TextReader_13tupleize_cols_1__get__(o); } static int __pyx_setprop_6pandas_6parser_10TextReader_tupleize_cols(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { return __pyx_pw_6pandas_6parser_10TextReader_13tupleize_cols_3__set__(o, v); } else { return __pyx_pw_6pandas_6parser_10TextReader_13tupleize_cols_5__del__(o); } } static PyObject *__pyx_getprop_6pandas_6parser_10TextReader_noconvert(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6pandas_6parser_10TextReader_9noconvert_1__get__(o); } static int __pyx_setprop_6pandas_6parser_10TextReader_noconvert(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { return __pyx_pw_6pandas_6parser_10TextReader_9noconvert_3__set__(o, v); } else { return __pyx_pw_6pandas_6parser_10TextReader_9noconvert_5__del__(o); } } static PyObject *__pyx_getprop_6pandas_6parser_10TextReader_usecols(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6pandas_6parser_10TextReader_7usecols_1__get__(o); } static int __pyx_setprop_6pandas_6parser_10TextReader_usecols(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { return __pyx_pw_6pandas_6parser_10TextReader_7usecols_3__set__(o, v); } else { return __pyx_pw_6pandas_6parser_10TextReader_7usecols_5__del__(o); } } static PyMethodDef __pyx_methods_6pandas_6parser_TextReader[] = { {__Pyx_NAMESTR("set_error_bad_lines"), (PyCFunction)__pyx_pw_6pandas_6parser_10TextReader_7set_error_bad_lines, METH_O, __Pyx_DOCSTR(0)}, {__Pyx_NAMESTR("read"), (PyCFunction)__pyx_pw_6pandas_6parser_10TextReader_9read, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_6parser_10TextReader_8read)}, {__Pyx_NAMESTR("debug_print"), (PyCFunction)__pyx_pw_6pandas_6parser_10TextReader_11debug_print, METH_NOARGS, __Pyx_DOCSTR(0)}, {__Pyx_NAMESTR("set_noconvert"), (PyCFunction)__pyx_pw_6pandas_6parser_10TextReader_13set_noconvert, METH_O, __Pyx_DOCSTR(0)}, {__Pyx_NAMESTR("remove_noconvert"), (PyCFunction)__pyx_pw_6pandas_6parser_10TextReader_15remove_noconvert, METH_O, __Pyx_DOCSTR(0)}, {__Pyx_NAMESTR("_convert_column_data"), (PyCFunction)__pyx_pw_6pandas_6parser_10TextReader_17_convert_column_data, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}, {__Pyx_NAMESTR("_get_converter"), (PyCFunction)__pyx_pw_6pandas_6parser_10TextReader_19_get_converter, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}, {0, 0, 0, 0} }; static struct PyGetSetDef __pyx_getsets_6pandas_6parser_TextReader[] = { {(char *)"leading_cols", __pyx_getprop_6pandas_6parser_10TextReader_leading_cols, __pyx_setprop_6pandas_6parser_10TextReader_leading_cols, 0, 0}, {(char *)"table_width", __pyx_getprop_6pandas_6parser_10TextReader_table_width, __pyx_setprop_6pandas_6parser_10TextReader_table_width, 0, 0}, {(char *)"skip_footer", __pyx_getprop_6pandas_6parser_10TextReader_skip_footer, __pyx_setprop_6pandas_6parser_10TextReader_skip_footer, 0, 0}, {(char *)"buffer_lines", __pyx_getprop_6pandas_6parser_10TextReader_buffer_lines, __pyx_setprop_6pandas_6parser_10TextReader_buffer_lines, 0, 0}, {(char *)"allow_leading_cols", __pyx_getprop_6pandas_6parser_10TextReader_allow_leading_cols, __pyx_setprop_6pandas_6parser_10TextReader_allow_leading_cols, 0, 0}, {(char *)"delimiter", __pyx_getprop_6pandas_6parser_10TextReader_delimiter, __pyx_setprop_6pandas_6parser_10TextReader_delimiter, 0, 0}, {(char *)"converters", __pyx_getprop_6pandas_6parser_10TextReader_converters, __pyx_setprop_6pandas_6parser_10TextReader_converters, 0, 0}, {(char *)"delim_whitespace", __pyx_getprop_6pandas_6parser_10TextReader_delim_whitespace, __pyx_setprop_6pandas_6parser_10TextReader_delim_whitespace, 0, 0}, {(char *)"na_values", __pyx_getprop_6pandas_6parser_10TextReader_na_values, __pyx_setprop_6pandas_6parser_10TextReader_na_values, 0, 0}, {(char *)"true_values", __pyx_getprop_6pandas_6parser_10TextReader_true_values, __pyx_setprop_6pandas_6parser_10TextReader_true_values, 0, 0}, {(char *)"false_values", __pyx_getprop_6pandas_6parser_10TextReader_false_values, __pyx_setprop_6pandas_6parser_10TextReader_false_values, 0, 0}, {(char *)"memory_map", __pyx_getprop_6pandas_6parser_10TextReader_memory_map, __pyx_setprop_6pandas_6parser_10TextReader_memory_map, 0, 0}, {(char *)"as_recarray", __pyx_getprop_6pandas_6parser_10TextReader_as_recarray, __pyx_setprop_6pandas_6parser_10TextReader_as_recarray, 0, 0}, {(char *)"header", __pyx_getprop_6pandas_6parser_10TextReader_header, __pyx_setprop_6pandas_6parser_10TextReader_header, 0, 0}, {(char *)"orig_header", __pyx_getprop_6pandas_6parser_10TextReader_orig_header, __pyx_setprop_6pandas_6parser_10TextReader_orig_header, 0, 0}, {(char *)"names", __pyx_getprop_6pandas_6parser_10TextReader_names, __pyx_setprop_6pandas_6parser_10TextReader_names, 0, 0}, {(char *)"header_start", __pyx_getprop_6pandas_6parser_10TextReader_header_start, __pyx_setprop_6pandas_6parser_10TextReader_header_start, 0, 0}, {(char *)"header_end", __pyx_getprop_6pandas_6parser_10TextReader_header_end, __pyx_setprop_6pandas_6parser_10TextReader_header_end, 0, 0}, {(char *)"index_col", __pyx_getprop_6pandas_6parser_10TextReader_index_col, __pyx_setprop_6pandas_6parser_10TextReader_index_col, 0, 0}, {(char *)"low_memory", __pyx_getprop_6pandas_6parser_10TextReader_low_memory, __pyx_setprop_6pandas_6parser_10TextReader_low_memory, 0, 0}, {(char *)"skiprows", __pyx_getprop_6pandas_6parser_10TextReader_skiprows, __pyx_setprop_6pandas_6parser_10TextReader_skiprows, 0, 0}, {(char *)"compact_ints", __pyx_getprop_6pandas_6parser_10TextReader_compact_ints, __pyx_setprop_6pandas_6parser_10TextReader_compact_ints, 0, 0}, {(char *)"use_unsigned", __pyx_getprop_6pandas_6parser_10TextReader_use_unsigned, __pyx_setprop_6pandas_6parser_10TextReader_use_unsigned, 0, 0}, {(char *)"dtype", __pyx_getprop_6pandas_6parser_10TextReader_dtype, __pyx_setprop_6pandas_6parser_10TextReader_dtype, 0, 0}, {(char *)"encoding", __pyx_getprop_6pandas_6parser_10TextReader_encoding, __pyx_setprop_6pandas_6parser_10TextReader_encoding, 0, 0}, {(char *)"compression", __pyx_getprop_6pandas_6parser_10TextReader_compression, __pyx_setprop_6pandas_6parser_10TextReader_compression, 0, 0}, {(char *)"mangle_dupe_cols", __pyx_getprop_6pandas_6parser_10TextReader_mangle_dupe_cols, __pyx_setprop_6pandas_6parser_10TextReader_mangle_dupe_cols, 0, 0}, {(char *)"tupleize_cols", __pyx_getprop_6pandas_6parser_10TextReader_tupleize_cols, __pyx_setprop_6pandas_6parser_10TextReader_tupleize_cols, 0, 0}, {(char *)"noconvert", __pyx_getprop_6pandas_6parser_10TextReader_noconvert, __pyx_setprop_6pandas_6parser_10TextReader_noconvert, 0, 0}, {(char *)"usecols", __pyx_getprop_6pandas_6parser_10TextReader_usecols, __pyx_setprop_6pandas_6parser_10TextReader_usecols, 0, 0}, {0, 0, 0, 0, 0} }; static PyTypeObject __pyx_type_6pandas_6parser_TextReader = { PyVarObject_HEAD_INIT(0, 0) __Pyx_NAMESTR("pandas.parser.TextReader"), /*tp_name*/ sizeof(struct __pyx_obj_6pandas_6parser_TextReader), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_6pandas_6parser_TextReader, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #else 0, /*reserved*/ #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*/ __Pyx_DOCSTR("\n\n # source: StringIO or file object\n\n "), /*tp_doc*/ __pyx_tp_traverse_6pandas_6parser_TextReader, /*tp_traverse*/ __pyx_tp_clear_6pandas_6parser_TextReader, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_6pandas_6parser_TextReader, /*tp_methods*/ 0, /*tp_members*/ __pyx_getsets_6pandas_6parser_TextReader, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ __pyx_pw_6pandas_6parser_10TextReader_3__init__, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_6pandas_6parser_TextReader, /*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*/ #if PY_VERSION_HEX >= 0x02060000 0, /*tp_version_tag*/ #endif #if PY_VERSION_HEX >= 0x030400a1 0, /*tp_finalize*/ #endif }; static PyMethodDef __pyx_methods[] = { {0, 0, 0, 0} }; #if PY_MAJOR_VERSION >= 3 static struct PyModuleDef __pyx_moduledef = { #if PY_VERSION_HEX < 0x03020000 { PyObject_HEAD_INIT(NULL) NULL, 0, NULL }, #else PyModuleDef_HEAD_INIT, #endif __Pyx_NAMESTR("parser"), 0, /* m_doc */ -1, /* m_size */ __pyx_methods /* m_methods */, NULL, /* m_reload */ NULL, /* m_traverse */ NULL, /* m_clear */ NULL /* m_free */ }; #endif static __Pyx_StringTabEntry __pyx_string_tab[] = { {&__pyx_kp_b_, __pyx_k_, sizeof(__pyx_k_), 0, 0, 0, 0}, {&__pyx_kp_s_, __pyx_k_, sizeof(__pyx_k_), 0, 0, 1, 0}, {&__pyx_kp_b_1_IND, __pyx_k_1_IND, sizeof(__pyx_k_1_IND), 0, 0, 0, 0}, {&__pyx_kp_b_1_IND_2, __pyx_k_1_IND_2, sizeof(__pyx_k_1_IND_2), 0, 0, 0, 0}, {&__pyx_kp_b_1_QNAN, __pyx_k_1_QNAN, sizeof(__pyx_k_1_QNAN), 0, 0, 0, 0}, {&__pyx_kp_b_1_QNAN_2, __pyx_k_1_QNAN_2, sizeof(__pyx_k_1_QNAN_2), 0, 0, 0, 0}, {&__pyx_n_s_BZ2File, __pyx_k_BZ2File, sizeof(__pyx_k_BZ2File), 0, 0, 1, 1}, {&__pyx_n_s_BufferedReader, __pyx_k_BufferedReader, sizeof(__pyx_k_BufferedReader), 0, 0, 1, 1}, {&__pyx_n_s_CParserError, __pyx_k_CParserError, sizeof(__pyx_k_CParserError), 0, 0, 1, 1}, {&__pyx_kp_s_Cannot_handle_open_unicode_files, __pyx_k_Cannot_handle_open_unicode_files, sizeof(__pyx_k_Cannot_handle_open_unicode_files), 0, 0, 1, 0}, {&__pyx_kp_s_Columns_s_have_mixed_types, __pyx_k_Columns_s_have_mixed_types, sizeof(__pyx_k_Columns_s_have_mixed_types), 0, 0, 1, 0}, {&__pyx_kp_s_Conversion_to_structured_array, __pyx_k_Conversion_to_structured_array, sizeof(__pyx_k_Conversion_to_structured_array), 0, 0, 1, 0}, {&__pyx_n_s_DEFAULT_CHUNKSIZE, __pyx_k_DEFAULT_CHUNKSIZE, sizeof(__pyx_k_DEFAULT_CHUNKSIZE), 0, 0, 1, 1}, {&__pyx_n_s_DtypeWarning, __pyx_k_DtypeWarning, sizeof(__pyx_k_DtypeWarning), 0, 0, 1, 1}, {&__pyx_kp_s_Error_tokenizing_data, __pyx_k_Error_tokenizing_data, sizeof(__pyx_k_Error_tokenizing_data), 0, 0, 1, 0}, {&__pyx_n_s_Exception, __pyx_k_Exception, sizeof(__pyx_k_Exception), 0, 0, 1, 1}, {&__pyx_kp_s_Expected_file_path_name_or_file, __pyx_k_Expected_file_path_name_or_file, sizeof(__pyx_k_Expected_file_path_name_or_file), 0, 0, 1, 0}, {&__pyx_n_b_FALSE, __pyx_k_FALSE, sizeof(__pyx_k_FALSE), 0, 0, 0, 1}, {&__pyx_n_b_False, __pyx_k_False, sizeof(__pyx_k_False), 0, 0, 0, 1}, {&__pyx_kp_s_File_s_does_not_exist, __pyx_k_File_s_does_not_exist, sizeof(__pyx_k_File_s_does_not_exist), 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_GzipFile, __pyx_k_GzipFile, sizeof(__pyx_k_GzipFile), 0, 0, 1, 1}, {&__pyx_n_s_IOError, __pyx_k_IOError, sizeof(__pyx_k_IOError), 0, 0, 1, 1}, {&__pyx_n_s_IndexError, __pyx_k_IndexError, sizeof(__pyx_k_IndexError), 0, 0, 1, 1}, {&__pyx_kp_s_Initializing_from_file_failed, __pyx_k_Initializing_from_file_failed, sizeof(__pyx_k_Initializing_from_file_failed), 0, 0, 1, 0}, {&__pyx_kp_s_Initializing_parser_from_file_li, __pyx_k_Initializing_parser_from_file_li, sizeof(__pyx_k_Initializing_parser_from_file_li), 0, 0, 1, 0}, {&__pyx_kp_s_Integer_column_has_NA_values, __pyx_k_Integer_column_has_NA_values, sizeof(__pyx_k_Integer_column_has_NA_values), 0, 0, 1, 0}, {&__pyx_n_s_M, __pyx_k_M, sizeof(__pyx_k_M), 0, 0, 1, 1}, {&__pyx_kp_s_Must_be_all_encoded_bytes, __pyx_k_Must_be_all_encoded_bytes, sizeof(__pyx_k_Must_be_all_encoded_bytes), 0, 0, 1, 0}, {&__pyx_n_b_NA, __pyx_k_NA, sizeof(__pyx_k_NA), 0, 0, 0, 1}, {&__pyx_n_s_NA, __pyx_k_NA, sizeof(__pyx_k_NA), 0, 0, 1, 1}, {&__pyx_kp_b_NA_2, __pyx_k_NA_2, sizeof(__pyx_k_NA_2), 0, 0, 0, 0}, {&__pyx_n_s_NA_VALUES, __pyx_k_NA_VALUES, sizeof(__pyx_k_NA_VALUES), 0, 0, 1, 1}, {&__pyx_n_b_NULL, __pyx_k_NULL, sizeof(__pyx_k_NULL), 0, 0, 0, 1}, {&__pyx_kp_b_N_A_N_A, __pyx_k_N_A_N_A, sizeof(__pyx_k_N_A_N_A), 0, 0, 0, 0}, {&__pyx_n_b_NaN, __pyx_k_NaN, sizeof(__pyx_k_NaN), 0, 0, 0, 1}, {&__pyx_n_s_NameError, __pyx_k_NameError, sizeof(__pyx_k_NameError), 0, 0, 1, 1}, {&__pyx_kp_s_No_columns_to_parse_from_file, __pyx_k_No_columns_to_parse_from_file, sizeof(__pyx_k_No_columns_to_parse_from_file), 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_O, __pyx_k_O, sizeof(__pyx_k_O), 0, 0, 1, 1}, {&__pyx_kp_s_O8, __pyx_k_O8, sizeof(__pyx_k_O8), 0, 0, 1, 0}, {&__pyx_kp_s_Only_length_1_comment_characters, __pyx_k_Only_length_1_comment_characters, sizeof(__pyx_k_Only_length_1_comment_characters), 0, 0, 1, 0}, {&__pyx_kp_s_Only_length_1_decimal_markers_su, __pyx_k_Only_length_1_decimal_markers_su, sizeof(__pyx_k_Only_length_1_decimal_markers_su), 0, 0, 1, 0}, {&__pyx_kp_s_Only_length_1_escapes_supported, __pyx_k_Only_length_1_escapes_supported, sizeof(__pyx_k_Only_length_1_escapes_supported), 0, 0, 1, 0}, {&__pyx_kp_s_Only_length_1_line_terminators_s, __pyx_k_Only_length_1_line_terminators_s, sizeof(__pyx_k_Only_length_1_line_terminators_s), 0, 0, 1, 0}, {&__pyx_kp_s_Only_length_1_thousands_markers, __pyx_k_Only_length_1_thousands_markers, sizeof(__pyx_k_Only_length_1_thousands_markers), 0, 0, 1, 0}, {&__pyx_n_s_OverflowError, __pyx_k_OverflowError, sizeof(__pyx_k_OverflowError), 0, 0, 1, 1}, {&__pyx_kp_s_Parser_memory_cleanup, __pyx_k_Parser_memory_cleanup, sizeof(__pyx_k_Parser_memory_cleanup), 0, 0, 1, 0}, {&__pyx_kp_s_Passed_header_names_mismatches_u, __pyx_k_Passed_header_names_mismatches_u, sizeof(__pyx_k_Passed_header_names_mismatches_u), 0, 0, 1, 0}, {&__pyx_kp_s_Passed_header_s_but_only_d_lines, __pyx_k_Passed_header_s_but_only_d_lines, sizeof(__pyx_k_Passed_header_s_but_only_d_lines), 0, 0, 1, 0}, {&__pyx_kp_s_Python_cannot_read_bz2_from_open, __pyx_k_Python_cannot_read_bz2_from_open, sizeof(__pyx_k_Python_cannot_read_bz2_from_open), 0, 0, 1, 0}, {&__pyx_n_s_RuntimeError, __pyx_k_RuntimeError, sizeof(__pyx_k_RuntimeError), 0, 0, 1, 1}, {&__pyx_n_s_S, __pyx_k_S, sizeof(__pyx_k_S), 0, 0, 1, 1}, {&__pyx_kp_s_S_d, __pyx_k_S_d, sizeof(__pyx_k_S_d), 0, 0, 1, 0}, {&__pyx_kp_s_Specify_dtype_option_on_import_o, __pyx_k_Specify_dtype_option_on_import_o, sizeof(__pyx_k_Specify_dtype_option_on_import_o), 0, 0, 1, 0}, {&__pyx_n_s_StopIteration, __pyx_k_StopIteration, sizeof(__pyx_k_StopIteration), 0, 0, 1, 1}, {&__pyx_n_b_TRUE, __pyx_k_TRUE, sizeof(__pyx_k_TRUE), 0, 0, 0, 1}, {&__pyx_n_s_TextIOWrapper, __pyx_k_TextIOWrapper, sizeof(__pyx_k_TextIOWrapper), 0, 0, 1, 1}, {&__pyx_n_s_Tokenization, __pyx_k_Tokenization, sizeof(__pyx_k_Tokenization), 0, 0, 1, 1}, {&__pyx_kp_s_Too_many_columns_specified_expec, __pyx_k_Too_many_columns_specified_expec, sizeof(__pyx_k_Too_many_columns_specified_expec), 0, 0, 1, 0}, {&__pyx_n_b_True, __pyx_k_True, sizeof(__pyx_k_True), 0, 0, 0, 1}, {&__pyx_n_s_TypeError, __pyx_k_TypeError, sizeof(__pyx_k_TypeError), 0, 0, 1, 1}, {&__pyx_kp_s_Type_conversion, __pyx_k_Type_conversion, sizeof(__pyx_k_Type_conversion), 0, 0, 1, 0}, {&__pyx_n_s_U, __pyx_k_U, sizeof(__pyx_k_U), 0, 0, 1, 1}, {&__pyx_kp_s_Unable_to_parse_column_d, __pyx_k_Unable_to_parse_column_d, sizeof(__pyx_k_Unable_to_parse_column_d), 0, 0, 1, 0}, {&__pyx_kp_s_Unnamed_d, __pyx_k_Unnamed_d, sizeof(__pyx_k_Unnamed_d), 0, 0, 1, 0}, {&__pyx_kp_s_Unnamed_d_level__d, __pyx_k_Unnamed_d_level__d, sizeof(__pyx_k_Unnamed_d_level__d), 0, 0, 1, 0}, {&__pyx_kp_s_Unrecognized_compression_type_s, __pyx_k_Unrecognized_compression_type_s, sizeof(__pyx_k_Unrecognized_compression_type_s), 0, 0, 1, 0}, {&__pyx_n_s_ValueError, __pyx_k_ValueError, sizeof(__pyx_k_ValueError), 0, 0, 1, 1}, {&__pyx_kp_b__17, __pyx_k__17, sizeof(__pyx_k__17), 0, 0, 0, 0}, {&__pyx_kp_s__17, __pyx_k__17, sizeof(__pyx_k__17), 0, 0, 1, 0}, {&__pyx_kp_b__3, __pyx_k__3, sizeof(__pyx_k__3), 0, 0, 0, 0}, {&__pyx_kp_s__36, __pyx_k__36, sizeof(__pyx_k__36), 0, 0, 1, 0}, {&__pyx_kp_b__4, __pyx_k__4, sizeof(__pyx_k__4), 0, 0, 0, 0}, {&__pyx_n_s__46, __pyx_k__46, sizeof(__pyx_k__46), 0, 0, 1, 1}, {&__pyx_n_s_a, __pyx_k_a, sizeof(__pyx_k_a), 0, 0, 1, 1}, {&__pyx_n_s_allow_leading_cols, __pyx_k_allow_leading_cols, sizeof(__pyx_k_allow_leading_cols), 0, 0, 1, 1}, {&__pyx_n_s_append, __pyx_k_append, sizeof(__pyx_k_append), 0, 0, 1, 1}, {&__pyx_n_s_arr, __pyx_k_arr, sizeof(__pyx_k_arr), 0, 0, 1, 1}, {&__pyx_n_s_arrs, __pyx_k_arrs, sizeof(__pyx_k_arrs), 0, 0, 1, 1}, {&__pyx_n_s_as_recarray, __pyx_k_as_recarray, sizeof(__pyx_k_as_recarray), 0, 0, 1, 1}, {&__pyx_n_s_astype, __pyx_k_astype, sizeof(__pyx_k_astype), 0, 0, 1, 1}, {&__pyx_n_s_b, __pyx_k_b, sizeof(__pyx_k_b), 0, 0, 1, 1}, {&__pyx_kp_s_b1, __pyx_k_b1, sizeof(__pyx_k_b1), 0, 0, 1, 0}, {&__pyx_n_s_basestring, __pyx_k_basestring, sizeof(__pyx_k_basestring), 0, 0, 1, 1}, {&__pyx_n_s_bool, __pyx_k_bool, sizeof(__pyx_k_bool), 0, 0, 1, 1}, {&__pyx_n_s_buf, __pyx_k_buf, sizeof(__pyx_k_buf), 0, 0, 1, 1}, {&__pyx_n_s_buffer_lines, __pyx_k_buffer_lines, sizeof(__pyx_k_buffer_lines), 0, 0, 1, 1}, {&__pyx_n_s_builtin, __pyx_k_builtin, sizeof(__pyx_k_builtin), 0, 0, 1, 1}, {&__pyx_n_s_bz2, __pyx_k_bz2, sizeof(__pyx_k_bz2), 0, 0, 1, 1}, {&__pyx_n_s_c, __pyx_k_c, sizeof(__pyx_k_c), 0, 0, 1, 1}, {&__pyx_n_s_chunk, __pyx_k_chunk, sizeof(__pyx_k_chunk), 0, 0, 1, 1}, {&__pyx_n_s_chunks, __pyx_k_chunks, sizeof(__pyx_k_chunks), 0, 0, 1, 1}, {&__pyx_n_s_column, __pyx_k_column, sizeof(__pyx_k_column), 0, 0, 1, 1}, {&__pyx_n_s_columns, __pyx_k_columns, sizeof(__pyx_k_columns), 0, 0, 1, 1}, {&__pyx_n_s_comment, __pyx_k_comment, sizeof(__pyx_k_comment), 0, 0, 1, 1}, {&__pyx_n_s_common_type, __pyx_k_common_type, sizeof(__pyx_k_common_type), 0, 0, 1, 1}, {&__pyx_n_s_compact_ints, __pyx_k_compact_ints, sizeof(__pyx_k_compact_ints), 0, 0, 1, 1}, {&__pyx_n_s_compression, __pyx_k_compression, sizeof(__pyx_k_compression), 0, 0, 1, 1}, {&__pyx_n_s_compute_na_values, __pyx_k_compute_na_values, sizeof(__pyx_k_compute_na_values), 0, 0, 1, 1}, {&__pyx_n_s_concatenate, __pyx_k_concatenate, sizeof(__pyx_k_concatenate), 0, 0, 1, 1}, {&__pyx_n_s_concatenate_chunks, __pyx_k_concatenate_chunks, sizeof(__pyx_k_concatenate_chunks), 0, 0, 1, 1}, {&__pyx_n_s_convert_column_data, __pyx_k_convert_column_data, sizeof(__pyx_k_convert_column_data), 0, 0, 1, 1}, {&__pyx_n_s_converters, __pyx_k_converters, sizeof(__pyx_k_converters), 0, 0, 1, 1}, {&__pyx_kp_s_d, __pyx_k_d, sizeof(__pyx_k_d), 0, 0, 1, 0}, {&__pyx_n_s_decimal, __pyx_k_decimal, sizeof(__pyx_k_decimal), 0, 0, 1, 1}, {&__pyx_n_s_delim_whitespace, __pyx_k_delim_whitespace, sizeof(__pyx_k_delim_whitespace), 0, 0, 1, 1}, {&__pyx_n_s_delimiter, __pyx_k_delimiter, sizeof(__pyx_k_delimiter), 0, 0, 1, 1}, {&__pyx_n_s_descr, __pyx_k_descr, sizeof(__pyx_k_descr), 0, 0, 1, 1}, {&__pyx_n_s_doc, __pyx_k_doc, sizeof(__pyx_k_doc), 0, 0, 1, 1}, {&__pyx_n_s_doublequote, __pyx_k_doublequote, sizeof(__pyx_k_doublequote), 0, 0, 1, 1}, {&__pyx_n_s_downcast_int64, __pyx_k_downcast_int64, sizeof(__pyx_k_downcast_int64), 0, 0, 1, 1}, {&__pyx_n_s_dt, __pyx_k_dt, sizeof(__pyx_k_dt), 0, 0, 1, 1}, {&__pyx_n_s_dtype, __pyx_k_dtype, sizeof(__pyx_k_dtype), 0, 0, 1, 1}, {&__pyx_n_s_dtypes, __pyx_k_dtypes, sizeof(__pyx_k_dtypes), 0, 0, 1, 1}, {&__pyx_n_s_elsize, __pyx_k_elsize, sizeof(__pyx_k_elsize), 0, 0, 1, 1}, {&__pyx_n_s_empty, __pyx_k_empty, sizeof(__pyx_k_empty), 0, 0, 1, 1}, {&__pyx_n_s_encode, __pyx_k_encode, sizeof(__pyx_k_encode), 0, 0, 1, 1}, {&__pyx_n_s_encoding, __pyx_k_encoding, sizeof(__pyx_k_encoding), 0, 0, 1, 1}, {&__pyx_n_s_end, __pyx_k_end, sizeof(__pyx_k_end), 0, 0, 1, 1}, {&__pyx_n_s_ensure_encoded, __pyx_k_ensure_encoded, sizeof(__pyx_k_ensure_encoded), 0, 0, 1, 1}, {&__pyx_n_s_enumerate, __pyx_k_enumerate, sizeof(__pyx_k_enumerate), 0, 0, 1, 1}, {&__pyx_n_s_error_bad_lines, __pyx_k_error_bad_lines, sizeof(__pyx_k_error_bad_lines), 0, 0, 1, 1}, {&__pyx_n_s_escapechar, __pyx_k_escapechar, sizeof(__pyx_k_escapechar), 0, 0, 1, 1}, {&__pyx_n_s_exists, __pyx_k_exists, sizeof(__pyx_k_exists), 0, 0, 1, 1}, {&__pyx_n_s_f, __pyx_k_f, sizeof(__pyx_k_f), 0, 0, 1, 1}, {&__pyx_n_s_f8, __pyx_k_f8, sizeof(__pyx_k_f8), 0, 0, 1, 1}, {&__pyx_kp_s_f8_2, __pyx_k_f8_2, sizeof(__pyx_k_f8_2), 0, 0, 1, 0}, {&__pyx_n_b_false, __pyx_k_false, sizeof(__pyx_k_false), 0, 0, 0, 1}, {&__pyx_n_s_false_values, __pyx_k_false_values, sizeof(__pyx_k_false_values), 0, 0, 1, 1}, {&__pyx_n_s_field_type, __pyx_k_field_type, sizeof(__pyx_k_field_type), 0, 0, 1, 1}, {&__pyx_n_s_fields, __pyx_k_fields, sizeof(__pyx_k_fields), 0, 0, 1, 1}, {&__pyx_n_s_file, __pyx_k_file, sizeof(__pyx_k_file), 0, 0, 1, 1}, {&__pyx_n_s_fileobj, __pyx_k_fileobj, sizeof(__pyx_k_fileobj), 0, 0, 1, 1}, {&__pyx_n_s_find_common_type, __pyx_k_find_common_type, sizeof(__pyx_k_find_common_type), 0, 0, 1, 1}, {&__pyx_n_s_flags, __pyx_k_flags, sizeof(__pyx_k_flags), 0, 0, 1, 1}, {&__pyx_n_s_float64, __pyx_k_float64, sizeof(__pyx_k_float64), 0, 0, 1, 1}, {&__pyx_n_s_fnames, __pyx_k_fnames, sizeof(__pyx_k_fnames), 0, 0, 1, 1}, {&__pyx_n_s_footer, __pyx_k_footer, sizeof(__pyx_k_footer), 0, 0, 1, 1}, {&__pyx_n_s_get, __pyx_k_get, sizeof(__pyx_k_get), 0, 0, 1, 1}, {&__pyx_n_s_get_converter, __pyx_k_get_converter, sizeof(__pyx_k_get_converter), 0, 0, 1, 1}, {&__pyx_n_s_gzip, __pyx_k_gzip, sizeof(__pyx_k_gzip), 0, 0, 1, 1}, {&__pyx_n_s_header, __pyx_k_header, sizeof(__pyx_k_header), 0, 0, 1, 1}, {&__pyx_n_s_header_end, __pyx_k_header_end, sizeof(__pyx_k_header_end), 0, 0, 1, 1}, {&__pyx_n_s_header_start, __pyx_k_header_start, sizeof(__pyx_k_header_start), 0, 0, 1, 1}, {&__pyx_kp_s_home_yoh_deb_gits_pkg_exppsy_pa, __pyx_k_home_yoh_deb_gits_pkg_exppsy_pa, sizeof(__pyx_k_home_yoh_deb_gits_pkg_exppsy_pa), 0, 0, 1, 0}, {&__pyx_n_s_i, __pyx_k_i, sizeof(__pyx_k_i), 0, 0, 1, 1}, {&__pyx_n_s_i8, __pyx_k_i8, sizeof(__pyx_k_i8), 0, 0, 1, 1}, {&__pyx_kp_s_i8_2, __pyx_k_i8_2, sizeof(__pyx_k_i8_2), 0, 0, 1, 0}, {&__pyx_n_s_iinfo, __pyx_k_iinfo, sizeof(__pyx_k_iinfo), 0, 0, 1, 1}, {&__pyx_n_s_import, __pyx_k_import, sizeof(__pyx_k_import), 0, 0, 1, 1}, {&__pyx_n_s_index_col, __pyx_k_index_col, sizeof(__pyx_k_index_col), 0, 0, 1, 1}, {&__pyx_kp_s_index_out_of_bounds, __pyx_k_index_out_of_bounds, sizeof(__pyx_k_index_out_of_bounds), 0, 0, 1, 0}, {&__pyx_n_s_inf, __pyx_k_inf, sizeof(__pyx_k_inf), 0, 0, 1, 1}, {&__pyx_n_s_int16, __pyx_k_int16, sizeof(__pyx_k_int16), 0, 0, 1, 1}, {&__pyx_n_s_int16info, __pyx_k_int16info, sizeof(__pyx_k_int16info), 0, 0, 1, 1}, {&__pyx_n_s_int32, __pyx_k_int32, sizeof(__pyx_k_int32), 0, 0, 1, 1}, {&__pyx_n_s_int32info, __pyx_k_int32info, sizeof(__pyx_k_int32info), 0, 0, 1, 1}, {&__pyx_n_s_int64, __pyx_k_int64, sizeof(__pyx_k_int64), 0, 0, 1, 1}, {&__pyx_n_s_int64info, __pyx_k_int64info, sizeof(__pyx_k_int64info), 0, 0, 1, 1}, {&__pyx_n_s_int8, __pyx_k_int8, sizeof(__pyx_k_int8), 0, 0, 1, 1}, {&__pyx_n_s_int8info, __pyx_k_int8info, sizeof(__pyx_k_int8info), 0, 0, 1, 1}, {&__pyx_n_s_integer, __pyx_k_integer, sizeof(__pyx_k_integer), 0, 0, 1, 1}, {&__pyx_n_s_io, __pyx_k_io, sizeof(__pyx_k_io), 0, 0, 1, 1}, {&__pyx_n_s_io_common, __pyx_k_io_common, sizeof(__pyx_k_io_common), 0, 0, 1, 1}, {&__pyx_n_s_is_file_like, __pyx_k_is_file_like, sizeof(__pyx_k_is_file_like), 0, 0, 1, 1}, {&__pyx_n_s_itemsize, __pyx_k_itemsize, sizeof(__pyx_k_itemsize), 0, 0, 1, 1}, {&__pyx_n_s_join, __pyx_k_join, sizeof(__pyx_k_join), 0, 0, 1, 1}, {&__pyx_n_s_k, __pyx_k_k, sizeof(__pyx_k_k), 0, 0, 1, 1}, {&__pyx_n_s_keys, __pyx_k_keys, sizeof(__pyx_k_keys), 0, 0, 1, 1}, {&__pyx_n_s_length, __pyx_k_length, sizeof(__pyx_k_length), 0, 0, 1, 1}, {&__pyx_n_s_lib, __pyx_k_lib, sizeof(__pyx_k_lib), 0, 0, 1, 1}, {&__pyx_n_s_lineterminator, __pyx_k_lineterminator, sizeof(__pyx_k_lineterminator), 0, 0, 1, 1}, {&__pyx_n_s_low_memory, __pyx_k_low_memory, sizeof(__pyx_k_low_memory), 0, 0, 1, 1}, {&__pyx_n_s_lower, __pyx_k_lower, sizeof(__pyx_k_lower), 0, 0, 1, 1}, {&__pyx_n_s_lst, __pyx_k_lst, sizeof(__pyx_k_lst), 0, 0, 1, 1}, {&__pyx_n_s_main, __pyx_k_main, sizeof(__pyx_k_main), 0, 0, 1, 1}, {&__pyx_n_s_mangle_dupe_cols, __pyx_k_mangle_dupe_cols, sizeof(__pyx_k_mangle_dupe_cols), 0, 0, 1, 1}, {&__pyx_n_s_mask, __pyx_k_mask, sizeof(__pyx_k_mask), 0, 0, 1, 1}, {&__pyx_n_s_mask_2, __pyx_k_mask_2, sizeof(__pyx_k_mask_2), 0, 0, 1, 1}, {&__pyx_n_s_max, __pyx_k_max, sizeof(__pyx_k_max), 0, 0, 1, 1}, {&__pyx_n_s_maybe_convert_objects, __pyx_k_maybe_convert_objects, sizeof(__pyx_k_maybe_convert_objects), 0, 0, 1, 1}, {&__pyx_n_s_maybe_encode, __pyx_k_maybe_encode, sizeof(__pyx_k_maybe_encode), 0, 0, 1, 1}, {&__pyx_n_s_maybe_upcast, __pyx_k_maybe_upcast, sizeof(__pyx_k_maybe_upcast), 0, 0, 1, 1}, {&__pyx_n_s_memory_map, __pyx_k_memory_map, sizeof(__pyx_k_memory_map), 0, 0, 1, 1}, {&__pyx_n_s_metaclass, __pyx_k_metaclass, sizeof(__pyx_k_metaclass), 0, 0, 1, 1}, {&__pyx_n_s_min, __pyx_k_min, sizeof(__pyx_k_min), 0, 0, 1, 1}, {&__pyx_n_s_mn, __pyx_k_mn, sizeof(__pyx_k_mn), 0, 0, 1, 1}, {&__pyx_n_s_module, __pyx_k_module, sizeof(__pyx_k_module), 0, 0, 1, 1}, {&__pyx_n_s_mx, __pyx_k_mx, sizeof(__pyx_k_mx), 0, 0, 1, 1}, {&__pyx_n_s_n, __pyx_k_n, sizeof(__pyx_k_n), 0, 0, 1, 1}, {&__pyx_n_s_na_count, __pyx_k_na_count, sizeof(__pyx_k_na_count), 0, 0, 1, 1}, {&__pyx_n_s_na_filter, __pyx_k_na_filter, sizeof(__pyx_k_na_filter), 0, 0, 1, 1}, {&__pyx_n_s_na_fvalues, __pyx_k_na_fvalues, sizeof(__pyx_k_na_fvalues), 0, 0, 1, 1}, {&__pyx_n_s_na_value, __pyx_k_na_value, sizeof(__pyx_k_na_value), 0, 0, 1, 1}, {&__pyx_n_s_na_values, __pyx_k_na_values, sizeof(__pyx_k_na_values), 0, 0, 1, 1}, {&__pyx_n_s_name, __pyx_k_name, sizeof(__pyx_k_name), 0, 0, 1, 1}, {&__pyx_n_s_names, __pyx_k_names, sizeof(__pyx_k_names), 0, 0, 1, 1}, {&__pyx_n_b_nan, __pyx_k_nan, sizeof(__pyx_k_nan), 0, 0, 0, 1}, {&__pyx_n_s_nan, __pyx_k_nan, sizeof(__pyx_k_nan), 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_nfields, __pyx_k_nfields, sizeof(__pyx_k_nfields), 0, 0, 1, 1}, {&__pyx_kp_s_no_error_message_set, __pyx_k_no_error_message_set, sizeof(__pyx_k_no_error_message_set), 0, 0, 1, 0}, {&__pyx_n_s_np, __pyx_k_np, sizeof(__pyx_k_np), 0, 0, 1, 1}, {&__pyx_n_s_numpy, __pyx_k_numpy, sizeof(__pyx_k_numpy), 0, 0, 1, 1}, {&__pyx_n_s_obj, __pyx_k_obj, sizeof(__pyx_k_obj), 0, 0, 1, 1}, {&__pyx_n_s_object, __pyx_k_object, sizeof(__pyx_k_object), 0, 0, 1, 1}, {&__pyx_n_s_object_2, __pyx_k_object_2, sizeof(__pyx_k_object_2), 0, 0, 1, 1}, {&__pyx_n_s_offset, __pyx_k_offset, sizeof(__pyx_k_offset), 0, 0, 1, 1}, {&__pyx_kp_s_only_length_1_separators_exclude, __pyx_k_only_length_1_separators_exclude, sizeof(__pyx_k_only_length_1_separators_exclude), 0, 0, 1, 0}, {&__pyx_n_s_ord, __pyx_k_ord, sizeof(__pyx_k_ord), 0, 0, 1, 1}, {&__pyx_n_s_os, __pyx_k_os, sizeof(__pyx_k_os), 0, 0, 1, 1}, {&__pyx_n_s_owndata, __pyx_k_owndata, sizeof(__pyx_k_owndata), 0, 0, 1, 1}, {&__pyx_n_s_pandas_lib, __pyx_k_pandas_lib, sizeof(__pyx_k_pandas_lib), 0, 0, 1, 1}, {&__pyx_n_s_pandas_parser, __pyx_k_pandas_parser, sizeof(__pyx_k_pandas_parser), 0, 0, 1, 1}, {&__pyx_n_s_path, __pyx_k_path, sizeof(__pyx_k_path), 0, 0, 1, 1}, {&__pyx_n_s_pop, __pyx_k_pop, sizeof(__pyx_k_pop), 0, 0, 1, 1}, {&__pyx_n_s_prepare, __pyx_k_prepare, sizeof(__pyx_k_prepare), 0, 0, 1, 1}, {&__pyx_n_s_print, __pyx_k_print, sizeof(__pyx_k_print), 0, 0, 1, 1}, {&__pyx_n_s_putmask, __pyx_k_putmask, sizeof(__pyx_k_putmask), 0, 0, 1, 1}, {&__pyx_n_s_pyx_getbuffer, __pyx_k_pyx_getbuffer, sizeof(__pyx_k_pyx_getbuffer), 0, 0, 1, 1}, {&__pyx_n_s_pyx_releasebuffer, __pyx_k_pyx_releasebuffer, sizeof(__pyx_k_pyx_releasebuffer), 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_qualname, __pyx_k_qualname, sizeof(__pyx_k_qualname), 0, 0, 1, 1}, {&__pyx_n_s_quotechar, __pyx_k_quotechar, sizeof(__pyx_k_quotechar), 0, 0, 1, 1}, {&__pyx_n_s_quoting, __pyx_k_quoting, sizeof(__pyx_k_quoting), 0, 0, 1, 1}, {&__pyx_n_s_range, __pyx_k_range, sizeof(__pyx_k_range), 0, 0, 1, 1}, {&__pyx_n_s_rb, __pyx_k_rb, sizeof(__pyx_k_rb), 0, 0, 1, 1}, {&__pyx_n_s_read, __pyx_k_read, sizeof(__pyx_k_read), 0, 0, 1, 1}, {&__pyx_n_s_recs, __pyx_k_recs, sizeof(__pyx_k_recs), 0, 0, 1, 1}, {&__pyx_n_s_remove, __pyx_k_remove, sizeof(__pyx_k_remove), 0, 0, 1, 1}, {&__pyx_n_s_result, __pyx_k_result, sizeof(__pyx_k_result), 0, 0, 1, 1}, {&__pyx_n_s_rows, __pyx_k_rows, sizeof(__pyx_k_rows), 0, 0, 1, 1}, {&__pyx_kp_s_s_C_error, __pyx_k_s_C_error, sizeof(__pyx_k_s_C_error), 0, 0, 1, 0}, {&__pyx_kp_s_s_d, __pyx_k_s_d, sizeof(__pyx_k_s_d), 0, 0, 1, 0}, {&__pyx_kp_s_s_len_of_d, __pyx_k_s_len_of_d, sizeof(__pyx_k_s_len_of_d), 0, 0, 1, 0}, {&__pyx_kp_s_s_took_2f_ms, __pyx_k_s_took_2f_ms, sizeof(__pyx_k_s_took_2f_ms), 0, 0, 1, 0}, {&__pyx_n_s_skip_footer, __pyx_k_skip_footer, sizeof(__pyx_k_skip_footer), 0, 0, 1, 1}, {&__pyx_kp_s_skip_footer_can_only_be_used_to, __pyx_k_skip_footer_can_only_be_used_to, sizeof(__pyx_k_skip_footer_can_only_be_used_to), 0, 0, 1, 0}, {&__pyx_n_s_skipinitialspace, __pyx_k_skipinitialspace, sizeof(__pyx_k_skipinitialspace), 0, 0, 1, 1}, {&__pyx_n_s_skiprows, __pyx_k_skiprows, sizeof(__pyx_k_skiprows), 0, 0, 1, 1}, {&__pyx_n_s_source, __pyx_k_source, sizeof(__pyx_k_source), 0, 0, 1, 1}, {&__pyx_n_s_stderr, __pyx_k_stderr, sizeof(__pyx_k_stderr), 0, 0, 1, 1}, {&__pyx_n_s_str, __pyx_k_str, sizeof(__pyx_k_str), 0, 0, 1, 1}, {&__pyx_n_s_stride, __pyx_k_stride, sizeof(__pyx_k_stride), 0, 0, 1, 1}, {&__pyx_n_s_sys, __pyx_k_sys, sizeof(__pyx_k_sys), 0, 0, 1, 1}, {&__pyx_n_s_test, __pyx_k_test, sizeof(__pyx_k_test), 0, 0, 1, 1}, {&__pyx_kp_s_the_dtype_s_is_not_supported_for, __pyx_k_the_dtype_s_is_not_supported_for, sizeof(__pyx_k_the_dtype_s_is_not_supported_for), 0, 0, 1, 0}, {&__pyx_kp_s_the_dtype_s_is_not_supported_for_2, __pyx_k_the_dtype_s_is_not_supported_for_2, sizeof(__pyx_k_the_dtype_s_is_not_supported_for_2), 0, 0, 1, 0}, {&__pyx_n_s_thousands, __pyx_k_thousands, sizeof(__pyx_k_thousands), 0, 0, 1, 1}, {&__pyx_n_s_time, __pyx_k_time, sizeof(__pyx_k_time), 0, 0, 1, 1}, {&__pyx_n_s_to_structured_array, __pyx_k_to_structured_array, sizeof(__pyx_k_to_structured_array), 0, 0, 1, 1}, {&__pyx_n_s_tokenize_chunksize, __pyx_k_tokenize_chunksize, sizeof(__pyx_k_tokenize_chunksize), 0, 0, 1, 1}, {&__pyx_n_b_true, __pyx_k_true, sizeof(__pyx_k_true), 0, 0, 0, 1}, {&__pyx_n_s_true_values, __pyx_k_true_values, sizeof(__pyx_k_true_values), 0, 0, 1, 1}, {&__pyx_n_s_tupleize_cols, __pyx_k_tupleize_cols, sizeof(__pyx_k_tupleize_cols), 0, 0, 1, 1}, {&__pyx_n_s_type, __pyx_k_type, sizeof(__pyx_k_type), 0, 0, 1, 1}, {&__pyx_n_s_u, __pyx_k_u, sizeof(__pyx_k_u), 0, 0, 1, 1}, {&__pyx_n_s_uint16, __pyx_k_uint16, sizeof(__pyx_k_uint16), 0, 0, 1, 1}, {&__pyx_n_s_uint16info, __pyx_k_uint16info, sizeof(__pyx_k_uint16info), 0, 0, 1, 1}, {&__pyx_n_s_uint32, __pyx_k_uint32, sizeof(__pyx_k_uint32), 0, 0, 1, 1}, {&__pyx_n_s_uint32info, __pyx_k_uint32info, sizeof(__pyx_k_uint32info), 0, 0, 1, 1}, {&__pyx_n_s_uint64, __pyx_k_uint64, sizeof(__pyx_k_uint64), 0, 0, 1, 1}, {&__pyx_n_s_uint64info, __pyx_k_uint64info, sizeof(__pyx_k_uint64info), 0, 0, 1, 1}, {&__pyx_n_s_uint8, __pyx_k_uint8, sizeof(__pyx_k_uint8), 0, 0, 1, 1}, {&__pyx_n_s_uint8info, __pyx_k_uint8info, sizeof(__pyx_k_uint8info), 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_upcast_na, __pyx_k_upcast_na, sizeof(__pyx_k_upcast_na), 0, 0, 1, 1}, {&__pyx_n_s_use_unsigned, __pyx_k_use_unsigned, sizeof(__pyx_k_use_unsigned), 0, 0, 1, 1}, {&__pyx_n_s_usecols, __pyx_k_usecols, sizeof(__pyx_k_usecols), 0, 0, 1, 1}, {&__pyx_kp_b_utf_8, __pyx_k_utf_8, sizeof(__pyx_k_utf_8), 0, 0, 0, 0}, {&__pyx_kp_s_utf_8, __pyx_k_utf_8, sizeof(__pyx_k_utf_8), 0, 0, 1, 0}, {&__pyx_n_s_val, __pyx_k_val, sizeof(__pyx_k_val), 0, 0, 1, 1}, {&__pyx_n_s_values, __pyx_k_values, sizeof(__pyx_k_values), 0, 0, 1, 1}, {&__pyx_n_s_verbose, __pyx_k_verbose, sizeof(__pyx_k_verbose), 0, 0, 1, 1}, {&__pyx_n_s_version_info, __pyx_k_version_info, sizeof(__pyx_k_version_info), 0, 0, 1, 1}, {&__pyx_n_s_view, __pyx_k_view, sizeof(__pyx_k_view), 0, 0, 1, 1}, {&__pyx_n_s_warn, __pyx_k_warn, sizeof(__pyx_k_warn), 0, 0, 1, 1}, {&__pyx_n_s_warn_bad_lines, __pyx_k_warn_bad_lines, sizeof(__pyx_k_warn_bad_lines), 0, 0, 1, 1}, {&__pyx_n_s_warning_columns, __pyx_k_warning_columns, sizeof(__pyx_k_warning_columns), 0, 0, 1, 1}, {&__pyx_n_s_warning_message, __pyx_k_warning_message, sizeof(__pyx_k_warning_message), 0, 0, 1, 1}, {&__pyx_n_s_warning_names, __pyx_k_warning_names, sizeof(__pyx_k_warning_names), 0, 0, 1, 1}, {&__pyx_n_s_warnings, __pyx_k_warnings, sizeof(__pyx_k_warnings), 0, 0, 1, 1}, {&__pyx_n_s_x, __pyx_k_x, sizeof(__pyx_k_x), 0, 0, 1, 1}, {0, 0, 0, 0, 0, 0, 0} }; static int __Pyx_InitCachedBuiltins(void) { __pyx_builtin_NameError = __Pyx_GetBuiltinName(__pyx_n_s_NameError); if (!__pyx_builtin_NameError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 67; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_builtin_Exception = __Pyx_GetBuiltinName(__pyx_n_s_Exception); if (!__pyx_builtin_Exception) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1156; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_builtin_ValueError = __Pyx_GetBuiltinName(__pyx_n_s_ValueError); if (!__pyx_builtin_ValueError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1160; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_builtin_ord = __Pyx_GetBuiltinName(__pyx_n_s_ord); if (!__pyx_builtin_ord) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 340; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_range) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 505; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_builtin_IOError = __Pyx_GetBuiltinName(__pyx_n_s_IOError); if (!__pyx_builtin_IOError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 557; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_builtin_enumerate = __Pyx_GetBuiltinName(__pyx_n_s_enumerate); if (!__pyx_builtin_enumerate) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 593; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_builtin_StopIteration = __Pyx_GetBuiltinName(__pyx_n_s_StopIteration); if (!__pyx_builtin_StopIteration) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 752; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_builtin_NotImplementedError = __Pyx_GetBuiltinName(__pyx_n_s_NotImplementedError); if (!__pyx_builtin_NotImplementedError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1040; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_builtin_TypeError = __Pyx_GetBuiltinName(__pyx_n_s_TypeError); if (!__pyx_builtin_TypeError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1067; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_builtin_object = __Pyx_GetBuiltinName(__pyx_n_s_object); if (!__pyx_builtin_object) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1210; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_builtin_IndexError = __Pyx_GetBuiltinName(__pyx_n_s_IndexError); if (!__pyx_builtin_IndexError) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 40; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_builtin_RuntimeError = __Pyx_GetBuiltinName(__pyx_n_s_RuntimeError); if (!__pyx_builtin_RuntimeError) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 803; __pyx_clineno = __LINE__; goto __pyx_L1_error;} return 0; __pyx_L1_error:; return -1; } static int __Pyx_InitCachedConstants(void) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0); /* "pandas/parser.pyx":339 * else: * if len(delimiter) > 1: * raise ValueError('only length-1 separators excluded right now') # <<<<<<<<<<<<<< * self.parser.delimiter = ord(delimiter) * */ __pyx_tuple__5 = PyTuple_Pack(1, __pyx_kp_s_only_length_1_separators_exclude); if (unlikely(!__pyx_tuple__5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 339; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__5); __Pyx_GIVEREF(__pyx_tuple__5); /* "pandas/parser.pyx":350 * if lineterminator is not None: * if len(lineterminator) != 1: * raise ValueError('Only length-1 line terminators supported') # <<<<<<<<<<<<<< * self.parser.lineterminator = ord(lineterminator) * */ __pyx_tuple__6 = PyTuple_Pack(1, __pyx_kp_s_Only_length_1_line_terminators_s); if (unlikely(!__pyx_tuple__6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 350; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__6); __Pyx_GIVEREF(__pyx_tuple__6); /* "pandas/parser.pyx":354 * * if len(decimal) != 1: * raise ValueError('Only length-1 decimal markers supported') # <<<<<<<<<<<<<< * self.parser.decimal = ord(decimal) * */ __pyx_tuple__7 = PyTuple_Pack(1, __pyx_kp_s_Only_length_1_decimal_markers_su); if (unlikely(!__pyx_tuple__7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 354; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__7); __Pyx_GIVEREF(__pyx_tuple__7); /* "pandas/parser.pyx":359 * if thousands is not None: * if len(thousands) != 1: * raise ValueError('Only length-1 thousands markers supported') # <<<<<<<<<<<<<< * self.parser.thousands = ord(thousands) * */ __pyx_tuple__8 = PyTuple_Pack(1, __pyx_kp_s_Only_length_1_thousands_markers); if (unlikely(!__pyx_tuple__8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 359; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__8); __Pyx_GIVEREF(__pyx_tuple__8); /* "pandas/parser.pyx":364 * if escapechar is not None: * if len(escapechar) != 1: * raise ValueError('Only length-1 escapes supported') # <<<<<<<<<<<<<< * self.parser.escapechar = ord(escapechar) * */ __pyx_tuple__9 = PyTuple_Pack(1, __pyx_kp_s_Only_length_1_escapes_supported); if (unlikely(!__pyx_tuple__9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 364; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__9); __Pyx_GIVEREF(__pyx_tuple__9); /* "pandas/parser.pyx":372 * if comment is not None: * if len(comment) > 1: * raise ValueError('Only length-1 comment characters supported') # <<<<<<<<<<<<<< * self.parser.commentchar = ord(comment) * */ __pyx_tuple__10 = PyTuple_Pack(1, __pyx_kp_s_Only_length_1_comment_characters); if (unlikely(!__pyx_tuple__10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 372; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__10); __Pyx_GIVEREF(__pyx_tuple__10); /* "pandas/parser.pyx":420 * if encoding is not None: * if not isinstance(encoding, bytes): * encoding = encoding.encode('utf-8') # <<<<<<<<<<<<<< * encoding = encoding.lower() * self.c_encoding = encoding */ __pyx_tuple__11 = PyTuple_Pack(1, __pyx_kp_s_utf_8); if (unlikely(!__pyx_tuple__11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 420; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__11); __Pyx_GIVEREF(__pyx_tuple__11); /* "pandas/parser.pyx":486 * * if not self.table_width: * raise ValueError("No columns to parse from file") # <<<<<<<<<<<<<< * * # compute buffer_lines as function of table width */ __pyx_tuple__12 = PyTuple_Pack(1, __pyx_kp_s_No_columns_to_parse_from_file); if (unlikely(!__pyx_tuple__12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 486; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__12); __Pyx_GIVEREF(__pyx_tuple__12); /* "pandas/parser.pyx":530 * source = bz2.BZ2File(source, 'rb') * else: * raise ValueError('Python cannot read bz2 from open file ' # <<<<<<<<<<<<<< * 'handle') * else: */ __pyx_tuple__13 = PyTuple_Pack(1, __pyx_kp_s_Python_cannot_read_bz2_from_open); if (unlikely(!__pyx_tuple__13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 530; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__13); __Pyx_GIVEREF(__pyx_tuple__13); /* "pandas/parser.pyx":538 * if isinstance(source, basestring): * if not isinstance(source, bytes): * source = source.encode('utf-8') # <<<<<<<<<<<<<< * * if self.memory_map: */ __pyx_tuple__14 = PyTuple_Pack(1, __pyx_kp_s_utf_8); if (unlikely(!__pyx_tuple__14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 538; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__14); __Pyx_GIVEREF(__pyx_tuple__14); /* "pandas/parser.pyx":558 * if not os.path.exists(source): * raise IOError('File %s does not exist' % source) * raise IOError('Initializing from file failed') # <<<<<<<<<<<<<< * * self.parser.source = ptr */ __pyx_tuple__15 = PyTuple_Pack(1, __pyx_kp_s_Initializing_from_file_failed); if (unlikely(!__pyx_tuple__15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 558; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__15); __Pyx_GIVEREF(__pyx_tuple__15); /* "pandas/parser.pyx":567 * ptr = new_rd_source(source) * if ptr == NULL: * raise IOError('Initializing parser from file-like ' # <<<<<<<<<<<<<< * 'object failed') * */ __pyx_tuple__16 = PyTuple_Pack(1, __pyx_kp_s_Initializing_parser_from_file_li); if (unlikely(!__pyx_tuple__16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 567; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__16); __Pyx_GIVEREF(__pyx_tuple__16); /* "pandas/parser.pyx":707 * self.leading_cols = field_count - passed_count * elif passed_count != field_count: * raise ValueError('Passed header names ' # <<<<<<<<<<<<<< * 'mismatches usecols') * # oh boy, #2442, #2981 */ __pyx_tuple__18 = PyTuple_Pack(1, __pyx_kp_s_Passed_header_names_mismatches_u); if (unlikely(!__pyx_tuple__18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 707; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__18); __Pyx_GIVEREF(__pyx_tuple__18); /* "pandas/parser.pyx":805 * * if self.skip_footer > 0: * raise ValueError('skip_footer can only be used to read ' # <<<<<<<<<<<<<< * 'the whole file') * else: */ __pyx_tuple__19 = PyTuple_Pack(1, __pyx_kp_s_skip_footer_can_only_be_used_to); if (unlikely(!__pyx_tuple__19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 805; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__19); __Pyx_GIVEREF(__pyx_tuple__19); /* "pandas/parser.pyx":1010 * na_filter, na_hashset) * if user_dtype and na_count > 0: * raise Exception('Integer column has NA values') # <<<<<<<<<<<<<< * * if dtype[1:] != 'i8': */ __pyx_tuple__20 = PyTuple_Pack(1, __pyx_kp_s_Integer_column_has_NA_values); if (unlikely(!__pyx_tuple__20)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1010; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__20); __Pyx_GIVEREF(__pyx_tuple__20); /* "pandas/parser.pyx":1012 * raise Exception('Integer column has NA values') * * if dtype[1:] != 'i8': # <<<<<<<<<<<<<< * result = result.astype(dtype) * */ __pyx_slice__21 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__21)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1012; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_slice__21); __Pyx_GIVEREF(__pyx_slice__21); /* "pandas/parser.pyx":1021 * na_filter, na_hashset, na_flist) * * if dtype[1:] != 'f8': # <<<<<<<<<<<<<< * result = result.astype(dtype) * return result, na_count */ __pyx_slice__22 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__22)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1021; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_slice__22); __Pyx_GIVEREF(__pyx_slice__22); /* "pandas/parser.pyx":1044 * elif dtype[1] == 'S': * # TODO: na handling * width = int(dtype[2:]) # <<<<<<<<<<<<<< * if width > 0: * result = _to_fw_string(self.parser, i, start, end, width) */ __pyx_slice__23 = PySlice_New(__pyx_int_2, Py_None, Py_None); if (unlikely(!__pyx_slice__23)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1044; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_slice__23); __Pyx_GIVEREF(__pyx_slice__23); /* "pandas/parser.pyx":1053 * na_hashset) * elif dtype[1] == 'U': * width = int(dtype[2:]) # <<<<<<<<<<<<<< * if width > 0: * raise NotImplementedError("the dtype %s is not supported for parsing" % dtype) */ __pyx_slice__24 = PySlice_New(__pyx_int_2, Py_None, Py_None); if (unlikely(!__pyx_slice__24)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1053; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_slice__24); __Pyx_GIVEREF(__pyx_slice__24); /* "pandas/parser.pyx":1180 * cdef asbytes(object o): * if PY3: * return str(o).encode('utf-8') # <<<<<<<<<<<<<< * else: * return str(o) */ __pyx_tuple__25 = PyTuple_Pack(1, __pyx_kp_s_utf_8); if (unlikely(!__pyx_tuple__25)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1180; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__25); __Pyx_GIVEREF(__pyx_tuple__25); /* "pandas/parser.pyx":1189 * import io * if isinstance(obj, io.TextIOWrapper): * raise CParserError('Cannot handle open unicode files (yet)') # <<<<<<<<<<<<<< * * # BufferedReader is a byte reader for Python 3 */ __pyx_tuple__26 = PyTuple_Pack(1, __pyx_kp_s_Cannot_handle_open_unicode_files); if (unlikely(!__pyx_tuple__26)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1189; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__26); __Pyx_GIVEREF(__pyx_tuple__26); /* "pandas/parser.pyx":1444 * data[0] = NEGINF * else: * return None, None # <<<<<<<<<<<<<< * if use_na_flist: * if data[0] in na_flist: */ __pyx_tuple__27 = PyTuple_Pack(2, Py_None, Py_None); if (unlikely(!__pyx_tuple__27)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1444; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__27); __Pyx_GIVEREF(__pyx_tuple__27); /* "pandas/parser.pyx":1460 * data[0] = NEGINF * else: * return None, None # <<<<<<<<<<<<<< * data += 1 * */ __pyx_tuple__28 = PyTuple_Pack(2, Py_None, Py_None); if (unlikely(!__pyx_tuple__28)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1460; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__28); __Pyx_GIVEREF(__pyx_tuple__28); /* "pandas/parser.pyx":1500 * raise OverflowError(word) * * return None, None # <<<<<<<<<<<<<< * else: * for i in range(lines): */ __pyx_tuple__29 = PyTuple_Pack(2, Py_None, Py_None); if (unlikely(!__pyx_tuple__29)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1500; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__29); __Pyx_GIVEREF(__pyx_tuple__29); /* "pandas/parser.pyx":1509 * if error == ERROR_OVERFLOW: * raise OverflowError(word) * return None, None # <<<<<<<<<<<<<< * * return result, na_count */ __pyx_tuple__30 = PyTuple_Pack(2, Py_None, Py_None); if (unlikely(!__pyx_tuple__30)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1509; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__30); __Pyx_GIVEREF(__pyx_tuple__30); /* "pandas/parser.pyx":1546 * error = to_boolean(word, data) * if error != 0: * return None, None # <<<<<<<<<<<<<< * data += 1 * else: */ __pyx_tuple__31 = PyTuple_Pack(2, Py_None, Py_None); if (unlikely(!__pyx_tuple__31)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1546; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__31); __Pyx_GIVEREF(__pyx_tuple__31); /* "pandas/parser.pyx":1554 * error = to_boolean(word, data) * if error != 0: * return None, None # <<<<<<<<<<<<<< * data += 1 * */ __pyx_tuple__32 = PyTuple_Pack(2, Py_None, Py_None); if (unlikely(!__pyx_tuple__32)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1554; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__32); __Pyx_GIVEREF(__pyx_tuple__32); /* "pandas/parser.pyx":1605 * error = to_boolean(word, data) * if error != 0: * return None, None # <<<<<<<<<<<<<< * data += 1 * else: */ __pyx_tuple__33 = PyTuple_Pack(2, Py_None, Py_None); if (unlikely(!__pyx_tuple__33)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1605; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__33); __Pyx_GIVEREF(__pyx_tuple__33); /* "pandas/parser.pyx":1625 * error = to_boolean(word, data) * if error != 0: * return None, None # <<<<<<<<<<<<<< * data += 1 * */ __pyx_tuple__34 = PyTuple_Pack(2, Py_None, Py_None); if (unlikely(!__pyx_tuple__34)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1625; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__34); __Pyx_GIVEREF(__pyx_tuple__34); /* "pandas/parser.pyx":1674 * # None creeps in sometimes, which isn't possible here * if not PyBytes_Check(val): * raise Exception('Must be all encoded bytes') # <<<<<<<<<<<<<< * * k = kh_put_str(table, PyBytes_AsString(val), &ret) */ __pyx_tuple__35 = PyTuple_Pack(1, __pyx_kp_s_Must_be_all_encoded_bytes); if (unlikely(!__pyx_tuple__35)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1674; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__35); __Pyx_GIVEREF(__pyx_tuple__35); /* "pandas/parser.pyx":1951 * if values is None: * return [] * return [x.encode('utf-8') if isinstance(x, unicode) else x for x in values] # <<<<<<<<<<<<<< */ __pyx_tuple__37 = PyTuple_Pack(1, __pyx_kp_s_utf_8); if (unlikely(!__pyx_tuple__37)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1951; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__37); __Pyx_GIVEREF(__pyx_tuple__37); /* "util.pxd":40 * i += sz * elif i >= sz or sz == 0: * raise IndexError('index out of bounds') # <<<<<<<<<<<<<< * * return get_value_1d(arr, i) */ __pyx_tuple__38 = PyTuple_Pack(1, __pyx_kp_s_index_out_of_bounds); if (unlikely(!__pyx_tuple__38)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 40; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__38); __Pyx_GIVEREF(__pyx_tuple__38); /* "util.pxd":57 * i += sz * elif i >= sz: * raise IndexError('index out of bounds') # <<<<<<<<<<<<<< * * assign_value_1d(arr, i, value) */ __pyx_tuple__39 = PyTuple_Pack(1, __pyx_kp_s_index_out_of_bounds); if (unlikely(!__pyx_tuple__39)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 57; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__39); __Pyx_GIVEREF(__pyx_tuple__39); /* "numpy.pxd":217 * 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__40 = PyTuple_Pack(1, __pyx_kp_u_ndarray_is_not_C_contiguous); if (unlikely(!__pyx_tuple__40)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 217; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__40); __Pyx_GIVEREF(__pyx_tuple__40); /* "numpy.pxd":221 * 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__41 = PyTuple_Pack(1, __pyx_kp_u_ndarray_is_not_Fortran_contiguou); if (unlikely(!__pyx_tuple__41)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 221; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__41); __Pyx_GIVEREF(__pyx_tuple__41); /* "numpy.pxd":259 * if ((descr.byteorder == '>' and little_endian) or * (descr.byteorder == '<' 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__42 = PyTuple_Pack(1, __pyx_kp_u_Non_native_byte_order_not_suppor); if (unlikely(!__pyx_tuple__42)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 259; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__42); __Pyx_GIVEREF(__pyx_tuple__42); /* "numpy.pxd":803 * * if (end - f) - (new_offset - offset[0]) < 15: * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") # <<<<<<<<<<<<<< * * if ((child.byteorder == '>' and little_endian) or */ __pyx_tuple__43 = PyTuple_Pack(1, __pyx_kp_u_Format_string_allocated_too_shor); if (unlikely(!__pyx_tuple__43)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 803; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__43); __Pyx_GIVEREF(__pyx_tuple__43); /* "numpy.pxd":807 * if ((child.byteorder == '>' and little_endian) or * (child.byteorder == '<' 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__44 = PyTuple_Pack(1, __pyx_kp_u_Non_native_byte_order_not_suppor); if (unlikely(!__pyx_tuple__44)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 807; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__44); __Pyx_GIVEREF(__pyx_tuple__44); /* "numpy.pxd":827 * 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__45 = PyTuple_Pack(1, __pyx_kp_u_Format_string_allocated_too_shor_2); if (unlikely(!__pyx_tuple__45)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 827; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__45); __Pyx_GIVEREF(__pyx_tuple__45); /* "pandas/parser.pyx":1167 * * * def _ensure_encoded(list lst): # <<<<<<<<<<<<<< * cdef list result = [] * for x in lst: */ __pyx_tuple__47 = PyTuple_Pack(3, __pyx_n_s_lst, __pyx_n_s_result, __pyx_n_s_x); if (unlikely(!__pyx_tuple__47)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1167; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__47); __Pyx_GIVEREF(__pyx_tuple__47); __pyx_codeobj__48 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__47, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_yoh_deb_gits_pkg_exppsy_pa, __pyx_n_s_ensure_encoded, 1167, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__48)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1167; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/parser.pyx":1185 * * * def _is_file_like(obj): # <<<<<<<<<<<<<< * if PY3: * import io */ __pyx_tuple__49 = PyTuple_Pack(4, __pyx_n_s_obj, __pyx_n_s_io, __pyx_n_s_file, __pyx_n_s_builtin); if (unlikely(!__pyx_tuple__49)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1185; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__49); __Pyx_GIVEREF(__pyx_tuple__49); __pyx_codeobj__50 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__49, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_yoh_deb_gits_pkg_exppsy_pa, __pyx_n_s_is_file_like, 1185, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__50)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1185; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/parser.pyx":1200 * * * def _maybe_upcast(arr): # <<<<<<<<<<<<<< * """ * */ __pyx_tuple__51 = PyTuple_Pack(3, __pyx_n_s_arr, __pyx_n_s_na_value, __pyx_n_s_mask); if (unlikely(!__pyx_tuple__51)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1200; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__51); __Pyx_GIVEREF(__pyx_tuple__51); __pyx_codeobj__52 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__51, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_yoh_deb_gits_pkg_exppsy_pa, __pyx_n_s_maybe_upcast, 1200, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__52)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1200; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/parser.pyx":1700 * * * def downcast_int64(ndarray[int64_t] arr, bint use_unsigned=0): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = len(arr) */ __pyx_tuple__53 = PyTuple_Pack(12, __pyx_n_s_arr, __pyx_n_s_use_unsigned, __pyx_n_s_i, __pyx_n_s_n, __pyx_n_s_mx, __pyx_n_s_mn, __pyx_n_s_NA, __pyx_n_s_val, __pyx_n_s_mask, __pyx_n_s_na_count, __pyx_n_s_mask_2, __pyx_n_s_result); if (unlikely(!__pyx_tuple__53)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1700; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__53); __Pyx_GIVEREF(__pyx_tuple__53); __pyx_codeobj__54 = (PyObject*)__Pyx_PyCode_New(2, 0, 12, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__53, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_yoh_deb_gits_pkg_exppsy_pa, __pyx_n_s_downcast_int64, 1700, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__54)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1700; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/parser.pyx":1770 * * * def _concatenate_chunks(list chunks): # <<<<<<<<<<<<<< * cdef: * list names = list(chunks[0].keys()) */ __pyx_tuple__55 = PyTuple_Pack(12, __pyx_n_s_chunks, __pyx_n_s_names, __pyx_n_s_name, __pyx_n_s_warning_columns, __pyx_n_s_warning_names, __pyx_n_s_common_type, __pyx_n_s_result, __pyx_n_s_arrs, __pyx_n_s_dtypes, __pyx_n_s_warning_message, __pyx_n_s_chunk, __pyx_n_s_a); if (unlikely(!__pyx_tuple__55)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1770; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__55); __Pyx_GIVEREF(__pyx_tuple__55); __pyx_codeobj__56 = (PyObject*)__Pyx_PyCode_New(1, 0, 12, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__55, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_yoh_deb_gits_pkg_exppsy_pa, __pyx_n_s_concatenate_chunks, 1770, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__56)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1770; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/parser.pyx":1801 * * # NA values * def _compute_na_values(): # <<<<<<<<<<<<<< * int64info = np.iinfo(np.int64) * int32info = np.iinfo(np.int32) */ __pyx_tuple__57 = PyTuple_Pack(9, __pyx_n_s_int64info, __pyx_n_s_int32info, __pyx_n_s_int16info, __pyx_n_s_int8info, __pyx_n_s_uint64info, __pyx_n_s_uint32info, __pyx_n_s_uint16info, __pyx_n_s_uint8info, __pyx_n_s_na_values); if (unlikely(!__pyx_tuple__57)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1801; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__57); __Pyx_GIVEREF(__pyx_tuple__57); __pyx_codeobj__58 = (PyObject*)__Pyx_PyCode_New(0, 0, 9, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__57, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_yoh_deb_gits_pkg_exppsy_pa, __pyx_n_s_compute_na_values, 1801, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__58)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1801; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/parser.pyx":1869 * * * def _to_structured_array(dict columns, object names): # <<<<<<<<<<<<<< * cdef: * ndarray recs, column */ __pyx_tuple__59 = PyTuple_Pack(16, __pyx_n_s_columns, __pyx_n_s_names, __pyx_n_s_recs, __pyx_n_s_column, __pyx_n_s_dt, __pyx_n_s_fields, __pyx_n_s_name, __pyx_n_s_fnames, __pyx_n_s_field_type, __pyx_n_s_i, __pyx_n_s_offset, __pyx_n_s_nfields, __pyx_n_s_length, __pyx_n_s_stride, __pyx_n_s_elsize, __pyx_n_s_buf); if (unlikely(!__pyx_tuple__59)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1869; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__59); __Pyx_GIVEREF(__pyx_tuple__59); __pyx_codeobj__60 = (PyObject*)__Pyx_PyCode_New(2, 0, 16, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__59, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_yoh_deb_gits_pkg_exppsy_pa, __pyx_n_s_to_structured_array, 1869, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__60)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1869; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/parser.pyx":1948 * * * def _maybe_encode(values): # <<<<<<<<<<<<<< * if values is None: * return [] */ __pyx_tuple__61 = PyTuple_Pack(2, __pyx_n_s_values, __pyx_n_s_x); if (unlikely(!__pyx_tuple__61)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1948; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__61); __Pyx_GIVEREF(__pyx_tuple__61); __pyx_codeobj__62 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__61, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_yoh_deb_gits_pkg_exppsy_pa, __pyx_n_s_maybe_encode, 1948, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__62)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1948; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __pyx_int_0 = PyInt_FromLong(0); if (unlikely(!__pyx_int_0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_int_1 = PyInt_FromLong(1); if (unlikely(!__pyx_int_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_int_2 = PyInt_FromLong(2); if (unlikely(!__pyx_int_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_int_3 = PyInt_FromLong(3); if (unlikely(!__pyx_int_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_int_15 = PyInt_FromLong(15); if (unlikely(!__pyx_int_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_int_1000 = PyInt_FromLong(1000); if (unlikely(!__pyx_int_1000)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_int_262144 = PyInt_FromLong(262144L); if (unlikely(!__pyx_int_262144)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} return 0; __pyx_L1_error:; return -1; } #if PY_MAJOR_VERSION < 3 PyMODINIT_FUNC initparser(void); /*proto*/ PyMODINIT_FUNC initparser(void) #else PyMODINIT_FUNC PyInit_parser(void); /*proto*/ PyMODINIT_FUNC PyInit_parser(void) #endif { PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_t_3; double __pyx_t_4; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; int __pyx_t_8; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; Py_ssize_t __pyx_t_11; PyObject *__pyx_t_12 = NULL; PyObject *__pyx_t_13 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannyDeclarations #if CYTHON_REFNANNY __Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny"); if (!__Pyx_RefNanny) { PyErr_Clear(); __Pyx_RefNanny = __Pyx_RefNannyImportAPI("Cython.Runtime.refnanny"); if (!__Pyx_RefNanny) Py_FatalError("failed to import 'refnanny' module"); } #endif __Pyx_RefNannySetupContext("PyMODINIT_FUNC PyInit_parser(void)", 0); if ( __Pyx_check_binary_version() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_empty_tuple)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_bytes)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #ifdef __Pyx_CyFunction_USED if (__Pyx_CyFunction_init() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif #ifdef __Pyx_FusedFunction_USED if (__pyx_FusedFunction_init() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif #ifdef __Pyx_Generator_USED if (__pyx_Generator_init() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif /*--- Library function declarations ---*/ /*--- Threads initialization code ---*/ #if defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS #ifdef WITH_THREAD /* Python build with threading support? */ PyEval_InitThreads(); #endif #endif /*--- Module creation code ---*/ #if PY_MAJOR_VERSION < 3 __pyx_m = Py_InitModule4(__Pyx_NAMESTR("parser"), __pyx_methods, 0, 0, PYTHON_API_VERSION); Py_XINCREF(__pyx_m); #else __pyx_m = PyModule_Create(&__pyx_moduledef); #endif if (unlikely(!__pyx_m)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_d)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} Py_INCREF(__pyx_d); __pyx_b = PyImport_AddModule(__Pyx_NAMESTR(__Pyx_BUILTIN_MODULE_NAME)); if (unlikely(!__pyx_b)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #if CYTHON_COMPILING_IN_PYPY Py_INCREF(__pyx_b); #endif if (__Pyx_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; /*--- Initialize various global constants etc. ---*/ if (unlikely(__Pyx_InitGlobals() < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif if (__pyx_module_is_main_pandas__parser) { if (__Pyx_SetAttrString(__pyx_m, "__name__", __pyx_n_s_main) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; } #if PY_MAJOR_VERSION >= 3 { PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (!PyDict_GetItemString(modules, "pandas.parser")) { if (unlikely(PyDict_SetItemString(modules, "pandas.parser", __pyx_m) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } } #endif /*--- Builtin init code ---*/ if (unlikely(__Pyx_InitCachedBuiltins() < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /*--- Constants init code ---*/ if (unlikely(__Pyx_InitCachedConstants() < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /*--- Global init code ---*/ __pyx_v_6pandas_6parser__true_values = Py_None; Py_INCREF(Py_None); __pyx_v_6pandas_6parser__false_values = Py_None; Py_INCREF(Py_None); __pyx_v_6pandas_6parser_dtype_cast_order = ((PyObject*)Py_None); Py_INCREF(Py_None); /*--- Variable export code ---*/ /*--- Function export code ---*/ /*--- Type init code ---*/ __pyx_vtabptr_6pandas_6parser_TextReader = &__pyx_vtable_6pandas_6parser_TextReader; __pyx_vtable_6pandas_6parser_TextReader._make_skiprow_set = (PyObject *(*)(struct __pyx_obj_6pandas_6parser_TextReader *))__pyx_f_6pandas_6parser_10TextReader__make_skiprow_set; __pyx_vtable_6pandas_6parser_TextReader._setup_parser_source = (PyObject *(*)(struct __pyx_obj_6pandas_6parser_TextReader *, PyObject *))__pyx_f_6pandas_6parser_10TextReader__setup_parser_source; __pyx_vtable_6pandas_6parser_TextReader._get_header = (PyObject *(*)(struct __pyx_obj_6pandas_6parser_TextReader *))__pyx_f_6pandas_6parser_10TextReader__get_header; __pyx_vtable_6pandas_6parser_TextReader._implicit_index_count = (PyObject *(*)(struct __pyx_obj_6pandas_6parser_TextReader *))__pyx_f_6pandas_6parser_10TextReader__implicit_index_count; __pyx_vtable_6pandas_6parser_TextReader._read_low_memory = (PyObject *(*)(struct __pyx_obj_6pandas_6parser_TextReader *, PyObject *))__pyx_f_6pandas_6parser_10TextReader__read_low_memory; __pyx_vtable_6pandas_6parser_TextReader._tokenize_rows = (PyObject *(*)(struct __pyx_obj_6pandas_6parser_TextReader *, size_t))__pyx_f_6pandas_6parser_10TextReader__tokenize_rows; __pyx_vtable_6pandas_6parser_TextReader._read_rows = (PyObject *(*)(struct __pyx_obj_6pandas_6parser_TextReader *, PyObject *, int))__pyx_f_6pandas_6parser_10TextReader__read_rows; __pyx_vtable_6pandas_6parser_TextReader._start_clock = (PyObject *(*)(struct __pyx_obj_6pandas_6parser_TextReader *))__pyx_f_6pandas_6parser_10TextReader__start_clock; __pyx_vtable_6pandas_6parser_TextReader._end_clock = (PyObject *(*)(struct __pyx_obj_6pandas_6parser_TextReader *, PyObject *))__pyx_f_6pandas_6parser_10TextReader__end_clock; __pyx_vtable_6pandas_6parser_TextReader._convert_tokens = (PyObject *(*)(struct __pyx_obj_6pandas_6parser_TextReader *, Py_ssize_t, int, int, PyObject *, int, kh_str_t *, PyObject *))__pyx_f_6pandas_6parser_10TextReader__convert_tokens; __pyx_vtable_6pandas_6parser_TextReader._convert_with_dtype = (PyObject *(*)(struct __pyx_obj_6pandas_6parser_TextReader *, PyObject *, Py_ssize_t, int, int, int, int, kh_str_t *, PyObject *))__pyx_f_6pandas_6parser_10TextReader__convert_with_dtype; __pyx_vtable_6pandas_6parser_TextReader._string_convert = (PyObject *(*)(struct __pyx_obj_6pandas_6parser_TextReader *, Py_ssize_t, int, int, int, kh_str_t *))__pyx_f_6pandas_6parser_10TextReader__string_convert; __pyx_vtable_6pandas_6parser_TextReader._get_na_list = (PyObject *(*)(struct __pyx_obj_6pandas_6parser_TextReader *, PyObject *, PyObject *))__pyx_f_6pandas_6parser_10TextReader__get_na_list; __pyx_vtable_6pandas_6parser_TextReader._free_na_set = (PyObject *(*)(struct __pyx_obj_6pandas_6parser_TextReader *, kh_str_t *))__pyx_f_6pandas_6parser_10TextReader__free_na_set; __pyx_vtable_6pandas_6parser_TextReader._get_column_name = (PyObject *(*)(struct __pyx_obj_6pandas_6parser_TextReader *, Py_ssize_t, Py_ssize_t))__pyx_f_6pandas_6parser_10TextReader__get_column_name; if (PyType_Ready(&__pyx_type_6pandas_6parser_TextReader) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 230; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_type_6pandas_6parser_TextReader.tp_print = 0; if (__Pyx_SetVtable(__pyx_type_6pandas_6parser_TextReader.tp_dict, __pyx_vtabptr_6pandas_6parser_TextReader) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 230; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__Pyx_SetAttrString(__pyx_m, "TextReader", (PyObject *)&__pyx_type_6pandas_6parser_TextReader) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 230; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_6pandas_6parser_TextReader = &__pyx_type_6pandas_6parser_TextReader; /*--- Type import code ---*/ __pyx_ptype_7cpython_4type_type = __Pyx_ImportType(__Pyx_BUILTIN_MODULE_NAME, "type", #if CYTHON_COMPILING_IN_PYPY sizeof(PyTypeObject), #else sizeof(PyHeapTypeObject), #endif 0); if (unlikely(!__pyx_ptype_7cpython_4type_type)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 9; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_7cpython_4bool_bool = __Pyx_ImportType(__Pyx_BUILTIN_MODULE_NAME, "bool", sizeof(PyBoolObject), 0); if (unlikely(!__pyx_ptype_7cpython_4bool_bool)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 8; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_7cpython_7complex_complex = __Pyx_ImportType(__Pyx_BUILTIN_MODULE_NAME, "complex", sizeof(PyComplexObject), 0); if (unlikely(!__pyx_ptype_7cpython_7complex_complex)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 15; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_5numpy_dtype = __Pyx_ImportType("numpy", "dtype", sizeof(PyArray_Descr), 0); if (unlikely(!__pyx_ptype_5numpy_dtype)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_5numpy_flatiter = __Pyx_ImportType("numpy", "flatiter", sizeof(PyArrayIterObject), 0); if (unlikely(!__pyx_ptype_5numpy_flatiter)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 167; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_5numpy_broadcast = __Pyx_ImportType("numpy", "broadcast", sizeof(PyArrayMultiIterObject), 0); if (unlikely(!__pyx_ptype_5numpy_broadcast)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 171; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_5numpy_ndarray = __Pyx_ImportType("numpy", "ndarray", sizeof(PyArrayObject), 0); if (unlikely(!__pyx_ptype_5numpy_ndarray)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_5numpy_ufunc = __Pyx_ImportType("numpy", "ufunc", sizeof(PyUFuncObject), 0); if (unlikely(!__pyx_ptype_5numpy_ufunc)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 865; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /*--- Variable import code ---*/ /*--- Function import code ---*/ /*--- Execution code ---*/ /* "pandas/parser.pyx":8 * from libc.string cimport strncpy, strlen, strcmp, strcasecmp * cimport libc.stdio as stdio * import warnings # <<<<<<<<<<<<<< * * from cpython cimport (PyObject, PyBytes_FromString, */ __pyx_t_1 = __Pyx_Import(__pyx_n_s_warnings, 0, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 8; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_warnings, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 8; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pandas/parser.pyx":13 * PyBytes_AsString, PyBytes_Check, * PyUnicode_Check, PyUnicode_AsUTF8String) * from io.common import DtypeWarning # <<<<<<<<<<<<<< * * */ __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 13; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_n_s_DtypeWarning); PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_DtypeWarning); __Pyx_GIVEREF(__pyx_n_s_DtypeWarning); __pyx_t_2 = __Pyx_Import(__pyx_n_s_io_common, __pyx_t_1, -1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 13; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_DtypeWarning); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 13; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_DtypeWarning, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 13; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/parser.pyx":29 * from numpy cimport ndarray, uint8_t, uint64_t * * import numpy as np # <<<<<<<<<<<<<< * cimport util * */ __pyx_t_2 = __Pyx_Import(__pyx_n_s_numpy, 0, -1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 29; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_np, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 29; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/parser.pyx":32 * cimport util * * import pandas.lib as lib # <<<<<<<<<<<<<< * * import time */ __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 32; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_n_s__46); PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s__46); __Pyx_GIVEREF(__pyx_n_s__46); __pyx_t_1 = __Pyx_Import(__pyx_n_s_pandas_lib, __pyx_t_2, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 32; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (PyDict_SetItem(__pyx_d, __pyx_n_s_lib, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 32; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pandas/parser.pyx":34 * import pandas.lib as lib * * import time # <<<<<<<<<<<<<< * import os * */ __pyx_t_1 = __Pyx_Import(__pyx_n_s_time, 0, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 34; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_time, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 34; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pandas/parser.pyx":35 * * import time * import os # <<<<<<<<<<<<<< * * cnp.import_array() */ __pyx_t_1 = __Pyx_Import(__pyx_n_s_os, 0, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_os, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pandas/parser.pyx":37 * import os * * cnp.import_array() # <<<<<<<<<<<<<< * * from khash cimport * */ import_array(); /* "pandas/parser.pyx":41 * from khash cimport * * * import sys # <<<<<<<<<<<<<< * * cdef bint PY3 = (sys.version_info[0] >= 3) */ __pyx_t_1 = __Pyx_Import(__pyx_n_s_sys, 0, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 41; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_sys, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 41; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pandas/parser.pyx":43 * import sys * * cdef bint PY3 = (sys.version_info[0] >= 3) # <<<<<<<<<<<<<< * * cdef double INF = np.inf */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_sys); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 43; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_version_info); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 43; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_2, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 43; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_RichCompare(__pyx_t_1, __pyx_int_3, Py_GE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 43; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 43; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_6pandas_6parser_PY3 = __pyx_t_3; /* "pandas/parser.pyx":45 * cdef bint PY3 = (sys.version_info[0] >= 3) * * cdef double INF = np.inf # <<<<<<<<<<<<<< * cdef double NEGINF = -INF * */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 45; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_inf); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 45; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_4 = __pyx_PyFloat_AsDouble(__pyx_t_1); if (unlikely((__pyx_t_4 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 45; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_6pandas_6parser_INF = ((double)__pyx_t_4); /* "pandas/parser.pyx":46 * * cdef double INF = np.inf * cdef double NEGINF = -INF # <<<<<<<<<<<<<< * * cdef extern from "headers/stdint.h": */ __pyx_v_6pandas_6parser_NEGINF = (-__pyx_v_6pandas_6parser_INF); /* "pandas/parser.pyx":65 * pass * * try: # <<<<<<<<<<<<<< * basestring * except NameError: */ { __Pyx_ExceptionSave(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7); __Pyx_XGOTREF(__pyx_t_5); __Pyx_XGOTREF(__pyx_t_6); __Pyx_XGOTREF(__pyx_t_7); /*try:*/ { /* "pandas/parser.pyx":66 * * try: * basestring # <<<<<<<<<<<<<< * except NameError: * basestring = str */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_basestring); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 66; __pyx_clineno = __LINE__; goto __pyx_L2_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; goto __pyx_L9_try_end; __pyx_L2_error:; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pandas/parser.pyx":67 * try: * basestring * except NameError: # <<<<<<<<<<<<<< * basestring = str * */ __pyx_t_8 = PyErr_ExceptionMatches(__pyx_builtin_NameError); if (__pyx_t_8) { __Pyx_AddTraceback("pandas.parser", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_2, &__pyx_t_9) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 67; __pyx_clineno = __LINE__; goto __pyx_L4_except_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_GOTREF(__pyx_t_2); __Pyx_GOTREF(__pyx_t_9); /* "pandas/parser.pyx":68 * basestring * except NameError: * basestring = str # <<<<<<<<<<<<<< * * cdef extern from "parser/tokenizer.h": */ if (PyDict_SetItem(__pyx_d, __pyx_n_s_basestring, ((PyObject *)((PyObject*)(&PyString_Type)))) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 68; __pyx_clineno = __LINE__; goto __pyx_L4_except_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; goto __pyx_L3_exception_handled; } goto __pyx_L4_except_error; __pyx_L4_except_error:; __Pyx_XGIVEREF(__pyx_t_5); __Pyx_XGIVEREF(__pyx_t_6); __Pyx_XGIVEREF(__pyx_t_7); __Pyx_ExceptionReset(__pyx_t_5, __pyx_t_6, __pyx_t_7); goto __pyx_L1_error; __pyx_L3_exception_handled:; __Pyx_XGIVEREF(__pyx_t_5); __Pyx_XGIVEREF(__pyx_t_6); __Pyx_XGIVEREF(__pyx_t_7); __Pyx_ExceptionReset(__pyx_t_5, __pyx_t_6, __pyx_t_7); __pyx_L9_try_end:; } /* "pandas/parser.pyx":220 * * * DEFAULT_CHUNKSIZE = 256 * 1024 # <<<<<<<<<<<<<< * * # common NA values */ if (PyDict_SetItem(__pyx_d, __pyx_n_s_DEFAULT_CHUNKSIZE, __pyx_int_262144) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 220; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/parser.pyx":225 * # no longer excluding inf representations * # '1.#INF','-1.#INF', '1.#INF000000', * _NA_VALUES = [b'-1.#IND', b'1.#QNAN', b'1.#IND', b'-1.#QNAN', # <<<<<<<<<<<<<< * b'#N/A N/A', b'NA', b'#NA', b'NULL', b'NaN', * b'nan', b''] */ __pyx_t_9 = PyList_New(11); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 225; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_INCREF(__pyx_kp_b_1_IND); PyList_SET_ITEM(__pyx_t_9, 0, __pyx_kp_b_1_IND); __Pyx_GIVEREF(__pyx_kp_b_1_IND); __Pyx_INCREF(__pyx_kp_b_1_QNAN); PyList_SET_ITEM(__pyx_t_9, 1, __pyx_kp_b_1_QNAN); __Pyx_GIVEREF(__pyx_kp_b_1_QNAN); __Pyx_INCREF(__pyx_kp_b_1_IND_2); PyList_SET_ITEM(__pyx_t_9, 2, __pyx_kp_b_1_IND_2); __Pyx_GIVEREF(__pyx_kp_b_1_IND_2); __Pyx_INCREF(__pyx_kp_b_1_QNAN_2); PyList_SET_ITEM(__pyx_t_9, 3, __pyx_kp_b_1_QNAN_2); __Pyx_GIVEREF(__pyx_kp_b_1_QNAN_2); __Pyx_INCREF(__pyx_kp_b_N_A_N_A); PyList_SET_ITEM(__pyx_t_9, 4, __pyx_kp_b_N_A_N_A); __Pyx_GIVEREF(__pyx_kp_b_N_A_N_A); __Pyx_INCREF(__pyx_n_b_NA); PyList_SET_ITEM(__pyx_t_9, 5, __pyx_n_b_NA); __Pyx_GIVEREF(__pyx_n_b_NA); __Pyx_INCREF(__pyx_kp_b_NA_2); PyList_SET_ITEM(__pyx_t_9, 6, __pyx_kp_b_NA_2); __Pyx_GIVEREF(__pyx_kp_b_NA_2); __Pyx_INCREF(__pyx_n_b_NULL); PyList_SET_ITEM(__pyx_t_9, 7, __pyx_n_b_NULL); __Pyx_GIVEREF(__pyx_n_b_NULL); __Pyx_INCREF(__pyx_n_b_NaN); PyList_SET_ITEM(__pyx_t_9, 8, __pyx_n_b_NaN); __Pyx_GIVEREF(__pyx_n_b_NaN); __Pyx_INCREF(__pyx_n_b_nan); PyList_SET_ITEM(__pyx_t_9, 9, __pyx_n_b_nan); __Pyx_GIVEREF(__pyx_n_b_nan); __Pyx_INCREF(__pyx_kp_b__17); PyList_SET_ITEM(__pyx_t_9, 10, __pyx_kp_b__17); __Pyx_GIVEREF(__pyx_kp_b__17); if (PyDict_SetItem(__pyx_d, __pyx_n_s_NA_VALUES, __pyx_t_9) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 225; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; /* "pandas/parser.pyx":274 * * memory_map=False, * tokenize_chunksize=DEFAULT_CHUNKSIZE, # <<<<<<<<<<<<<< * delim_whitespace=False, * */ __pyx_t_9 = __Pyx_GetModuleGlobalName(__pyx_n_s_DEFAULT_CHUNKSIZE); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 274; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_k__2 = __pyx_t_9; __Pyx_GIVEREF(__pyx_t_9); __pyx_t_9 = 0; /* "pandas/parser.pyx":1156 * return None * * class CParserError(Exception): # <<<<<<<<<<<<<< * pass * */ __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1156; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_INCREF(__pyx_builtin_Exception); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_builtin_Exception); __Pyx_GIVEREF(__pyx_builtin_Exception); __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_9); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1156; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_9, __pyx_n_s_CParserError, __pyx_n_s_CParserError, (PyObject *) NULL, __pyx_n_s_pandas_parser, (PyObject *) NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1156; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_10 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_CParserError, __pyx_t_9, __pyx_t_1, NULL, 0, 1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1156; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); if (PyDict_SetItem(__pyx_d, __pyx_n_s_CParserError, __pyx_t_10) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1156; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; /* "pandas/parser.pyx":1160 * * * class OverflowError(ValueError): # <<<<<<<<<<<<<< * pass * */ __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1160; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_INCREF(__pyx_builtin_ValueError); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_builtin_ValueError); __Pyx_GIVEREF(__pyx_builtin_ValueError); __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_9); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1160; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_9, __pyx_n_s_OverflowError, __pyx_n_s_OverflowError, (PyObject *) NULL, __pyx_n_s_pandas_parser, (PyObject *) NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1160; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_10 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_OverflowError, __pyx_t_9, __pyx_t_1, NULL, 0, 1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1160; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); if (PyDict_SetItem(__pyx_d, __pyx_n_s_OverflowError, __pyx_t_10) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1160; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; /* "pandas/parser.pyx":1163 * pass * * cdef object _true_values = [b'True', b'TRUE', b'true'] # <<<<<<<<<<<<<< * cdef object _false_values = [b'False', b'FALSE', b'false'] * */ __pyx_t_9 = PyList_New(3); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1163; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_INCREF(__pyx_n_b_True); PyList_SET_ITEM(__pyx_t_9, 0, __pyx_n_b_True); __Pyx_GIVEREF(__pyx_n_b_True); __Pyx_INCREF(__pyx_n_b_TRUE); PyList_SET_ITEM(__pyx_t_9, 1, __pyx_n_b_TRUE); __Pyx_GIVEREF(__pyx_n_b_TRUE); __Pyx_INCREF(__pyx_n_b_true); PyList_SET_ITEM(__pyx_t_9, 2, __pyx_n_b_true); __Pyx_GIVEREF(__pyx_n_b_true); __Pyx_XGOTREF(__pyx_v_6pandas_6parser__true_values); __Pyx_DECREF_SET(__pyx_v_6pandas_6parser__true_values, __pyx_t_9); __Pyx_GIVEREF(__pyx_t_9); __pyx_t_9 = 0; /* "pandas/parser.pyx":1164 * * cdef object _true_values = [b'True', b'TRUE', b'true'] * cdef object _false_values = [b'False', b'FALSE', b'false'] # <<<<<<<<<<<<<< * * */ __pyx_t_9 = PyList_New(3); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1164; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_INCREF(__pyx_n_b_False); PyList_SET_ITEM(__pyx_t_9, 0, __pyx_n_b_False); __Pyx_GIVEREF(__pyx_n_b_False); __Pyx_INCREF(__pyx_n_b_FALSE); PyList_SET_ITEM(__pyx_t_9, 1, __pyx_n_b_FALSE); __Pyx_GIVEREF(__pyx_n_b_FALSE); __Pyx_INCREF(__pyx_n_b_false); PyList_SET_ITEM(__pyx_t_9, 2, __pyx_n_b_false); __Pyx_GIVEREF(__pyx_n_b_false); __Pyx_XGOTREF(__pyx_v_6pandas_6parser__false_values); __Pyx_DECREF_SET(__pyx_v_6pandas_6parser__false_values, __pyx_t_9); __Pyx_GIVEREF(__pyx_t_9); __pyx_t_9 = 0; /* "pandas/parser.pyx":1167 * * * def _ensure_encoded(list lst): # <<<<<<<<<<<<<< * cdef list result = [] * for x in lst: */ __pyx_t_9 = PyCFunction_NewEx(&__pyx_mdef_6pandas_6parser_1_ensure_encoded, NULL, __pyx_n_s_pandas_parser); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1167; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); if (PyDict_SetItem(__pyx_d, __pyx_n_s_ensure_encoded, __pyx_t_9) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1167; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; /* "pandas/parser.pyx":1185 * * * def _is_file_like(obj): # <<<<<<<<<<<<<< * if PY3: * import io */ __pyx_t_9 = PyCFunction_NewEx(&__pyx_mdef_6pandas_6parser_3_is_file_like, NULL, __pyx_n_s_pandas_parser); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1185; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); if (PyDict_SetItem(__pyx_d, __pyx_n_s_is_file_like, __pyx_t_9) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1185; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; /* "pandas/parser.pyx":1200 * * * def _maybe_upcast(arr): # <<<<<<<<<<<<<< * """ * */ __pyx_t_9 = PyCFunction_NewEx(&__pyx_mdef_6pandas_6parser_5_maybe_upcast, NULL, __pyx_n_s_pandas_parser); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1200; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); if (PyDict_SetItem(__pyx_d, __pyx_n_s_maybe_upcast, __pyx_t_9) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1200; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; /* "pandas/parser.pyx":1406 * return result * * cdef char* cinf = b'inf' # <<<<<<<<<<<<<< * cdef char* cneginf = b'-inf' * */ __pyx_v_6pandas_6parser_cinf = __pyx_k_inf; /* "pandas/parser.pyx":1407 * * cdef char* cinf = b'inf' * cdef char* cneginf = b'-inf' # <<<<<<<<<<<<<< * * cdef _try_double(parser_t *parser, int col, int line_start, int line_end, */ __pyx_v_6pandas_6parser_cneginf = __pyx_k_inf_2; /* "pandas/parser.pyx":1684 * * # TODO: endianness just a placeholder? * cdef list dtype_cast_order = ['= PyList_GET_SIZE(__pyx_t_9)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_2 = PyList_GET_ITEM(__pyx_t_9, __pyx_t_11); __Pyx_INCREF(__pyx_t_2); __pyx_t_11++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1827; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_2 = PySequence_ITEM(__pyx_t_9, __pyx_t_11); __pyx_t_11++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1827; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif if (PyDict_SetItem(__pyx_d, __pyx_n_s_k, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1827; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/parser.pyx":1828 * * for k in list(na_values): * na_values[np.dtype(k)] = na_values[k] # <<<<<<<<<<<<<< * * */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_na_values); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1828; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_k); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1828; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_10 = PyObject_GetItem(__pyx_t_2, __pyx_t_1); if (unlikely(__pyx_t_10 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1828; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_na_values); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1828; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1828; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_dtype); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1828; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_k); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1828; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_13 = PyTuple_New(1); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1828; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_Call(__pyx_t_12, __pyx_t_13, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1828; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; if (unlikely(PyObject_SetItem(__pyx_t_1, __pyx_t_2, __pyx_t_10) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1828; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; } __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; /* "pandas/parser.pyx":1869 * * * def _to_structured_array(dict columns, object names): # <<<<<<<<<<<<<< * cdef: * ndarray recs, column */ __pyx_t_9 = PyCFunction_NewEx(&__pyx_mdef_6pandas_6parser_13_to_structured_array, NULL, __pyx_n_s_pandas_parser); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1869; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); if (PyDict_SetItem(__pyx_d, __pyx_n_s_to_structured_array, __pyx_t_9) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1869; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; /* "pandas/parser.pyx":1948 * * * def _maybe_encode(values): # <<<<<<<<<<<<<< * if values is None: * return [] */ __pyx_t_9 = PyCFunction_NewEx(&__pyx_mdef_6pandas_6parser_15_maybe_encode, NULL, __pyx_n_s_pandas_parser); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1948; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); if (PyDict_SetItem(__pyx_d, __pyx_n_s_maybe_encode, __pyx_t_9) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1948; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; /* "pandas/parser.pyx":1 * # Copyright (c) 2012, Lambda Foundry, Inc. # <<<<<<<<<<<<<< * # See LICENSE for the license * */ __pyx_t_9 = PyDict_New(); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); if (PyDict_SetItem(__pyx_d, __pyx_n_s_test, __pyx_t_9) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; /* "numpy.pxd":979 * arr.base = baseptr * * cdef inline object get_array_base(ndarray arr): # <<<<<<<<<<<<<< * if arr.base is NULL: * return None */ goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_9); __Pyx_XDECREF(__pyx_t_10); __Pyx_XDECREF(__pyx_t_12); __Pyx_XDECREF(__pyx_t_13); if (__pyx_m) { __Pyx_AddTraceback("init pandas.parser", __pyx_clineno, __pyx_lineno, __pyx_filename); Py_DECREF(__pyx_m); __pyx_m = 0; } else if (!PyErr_Occurred()) { PyErr_SetString(PyExc_ImportError, "init pandas.parser"); } __pyx_L0:; __Pyx_RefNannyFinishContext(); #if PY_MAJOR_VERSION < 3 return; #else return __pyx_m; #endif } /* Runtime support code */ #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 /* CYTHON_REFNANNY */ 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; } 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 } 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; } 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); } static CYTHON_INLINE void __Pyx_ErrRestore(PyObject *type, PyObject *value, PyObject *tb) { #if CYTHON_COMPILING_IN_CPYTHON PyObject *tmp_type, *tmp_value, *tmp_tb; PyThreadState *tstate = PyThreadState_GET(); 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); #else PyErr_Restore(type, value, tb); #endif } static CYTHON_INLINE void __Pyx_ErrFetch(PyObject **type, PyObject **value, PyObject **tb) { #if CYTHON_COMPILING_IN_CPYTHON PyThreadState *tstate = PyThreadState_GET(); *type = tstate->curexc_type; *value = tstate->curexc_value; *tb = tstate->curexc_traceback; tstate->curexc_type = 0; tstate->curexc_value = 0; tstate->curexc_traceback = 0; #else PyErr_Fetch(type, value, tb); #endif } #if PY_MAJOR_VERSION < 3 static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, CYTHON_UNUSED PyObject *cause) { 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 PY_VERSION_HEX < 0x02050000 if (PyClass_Check(type)) { #else if (PyType_Check(type)) { #endif #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; #if PY_VERSION_HEX < 0x02050000 if (PyInstance_Check(type)) { type = (PyObject*) ((PyInstanceObject*)type)->in_class; Py_INCREF(type); } else { type = 0; PyErr_SetString(PyExc_TypeError, "raise: exception must be an old-style class or instance"); goto raise_error; } #else 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; } #endif } __Pyx_ErrRestore(type, value, tb); return; raise_error: Py_XDECREF(value); Py_XDECREF(type); Py_XDECREF(tb); return; } #else /* Python 3+ */ 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) { if (PyObject_IsSubclass(instance_class, type)) { type = instance_class; } else { instance_class = NULL; } } } if (!instance_class) { PyObject *args; if (!value) args = PyTuple_New(0); else if (PyTuple_Check(value)) { Py_INCREF(value); args = value; } else args = PyTuple_Pack(1, value); if (!args) goto bad; owned_instance = PyObject_Call(type, args, NULL); Py_DECREF(args); if (!owned_instance) goto bad; value = owned_instance; if (!PyExceptionInstance_Check(value)) { PyErr_Format(PyExc_TypeError, "calling %R should have returned an instance of " "BaseException, not %R", type, Py_TYPE(value)); goto bad; } } } else { PyErr_SetString(PyExc_TypeError, "raise: exception class must be a subclass of BaseException"); goto bad; } #if PY_VERSION_HEX >= 0x03030000 if (cause) { #else if (cause && cause != Py_None) { #endif PyObject *fixed_cause; if (cause == Py_None) { fixed_cause = NULL; } else if (PyExceptionClass_Check(cause)) { fixed_cause = PyObject_CallObject(cause, NULL); if (fixed_cause == NULL) goto bad; } else if (PyExceptionInstance_Check(cause)) { fixed_cause = cause; Py_INCREF(fixed_cause); } else { PyErr_SetString(PyExc_TypeError, "exception causes must derive from " "BaseException"); goto bad; } PyException_SetCause(value, fixed_cause); } PyErr_SetObject(type, value); if (tb) { PyThreadState *tstate = PyThreadState_GET(); PyObject* tmp_tb = tstate->curexc_traceback; if (tb != tmp_tb) { Py_INCREF(tb); tstate->curexc_traceback = tb; Py_XDECREF(tmp_tb); } } bad: Py_XDECREF(owned_instance); return; } #endif static CYTHON_INLINE PyObject *__Pyx_GetModuleGlobalName(PyObject *name) { PyObject *result; #if CYTHON_COMPILING_IN_CPYTHON result = PyDict_GetItem(__pyx_d, name); if (result) { Py_INCREF(result); } else { #else result = PyObject_GetItem(__pyx_d, name); if (!result) { PyErr_Clear(); #endif result = __Pyx_GetBuiltinName(name); } return result; } static CYTHON_INLINE int __Pyx_PyObject_Append(PyObject* L, PyObject* x) { if (likely(PyList_CheckExact(L))) { if (unlikely(__Pyx_PyList_Append(L, x) < 0)) return -1; } else { PyObject* retval = __Pyx_PyObject_CallMethod1(L, __pyx_n_s_append, x); if (unlikely(!retval)) return -1; Py_DECREF(retval); } return 0; } static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j) { PyObject *r; if (!j) return NULL; r = PyObject_GetItem(o, j); Py_DECREF(j); return r; } static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i, int wraparound, int boundscheck) { #if CYTHON_COMPILING_IN_CPYTHON if (wraparound & unlikely(i < 0)) i += PyList_GET_SIZE(o); if ((!boundscheck) || likely((0 <= i) & (i < PyList_GET_SIZE(o)))) { PyObject *r = PyList_GET_ITEM(o, i); Py_INCREF(r); return r; } return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i)); #else return PySequence_GetItem(o, i); #endif } static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i, int wraparound, int boundscheck) { #if CYTHON_COMPILING_IN_CPYTHON if (wraparound & unlikely(i < 0)) i += PyTuple_GET_SIZE(o); if ((!boundscheck) || likely((0 <= i) & (i < PyTuple_GET_SIZE(o)))) { PyObject *r = PyTuple_GET_ITEM(o, i); Py_INCREF(r); return r; } return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i)); #else return PySequence_GetItem(o, i); #endif } static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, int is_list, int wraparound, int boundscheck) { #if CYTHON_COMPILING_IN_CPYTHON if (is_list || PyList_CheckExact(o)) { Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyList_GET_SIZE(o); if ((!boundscheck) || (likely((n >= 0) & (n < PyList_GET_SIZE(o))))) { PyObject *r = PyList_GET_ITEM(o, n); Py_INCREF(r); return r; } } else if (PyTuple_CheckExact(o)) { Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyTuple_GET_SIZE(o); if ((!boundscheck) || likely((n >= 0) & (n < PyTuple_GET_SIZE(o)))) { PyObject *r = PyTuple_GET_ITEM(o, n); Py_INCREF(r); return r; } } else { PySequenceMethods *m = Py_TYPE(o)->tp_as_sequence; if (likely(m && m->sq_item)) { if (wraparound && unlikely(i < 0) && likely(m->sq_length)) { Py_ssize_t l = m->sq_length(o); if (likely(l >= 0)) { i += l; } else { if (PyErr_ExceptionMatches(PyExc_OverflowError)) PyErr_Clear(); else return NULL; } } 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)); } 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); } 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"); } static CYTHON_INLINE int __Pyx_IterFinish(void) { #if CYTHON_COMPILING_IN_CPYTHON PyThreadState *tstate = PyThreadState_GET(); PyObject* exc_type = tstate->curexc_type; if (unlikely(exc_type)) { if (likely(exc_type == PyExc_StopIteration) || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration)) { PyObject *exc_value, *exc_tb; exc_value = tstate->curexc_value; exc_tb = tstate->curexc_traceback; tstate->curexc_type = 0; tstate->curexc_value = 0; tstate->curexc_traceback = 0; Py_DECREF(exc_type); Py_XDECREF(exc_value); Py_XDECREF(exc_tb); return 0; } else { return -1; } } return 0; #else if (unlikely(PyErr_Occurred())) { if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) { PyErr_Clear(); return 0; } else { return -1; } } return 0; #endif } 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; } 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; } static CYTHON_INLINE int __Pyx_CheckKeywordStrings( PyObject *kwdict, const char* function_name, int kw_allowed) { PyObject* key = 0; Py_ssize_t pos = 0; #if CPYTHON_COMPILING_IN_PYPY if (!kw_allowed && PyDict_Next(kwdict, &pos, &key, 0)) goto invalid_keyword; return 1; #else while (PyDict_Next(kwdict, &pos, &key, 0)) { #if PY_MAJOR_VERSION < 3 if (unlikely(!PyString_CheckExact(key)) && unlikely(!PyString_Check(key))) #endif if (unlikely(!PyUnicode_Check(key))) goto invalid_keyword_type; } if ((!kw_allowed) && unlikely(key)) goto invalid_keyword; return 1; invalid_keyword_type: PyErr_Format(PyExc_TypeError, "%.200s() keywords must be strings", function_name); return 0; #endif invalid_keyword: PyErr_Format(PyExc_TypeError, #if PY_MAJOR_VERSION < 3 "%.200s() got an unexpected keyword argument '%.200s'", function_name, PyString_AsString(key)); #else "%s() got an unexpected keyword argument '%U'", function_name, key); #endif return 0; } static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals) { #if CYTHON_COMPILING_IN_PYPY return PyObject_RichCompareBool(s1, s2, equals); #else if (s1 == s2) { return (equals == Py_EQ); } else if (PyBytes_CheckExact(s1) & PyBytes_CheckExact(s2)) { const char *ps1, *ps2; Py_ssize_t length = PyBytes_GET_SIZE(s1); if (length != PyBytes_GET_SIZE(s2)) return (equals == Py_NE); ps1 = PyBytes_AS_STRING(s1); ps2 = PyBytes_AS_STRING(s2); if (ps1[0] != ps2[0]) { return (equals == Py_NE); } else if (length == 1) { return (equals == Py_EQ); } else { int result = memcmp(ps1, ps2, (size_t)length); return (equals == Py_EQ) ? (result == 0) : (result != 0); } } else if ((s1 == Py_None) & PyBytes_CheckExact(s2)) { return (equals == Py_NE); } else if ((s2 == Py_None) & PyBytes_CheckExact(s1)) { return (equals == Py_NE); } else { int result; PyObject* py_result = PyObject_RichCompare(s1, s2, equals); if (!py_result) return -1; result = __Pyx_PyObject_IsTrue(py_result); Py_DECREF(py_result); return result; } #endif } static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals) { #if CYTHON_COMPILING_IN_PYPY return PyObject_RichCompareBool(s1, s2, equals); #else #if PY_MAJOR_VERSION < 3 PyObject* owned_ref = NULL; #endif int s1_is_unicode, s2_is_unicode; if (s1 == s2) { goto return_eq; } s1_is_unicode = PyUnicode_CheckExact(s1); s2_is_unicode = PyUnicode_CheckExact(s2); #if PY_MAJOR_VERSION < 3 if ((s1_is_unicode & (!s2_is_unicode)) && PyString_CheckExact(s2)) { owned_ref = PyUnicode_FromObject(s2); if (unlikely(!owned_ref)) return -1; s2 = owned_ref; s2_is_unicode = 1; } else if ((s2_is_unicode & (!s1_is_unicode)) && PyString_CheckExact(s1)) { owned_ref = PyUnicode_FromObject(s1); if (unlikely(!owned_ref)) return -1; s1 = owned_ref; s1_is_unicode = 1; } else if (((!s2_is_unicode) & (!s1_is_unicode))) { return __Pyx_PyBytes_Equals(s1, s2, equals); } #endif if (s1_is_unicode & s2_is_unicode) { Py_ssize_t length; int kind; void *data1, *data2; #if CYTHON_PEP393_ENABLED if (unlikely(PyUnicode_READY(s1) < 0) || unlikely(PyUnicode_READY(s2) < 0)) return -1; #endif length = __Pyx_PyUnicode_GET_LENGTH(s1); if (length != __Pyx_PyUnicode_GET_LENGTH(s2)) { goto return_ne; } kind = __Pyx_PyUnicode_KIND(s1); if (kind != __Pyx_PyUnicode_KIND(s2)) { goto return_ne; } data1 = __Pyx_PyUnicode_DATA(s1); data2 = __Pyx_PyUnicode_DATA(s2); if (__Pyx_PyUnicode_READ(kind, data1, 0) != __Pyx_PyUnicode_READ(kind, data2, 0)) { goto return_ne; } else if (length == 1) { goto return_eq; } else { int result = memcmp(data1, data2, length * kind); #if PY_MAJOR_VERSION < 3 Py_XDECREF(owned_ref); #endif return (equals == Py_EQ) ? (result == 0) : (result != 0); } } else if ((s1 == Py_None) & s2_is_unicode) { goto return_ne; } else if ((s2 == Py_None) & s1_is_unicode) { goto return_ne; } else { int result; PyObject* py_result = PyObject_RichCompare(s1, s2, equals); if (!py_result) return -1; result = __Pyx_PyObject_IsTrue(py_result); Py_DECREF(py_result); return result; } return_eq: #if PY_MAJOR_VERSION < 3 Py_XDECREF(owned_ref); #endif return (equals == Py_EQ); return_ne: #if PY_MAJOR_VERSION < 3 Py_XDECREF(owned_ref); #endif return (equals == Py_NE); #endif } #if !CYTHON_COMPILING_IN_CPYTHON static CYTHON_INLINE PyObject* __Pyx_PyBytes_Join(PyObject* sep, PyObject* values) { return PyObject_CallMethodObjArgs(sep, __pyx_n_s_join, values, NULL) } #endif static PyObject* __Pyx_PyDict_GetItemDefault(PyObject* d, PyObject* key, PyObject* default_value) { PyObject* value; #if PY_MAJOR_VERSION >= 3 value = PyDict_GetItemWithError(d, key); if (unlikely(!value)) { if (unlikely(PyErr_Occurred())) return NULL; value = default_value; } Py_INCREF(value); #else if (PyString_CheckExact(key) || PyUnicode_CheckExact(key) || PyInt_CheckExact(key)) { value = PyDict_GetItem(d, key); if (unlikely(!value)) { value = default_value; } Py_INCREF(value); } else { if (default_value == Py_None) default_value = NULL; value = PyObject_CallMethodObjArgs( d, __pyx_n_s_get, key, default_value, NULL); } #endif return value; } static CYTHON_INLINE void __Pyx_ExceptionSave(PyObject **type, PyObject **value, PyObject **tb) { #if CYTHON_COMPILING_IN_CPYTHON PyThreadState *tstate = PyThreadState_GET(); *type = tstate->exc_type; *value = tstate->exc_value; *tb = tstate->exc_traceback; Py_XINCREF(*type); Py_XINCREF(*value); Py_XINCREF(*tb); #else PyErr_GetExcInfo(type, value, tb); #endif } static void __Pyx_ExceptionReset(PyObject *type, PyObject *value, PyObject *tb) { #if CYTHON_COMPILING_IN_CPYTHON PyObject *tmp_type, *tmp_value, *tmp_tb; PyThreadState *tstate = PyThreadState_GET(); tmp_type = tstate->exc_type; tmp_value = tstate->exc_value; tmp_tb = tstate->exc_traceback; tstate->exc_type = type; tstate->exc_value = value; tstate->exc_traceback = tb; Py_XDECREF(tmp_type); Py_XDECREF(tmp_value); Py_XDECREF(tmp_tb); #else PyErr_SetExcInfo(type, value, tb); #endif } static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb) { PyObject *local_type, *local_value, *local_tb; #if CYTHON_COMPILING_IN_CPYTHON PyObject *tmp_type, *tmp_value, *tmp_tb; PyThreadState *tstate = PyThreadState_GET(); local_type = tstate->curexc_type; local_value = tstate->curexc_value; local_tb = tstate->curexc_traceback; tstate->curexc_type = 0; tstate->curexc_value = 0; tstate->curexc_traceback = 0; #else PyErr_Fetch(&local_type, &local_value, &local_tb); #endif PyErr_NormalizeException(&local_type, &local_value, &local_tb); #if CYTHON_COMPILING_IN_CPYTHON if (unlikely(tstate->curexc_type)) #else if (unlikely(PyErr_Occurred())) #endif goto bad; #if PY_MAJOR_VERSION >= 3 if (local_tb) { if (unlikely(PyException_SetTraceback(local_value, local_tb) < 0)) goto bad; } #endif Py_XINCREF(local_tb); Py_XINCREF(local_type); Py_XINCREF(local_value); *type = local_type; *value = local_value; *tb = local_tb; #if CYTHON_COMPILING_IN_CPYTHON tmp_type = tstate->exc_type; tmp_value = tstate->exc_value; tmp_tb = tstate->exc_traceback; tstate->exc_type = local_type; tstate->exc_value = local_value; tstate->exc_traceback = local_tb; Py_XDECREF(tmp_type); Py_XDECREF(tmp_value); Py_XDECREF(tmp_tb); #else PyErr_SetExcInfo(local_type, local_value, local_tb); #endif return 0; bad: *type = 0; *value = 0; *tb = 0; Py_XDECREF(local_type); Py_XDECREF(local_value); Py_XDECREF(local_tb); return -1; } static PyObject* __Pyx__PyObject_PopIndex(PyObject* L, Py_ssize_t ix) { PyObject *r, *py_ix; py_ix = PyInt_FromSsize_t(ix); if (!py_ix) return NULL; r = __Pyx_PyObject_CallMethod1(L, __pyx_n_s_pop, py_ix); Py_DECREF(py_ix); return r; } static PyObject* __Pyx_PyList_PopIndex(PyObject* L, Py_ssize_t ix) { #if CYTHON_COMPILING_IN_CPYTHON Py_ssize_t size = PyList_GET_SIZE(L); if (likely(size > (((PyListObject*)L)->allocated >> 1))) { Py_ssize_t cix = ix; if (cix < 0) { cix += size; } if (likely(0 <= cix && cix < size)) { PyObject* v = PyList_GET_ITEM(L, cix); Py_SIZE(L) -= 1; size -= 1; memmove(&PyList_GET_ITEM(L, cix), &PyList_GET_ITEM(L, cix+1), (size-cix)*sizeof(PyObject*)); return v; } } #endif return __Pyx__PyObject_PopIndex(L, ix); } static CYTHON_INLINE void __Pyx_RaiseUnboundLocalError(const char *varname) { PyErr_Format(PyExc_UnboundLocalError, "local variable '%s' referenced before assignment", varname); } static CYTHON_INLINE PyObject* __Pyx_PyObject_GetSlice( PyObject* obj, Py_ssize_t cstart, Py_ssize_t cstop, PyObject** _py_start, PyObject** _py_stop, PyObject** _py_slice, int has_cstart, int has_cstop, CYTHON_UNUSED int wraparound) { #if CYTHON_COMPILING_IN_CPYTHON PyMappingMethods* mp; #if PY_MAJOR_VERSION < 3 PySequenceMethods* ms = Py_TYPE(obj)->tp_as_sequence; if (likely(ms && ms->sq_slice)) { if (!has_cstart) { if (_py_start && (*_py_start != Py_None)) { cstart = __Pyx_PyIndex_AsSsize_t(*_py_start); if ((cstart == (Py_ssize_t)-1) && PyErr_Occurred()) goto bad; } else cstart = 0; } if (!has_cstop) { if (_py_stop && (*_py_stop != Py_None)) { cstop = __Pyx_PyIndex_AsSsize_t(*_py_stop); if ((cstop == (Py_ssize_t)-1) && PyErr_Occurred()) goto bad; } else cstop = PY_SSIZE_T_MAX; } if (wraparound && unlikely((cstart < 0) | (cstop < 0)) && likely(ms->sq_length)) { Py_ssize_t l = ms->sq_length(obj); if (likely(l >= 0)) { if (cstop < 0) { cstop += l; if (cstop < 0) cstop = 0; } if (cstart < 0) { cstart += l; if (cstart < 0) cstart = 0; } } else { if (PyErr_ExceptionMatches(PyExc_OverflowError)) PyErr_Clear(); else goto bad; } } return ms->sq_slice(obj, cstart, cstop); } #endif mp = Py_TYPE(obj)->tp_as_mapping; if (likely(mp && mp->mp_subscript)) #endif { PyObject* result; PyObject *py_slice, *py_start, *py_stop; if (_py_slice) { py_slice = *_py_slice; } else { PyObject* owned_start = NULL; PyObject* owned_stop = NULL; if (_py_start) { py_start = *_py_start; } else { if (has_cstart) { owned_start = py_start = PyInt_FromSsize_t(cstart); if (unlikely(!py_start)) goto bad; } else py_start = Py_None; } if (_py_stop) { py_stop = *_py_stop; } else { if (has_cstop) { owned_stop = py_stop = PyInt_FromSsize_t(cstop); if (unlikely(!py_stop)) { Py_XDECREF(owned_start); goto bad; } } else py_stop = Py_None; } py_slice = PySlice_New(py_start, py_stop, Py_None); Py_XDECREF(owned_start); Py_XDECREF(owned_stop); if (unlikely(!py_slice)) goto bad; } #if CYTHON_COMPILING_IN_CPYTHON result = mp->mp_subscript(obj, py_slice); #else result = PyObject_GetItem(obj, py_slice); #endif if (!_py_slice) { Py_DECREF(py_slice); } return result; } PyErr_Format(PyExc_TypeError, "'%.200s' object is unsliceable", Py_TYPE(obj)->tp_name); bad: return NULL; } static void __Pyx_RaiseArgumentTypeInvalid(const char* name, PyObject *obj, PyTypeObject *type) { PyErr_Format(PyExc_TypeError, "Argument '%.200s' has incorrect type (expected %.200s, got %.200s)", name, type->tp_name, Py_TYPE(obj)->tp_name); } static CYTHON_INLINE int __Pyx_ArgTypeTest(PyObject *obj, PyTypeObject *type, int none_allowed, const char *name, int exact) { if (unlikely(!type)) { PyErr_SetString(PyExc_SystemError, "Missing type object"); return 0; } if (none_allowed && obj == Py_None) return 1; else if (exact) { if (likely(Py_TYPE(obj) == type)) return 1; #if PY_MAJOR_VERSION == 2 else if ((type == &PyBaseString_Type) && likely(__Pyx_PyBaseString_CheckExact(obj))) return 1; #endif } else { if (likely(PyObject_TypeCheck(obj, type))) return 1; } __Pyx_RaiseArgumentTypeInvalid(name, obj, type); return 0; } static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type) { if (unlikely(!type)) { PyErr_SetString(PyExc_SystemError, "Missing type object"); return 0; } if (likely(PyObject_TypeCheck(obj, type))) return 1; PyErr_Format(PyExc_TypeError, "Cannot convert %.200s to %.200s", Py_TYPE(obj)->tp_name, type->tp_name); return 0; } static CYTHON_INLINE int __Pyx_IsLittleEndian(void) { unsigned int n = 1; return *(unsigned char*)(&n) != 0; } 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) /* First char was not a digit */ 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; /* Consume from buffer string */ while (1) { if (field == &ctx->root) { ctx->head = NULL; if (ctx->enc_count != 0) { __Pyx_BufFmt_RaiseExpected(ctx); return -1; } break; /* breaks both loops as ctx->enc_count == 0 */ } 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; /* empty struct */ 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 CYTHON_INLINE 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 != ')') { if (isspace(*ts)) continue; 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 10: case 13: ++ts; break; case '<': if (!__Pyx_IsLittleEndian()) { PyErr_SetString(PyExc_ValueError, "Little-endian buffer not supported on big-endian compiler"); return NULL; } ctx->new_packmode = '='; ++ts; break; case '>': case '!': if (__Pyx_IsLittleEndian()) { 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': /* substruct */ { 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; /* Erase processed last struct element */ 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 '}': /* end of substruct; either repeat or move on */ { size_t alignment = ctx->struct_alignment; ++ts; if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL; ctx->enc_type = 0; /* Erase processed last struct element */ 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; } /* fall through */ 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 's': case 'p': if (ctx->enc_type == *ts && got_Z == ctx->is_complex && ctx->enc_packmode == ctx->new_packmode) { ctx->enc_count += ctx->new_count; } else { 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; } } } } static CYTHON_INLINE 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 CYTHON_INLINE int __Pyx_GetBufferAndValidate( Py_buffer* buf, PyObject* obj, __Pyx_TypeInfo* dtype, int flags, int nd, int cast, __Pyx_BufFmt_StackElem* stack) { if (obj == Py_None || obj == NULL) { __Pyx_ZeroBuffer(buf); return 0; } buf->buf = NULL; if (__Pyx_GetBuffer(obj, buf, flags) == -1) goto fail; if (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 ((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_ZeroBuffer(buf); return -1; } static CYTHON_INLINE void __Pyx_SafeReleaseBuffer(Py_buffer* info) { if (info->buf == NULL) return; if (info->suboffsets == __Pyx_minusones) info->suboffsets = NULL; __Pyx_ReleaseBuffer(info); } static void __Pyx_RaiseBufferFallbackError(void) { PyErr_SetString(PyExc_ValueError, "Buffer acquisition failed on assignment; and then reacquiring the old buffer failed too!"); } static void __Pyx_RaiseBufferIndexError(int axis) { PyErr_Format(PyExc_IndexError, "Out of bounds on buffer access (axis %d)", axis); } static CYTHON_INLINE PyObject* __Pyx_decode_c_string( const char* cstring, Py_ssize_t start, Py_ssize_t stop, const char* encoding, const char* errors, PyObject* (*decode_func)(const char *s, Py_ssize_t size, const char *errors)) { Py_ssize_t length; if (unlikely((start < 0) | (stop < 0))) { length = strlen(cstring); if (start < 0) { start += length; if (start < 0) start = 0; } if (stop < 0) stop += length; } length = stop - start; if (unlikely(length <= 0)) return PyUnicode_FromUnicode(NULL, 0); cstring += start; if (decode_func) { return decode_func(cstring, length, errors); } else { return PyUnicode_Decode(cstring, length, encoding, errors); } } static CYTHON_INLINE PyObject* __Pyx_PyDict_Values(PyObject* d) { if (PY_MAJOR_VERSION >= 3) return __Pyx_PyObject_CallMethod1((PyObject*)&PyDict_Type, __pyx_n_s_values, d); else return PyDict_Values(d); } static void __Pyx_WriteUnraisable(const char *name, CYTHON_UNUSED int clineno, CYTHON_UNUSED int lineno, CYTHON_UNUSED const char *filename, int full_traceback) { PyObject *old_exc, *old_val, *old_tb; PyObject *ctx; __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); } } static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); } static int __Pyx_SetVtable(PyObject *dict, void *vtable) { #if PY_VERSION_HEX >= 0x02070000 && !(PY_MAJOR_VERSION==3&&PY_MINOR_VERSION==0) 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; } 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; } static PyObject *__Pyx_CalculateMetaclass(PyTypeObject *metaclass, PyObject *bases) { Py_ssize_t i, nbases = PyTuple_GET_SIZE(bases); for (i=0; i < nbases; i++) { PyTypeObject *tmptype; PyObject *tmp = PyTuple_GET_ITEM(bases, i); tmptype = Py_TYPE(tmp); #if PY_MAJOR_VERSION < 3 if (tmptype == &PyClass_Type) continue; #endif if (!metaclass) { metaclass = tmptype; continue; } if (PyType_IsSubtype(metaclass, tmptype)) continue; if (PyType_IsSubtype(tmptype, metaclass)) { metaclass = tmptype; continue; } PyErr_SetString(PyExc_TypeError, "metaclass conflict: " "the metaclass of a derived class " "must be a (non-strict) subclass " "of the metaclasses of all its bases"); return NULL; } if (!metaclass) { #if PY_MAJOR_VERSION < 3 metaclass = &PyClass_Type; #else metaclass = &PyType_Type; #endif } Py_INCREF((PyObject*) metaclass); return (PyObject*) metaclass; } static PyObject *__Pyx_Py3MetaclassPrepare(PyObject *metaclass, PyObject *bases, PyObject *name, PyObject *qualname, PyObject *mkw, PyObject *modname, PyObject *doc) { PyObject *ns; if (metaclass) { PyObject *prep = __Pyx_PyObject_GetAttrStr(metaclass, __pyx_n_s_prepare); if (prep) { PyObject *pargs = PyTuple_Pack(2, name, bases); if (unlikely(!pargs)) { Py_DECREF(prep); return NULL; } ns = PyObject_Call(prep, pargs, mkw); Py_DECREF(prep); Py_DECREF(pargs); } else { if (unlikely(!PyErr_ExceptionMatches(PyExc_AttributeError))) return NULL; PyErr_Clear(); ns = PyDict_New(); } } else { ns = PyDict_New(); } if (unlikely(!ns)) return NULL; if (unlikely(PyObject_SetItem(ns, __pyx_n_s_module, modname) < 0)) goto bad; if (unlikely(PyObject_SetItem(ns, __pyx_n_s_qualname, qualname) < 0)) goto bad; if (unlikely(doc && PyObject_SetItem(ns, __pyx_n_s_doc, doc) < 0)) goto bad; return ns; bad: Py_DECREF(ns); return NULL; } static PyObject *__Pyx_Py3ClassCreate(PyObject *metaclass, PyObject *name, PyObject *bases, PyObject *dict, PyObject *mkw, int calculate_metaclass, int allow_py2_metaclass) { PyObject *result, *margs; PyObject *owned_metaclass = NULL; if (allow_py2_metaclass) { owned_metaclass = PyObject_GetItem(dict, __pyx_n_s_metaclass); if (owned_metaclass) { metaclass = owned_metaclass; } else if (likely(PyErr_ExceptionMatches(PyExc_KeyError))) { PyErr_Clear(); } else { return NULL; } } if (calculate_metaclass && (!metaclass || PyType_Check(metaclass))) { metaclass = __Pyx_CalculateMetaclass((PyTypeObject*) metaclass, bases); Py_XDECREF(owned_metaclass); if (unlikely(!metaclass)) return NULL; owned_metaclass = metaclass; } margs = PyTuple_Pack(3, name, bases, dict); if (unlikely(!margs)) { result = NULL; } else { result = PyObject_Call(metaclass, margs, mkw); Py_DECREF(margs); } Py_XDECREF(owned_metaclass); return result; } static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value) { const int neg_one = (int) -1, const_zero = 0; const int is_unsigned = neg_one > const_zero; if (is_unsigned) { if (sizeof(int) < sizeof(long)) { return PyInt_FromLong((long) value); } else if (sizeof(int) <= sizeof(unsigned long)) { return PyLong_FromUnsignedLong((unsigned long) value); } else if (sizeof(int) <= sizeof(unsigned long long)) { return PyLong_FromUnsignedLongLong((unsigned long long) value); } } else { if (sizeof(int) <= sizeof(long)) { return PyInt_FromLong((long) value); } else if (sizeof(int) <= sizeof(long long)) { return PyLong_FromLongLong((long long) value); } } { int one = 1; int little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&value; return _PyLong_FromByteArray(bytes, sizeof(int), little, !is_unsigned); } } #define __PYX_VERIFY_RETURN_INT(target_type, func_type, func) \ { \ func_type value = func(x); \ if (sizeof(target_type) < sizeof(func_type)) { \ if (unlikely(value != (func_type) (target_type) value)) { \ func_type zero = 0; \ PyErr_SetString(PyExc_OverflowError, \ (is_unsigned && unlikely(value < zero)) ? \ "can't convert negative value to " #target_type : \ "value too large to convert to " #target_type); \ return (target_type) -1; \ } \ } \ return (target_type) value; \ } #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS #include "longintrepr.h" #endif #endif static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) { const int neg_one = (int) -1, const_zero = 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) } else { long val = PyInt_AS_LONG(x); if (is_unsigned && unlikely(val < 0)) { PyErr_SetString(PyExc_OverflowError, "can't convert negative value to int"); return (int) -1; } return (int) val; } } else #endif if (likely(PyLong_Check(x))) { if (is_unsigned) { #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS if (sizeof(digit) <= sizeof(int)) { switch (Py_SIZE(x)) { case 0: return 0; case 1: return (int) ((PyLongObject*)x)->ob_digit[0]; } } #endif #endif if (unlikely(Py_SIZE(x) < 0)) { PyErr_SetString(PyExc_OverflowError, "can't convert negative value to int"); return (int) -1; } if (sizeof(int) <= sizeof(unsigned long)) { __PYX_VERIFY_RETURN_INT(int, unsigned long, PyLong_AsUnsignedLong) } else if (sizeof(int) <= sizeof(unsigned long long)) { __PYX_VERIFY_RETURN_INT(int, unsigned long long, PyLong_AsUnsignedLongLong) } } else { #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS if (sizeof(digit) <= sizeof(int)) { switch (Py_SIZE(x)) { case 0: return 0; case 1: return +(int) ((PyLongObject*)x)->ob_digit[0]; case -1: return -(int) ((PyLongObject*)x)->ob_digit[0]; } } #endif #endif if (sizeof(int) <= sizeof(long)) { __PYX_VERIFY_RETURN_INT(int, long, PyLong_AsLong) } else if (sizeof(int) <= sizeof(long long)) { __PYX_VERIFY_RETURN_INT(int, long long, PyLong_AsLongLong) } } { #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_Int(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_Int(x); if (!tmp) return (int) -1; val = __Pyx_PyInt_As_int(tmp); Py_DECREF(tmp); return val; } } #if PY_MAJOR_VERSION < 3 static int __Pyx_GetBuffer(PyObject *obj, Py_buffer *view, int flags) { #if PY_VERSION_HEX >= 0x02060000 if (PyObject_CheckBuffer(obj)) return PyObject_GetBuffer(obj, view, flags); #endif if (PyObject_TypeCheck(obj, __pyx_ptype_5numpy_ndarray)) return __pyx_pw_5numpy_7ndarray_1__getbuffer__(obj, view, flags); #if PY_VERSION_HEX < 0x02060000 if (obj->ob_type->tp_dict) { PyObject *getbuffer_cobj = PyObject_GetItem( obj->ob_type->tp_dict, __pyx_n_s_pyx_getbuffer); if (getbuffer_cobj) { getbufferproc func = (getbufferproc) PyCObject_AsVoidPtr(getbuffer_cobj); Py_DECREF(getbuffer_cobj); if (!func) goto fail; return func(obj, view, flags); } else { PyErr_Clear(); } } #endif PyErr_Format(PyExc_TypeError, "'%.200s' does not have the buffer interface", Py_TYPE(obj)->tp_name); #if PY_VERSION_HEX < 0x02060000 fail: #endif return -1; } static void __Pyx_ReleaseBuffer(Py_buffer *view) { PyObject *obj = view->obj; if (!obj) return; #if PY_VERSION_HEX >= 0x02060000 if (PyObject_CheckBuffer(obj)) { PyBuffer_Release(view); return; } #endif if (PyObject_TypeCheck(obj, __pyx_ptype_5numpy_ndarray)) { __pyx_pw_5numpy_7ndarray_3__releasebuffer__(obj, view); return; } #if PY_VERSION_HEX < 0x02060000 if (obj->ob_type->tp_dict) { PyObject *releasebuffer_cobj = PyObject_GetItem( obj->ob_type->tp_dict, __pyx_n_s_pyx_releasebuffer); if (releasebuffer_cobj) { releasebufferproc func = (releasebufferproc) PyCObject_AsVoidPtr(releasebuffer_cobj); Py_DECREF(releasebuffer_cobj); if (!func) goto fail; func(obj, view); return; } else { PyErr_Clear(); } } #endif goto nofail; #if PY_VERSION_HEX < 0x02060000 fail: #endif PyErr_WriteUnraisable(obj); nofail: Py_DECREF(obj); view->obj = NULL; } #endif /* PY_MAJOR_VERSION < 3 */ static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level) { PyObject *empty_list = 0; PyObject *module = 0; PyObject *global_dict = 0; PyObject *empty_dict = 0; PyObject *list; #if PY_VERSION_HEX < 0x03030000 PyObject *py_import; py_import = __Pyx_PyObject_GetAttrStr(__pyx_b, __pyx_n_s_import); if (!py_import) goto bad; #endif if (from_list) list = from_list; else { empty_list = PyList_New(0); if (!empty_list) goto bad; list = empty_list; } global_dict = PyModule_GetDict(__pyx_m); if (!global_dict) goto bad; empty_dict = PyDict_New(); if (!empty_dict) goto bad; #if PY_VERSION_HEX >= 0x02050000 { #if PY_MAJOR_VERSION >= 3 if (level == -1) { if (strchr(__Pyx_MODULE_NAME, '.')) { #if PY_VERSION_HEX < 0x03030000 PyObject *py_level = PyInt_FromLong(1); if (!py_level) goto bad; module = PyObject_CallFunctionObjArgs(py_import, name, global_dict, empty_dict, list, py_level, NULL); Py_DECREF(py_level); #else module = PyImport_ImportModuleLevelObject( name, global_dict, empty_dict, list, 1); #endif if (!module) { if (!PyErr_ExceptionMatches(PyExc_ImportError)) goto bad; PyErr_Clear(); } } level = 0; /* try absolute import on failure */ } #endif if (!module) { #if PY_VERSION_HEX < 0x03030000 PyObject *py_level = PyInt_FromLong(level); if (!py_level) goto bad; module = PyObject_CallFunctionObjArgs(py_import, name, global_dict, empty_dict, list, py_level, NULL); Py_DECREF(py_level); #else module = PyImport_ImportModuleLevelObject( name, global_dict, empty_dict, list, level); #endif } } #else if (level>0) { PyErr_SetString(PyExc_RuntimeError, "Relative import is not supported for Python <=2.4."); goto bad; } module = PyObject_CallFunctionObjArgs(py_import, name, global_dict, empty_dict, list, NULL); #endif bad: #if PY_VERSION_HEX < 0x03030000 Py_XDECREF(py_import); #endif Py_XDECREF(empty_list); Py_XDECREF(empty_dict); return module; } static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) { const long neg_one = (long) -1, const_zero = 0; const int is_unsigned = neg_one > const_zero; if (is_unsigned) { if (sizeof(long) < sizeof(long)) { return PyInt_FromLong((long) value); } else if (sizeof(long) <= sizeof(unsigned long)) { return PyLong_FromUnsignedLong((unsigned long) value); } else if (sizeof(long) <= sizeof(unsigned long long)) { return PyLong_FromUnsignedLongLong((unsigned long long) value); } } else { if (sizeof(long) <= sizeof(long)) { return PyInt_FromLong((long) value); } else if (sizeof(long) <= sizeof(long long)) { return PyLong_FromLongLong((long long) value); } } { int one = 1; int little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&value; return _PyLong_FromByteArray(bytes, sizeof(long), little, !is_unsigned); } } #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS #include "longintrepr.h" #endif #endif static CYTHON_INLINE char __Pyx_PyInt_As_char(PyObject *x) { const char neg_one = (char) -1, const_zero = 0; const int is_unsigned = neg_one > const_zero; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_Check(x))) { if (sizeof(char) < sizeof(long)) { __PYX_VERIFY_RETURN_INT(char, long, PyInt_AS_LONG) } else { long val = PyInt_AS_LONG(x); if (is_unsigned && unlikely(val < 0)) { PyErr_SetString(PyExc_OverflowError, "can't convert negative value to char"); return (char) -1; } return (char) val; } } else #endif if (likely(PyLong_Check(x))) { if (is_unsigned) { #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS if (sizeof(digit) <= sizeof(char)) { switch (Py_SIZE(x)) { case 0: return 0; case 1: return (char) ((PyLongObject*)x)->ob_digit[0]; } } #endif #endif if (unlikely(Py_SIZE(x) < 0)) { PyErr_SetString(PyExc_OverflowError, "can't convert negative value to char"); return (char) -1; } if (sizeof(char) <= sizeof(unsigned long)) { __PYX_VERIFY_RETURN_INT(char, unsigned long, PyLong_AsUnsignedLong) } else if (sizeof(char) <= sizeof(unsigned long long)) { __PYX_VERIFY_RETURN_INT(char, unsigned long long, PyLong_AsUnsignedLongLong) } } else { #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS if (sizeof(digit) <= sizeof(char)) { switch (Py_SIZE(x)) { case 0: return 0; case 1: return +(char) ((PyLongObject*)x)->ob_digit[0]; case -1: return -(char) ((PyLongObject*)x)->ob_digit[0]; } } #endif #endif if (sizeof(char) <= sizeof(long)) { __PYX_VERIFY_RETURN_INT(char, long, PyLong_AsLong) } else if (sizeof(char) <= sizeof(long long)) { __PYX_VERIFY_RETURN_INT(char, long long, PyLong_AsLongLong) } } { #if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray) PyErr_SetString(PyExc_RuntimeError, "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers"); #else char val; PyObject *v = __Pyx_PyNumber_Int(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 (char) -1; } } else { char val; PyObject *tmp = __Pyx_PyNumber_Int(x); if (!tmp) return (char) -1; val = __Pyx_PyInt_As_char(tmp); Py_DECREF(tmp); return val; } } #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS #include "longintrepr.h" #endif #endif static CYTHON_INLINE npy_int64 __Pyx_PyInt_As_npy_int64(PyObject *x) { const npy_int64 neg_one = (npy_int64) -1, const_zero = 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) } else { long val = PyInt_AS_LONG(x); if (is_unsigned && unlikely(val < 0)) { PyErr_SetString(PyExc_OverflowError, "can't convert negative value to npy_int64"); return (npy_int64) -1; } return (npy_int64) val; } } else #endif if (likely(PyLong_Check(x))) { if (is_unsigned) { #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS if (sizeof(digit) <= sizeof(npy_int64)) { switch (Py_SIZE(x)) { case 0: return 0; case 1: return (npy_int64) ((PyLongObject*)x)->ob_digit[0]; } } #endif #endif if (unlikely(Py_SIZE(x) < 0)) { PyErr_SetString(PyExc_OverflowError, "can't convert negative value to npy_int64"); return (npy_int64) -1; } if (sizeof(npy_int64) <= sizeof(unsigned long)) { __PYX_VERIFY_RETURN_INT(npy_int64, unsigned long, PyLong_AsUnsignedLong) } else if (sizeof(npy_int64) <= sizeof(unsigned long long)) { __PYX_VERIFY_RETURN_INT(npy_int64, unsigned long long, PyLong_AsUnsignedLongLong) } } else { #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS if (sizeof(digit) <= sizeof(npy_int64)) { switch (Py_SIZE(x)) { case 0: return 0; case 1: return +(npy_int64) ((PyLongObject*)x)->ob_digit[0]; case -1: return -(npy_int64) ((PyLongObject*)x)->ob_digit[0]; } } #endif #endif if (sizeof(npy_int64) <= sizeof(long)) { __PYX_VERIFY_RETURN_INT(npy_int64, long, PyLong_AsLong) } else if (sizeof(npy_int64) <= sizeof(long long)) { __PYX_VERIFY_RETURN_INT(npy_int64, long long, PyLong_AsLongLong) } } { #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_Int(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_Int(x); if (!tmp) return (npy_int64) -1; val = __Pyx_PyInt_As_npy_int64(tmp); Py_DECREF(tmp); return val; } } #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS #include "longintrepr.h" #endif #endif static CYTHON_INLINE size_t __Pyx_PyInt_As_size_t(PyObject *x) { const size_t neg_one = (size_t) -1, const_zero = 0; const int is_unsigned = neg_one > const_zero; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_Check(x))) { if (sizeof(size_t) < sizeof(long)) { __PYX_VERIFY_RETURN_INT(size_t, long, PyInt_AS_LONG) } else { long val = PyInt_AS_LONG(x); if (is_unsigned && unlikely(val < 0)) { PyErr_SetString(PyExc_OverflowError, "can't convert negative value to size_t"); return (size_t) -1; } return (size_t) val; } } else #endif if (likely(PyLong_Check(x))) { if (is_unsigned) { #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS if (sizeof(digit) <= sizeof(size_t)) { switch (Py_SIZE(x)) { case 0: return 0; case 1: return (size_t) ((PyLongObject*)x)->ob_digit[0]; } } #endif #endif if (unlikely(Py_SIZE(x) < 0)) { PyErr_SetString(PyExc_OverflowError, "can't convert negative value to size_t"); return (size_t) -1; } if (sizeof(size_t) <= sizeof(unsigned long)) { __PYX_VERIFY_RETURN_INT(size_t, unsigned long, PyLong_AsUnsignedLong) } else if (sizeof(size_t) <= sizeof(unsigned long long)) { __PYX_VERIFY_RETURN_INT(size_t, unsigned long long, PyLong_AsUnsignedLongLong) } } else { #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS if (sizeof(digit) <= sizeof(size_t)) { switch (Py_SIZE(x)) { case 0: return 0; case 1: return +(size_t) ((PyLongObject*)x)->ob_digit[0]; case -1: return -(size_t) ((PyLongObject*)x)->ob_digit[0]; } } #endif #endif if (sizeof(size_t) <= sizeof(long)) { __PYX_VERIFY_RETURN_INT(size_t, long, PyLong_AsLong) } else if (sizeof(size_t) <= sizeof(long long)) { __PYX_VERIFY_RETURN_INT(size_t, long long, PyLong_AsLongLong) } } { #if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray) PyErr_SetString(PyExc_RuntimeError, "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers"); #else size_t val; PyObject *v = __Pyx_PyNumber_Int(x); #if PY_MAJOR_VERSION < 3 if (likely(v) && !PyLong_Check(v)) { PyObject *tmp = v; v = PyNumber_Long(tmp); Py_DECREF(tmp); } #endif if (likely(v)) { int one = 1; int is_little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&val; int ret = _PyLong_AsByteArray((PyLongObject *)v, bytes, sizeof(val), is_little, !is_unsigned); Py_DECREF(v); if (likely(!ret)) return val; } #endif return (size_t) -1; } } else { size_t val; PyObject *tmp = __Pyx_PyNumber_Int(x); if (!tmp) return (size_t) -1; val = __Pyx_PyInt_As_size_t(tmp); Py_DECREF(tmp); return val; } } #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION < 3 static PyObject *__Pyx_GetStdout(void) { PyObject *f = PySys_GetObject((char *)"stdout"); if (!f) { PyErr_SetString(PyExc_RuntimeError, "lost sys.stdout"); } return f; } static int __Pyx_Print(PyObject* f, PyObject *arg_tuple, int newline) { int i; if (!f) { if (!(f = __Pyx_GetStdout())) return -1; } Py_INCREF(f); for (i=0; i < PyTuple_GET_SIZE(arg_tuple); i++) { PyObject* v; if (PyFile_SoftSpace(f, 1)) { if (PyFile_WriteString(" ", f) < 0) goto error; } v = PyTuple_GET_ITEM(arg_tuple, i); if (PyFile_WriteObject(v, f, Py_PRINT_RAW) < 0) goto error; if (PyString_Check(v)) { char *s = PyString_AsString(v); Py_ssize_t len = PyString_Size(v); if (len > 0 && isspace(Py_CHARMASK(s[len-1])) && s[len-1] != ' ') PyFile_SoftSpace(f, 0); } } if (newline) { if (PyFile_WriteString("\n", f) < 0) goto error; PyFile_SoftSpace(f, 0); } Py_DECREF(f); return 0; error: Py_DECREF(f); return -1; } #else /* Python 3 has a print function */ static int __Pyx_Print(PyObject* stream, PyObject *arg_tuple, int newline) { PyObject* kwargs = 0; PyObject* result = 0; PyObject* end_string; if (unlikely(!__pyx_print)) { __pyx_print = PyObject_GetAttr(__pyx_b, __pyx_n_s_print); if (!__pyx_print) return -1; } if (stream) { kwargs = PyDict_New(); if (unlikely(!kwargs)) return -1; if (unlikely(PyDict_SetItem(kwargs, __pyx_n_s_file, stream) < 0)) goto bad; if (!newline) { end_string = PyUnicode_FromStringAndSize(" ", 1); if (unlikely(!end_string)) goto bad; if (PyDict_SetItem(kwargs, __pyx_n_s_end, end_string) < 0) { Py_DECREF(end_string); goto bad; } Py_DECREF(end_string); } } else if (!newline) { if (unlikely(!__pyx_print_kwargs)) { __pyx_print_kwargs = PyDict_New(); if (unlikely(!__pyx_print_kwargs)) return -1; end_string = PyUnicode_FromStringAndSize(" ", 1); if (unlikely(!end_string)) return -1; if (PyDict_SetItem(__pyx_print_kwargs, __pyx_n_s_end, end_string) < 0) { Py_DECREF(end_string); return -1; } Py_DECREF(end_string); } kwargs = __pyx_print_kwargs; } result = PyObject_Call(__pyx_print, arg_tuple, kwargs); if (unlikely(kwargs) && (kwargs != __pyx_print_kwargs)) Py_DECREF(kwargs); if (!result) return -1; Py_DECREF(result); return 0; bad: if (kwargs != __pyx_print_kwargs) Py_XDECREF(kwargs); return -1; } #endif #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION < 3 static int __Pyx_PrintOne(PyObject* f, PyObject *o) { if (!f) { if (!(f = __Pyx_GetStdout())) return -1; } Py_INCREF(f); if (PyFile_SoftSpace(f, 0)) { if (PyFile_WriteString(" ", f) < 0) goto error; } if (PyFile_WriteObject(o, f, Py_PRINT_RAW) < 0) goto error; if (PyFile_WriteString("\n", f) < 0) goto error; Py_DECREF(f); return 0; error: Py_DECREF(f); return -1; /* the line below is just to avoid C compiler * warnings about unused functions */ return __Pyx_Print(f, NULL, 0); } #else /* Python 3 has a print function */ static int __Pyx_PrintOne(PyObject* stream, PyObject *o) { int res; PyObject* arg_tuple = PyTuple_Pack(1, o); if (unlikely(!arg_tuple)) return -1; res = __Pyx_Print(stream, arg_tuple, 1); Py_DECREF(arg_tuple); return res; } #endif #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS #include "longintrepr.h" #endif #endif static CYTHON_INLINE npy_uint8 __Pyx_PyInt_As_npy_uint8(PyObject *x) { const npy_uint8 neg_one = (npy_uint8) -1, const_zero = 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) } else { long val = PyInt_AS_LONG(x); if (is_unsigned && unlikely(val < 0)) { PyErr_SetString(PyExc_OverflowError, "can't convert negative value to npy_uint8"); return (npy_uint8) -1; } return (npy_uint8) val; } } else #endif if (likely(PyLong_Check(x))) { if (is_unsigned) { #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS if (sizeof(digit) <= sizeof(npy_uint8)) { switch (Py_SIZE(x)) { case 0: return 0; case 1: return (npy_uint8) ((PyLongObject*)x)->ob_digit[0]; } } #endif #endif if (unlikely(Py_SIZE(x) < 0)) { PyErr_SetString(PyExc_OverflowError, "can't convert negative value to npy_uint8"); return (npy_uint8) -1; } if (sizeof(npy_uint8) <= sizeof(unsigned long)) { __PYX_VERIFY_RETURN_INT(npy_uint8, unsigned long, PyLong_AsUnsignedLong) } else if (sizeof(npy_uint8) <= sizeof(unsigned long long)) { __PYX_VERIFY_RETURN_INT(npy_uint8, unsigned long long, PyLong_AsUnsignedLongLong) } } else { #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS if (sizeof(digit) <= sizeof(npy_uint8)) { switch (Py_SIZE(x)) { case 0: return 0; case 1: return +(npy_uint8) ((PyLongObject*)x)->ob_digit[0]; case -1: return -(npy_uint8) ((PyLongObject*)x)->ob_digit[0]; } } #endif #endif if (sizeof(npy_uint8) <= sizeof(long)) { __PYX_VERIFY_RETURN_INT(npy_uint8, long, PyLong_AsLong) } else if (sizeof(npy_uint8) <= sizeof(long long)) { __PYX_VERIFY_RETURN_INT(npy_uint8, long long, PyLong_AsLongLong) } } { #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_Int(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_Int(x); if (!tmp) return (npy_uint8) -1; val = __Pyx_PyInt_As_npy_uint8(tmp); Py_DECREF(tmp); return val; } } #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 #if CYTHON_CCOMPLEX #else static CYTHON_INLINE int __Pyx_c_eqf(__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_sumf(__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_difff(__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_prodf(__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; } static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_quotf(__pyx_t_float_complex a, __pyx_t_float_complex b) { __pyx_t_float_complex z; float denom = b.real * b.real + b.imag * b.imag; z.real = (a.real * b.real + a.imag * b.imag) / denom; z.imag = (a.imag * b.real - a.real * b.imag) / denom; return z; } static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_negf(__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_zerof(__pyx_t_float_complex a) { return (a.real == 0) && (a.imag == 0); } static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_conjf(__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_absf(__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_powf(__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_prodf(a, a); return __Pyx_c_prodf(a, a); case 3: z = __Pyx_c_prodf(a, a); return __Pyx_c_prodf(z, a); case 4: z = __Pyx_c_prodf(a, a); return __Pyx_c_prodf(z, z); } } if (a.imag == 0) { if (a.real == 0) { return a; } r = a.real; theta = 0; } else { r = __Pyx_c_absf(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 #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 #if CYTHON_CCOMPLEX #else static CYTHON_INLINE int __Pyx_c_eq(__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(__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(__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(__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; } static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_quot(__pyx_t_double_complex a, __pyx_t_double_complex b) { __pyx_t_double_complex z; double denom = b.real * b.real + b.imag * b.imag; z.real = (a.real * b.real + a.imag * b.imag) / denom; z.imag = (a.imag * b.real - a.real * b.imag) / denom; return z; } static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_neg(__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(__pyx_t_double_complex a) { return (a.real == 0) && (a.imag == 0); } static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_conj(__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(__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(__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(a, a); return __Pyx_c_prod(a, a); case 3: z = __Pyx_c_prod(a, a); return __Pyx_c_prod(z, a); case 4: z = __Pyx_c_prod(a, a); return __Pyx_c_prod(z, z); } } if (a.imag == 0) { if (a.real == 0) { return a; } r = a.real; theta = 0; } else { r = __Pyx_c_abs(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 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_ptrdiff_t(ptrdiff_t value) { const ptrdiff_t neg_one = (ptrdiff_t) -1, const_zero = 0; const int is_unsigned = neg_one > const_zero; if (is_unsigned) { if (sizeof(ptrdiff_t) < sizeof(long)) { return PyInt_FromLong((long) value); } else if (sizeof(ptrdiff_t) <= sizeof(unsigned long)) { return PyLong_FromUnsignedLong((unsigned long) value); } else if (sizeof(ptrdiff_t) <= sizeof(unsigned long long)) { return PyLong_FromUnsignedLongLong((unsigned long long) value); } } else { if (sizeof(ptrdiff_t) <= sizeof(long)) { return PyInt_FromLong((long) value); } else if (sizeof(ptrdiff_t) <= sizeof(long long)) { return PyLong_FromLongLong((long long) value); } } { int one = 1; int little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&value; return _PyLong_FromByteArray(bytes, sizeof(ptrdiff_t), little, !is_unsigned); } } #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS #include "longintrepr.h" #endif #endif static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) { const long neg_one = (long) -1, const_zero = 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) } else { long val = PyInt_AS_LONG(x); if (is_unsigned && unlikely(val < 0)) { PyErr_SetString(PyExc_OverflowError, "can't convert negative value to long"); return (long) -1; } return (long) val; } } else #endif if (likely(PyLong_Check(x))) { if (is_unsigned) { #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS if (sizeof(digit) <= sizeof(long)) { switch (Py_SIZE(x)) { case 0: return 0; case 1: return (long) ((PyLongObject*)x)->ob_digit[0]; } } #endif #endif if (unlikely(Py_SIZE(x) < 0)) { PyErr_SetString(PyExc_OverflowError, "can't convert negative value to long"); return (long) -1; } if (sizeof(long) <= sizeof(unsigned long)) { __PYX_VERIFY_RETURN_INT(long, unsigned long, PyLong_AsUnsignedLong) } else if (sizeof(long) <= sizeof(unsigned long long)) { __PYX_VERIFY_RETURN_INT(long, unsigned long long, PyLong_AsUnsignedLongLong) } } else { #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS if (sizeof(digit) <= sizeof(long)) { switch (Py_SIZE(x)) { case 0: return 0; case 1: return +(long) ((PyLongObject*)x)->ob_digit[0]; case -1: return -(long) ((PyLongObject*)x)->ob_digit[0]; } } #endif #endif if (sizeof(long) <= sizeof(long)) { __PYX_VERIFY_RETURN_INT(long, long, PyLong_AsLong) } else if (sizeof(long) <= sizeof(long long)) { __PYX_VERIFY_RETURN_INT(long, long long, PyLong_AsLongLong) } } { #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_Int(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_Int(x); if (!tmp) return (long) -1; val = __Pyx_PyInt_As_long(tmp); Py_DECREF(tmp); return val; } } 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); #if PY_VERSION_HEX < 0x02050000 return PyErr_Warn(NULL, message); #else return PyErr_WarnEx(NULL, message, 1); #endif } return 0; } #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 #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", module_name, class_name); #if PY_VERSION_HEX < 0x02050000 if (PyErr_Warn(NULL, warning) < 0) goto bad; #else if (PyErr_WarnEx(NULL, warning, 0) < 0) goto bad; #endif } else if ((size_t)basicsize != size) { PyErr_Format(PyExc_ValueError, "%.200s.%.200s has the wrong size, try recompiling", module_name, class_name); goto bad; } return (PyTypeObject *)result; bad: Py_XDECREF(py_module); Py_XDECREF(result); return NULL; } #endif 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) / 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, 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); } #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, /*int argcount,*/ 0, /*int kwonlyargcount,*/ 0, /*int nlocals,*/ 0, /*int stacksize,*/ 0, /*int flags,*/ __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, /*int firstlineno,*/ __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; PyObject *py_globals = 0; PyFrameObject *py_frame = 0; py_code = __pyx_find_code_object(c_line ? c_line : py_line); if (!py_code) { py_code = __Pyx_CreateCodeObjectForTraceback( funcname, c_line, py_line, filename); if (!py_code) goto bad; __pyx_insert_code_object(c_line ? c_line : py_line, py_code); } py_globals = PyModule_GetDict(__pyx_m); if (!py_globals) goto bad; py_frame = PyFrame_New( PyThreadState_GET(), /*PyThreadState *tstate,*/ py_code, /*PyCodeObject *code,*/ py_globals, /*PyObject *globals,*/ 0 /*PyObject *locals*/ ); if (!py_frame) goto bad; py_frame->f_lineno = py_line; PyTraceBack_Here(py_frame); bad: Py_XDECREF(py_code); Py_XDECREF(py_frame); } 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 /* Python 3+ has unicode identifiers */ if (t->is_unicode | t->is_str) { if (t->intern) { *t->p = PyUnicode_InternFromString(t->s); } else if (t->encoding) { *t->p = PyUnicode_Decode(t->s, t->n - 1, t->encoding, NULL); } else { *t->p = PyUnicode_FromStringAndSize(t->s, t->n - 1); } } else { *t->p = PyBytes_FromStringAndSize(t->s, t->n - 1); } #endif if (!*t->p) return -1; ++t; } return 0; } static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(char* c_str) { return __Pyx_PyUnicode_FromStringAndSize(c_str, strlen(c_str)); } static CYTHON_INLINE char* __Pyx_PyObject_AsString(PyObject* o) { Py_ssize_t ignore; return __Pyx_PyObject_AsStringAndSize(o, &ignore); } static CYTHON_INLINE char* __Pyx_PyObject_AsStringAndSize(PyObject* o, Py_ssize_t *length) { #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT if ( #if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII __Pyx_sys_getdefaultencoding_not_ascii && #endif PyUnicode_Check(o)) { #if PY_VERSION_HEX < 0x03030000 char* defenc_c; PyObject* defenc = _PyUnicode_AsDefaultEncodedString(o, NULL); if (!defenc) return NULL; defenc_c = PyBytes_AS_STRING(defenc); #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII { char* end = defenc_c + PyBytes_GET_SIZE(defenc); char* c; for (c = defenc_c; c < end; c++) { if ((unsigned char) (*c) >= 128) { PyUnicode_AsASCIIString(o); return NULL; } } } #endif /*__PYX_DEFAULT_STRING_ENCODING_IS_ASCII*/ *length = PyBytes_GET_SIZE(defenc); return defenc_c; #else /* PY_VERSION_HEX < 0x03030000 */ if (PyUnicode_READY(o) == -1) return NULL; #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII if (PyUnicode_IS_ASCII(o)) { *length = PyUnicode_GET_DATA_SIZE(o); return PyUnicode_AsUTF8(o); } else { PyUnicode_AsASCIIString(o); return NULL; } #else /* __PYX_DEFAULT_STRING_ENCODING_IS_ASCII */ return PyUnicode_AsUTF8AndSize(o, length); #endif /* __PYX_DEFAULT_STRING_ENCODING_IS_ASCII */ #endif /* PY_VERSION_HEX < 0x03030000 */ } else #endif /* __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT */ #if PY_VERSION_HEX >= 0x02060000 if (PyByteArray_Check(o)) { *length = PyByteArray_GET_SIZE(o); return PyByteArray_AS_STRING(o); } else #endif { char* result; int r = PyBytes_AsStringAndSize(o, &result, length); if (unlikely(r < 0)) { return NULL; } else { return result; } } } static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject* x) { int is_true = x == Py_True; if (is_true | (x == Py_False) | (x == Py_None)) return is_true; else return PyObject_IsTrue(x); } static CYTHON_INLINE PyObject* __Pyx_PyNumber_Int(PyObject* x) { PyNumberMethods *m; const char *name = NULL; PyObject *res = NULL; #if PY_MAJOR_VERSION < 3 if (PyInt_Check(x) || PyLong_Check(x)) #else if (PyLong_Check(x)) #endif return Py_INCREF(x), x; m = Py_TYPE(x)->tp_as_number; #if PY_MAJOR_VERSION < 3 if (m && m->nb_int) { name = "int"; res = PyNumber_Int(x); } else if (m && m->nb_long) { name = "long"; res = PyNumber_Long(x); } #else if (m && m->nb_int) { name = "int"; res = PyNumber_Long(x); } #endif if (res) { #if PY_MAJOR_VERSION < 3 if (!PyInt_Check(res) && !PyLong_Check(res)) { #else if (!PyLong_Check(res)) { #endif PyErr_Format(PyExc_TypeError, "__%.4s__ returned non-%.4s (type %.200s)", name, name, Py_TYPE(res)->tp_name); Py_DECREF(res); return NULL; } } else if (!PyErr_Occurred()) { PyErr_SetString(PyExc_TypeError, "an integer is required"); } return res; } #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS #include "longintrepr.h" #endif #endif 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))) return PyInt_AS_LONG(b); #endif if (likely(PyLong_CheckExact(b))) { #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS switch (Py_SIZE(b)) { case -1: return -(sdigit)((PyLongObject*)b)->ob_digit[0]; case 0: return 0; case 1: return ((PyLongObject*)b)->ob_digit[0]; } #endif #endif #if PY_VERSION_HEX < 0x02060000 return PyInt_AsSsize_t(b); #else return PyLong_AsSsize_t(b); #endif } 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) { #if PY_VERSION_HEX < 0x02050000 if (ival <= LONG_MAX) return PyInt_FromLong((long)ival); else { unsigned char *bytes = (unsigned char *) &ival; int one = 1; int little = (int)*(unsigned char*)&one; return _PyLong_FromByteArray(bytes, sizeof(size_t), little, 0); } #else return PyInt_FromSize_t(ival); #endif } #endif /* Py_PYTHON_H */ debian/cythonized-files/pandas/src/0000775000000000000000000000000012275603610014507 5ustar debian/cythonized-files/pandas/src/testing.c0000664000000000000000000054154512275603610016346 0ustar /* Generated by Cython 0.20 on Mon Feb 3 08:41:48 2014 */ #define PY_SSIZE_T_CLEAN #ifndef CYTHON_USE_PYLONG_INTERNALS #ifdef PYLONG_BITS_IN_DIGIT #define CYTHON_USE_PYLONG_INTERNALS 0 #else #include "pyconfig.h" #ifdef PYLONG_BITS_IN_DIGIT #define CYTHON_USE_PYLONG_INTERNALS 1 #else #define CYTHON_USE_PYLONG_INTERNALS 0 #endif #endif #endif #include "Python.h" #ifndef Py_PYTHON_H #error Python headers needed to compile C extensions, please install development version of Python. #elif PY_VERSION_HEX < 0x02040000 #error Cython requires Python 2.4+. #else #define CYTHON_ABI "0_20" #include /* For offsetof */ #ifndef offsetof #define offsetof(type, member) ( (size_t) & ((type*)0) -> member ) #endif #if !defined(WIN32) && !defined(MS_WINDOWS) #ifndef __stdcall #define __stdcall #endif #ifndef __cdecl #define __cdecl #endif #ifndef __fastcall #define __fastcall #endif #endif #ifndef DL_IMPORT #define DL_IMPORT(t) t #endif #ifndef DL_EXPORT #define DL_EXPORT(t) t #endif #ifndef PY_LONG_LONG #define PY_LONG_LONG LONG_LONG #endif #ifndef Py_HUGE_VAL #define Py_HUGE_VAL HUGE_VAL #endif #ifdef PYPY_VERSION #define CYTHON_COMPILING_IN_PYPY 1 #define CYTHON_COMPILING_IN_CPYTHON 0 #else #define CYTHON_COMPILING_IN_PYPY 0 #define CYTHON_COMPILING_IN_CPYTHON 1 #endif #if CYTHON_COMPILING_IN_PYPY #define Py_OptimizeFlag 0 #endif #if PY_VERSION_HEX < 0x02050000 typedef int Py_ssize_t; #define PY_SSIZE_T_MAX INT_MAX #define PY_SSIZE_T_MIN INT_MIN #define PY_FORMAT_SIZE_T "" #define CYTHON_FORMAT_SSIZE_T "" #define PyInt_FromSsize_t(z) PyInt_FromLong(z) #define PyInt_AsSsize_t(o) __Pyx_PyInt_As_int(o) #define PyNumber_Index(o) ((PyNumber_Check(o) && !PyFloat_Check(o)) ? PyNumber_Int(o) : \ (PyErr_Format(PyExc_TypeError, \ "expected index value, got %.200s", Py_TYPE(o)->tp_name), \ (PyObject*)0)) #define __Pyx_PyIndex_Check(o) (PyNumber_Check(o) && !PyFloat_Check(o) && \ !PyComplex_Check(o)) #define PyIndex_Check __Pyx_PyIndex_Check #define PyErr_WarnEx(category, message, stacklevel) PyErr_Warn(category, message) #define __PYX_BUILD_PY_SSIZE_T "i" #else #define __PYX_BUILD_PY_SSIZE_T "n" #define CYTHON_FORMAT_SSIZE_T "z" #define __Pyx_PyIndex_Check PyIndex_Check #endif #if PY_VERSION_HEX < 0x02060000 #define Py_REFCNT(ob) (((PyObject*)(ob))->ob_refcnt) #define Py_TYPE(ob) (((PyObject*)(ob))->ob_type) #define Py_SIZE(ob) (((PyVarObject*)(ob))->ob_size) #define PyVarObject_HEAD_INIT(type, size) \ PyObject_HEAD_INIT(type) size, #define PyType_Modified(t) typedef struct { void *buf; PyObject *obj; Py_ssize_t len; Py_ssize_t itemsize; int readonly; int ndim; char *format; Py_ssize_t *shape; Py_ssize_t *strides; Py_ssize_t *suboffsets; void *internal; } Py_buffer; #define PyBUF_SIMPLE 0 #define PyBUF_WRITABLE 0x0001 #define PyBUF_FORMAT 0x0004 #define PyBUF_ND 0x0008 #define PyBUF_STRIDES (0x0010 | PyBUF_ND) #define PyBUF_C_CONTIGUOUS (0x0020 | PyBUF_STRIDES) #define PyBUF_F_CONTIGUOUS (0x0040 | PyBUF_STRIDES) #define PyBUF_ANY_CONTIGUOUS (0x0080 | PyBUF_STRIDES) #define PyBUF_INDIRECT (0x0100 | PyBUF_STRIDES) #define PyBUF_RECORDS (PyBUF_STRIDES | PyBUF_FORMAT | PyBUF_WRITABLE) #define PyBUF_FULL (PyBUF_INDIRECT | PyBUF_FORMAT | PyBUF_WRITABLE) typedef int (*getbufferproc)(PyObject *, Py_buffer *, int); typedef void (*releasebufferproc)(PyObject *, Py_buffer *); #endif #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, 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 #if PY_VERSION_HEX < 0x02060000 #define PyUnicode_FromString(s) PyUnicode_Decode(s, strlen(s), "UTF-8", "strict") #endif #if PY_MAJOR_VERSION >= 3 #define Py_TPFLAGS_CHECKTYPES 0 #define Py_TPFLAGS_HAVE_INDEX 0 #endif #if (PY_VERSION_HEX < 0x02060000) || (PY_MAJOR_VERSION >= 3) #define Py_TPFLAGS_HAVE_NEWBUFFER 0 #endif #if PY_VERSION_HEX < 0x02060000 #define Py_TPFLAGS_HAVE_VERSION_TAG 0 #endif #if PY_VERSION_HEX < 0x02060000 && !defined(Py_TPFLAGS_IS_ABSTRACT) #define Py_TPFLAGS_IS_ABSTRACT 0 #endif #if PY_VERSION_HEX < 0x030400a1 && !defined(Py_TPFLAGS_HAVE_FINALIZE) #define Py_TPFLAGS_HAVE_FINALIZE 0 #endif #if PY_VERSION_HEX > 0x03030000 && defined(PyUnicode_KIND) #define CYTHON_PEP393_ENABLED 1 #define __Pyx_PyUnicode_READY(op) (likely(PyUnicode_IS_READY(op)) ? \ 0 : _PyUnicode_Ready((PyObject *)(op))) #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_LENGTH(u) #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i) #define __Pyx_PyUnicode_KIND(u) PyUnicode_KIND(u) #define __Pyx_PyUnicode_DATA(u) PyUnicode_DATA(u) #define __Pyx_PyUnicode_READ(k, d, i) PyUnicode_READ(k, d, i) #else #define CYTHON_PEP393_ENABLED 0 #define __Pyx_PyUnicode_READY(op) (0) #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_SIZE(u) #define __Pyx_PyUnicode_READ_CHAR(u, i) ((Py_UCS4)(PyUnicode_AS_UNICODE(u)[i])) #define __Pyx_PyUnicode_KIND(u) (sizeof(Py_UNICODE)) #define __Pyx_PyUnicode_DATA(u) ((void*)PyUnicode_AS_UNICODE(u)) #define __Pyx_PyUnicode_READ(k, d, i) ((void)(k), (Py_UCS4)(((Py_UNICODE*)d)[i])) #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)) #define __Pyx_PyUnicode_Concat(a, b) ((unlikely((a) == Py_None) || unlikely((b) == Py_None)) ? \ PyNumber_Add(a, b) : PyUnicode_Concat(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 #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_VERSION_HEX < 0x02060000 #define PyBytesObject PyStringObject #define PyBytes_Type PyString_Type #define PyBytes_Check PyString_Check #define PyBytes_CheckExact PyString_CheckExact #define PyBytes_FromString PyString_FromString #define PyBytes_FromStringAndSize PyString_FromStringAndSize #define PyBytes_FromFormat PyString_FromFormat #define PyBytes_DecodeEscape PyString_DecodeEscape #define PyBytes_AsString PyString_AsString #define PyBytes_AsStringAndSize PyString_AsStringAndSize #define PyBytes_Size PyString_Size #define PyBytes_AS_STRING PyString_AS_STRING #define PyBytes_GET_SIZE PyString_GET_SIZE #define PyBytes_Repr PyString_Repr #define PyBytes_Concat PyString_Concat #define PyBytes_ConcatAndDel PyString_ConcatAndDel #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_CheckExact(obj) || PyUnicode_CheckExact(obj) || \ PyString_Check(obj) || PyUnicode_Check(obj)) #define __Pyx_PyBaseString_CheckExact(obj) (PyString_CheckExact(obj) || PyUnicode_CheckExact(obj)) #endif #if PY_VERSION_HEX < 0x02060000 #define PySet_Check(obj) PyObject_TypeCheck(obj, &PySet_Type) #define PyFrozenSet_Check(obj) PyObject_TypeCheck(obj, &PyFrozenSet_Type) #endif #ifndef PySet_CheckExact #define PySet_CheckExact(obj) (Py_TYPE(obj) == &PySet_Type) #endif #define __Pyx_TypeCheck(obj, type) PyObject_TypeCheck(obj, (PyTypeObject *)type) #if PY_MAJOR_VERSION >= 3 #define PyIntObject PyLongObject #define PyInt_Type PyLong_Type #define PyInt_Check(op) PyLong_Check(op) #define PyInt_CheckExact(op) PyLong_CheckExact(op) #define PyInt_FromString PyLong_FromString #define PyInt_FromUnicode PyLong_FromUnicode #define PyInt_FromLong PyLong_FromLong #define PyInt_FromSize_t PyLong_FromSize_t #define PyInt_FromSsize_t PyLong_FromSsize_t #define PyInt_AsLong PyLong_AsLong #define PyInt_AS_LONG PyLong_AS_LONG #define PyInt_AsSsize_t PyLong_AsSsize_t #define PyInt_AsUnsignedLongMask PyLong_AsUnsignedLongMask #define PyInt_AsUnsignedLongLongMask PyLong_AsUnsignedLongLongMask #define PyNumber_Int PyNumber_Long #endif #if PY_MAJOR_VERSION >= 3 #define PyBoolObject PyLongObject #endif #if PY_VERSION_HEX < 0x03020000 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) || (PY_VERSION_HEX >= 0x03010300) #define __Pyx_PySequence_GetSlice(obj, a, b) PySequence_GetSlice(obj, a, b) #define __Pyx_PySequence_SetSlice(obj, a, b, value) PySequence_SetSlice(obj, a, b, value) #define __Pyx_PySequence_DelSlice(obj, a, b) PySequence_DelSlice(obj, a, b) #else #define __Pyx_PySequence_GetSlice(obj, a, b) (unlikely(!(obj)) ? \ (PyErr_SetString(PyExc_SystemError, "null argument to internal routine"), (PyObject*)0) : \ (likely((obj)->ob_type->tp_as_mapping) ? (PySequence_GetSlice(obj, a, b)) : \ (PyErr_Format(PyExc_TypeError, "'%.200s' object is unsliceable", (obj)->ob_type->tp_name), (PyObject*)0))) #define __Pyx_PySequence_SetSlice(obj, a, b, value) (unlikely(!(obj)) ? \ (PyErr_SetString(PyExc_SystemError, "null argument to internal routine"), -1) : \ (likely((obj)->ob_type->tp_as_mapping) ? (PySequence_SetSlice(obj, a, b, value)) : \ (PyErr_Format(PyExc_TypeError, "'%.200s' object doesn't support slice assignment", (obj)->ob_type->tp_name), -1))) #define __Pyx_PySequence_DelSlice(obj, a, b) (unlikely(!(obj)) ? \ (PyErr_SetString(PyExc_SystemError, "null argument to internal routine"), -1) : \ (likely((obj)->ob_type->tp_as_mapping) ? (PySequence_DelSlice(obj, a, b)) : \ (PyErr_Format(PyExc_TypeError, "'%.200s' object doesn't support slice deletion", (obj)->ob_type->tp_name), -1))) #endif #if PY_MAJOR_VERSION >= 3 #define PyMethod_New(func, self, klass) ((self) ? PyMethod_New(func, self) : PyInstanceMethod_New(func)) #endif #if PY_VERSION_HEX < 0x02050000 #define __Pyx_GetAttrString(o,n) PyObject_GetAttrString((o),((char *)(n))) #define __Pyx_SetAttrString(o,n,a) PyObject_SetAttrString((o),((char *)(n)),(a)) #define __Pyx_DelAttrString(o,n) PyObject_DelAttrString((o),((char *)(n))) #else #define __Pyx_GetAttrString(o,n) PyObject_GetAttrString((o),(n)) #define __Pyx_SetAttrString(o,n,a) PyObject_SetAttrString((o),(n),(a)) #define __Pyx_DelAttrString(o,n) PyObject_DelAttrString((o),(n)) #endif #if PY_VERSION_HEX < 0x02050000 #define __Pyx_NAMESTR(n) ((char *)(n)) #define __Pyx_DOCSTR(n) ((char *)(n)) #else #define __Pyx_NAMESTR(n) (n) #define __Pyx_DOCSTR(n) (n) #endif #ifndef CYTHON_INLINE #if defined(__GNUC__) #define CYTHON_INLINE __inline__ #elif defined(_MSC_VER) #define CYTHON_INLINE __inline #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L #define CYTHON_INLINE inline #else #define CYTHON_INLINE #endif #endif #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 #ifdef NAN #define __PYX_NAN() ((float) NAN) #else static CYTHON_INLINE float __PYX_NAN() { /* Initialize NaN. The sign is irrelevant, an exponent with all bits 1 and a nonzero mantissa means NaN. If the first bit in the mantissa is 1, it is a quiet NaN. */ float value; memset(&value, 0xFF, sizeof(value)); return value; } #endif #if PY_MAJOR_VERSION >= 3 #define __Pyx_PyNumber_Divide(x,y) PyNumber_TrueDivide(x,y) #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceTrueDivide(x,y) #else #define __Pyx_PyNumber_Divide(x,y) PyNumber_Divide(x,y) #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceDivide(x,y) #endif #ifndef __PYX_EXTERN_C #ifdef __cplusplus #define __PYX_EXTERN_C extern "C" #else #define __PYX_EXTERN_C extern #endif #endif #if defined(WIN32) || defined(MS_WINDOWS) #define _USE_MATH_DEFINES #endif #include #define __PYX_HAVE__pandas___testing #define __PYX_HAVE_API__pandas___testing #ifdef _OPENMP #include #endif /* _OPENMP */ #ifdef PYREX_WITHOUT_ASSERTIONS #define CYTHON_WITHOUT_ASSERTIONS #endif #ifndef CYTHON_UNUSED # if defined(__GNUC__) # if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)) # define CYTHON_UNUSED __attribute__ ((__unused__)) # else # define CYTHON_UNUSED # endif # elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER)) # define CYTHON_UNUSED __attribute__ ((__unused__)) # else # define CYTHON_UNUSED # endif #endif typedef struct {PyObject **p; char *s; const Py_ssize_t n; const char* encoding; const char is_unicode; const char is_str; const char intern; } __Pyx_StringTabEntry; /*proto*/ #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_fits_Py_ssize_t(v, type, is_signed) ( \ (sizeof(type) < sizeof(Py_ssize_t)) || \ (sizeof(type) > sizeof(Py_ssize_t) && \ likely(v < (type)PY_SSIZE_T_MAX || \ v == (type)PY_SSIZE_T_MAX) && \ (!is_signed || likely(v > (type)PY_SSIZE_T_MIN || \ v == (type)PY_SSIZE_T_MIN))) || \ (sizeof(type) == sizeof(Py_ssize_t) && \ (is_signed || likely(v < (type)PY_SSIZE_T_MAX || \ v == (type)PY_SSIZE_T_MAX))) ) static CYTHON_INLINE char* __Pyx_PyObject_AsString(PyObject*); static CYTHON_INLINE char* __Pyx_PyObject_AsStringAndSize(PyObject*, Py_ssize_t* length); #define __Pyx_PyByteArray_FromString(s) PyByteArray_FromStringAndSize((const char*)s, strlen((const char*)s)) #define __Pyx_PyByteArray_FromStringAndSize(s, l) PyByteArray_FromStringAndSize((const char*)s, l) #define __Pyx_PyBytes_FromString PyBytes_FromString #define __Pyx_PyBytes_FromStringAndSize PyBytes_FromStringAndSize static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(char*); #if PY_MAJOR_VERSION < 3 #define __Pyx_PyStr_FromString __Pyx_PyBytes_FromString #define __Pyx_PyStr_FromStringAndSize __Pyx_PyBytes_FromStringAndSize #else #define __Pyx_PyStr_FromString __Pyx_PyUnicode_FromString #define __Pyx_PyStr_FromStringAndSize __Pyx_PyUnicode_FromStringAndSize #endif #define __Pyx_PyObject_AsSString(s) ((signed char*) __Pyx_PyObject_AsString(s)) #define __Pyx_PyObject_AsUString(s) ((unsigned char*) __Pyx_PyObject_AsString(s)) #define __Pyx_PyObject_FromUString(s) __Pyx_PyObject_FromString((char*)s) #define __Pyx_PyBytes_FromUString(s) __Pyx_PyBytes_FromString((char*)s) #define __Pyx_PyByteArray_FromUString(s) __Pyx_PyByteArray_FromString((char*)s) #define __Pyx_PyStr_FromUString(s) __Pyx_PyStr_FromString((char*)s) #define __Pyx_PyUnicode_FromUString(s) __Pyx_PyUnicode_FromString((char*)s) #if PY_MAJOR_VERSION < 3 static CYTHON_INLINE size_t __Pyx_Py_UNICODE_strlen(const Py_UNICODE *u) { const Py_UNICODE *u_end = u; while (*u_end++) ; return u_end - u - 1; } #else #define __Pyx_Py_UNICODE_strlen Py_UNICODE_strlen #endif #define __Pyx_PyUnicode_FromUnicode(u) PyUnicode_FromUnicode(u, __Pyx_Py_UNICODE_strlen(u)) #define __Pyx_PyUnicode_FromUnicodeAndLength PyUnicode_FromUnicode #define __Pyx_PyUnicode_AsUnicode PyUnicode_AsUnicode #define __Pyx_Owned_Py_None(b) (Py_INCREF(Py_None), Py_None) #define __Pyx_PyBool_FromLong(b) ((b) ? (Py_INCREF(Py_True), Py_True) : (Py_INCREF(Py_False), Py_False)) static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*); static CYTHON_INLINE PyObject* __Pyx_PyNumber_Int(PyObject* x); static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*); static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t); #if CYTHON_COMPILING_IN_CPYTHON #define __pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x)) #else #define __pyx_PyFloat_AsDouble(x) PyFloat_AsDouble(x) #endif #define __pyx_PyFloat_AsFloat(x) ((float) __pyx_PyFloat_AsDouble(x)) #if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII static int __Pyx_sys_getdefaultencoding_not_ascii; static int __Pyx_init_sys_getdefaultencoding_params(void) { PyObject* sys = NULL; PyObject* default_encoding = NULL; PyObject* ascii_chars_u = NULL; PyObject* ascii_chars_b = NULL; sys = PyImport_ImportModule("sys"); if (sys == NULL) goto bad; default_encoding = PyObject_CallMethod(sys, (char*) (const char*) "getdefaultencoding", NULL); if (default_encoding == NULL) goto bad; if (strcmp(PyBytes_AsString(default_encoding), "ascii") == 0) { __Pyx_sys_getdefaultencoding_not_ascii = 0; } else { const char* default_encoding_c = PyBytes_AS_STRING(default_encoding); 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 == NULL) goto bad; ascii_chars_b = PyUnicode_AsEncodedString(ascii_chars_u, default_encoding_c, NULL); if (ascii_chars_b == NULL || strncmp(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_XDECREF(sys); Py_XDECREF(default_encoding); Py_XDECREF(ascii_chars_u); Py_XDECREF(ascii_chars_b); return 0; bad: Py_XDECREF(sys); 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 = NULL; PyObject* default_encoding = NULL; char* default_encoding_c; sys = PyImport_ImportModule("sys"); if (sys == NULL) goto bad; default_encoding = PyObject_CallMethod(sys, (char*) (const char*) "getdefaultencoding", NULL); if (default_encoding == NULL) goto bad; default_encoding_c = PyBytes_AS_STRING(default_encoding); __PYX_DEFAULT_STRING_ENCODING = (char*) malloc(strlen(default_encoding_c)); strcpy(__PYX_DEFAULT_STRING_ENCODING, default_encoding_c); Py_DECREF(sys); Py_DECREF(default_encoding); return 0; bad: Py_XDECREF(sys); Py_XDECREF(default_encoding); return -1; } #endif #endif #ifdef __GNUC__ /* Test for GCC > 2.95 */ #if __GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95)) #define likely(x) __builtin_expect(!!(x), 1) #define unlikely(x) __builtin_expect(!!(x), 0) #else /* __GNUC__ > 2 ... */ #define likely(x) (x) #define unlikely(x) (x) #endif /* __GNUC__ > 2 ... */ #else /* __GNUC__ */ #define likely(x) (x) #define unlikely(x) (x) #endif /* __GNUC__ */ static PyObject *__pyx_m; static PyObject *__pyx_d; static PyObject *__pyx_b; static PyObject *__pyx_empty_tuple; static PyObject *__pyx_empty_bytes; static int __pyx_lineno; static int __pyx_clineno = 0; static const char * __pyx_cfilenm= __FILE__; static const char *__pyx_filename; static const char *__pyx_f[] = { "testing.pyx", }; /*--- Type declarations ---*/ struct __pyx_opt_args_6pandas_8_testing_assert_dict_equal; struct __pyx_opt_args_6pandas_8_testing_assert_almost_equal; /* "pandas/src/testing.pyx":42 * return abs(desired - actual) < (0.5 * 10.0 ** -decimal) * * cpdef assert_dict_equal(a, b, bint compare_keys=True): # <<<<<<<<<<<<<< * assert is_dictlike(a) and is_dictlike(b), ( * "Cannot compare dict objects, one or both is not dict-like" */ struct __pyx_opt_args_6pandas_8_testing_assert_dict_equal { int __pyx_n; int compare_keys; }; /* "pandas/src/testing.pyx":58 * return True * * cpdef assert_almost_equal(a, b, bint check_less_precise=False): # <<<<<<<<<<<<<< * cdef: * int decimal */ struct __pyx_opt_args_6pandas_8_testing_assert_almost_equal { int __pyx_n; int check_less_precise; }; #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); /*proto*/ #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 /* CYTHON_REFNANNY */ #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) #if CYTHON_COMPILING_IN_CPYTHON static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name) { PyTypeObject* tp = Py_TYPE(obj); if (likely(tp->tp_getattro)) return tp->tp_getattro(obj, attr_name); #if PY_MAJOR_VERSION < 3 if (likely(tp->tp_getattr)) return tp->tp_getattr(obj, PyString_AS_STRING(attr_name)); #endif return PyObject_GetAttr(obj, attr_name); } #else #define __Pyx_PyObject_GetAttrStr(o,n) PyObject_GetAttr(o,n) #endif static PyObject *__Pyx_GetBuiltinName(PyObject *name); /*proto*/ static CYTHON_INLINE void __Pyx_ErrRestore(PyObject *type, PyObject *value, PyObject *tb); /*proto*/ static CYTHON_INLINE void __Pyx_ErrFetch(PyObject **type, PyObject **value, PyObject **tb); /*proto*/ static void __Pyx_WriteUnraisable(const char *name, int clineno, int lineno, const char *filename, int full_traceback); /*proto*/ #if PY_VERSION_HEX < 0x02050000 #ifndef PyAnySet_CheckExact #define PyAnySet_CheckExact(ob) \ ((ob)->ob_type == &PySet_Type || \ (ob)->ob_type == &PyFrozenSet_Type) #define PySet_New(iterable) \ PyObject_CallFunctionObjArgs((PyObject *)&PySet_Type, (iterable), NULL) #define Pyx_PyFrozenSet_New(iterable) \ PyObject_CallFunctionObjArgs((PyObject *)&PyFrozenSet_Type, (iterable), NULL) #define PySet_Size(anyset) \ PyObject_Size((anyset)) #define PySet_Contains(anyset, key) \ PySequence_Contains((anyset), (key)) #define PySet_Pop(set) \ PyObject_CallMethod((set), (char*)"pop", NULL) static CYTHON_INLINE int PySet_Clear(PyObject *set) { PyObject *ret = PyObject_CallMethod(set, (char*)"clear", NULL); if (!ret) return -1; Py_DECREF(ret); return 0; } static CYTHON_INLINE int PySet_Discard(PyObject *set, PyObject *key) { PyObject *ret = PyObject_CallMethod(set, (char*)"discard", (char*)"(O)", key); if (!ret) return -1; Py_DECREF(ret); return 0; } static CYTHON_INLINE int PySet_Add(PyObject *set, PyObject *key) { PyObject *ret = PyObject_CallMethod(set, (char*)"add", (char*)"(O)", key); if (!ret) return -1; Py_DECREF(ret); return 0; } #endif /* PyAnySet_CheckExact (<= Py2.4) */ #endif /* < Py2.5 */ 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); /*proto*/ static void __Pyx_RaiseDoubleKeywordsError(const char* func_name, PyObject* kw_name); /*proto*/ static int __Pyx_ParseOptionalKeywords(PyObject *kwds, PyObject **argnames[], \ PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args, \ const char* function_name); /*proto*/ static CYTHON_INLINE PyObject *__Pyx_GetModuleGlobalName(PyObject *name); /*proto*/ static CYTHON_INLINE void __Pyx_ExceptionSave(PyObject **type, PyObject **value, PyObject **tb); /*proto*/ static void __Pyx_ExceptionReset(PyObject *type, PyObject *value, PyObject *tb); /*proto*/ #define __Pyx_GetItemInt(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck) \ (__Pyx_fits_Py_ssize_t(i, type, is_signed) ? \ __Pyx_GetItemInt_Fast(o, (Py_ssize_t)i, is_list, wraparound, boundscheck) : \ (is_list ? (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL) : \ __Pyx_GetItemInt_Generic(o, to_py_func(i)))) #define __Pyx_GetItemInt_List(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck) \ (__Pyx_fits_Py_ssize_t(i, type, is_signed) ? \ __Pyx_GetItemInt_List_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) : \ (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL)) static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i, int wraparound, int boundscheck); #define __Pyx_GetItemInt_Tuple(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck) \ (__Pyx_fits_Py_ssize_t(i, type, is_signed) ? \ __Pyx_GetItemInt_Tuple_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) : \ (PyErr_SetString(PyExc_IndexError, "tuple index out of range"), (PyObject*)NULL)) static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i, int wraparound, int boundscheck); static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j); static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, int is_list, int wraparound, int boundscheck); #include static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals); /*proto*/ static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals); /*proto*/ #if PY_MAJOR_VERSION >= 3 #define __Pyx_PyString_Equals __Pyx_PyUnicode_Equals #else #define __Pyx_PyString_Equals __Pyx_PyBytes_Equals #endif #ifndef __PYX_FORCE_INIT_THREADS #define __PYX_FORCE_INIT_THREADS 0 #endif static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name); /*proto*/ static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level); /*proto*/ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value); static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *); static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *); static int __Pyx_check_binary_version(void); typedef struct { int code_line; PyCodeObject* code_object; } __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); static void __Pyx_AddTraceback(const char *funcname, int c_line, int py_line, const char *filename); /*proto*/ static int __Pyx_InitStrings(__Pyx_StringTabEntry *t); /*proto*/ /* Module declarations from 'pandas._testing' */ static PyObject *__pyx_v_6pandas_8_testing_NUMERIC_TYPES = 0; static int __pyx_f_6pandas_8_testing_is_comparable_as_number(PyObject *); /*proto*/ static int __pyx_f_6pandas_8_testing_isiterable(PyObject *); /*proto*/ static int __pyx_f_6pandas_8_testing_has_length(PyObject *); /*proto*/ static int __pyx_f_6pandas_8_testing_is_dictlike(PyObject *); /*proto*/ static int __pyx_f_6pandas_8_testing_decimal_almost_equal(double, double, int); /*proto*/ static PyObject *__pyx_f_6pandas_8_testing_assert_dict_equal(PyObject *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_6pandas_8_testing_assert_dict_equal *__pyx_optional_args); /*proto*/ static PyObject *__pyx_f_6pandas_8_testing_assert_almost_equal(PyObject *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_6pandas_8_testing_assert_almost_equal *__pyx_optional_args); /*proto*/ #define __Pyx_MODULE_NAME "pandas._testing" int __pyx_module_is_main_pandas___testing = 0; /* Implementation of 'pandas._testing' */ static PyObject *__pyx_builtin_xrange; static PyObject *__pyx_pf_6pandas_8_testing_assert_dict_equal(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_a, PyObject *__pyx_v_b, int __pyx_v_compare_keys); /* proto */ static PyObject *__pyx_pf_6pandas_8_testing_2assert_almost_equal(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_a, PyObject *__pyx_v_b, int __pyx_v_check_less_precise); /* proto */ static char __pyx_k_a[] = "a"; static char __pyx_k_b[] = "b"; static char __pyx_k_f[] = "f"; static char __pyx_k_np[] = "np"; static char __pyx_k_len[] = "__len__"; static char __pyx_k_r_r[] = "%r != %r"; static char __pyx_k_bool[] = "bool"; static char __pyx_k_int8[] = "int8"; static char __pyx_k_iter[] = "__iter__"; static char __pyx_k_keys[] = "keys"; static char __pyx_k_kind[] = "kind"; static char __pyx_k_main[] = "__main__"; static char __pyx_k_test[] = "__test__"; static char __pyx_k_dtype[] = "dtype"; static char __pyx_k_int16[] = "int16"; static char __pyx_k_int32[] = "int32"; static char __pyx_k_int64[] = "int64"; static char __pyx_k_isinf[] = "isinf"; static char __pyx_k_numpy[] = "numpy"; static char __pyx_k_range[] = "range"; static char __pyx_k_uint8[] = "uint8"; static char __pyx_k_compat[] = "compat"; static char __pyx_k_import[] = "__import__"; static char __pyx_k_isnull[] = "isnull"; static char __pyx_k_pandas[] = "pandas"; static char __pyx_k_uint16[] = "uint16"; static char __pyx_k_uint32[] = "uint32"; static char __pyx_k_uint64[] = "uint64"; static char __pyx_k_xrange[] = "xrange"; static char __pyx_k_float16[] = "float16"; static char __pyx_k_float32[] = "float32"; static char __pyx_k_float64[] = "float64"; static char __pyx_k_getitem[] = "__getitem__"; static char __pyx_k_ndarray[] = "ndarray"; static char __pyx_k_itemsize[] = "itemsize"; static char __pyx_k_array_equal[] = "array_equal"; static char __pyx_k_compare_keys[] = "compare_keys"; static char __pyx_k_string_types[] = "string_types"; static char __pyx_k_check_less_precise[] = "check_less_precise"; static char __pyx_k_pandas_core_common[] = "pandas.core.common"; static char __pyx_k_expected_5f_but_got_5f[] = "expected %.5f but got %.5f"; static char __pyx_k_Cannot_compare_dict_objects_one[] = "Cannot compare dict objects, one or both is not dict-like"; static char __pyx_k_First_object_is_iterable_second[] = "First object is iterable, second isn't: %r != %r"; static char __pyx_k_First_object_is_not_null_second[] = "First object is not null, second is null: %r != %r"; static char __pyx_k_First_object_is_null_second_isn[] = "First object is null, second isn't: %r != %r"; static char __pyx_k_Length_of_two_iterators_not_the[] = "Length of two iterators not the same: %r != %r"; static char __pyx_k_Second_object_is_iterable_first[] = "Second object is iterable, first isn't: %r != %r"; static char __pyx_k_very_low_values_expected_5f_but[] = "(very low values) expected %.5f but got %.5f"; static char __pyx_k_Can_t_compare_objects_without_le[] = "Can't compare objects without length, one or both is invalid: (%r, %r)"; static char __pyx_k_First_object_is_inf_second_isn_t[] = "First object is inf, second isn't"; static char __pyx_k_First_object_is_numeric_second_i[] = "First object is numeric, second is not: %r != %r"; static PyObject *__pyx_kp_s_Can_t_compare_objects_without_le; static PyObject *__pyx_kp_s_Cannot_compare_dict_objects_one; static PyObject *__pyx_kp_s_First_object_is_inf_second_isn_t; static PyObject *__pyx_kp_s_First_object_is_iterable_second; static PyObject *__pyx_kp_s_First_object_is_not_null_second; static PyObject *__pyx_kp_s_First_object_is_null_second_isn; static PyObject *__pyx_kp_s_First_object_is_numeric_second_i; static PyObject *__pyx_kp_s_Length_of_two_iterators_not_the; static PyObject *__pyx_kp_s_Second_object_is_iterable_first; static PyObject *__pyx_n_s_a; static PyObject *__pyx_n_s_array_equal; static PyObject *__pyx_n_s_b; static PyObject *__pyx_n_s_bool; static PyObject *__pyx_n_s_check_less_precise; static PyObject *__pyx_n_s_compare_keys; static PyObject *__pyx_n_s_compat; static PyObject *__pyx_n_s_dtype; static PyObject *__pyx_kp_s_expected_5f_but_got_5f; static PyObject *__pyx_n_s_f; static PyObject *__pyx_n_s_float16; static PyObject *__pyx_n_s_float32; static PyObject *__pyx_n_s_float64; static PyObject *__pyx_n_s_getitem; static PyObject *__pyx_n_s_import; static PyObject *__pyx_n_s_int16; static PyObject *__pyx_n_s_int32; static PyObject *__pyx_n_s_int64; static PyObject *__pyx_n_s_int8; static PyObject *__pyx_n_s_isinf; static PyObject *__pyx_n_s_isnull; static PyObject *__pyx_n_s_itemsize; static PyObject *__pyx_n_s_iter; static PyObject *__pyx_n_s_keys; static PyObject *__pyx_n_s_kind; static PyObject *__pyx_n_s_len; static PyObject *__pyx_n_s_main; static PyObject *__pyx_n_s_ndarray; static PyObject *__pyx_n_s_np; static PyObject *__pyx_n_s_numpy; static PyObject *__pyx_n_s_pandas; static PyObject *__pyx_n_s_pandas_core_common; static PyObject *__pyx_kp_s_r_r; static PyObject *__pyx_n_s_range; static PyObject *__pyx_n_s_string_types; static PyObject *__pyx_n_s_test; static PyObject *__pyx_n_s_uint16; static PyObject *__pyx_n_s_uint32; static PyObject *__pyx_n_s_uint64; static PyObject *__pyx_n_s_uint8; static PyObject *__pyx_kp_s_very_low_values_expected_5f_but; static PyObject *__pyx_n_s_xrange; static PyObject *__pyx_int_4; /* "pandas/src/testing.pyx":24 * ) * * cdef bint is_comparable_as_number(obj): # <<<<<<<<<<<<<< * return isinstance(obj, NUMERIC_TYPES) * */ static int __pyx_f_6pandas_8_testing_is_comparable_as_number(PyObject *__pyx_v_obj) { int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("is_comparable_as_number", 0); /* "pandas/src/testing.pyx":25 * * cdef bint is_comparable_as_number(obj): * return isinstance(obj, NUMERIC_TYPES) # <<<<<<<<<<<<<< * * cdef bint isiterable(obj): */ __pyx_t_1 = __pyx_v_6pandas_8_testing_NUMERIC_TYPES; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = PyObject_IsInstance(__pyx_v_obj, __pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 25; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_2; goto __pyx_L0; /* "pandas/src/testing.pyx":24 * ) * * cdef bint is_comparable_as_number(obj): # <<<<<<<<<<<<<< * return isinstance(obj, NUMERIC_TYPES) * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_WriteUnraisable("pandas._testing.is_comparable_as_number", __pyx_clineno, __pyx_lineno, __pyx_filename, 0); __pyx_r = 0; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/testing.pyx":27 * return isinstance(obj, NUMERIC_TYPES) * * cdef bint isiterable(obj): # <<<<<<<<<<<<<< * return hasattr(obj, '__iter__') * */ static int __pyx_f_6pandas_8_testing_isiterable(PyObject *__pyx_v_obj) { int __pyx_r; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("isiterable", 0); /* "pandas/src/testing.pyx":28 * * cdef bint isiterable(obj): * return hasattr(obj, '__iter__') # <<<<<<<<<<<<<< * * cdef bint has_length(obj): */ __pyx_t_1 = PyObject_HasAttr(__pyx_v_obj, __pyx_n_s_iter); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 28; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_t_1; goto __pyx_L0; /* "pandas/src/testing.pyx":27 * return isinstance(obj, NUMERIC_TYPES) * * cdef bint isiterable(obj): # <<<<<<<<<<<<<< * return hasattr(obj, '__iter__') * */ /* function exit code */ __pyx_L1_error:; __Pyx_WriteUnraisable("pandas._testing.isiterable", __pyx_clineno, __pyx_lineno, __pyx_filename, 0); __pyx_r = 0; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/testing.pyx":30 * return hasattr(obj, '__iter__') * * cdef bint has_length(obj): # <<<<<<<<<<<<<< * return hasattr(obj, '__len__') * */ static int __pyx_f_6pandas_8_testing_has_length(PyObject *__pyx_v_obj) { int __pyx_r; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("has_length", 0); /* "pandas/src/testing.pyx":31 * * cdef bint has_length(obj): * return hasattr(obj, '__len__') # <<<<<<<<<<<<<< * * cdef bint is_dictlike(obj): */ __pyx_t_1 = PyObject_HasAttr(__pyx_v_obj, __pyx_n_s_len); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 31; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_t_1; goto __pyx_L0; /* "pandas/src/testing.pyx":30 * return hasattr(obj, '__iter__') * * cdef bint has_length(obj): # <<<<<<<<<<<<<< * return hasattr(obj, '__len__') * */ /* function exit code */ __pyx_L1_error:; __Pyx_WriteUnraisable("pandas._testing.has_length", __pyx_clineno, __pyx_lineno, __pyx_filename, 0); __pyx_r = 0; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/testing.pyx":33 * return hasattr(obj, '__len__') * * cdef bint is_dictlike(obj): # <<<<<<<<<<<<<< * return hasattr(obj, 'keys') and hasattr(obj, '__getitem__') * */ static int __pyx_f_6pandas_8_testing_is_dictlike(PyObject *__pyx_v_obj) { int __pyx_r; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; int __pyx_t_3; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("is_dictlike", 0); /* "pandas/src/testing.pyx":34 * * cdef bint is_dictlike(obj): * return hasattr(obj, 'keys') and hasattr(obj, '__getitem__') # <<<<<<<<<<<<<< * * cdef bint decimal_almost_equal(double desired, double actual, int decimal): */ __pyx_t_1 = PyObject_HasAttr(__pyx_v_obj, __pyx_n_s_keys); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 34; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__pyx_t_1) { __pyx_t_2 = PyObject_HasAttr(__pyx_v_obj, __pyx_n_s_getitem); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 34; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_3 = __pyx_t_2; } else { __pyx_t_3 = __pyx_t_1; } __pyx_r = __pyx_t_3; goto __pyx_L0; /* "pandas/src/testing.pyx":33 * return hasattr(obj, '__len__') * * cdef bint is_dictlike(obj): # <<<<<<<<<<<<<< * return hasattr(obj, 'keys') and hasattr(obj, '__getitem__') * */ /* function exit code */ __pyx_L1_error:; __Pyx_WriteUnraisable("pandas._testing.is_dictlike", __pyx_clineno, __pyx_lineno, __pyx_filename, 0); __pyx_r = 0; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/testing.pyx":36 * return hasattr(obj, 'keys') and hasattr(obj, '__getitem__') * * cdef bint decimal_almost_equal(double desired, double actual, int decimal): # <<<<<<<<<<<<<< * # Code from * # http://docs.scipy.org/doc/numpy/reference/generated */ static int __pyx_f_6pandas_8_testing_decimal_almost_equal(double __pyx_v_desired, double __pyx_v_actual, int __pyx_v_decimal) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("decimal_almost_equal", 0); /* "pandas/src/testing.pyx":40 * # http://docs.scipy.org/doc/numpy/reference/generated * # /numpy.testing.assert_almost_equal.html * return abs(desired - actual) < (0.5 * 10.0 ** -decimal) # <<<<<<<<<<<<<< * * cpdef assert_dict_equal(a, b, bint compare_keys=True): */ __pyx_r = (fabs((__pyx_v_desired - __pyx_v_actual)) < (0.5 * pow(10.0, ((double)(-__pyx_v_decimal))))); goto __pyx_L0; /* "pandas/src/testing.pyx":36 * return hasattr(obj, 'keys') and hasattr(obj, '__getitem__') * * cdef bint decimal_almost_equal(double desired, double actual, int decimal): # <<<<<<<<<<<<<< * # Code from * # http://docs.scipy.org/doc/numpy/reference/generated */ /* function exit code */ __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/testing.pyx":42 * return abs(desired - actual) < (0.5 * 10.0 ** -decimal) * * cpdef assert_dict_equal(a, b, bint compare_keys=True): # <<<<<<<<<<<<<< * assert is_dictlike(a) and is_dictlike(b), ( * "Cannot compare dict objects, one or both is not dict-like" */ static PyObject *__pyx_pw_6pandas_8_testing_1assert_dict_equal(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_6pandas_8_testing_assert_dict_equal(PyObject *__pyx_v_a, PyObject *__pyx_v_b, CYTHON_UNUSED int __pyx_skip_dispatch, struct __pyx_opt_args_6pandas_8_testing_assert_dict_equal *__pyx_optional_args) { int __pyx_v_compare_keys = ((int)1); PyObject *__pyx_v_a_keys = NULL; PyObject *__pyx_v_b_keys = NULL; PyObject *__pyx_v_k = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *(*__pyx_t_6)(PyObject *); PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("assert_dict_equal", 0); if (__pyx_optional_args) { if (__pyx_optional_args->__pyx_n > 0) { __pyx_v_compare_keys = __pyx_optional_args->compare_keys; } } /* "pandas/src/testing.pyx":43 * * cpdef assert_dict_equal(a, b, bint compare_keys=True): * assert is_dictlike(a) and is_dictlike(b), ( # <<<<<<<<<<<<<< * "Cannot compare dict objects, one or both is not dict-like" * ) */ #ifndef CYTHON_WITHOUT_ASSERTIONS if (unlikely(!Py_OptimizeFlag)) { __pyx_t_1 = (__pyx_f_6pandas_8_testing_is_dictlike(__pyx_v_a) != 0); if (__pyx_t_1) { __pyx_t_2 = (__pyx_f_6pandas_8_testing_is_dictlike(__pyx_v_b) != 0); __pyx_t_3 = __pyx_t_2; } else { __pyx_t_3 = __pyx_t_1; } if (unlikely(!__pyx_t_3)) { PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_Cannot_compare_dict_objects_one); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 43; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } } #endif /* "pandas/src/testing.pyx":47 * ) * * a_keys = frozenset(a.keys()) # <<<<<<<<<<<<<< * b_keys = frozenset(b.keys()) * */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_a, __pyx_n_s_keys); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 47; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = PyObject_Call(__pyx_t_4, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 47; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 47; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyObject_Call(((PyObject *)((PyObject*)(&PyFrozenSet_Type))), __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 47; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_a_keys = ((PyObject*)__pyx_t_5); __pyx_t_5 = 0; /* "pandas/src/testing.pyx":48 * * a_keys = frozenset(a.keys()) * b_keys = frozenset(b.keys()) # <<<<<<<<<<<<<< * * if compare_keys: */ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_b, __pyx_n_s_keys); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = PyObject_Call(__pyx_t_5, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyObject_Call(((PyObject *)((PyObject*)(&PyFrozenSet_Type))), __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_v_b_keys = ((PyObject*)__pyx_t_4); __pyx_t_4 = 0; /* "pandas/src/testing.pyx":50 * b_keys = frozenset(b.keys()) * * if compare_keys: # <<<<<<<<<<<<<< * assert a_keys == b_keys * */ __pyx_t_3 = (__pyx_v_compare_keys != 0); if (__pyx_t_3) { /* "pandas/src/testing.pyx":51 * * if compare_keys: * assert a_keys == b_keys # <<<<<<<<<<<<<< * * for k in a_keys: */ #ifndef CYTHON_WITHOUT_ASSERTIONS if (unlikely(!Py_OptimizeFlag)) { __pyx_t_4 = PyObject_RichCompare(__pyx_v_a_keys, __pyx_v_b_keys, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_3)) { PyErr_SetNone(PyExc_AssertionError); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } } #endif goto __pyx_L3; } __pyx_L3:; /* "pandas/src/testing.pyx":53 * assert a_keys == b_keys * * for k in a_keys: # <<<<<<<<<<<<<< * assert_almost_equal(a[k], b[k]) * */ __pyx_t_4 = PyObject_GetIter(__pyx_v_a_keys); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 53; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_6 = Py_TYPE(__pyx_t_4)->tp_iternext; for (;;) { { __pyx_t_5 = __pyx_t_6(__pyx_t_4); if (unlikely(!__pyx_t_5)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 53; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } break; } __Pyx_GOTREF(__pyx_t_5); } __Pyx_XDECREF_SET(__pyx_v_k, __pyx_t_5); __pyx_t_5 = 0; /* "pandas/src/testing.pyx":54 * * for k in a_keys: * assert_almost_equal(a[k], b[k]) # <<<<<<<<<<<<<< * * return True */ __pyx_t_5 = PyObject_GetItem(__pyx_v_a, __pyx_v_k); if (unlikely(__pyx_t_5 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 54; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_5); __pyx_t_7 = PyObject_GetItem(__pyx_v_b, __pyx_v_k); if (unlikely(__pyx_t_7 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 54; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_7); __pyx_t_8 = __pyx_f_6pandas_8_testing_assert_almost_equal(__pyx_t_5, __pyx_t_7, 0, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 54; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "pandas/src/testing.pyx":56 * assert_almost_equal(a[k], b[k]) * * return True # <<<<<<<<<<<<<< * * cpdef assert_almost_equal(a, b, bint check_less_precise=False): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(Py_True); __pyx_r = Py_True; goto __pyx_L0; /* "pandas/src/testing.pyx":42 * return abs(desired - actual) < (0.5 * 10.0 ** -decimal) * * cpdef assert_dict_equal(a, b, bint compare_keys=True): # <<<<<<<<<<<<<< * assert is_dictlike(a) and is_dictlike(b), ( * "Cannot compare dict objects, one or both is not dict-like" */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_AddTraceback("pandas._testing.assert_dict_equal", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_a_keys); __Pyx_XDECREF(__pyx_v_b_keys); __Pyx_XDECREF(__pyx_v_k); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_8_testing_1assert_dict_equal(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_6pandas_8_testing_1assert_dict_equal(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_a = 0; PyObject *__pyx_v_b = 0; int __pyx_v_compare_keys; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("assert_dict_equal (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_a,&__pyx_n_s_b,&__pyx_n_s_compare_keys,0}; PyObject* values[3] = {0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_a)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_b)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("assert_dict_equal", 0, 2, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 42; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_compare_keys); if (value) { values[2] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "assert_dict_equal") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 42; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_a = values[0]; __pyx_v_b = values[1]; if (values[2]) { __pyx_v_compare_keys = __Pyx_PyObject_IsTrue(values[2]); if (unlikely((__pyx_v_compare_keys == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 42; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } else { __pyx_v_compare_keys = ((int)1); } } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("assert_dict_equal", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 42; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas._testing.assert_dict_equal", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pandas_8_testing_assert_dict_equal(__pyx_self, __pyx_v_a, __pyx_v_b, __pyx_v_compare_keys); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_8_testing_assert_dict_equal(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_a, PyObject *__pyx_v_b, int __pyx_v_compare_keys) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; struct __pyx_opt_args_6pandas_8_testing_assert_dict_equal __pyx_t_2; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("assert_dict_equal", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_2.__pyx_n = 1; __pyx_t_2.compare_keys = __pyx_v_compare_keys; __pyx_t_1 = __pyx_f_6pandas_8_testing_assert_dict_equal(__pyx_v_a, __pyx_v_b, 0, &__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 42; __pyx_clineno = __LINE__; goto __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._testing.assert_dict_equal", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/testing.pyx":58 * return True * * cpdef assert_almost_equal(a, b, bint check_less_precise=False): # <<<<<<<<<<<<<< * cdef: * int decimal */ static PyObject *__pyx_pw_6pandas_8_testing_3assert_almost_equal(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_6pandas_8_testing_assert_almost_equal(PyObject *__pyx_v_a, PyObject *__pyx_v_b, CYTHON_UNUSED int __pyx_skip_dispatch, struct __pyx_opt_args_6pandas_8_testing_assert_almost_equal *__pyx_optional_args) { int __pyx_v_check_less_precise = ((int)0); int __pyx_v_decimal; Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_na; Py_ssize_t __pyx_v_nb; double __pyx_v_fa; double __pyx_v_fb; PyObject *__pyx_v_dtype_a = NULL; PyObject *__pyx_v_dtype_b = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; Py_ssize_t __pyx_t_6; Py_ssize_t __pyx_t_7; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; PyObject *__pyx_t_11 = NULL; struct __pyx_opt_args_6pandas_8_testing_assert_almost_equal __pyx_t_12; double __pyx_t_13; double __pyx_t_14; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("assert_almost_equal", 0); if (__pyx_optional_args) { if (__pyx_optional_args->__pyx_n > 0) { __pyx_v_check_less_precise = __pyx_optional_args->check_less_precise; } } /* "pandas/src/testing.pyx":64 * double fa, fb * * if isinstance(a, dict) or isinstance(b, dict): # <<<<<<<<<<<<<< * return assert_dict_equal(a, b) * */ __pyx_t_1 = PyDict_Check(__pyx_v_a); if (!(__pyx_t_1 != 0)) { __pyx_t_2 = PyDict_Check(__pyx_v_b); __pyx_t_3 = (__pyx_t_2 != 0); } else { __pyx_t_3 = (__pyx_t_1 != 0); } if (__pyx_t_3) { /* "pandas/src/testing.pyx":65 * * if isinstance(a, dict) or isinstance(b, dict): * return assert_dict_equal(a, b) # <<<<<<<<<<<<<< * * if (isinstance(a, compat.string_types) or */ __Pyx_XDECREF(__pyx_r); __pyx_t_4 = __pyx_f_6pandas_8_testing_assert_dict_equal(__pyx_v_a, __pyx_v_b, 0, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 65; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; } /* "pandas/src/testing.pyx":67 * return assert_dict_equal(a, b) * * if (isinstance(a, compat.string_types) or # <<<<<<<<<<<<<< * isinstance(b, compat.string_types)): * assert a == b, "%r != %r" % (a, b) */ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_compat); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 67; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_string_types); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 67; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_3 = PyObject_IsInstance(__pyx_v_a, __pyx_t_5); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 67; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (!(__pyx_t_3 != 0)) { /* "pandas/src/testing.pyx":68 * * if (isinstance(a, compat.string_types) or * isinstance(b, compat.string_types)): # <<<<<<<<<<<<<< * assert a == b, "%r != %r" % (a, b) * return True */ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_compat); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 68; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_string_types); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 68; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_1 = PyObject_IsInstance(__pyx_v_b, __pyx_t_4); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 68; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_2 = (__pyx_t_1 != 0); } else { __pyx_t_2 = (__pyx_t_3 != 0); } if (__pyx_t_2) { /* "pandas/src/testing.pyx":69 * if (isinstance(a, compat.string_types) or * isinstance(b, compat.string_types)): * assert a == b, "%r != %r" % (a, b) # <<<<<<<<<<<<<< * return True * */ #ifndef CYTHON_WITHOUT_ASSERTIONS if (unlikely(!Py_OptimizeFlag)) { __pyx_t_4 = PyObject_RichCompare(__pyx_v_a, __pyx_v_b, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_2)) { __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_v_a); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_a); __Pyx_GIVEREF(__pyx_v_a); __Pyx_INCREF(__pyx_v_b); PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_b); __Pyx_GIVEREF(__pyx_v_b); __pyx_t_5 = __Pyx_PyString_Format(__pyx_kp_s_r_r, __pyx_t_4); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; PyErr_SetObject(PyExc_AssertionError, __pyx_t_5); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } } #endif /* "pandas/src/testing.pyx":70 * isinstance(b, compat.string_types)): * assert a == b, "%r != %r" % (a, b) * return True # <<<<<<<<<<<<<< * * if isiterable(a): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(Py_True); __pyx_r = Py_True; goto __pyx_L0; } /* "pandas/src/testing.pyx":72 * return True * * if isiterable(a): # <<<<<<<<<<<<<< * assert isiterable(b), ( * "First object is iterable, second isn't: %r != %r" % (a, b) */ __pyx_t_2 = (__pyx_f_6pandas_8_testing_isiterable(__pyx_v_a) != 0); if (__pyx_t_2) { /* "pandas/src/testing.pyx":73 * * if isiterable(a): * assert isiterable(b), ( # <<<<<<<<<<<<<< * "First object is iterable, second isn't: %r != %r" % (a, b) * ) */ #ifndef CYTHON_WITHOUT_ASSERTIONS if (unlikely(!Py_OptimizeFlag)) { if (unlikely(!(__pyx_f_6pandas_8_testing_isiterable(__pyx_v_b) != 0))) { /* "pandas/src/testing.pyx":74 * if isiterable(a): * assert isiterable(b), ( * "First object is iterable, second isn't: %r != %r" % (a, b) # <<<<<<<<<<<<<< * ) * assert has_length(a) and has_length(b), ( */ __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 74; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_v_a); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_a); __Pyx_GIVEREF(__pyx_v_a); __Pyx_INCREF(__pyx_v_b); PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_v_b); __Pyx_GIVEREF(__pyx_v_b); __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_First_object_is_iterable_second, __pyx_t_5); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 74; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; PyErr_SetObject(PyExc_AssertionError, __pyx_t_4); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 73; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } } #endif /* "pandas/src/testing.pyx":76 * "First object is iterable, second isn't: %r != %r" % (a, b) * ) * assert has_length(a) and has_length(b), ( # <<<<<<<<<<<<<< * "Can't compare objects without length, one or both is invalid: " * "(%r, %r)" % (a, b) */ #ifndef CYTHON_WITHOUT_ASSERTIONS if (unlikely(!Py_OptimizeFlag)) { __pyx_t_2 = (__pyx_f_6pandas_8_testing_has_length(__pyx_v_a) != 0); if (__pyx_t_2) { __pyx_t_3 = (__pyx_f_6pandas_8_testing_has_length(__pyx_v_b) != 0); __pyx_t_1 = __pyx_t_3; } else { __pyx_t_1 = __pyx_t_2; } if (unlikely(!__pyx_t_1)) { /* "pandas/src/testing.pyx":78 * assert has_length(a) and has_length(b), ( * "Can't compare objects without length, one or both is invalid: " * "(%r, %r)" % (a, b) # <<<<<<<<<<<<<< * ) * */ __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 78; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_v_a); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_a); __Pyx_GIVEREF(__pyx_v_a); __Pyx_INCREF(__pyx_v_b); PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_b); __Pyx_GIVEREF(__pyx_v_b); __pyx_t_5 = __Pyx_PyString_Format(__pyx_kp_s_Can_t_compare_objects_without_le, __pyx_t_4); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 78; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; PyErr_SetObject(PyExc_AssertionError, __pyx_t_5); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 76; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } } #endif /* "pandas/src/testing.pyx":81 * ) * * na, nb = len(a), len(b) # <<<<<<<<<<<<<< * assert na == nb, ( * "Length of two iterators not the same: %r != %r" % (na, nb) */ __pyx_t_6 = PyObject_Length(__pyx_v_a); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_7 = PyObject_Length(__pyx_v_b); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_na = __pyx_t_6; __pyx_v_nb = __pyx_t_7; /* "pandas/src/testing.pyx":82 * * na, nb = len(a), len(b) * assert na == nb, ( # <<<<<<<<<<<<<< * "Length of two iterators not the same: %r != %r" % (na, nb) * ) */ #ifndef CYTHON_WITHOUT_ASSERTIONS if (unlikely(!Py_OptimizeFlag)) { if (unlikely(!((__pyx_v_na == __pyx_v_nb) != 0))) { /* "pandas/src/testing.pyx":83 * na, nb = len(a), len(b) * assert na == nb, ( * "Length of two iterators not the same: %r != %r" % (na, nb) # <<<<<<<<<<<<<< * ) * if isinstance(a, np.ndarray) and isinstance(b, np.ndarray): */ __pyx_t_5 = PyInt_FromSsize_t(__pyx_v_na); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = PyInt_FromSsize_t(__pyx_v_nb); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_5 = 0; __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Length_of_two_iterators_not_the, __pyx_t_8); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; PyErr_SetObject(PyExc_AssertionError, __pyx_t_4); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } } #endif /* "pandas/src/testing.pyx":85 * "Length of two iterators not the same: %r != %r" % (na, nb) * ) * if isinstance(a, np.ndarray) and isinstance(b, np.ndarray): # <<<<<<<<<<<<<< * try: * if np.array_equal(a, b): */ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_ndarray); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_1 = PyObject_IsInstance(__pyx_v_a, __pyx_t_8); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if ((__pyx_t_1 != 0)) { __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_ndarray); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_2 = PyObject_IsInstance(__pyx_v_b, __pyx_t_4); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_3 = (__pyx_t_2 != 0); } else { __pyx_t_3 = (__pyx_t_1 != 0); } if (__pyx_t_3) { /* "pandas/src/testing.pyx":86 * ) * if isinstance(a, np.ndarray) and isinstance(b, np.ndarray): * try: # <<<<<<<<<<<<<< * if np.array_equal(a, b): * return True */ { __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11); __Pyx_XGOTREF(__pyx_t_9); __Pyx_XGOTREF(__pyx_t_10); __Pyx_XGOTREF(__pyx_t_11); /*try:*/ { /* "pandas/src/testing.pyx":87 * if isinstance(a, np.ndarray) and isinstance(b, np.ndarray): * try: * if np.array_equal(a, b): # <<<<<<<<<<<<<< * return True * except: */ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 87; __pyx_clineno = __LINE__; goto __pyx_L7_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_array_equal); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 87; __pyx_clineno = __LINE__; goto __pyx_L7_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 87; __pyx_clineno = __LINE__; goto __pyx_L7_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_v_a); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_a); __Pyx_GIVEREF(__pyx_v_a); __Pyx_INCREF(__pyx_v_b); PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_b); __Pyx_GIVEREF(__pyx_v_b); __pyx_t_5 = PyObject_Call(__pyx_t_8, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 87; __pyx_clineno = __LINE__; goto __pyx_L7_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 87; __pyx_clineno = __LINE__; goto __pyx_L7_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_3) { /* "pandas/src/testing.pyx":88 * try: * if np.array_equal(a, b): * return True # <<<<<<<<<<<<<< * except: * pass */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(Py_True); __pyx_r = Py_True; goto __pyx_L11_try_return; } } __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; goto __pyx_L14_try_end; __pyx_L7_error:; __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; /* "pandas/src/testing.pyx":89 * if np.array_equal(a, b): * return True * except: # <<<<<<<<<<<<<< * pass * */ /*except:*/ { PyErr_Restore(0,0,0); goto __pyx_L8_exception_handled; } __pyx_L11_try_return:; __Pyx_XGIVEREF(__pyx_t_9); __Pyx_XGIVEREF(__pyx_t_10); __Pyx_XGIVEREF(__pyx_t_11); __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_10, __pyx_t_11); goto __pyx_L0; __pyx_L8_exception_handled:; __Pyx_XGIVEREF(__pyx_t_9); __Pyx_XGIVEREF(__pyx_t_10); __Pyx_XGIVEREF(__pyx_t_11); __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_10, __pyx_t_11); __pyx_L14_try_end:; } goto __pyx_L6; } __pyx_L6:; /* "pandas/src/testing.pyx":92 * pass * * for i in xrange(na): # <<<<<<<<<<<<<< * assert_almost_equal(a[i], b[i], check_less_precise) * */ __pyx_t_7 = __pyx_v_na; for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_7; __pyx_t_6+=1) { __pyx_v_i = __pyx_t_6; /* "pandas/src/testing.pyx":93 * * for i in xrange(na): * assert_almost_equal(a[i], b[i], check_less_precise) # <<<<<<<<<<<<<< * * return True */ __pyx_t_5 = __Pyx_GetItemInt(__pyx_v_a, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(__pyx_t_5 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 93; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_b, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(__pyx_t_4 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 93; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_4); __pyx_t_12.__pyx_n = 1; __pyx_t_12.check_less_precise = __pyx_v_check_less_precise; __pyx_t_8 = __pyx_f_6pandas_8_testing_assert_almost_equal(__pyx_t_5, __pyx_t_4, 0, &__pyx_t_12); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 93; __pyx_clineno = __LINE__; goto __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_8); __pyx_t_8 = 0; } /* "pandas/src/testing.pyx":95 * assert_almost_equal(a[i], b[i], check_less_precise) * * return True # <<<<<<<<<<<<<< * elif isiterable(b): * assert False, ( */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(Py_True); __pyx_r = Py_True; goto __pyx_L0; } /* "pandas/src/testing.pyx":96 * * return True * elif isiterable(b): # <<<<<<<<<<<<<< * assert False, ( * "Second object is iterable, first isn't: %r != %r" % (a, b) */ __pyx_t_3 = (__pyx_f_6pandas_8_testing_isiterable(__pyx_v_b) != 0); if (__pyx_t_3) { /* "pandas/src/testing.pyx":97 * return True * elif isiterable(b): * assert False, ( # <<<<<<<<<<<<<< * "Second object is iterable, first isn't: %r != %r" % (a, b) * ) */ #ifndef CYTHON_WITHOUT_ASSERTIONS if (unlikely(!Py_OptimizeFlag)) { if (unlikely(!0)) { /* "pandas/src/testing.pyx":98 * elif isiterable(b): * assert False, ( * "Second object is iterable, first isn't: %r != %r" % (a, b) # <<<<<<<<<<<<<< * ) * */ __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 98; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_INCREF(__pyx_v_a); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_v_a); __Pyx_GIVEREF(__pyx_v_a); __Pyx_INCREF(__pyx_v_b); PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_v_b); __Pyx_GIVEREF(__pyx_v_b); __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Second_object_is_iterable_first, __pyx_t_8); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 98; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; PyErr_SetObject(PyExc_AssertionError, __pyx_t_4); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 97; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } } #endif goto __pyx_L5; } __pyx_L5:; /* "pandas/src/testing.pyx":101 * ) * * if isnull(a): # <<<<<<<<<<<<<< * assert isnull(b), ( * "First object is null, second isn't: %r != %r" % (a, b) */ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_isnull); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 101; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 101; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_INCREF(__pyx_v_a); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_v_a); __Pyx_GIVEREF(__pyx_v_a); __pyx_t_5 = PyObject_Call(__pyx_t_4, __pyx_t_8, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 101; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 101; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_3) { /* "pandas/src/testing.pyx":102 * * if isnull(a): * assert isnull(b), ( # <<<<<<<<<<<<<< * "First object is null, second isn't: %r != %r" % (a, b) * ) */ #ifndef CYTHON_WITHOUT_ASSERTIONS if (unlikely(!Py_OptimizeFlag)) { __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_isnull); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_INCREF(__pyx_v_b); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_v_b); __Pyx_GIVEREF(__pyx_v_b); __pyx_t_4 = PyObject_Call(__pyx_t_5, __pyx_t_8, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_3)) { /* "pandas/src/testing.pyx":103 * if isnull(a): * assert isnull(b), ( * "First object is null, second isn't: %r != %r" % (a, b) # <<<<<<<<<<<<<< * ) * return True */ __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_v_a); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_a); __Pyx_GIVEREF(__pyx_v_a); __Pyx_INCREF(__pyx_v_b); PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_b); __Pyx_GIVEREF(__pyx_v_b); __pyx_t_8 = __Pyx_PyString_Format(__pyx_kp_s_First_object_is_null_second_isn, __pyx_t_4); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; PyErr_SetObject(PyExc_AssertionError, __pyx_t_8); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } } #endif /* "pandas/src/testing.pyx":105 * "First object is null, second isn't: %r != %r" % (a, b) * ) * return True # <<<<<<<<<<<<<< * elif isnull(b): * assert isnull(a), ( */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(Py_True); __pyx_r = Py_True; goto __pyx_L0; } /* "pandas/src/testing.pyx":106 * ) * return True * elif isnull(b): # <<<<<<<<<<<<<< * assert isnull(a), ( * "First object is not null, second is null: %r != %r" % (a, b) */ __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_isnull); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 106; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 106; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_v_b); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_b); __Pyx_GIVEREF(__pyx_v_b); __pyx_t_5 = PyObject_Call(__pyx_t_8, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 106; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 106; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_3) { /* "pandas/src/testing.pyx":107 * return True * elif isnull(b): * assert isnull(a), ( # <<<<<<<<<<<<<< * "First object is not null, second is null: %r != %r" % (a, b) * ) */ #ifndef CYTHON_WITHOUT_ASSERTIONS if (unlikely(!Py_OptimizeFlag)) { __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_isnull); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_v_a); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_a); __Pyx_GIVEREF(__pyx_v_a); __pyx_t_8 = PyObject_Call(__pyx_t_5, __pyx_t_4, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (unlikely(!__pyx_t_3)) { /* "pandas/src/testing.pyx":108 * elif isnull(b): * assert isnull(a), ( * "First object is not null, second is null: %r != %r" % (a, b) # <<<<<<<<<<<<<< * ) * return True */ __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 108; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_INCREF(__pyx_v_a); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_v_a); __Pyx_GIVEREF(__pyx_v_a); __Pyx_INCREF(__pyx_v_b); PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_v_b); __Pyx_GIVEREF(__pyx_v_b); __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_First_object_is_not_null_second, __pyx_t_8); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 108; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; PyErr_SetObject(PyExc_AssertionError, __pyx_t_4); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } } #endif /* "pandas/src/testing.pyx":110 * "First object is not null, second is null: %r != %r" % (a, b) * ) * return True # <<<<<<<<<<<<<< * * if is_comparable_as_number(a): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(Py_True); __pyx_r = Py_True; goto __pyx_L0; } /* "pandas/src/testing.pyx":112 * return True * * if is_comparable_as_number(a): # <<<<<<<<<<<<<< * assert is_comparable_as_number(b), ( * "First object is numeric, second is not: %r != %r" % (a, b) */ __pyx_t_3 = (__pyx_f_6pandas_8_testing_is_comparable_as_number(__pyx_v_a) != 0); if (__pyx_t_3) { /* "pandas/src/testing.pyx":113 * * if is_comparable_as_number(a): * assert is_comparable_as_number(b), ( # <<<<<<<<<<<<<< * "First object is numeric, second is not: %r != %r" % (a, b) * ) */ #ifndef CYTHON_WITHOUT_ASSERTIONS if (unlikely(!Py_OptimizeFlag)) { if (unlikely(!(__pyx_f_6pandas_8_testing_is_comparable_as_number(__pyx_v_b) != 0))) { /* "pandas/src/testing.pyx":114 * if is_comparable_as_number(a): * assert is_comparable_as_number(b), ( * "First object is numeric, second is not: %r != %r" % (a, b) # <<<<<<<<<<<<<< * ) * */ __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 114; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_v_a); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_a); __Pyx_GIVEREF(__pyx_v_a); __Pyx_INCREF(__pyx_v_b); PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_b); __Pyx_GIVEREF(__pyx_v_b); __pyx_t_8 = __Pyx_PyString_Format(__pyx_kp_s_First_object_is_numeric_second_i, __pyx_t_4); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 114; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; PyErr_SetObject(PyExc_AssertionError, __pyx_t_8); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 113; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } } #endif /* "pandas/src/testing.pyx":117 * ) * * decimal = 5 # <<<<<<<<<<<<<< * * # deal with differing dtypes */ __pyx_v_decimal = 5; /* "pandas/src/testing.pyx":120 * * # deal with differing dtypes * if check_less_precise: # <<<<<<<<<<<<<< * dtype_a = np.dtype(type(a)) * dtype_b = np.dtype(type(b)) */ __pyx_t_3 = (__pyx_v_check_less_precise != 0); if (__pyx_t_3) { /* "pandas/src/testing.pyx":121 * # deal with differing dtypes * if check_less_precise: * dtype_a = np.dtype(type(a)) # <<<<<<<<<<<<<< * dtype_b = np.dtype(type(b)) * if dtype_a.kind == 'f' and dtype_b == 'f': */ __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 121; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_dtype); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 121; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 121; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_INCREF(((PyObject *)Py_TYPE(__pyx_v_a))); PyTuple_SET_ITEM(__pyx_t_8, 0, ((PyObject *)Py_TYPE(__pyx_v_a))); __Pyx_GIVEREF(((PyObject *)Py_TYPE(__pyx_v_a))); __pyx_t_5 = PyObject_Call(__pyx_t_4, __pyx_t_8, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 121; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_v_dtype_a = __pyx_t_5; __pyx_t_5 = 0; /* "pandas/src/testing.pyx":122 * if check_less_precise: * dtype_a = np.dtype(type(a)) * dtype_b = np.dtype(type(b)) # <<<<<<<<<<<<<< * if dtype_a.kind == 'f' and dtype_b == 'f': * if dtype_a.itemsize <= 4 and dtype_b.itemsize <= 4: */ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 122; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_dtype); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 122; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 122; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(((PyObject *)Py_TYPE(__pyx_v_b))); PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)Py_TYPE(__pyx_v_b))); __Pyx_GIVEREF(((PyObject *)Py_TYPE(__pyx_v_b))); __pyx_t_4 = PyObject_Call(__pyx_t_8, __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 122; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_v_dtype_b = __pyx_t_4; __pyx_t_4 = 0; /* "pandas/src/testing.pyx":123 * dtype_a = np.dtype(type(a)) * dtype_b = np.dtype(type(b)) * if dtype_a.kind == 'f' and dtype_b == 'f': # <<<<<<<<<<<<<< * if dtype_a.itemsize <= 4 and dtype_b.itemsize <= 4: * decimal = 3 */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_dtype_a, __pyx_n_s_kind); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 123; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_t_4, __pyx_n_s_f, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 123; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_3) { __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_dtype_b, __pyx_n_s_f, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 123; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_2 = __pyx_t_1; } else { __pyx_t_2 = __pyx_t_3; } if (__pyx_t_2) { /* "pandas/src/testing.pyx":124 * dtype_b = np.dtype(type(b)) * if dtype_a.kind == 'f' and dtype_b == 'f': * if dtype_a.itemsize <= 4 and dtype_b.itemsize <= 4: # <<<<<<<<<<<<<< * decimal = 3 * */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_dtype_a, __pyx_n_s_itemsize); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 124; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = PyObject_RichCompare(__pyx_t_4, __pyx_int_4, Py_LE); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 124; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 124; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_2) { __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_dtype_b, __pyx_n_s_itemsize); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 124; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = PyObject_RichCompare(__pyx_t_5, __pyx_int_4, Py_LE); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 124; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 124; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_1 = __pyx_t_3; } else { __pyx_t_1 = __pyx_t_2; } if (__pyx_t_1) { /* "pandas/src/testing.pyx":125 * if dtype_a.kind == 'f' and dtype_b == 'f': * if dtype_a.itemsize <= 4 and dtype_b.itemsize <= 4: * decimal = 3 # <<<<<<<<<<<<<< * * if np.isinf(a): */ __pyx_v_decimal = 3; goto __pyx_L22; } __pyx_L22:; goto __pyx_L21; } __pyx_L21:; goto __pyx_L20; } __pyx_L20:; /* "pandas/src/testing.pyx":127 * decimal = 3 * * if np.isinf(a): # <<<<<<<<<<<<<< * assert np.isinf(b), "First object is inf, second isn't" * else: */ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 127; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_isinf); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 127; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 127; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_v_a); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_a); __Pyx_GIVEREF(__pyx_v_a); __pyx_t_8 = PyObject_Call(__pyx_t_5, __pyx_t_4, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 127; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 127; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (__pyx_t_1) { /* "pandas/src/testing.pyx":128 * * if np.isinf(a): * assert np.isinf(b), "First object is inf, second isn't" # <<<<<<<<<<<<<< * else: * fa, fb = a, b */ #ifndef CYTHON_WITHOUT_ASSERTIONS if (unlikely(!Py_OptimizeFlag)) { __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_isinf); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_INCREF(__pyx_v_b); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_v_b); __Pyx_GIVEREF(__pyx_v_b); __pyx_t_5 = PyObject_Call(__pyx_t_4, __pyx_t_8, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_1)) { PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_First_object_is_inf_second_isn_t); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } } #endif goto __pyx_L23; } /*else*/ { /* "pandas/src/testing.pyx":130 * assert np.isinf(b), "First object is inf, second isn't" * else: * fa, fb = a, b # <<<<<<<<<<<<<< * * # case for zero */ __pyx_t_13 = __pyx_PyFloat_AsDouble(__pyx_v_a); if (unlikely((__pyx_t_13 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 130; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_14 = __pyx_PyFloat_AsDouble(__pyx_v_b); if (unlikely((__pyx_t_14 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 130; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_fa = __pyx_t_13; __pyx_v_fb = __pyx_t_14; /* "pandas/src/testing.pyx":133 * * # case for zero * if abs(fa) < 1e-5: # <<<<<<<<<<<<<< * if not decimal_almost_equal(fa, fb, decimal): * assert False, ( */ __pyx_t_1 = ((fabs(__pyx_v_fa) < 1e-5) != 0); if (__pyx_t_1) { /* "pandas/src/testing.pyx":134 * # case for zero * if abs(fa) < 1e-5: * if not decimal_almost_equal(fa, fb, decimal): # <<<<<<<<<<<<<< * assert False, ( * '(very low values) expected %.5f but got %.5f' % (b, a) */ __pyx_t_1 = ((!(__pyx_f_6pandas_8_testing_decimal_almost_equal(__pyx_v_fa, __pyx_v_fb, __pyx_v_decimal) != 0)) != 0); if (__pyx_t_1) { /* "pandas/src/testing.pyx":135 * if abs(fa) < 1e-5: * if not decimal_almost_equal(fa, fb, decimal): * assert False, ( # <<<<<<<<<<<<<< * '(very low values) expected %.5f but got %.5f' % (b, a) * ) */ #ifndef CYTHON_WITHOUT_ASSERTIONS if (unlikely(!Py_OptimizeFlag)) { if (unlikely(!0)) { /* "pandas/src/testing.pyx":136 * if not decimal_almost_equal(fa, fb, decimal): * assert False, ( * '(very low values) expected %.5f but got %.5f' % (b, a) # <<<<<<<<<<<<<< * ) * else: */ __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 136; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_v_b); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_b); __Pyx_GIVEREF(__pyx_v_b); __Pyx_INCREF(__pyx_v_a); PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_v_a); __Pyx_GIVEREF(__pyx_v_a); __pyx_t_8 = __Pyx_PyString_Format(__pyx_kp_s_very_low_values_expected_5f_but, __pyx_t_5); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 136; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; PyErr_SetObject(PyExc_AssertionError, __pyx_t_8); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 135; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } } #endif goto __pyx_L25; } __pyx_L25:; goto __pyx_L24; } /*else*/ { /* "pandas/src/testing.pyx":139 * ) * else: * if not decimal_almost_equal(1, fb / fa, decimal): # <<<<<<<<<<<<<< * assert False, 'expected %.5f but got %.5f' % (b, a) * */ if (unlikely(__pyx_v_fa == 0)) { #ifdef WITH_THREAD PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure(); #endif PyErr_SetString(PyExc_ZeroDivisionError, "float division"); #ifdef WITH_THREAD PyGILState_Release(__pyx_gilstate_save); #endif {__pyx_filename = __pyx_f[0]; __pyx_lineno = 139; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_1 = ((!(__pyx_f_6pandas_8_testing_decimal_almost_equal(1.0, (__pyx_v_fb / __pyx_v_fa), __pyx_v_decimal) != 0)) != 0); if (__pyx_t_1) { /* "pandas/src/testing.pyx":140 * else: * if not decimal_almost_equal(1, fb / fa, decimal): * assert False, 'expected %.5f but got %.5f' % (b, a) # <<<<<<<<<<<<<< * * else: */ #ifndef CYTHON_WITHOUT_ASSERTIONS if (unlikely(!Py_OptimizeFlag)) { if (unlikely(!0)) { __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 140; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_INCREF(__pyx_v_b); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_v_b); __Pyx_GIVEREF(__pyx_v_b); __Pyx_INCREF(__pyx_v_a); PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_v_a); __Pyx_GIVEREF(__pyx_v_a); __pyx_t_5 = __Pyx_PyString_Format(__pyx_kp_s_expected_5f_but_got_5f, __pyx_t_8); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 140; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; PyErr_SetObject(PyExc_AssertionError, __pyx_t_5); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 140; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } } #endif goto __pyx_L26; } __pyx_L26:; } __pyx_L24:; } __pyx_L23:; goto __pyx_L19; } /*else*/ { /* "pandas/src/testing.pyx":143 * * else: * assert a == b, "%r != %r" % (a, b) # <<<<<<<<<<<<<< * * return True */ #ifndef CYTHON_WITHOUT_ASSERTIONS if (unlikely(!Py_OptimizeFlag)) { __pyx_t_5 = PyObject_RichCompare(__pyx_v_a, __pyx_v_b, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 143; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 143; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_1)) { __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 143; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_v_a); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_a); __Pyx_GIVEREF(__pyx_v_a); __Pyx_INCREF(__pyx_v_b); PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_v_b); __Pyx_GIVEREF(__pyx_v_b); __pyx_t_8 = __Pyx_PyString_Format(__pyx_kp_s_r_r, __pyx_t_5); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 143; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; PyErr_SetObject(PyExc_AssertionError, __pyx_t_8); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 143; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } } #endif } __pyx_L19:; /* "pandas/src/testing.pyx":145 * assert a == b, "%r != %r" % (a, b) * * return True # <<<<<<<<<<<<<< */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(Py_True); __pyx_r = Py_True; goto __pyx_L0; /* "pandas/src/testing.pyx":58 * return True * * cpdef assert_almost_equal(a, b, bint check_less_precise=False): # <<<<<<<<<<<<<< * cdef: * int decimal */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_8); __Pyx_AddTraceback("pandas._testing.assert_almost_equal", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_dtype_a); __Pyx_XDECREF(__pyx_v_dtype_b); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_8_testing_3assert_almost_equal(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_6pandas_8_testing_3assert_almost_equal(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_a = 0; PyObject *__pyx_v_b = 0; int __pyx_v_check_less_precise; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("assert_almost_equal (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_a,&__pyx_n_s_b,&__pyx_n_s_check_less_precise,0}; PyObject* values[3] = {0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_a)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_b)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("assert_almost_equal", 0, 2, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 58; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_check_less_precise); if (value) { values[2] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "assert_almost_equal") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 58; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_a = values[0]; __pyx_v_b = values[1]; if (values[2]) { __pyx_v_check_less_precise = __Pyx_PyObject_IsTrue(values[2]); if (unlikely((__pyx_v_check_less_precise == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 58; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } else { __pyx_v_check_less_precise = ((int)0); } } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("assert_almost_equal", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 58; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas._testing.assert_almost_equal", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pandas_8_testing_2assert_almost_equal(__pyx_self, __pyx_v_a, __pyx_v_b, __pyx_v_check_less_precise); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_8_testing_2assert_almost_equal(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_a, PyObject *__pyx_v_b, int __pyx_v_check_less_precise) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; struct __pyx_opt_args_6pandas_8_testing_assert_almost_equal __pyx_t_2; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("assert_almost_equal", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_2.__pyx_n = 1; __pyx_t_2.check_less_precise = __pyx_v_check_less_precise; __pyx_t_1 = __pyx_f_6pandas_8_testing_assert_almost_equal(__pyx_v_a, __pyx_v_b, 0, &__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 58; __pyx_clineno = __LINE__; goto __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._testing.assert_almost_equal", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyMethodDef __pyx_methods[] = { {__Pyx_NAMESTR("assert_dict_equal"), (PyCFunction)__pyx_pw_6pandas_8_testing_1assert_dict_equal, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}, {__Pyx_NAMESTR("assert_almost_equal"), (PyCFunction)__pyx_pw_6pandas_8_testing_3assert_almost_equal, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}, {0, 0, 0, 0} }; #if PY_MAJOR_VERSION >= 3 static struct PyModuleDef __pyx_moduledef = { #if PY_VERSION_HEX < 0x03020000 { PyObject_HEAD_INIT(NULL) NULL, 0, NULL }, #else PyModuleDef_HEAD_INIT, #endif __Pyx_NAMESTR("_testing"), 0, /* m_doc */ -1, /* m_size */ __pyx_methods /* m_methods */, NULL, /* m_reload */ NULL, /* m_traverse */ NULL, /* m_clear */ NULL /* m_free */ }; #endif static __Pyx_StringTabEntry __pyx_string_tab[] = { {&__pyx_kp_s_Can_t_compare_objects_without_le, __pyx_k_Can_t_compare_objects_without_le, sizeof(__pyx_k_Can_t_compare_objects_without_le), 0, 0, 1, 0}, {&__pyx_kp_s_Cannot_compare_dict_objects_one, __pyx_k_Cannot_compare_dict_objects_one, sizeof(__pyx_k_Cannot_compare_dict_objects_one), 0, 0, 1, 0}, {&__pyx_kp_s_First_object_is_inf_second_isn_t, __pyx_k_First_object_is_inf_second_isn_t, sizeof(__pyx_k_First_object_is_inf_second_isn_t), 0, 0, 1, 0}, {&__pyx_kp_s_First_object_is_iterable_second, __pyx_k_First_object_is_iterable_second, sizeof(__pyx_k_First_object_is_iterable_second), 0, 0, 1, 0}, {&__pyx_kp_s_First_object_is_not_null_second, __pyx_k_First_object_is_not_null_second, sizeof(__pyx_k_First_object_is_not_null_second), 0, 0, 1, 0}, {&__pyx_kp_s_First_object_is_null_second_isn, __pyx_k_First_object_is_null_second_isn, sizeof(__pyx_k_First_object_is_null_second_isn), 0, 0, 1, 0}, {&__pyx_kp_s_First_object_is_numeric_second_i, __pyx_k_First_object_is_numeric_second_i, sizeof(__pyx_k_First_object_is_numeric_second_i), 0, 0, 1, 0}, {&__pyx_kp_s_Length_of_two_iterators_not_the, __pyx_k_Length_of_two_iterators_not_the, sizeof(__pyx_k_Length_of_two_iterators_not_the), 0, 0, 1, 0}, {&__pyx_kp_s_Second_object_is_iterable_first, __pyx_k_Second_object_is_iterable_first, sizeof(__pyx_k_Second_object_is_iterable_first), 0, 0, 1, 0}, {&__pyx_n_s_a, __pyx_k_a, sizeof(__pyx_k_a), 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_b, __pyx_k_b, sizeof(__pyx_k_b), 0, 0, 1, 1}, {&__pyx_n_s_bool, __pyx_k_bool, sizeof(__pyx_k_bool), 0, 0, 1, 1}, {&__pyx_n_s_check_less_precise, __pyx_k_check_less_precise, sizeof(__pyx_k_check_less_precise), 0, 0, 1, 1}, {&__pyx_n_s_compare_keys, __pyx_k_compare_keys, sizeof(__pyx_k_compare_keys), 0, 0, 1, 1}, {&__pyx_n_s_compat, __pyx_k_compat, sizeof(__pyx_k_compat), 0, 0, 1, 1}, {&__pyx_n_s_dtype, __pyx_k_dtype, sizeof(__pyx_k_dtype), 0, 0, 1, 1}, {&__pyx_kp_s_expected_5f_but_got_5f, __pyx_k_expected_5f_but_got_5f, sizeof(__pyx_k_expected_5f_but_got_5f), 0, 0, 1, 0}, {&__pyx_n_s_f, __pyx_k_f, sizeof(__pyx_k_f), 0, 0, 1, 1}, {&__pyx_n_s_float16, __pyx_k_float16, sizeof(__pyx_k_float16), 0, 0, 1, 1}, {&__pyx_n_s_float32, __pyx_k_float32, sizeof(__pyx_k_float32), 0, 0, 1, 1}, {&__pyx_n_s_float64, __pyx_k_float64, sizeof(__pyx_k_float64), 0, 0, 1, 1}, {&__pyx_n_s_getitem, __pyx_k_getitem, sizeof(__pyx_k_getitem), 0, 0, 1, 1}, {&__pyx_n_s_import, __pyx_k_import, sizeof(__pyx_k_import), 0, 0, 1, 1}, {&__pyx_n_s_int16, __pyx_k_int16, sizeof(__pyx_k_int16), 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_isinf, __pyx_k_isinf, sizeof(__pyx_k_isinf), 0, 0, 1, 1}, {&__pyx_n_s_isnull, __pyx_k_isnull, sizeof(__pyx_k_isnull), 0, 0, 1, 1}, {&__pyx_n_s_itemsize, __pyx_k_itemsize, sizeof(__pyx_k_itemsize), 0, 0, 1, 1}, {&__pyx_n_s_iter, __pyx_k_iter, sizeof(__pyx_k_iter), 0, 0, 1, 1}, {&__pyx_n_s_keys, __pyx_k_keys, sizeof(__pyx_k_keys), 0, 0, 1, 1}, {&__pyx_n_s_kind, __pyx_k_kind, sizeof(__pyx_k_kind), 0, 0, 1, 1}, {&__pyx_n_s_len, __pyx_k_len, sizeof(__pyx_k_len), 0, 0, 1, 1}, {&__pyx_n_s_main, __pyx_k_main, sizeof(__pyx_k_main), 0, 0, 1, 1}, {&__pyx_n_s_ndarray, __pyx_k_ndarray, sizeof(__pyx_k_ndarray), 0, 0, 1, 1}, {&__pyx_n_s_np, __pyx_k_np, sizeof(__pyx_k_np), 0, 0, 1, 1}, {&__pyx_n_s_numpy, __pyx_k_numpy, sizeof(__pyx_k_numpy), 0, 0, 1, 1}, {&__pyx_n_s_pandas, __pyx_k_pandas, sizeof(__pyx_k_pandas), 0, 0, 1, 1}, {&__pyx_n_s_pandas_core_common, __pyx_k_pandas_core_common, sizeof(__pyx_k_pandas_core_common), 0, 0, 1, 1}, {&__pyx_kp_s_r_r, __pyx_k_r_r, sizeof(__pyx_k_r_r), 0, 0, 1, 0}, {&__pyx_n_s_range, __pyx_k_range, sizeof(__pyx_k_range), 0, 0, 1, 1}, {&__pyx_n_s_string_types, __pyx_k_string_types, sizeof(__pyx_k_string_types), 0, 0, 1, 1}, {&__pyx_n_s_test, __pyx_k_test, sizeof(__pyx_k_test), 0, 0, 1, 1}, {&__pyx_n_s_uint16, __pyx_k_uint16, sizeof(__pyx_k_uint16), 0, 0, 1, 1}, {&__pyx_n_s_uint32, __pyx_k_uint32, sizeof(__pyx_k_uint32), 0, 0, 1, 1}, {&__pyx_n_s_uint64, __pyx_k_uint64, sizeof(__pyx_k_uint64), 0, 0, 1, 1}, {&__pyx_n_s_uint8, __pyx_k_uint8, sizeof(__pyx_k_uint8), 0, 0, 1, 1}, {&__pyx_kp_s_very_low_values_expected_5f_but, __pyx_k_very_low_values_expected_5f_but, sizeof(__pyx_k_very_low_values_expected_5f_but), 0, 0, 1, 0}, {&__pyx_n_s_xrange, __pyx_k_xrange, sizeof(__pyx_k_xrange), 0, 0, 1, 1}, {0, 0, 0, 0, 0, 0, 0} }; static int __Pyx_InitCachedBuiltins(void) { #if PY_MAJOR_VERSION >= 3 __pyx_builtin_xrange = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_xrange) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 92; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_builtin_xrange = __Pyx_GetBuiltinName(__pyx_n_s_xrange); if (!__pyx_builtin_xrange) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 92; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif return 0; __pyx_L1_error:; return -1; } static int __Pyx_InitCachedConstants(void) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0); __Pyx_RefNannyFinishContext(); return 0; } static int __Pyx_InitGlobals(void) { if (__Pyx_InitStrings(__pyx_string_tab) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __pyx_int_4 = PyInt_FromLong(4); if (unlikely(!__pyx_int_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} return 0; __pyx_L1_error:; return -1; } #if PY_MAJOR_VERSION < 3 PyMODINIT_FUNC init_testing(void); /*proto*/ PyMODINIT_FUNC init_testing(void) #else PyMODINIT_FUNC PyInit__testing(void); /*proto*/ PyMODINIT_FUNC PyInit__testing(void) #endif { PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; PyObject *__pyx_t_11 = NULL; PyObject *__pyx_t_12 = NULL; PyObject *__pyx_t_13 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannyDeclarations #if CYTHON_REFNANNY __Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny"); if (!__Pyx_RefNanny) { PyErr_Clear(); __Pyx_RefNanny = __Pyx_RefNannyImportAPI("Cython.Runtime.refnanny"); if (!__Pyx_RefNanny) Py_FatalError("failed to import 'refnanny' module"); } #endif __Pyx_RefNannySetupContext("PyMODINIT_FUNC PyInit__testing(void)", 0); if ( __Pyx_check_binary_version() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_empty_tuple)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_bytes)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #ifdef __Pyx_CyFunction_USED if (__Pyx_CyFunction_init() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif #ifdef __Pyx_FusedFunction_USED if (__pyx_FusedFunction_init() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif #ifdef __Pyx_Generator_USED if (__pyx_Generator_init() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif /*--- Library function declarations ---*/ /*--- Threads initialization code ---*/ #if defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS #ifdef WITH_THREAD /* Python build with threading support? */ PyEval_InitThreads(); #endif #endif /*--- Module creation code ---*/ #if PY_MAJOR_VERSION < 3 __pyx_m = Py_InitModule4(__Pyx_NAMESTR("_testing"), __pyx_methods, 0, 0, PYTHON_API_VERSION); Py_XINCREF(__pyx_m); #else __pyx_m = PyModule_Create(&__pyx_moduledef); #endif if (unlikely(!__pyx_m)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_d)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} Py_INCREF(__pyx_d); __pyx_b = PyImport_AddModule(__Pyx_NAMESTR(__Pyx_BUILTIN_MODULE_NAME)); if (unlikely(!__pyx_b)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #if CYTHON_COMPILING_IN_PYPY Py_INCREF(__pyx_b); #endif if (__Pyx_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; /*--- Initialize various global constants etc. ---*/ if (unlikely(__Pyx_InitGlobals() < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif if (__pyx_module_is_main_pandas___testing) { if (__Pyx_SetAttrString(__pyx_m, "__name__", __pyx_n_s_main) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; } #if PY_MAJOR_VERSION >= 3 { PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (!PyDict_GetItemString(modules, "pandas._testing")) { if (unlikely(PyDict_SetItemString(modules, "pandas._testing", __pyx_m) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } } #endif /*--- Builtin init code ---*/ if (unlikely(__Pyx_InitCachedBuiltins() < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /*--- Constants init code ---*/ if (unlikely(__Pyx_InitCachedConstants() < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /*--- Global init code ---*/ __pyx_v_6pandas_8_testing_NUMERIC_TYPES = Py_None; Py_INCREF(Py_None); /*--- Variable export code ---*/ /*--- Function export code ---*/ /*--- Type init code ---*/ /*--- Type import code ---*/ /*--- Variable import code ---*/ /*--- Function import code ---*/ /*--- Execution code ---*/ /* "pandas/src/testing.pyx":1 * import numpy as np # <<<<<<<<<<<<<< * * from pandas import compat */ __pyx_t_1 = __Pyx_Import(__pyx_n_s_numpy, 0, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_np, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/testing.pyx":3 * import numpy as np * * from pandas import compat # <<<<<<<<<<<<<< * from pandas.core.common import isnull * */ __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_n_s_compat); PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_compat); __Pyx_GIVEREF(__pyx_n_s_compat); __pyx_t_2 = __Pyx_Import(__pyx_n_s_pandas, __pyx_t_1, -1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_compat); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_compat, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/testing.pyx":4 * * from pandas import compat * from pandas.core.common import isnull # <<<<<<<<<<<<<< * * cdef NUMERIC_TYPES = ( */ __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_n_s_isnull); PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_isnull); __Pyx_GIVEREF(__pyx_n_s_isnull); __pyx_t_1 = __Pyx_Import(__pyx_n_s_pandas_core_common, __pyx_t_2, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_isnull); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_isnull, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/testing.pyx":10 * int, * float, * np.bool, # <<<<<<<<<<<<<< * np.int8, * np.int16, */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 10; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_bool); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 10; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/testing.pyx":11 * float, * np.bool, * np.int8, # <<<<<<<<<<<<<< * np.int16, * np.int32, */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 11; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_int8); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 11; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/testing.pyx":12 * np.bool, * np.int8, * np.int16, # <<<<<<<<<<<<<< * np.int32, * np.int64, */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 12; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_int16); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 12; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/testing.pyx":13 * np.int8, * np.int16, * np.int32, # <<<<<<<<<<<<<< * np.int64, * np.uint8, */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 13; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 13; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/testing.pyx":14 * np.int16, * np.int32, * np.int64, # <<<<<<<<<<<<<< * np.uint8, * np.uint16, */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 14; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_int64); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 14; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/testing.pyx":15 * np.int32, * np.int64, * np.uint8, # <<<<<<<<<<<<<< * np.uint16, * np.uint32, */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 15; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_uint8); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 15; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/testing.pyx":16 * np.int64, * np.uint8, * np.uint16, # <<<<<<<<<<<<<< * np.uint32, * np.uint64, */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 16; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_uint16); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 16; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/testing.pyx":17 * np.uint8, * np.uint16, * np.uint32, # <<<<<<<<<<<<<< * np.uint64, * np.float16, */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 17; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_uint32); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 17; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/testing.pyx":18 * np.uint16, * np.uint32, * np.uint64, # <<<<<<<<<<<<<< * np.float16, * np.float32, */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 18; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_uint64); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 18; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/testing.pyx":19 * np.uint32, * np.uint64, * np.float16, # <<<<<<<<<<<<<< * np.float32, * np.float64, */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 19; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_float16); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 19; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/testing.pyx":20 * np.uint64, * np.float16, * np.float32, # <<<<<<<<<<<<<< * np.float64, * ) */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 20; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_float32); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 20; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/testing.pyx":21 * np.float16, * np.float32, * np.float64, # <<<<<<<<<<<<<< * ) * */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 21; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_float64); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 21; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/testing.pyx":7 * * cdef NUMERIC_TYPES = ( * bool, # <<<<<<<<<<<<<< * int, * float, */ __pyx_t_1 = PyTuple_New(15); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 7; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject*)&PyBool_Type)); PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject*)&PyBool_Type)); __Pyx_GIVEREF(((PyObject*)&PyBool_Type)); __Pyx_INCREF(((PyObject *)((PyObject*)(&PyInt_Type)))); PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject *)((PyObject*)(&PyInt_Type)))); __Pyx_GIVEREF(((PyObject *)((PyObject*)(&PyInt_Type)))); __Pyx_INCREF(((PyObject *)((PyObject*)(&PyFloat_Type)))); PyTuple_SET_ITEM(__pyx_t_1, 2, ((PyObject *)((PyObject*)(&PyFloat_Type)))); __Pyx_GIVEREF(((PyObject *)((PyObject*)(&PyFloat_Type)))); PyTuple_SET_ITEM(__pyx_t_1, 3, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_1, 4, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_1, 5, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_1, 6, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_1, 7, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_1, 8, __pyx_t_7); __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_1, 9, __pyx_t_8); __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_1, 10, __pyx_t_9); __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_1, 11, __pyx_t_10); __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_1, 12, __pyx_t_11); __Pyx_GIVEREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_1, 13, __pyx_t_12); __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_1, 14, __pyx_t_13); __Pyx_GIVEREF(__pyx_t_13); __pyx_t_2 = 0; __pyx_t_3 = 0; __pyx_t_4 = 0; __pyx_t_5 = 0; __pyx_t_6 = 0; __pyx_t_7 = 0; __pyx_t_8 = 0; __pyx_t_9 = 0; __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __Pyx_XGOTREF(__pyx_v_6pandas_8_testing_NUMERIC_TYPES); __Pyx_DECREF_SET(__pyx_v_6pandas_8_testing_NUMERIC_TYPES, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/testing.pyx":1 * import numpy as np # <<<<<<<<<<<<<< * * from pandas import compat */ __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_test, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 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_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); __Pyx_XDECREF(__pyx_t_10); __Pyx_XDECREF(__pyx_t_11); __Pyx_XDECREF(__pyx_t_12); __Pyx_XDECREF(__pyx_t_13); if (__pyx_m) { __Pyx_AddTraceback("init pandas._testing", __pyx_clineno, __pyx_lineno, __pyx_filename); Py_DECREF(__pyx_m); __pyx_m = 0; } else if (!PyErr_Occurred()) { PyErr_SetString(PyExc_ImportError, "init pandas._testing"); } __pyx_L0:; __Pyx_RefNannyFinishContext(); #if PY_MAJOR_VERSION < 3 return; #else return __pyx_m; #endif } /* Runtime support code */ #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 /* CYTHON_REFNANNY */ 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; } static CYTHON_INLINE void __Pyx_ErrRestore(PyObject *type, PyObject *value, PyObject *tb) { #if CYTHON_COMPILING_IN_CPYTHON PyObject *tmp_type, *tmp_value, *tmp_tb; PyThreadState *tstate = PyThreadState_GET(); 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); #else PyErr_Restore(type, value, tb); #endif } static CYTHON_INLINE void __Pyx_ErrFetch(PyObject **type, PyObject **value, PyObject **tb) { #if CYTHON_COMPILING_IN_CPYTHON PyThreadState *tstate = PyThreadState_GET(); *type = tstate->curexc_type; *value = tstate->curexc_value; *tb = tstate->curexc_traceback; tstate->curexc_type = 0; tstate->curexc_value = 0; tstate->curexc_traceback = 0; #else PyErr_Fetch(type, value, tb); #endif } static void __Pyx_WriteUnraisable(const char *name, CYTHON_UNUSED int clineno, CYTHON_UNUSED int lineno, CYTHON_UNUSED const char *filename, int full_traceback) { PyObject *old_exc, *old_val, *old_tb; PyObject *ctx; __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); } } 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); } 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 } 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; } static CYTHON_INLINE PyObject *__Pyx_GetModuleGlobalName(PyObject *name) { PyObject *result; #if CYTHON_COMPILING_IN_CPYTHON result = PyDict_GetItem(__pyx_d, name); if (result) { Py_INCREF(result); } else { #else result = PyObject_GetItem(__pyx_d, name); if (!result) { PyErr_Clear(); #endif result = __Pyx_GetBuiltinName(name); } return result; } static CYTHON_INLINE void __Pyx_ExceptionSave(PyObject **type, PyObject **value, PyObject **tb) { #if CYTHON_COMPILING_IN_CPYTHON PyThreadState *tstate = PyThreadState_GET(); *type = tstate->exc_type; *value = tstate->exc_value; *tb = tstate->exc_traceback; Py_XINCREF(*type); Py_XINCREF(*value); Py_XINCREF(*tb); #else PyErr_GetExcInfo(type, value, tb); #endif } static void __Pyx_ExceptionReset(PyObject *type, PyObject *value, PyObject *tb) { #if CYTHON_COMPILING_IN_CPYTHON PyObject *tmp_type, *tmp_value, *tmp_tb; PyThreadState *tstate = PyThreadState_GET(); tmp_type = tstate->exc_type; tmp_value = tstate->exc_value; tmp_tb = tstate->exc_traceback; tstate->exc_type = type; tstate->exc_value = value; tstate->exc_traceback = tb; Py_XDECREF(tmp_type); Py_XDECREF(tmp_value); Py_XDECREF(tmp_tb); #else PyErr_SetExcInfo(type, value, tb); #endif } static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j) { PyObject *r; if (!j) return NULL; r = PyObject_GetItem(o, j); Py_DECREF(j); return r; } static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i, int wraparound, int boundscheck) { #if CYTHON_COMPILING_IN_CPYTHON if (wraparound & unlikely(i < 0)) i += PyList_GET_SIZE(o); if ((!boundscheck) || likely((0 <= i) & (i < PyList_GET_SIZE(o)))) { PyObject *r = PyList_GET_ITEM(o, i); Py_INCREF(r); return r; } return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i)); #else return PySequence_GetItem(o, i); #endif } static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i, int wraparound, int boundscheck) { #if CYTHON_COMPILING_IN_CPYTHON if (wraparound & unlikely(i < 0)) i += PyTuple_GET_SIZE(o); if ((!boundscheck) || likely((0 <= i) & (i < PyTuple_GET_SIZE(o)))) { PyObject *r = PyTuple_GET_ITEM(o, i); Py_INCREF(r); return r; } return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i)); #else return PySequence_GetItem(o, i); #endif } static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, int is_list, int wraparound, int boundscheck) { #if CYTHON_COMPILING_IN_CPYTHON if (is_list || PyList_CheckExact(o)) { Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyList_GET_SIZE(o); if ((!boundscheck) || (likely((n >= 0) & (n < PyList_GET_SIZE(o))))) { PyObject *r = PyList_GET_ITEM(o, n); Py_INCREF(r); return r; } } else if (PyTuple_CheckExact(o)) { Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyTuple_GET_SIZE(o); if ((!boundscheck) || likely((n >= 0) & (n < PyTuple_GET_SIZE(o)))) { PyObject *r = PyTuple_GET_ITEM(o, n); Py_INCREF(r); return r; } } else { PySequenceMethods *m = Py_TYPE(o)->tp_as_sequence; if (likely(m && m->sq_item)) { if (wraparound && unlikely(i < 0) && likely(m->sq_length)) { Py_ssize_t l = m->sq_length(o); if (likely(l >= 0)) { i += l; } else { if (PyErr_ExceptionMatches(PyExc_OverflowError)) PyErr_Clear(); else return NULL; } } 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)); } static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals) { #if CYTHON_COMPILING_IN_PYPY return PyObject_RichCompareBool(s1, s2, equals); #else if (s1 == s2) { return (equals == Py_EQ); } else if (PyBytes_CheckExact(s1) & PyBytes_CheckExact(s2)) { const char *ps1, *ps2; Py_ssize_t length = PyBytes_GET_SIZE(s1); if (length != PyBytes_GET_SIZE(s2)) return (equals == Py_NE); ps1 = PyBytes_AS_STRING(s1); ps2 = PyBytes_AS_STRING(s2); if (ps1[0] != ps2[0]) { return (equals == Py_NE); } else if (length == 1) { return (equals == Py_EQ); } else { int result = memcmp(ps1, ps2, (size_t)length); return (equals == Py_EQ) ? (result == 0) : (result != 0); } } else if ((s1 == Py_None) & PyBytes_CheckExact(s2)) { return (equals == Py_NE); } else if ((s2 == Py_None) & PyBytes_CheckExact(s1)) { return (equals == Py_NE); } else { int result; PyObject* py_result = PyObject_RichCompare(s1, s2, equals); if (!py_result) return -1; result = __Pyx_PyObject_IsTrue(py_result); Py_DECREF(py_result); return result; } #endif } static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals) { #if CYTHON_COMPILING_IN_PYPY return PyObject_RichCompareBool(s1, s2, equals); #else #if PY_MAJOR_VERSION < 3 PyObject* owned_ref = NULL; #endif int s1_is_unicode, s2_is_unicode; if (s1 == s2) { goto return_eq; } s1_is_unicode = PyUnicode_CheckExact(s1); s2_is_unicode = PyUnicode_CheckExact(s2); #if PY_MAJOR_VERSION < 3 if ((s1_is_unicode & (!s2_is_unicode)) && PyString_CheckExact(s2)) { owned_ref = PyUnicode_FromObject(s2); if (unlikely(!owned_ref)) return -1; s2 = owned_ref; s2_is_unicode = 1; } else if ((s2_is_unicode & (!s1_is_unicode)) && PyString_CheckExact(s1)) { owned_ref = PyUnicode_FromObject(s1); if (unlikely(!owned_ref)) return -1; s1 = owned_ref; s1_is_unicode = 1; } else if (((!s2_is_unicode) & (!s1_is_unicode))) { return __Pyx_PyBytes_Equals(s1, s2, equals); } #endif if (s1_is_unicode & s2_is_unicode) { Py_ssize_t length; int kind; void *data1, *data2; #if CYTHON_PEP393_ENABLED if (unlikely(PyUnicode_READY(s1) < 0) || unlikely(PyUnicode_READY(s2) < 0)) return -1; #endif length = __Pyx_PyUnicode_GET_LENGTH(s1); if (length != __Pyx_PyUnicode_GET_LENGTH(s2)) { goto return_ne; } kind = __Pyx_PyUnicode_KIND(s1); if (kind != __Pyx_PyUnicode_KIND(s2)) { goto return_ne; } data1 = __Pyx_PyUnicode_DATA(s1); data2 = __Pyx_PyUnicode_DATA(s2); if (__Pyx_PyUnicode_READ(kind, data1, 0) != __Pyx_PyUnicode_READ(kind, data2, 0)) { goto return_ne; } else if (length == 1) { goto return_eq; } else { int result = memcmp(data1, data2, length * kind); #if PY_MAJOR_VERSION < 3 Py_XDECREF(owned_ref); #endif return (equals == Py_EQ) ? (result == 0) : (result != 0); } } else if ((s1 == Py_None) & s2_is_unicode) { goto return_ne; } else if ((s2 == Py_None) & s1_is_unicode) { goto return_ne; } else { int result; PyObject* py_result = PyObject_RichCompare(s1, s2, equals); if (!py_result) return -1; result = __Pyx_PyObject_IsTrue(py_result); Py_DECREF(py_result); return result; } return_eq: #if PY_MAJOR_VERSION < 3 Py_XDECREF(owned_ref); #endif return (equals == Py_EQ); return_ne: #if PY_MAJOR_VERSION < 3 Py_XDECREF(owned_ref); #endif return (equals == Py_NE); #endif } 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; } static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level) { PyObject *empty_list = 0; PyObject *module = 0; PyObject *global_dict = 0; PyObject *empty_dict = 0; PyObject *list; #if PY_VERSION_HEX < 0x03030000 PyObject *py_import; py_import = __Pyx_PyObject_GetAttrStr(__pyx_b, __pyx_n_s_import); if (!py_import) goto bad; #endif if (from_list) list = from_list; else { empty_list = PyList_New(0); if (!empty_list) goto bad; list = empty_list; } global_dict = PyModule_GetDict(__pyx_m); if (!global_dict) goto bad; empty_dict = PyDict_New(); if (!empty_dict) goto bad; #if PY_VERSION_HEX >= 0x02050000 { #if PY_MAJOR_VERSION >= 3 if (level == -1) { if (strchr(__Pyx_MODULE_NAME, '.')) { #if PY_VERSION_HEX < 0x03030000 PyObject *py_level = PyInt_FromLong(1); if (!py_level) goto bad; module = PyObject_CallFunctionObjArgs(py_import, name, global_dict, empty_dict, list, py_level, NULL); Py_DECREF(py_level); #else module = PyImport_ImportModuleLevelObject( name, global_dict, empty_dict, list, 1); #endif if (!module) { if (!PyErr_ExceptionMatches(PyExc_ImportError)) goto bad; PyErr_Clear(); } } level = 0; /* try absolute import on failure */ } #endif if (!module) { #if PY_VERSION_HEX < 0x03030000 PyObject *py_level = PyInt_FromLong(level); if (!py_level) goto bad; module = PyObject_CallFunctionObjArgs(py_import, name, global_dict, empty_dict, list, py_level, NULL); Py_DECREF(py_level); #else module = PyImport_ImportModuleLevelObject( name, global_dict, empty_dict, list, level); #endif } } #else if (level>0) { PyErr_SetString(PyExc_RuntimeError, "Relative import is not supported for Python <=2.4."); goto bad; } module = PyObject_CallFunctionObjArgs(py_import, name, global_dict, empty_dict, list, NULL); #endif bad: #if PY_VERSION_HEX < 0x03030000 Py_XDECREF(py_import); #endif Py_XDECREF(empty_list); Py_XDECREF(empty_dict); return module; } static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) { const long neg_one = (long) -1, const_zero = 0; const int is_unsigned = neg_one > const_zero; if (is_unsigned) { if (sizeof(long) < sizeof(long)) { return PyInt_FromLong((long) value); } else if (sizeof(long) <= sizeof(unsigned long)) { return PyLong_FromUnsignedLong((unsigned long) value); } else if (sizeof(long) <= sizeof(unsigned long long)) { return PyLong_FromUnsignedLongLong((unsigned long long) value); } } else { if (sizeof(long) <= sizeof(long)) { return PyInt_FromLong((long) value); } else if (sizeof(long) <= sizeof(long long)) { return PyLong_FromLongLong((long long) value); } } { int one = 1; int little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&value; return _PyLong_FromByteArray(bytes, sizeof(long), little, !is_unsigned); } } #define __PYX_VERIFY_RETURN_INT(target_type, func_type, func) \ { \ func_type value = func(x); \ if (sizeof(target_type) < sizeof(func_type)) { \ if (unlikely(value != (func_type) (target_type) value)) { \ func_type zero = 0; \ PyErr_SetString(PyExc_OverflowError, \ (is_unsigned && unlikely(value < zero)) ? \ "can't convert negative value to " #target_type : \ "value too large to convert to " #target_type); \ return (target_type) -1; \ } \ } \ return (target_type) value; \ } #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS #include "longintrepr.h" #endif #endif static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) { const long neg_one = (long) -1, const_zero = 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) } else { long val = PyInt_AS_LONG(x); if (is_unsigned && unlikely(val < 0)) { PyErr_SetString(PyExc_OverflowError, "can't convert negative value to long"); return (long) -1; } return (long) val; } } else #endif if (likely(PyLong_Check(x))) { if (is_unsigned) { #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS if (sizeof(digit) <= sizeof(long)) { switch (Py_SIZE(x)) { case 0: return 0; case 1: return (long) ((PyLongObject*)x)->ob_digit[0]; } } #endif #endif if (unlikely(Py_SIZE(x) < 0)) { PyErr_SetString(PyExc_OverflowError, "can't convert negative value to long"); return (long) -1; } if (sizeof(long) <= sizeof(unsigned long)) { __PYX_VERIFY_RETURN_INT(long, unsigned long, PyLong_AsUnsignedLong) } else if (sizeof(long) <= sizeof(unsigned long long)) { __PYX_VERIFY_RETURN_INT(long, unsigned long long, PyLong_AsUnsignedLongLong) } } else { #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS if (sizeof(digit) <= sizeof(long)) { switch (Py_SIZE(x)) { case 0: return 0; case 1: return +(long) ((PyLongObject*)x)->ob_digit[0]; case -1: return -(long) ((PyLongObject*)x)->ob_digit[0]; } } #endif #endif if (sizeof(long) <= sizeof(long)) { __PYX_VERIFY_RETURN_INT(long, long, PyLong_AsLong) } else if (sizeof(long) <= sizeof(long long)) { __PYX_VERIFY_RETURN_INT(long, long long, PyLong_AsLongLong) } } { #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_Int(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_Int(x); if (!tmp) return (long) -1; val = __Pyx_PyInt_As_long(tmp); Py_DECREF(tmp); return val; } } #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS #include "longintrepr.h" #endif #endif static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) { const int neg_one = (int) -1, const_zero = 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) } else { long val = PyInt_AS_LONG(x); if (is_unsigned && unlikely(val < 0)) { PyErr_SetString(PyExc_OverflowError, "can't convert negative value to int"); return (int) -1; } return (int) val; } } else #endif if (likely(PyLong_Check(x))) { if (is_unsigned) { #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS if (sizeof(digit) <= sizeof(int)) { switch (Py_SIZE(x)) { case 0: return 0; case 1: return (int) ((PyLongObject*)x)->ob_digit[0]; } } #endif #endif if (unlikely(Py_SIZE(x) < 0)) { PyErr_SetString(PyExc_OverflowError, "can't convert negative value to int"); return (int) -1; } if (sizeof(int) <= sizeof(unsigned long)) { __PYX_VERIFY_RETURN_INT(int, unsigned long, PyLong_AsUnsignedLong) } else if (sizeof(int) <= sizeof(unsigned long long)) { __PYX_VERIFY_RETURN_INT(int, unsigned long long, PyLong_AsUnsignedLongLong) } } else { #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS if (sizeof(digit) <= sizeof(int)) { switch (Py_SIZE(x)) { case 0: return 0; case 1: return +(int) ((PyLongObject*)x)->ob_digit[0]; case -1: return -(int) ((PyLongObject*)x)->ob_digit[0]; } } #endif #endif if (sizeof(int) <= sizeof(long)) { __PYX_VERIFY_RETURN_INT(int, long, PyLong_AsLong) } else if (sizeof(int) <= sizeof(long long)) { __PYX_VERIFY_RETURN_INT(int, long long, PyLong_AsLongLong) } } { #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_Int(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_Int(x); if (!tmp) return (int) -1; val = __Pyx_PyInt_As_int(tmp); Py_DECREF(tmp); return val; } } 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); #if PY_VERSION_HEX < 0x02050000 return PyErr_Warn(NULL, message); #else return PyErr_WarnEx(NULL, message, 1); #endif } return 0; } 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) / 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, 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); } #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, /*int argcount,*/ 0, /*int kwonlyargcount,*/ 0, /*int nlocals,*/ 0, /*int stacksize,*/ 0, /*int flags,*/ __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, /*int firstlineno,*/ __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; PyObject *py_globals = 0; PyFrameObject *py_frame = 0; py_code = __pyx_find_code_object(c_line ? c_line : py_line); if (!py_code) { py_code = __Pyx_CreateCodeObjectForTraceback( funcname, c_line, py_line, filename); if (!py_code) goto bad; __pyx_insert_code_object(c_line ? c_line : py_line, py_code); } py_globals = PyModule_GetDict(__pyx_m); if (!py_globals) goto bad; py_frame = PyFrame_New( PyThreadState_GET(), /*PyThreadState *tstate,*/ py_code, /*PyCodeObject *code,*/ py_globals, /*PyObject *globals,*/ 0 /*PyObject *locals*/ ); if (!py_frame) goto bad; py_frame->f_lineno = py_line; PyTraceBack_Here(py_frame); bad: Py_XDECREF(py_code); Py_XDECREF(py_frame); } 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 /* Python 3+ has unicode identifiers */ if (t->is_unicode | t->is_str) { if (t->intern) { *t->p = PyUnicode_InternFromString(t->s); } else if (t->encoding) { *t->p = PyUnicode_Decode(t->s, t->n - 1, t->encoding, NULL); } else { *t->p = PyUnicode_FromStringAndSize(t->s, t->n - 1); } } else { *t->p = PyBytes_FromStringAndSize(t->s, t->n - 1); } #endif if (!*t->p) return -1; ++t; } return 0; } static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(char* c_str) { return __Pyx_PyUnicode_FromStringAndSize(c_str, strlen(c_str)); } static CYTHON_INLINE char* __Pyx_PyObject_AsString(PyObject* o) { Py_ssize_t ignore; return __Pyx_PyObject_AsStringAndSize(o, &ignore); } static CYTHON_INLINE char* __Pyx_PyObject_AsStringAndSize(PyObject* o, Py_ssize_t *length) { #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT if ( #if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII __Pyx_sys_getdefaultencoding_not_ascii && #endif PyUnicode_Check(o)) { #if PY_VERSION_HEX < 0x03030000 char* defenc_c; PyObject* defenc = _PyUnicode_AsDefaultEncodedString(o, NULL); if (!defenc) return NULL; defenc_c = PyBytes_AS_STRING(defenc); #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII { char* end = defenc_c + PyBytes_GET_SIZE(defenc); char* c; for (c = defenc_c; c < end; c++) { if ((unsigned char) (*c) >= 128) { PyUnicode_AsASCIIString(o); return NULL; } } } #endif /*__PYX_DEFAULT_STRING_ENCODING_IS_ASCII*/ *length = PyBytes_GET_SIZE(defenc); return defenc_c; #else /* PY_VERSION_HEX < 0x03030000 */ if (PyUnicode_READY(o) == -1) return NULL; #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII if (PyUnicode_IS_ASCII(o)) { *length = PyUnicode_GET_DATA_SIZE(o); return PyUnicode_AsUTF8(o); } else { PyUnicode_AsASCIIString(o); return NULL; } #else /* __PYX_DEFAULT_STRING_ENCODING_IS_ASCII */ return PyUnicode_AsUTF8AndSize(o, length); #endif /* __PYX_DEFAULT_STRING_ENCODING_IS_ASCII */ #endif /* PY_VERSION_HEX < 0x03030000 */ } else #endif /* __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT */ #if PY_VERSION_HEX >= 0x02060000 if (PyByteArray_Check(o)) { *length = PyByteArray_GET_SIZE(o); return PyByteArray_AS_STRING(o); } else #endif { char* result; int r = PyBytes_AsStringAndSize(o, &result, length); if (unlikely(r < 0)) { return NULL; } else { return result; } } } static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject* x) { int is_true = x == Py_True; if (is_true | (x == Py_False) | (x == Py_None)) return is_true; else return PyObject_IsTrue(x); } static CYTHON_INLINE PyObject* __Pyx_PyNumber_Int(PyObject* x) { PyNumberMethods *m; const char *name = NULL; PyObject *res = NULL; #if PY_MAJOR_VERSION < 3 if (PyInt_Check(x) || PyLong_Check(x)) #else if (PyLong_Check(x)) #endif return Py_INCREF(x), x; m = Py_TYPE(x)->tp_as_number; #if PY_MAJOR_VERSION < 3 if (m && m->nb_int) { name = "int"; res = PyNumber_Int(x); } else if (m && m->nb_long) { name = "long"; res = PyNumber_Long(x); } #else if (m && m->nb_int) { name = "int"; res = PyNumber_Long(x); } #endif if (res) { #if PY_MAJOR_VERSION < 3 if (!PyInt_Check(res) && !PyLong_Check(res)) { #else if (!PyLong_Check(res)) { #endif PyErr_Format(PyExc_TypeError, "__%.4s__ returned non-%.4s (type %.200s)", name, name, Py_TYPE(res)->tp_name); Py_DECREF(res); return NULL; } } else if (!PyErr_Occurred()) { PyErr_SetString(PyExc_TypeError, "an integer is required"); } return res; } #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS #include "longintrepr.h" #endif #endif 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))) return PyInt_AS_LONG(b); #endif if (likely(PyLong_CheckExact(b))) { #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS switch (Py_SIZE(b)) { case -1: return -(sdigit)((PyLongObject*)b)->ob_digit[0]; case 0: return 0; case 1: return ((PyLongObject*)b)->ob_digit[0]; } #endif #endif #if PY_VERSION_HEX < 0x02060000 return PyInt_AsSsize_t(b); #else return PyLong_AsSsize_t(b); #endif } 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) { #if PY_VERSION_HEX < 0x02050000 if (ival <= LONG_MAX) return PyInt_FromLong((long)ival); else { unsigned char *bytes = (unsigned char *) &ival; int one = 1; int little = (int)*(unsigned char*)&one; return _PyLong_FromByteArray(bytes, sizeof(size_t), little, 0); } #else return PyInt_FromSize_t(ival); #endif } #endif /* Py_PYTHON_H */ debian/cythonized-files/pandas/src/sparse.c0000664000000000000000000414371512275603610016167 0ustar /* Generated by Cython 0.20 on Mon Feb 3 08:41:48 2014 */ #define PY_SSIZE_T_CLEAN #ifndef CYTHON_USE_PYLONG_INTERNALS #ifdef PYLONG_BITS_IN_DIGIT #define CYTHON_USE_PYLONG_INTERNALS 0 #else #include "pyconfig.h" #ifdef PYLONG_BITS_IN_DIGIT #define CYTHON_USE_PYLONG_INTERNALS 1 #else #define CYTHON_USE_PYLONG_INTERNALS 0 #endif #endif #endif #include "Python.h" #ifndef Py_PYTHON_H #error Python headers needed to compile C extensions, please install development version of Python. #elif PY_VERSION_HEX < 0x02040000 #error Cython requires Python 2.4+. #else #define CYTHON_ABI "0_20" #include /* For offsetof */ #ifndef offsetof #define offsetof(type, member) ( (size_t) & ((type*)0) -> member ) #endif #if !defined(WIN32) && !defined(MS_WINDOWS) #ifndef __stdcall #define __stdcall #endif #ifndef __cdecl #define __cdecl #endif #ifndef __fastcall #define __fastcall #endif #endif #ifndef DL_IMPORT #define DL_IMPORT(t) t #endif #ifndef DL_EXPORT #define DL_EXPORT(t) t #endif #ifndef PY_LONG_LONG #define PY_LONG_LONG LONG_LONG #endif #ifndef Py_HUGE_VAL #define Py_HUGE_VAL HUGE_VAL #endif #ifdef PYPY_VERSION #define CYTHON_COMPILING_IN_PYPY 1 #define CYTHON_COMPILING_IN_CPYTHON 0 #else #define CYTHON_COMPILING_IN_PYPY 0 #define CYTHON_COMPILING_IN_CPYTHON 1 #endif #if CYTHON_COMPILING_IN_PYPY #define Py_OptimizeFlag 0 #endif #if PY_VERSION_HEX < 0x02050000 typedef int Py_ssize_t; #define PY_SSIZE_T_MAX INT_MAX #define PY_SSIZE_T_MIN INT_MIN #define PY_FORMAT_SIZE_T "" #define CYTHON_FORMAT_SSIZE_T "" #define PyInt_FromSsize_t(z) PyInt_FromLong(z) #define PyInt_AsSsize_t(o) __Pyx_PyInt_As_int(o) #define PyNumber_Index(o) ((PyNumber_Check(o) && !PyFloat_Check(o)) ? PyNumber_Int(o) : \ (PyErr_Format(PyExc_TypeError, \ "expected index value, got %.200s", Py_TYPE(o)->tp_name), \ (PyObject*)0)) #define __Pyx_PyIndex_Check(o) (PyNumber_Check(o) && !PyFloat_Check(o) && \ !PyComplex_Check(o)) #define PyIndex_Check __Pyx_PyIndex_Check #define PyErr_WarnEx(category, message, stacklevel) PyErr_Warn(category, message) #define __PYX_BUILD_PY_SSIZE_T "i" #else #define __PYX_BUILD_PY_SSIZE_T "n" #define CYTHON_FORMAT_SSIZE_T "z" #define __Pyx_PyIndex_Check PyIndex_Check #endif #if PY_VERSION_HEX < 0x02060000 #define Py_REFCNT(ob) (((PyObject*)(ob))->ob_refcnt) #define Py_TYPE(ob) (((PyObject*)(ob))->ob_type) #define Py_SIZE(ob) (((PyVarObject*)(ob))->ob_size) #define PyVarObject_HEAD_INIT(type, size) \ PyObject_HEAD_INIT(type) size, #define PyType_Modified(t) typedef struct { void *buf; PyObject *obj; Py_ssize_t len; Py_ssize_t itemsize; int readonly; int ndim; char *format; Py_ssize_t *shape; Py_ssize_t *strides; Py_ssize_t *suboffsets; void *internal; } Py_buffer; #define PyBUF_SIMPLE 0 #define PyBUF_WRITABLE 0x0001 #define PyBUF_FORMAT 0x0004 #define PyBUF_ND 0x0008 #define PyBUF_STRIDES (0x0010 | PyBUF_ND) #define PyBUF_C_CONTIGUOUS (0x0020 | PyBUF_STRIDES) #define PyBUF_F_CONTIGUOUS (0x0040 | PyBUF_STRIDES) #define PyBUF_ANY_CONTIGUOUS (0x0080 | PyBUF_STRIDES) #define PyBUF_INDIRECT (0x0100 | PyBUF_STRIDES) #define PyBUF_RECORDS (PyBUF_STRIDES | PyBUF_FORMAT | PyBUF_WRITABLE) #define PyBUF_FULL (PyBUF_INDIRECT | PyBUF_FORMAT | PyBUF_WRITABLE) typedef int (*getbufferproc)(PyObject *, Py_buffer *, int); typedef void (*releasebufferproc)(PyObject *, Py_buffer *); #endif #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, 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 #if PY_VERSION_HEX < 0x02060000 #define PyUnicode_FromString(s) PyUnicode_Decode(s, strlen(s), "UTF-8", "strict") #endif #if PY_MAJOR_VERSION >= 3 #define Py_TPFLAGS_CHECKTYPES 0 #define Py_TPFLAGS_HAVE_INDEX 0 #endif #if (PY_VERSION_HEX < 0x02060000) || (PY_MAJOR_VERSION >= 3) #define Py_TPFLAGS_HAVE_NEWBUFFER 0 #endif #if PY_VERSION_HEX < 0x02060000 #define Py_TPFLAGS_HAVE_VERSION_TAG 0 #endif #if PY_VERSION_HEX < 0x02060000 && !defined(Py_TPFLAGS_IS_ABSTRACT) #define Py_TPFLAGS_IS_ABSTRACT 0 #endif #if PY_VERSION_HEX < 0x030400a1 && !defined(Py_TPFLAGS_HAVE_FINALIZE) #define Py_TPFLAGS_HAVE_FINALIZE 0 #endif #if PY_VERSION_HEX > 0x03030000 && defined(PyUnicode_KIND) #define CYTHON_PEP393_ENABLED 1 #define __Pyx_PyUnicode_READY(op) (likely(PyUnicode_IS_READY(op)) ? \ 0 : _PyUnicode_Ready((PyObject *)(op))) #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_LENGTH(u) #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i) #define __Pyx_PyUnicode_KIND(u) PyUnicode_KIND(u) #define __Pyx_PyUnicode_DATA(u) PyUnicode_DATA(u) #define __Pyx_PyUnicode_READ(k, d, i) PyUnicode_READ(k, d, i) #else #define CYTHON_PEP393_ENABLED 0 #define __Pyx_PyUnicode_READY(op) (0) #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_SIZE(u) #define __Pyx_PyUnicode_READ_CHAR(u, i) ((Py_UCS4)(PyUnicode_AS_UNICODE(u)[i])) #define __Pyx_PyUnicode_KIND(u) (sizeof(Py_UNICODE)) #define __Pyx_PyUnicode_DATA(u) ((void*)PyUnicode_AS_UNICODE(u)) #define __Pyx_PyUnicode_READ(k, d, i) ((void)(k), (Py_UCS4)(((Py_UNICODE*)d)[i])) #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)) #define __Pyx_PyUnicode_Concat(a, b) ((unlikely((a) == Py_None) || unlikely((b) == Py_None)) ? \ PyNumber_Add(a, b) : PyUnicode_Concat(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 #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_VERSION_HEX < 0x02060000 #define PyBytesObject PyStringObject #define PyBytes_Type PyString_Type #define PyBytes_Check PyString_Check #define PyBytes_CheckExact PyString_CheckExact #define PyBytes_FromString PyString_FromString #define PyBytes_FromStringAndSize PyString_FromStringAndSize #define PyBytes_FromFormat PyString_FromFormat #define PyBytes_DecodeEscape PyString_DecodeEscape #define PyBytes_AsString PyString_AsString #define PyBytes_AsStringAndSize PyString_AsStringAndSize #define PyBytes_Size PyString_Size #define PyBytes_AS_STRING PyString_AS_STRING #define PyBytes_GET_SIZE PyString_GET_SIZE #define PyBytes_Repr PyString_Repr #define PyBytes_Concat PyString_Concat #define PyBytes_ConcatAndDel PyString_ConcatAndDel #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_CheckExact(obj) || PyUnicode_CheckExact(obj) || \ PyString_Check(obj) || PyUnicode_Check(obj)) #define __Pyx_PyBaseString_CheckExact(obj) (PyString_CheckExact(obj) || PyUnicode_CheckExact(obj)) #endif #if PY_VERSION_HEX < 0x02060000 #define PySet_Check(obj) PyObject_TypeCheck(obj, &PySet_Type) #define PyFrozenSet_Check(obj) PyObject_TypeCheck(obj, &PyFrozenSet_Type) #endif #ifndef PySet_CheckExact #define PySet_CheckExact(obj) (Py_TYPE(obj) == &PySet_Type) #endif #define __Pyx_TypeCheck(obj, type) PyObject_TypeCheck(obj, (PyTypeObject *)type) #if PY_MAJOR_VERSION >= 3 #define PyIntObject PyLongObject #define PyInt_Type PyLong_Type #define PyInt_Check(op) PyLong_Check(op) #define PyInt_CheckExact(op) PyLong_CheckExact(op) #define PyInt_FromString PyLong_FromString #define PyInt_FromUnicode PyLong_FromUnicode #define PyInt_FromLong PyLong_FromLong #define PyInt_FromSize_t PyLong_FromSize_t #define PyInt_FromSsize_t PyLong_FromSsize_t #define PyInt_AsLong PyLong_AsLong #define PyInt_AS_LONG PyLong_AS_LONG #define PyInt_AsSsize_t PyLong_AsSsize_t #define PyInt_AsUnsignedLongMask PyLong_AsUnsignedLongMask #define PyInt_AsUnsignedLongLongMask PyLong_AsUnsignedLongLongMask #define PyNumber_Int PyNumber_Long #endif #if PY_MAJOR_VERSION >= 3 #define PyBoolObject PyLongObject #endif #if PY_VERSION_HEX < 0x03020000 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) || (PY_VERSION_HEX >= 0x03010300) #define __Pyx_PySequence_GetSlice(obj, a, b) PySequence_GetSlice(obj, a, b) #define __Pyx_PySequence_SetSlice(obj, a, b, value) PySequence_SetSlice(obj, a, b, value) #define __Pyx_PySequence_DelSlice(obj, a, b) PySequence_DelSlice(obj, a, b) #else #define __Pyx_PySequence_GetSlice(obj, a, b) (unlikely(!(obj)) ? \ (PyErr_SetString(PyExc_SystemError, "null argument to internal routine"), (PyObject*)0) : \ (likely((obj)->ob_type->tp_as_mapping) ? (PySequence_GetSlice(obj, a, b)) : \ (PyErr_Format(PyExc_TypeError, "'%.200s' object is unsliceable", (obj)->ob_type->tp_name), (PyObject*)0))) #define __Pyx_PySequence_SetSlice(obj, a, b, value) (unlikely(!(obj)) ? \ (PyErr_SetString(PyExc_SystemError, "null argument to internal routine"), -1) : \ (likely((obj)->ob_type->tp_as_mapping) ? (PySequence_SetSlice(obj, a, b, value)) : \ (PyErr_Format(PyExc_TypeError, "'%.200s' object doesn't support slice assignment", (obj)->ob_type->tp_name), -1))) #define __Pyx_PySequence_DelSlice(obj, a, b) (unlikely(!(obj)) ? \ (PyErr_SetString(PyExc_SystemError, "null argument to internal routine"), -1) : \ (likely((obj)->ob_type->tp_as_mapping) ? (PySequence_DelSlice(obj, a, b)) : \ (PyErr_Format(PyExc_TypeError, "'%.200s' object doesn't support slice deletion", (obj)->ob_type->tp_name), -1))) #endif #if PY_MAJOR_VERSION >= 3 #define PyMethod_New(func, self, klass) ((self) ? PyMethod_New(func, self) : PyInstanceMethod_New(func)) #endif #if PY_VERSION_HEX < 0x02050000 #define __Pyx_GetAttrString(o,n) PyObject_GetAttrString((o),((char *)(n))) #define __Pyx_SetAttrString(o,n,a) PyObject_SetAttrString((o),((char *)(n)),(a)) #define __Pyx_DelAttrString(o,n) PyObject_DelAttrString((o),((char *)(n))) #else #define __Pyx_GetAttrString(o,n) PyObject_GetAttrString((o),(n)) #define __Pyx_SetAttrString(o,n,a) PyObject_SetAttrString((o),(n),(a)) #define __Pyx_DelAttrString(o,n) PyObject_DelAttrString((o),(n)) #endif #if PY_VERSION_HEX < 0x02050000 #define __Pyx_NAMESTR(n) ((char *)(n)) #define __Pyx_DOCSTR(n) ((char *)(n)) #else #define __Pyx_NAMESTR(n) (n) #define __Pyx_DOCSTR(n) (n) #endif #ifndef CYTHON_INLINE #if defined(__GNUC__) #define CYTHON_INLINE __inline__ #elif defined(_MSC_VER) #define CYTHON_INLINE __inline #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L #define CYTHON_INLINE inline #else #define CYTHON_INLINE #endif #endif #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 #ifdef NAN #define __PYX_NAN() ((float) NAN) #else static CYTHON_INLINE float __PYX_NAN() { /* Initialize NaN. The sign is irrelevant, an exponent with all bits 1 and a nonzero mantissa means NaN. If the first bit in the mantissa is 1, it is a quiet NaN. */ float value; memset(&value, 0xFF, sizeof(value)); return value; } #endif #if PY_MAJOR_VERSION >= 3 #define __Pyx_PyNumber_Divide(x,y) PyNumber_TrueDivide(x,y) #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceTrueDivide(x,y) #else #define __Pyx_PyNumber_Divide(x,y) PyNumber_Divide(x,y) #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceDivide(x,y) #endif #ifndef __PYX_EXTERN_C #ifdef __cplusplus #define __PYX_EXTERN_C extern "C" #else #define __PYX_EXTERN_C extern #endif #endif #if defined(WIN32) || defined(MS_WINDOWS) #define _USE_MATH_DEFINES #endif #include #define __PYX_HAVE__pandas___sparse #define __PYX_HAVE_API__pandas___sparse #include "string.h" #include "stdio.h" #include "stdlib.h" #include "numpy/arrayobject.h" #include "numpy/ufuncobject.h" #ifdef _OPENMP #include #endif /* _OPENMP */ #ifdef PYREX_WITHOUT_ASSERTIONS #define CYTHON_WITHOUT_ASSERTIONS #endif #ifndef CYTHON_UNUSED # if defined(__GNUC__) # if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)) # define CYTHON_UNUSED __attribute__ ((__unused__)) # else # define CYTHON_UNUSED # endif # elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER)) # define CYTHON_UNUSED __attribute__ ((__unused__)) # else # define CYTHON_UNUSED # endif #endif typedef struct {PyObject **p; char *s; const Py_ssize_t n; const char* encoding; const char is_unicode; const char is_str; const char intern; } __Pyx_StringTabEntry; /*proto*/ #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_fits_Py_ssize_t(v, type, is_signed) ( \ (sizeof(type) < sizeof(Py_ssize_t)) || \ (sizeof(type) > sizeof(Py_ssize_t) && \ likely(v < (type)PY_SSIZE_T_MAX || \ v == (type)PY_SSIZE_T_MAX) && \ (!is_signed || likely(v > (type)PY_SSIZE_T_MIN || \ v == (type)PY_SSIZE_T_MIN))) || \ (sizeof(type) == sizeof(Py_ssize_t) && \ (is_signed || likely(v < (type)PY_SSIZE_T_MAX || \ v == (type)PY_SSIZE_T_MAX))) ) static CYTHON_INLINE char* __Pyx_PyObject_AsString(PyObject*); static CYTHON_INLINE char* __Pyx_PyObject_AsStringAndSize(PyObject*, Py_ssize_t* length); #define __Pyx_PyByteArray_FromString(s) PyByteArray_FromStringAndSize((const char*)s, strlen((const char*)s)) #define __Pyx_PyByteArray_FromStringAndSize(s, l) PyByteArray_FromStringAndSize((const char*)s, l) #define __Pyx_PyBytes_FromString PyBytes_FromString #define __Pyx_PyBytes_FromStringAndSize PyBytes_FromStringAndSize static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(char*); #if PY_MAJOR_VERSION < 3 #define __Pyx_PyStr_FromString __Pyx_PyBytes_FromString #define __Pyx_PyStr_FromStringAndSize __Pyx_PyBytes_FromStringAndSize #else #define __Pyx_PyStr_FromString __Pyx_PyUnicode_FromString #define __Pyx_PyStr_FromStringAndSize __Pyx_PyUnicode_FromStringAndSize #endif #define __Pyx_PyObject_AsSString(s) ((signed char*) __Pyx_PyObject_AsString(s)) #define __Pyx_PyObject_AsUString(s) ((unsigned char*) __Pyx_PyObject_AsString(s)) #define __Pyx_PyObject_FromUString(s) __Pyx_PyObject_FromString((char*)s) #define __Pyx_PyBytes_FromUString(s) __Pyx_PyBytes_FromString((char*)s) #define __Pyx_PyByteArray_FromUString(s) __Pyx_PyByteArray_FromString((char*)s) #define __Pyx_PyStr_FromUString(s) __Pyx_PyStr_FromString((char*)s) #define __Pyx_PyUnicode_FromUString(s) __Pyx_PyUnicode_FromString((char*)s) #if PY_MAJOR_VERSION < 3 static CYTHON_INLINE size_t __Pyx_Py_UNICODE_strlen(const Py_UNICODE *u) { const Py_UNICODE *u_end = u; while (*u_end++) ; return u_end - u - 1; } #else #define __Pyx_Py_UNICODE_strlen Py_UNICODE_strlen #endif #define __Pyx_PyUnicode_FromUnicode(u) PyUnicode_FromUnicode(u, __Pyx_Py_UNICODE_strlen(u)) #define __Pyx_PyUnicode_FromUnicodeAndLength PyUnicode_FromUnicode #define __Pyx_PyUnicode_AsUnicode PyUnicode_AsUnicode #define __Pyx_Owned_Py_None(b) (Py_INCREF(Py_None), Py_None) #define __Pyx_PyBool_FromLong(b) ((b) ? (Py_INCREF(Py_True), Py_True) : (Py_INCREF(Py_False), Py_False)) static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*); static CYTHON_INLINE PyObject* __Pyx_PyNumber_Int(PyObject* x); static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*); static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t); #if CYTHON_COMPILING_IN_CPYTHON #define __pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x)) #else #define __pyx_PyFloat_AsDouble(x) PyFloat_AsDouble(x) #endif #define __pyx_PyFloat_AsFloat(x) ((float) __pyx_PyFloat_AsDouble(x)) #if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII static int __Pyx_sys_getdefaultencoding_not_ascii; static int __Pyx_init_sys_getdefaultencoding_params(void) { PyObject* sys = NULL; PyObject* default_encoding = NULL; PyObject* ascii_chars_u = NULL; PyObject* ascii_chars_b = NULL; sys = PyImport_ImportModule("sys"); if (sys == NULL) goto bad; default_encoding = PyObject_CallMethod(sys, (char*) (const char*) "getdefaultencoding", NULL); if (default_encoding == NULL) goto bad; if (strcmp(PyBytes_AsString(default_encoding), "ascii") == 0) { __Pyx_sys_getdefaultencoding_not_ascii = 0; } else { const char* default_encoding_c = PyBytes_AS_STRING(default_encoding); 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 == NULL) goto bad; ascii_chars_b = PyUnicode_AsEncodedString(ascii_chars_u, default_encoding_c, NULL); if (ascii_chars_b == NULL || strncmp(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_XDECREF(sys); Py_XDECREF(default_encoding); Py_XDECREF(ascii_chars_u); Py_XDECREF(ascii_chars_b); return 0; bad: Py_XDECREF(sys); 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 = NULL; PyObject* default_encoding = NULL; char* default_encoding_c; sys = PyImport_ImportModule("sys"); if (sys == NULL) goto bad; default_encoding = PyObject_CallMethod(sys, (char*) (const char*) "getdefaultencoding", NULL); if (default_encoding == NULL) goto bad; default_encoding_c = PyBytes_AS_STRING(default_encoding); __PYX_DEFAULT_STRING_ENCODING = (char*) malloc(strlen(default_encoding_c)); strcpy(__PYX_DEFAULT_STRING_ENCODING, default_encoding_c); Py_DECREF(sys); Py_DECREF(default_encoding); return 0; bad: Py_XDECREF(sys); Py_XDECREF(default_encoding); return -1; } #endif #endif #ifdef __GNUC__ /* Test for GCC > 2.95 */ #if __GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95)) #define likely(x) __builtin_expect(!!(x), 1) #define unlikely(x) __builtin_expect(!!(x), 0) #else /* __GNUC__ > 2 ... */ #define likely(x) (x) #define unlikely(x) (x) #endif /* __GNUC__ > 2 ... */ #else /* __GNUC__ */ #define likely(x) (x) #define unlikely(x) (x) #endif /* __GNUC__ */ static PyObject *__pyx_m; static PyObject *__pyx_d; static PyObject *__pyx_b; static PyObject *__pyx_empty_tuple; static PyObject *__pyx_empty_bytes; static int __pyx_lineno; static int __pyx_clineno = 0; static const char * __pyx_cfilenm= __FILE__; static const char *__pyx_filename; #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[] = { "sparse.pyx", "numpy.pxd", }; #define IS_UNSIGNED(type) (((type) -1) > 0) struct __Pyx_StructField_; #define __PYX_BUF_FLAGS_PACKED_STRUCT (1 << 0) typedef struct { const char* name; /* for error messages only */ struct __Pyx_StructField_* fields; size_t size; /* sizeof(type) */ size_t arraysize[8]; /* length of array in each dimension */ int ndim; char typegroup; /* _R_eal, _C_omplex, Signed _I_nt, _U_nsigned int, _S_truct, _P_ointer, _O_bject, c_H_ar */ 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; /* "numpy.pxd":726 * # 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; /* "numpy.pxd":727 * * 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; /* "numpy.pxd":728 * 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; /* "numpy.pxd":729 * 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; /* "numpy.pxd":733 * #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; /* "numpy.pxd":734 * * 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; /* "numpy.pxd":735 * 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; /* "numpy.pxd":736 * 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; /* "numpy.pxd":740 * #ctypedef npy_uint128 uint128_t * * ctypedef npy_float16 float16_t # <<<<<<<<<<<<<< * ctypedef npy_float32 float32_t * ctypedef npy_float64 float64_t */ typedef npy_float16 __pyx_t_5numpy_float16_t; /* "numpy.pxd":741 * * ctypedef npy_float16 float16_t * ctypedef npy_float32 float32_t # <<<<<<<<<<<<<< * ctypedef npy_float64 float64_t * #ctypedef npy_float80 float80_t */ typedef npy_float32 __pyx_t_5numpy_float32_t; /* "numpy.pxd":742 * ctypedef npy_float16 float16_t * 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; /* "numpy.pxd":751 * # 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; /* "numpy.pxd":752 * # 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; /* "numpy.pxd":753 * 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; /* "numpy.pxd":755 * 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; /* "numpy.pxd":756 * * ctypedef npy_ulong uint_t * ctypedef npy_ulonglong ulong_t # <<<<<<<<<<<<<< * ctypedef npy_ulonglong ulonglong_t * */ typedef npy_ulonglong __pyx_t_5numpy_ulong_t; /* "numpy.pxd":757 * 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; /* "numpy.pxd":759 * ctypedef npy_ulonglong ulonglong_t * * ctypedef npy_intp intp_t # <<<<<<<<<<<<<< * ctypedef npy_uintp uintp_t * */ typedef npy_intp __pyx_t_5numpy_intp_t; /* "numpy.pxd":760 * * ctypedef npy_intp intp_t * ctypedef npy_uintp uintp_t # <<<<<<<<<<<<<< * * ctypedef npy_double float_t */ typedef npy_uintp __pyx_t_5numpy_uintp_t; /* "numpy.pxd":762 * 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; /* "numpy.pxd":763 * * ctypedef npy_double float_t * ctypedef npy_double double_t # <<<<<<<<<<<<<< * ctypedef npy_longdouble longdouble_t * */ typedef npy_double __pyx_t_5numpy_double_t; /* "numpy.pxd":764 * 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; #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 #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 /*--- Type declarations ---*/ struct __pyx_obj_6pandas_7_sparse_BlockMerge; struct __pyx_obj_6pandas_7_sparse_SparseIndex; struct __pyx_obj_6pandas_7_sparse_BlockIndex; struct __pyx_obj_6pandas_7_sparse_IntIndex; struct __pyx_obj_6pandas_7_sparse_BlockIntersection; struct __pyx_obj_6pandas_7_sparse_BlockUnion; /* "numpy.pxd":766 * 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; /* "numpy.pxd":767 * * ctypedef npy_cfloat cfloat_t * ctypedef npy_cdouble cdouble_t # <<<<<<<<<<<<<< * ctypedef npy_clongdouble clongdouble_t * */ typedef npy_cdouble __pyx_t_5numpy_cdouble_t; /* "numpy.pxd":768 * 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; /* "numpy.pxd":770 * 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/src/sparse.pyx":688 * # Sparse arithmetic * * ctypedef float64_t (* double_func)(float64_t a, float64_t b) # <<<<<<<<<<<<<< * * cdef inline tuple sparse_nancombine(ndarray x, SparseIndex xindex, */ typedef __pyx_t_5numpy_float64_t (*__pyx_t_6pandas_7_sparse_double_func)(__pyx_t_5numpy_float64_t, __pyx_t_5numpy_float64_t); /* "pandas/src/sparse.pyx":527 * * * cdef class BlockMerge(object): # <<<<<<<<<<<<<< * ''' * Object-oriented approach makes sharing state between recursive functions a */ struct __pyx_obj_6pandas_7_sparse_BlockMerge { PyObject_HEAD struct __pyx_vtabstruct_6pandas_7_sparse_BlockMerge *__pyx_vtab; struct __pyx_obj_6pandas_7_sparse_BlockIndex *x; struct __pyx_obj_6pandas_7_sparse_BlockIndex *y; struct __pyx_obj_6pandas_7_sparse_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/src/sparse.pyx":25 * * * cdef class SparseIndex: # <<<<<<<<<<<<<< * ''' * Abstract superclass for sparse index types */ struct __pyx_obj_6pandas_7_sparse_SparseIndex { PyObject_HEAD }; /* "pandas/src/sparse.pyx":259 * # BlockIndex * * cdef class BlockIndex(SparseIndex): # <<<<<<<<<<<<<< * ''' * Object for holding block-based sparse indexing information */ struct __pyx_obj_6pandas_7_sparse_BlockIndex { struct __pyx_obj_6pandas_7_sparse_SparseIndex __pyx_base; struct __pyx_vtabstruct_6pandas_7_sparse_BlockIndex *__pyx_vtab; Py_ssize_t nblocks; Py_ssize_t npoints; Py_ssize_t length; PyArrayObject *blocs; PyArrayObject *blengths; PyObject *__weakref__; __pyx_t_5numpy_int32_t *locbuf; __pyx_t_5numpy_int32_t *lenbuf; }; /* "pandas/src/sparse.pyx":33 * * * cdef class IntIndex(SparseIndex): # <<<<<<<<<<<<<< * ''' * Object for holding exact integer sparse indexing information */ struct __pyx_obj_6pandas_7_sparse_IntIndex { struct __pyx_obj_6pandas_7_sparse_SparseIndex __pyx_base; struct __pyx_vtabstruct_6pandas_7_sparse_IntIndex *__pyx_vtab; Py_ssize_t length; Py_ssize_t npoints; PyArrayObject *indices; }; /* "pandas/src/sparse.pyx":569 * self.yi = xi * * cdef class BlockIntersection(BlockMerge): # <<<<<<<<<<<<<< * ''' * not done yet */ struct __pyx_obj_6pandas_7_sparse_BlockIntersection { struct __pyx_obj_6pandas_7_sparse_BlockMerge __pyx_base; }; /* "pandas/src/sparse.pyx":575 * pass * * cdef class BlockUnion(BlockMerge): # <<<<<<<<<<<<<< * ''' * Object-oriented approach makes sharing state between recursive functions a */ struct __pyx_obj_6pandas_7_sparse_BlockUnion { struct __pyx_obj_6pandas_7_sparse_BlockMerge __pyx_base; }; /* "pandas/src/sparse.pyx":527 * * * cdef class BlockMerge(object): # <<<<<<<<<<<<<< * ''' * Object-oriented approach makes sharing state between recursive functions a */ struct __pyx_vtabstruct_6pandas_7_sparse_BlockMerge { PyObject *(*_make_merged_blocks)(struct __pyx_obj_6pandas_7_sparse_BlockMerge *); PyObject *(*_set_current_indices)(struct __pyx_obj_6pandas_7_sparse_BlockMerge *, __pyx_t_5numpy_int32_t, __pyx_t_5numpy_int32_t, int); }; static struct __pyx_vtabstruct_6pandas_7_sparse_BlockMerge *__pyx_vtabptr_6pandas_7_sparse_BlockMerge; /* "pandas/src/sparse.pyx":575 * pass * * cdef class BlockUnion(BlockMerge): # <<<<<<<<<<<<<< * ''' * Object-oriented approach makes sharing state between recursive functions a */ struct __pyx_vtabstruct_6pandas_7_sparse_BlockUnion { struct __pyx_vtabstruct_6pandas_7_sparse_BlockMerge __pyx_base; __pyx_t_5numpy_int32_t (*_find_next_block_end)(struct __pyx_obj_6pandas_7_sparse_BlockUnion *, int); }; static struct __pyx_vtabstruct_6pandas_7_sparse_BlockUnion *__pyx_vtabptr_6pandas_7_sparse_BlockUnion; /* "pandas/src/sparse.pyx":33 * * * cdef class IntIndex(SparseIndex): # <<<<<<<<<<<<<< * ''' * Object for holding exact integer sparse indexing information */ struct __pyx_vtabstruct_6pandas_7_sparse_IntIndex { struct __pyx_obj_6pandas_7_sparse_IntIndex *(*intersect)(struct __pyx_obj_6pandas_7_sparse_IntIndex *, struct __pyx_obj_6pandas_7_sparse_SparseIndex *, int __pyx_skip_dispatch); struct __pyx_obj_6pandas_7_sparse_IntIndex *(*make_union)(struct __pyx_obj_6pandas_7_sparse_IntIndex *, struct __pyx_obj_6pandas_7_sparse_SparseIndex *, int __pyx_skip_dispatch); PyObject *(*lookup)(struct __pyx_obj_6pandas_7_sparse_IntIndex *, Py_ssize_t, int __pyx_skip_dispatch); PyArrayObject *(*reindex)(struct __pyx_obj_6pandas_7_sparse_IntIndex *, PyArrayObject *, __pyx_t_5numpy_float64_t, struct __pyx_obj_6pandas_7_sparse_SparseIndex *, int __pyx_skip_dispatch); PyObject *(*put)(struct __pyx_obj_6pandas_7_sparse_IntIndex *, PyArrayObject *, PyArrayObject *, PyObject *, int __pyx_skip_dispatch); PyObject *(*take)(struct __pyx_obj_6pandas_7_sparse_IntIndex *, PyArrayObject *, PyArrayObject *, int __pyx_skip_dispatch); }; static struct __pyx_vtabstruct_6pandas_7_sparse_IntIndex *__pyx_vtabptr_6pandas_7_sparse_IntIndex; /* "pandas/src/sparse.pyx":569 * self.yi = xi * * cdef class BlockIntersection(BlockMerge): # <<<<<<<<<<<<<< * ''' * not done yet */ struct __pyx_vtabstruct_6pandas_7_sparse_BlockIntersection { struct __pyx_vtabstruct_6pandas_7_sparse_BlockMerge __pyx_base; }; static struct __pyx_vtabstruct_6pandas_7_sparse_BlockIntersection *__pyx_vtabptr_6pandas_7_sparse_BlockIntersection; /* "pandas/src/sparse.pyx":259 * # BlockIndex * * cdef class BlockIndex(SparseIndex): # <<<<<<<<<<<<<< * ''' * Object for holding block-based sparse indexing information */ struct __pyx_vtabstruct_6pandas_7_sparse_BlockIndex { PyObject *(*check_integrity)(struct __pyx_obj_6pandas_7_sparse_BlockIndex *, int __pyx_skip_dispatch); struct __pyx_obj_6pandas_7_sparse_BlockIndex *(*intersect)(struct __pyx_obj_6pandas_7_sparse_BlockIndex *, struct __pyx_obj_6pandas_7_sparse_SparseIndex *, int __pyx_skip_dispatch); struct __pyx_obj_6pandas_7_sparse_BlockIndex *(*make_union)(struct __pyx_obj_6pandas_7_sparse_BlockIndex *, struct __pyx_obj_6pandas_7_sparse_SparseIndex *, int __pyx_skip_dispatch); PyObject *(*lookup)(struct __pyx_obj_6pandas_7_sparse_BlockIndex *, Py_ssize_t, int __pyx_skip_dispatch); PyArrayObject *(*reindex)(struct __pyx_obj_6pandas_7_sparse_BlockIndex *, PyArrayObject *, __pyx_t_5numpy_float64_t, struct __pyx_obj_6pandas_7_sparse_SparseIndex *, int __pyx_skip_dispatch); PyObject *(*put)(struct __pyx_obj_6pandas_7_sparse_BlockIndex *, PyArrayObject *, PyArrayObject *, PyObject *, int __pyx_skip_dispatch); PyObject *(*take)(struct __pyx_obj_6pandas_7_sparse_BlockIndex *, PyArrayObject *, PyArrayObject *, int __pyx_skip_dispatch); }; static struct __pyx_vtabstruct_6pandas_7_sparse_BlockIndex *__pyx_vtabptr_6pandas_7_sparse_BlockIndex; #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); /*proto*/ #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 /* CYTHON_REFNANNY */ #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) #if CYTHON_COMPILING_IN_CPYTHON static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name) { PyTypeObject* tp = Py_TYPE(obj); if (likely(tp->tp_getattro)) return tp->tp_getattro(obj, attr_name); #if PY_MAJOR_VERSION < 3 if (likely(tp->tp_getattr)) return tp->tp_getattr(obj, PyString_AS_STRING(attr_name)); #endif return PyObject_GetAttr(obj, attr_name); } #else #define __Pyx_PyObject_GetAttrStr(o,n) PyObject_GetAttr(o,n) #endif static PyObject *__Pyx_GetBuiltinName(PyObject *name); /*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); /*proto*/ static CYTHON_INLINE int __Pyx_CheckKeywordStrings(PyObject *kwdict, const char* function_name, int kw_allowed); /*proto*/ static CYTHON_INLINE void __Pyx_ErrRestore(PyObject *type, PyObject *value, PyObject *tb); /*proto*/ static CYTHON_INLINE void __Pyx_ErrFetch(PyObject **type, PyObject **value, PyObject **tb); /*proto*/ static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause); /*proto*/ static void __Pyx_RaiseDoubleKeywordsError(const char* func_name, PyObject* kw_name); /*proto*/ static int __Pyx_ParseOptionalKeywords(PyObject *kwds, PyObject **argnames[], \ PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args, \ const char* function_name); /*proto*/ static CYTHON_INLINE PyObject *__Pyx_GetModuleGlobalName(PyObject *name); /*proto*/ static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type); /*proto*/ static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected); static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index); static CYTHON_INLINE int __Pyx_IterFinish(void); /*proto*/ static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected); /*proto*/ static CYTHON_INLINE int __Pyx_GetBufferAndValidate(Py_buffer* buf, PyObject* obj, __Pyx_TypeInfo* dtype, int flags, int nd, int cast, __Pyx_BufFmt_StackElem* stack); static CYTHON_INLINE void __Pyx_SafeReleaseBuffer(Py_buffer* info); static void __Pyx_RaiseBufferFallbackError(void); /*proto*/ static void __Pyx_RaiseBufferIndexError(int axis); /*proto*/ #define __Pyx_BufPtrStrided1d(type, buf, i0, s0) (type)((char*)buf + i0 * s0) #if CYTHON_COMPILING_IN_CPYTHON static CYTHON_INLINE int __Pyx_PyList_Append(PyObject* list, PyObject* x) { PyListObject* L = (PyListObject*) list; Py_ssize_t len = Py_SIZE(list); if (likely(L->allocated > len) & likely(len > (L->allocated >> 1))) { Py_INCREF(x); PyList_SET_ITEM(list, len, x); Py_SIZE(list) = len+1; return 0; } return PyList_Append(list, x); } #else #define __Pyx_PyList_Append(L,x) PyList_Append(L,x) #endif static CYTHON_INLINE int __Pyx_ArgTypeTest(PyObject *obj, PyTypeObject *type, int none_allowed, const char *name, int exact); /*proto*/ #ifndef __PYX_FORCE_INIT_THREADS #define __PYX_FORCE_INIT_THREADS 0 #endif static void __Pyx_WriteUnraisable(const char *name, int clineno, int lineno, const char *filename, int full_traceback); /*proto*/ static CYTHON_INLINE int __Pyx_PyDict_Contains(PyObject* item, PyObject* dict, int eq) { int result = PyDict_Contains(dict, item); return unlikely(result < 0) ? result : (result == (eq == Py_EQ)); } #if PY_MAJOR_VERSION >= 3 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; } #else #define __Pyx_PyDict_GetItem(d, key) PyObject_GetItem(d, key) #endif static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void); static int __Pyx_call_next_tp_traverse(PyObject* obj, visitproc v, void *a, traverseproc current_tp_traverse); static void __Pyx_call_next_tp_clear(PyObject* obj, inquiry current_tp_dealloc); static int __Pyx_SetVtable(PyObject *dict, void *vtable); /*proto*/ static PyObject *__Pyx_GetNameInClass(PyObject *nmspace, PyObject *name); /*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 static Py_ssize_t __Pyx_zeros[] = {0, 0, 0, 0, 0, 0, 0, 0}; static Py_ssize_t __Pyx_minusones[] = {-1, -1, -1, -1, -1, -1, -1, -1}; static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level); /*proto*/ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_npy_int32(npy_int32 value); static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value); static CYTHON_INLINE npy_int32 __Pyx_PyInt_As_npy_int32(PyObject *); #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(_WIN32) || defined(__clang__)) && defined(__cplusplus) && CYTHON_CCOMPLEX #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 static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float, float); #if CYTHON_CCOMPLEX #define __Pyx_c_eqf(a, b) ((a)==(b)) #define __Pyx_c_sumf(a, b) ((a)+(b)) #define __Pyx_c_difff(a, b) ((a)-(b)) #define __Pyx_c_prodf(a, b) ((a)*(b)) #define __Pyx_c_quotf(a, b) ((a)/(b)) #define __Pyx_c_negf(a) (-(a)) #ifdef __cplusplus #define __Pyx_c_is_zerof(z) ((z)==(float)0) #define __Pyx_c_conjf(z) (::std::conj(z)) #if 1 #define __Pyx_c_absf(z) (::std::abs(z)) #define __Pyx_c_powf(a, b) (::std::pow(a, b)) #endif #else #define __Pyx_c_is_zerof(z) ((z)==0) #define __Pyx_c_conjf(z) (conjf(z)) #if 1 #define __Pyx_c_absf(z) (cabsf(z)) #define __Pyx_c_powf(a, b) (cpowf(a, b)) #endif #endif #else static CYTHON_INLINE int __Pyx_c_eqf(__pyx_t_float_complex, __pyx_t_float_complex); static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_sumf(__pyx_t_float_complex, __pyx_t_float_complex); static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_difff(__pyx_t_float_complex, __pyx_t_float_complex); static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_prodf(__pyx_t_float_complex, __pyx_t_float_complex); static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_quotf(__pyx_t_float_complex, __pyx_t_float_complex); static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_negf(__pyx_t_float_complex); static CYTHON_INLINE int __Pyx_c_is_zerof(__pyx_t_float_complex); static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_conjf(__pyx_t_float_complex); #if 1 static CYTHON_INLINE float __Pyx_c_absf(__pyx_t_float_complex); static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_powf(__pyx_t_float_complex, __pyx_t_float_complex); #endif #endif static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double, double); #if CYTHON_CCOMPLEX #define __Pyx_c_eq(a, b) ((a)==(b)) #define __Pyx_c_sum(a, b) ((a)+(b)) #define __Pyx_c_diff(a, b) ((a)-(b)) #define __Pyx_c_prod(a, b) ((a)*(b)) #define __Pyx_c_quot(a, b) ((a)/(b)) #define __Pyx_c_neg(a) (-(a)) #ifdef __cplusplus #define __Pyx_c_is_zero(z) ((z)==(double)0) #define __Pyx_c_conj(z) (::std::conj(z)) #if 1 #define __Pyx_c_abs(z) (::std::abs(z)) #define __Pyx_c_pow(a, b) (::std::pow(a, b)) #endif #else #define __Pyx_c_is_zero(z) ((z)==0) #define __Pyx_c_conj(z) (conj(z)) #if 1 #define __Pyx_c_abs(z) (cabs(z)) #define __Pyx_c_pow(a, b) (cpow(a, b)) #endif #endif #else static CYTHON_INLINE int __Pyx_c_eq(__pyx_t_double_complex, __pyx_t_double_complex); static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_sum(__pyx_t_double_complex, __pyx_t_double_complex); static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_diff(__pyx_t_double_complex, __pyx_t_double_complex); static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_prod(__pyx_t_double_complex, __pyx_t_double_complex); static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_quot(__pyx_t_double_complex, __pyx_t_double_complex); static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_neg(__pyx_t_double_complex); static CYTHON_INLINE int __Pyx_c_is_zero(__pyx_t_double_complex); static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_conj(__pyx_t_double_complex); #if 1 static CYTHON_INLINE double __Pyx_c_abs(__pyx_t_double_complex); static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_pow(__pyx_t_double_complex, __pyx_t_double_complex); #endif #endif static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *); static CYTHON_INLINE PyObject* __Pyx_PyInt_From_ptrdiff_t(ptrdiff_t value); static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value); static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *); static int __Pyx_check_binary_version(void); #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 static PyObject *__Pyx_ImportModule(const char *name); /*proto*/ static PyTypeObject *__Pyx_ImportType(const char *module_name, const char *class_name, size_t size, int strict); /*proto*/ typedef struct { int code_line; PyCodeObject* code_object; } __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); static void __Pyx_AddTraceback(const char *funcname, int c_line, int py_line, const char *filename); /*proto*/ static int __Pyx_InitStrings(__Pyx_StringTabEntry *t); /*proto*/ /* Module declarations from 'cpython.buffer' */ /* Module declarations from 'cpython.ref' */ /* Module declarations from 'libc.string' */ /* Module declarations from 'libc.stdio' */ /* Module declarations from 'cpython.object' */ /* Module declarations from 'libc.stdlib' */ /* 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*/ /* Module declarations from 'cython' */ /* Module declarations from 'pandas._sparse' */ static PyTypeObject *__pyx_ptype_6pandas_7_sparse_BlockMerge = 0; static PyTypeObject *__pyx_ptype_6pandas_7_sparse_SparseIndex = 0; static PyTypeObject *__pyx_ptype_6pandas_7_sparse_BlockIndex = 0; static PyTypeObject *__pyx_ptype_6pandas_7_sparse_IntIndex = 0; static PyTypeObject *__pyx_ptype_6pandas_7_sparse_BlockIntersection = 0; static PyTypeObject *__pyx_ptype_6pandas_7_sparse_BlockUnion = 0; static __pyx_t_5numpy_float64_t __pyx_v_6pandas_7_sparse_NaN; static __pyx_t_5numpy_float64_t __pyx_v_6pandas_7_sparse_INF; static PyObject *__pyx_f_6pandas_7_sparse_get_blocks(PyArrayObject *, int __pyx_skip_dispatch); /*proto*/ static CYTHON_INLINE PyObject *__pyx_f_6pandas_7_sparse_sparse_nancombine(PyArrayObject *, struct __pyx_obj_6pandas_7_sparse_SparseIndex *, PyArrayObject *, struct __pyx_obj_6pandas_7_sparse_SparseIndex *, __pyx_t_6pandas_7_sparse_double_func); /*proto*/ static CYTHON_INLINE PyObject *__pyx_f_6pandas_7_sparse_sparse_combine(PyArrayObject *, struct __pyx_obj_6pandas_7_sparse_SparseIndex *, __pyx_t_5numpy_float64_t, PyArrayObject *, struct __pyx_obj_6pandas_7_sparse_SparseIndex *, __pyx_t_5numpy_float64_t, __pyx_t_6pandas_7_sparse_double_func); /*proto*/ static CYTHON_INLINE PyObject *__pyx_f_6pandas_7_sparse_int_nanop(PyArrayObject *, struct __pyx_obj_6pandas_7_sparse_IntIndex *, PyArrayObject *, struct __pyx_obj_6pandas_7_sparse_IntIndex *, __pyx_t_6pandas_7_sparse_double_func); /*proto*/ static CYTHON_INLINE PyObject *__pyx_f_6pandas_7_sparse_block_op(PyArrayObject *, struct __pyx_obj_6pandas_7_sparse_BlockIndex *, __pyx_t_5numpy_float64_t, PyArrayObject *, struct __pyx_obj_6pandas_7_sparse_BlockIndex *, __pyx_t_5numpy_float64_t, __pyx_t_6pandas_7_sparse_double_func); /*proto*/ static CYTHON_INLINE PyObject *__pyx_f_6pandas_7_sparse_int_op(PyArrayObject *, struct __pyx_obj_6pandas_7_sparse_IntIndex *, __pyx_t_5numpy_float64_t, PyArrayObject *, struct __pyx_obj_6pandas_7_sparse_IntIndex *, __pyx_t_5numpy_float64_t, __pyx_t_6pandas_7_sparse_double_func); /*proto*/ static CYTHON_INLINE __pyx_t_5numpy_float64_t __pyx_f_6pandas_7_sparse___add(__pyx_t_5numpy_float64_t, __pyx_t_5numpy_float64_t); /*proto*/ static CYTHON_INLINE __pyx_t_5numpy_float64_t __pyx_f_6pandas_7_sparse___sub(__pyx_t_5numpy_float64_t, __pyx_t_5numpy_float64_t); /*proto*/ static CYTHON_INLINE __pyx_t_5numpy_float64_t __pyx_f_6pandas_7_sparse___rsub(__pyx_t_5numpy_float64_t, __pyx_t_5numpy_float64_t); /*proto*/ static CYTHON_INLINE __pyx_t_5numpy_float64_t __pyx_f_6pandas_7_sparse___div(__pyx_t_5numpy_float64_t, __pyx_t_5numpy_float64_t); /*proto*/ static CYTHON_INLINE __pyx_t_5numpy_float64_t __pyx_f_6pandas_7_sparse___rdiv(__pyx_t_5numpy_float64_t, __pyx_t_5numpy_float64_t); /*proto*/ static CYTHON_INLINE __pyx_t_5numpy_float64_t __pyx_f_6pandas_7_sparse___floordiv(__pyx_t_5numpy_float64_t, __pyx_t_5numpy_float64_t); /*proto*/ static CYTHON_INLINE __pyx_t_5numpy_float64_t __pyx_f_6pandas_7_sparse___rfloordiv(__pyx_t_5numpy_float64_t, __pyx_t_5numpy_float64_t); /*proto*/ static CYTHON_INLINE __pyx_t_5numpy_float64_t __pyx_f_6pandas_7_sparse___mul(__pyx_t_5numpy_float64_t, __pyx_t_5numpy_float64_t); /*proto*/ static CYTHON_INLINE __pyx_t_5numpy_float64_t __pyx_f_6pandas_7_sparse___pow(__pyx_t_5numpy_float64_t, __pyx_t_5numpy_float64_t); /*proto*/ static CYTHON_INLINE __pyx_t_5numpy_float64_t __pyx_f_6pandas_7_sparse___rpow(__pyx_t_5numpy_float64_t, __pyx_t_5numpy_float64_t); /*proto*/ static PyObject *__pyx_f_6pandas_7_sparse_sparse_nanadd(PyArrayObject *, struct __pyx_obj_6pandas_7_sparse_SparseIndex *, PyArrayObject *, struct __pyx_obj_6pandas_7_sparse_SparseIndex *, int __pyx_skip_dispatch); /*proto*/ static PyObject *__pyx_f_6pandas_7_sparse_sparse_nansub(PyArrayObject *, struct __pyx_obj_6pandas_7_sparse_SparseIndex *, PyArrayObject *, struct __pyx_obj_6pandas_7_sparse_SparseIndex *, int __pyx_skip_dispatch); /*proto*/ static PyObject *__pyx_f_6pandas_7_sparse_sparse_nanrsub(PyArrayObject *, struct __pyx_obj_6pandas_7_sparse_SparseIndex *, PyArrayObject *, struct __pyx_obj_6pandas_7_sparse_SparseIndex *, int __pyx_skip_dispatch); /*proto*/ static PyObject *__pyx_f_6pandas_7_sparse_sparse_nanmul(PyArrayObject *, struct __pyx_obj_6pandas_7_sparse_SparseIndex *, PyArrayObject *, struct __pyx_obj_6pandas_7_sparse_SparseIndex *, int __pyx_skip_dispatch); /*proto*/ static PyObject *__pyx_f_6pandas_7_sparse_sparse_nandiv(PyArrayObject *, struct __pyx_obj_6pandas_7_sparse_SparseIndex *, PyArrayObject *, struct __pyx_obj_6pandas_7_sparse_SparseIndex *, int __pyx_skip_dispatch); /*proto*/ static PyObject *__pyx_f_6pandas_7_sparse_sparse_nanrdiv(PyArrayObject *, struct __pyx_obj_6pandas_7_sparse_SparseIndex *, PyArrayObject *, struct __pyx_obj_6pandas_7_sparse_SparseIndex *, int __pyx_skip_dispatch); /*proto*/ static PyObject *__pyx_f_6pandas_7_sparse_sparse_nanfloordiv(PyArrayObject *, struct __pyx_obj_6pandas_7_sparse_SparseIndex *, PyArrayObject *, struct __pyx_obj_6pandas_7_sparse_SparseIndex *, int __pyx_skip_dispatch); /*proto*/ static PyObject *__pyx_f_6pandas_7_sparse_sparse_nanrfloordiv(PyArrayObject *, struct __pyx_obj_6pandas_7_sparse_SparseIndex *, PyArrayObject *, struct __pyx_obj_6pandas_7_sparse_SparseIndex *, int __pyx_skip_dispatch); /*proto*/ static PyObject *__pyx_f_6pandas_7_sparse_sparse_nanpow(PyArrayObject *, struct __pyx_obj_6pandas_7_sparse_SparseIndex *, PyArrayObject *, struct __pyx_obj_6pandas_7_sparse_SparseIndex *, int __pyx_skip_dispatch); /*proto*/ static PyObject *__pyx_f_6pandas_7_sparse_sparse_nanrpow(PyArrayObject *, struct __pyx_obj_6pandas_7_sparse_SparseIndex *, PyArrayObject *, struct __pyx_obj_6pandas_7_sparse_SparseIndex *, int __pyx_skip_dispatch); /*proto*/ static PyObject *__pyx_f_6pandas_7_sparse_sparse_add(PyArrayObject *, struct __pyx_obj_6pandas_7_sparse_SparseIndex *, __pyx_t_5numpy_float64_t, PyArrayObject *, struct __pyx_obj_6pandas_7_sparse_SparseIndex *, __pyx_t_5numpy_float64_t, int __pyx_skip_dispatch); /*proto*/ static PyObject *__pyx_f_6pandas_7_sparse_sparse_sub(PyArrayObject *, struct __pyx_obj_6pandas_7_sparse_SparseIndex *, __pyx_t_5numpy_float64_t, PyArrayObject *, struct __pyx_obj_6pandas_7_sparse_SparseIndex *, __pyx_t_5numpy_float64_t, int __pyx_skip_dispatch); /*proto*/ static PyObject *__pyx_f_6pandas_7_sparse_sparse_rsub(PyArrayObject *, struct __pyx_obj_6pandas_7_sparse_SparseIndex *, __pyx_t_5numpy_float64_t, PyArrayObject *, struct __pyx_obj_6pandas_7_sparse_SparseIndex *, __pyx_t_5numpy_float64_t, int __pyx_skip_dispatch); /*proto*/ static PyObject *__pyx_f_6pandas_7_sparse_sparse_mul(PyArrayObject *, struct __pyx_obj_6pandas_7_sparse_SparseIndex *, __pyx_t_5numpy_float64_t, PyArrayObject *, struct __pyx_obj_6pandas_7_sparse_SparseIndex *, __pyx_t_5numpy_float64_t, int __pyx_skip_dispatch); /*proto*/ static PyObject *__pyx_f_6pandas_7_sparse_sparse_div(PyArrayObject *, struct __pyx_obj_6pandas_7_sparse_SparseIndex *, __pyx_t_5numpy_float64_t, PyArrayObject *, struct __pyx_obj_6pandas_7_sparse_SparseIndex *, __pyx_t_5numpy_float64_t, int __pyx_skip_dispatch); /*proto*/ static PyObject *__pyx_f_6pandas_7_sparse_sparse_rdiv(PyArrayObject *, struct __pyx_obj_6pandas_7_sparse_SparseIndex *, __pyx_t_5numpy_float64_t, PyArrayObject *, struct __pyx_obj_6pandas_7_sparse_SparseIndex *, __pyx_t_5numpy_float64_t, int __pyx_skip_dispatch); /*proto*/ static PyObject *__pyx_f_6pandas_7_sparse_sparse_floordiv(PyArrayObject *, struct __pyx_obj_6pandas_7_sparse_SparseIndex *, __pyx_t_5numpy_float64_t, PyArrayObject *, struct __pyx_obj_6pandas_7_sparse_SparseIndex *, __pyx_t_5numpy_float64_t, int __pyx_skip_dispatch); /*proto*/ static PyObject *__pyx_f_6pandas_7_sparse_sparse_rfloordiv(PyArrayObject *, struct __pyx_obj_6pandas_7_sparse_SparseIndex *, __pyx_t_5numpy_float64_t, PyArrayObject *, struct __pyx_obj_6pandas_7_sparse_SparseIndex *, __pyx_t_5numpy_float64_t, int __pyx_skip_dispatch); /*proto*/ static PyObject *__pyx_f_6pandas_7_sparse_sparse_pow(PyArrayObject *, struct __pyx_obj_6pandas_7_sparse_SparseIndex *, __pyx_t_5numpy_float64_t, PyArrayObject *, struct __pyx_obj_6pandas_7_sparse_SparseIndex *, __pyx_t_5numpy_float64_t, int __pyx_skip_dispatch); /*proto*/ static PyObject *__pyx_f_6pandas_7_sparse_sparse_rpow(PyArrayObject *, struct __pyx_obj_6pandas_7_sparse_SparseIndex *, __pyx_t_5numpy_float64_t, PyArrayObject *, struct __pyx_obj_6pandas_7_sparse_SparseIndex *, __pyx_t_5numpy_float64_t, int __pyx_skip_dispatch); /*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_float64_t = { "float64_t", NULL, sizeof(__pyx_t_5numpy_float64_t), { 0 }, 0, 'R', 0, 0 }; static __Pyx_TypeInfo __Pyx_TypeInfo_object = { "Python object", NULL, sizeof(PyObject *), { 0 }, 0, 'O', 0, 0 }; #define __Pyx_MODULE_NAME "pandas._sparse" int __pyx_module_is_main_pandas___sparse = 0; /* Implementation of 'pandas._sparse' */ static PyObject *__pyx_builtin_property; static PyObject *__pyx_builtin_NotImplementedError; static PyObject *__pyx_builtin_Exception; static PyObject *__pyx_builtin_ValueError; static PyObject *__pyx_builtin_range; static PyObject *__pyx_builtin_RuntimeError; static int __pyx_pf_6pandas_7_sparse_11SparseIndex___init__(CYTHON_UNUSED struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_self); /* proto */ static int __pyx_pf_6pandas_7_sparse_8IntIndex___init__(struct __pyx_obj_6pandas_7_sparse_IntIndex *__pyx_v_self, Py_ssize_t __pyx_v_length, PyObject *__pyx_v_indices); /* proto */ static PyObject *__pyx_pf_6pandas_7_sparse_8IntIndex_2__reduce__(struct __pyx_obj_6pandas_7_sparse_IntIndex *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_7_sparse_8IntIndex_4__repr__(struct __pyx_obj_6pandas_7_sparse_IntIndex *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_7_sparse_8IntIndex_6check_integrity(CYTHON_UNUSED struct __pyx_obj_6pandas_7_sparse_IntIndex *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_7_sparse_8IntIndex_8equals(struct __pyx_obj_6pandas_7_sparse_IntIndex *__pyx_v_self, PyObject *__pyx_v_other); /* proto */ static PyObject *__pyx_pf_6pandas_7_sparse_8IntIndex_10ngaps(struct __pyx_obj_6pandas_7_sparse_IntIndex *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_7_sparse_8IntIndex_12to_int_index(struct __pyx_obj_6pandas_7_sparse_IntIndex *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_7_sparse_8IntIndex_14to_block_index(struct __pyx_obj_6pandas_7_sparse_IntIndex *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_7_sparse_8IntIndex_16intersect(struct __pyx_obj_6pandas_7_sparse_IntIndex *__pyx_v_self, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_y_); /* proto */ static PyObject *__pyx_pf_6pandas_7_sparse_8IntIndex_18make_union(struct __pyx_obj_6pandas_7_sparse_IntIndex *__pyx_v_self, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_y_); /* proto */ static PyObject *__pyx_pf_6pandas_7_sparse_8IntIndex_20lookup(struct __pyx_obj_6pandas_7_sparse_IntIndex *__pyx_v_self, Py_ssize_t __pyx_v_index); /* proto */ static PyObject *__pyx_pf_6pandas_7_sparse_8IntIndex_22reindex(struct __pyx_obj_6pandas_7_sparse_IntIndex *__pyx_v_self, PyArrayObject *__pyx_v_values, __pyx_t_5numpy_float64_t __pyx_v_fill_value, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_other_); /* proto */ static PyObject *__pyx_pf_6pandas_7_sparse_8IntIndex_24put(struct __pyx_obj_6pandas_7_sparse_IntIndex *__pyx_v_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_indices, PyObject *__pyx_v_to_put); /* proto */ static PyObject *__pyx_pf_6pandas_7_sparse_8IntIndex_26take(struct __pyx_obj_6pandas_7_sparse_IntIndex *__pyx_v_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_indices); /* proto */ static PyObject *__pyx_pf_6pandas_7_sparse_8IntIndex_6length___get__(struct __pyx_obj_6pandas_7_sparse_IntIndex *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_7_sparse_8IntIndex_7npoints___get__(struct __pyx_obj_6pandas_7_sparse_IntIndex *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_7_sparse_8IntIndex_7indices___get__(struct __pyx_obj_6pandas_7_sparse_IntIndex *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_7_sparse_get_blocks(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_indices); /* proto */ static int __pyx_pf_6pandas_7_sparse_10BlockIndex___init__(struct __pyx_obj_6pandas_7_sparse_BlockIndex *__pyx_v_self, PyObject *__pyx_v_length, PyObject *__pyx_v_blocs, PyObject *__pyx_v_blengths); /* proto */ static PyObject *__pyx_pf_6pandas_7_sparse_10BlockIndex_2__reduce__(struct __pyx_obj_6pandas_7_sparse_BlockIndex *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_7_sparse_10BlockIndex_4__repr__(struct __pyx_obj_6pandas_7_sparse_BlockIndex *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_7_sparse_10BlockIndex_6ngaps(struct __pyx_obj_6pandas_7_sparse_BlockIndex *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_7_sparse_10BlockIndex_8check_integrity(struct __pyx_obj_6pandas_7_sparse_BlockIndex *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_7_sparse_10BlockIndex_10equals(struct __pyx_obj_6pandas_7_sparse_BlockIndex *__pyx_v_self, PyObject *__pyx_v_other); /* proto */ static PyObject *__pyx_pf_6pandas_7_sparse_10BlockIndex_12to_block_index(struct __pyx_obj_6pandas_7_sparse_BlockIndex *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_7_sparse_10BlockIndex_14to_int_index(struct __pyx_obj_6pandas_7_sparse_BlockIndex *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_7_sparse_10BlockIndex_16intersect(struct __pyx_obj_6pandas_7_sparse_BlockIndex *__pyx_v_self, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_other); /* proto */ static PyObject *__pyx_pf_6pandas_7_sparse_10BlockIndex_18make_union(struct __pyx_obj_6pandas_7_sparse_BlockIndex *__pyx_v_self, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_y); /* proto */ static PyObject *__pyx_pf_6pandas_7_sparse_10BlockIndex_20lookup(struct __pyx_obj_6pandas_7_sparse_BlockIndex *__pyx_v_self, Py_ssize_t __pyx_v_index); /* proto */ static PyObject *__pyx_pf_6pandas_7_sparse_10BlockIndex_22reindex(struct __pyx_obj_6pandas_7_sparse_BlockIndex *__pyx_v_self, PyArrayObject *__pyx_v_values, __pyx_t_5numpy_float64_t __pyx_v_fill_value, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_other_); /* proto */ static PyObject *__pyx_pf_6pandas_7_sparse_10BlockIndex_24put(struct __pyx_obj_6pandas_7_sparse_BlockIndex *__pyx_v_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_indices, PyObject *__pyx_v_to_put); /* proto */ static PyObject *__pyx_pf_6pandas_7_sparse_10BlockIndex_26take(struct __pyx_obj_6pandas_7_sparse_BlockIndex *__pyx_v_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_indices); /* proto */ static PyObject *__pyx_pf_6pandas_7_sparse_10BlockIndex_7nblocks___get__(struct __pyx_obj_6pandas_7_sparse_BlockIndex *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_7_sparse_10BlockIndex_7npoints___get__(struct __pyx_obj_6pandas_7_sparse_BlockIndex *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_7_sparse_10BlockIndex_6length___get__(struct __pyx_obj_6pandas_7_sparse_BlockIndex *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_7_sparse_10BlockIndex_5blocs___get__(struct __pyx_obj_6pandas_7_sparse_BlockIndex *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_7_sparse_10BlockIndex_8blengths___get__(struct __pyx_obj_6pandas_7_sparse_BlockIndex *__pyx_v_self); /* proto */ static int __pyx_pf_6pandas_7_sparse_10BlockMerge___init__(struct __pyx_obj_6pandas_7_sparse_BlockMerge *__pyx_v_self, struct __pyx_obj_6pandas_7_sparse_BlockIndex *__pyx_v_x, struct __pyx_obj_6pandas_7_sparse_BlockIndex *__pyx_v_y); /* proto */ static PyObject *__pyx_pf_6pandas_7_sparse_2sparse_nanadd(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_x, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_xindex, PyArrayObject *__pyx_v_y, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_yindex); /* proto */ static PyObject *__pyx_pf_6pandas_7_sparse_4sparse_nansub(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_x, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_xindex, PyArrayObject *__pyx_v_y, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_yindex); /* proto */ static PyObject *__pyx_pf_6pandas_7_sparse_6sparse_nanrsub(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_x, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_xindex, PyArrayObject *__pyx_v_y, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_yindex); /* proto */ static PyObject *__pyx_pf_6pandas_7_sparse_8sparse_nanmul(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_x, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_xindex, PyArrayObject *__pyx_v_y, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_yindex); /* proto */ static PyObject *__pyx_pf_6pandas_7_sparse_10sparse_nandiv(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_x, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_xindex, PyArrayObject *__pyx_v_y, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_yindex); /* proto */ static PyObject *__pyx_pf_6pandas_7_sparse_12sparse_nanrdiv(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_x, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_xindex, PyArrayObject *__pyx_v_y, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_yindex); /* proto */ static PyObject *__pyx_pf_6pandas_7_sparse_14sparse_nanfloordiv(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_x, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_xindex, PyArrayObject *__pyx_v_y, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_yindex); /* proto */ static PyObject *__pyx_pf_6pandas_7_sparse_16sparse_nanrfloordiv(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_x, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_xindex, PyArrayObject *__pyx_v_y, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_yindex); /* proto */ static PyObject *__pyx_pf_6pandas_7_sparse_18sparse_nanpow(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_x, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_xindex, PyArrayObject *__pyx_v_y, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_yindex); /* proto */ static PyObject *__pyx_pf_6pandas_7_sparse_20sparse_nanrpow(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_x, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_xindex, PyArrayObject *__pyx_v_y, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_yindex); /* proto */ static PyObject *__pyx_pf_6pandas_7_sparse_22sparse_add(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_x, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_xindex, __pyx_t_5numpy_float64_t __pyx_v_xfill, PyArrayObject *__pyx_v_y, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_yindex, __pyx_t_5numpy_float64_t __pyx_v_yfill); /* proto */ static PyObject *__pyx_pf_6pandas_7_sparse_24sparse_sub(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_x, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_xindex, __pyx_t_5numpy_float64_t __pyx_v_xfill, PyArrayObject *__pyx_v_y, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_yindex, __pyx_t_5numpy_float64_t __pyx_v_yfill); /* proto */ static PyObject *__pyx_pf_6pandas_7_sparse_26sparse_rsub(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_x, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_xindex, __pyx_t_5numpy_float64_t __pyx_v_xfill, PyArrayObject *__pyx_v_y, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_yindex, __pyx_t_5numpy_float64_t __pyx_v_yfill); /* proto */ static PyObject *__pyx_pf_6pandas_7_sparse_28sparse_mul(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_x, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_xindex, __pyx_t_5numpy_float64_t __pyx_v_xfill, PyArrayObject *__pyx_v_y, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_yindex, __pyx_t_5numpy_float64_t __pyx_v_yfill); /* proto */ static PyObject *__pyx_pf_6pandas_7_sparse_30sparse_div(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_x, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_xindex, __pyx_t_5numpy_float64_t __pyx_v_xfill, PyArrayObject *__pyx_v_y, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_yindex, __pyx_t_5numpy_float64_t __pyx_v_yfill); /* proto */ static PyObject *__pyx_pf_6pandas_7_sparse_32sparse_rdiv(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_x, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_xindex, __pyx_t_5numpy_float64_t __pyx_v_xfill, PyArrayObject *__pyx_v_y, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_yindex, __pyx_t_5numpy_float64_t __pyx_v_yfill); /* proto */ static PyObject *__pyx_pf_6pandas_7_sparse_34sparse_floordiv(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_x, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_xindex, __pyx_t_5numpy_float64_t __pyx_v_xfill, PyArrayObject *__pyx_v_y, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_yindex, __pyx_t_5numpy_float64_t __pyx_v_yfill); /* proto */ static PyObject *__pyx_pf_6pandas_7_sparse_36sparse_rfloordiv(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_x, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_xindex, __pyx_t_5numpy_float64_t __pyx_v_xfill, PyArrayObject *__pyx_v_y, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_yindex, __pyx_t_5numpy_float64_t __pyx_v_yfill); /* proto */ static PyObject *__pyx_pf_6pandas_7_sparse_38sparse_pow(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_x, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_xindex, __pyx_t_5numpy_float64_t __pyx_v_xfill, PyArrayObject *__pyx_v_y, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_yindex, __pyx_t_5numpy_float64_t __pyx_v_yfill); /* proto */ static PyObject *__pyx_pf_6pandas_7_sparse_40sparse_rpow(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_x, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_xindex, __pyx_t_5numpy_float64_t __pyx_v_xfill, PyArrayObject *__pyx_v_y, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_yindex, __pyx_t_5numpy_float64_t __pyx_v_yfill); /* proto */ static PyObject *__pyx_pf_6pandas_7_sparse_42get_reindexer(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyObject *__pyx_v_index_map); /* proto */ static PyObject *__pyx_pf_6pandas_7_sparse_44reindex_integer(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyArrayObject *__pyx_v_values, CYTHON_UNUSED struct __pyx_obj_6pandas_7_sparse_IntIndex *__pyx_v_sparse_index, CYTHON_UNUSED PyArrayObject *__pyx_v_indexer); /* 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_7_sparse_BlockMerge(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_6pandas_7_sparse_SparseIndex(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_6pandas_7_sparse_BlockIndex(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_6pandas_7_sparse_IntIndex(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_6pandas_7_sparse_BlockIntersection(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_6pandas_7_sparse_BlockUnion(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static char __pyx_k_B[] = "B"; static char __pyx_k_H[] = "H"; static char __pyx_k_I[] = "I"; static char __pyx_k_L[] = "L"; static char __pyx_k_O[] = "O"; static char __pyx_k_Q[] = "Q"; static char __pyx_k_b[] = "b"; static char __pyx_k_d[] = "d"; static char __pyx_k_f[] = "f"; static char __pyx_k_g[] = "g"; static char __pyx_k_h[] = "h"; static char __pyx_k_i[] = "i"; static char __pyx_k_l[] = "l"; static char __pyx_k_q[] = "q"; static char __pyx_k_x[] = "x"; static char __pyx_k_y[] = "y"; static char __pyx_k_Zd[] = "Zd"; static char __pyx_k_Zf[] = "Zf"; static char __pyx_k_Zg[] = "Zg"; static char __pyx_k_np[] = "np"; static char __pyx_k_NaN[] = "NaN"; static char __pyx_k_idx[] = "idx"; static char __pyx_k_inf[] = "inf"; static char __pyx_k_put[] = "put"; static char __pyx_k_sum[] = "sum"; static char __pyx_k_sys[] = "sys"; static char __pyx_k_fill[] = "fill"; static char __pyx_k_main[] = "__main__"; static char __pyx_k_take[] = "take"; static char __pyx_k_test[] = "__test__"; static char __pyx_k_blocs[] = "blocs"; static char __pyx_k_dtype[] = "dtype"; static char __pyx_k_empty[] = "empty"; static char __pyx_k_int32[] = "int32"; static char __pyx_k_ngaps[] = "ngaps"; static char __pyx_k_numpy[] = "numpy"; static char __pyx_k_other[] = "other_"; static char __pyx_k_range[] = "range"; static char __pyx_k_xfill[] = "xfill"; static char __pyx_k_yfill[] = "yfill"; static char __pyx_k_import[] = "__import__"; static char __pyx_k_length[] = "length"; static char __pyx_k_lookup[] = "lookup"; static char __pyx_k_to_put[] = "to_put"; static char __pyx_k_values[] = "values"; static char __pyx_k_xindex[] = "xindex"; static char __pyx_k_yindex[] = "yindex"; static char __pyx_k_float64[] = "float64"; static char __pyx_k_indexer[] = "indexer"; static char __pyx_k_indices[] = "indices"; static char __pyx_k_reindex[] = "reindex"; static char __pyx_k_IntIndex[] = "IntIndex\n"; static char __pyx_k_blengths[] = "blengths"; static char __pyx_k_operator[] = "operator"; static char __pyx_k_property[] = "property"; static char __pyx_k_Exception[] = "Exception"; static char __pyx_k_Indices_s[] = "Indices: %s\n"; static char __pyx_k_index_map[] = "index_map"; static char __pyx_k_intersect[] = "intersect"; static char __pyx_k_BlockIndex[] = "BlockIndex\n"; static char __pyx_k_ValueError[] = "ValueError"; static char __pyx_k_fill_value[] = "fill_value"; static char __pyx_k_make_union[] = "make_union"; static char __pyx_k_new_length[] = "new_length"; static char __pyx_k_pyx_vtable[] = "__pyx_vtable__"; static char __pyx_k_sparse_div[] = "sparse_div"; static char __pyx_k_array_equal[] = "array_equal"; static char __pyx_k_sparse_rdiv[] = "sparse_rdiv"; static char __pyx_k_RuntimeError[] = "RuntimeError"; static char __pyx_k_searchsorted[] = "searchsorted"; static char __pyx_k_sparse_index[] = "sparse_index"; static char __pyx_k_to_int_index[] = "to_int_index"; static char __pyx_k_get_reindexer[] = "get_reindexer"; static char __pyx_k_pyx_getbuffer[] = "__pyx_getbuffer"; static char __pyx_k_sparse_nandiv[] = "sparse_nandiv"; static char __pyx_k_pandas__sparse[] = "pandas._sparse"; static char __pyx_k_sparse_nanrdiv[] = "sparse_nanrdiv"; static char __pyx_k_sparse_truediv[] = "sparse_truediv"; static char __pyx_k_to_block_index[] = "to_block_index"; static char __pyx_k_Block_lengths_s[] = "Block lengths: %s"; static char __pyx_k_check_integrity[] = "check_integrity"; static char __pyx_k_reindex_integer[] = "reindex_integer"; static char __pyx_k_sparse_rtruediv[] = "sparse_rtruediv"; static char __pyx_k_Block_d_overlaps[] = "Block %d overlaps"; static char __pyx_k_Block_locations_s[] = "Block locations: %s\n"; static char __pyx_k_ascontiguousarray[] = "ascontiguousarray"; static char __pyx_k_pyx_releasebuffer[] = "__pyx_releasebuffer"; static char __pyx_k_sparse_nantruediv[] = "sparse_nantruediv"; static char __pyx_k_sparse_nanrtruediv[] = "sparse_nanrtruediv"; static char __pyx_k_Mode_must_be_0_or_1[] = "Mode must be 0 or 1"; static char __pyx_k_NotImplementedError[] = "NotImplementedError"; static char __pyx_k_Zero_length_block_d[] = "Zero-length block %d"; static char __pyx_k_Block_d_extends_beyond_end[] = "Block %d extends beyond end"; static char __pyx_k_ndarray_is_not_C_contiguous[] = "ndarray is not C contiguous"; static char __pyx_k_block_bound_arrays_must_be_same[] = "block bound arrays must be same length"; static char __pyx_k_home_yoh_deb_gits_pkg_exppsy_pa[] = "/home/yoh/deb/gits/pkg-exppsy/pandas/pandas/src/sparse.pyx"; static char __pyx_k_unknown_dtype_code_in_numpy_pxd[] = "unknown dtype code in numpy.pxd (%d)"; static char __pyx_k_Format_string_allocated_too_shor[] = "Format string allocated too short, see comment in numpy.pxd"; static char __pyx_k_Indices_must_reference_same_unde[] = "Indices must reference same underlying length"; static char __pyx_k_Locations_not_in_ascending_order[] = "Locations not in ascending order"; static char __pyx_k_Non_native_byte_order_not_suppor[] = "Non-native byte order not supported"; static char __pyx_k_ndarray_is_not_Fortran_contiguou[] = "ndarray is not Fortran contiguous"; static char __pyx_k_Format_string_allocated_too_shor_2[] = "Format string allocated too short."; 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_n_s_Exception; static PyObject *__pyx_kp_u_Format_string_allocated_too_shor; static PyObject *__pyx_kp_u_Format_string_allocated_too_shor_2; 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_kp_s_Mode_must_be_0_or_1; static PyObject *__pyx_n_s_NaN; static PyObject *__pyx_kp_u_Non_native_byte_order_not_suppor; static PyObject *__pyx_n_s_NotImplementedError; static PyObject *__pyx_n_s_RuntimeError; static PyObject *__pyx_n_s_ValueError; static PyObject *__pyx_kp_s_Zero_length_block_d; static PyObject *__pyx_n_s_array_equal; static PyObject *__pyx_n_s_ascontiguousarray; 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_check_integrity; static PyObject *__pyx_n_s_dtype; static PyObject *__pyx_n_s_empty; static PyObject *__pyx_n_s_fill; static PyObject *__pyx_n_s_fill_value; static PyObject *__pyx_n_s_float64; static PyObject *__pyx_n_s_get_reindexer; static PyObject *__pyx_kp_s_home_yoh_deb_gits_pkg_exppsy_pa; 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_intersect; static PyObject *__pyx_n_s_length; static PyObject *__pyx_n_s_lookup; static PyObject *__pyx_n_s_main; static PyObject *__pyx_n_s_make_union; 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_length; static PyObject *__pyx_n_s_ngaps; static PyObject *__pyx_n_s_np; static PyObject *__pyx_n_s_numpy; static PyObject *__pyx_n_s_operator; static PyObject *__pyx_n_s_other; static PyObject *__pyx_n_s_pandas__sparse; static PyObject *__pyx_n_s_property; static PyObject *__pyx_n_s_put; static PyObject *__pyx_n_s_pyx_getbuffer; static PyObject *__pyx_n_s_pyx_releasebuffer; static PyObject *__pyx_n_s_pyx_vtable; static PyObject *__pyx_n_s_range; static PyObject *__pyx_n_s_reindex; static PyObject *__pyx_n_s_reindex_integer; static PyObject *__pyx_n_s_searchsorted; static PyObject *__pyx_n_s_sparse_div; static PyObject *__pyx_n_s_sparse_index; static PyObject *__pyx_n_s_sparse_nandiv; static PyObject *__pyx_n_s_sparse_nanrdiv; static PyObject *__pyx_n_s_sparse_nanrtruediv; static PyObject *__pyx_n_s_sparse_nantruediv; static PyObject *__pyx_n_s_sparse_rdiv; static PyObject *__pyx_n_s_sparse_rtruediv; static PyObject *__pyx_n_s_sparse_truediv; 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_kp_u_unknown_dtype_code_in_numpy_pxd; static PyObject *__pyx_n_s_values; 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 PyObject *__pyx_int_15; 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__16; static PyObject *__pyx_codeobj__15; static PyObject *__pyx_codeobj__17; /* "pandas/src/sparse.pyx":19 * 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_7_sparse_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/src/sparse.pyx":20 * * 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_7_sparse_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/src/sparse.pyx":29 * Abstract superclass for sparse index types * ''' * def __init__(self): # <<<<<<<<<<<<<< * raise NotImplementedError * */ /* Python wrapper */ static int __pyx_pw_6pandas_7_sparse_11SparseIndex_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_pw_6pandas_7_sparse_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_7_sparse_11SparseIndex___init__(((struct __pyx_obj_6pandas_7_sparse_SparseIndex *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pandas_7_sparse_11SparseIndex___init__(CYTHON_UNUSED struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__init__", 0); /* "pandas/src/sparse.pyx":30 * ''' * def __init__(self): * raise NotImplementedError # <<<<<<<<<<<<<< * * */ __Pyx_Raise(__pyx_builtin_NotImplementedError, 0, 0, 0); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 30; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/sparse.pyx":29 * Abstract superclass for sparse index types * ''' * def __init__(self): # <<<<<<<<<<<<<< * raise NotImplementedError * */ /* function exit code */ __pyx_L1_error:; __Pyx_AddTraceback("pandas._sparse.SparseIndex.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/sparse.pyx":47 * 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_7_sparse_8IntIndex_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_pw_6pandas_7_sparse_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_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 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); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_length)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_indices)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 47; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 47; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 47; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 47; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas._sparse.IntIndex.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return -1; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pandas_7_sparse_8IntIndex___init__(((struct __pyx_obj_6pandas_7_sparse_IntIndex *)__pyx_v_self), __pyx_v_length, __pyx_v_indices); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pandas_7_sparse_8IntIndex___init__(struct __pyx_obj_6pandas_7_sparse_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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__init__", 0); /* "pandas/src/sparse.pyx":48 * * 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/src/sparse.pyx":49 * 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_filename = __pyx_f[0]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_indices); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_indices); __Pyx_GIVEREF(__pyx_v_indices); __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyObject_Call(__pyx_t_2, __pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __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/src/sparse.pyx":50 * self.length = length * self.indices = np.ascontiguousarray(indices, dtype=np.int32) * self.npoints = len(self.indices) # <<<<<<<<<<<<<< * * def __reduce__(self): */ __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 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 50; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_v_self->npoints = __pyx_t_6; /* "pandas/src/sparse.pyx":47 * 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._sparse.IntIndex.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/sparse.pyx":52 * self.npoints = len(self.indices) * * def __reduce__(self): # <<<<<<<<<<<<<< * args = (self.length, self.indices) * return (IntIndex, args) */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_7_sparse_8IntIndex_3__reduce__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static PyObject *__pyx_pw_6pandas_7_sparse_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_7_sparse_8IntIndex_2__reduce__(((struct __pyx_obj_6pandas_7_sparse_IntIndex *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_7_sparse_8IntIndex_2__reduce__(struct __pyx_obj_6pandas_7_sparse_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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__reduce__", 0); /* "pandas/src/sparse.pyx":53 * * 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_filename = __pyx_f[0]; __pyx_lineno = 53; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 53; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)__pyx_v_self->indices)); PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)__pyx_v_self->indices)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self->indices)); __pyx_t_1 = 0; __pyx_v_args = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/sparse.pyx":54 * 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_filename = __pyx_f[0]; __pyx_lineno = 54; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(((PyObject *)((PyObject*)__pyx_ptype_6pandas_7_sparse_IntIndex))); PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)((PyObject*)__pyx_ptype_6pandas_7_sparse_IntIndex))); __Pyx_GIVEREF(((PyObject *)((PyObject*)__pyx_ptype_6pandas_7_sparse_IntIndex))); __Pyx_INCREF(__pyx_v_args); PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_args); __Pyx_GIVEREF(__pyx_v_args); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "pandas/src/sparse.pyx":52 * self.npoints = len(self.indices) * * 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._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/src/sparse.pyx":56 * return (IntIndex, args) * * def __repr__(self): # <<<<<<<<<<<<<< * output = 'IntIndex\n' * output += 'Indices: %s\n' % repr(self.indices) */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_7_sparse_8IntIndex_5__repr__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6pandas_7_sparse_8IntIndex_5__repr__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_7_sparse_8IntIndex_4__repr__(((struct __pyx_obj_6pandas_7_sparse_IntIndex *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_7_sparse_8IntIndex_4__repr__(struct __pyx_obj_6pandas_7_sparse_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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__repr__", 0); /* "pandas/src/sparse.pyx":57 * * 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/src/sparse.pyx":58 * 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_filename = __pyx_f[0]; __pyx_lineno = 58; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 58; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 58; __pyx_clineno = __LINE__; goto __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/src/sparse.pyx":59 * 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/src/sparse.pyx":56 * 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._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/src/sparse.pyx":61 * return output * * def check_integrity(self): # <<<<<<<<<<<<<< * ''' * Only need be strictly ascending and nothing less than 0 or greater than */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_7_sparse_8IntIndex_7check_integrity(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_6pandas_7_sparse_8IntIndex_6check_integrity[] = "\n Only need be strictly ascending and nothing less than 0 or greater than\n totall ength\n "; static PyObject *__pyx_pw_6pandas_7_sparse_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_7_sparse_8IntIndex_6check_integrity(((struct __pyx_obj_6pandas_7_sparse_IntIndex *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_7_sparse_8IntIndex_6check_integrity(CYTHON_UNUSED struct __pyx_obj_6pandas_7_sparse_IntIndex *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("check_integrity", 0); /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/sparse.pyx":68 * pass * * def equals(self, other): # <<<<<<<<<<<<<< * if not isinstance(other, IntIndex): * return False */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_7_sparse_8IntIndex_9equals(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/ static PyObject *__pyx_pw_6pandas_7_sparse_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_7_sparse_8IntIndex_8equals(((struct __pyx_obj_6pandas_7_sparse_IntIndex *)__pyx_v_self), ((PyObject *)__pyx_v_other)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_7_sparse_8IntIndex_8equals(struct __pyx_obj_6pandas_7_sparse_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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("equals", 0); /* "pandas/src/sparse.pyx":69 * * def equals(self, other): * if not isinstance(other, IntIndex): # <<<<<<<<<<<<<< * return False * */ __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_other, ((PyObject*)__pyx_ptype_6pandas_7_sparse_IntIndex)); __pyx_t_2 = ((!(__pyx_t_1 != 0)) != 0); if (__pyx_t_2) { /* "pandas/src/sparse.pyx":70 * 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/src/sparse.pyx":72 * 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/src/sparse.pyx":73 * * 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/src/sparse.pyx":75 * 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_filename = __pyx_f[0]; __pyx_lineno = 75; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 75; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 75; __pyx_clineno = __LINE__; goto __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/src/sparse.pyx":76 * * same_length = self.length == other.length * same_indices = np.array_equal(self.indices, other.indices) # <<<<<<<<<<<<<< * return same_length and same_indices * */ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 76; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_array_equal); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 76; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_other, __pyx_n_s_indices); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 76; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 76; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(((PyObject *)__pyx_v_self->indices)); PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_v_self->indices)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self->indices)); PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyObject_Call(__pyx_t_4, __pyx_t_3, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 76; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_same_indices = __pyx_t_5; __pyx_t_5 = 0; /* "pandas/src/sparse.pyx":77 * 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_filename = __pyx_f[0]; __pyx_lineno = 77; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__pyx_t_1) { __Pyx_INCREF(__pyx_v_same_indices); __pyx_t_5 = __pyx_v_same_indices; } else { __Pyx_INCREF(__pyx_v_same_length); __pyx_t_5 = __pyx_v_same_length; } __pyx_r = __pyx_t_5; __pyx_t_5 = 0; goto __pyx_L0; /* "pandas/src/sparse.pyx":68 * pass * * 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_AddTraceback("pandas._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/src/sparse.pyx":80 * * @property * def ngaps(self): # <<<<<<<<<<<<<< * return self.length - self.npoints * */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_7_sparse_8IntIndex_11ngaps(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static PyObject *__pyx_pw_6pandas_7_sparse_8IntIndex_11ngaps(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("ngaps (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_7_sparse_8IntIndex_10ngaps(((struct __pyx_obj_6pandas_7_sparse_IntIndex *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_7_sparse_8IntIndex_10ngaps(struct __pyx_obj_6pandas_7_sparse_IntIndex *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("ngaps", 0); /* "pandas/src/sparse.pyx":81 * @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_filename = __pyx_f[0]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "pandas/src/sparse.pyx":80 * * @property * def ngaps(self): # <<<<<<<<<<<<<< * return self.length - self.npoints * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas._sparse.IntIndex.ngaps", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/sparse.pyx":83 * return self.length - self.npoints * * def to_int_index(self): # <<<<<<<<<<<<<< * return self * */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_7_sparse_8IntIndex_13to_int_index(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static PyObject *__pyx_pw_6pandas_7_sparse_8IntIndex_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_7_sparse_8IntIndex_12to_int_index(((struct __pyx_obj_6pandas_7_sparse_IntIndex *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_7_sparse_8IntIndex_12to_int_index(struct __pyx_obj_6pandas_7_sparse_IntIndex *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("to_int_index", 0); /* "pandas/src/sparse.pyx":84 * * 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/src/sparse.pyx":83 * 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/src/sparse.pyx":86 * 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_7_sparse_8IntIndex_15to_block_index(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static PyObject *__pyx_pw_6pandas_7_sparse_8IntIndex_15to_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_7_sparse_8IntIndex_14to_block_index(((struct __pyx_obj_6pandas_7_sparse_IntIndex *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_7_sparse_8IntIndex_14to_block_index(struct __pyx_obj_6pandas_7_sparse_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 *); int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("to_block_index", 0); /* "pandas/src/sparse.pyx":87 * * 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_7_sparse_get_blocks(((PyArrayObject *)__pyx_t_1), 0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 87; __pyx_clineno = __LINE__; goto __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; #if CYTHON_COMPILING_IN_CPYTHON Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 87; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON 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_filename = __pyx_f[0]; __pyx_lineno = 87; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 87; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 87; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 87; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 87; __pyx_clineno = __LINE__; goto __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/src/sparse.pyx":88 * 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_filename = __pyx_f[0]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_locs); PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_locs); __Pyx_GIVEREF(__pyx_v_locs); __Pyx_INCREF(__pyx_v_lens); PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_lens); __Pyx_GIVEREF(__pyx_v_lens); __pyx_t_2 = 0; __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_6pandas_7_sparse_BlockIndex)), __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __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/src/sparse.pyx":86 * 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._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/src/sparse.pyx":90 * return BlockIndex(self.length, locs, lens) * * cpdef IntIndex intersect(self, SparseIndex y_): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t out_length, xi, yi = 0 */ static PyObject *__pyx_pw_6pandas_7_sparse_8IntIndex_17intersect(PyObject *__pyx_v_self, PyObject *__pyx_v_y_); /*proto*/ static struct __pyx_obj_6pandas_7_sparse_IntIndex *__pyx_f_6pandas_7_sparse_8IntIndex_intersect(struct __pyx_obj_6pandas_7_sparse_IntIndex *__pyx_v_self, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_y_, int __pyx_skip_dispatch) { Py_ssize_t __pyx_v_xi; Py_ssize_t __pyx_v_yi; __pyx_t_5numpy_int32_t __pyx_v_xind; PyArrayObject *__pyx_v_xindices = 0; PyArrayObject *__pyx_v_yindices = 0; PyObject *__pyx_v_new_list = 0; struct __pyx_obj_6pandas_7_sparse_IntIndex *__pyx_v_y = 0; __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_7_sparse_IntIndex *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_t_4; int __pyx_t_5; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; Py_ssize_t __pyx_t_9; Py_ssize_t __pyx_t_10; Py_ssize_t __pyx_t_11; int __pyx_t_12; int __pyx_t_13; Py_ssize_t __pyx_t_14; int __pyx_t_15; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __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; /* 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_filename = __pyx_f[0]; __pyx_lineno = 90; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_6pandas_7_sparse_8IntIndex_17intersect)) { __Pyx_XDECREF(((PyObject *)__pyx_r)); __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 90; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(((PyObject *)__pyx_v_y_)); PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_y_)); __Pyx_GIVEREF(((PyObject *)__pyx_v_y_)); __pyx_t_3 = PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 90; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_6pandas_7_sparse_IntIndex))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 90; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = ((struct __pyx_obj_6pandas_7_sparse_IntIndex *)__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } /* "pandas/src/sparse.pyx":92 * cpdef IntIndex intersect(self, SparseIndex y_): * cdef: * Py_ssize_t out_length, xi, yi = 0 # <<<<<<<<<<<<<< * int32_t xind * ndarray[int32_t, ndim=1] xindices, yindices */ __pyx_v_yi = 0; /* "pandas/src/sparse.pyx":95 * int32_t xind * ndarray[int32_t, ndim=1] xindices, yindices * list new_list = [] # <<<<<<<<<<<<<< * IntIndex y * */ __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 95; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_v_new_list = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/sparse.pyx":99 * * # if is one already, returns self * y = y_.to_int_index() # <<<<<<<<<<<<<< * * if self.length != y.length: */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_y_), __pyx_n_s_to_int_index); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 99; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = PyObject_Call(__pyx_t_1, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 99; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_6pandas_7_sparse_IntIndex))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 99; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_y = ((struct __pyx_obj_6pandas_7_sparse_IntIndex *)__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/sparse.pyx":101 * y = y_.to_int_index() * * if self.length != y.length: # <<<<<<<<<<<<<< * raise Exception('Indices must reference same underlying length') * */ __pyx_t_4 = ((__pyx_v_self->length != __pyx_v_y->length) != 0); if (__pyx_t_4) { /* "pandas/src/sparse.pyx":102 * * if self.length != y.length: * raise Exception('Indices must reference same underlying length') # <<<<<<<<<<<<<< * * xindices = self.indices */ __pyx_t_3 = PyObject_Call(__pyx_builtin_Exception, __pyx_tuple_, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } /* "pandas/src/sparse.pyx":104 * raise Exception('Indices must reference same underlying length') * * xindices = self.indices # <<<<<<<<<<<<<< * yindices = y.indices * */ __pyx_t_3 = ((PyObject *)__pyx_v_self->indices); __Pyx_INCREF(__pyx_t_3); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_xindices.rcbuffer->pybuffer); __pyx_t_5 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_xindices.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_3), &__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_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_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_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_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_xindices = ((PyArrayObject *)__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/sparse.pyx":105 * * xindices = self.indices * yindices = y.indices # <<<<<<<<<<<<<< * * for xi from 0 <= xi < self.npoints: */ __pyx_t_3 = ((PyObject *)__pyx_v_y->indices); __Pyx_INCREF(__pyx_t_3); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_yindices.rcbuffer->pybuffer); __pyx_t_5 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_yindices.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_3), &__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_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_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_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_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 105; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_yindices = ((PyArrayObject *)__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/sparse.pyx":107 * yindices = y.indices * * for xi from 0 <= xi < self.npoints: # <<<<<<<<<<<<<< * xind = xindices[xi] * */ __pyx_t_9 = __pyx_v_self->npoints; for (__pyx_v_xi = 0; __pyx_v_xi < __pyx_t_9; __pyx_v_xi++) { /* "pandas/src/sparse.pyx":108 * * for xi from 0 <= xi < self.npoints: * xind = xindices[xi] # <<<<<<<<<<<<<< * * while yi < y.npoints and yindices[yi] < xind: */ __pyx_t_10 = __pyx_v_xi; __pyx_t_5 = -1; if (__pyx_t_10 < 0) { __pyx_t_10 += __pyx_pybuffernd_xindices.diminfo[0].shape; if (unlikely(__pyx_t_10 < 0)) __pyx_t_5 = 0; } else if (unlikely(__pyx_t_10 >= __pyx_pybuffernd_xindices.diminfo[0].shape)) __pyx_t_5 = 0; if (unlikely(__pyx_t_5 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_5); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 108; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_xind = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_xindices.rcbuffer->pybuffer.buf, __pyx_t_10, __pyx_pybuffernd_xindices.diminfo[0].strides)); /* "pandas/src/sparse.pyx":110 * xind = xindices[xi] * * while yi < y.npoints and yindices[yi] < xind: # <<<<<<<<<<<<<< * yi += 1 * */ while (1) { __pyx_t_4 = ((__pyx_v_yi < __pyx_v_y->npoints) != 0); if (__pyx_t_4) { __pyx_t_11 = __pyx_v_yi; __pyx_t_5 = -1; if (__pyx_t_11 < 0) { __pyx_t_11 += __pyx_pybuffernd_yindices.diminfo[0].shape; if (unlikely(__pyx_t_11 < 0)) __pyx_t_5 = 0; } else if (unlikely(__pyx_t_11 >= __pyx_pybuffernd_yindices.diminfo[0].shape)) __pyx_t_5 = 0; if (unlikely(__pyx_t_5 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_5); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 110; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_12 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_yindices.rcbuffer->pybuffer.buf, __pyx_t_11, __pyx_pybuffernd_yindices.diminfo[0].strides)) < __pyx_v_xind) != 0); __pyx_t_13 = __pyx_t_12; } else { __pyx_t_13 = __pyx_t_4; } if (!__pyx_t_13) break; /* "pandas/src/sparse.pyx":111 * * while yi < y.npoints and yindices[yi] < xind: * yi += 1 # <<<<<<<<<<<<<< * * if yi >= y.npoints: */ __pyx_v_yi = (__pyx_v_yi + 1); } /* "pandas/src/sparse.pyx":113 * yi += 1 * * if yi >= y.npoints: # <<<<<<<<<<<<<< * break * */ __pyx_t_13 = ((__pyx_v_yi >= __pyx_v_y->npoints) != 0); if (__pyx_t_13) { /* "pandas/src/sparse.pyx":114 * * if yi >= y.npoints: * break # <<<<<<<<<<<<<< * * # TODO: would a two-pass algorithm be faster? */ goto __pyx_L5_break; } /* "pandas/src/sparse.pyx":117 * * # TODO: would a two-pass algorithm be faster? * if yindices[yi] == xind: # <<<<<<<<<<<<<< * new_list.append(xind) * */ __pyx_t_14 = __pyx_v_yi; __pyx_t_5 = -1; if (__pyx_t_14 < 0) { __pyx_t_14 += __pyx_pybuffernd_yindices.diminfo[0].shape; if (unlikely(__pyx_t_14 < 0)) __pyx_t_5 = 0; } else if (unlikely(__pyx_t_14 >= __pyx_pybuffernd_yindices.diminfo[0].shape)) __pyx_t_5 = 0; if (unlikely(__pyx_t_5 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_5); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 117; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_13 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_yindices.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_yindices.diminfo[0].strides)) == __pyx_v_xind) != 0); if (__pyx_t_13) { /* "pandas/src/sparse.pyx":118 * # TODO: would a two-pass algorithm be faster? * if yindices[yi] == xind: * new_list.append(xind) # <<<<<<<<<<<<<< * * return IntIndex(self.length, new_list) */ __pyx_t_3 = __Pyx_PyInt_From_npy_int32(__pyx_v_xind); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 118; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_15 = __Pyx_PyList_Append(__pyx_v_new_list, __pyx_t_3); if (unlikely(__pyx_t_15 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 118; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L9; } __pyx_L9:; } __pyx_L5_break:; /* "pandas/src/sparse.pyx":120 * new_list.append(xind) * * return IntIndex(self.length, new_list) # <<<<<<<<<<<<<< * * cpdef IntIndex make_union(self, SparseIndex y_): */ __Pyx_XDECREF(((PyObject *)__pyx_r)); __pyx_t_3 = PyInt_FromSsize_t(__pyx_v_self->length); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 120; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 120; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __Pyx_INCREF(__pyx_v_new_list); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_new_list); __Pyx_GIVEREF(__pyx_v_new_list); __pyx_t_3 = 0; __pyx_t_3 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_6pandas_7_sparse_IntIndex)), __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 120; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = ((struct __pyx_obj_6pandas_7_sparse_IntIndex *)__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L0; /* "pandas/src/sparse.pyx":90 * return BlockIndex(self.length, locs, lens) * * cpdef IntIndex intersect(self, SparseIndex y_): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t out_length, xi, yi = 0 */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __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._sparse.IntIndex.intersect", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; goto __pyx_L2; __pyx_L0:; __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(__pyx_v_new_list); __Pyx_XDECREF((PyObject *)__pyx_v_y); __Pyx_XGIVEREF((PyObject *)__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_7_sparse_8IntIndex_17intersect(PyObject *__pyx_v_self, PyObject *__pyx_v_y_); /*proto*/ static PyObject *__pyx_pw_6pandas_7_sparse_8IntIndex_17intersect(PyObject *__pyx_v_self, PyObject *__pyx_v_y_) { CYTHON_UNUSED int __pyx_lineno = 0; CYTHON_UNUSED const char *__pyx_filename = NULL; CYTHON_UNUSED int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("intersect (wrapper)", 0); if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_y_), __pyx_ptype_6pandas_7_sparse_SparseIndex, 1, "y_", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 90; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_7_sparse_8IntIndex_16intersect(((struct __pyx_obj_6pandas_7_sparse_IntIndex *)__pyx_v_self), ((struct __pyx_obj_6pandas_7_sparse_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_7_sparse_8IntIndex_16intersect(struct __pyx_obj_6pandas_7_sparse_IntIndex *__pyx_v_self, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_y_) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("intersect", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_6pandas_7_sparse_IntIndex *)__pyx_v_self->__pyx_vtab)->intersect(__pyx_v_self, __pyx_v_y_, 1)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 90; __pyx_clineno = __LINE__; goto __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._sparse.IntIndex.intersect", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/sparse.pyx":122 * return IntIndex(self.length, new_list) * * cpdef IntIndex make_union(self, SparseIndex y_): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t out_length, i, xi, yi */ static PyObject *__pyx_pw_6pandas_7_sparse_8IntIndex_19make_union(PyObject *__pyx_v_self, PyObject *__pyx_v_y_); /*proto*/ static struct __pyx_obj_6pandas_7_sparse_IntIndex *__pyx_f_6pandas_7_sparse_8IntIndex_make_union(struct __pyx_obj_6pandas_7_sparse_IntIndex *__pyx_v_self, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_y_, int __pyx_skip_dispatch) { Py_ssize_t __pyx_v_xi; Py_ssize_t __pyx_v_yi; __pyx_t_5numpy_int32_t __pyx_v_xind; PyArrayObject *__pyx_v_xindices = 0; PyArrayObject *__pyx_v_yindices = 0; PyObject *__pyx_v_new_list = 0; struct __pyx_obj_6pandas_7_sparse_IntIndex *__pyx_v_x = 0; struct __pyx_obj_6pandas_7_sparse_IntIndex *__pyx_v_y = 0; PyObject *__pyx_v_yind = NULL; __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_7_sparse_IntIndex *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_t_4; int __pyx_t_5; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; Py_ssize_t __pyx_t_9; int __pyx_t_10; Py_ssize_t __pyx_t_11; Py_ssize_t __pyx_t_12; Py_ssize_t __pyx_t_13; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("make_union", 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; /* 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_filename = __pyx_f[0]; __pyx_lineno = 122; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_6pandas_7_sparse_8IntIndex_19make_union)) { __Pyx_XDECREF(((PyObject *)__pyx_r)); __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 122; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(((PyObject *)__pyx_v_y_)); PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_y_)); __Pyx_GIVEREF(((PyObject *)__pyx_v_y_)); __pyx_t_3 = PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 122; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_6pandas_7_sparse_IntIndex))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 122; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = ((struct __pyx_obj_6pandas_7_sparse_IntIndex *)__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } /* "pandas/src/sparse.pyx":127 * int32_t xind * ndarray[int32_t, ndim=1] xindices, yindices * list new_list = [] # <<<<<<<<<<<<<< * IntIndex x, y * */ __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 127; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_v_new_list = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/sparse.pyx":130 * IntIndex x, y * * x = self # <<<<<<<<<<<<<< * * # if is one already, returns self */ __Pyx_INCREF(((PyObject *)__pyx_v_self)); __pyx_v_x = __pyx_v_self; /* "pandas/src/sparse.pyx":133 * * # if is one already, returns self * y = y_.to_int_index() # <<<<<<<<<<<<<< * * if self.length != y.length: */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_y_), __pyx_n_s_to_int_index); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 133; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = PyObject_Call(__pyx_t_1, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 133; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_6pandas_7_sparse_IntIndex))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 133; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_y = ((struct __pyx_obj_6pandas_7_sparse_IntIndex *)__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/sparse.pyx":135 * y = y_.to_int_index() * * if self.length != y.length: # <<<<<<<<<<<<<< * raise Exception('Indices must reference same underlying length') * */ __pyx_t_4 = ((__pyx_v_self->length != __pyx_v_y->length) != 0); if (__pyx_t_4) { /* "pandas/src/sparse.pyx":136 * * if self.length != y.length: * raise Exception('Indices must reference same underlying length') # <<<<<<<<<<<<<< * * xindices = self.indices */ __pyx_t_3 = PyObject_Call(__pyx_builtin_Exception, __pyx_tuple__2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 136; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 136; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } /* "pandas/src/sparse.pyx":138 * raise Exception('Indices must reference same underlying length') * * xindices = self.indices # <<<<<<<<<<<<<< * yindices = y.indices * */ __pyx_t_3 = ((PyObject *)__pyx_v_self->indices); __Pyx_INCREF(__pyx_t_3); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_xindices.rcbuffer->pybuffer); __pyx_t_5 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_xindices.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_3), &__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_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_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_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_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 138; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_xindices = ((PyArrayObject *)__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/sparse.pyx":139 * * xindices = self.indices * yindices = y.indices # <<<<<<<<<<<<<< * * xi = yi = 0 */ __pyx_t_3 = ((PyObject *)__pyx_v_y->indices); __Pyx_INCREF(__pyx_t_3); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_yindices.rcbuffer->pybuffer); __pyx_t_5 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_yindices.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_3), &__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_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_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_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_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 139; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_yindices = ((PyArrayObject *)__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/sparse.pyx":141 * yindices = y.indices * * xi = yi = 0 # <<<<<<<<<<<<<< * while True: * if xi == x.npoints: */ __pyx_v_xi = 0; __pyx_v_yi = 0; /* "pandas/src/sparse.pyx":142 * * xi = yi = 0 * while True: # <<<<<<<<<<<<<< * if xi == x.npoints: * while yi < y.npoints: */ while (1) { /* "pandas/src/sparse.pyx":143 * xi = yi = 0 * while True: * if xi == x.npoints: # <<<<<<<<<<<<<< * while yi < y.npoints: * new_list.append(yindices[yi]) */ __pyx_t_4 = ((__pyx_v_xi == __pyx_v_x->npoints) != 0); if (__pyx_t_4) { /* "pandas/src/sparse.pyx":144 * while True: * if xi == x.npoints: * while yi < y.npoints: # <<<<<<<<<<<<<< * new_list.append(yindices[yi]) * yi += 1 */ while (1) { __pyx_t_4 = ((__pyx_v_yi < __pyx_v_y->npoints) != 0); if (!__pyx_t_4) break; /* "pandas/src/sparse.pyx":145 * if xi == x.npoints: * while yi < y.npoints: * new_list.append(yindices[yi]) # <<<<<<<<<<<<<< * yi += 1 * break */ __pyx_t_9 = __pyx_v_yi; __pyx_t_5 = -1; if (__pyx_t_9 < 0) { __pyx_t_9 += __pyx_pybuffernd_yindices.diminfo[0].shape; if (unlikely(__pyx_t_9 < 0)) __pyx_t_5 = 0; } else if (unlikely(__pyx_t_9 >= __pyx_pybuffernd_yindices.diminfo[0].shape)) __pyx_t_5 = 0; if (unlikely(__pyx_t_5 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_5); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 145; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_3 = __Pyx_PyInt_From_npy_int32((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_yindices.rcbuffer->pybuffer.buf, __pyx_t_9, __pyx_pybuffernd_yindices.diminfo[0].strides))); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 145; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_10 = __Pyx_PyList_Append(__pyx_v_new_list, __pyx_t_3); if (unlikely(__pyx_t_10 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 145; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/sparse.pyx":146 * while yi < y.npoints: * new_list.append(yindices[yi]) * yi += 1 # <<<<<<<<<<<<<< * break * elif yi == y.npoints: */ __pyx_v_yi = (__pyx_v_yi + 1); } /* "pandas/src/sparse.pyx":147 * new_list.append(yindices[yi]) * yi += 1 * break # <<<<<<<<<<<<<< * elif yi == y.npoints: * while xi < x.npoints: */ goto __pyx_L5_break; } /* "pandas/src/sparse.pyx":148 * yi += 1 * break * elif yi == y.npoints: # <<<<<<<<<<<<<< * while xi < x.npoints: * new_list.append(xindices[xi]) */ __pyx_t_4 = ((__pyx_v_yi == __pyx_v_y->npoints) != 0); if (__pyx_t_4) { /* "pandas/src/sparse.pyx":149 * break * elif yi == y.npoints: * while xi < x.npoints: # <<<<<<<<<<<<<< * new_list.append(xindices[xi]) * xi += 1 */ while (1) { __pyx_t_4 = ((__pyx_v_xi < __pyx_v_x->npoints) != 0); if (!__pyx_t_4) break; /* "pandas/src/sparse.pyx":150 * elif yi == y.npoints: * while xi < x.npoints: * new_list.append(xindices[xi]) # <<<<<<<<<<<<<< * xi += 1 * break */ __pyx_t_11 = __pyx_v_xi; __pyx_t_5 = -1; if (__pyx_t_11 < 0) { __pyx_t_11 += __pyx_pybuffernd_xindices.diminfo[0].shape; if (unlikely(__pyx_t_11 < 0)) __pyx_t_5 = 0; } else if (unlikely(__pyx_t_11 >= __pyx_pybuffernd_xindices.diminfo[0].shape)) __pyx_t_5 = 0; if (unlikely(__pyx_t_5 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_5); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 150; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_3 = __Pyx_PyInt_From_npy_int32((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_xindices.rcbuffer->pybuffer.buf, __pyx_t_11, __pyx_pybuffernd_xindices.diminfo[0].strides))); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 150; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_10 = __Pyx_PyList_Append(__pyx_v_new_list, __pyx_t_3); if (unlikely(__pyx_t_10 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 150; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/sparse.pyx":151 * while xi < x.npoints: * new_list.append(xindices[xi]) * xi += 1 # <<<<<<<<<<<<<< * break * */ __pyx_v_xi = (__pyx_v_xi + 1); } /* "pandas/src/sparse.pyx":152 * new_list.append(xindices[xi]) * xi += 1 * break # <<<<<<<<<<<<<< * * xind = xindices[xi] */ goto __pyx_L5_break; } /* "pandas/src/sparse.pyx":154 * break * * xind = xindices[xi] # <<<<<<<<<<<<<< * yind = yindices[yi] * */ __pyx_t_12 = __pyx_v_xi; __pyx_t_5 = -1; if (__pyx_t_12 < 0) { __pyx_t_12 += __pyx_pybuffernd_xindices.diminfo[0].shape; if (unlikely(__pyx_t_12 < 0)) __pyx_t_5 = 0; } else if (unlikely(__pyx_t_12 >= __pyx_pybuffernd_xindices.diminfo[0].shape)) __pyx_t_5 = 0; if (unlikely(__pyx_t_5 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_5); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 154; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_xind = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_xindices.rcbuffer->pybuffer.buf, __pyx_t_12, __pyx_pybuffernd_xindices.diminfo[0].strides)); /* "pandas/src/sparse.pyx":155 * * xind = xindices[xi] * yind = yindices[yi] # <<<<<<<<<<<<<< * * if xind == yind: */ __pyx_t_13 = __pyx_v_yi; __pyx_t_5 = -1; if (__pyx_t_13 < 0) { __pyx_t_13 += __pyx_pybuffernd_yindices.diminfo[0].shape; if (unlikely(__pyx_t_13 < 0)) __pyx_t_5 = 0; } else if (unlikely(__pyx_t_13 >= __pyx_pybuffernd_yindices.diminfo[0].shape)) __pyx_t_5 = 0; if (unlikely(__pyx_t_5 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_5); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 155; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_3 = __Pyx_PyInt_From_npy_int32((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_yindices.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_yindices.diminfo[0].strides))); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 155; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_XDECREF_SET(__pyx_v_yind, __pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/sparse.pyx":157 * yind = yindices[yi] * * if xind == yind: # <<<<<<<<<<<<<< * new_list.append(xind) * xi += 1 */ __pyx_t_3 = __Pyx_PyInt_From_npy_int32(__pyx_v_xind); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = PyObject_RichCompare(__pyx_t_3, __pyx_v_yind, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_4) { /* "pandas/src/sparse.pyx":158 * * if xind == yind: * new_list.append(xind) # <<<<<<<<<<<<<< * xi += 1 * yi += 1 */ __pyx_t_1 = __Pyx_PyInt_From_npy_int32(__pyx_v_xind); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 158; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_10 = __Pyx_PyList_Append(__pyx_v_new_list, __pyx_t_1); if (unlikely(__pyx_t_10 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 158; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/sparse.pyx":159 * if xind == yind: * new_list.append(xind) * xi += 1 # <<<<<<<<<<<<<< * yi += 1 * elif xind < yind: */ __pyx_v_xi = (__pyx_v_xi + 1); /* "pandas/src/sparse.pyx":160 * new_list.append(xind) * xi += 1 * yi += 1 # <<<<<<<<<<<<<< * elif xind < yind: * new_list.append(xind) */ __pyx_v_yi = (__pyx_v_yi + 1); goto __pyx_L11; } /* "pandas/src/sparse.pyx":161 * xi += 1 * yi += 1 * elif xind < yind: # <<<<<<<<<<<<<< * new_list.append(xind) * xi += 1 */ __pyx_t_1 = __Pyx_PyInt_From_npy_int32(__pyx_v_xind); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 161; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = PyObject_RichCompare(__pyx_t_1, __pyx_v_yind, Py_LT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 161; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 161; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_4) { /* "pandas/src/sparse.pyx":162 * yi += 1 * elif xind < yind: * new_list.append(xind) # <<<<<<<<<<<<<< * xi += 1 * else: */ __pyx_t_3 = __Pyx_PyInt_From_npy_int32(__pyx_v_xind); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 162; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_10 = __Pyx_PyList_Append(__pyx_v_new_list, __pyx_t_3); if (unlikely(__pyx_t_10 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 162; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/sparse.pyx":163 * elif xind < yind: * new_list.append(xind) * xi += 1 # <<<<<<<<<<<<<< * else: * new_list.append(yind) */ __pyx_v_xi = (__pyx_v_xi + 1); goto __pyx_L11; } /*else*/ { /* "pandas/src/sparse.pyx":165 * xi += 1 * else: * new_list.append(yind) # <<<<<<<<<<<<<< * yi += 1 * */ __pyx_t_10 = __Pyx_PyList_Append(__pyx_v_new_list, __pyx_v_yind); if (unlikely(__pyx_t_10 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 165; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/sparse.pyx":166 * else: * new_list.append(yind) * yi += 1 # <<<<<<<<<<<<<< * * return IntIndex(x.length, new_list) */ __pyx_v_yi = (__pyx_v_yi + 1); } __pyx_L11:; } __pyx_L5_break:; /* "pandas/src/sparse.pyx":168 * yi += 1 * * return IntIndex(x.length, new_list) # <<<<<<<<<<<<<< * * @cython.wraparound(False) */ __Pyx_XDECREF(((PyObject *)__pyx_r)); __pyx_t_3 = PyInt_FromSsize_t(__pyx_v_x->length); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __Pyx_INCREF(__pyx_v_new_list); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_new_list); __Pyx_GIVEREF(__pyx_v_new_list); __pyx_t_3 = 0; __pyx_t_3 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_6pandas_7_sparse_IntIndex)), __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = ((struct __pyx_obj_6pandas_7_sparse_IntIndex *)__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L0; /* "pandas/src/sparse.pyx":122 * return IntIndex(self.length, new_list) * * cpdef IntIndex make_union(self, SparseIndex y_): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t out_length, i, xi, yi */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __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._sparse.IntIndex.make_union", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; goto __pyx_L2; __pyx_L0:; __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(__pyx_v_new_list); __Pyx_XDECREF((PyObject *)__pyx_v_x); __Pyx_XDECREF((PyObject *)__pyx_v_y); __Pyx_XDECREF(__pyx_v_yind); __Pyx_XGIVEREF((PyObject *)__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_7_sparse_8IntIndex_19make_union(PyObject *__pyx_v_self, PyObject *__pyx_v_y_); /*proto*/ static PyObject *__pyx_pw_6pandas_7_sparse_8IntIndex_19make_union(PyObject *__pyx_v_self, PyObject *__pyx_v_y_) { CYTHON_UNUSED int __pyx_lineno = 0; CYTHON_UNUSED const char *__pyx_filename = NULL; CYTHON_UNUSED int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("make_union (wrapper)", 0); if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_y_), __pyx_ptype_6pandas_7_sparse_SparseIndex, 1, "y_", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 122; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_7_sparse_8IntIndex_18make_union(((struct __pyx_obj_6pandas_7_sparse_IntIndex *)__pyx_v_self), ((struct __pyx_obj_6pandas_7_sparse_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_7_sparse_8IntIndex_18make_union(struct __pyx_obj_6pandas_7_sparse_IntIndex *__pyx_v_self, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_y_) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("make_union", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_6pandas_7_sparse_IntIndex *)__pyx_v_self->__pyx_vtab)->make_union(__pyx_v_self, __pyx_v_y_, 1)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 122; __pyx_clineno = __LINE__; goto __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._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/src/sparse.pyx":171 * * @cython.wraparound(False) * cpdef lookup(self, Py_ssize_t index): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t res, n, cum_len = 0 */ static PyObject *__pyx_pw_6pandas_7_sparse_8IntIndex_21lookup(PyObject *__pyx_v_self, PyObject *__pyx_arg_index); /*proto*/ static PyObject *__pyx_f_6pandas_7_sparse_8IntIndex_lookup(struct __pyx_obj_6pandas_7_sparse_IntIndex *__pyx_v_self, Py_ssize_t __pyx_v_index, int __pyx_skip_dispatch) { Py_ssize_t __pyx_v_res; CYTHON_UNUSED Py_ssize_t __pyx_v_cum_len; PyArrayObject *__pyx_v_inds = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_inds; __Pyx_Buffer __pyx_pybuffer_inds; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_t_4; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; Py_ssize_t __pyx_t_8; int __pyx_t_9; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __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_filename = __pyx_f[0]; __pyx_lineno = 171; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_6pandas_7_sparse_8IntIndex_21lookup)) { __Pyx_XDECREF(__pyx_r); __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_index); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 171; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 171; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_Call(__pyx_t_1, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 171; __pyx_clineno = __LINE__; goto __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/src/sparse.pyx":173 * cpdef lookup(self, Py_ssize_t index): * cdef: * Py_ssize_t res, n, cum_len = 0 # <<<<<<<<<<<<<< * ndarray[int32_t, ndim=1] inds * */ __pyx_v_cum_len = 0; /* "pandas/src/sparse.pyx":176 * ndarray[int32_t, ndim=1] inds * * inds = self.indices # <<<<<<<<<<<<<< * res = inds.searchsorted(index) * if res == self.npoints: */ __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_4 = __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_4 < 0)) { PyErr_Fetch(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7); 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_5); Py_XDECREF(__pyx_t_6); Py_XDECREF(__pyx_t_7); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_5, __pyx_t_6, __pyx_t_7); } } __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_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 176; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_inds = ((PyArrayObject *)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/sparse.pyx":177 * * inds = self.indices * res = inds.searchsorted(index) # <<<<<<<<<<<<<< * if res == self.npoints: * return -1 */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_inds), __pyx_n_s_searchsorted); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 177; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_index); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 177; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 177; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_Call(__pyx_t_1, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 177; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_8 = __Pyx_PyIndex_AsSsize_t(__pyx_t_2); if (unlikely((__pyx_t_8 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 177; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_res = __pyx_t_8; /* "pandas/src/sparse.pyx":178 * inds = self.indices * res = inds.searchsorted(index) * if res == self.npoints: # <<<<<<<<<<<<<< * return -1 * elif inds[res] == index: */ __pyx_t_9 = ((__pyx_v_res == __pyx_v_self->npoints) != 0); if (__pyx_t_9) { /* "pandas/src/sparse.pyx":179 * res = inds.searchsorted(index) * if res == self.npoints: * return -1 # <<<<<<<<<<<<<< * elif inds[res] == index: * return res */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_int_neg_1); __pyx_r = __pyx_int_neg_1; goto __pyx_L0; } /* "pandas/src/sparse.pyx":180 * if res == self.npoints: * return -1 * elif inds[res] == index: # <<<<<<<<<<<<<< * return res * else: */ __pyx_t_8 = __pyx_v_res; __pyx_t_4 = -1; if (__pyx_t_8 < 0) { __pyx_t_4 = 0; } else if (unlikely(__pyx_t_8 >= __pyx_pybuffernd_inds.diminfo[0].shape)) __pyx_t_4 = 0; if (unlikely(__pyx_t_4 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_4); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_9 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_inds.rcbuffer->pybuffer.buf, __pyx_t_8, __pyx_pybuffernd_inds.diminfo[0].strides)) == __pyx_v_index) != 0); if (__pyx_t_9) { /* "pandas/src/sparse.pyx":181 * return -1 * elif inds[res] == index: * return res # <<<<<<<<<<<<<< * else: * return -1 */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_res); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 181; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; } /*else*/ { /* "pandas/src/sparse.pyx":183 * return res * else: * return -1 # <<<<<<<<<<<<<< * * cpdef ndarray reindex(self, ndarray[float64_t, ndim=1] values, */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_int_neg_1); __pyx_r = __pyx_int_neg_1; goto __pyx_L0; } /* "pandas/src/sparse.pyx":171 * * @cython.wraparound(False) * cpdef lookup(self, Py_ssize_t index): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t res, n, cum_len = 0 */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_inds.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas._sparse.IntIndex.lookup", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_inds.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_inds); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_7_sparse_8IntIndex_21lookup(PyObject *__pyx_v_self, PyObject *__pyx_arg_index); /*proto*/ static PyObject *__pyx_pw_6pandas_7_sparse_8IntIndex_21lookup(PyObject *__pyx_v_self, PyObject *__pyx_arg_index) { Py_ssize_t __pyx_v_index; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; 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_filename = __pyx_f[0]; __pyx_lineno = 171; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; __Pyx_AddTraceback("pandas._sparse.IntIndex.lookup", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pandas_7_sparse_8IntIndex_20lookup(((struct __pyx_obj_6pandas_7_sparse_IntIndex *)__pyx_v_self), ((Py_ssize_t)__pyx_v_index)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_7_sparse_8IntIndex_20lookup(struct __pyx_obj_6pandas_7_sparse_IntIndex *__pyx_v_self, Py_ssize_t __pyx_v_index) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("lookup", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = ((struct __pyx_vtabstruct_6pandas_7_sparse_IntIndex *)__pyx_v_self->__pyx_vtab)->lookup(__pyx_v_self, __pyx_v_index, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 171; __pyx_clineno = __LINE__; goto __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._sparse.IntIndex.lookup", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/sparse.pyx":185 * return -1 * * cpdef ndarray reindex(self, ndarray[float64_t, ndim=1] values, # <<<<<<<<<<<<<< * float64_t fill_value, SparseIndex other_): * cdef: */ static PyObject *__pyx_pw_6pandas_7_sparse_8IntIndex_23reindex(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyArrayObject *__pyx_f_6pandas_7_sparse_8IntIndex_reindex(struct __pyx_obj_6pandas_7_sparse_IntIndex *__pyx_v_self, PyArrayObject *__pyx_v_values, __pyx_t_5numpy_float64_t __pyx_v_fill_value, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_other_, int __pyx_skip_dispatch) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; struct __pyx_obj_6pandas_7_sparse_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; 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; PyArrayObject *__pyx_t_10 = NULL; Py_ssize_t __pyx_t_11; Py_ssize_t __pyx_t_12; Py_ssize_t __pyx_t_13; int __pyx_t_14; 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __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_filename = __pyx_f[0]; __pyx_lineno = 185; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 185; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_6pandas_7_sparse_8IntIndex_23reindex)) { __Pyx_XDECREF(((PyObject *)__pyx_r)); __pyx_t_2 = PyFloat_FromDouble(__pyx_v_fill_value); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 185; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 185; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(((PyObject *)__pyx_v_values)); PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_v_values)); __Pyx_GIVEREF(((PyObject *)__pyx_v_values)); PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __Pyx_INCREF(((PyObject *)__pyx_v_other_)); PyTuple_SET_ITEM(__pyx_t_3, 2, ((PyObject *)__pyx_v_other_)); __Pyx_GIVEREF(((PyObject *)__pyx_v_other_)); __pyx_t_2 = 0; __pyx_t_2 = PyObject_Call(__pyx_t_1, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 185; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __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_filename = __pyx_f[0]; __pyx_lineno = 185; __pyx_clineno = __LINE__; goto __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/src/sparse.pyx":188 * 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/src/sparse.pyx":193 * ndarray[int32_t, ndim=1] sinds, oinds * * other = other_.to_int_index() # <<<<<<<<<<<<<< * * oinds = other.indices */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_other_), __pyx_n_s_to_int_index); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 193; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyObject_Call(__pyx_t_1, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 193; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_6pandas_7_sparse_IntIndex))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 193; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_other = ((struct __pyx_obj_6pandas_7_sparse_IntIndex *)__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/sparse.pyx":195 * other = other_.to_int_index() * * oinds = other.indices # <<<<<<<<<<<<<< * sinds = self.indices * */ __pyx_t_2 = ((PyObject *)__pyx_v_other->indices); __Pyx_INCREF(__pyx_t_2); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_oinds.rcbuffer->pybuffer); __pyx_t_4 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_oinds.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_4 < 0)) { PyErr_Fetch(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7); 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_5); Py_XDECREF(__pyx_t_6); Py_XDECREF(__pyx_t_7); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_5, __pyx_t_6, __pyx_t_7); } } __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_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 195; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_oinds = ((PyArrayObject *)__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/sparse.pyx":196 * * oinds = other.indices * sinds = self.indices # <<<<<<<<<<<<<< * * result = np.empty(other.npoints, dtype=np.float64) */ __pyx_t_2 = ((PyObject *)__pyx_v_self->indices); __Pyx_INCREF(__pyx_t_2); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_sinds.rcbuffer->pybuffer); __pyx_t_4 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_sinds.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_4 < 0)) { PyErr_Fetch(&__pyx_t_7, &__pyx_t_6, &__pyx_t_5); 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_7); Py_XDECREF(__pyx_t_6); Py_XDECREF(__pyx_t_5); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_7, __pyx_t_6, __pyx_t_5); } } __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_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 196; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_sinds = ((PyArrayObject *)__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/sparse.pyx":198 * sinds = self.indices * * result = np.empty(other.npoints, dtype=np.float64) # <<<<<<<<<<<<<< * result.fill(fill_value) * */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 198; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_empty); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 198; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_other->npoints); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 198; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 198; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 198; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 198; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 198; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_dtype, __pyx_t_9) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 198; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_9 = PyObject_Call(__pyx_t_1, __pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 198; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (!(likely(((__pyx_t_9) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_9, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 198; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_10 = ((PyArrayObject *)__pyx_t_9); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __pyx_t_4 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.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_4 < 0)) { PyErr_Fetch(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7); 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_5); Py_XDECREF(__pyx_t_6); Py_XDECREF(__pyx_t_7); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_5, __pyx_t_6, __pyx_t_7); } } __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_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 198; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_10 = 0; __pyx_v_result = ((PyArrayObject *)__pyx_t_9); __pyx_t_9 = 0; /* "pandas/src/sparse.pyx":199 * * result = np.empty(other.npoints, dtype=np.float64) * result.fill(fill_value) # <<<<<<<<<<<<<< * * for 0 <= i < other.npoints: */ __pyx_t_9 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_result), __pyx_n_s_fill); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 199; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_t_2 = PyFloat_FromDouble(__pyx_v_fill_value); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 199; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 199; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_Call(__pyx_t_9, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 199; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/sparse.pyx":201 * result.fill(fill_value) * * for 0 <= i < other.npoints: # <<<<<<<<<<<<<< * while oinds[i] > sinds[j] and j < self.npoints: * j += 1 */ __pyx_t_11 = __pyx_v_other->npoints; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_11; __pyx_v_i++) { /* "pandas/src/sparse.pyx":202 * * for 0 <= i < other.npoints: * while oinds[i] > sinds[j] and j < self.npoints: # <<<<<<<<<<<<<< * j += 1 * */ while (1) { __pyx_t_12 = __pyx_v_i; __pyx_t_4 = -1; if (__pyx_t_12 < 0) { __pyx_t_12 += __pyx_pybuffernd_oinds.diminfo[0].shape; if (unlikely(__pyx_t_12 < 0)) __pyx_t_4 = 0; } else if (unlikely(__pyx_t_12 >= __pyx_pybuffernd_oinds.diminfo[0].shape)) __pyx_t_4 = 0; if (unlikely(__pyx_t_4 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_4); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 202; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_13 = __pyx_v_j; __pyx_t_4 = -1; if (__pyx_t_13 < 0) { __pyx_t_13 += __pyx_pybuffernd_sinds.diminfo[0].shape; if (unlikely(__pyx_t_13 < 0)) __pyx_t_4 = 0; } else if (unlikely(__pyx_t_13 >= __pyx_pybuffernd_sinds.diminfo[0].shape)) __pyx_t_4 = 0; if (unlikely(__pyx_t_4 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_4); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 202; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_14 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_oinds.rcbuffer->pybuffer.buf, __pyx_t_12, __pyx_pybuffernd_oinds.diminfo[0].strides)) > (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_sinds.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_sinds.diminfo[0].strides))) != 0); if (__pyx_t_14) { __pyx_t_15 = ((__pyx_v_j < __pyx_v_self->npoints) != 0); __pyx_t_16 = __pyx_t_15; } else { __pyx_t_16 = __pyx_t_14; } if (!__pyx_t_16) break; /* "pandas/src/sparse.pyx":203 * 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/src/sparse.pyx":205 * j += 1 * * if j == self.npoints: # <<<<<<<<<<<<<< * break * */ __pyx_t_16 = ((__pyx_v_j == __pyx_v_self->npoints) != 0); if (__pyx_t_16) { /* "pandas/src/sparse.pyx":206 * * if j == self.npoints: * break # <<<<<<<<<<<<<< * * if oinds[i] < sinds[j]: */ goto __pyx_L4_break; } /* "pandas/src/sparse.pyx":208 * break * * if oinds[i] < sinds[j]: # <<<<<<<<<<<<<< * continue * elif oinds[i] == sinds[j]: */ __pyx_t_17 = __pyx_v_i; __pyx_t_4 = -1; if (__pyx_t_17 < 0) { __pyx_t_17 += __pyx_pybuffernd_oinds.diminfo[0].shape; if (unlikely(__pyx_t_17 < 0)) __pyx_t_4 = 0; } else if (unlikely(__pyx_t_17 >= __pyx_pybuffernd_oinds.diminfo[0].shape)) __pyx_t_4 = 0; if (unlikely(__pyx_t_4 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_4); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 208; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_18 = __pyx_v_j; __pyx_t_4 = -1; if (__pyx_t_18 < 0) { __pyx_t_18 += __pyx_pybuffernd_sinds.diminfo[0].shape; if (unlikely(__pyx_t_18 < 0)) __pyx_t_4 = 0; } else if (unlikely(__pyx_t_18 >= __pyx_pybuffernd_sinds.diminfo[0].shape)) __pyx_t_4 = 0; if (unlikely(__pyx_t_4 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_4); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 208; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_16 = (((*__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_16) { /* "pandas/src/sparse.pyx":209 * * if oinds[i] < sinds[j]: * continue # <<<<<<<<<<<<<< * elif oinds[i] == sinds[j]: * result[i] = values[j] */ goto __pyx_L3_continue; } /* "pandas/src/sparse.pyx":210 * 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_4 = -1; if (__pyx_t_19 < 0) { __pyx_t_19 += __pyx_pybuffernd_oinds.diminfo[0].shape; if (unlikely(__pyx_t_19 < 0)) __pyx_t_4 = 0; } else if (unlikely(__pyx_t_19 >= __pyx_pybuffernd_oinds.diminfo[0].shape)) __pyx_t_4 = 0; if (unlikely(__pyx_t_4 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_4); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 210; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_20 = __pyx_v_j; __pyx_t_4 = -1; if (__pyx_t_20 < 0) { __pyx_t_20 += __pyx_pybuffernd_sinds.diminfo[0].shape; if (unlikely(__pyx_t_20 < 0)) __pyx_t_4 = 0; } else if (unlikely(__pyx_t_20 >= __pyx_pybuffernd_sinds.diminfo[0].shape)) __pyx_t_4 = 0; if (unlikely(__pyx_t_4 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_4); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 210; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_16 = (((*__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_16) { /* "pandas/src/sparse.pyx":211 * continue * elif oinds[i] == sinds[j]: * result[i] = values[j] # <<<<<<<<<<<<<< * j += 1 * */ __pyx_t_21 = __pyx_v_j; __pyx_t_4 = -1; if (__pyx_t_21 < 0) { __pyx_t_21 += __pyx_pybuffernd_values.diminfo[0].shape; if (unlikely(__pyx_t_21 < 0)) __pyx_t_4 = 0; } else if (unlikely(__pyx_t_21 >= __pyx_pybuffernd_values.diminfo[0].shape)) __pyx_t_4 = 0; if (unlikely(__pyx_t_4 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_4); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 211; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_22 = __pyx_v_i; __pyx_t_4 = -1; if (__pyx_t_22 < 0) { __pyx_t_22 += __pyx_pybuffernd_result.diminfo[0].shape; if (unlikely(__pyx_t_22 < 0)) __pyx_t_4 = 0; } else if (unlikely(__pyx_t_22 >= __pyx_pybuffernd_result.diminfo[0].shape)) __pyx_t_4 = 0; if (unlikely(__pyx_t_4 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_4); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 211; __pyx_clineno = __LINE__; goto __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/src/sparse.pyx":212 * elif oinds[i] == sinds[j]: * result[i] = values[j] * j += 1 # <<<<<<<<<<<<<< * * return result */ __pyx_v_j = (__pyx_v_j + 1); goto __pyx_L8; } __pyx_L8:; __pyx_L3_continue:; } __pyx_L4_break:; /* "pandas/src/sparse.pyx":214 * 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/src/sparse.pyx":185 * return -1 * * 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_8); __Pyx_XDECREF(__pyx_t_9); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __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._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_7_sparse_8IntIndex_23reindex(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_6pandas_7_sparse_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_7_sparse_SparseIndex *__pyx_v_other_ = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 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); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_values)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_fill_value)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("reindex", 1, 3, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 185; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_other)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("reindex", 1, 3, 3, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 185; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "reindex") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 185; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 186; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_other_ = ((struct __pyx_obj_6pandas_7_sparse_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_filename = __pyx_f[0]; __pyx_lineno = 185; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas._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_filename = __pyx_f[0]; __pyx_lineno = 185; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_other_), __pyx_ptype_6pandas_7_sparse_SparseIndex, 1, "other_", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 186; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_7_sparse_8IntIndex_22reindex(((struct __pyx_obj_6pandas_7_sparse_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_7_sparse_8IntIndex_22reindex(struct __pyx_obj_6pandas_7_sparse_IntIndex *__pyx_v_self, PyArrayObject *__pyx_v_values, __pyx_t_5numpy_float64_t __pyx_v_fill_value, struct __pyx_obj_6pandas_7_sparse_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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __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_filename = __pyx_f[0]; __pyx_lineno = 185; __pyx_clineno = __LINE__; goto __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 *)((struct __pyx_vtabstruct_6pandas_7_sparse_IntIndex *)__pyx_v_self->__pyx_vtab)->reindex(__pyx_v_self, __pyx_v_values, __pyx_v_fill_value, __pyx_v_other_, 1)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 185; __pyx_clineno = __LINE__; goto __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_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._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/src/sparse.pyx":216 * 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_7_sparse_8IntIndex_25put(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_6pandas_7_sparse_8IntIndex_put(CYTHON_UNUSED struct __pyx_obj_6pandas_7_sparse_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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __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_filename = __pyx_f[0]; __pyx_lineno = 216; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 216; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 216; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_6pandas_7_sparse_8IntIndex_25put)) { __Pyx_XDECREF(__pyx_r); __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 216; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(((PyObject *)__pyx_v_values)); PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_values)); __Pyx_GIVEREF(((PyObject *)__pyx_v_values)); __Pyx_INCREF(((PyObject *)__pyx_v_indices)); PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)__pyx_v_indices)); __Pyx_GIVEREF(((PyObject *)__pyx_v_indices)); __Pyx_INCREF(__pyx_v_to_put); PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_to_put); __Pyx_GIVEREF(__pyx_v_to_put); __pyx_t_3 = PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 216; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_3; __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } /* "pandas/src/sparse.pyx":218 * 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); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __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._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/src/sparse.pyx":216 * 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_7_sparse_8IntIndex_25put(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_6pandas_7_sparse_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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 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); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_values)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_indices)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("put", 1, 3, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 216; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_to_put)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("put", 1, 3, 3, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 216; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "put") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 216; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 216; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas._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_filename = __pyx_f[0]; __pyx_lineno = 216; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_indices), __pyx_ptype_5numpy_ndarray, 1, "indices", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 217; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_7_sparse_8IntIndex_24put(((struct __pyx_obj_6pandas_7_sparse_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_7_sparse_8IntIndex_24put(struct __pyx_obj_6pandas_7_sparse_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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __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_filename = __pyx_f[0]; __pyx_lineno = 216; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 216; __pyx_clineno = __LINE__; goto __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 = ((struct __pyx_vtabstruct_6pandas_7_sparse_IntIndex *)__pyx_v_self->__pyx_vtab)->put(__pyx_v_self, __pyx_v_values, __pyx_v_indices, __pyx_v_to_put, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 216; __pyx_clineno = __LINE__; goto __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_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._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/src/sparse.pyx":220 * pass * * cpdef take(self, ndarray[float64_t, ndim=1] values, # <<<<<<<<<<<<<< * ndarray[int32_t, ndim=1] indices): * pass */ static PyObject *__pyx_pw_6pandas_7_sparse_8IntIndex_27take(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_6pandas_7_sparse_8IntIndex_take(CYTHON_UNUSED struct __pyx_obj_6pandas_7_sparse_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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __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_filename = __pyx_f[0]; __pyx_lineno = 220; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 220; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 220; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_6pandas_7_sparse_8IntIndex_27take)) { __Pyx_XDECREF(__pyx_r); __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 220; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(((PyObject *)__pyx_v_values)); PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_values)); __Pyx_GIVEREF(((PyObject *)__pyx_v_values)); __Pyx_INCREF(((PyObject *)__pyx_v_indices)); PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)__pyx_v_indices)); __Pyx_GIVEREF(((PyObject *)__pyx_v_indices)); __pyx_t_3 = PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 220; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_3; __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } /* "pandas/src/sparse.pyx":222 * 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); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __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._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/src/sparse.pyx":220 * pass * * cpdef take(self, ndarray[float64_t, ndim=1] values, # <<<<<<<<<<<<<< * ndarray[int32_t, ndim=1] indices): * pass */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_7_sparse_8IntIndex_27take(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_6pandas_7_sparse_8IntIndex_27take(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_values = 0; PyArrayObject *__pyx_v_indices = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 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); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_values)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_indices)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 220; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "take") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 220; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 220; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas._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_filename = __pyx_f[0]; __pyx_lineno = 220; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_indices), __pyx_ptype_5numpy_ndarray, 1, "indices", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 221; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_7_sparse_8IntIndex_26take(((struct __pyx_obj_6pandas_7_sparse_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_7_sparse_8IntIndex_26take(struct __pyx_obj_6pandas_7_sparse_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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __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_filename = __pyx_f[0]; __pyx_lineno = 220; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 220; __pyx_clineno = __LINE__; goto __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 = ((struct __pyx_vtabstruct_6pandas_7_sparse_IntIndex *)__pyx_v_self->__pyx_vtab)->take(__pyx_v_self, __pyx_v_values, __pyx_v_indices, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 220; __pyx_clineno = __LINE__; goto __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_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._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/src/sparse.pyx":44 * ''' * cdef readonly: * Py_ssize_t length, npoints # <<<<<<<<<<<<<< * ndarray indices * */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_7_sparse_8IntIndex_6length_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6pandas_7_sparse_8IntIndex_6length_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_7_sparse_8IntIndex_6length___get__(((struct __pyx_obj_6pandas_7_sparse_IntIndex *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_7_sparse_8IntIndex_6length___get__(struct __pyx_obj_6pandas_7_sparse_IntIndex *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_self->length); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 44; __pyx_clineno = __LINE__; goto __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._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_7_sparse_8IntIndex_7npoints_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6pandas_7_sparse_8IntIndex_7npoints_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_7_sparse_8IntIndex_7npoints___get__(((struct __pyx_obj_6pandas_7_sparse_IntIndex *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_7_sparse_8IntIndex_7npoints___get__(struct __pyx_obj_6pandas_7_sparse_IntIndex *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_self->npoints); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 44; __pyx_clineno = __LINE__; goto __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._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/src/sparse.pyx":45 * cdef readonly: * Py_ssize_t length, npoints * ndarray indices # <<<<<<<<<<<<<< * * def __init__(self, Py_ssize_t length, indices): */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_7_sparse_8IntIndex_7indices_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6pandas_7_sparse_8IntIndex_7indices_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_7_sparse_8IntIndex_7indices___get__(((struct __pyx_obj_6pandas_7_sparse_IntIndex *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_7_sparse_8IntIndex_7indices___get__(struct __pyx_obj_6pandas_7_sparse_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/src/sparse.pyx":224 * pass * * cpdef get_blocks(ndarray[int32_t, ndim=1] indices): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, npoints */ static PyObject *__pyx_pw_6pandas_7_sparse_1get_blocks(PyObject *__pyx_self, PyObject *__pyx_v_indices); /*proto*/ static PyObject *__pyx_f_6pandas_7_sparse_get_blocks(PyArrayObject *__pyx_v_indices, CYTHON_UNUSED int __pyx_skip_dispatch) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_npoints; __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; PyObject *__pyx_v_locs = 0; PyObject *__pyx_v_lens = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_indices; __Pyx_Buffer __pyx_pybuffer_indices; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; Py_ssize_t __pyx_t_2; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; long __pyx_t_6; int __pyx_t_7; __pyx_t_5numpy_int32_t __pyx_t_8; Py_ssize_t __pyx_t_9; int __pyx_t_10; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __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_filename = __pyx_f[0]; __pyx_lineno = 224; __pyx_clineno = __LINE__; goto __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/src/sparse.pyx":227 * cdef: * Py_ssize_t i, npoints * int32_t block, length = 1, cur, prev # <<<<<<<<<<<<<< * list locs = [], lens = [] * */ __pyx_v_length = 1; /* "pandas/src/sparse.pyx":228 * Py_ssize_t i, npoints * int32_t block, length = 1, cur, prev * list locs = [], lens = [] # <<<<<<<<<<<<<< * * npoints = len(indices) */ __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 228; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_v_locs = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 228; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_v_lens = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/sparse.pyx":230 * list locs = [], lens = [] * * npoints = len(indices) # <<<<<<<<<<<<<< * * # just handle the special empty case separately */ __pyx_t_2 = PyObject_Length(((PyObject *)__pyx_v_indices)); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 230; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_npoints = __pyx_t_2; /* "pandas/src/sparse.pyx":233 * * # just handle the special empty case separately * if npoints == 0: # <<<<<<<<<<<<<< * return [], [] * */ __pyx_t_3 = ((__pyx_v_npoints == 0) != 0); if (__pyx_t_3) { /* "pandas/src/sparse.pyx":234 * # just handle the special empty case separately * if npoints == 0: * return [], [] # <<<<<<<<<<<<<< * * # TODO: two-pass algorithm faster? */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 234; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 234; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 234; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_1 = 0; __pyx_t_4 = 0; __pyx_r = __pyx_t_5; __pyx_t_5 = 0; goto __pyx_L0; } /* "pandas/src/sparse.pyx":237 * * # TODO: two-pass algorithm faster? * prev = block = indices[0] # <<<<<<<<<<<<<< * for i from 1 <= i < npoints: * cur = indices[i] */ __pyx_t_6 = 0; __pyx_t_7 = -1; if (__pyx_t_6 < 0) { __pyx_t_6 += __pyx_pybuffernd_indices.diminfo[0].shape; if (unlikely(__pyx_t_6 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_6 >= __pyx_pybuffernd_indices.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 237; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_8 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_indices.rcbuffer->pybuffer.buf, __pyx_t_6, __pyx_pybuffernd_indices.diminfo[0].strides)); __pyx_v_prev = __pyx_t_8; __pyx_v_block = __pyx_t_8; /* "pandas/src/sparse.pyx":238 * # TODO: two-pass algorithm faster? * prev = block = indices[0] * for i from 1 <= i < npoints: # <<<<<<<<<<<<<< * cur = indices[i] * if cur - prev > 1: */ __pyx_t_2 = __pyx_v_npoints; for (__pyx_v_i = 1; __pyx_v_i < __pyx_t_2; __pyx_v_i++) { /* "pandas/src/sparse.pyx":239 * prev = block = indices[0] * for i from 1 <= i < npoints: * cur = indices[i] # <<<<<<<<<<<<<< * if cur - prev > 1: * # new block */ __pyx_t_9 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_9 < 0) { __pyx_t_9 += __pyx_pybuffernd_indices.diminfo[0].shape; if (unlikely(__pyx_t_9 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_9 >= __pyx_pybuffernd_indices.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 239; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_cur = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_indices.rcbuffer->pybuffer.buf, __pyx_t_9, __pyx_pybuffernd_indices.diminfo[0].strides)); /* "pandas/src/sparse.pyx":240 * for i from 1 <= i < npoints: * cur = indices[i] * if cur - prev > 1: # <<<<<<<<<<<<<< * # new block * locs.append(block) */ __pyx_t_3 = (((__pyx_v_cur - __pyx_v_prev) > 1) != 0); if (__pyx_t_3) { /* "pandas/src/sparse.pyx":242 * if cur - prev > 1: * # new block * locs.append(block) # <<<<<<<<<<<<<< * lens.append(length) * block = cur */ __pyx_t_5 = __Pyx_PyInt_From_npy_int32(__pyx_v_block); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 242; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_10 = __Pyx_PyList_Append(__pyx_v_locs, __pyx_t_5); if (unlikely(__pyx_t_10 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 242; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "pandas/src/sparse.pyx":243 * # new block * locs.append(block) * lens.append(length) # <<<<<<<<<<<<<< * block = cur * length = 1 */ __pyx_t_5 = __Pyx_PyInt_From_npy_int32(__pyx_v_length); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_10 = __Pyx_PyList_Append(__pyx_v_lens, __pyx_t_5); if (unlikely(__pyx_t_10 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "pandas/src/sparse.pyx":244 * locs.append(block) * lens.append(length) * block = cur # <<<<<<<<<<<<<< * length = 1 * else: */ __pyx_v_block = __pyx_v_cur; /* "pandas/src/sparse.pyx":245 * lens.append(length) * block = cur * length = 1 # <<<<<<<<<<<<<< * else: * # same block, increment length */ __pyx_v_length = 1; goto __pyx_L6; } /*else*/ { /* "pandas/src/sparse.pyx":248 * else: * # same block, increment length * length += 1 # <<<<<<<<<<<<<< * * prev = cur */ __pyx_v_length = (__pyx_v_length + 1); } __pyx_L6:; /* "pandas/src/sparse.pyx":250 * length += 1 * * prev = cur # <<<<<<<<<<<<<< * * locs.append(block) */ __pyx_v_prev = __pyx_v_cur; } /* "pandas/src/sparse.pyx":252 * prev = cur * * locs.append(block) # <<<<<<<<<<<<<< * lens.append(length) * return locs, lens */ __pyx_t_5 = __Pyx_PyInt_From_npy_int32(__pyx_v_block); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 252; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_10 = __Pyx_PyList_Append(__pyx_v_locs, __pyx_t_5); if (unlikely(__pyx_t_10 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 252; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "pandas/src/sparse.pyx":253 * * locs.append(block) * lens.append(length) # <<<<<<<<<<<<<< * return locs, lens * */ __pyx_t_5 = __Pyx_PyInt_From_npy_int32(__pyx_v_length); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 253; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_10 = __Pyx_PyList_Append(__pyx_v_lens, __pyx_t_5); if (unlikely(__pyx_t_10 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 253; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "pandas/src/sparse.pyx":254 * locs.append(block) * lens.append(length) * return locs, lens # <<<<<<<<<<<<<< * * #------------------------------------------------------------------------------- */ __Pyx_XDECREF(__pyx_r); __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 254; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_v_locs); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_locs); __Pyx_GIVEREF(__pyx_v_locs); __Pyx_INCREF(__pyx_v_lens); PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_v_lens); __Pyx_GIVEREF(__pyx_v_lens); __pyx_r = __pyx_t_5; __pyx_t_5 = 0; goto __pyx_L0; /* "pandas/src/sparse.pyx":224 * pass * * cpdef get_blocks(ndarray[int32_t, ndim=1] indices): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, npoints */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __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._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_L2:; __Pyx_XDECREF(__pyx_v_locs); __Pyx_XDECREF(__pyx_v_lens); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_7_sparse_1get_blocks(PyObject *__pyx_self, PyObject *__pyx_v_indices); /*proto*/ static PyObject *__pyx_pw_6pandas_7_sparse_1get_blocks(PyObject *__pyx_self, PyObject *__pyx_v_indices) { CYTHON_UNUSED int __pyx_lineno = 0; CYTHON_UNUSED const char *__pyx_filename = NULL; CYTHON_UNUSED int __pyx_clineno = 0; 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_filename = __pyx_f[0]; __pyx_lineno = 224; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_7_sparse_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_7_sparse_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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __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_filename = __pyx_f[0]; __pyx_lineno = 224; __pyx_clineno = __LINE__; goto __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_7_sparse_get_blocks(__pyx_v_indices, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 224; __pyx_clineno = __LINE__; goto __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_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._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/src/sparse.pyx":274 * int32_t* locbuf, *lenbuf * * def __init__(self, length, blocs, blengths): # <<<<<<<<<<<<<< * * self.blocs = np.ascontiguousarray(blocs, dtype=np.int32) */ /* Python wrapper */ static int __pyx_pw_6pandas_7_sparse_10BlockIndex_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_pw_6pandas_7_sparse_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_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 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); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_length)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_blocs)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 274; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_blengths)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 274; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 274; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 274; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas._sparse.BlockIndex.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return -1; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pandas_7_sparse_10BlockIndex___init__(((struct __pyx_obj_6pandas_7_sparse_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_7_sparse_10BlockIndex___init__(struct __pyx_obj_6pandas_7_sparse_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; Py_ssize_t __pyx_t_6; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__init__", 0); /* "pandas/src/sparse.pyx":276 * 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_filename = __pyx_f[0]; __pyx_lineno = 276; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 276; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 276; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_blocs); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_blocs); __Pyx_GIVEREF(__pyx_v_blocs); __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 276; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 276; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 276; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 276; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyObject_Call(__pyx_t_2, __pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 276; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 276; __pyx_clineno = __LINE__; goto __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/src/sparse.pyx":277 * * 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_filename = __pyx_f[0]; __pyx_lineno = 277; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 277; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 277; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_v_blengths); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_blengths); __Pyx_GIVEREF(__pyx_v_blengths); __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 277; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 277; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 277; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 277; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyObject_Call(__pyx_t_3, __pyx_t_5, __pyx_t_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 277; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 277; __pyx_clineno = __LINE__; goto __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/src/sparse.pyx":280 * * # 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/src/sparse.pyx":281 * # 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/src/sparse.pyx":283 * self.lenbuf = self.blengths.data * * self.length = length # <<<<<<<<<<<<<< * self.nblocks = len(self.blocs) * self.npoints = self.blengths.sum() */ __pyx_t_6 = __Pyx_PyIndex_AsSsize_t(__pyx_v_length); if (unlikely((__pyx_t_6 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 283; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_self->length = __pyx_t_6; /* "pandas/src/sparse.pyx":284 * * self.length = length * self.nblocks = len(self.blocs) # <<<<<<<<<<<<<< * self.npoints = self.blengths.sum() * */ __pyx_t_4 = ((PyObject *)__pyx_v_self->blocs); __Pyx_INCREF(__pyx_t_4); __pyx_t_6 = PyObject_Length(__pyx_t_4); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 284; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_self->nblocks = __pyx_t_6; /* "pandas/src/sparse.pyx":285 * self.length = length * self.nblocks = len(self.blocs) * self.npoints = self.blengths.sum() # <<<<<<<<<<<<<< * * # self.block_start = blocs */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->blengths), __pyx_n_s_sum); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 285; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_1 = PyObject_Call(__pyx_t_4, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 285; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_6 = __Pyx_PyIndex_AsSsize_t(__pyx_t_1); if (unlikely((__pyx_t_6 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 285; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_self->npoints = __pyx_t_6; /* "pandas/src/sparse.pyx":290 * # self.block_end = blocs + blengths * * self.check_integrity() # <<<<<<<<<<<<<< * * def __reduce__(self): */ __pyx_t_1 = ((struct __pyx_vtabstruct_6pandas_7_sparse_BlockIndex *)__pyx_v_self->__pyx_vtab)->check_integrity(__pyx_v_self, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 290; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/sparse.pyx":274 * int32_t* locbuf, *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._sparse.BlockIndex.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/sparse.pyx":292 * self.check_integrity() * * def __reduce__(self): # <<<<<<<<<<<<<< * args = (self.length, self.blocs, self.blengths) * return (BlockIndex, args) */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_7_sparse_10BlockIndex_3__reduce__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static PyObject *__pyx_pw_6pandas_7_sparse_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_7_sparse_10BlockIndex_2__reduce__(((struct __pyx_obj_6pandas_7_sparse_BlockIndex *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_7_sparse_10BlockIndex_2__reduce__(struct __pyx_obj_6pandas_7_sparse_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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__reduce__", 0); /* "pandas/src/sparse.pyx":293 * * def __reduce__(self): * args = (self.length, self.blocs, self.blengths) # <<<<<<<<<<<<<< * return (BlockIndex, args) * */ __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_self->length); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 293; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 293; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)__pyx_v_self->blocs)); PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)__pyx_v_self->blocs)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self->blocs)); __Pyx_INCREF(((PyObject *)__pyx_v_self->blengths)); PyTuple_SET_ITEM(__pyx_t_2, 2, ((PyObject *)__pyx_v_self->blengths)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self->blengths)); __pyx_t_1 = 0; __pyx_v_args = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/sparse.pyx":294 * 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_filename = __pyx_f[0]; __pyx_lineno = 294; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(((PyObject *)((PyObject*)__pyx_ptype_6pandas_7_sparse_BlockIndex))); PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)((PyObject*)__pyx_ptype_6pandas_7_sparse_BlockIndex))); __Pyx_GIVEREF(((PyObject *)((PyObject*)__pyx_ptype_6pandas_7_sparse_BlockIndex))); __Pyx_INCREF(__pyx_v_args); PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_args); __Pyx_GIVEREF(__pyx_v_args); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "pandas/src/sparse.pyx":292 * 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._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/src/sparse.pyx":296 * return (BlockIndex, args) * * def __repr__(self): # <<<<<<<<<<<<<< * output = 'BlockIndex\n' * output += 'Block locations: %s\n' % repr(self.blocs) */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_7_sparse_10BlockIndex_5__repr__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6pandas_7_sparse_10BlockIndex_5__repr__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_7_sparse_10BlockIndex_4__repr__(((struct __pyx_obj_6pandas_7_sparse_BlockIndex *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_7_sparse_10BlockIndex_4__repr__(struct __pyx_obj_6pandas_7_sparse_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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__repr__", 0); /* "pandas/src/sparse.pyx":297 * * 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/src/sparse.pyx":298 * 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_filename = __pyx_f[0]; __pyx_lineno = 298; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 298; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 298; __pyx_clineno = __LINE__; goto __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/src/sparse.pyx":299 * 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_filename = __pyx_f[0]; __pyx_lineno = 299; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 299; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 299; __pyx_clineno = __LINE__; goto __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/src/sparse.pyx":301 * 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/src/sparse.pyx":296 * 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._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/src/sparse.pyx":304 * * @property * def ngaps(self): # <<<<<<<<<<<<<< * return self.length - self.npoints * */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_7_sparse_10BlockIndex_7ngaps(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static PyObject *__pyx_pw_6pandas_7_sparse_10BlockIndex_7ngaps(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("ngaps (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_7_sparse_10BlockIndex_6ngaps(((struct __pyx_obj_6pandas_7_sparse_BlockIndex *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_7_sparse_10BlockIndex_6ngaps(struct __pyx_obj_6pandas_7_sparse_BlockIndex *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("ngaps", 0); /* "pandas/src/sparse.pyx":305 * @property * def ngaps(self): * return self.length - self.npoints # <<<<<<<<<<<<<< * * cpdef check_integrity(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_filename = __pyx_f[0]; __pyx_lineno = 305; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "pandas/src/sparse.pyx":304 * * @property * def ngaps(self): # <<<<<<<<<<<<<< * return self.length - self.npoints * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas._sparse.BlockIndex.ngaps", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/sparse.pyx":307 * return self.length - self.npoints * * cpdef check_integrity(self): # <<<<<<<<<<<<<< * ''' * Check: */ static PyObject *__pyx_pw_6pandas_7_sparse_10BlockIndex_9check_integrity(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static PyObject *__pyx_f_6pandas_7_sparse_10BlockIndex_check_integrity(struct __pyx_obj_6pandas_7_sparse_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; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; Py_ssize_t __pyx_t_7; Py_ssize_t __pyx_t_8; int __pyx_t_9; Py_ssize_t __pyx_t_10; Py_ssize_t __pyx_t_11; Py_ssize_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_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __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_filename = __pyx_f[0]; __pyx_lineno = 307; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_6pandas_7_sparse_10BlockIndex_9check_integrity)) { __Pyx_XDECREF(__pyx_r); __pyx_t_2 = PyObject_Call(__pyx_t_1, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 307; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } /* "pandas/src/sparse.pyx":318 * 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_3 = __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_3 < 0)) { PyErr_Fetch(&__pyx_t_4, &__pyx_t_5, &__pyx_t_6); 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_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_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_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 318; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_blocs = ((PyArrayObject *)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/sparse.pyx":319 * * 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_3 = __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_3 < 0)) { PyErr_Fetch(&__pyx_t_6, &__pyx_t_5, &__pyx_t_4); 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_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_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_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 319; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_blengths = ((PyArrayObject *)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/sparse.pyx":321 * blengths = self.blengths * * if len(blocs) != len(blengths): # <<<<<<<<<<<<<< * raise ValueError('block bound arrays must be same length') * */ __pyx_t_7 = PyObject_Length(((PyObject *)__pyx_v_blocs)); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 321; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_8 = PyObject_Length(((PyObject *)__pyx_v_blengths)); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 321; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_9 = ((__pyx_t_7 != __pyx_t_8) != 0); if (__pyx_t_9) { /* "pandas/src/sparse.pyx":322 * * if len(blocs) != len(blengths): * raise ValueError('block bound arrays must be same length') # <<<<<<<<<<<<<< * * for i from 0 <= i < self.nblocks: */ __pyx_t_1 = PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__3, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 322; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 322; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } /* "pandas/src/sparse.pyx":324 * 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_8 = __pyx_v_self->nblocks; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_8; __pyx_v_i++) { /* "pandas/src/sparse.pyx":325 * * 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_9 = ((__pyx_v_i > 0) != 0); if (__pyx_t_9) { /* "pandas/src/sparse.pyx":326 * 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_7 = __pyx_v_i; __pyx_t_3 = -1; if (__pyx_t_7 < 0) { __pyx_t_7 += __pyx_pybuffernd_blocs.diminfo[0].shape; if (unlikely(__pyx_t_7 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_7 >= __pyx_pybuffernd_blocs.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 326; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_10 = (__pyx_v_i - 1); __pyx_t_3 = -1; if (__pyx_t_10 < 0) { __pyx_t_10 += __pyx_pybuffernd_blocs.diminfo[0].shape; if (unlikely(__pyx_t_10 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_10 >= __pyx_pybuffernd_blocs.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 326; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_9 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_blocs.rcbuffer->pybuffer.buf, __pyx_t_7, __pyx_pybuffernd_blocs.diminfo[0].strides)) <= (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_blocs.rcbuffer->pybuffer.buf, __pyx_t_10, __pyx_pybuffernd_blocs.diminfo[0].strides))) != 0); if (__pyx_t_9) { /* "pandas/src/sparse.pyx":327 * if i > 0: * if blocs[i] <= blocs[i-1]: * raise ValueError('Locations not in ascending order') # <<<<<<<<<<<<<< * * if i < self.nblocks - 1: */ __pyx_t_1 = PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__4, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 327; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 327; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } goto __pyx_L6; } __pyx_L6:; /* "pandas/src/sparse.pyx":329 * 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_9 = ((__pyx_v_i < (__pyx_v_self->nblocks - 1)) != 0); if (__pyx_t_9) { /* "pandas/src/sparse.pyx":330 * * if i < self.nblocks - 1: * if blocs[i] + blengths[i] > blocs[i + 1]: # <<<<<<<<<<<<<< * raise ValueError('Block %d overlaps' % i) * else: */ __pyx_t_11 = __pyx_v_i; __pyx_t_3 = -1; if (__pyx_t_11 < 0) { __pyx_t_11 += __pyx_pybuffernd_blocs.diminfo[0].shape; if (unlikely(__pyx_t_11 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_11 >= __pyx_pybuffernd_blocs.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 330; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_12 = __pyx_v_i; __pyx_t_3 = -1; if (__pyx_t_12 < 0) { __pyx_t_12 += __pyx_pybuffernd_blengths.diminfo[0].shape; if (unlikely(__pyx_t_12 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_12 >= __pyx_pybuffernd_blengths.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 330; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_13 = (__pyx_v_i + 1); __pyx_t_3 = -1; if (__pyx_t_13 < 0) { __pyx_t_13 += __pyx_pybuffernd_blocs.diminfo[0].shape; if (unlikely(__pyx_t_13 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_13 >= __pyx_pybuffernd_blocs.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 330; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_9 = ((((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_blocs.rcbuffer->pybuffer.buf, __pyx_t_11, __pyx_pybuffernd_blocs.diminfo[0].strides)) + (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_blengths.rcbuffer->pybuffer.buf, __pyx_t_12, __pyx_pybuffernd_blengths.diminfo[0].strides))) > (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_blocs.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_blocs.diminfo[0].strides))) != 0); if (__pyx_t_9) { /* "pandas/src/sparse.pyx":331 * 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_filename = __pyx_f[0]; __pyx_lineno = 331; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 331; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 331; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 331; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 331; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } goto __pyx_L8; } /*else*/ { /* "pandas/src/sparse.pyx":333 * raise ValueError('Block %d overlaps' % i) * else: * if blocs[i] + blengths[i] > self.length: # <<<<<<<<<<<<<< * raise ValueError('Block %d extends beyond end' % i) * */ __pyx_t_14 = __pyx_v_i; __pyx_t_3 = -1; if (__pyx_t_14 < 0) { __pyx_t_14 += __pyx_pybuffernd_blocs.diminfo[0].shape; if (unlikely(__pyx_t_14 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_14 >= __pyx_pybuffernd_blocs.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 333; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_15 = __pyx_v_i; __pyx_t_3 = -1; if (__pyx_t_15 < 0) { __pyx_t_15 += __pyx_pybuffernd_blengths.diminfo[0].shape; if (unlikely(__pyx_t_15 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_15 >= __pyx_pybuffernd_blengths.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 333; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_9 = ((((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_blocs.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_blocs.diminfo[0].strides)) + (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_blengths.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_blengths.diminfo[0].strides))) > __pyx_v_self->length) != 0); if (__pyx_t_9) { /* "pandas/src/sparse.pyx":334 * else: * if blocs[i] + blengths[i] > self.length: * raise ValueError('Block %d extends beyond end' % i) # <<<<<<<<<<<<<< * * # no zero-length blocks */ __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_i); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 334; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_Block_d_extends_beyond_end, __pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 334; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 334; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyObject_Call(__pyx_builtin_ValueError, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 334; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 334; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } } __pyx_L8:; /* "pandas/src/sparse.pyx":337 * * # no zero-length blocks * if blengths[i] == 0: # <<<<<<<<<<<<<< * raise ValueError('Zero-length block %d' % i) * */ __pyx_t_16 = __pyx_v_i; __pyx_t_3 = -1; if (__pyx_t_16 < 0) { __pyx_t_16 += __pyx_pybuffernd_blengths.diminfo[0].shape; if (unlikely(__pyx_t_16 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_16 >= __pyx_pybuffernd_blengths.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 337; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_9 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_blengths.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_blengths.diminfo[0].strides)) == 0) != 0); if (__pyx_t_9) { /* "pandas/src/sparse.pyx":338 * # 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_filename = __pyx_f[0]; __pyx_lineno = 338; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 338; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 338; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 338; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 338; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } } /* "pandas/src/sparse.pyx":307 * 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); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __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._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_7_sparse_10BlockIndex_9check_integrity(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_6pandas_7_sparse_10BlockIndex_8check_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_7_sparse_10BlockIndex_9check_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_7_sparse_10BlockIndex_8check_integrity(((struct __pyx_obj_6pandas_7_sparse_BlockIndex *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_7_sparse_10BlockIndex_8check_integrity(struct __pyx_obj_6pandas_7_sparse_BlockIndex *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("check_integrity", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = ((struct __pyx_vtabstruct_6pandas_7_sparse_BlockIndex *)__pyx_v_self->__pyx_vtab)->check_integrity(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 307; __pyx_clineno = __LINE__; goto __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._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/src/sparse.pyx":340 * 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_7_sparse_10BlockIndex_11equals(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/ static PyObject *__pyx_pw_6pandas_7_sparse_10BlockIndex_11equals(PyObject *__pyx_v_self, PyObject *__pyx_v_other) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("equals (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_7_sparse_10BlockIndex_10equals(((struct __pyx_obj_6pandas_7_sparse_BlockIndex *)__pyx_v_self), ((PyObject *)__pyx_v_other)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_7_sparse_10BlockIndex_10equals(struct __pyx_obj_6pandas_7_sparse_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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("equals", 0); /* "pandas/src/sparse.pyx":341 * * def equals(self, other): * if not isinstance(other, BlockIndex): # <<<<<<<<<<<<<< * return False * */ __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_other, ((PyObject*)__pyx_ptype_6pandas_7_sparse_BlockIndex)); __pyx_t_2 = ((!(__pyx_t_1 != 0)) != 0); if (__pyx_t_2) { /* "pandas/src/sparse.pyx":342 * 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/src/sparse.pyx":344 * 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/src/sparse.pyx":345 * * 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/src/sparse.pyx":347 * 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 = PyInt_FromSsize_t(__pyx_v_self->length); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 347; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 347; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 347; __pyx_clineno = __LINE__; goto __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/src/sparse.pyx":348 * * 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_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 348; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_array_equal); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 348; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_other, __pyx_n_s_blocs); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 348; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 348; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(((PyObject *)__pyx_v_self->blocs)); PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_v_self->blocs)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self->blocs)); PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyObject_Call(__pyx_t_4, __pyx_t_3, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 348; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 348; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__pyx_t_1) { __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "pandas/src/sparse.pyx":349 * 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_filename = __pyx_f[0]; __pyx_lineno = 349; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_array_equal); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 349; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_other, __pyx_n_s_blengths); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 349; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 349; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(((PyObject *)__pyx_v_self->blengths)); PyTuple_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_v_self->blengths)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self->blengths)); PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyObject_Call(__pyx_t_4, __pyx_t_6, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 349; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = __pyx_t_3; __pyx_t_3 = 0; } else { __pyx_t_6 = __pyx_t_5; __pyx_t_5 = 0; } __pyx_v_same_blocks = __pyx_t_6; __pyx_t_6 = 0; /* "pandas/src/sparse.pyx":350 * 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_filename = __pyx_f[0]; __pyx_lineno = 350; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__pyx_t_1) { __Pyx_INCREF(__pyx_v_same_blocks); __pyx_t_6 = __pyx_v_same_blocks; } else { __Pyx_INCREF(__pyx_v_same_length); __pyx_t_6 = __pyx_v_same_length; } __pyx_r = __pyx_t_6; __pyx_t_6 = 0; goto __pyx_L0; /* "pandas/src/sparse.pyx":340 * 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_AddTraceback("pandas._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/src/sparse.pyx":352 * return same_length and same_blocks * * def to_block_index(self): # <<<<<<<<<<<<<< * return self * */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_7_sparse_10BlockIndex_13to_block_index(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static PyObject *__pyx_pw_6pandas_7_sparse_10BlockIndex_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_7_sparse_10BlockIndex_12to_block_index(((struct __pyx_obj_6pandas_7_sparse_BlockIndex *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_7_sparse_10BlockIndex_12to_block_index(struct __pyx_obj_6pandas_7_sparse_BlockIndex *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("to_block_index", 0); /* "pandas/src/sparse.pyx":353 * * 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/src/sparse.pyx":352 * 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/src/sparse.pyx":355 * return self * * def to_int_index(self): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i = 0, j, b */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_7_sparse_10BlockIndex_15to_int_index(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static PyObject *__pyx_pw_6pandas_7_sparse_10BlockIndex_15to_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_7_sparse_10BlockIndex_14to_int_index(((struct __pyx_obj_6pandas_7_sparse_BlockIndex *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_7_sparse_10BlockIndex_14to_int_index(struct __pyx_obj_6pandas_7_sparse_BlockIndex *__pyx_v_self) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_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; Py_ssize_t __pyx_t_11; __pyx_t_5numpy_int32_t __pyx_t_12; Py_ssize_t __pyx_t_13; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __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/src/sparse.pyx":357 * def to_int_index(self): * cdef: * Py_ssize_t i = 0, j, b # <<<<<<<<<<<<<< * int32_t offset * ndarray[int32_t, ndim=1] indices */ __pyx_v_i = 0; /* "pandas/src/sparse.pyx":361 * 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_filename = __pyx_f[0]; __pyx_lineno = 361; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 361; __pyx_clineno = __LINE__; goto __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_self->npoints); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 361; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 361; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 361; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 361; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 361; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 361; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyObject_Call(__pyx_t_2, __pyx_t_3, __pyx_t_1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 361; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 361; __pyx_clineno = __LINE__; goto __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_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_filename = __pyx_f[0]; __pyx_lineno = 361; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_6 = 0; __pyx_v_indices = ((PyArrayObject *)__pyx_t_5); __pyx_t_5 = 0; /* "pandas/src/sparse.pyx":363 * 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/src/sparse.pyx":364 * * 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/src/sparse.pyx":366 * 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/src/sparse.pyx":367 * * 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_filename = __pyx_f[0]; __pyx_lineno = 367; __pyx_clineno = __LINE__; goto __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/src/sparse.pyx":368 * 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/src/sparse.pyx":370 * i += 1 * * return IntIndex(self.length, indices) # <<<<<<<<<<<<<< * * cpdef BlockIndex intersect(self, SparseIndex other): */ __Pyx_XDECREF(__pyx_r); __pyx_t_5 = PyInt_FromSsize_t(__pyx_v_self->length); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 370; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 370; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __Pyx_INCREF(((PyObject *)__pyx_v_indices)); PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject *)__pyx_v_indices)); __Pyx_GIVEREF(((PyObject *)__pyx_v_indices)); __pyx_t_5 = 0; __pyx_t_5 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_6pandas_7_sparse_IntIndex)), __pyx_t_1, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 370; __pyx_clineno = __LINE__; goto __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/src/sparse.pyx":355 * return self * * def to_int_index(self): # <<<<<<<<<<<<<< * cdef: * Py_ssize_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_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._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/src/sparse.pyx":372 * return IntIndex(self.length, indices) * * cpdef BlockIndex intersect(self, SparseIndex other): # <<<<<<<<<<<<<< * ''' * Intersect two BlockIndex objects */ static PyObject *__pyx_pw_6pandas_7_sparse_10BlockIndex_17intersect(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/ static struct __pyx_obj_6pandas_7_sparse_BlockIndex *__pyx_f_6pandas_7_sparse_10BlockIndex_intersect(struct __pyx_obj_6pandas_7_sparse_BlockIndex *__pyx_v_self, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_other, int __pyx_skip_dispatch) { struct __pyx_obj_6pandas_7_sparse_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; PyObject *__pyx_v_out_blocs = 0; PyObject *__pyx_v_out_blengths = 0; Py_ssize_t __pyx_v_xi; Py_ssize_t __pyx_v_yi; __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_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_7_sparse_BlockIndex *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_t_4; int __pyx_t_5; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; int __pyx_t_9; int __pyx_t_10; Py_ssize_t __pyx_t_11; Py_ssize_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; 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; int __pyx_t_29; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __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; /* 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_filename = __pyx_f[0]; __pyx_lineno = 372; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_6pandas_7_sparse_10BlockIndex_17intersect)) { __Pyx_XDECREF(((PyObject *)__pyx_r)); __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 372; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(((PyObject *)__pyx_v_other)); PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_other)); __Pyx_GIVEREF(((PyObject *)__pyx_v_other)); __pyx_t_3 = PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 372; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_6pandas_7_sparse_BlockIndex))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 372; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = ((struct __pyx_obj_6pandas_7_sparse_BlockIndex *)__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } /* "pandas/src/sparse.pyx":387 * ndarray[int32_t, ndim=1] xloc, xlen, yloc, ylen * * list out_blocs = [] # <<<<<<<<<<<<<< * list out_blengths = [] * */ __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 387; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_v_out_blocs = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/sparse.pyx":388 * * list out_blocs = [] * list out_blengths = [] # <<<<<<<<<<<<<< * * Py_ssize_t xi = 0, yi = 0 */ __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 388; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_v_out_blengths = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/sparse.pyx":390 * list out_blengths = [] * * Py_ssize_t xi = 0, yi = 0 # <<<<<<<<<<<<<< * int32_t cur_loc, cur_length, diff * */ __pyx_v_xi = 0; __pyx_v_yi = 0; /* "pandas/src/sparse.pyx":393 * int32_t cur_loc, cur_length, diff * * y = other.to_block_index() # <<<<<<<<<<<<<< * * if self.length != y.length: */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_other), __pyx_n_s_to_block_index); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 393; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = PyObject_Call(__pyx_t_1, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 393; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_6pandas_7_sparse_BlockIndex))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 393; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_y = ((struct __pyx_obj_6pandas_7_sparse_BlockIndex *)__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/sparse.pyx":395 * y = other.to_block_index() * * if self.length != y.length: # <<<<<<<<<<<<<< * raise Exception('Indices must reference same underlying length') * */ __pyx_t_4 = ((__pyx_v_self->length != __pyx_v_y->length) != 0); if (__pyx_t_4) { /* "pandas/src/sparse.pyx":396 * * if self.length != y.length: * raise Exception('Indices must reference same underlying length') # <<<<<<<<<<<<<< * * xloc = self.blocs */ __pyx_t_3 = PyObject_Call(__pyx_builtin_Exception, __pyx_tuple__5, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 396; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 396; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } /* "pandas/src/sparse.pyx":398 * raise Exception('Indices must reference same underlying length') * * xloc = self.blocs # <<<<<<<<<<<<<< * xlen = self.blengths * yloc = y.blocs */ __pyx_t_3 = ((PyObject *)__pyx_v_self->blocs); __Pyx_INCREF(__pyx_t_3); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_xloc.rcbuffer->pybuffer); __pyx_t_5 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_xloc.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_3), &__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_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_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_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_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 398; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_xloc = ((PyArrayObject *)__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/sparse.pyx":399 * * xloc = self.blocs * xlen = self.blengths # <<<<<<<<<<<<<< * yloc = y.blocs * ylen = y.blengths */ __pyx_t_3 = ((PyObject *)__pyx_v_self->blengths); __Pyx_INCREF(__pyx_t_3); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_xlen.rcbuffer->pybuffer); __pyx_t_5 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_xlen.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_3), &__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_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_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_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_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 399; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_xlen = ((PyArrayObject *)__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/sparse.pyx":400 * xloc = self.blocs * xlen = self.blengths * yloc = y.blocs # <<<<<<<<<<<<<< * ylen = y.blengths * */ __pyx_t_3 = ((PyObject *)__pyx_v_y->blocs); __Pyx_INCREF(__pyx_t_3); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_yloc.rcbuffer->pybuffer); __pyx_t_5 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_yloc.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_3), &__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_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_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_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_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 400; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_yloc = ((PyArrayObject *)__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/sparse.pyx":401 * xlen = self.blengths * yloc = y.blocs * ylen = y.blengths # <<<<<<<<<<<<<< * * while True: */ __pyx_t_3 = ((PyObject *)__pyx_v_y->blengths); __Pyx_INCREF(__pyx_t_3); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_ylen.rcbuffer->pybuffer); __pyx_t_5 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_ylen.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_3), &__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_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_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_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_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 401; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_ylen = ((PyArrayObject *)__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/sparse.pyx":403 * ylen = y.blengths * * while True: # <<<<<<<<<<<<<< * # we are done (or possibly never began) * if xi >= self.nblocks or yi >= y.nblocks: */ while (1) { /* "pandas/src/sparse.pyx":405 * while True: * # we are done (or possibly never began) * if xi >= self.nblocks or yi >= y.nblocks: # <<<<<<<<<<<<<< * break * */ __pyx_t_4 = ((__pyx_v_xi >= __pyx_v_self->nblocks) != 0); if (!__pyx_t_4) { __pyx_t_9 = ((__pyx_v_yi >= __pyx_v_y->nblocks) != 0); __pyx_t_10 = __pyx_t_9; } else { __pyx_t_10 = __pyx_t_4; } if (__pyx_t_10) { /* "pandas/src/sparse.pyx":406 * # 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/src/sparse.pyx":409 * * # 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_11 = __pyx_v_xi; __pyx_t_5 = -1; if (__pyx_t_11 < 0) { __pyx_t_11 += __pyx_pybuffernd_xloc.diminfo[0].shape; if (unlikely(__pyx_t_11 < 0)) __pyx_t_5 = 0; } else if (unlikely(__pyx_t_11 >= __pyx_pybuffernd_xloc.diminfo[0].shape)) __pyx_t_5 = 0; if (unlikely(__pyx_t_5 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_5); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 409; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_12 = __pyx_v_yi; __pyx_t_5 = -1; if (__pyx_t_12 < 0) { __pyx_t_12 += __pyx_pybuffernd_yloc.diminfo[0].shape; if (unlikely(__pyx_t_12 < 0)) __pyx_t_5 = 0; } else if (unlikely(__pyx_t_12 >= __pyx_pybuffernd_yloc.diminfo[0].shape)) __pyx_t_5 = 0; if (unlikely(__pyx_t_5 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_5); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 409; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_10 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_xloc.rcbuffer->pybuffer.buf, __pyx_t_11, __pyx_pybuffernd_xloc.diminfo[0].strides)) >= (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_yloc.rcbuffer->pybuffer.buf, __pyx_t_12, __pyx_pybuffernd_yloc.diminfo[0].strides))) != 0); if (__pyx_t_10) { /* "pandas/src/sparse.pyx":410 * # 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_13 = __pyx_v_xi; __pyx_t_5 = -1; if (__pyx_t_13 < 0) { __pyx_t_13 += __pyx_pybuffernd_xloc.diminfo[0].shape; if (unlikely(__pyx_t_13 < 0)) __pyx_t_5 = 0; } else if (unlikely(__pyx_t_13 >= __pyx_pybuffernd_xloc.diminfo[0].shape)) __pyx_t_5 = 0; if (unlikely(__pyx_t_5 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_5); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 410; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_cur_loc = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_xloc.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_xloc.diminfo[0].strides)); /* "pandas/src/sparse.pyx":411 * if xloc[xi] >= yloc[yi]: * cur_loc = xloc[xi] * diff = xloc[xi] - yloc[yi] # <<<<<<<<<<<<<< * * if ylen[yi] <= diff: */ __pyx_t_14 = __pyx_v_xi; __pyx_t_5 = -1; if (__pyx_t_14 < 0) { __pyx_t_14 += __pyx_pybuffernd_xloc.diminfo[0].shape; if (unlikely(__pyx_t_14 < 0)) __pyx_t_5 = 0; } else if (unlikely(__pyx_t_14 >= __pyx_pybuffernd_xloc.diminfo[0].shape)) __pyx_t_5 = 0; if (unlikely(__pyx_t_5 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_5); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 411; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_15 = __pyx_v_yi; __pyx_t_5 = -1; if (__pyx_t_15 < 0) { __pyx_t_15 += __pyx_pybuffernd_yloc.diminfo[0].shape; if (unlikely(__pyx_t_15 < 0)) __pyx_t_5 = 0; } else if (unlikely(__pyx_t_15 >= __pyx_pybuffernd_yloc.diminfo[0].shape)) __pyx_t_5 = 0; if (unlikely(__pyx_t_5 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_5); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 411; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_diff = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_xloc.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_xloc.diminfo[0].strides)) - (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_yloc.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_yloc.diminfo[0].strides))); /* "pandas/src/sparse.pyx":413 * diff = xloc[xi] - yloc[yi] * * if ylen[yi] <= diff: # <<<<<<<<<<<<<< * # have to skip this block * yi += 1 */ __pyx_t_16 = __pyx_v_yi; __pyx_t_5 = -1; if (__pyx_t_16 < 0) { __pyx_t_16 += __pyx_pybuffernd_ylen.diminfo[0].shape; if (unlikely(__pyx_t_16 < 0)) __pyx_t_5 = 0; } else if (unlikely(__pyx_t_16 >= __pyx_pybuffernd_ylen.diminfo[0].shape)) __pyx_t_5 = 0; if (unlikely(__pyx_t_5 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_5); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 413; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_10 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_ylen.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_ylen.diminfo[0].strides)) <= __pyx_v_diff) != 0); if (__pyx_t_10) { /* "pandas/src/sparse.pyx":415 * if ylen[yi] <= diff: * # have to skip this block * yi += 1 # <<<<<<<<<<<<<< * continue * */ __pyx_v_yi = (__pyx_v_yi + 1); /* "pandas/src/sparse.pyx":416 * # have to skip this block * yi += 1 * continue # <<<<<<<<<<<<<< * * if ylen[yi] - diff < xlen[xi]: */ goto __pyx_L4_continue; } /* "pandas/src/sparse.pyx":418 * continue * * if ylen[yi] - diff < xlen[xi]: # <<<<<<<<<<<<<< * # take end of y block, move onward * cur_length = ylen[yi] - diff */ __pyx_t_17 = __pyx_v_yi; __pyx_t_5 = -1; if (__pyx_t_17 < 0) { __pyx_t_17 += __pyx_pybuffernd_ylen.diminfo[0].shape; if (unlikely(__pyx_t_17 < 0)) __pyx_t_5 = 0; } else if (unlikely(__pyx_t_17 >= __pyx_pybuffernd_ylen.diminfo[0].shape)) __pyx_t_5 = 0; if (unlikely(__pyx_t_5 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_5); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 418; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_18 = __pyx_v_xi; __pyx_t_5 = -1; if (__pyx_t_18 < 0) { __pyx_t_18 += __pyx_pybuffernd_xlen.diminfo[0].shape; if (unlikely(__pyx_t_18 < 0)) __pyx_t_5 = 0; } else if (unlikely(__pyx_t_18 >= __pyx_pybuffernd_xlen.diminfo[0].shape)) __pyx_t_5 = 0; if (unlikely(__pyx_t_5 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_5); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 418; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_10 = ((((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_ylen.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_ylen.diminfo[0].strides)) - __pyx_v_diff) < (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_xlen.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_xlen.diminfo[0].strides))) != 0); if (__pyx_t_10) { /* "pandas/src/sparse.pyx":420 * if ylen[yi] - diff < xlen[xi]: * # take end of y block, move onward * cur_length = ylen[yi] - diff # <<<<<<<<<<<<<< * yi += 1 * else: */ __pyx_t_19 = __pyx_v_yi; __pyx_t_5 = -1; if (__pyx_t_19 < 0) { __pyx_t_19 += __pyx_pybuffernd_ylen.diminfo[0].shape; if (unlikely(__pyx_t_19 < 0)) __pyx_t_5 = 0; } else if (unlikely(__pyx_t_19 >= __pyx_pybuffernd_ylen.diminfo[0].shape)) __pyx_t_5 = 0; if (unlikely(__pyx_t_5 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_5); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 420; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_cur_length = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_ylen.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_ylen.diminfo[0].strides)) - __pyx_v_diff); /* "pandas/src/sparse.pyx":421 * # 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); goto __pyx_L9; } /*else*/ { /* "pandas/src/sparse.pyx":424 * else: * # take end of x block * cur_length = xlen[xi] # <<<<<<<<<<<<<< * xi += 1 * */ __pyx_t_20 = __pyx_v_xi; __pyx_t_5 = -1; if (__pyx_t_20 < 0) { __pyx_t_20 += __pyx_pybuffernd_xlen.diminfo[0].shape; if (unlikely(__pyx_t_20 < 0)) __pyx_t_5 = 0; } else if (unlikely(__pyx_t_20 >= __pyx_pybuffernd_xlen.diminfo[0].shape)) __pyx_t_5 = 0; if (unlikely(__pyx_t_5 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_5); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 424; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_cur_length = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_xlen.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_xlen.diminfo[0].strides)); /* "pandas/src/sparse.pyx":425 * # take end of x block * cur_length = xlen[xi] * xi += 1 # <<<<<<<<<<<<<< * * else: # xloc[xi] < yloc[yi] */ __pyx_v_xi = (__pyx_v_xi + 1); } __pyx_L9:; goto __pyx_L7; } /*else*/ { /* "pandas/src/sparse.pyx":428 * * else: # xloc[xi] < yloc[yi] * cur_loc = yloc[yi] # <<<<<<<<<<<<<< * diff = yloc[yi] - xloc[xi] * */ __pyx_t_21 = __pyx_v_yi; __pyx_t_5 = -1; if (__pyx_t_21 < 0) { __pyx_t_21 += __pyx_pybuffernd_yloc.diminfo[0].shape; if (unlikely(__pyx_t_21 < 0)) __pyx_t_5 = 0; } else if (unlikely(__pyx_t_21 >= __pyx_pybuffernd_yloc.diminfo[0].shape)) __pyx_t_5 = 0; if (unlikely(__pyx_t_5 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_5); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 428; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_cur_loc = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_yloc.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_yloc.diminfo[0].strides)); /* "pandas/src/sparse.pyx":429 * else: # xloc[xi] < yloc[yi] * cur_loc = yloc[yi] * diff = yloc[yi] - xloc[xi] # <<<<<<<<<<<<<< * * if xlen[xi] <= diff: */ __pyx_t_22 = __pyx_v_yi; __pyx_t_5 = -1; if (__pyx_t_22 < 0) { __pyx_t_22 += __pyx_pybuffernd_yloc.diminfo[0].shape; if (unlikely(__pyx_t_22 < 0)) __pyx_t_5 = 0; } else if (unlikely(__pyx_t_22 >= __pyx_pybuffernd_yloc.diminfo[0].shape)) __pyx_t_5 = 0; if (unlikely(__pyx_t_5 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_5); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 429; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_23 = __pyx_v_xi; __pyx_t_5 = -1; if (__pyx_t_23 < 0) { __pyx_t_23 += __pyx_pybuffernd_xloc.diminfo[0].shape; if (unlikely(__pyx_t_23 < 0)) __pyx_t_5 = 0; } else if (unlikely(__pyx_t_23 >= __pyx_pybuffernd_xloc.diminfo[0].shape)) __pyx_t_5 = 0; if (unlikely(__pyx_t_5 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_5); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 429; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_diff = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_yloc.rcbuffer->pybuffer.buf, __pyx_t_22, __pyx_pybuffernd_yloc.diminfo[0].strides)) - (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_xloc.rcbuffer->pybuffer.buf, __pyx_t_23, __pyx_pybuffernd_xloc.diminfo[0].strides))); /* "pandas/src/sparse.pyx":431 * diff = yloc[yi] - xloc[xi] * * if xlen[xi] <= diff: # <<<<<<<<<<<<<< * # have to skip this block * xi += 1 */ __pyx_t_24 = __pyx_v_xi; __pyx_t_5 = -1; if (__pyx_t_24 < 0) { __pyx_t_24 += __pyx_pybuffernd_xlen.diminfo[0].shape; if (unlikely(__pyx_t_24 < 0)) __pyx_t_5 = 0; } else if (unlikely(__pyx_t_24 >= __pyx_pybuffernd_xlen.diminfo[0].shape)) __pyx_t_5 = 0; if (unlikely(__pyx_t_5 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_5); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 431; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_10 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_xlen.rcbuffer->pybuffer.buf, __pyx_t_24, __pyx_pybuffernd_xlen.diminfo[0].strides)) <= __pyx_v_diff) != 0); if (__pyx_t_10) { /* "pandas/src/sparse.pyx":433 * if xlen[xi] <= diff: * # have to skip this block * xi += 1 # <<<<<<<<<<<<<< * continue * */ __pyx_v_xi = (__pyx_v_xi + 1); /* "pandas/src/sparse.pyx":434 * # have to skip this block * xi += 1 * continue # <<<<<<<<<<<<<< * * if xlen[xi] - diff < ylen[yi]: */ goto __pyx_L4_continue; } /* "pandas/src/sparse.pyx":436 * continue * * if xlen[xi] - diff < ylen[yi]: # <<<<<<<<<<<<<< * # take end of x block, move onward * cur_length = xlen[xi] - diff */ __pyx_t_25 = __pyx_v_xi; __pyx_t_5 = -1; if (__pyx_t_25 < 0) { __pyx_t_25 += __pyx_pybuffernd_xlen.diminfo[0].shape; if (unlikely(__pyx_t_25 < 0)) __pyx_t_5 = 0; } else if (unlikely(__pyx_t_25 >= __pyx_pybuffernd_xlen.diminfo[0].shape)) __pyx_t_5 = 0; if (unlikely(__pyx_t_5 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_5); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 436; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_26 = __pyx_v_yi; __pyx_t_5 = -1; if (__pyx_t_26 < 0) { __pyx_t_26 += __pyx_pybuffernd_ylen.diminfo[0].shape; if (unlikely(__pyx_t_26 < 0)) __pyx_t_5 = 0; } else if (unlikely(__pyx_t_26 >= __pyx_pybuffernd_ylen.diminfo[0].shape)) __pyx_t_5 = 0; if (unlikely(__pyx_t_5 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_5); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 436; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_10 = ((((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_xlen.rcbuffer->pybuffer.buf, __pyx_t_25, __pyx_pybuffernd_xlen.diminfo[0].strides)) - __pyx_v_diff) < (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_ylen.rcbuffer->pybuffer.buf, __pyx_t_26, __pyx_pybuffernd_ylen.diminfo[0].strides))) != 0); if (__pyx_t_10) { /* "pandas/src/sparse.pyx":438 * if xlen[xi] - diff < ylen[yi]: * # take end of x block, move onward * cur_length = xlen[xi] - diff # <<<<<<<<<<<<<< * xi += 1 * else: */ __pyx_t_27 = __pyx_v_xi; __pyx_t_5 = -1; if (__pyx_t_27 < 0) { __pyx_t_27 += __pyx_pybuffernd_xlen.diminfo[0].shape; if (unlikely(__pyx_t_27 < 0)) __pyx_t_5 = 0; } else if (unlikely(__pyx_t_27 >= __pyx_pybuffernd_xlen.diminfo[0].shape)) __pyx_t_5 = 0; if (unlikely(__pyx_t_5 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_5); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 438; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_cur_length = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_xlen.rcbuffer->pybuffer.buf, __pyx_t_27, __pyx_pybuffernd_xlen.diminfo[0].strides)) - __pyx_v_diff); /* "pandas/src/sparse.pyx":439 * # 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); goto __pyx_L11; } /*else*/ { /* "pandas/src/sparse.pyx":442 * else: * # take end of y block * cur_length = ylen[yi] # <<<<<<<<<<<<<< * yi += 1 * */ __pyx_t_28 = __pyx_v_yi; __pyx_t_5 = -1; if (__pyx_t_28 < 0) { __pyx_t_28 += __pyx_pybuffernd_ylen.diminfo[0].shape; if (unlikely(__pyx_t_28 < 0)) __pyx_t_5 = 0; } else if (unlikely(__pyx_t_28 >= __pyx_pybuffernd_ylen.diminfo[0].shape)) __pyx_t_5 = 0; if (unlikely(__pyx_t_5 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_5); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 442; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_cur_length = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_ylen.rcbuffer->pybuffer.buf, __pyx_t_28, __pyx_pybuffernd_ylen.diminfo[0].strides)); /* "pandas/src/sparse.pyx":443 * # take end of y block * cur_length = ylen[yi] * yi += 1 # <<<<<<<<<<<<<< * * out_blocs.append(cur_loc) */ __pyx_v_yi = (__pyx_v_yi + 1); } __pyx_L11:; } __pyx_L7:; /* "pandas/src/sparse.pyx":445 * yi += 1 * * out_blocs.append(cur_loc) # <<<<<<<<<<<<<< * out_blengths.append(cur_length) * */ __pyx_t_3 = __Pyx_PyInt_From_npy_int32(__pyx_v_cur_loc); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 445; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_29 = __Pyx_PyList_Append(__pyx_v_out_blocs, __pyx_t_3); if (unlikely(__pyx_t_29 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 445; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/sparse.pyx":446 * * out_blocs.append(cur_loc) * out_blengths.append(cur_length) # <<<<<<<<<<<<<< * * return BlockIndex(self.length, out_blocs, out_blengths) */ __pyx_t_3 = __Pyx_PyInt_From_npy_int32(__pyx_v_cur_length); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 446; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_29 = __Pyx_PyList_Append(__pyx_v_out_blengths, __pyx_t_3); if (unlikely(__pyx_t_29 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 446; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_L4_continue:; } __pyx_L5_break:; /* "pandas/src/sparse.pyx":448 * out_blengths.append(cur_length) * * return BlockIndex(self.length, out_blocs, out_blengths) # <<<<<<<<<<<<<< * * cpdef BlockIndex make_union(self, SparseIndex y): */ __Pyx_XDECREF(((PyObject *)__pyx_r)); __pyx_t_3 = PyInt_FromSsize_t(__pyx_v_self->length); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 448; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 448; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __Pyx_INCREF(__pyx_v_out_blocs); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_out_blocs); __Pyx_GIVEREF(__pyx_v_out_blocs); __Pyx_INCREF(__pyx_v_out_blengths); PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_out_blengths); __Pyx_GIVEREF(__pyx_v_out_blengths); __pyx_t_3 = 0; __pyx_t_3 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_6pandas_7_sparse_BlockIndex)), __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 448; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = ((struct __pyx_obj_6pandas_7_sparse_BlockIndex *)__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L0; /* "pandas/src/sparse.pyx":372 * 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); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __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._sparse.BlockIndex.intersect", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; goto __pyx_L2; __pyx_L0:; __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(__pyx_v_out_blocs); __Pyx_XDECREF(__pyx_v_out_blengths); __Pyx_XGIVEREF((PyObject *)__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_7_sparse_10BlockIndex_17intersect(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/ static char __pyx_doc_6pandas_7_sparse_10BlockIndex_16intersect[] = "\n Intersect two BlockIndex objects\n\n Parameters\n ----------\n\n Returns\n -------\n intersection : BlockIndex\n "; static PyObject *__pyx_pw_6pandas_7_sparse_10BlockIndex_17intersect(PyObject *__pyx_v_self, PyObject *__pyx_v_other) { CYTHON_UNUSED int __pyx_lineno = 0; CYTHON_UNUSED const char *__pyx_filename = NULL; CYTHON_UNUSED int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("intersect (wrapper)", 0); if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_other), __pyx_ptype_6pandas_7_sparse_SparseIndex, 1, "other", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 372; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_7_sparse_10BlockIndex_16intersect(((struct __pyx_obj_6pandas_7_sparse_BlockIndex *)__pyx_v_self), ((struct __pyx_obj_6pandas_7_sparse_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_7_sparse_10BlockIndex_16intersect(struct __pyx_obj_6pandas_7_sparse_BlockIndex *__pyx_v_self, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_other) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("intersect", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_6pandas_7_sparse_BlockIndex *)__pyx_v_self->__pyx_vtab)->intersect(__pyx_v_self, __pyx_v_other, 1)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 372; __pyx_clineno = __LINE__; goto __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._sparse.BlockIndex.intersect", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/sparse.pyx":450 * return BlockIndex(self.length, out_blocs, out_blengths) * * cpdef BlockIndex make_union(self, SparseIndex y): # <<<<<<<<<<<<<< * ''' * Combine together two BlockIndex objects, accepting indices if contained */ static PyObject *__pyx_pw_6pandas_7_sparse_10BlockIndex_19make_union(PyObject *__pyx_v_self, PyObject *__pyx_v_y); /*proto*/ static struct __pyx_obj_6pandas_7_sparse_BlockIndex *__pyx_f_6pandas_7_sparse_10BlockIndex_make_union(struct __pyx_obj_6pandas_7_sparse_BlockIndex *__pyx_v_self, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_y, int __pyx_skip_dispatch) { struct __pyx_obj_6pandas_7_sparse_BlockIndex *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("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_filename = __pyx_f[0]; __pyx_lineno = 450; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_6pandas_7_sparse_10BlockIndex_19make_union)) { __Pyx_XDECREF(((PyObject *)__pyx_r)); __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 450; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(((PyObject *)__pyx_v_y)); PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_y)); __Pyx_GIVEREF(((PyObject *)__pyx_v_y)); __pyx_t_3 = PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 450; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_6pandas_7_sparse_BlockIndex))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 450; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = ((struct __pyx_obj_6pandas_7_sparse_BlockIndex *)__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } /* "pandas/src/sparse.pyx":467 * union : BlockIndex * ''' * return BlockUnion(self, y.to_block_index()).result # <<<<<<<<<<<<<< * * cpdef lookup(self, Py_ssize_t index): */ __Pyx_XDECREF(((PyObject *)__pyx_r)); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_y), __pyx_n_s_to_block_index); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 467; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = PyObject_Call(__pyx_t_1, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 467; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 467; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)__pyx_v_self)); PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_self)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self)); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_6pandas_7_sparse_BlockUnion)), __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 467; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_INCREF(((PyObject *)((struct __pyx_obj_6pandas_7_sparse_BlockUnion *)__pyx_t_3)->__pyx_base.result)); __pyx_r = ((struct __pyx_obj_6pandas_7_sparse_BlockUnion *)__pyx_t_3)->__pyx_base.result; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L0; /* "pandas/src/sparse.pyx":450 * return BlockIndex(self.length, out_blocs, out_blengths) * * 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_AddTraceback("pandas._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_7_sparse_10BlockIndex_19make_union(PyObject *__pyx_v_self, PyObject *__pyx_v_y); /*proto*/ static char __pyx_doc_6pandas_7_sparse_10BlockIndex_18make_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_7_sparse_10BlockIndex_19make_union(PyObject *__pyx_v_self, PyObject *__pyx_v_y) { CYTHON_UNUSED int __pyx_lineno = 0; CYTHON_UNUSED const char *__pyx_filename = NULL; CYTHON_UNUSED int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("make_union (wrapper)", 0); if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_y), __pyx_ptype_6pandas_7_sparse_SparseIndex, 1, "y", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 450; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_7_sparse_10BlockIndex_18make_union(((struct __pyx_obj_6pandas_7_sparse_BlockIndex *)__pyx_v_self), ((struct __pyx_obj_6pandas_7_sparse_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_7_sparse_10BlockIndex_18make_union(struct __pyx_obj_6pandas_7_sparse_BlockIndex *__pyx_v_self, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_y) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("make_union", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_6pandas_7_sparse_BlockIndex *)__pyx_v_self->__pyx_vtab)->make_union(__pyx_v_self, __pyx_v_y, 1)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 450; __pyx_clineno = __LINE__; goto __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._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/src/sparse.pyx":469 * return BlockUnion(self, y.to_block_index()).result * * cpdef lookup(self, Py_ssize_t index): # <<<<<<<<<<<<<< * ''' * */ static PyObject *__pyx_pw_6pandas_7_sparse_10BlockIndex_21lookup(PyObject *__pyx_v_self, PyObject *__pyx_arg_index); /*proto*/ static PyObject *__pyx_f_6pandas_7_sparse_10BlockIndex_lookup(struct __pyx_obj_6pandas_7_sparse_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; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_t_4; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; int __pyx_t_8; long __pyx_t_9; Py_ssize_t __pyx_t_10; Py_ssize_t __pyx_t_11; Py_ssize_t __pyx_t_12; Py_ssize_t __pyx_t_13; int __pyx_t_14; int __pyx_t_15; Py_ssize_t __pyx_t_16; Py_ssize_t __pyx_t_17; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __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_filename = __pyx_f[0]; __pyx_lineno = 469; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_6pandas_7_sparse_10BlockIndex_21lookup)) { __Pyx_XDECREF(__pyx_r); __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_index); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 469; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 469; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_Call(__pyx_t_1, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 469; __pyx_clineno = __LINE__; goto __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/src/sparse.pyx":478 * 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_4 = __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_4 < 0)) { PyErr_Fetch(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7); 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_5); Py_XDECREF(__pyx_t_6); Py_XDECREF(__pyx_t_7); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_5, __pyx_t_6, __pyx_t_7); } } __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_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 478; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_locs = ((PyArrayObject *)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/sparse.pyx":479 * * 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_4 = __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_4 < 0)) { PyErr_Fetch(&__pyx_t_7, &__pyx_t_6, &__pyx_t_5); 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_7); Py_XDECREF(__pyx_t_6); Py_XDECREF(__pyx_t_5); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_7, __pyx_t_6, __pyx_t_5); } } __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_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 479; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_lens = ((PyArrayObject *)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/sparse.pyx":481 * lens = self.blengths * * if self.nblocks == 0: # <<<<<<<<<<<<<< * return -1 * elif index < locs[0]: */ __pyx_t_8 = ((__pyx_v_self->nblocks == 0) != 0); if (__pyx_t_8) { /* "pandas/src/sparse.pyx":482 * * if self.nblocks == 0: * return -1 # <<<<<<<<<<<<<< * elif index < locs[0]: * return -1 */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_int_neg_1); __pyx_r = __pyx_int_neg_1; goto __pyx_L0; } /* "pandas/src/sparse.pyx":483 * if self.nblocks == 0: * return -1 * elif index < locs[0]: # <<<<<<<<<<<<<< * return -1 * */ __pyx_t_9 = 0; __pyx_t_4 = -1; if (__pyx_t_9 < 0) { __pyx_t_9 += __pyx_pybuffernd_locs.diminfo[0].shape; if (unlikely(__pyx_t_9 < 0)) __pyx_t_4 = 0; } else if (unlikely(__pyx_t_9 >= __pyx_pybuffernd_locs.diminfo[0].shape)) __pyx_t_4 = 0; if (unlikely(__pyx_t_4 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_4); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 483; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_8 = ((__pyx_v_index < (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_locs.rcbuffer->pybuffer.buf, __pyx_t_9, __pyx_pybuffernd_locs.diminfo[0].strides))) != 0); if (__pyx_t_8) { /* "pandas/src/sparse.pyx":484 * return -1 * elif index < locs[0]: * return -1 # <<<<<<<<<<<<<< * * cum_len = 0 */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_int_neg_1); __pyx_r = __pyx_int_neg_1; goto __pyx_L0; } /* "pandas/src/sparse.pyx":486 * 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/src/sparse.pyx":487 * * 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_10 = __pyx_v_self->nblocks; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_10; __pyx_v_i++) { /* "pandas/src/sparse.pyx":488 * 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_11 = __pyx_v_i; __pyx_t_4 = -1; if (__pyx_t_11 < 0) { __pyx_t_11 += __pyx_pybuffernd_locs.diminfo[0].shape; if (unlikely(__pyx_t_11 < 0)) __pyx_t_4 = 0; } else if (unlikely(__pyx_t_11 >= __pyx_pybuffernd_locs.diminfo[0].shape)) __pyx_t_4 = 0; if (unlikely(__pyx_t_4 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_4); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 488; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_8 = ((__pyx_v_index >= (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_locs.rcbuffer->pybuffer.buf, __pyx_t_11, __pyx_pybuffernd_locs.diminfo[0].strides))) != 0); if (__pyx_t_8) { __pyx_t_12 = __pyx_v_i; __pyx_t_4 = -1; if (__pyx_t_12 < 0) { __pyx_t_12 += __pyx_pybuffernd_locs.diminfo[0].shape; if (unlikely(__pyx_t_12 < 0)) __pyx_t_4 = 0; } else if (unlikely(__pyx_t_12 >= __pyx_pybuffernd_locs.diminfo[0].shape)) __pyx_t_4 = 0; if (unlikely(__pyx_t_4 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_4); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 488; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_13 = __pyx_v_i; __pyx_t_4 = -1; if (__pyx_t_13 < 0) { __pyx_t_13 += __pyx_pybuffernd_lens.diminfo[0].shape; if (unlikely(__pyx_t_13 < 0)) __pyx_t_4 = 0; } else if (unlikely(__pyx_t_13 >= __pyx_pybuffernd_lens.diminfo[0].shape)) __pyx_t_4 = 0; if (unlikely(__pyx_t_4 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_4); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 488; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_14 = ((__pyx_v_index < ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_locs.rcbuffer->pybuffer.buf, __pyx_t_12, __pyx_pybuffernd_locs.diminfo[0].strides)) + (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_lens.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_lens.diminfo[0].strides)))) != 0); __pyx_t_15 = __pyx_t_14; } else { __pyx_t_15 = __pyx_t_8; } if (__pyx_t_15) { /* "pandas/src/sparse.pyx":489 * 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_XDECREF(__pyx_r); __pyx_t_16 = __pyx_v_i; __pyx_t_4 = -1; if (__pyx_t_16 < 0) { __pyx_t_16 += __pyx_pybuffernd_locs.diminfo[0].shape; if (unlikely(__pyx_t_16 < 0)) __pyx_t_4 = 0; } else if (unlikely(__pyx_t_16 >= __pyx_pybuffernd_locs.diminfo[0].shape)) __pyx_t_4 = 0; if (unlikely(__pyx_t_4 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_4); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 489; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_1 = PyInt_FromSsize_t(((__pyx_v_cum_len + __pyx_v_index) - (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_locs.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_locs.diminfo[0].strides)))); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 489; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; } /* "pandas/src/sparse.pyx":490 * if index >= locs[i] and index < locs[i] + lens[i]: * return cum_len + index - locs[i] * cum_len += lens[i] # <<<<<<<<<<<<<< * * return -1 */ __pyx_t_17 = __pyx_v_i; __pyx_t_4 = -1; if (__pyx_t_17 < 0) { __pyx_t_17 += __pyx_pybuffernd_lens.diminfo[0].shape; if (unlikely(__pyx_t_17 < 0)) __pyx_t_4 = 0; } else if (unlikely(__pyx_t_17 >= __pyx_pybuffernd_lens.diminfo[0].shape)) __pyx_t_4 = 0; if (unlikely(__pyx_t_4 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_4); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 490; __pyx_clineno = __LINE__; goto __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_17, __pyx_pybuffernd_lens.diminfo[0].strides))); } /* "pandas/src/sparse.pyx":492 * cum_len += lens[i] * * return -1 # <<<<<<<<<<<<<< * * cpdef ndarray reindex(self, ndarray[float64_t, ndim=1] values, */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_int_neg_1); __pyx_r = __pyx_int_neg_1; goto __pyx_L0; /* "pandas/src/sparse.pyx":469 * return BlockUnion(self, y.to_block_index()).result * * cpdef lookup(self, Py_ssize_t index): # <<<<<<<<<<<<<< * ''' * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __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_AddTraceback("pandas._sparse.BlockIndex.lookup", __pyx_clineno, __pyx_lineno, __pyx_filename); __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_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_7_sparse_10BlockIndex_21lookup(PyObject *__pyx_v_self, PyObject *__pyx_arg_index); /*proto*/ static char __pyx_doc_6pandas_7_sparse_10BlockIndex_20lookup[] = "\n\n Returns -1 if not found\n "; static PyObject *__pyx_pw_6pandas_7_sparse_10BlockIndex_21lookup(PyObject *__pyx_v_self, PyObject *__pyx_arg_index) { Py_ssize_t __pyx_v_index; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; 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_filename = __pyx_f[0]; __pyx_lineno = 469; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; __Pyx_AddTraceback("pandas._sparse.BlockIndex.lookup", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pandas_7_sparse_10BlockIndex_20lookup(((struct __pyx_obj_6pandas_7_sparse_BlockIndex *)__pyx_v_self), ((Py_ssize_t)__pyx_v_index)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_7_sparse_10BlockIndex_20lookup(struct __pyx_obj_6pandas_7_sparse_BlockIndex *__pyx_v_self, Py_ssize_t __pyx_v_index) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("lookup", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = ((struct __pyx_vtabstruct_6pandas_7_sparse_BlockIndex *)__pyx_v_self->__pyx_vtab)->lookup(__pyx_v_self, __pyx_v_index, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 469; __pyx_clineno = __LINE__; goto __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._sparse.BlockIndex.lookup", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/sparse.pyx":494 * return -1 * * cpdef ndarray reindex(self, ndarray[float64_t, ndim=1] values, # <<<<<<<<<<<<<< * float64_t fill_value, SparseIndex other_): * cdef: */ static PyObject *__pyx_pw_6pandas_7_sparse_10BlockIndex_23reindex(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyArrayObject *__pyx_f_6pandas_7_sparse_10BlockIndex_reindex(struct __pyx_obj_6pandas_7_sparse_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_7_sparse_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_7_sparse_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; 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; PyArrayObject *__pyx_t_10 = NULL; Py_ssize_t __pyx_t_11; Py_ssize_t __pyx_t_12; Py_ssize_t __pyx_t_13; Py_ssize_t __pyx_t_14; Py_ssize_t __pyx_t_15; int __pyx_t_16; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __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_filename = __pyx_f[0]; __pyx_lineno = 494; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 494; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_6pandas_7_sparse_10BlockIndex_23reindex)) { __Pyx_XDECREF(((PyObject *)__pyx_r)); __pyx_t_2 = PyFloat_FromDouble(__pyx_v_fill_value); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 494; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 494; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(((PyObject *)__pyx_v_values)); PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_v_values)); __Pyx_GIVEREF(((PyObject *)__pyx_v_values)); PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __Pyx_INCREF(((PyObject *)__pyx_v_other_)); PyTuple_SET_ITEM(__pyx_t_3, 2, ((PyObject *)__pyx_v_other_)); __Pyx_GIVEREF(((PyObject *)__pyx_v_other_)); __pyx_t_2 = 0; __pyx_t_2 = PyObject_Call(__pyx_t_1, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 494; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __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_filename = __pyx_f[0]; __pyx_lineno = 494; __pyx_clineno = __LINE__; goto __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/src/sparse.pyx":497 * 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/src/sparse.pyx":502 * ndarray[int32_t, ndim=1] slocs, slens, olocs, olens * * other = other_.to_block_index() # <<<<<<<<<<<<<< * * olocs = other.blocs */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_other_), __pyx_n_s_to_block_index); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 502; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyObject_Call(__pyx_t_1, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 502; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_6pandas_7_sparse_BlockIndex))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 502; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_other = ((struct __pyx_obj_6pandas_7_sparse_BlockIndex *)__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/sparse.pyx":504 * other = other_.to_block_index() * * olocs = other.blocs # <<<<<<<<<<<<<< * olens = other.blengths * slocs = self.blocs */ __pyx_t_2 = ((PyObject *)__pyx_v_other->blocs); __Pyx_INCREF(__pyx_t_2); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_olocs.rcbuffer->pybuffer); __pyx_t_4 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_olocs.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_4 < 0)) { PyErr_Fetch(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7); 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_5); Py_XDECREF(__pyx_t_6); Py_XDECREF(__pyx_t_7); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_5, __pyx_t_6, __pyx_t_7); } } __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_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 504; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_olocs = ((PyArrayObject *)__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/sparse.pyx":505 * * olocs = other.blocs * olens = other.blengths # <<<<<<<<<<<<<< * slocs = self.blocs * slens = self.blengths */ __pyx_t_2 = ((PyObject *)__pyx_v_other->blengths); __Pyx_INCREF(__pyx_t_2); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_olens.rcbuffer->pybuffer); __pyx_t_4 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_olens.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_4 < 0)) { PyErr_Fetch(&__pyx_t_7, &__pyx_t_6, &__pyx_t_5); 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_7); Py_XDECREF(__pyx_t_6); Py_XDECREF(__pyx_t_5); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_7, __pyx_t_6, __pyx_t_5); } } __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_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 505; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_olens = ((PyArrayObject *)__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/sparse.pyx":506 * olocs = other.blocs * olens = other.blengths * slocs = self.blocs # <<<<<<<<<<<<<< * slens = self.blengths * */ __pyx_t_2 = ((PyObject *)__pyx_v_self->blocs); __Pyx_INCREF(__pyx_t_2); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_slocs.rcbuffer->pybuffer); __pyx_t_4 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_slocs.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_4 < 0)) { PyErr_Fetch(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7); 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_5); Py_XDECREF(__pyx_t_6); Py_XDECREF(__pyx_t_7); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_5, __pyx_t_6, __pyx_t_7); } } __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_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 506; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_slocs = ((PyArrayObject *)__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/sparse.pyx":507 * olens = other.blengths * slocs = self.blocs * slens = self.blengths # <<<<<<<<<<<<<< * * result = np.empty(other.npoints, dtype=np.float64) */ __pyx_t_2 = ((PyObject *)__pyx_v_self->blengths); __Pyx_INCREF(__pyx_t_2); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_slens.rcbuffer->pybuffer); __pyx_t_4 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_slens.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_4 < 0)) { PyErr_Fetch(&__pyx_t_7, &__pyx_t_6, &__pyx_t_5); 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_7); Py_XDECREF(__pyx_t_6); Py_XDECREF(__pyx_t_5); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_7, __pyx_t_6, __pyx_t_5); } } __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_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 507; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_slens = ((PyArrayObject *)__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/sparse.pyx":509 * slens = self.blengths * * result = np.empty(other.npoints, dtype=np.float64) # <<<<<<<<<<<<<< * * for 0 <= i < other.nblocks: */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 509; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_empty); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 509; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_other->npoints); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 509; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 509; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 509; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 509; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 509; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_dtype, __pyx_t_9) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 509; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_9 = PyObject_Call(__pyx_t_1, __pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 509; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (!(likely(((__pyx_t_9) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_9, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 509; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_10 = ((PyArrayObject *)__pyx_t_9); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __pyx_t_4 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_t_10, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_4 < 0)) { PyErr_Fetch(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7); 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_5); Py_XDECREF(__pyx_t_6); Py_XDECREF(__pyx_t_7); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_5, __pyx_t_6, __pyx_t_7); } } __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_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 509; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_10 = 0; __pyx_v_result = ((PyArrayObject *)__pyx_t_9); __pyx_t_9 = 0; /* "pandas/src/sparse.pyx":511 * result = np.empty(other.npoints, dtype=np.float64) * * for 0 <= i < other.nblocks: # <<<<<<<<<<<<<< * ocur = olocs[i] * ocurlen = olens[i] */ __pyx_t_11 = __pyx_v_other->nblocks; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_11; __pyx_v_i++) { /* "pandas/src/sparse.pyx":512 * * for 0 <= i < other.nblocks: * ocur = olocs[i] # <<<<<<<<<<<<<< * ocurlen = olens[i] * */ __pyx_t_12 = __pyx_v_i; __pyx_t_4 = -1; if (__pyx_t_12 < 0) { __pyx_t_12 += __pyx_pybuffernd_olocs.diminfo[0].shape; if (unlikely(__pyx_t_12 < 0)) __pyx_t_4 = 0; } else if (unlikely(__pyx_t_12 >= __pyx_pybuffernd_olocs.diminfo[0].shape)) __pyx_t_4 = 0; if (unlikely(__pyx_t_4 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_4); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 512; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_ocur = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_olocs.rcbuffer->pybuffer.buf, __pyx_t_12, __pyx_pybuffernd_olocs.diminfo[0].strides)); /* "pandas/src/sparse.pyx":513 * for 0 <= i < other.nblocks: * ocur = olocs[i] * ocurlen = olens[i] # <<<<<<<<<<<<<< * * while slocs[j] + slens[j] < ocur: */ __pyx_t_13 = __pyx_v_i; __pyx_t_4 = -1; if (__pyx_t_13 < 0) { __pyx_t_13 += __pyx_pybuffernd_olens.diminfo[0].shape; if (unlikely(__pyx_t_13 < 0)) __pyx_t_4 = 0; } else if (unlikely(__pyx_t_13 >= __pyx_pybuffernd_olens.diminfo[0].shape)) __pyx_t_4 = 0; if (unlikely(__pyx_t_4 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_4); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 513; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_ocurlen = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_olens.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_olens.diminfo[0].strides)); /* "pandas/src/sparse.pyx":515 * ocurlen = olens[i] * * while slocs[j] + slens[j] < ocur: # <<<<<<<<<<<<<< * j += 1 * */ while (1) { __pyx_t_14 = __pyx_v_j; __pyx_t_4 = -1; if (__pyx_t_14 < 0) { __pyx_t_14 += __pyx_pybuffernd_slocs.diminfo[0].shape; if (unlikely(__pyx_t_14 < 0)) __pyx_t_4 = 0; } else if (unlikely(__pyx_t_14 >= __pyx_pybuffernd_slocs.diminfo[0].shape)) __pyx_t_4 = 0; if (unlikely(__pyx_t_4 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_4); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 515; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_15 = __pyx_v_j; __pyx_t_4 = -1; if (__pyx_t_15 < 0) { __pyx_t_15 += __pyx_pybuffernd_slens.diminfo[0].shape; if (unlikely(__pyx_t_15 < 0)) __pyx_t_4 = 0; } else if (unlikely(__pyx_t_15 >= __pyx_pybuffernd_slens.diminfo[0].shape)) __pyx_t_4 = 0; if (unlikely(__pyx_t_4 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_4); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 515; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_16 = ((((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_slocs.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_slocs.diminfo[0].strides)) + (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_slens.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_slens.diminfo[0].strides))) < __pyx_v_ocur) != 0); if (!__pyx_t_16) break; /* "pandas/src/sparse.pyx":516 * * 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/src/sparse.pyx":494 * return -1 * * 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_8); __Pyx_XDECREF(__pyx_t_9); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __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._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_7_sparse_10BlockIndex_23reindex(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_6pandas_7_sparse_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_7_sparse_SparseIndex *__pyx_v_other_ = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 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); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_values)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_fill_value)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("reindex", 1, 3, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 494; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_other)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("reindex", 1, 3, 3, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 494; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "reindex") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 494; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 495; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_other_ = ((struct __pyx_obj_6pandas_7_sparse_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_filename = __pyx_f[0]; __pyx_lineno = 494; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas._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_filename = __pyx_f[0]; __pyx_lineno = 494; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_other_), __pyx_ptype_6pandas_7_sparse_SparseIndex, 1, "other_", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 495; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_7_sparse_10BlockIndex_22reindex(((struct __pyx_obj_6pandas_7_sparse_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_7_sparse_10BlockIndex_22reindex(struct __pyx_obj_6pandas_7_sparse_BlockIndex *__pyx_v_self, PyArrayObject *__pyx_v_values, __pyx_t_5numpy_float64_t __pyx_v_fill_value, struct __pyx_obj_6pandas_7_sparse_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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __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_filename = __pyx_f[0]; __pyx_lineno = 494; __pyx_clineno = __LINE__; goto __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 *)((struct __pyx_vtabstruct_6pandas_7_sparse_BlockIndex *)__pyx_v_self->__pyx_vtab)->reindex(__pyx_v_self, __pyx_v_values, __pyx_v_fill_value, __pyx_v_other_, 1)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 494; __pyx_clineno = __LINE__; goto __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_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._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/src/sparse.pyx":518 * 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_7_sparse_10BlockIndex_25put(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_6pandas_7_sparse_10BlockIndex_put(CYTHON_UNUSED struct __pyx_obj_6pandas_7_sparse_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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __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_filename = __pyx_f[0]; __pyx_lineno = 518; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 518; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 518; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_6pandas_7_sparse_10BlockIndex_25put)) { __Pyx_XDECREF(__pyx_r); __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 518; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(((PyObject *)__pyx_v_values)); PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_values)); __Pyx_GIVEREF(((PyObject *)__pyx_v_values)); __Pyx_INCREF(((PyObject *)__pyx_v_indices)); PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)__pyx_v_indices)); __Pyx_GIVEREF(((PyObject *)__pyx_v_indices)); __Pyx_INCREF(__pyx_v_to_put); PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_to_put); __Pyx_GIVEREF(__pyx_v_to_put); __pyx_t_3 = PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 518; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_3; __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } /* "pandas/src/sparse.pyx":520 * 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); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __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._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/src/sparse.pyx":518 * 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_7_sparse_10BlockIndex_25put(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_6pandas_7_sparse_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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 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); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_values)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_indices)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("put", 1, 3, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 518; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_to_put)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("put", 1, 3, 3, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 518; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "put") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 518; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 518; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas._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_filename = __pyx_f[0]; __pyx_lineno = 518; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_indices), __pyx_ptype_5numpy_ndarray, 1, "indices", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 519; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_7_sparse_10BlockIndex_24put(((struct __pyx_obj_6pandas_7_sparse_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_7_sparse_10BlockIndex_24put(struct __pyx_obj_6pandas_7_sparse_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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __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_filename = __pyx_f[0]; __pyx_lineno = 518; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 518; __pyx_clineno = __LINE__; goto __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 = ((struct __pyx_vtabstruct_6pandas_7_sparse_BlockIndex *)__pyx_v_self->__pyx_vtab)->put(__pyx_v_self, __pyx_v_values, __pyx_v_indices, __pyx_v_to_put, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 518; __pyx_clineno = __LINE__; goto __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_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._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/src/sparse.pyx":522 * pass * * cpdef take(self, ndarray[float64_t, ndim=1] values, # <<<<<<<<<<<<<< * ndarray[int32_t, ndim=1] indices): * pass */ static PyObject *__pyx_pw_6pandas_7_sparse_10BlockIndex_27take(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_6pandas_7_sparse_10BlockIndex_take(CYTHON_UNUSED struct __pyx_obj_6pandas_7_sparse_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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __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_filename = __pyx_f[0]; __pyx_lineno = 522; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 522; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 522; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_6pandas_7_sparse_10BlockIndex_27take)) { __Pyx_XDECREF(__pyx_r); __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 522; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(((PyObject *)__pyx_v_values)); PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_values)); __Pyx_GIVEREF(((PyObject *)__pyx_v_values)); __Pyx_INCREF(((PyObject *)__pyx_v_indices)); PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)__pyx_v_indices)); __Pyx_GIVEREF(((PyObject *)__pyx_v_indices)); __pyx_t_3 = PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 522; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_3; __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } /* "pandas/src/sparse.pyx":524 * 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); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __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._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/src/sparse.pyx":522 * pass * * cpdef take(self, ndarray[float64_t, ndim=1] values, # <<<<<<<<<<<<<< * ndarray[int32_t, ndim=1] indices): * pass */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_7_sparse_10BlockIndex_27take(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_6pandas_7_sparse_10BlockIndex_27take(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_values = 0; PyArrayObject *__pyx_v_indices = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 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); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_values)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_indices)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 522; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "take") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 522; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 522; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas._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_filename = __pyx_f[0]; __pyx_lineno = 522; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_indices), __pyx_ptype_5numpy_ndarray, 1, "indices", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 523; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_7_sparse_10BlockIndex_26take(((struct __pyx_obj_6pandas_7_sparse_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_7_sparse_10BlockIndex_26take(struct __pyx_obj_6pandas_7_sparse_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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __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_filename = __pyx_f[0]; __pyx_lineno = 522; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 522; __pyx_clineno = __LINE__; goto __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 = ((struct __pyx_vtabstruct_6pandas_7_sparse_BlockIndex *)__pyx_v_self->__pyx_vtab)->take(__pyx_v_self, __pyx_v_values, __pyx_v_indices, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 522; __pyx_clineno = __LINE__; goto __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_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._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/src/sparse.pyx":267 * ''' * cdef readonly: * Py_ssize_t nblocks, npoints, length # <<<<<<<<<<<<<< * ndarray blocs, blengths * */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_7_sparse_10BlockIndex_7nblocks_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6pandas_7_sparse_10BlockIndex_7nblocks_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_7_sparse_10BlockIndex_7nblocks___get__(((struct __pyx_obj_6pandas_7_sparse_BlockIndex *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_7_sparse_10BlockIndex_7nblocks___get__(struct __pyx_obj_6pandas_7_sparse_BlockIndex *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_self->nblocks); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 267; __pyx_clineno = __LINE__; goto __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._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_7_sparse_10BlockIndex_7npoints_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6pandas_7_sparse_10BlockIndex_7npoints_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_7_sparse_10BlockIndex_7npoints___get__(((struct __pyx_obj_6pandas_7_sparse_BlockIndex *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_7_sparse_10BlockIndex_7npoints___get__(struct __pyx_obj_6pandas_7_sparse_BlockIndex *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_self->npoints); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 267; __pyx_clineno = __LINE__; goto __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._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_7_sparse_10BlockIndex_6length_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6pandas_7_sparse_10BlockIndex_6length_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_7_sparse_10BlockIndex_6length___get__(((struct __pyx_obj_6pandas_7_sparse_BlockIndex *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_7_sparse_10BlockIndex_6length___get__(struct __pyx_obj_6pandas_7_sparse_BlockIndex *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_self->length); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 267; __pyx_clineno = __LINE__; goto __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._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/src/sparse.pyx":268 * cdef readonly: * Py_ssize_t nblocks, npoints, length * ndarray blocs, blengths # <<<<<<<<<<<<<< * * cdef: */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_7_sparse_10BlockIndex_5blocs_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6pandas_7_sparse_10BlockIndex_5blocs_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_7_sparse_10BlockIndex_5blocs___get__(((struct __pyx_obj_6pandas_7_sparse_BlockIndex *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_7_sparse_10BlockIndex_5blocs___get__(struct __pyx_obj_6pandas_7_sparse_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_7_sparse_10BlockIndex_8blengths_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6pandas_7_sparse_10BlockIndex_8blengths_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_7_sparse_10BlockIndex_8blengths___get__(((struct __pyx_obj_6pandas_7_sparse_BlockIndex *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_7_sparse_10BlockIndex_8blengths___get__(struct __pyx_obj_6pandas_7_sparse_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/src/sparse.pyx":537 * 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_7_sparse_10BlockMerge_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_pw_6pandas_7_sparse_10BlockMerge_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct __pyx_obj_6pandas_7_sparse_BlockIndex *__pyx_v_x = 0; struct __pyx_obj_6pandas_7_sparse_BlockIndex *__pyx_v_y = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 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); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_x)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_y)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 537; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 537; __pyx_clineno = __LINE__; goto __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_7_sparse_BlockIndex *)values[0]); __pyx_v_y = ((struct __pyx_obj_6pandas_7_sparse_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_filename = __pyx_f[0]; __pyx_lineno = 537; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas._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_7_sparse_BlockIndex, 1, "x", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 537; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_y), __pyx_ptype_6pandas_7_sparse_BlockIndex, 1, "y", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 537; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_7_sparse_10BlockMerge___init__(((struct __pyx_obj_6pandas_7_sparse_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_7_sparse_10BlockMerge___init__(struct __pyx_obj_6pandas_7_sparse_BlockMerge *__pyx_v_self, struct __pyx_obj_6pandas_7_sparse_BlockIndex *__pyx_v_x, struct __pyx_obj_6pandas_7_sparse_BlockIndex *__pyx_v_y) { int __pyx_r; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__init__", 0); /* "pandas/src/sparse.pyx":538 * * 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/src/sparse.pyx":539 * 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/src/sparse.pyx":541 * 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 (__pyx_t_1) { /* "pandas/src/sparse.pyx":542 * * if x.length != y.length: * raise Exception('Indices must reference same underlying length') # <<<<<<<<<<<<<< * * self.xstart = self.x.blocs */ __pyx_t_2 = PyObject_Call(__pyx_builtin_Exception, __pyx_tuple__6, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 542; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 542; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } /* "pandas/src/sparse.pyx":544 * 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/src/sparse.pyx":545 * * 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/src/sparse.pyx":547 * 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_filename = __pyx_f[0]; __pyx_lineno = 547; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 547; __pyx_clineno = __LINE__; goto __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/src/sparse.pyx":548 * * 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_filename = __pyx_f[0]; __pyx_lineno = 548; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 548; __pyx_clineno = __LINE__; goto __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/src/sparse.pyx":553 * # self.ylen = self.y.blengths * * self.xi = 0 # <<<<<<<<<<<<<< * self.yi = 0 * */ __pyx_v_self->xi = 0; /* "pandas/src/sparse.pyx":554 * * self.xi = 0 * self.yi = 0 # <<<<<<<<<<<<<< * * self.result = self._make_merged_blocks() */ __pyx_v_self->yi = 0; /* "pandas/src/sparse.pyx":556 * self.yi = 0 * * self.result = self._make_merged_blocks() # <<<<<<<<<<<<<< * * cdef _make_merged_blocks(self): */ __pyx_t_2 = ((struct __pyx_vtabstruct_6pandas_7_sparse_BlockMerge *)__pyx_v_self->__pyx_vtab)->_make_merged_blocks(__pyx_v_self); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 556; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_6pandas_7_sparse_BlockIndex))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 556; __pyx_clineno = __LINE__; goto __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_7_sparse_BlockIndex *)__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/sparse.pyx":537 * 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._sparse.BlockMerge.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/sparse.pyx":558 * self.result = self._make_merged_blocks() * * cdef _make_merged_blocks(self): # <<<<<<<<<<<<<< * raise NotImplementedError * */ static PyObject *__pyx_f_6pandas_7_sparse_10BlockMerge__make_merged_blocks(CYTHON_UNUSED struct __pyx_obj_6pandas_7_sparse_BlockMerge *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_make_merged_blocks", 0); /* "pandas/src/sparse.pyx":559 * * 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_filename = __pyx_f[0]; __pyx_lineno = 559; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/sparse.pyx":558 * self.result = self._make_merged_blocks() * * cdef _make_merged_blocks(self): # <<<<<<<<<<<<<< * raise NotImplementedError * */ /* function exit code */ __pyx_L1_error:; __Pyx_AddTraceback("pandas._sparse.BlockMerge._make_merged_blocks", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/sparse.pyx":561 * 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_7_sparse_10BlockMerge__set_current_indices(struct __pyx_obj_6pandas_7_sparse_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/src/sparse.pyx":562 * * 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/src/sparse.pyx":563 * 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/src/sparse.pyx":564 * if mode == 0: * self.xi = xi * self.yi = yi # <<<<<<<<<<<<<< * else: * self.xi = yi */ __pyx_v_self->yi = __pyx_v_yi; goto __pyx_L3; } /*else*/ { /* "pandas/src/sparse.pyx":566 * self.yi = yi * else: * self.xi = yi # <<<<<<<<<<<<<< * self.yi = xi * */ __pyx_v_self->xi = __pyx_v_yi; /* "pandas/src/sparse.pyx":567 * else: * self.xi = yi * self.yi = xi # <<<<<<<<<<<<<< * * cdef class BlockIntersection(BlockMerge): */ __pyx_v_self->yi = __pyx_v_xi; } __pyx_L3:; /* "pandas/src/sparse.pyx":561 * 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; } /* "pandas/src/sparse.pyx":581 * ''' * * cdef _make_merged_blocks(self): # <<<<<<<<<<<<<< * cdef: * ndarray[int32_t, ndim=1] xstart, xend, ystart, yend */ static PyObject *__pyx_f_6pandas_7_sparse_10BlockUnion__make_merged_blocks(struct __pyx_obj_6pandas_7_sparse_BlockUnion *__pyx_v_self) { 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_nstart; __pyx_t_5numpy_int32_t __pyx_v_nend; PyObject *__pyx_v_out_blocs = 0; PyObject *__pyx_v_out_blengths = 0; __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; int __pyx_t_6; int __pyx_t_7; int __pyx_t_8; __pyx_t_5numpy_int32_t __pyx_t_9; __pyx_t_5numpy_int32_t __pyx_t_10; __pyx_t_5numpy_int32_t __pyx_t_11; __pyx_t_5numpy_int32_t __pyx_t_12; __pyx_t_5numpy_int32_t __pyx_t_13; __pyx_t_5numpy_int32_t __pyx_t_14; __pyx_t_5numpy_int32_t __pyx_t_15; __pyx_t_5numpy_int32_t __pyx_t_16; __pyx_t_5numpy_int32_t __pyx_t_17; int __pyx_t_18; PyObject *__pyx_t_19 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __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; /* "pandas/src/sparse.pyx":585 * ndarray[int32_t, ndim=1] xstart, xend, ystart, yend * int32_t nstart, nend, diff * list out_blocs = [], out_blengths = [] # <<<<<<<<<<<<<< * * xstart = self.xstart */ __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 585; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_v_out_blocs = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 585; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_v_out_blengths = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/sparse.pyx":587 * list out_blocs = [], out_blengths = [] * * 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_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_filename = __pyx_f[0]; __pyx_lineno = 587; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_xstart = ((PyArrayObject *)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/sparse.pyx":588 * * 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_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_filename = __pyx_f[0]; __pyx_lineno = 588; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_xend = ((PyArrayObject *)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/sparse.pyx":589 * 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_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_filename = __pyx_f[0]; __pyx_lineno = 589; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_ystart = ((PyArrayObject *)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/sparse.pyx":590 * xend = self.xend * ystart = self.ystart * yend = self.yend # <<<<<<<<<<<<<< * * while True: */ __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_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_filename = __pyx_f[0]; __pyx_lineno = 590; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_yend = ((PyArrayObject *)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/sparse.pyx":592 * yend = self.yend * * while True: # <<<<<<<<<<<<<< * # we are done (or possibly never began) * if self.xi >= self.x.nblocks and self.yi >= self.y.nblocks: */ while (1) { /* "pandas/src/sparse.pyx":594 * 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_6 = ((__pyx_v_self->__pyx_base.xi >= __pyx_v_self->__pyx_base.x->nblocks) != 0); if (__pyx_t_6) { __pyx_t_7 = ((__pyx_v_self->__pyx_base.yi >= __pyx_v_self->__pyx_base.y->nblocks) != 0); __pyx_t_8 = __pyx_t_7; } else { __pyx_t_8 = __pyx_t_6; } if (__pyx_t_8) { /* "pandas/src/sparse.pyx":595 * # 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/src/sparse.pyx":596 * 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_8 = ((__pyx_v_self->__pyx_base.yi >= __pyx_v_self->__pyx_base.y->nblocks) != 0); if (__pyx_t_8) { /* "pandas/src/sparse.pyx":598 * 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_9 = __pyx_v_self->__pyx_base.xi; __pyx_t_2 = -1; if (__pyx_t_9 < 0) { __pyx_t_9 += __pyx_pybuffernd_xstart.diminfo[0].shape; if (unlikely(__pyx_t_9 < 0)) __pyx_t_2 = 0; } else if (unlikely(__pyx_t_9 >= __pyx_pybuffernd_xstart.diminfo[0].shape)) __pyx_t_2 = 0; if (unlikely(__pyx_t_2 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 598; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_nstart = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_xstart.rcbuffer->pybuffer.buf, __pyx_t_9, __pyx_pybuffernd_xstart.diminfo[0].strides)); /* "pandas/src/sparse.pyx":599 * # 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_10 = __pyx_v_self->__pyx_base.xi; __pyx_t_2 = -1; if (__pyx_t_10 < 0) { __pyx_t_10 += __pyx_pybuffernd_xend.diminfo[0].shape; if (unlikely(__pyx_t_10 < 0)) __pyx_t_2 = 0; } else if (unlikely(__pyx_t_10 >= __pyx_pybuffernd_xend.diminfo[0].shape)) __pyx_t_2 = 0; if (unlikely(__pyx_t_2 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 599; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_nend = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_xend.rcbuffer->pybuffer.buf, __pyx_t_10, __pyx_pybuffernd_xend.diminfo[0].strides)); /* "pandas/src/sparse.pyx":600 * 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); goto __pyx_L5; } /* "pandas/src/sparse.pyx":601 * 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_8 = ((__pyx_v_self->__pyx_base.xi >= __pyx_v_self->__pyx_base.x->nblocks) != 0); if (__pyx_t_8) { /* "pandas/src/sparse.pyx":603 * 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_11 = __pyx_v_self->__pyx_base.yi; __pyx_t_2 = -1; if (__pyx_t_11 < 0) { __pyx_t_11 += __pyx_pybuffernd_ystart.diminfo[0].shape; if (unlikely(__pyx_t_11 < 0)) __pyx_t_2 = 0; } else if (unlikely(__pyx_t_11 >= __pyx_pybuffernd_ystart.diminfo[0].shape)) __pyx_t_2 = 0; if (unlikely(__pyx_t_2 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 603; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_nstart = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_ystart.rcbuffer->pybuffer.buf, __pyx_t_11, __pyx_pybuffernd_ystart.diminfo[0].strides)); /* "pandas/src/sparse.pyx":604 * # through with x, just pass through y blocks * nstart = ystart[self.yi] * nend = yend[self.yi] # <<<<<<<<<<<<<< * self.yi += 1 * else: */ __pyx_t_12 = __pyx_v_self->__pyx_base.yi; __pyx_t_2 = -1; if (__pyx_t_12 < 0) { __pyx_t_12 += __pyx_pybuffernd_yend.diminfo[0].shape; if (unlikely(__pyx_t_12 < 0)) __pyx_t_2 = 0; } else if (unlikely(__pyx_t_12 >= __pyx_pybuffernd_yend.diminfo[0].shape)) __pyx_t_2 = 0; if (unlikely(__pyx_t_2 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 604; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_nend = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_yend.rcbuffer->pybuffer.buf, __pyx_t_12, __pyx_pybuffernd_yend.diminfo[0].strides)); /* "pandas/src/sparse.pyx":605 * 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); goto __pyx_L5; } /*else*/ { /* "pandas/src/sparse.pyx":608 * else: * # find end of new block * if xstart[self.xi] < ystart[self.yi]: # <<<<<<<<<<<<<< * nstart = xstart[self.xi] * nend = self._find_next_block_end(0) */ __pyx_t_13 = __pyx_v_self->__pyx_base.xi; __pyx_t_2 = -1; if (__pyx_t_13 < 0) { __pyx_t_13 += __pyx_pybuffernd_xstart.diminfo[0].shape; if (unlikely(__pyx_t_13 < 0)) __pyx_t_2 = 0; } else if (unlikely(__pyx_t_13 >= __pyx_pybuffernd_xstart.diminfo[0].shape)) __pyx_t_2 = 0; if (unlikely(__pyx_t_2 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 608; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_14 = __pyx_v_self->__pyx_base.yi; __pyx_t_2 = -1; if (__pyx_t_14 < 0) { __pyx_t_14 += __pyx_pybuffernd_ystart.diminfo[0].shape; if (unlikely(__pyx_t_14 < 0)) __pyx_t_2 = 0; } else if (unlikely(__pyx_t_14 >= __pyx_pybuffernd_ystart.diminfo[0].shape)) __pyx_t_2 = 0; if (unlikely(__pyx_t_2 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 608; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_8 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_xstart.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_xstart.diminfo[0].strides)) < (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_ystart.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_ystart.diminfo[0].strides))) != 0); if (__pyx_t_8) { /* "pandas/src/sparse.pyx":609 * # 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_15 = __pyx_v_self->__pyx_base.xi; __pyx_t_2 = -1; if (__pyx_t_15 < 0) { __pyx_t_15 += __pyx_pybuffernd_xstart.diminfo[0].shape; if (unlikely(__pyx_t_15 < 0)) __pyx_t_2 = 0; } else if (unlikely(__pyx_t_15 >= __pyx_pybuffernd_xstart.diminfo[0].shape)) __pyx_t_2 = 0; if (unlikely(__pyx_t_2 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 609; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_nstart = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_xstart.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_xstart.diminfo[0].strides)); /* "pandas/src/sparse.pyx":610 * 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_16 = ((struct __pyx_vtabstruct_6pandas_7_sparse_BlockUnion *)__pyx_v_self->__pyx_base.__pyx_vtab)->_find_next_block_end(__pyx_v_self, 0); if (unlikely(__pyx_t_16 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 610; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_nend = __pyx_t_16; goto __pyx_L6; } /*else*/ { /* "pandas/src/sparse.pyx":612 * nend = self._find_next_block_end(0) * else: * nstart = ystart[self.yi] # <<<<<<<<<<<<<< * nend = self._find_next_block_end(1) * */ __pyx_t_16 = __pyx_v_self->__pyx_base.yi; __pyx_t_2 = -1; if (__pyx_t_16 < 0) { __pyx_t_16 += __pyx_pybuffernd_ystart.diminfo[0].shape; if (unlikely(__pyx_t_16 < 0)) __pyx_t_2 = 0; } else if (unlikely(__pyx_t_16 >= __pyx_pybuffernd_ystart.diminfo[0].shape)) __pyx_t_2 = 0; if (unlikely(__pyx_t_2 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 612; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_nstart = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_ystart.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_ystart.diminfo[0].strides)); /* "pandas/src/sparse.pyx":613 * else: * nstart = ystart[self.yi] * nend = self._find_next_block_end(1) # <<<<<<<<<<<<<< * * out_blocs.append(nstart) */ __pyx_t_17 = ((struct __pyx_vtabstruct_6pandas_7_sparse_BlockUnion *)__pyx_v_self->__pyx_base.__pyx_vtab)->_find_next_block_end(__pyx_v_self, 1); if (unlikely(__pyx_t_17 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 613; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_nend = __pyx_t_17; } __pyx_L6:; } __pyx_L5:; /* "pandas/src/sparse.pyx":615 * nend = self._find_next_block_end(1) * * out_blocs.append(nstart) # <<<<<<<<<<<<<< * out_blengths.append(nend - nstart) * */ __pyx_t_1 = __Pyx_PyInt_From_npy_int32(__pyx_v_nstart); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 615; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_18 = __Pyx_PyList_Append(__pyx_v_out_blocs, __pyx_t_1); if (unlikely(__pyx_t_18 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 615; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/sparse.pyx":616 * * out_blocs.append(nstart) * out_blengths.append(nend - nstart) # <<<<<<<<<<<<<< * * return BlockIndex(self.x.length, out_blocs, out_blengths) */ __pyx_t_1 = __Pyx_PyInt_From_int((__pyx_v_nend - __pyx_v_nstart)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 616; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_18 = __Pyx_PyList_Append(__pyx_v_out_blengths, __pyx_t_1); if (unlikely(__pyx_t_18 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 616; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } __pyx_L4_break:; /* "pandas/src/sparse.pyx":618 * out_blengths.append(nend - nstart) * * return BlockIndex(self.x.length, out_blocs, out_blengths) # <<<<<<<<<<<<<< * * cdef int32_t _find_next_block_end(self, bint mode) except -1: */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_self->__pyx_base.x->length); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 618; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_19 = PyTuple_New(3); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 618; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_19); PyTuple_SET_ITEM(__pyx_t_19, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_out_blocs); PyTuple_SET_ITEM(__pyx_t_19, 1, __pyx_v_out_blocs); __Pyx_GIVEREF(__pyx_v_out_blocs); __Pyx_INCREF(__pyx_v_out_blengths); PyTuple_SET_ITEM(__pyx_t_19, 2, __pyx_v_out_blengths); __Pyx_GIVEREF(__pyx_v_out_blengths); __pyx_t_1 = 0; __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_6pandas_7_sparse_BlockIndex)), __pyx_t_19, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 618; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0; __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "pandas/src/sparse.pyx":581 * ''' * * cdef _make_merged_blocks(self): # <<<<<<<<<<<<<< * cdef: * ndarray[int32_t, ndim=1] xstart, xend, ystart, yend */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_19); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __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._sparse.BlockUnion._make_merged_blocks", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; 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_XDECREF(__pyx_v_out_blocs); __Pyx_XDECREF(__pyx_v_out_blengths); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/sparse.pyx":620 * return BlockIndex(self.x.length, out_blocs, out_blengths) * * 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_7_sparse_10BlockUnion__find_next_block_end(struct __pyx_obj_6pandas_7_sparse_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; __pyx_t_5numpy_int32_t __pyx_t_9; __pyx_t_5numpy_int32_t __pyx_t_10; int __pyx_t_11; int __pyx_t_12; __pyx_t_5numpy_int32_t __pyx_t_13; __pyx_t_5numpy_int32_t __pyx_t_14; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __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/src/sparse.pyx":631 * 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 (__pyx_t_1) { /* "pandas/src/sparse.pyx":632 * * if mode != 0 and mode != 1: * raise Exception('Mode must be 0 or 1') # <<<<<<<<<<<<<< * * # so symmetric code will work */ __pyx_t_2 = PyObject_Call(__pyx_builtin_Exception, __pyx_tuple__7, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 632; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 632; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } /* "pandas/src/sparse.pyx":635 * * # 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/src/sparse.pyx":636 * # 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_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_filename = __pyx_f[0]; __pyx_lineno = 636; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_xstart = ((PyArrayObject *)__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/sparse.pyx":637 * 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_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_filename = __pyx_f[0]; __pyx_lineno = 637; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_xend = ((PyArrayObject *)__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/sparse.pyx":638 * 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/src/sparse.pyx":640 * 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_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_filename = __pyx_f[0]; __pyx_lineno = 640; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_ystart = ((PyArrayObject *)__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/sparse.pyx":641 * * 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_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_filename = __pyx_f[0]; __pyx_lineno = 641; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_yend = ((PyArrayObject *)__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/sparse.pyx":642 * 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/src/sparse.pyx":643 * yend = self.yend * yi = self.yi * ynblocks = self.y.nblocks # <<<<<<<<<<<<<< * else: * xstart = self.ystart */ __pyx_t_8 = __pyx_v_self->__pyx_base.y->nblocks; __pyx_v_ynblocks = __pyx_t_8; goto __pyx_L4; } /*else*/ { /* "pandas/src/sparse.pyx":645 * ynblocks = self.y.nblocks * else: * xstart = self.ystart # <<<<<<<<<<<<<< * xend = self.yend * xi = 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_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_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_filename = __pyx_f[0]; __pyx_lineno = 645; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_xstart = ((PyArrayObject *)__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/sparse.pyx":646 * 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_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_filename = __pyx_f[0]; __pyx_lineno = 646; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_xend = ((PyArrayObject *)__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/sparse.pyx":647 * 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/src/sparse.pyx":649 * 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_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_filename = __pyx_f[0]; __pyx_lineno = 649; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_ystart = ((PyArrayObject *)__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/sparse.pyx":650 * * 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_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_filename = __pyx_f[0]; __pyx_lineno = 650; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_yend = ((PyArrayObject *)__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/sparse.pyx":651 * 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/src/sparse.pyx":652 * yend = self.xend * yi = self.xi * ynblocks = self.x.nblocks # <<<<<<<<<<<<<< * * nend = xend[xi] */ __pyx_t_8 = __pyx_v_self->__pyx_base.x->nblocks; __pyx_v_ynblocks = __pyx_t_8; } __pyx_L4:; /* "pandas/src/sparse.pyx":654 * ynblocks = self.x.nblocks * * nend = xend[xi] # <<<<<<<<<<<<<< * * # print 'here xi=%d, yi=%d, mode=%d, nend=%d' % (self.xi, self.yi, */ __pyx_t_7 = __pyx_v_xi; __pyx_t_3 = -1; if (__pyx_t_7 < 0) { __pyx_t_7 += __pyx_pybuffernd_xend.diminfo[0].shape; if (unlikely(__pyx_t_7 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_7 >= __pyx_pybuffernd_xend.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 654; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_nend = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_xend.rcbuffer->pybuffer.buf, __pyx_t_7, __pyx_pybuffernd_xend.diminfo[0].strides)); /* "pandas/src/sparse.pyx":660 * * # 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/src/sparse.pyx":661 * # 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_7_sparse_BlockUnion *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base._set_current_indices(((struct __pyx_obj_6pandas_7_sparse_BlockMerge *)__pyx_v_self), (__pyx_v_xi + 1), __pyx_v_yi, __pyx_v_mode); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 661; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/sparse.pyx":662 * 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/src/sparse.pyx":663 * 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_filename = __pyx_f[0]; __pyx_lineno = 663; __pyx_clineno = __LINE__; goto __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/src/sparse.pyx":665 * 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_7_sparse_BlockUnion *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base._set_current_indices(((struct __pyx_obj_6pandas_7_sparse_BlockMerge *)__pyx_v_self), (__pyx_v_xi + 1), __pyx_v_yi, __pyx_v_mode); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 665; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/sparse.pyx":666 * # 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; } /*else*/ { /* "pandas/src/sparse.pyx":668 * return nend * else: * while yi < ynblocks and nend > yend[yi]: # <<<<<<<<<<<<<< * yi += 1 * */ while (1) { __pyx_t_1 = ((__pyx_v_yi < __pyx_v_ynblocks) != 0); if (__pyx_t_1) { __pyx_t_10 = __pyx_v_yi; __pyx_t_3 = -1; if (__pyx_t_10 < 0) { __pyx_t_10 += __pyx_pybuffernd_yend.diminfo[0].shape; if (unlikely(__pyx_t_10 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_10 >= __pyx_pybuffernd_yend.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 668; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_11 = ((__pyx_v_nend > (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_yend.rcbuffer->pybuffer.buf, __pyx_t_10, __pyx_pybuffernd_yend.diminfo[0].strides))) != 0); __pyx_t_12 = __pyx_t_11; } else { __pyx_t_12 = __pyx_t_1; } if (!__pyx_t_12) break; /* "pandas/src/sparse.pyx":669 * 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/src/sparse.pyx":671 * yi += 1 * * self._set_current_indices(xi + 1, yi, mode) # <<<<<<<<<<<<<< * * if yi == ynblocks: */ __pyx_t_2 = ((struct __pyx_vtabstruct_6pandas_7_sparse_BlockUnion *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base._set_current_indices(((struct __pyx_obj_6pandas_7_sparse_BlockMerge *)__pyx_v_self), (__pyx_v_xi + 1), __pyx_v_yi, __pyx_v_mode); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 671; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/sparse.pyx":673 * self._set_current_indices(xi + 1, yi, mode) * * if yi == ynblocks: # <<<<<<<<<<<<<< * return nend * */ __pyx_t_12 = ((__pyx_v_yi == __pyx_v_ynblocks) != 0); if (__pyx_t_12) { /* "pandas/src/sparse.pyx":674 * * if yi == ynblocks: * return nend # <<<<<<<<<<<<<< * * if nend < ystart[yi]: */ __pyx_r = __pyx_v_nend; goto __pyx_L0; } /* "pandas/src/sparse.pyx":676 * return nend * * if nend < ystart[yi]: # <<<<<<<<<<<<<< * # we're done, return the block end * return nend */ __pyx_t_13 = __pyx_v_yi; __pyx_t_3 = -1; if (__pyx_t_13 < 0) { __pyx_t_13 += __pyx_pybuffernd_ystart.diminfo[0].shape; if (unlikely(__pyx_t_13 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_13 >= __pyx_pybuffernd_ystart.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 676; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_12 = ((__pyx_v_nend < (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_ystart.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_ystart.diminfo[0].strides))) != 0); if (__pyx_t_12) { /* "pandas/src/sparse.pyx":678 * 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; } /*else*/ { /* "pandas/src/sparse.pyx":682 * # merge blocks, continue searching * # this also catches the case where blocks * return self._find_next_block_end(1 - mode) # <<<<<<<<<<<<<< * * */ __pyx_t_14 = ((struct __pyx_vtabstruct_6pandas_7_sparse_BlockUnion *)__pyx_v_self->__pyx_base.__pyx_vtab)->_find_next_block_end(__pyx_v_self, (1 - __pyx_v_mode)); if (unlikely(__pyx_t_14 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 682; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_t_14; goto __pyx_L0; } } /* "pandas/src/sparse.pyx":620 * return BlockIndex(self.x.length, out_blocs, out_blengths) * * 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_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._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; } /* "pandas/src/sparse.pyx":690 * ctypedef float64_t (* double_func)(float64_t a, float64_t b) * * cdef inline tuple sparse_nancombine(ndarray x, SparseIndex xindex, # <<<<<<<<<<<<<< * ndarray y, SparseIndex yindex, * double_func op): */ static CYTHON_INLINE PyObject *__pyx_f_6pandas_7_sparse_sparse_nancombine(PyArrayObject *__pyx_v_x, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_xindex, PyArrayObject *__pyx_v_y, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_yindex, __pyx_t_6pandas_7_sparse_double_func __pyx_v_op) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("sparse_nancombine", 0); /* "pandas/src/sparse.pyx":694 * double_func op): * # faster to convert to IntIndex * return int_nanop(x, xindex.to_int_index(), # <<<<<<<<<<<<<< * y, yindex.to_int_index(), op) * */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_xindex), __pyx_n_s_to_int_index); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 694; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyObject_Call(__pyx_t_1, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 694; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_6pandas_7_sparse_IntIndex))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 694; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/sparse.pyx":695 * # faster to convert to IntIndex * return int_nanop(x, xindex.to_int_index(), * y, yindex.to_int_index(), op) # <<<<<<<<<<<<<< * * # if isinstance(xindex, BlockIndex): */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_yindex), __pyx_n_s_to_int_index); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 695; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = PyObject_Call(__pyx_t_1, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 695; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_6pandas_7_sparse_IntIndex))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 695; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/sparse.pyx":694 * double_func op): * # faster to convert to IntIndex * return int_nanop(x, xindex.to_int_index(), # <<<<<<<<<<<<<< * y, yindex.to_int_index(), op) * */ __pyx_t_1 = __pyx_f_6pandas_7_sparse_int_nanop(__pyx_v_x, ((struct __pyx_obj_6pandas_7_sparse_IntIndex *)__pyx_t_2), __pyx_v_y, ((struct __pyx_obj_6pandas_7_sparse_IntIndex *)__pyx_t_3), __pyx_v_op); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 694; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_r = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; /* "pandas/src/sparse.pyx":690 * ctypedef float64_t (* double_func)(float64_t a, float64_t b) * * cdef inline tuple sparse_nancombine(ndarray x, SparseIndex xindex, # <<<<<<<<<<<<<< * ndarray y, SparseIndex yindex, * double_func op): */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("pandas._sparse.sparse_nancombine", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/sparse.pyx":705 * * * cdef inline tuple sparse_combine(ndarray x, SparseIndex xindex, float64_t xfill, # <<<<<<<<<<<<<< * ndarray y, SparseIndex yindex, float64_t yfill, * double_func op): */ static CYTHON_INLINE PyObject *__pyx_f_6pandas_7_sparse_sparse_combine(PyArrayObject *__pyx_v_x, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_xindex, __pyx_t_5numpy_float64_t __pyx_v_xfill, PyArrayObject *__pyx_v_y, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_yindex, __pyx_t_5numpy_float64_t __pyx_v_yfill, __pyx_t_6pandas_7_sparse_double_func __pyx_v_op) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("sparse_combine", 0); /* "pandas/src/sparse.pyx":708 * ndarray y, SparseIndex yindex, float64_t yfill, * double_func op): * if isinstance(xindex, BlockIndex): # <<<<<<<<<<<<<< * return block_op(x, xindex.to_block_index(), xfill, * y, yindex.to_block_index(), yfill, op) */ __pyx_t_1 = __Pyx_TypeCheck(((PyObject *)__pyx_v_xindex), ((PyObject*)__pyx_ptype_6pandas_7_sparse_BlockIndex)); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { /* "pandas/src/sparse.pyx":709 * double_func op): * if isinstance(xindex, BlockIndex): * return block_op(x, xindex.to_block_index(), xfill, # <<<<<<<<<<<<<< * y, yindex.to_block_index(), yfill, op) * elif isinstance(xindex, IntIndex): */ __Pyx_XDECREF(__pyx_r); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_xindex), __pyx_n_s_to_block_index); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 709; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PyObject_Call(__pyx_t_3, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 709; __pyx_clineno = __LINE__; goto __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_7_sparse_BlockIndex))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 709; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/sparse.pyx":710 * if isinstance(xindex, BlockIndex): * return block_op(x, xindex.to_block_index(), xfill, * y, yindex.to_block_index(), yfill, op) # <<<<<<<<<<<<<< * elif isinstance(xindex, IntIndex): * return int_op(x, xindex.to_int_index(), xfill, */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_yindex), __pyx_n_s_to_block_index); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 710; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = PyObject_Call(__pyx_t_3, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 710; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_6pandas_7_sparse_BlockIndex))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 710; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/sparse.pyx":709 * double_func op): * if isinstance(xindex, BlockIndex): * return block_op(x, xindex.to_block_index(), xfill, # <<<<<<<<<<<<<< * y, yindex.to_block_index(), yfill, op) * elif isinstance(xindex, IntIndex): */ __pyx_t_3 = __pyx_f_6pandas_7_sparse_block_op(__pyx_v_x, ((struct __pyx_obj_6pandas_7_sparse_BlockIndex *)__pyx_t_4), __pyx_v_xfill, __pyx_v_y, ((struct __pyx_obj_6pandas_7_sparse_BlockIndex *)__pyx_t_5), __pyx_v_yfill, __pyx_v_op); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 709; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_r = ((PyObject*)__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L0; } /* "pandas/src/sparse.pyx":711 * return block_op(x, xindex.to_block_index(), xfill, * y, yindex.to_block_index(), yfill, op) * elif isinstance(xindex, IntIndex): # <<<<<<<<<<<<<< * return int_op(x, xindex.to_int_index(), xfill, * y, yindex.to_int_index(), yfill, op) */ __pyx_t_2 = __Pyx_TypeCheck(((PyObject *)__pyx_v_xindex), ((PyObject*)__pyx_ptype_6pandas_7_sparse_IntIndex)); __pyx_t_1 = (__pyx_t_2 != 0); if (__pyx_t_1) { /* "pandas/src/sparse.pyx":712 * y, yindex.to_block_index(), yfill, op) * elif isinstance(xindex, IntIndex): * return int_op(x, xindex.to_int_index(), xfill, # <<<<<<<<<<<<<< * y, yindex.to_int_index(), yfill, op) * */ __Pyx_XDECREF(__pyx_r); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_xindex), __pyx_n_s_to_int_index); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 712; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = PyObject_Call(__pyx_t_3, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 712; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_6pandas_7_sparse_IntIndex))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 712; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/sparse.pyx":713 * elif isinstance(xindex, IntIndex): * return int_op(x, xindex.to_int_index(), xfill, * y, yindex.to_int_index(), yfill, op) # <<<<<<<<<<<<<< * * # NaN-based arithmetic operation-- no handling of fill values */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_yindex), __pyx_n_s_to_int_index); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 713; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PyObject_Call(__pyx_t_3, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 713; __pyx_clineno = __LINE__; goto __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_7_sparse_IntIndex))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 713; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/sparse.pyx":712 * y, yindex.to_block_index(), yfill, op) * elif isinstance(xindex, IntIndex): * return int_op(x, xindex.to_int_index(), xfill, # <<<<<<<<<<<<<< * y, yindex.to_int_index(), yfill, op) * */ __pyx_t_3 = __pyx_f_6pandas_7_sparse_int_op(__pyx_v_x, ((struct __pyx_obj_6pandas_7_sparse_IntIndex *)__pyx_t_5), __pyx_v_xfill, __pyx_v_y, ((struct __pyx_obj_6pandas_7_sparse_IntIndex *)__pyx_t_4), __pyx_v_yfill, __pyx_v_op); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 712; __pyx_clineno = __LINE__; goto __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 = ((PyObject*)__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L0; } /* "pandas/src/sparse.pyx":705 * * * cdef inline tuple sparse_combine(ndarray x, SparseIndex xindex, float64_t xfill, # <<<<<<<<<<<<<< * ndarray y, SparseIndex yindex, float64_t yfill, * double_func op): */ /* function exit code */ __pyx_r = ((PyObject*)Py_None); __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("pandas._sparse.sparse_combine", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/sparse.pyx":719 * * @cython.boundscheck(False) * cdef inline tuple block_nanop(ndarray x_, BlockIndex xindex, # <<<<<<<<<<<<<< * ndarray y_, BlockIndex yindex, * double_func op): */ static CYTHON_INLINE PyObject *__pyx_f_6pandas_7_sparse_block_nanop(PyArrayObject *__pyx_v_x_, struct __pyx_obj_6pandas_7_sparse_BlockIndex *__pyx_v_xindex, PyArrayObject *__pyx_v_y_, struct __pyx_obj_6pandas_7_sparse_BlockIndex *__pyx_v_yindex, __pyx_t_6pandas_7_sparse_double_func __pyx_v_op) { struct __pyx_obj_6pandas_7_sparse_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; Py_ssize_t __pyx_v_xbp; Py_ssize_t __pyx_v_ybp; Py_ssize_t __pyx_v_obp; Py_ssize_t __pyx_v_xblock; Py_ssize_t __pyx_v_yblock; Py_ssize_t __pyx_v_outblock; 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; 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("block_nanop", 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/src/sparse.pyx":724 * cdef: * BlockIndex out_index * Py_ssize_t xi = 0, yi = 0, out_i = 0 # fp buf indices # <<<<<<<<<<<<<< * Py_ssize_t xbp = 0, ybp = 0, obp = 0 # block positions * Py_ssize_t xblock = 0, yblock = 0, outblock = 0 # block numbers */ __pyx_v_xi = 0; __pyx_v_yi = 0; __pyx_v_out_i = 0; /* "pandas/src/sparse.pyx":725 * BlockIndex out_index * Py_ssize_t xi = 0, yi = 0, out_i = 0 # fp buf indices * Py_ssize_t xbp = 0, ybp = 0, obp = 0 # block positions # <<<<<<<<<<<<<< * Py_ssize_t xblock = 0, yblock = 0, outblock = 0 # block numbers * */ __pyx_v_xbp = 0; __pyx_v_ybp = 0; __pyx_v_obp = 0; /* "pandas/src/sparse.pyx":726 * Py_ssize_t xi = 0, yi = 0, out_i = 0 # fp buf indices * Py_ssize_t xbp = 0, ybp = 0, obp = 0 # block positions * Py_ssize_t xblock = 0, yblock = 0, outblock = 0 # block numbers # <<<<<<<<<<<<<< * * ndarray[float64_t, ndim=1] x, y */ __pyx_v_xblock = 0; __pyx_v_yblock = 0; __pyx_v_outblock = 0; /* "pandas/src/sparse.pyx":732 * * # 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_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_filename = __pyx_f[0]; __pyx_lineno = 732; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __Pyx_INCREF(((PyObject *)__pyx_v_x_)); __pyx_v_x = ((PyArrayObject *)__pyx_v_x_); /* "pandas/src/sparse.pyx":733 * # suppress Cython compiler warnings due to inlining * x = x_ * y = y_ # <<<<<<<<<<<<<< * * out_index = xindex.intersect(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_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_filename = __pyx_f[0]; __pyx_lineno = 733; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __Pyx_INCREF(((PyObject *)__pyx_v_y_)); __pyx_v_y = ((PyArrayObject *)__pyx_v_y_); /* "pandas/src/sparse.pyx":735 * y = y_ * * out_index = xindex.intersect(yindex) # <<<<<<<<<<<<<< * out = np.empty(out_index.npoints, dtype=np.float64) * */ __pyx_t_5 = ((PyObject *)((struct __pyx_vtabstruct_6pandas_7_sparse_BlockIndex *)__pyx_v_xindex->__pyx_vtab)->intersect(__pyx_v_xindex, ((struct __pyx_obj_6pandas_7_sparse_SparseIndex *)__pyx_v_yindex), 0)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 735; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_v_out_index = ((struct __pyx_obj_6pandas_7_sparse_BlockIndex *)__pyx_t_5); __pyx_t_5 = 0; /* "pandas/src/sparse.pyx":736 * * out_index = xindex.intersect(yindex) * out = np.empty(out_index.npoints, dtype=np.float64) # <<<<<<<<<<<<<< * * # walk the two SparseVectors, adding matched locations... */ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 736; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 736; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 736; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 736; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyDict_New(); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 736; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 736; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 736; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 736; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_9 = PyObject_Call(__pyx_t_6, __pyx_t_7, __pyx_t_5); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 736; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 736; __pyx_clineno = __LINE__; goto __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_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_filename = __pyx_f[0]; __pyx_lineno = 736; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_10 = 0; __pyx_v_out = ((PyArrayObject *)__pyx_t_9); __pyx_t_9 = 0; /* "pandas/src/sparse.pyx":739 * * # walk the two SparseVectors, adding matched locations... * for out_i from 0 <= out_i < out_index.npoints: # <<<<<<<<<<<<<< * * # I have a feeling this is inefficient */ __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/src/sparse.pyx":744 * * # walk x * while xindex.locbuf[xblock] + xbp < out_index.locbuf[outblock] + obp: # <<<<<<<<<<<<<< * xbp += 1 * xi += 1 */ while (1) { __pyx_t_12 = ((((__pyx_v_xindex->locbuf[__pyx_v_xblock]) + __pyx_v_xbp) < ((__pyx_v_out_index->locbuf[__pyx_v_outblock]) + __pyx_v_obp)) != 0); if (!__pyx_t_12) break; /* "pandas/src/sparse.pyx":745 * # walk x * while xindex.locbuf[xblock] + xbp < out_index.locbuf[outblock] + obp: * xbp += 1 # <<<<<<<<<<<<<< * xi += 1 * if xbp == xindex.lenbuf[xblock]: */ __pyx_v_xbp = (__pyx_v_xbp + 1); /* "pandas/src/sparse.pyx":746 * while xindex.locbuf[xblock] + xbp < out_index.locbuf[outblock] + obp: * xbp += 1 * xi += 1 # <<<<<<<<<<<<<< * if xbp == xindex.lenbuf[xblock]: * xblock += 1 */ __pyx_v_xi = (__pyx_v_xi + 1); /* "pandas/src/sparse.pyx":747 * xbp += 1 * xi += 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/src/sparse.pyx":748 * xi += 1 * if xbp == xindex.lenbuf[xblock]: * xblock += 1 # <<<<<<<<<<<<<< * xbp = 0 * */ __pyx_v_xblock = (__pyx_v_xblock + 1); /* "pandas/src/sparse.pyx":749 * if xbp == xindex.lenbuf[xblock]: * xblock += 1 * xbp = 0 # <<<<<<<<<<<<<< * * # walk y */ __pyx_v_xbp = 0; goto __pyx_L7; } __pyx_L7:; } /* "pandas/src/sparse.pyx":752 * * # walk y * while yindex.locbuf[yblock] + ybp < out_index.locbuf[outblock] + obp: # <<<<<<<<<<<<<< * ybp += 1 * yi += 1 */ while (1) { __pyx_t_12 = ((((__pyx_v_yindex->locbuf[__pyx_v_yblock]) + __pyx_v_ybp) < ((__pyx_v_out_index->locbuf[__pyx_v_outblock]) + __pyx_v_obp)) != 0); if (!__pyx_t_12) break; /* "pandas/src/sparse.pyx":753 * # walk y * while yindex.locbuf[yblock] + ybp < out_index.locbuf[outblock] + obp: * ybp += 1 # <<<<<<<<<<<<<< * yi += 1 * if ybp == yindex.lenbuf[yblock]: */ __pyx_v_ybp = (__pyx_v_ybp + 1); /* "pandas/src/sparse.pyx":754 * while yindex.locbuf[yblock] + ybp < out_index.locbuf[outblock] + obp: * ybp += 1 * yi += 1 # <<<<<<<<<<<<<< * if ybp == yindex.lenbuf[yblock]: * yblock += 1 */ __pyx_v_yi = (__pyx_v_yi + 1); /* "pandas/src/sparse.pyx":755 * ybp += 1 * yi += 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/src/sparse.pyx":756 * yi += 1 * if ybp == yindex.lenbuf[yblock]: * yblock += 1 # <<<<<<<<<<<<<< * ybp = 0 * */ __pyx_v_yblock = (__pyx_v_yblock + 1); /* "pandas/src/sparse.pyx":757 * if ybp == yindex.lenbuf[yblock]: * yblock += 1 * ybp = 0 # <<<<<<<<<<<<<< * * out[out_i] = op(x[xi], y[yi]) */ __pyx_v_ybp = 0; goto __pyx_L10; } __pyx_L10:; } /* "pandas/src/sparse.pyx":759 * ybp = 0 * * out[out_i] = op(x[xi], y[yi]) # <<<<<<<<<<<<<< * * # advance. strikes me as too complicated */ __pyx_t_13 = __pyx_v_xi; if (__pyx_t_13 < 0) __pyx_t_13 += __pyx_pybuffernd_x.diminfo[0].shape; __pyx_t_14 = __pyx_v_yi; if (__pyx_t_14 < 0) __pyx_t_14 += __pyx_pybuffernd_y.diminfo[0].shape; __pyx_t_15 = __pyx_v_out_i; if (__pyx_t_15 < 0) __pyx_t_15 += __pyx_pybuffernd_out.diminfo[0].shape; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_out.diminfo[0].strides) = __pyx_v_op((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_x.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_x.diminfo[0].strides)), (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_y.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_y.diminfo[0].strides))); /* "pandas/src/sparse.pyx":762 * * # advance. strikes me as too complicated * xi += 1 # <<<<<<<<<<<<<< * yi += 1 * */ __pyx_v_xi = (__pyx_v_xi + 1); /* "pandas/src/sparse.pyx":763 * # advance. strikes me as too complicated * xi += 1 * yi += 1 # <<<<<<<<<<<<<< * * xbp += 1 */ __pyx_v_yi = (__pyx_v_yi + 1); /* "pandas/src/sparse.pyx":765 * yi += 1 * * xbp += 1 # <<<<<<<<<<<<<< * if xbp == xindex.lenbuf[xblock]: * xblock += 1 */ __pyx_v_xbp = (__pyx_v_xbp + 1); /* "pandas/src/sparse.pyx":766 * * 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/src/sparse.pyx":767 * xbp += 1 * if xbp == xindex.lenbuf[xblock]: * xblock += 1 # <<<<<<<<<<<<<< * xbp = 0 * */ __pyx_v_xblock = (__pyx_v_xblock + 1); /* "pandas/src/sparse.pyx":768 * if xbp == xindex.lenbuf[xblock]: * xblock += 1 * xbp = 0 # <<<<<<<<<<<<<< * * ybp += 1 */ __pyx_v_xbp = 0; goto __pyx_L11; } __pyx_L11:; /* "pandas/src/sparse.pyx":770 * xbp = 0 * * ybp += 1 # <<<<<<<<<<<<<< * if ybp == yindex.lenbuf[yblock]: * yblock += 1 */ __pyx_v_ybp = (__pyx_v_ybp + 1); /* "pandas/src/sparse.pyx":771 * * 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/src/sparse.pyx":772 * ybp += 1 * if ybp == yindex.lenbuf[yblock]: * yblock += 1 # <<<<<<<<<<<<<< * ybp = 0 * */ __pyx_v_yblock = (__pyx_v_yblock + 1); /* "pandas/src/sparse.pyx":773 * if ybp == yindex.lenbuf[yblock]: * yblock += 1 * ybp = 0 # <<<<<<<<<<<<<< * * obp += 1 */ __pyx_v_ybp = 0; goto __pyx_L12; } __pyx_L12:; /* "pandas/src/sparse.pyx":775 * ybp = 0 * * obp += 1 # <<<<<<<<<<<<<< * if obp == out_index.lenbuf[outblock]: * outblock += 1 */ __pyx_v_obp = (__pyx_v_obp + 1); /* "pandas/src/sparse.pyx":776 * * obp += 1 * if obp == out_index.lenbuf[outblock]: # <<<<<<<<<<<<<< * outblock += 1 * obp = 0 */ __pyx_t_12 = ((__pyx_v_obp == (__pyx_v_out_index->lenbuf[__pyx_v_outblock])) != 0); if (__pyx_t_12) { /* "pandas/src/sparse.pyx":777 * obp += 1 * if obp == out_index.lenbuf[outblock]: * outblock += 1 # <<<<<<<<<<<<<< * obp = 0 * */ __pyx_v_outblock = (__pyx_v_outblock + 1); /* "pandas/src/sparse.pyx":778 * if obp == out_index.lenbuf[outblock]: * outblock += 1 * obp = 0 # <<<<<<<<<<<<<< * * return out, out_index */ __pyx_v_obp = 0; goto __pyx_L13; } __pyx_L13:; } /* "pandas/src/sparse.pyx":780 * obp = 0 * * return out, out_index # <<<<<<<<<<<<<< * * @cython.boundscheck(False) */ __Pyx_XDECREF(__pyx_r); __pyx_t_9 = PyTuple_New(2); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 780; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_INCREF(((PyObject *)__pyx_v_out)); PyTuple_SET_ITEM(__pyx_t_9, 0, ((PyObject *)__pyx_v_out)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out)); __Pyx_INCREF(((PyObject *)__pyx_v_out_index)); PyTuple_SET_ITEM(__pyx_t_9, 1, ((PyObject *)__pyx_v_out_index)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out_index)); __pyx_r = ((PyObject*)__pyx_t_9); __pyx_t_9 = 0; goto __pyx_L0; /* "pandas/src/sparse.pyx":719 * * @cython.boundscheck(False) * cdef inline tuple block_nanop(ndarray x_, BlockIndex xindex, # <<<<<<<<<<<<<< * ndarray y_, BlockIndex yindex, * double_func op): */ /* 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_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._sparse.block_nanop", __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/src/sparse.pyx":783 * * @cython.boundscheck(False) * cdef inline tuple int_nanop(ndarray x_, IntIndex xindex, # <<<<<<<<<<<<<< * ndarray y_, IntIndex yindex, * double_func op): */ static CYTHON_INLINE PyObject *__pyx_f_6pandas_7_sparse_int_nanop(PyArrayObject *__pyx_v_x_, struct __pyx_obj_6pandas_7_sparse_IntIndex *__pyx_v_xindex, PyArrayObject *__pyx_v_y_, struct __pyx_obj_6pandas_7_sparse_IntIndex *__pyx_v_yindex, __pyx_t_6pandas_7_sparse_double_func __pyx_v_op) { struct __pyx_obj_6pandas_7_sparse_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; PyArrayObject *__pyx_v_xindices = 0; PyArrayObject *__pyx_v_yindices = 0; 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; Py_ssize_t __pyx_t_12; Py_ssize_t __pyx_t_13; int __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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("int_nanop", 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/src/sparse.pyx":788 * cdef: * IntIndex out_index * Py_ssize_t xi = 0, yi = 0, out_i = 0 # fp buf indices # <<<<<<<<<<<<<< * ndarray[int32_t, ndim=1] xindices, yindices, out_indices * ndarray[float64_t, ndim=1] x, y */ __pyx_v_xi = 0; __pyx_v_yi = 0; __pyx_v_out_i = 0; /* "pandas/src/sparse.pyx":794 * * # 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_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_filename = __pyx_f[0]; __pyx_lineno = 794; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __Pyx_INCREF(((PyObject *)__pyx_v_x_)); __pyx_v_x = ((PyArrayObject *)__pyx_v_x_); /* "pandas/src/sparse.pyx":795 * # 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_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_filename = __pyx_f[0]; __pyx_lineno = 795; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __Pyx_INCREF(((PyObject *)__pyx_v_y_)); __pyx_v_y = ((PyArrayObject *)__pyx_v_y_); /* "pandas/src/sparse.pyx":798 * * # need to do this first to know size of result array * out_index = xindex.intersect(yindex) # <<<<<<<<<<<<<< * out = np.empty(out_index.npoints, dtype=np.float64) * */ __pyx_t_5 = ((PyObject *)((struct __pyx_vtabstruct_6pandas_7_sparse_IntIndex *)__pyx_v_xindex->__pyx_vtab)->intersect(__pyx_v_xindex, ((struct __pyx_obj_6pandas_7_sparse_SparseIndex *)__pyx_v_yindex), 0)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 798; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_v_out_index = ((struct __pyx_obj_6pandas_7_sparse_IntIndex *)__pyx_t_5); __pyx_t_5 = 0; /* "pandas/src/sparse.pyx":799 * # need to do this first to know size of result array * out_index = xindex.intersect(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_filename = __pyx_f[0]; __pyx_lineno = 799; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 799; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 799; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 799; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyDict_New(); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 799; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 799; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 799; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 799; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_9 = PyObject_Call(__pyx_t_6, __pyx_t_7, __pyx_t_5); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 799; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 799; __pyx_clineno = __LINE__; goto __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_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_filename = __pyx_f[0]; __pyx_lineno = 799; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_10 = 0; __pyx_v_out = ((PyArrayObject *)__pyx_t_9); __pyx_t_9 = 0; /* "pandas/src/sparse.pyx":801 * 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_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_filename = __pyx_f[0]; __pyx_lineno = 801; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_xindices = ((PyArrayObject *)__pyx_t_9); __pyx_t_9 = 0; /* "pandas/src/sparse.pyx":802 * * 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_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_filename = __pyx_f[0]; __pyx_lineno = 802; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_yindices = ((PyArrayObject *)__pyx_t_9); __pyx_t_9 = 0; /* "pandas/src/sparse.pyx":803 * 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_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_filename = __pyx_f[0]; __pyx_lineno = 803; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_out_indices = ((PyArrayObject *)__pyx_t_9); __pyx_t_9 = 0; /* "pandas/src/sparse.pyx":806 * * # walk the two SparseVectors, adding matched locations... * for out_i from 0 <= out_i < out_index.npoints: # <<<<<<<<<<<<<< * * # walk x */ __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/src/sparse.pyx":809 * * # walk x * while xindices[xi] < out_indices[out_i]: # <<<<<<<<<<<<<< * xi += 1 * */ while (1) { __pyx_t_12 = __pyx_v_xi; if (__pyx_t_12 < 0) __pyx_t_12 += __pyx_pybuffernd_xindices.diminfo[0].shape; __pyx_t_13 = __pyx_v_out_i; if (__pyx_t_13 < 0) __pyx_t_13 += __pyx_pybuffernd_out_indices.diminfo[0].shape; __pyx_t_14 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_xindices.rcbuffer->pybuffer.buf, __pyx_t_12, __pyx_pybuffernd_xindices.diminfo[0].strides)) < (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_out_indices.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_out_indices.diminfo[0].strides))) != 0); if (!__pyx_t_14) break; /* "pandas/src/sparse.pyx":810 * # walk x * while xindices[xi] < out_indices[out_i]: * xi += 1 # <<<<<<<<<<<<<< * * # walk y */ __pyx_v_xi = (__pyx_v_xi + 1); } /* "pandas/src/sparse.pyx":813 * * # walk y * while yindices[yi] < out_indices[out_i]: # <<<<<<<<<<<<<< * yi += 1 * */ while (1) { __pyx_t_15 = __pyx_v_yi; if (__pyx_t_15 < 0) __pyx_t_15 += __pyx_pybuffernd_yindices.diminfo[0].shape; __pyx_t_16 = __pyx_v_out_i; if (__pyx_t_16 < 0) __pyx_t_16 += __pyx_pybuffernd_out_indices.diminfo[0].shape; __pyx_t_14 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_yindices.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_yindices.diminfo[0].strides)) < (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_out_indices.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_out_indices.diminfo[0].strides))) != 0); if (!__pyx_t_14) break; /* "pandas/src/sparse.pyx":814 * # walk y * while yindices[yi] < out_indices[out_i]: * yi += 1 # <<<<<<<<<<<<<< * * out[out_i] = op(x[xi], y[yi]) */ __pyx_v_yi = (__pyx_v_yi + 1); } /* "pandas/src/sparse.pyx":816 * yi += 1 * * out[out_i] = op(x[xi], y[yi]) # <<<<<<<<<<<<<< * * # advance */ __pyx_t_17 = __pyx_v_xi; if (__pyx_t_17 < 0) __pyx_t_17 += __pyx_pybuffernd_x.diminfo[0].shape; __pyx_t_18 = __pyx_v_yi; if (__pyx_t_18 < 0) __pyx_t_18 += __pyx_pybuffernd_y.diminfo[0].shape; __pyx_t_19 = __pyx_v_out_i; if (__pyx_t_19 < 0) __pyx_t_19 += __pyx_pybuffernd_out.diminfo[0].shape; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_out.diminfo[0].strides) = __pyx_v_op((*__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/src/sparse.pyx":819 * * # advance * xi += 1 # <<<<<<<<<<<<<< * yi += 1 * */ __pyx_v_xi = (__pyx_v_xi + 1); /* "pandas/src/sparse.pyx":820 * # advance * xi += 1 * yi += 1 # <<<<<<<<<<<<<< * * return out, out_index */ __pyx_v_yi = (__pyx_v_yi + 1); } /* "pandas/src/sparse.pyx":822 * yi += 1 * * return out, out_index # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_9 = PyTuple_New(2); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 822; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_INCREF(((PyObject *)__pyx_v_out)); PyTuple_SET_ITEM(__pyx_t_9, 0, ((PyObject *)__pyx_v_out)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out)); __Pyx_INCREF(((PyObject *)__pyx_v_out_index)); PyTuple_SET_ITEM(__pyx_t_9, 1, ((PyObject *)__pyx_v_out_index)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out_index)); __pyx_r = ((PyObject*)__pyx_t_9); __pyx_t_9 = 0; goto __pyx_L0; /* "pandas/src/sparse.pyx":783 * * @cython.boundscheck(False) * cdef inline tuple int_nanop(ndarray x_, IntIndex xindex, # <<<<<<<<<<<<<< * ndarray y_, IntIndex yindex, * double_func op): */ /* 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_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._sparse.int_nanop", __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/src/sparse.pyx":826 * * @cython.boundscheck(False) * cdef inline tuple block_op(ndarray x_, BlockIndex xindex, float64_t xfill, # <<<<<<<<<<<<<< * ndarray y_, BlockIndex yindex, float64_t yfill, * double_func op): */ static CYTHON_INLINE PyObject *__pyx_f_6pandas_7_sparse_block_op(PyArrayObject *__pyx_v_x_, struct __pyx_obj_6pandas_7_sparse_BlockIndex *__pyx_v_xindex, __pyx_t_5numpy_float64_t __pyx_v_xfill, PyArrayObject *__pyx_v_y_, struct __pyx_obj_6pandas_7_sparse_BlockIndex *__pyx_v_yindex, __pyx_t_5numpy_float64_t __pyx_v_yfill, __pyx_t_6pandas_7_sparse_double_func __pyx_v_op) { struct __pyx_obj_6pandas_7_sparse_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; Py_ssize_t __pyx_v_xbp; Py_ssize_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; 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("block_op", 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/src/sparse.pyx":835 * cdef: * BlockIndex out_index * Py_ssize_t xi = 0, yi = 0, out_i = 0 # fp buf indices # <<<<<<<<<<<<<< * Py_ssize_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/src/sparse.pyx":836 * BlockIndex out_index * Py_ssize_t xi = 0, yi = 0, out_i = 0 # fp buf indices * Py_ssize_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/src/sparse.pyx":838 * Py_ssize_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/src/sparse.pyx":844 * * # 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_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_filename = __pyx_f[0]; __pyx_lineno = 844; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __Pyx_INCREF(((PyObject *)__pyx_v_x_)); __pyx_v_x = ((PyArrayObject *)__pyx_v_x_); /* "pandas/src/sparse.pyx":845 * # 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_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_filename = __pyx_f[0]; __pyx_lineno = 845; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __Pyx_INCREF(((PyObject *)__pyx_v_y_)); __pyx_v_y = ((PyArrayObject *)__pyx_v_y_); /* "pandas/src/sparse.pyx":847 * 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_7_sparse_BlockIndex *)__pyx_v_xindex->__pyx_vtab)->make_union(__pyx_v_xindex, ((struct __pyx_obj_6pandas_7_sparse_SparseIndex *)__pyx_v_yindex), 0)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 847; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_v_out_index = ((struct __pyx_obj_6pandas_7_sparse_BlockIndex *)__pyx_t_5); __pyx_t_5 = 0; /* "pandas/src/sparse.pyx":848 * * 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_filename = __pyx_f[0]; __pyx_lineno = 848; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 848; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 848; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 848; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyDict_New(); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 848; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 848; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 848; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 848; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_9 = PyObject_Call(__pyx_t_6, __pyx_t_7, __pyx_t_5); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 848; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 848; __pyx_clineno = __LINE__; goto __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_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_filename = __pyx_f[0]; __pyx_lineno = 848; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_10 = 0; __pyx_v_out = ((PyArrayObject *)__pyx_t_9); __pyx_t_9 = 0; /* "pandas/src/sparse.pyx":853 * * # 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/src/sparse.pyx":854 * # 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] = op(x[xi], yfill) */ __pyx_t_12 = ((__pyx_v_yblock == __pyx_v_yindex->nblocks) != 0); if (__pyx_t_12) { /* "pandas/src/sparse.pyx":856 * if yblock == yindex.nblocks: * # use y fill value * out[out_i] = op(x[xi], yfill) # <<<<<<<<<<<<<< * xi += 1 * */ __pyx_t_13 = __pyx_v_xi; if (__pyx_t_13 < 0) __pyx_t_13 += __pyx_pybuffernd_x.diminfo[0].shape; __pyx_t_14 = __pyx_v_out_i; if (__pyx_t_14 < 0) __pyx_t_14 += __pyx_pybuffernd_out.diminfo[0].shape; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_out.diminfo[0].strides) = __pyx_v_op((*__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/src/sparse.pyx":857 * # use y fill value * out[out_i] = op(x[xi], yfill) * xi += 1 # <<<<<<<<<<<<<< * * # advance x location */ __pyx_v_xi = (__pyx_v_xi + 1); /* "pandas/src/sparse.pyx":860 * * # advance x location * xbp += 1 # <<<<<<<<<<<<<< * if xbp == xindex.lenbuf[xblock]: * xblock += 1 */ __pyx_v_xbp = (__pyx_v_xbp + 1); /* "pandas/src/sparse.pyx":861 * # 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/src/sparse.pyx":862 * xbp += 1 * if xbp == xindex.lenbuf[xblock]: * xblock += 1 # <<<<<<<<<<<<<< * xbp = 0 * continue */ __pyx_v_xblock = (__pyx_v_xblock + 1); /* "pandas/src/sparse.pyx":863 * if xbp == xindex.lenbuf[xblock]: * xblock += 1 * xbp = 0 # <<<<<<<<<<<<<< * continue * */ __pyx_v_xbp = 0; goto __pyx_L6; } __pyx_L6:; /* "pandas/src/sparse.pyx":864 * xblock += 1 * xbp = 0 * continue # <<<<<<<<<<<<<< * * if xblock == xindex.nblocks: */ goto __pyx_L3_continue; } /* "pandas/src/sparse.pyx":866 * continue * * if xblock == xindex.nblocks: # <<<<<<<<<<<<<< * # use x fill value * out[out_i] = op(xfill, y[yi]) */ __pyx_t_12 = ((__pyx_v_xblock == __pyx_v_xindex->nblocks) != 0); if (__pyx_t_12) { /* "pandas/src/sparse.pyx":868 * if xblock == xindex.nblocks: * # use x fill value * out[out_i] = op(xfill, y[yi]) # <<<<<<<<<<<<<< * yi += 1 * */ __pyx_t_15 = __pyx_v_yi; if (__pyx_t_15 < 0) __pyx_t_15 += __pyx_pybuffernd_y.diminfo[0].shape; __pyx_t_16 = __pyx_v_out_i; if (__pyx_t_16 < 0) __pyx_t_16 += __pyx_pybuffernd_out.diminfo[0].shape; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_out.diminfo[0].strides) = __pyx_v_op(__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/src/sparse.pyx":869 * # use x fill value * out[out_i] = op(xfill, y[yi]) * yi += 1 # <<<<<<<<<<<<<< * * # advance y location */ __pyx_v_yi = (__pyx_v_yi + 1); /* "pandas/src/sparse.pyx":872 * * # advance y location * ybp += 1 # <<<<<<<<<<<<<< * if ybp == yindex.lenbuf[yblock]: * yblock += 1 */ __pyx_v_ybp = (__pyx_v_ybp + 1); /* "pandas/src/sparse.pyx":873 * # 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/src/sparse.pyx":874 * ybp += 1 * if ybp == yindex.lenbuf[yblock]: * yblock += 1 # <<<<<<<<<<<<<< * ybp = 0 * continue */ __pyx_v_yblock = (__pyx_v_yblock + 1); /* "pandas/src/sparse.pyx":875 * if ybp == yindex.lenbuf[yblock]: * yblock += 1 * ybp = 0 # <<<<<<<<<<<<<< * continue * */ __pyx_v_ybp = 0; goto __pyx_L8; } __pyx_L8:; /* "pandas/src/sparse.pyx":876 * yblock += 1 * ybp = 0 * continue # <<<<<<<<<<<<<< * * yloc = yindex.locbuf[yblock] + ybp */ goto __pyx_L3_continue; } /* "pandas/src/sparse.pyx":878 * 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/src/sparse.pyx":879 * * 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/src/sparse.pyx":882 * * # each index in the out_index had to come from either x, y, or both * if xloc == yloc: # <<<<<<<<<<<<<< * out[out_i] = op(x[xi], y[yi]) * xi += 1 */ __pyx_t_12 = ((__pyx_v_xloc == __pyx_v_yloc) != 0); if (__pyx_t_12) { /* "pandas/src/sparse.pyx":883 * # each index in the out_index had to come from either x, y, or both * if xloc == yloc: * out[out_i] = op(x[xi], y[yi]) # <<<<<<<<<<<<<< * xi += 1 * yi += 1 */ __pyx_t_17 = __pyx_v_xi; if (__pyx_t_17 < 0) __pyx_t_17 += __pyx_pybuffernd_x.diminfo[0].shape; __pyx_t_18 = __pyx_v_yi; if (__pyx_t_18 < 0) __pyx_t_18 += __pyx_pybuffernd_y.diminfo[0].shape; __pyx_t_19 = __pyx_v_out_i; if (__pyx_t_19 < 0) __pyx_t_19 += __pyx_pybuffernd_out.diminfo[0].shape; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_out.diminfo[0].strides) = __pyx_v_op((*__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/src/sparse.pyx":884 * if xloc == yloc: * out[out_i] = op(x[xi], y[yi]) * xi += 1 # <<<<<<<<<<<<<< * yi += 1 * */ __pyx_v_xi = (__pyx_v_xi + 1); /* "pandas/src/sparse.pyx":885 * out[out_i] = op(x[xi], y[yi]) * xi += 1 * yi += 1 # <<<<<<<<<<<<<< * * # advance both locations */ __pyx_v_yi = (__pyx_v_yi + 1); /* "pandas/src/sparse.pyx":888 * * # advance both locations * xbp += 1 # <<<<<<<<<<<<<< * if xbp == xindex.lenbuf[xblock]: * xblock += 1 */ __pyx_v_xbp = (__pyx_v_xbp + 1); /* "pandas/src/sparse.pyx":889 * # 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/src/sparse.pyx":890 * xbp += 1 * if xbp == xindex.lenbuf[xblock]: * xblock += 1 # <<<<<<<<<<<<<< * xbp = 0 * */ __pyx_v_xblock = (__pyx_v_xblock + 1); /* "pandas/src/sparse.pyx":891 * if xbp == xindex.lenbuf[xblock]: * xblock += 1 * xbp = 0 # <<<<<<<<<<<<<< * * ybp += 1 */ __pyx_v_xbp = 0; goto __pyx_L10; } __pyx_L10:; /* "pandas/src/sparse.pyx":893 * xbp = 0 * * ybp += 1 # <<<<<<<<<<<<<< * if ybp == yindex.lenbuf[yblock]: * yblock += 1 */ __pyx_v_ybp = (__pyx_v_ybp + 1); /* "pandas/src/sparse.pyx":894 * * 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/src/sparse.pyx":895 * ybp += 1 * if ybp == yindex.lenbuf[yblock]: * yblock += 1 # <<<<<<<<<<<<<< * ybp = 0 * */ __pyx_v_yblock = (__pyx_v_yblock + 1); /* "pandas/src/sparse.pyx":896 * if ybp == yindex.lenbuf[yblock]: * yblock += 1 * ybp = 0 # <<<<<<<<<<<<<< * * elif xloc < yloc: */ __pyx_v_ybp = 0; goto __pyx_L11; } __pyx_L11:; goto __pyx_L9; } /* "pandas/src/sparse.pyx":898 * ybp = 0 * * elif xloc < yloc: # <<<<<<<<<<<<<< * # use y fill value * out[out_i] = op(x[xi], yfill) */ __pyx_t_12 = ((__pyx_v_xloc < __pyx_v_yloc) != 0); if (__pyx_t_12) { /* "pandas/src/sparse.pyx":900 * elif xloc < yloc: * # use y fill value * out[out_i] = op(x[xi], yfill) # <<<<<<<<<<<<<< * xi += 1 * */ __pyx_t_20 = __pyx_v_xi; if (__pyx_t_20 < 0) __pyx_t_20 += __pyx_pybuffernd_x.diminfo[0].shape; __pyx_t_21 = __pyx_v_out_i; if (__pyx_t_21 < 0) __pyx_t_21 += __pyx_pybuffernd_out.diminfo[0].shape; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_out.diminfo[0].strides) = __pyx_v_op((*__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/src/sparse.pyx":901 * # use y fill value * out[out_i] = op(x[xi], yfill) * xi += 1 # <<<<<<<<<<<<<< * * # advance x location */ __pyx_v_xi = (__pyx_v_xi + 1); /* "pandas/src/sparse.pyx":904 * * # advance x location * xbp += 1 # <<<<<<<<<<<<<< * if xbp == xindex.lenbuf[xblock]: * xblock += 1 */ __pyx_v_xbp = (__pyx_v_xbp + 1); /* "pandas/src/sparse.pyx":905 * # 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/src/sparse.pyx":906 * xbp += 1 * if xbp == xindex.lenbuf[xblock]: * xblock += 1 # <<<<<<<<<<<<<< * xbp = 0 * else: */ __pyx_v_xblock = (__pyx_v_xblock + 1); /* "pandas/src/sparse.pyx":907 * if xbp == xindex.lenbuf[xblock]: * xblock += 1 * xbp = 0 # <<<<<<<<<<<<<< * else: * # use x fill value */ __pyx_v_xbp = 0; goto __pyx_L12; } __pyx_L12:; goto __pyx_L9; } /*else*/ { /* "pandas/src/sparse.pyx":910 * else: * # use x fill value * out[out_i] = op(xfill, y[yi]) # <<<<<<<<<<<<<< * yi += 1 * */ __pyx_t_22 = __pyx_v_yi; if (__pyx_t_22 < 0) __pyx_t_22 += __pyx_pybuffernd_y.diminfo[0].shape; __pyx_t_23 = __pyx_v_out_i; if (__pyx_t_23 < 0) __pyx_t_23 += __pyx_pybuffernd_out.diminfo[0].shape; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_23, __pyx_pybuffernd_out.diminfo[0].strides) = __pyx_v_op(__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/src/sparse.pyx":911 * # use x fill value * out[out_i] = op(xfill, y[yi]) * yi += 1 # <<<<<<<<<<<<<< * * # advance y location */ __pyx_v_yi = (__pyx_v_yi + 1); /* "pandas/src/sparse.pyx":914 * * # advance y location * ybp += 1 # <<<<<<<<<<<<<< * if ybp == yindex.lenbuf[yblock]: * yblock += 1 */ __pyx_v_ybp = (__pyx_v_ybp + 1); /* "pandas/src/sparse.pyx":915 * # 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/src/sparse.pyx":916 * ybp += 1 * if ybp == yindex.lenbuf[yblock]: * yblock += 1 # <<<<<<<<<<<<<< * ybp = 0 * */ __pyx_v_yblock = (__pyx_v_yblock + 1); /* "pandas/src/sparse.pyx":917 * if ybp == yindex.lenbuf[yblock]: * yblock += 1 * ybp = 0 # <<<<<<<<<<<<<< * * return out, out_index */ __pyx_v_ybp = 0; goto __pyx_L13; } __pyx_L13:; } __pyx_L9:; __pyx_L3_continue:; } /* "pandas/src/sparse.pyx":919 * ybp = 0 * * return out, out_index # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_9 = PyTuple_New(2); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 919; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_INCREF(((PyObject *)__pyx_v_out)); PyTuple_SET_ITEM(__pyx_t_9, 0, ((PyObject *)__pyx_v_out)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out)); __Pyx_INCREF(((PyObject *)__pyx_v_out_index)); PyTuple_SET_ITEM(__pyx_t_9, 1, ((PyObject *)__pyx_v_out_index)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out_index)); __pyx_r = ((PyObject*)__pyx_t_9); __pyx_t_9 = 0; goto __pyx_L0; /* "pandas/src/sparse.pyx":826 * * @cython.boundscheck(False) * cdef inline tuple block_op(ndarray x_, BlockIndex xindex, float64_t xfill, # <<<<<<<<<<<<<< * ndarray y_, BlockIndex yindex, float64_t yfill, * double_func op): */ /* 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_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._sparse.block_op", __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/src/sparse.pyx":923 * * @cython.boundscheck(False) * cdef inline tuple int_op(ndarray x_, IntIndex xindex, float64_t xfill, # <<<<<<<<<<<<<< * ndarray y_, IntIndex yindex, float64_t yfill, * double_func op): */ static CYTHON_INLINE PyObject *__pyx_f_6pandas_7_sparse_int_op(PyArrayObject *__pyx_v_x_, struct __pyx_obj_6pandas_7_sparse_IntIndex *__pyx_v_xindex, __pyx_t_5numpy_float64_t __pyx_v_xfill, PyArrayObject *__pyx_v_y_, struct __pyx_obj_6pandas_7_sparse_IntIndex *__pyx_v_yindex, __pyx_t_5numpy_float64_t __pyx_v_yfill, __pyx_t_6pandas_7_sparse_double_func __pyx_v_op) { struct __pyx_obj_6pandas_7_sparse_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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("int_op", 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/src/sparse.pyx":928 * 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/src/sparse.pyx":935 * * # 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_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_filename = __pyx_f[0]; __pyx_lineno = 935; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __Pyx_INCREF(((PyObject *)__pyx_v_x_)); __pyx_v_x = ((PyArrayObject *)__pyx_v_x_); /* "pandas/src/sparse.pyx":936 * # 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_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_filename = __pyx_f[0]; __pyx_lineno = 936; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __Pyx_INCREF(((PyObject *)__pyx_v_y_)); __pyx_v_y = ((PyArrayObject *)__pyx_v_y_); /* "pandas/src/sparse.pyx":939 * * # 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_7_sparse_IntIndex *)__pyx_v_xindex->__pyx_vtab)->make_union(__pyx_v_xindex, ((struct __pyx_obj_6pandas_7_sparse_SparseIndex *)__pyx_v_yindex), 0)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 939; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_v_out_index = ((struct __pyx_obj_6pandas_7_sparse_IntIndex *)__pyx_t_5); __pyx_t_5 = 0; /* "pandas/src/sparse.pyx":940 * # 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_filename = __pyx_f[0]; __pyx_lineno = 940; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 940; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 940; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 940; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyDict_New(); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 940; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 940; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 940; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 940; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_9 = PyObject_Call(__pyx_t_6, __pyx_t_7, __pyx_t_5); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 940; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 940; __pyx_clineno = __LINE__; goto __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_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_filename = __pyx_f[0]; __pyx_lineno = 940; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_10 = 0; __pyx_v_out = ((PyArrayObject *)__pyx_t_9); __pyx_t_9 = 0; /* "pandas/src/sparse.pyx":942 * 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_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_filename = __pyx_f[0]; __pyx_lineno = 942; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_xindices = ((PyArrayObject *)__pyx_t_9); __pyx_t_9 = 0; /* "pandas/src/sparse.pyx":943 * * 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_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_filename = __pyx_f[0]; __pyx_lineno = 943; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_yindices = ((PyArrayObject *)__pyx_t_9); __pyx_t_9 = 0; /* "pandas/src/sparse.pyx":944 * 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_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_filename = __pyx_f[0]; __pyx_lineno = 944; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_out_indices = ((PyArrayObject *)__pyx_t_9); __pyx_t_9 = 0; /* "pandas/src/sparse.pyx":947 * * # 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/src/sparse.pyx":948 * # 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] = op(xfill, y[yi]) */ __pyx_t_12 = ((__pyx_v_xi == __pyx_v_xindex->npoints) != 0); if (__pyx_t_12) { /* "pandas/src/sparse.pyx":950 * if xi == xindex.npoints: * # use x fill value * out[out_i] = op(xfill, y[yi]) # <<<<<<<<<<<<<< * yi += 1 * continue */ __pyx_t_13 = __pyx_v_yi; if (__pyx_t_13 < 0) __pyx_t_13 += __pyx_pybuffernd_y.diminfo[0].shape; __pyx_t_14 = __pyx_v_out_i; if (__pyx_t_14 < 0) __pyx_t_14 += __pyx_pybuffernd_out.diminfo[0].shape; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_out.diminfo[0].strides) = __pyx_v_op(__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/src/sparse.pyx":951 * # use x fill value * out[out_i] = op(xfill, y[yi]) * yi += 1 # <<<<<<<<<<<<<< * continue * */ __pyx_v_yi = (__pyx_v_yi + 1); /* "pandas/src/sparse.pyx":952 * out[out_i] = op(xfill, y[yi]) * yi += 1 * continue # <<<<<<<<<<<<<< * * if yi == yindex.npoints: */ goto __pyx_L3_continue; } /* "pandas/src/sparse.pyx":954 * continue * * if yi == yindex.npoints: # <<<<<<<<<<<<<< * # use y fill value * out[out_i] = op(x[xi], yfill) */ __pyx_t_12 = ((__pyx_v_yi == __pyx_v_yindex->npoints) != 0); if (__pyx_t_12) { /* "pandas/src/sparse.pyx":956 * if yi == yindex.npoints: * # use y fill value * out[out_i] = op(x[xi], yfill) # <<<<<<<<<<<<<< * xi += 1 * continue */ __pyx_t_15 = __pyx_v_xi; if (__pyx_t_15 < 0) __pyx_t_15 += __pyx_pybuffernd_x.diminfo[0].shape; __pyx_t_16 = __pyx_v_out_i; if (__pyx_t_16 < 0) __pyx_t_16 += __pyx_pybuffernd_out.diminfo[0].shape; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_out.diminfo[0].strides) = __pyx_v_op((*__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/src/sparse.pyx":957 * # use y fill value * out[out_i] = op(x[xi], yfill) * xi += 1 # <<<<<<<<<<<<<< * continue * */ __pyx_v_xi = (__pyx_v_xi + 1); /* "pandas/src/sparse.pyx":958 * out[out_i] = op(x[xi], yfill) * xi += 1 * continue # <<<<<<<<<<<<<< * * xloc = xindices[xi] */ goto __pyx_L3_continue; } /* "pandas/src/sparse.pyx":960 * continue * * xloc = xindices[xi] # <<<<<<<<<<<<<< * yloc = yindices[yi] * */ __pyx_t_17 = __pyx_v_xi; if (__pyx_t_17 < 0) __pyx_t_17 += __pyx_pybuffernd_xindices.diminfo[0].shape; __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/src/sparse.pyx":961 * * 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; if (__pyx_t_18 < 0) __pyx_t_18 += __pyx_pybuffernd_yindices.diminfo[0].shape; __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/src/sparse.pyx":964 * * # each index in the out_index had to come from either x, y, or both * if xloc == yloc: # <<<<<<<<<<<<<< * out[out_i] = op(x[xi], y[yi]) * xi += 1 */ __pyx_t_12 = ((__pyx_v_xloc == __pyx_v_yloc) != 0); if (__pyx_t_12) { /* "pandas/src/sparse.pyx":965 * # each index in the out_index had to come from either x, y, or both * if xloc == yloc: * out[out_i] = op(x[xi], y[yi]) # <<<<<<<<<<<<<< * xi += 1 * yi += 1 */ __pyx_t_19 = __pyx_v_xi; if (__pyx_t_19 < 0) __pyx_t_19 += __pyx_pybuffernd_x.diminfo[0].shape; __pyx_t_20 = __pyx_v_yi; if (__pyx_t_20 < 0) __pyx_t_20 += __pyx_pybuffernd_y.diminfo[0].shape; __pyx_t_21 = __pyx_v_out_i; if (__pyx_t_21 < 0) __pyx_t_21 += __pyx_pybuffernd_out.diminfo[0].shape; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_out.diminfo[0].strides) = __pyx_v_op((*__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/src/sparse.pyx":966 * if xloc == yloc: * out[out_i] = op(x[xi], y[yi]) * xi += 1 # <<<<<<<<<<<<<< * yi += 1 * elif xloc < yloc: */ __pyx_v_xi = (__pyx_v_xi + 1); /* "pandas/src/sparse.pyx":967 * out[out_i] = op(x[xi], y[yi]) * xi += 1 * yi += 1 # <<<<<<<<<<<<<< * elif xloc < yloc: * # use y fill value */ __pyx_v_yi = (__pyx_v_yi + 1); goto __pyx_L7; } /* "pandas/src/sparse.pyx":968 * xi += 1 * yi += 1 * elif xloc < yloc: # <<<<<<<<<<<<<< * # use y fill value * out[out_i] = op(x[xi], yfill) */ __pyx_t_12 = ((__pyx_v_xloc < __pyx_v_yloc) != 0); if (__pyx_t_12) { /* "pandas/src/sparse.pyx":970 * elif xloc < yloc: * # use y fill value * out[out_i] = op(x[xi], yfill) # <<<<<<<<<<<<<< * xi += 1 * else: */ __pyx_t_22 = __pyx_v_xi; if (__pyx_t_22 < 0) __pyx_t_22 += __pyx_pybuffernd_x.diminfo[0].shape; __pyx_t_23 = __pyx_v_out_i; if (__pyx_t_23 < 0) __pyx_t_23 += __pyx_pybuffernd_out.diminfo[0].shape; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_23, __pyx_pybuffernd_out.diminfo[0].strides) = __pyx_v_op((*__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/src/sparse.pyx":971 * # use y fill value * out[out_i] = op(x[xi], yfill) * xi += 1 # <<<<<<<<<<<<<< * else: * # use x fill value */ __pyx_v_xi = (__pyx_v_xi + 1); goto __pyx_L7; } /*else*/ { /* "pandas/src/sparse.pyx":974 * else: * # use x fill value * out[out_i] = op(xfill, y[yi]) # <<<<<<<<<<<<<< * yi += 1 * */ __pyx_t_24 = __pyx_v_yi; if (__pyx_t_24 < 0) __pyx_t_24 += __pyx_pybuffernd_y.diminfo[0].shape; __pyx_t_25 = __pyx_v_out_i; if (__pyx_t_25 < 0) __pyx_t_25 += __pyx_pybuffernd_out.diminfo[0].shape; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_25, __pyx_pybuffernd_out.diminfo[0].strides) = __pyx_v_op(__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/src/sparse.pyx":975 * # use x fill value * out[out_i] = op(xfill, y[yi]) * yi += 1 # <<<<<<<<<<<<<< * * return out, out_index */ __pyx_v_yi = (__pyx_v_yi + 1); } __pyx_L7:; __pyx_L3_continue:; } /* "pandas/src/sparse.pyx":977 * yi += 1 * * return out, out_index # <<<<<<<<<<<<<< * * cdef inline float64_t __add(float64_t a, float64_t b): */ __Pyx_XDECREF(__pyx_r); __pyx_t_9 = PyTuple_New(2); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 977; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_INCREF(((PyObject *)__pyx_v_out)); PyTuple_SET_ITEM(__pyx_t_9, 0, ((PyObject *)__pyx_v_out)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out)); __Pyx_INCREF(((PyObject *)__pyx_v_out_index)); PyTuple_SET_ITEM(__pyx_t_9, 1, ((PyObject *)__pyx_v_out_index)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out_index)); __pyx_r = ((PyObject*)__pyx_t_9); __pyx_t_9 = 0; goto __pyx_L0; /* "pandas/src/sparse.pyx":923 * * @cython.boundscheck(False) * cdef inline tuple int_op(ndarray x_, IntIndex xindex, float64_t xfill, # <<<<<<<<<<<<<< * ndarray y_, IntIndex yindex, float64_t yfill, * double_func op): */ /* 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_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._sparse.int_op", __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/src/sparse.pyx":979 * return out, out_index * * cdef inline float64_t __add(float64_t a, float64_t b): # <<<<<<<<<<<<<< * return a + b * */ static CYTHON_INLINE __pyx_t_5numpy_float64_t __pyx_f_6pandas_7_sparse___add(__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("__add", 0); /* "pandas/src/sparse.pyx":980 * * cdef inline float64_t __add(float64_t a, float64_t b): * return a + b # <<<<<<<<<<<<<< * * cdef inline float64_t __sub(float64_t a, float64_t b): */ __pyx_r = (__pyx_v_a + __pyx_v_b); goto __pyx_L0; /* "pandas/src/sparse.pyx":979 * return out, out_index * * cdef inline float64_t __add(float64_t a, float64_t b): # <<<<<<<<<<<<<< * return a + b * */ /* function exit code */ __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/sparse.pyx":982 * return a + b * * cdef inline float64_t __sub(float64_t a, float64_t b): # <<<<<<<<<<<<<< * return a - b * */ static CYTHON_INLINE __pyx_t_5numpy_float64_t __pyx_f_6pandas_7_sparse___sub(__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("__sub", 0); /* "pandas/src/sparse.pyx":983 * * cdef inline float64_t __sub(float64_t a, float64_t b): * return a - b # <<<<<<<<<<<<<< * * cdef inline float64_t __rsub(float64_t a, float64_t b): */ __pyx_r = (__pyx_v_a - __pyx_v_b); goto __pyx_L0; /* "pandas/src/sparse.pyx":982 * return a + b * * cdef inline float64_t __sub(float64_t a, float64_t b): # <<<<<<<<<<<<<< * return a - b * */ /* function exit code */ __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/sparse.pyx":985 * return a - b * * cdef inline float64_t __rsub(float64_t a, float64_t b): # <<<<<<<<<<<<<< * return b - a * */ static CYTHON_INLINE __pyx_t_5numpy_float64_t __pyx_f_6pandas_7_sparse___rsub(__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("__rsub", 0); /* "pandas/src/sparse.pyx":986 * * cdef inline float64_t __rsub(float64_t a, float64_t b): * return b - a # <<<<<<<<<<<<<< * * cdef inline float64_t __div(float64_t a, float64_t b): */ __pyx_r = (__pyx_v_b - __pyx_v_a); goto __pyx_L0; /* "pandas/src/sparse.pyx":985 * return a - b * * cdef inline float64_t __rsub(float64_t a, float64_t b): # <<<<<<<<<<<<<< * return b - a * */ /* function exit code */ __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/sparse.pyx":988 * return b - a * * cdef inline float64_t __div(float64_t a, float64_t b): # <<<<<<<<<<<<<< * if b == 0: * if a > 0: */ static CYTHON_INLINE __pyx_t_5numpy_float64_t __pyx_f_6pandas_7_sparse___div(__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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__div", 0); /* "pandas/src/sparse.pyx":989 * * cdef inline float64_t __div(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/src/sparse.pyx":990 * cdef inline float64_t __div(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/src/sparse.pyx":991 * if b == 0: * if a > 0: * return INF # <<<<<<<<<<<<<< * elif a < 0: * return -INF */ __pyx_r = __pyx_v_6pandas_7_sparse_INF; goto __pyx_L0; } /* "pandas/src/sparse.pyx":992 * 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/src/sparse.pyx":993 * return INF * elif a < 0: * return -INF # <<<<<<<<<<<<<< * else: * return NaN */ __pyx_r = (-__pyx_v_6pandas_7_sparse_INF); goto __pyx_L0; } /*else*/ { /* "pandas/src/sparse.pyx":995 * return -INF * else: * return NaN # <<<<<<<<<<<<<< * else: * return a / b */ __pyx_r = __pyx_v_6pandas_7_sparse_NaN; goto __pyx_L0; } } /*else*/ { /* "pandas/src/sparse.pyx":997 * return NaN * else: * return a / b # <<<<<<<<<<<<<< * * cdef inline float64_t __rdiv(float64_t a, float64_t b): */ if (unlikely(__pyx_v_b == 0)) { #ifdef WITH_THREAD PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure(); #endif PyErr_SetString(PyExc_ZeroDivisionError, "float division"); #ifdef WITH_THREAD PyGILState_Release(__pyx_gilstate_save); #endif {__pyx_filename = __pyx_f[0]; __pyx_lineno = 997; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_r = (__pyx_v_a / __pyx_v_b); goto __pyx_L0; } /* "pandas/src/sparse.pyx":988 * return b - a * * cdef inline float64_t __div(float64_t a, float64_t b): # <<<<<<<<<<<<<< * if b == 0: * if a > 0: */ /* function exit code */ __pyx_L1_error:; __Pyx_WriteUnraisable("pandas._sparse.__div", __pyx_clineno, __pyx_lineno, __pyx_filename, 0); __pyx_r = 0; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/sparse.pyx":999 * return a / b * * cdef inline float64_t __rdiv(float64_t a, float64_t b): # <<<<<<<<<<<<<< * return __div(b, a) * */ static CYTHON_INLINE __pyx_t_5numpy_float64_t __pyx_f_6pandas_7_sparse___rdiv(__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("__rdiv", 0); /* "pandas/src/sparse.pyx":1000 * * cdef inline float64_t __rdiv(float64_t a, float64_t b): * return __div(b, a) # <<<<<<<<<<<<<< * * cdef inline float64_t __floordiv(float64_t a, float64_t b): */ __pyx_r = __pyx_f_6pandas_7_sparse___div(__pyx_v_b, __pyx_v_a); goto __pyx_L0; /* "pandas/src/sparse.pyx":999 * return a / b * * cdef inline float64_t __rdiv(float64_t a, float64_t b): # <<<<<<<<<<<<<< * return __div(b, a) * */ /* function exit code */ __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/sparse.pyx":1002 * return __div(b, a) * * cdef inline float64_t __floordiv(float64_t a, float64_t b): # <<<<<<<<<<<<<< * if b == 0: * if a > 0: */ static CYTHON_INLINE __pyx_t_5numpy_float64_t __pyx_f_6pandas_7_sparse___floordiv(__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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__floordiv", 0); /* "pandas/src/sparse.pyx":1003 * * cdef inline float64_t __floordiv(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/src/sparse.pyx":1004 * cdef inline float64_t __floordiv(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/src/sparse.pyx":1005 * if b == 0: * if a > 0: * return INF # <<<<<<<<<<<<<< * elif a < 0: * return -INF */ __pyx_r = __pyx_v_6pandas_7_sparse_INF; goto __pyx_L0; } /* "pandas/src/sparse.pyx":1006 * 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/src/sparse.pyx":1007 * return INF * elif a < 0: * return -INF # <<<<<<<<<<<<<< * else: * return NaN */ __pyx_r = (-__pyx_v_6pandas_7_sparse_INF); goto __pyx_L0; } /*else*/ { /* "pandas/src/sparse.pyx":1009 * return -INF * else: * return NaN # <<<<<<<<<<<<<< * else: * return a // b */ __pyx_r = __pyx_v_6pandas_7_sparse_NaN; goto __pyx_L0; } } /*else*/ { /* "pandas/src/sparse.pyx":1011 * return NaN * else: * return a // b # <<<<<<<<<<<<<< * * cdef inline float64_t __rfloordiv(float64_t a, float64_t b): */ if (unlikely(__pyx_v_b == 0)) { #ifdef WITH_THREAD PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure(); #endif PyErr_SetString(PyExc_ZeroDivisionError, "float division"); #ifdef WITH_THREAD PyGILState_Release(__pyx_gilstate_save); #endif {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1011; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_r = floor(__pyx_v_a / __pyx_v_b); goto __pyx_L0; } /* "pandas/src/sparse.pyx":1002 * return __div(b, a) * * cdef inline float64_t __floordiv(float64_t a, float64_t b): # <<<<<<<<<<<<<< * if b == 0: * if a > 0: */ /* function exit code */ __pyx_L1_error:; __Pyx_WriteUnraisable("pandas._sparse.__floordiv", __pyx_clineno, __pyx_lineno, __pyx_filename, 0); __pyx_r = 0; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/sparse.pyx":1013 * return a // b * * cdef inline float64_t __rfloordiv(float64_t a, float64_t b): # <<<<<<<<<<<<<< * return __floordiv(b, a) * */ static CYTHON_INLINE __pyx_t_5numpy_float64_t __pyx_f_6pandas_7_sparse___rfloordiv(__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("__rfloordiv", 0); /* "pandas/src/sparse.pyx":1014 * * cdef inline float64_t __rfloordiv(float64_t a, float64_t b): * return __floordiv(b, a) # <<<<<<<<<<<<<< * * cdef inline float64_t __mul(float64_t a, float64_t b): */ __pyx_r = __pyx_f_6pandas_7_sparse___floordiv(__pyx_v_b, __pyx_v_a); goto __pyx_L0; /* "pandas/src/sparse.pyx":1013 * return a // b * * cdef inline float64_t __rfloordiv(float64_t a, float64_t b): # <<<<<<<<<<<<<< * return __floordiv(b, a) * */ /* function exit code */ __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/sparse.pyx":1016 * return __floordiv(b, a) * * cdef inline float64_t __mul(float64_t a, float64_t b): # <<<<<<<<<<<<<< * return a * b * cdef inline float64_t __eq(float64_t a, float64_t b): */ static CYTHON_INLINE __pyx_t_5numpy_float64_t __pyx_f_6pandas_7_sparse___mul(__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("__mul", 0); /* "pandas/src/sparse.pyx":1017 * * cdef inline float64_t __mul(float64_t a, float64_t b): * return a * b # <<<<<<<<<<<<<< * cdef inline float64_t __eq(float64_t a, float64_t b): * return a == b */ __pyx_r = (__pyx_v_a * __pyx_v_b); goto __pyx_L0; /* "pandas/src/sparse.pyx":1016 * return __floordiv(b, a) * * cdef inline float64_t __mul(float64_t a, float64_t b): # <<<<<<<<<<<<<< * return a * b * cdef inline float64_t __eq(float64_t a, float64_t b): */ /* function exit code */ __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/sparse.pyx":1018 * cdef inline float64_t __mul(float64_t a, float64_t b): * return a * b * cdef inline float64_t __eq(float64_t a, float64_t b): # <<<<<<<<<<<<<< * return a == b * cdef inline float64_t __ne(float64_t a, float64_t b): */ static CYTHON_INLINE __pyx_t_5numpy_float64_t __pyx_f_6pandas_7_sparse___eq(__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("__eq", 0); /* "pandas/src/sparse.pyx":1019 * return a * b * cdef inline float64_t __eq(float64_t a, float64_t b): * return a == b # <<<<<<<<<<<<<< * cdef inline float64_t __ne(float64_t a, float64_t b): * return a != b */ __pyx_r = (__pyx_v_a == __pyx_v_b); goto __pyx_L0; /* "pandas/src/sparse.pyx":1018 * cdef inline float64_t __mul(float64_t a, float64_t b): * return a * b * cdef inline float64_t __eq(float64_t a, float64_t b): # <<<<<<<<<<<<<< * return a == b * cdef inline float64_t __ne(float64_t a, float64_t b): */ /* function exit code */ __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/sparse.pyx":1020 * cdef inline float64_t __eq(float64_t a, float64_t b): * return a == b * cdef inline float64_t __ne(float64_t a, float64_t b): # <<<<<<<<<<<<<< * return a != b * cdef inline float64_t __lt(float64_t a, float64_t b): */ static CYTHON_INLINE __pyx_t_5numpy_float64_t __pyx_f_6pandas_7_sparse___ne(__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("__ne", 0); /* "pandas/src/sparse.pyx":1021 * return a == b * cdef inline float64_t __ne(float64_t a, float64_t b): * return a != b # <<<<<<<<<<<<<< * cdef inline float64_t __lt(float64_t a, float64_t b): * return a < b */ __pyx_r = (__pyx_v_a != __pyx_v_b); goto __pyx_L0; /* "pandas/src/sparse.pyx":1020 * cdef inline float64_t __eq(float64_t a, float64_t b): * return a == b * cdef inline float64_t __ne(float64_t a, float64_t b): # <<<<<<<<<<<<<< * return a != b * cdef inline float64_t __lt(float64_t a, float64_t b): */ /* function exit code */ __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/sparse.pyx":1022 * cdef inline float64_t __ne(float64_t a, float64_t b): * return a != b * cdef inline float64_t __lt(float64_t a, float64_t b): # <<<<<<<<<<<<<< * return a < b * cdef inline float64_t __gt(float64_t a, float64_t b): */ static CYTHON_INLINE __pyx_t_5numpy_float64_t __pyx_f_6pandas_7_sparse___lt(__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("__lt", 0); /* "pandas/src/sparse.pyx":1023 * return a != b * cdef inline float64_t __lt(float64_t a, float64_t b): * return a < b # <<<<<<<<<<<<<< * cdef inline float64_t __gt(float64_t a, float64_t b): * return a > b */ __pyx_r = (__pyx_v_a < __pyx_v_b); goto __pyx_L0; /* "pandas/src/sparse.pyx":1022 * cdef inline float64_t __ne(float64_t a, float64_t b): * return a != b * cdef inline float64_t __lt(float64_t a, float64_t b): # <<<<<<<<<<<<<< * return a < b * cdef inline float64_t __gt(float64_t a, float64_t b): */ /* function exit code */ __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/sparse.pyx":1024 * cdef inline float64_t __lt(float64_t a, float64_t b): * return a < b * cdef inline float64_t __gt(float64_t a, float64_t b): # <<<<<<<<<<<<<< * return a > b * */ static CYTHON_INLINE __pyx_t_5numpy_float64_t __pyx_f_6pandas_7_sparse___gt(__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("__gt", 0); /* "pandas/src/sparse.pyx":1025 * return a < b * cdef inline float64_t __gt(float64_t a, float64_t b): * return a > b # <<<<<<<<<<<<<< * * cdef inline float64_t __pow(float64_t a, float64_t b): */ __pyx_r = (__pyx_v_a > __pyx_v_b); goto __pyx_L0; /* "pandas/src/sparse.pyx":1024 * cdef inline float64_t __lt(float64_t a, float64_t b): * return a < b * cdef inline float64_t __gt(float64_t a, float64_t b): # <<<<<<<<<<<<<< * return a > b * */ /* function exit code */ __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/sparse.pyx":1027 * return a > b * * cdef inline float64_t __pow(float64_t a, float64_t b): # <<<<<<<<<<<<<< * # NaN * if a != a or b != b: */ static CYTHON_INLINE __pyx_t_5numpy_float64_t __pyx_f_6pandas_7_sparse___pow(__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; int __pyx_t_2; int __pyx_t_3; __Pyx_RefNannySetupContext("__pow", 0); /* "pandas/src/sparse.pyx":1029 * cdef inline float64_t __pow(float64_t a, float64_t b): * # NaN * if a != a or b != b: # <<<<<<<<<<<<<< * return NaN * return a ** b */ __pyx_t_1 = ((__pyx_v_a != __pyx_v_a) != 0); if (!__pyx_t_1) { __pyx_t_2 = ((__pyx_v_b != __pyx_v_b) != 0); __pyx_t_3 = __pyx_t_2; } else { __pyx_t_3 = __pyx_t_1; } if (__pyx_t_3) { /* "pandas/src/sparse.pyx":1030 * # NaN * if a != a or b != b: * return NaN # <<<<<<<<<<<<<< * return a ** b * */ __pyx_r = __pyx_v_6pandas_7_sparse_NaN; goto __pyx_L0; } /* "pandas/src/sparse.pyx":1031 * if a != a or b != b: * return NaN * return a ** b # <<<<<<<<<<<<<< * * cdef inline float64_t __rpow(float64_t a, float64_t b): */ __pyx_r = pow(__pyx_v_a, __pyx_v_b); goto __pyx_L0; /* "pandas/src/sparse.pyx":1027 * return a > b * * cdef inline float64_t __pow(float64_t a, float64_t b): # <<<<<<<<<<<<<< * # NaN * if a != a or b != b: */ /* function exit code */ __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/sparse.pyx":1033 * return a ** b * * cdef inline float64_t __rpow(float64_t a, float64_t b): # <<<<<<<<<<<<<< * return __pow(b, a) * */ static CYTHON_INLINE __pyx_t_5numpy_float64_t __pyx_f_6pandas_7_sparse___rpow(__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("__rpow", 0); /* "pandas/src/sparse.pyx":1034 * * cdef inline float64_t __rpow(float64_t a, float64_t b): * return __pow(b, a) # <<<<<<<<<<<<<< * * */ __pyx_r = __pyx_f_6pandas_7_sparse___pow(__pyx_v_b, __pyx_v_a); goto __pyx_L0; /* "pandas/src/sparse.pyx":1033 * return a ** b * * cdef inline float64_t __rpow(float64_t a, float64_t b): # <<<<<<<<<<<<<< * return __pow(b, a) * */ /* function exit code */ __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/sparse.pyx":1040 * # TODO: quantify performance boost to "templating" * * cpdef sparse_nanadd(ndarray x, SparseIndex xindex, # <<<<<<<<<<<<<< * ndarray y, SparseIndex yindex): * return sparse_nancombine(x, xindex, y, yindex, __add) */ static PyObject *__pyx_pw_6pandas_7_sparse_3sparse_nanadd(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_6pandas_7_sparse_sparse_nanadd(PyArrayObject *__pyx_v_x, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_xindex, PyArrayObject *__pyx_v_y, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_yindex, CYTHON_UNUSED int __pyx_skip_dispatch) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("sparse_nanadd", 0); /* "pandas/src/sparse.pyx":1042 * cpdef sparse_nanadd(ndarray x, SparseIndex xindex, * ndarray y, SparseIndex yindex): * return sparse_nancombine(x, xindex, y, yindex, __add) # <<<<<<<<<<<<<< * * cpdef sparse_nansub(ndarray x, SparseIndex xindex, */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_6pandas_7_sparse_sparse_nancombine(__pyx_v_x, __pyx_v_xindex, __pyx_v_y, __pyx_v_yindex, __pyx_f_6pandas_7_sparse___add); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1042; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "pandas/src/sparse.pyx":1040 * # TODO: quantify performance boost to "templating" * * cpdef sparse_nanadd(ndarray x, SparseIndex xindex, # <<<<<<<<<<<<<< * ndarray y, SparseIndex yindex): * return sparse_nancombine(x, xindex, y, yindex, __add) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas._sparse.sparse_nanadd", __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_7_sparse_3sparse_nanadd(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_6pandas_7_sparse_3sparse_nanadd(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_x = 0; struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_xindex = 0; PyArrayObject *__pyx_v_y = 0; struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_yindex = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("sparse_nanadd (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_x,&__pyx_n_s_xindex,&__pyx_n_s_y,&__pyx_n_s_yindex,0}; PyObject* values[4] = {0,0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_x)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_xindex)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_nanadd", 1, 4, 4, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1040; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_y)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_nanadd", 1, 4, 4, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1040; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_yindex)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_nanadd", 1, 4, 4, 3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1040; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "sparse_nanadd") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1040; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 4) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[3] = PyTuple_GET_ITEM(__pyx_args, 3); } __pyx_v_x = ((PyArrayObject *)values[0]); __pyx_v_xindex = ((struct __pyx_obj_6pandas_7_sparse_SparseIndex *)values[1]); __pyx_v_y = ((PyArrayObject *)values[2]); __pyx_v_yindex = ((struct __pyx_obj_6pandas_7_sparse_SparseIndex *)values[3]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("sparse_nanadd", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1040; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas._sparse.sparse_nanadd", __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_filename = __pyx_f[0]; __pyx_lineno = 1040; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_xindex), __pyx_ptype_6pandas_7_sparse_SparseIndex, 1, "xindex", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1040; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_y), __pyx_ptype_5numpy_ndarray, 1, "y", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1041; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_yindex), __pyx_ptype_6pandas_7_sparse_SparseIndex, 1, "yindex", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1041; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_7_sparse_2sparse_nanadd(__pyx_self, __pyx_v_x, __pyx_v_xindex, __pyx_v_y, __pyx_v_yindex); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_7_sparse_2sparse_nanadd(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_x, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_xindex, PyArrayObject *__pyx_v_y, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_yindex) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("sparse_nanadd", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_6pandas_7_sparse_sparse_nanadd(__pyx_v_x, __pyx_v_xindex, __pyx_v_y, __pyx_v_yindex, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1040; __pyx_clineno = __LINE__; goto __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._sparse.sparse_nanadd", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/sparse.pyx":1044 * return sparse_nancombine(x, xindex, y, yindex, __add) * * cpdef sparse_nansub(ndarray x, SparseIndex xindex, # <<<<<<<<<<<<<< * ndarray y, SparseIndex yindex): * return sparse_nancombine(x, xindex, y, yindex, __sub) */ static PyObject *__pyx_pw_6pandas_7_sparse_5sparse_nansub(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_6pandas_7_sparse_sparse_nansub(PyArrayObject *__pyx_v_x, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_xindex, PyArrayObject *__pyx_v_y, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_yindex, CYTHON_UNUSED int __pyx_skip_dispatch) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("sparse_nansub", 0); /* "pandas/src/sparse.pyx":1046 * cpdef sparse_nansub(ndarray x, SparseIndex xindex, * ndarray y, SparseIndex yindex): * return sparse_nancombine(x, xindex, y, yindex, __sub) # <<<<<<<<<<<<<< * * cpdef sparse_nanrsub(ndarray x, SparseIndex xindex, */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_6pandas_7_sparse_sparse_nancombine(__pyx_v_x, __pyx_v_xindex, __pyx_v_y, __pyx_v_yindex, __pyx_f_6pandas_7_sparse___sub); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1046; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "pandas/src/sparse.pyx":1044 * return sparse_nancombine(x, xindex, y, yindex, __add) * * cpdef sparse_nansub(ndarray x, SparseIndex xindex, # <<<<<<<<<<<<<< * ndarray y, SparseIndex yindex): * return sparse_nancombine(x, xindex, y, yindex, __sub) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas._sparse.sparse_nansub", __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_7_sparse_5sparse_nansub(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_6pandas_7_sparse_5sparse_nansub(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_x = 0; struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_xindex = 0; PyArrayObject *__pyx_v_y = 0; struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_yindex = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("sparse_nansub (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_x,&__pyx_n_s_xindex,&__pyx_n_s_y,&__pyx_n_s_yindex,0}; PyObject* values[4] = {0,0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_x)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_xindex)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_nansub", 1, 4, 4, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1044; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_y)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_nansub", 1, 4, 4, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1044; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_yindex)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_nansub", 1, 4, 4, 3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1044; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "sparse_nansub") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1044; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 4) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[3] = PyTuple_GET_ITEM(__pyx_args, 3); } __pyx_v_x = ((PyArrayObject *)values[0]); __pyx_v_xindex = ((struct __pyx_obj_6pandas_7_sparse_SparseIndex *)values[1]); __pyx_v_y = ((PyArrayObject *)values[2]); __pyx_v_yindex = ((struct __pyx_obj_6pandas_7_sparse_SparseIndex *)values[3]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("sparse_nansub", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1044; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas._sparse.sparse_nansub", __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_filename = __pyx_f[0]; __pyx_lineno = 1044; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_xindex), __pyx_ptype_6pandas_7_sparse_SparseIndex, 1, "xindex", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1044; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_y), __pyx_ptype_5numpy_ndarray, 1, "y", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1045; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_yindex), __pyx_ptype_6pandas_7_sparse_SparseIndex, 1, "yindex", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1045; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_7_sparse_4sparse_nansub(__pyx_self, __pyx_v_x, __pyx_v_xindex, __pyx_v_y, __pyx_v_yindex); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_7_sparse_4sparse_nansub(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_x, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_xindex, PyArrayObject *__pyx_v_y, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_yindex) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("sparse_nansub", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_6pandas_7_sparse_sparse_nansub(__pyx_v_x, __pyx_v_xindex, __pyx_v_y, __pyx_v_yindex, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1044; __pyx_clineno = __LINE__; goto __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._sparse.sparse_nansub", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/sparse.pyx":1048 * return sparse_nancombine(x, xindex, y, yindex, __sub) * * cpdef sparse_nanrsub(ndarray x, SparseIndex xindex, # <<<<<<<<<<<<<< * ndarray y, SparseIndex yindex): * return sparse_nancombine(x, xindex, y, yindex, __rsub) */ static PyObject *__pyx_pw_6pandas_7_sparse_7sparse_nanrsub(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_6pandas_7_sparse_sparse_nanrsub(PyArrayObject *__pyx_v_x, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_xindex, PyArrayObject *__pyx_v_y, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_yindex, CYTHON_UNUSED int __pyx_skip_dispatch) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("sparse_nanrsub", 0); /* "pandas/src/sparse.pyx":1050 * cpdef sparse_nanrsub(ndarray x, SparseIndex xindex, * ndarray y, SparseIndex yindex): * return sparse_nancombine(x, xindex, y, yindex, __rsub) # <<<<<<<<<<<<<< * * cpdef sparse_nanmul(ndarray x, SparseIndex xindex, */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_6pandas_7_sparse_sparse_nancombine(__pyx_v_x, __pyx_v_xindex, __pyx_v_y, __pyx_v_yindex, __pyx_f_6pandas_7_sparse___rsub); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1050; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "pandas/src/sparse.pyx":1048 * return sparse_nancombine(x, xindex, y, yindex, __sub) * * cpdef sparse_nanrsub(ndarray x, SparseIndex xindex, # <<<<<<<<<<<<<< * ndarray y, SparseIndex yindex): * return sparse_nancombine(x, xindex, y, yindex, __rsub) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas._sparse.sparse_nanrsub", __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_7_sparse_7sparse_nanrsub(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_6pandas_7_sparse_7sparse_nanrsub(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_x = 0; struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_xindex = 0; PyArrayObject *__pyx_v_y = 0; struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_yindex = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("sparse_nanrsub (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_x,&__pyx_n_s_xindex,&__pyx_n_s_y,&__pyx_n_s_yindex,0}; PyObject* values[4] = {0,0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_x)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_xindex)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_nanrsub", 1, 4, 4, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1048; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_y)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_nanrsub", 1, 4, 4, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1048; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_yindex)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_nanrsub", 1, 4, 4, 3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1048; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "sparse_nanrsub") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1048; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 4) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[3] = PyTuple_GET_ITEM(__pyx_args, 3); } __pyx_v_x = ((PyArrayObject *)values[0]); __pyx_v_xindex = ((struct __pyx_obj_6pandas_7_sparse_SparseIndex *)values[1]); __pyx_v_y = ((PyArrayObject *)values[2]); __pyx_v_yindex = ((struct __pyx_obj_6pandas_7_sparse_SparseIndex *)values[3]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("sparse_nanrsub", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1048; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas._sparse.sparse_nanrsub", __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_filename = __pyx_f[0]; __pyx_lineno = 1048; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_xindex), __pyx_ptype_6pandas_7_sparse_SparseIndex, 1, "xindex", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1048; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_y), __pyx_ptype_5numpy_ndarray, 1, "y", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1049; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_yindex), __pyx_ptype_6pandas_7_sparse_SparseIndex, 1, "yindex", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1049; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_7_sparse_6sparse_nanrsub(__pyx_self, __pyx_v_x, __pyx_v_xindex, __pyx_v_y, __pyx_v_yindex); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_7_sparse_6sparse_nanrsub(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_x, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_xindex, PyArrayObject *__pyx_v_y, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_yindex) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("sparse_nanrsub", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_6pandas_7_sparse_sparse_nanrsub(__pyx_v_x, __pyx_v_xindex, __pyx_v_y, __pyx_v_yindex, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1048; __pyx_clineno = __LINE__; goto __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._sparse.sparse_nanrsub", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/sparse.pyx":1052 * return sparse_nancombine(x, xindex, y, yindex, __rsub) * * cpdef sparse_nanmul(ndarray x, SparseIndex xindex, # <<<<<<<<<<<<<< * ndarray y, SparseIndex yindex): * return sparse_nancombine(x, xindex, y, yindex, __mul) */ static PyObject *__pyx_pw_6pandas_7_sparse_9sparse_nanmul(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_6pandas_7_sparse_sparse_nanmul(PyArrayObject *__pyx_v_x, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_xindex, PyArrayObject *__pyx_v_y, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_yindex, CYTHON_UNUSED int __pyx_skip_dispatch) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("sparse_nanmul", 0); /* "pandas/src/sparse.pyx":1054 * cpdef sparse_nanmul(ndarray x, SparseIndex xindex, * ndarray y, SparseIndex yindex): * return sparse_nancombine(x, xindex, y, yindex, __mul) # <<<<<<<<<<<<<< * * cpdef sparse_nandiv(ndarray x, SparseIndex xindex, */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_6pandas_7_sparse_sparse_nancombine(__pyx_v_x, __pyx_v_xindex, __pyx_v_y, __pyx_v_yindex, __pyx_f_6pandas_7_sparse___mul); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1054; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "pandas/src/sparse.pyx":1052 * return sparse_nancombine(x, xindex, y, yindex, __rsub) * * cpdef sparse_nanmul(ndarray x, SparseIndex xindex, # <<<<<<<<<<<<<< * ndarray y, SparseIndex yindex): * return sparse_nancombine(x, xindex, y, yindex, __mul) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas._sparse.sparse_nanmul", __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_7_sparse_9sparse_nanmul(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_6pandas_7_sparse_9sparse_nanmul(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_x = 0; struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_xindex = 0; PyArrayObject *__pyx_v_y = 0; struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_yindex = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("sparse_nanmul (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_x,&__pyx_n_s_xindex,&__pyx_n_s_y,&__pyx_n_s_yindex,0}; PyObject* values[4] = {0,0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_x)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_xindex)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_nanmul", 1, 4, 4, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1052; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_y)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_nanmul", 1, 4, 4, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1052; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_yindex)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_nanmul", 1, 4, 4, 3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1052; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "sparse_nanmul") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1052; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 4) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[3] = PyTuple_GET_ITEM(__pyx_args, 3); } __pyx_v_x = ((PyArrayObject *)values[0]); __pyx_v_xindex = ((struct __pyx_obj_6pandas_7_sparse_SparseIndex *)values[1]); __pyx_v_y = ((PyArrayObject *)values[2]); __pyx_v_yindex = ((struct __pyx_obj_6pandas_7_sparse_SparseIndex *)values[3]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("sparse_nanmul", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1052; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas._sparse.sparse_nanmul", __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_filename = __pyx_f[0]; __pyx_lineno = 1052; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_xindex), __pyx_ptype_6pandas_7_sparse_SparseIndex, 1, "xindex", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1052; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_y), __pyx_ptype_5numpy_ndarray, 1, "y", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1053; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_yindex), __pyx_ptype_6pandas_7_sparse_SparseIndex, 1, "yindex", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1053; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_7_sparse_8sparse_nanmul(__pyx_self, __pyx_v_x, __pyx_v_xindex, __pyx_v_y, __pyx_v_yindex); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_7_sparse_8sparse_nanmul(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_x, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_xindex, PyArrayObject *__pyx_v_y, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_yindex) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("sparse_nanmul", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_6pandas_7_sparse_sparse_nanmul(__pyx_v_x, __pyx_v_xindex, __pyx_v_y, __pyx_v_yindex, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1052; __pyx_clineno = __LINE__; goto __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._sparse.sparse_nanmul", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/sparse.pyx":1056 * return sparse_nancombine(x, xindex, y, yindex, __mul) * * cpdef sparse_nandiv(ndarray x, SparseIndex xindex, # <<<<<<<<<<<<<< * ndarray y, SparseIndex yindex): * return sparse_nancombine(x, xindex, y, yindex, __div) */ static PyObject *__pyx_pw_6pandas_7_sparse_11sparse_nandiv(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_6pandas_7_sparse_sparse_nandiv(PyArrayObject *__pyx_v_x, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_xindex, PyArrayObject *__pyx_v_y, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_yindex, CYTHON_UNUSED int __pyx_skip_dispatch) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("sparse_nandiv", 0); /* "pandas/src/sparse.pyx":1058 * cpdef sparse_nandiv(ndarray x, SparseIndex xindex, * ndarray y, SparseIndex yindex): * return sparse_nancombine(x, xindex, y, yindex, __div) # <<<<<<<<<<<<<< * * cpdef sparse_nanrdiv(ndarray x, SparseIndex xindex, */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_6pandas_7_sparse_sparse_nancombine(__pyx_v_x, __pyx_v_xindex, __pyx_v_y, __pyx_v_yindex, __pyx_f_6pandas_7_sparse___div); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1058; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "pandas/src/sparse.pyx":1056 * return sparse_nancombine(x, xindex, y, yindex, __mul) * * cpdef sparse_nandiv(ndarray x, SparseIndex xindex, # <<<<<<<<<<<<<< * ndarray y, SparseIndex yindex): * return sparse_nancombine(x, xindex, y, yindex, __div) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas._sparse.sparse_nandiv", __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_7_sparse_11sparse_nandiv(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_6pandas_7_sparse_11sparse_nandiv(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_x = 0; struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_xindex = 0; PyArrayObject *__pyx_v_y = 0; struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_yindex = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("sparse_nandiv (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_x,&__pyx_n_s_xindex,&__pyx_n_s_y,&__pyx_n_s_yindex,0}; PyObject* values[4] = {0,0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_x)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_xindex)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_nandiv", 1, 4, 4, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1056; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_y)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_nandiv", 1, 4, 4, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1056; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_yindex)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_nandiv", 1, 4, 4, 3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1056; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "sparse_nandiv") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1056; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 4) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[3] = PyTuple_GET_ITEM(__pyx_args, 3); } __pyx_v_x = ((PyArrayObject *)values[0]); __pyx_v_xindex = ((struct __pyx_obj_6pandas_7_sparse_SparseIndex *)values[1]); __pyx_v_y = ((PyArrayObject *)values[2]); __pyx_v_yindex = ((struct __pyx_obj_6pandas_7_sparse_SparseIndex *)values[3]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("sparse_nandiv", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1056; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas._sparse.sparse_nandiv", __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_filename = __pyx_f[0]; __pyx_lineno = 1056; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_xindex), __pyx_ptype_6pandas_7_sparse_SparseIndex, 1, "xindex", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1056; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_y), __pyx_ptype_5numpy_ndarray, 1, "y", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1057; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_yindex), __pyx_ptype_6pandas_7_sparse_SparseIndex, 1, "yindex", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1057; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_7_sparse_10sparse_nandiv(__pyx_self, __pyx_v_x, __pyx_v_xindex, __pyx_v_y, __pyx_v_yindex); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_7_sparse_10sparse_nandiv(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_x, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_xindex, PyArrayObject *__pyx_v_y, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_yindex) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("sparse_nandiv", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_6pandas_7_sparse_sparse_nandiv(__pyx_v_x, __pyx_v_xindex, __pyx_v_y, __pyx_v_yindex, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1056; __pyx_clineno = __LINE__; goto __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._sparse.sparse_nandiv", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/sparse.pyx":1060 * return sparse_nancombine(x, xindex, y, yindex, __div) * * cpdef sparse_nanrdiv(ndarray x, SparseIndex xindex, # <<<<<<<<<<<<<< * ndarray y, SparseIndex yindex): * return sparse_nancombine(x, xindex, y, yindex, __rdiv) */ static PyObject *__pyx_pw_6pandas_7_sparse_13sparse_nanrdiv(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_6pandas_7_sparse_sparse_nanrdiv(PyArrayObject *__pyx_v_x, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_xindex, PyArrayObject *__pyx_v_y, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_yindex, CYTHON_UNUSED int __pyx_skip_dispatch) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("sparse_nanrdiv", 0); /* "pandas/src/sparse.pyx":1062 * cpdef sparse_nanrdiv(ndarray x, SparseIndex xindex, * ndarray y, SparseIndex yindex): * return sparse_nancombine(x, xindex, y, yindex, __rdiv) # <<<<<<<<<<<<<< * * sparse_nantruediv = sparse_nandiv */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_6pandas_7_sparse_sparse_nancombine(__pyx_v_x, __pyx_v_xindex, __pyx_v_y, __pyx_v_yindex, __pyx_f_6pandas_7_sparse___rdiv); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1062; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "pandas/src/sparse.pyx":1060 * return sparse_nancombine(x, xindex, y, yindex, __div) * * cpdef sparse_nanrdiv(ndarray x, SparseIndex xindex, # <<<<<<<<<<<<<< * ndarray y, SparseIndex yindex): * return sparse_nancombine(x, xindex, y, yindex, __rdiv) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas._sparse.sparse_nanrdiv", __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_7_sparse_13sparse_nanrdiv(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_6pandas_7_sparse_13sparse_nanrdiv(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_x = 0; struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_xindex = 0; PyArrayObject *__pyx_v_y = 0; struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_yindex = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("sparse_nanrdiv (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_x,&__pyx_n_s_xindex,&__pyx_n_s_y,&__pyx_n_s_yindex,0}; PyObject* values[4] = {0,0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_x)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_xindex)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_nanrdiv", 1, 4, 4, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1060; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_y)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_nanrdiv", 1, 4, 4, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1060; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_yindex)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_nanrdiv", 1, 4, 4, 3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1060; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "sparse_nanrdiv") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1060; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 4) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[3] = PyTuple_GET_ITEM(__pyx_args, 3); } __pyx_v_x = ((PyArrayObject *)values[0]); __pyx_v_xindex = ((struct __pyx_obj_6pandas_7_sparse_SparseIndex *)values[1]); __pyx_v_y = ((PyArrayObject *)values[2]); __pyx_v_yindex = ((struct __pyx_obj_6pandas_7_sparse_SparseIndex *)values[3]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("sparse_nanrdiv", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1060; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas._sparse.sparse_nanrdiv", __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_filename = __pyx_f[0]; __pyx_lineno = 1060; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_xindex), __pyx_ptype_6pandas_7_sparse_SparseIndex, 1, "xindex", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1060; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_y), __pyx_ptype_5numpy_ndarray, 1, "y", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1061; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_yindex), __pyx_ptype_6pandas_7_sparse_SparseIndex, 1, "yindex", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1061; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_7_sparse_12sparse_nanrdiv(__pyx_self, __pyx_v_x, __pyx_v_xindex, __pyx_v_y, __pyx_v_yindex); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_7_sparse_12sparse_nanrdiv(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_x, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_xindex, PyArrayObject *__pyx_v_y, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_yindex) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("sparse_nanrdiv", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_6pandas_7_sparse_sparse_nanrdiv(__pyx_v_x, __pyx_v_xindex, __pyx_v_y, __pyx_v_yindex, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1060; __pyx_clineno = __LINE__; goto __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._sparse.sparse_nanrdiv", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/sparse.pyx":1067 * sparse_nanrtruediv = sparse_nanrdiv * * cpdef sparse_nanfloordiv(ndarray x, SparseIndex xindex, # <<<<<<<<<<<<<< * ndarray y, SparseIndex yindex): * return sparse_nancombine(x, xindex, y, yindex, __floordiv) */ static PyObject *__pyx_pw_6pandas_7_sparse_15sparse_nanfloordiv(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_6pandas_7_sparse_sparse_nanfloordiv(PyArrayObject *__pyx_v_x, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_xindex, PyArrayObject *__pyx_v_y, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_yindex, CYTHON_UNUSED int __pyx_skip_dispatch) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("sparse_nanfloordiv", 0); /* "pandas/src/sparse.pyx":1069 * cpdef sparse_nanfloordiv(ndarray x, SparseIndex xindex, * ndarray y, SparseIndex yindex): * return sparse_nancombine(x, xindex, y, yindex, __floordiv) # <<<<<<<<<<<<<< * * cpdef sparse_nanrfloordiv(ndarray x, SparseIndex xindex, */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_6pandas_7_sparse_sparse_nancombine(__pyx_v_x, __pyx_v_xindex, __pyx_v_y, __pyx_v_yindex, __pyx_f_6pandas_7_sparse___floordiv); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1069; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "pandas/src/sparse.pyx":1067 * sparse_nanrtruediv = sparse_nanrdiv * * cpdef sparse_nanfloordiv(ndarray x, SparseIndex xindex, # <<<<<<<<<<<<<< * ndarray y, SparseIndex yindex): * return sparse_nancombine(x, xindex, y, yindex, __floordiv) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas._sparse.sparse_nanfloordiv", __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_7_sparse_15sparse_nanfloordiv(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_6pandas_7_sparse_15sparse_nanfloordiv(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_x = 0; struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_xindex = 0; PyArrayObject *__pyx_v_y = 0; struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_yindex = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("sparse_nanfloordiv (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_x,&__pyx_n_s_xindex,&__pyx_n_s_y,&__pyx_n_s_yindex,0}; PyObject* values[4] = {0,0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_x)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_xindex)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_nanfloordiv", 1, 4, 4, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1067; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_y)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_nanfloordiv", 1, 4, 4, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1067; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_yindex)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_nanfloordiv", 1, 4, 4, 3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1067; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "sparse_nanfloordiv") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1067; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 4) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[3] = PyTuple_GET_ITEM(__pyx_args, 3); } __pyx_v_x = ((PyArrayObject *)values[0]); __pyx_v_xindex = ((struct __pyx_obj_6pandas_7_sparse_SparseIndex *)values[1]); __pyx_v_y = ((PyArrayObject *)values[2]); __pyx_v_yindex = ((struct __pyx_obj_6pandas_7_sparse_SparseIndex *)values[3]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("sparse_nanfloordiv", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1067; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas._sparse.sparse_nanfloordiv", __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_filename = __pyx_f[0]; __pyx_lineno = 1067; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_xindex), __pyx_ptype_6pandas_7_sparse_SparseIndex, 1, "xindex", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1067; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_y), __pyx_ptype_5numpy_ndarray, 1, "y", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1068; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_yindex), __pyx_ptype_6pandas_7_sparse_SparseIndex, 1, "yindex", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1068; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_7_sparse_14sparse_nanfloordiv(__pyx_self, __pyx_v_x, __pyx_v_xindex, __pyx_v_y, __pyx_v_yindex); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_7_sparse_14sparse_nanfloordiv(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_x, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_xindex, PyArrayObject *__pyx_v_y, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_yindex) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("sparse_nanfloordiv", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_6pandas_7_sparse_sparse_nanfloordiv(__pyx_v_x, __pyx_v_xindex, __pyx_v_y, __pyx_v_yindex, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1067; __pyx_clineno = __LINE__; goto __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._sparse.sparse_nanfloordiv", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/sparse.pyx":1071 * return sparse_nancombine(x, xindex, y, yindex, __floordiv) * * cpdef sparse_nanrfloordiv(ndarray x, SparseIndex xindex, # <<<<<<<<<<<<<< * ndarray y, SparseIndex yindex): * return sparse_nancombine(x, xindex, y, yindex, __rfloordiv) */ static PyObject *__pyx_pw_6pandas_7_sparse_17sparse_nanrfloordiv(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_6pandas_7_sparse_sparse_nanrfloordiv(PyArrayObject *__pyx_v_x, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_xindex, PyArrayObject *__pyx_v_y, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_yindex, CYTHON_UNUSED int __pyx_skip_dispatch) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("sparse_nanrfloordiv", 0); /* "pandas/src/sparse.pyx":1073 * cpdef sparse_nanrfloordiv(ndarray x, SparseIndex xindex, * ndarray y, SparseIndex yindex): * return sparse_nancombine(x, xindex, y, yindex, __rfloordiv) # <<<<<<<<<<<<<< * * cpdef sparse_nanpow(ndarray x, SparseIndex xindex, */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_6pandas_7_sparse_sparse_nancombine(__pyx_v_x, __pyx_v_xindex, __pyx_v_y, __pyx_v_yindex, __pyx_f_6pandas_7_sparse___rfloordiv); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1073; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "pandas/src/sparse.pyx":1071 * return sparse_nancombine(x, xindex, y, yindex, __floordiv) * * cpdef sparse_nanrfloordiv(ndarray x, SparseIndex xindex, # <<<<<<<<<<<<<< * ndarray y, SparseIndex yindex): * return sparse_nancombine(x, xindex, y, yindex, __rfloordiv) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas._sparse.sparse_nanrfloordiv", __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_7_sparse_17sparse_nanrfloordiv(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_6pandas_7_sparse_17sparse_nanrfloordiv(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_x = 0; struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_xindex = 0; PyArrayObject *__pyx_v_y = 0; struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_yindex = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("sparse_nanrfloordiv (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_x,&__pyx_n_s_xindex,&__pyx_n_s_y,&__pyx_n_s_yindex,0}; PyObject* values[4] = {0,0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_x)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_xindex)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_nanrfloordiv", 1, 4, 4, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1071; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_y)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_nanrfloordiv", 1, 4, 4, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1071; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_yindex)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_nanrfloordiv", 1, 4, 4, 3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1071; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "sparse_nanrfloordiv") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1071; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 4) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[3] = PyTuple_GET_ITEM(__pyx_args, 3); } __pyx_v_x = ((PyArrayObject *)values[0]); __pyx_v_xindex = ((struct __pyx_obj_6pandas_7_sparse_SparseIndex *)values[1]); __pyx_v_y = ((PyArrayObject *)values[2]); __pyx_v_yindex = ((struct __pyx_obj_6pandas_7_sparse_SparseIndex *)values[3]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("sparse_nanrfloordiv", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1071; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas._sparse.sparse_nanrfloordiv", __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_filename = __pyx_f[0]; __pyx_lineno = 1071; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_xindex), __pyx_ptype_6pandas_7_sparse_SparseIndex, 1, "xindex", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1071; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_y), __pyx_ptype_5numpy_ndarray, 1, "y", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1072; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_yindex), __pyx_ptype_6pandas_7_sparse_SparseIndex, 1, "yindex", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1072; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_7_sparse_16sparse_nanrfloordiv(__pyx_self, __pyx_v_x, __pyx_v_xindex, __pyx_v_y, __pyx_v_yindex); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_7_sparse_16sparse_nanrfloordiv(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_x, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_xindex, PyArrayObject *__pyx_v_y, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_yindex) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("sparse_nanrfloordiv", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_6pandas_7_sparse_sparse_nanrfloordiv(__pyx_v_x, __pyx_v_xindex, __pyx_v_y, __pyx_v_yindex, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1071; __pyx_clineno = __LINE__; goto __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._sparse.sparse_nanrfloordiv", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/sparse.pyx":1075 * return sparse_nancombine(x, xindex, y, yindex, __rfloordiv) * * cpdef sparse_nanpow(ndarray x, SparseIndex xindex, # <<<<<<<<<<<<<< * ndarray y, SparseIndex yindex): * return sparse_nancombine(x, xindex, y, yindex, __pow) */ static PyObject *__pyx_pw_6pandas_7_sparse_19sparse_nanpow(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_6pandas_7_sparse_sparse_nanpow(PyArrayObject *__pyx_v_x, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_xindex, PyArrayObject *__pyx_v_y, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_yindex, CYTHON_UNUSED int __pyx_skip_dispatch) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("sparse_nanpow", 0); /* "pandas/src/sparse.pyx":1077 * cpdef sparse_nanpow(ndarray x, SparseIndex xindex, * ndarray y, SparseIndex yindex): * return sparse_nancombine(x, xindex, y, yindex, __pow) # <<<<<<<<<<<<<< * * cpdef sparse_nanrpow(ndarray x, SparseIndex xindex, */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_6pandas_7_sparse_sparse_nancombine(__pyx_v_x, __pyx_v_xindex, __pyx_v_y, __pyx_v_yindex, __pyx_f_6pandas_7_sparse___pow); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1077; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "pandas/src/sparse.pyx":1075 * return sparse_nancombine(x, xindex, y, yindex, __rfloordiv) * * cpdef sparse_nanpow(ndarray x, SparseIndex xindex, # <<<<<<<<<<<<<< * ndarray y, SparseIndex yindex): * return sparse_nancombine(x, xindex, y, yindex, __pow) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas._sparse.sparse_nanpow", __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_7_sparse_19sparse_nanpow(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_6pandas_7_sparse_19sparse_nanpow(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_x = 0; struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_xindex = 0; PyArrayObject *__pyx_v_y = 0; struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_yindex = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("sparse_nanpow (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_x,&__pyx_n_s_xindex,&__pyx_n_s_y,&__pyx_n_s_yindex,0}; PyObject* values[4] = {0,0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_x)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_xindex)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_nanpow", 1, 4, 4, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1075; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_y)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_nanpow", 1, 4, 4, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1075; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_yindex)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_nanpow", 1, 4, 4, 3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1075; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "sparse_nanpow") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1075; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 4) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[3] = PyTuple_GET_ITEM(__pyx_args, 3); } __pyx_v_x = ((PyArrayObject *)values[0]); __pyx_v_xindex = ((struct __pyx_obj_6pandas_7_sparse_SparseIndex *)values[1]); __pyx_v_y = ((PyArrayObject *)values[2]); __pyx_v_yindex = ((struct __pyx_obj_6pandas_7_sparse_SparseIndex *)values[3]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("sparse_nanpow", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1075; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas._sparse.sparse_nanpow", __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_filename = __pyx_f[0]; __pyx_lineno = 1075; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_xindex), __pyx_ptype_6pandas_7_sparse_SparseIndex, 1, "xindex", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1075; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_y), __pyx_ptype_5numpy_ndarray, 1, "y", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1076; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_yindex), __pyx_ptype_6pandas_7_sparse_SparseIndex, 1, "yindex", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1076; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_7_sparse_18sparse_nanpow(__pyx_self, __pyx_v_x, __pyx_v_xindex, __pyx_v_y, __pyx_v_yindex); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_7_sparse_18sparse_nanpow(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_x, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_xindex, PyArrayObject *__pyx_v_y, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_yindex) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("sparse_nanpow", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_6pandas_7_sparse_sparse_nanpow(__pyx_v_x, __pyx_v_xindex, __pyx_v_y, __pyx_v_yindex, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1075; __pyx_clineno = __LINE__; goto __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._sparse.sparse_nanpow", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/sparse.pyx":1079 * return sparse_nancombine(x, xindex, y, yindex, __pow) * * cpdef sparse_nanrpow(ndarray x, SparseIndex xindex, # <<<<<<<<<<<<<< * ndarray y, SparseIndex yindex): * return sparse_nancombine(x, xindex, y, yindex, __rpow) */ static PyObject *__pyx_pw_6pandas_7_sparse_21sparse_nanrpow(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_6pandas_7_sparse_sparse_nanrpow(PyArrayObject *__pyx_v_x, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_xindex, PyArrayObject *__pyx_v_y, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_yindex, CYTHON_UNUSED int __pyx_skip_dispatch) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("sparse_nanrpow", 0); /* "pandas/src/sparse.pyx":1081 * cpdef sparse_nanrpow(ndarray x, SparseIndex xindex, * ndarray y, SparseIndex yindex): * return sparse_nancombine(x, xindex, y, yindex, __rpow) # <<<<<<<<<<<<<< * * cpdef sparse_add(ndarray x, SparseIndex xindex, float64_t xfill, */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_6pandas_7_sparse_sparse_nancombine(__pyx_v_x, __pyx_v_xindex, __pyx_v_y, __pyx_v_yindex, __pyx_f_6pandas_7_sparse___rpow); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1081; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "pandas/src/sparse.pyx":1079 * return sparse_nancombine(x, xindex, y, yindex, __pow) * * cpdef sparse_nanrpow(ndarray x, SparseIndex xindex, # <<<<<<<<<<<<<< * ndarray y, SparseIndex yindex): * return sparse_nancombine(x, xindex, y, yindex, __rpow) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas._sparse.sparse_nanrpow", __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_7_sparse_21sparse_nanrpow(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_6pandas_7_sparse_21sparse_nanrpow(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_x = 0; struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_xindex = 0; PyArrayObject *__pyx_v_y = 0; struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_yindex = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("sparse_nanrpow (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_x,&__pyx_n_s_xindex,&__pyx_n_s_y,&__pyx_n_s_yindex,0}; PyObject* values[4] = {0,0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_x)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_xindex)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_nanrpow", 1, 4, 4, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1079; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_y)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_nanrpow", 1, 4, 4, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1079; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_yindex)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_nanrpow", 1, 4, 4, 3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1079; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "sparse_nanrpow") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1079; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 4) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[3] = PyTuple_GET_ITEM(__pyx_args, 3); } __pyx_v_x = ((PyArrayObject *)values[0]); __pyx_v_xindex = ((struct __pyx_obj_6pandas_7_sparse_SparseIndex *)values[1]); __pyx_v_y = ((PyArrayObject *)values[2]); __pyx_v_yindex = ((struct __pyx_obj_6pandas_7_sparse_SparseIndex *)values[3]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("sparse_nanrpow", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1079; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas._sparse.sparse_nanrpow", __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_filename = __pyx_f[0]; __pyx_lineno = 1079; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_xindex), __pyx_ptype_6pandas_7_sparse_SparseIndex, 1, "xindex", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1079; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_y), __pyx_ptype_5numpy_ndarray, 1, "y", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1080; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_yindex), __pyx_ptype_6pandas_7_sparse_SparseIndex, 1, "yindex", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1080; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_7_sparse_20sparse_nanrpow(__pyx_self, __pyx_v_x, __pyx_v_xindex, __pyx_v_y, __pyx_v_yindex); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_7_sparse_20sparse_nanrpow(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_x, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_xindex, PyArrayObject *__pyx_v_y, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_yindex) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("sparse_nanrpow", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_6pandas_7_sparse_sparse_nanrpow(__pyx_v_x, __pyx_v_xindex, __pyx_v_y, __pyx_v_yindex, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1079; __pyx_clineno = __LINE__; goto __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._sparse.sparse_nanrpow", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/sparse.pyx":1083 * return sparse_nancombine(x, xindex, y, yindex, __rpow) * * cpdef sparse_add(ndarray x, SparseIndex xindex, float64_t xfill, # <<<<<<<<<<<<<< * ndarray y, SparseIndex yindex, float64_t yfill): * return sparse_combine(x, xindex, xfill, */ static PyObject *__pyx_pw_6pandas_7_sparse_23sparse_add(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_6pandas_7_sparse_sparse_add(PyArrayObject *__pyx_v_x, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_xindex, __pyx_t_5numpy_float64_t __pyx_v_xfill, PyArrayObject *__pyx_v_y, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_yindex, __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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("sparse_add", 0); /* "pandas/src/sparse.pyx":1085 * cpdef sparse_add(ndarray x, SparseIndex xindex, float64_t xfill, * ndarray y, SparseIndex yindex, float64_t yfill): * return sparse_combine(x, xindex, xfill, # <<<<<<<<<<<<<< * y, yindex, yfill, __add) * */ __Pyx_XDECREF(__pyx_r); /* "pandas/src/sparse.pyx":1086 * ndarray y, SparseIndex yindex, float64_t yfill): * return sparse_combine(x, xindex, xfill, * y, yindex, yfill, __add) # <<<<<<<<<<<<<< * * cpdef sparse_sub(ndarray x, SparseIndex xindex, float64_t xfill, */ __pyx_t_1 = __pyx_f_6pandas_7_sparse_sparse_combine(__pyx_v_x, __pyx_v_xindex, __pyx_v_xfill, __pyx_v_y, __pyx_v_yindex, __pyx_v_yfill, __pyx_f_6pandas_7_sparse___add); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1085; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "pandas/src/sparse.pyx":1083 * return sparse_nancombine(x, xindex, y, yindex, __rpow) * * cpdef sparse_add(ndarray x, SparseIndex xindex, float64_t xfill, # <<<<<<<<<<<<<< * ndarray y, SparseIndex yindex, float64_t yfill): * return sparse_combine(x, xindex, xfill, */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas._sparse.sparse_add", __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_7_sparse_23sparse_add(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_6pandas_7_sparse_23sparse_add(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_x = 0; struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_xindex = 0; __pyx_t_5numpy_float64_t __pyx_v_xfill; PyArrayObject *__pyx_v_y = 0; struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_yindex = 0; __pyx_t_5numpy_float64_t __pyx_v_yfill; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("sparse_add (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); case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_x)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_xindex)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_add", 1, 6, 6, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1083; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_xfill)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_add", 1, 6, 6, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1083; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_y)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_add", 1, 6, 6, 3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1083; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 4: if (likely((values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_yindex)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_add", 1, 6, 6, 4); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1083; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 5: if (likely((values[5] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_yfill)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_add", 1, 6, 6, 5); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1083; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "sparse_add") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1083; __pyx_clineno = __LINE__; goto __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_7_sparse_SparseIndex *)values[1]); __pyx_v_xfill = __pyx_PyFloat_AsDouble(values[2]); if (unlikely((__pyx_v_xfill == (npy_float64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1083; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_y = ((PyArrayObject *)values[3]); __pyx_v_yindex = ((struct __pyx_obj_6pandas_7_sparse_SparseIndex *)values[4]); __pyx_v_yfill = __pyx_PyFloat_AsDouble(values[5]); if (unlikely((__pyx_v_yfill == (npy_float64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1084; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("sparse_add", 1, 6, 6, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1083; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas._sparse.sparse_add", __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_filename = __pyx_f[0]; __pyx_lineno = 1083; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_xindex), __pyx_ptype_6pandas_7_sparse_SparseIndex, 1, "xindex", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1083; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_y), __pyx_ptype_5numpy_ndarray, 1, "y", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1084; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_yindex), __pyx_ptype_6pandas_7_sparse_SparseIndex, 1, "yindex", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1084; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_7_sparse_22sparse_add(__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_7_sparse_22sparse_add(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_x, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_xindex, __pyx_t_5numpy_float64_t __pyx_v_xfill, PyArrayObject *__pyx_v_y, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_yindex, __pyx_t_5numpy_float64_t __pyx_v_yfill) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("sparse_add", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_6pandas_7_sparse_sparse_add(__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_filename = __pyx_f[0]; __pyx_lineno = 1083; __pyx_clineno = __LINE__; goto __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._sparse.sparse_add", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/sparse.pyx":1088 * y, yindex, yfill, __add) * * cpdef sparse_sub(ndarray x, SparseIndex xindex, float64_t xfill, # <<<<<<<<<<<<<< * ndarray y, SparseIndex yindex, float64_t yfill): * return sparse_combine(x, xindex, xfill, */ static PyObject *__pyx_pw_6pandas_7_sparse_25sparse_sub(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_6pandas_7_sparse_sparse_sub(PyArrayObject *__pyx_v_x, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_xindex, __pyx_t_5numpy_float64_t __pyx_v_xfill, PyArrayObject *__pyx_v_y, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_yindex, __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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("sparse_sub", 0); /* "pandas/src/sparse.pyx":1090 * cpdef sparse_sub(ndarray x, SparseIndex xindex, float64_t xfill, * ndarray y, SparseIndex yindex, float64_t yfill): * return sparse_combine(x, xindex, xfill, # <<<<<<<<<<<<<< * y, yindex, yfill, __sub) * */ __Pyx_XDECREF(__pyx_r); /* "pandas/src/sparse.pyx":1091 * ndarray y, SparseIndex yindex, float64_t yfill): * return sparse_combine(x, xindex, xfill, * y, yindex, yfill, __sub) # <<<<<<<<<<<<<< * * cpdef sparse_rsub(ndarray x, SparseIndex xindex, float64_t xfill, */ __pyx_t_1 = __pyx_f_6pandas_7_sparse_sparse_combine(__pyx_v_x, __pyx_v_xindex, __pyx_v_xfill, __pyx_v_y, __pyx_v_yindex, __pyx_v_yfill, __pyx_f_6pandas_7_sparse___sub); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1090; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "pandas/src/sparse.pyx":1088 * y, yindex, yfill, __add) * * cpdef sparse_sub(ndarray x, SparseIndex xindex, float64_t xfill, # <<<<<<<<<<<<<< * ndarray y, SparseIndex yindex, float64_t yfill): * return sparse_combine(x, xindex, xfill, */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas._sparse.sparse_sub", __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_7_sparse_25sparse_sub(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_6pandas_7_sparse_25sparse_sub(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_x = 0; struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_xindex = 0; __pyx_t_5numpy_float64_t __pyx_v_xfill; PyArrayObject *__pyx_v_y = 0; struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_yindex = 0; __pyx_t_5numpy_float64_t __pyx_v_yfill; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("sparse_sub (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); case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_x)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_xindex)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_sub", 1, 6, 6, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1088; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_xfill)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_sub", 1, 6, 6, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1088; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_y)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_sub", 1, 6, 6, 3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1088; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 4: if (likely((values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_yindex)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_sub", 1, 6, 6, 4); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1088; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 5: if (likely((values[5] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_yfill)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_sub", 1, 6, 6, 5); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1088; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "sparse_sub") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1088; __pyx_clineno = __LINE__; goto __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_7_sparse_SparseIndex *)values[1]); __pyx_v_xfill = __pyx_PyFloat_AsDouble(values[2]); if (unlikely((__pyx_v_xfill == (npy_float64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1088; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_y = ((PyArrayObject *)values[3]); __pyx_v_yindex = ((struct __pyx_obj_6pandas_7_sparse_SparseIndex *)values[4]); __pyx_v_yfill = __pyx_PyFloat_AsDouble(values[5]); if (unlikely((__pyx_v_yfill == (npy_float64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1089; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("sparse_sub", 1, 6, 6, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1088; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas._sparse.sparse_sub", __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_filename = __pyx_f[0]; __pyx_lineno = 1088; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_xindex), __pyx_ptype_6pandas_7_sparse_SparseIndex, 1, "xindex", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1088; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_y), __pyx_ptype_5numpy_ndarray, 1, "y", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1089; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_yindex), __pyx_ptype_6pandas_7_sparse_SparseIndex, 1, "yindex", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1089; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_7_sparse_24sparse_sub(__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_7_sparse_24sparse_sub(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_x, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_xindex, __pyx_t_5numpy_float64_t __pyx_v_xfill, PyArrayObject *__pyx_v_y, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_yindex, __pyx_t_5numpy_float64_t __pyx_v_yfill) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("sparse_sub", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_6pandas_7_sparse_sparse_sub(__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_filename = __pyx_f[0]; __pyx_lineno = 1088; __pyx_clineno = __LINE__; goto __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._sparse.sparse_sub", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/sparse.pyx":1093 * y, yindex, yfill, __sub) * * cpdef sparse_rsub(ndarray x, SparseIndex xindex, float64_t xfill, # <<<<<<<<<<<<<< * ndarray y, SparseIndex yindex, float64_t yfill): * return sparse_combine(x, xindex, xfill, */ static PyObject *__pyx_pw_6pandas_7_sparse_27sparse_rsub(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_6pandas_7_sparse_sparse_rsub(PyArrayObject *__pyx_v_x, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_xindex, __pyx_t_5numpy_float64_t __pyx_v_xfill, PyArrayObject *__pyx_v_y, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_yindex, __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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("sparse_rsub", 0); /* "pandas/src/sparse.pyx":1095 * cpdef sparse_rsub(ndarray x, SparseIndex xindex, float64_t xfill, * ndarray y, SparseIndex yindex, float64_t yfill): * return sparse_combine(x, xindex, xfill, # <<<<<<<<<<<<<< * y, yindex, yfill, __rsub) * */ __Pyx_XDECREF(__pyx_r); /* "pandas/src/sparse.pyx":1096 * ndarray y, SparseIndex yindex, float64_t yfill): * return sparse_combine(x, xindex, xfill, * y, yindex, yfill, __rsub) # <<<<<<<<<<<<<< * * cpdef sparse_mul(ndarray x, SparseIndex xindex, float64_t xfill, */ __pyx_t_1 = __pyx_f_6pandas_7_sparse_sparse_combine(__pyx_v_x, __pyx_v_xindex, __pyx_v_xfill, __pyx_v_y, __pyx_v_yindex, __pyx_v_yfill, __pyx_f_6pandas_7_sparse___rsub); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1095; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "pandas/src/sparse.pyx":1093 * y, yindex, yfill, __sub) * * cpdef sparse_rsub(ndarray x, SparseIndex xindex, float64_t xfill, # <<<<<<<<<<<<<< * ndarray y, SparseIndex yindex, float64_t yfill): * return sparse_combine(x, xindex, xfill, */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas._sparse.sparse_rsub", __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_7_sparse_27sparse_rsub(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_6pandas_7_sparse_27sparse_rsub(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_x = 0; struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_xindex = 0; __pyx_t_5numpy_float64_t __pyx_v_xfill; PyArrayObject *__pyx_v_y = 0; struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_yindex = 0; __pyx_t_5numpy_float64_t __pyx_v_yfill; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("sparse_rsub (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); case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_x)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_xindex)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_rsub", 1, 6, 6, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1093; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_xfill)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_rsub", 1, 6, 6, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1093; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_y)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_rsub", 1, 6, 6, 3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1093; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 4: if (likely((values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_yindex)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_rsub", 1, 6, 6, 4); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1093; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 5: if (likely((values[5] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_yfill)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_rsub", 1, 6, 6, 5); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1093; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "sparse_rsub") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1093; __pyx_clineno = __LINE__; goto __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_7_sparse_SparseIndex *)values[1]); __pyx_v_xfill = __pyx_PyFloat_AsDouble(values[2]); if (unlikely((__pyx_v_xfill == (npy_float64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1093; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_y = ((PyArrayObject *)values[3]); __pyx_v_yindex = ((struct __pyx_obj_6pandas_7_sparse_SparseIndex *)values[4]); __pyx_v_yfill = __pyx_PyFloat_AsDouble(values[5]); if (unlikely((__pyx_v_yfill == (npy_float64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1094; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("sparse_rsub", 1, 6, 6, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1093; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas._sparse.sparse_rsub", __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_filename = __pyx_f[0]; __pyx_lineno = 1093; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_xindex), __pyx_ptype_6pandas_7_sparse_SparseIndex, 1, "xindex", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1093; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_y), __pyx_ptype_5numpy_ndarray, 1, "y", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1094; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_yindex), __pyx_ptype_6pandas_7_sparse_SparseIndex, 1, "yindex", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1094; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_7_sparse_26sparse_rsub(__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_7_sparse_26sparse_rsub(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_x, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_xindex, __pyx_t_5numpy_float64_t __pyx_v_xfill, PyArrayObject *__pyx_v_y, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_yindex, __pyx_t_5numpy_float64_t __pyx_v_yfill) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("sparse_rsub", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_6pandas_7_sparse_sparse_rsub(__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_filename = __pyx_f[0]; __pyx_lineno = 1093; __pyx_clineno = __LINE__; goto __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._sparse.sparse_rsub", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/sparse.pyx":1098 * y, yindex, yfill, __rsub) * * cpdef sparse_mul(ndarray x, SparseIndex xindex, float64_t xfill, # <<<<<<<<<<<<<< * ndarray y, SparseIndex yindex, float64_t yfill): * return sparse_combine(x, xindex, xfill, */ static PyObject *__pyx_pw_6pandas_7_sparse_29sparse_mul(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_6pandas_7_sparse_sparse_mul(PyArrayObject *__pyx_v_x, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_xindex, __pyx_t_5numpy_float64_t __pyx_v_xfill, PyArrayObject *__pyx_v_y, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_yindex, __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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("sparse_mul", 0); /* "pandas/src/sparse.pyx":1100 * cpdef sparse_mul(ndarray x, SparseIndex xindex, float64_t xfill, * ndarray y, SparseIndex yindex, float64_t yfill): * return sparse_combine(x, xindex, xfill, # <<<<<<<<<<<<<< * y, yindex, yfill, __mul) * */ __Pyx_XDECREF(__pyx_r); /* "pandas/src/sparse.pyx":1101 * ndarray y, SparseIndex yindex, float64_t yfill): * return sparse_combine(x, xindex, xfill, * y, yindex, yfill, __mul) # <<<<<<<<<<<<<< * * cpdef sparse_div(ndarray x, SparseIndex xindex, float64_t xfill, */ __pyx_t_1 = __pyx_f_6pandas_7_sparse_sparse_combine(__pyx_v_x, __pyx_v_xindex, __pyx_v_xfill, __pyx_v_y, __pyx_v_yindex, __pyx_v_yfill, __pyx_f_6pandas_7_sparse___mul); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1100; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "pandas/src/sparse.pyx":1098 * y, yindex, yfill, __rsub) * * cpdef sparse_mul(ndarray x, SparseIndex xindex, float64_t xfill, # <<<<<<<<<<<<<< * ndarray y, SparseIndex yindex, float64_t yfill): * return sparse_combine(x, xindex, xfill, */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas._sparse.sparse_mul", __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_7_sparse_29sparse_mul(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_6pandas_7_sparse_29sparse_mul(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_x = 0; struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_xindex = 0; __pyx_t_5numpy_float64_t __pyx_v_xfill; PyArrayObject *__pyx_v_y = 0; struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_yindex = 0; __pyx_t_5numpy_float64_t __pyx_v_yfill; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("sparse_mul (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); case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_x)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_xindex)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_mul", 1, 6, 6, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1098; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_xfill)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_mul", 1, 6, 6, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1098; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_y)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_mul", 1, 6, 6, 3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1098; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 4: if (likely((values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_yindex)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_mul", 1, 6, 6, 4); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1098; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 5: if (likely((values[5] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_yfill)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_mul", 1, 6, 6, 5); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1098; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "sparse_mul") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1098; __pyx_clineno = __LINE__; goto __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_7_sparse_SparseIndex *)values[1]); __pyx_v_xfill = __pyx_PyFloat_AsDouble(values[2]); if (unlikely((__pyx_v_xfill == (npy_float64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1098; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_y = ((PyArrayObject *)values[3]); __pyx_v_yindex = ((struct __pyx_obj_6pandas_7_sparse_SparseIndex *)values[4]); __pyx_v_yfill = __pyx_PyFloat_AsDouble(values[5]); if (unlikely((__pyx_v_yfill == (npy_float64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1099; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("sparse_mul", 1, 6, 6, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1098; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas._sparse.sparse_mul", __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_filename = __pyx_f[0]; __pyx_lineno = 1098; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_xindex), __pyx_ptype_6pandas_7_sparse_SparseIndex, 1, "xindex", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1098; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_y), __pyx_ptype_5numpy_ndarray, 1, "y", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1099; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_yindex), __pyx_ptype_6pandas_7_sparse_SparseIndex, 1, "yindex", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1099; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_7_sparse_28sparse_mul(__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_7_sparse_28sparse_mul(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_x, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_xindex, __pyx_t_5numpy_float64_t __pyx_v_xfill, PyArrayObject *__pyx_v_y, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_yindex, __pyx_t_5numpy_float64_t __pyx_v_yfill) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("sparse_mul", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_6pandas_7_sparse_sparse_mul(__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_filename = __pyx_f[0]; __pyx_lineno = 1098; __pyx_clineno = __LINE__; goto __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._sparse.sparse_mul", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/sparse.pyx":1103 * y, yindex, yfill, __mul) * * cpdef sparse_div(ndarray x, SparseIndex xindex, float64_t xfill, # <<<<<<<<<<<<<< * ndarray y, SparseIndex yindex, float64_t yfill): * return sparse_combine(x, xindex, xfill, */ static PyObject *__pyx_pw_6pandas_7_sparse_31sparse_div(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_6pandas_7_sparse_sparse_div(PyArrayObject *__pyx_v_x, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_xindex, __pyx_t_5numpy_float64_t __pyx_v_xfill, PyArrayObject *__pyx_v_y, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_yindex, __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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("sparse_div", 0); /* "pandas/src/sparse.pyx":1105 * cpdef sparse_div(ndarray x, SparseIndex xindex, float64_t xfill, * ndarray y, SparseIndex yindex, float64_t yfill): * return sparse_combine(x, xindex, xfill, # <<<<<<<<<<<<<< * y, yindex, yfill, __div) * */ __Pyx_XDECREF(__pyx_r); /* "pandas/src/sparse.pyx":1106 * ndarray y, SparseIndex yindex, float64_t yfill): * return sparse_combine(x, xindex, xfill, * y, yindex, yfill, __div) # <<<<<<<<<<<<<< * * cpdef sparse_rdiv(ndarray x, SparseIndex xindex, float64_t xfill, */ __pyx_t_1 = __pyx_f_6pandas_7_sparse_sparse_combine(__pyx_v_x, __pyx_v_xindex, __pyx_v_xfill, __pyx_v_y, __pyx_v_yindex, __pyx_v_yfill, __pyx_f_6pandas_7_sparse___div); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1105; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "pandas/src/sparse.pyx":1103 * y, yindex, yfill, __mul) * * cpdef sparse_div(ndarray x, SparseIndex xindex, float64_t xfill, # <<<<<<<<<<<<<< * ndarray y, SparseIndex yindex, float64_t yfill): * return sparse_combine(x, xindex, xfill, */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas._sparse.sparse_div", __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_7_sparse_31sparse_div(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_6pandas_7_sparse_31sparse_div(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_x = 0; struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_xindex = 0; __pyx_t_5numpy_float64_t __pyx_v_xfill; PyArrayObject *__pyx_v_y = 0; struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_yindex = 0; __pyx_t_5numpy_float64_t __pyx_v_yfill; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("sparse_div (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); case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_x)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_xindex)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_div", 1, 6, 6, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1103; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_xfill)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_div", 1, 6, 6, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1103; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_y)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_div", 1, 6, 6, 3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1103; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 4: if (likely((values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_yindex)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_div", 1, 6, 6, 4); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1103; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 5: if (likely((values[5] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_yfill)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_div", 1, 6, 6, 5); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1103; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "sparse_div") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1103; __pyx_clineno = __LINE__; goto __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_7_sparse_SparseIndex *)values[1]); __pyx_v_xfill = __pyx_PyFloat_AsDouble(values[2]); if (unlikely((__pyx_v_xfill == (npy_float64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1103; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_y = ((PyArrayObject *)values[3]); __pyx_v_yindex = ((struct __pyx_obj_6pandas_7_sparse_SparseIndex *)values[4]); __pyx_v_yfill = __pyx_PyFloat_AsDouble(values[5]); if (unlikely((__pyx_v_yfill == (npy_float64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1104; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("sparse_div", 1, 6, 6, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1103; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas._sparse.sparse_div", __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_filename = __pyx_f[0]; __pyx_lineno = 1103; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_xindex), __pyx_ptype_6pandas_7_sparse_SparseIndex, 1, "xindex", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1103; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_y), __pyx_ptype_5numpy_ndarray, 1, "y", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1104; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_yindex), __pyx_ptype_6pandas_7_sparse_SparseIndex, 1, "yindex", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1104; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_7_sparse_30sparse_div(__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_7_sparse_30sparse_div(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_x, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_xindex, __pyx_t_5numpy_float64_t __pyx_v_xfill, PyArrayObject *__pyx_v_y, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_yindex, __pyx_t_5numpy_float64_t __pyx_v_yfill) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("sparse_div", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_6pandas_7_sparse_sparse_div(__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_filename = __pyx_f[0]; __pyx_lineno = 1103; __pyx_clineno = __LINE__; goto __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._sparse.sparse_div", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/sparse.pyx":1108 * y, yindex, yfill, __div) * * cpdef sparse_rdiv(ndarray x, SparseIndex xindex, float64_t xfill, # <<<<<<<<<<<<<< * ndarray y, SparseIndex yindex, float64_t yfill): * return sparse_combine(x, xindex, xfill, */ static PyObject *__pyx_pw_6pandas_7_sparse_33sparse_rdiv(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_6pandas_7_sparse_sparse_rdiv(PyArrayObject *__pyx_v_x, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_xindex, __pyx_t_5numpy_float64_t __pyx_v_xfill, PyArrayObject *__pyx_v_y, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_yindex, __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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("sparse_rdiv", 0); /* "pandas/src/sparse.pyx":1110 * cpdef sparse_rdiv(ndarray x, SparseIndex xindex, float64_t xfill, * ndarray y, SparseIndex yindex, float64_t yfill): * return sparse_combine(x, xindex, xfill, # <<<<<<<<<<<<<< * y, yindex, yfill, __rdiv) * */ __Pyx_XDECREF(__pyx_r); /* "pandas/src/sparse.pyx":1111 * ndarray y, SparseIndex yindex, float64_t yfill): * return sparse_combine(x, xindex, xfill, * y, yindex, yfill, __rdiv) # <<<<<<<<<<<<<< * * sparse_truediv = sparse_div */ __pyx_t_1 = __pyx_f_6pandas_7_sparse_sparse_combine(__pyx_v_x, __pyx_v_xindex, __pyx_v_xfill, __pyx_v_y, __pyx_v_yindex, __pyx_v_yfill, __pyx_f_6pandas_7_sparse___rdiv); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1110; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "pandas/src/sparse.pyx":1108 * y, yindex, yfill, __div) * * cpdef sparse_rdiv(ndarray x, SparseIndex xindex, float64_t xfill, # <<<<<<<<<<<<<< * ndarray y, SparseIndex yindex, float64_t yfill): * return sparse_combine(x, xindex, xfill, */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas._sparse.sparse_rdiv", __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_7_sparse_33sparse_rdiv(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_6pandas_7_sparse_33sparse_rdiv(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_x = 0; struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_xindex = 0; __pyx_t_5numpy_float64_t __pyx_v_xfill; PyArrayObject *__pyx_v_y = 0; struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_yindex = 0; __pyx_t_5numpy_float64_t __pyx_v_yfill; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("sparse_rdiv (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); case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_x)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_xindex)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_rdiv", 1, 6, 6, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1108; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_xfill)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_rdiv", 1, 6, 6, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1108; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_y)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_rdiv", 1, 6, 6, 3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1108; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 4: if (likely((values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_yindex)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_rdiv", 1, 6, 6, 4); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1108; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 5: if (likely((values[5] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_yfill)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_rdiv", 1, 6, 6, 5); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1108; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "sparse_rdiv") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1108; __pyx_clineno = __LINE__; goto __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_7_sparse_SparseIndex *)values[1]); __pyx_v_xfill = __pyx_PyFloat_AsDouble(values[2]); if (unlikely((__pyx_v_xfill == (npy_float64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1108; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_y = ((PyArrayObject *)values[3]); __pyx_v_yindex = ((struct __pyx_obj_6pandas_7_sparse_SparseIndex *)values[4]); __pyx_v_yfill = __pyx_PyFloat_AsDouble(values[5]); if (unlikely((__pyx_v_yfill == (npy_float64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1109; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("sparse_rdiv", 1, 6, 6, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1108; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas._sparse.sparse_rdiv", __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_filename = __pyx_f[0]; __pyx_lineno = 1108; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_xindex), __pyx_ptype_6pandas_7_sparse_SparseIndex, 1, "xindex", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1108; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_y), __pyx_ptype_5numpy_ndarray, 1, "y", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1109; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_yindex), __pyx_ptype_6pandas_7_sparse_SparseIndex, 1, "yindex", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1109; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_7_sparse_32sparse_rdiv(__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_7_sparse_32sparse_rdiv(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_x, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_xindex, __pyx_t_5numpy_float64_t __pyx_v_xfill, PyArrayObject *__pyx_v_y, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_yindex, __pyx_t_5numpy_float64_t __pyx_v_yfill) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("sparse_rdiv", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_6pandas_7_sparse_sparse_rdiv(__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_filename = __pyx_f[0]; __pyx_lineno = 1108; __pyx_clineno = __LINE__; goto __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._sparse.sparse_rdiv", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/sparse.pyx":1116 * sparse_rtruediv = sparse_rdiv * * cpdef sparse_floordiv(ndarray x, SparseIndex xindex, float64_t xfill, # <<<<<<<<<<<<<< * ndarray y, SparseIndex yindex, float64_t yfill): * return sparse_combine(x, xindex, xfill, */ static PyObject *__pyx_pw_6pandas_7_sparse_35sparse_floordiv(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_6pandas_7_sparse_sparse_floordiv(PyArrayObject *__pyx_v_x, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_xindex, __pyx_t_5numpy_float64_t __pyx_v_xfill, PyArrayObject *__pyx_v_y, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_yindex, __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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("sparse_floordiv", 0); /* "pandas/src/sparse.pyx":1118 * cpdef sparse_floordiv(ndarray x, SparseIndex xindex, float64_t xfill, * ndarray y, SparseIndex yindex, float64_t yfill): * return sparse_combine(x, xindex, xfill, # <<<<<<<<<<<<<< * y, yindex, yfill, __floordiv) * */ __Pyx_XDECREF(__pyx_r); /* "pandas/src/sparse.pyx":1119 * ndarray y, SparseIndex yindex, float64_t yfill): * return sparse_combine(x, xindex, xfill, * y, yindex, yfill, __floordiv) # <<<<<<<<<<<<<< * * cpdef sparse_rfloordiv(ndarray x, SparseIndex xindex, float64_t xfill, */ __pyx_t_1 = __pyx_f_6pandas_7_sparse_sparse_combine(__pyx_v_x, __pyx_v_xindex, __pyx_v_xfill, __pyx_v_y, __pyx_v_yindex, __pyx_v_yfill, __pyx_f_6pandas_7_sparse___floordiv); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1118; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "pandas/src/sparse.pyx":1116 * sparse_rtruediv = sparse_rdiv * * cpdef sparse_floordiv(ndarray x, SparseIndex xindex, float64_t xfill, # <<<<<<<<<<<<<< * ndarray y, SparseIndex yindex, float64_t yfill): * return sparse_combine(x, xindex, xfill, */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas._sparse.sparse_floordiv", __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_7_sparse_35sparse_floordiv(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_6pandas_7_sparse_35sparse_floordiv(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_x = 0; struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_xindex = 0; __pyx_t_5numpy_float64_t __pyx_v_xfill; PyArrayObject *__pyx_v_y = 0; struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_yindex = 0; __pyx_t_5numpy_float64_t __pyx_v_yfill; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("sparse_floordiv (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); case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_x)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_xindex)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_floordiv", 1, 6, 6, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1116; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_xfill)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_floordiv", 1, 6, 6, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1116; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_y)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_floordiv", 1, 6, 6, 3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1116; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 4: if (likely((values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_yindex)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_floordiv", 1, 6, 6, 4); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1116; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 5: if (likely((values[5] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_yfill)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_floordiv", 1, 6, 6, 5); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1116; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "sparse_floordiv") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1116; __pyx_clineno = __LINE__; goto __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_7_sparse_SparseIndex *)values[1]); __pyx_v_xfill = __pyx_PyFloat_AsDouble(values[2]); if (unlikely((__pyx_v_xfill == (npy_float64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1116; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_y = ((PyArrayObject *)values[3]); __pyx_v_yindex = ((struct __pyx_obj_6pandas_7_sparse_SparseIndex *)values[4]); __pyx_v_yfill = __pyx_PyFloat_AsDouble(values[5]); if (unlikely((__pyx_v_yfill == (npy_float64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1117; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("sparse_floordiv", 1, 6, 6, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1116; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas._sparse.sparse_floordiv", __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_filename = __pyx_f[0]; __pyx_lineno = 1116; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_xindex), __pyx_ptype_6pandas_7_sparse_SparseIndex, 1, "xindex", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1116; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_y), __pyx_ptype_5numpy_ndarray, 1, "y", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1117; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_yindex), __pyx_ptype_6pandas_7_sparse_SparseIndex, 1, "yindex", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1117; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_7_sparse_34sparse_floordiv(__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_7_sparse_34sparse_floordiv(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_x, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_xindex, __pyx_t_5numpy_float64_t __pyx_v_xfill, PyArrayObject *__pyx_v_y, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_yindex, __pyx_t_5numpy_float64_t __pyx_v_yfill) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("sparse_floordiv", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_6pandas_7_sparse_sparse_floordiv(__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_filename = __pyx_f[0]; __pyx_lineno = 1116; __pyx_clineno = __LINE__; goto __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._sparse.sparse_floordiv", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/sparse.pyx":1121 * y, yindex, yfill, __floordiv) * * cpdef sparse_rfloordiv(ndarray x, SparseIndex xindex, float64_t xfill, # <<<<<<<<<<<<<< * ndarray y, SparseIndex yindex, float64_t yfill): * return sparse_combine(x, xindex, xfill, */ static PyObject *__pyx_pw_6pandas_7_sparse_37sparse_rfloordiv(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_6pandas_7_sparse_sparse_rfloordiv(PyArrayObject *__pyx_v_x, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_xindex, __pyx_t_5numpy_float64_t __pyx_v_xfill, PyArrayObject *__pyx_v_y, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_yindex, __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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("sparse_rfloordiv", 0); /* "pandas/src/sparse.pyx":1123 * cpdef sparse_rfloordiv(ndarray x, SparseIndex xindex, float64_t xfill, * ndarray y, SparseIndex yindex, float64_t yfill): * return sparse_combine(x, xindex, xfill, # <<<<<<<<<<<<<< * y, yindex, yfill, __rfloordiv) * */ __Pyx_XDECREF(__pyx_r); /* "pandas/src/sparse.pyx":1124 * ndarray y, SparseIndex yindex, float64_t yfill): * return sparse_combine(x, xindex, xfill, * y, yindex, yfill, __rfloordiv) # <<<<<<<<<<<<<< * * cpdef sparse_pow(ndarray x, SparseIndex xindex, float64_t xfill, */ __pyx_t_1 = __pyx_f_6pandas_7_sparse_sparse_combine(__pyx_v_x, __pyx_v_xindex, __pyx_v_xfill, __pyx_v_y, __pyx_v_yindex, __pyx_v_yfill, __pyx_f_6pandas_7_sparse___rfloordiv); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1123; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "pandas/src/sparse.pyx":1121 * y, yindex, yfill, __floordiv) * * cpdef sparse_rfloordiv(ndarray x, SparseIndex xindex, float64_t xfill, # <<<<<<<<<<<<<< * ndarray y, SparseIndex yindex, float64_t yfill): * return sparse_combine(x, xindex, xfill, */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas._sparse.sparse_rfloordiv", __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_7_sparse_37sparse_rfloordiv(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_6pandas_7_sparse_37sparse_rfloordiv(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_x = 0; struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_xindex = 0; __pyx_t_5numpy_float64_t __pyx_v_xfill; PyArrayObject *__pyx_v_y = 0; struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_yindex = 0; __pyx_t_5numpy_float64_t __pyx_v_yfill; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("sparse_rfloordiv (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); case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_x)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_xindex)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_rfloordiv", 1, 6, 6, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1121; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_xfill)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_rfloordiv", 1, 6, 6, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1121; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_y)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_rfloordiv", 1, 6, 6, 3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1121; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 4: if (likely((values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_yindex)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_rfloordiv", 1, 6, 6, 4); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1121; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 5: if (likely((values[5] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_yfill)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_rfloordiv", 1, 6, 6, 5); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1121; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "sparse_rfloordiv") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1121; __pyx_clineno = __LINE__; goto __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_7_sparse_SparseIndex *)values[1]); __pyx_v_xfill = __pyx_PyFloat_AsDouble(values[2]); if (unlikely((__pyx_v_xfill == (npy_float64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1121; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_y = ((PyArrayObject *)values[3]); __pyx_v_yindex = ((struct __pyx_obj_6pandas_7_sparse_SparseIndex *)values[4]); __pyx_v_yfill = __pyx_PyFloat_AsDouble(values[5]); if (unlikely((__pyx_v_yfill == (npy_float64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1122; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("sparse_rfloordiv", 1, 6, 6, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1121; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas._sparse.sparse_rfloordiv", __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_filename = __pyx_f[0]; __pyx_lineno = 1121; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_xindex), __pyx_ptype_6pandas_7_sparse_SparseIndex, 1, "xindex", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1121; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_y), __pyx_ptype_5numpy_ndarray, 1, "y", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1122; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_yindex), __pyx_ptype_6pandas_7_sparse_SparseIndex, 1, "yindex", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1122; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_7_sparse_36sparse_rfloordiv(__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_7_sparse_36sparse_rfloordiv(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_x, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_xindex, __pyx_t_5numpy_float64_t __pyx_v_xfill, PyArrayObject *__pyx_v_y, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_yindex, __pyx_t_5numpy_float64_t __pyx_v_yfill) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("sparse_rfloordiv", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_6pandas_7_sparse_sparse_rfloordiv(__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_filename = __pyx_f[0]; __pyx_lineno = 1121; __pyx_clineno = __LINE__; goto __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._sparse.sparse_rfloordiv", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/sparse.pyx":1126 * y, yindex, yfill, __rfloordiv) * * cpdef sparse_pow(ndarray x, SparseIndex xindex, float64_t xfill, # <<<<<<<<<<<<<< * ndarray y, SparseIndex yindex, float64_t yfill): * return sparse_combine(x, xindex, xfill, */ static PyObject *__pyx_pw_6pandas_7_sparse_39sparse_pow(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_6pandas_7_sparse_sparse_pow(PyArrayObject *__pyx_v_x, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_xindex, __pyx_t_5numpy_float64_t __pyx_v_xfill, PyArrayObject *__pyx_v_y, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_yindex, __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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("sparse_pow", 0); /* "pandas/src/sparse.pyx":1128 * cpdef sparse_pow(ndarray x, SparseIndex xindex, float64_t xfill, * ndarray y, SparseIndex yindex, float64_t yfill): * return sparse_combine(x, xindex, xfill, # <<<<<<<<<<<<<< * y, yindex, yfill, __pow) * */ __Pyx_XDECREF(__pyx_r); /* "pandas/src/sparse.pyx":1129 * ndarray y, SparseIndex yindex, float64_t yfill): * return sparse_combine(x, xindex, xfill, * y, yindex, yfill, __pow) # <<<<<<<<<<<<<< * * cpdef sparse_rpow(ndarray x, SparseIndex xindex, float64_t xfill, */ __pyx_t_1 = __pyx_f_6pandas_7_sparse_sparse_combine(__pyx_v_x, __pyx_v_xindex, __pyx_v_xfill, __pyx_v_y, __pyx_v_yindex, __pyx_v_yfill, __pyx_f_6pandas_7_sparse___pow); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1128; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "pandas/src/sparse.pyx":1126 * y, yindex, yfill, __rfloordiv) * * cpdef sparse_pow(ndarray x, SparseIndex xindex, float64_t xfill, # <<<<<<<<<<<<<< * ndarray y, SparseIndex yindex, float64_t yfill): * return sparse_combine(x, xindex, xfill, */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas._sparse.sparse_pow", __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_7_sparse_39sparse_pow(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_6pandas_7_sparse_39sparse_pow(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_x = 0; struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_xindex = 0; __pyx_t_5numpy_float64_t __pyx_v_xfill; PyArrayObject *__pyx_v_y = 0; struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_yindex = 0; __pyx_t_5numpy_float64_t __pyx_v_yfill; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("sparse_pow (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); case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_x)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_xindex)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_pow", 1, 6, 6, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1126; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_xfill)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_pow", 1, 6, 6, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1126; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_y)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_pow", 1, 6, 6, 3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1126; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 4: if (likely((values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_yindex)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_pow", 1, 6, 6, 4); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1126; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 5: if (likely((values[5] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_yfill)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_pow", 1, 6, 6, 5); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1126; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "sparse_pow") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1126; __pyx_clineno = __LINE__; goto __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_7_sparse_SparseIndex *)values[1]); __pyx_v_xfill = __pyx_PyFloat_AsDouble(values[2]); if (unlikely((__pyx_v_xfill == (npy_float64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1126; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_y = ((PyArrayObject *)values[3]); __pyx_v_yindex = ((struct __pyx_obj_6pandas_7_sparse_SparseIndex *)values[4]); __pyx_v_yfill = __pyx_PyFloat_AsDouble(values[5]); if (unlikely((__pyx_v_yfill == (npy_float64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1127; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("sparse_pow", 1, 6, 6, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1126; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas._sparse.sparse_pow", __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_filename = __pyx_f[0]; __pyx_lineno = 1126; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_xindex), __pyx_ptype_6pandas_7_sparse_SparseIndex, 1, "xindex", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1126; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_y), __pyx_ptype_5numpy_ndarray, 1, "y", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1127; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_yindex), __pyx_ptype_6pandas_7_sparse_SparseIndex, 1, "yindex", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1127; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_7_sparse_38sparse_pow(__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_7_sparse_38sparse_pow(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_x, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_xindex, __pyx_t_5numpy_float64_t __pyx_v_xfill, PyArrayObject *__pyx_v_y, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_yindex, __pyx_t_5numpy_float64_t __pyx_v_yfill) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("sparse_pow", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_6pandas_7_sparse_sparse_pow(__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_filename = __pyx_f[0]; __pyx_lineno = 1126; __pyx_clineno = __LINE__; goto __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._sparse.sparse_pow", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/sparse.pyx":1131 * y, yindex, yfill, __pow) * * cpdef sparse_rpow(ndarray x, SparseIndex xindex, float64_t xfill, # <<<<<<<<<<<<<< * ndarray y, SparseIndex yindex, float64_t yfill): * return sparse_combine(x, xindex, xfill, */ static PyObject *__pyx_pw_6pandas_7_sparse_41sparse_rpow(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_6pandas_7_sparse_sparse_rpow(PyArrayObject *__pyx_v_x, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_xindex, __pyx_t_5numpy_float64_t __pyx_v_xfill, PyArrayObject *__pyx_v_y, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_yindex, __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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("sparse_rpow", 0); /* "pandas/src/sparse.pyx":1133 * cpdef sparse_rpow(ndarray x, SparseIndex xindex, float64_t xfill, * ndarray y, SparseIndex yindex, float64_t yfill): * return sparse_combine(x, xindex, xfill, # <<<<<<<<<<<<<< * y, yindex, yfill, __rpow) * */ __Pyx_XDECREF(__pyx_r); /* "pandas/src/sparse.pyx":1134 * ndarray y, SparseIndex yindex, float64_t yfill): * return sparse_combine(x, xindex, xfill, * y, yindex, yfill, __rpow) # <<<<<<<<<<<<<< * * */ __pyx_t_1 = __pyx_f_6pandas_7_sparse_sparse_combine(__pyx_v_x, __pyx_v_xindex, __pyx_v_xfill, __pyx_v_y, __pyx_v_yindex, __pyx_v_yfill, __pyx_f_6pandas_7_sparse___rpow); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1133; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "pandas/src/sparse.pyx":1131 * y, yindex, yfill, __pow) * * cpdef sparse_rpow(ndarray x, SparseIndex xindex, float64_t xfill, # <<<<<<<<<<<<<< * ndarray y, SparseIndex yindex, float64_t yfill): * return sparse_combine(x, xindex, xfill, */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas._sparse.sparse_rpow", __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_7_sparse_41sparse_rpow(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_6pandas_7_sparse_41sparse_rpow(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_x = 0; struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_xindex = 0; __pyx_t_5numpy_float64_t __pyx_v_xfill; PyArrayObject *__pyx_v_y = 0; struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_yindex = 0; __pyx_t_5numpy_float64_t __pyx_v_yfill; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("sparse_rpow (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); case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_x)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_xindex)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_rpow", 1, 6, 6, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1131; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_xfill)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_rpow", 1, 6, 6, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1131; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_y)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_rpow", 1, 6, 6, 3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1131; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 4: if (likely((values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_yindex)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_rpow", 1, 6, 6, 4); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1131; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 5: if (likely((values[5] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_yfill)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_rpow", 1, 6, 6, 5); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1131; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "sparse_rpow") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1131; __pyx_clineno = __LINE__; goto __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_7_sparse_SparseIndex *)values[1]); __pyx_v_xfill = __pyx_PyFloat_AsDouble(values[2]); if (unlikely((__pyx_v_xfill == (npy_float64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1131; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_y = ((PyArrayObject *)values[3]); __pyx_v_yindex = ((struct __pyx_obj_6pandas_7_sparse_SparseIndex *)values[4]); __pyx_v_yfill = __pyx_PyFloat_AsDouble(values[5]); if (unlikely((__pyx_v_yfill == (npy_float64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1132; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("sparse_rpow", 1, 6, 6, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1131; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas._sparse.sparse_rpow", __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_filename = __pyx_f[0]; __pyx_lineno = 1131; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_xindex), __pyx_ptype_6pandas_7_sparse_SparseIndex, 1, "xindex", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1131; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_y), __pyx_ptype_5numpy_ndarray, 1, "y", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1132; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_yindex), __pyx_ptype_6pandas_7_sparse_SparseIndex, 1, "yindex", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1132; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_7_sparse_40sparse_rpow(__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_7_sparse_40sparse_rpow(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_x, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_xindex, __pyx_t_5numpy_float64_t __pyx_v_xfill, PyArrayObject *__pyx_v_y, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_yindex, __pyx_t_5numpy_float64_t __pyx_v_yfill) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("sparse_rpow", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_6pandas_7_sparse_sparse_rpow(__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_filename = __pyx_f[0]; __pyx_lineno = 1131; __pyx_clineno = __LINE__; goto __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._sparse.sparse_rpow", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/sparse.pyx":1140 * # 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_7_sparse_43get_reindexer(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_7_sparse_43get_reindexer = {__Pyx_NAMESTR("get_reindexer"), (PyCFunction)__pyx_pw_6pandas_7_sparse_43get_reindexer, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_7_sparse_43get_reindexer(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_values = 0; PyObject *__pyx_v_index_map = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 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); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_values)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_index_map)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("get_reindexer", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1140; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "get_reindexer") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1140; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 1140; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas._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_filename = __pyx_f[0]; __pyx_lineno = 1140; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_index_map), (&PyDict_Type), 1, "index_map", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1140; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_7_sparse_42get_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_7_sparse_42get_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; int __pyx_t_14; int __pyx_t_15; __pyx_t_5numpy_int32_t __pyx_t_16; Py_ssize_t __pyx_t_17; Py_ssize_t __pyx_t_18; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __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_filename = __pyx_f[0]; __pyx_lineno = 1140; __pyx_clineno = __LINE__; goto __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/src/sparse.pyx":1143 * 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 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1143; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_new_length = __pyx_t_1; /* "pandas/src/sparse.pyx":1146 * 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_filename = __pyx_f[0]; __pyx_lineno = 1146; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 1146; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 1146; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1146; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1146; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1146; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 1146; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 1146; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyObject_Call(__pyx_t_3, __pyx_t_4, __pyx_t_2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1146; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 1146; __pyx_clineno = __LINE__; goto __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_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_filename = __pyx_f[0]; __pyx_lineno = 1146; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_7 = 0; __pyx_v_indexer = ((PyArrayObject *)__pyx_t_6); __pyx_t_6 = 0; /* "pandas/src/sparse.pyx":1148 * 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; for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_1; __pyx_t_12+=1) { __pyx_v_i = __pyx_t_12; /* "pandas/src/sparse.pyx":1149 * * for i in range(new_length): * idx = values[i] # <<<<<<<<<<<<<< * if idx in index_map: * indexer[i] = index_map[idx] */ __pyx_t_13 = __pyx_v_i; __pyx_t_8 = -1; if (__pyx_t_13 < 0) { __pyx_t_13 += __pyx_pybuffernd_values.diminfo[0].shape; if (unlikely(__pyx_t_13 < 0)) __pyx_t_8 = 0; } else if (unlikely(__pyx_t_13 >= __pyx_pybuffernd_values.diminfo[0].shape)) __pyx_t_8 = 0; if (unlikely(__pyx_t_8 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_8); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1149; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_6 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_13, __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/src/sparse.pyx":1150 * 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_filename = __pyx_f[0]; __pyx_lineno = 1150; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_14 = (__Pyx_PyDict_Contains(__pyx_v_idx, __pyx_v_index_map, Py_EQ)); if (unlikely(__pyx_t_14 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1150; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_15 = (__pyx_t_14 != 0); if (__pyx_t_15) { /* "pandas/src/sparse.pyx":1151 * 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_filename = __pyx_f[0]; __pyx_lineno = 1151; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_6 = __Pyx_PyDict_GetItem(__pyx_v_index_map, __pyx_v_idx); if (unlikely(__pyx_t_6 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1151; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_6); __pyx_t_16 = __Pyx_PyInt_As_npy_int32(__pyx_t_6); if (unlikely((__pyx_t_16 == (npy_int32)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1151; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_17 = __pyx_v_i; __pyx_t_8 = -1; if (__pyx_t_17 < 0) { __pyx_t_17 += __pyx_pybuffernd_indexer.diminfo[0].shape; if (unlikely(__pyx_t_17 < 0)) __pyx_t_8 = 0; } else if (unlikely(__pyx_t_17 >= __pyx_pybuffernd_indexer.diminfo[0].shape)) __pyx_t_8 = 0; if (unlikely(__pyx_t_8 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_8); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1151; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_indexer.diminfo[0].strides) = __pyx_t_16; goto __pyx_L5; } /*else*/ { /* "pandas/src/sparse.pyx":1153 * indexer[i] = index_map[idx] * else: * indexer[i] = -1 # <<<<<<<<<<<<<< * * return indexer */ __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_filename = __pyx_f[0]; __pyx_lineno = 1153; __pyx_clineno = __LINE__; goto __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) = -1; } __pyx_L5:; } /* "pandas/src/sparse.pyx":1155 * 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/src/sparse.pyx":1140 * # 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_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._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/src/sparse.pyx":1187 * * * 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_7_sparse_45reindex_integer(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_7_sparse_45reindex_integer = {__Pyx_NAMESTR("reindex_integer"), (PyCFunction)__pyx_pw_6pandas_7_sparse_45reindex_integer, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_7_sparse_45reindex_integer(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { CYTHON_UNUSED PyArrayObject *__pyx_v_values = 0; CYTHON_UNUSED struct __pyx_obj_6pandas_7_sparse_IntIndex *__pyx_v_sparse_index = 0; CYTHON_UNUSED PyArrayObject *__pyx_v_indexer = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 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); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_values)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_sparse_index)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("reindex_integer", 1, 3, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1187; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_indexer)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("reindex_integer", 1, 3, 3, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1187; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "reindex_integer") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1187; __pyx_clineno = __LINE__; goto __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_7_sparse_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_filename = __pyx_f[0]; __pyx_lineno = 1187; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas._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_filename = __pyx_f[0]; __pyx_lineno = 1187; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_sparse_index), __pyx_ptype_6pandas_7_sparse_IntIndex, 1, "sparse_index", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1188; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_indexer), __pyx_ptype_5numpy_ndarray, 1, "indexer", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1189; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_7_sparse_44reindex_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_7_sparse_44reindex_integer(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyArrayObject *__pyx_v_values, CYTHON_UNUSED struct __pyx_obj_6pandas_7_sparse_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 int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __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_filename = __pyx_f[0]; __pyx_lineno = 1187; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 1187; __pyx_clineno = __LINE__; goto __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_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._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; } /* "numpy.pxd":196 * # 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 fullfill 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_copy_shape; 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_v_hasfields; int __pyx_r; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; int __pyx_t_5; int __pyx_t_6; int __pyx_t_7; PyObject *__pyx_t_8 = NULL; char *__pyx_t_9; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__getbuffer__", 0); if (__pyx_v_info != NULL) { __pyx_v_info->obj = Py_None; __Pyx_INCREF(Py_None); __Pyx_GIVEREF(__pyx_v_info->obj); } /* "numpy.pxd":202 * # of flags * * if info == NULL: return # <<<<<<<<<<<<<< * * cdef int copy_shape, i, ndim */ __pyx_t_1 = ((__pyx_v_info == NULL) != 0); if (__pyx_t_1) { __pyx_r = 0; goto __pyx_L0; } /* "numpy.pxd":205 * * cdef int copy_shape, i, ndim * cdef int endian_detector = 1 # <<<<<<<<<<<<<< * cdef bint little_endian = ((&endian_detector)[0] != 0) * */ __pyx_v_endian_detector = 1; /* "numpy.pxd":206 * cdef int copy_shape, 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); /* "numpy.pxd":208 * cdef bint little_endian = ((&endian_detector)[0] != 0) * * ndim = PyArray_NDIM(self) # <<<<<<<<<<<<<< * * if sizeof(npy_intp) != sizeof(Py_ssize_t): */ __pyx_v_ndim = PyArray_NDIM(__pyx_v_self); /* "numpy.pxd":210 * ndim = PyArray_NDIM(self) * * if sizeof(npy_intp) != sizeof(Py_ssize_t): # <<<<<<<<<<<<<< * copy_shape = 1 * else: */ __pyx_t_1 = (((sizeof(npy_intp)) != (sizeof(Py_ssize_t))) != 0); if (__pyx_t_1) { /* "numpy.pxd":211 * * if sizeof(npy_intp) != sizeof(Py_ssize_t): * copy_shape = 1 # <<<<<<<<<<<<<< * else: * copy_shape = 0 */ __pyx_v_copy_shape = 1; goto __pyx_L4; } /*else*/ { /* "numpy.pxd":213 * copy_shape = 1 * else: * copy_shape = 0 # <<<<<<<<<<<<<< * * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) */ __pyx_v_copy_shape = 0; } __pyx_L4:; /* "numpy.pxd":215 * copy_shape = 0 * * 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_1 = (((__pyx_v_flags & PyBUF_C_CONTIGUOUS) == PyBUF_C_CONTIGUOUS) != 0); if (__pyx_t_1) { /* "numpy.pxd":216 * * 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_3 = __pyx_t_2; } else { __pyx_t_3 = __pyx_t_1; } if (__pyx_t_3) { /* "numpy.pxd":217 * 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_4 = PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__8, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 217; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 217; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } /* "numpy.pxd":219 * 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_3 = (((__pyx_v_flags & PyBUF_F_CONTIGUOUS) == PyBUF_F_CONTIGUOUS) != 0); if (__pyx_t_3) { /* "numpy.pxd":220 * * 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_1 = ((!(PyArray_CHKFLAGS(__pyx_v_self, NPY_F_CONTIGUOUS) != 0)) != 0); __pyx_t_2 = __pyx_t_1; } else { __pyx_t_2 = __pyx_t_3; } if (__pyx_t_2) { /* "numpy.pxd":221 * 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_4 = PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__9, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 221; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 221; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } /* "numpy.pxd":223 * raise ValueError(u"ndarray is not Fortran contiguous") * * info.buf = PyArray_DATA(self) # <<<<<<<<<<<<<< * info.ndim = ndim * if copy_shape: */ __pyx_v_info->buf = PyArray_DATA(__pyx_v_self); /* "numpy.pxd":224 * * info.buf = PyArray_DATA(self) * info.ndim = ndim # <<<<<<<<<<<<<< * if copy_shape: * # Allocate new buffer for strides and shape info. */ __pyx_v_info->ndim = __pyx_v_ndim; /* "numpy.pxd":225 * info.buf = PyArray_DATA(self) * info.ndim = ndim * if copy_shape: # <<<<<<<<<<<<<< * # Allocate new buffer for strides and shape info. * # This is allocated as one block, strides first. */ __pyx_t_2 = (__pyx_v_copy_shape != 0); if (__pyx_t_2) { /* "numpy.pxd":228 * # Allocate new buffer for strides and shape info. * # This is allocated as one block, strides first. * info.strides = stdlib.malloc(sizeof(Py_ssize_t) * ndim * 2) # <<<<<<<<<<<<<< * info.shape = info.strides + ndim * for i in range(ndim): */ __pyx_v_info->strides = ((Py_ssize_t *)malloc((((sizeof(Py_ssize_t)) * ((size_t)__pyx_v_ndim)) * 2))); /* "numpy.pxd":229 * # This is allocated as one block, strides first. * info.strides = stdlib.malloc(sizeof(Py_ssize_t) * ndim * 2) * 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); /* "numpy.pxd":230 * info.strides = stdlib.malloc(sizeof(Py_ssize_t) * ndim * 2) * 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_5 = __pyx_v_ndim; for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) { __pyx_v_i = __pyx_t_6; /* "numpy.pxd":231 * 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]); /* "numpy.pxd":232 * 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]); } goto __pyx_L7; } /*else*/ { /* "numpy.pxd":234 * info.shape[i] = PyArray_DIMS(self)[i] * else: * info.strides = PyArray_STRIDES(self) # <<<<<<<<<<<<<< * info.shape = PyArray_DIMS(self) * info.suboffsets = NULL */ __pyx_v_info->strides = ((Py_ssize_t *)PyArray_STRIDES(__pyx_v_self)); /* "numpy.pxd":235 * 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_L7:; /* "numpy.pxd":236 * 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; /* "numpy.pxd":237 * 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); /* "numpy.pxd":238 * 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)); /* "numpy.pxd":241 * * cdef int t * cdef char* f = NULL # <<<<<<<<<<<<<< * cdef dtype descr = self.descr * cdef list stack */ __pyx_v_f = NULL; /* "numpy.pxd":242 * cdef int t * cdef char* f = NULL * cdef dtype descr = self.descr # <<<<<<<<<<<<<< * cdef list stack * cdef int offset */ __pyx_t_4 = ((PyObject *)__pyx_v_self->descr); __Pyx_INCREF(__pyx_t_4); __pyx_v_descr = ((PyArray_Descr *)__pyx_t_4); __pyx_t_4 = 0; /* "numpy.pxd":246 * cdef int offset * * cdef bint hasfields = PyDataType_HASFIELDS(descr) # <<<<<<<<<<<<<< * * if not hasfields and not copy_shape: */ __pyx_v_hasfields = PyDataType_HASFIELDS(__pyx_v_descr); /* "numpy.pxd":248 * cdef bint hasfields = PyDataType_HASFIELDS(descr) * * if not hasfields and not copy_shape: # <<<<<<<<<<<<<< * # do not call releasebuffer * info.obj = None */ __pyx_t_2 = ((!(__pyx_v_hasfields != 0)) != 0); if (__pyx_t_2) { __pyx_t_3 = ((!(__pyx_v_copy_shape != 0)) != 0); __pyx_t_1 = __pyx_t_3; } else { __pyx_t_1 = __pyx_t_2; } if (__pyx_t_1) { /* "numpy.pxd":250 * if not hasfields and not copy_shape: * # do not call releasebuffer * info.obj = None # <<<<<<<<<<<<<< * else: * # need to call releasebuffer */ __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_info->obj); __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = Py_None; goto __pyx_L10; } /*else*/ { /* "numpy.pxd":253 * else: * # need to call releasebuffer * info.obj = self # <<<<<<<<<<<<<< * * if not hasfields: */ __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); } __pyx_L10:; /* "numpy.pxd":255 * info.obj = self * * if not hasfields: # <<<<<<<<<<<<<< * t = descr.type_num * if ((descr.byteorder == '>' and little_endian) or */ __pyx_t_1 = ((!(__pyx_v_hasfields != 0)) != 0); if (__pyx_t_1) { /* "numpy.pxd":256 * * if not hasfields: * t = descr.type_num # <<<<<<<<<<<<<< * if ((descr.byteorder == '>' and little_endian) or * (descr.byteorder == '<' and not little_endian)): */ __pyx_t_5 = __pyx_v_descr->type_num; __pyx_v_t = __pyx_t_5; /* "numpy.pxd":257 * if not hasfields: * t = descr.type_num * if ((descr.byteorder == '>' and little_endian) or # <<<<<<<<<<<<<< * (descr.byteorder == '<' and not little_endian)): * raise ValueError(u"Non-native byte order not supported") */ __pyx_t_1 = ((__pyx_v_descr->byteorder == '>') != 0); if (__pyx_t_1) { __pyx_t_2 = (__pyx_v_little_endian != 0); } else { __pyx_t_2 = __pyx_t_1; } if (!__pyx_t_2) { /* "numpy.pxd":258 * t = descr.type_num * if ((descr.byteorder == '>' and little_endian) or * (descr.byteorder == '<' and not little_endian)): # <<<<<<<<<<<<<< * raise ValueError(u"Non-native byte order not supported") * if t == NPY_BYTE: f = "b" */ __pyx_t_1 = ((__pyx_v_descr->byteorder == '<') != 0); if (__pyx_t_1) { __pyx_t_3 = ((!(__pyx_v_little_endian != 0)) != 0); __pyx_t_7 = __pyx_t_3; } else { __pyx_t_7 = __pyx_t_1; } __pyx_t_1 = __pyx_t_7; } else { __pyx_t_1 = __pyx_t_2; } if (__pyx_t_1) { /* "numpy.pxd":259 * if ((descr.byteorder == '>' and little_endian) or * (descr.byteorder == '<' 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_4 = PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__10, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 259; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 259; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } /* "numpy.pxd":276 * 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) */ switch (__pyx_v_t) { /* "numpy.pxd":260 * (descr.byteorder == '<' 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" */ case NPY_BYTE: __pyx_v_f = __pyx_k_b; break; /* "numpy.pxd":261 * 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 = __pyx_k_B; break; /* "numpy.pxd":262 * 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 = __pyx_k_h; break; /* "numpy.pxd":263 * 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 = __pyx_k_H; break; /* "numpy.pxd":264 * 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 = __pyx_k_i; break; /* "numpy.pxd":265 * 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 = __pyx_k_I; break; /* "numpy.pxd":266 * 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 = __pyx_k_l; break; /* "numpy.pxd":267 * 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 = __pyx_k_L; break; /* "numpy.pxd":268 * 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 = __pyx_k_q; break; /* "numpy.pxd":269 * 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 = __pyx_k_Q; break; /* "numpy.pxd":270 * 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 = __pyx_k_f; break; /* "numpy.pxd":271 * 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 = __pyx_k_d; break; /* "numpy.pxd":272 * 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 = __pyx_k_g; break; /* "numpy.pxd":273 * 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 = __pyx_k_Zf; break; /* "numpy.pxd":274 * 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 = __pyx_k_Zd; break; /* "numpy.pxd":275 * 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 = __pyx_k_Zg; break; /* "numpy.pxd":276 * 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 = __pyx_k_O; break; default: /* "numpy.pxd":278 * elif t == NPY_OBJECT: f = "O" * else: * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) # <<<<<<<<<<<<<< * info.format = f * return */ __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_t); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 278; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_8 = PyUnicode_Format(__pyx_kp_u_unknown_dtype_code_in_numpy_pxd, __pyx_t_4); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 278; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 278; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_8); __Pyx_GIVEREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_8 = PyObject_Call(__pyx_builtin_ValueError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 278; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_Raise(__pyx_t_8, 0, 0, 0); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; {__pyx_filename = __pyx_f[1]; __pyx_lineno = 278; __pyx_clineno = __LINE__; goto __pyx_L1_error;} break; } /* "numpy.pxd":279 * else: * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) * info.format = f # <<<<<<<<<<<<<< * return * else: */ __pyx_v_info->format = __pyx_v_f; /* "numpy.pxd":280 * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) * info.format = f * return # <<<<<<<<<<<<<< * else: * info.format = stdlib.malloc(_buffer_format_string_len) */ __pyx_r = 0; goto __pyx_L0; } /*else*/ { /* "numpy.pxd":282 * return * else: * info.format = stdlib.malloc(_buffer_format_string_len) # <<<<<<<<<<<<<< * info.format[0] = '^' # Native data types, manual alignment * offset = 0 */ __pyx_v_info->format = ((char *)malloc(255)); /* "numpy.pxd":283 * else: * info.format = stdlib.malloc(_buffer_format_string_len) * info.format[0] = '^' # Native data types, manual alignment # <<<<<<<<<<<<<< * offset = 0 * f = _util_dtypestring(descr, info.format + 1, */ (__pyx_v_info->format[0]) = '^'; /* "numpy.pxd":284 * info.format = stdlib.malloc(_buffer_format_string_len) * info.format[0] = '^' # Native data types, manual alignment * offset = 0 # <<<<<<<<<<<<<< * f = _util_dtypestring(descr, info.format + 1, * info.format + _buffer_format_string_len, */ __pyx_v_offset = 0; /* "numpy.pxd":285 * info.format[0] = '^' # Native data types, manual alignment * offset = 0 * f = _util_dtypestring(descr, info.format + 1, # <<<<<<<<<<<<<< * info.format + _buffer_format_string_len, * &offset) */ __pyx_t_9 = __pyx_f_5numpy__util_dtypestring(__pyx_v_descr, (__pyx_v_info->format + 1), (__pyx_v_info->format + 255), (&__pyx_v_offset)); if (unlikely(__pyx_t_9 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 285; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_f = __pyx_t_9; /* "numpy.pxd":288 * info.format + _buffer_format_string_len, * &offset) * f[0] = 0 # Terminate format string # <<<<<<<<<<<<<< * * def __releasebuffer__(ndarray self, Py_buffer* info): */ (__pyx_v_f[0]) = 0; } /* "numpy.pxd":196 * # 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 fullfill the PEP. */ /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_8); __Pyx_AddTraceback("numpy.ndarray.__getbuffer__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; if (__pyx_v_info != NULL && __pyx_v_info->obj != NULL) { __Pyx_GOTREF(__pyx_v_info->obj); __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = NULL; } goto __pyx_L2; __pyx_L0:; if (__pyx_v_info != NULL && __pyx_v_info->obj == Py_None) { __Pyx_GOTREF(Py_None); __Pyx_DECREF(Py_None); __pyx_v_info->obj = NULL; } __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_descr); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "numpy.pxd":290 * f[0] = 0 # Terminate format string * * def __releasebuffer__(ndarray self, Py_buffer* info): # <<<<<<<<<<<<<< * if PyArray_HASFIELDS(self): * stdlib.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); /* "numpy.pxd":291 * * def __releasebuffer__(ndarray self, Py_buffer* info): * if PyArray_HASFIELDS(self): # <<<<<<<<<<<<<< * stdlib.free(info.format) * if sizeof(npy_intp) != sizeof(Py_ssize_t): */ __pyx_t_1 = (PyArray_HASFIELDS(__pyx_v_self) != 0); if (__pyx_t_1) { /* "numpy.pxd":292 * def __releasebuffer__(ndarray self, Py_buffer* info): * if PyArray_HASFIELDS(self): * stdlib.free(info.format) # <<<<<<<<<<<<<< * if sizeof(npy_intp) != sizeof(Py_ssize_t): * stdlib.free(info.strides) */ free(__pyx_v_info->format); goto __pyx_L3; } __pyx_L3:; /* "numpy.pxd":293 * if PyArray_HASFIELDS(self): * stdlib.free(info.format) * if sizeof(npy_intp) != sizeof(Py_ssize_t): # <<<<<<<<<<<<<< * stdlib.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) { /* "numpy.pxd":294 * stdlib.free(info.format) * if sizeof(npy_intp) != sizeof(Py_ssize_t): * stdlib.free(info.strides) # <<<<<<<<<<<<<< * # info.shape was stored after info.strides in the same block * */ free(__pyx_v_info->strides); goto __pyx_L4; } __pyx_L4:; /* "numpy.pxd":290 * f[0] = 0 # Terminate format string * * def __releasebuffer__(ndarray self, Py_buffer* info): # <<<<<<<<<<<<<< * if PyArray_HASFIELDS(self): * stdlib.free(info.format) */ /* function exit code */ __Pyx_RefNannyFinishContext(); } /* "numpy.pxd":772 * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PyArray_MultiIterNew1", 0); /* "numpy.pxd":773 * * 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_filename = __pyx_f[1]; __pyx_lineno = 773; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "numpy.pxd":772 * 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; } /* "numpy.pxd":775 * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PyArray_MultiIterNew2", 0); /* "numpy.pxd":776 * * 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_filename = __pyx_f[1]; __pyx_lineno = 776; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "numpy.pxd":775 * 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; } /* "numpy.pxd":778 * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PyArray_MultiIterNew3", 0); /* "numpy.pxd":779 * * 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_filename = __pyx_f[1]; __pyx_lineno = 779; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "numpy.pxd":778 * 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; } /* "numpy.pxd":781 * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PyArray_MultiIterNew4", 0); /* "numpy.pxd":782 * * 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_filename = __pyx_f[1]; __pyx_lineno = 782; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "numpy.pxd":781 * 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; } /* "numpy.pxd":784 * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PyArray_MultiIterNew5", 0); /* "numpy.pxd":785 * * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): * return PyArray_MultiIterNew(5, a, b, c, d, e) # <<<<<<<<<<<<<< * * cdef inline char* _util_dtypestring(dtype descr, char* f, char* end, int* offset) except NULL: */ __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_filename = __pyx_f[1]; __pyx_lineno = 785; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "numpy.pxd":784 * 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; } /* "numpy.pxd":787 * return PyArray_MultiIterNew(5, a, b, c, d, e) * * 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; PyObject *__pyx_t_5 = NULL; int __pyx_t_6; int __pyx_t_7; int __pyx_t_8; int __pyx_t_9; long __pyx_t_10; char *__pyx_t_11; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_util_dtypestring", 0); /* "numpy.pxd":794 * cdef int delta_offset * cdef tuple i * cdef int endian_detector = 1 # <<<<<<<<<<<<<< * cdef bint little_endian = ((&endian_detector)[0] != 0) * cdef tuple fields */ __pyx_v_endian_detector = 1; /* "numpy.pxd":795 * cdef tuple i * 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); /* "numpy.pxd":798 * 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_filename = __pyx_f[1]; __pyx_lineno = 798; __pyx_clineno = __LINE__; goto __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_COMPILING_IN_CPYTHON __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_filename = __pyx_f[1]; __pyx_lineno = 798; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 798; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif __Pyx_XDECREF_SET(__pyx_v_childname, __pyx_t_3); __pyx_t_3 = 0; /* "numpy.pxd":799 * * for childname in descr.names: * fields = descr.fields[childname] # <<<<<<<<<<<<<< * child, new_offset = fields * */ __pyx_t_3 = PyObject_GetItem(__pyx_v_descr->fields, __pyx_v_childname); if (unlikely(__pyx_t_3 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 799; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 799; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_XDECREF_SET(__pyx_v_fields, ((PyObject*)__pyx_t_3)); __pyx_t_3 = 0; /* "numpy.pxd":800 * 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; #if CYTHON_COMPILING_IN_CPYTHON Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 800; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON __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_filename = __pyx_f[1]; __pyx_lineno = 800; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 800; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); #endif } else { __Pyx_RaiseNoneNotIterableError(); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 800; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_dtype))))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 800; __pyx_clineno = __LINE__; goto __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; /* "numpy.pxd":802 * 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_ptrdiff_t((__pyx_v_end - __pyx_v_f)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 802; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = __Pyx_PyInt_From_int((__pyx_v_offset[0])); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 802; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = PyNumber_Subtract(__pyx_v_new_offset, __pyx_t_3); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 802; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyNumber_Subtract(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 802; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyObject_RichCompare(__pyx_t_3, __pyx_int_15, Py_LT); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 802; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 802; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_6) { /* "numpy.pxd":803 * * if (end - f) - (new_offset - offset[0]) < 15: * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") # <<<<<<<<<<<<<< * * if ((child.byteorder == '>' and little_endian) or */ __pyx_t_5 = PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__11, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 803; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_Raise(__pyx_t_5, 0, 0, 0); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; {__pyx_filename = __pyx_f[1]; __pyx_lineno = 803; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } /* "numpy.pxd":805 * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") * * if ((child.byteorder == '>' and little_endian) or # <<<<<<<<<<<<<< * (child.byteorder == '<' and not little_endian)): * raise ValueError(u"Non-native byte order not supported") */ __pyx_t_6 = ((__pyx_v_child->byteorder == '>') != 0); if (__pyx_t_6) { __pyx_t_7 = (__pyx_v_little_endian != 0); } else { __pyx_t_7 = __pyx_t_6; } if (!__pyx_t_7) { /* "numpy.pxd":806 * * if ((child.byteorder == '>' and little_endian) or * (child.byteorder == '<' 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_6 = ((__pyx_v_child->byteorder == '<') != 0); if (__pyx_t_6) { __pyx_t_8 = ((!(__pyx_v_little_endian != 0)) != 0); __pyx_t_9 = __pyx_t_8; } else { __pyx_t_9 = __pyx_t_6; } __pyx_t_6 = __pyx_t_9; } else { __pyx_t_6 = __pyx_t_7; } if (__pyx_t_6) { /* "numpy.pxd":807 * if ((child.byteorder == '>' and little_endian) or * (child.byteorder == '<' 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_5 = PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__12, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 807; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_Raise(__pyx_t_5, 0, 0, 0); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; {__pyx_filename = __pyx_f[1]; __pyx_lineno = 807; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } /* "numpy.pxd":817 * * # Output padding bytes * while offset[0] < new_offset: # <<<<<<<<<<<<<< * f[0] = 120 # "x"; pad byte * f += 1 */ while (1) { __pyx_t_5 = __Pyx_PyInt_From_int((__pyx_v_offset[0])); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 817; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = PyObject_RichCompare(__pyx_t_5, __pyx_v_new_offset, Py_LT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 817; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 817; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (!__pyx_t_6) break; /* "numpy.pxd":818 * # Output padding bytes * while offset[0] < new_offset: * f[0] = 120 # "x"; pad byte # <<<<<<<<<<<<<< * f += 1 * offset[0] += 1 */ (__pyx_v_f[0]) = 120; /* "numpy.pxd":819 * while offset[0] < new_offset: * f[0] = 120 # "x"; pad byte * f += 1 # <<<<<<<<<<<<<< * offset[0] += 1 * */ __pyx_v_f = (__pyx_v_f + 1); /* "numpy.pxd":820 * f[0] = 120 # "x"; pad byte * f += 1 * offset[0] += 1 # <<<<<<<<<<<<<< * * offset[0] += child.itemsize */ __pyx_t_10 = 0; (__pyx_v_offset[__pyx_t_10]) = ((__pyx_v_offset[__pyx_t_10]) + 1); } /* "numpy.pxd":822 * offset[0] += 1 * * offset[0] += child.itemsize # <<<<<<<<<<<<<< * * if not PyDataType_HASFIELDS(child): */ __pyx_t_10 = 0; (__pyx_v_offset[__pyx_t_10]) = ((__pyx_v_offset[__pyx_t_10]) + __pyx_v_child->elsize); /* "numpy.pxd":824 * 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) { /* "numpy.pxd":825 * * if not PyDataType_HASFIELDS(child): * t = child.type_num # <<<<<<<<<<<<<< * if end - f < 5: * raise RuntimeError(u"Format string allocated too short.") */ __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_child->type_num); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 825; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_XDECREF_SET(__pyx_v_t, __pyx_t_3); __pyx_t_3 = 0; /* "numpy.pxd":826 * 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 (__pyx_t_6) { /* "numpy.pxd":827 * 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_3 = PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__13, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 827; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 827; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } /* "numpy.pxd":830 * * # 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_3 = PyInt_FromLong(NPY_BYTE); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 830; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 830; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 830; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_6) { (__pyx_v_f[0]) = 98; goto __pyx_L11; } /* "numpy.pxd":831 * # 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_5 = PyInt_FromLong(NPY_UBYTE); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 831; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 831; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 831; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_6) { (__pyx_v_f[0]) = 66; goto __pyx_L11; } /* "numpy.pxd":832 * 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_3 = PyInt_FromLong(NPY_SHORT); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 832; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 832; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 832; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_6) { (__pyx_v_f[0]) = 104; goto __pyx_L11; } /* "numpy.pxd":833 * 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_5 = PyInt_FromLong(NPY_USHORT); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 833; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 833; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 833; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_6) { (__pyx_v_f[0]) = 72; goto __pyx_L11; } /* "numpy.pxd":834 * 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_3 = PyInt_FromLong(NPY_INT); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 834; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 834; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 834; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_6) { (__pyx_v_f[0]) = 105; goto __pyx_L11; } /* "numpy.pxd":835 * 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_5 = PyInt_FromLong(NPY_UINT); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 835; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 835; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 835; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_6) { (__pyx_v_f[0]) = 73; goto __pyx_L11; } /* "numpy.pxd":836 * 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_3 = PyInt_FromLong(NPY_LONG); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 836; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 836; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 836; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_6) { (__pyx_v_f[0]) = 108; goto __pyx_L11; } /* "numpy.pxd":837 * 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_5 = PyInt_FromLong(NPY_ULONG); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 837; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 837; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 837; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_6) { (__pyx_v_f[0]) = 76; goto __pyx_L11; } /* "numpy.pxd":838 * 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_3 = PyInt_FromLong(NPY_LONGLONG); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 838; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 838; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 838; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_6) { (__pyx_v_f[0]) = 113; goto __pyx_L11; } /* "numpy.pxd":839 * 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_5 = PyInt_FromLong(NPY_ULONGLONG); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 839; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 839; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 839; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_6) { (__pyx_v_f[0]) = 81; goto __pyx_L11; } /* "numpy.pxd":840 * 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_3 = PyInt_FromLong(NPY_FLOAT); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 840; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 840; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 840; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_6) { (__pyx_v_f[0]) = 102; goto __pyx_L11; } /* "numpy.pxd":841 * 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_5 = PyInt_FromLong(NPY_DOUBLE); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 841; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 841; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 841; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_6) { (__pyx_v_f[0]) = 100; goto __pyx_L11; } /* "numpy.pxd":842 * 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_3 = PyInt_FromLong(NPY_LONGDOUBLE); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 842; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 842; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 842; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_6) { (__pyx_v_f[0]) = 103; goto __pyx_L11; } /* "numpy.pxd":843 * 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_5 = PyInt_FromLong(NPY_CFLOAT); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 843; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 843; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 843; __pyx_clineno = __LINE__; goto __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]) = 102; __pyx_v_f = (__pyx_v_f + 1); goto __pyx_L11; } /* "numpy.pxd":844 * 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_3 = PyInt_FromLong(NPY_CDOUBLE); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 844; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 844; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 844; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_6) { (__pyx_v_f[0]) = 90; (__pyx_v_f[1]) = 100; __pyx_v_f = (__pyx_v_f + 1); goto __pyx_L11; } /* "numpy.pxd":845 * 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_5 = PyInt_FromLong(NPY_CLONGDOUBLE); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 845; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 845; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 845; __pyx_clineno = __LINE__; goto __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]) = 103; __pyx_v_f = (__pyx_v_f + 1); goto __pyx_L11; } /* "numpy.pxd":846 * 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_3 = PyInt_FromLong(NPY_OBJECT); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 846; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 846; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 846; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_6) { (__pyx_v_f[0]) = 79; goto __pyx_L11; } /*else*/ { /* "numpy.pxd":848 * elif t == NPY_OBJECT: f[0] = 79 #"O" * else: * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) # <<<<<<<<<<<<<< * f += 1 * else: */ __pyx_t_5 = PyUnicode_Format(__pyx_kp_u_unknown_dtype_code_in_numpy_pxd, __pyx_v_t); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 848; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 848; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyObject_Call(__pyx_builtin_ValueError, __pyx_t_3, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 848; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_Raise(__pyx_t_5, 0, 0, 0); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; {__pyx_filename = __pyx_f[1]; __pyx_lineno = 848; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_L11:; /* "numpy.pxd":849 * 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); goto __pyx_L9; } /*else*/ { /* "numpy.pxd":853 * # Cython ignores struct boundary information ("T{...}"), * # so don't output it * f = _util_dtypestring(child, f, end, offset) # <<<<<<<<<<<<<< * return f * */ __pyx_t_11 = __pyx_f_5numpy__util_dtypestring(__pyx_v_child, __pyx_v_f, __pyx_v_end, __pyx_v_offset); if (unlikely(__pyx_t_11 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 853; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_f = __pyx_t_11; } __pyx_L9:; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "numpy.pxd":854 * # so don't output it * f = _util_dtypestring(child, f, end, offset) * return f # <<<<<<<<<<<<<< * * */ __pyx_r = __pyx_v_f; goto __pyx_L0; /* "numpy.pxd":787 * return PyArray_MultiIterNew(5, a, b, c, d, e) * * 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_XDECREF(__pyx_t_5); __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; } /* "numpy.pxd":969 * * * 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); /* "numpy.pxd":971 * 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) { /* "numpy.pxd":972 * cdef PyObject* baseptr * if base is None: * baseptr = NULL # <<<<<<<<<<<<<< * else: * Py_INCREF(base) # important to do this before decref below! */ __pyx_v_baseptr = NULL; goto __pyx_L3; } /*else*/ { /* "numpy.pxd":974 * baseptr = NULL * else: * Py_INCREF(base) # important to do this before decref below! # <<<<<<<<<<<<<< * baseptr = base * Py_XDECREF(arr.base) */ Py_INCREF(__pyx_v_base); /* "numpy.pxd":975 * 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:; /* "numpy.pxd":976 * 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); /* "numpy.pxd":977 * baseptr = base * Py_XDECREF(arr.base) * arr.base = baseptr # <<<<<<<<<<<<<< * * cdef inline object get_array_base(ndarray arr): */ __pyx_v_arr->base = __pyx_v_baseptr; /* "numpy.pxd":969 * * * cdef inline void set_array_base(ndarray arr, object base): # <<<<<<<<<<<<<< * cdef PyObject* baseptr * if base is None: */ /* function exit code */ __Pyx_RefNannyFinishContext(); } /* "numpy.pxd":979 * 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); /* "numpy.pxd":980 * * 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) { /* "numpy.pxd":981 * cdef inline object get_array_base(ndarray arr): * if arr.base is NULL: * return None # <<<<<<<<<<<<<< * else: * return arr.base */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(Py_None); __pyx_r = Py_None; goto __pyx_L0; } /*else*/ { /* "numpy.pxd":983 * return None * else: * return arr.base # <<<<<<<<<<<<<< */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_arr->base)); __pyx_r = ((PyObject *)__pyx_v_arr->base); goto __pyx_L0; } /* "numpy.pxd":979 * 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; } static struct __pyx_vtabstruct_6pandas_7_sparse_BlockMerge __pyx_vtable_6pandas_7_sparse_BlockMerge; static PyObject *__pyx_tp_new_6pandas_7_sparse_BlockMerge(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { struct __pyx_obj_6pandas_7_sparse_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_7_sparse_BlockMerge *)o); p->__pyx_vtab = __pyx_vtabptr_6pandas_7_sparse_BlockMerge; p->x = ((struct __pyx_obj_6pandas_7_sparse_BlockIndex *)Py_None); Py_INCREF(Py_None); p->y = ((struct __pyx_obj_6pandas_7_sparse_BlockIndex *)Py_None); Py_INCREF(Py_None); p->result = ((struct __pyx_obj_6pandas_7_sparse_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_7_sparse_BlockMerge(PyObject *o) { struct __pyx_obj_6pandas_7_sparse_BlockMerge *p = (struct __pyx_obj_6pandas_7_sparse_BlockMerge *)o; #if PY_VERSION_HEX >= 0x030400a1 if (unlikely(Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) { if (PyObject_CallFinalizerFromDealloc(o)) return; } #endif PyObject_GC_UnTrack(o); 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_7_sparse_BlockMerge(PyObject *o, visitproc v, void *a) { int e; struct __pyx_obj_6pandas_7_sparse_BlockMerge *p = (struct __pyx_obj_6pandas_7_sparse_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_7_sparse_BlockMerge(PyObject *o) { PyObject* tmp; struct __pyx_obj_6pandas_7_sparse_BlockMerge *p = (struct __pyx_obj_6pandas_7_sparse_BlockMerge *)o; tmp = ((PyObject*)p->x); p->x = ((struct __pyx_obj_6pandas_7_sparse_BlockIndex *)Py_None); Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->y); p->y = ((struct __pyx_obj_6pandas_7_sparse_BlockIndex *)Py_None); Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->result); p->result = ((struct __pyx_obj_6pandas_7_sparse_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_7_sparse_BlockMerge[] = { {0, 0, 0, 0} }; static PyTypeObject __pyx_type_6pandas_7_sparse_BlockMerge = { PyVarObject_HEAD_INIT(0, 0) __Pyx_NAMESTR("pandas._sparse.BlockMerge"), /*tp_name*/ sizeof(struct __pyx_obj_6pandas_7_sparse_BlockMerge), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_6pandas_7_sparse_BlockMerge, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #else 0, /*reserved*/ #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*/ __Pyx_DOCSTR("\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_7_sparse_BlockMerge, /*tp_traverse*/ __pyx_tp_clear_6pandas_7_sparse_BlockMerge, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_6pandas_7_sparse_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_7_sparse_10BlockMerge_1__init__, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_6pandas_7_sparse_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*/ #if PY_VERSION_HEX >= 0x02060000 0, /*tp_version_tag*/ #endif #if PY_VERSION_HEX >= 0x030400a1 0, /*tp_finalize*/ #endif }; static PyObject *__pyx_tp_new_6pandas_7_sparse_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_7_sparse_SparseIndex(PyObject *o) { #if PY_VERSION_HEX >= 0x030400a1 if (unlikely(Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) { if (PyObject_CallFinalizerFromDealloc(o)) return; } #endif (*Py_TYPE(o)->tp_free)(o); } static PyMethodDef __pyx_methods_6pandas_7_sparse_SparseIndex[] = { {0, 0, 0, 0} }; static PyTypeObject __pyx_type_6pandas_7_sparse_SparseIndex = { PyVarObject_HEAD_INIT(0, 0) __Pyx_NAMESTR("pandas._sparse.SparseIndex"), /*tp_name*/ sizeof(struct __pyx_obj_6pandas_7_sparse_SparseIndex), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_6pandas_7_sparse_SparseIndex, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #else 0, /*reserved*/ #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*/ __Pyx_DOCSTR("\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_7_sparse_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_7_sparse_11SparseIndex_1__init__, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_6pandas_7_sparse_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*/ #if PY_VERSION_HEX >= 0x02060000 0, /*tp_version_tag*/ #endif #if PY_VERSION_HEX >= 0x030400a1 0, /*tp_finalize*/ #endif }; static struct __pyx_vtabstruct_6pandas_7_sparse_BlockIndex __pyx_vtable_6pandas_7_sparse_BlockIndex; static PyObject *__pyx_tp_new_6pandas_7_sparse_BlockIndex(PyTypeObject *t, PyObject *a, PyObject *k) { struct __pyx_obj_6pandas_7_sparse_BlockIndex *p; PyObject *o = __pyx_tp_new_6pandas_7_sparse_SparseIndex(t, a, k); if (unlikely(!o)) return 0; p = ((struct __pyx_obj_6pandas_7_sparse_BlockIndex *)o); p->__pyx_vtab = __pyx_vtabptr_6pandas_7_sparse_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_7_sparse_BlockIndex(PyObject *o) { struct __pyx_obj_6pandas_7_sparse_BlockIndex *p = (struct __pyx_obj_6pandas_7_sparse_BlockIndex *)o; #if PY_VERSION_HEX >= 0x030400a1 if (unlikely(Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) { if (PyObject_CallFinalizerFromDealloc(o)) return; } #endif PyObject_GC_UnTrack(o); if (p->__weakref__) PyObject_ClearWeakRefs(o); Py_CLEAR(p->blocs); Py_CLEAR(p->blengths); #if CYTHON_COMPILING_IN_CPYTHON if (PyType_IS_GC(Py_TYPE(o)->tp_base)) #endif PyObject_GC_Track(o); __pyx_tp_dealloc_6pandas_7_sparse_SparseIndex(o); } static int __pyx_tp_traverse_6pandas_7_sparse_BlockIndex(PyObject *o, visitproc v, void *a) { int e; struct __pyx_obj_6pandas_7_sparse_BlockIndex *p = (struct __pyx_obj_6pandas_7_sparse_BlockIndex *)o; e = ((likely(__pyx_ptype_6pandas_7_sparse_SparseIndex)) ? ((__pyx_ptype_6pandas_7_sparse_SparseIndex->tp_traverse) ? __pyx_ptype_6pandas_7_sparse_SparseIndex->tp_traverse(o, v, a) : 0) : __Pyx_call_next_tp_traverse(o, v, a, __pyx_tp_traverse_6pandas_7_sparse_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_7_sparse_BlockIndex(PyObject *o) { PyObject* tmp; struct __pyx_obj_6pandas_7_sparse_BlockIndex *p = (struct __pyx_obj_6pandas_7_sparse_BlockIndex *)o; if (likely(__pyx_ptype_6pandas_7_sparse_SparseIndex)) { if (__pyx_ptype_6pandas_7_sparse_SparseIndex->tp_clear) __pyx_ptype_6pandas_7_sparse_SparseIndex->tp_clear(o); } else __Pyx_call_next_tp_clear(o, __pyx_tp_clear_6pandas_7_sparse_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_7_sparse_10BlockIndex_nblocks(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6pandas_7_sparse_10BlockIndex_7nblocks_1__get__(o); } static PyObject *__pyx_getprop_6pandas_7_sparse_10BlockIndex_npoints(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6pandas_7_sparse_10BlockIndex_7npoints_1__get__(o); } static PyObject *__pyx_getprop_6pandas_7_sparse_10BlockIndex_length(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6pandas_7_sparse_10BlockIndex_6length_1__get__(o); } static PyObject *__pyx_getprop_6pandas_7_sparse_10BlockIndex_blocs(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6pandas_7_sparse_10BlockIndex_5blocs_1__get__(o); } static PyObject *__pyx_getprop_6pandas_7_sparse_10BlockIndex_blengths(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6pandas_7_sparse_10BlockIndex_8blengths_1__get__(o); } static PyMethodDef __pyx_methods_6pandas_7_sparse_BlockIndex[] = { {__Pyx_NAMESTR("__reduce__"), (PyCFunction)__pyx_pw_6pandas_7_sparse_10BlockIndex_3__reduce__, METH_NOARGS, __Pyx_DOCSTR(0)}, {__Pyx_NAMESTR("ngaps"), (PyCFunction)__pyx_pw_6pandas_7_sparse_10BlockIndex_7ngaps, METH_NOARGS, __Pyx_DOCSTR(0)}, {__Pyx_NAMESTR("check_integrity"), (PyCFunction)__pyx_pw_6pandas_7_sparse_10BlockIndex_9check_integrity, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_6pandas_7_sparse_10BlockIndex_8check_integrity)}, {__Pyx_NAMESTR("equals"), (PyCFunction)__pyx_pw_6pandas_7_sparse_10BlockIndex_11equals, METH_O, __Pyx_DOCSTR(0)}, {__Pyx_NAMESTR("to_block_index"), (PyCFunction)__pyx_pw_6pandas_7_sparse_10BlockIndex_13to_block_index, METH_NOARGS, __Pyx_DOCSTR(0)}, {__Pyx_NAMESTR("to_int_index"), (PyCFunction)__pyx_pw_6pandas_7_sparse_10BlockIndex_15to_int_index, METH_NOARGS, __Pyx_DOCSTR(0)}, {__Pyx_NAMESTR("intersect"), (PyCFunction)__pyx_pw_6pandas_7_sparse_10BlockIndex_17intersect, METH_O, __Pyx_DOCSTR(__pyx_doc_6pandas_7_sparse_10BlockIndex_16intersect)}, {__Pyx_NAMESTR("make_union"), (PyCFunction)__pyx_pw_6pandas_7_sparse_10BlockIndex_19make_union, METH_O, __Pyx_DOCSTR(__pyx_doc_6pandas_7_sparse_10BlockIndex_18make_union)}, {__Pyx_NAMESTR("lookup"), (PyCFunction)__pyx_pw_6pandas_7_sparse_10BlockIndex_21lookup, METH_O, __Pyx_DOCSTR(__pyx_doc_6pandas_7_sparse_10BlockIndex_20lookup)}, {__Pyx_NAMESTR("reindex"), (PyCFunction)__pyx_pw_6pandas_7_sparse_10BlockIndex_23reindex, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}, {__Pyx_NAMESTR("put"), (PyCFunction)__pyx_pw_6pandas_7_sparse_10BlockIndex_25put, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}, {__Pyx_NAMESTR("take"), (PyCFunction)__pyx_pw_6pandas_7_sparse_10BlockIndex_27take, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}, {0, 0, 0, 0} }; static struct PyGetSetDef __pyx_getsets_6pandas_7_sparse_BlockIndex[] = { {(char *)"nblocks", __pyx_getprop_6pandas_7_sparse_10BlockIndex_nblocks, 0, 0, 0}, {(char *)"npoints", __pyx_getprop_6pandas_7_sparse_10BlockIndex_npoints, 0, 0, 0}, {(char *)"length", __pyx_getprop_6pandas_7_sparse_10BlockIndex_length, 0, 0, 0}, {(char *)"blocs", __pyx_getprop_6pandas_7_sparse_10BlockIndex_blocs, 0, 0, 0}, {(char *)"blengths", __pyx_getprop_6pandas_7_sparse_10BlockIndex_blengths, 0, 0, 0}, {0, 0, 0, 0, 0} }; static PyTypeObject __pyx_type_6pandas_7_sparse_BlockIndex = { PyVarObject_HEAD_INIT(0, 0) __Pyx_NAMESTR("pandas._sparse.BlockIndex"), /*tp_name*/ sizeof(struct __pyx_obj_6pandas_7_sparse_BlockIndex), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_6pandas_7_sparse_BlockIndex, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #else 0, /*reserved*/ #endif __pyx_pw_6pandas_7_sparse_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*/ __Pyx_DOCSTR("\n Object for holding block-based sparse indexing information\n\n Parameters\n ----------\n "), /*tp_doc*/ __pyx_tp_traverse_6pandas_7_sparse_BlockIndex, /*tp_traverse*/ __pyx_tp_clear_6pandas_7_sparse_BlockIndex, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_6pandas_7_sparse_BlockIndex, /*tp_methods*/ 0, /*tp_members*/ __pyx_getsets_6pandas_7_sparse_BlockIndex, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ __pyx_pw_6pandas_7_sparse_10BlockIndex_1__init__, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_6pandas_7_sparse_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*/ #if PY_VERSION_HEX >= 0x02060000 0, /*tp_version_tag*/ #endif #if PY_VERSION_HEX >= 0x030400a1 0, /*tp_finalize*/ #endif }; static struct __pyx_vtabstruct_6pandas_7_sparse_IntIndex __pyx_vtable_6pandas_7_sparse_IntIndex; static PyObject *__pyx_tp_new_6pandas_7_sparse_IntIndex(PyTypeObject *t, PyObject *a, PyObject *k) { struct __pyx_obj_6pandas_7_sparse_IntIndex *p; PyObject *o = __pyx_tp_new_6pandas_7_sparse_SparseIndex(t, a, k); if (unlikely(!o)) return 0; p = ((struct __pyx_obj_6pandas_7_sparse_IntIndex *)o); p->__pyx_vtab = __pyx_vtabptr_6pandas_7_sparse_IntIndex; p->indices = ((PyArrayObject *)Py_None); Py_INCREF(Py_None); return o; } static void __pyx_tp_dealloc_6pandas_7_sparse_IntIndex(PyObject *o) { struct __pyx_obj_6pandas_7_sparse_IntIndex *p = (struct __pyx_obj_6pandas_7_sparse_IntIndex *)o; #if PY_VERSION_HEX >= 0x030400a1 if (unlikely(Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) { if (PyObject_CallFinalizerFromDealloc(o)) return; } #endif PyObject_GC_UnTrack(o); Py_CLEAR(p->indices); #if CYTHON_COMPILING_IN_CPYTHON if (PyType_IS_GC(Py_TYPE(o)->tp_base)) #endif PyObject_GC_Track(o); __pyx_tp_dealloc_6pandas_7_sparse_SparseIndex(o); } static int __pyx_tp_traverse_6pandas_7_sparse_IntIndex(PyObject *o, visitproc v, void *a) { int e; struct __pyx_obj_6pandas_7_sparse_IntIndex *p = (struct __pyx_obj_6pandas_7_sparse_IntIndex *)o; e = ((likely(__pyx_ptype_6pandas_7_sparse_SparseIndex)) ? ((__pyx_ptype_6pandas_7_sparse_SparseIndex->tp_traverse) ? __pyx_ptype_6pandas_7_sparse_SparseIndex->tp_traverse(o, v, a) : 0) : __Pyx_call_next_tp_traverse(o, v, a, __pyx_tp_traverse_6pandas_7_sparse_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_7_sparse_IntIndex(PyObject *o) { PyObject* tmp; struct __pyx_obj_6pandas_7_sparse_IntIndex *p = (struct __pyx_obj_6pandas_7_sparse_IntIndex *)o; if (likely(__pyx_ptype_6pandas_7_sparse_SparseIndex)) { if (__pyx_ptype_6pandas_7_sparse_SparseIndex->tp_clear) __pyx_ptype_6pandas_7_sparse_SparseIndex->tp_clear(o); } else __Pyx_call_next_tp_clear(o, __pyx_tp_clear_6pandas_7_sparse_IntIndex); tmp = ((PyObject*)p->indices); p->indices = ((PyArrayObject *)Py_None); Py_INCREF(Py_None); Py_XDECREF(tmp); return 0; } static PyObject *__pyx_getprop_6pandas_7_sparse_8IntIndex_length(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6pandas_7_sparse_8IntIndex_6length_1__get__(o); } static PyObject *__pyx_getprop_6pandas_7_sparse_8IntIndex_npoints(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6pandas_7_sparse_8IntIndex_7npoints_1__get__(o); } static PyObject *__pyx_getprop_6pandas_7_sparse_8IntIndex_indices(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6pandas_7_sparse_8IntIndex_7indices_1__get__(o); } static PyMethodDef __pyx_methods_6pandas_7_sparse_IntIndex[] = { {__Pyx_NAMESTR("__reduce__"), (PyCFunction)__pyx_pw_6pandas_7_sparse_8IntIndex_3__reduce__, METH_NOARGS, __Pyx_DOCSTR(0)}, {__Pyx_NAMESTR("check_integrity"), (PyCFunction)__pyx_pw_6pandas_7_sparse_8IntIndex_7check_integrity, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_6pandas_7_sparse_8IntIndex_6check_integrity)}, {__Pyx_NAMESTR("equals"), (PyCFunction)__pyx_pw_6pandas_7_sparse_8IntIndex_9equals, METH_O, __Pyx_DOCSTR(0)}, {__Pyx_NAMESTR("ngaps"), (PyCFunction)__pyx_pw_6pandas_7_sparse_8IntIndex_11ngaps, METH_NOARGS, __Pyx_DOCSTR(0)}, {__Pyx_NAMESTR("to_int_index"), (PyCFunction)__pyx_pw_6pandas_7_sparse_8IntIndex_13to_int_index, METH_NOARGS, __Pyx_DOCSTR(0)}, {__Pyx_NAMESTR("to_block_index"), (PyCFunction)__pyx_pw_6pandas_7_sparse_8IntIndex_15to_block_index, METH_NOARGS, __Pyx_DOCSTR(0)}, {__Pyx_NAMESTR("intersect"), (PyCFunction)__pyx_pw_6pandas_7_sparse_8IntIndex_17intersect, METH_O, __Pyx_DOCSTR(0)}, {__Pyx_NAMESTR("make_union"), (PyCFunction)__pyx_pw_6pandas_7_sparse_8IntIndex_19make_union, METH_O, __Pyx_DOCSTR(0)}, {__Pyx_NAMESTR("lookup"), (PyCFunction)__pyx_pw_6pandas_7_sparse_8IntIndex_21lookup, METH_O, __Pyx_DOCSTR(0)}, {__Pyx_NAMESTR("reindex"), (PyCFunction)__pyx_pw_6pandas_7_sparse_8IntIndex_23reindex, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}, {__Pyx_NAMESTR("put"), (PyCFunction)__pyx_pw_6pandas_7_sparse_8IntIndex_25put, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}, {__Pyx_NAMESTR("take"), (PyCFunction)__pyx_pw_6pandas_7_sparse_8IntIndex_27take, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}, {0, 0, 0, 0} }; static struct PyGetSetDef __pyx_getsets_6pandas_7_sparse_IntIndex[] = { {(char *)"length", __pyx_getprop_6pandas_7_sparse_8IntIndex_length, 0, 0, 0}, {(char *)"npoints", __pyx_getprop_6pandas_7_sparse_8IntIndex_npoints, 0, 0, 0}, {(char *)"indices", __pyx_getprop_6pandas_7_sparse_8IntIndex_indices, 0, 0, 0}, {0, 0, 0, 0, 0} }; static PyTypeObject __pyx_type_6pandas_7_sparse_IntIndex = { PyVarObject_HEAD_INIT(0, 0) __Pyx_NAMESTR("pandas._sparse.IntIndex"), /*tp_name*/ sizeof(struct __pyx_obj_6pandas_7_sparse_IntIndex), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_6pandas_7_sparse_IntIndex, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #else 0, /*reserved*/ #endif __pyx_pw_6pandas_7_sparse_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*/ __Pyx_DOCSTR("\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\n "), /*tp_doc*/ __pyx_tp_traverse_6pandas_7_sparse_IntIndex, /*tp_traverse*/ __pyx_tp_clear_6pandas_7_sparse_IntIndex, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_6pandas_7_sparse_IntIndex, /*tp_methods*/ 0, /*tp_members*/ __pyx_getsets_6pandas_7_sparse_IntIndex, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ __pyx_pw_6pandas_7_sparse_8IntIndex_1__init__, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_6pandas_7_sparse_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*/ #if PY_VERSION_HEX >= 0x02060000 0, /*tp_version_tag*/ #endif #if PY_VERSION_HEX >= 0x030400a1 0, /*tp_finalize*/ #endif }; static struct __pyx_vtabstruct_6pandas_7_sparse_BlockIntersection __pyx_vtable_6pandas_7_sparse_BlockIntersection; static PyObject *__pyx_tp_new_6pandas_7_sparse_BlockIntersection(PyTypeObject *t, PyObject *a, PyObject *k) { struct __pyx_obj_6pandas_7_sparse_BlockIntersection *p; PyObject *o = __pyx_tp_new_6pandas_7_sparse_BlockMerge(t, a, k); if (unlikely(!o)) return 0; p = ((struct __pyx_obj_6pandas_7_sparse_BlockIntersection *)o); p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_6pandas_7_sparse_BlockMerge*)__pyx_vtabptr_6pandas_7_sparse_BlockIntersection; return o; } static PyTypeObject __pyx_type_6pandas_7_sparse_BlockIntersection = { PyVarObject_HEAD_INIT(0, 0) __Pyx_NAMESTR("pandas._sparse.BlockIntersection"), /*tp_name*/ sizeof(struct __pyx_obj_6pandas_7_sparse_BlockIntersection), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_6pandas_7_sparse_BlockMerge, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #else 0, /*reserved*/ #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*/ __Pyx_DOCSTR("\n not done yet\n "), /*tp_doc*/ __pyx_tp_traverse_6pandas_7_sparse_BlockMerge, /*tp_traverse*/ __pyx_tp_clear_6pandas_7_sparse_BlockMerge, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ 0, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ #if CYTHON_COMPILING_IN_PYPY __pyx_pw_6pandas_7_sparse_10BlockMerge_1__init__, /*tp_init*/ #else 0, /*tp_init*/ #endif 0, /*tp_alloc*/ __pyx_tp_new_6pandas_7_sparse_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*/ #if PY_VERSION_HEX >= 0x02060000 0, /*tp_version_tag*/ #endif #if PY_VERSION_HEX >= 0x030400a1 0, /*tp_finalize*/ #endif }; static struct __pyx_vtabstruct_6pandas_7_sparse_BlockUnion __pyx_vtable_6pandas_7_sparse_BlockUnion; static PyObject *__pyx_tp_new_6pandas_7_sparse_BlockUnion(PyTypeObject *t, PyObject *a, PyObject *k) { struct __pyx_obj_6pandas_7_sparse_BlockUnion *p; PyObject *o = __pyx_tp_new_6pandas_7_sparse_BlockMerge(t, a, k); if (unlikely(!o)) return 0; p = ((struct __pyx_obj_6pandas_7_sparse_BlockUnion *)o); p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_6pandas_7_sparse_BlockMerge*)__pyx_vtabptr_6pandas_7_sparse_BlockUnion; return o; } static PyTypeObject __pyx_type_6pandas_7_sparse_BlockUnion = { PyVarObject_HEAD_INIT(0, 0) __Pyx_NAMESTR("pandas._sparse.BlockUnion"), /*tp_name*/ sizeof(struct __pyx_obj_6pandas_7_sparse_BlockUnion), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_6pandas_7_sparse_BlockMerge, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #else 0, /*reserved*/ #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*/ __Pyx_DOCSTR("\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_7_sparse_BlockMerge, /*tp_traverse*/ __pyx_tp_clear_6pandas_7_sparse_BlockMerge, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ 0, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ #if CYTHON_COMPILING_IN_PYPY __pyx_pw_6pandas_7_sparse_10BlockMerge_1__init__, /*tp_init*/ #else 0, /*tp_init*/ #endif 0, /*tp_alloc*/ __pyx_tp_new_6pandas_7_sparse_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*/ #if PY_VERSION_HEX >= 0x02060000 0, /*tp_version_tag*/ #endif #if PY_VERSION_HEX >= 0x030400a1 0, /*tp_finalize*/ #endif }; static PyMethodDef __pyx_methods[] = { {__Pyx_NAMESTR("get_blocks"), (PyCFunction)__pyx_pw_6pandas_7_sparse_1get_blocks, METH_O, __Pyx_DOCSTR(0)}, {__Pyx_NAMESTR("sparse_nanadd"), (PyCFunction)__pyx_pw_6pandas_7_sparse_3sparse_nanadd, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}, {__Pyx_NAMESTR("sparse_nansub"), (PyCFunction)__pyx_pw_6pandas_7_sparse_5sparse_nansub, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}, {__Pyx_NAMESTR("sparse_nanrsub"), (PyCFunction)__pyx_pw_6pandas_7_sparse_7sparse_nanrsub, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}, {__Pyx_NAMESTR("sparse_nanmul"), (PyCFunction)__pyx_pw_6pandas_7_sparse_9sparse_nanmul, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}, {__Pyx_NAMESTR("sparse_nandiv"), (PyCFunction)__pyx_pw_6pandas_7_sparse_11sparse_nandiv, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}, {__Pyx_NAMESTR("sparse_nanrdiv"), (PyCFunction)__pyx_pw_6pandas_7_sparse_13sparse_nanrdiv, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}, {__Pyx_NAMESTR("sparse_nanfloordiv"), (PyCFunction)__pyx_pw_6pandas_7_sparse_15sparse_nanfloordiv, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}, {__Pyx_NAMESTR("sparse_nanrfloordiv"), (PyCFunction)__pyx_pw_6pandas_7_sparse_17sparse_nanrfloordiv, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}, {__Pyx_NAMESTR("sparse_nanpow"), (PyCFunction)__pyx_pw_6pandas_7_sparse_19sparse_nanpow, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}, {__Pyx_NAMESTR("sparse_nanrpow"), (PyCFunction)__pyx_pw_6pandas_7_sparse_21sparse_nanrpow, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}, {__Pyx_NAMESTR("sparse_add"), (PyCFunction)__pyx_pw_6pandas_7_sparse_23sparse_add, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}, {__Pyx_NAMESTR("sparse_sub"), (PyCFunction)__pyx_pw_6pandas_7_sparse_25sparse_sub, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}, {__Pyx_NAMESTR("sparse_rsub"), (PyCFunction)__pyx_pw_6pandas_7_sparse_27sparse_rsub, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}, {__Pyx_NAMESTR("sparse_mul"), (PyCFunction)__pyx_pw_6pandas_7_sparse_29sparse_mul, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}, {__Pyx_NAMESTR("sparse_div"), (PyCFunction)__pyx_pw_6pandas_7_sparse_31sparse_div, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}, {__Pyx_NAMESTR("sparse_rdiv"), (PyCFunction)__pyx_pw_6pandas_7_sparse_33sparse_rdiv, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}, {__Pyx_NAMESTR("sparse_floordiv"), (PyCFunction)__pyx_pw_6pandas_7_sparse_35sparse_floordiv, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}, {__Pyx_NAMESTR("sparse_rfloordiv"), (PyCFunction)__pyx_pw_6pandas_7_sparse_37sparse_rfloordiv, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}, {__Pyx_NAMESTR("sparse_pow"), (PyCFunction)__pyx_pw_6pandas_7_sparse_39sparse_pow, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}, {__Pyx_NAMESTR("sparse_rpow"), (PyCFunction)__pyx_pw_6pandas_7_sparse_41sparse_rpow, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}, {0, 0, 0, 0} }; #if PY_MAJOR_VERSION >= 3 static struct PyModuleDef __pyx_moduledef = { #if PY_VERSION_HEX < 0x03020000 { PyObject_HEAD_INIT(NULL) NULL, 0, NULL }, #else PyModuleDef_HEAD_INIT, #endif __Pyx_NAMESTR("_sparse"), 0, /* m_doc */ -1, /* m_size */ __pyx_methods /* m_methods */, NULL, /* m_reload */ NULL, /* m_traverse */ NULL, /* m_clear */ NULL /* m_free */ }; #endif static __Pyx_StringTabEntry __pyx_string_tab[] = { {&__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_n_s_Exception, __pyx_k_Exception, sizeof(__pyx_k_Exception), 0, 0, 1, 1}, {&__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_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_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_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_RuntimeError, __pyx_k_RuntimeError, sizeof(__pyx_k_RuntimeError), 0, 0, 1, 1}, {&__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_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_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_check_integrity, __pyx_k_check_integrity, sizeof(__pyx_k_check_integrity), 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_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_get_reindexer, __pyx_k_get_reindexer, sizeof(__pyx_k_get_reindexer), 0, 0, 1, 1}, {&__pyx_kp_s_home_yoh_deb_gits_pkg_exppsy_pa, __pyx_k_home_yoh_deb_gits_pkg_exppsy_pa, sizeof(__pyx_k_home_yoh_deb_gits_pkg_exppsy_pa), 0, 0, 1, 0}, {&__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_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_main, __pyx_k_main, sizeof(__pyx_k_main), 0, 0, 1, 1}, {&__pyx_n_s_make_union, __pyx_k_make_union, sizeof(__pyx_k_make_union), 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_length, __pyx_k_new_length, sizeof(__pyx_k_new_length), 0, 0, 1, 1}, {&__pyx_n_s_ngaps, __pyx_k_ngaps, sizeof(__pyx_k_ngaps), 0, 0, 1, 1}, {&__pyx_n_s_np, __pyx_k_np, sizeof(__pyx_k_np), 0, 0, 1, 1}, {&__pyx_n_s_numpy, __pyx_k_numpy, sizeof(__pyx_k_numpy), 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__sparse, __pyx_k_pandas__sparse, sizeof(__pyx_k_pandas__sparse), 0, 0, 1, 1}, {&__pyx_n_s_property, __pyx_k_property, sizeof(__pyx_k_property), 0, 0, 1, 1}, {&__pyx_n_s_put, __pyx_k_put, sizeof(__pyx_k_put), 0, 0, 1, 1}, {&__pyx_n_s_pyx_getbuffer, __pyx_k_pyx_getbuffer, sizeof(__pyx_k_pyx_getbuffer), 0, 0, 1, 1}, {&__pyx_n_s_pyx_releasebuffer, __pyx_k_pyx_releasebuffer, sizeof(__pyx_k_pyx_releasebuffer), 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_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_sparse_div, __pyx_k_sparse_div, sizeof(__pyx_k_sparse_div), 0, 0, 1, 1}, {&__pyx_n_s_sparse_index, __pyx_k_sparse_index, sizeof(__pyx_k_sparse_index), 0, 0, 1, 1}, {&__pyx_n_s_sparse_nandiv, __pyx_k_sparse_nandiv, sizeof(__pyx_k_sparse_nandiv), 0, 0, 1, 1}, {&__pyx_n_s_sparse_nanrdiv, __pyx_k_sparse_nanrdiv, sizeof(__pyx_k_sparse_nanrdiv), 0, 0, 1, 1}, {&__pyx_n_s_sparse_nanrtruediv, __pyx_k_sparse_nanrtruediv, sizeof(__pyx_k_sparse_nanrtruediv), 0, 0, 1, 1}, {&__pyx_n_s_sparse_nantruediv, __pyx_k_sparse_nantruediv, sizeof(__pyx_k_sparse_nantruediv), 0, 0, 1, 1}, {&__pyx_n_s_sparse_rdiv, __pyx_k_sparse_rdiv, sizeof(__pyx_k_sparse_rdiv), 0, 0, 1, 1}, {&__pyx_n_s_sparse_rtruediv, __pyx_k_sparse_rtruediv, sizeof(__pyx_k_sparse_rtruediv), 0, 0, 1, 1}, {&__pyx_n_s_sparse_truediv, __pyx_k_sparse_truediv, sizeof(__pyx_k_sparse_truediv), 0, 0, 1, 1}, {&__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_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_values, __pyx_k_values, sizeof(__pyx_k_values), 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_property = __Pyx_GetBuiltinName(__pyx_n_s_property); if (!__pyx_builtin_property) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_builtin_NotImplementedError = __Pyx_GetBuiltinName(__pyx_n_s_NotImplementedError); if (!__pyx_builtin_NotImplementedError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 30; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_builtin_Exception = __Pyx_GetBuiltinName(__pyx_n_s_Exception); if (!__pyx_builtin_Exception) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_builtin_ValueError = __Pyx_GetBuiltinName(__pyx_n_s_ValueError); if (!__pyx_builtin_ValueError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 322; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_range) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1148; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_builtin_RuntimeError = __Pyx_GetBuiltinName(__pyx_n_s_RuntimeError); if (!__pyx_builtin_RuntimeError) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 803; __pyx_clineno = __LINE__; goto __pyx_L1_error;} return 0; __pyx_L1_error:; return -1; } static int __Pyx_InitCachedConstants(void) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0); /* "pandas/src/sparse.pyx":102 * * if self.length != y.length: * raise Exception('Indices must reference same underlying length') # <<<<<<<<<<<<<< * * xindices = self.indices */ __pyx_tuple_ = PyTuple_Pack(1, __pyx_kp_s_Indices_must_reference_same_unde); if (unlikely(!__pyx_tuple_)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple_); __Pyx_GIVEREF(__pyx_tuple_); /* "pandas/src/sparse.pyx":136 * * if self.length != y.length: * raise Exception('Indices must reference same underlying length') # <<<<<<<<<<<<<< * * xindices = self.indices */ __pyx_tuple__2 = PyTuple_Pack(1, __pyx_kp_s_Indices_must_reference_same_unde); if (unlikely(!__pyx_tuple__2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 136; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__2); __Pyx_GIVEREF(__pyx_tuple__2); /* "pandas/src/sparse.pyx":322 * * if len(blocs) != len(blengths): * raise ValueError('block bound arrays must be same length') # <<<<<<<<<<<<<< * * for i from 0 <= i < self.nblocks: */ __pyx_tuple__3 = PyTuple_Pack(1, __pyx_kp_s_block_bound_arrays_must_be_same); if (unlikely(!__pyx_tuple__3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 322; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__3); __Pyx_GIVEREF(__pyx_tuple__3); /* "pandas/src/sparse.pyx":327 * if i > 0: * if blocs[i] <= blocs[i-1]: * raise ValueError('Locations not in ascending order') # <<<<<<<<<<<<<< * * if i < self.nblocks - 1: */ __pyx_tuple__4 = PyTuple_Pack(1, __pyx_kp_s_Locations_not_in_ascending_order); if (unlikely(!__pyx_tuple__4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 327; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__4); __Pyx_GIVEREF(__pyx_tuple__4); /* "pandas/src/sparse.pyx":396 * * if self.length != y.length: * raise Exception('Indices must reference same underlying length') # <<<<<<<<<<<<<< * * xloc = self.blocs */ __pyx_tuple__5 = PyTuple_Pack(1, __pyx_kp_s_Indices_must_reference_same_unde); if (unlikely(!__pyx_tuple__5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 396; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__5); __Pyx_GIVEREF(__pyx_tuple__5); /* "pandas/src/sparse.pyx":542 * * if x.length != y.length: * raise Exception('Indices must reference same underlying length') # <<<<<<<<<<<<<< * * self.xstart = self.x.blocs */ __pyx_tuple__6 = PyTuple_Pack(1, __pyx_kp_s_Indices_must_reference_same_unde); if (unlikely(!__pyx_tuple__6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 542; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__6); __Pyx_GIVEREF(__pyx_tuple__6); /* "pandas/src/sparse.pyx":632 * * if mode != 0 and mode != 1: * raise Exception('Mode must be 0 or 1') # <<<<<<<<<<<<<< * * # so symmetric code will work */ __pyx_tuple__7 = PyTuple_Pack(1, __pyx_kp_s_Mode_must_be_0_or_1); if (unlikely(!__pyx_tuple__7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 632; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__7); __Pyx_GIVEREF(__pyx_tuple__7); /* "numpy.pxd":217 * 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__8 = PyTuple_Pack(1, __pyx_kp_u_ndarray_is_not_C_contiguous); if (unlikely(!__pyx_tuple__8)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 217; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__8); __Pyx_GIVEREF(__pyx_tuple__8); /* "numpy.pxd":221 * 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__9 = PyTuple_Pack(1, __pyx_kp_u_ndarray_is_not_Fortran_contiguou); if (unlikely(!__pyx_tuple__9)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 221; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__9); __Pyx_GIVEREF(__pyx_tuple__9); /* "numpy.pxd":259 * if ((descr.byteorder == '>' and little_endian) or * (descr.byteorder == '<' 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__10 = PyTuple_Pack(1, __pyx_kp_u_Non_native_byte_order_not_suppor); if (unlikely(!__pyx_tuple__10)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 259; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__10); __Pyx_GIVEREF(__pyx_tuple__10); /* "numpy.pxd":803 * * if (end - f) - (new_offset - offset[0]) < 15: * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") # <<<<<<<<<<<<<< * * if ((child.byteorder == '>' and little_endian) or */ __pyx_tuple__11 = PyTuple_Pack(1, __pyx_kp_u_Format_string_allocated_too_shor); if (unlikely(!__pyx_tuple__11)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 803; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__11); __Pyx_GIVEREF(__pyx_tuple__11); /* "numpy.pxd":807 * if ((child.byteorder == '>' and little_endian) or * (child.byteorder == '<' 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__12 = PyTuple_Pack(1, __pyx_kp_u_Non_native_byte_order_not_suppor); if (unlikely(!__pyx_tuple__12)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 807; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__12); __Pyx_GIVEREF(__pyx_tuple__12); /* "numpy.pxd":827 * 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__13 = PyTuple_Pack(1, __pyx_kp_u_Format_string_allocated_too_shor_2); if (unlikely(!__pyx_tuple__13)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 827; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__13); __Pyx_GIVEREF(__pyx_tuple__13); /* "pandas/src/sparse.pyx":1140 * # Indexing operations * * def get_reindexer(ndarray[object, ndim=1] values, dict index_map): # <<<<<<<<<<<<<< * cdef object idx * cdef Py_ssize_t i */ __pyx_tuple__14 = 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__14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1140; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__14); __Pyx_GIVEREF(__pyx_tuple__14); __pyx_codeobj__15 = (PyObject*)__Pyx_PyCode_New(2, 0, 6, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__14, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_yoh_deb_gits_pkg_exppsy_pa, __pyx_n_s_get_reindexer, 1140, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1140; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/sparse.pyx":1187 * * * def reindex_integer(ndarray[float64_t, ndim=1] values, # <<<<<<<<<<<<<< * IntIndex sparse_index, * ndarray[int32_t, ndim=1] indexer): */ __pyx_tuple__16 = PyTuple_Pack(3, __pyx_n_s_values, __pyx_n_s_sparse_index, __pyx_n_s_indexer); if (unlikely(!__pyx_tuple__16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1187; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__16); __Pyx_GIVEREF(__pyx_tuple__16); __pyx_codeobj__17 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__16, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_yoh_deb_gits_pkg_exppsy_pa, __pyx_n_s_reindex_integer, 1187, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1187; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __pyx_int_15 = PyInt_FromLong(15); if (unlikely(!__pyx_int_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_int_neg_1 = PyInt_FromLong(-1); if (unlikely(!__pyx_int_neg_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} return 0; __pyx_L1_error:; return -1; } #if PY_MAJOR_VERSION < 3 PyMODINIT_FUNC init_sparse(void); /*proto*/ PyMODINIT_FUNC init_sparse(void) #else PyMODINIT_FUNC PyInit__sparse(void); /*proto*/ PyMODINIT_FUNC PyInit__sparse(void) #endif { PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; __pyx_t_5numpy_float64_t __pyx_t_3; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannyDeclarations #if CYTHON_REFNANNY __Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny"); if (!__Pyx_RefNanny) { PyErr_Clear(); __Pyx_RefNanny = __Pyx_RefNannyImportAPI("Cython.Runtime.refnanny"); if (!__Pyx_RefNanny) Py_FatalError("failed to import 'refnanny' module"); } #endif __Pyx_RefNannySetupContext("PyMODINIT_FUNC PyInit__sparse(void)", 0); if ( __Pyx_check_binary_version() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_empty_tuple)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_bytes)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #ifdef __Pyx_CyFunction_USED if (__Pyx_CyFunction_init() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif #ifdef __Pyx_FusedFunction_USED if (__pyx_FusedFunction_init() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif #ifdef __Pyx_Generator_USED if (__pyx_Generator_init() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif /*--- Library function declarations ---*/ /*--- Threads initialization code ---*/ #if defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS #ifdef WITH_THREAD /* Python build with threading support? */ PyEval_InitThreads(); #endif #endif /*--- Module creation code ---*/ #if PY_MAJOR_VERSION < 3 __pyx_m = Py_InitModule4(__Pyx_NAMESTR("_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_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_d)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} Py_INCREF(__pyx_d); __pyx_b = PyImport_AddModule(__Pyx_NAMESTR(__Pyx_BUILTIN_MODULE_NAME)); if (unlikely(!__pyx_b)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #if CYTHON_COMPILING_IN_PYPY Py_INCREF(__pyx_b); #endif if (__Pyx_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; /*--- Initialize various global constants etc. ---*/ if (unlikely(__Pyx_InitGlobals() < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif if (__pyx_module_is_main_pandas___sparse) { if (__Pyx_SetAttrString(__pyx_m, "__name__", __pyx_n_s_main) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; } #if PY_MAJOR_VERSION >= 3 { PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (!PyDict_GetItemString(modules, "pandas._sparse")) { if (unlikely(PyDict_SetItemString(modules, "pandas._sparse", __pyx_m) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } } #endif /*--- Builtin init code ---*/ if (unlikely(__Pyx_InitCachedBuiltins() < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /*--- Constants init code ---*/ if (unlikely(__Pyx_InitCachedConstants() < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /*--- Global init code ---*/ /*--- Variable export code ---*/ /*--- Function export code ---*/ /*--- Type init code ---*/ __pyx_vtabptr_6pandas_7_sparse_BlockMerge = &__pyx_vtable_6pandas_7_sparse_BlockMerge; __pyx_vtable_6pandas_7_sparse_BlockMerge._make_merged_blocks = (PyObject *(*)(struct __pyx_obj_6pandas_7_sparse_BlockMerge *))__pyx_f_6pandas_7_sparse_10BlockMerge__make_merged_blocks; __pyx_vtable_6pandas_7_sparse_BlockMerge._set_current_indices = (PyObject *(*)(struct __pyx_obj_6pandas_7_sparse_BlockMerge *, __pyx_t_5numpy_int32_t, __pyx_t_5numpy_int32_t, int))__pyx_f_6pandas_7_sparse_10BlockMerge__set_current_indices; if (PyType_Ready(&__pyx_type_6pandas_7_sparse_BlockMerge) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 527; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_type_6pandas_7_sparse_BlockMerge.tp_print = 0; if (__Pyx_SetVtable(__pyx_type_6pandas_7_sparse_BlockMerge.tp_dict, __pyx_vtabptr_6pandas_7_sparse_BlockMerge) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 527; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__Pyx_SetAttrString(__pyx_m, "BlockMerge", (PyObject *)&__pyx_type_6pandas_7_sparse_BlockMerge) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 527; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_6pandas_7_sparse_BlockMerge = &__pyx_type_6pandas_7_sparse_BlockMerge; if (PyType_Ready(&__pyx_type_6pandas_7_sparse_SparseIndex) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 25; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_type_6pandas_7_sparse_SparseIndex.tp_print = 0; if (__Pyx_SetAttrString(__pyx_m, "SparseIndex", (PyObject *)&__pyx_type_6pandas_7_sparse_SparseIndex) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 25; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_6pandas_7_sparse_SparseIndex = &__pyx_type_6pandas_7_sparse_SparseIndex; __pyx_vtabptr_6pandas_7_sparse_BlockIndex = &__pyx_vtable_6pandas_7_sparse_BlockIndex; __pyx_vtable_6pandas_7_sparse_BlockIndex.check_integrity = (PyObject *(*)(struct __pyx_obj_6pandas_7_sparse_BlockIndex *, int __pyx_skip_dispatch))__pyx_f_6pandas_7_sparse_10BlockIndex_check_integrity; __pyx_vtable_6pandas_7_sparse_BlockIndex.intersect = (struct __pyx_obj_6pandas_7_sparse_BlockIndex *(*)(struct __pyx_obj_6pandas_7_sparse_BlockIndex *, struct __pyx_obj_6pandas_7_sparse_SparseIndex *, int __pyx_skip_dispatch))__pyx_f_6pandas_7_sparse_10BlockIndex_intersect; __pyx_vtable_6pandas_7_sparse_BlockIndex.make_union = (struct __pyx_obj_6pandas_7_sparse_BlockIndex *(*)(struct __pyx_obj_6pandas_7_sparse_BlockIndex *, struct __pyx_obj_6pandas_7_sparse_SparseIndex *, int __pyx_skip_dispatch))__pyx_f_6pandas_7_sparse_10BlockIndex_make_union; __pyx_vtable_6pandas_7_sparse_BlockIndex.lookup = (PyObject *(*)(struct __pyx_obj_6pandas_7_sparse_BlockIndex *, Py_ssize_t, int __pyx_skip_dispatch))__pyx_f_6pandas_7_sparse_10BlockIndex_lookup; __pyx_vtable_6pandas_7_sparse_BlockIndex.reindex = (PyArrayObject *(*)(struct __pyx_obj_6pandas_7_sparse_BlockIndex *, PyArrayObject *, __pyx_t_5numpy_float64_t, struct __pyx_obj_6pandas_7_sparse_SparseIndex *, int __pyx_skip_dispatch))__pyx_f_6pandas_7_sparse_10BlockIndex_reindex; __pyx_vtable_6pandas_7_sparse_BlockIndex.put = (PyObject *(*)(struct __pyx_obj_6pandas_7_sparse_BlockIndex *, PyArrayObject *, PyArrayObject *, PyObject *, int __pyx_skip_dispatch))__pyx_f_6pandas_7_sparse_10BlockIndex_put; __pyx_vtable_6pandas_7_sparse_BlockIndex.take = (PyObject *(*)(struct __pyx_obj_6pandas_7_sparse_BlockIndex *, PyArrayObject *, PyArrayObject *, int __pyx_skip_dispatch))__pyx_f_6pandas_7_sparse_10BlockIndex_take; __pyx_type_6pandas_7_sparse_BlockIndex.tp_base = __pyx_ptype_6pandas_7_sparse_SparseIndex; if (PyType_Ready(&__pyx_type_6pandas_7_sparse_BlockIndex) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 259; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_type_6pandas_7_sparse_BlockIndex.tp_print = 0; if (__Pyx_SetVtable(__pyx_type_6pandas_7_sparse_BlockIndex.tp_dict, __pyx_vtabptr_6pandas_7_sparse_BlockIndex) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 259; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__Pyx_SetAttrString(__pyx_m, "BlockIndex", (PyObject *)&__pyx_type_6pandas_7_sparse_BlockIndex) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 259; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__pyx_type_6pandas_7_sparse_BlockIndex.tp_weaklistoffset == 0) __pyx_type_6pandas_7_sparse_BlockIndex.tp_weaklistoffset = offsetof(struct __pyx_obj_6pandas_7_sparse_BlockIndex, __weakref__); __pyx_ptype_6pandas_7_sparse_BlockIndex = &__pyx_type_6pandas_7_sparse_BlockIndex; __pyx_vtabptr_6pandas_7_sparse_IntIndex = &__pyx_vtable_6pandas_7_sparse_IntIndex; __pyx_vtable_6pandas_7_sparse_IntIndex.intersect = (struct __pyx_obj_6pandas_7_sparse_IntIndex *(*)(struct __pyx_obj_6pandas_7_sparse_IntIndex *, struct __pyx_obj_6pandas_7_sparse_SparseIndex *, int __pyx_skip_dispatch))__pyx_f_6pandas_7_sparse_8IntIndex_intersect; __pyx_vtable_6pandas_7_sparse_IntIndex.make_union = (struct __pyx_obj_6pandas_7_sparse_IntIndex *(*)(struct __pyx_obj_6pandas_7_sparse_IntIndex *, struct __pyx_obj_6pandas_7_sparse_SparseIndex *, int __pyx_skip_dispatch))__pyx_f_6pandas_7_sparse_8IntIndex_make_union; __pyx_vtable_6pandas_7_sparse_IntIndex.lookup = (PyObject *(*)(struct __pyx_obj_6pandas_7_sparse_IntIndex *, Py_ssize_t, int __pyx_skip_dispatch))__pyx_f_6pandas_7_sparse_8IntIndex_lookup; __pyx_vtable_6pandas_7_sparse_IntIndex.reindex = (PyArrayObject *(*)(struct __pyx_obj_6pandas_7_sparse_IntIndex *, PyArrayObject *, __pyx_t_5numpy_float64_t, struct __pyx_obj_6pandas_7_sparse_SparseIndex *, int __pyx_skip_dispatch))__pyx_f_6pandas_7_sparse_8IntIndex_reindex; __pyx_vtable_6pandas_7_sparse_IntIndex.put = (PyObject *(*)(struct __pyx_obj_6pandas_7_sparse_IntIndex *, PyArrayObject *, PyArrayObject *, PyObject *, int __pyx_skip_dispatch))__pyx_f_6pandas_7_sparse_8IntIndex_put; __pyx_vtable_6pandas_7_sparse_IntIndex.take = (PyObject *(*)(struct __pyx_obj_6pandas_7_sparse_IntIndex *, PyArrayObject *, PyArrayObject *, int __pyx_skip_dispatch))__pyx_f_6pandas_7_sparse_8IntIndex_take; __pyx_type_6pandas_7_sparse_IntIndex.tp_base = __pyx_ptype_6pandas_7_sparse_SparseIndex; if (PyType_Ready(&__pyx_type_6pandas_7_sparse_IntIndex) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 33; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_type_6pandas_7_sparse_IntIndex.tp_print = 0; if (__Pyx_SetVtable(__pyx_type_6pandas_7_sparse_IntIndex.tp_dict, __pyx_vtabptr_6pandas_7_sparse_IntIndex) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 33; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__Pyx_SetAttrString(__pyx_m, "IntIndex", (PyObject *)&__pyx_type_6pandas_7_sparse_IntIndex) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 33; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_6pandas_7_sparse_IntIndex = &__pyx_type_6pandas_7_sparse_IntIndex; __pyx_vtabptr_6pandas_7_sparse_BlockIntersection = &__pyx_vtable_6pandas_7_sparse_BlockIntersection; __pyx_vtable_6pandas_7_sparse_BlockIntersection.__pyx_base = *__pyx_vtabptr_6pandas_7_sparse_BlockMerge; __pyx_type_6pandas_7_sparse_BlockIntersection.tp_base = __pyx_ptype_6pandas_7_sparse_BlockMerge; if (PyType_Ready(&__pyx_type_6pandas_7_sparse_BlockIntersection) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 569; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_type_6pandas_7_sparse_BlockIntersection.tp_print = 0; if (__Pyx_SetVtable(__pyx_type_6pandas_7_sparse_BlockIntersection.tp_dict, __pyx_vtabptr_6pandas_7_sparse_BlockIntersection) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 569; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__Pyx_SetAttrString(__pyx_m, "BlockIntersection", (PyObject *)&__pyx_type_6pandas_7_sparse_BlockIntersection) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 569; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_6pandas_7_sparse_BlockIntersection = &__pyx_type_6pandas_7_sparse_BlockIntersection; __pyx_vtabptr_6pandas_7_sparse_BlockUnion = &__pyx_vtable_6pandas_7_sparse_BlockUnion; __pyx_vtable_6pandas_7_sparse_BlockUnion.__pyx_base = *__pyx_vtabptr_6pandas_7_sparse_BlockMerge; __pyx_vtable_6pandas_7_sparse_BlockUnion.__pyx_base._make_merged_blocks = (PyObject *(*)(struct __pyx_obj_6pandas_7_sparse_BlockMerge *))__pyx_f_6pandas_7_sparse_10BlockUnion__make_merged_blocks; __pyx_vtable_6pandas_7_sparse_BlockUnion._find_next_block_end = (__pyx_t_5numpy_int32_t (*)(struct __pyx_obj_6pandas_7_sparse_BlockUnion *, int))__pyx_f_6pandas_7_sparse_10BlockUnion__find_next_block_end; __pyx_type_6pandas_7_sparse_BlockUnion.tp_base = __pyx_ptype_6pandas_7_sparse_BlockMerge; if (PyType_Ready(&__pyx_type_6pandas_7_sparse_BlockUnion) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 575; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_type_6pandas_7_sparse_BlockUnion.tp_print = 0; if (__Pyx_SetVtable(__pyx_type_6pandas_7_sparse_BlockUnion.tp_dict, __pyx_vtabptr_6pandas_7_sparse_BlockUnion) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 575; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__Pyx_SetAttrString(__pyx_m, "BlockUnion", (PyObject *)&__pyx_type_6pandas_7_sparse_BlockUnion) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 575; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_6pandas_7_sparse_BlockUnion = &__pyx_type_6pandas_7_sparse_BlockUnion; /*--- Type import code ---*/ __pyx_ptype_5numpy_dtype = __Pyx_ImportType("numpy", "dtype", sizeof(PyArray_Descr), 0); if (unlikely(!__pyx_ptype_5numpy_dtype)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_5numpy_flatiter = __Pyx_ImportType("numpy", "flatiter", sizeof(PyArrayIterObject), 0); if (unlikely(!__pyx_ptype_5numpy_flatiter)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 167; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_5numpy_broadcast = __Pyx_ImportType("numpy", "broadcast", sizeof(PyArrayMultiIterObject), 0); if (unlikely(!__pyx_ptype_5numpy_broadcast)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 171; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_5numpy_ndarray = __Pyx_ImportType("numpy", "ndarray", sizeof(PyArrayObject), 0); if (unlikely(!__pyx_ptype_5numpy_ndarray)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_5numpy_ufunc = __Pyx_ImportType("numpy", "ufunc", sizeof(PyUFuncObject), 0); if (unlikely(!__pyx_ptype_5numpy_ufunc)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 865; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /*--- Variable import code ---*/ /*--- Function import code ---*/ /*--- Execution code ---*/ /* "pandas/src/sparse.pyx":6 * cimport cython * * import numpy as np # <<<<<<<<<<<<<< * import operator * import sys */ __pyx_t_1 = __Pyx_Import(__pyx_n_s_numpy, 0, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 6; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_np, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 6; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/sparse.pyx":7 * * import numpy as np * import operator # <<<<<<<<<<<<<< * import sys * */ __pyx_t_1 = __Pyx_Import(__pyx_n_s_operator, 0, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 7; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_operator, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 7; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/sparse.pyx":8 * import numpy as np * import operator * import sys # <<<<<<<<<<<<<< * * np.import_array() */ __pyx_t_1 = __Pyx_Import(__pyx_n_s_sys, 0, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 8; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_sys, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 8; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/sparse.pyx":10 * import sys * * np.import_array() # <<<<<<<<<<<<<< * np.import_ufunc() * */ import_array(); /* "pandas/src/sparse.pyx":11 * * np.import_array() * np.import_ufunc() # <<<<<<<<<<<<<< * * #------------------------------------------------------------------------------- */ import_ufunc(); /* "pandas/src/sparse.pyx":16 * # Preamble stuff * * cdef float64_t NaN = np.NaN # <<<<<<<<<<<<<< * cdef float64_t INF = np.inf * */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 16; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_NaN); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 16; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_3 = __pyx_PyFloat_AsDouble(__pyx_t_2); if (unlikely((__pyx_t_3 == (npy_float64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 16; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_6pandas_7_sparse_NaN = ((__pyx_t_5numpy_float64_t)__pyx_t_3); /* "pandas/src/sparse.pyx":17 * * 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_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 17; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_inf); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 17; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_3 = __pyx_PyFloat_AsDouble(__pyx_t_1); if (unlikely((__pyx_t_3 == (npy_float64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 17; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_6pandas_7_sparse_INF = ((__pyx_t_5numpy_float64_t)__pyx_t_3); /* "pandas/src/sparse.pyx":80 * * @property * def ngaps(self): # <<<<<<<<<<<<<< * return self.length - self.npoints * */ __pyx_t_1 = __Pyx_GetNameInClass((PyObject *)__pyx_ptype_6pandas_7_sparse_IntIndex, __pyx_n_s_ngaps); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 80; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); /* "pandas/src/sparse.pyx":79 * return same_length and same_indices * * @property # <<<<<<<<<<<<<< * def ngaps(self): * return self.length - self.npoints */ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyObject_Call(__pyx_builtin_property, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (PyDict_SetItem((PyObject *)__pyx_ptype_6pandas_7_sparse_IntIndex->tp_dict, __pyx_n_s_ngaps, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 80; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; PyType_Modified(__pyx_ptype_6pandas_7_sparse_IntIndex); /* "pandas/src/sparse.pyx":304 * * @property * def ngaps(self): # <<<<<<<<<<<<<< * return self.length - self.npoints * */ __pyx_t_1 = __Pyx_GetNameInClass((PyObject *)__pyx_ptype_6pandas_7_sparse_BlockIndex, __pyx_n_s_ngaps); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 304; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); /* "pandas/src/sparse.pyx":303 * return output * * @property # <<<<<<<<<<<<<< * def ngaps(self): * return self.length - self.npoints */ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 303; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyObject_Call(__pyx_builtin_property, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 303; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (PyDict_SetItem((PyObject *)__pyx_ptype_6pandas_7_sparse_BlockIndex->tp_dict, __pyx_n_s_ngaps, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 304; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; PyType_Modified(__pyx_ptype_6pandas_7_sparse_BlockIndex); /* "pandas/src/sparse.pyx":1064 * return sparse_nancombine(x, xindex, y, yindex, __rdiv) * * sparse_nantruediv = sparse_nandiv # <<<<<<<<<<<<<< * sparse_nanrtruediv = sparse_nanrdiv * */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_sparse_nandiv); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1064; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_sparse_nantruediv, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1064; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/sparse.pyx":1065 * * sparse_nantruediv = sparse_nandiv * sparse_nanrtruediv = sparse_nanrdiv # <<<<<<<<<<<<<< * * cpdef sparse_nanfloordiv(ndarray x, SparseIndex xindex, */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_sparse_nanrdiv); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1065; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_sparse_nanrtruediv, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1065; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/sparse.pyx":1113 * y, yindex, yfill, __rdiv) * * sparse_truediv = sparse_div # <<<<<<<<<<<<<< * sparse_rtruediv = sparse_rdiv * */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_sparse_div); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1113; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_sparse_truediv, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1113; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/sparse.pyx":1114 * * sparse_truediv = sparse_div * sparse_rtruediv = sparse_rdiv # <<<<<<<<<<<<<< * * cpdef sparse_floordiv(ndarray x, SparseIndex xindex, float64_t xfill, */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_sparse_rdiv); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1114; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_sparse_rtruediv, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1114; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/sparse.pyx":1140 * # Indexing operations * * def get_reindexer(ndarray[object, ndim=1] values, dict index_map): # <<<<<<<<<<<<<< * cdef object idx * cdef Py_ssize_t i */ __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_6pandas_7_sparse_43get_reindexer, NULL, __pyx_n_s_pandas__sparse); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1140; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_get_reindexer, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1140; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/sparse.pyx":1187 * * * def reindex_integer(ndarray[float64_t, ndim=1] values, # <<<<<<<<<<<<<< * IntIndex sparse_index, * ndarray[int32_t, ndim=1] indexer): */ __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_6pandas_7_sparse_45reindex_integer, NULL, __pyx_n_s_pandas__sparse); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1187; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_reindex_integer, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1187; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/sparse.pyx":1 * from numpy cimport ndarray, int32_t, float64_t # <<<<<<<<<<<<<< * cimport numpy as np * */ __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_test, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "numpy.pxd":979 * arr.base = baseptr * * cdef inline object get_array_base(ndarray arr): # <<<<<<<<<<<<<< * if arr.base is NULL: * return None */ goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); if (__pyx_m) { __Pyx_AddTraceback("init pandas._sparse", __pyx_clineno, __pyx_lineno, __pyx_filename); Py_DECREF(__pyx_m); __pyx_m = 0; } else if (!PyErr_Occurred()) { PyErr_SetString(PyExc_ImportError, "init pandas._sparse"); } __pyx_L0:; __Pyx_RefNannyFinishContext(); #if PY_MAJOR_VERSION < 3 return; #else return __pyx_m; #endif } /* Runtime support code */ #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 /* CYTHON_REFNANNY */ 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; } 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); } static CYTHON_INLINE int __Pyx_CheckKeywordStrings( PyObject *kwdict, const char* function_name, int kw_allowed) { PyObject* key = 0; Py_ssize_t pos = 0; #if CPYTHON_COMPILING_IN_PYPY if (!kw_allowed && PyDict_Next(kwdict, &pos, &key, 0)) goto invalid_keyword; return 1; #else while (PyDict_Next(kwdict, &pos, &key, 0)) { #if PY_MAJOR_VERSION < 3 if (unlikely(!PyString_CheckExact(key)) && unlikely(!PyString_Check(key))) #endif if (unlikely(!PyUnicode_Check(key))) goto invalid_keyword_type; } if ((!kw_allowed) && unlikely(key)) goto invalid_keyword; return 1; invalid_keyword_type: PyErr_Format(PyExc_TypeError, "%.200s() keywords must be strings", function_name); return 0; #endif invalid_keyword: PyErr_Format(PyExc_TypeError, #if PY_MAJOR_VERSION < 3 "%.200s() got an unexpected keyword argument '%.200s'", function_name, PyString_AsString(key)); #else "%s() got an unexpected keyword argument '%U'", function_name, key); #endif return 0; } static CYTHON_INLINE void __Pyx_ErrRestore(PyObject *type, PyObject *value, PyObject *tb) { #if CYTHON_COMPILING_IN_CPYTHON PyObject *tmp_type, *tmp_value, *tmp_tb; PyThreadState *tstate = PyThreadState_GET(); 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); #else PyErr_Restore(type, value, tb); #endif } static CYTHON_INLINE void __Pyx_ErrFetch(PyObject **type, PyObject **value, PyObject **tb) { #if CYTHON_COMPILING_IN_CPYTHON PyThreadState *tstate = PyThreadState_GET(); *type = tstate->curexc_type; *value = tstate->curexc_value; *tb = tstate->curexc_traceback; tstate->curexc_type = 0; tstate->curexc_value = 0; tstate->curexc_traceback = 0; #else PyErr_Fetch(type, value, tb); #endif } #if PY_MAJOR_VERSION < 3 static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, CYTHON_UNUSED PyObject *cause) { 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 PY_VERSION_HEX < 0x02050000 if (PyClass_Check(type)) { #else if (PyType_Check(type)) { #endif #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; #if PY_VERSION_HEX < 0x02050000 if (PyInstance_Check(type)) { type = (PyObject*) ((PyInstanceObject*)type)->in_class; Py_INCREF(type); } else { type = 0; PyErr_SetString(PyExc_TypeError, "raise: exception must be an old-style class or instance"); goto raise_error; } #else 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; } #endif } __Pyx_ErrRestore(type, value, tb); return; raise_error: Py_XDECREF(value); Py_XDECREF(type); Py_XDECREF(tb); return; } #else /* Python 3+ */ 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) { if (PyObject_IsSubclass(instance_class, type)) { type = instance_class; } else { instance_class = NULL; } } } if (!instance_class) { PyObject *args; if (!value) args = PyTuple_New(0); else if (PyTuple_Check(value)) { Py_INCREF(value); args = value; } else args = PyTuple_Pack(1, value); if (!args) goto bad; owned_instance = PyObject_Call(type, args, NULL); Py_DECREF(args); if (!owned_instance) goto bad; value = owned_instance; if (!PyExceptionInstance_Check(value)) { PyErr_Format(PyExc_TypeError, "calling %R should have returned an instance of " "BaseException, not %R", type, Py_TYPE(value)); goto bad; } } } else { PyErr_SetString(PyExc_TypeError, "raise: exception class must be a subclass of BaseException"); goto bad; } #if PY_VERSION_HEX >= 0x03030000 if (cause) { #else if (cause && cause != Py_None) { #endif PyObject *fixed_cause; if (cause == Py_None) { fixed_cause = NULL; } else if (PyExceptionClass_Check(cause)) { fixed_cause = PyObject_CallObject(cause, NULL); if (fixed_cause == NULL) goto bad; } else if (PyExceptionInstance_Check(cause)) { fixed_cause = cause; Py_INCREF(fixed_cause); } else { PyErr_SetString(PyExc_TypeError, "exception causes must derive from " "BaseException"); goto bad; } PyException_SetCause(value, fixed_cause); } PyErr_SetObject(type, value); if (tb) { PyThreadState *tstate = PyThreadState_GET(); PyObject* tmp_tb = tstate->curexc_traceback; if (tb != tmp_tb) { Py_INCREF(tb); tstate->curexc_traceback = tb; Py_XDECREF(tmp_tb); } } bad: Py_XDECREF(owned_instance); return; } #endif 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 } 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; } static CYTHON_INLINE PyObject *__Pyx_GetModuleGlobalName(PyObject *name) { PyObject *result; #if CYTHON_COMPILING_IN_CPYTHON result = PyDict_GetItem(__pyx_d, name); if (result) { Py_INCREF(result); } else { #else result = PyObject_GetItem(__pyx_d, name); if (!result) { PyErr_Clear(); #endif result = __Pyx_GetBuiltinName(name); } return result; } static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type) { if (unlikely(!type)) { PyErr_SetString(PyExc_SystemError, "Missing type object"); return 0; } if (likely(PyObject_TypeCheck(obj, type))) return 1; PyErr_Format(PyExc_TypeError, "Cannot convert %.200s to %.200s", Py_TYPE(obj)->tp_name, type->tp_name); return 0; } 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); } 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"); } static CYTHON_INLINE int __Pyx_IterFinish(void) { #if CYTHON_COMPILING_IN_CPYTHON PyThreadState *tstate = PyThreadState_GET(); PyObject* exc_type = tstate->curexc_type; if (unlikely(exc_type)) { if (likely(exc_type == PyExc_StopIteration) || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration)) { PyObject *exc_value, *exc_tb; exc_value = tstate->curexc_value; exc_tb = tstate->curexc_traceback; tstate->curexc_type = 0; tstate->curexc_value = 0; tstate->curexc_traceback = 0; Py_DECREF(exc_type); Py_XDECREF(exc_value); Py_XDECREF(exc_tb); return 0; } else { return -1; } } return 0; #else if (unlikely(PyErr_Occurred())) { if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) { PyErr_Clear(); return 0; } else { return -1; } } return 0; #endif } 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; } static CYTHON_INLINE int __Pyx_IsLittleEndian(void) { unsigned int n = 1; return *(unsigned char*)(&n) != 0; } 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) /* First char was not a digit */ 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; /* Consume from buffer string */ while (1) { if (field == &ctx->root) { ctx->head = NULL; if (ctx->enc_count != 0) { __Pyx_BufFmt_RaiseExpected(ctx); return -1; } break; /* breaks both loops as ctx->enc_count == 0 */ } 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; /* empty struct */ 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 CYTHON_INLINE 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 != ')') { if (isspace(*ts)) continue; 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 10: case 13: ++ts; break; case '<': if (!__Pyx_IsLittleEndian()) { PyErr_SetString(PyExc_ValueError, "Little-endian buffer not supported on big-endian compiler"); return NULL; } ctx->new_packmode = '='; ++ts; break; case '>': case '!': if (__Pyx_IsLittleEndian()) { 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': /* substruct */ { 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; /* Erase processed last struct element */ 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 '}': /* end of substruct; either repeat or move on */ { size_t alignment = ctx->struct_alignment; ++ts; if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL; ctx->enc_type = 0; /* Erase processed last struct element */ 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; } /* fall through */ 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 's': case 'p': if (ctx->enc_type == *ts && got_Z == ctx->is_complex && ctx->enc_packmode == ctx->new_packmode) { ctx->enc_count += ctx->new_count; } else { 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; } } } } static CYTHON_INLINE 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 CYTHON_INLINE int __Pyx_GetBufferAndValidate( Py_buffer* buf, PyObject* obj, __Pyx_TypeInfo* dtype, int flags, int nd, int cast, __Pyx_BufFmt_StackElem* stack) { if (obj == Py_None || obj == NULL) { __Pyx_ZeroBuffer(buf); return 0; } buf->buf = NULL; if (__Pyx_GetBuffer(obj, buf, flags) == -1) goto fail; if (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 ((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_ZeroBuffer(buf); return -1; } static CYTHON_INLINE void __Pyx_SafeReleaseBuffer(Py_buffer* info) { if (info->buf == NULL) return; if (info->suboffsets == __Pyx_minusones) info->suboffsets = NULL; __Pyx_ReleaseBuffer(info); } static void __Pyx_RaiseBufferFallbackError(void) { PyErr_SetString(PyExc_ValueError, "Buffer acquisition failed on assignment; and then reacquiring the old buffer failed too!"); } static void __Pyx_RaiseBufferIndexError(int axis) { PyErr_Format(PyExc_IndexError, "Out of bounds on buffer access (axis %d)", axis); } static void __Pyx_RaiseArgumentTypeInvalid(const char* name, PyObject *obj, PyTypeObject *type) { PyErr_Format(PyExc_TypeError, "Argument '%.200s' has incorrect type (expected %.200s, got %.200s)", name, type->tp_name, Py_TYPE(obj)->tp_name); } static CYTHON_INLINE int __Pyx_ArgTypeTest(PyObject *obj, PyTypeObject *type, int none_allowed, const char *name, int exact) { if (unlikely(!type)) { PyErr_SetString(PyExc_SystemError, "Missing type object"); return 0; } if (none_allowed && obj == Py_None) return 1; else if (exact) { if (likely(Py_TYPE(obj) == type)) return 1; #if PY_MAJOR_VERSION == 2 else if ((type == &PyBaseString_Type) && likely(__Pyx_PyBaseString_CheckExact(obj))) return 1; #endif } else { if (likely(PyObject_TypeCheck(obj, type))) return 1; } __Pyx_RaiseArgumentTypeInvalid(name, obj, type); return 0; } static void __Pyx_WriteUnraisable(const char *name, CYTHON_UNUSED int clineno, CYTHON_UNUSED int lineno, CYTHON_UNUSED const char *filename, int full_traceback) { PyObject *old_exc, *old_val, *old_tb; PyObject *ctx; __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); } } static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); } 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; } 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); } static int __Pyx_SetVtable(PyObject *dict, void *vtable) { #if PY_VERSION_HEX >= 0x02070000 && !(PY_MAJOR_VERSION==3&&PY_MINOR_VERSION==0) 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; } static PyObject *__Pyx_GetNameInClass(PyObject *nmspace, PyObject *name) { PyObject *result; result = __Pyx_PyObject_GetAttrStr(nmspace, name); if (!result) result = __Pyx_GetModuleGlobalName(name); return result; } #if PY_MAJOR_VERSION < 3 static int __Pyx_GetBuffer(PyObject *obj, Py_buffer *view, int flags) { #if PY_VERSION_HEX >= 0x02060000 if (PyObject_CheckBuffer(obj)) return PyObject_GetBuffer(obj, view, flags); #endif if (PyObject_TypeCheck(obj, __pyx_ptype_5numpy_ndarray)) return __pyx_pw_5numpy_7ndarray_1__getbuffer__(obj, view, flags); #if PY_VERSION_HEX < 0x02060000 if (obj->ob_type->tp_dict) { PyObject *getbuffer_cobj = PyObject_GetItem( obj->ob_type->tp_dict, __pyx_n_s_pyx_getbuffer); if (getbuffer_cobj) { getbufferproc func = (getbufferproc) PyCObject_AsVoidPtr(getbuffer_cobj); Py_DECREF(getbuffer_cobj); if (!func) goto fail; return func(obj, view, flags); } else { PyErr_Clear(); } } #endif PyErr_Format(PyExc_TypeError, "'%.200s' does not have the buffer interface", Py_TYPE(obj)->tp_name); #if PY_VERSION_HEX < 0x02060000 fail: #endif return -1; } static void __Pyx_ReleaseBuffer(Py_buffer *view) { PyObject *obj = view->obj; if (!obj) return; #if PY_VERSION_HEX >= 0x02060000 if (PyObject_CheckBuffer(obj)) { PyBuffer_Release(view); return; } #endif if (PyObject_TypeCheck(obj, __pyx_ptype_5numpy_ndarray)) { __pyx_pw_5numpy_7ndarray_3__releasebuffer__(obj, view); return; } #if PY_VERSION_HEX < 0x02060000 if (obj->ob_type->tp_dict) { PyObject *releasebuffer_cobj = PyObject_GetItem( obj->ob_type->tp_dict, __pyx_n_s_pyx_releasebuffer); if (releasebuffer_cobj) { releasebufferproc func = (releasebufferproc) PyCObject_AsVoidPtr(releasebuffer_cobj); Py_DECREF(releasebuffer_cobj); if (!func) goto fail; func(obj, view); return; } else { PyErr_Clear(); } } #endif goto nofail; #if PY_VERSION_HEX < 0x02060000 fail: #endif PyErr_WriteUnraisable(obj); nofail: Py_DECREF(obj); view->obj = NULL; } #endif /* PY_MAJOR_VERSION < 3 */ static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level) { PyObject *empty_list = 0; PyObject *module = 0; PyObject *global_dict = 0; PyObject *empty_dict = 0; PyObject *list; #if PY_VERSION_HEX < 0x03030000 PyObject *py_import; py_import = __Pyx_PyObject_GetAttrStr(__pyx_b, __pyx_n_s_import); if (!py_import) goto bad; #endif if (from_list) list = from_list; else { empty_list = PyList_New(0); if (!empty_list) goto bad; list = empty_list; } global_dict = PyModule_GetDict(__pyx_m); if (!global_dict) goto bad; empty_dict = PyDict_New(); if (!empty_dict) goto bad; #if PY_VERSION_HEX >= 0x02050000 { #if PY_MAJOR_VERSION >= 3 if (level == -1) { if (strchr(__Pyx_MODULE_NAME, '.')) { #if PY_VERSION_HEX < 0x03030000 PyObject *py_level = PyInt_FromLong(1); if (!py_level) goto bad; module = PyObject_CallFunctionObjArgs(py_import, name, global_dict, empty_dict, list, py_level, NULL); Py_DECREF(py_level); #else module = PyImport_ImportModuleLevelObject( name, global_dict, empty_dict, list, 1); #endif if (!module) { if (!PyErr_ExceptionMatches(PyExc_ImportError)) goto bad; PyErr_Clear(); } } level = 0; /* try absolute import on failure */ } #endif if (!module) { #if PY_VERSION_HEX < 0x03030000 PyObject *py_level = PyInt_FromLong(level); if (!py_level) goto bad; module = PyObject_CallFunctionObjArgs(py_import, name, global_dict, empty_dict, list, py_level, NULL); Py_DECREF(py_level); #else module = PyImport_ImportModuleLevelObject( name, global_dict, empty_dict, list, level); #endif } } #else if (level>0) { PyErr_SetString(PyExc_RuntimeError, "Relative import is not supported for Python <=2.4."); goto bad; } module = PyObject_CallFunctionObjArgs(py_import, name, global_dict, empty_dict, list, NULL); #endif bad: #if PY_VERSION_HEX < 0x03030000 Py_XDECREF(py_import); #endif Py_XDECREF(empty_list); Py_XDECREF(empty_dict); return module; } static CYTHON_INLINE PyObject* __Pyx_PyInt_From_npy_int32(npy_int32 value) { const npy_int32 neg_one = (npy_int32) -1, const_zero = 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); } else if (sizeof(npy_int32) <= sizeof(unsigned long long)) { return PyLong_FromUnsignedLongLong((unsigned long long) value); } } else { if (sizeof(npy_int32) <= sizeof(long)) { return PyInt_FromLong((long) value); } else if (sizeof(npy_int32) <= sizeof(long long)) { return PyLong_FromLongLong((long long) value); } } { 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); } } static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value) { const int neg_one = (int) -1, const_zero = 0; const int is_unsigned = neg_one > const_zero; if (is_unsigned) { if (sizeof(int) < sizeof(long)) { return PyInt_FromLong((long) value); } else if (sizeof(int) <= sizeof(unsigned long)) { return PyLong_FromUnsignedLong((unsigned long) value); } else if (sizeof(int) <= sizeof(unsigned long long)) { return PyLong_FromUnsignedLongLong((unsigned long long) value); } } else { if (sizeof(int) <= sizeof(long)) { return PyInt_FromLong((long) value); } else if (sizeof(int) <= sizeof(long long)) { return PyLong_FromLongLong((long long) value); } } { int one = 1; int little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&value; return _PyLong_FromByteArray(bytes, sizeof(int), little, !is_unsigned); } } #define __PYX_VERIFY_RETURN_INT(target_type, func_type, func) \ { \ func_type value = func(x); \ if (sizeof(target_type) < sizeof(func_type)) { \ if (unlikely(value != (func_type) (target_type) value)) { \ func_type zero = 0; \ PyErr_SetString(PyExc_OverflowError, \ (is_unsigned && unlikely(value < zero)) ? \ "can't convert negative value to " #target_type : \ "value too large to convert to " #target_type); \ return (target_type) -1; \ } \ } \ return (target_type) value; \ } #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS #include "longintrepr.h" #endif #endif static CYTHON_INLINE npy_int32 __Pyx_PyInt_As_npy_int32(PyObject *x) { const npy_int32 neg_one = (npy_int32) -1, const_zero = 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) } else { long val = PyInt_AS_LONG(x); if (is_unsigned && unlikely(val < 0)) { PyErr_SetString(PyExc_OverflowError, "can't convert negative value to npy_int32"); return (npy_int32) -1; } return (npy_int32) val; } } else #endif if (likely(PyLong_Check(x))) { if (is_unsigned) { #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS if (sizeof(digit) <= sizeof(npy_int32)) { switch (Py_SIZE(x)) { case 0: return 0; case 1: return (npy_int32) ((PyLongObject*)x)->ob_digit[0]; } } #endif #endif if (unlikely(Py_SIZE(x) < 0)) { PyErr_SetString(PyExc_OverflowError, "can't convert negative value to npy_int32"); return (npy_int32) -1; } if (sizeof(npy_int32) <= sizeof(unsigned long)) { __PYX_VERIFY_RETURN_INT(npy_int32, unsigned long, PyLong_AsUnsignedLong) } else if (sizeof(npy_int32) <= sizeof(unsigned long long)) { __PYX_VERIFY_RETURN_INT(npy_int32, unsigned long long, PyLong_AsUnsignedLongLong) } } else { #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS if (sizeof(digit) <= sizeof(npy_int32)) { switch (Py_SIZE(x)) { case 0: return 0; case 1: return +(npy_int32) ((PyLongObject*)x)->ob_digit[0]; case -1: return -(npy_int32) ((PyLongObject*)x)->ob_digit[0]; } } #endif #endif if (sizeof(npy_int32) <= sizeof(long)) { __PYX_VERIFY_RETURN_INT(npy_int32, long, PyLong_AsLong) } else if (sizeof(npy_int32) <= sizeof(long long)) { __PYX_VERIFY_RETURN_INT(npy_int32, long long, PyLong_AsLongLong) } } { #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_Int(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_Int(x); if (!tmp) return (npy_int32) -1; val = __Pyx_PyInt_As_npy_int32(tmp); Py_DECREF(tmp); return val; } } #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 #if CYTHON_CCOMPLEX #else static CYTHON_INLINE int __Pyx_c_eqf(__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_sumf(__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_difff(__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_prodf(__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; } static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_quotf(__pyx_t_float_complex a, __pyx_t_float_complex b) { __pyx_t_float_complex z; float denom = b.real * b.real + b.imag * b.imag; z.real = (a.real * b.real + a.imag * b.imag) / denom; z.imag = (a.imag * b.real - a.real * b.imag) / denom; return z; } static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_negf(__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_zerof(__pyx_t_float_complex a) { return (a.real == 0) && (a.imag == 0); } static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_conjf(__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_absf(__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_powf(__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_prodf(a, a); return __Pyx_c_prodf(a, a); case 3: z = __Pyx_c_prodf(a, a); return __Pyx_c_prodf(z, a); case 4: z = __Pyx_c_prodf(a, a); return __Pyx_c_prodf(z, z); } } if (a.imag == 0) { if (a.real == 0) { return a; } r = a.real; theta = 0; } else { r = __Pyx_c_absf(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 #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 #if CYTHON_CCOMPLEX #else static CYTHON_INLINE int __Pyx_c_eq(__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(__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(__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(__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; } static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_quot(__pyx_t_double_complex a, __pyx_t_double_complex b) { __pyx_t_double_complex z; double denom = b.real * b.real + b.imag * b.imag; z.real = (a.real * b.real + a.imag * b.imag) / denom; z.imag = (a.imag * b.real - a.real * b.imag) / denom; return z; } static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_neg(__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(__pyx_t_double_complex a) { return (a.real == 0) && (a.imag == 0); } static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_conj(__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(__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(__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(a, a); return __Pyx_c_prod(a, a); case 3: z = __Pyx_c_prod(a, a); return __Pyx_c_prod(z, a); case 4: z = __Pyx_c_prod(a, a); return __Pyx_c_prod(z, z); } } if (a.imag == 0) { if (a.real == 0) { return a; } r = a.real; theta = 0; } else { r = __Pyx_c_abs(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 #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS #include "longintrepr.h" #endif #endif static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) { const int neg_one = (int) -1, const_zero = 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) } else { long val = PyInt_AS_LONG(x); if (is_unsigned && unlikely(val < 0)) { PyErr_SetString(PyExc_OverflowError, "can't convert negative value to int"); return (int) -1; } return (int) val; } } else #endif if (likely(PyLong_Check(x))) { if (is_unsigned) { #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS if (sizeof(digit) <= sizeof(int)) { switch (Py_SIZE(x)) { case 0: return 0; case 1: return (int) ((PyLongObject*)x)->ob_digit[0]; } } #endif #endif if (unlikely(Py_SIZE(x) < 0)) { PyErr_SetString(PyExc_OverflowError, "can't convert negative value to int"); return (int) -1; } if (sizeof(int) <= sizeof(unsigned long)) { __PYX_VERIFY_RETURN_INT(int, unsigned long, PyLong_AsUnsignedLong) } else if (sizeof(int) <= sizeof(unsigned long long)) { __PYX_VERIFY_RETURN_INT(int, unsigned long long, PyLong_AsUnsignedLongLong) } } else { #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS if (sizeof(digit) <= sizeof(int)) { switch (Py_SIZE(x)) { case 0: return 0; case 1: return +(int) ((PyLongObject*)x)->ob_digit[0]; case -1: return -(int) ((PyLongObject*)x)->ob_digit[0]; } } #endif #endif if (sizeof(int) <= sizeof(long)) { __PYX_VERIFY_RETURN_INT(int, long, PyLong_AsLong) } else if (sizeof(int) <= sizeof(long long)) { __PYX_VERIFY_RETURN_INT(int, long long, PyLong_AsLongLong) } } { #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_Int(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_Int(x); if (!tmp) return (int) -1; val = __Pyx_PyInt_As_int(tmp); Py_DECREF(tmp); return val; } } static CYTHON_INLINE PyObject* __Pyx_PyInt_From_ptrdiff_t(ptrdiff_t value) { const ptrdiff_t neg_one = (ptrdiff_t) -1, const_zero = 0; const int is_unsigned = neg_one > const_zero; if (is_unsigned) { if (sizeof(ptrdiff_t) < sizeof(long)) { return PyInt_FromLong((long) value); } else if (sizeof(ptrdiff_t) <= sizeof(unsigned long)) { return PyLong_FromUnsignedLong((unsigned long) value); } else if (sizeof(ptrdiff_t) <= sizeof(unsigned long long)) { return PyLong_FromUnsignedLongLong((unsigned long long) value); } } else { if (sizeof(ptrdiff_t) <= sizeof(long)) { return PyInt_FromLong((long) value); } else if (sizeof(ptrdiff_t) <= sizeof(long long)) { return PyLong_FromLongLong((long long) value); } } { int one = 1; int little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&value; return _PyLong_FromByteArray(bytes, sizeof(ptrdiff_t), little, !is_unsigned); } } static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) { const long neg_one = (long) -1, const_zero = 0; const int is_unsigned = neg_one > const_zero; if (is_unsigned) { if (sizeof(long) < sizeof(long)) { return PyInt_FromLong((long) value); } else if (sizeof(long) <= sizeof(unsigned long)) { return PyLong_FromUnsignedLong((unsigned long) value); } else if (sizeof(long) <= sizeof(unsigned long long)) { return PyLong_FromUnsignedLongLong((unsigned long long) value); } } else { if (sizeof(long) <= sizeof(long)) { return PyInt_FromLong((long) value); } else if (sizeof(long) <= sizeof(long long)) { return PyLong_FromLongLong((long long) value); } } { int one = 1; int little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&value; return _PyLong_FromByteArray(bytes, sizeof(long), little, !is_unsigned); } } #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS #include "longintrepr.h" #endif #endif static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) { const long neg_one = (long) -1, const_zero = 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) } else { long val = PyInt_AS_LONG(x); if (is_unsigned && unlikely(val < 0)) { PyErr_SetString(PyExc_OverflowError, "can't convert negative value to long"); return (long) -1; } return (long) val; } } else #endif if (likely(PyLong_Check(x))) { if (is_unsigned) { #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS if (sizeof(digit) <= sizeof(long)) { switch (Py_SIZE(x)) { case 0: return 0; case 1: return (long) ((PyLongObject*)x)->ob_digit[0]; } } #endif #endif if (unlikely(Py_SIZE(x) < 0)) { PyErr_SetString(PyExc_OverflowError, "can't convert negative value to long"); return (long) -1; } if (sizeof(long) <= sizeof(unsigned long)) { __PYX_VERIFY_RETURN_INT(long, unsigned long, PyLong_AsUnsignedLong) } else if (sizeof(long) <= sizeof(unsigned long long)) { __PYX_VERIFY_RETURN_INT(long, unsigned long long, PyLong_AsUnsignedLongLong) } } else { #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS if (sizeof(digit) <= sizeof(long)) { switch (Py_SIZE(x)) { case 0: return 0; case 1: return +(long) ((PyLongObject*)x)->ob_digit[0]; case -1: return -(long) ((PyLongObject*)x)->ob_digit[0]; } } #endif #endif if (sizeof(long) <= sizeof(long)) { __PYX_VERIFY_RETURN_INT(long, long, PyLong_AsLong) } else if (sizeof(long) <= sizeof(long long)) { __PYX_VERIFY_RETURN_INT(long, long long, PyLong_AsLongLong) } } { #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_Int(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_Int(x); if (!tmp) return (long) -1; val = __Pyx_PyInt_As_long(tmp); Py_DECREF(tmp); return val; } } 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); #if PY_VERSION_HEX < 0x02050000 return PyErr_Warn(NULL, message); #else return PyErr_WarnEx(NULL, message, 1); #endif } return 0; } #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 #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", module_name, class_name); #if PY_VERSION_HEX < 0x02050000 if (PyErr_Warn(NULL, warning) < 0) goto bad; #else if (PyErr_WarnEx(NULL, warning, 0) < 0) goto bad; #endif } else if ((size_t)basicsize != size) { PyErr_Format(PyExc_ValueError, "%.200s.%.200s has the wrong size, try recompiling", module_name, class_name); goto bad; } return (PyTypeObject *)result; bad: Py_XDECREF(py_module); Py_XDECREF(result); return NULL; } #endif 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) / 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, 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); } #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, /*int argcount,*/ 0, /*int kwonlyargcount,*/ 0, /*int nlocals,*/ 0, /*int stacksize,*/ 0, /*int flags,*/ __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, /*int firstlineno,*/ __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; PyObject *py_globals = 0; PyFrameObject *py_frame = 0; py_code = __pyx_find_code_object(c_line ? c_line : py_line); if (!py_code) { py_code = __Pyx_CreateCodeObjectForTraceback( funcname, c_line, py_line, filename); if (!py_code) goto bad; __pyx_insert_code_object(c_line ? c_line : py_line, py_code); } py_globals = PyModule_GetDict(__pyx_m); if (!py_globals) goto bad; py_frame = PyFrame_New( PyThreadState_GET(), /*PyThreadState *tstate,*/ py_code, /*PyCodeObject *code,*/ py_globals, /*PyObject *globals,*/ 0 /*PyObject *locals*/ ); if (!py_frame) goto bad; py_frame->f_lineno = py_line; PyTraceBack_Here(py_frame); bad: Py_XDECREF(py_code); Py_XDECREF(py_frame); } 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 /* Python 3+ has unicode identifiers */ if (t->is_unicode | t->is_str) { if (t->intern) { *t->p = PyUnicode_InternFromString(t->s); } else if (t->encoding) { *t->p = PyUnicode_Decode(t->s, t->n - 1, t->encoding, NULL); } else { *t->p = PyUnicode_FromStringAndSize(t->s, t->n - 1); } } else { *t->p = PyBytes_FromStringAndSize(t->s, t->n - 1); } #endif if (!*t->p) return -1; ++t; } return 0; } static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(char* c_str) { return __Pyx_PyUnicode_FromStringAndSize(c_str, strlen(c_str)); } static CYTHON_INLINE char* __Pyx_PyObject_AsString(PyObject* o) { Py_ssize_t ignore; return __Pyx_PyObject_AsStringAndSize(o, &ignore); } static CYTHON_INLINE char* __Pyx_PyObject_AsStringAndSize(PyObject* o, Py_ssize_t *length) { #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT if ( #if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII __Pyx_sys_getdefaultencoding_not_ascii && #endif PyUnicode_Check(o)) { #if PY_VERSION_HEX < 0x03030000 char* defenc_c; PyObject* defenc = _PyUnicode_AsDefaultEncodedString(o, NULL); if (!defenc) return NULL; defenc_c = PyBytes_AS_STRING(defenc); #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII { char* end = defenc_c + PyBytes_GET_SIZE(defenc); char* c; for (c = defenc_c; c < end; c++) { if ((unsigned char) (*c) >= 128) { PyUnicode_AsASCIIString(o); return NULL; } } } #endif /*__PYX_DEFAULT_STRING_ENCODING_IS_ASCII*/ *length = PyBytes_GET_SIZE(defenc); return defenc_c; #else /* PY_VERSION_HEX < 0x03030000 */ if (PyUnicode_READY(o) == -1) return NULL; #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII if (PyUnicode_IS_ASCII(o)) { *length = PyUnicode_GET_DATA_SIZE(o); return PyUnicode_AsUTF8(o); } else { PyUnicode_AsASCIIString(o); return NULL; } #else /* __PYX_DEFAULT_STRING_ENCODING_IS_ASCII */ return PyUnicode_AsUTF8AndSize(o, length); #endif /* __PYX_DEFAULT_STRING_ENCODING_IS_ASCII */ #endif /* PY_VERSION_HEX < 0x03030000 */ } else #endif /* __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT */ #if PY_VERSION_HEX >= 0x02060000 if (PyByteArray_Check(o)) { *length = PyByteArray_GET_SIZE(o); return PyByteArray_AS_STRING(o); } else #endif { char* result; int r = PyBytes_AsStringAndSize(o, &result, length); if (unlikely(r < 0)) { return NULL; } else { return result; } } } static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject* x) { int is_true = x == Py_True; if (is_true | (x == Py_False) | (x == Py_None)) return is_true; else return PyObject_IsTrue(x); } static CYTHON_INLINE PyObject* __Pyx_PyNumber_Int(PyObject* x) { PyNumberMethods *m; const char *name = NULL; PyObject *res = NULL; #if PY_MAJOR_VERSION < 3 if (PyInt_Check(x) || PyLong_Check(x)) #else if (PyLong_Check(x)) #endif return Py_INCREF(x), x; m = Py_TYPE(x)->tp_as_number; #if PY_MAJOR_VERSION < 3 if (m && m->nb_int) { name = "int"; res = PyNumber_Int(x); } else if (m && m->nb_long) { name = "long"; res = PyNumber_Long(x); } #else if (m && m->nb_int) { name = "int"; res = PyNumber_Long(x); } #endif if (res) { #if PY_MAJOR_VERSION < 3 if (!PyInt_Check(res) && !PyLong_Check(res)) { #else if (!PyLong_Check(res)) { #endif PyErr_Format(PyExc_TypeError, "__%.4s__ returned non-%.4s (type %.200s)", name, name, Py_TYPE(res)->tp_name); Py_DECREF(res); return NULL; } } else if (!PyErr_Occurred()) { PyErr_SetString(PyExc_TypeError, "an integer is required"); } return res; } #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS #include "longintrepr.h" #endif #endif 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))) return PyInt_AS_LONG(b); #endif if (likely(PyLong_CheckExact(b))) { #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS switch (Py_SIZE(b)) { case -1: return -(sdigit)((PyLongObject*)b)->ob_digit[0]; case 0: return 0; case 1: return ((PyLongObject*)b)->ob_digit[0]; } #endif #endif #if PY_VERSION_HEX < 0x02060000 return PyInt_AsSsize_t(b); #else return PyLong_AsSsize_t(b); #endif } 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) { #if PY_VERSION_HEX < 0x02050000 if (ival <= LONG_MAX) return PyInt_FromLong((long)ival); else { unsigned char *bytes = (unsigned char *) &ival; int one = 1; int little = (int)*(unsigned char*)&one; return _PyLong_FromByteArray(bytes, sizeof(size_t), little, 0); } #else return PyInt_FromSize_t(ival); #endif } #endif /* Py_PYTHON_H */ debian/cythonized-files/pandas/algos.c0000664000000000000000003427152012275603610015207 0ustar /* Generated by Cython 0.20 on Mon Feb 3 08:41:48 2014 */ #define PY_SSIZE_T_CLEAN #ifndef CYTHON_USE_PYLONG_INTERNALS #ifdef PYLONG_BITS_IN_DIGIT #define CYTHON_USE_PYLONG_INTERNALS 0 #else #include "pyconfig.h" #ifdef PYLONG_BITS_IN_DIGIT #define CYTHON_USE_PYLONG_INTERNALS 1 #else #define CYTHON_USE_PYLONG_INTERNALS 0 #endif #endif #endif #include "Python.h" #ifndef Py_PYTHON_H #error Python headers needed to compile C extensions, please install development version of Python. #elif PY_VERSION_HEX < 0x02040000 #error Cython requires Python 2.4+. #else #define CYTHON_ABI "0_20" #include /* For offsetof */ #ifndef offsetof #define offsetof(type, member) ( (size_t) & ((type*)0) -> member ) #endif #if !defined(WIN32) && !defined(MS_WINDOWS) #ifndef __stdcall #define __stdcall #endif #ifndef __cdecl #define __cdecl #endif #ifndef __fastcall #define __fastcall #endif #endif #ifndef DL_IMPORT #define DL_IMPORT(t) t #endif #ifndef DL_EXPORT #define DL_EXPORT(t) t #endif #ifndef PY_LONG_LONG #define PY_LONG_LONG LONG_LONG #endif #ifndef Py_HUGE_VAL #define Py_HUGE_VAL HUGE_VAL #endif #ifdef PYPY_VERSION #define CYTHON_COMPILING_IN_PYPY 1 #define CYTHON_COMPILING_IN_CPYTHON 0 #else #define CYTHON_COMPILING_IN_PYPY 0 #define CYTHON_COMPILING_IN_CPYTHON 1 #endif #if CYTHON_COMPILING_IN_PYPY #define Py_OptimizeFlag 0 #endif #if PY_VERSION_HEX < 0x02050000 typedef int Py_ssize_t; #define PY_SSIZE_T_MAX INT_MAX #define PY_SSIZE_T_MIN INT_MIN #define PY_FORMAT_SIZE_T "" #define CYTHON_FORMAT_SSIZE_T "" #define PyInt_FromSsize_t(z) PyInt_FromLong(z) #define PyInt_AsSsize_t(o) __Pyx_PyInt_As_int(o) #define PyNumber_Index(o) ((PyNumber_Check(o) && !PyFloat_Check(o)) ? PyNumber_Int(o) : \ (PyErr_Format(PyExc_TypeError, \ "expected index value, got %.200s", Py_TYPE(o)->tp_name), \ (PyObject*)0)) #define __Pyx_PyIndex_Check(o) (PyNumber_Check(o) && !PyFloat_Check(o) && \ !PyComplex_Check(o)) #define PyIndex_Check __Pyx_PyIndex_Check #define PyErr_WarnEx(category, message, stacklevel) PyErr_Warn(category, message) #define __PYX_BUILD_PY_SSIZE_T "i" #else #define __PYX_BUILD_PY_SSIZE_T "n" #define CYTHON_FORMAT_SSIZE_T "z" #define __Pyx_PyIndex_Check PyIndex_Check #endif #if PY_VERSION_HEX < 0x02060000 #define Py_REFCNT(ob) (((PyObject*)(ob))->ob_refcnt) #define Py_TYPE(ob) (((PyObject*)(ob))->ob_type) #define Py_SIZE(ob) (((PyVarObject*)(ob))->ob_size) #define PyVarObject_HEAD_INIT(type, size) \ PyObject_HEAD_INIT(type) size, #define PyType_Modified(t) typedef struct { void *buf; PyObject *obj; Py_ssize_t len; Py_ssize_t itemsize; int readonly; int ndim; char *format; Py_ssize_t *shape; Py_ssize_t *strides; Py_ssize_t *suboffsets; void *internal; } Py_buffer; #define PyBUF_SIMPLE 0 #define PyBUF_WRITABLE 0x0001 #define PyBUF_FORMAT 0x0004 #define PyBUF_ND 0x0008 #define PyBUF_STRIDES (0x0010 | PyBUF_ND) #define PyBUF_C_CONTIGUOUS (0x0020 | PyBUF_STRIDES) #define PyBUF_F_CONTIGUOUS (0x0040 | PyBUF_STRIDES) #define PyBUF_ANY_CONTIGUOUS (0x0080 | PyBUF_STRIDES) #define PyBUF_INDIRECT (0x0100 | PyBUF_STRIDES) #define PyBUF_RECORDS (PyBUF_STRIDES | PyBUF_FORMAT | PyBUF_WRITABLE) #define PyBUF_FULL (PyBUF_INDIRECT | PyBUF_FORMAT | PyBUF_WRITABLE) typedef int (*getbufferproc)(PyObject *, Py_buffer *, int); typedef void (*releasebufferproc)(PyObject *, Py_buffer *); #endif #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, 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 #if PY_VERSION_HEX < 0x02060000 #define PyUnicode_FromString(s) PyUnicode_Decode(s, strlen(s), "UTF-8", "strict") #endif #if PY_MAJOR_VERSION >= 3 #define Py_TPFLAGS_CHECKTYPES 0 #define Py_TPFLAGS_HAVE_INDEX 0 #endif #if (PY_VERSION_HEX < 0x02060000) || (PY_MAJOR_VERSION >= 3) #define Py_TPFLAGS_HAVE_NEWBUFFER 0 #endif #if PY_VERSION_HEX < 0x02060000 #define Py_TPFLAGS_HAVE_VERSION_TAG 0 #endif #if PY_VERSION_HEX < 0x02060000 && !defined(Py_TPFLAGS_IS_ABSTRACT) #define Py_TPFLAGS_IS_ABSTRACT 0 #endif #if PY_VERSION_HEX < 0x030400a1 && !defined(Py_TPFLAGS_HAVE_FINALIZE) #define Py_TPFLAGS_HAVE_FINALIZE 0 #endif #if PY_VERSION_HEX > 0x03030000 && defined(PyUnicode_KIND) #define CYTHON_PEP393_ENABLED 1 #define __Pyx_PyUnicode_READY(op) (likely(PyUnicode_IS_READY(op)) ? \ 0 : _PyUnicode_Ready((PyObject *)(op))) #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_LENGTH(u) #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i) #define __Pyx_PyUnicode_KIND(u) PyUnicode_KIND(u) #define __Pyx_PyUnicode_DATA(u) PyUnicode_DATA(u) #define __Pyx_PyUnicode_READ(k, d, i) PyUnicode_READ(k, d, i) #else #define CYTHON_PEP393_ENABLED 0 #define __Pyx_PyUnicode_READY(op) (0) #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_SIZE(u) #define __Pyx_PyUnicode_READ_CHAR(u, i) ((Py_UCS4)(PyUnicode_AS_UNICODE(u)[i])) #define __Pyx_PyUnicode_KIND(u) (sizeof(Py_UNICODE)) #define __Pyx_PyUnicode_DATA(u) ((void*)PyUnicode_AS_UNICODE(u)) #define __Pyx_PyUnicode_READ(k, d, i) ((void)(k), (Py_UCS4)(((Py_UNICODE*)d)[i])) #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)) #define __Pyx_PyUnicode_Concat(a, b) ((unlikely((a) == Py_None) || unlikely((b) == Py_None)) ? \ PyNumber_Add(a, b) : PyUnicode_Concat(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 #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_VERSION_HEX < 0x02060000 #define PyBytesObject PyStringObject #define PyBytes_Type PyString_Type #define PyBytes_Check PyString_Check #define PyBytes_CheckExact PyString_CheckExact #define PyBytes_FromString PyString_FromString #define PyBytes_FromStringAndSize PyString_FromStringAndSize #define PyBytes_FromFormat PyString_FromFormat #define PyBytes_DecodeEscape PyString_DecodeEscape #define PyBytes_AsString PyString_AsString #define PyBytes_AsStringAndSize PyString_AsStringAndSize #define PyBytes_Size PyString_Size #define PyBytes_AS_STRING PyString_AS_STRING #define PyBytes_GET_SIZE PyString_GET_SIZE #define PyBytes_Repr PyString_Repr #define PyBytes_Concat PyString_Concat #define PyBytes_ConcatAndDel PyString_ConcatAndDel #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_CheckExact(obj) || PyUnicode_CheckExact(obj) || \ PyString_Check(obj) || PyUnicode_Check(obj)) #define __Pyx_PyBaseString_CheckExact(obj) (PyString_CheckExact(obj) || PyUnicode_CheckExact(obj)) #endif #if PY_VERSION_HEX < 0x02060000 #define PySet_Check(obj) PyObject_TypeCheck(obj, &PySet_Type) #define PyFrozenSet_Check(obj) PyObject_TypeCheck(obj, &PyFrozenSet_Type) #endif #ifndef PySet_CheckExact #define PySet_CheckExact(obj) (Py_TYPE(obj) == &PySet_Type) #endif #define __Pyx_TypeCheck(obj, type) PyObject_TypeCheck(obj, (PyTypeObject *)type) #if PY_MAJOR_VERSION >= 3 #define PyIntObject PyLongObject #define PyInt_Type PyLong_Type #define PyInt_Check(op) PyLong_Check(op) #define PyInt_CheckExact(op) PyLong_CheckExact(op) #define PyInt_FromString PyLong_FromString #define PyInt_FromUnicode PyLong_FromUnicode #define PyInt_FromLong PyLong_FromLong #define PyInt_FromSize_t PyLong_FromSize_t #define PyInt_FromSsize_t PyLong_FromSsize_t #define PyInt_AsLong PyLong_AsLong #define PyInt_AS_LONG PyLong_AS_LONG #define PyInt_AsSsize_t PyLong_AsSsize_t #define PyInt_AsUnsignedLongMask PyLong_AsUnsignedLongMask #define PyInt_AsUnsignedLongLongMask PyLong_AsUnsignedLongLongMask #define PyNumber_Int PyNumber_Long #endif #if PY_MAJOR_VERSION >= 3 #define PyBoolObject PyLongObject #endif #if PY_VERSION_HEX < 0x03020000 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) || (PY_VERSION_HEX >= 0x03010300) #define __Pyx_PySequence_GetSlice(obj, a, b) PySequence_GetSlice(obj, a, b) #define __Pyx_PySequence_SetSlice(obj, a, b, value) PySequence_SetSlice(obj, a, b, value) #define __Pyx_PySequence_DelSlice(obj, a, b) PySequence_DelSlice(obj, a, b) #else #define __Pyx_PySequence_GetSlice(obj, a, b) (unlikely(!(obj)) ? \ (PyErr_SetString(PyExc_SystemError, "null argument to internal routine"), (PyObject*)0) : \ (likely((obj)->ob_type->tp_as_mapping) ? (PySequence_GetSlice(obj, a, b)) : \ (PyErr_Format(PyExc_TypeError, "'%.200s' object is unsliceable", (obj)->ob_type->tp_name), (PyObject*)0))) #define __Pyx_PySequence_SetSlice(obj, a, b, value) (unlikely(!(obj)) ? \ (PyErr_SetString(PyExc_SystemError, "null argument to internal routine"), -1) : \ (likely((obj)->ob_type->tp_as_mapping) ? (PySequence_SetSlice(obj, a, b, value)) : \ (PyErr_Format(PyExc_TypeError, "'%.200s' object doesn't support slice assignment", (obj)->ob_type->tp_name), -1))) #define __Pyx_PySequence_DelSlice(obj, a, b) (unlikely(!(obj)) ? \ (PyErr_SetString(PyExc_SystemError, "null argument to internal routine"), -1) : \ (likely((obj)->ob_type->tp_as_mapping) ? (PySequence_DelSlice(obj, a, b)) : \ (PyErr_Format(PyExc_TypeError, "'%.200s' object doesn't support slice deletion", (obj)->ob_type->tp_name), -1))) #endif #if PY_MAJOR_VERSION >= 3 #define PyMethod_New(func, self, klass) ((self) ? PyMethod_New(func, self) : PyInstanceMethod_New(func)) #endif #if PY_VERSION_HEX < 0x02050000 #define __Pyx_GetAttrString(o,n) PyObject_GetAttrString((o),((char *)(n))) #define __Pyx_SetAttrString(o,n,a) PyObject_SetAttrString((o),((char *)(n)),(a)) #define __Pyx_DelAttrString(o,n) PyObject_DelAttrString((o),((char *)(n))) #else #define __Pyx_GetAttrString(o,n) PyObject_GetAttrString((o),(n)) #define __Pyx_SetAttrString(o,n,a) PyObject_SetAttrString((o),(n),(a)) #define __Pyx_DelAttrString(o,n) PyObject_DelAttrString((o),(n)) #endif #if PY_VERSION_HEX < 0x02050000 #define __Pyx_NAMESTR(n) ((char *)(n)) #define __Pyx_DOCSTR(n) ((char *)(n)) #else #define __Pyx_NAMESTR(n) (n) #define __Pyx_DOCSTR(n) (n) #endif #ifndef CYTHON_INLINE #if defined(__GNUC__) #define CYTHON_INLINE __inline__ #elif defined(_MSC_VER) #define CYTHON_INLINE __inline #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L #define CYTHON_INLINE inline #else #define CYTHON_INLINE #endif #endif #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 #ifdef NAN #define __PYX_NAN() ((float) NAN) #else static CYTHON_INLINE float __PYX_NAN() { /* Initialize NaN. The sign is irrelevant, an exponent with all bits 1 and a nonzero mantissa means NaN. If the first bit in the mantissa is 1, it is a quiet NaN. */ float value; memset(&value, 0xFF, sizeof(value)); return value; } #endif #if PY_MAJOR_VERSION >= 3 #define __Pyx_PyNumber_Divide(x,y) PyNumber_TrueDivide(x,y) #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceTrueDivide(x,y) #else #define __Pyx_PyNumber_Divide(x,y) PyNumber_Divide(x,y) #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceDivide(x,y) #endif #ifndef __PYX_EXTERN_C #ifdef __cplusplus #define __PYX_EXTERN_C extern "C" #else #define __PYX_EXTERN_C extern #endif #endif #if defined(WIN32) || defined(MS_WINDOWS) #define _USE_MATH_DEFINES #endif #include #define __PYX_HAVE__pandas__algos #define __PYX_HAVE_API__pandas__algos #include "string.h" #include "stdio.h" #include "stdlib.h" #include "numpy/arrayobject.h" #include "numpy/ufuncobject.h" #include "pythread.h" #include "numpy_helper.h" #include "src/headers/math.h" #include "math.h" #include "skiplist.h" #include "headers/stdint.h" #include "datetime.h" #include "datetime_helper.h" #include "numpy/ndarrayobject.h" #include "numpy/npy_common.h" #include "datetime/np_datetime.h" #include "datetime/np_datetime_strings.h" #include "khash_python.h" #ifdef _OPENMP #include #endif /* _OPENMP */ #ifdef PYREX_WITHOUT_ASSERTIONS #define CYTHON_WITHOUT_ASSERTIONS #endif #ifndef CYTHON_UNUSED # if defined(__GNUC__) # if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)) # define CYTHON_UNUSED __attribute__ ((__unused__)) # else # define CYTHON_UNUSED # endif # elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER)) # define CYTHON_UNUSED __attribute__ ((__unused__)) # else # define CYTHON_UNUSED # endif #endif typedef struct {PyObject **p; char *s; const Py_ssize_t n; const char* encoding; const char is_unicode; const char is_str; const char intern; } __Pyx_StringTabEntry; /*proto*/ #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_fits_Py_ssize_t(v, type, is_signed) ( \ (sizeof(type) < sizeof(Py_ssize_t)) || \ (sizeof(type) > sizeof(Py_ssize_t) && \ likely(v < (type)PY_SSIZE_T_MAX || \ v == (type)PY_SSIZE_T_MAX) && \ (!is_signed || likely(v > (type)PY_SSIZE_T_MIN || \ v == (type)PY_SSIZE_T_MIN))) || \ (sizeof(type) == sizeof(Py_ssize_t) && \ (is_signed || likely(v < (type)PY_SSIZE_T_MAX || \ v == (type)PY_SSIZE_T_MAX))) ) static CYTHON_INLINE char* __Pyx_PyObject_AsString(PyObject*); static CYTHON_INLINE char* __Pyx_PyObject_AsStringAndSize(PyObject*, Py_ssize_t* length); #define __Pyx_PyByteArray_FromString(s) PyByteArray_FromStringAndSize((const char*)s, strlen((const char*)s)) #define __Pyx_PyByteArray_FromStringAndSize(s, l) PyByteArray_FromStringAndSize((const char*)s, l) #define __Pyx_PyBytes_FromString PyBytes_FromString #define __Pyx_PyBytes_FromStringAndSize PyBytes_FromStringAndSize static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(char*); #if PY_MAJOR_VERSION < 3 #define __Pyx_PyStr_FromString __Pyx_PyBytes_FromString #define __Pyx_PyStr_FromStringAndSize __Pyx_PyBytes_FromStringAndSize #else #define __Pyx_PyStr_FromString __Pyx_PyUnicode_FromString #define __Pyx_PyStr_FromStringAndSize __Pyx_PyUnicode_FromStringAndSize #endif #define __Pyx_PyObject_AsSString(s) ((signed char*) __Pyx_PyObject_AsString(s)) #define __Pyx_PyObject_AsUString(s) ((unsigned char*) __Pyx_PyObject_AsString(s)) #define __Pyx_PyObject_FromUString(s) __Pyx_PyObject_FromString((char*)s) #define __Pyx_PyBytes_FromUString(s) __Pyx_PyBytes_FromString((char*)s) #define __Pyx_PyByteArray_FromUString(s) __Pyx_PyByteArray_FromString((char*)s) #define __Pyx_PyStr_FromUString(s) __Pyx_PyStr_FromString((char*)s) #define __Pyx_PyUnicode_FromUString(s) __Pyx_PyUnicode_FromString((char*)s) #if PY_MAJOR_VERSION < 3 static CYTHON_INLINE size_t __Pyx_Py_UNICODE_strlen(const Py_UNICODE *u) { const Py_UNICODE *u_end = u; while (*u_end++) ; return u_end - u - 1; } #else #define __Pyx_Py_UNICODE_strlen Py_UNICODE_strlen #endif #define __Pyx_PyUnicode_FromUnicode(u) PyUnicode_FromUnicode(u, __Pyx_Py_UNICODE_strlen(u)) #define __Pyx_PyUnicode_FromUnicodeAndLength PyUnicode_FromUnicode #define __Pyx_PyUnicode_AsUnicode PyUnicode_AsUnicode #define __Pyx_Owned_Py_None(b) (Py_INCREF(Py_None), Py_None) #define __Pyx_PyBool_FromLong(b) ((b) ? (Py_INCREF(Py_True), Py_True) : (Py_INCREF(Py_False), Py_False)) static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*); static CYTHON_INLINE PyObject* __Pyx_PyNumber_Int(PyObject* x); static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*); static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t); #if CYTHON_COMPILING_IN_CPYTHON #define __pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x)) #else #define __pyx_PyFloat_AsDouble(x) PyFloat_AsDouble(x) #endif #define __pyx_PyFloat_AsFloat(x) ((float) __pyx_PyFloat_AsDouble(x)) #if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII static int __Pyx_sys_getdefaultencoding_not_ascii; static int __Pyx_init_sys_getdefaultencoding_params(void) { PyObject* sys = NULL; PyObject* default_encoding = NULL; PyObject* ascii_chars_u = NULL; PyObject* ascii_chars_b = NULL; sys = PyImport_ImportModule("sys"); if (sys == NULL) goto bad; default_encoding = PyObject_CallMethod(sys, (char*) (const char*) "getdefaultencoding", NULL); if (default_encoding == NULL) goto bad; if (strcmp(PyBytes_AsString(default_encoding), "ascii") == 0) { __Pyx_sys_getdefaultencoding_not_ascii = 0; } else { const char* default_encoding_c = PyBytes_AS_STRING(default_encoding); 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 == NULL) goto bad; ascii_chars_b = PyUnicode_AsEncodedString(ascii_chars_u, default_encoding_c, NULL); if (ascii_chars_b == NULL || strncmp(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_XDECREF(sys); Py_XDECREF(default_encoding); Py_XDECREF(ascii_chars_u); Py_XDECREF(ascii_chars_b); return 0; bad: Py_XDECREF(sys); 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 = NULL; PyObject* default_encoding = NULL; char* default_encoding_c; sys = PyImport_ImportModule("sys"); if (sys == NULL) goto bad; default_encoding = PyObject_CallMethod(sys, (char*) (const char*) "getdefaultencoding", NULL); if (default_encoding == NULL) goto bad; default_encoding_c = PyBytes_AS_STRING(default_encoding); __PYX_DEFAULT_STRING_ENCODING = (char*) malloc(strlen(default_encoding_c)); strcpy(__PYX_DEFAULT_STRING_ENCODING, default_encoding_c); Py_DECREF(sys); Py_DECREF(default_encoding); return 0; bad: Py_XDECREF(sys); Py_XDECREF(default_encoding); return -1; } #endif #endif #ifdef __GNUC__ /* Test for GCC > 2.95 */ #if __GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95)) #define likely(x) __builtin_expect(!!(x), 1) #define unlikely(x) __builtin_expect(!!(x), 0) #else /* __GNUC__ > 2 ... */ #define likely(x) (x) #define unlikely(x) (x) #endif /* __GNUC__ > 2 ... */ #else /* __GNUC__ */ #define likely(x) (x) #define unlikely(x) (x) #endif /* __GNUC__ */ static PyObject *__pyx_m; static PyObject *__pyx_d; static PyObject *__pyx_b; static PyObject *__pyx_empty_tuple; static PyObject *__pyx_empty_bytes; static int __pyx_lineno; static int __pyx_clineno = 0; static const char * __pyx_cfilenm= __FILE__; static const char *__pyx_filename; #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[] = { "algos.pyx", "skiplist.pyx", "generated.pyx", "join.pyx", "datetime.pxd", "numpy.pxd", "util.pxd", "type.pxd", "bool.pxd", "complex.pxd", }; #define IS_UNSIGNED(type) (((type) -1) > 0) struct __Pyx_StructField_; #define __PYX_BUF_FLAGS_PACKED_STRUCT (1 << 0) typedef struct { const char* name; /* for error messages only */ struct __Pyx_StructField_* fields; size_t size; /* sizeof(type) */ size_t arraysize[8]; /* length of array in each dimension */ int ndim; char typegroup; /* _R_eal, _C_omplex, Signed _I_nt, _U_nsigned int, _S_truct, _P_ointer, _O_bject, c_H_ar */ 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; /* "numpy.pxd":726 * # 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; /* "numpy.pxd":727 * * 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; /* "numpy.pxd":728 * 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; /* "numpy.pxd":729 * 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; /* "numpy.pxd":733 * #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; /* "numpy.pxd":734 * * 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; /* "numpy.pxd":735 * 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; /* "numpy.pxd":736 * 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; /* "numpy.pxd":740 * #ctypedef npy_uint128 uint128_t * * ctypedef npy_float16 float16_t # <<<<<<<<<<<<<< * ctypedef npy_float32 float32_t * ctypedef npy_float64 float64_t */ typedef npy_float16 __pyx_t_5numpy_float16_t; /* "numpy.pxd":741 * * ctypedef npy_float16 float16_t * ctypedef npy_float32 float32_t # <<<<<<<<<<<<<< * ctypedef npy_float64 float64_t * #ctypedef npy_float80 float80_t */ typedef npy_float32 __pyx_t_5numpy_float32_t; /* "numpy.pxd":742 * ctypedef npy_float16 float16_t * 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; /* "numpy.pxd":751 * # 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; /* "numpy.pxd":752 * # 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; /* "numpy.pxd":753 * 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; /* "numpy.pxd":755 * 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; /* "numpy.pxd":756 * * ctypedef npy_ulong uint_t * ctypedef npy_ulonglong ulong_t # <<<<<<<<<<<<<< * ctypedef npy_ulonglong ulonglong_t * */ typedef npy_ulonglong __pyx_t_5numpy_ulong_t; /* "numpy.pxd":757 * 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; /* "numpy.pxd":759 * ctypedef npy_ulonglong ulonglong_t * * ctypedef npy_intp intp_t # <<<<<<<<<<<<<< * ctypedef npy_uintp uintp_t * */ typedef npy_intp __pyx_t_5numpy_intp_t; /* "numpy.pxd":760 * * ctypedef npy_intp intp_t * ctypedef npy_uintp uintp_t # <<<<<<<<<<<<<< * * ctypedef npy_double float_t */ typedef npy_uintp __pyx_t_5numpy_uintp_t; /* "numpy.pxd":762 * 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; /* "numpy.pxd":763 * * ctypedef npy_double float_t * ctypedef npy_double double_t # <<<<<<<<<<<<<< * ctypedef npy_longdouble longdouble_t * */ typedef npy_double __pyx_t_5numpy_double_t; /* "numpy.pxd":764 * 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; /* "pandas/src/generated.pyx":27 * from khash cimport * * * ctypedef unsigned char UChar # <<<<<<<<<<<<<< * * cimport util */ typedef unsigned char __pyx_t_6pandas_5algos_UChar; #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 #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 /*--- Type declarations ---*/ struct __pyx_obj_6pandas_5algos_Node; struct __pyx_obj_6pandas_5algos_IndexableSkiplist; /* "numpy.pxd":766 * 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; /* "numpy.pxd":767 * * ctypedef npy_cfloat cfloat_t * ctypedef npy_cdouble cdouble_t # <<<<<<<<<<<<<< * ctypedef npy_clongdouble clongdouble_t * */ typedef npy_cdouble __pyx_t_5numpy_cdouble_t; /* "numpy.pxd":768 * 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; /* "numpy.pxd":770 * ctypedef npy_clongdouble clongdouble_t * * ctypedef npy_cdouble complex_t # <<<<<<<<<<<<<< * * cdef inline object PyArray_MultiIterNew1(a): */ typedef npy_cdouble __pyx_t_5numpy_complex_t; struct __pyx_t_6pandas_5algos_pairs; /* "pandas/algos.pyx":1259 * # Rolling median, min, max * * ctypedef double_t (* skiplist_f)(object sl, int n, int p) # <<<<<<<<<<<<<< * * cdef _roll_skiplist_op(ndarray arg, int win, int minp, skiplist_f op): */ typedef __pyx_t_5numpy_double_t (*__pyx_t_6pandas_5algos_skiplist_f)(PyObject *, int, int); /* "pandas/algos.pyx":1387 * # https://github.com/kwgoodman/bottleneck * * cdef struct pairs: # <<<<<<<<<<<<<< * double value * int death */ struct __pyx_t_6pandas_5algos_pairs { double value; int death; }; /* "pandas/src/skiplist.pyx":32 * # TODO: optimize this, make less messy * * cdef class Node: # <<<<<<<<<<<<<< * cdef public: * double_t value */ struct __pyx_obj_6pandas_5algos_Node { PyObject_HEAD __pyx_t_5numpy_double_t value; PyObject *next; PyObject *width; }; /* "pandas/src/skiplist.pyx":46 * NIL = Node(np.inf, [], []) * * cdef class IndexableSkiplist: # <<<<<<<<<<<<<< * ''' * Sorted collection supporting O(lg n) insertion, removal, and */ struct __pyx_obj_6pandas_5algos_IndexableSkiplist { PyObject_HEAD struct __pyx_vtabstruct_6pandas_5algos_IndexableSkiplist *__pyx_vtab; Py_ssize_t size; Py_ssize_t maxlevels; struct __pyx_obj_6pandas_5algos_Node *head; }; struct __pyx_vtabstruct_6pandas_5algos_IndexableSkiplist { PyObject *(*get)(struct __pyx_obj_6pandas_5algos_IndexableSkiplist *, Py_ssize_t, int __pyx_skip_dispatch); PyObject *(*insert)(struct __pyx_obj_6pandas_5algos_IndexableSkiplist *, double, int __pyx_skip_dispatch); PyObject *(*remove)(struct __pyx_obj_6pandas_5algos_IndexableSkiplist *, double, int __pyx_skip_dispatch); }; static struct __pyx_vtabstruct_6pandas_5algos_IndexableSkiplist *__pyx_vtabptr_6pandas_5algos_IndexableSkiplist; #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); /*proto*/ #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 /* CYTHON_REFNANNY */ #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) #if CYTHON_COMPILING_IN_CPYTHON static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name) { PyTypeObject* tp = Py_TYPE(obj); if (likely(tp->tp_getattro)) return tp->tp_getattro(obj, attr_name); #if PY_MAJOR_VERSION < 3 if (likely(tp->tp_getattr)) return tp->tp_getattr(obj, PyString_AS_STRING(attr_name)); #endif return PyObject_GetAttr(obj, attr_name); } #else #define __Pyx_PyObject_GetAttrStr(o,n) PyObject_GetAttr(o,n) #endif static PyObject *__Pyx_GetBuiltinName(PyObject *name); /*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); /*proto*/ static void __Pyx_RaiseDoubleKeywordsError(const char* func_name, PyObject* kw_name); /*proto*/ static int __Pyx_ParseOptionalKeywords(PyObject *kwds, PyObject **argnames[], \ PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args, \ const char* function_name); /*proto*/ #ifndef __PYX_FORCE_INIT_THREADS #define __PYX_FORCE_INIT_THREADS 0 #endif static CYTHON_INLINE void __Pyx_ErrRestore(PyObject *type, PyObject *value, PyObject *tb); /*proto*/ static CYTHON_INLINE void __Pyx_ErrFetch(PyObject **type, PyObject **value, PyObject **tb); /*proto*/ static void __Pyx_WriteUnraisable(const char *name, int clineno, int lineno, const char *filename, int full_traceback); /*proto*/ static CYTHON_INLINE int __Pyx_ArgTypeTest(PyObject *obj, PyTypeObject *type, int none_allowed, const char *name, int exact); /*proto*/ static CYTHON_INLINE PyObject *__Pyx_GetModuleGlobalName(PyObject *name); /*proto*/ #define __Pyx_GetItemInt(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck) \ (__Pyx_fits_Py_ssize_t(i, type, is_signed) ? \ __Pyx_GetItemInt_Fast(o, (Py_ssize_t)i, is_list, wraparound, boundscheck) : \ (is_list ? (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL) : \ __Pyx_GetItemInt_Generic(o, to_py_func(i)))) #define __Pyx_GetItemInt_List(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck) \ (__Pyx_fits_Py_ssize_t(i, type, is_signed) ? \ __Pyx_GetItemInt_List_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) : \ (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL)) static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i, int wraparound, int boundscheck); #define __Pyx_GetItemInt_Tuple(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck) \ (__Pyx_fits_Py_ssize_t(i, type, is_signed) ? \ __Pyx_GetItemInt_Tuple_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) : \ (PyErr_SetString(PyExc_IndexError, "tuple index out of range"), (PyObject*)NULL)) static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i, int wraparound, int boundscheck); static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j); static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, int is_list, int wraparound, int boundscheck); static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type); /*proto*/ #define __Pyx_SetItemInt(o, i, v, type, is_signed, to_py_func, is_list, wraparound, boundscheck) \ (__Pyx_fits_Py_ssize_t(i, type, is_signed) ? \ __Pyx_SetItemInt_Fast(o, (Py_ssize_t)i, v, is_list, wraparound, boundscheck) : \ (is_list ? (PyErr_SetString(PyExc_IndexError, "list assignment index out of range"), -1) : \ __Pyx_SetItemInt_Generic(o, to_py_func(i), v))) static CYTHON_INLINE int __Pyx_SetItemInt_Generic(PyObject *o, PyObject *j, PyObject *v); static CYTHON_INLINE int __Pyx_SetItemInt_Fast(PyObject *o, Py_ssize_t i, PyObject *v, int is_list, int wraparound, int boundscheck); static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause); /*proto*/ static CYTHON_INLINE int __Pyx_GetBufferAndValidate(Py_buffer* buf, PyObject* obj, __Pyx_TypeInfo* dtype, int flags, int nd, int cast, __Pyx_BufFmt_StackElem* stack); static CYTHON_INLINE void __Pyx_SafeReleaseBuffer(Py_buffer* info); static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected); static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index); static CYTHON_INLINE int __Pyx_IterFinish(void); /*proto*/ static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected); /*proto*/ static void __Pyx_RaiseBufferFallbackError(void); /*proto*/ static void __Pyx_RaiseBufferIndexError(int axis); /*proto*/ #define __Pyx_BufPtrStrided2d(type, buf, i0, s0, i1, s1) (type)((char*)buf + i0 * s0 + i1 * s1) #define __Pyx_BufPtrStrided1d(type, buf, i0, s0) (type)((char*)buf + i0 * s0) static CYTHON_INLINE void __Pyx_ExceptionSave(PyObject **type, PyObject **value, PyObject **tb); /*proto*/ static void __Pyx_ExceptionReset(PyObject *type, PyObject *value, PyObject *tb); /*proto*/ static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb); /*proto*/ static CYTHON_INLINE long __Pyx_mod_long(long, long); /* proto */ static CYTHON_INLINE long __Pyx_div_long(long, long); /* proto */ static CYTHON_INLINE Py_ssize_t __Pyx_div_Py_ssize_t(Py_ssize_t, Py_ssize_t); /* proto */ static CYTHON_INLINE Py_ssize_t __Pyx_mod_Py_ssize_t(Py_ssize_t, Py_ssize_t); /* proto */ static CYTHON_INLINE PyObject* __Pyx_PyObject_GetSlice( PyObject* obj, Py_ssize_t cstart, Py_ssize_t cstop, PyObject** py_start, PyObject** py_stop, PyObject** py_slice, int has_cstart, int has_cstop, int wraparound); #if PY_MAJOR_VERSION >= 3 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; } #else #define __Pyx_PyDict_GetItem(d, key) PyObject_GetItem(d, key) #endif static CYTHON_INLINE int __Pyx_PyDict_Contains(PyObject* item, PyObject* dict, int eq) { int result = PyDict_Contains(dict, item); return unlikely(result < 0) ? result : (result == (eq == Py_EQ)); } #define __Pyx_PyObject_DelSlice(obj, cstart, cstop, py_start, py_stop, py_slice, has_cstart, has_cstop, wraparound) \ __Pyx_PyObject_SetSlice(obj, (PyObject*)NULL, cstart, cstop, py_start, py_stop, py_slice, has_cstart, has_cstop, wraparound) static CYTHON_INLINE int __Pyx_PyObject_SetSlice( PyObject* obj, PyObject* value, Py_ssize_t cstart, Py_ssize_t cstop, PyObject** py_start, PyObject** py_stop, PyObject** py_slice, int has_cstart, int has_cstop, int wraparound); #if CYTHON_COMPILING_IN_CPYTHON static CYTHON_INLINE int __Pyx_PyList_Append(PyObject* list, PyObject* x) { PyListObject* L = (PyListObject*) list; Py_ssize_t len = Py_SIZE(list); if (likely(L->allocated > len) & likely(len > (L->allocated >> 1))) { Py_INCREF(x); PyList_SET_ITEM(list, len, x); Py_SIZE(list) = len+1; return 0; } return PyList_Append(list, x); } #else #define __Pyx_PyList_Append(L,x) PyList_Append(L,x) #endif static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name); /*proto*/ static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void); static int __Pyx_SetVtable(PyObject *dict, void *vtable); /*proto*/ static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type); #define __Pyx_CyFunction_USED 1 #include #define __Pyx_CYFUNCTION_STATICMETHOD 0x01 #define __Pyx_CYFUNCTION_CLASSMETHOD 0x02 #define __Pyx_CYFUNCTION_CCLASS 0x04 #define __Pyx_CyFunction_GetClosure(f) \ (((__pyx_CyFunctionObject *) (f))->func_closure) #define __Pyx_CyFunction_GetClassObj(f) \ (((__pyx_CyFunctionObject *) (f))->func_classobj) #define __Pyx_CyFunction_Defaults(type, f) \ ((type *)(((__pyx_CyFunctionObject *) (f))->defaults)) #define __Pyx_CyFunction_SetDefaultsGetter(f, g) \ ((__pyx_CyFunctionObject *) (f))->defaults_getter = (g) typedef struct { PyCFunctionObject func; int flags; PyObject *func_dict; PyObject *func_weakreflist; PyObject *func_name; PyObject *func_qualname; PyObject *func_doc; PyObject *func_globals; PyObject *func_code; PyObject *func_closure; PyObject *func_classobj; /* No-args super() class cell */ void *defaults; int defaults_pyobjects; PyObject *defaults_tuple; /* Const defaults tuple */ PyObject *defaults_kwdict; /* Const kwonly defaults dict */ PyObject *(*defaults_getter)(PyObject *); PyObject *func_annotations; /* function annotations dict */ } __pyx_CyFunctionObject; static PyTypeObject *__pyx_CyFunctionType = 0; #define __Pyx_CyFunction_NewEx(ml, flags, qualname, self, module, globals, code) \ __Pyx_CyFunction_New(__pyx_CyFunctionType, ml, flags, qualname, self, module, globals, code) static PyObject *__Pyx_CyFunction_New(PyTypeObject *, PyMethodDef *ml, int flags, PyObject* qualname, PyObject *self, PyObject *module, PyObject *globals, PyObject* code); static CYTHON_INLINE void *__Pyx_CyFunction_InitDefaults(PyObject *m, size_t size, int pyobjects); static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *m, PyObject *tuple); static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *m, PyObject *dict); static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *m, PyObject *dict); static int __Pyx_CyFunction_init(void); static PyObject *__Pyx_CalculateMetaclass(PyTypeObject *metaclass, PyObject *bases); static PyObject *__Pyx_Py3MetaclassPrepare(PyObject *metaclass, PyObject *bases, PyObject *name, PyObject *qualname, PyObject *mkw, PyObject *modname, PyObject *doc); /*proto*/ static PyObject *__Pyx_Py3ClassCreate(PyObject *metaclass, PyObject *name, PyObject *bases, PyObject *dict, PyObject *mkw, int calculate_metaclass, int allow_py2_metaclass); /*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 static Py_ssize_t __Pyx_zeros[] = {0, 0, 0, 0, 0, 0, 0, 0}; static Py_ssize_t __Pyx_minusones[] = {-1, -1, -1, -1, -1, -1, -1, -1}; static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level); /*proto*/ static CYTHON_INLINE npy_int8 __Pyx_PyInt_As_npy_int8(PyObject *); static CYTHON_INLINE npy_int16 __Pyx_PyInt_As_npy_int16(PyObject *); static CYTHON_INLINE npy_int32 __Pyx_PyInt_As_npy_int32(PyObject *); static CYTHON_INLINE npy_int64 __Pyx_PyInt_As_npy_int64(PyObject *); static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value); static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *); static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value); static CYTHON_INLINE PyObject* __Pyx_PyInt_From_npy_int64(npy_int64 value); static CYTHON_INLINE PyObject* __Pyx_PyInt_From_npy_int32(npy_int32 value); static CYTHON_INLINE PyObject* __Pyx_PyInt_From_npy_uint8(npy_uint8 value); static CYTHON_INLINE npy_uint8 __Pyx_PyInt_As_npy_uint8(PyObject *); #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(_WIN32) || defined(__clang__)) && defined(__cplusplus) && CYTHON_CCOMPLEX #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 static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float, float); #if CYTHON_CCOMPLEX #define __Pyx_c_eqf(a, b) ((a)==(b)) #define __Pyx_c_sumf(a, b) ((a)+(b)) #define __Pyx_c_difff(a, b) ((a)-(b)) #define __Pyx_c_prodf(a, b) ((a)*(b)) #define __Pyx_c_quotf(a, b) ((a)/(b)) #define __Pyx_c_negf(a) (-(a)) #ifdef __cplusplus #define __Pyx_c_is_zerof(z) ((z)==(float)0) #define __Pyx_c_conjf(z) (::std::conj(z)) #if 1 #define __Pyx_c_absf(z) (::std::abs(z)) #define __Pyx_c_powf(a, b) (::std::pow(a, b)) #endif #else #define __Pyx_c_is_zerof(z) ((z)==0) #define __Pyx_c_conjf(z) (conjf(z)) #if 1 #define __Pyx_c_absf(z) (cabsf(z)) #define __Pyx_c_powf(a, b) (cpowf(a, b)) #endif #endif #else static CYTHON_INLINE int __Pyx_c_eqf(__pyx_t_float_complex, __pyx_t_float_complex); static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_sumf(__pyx_t_float_complex, __pyx_t_float_complex); static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_difff(__pyx_t_float_complex, __pyx_t_float_complex); static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_prodf(__pyx_t_float_complex, __pyx_t_float_complex); static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_quotf(__pyx_t_float_complex, __pyx_t_float_complex); static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_negf(__pyx_t_float_complex); static CYTHON_INLINE int __Pyx_c_is_zerof(__pyx_t_float_complex); static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_conjf(__pyx_t_float_complex); #if 1 static CYTHON_INLINE float __Pyx_c_absf(__pyx_t_float_complex); static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_powf(__pyx_t_float_complex, __pyx_t_float_complex); #endif #endif static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double, double); #if CYTHON_CCOMPLEX #define __Pyx_c_eq(a, b) ((a)==(b)) #define __Pyx_c_sum(a, b) ((a)+(b)) #define __Pyx_c_diff(a, b) ((a)-(b)) #define __Pyx_c_prod(a, b) ((a)*(b)) #define __Pyx_c_quot(a, b) ((a)/(b)) #define __Pyx_c_neg(a) (-(a)) #ifdef __cplusplus #define __Pyx_c_is_zero(z) ((z)==(double)0) #define __Pyx_c_conj(z) (::std::conj(z)) #if 1 #define __Pyx_c_abs(z) (::std::abs(z)) #define __Pyx_c_pow(a, b) (::std::pow(a, b)) #endif #else #define __Pyx_c_is_zero(z) ((z)==0) #define __Pyx_c_conj(z) (conj(z)) #if 1 #define __Pyx_c_abs(z) (cabs(z)) #define __Pyx_c_pow(a, b) (cpow(a, b)) #endif #endif #else static CYTHON_INLINE int __Pyx_c_eq(__pyx_t_double_complex, __pyx_t_double_complex); static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_sum(__pyx_t_double_complex, __pyx_t_double_complex); static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_diff(__pyx_t_double_complex, __pyx_t_double_complex); static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_prod(__pyx_t_double_complex, __pyx_t_double_complex); static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_quot(__pyx_t_double_complex, __pyx_t_double_complex); static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_neg(__pyx_t_double_complex); static CYTHON_INLINE int __Pyx_c_is_zero(__pyx_t_double_complex); static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_conj(__pyx_t_double_complex); #if 1 static CYTHON_INLINE double __Pyx_c_abs(__pyx_t_double_complex); static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_pow(__pyx_t_double_complex, __pyx_t_double_complex); #endif #endif static CYTHON_INLINE PyObject* __Pyx_PyInt_From_ptrdiff_t(ptrdiff_t value); static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *); static int __Pyx_check_binary_version(void); #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 static PyObject *__Pyx_ImportModule(const char *name); /*proto*/ static PyTypeObject *__Pyx_ImportType(const char *module_name, const char *class_name, size_t size, int strict); /*proto*/ typedef struct { int code_line; PyCodeObject* code_object; } __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); static void __Pyx_AddTraceback(const char *funcname, int c_line, int py_line, const char *filename); /*proto*/ static int __Pyx_InitStrings(__Pyx_StringTabEntry *t); /*proto*/ /* Module declarations from 'cpython.buffer' */ /* Module declarations from 'cpython.ref' */ /* Module declarations from 'libc.string' */ /* Module declarations from 'libc.stdio' */ /* Module declarations from 'cpython.object' */ /* Module declarations from 'libc.stdlib' */ /* 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*/ /* Module declarations from 'cython' */ /* Module declarations from 'cpython.version' */ /* Module declarations from 'cpython.exc' */ /* Module declarations from 'cpython.module' */ /* Module declarations from 'cpython.mem' */ /* Module declarations from 'cpython.tuple' */ /* Module declarations from 'cpython.list' */ /* Module declarations from 'cpython.sequence' */ /* Module declarations from 'cpython.mapping' */ /* Module declarations from 'cpython.iterator' */ /* Module declarations from '__builtin__' */ /* Module declarations from 'cpython.type' */ static PyTypeObject *__pyx_ptype_7cpython_4type_type = 0; /* Module declarations from 'cpython.number' */ /* Module declarations from 'cpython.int' */ /* Module declarations from '__builtin__' */ /* Module declarations from 'cpython.bool' */ static PyTypeObject *__pyx_ptype_7cpython_4bool_bool = 0; /* Module declarations from 'cpython.long' */ /* Module declarations from 'cpython.float' */ /* Module declarations from '__builtin__' */ /* Module declarations from 'cpython.complex' */ static PyTypeObject *__pyx_ptype_7cpython_7complex_complex = 0; /* Module declarations from 'cpython.string' */ /* Module declarations from 'cpython.unicode' */ /* Module declarations from 'cpython.dict' */ /* Module declarations from 'cpython.instance' */ /* Module declarations from 'cpython.function' */ /* Module declarations from 'cpython.method' */ /* Module declarations from 'cpython.weakref' */ /* Module declarations from 'cpython.getargs' */ /* Module declarations from 'cpython.pythread' */ /* Module declarations from 'cpython.pystate' */ /* Module declarations from 'cpython.cobject' */ /* Module declarations from 'cpython.oldbuffer' */ /* Module declarations from 'cpython.set' */ /* Module declarations from 'cpython.bytes' */ /* Module declarations from 'cpython.pycapsule' */ /* Module declarations from 'cpython' */ /* Module declarations from 'util' */ static CYTHON_INLINE PyObject *__pyx_f_4util_get_value_at(PyArrayObject *, PyObject *); /*proto*/ static CYTHON_INLINE PyObject *__pyx_f_4util_is_array(PyObject *); /*proto*/ static CYTHON_INLINE int __pyx_f_4util__checknull(PyObject *); /*proto*/ static CYTHON_INLINE int __pyx_f_4util__checknan(PyObject *); /*proto*/ /* Module declarations from 'skiplist' */ /* Module declarations from 'libc' */ /* Module declarations from 'datetime' */ /* Module declarations from 'datetime' */ static PyTypeObject *__pyx_ptype_8datetime_date = 0; static PyTypeObject *__pyx_ptype_8datetime_datetime = 0; static PyTypeObject *__pyx_ptype_8datetime_timedelta = 0; static CYTHON_INLINE int __pyx_f_8datetime__cstring_to_dts(char *, int, pandas_datetimestruct *); /*proto*/ static CYTHON_INLINE PyObject *__pyx_f_8datetime__dts_to_pydatetime(pandas_datetimestruct *); /*proto*/ /* Module declarations from 'khash' */ /* Module declarations from 'pandas.algos' */ static PyTypeObject *__pyx_ptype_6pandas_5algos_Node = 0; static PyTypeObject *__pyx_ptype_6pandas_5algos_IndexableSkiplist = 0; static __pyx_t_5numpy_float64_t __pyx_v_6pandas_5algos_FP_ERR; static __pyx_t_5numpy_int8_t __pyx_v_6pandas_5algos_MINint8; static __pyx_t_5numpy_int16_t __pyx_v_6pandas_5algos_MINint16; static __pyx_t_5numpy_int32_t __pyx_v_6pandas_5algos_MINint32; static __pyx_t_5numpy_int64_t __pyx_v_6pandas_5algos_MINint64; static __pyx_t_5numpy_float16_t __pyx_v_6pandas_5algos_MINfloat16; static __pyx_t_5numpy_float32_t __pyx_v_6pandas_5algos_MINfloat32; static __pyx_t_5numpy_float64_t __pyx_v_6pandas_5algos_MINfloat64; static __pyx_t_5numpy_int8_t __pyx_v_6pandas_5algos_MAXint8; static __pyx_t_5numpy_int16_t __pyx_v_6pandas_5algos_MAXint16; static __pyx_t_5numpy_int32_t __pyx_v_6pandas_5algos_MAXint32; static __pyx_t_5numpy_int64_t __pyx_v_6pandas_5algos_MAXint64; static __pyx_t_5numpy_float16_t __pyx_v_6pandas_5algos_MAXfloat16; static __pyx_t_5numpy_float32_t __pyx_v_6pandas_5algos_MAXfloat32; static __pyx_t_5numpy_float64_t __pyx_v_6pandas_5algos_MAXfloat64; static double __pyx_v_6pandas_5algos_NaN; static double __pyx_v_6pandas_5algos_nan; static int __pyx_v_6pandas_5algos_TIEBREAK_AVERAGE; static int __pyx_v_6pandas_5algos_TIEBREAK_MIN; static int __pyx_v_6pandas_5algos_TIEBREAK_MAX; static int __pyx_v_6pandas_5algos_TIEBREAK_FIRST; static int __pyx_v_6pandas_5algos_TIEBREAK_FIRST_DESCENDING; static int __pyx_v_6pandas_5algos_PLATFORM_INT; static CYTHON_INLINE int __pyx_f_6pandas_5algos_int_max(int, int); /*proto*/ static CYTHON_INLINE int __pyx_f_6pandas_5algos_int_min(int, int); /*proto*/ static double __pyx_f_6pandas_5algos_Log2(double); /*proto*/ static PyObject *__pyx_f_6pandas_5algos__take_2d_float64(PyArrayObject *, PyObject *); /*proto*/ static PyObject *__pyx_f_6pandas_5algos__take_2d_int64(PyArrayObject *, PyObject *); /*proto*/ static PyObject *__pyx_f_6pandas_5algos__take_2d_object(PyArrayObject *, PyObject *); /*proto*/ static CYTHON_INLINE PyObject *__pyx_f_6pandas_5algos_are_diff(PyObject *, PyObject *); /*proto*/ static CYTHON_INLINE PyObject *__pyx_f_6pandas_5algos_kth_smallest_c(__pyx_t_5numpy_float64_t *, Py_ssize_t, Py_ssize_t); /*proto*/ static PyObject *__pyx_f_6pandas_5algos__roll_skiplist_op(PyArrayObject *, int, int, __pyx_t_6pandas_5algos_skiplist_f); /*proto*/ static __pyx_t_5numpy_double_t __pyx_f_6pandas_5algos__get_median(PyObject *, int, int); /*proto*/ static __pyx_t_5numpy_double_t __pyx_f_6pandas_5algos__get_max(PyObject *, int, int); /*proto*/ static __pyx_t_5numpy_double_t __pyx_f_6pandas_5algos__get_min(PyObject *, int, int); /*proto*/ static CYTHON_INLINE __pyx_t_5numpy_float64_t __pyx_f_6pandas_5algos__median_linear(__pyx_t_5numpy_float64_t *, int); /*proto*/ static PyObject *__pyx_f_6pandas_5algos_ensure_platform_int(PyObject *, int __pyx_skip_dispatch); /*proto*/ static PyObject *__pyx_f_6pandas_5algos_ensure_float64(PyObject *, int __pyx_skip_dispatch); /*proto*/ static PyObject *__pyx_f_6pandas_5algos_ensure_float32(PyObject *, int __pyx_skip_dispatch); /*proto*/ static PyObject *__pyx_f_6pandas_5algos_ensure_int8(PyObject *, int __pyx_skip_dispatch); /*proto*/ static PyObject *__pyx_f_6pandas_5algos_ensure_int16(PyObject *, int __pyx_skip_dispatch); /*proto*/ static PyObject *__pyx_f_6pandas_5algos_ensure_int32(PyObject *, int __pyx_skip_dispatch); /*proto*/ static PyObject *__pyx_f_6pandas_5algos_ensure_int64(PyObject *, int __pyx_skip_dispatch); /*proto*/ static PyObject *__pyx_f_6pandas_5algos_ensure_object(PyObject *, int __pyx_skip_dispatch); /*proto*/ static PyObject *__pyx_f_6pandas_5algos_map_indices_float64(PyArrayObject *, int __pyx_skip_dispatch); /*proto*/ static PyObject *__pyx_f_6pandas_5algos_map_indices_float32(PyArrayObject *, int __pyx_skip_dispatch); /*proto*/ static PyObject *__pyx_f_6pandas_5algos_map_indices_object(PyArrayObject *, int __pyx_skip_dispatch); /*proto*/ static PyObject *__pyx_f_6pandas_5algos_map_indices_int32(PyArrayObject *, int __pyx_skip_dispatch); /*proto*/ static PyObject *__pyx_f_6pandas_5algos_map_indices_int64(PyArrayObject *, int __pyx_skip_dispatch); /*proto*/ static PyObject *__pyx_f_6pandas_5algos_map_indices_bool(PyArrayObject *, int __pyx_skip_dispatch); /*proto*/ 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_Py_ssize_t = { "Py_ssize_t", NULL, sizeof(Py_ssize_t), { 0 }, 0, IS_UNSIGNED(Py_ssize_t) ? 'U' : 'I', IS_UNSIGNED(Py_ssize_t), 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_double_t = { "double_t", NULL, sizeof(__pyx_t_5numpy_double_t), { 0 }, 0, 'R', 0, 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_float32_t = { "float32_t", NULL, sizeof(__pyx_t_5numpy_float32_t), { 0 }, 0, 'R', 0, 0 }; 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_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 }; static __Pyx_TypeInfo __Pyx_TypeInfo_nn___pyx_t_5numpy_int16_t = { "int16_t", NULL, sizeof(__pyx_t_5numpy_int16_t), { 0 }, 0, IS_UNSIGNED(__pyx_t_5numpy_int16_t) ? 'U' : 'I', IS_UNSIGNED(__pyx_t_5numpy_int16_t), 0 }; #define __Pyx_MODULE_NAME "pandas.algos" int __pyx_module_is_main_pandas__algos = 0; /* Implementation of 'pandas.algos' */ static PyObject *__pyx_builtin_object; static PyObject *__pyx_builtin_range; static PyObject *__pyx_builtin_KeyError; static PyObject *__pyx_builtin_TypeError; static PyObject *__pyx_builtin_ValueError; static PyObject *__pyx_builtin_AssertionError; static PyObject *__pyx_builtin_NotImplementedError; static PyObject *__pyx_builtin_RuntimeError; static PyObject *__pyx_builtin_IndexError; static PyObject *__pyx_lambda_funcdef_6pandas_5algos_lambda1(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_other); /* proto */ static PyObject *__pyx_lambda_funcdef_6pandas_5algos_lambda2(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_other); /* proto */ static int __pyx_pf_6pandas_5algos_4Node___init__(struct __pyx_obj_6pandas_5algos_Node *__pyx_v_self, __pyx_t_5numpy_double_t __pyx_v_value, PyObject *__pyx_v_next, PyObject *__pyx_v_width); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_4Node_5value___get__(struct __pyx_obj_6pandas_5algos_Node *__pyx_v_self); /* proto */ static int __pyx_pf_6pandas_5algos_4Node_5value_2__set__(struct __pyx_obj_6pandas_5algos_Node *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_4Node_4next___get__(struct __pyx_obj_6pandas_5algos_Node *__pyx_v_self); /* proto */ static int __pyx_pf_6pandas_5algos_4Node_4next_2__set__(struct __pyx_obj_6pandas_5algos_Node *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ static int __pyx_pf_6pandas_5algos_4Node_4next_4__del__(struct __pyx_obj_6pandas_5algos_Node *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_4Node_5width___get__(struct __pyx_obj_6pandas_5algos_Node *__pyx_v_self); /* proto */ static int __pyx_pf_6pandas_5algos_4Node_5width_2__set__(struct __pyx_obj_6pandas_5algos_Node *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ static int __pyx_pf_6pandas_5algos_4Node_5width_4__del__(struct __pyx_obj_6pandas_5algos_Node *__pyx_v_self); /* proto */ static int __pyx_pf_6pandas_5algos_17IndexableSkiplist___init__(struct __pyx_obj_6pandas_5algos_IndexableSkiplist *__pyx_v_self, PyObject *__pyx_v_expected_size); /* proto */ static Py_ssize_t __pyx_pf_6pandas_5algos_17IndexableSkiplist_2__len__(struct __pyx_obj_6pandas_5algos_IndexableSkiplist *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_17IndexableSkiplist_4__getitem__(struct __pyx_obj_6pandas_5algos_IndexableSkiplist *__pyx_v_self, PyObject *__pyx_v_i); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_17IndexableSkiplist_6get(struct __pyx_obj_6pandas_5algos_IndexableSkiplist *__pyx_v_self, Py_ssize_t __pyx_v_i); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_17IndexableSkiplist_8insert(struct __pyx_obj_6pandas_5algos_IndexableSkiplist *__pyx_v_self, double __pyx_v_value); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_17IndexableSkiplist_10remove(struct __pyx_obj_6pandas_5algos_IndexableSkiplist *__pyx_v_self, double __pyx_v_value); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_rank_1d_float64(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_in_arr, PyObject *__pyx_v_ties_method, PyObject *__pyx_v_ascending, PyObject *__pyx_v_na_option); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_2rank_1d_int64(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_in_arr, PyObject *__pyx_v_ties_method, PyObject *__pyx_v_ascending, CYTHON_UNUSED PyObject *__pyx_v_na_option); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_4rank_2d_float64(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_in_arr, PyObject *__pyx_v_axis, PyObject *__pyx_v_ties_method, PyObject *__pyx_v_ascending, PyObject *__pyx_v_na_option); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_6rank_2d_int64(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_in_arr, PyObject *__pyx_v_axis, PyObject *__pyx_v_ties_method, PyObject *__pyx_v_ascending, CYTHON_UNUSED PyObject *__pyx_v_na_option); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_8rank_1d_generic(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_in_arr, int __pyx_v_retry, PyObject *__pyx_v_ties_method, PyObject *__pyx_v_ascending, PyObject *__pyx_v_na_option); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_10rank_2d_generic(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_in_arr, PyObject *__pyx_v_axis, PyObject *__pyx_v_ties_method, PyObject *__pyx_v_ascending, PyObject *__pyx_v_na_option); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_12_check_minp(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_win, PyObject *__pyx_v_minp, PyObject *__pyx_v_N); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_14kth_smallest(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_a, Py_ssize_t __pyx_v_k); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_16median(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_arr); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_18max_subseq(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_arr); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_20min_subseq(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_arr); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_22roll_sum(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_input, int __pyx_v_win, int __pyx_v_minp); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_24roll_mean(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_input, int __pyx_v_win, int __pyx_v_minp); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_26ewma(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_input, __pyx_t_5numpy_double_t __pyx_v_com, int __pyx_v_adjust); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_28nancorr(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_mat, PyObject *__pyx_v_cov, PyObject *__pyx_v_minp); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_30nancorr_spearman(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_mat, Py_ssize_t __pyx_v_minp); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_32roll_var(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_input, int __pyx_v_win, int __pyx_v_minp, int __pyx_v_ddof); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_34roll_skew(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_input, int __pyx_v_win, int __pyx_v_minp); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_36roll_kurt(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_input, int __pyx_v_win, int __pyx_v_minp); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_38roll_median_c(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_arg, int __pyx_v_win, int __pyx_v_minp); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_40roll_median_cython(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_input, int __pyx_v_win, int __pyx_v_minp); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_42roll_max2(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_a, int __pyx_v_window, int __pyx_v_minp); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_44roll_max(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_input, int __pyx_v_win, int __pyx_v_minp); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_46roll_min(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_input, int __pyx_v_win, int __pyx_v_minp); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_48roll_min2(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_a, int __pyx_v_window, int __pyx_v_minp); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_50roll_quantile(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_input, int __pyx_v_win, int __pyx_v_minp, double __pyx_v_quantile); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_52roll_generic(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_input, int __pyx_v_win, int __pyx_v_minp, PyObject *__pyx_v_func); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_54roll_window(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_input, PyArrayObject *__pyx_v_weights, int __pyx_v_minp, int __pyx_v_avg, int __pyx_v_avg_wgt); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_56is_lexsorted(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_list_of_arrays); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_58groupby_indices(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_60group_labels(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_62groupsort_indexer(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_index, Py_ssize_t __pyx_v_ngroups); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_64group_nth_object(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_out, PyArrayObject *__pyx_v_counts, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_labels, __pyx_t_5numpy_int64_t __pyx_v_rank); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_66group_nth_bin_object(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_out, PyArrayObject *__pyx_v_counts, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_bins, __pyx_t_5numpy_int64_t __pyx_v_rank); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_68group_last_object(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_out, PyArrayObject *__pyx_v_counts, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_labels); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_70group_last_bin_object(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_out, PyArrayObject *__pyx_v_counts, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_bins); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_72group_median(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_out, PyArrayObject *__pyx_v_counts, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_labels); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_74inner_join(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_left, PyArrayObject *__pyx_v_right, Py_ssize_t __pyx_v_max_groups); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_76left_outer_join(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_left, PyArrayObject *__pyx_v_right, Py_ssize_t __pyx_v_max_groups, PyObject *__pyx_v_sort); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_78full_outer_join(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_left, PyArrayObject *__pyx_v_right, Py_ssize_t __pyx_v_max_groups); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_80_get_result_indexer(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_sorter, PyObject *__pyx_v_indexer); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_82ffill_indexer(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_indexer); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_84ffill_by_group(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_indexer, PyArrayObject *__pyx_v_group_ids, __pyx_t_5numpy_int64_t __pyx_v_max_group); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_86ensure_platform_int(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_arr); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_88ensure_float64(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_arr); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_90ensure_float32(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_arr); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_92ensure_int8(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_arr); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_94ensure_int16(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_arr); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_96ensure_int32(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_arr); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_98ensure_int64(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_arr); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_100ensure_object(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_arr); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_102map_indices_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_index); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_104map_indices_float32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_index); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_106map_indices_object(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_index); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_108map_indices_int32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_index); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_110map_indices_int64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_index); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_112map_indices_bool(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_index); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_114pad_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_old, PyArrayObject *__pyx_v_new, PyObject *__pyx_v_limit); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_116pad_float32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_old, PyArrayObject *__pyx_v_new, PyObject *__pyx_v_limit); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_118pad_object(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_old, PyArrayObject *__pyx_v_new, PyObject *__pyx_v_limit); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_120pad_int32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_old, PyArrayObject *__pyx_v_new, PyObject *__pyx_v_limit); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_122pad_int64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_old, PyArrayObject *__pyx_v_new, PyObject *__pyx_v_limit); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_124pad_bool(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_old, PyArrayObject *__pyx_v_new, PyObject *__pyx_v_limit); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_126backfill_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_old, PyArrayObject *__pyx_v_new, PyObject *__pyx_v_limit); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_128backfill_float32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_old, PyArrayObject *__pyx_v_new, PyObject *__pyx_v_limit); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_130backfill_object(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_old, PyArrayObject *__pyx_v_new, PyObject *__pyx_v_limit); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_132backfill_int32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_old, PyArrayObject *__pyx_v_new, PyObject *__pyx_v_limit); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_134backfill_int64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_old, PyArrayObject *__pyx_v_new, PyObject *__pyx_v_limit); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_136backfill_bool(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_old, PyArrayObject *__pyx_v_new, PyObject *__pyx_v_limit); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_138pad_inplace_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_mask, PyObject *__pyx_v_limit); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_140pad_inplace_float32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_mask, PyObject *__pyx_v_limit); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_142pad_inplace_object(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_mask, PyObject *__pyx_v_limit); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_144pad_inplace_int32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_mask, PyObject *__pyx_v_limit); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_146pad_inplace_int64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_mask, PyObject *__pyx_v_limit); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_148pad_inplace_bool(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_mask, PyObject *__pyx_v_limit); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_150backfill_inplace_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_mask, PyObject *__pyx_v_limit); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_152backfill_inplace_float32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_mask, PyObject *__pyx_v_limit); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_154backfill_inplace_object(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_mask, PyObject *__pyx_v_limit); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_156backfill_inplace_int32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_mask, PyObject *__pyx_v_limit); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_158backfill_inplace_int64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_mask, PyObject *__pyx_v_limit); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_160backfill_inplace_bool(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_mask, PyObject *__pyx_v_limit); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_162pad_2d_inplace_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_mask, PyObject *__pyx_v_limit); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_164pad_2d_inplace_float32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_mask, PyObject *__pyx_v_limit); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_166pad_2d_inplace_object(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_mask, PyObject *__pyx_v_limit); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_168pad_2d_inplace_int32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_mask, PyObject *__pyx_v_limit); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_170pad_2d_inplace_int64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_mask, PyObject *__pyx_v_limit); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_172pad_2d_inplace_bool(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_mask, PyObject *__pyx_v_limit); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_174backfill_2d_inplace_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_mask, PyObject *__pyx_v_limit); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_176backfill_2d_inplace_float32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_mask, PyObject *__pyx_v_limit); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_178backfill_2d_inplace_object(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_mask, PyObject *__pyx_v_limit); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_180backfill_2d_inplace_int32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_mask, PyObject *__pyx_v_limit); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_182backfill_2d_inplace_int64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_mask, PyObject *__pyx_v_limit); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_184backfill_2d_inplace_bool(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_mask, PyObject *__pyx_v_limit); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_186is_monotonic_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_arr); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_188is_monotonic_float32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_arr); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_190is_monotonic_object(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_arr); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_192is_monotonic_int32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_arr); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_194is_monotonic_int64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_arr); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_196is_monotonic_bool(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_arr); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_198groupby_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_index, PyArrayObject *__pyx_v_labels); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_200groupby_float32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_index, PyArrayObject *__pyx_v_labels); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_202groupby_object(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_index, PyArrayObject *__pyx_v_labels); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_204groupby_int32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_index, PyArrayObject *__pyx_v_labels); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_206groupby_int64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_index, PyArrayObject *__pyx_v_labels); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_208groupby_bool(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_index, PyArrayObject *__pyx_v_labels); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_210arrmap_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_index, PyObject *__pyx_v_func); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_212arrmap_float32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_index, PyObject *__pyx_v_func); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_214arrmap_object(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_index, PyObject *__pyx_v_func); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_216arrmap_int32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_index, PyObject *__pyx_v_func); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_218arrmap_int64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_index, PyObject *__pyx_v_func); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_220arrmap_bool(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_index, PyObject *__pyx_v_func); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_222take_1d_bool_bool(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_224take_1d_bool_object(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_226take_1d_int8_int8(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_228take_1d_int8_int32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_230take_1d_int8_int64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_232take_1d_int8_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_234take_1d_int16_int16(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_236take_1d_int16_int32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_238take_1d_int16_int64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_240take_1d_int16_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_242take_1d_int32_int32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_244take_1d_int32_int64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_246take_1d_int32_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_248take_1d_int64_int64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_250take_1d_int64_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_252take_1d_float32_float32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_254take_1d_float32_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_256take_1d_float64_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_258take_1d_object_object(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_260take_2d_axis0_bool_bool(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_262take_2d_axis0_bool_object(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_264take_2d_axis0_int8_int8(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_266take_2d_axis0_int8_int32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_268take_2d_axis0_int8_int64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_270take_2d_axis0_int8_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_272take_2d_axis0_int16_int16(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_274take_2d_axis0_int16_int32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_276take_2d_axis0_int16_int64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_278take_2d_axis0_int16_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_280take_2d_axis0_int32_int32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_282take_2d_axis0_int32_int64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_284take_2d_axis0_int32_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_286take_2d_axis0_int64_int64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_288take_2d_axis0_int64_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_290take_2d_axis0_float32_float32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_292take_2d_axis0_float32_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_294take_2d_axis0_float64_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_296take_2d_axis0_object_object(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_298take_2d_axis1_bool_bool(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_300take_2d_axis1_bool_object(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_302take_2d_axis1_int8_int8(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_304take_2d_axis1_int8_int32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_306take_2d_axis1_int8_int64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_308take_2d_axis1_int8_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_310take_2d_axis1_int16_int16(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_312take_2d_axis1_int16_int32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_314take_2d_axis1_int16_int64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_316take_2d_axis1_int16_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_318take_2d_axis1_int32_int32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_320take_2d_axis1_int32_int64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_322take_2d_axis1_int32_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_324take_2d_axis1_int64_int64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_326take_2d_axis1_int64_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_328take_2d_axis1_float32_float32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_330take_2d_axis1_float32_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_332take_2d_axis1_float64_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_334take_2d_axis1_object_object(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_336take_2d_multi_bool_bool(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_338take_2d_multi_bool_object(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_340take_2d_multi_int8_int8(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_342take_2d_multi_int8_int32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_344take_2d_multi_int8_int64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_346take_2d_multi_int8_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_348take_2d_multi_int16_int16(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_350take_2d_multi_int16_int32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_352take_2d_multi_int16_int64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_354take_2d_multi_int16_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_356take_2d_multi_int32_int32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_358take_2d_multi_int32_int64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_360take_2d_multi_int32_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_362take_2d_multi_int64_int64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_364take_2d_multi_int64_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_366take_2d_multi_float32_float32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_368take_2d_multi_float32_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_370take_2d_multi_float64_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_372take_2d_multi_object_object(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_374diff_2d_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_arr, PyArrayObject *__pyx_v_out, Py_ssize_t __pyx_v_periods, int __pyx_v_axis); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_376diff_2d_float32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_arr, PyArrayObject *__pyx_v_out, Py_ssize_t __pyx_v_periods, int __pyx_v_axis); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_378diff_2d_int8(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_arr, PyArrayObject *__pyx_v_out, Py_ssize_t __pyx_v_periods, int __pyx_v_axis); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_380diff_2d_int16(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_arr, PyArrayObject *__pyx_v_out, Py_ssize_t __pyx_v_periods, int __pyx_v_axis); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_382diff_2d_int32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_arr, PyArrayObject *__pyx_v_out, Py_ssize_t __pyx_v_periods, int __pyx_v_axis); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_384diff_2d_int64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_arr, PyArrayObject *__pyx_v_out, Py_ssize_t __pyx_v_periods, int __pyx_v_axis); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_386group_last_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_out, PyArrayObject *__pyx_v_counts, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_labels); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_388group_last_float32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_out, PyArrayObject *__pyx_v_counts, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_labels); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_390group_last_bin_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_out, PyArrayObject *__pyx_v_counts, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_bins); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_392group_last_bin_float32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_out, PyArrayObject *__pyx_v_counts, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_bins); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_394group_nth_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_out, PyArrayObject *__pyx_v_counts, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_labels, __pyx_t_5numpy_int64_t __pyx_v_rank); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_396group_nth_float32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_out, PyArrayObject *__pyx_v_counts, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_labels, __pyx_t_5numpy_int64_t __pyx_v_rank); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_398group_nth_bin_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_out, PyArrayObject *__pyx_v_counts, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_bins, __pyx_t_5numpy_int64_t __pyx_v_rank); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_400group_nth_bin_float32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_out, PyArrayObject *__pyx_v_counts, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_bins, __pyx_t_5numpy_int64_t __pyx_v_rank); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_402group_add_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_out, PyArrayObject *__pyx_v_counts, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_labels); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_404group_add_float32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_out, PyArrayObject *__pyx_v_counts, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_labels); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_406group_add_bin_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_out, PyArrayObject *__pyx_v_counts, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_bins); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_408group_add_bin_float32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_out, PyArrayObject *__pyx_v_counts, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_bins); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_410group_prod_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_out, PyArrayObject *__pyx_v_counts, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_labels); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_412group_prod_float32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_out, PyArrayObject *__pyx_v_counts, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_labels); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_414group_prod_bin_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_out, PyArrayObject *__pyx_v_counts, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_bins); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_416group_prod_bin_float32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_out, PyArrayObject *__pyx_v_counts, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_bins); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_418group_var_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_out, PyArrayObject *__pyx_v_counts, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_labels); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_420group_var_float32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_out, PyArrayObject *__pyx_v_counts, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_labels); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_422group_var_bin_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_out, PyArrayObject *__pyx_v_counts, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_bins); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_424group_var_bin_float32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_out, PyArrayObject *__pyx_v_counts, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_bins); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_426group_mean_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_out, PyArrayObject *__pyx_v_counts, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_labels); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_428group_mean_float32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_out, PyArrayObject *__pyx_v_counts, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_labels); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_430group_mean_bin_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_out, PyArrayObject *__pyx_v_counts, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_bins); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_432group_mean_bin_float32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_out, PyArrayObject *__pyx_v_counts, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_bins); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_434group_min_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_out, PyArrayObject *__pyx_v_counts, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_labels); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_436group_min_float32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_out, PyArrayObject *__pyx_v_counts, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_labels); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_438group_min_bin_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_out, PyArrayObject *__pyx_v_counts, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_bins); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_440group_min_bin_float32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_out, PyArrayObject *__pyx_v_counts, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_bins); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_442group_max_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_out, PyArrayObject *__pyx_v_counts, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_labels); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_444group_max_float32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_out, PyArrayObject *__pyx_v_counts, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_labels); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_446group_max_bin_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_out, PyArrayObject *__pyx_v_counts, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_bins); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_448group_max_bin_float32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_out, PyArrayObject *__pyx_v_counts, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_bins); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_450group_ohlc_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_out, PyArrayObject *__pyx_v_counts, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_bins); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_452group_ohlc_float32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_out, PyArrayObject *__pyx_v_counts, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_bins); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_454left_join_indexer_unique_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_left, PyArrayObject *__pyx_v_right); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_456left_join_indexer_unique_float32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_left, PyArrayObject *__pyx_v_right); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_458left_join_indexer_unique_object(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_left, PyArrayObject *__pyx_v_right); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_460left_join_indexer_unique_int32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_left, PyArrayObject *__pyx_v_right); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_462left_join_indexer_unique_int64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_left, PyArrayObject *__pyx_v_right); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_464left_join_indexer_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_left, PyArrayObject *__pyx_v_right); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_466left_join_indexer_float32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_left, PyArrayObject *__pyx_v_right); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_468left_join_indexer_object(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_left, PyArrayObject *__pyx_v_right); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_470left_join_indexer_int32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_left, PyArrayObject *__pyx_v_right); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_472left_join_indexer_int64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_left, PyArrayObject *__pyx_v_right); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_474outer_join_indexer_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_left, PyArrayObject *__pyx_v_right); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_476outer_join_indexer_float32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_left, PyArrayObject *__pyx_v_right); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_478outer_join_indexer_object(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_left, PyArrayObject *__pyx_v_right); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_480outer_join_indexer_int32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_left, PyArrayObject *__pyx_v_right); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_482outer_join_indexer_int64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_left, PyArrayObject *__pyx_v_right); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_484inner_join_indexer_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_left, PyArrayObject *__pyx_v_right); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_486inner_join_indexer_float32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_left, PyArrayObject *__pyx_v_right); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_488inner_join_indexer_object(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_left, PyArrayObject *__pyx_v_right); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_490inner_join_indexer_int32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_left, PyArrayObject *__pyx_v_right); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_492inner_join_indexer_int64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_left, PyArrayObject *__pyx_v_right); /* 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_5algos_Node(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_6pandas_5algos_IndexableSkiplist(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static char __pyx_k_A[] = "A"; static char __pyx_k_B[] = "B"; static char __pyx_k_C[] = "C"; static char __pyx_k_D[] = "D"; static char __pyx_k_H[] = "H"; static char __pyx_k_I[] = "I"; static char __pyx_k_K[] = "K"; static char __pyx_k_L[] = "L"; static char __pyx_k_N[] = "N"; static char __pyx_k_O[] = "O"; static char __pyx_k_Q[] = "Q"; static char __pyx_k_R[] = "R"; static char __pyx_k_S[] = "S"; static char __pyx_k_T[] = "T"; static char __pyx_k_a[] = "a"; static char __pyx_k_b[] = "b"; static char __pyx_k_c[] = "c"; static char __pyx_k_d[] = "d"; static char __pyx_k_e[] = "e"; static char __pyx_k_f[] = "f"; static char __pyx_k_g[] = "g"; static char __pyx_k_h[] = "h"; static char __pyx_k_i[] = "i"; static char __pyx_k_j[] = "j"; static char __pyx_k_k[] = "k"; static char __pyx_k_l[] = "l"; static char __pyx_k_m[] = "m"; static char __pyx_k_n[] = "n"; static char __pyx_k_o[] = "o"; static char __pyx_k_q[] = "q"; static char __pyx_k_s[] = "s"; static char __pyx_k_t[] = "t"; static char __pyx_k_v[] = "v"; static char __pyx_k_w[] = "w"; static char __pyx_k_x[] = "x"; static char __pyx_k_y[] = "y"; static char __pyx_k_z[] = "z"; static char __pyx_k_NA[] = "NA"; static char __pyx_k_Zd[] = "Zd"; static char __pyx_k_Zf[] = "Zf"; static char __pyx_k_Zg[] = "Zg"; static char __pyx_k_ai[] = "ai"; static char __pyx_k_as[] = "_as"; static char __pyx_k_ct[] = "ct"; static char __pyx_k_eq[] = "__eq__"; static char __pyx_k_f8[] = "f8"; static char __pyx_k_fv[] = "fv"; static char __pyx_k_ge[] = "__ge__"; static char __pyx_k_gt[] = "__gt__"; static char __pyx_k_i0[] = "i0"; static char __pyx_k_i8[] = "i8"; static char __pyx_k_lc[] = "lc"; static char __pyx_k_le[] = "__le__"; static char __pyx_k_lt[] = "__lt__"; static char __pyx_k_n0[] = "n0"; static char __pyx_k_ne[] = "__ne__"; static char __pyx_k_np[] = "np"; static char __pyx_k_rc[] = "rc"; static char __pyx_k_sl[] = "sl"; static char __pyx_k_sx[] = "sx"; static char __pyx_k_sy[] = "sy"; static char __pyx_k_vx[] = "vx"; static char __pyx_k_vy[] = "vy"; static char __pyx_k_xi[] = "xi"; static char __pyx_k_xx[] = "xx"; static char __pyx_k_yi[] = "yi"; static char __pyx_k_NIL[] = "NIL"; static char __pyx_k_NaN[] = "NaN"; static char __pyx_k_adj[] = "adj"; static char __pyx_k_arg[] = "arg"; static char __pyx_k_arr[] = "arr"; static char __pyx_k_avg[] = "avg"; static char __pyx_k_buf[] = "buf"; static char __pyx_k_cmp[] = "__cmp__"; static char __pyx_k_com[] = "com"; static char __pyx_k_cov[] = "cov"; static char __pyx_k_cur[] = "cur"; static char __pyx_k_day[] = "day"; static char __pyx_k_dim[] = "dim"; static char __pyx_k_doc[] = "__doc__"; static char __pyx_k_end[] = "end"; static char __pyx_k_get[] = "get"; static char __pyx_k_gid[] = "gid"; static char __pyx_k_ids[] = "ids"; static char __pyx_k_idx[] = "idx"; static char __pyx_k_inf[] = "inf"; static char __pyx_k_int[] = "int_"; static char __pyx_k_key[] = "key"; static char __pyx_k_lab[] = "lab"; static char __pyx_k_lib[] = "lib"; static char __pyx_k_lim[] = "lim"; static char __pyx_k_loc[] = "loc"; static char __pyx_k_mat[] = "mat"; static char __pyx_k_max[] = "max"; static char __pyx_k_min[] = "min"; static char __pyx_k_nan[] = "nan"; static char __pyx_k_new[] = "new"; static char __pyx_k_old[] = "old"; static char __pyx_k_out[] = "out"; static char __pyx_k_pre[] = "pre"; static char __pyx_k_ptr[] = "ptr"; static char __pyx_k_put[] = "put"; static char __pyx_k_res[] = "res"; static char __pyx_k_ret[] = "ret"; static char __pyx_k_rev[] = "rev"; static char __pyx_k_top[] = "top"; static char __pyx_k_val[] = "val"; static char __pyx_k_win[] = "win"; static char __pyx_k_xxx[] = "xxx"; static char __pyx_k_NINF[] = "NINF"; static char __pyx_k_aold[] = "aold"; static char __pyx_k_axis[] = "axis"; static char __pyx_k_bins[] = "bins"; static char __pyx_k_copy[] = "copy"; static char __pyx_k_data[] = "data"; static char __pyx_k_ddof[] = "ddof"; static char __pyx_k_dims[] = "dims"; static char __pyx_k_dups[] = "dups"; static char __pyx_k_ewma[] = "ewma"; static char __pyx_k_fill[] = "fill"; static char __pyx_k_func[] = "func"; static char __pyx_k_hour[] = "hour"; static char __pyx_k_idx0[] = "idx0"; static char __pyx_k_idx1[] = "idx1"; static char __pyx_k_in_i[] = "in_i"; static char __pyx_k_in_k[] = "in_k"; static char __pyx_k_in_n[] = "in_n"; static char __pyx_k_infs[] = "infs"; static char __pyx_k_int8[] = "int8"; static char __pyx_k_keep[] = "keep"; static char __pyx_k_kind[] = "kind"; static char __pyx_k_last[] = "last"; static char __pyx_k_left[] = "left"; static char __pyx_k_lval[] = "lval"; static char __pyx_k_main[] = "__main__"; static char __pyx_k_mask[] = "mask"; static char __pyx_k_maxx[] = "maxx"; static char __pyx_k_mean[] = "mean"; static char __pyx_k_minp[] = "minp"; static char __pyx_k_minx[] = "minx"; static char __pyx_k_neww[] = "neww"; static char __pyx_k_next[] = "next"; static char __pyx_k_nobs[] = "nobs"; static char __pyx_k_oldw[] = "oldw"; static char __pyx_k_prev[] = "prev"; static char __pyx_k_rank[] = "rank"; static char __pyx_k_resx[] = "resx"; static char __pyx_k_ring[] = "ring"; static char __pyx_k_rval[] = "rval"; static char __pyx_k_seen[] = "seen"; static char __pyx_k_self[] = "self"; static char __pyx_k_size[] = "size"; static char __pyx_k_sort[] = "sort"; static char __pyx_k_stop[] = "stop"; static char __pyx_k_sumx[] = "sumx"; static char __pyx_k_sumy[] = "sumy"; static char __pyx_k_take[] = "take"; static char __pyx_k_test[] = "__test__"; static char __pyx_k_vecs[] = "vecs"; static char __pyx_k_view[] = "view"; static char __pyx_k_vlow[] = "vlow"; static char __pyx_k_xxxx[] = "xxxx"; static char __pyx_k_year[] = "year"; static char __pyx_k_array[] = "array"; static char __pyx_k_count[] = "count"; static char __pyx_k_dtype[] = "dtype"; static char __pyx_k_empty[] = "empty"; static char __pyx_k_first[] = "first"; static char __pyx_k_flags[] = "flags"; static char __pyx_k_iinfo[] = "iinfo"; static char __pyx_k_index[] = "index"; static char __pyx_k_input[] = "input"; static char __pyx_k_int16[] = "int16"; static char __pyx_k_int32[] = "int32"; static char __pyx_k_int64[] = "int64"; static char __pyx_k_isnan[] = "isnan"; static char __pyx_k_label[] = "label"; static char __pyx_k_limit[] = "limit"; static char __pyx_k_meanx[] = "meanx"; static char __pyx_k_meany[] = "meany"; static char __pyx_k_month[] = "month"; static char __pyx_k_nbins[] = "nbins"; static char __pyx_k_nleft[] = "nleft"; static char __pyx_k_numpy[] = "numpy"; static char __pyx_k_other[] = "other"; static char __pyx_k_prodx[] = "prodx"; static char __pyx_k_range[] = "range"; static char __pyx_k_ranks[] = "ranks"; static char __pyx_k_retry[] = "retry"; static char __pyx_k_right[] = "right"; static char __pyx_k_shape[] = "shape"; static char __pyx_k_start[] = "start"; static char __pyx_k_sum_x[] = "sum_x"; static char __pyx_k_sumxx[] = "sumxx"; static char __pyx_k_sumyy[] = "sumyy"; static char __pyx_k_uint8[] = "uint8"; static char __pyx_k_value[] = "value"; static char __pyx_k_vhigh[] = "vhigh"; static char __pyx_k_vopen[] = "vopen"; static char __pyx_k_where[] = "where"; static char __pyx_k_width[] = "width"; static char __pyx_k_win_i[] = "win_i"; static char __pyx_k_win_k[] = "win_k"; static char __pyx_k_win_n[] = "win_n"; static char __pyx_k_zeros[] = "zeros"; static char __pyx_k_adjust[] = "adjust"; static char __pyx_k_arange[] = "arange"; static char __pyx_k_astype[] = "astype"; static char __pyx_k_bufarr[] = "bufarr"; static char __pyx_k_counts[] = "counts"; static char __pyx_k_import[] = "__import__"; static char __pyx_k_in_arr[] = "in_arr"; static char __pyx_k_insert[] = "insert"; static char __pyx_k_labels[] = "labels"; static char __pyx_k_lambda[] = ""; static char __pyx_k_length[] = "length"; static char __pyx_k_median[] = "median"; static char __pyx_k_minute[] = "minute"; static char __pyx_k_module[] = "__module__"; static char __pyx_k_neg_ct[] = "neg_ct"; static char __pyx_k_nright[] = "nright"; static char __pyx_k_object[] = "object"; static char __pyx_k_offset[] = "offset"; static char __pyx_k_oldbuf[] = "oldbuf"; static char __pyx_k_output[] = "output"; static char __pyx_k_pandas[] = "pandas"; static char __pyx_k_random[] = "random"; static char __pyx_k_remove[] = "remove"; static char __pyx_k_result[] = "result"; static char __pyx_k_second[] = "second"; static char __pyx_k_sorter[] = "sorter"; static char __pyx_k_sum_xx[] = "sum_xx"; static char __pyx_k_val_in[] = "val_in"; static char __pyx_k_values[] = "values"; static char __pyx_k_vclose[] = "vclose"; static char __pyx_k_window[] = "window"; static char __pyx_k_argsort[] = "argsort"; static char __pyx_k_asarray[] = "asarray"; static char __pyx_k_average[] = "average"; static char __pyx_k_avg_wgt[] = "avg_wgt"; static char __pyx_k_divisor[] = "divisor"; static char __pyx_k_float16[] = "float16"; static char __pyx_k_float32[] = "float32"; static char __pyx_k_float64[] = "float64"; static char __pyx_k_indexer[] = "indexer"; static char __pyx_k_keep_na[] = "keep_na"; static char __pyx_k_maskedx[] = "maskedx"; static char __pyx_k_maskedy[] = "maskedy"; static char __pyx_k_members[] = "members"; static char __pyx_k_minpair[] = "minpair"; static char __pyx_k_nancorr[] = "nancorr"; static char __pyx_k_ngroups[] = "ngroups"; static char __pyx_k_nlevels[] = "nlevels"; static char __pyx_k_nonzero[] = "nonzero"; static char __pyx_k_periods[] = "periods"; static char __pyx_k_prepare[] = "__prepare__"; static char __pyx_k_putmask[] = "putmask"; static char __pyx_k_reverse[] = "reverse"; static char __pyx_k_tot_wgt[] = "tot_wgt"; static char __pyx_k_val_win[] = "val_win"; static char __pyx_k_weights[] = "weights"; static char __pyx_k_Infinity[] = "Infinity"; static char __pyx_k_KeyError[] = "KeyError"; static char __pyx_k_counts_2[] = "_counts"; static char __pyx_k_datetime[] = "datetime"; static char __pyx_k_isfinite[] = "isfinite"; static char __pyx_k_last_obs[] = "last_obs"; static char __pyx_k_left_pos[] = "left_pos"; static char __pyx_k_lindexer[] = "lindexer"; static char __pyx_k_midpoint[] = "midpoint"; static char __pyx_k_object_2[] = "object_"; static char __pyx_k_pad_bool[] = "pad_bool"; static char __pyx_k_position[] = "position"; static char __pyx_k_qualname[] = "__qualname__"; static char __pyx_k_quantile[] = "quantile"; static char __pyx_k_rindexer[] = "rindexer"; static char __pyx_k_roll_max[] = "roll_max"; static char __pyx_k_roll_min[] = "roll_min"; static char __pyx_k_roll_sum[] = "roll_sum"; static char __pyx_k_roll_var[] = "roll_var"; static char __pyx_k_skiplist[] = "skiplist"; static char __pyx_k_tiebreak[] = "tiebreak"; static char __pyx_k_Not_Found[] = "Not Found"; static char __pyx_k_TypeError[] = "TypeError"; static char __pyx_k_argsorted[] = "argsorted"; static char __pyx_k_ascending[] = "ascending"; static char __pyx_k_got_first[] = "got_first"; static char __pyx_k_group_ids[] = "group_ids"; static char __pyx_k_is_unique[] = "is_unique"; static char __pyx_k_isnullobj[] = "isnullobj"; static char __pyx_k_max_group[] = "max_group"; static char __pyx_k_mergesort[] = "mergesort"; static char __pyx_k_metaclass[] = "__metaclass__"; static char __pyx_k_na_option[] = "na_option"; static char __pyx_k_nan_value[] = "nan_value"; static char __pyx_k_ones_like[] = "ones_like"; static char __pyx_k_pad_int32[] = "pad_int32"; static char __pyx_k_pad_int64[] = "pad_int64"; static char __pyx_k_right_pos[] = "right_pos"; static char __pyx_k_roll_kurt[] = "roll_kurt"; static char __pyx_k_roll_max2[] = "roll_max2"; static char __pyx_k_roll_mean[] = "roll_mean"; static char __pyx_k_roll_min2[] = "roll_min2"; static char __pyx_k_roll_skew[] = "roll_skew"; static char __pyx_k_sum_ranks[] = "sum_ranks"; static char __pyx_k_IndexError[] = "IndexError"; static char __pyx_k_ValueError[] = "ValueError"; static char __pyx_k_check_minp[] = "_check_minp"; static char __pyx_k_empty_like[] = "empty_like"; static char __pyx_k_fill_count[] = "fill_count"; static char __pyx_k_fill_value[] = "fill_value"; static char __pyx_k_inner_join[] = "inner_join"; static char __pyx_k_left_count[] = "left_count"; static char __pyx_k_max_groups[] = "max_groups"; static char __pyx_k_max_subseq[] = "max_subseq"; static char __pyx_k_min_subseq[] = "min_subseq"; static char __pyx_k_pad_object[] = "pad_object"; static char __pyx_k_pandas_lib[] = "pandas.lib"; static char __pyx_k_pydatetime[] = "pydatetime"; static char __pyx_k_pyx_vtable[] = "__pyx_vtable__"; static char __pyx_k_valid_locs[] = "valid_locs"; static char __pyx_k_zeros_like[] = "zeros_like"; static char __pyx_k_NegInfinity[] = "NegInfinity"; static char __pyx_k_arrmap_bool[] = "arrmap_bool"; static char __pyx_k_isnullobj2d[] = "isnullobj2d"; static char __pyx_k_left_sorter[] = "left_sorter"; static char __pyx_k_microsecond[] = "microsecond"; static char __pyx_k_pad_float32[] = "pad_float32"; static char __pyx_k_pad_float64[] = "pad_float64"; static char __pyx_k_return_true[] = "_return_true"; static char __pyx_k_right_count[] = "right_count"; static char __pyx_k_roll_window[] = "roll_window"; static char __pyx_k_sorted_data[] = "sorted_data"; static char __pyx_k_tiebreakers[] = "tiebreakers"; static char __pyx_k_ties_method[] = "ties_method"; static char __pyx_k_RuntimeError[] = "RuntimeError"; static char __pyx_k_arrmap_int32[] = "arrmap_int32"; static char __pyx_k_arrmap_int64[] = "arrmap_int64"; static char __pyx_k_c_contiguous[] = "c_contiguous"; static char __pyx_k_diff_2d_int8[] = "diff_2d_int8"; static char __pyx_k_f_contiguous[] = "f_contiguous"; static char __pyx_k_group_labels[] = "group_labels"; static char __pyx_k_group_median[] = "group_median"; static char __pyx_k_groupby_bool[] = "groupby_bool"; static char __pyx_k_is_lexsorted[] = "is_lexsorted"; static char __pyx_k_kth_smallest[] = "kth_smallest"; static char __pyx_k_left_indexer[] = "left_indexer"; static char __pyx_k_pandas_algos[] = "pandas.algos"; static char __pyx_k_return_false[] = "_return_false"; static char __pyx_k_right_sorter[] = "right_sorter"; static char __pyx_k_roll_generic[] = "roll_generic"; static char __pyx_k_arrmap_object[] = "arrmap_object"; static char __pyx_k_backfill_bool[] = "backfill_bool"; static char __pyx_k_diff_2d_int16[] = "diff_2d_int16"; static char __pyx_k_diff_2d_int32[] = "diff_2d_int32"; static char __pyx_k_diff_2d_int64[] = "diff_2d_int64"; static char __pyx_k_expected_size[] = "expected_size"; static char __pyx_k_ffill_indexer[] = "ffill_indexer"; static char __pyx_k_groupby_int32[] = "groupby_int32"; static char __pyx_k_groupby_int64[] = "groupby_int64"; static char __pyx_k_pyx_getbuffer[] = "__pyx_getbuffer"; static char __pyx_k_rank_1d_int64[] = "rank_1d_int64"; static char __pyx_k_rank_2d_int64[] = "rank_2d_int64"; static char __pyx_k_right_indexer[] = "right_indexer"; static char __pyx_k_roll_median_c[] = "roll_median_c"; static char __pyx_k_roll_quantile[] = "roll_quantile"; static char __pyx_k_AssertionError[] = "AssertionError"; static char __pyx_k_arrmap_float32[] = "arrmap_float32"; static char __pyx_k_arrmap_float64[] = "arrmap_float64"; static char __pyx_k_backfill_int32[] = "backfill_int32"; static char __pyx_k_backfill_int64[] = "backfill_int64"; static char __pyx_k_ffill_by_group[] = "ffill_by_group"; static char __pyx_k_groupby_object[] = "groupby_object"; static char __pyx_k_list_of_arrays[] = "list_of_arrays"; static char __pyx_k_backfill_object[] = "backfill_object"; static char __pyx_k_diff_2d_float32[] = "diff_2d_float32"; static char __pyx_k_diff_2d_float64[] = "diff_2d_float64"; static char __pyx_k_full_outer_join[] = "full_outer_join"; static char __pyx_k_groupby_float32[] = "groupby_float32"; static char __pyx_k_groupby_float64[] = "groupby_float64"; static char __pyx_k_groupby_indices[] = "groupby_indices"; static char __pyx_k_left_outer_join[] = "left_outer_join"; static char __pyx_k_rank_1d_float64[] = "rank_1d_float64"; static char __pyx_k_rank_1d_generic[] = "rank_1d_generic"; static char __pyx_k_rank_2d_float64[] = "rank_2d_float64"; static char __pyx_k_rank_2d_generic[] = "rank_2d_generic"; static char __pyx_k_backfill_float32[] = "backfill_float32"; static char __pyx_k_backfill_float64[] = "backfill_float64"; static char __pyx_k_group_nth_object[] = "group_nth_object"; static char __pyx_k_nancorr_spearman[] = "nancorr_spearman"; static char __pyx_k_pad_inplace_bool[] = "pad_inplace_bool"; static char __pyx_k_Unable_to_parse_s[] = "Unable to parse %s"; static char __pyx_k_group_add_float32[] = "group_add_float32"; static char __pyx_k_group_add_float64[] = "group_add_float64"; static char __pyx_k_group_last_object[] = "group_last_object"; static char __pyx_k_group_max_float32[] = "group_max_float32"; static char __pyx_k_group_max_float64[] = "group_max_float64"; static char __pyx_k_group_min_float32[] = "group_min_float32"; static char __pyx_k_group_min_float64[] = "group_min_float64"; static char __pyx_k_group_nth_float32[] = "group_nth_float32"; static char __pyx_k_group_nth_float64[] = "group_nth_float64"; static char __pyx_k_group_var_float32[] = "group_var_float32"; static char __pyx_k_group_var_float64[] = "group_var_float64"; static char __pyx_k_groupsort_indexer[] = "groupsort_indexer"; static char __pyx_k_is_monotonic_bool[] = "is_monotonic_bool"; static char __pyx_k_pad_inplace_int32[] = "pad_inplace_int32"; static char __pyx_k_pad_inplace_int64[] = "pad_inplace_int64"; static char __pyx_k_pyx_releasebuffer[] = "__pyx_releasebuffer"; static char __pyx_k_take_1d_bool_bool[] = "take_1d_bool_bool"; static char __pyx_k_take_1d_int8_int8[] = "take_1d_int8_int8"; static char __pyx_k_get_result_indexer[] = "_get_result_indexer"; static char __pyx_k_group_last_float32[] = "group_last_float32"; static char __pyx_k_group_last_float64[] = "group_last_float64"; static char __pyx_k_group_mean_float32[] = "group_mean_float32"; static char __pyx_k_group_mean_float64[] = "group_mean_float64"; static char __pyx_k_group_ohlc_float32[] = "group_ohlc_float32"; static char __pyx_k_group_ohlc_float64[] = "group_ohlc_float64"; static char __pyx_k_group_prod_float32[] = "group_prod_float32"; static char __pyx_k_group_prod_float64[] = "group_prod_float64"; static char __pyx_k_is_monotonic_int32[] = "is_monotonic_int32"; static char __pyx_k_is_monotonic_int64[] = "is_monotonic_int64"; static char __pyx_k_pad_inplace_object[] = "pad_inplace_object"; static char __pyx_k_roll_median_cython[] = "roll_median_cython"; static char __pyx_k_take_1d_int8_int32[] = "take_1d_int8_int32"; static char __pyx_k_take_1d_int8_int64[] = "take_1d_int8_int64"; static char __pyx_k_NotImplementedError[] = "NotImplementedError"; static char __pyx_k_index_out_of_bounds[] = "index out of bounds"; static char __pyx_k_is_monotonic_object[] = "is_monotonic_object"; static char __pyx_k_pad_2d_inplace_bool[] = "pad_2d_inplace_bool"; static char __pyx_k_pad_inplace_float32[] = "pad_inplace_float32"; static char __pyx_k_pad_inplace_float64[] = "pad_inplace_float64"; static char __pyx_k_pandas_src_join_pyx[] = "pandas/src/join.pyx"; static char __pyx_k_take_1d_bool_object[] = "take_1d_bool_object"; static char __pyx_k_take_1d_int16_int16[] = "take_1d_int16_int16"; static char __pyx_k_take_1d_int16_int32[] = "take_1d_int16_int32"; static char __pyx_k_take_1d_int16_int64[] = "take_1d_int16_int64"; static char __pyx_k_take_1d_int32_int32[] = "take_1d_int32_int32"; static char __pyx_k_take_1d_int32_int64[] = "take_1d_int32_int64"; static char __pyx_k_take_1d_int64_int64[] = "take_1d_int64_int64"; static char __pyx_k_group_nth_bin_object[] = "group_nth_bin_object"; static char __pyx_k_is_monotonic_float32[] = "is_monotonic_float32"; static char __pyx_k_is_monotonic_float64[] = "is_monotonic_float64"; static char __pyx_k_len_index_len_labels[] = "len(index) != len(labels)"; static char __pyx_k_pad_2d_inplace_int32[] = "pad_2d_inplace_int32"; static char __pyx_k_pad_2d_inplace_int64[] = "pad_2d_inplace_int64"; static char __pyx_k_take_1d_int8_float64[] = "take_1d_int8_float64"; static char __pyx_k_Invalid_window_size_d[] = "Invalid window size %d"; static char __pyx_k_backfill_inplace_bool[] = "backfill_inplace_bool"; static char __pyx_k_group_add_bin_float32[] = "group_add_bin_float32"; static char __pyx_k_group_add_bin_float64[] = "group_add_bin_float64"; static char __pyx_k_group_last_bin_object[] = "group_last_bin_object"; static char __pyx_k_group_max_bin_float32[] = "group_max_bin_float32"; static char __pyx_k_group_max_bin_float64[] = "group_max_bin_float64"; static char __pyx_k_group_min_bin_float32[] = "group_min_bin_float32"; static char __pyx_k_group_min_bin_float64[] = "group_min_bin_float64"; static char __pyx_k_group_nth_bin_float32[] = "group_nth_bin_float32"; static char __pyx_k_group_nth_bin_float64[] = "group_nth_bin_float64"; static char __pyx_k_group_var_bin_float32[] = "group_var_bin_float32"; static char __pyx_k_group_var_bin_float64[] = "group_var_bin_float64"; static char __pyx_k_maybe_convert_objects[] = "maybe_convert_objects"; static char __pyx_k_min_periods_must_be_0[] = "min_periods must be >= 0"; static char __pyx_k_pad_2d_inplace_object[] = "pad_2d_inplace_object"; static char __pyx_k_take_1d_int16_float64[] = "take_1d_int16_float64"; static char __pyx_k_take_1d_int32_float64[] = "take_1d_int32_float64"; static char __pyx_k_take_1d_int64_float64[] = "take_1d_int64_float64"; static char __pyx_k_take_1d_object_object[] = "take_1d_object_object"; static char __pyx_k_backfill_inplace_int32[] = "backfill_inplace_int32"; static char __pyx_k_backfill_inplace_int64[] = "backfill_inplace_int64"; static char __pyx_k_group_last_bin_float32[] = "group_last_bin_float32"; static char __pyx_k_group_last_bin_float64[] = "group_last_bin_float64"; static char __pyx_k_group_mean_bin_float32[] = "group_mean_bin_float32"; static char __pyx_k_group_mean_bin_float64[] = "group_mean_bin_float64"; static char __pyx_k_group_prod_bin_float32[] = "group_prod_bin_float32"; static char __pyx_k_group_prod_bin_float64[] = "group_prod_bin_float64"; static char __pyx_k_pad_2d_inplace_float32[] = "pad_2d_inplace_float32"; static char __pyx_k_pad_2d_inplace_float64[] = "pad_2d_inplace_float64"; static char __pyx_k_backfill_inplace_object[] = "backfill_inplace_object"; static char __pyx_k_left_join_indexer_int32[] = "left_join_indexer_int32"; static char __pyx_k_left_join_indexer_int64[] = "left_join_indexer_int64"; static char __pyx_k_take_1d_float32_float32[] = "take_1d_float32_float32"; static char __pyx_k_take_1d_float32_float64[] = "take_1d_float32_float64"; static char __pyx_k_take_1d_float64_float64[] = "take_1d_float64_float64"; static char __pyx_k_take_2d_axis0_bool_bool[] = "take_2d_axis0_bool_bool"; static char __pyx_k_take_2d_axis0_int8_int8[] = "take_2d_axis0_int8_int8"; static char __pyx_k_take_2d_axis1_bool_bool[] = "take_2d_axis1_bool_bool"; static char __pyx_k_take_2d_axis1_int8_int8[] = "take_2d_axis1_int8_int8"; static char __pyx_k_take_2d_multi_bool_bool[] = "take_2d_multi_bool_bool"; static char __pyx_k_take_2d_multi_int8_int8[] = "take_2d_multi_int8_int8"; static char __pyx_k_backfill_2d_inplace_bool[] = "backfill_2d_inplace_bool"; static char __pyx_k_backfill_inplace_float32[] = "backfill_inplace_float32"; static char __pyx_k_backfill_inplace_float64[] = "backfill_inplace_float64"; static char __pyx_k_inner_join_indexer_int32[] = "inner_join_indexer_int32"; static char __pyx_k_inner_join_indexer_int64[] = "inner_join_indexer_int64"; static char __pyx_k_left_join_indexer_object[] = "left_join_indexer_object"; static char __pyx_k_outer_join_indexer_int32[] = "outer_join_indexer_int32"; static char __pyx_k_outer_join_indexer_int64[] = "outer_join_indexer_int64"; static char __pyx_k_pandas_src_generated_pyx[] = "pandas/src/generated.pyx"; static char __pyx_k_take_2d_axis0_int8_int32[] = "take_2d_axis0_int8_int32"; static char __pyx_k_take_2d_axis0_int8_int64[] = "take_2d_axis0_int8_int64"; static char __pyx_k_take_2d_axis1_int8_int32[] = "take_2d_axis1_int8_int32"; static char __pyx_k_take_2d_axis1_int8_int64[] = "take_2d_axis1_int8_int64"; static char __pyx_k_take_2d_multi_int8_int32[] = "take_2d_multi_int8_int32"; static char __pyx_k_take_2d_multi_int8_int64[] = "take_2d_multi_int8_int64"; static char __pyx_k_backfill_2d_inplace_int32[] = "backfill_2d_inplace_int32"; static char __pyx_k_backfill_2d_inplace_int64[] = "backfill_2d_inplace_int64"; static char __pyx_k_inner_join_indexer_object[] = "inner_join_indexer_object"; static char __pyx_k_left_join_indexer_float32[] = "left_join_indexer_float32"; static char __pyx_k_left_join_indexer_float64[] = "left_join_indexer_float64"; static char __pyx_k_outer_join_indexer_object[] = "outer_join_indexer_object"; static char __pyx_k_take_2d_axis0_bool_object[] = "take_2d_axis0_bool_object"; static char __pyx_k_take_2d_axis0_int16_int16[] = "take_2d_axis0_int16_int16"; static char __pyx_k_take_2d_axis0_int16_int32[] = "take_2d_axis0_int16_int32"; static char __pyx_k_take_2d_axis0_int16_int64[] = "take_2d_axis0_int16_int64"; static char __pyx_k_take_2d_axis0_int32_int32[] = "take_2d_axis0_int32_int32"; static char __pyx_k_take_2d_axis0_int32_int64[] = "take_2d_axis0_int32_int64"; static char __pyx_k_take_2d_axis0_int64_int64[] = "take_2d_axis0_int64_int64"; static char __pyx_k_take_2d_axis1_bool_object[] = "take_2d_axis1_bool_object"; static char __pyx_k_take_2d_axis1_int16_int16[] = "take_2d_axis1_int16_int16"; static char __pyx_k_take_2d_axis1_int16_int32[] = "take_2d_axis1_int16_int32"; static char __pyx_k_take_2d_axis1_int16_int64[] = "take_2d_axis1_int16_int64"; static char __pyx_k_take_2d_axis1_int32_int32[] = "take_2d_axis1_int32_int32"; static char __pyx_k_take_2d_axis1_int32_int64[] = "take_2d_axis1_int32_int64"; static char __pyx_k_take_2d_axis1_int64_int64[] = "take_2d_axis1_int64_int64"; static char __pyx_k_take_2d_multi_bool_object[] = "take_2d_multi_bool_object"; static char __pyx_k_take_2d_multi_int16_int16[] = "take_2d_multi_int16_int16"; static char __pyx_k_take_2d_multi_int16_int32[] = "take_2d_multi_int16_int32"; static char __pyx_k_take_2d_multi_int16_int64[] = "take_2d_multi_int16_int64"; static char __pyx_k_take_2d_multi_int32_int32[] = "take_2d_multi_int32_int32"; static char __pyx_k_take_2d_multi_int32_int64[] = "take_2d_multi_int32_int64"; static char __pyx_k_take_2d_multi_int64_int64[] = "take_2d_multi_int64_int64"; static char __pyx_k_Limit_must_be_non_negative[] = "Limit must be non-negative"; static char __pyx_k_backfill_2d_inplace_object[] = "backfill_2d_inplace_object"; static char __pyx_k_inner_join_indexer_float32[] = "inner_join_indexer_float32"; static char __pyx_k_inner_join_indexer_float64[] = "inner_join_indexer_float64"; static char __pyx_k_outer_join_indexer_float32[] = "outer_join_indexer_float32"; static char __pyx_k_outer_join_indexer_float64[] = "outer_join_indexer_float64"; static char __pyx_k_take_2d_axis0_int8_float64[] = "take_2d_axis0_int8_float64"; static char __pyx_k_take_2d_axis1_int8_float64[] = "take_2d_axis1_int8_float64"; static char __pyx_k_take_2d_multi_int8_float64[] = "take_2d_multi_int8_float64"; static char __pyx_k_backfill_2d_inplace_float32[] = "backfill_2d_inplace_float32"; static char __pyx_k_backfill_2d_inplace_float64[] = "backfill_2d_inplace_float64"; static char __pyx_k_ndarray_is_not_C_contiguous[] = "ndarray is not C contiguous"; static char __pyx_k_take_2d_axis0_int16_float64[] = "take_2d_axis0_int16_float64"; static char __pyx_k_take_2d_axis0_int32_float64[] = "take_2d_axis0_int32_float64"; static char __pyx_k_take_2d_axis0_int64_float64[] = "take_2d_axis0_int64_float64"; static char __pyx_k_take_2d_axis0_object_object[] = "take_2d_axis0_object_object"; static char __pyx_k_take_2d_axis1_int16_float64[] = "take_2d_axis1_int16_float64"; static char __pyx_k_take_2d_axis1_int32_float64[] = "take_2d_axis1_int32_float64"; static char __pyx_k_take_2d_axis1_int64_float64[] = "take_2d_axis1_int64_float64"; static char __pyx_k_take_2d_axis1_object_object[] = "take_2d_axis1_object_object"; static char __pyx_k_take_2d_multi_int16_float64[] = "take_2d_multi_int16_float64"; static char __pyx_k_take_2d_multi_int32_float64[] = "take_2d_multi_int32_float64"; static char __pyx_k_take_2d_multi_int64_float64[] = "take_2d_multi_int64_float64"; static char __pyx_k_take_2d_multi_object_object[] = "take_2d_multi_object_object"; static char __pyx_k_take_2d_axis0_float32_float32[] = "take_2d_axis0_float32_float32"; static char __pyx_k_take_2d_axis0_float32_float64[] = "take_2d_axis0_float32_float64"; static char __pyx_k_take_2d_axis0_float64_float64[] = "take_2d_axis0_float64_float64"; static char __pyx_k_take_2d_axis1_float32_float32[] = "take_2d_axis1_float32_float32"; static char __pyx_k_take_2d_axis1_float32_float64[] = "take_2d_axis1_float32_float64"; static char __pyx_k_take_2d_axis1_float64_float64[] = "take_2d_axis1_float64_float64"; static char __pyx_k_take_2d_multi_float32_float32[] = "take_2d_multi_float32_float32"; static char __pyx_k_take_2d_multi_float32_float64[] = "take_2d_multi_float32_float64"; static char __pyx_k_take_2d_multi_float64_float64[] = "take_2d_multi_float64_float64"; static char __pyx_k_left_join_indexer_unique_int32[] = "left_join_indexer_unique_int32"; static char __pyx_k_left_join_indexer_unique_int64[] = "left_join_indexer_unique_int64"; static char __pyx_k_min_periods_d_must_be_window_d[] = "min_periods (%d) must be <= window (%d)"; static char __pyx_k_home_yoh_deb_gits_pkg_exppsy_pa[] = "/home/yoh/deb/gits/pkg-exppsy/pandas/pandas/algos.pyx"; static char __pyx_k_left_join_indexer_unique_object[] = "left_join_indexer_unique_object"; static char __pyx_k_unknown_dtype_code_in_numpy_pxd[] = "unknown dtype code in numpy.pxd (%d)"; static char __pyx_k_Format_string_allocated_too_shor[] = "Format string allocated too short, see comment in numpy.pxd"; static char __pyx_k_Invalid_min_periods_size_d_great[] = "Invalid min_periods size %d greater than window %d"; static char __pyx_k_Non_native_byte_order_not_suppor[] = "Non-native byte order not supported"; static char __pyx_k_Output_array_must_have_4_columns[] = "Output array must have 4 columns"; static char __pyx_k_first_not_supported_for_non_nume[] = "first not supported for non-numeric data"; static char __pyx_k_left_join_indexer_unique_float32[] = "left_join_indexer_unique_float32"; static char __pyx_k_left_join_indexer_unique_float64[] = "left_join_indexer_unique_float64"; static char __pyx_k_ndarray_is_not_Fortran_contiguou[] = "ndarray is not Fortran contiguous"; static char __pyx_k_Format_string_allocated_too_shor_2[] = "Format string allocated too short."; static PyObject *__pyx_n_s_A; static PyObject *__pyx_n_s_AssertionError; static PyObject *__pyx_n_s_B; static PyObject *__pyx_n_s_C; static PyObject *__pyx_n_s_D; 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_IndexError; static PyObject *__pyx_n_s_Infinity; static PyObject *__pyx_kp_s_Invalid_min_periods_size_d_great; static PyObject *__pyx_kp_s_Invalid_window_size_d; static PyObject *__pyx_n_s_K; static PyObject *__pyx_n_s_KeyError; static PyObject *__pyx_kp_s_Limit_must_be_non_negative; static PyObject *__pyx_n_s_N; static PyObject *__pyx_n_s_NA; static PyObject *__pyx_n_s_NIL; static PyObject *__pyx_n_s_NINF; static PyObject *__pyx_n_s_NaN; static PyObject *__pyx_n_s_NegInfinity; static PyObject *__pyx_kp_u_Non_native_byte_order_not_suppor; static PyObject *__pyx_n_s_NotImplementedError; static PyObject *__pyx_kp_s_Not_Found; static PyObject *__pyx_n_s_O; static PyObject *__pyx_kp_s_Output_array_must_have_4_columns; static PyObject *__pyx_n_s_R; static PyObject *__pyx_n_s_RuntimeError; static PyObject *__pyx_n_s_S; static PyObject *__pyx_n_s_T; static PyObject *__pyx_n_s_TypeError; static PyObject *__pyx_kp_s_Unable_to_parse_s; static PyObject *__pyx_n_s_ValueError; static PyObject *__pyx_n_s_a; static PyObject *__pyx_n_s_adj; static PyObject *__pyx_n_s_adjust; static PyObject *__pyx_n_s_ai; static PyObject *__pyx_n_s_aold; static PyObject *__pyx_n_s_arange; static PyObject *__pyx_n_s_arg; static PyObject *__pyx_n_s_argsort; static PyObject *__pyx_n_s_argsorted; static PyObject *__pyx_n_s_arr; static PyObject *__pyx_n_s_array; static PyObject *__pyx_n_s_arrmap_bool; static PyObject *__pyx_n_s_arrmap_float32; static PyObject *__pyx_n_s_arrmap_float64; static PyObject *__pyx_n_s_arrmap_int32; static PyObject *__pyx_n_s_arrmap_int64; static PyObject *__pyx_n_s_arrmap_object; static PyObject *__pyx_n_s_as; static PyObject *__pyx_n_s_asarray; static PyObject *__pyx_n_s_ascending; static PyObject *__pyx_n_s_astype; static PyObject *__pyx_n_s_average; static PyObject *__pyx_n_s_avg; static PyObject *__pyx_n_s_avg_wgt; static PyObject *__pyx_n_s_axis; static PyObject *__pyx_n_s_b; static PyObject *__pyx_n_s_backfill_2d_inplace_bool; static PyObject *__pyx_n_s_backfill_2d_inplace_float32; static PyObject *__pyx_n_s_backfill_2d_inplace_float64; static PyObject *__pyx_n_s_backfill_2d_inplace_int32; static PyObject *__pyx_n_s_backfill_2d_inplace_int64; static PyObject *__pyx_n_s_backfill_2d_inplace_object; static PyObject *__pyx_n_s_backfill_bool; static PyObject *__pyx_n_s_backfill_float32; static PyObject *__pyx_n_s_backfill_float64; static PyObject *__pyx_n_s_backfill_inplace_bool; static PyObject *__pyx_n_s_backfill_inplace_float32; static PyObject *__pyx_n_s_backfill_inplace_float64; static PyObject *__pyx_n_s_backfill_inplace_int32; static PyObject *__pyx_n_s_backfill_inplace_int64; static PyObject *__pyx_n_s_backfill_inplace_object; static PyObject *__pyx_n_s_backfill_int32; static PyObject *__pyx_n_s_backfill_int64; static PyObject *__pyx_n_s_backfill_object; static PyObject *__pyx_n_s_bins; static PyObject *__pyx_n_s_buf; static PyObject *__pyx_n_s_bufarr; static PyObject *__pyx_n_s_c; static PyObject *__pyx_n_s_c_contiguous; static PyObject *__pyx_n_s_check_minp; static PyObject *__pyx_n_s_cmp; static PyObject *__pyx_n_s_com; static PyObject *__pyx_n_s_copy; static PyObject *__pyx_n_s_count; static PyObject *__pyx_n_s_counts; static PyObject *__pyx_n_s_counts_2; static PyObject *__pyx_n_s_cov; static PyObject *__pyx_n_s_ct; static PyObject *__pyx_n_s_cur; static PyObject *__pyx_n_s_data; static PyObject *__pyx_n_s_datetime; static PyObject *__pyx_n_s_day; static PyObject *__pyx_n_s_ddof; static PyObject *__pyx_n_s_diff_2d_float32; static PyObject *__pyx_n_s_diff_2d_float64; static PyObject *__pyx_n_s_diff_2d_int16; static PyObject *__pyx_n_s_diff_2d_int32; static PyObject *__pyx_n_s_diff_2d_int64; static PyObject *__pyx_n_s_diff_2d_int8; static PyObject *__pyx_n_s_dim; static PyObject *__pyx_n_s_dims; static PyObject *__pyx_n_s_divisor; static PyObject *__pyx_n_s_doc; static PyObject *__pyx_n_s_dtype; static PyObject *__pyx_n_s_dups; static PyObject *__pyx_n_s_e; static PyObject *__pyx_n_s_empty; static PyObject *__pyx_n_s_empty_like; static PyObject *__pyx_n_s_end; static PyObject *__pyx_n_s_eq; static PyObject *__pyx_n_s_ewma; static PyObject *__pyx_n_s_expected_size; static PyObject *__pyx_n_s_f8; static PyObject *__pyx_n_s_f_contiguous; static PyObject *__pyx_n_s_ffill_by_group; static PyObject *__pyx_n_s_ffill_indexer; static PyObject *__pyx_n_s_fill; static PyObject *__pyx_n_s_fill_count; static PyObject *__pyx_n_s_fill_value; static PyObject *__pyx_n_s_first; static PyObject *__pyx_kp_s_first_not_supported_for_non_nume; static PyObject *__pyx_n_s_flags; static PyObject *__pyx_n_s_float16; static PyObject *__pyx_n_s_float32; static PyObject *__pyx_n_s_float64; static PyObject *__pyx_n_s_full_outer_join; static PyObject *__pyx_n_s_func; static PyObject *__pyx_n_s_fv; static PyObject *__pyx_n_s_ge; static PyObject *__pyx_n_s_get; static PyObject *__pyx_n_s_get_result_indexer; static PyObject *__pyx_n_s_gid; static PyObject *__pyx_n_s_got_first; static PyObject *__pyx_n_s_group_add_bin_float32; static PyObject *__pyx_n_s_group_add_bin_float64; static PyObject *__pyx_n_s_group_add_float32; static PyObject *__pyx_n_s_group_add_float64; static PyObject *__pyx_n_s_group_ids; static PyObject *__pyx_n_s_group_labels; static PyObject *__pyx_n_s_group_last_bin_float32; static PyObject *__pyx_n_s_group_last_bin_float64; static PyObject *__pyx_n_s_group_last_bin_object; static PyObject *__pyx_n_s_group_last_float32; static PyObject *__pyx_n_s_group_last_float64; static PyObject *__pyx_n_s_group_last_object; static PyObject *__pyx_n_s_group_max_bin_float32; static PyObject *__pyx_n_s_group_max_bin_float64; static PyObject *__pyx_n_s_group_max_float32; static PyObject *__pyx_n_s_group_max_float64; static PyObject *__pyx_n_s_group_mean_bin_float32; static PyObject *__pyx_n_s_group_mean_bin_float64; static PyObject *__pyx_n_s_group_mean_float32; static PyObject *__pyx_n_s_group_mean_float64; static PyObject *__pyx_n_s_group_median; static PyObject *__pyx_n_s_group_min_bin_float32; static PyObject *__pyx_n_s_group_min_bin_float64; static PyObject *__pyx_n_s_group_min_float32; static PyObject *__pyx_n_s_group_min_float64; static PyObject *__pyx_n_s_group_nth_bin_float32; static PyObject *__pyx_n_s_group_nth_bin_float64; static PyObject *__pyx_n_s_group_nth_bin_object; static PyObject *__pyx_n_s_group_nth_float32; static PyObject *__pyx_n_s_group_nth_float64; static PyObject *__pyx_n_s_group_nth_object; static PyObject *__pyx_n_s_group_ohlc_float32; static PyObject *__pyx_n_s_group_ohlc_float64; static PyObject *__pyx_n_s_group_prod_bin_float32; static PyObject *__pyx_n_s_group_prod_bin_float64; static PyObject *__pyx_n_s_group_prod_float32; static PyObject *__pyx_n_s_group_prod_float64; static PyObject *__pyx_n_s_group_var_bin_float32; static PyObject *__pyx_n_s_group_var_bin_float64; static PyObject *__pyx_n_s_group_var_float32; static PyObject *__pyx_n_s_group_var_float64; static PyObject *__pyx_n_s_groupby_bool; static PyObject *__pyx_n_s_groupby_float32; static PyObject *__pyx_n_s_groupby_float64; static PyObject *__pyx_n_s_groupby_indices; static PyObject *__pyx_n_s_groupby_int32; static PyObject *__pyx_n_s_groupby_int64; static PyObject *__pyx_n_s_groupby_object; static PyObject *__pyx_n_s_groupsort_indexer; static PyObject *__pyx_n_s_gt; static PyObject *__pyx_kp_s_home_yoh_deb_gits_pkg_exppsy_pa; static PyObject *__pyx_n_s_hour; static PyObject *__pyx_n_s_i; static PyObject *__pyx_n_s_i0; static PyObject *__pyx_n_s_i8; static PyObject *__pyx_n_s_ids; static PyObject *__pyx_n_s_idx; static PyObject *__pyx_n_s_idx0; static PyObject *__pyx_n_s_idx1; static PyObject *__pyx_n_s_iinfo; static PyObject *__pyx_n_s_import; static PyObject *__pyx_n_s_in_arr; static PyObject *__pyx_n_s_in_i; static PyObject *__pyx_n_s_in_k; static PyObject *__pyx_n_s_in_n; static PyObject *__pyx_n_s_index; static PyObject *__pyx_kp_s_index_out_of_bounds; static PyObject *__pyx_n_s_indexer; static PyObject *__pyx_n_s_inf; static PyObject *__pyx_n_s_infs; static PyObject *__pyx_n_s_inner_join; static PyObject *__pyx_n_s_inner_join_indexer_float32; static PyObject *__pyx_n_s_inner_join_indexer_float64; static PyObject *__pyx_n_s_inner_join_indexer_int32; static PyObject *__pyx_n_s_inner_join_indexer_int64; static PyObject *__pyx_n_s_inner_join_indexer_object; static PyObject *__pyx_n_s_input; static PyObject *__pyx_n_s_insert; static PyObject *__pyx_n_s_int; static PyObject *__pyx_n_s_int16; static PyObject *__pyx_n_s_int32; static PyObject *__pyx_n_s_int64; static PyObject *__pyx_n_s_int8; static PyObject *__pyx_n_s_is_lexsorted; static PyObject *__pyx_n_s_is_monotonic_bool; static PyObject *__pyx_n_s_is_monotonic_float32; static PyObject *__pyx_n_s_is_monotonic_float64; static PyObject *__pyx_n_s_is_monotonic_int32; static PyObject *__pyx_n_s_is_monotonic_int64; static PyObject *__pyx_n_s_is_monotonic_object; static PyObject *__pyx_n_s_is_unique; static PyObject *__pyx_n_s_isfinite; static PyObject *__pyx_n_s_isnan; static PyObject *__pyx_n_s_isnullobj; static PyObject *__pyx_n_s_isnullobj2d; static PyObject *__pyx_n_s_j; static PyObject *__pyx_n_s_k; static PyObject *__pyx_n_s_keep; static PyObject *__pyx_n_s_keep_na; static PyObject *__pyx_n_s_key; static PyObject *__pyx_n_s_kind; static PyObject *__pyx_n_s_kth_smallest; static PyObject *__pyx_n_s_l; static PyObject *__pyx_n_s_lab; static PyObject *__pyx_n_s_label; static PyObject *__pyx_n_s_labels; static PyObject *__pyx_n_s_lambda; static PyObject *__pyx_n_s_last; static PyObject *__pyx_n_s_last_obs; static PyObject *__pyx_n_s_lc; static PyObject *__pyx_n_s_le; static PyObject *__pyx_n_s_left; static PyObject *__pyx_n_s_left_count; static PyObject *__pyx_n_s_left_indexer; static PyObject *__pyx_n_s_left_join_indexer_float32; static PyObject *__pyx_n_s_left_join_indexer_float64; static PyObject *__pyx_n_s_left_join_indexer_int32; static PyObject *__pyx_n_s_left_join_indexer_int64; static PyObject *__pyx_n_s_left_join_indexer_object; static PyObject *__pyx_n_s_left_join_indexer_unique_float32; static PyObject *__pyx_n_s_left_join_indexer_unique_float64; static PyObject *__pyx_n_s_left_join_indexer_unique_int32; static PyObject *__pyx_n_s_left_join_indexer_unique_int64; static PyObject *__pyx_n_s_left_join_indexer_unique_object; static PyObject *__pyx_n_s_left_outer_join; static PyObject *__pyx_n_s_left_pos; static PyObject *__pyx_n_s_left_sorter; static PyObject *__pyx_kp_s_len_index_len_labels; static PyObject *__pyx_n_s_length; static PyObject *__pyx_n_s_lib; static PyObject *__pyx_n_s_lim; static PyObject *__pyx_n_s_limit; static PyObject *__pyx_n_s_lindexer; static PyObject *__pyx_n_s_list_of_arrays; static PyObject *__pyx_n_s_loc; static PyObject *__pyx_n_s_lt; static PyObject *__pyx_n_s_lval; static PyObject *__pyx_n_s_m; static PyObject *__pyx_n_s_main; static PyObject *__pyx_n_s_mask; static PyObject *__pyx_n_s_maskedx; static PyObject *__pyx_n_s_maskedy; static PyObject *__pyx_n_s_mat; static PyObject *__pyx_n_s_max; static PyObject *__pyx_n_s_max_group; static PyObject *__pyx_n_s_max_groups; static PyObject *__pyx_n_s_max_subseq; static PyObject *__pyx_n_s_maxx; static PyObject *__pyx_n_s_maybe_convert_objects; static PyObject *__pyx_n_s_mean; static PyObject *__pyx_n_s_meanx; static PyObject *__pyx_n_s_meany; static PyObject *__pyx_n_s_median; static PyObject *__pyx_n_s_members; static PyObject *__pyx_n_s_mergesort; static PyObject *__pyx_n_s_metaclass; static PyObject *__pyx_n_s_microsecond; static PyObject *__pyx_n_s_midpoint; static PyObject *__pyx_n_s_min; static PyObject *__pyx_kp_s_min_periods_d_must_be_window_d; static PyObject *__pyx_kp_s_min_periods_must_be_0; static PyObject *__pyx_n_s_min_subseq; static PyObject *__pyx_n_s_minp; static PyObject *__pyx_n_s_minpair; static PyObject *__pyx_n_s_minute; static PyObject *__pyx_n_s_minx; static PyObject *__pyx_n_s_module; static PyObject *__pyx_n_s_month; static PyObject *__pyx_n_s_n; static PyObject *__pyx_n_s_n0; static PyObject *__pyx_n_s_na_option; static PyObject *__pyx_n_s_nan; static PyObject *__pyx_n_s_nan_value; static PyObject *__pyx_n_s_nancorr; static PyObject *__pyx_n_s_nancorr_spearman; static PyObject *__pyx_n_s_nbins; 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_ne; static PyObject *__pyx_n_s_neg_ct; static PyObject *__pyx_n_s_new; static PyObject *__pyx_n_s_neww; static PyObject *__pyx_n_s_next; static PyObject *__pyx_n_s_ngroups; static PyObject *__pyx_n_s_nleft; static PyObject *__pyx_n_s_nlevels; static PyObject *__pyx_n_s_nobs; static PyObject *__pyx_n_s_nonzero; static PyObject *__pyx_n_s_np; static PyObject *__pyx_n_s_nright; static PyObject *__pyx_n_s_numpy; static PyObject *__pyx_n_s_o; static PyObject *__pyx_n_s_object; static PyObject *__pyx_n_s_object_2; static PyObject *__pyx_n_s_offset; static PyObject *__pyx_n_s_old; static PyObject *__pyx_n_s_oldbuf; static PyObject *__pyx_n_s_oldw; static PyObject *__pyx_n_s_ones_like; static PyObject *__pyx_n_s_other; static PyObject *__pyx_n_s_out; static PyObject *__pyx_n_s_outer_join_indexer_float32; static PyObject *__pyx_n_s_outer_join_indexer_float64; static PyObject *__pyx_n_s_outer_join_indexer_int32; static PyObject *__pyx_n_s_outer_join_indexer_int64; static PyObject *__pyx_n_s_outer_join_indexer_object; static PyObject *__pyx_n_s_output; static PyObject *__pyx_n_s_pad_2d_inplace_bool; static PyObject *__pyx_n_s_pad_2d_inplace_float32; static PyObject *__pyx_n_s_pad_2d_inplace_float64; static PyObject *__pyx_n_s_pad_2d_inplace_int32; static PyObject *__pyx_n_s_pad_2d_inplace_int64; static PyObject *__pyx_n_s_pad_2d_inplace_object; static PyObject *__pyx_n_s_pad_bool; static PyObject *__pyx_n_s_pad_float32; static PyObject *__pyx_n_s_pad_float64; static PyObject *__pyx_n_s_pad_inplace_bool; static PyObject *__pyx_n_s_pad_inplace_float32; static PyObject *__pyx_n_s_pad_inplace_float64; static PyObject *__pyx_n_s_pad_inplace_int32; static PyObject *__pyx_n_s_pad_inplace_int64; static PyObject *__pyx_n_s_pad_inplace_object; static PyObject *__pyx_n_s_pad_int32; static PyObject *__pyx_n_s_pad_int64; static PyObject *__pyx_n_s_pad_object; static PyObject *__pyx_n_s_pandas; static PyObject *__pyx_n_s_pandas_algos; static PyObject *__pyx_n_s_pandas_lib; static PyObject *__pyx_kp_s_pandas_src_generated_pyx; static PyObject *__pyx_kp_s_pandas_src_join_pyx; static PyObject *__pyx_n_s_periods; static PyObject *__pyx_n_s_position; static PyObject *__pyx_n_s_pre; static PyObject *__pyx_n_s_prepare; static PyObject *__pyx_n_s_prev; static PyObject *__pyx_n_s_prodx; static PyObject *__pyx_n_s_ptr; static PyObject *__pyx_n_s_put; static PyObject *__pyx_n_s_putmask; static PyObject *__pyx_n_s_pydatetime; static PyObject *__pyx_n_s_pyx_getbuffer; static PyObject *__pyx_n_s_pyx_releasebuffer; static PyObject *__pyx_n_s_pyx_vtable; static PyObject *__pyx_n_s_qualname; static PyObject *__pyx_n_s_quantile; static PyObject *__pyx_n_s_random; static PyObject *__pyx_n_s_range; static PyObject *__pyx_n_s_rank; static PyObject *__pyx_n_s_rank_1d_float64; static PyObject *__pyx_n_s_rank_1d_generic; static PyObject *__pyx_n_s_rank_1d_int64; static PyObject *__pyx_n_s_rank_2d_float64; static PyObject *__pyx_n_s_rank_2d_generic; static PyObject *__pyx_n_s_rank_2d_int64; static PyObject *__pyx_n_s_ranks; static PyObject *__pyx_n_s_rc; static PyObject *__pyx_n_s_remove; static PyObject *__pyx_n_s_res; static PyObject *__pyx_n_s_result; static PyObject *__pyx_n_s_resx; static PyObject *__pyx_n_s_ret; static PyObject *__pyx_n_s_retry; static PyObject *__pyx_n_s_return_false; static PyObject *__pyx_n_s_return_true; static PyObject *__pyx_n_s_rev; static PyObject *__pyx_n_s_reverse; static PyObject *__pyx_n_s_right; static PyObject *__pyx_n_s_right_count; static PyObject *__pyx_n_s_right_indexer; static PyObject *__pyx_n_s_right_pos; static PyObject *__pyx_n_s_right_sorter; static PyObject *__pyx_n_s_rindexer; static PyObject *__pyx_n_s_ring; static PyObject *__pyx_n_s_roll_generic; static PyObject *__pyx_n_s_roll_kurt; static PyObject *__pyx_n_s_roll_max; static PyObject *__pyx_n_s_roll_max2; static PyObject *__pyx_n_s_roll_mean; static PyObject *__pyx_n_s_roll_median_c; static PyObject *__pyx_n_s_roll_median_cython; static PyObject *__pyx_n_s_roll_min; static PyObject *__pyx_n_s_roll_min2; static PyObject *__pyx_n_s_roll_quantile; static PyObject *__pyx_n_s_roll_skew; static PyObject *__pyx_n_s_roll_sum; static PyObject *__pyx_n_s_roll_var; static PyObject *__pyx_n_s_roll_window; static PyObject *__pyx_n_s_rval; static PyObject *__pyx_n_s_s; static PyObject *__pyx_n_s_second; static PyObject *__pyx_n_s_seen; static PyObject *__pyx_n_s_self; static PyObject *__pyx_n_s_shape; static PyObject *__pyx_n_s_size; static PyObject *__pyx_n_s_skiplist; static PyObject *__pyx_n_s_sl; static PyObject *__pyx_n_s_sort; static PyObject *__pyx_n_s_sorted_data; static PyObject *__pyx_n_s_sorter; static PyObject *__pyx_n_s_start; static PyObject *__pyx_n_s_stop; static PyObject *__pyx_n_s_sum_ranks; static PyObject *__pyx_n_s_sum_x; static PyObject *__pyx_n_s_sum_xx; static PyObject *__pyx_n_s_sumx; static PyObject *__pyx_n_s_sumxx; static PyObject *__pyx_n_s_sumy; static PyObject *__pyx_n_s_sumyy; static PyObject *__pyx_n_s_sx; static PyObject *__pyx_n_s_sy; static PyObject *__pyx_n_s_t; static PyObject *__pyx_n_s_take; static PyObject *__pyx_n_s_take_1d_bool_bool; static PyObject *__pyx_n_s_take_1d_bool_object; static PyObject *__pyx_n_s_take_1d_float32_float32; static PyObject *__pyx_n_s_take_1d_float32_float64; static PyObject *__pyx_n_s_take_1d_float64_float64; static PyObject *__pyx_n_s_take_1d_int16_float64; static PyObject *__pyx_n_s_take_1d_int16_int16; static PyObject *__pyx_n_s_take_1d_int16_int32; static PyObject *__pyx_n_s_take_1d_int16_int64; static PyObject *__pyx_n_s_take_1d_int32_float64; static PyObject *__pyx_n_s_take_1d_int32_int32; static PyObject *__pyx_n_s_take_1d_int32_int64; static PyObject *__pyx_n_s_take_1d_int64_float64; static PyObject *__pyx_n_s_take_1d_int64_int64; static PyObject *__pyx_n_s_take_1d_int8_float64; static PyObject *__pyx_n_s_take_1d_int8_int32; static PyObject *__pyx_n_s_take_1d_int8_int64; static PyObject *__pyx_n_s_take_1d_int8_int8; static PyObject *__pyx_n_s_take_1d_object_object; static PyObject *__pyx_n_s_take_2d_axis0_bool_bool; static PyObject *__pyx_n_s_take_2d_axis0_bool_object; static PyObject *__pyx_n_s_take_2d_axis0_float32_float32; static PyObject *__pyx_n_s_take_2d_axis0_float32_float64; static PyObject *__pyx_n_s_take_2d_axis0_float64_float64; static PyObject *__pyx_n_s_take_2d_axis0_int16_float64; static PyObject *__pyx_n_s_take_2d_axis0_int16_int16; static PyObject *__pyx_n_s_take_2d_axis0_int16_int32; static PyObject *__pyx_n_s_take_2d_axis0_int16_int64; static PyObject *__pyx_n_s_take_2d_axis0_int32_float64; static PyObject *__pyx_n_s_take_2d_axis0_int32_int32; static PyObject *__pyx_n_s_take_2d_axis0_int32_int64; static PyObject *__pyx_n_s_take_2d_axis0_int64_float64; static PyObject *__pyx_n_s_take_2d_axis0_int64_int64; static PyObject *__pyx_n_s_take_2d_axis0_int8_float64; static PyObject *__pyx_n_s_take_2d_axis0_int8_int32; static PyObject *__pyx_n_s_take_2d_axis0_int8_int64; static PyObject *__pyx_n_s_take_2d_axis0_int8_int8; static PyObject *__pyx_n_s_take_2d_axis0_object_object; static PyObject *__pyx_n_s_take_2d_axis1_bool_bool; static PyObject *__pyx_n_s_take_2d_axis1_bool_object; static PyObject *__pyx_n_s_take_2d_axis1_float32_float32; static PyObject *__pyx_n_s_take_2d_axis1_float32_float64; static PyObject *__pyx_n_s_take_2d_axis1_float64_float64; static PyObject *__pyx_n_s_take_2d_axis1_int16_float64; static PyObject *__pyx_n_s_take_2d_axis1_int16_int16; static PyObject *__pyx_n_s_take_2d_axis1_int16_int32; static PyObject *__pyx_n_s_take_2d_axis1_int16_int64; static PyObject *__pyx_n_s_take_2d_axis1_int32_float64; static PyObject *__pyx_n_s_take_2d_axis1_int32_int32; static PyObject *__pyx_n_s_take_2d_axis1_int32_int64; static PyObject *__pyx_n_s_take_2d_axis1_int64_float64; static PyObject *__pyx_n_s_take_2d_axis1_int64_int64; static PyObject *__pyx_n_s_take_2d_axis1_int8_float64; static PyObject *__pyx_n_s_take_2d_axis1_int8_int32; static PyObject *__pyx_n_s_take_2d_axis1_int8_int64; static PyObject *__pyx_n_s_take_2d_axis1_int8_int8; static PyObject *__pyx_n_s_take_2d_axis1_object_object; static PyObject *__pyx_n_s_take_2d_multi_bool_bool; static PyObject *__pyx_n_s_take_2d_multi_bool_object; static PyObject *__pyx_n_s_take_2d_multi_float32_float32; static PyObject *__pyx_n_s_take_2d_multi_float32_float64; static PyObject *__pyx_n_s_take_2d_multi_float64_float64; static PyObject *__pyx_n_s_take_2d_multi_int16_float64; static PyObject *__pyx_n_s_take_2d_multi_int16_int16; static PyObject *__pyx_n_s_take_2d_multi_int16_int32; static PyObject *__pyx_n_s_take_2d_multi_int16_int64; static PyObject *__pyx_n_s_take_2d_multi_int32_float64; static PyObject *__pyx_n_s_take_2d_multi_int32_int32; static PyObject *__pyx_n_s_take_2d_multi_int32_int64; static PyObject *__pyx_n_s_take_2d_multi_int64_float64; static PyObject *__pyx_n_s_take_2d_multi_int64_int64; static PyObject *__pyx_n_s_take_2d_multi_int8_float64; static PyObject *__pyx_n_s_take_2d_multi_int8_int32; static PyObject *__pyx_n_s_take_2d_multi_int8_int64; static PyObject *__pyx_n_s_take_2d_multi_int8_int8; static PyObject *__pyx_n_s_take_2d_multi_object_object; static PyObject *__pyx_n_s_test; static PyObject *__pyx_n_s_tiebreak; static PyObject *__pyx_n_s_tiebreakers; static PyObject *__pyx_n_s_ties_method; static PyObject *__pyx_n_s_top; static PyObject *__pyx_n_s_tot_wgt; static PyObject *__pyx_n_s_uint8; static PyObject *__pyx_kp_u_unknown_dtype_code_in_numpy_pxd; static PyObject *__pyx_n_s_v; static PyObject *__pyx_n_s_val; static PyObject *__pyx_n_s_val_in; static PyObject *__pyx_n_s_val_win; static PyObject *__pyx_n_s_valid_locs; static PyObject *__pyx_n_s_value; static PyObject *__pyx_n_s_values; static PyObject *__pyx_n_s_vclose; static PyObject *__pyx_n_s_vecs; static PyObject *__pyx_n_s_vhigh; static PyObject *__pyx_n_s_view; static PyObject *__pyx_n_s_vlow; static PyObject *__pyx_n_s_vopen; static PyObject *__pyx_n_s_vx; static PyObject *__pyx_n_s_vy; static PyObject *__pyx_n_s_w; static PyObject *__pyx_n_s_weights; static PyObject *__pyx_n_s_where; static PyObject *__pyx_n_s_width; static PyObject *__pyx_n_s_win; static PyObject *__pyx_n_s_win_i; static PyObject *__pyx_n_s_win_k; static PyObject *__pyx_n_s_win_n; static PyObject *__pyx_n_s_window; static PyObject *__pyx_n_s_x; static PyObject *__pyx_n_s_xi; static PyObject *__pyx_n_s_xx; static PyObject *__pyx_n_s_xxx; static PyObject *__pyx_n_s_xxxx; static PyObject *__pyx_n_s_y; static PyObject *__pyx_n_s_year; static PyObject *__pyx_n_s_yi; static PyObject *__pyx_n_s_z; static PyObject *__pyx_n_s_zeros; static PyObject *__pyx_n_s_zeros_like; static PyObject *__pyx_int_0; static PyObject *__pyx_int_1; static PyObject *__pyx_int_2; static PyObject *__pyx_int_15; static PyObject *__pyx_int_100; static PyObject *__pyx_int_neg_1; static PyObject *__pyx_k__101; static PyObject *__pyx_k__102; static PyObject *__pyx_k__103; static PyObject *__pyx_k__104; static PyObject *__pyx_k__105; static PyObject *__pyx_k__106; static PyObject *__pyx_k__107; static PyObject *__pyx_k__108; static PyObject *__pyx_k__109; static PyObject *__pyx_k__110; static PyObject *__pyx_k__111; static PyObject *__pyx_k__112; static PyObject *__pyx_k__113; static PyObject *__pyx_k__114; static PyObject *__pyx_k__115; static PyObject *__pyx_k__116; static PyObject *__pyx_k__117; static PyObject *__pyx_k__118; static PyObject *__pyx_k__119; static PyObject *__pyx_k__120; static PyObject *__pyx_k__121; static PyObject *__pyx_k__122; static PyObject *__pyx_k__123; static PyObject *__pyx_k__124; static PyObject *__pyx_k__125; static PyObject *__pyx_k__126; static PyObject *__pyx_k__127; static PyObject *__pyx_k__128; static PyObject *__pyx_k__129; static PyObject *__pyx_k__130; static PyObject *__pyx_k__131; static PyObject *__pyx_k__132; static PyObject *__pyx_k__133; static PyObject *__pyx_k__134; static PyObject *__pyx_k__135; static PyObject *__pyx_k__136; static PyObject *__pyx_k__137; static PyObject *__pyx_k__138; static PyObject *__pyx_k__139; static PyObject *__pyx_k__140; static PyObject *__pyx_k__141; static PyObject *__pyx_k__142; static PyObject *__pyx_k__143; static PyObject *__pyx_k__144; static PyObject *__pyx_k__145; static PyObject *__pyx_k__146; static PyObject *__pyx_k__147; static PyObject *__pyx_k__148; static PyObject *__pyx_k__149; static PyObject *__pyx_k__150; static PyObject *__pyx_k__151; static PyObject *__pyx_k__152; static PyObject *__pyx_k__153; static PyObject *__pyx_k__154; static PyObject *__pyx_k__155; static PyObject *__pyx_k__156; static PyObject *__pyx_k__157; static PyObject *__pyx_k__158; static PyObject *__pyx_k__159; static PyObject *__pyx_k__160; static PyObject *__pyx_k__161; static PyObject *__pyx_k__162; static PyObject *__pyx_k__163; static PyObject *__pyx_k__164; static PyObject *__pyx_k__165; static PyObject *__pyx_k__166; static PyObject *__pyx_k__167; static PyObject *__pyx_k__168; static PyObject *__pyx_k__169; static PyObject *__pyx_k__170; static PyObject *__pyx_k__171; static PyObject *__pyx_k__172; static PyObject *__pyx_k__173; static PyObject *__pyx_k__174; static PyObject *__pyx_k__175; static PyObject *__pyx_k__176; static PyObject *__pyx_tuple_; static PyObject *__pyx_slice__2; static PyObject *__pyx_slice__4; static PyObject *__pyx_slice__7; static PyObject *__pyx_slice__8; static PyObject *__pyx_tuple__3; static PyObject *__pyx_tuple__5; static PyObject *__pyx_tuple__6; static PyObject *__pyx_tuple__9; static PyObject *__pyx_slice__12; static PyObject *__pyx_slice__13; static PyObject *__pyx_slice__17; static PyObject *__pyx_slice__22; static PyObject *__pyx_slice__23; static PyObject *__pyx_slice__31; static PyObject *__pyx_slice__32; static PyObject *__pyx_tuple__10; static PyObject *__pyx_tuple__11; static PyObject *__pyx_tuple__14; static PyObject *__pyx_tuple__15; static PyObject *__pyx_tuple__16; static PyObject *__pyx_tuple__18; static PyObject *__pyx_tuple__19; static PyObject *__pyx_tuple__20; static PyObject *__pyx_tuple__21; static PyObject *__pyx_tuple__24; static PyObject *__pyx_tuple__25; static PyObject *__pyx_tuple__26; static PyObject *__pyx_tuple__27; static PyObject *__pyx_tuple__28; static PyObject *__pyx_tuple__29; static PyObject *__pyx_tuple__30; static PyObject *__pyx_tuple__33; static PyObject *__pyx_tuple__34; static PyObject *__pyx_tuple__35; static PyObject *__pyx_tuple__36; static PyObject *__pyx_tuple__37; static PyObject *__pyx_tuple__38; static PyObject *__pyx_tuple__39; static PyObject *__pyx_tuple__40; static PyObject *__pyx_tuple__41; static PyObject *__pyx_tuple__42; static PyObject *__pyx_tuple__43; static PyObject *__pyx_tuple__44; static PyObject *__pyx_tuple__45; static PyObject *__pyx_tuple__46; static PyObject *__pyx_tuple__47; static PyObject *__pyx_tuple__48; static PyObject *__pyx_tuple__49; static PyObject *__pyx_tuple__50; static PyObject *__pyx_tuple__51; static PyObject *__pyx_tuple__52; static PyObject *__pyx_tuple__53; static PyObject *__pyx_tuple__54; static PyObject *__pyx_tuple__55; static PyObject *__pyx_tuple__56; static PyObject *__pyx_tuple__57; static PyObject *__pyx_tuple__58; static PyObject *__pyx_tuple__59; static PyObject *__pyx_tuple__60; static PyObject *__pyx_tuple__61; static PyObject *__pyx_tuple__62; static PyObject *__pyx_tuple__63; static PyObject *__pyx_tuple__64; static PyObject *__pyx_tuple__65; static PyObject *__pyx_tuple__66; static PyObject *__pyx_tuple__67; static PyObject *__pyx_tuple__68; static PyObject *__pyx_tuple__69; static PyObject *__pyx_tuple__70; static PyObject *__pyx_tuple__71; static PyObject *__pyx_tuple__72; static PyObject *__pyx_tuple__73; static PyObject *__pyx_tuple__74; static PyObject *__pyx_tuple__75; static PyObject *__pyx_tuple__76; static PyObject *__pyx_tuple__77; static PyObject *__pyx_tuple__78; static PyObject *__pyx_tuple__79; static PyObject *__pyx_tuple__80; static PyObject *__pyx_tuple__81; static PyObject *__pyx_tuple__82; static PyObject *__pyx_tuple__83; static PyObject *__pyx_tuple__84; static PyObject *__pyx_tuple__85; static PyObject *__pyx_tuple__86; static PyObject *__pyx_tuple__87; static PyObject *__pyx_tuple__88; static PyObject *__pyx_tuple__89; static PyObject *__pyx_tuple__90; static PyObject *__pyx_tuple__91; static PyObject *__pyx_tuple__92; static PyObject *__pyx_tuple__93; static PyObject *__pyx_tuple__94; static PyObject *__pyx_tuple__95; static PyObject *__pyx_tuple__96; static PyObject *__pyx_tuple__97; static PyObject *__pyx_tuple__98; static PyObject *__pyx_tuple__99; static PyObject *__pyx_tuple__100; static PyObject *__pyx_tuple__177; static PyObject *__pyx_tuple__178; static PyObject *__pyx_tuple__179; static PyObject *__pyx_tuple__180; static PyObject *__pyx_tuple__181; static PyObject *__pyx_tuple__182; static PyObject *__pyx_tuple__183; static PyObject *__pyx_tuple__184; static PyObject *__pyx_tuple__185; static PyObject *__pyx_tuple__186; static PyObject *__pyx_tuple__187; static PyObject *__pyx_tuple__188; static PyObject *__pyx_tuple__189; static PyObject *__pyx_tuple__190; static PyObject *__pyx_tuple__191; static PyObject *__pyx_tuple__192; static PyObject *__pyx_tuple__193; static PyObject *__pyx_tuple__194; static PyObject *__pyx_tuple__195; static PyObject *__pyx_tuple__196; static PyObject *__pyx_tuple__197; static PyObject *__pyx_tuple__198; static PyObject *__pyx_tuple__199; static PyObject *__pyx_tuple__200; static PyObject *__pyx_tuple__201; static PyObject *__pyx_tuple__202; static PyObject *__pyx_tuple__203; static PyObject *__pyx_tuple__205; static PyObject *__pyx_tuple__207; static PyObject *__pyx_tuple__209; static PyObject *__pyx_tuple__211; static PyObject *__pyx_tuple__213; static PyObject *__pyx_tuple__215; static PyObject *__pyx_tuple__217; static PyObject *__pyx_tuple__219; static PyObject *__pyx_tuple__221; static PyObject *__pyx_tuple__223; static PyObject *__pyx_tuple__225; static PyObject *__pyx_tuple__227; static PyObject *__pyx_tuple__229; static PyObject *__pyx_tuple__231; static PyObject *__pyx_tuple__233; static PyObject *__pyx_tuple__235; static PyObject *__pyx_tuple__237; static PyObject *__pyx_tuple__239; static PyObject *__pyx_tuple__241; static PyObject *__pyx_tuple__243; static PyObject *__pyx_tuple__245; static PyObject *__pyx_tuple__247; static PyObject *__pyx_tuple__249; static PyObject *__pyx_tuple__251; static PyObject *__pyx_tuple__253; static PyObject *__pyx_tuple__255; static PyObject *__pyx_tuple__257; static PyObject *__pyx_tuple__259; static PyObject *__pyx_tuple__261; static PyObject *__pyx_tuple__263; static PyObject *__pyx_tuple__265; static PyObject *__pyx_tuple__267; static PyObject *__pyx_tuple__269; static PyObject *__pyx_tuple__271; static PyObject *__pyx_tuple__273; static PyObject *__pyx_tuple__275; static PyObject *__pyx_tuple__277; static PyObject *__pyx_tuple__279; static PyObject *__pyx_tuple__281; static PyObject *__pyx_tuple__283; static PyObject *__pyx_tuple__285; static PyObject *__pyx_tuple__287; static PyObject *__pyx_tuple__289; static PyObject *__pyx_tuple__290; static PyObject *__pyx_tuple__292; static PyObject *__pyx_tuple__294; static PyObject *__pyx_tuple__296; static PyObject *__pyx_tuple__298; static PyObject *__pyx_tuple__300; static PyObject *__pyx_tuple__302; static PyObject *__pyx_tuple__304; static PyObject *__pyx_tuple__306; static PyObject *__pyx_tuple__308; static PyObject *__pyx_tuple__310; static PyObject *__pyx_tuple__312; static PyObject *__pyx_tuple__314; static PyObject *__pyx_tuple__316; static PyObject *__pyx_tuple__318; static PyObject *__pyx_tuple__320; static PyObject *__pyx_tuple__322; static PyObject *__pyx_tuple__324; static PyObject *__pyx_tuple__326; static PyObject *__pyx_tuple__328; static PyObject *__pyx_tuple__330; static PyObject *__pyx_tuple__332; static PyObject *__pyx_tuple__334; static PyObject *__pyx_tuple__336; static PyObject *__pyx_tuple__338; static PyObject *__pyx_tuple__340; static PyObject *__pyx_tuple__342; static PyObject *__pyx_tuple__344; static PyObject *__pyx_tuple__346; static PyObject *__pyx_tuple__348; static PyObject *__pyx_tuple__350; static PyObject *__pyx_tuple__352; static PyObject *__pyx_tuple__354; static PyObject *__pyx_tuple__356; static PyObject *__pyx_tuple__358; static PyObject *__pyx_tuple__360; static PyObject *__pyx_tuple__362; static PyObject *__pyx_tuple__364; static PyObject *__pyx_tuple__366; static PyObject *__pyx_tuple__368; static PyObject *__pyx_tuple__370; static PyObject *__pyx_tuple__372; static PyObject *__pyx_tuple__374; static PyObject *__pyx_tuple__376; static PyObject *__pyx_tuple__378; static PyObject *__pyx_tuple__380; static PyObject *__pyx_tuple__382; static PyObject *__pyx_tuple__384; static PyObject *__pyx_tuple__386; static PyObject *__pyx_tuple__388; static PyObject *__pyx_tuple__390; static PyObject *__pyx_tuple__392; static PyObject *__pyx_tuple__394; static PyObject *__pyx_tuple__396; static PyObject *__pyx_tuple__398; static PyObject *__pyx_tuple__400; static PyObject *__pyx_tuple__402; static PyObject *__pyx_tuple__404; static PyObject *__pyx_tuple__406; static PyObject *__pyx_tuple__408; static PyObject *__pyx_tuple__410; static PyObject *__pyx_tuple__412; static PyObject *__pyx_tuple__414; static PyObject *__pyx_tuple__416; static PyObject *__pyx_tuple__418; static PyObject *__pyx_tuple__420; static PyObject *__pyx_tuple__422; static PyObject *__pyx_tuple__424; static PyObject *__pyx_tuple__426; static PyObject *__pyx_tuple__428; static PyObject *__pyx_tuple__430; static PyObject *__pyx_tuple__432; static PyObject *__pyx_tuple__434; static PyObject *__pyx_tuple__436; static PyObject *__pyx_tuple__438; static PyObject *__pyx_tuple__440; static PyObject *__pyx_tuple__442; static PyObject *__pyx_tuple__444; static PyObject *__pyx_tuple__446; static PyObject *__pyx_tuple__448; static PyObject *__pyx_tuple__450; static PyObject *__pyx_tuple__452; static PyObject *__pyx_tuple__454; static PyObject *__pyx_tuple__456; static PyObject *__pyx_tuple__458; static PyObject *__pyx_tuple__460; static PyObject *__pyx_tuple__462; static PyObject *__pyx_tuple__464; static PyObject *__pyx_tuple__466; static PyObject *__pyx_tuple__468; static PyObject *__pyx_tuple__470; static PyObject *__pyx_tuple__472; static PyObject *__pyx_tuple__474; static PyObject *__pyx_tuple__476; static PyObject *__pyx_tuple__478; static PyObject *__pyx_tuple__480; static PyObject *__pyx_tuple__482; static PyObject *__pyx_tuple__484; static PyObject *__pyx_tuple__486; static PyObject *__pyx_tuple__488; static PyObject *__pyx_tuple__490; static PyObject *__pyx_tuple__492; static PyObject *__pyx_tuple__494; static PyObject *__pyx_tuple__496; static PyObject *__pyx_tuple__498; static PyObject *__pyx_tuple__500; static PyObject *__pyx_tuple__502; static PyObject *__pyx_tuple__504; static PyObject *__pyx_tuple__506; static PyObject *__pyx_tuple__508; static PyObject *__pyx_tuple__510; static PyObject *__pyx_tuple__512; static PyObject *__pyx_tuple__514; static PyObject *__pyx_tuple__516; static PyObject *__pyx_tuple__518; static PyObject *__pyx_tuple__520; static PyObject *__pyx_tuple__522; static PyObject *__pyx_tuple__524; static PyObject *__pyx_tuple__526; static PyObject *__pyx_tuple__528; static PyObject *__pyx_tuple__530; static PyObject *__pyx_tuple__532; static PyObject *__pyx_tuple__534; static PyObject *__pyx_tuple__536; static PyObject *__pyx_tuple__538; static PyObject *__pyx_tuple__540; static PyObject *__pyx_tuple__542; static PyObject *__pyx_tuple__544; static PyObject *__pyx_tuple__546; static PyObject *__pyx_tuple__548; static PyObject *__pyx_tuple__550; static PyObject *__pyx_tuple__552; static PyObject *__pyx_tuple__554; static PyObject *__pyx_tuple__556; static PyObject *__pyx_tuple__558; static PyObject *__pyx_tuple__560; static PyObject *__pyx_tuple__562; static PyObject *__pyx_tuple__564; static PyObject *__pyx_tuple__566; static PyObject *__pyx_tuple__568; static PyObject *__pyx_tuple__570; static PyObject *__pyx_tuple__572; static PyObject *__pyx_tuple__574; static PyObject *__pyx_tuple__576; static PyObject *__pyx_tuple__578; static PyObject *__pyx_tuple__580; static PyObject *__pyx_tuple__582; static PyObject *__pyx_tuple__584; static PyObject *__pyx_tuple__586; static PyObject *__pyx_tuple__588; static PyObject *__pyx_tuple__590; static PyObject *__pyx_tuple__592; static PyObject *__pyx_tuple__594; static PyObject *__pyx_tuple__596; static PyObject *__pyx_tuple__598; static PyObject *__pyx_tuple__600; static PyObject *__pyx_tuple__602; static PyObject *__pyx_tuple__604; static PyObject *__pyx_tuple__606; static PyObject *__pyx_tuple__608; static PyObject *__pyx_tuple__610; static PyObject *__pyx_tuple__612; static PyObject *__pyx_tuple__614; static PyObject *__pyx_tuple__616; static PyObject *__pyx_tuple__618; static PyObject *__pyx_tuple__620; static PyObject *__pyx_tuple__622; static PyObject *__pyx_tuple__624; static PyObject *__pyx_tuple__626; static PyObject *__pyx_tuple__628; static PyObject *__pyx_tuple__630; static PyObject *__pyx_tuple__632; static PyObject *__pyx_tuple__634; static PyObject *__pyx_tuple__636; static PyObject *__pyx_tuple__638; static PyObject *__pyx_tuple__640; static PyObject *__pyx_tuple__642; static PyObject *__pyx_tuple__644; static PyObject *__pyx_tuple__646; static PyObject *__pyx_tuple__648; static PyObject *__pyx_tuple__650; static PyObject *__pyx_tuple__652; static PyObject *__pyx_tuple__654; static PyObject *__pyx_tuple__656; static PyObject *__pyx_tuple__658; static PyObject *__pyx_tuple__660; static PyObject *__pyx_tuple__662; static PyObject *__pyx_tuple__664; static PyObject *__pyx_tuple__666; static PyObject *__pyx_tuple__668; static PyObject *__pyx_codeobj__204; static PyObject *__pyx_codeobj__206; static PyObject *__pyx_codeobj__208; static PyObject *__pyx_codeobj__210; static PyObject *__pyx_codeobj__212; static PyObject *__pyx_codeobj__214; static PyObject *__pyx_codeobj__216; static PyObject *__pyx_codeobj__218; static PyObject *__pyx_codeobj__220; static PyObject *__pyx_codeobj__222; static PyObject *__pyx_codeobj__224; static PyObject *__pyx_codeobj__226; static PyObject *__pyx_codeobj__228; static PyObject *__pyx_codeobj__230; static PyObject *__pyx_codeobj__232; static PyObject *__pyx_codeobj__234; static PyObject *__pyx_codeobj__236; static PyObject *__pyx_codeobj__238; static PyObject *__pyx_codeobj__240; static PyObject *__pyx_codeobj__242; static PyObject *__pyx_codeobj__244; static PyObject *__pyx_codeobj__246; static PyObject *__pyx_codeobj__248; static PyObject *__pyx_codeobj__250; static PyObject *__pyx_codeobj__252; static PyObject *__pyx_codeobj__254; static PyObject *__pyx_codeobj__256; static PyObject *__pyx_codeobj__258; static PyObject *__pyx_codeobj__260; static PyObject *__pyx_codeobj__262; static PyObject *__pyx_codeobj__264; static PyObject *__pyx_codeobj__266; static PyObject *__pyx_codeobj__268; static PyObject *__pyx_codeobj__270; static PyObject *__pyx_codeobj__272; static PyObject *__pyx_codeobj__274; static PyObject *__pyx_codeobj__276; static PyObject *__pyx_codeobj__278; static PyObject *__pyx_codeobj__280; static PyObject *__pyx_codeobj__282; static PyObject *__pyx_codeobj__284; static PyObject *__pyx_codeobj__286; static PyObject *__pyx_codeobj__288; static PyObject *__pyx_codeobj__291; static PyObject *__pyx_codeobj__293; static PyObject *__pyx_codeobj__295; static PyObject *__pyx_codeobj__297; static PyObject *__pyx_codeobj__299; static PyObject *__pyx_codeobj__301; static PyObject *__pyx_codeobj__303; static PyObject *__pyx_codeobj__305; static PyObject *__pyx_codeobj__307; static PyObject *__pyx_codeobj__309; static PyObject *__pyx_codeobj__311; static PyObject *__pyx_codeobj__313; static PyObject *__pyx_codeobj__315; static PyObject *__pyx_codeobj__317; static PyObject *__pyx_codeobj__319; static PyObject *__pyx_codeobj__321; static PyObject *__pyx_codeobj__323; static PyObject *__pyx_codeobj__325; static PyObject *__pyx_codeobj__327; static PyObject *__pyx_codeobj__329; static PyObject *__pyx_codeobj__331; static PyObject *__pyx_codeobj__333; static PyObject *__pyx_codeobj__335; static PyObject *__pyx_codeobj__337; static PyObject *__pyx_codeobj__339; static PyObject *__pyx_codeobj__341; static PyObject *__pyx_codeobj__343; static PyObject *__pyx_codeobj__345; static PyObject *__pyx_codeobj__347; static PyObject *__pyx_codeobj__349; static PyObject *__pyx_codeobj__351; static PyObject *__pyx_codeobj__353; static PyObject *__pyx_codeobj__355; static PyObject *__pyx_codeobj__357; static PyObject *__pyx_codeobj__359; static PyObject *__pyx_codeobj__361; static PyObject *__pyx_codeobj__363; static PyObject *__pyx_codeobj__365; static PyObject *__pyx_codeobj__367; static PyObject *__pyx_codeobj__369; static PyObject *__pyx_codeobj__371; static PyObject *__pyx_codeobj__373; static PyObject *__pyx_codeobj__375; static PyObject *__pyx_codeobj__377; static PyObject *__pyx_codeobj__379; static PyObject *__pyx_codeobj__381; static PyObject *__pyx_codeobj__383; static PyObject *__pyx_codeobj__385; static PyObject *__pyx_codeobj__387; static PyObject *__pyx_codeobj__389; static PyObject *__pyx_codeobj__391; static PyObject *__pyx_codeobj__393; static PyObject *__pyx_codeobj__395; static PyObject *__pyx_codeobj__397; static PyObject *__pyx_codeobj__399; static PyObject *__pyx_codeobj__401; static PyObject *__pyx_codeobj__403; static PyObject *__pyx_codeobj__405; static PyObject *__pyx_codeobj__407; static PyObject *__pyx_codeobj__409; static PyObject *__pyx_codeobj__411; static PyObject *__pyx_codeobj__413; static PyObject *__pyx_codeobj__415; static PyObject *__pyx_codeobj__417; static PyObject *__pyx_codeobj__419; static PyObject *__pyx_codeobj__421; static PyObject *__pyx_codeobj__423; static PyObject *__pyx_codeobj__425; static PyObject *__pyx_codeobj__427; static PyObject *__pyx_codeobj__429; static PyObject *__pyx_codeobj__431; static PyObject *__pyx_codeobj__433; static PyObject *__pyx_codeobj__435; static PyObject *__pyx_codeobj__437; static PyObject *__pyx_codeobj__439; static PyObject *__pyx_codeobj__441; static PyObject *__pyx_codeobj__443; static PyObject *__pyx_codeobj__445; static PyObject *__pyx_codeobj__447; static PyObject *__pyx_codeobj__449; static PyObject *__pyx_codeobj__451; static PyObject *__pyx_codeobj__453; static PyObject *__pyx_codeobj__455; static PyObject *__pyx_codeobj__457; static PyObject *__pyx_codeobj__459; static PyObject *__pyx_codeobj__461; static PyObject *__pyx_codeobj__463; static PyObject *__pyx_codeobj__465; static PyObject *__pyx_codeobj__467; static PyObject *__pyx_codeobj__469; static PyObject *__pyx_codeobj__471; static PyObject *__pyx_codeobj__473; static PyObject *__pyx_codeobj__475; static PyObject *__pyx_codeobj__477; static PyObject *__pyx_codeobj__479; static PyObject *__pyx_codeobj__481; static PyObject *__pyx_codeobj__483; static PyObject *__pyx_codeobj__485; static PyObject *__pyx_codeobj__487; static PyObject *__pyx_codeobj__489; static PyObject *__pyx_codeobj__491; static PyObject *__pyx_codeobj__493; static PyObject *__pyx_codeobj__495; static PyObject *__pyx_codeobj__497; static PyObject *__pyx_codeobj__499; static PyObject *__pyx_codeobj__501; static PyObject *__pyx_codeobj__503; static PyObject *__pyx_codeobj__505; static PyObject *__pyx_codeobj__507; static PyObject *__pyx_codeobj__509; static PyObject *__pyx_codeobj__511; static PyObject *__pyx_codeobj__513; static PyObject *__pyx_codeobj__515; static PyObject *__pyx_codeobj__517; static PyObject *__pyx_codeobj__519; static PyObject *__pyx_codeobj__521; static PyObject *__pyx_codeobj__523; static PyObject *__pyx_codeobj__525; static PyObject *__pyx_codeobj__527; static PyObject *__pyx_codeobj__529; static PyObject *__pyx_codeobj__531; static PyObject *__pyx_codeobj__533; static PyObject *__pyx_codeobj__535; static PyObject *__pyx_codeobj__537; static PyObject *__pyx_codeobj__539; static PyObject *__pyx_codeobj__541; static PyObject *__pyx_codeobj__543; static PyObject *__pyx_codeobj__545; static PyObject *__pyx_codeobj__547; static PyObject *__pyx_codeobj__549; static PyObject *__pyx_codeobj__551; static PyObject *__pyx_codeobj__553; static PyObject *__pyx_codeobj__555; static PyObject *__pyx_codeobj__557; static PyObject *__pyx_codeobj__559; static PyObject *__pyx_codeobj__561; static PyObject *__pyx_codeobj__563; static PyObject *__pyx_codeobj__565; static PyObject *__pyx_codeobj__567; static PyObject *__pyx_codeobj__569; static PyObject *__pyx_codeobj__571; static PyObject *__pyx_codeobj__573; static PyObject *__pyx_codeobj__575; static PyObject *__pyx_codeobj__577; static PyObject *__pyx_codeobj__579; static PyObject *__pyx_codeobj__581; static PyObject *__pyx_codeobj__583; static PyObject *__pyx_codeobj__585; static PyObject *__pyx_codeobj__587; static PyObject *__pyx_codeobj__589; static PyObject *__pyx_codeobj__591; static PyObject *__pyx_codeobj__593; static PyObject *__pyx_codeobj__595; static PyObject *__pyx_codeobj__597; static PyObject *__pyx_codeobj__599; static PyObject *__pyx_codeobj__601; static PyObject *__pyx_codeobj__603; static PyObject *__pyx_codeobj__605; static PyObject *__pyx_codeobj__607; static PyObject *__pyx_codeobj__609; static PyObject *__pyx_codeobj__611; static PyObject *__pyx_codeobj__613; static PyObject *__pyx_codeobj__615; static PyObject *__pyx_codeobj__617; static PyObject *__pyx_codeobj__619; static PyObject *__pyx_codeobj__621; static PyObject *__pyx_codeobj__623; static PyObject *__pyx_codeobj__625; static PyObject *__pyx_codeobj__627; static PyObject *__pyx_codeobj__629; static PyObject *__pyx_codeobj__631; static PyObject *__pyx_codeobj__633; static PyObject *__pyx_codeobj__635; static PyObject *__pyx_codeobj__637; static PyObject *__pyx_codeobj__639; static PyObject *__pyx_codeobj__641; static PyObject *__pyx_codeobj__643; static PyObject *__pyx_codeobj__645; static PyObject *__pyx_codeobj__647; static PyObject *__pyx_codeobj__649; static PyObject *__pyx_codeobj__651; static PyObject *__pyx_codeobj__653; static PyObject *__pyx_codeobj__655; static PyObject *__pyx_codeobj__657; static PyObject *__pyx_codeobj__659; static PyObject *__pyx_codeobj__661; static PyObject *__pyx_codeobj__663; static PyObject *__pyx_codeobj__665; static PyObject *__pyx_codeobj__667; static PyObject *__pyx_codeobj__669; /* "pandas/algos.pyx":502 * return left != right * * _return_false = lambda self, other: False # <<<<<<<<<<<<<< * _return_true = lambda self, other: True * */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_494lambda1(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_494lambda1 = {__Pyx_NAMESTR("lambda1"), (PyCFunction)__pyx_pw_6pandas_5algos_494lambda1, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_494lambda1(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { CYTHON_UNUSED PyObject *__pyx_v_self = 0; CYTHON_UNUSED PyObject *__pyx_v_other = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("lambda1 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_other,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_other)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("lambda1", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 502; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "lambda1") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 502; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } __pyx_v_self = values[0]; __pyx_v_other = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("lambda1", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 502; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.lambda1", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_lambda_funcdef_6pandas_5algos_lambda1(__pyx_self, __pyx_v_self, __pyx_v_other); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_lambda_funcdef_6pandas_5algos_lambda1(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_other) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("lambda1", 0); __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(Py_False); __pyx_r = Py_False; goto __pyx_L0; /* function exit code */ __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/algos.pyx":503 * * _return_false = lambda self, other: False * _return_true = lambda self, other: True # <<<<<<<<<<<<<< * * class Infinity(object): */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_495lambda2(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_495lambda2 = {__Pyx_NAMESTR("lambda2"), (PyCFunction)__pyx_pw_6pandas_5algos_495lambda2, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_495lambda2(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { CYTHON_UNUSED PyObject *__pyx_v_self = 0; CYTHON_UNUSED PyObject *__pyx_v_other = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("lambda2 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_other,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_other)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("lambda2", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 503; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "lambda2") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 503; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } __pyx_v_self = values[0]; __pyx_v_other = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("lambda2", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 503; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.lambda2", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_lambda_funcdef_6pandas_5algos_lambda2(__pyx_self, __pyx_v_self, __pyx_v_other); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_lambda_funcdef_6pandas_5algos_lambda2(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_other) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("lambda2", 0); __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(Py_True); __pyx_r = Py_True; goto __pyx_L0; /* function exit code */ __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/algos.pyx":51 * * * 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_5algos_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/algos.pyx":52 * * 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_5algos_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/src/skiplist.pyx":18 * # MSVC does not have log2! * * cdef double Log2(double x): # <<<<<<<<<<<<<< * return log(x) / log(2.) * */ static double __pyx_f_6pandas_5algos_Log2(double __pyx_v_x) { double __pyx_r; __Pyx_RefNannyDeclarations double __pyx_t_1; double __pyx_t_2; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("Log2", 0); /* "pandas/src/skiplist.pyx":19 * * cdef double Log2(double x): * return log(x) / log(2.) # <<<<<<<<<<<<<< * * cimport numpy as np */ __pyx_t_1 = log(__pyx_v_x); __pyx_t_2 = log(2.); if (unlikely(__pyx_t_2 == 0)) { #ifdef WITH_THREAD PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure(); #endif PyErr_SetString(PyExc_ZeroDivisionError, "float division"); #ifdef WITH_THREAD PyGILState_Release(__pyx_gilstate_save); #endif {__pyx_filename = __pyx_f[1]; __pyx_lineno = 19; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_r = (__pyx_t_1 / __pyx_t_2); goto __pyx_L0; /* "pandas/src/skiplist.pyx":18 * # MSVC does not have log2! * * cdef double Log2(double x): # <<<<<<<<<<<<<< * return log(x) / log(2.) * */ /* function exit code */ __pyx_L1_error:; __Pyx_WriteUnraisable("pandas.algos.Log2", __pyx_clineno, __pyx_lineno, __pyx_filename, 0); __pyx_r = 0; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/skiplist.pyx":38 * list width * * def __init__(self, double_t value, list next, list width): # <<<<<<<<<<<<<< * self.value = value * self.next = next */ /* Python wrapper */ static int __pyx_pw_6pandas_5algos_4Node_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_pw_6pandas_5algos_4Node_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { __pyx_t_5numpy_double_t __pyx_v_value; PyObject *__pyx_v_next = 0; PyObject *__pyx_v_width = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_value,&__pyx_n_s_next,&__pyx_n_s_width,0}; PyObject* values[3] = {0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_value)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_next)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, 1); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 38; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_width)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, 2); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 38; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 38; __pyx_clineno = __LINE__; goto __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_value = __pyx_PyFloat_AsDouble(values[0]); if (unlikely((__pyx_v_value == (npy_double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 38; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_next = ((PyObject*)values[1]); __pyx_v_width = ((PyObject*)values[2]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 38; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.Node.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return -1; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_next), (&PyList_Type), 1, "next", 1))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 38; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_width), (&PyList_Type), 1, "width", 1))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 38; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_4Node___init__(((struct __pyx_obj_6pandas_5algos_Node *)__pyx_v_self), __pyx_v_value, __pyx_v_next, __pyx_v_width); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pandas_5algos_4Node___init__(struct __pyx_obj_6pandas_5algos_Node *__pyx_v_self, __pyx_t_5numpy_double_t __pyx_v_value, PyObject *__pyx_v_next, PyObject *__pyx_v_width) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__init__", 0); /* "pandas/src/skiplist.pyx":39 * * def __init__(self, double_t value, list next, list width): * self.value = value # <<<<<<<<<<<<<< * self.next = next * self.width = width */ __pyx_v_self->value = __pyx_v_value; /* "pandas/src/skiplist.pyx":40 * def __init__(self, double_t value, list next, list width): * self.value = value * self.next = next # <<<<<<<<<<<<<< * self.width = width * */ __Pyx_INCREF(__pyx_v_next); __Pyx_GIVEREF(__pyx_v_next); __Pyx_GOTREF(__pyx_v_self->next); __Pyx_DECREF(__pyx_v_self->next); __pyx_v_self->next = __pyx_v_next; /* "pandas/src/skiplist.pyx":41 * self.value = value * self.next = next * self.width = width # <<<<<<<<<<<<<< * * # Singleton terminator node */ __Pyx_INCREF(__pyx_v_width); __Pyx_GIVEREF(__pyx_v_width); __Pyx_GOTREF(__pyx_v_self->width); __Pyx_DECREF(__pyx_v_self->width); __pyx_v_self->width = __pyx_v_width; /* "pandas/src/skiplist.pyx":38 * list width * * def __init__(self, double_t value, list next, list width): # <<<<<<<<<<<<<< * self.value = value * self.next = next */ /* function exit code */ __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/skiplist.pyx":34 * cdef class Node: * cdef public: * double_t value # <<<<<<<<<<<<<< * list next * list width */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_4Node_5value_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6pandas_5algos_4Node_5value_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_5algos_4Node_5value___get__(((struct __pyx_obj_6pandas_5algos_Node *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5algos_4Node_5value___get__(struct __pyx_obj_6pandas_5algos_Node *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->value); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 34; __pyx_clineno = __LINE__; goto __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.algos.Node.value.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pandas_5algos_4Node_5value_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ static int __pyx_pw_6pandas_5algos_4Node_5value_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_5algos_4Node_5value_2__set__(((struct __pyx_obj_6pandas_5algos_Node *)__pyx_v_self), ((PyObject *)__pyx_v_value)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pandas_5algos_4Node_5value_2__set__(struct __pyx_obj_6pandas_5algos_Node *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __pyx_t_5numpy_double_t __pyx_t_1; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__set__", 0); __pyx_t_1 = __pyx_PyFloat_AsDouble(__pyx_v_value); if (unlikely((__pyx_t_1 == (npy_double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 34; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_self->value = __pyx_t_1; /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("pandas.algos.Node.value.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/skiplist.pyx":35 * cdef public: * double_t value * list next # <<<<<<<<<<<<<< * list width * */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_4Node_4next_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6pandas_5algos_4Node_4next_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_5algos_4Node_4next___get__(((struct __pyx_obj_6pandas_5algos_Node *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5algos_4Node_4next___get__(struct __pyx_obj_6pandas_5algos_Node *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_self->next); __pyx_r = __pyx_v_self->next; goto __pyx_L0; /* function exit code */ __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pandas_5algos_4Node_4next_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ static int __pyx_pw_6pandas_5algos_4Node_4next_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_5algos_4Node_4next_2__set__(((struct __pyx_obj_6pandas_5algos_Node *)__pyx_v_self), ((PyObject *)__pyx_v_value)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pandas_5algos_4Node_4next_2__set__(struct __pyx_obj_6pandas_5algos_Node *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__set__", 0); if (!(likely(PyList_CheckExact(__pyx_v_value))||((__pyx_v_value) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_v_value)->tp_name), 0))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_1 = __pyx_v_value; __Pyx_INCREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->next); __Pyx_DECREF(__pyx_v_self->next); __pyx_v_self->next = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas.algos.Node.next.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pandas_5algos_4Node_4next_5__del__(PyObject *__pyx_v_self); /*proto*/ static int __pyx_pw_6pandas_5algos_4Node_4next_5__del__(PyObject *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_5algos_4Node_4next_4__del__(((struct __pyx_obj_6pandas_5algos_Node *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pandas_5algos_4Node_4next_4__del__(struct __pyx_obj_6pandas_5algos_Node *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__", 0); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->next); __Pyx_DECREF(__pyx_v_self->next); __pyx_v_self->next = ((PyObject*)Py_None); /* function exit code */ __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/skiplist.pyx":36 * double_t value * list next * list width # <<<<<<<<<<<<<< * * def __init__(self, double_t value, list next, list width): */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_4Node_5width_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6pandas_5algos_4Node_5width_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_5algos_4Node_5width___get__(((struct __pyx_obj_6pandas_5algos_Node *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5algos_4Node_5width___get__(struct __pyx_obj_6pandas_5algos_Node *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_self->width); __pyx_r = __pyx_v_self->width; goto __pyx_L0; /* function exit code */ __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pandas_5algos_4Node_5width_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ static int __pyx_pw_6pandas_5algos_4Node_5width_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_5algos_4Node_5width_2__set__(((struct __pyx_obj_6pandas_5algos_Node *)__pyx_v_self), ((PyObject *)__pyx_v_value)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pandas_5algos_4Node_5width_2__set__(struct __pyx_obj_6pandas_5algos_Node *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__set__", 0); if (!(likely(PyList_CheckExact(__pyx_v_value))||((__pyx_v_value) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_v_value)->tp_name), 0))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 36; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_1 = __pyx_v_value; __Pyx_INCREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->width); __Pyx_DECREF(__pyx_v_self->width); __pyx_v_self->width = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas.algos.Node.width.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pandas_5algos_4Node_5width_5__del__(PyObject *__pyx_v_self); /*proto*/ static int __pyx_pw_6pandas_5algos_4Node_5width_5__del__(PyObject *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_5algos_4Node_5width_4__del__(((struct __pyx_obj_6pandas_5algos_Node *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pandas_5algos_4Node_5width_4__del__(struct __pyx_obj_6pandas_5algos_Node *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__", 0); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->width); __Pyx_DECREF(__pyx_v_self->width); __pyx_v_self->width = ((PyObject*)Py_None); /* function exit code */ __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/skiplist.pyx":55 * Node head * * def __init__(self, expected_size=100): # <<<<<<<<<<<<<< * self.size = 0 * self.maxlevels = int(1 + Log2(expected_size)) */ /* Python wrapper */ static int __pyx_pw_6pandas_5algos_17IndexableSkiplist_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_pw_6pandas_5algos_17IndexableSkiplist_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_expected_size = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_expected_size,0}; PyObject* values[1] = {0}; values[0] = ((PyObject *)__pyx_int_100); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_expected_size); if (value) { values[0] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 55; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_expected_size = values[0]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("__init__", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 55; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.IndexableSkiplist.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return -1; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pandas_5algos_17IndexableSkiplist___init__(((struct __pyx_obj_6pandas_5algos_IndexableSkiplist *)__pyx_v_self), __pyx_v_expected_size); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pandas_5algos_17IndexableSkiplist___init__(struct __pyx_obj_6pandas_5algos_IndexableSkiplist *__pyx_v_self, PyObject *__pyx_v_expected_size) { int __pyx_r; __Pyx_RefNannyDeclarations double __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__init__", 0); /* "pandas/src/skiplist.pyx":56 * * def __init__(self, expected_size=100): * self.size = 0 # <<<<<<<<<<<<<< * self.maxlevels = int(1 + Log2(expected_size)) * self.head = Node(np.NaN, [NIL] * self.maxlevels, [1] * self.maxlevels) */ __pyx_v_self->size = 0; /* "pandas/src/skiplist.pyx":57 * def __init__(self, expected_size=100): * self.size = 0 * self.maxlevels = int(1 + Log2(expected_size)) # <<<<<<<<<<<<<< * self.head = Node(np.NaN, [NIL] * self.maxlevels, [1] * self.maxlevels) * */ __pyx_t_1 = __pyx_PyFloat_AsDouble(__pyx_v_expected_size); if (unlikely((__pyx_t_1 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 57; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_self->maxlevels = ((Py_ssize_t)(1.0 + __pyx_f_6pandas_5algos_Log2(__pyx_t_1))); /* "pandas/src/skiplist.pyx":58 * self.size = 0 * self.maxlevels = int(1 + Log2(expected_size)) * self.head = Node(np.NaN, [NIL] * self.maxlevels, [1] * self.maxlevels) # <<<<<<<<<<<<<< * * def __len__(self): */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 58; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_NaN); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 58; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_NIL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 58; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = PyList_New(1 * ((__pyx_v_self->maxlevels<0) ? 0:__pyx_v_self->maxlevels)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 58; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < __pyx_v_self->maxlevels; __pyx_temp++) { __Pyx_INCREF(__pyx_t_2); PyList_SET_ITEM(__pyx_t_4, __pyx_temp, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); } } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyList_New(1 * ((__pyx_v_self->maxlevels<0) ? 0:__pyx_v_self->maxlevels)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 58; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < __pyx_v_self->maxlevels; __pyx_temp++) { __Pyx_INCREF(__pyx_int_1); PyList_SET_ITEM(__pyx_t_2, __pyx_temp, __pyx_int_1); __Pyx_GIVEREF(__pyx_int_1); } } __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 58; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_3 = 0; __pyx_t_4 = 0; __pyx_t_2 = 0; __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_6pandas_5algos_Node)), __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 58; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GIVEREF(__pyx_t_2); __Pyx_GOTREF(__pyx_v_self->head); __Pyx_DECREF(((PyObject *)__pyx_v_self->head)); __pyx_v_self->head = ((struct __pyx_obj_6pandas_5algos_Node *)__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/skiplist.pyx":55 * Node head * * def __init__(self, expected_size=100): # <<<<<<<<<<<<<< * self.size = 0 * self.maxlevels = int(1 + Log2(expected_size)) */ /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("pandas.algos.IndexableSkiplist.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/skiplist.pyx":60 * self.head = Node(np.NaN, [NIL] * self.maxlevels, [1] * self.maxlevels) * * def __len__(self): # <<<<<<<<<<<<<< * return self.size * */ /* Python wrapper */ static Py_ssize_t __pyx_pw_6pandas_5algos_17IndexableSkiplist_3__len__(PyObject *__pyx_v_self); /*proto*/ static Py_ssize_t __pyx_pw_6pandas_5algos_17IndexableSkiplist_3__len__(PyObject *__pyx_v_self) { Py_ssize_t __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__len__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_5algos_17IndexableSkiplist_2__len__(((struct __pyx_obj_6pandas_5algos_IndexableSkiplist *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static Py_ssize_t __pyx_pf_6pandas_5algos_17IndexableSkiplist_2__len__(struct __pyx_obj_6pandas_5algos_IndexableSkiplist *__pyx_v_self) { Py_ssize_t __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__len__", 0); /* "pandas/src/skiplist.pyx":61 * * def __len__(self): * return self.size # <<<<<<<<<<<<<< * * def __getitem__(self, i): */ __pyx_r = __pyx_v_self->size; goto __pyx_L0; /* "pandas/src/skiplist.pyx":60 * self.head = Node(np.NaN, [NIL] * self.maxlevels, [1] * self.maxlevels) * * def __len__(self): # <<<<<<<<<<<<<< * return self.size * */ /* function exit code */ __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/skiplist.pyx":63 * return self.size * * def __getitem__(self, i): # <<<<<<<<<<<<<< * return self.get(i) * */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_17IndexableSkiplist_5__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_i); /*proto*/ static PyObject *__pyx_pw_6pandas_5algos_17IndexableSkiplist_5__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_i) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__getitem__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_5algos_17IndexableSkiplist_4__getitem__(((struct __pyx_obj_6pandas_5algos_IndexableSkiplist *)__pyx_v_self), ((PyObject *)__pyx_v_i)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5algos_17IndexableSkiplist_4__getitem__(struct __pyx_obj_6pandas_5algos_IndexableSkiplist *__pyx_v_self, PyObject *__pyx_v_i) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; PyObject *__pyx_t_2 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__getitem__", 0); /* "pandas/src/skiplist.pyx":64 * * def __getitem__(self, i): * return self.get(i) # <<<<<<<<<<<<<< * * cpdef get(self, Py_ssize_t i): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_1 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 64; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_2 = ((struct __pyx_vtabstruct_6pandas_5algos_IndexableSkiplist *)__pyx_v_self->__pyx_vtab)->get(__pyx_v_self, __pyx_t_1, 0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 64; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "pandas/src/skiplist.pyx":63 * return self.size * * def __getitem__(self, i): # <<<<<<<<<<<<<< * return self.get(i) * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("pandas.algos.IndexableSkiplist.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/skiplist.pyx":66 * return self.get(i) * * cpdef get(self, Py_ssize_t i): # <<<<<<<<<<<<<< * cdef Py_ssize_t level * cdef Node node */ static PyObject *__pyx_pw_6pandas_5algos_17IndexableSkiplist_7get(PyObject *__pyx_v_self, PyObject *__pyx_arg_i); /*proto*/ static PyObject *__pyx_f_6pandas_5algos_17IndexableSkiplist_get(struct __pyx_obj_6pandas_5algos_IndexableSkiplist *__pyx_v_self, Py_ssize_t __pyx_v_i, int __pyx_skip_dispatch) { Py_ssize_t __pyx_v_level; struct __pyx_obj_6pandas_5algos_Node *__pyx_v_node = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; Py_ssize_t __pyx_t_4; int __pyx_t_5; Py_ssize_t __pyx_t_6; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get", 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_get); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 66; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_6pandas_5algos_17IndexableSkiplist_7get)) { __Pyx_XDECREF(__pyx_r); __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_i); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 66; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 66; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_Call(__pyx_t_1, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 66; __pyx_clineno = __LINE__; goto __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/src/skiplist.pyx":70 * cdef Node node * * node = self.head # <<<<<<<<<<<<<< * i += 1 * */ __pyx_t_1 = ((PyObject *)__pyx_v_self->head); __Pyx_INCREF(__pyx_t_1); __pyx_v_node = ((struct __pyx_obj_6pandas_5algos_Node *)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/skiplist.pyx":71 * * node = self.head * i += 1 # <<<<<<<<<<<<<< * * for level in range(self.maxlevels - 1, -1, -1): */ __pyx_v_i = (__pyx_v_i + 1); /* "pandas/src/skiplist.pyx":73 * i += 1 * * for level in range(self.maxlevels - 1, -1, -1): # <<<<<<<<<<<<<< * while node.width[level] <= i: * i -= node.width[level] */ for (__pyx_t_4 = (__pyx_v_self->maxlevels - 1); __pyx_t_4 > -1; __pyx_t_4-=1) { __pyx_v_level = __pyx_t_4; /* "pandas/src/skiplist.pyx":74 * * for level in range(self.maxlevels - 1, -1, -1): * while node.width[level] <= i: # <<<<<<<<<<<<<< * i -= node.width[level] * node = node.next[level] */ while (1) { if (unlikely(__pyx_v_node->width == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 74; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_node->width, __pyx_v_level, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 74; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_i); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 74; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyObject_RichCompare(__pyx_t_1, __pyx_t_2, Py_LE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 74; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 74; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (!__pyx_t_5) break; /* "pandas/src/skiplist.pyx":75 * for level in range(self.maxlevels - 1, -1, -1): * while node.width[level] <= i: * i -= node.width[level] # <<<<<<<<<<<<<< * node = node.next[level] * */ __pyx_t_3 = PyInt_FromSsize_t(__pyx_v_i); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 75; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (unlikely(__pyx_v_node->width == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 75; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_2 = __Pyx_GetItemInt_List(__pyx_v_node->width, __pyx_v_level, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 75; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = PyNumber_InPlaceSubtract(__pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 75; __pyx_clineno = __LINE__; goto __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_6 = __Pyx_PyIndex_AsSsize_t(__pyx_t_1); if (unlikely((__pyx_t_6 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 75; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_i = __pyx_t_6; /* "pandas/src/skiplist.pyx":76 * while node.width[level] <= i: * i -= node.width[level] * node = node.next[level] # <<<<<<<<<<<<<< * * */ if (unlikely(__pyx_v_node->next == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 76; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_node->next, __pyx_v_level, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 76; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_1); if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_6pandas_5algos_Node))))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 76; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF_SET(__pyx_v_node, ((struct __pyx_obj_6pandas_5algos_Node *)__pyx_t_1)); __pyx_t_1 = 0; } } /* "pandas/src/skiplist.pyx":79 * * * return node.value # <<<<<<<<<<<<<< * * cpdef insert(self, double value): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyFloat_FromDouble(__pyx_v_node->value); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "pandas/src/skiplist.pyx":66 * return self.get(i) * * cpdef get(self, Py_ssize_t i): # <<<<<<<<<<<<<< * cdef Py_ssize_t level * cdef Node node */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("pandas.algos.IndexableSkiplist.get", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_node); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_17IndexableSkiplist_7get(PyObject *__pyx_v_self, PyObject *__pyx_arg_i); /*proto*/ static PyObject *__pyx_pw_6pandas_5algos_17IndexableSkiplist_7get(PyObject *__pyx_v_self, PyObject *__pyx_arg_i) { Py_ssize_t __pyx_v_i; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("get (wrapper)", 0); assert(__pyx_arg_i); { __pyx_v_i = __Pyx_PyIndex_AsSsize_t(__pyx_arg_i); if (unlikely((__pyx_v_i == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 66; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.IndexableSkiplist.get", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pandas_5algos_17IndexableSkiplist_6get(((struct __pyx_obj_6pandas_5algos_IndexableSkiplist *)__pyx_v_self), ((Py_ssize_t)__pyx_v_i)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5algos_17IndexableSkiplist_6get(struct __pyx_obj_6pandas_5algos_IndexableSkiplist *__pyx_v_self, Py_ssize_t __pyx_v_i) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = ((struct __pyx_vtabstruct_6pandas_5algos_IndexableSkiplist *)__pyx_v_self->__pyx_vtab)->get(__pyx_v_self, __pyx_v_i, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 66; __pyx_clineno = __LINE__; goto __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.algos.IndexableSkiplist.get", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/skiplist.pyx":81 * return node.value * * cpdef insert(self, double value): # <<<<<<<<<<<<<< * cdef Py_ssize_t level, steps, d * cdef Node node, prevnode, newnode, next_at_level, tmp */ static PyObject *__pyx_pw_6pandas_5algos_17IndexableSkiplist_9insert(PyObject *__pyx_v_self, PyObject *__pyx_arg_value); /*proto*/ static PyObject *__pyx_f_6pandas_5algos_17IndexableSkiplist_insert(struct __pyx_obj_6pandas_5algos_IndexableSkiplist *__pyx_v_self, double __pyx_v_value, int __pyx_skip_dispatch) { Py_ssize_t __pyx_v_level; Py_ssize_t __pyx_v_steps; Py_ssize_t __pyx_v_d; struct __pyx_obj_6pandas_5algos_Node *__pyx_v_node = 0; struct __pyx_obj_6pandas_5algos_Node *__pyx_v_prevnode = 0; struct __pyx_obj_6pandas_5algos_Node *__pyx_v_newnode = 0; struct __pyx_obj_6pandas_5algos_Node *__pyx_v_next_at_level = 0; PyObject *__pyx_v_chain = 0; PyObject *__pyx_v_steps_at_level = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; Py_ssize_t __pyx_t_4; int __pyx_t_5; double __pyx_t_6; PyObject *__pyx_t_7 = NULL; Py_ssize_t __pyx_t_8; Py_ssize_t __pyx_t_9; PyObject *__pyx_t_10 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("insert", 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_insert); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_6pandas_5algos_17IndexableSkiplist_9insert)) { __Pyx_XDECREF(__pyx_r); __pyx_t_2 = PyFloat_FromDouble(__pyx_v_value); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_Call(__pyx_t_1, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __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/src/skiplist.pyx":87 * * # find first node on each level where node.next[levels].value > value * chain = [None] * self.maxlevels # <<<<<<<<<<<<<< * steps_at_level = [0] * self.maxlevels * node = self.head */ __pyx_t_1 = PyList_New(1 * ((__pyx_v_self->maxlevels<0) ? 0:__pyx_v_self->maxlevels)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 87; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < __pyx_v_self->maxlevels; __pyx_temp++) { __Pyx_INCREF(Py_None); PyList_SET_ITEM(__pyx_t_1, __pyx_temp, Py_None); __Pyx_GIVEREF(Py_None); } } __pyx_v_chain = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/skiplist.pyx":88 * # find first node on each level where node.next[levels].value > value * chain = [None] * self.maxlevels * steps_at_level = [0] * self.maxlevels # <<<<<<<<<<<<<< * node = self.head * */ __pyx_t_1 = PyList_New(1 * ((__pyx_v_self->maxlevels<0) ? 0:__pyx_v_self->maxlevels)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < __pyx_v_self->maxlevels; __pyx_temp++) { __Pyx_INCREF(__pyx_int_0); PyList_SET_ITEM(__pyx_t_1, __pyx_temp, __pyx_int_0); __Pyx_GIVEREF(__pyx_int_0); } } __pyx_v_steps_at_level = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/skiplist.pyx":89 * chain = [None] * self.maxlevels * steps_at_level = [0] * self.maxlevels * node = self.head # <<<<<<<<<<<<<< * * for level in range(self.maxlevels - 1, -1, -1): */ __pyx_t_1 = ((PyObject *)__pyx_v_self->head); __Pyx_INCREF(__pyx_t_1); __pyx_v_node = ((struct __pyx_obj_6pandas_5algos_Node *)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/skiplist.pyx":91 * node = self.head * * for level in range(self.maxlevels - 1, -1, -1): # <<<<<<<<<<<<<< * next_at_level = node.next[level] * */ for (__pyx_t_4 = (__pyx_v_self->maxlevels - 1); __pyx_t_4 > -1; __pyx_t_4-=1) { __pyx_v_level = __pyx_t_4; /* "pandas/src/skiplist.pyx":92 * * for level in range(self.maxlevels - 1, -1, -1): * next_at_level = node.next[level] # <<<<<<<<<<<<<< * * while next_at_level.value <= value: */ if (unlikely(__pyx_v_node->next == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 92; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_node->next, __pyx_v_level, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 92; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_1); if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_6pandas_5algos_Node))))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 92; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_XDECREF_SET(__pyx_v_next_at_level, ((struct __pyx_obj_6pandas_5algos_Node *)__pyx_t_1)); __pyx_t_1 = 0; /* "pandas/src/skiplist.pyx":94 * next_at_level = node.next[level] * * while next_at_level.value <= value: # <<<<<<<<<<<<<< * steps_at_level[level] = (steps_at_level[level] + * node.width[level]) */ while (1) { __pyx_t_5 = ((__pyx_v_next_at_level->value <= __pyx_v_value) != 0); if (!__pyx_t_5) break; /* "pandas/src/skiplist.pyx":95 * * while next_at_level.value <= value: * steps_at_level[level] = (steps_at_level[level] + # <<<<<<<<<<<<<< * node.width[level]) * node = next_at_level */ __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_steps_at_level, __pyx_v_level, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 95; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_1); /* "pandas/src/skiplist.pyx":96 * while next_at_level.value <= value: * steps_at_level[level] = (steps_at_level[level] + * node.width[level]) # <<<<<<<<<<<<<< * node = next_at_level * next_at_level = node.next[level] */ if (unlikely(__pyx_v_node->width == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 96; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_2 = __Pyx_GetItemInt_List(__pyx_v_node->width, __pyx_v_level, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 96; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_2); /* "pandas/src/skiplist.pyx":95 * * while next_at_level.value <= value: * steps_at_level[level] = (steps_at_level[level] + # <<<<<<<<<<<<<< * node.width[level]) * node = next_at_level */ __pyx_t_3 = PyNumber_Add(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 95; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(__Pyx_SetItemInt(__pyx_v_steps_at_level, __pyx_v_level, __pyx_t_3, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1) < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 95; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/skiplist.pyx":97 * steps_at_level[level] = (steps_at_level[level] + * node.width[level]) * node = next_at_level # <<<<<<<<<<<<<< * next_at_level = node.next[level] * */ __Pyx_INCREF(((PyObject *)__pyx_v_next_at_level)); __Pyx_DECREF_SET(__pyx_v_node, __pyx_v_next_at_level); /* "pandas/src/skiplist.pyx":98 * node.width[level]) * node = next_at_level * next_at_level = node.next[level] # <<<<<<<<<<<<<< * * chain[level] = node */ if (unlikely(__pyx_v_node->next == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 98; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_3 = __Pyx_GetItemInt_List(__pyx_v_node->next, __pyx_v_level, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1); if (unlikely(__pyx_t_3 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 98; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_3); if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_6pandas_5algos_Node))))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 98; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF_SET(__pyx_v_next_at_level, ((struct __pyx_obj_6pandas_5algos_Node *)__pyx_t_3)); __pyx_t_3 = 0; } /* "pandas/src/skiplist.pyx":100 * next_at_level = node.next[level] * * chain[level] = node # <<<<<<<<<<<<<< * * # insert a link to the newnode at each level */ if (unlikely(__Pyx_SetItemInt(__pyx_v_chain, __pyx_v_level, ((PyObject *)__pyx_v_node), Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1) < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 100; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } /* "pandas/src/skiplist.pyx":103 * * # insert a link to the newnode at each level * d = min(self.maxlevels, 1 - int(Log2(random()))) # <<<<<<<<<<<<<< * newnode = Node(value, [None] * d, [None] * d) * steps = 0 */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_random); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = PyObject_Call(__pyx_t_3, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_6 = __pyx_PyFloat_AsDouble(__pyx_t_2); if (unlikely((__pyx_t_6 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyFloat_FromDouble(__pyx_f_6pandas_5algos_Log2(__pyx_t_6)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)(&PyInt_Type))), __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyNumber_Subtract(__pyx_int_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_4 = __pyx_v_self->maxlevels; __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_7 = PyObject_RichCompare(__pyx_t_3, __pyx_t_1, Py_LT); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (__pyx_t_5) { __Pyx_INCREF(__pyx_t_3); __pyx_t_2 = __pyx_t_3; } else { __pyx_t_7 = PyInt_FromSsize_t(__pyx_t_4); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_t_2 = __pyx_t_7; __pyx_t_7 = 0; } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_4 = __Pyx_PyIndex_AsSsize_t(__pyx_t_2); if (unlikely((__pyx_t_4 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_d = __pyx_t_4; /* "pandas/src/skiplist.pyx":104 * # insert a link to the newnode at each level * d = min(self.maxlevels, 1 - int(Log2(random()))) * newnode = Node(value, [None] * d, [None] * d) # <<<<<<<<<<<<<< * steps = 0 * */ __pyx_t_2 = PyFloat_FromDouble(__pyx_v_value); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyList_New(1 * ((__pyx_v_d<0) ? 0:__pyx_v_d)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < __pyx_v_d; __pyx_temp++) { __Pyx_INCREF(Py_None); PyList_SET_ITEM(__pyx_t_3, __pyx_temp, Py_None); __Pyx_GIVEREF(Py_None); } } __pyx_t_7 = PyList_New(1 * ((__pyx_v_d<0) ? 0:__pyx_v_d)); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < __pyx_v_d; __pyx_temp++) { __Pyx_INCREF(Py_None); PyList_SET_ITEM(__pyx_t_7, __pyx_temp, Py_None); __Pyx_GIVEREF(Py_None); } } __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_t_7); __Pyx_GIVEREF(__pyx_t_7); __pyx_t_2 = 0; __pyx_t_3 = 0; __pyx_t_7 = 0; __pyx_t_7 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_6pandas_5algos_Node)), __pyx_t_1, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_newnode = ((struct __pyx_obj_6pandas_5algos_Node *)__pyx_t_7); __pyx_t_7 = 0; /* "pandas/src/skiplist.pyx":105 * d = min(self.maxlevels, 1 - int(Log2(random()))) * newnode = Node(value, [None] * d, [None] * d) * steps = 0 # <<<<<<<<<<<<<< * * for level in range(d): */ __pyx_v_steps = 0; /* "pandas/src/skiplist.pyx":107 * steps = 0 * * for level in range(d): # <<<<<<<<<<<<<< * prevnode = chain[level] * newnode.next[level] = prevnode.next[level] */ __pyx_t_4 = __pyx_v_d; for (__pyx_t_8 = 0; __pyx_t_8 < __pyx_t_4; __pyx_t_8+=1) { __pyx_v_level = __pyx_t_8; /* "pandas/src/skiplist.pyx":108 * * for level in range(d): * prevnode = chain[level] # <<<<<<<<<<<<<< * newnode.next[level] = prevnode.next[level] * prevnode.next[level] = newnode */ __pyx_t_7 = __Pyx_GetItemInt_List(__pyx_v_chain, __pyx_v_level, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1); if (unlikely(__pyx_t_7 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 108; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_7); if (!(likely(((__pyx_t_7) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_7, __pyx_ptype_6pandas_5algos_Node))))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 108; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_XDECREF_SET(__pyx_v_prevnode, ((struct __pyx_obj_6pandas_5algos_Node *)__pyx_t_7)); __pyx_t_7 = 0; /* "pandas/src/skiplist.pyx":109 * for level in range(d): * prevnode = chain[level] * newnode.next[level] = prevnode.next[level] # <<<<<<<<<<<<<< * prevnode.next[level] = newnode * newnode.width[level] = (prevnode.width[level] - steps) */ if (unlikely(__pyx_v_prevnode->next == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 109; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_7 = __Pyx_GetItemInt_List(__pyx_v_prevnode->next, __pyx_v_level, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1); if (unlikely(__pyx_t_7 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 109; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_7); if (unlikely(__pyx_v_newnode->next == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 109; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } if (unlikely(__Pyx_SetItemInt(__pyx_v_newnode->next, __pyx_v_level, __pyx_t_7, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1) < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 109; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; /* "pandas/src/skiplist.pyx":110 * prevnode = chain[level] * newnode.next[level] = prevnode.next[level] * prevnode.next[level] = newnode # <<<<<<<<<<<<<< * newnode.width[level] = (prevnode.width[level] - steps) * prevnode.width[level] = steps + 1 */ if (unlikely(__pyx_v_prevnode->next == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 110; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } if (unlikely(__Pyx_SetItemInt(__pyx_v_prevnode->next, __pyx_v_level, ((PyObject *)__pyx_v_newnode), Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1) < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 110; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/skiplist.pyx":111 * newnode.next[level] = prevnode.next[level] * prevnode.next[level] = newnode * newnode.width[level] = (prevnode.width[level] - steps) # <<<<<<<<<<<<<< * prevnode.width[level] = steps + 1 * steps += steps_at_level[level] */ if (unlikely(__pyx_v_prevnode->width == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 111; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_7 = __Pyx_GetItemInt_List(__pyx_v_prevnode->width, __pyx_v_level, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1); if (unlikely(__pyx_t_7 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 111; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_7); __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_steps); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 111; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = PyNumber_Subtract(__pyx_t_7, __pyx_t_1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 111; __pyx_clineno = __LINE__; goto __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; if (unlikely(__pyx_v_newnode->width == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 111; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } if (unlikely(__Pyx_SetItemInt(__pyx_v_newnode->width, __pyx_v_level, __pyx_t_3, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1) < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 111; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/skiplist.pyx":112 * prevnode.next[level] = newnode * newnode.width[level] = (prevnode.width[level] - steps) * prevnode.width[level] = steps + 1 # <<<<<<<<<<<<<< * steps += steps_at_level[level] * */ __pyx_t_3 = PyInt_FromSsize_t((__pyx_v_steps + 1)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 112; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (unlikely(__pyx_v_prevnode->width == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 112; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } if (unlikely(__Pyx_SetItemInt(__pyx_v_prevnode->width, __pyx_v_level, __pyx_t_3, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1) < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 112; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/skiplist.pyx":113 * newnode.width[level] = (prevnode.width[level] - steps) * prevnode.width[level] = steps + 1 * steps += steps_at_level[level] # <<<<<<<<<<<<<< * * for level in range(d, self.maxlevels): */ __pyx_t_3 = PyInt_FromSsize_t(__pyx_v_steps); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 113; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_steps_at_level, __pyx_v_level, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 113; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_1); __pyx_t_7 = PyNumber_InPlaceAdd(__pyx_t_3, __pyx_t_1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 113; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_9 = __Pyx_PyIndex_AsSsize_t(__pyx_t_7); if (unlikely((__pyx_t_9 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 113; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_v_steps = __pyx_t_9; } /* "pandas/src/skiplist.pyx":115 * steps += steps_at_level[level] * * for level in range(d, self.maxlevels): # <<<<<<<<<<<<<< * ( chain[level]).width[level] += 1 * */ __pyx_t_4 = __pyx_v_self->maxlevels; for (__pyx_t_8 = __pyx_v_d; __pyx_t_8 < __pyx_t_4; __pyx_t_8+=1) { __pyx_v_level = __pyx_t_8; /* "pandas/src/skiplist.pyx":116 * * for level in range(d, self.maxlevels): * ( chain[level]).width[level] += 1 # <<<<<<<<<<<<<< * * self.size += 1 */ __pyx_t_7 = __Pyx_GetItemInt_List(__pyx_v_chain, __pyx_v_level, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1); if (unlikely(__pyx_t_7 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 116; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_7); if (unlikely(((struct __pyx_obj_6pandas_5algos_Node *)__pyx_t_7)->width == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 116; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __Pyx_INCREF(((struct __pyx_obj_6pandas_5algos_Node *)__pyx_t_7)->width); __pyx_t_10 = ((struct __pyx_obj_6pandas_5algos_Node *)__pyx_t_7)->width; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_9 = __pyx_v_level; if (unlikely(__pyx_t_10 == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 116; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_7 = __Pyx_GetItemInt_List(__pyx_t_10, __pyx_t_9, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1); if (unlikely(__pyx_t_7 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 116; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_7); __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_t_7, __pyx_int_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 116; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (unlikely(__pyx_t_10 == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 116; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } if (unlikely(__Pyx_SetItemInt(__pyx_t_10, __pyx_t_9, __pyx_t_1, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1) < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 116; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; } /* "pandas/src/skiplist.pyx":118 * ( chain[level]).width[level] += 1 * * self.size += 1 # <<<<<<<<<<<<<< * * cpdef remove(self, double value): */ __pyx_v_self->size = (__pyx_v_self->size + 1); /* "pandas/src/skiplist.pyx":81 * return node.value * * cpdef insert(self, double value): # <<<<<<<<<<<<<< * cdef Py_ssize_t level, steps, d * cdef Node node, prevnode, newnode, next_at_level, tmp */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_10); __Pyx_AddTraceback("pandas.algos.IndexableSkiplist.insert", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_node); __Pyx_XDECREF((PyObject *)__pyx_v_prevnode); __Pyx_XDECREF((PyObject *)__pyx_v_newnode); __Pyx_XDECREF((PyObject *)__pyx_v_next_at_level); __Pyx_XDECREF(__pyx_v_chain); __Pyx_XDECREF(__pyx_v_steps_at_level); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_17IndexableSkiplist_9insert(PyObject *__pyx_v_self, PyObject *__pyx_arg_value); /*proto*/ static PyObject *__pyx_pw_6pandas_5algos_17IndexableSkiplist_9insert(PyObject *__pyx_v_self, PyObject *__pyx_arg_value) { double __pyx_v_value; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("insert (wrapper)", 0); assert(__pyx_arg_value); { __pyx_v_value = __pyx_PyFloat_AsDouble(__pyx_arg_value); if (unlikely((__pyx_v_value == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.IndexableSkiplist.insert", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pandas_5algos_17IndexableSkiplist_8insert(((struct __pyx_obj_6pandas_5algos_IndexableSkiplist *)__pyx_v_self), ((double)__pyx_v_value)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5algos_17IndexableSkiplist_8insert(struct __pyx_obj_6pandas_5algos_IndexableSkiplist *__pyx_v_self, double __pyx_v_value) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("insert", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = ((struct __pyx_vtabstruct_6pandas_5algos_IndexableSkiplist *)__pyx_v_self->__pyx_vtab)->insert(__pyx_v_self, __pyx_v_value, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __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.algos.IndexableSkiplist.insert", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/skiplist.pyx":120 * self.size += 1 * * cpdef remove(self, double value): # <<<<<<<<<<<<<< * cdef Py_ssize_t level, d * cdef Node node, prevnode, tmpnode, next_at_level */ static PyObject *__pyx_pw_6pandas_5algos_17IndexableSkiplist_11remove(PyObject *__pyx_v_self, PyObject *__pyx_arg_value); /*proto*/ static PyObject *__pyx_f_6pandas_5algos_17IndexableSkiplist_remove(struct __pyx_obj_6pandas_5algos_IndexableSkiplist *__pyx_v_self, double __pyx_v_value, int __pyx_skip_dispatch) { Py_ssize_t __pyx_v_level; Py_ssize_t __pyx_v_d; struct __pyx_obj_6pandas_5algos_Node *__pyx_v_node = 0; struct __pyx_obj_6pandas_5algos_Node *__pyx_v_prevnode = 0; struct __pyx_obj_6pandas_5algos_Node *__pyx_v_tmpnode = 0; struct __pyx_obj_6pandas_5algos_Node *__pyx_v_next_at_level = 0; PyObject *__pyx_v_chain = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; Py_ssize_t __pyx_t_4; int __pyx_t_5; Py_ssize_t __pyx_t_6; PyObject *__pyx_t_7 = NULL; Py_ssize_t __pyx_t_8; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("remove", 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_remove); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 120; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_6pandas_5algos_17IndexableSkiplist_11remove)) { __Pyx_XDECREF(__pyx_r); __pyx_t_2 = PyFloat_FromDouble(__pyx_v_value); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 120; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 120; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_Call(__pyx_t_1, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 120; __pyx_clineno = __LINE__; goto __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/src/skiplist.pyx":126 * * # find first node on each level where node.next[levels].value >= value * chain = [None] * self.maxlevels # <<<<<<<<<<<<<< * node = self.head * */ __pyx_t_1 = PyList_New(1 * ((__pyx_v_self->maxlevels<0) ? 0:__pyx_v_self->maxlevels)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 126; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < __pyx_v_self->maxlevels; __pyx_temp++) { __Pyx_INCREF(Py_None); PyList_SET_ITEM(__pyx_t_1, __pyx_temp, Py_None); __Pyx_GIVEREF(Py_None); } } __pyx_v_chain = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/skiplist.pyx":127 * # find first node on each level where node.next[levels].value >= value * chain = [None] * self.maxlevels * node = self.head # <<<<<<<<<<<<<< * * for level in range(self.maxlevels - 1, -1, -1): */ __pyx_t_1 = ((PyObject *)__pyx_v_self->head); __Pyx_INCREF(__pyx_t_1); __pyx_v_node = ((struct __pyx_obj_6pandas_5algos_Node *)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/skiplist.pyx":129 * node = self.head * * for level in range(self.maxlevels - 1, -1, -1): # <<<<<<<<<<<<<< * next_at_level = node.next[level] * while next_at_level.value < value: */ for (__pyx_t_4 = (__pyx_v_self->maxlevels - 1); __pyx_t_4 > -1; __pyx_t_4-=1) { __pyx_v_level = __pyx_t_4; /* "pandas/src/skiplist.pyx":130 * * for level in range(self.maxlevels - 1, -1, -1): * next_at_level = node.next[level] # <<<<<<<<<<<<<< * while next_at_level.value < value: * node = next_at_level */ if (unlikely(__pyx_v_node->next == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 130; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_node->next, __pyx_v_level, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 130; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_1); if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_6pandas_5algos_Node))))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 130; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_XDECREF_SET(__pyx_v_next_at_level, ((struct __pyx_obj_6pandas_5algos_Node *)__pyx_t_1)); __pyx_t_1 = 0; /* "pandas/src/skiplist.pyx":131 * for level in range(self.maxlevels - 1, -1, -1): * next_at_level = node.next[level] * while next_at_level.value < value: # <<<<<<<<<<<<<< * node = next_at_level * next_at_level = node.next[level] */ while (1) { __pyx_t_5 = ((__pyx_v_next_at_level->value < __pyx_v_value) != 0); if (!__pyx_t_5) break; /* "pandas/src/skiplist.pyx":132 * next_at_level = node.next[level] * while next_at_level.value < value: * node = next_at_level # <<<<<<<<<<<<<< * next_at_level = node.next[level] * */ __Pyx_INCREF(((PyObject *)__pyx_v_next_at_level)); __Pyx_DECREF_SET(__pyx_v_node, __pyx_v_next_at_level); /* "pandas/src/skiplist.pyx":133 * while next_at_level.value < value: * node = next_at_level * next_at_level = node.next[level] # <<<<<<<<<<<<<< * * chain[level] = node */ if (unlikely(__pyx_v_node->next == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 133; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_node->next, __pyx_v_level, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 133; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_1); if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_6pandas_5algos_Node))))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 133; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF_SET(__pyx_v_next_at_level, ((struct __pyx_obj_6pandas_5algos_Node *)__pyx_t_1)); __pyx_t_1 = 0; } /* "pandas/src/skiplist.pyx":135 * next_at_level = node.next[level] * * chain[level] = node # <<<<<<<<<<<<<< * * if value != ( ( ( chain[0]).next)[0]).value: */ if (unlikely(__Pyx_SetItemInt(__pyx_v_chain, __pyx_v_level, ((PyObject *)__pyx_v_node), Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1) < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 135; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } /* "pandas/src/skiplist.pyx":137 * chain[level] = node * * if value != ( ( ( chain[0]).next)[0]).value: # <<<<<<<<<<<<<< * raise KeyError('Not Found') * */ __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_chain, 0, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 137; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_GetItemInt(((struct __pyx_obj_6pandas_5algos_Node *)__pyx_t_1)->next, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 137; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_5 = ((__pyx_v_value != ((struct __pyx_obj_6pandas_5algos_Node *)__pyx_t_2)->value) != 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_5) { /* "pandas/src/skiplist.pyx":138 * * if value != ( ( ( chain[0]).next)[0]).value: * raise KeyError('Not Found') # <<<<<<<<<<<<<< * * # remove one link at each level */ __pyx_t_2 = PyObject_Call(__pyx_builtin_KeyError, __pyx_tuple_, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 138; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 138; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } /* "pandas/src/skiplist.pyx":141 * * # remove one link at each level * d = len(( ( ( chain[0]).next)[0]).next) # <<<<<<<<<<<<<< * * for level in range(d): */ __pyx_t_2 = __Pyx_GetItemInt_List(__pyx_v_chain, 0, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 141; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __Pyx_GetItemInt(((struct __pyx_obj_6pandas_5algos_Node *)__pyx_t_2)->next, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 141; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = ((struct __pyx_obj_6pandas_5algos_Node *)__pyx_t_1)->next; __Pyx_INCREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (unlikely(__pyx_t_2 == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 141; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_4 = PyList_GET_SIZE(__pyx_t_2); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 141; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_d = __pyx_t_4; /* "pandas/src/skiplist.pyx":143 * d = len(( ( ( chain[0]).next)[0]).next) * * for level in range(d): # <<<<<<<<<<<<<< * prevnode = chain[level] * tmpnode = prevnode.next[level] */ __pyx_t_4 = __pyx_v_d; for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_4; __pyx_t_6+=1) { __pyx_v_level = __pyx_t_6; /* "pandas/src/skiplist.pyx":144 * * for level in range(d): * prevnode = chain[level] # <<<<<<<<<<<<<< * tmpnode = prevnode.next[level] * prevnode.width[level] += tmpnode.width[level] - 1 */ __pyx_t_2 = __Pyx_GetItemInt_List(__pyx_v_chain, __pyx_v_level, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 144; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_2); if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_6pandas_5algos_Node))))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 144; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_XDECREF_SET(__pyx_v_prevnode, ((struct __pyx_obj_6pandas_5algos_Node *)__pyx_t_2)); __pyx_t_2 = 0; /* "pandas/src/skiplist.pyx":145 * for level in range(d): * prevnode = chain[level] * tmpnode = prevnode.next[level] # <<<<<<<<<<<<<< * prevnode.width[level] += tmpnode.width[level] - 1 * prevnode.next[level] = tmpnode.next[level] */ if (unlikely(__pyx_v_prevnode->next == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 145; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_2 = __Pyx_GetItemInt_List(__pyx_v_prevnode->next, __pyx_v_level, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 145; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_2); if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_6pandas_5algos_Node))))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 145; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_XDECREF_SET(__pyx_v_tmpnode, ((struct __pyx_obj_6pandas_5algos_Node *)__pyx_t_2)); __pyx_t_2 = 0; /* "pandas/src/skiplist.pyx":146 * prevnode = chain[level] * tmpnode = prevnode.next[level] * prevnode.width[level] += tmpnode.width[level] - 1 # <<<<<<<<<<<<<< * prevnode.next[level] = tmpnode.next[level] * */ if (unlikely(__pyx_v_prevnode->width == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 146; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __Pyx_INCREF(__pyx_v_prevnode->width); __pyx_t_7 = __pyx_v_prevnode->width; __pyx_t_8 = __pyx_v_level; if (unlikely(__pyx_t_7 == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 146; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_2 = __Pyx_GetItemInt_List(__pyx_t_7, __pyx_t_8, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 146; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_2); if (unlikely(__pyx_v_tmpnode->width == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 146; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_tmpnode->width, __pyx_v_level, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 146; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = PyNumber_Subtract(__pyx_t_1, __pyx_int_1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 146; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 146; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(__pyx_t_7 == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 146; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } if (unlikely(__Pyx_SetItemInt(__pyx_t_7, __pyx_t_8, __pyx_t_1, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1) < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 146; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; /* "pandas/src/skiplist.pyx":147 * tmpnode = prevnode.next[level] * prevnode.width[level] += tmpnode.width[level] - 1 * prevnode.next[level] = tmpnode.next[level] # <<<<<<<<<<<<<< * * for level in range(d, self.maxlevels): */ if (unlikely(__pyx_v_tmpnode->next == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 147; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_tmpnode->next, __pyx_v_level, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 147; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_1); if (unlikely(__pyx_v_prevnode->next == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 147; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } if (unlikely(__Pyx_SetItemInt(__pyx_v_prevnode->next, __pyx_v_level, __pyx_t_1, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1) < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 147; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } /* "pandas/src/skiplist.pyx":149 * prevnode.next[level] = tmpnode.next[level] * * for level in range(d, self.maxlevels): # <<<<<<<<<<<<<< * tmpnode = chain[level] * tmpnode.width[level] -= 1 */ __pyx_t_4 = __pyx_v_self->maxlevels; for (__pyx_t_6 = __pyx_v_d; __pyx_t_6 < __pyx_t_4; __pyx_t_6+=1) { __pyx_v_level = __pyx_t_6; /* "pandas/src/skiplist.pyx":150 * * for level in range(d, self.maxlevels): * tmpnode = chain[level] # <<<<<<<<<<<<<< * tmpnode.width[level] -= 1 * */ __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_chain, __pyx_v_level, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 150; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_1); if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_6pandas_5algos_Node))))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 150; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_XDECREF_SET(__pyx_v_tmpnode, ((struct __pyx_obj_6pandas_5algos_Node *)__pyx_t_1)); __pyx_t_1 = 0; /* "pandas/src/skiplist.pyx":151 * for level in range(d, self.maxlevels): * tmpnode = chain[level] * tmpnode.width[level] -= 1 # <<<<<<<<<<<<<< * * self.size -= 1 */ if (unlikely(__pyx_v_tmpnode->width == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 151; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __Pyx_INCREF(__pyx_v_tmpnode->width); __pyx_t_7 = __pyx_v_tmpnode->width; __pyx_t_8 = __pyx_v_level; if (unlikely(__pyx_t_7 == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 151; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_t_7, __pyx_t_8, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 151; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = PyNumber_InPlaceSubtract(__pyx_t_1, __pyx_int_1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 151; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (unlikely(__pyx_t_7 == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 151; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } if (unlikely(__Pyx_SetItemInt(__pyx_t_7, __pyx_t_8, __pyx_t_3, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1) < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 151; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } /* "pandas/src/skiplist.pyx":153 * tmpnode.width[level] -= 1 * * self.size -= 1 # <<<<<<<<<<<<<< */ __pyx_v_self->size = (__pyx_v_self->size - 1); /* "pandas/src/skiplist.pyx":120 * self.size += 1 * * cpdef remove(self, double value): # <<<<<<<<<<<<<< * cdef Py_ssize_t level, d * cdef Node node, prevnode, tmpnode, next_at_level */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_7); __Pyx_AddTraceback("pandas.algos.IndexableSkiplist.remove", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_node); __Pyx_XDECREF((PyObject *)__pyx_v_prevnode); __Pyx_XDECREF((PyObject *)__pyx_v_tmpnode); __Pyx_XDECREF((PyObject *)__pyx_v_next_at_level); __Pyx_XDECREF(__pyx_v_chain); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_17IndexableSkiplist_11remove(PyObject *__pyx_v_self, PyObject *__pyx_arg_value); /*proto*/ static PyObject *__pyx_pw_6pandas_5algos_17IndexableSkiplist_11remove(PyObject *__pyx_v_self, PyObject *__pyx_arg_value) { double __pyx_v_value; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("remove (wrapper)", 0); assert(__pyx_arg_value); { __pyx_v_value = __pyx_PyFloat_AsDouble(__pyx_arg_value); if (unlikely((__pyx_v_value == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 120; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.IndexableSkiplist.remove", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pandas_5algos_17IndexableSkiplist_10remove(((struct __pyx_obj_6pandas_5algos_IndexableSkiplist *)__pyx_v_self), ((double)__pyx_v_value)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5algos_17IndexableSkiplist_10remove(struct __pyx_obj_6pandas_5algos_IndexableSkiplist *__pyx_v_self, double __pyx_v_value) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("remove", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = ((struct __pyx_vtabstruct_6pandas_5algos_IndexableSkiplist *)__pyx_v_self->__pyx_vtab)->remove(__pyx_v_self, __pyx_v_value, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 120; __pyx_clineno = __LINE__; goto __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.algos.IndexableSkiplist.remove", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/algos.pyx":87 * # from cython cimport floating, integral * * cdef _take_2d_float64(ndarray[float64_t, ndim=2] values, # <<<<<<<<<<<<<< * object idx): * cdef: */ static PyObject *__pyx_f_6pandas_5algos__take_2d_float64(PyArrayObject *__pyx_v_values, PyObject *__pyx_v_idx) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_N; Py_ssize_t __pyx_v_K; PyArrayObject *__pyx_v_indexer = 0; PyArrayObject *__pyx_v_result = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_indexer; __Pyx_Buffer __pyx_pybuffer_indexer; __Pyx_LocalBuf_ND __pyx_pybuffernd_result; __Pyx_Buffer __pyx_pybuffer_result; __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; PyObject *(*__pyx_t_5)(PyObject *); Py_ssize_t __pyx_t_6; Py_ssize_t __pyx_t_7; PyArrayObject *__pyx_t_8 = NULL; int __pyx_t_9; PyObject *__pyx_t_10 = NULL; PyObject *__pyx_t_11 = NULL; PyObject *__pyx_t_12 = NULL; 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_take_2d_float64", 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_result.pybuffer.buf = NULL; __pyx_pybuffer_result.refcount = 0; __pyx_pybuffernd_result.data = NULL; __pyx_pybuffernd_result.rcbuffer = &__pyx_pybuffer_result; __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, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 87; __pyx_clineno = __LINE__; goto __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_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1]; /* "pandas/algos.pyx":91 * cdef: * Py_ssize_t i, j, N, K * ndarray[Py_ssize_t, ndim=2, cast=True] indexer = idx # <<<<<<<<<<<<<< * ndarray[float64_t, ndim=2] result * object val */ if (!(likely(((__pyx_v_idx) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_idx, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 91; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_1 = __pyx_v_idx; __Pyx_INCREF(__pyx_t_1); { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_1), &__Pyx_TypeInfo_Py_ssize_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 1, __pyx_stack) == -1)) { __pyx_v_indexer = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf = NULL; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 91; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } else {__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_pybuffernd_indexer.diminfo[1].strides = __pyx_pybuffernd_indexer.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_indexer.diminfo[1].shape = __pyx_pybuffernd_indexer.rcbuffer->pybuffer.shape[1]; } } __pyx_v_indexer = ((PyArrayObject *)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/algos.pyx":95 * object val * * N, K = ( values).shape # <<<<<<<<<<<<<< * result = np.empty_like(values) * for i in range(N): */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_values), __pyx_n_s_shape); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 95; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) { PyObject* sequence = __pyx_t_1; #if CYTHON_COMPILING_IN_CPYTHON Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 95; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1); } else { __pyx_t_2 = PyList_GET_ITEM(sequence, 0); __pyx_t_3 = PyList_GET_ITEM(sequence, 1); } __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); #else __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 95; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 95; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } else { Py_ssize_t index = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 95; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_5 = Py_TYPE(__pyx_t_4)->tp_iternext; index = 0; __pyx_t_2 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_2)) goto __pyx_L3_unpacking_failed; __Pyx_GOTREF(__pyx_t_2); index = 1; __pyx_t_3 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_3)) goto __pyx_L3_unpacking_failed; __Pyx_GOTREF(__pyx_t_3); if (__Pyx_IternextUnpackEndCheck(__pyx_t_5(__pyx_t_4), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 95; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 95; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_L4_unpacking_done:; } __pyx_t_6 = __Pyx_PyIndex_AsSsize_t(__pyx_t_2); if (unlikely((__pyx_t_6 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 95; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_7 = __Pyx_PyIndex_AsSsize_t(__pyx_t_3); if (unlikely((__pyx_t_7 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 95; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_N = __pyx_t_6; __pyx_v_K = __pyx_t_7; /* "pandas/algos.pyx":96 * * N, K = ( values).shape * result = np.empty_like(values) # <<<<<<<<<<<<<< * for i in range(N): * for j in range(K): */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 96; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_empty_like); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 96; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 96; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)__pyx_v_values)); PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_values)); __Pyx_GIVEREF(((PyObject *)__pyx_v_values)); __pyx_t_2 = PyObject_Call(__pyx_t_3, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 96; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 96; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_8 = ((PyArrayObject *)__pyx_t_2); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __pyx_t_9 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_t_8, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack); if (unlikely(__pyx_t_9 < 0)) { PyErr_Fetch(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12); 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, 2, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_11); Py_XDECREF(__pyx_t_12); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_10, __pyx_t_11, __pyx_t_12); } } __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]; __pyx_pybuffernd_result.diminfo[1].strides = __pyx_pybuffernd_result.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_result.diminfo[1].shape = __pyx_pybuffernd_result.rcbuffer->pybuffer.shape[1]; if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 96; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_8 = 0; __pyx_v_result = ((PyArrayObject *)__pyx_t_2); __pyx_t_2 = 0; /* "pandas/algos.pyx":97 * N, K = ( values).shape * result = np.empty_like(values) * for i in range(N): # <<<<<<<<<<<<<< * for j in range(K): * result[i, j] = values[i, indexer[i, j]] */ __pyx_t_7 = __pyx_v_N; for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_7; __pyx_t_6+=1) { __pyx_v_i = __pyx_t_6; /* "pandas/algos.pyx":98 * result = np.empty_like(values) * for i in range(N): * for j in range(K): # <<<<<<<<<<<<<< * result[i, j] = values[i, indexer[i, j]] * return result */ __pyx_t_13 = __pyx_v_K; for (__pyx_t_14 = 0; __pyx_t_14 < __pyx_t_13; __pyx_t_14+=1) { __pyx_v_j = __pyx_t_14; /* "pandas/algos.pyx":99 * for i in range(N): * for j in range(K): * result[i, j] = values[i, indexer[i, j]] # <<<<<<<<<<<<<< * return result * */ __pyx_t_15 = __pyx_v_i; __pyx_t_16 = __pyx_v_j; __pyx_t_9 = -1; if (__pyx_t_15 < 0) { __pyx_t_15 += __pyx_pybuffernd_indexer.diminfo[0].shape; if (unlikely(__pyx_t_15 < 0)) __pyx_t_9 = 0; } else if (unlikely(__pyx_t_15 >= __pyx_pybuffernd_indexer.diminfo[0].shape)) __pyx_t_9 = 0; if (__pyx_t_16 < 0) { __pyx_t_16 += __pyx_pybuffernd_indexer.diminfo[1].shape; if (unlikely(__pyx_t_16 < 0)) __pyx_t_9 = 1; } else if (unlikely(__pyx_t_16 >= __pyx_pybuffernd_indexer.diminfo[1].shape)) __pyx_t_9 = 1; if (unlikely(__pyx_t_9 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_9); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 99; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_17 = __pyx_v_i; __pyx_t_18 = (*__Pyx_BufPtrStrided2d(Py_ssize_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_indexer.diminfo[0].strides, __pyx_t_16, __pyx_pybuffernd_indexer.diminfo[1].strides)); __pyx_t_9 = -1; if (__pyx_t_17 < 0) { __pyx_t_17 += __pyx_pybuffernd_values.diminfo[0].shape; if (unlikely(__pyx_t_17 < 0)) __pyx_t_9 = 0; } else if (unlikely(__pyx_t_17 >= __pyx_pybuffernd_values.diminfo[0].shape)) __pyx_t_9 = 0; if (__pyx_t_18 < 0) { __pyx_t_18 += __pyx_pybuffernd_values.diminfo[1].shape; if (unlikely(__pyx_t_18 < 0)) __pyx_t_9 = 1; } else if (unlikely(__pyx_t_18 >= __pyx_pybuffernd_values.diminfo[1].shape)) __pyx_t_9 = 1; if (unlikely(__pyx_t_9 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_9); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 99; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_19 = __pyx_v_i; __pyx_t_20 = __pyx_v_j; __pyx_t_9 = -1; if (__pyx_t_19 < 0) { __pyx_t_19 += __pyx_pybuffernd_result.diminfo[0].shape; if (unlikely(__pyx_t_19 < 0)) __pyx_t_9 = 0; } else if (unlikely(__pyx_t_19 >= __pyx_pybuffernd_result.diminfo[0].shape)) __pyx_t_9 = 0; if (__pyx_t_20 < 0) { __pyx_t_20 += __pyx_pybuffernd_result.diminfo[1].shape; if (unlikely(__pyx_t_20 < 0)) __pyx_t_9 = 1; } else if (unlikely(__pyx_t_20 >= __pyx_pybuffernd_result.diminfo[1].shape)) __pyx_t_9 = 1; if (unlikely(__pyx_t_9 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_9); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 99; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_result.diminfo[0].strides, __pyx_t_20, __pyx_pybuffernd_result.diminfo[1].strides) = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_18, __pyx_pybuffernd_values.diminfo[1].strides)); } } /* "pandas/algos.pyx":100 * for j in range(K): * result[i, j] = values[i, indexer[i, j]] * return result # <<<<<<<<<<<<<< * * cdef _take_2d_int64(ndarray[int64_t, ndim=2] values, */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_result)); __pyx_r = ((PyObject *)__pyx_v_result); goto __pyx_L0; /* "pandas/algos.pyx":87 * # from cython cimport floating, integral * * cdef _take_2d_float64(ndarray[float64_t, ndim=2] values, # <<<<<<<<<<<<<< * object idx): * 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); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos._take_2d_float64", __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_result.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_indexer); __Pyx_XDECREF((PyObject *)__pyx_v_result); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/algos.pyx":102 * return result * * cdef _take_2d_int64(ndarray[int64_t, ndim=2] values, # <<<<<<<<<<<<<< * object idx): * cdef: */ static PyObject *__pyx_f_6pandas_5algos__take_2d_int64(PyArrayObject *__pyx_v_values, PyObject *__pyx_v_idx) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_N; Py_ssize_t __pyx_v_K; PyArrayObject *__pyx_v_indexer = 0; PyArrayObject *__pyx_v_result = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_indexer; __Pyx_Buffer __pyx_pybuffer_indexer; __Pyx_LocalBuf_ND __pyx_pybuffernd_result; __Pyx_Buffer __pyx_pybuffer_result; __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; PyObject *(*__pyx_t_5)(PyObject *); Py_ssize_t __pyx_t_6; Py_ssize_t __pyx_t_7; PyArrayObject *__pyx_t_8 = NULL; int __pyx_t_9; PyObject *__pyx_t_10 = NULL; PyObject *__pyx_t_11 = NULL; PyObject *__pyx_t_12 = NULL; 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_take_2d_int64", 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_result.pybuffer.buf = NULL; __pyx_pybuffer_result.refcount = 0; __pyx_pybuffernd_result.data = NULL; __pyx_pybuffernd_result.rcbuffer = &__pyx_pybuffer_result; __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_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __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_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1]; /* "pandas/algos.pyx":106 * cdef: * Py_ssize_t i, j, N, K * ndarray[Py_ssize_t, ndim=2, cast=True] indexer = idx # <<<<<<<<<<<<<< * ndarray[int64_t, ndim=2] result * object val */ if (!(likely(((__pyx_v_idx) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_idx, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 106; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_1 = __pyx_v_idx; __Pyx_INCREF(__pyx_t_1); { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_1), &__Pyx_TypeInfo_Py_ssize_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 1, __pyx_stack) == -1)) { __pyx_v_indexer = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf = NULL; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 106; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } else {__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_pybuffernd_indexer.diminfo[1].strides = __pyx_pybuffernd_indexer.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_indexer.diminfo[1].shape = __pyx_pybuffernd_indexer.rcbuffer->pybuffer.shape[1]; } } __pyx_v_indexer = ((PyArrayObject *)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/algos.pyx":110 * object val * * N, K = ( values).shape # <<<<<<<<<<<<<< * result = np.empty_like(values) * for i in range(N): */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_values), __pyx_n_s_shape); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 110; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) { PyObject* sequence = __pyx_t_1; #if CYTHON_COMPILING_IN_CPYTHON Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 110; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1); } else { __pyx_t_2 = PyList_GET_ITEM(sequence, 0); __pyx_t_3 = PyList_GET_ITEM(sequence, 1); } __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); #else __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 110; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 110; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } else { Py_ssize_t index = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 110; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_5 = Py_TYPE(__pyx_t_4)->tp_iternext; index = 0; __pyx_t_2 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_2)) goto __pyx_L3_unpacking_failed; __Pyx_GOTREF(__pyx_t_2); index = 1; __pyx_t_3 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_3)) goto __pyx_L3_unpacking_failed; __Pyx_GOTREF(__pyx_t_3); if (__Pyx_IternextUnpackEndCheck(__pyx_t_5(__pyx_t_4), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 110; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 110; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_L4_unpacking_done:; } __pyx_t_6 = __Pyx_PyIndex_AsSsize_t(__pyx_t_2); if (unlikely((__pyx_t_6 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 110; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_7 = __Pyx_PyIndex_AsSsize_t(__pyx_t_3); if (unlikely((__pyx_t_7 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 110; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_N = __pyx_t_6; __pyx_v_K = __pyx_t_7; /* "pandas/algos.pyx":111 * * N, K = ( values).shape * result = np.empty_like(values) # <<<<<<<<<<<<<< * for i in range(N): * for j in range(K): */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 111; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_empty_like); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 111; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 111; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)__pyx_v_values)); PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_values)); __Pyx_GIVEREF(((PyObject *)__pyx_v_values)); __pyx_t_2 = PyObject_Call(__pyx_t_3, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 111; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 111; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_8 = ((PyArrayObject *)__pyx_t_2); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __pyx_t_9 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_t_8, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack); if (unlikely(__pyx_t_9 < 0)) { PyErr_Fetch(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_v_result, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_11); Py_XDECREF(__pyx_t_12); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_10, __pyx_t_11, __pyx_t_12); } } __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]; __pyx_pybuffernd_result.diminfo[1].strides = __pyx_pybuffernd_result.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_result.diminfo[1].shape = __pyx_pybuffernd_result.rcbuffer->pybuffer.shape[1]; if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 111; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_8 = 0; __pyx_v_result = ((PyArrayObject *)__pyx_t_2); __pyx_t_2 = 0; /* "pandas/algos.pyx":112 * N, K = ( values).shape * result = np.empty_like(values) * for i in range(N): # <<<<<<<<<<<<<< * for j in range(K): * result[i, j] = values[i, indexer[i, j]] */ __pyx_t_7 = __pyx_v_N; for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_7; __pyx_t_6+=1) { __pyx_v_i = __pyx_t_6; /* "pandas/algos.pyx":113 * result = np.empty_like(values) * for i in range(N): * for j in range(K): # <<<<<<<<<<<<<< * result[i, j] = values[i, indexer[i, j]] * return result */ __pyx_t_13 = __pyx_v_K; for (__pyx_t_14 = 0; __pyx_t_14 < __pyx_t_13; __pyx_t_14+=1) { __pyx_v_j = __pyx_t_14; /* "pandas/algos.pyx":114 * for i in range(N): * for j in range(K): * result[i, j] = values[i, indexer[i, j]] # <<<<<<<<<<<<<< * return result * */ __pyx_t_15 = __pyx_v_i; __pyx_t_16 = __pyx_v_j; __pyx_t_9 = -1; if (__pyx_t_15 < 0) { __pyx_t_15 += __pyx_pybuffernd_indexer.diminfo[0].shape; if (unlikely(__pyx_t_15 < 0)) __pyx_t_9 = 0; } else if (unlikely(__pyx_t_15 >= __pyx_pybuffernd_indexer.diminfo[0].shape)) __pyx_t_9 = 0; if (__pyx_t_16 < 0) { __pyx_t_16 += __pyx_pybuffernd_indexer.diminfo[1].shape; if (unlikely(__pyx_t_16 < 0)) __pyx_t_9 = 1; } else if (unlikely(__pyx_t_16 >= __pyx_pybuffernd_indexer.diminfo[1].shape)) __pyx_t_9 = 1; if (unlikely(__pyx_t_9 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_9); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 114; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_17 = __pyx_v_i; __pyx_t_18 = (*__Pyx_BufPtrStrided2d(Py_ssize_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_indexer.diminfo[0].strides, __pyx_t_16, __pyx_pybuffernd_indexer.diminfo[1].strides)); __pyx_t_9 = -1; if (__pyx_t_17 < 0) { __pyx_t_17 += __pyx_pybuffernd_values.diminfo[0].shape; if (unlikely(__pyx_t_17 < 0)) __pyx_t_9 = 0; } else if (unlikely(__pyx_t_17 >= __pyx_pybuffernd_values.diminfo[0].shape)) __pyx_t_9 = 0; if (__pyx_t_18 < 0) { __pyx_t_18 += __pyx_pybuffernd_values.diminfo[1].shape; if (unlikely(__pyx_t_18 < 0)) __pyx_t_9 = 1; } else if (unlikely(__pyx_t_18 >= __pyx_pybuffernd_values.diminfo[1].shape)) __pyx_t_9 = 1; if (unlikely(__pyx_t_9 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_9); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 114; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_19 = __pyx_v_i; __pyx_t_20 = __pyx_v_j; __pyx_t_9 = -1; if (__pyx_t_19 < 0) { __pyx_t_19 += __pyx_pybuffernd_result.diminfo[0].shape; if (unlikely(__pyx_t_19 < 0)) __pyx_t_9 = 0; } else if (unlikely(__pyx_t_19 >= __pyx_pybuffernd_result.diminfo[0].shape)) __pyx_t_9 = 0; if (__pyx_t_20 < 0) { __pyx_t_20 += __pyx_pybuffernd_result.diminfo[1].shape; if (unlikely(__pyx_t_20 < 0)) __pyx_t_9 = 1; } else if (unlikely(__pyx_t_20 >= __pyx_pybuffernd_result.diminfo[1].shape)) __pyx_t_9 = 1; if (unlikely(__pyx_t_9 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_9); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 114; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_result.diminfo[0].strides, __pyx_t_20, __pyx_pybuffernd_result.diminfo[1].strides) = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_18, __pyx_pybuffernd_values.diminfo[1].strides)); } } /* "pandas/algos.pyx":115 * for j in range(K): * result[i, j] = values[i, indexer[i, j]] * return result # <<<<<<<<<<<<<< * * cdef _take_2d_object(ndarray[object, ndim=2] values, */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_result)); __pyx_r = ((PyObject *)__pyx_v_result); goto __pyx_L0; /* "pandas/algos.pyx":102 * return result * * cdef _take_2d_int64(ndarray[int64_t, ndim=2] values, # <<<<<<<<<<<<<< * object idx): * 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); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos._take_2d_int64", __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_result.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_indexer); __Pyx_XDECREF((PyObject *)__pyx_v_result); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/algos.pyx":117 * return result * * cdef _take_2d_object(ndarray[object, ndim=2] values, # <<<<<<<<<<<<<< * object idx): * cdef: */ static PyObject *__pyx_f_6pandas_5algos__take_2d_object(PyArrayObject *__pyx_v_values, PyObject *__pyx_v_idx) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_N; Py_ssize_t __pyx_v_K; PyArrayObject *__pyx_v_indexer = 0; PyArrayObject *__pyx_v_result = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_indexer; __Pyx_Buffer __pyx_pybuffer_indexer; __Pyx_LocalBuf_ND __pyx_pybuffernd_result; __Pyx_Buffer __pyx_pybuffer_result; __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; PyObject *(*__pyx_t_5)(PyObject *); Py_ssize_t __pyx_t_6; Py_ssize_t __pyx_t_7; PyArrayObject *__pyx_t_8 = NULL; int __pyx_t_9; PyObject *__pyx_t_10 = NULL; PyObject *__pyx_t_11 = NULL; PyObject *__pyx_t_12 = NULL; 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; PyObject **__pyx_t_21; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_take_2d_object", 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_result.pybuffer.buf = NULL; __pyx_pybuffer_result.refcount = 0; __pyx_pybuffernd_result.data = NULL; __pyx_pybuffernd_result.rcbuffer = &__pyx_pybuffer_result; __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, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 117; __pyx_clineno = __LINE__; goto __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_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1]; /* "pandas/algos.pyx":121 * cdef: * Py_ssize_t i, j, N, K * ndarray[Py_ssize_t, ndim=2, cast=True] indexer = idx # <<<<<<<<<<<<<< * ndarray[object, ndim=2] result * object val */ if (!(likely(((__pyx_v_idx) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_idx, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 121; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_1 = __pyx_v_idx; __Pyx_INCREF(__pyx_t_1); { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_1), &__Pyx_TypeInfo_Py_ssize_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 1, __pyx_stack) == -1)) { __pyx_v_indexer = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf = NULL; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 121; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } else {__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_pybuffernd_indexer.diminfo[1].strides = __pyx_pybuffernd_indexer.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_indexer.diminfo[1].shape = __pyx_pybuffernd_indexer.rcbuffer->pybuffer.shape[1]; } } __pyx_v_indexer = ((PyArrayObject *)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/algos.pyx":125 * object val * * N, K = ( values).shape # <<<<<<<<<<<<<< * result = values.copy() * for i in range(N): */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_values), __pyx_n_s_shape); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 125; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) { PyObject* sequence = __pyx_t_1; #if CYTHON_COMPILING_IN_CPYTHON Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 125; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1); } else { __pyx_t_2 = PyList_GET_ITEM(sequence, 0); __pyx_t_3 = PyList_GET_ITEM(sequence, 1); } __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); #else __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 125; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 125; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } else { Py_ssize_t index = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 125; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_5 = Py_TYPE(__pyx_t_4)->tp_iternext; index = 0; __pyx_t_2 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_2)) goto __pyx_L3_unpacking_failed; __Pyx_GOTREF(__pyx_t_2); index = 1; __pyx_t_3 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_3)) goto __pyx_L3_unpacking_failed; __Pyx_GOTREF(__pyx_t_3); if (__Pyx_IternextUnpackEndCheck(__pyx_t_5(__pyx_t_4), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 125; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 125; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_L4_unpacking_done:; } __pyx_t_6 = __Pyx_PyIndex_AsSsize_t(__pyx_t_2); if (unlikely((__pyx_t_6 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 125; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_7 = __Pyx_PyIndex_AsSsize_t(__pyx_t_3); if (unlikely((__pyx_t_7 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 125; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_N = __pyx_t_6; __pyx_v_K = __pyx_t_7; /* "pandas/algos.pyx":126 * * N, K = ( values).shape * result = values.copy() # <<<<<<<<<<<<<< * for i in range(N): * for j in range(K): */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_values), __pyx_n_s_copy); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 126; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = PyObject_Call(__pyx_t_1, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 126; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 126; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_8 = ((PyArrayObject *)__pyx_t_3); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __pyx_t_9 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_t_8, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack); if (unlikely(__pyx_t_9 < 0)) { PyErr_Fetch(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_v_result, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_11); Py_XDECREF(__pyx_t_12); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_10, __pyx_t_11, __pyx_t_12); } } __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]; __pyx_pybuffernd_result.diminfo[1].strides = __pyx_pybuffernd_result.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_result.diminfo[1].shape = __pyx_pybuffernd_result.rcbuffer->pybuffer.shape[1]; if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 126; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_8 = 0; __pyx_v_result = ((PyArrayObject *)__pyx_t_3); __pyx_t_3 = 0; /* "pandas/algos.pyx":127 * N, K = ( values).shape * result = values.copy() * for i in range(N): # <<<<<<<<<<<<<< * for j in range(K): * result[i, j] = values[i, indexer[i, j]] */ __pyx_t_7 = __pyx_v_N; for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_7; __pyx_t_6+=1) { __pyx_v_i = __pyx_t_6; /* "pandas/algos.pyx":128 * result = values.copy() * for i in range(N): * for j in range(K): # <<<<<<<<<<<<<< * result[i, j] = values[i, indexer[i, j]] * return result */ __pyx_t_13 = __pyx_v_K; for (__pyx_t_14 = 0; __pyx_t_14 < __pyx_t_13; __pyx_t_14+=1) { __pyx_v_j = __pyx_t_14; /* "pandas/algos.pyx":129 * for i in range(N): * for j in range(K): * result[i, j] = values[i, indexer[i, j]] # <<<<<<<<<<<<<< * return result * */ __pyx_t_15 = __pyx_v_i; __pyx_t_16 = __pyx_v_j; __pyx_t_9 = -1; if (__pyx_t_15 < 0) { __pyx_t_15 += __pyx_pybuffernd_indexer.diminfo[0].shape; if (unlikely(__pyx_t_15 < 0)) __pyx_t_9 = 0; } else if (unlikely(__pyx_t_15 >= __pyx_pybuffernd_indexer.diminfo[0].shape)) __pyx_t_9 = 0; if (__pyx_t_16 < 0) { __pyx_t_16 += __pyx_pybuffernd_indexer.diminfo[1].shape; if (unlikely(__pyx_t_16 < 0)) __pyx_t_9 = 1; } else if (unlikely(__pyx_t_16 >= __pyx_pybuffernd_indexer.diminfo[1].shape)) __pyx_t_9 = 1; if (unlikely(__pyx_t_9 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_9); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 129; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_17 = __pyx_v_i; __pyx_t_18 = (*__Pyx_BufPtrStrided2d(Py_ssize_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_indexer.diminfo[0].strides, __pyx_t_16, __pyx_pybuffernd_indexer.diminfo[1].strides)); __pyx_t_9 = -1; if (__pyx_t_17 < 0) { __pyx_t_17 += __pyx_pybuffernd_values.diminfo[0].shape; if (unlikely(__pyx_t_17 < 0)) __pyx_t_9 = 0; } else if (unlikely(__pyx_t_17 >= __pyx_pybuffernd_values.diminfo[0].shape)) __pyx_t_9 = 0; if (__pyx_t_18 < 0) { __pyx_t_18 += __pyx_pybuffernd_values.diminfo[1].shape; if (unlikely(__pyx_t_18 < 0)) __pyx_t_9 = 1; } else if (unlikely(__pyx_t_18 >= __pyx_pybuffernd_values.diminfo[1].shape)) __pyx_t_9 = 1; if (unlikely(__pyx_t_9 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_9); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 129; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_3 = (PyObject *) *__Pyx_BufPtrStrided2d(PyObject **, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_18, __pyx_pybuffernd_values.diminfo[1].strides); __Pyx_INCREF((PyObject*)__pyx_t_3); __pyx_t_19 = __pyx_v_i; __pyx_t_20 = __pyx_v_j; __pyx_t_9 = -1; if (__pyx_t_19 < 0) { __pyx_t_19 += __pyx_pybuffernd_result.diminfo[0].shape; if (unlikely(__pyx_t_19 < 0)) __pyx_t_9 = 0; } else if (unlikely(__pyx_t_19 >= __pyx_pybuffernd_result.diminfo[0].shape)) __pyx_t_9 = 0; if (__pyx_t_20 < 0) { __pyx_t_20 += __pyx_pybuffernd_result.diminfo[1].shape; if (unlikely(__pyx_t_20 < 0)) __pyx_t_9 = 1; } else if (unlikely(__pyx_t_20 >= __pyx_pybuffernd_result.diminfo[1].shape)) __pyx_t_9 = 1; if (unlikely(__pyx_t_9 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_9); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 129; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_21 = __Pyx_BufPtrStrided2d(PyObject **, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_result.diminfo[0].strides, __pyx_t_20, __pyx_pybuffernd_result.diminfo[1].strides); __Pyx_GOTREF(*__pyx_t_21); __Pyx_INCREF(__pyx_t_3); __Pyx_DECREF(*__pyx_t_21); *__pyx_t_21 = __pyx_t_3; __Pyx_GIVEREF(*__pyx_t_21); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } } /* "pandas/algos.pyx":130 * for j in range(K): * result[i, j] = values[i, indexer[i, j]] * return result # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_result)); __pyx_r = ((PyObject *)__pyx_v_result); goto __pyx_L0; /* "pandas/algos.pyx":117 * return result * * cdef _take_2d_object(ndarray[object, ndim=2] values, # <<<<<<<<<<<<<< * object idx): * 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); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos._take_2d_object", __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_result.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_indexer); __Pyx_XDECREF((PyObject *)__pyx_v_result); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/algos.pyx":133 * * * def rank_1d_float64(object in_arr, ties_method='average', ascending=True, # <<<<<<<<<<<<<< * na_option='keep'): * """ */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_1rank_1d_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6pandas_5algos_rank_1d_float64[] = "\n Fast NaN-friendly version of scipy.stats.rankdata\n "; static PyMethodDef __pyx_mdef_6pandas_5algos_1rank_1d_float64 = {__Pyx_NAMESTR("rank_1d_float64"), (PyCFunction)__pyx_pw_6pandas_5algos_1rank_1d_float64, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_5algos_rank_1d_float64)}; static PyObject *__pyx_pw_6pandas_5algos_1rank_1d_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_in_arr = 0; PyObject *__pyx_v_ties_method = 0; PyObject *__pyx_v_ascending = 0; PyObject *__pyx_v_na_option = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("rank_1d_float64 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_in_arr,&__pyx_n_s_ties_method,&__pyx_n_s_ascending,&__pyx_n_s_na_option,0}; PyObject* values[4] = {0,0,0,0}; values[1] = ((PyObject *)__pyx_n_s_average); values[2] = ((PyObject *)Py_True); values[3] = ((PyObject *)__pyx_n_s_keep); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_in_arr)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ties_method); if (value) { values[1] = value; kw_args--; } } case 2: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ascending); if (value) { values[2] = value; kw_args--; } } case 3: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_na_option); if (value) { values[3] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "rank_1d_float64") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 133; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_in_arr = values[0]; __pyx_v_ties_method = values[1]; __pyx_v_ascending = values[2]; __pyx_v_na_option = values[3]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("rank_1d_float64", 0, 1, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 133; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.rank_1d_float64", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pandas_5algos_rank_1d_float64(__pyx_self, __pyx_v_in_arr, __pyx_v_ties_method, __pyx_v_ascending, __pyx_v_na_option); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5algos_rank_1d_float64(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_in_arr, PyObject *__pyx_v_ties_method, PyObject *__pyx_v_ascending, PyObject *__pyx_v_na_option) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_n; Py_ssize_t __pyx_v_dups; PyArrayObject *__pyx_v_sorted_data = 0; PyArrayObject *__pyx_v_ranks = 0; PyArrayObject *__pyx_v_values = 0; PyArrayObject *__pyx_v_argsorted = 0; __pyx_t_5numpy_float64_t __pyx_v_val; __pyx_t_5numpy_float64_t __pyx_v_nan_value; __pyx_t_5numpy_float64_t __pyx_v_sum_ranks; int __pyx_v_tiebreak; int __pyx_v_keep_na; PyObject *__pyx_v_mask = NULL; PyObject *__pyx_v__as = NULL; __Pyx_LocalBuf_ND __pyx_pybuffernd_argsorted; __Pyx_Buffer __pyx_pybuffer_argsorted; __Pyx_LocalBuf_ND __pyx_pybuffernd_ranks; __Pyx_Buffer __pyx_pybuffer_ranks; __Pyx_LocalBuf_ND __pyx_pybuffernd_sorted_data; __Pyx_Buffer __pyx_pybuffer_sorted_data; __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; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; PyArrayObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; int __pyx_t_9; __pyx_t_5numpy_float64_t __pyx_t_10; Py_ssize_t __pyx_t_11; PyObject *__pyx_t_12 = NULL; int __pyx_t_13; PyArrayObject *__pyx_t_14 = NULL; Py_ssize_t __pyx_t_15; Py_ssize_t __pyx_t_16; Py_ssize_t __pyx_t_17; __pyx_t_5numpy_int64_t __pyx_t_18; Py_ssize_t __pyx_t_19; int __pyx_t_20; Py_ssize_t __pyx_t_21; Py_ssize_t __pyx_t_22; Py_ssize_t __pyx_t_23; __pyx_t_5numpy_int64_t __pyx_t_24; Py_ssize_t __pyx_t_25; __pyx_t_5numpy_int64_t __pyx_t_26; Py_ssize_t __pyx_t_27; __pyx_t_5numpy_int64_t __pyx_t_28; Py_ssize_t __pyx_t_29; __pyx_t_5numpy_int64_t __pyx_t_30; Py_ssize_t __pyx_t_31; __pyx_t_5numpy_int64_t __pyx_t_32; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("rank_1d_float64", 0); __pyx_pybuffer_sorted_data.pybuffer.buf = NULL; __pyx_pybuffer_sorted_data.refcount = 0; __pyx_pybuffernd_sorted_data.data = NULL; __pyx_pybuffernd_sorted_data.rcbuffer = &__pyx_pybuffer_sorted_data; __pyx_pybuffer_ranks.pybuffer.buf = NULL; __pyx_pybuffer_ranks.refcount = 0; __pyx_pybuffernd_ranks.data = NULL; __pyx_pybuffernd_ranks.rcbuffer = &__pyx_pybuffer_ranks; __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_argsorted.pybuffer.buf = NULL; __pyx_pybuffer_argsorted.refcount = 0; __pyx_pybuffernd_argsorted.data = NULL; __pyx_pybuffernd_argsorted.rcbuffer = &__pyx_pybuffer_argsorted; /* "pandas/algos.pyx":140 * * cdef: * Py_ssize_t i, j, n, dups = 0 # <<<<<<<<<<<<<< * ndarray[float64_t] sorted_data, ranks, values * ndarray[int64_t] argsorted */ __pyx_v_dups = 0; /* "pandas/algos.pyx":144 * ndarray[int64_t] argsorted * float64_t val, nan_value * float64_t sum_ranks = 0 # <<<<<<<<<<<<<< * int tiebreak = 0 * bint keep_na = 0 */ __pyx_v_sum_ranks = 0.0; /* "pandas/algos.pyx":145 * float64_t val, nan_value * float64_t sum_ranks = 0 * int tiebreak = 0 # <<<<<<<<<<<<<< * bint keep_na = 0 * tiebreak = tiebreakers[ties_method] */ __pyx_v_tiebreak = 0; /* "pandas/algos.pyx":146 * float64_t sum_ranks = 0 * int tiebreak = 0 * bint keep_na = 0 # <<<<<<<<<<<<<< * tiebreak = tiebreakers[ties_method] * */ __pyx_v_keep_na = 0; /* "pandas/algos.pyx":147 * int tiebreak = 0 * bint keep_na = 0 * tiebreak = tiebreakers[ties_method] # <<<<<<<<<<<<<< * * values = np.asarray(in_arr).copy() */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_tiebreakers); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 147; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyObject_GetItem(__pyx_t_1, __pyx_v_ties_method); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 147; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 147; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_tiebreak = __pyx_t_3; /* "pandas/algos.pyx":149 * tiebreak = tiebreakers[ties_method] * * values = np.asarray(in_arr).copy() # <<<<<<<<<<<<<< * * keep_na = na_option == 'keep' */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 149; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_asarray); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 149; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 149; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_in_arr); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_in_arr); __Pyx_GIVEREF(__pyx_v_in_arr); __pyx_t_4 = PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 149; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_copy); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 149; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyObject_Call(__pyx_t_2, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 149; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 149; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_5 = ((PyArrayObject *)__pyx_t_4); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_t_3 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_values.rcbuffer->pybuffer, (PyObject*)__pyx_t_5, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_3 < 0)) { PyErr_Fetch(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8); 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)) { 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_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]; if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 149; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_5 = 0; __pyx_v_values = ((PyArrayObject *)__pyx_t_4); __pyx_t_4 = 0; /* "pandas/algos.pyx":151 * values = np.asarray(in_arr).copy() * * keep_na = na_option == 'keep' # <<<<<<<<<<<<<< * * if ascending ^ (na_option == 'top'): */ __pyx_t_4 = PyObject_RichCompare(__pyx_v_na_option, __pyx_n_s_keep, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 151; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_9 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 151; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_keep_na = __pyx_t_9; /* "pandas/algos.pyx":153 * keep_na = na_option == 'keep' * * if ascending ^ (na_option == 'top'): # <<<<<<<<<<<<<< * nan_value = np.inf * else: */ __pyx_t_4 = PyObject_RichCompare(__pyx_v_na_option, __pyx_n_s_top, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 153; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_2 = PyNumber_Xor(__pyx_v_ascending, __pyx_t_4); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 153; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 153; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_9) { /* "pandas/algos.pyx":154 * * if ascending ^ (na_option == 'top'): * nan_value = np.inf # <<<<<<<<<<<<<< * else: * nan_value = -np.inf */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 154; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_inf); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 154; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_10 = __pyx_PyFloat_AsDouble(__pyx_t_4); if (unlikely((__pyx_t_10 == (npy_float64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 154; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_nan_value = __pyx_t_10; goto __pyx_L3; } /*else*/ { /* "pandas/algos.pyx":156 * nan_value = np.inf * else: * nan_value = -np.inf # <<<<<<<<<<<<<< * mask = np.isnan(values) * np.putmask(values, mask, nan_value) */ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 156; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_inf); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 156; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyNumber_Negative(__pyx_t_2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 156; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_10 = __pyx_PyFloat_AsDouble(__pyx_t_4); if (unlikely((__pyx_t_10 == (npy_float64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 156; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_nan_value = __pyx_t_10; } __pyx_L3:; /* "pandas/algos.pyx":157 * else: * nan_value = -np.inf * mask = np.isnan(values) # <<<<<<<<<<<<<< * np.putmask(values, mask, nan_value) * */ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_isnan); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(((PyObject *)__pyx_v_values)); PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_v_values)); __Pyx_GIVEREF(((PyObject *)__pyx_v_values)); __pyx_t_1 = PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_mask = __pyx_t_1; __pyx_t_1 = 0; /* "pandas/algos.pyx":158 * nan_value = -np.inf * mask = np.isnan(values) * np.putmask(values, mask, nan_value) # <<<<<<<<<<<<<< * * n = len(values) */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 158; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_putmask); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 158; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyFloat_FromDouble(__pyx_v_nan_value); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 158; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 158; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(((PyObject *)__pyx_v_values)); PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_values)); __Pyx_GIVEREF(((PyObject *)__pyx_v_values)); __Pyx_INCREF(__pyx_v_mask); PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_mask); __Pyx_GIVEREF(__pyx_v_mask); PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyObject_Call(__pyx_t_4, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 158; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pandas/algos.pyx":160 * np.putmask(values, mask, nan_value) * * n = len(values) # <<<<<<<<<<<<<< * ranks = np.empty(n, dtype='f8') * */ __pyx_t_11 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 160; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_11; /* "pandas/algos.pyx":161 * * n = len(values) * ranks = np.empty(n, dtype='f8') # <<<<<<<<<<<<<< * * # py2.5/win32 hack, can't pass i8 */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 161; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 161; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 161; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 161; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 161; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_dtype, __pyx_n_s_f8) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 161; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_12 = PyObject_Call(__pyx_t_2, __pyx_t_4, __pyx_t_1); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 161; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __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_12) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_12, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 161; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_5 = ((PyArrayObject *)__pyx_t_12); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_ranks.rcbuffer->pybuffer); __pyx_t_3 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_ranks.rcbuffer->pybuffer, (PyObject*)__pyx_t_5, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_3 < 0)) { PyErr_Fetch(&__pyx_t_8, &__pyx_t_7, &__pyx_t_6); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_ranks.rcbuffer->pybuffer, (PyObject*)__pyx_v_ranks, &__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_7); Py_XDECREF(__pyx_t_6); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_8, __pyx_t_7, __pyx_t_6); } } __pyx_pybuffernd_ranks.diminfo[0].strides = __pyx_pybuffernd_ranks.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_ranks.diminfo[0].shape = __pyx_pybuffernd_ranks.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 161; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_5 = 0; __pyx_v_ranks = ((PyArrayObject *)__pyx_t_12); __pyx_t_12 = 0; /* "pandas/algos.pyx":164 * * # py2.5/win32 hack, can't pass i8 * if tiebreak == TIEBREAK_FIRST: # <<<<<<<<<<<<<< * # need to use a stable sort here * _as = values.argsort(kind='mergesort') */ __pyx_t_9 = ((__pyx_v_tiebreak == __pyx_v_6pandas_5algos_TIEBREAK_FIRST) != 0); if (__pyx_t_9) { /* "pandas/algos.pyx":166 * if tiebreak == TIEBREAK_FIRST: * # need to use a stable sort here * _as = values.argsort(kind='mergesort') # <<<<<<<<<<<<<< * if not ascending: * tiebreak = TIEBREAK_FIRST_DESCENDING */ __pyx_t_12 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_values), __pyx_n_s_argsort); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 166; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 166; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_kind, __pyx_n_s_mergesort) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 166; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_4 = PyObject_Call(__pyx_t_12, __pyx_empty_tuple, __pyx_t_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 166; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v__as = __pyx_t_4; __pyx_t_4 = 0; /* "pandas/algos.pyx":167 * # need to use a stable sort here * _as = values.argsort(kind='mergesort') * if not ascending: # <<<<<<<<<<<<<< * tiebreak = TIEBREAK_FIRST_DESCENDING * else: */ __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_v_ascending); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 167; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_13 = ((!__pyx_t_9) != 0); if (__pyx_t_13) { /* "pandas/algos.pyx":168 * _as = values.argsort(kind='mergesort') * if not ascending: * tiebreak = TIEBREAK_FIRST_DESCENDING # <<<<<<<<<<<<<< * else: * _as = values.argsort() */ __pyx_v_tiebreak = __pyx_v_6pandas_5algos_TIEBREAK_FIRST_DESCENDING; goto __pyx_L5; } __pyx_L5:; goto __pyx_L4; } /*else*/ { /* "pandas/algos.pyx":170 * tiebreak = TIEBREAK_FIRST_DESCENDING * else: * _as = values.argsort() # <<<<<<<<<<<<<< * * if not ascending: */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_values), __pyx_n_s_argsort); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 170; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_1 = PyObject_Call(__pyx_t_4, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 170; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v__as = __pyx_t_1; __pyx_t_1 = 0; } __pyx_L4:; /* "pandas/algos.pyx":172 * _as = values.argsort() * * if not ascending: # <<<<<<<<<<<<<< * _as = _as[::-1] * */ __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_v_ascending); if (unlikely(__pyx_t_13 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 172; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_9 = ((!__pyx_t_13) != 0); if (__pyx_t_9) { /* "pandas/algos.pyx":173 * * if not ascending: * _as = _as[::-1] # <<<<<<<<<<<<<< * * sorted_data = values.take(_as) */ __pyx_t_1 = PyObject_GetItem(__pyx_v__as, __pyx_slice__2); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 173; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF_SET(__pyx_v__as, __pyx_t_1); __pyx_t_1 = 0; goto __pyx_L6; } __pyx_L6:; /* "pandas/algos.pyx":175 * _as = _as[::-1] * * sorted_data = values.take(_as) # <<<<<<<<<<<<<< * argsorted = _as.astype('i8') * */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_values), __pyx_n_s_take); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 175; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 175; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_v__as); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v__as); __Pyx_GIVEREF(__pyx_v__as); __pyx_t_12 = PyObject_Call(__pyx_t_1, __pyx_t_4, NULL); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 175; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (!(likely(((__pyx_t_12) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_12, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 175; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_5 = ((PyArrayObject *)__pyx_t_12); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_sorted_data.rcbuffer->pybuffer); __pyx_t_3 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_sorted_data.rcbuffer->pybuffer, (PyObject*)__pyx_t_5, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_3 < 0)) { PyErr_Fetch(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_sorted_data.rcbuffer->pybuffer, (PyObject*)__pyx_v_sorted_data, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_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_pybuffernd_sorted_data.diminfo[0].strides = __pyx_pybuffernd_sorted_data.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_sorted_data.diminfo[0].shape = __pyx_pybuffernd_sorted_data.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 175; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_5 = 0; __pyx_v_sorted_data = ((PyArrayObject *)__pyx_t_12); __pyx_t_12 = 0; /* "pandas/algos.pyx":176 * * sorted_data = values.take(_as) * argsorted = _as.astype('i8') # <<<<<<<<<<<<<< * * for i in range(n): */ __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v__as, __pyx_n_s_astype); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 176; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __pyx_t_4 = PyObject_Call(__pyx_t_12, __pyx_tuple__3, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 176; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 176; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_14 = ((PyArrayObject *)__pyx_t_4); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_argsorted.rcbuffer->pybuffer); __pyx_t_3 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_argsorted.rcbuffer->pybuffer, (PyObject*)__pyx_t_14, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_3 < 0)) { PyErr_Fetch(&__pyx_t_8, &__pyx_t_7, &__pyx_t_6); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_argsorted.rcbuffer->pybuffer, (PyObject*)__pyx_v_argsorted, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_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_pybuffernd_argsorted.diminfo[0].strides = __pyx_pybuffernd_argsorted.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_argsorted.diminfo[0].shape = __pyx_pybuffernd_argsorted.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 176; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_14 = 0; __pyx_v_argsorted = ((PyArrayObject *)__pyx_t_4); __pyx_t_4 = 0; /* "pandas/algos.pyx":178 * argsorted = _as.astype('i8') * * for i in range(n): # <<<<<<<<<<<<<< * sum_ranks += i + 1 * dups += 1 */ __pyx_t_11 = __pyx_v_n; for (__pyx_t_15 = 0; __pyx_t_15 < __pyx_t_11; __pyx_t_15+=1) { __pyx_v_i = __pyx_t_15; /* "pandas/algos.pyx":179 * * for i in range(n): * sum_ranks += i + 1 # <<<<<<<<<<<<<< * dups += 1 * val = sorted_data[i] */ __pyx_v_sum_ranks = (__pyx_v_sum_ranks + (__pyx_v_i + 1)); /* "pandas/algos.pyx":180 * for i in range(n): * sum_ranks += i + 1 * dups += 1 # <<<<<<<<<<<<<< * val = sorted_data[i] * if (val == nan_value) and keep_na: */ __pyx_v_dups = (__pyx_v_dups + 1); /* "pandas/algos.pyx":181 * sum_ranks += i + 1 * dups += 1 * val = sorted_data[i] # <<<<<<<<<<<<<< * if (val == nan_value) and keep_na: * ranks[argsorted[i]] = nan */ __pyx_t_16 = __pyx_v_i; __pyx_t_3 = -1; if (__pyx_t_16 < 0) { __pyx_t_16 += __pyx_pybuffernd_sorted_data.diminfo[0].shape; if (unlikely(__pyx_t_16 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_16 >= __pyx_pybuffernd_sorted_data.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 181; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_val = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_sorted_data.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_sorted_data.diminfo[0].strides)); /* "pandas/algos.pyx":182 * dups += 1 * val = sorted_data[i] * if (val == nan_value) and keep_na: # <<<<<<<<<<<<<< * ranks[argsorted[i]] = nan * continue */ __pyx_t_9 = ((__pyx_v_val == __pyx_v_nan_value) != 0); if (__pyx_t_9) { __pyx_t_13 = (__pyx_v_keep_na != 0); } else { __pyx_t_13 = __pyx_t_9; } if (__pyx_t_13) { /* "pandas/algos.pyx":183 * val = sorted_data[i] * if (val == nan_value) and keep_na: * ranks[argsorted[i]] = nan # <<<<<<<<<<<<<< * continue * if i == n - 1 or fabs(sorted_data[i + 1] - val) > FP_ERR: */ __pyx_t_17 = __pyx_v_i; __pyx_t_3 = -1; if (__pyx_t_17 < 0) { __pyx_t_17 += __pyx_pybuffernd_argsorted.diminfo[0].shape; if (unlikely(__pyx_t_17 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_17 >= __pyx_pybuffernd_argsorted.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 183; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_18 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_argsorted.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_argsorted.diminfo[0].strides)); __pyx_t_3 = -1; if (__pyx_t_18 < 0) { __pyx_t_18 += __pyx_pybuffernd_ranks.diminfo[0].shape; if (unlikely(__pyx_t_18 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_18 >= __pyx_pybuffernd_ranks.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 183; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_ranks.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_ranks.diminfo[0].strides) = __pyx_v_6pandas_5algos_nan; /* "pandas/algos.pyx":184 * if (val == nan_value) and keep_na: * ranks[argsorted[i]] = nan * continue # <<<<<<<<<<<<<< * if i == n - 1 or fabs(sorted_data[i + 1] - val) > FP_ERR: * if tiebreak == TIEBREAK_AVERAGE: */ goto __pyx_L7_continue; } /* "pandas/algos.pyx":185 * ranks[argsorted[i]] = nan * continue * if i == n - 1 or fabs(sorted_data[i + 1] - val) > FP_ERR: # <<<<<<<<<<<<<< * if tiebreak == TIEBREAK_AVERAGE: * for j in range(i - dups + 1, i + 1): */ __pyx_t_13 = ((__pyx_v_i == (__pyx_v_n - 1)) != 0); if (!__pyx_t_13) { __pyx_t_19 = (__pyx_v_i + 1); __pyx_t_3 = -1; if (__pyx_t_19 < 0) { __pyx_t_19 += __pyx_pybuffernd_sorted_data.diminfo[0].shape; if (unlikely(__pyx_t_19 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_19 >= __pyx_pybuffernd_sorted_data.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 185; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_9 = ((fabs(((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_sorted_data.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_sorted_data.diminfo[0].strides)) - __pyx_v_val)) > __pyx_v_6pandas_5algos_FP_ERR) != 0); __pyx_t_20 = __pyx_t_9; } else { __pyx_t_20 = __pyx_t_13; } if (__pyx_t_20) { /* "pandas/algos.pyx":186 * continue * if i == n - 1 or fabs(sorted_data[i + 1] - val) > FP_ERR: * if tiebreak == TIEBREAK_AVERAGE: # <<<<<<<<<<<<<< * for j in range(i - dups + 1, i + 1): * ranks[argsorted[j]] = sum_ranks / dups */ __pyx_t_20 = ((__pyx_v_tiebreak == __pyx_v_6pandas_5algos_TIEBREAK_AVERAGE) != 0); if (__pyx_t_20) { /* "pandas/algos.pyx":187 * if i == n - 1 or fabs(sorted_data[i + 1] - val) > FP_ERR: * if tiebreak == TIEBREAK_AVERAGE: * for j in range(i - dups + 1, i + 1): # <<<<<<<<<<<<<< * ranks[argsorted[j]] = sum_ranks / dups * elif tiebreak == TIEBREAK_MIN: */ __pyx_t_21 = (__pyx_v_i + 1); for (__pyx_t_22 = ((__pyx_v_i - __pyx_v_dups) + 1); __pyx_t_22 < __pyx_t_21; __pyx_t_22+=1) { __pyx_v_j = __pyx_t_22; /* "pandas/algos.pyx":188 * if tiebreak == TIEBREAK_AVERAGE: * for j in range(i - dups + 1, i + 1): * ranks[argsorted[j]] = sum_ranks / dups # <<<<<<<<<<<<<< * elif tiebreak == TIEBREAK_MIN: * for j in range(i - dups + 1, i + 1): */ if (unlikely(__pyx_v_dups == 0)) { #ifdef WITH_THREAD PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure(); #endif PyErr_SetString(PyExc_ZeroDivisionError, "float division"); #ifdef WITH_THREAD PyGILState_Release(__pyx_gilstate_save); #endif {__pyx_filename = __pyx_f[0]; __pyx_lineno = 188; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_23 = __pyx_v_j; __pyx_t_3 = -1; if (__pyx_t_23 < 0) { __pyx_t_23 += __pyx_pybuffernd_argsorted.diminfo[0].shape; if (unlikely(__pyx_t_23 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_23 >= __pyx_pybuffernd_argsorted.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 188; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_24 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_argsorted.rcbuffer->pybuffer.buf, __pyx_t_23, __pyx_pybuffernd_argsorted.diminfo[0].strides)); __pyx_t_3 = -1; if (__pyx_t_24 < 0) { __pyx_t_24 += __pyx_pybuffernd_ranks.diminfo[0].shape; if (unlikely(__pyx_t_24 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_24 >= __pyx_pybuffernd_ranks.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 188; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_ranks.rcbuffer->pybuffer.buf, __pyx_t_24, __pyx_pybuffernd_ranks.diminfo[0].strides) = (__pyx_v_sum_ranks / __pyx_v_dups); } goto __pyx_L11; } /* "pandas/algos.pyx":189 * for j in range(i - dups + 1, i + 1): * ranks[argsorted[j]] = sum_ranks / dups * elif tiebreak == TIEBREAK_MIN: # <<<<<<<<<<<<<< * for j in range(i - dups + 1, i + 1): * ranks[argsorted[j]] = i - dups + 2 */ __pyx_t_20 = ((__pyx_v_tiebreak == __pyx_v_6pandas_5algos_TIEBREAK_MIN) != 0); if (__pyx_t_20) { /* "pandas/algos.pyx":190 * ranks[argsorted[j]] = sum_ranks / dups * elif tiebreak == TIEBREAK_MIN: * for j in range(i - dups + 1, i + 1): # <<<<<<<<<<<<<< * ranks[argsorted[j]] = i - dups + 2 * elif tiebreak == TIEBREAK_MAX: */ __pyx_t_21 = (__pyx_v_i + 1); for (__pyx_t_22 = ((__pyx_v_i - __pyx_v_dups) + 1); __pyx_t_22 < __pyx_t_21; __pyx_t_22+=1) { __pyx_v_j = __pyx_t_22; /* "pandas/algos.pyx":191 * elif tiebreak == TIEBREAK_MIN: * for j in range(i - dups + 1, i + 1): * ranks[argsorted[j]] = i - dups + 2 # <<<<<<<<<<<<<< * elif tiebreak == TIEBREAK_MAX: * for j in range(i - dups + 1, i + 1): */ __pyx_t_25 = __pyx_v_j; __pyx_t_3 = -1; if (__pyx_t_25 < 0) { __pyx_t_25 += __pyx_pybuffernd_argsorted.diminfo[0].shape; if (unlikely(__pyx_t_25 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_25 >= __pyx_pybuffernd_argsorted.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 191; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_26 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_argsorted.rcbuffer->pybuffer.buf, __pyx_t_25, __pyx_pybuffernd_argsorted.diminfo[0].strides)); __pyx_t_3 = -1; if (__pyx_t_26 < 0) { __pyx_t_26 += __pyx_pybuffernd_ranks.diminfo[0].shape; if (unlikely(__pyx_t_26 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_26 >= __pyx_pybuffernd_ranks.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 191; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_ranks.rcbuffer->pybuffer.buf, __pyx_t_26, __pyx_pybuffernd_ranks.diminfo[0].strides) = ((__pyx_v_i - __pyx_v_dups) + 2); } goto __pyx_L11; } /* "pandas/algos.pyx":192 * for j in range(i - dups + 1, i + 1): * ranks[argsorted[j]] = i - dups + 2 * elif tiebreak == TIEBREAK_MAX: # <<<<<<<<<<<<<< * for j in range(i - dups + 1, i + 1): * ranks[argsorted[j]] = i + 1 */ __pyx_t_20 = ((__pyx_v_tiebreak == __pyx_v_6pandas_5algos_TIEBREAK_MAX) != 0); if (__pyx_t_20) { /* "pandas/algos.pyx":193 * ranks[argsorted[j]] = i - dups + 2 * elif tiebreak == TIEBREAK_MAX: * for j in range(i - dups + 1, i + 1): # <<<<<<<<<<<<<< * ranks[argsorted[j]] = i + 1 * elif tiebreak == TIEBREAK_FIRST: */ __pyx_t_21 = (__pyx_v_i + 1); for (__pyx_t_22 = ((__pyx_v_i - __pyx_v_dups) + 1); __pyx_t_22 < __pyx_t_21; __pyx_t_22+=1) { __pyx_v_j = __pyx_t_22; /* "pandas/algos.pyx":194 * elif tiebreak == TIEBREAK_MAX: * for j in range(i - dups + 1, i + 1): * ranks[argsorted[j]] = i + 1 # <<<<<<<<<<<<<< * elif tiebreak == TIEBREAK_FIRST: * for j in range(i - dups + 1, i + 1): */ __pyx_t_27 = __pyx_v_j; __pyx_t_3 = -1; if (__pyx_t_27 < 0) { __pyx_t_27 += __pyx_pybuffernd_argsorted.diminfo[0].shape; if (unlikely(__pyx_t_27 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_27 >= __pyx_pybuffernd_argsorted.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 194; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_28 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_argsorted.rcbuffer->pybuffer.buf, __pyx_t_27, __pyx_pybuffernd_argsorted.diminfo[0].strides)); __pyx_t_3 = -1; if (__pyx_t_28 < 0) { __pyx_t_28 += __pyx_pybuffernd_ranks.diminfo[0].shape; if (unlikely(__pyx_t_28 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_28 >= __pyx_pybuffernd_ranks.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 194; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_ranks.rcbuffer->pybuffer.buf, __pyx_t_28, __pyx_pybuffernd_ranks.diminfo[0].strides) = (__pyx_v_i + 1); } goto __pyx_L11; } /* "pandas/algos.pyx":195 * for j in range(i - dups + 1, i + 1): * ranks[argsorted[j]] = i + 1 * elif tiebreak == TIEBREAK_FIRST: # <<<<<<<<<<<<<< * for j in range(i - dups + 1, i + 1): * ranks[argsorted[j]] = j + 1 */ __pyx_t_20 = ((__pyx_v_tiebreak == __pyx_v_6pandas_5algos_TIEBREAK_FIRST) != 0); if (__pyx_t_20) { /* "pandas/algos.pyx":196 * ranks[argsorted[j]] = i + 1 * elif tiebreak == TIEBREAK_FIRST: * for j in range(i - dups + 1, i + 1): # <<<<<<<<<<<<<< * ranks[argsorted[j]] = j + 1 * elif tiebreak == TIEBREAK_FIRST_DESCENDING: */ __pyx_t_21 = (__pyx_v_i + 1); for (__pyx_t_22 = ((__pyx_v_i - __pyx_v_dups) + 1); __pyx_t_22 < __pyx_t_21; __pyx_t_22+=1) { __pyx_v_j = __pyx_t_22; /* "pandas/algos.pyx":197 * elif tiebreak == TIEBREAK_FIRST: * for j in range(i - dups + 1, i + 1): * ranks[argsorted[j]] = j + 1 # <<<<<<<<<<<<<< * elif tiebreak == TIEBREAK_FIRST_DESCENDING: * for j in range(i - dups + 1, i + 1): */ __pyx_t_29 = __pyx_v_j; __pyx_t_3 = -1; if (__pyx_t_29 < 0) { __pyx_t_29 += __pyx_pybuffernd_argsorted.diminfo[0].shape; if (unlikely(__pyx_t_29 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_29 >= __pyx_pybuffernd_argsorted.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 197; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_30 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_argsorted.rcbuffer->pybuffer.buf, __pyx_t_29, __pyx_pybuffernd_argsorted.diminfo[0].strides)); __pyx_t_3 = -1; if (__pyx_t_30 < 0) { __pyx_t_30 += __pyx_pybuffernd_ranks.diminfo[0].shape; if (unlikely(__pyx_t_30 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_30 >= __pyx_pybuffernd_ranks.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 197; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_ranks.rcbuffer->pybuffer.buf, __pyx_t_30, __pyx_pybuffernd_ranks.diminfo[0].strides) = (__pyx_v_j + 1); } goto __pyx_L11; } /* "pandas/algos.pyx":198 * for j in range(i - dups + 1, i + 1): * ranks[argsorted[j]] = j + 1 * elif tiebreak == TIEBREAK_FIRST_DESCENDING: # <<<<<<<<<<<<<< * for j in range(i - dups + 1, i + 1): * ranks[argsorted[j]] = 2 * i - j - dups + 2 */ __pyx_t_20 = ((__pyx_v_tiebreak == __pyx_v_6pandas_5algos_TIEBREAK_FIRST_DESCENDING) != 0); if (__pyx_t_20) { /* "pandas/algos.pyx":199 * ranks[argsorted[j]] = j + 1 * elif tiebreak == TIEBREAK_FIRST_DESCENDING: * for j in range(i - dups + 1, i + 1): # <<<<<<<<<<<<<< * ranks[argsorted[j]] = 2 * i - j - dups + 2 * sum_ranks = dups = 0 */ __pyx_t_21 = (__pyx_v_i + 1); for (__pyx_t_22 = ((__pyx_v_i - __pyx_v_dups) + 1); __pyx_t_22 < __pyx_t_21; __pyx_t_22+=1) { __pyx_v_j = __pyx_t_22; /* "pandas/algos.pyx":200 * elif tiebreak == TIEBREAK_FIRST_DESCENDING: * for j in range(i - dups + 1, i + 1): * ranks[argsorted[j]] = 2 * i - j - dups + 2 # <<<<<<<<<<<<<< * sum_ranks = dups = 0 * return ranks */ __pyx_t_31 = __pyx_v_j; __pyx_t_3 = -1; if (__pyx_t_31 < 0) { __pyx_t_31 += __pyx_pybuffernd_argsorted.diminfo[0].shape; if (unlikely(__pyx_t_31 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_31 >= __pyx_pybuffernd_argsorted.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 200; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_32 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_argsorted.rcbuffer->pybuffer.buf, __pyx_t_31, __pyx_pybuffernd_argsorted.diminfo[0].strides)); __pyx_t_3 = -1; if (__pyx_t_32 < 0) { __pyx_t_32 += __pyx_pybuffernd_ranks.diminfo[0].shape; if (unlikely(__pyx_t_32 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_32 >= __pyx_pybuffernd_ranks.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 200; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_ranks.rcbuffer->pybuffer.buf, __pyx_t_32, __pyx_pybuffernd_ranks.diminfo[0].strides) = ((((2 * __pyx_v_i) - __pyx_v_j) - __pyx_v_dups) + 2); } goto __pyx_L11; } __pyx_L11:; /* "pandas/algos.pyx":201 * for j in range(i - dups + 1, i + 1): * ranks[argsorted[j]] = 2 * i - j - dups + 2 * sum_ranks = dups = 0 # <<<<<<<<<<<<<< * return ranks * */ __pyx_v_sum_ranks = 0; __pyx_v_dups = 0; goto __pyx_L10; } __pyx_L10:; __pyx_L7_continue:; } /* "pandas/algos.pyx":202 * ranks[argsorted[j]] = 2 * i - j - dups + 2 * sum_ranks = dups = 0 * return ranks # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_ranks)); __pyx_r = ((PyObject *)__pyx_v_ranks); goto __pyx_L0; /* "pandas/algos.pyx":133 * * * def rank_1d_float64(object in_arr, ties_method='average', ascending=True, # <<<<<<<<<<<<<< * na_option='keep'): * """ */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_12); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_argsorted.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_ranks.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_sorted_data.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.rank_1d_float64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_argsorted.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_ranks.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_sorted_data.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_sorted_data); __Pyx_XDECREF((PyObject *)__pyx_v_ranks); __Pyx_XDECREF((PyObject *)__pyx_v_values); __Pyx_XDECREF((PyObject *)__pyx_v_argsorted); __Pyx_XDECREF(__pyx_v_mask); __Pyx_XDECREF(__pyx_v__as); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/algos.pyx":205 * * * def rank_1d_int64(object in_arr, ties_method='average', ascending=True, # <<<<<<<<<<<<<< * na_option='keep'): * """ */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_3rank_1d_int64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6pandas_5algos_2rank_1d_int64[] = "\n Fast NaN-friendly version of scipy.stats.rankdata\n "; static PyMethodDef __pyx_mdef_6pandas_5algos_3rank_1d_int64 = {__Pyx_NAMESTR("rank_1d_int64"), (PyCFunction)__pyx_pw_6pandas_5algos_3rank_1d_int64, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_5algos_2rank_1d_int64)}; static PyObject *__pyx_pw_6pandas_5algos_3rank_1d_int64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_in_arr = 0; PyObject *__pyx_v_ties_method = 0; PyObject *__pyx_v_ascending = 0; CYTHON_UNUSED PyObject *__pyx_v_na_option = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("rank_1d_int64 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_in_arr,&__pyx_n_s_ties_method,&__pyx_n_s_ascending,&__pyx_n_s_na_option,0}; PyObject* values[4] = {0,0,0,0}; values[1] = ((PyObject *)__pyx_n_s_average); values[2] = ((PyObject *)Py_True); values[3] = ((PyObject *)__pyx_n_s_keep); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_in_arr)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ties_method); if (value) { values[1] = value; kw_args--; } } case 2: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ascending); if (value) { values[2] = value; kw_args--; } } case 3: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_na_option); if (value) { values[3] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "rank_1d_int64") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 205; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_in_arr = values[0]; __pyx_v_ties_method = values[1]; __pyx_v_ascending = values[2]; __pyx_v_na_option = values[3]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("rank_1d_int64", 0, 1, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 205; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.rank_1d_int64", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pandas_5algos_2rank_1d_int64(__pyx_self, __pyx_v_in_arr, __pyx_v_ties_method, __pyx_v_ascending, __pyx_v_na_option); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5algos_2rank_1d_int64(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_in_arr, PyObject *__pyx_v_ties_method, PyObject *__pyx_v_ascending, CYTHON_UNUSED PyObject *__pyx_v_na_option) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_n; Py_ssize_t __pyx_v_dups; PyArrayObject *__pyx_v_sorted_data = 0; PyArrayObject *__pyx_v_values = 0; PyArrayObject *__pyx_v_ranks = 0; PyArrayObject *__pyx_v_argsorted = 0; __pyx_t_5numpy_int64_t __pyx_v_val; __pyx_t_5numpy_float64_t __pyx_v_sum_ranks; int __pyx_v_tiebreak; PyObject *__pyx_v__as = NULL; __Pyx_LocalBuf_ND __pyx_pybuffernd_argsorted; __Pyx_Buffer __pyx_pybuffer_argsorted; __Pyx_LocalBuf_ND __pyx_pybuffernd_ranks; __Pyx_Buffer __pyx_pybuffer_ranks; __Pyx_LocalBuf_ND __pyx_pybuffernd_sorted_data; __Pyx_Buffer __pyx_pybuffer_sorted_data; __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; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; PyArrayObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; Py_ssize_t __pyx_t_9; PyObject *__pyx_t_10 = NULL; PyArrayObject *__pyx_t_11 = NULL; int __pyx_t_12; int __pyx_t_13; PyArrayObject *__pyx_t_14 = NULL; Py_ssize_t __pyx_t_15; Py_ssize_t __pyx_t_16; Py_ssize_t __pyx_t_17; int __pyx_t_18; Py_ssize_t __pyx_t_19; Py_ssize_t __pyx_t_20; Py_ssize_t __pyx_t_21; __pyx_t_5numpy_int64_t __pyx_t_22; Py_ssize_t __pyx_t_23; __pyx_t_5numpy_int64_t __pyx_t_24; Py_ssize_t __pyx_t_25; __pyx_t_5numpy_int64_t __pyx_t_26; Py_ssize_t __pyx_t_27; __pyx_t_5numpy_int64_t __pyx_t_28; Py_ssize_t __pyx_t_29; __pyx_t_5numpy_int64_t __pyx_t_30; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("rank_1d_int64", 0); __pyx_pybuffer_sorted_data.pybuffer.buf = NULL; __pyx_pybuffer_sorted_data.refcount = 0; __pyx_pybuffernd_sorted_data.data = NULL; __pyx_pybuffernd_sorted_data.rcbuffer = &__pyx_pybuffer_sorted_data; __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_ranks.pybuffer.buf = NULL; __pyx_pybuffer_ranks.refcount = 0; __pyx_pybuffernd_ranks.data = NULL; __pyx_pybuffernd_ranks.rcbuffer = &__pyx_pybuffer_ranks; __pyx_pybuffer_argsorted.pybuffer.buf = NULL; __pyx_pybuffer_argsorted.refcount = 0; __pyx_pybuffernd_argsorted.data = NULL; __pyx_pybuffernd_argsorted.rcbuffer = &__pyx_pybuffer_argsorted; /* "pandas/algos.pyx":212 * * cdef: * Py_ssize_t i, j, n, dups = 0 # <<<<<<<<<<<<<< * ndarray[int64_t] sorted_data, values * ndarray[float64_t] ranks */ __pyx_v_dups = 0; /* "pandas/algos.pyx":217 * ndarray[int64_t] argsorted * int64_t val * float64_t sum_ranks = 0 # <<<<<<<<<<<<<< * int tiebreak = 0 * tiebreak = tiebreakers[ties_method] */ __pyx_v_sum_ranks = 0.0; /* "pandas/algos.pyx":218 * int64_t val * float64_t sum_ranks = 0 * int tiebreak = 0 # <<<<<<<<<<<<<< * tiebreak = tiebreakers[ties_method] * */ __pyx_v_tiebreak = 0; /* "pandas/algos.pyx":219 * float64_t sum_ranks = 0 * int tiebreak = 0 * tiebreak = tiebreakers[ties_method] # <<<<<<<<<<<<<< * * values = np.asarray(in_arr) */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_tiebreakers); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 219; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyObject_GetItem(__pyx_t_1, __pyx_v_ties_method); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 219; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 219; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_tiebreak = __pyx_t_3; /* "pandas/algos.pyx":221 * tiebreak = tiebreakers[ties_method] * * values = np.asarray(in_arr) # <<<<<<<<<<<<<< * * n = len(values) */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 221; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_asarray); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 221; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 221; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_in_arr); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_in_arr); __Pyx_GIVEREF(__pyx_v_in_arr); __pyx_t_4 = PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 221; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 221; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_5 = ((PyArrayObject *)__pyx_t_4); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_t_3 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_values.rcbuffer->pybuffer, (PyObject*)__pyx_t_5, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_3 < 0)) { PyErr_Fetch(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_values.rcbuffer->pybuffer, (PyObject*)__pyx_v_values, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_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_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]; if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 221; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_5 = 0; __pyx_v_values = ((PyArrayObject *)__pyx_t_4); __pyx_t_4 = 0; /* "pandas/algos.pyx":223 * values = np.asarray(in_arr) * * n = len(values) # <<<<<<<<<<<<<< * ranks = np.empty(n, dtype='f8') * */ __pyx_t_9 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_9 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 223; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_9; /* "pandas/algos.pyx":224 * * n = len(values) * ranks = np.empty(n, dtype='f8') # <<<<<<<<<<<<<< * * # py2.5/win32 hack, can't pass i8 */ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 224; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_empty); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 224; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyInt_FromSsize_t(__pyx_v_n); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 224; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 224; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyDict_New(); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 224; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_dtype, __pyx_n_s_f8) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 224; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_10 = PyObject_Call(__pyx_t_2, __pyx_t_1, __pyx_t_4); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 224; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (!(likely(((__pyx_t_10) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_10, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 224; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_11 = ((PyArrayObject *)__pyx_t_10); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_ranks.rcbuffer->pybuffer); __pyx_t_3 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_ranks.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_3 < 0)) { PyErr_Fetch(&__pyx_t_8, &__pyx_t_7, &__pyx_t_6); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_ranks.rcbuffer->pybuffer, (PyObject*)__pyx_v_ranks, &__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_7); Py_XDECREF(__pyx_t_6); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_8, __pyx_t_7, __pyx_t_6); } } __pyx_pybuffernd_ranks.diminfo[0].strides = __pyx_pybuffernd_ranks.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_ranks.diminfo[0].shape = __pyx_pybuffernd_ranks.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 224; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_11 = 0; __pyx_v_ranks = ((PyArrayObject *)__pyx_t_10); __pyx_t_10 = 0; /* "pandas/algos.pyx":227 * * # py2.5/win32 hack, can't pass i8 * if tiebreak == TIEBREAK_FIRST: # <<<<<<<<<<<<<< * # need to use a stable sort here * _as = values.argsort(kind='mergesort') */ __pyx_t_12 = ((__pyx_v_tiebreak == __pyx_v_6pandas_5algos_TIEBREAK_FIRST) != 0); if (__pyx_t_12) { /* "pandas/algos.pyx":229 * if tiebreak == TIEBREAK_FIRST: * # need to use a stable sort here * _as = values.argsort(kind='mergesort') # <<<<<<<<<<<<<< * if not ascending: * tiebreak = TIEBREAK_FIRST_DESCENDING */ __pyx_t_10 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_values), __pyx_n_s_argsort); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 229; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __pyx_t_4 = PyDict_New(); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 229; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_kind, __pyx_n_s_mergesort) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 229; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_1 = PyObject_Call(__pyx_t_10, __pyx_empty_tuple, __pyx_t_4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 229; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v__as = __pyx_t_1; __pyx_t_1 = 0; /* "pandas/algos.pyx":230 * # need to use a stable sort here * _as = values.argsort(kind='mergesort') * if not ascending: # <<<<<<<<<<<<<< * tiebreak = TIEBREAK_FIRST_DESCENDING * else: */ __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_v_ascending); if (unlikely(__pyx_t_12 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 230; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_13 = ((!__pyx_t_12) != 0); if (__pyx_t_13) { /* "pandas/algos.pyx":231 * _as = values.argsort(kind='mergesort') * if not ascending: * tiebreak = TIEBREAK_FIRST_DESCENDING # <<<<<<<<<<<<<< * else: * _as = values.argsort() */ __pyx_v_tiebreak = __pyx_v_6pandas_5algos_TIEBREAK_FIRST_DESCENDING; goto __pyx_L4; } __pyx_L4:; goto __pyx_L3; } /*else*/ { /* "pandas/algos.pyx":233 * tiebreak = TIEBREAK_FIRST_DESCENDING * else: * _as = values.argsort() # <<<<<<<<<<<<<< * * if not ascending: */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_values), __pyx_n_s_argsort); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 233; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = PyObject_Call(__pyx_t_1, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 233; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v__as = __pyx_t_4; __pyx_t_4 = 0; } __pyx_L3:; /* "pandas/algos.pyx":235 * _as = values.argsort() * * if not ascending: # <<<<<<<<<<<<<< * _as = _as[::-1] * */ __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_v_ascending); if (unlikely(__pyx_t_13 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 235; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_12 = ((!__pyx_t_13) != 0); if (__pyx_t_12) { /* "pandas/algos.pyx":236 * * if not ascending: * _as = _as[::-1] # <<<<<<<<<<<<<< * * sorted_data = values.take(_as) */ __pyx_t_4 = PyObject_GetItem(__pyx_v__as, __pyx_slice__4); if (unlikely(__pyx_t_4 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 236; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF_SET(__pyx_v__as, __pyx_t_4); __pyx_t_4 = 0; goto __pyx_L5; } __pyx_L5:; /* "pandas/algos.pyx":238 * _as = _as[::-1] * * sorted_data = values.take(_as) # <<<<<<<<<<<<<< * argsorted = _as.astype('i8') * */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_values), __pyx_n_s_take); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 238; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 238; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v__as); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v__as); __Pyx_GIVEREF(__pyx_v__as); __pyx_t_10 = PyObject_Call(__pyx_t_4, __pyx_t_1, NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 238; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (!(likely(((__pyx_t_10) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_10, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 238; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_5 = ((PyArrayObject *)__pyx_t_10); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_sorted_data.rcbuffer->pybuffer); __pyx_t_3 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_sorted_data.rcbuffer->pybuffer, (PyObject*)__pyx_t_5, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_3 < 0)) { PyErr_Fetch(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_sorted_data.rcbuffer->pybuffer, (PyObject*)__pyx_v_sorted_data, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_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_pybuffernd_sorted_data.diminfo[0].strides = __pyx_pybuffernd_sorted_data.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_sorted_data.diminfo[0].shape = __pyx_pybuffernd_sorted_data.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 238; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_5 = 0; __pyx_v_sorted_data = ((PyArrayObject *)__pyx_t_10); __pyx_t_10 = 0; /* "pandas/algos.pyx":239 * * sorted_data = values.take(_as) * argsorted = _as.astype('i8') # <<<<<<<<<<<<<< * * for i in range(n): */ __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v__as, __pyx_n_s_astype); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 239; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __pyx_t_1 = PyObject_Call(__pyx_t_10, __pyx_tuple__5, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 239; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 239; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_14 = ((PyArrayObject *)__pyx_t_1); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_argsorted.rcbuffer->pybuffer); __pyx_t_3 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_argsorted.rcbuffer->pybuffer, (PyObject*)__pyx_t_14, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_3 < 0)) { PyErr_Fetch(&__pyx_t_8, &__pyx_t_7, &__pyx_t_6); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_argsorted.rcbuffer->pybuffer, (PyObject*)__pyx_v_argsorted, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_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_pybuffernd_argsorted.diminfo[0].strides = __pyx_pybuffernd_argsorted.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_argsorted.diminfo[0].shape = __pyx_pybuffernd_argsorted.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 239; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_14 = 0; __pyx_v_argsorted = ((PyArrayObject *)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/algos.pyx":241 * argsorted = _as.astype('i8') * * for i in range(n): # <<<<<<<<<<<<<< * sum_ranks += i + 1 * dups += 1 */ __pyx_t_9 = __pyx_v_n; for (__pyx_t_15 = 0; __pyx_t_15 < __pyx_t_9; __pyx_t_15+=1) { __pyx_v_i = __pyx_t_15; /* "pandas/algos.pyx":242 * * for i in range(n): * sum_ranks += i + 1 # <<<<<<<<<<<<<< * dups += 1 * val = sorted_data[i] */ __pyx_v_sum_ranks = (__pyx_v_sum_ranks + (__pyx_v_i + 1)); /* "pandas/algos.pyx":243 * for i in range(n): * sum_ranks += i + 1 * dups += 1 # <<<<<<<<<<<<<< * val = sorted_data[i] * if i == n - 1 or fabs(sorted_data[i + 1] - val) > 0: */ __pyx_v_dups = (__pyx_v_dups + 1); /* "pandas/algos.pyx":244 * sum_ranks += i + 1 * dups += 1 * val = sorted_data[i] # <<<<<<<<<<<<<< * if i == n - 1 or fabs(sorted_data[i + 1] - val) > 0: * if tiebreak == TIEBREAK_AVERAGE: */ __pyx_t_16 = __pyx_v_i; __pyx_t_3 = -1; if (__pyx_t_16 < 0) { __pyx_t_16 += __pyx_pybuffernd_sorted_data.diminfo[0].shape; if (unlikely(__pyx_t_16 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_16 >= __pyx_pybuffernd_sorted_data.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 244; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_val = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_sorted_data.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_sorted_data.diminfo[0].strides)); /* "pandas/algos.pyx":245 * dups += 1 * val = sorted_data[i] * if i == n - 1 or fabs(sorted_data[i + 1] - val) > 0: # <<<<<<<<<<<<<< * if tiebreak == TIEBREAK_AVERAGE: * for j in range(i - dups + 1, i + 1): */ __pyx_t_12 = ((__pyx_v_i == (__pyx_v_n - 1)) != 0); if (!__pyx_t_12) { __pyx_t_17 = (__pyx_v_i + 1); __pyx_t_3 = -1; if (__pyx_t_17 < 0) { __pyx_t_17 += __pyx_pybuffernd_sorted_data.diminfo[0].shape; if (unlikely(__pyx_t_17 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_17 >= __pyx_pybuffernd_sorted_data.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 245; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_13 = ((fabs(((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_sorted_data.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_sorted_data.diminfo[0].strides)) - __pyx_v_val)) > 0.0) != 0); __pyx_t_18 = __pyx_t_13; } else { __pyx_t_18 = __pyx_t_12; } if (__pyx_t_18) { /* "pandas/algos.pyx":246 * val = sorted_data[i] * if i == n - 1 or fabs(sorted_data[i + 1] - val) > 0: * if tiebreak == TIEBREAK_AVERAGE: # <<<<<<<<<<<<<< * for j in range(i - dups + 1, i + 1): * ranks[argsorted[j]] = sum_ranks / dups */ __pyx_t_18 = ((__pyx_v_tiebreak == __pyx_v_6pandas_5algos_TIEBREAK_AVERAGE) != 0); if (__pyx_t_18) { /* "pandas/algos.pyx":247 * if i == n - 1 or fabs(sorted_data[i + 1] - val) > 0: * if tiebreak == TIEBREAK_AVERAGE: * for j in range(i - dups + 1, i + 1): # <<<<<<<<<<<<<< * ranks[argsorted[j]] = sum_ranks / dups * elif tiebreak == TIEBREAK_MIN: */ __pyx_t_19 = (__pyx_v_i + 1); for (__pyx_t_20 = ((__pyx_v_i - __pyx_v_dups) + 1); __pyx_t_20 < __pyx_t_19; __pyx_t_20+=1) { __pyx_v_j = __pyx_t_20; /* "pandas/algos.pyx":248 * if tiebreak == TIEBREAK_AVERAGE: * for j in range(i - dups + 1, i + 1): * ranks[argsorted[j]] = sum_ranks / dups # <<<<<<<<<<<<<< * elif tiebreak == TIEBREAK_MIN: * for j in range(i - dups + 1, i + 1): */ if (unlikely(__pyx_v_dups == 0)) { #ifdef WITH_THREAD PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure(); #endif PyErr_SetString(PyExc_ZeroDivisionError, "float division"); #ifdef WITH_THREAD PyGILState_Release(__pyx_gilstate_save); #endif {__pyx_filename = __pyx_f[0]; __pyx_lineno = 248; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_21 = __pyx_v_j; __pyx_t_3 = -1; if (__pyx_t_21 < 0) { __pyx_t_21 += __pyx_pybuffernd_argsorted.diminfo[0].shape; if (unlikely(__pyx_t_21 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_21 >= __pyx_pybuffernd_argsorted.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 248; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_22 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_argsorted.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_argsorted.diminfo[0].strides)); __pyx_t_3 = -1; if (__pyx_t_22 < 0) { __pyx_t_22 += __pyx_pybuffernd_ranks.diminfo[0].shape; if (unlikely(__pyx_t_22 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_22 >= __pyx_pybuffernd_ranks.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 248; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_ranks.rcbuffer->pybuffer.buf, __pyx_t_22, __pyx_pybuffernd_ranks.diminfo[0].strides) = (__pyx_v_sum_ranks / __pyx_v_dups); } goto __pyx_L9; } /* "pandas/algos.pyx":249 * for j in range(i - dups + 1, i + 1): * ranks[argsorted[j]] = sum_ranks / dups * elif tiebreak == TIEBREAK_MIN: # <<<<<<<<<<<<<< * for j in range(i - dups + 1, i + 1): * ranks[argsorted[j]] = i - dups + 2 */ __pyx_t_18 = ((__pyx_v_tiebreak == __pyx_v_6pandas_5algos_TIEBREAK_MIN) != 0); if (__pyx_t_18) { /* "pandas/algos.pyx":250 * ranks[argsorted[j]] = sum_ranks / dups * elif tiebreak == TIEBREAK_MIN: * for j in range(i - dups + 1, i + 1): # <<<<<<<<<<<<<< * ranks[argsorted[j]] = i - dups + 2 * elif tiebreak == TIEBREAK_MAX: */ __pyx_t_19 = (__pyx_v_i + 1); for (__pyx_t_20 = ((__pyx_v_i - __pyx_v_dups) + 1); __pyx_t_20 < __pyx_t_19; __pyx_t_20+=1) { __pyx_v_j = __pyx_t_20; /* "pandas/algos.pyx":251 * elif tiebreak == TIEBREAK_MIN: * for j in range(i - dups + 1, i + 1): * ranks[argsorted[j]] = i - dups + 2 # <<<<<<<<<<<<<< * elif tiebreak == TIEBREAK_MAX: * for j in range(i - dups + 1, i + 1): */ __pyx_t_23 = __pyx_v_j; __pyx_t_3 = -1; if (__pyx_t_23 < 0) { __pyx_t_23 += __pyx_pybuffernd_argsorted.diminfo[0].shape; if (unlikely(__pyx_t_23 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_23 >= __pyx_pybuffernd_argsorted.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 251; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_24 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_argsorted.rcbuffer->pybuffer.buf, __pyx_t_23, __pyx_pybuffernd_argsorted.diminfo[0].strides)); __pyx_t_3 = -1; if (__pyx_t_24 < 0) { __pyx_t_24 += __pyx_pybuffernd_ranks.diminfo[0].shape; if (unlikely(__pyx_t_24 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_24 >= __pyx_pybuffernd_ranks.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 251; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_ranks.rcbuffer->pybuffer.buf, __pyx_t_24, __pyx_pybuffernd_ranks.diminfo[0].strides) = ((__pyx_v_i - __pyx_v_dups) + 2); } goto __pyx_L9; } /* "pandas/algos.pyx":252 * for j in range(i - dups + 1, i + 1): * ranks[argsorted[j]] = i - dups + 2 * elif tiebreak == TIEBREAK_MAX: # <<<<<<<<<<<<<< * for j in range(i - dups + 1, i + 1): * ranks[argsorted[j]] = i + 1 */ __pyx_t_18 = ((__pyx_v_tiebreak == __pyx_v_6pandas_5algos_TIEBREAK_MAX) != 0); if (__pyx_t_18) { /* "pandas/algos.pyx":253 * ranks[argsorted[j]] = i - dups + 2 * elif tiebreak == TIEBREAK_MAX: * for j in range(i - dups + 1, i + 1): # <<<<<<<<<<<<<< * ranks[argsorted[j]] = i + 1 * elif tiebreak == TIEBREAK_FIRST: */ __pyx_t_19 = (__pyx_v_i + 1); for (__pyx_t_20 = ((__pyx_v_i - __pyx_v_dups) + 1); __pyx_t_20 < __pyx_t_19; __pyx_t_20+=1) { __pyx_v_j = __pyx_t_20; /* "pandas/algos.pyx":254 * elif tiebreak == TIEBREAK_MAX: * for j in range(i - dups + 1, i + 1): * ranks[argsorted[j]] = i + 1 # <<<<<<<<<<<<<< * elif tiebreak == TIEBREAK_FIRST: * for j in range(i - dups + 1, i + 1): */ __pyx_t_25 = __pyx_v_j; __pyx_t_3 = -1; if (__pyx_t_25 < 0) { __pyx_t_25 += __pyx_pybuffernd_argsorted.diminfo[0].shape; if (unlikely(__pyx_t_25 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_25 >= __pyx_pybuffernd_argsorted.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 254; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_26 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_argsorted.rcbuffer->pybuffer.buf, __pyx_t_25, __pyx_pybuffernd_argsorted.diminfo[0].strides)); __pyx_t_3 = -1; if (__pyx_t_26 < 0) { __pyx_t_26 += __pyx_pybuffernd_ranks.diminfo[0].shape; if (unlikely(__pyx_t_26 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_26 >= __pyx_pybuffernd_ranks.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 254; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_ranks.rcbuffer->pybuffer.buf, __pyx_t_26, __pyx_pybuffernd_ranks.diminfo[0].strides) = (__pyx_v_i + 1); } goto __pyx_L9; } /* "pandas/algos.pyx":255 * for j in range(i - dups + 1, i + 1): * ranks[argsorted[j]] = i + 1 * elif tiebreak == TIEBREAK_FIRST: # <<<<<<<<<<<<<< * for j in range(i - dups + 1, i + 1): * ranks[argsorted[j]] = j + 1 */ __pyx_t_18 = ((__pyx_v_tiebreak == __pyx_v_6pandas_5algos_TIEBREAK_FIRST) != 0); if (__pyx_t_18) { /* "pandas/algos.pyx":256 * ranks[argsorted[j]] = i + 1 * elif tiebreak == TIEBREAK_FIRST: * for j in range(i - dups + 1, i + 1): # <<<<<<<<<<<<<< * ranks[argsorted[j]] = j + 1 * elif tiebreak == TIEBREAK_FIRST_DESCENDING: */ __pyx_t_19 = (__pyx_v_i + 1); for (__pyx_t_20 = ((__pyx_v_i - __pyx_v_dups) + 1); __pyx_t_20 < __pyx_t_19; __pyx_t_20+=1) { __pyx_v_j = __pyx_t_20; /* "pandas/algos.pyx":257 * elif tiebreak == TIEBREAK_FIRST: * for j in range(i - dups + 1, i + 1): * ranks[argsorted[j]] = j + 1 # <<<<<<<<<<<<<< * elif tiebreak == TIEBREAK_FIRST_DESCENDING: * for j in range(i - dups + 1, i + 1): */ __pyx_t_27 = __pyx_v_j; __pyx_t_3 = -1; if (__pyx_t_27 < 0) { __pyx_t_27 += __pyx_pybuffernd_argsorted.diminfo[0].shape; if (unlikely(__pyx_t_27 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_27 >= __pyx_pybuffernd_argsorted.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 257; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_28 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_argsorted.rcbuffer->pybuffer.buf, __pyx_t_27, __pyx_pybuffernd_argsorted.diminfo[0].strides)); __pyx_t_3 = -1; if (__pyx_t_28 < 0) { __pyx_t_28 += __pyx_pybuffernd_ranks.diminfo[0].shape; if (unlikely(__pyx_t_28 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_28 >= __pyx_pybuffernd_ranks.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 257; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_ranks.rcbuffer->pybuffer.buf, __pyx_t_28, __pyx_pybuffernd_ranks.diminfo[0].strides) = (__pyx_v_j + 1); } goto __pyx_L9; } /* "pandas/algos.pyx":258 * for j in range(i - dups + 1, i + 1): * ranks[argsorted[j]] = j + 1 * elif tiebreak == TIEBREAK_FIRST_DESCENDING: # <<<<<<<<<<<<<< * for j in range(i - dups + 1, i + 1): * ranks[argsorted[j]] = 2 * i - j - dups + 2 */ __pyx_t_18 = ((__pyx_v_tiebreak == __pyx_v_6pandas_5algos_TIEBREAK_FIRST_DESCENDING) != 0); if (__pyx_t_18) { /* "pandas/algos.pyx":259 * ranks[argsorted[j]] = j + 1 * elif tiebreak == TIEBREAK_FIRST_DESCENDING: * for j in range(i - dups + 1, i + 1): # <<<<<<<<<<<<<< * ranks[argsorted[j]] = 2 * i - j - dups + 2 * sum_ranks = dups = 0 */ __pyx_t_19 = (__pyx_v_i + 1); for (__pyx_t_20 = ((__pyx_v_i - __pyx_v_dups) + 1); __pyx_t_20 < __pyx_t_19; __pyx_t_20+=1) { __pyx_v_j = __pyx_t_20; /* "pandas/algos.pyx":260 * elif tiebreak == TIEBREAK_FIRST_DESCENDING: * for j in range(i - dups + 1, i + 1): * ranks[argsorted[j]] = 2 * i - j - dups + 2 # <<<<<<<<<<<<<< * sum_ranks = dups = 0 * return ranks */ __pyx_t_29 = __pyx_v_j; __pyx_t_3 = -1; if (__pyx_t_29 < 0) { __pyx_t_29 += __pyx_pybuffernd_argsorted.diminfo[0].shape; if (unlikely(__pyx_t_29 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_29 >= __pyx_pybuffernd_argsorted.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 260; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_30 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_argsorted.rcbuffer->pybuffer.buf, __pyx_t_29, __pyx_pybuffernd_argsorted.diminfo[0].strides)); __pyx_t_3 = -1; if (__pyx_t_30 < 0) { __pyx_t_30 += __pyx_pybuffernd_ranks.diminfo[0].shape; if (unlikely(__pyx_t_30 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_30 >= __pyx_pybuffernd_ranks.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 260; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_ranks.rcbuffer->pybuffer.buf, __pyx_t_30, __pyx_pybuffernd_ranks.diminfo[0].strides) = ((((2 * __pyx_v_i) - __pyx_v_j) - __pyx_v_dups) + 2); } goto __pyx_L9; } __pyx_L9:; /* "pandas/algos.pyx":261 * for j in range(i - dups + 1, i + 1): * ranks[argsorted[j]] = 2 * i - j - dups + 2 * sum_ranks = dups = 0 # <<<<<<<<<<<<<< * return ranks * */ __pyx_v_sum_ranks = 0; __pyx_v_dups = 0; goto __pyx_L8; } __pyx_L8:; } /* "pandas/algos.pyx":262 * ranks[argsorted[j]] = 2 * i - j - dups + 2 * sum_ranks = dups = 0 * return ranks # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_ranks)); __pyx_r = ((PyObject *)__pyx_v_ranks); goto __pyx_L0; /* "pandas/algos.pyx":205 * * * def rank_1d_int64(object in_arr, ties_method='average', ascending=True, # <<<<<<<<<<<<<< * na_option='keep'): * """ */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_10); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_argsorted.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_ranks.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_sorted_data.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.rank_1d_int64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_argsorted.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_ranks.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_sorted_data.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_sorted_data); __Pyx_XDECREF((PyObject *)__pyx_v_values); __Pyx_XDECREF((PyObject *)__pyx_v_ranks); __Pyx_XDECREF((PyObject *)__pyx_v_argsorted); __Pyx_XDECREF(__pyx_v__as); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/algos.pyx":265 * * * def rank_2d_float64(object in_arr, axis=0, ties_method='average', # <<<<<<<<<<<<<< * ascending=True, na_option='keep'): * """ */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_5rank_2d_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6pandas_5algos_4rank_2d_float64[] = "\n Fast NaN-friendly version of scipy.stats.rankdata\n "; static PyMethodDef __pyx_mdef_6pandas_5algos_5rank_2d_float64 = {__Pyx_NAMESTR("rank_2d_float64"), (PyCFunction)__pyx_pw_6pandas_5algos_5rank_2d_float64, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_5algos_4rank_2d_float64)}; static PyObject *__pyx_pw_6pandas_5algos_5rank_2d_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_in_arr = 0; PyObject *__pyx_v_axis = 0; PyObject *__pyx_v_ties_method = 0; PyObject *__pyx_v_ascending = 0; PyObject *__pyx_v_na_option = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("rank_2d_float64 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_in_arr,&__pyx_n_s_axis,&__pyx_n_s_ties_method,&__pyx_n_s_ascending,&__pyx_n_s_na_option,0}; PyObject* values[5] = {0,0,0,0,0}; values[1] = ((PyObject *)__pyx_int_0); values[2] = ((PyObject *)__pyx_n_s_average); /* "pandas/algos.pyx":266 * * def rank_2d_float64(object in_arr, axis=0, ties_method='average', * ascending=True, na_option='keep'): # <<<<<<<<<<<<<< * """ * Fast NaN-friendly version of scipy.stats.rankdata */ values[3] = ((PyObject *)Py_True); values[4] = ((PyObject *)__pyx_n_s_keep); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_in_arr)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_axis); if (value) { values[1] = value; kw_args--; } } case 2: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ties_method); if (value) { values[2] = value; kw_args--; } } case 3: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ascending); if (value) { values[3] = value; kw_args--; } } case 4: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_na_option); if (value) { values[4] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "rank_2d_float64") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 265; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_in_arr = values[0]; __pyx_v_axis = values[1]; __pyx_v_ties_method = values[2]; __pyx_v_ascending = values[3]; __pyx_v_na_option = values[4]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("rank_2d_float64", 0, 1, 5, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 265; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.rank_2d_float64", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pandas_5algos_4rank_2d_float64(__pyx_self, __pyx_v_in_arr, __pyx_v_axis, __pyx_v_ties_method, __pyx_v_ascending, __pyx_v_na_option); /* "pandas/algos.pyx":265 * * * def rank_2d_float64(object in_arr, axis=0, ties_method='average', # <<<<<<<<<<<<<< * ascending=True, na_option='keep'): * """ */ /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5algos_4rank_2d_float64(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_in_arr, PyObject *__pyx_v_axis, PyObject *__pyx_v_ties_method, PyObject *__pyx_v_ascending, PyObject *__pyx_v_na_option) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_z; Py_ssize_t __pyx_v_k; Py_ssize_t __pyx_v_n; Py_ssize_t __pyx_v_dups; PyArrayObject *__pyx_v_ranks = 0; PyArrayObject *__pyx_v_values = 0; PyArrayObject *__pyx_v_argsorted = 0; __pyx_t_5numpy_float64_t __pyx_v_val; __pyx_t_5numpy_float64_t __pyx_v_nan_value; __pyx_t_5numpy_float64_t __pyx_v_sum_ranks; int __pyx_v_tiebreak; int __pyx_v_keep_na; PyObject *__pyx_v__as = NULL; __Pyx_LocalBuf_ND __pyx_pybuffernd_argsorted; __Pyx_Buffer __pyx_pybuffer_argsorted; __Pyx_LocalBuf_ND __pyx_pybuffernd_ranks; __Pyx_Buffer __pyx_pybuffer_ranks; __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; int __pyx_t_3; int __pyx_t_4; PyObject *__pyx_t_5 = NULL; PyArrayObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; __pyx_t_5numpy_float64_t __pyx_t_10; PyObject *__pyx_t_11 = NULL; PyObject *(*__pyx_t_12)(PyObject *); Py_ssize_t __pyx_t_13; Py_ssize_t __pyx_t_14; int __pyx_t_15; PyArrayObject *__pyx_t_16 = NULL; 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_t_5numpy_int64_t __pyx_t_24; Py_ssize_t __pyx_t_25; Py_ssize_t __pyx_t_26; int __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; __pyx_t_5numpy_int64_t __pyx_t_33; Py_ssize_t __pyx_t_34; Py_ssize_t __pyx_t_35; Py_ssize_t __pyx_t_36; __pyx_t_5numpy_int64_t __pyx_t_37; Py_ssize_t __pyx_t_38; Py_ssize_t __pyx_t_39; Py_ssize_t __pyx_t_40; __pyx_t_5numpy_int64_t __pyx_t_41; Py_ssize_t __pyx_t_42; Py_ssize_t __pyx_t_43; Py_ssize_t __pyx_t_44; __pyx_t_5numpy_int64_t __pyx_t_45; Py_ssize_t __pyx_t_46; Py_ssize_t __pyx_t_47; Py_ssize_t __pyx_t_48; __pyx_t_5numpy_int64_t __pyx_t_49; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("rank_2d_float64", 0); __Pyx_INCREF(__pyx_v_in_arr); __pyx_pybuffer_ranks.pybuffer.buf = NULL; __pyx_pybuffer_ranks.refcount = 0; __pyx_pybuffernd_ranks.data = NULL; __pyx_pybuffernd_ranks.rcbuffer = &__pyx_pybuffer_ranks; __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_argsorted.pybuffer.buf = NULL; __pyx_pybuffer_argsorted.refcount = 0; __pyx_pybuffernd_argsorted.data = NULL; __pyx_pybuffernd_argsorted.rcbuffer = &__pyx_pybuffer_argsorted; /* "pandas/algos.pyx":272 * * cdef: * Py_ssize_t i, j, z, k, n, dups = 0 # <<<<<<<<<<<<<< * ndarray[float64_t, ndim=2] ranks, values * ndarray[int64_t, ndim=2] argsorted */ __pyx_v_dups = 0; /* "pandas/algos.pyx":276 * ndarray[int64_t, ndim=2] argsorted * float64_t val, nan_value * float64_t sum_ranks = 0 # <<<<<<<<<<<<<< * int tiebreak = 0 * bint keep_na = 0 */ __pyx_v_sum_ranks = 0.0; /* "pandas/algos.pyx":277 * float64_t val, nan_value * float64_t sum_ranks = 0 * int tiebreak = 0 # <<<<<<<<<<<<<< * bint keep_na = 0 * */ __pyx_v_tiebreak = 0; /* "pandas/algos.pyx":278 * float64_t sum_ranks = 0 * int tiebreak = 0 * bint keep_na = 0 # <<<<<<<<<<<<<< * * tiebreak = tiebreakers[ties_method] */ __pyx_v_keep_na = 0; /* "pandas/algos.pyx":280 * bint keep_na = 0 * * tiebreak = tiebreakers[ties_method] # <<<<<<<<<<<<<< * * keep_na = na_option == 'keep' */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_tiebreakers); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 280; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyObject_GetItem(__pyx_t_1, __pyx_v_ties_method); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 280; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 280; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_tiebreak = __pyx_t_3; /* "pandas/algos.pyx":282 * tiebreak = tiebreakers[ties_method] * * keep_na = na_option == 'keep' # <<<<<<<<<<<<<< * * in_arr = np.asarray(in_arr) */ __pyx_t_2 = PyObject_RichCompare(__pyx_v_na_option, __pyx_n_s_keep, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 282; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 282; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_keep_na = __pyx_t_4; /* "pandas/algos.pyx":284 * keep_na = na_option == 'keep' * * in_arr = np.asarray(in_arr) # <<<<<<<<<<<<<< * * if axis == 0: */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 284; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_asarray); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 284; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 284; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_in_arr); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_in_arr); __Pyx_GIVEREF(__pyx_v_in_arr); __pyx_t_5 = PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 284; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF_SET(__pyx_v_in_arr, __pyx_t_5); __pyx_t_5 = 0; /* "pandas/algos.pyx":286 * in_arr = np.asarray(in_arr) * * if axis == 0: # <<<<<<<<<<<<<< * values = in_arr.T.copy() * else: */ __pyx_t_5 = PyObject_RichCompare(__pyx_v_axis, __pyx_int_0, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 286; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 286; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_4) { /* "pandas/algos.pyx":287 * * if axis == 0: * values = in_arr.T.copy() # <<<<<<<<<<<<<< * else: * values = in_arr.copy() */ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_in_arr, __pyx_n_s_T); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 287; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_copy); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 287; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyObject_Call(__pyx_t_2, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 287; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 287; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_6 = ((PyArrayObject *)__pyx_t_5); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_t_3 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_values.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack); if (unlikely(__pyx_t_3 < 0)) { PyErr_Fetch(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9); 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, 2, 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_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_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1]; if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 287; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_6 = 0; __pyx_v_values = ((PyArrayObject *)__pyx_t_5); __pyx_t_5 = 0; goto __pyx_L3; } /*else*/ { /* "pandas/algos.pyx":289 * values = in_arr.T.copy() * else: * values = in_arr.copy() # <<<<<<<<<<<<<< * * if ascending ^ (na_option == 'top'): */ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_in_arr, __pyx_n_s_copy); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 289; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_2 = PyObject_Call(__pyx_t_5, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 289; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 289; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_6 = ((PyArrayObject *)__pyx_t_2); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_t_3 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_values.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack); if (unlikely(__pyx_t_3 < 0)) { PyErr_Fetch(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7); 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, 2, 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_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_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1]; if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 289; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_6 = 0; __pyx_v_values = ((PyArrayObject *)__pyx_t_2); __pyx_t_2 = 0; } __pyx_L3:; /* "pandas/algos.pyx":291 * values = in_arr.copy() * * if ascending ^ (na_option == 'top'): # <<<<<<<<<<<<<< * nan_value = np.inf * else: */ __pyx_t_2 = PyObject_RichCompare(__pyx_v_na_option, __pyx_n_s_top, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 291; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_5 = PyNumber_Xor(__pyx_v_ascending, __pyx_t_2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 291; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 291; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_4) { /* "pandas/algos.pyx":292 * * if ascending ^ (na_option == 'top'): * nan_value = np.inf # <<<<<<<<<<<<<< * else: * nan_value = -np.inf */ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 292; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_inf); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 292; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_10 = __pyx_PyFloat_AsDouble(__pyx_t_2); if (unlikely((__pyx_t_10 == (npy_float64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 292; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_nan_value = __pyx_t_10; goto __pyx_L4; } /*else*/ { /* "pandas/algos.pyx":294 * nan_value = np.inf * else: * nan_value = -np.inf # <<<<<<<<<<<<<< * * np.putmask(values, np.isnan(values), nan_value) */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 294; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_inf); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 294; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyNumber_Negative(__pyx_t_5); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 294; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_10 = __pyx_PyFloat_AsDouble(__pyx_t_2); if (unlikely((__pyx_t_10 == (npy_float64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 294; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_nan_value = __pyx_t_10; } __pyx_L4:; /* "pandas/algos.pyx":296 * nan_value = -np.inf * * np.putmask(values, np.isnan(values), nan_value) # <<<<<<<<<<<<<< * * n, k = ( values).shape */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 296; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_putmask); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 296; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 296; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_isnan); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 296; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 296; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(((PyObject *)__pyx_v_values)); PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_values)); __Pyx_GIVEREF(((PyObject *)__pyx_v_values)); __pyx_t_11 = PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 296; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyFloat_FromDouble(__pyx_v_nan_value); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 296; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 296; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)__pyx_v_values)); PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_values)); __Pyx_GIVEREF(((PyObject *)__pyx_v_values)); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_11); __Pyx_GIVEREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_11 = 0; __pyx_t_2 = 0; __pyx_t_2 = PyObject_Call(__pyx_t_5, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 296; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/algos.pyx":298 * np.putmask(values, np.isnan(values), nan_value) * * n, k = ( values).shape # <<<<<<<<<<<<<< * ranks = np.empty((n, k), dtype='f8') * */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_values), __pyx_n_s_shape); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 298; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if ((likely(PyTuple_CheckExact(__pyx_t_2))) || (PyList_CheckExact(__pyx_t_2))) { PyObject* sequence = __pyx_t_2; #if CYTHON_COMPILING_IN_CPYTHON Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 298; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_1 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_5 = PyTuple_GET_ITEM(sequence, 1); } else { __pyx_t_1 = PyList_GET_ITEM(sequence, 0); __pyx_t_5 = PyList_GET_ITEM(sequence, 1); } __Pyx_INCREF(__pyx_t_1); __Pyx_INCREF(__pyx_t_5); #else __pyx_t_1 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 298; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_5 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 298; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); #endif __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } else { Py_ssize_t index = -1; __pyx_t_11 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 298; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_12 = Py_TYPE(__pyx_t_11)->tp_iternext; index = 0; __pyx_t_1 = __pyx_t_12(__pyx_t_11); if (unlikely(!__pyx_t_1)) goto __pyx_L5_unpacking_failed; __Pyx_GOTREF(__pyx_t_1); index = 1; __pyx_t_5 = __pyx_t_12(__pyx_t_11); if (unlikely(!__pyx_t_5)) goto __pyx_L5_unpacking_failed; __Pyx_GOTREF(__pyx_t_5); if (__Pyx_IternextUnpackEndCheck(__pyx_t_12(__pyx_t_11), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 298; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_12 = NULL; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; goto __pyx_L6_unpacking_done; __pyx_L5_unpacking_failed:; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __pyx_t_12 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 298; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_L6_unpacking_done:; } __pyx_t_13 = __Pyx_PyIndex_AsSsize_t(__pyx_t_1); if (unlikely((__pyx_t_13 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 298; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_14 = __Pyx_PyIndex_AsSsize_t(__pyx_t_5); if (unlikely((__pyx_t_14 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 298; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_v_n = __pyx_t_13; __pyx_v_k = __pyx_t_14; /* "pandas/algos.pyx":299 * * n, k = ( values).shape * ranks = np.empty((n, k), dtype='f8') # <<<<<<<<<<<<<< * * if tiebreak == TIEBREAK_FIRST: */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 299; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_empty); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 299; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_n); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 299; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_k); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 299; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_11 = PyTuple_New(2); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 299; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_11, 1, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_2 = 0; __pyx_t_1 = 0; __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 299; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_11); __Pyx_GIVEREF(__pyx_t_11); __pyx_t_11 = 0; __pyx_t_11 = PyDict_New(); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 299; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); if (PyDict_SetItem(__pyx_t_11, __pyx_n_s_dtype, __pyx_n_s_f8) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 299; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_2 = PyObject_Call(__pyx_t_5, __pyx_t_1, __pyx_t_11); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 299; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 299; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_6 = ((PyArrayObject *)__pyx_t_2); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_ranks.rcbuffer->pybuffer); __pyx_t_3 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_ranks.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack); if (unlikely(__pyx_t_3 < 0)) { PyErr_Fetch(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_ranks.rcbuffer->pybuffer, (PyObject*)__pyx_v_ranks, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_pybuffernd_ranks.diminfo[0].strides = __pyx_pybuffernd_ranks.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_ranks.diminfo[0].shape = __pyx_pybuffernd_ranks.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_ranks.diminfo[1].strides = __pyx_pybuffernd_ranks.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_ranks.diminfo[1].shape = __pyx_pybuffernd_ranks.rcbuffer->pybuffer.shape[1]; if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 299; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_6 = 0; __pyx_v_ranks = ((PyArrayObject *)__pyx_t_2); __pyx_t_2 = 0; /* "pandas/algos.pyx":301 * ranks = np.empty((n, k), dtype='f8') * * if tiebreak == TIEBREAK_FIRST: # <<<<<<<<<<<<<< * # need to use a stable sort here * _as = values.argsort(axis=1, kind='mergesort') */ __pyx_t_4 = ((__pyx_v_tiebreak == __pyx_v_6pandas_5algos_TIEBREAK_FIRST) != 0); if (__pyx_t_4) { /* "pandas/algos.pyx":303 * if tiebreak == TIEBREAK_FIRST: * # need to use a stable sort here * _as = values.argsort(axis=1, kind='mergesort') # <<<<<<<<<<<<<< * if not ascending: * tiebreak = TIEBREAK_FIRST_DESCENDING */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_values), __pyx_n_s_argsort); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 303; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_11 = PyDict_New(); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 303; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); if (PyDict_SetItem(__pyx_t_11, __pyx_n_s_axis, __pyx_int_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 303; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (PyDict_SetItem(__pyx_t_11, __pyx_n_s_kind, __pyx_n_s_mergesort) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 303; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_1 = PyObject_Call(__pyx_t_2, __pyx_empty_tuple, __pyx_t_11); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 303; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __pyx_v__as = __pyx_t_1; __pyx_t_1 = 0; /* "pandas/algos.pyx":304 * # need to use a stable sort here * _as = values.argsort(axis=1, kind='mergesort') * if not ascending: # <<<<<<<<<<<<<< * tiebreak = TIEBREAK_FIRST_DESCENDING * else: */ __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_ascending); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 304; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_15 = ((!__pyx_t_4) != 0); if (__pyx_t_15) { /* "pandas/algos.pyx":305 * _as = values.argsort(axis=1, kind='mergesort') * if not ascending: * tiebreak = TIEBREAK_FIRST_DESCENDING # <<<<<<<<<<<<<< * else: * _as = values.argsort(1) */ __pyx_v_tiebreak = __pyx_v_6pandas_5algos_TIEBREAK_FIRST_DESCENDING; goto __pyx_L8; } __pyx_L8:; goto __pyx_L7; } /*else*/ { /* "pandas/algos.pyx":307 * tiebreak = TIEBREAK_FIRST_DESCENDING * else: * _as = values.argsort(1) # <<<<<<<<<<<<<< * * if not ascending: */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_values), __pyx_n_s_argsort); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 307; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_11 = PyObject_Call(__pyx_t_1, __pyx_tuple__6, NULL); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 307; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v__as = __pyx_t_11; __pyx_t_11 = 0; } __pyx_L7:; /* "pandas/algos.pyx":309 * _as = values.argsort(1) * * if not ascending: # <<<<<<<<<<<<<< * _as = _as[:, ::-1] * */ __pyx_t_15 = __Pyx_PyObject_IsTrue(__pyx_v_ascending); if (unlikely(__pyx_t_15 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 309; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_4 = ((!__pyx_t_15) != 0); if (__pyx_t_4) { /* "pandas/algos.pyx":310 * * if not ascending: * _as = _as[:, ::-1] # <<<<<<<<<<<<<< * * values = _take_2d_float64(values, _as) */ __pyx_t_11 = PyObject_GetItem(__pyx_v__as, __pyx_tuple__9); if (unlikely(__pyx_t_11 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 310; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF_SET(__pyx_v__as, __pyx_t_11); __pyx_t_11 = 0; goto __pyx_L9; } __pyx_L9:; /* "pandas/algos.pyx":312 * _as = _as[:, ::-1] * * values = _take_2d_float64(values, _as) # <<<<<<<<<<<<<< * argsorted = _as.astype('i8') * */ __pyx_t_11 = __pyx_f_6pandas_5algos__take_2d_float64(((PyArrayObject *)__pyx_v_values), __pyx_v__as); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 312; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); if (!(likely(((__pyx_t_11) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_11, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 312; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_6 = ((PyArrayObject *)__pyx_t_11); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_t_3 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_values.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack); if (unlikely(__pyx_t_3 < 0)) { PyErr_Fetch(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7); 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, 2, 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_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_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1]; if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 312; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_6 = 0; __Pyx_DECREF_SET(__pyx_v_values, ((PyArrayObject *)__pyx_t_11)); __pyx_t_11 = 0; /* "pandas/algos.pyx":313 * * values = _take_2d_float64(values, _as) * argsorted = _as.astype('i8') # <<<<<<<<<<<<<< * * for i in range(n): */ __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v__as, __pyx_n_s_astype); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 313; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __pyx_t_1 = PyObject_Call(__pyx_t_11, __pyx_tuple__10, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 313; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 313; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_16 = ((PyArrayObject *)__pyx_t_1); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_argsorted.rcbuffer->pybuffer); __pyx_t_3 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_argsorted.rcbuffer->pybuffer, (PyObject*)__pyx_t_16, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack); if (unlikely(__pyx_t_3 < 0)) { PyErr_Fetch(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_argsorted.rcbuffer->pybuffer, (PyObject*)__pyx_v_argsorted, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 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_pybuffernd_argsorted.diminfo[0].strides = __pyx_pybuffernd_argsorted.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_argsorted.diminfo[0].shape = __pyx_pybuffernd_argsorted.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_argsorted.diminfo[1].strides = __pyx_pybuffernd_argsorted.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_argsorted.diminfo[1].shape = __pyx_pybuffernd_argsorted.rcbuffer->pybuffer.shape[1]; if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 313; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_16 = 0; __pyx_v_argsorted = ((PyArrayObject *)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/algos.pyx":315 * argsorted = _as.astype('i8') * * for i in range(n): # <<<<<<<<<<<<<< * dups = sum_ranks = 0 * for j in range(k): */ __pyx_t_14 = __pyx_v_n; for (__pyx_t_13 = 0; __pyx_t_13 < __pyx_t_14; __pyx_t_13+=1) { __pyx_v_i = __pyx_t_13; /* "pandas/algos.pyx":316 * * for i in range(n): * dups = sum_ranks = 0 # <<<<<<<<<<<<<< * for j in range(k): * sum_ranks += j + 1 */ __pyx_v_dups = 0; __pyx_v_sum_ranks = 0; /* "pandas/algos.pyx":317 * for i in range(n): * dups = sum_ranks = 0 * for j in range(k): # <<<<<<<<<<<<<< * sum_ranks += j + 1 * dups += 1 */ __pyx_t_17 = __pyx_v_k; for (__pyx_t_18 = 0; __pyx_t_18 < __pyx_t_17; __pyx_t_18+=1) { __pyx_v_j = __pyx_t_18; /* "pandas/algos.pyx":318 * dups = sum_ranks = 0 * for j in range(k): * sum_ranks += j + 1 # <<<<<<<<<<<<<< * dups += 1 * val = values[i, j] */ __pyx_v_sum_ranks = (__pyx_v_sum_ranks + (__pyx_v_j + 1)); /* "pandas/algos.pyx":319 * for j in range(k): * sum_ranks += j + 1 * dups += 1 # <<<<<<<<<<<<<< * val = values[i, j] * if val == nan_value and keep_na: */ __pyx_v_dups = (__pyx_v_dups + 1); /* "pandas/algos.pyx":320 * sum_ranks += j + 1 * dups += 1 * val = values[i, j] # <<<<<<<<<<<<<< * if val == nan_value and keep_na: * ranks[i, argsorted[i, j]] = nan */ __pyx_t_19 = __pyx_v_i; __pyx_t_20 = __pyx_v_j; __pyx_t_3 = -1; if (__pyx_t_19 < 0) { __pyx_t_19 += __pyx_pybuffernd_values.diminfo[0].shape; if (unlikely(__pyx_t_19 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_19 >= __pyx_pybuffernd_values.diminfo[0].shape)) __pyx_t_3 = 0; if (__pyx_t_20 < 0) { __pyx_t_20 += __pyx_pybuffernd_values.diminfo[1].shape; if (unlikely(__pyx_t_20 < 0)) __pyx_t_3 = 1; } else if (unlikely(__pyx_t_20 >= __pyx_pybuffernd_values.diminfo[1].shape)) __pyx_t_3 = 1; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 320; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_val = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_20, __pyx_pybuffernd_values.diminfo[1].strides)); /* "pandas/algos.pyx":321 * dups += 1 * val = values[i, j] * if val == nan_value and keep_na: # <<<<<<<<<<<<<< * ranks[i, argsorted[i, j]] = nan * continue */ __pyx_t_4 = ((__pyx_v_val == __pyx_v_nan_value) != 0); if (__pyx_t_4) { __pyx_t_15 = (__pyx_v_keep_na != 0); } else { __pyx_t_15 = __pyx_t_4; } if (__pyx_t_15) { /* "pandas/algos.pyx":322 * val = values[i, j] * if val == nan_value and keep_na: * ranks[i, argsorted[i, j]] = nan # <<<<<<<<<<<<<< * continue * if j == k - 1 or fabs(values[i, j + 1] - val) > FP_ERR: */ __pyx_t_21 = __pyx_v_i; __pyx_t_22 = __pyx_v_j; __pyx_t_3 = -1; if (__pyx_t_21 < 0) { __pyx_t_21 += __pyx_pybuffernd_argsorted.diminfo[0].shape; if (unlikely(__pyx_t_21 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_21 >= __pyx_pybuffernd_argsorted.diminfo[0].shape)) __pyx_t_3 = 0; if (__pyx_t_22 < 0) { __pyx_t_22 += __pyx_pybuffernd_argsorted.diminfo[1].shape; if (unlikely(__pyx_t_22 < 0)) __pyx_t_3 = 1; } else if (unlikely(__pyx_t_22 >= __pyx_pybuffernd_argsorted.diminfo[1].shape)) __pyx_t_3 = 1; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 322; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_23 = __pyx_v_i; __pyx_t_24 = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_argsorted.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_argsorted.diminfo[0].strides, __pyx_t_22, __pyx_pybuffernd_argsorted.diminfo[1].strides)); __pyx_t_3 = -1; if (__pyx_t_23 < 0) { __pyx_t_23 += __pyx_pybuffernd_ranks.diminfo[0].shape; if (unlikely(__pyx_t_23 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_23 >= __pyx_pybuffernd_ranks.diminfo[0].shape)) __pyx_t_3 = 0; if (__pyx_t_24 < 0) { __pyx_t_24 += __pyx_pybuffernd_ranks.diminfo[1].shape; if (unlikely(__pyx_t_24 < 0)) __pyx_t_3 = 1; } else if (unlikely(__pyx_t_24 >= __pyx_pybuffernd_ranks.diminfo[1].shape)) __pyx_t_3 = 1; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 322; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_ranks.rcbuffer->pybuffer.buf, __pyx_t_23, __pyx_pybuffernd_ranks.diminfo[0].strides, __pyx_t_24, __pyx_pybuffernd_ranks.diminfo[1].strides) = __pyx_v_6pandas_5algos_nan; /* "pandas/algos.pyx":323 * if val == nan_value and keep_na: * ranks[i, argsorted[i, j]] = nan * continue # <<<<<<<<<<<<<< * if j == k - 1 or fabs(values[i, j + 1] - val) > FP_ERR: * if tiebreak == TIEBREAK_AVERAGE: */ goto __pyx_L12_continue; } /* "pandas/algos.pyx":324 * ranks[i, argsorted[i, j]] = nan * continue * if j == k - 1 or fabs(values[i, j + 1] - val) > FP_ERR: # <<<<<<<<<<<<<< * if tiebreak == TIEBREAK_AVERAGE: * for z in range(j - dups + 1, j + 1): */ __pyx_t_15 = ((__pyx_v_j == (__pyx_v_k - 1)) != 0); if (!__pyx_t_15) { __pyx_t_25 = __pyx_v_i; __pyx_t_26 = (__pyx_v_j + 1); __pyx_t_3 = -1; if (__pyx_t_25 < 0) { __pyx_t_25 += __pyx_pybuffernd_values.diminfo[0].shape; if (unlikely(__pyx_t_25 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_25 >= __pyx_pybuffernd_values.diminfo[0].shape)) __pyx_t_3 = 0; if (__pyx_t_26 < 0) { __pyx_t_26 += __pyx_pybuffernd_values.diminfo[1].shape; if (unlikely(__pyx_t_26 < 0)) __pyx_t_3 = 1; } else if (unlikely(__pyx_t_26 >= __pyx_pybuffernd_values.diminfo[1].shape)) __pyx_t_3 = 1; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 324; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_4 = ((fabs(((*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_25, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_26, __pyx_pybuffernd_values.diminfo[1].strides)) - __pyx_v_val)) > __pyx_v_6pandas_5algos_FP_ERR) != 0); __pyx_t_27 = __pyx_t_4; } else { __pyx_t_27 = __pyx_t_15; } if (__pyx_t_27) { /* "pandas/algos.pyx":325 * continue * if j == k - 1 or fabs(values[i, j + 1] - val) > FP_ERR: * if tiebreak == TIEBREAK_AVERAGE: # <<<<<<<<<<<<<< * for z in range(j - dups + 1, j + 1): * ranks[i, argsorted[i, z]] = sum_ranks / dups */ __pyx_t_27 = ((__pyx_v_tiebreak == __pyx_v_6pandas_5algos_TIEBREAK_AVERAGE) != 0); if (__pyx_t_27) { /* "pandas/algos.pyx":326 * if j == k - 1 or fabs(values[i, j + 1] - val) > FP_ERR: * if tiebreak == TIEBREAK_AVERAGE: * for z in range(j - dups + 1, j + 1): # <<<<<<<<<<<<<< * ranks[i, argsorted[i, z]] = sum_ranks / dups * elif tiebreak == TIEBREAK_MIN: */ __pyx_t_28 = (__pyx_v_j + 1); for (__pyx_t_29 = ((__pyx_v_j - __pyx_v_dups) + 1); __pyx_t_29 < __pyx_t_28; __pyx_t_29+=1) { __pyx_v_z = __pyx_t_29; /* "pandas/algos.pyx":327 * if tiebreak == TIEBREAK_AVERAGE: * for z in range(j - dups + 1, j + 1): * ranks[i, argsorted[i, z]] = sum_ranks / dups # <<<<<<<<<<<<<< * elif tiebreak == TIEBREAK_MIN: * for z in range(j - dups + 1, j + 1): */ if (unlikely(__pyx_v_dups == 0)) { #ifdef WITH_THREAD PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure(); #endif PyErr_SetString(PyExc_ZeroDivisionError, "float division"); #ifdef WITH_THREAD PyGILState_Release(__pyx_gilstate_save); #endif {__pyx_filename = __pyx_f[0]; __pyx_lineno = 327; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_30 = __pyx_v_i; __pyx_t_31 = __pyx_v_z; __pyx_t_3 = -1; if (__pyx_t_30 < 0) { __pyx_t_30 += __pyx_pybuffernd_argsorted.diminfo[0].shape; if (unlikely(__pyx_t_30 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_30 >= __pyx_pybuffernd_argsorted.diminfo[0].shape)) __pyx_t_3 = 0; if (__pyx_t_31 < 0) { __pyx_t_31 += __pyx_pybuffernd_argsorted.diminfo[1].shape; if (unlikely(__pyx_t_31 < 0)) __pyx_t_3 = 1; } else if (unlikely(__pyx_t_31 >= __pyx_pybuffernd_argsorted.diminfo[1].shape)) __pyx_t_3 = 1; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 327; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_32 = __pyx_v_i; __pyx_t_33 = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_argsorted.rcbuffer->pybuffer.buf, __pyx_t_30, __pyx_pybuffernd_argsorted.diminfo[0].strides, __pyx_t_31, __pyx_pybuffernd_argsorted.diminfo[1].strides)); __pyx_t_3 = -1; if (__pyx_t_32 < 0) { __pyx_t_32 += __pyx_pybuffernd_ranks.diminfo[0].shape; if (unlikely(__pyx_t_32 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_32 >= __pyx_pybuffernd_ranks.diminfo[0].shape)) __pyx_t_3 = 0; if (__pyx_t_33 < 0) { __pyx_t_33 += __pyx_pybuffernd_ranks.diminfo[1].shape; if (unlikely(__pyx_t_33 < 0)) __pyx_t_3 = 1; } else if (unlikely(__pyx_t_33 >= __pyx_pybuffernd_ranks.diminfo[1].shape)) __pyx_t_3 = 1; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 327; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_ranks.rcbuffer->pybuffer.buf, __pyx_t_32, __pyx_pybuffernd_ranks.diminfo[0].strides, __pyx_t_33, __pyx_pybuffernd_ranks.diminfo[1].strides) = (__pyx_v_sum_ranks / __pyx_v_dups); } goto __pyx_L16; } /* "pandas/algos.pyx":328 * for z in range(j - dups + 1, j + 1): * ranks[i, argsorted[i, z]] = sum_ranks / dups * elif tiebreak == TIEBREAK_MIN: # <<<<<<<<<<<<<< * for z in range(j - dups + 1, j + 1): * ranks[i, argsorted[i, z]] = j - dups + 2 */ __pyx_t_27 = ((__pyx_v_tiebreak == __pyx_v_6pandas_5algos_TIEBREAK_MIN) != 0); if (__pyx_t_27) { /* "pandas/algos.pyx":329 * ranks[i, argsorted[i, z]] = sum_ranks / dups * elif tiebreak == TIEBREAK_MIN: * for z in range(j - dups + 1, j + 1): # <<<<<<<<<<<<<< * ranks[i, argsorted[i, z]] = j - dups + 2 * elif tiebreak == TIEBREAK_MAX: */ __pyx_t_28 = (__pyx_v_j + 1); for (__pyx_t_29 = ((__pyx_v_j - __pyx_v_dups) + 1); __pyx_t_29 < __pyx_t_28; __pyx_t_29+=1) { __pyx_v_z = __pyx_t_29; /* "pandas/algos.pyx":330 * elif tiebreak == TIEBREAK_MIN: * for z in range(j - dups + 1, j + 1): * ranks[i, argsorted[i, z]] = j - dups + 2 # <<<<<<<<<<<<<< * elif tiebreak == TIEBREAK_MAX: * for z in range(j - dups + 1, j + 1): */ __pyx_t_34 = __pyx_v_i; __pyx_t_35 = __pyx_v_z; __pyx_t_3 = -1; if (__pyx_t_34 < 0) { __pyx_t_34 += __pyx_pybuffernd_argsorted.diminfo[0].shape; if (unlikely(__pyx_t_34 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_34 >= __pyx_pybuffernd_argsorted.diminfo[0].shape)) __pyx_t_3 = 0; if (__pyx_t_35 < 0) { __pyx_t_35 += __pyx_pybuffernd_argsorted.diminfo[1].shape; if (unlikely(__pyx_t_35 < 0)) __pyx_t_3 = 1; } else if (unlikely(__pyx_t_35 >= __pyx_pybuffernd_argsorted.diminfo[1].shape)) __pyx_t_3 = 1; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 330; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_36 = __pyx_v_i; __pyx_t_37 = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_argsorted.rcbuffer->pybuffer.buf, __pyx_t_34, __pyx_pybuffernd_argsorted.diminfo[0].strides, __pyx_t_35, __pyx_pybuffernd_argsorted.diminfo[1].strides)); __pyx_t_3 = -1; if (__pyx_t_36 < 0) { __pyx_t_36 += __pyx_pybuffernd_ranks.diminfo[0].shape; if (unlikely(__pyx_t_36 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_36 >= __pyx_pybuffernd_ranks.diminfo[0].shape)) __pyx_t_3 = 0; if (__pyx_t_37 < 0) { __pyx_t_37 += __pyx_pybuffernd_ranks.diminfo[1].shape; if (unlikely(__pyx_t_37 < 0)) __pyx_t_3 = 1; } else if (unlikely(__pyx_t_37 >= __pyx_pybuffernd_ranks.diminfo[1].shape)) __pyx_t_3 = 1; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 330; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_ranks.rcbuffer->pybuffer.buf, __pyx_t_36, __pyx_pybuffernd_ranks.diminfo[0].strides, __pyx_t_37, __pyx_pybuffernd_ranks.diminfo[1].strides) = ((__pyx_v_j - __pyx_v_dups) + 2); } goto __pyx_L16; } /* "pandas/algos.pyx":331 * for z in range(j - dups + 1, j + 1): * ranks[i, argsorted[i, z]] = j - dups + 2 * elif tiebreak == TIEBREAK_MAX: # <<<<<<<<<<<<<< * for z in range(j - dups + 1, j + 1): * ranks[i, argsorted[i, z]] = j + 1 */ __pyx_t_27 = ((__pyx_v_tiebreak == __pyx_v_6pandas_5algos_TIEBREAK_MAX) != 0); if (__pyx_t_27) { /* "pandas/algos.pyx":332 * ranks[i, argsorted[i, z]] = j - dups + 2 * elif tiebreak == TIEBREAK_MAX: * for z in range(j - dups + 1, j + 1): # <<<<<<<<<<<<<< * ranks[i, argsorted[i, z]] = j + 1 * elif tiebreak == TIEBREAK_FIRST: */ __pyx_t_28 = (__pyx_v_j + 1); for (__pyx_t_29 = ((__pyx_v_j - __pyx_v_dups) + 1); __pyx_t_29 < __pyx_t_28; __pyx_t_29+=1) { __pyx_v_z = __pyx_t_29; /* "pandas/algos.pyx":333 * elif tiebreak == TIEBREAK_MAX: * for z in range(j - dups + 1, j + 1): * ranks[i, argsorted[i, z]] = j + 1 # <<<<<<<<<<<<<< * elif tiebreak == TIEBREAK_FIRST: * for z in range(j - dups + 1, j + 1): */ __pyx_t_38 = __pyx_v_i; __pyx_t_39 = __pyx_v_z; __pyx_t_3 = -1; if (__pyx_t_38 < 0) { __pyx_t_38 += __pyx_pybuffernd_argsorted.diminfo[0].shape; if (unlikely(__pyx_t_38 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_38 >= __pyx_pybuffernd_argsorted.diminfo[0].shape)) __pyx_t_3 = 0; if (__pyx_t_39 < 0) { __pyx_t_39 += __pyx_pybuffernd_argsorted.diminfo[1].shape; if (unlikely(__pyx_t_39 < 0)) __pyx_t_3 = 1; } else if (unlikely(__pyx_t_39 >= __pyx_pybuffernd_argsorted.diminfo[1].shape)) __pyx_t_3 = 1; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 333; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_40 = __pyx_v_i; __pyx_t_41 = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_argsorted.rcbuffer->pybuffer.buf, __pyx_t_38, __pyx_pybuffernd_argsorted.diminfo[0].strides, __pyx_t_39, __pyx_pybuffernd_argsorted.diminfo[1].strides)); __pyx_t_3 = -1; if (__pyx_t_40 < 0) { __pyx_t_40 += __pyx_pybuffernd_ranks.diminfo[0].shape; if (unlikely(__pyx_t_40 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_40 >= __pyx_pybuffernd_ranks.diminfo[0].shape)) __pyx_t_3 = 0; if (__pyx_t_41 < 0) { __pyx_t_41 += __pyx_pybuffernd_ranks.diminfo[1].shape; if (unlikely(__pyx_t_41 < 0)) __pyx_t_3 = 1; } else if (unlikely(__pyx_t_41 >= __pyx_pybuffernd_ranks.diminfo[1].shape)) __pyx_t_3 = 1; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 333; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_ranks.rcbuffer->pybuffer.buf, __pyx_t_40, __pyx_pybuffernd_ranks.diminfo[0].strides, __pyx_t_41, __pyx_pybuffernd_ranks.diminfo[1].strides) = (__pyx_v_j + 1); } goto __pyx_L16; } /* "pandas/algos.pyx":334 * for z in range(j - dups + 1, j + 1): * ranks[i, argsorted[i, z]] = j + 1 * elif tiebreak == TIEBREAK_FIRST: # <<<<<<<<<<<<<< * for z in range(j - dups + 1, j + 1): * ranks[i, argsorted[i, z]] = z + 1 */ __pyx_t_27 = ((__pyx_v_tiebreak == __pyx_v_6pandas_5algos_TIEBREAK_FIRST) != 0); if (__pyx_t_27) { /* "pandas/algos.pyx":335 * ranks[i, argsorted[i, z]] = j + 1 * elif tiebreak == TIEBREAK_FIRST: * for z in range(j - dups + 1, j + 1): # <<<<<<<<<<<<<< * ranks[i, argsorted[i, z]] = z + 1 * elif tiebreak == TIEBREAK_FIRST_DESCENDING: */ __pyx_t_28 = (__pyx_v_j + 1); for (__pyx_t_29 = ((__pyx_v_j - __pyx_v_dups) + 1); __pyx_t_29 < __pyx_t_28; __pyx_t_29+=1) { __pyx_v_z = __pyx_t_29; /* "pandas/algos.pyx":336 * elif tiebreak == TIEBREAK_FIRST: * for z in range(j - dups + 1, j + 1): * ranks[i, argsorted[i, z]] = z + 1 # <<<<<<<<<<<<<< * elif tiebreak == TIEBREAK_FIRST_DESCENDING: * for z in range(j - dups + 1, j + 1): */ __pyx_t_42 = __pyx_v_i; __pyx_t_43 = __pyx_v_z; __pyx_t_3 = -1; if (__pyx_t_42 < 0) { __pyx_t_42 += __pyx_pybuffernd_argsorted.diminfo[0].shape; if (unlikely(__pyx_t_42 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_42 >= __pyx_pybuffernd_argsorted.diminfo[0].shape)) __pyx_t_3 = 0; if (__pyx_t_43 < 0) { __pyx_t_43 += __pyx_pybuffernd_argsorted.diminfo[1].shape; if (unlikely(__pyx_t_43 < 0)) __pyx_t_3 = 1; } else if (unlikely(__pyx_t_43 >= __pyx_pybuffernd_argsorted.diminfo[1].shape)) __pyx_t_3 = 1; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 336; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_44 = __pyx_v_i; __pyx_t_45 = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_argsorted.rcbuffer->pybuffer.buf, __pyx_t_42, __pyx_pybuffernd_argsorted.diminfo[0].strides, __pyx_t_43, __pyx_pybuffernd_argsorted.diminfo[1].strides)); __pyx_t_3 = -1; if (__pyx_t_44 < 0) { __pyx_t_44 += __pyx_pybuffernd_ranks.diminfo[0].shape; if (unlikely(__pyx_t_44 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_44 >= __pyx_pybuffernd_ranks.diminfo[0].shape)) __pyx_t_3 = 0; if (__pyx_t_45 < 0) { __pyx_t_45 += __pyx_pybuffernd_ranks.diminfo[1].shape; if (unlikely(__pyx_t_45 < 0)) __pyx_t_3 = 1; } else if (unlikely(__pyx_t_45 >= __pyx_pybuffernd_ranks.diminfo[1].shape)) __pyx_t_3 = 1; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 336; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_ranks.rcbuffer->pybuffer.buf, __pyx_t_44, __pyx_pybuffernd_ranks.diminfo[0].strides, __pyx_t_45, __pyx_pybuffernd_ranks.diminfo[1].strides) = (__pyx_v_z + 1); } goto __pyx_L16; } /* "pandas/algos.pyx":337 * for z in range(j - dups + 1, j + 1): * ranks[i, argsorted[i, z]] = z + 1 * elif tiebreak == TIEBREAK_FIRST_DESCENDING: # <<<<<<<<<<<<<< * for z in range(j - dups + 1, j + 1): * ranks[i, argsorted[i, z]] = 2 * j - z - dups + 2 */ __pyx_t_27 = ((__pyx_v_tiebreak == __pyx_v_6pandas_5algos_TIEBREAK_FIRST_DESCENDING) != 0); if (__pyx_t_27) { /* "pandas/algos.pyx":338 * ranks[i, argsorted[i, z]] = z + 1 * elif tiebreak == TIEBREAK_FIRST_DESCENDING: * for z in range(j - dups + 1, j + 1): # <<<<<<<<<<<<<< * ranks[i, argsorted[i, z]] = 2 * j - z - dups + 2 * sum_ranks = dups = 0 */ __pyx_t_28 = (__pyx_v_j + 1); for (__pyx_t_29 = ((__pyx_v_j - __pyx_v_dups) + 1); __pyx_t_29 < __pyx_t_28; __pyx_t_29+=1) { __pyx_v_z = __pyx_t_29; /* "pandas/algos.pyx":339 * elif tiebreak == TIEBREAK_FIRST_DESCENDING: * for z in range(j - dups + 1, j + 1): * ranks[i, argsorted[i, z]] = 2 * j - z - dups + 2 # <<<<<<<<<<<<<< * sum_ranks = dups = 0 * */ __pyx_t_46 = __pyx_v_i; __pyx_t_47 = __pyx_v_z; __pyx_t_3 = -1; if (__pyx_t_46 < 0) { __pyx_t_46 += __pyx_pybuffernd_argsorted.diminfo[0].shape; if (unlikely(__pyx_t_46 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_46 >= __pyx_pybuffernd_argsorted.diminfo[0].shape)) __pyx_t_3 = 0; if (__pyx_t_47 < 0) { __pyx_t_47 += __pyx_pybuffernd_argsorted.diminfo[1].shape; if (unlikely(__pyx_t_47 < 0)) __pyx_t_3 = 1; } else if (unlikely(__pyx_t_47 >= __pyx_pybuffernd_argsorted.diminfo[1].shape)) __pyx_t_3 = 1; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 339; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_48 = __pyx_v_i; __pyx_t_49 = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_argsorted.rcbuffer->pybuffer.buf, __pyx_t_46, __pyx_pybuffernd_argsorted.diminfo[0].strides, __pyx_t_47, __pyx_pybuffernd_argsorted.diminfo[1].strides)); __pyx_t_3 = -1; if (__pyx_t_48 < 0) { __pyx_t_48 += __pyx_pybuffernd_ranks.diminfo[0].shape; if (unlikely(__pyx_t_48 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_48 >= __pyx_pybuffernd_ranks.diminfo[0].shape)) __pyx_t_3 = 0; if (__pyx_t_49 < 0) { __pyx_t_49 += __pyx_pybuffernd_ranks.diminfo[1].shape; if (unlikely(__pyx_t_49 < 0)) __pyx_t_3 = 1; } else if (unlikely(__pyx_t_49 >= __pyx_pybuffernd_ranks.diminfo[1].shape)) __pyx_t_3 = 1; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 339; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_ranks.rcbuffer->pybuffer.buf, __pyx_t_48, __pyx_pybuffernd_ranks.diminfo[0].strides, __pyx_t_49, __pyx_pybuffernd_ranks.diminfo[1].strides) = ((((2 * __pyx_v_j) - __pyx_v_z) - __pyx_v_dups) + 2); } goto __pyx_L16; } __pyx_L16:; /* "pandas/algos.pyx":340 * for z in range(j - dups + 1, j + 1): * ranks[i, argsorted[i, z]] = 2 * j - z - dups + 2 * sum_ranks = dups = 0 # <<<<<<<<<<<<<< * * if axis == 0: */ __pyx_v_sum_ranks = 0; __pyx_v_dups = 0; goto __pyx_L15; } __pyx_L15:; __pyx_L12_continue:; } } /* "pandas/algos.pyx":342 * sum_ranks = dups = 0 * * if axis == 0: # <<<<<<<<<<<<<< * return ranks.T * else: */ __pyx_t_1 = PyObject_RichCompare(__pyx_v_axis, __pyx_int_0, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 342; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_27 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_27 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 342; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_27) { /* "pandas/algos.pyx":343 * * if axis == 0: * return ranks.T # <<<<<<<<<<<<<< * else: * return ranks */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_ranks), __pyx_n_s_T); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 343; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; } /*else*/ { /* "pandas/algos.pyx":345 * return ranks.T * else: * return ranks # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_ranks)); __pyx_r = ((PyObject *)__pyx_v_ranks); goto __pyx_L0; } /* "pandas/algos.pyx":265 * * * def rank_2d_float64(object in_arr, axis=0, ties_method='average', # <<<<<<<<<<<<<< * ascending=True, na_option='keep'): * """ */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_11); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_argsorted.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_ranks.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.rank_2d_float64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_argsorted.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_ranks.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_ranks); __Pyx_XDECREF((PyObject *)__pyx_v_values); __Pyx_XDECREF((PyObject *)__pyx_v_argsorted); __Pyx_XDECREF(__pyx_v__as); __Pyx_XDECREF(__pyx_v_in_arr); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/algos.pyx":348 * * * def rank_2d_int64(object in_arr, axis=0, ties_method='average', # <<<<<<<<<<<<<< * ascending=True, na_option='keep'): * """ */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_7rank_2d_int64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6pandas_5algos_6rank_2d_int64[] = "\n Fast NaN-friendly version of scipy.stats.rankdata\n "; static PyMethodDef __pyx_mdef_6pandas_5algos_7rank_2d_int64 = {__Pyx_NAMESTR("rank_2d_int64"), (PyCFunction)__pyx_pw_6pandas_5algos_7rank_2d_int64, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_5algos_6rank_2d_int64)}; static PyObject *__pyx_pw_6pandas_5algos_7rank_2d_int64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_in_arr = 0; PyObject *__pyx_v_axis = 0; PyObject *__pyx_v_ties_method = 0; PyObject *__pyx_v_ascending = 0; CYTHON_UNUSED PyObject *__pyx_v_na_option = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("rank_2d_int64 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_in_arr,&__pyx_n_s_axis,&__pyx_n_s_ties_method,&__pyx_n_s_ascending,&__pyx_n_s_na_option,0}; PyObject* values[5] = {0,0,0,0,0}; values[1] = ((PyObject *)__pyx_int_0); values[2] = ((PyObject *)__pyx_n_s_average); /* "pandas/algos.pyx":349 * * def rank_2d_int64(object in_arr, axis=0, ties_method='average', * ascending=True, na_option='keep'): # <<<<<<<<<<<<<< * """ * Fast NaN-friendly version of scipy.stats.rankdata */ values[3] = ((PyObject *)Py_True); values[4] = ((PyObject *)__pyx_n_s_keep); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_in_arr)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_axis); if (value) { values[1] = value; kw_args--; } } case 2: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ties_method); if (value) { values[2] = value; kw_args--; } } case 3: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ascending); if (value) { values[3] = value; kw_args--; } } case 4: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_na_option); if (value) { values[4] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "rank_2d_int64") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 348; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_in_arr = values[0]; __pyx_v_axis = values[1]; __pyx_v_ties_method = values[2]; __pyx_v_ascending = values[3]; __pyx_v_na_option = values[4]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("rank_2d_int64", 0, 1, 5, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 348; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.rank_2d_int64", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pandas_5algos_6rank_2d_int64(__pyx_self, __pyx_v_in_arr, __pyx_v_axis, __pyx_v_ties_method, __pyx_v_ascending, __pyx_v_na_option); /* "pandas/algos.pyx":348 * * * def rank_2d_int64(object in_arr, axis=0, ties_method='average', # <<<<<<<<<<<<<< * ascending=True, na_option='keep'): * """ */ /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5algos_6rank_2d_int64(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_in_arr, PyObject *__pyx_v_axis, PyObject *__pyx_v_ties_method, PyObject *__pyx_v_ascending, CYTHON_UNUSED PyObject *__pyx_v_na_option) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_z; Py_ssize_t __pyx_v_k; Py_ssize_t __pyx_v_n; Py_ssize_t __pyx_v_dups; PyArrayObject *__pyx_v_ranks = 0; PyArrayObject *__pyx_v_argsorted = 0; PyArrayObject *__pyx_v_values = 0; __pyx_t_5numpy_int64_t __pyx_v_val; __pyx_t_5numpy_float64_t __pyx_v_sum_ranks; int __pyx_v_tiebreak; PyObject *__pyx_v__as = NULL; __Pyx_LocalBuf_ND __pyx_pybuffernd_argsorted; __Pyx_Buffer __pyx_pybuffer_argsorted; __Pyx_LocalBuf_ND __pyx_pybuffernd_ranks; __Pyx_Buffer __pyx_pybuffer_ranks; __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; int __pyx_t_3; int __pyx_t_4; PyObject *__pyx_t_5 = NULL; PyArrayObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; PyObject *(*__pyx_t_11)(PyObject *); Py_ssize_t __pyx_t_12; Py_ssize_t __pyx_t_13; PyArrayObject *__pyx_t_14 = NULL; int __pyx_t_15; PyArrayObject *__pyx_t_16 = NULL; 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; int __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; __pyx_t_5numpy_int64_t __pyx_t_29; Py_ssize_t __pyx_t_30; Py_ssize_t __pyx_t_31; Py_ssize_t __pyx_t_32; __pyx_t_5numpy_int64_t __pyx_t_33; Py_ssize_t __pyx_t_34; Py_ssize_t __pyx_t_35; Py_ssize_t __pyx_t_36; __pyx_t_5numpy_int64_t __pyx_t_37; Py_ssize_t __pyx_t_38; Py_ssize_t __pyx_t_39; Py_ssize_t __pyx_t_40; __pyx_t_5numpy_int64_t __pyx_t_41; Py_ssize_t __pyx_t_42; Py_ssize_t __pyx_t_43; Py_ssize_t __pyx_t_44; __pyx_t_5numpy_int64_t __pyx_t_45; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("rank_2d_int64", 0); __pyx_pybuffer_ranks.pybuffer.buf = NULL; __pyx_pybuffer_ranks.refcount = 0; __pyx_pybuffernd_ranks.data = NULL; __pyx_pybuffernd_ranks.rcbuffer = &__pyx_pybuffer_ranks; __pyx_pybuffer_argsorted.pybuffer.buf = NULL; __pyx_pybuffer_argsorted.refcount = 0; __pyx_pybuffernd_argsorted.data = NULL; __pyx_pybuffernd_argsorted.rcbuffer = &__pyx_pybuffer_argsorted; __pyx_pybuffer_values.pybuffer.buf = NULL; __pyx_pybuffer_values.refcount = 0; __pyx_pybuffernd_values.data = NULL; __pyx_pybuffernd_values.rcbuffer = &__pyx_pybuffer_values; /* "pandas/algos.pyx":355 * * cdef: * Py_ssize_t i, j, z, k, n, dups = 0 # <<<<<<<<<<<<<< * ndarray[float64_t, ndim=2] ranks * ndarray[int64_t, ndim=2] argsorted */ __pyx_v_dups = 0; /* "pandas/algos.pyx":360 * ndarray[int64_t, ndim=2, cast=True] values * int64_t val * float64_t sum_ranks = 0 # <<<<<<<<<<<<<< * int tiebreak = 0 * tiebreak = tiebreakers[ties_method] */ __pyx_v_sum_ranks = 0.0; /* "pandas/algos.pyx":361 * int64_t val * float64_t sum_ranks = 0 * int tiebreak = 0 # <<<<<<<<<<<<<< * tiebreak = tiebreakers[ties_method] * */ __pyx_v_tiebreak = 0; /* "pandas/algos.pyx":362 * float64_t sum_ranks = 0 * int tiebreak = 0 * tiebreak = tiebreakers[ties_method] # <<<<<<<<<<<<<< * * if axis == 0: */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_tiebreakers); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 362; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyObject_GetItem(__pyx_t_1, __pyx_v_ties_method); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 362; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 362; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_tiebreak = __pyx_t_3; /* "pandas/algos.pyx":364 * tiebreak = tiebreakers[ties_method] * * if axis == 0: # <<<<<<<<<<<<<< * values = np.asarray(in_arr).T * else: */ __pyx_t_2 = PyObject_RichCompare(__pyx_v_axis, __pyx_int_0, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 364; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 364; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_4) { /* "pandas/algos.pyx":365 * * if axis == 0: * values = np.asarray(in_arr).T # <<<<<<<<<<<<<< * else: * values = np.asarray(in_arr) */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 365; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_asarray); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 365; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 365; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_in_arr); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_in_arr); __Pyx_GIVEREF(__pyx_v_in_arr); __pyx_t_5 = PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 365; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_T); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 365; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 365; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_6 = ((PyArrayObject *)__pyx_t_2); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_t_3 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_values.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 1, __pyx_stack); if (unlikely(__pyx_t_3 < 0)) { PyErr_Fetch(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_values.rcbuffer->pybuffer, (PyObject*)__pyx_v_values, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 1, __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_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_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1]; if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 365; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_6 = 0; __pyx_v_values = ((PyArrayObject *)__pyx_t_2); __pyx_t_2 = 0; goto __pyx_L3; } /*else*/ { /* "pandas/algos.pyx":367 * values = np.asarray(in_arr).T * else: * values = np.asarray(in_arr) # <<<<<<<<<<<<<< * * n, k = ( values).shape */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 367; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_asarray); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 367; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 367; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_in_arr); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_in_arr); __Pyx_GIVEREF(__pyx_v_in_arr); __pyx_t_1 = PyObject_Call(__pyx_t_5, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 367; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 367; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_6 = ((PyArrayObject *)__pyx_t_1); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_t_3 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_values.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 1, __pyx_stack); if (unlikely(__pyx_t_3 < 0)) { PyErr_Fetch(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_values.rcbuffer->pybuffer, (PyObject*)__pyx_v_values, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 1, __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_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_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1]; if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 367; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_6 = 0; __pyx_v_values = ((PyArrayObject *)__pyx_t_1); __pyx_t_1 = 0; } __pyx_L3:; /* "pandas/algos.pyx":369 * values = np.asarray(in_arr) * * n, k = ( values).shape # <<<<<<<<<<<<<< * ranks = np.empty((n, k), dtype='f8') * */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_values), __pyx_n_s_shape); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 369; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) { PyObject* sequence = __pyx_t_1; #if CYTHON_COMPILING_IN_CPYTHON Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 369; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_5 = PyTuple_GET_ITEM(sequence, 1); } else { __pyx_t_2 = PyList_GET_ITEM(sequence, 0); __pyx_t_5 = PyList_GET_ITEM(sequence, 1); } __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(__pyx_t_5); #else __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 369; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 369; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } else { Py_ssize_t index = -1; __pyx_t_10 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 369; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_11 = Py_TYPE(__pyx_t_10)->tp_iternext; index = 0; __pyx_t_2 = __pyx_t_11(__pyx_t_10); if (unlikely(!__pyx_t_2)) goto __pyx_L4_unpacking_failed; __Pyx_GOTREF(__pyx_t_2); index = 1; __pyx_t_5 = __pyx_t_11(__pyx_t_10); if (unlikely(!__pyx_t_5)) goto __pyx_L4_unpacking_failed; __Pyx_GOTREF(__pyx_t_5); if (__Pyx_IternextUnpackEndCheck(__pyx_t_11(__pyx_t_10), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 369; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_11 = NULL; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; goto __pyx_L5_unpacking_done; __pyx_L4_unpacking_failed:; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_t_11 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 369; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_L5_unpacking_done:; } __pyx_t_12 = __Pyx_PyIndex_AsSsize_t(__pyx_t_2); if (unlikely((__pyx_t_12 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 369; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_13 = __Pyx_PyIndex_AsSsize_t(__pyx_t_5); if (unlikely((__pyx_t_13 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 369; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_v_n = __pyx_t_12; __pyx_v_k = __pyx_t_13; /* "pandas/algos.pyx":370 * * n, k = ( values).shape * ranks = np.empty((n, k), dtype='f8') # <<<<<<<<<<<<<< * * if tiebreak == TIEBREAK_FIRST: */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 370; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_empty); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 370; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_n); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 370; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_k); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 370; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_10 = PyTuple_New(2); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 370; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_1 = 0; __pyx_t_2 = 0; __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 370; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_10); __Pyx_GIVEREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_t_10 = PyDict_New(); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 370; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); if (PyDict_SetItem(__pyx_t_10, __pyx_n_s_dtype, __pyx_n_s_f8) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 370; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_1 = PyObject_Call(__pyx_t_5, __pyx_t_2, __pyx_t_10); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 370; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 370; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_14 = ((PyArrayObject *)__pyx_t_1); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_ranks.rcbuffer->pybuffer); __pyx_t_3 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_ranks.rcbuffer->pybuffer, (PyObject*)__pyx_t_14, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack); if (unlikely(__pyx_t_3 < 0)) { PyErr_Fetch(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_ranks.rcbuffer->pybuffer, (PyObject*)__pyx_v_ranks, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_pybuffernd_ranks.diminfo[0].strides = __pyx_pybuffernd_ranks.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_ranks.diminfo[0].shape = __pyx_pybuffernd_ranks.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_ranks.diminfo[1].strides = __pyx_pybuffernd_ranks.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_ranks.diminfo[1].shape = __pyx_pybuffernd_ranks.rcbuffer->pybuffer.shape[1]; if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 370; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_14 = 0; __pyx_v_ranks = ((PyArrayObject *)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/algos.pyx":372 * ranks = np.empty((n, k), dtype='f8') * * if tiebreak == TIEBREAK_FIRST: # <<<<<<<<<<<<<< * # need to use a stable sort here * _as = values.argsort(axis=1, kind='mergesort') */ __pyx_t_4 = ((__pyx_v_tiebreak == __pyx_v_6pandas_5algos_TIEBREAK_FIRST) != 0); if (__pyx_t_4) { /* "pandas/algos.pyx":374 * if tiebreak == TIEBREAK_FIRST: * # need to use a stable sort here * _as = values.argsort(axis=1, kind='mergesort') # <<<<<<<<<<<<<< * if not ascending: * tiebreak = TIEBREAK_FIRST_DESCENDING */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_values), __pyx_n_s_argsort); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 374; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_10 = PyDict_New(); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 374; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); if (PyDict_SetItem(__pyx_t_10, __pyx_n_s_axis, __pyx_int_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 374; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (PyDict_SetItem(__pyx_t_10, __pyx_n_s_kind, __pyx_n_s_mergesort) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 374; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_2 = PyObject_Call(__pyx_t_1, __pyx_empty_tuple, __pyx_t_10); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 374; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_v__as = __pyx_t_2; __pyx_t_2 = 0; /* "pandas/algos.pyx":375 * # need to use a stable sort here * _as = values.argsort(axis=1, kind='mergesort') * if not ascending: # <<<<<<<<<<<<<< * tiebreak = TIEBREAK_FIRST_DESCENDING * else: */ __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_ascending); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 375; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_15 = ((!__pyx_t_4) != 0); if (__pyx_t_15) { /* "pandas/algos.pyx":376 * _as = values.argsort(axis=1, kind='mergesort') * if not ascending: * tiebreak = TIEBREAK_FIRST_DESCENDING # <<<<<<<<<<<<<< * else: * _as = values.argsort(1) */ __pyx_v_tiebreak = __pyx_v_6pandas_5algos_TIEBREAK_FIRST_DESCENDING; goto __pyx_L7; } __pyx_L7:; goto __pyx_L6; } /*else*/ { /* "pandas/algos.pyx":378 * tiebreak = TIEBREAK_FIRST_DESCENDING * else: * _as = values.argsort(1) # <<<<<<<<<<<<<< * * if not ascending: */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_values), __pyx_n_s_argsort); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 378; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_10 = PyObject_Call(__pyx_t_2, __pyx_tuple__11, NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 378; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v__as = __pyx_t_10; __pyx_t_10 = 0; } __pyx_L6:; /* "pandas/algos.pyx":380 * _as = values.argsort(1) * * if not ascending: # <<<<<<<<<<<<<< * _as = _as[:, ::-1] * */ __pyx_t_15 = __Pyx_PyObject_IsTrue(__pyx_v_ascending); if (unlikely(__pyx_t_15 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 380; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_4 = ((!__pyx_t_15) != 0); if (__pyx_t_4) { /* "pandas/algos.pyx":381 * * if not ascending: * _as = _as[:, ::-1] # <<<<<<<<<<<<<< * * values = _take_2d_int64(values, _as) */ __pyx_t_10 = PyObject_GetItem(__pyx_v__as, __pyx_tuple__14); if (unlikely(__pyx_t_10 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 381; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF_SET(__pyx_v__as, __pyx_t_10); __pyx_t_10 = 0; goto __pyx_L8; } __pyx_L8:; /* "pandas/algos.pyx":383 * _as = _as[:, ::-1] * * values = _take_2d_int64(values, _as) # <<<<<<<<<<<<<< * argsorted = _as.astype('i8') * */ __pyx_t_10 = __pyx_f_6pandas_5algos__take_2d_int64(((PyArrayObject *)__pyx_v_values), __pyx_v__as); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 383; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); if (!(likely(((__pyx_t_10) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_10, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 383; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_6 = ((PyArrayObject *)__pyx_t_10); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_t_3 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_values.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 1, __pyx_stack); if (unlikely(__pyx_t_3 < 0)) { PyErr_Fetch(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_values.rcbuffer->pybuffer, (PyObject*)__pyx_v_values, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 1, __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_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_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1]; if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 383; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_6 = 0; __Pyx_DECREF_SET(__pyx_v_values, ((PyArrayObject *)__pyx_t_10)); __pyx_t_10 = 0; /* "pandas/algos.pyx":384 * * values = _take_2d_int64(values, _as) * argsorted = _as.astype('i8') # <<<<<<<<<<<<<< * * for i in range(n): */ __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v__as, __pyx_n_s_astype); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 384; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __pyx_t_2 = PyObject_Call(__pyx_t_10, __pyx_tuple__15, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 384; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 384; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_16 = ((PyArrayObject *)__pyx_t_2); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_argsorted.rcbuffer->pybuffer); __pyx_t_3 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_argsorted.rcbuffer->pybuffer, (PyObject*)__pyx_t_16, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack); if (unlikely(__pyx_t_3 < 0)) { PyErr_Fetch(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_argsorted.rcbuffer->pybuffer, (PyObject*)__pyx_v_argsorted, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 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_pybuffernd_argsorted.diminfo[0].strides = __pyx_pybuffernd_argsorted.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_argsorted.diminfo[0].shape = __pyx_pybuffernd_argsorted.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_argsorted.diminfo[1].strides = __pyx_pybuffernd_argsorted.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_argsorted.diminfo[1].shape = __pyx_pybuffernd_argsorted.rcbuffer->pybuffer.shape[1]; if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 384; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_16 = 0; __pyx_v_argsorted = ((PyArrayObject *)__pyx_t_2); __pyx_t_2 = 0; /* "pandas/algos.pyx":386 * argsorted = _as.astype('i8') * * for i in range(n): # <<<<<<<<<<<<<< * dups = sum_ranks = 0 * for j in range(k): */ __pyx_t_13 = __pyx_v_n; for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_13; __pyx_t_12+=1) { __pyx_v_i = __pyx_t_12; /* "pandas/algos.pyx":387 * * for i in range(n): * dups = sum_ranks = 0 # <<<<<<<<<<<<<< * for j in range(k): * sum_ranks += j + 1 */ __pyx_v_dups = 0; __pyx_v_sum_ranks = 0; /* "pandas/algos.pyx":388 * for i in range(n): * dups = sum_ranks = 0 * for j in range(k): # <<<<<<<<<<<<<< * sum_ranks += j + 1 * dups += 1 */ __pyx_t_17 = __pyx_v_k; for (__pyx_t_18 = 0; __pyx_t_18 < __pyx_t_17; __pyx_t_18+=1) { __pyx_v_j = __pyx_t_18; /* "pandas/algos.pyx":389 * dups = sum_ranks = 0 * for j in range(k): * sum_ranks += j + 1 # <<<<<<<<<<<<<< * dups += 1 * val = values[i, j] */ __pyx_v_sum_ranks = (__pyx_v_sum_ranks + (__pyx_v_j + 1)); /* "pandas/algos.pyx":390 * for j in range(k): * sum_ranks += j + 1 * dups += 1 # <<<<<<<<<<<<<< * val = values[i, j] * if j == k - 1 or fabs(values[i, j + 1] - val) > FP_ERR: */ __pyx_v_dups = (__pyx_v_dups + 1); /* "pandas/algos.pyx":391 * sum_ranks += j + 1 * dups += 1 * val = values[i, j] # <<<<<<<<<<<<<< * if j == k - 1 or fabs(values[i, j + 1] - val) > FP_ERR: * if tiebreak == TIEBREAK_AVERAGE: */ __pyx_t_19 = __pyx_v_i; __pyx_t_20 = __pyx_v_j; __pyx_t_3 = -1; if (__pyx_t_19 < 0) { __pyx_t_19 += __pyx_pybuffernd_values.diminfo[0].shape; if (unlikely(__pyx_t_19 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_19 >= __pyx_pybuffernd_values.diminfo[0].shape)) __pyx_t_3 = 0; if (__pyx_t_20 < 0) { __pyx_t_20 += __pyx_pybuffernd_values.diminfo[1].shape; if (unlikely(__pyx_t_20 < 0)) __pyx_t_3 = 1; } else if (unlikely(__pyx_t_20 >= __pyx_pybuffernd_values.diminfo[1].shape)) __pyx_t_3 = 1; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 391; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_val = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_20, __pyx_pybuffernd_values.diminfo[1].strides)); /* "pandas/algos.pyx":392 * dups += 1 * val = values[i, j] * if j == k - 1 or fabs(values[i, j + 1] - val) > FP_ERR: # <<<<<<<<<<<<<< * if tiebreak == TIEBREAK_AVERAGE: * for z in range(j - dups + 1, j + 1): */ __pyx_t_4 = ((__pyx_v_j == (__pyx_v_k - 1)) != 0); if (!__pyx_t_4) { __pyx_t_21 = __pyx_v_i; __pyx_t_22 = (__pyx_v_j + 1); __pyx_t_3 = -1; if (__pyx_t_21 < 0) { __pyx_t_21 += __pyx_pybuffernd_values.diminfo[0].shape; if (unlikely(__pyx_t_21 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_21 >= __pyx_pybuffernd_values.diminfo[0].shape)) __pyx_t_3 = 0; if (__pyx_t_22 < 0) { __pyx_t_22 += __pyx_pybuffernd_values.diminfo[1].shape; if (unlikely(__pyx_t_22 < 0)) __pyx_t_3 = 1; } else if (unlikely(__pyx_t_22 >= __pyx_pybuffernd_values.diminfo[1].shape)) __pyx_t_3 = 1; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 392; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_15 = ((fabs(((*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_22, __pyx_pybuffernd_values.diminfo[1].strides)) - __pyx_v_val)) > __pyx_v_6pandas_5algos_FP_ERR) != 0); __pyx_t_23 = __pyx_t_15; } else { __pyx_t_23 = __pyx_t_4; } if (__pyx_t_23) { /* "pandas/algos.pyx":393 * val = values[i, j] * if j == k - 1 or fabs(values[i, j + 1] - val) > FP_ERR: * if tiebreak == TIEBREAK_AVERAGE: # <<<<<<<<<<<<<< * for z in range(j - dups + 1, j + 1): * ranks[i, argsorted[i, z]] = sum_ranks / dups */ __pyx_t_23 = ((__pyx_v_tiebreak == __pyx_v_6pandas_5algos_TIEBREAK_AVERAGE) != 0); if (__pyx_t_23) { /* "pandas/algos.pyx":394 * if j == k - 1 or fabs(values[i, j + 1] - val) > FP_ERR: * if tiebreak == TIEBREAK_AVERAGE: * for z in range(j - dups + 1, j + 1): # <<<<<<<<<<<<<< * ranks[i, argsorted[i, z]] = sum_ranks / dups * elif tiebreak == TIEBREAK_MIN: */ __pyx_t_24 = (__pyx_v_j + 1); for (__pyx_t_25 = ((__pyx_v_j - __pyx_v_dups) + 1); __pyx_t_25 < __pyx_t_24; __pyx_t_25+=1) { __pyx_v_z = __pyx_t_25; /* "pandas/algos.pyx":395 * if tiebreak == TIEBREAK_AVERAGE: * for z in range(j - dups + 1, j + 1): * ranks[i, argsorted[i, z]] = sum_ranks / dups # <<<<<<<<<<<<<< * elif tiebreak == TIEBREAK_MIN: * for z in range(j - dups + 1, j + 1): */ if (unlikely(__pyx_v_dups == 0)) { #ifdef WITH_THREAD PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure(); #endif PyErr_SetString(PyExc_ZeroDivisionError, "float division"); #ifdef WITH_THREAD PyGILState_Release(__pyx_gilstate_save); #endif {__pyx_filename = __pyx_f[0]; __pyx_lineno = 395; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_26 = __pyx_v_i; __pyx_t_27 = __pyx_v_z; __pyx_t_3 = -1; if (__pyx_t_26 < 0) { __pyx_t_26 += __pyx_pybuffernd_argsorted.diminfo[0].shape; if (unlikely(__pyx_t_26 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_26 >= __pyx_pybuffernd_argsorted.diminfo[0].shape)) __pyx_t_3 = 0; if (__pyx_t_27 < 0) { __pyx_t_27 += __pyx_pybuffernd_argsorted.diminfo[1].shape; if (unlikely(__pyx_t_27 < 0)) __pyx_t_3 = 1; } else if (unlikely(__pyx_t_27 >= __pyx_pybuffernd_argsorted.diminfo[1].shape)) __pyx_t_3 = 1; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 395; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_28 = __pyx_v_i; __pyx_t_29 = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_argsorted.rcbuffer->pybuffer.buf, __pyx_t_26, __pyx_pybuffernd_argsorted.diminfo[0].strides, __pyx_t_27, __pyx_pybuffernd_argsorted.diminfo[1].strides)); __pyx_t_3 = -1; if (__pyx_t_28 < 0) { __pyx_t_28 += __pyx_pybuffernd_ranks.diminfo[0].shape; if (unlikely(__pyx_t_28 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_28 >= __pyx_pybuffernd_ranks.diminfo[0].shape)) __pyx_t_3 = 0; if (__pyx_t_29 < 0) { __pyx_t_29 += __pyx_pybuffernd_ranks.diminfo[1].shape; if (unlikely(__pyx_t_29 < 0)) __pyx_t_3 = 1; } else if (unlikely(__pyx_t_29 >= __pyx_pybuffernd_ranks.diminfo[1].shape)) __pyx_t_3 = 1; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 395; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_ranks.rcbuffer->pybuffer.buf, __pyx_t_28, __pyx_pybuffernd_ranks.diminfo[0].strides, __pyx_t_29, __pyx_pybuffernd_ranks.diminfo[1].strides) = (__pyx_v_sum_ranks / __pyx_v_dups); } goto __pyx_L14; } /* "pandas/algos.pyx":396 * for z in range(j - dups + 1, j + 1): * ranks[i, argsorted[i, z]] = sum_ranks / dups * elif tiebreak == TIEBREAK_MIN: # <<<<<<<<<<<<<< * for z in range(j - dups + 1, j + 1): * ranks[i, argsorted[i, z]] = j - dups + 2 */ __pyx_t_23 = ((__pyx_v_tiebreak == __pyx_v_6pandas_5algos_TIEBREAK_MIN) != 0); if (__pyx_t_23) { /* "pandas/algos.pyx":397 * ranks[i, argsorted[i, z]] = sum_ranks / dups * elif tiebreak == TIEBREAK_MIN: * for z in range(j - dups + 1, j + 1): # <<<<<<<<<<<<<< * ranks[i, argsorted[i, z]] = j - dups + 2 * elif tiebreak == TIEBREAK_MAX: */ __pyx_t_24 = (__pyx_v_j + 1); for (__pyx_t_25 = ((__pyx_v_j - __pyx_v_dups) + 1); __pyx_t_25 < __pyx_t_24; __pyx_t_25+=1) { __pyx_v_z = __pyx_t_25; /* "pandas/algos.pyx":398 * elif tiebreak == TIEBREAK_MIN: * for z in range(j - dups + 1, j + 1): * ranks[i, argsorted[i, z]] = j - dups + 2 # <<<<<<<<<<<<<< * elif tiebreak == TIEBREAK_MAX: * for z in range(j - dups + 1, j + 1): */ __pyx_t_30 = __pyx_v_i; __pyx_t_31 = __pyx_v_z; __pyx_t_3 = -1; if (__pyx_t_30 < 0) { __pyx_t_30 += __pyx_pybuffernd_argsorted.diminfo[0].shape; if (unlikely(__pyx_t_30 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_30 >= __pyx_pybuffernd_argsorted.diminfo[0].shape)) __pyx_t_3 = 0; if (__pyx_t_31 < 0) { __pyx_t_31 += __pyx_pybuffernd_argsorted.diminfo[1].shape; if (unlikely(__pyx_t_31 < 0)) __pyx_t_3 = 1; } else if (unlikely(__pyx_t_31 >= __pyx_pybuffernd_argsorted.diminfo[1].shape)) __pyx_t_3 = 1; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 398; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_32 = __pyx_v_i; __pyx_t_33 = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_argsorted.rcbuffer->pybuffer.buf, __pyx_t_30, __pyx_pybuffernd_argsorted.diminfo[0].strides, __pyx_t_31, __pyx_pybuffernd_argsorted.diminfo[1].strides)); __pyx_t_3 = -1; if (__pyx_t_32 < 0) { __pyx_t_32 += __pyx_pybuffernd_ranks.diminfo[0].shape; if (unlikely(__pyx_t_32 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_32 >= __pyx_pybuffernd_ranks.diminfo[0].shape)) __pyx_t_3 = 0; if (__pyx_t_33 < 0) { __pyx_t_33 += __pyx_pybuffernd_ranks.diminfo[1].shape; if (unlikely(__pyx_t_33 < 0)) __pyx_t_3 = 1; } else if (unlikely(__pyx_t_33 >= __pyx_pybuffernd_ranks.diminfo[1].shape)) __pyx_t_3 = 1; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 398; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_ranks.rcbuffer->pybuffer.buf, __pyx_t_32, __pyx_pybuffernd_ranks.diminfo[0].strides, __pyx_t_33, __pyx_pybuffernd_ranks.diminfo[1].strides) = ((__pyx_v_j - __pyx_v_dups) + 2); } goto __pyx_L14; } /* "pandas/algos.pyx":399 * for z in range(j - dups + 1, j + 1): * ranks[i, argsorted[i, z]] = j - dups + 2 * elif tiebreak == TIEBREAK_MAX: # <<<<<<<<<<<<<< * for z in range(j - dups + 1, j + 1): * ranks[i, argsorted[i, z]] = j + 1 */ __pyx_t_23 = ((__pyx_v_tiebreak == __pyx_v_6pandas_5algos_TIEBREAK_MAX) != 0); if (__pyx_t_23) { /* "pandas/algos.pyx":400 * ranks[i, argsorted[i, z]] = j - dups + 2 * elif tiebreak == TIEBREAK_MAX: * for z in range(j - dups + 1, j + 1): # <<<<<<<<<<<<<< * ranks[i, argsorted[i, z]] = j + 1 * elif tiebreak == TIEBREAK_FIRST: */ __pyx_t_24 = (__pyx_v_j + 1); for (__pyx_t_25 = ((__pyx_v_j - __pyx_v_dups) + 1); __pyx_t_25 < __pyx_t_24; __pyx_t_25+=1) { __pyx_v_z = __pyx_t_25; /* "pandas/algos.pyx":401 * elif tiebreak == TIEBREAK_MAX: * for z in range(j - dups + 1, j + 1): * ranks[i, argsorted[i, z]] = j + 1 # <<<<<<<<<<<<<< * elif tiebreak == TIEBREAK_FIRST: * for z in range(j - dups + 1, j + 1): */ __pyx_t_34 = __pyx_v_i; __pyx_t_35 = __pyx_v_z; __pyx_t_3 = -1; if (__pyx_t_34 < 0) { __pyx_t_34 += __pyx_pybuffernd_argsorted.diminfo[0].shape; if (unlikely(__pyx_t_34 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_34 >= __pyx_pybuffernd_argsorted.diminfo[0].shape)) __pyx_t_3 = 0; if (__pyx_t_35 < 0) { __pyx_t_35 += __pyx_pybuffernd_argsorted.diminfo[1].shape; if (unlikely(__pyx_t_35 < 0)) __pyx_t_3 = 1; } else if (unlikely(__pyx_t_35 >= __pyx_pybuffernd_argsorted.diminfo[1].shape)) __pyx_t_3 = 1; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 401; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_36 = __pyx_v_i; __pyx_t_37 = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_argsorted.rcbuffer->pybuffer.buf, __pyx_t_34, __pyx_pybuffernd_argsorted.diminfo[0].strides, __pyx_t_35, __pyx_pybuffernd_argsorted.diminfo[1].strides)); __pyx_t_3 = -1; if (__pyx_t_36 < 0) { __pyx_t_36 += __pyx_pybuffernd_ranks.diminfo[0].shape; if (unlikely(__pyx_t_36 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_36 >= __pyx_pybuffernd_ranks.diminfo[0].shape)) __pyx_t_3 = 0; if (__pyx_t_37 < 0) { __pyx_t_37 += __pyx_pybuffernd_ranks.diminfo[1].shape; if (unlikely(__pyx_t_37 < 0)) __pyx_t_3 = 1; } else if (unlikely(__pyx_t_37 >= __pyx_pybuffernd_ranks.diminfo[1].shape)) __pyx_t_3 = 1; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 401; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_ranks.rcbuffer->pybuffer.buf, __pyx_t_36, __pyx_pybuffernd_ranks.diminfo[0].strides, __pyx_t_37, __pyx_pybuffernd_ranks.diminfo[1].strides) = (__pyx_v_j + 1); } goto __pyx_L14; } /* "pandas/algos.pyx":402 * for z in range(j - dups + 1, j + 1): * ranks[i, argsorted[i, z]] = j + 1 * elif tiebreak == TIEBREAK_FIRST: # <<<<<<<<<<<<<< * for z in range(j - dups + 1, j + 1): * ranks[i, argsorted[i, z]] = z + 1 */ __pyx_t_23 = ((__pyx_v_tiebreak == __pyx_v_6pandas_5algos_TIEBREAK_FIRST) != 0); if (__pyx_t_23) { /* "pandas/algos.pyx":403 * ranks[i, argsorted[i, z]] = j + 1 * elif tiebreak == TIEBREAK_FIRST: * for z in range(j - dups + 1, j + 1): # <<<<<<<<<<<<<< * ranks[i, argsorted[i, z]] = z + 1 * elif tiebreak == TIEBREAK_FIRST_DESCENDING: */ __pyx_t_24 = (__pyx_v_j + 1); for (__pyx_t_25 = ((__pyx_v_j - __pyx_v_dups) + 1); __pyx_t_25 < __pyx_t_24; __pyx_t_25+=1) { __pyx_v_z = __pyx_t_25; /* "pandas/algos.pyx":404 * elif tiebreak == TIEBREAK_FIRST: * for z in range(j - dups + 1, j + 1): * ranks[i, argsorted[i, z]] = z + 1 # <<<<<<<<<<<<<< * elif tiebreak == TIEBREAK_FIRST_DESCENDING: * for z in range(j - dups + 1, j + 1): */ __pyx_t_38 = __pyx_v_i; __pyx_t_39 = __pyx_v_z; __pyx_t_3 = -1; if (__pyx_t_38 < 0) { __pyx_t_38 += __pyx_pybuffernd_argsorted.diminfo[0].shape; if (unlikely(__pyx_t_38 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_38 >= __pyx_pybuffernd_argsorted.diminfo[0].shape)) __pyx_t_3 = 0; if (__pyx_t_39 < 0) { __pyx_t_39 += __pyx_pybuffernd_argsorted.diminfo[1].shape; if (unlikely(__pyx_t_39 < 0)) __pyx_t_3 = 1; } else if (unlikely(__pyx_t_39 >= __pyx_pybuffernd_argsorted.diminfo[1].shape)) __pyx_t_3 = 1; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 404; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_40 = __pyx_v_i; __pyx_t_41 = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_argsorted.rcbuffer->pybuffer.buf, __pyx_t_38, __pyx_pybuffernd_argsorted.diminfo[0].strides, __pyx_t_39, __pyx_pybuffernd_argsorted.diminfo[1].strides)); __pyx_t_3 = -1; if (__pyx_t_40 < 0) { __pyx_t_40 += __pyx_pybuffernd_ranks.diminfo[0].shape; if (unlikely(__pyx_t_40 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_40 >= __pyx_pybuffernd_ranks.diminfo[0].shape)) __pyx_t_3 = 0; if (__pyx_t_41 < 0) { __pyx_t_41 += __pyx_pybuffernd_ranks.diminfo[1].shape; if (unlikely(__pyx_t_41 < 0)) __pyx_t_3 = 1; } else if (unlikely(__pyx_t_41 >= __pyx_pybuffernd_ranks.diminfo[1].shape)) __pyx_t_3 = 1; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 404; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_ranks.rcbuffer->pybuffer.buf, __pyx_t_40, __pyx_pybuffernd_ranks.diminfo[0].strides, __pyx_t_41, __pyx_pybuffernd_ranks.diminfo[1].strides) = (__pyx_v_z + 1); } goto __pyx_L14; } /* "pandas/algos.pyx":405 * for z in range(j - dups + 1, j + 1): * ranks[i, argsorted[i, z]] = z + 1 * elif tiebreak == TIEBREAK_FIRST_DESCENDING: # <<<<<<<<<<<<<< * for z in range(j - dups + 1, j + 1): * ranks[i, argsorted[i, z]] = 2 * j - z - dups + 2 */ __pyx_t_23 = ((__pyx_v_tiebreak == __pyx_v_6pandas_5algos_TIEBREAK_FIRST_DESCENDING) != 0); if (__pyx_t_23) { /* "pandas/algos.pyx":406 * ranks[i, argsorted[i, z]] = z + 1 * elif tiebreak == TIEBREAK_FIRST_DESCENDING: * for z in range(j - dups + 1, j + 1): # <<<<<<<<<<<<<< * ranks[i, argsorted[i, z]] = 2 * j - z - dups + 2 * sum_ranks = dups = 0 */ __pyx_t_24 = (__pyx_v_j + 1); for (__pyx_t_25 = ((__pyx_v_j - __pyx_v_dups) + 1); __pyx_t_25 < __pyx_t_24; __pyx_t_25+=1) { __pyx_v_z = __pyx_t_25; /* "pandas/algos.pyx":407 * elif tiebreak == TIEBREAK_FIRST_DESCENDING: * for z in range(j - dups + 1, j + 1): * ranks[i, argsorted[i, z]] = 2 * j - z - dups + 2 # <<<<<<<<<<<<<< * sum_ranks = dups = 0 * */ __pyx_t_42 = __pyx_v_i; __pyx_t_43 = __pyx_v_z; __pyx_t_3 = -1; if (__pyx_t_42 < 0) { __pyx_t_42 += __pyx_pybuffernd_argsorted.diminfo[0].shape; if (unlikely(__pyx_t_42 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_42 >= __pyx_pybuffernd_argsorted.diminfo[0].shape)) __pyx_t_3 = 0; if (__pyx_t_43 < 0) { __pyx_t_43 += __pyx_pybuffernd_argsorted.diminfo[1].shape; if (unlikely(__pyx_t_43 < 0)) __pyx_t_3 = 1; } else if (unlikely(__pyx_t_43 >= __pyx_pybuffernd_argsorted.diminfo[1].shape)) __pyx_t_3 = 1; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 407; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_44 = __pyx_v_i; __pyx_t_45 = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_argsorted.rcbuffer->pybuffer.buf, __pyx_t_42, __pyx_pybuffernd_argsorted.diminfo[0].strides, __pyx_t_43, __pyx_pybuffernd_argsorted.diminfo[1].strides)); __pyx_t_3 = -1; if (__pyx_t_44 < 0) { __pyx_t_44 += __pyx_pybuffernd_ranks.diminfo[0].shape; if (unlikely(__pyx_t_44 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_44 >= __pyx_pybuffernd_ranks.diminfo[0].shape)) __pyx_t_3 = 0; if (__pyx_t_45 < 0) { __pyx_t_45 += __pyx_pybuffernd_ranks.diminfo[1].shape; if (unlikely(__pyx_t_45 < 0)) __pyx_t_3 = 1; } else if (unlikely(__pyx_t_45 >= __pyx_pybuffernd_ranks.diminfo[1].shape)) __pyx_t_3 = 1; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 407; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_ranks.rcbuffer->pybuffer.buf, __pyx_t_44, __pyx_pybuffernd_ranks.diminfo[0].strides, __pyx_t_45, __pyx_pybuffernd_ranks.diminfo[1].strides) = ((((2 * __pyx_v_j) - __pyx_v_z) - __pyx_v_dups) + 2); } goto __pyx_L14; } __pyx_L14:; /* "pandas/algos.pyx":408 * for z in range(j - dups + 1, j + 1): * ranks[i, argsorted[i, z]] = 2 * j - z - dups + 2 * sum_ranks = dups = 0 # <<<<<<<<<<<<<< * * if axis == 0: */ __pyx_v_sum_ranks = 0; __pyx_v_dups = 0; goto __pyx_L13; } __pyx_L13:; } } /* "pandas/algos.pyx":410 * sum_ranks = dups = 0 * * if axis == 0: # <<<<<<<<<<<<<< * return ranks.T * else: */ __pyx_t_2 = PyObject_RichCompare(__pyx_v_axis, __pyx_int_0, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 410; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_23 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_23 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 410; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_23) { /* "pandas/algos.pyx":411 * * if axis == 0: * return ranks.T # <<<<<<<<<<<<<< * else: * return ranks */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_ranks), __pyx_n_s_T); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 411; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; } /*else*/ { /* "pandas/algos.pyx":413 * return ranks.T * else: * return ranks # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_ranks)); __pyx_r = ((PyObject *)__pyx_v_ranks); goto __pyx_L0; } /* "pandas/algos.pyx":348 * * * def rank_2d_int64(object in_arr, axis=0, ties_method='average', # <<<<<<<<<<<<<< * ascending=True, na_option='keep'): * """ */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_10); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_argsorted.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_ranks.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.rank_2d_int64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_argsorted.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_ranks.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_ranks); __Pyx_XDECREF((PyObject *)__pyx_v_argsorted); __Pyx_XDECREF((PyObject *)__pyx_v_values); __Pyx_XDECREF(__pyx_v__as); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/algos.pyx":416 * * * def rank_1d_generic(object in_arr, bint retry=1, ties_method='average', # <<<<<<<<<<<<<< * ascending=True, na_option='keep'): * """ */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_9rank_1d_generic(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6pandas_5algos_8rank_1d_generic[] = "\n Fast NaN-friendly version of scipy.stats.rankdata\n "; static PyMethodDef __pyx_mdef_6pandas_5algos_9rank_1d_generic = {__Pyx_NAMESTR("rank_1d_generic"), (PyCFunction)__pyx_pw_6pandas_5algos_9rank_1d_generic, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_5algos_8rank_1d_generic)}; static PyObject *__pyx_pw_6pandas_5algos_9rank_1d_generic(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_in_arr = 0; int __pyx_v_retry; PyObject *__pyx_v_ties_method = 0; PyObject *__pyx_v_ascending = 0; PyObject *__pyx_v_na_option = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("rank_1d_generic (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_in_arr,&__pyx_n_s_retry,&__pyx_n_s_ties_method,&__pyx_n_s_ascending,&__pyx_n_s_na_option,0}; PyObject* values[5] = {0,0,0,0,0}; values[2] = ((PyObject *)__pyx_n_s_average); /* "pandas/algos.pyx":417 * * def rank_1d_generic(object in_arr, bint retry=1, ties_method='average', * ascending=True, na_option='keep'): # <<<<<<<<<<<<<< * """ * Fast NaN-friendly version of scipy.stats.rankdata */ values[3] = ((PyObject *)Py_True); values[4] = ((PyObject *)__pyx_n_s_keep); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_in_arr)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_retry); if (value) { values[1] = value; kw_args--; } } case 2: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ties_method); if (value) { values[2] = value; kw_args--; } } case 3: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ascending); if (value) { values[3] = value; kw_args--; } } case 4: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_na_option); if (value) { values[4] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "rank_1d_generic") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 416; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_in_arr = values[0]; if (values[1]) { __pyx_v_retry = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_retry == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 416; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } else { __pyx_v_retry = ((int)1); } __pyx_v_ties_method = values[2]; __pyx_v_ascending = values[3]; __pyx_v_na_option = values[4]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("rank_1d_generic", 0, 1, 5, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 416; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.rank_1d_generic", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pandas_5algos_8rank_1d_generic(__pyx_self, __pyx_v_in_arr, __pyx_v_retry, __pyx_v_ties_method, __pyx_v_ascending, __pyx_v_na_option); /* "pandas/algos.pyx":416 * * * def rank_1d_generic(object in_arr, bint retry=1, ties_method='average', # <<<<<<<<<<<<<< * ascending=True, na_option='keep'): * """ */ /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5algos_8rank_1d_generic(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_in_arr, int __pyx_v_retry, PyObject *__pyx_v_ties_method, PyObject *__pyx_v_ascending, PyObject *__pyx_v_na_option) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_n; Py_ssize_t __pyx_v_dups; PyArrayObject *__pyx_v_ranks = 0; PyArrayObject *__pyx_v_sorted_data = 0; PyArrayObject *__pyx_v_values = 0; PyArrayObject *__pyx_v_argsorted = 0; PyObject *__pyx_v_val = 0; PyObject *__pyx_v_nan_value = 0; __pyx_t_5numpy_float64_t __pyx_v_sum_ranks; int __pyx_v_tiebreak; int __pyx_v_keep_na; PyObject *__pyx_v_mask = NULL; PyObject *__pyx_v__as = NULL; PyObject *__pyx_v_valid_locs = NULL; __Pyx_LocalBuf_ND __pyx_pybuffernd_argsorted; __Pyx_Buffer __pyx_pybuffer_argsorted; __Pyx_LocalBuf_ND __pyx_pybuffernd_ranks; __Pyx_Buffer __pyx_pybuffer_ranks; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_t_3; int __pyx_t_4; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; Py_ssize_t __pyx_t_7; PyArrayObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; PyObject *__pyx_t_11 = NULL; PyObject *__pyx_t_12 = NULL; PyObject *__pyx_t_13 = NULL; PyObject *__pyx_t_14 = NULL; PyObject *__pyx_t_15 = NULL; int __pyx_t_16; PyArrayObject *__pyx_t_17 = NULL; Py_ssize_t __pyx_t_18; Py_ssize_t __pyx_t_19; __pyx_t_5numpy_int64_t __pyx_t_20; int __pyx_t_21; Py_ssize_t __pyx_t_22; Py_ssize_t __pyx_t_23; Py_ssize_t __pyx_t_24; __pyx_t_5numpy_int64_t __pyx_t_25; Py_ssize_t __pyx_t_26; __pyx_t_5numpy_int64_t __pyx_t_27; Py_ssize_t __pyx_t_28; __pyx_t_5numpy_int64_t __pyx_t_29; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("rank_1d_generic", 0); __pyx_pybuffer_ranks.pybuffer.buf = NULL; __pyx_pybuffer_ranks.refcount = 0; __pyx_pybuffernd_ranks.data = NULL; __pyx_pybuffernd_ranks.rcbuffer = &__pyx_pybuffer_ranks; __pyx_pybuffer_argsorted.pybuffer.buf = NULL; __pyx_pybuffer_argsorted.refcount = 0; __pyx_pybuffernd_argsorted.data = NULL; __pyx_pybuffernd_argsorted.rcbuffer = &__pyx_pybuffer_argsorted; /* "pandas/algos.pyx":423 * * cdef: * Py_ssize_t i, j, n, dups = 0 # <<<<<<<<<<<<<< * ndarray[float64_t] ranks * ndarray sorted_data, values */ __pyx_v_dups = 0; /* "pandas/algos.pyx":428 * ndarray[int64_t] argsorted * object val, nan_value * float64_t sum_ranks = 0 # <<<<<<<<<<<<<< * int tiebreak = 0 * bint keep_na = 0 */ __pyx_v_sum_ranks = 0.0; /* "pandas/algos.pyx":429 * object val, nan_value * float64_t sum_ranks = 0 * int tiebreak = 0 # <<<<<<<<<<<<<< * bint keep_na = 0 * */ __pyx_v_tiebreak = 0; /* "pandas/algos.pyx":430 * float64_t sum_ranks = 0 * int tiebreak = 0 * bint keep_na = 0 # <<<<<<<<<<<<<< * * tiebreak = tiebreakers[ties_method] */ __pyx_v_keep_na = 0; /* "pandas/algos.pyx":432 * bint keep_na = 0 * * tiebreak = tiebreakers[ties_method] # <<<<<<<<<<<<<< * * keep_na = na_option == 'keep' */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_tiebreakers); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 432; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyObject_GetItem(__pyx_t_1, __pyx_v_ties_method); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 432; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 432; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_tiebreak = __pyx_t_3; /* "pandas/algos.pyx":434 * tiebreak = tiebreakers[ties_method] * * keep_na = na_option == 'keep' # <<<<<<<<<<<<<< * * values = np.array(in_arr, copy=True) */ __pyx_t_2 = PyObject_RichCompare(__pyx_v_na_option, __pyx_n_s_keep, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 434; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 434; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_keep_na = __pyx_t_4; /* "pandas/algos.pyx":436 * keep_na = na_option == 'keep' * * values = np.array(in_arr, copy=True) # <<<<<<<<<<<<<< * * if values.dtype != np.object_: */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 436; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_array); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 436; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 436; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_in_arr); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_in_arr); __Pyx_GIVEREF(__pyx_v_in_arr); __pyx_t_5 = PyDict_New(); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 436; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_copy, Py_True) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 436; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_6 = PyObject_Call(__pyx_t_1, __pyx_t_2, __pyx_t_5); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 436; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 436; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_values = ((PyArrayObject *)__pyx_t_6); __pyx_t_6 = 0; /* "pandas/algos.pyx":438 * values = np.array(in_arr, copy=True) * * if values.dtype != np.object_: # <<<<<<<<<<<<<< * values = values.astype('O') * */ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_values), __pyx_n_s_dtype); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 438; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 438; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_object_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 438; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyObject_RichCompare(__pyx_t_6, __pyx_t_2, Py_NE); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 438; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 438; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_4) { /* "pandas/algos.pyx":439 * * if values.dtype != np.object_: * values = values.astype('O') # <<<<<<<<<<<<<< * * if ascending ^ (na_option == 'top'): */ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_values), __pyx_n_s_astype); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 439; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_2 = PyObject_Call(__pyx_t_5, __pyx_tuple__16, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 439; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 439; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF_SET(__pyx_v_values, ((PyArrayObject *)__pyx_t_2)); __pyx_t_2 = 0; goto __pyx_L3; } __pyx_L3:; /* "pandas/algos.pyx":441 * values = values.astype('O') * * if ascending ^ (na_option == 'top'): # <<<<<<<<<<<<<< * # always greater than everything * nan_value = Infinity() */ __pyx_t_2 = PyObject_RichCompare(__pyx_v_na_option, __pyx_n_s_top, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 441; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_5 = PyNumber_Xor(__pyx_v_ascending, __pyx_t_2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 441; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 441; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_4) { /* "pandas/algos.pyx":443 * if ascending ^ (na_option == 'top'): * # always greater than everything * nan_value = Infinity() # <<<<<<<<<<<<<< * else: * nan_value = NegInfinity() */ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_Infinity); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 443; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_2 = PyObject_Call(__pyx_t_5, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 443; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_v_nan_value = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L4; } /*else*/ { /* "pandas/algos.pyx":445 * nan_value = Infinity() * else: * nan_value = NegInfinity() # <<<<<<<<<<<<<< * * mask = lib.isnullobj(values) */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_NegInfinity); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 445; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = PyObject_Call(__pyx_t_2, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 445; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_nan_value = __pyx_t_5; __pyx_t_5 = 0; } __pyx_L4:; /* "pandas/algos.pyx":447 * nan_value = NegInfinity() * * mask = lib.isnullobj(values) # <<<<<<<<<<<<<< * np.putmask(values, mask, nan_value) * */ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_lib); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 447; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_isnullobj); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 447; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 447; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(((PyObject *)__pyx_v_values)); PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_v_values)); __Pyx_GIVEREF(((PyObject *)__pyx_v_values)); __pyx_t_6 = PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 447; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_v_mask = __pyx_t_6; __pyx_t_6 = 0; /* "pandas/algos.pyx":448 * * mask = lib.isnullobj(values) * np.putmask(values, mask, nan_value) # <<<<<<<<<<<<<< * * n = len(values) */ __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 448; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_putmask); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 448; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 448; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(((PyObject *)__pyx_v_values)); PyTuple_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_v_values)); __Pyx_GIVEREF(((PyObject *)__pyx_v_values)); __Pyx_INCREF(__pyx_v_mask); PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_v_mask); __Pyx_GIVEREF(__pyx_v_mask); __Pyx_INCREF(__pyx_v_nan_value); PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_v_nan_value); __Pyx_GIVEREF(__pyx_v_nan_value); __pyx_t_2 = PyObject_Call(__pyx_t_5, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 448; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/algos.pyx":450 * np.putmask(values, mask, nan_value) * * n = len(values) # <<<<<<<<<<<<<< * ranks = np.empty(n, dtype='f8') * */ __pyx_t_7 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 450; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_7; /* "pandas/algos.pyx":451 * * n = len(values) * ranks = np.empty(n, dtype='f8') # <<<<<<<<<<<<<< * * # py2.5/win32 hack, can't pass i8 */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 451; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_empty); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 451; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_n); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 451; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 451; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 451; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_dtype, __pyx_n_s_f8) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 451; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_1 = PyObject_Call(__pyx_t_6, __pyx_t_5, __pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 451; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 451; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_8 = ((PyArrayObject *)__pyx_t_1); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_ranks.rcbuffer->pybuffer); __pyx_t_3 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_ranks.rcbuffer->pybuffer, (PyObject*)__pyx_t_8, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_3 < 0)) { PyErr_Fetch(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_ranks.rcbuffer->pybuffer, (PyObject*)__pyx_v_ranks, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_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_pybuffernd_ranks.diminfo[0].strides = __pyx_pybuffernd_ranks.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_ranks.diminfo[0].shape = __pyx_pybuffernd_ranks.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 451; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_8 = 0; __pyx_v_ranks = ((PyArrayObject *)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/algos.pyx":454 * * # py2.5/win32 hack, can't pass i8 * try: # <<<<<<<<<<<<<< * _as = values.argsort() * except TypeError: */ { __Pyx_ExceptionSave(&__pyx_t_11, &__pyx_t_10, &__pyx_t_9); __Pyx_XGOTREF(__pyx_t_11); __Pyx_XGOTREF(__pyx_t_10); __Pyx_XGOTREF(__pyx_t_9); /*try:*/ { /* "pandas/algos.pyx":455 * # py2.5/win32 hack, can't pass i8 * try: * _as = values.argsort() # <<<<<<<<<<<<<< * except TypeError: * if not retry: */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_values), __pyx_n_s_argsort); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 455; __pyx_clineno = __LINE__; goto __pyx_L5_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyObject_Call(__pyx_t_1, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 455; __pyx_clineno = __LINE__; goto __pyx_L5_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v__as = __pyx_t_2; __pyx_t_2 = 0; } __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; goto __pyx_L12_try_end; __pyx_L5_error:; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/algos.pyx":456 * try: * _as = values.argsort() * except TypeError: # <<<<<<<<<<<<<< * if not retry: * raise */ __pyx_t_3 = PyErr_ExceptionMatches(__pyx_builtin_TypeError); if (__pyx_t_3) { __Pyx_AddTraceback("pandas.algos.rank_1d_generic", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_1, &__pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 456; __pyx_clineno = __LINE__; goto __pyx_L7_except_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_GOTREF(__pyx_t_1); __Pyx_GOTREF(__pyx_t_5); /* "pandas/algos.pyx":457 * _as = values.argsort() * except TypeError: * if not retry: # <<<<<<<<<<<<<< * raise * */ __pyx_t_4 = ((!(__pyx_v_retry != 0)) != 0); if (__pyx_t_4) { /* "pandas/algos.pyx":458 * except TypeError: * if not retry: * raise # <<<<<<<<<<<<<< * * valid_locs = (-mask).nonzero()[0] */ __Pyx_GIVEREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_5); __Pyx_ErrRestore(__pyx_t_2, __pyx_t_1, __pyx_t_5); __pyx_t_2 = 0; __pyx_t_1 = 0; __pyx_t_5 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 458; __pyx_clineno = __LINE__; goto __pyx_L7_except_error;} } /* "pandas/algos.pyx":460 * raise * * valid_locs = (-mask).nonzero()[0] # <<<<<<<<<<<<<< * ranks.put(valid_locs, rank_1d_generic(values.take(valid_locs), 0, * ties_method=ties_method, */ __pyx_t_6 = PyNumber_Negative(__pyx_v_mask); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 460; __pyx_clineno = __LINE__; goto __pyx_L7_except_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_nonzero); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 460; __pyx_clineno = __LINE__; goto __pyx_L7_except_error;} __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyObject_Call(__pyx_t_12, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 460; __pyx_clineno = __LINE__; goto __pyx_L7_except_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __pyx_t_12 = __Pyx_GetItemInt(__pyx_t_6, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_12 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 460; __pyx_clineno = __LINE__; goto __pyx_L7_except_error;}; __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_v_valid_locs = __pyx_t_12; __pyx_t_12 = 0; /* "pandas/algos.pyx":461 * * valid_locs = (-mask).nonzero()[0] * ranks.put(valid_locs, rank_1d_generic(values.take(valid_locs), 0, # <<<<<<<<<<<<<< * ties_method=ties_method, * ascending=ascending)) */ __pyx_t_12 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_ranks), __pyx_n_s_put); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 461; __pyx_clineno = __LINE__; goto __pyx_L7_except_error;} __Pyx_GOTREF(__pyx_t_12); __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_rank_1d_generic); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 461; __pyx_clineno = __LINE__; goto __pyx_L7_except_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_13 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_values), __pyx_n_s_take); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 461; __pyx_clineno = __LINE__; goto __pyx_L7_except_error;} __Pyx_GOTREF(__pyx_t_13); __pyx_t_14 = PyTuple_New(1); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 461; __pyx_clineno = __LINE__; goto __pyx_L7_except_error;} __Pyx_GOTREF(__pyx_t_14); __Pyx_INCREF(__pyx_v_valid_locs); PyTuple_SET_ITEM(__pyx_t_14, 0, __pyx_v_valid_locs); __Pyx_GIVEREF(__pyx_v_valid_locs); __pyx_t_15 = PyObject_Call(__pyx_t_13, __pyx_t_14, NULL); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 461; __pyx_clineno = __LINE__; goto __pyx_L7_except_error;} __Pyx_GOTREF(__pyx_t_15); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; __pyx_t_14 = PyTuple_New(2); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 461; __pyx_clineno = __LINE__; goto __pyx_L7_except_error;} __Pyx_GOTREF(__pyx_t_14); PyTuple_SET_ITEM(__pyx_t_14, 0, __pyx_t_15); __Pyx_GIVEREF(__pyx_t_15); __Pyx_INCREF(__pyx_int_0); PyTuple_SET_ITEM(__pyx_t_14, 1, __pyx_int_0); __Pyx_GIVEREF(__pyx_int_0); __pyx_t_15 = 0; __pyx_t_15 = PyDict_New(); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 461; __pyx_clineno = __LINE__; goto __pyx_L7_except_error;} __Pyx_GOTREF(__pyx_t_15); /* "pandas/algos.pyx":462 * valid_locs = (-mask).nonzero()[0] * ranks.put(valid_locs, rank_1d_generic(values.take(valid_locs), 0, * ties_method=ties_method, # <<<<<<<<<<<<<< * ascending=ascending)) * np.putmask(ranks, mask, np.nan) */ if (PyDict_SetItem(__pyx_t_15, __pyx_n_s_ties_method, __pyx_v_ties_method) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 461; __pyx_clineno = __LINE__; goto __pyx_L7_except_error;} /* "pandas/algos.pyx":463 * ranks.put(valid_locs, rank_1d_generic(values.take(valid_locs), 0, * ties_method=ties_method, * ascending=ascending)) # <<<<<<<<<<<<<< * np.putmask(ranks, mask, np.nan) * return ranks */ if (PyDict_SetItem(__pyx_t_15, __pyx_n_s_ascending, __pyx_v_ascending) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 461; __pyx_clineno = __LINE__; goto __pyx_L7_except_error;} /* "pandas/algos.pyx":461 * * valid_locs = (-mask).nonzero()[0] * ranks.put(valid_locs, rank_1d_generic(values.take(valid_locs), 0, # <<<<<<<<<<<<<< * ties_method=ties_method, * ascending=ascending)) */ __pyx_t_13 = PyObject_Call(__pyx_t_6, __pyx_t_14, __pyx_t_15); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 461; __pyx_clineno = __LINE__; goto __pyx_L7_except_error;} __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; __pyx_t_15 = PyTuple_New(2); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 461; __pyx_clineno = __LINE__; goto __pyx_L7_except_error;} __Pyx_GOTREF(__pyx_t_15); __Pyx_INCREF(__pyx_v_valid_locs); PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_v_valid_locs); __Pyx_GIVEREF(__pyx_v_valid_locs); PyTuple_SET_ITEM(__pyx_t_15, 1, __pyx_t_13); __Pyx_GIVEREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_13 = PyObject_Call(__pyx_t_12, __pyx_t_15, NULL); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 461; __pyx_clineno = __LINE__; goto __pyx_L7_except_error;} __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; /* "pandas/algos.pyx":464 * ties_method=ties_method, * ascending=ascending)) * np.putmask(ranks, mask, np.nan) # <<<<<<<<<<<<<< * return ranks * */ __pyx_t_13 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 464; __pyx_clineno = __LINE__; goto __pyx_L7_except_error;} __Pyx_GOTREF(__pyx_t_13); __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_t_13, __pyx_n_s_putmask); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 464; __pyx_clineno = __LINE__; goto __pyx_L7_except_error;} __Pyx_GOTREF(__pyx_t_15); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_13 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 464; __pyx_clineno = __LINE__; goto __pyx_L7_except_error;} __Pyx_GOTREF(__pyx_t_13); __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_13, __pyx_n_s_nan); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 464; __pyx_clineno = __LINE__; goto __pyx_L7_except_error;} __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_13 = PyTuple_New(3); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 464; __pyx_clineno = __LINE__; goto __pyx_L7_except_error;} __Pyx_GOTREF(__pyx_t_13); __Pyx_INCREF(((PyObject *)__pyx_v_ranks)); PyTuple_SET_ITEM(__pyx_t_13, 0, ((PyObject *)__pyx_v_ranks)); __Pyx_GIVEREF(((PyObject *)__pyx_v_ranks)); __Pyx_INCREF(__pyx_v_mask); PyTuple_SET_ITEM(__pyx_t_13, 1, __pyx_v_mask); __Pyx_GIVEREF(__pyx_v_mask); PyTuple_SET_ITEM(__pyx_t_13, 2, __pyx_t_12); __Pyx_GIVEREF(__pyx_t_12); __pyx_t_12 = 0; __pyx_t_12 = PyObject_Call(__pyx_t_15, __pyx_t_13, NULL); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 464; __pyx_clineno = __LINE__; goto __pyx_L7_except_error;} __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; /* "pandas/algos.pyx":465 * ascending=ascending)) * np.putmask(ranks, mask, np.nan) * return ranks # <<<<<<<<<<<<<< * * if not ascending: */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_ranks)); __pyx_r = ((PyObject *)__pyx_v_ranks); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; goto __pyx_L8_except_return; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; goto __pyx_L6_exception_handled; } goto __pyx_L7_except_error; __pyx_L7_except_error:; __Pyx_XGIVEREF(__pyx_t_11); __Pyx_XGIVEREF(__pyx_t_10); __Pyx_XGIVEREF(__pyx_t_9); __Pyx_ExceptionReset(__pyx_t_11, __pyx_t_10, __pyx_t_9); goto __pyx_L1_error; __pyx_L8_except_return:; __Pyx_XGIVEREF(__pyx_t_11); __Pyx_XGIVEREF(__pyx_t_10); __Pyx_XGIVEREF(__pyx_t_9); __Pyx_ExceptionReset(__pyx_t_11, __pyx_t_10, __pyx_t_9); goto __pyx_L0; __pyx_L6_exception_handled:; __Pyx_XGIVEREF(__pyx_t_11); __Pyx_XGIVEREF(__pyx_t_10); __Pyx_XGIVEREF(__pyx_t_9); __Pyx_ExceptionReset(__pyx_t_11, __pyx_t_10, __pyx_t_9); __pyx_L12_try_end:; } /* "pandas/algos.pyx":467 * return ranks * * if not ascending: # <<<<<<<<<<<<<< * _as = _as[::-1] * */ __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_ascending); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 467; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_16 = ((!__pyx_t_4) != 0); if (__pyx_t_16) { /* "pandas/algos.pyx":468 * * if not ascending: * _as = _as[::-1] # <<<<<<<<<<<<<< * * sorted_data = values.take(_as) */ __pyx_t_5 = PyObject_GetItem(__pyx_v__as, __pyx_slice__17); if (unlikely(__pyx_t_5 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 468; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF_SET(__pyx_v__as, __pyx_t_5); __pyx_t_5 = 0; goto __pyx_L16; } __pyx_L16:; /* "pandas/algos.pyx":470 * _as = _as[::-1] * * sorted_data = values.take(_as) # <<<<<<<<<<<<<< * argsorted = _as.astype('i8') * */ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_values), __pyx_n_s_take); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 470; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 470; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v__as); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v__as); __Pyx_GIVEREF(__pyx_v__as); __pyx_t_2 = PyObject_Call(__pyx_t_5, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 470; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 470; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_sorted_data = ((PyArrayObject *)__pyx_t_2); __pyx_t_2 = 0; /* "pandas/algos.pyx":471 * * sorted_data = values.take(_as) * argsorted = _as.astype('i8') # <<<<<<<<<<<<<< * * for i in range(n): */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v__as, __pyx_n_s_astype); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 471; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = PyObject_Call(__pyx_t_2, __pyx_tuple__18, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 471; __pyx_clineno = __LINE__; goto __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_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 471; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_17 = ((PyArrayObject *)__pyx_t_1); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_argsorted.rcbuffer->pybuffer); __pyx_t_3 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_argsorted.rcbuffer->pybuffer, (PyObject*)__pyx_t_17, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_3 < 0)) { PyErr_Fetch(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_argsorted.rcbuffer->pybuffer, (PyObject*)__pyx_v_argsorted, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_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_pybuffernd_argsorted.diminfo[0].strides = __pyx_pybuffernd_argsorted.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_argsorted.diminfo[0].shape = __pyx_pybuffernd_argsorted.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 471; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_17 = 0; __pyx_v_argsorted = ((PyArrayObject *)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/algos.pyx":473 * argsorted = _as.astype('i8') * * for i in range(n): # <<<<<<<<<<<<<< * sum_ranks += i + 1 * dups += 1 */ __pyx_t_7 = __pyx_v_n; for (__pyx_t_18 = 0; __pyx_t_18 < __pyx_t_7; __pyx_t_18+=1) { __pyx_v_i = __pyx_t_18; /* "pandas/algos.pyx":474 * * for i in range(n): * sum_ranks += i + 1 # <<<<<<<<<<<<<< * dups += 1 * val = util.get_value_at(sorted_data, i) */ __pyx_v_sum_ranks = (__pyx_v_sum_ranks + (__pyx_v_i + 1)); /* "pandas/algos.pyx":475 * for i in range(n): * sum_ranks += i + 1 * dups += 1 # <<<<<<<<<<<<<< * val = util.get_value_at(sorted_data, i) * if val is nan_value and keep_na: */ __pyx_v_dups = (__pyx_v_dups + 1); /* "pandas/algos.pyx":476 * sum_ranks += i + 1 * dups += 1 * val = util.get_value_at(sorted_data, i) # <<<<<<<<<<<<<< * if val is nan_value and keep_na: * ranks[argsorted[i]] = nan */ __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_i); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 476; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __pyx_f_4util_get_value_at(__pyx_v_sorted_data, __pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 476; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF_SET(__pyx_v_val, __pyx_t_2); __pyx_t_2 = 0; /* "pandas/algos.pyx":477 * dups += 1 * val = util.get_value_at(sorted_data, i) * if val is nan_value and keep_na: # <<<<<<<<<<<<<< * ranks[argsorted[i]] = nan * continue */ __pyx_t_16 = (__pyx_v_val == __pyx_v_nan_value); if ((__pyx_t_16 != 0)) { __pyx_t_4 = (__pyx_v_keep_na != 0); } else { __pyx_t_4 = (__pyx_t_16 != 0); } if (__pyx_t_4) { /* "pandas/algos.pyx":478 * val = util.get_value_at(sorted_data, i) * if val is nan_value and keep_na: * ranks[argsorted[i]] = nan # <<<<<<<<<<<<<< * continue * if (i == n - 1 or */ __pyx_t_19 = __pyx_v_i; __pyx_t_3 = -1; if (__pyx_t_19 < 0) { __pyx_t_19 += __pyx_pybuffernd_argsorted.diminfo[0].shape; if (unlikely(__pyx_t_19 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_19 >= __pyx_pybuffernd_argsorted.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 478; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_20 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_argsorted.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_argsorted.diminfo[0].strides)); __pyx_t_3 = -1; if (__pyx_t_20 < 0) { __pyx_t_20 += __pyx_pybuffernd_ranks.diminfo[0].shape; if (unlikely(__pyx_t_20 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_20 >= __pyx_pybuffernd_ranks.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 478; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_ranks.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_ranks.diminfo[0].strides) = __pyx_v_6pandas_5algos_nan; /* "pandas/algos.pyx":479 * if val is nan_value and keep_na: * ranks[argsorted[i]] = nan * continue # <<<<<<<<<<<<<< * if (i == n - 1 or * are_diff(util.get_value_at(sorted_data, i + 1), val)): */ goto __pyx_L17_continue; } /* "pandas/algos.pyx":480 * ranks[argsorted[i]] = nan * continue * if (i == n - 1 or # <<<<<<<<<<<<<< * are_diff(util.get_value_at(sorted_data, i + 1), val)): * if tiebreak == TIEBREAK_AVERAGE: */ __pyx_t_4 = (__pyx_v_i == (__pyx_v_n - 1)); if (!__pyx_t_4) { /* "pandas/algos.pyx":481 * continue * if (i == n - 1 or * are_diff(util.get_value_at(sorted_data, i + 1), val)): # <<<<<<<<<<<<<< * if tiebreak == TIEBREAK_AVERAGE: * for j in range(i - dups + 1, i + 1): */ __pyx_t_2 = PyInt_FromSsize_t((__pyx_v_i + 1)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 481; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __pyx_f_4util_get_value_at(__pyx_v_sorted_data, __pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 481; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __pyx_f_6pandas_5algos_are_diff(__pyx_t_1, __pyx_v_val); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 481; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_16 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_16 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 481; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_21 = __pyx_t_16; } else { __pyx_t_21 = __pyx_t_4; } if (__pyx_t_21) { /* "pandas/algos.pyx":482 * if (i == n - 1 or * are_diff(util.get_value_at(sorted_data, i + 1), val)): * if tiebreak == TIEBREAK_AVERAGE: # <<<<<<<<<<<<<< * for j in range(i - dups + 1, i + 1): * ranks[argsorted[j]] = sum_ranks / dups */ __pyx_t_21 = ((__pyx_v_tiebreak == __pyx_v_6pandas_5algos_TIEBREAK_AVERAGE) != 0); if (__pyx_t_21) { /* "pandas/algos.pyx":483 * are_diff(util.get_value_at(sorted_data, i + 1), val)): * if tiebreak == TIEBREAK_AVERAGE: * for j in range(i - dups + 1, i + 1): # <<<<<<<<<<<<<< * ranks[argsorted[j]] = sum_ranks / dups * elif tiebreak == TIEBREAK_MIN: */ __pyx_t_22 = (__pyx_v_i + 1); for (__pyx_t_23 = ((__pyx_v_i - __pyx_v_dups) + 1); __pyx_t_23 < __pyx_t_22; __pyx_t_23+=1) { __pyx_v_j = __pyx_t_23; /* "pandas/algos.pyx":484 * if tiebreak == TIEBREAK_AVERAGE: * for j in range(i - dups + 1, i + 1): * ranks[argsorted[j]] = sum_ranks / dups # <<<<<<<<<<<<<< * elif tiebreak == TIEBREAK_MIN: * for j in range(i - dups + 1, i + 1): */ if (unlikely(__pyx_v_dups == 0)) { #ifdef WITH_THREAD PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure(); #endif PyErr_SetString(PyExc_ZeroDivisionError, "float division"); #ifdef WITH_THREAD PyGILState_Release(__pyx_gilstate_save); #endif {__pyx_filename = __pyx_f[0]; __pyx_lineno = 484; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_24 = __pyx_v_j; __pyx_t_3 = -1; if (__pyx_t_24 < 0) { __pyx_t_24 += __pyx_pybuffernd_argsorted.diminfo[0].shape; if (unlikely(__pyx_t_24 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_24 >= __pyx_pybuffernd_argsorted.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 484; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_25 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_argsorted.rcbuffer->pybuffer.buf, __pyx_t_24, __pyx_pybuffernd_argsorted.diminfo[0].strides)); __pyx_t_3 = -1; if (__pyx_t_25 < 0) { __pyx_t_25 += __pyx_pybuffernd_ranks.diminfo[0].shape; if (unlikely(__pyx_t_25 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_25 >= __pyx_pybuffernd_ranks.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 484; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_ranks.rcbuffer->pybuffer.buf, __pyx_t_25, __pyx_pybuffernd_ranks.diminfo[0].strides) = (__pyx_v_sum_ranks / __pyx_v_dups); } goto __pyx_L21; } /* "pandas/algos.pyx":485 * for j in range(i - dups + 1, i + 1): * ranks[argsorted[j]] = sum_ranks / dups * elif tiebreak == TIEBREAK_MIN: # <<<<<<<<<<<<<< * for j in range(i - dups + 1, i + 1): * ranks[argsorted[j]] = i - dups + 2 */ __pyx_t_21 = ((__pyx_v_tiebreak == __pyx_v_6pandas_5algos_TIEBREAK_MIN) != 0); if (__pyx_t_21) { /* "pandas/algos.pyx":486 * ranks[argsorted[j]] = sum_ranks / dups * elif tiebreak == TIEBREAK_MIN: * for j in range(i - dups + 1, i + 1): # <<<<<<<<<<<<<< * ranks[argsorted[j]] = i - dups + 2 * elif tiebreak == TIEBREAK_MAX: */ __pyx_t_22 = (__pyx_v_i + 1); for (__pyx_t_23 = ((__pyx_v_i - __pyx_v_dups) + 1); __pyx_t_23 < __pyx_t_22; __pyx_t_23+=1) { __pyx_v_j = __pyx_t_23; /* "pandas/algos.pyx":487 * elif tiebreak == TIEBREAK_MIN: * for j in range(i - dups + 1, i + 1): * ranks[argsorted[j]] = i - dups + 2 # <<<<<<<<<<<<<< * elif tiebreak == TIEBREAK_MAX: * for j in range(i - dups + 1, i + 1): */ __pyx_t_26 = __pyx_v_j; __pyx_t_3 = -1; if (__pyx_t_26 < 0) { __pyx_t_26 += __pyx_pybuffernd_argsorted.diminfo[0].shape; if (unlikely(__pyx_t_26 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_26 >= __pyx_pybuffernd_argsorted.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 487; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_27 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_argsorted.rcbuffer->pybuffer.buf, __pyx_t_26, __pyx_pybuffernd_argsorted.diminfo[0].strides)); __pyx_t_3 = -1; if (__pyx_t_27 < 0) { __pyx_t_27 += __pyx_pybuffernd_ranks.diminfo[0].shape; if (unlikely(__pyx_t_27 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_27 >= __pyx_pybuffernd_ranks.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 487; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_ranks.rcbuffer->pybuffer.buf, __pyx_t_27, __pyx_pybuffernd_ranks.diminfo[0].strides) = ((__pyx_v_i - __pyx_v_dups) + 2); } goto __pyx_L21; } /* "pandas/algos.pyx":488 * for j in range(i - dups + 1, i + 1): * ranks[argsorted[j]] = i - dups + 2 * elif tiebreak == TIEBREAK_MAX: # <<<<<<<<<<<<<< * for j in range(i - dups + 1, i + 1): * ranks[argsorted[j]] = i + 1 */ __pyx_t_21 = ((__pyx_v_tiebreak == __pyx_v_6pandas_5algos_TIEBREAK_MAX) != 0); if (__pyx_t_21) { /* "pandas/algos.pyx":489 * ranks[argsorted[j]] = i - dups + 2 * elif tiebreak == TIEBREAK_MAX: * for j in range(i - dups + 1, i + 1): # <<<<<<<<<<<<<< * ranks[argsorted[j]] = i + 1 * elif tiebreak == TIEBREAK_FIRST: */ __pyx_t_22 = (__pyx_v_i + 1); for (__pyx_t_23 = ((__pyx_v_i - __pyx_v_dups) + 1); __pyx_t_23 < __pyx_t_22; __pyx_t_23+=1) { __pyx_v_j = __pyx_t_23; /* "pandas/algos.pyx":490 * elif tiebreak == TIEBREAK_MAX: * for j in range(i - dups + 1, i + 1): * ranks[argsorted[j]] = i + 1 # <<<<<<<<<<<<<< * elif tiebreak == TIEBREAK_FIRST: * raise ValueError('first not supported for non-numeric data') */ __pyx_t_28 = __pyx_v_j; __pyx_t_3 = -1; if (__pyx_t_28 < 0) { __pyx_t_28 += __pyx_pybuffernd_argsorted.diminfo[0].shape; if (unlikely(__pyx_t_28 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_28 >= __pyx_pybuffernd_argsorted.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 490; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_29 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_argsorted.rcbuffer->pybuffer.buf, __pyx_t_28, __pyx_pybuffernd_argsorted.diminfo[0].strides)); __pyx_t_3 = -1; if (__pyx_t_29 < 0) { __pyx_t_29 += __pyx_pybuffernd_ranks.diminfo[0].shape; if (unlikely(__pyx_t_29 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_29 >= __pyx_pybuffernd_ranks.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 490; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_ranks.rcbuffer->pybuffer.buf, __pyx_t_29, __pyx_pybuffernd_ranks.diminfo[0].strides) = (__pyx_v_i + 1); } goto __pyx_L21; } /* "pandas/algos.pyx":491 * for j in range(i - dups + 1, i + 1): * ranks[argsorted[j]] = i + 1 * elif tiebreak == TIEBREAK_FIRST: # <<<<<<<<<<<<<< * raise ValueError('first not supported for non-numeric data') * sum_ranks = dups = 0 */ __pyx_t_21 = ((__pyx_v_tiebreak == __pyx_v_6pandas_5algos_TIEBREAK_FIRST) != 0); if (__pyx_t_21) { /* "pandas/algos.pyx":492 * ranks[argsorted[j]] = i + 1 * elif tiebreak == TIEBREAK_FIRST: * raise ValueError('first not supported for non-numeric data') # <<<<<<<<<<<<<< * sum_ranks = dups = 0 * return ranks */ __pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__19, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 492; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 492; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_L21:; /* "pandas/algos.pyx":493 * elif tiebreak == TIEBREAK_FIRST: * raise ValueError('first not supported for non-numeric data') * sum_ranks = dups = 0 # <<<<<<<<<<<<<< * return ranks * */ __pyx_v_sum_ranks = 0; __pyx_v_dups = 0; goto __pyx_L20; } __pyx_L20:; __pyx_L17_continue:; } /* "pandas/algos.pyx":494 * raise ValueError('first not supported for non-numeric data') * sum_ranks = dups = 0 * return ranks # <<<<<<<<<<<<<< * * cdef inline are_diff(object left, object right): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_ranks)); __pyx_r = ((PyObject *)__pyx_v_ranks); goto __pyx_L0; /* "pandas/algos.pyx":416 * * * def rank_1d_generic(object in_arr, bint retry=1, ties_method='average', # <<<<<<<<<<<<<< * ascending=True, na_option='keep'): * """ */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_12); __Pyx_XDECREF(__pyx_t_13); __Pyx_XDECREF(__pyx_t_14); __Pyx_XDECREF(__pyx_t_15); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_argsorted.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_ranks.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.rank_1d_generic", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_argsorted.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_ranks.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_ranks); __Pyx_XDECREF((PyObject *)__pyx_v_sorted_data); __Pyx_XDECREF((PyObject *)__pyx_v_values); __Pyx_XDECREF((PyObject *)__pyx_v_argsorted); __Pyx_XDECREF(__pyx_v_val); __Pyx_XDECREF(__pyx_v_nan_value); __Pyx_XDECREF(__pyx_v_mask); __Pyx_XDECREF(__pyx_v__as); __Pyx_XDECREF(__pyx_v_valid_locs); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/algos.pyx":496 * return ranks * * cdef inline are_diff(object left, object right): # <<<<<<<<<<<<<< * try: * return fabs(left - right) > FP_ERR */ static CYTHON_INLINE PyObject *__pyx_f_6pandas_5algos_are_diff(PyObject *__pyx_v_left, PyObject *__pyx_v_right) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; double __pyx_t_5; int __pyx_t_6; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("are_diff", 0); /* "pandas/algos.pyx":497 * * cdef inline are_diff(object left, object right): * try: # <<<<<<<<<<<<<< * return fabs(left - right) > FP_ERR * except TypeError: */ { __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:*/ { /* "pandas/algos.pyx":498 * cdef inline are_diff(object left, object right): * try: * return fabs(left - right) > FP_ERR # <<<<<<<<<<<<<< * except TypeError: * return left != right */ __Pyx_XDECREF(__pyx_r); __pyx_t_4 = PyNumber_Subtract(__pyx_v_left, __pyx_v_right); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 498; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __pyx_PyFloat_AsDouble(__pyx_t_4); if (unlikely((__pyx_t_5 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 498; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyBool_FromLong((fabs(__pyx_t_5) > __pyx_v_6pandas_5algos_FP_ERR)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 498; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L7_try_return; } __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L10_try_end; __pyx_L3_error:; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; /* "pandas/algos.pyx":499 * try: * return fabs(left - right) > FP_ERR * except TypeError: # <<<<<<<<<<<<<< * return left != right * */ __pyx_t_6 = PyErr_ExceptionMatches(__pyx_builtin_TypeError); if (__pyx_t_6) { __Pyx_AddTraceback("pandas.algos.are_diff", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_7, &__pyx_t_8) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 499; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_GOTREF(__pyx_t_7); __Pyx_GOTREF(__pyx_t_8); /* "pandas/algos.pyx":500 * return fabs(left - right) > FP_ERR * except TypeError: * return left != right # <<<<<<<<<<<<<< * * _return_false = lambda self, other: False */ __Pyx_XDECREF(__pyx_r); __pyx_t_9 = PyObject_RichCompare(__pyx_v_left, __pyx_v_right, Py_NE); __Pyx_XGOTREF(__pyx_t_9); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 500; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} __pyx_r = __pyx_t_9; __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; goto __pyx_L6_except_return; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; goto __pyx_L4_exception_handled; } goto __pyx_L5_except_error; __pyx_L5_except_error:; __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); goto __pyx_L1_error; __pyx_L7_try_return:; __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); goto __pyx_L0; __pyx_L6_except_return:; __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); goto __pyx_L0; __pyx_L4_exception_handled:; __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); __pyx_L10_try_end:; } /* "pandas/algos.pyx":496 * return ranks * * cdef inline are_diff(object left, object right): # <<<<<<<<<<<<<< * try: * return fabs(left - right) > FP_ERR */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); __Pyx_AddTraceback("pandas.algos.are_diff", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/algos.pyx":525 * __cmp__ = _return_true * * def rank_2d_generic(object in_arr, axis=0, ties_method='average', # <<<<<<<<<<<<<< * ascending=True, na_option='keep'): * """ */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_11rank_2d_generic(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6pandas_5algos_10rank_2d_generic[] = "\n Fast NaN-friendly version of scipy.stats.rankdata\n "; static PyMethodDef __pyx_mdef_6pandas_5algos_11rank_2d_generic = {__Pyx_NAMESTR("rank_2d_generic"), (PyCFunction)__pyx_pw_6pandas_5algos_11rank_2d_generic, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_5algos_10rank_2d_generic)}; static PyObject *__pyx_pw_6pandas_5algos_11rank_2d_generic(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_in_arr = 0; PyObject *__pyx_v_axis = 0; PyObject *__pyx_v_ties_method = 0; PyObject *__pyx_v_ascending = 0; PyObject *__pyx_v_na_option = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("rank_2d_generic (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_in_arr,&__pyx_n_s_axis,&__pyx_n_s_ties_method,&__pyx_n_s_ascending,&__pyx_n_s_na_option,0}; PyObject* values[5] = {0,0,0,0,0}; values[1] = ((PyObject *)__pyx_int_0); values[2] = ((PyObject *)__pyx_n_s_average); /* "pandas/algos.pyx":526 * * def rank_2d_generic(object in_arr, axis=0, ties_method='average', * ascending=True, na_option='keep'): # <<<<<<<<<<<<<< * """ * Fast NaN-friendly version of scipy.stats.rankdata */ values[3] = ((PyObject *)Py_True); values[4] = ((PyObject *)__pyx_n_s_keep); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_in_arr)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_axis); if (value) { values[1] = value; kw_args--; } } case 2: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ties_method); if (value) { values[2] = value; kw_args--; } } case 3: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ascending); if (value) { values[3] = value; kw_args--; } } case 4: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_na_option); if (value) { values[4] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "rank_2d_generic") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 525; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_in_arr = values[0]; __pyx_v_axis = values[1]; __pyx_v_ties_method = values[2]; __pyx_v_ascending = values[3]; __pyx_v_na_option = values[4]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("rank_2d_generic", 0, 1, 5, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 525; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.rank_2d_generic", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pandas_5algos_10rank_2d_generic(__pyx_self, __pyx_v_in_arr, __pyx_v_axis, __pyx_v_ties_method, __pyx_v_ascending, __pyx_v_na_option); /* "pandas/algos.pyx":525 * __cmp__ = _return_true * * def rank_2d_generic(object in_arr, axis=0, ties_method='average', # <<<<<<<<<<<<<< * ascending=True, na_option='keep'): * """ */ /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5algos_10rank_2d_generic(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_in_arr, PyObject *__pyx_v_axis, PyObject *__pyx_v_ties_method, PyObject *__pyx_v_ascending, PyObject *__pyx_v_na_option) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_z; Py_ssize_t __pyx_v_k; Py_ssize_t __pyx_v_n; Py_ssize_t __pyx_v_infs; Py_ssize_t __pyx_v_dups; PyArrayObject *__pyx_v_ranks = 0; PyArrayObject *__pyx_v_values = 0; PyArrayObject *__pyx_v_argsorted = 0; PyObject *__pyx_v_val = 0; PyObject *__pyx_v_nan_value = 0; __pyx_t_5numpy_float64_t __pyx_v_sum_ranks; int __pyx_v_tiebreak; int __pyx_v_keep_na; PyObject *__pyx_v_mask = NULL; PyObject *__pyx_v__as = NULL; __Pyx_LocalBuf_ND __pyx_pybuffernd_argsorted; __Pyx_Buffer __pyx_pybuffer_argsorted; __Pyx_LocalBuf_ND __pyx_pybuffernd_ranks; __Pyx_Buffer __pyx_pybuffer_ranks; __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; int __pyx_t_3; int __pyx_t_4; PyObject *__pyx_t_5 = NULL; PyArrayObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; PyObject *(*__pyx_t_11)(PyObject *); Py_ssize_t __pyx_t_12; Py_ssize_t __pyx_t_13; PyArrayObject *__pyx_t_14 = NULL; PyObject *__pyx_t_15 = NULL; PyObject *__pyx_t_16 = NULL; PyObject *__pyx_t_17 = NULL; PyObject *__pyx_t_18 = NULL; PyObject *__pyx_t_19 = NULL; PyObject *__pyx_t_20 = NULL; int __pyx_t_21; PyArrayObject *__pyx_t_22 = NULL; 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; __pyx_t_5numpy_int64_t __pyx_t_30; Py_ssize_t __pyx_t_31; Py_ssize_t __pyx_t_32; int __pyx_t_33; Py_ssize_t __pyx_t_34; Py_ssize_t __pyx_t_35; Py_ssize_t __pyx_t_36; Py_ssize_t __pyx_t_37; Py_ssize_t __pyx_t_38; __pyx_t_5numpy_int64_t __pyx_t_39; Py_ssize_t __pyx_t_40; Py_ssize_t __pyx_t_41; Py_ssize_t __pyx_t_42; __pyx_t_5numpy_int64_t __pyx_t_43; Py_ssize_t __pyx_t_44; Py_ssize_t __pyx_t_45; Py_ssize_t __pyx_t_46; __pyx_t_5numpy_int64_t __pyx_t_47; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("rank_2d_generic", 0); __Pyx_INCREF(__pyx_v_in_arr); __pyx_pybuffer_ranks.pybuffer.buf = NULL; __pyx_pybuffer_ranks.refcount = 0; __pyx_pybuffernd_ranks.data = NULL; __pyx_pybuffernd_ranks.rcbuffer = &__pyx_pybuffer_ranks; __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_argsorted.pybuffer.buf = NULL; __pyx_pybuffer_argsorted.refcount = 0; __pyx_pybuffernd_argsorted.data = NULL; __pyx_pybuffernd_argsorted.rcbuffer = &__pyx_pybuffer_argsorted; /* "pandas/algos.pyx":532 * * cdef: * Py_ssize_t i, j, z, k, n, infs, dups = 0 # <<<<<<<<<<<<<< * ndarray[float64_t, ndim=2] ranks * ndarray[object, ndim=2] values */ __pyx_v_dups = 0; /* "pandas/algos.pyx":537 * ndarray[int64_t, ndim=2] argsorted * object val, nan_value * float64_t sum_ranks = 0 # <<<<<<<<<<<<<< * int tiebreak = 0 * bint keep_na = 0 */ __pyx_v_sum_ranks = 0.0; /* "pandas/algos.pyx":538 * object val, nan_value * float64_t sum_ranks = 0 * int tiebreak = 0 # <<<<<<<<<<<<<< * bint keep_na = 0 * */ __pyx_v_tiebreak = 0; /* "pandas/algos.pyx":539 * float64_t sum_ranks = 0 * int tiebreak = 0 * bint keep_na = 0 # <<<<<<<<<<<<<< * * tiebreak = tiebreakers[ties_method] */ __pyx_v_keep_na = 0; /* "pandas/algos.pyx":541 * bint keep_na = 0 * * tiebreak = tiebreakers[ties_method] # <<<<<<<<<<<<<< * * keep_na = na_option == 'keep' */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_tiebreakers); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 541; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyObject_GetItem(__pyx_t_1, __pyx_v_ties_method); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 541; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 541; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_tiebreak = __pyx_t_3; /* "pandas/algos.pyx":543 * tiebreak = tiebreakers[ties_method] * * keep_na = na_option == 'keep' # <<<<<<<<<<<<<< * * in_arr = np.asarray(in_arr) */ __pyx_t_2 = PyObject_RichCompare(__pyx_v_na_option, __pyx_n_s_keep, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 543; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 543; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_keep_na = __pyx_t_4; /* "pandas/algos.pyx":545 * keep_na = na_option == 'keep' * * in_arr = np.asarray(in_arr) # <<<<<<<<<<<<<< * * if axis == 0: */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 545; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_asarray); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 545; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 545; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_in_arr); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_in_arr); __Pyx_GIVEREF(__pyx_v_in_arr); __pyx_t_5 = PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 545; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF_SET(__pyx_v_in_arr, __pyx_t_5); __pyx_t_5 = 0; /* "pandas/algos.pyx":547 * in_arr = np.asarray(in_arr) * * if axis == 0: # <<<<<<<<<<<<<< * values = in_arr.T.copy() * else: */ __pyx_t_5 = PyObject_RichCompare(__pyx_v_axis, __pyx_int_0, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 547; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 547; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_4) { /* "pandas/algos.pyx":548 * * if axis == 0: * values = in_arr.T.copy() # <<<<<<<<<<<<<< * else: * values = in_arr.copy() */ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_in_arr, __pyx_n_s_T); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 548; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_copy); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 548; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyObject_Call(__pyx_t_2, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 548; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 548; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_6 = ((PyArrayObject *)__pyx_t_5); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_t_3 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_values.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack); if (unlikely(__pyx_t_3 < 0)) { PyErr_Fetch(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_values.rcbuffer->pybuffer, (PyObject*)__pyx_v_values, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES, 2, 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_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_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1]; if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 548; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_6 = 0; __pyx_v_values = ((PyArrayObject *)__pyx_t_5); __pyx_t_5 = 0; goto __pyx_L3; } /*else*/ { /* "pandas/algos.pyx":550 * values = in_arr.T.copy() * else: * values = in_arr.copy() # <<<<<<<<<<<<<< * * if values.dtype != np.object_: */ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_in_arr, __pyx_n_s_copy); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 550; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_2 = PyObject_Call(__pyx_t_5, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 550; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 550; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_6 = ((PyArrayObject *)__pyx_t_2); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_t_3 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_values.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack); if (unlikely(__pyx_t_3 < 0)) { PyErr_Fetch(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_values.rcbuffer->pybuffer, (PyObject*)__pyx_v_values, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES, 2, 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_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_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1]; if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 550; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_6 = 0; __pyx_v_values = ((PyArrayObject *)__pyx_t_2); __pyx_t_2 = 0; } __pyx_L3:; /* "pandas/algos.pyx":552 * values = in_arr.copy() * * if values.dtype != np.object_: # <<<<<<<<<<<<<< * values = values.astype('O') * */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_values), __pyx_n_s_dtype); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 552; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 552; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_object_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 552; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyObject_RichCompare(__pyx_t_2, __pyx_t_1, Py_NE); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 552; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 552; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_4) { /* "pandas/algos.pyx":553 * * if values.dtype != np.object_: * values = values.astype('O') # <<<<<<<<<<<<<< * * if ascending ^ (na_option == 'top'): */ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_values), __pyx_n_s_astype); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 553; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_1 = PyObject_Call(__pyx_t_5, __pyx_tuple__20, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 553; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 553; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_6 = ((PyArrayObject *)__pyx_t_1); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_t_3 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_values.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack); if (unlikely(__pyx_t_3 < 0)) { PyErr_Fetch(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_values.rcbuffer->pybuffer, (PyObject*)__pyx_v_values, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES, 2, 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_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_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1]; if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 553; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_6 = 0; __Pyx_DECREF_SET(__pyx_v_values, ((PyArrayObject *)__pyx_t_1)); __pyx_t_1 = 0; goto __pyx_L4; } __pyx_L4:; /* "pandas/algos.pyx":555 * values = values.astype('O') * * if ascending ^ (na_option == 'top'): # <<<<<<<<<<<<<< * # always greater than everything * nan_value = Infinity() */ __pyx_t_1 = PyObject_RichCompare(__pyx_v_na_option, __pyx_n_s_top, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 555; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_5 = PyNumber_Xor(__pyx_v_ascending, __pyx_t_1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 555; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 555; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_4) { /* "pandas/algos.pyx":557 * if ascending ^ (na_option == 'top'): * # always greater than everything * nan_value = Infinity() # <<<<<<<<<<<<<< * else: * nan_value = NegInfinity() */ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_Infinity); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 557; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_1 = PyObject_Call(__pyx_t_5, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 557; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_v_nan_value = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L5; } /*else*/ { /* "pandas/algos.pyx":559 * nan_value = Infinity() * else: * nan_value = NegInfinity() # <<<<<<<<<<<<<< * * mask = lib.isnullobj2d(values) */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_NegInfinity); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 559; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_5 = PyObject_Call(__pyx_t_1, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 559; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_nan_value = __pyx_t_5; __pyx_t_5 = 0; } __pyx_L5:; /* "pandas/algos.pyx":561 * nan_value = NegInfinity() * * mask = lib.isnullobj2d(values) # <<<<<<<<<<<<<< * np.putmask(values, mask, nan_value) * */ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_lib); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 561; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_isnullobj2d); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 561; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 561; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(((PyObject *)__pyx_v_values)); PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_v_values)); __Pyx_GIVEREF(((PyObject *)__pyx_v_values)); __pyx_t_2 = PyObject_Call(__pyx_t_1, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 561; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_v_mask = __pyx_t_2; __pyx_t_2 = 0; /* "pandas/algos.pyx":562 * * mask = lib.isnullobj2d(values) * np.putmask(values, mask, nan_value) # <<<<<<<<<<<<<< * * n, k = ( values).shape */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 562; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_putmask); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 562; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 562; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(((PyObject *)__pyx_v_values)); PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_values)); __Pyx_GIVEREF(((PyObject *)__pyx_v_values)); __Pyx_INCREF(__pyx_v_mask); PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_mask); __Pyx_GIVEREF(__pyx_v_mask); __Pyx_INCREF(__pyx_v_nan_value); PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_nan_value); __Pyx_GIVEREF(__pyx_v_nan_value); __pyx_t_1 = PyObject_Call(__pyx_t_5, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 562; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pandas/algos.pyx":564 * np.putmask(values, mask, nan_value) * * n, k = ( values).shape # <<<<<<<<<<<<<< * ranks = np.empty((n, k), dtype='f8') * */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_values), __pyx_n_s_shape); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 564; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) { PyObject* sequence = __pyx_t_1; #if CYTHON_COMPILING_IN_CPYTHON Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 564; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_5 = PyTuple_GET_ITEM(sequence, 1); } else { __pyx_t_2 = PyList_GET_ITEM(sequence, 0); __pyx_t_5 = PyList_GET_ITEM(sequence, 1); } __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(__pyx_t_5); #else __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 564; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 564; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } else { Py_ssize_t index = -1; __pyx_t_10 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 564; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_11 = Py_TYPE(__pyx_t_10)->tp_iternext; index = 0; __pyx_t_2 = __pyx_t_11(__pyx_t_10); if (unlikely(!__pyx_t_2)) goto __pyx_L6_unpacking_failed; __Pyx_GOTREF(__pyx_t_2); index = 1; __pyx_t_5 = __pyx_t_11(__pyx_t_10); if (unlikely(!__pyx_t_5)) goto __pyx_L6_unpacking_failed; __Pyx_GOTREF(__pyx_t_5); if (__Pyx_IternextUnpackEndCheck(__pyx_t_11(__pyx_t_10), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 564; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_11 = NULL; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; goto __pyx_L7_unpacking_done; __pyx_L6_unpacking_failed:; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_t_11 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 564; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_L7_unpacking_done:; } __pyx_t_12 = __Pyx_PyIndex_AsSsize_t(__pyx_t_2); if (unlikely((__pyx_t_12 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 564; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_13 = __Pyx_PyIndex_AsSsize_t(__pyx_t_5); if (unlikely((__pyx_t_13 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 564; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_v_n = __pyx_t_12; __pyx_v_k = __pyx_t_13; /* "pandas/algos.pyx":565 * * n, k = ( values).shape * ranks = np.empty((n, k), dtype='f8') # <<<<<<<<<<<<<< * * try: */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 565; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_empty); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 565; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_n); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 565; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_k); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 565; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_10 = PyTuple_New(2); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 565; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_1 = 0; __pyx_t_2 = 0; __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 565; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_10); __Pyx_GIVEREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_t_10 = PyDict_New(); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 565; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); if (PyDict_SetItem(__pyx_t_10, __pyx_n_s_dtype, __pyx_n_s_f8) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 565; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_1 = PyObject_Call(__pyx_t_5, __pyx_t_2, __pyx_t_10); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 565; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 565; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_14 = ((PyArrayObject *)__pyx_t_1); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_ranks.rcbuffer->pybuffer); __pyx_t_3 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_ranks.rcbuffer->pybuffer, (PyObject*)__pyx_t_14, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack); if (unlikely(__pyx_t_3 < 0)) { PyErr_Fetch(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_ranks.rcbuffer->pybuffer, (PyObject*)__pyx_v_ranks, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_pybuffernd_ranks.diminfo[0].strides = __pyx_pybuffernd_ranks.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_ranks.diminfo[0].shape = __pyx_pybuffernd_ranks.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_ranks.diminfo[1].strides = __pyx_pybuffernd_ranks.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_ranks.diminfo[1].shape = __pyx_pybuffernd_ranks.rcbuffer->pybuffer.shape[1]; if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 565; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_14 = 0; __pyx_v_ranks = ((PyArrayObject *)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/algos.pyx":567 * ranks = np.empty((n, k), dtype='f8') * * try: # <<<<<<<<<<<<<< * _as = values.argsort(1) * except TypeError: */ { __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9); __Pyx_XGOTREF(__pyx_t_7); __Pyx_XGOTREF(__pyx_t_8); __Pyx_XGOTREF(__pyx_t_9); /*try:*/ { /* "pandas/algos.pyx":568 * * try: * _as = values.argsort(1) # <<<<<<<<<<<<<< * except TypeError: * values = in_arr */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_values), __pyx_n_s_argsort); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 568; __pyx_clineno = __LINE__; goto __pyx_L8_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_10 = PyObject_Call(__pyx_t_1, __pyx_tuple__21, NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 568; __pyx_clineno = __LINE__; goto __pyx_L8_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v__as = __pyx_t_10; __pyx_t_10 = 0; } __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; goto __pyx_L15_try_end; __pyx_L8_error:; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; /* "pandas/algos.pyx":569 * try: * _as = values.argsort(1) * except TypeError: # <<<<<<<<<<<<<< * values = in_arr * for i in range(len(values)): */ __pyx_t_3 = PyErr_ExceptionMatches(__pyx_builtin_TypeError); if (__pyx_t_3) { __Pyx_AddTraceback("pandas.algos.rank_2d_generic", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_10, &__pyx_t_1, &__pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 569; __pyx_clineno = __LINE__; goto __pyx_L10_except_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_GOTREF(__pyx_t_1); __Pyx_GOTREF(__pyx_t_2); /* "pandas/algos.pyx":570 * _as = values.argsort(1) * except TypeError: * values = in_arr # <<<<<<<<<<<<<< * for i in range(len(values)): * ranks[i] = rank_1d_generic(in_arr[i], */ if (!(likely(((__pyx_v_in_arr) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_in_arr, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 570; __pyx_clineno = __LINE__; goto __pyx_L10_except_error;} __pyx_t_5 = __pyx_v_in_arr; __Pyx_INCREF(__pyx_t_5); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_t_3 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_values.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_5), &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack); if (unlikely(__pyx_t_3 < 0)) { PyErr_Fetch(&__pyx_t_15, &__pyx_t_16, &__pyx_t_17); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_values.rcbuffer->pybuffer, (PyObject*)__pyx_v_values, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_15); Py_XDECREF(__pyx_t_16); Py_XDECREF(__pyx_t_17); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_15, __pyx_t_16, __pyx_t_17); } } __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_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1]; if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 570; __pyx_clineno = __LINE__; goto __pyx_L10_except_error;} } __Pyx_DECREF_SET(__pyx_v_values, ((PyArrayObject *)__pyx_t_5)); __pyx_t_5 = 0; /* "pandas/algos.pyx":571 * except TypeError: * values = in_arr * for i in range(len(values)): # <<<<<<<<<<<<<< * ranks[i] = rank_1d_generic(in_arr[i], * ties_method=ties_method, */ __pyx_t_13 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_13 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 571; __pyx_clineno = __LINE__; goto __pyx_L10_except_error;} for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_13; __pyx_t_12+=1) { __pyx_v_i = __pyx_t_12; /* "pandas/algos.pyx":572 * values = in_arr * for i in range(len(values)): * ranks[i] = rank_1d_generic(in_arr[i], # <<<<<<<<<<<<<< * ties_method=ties_method, * ascending=ascending) */ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_rank_1d_generic); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 572; __pyx_clineno = __LINE__; goto __pyx_L10_except_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_18 = __Pyx_GetItemInt(__pyx_v_in_arr, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(__pyx_t_18 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 572; __pyx_clineno = __LINE__; goto __pyx_L10_except_error;}; __Pyx_GOTREF(__pyx_t_18); __pyx_t_19 = PyTuple_New(1); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 572; __pyx_clineno = __LINE__; goto __pyx_L10_except_error;} __Pyx_GOTREF(__pyx_t_19); PyTuple_SET_ITEM(__pyx_t_19, 0, __pyx_t_18); __Pyx_GIVEREF(__pyx_t_18); __pyx_t_18 = 0; __pyx_t_18 = PyDict_New(); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 572; __pyx_clineno = __LINE__; goto __pyx_L10_except_error;} __Pyx_GOTREF(__pyx_t_18); /* "pandas/algos.pyx":573 * for i in range(len(values)): * ranks[i] = rank_1d_generic(in_arr[i], * ties_method=ties_method, # <<<<<<<<<<<<<< * ascending=ascending) * if axis == 0: */ if (PyDict_SetItem(__pyx_t_18, __pyx_n_s_ties_method, __pyx_v_ties_method) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 572; __pyx_clineno = __LINE__; goto __pyx_L10_except_error;} /* "pandas/algos.pyx":574 * ranks[i] = rank_1d_generic(in_arr[i], * ties_method=ties_method, * ascending=ascending) # <<<<<<<<<<<<<< * if axis == 0: * return ranks.T */ if (PyDict_SetItem(__pyx_t_18, __pyx_n_s_ascending, __pyx_v_ascending) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 572; __pyx_clineno = __LINE__; goto __pyx_L10_except_error;} /* "pandas/algos.pyx":572 * values = in_arr * for i in range(len(values)): * ranks[i] = rank_1d_generic(in_arr[i], # <<<<<<<<<<<<<< * ties_method=ties_method, * ascending=ascending) */ __pyx_t_20 = PyObject_Call(__pyx_t_5, __pyx_t_19, __pyx_t_18); if (unlikely(!__pyx_t_20)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 572; __pyx_clineno = __LINE__; goto __pyx_L10_except_error;} __Pyx_GOTREF(__pyx_t_20); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0; __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; if (unlikely(__Pyx_SetItemInt(((PyObject *)__pyx_v_ranks), __pyx_v_i, __pyx_t_20, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 572; __pyx_clineno = __LINE__; goto __pyx_L10_except_error;} __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0; } /* "pandas/algos.pyx":575 * ties_method=ties_method, * ascending=ascending) * if axis == 0: # <<<<<<<<<<<<<< * return ranks.T * else: */ __pyx_t_20 = PyObject_RichCompare(__pyx_v_axis, __pyx_int_0, Py_EQ); __Pyx_XGOTREF(__pyx_t_20); if (unlikely(!__pyx_t_20)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 575; __pyx_clineno = __LINE__; goto __pyx_L10_except_error;} __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_20); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 575; __pyx_clineno = __LINE__; goto __pyx_L10_except_error;} __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0; if (__pyx_t_4) { /* "pandas/algos.pyx":576 * ascending=ascending) * if axis == 0: * return ranks.T # <<<<<<<<<<<<<< * else: * return ranks */ __Pyx_XDECREF(__pyx_r); __pyx_t_20 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_ranks), __pyx_n_s_T); if (unlikely(!__pyx_t_20)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 576; __pyx_clineno = __LINE__; goto __pyx_L10_except_error;} __Pyx_GOTREF(__pyx_t_20); __pyx_r = __pyx_t_20; __pyx_t_20 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; goto __pyx_L11_except_return; } /*else*/ { /* "pandas/algos.pyx":578 * return ranks.T * else: * return ranks # <<<<<<<<<<<<<< * * if not ascending: */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_ranks)); __pyx_r = ((PyObject *)__pyx_v_ranks); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; goto __pyx_L11_except_return; } __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; goto __pyx_L9_exception_handled; } goto __pyx_L10_except_error; __pyx_L10_except_error:; __Pyx_XGIVEREF(__pyx_t_7); __Pyx_XGIVEREF(__pyx_t_8); __Pyx_XGIVEREF(__pyx_t_9); __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9); goto __pyx_L1_error; __pyx_L11_except_return:; __Pyx_XGIVEREF(__pyx_t_7); __Pyx_XGIVEREF(__pyx_t_8); __Pyx_XGIVEREF(__pyx_t_9); __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9); goto __pyx_L0; __pyx_L9_exception_handled:; __Pyx_XGIVEREF(__pyx_t_7); __Pyx_XGIVEREF(__pyx_t_8); __Pyx_XGIVEREF(__pyx_t_9); __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9); __pyx_L15_try_end:; } /* "pandas/algos.pyx":580 * return ranks * * if not ascending: # <<<<<<<<<<<<<< * _as = _as[:, ::-1] * */ __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_ascending); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 580; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_21 = ((!__pyx_t_4) != 0); if (__pyx_t_21) { /* "pandas/algos.pyx":581 * * if not ascending: * _as = _as[:, ::-1] # <<<<<<<<<<<<<< * * values = _take_2d_object(values, _as) */ __pyx_t_2 = PyObject_GetItem(__pyx_v__as, __pyx_tuple__24); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 581; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF_SET(__pyx_v__as, __pyx_t_2); __pyx_t_2 = 0; goto __pyx_L21; } __pyx_L21:; /* "pandas/algos.pyx":583 * _as = _as[:, ::-1] * * values = _take_2d_object(values, _as) # <<<<<<<<<<<<<< * argsorted = _as.astype('i8') * */ __pyx_t_2 = __pyx_f_6pandas_5algos__take_2d_object(((PyArrayObject *)__pyx_v_values), __pyx_v__as); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 583; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 583; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_6 = ((PyArrayObject *)__pyx_t_2); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_t_3 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_values.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack); if (unlikely(__pyx_t_3 < 0)) { PyErr_Fetch(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_values.rcbuffer->pybuffer, (PyObject*)__pyx_v_values, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES, 2, 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_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_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1]; if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 583; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_6 = 0; __Pyx_DECREF_SET(__pyx_v_values, ((PyArrayObject *)__pyx_t_2)); __pyx_t_2 = 0; /* "pandas/algos.pyx":584 * * values = _take_2d_object(values, _as) * argsorted = _as.astype('i8') # <<<<<<<<<<<<<< * * for i in range(n): */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v__as, __pyx_n_s_astype); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 584; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = PyObject_Call(__pyx_t_2, __pyx_tuple__25, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 584; __pyx_clineno = __LINE__; goto __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_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 584; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_22 = ((PyArrayObject *)__pyx_t_1); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_argsorted.rcbuffer->pybuffer); __pyx_t_3 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_argsorted.rcbuffer->pybuffer, (PyObject*)__pyx_t_22, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack); if (unlikely(__pyx_t_3 < 0)) { PyErr_Fetch(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_argsorted.rcbuffer->pybuffer, (PyObject*)__pyx_v_argsorted, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 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_pybuffernd_argsorted.diminfo[0].strides = __pyx_pybuffernd_argsorted.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_argsorted.diminfo[0].shape = __pyx_pybuffernd_argsorted.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_argsorted.diminfo[1].strides = __pyx_pybuffernd_argsorted.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_argsorted.diminfo[1].shape = __pyx_pybuffernd_argsorted.rcbuffer->pybuffer.shape[1]; if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 584; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_22 = 0; __pyx_v_argsorted = ((PyArrayObject *)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/algos.pyx":586 * argsorted = _as.astype('i8') * * for i in range(n): # <<<<<<<<<<<<<< * dups = sum_ranks = infs = 0 * for j in range(k): */ __pyx_t_13 = __pyx_v_n; for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_13; __pyx_t_12+=1) { __pyx_v_i = __pyx_t_12; /* "pandas/algos.pyx":587 * * for i in range(n): * dups = sum_ranks = infs = 0 # <<<<<<<<<<<<<< * for j in range(k): * val = values[i, j] */ __pyx_v_dups = 0; __pyx_v_sum_ranks = 0; __pyx_v_infs = 0; /* "pandas/algos.pyx":588 * for i in range(n): * dups = sum_ranks = infs = 0 * for j in range(k): # <<<<<<<<<<<<<< * val = values[i, j] * if val is nan_value and keep_na: */ __pyx_t_23 = __pyx_v_k; for (__pyx_t_24 = 0; __pyx_t_24 < __pyx_t_23; __pyx_t_24+=1) { __pyx_v_j = __pyx_t_24; /* "pandas/algos.pyx":589 * dups = sum_ranks = infs = 0 * for j in range(k): * val = values[i, j] # <<<<<<<<<<<<<< * if val is nan_value and keep_na: * ranks[i, argsorted[i, j]] = nan */ __pyx_t_25 = __pyx_v_i; __pyx_t_26 = __pyx_v_j; __pyx_t_3 = -1; if (__pyx_t_25 < 0) { __pyx_t_25 += __pyx_pybuffernd_values.diminfo[0].shape; if (unlikely(__pyx_t_25 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_25 >= __pyx_pybuffernd_values.diminfo[0].shape)) __pyx_t_3 = 0; if (__pyx_t_26 < 0) { __pyx_t_26 += __pyx_pybuffernd_values.diminfo[1].shape; if (unlikely(__pyx_t_26 < 0)) __pyx_t_3 = 1; } else if (unlikely(__pyx_t_26 >= __pyx_pybuffernd_values.diminfo[1].shape)) __pyx_t_3 = 1; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 589; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_1 = (PyObject *) *__Pyx_BufPtrStrided2d(PyObject **, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_25, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_26, __pyx_pybuffernd_values.diminfo[1].strides); __Pyx_INCREF((PyObject*)__pyx_t_1); __Pyx_XDECREF_SET(__pyx_v_val, __pyx_t_1); __pyx_t_1 = 0; /* "pandas/algos.pyx":590 * for j in range(k): * val = values[i, j] * if val is nan_value and keep_na: # <<<<<<<<<<<<<< * ranks[i, argsorted[i, j]] = nan * infs += 1 */ __pyx_t_21 = (__pyx_v_val == __pyx_v_nan_value); if ((__pyx_t_21 != 0)) { __pyx_t_4 = (__pyx_v_keep_na != 0); } else { __pyx_t_4 = (__pyx_t_21 != 0); } if (__pyx_t_4) { /* "pandas/algos.pyx":591 * val = values[i, j] * if val is nan_value and keep_na: * ranks[i, argsorted[i, j]] = nan # <<<<<<<<<<<<<< * infs += 1 * continue */ __pyx_t_27 = __pyx_v_i; __pyx_t_28 = __pyx_v_j; __pyx_t_3 = -1; if (__pyx_t_27 < 0) { __pyx_t_27 += __pyx_pybuffernd_argsorted.diminfo[0].shape; if (unlikely(__pyx_t_27 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_27 >= __pyx_pybuffernd_argsorted.diminfo[0].shape)) __pyx_t_3 = 0; if (__pyx_t_28 < 0) { __pyx_t_28 += __pyx_pybuffernd_argsorted.diminfo[1].shape; if (unlikely(__pyx_t_28 < 0)) __pyx_t_3 = 1; } else if (unlikely(__pyx_t_28 >= __pyx_pybuffernd_argsorted.diminfo[1].shape)) __pyx_t_3 = 1; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 591; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_29 = __pyx_v_i; __pyx_t_30 = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_argsorted.rcbuffer->pybuffer.buf, __pyx_t_27, __pyx_pybuffernd_argsorted.diminfo[0].strides, __pyx_t_28, __pyx_pybuffernd_argsorted.diminfo[1].strides)); __pyx_t_3 = -1; if (__pyx_t_29 < 0) { __pyx_t_29 += __pyx_pybuffernd_ranks.diminfo[0].shape; if (unlikely(__pyx_t_29 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_29 >= __pyx_pybuffernd_ranks.diminfo[0].shape)) __pyx_t_3 = 0; if (__pyx_t_30 < 0) { __pyx_t_30 += __pyx_pybuffernd_ranks.diminfo[1].shape; if (unlikely(__pyx_t_30 < 0)) __pyx_t_3 = 1; } else if (unlikely(__pyx_t_30 >= __pyx_pybuffernd_ranks.diminfo[1].shape)) __pyx_t_3 = 1; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 591; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_ranks.rcbuffer->pybuffer.buf, __pyx_t_29, __pyx_pybuffernd_ranks.diminfo[0].strides, __pyx_t_30, __pyx_pybuffernd_ranks.diminfo[1].strides) = __pyx_v_6pandas_5algos_nan; /* "pandas/algos.pyx":592 * if val is nan_value and keep_na: * ranks[i, argsorted[i, j]] = nan * infs += 1 # <<<<<<<<<<<<<< * continue * sum_ranks += (j - infs) + 1 */ __pyx_v_infs = (__pyx_v_infs + 1); /* "pandas/algos.pyx":593 * ranks[i, argsorted[i, j]] = nan * infs += 1 * continue # <<<<<<<<<<<<<< * sum_ranks += (j - infs) + 1 * dups += 1 */ goto __pyx_L24_continue; } /* "pandas/algos.pyx":594 * infs += 1 * continue * sum_ranks += (j - infs) + 1 # <<<<<<<<<<<<<< * dups += 1 * if j == k - 1 or are_diff(values[i, j + 1], val): */ __pyx_v_sum_ranks = (__pyx_v_sum_ranks + ((__pyx_v_j - __pyx_v_infs) + 1)); /* "pandas/algos.pyx":595 * continue * sum_ranks += (j - infs) + 1 * dups += 1 # <<<<<<<<<<<<<< * if j == k - 1 or are_diff(values[i, j + 1], val): * if tiebreak == TIEBREAK_AVERAGE: */ __pyx_v_dups = (__pyx_v_dups + 1); /* "pandas/algos.pyx":596 * sum_ranks += (j - infs) + 1 * dups += 1 * if j == k - 1 or are_diff(values[i, j + 1], val): # <<<<<<<<<<<<<< * if tiebreak == TIEBREAK_AVERAGE: * for z in range(j - dups + 1, j + 1): */ __pyx_t_4 = (__pyx_v_j == (__pyx_v_k - 1)); if (!__pyx_t_4) { __pyx_t_31 = __pyx_v_i; __pyx_t_32 = (__pyx_v_j + 1); __pyx_t_3 = -1; if (__pyx_t_31 < 0) { __pyx_t_31 += __pyx_pybuffernd_values.diminfo[0].shape; if (unlikely(__pyx_t_31 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_31 >= __pyx_pybuffernd_values.diminfo[0].shape)) __pyx_t_3 = 0; if (__pyx_t_32 < 0) { __pyx_t_32 += __pyx_pybuffernd_values.diminfo[1].shape; if (unlikely(__pyx_t_32 < 0)) __pyx_t_3 = 1; } else if (unlikely(__pyx_t_32 >= __pyx_pybuffernd_values.diminfo[1].shape)) __pyx_t_3 = 1; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 596; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_1 = (PyObject *) *__Pyx_BufPtrStrided2d(PyObject **, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_31, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_32, __pyx_pybuffernd_values.diminfo[1].strides); __Pyx_INCREF((PyObject*)__pyx_t_1); __pyx_t_2 = __pyx_f_6pandas_5algos_are_diff(__pyx_t_1, __pyx_v_val); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 596; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_21 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_21 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 596; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_33 = __pyx_t_21; } else { __pyx_t_33 = __pyx_t_4; } if (__pyx_t_33) { /* "pandas/algos.pyx":597 * dups += 1 * if j == k - 1 or are_diff(values[i, j + 1], val): * if tiebreak == TIEBREAK_AVERAGE: # <<<<<<<<<<<<<< * for z in range(j - dups + 1, j + 1): * ranks[i, argsorted[i, z]] = sum_ranks / dups */ __pyx_t_33 = ((__pyx_v_tiebreak == __pyx_v_6pandas_5algos_TIEBREAK_AVERAGE) != 0); if (__pyx_t_33) { /* "pandas/algos.pyx":598 * if j == k - 1 or are_diff(values[i, j + 1], val): * if tiebreak == TIEBREAK_AVERAGE: * for z in range(j - dups + 1, j + 1): # <<<<<<<<<<<<<< * ranks[i, argsorted[i, z]] = sum_ranks / dups * elif tiebreak == TIEBREAK_MIN: */ __pyx_t_34 = (__pyx_v_j + 1); for (__pyx_t_35 = ((__pyx_v_j - __pyx_v_dups) + 1); __pyx_t_35 < __pyx_t_34; __pyx_t_35+=1) { __pyx_v_z = __pyx_t_35; /* "pandas/algos.pyx":599 * if tiebreak == TIEBREAK_AVERAGE: * for z in range(j - dups + 1, j + 1): * ranks[i, argsorted[i, z]] = sum_ranks / dups # <<<<<<<<<<<<<< * elif tiebreak == TIEBREAK_MIN: * for z in range(j - dups + 1, j + 1): */ if (unlikely(__pyx_v_dups == 0)) { #ifdef WITH_THREAD PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure(); #endif PyErr_SetString(PyExc_ZeroDivisionError, "float division"); #ifdef WITH_THREAD PyGILState_Release(__pyx_gilstate_save); #endif {__pyx_filename = __pyx_f[0]; __pyx_lineno = 599; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_36 = __pyx_v_i; __pyx_t_37 = __pyx_v_z; __pyx_t_3 = -1; if (__pyx_t_36 < 0) { __pyx_t_36 += __pyx_pybuffernd_argsorted.diminfo[0].shape; if (unlikely(__pyx_t_36 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_36 >= __pyx_pybuffernd_argsorted.diminfo[0].shape)) __pyx_t_3 = 0; if (__pyx_t_37 < 0) { __pyx_t_37 += __pyx_pybuffernd_argsorted.diminfo[1].shape; if (unlikely(__pyx_t_37 < 0)) __pyx_t_3 = 1; } else if (unlikely(__pyx_t_37 >= __pyx_pybuffernd_argsorted.diminfo[1].shape)) __pyx_t_3 = 1; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 599; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_38 = __pyx_v_i; __pyx_t_39 = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_argsorted.rcbuffer->pybuffer.buf, __pyx_t_36, __pyx_pybuffernd_argsorted.diminfo[0].strides, __pyx_t_37, __pyx_pybuffernd_argsorted.diminfo[1].strides)); __pyx_t_3 = -1; if (__pyx_t_38 < 0) { __pyx_t_38 += __pyx_pybuffernd_ranks.diminfo[0].shape; if (unlikely(__pyx_t_38 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_38 >= __pyx_pybuffernd_ranks.diminfo[0].shape)) __pyx_t_3 = 0; if (__pyx_t_39 < 0) { __pyx_t_39 += __pyx_pybuffernd_ranks.diminfo[1].shape; if (unlikely(__pyx_t_39 < 0)) __pyx_t_3 = 1; } else if (unlikely(__pyx_t_39 >= __pyx_pybuffernd_ranks.diminfo[1].shape)) __pyx_t_3 = 1; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 599; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_ranks.rcbuffer->pybuffer.buf, __pyx_t_38, __pyx_pybuffernd_ranks.diminfo[0].strides, __pyx_t_39, __pyx_pybuffernd_ranks.diminfo[1].strides) = (__pyx_v_sum_ranks / __pyx_v_dups); } goto __pyx_L28; } /* "pandas/algos.pyx":600 * for z in range(j - dups + 1, j + 1): * ranks[i, argsorted[i, z]] = sum_ranks / dups * elif tiebreak == TIEBREAK_MIN: # <<<<<<<<<<<<<< * for z in range(j - dups + 1, j + 1): * ranks[i, argsorted[i, z]] = j - dups + 2 */ __pyx_t_33 = ((__pyx_v_tiebreak == __pyx_v_6pandas_5algos_TIEBREAK_MIN) != 0); if (__pyx_t_33) { /* "pandas/algos.pyx":601 * ranks[i, argsorted[i, z]] = sum_ranks / dups * elif tiebreak == TIEBREAK_MIN: * for z in range(j - dups + 1, j + 1): # <<<<<<<<<<<<<< * ranks[i, argsorted[i, z]] = j - dups + 2 * elif tiebreak == TIEBREAK_MAX: */ __pyx_t_34 = (__pyx_v_j + 1); for (__pyx_t_35 = ((__pyx_v_j - __pyx_v_dups) + 1); __pyx_t_35 < __pyx_t_34; __pyx_t_35+=1) { __pyx_v_z = __pyx_t_35; /* "pandas/algos.pyx":602 * elif tiebreak == TIEBREAK_MIN: * for z in range(j - dups + 1, j + 1): * ranks[i, argsorted[i, z]] = j - dups + 2 # <<<<<<<<<<<<<< * elif tiebreak == TIEBREAK_MAX: * for z in range(j - dups + 1, j + 1): */ __pyx_t_40 = __pyx_v_i; __pyx_t_41 = __pyx_v_z; __pyx_t_3 = -1; if (__pyx_t_40 < 0) { __pyx_t_40 += __pyx_pybuffernd_argsorted.diminfo[0].shape; if (unlikely(__pyx_t_40 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_40 >= __pyx_pybuffernd_argsorted.diminfo[0].shape)) __pyx_t_3 = 0; if (__pyx_t_41 < 0) { __pyx_t_41 += __pyx_pybuffernd_argsorted.diminfo[1].shape; if (unlikely(__pyx_t_41 < 0)) __pyx_t_3 = 1; } else if (unlikely(__pyx_t_41 >= __pyx_pybuffernd_argsorted.diminfo[1].shape)) __pyx_t_3 = 1; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 602; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_42 = __pyx_v_i; __pyx_t_43 = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_argsorted.rcbuffer->pybuffer.buf, __pyx_t_40, __pyx_pybuffernd_argsorted.diminfo[0].strides, __pyx_t_41, __pyx_pybuffernd_argsorted.diminfo[1].strides)); __pyx_t_3 = -1; if (__pyx_t_42 < 0) { __pyx_t_42 += __pyx_pybuffernd_ranks.diminfo[0].shape; if (unlikely(__pyx_t_42 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_42 >= __pyx_pybuffernd_ranks.diminfo[0].shape)) __pyx_t_3 = 0; if (__pyx_t_43 < 0) { __pyx_t_43 += __pyx_pybuffernd_ranks.diminfo[1].shape; if (unlikely(__pyx_t_43 < 0)) __pyx_t_3 = 1; } else if (unlikely(__pyx_t_43 >= __pyx_pybuffernd_ranks.diminfo[1].shape)) __pyx_t_3 = 1; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 602; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_ranks.rcbuffer->pybuffer.buf, __pyx_t_42, __pyx_pybuffernd_ranks.diminfo[0].strides, __pyx_t_43, __pyx_pybuffernd_ranks.diminfo[1].strides) = ((__pyx_v_j - __pyx_v_dups) + 2); } goto __pyx_L28; } /* "pandas/algos.pyx":603 * for z in range(j - dups + 1, j + 1): * ranks[i, argsorted[i, z]] = j - dups + 2 * elif tiebreak == TIEBREAK_MAX: # <<<<<<<<<<<<<< * for z in range(j - dups + 1, j + 1): * ranks[i, argsorted[i, z]] = j + 1 */ __pyx_t_33 = ((__pyx_v_tiebreak == __pyx_v_6pandas_5algos_TIEBREAK_MAX) != 0); if (__pyx_t_33) { /* "pandas/algos.pyx":604 * ranks[i, argsorted[i, z]] = j - dups + 2 * elif tiebreak == TIEBREAK_MAX: * for z in range(j - dups + 1, j + 1): # <<<<<<<<<<<<<< * ranks[i, argsorted[i, z]] = j + 1 * elif tiebreak == TIEBREAK_FIRST: */ __pyx_t_34 = (__pyx_v_j + 1); for (__pyx_t_35 = ((__pyx_v_j - __pyx_v_dups) + 1); __pyx_t_35 < __pyx_t_34; __pyx_t_35+=1) { __pyx_v_z = __pyx_t_35; /* "pandas/algos.pyx":605 * elif tiebreak == TIEBREAK_MAX: * for z in range(j - dups + 1, j + 1): * ranks[i, argsorted[i, z]] = j + 1 # <<<<<<<<<<<<<< * elif tiebreak == TIEBREAK_FIRST: * raise ValueError('first not supported for ' */ __pyx_t_44 = __pyx_v_i; __pyx_t_45 = __pyx_v_z; __pyx_t_3 = -1; if (__pyx_t_44 < 0) { __pyx_t_44 += __pyx_pybuffernd_argsorted.diminfo[0].shape; if (unlikely(__pyx_t_44 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_44 >= __pyx_pybuffernd_argsorted.diminfo[0].shape)) __pyx_t_3 = 0; if (__pyx_t_45 < 0) { __pyx_t_45 += __pyx_pybuffernd_argsorted.diminfo[1].shape; if (unlikely(__pyx_t_45 < 0)) __pyx_t_3 = 1; } else if (unlikely(__pyx_t_45 >= __pyx_pybuffernd_argsorted.diminfo[1].shape)) __pyx_t_3 = 1; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 605; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_46 = __pyx_v_i; __pyx_t_47 = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_argsorted.rcbuffer->pybuffer.buf, __pyx_t_44, __pyx_pybuffernd_argsorted.diminfo[0].strides, __pyx_t_45, __pyx_pybuffernd_argsorted.diminfo[1].strides)); __pyx_t_3 = -1; if (__pyx_t_46 < 0) { __pyx_t_46 += __pyx_pybuffernd_ranks.diminfo[0].shape; if (unlikely(__pyx_t_46 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_46 >= __pyx_pybuffernd_ranks.diminfo[0].shape)) __pyx_t_3 = 0; if (__pyx_t_47 < 0) { __pyx_t_47 += __pyx_pybuffernd_ranks.diminfo[1].shape; if (unlikely(__pyx_t_47 < 0)) __pyx_t_3 = 1; } else if (unlikely(__pyx_t_47 >= __pyx_pybuffernd_ranks.diminfo[1].shape)) __pyx_t_3 = 1; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 605; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_ranks.rcbuffer->pybuffer.buf, __pyx_t_46, __pyx_pybuffernd_ranks.diminfo[0].strides, __pyx_t_47, __pyx_pybuffernd_ranks.diminfo[1].strides) = (__pyx_v_j + 1); } goto __pyx_L28; } /* "pandas/algos.pyx":606 * for z in range(j - dups + 1, j + 1): * ranks[i, argsorted[i, z]] = j + 1 * elif tiebreak == TIEBREAK_FIRST: # <<<<<<<<<<<<<< * raise ValueError('first not supported for ' * 'non-numeric data') */ __pyx_t_33 = ((__pyx_v_tiebreak == __pyx_v_6pandas_5algos_TIEBREAK_FIRST) != 0); if (__pyx_t_33) { /* "pandas/algos.pyx":607 * ranks[i, argsorted[i, z]] = j + 1 * elif tiebreak == TIEBREAK_FIRST: * raise ValueError('first not supported for ' # <<<<<<<<<<<<<< * 'non-numeric data') * sum_ranks = dups = 0 */ __pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__26, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 607; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 607; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_L28:; /* "pandas/algos.pyx":609 * raise ValueError('first not supported for ' * 'non-numeric data') * sum_ranks = dups = 0 # <<<<<<<<<<<<<< * * if axis == 0: */ __pyx_v_sum_ranks = 0; __pyx_v_dups = 0; goto __pyx_L27; } __pyx_L27:; __pyx_L24_continue:; } } /* "pandas/algos.pyx":611 * sum_ranks = dups = 0 * * if axis == 0: # <<<<<<<<<<<<<< * return ranks.T * else: */ __pyx_t_2 = PyObject_RichCompare(__pyx_v_axis, __pyx_int_0, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 611; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_33 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_33 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 611; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_33) { /* "pandas/algos.pyx":612 * * if axis == 0: * return ranks.T # <<<<<<<<<<<<<< * else: * return ranks */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_ranks), __pyx_n_s_T); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 612; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; } /*else*/ { /* "pandas/algos.pyx":614 * return ranks.T * else: * return ranks # <<<<<<<<<<<<<< * * # def _take_indexer_2d(ndarray[float64_t, ndim=2] values, */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_ranks)); __pyx_r = ((PyObject *)__pyx_v_ranks); goto __pyx_L0; } /* "pandas/algos.pyx":525 * __cmp__ = _return_true * * def rank_2d_generic(object in_arr, axis=0, ties_method='average', # <<<<<<<<<<<<<< * ascending=True, na_option='keep'): * """ */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_10); __Pyx_XDECREF(__pyx_t_18); __Pyx_XDECREF(__pyx_t_19); __Pyx_XDECREF(__pyx_t_20); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_argsorted.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_ranks.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.rank_2d_generic", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_argsorted.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_ranks.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_ranks); __Pyx_XDECREF((PyObject *)__pyx_v_values); __Pyx_XDECREF((PyObject *)__pyx_v_argsorted); __Pyx_XDECREF(__pyx_v_val); __Pyx_XDECREF(__pyx_v_nan_value); __Pyx_XDECREF(__pyx_v_mask); __Pyx_XDECREF(__pyx_v__as); __Pyx_XDECREF(__pyx_v_in_arr); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/algos.pyx":641 * # - * * def _check_minp(win, minp, N): # <<<<<<<<<<<<<< * if minp > win: * raise ValueError('min_periods (%d) must be <= window (%d)' */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_13_check_minp(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_13_check_minp = {__Pyx_NAMESTR("_check_minp"), (PyCFunction)__pyx_pw_6pandas_5algos_13_check_minp, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_13_check_minp(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_win = 0; PyObject *__pyx_v_minp = 0; PyObject *__pyx_v_N = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_check_minp (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_win,&__pyx_n_s_minp,&__pyx_n_s_N,0}; PyObject* values[3] = {0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_win)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_minp)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("_check_minp", 1, 3, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 641; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_N)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("_check_minp", 1, 3, 3, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 641; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_check_minp") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 641; __pyx_clineno = __LINE__; goto __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_win = values[0]; __pyx_v_minp = values[1]; __pyx_v_N = values[2]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("_check_minp", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 641; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos._check_minp", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pandas_5algos_12_check_minp(__pyx_self, __pyx_v_win, __pyx_v_minp, __pyx_v_N); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5algos_12_check_minp(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_win, PyObject *__pyx_v_minp, PyObject *__pyx_v_N) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_check_minp", 0); __Pyx_INCREF(__pyx_v_minp); /* "pandas/algos.pyx":642 * * def _check_minp(win, minp, N): * if minp > win: # <<<<<<<<<<<<<< * raise ValueError('min_periods (%d) must be <= window (%d)' * % (minp, win)) */ __pyx_t_1 = PyObject_RichCompare(__pyx_v_minp, __pyx_v_win, Py_GT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 642; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 642; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_2) { /* "pandas/algos.pyx":644 * if minp > win: * raise ValueError('min_periods (%d) must be <= window (%d)' * % (minp, win)) # <<<<<<<<<<<<<< * elif minp > N: * minp = N + 1 */ __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 644; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_minp); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_minp); __Pyx_GIVEREF(__pyx_v_minp); __Pyx_INCREF(__pyx_v_win); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_win); __Pyx_GIVEREF(__pyx_v_win); __pyx_t_3 = __Pyx_PyString_Format(__pyx_kp_s_min_periods_d_must_be_window_d, __pyx_t_1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 644; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pandas/algos.pyx":643 * def _check_minp(win, minp, N): * if minp > win: * raise ValueError('min_periods (%d) must be <= window (%d)' # <<<<<<<<<<<<<< * % (minp, win)) * elif minp > N: */ __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 643; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyObject_Call(__pyx_builtin_ValueError, __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 643; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 643; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } /* "pandas/algos.pyx":645 * raise ValueError('min_periods (%d) must be <= window (%d)' * % (minp, win)) * elif minp > N: # <<<<<<<<<<<<<< * minp = N + 1 * elif minp == 0: */ __pyx_t_3 = PyObject_RichCompare(__pyx_v_minp, __pyx_v_N, Py_GT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 645; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 645; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_2) { /* "pandas/algos.pyx":646 * % (minp, win)) * elif minp > N: * minp = N + 1 # <<<<<<<<<<<<<< * elif minp == 0: * minp = 1 */ __pyx_t_3 = PyNumber_Add(__pyx_v_N, __pyx_int_1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 646; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF_SET(__pyx_v_minp, __pyx_t_3); __pyx_t_3 = 0; goto __pyx_L3; } /* "pandas/algos.pyx":647 * elif minp > N: * minp = N + 1 * elif minp == 0: # <<<<<<<<<<<<<< * minp = 1 * elif minp < 0: */ __pyx_t_3 = PyObject_RichCompare(__pyx_v_minp, __pyx_int_0, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 647; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 647; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_2) { /* "pandas/algos.pyx":648 * minp = N + 1 * elif minp == 0: * minp = 1 # <<<<<<<<<<<<<< * elif minp < 0: * raise ValueError('min_periods must be >= 0') */ __Pyx_INCREF(__pyx_int_1); __Pyx_DECREF_SET(__pyx_v_minp, __pyx_int_1); goto __pyx_L3; } /* "pandas/algos.pyx":649 * elif minp == 0: * minp = 1 * elif minp < 0: # <<<<<<<<<<<<<< * raise ValueError('min_periods must be >= 0') * return minp */ __pyx_t_3 = PyObject_RichCompare(__pyx_v_minp, __pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 649; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 649; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_2) { /* "pandas/algos.pyx":650 * minp = 1 * elif minp < 0: * raise ValueError('min_periods must be >= 0') # <<<<<<<<<<<<<< * return minp * */ __pyx_t_3 = PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__27, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 650; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 650; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_L3:; /* "pandas/algos.pyx":651 * elif minp < 0: * raise ValueError('min_periods must be >= 0') * return minp # <<<<<<<<<<<<<< * * # original C implementation by N. Devillard. */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_minp); __pyx_r = __pyx_v_minp; goto __pyx_L0; /* "pandas/algos.pyx":641 * # - * * def _check_minp(win, minp, N): # <<<<<<<<<<<<<< * if minp > win: * raise ValueError('min_periods (%d) must be <= window (%d)' */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("pandas.algos._check_minp", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_minp); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/algos.pyx":668 * # Series: Prentice-Hall Series in Automatic Computation * * def kth_smallest(ndarray[double_t] a, Py_ssize_t k): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i,j,l,m,n */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_15kth_smallest(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_15kth_smallest = {__Pyx_NAMESTR("kth_smallest"), (PyCFunction)__pyx_pw_6pandas_5algos_15kth_smallest, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_15kth_smallest(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_a = 0; Py_ssize_t __pyx_v_k; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("kth_smallest (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_a,&__pyx_n_s_k,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_a)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_k)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("kth_smallest", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 668; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "kth_smallest") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 668; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } __pyx_v_a = ((PyArrayObject *)values[0]); __pyx_v_k = __Pyx_PyIndex_AsSsize_t(values[1]); if (unlikely((__pyx_v_k == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 668; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("kth_smallest", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 668; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.kth_smallest", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_a), __pyx_ptype_5numpy_ndarray, 1, "a", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 668; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_14kth_smallest(__pyx_self, __pyx_v_a, __pyx_v_k); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5algos_14kth_smallest(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_a, Py_ssize_t __pyx_v_k) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_l; Py_ssize_t __pyx_v_m; Py_ssize_t __pyx_v_n; __pyx_t_5numpy_double_t __pyx_v_x; __pyx_t_5numpy_double_t __pyx_v_t; __Pyx_LocalBuf_ND __pyx_pybuffernd_a; __Pyx_Buffer __pyx_pybuffer_a; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; int __pyx_t_2; int __pyx_t_3; Py_ssize_t __pyx_t_4; Py_ssize_t __pyx_t_5; Py_ssize_t __pyx_t_6; Py_ssize_t __pyx_t_7; Py_ssize_t __pyx_t_8; Py_ssize_t __pyx_t_9; Py_ssize_t __pyx_t_10; PyObject *__pyx_t_11 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("kth_smallest", 0); __pyx_pybuffer_a.pybuffer.buf = NULL; __pyx_pybuffer_a.refcount = 0; __pyx_pybuffernd_a.data = NULL; __pyx_pybuffernd_a.rcbuffer = &__pyx_pybuffer_a; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_a.rcbuffer->pybuffer, (PyObject*)__pyx_v_a, &__Pyx_TypeInfo_nn___pyx_t_5numpy_double_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 668; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_a.diminfo[0].strides = __pyx_pybuffernd_a.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_a.diminfo[0].shape = __pyx_pybuffernd_a.rcbuffer->pybuffer.shape[0]; /* "pandas/algos.pyx":673 * double_t x, t * * n = len(a) # <<<<<<<<<<<<<< * * l = 0 */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_a)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 673; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/algos.pyx":675 * n = len(a) * * l = 0 # <<<<<<<<<<<<<< * m = n-1 * while (l= __pyx_pybuffernd_a.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 678; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_x = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_double_t *, __pyx_pybuffernd_a.rcbuffer->pybuffer.buf, __pyx_t_1, __pyx_pybuffernd_a.diminfo[0].strides)); /* "pandas/algos.pyx":679 * while (l= __pyx_pybuffernd_a.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 683; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_2 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_double_t *, __pyx_pybuffernd_a.rcbuffer->pybuffer.buf, __pyx_t_4, __pyx_pybuffernd_a.diminfo[0].strides)) < __pyx_v_x) != 0); if (!__pyx_t_2) break; __pyx_v_i = (__pyx_v_i + 1); } /* "pandas/algos.pyx":684 * while 1: * while a[i] < x: i += 1 * while x < a[j]: j -= 1 # <<<<<<<<<<<<<< * if i <= j: * t = a[i] */ while (1) { __pyx_t_5 = __pyx_v_j; __pyx_t_3 = -1; if (__pyx_t_5 < 0) { __pyx_t_5 += __pyx_pybuffernd_a.diminfo[0].shape; if (unlikely(__pyx_t_5 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_5 >= __pyx_pybuffernd_a.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 684; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_2 = ((__pyx_v_x < (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_double_t *, __pyx_pybuffernd_a.rcbuffer->pybuffer.buf, __pyx_t_5, __pyx_pybuffernd_a.diminfo[0].strides))) != 0); if (!__pyx_t_2) break; __pyx_v_j = (__pyx_v_j - 1); } /* "pandas/algos.pyx":685 * while a[i] < x: i += 1 * while x < a[j]: j -= 1 * if i <= j: # <<<<<<<<<<<<<< * t = a[i] * a[i] = a[j] */ __pyx_t_2 = ((__pyx_v_i <= __pyx_v_j) != 0); if (__pyx_t_2) { /* "pandas/algos.pyx":686 * while x < a[j]: j -= 1 * if i <= j: * t = a[i] # <<<<<<<<<<<<<< * a[i] = a[j] * a[j] = t */ __pyx_t_6 = __pyx_v_i; __pyx_t_3 = -1; if (__pyx_t_6 < 0) { __pyx_t_6 += __pyx_pybuffernd_a.diminfo[0].shape; if (unlikely(__pyx_t_6 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_6 >= __pyx_pybuffernd_a.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 686; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_t = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_double_t *, __pyx_pybuffernd_a.rcbuffer->pybuffer.buf, __pyx_t_6, __pyx_pybuffernd_a.diminfo[0].strides)); /* "pandas/algos.pyx":687 * if i <= j: * t = a[i] * a[i] = a[j] # <<<<<<<<<<<<<< * a[j] = t * i += 1; j -= 1 */ __pyx_t_7 = __pyx_v_j; __pyx_t_3 = -1; if (__pyx_t_7 < 0) { __pyx_t_7 += __pyx_pybuffernd_a.diminfo[0].shape; if (unlikely(__pyx_t_7 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_7 >= __pyx_pybuffernd_a.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 687; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_8 = __pyx_v_i; __pyx_t_3 = -1; if (__pyx_t_8 < 0) { __pyx_t_8 += __pyx_pybuffernd_a.diminfo[0].shape; if (unlikely(__pyx_t_8 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_8 >= __pyx_pybuffernd_a.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 687; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_double_t *, __pyx_pybuffernd_a.rcbuffer->pybuffer.buf, __pyx_t_8, __pyx_pybuffernd_a.diminfo[0].strides) = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_double_t *, __pyx_pybuffernd_a.rcbuffer->pybuffer.buf, __pyx_t_7, __pyx_pybuffernd_a.diminfo[0].strides)); /* "pandas/algos.pyx":688 * t = a[i] * a[i] = a[j] * a[j] = t # <<<<<<<<<<<<<< * i += 1; j -= 1 * */ __pyx_t_9 = __pyx_v_j; __pyx_t_3 = -1; if (__pyx_t_9 < 0) { __pyx_t_9 += __pyx_pybuffernd_a.diminfo[0].shape; if (unlikely(__pyx_t_9 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_9 >= __pyx_pybuffernd_a.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 688; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_double_t *, __pyx_pybuffernd_a.rcbuffer->pybuffer.buf, __pyx_t_9, __pyx_pybuffernd_a.diminfo[0].strides) = __pyx_v_t; /* "pandas/algos.pyx":689 * a[i] = a[j] * a[j] = t * i += 1; j -= 1 # <<<<<<<<<<<<<< * * if i > j: break */ __pyx_v_i = (__pyx_v_i + 1); __pyx_v_j = (__pyx_v_j - 1); goto __pyx_L11; } __pyx_L11:; /* "pandas/algos.pyx":691 * i += 1; j -= 1 * * if i > j: break # <<<<<<<<<<<<<< * * if j < k: l = i */ __pyx_t_2 = ((__pyx_v_i > __pyx_v_j) != 0); if (__pyx_t_2) { goto __pyx_L6_break; } } __pyx_L6_break:; /* "pandas/algos.pyx":693 * if i > j: break * * if j < k: l = i # <<<<<<<<<<<<<< * if k < i: m = j * return a[k] */ __pyx_t_2 = ((__pyx_v_j < __pyx_v_k) != 0); if (__pyx_t_2) { __pyx_v_l = __pyx_v_i; goto __pyx_L13; } __pyx_L13:; /* "pandas/algos.pyx":694 * * if j < k: l = i * if k < i: m = j # <<<<<<<<<<<<<< * return a[k] * */ __pyx_t_2 = ((__pyx_v_k < __pyx_v_i) != 0); if (__pyx_t_2) { __pyx_v_m = __pyx_v_j; goto __pyx_L14; } __pyx_L14:; } /* "pandas/algos.pyx":695 * if j < k: l = i * if k < i: m = j * return a[k] # <<<<<<<<<<<<<< * * cdef inline kth_smallest_c(float64_t* a, Py_ssize_t k, Py_ssize_t n): */ __Pyx_XDECREF(__pyx_r); __pyx_t_10 = __pyx_v_k; __pyx_t_3 = -1; if (__pyx_t_10 < 0) { __pyx_t_10 += __pyx_pybuffernd_a.diminfo[0].shape; if (unlikely(__pyx_t_10 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_10 >= __pyx_pybuffernd_a.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 695; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_11 = PyFloat_FromDouble((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_double_t *, __pyx_pybuffernd_a.rcbuffer->pybuffer.buf, __pyx_t_10, __pyx_pybuffernd_a.diminfo[0].strides))); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 695; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __pyx_r = __pyx_t_11; __pyx_t_11 = 0; goto __pyx_L0; /* "pandas/algos.pyx":668 * # Series: Prentice-Hall Series in Automatic Computation * * def kth_smallest(ndarray[double_t] a, Py_ssize_t k): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i,j,l,m,n */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_11); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_a.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.kth_smallest", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_a.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/algos.pyx":697 * return a[k] * * cdef inline kth_smallest_c(float64_t* a, Py_ssize_t k, Py_ssize_t n): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i,j,l,m */ static CYTHON_INLINE PyObject *__pyx_f_6pandas_5algos_kth_smallest_c(__pyx_t_5numpy_float64_t *__pyx_v_a, Py_ssize_t __pyx_v_k, Py_ssize_t __pyx_v_n) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_l; Py_ssize_t __pyx_v_m; __pyx_t_5numpy_double_t __pyx_v_x; __pyx_t_5numpy_double_t __pyx_v_t; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("kth_smallest_c", 0); /* "pandas/algos.pyx":702 * double_t x, t * * l = 0 # <<<<<<<<<<<<<< * m = n-1 * while (l j: break */ __pyx_v_i = (__pyx_v_i + 1); __pyx_v_j = (__pyx_v_j - 1); goto __pyx_L11; } __pyx_L11:; /* "pandas/algos.pyx":718 * i += 1; j -= 1 * * if i > j: break # <<<<<<<<<<<<<< * * if j < k: l = i */ __pyx_t_1 = ((__pyx_v_i > __pyx_v_j) != 0); if (__pyx_t_1) { goto __pyx_L6_break; } } __pyx_L6_break:; /* "pandas/algos.pyx":720 * if i > j: break * * if j < k: l = i # <<<<<<<<<<<<<< * if k < i: m = j * return a[k] */ __pyx_t_1 = ((__pyx_v_j < __pyx_v_k) != 0); if (__pyx_t_1) { __pyx_v_l = __pyx_v_i; goto __pyx_L13; } __pyx_L13:; /* "pandas/algos.pyx":721 * * if j < k: l = i * if k < i: m = j # <<<<<<<<<<<<<< * return a[k] * */ __pyx_t_1 = ((__pyx_v_k < __pyx_v_i) != 0); if (__pyx_t_1) { __pyx_v_m = __pyx_v_j; goto __pyx_L14; } __pyx_L14:; } /* "pandas/algos.pyx":722 * if j < k: l = i * if k < i: m = j * return a[k] # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = PyFloat_FromDouble((__pyx_v_a[__pyx_v_k])); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 722; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "pandas/algos.pyx":697 * return a[k] * * cdef inline kth_smallest_c(float64_t* a, Py_ssize_t k, Py_ssize_t n): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i,j,l,m */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("pandas.algos.kth_smallest_c", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/algos.pyx":725 * * * def median(ndarray arr): # <<<<<<<<<<<<<< * ''' * A faster median */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_17median(PyObject *__pyx_self, PyObject *__pyx_v_arr); /*proto*/ static char __pyx_doc_6pandas_5algos_16median[] = "\n A faster median\n "; static PyMethodDef __pyx_mdef_6pandas_5algos_17median = {__Pyx_NAMESTR("median"), (PyCFunction)__pyx_pw_6pandas_5algos_17median, METH_O, __Pyx_DOCSTR(__pyx_doc_6pandas_5algos_16median)}; static PyObject *__pyx_pw_6pandas_5algos_17median(PyObject *__pyx_self, PyObject *__pyx_v_arr) { CYTHON_UNUSED int __pyx_lineno = 0; CYTHON_UNUSED const char *__pyx_filename = NULL; CYTHON_UNUSED int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("median (wrapper)", 0); if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_arr), __pyx_ptype_5numpy_ndarray, 1, "arr", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 725; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_16median(__pyx_self, ((PyArrayObject *)__pyx_v_arr)); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5algos_16median(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_arr) { int __pyx_v_n; 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("median", 0); __Pyx_INCREF((PyObject *)__pyx_v_arr); /* "pandas/algos.pyx":729 * A faster median * ''' * cdef int n = len(arr) # <<<<<<<<<<<<<< * * if len(arr) == 0: */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_arr)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 729; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/algos.pyx":731 * cdef int n = len(arr) * * if len(arr) == 0: # <<<<<<<<<<<<<< * return np.NaN * */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_arr)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 731; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_2 = ((__pyx_t_1 == 0) != 0); if (__pyx_t_2) { /* "pandas/algos.pyx":732 * * if len(arr) == 0: * return np.NaN # <<<<<<<<<<<<<< * * arr = arr.copy() */ __Pyx_XDECREF(__pyx_r); __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 732; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_NaN); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 732; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; } /* "pandas/algos.pyx":734 * return np.NaN * * arr = arr.copy() # <<<<<<<<<<<<<< * * if n % 2: */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_arr), __pyx_n_s_copy); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 734; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = PyObject_Call(__pyx_t_4, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 734; __pyx_clineno = __LINE__; goto __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_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 734; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_3)); __pyx_t_3 = 0; /* "pandas/algos.pyx":736 * arr = arr.copy() * * if n % 2: # <<<<<<<<<<<<<< * return kth_smallest(arr, n / 2) * else: */ __pyx_t_2 = (__Pyx_mod_long(__pyx_v_n, 2) != 0); if (__pyx_t_2) { /* "pandas/algos.pyx":737 * * if n % 2: * return kth_smallest(arr, n / 2) # <<<<<<<<<<<<<< * else: * return (kth_smallest(arr, n / 2) + */ __Pyx_XDECREF(__pyx_r); __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_kth_smallest); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 737; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyInt_From_long(__Pyx_div_long(__pyx_v_n, 2)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 737; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 737; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(((PyObject *)__pyx_v_arr)); PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_v_arr)); __Pyx_GIVEREF(((PyObject *)__pyx_v_arr)); PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 737; __pyx_clineno = __LINE__; goto __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_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; } /*else*/ { /* "pandas/algos.pyx":739 * return kth_smallest(arr, n / 2) * else: * return (kth_smallest(arr, n / 2) + # <<<<<<<<<<<<<< * kth_smallest(arr, n / 2 - 1)) / 2 * */ __Pyx_XDECREF(__pyx_r); __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_kth_smallest); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 739; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyInt_From_long(__Pyx_div_long(__pyx_v_n, 2)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 739; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 739; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(((PyObject *)__pyx_v_arr)); PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_v_arr)); __Pyx_GIVEREF(((PyObject *)__pyx_v_arr)); PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyObject_Call(__pyx_t_4, __pyx_t_3, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 739; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/algos.pyx":740 * else: * return (kth_smallest(arr, n / 2) + * kth_smallest(arr, n / 2 - 1)) / 2 # <<<<<<<<<<<<<< * * */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_kth_smallest); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 740; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyInt_From_long((__Pyx_div_long(__pyx_v_n, 2) - 1)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 740; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 740; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(((PyObject *)__pyx_v_arr)); PyTuple_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_v_arr)); __Pyx_GIVEREF(((PyObject *)__pyx_v_arr)); PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 740; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; /* "pandas/algos.pyx":739 * return kth_smallest(arr, n / 2) * else: * return (kth_smallest(arr, n / 2) + # <<<<<<<<<<<<<< * kth_smallest(arr, n / 2 - 1)) / 2 * */ __pyx_t_6 = PyNumber_Add(__pyx_t_5, __pyx_t_4); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 739; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "pandas/algos.pyx":740 * else: * return (kth_smallest(arr, n / 2) + * kth_smallest(arr, n / 2 - 1)) / 2 # <<<<<<<<<<<<<< * * */ __pyx_t_4 = __Pyx_PyNumber_Divide(__pyx_t_6, __pyx_int_2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 740; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; } /* "pandas/algos.pyx":725 * * * def median(ndarray arr): # <<<<<<<<<<<<<< * ''' * A faster median */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("pandas.algos.median", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_arr); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/algos.pyx":745 * # -------------- Min, Max subsequence * * def max_subseq(ndarray[double_t] arr): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i=0,s=0,e=0,T,n */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_19max_subseq(PyObject *__pyx_self, PyObject *__pyx_v_arr); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_19max_subseq = {__Pyx_NAMESTR("max_subseq"), (PyCFunction)__pyx_pw_6pandas_5algos_19max_subseq, METH_O, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_19max_subseq(PyObject *__pyx_self, PyObject *__pyx_v_arr) { CYTHON_UNUSED int __pyx_lineno = 0; CYTHON_UNUSED const char *__pyx_filename = NULL; CYTHON_UNUSED int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("max_subseq (wrapper)", 0); if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_arr), __pyx_ptype_5numpy_ndarray, 1, "arr", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 745; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_18max_subseq(__pyx_self, ((PyArrayObject *)__pyx_v_arr)); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5algos_18max_subseq(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_arr) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_s; Py_ssize_t __pyx_v_e; Py_ssize_t __pyx_v_T; Py_ssize_t __pyx_v_n; double __pyx_v_m; double __pyx_v_S; __Pyx_LocalBuf_ND __pyx_pybuffernd_arr; __Pyx_Buffer __pyx_pybuffer_arr; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; int __pyx_t_2; long __pyx_t_3; int __pyx_t_4; Py_ssize_t __pyx_t_5; Py_ssize_t __pyx_t_6; Py_ssize_t __pyx_t_7; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; PyObject *__pyx_t_11 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("max_subseq", 0); __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_nn___pyx_t_5numpy_double_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 745; __pyx_clineno = __LINE__; goto __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/algos.pyx":747 * def max_subseq(ndarray[double_t] arr): * cdef: * Py_ssize_t i=0,s=0,e=0,T,n # <<<<<<<<<<<<<< * double m, S * */ __pyx_v_i = 0; __pyx_v_s = 0; __pyx_v_e = 0; /* "pandas/algos.pyx":750 * double m, S * * n = len(arr) # <<<<<<<<<<<<<< * * if len(arr) == 0: */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_arr)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 750; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/algos.pyx":752 * n = len(arr) * * if len(arr) == 0: # <<<<<<<<<<<<<< * return (-1,-1,None) * */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_arr)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 752; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_2 = ((__pyx_t_1 == 0) != 0); if (__pyx_t_2) { /* "pandas/algos.pyx":753 * * if len(arr) == 0: * return (-1,-1,None) # <<<<<<<<<<<<<< * * m = arr[0] */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_tuple__28); __pyx_r = __pyx_tuple__28; goto __pyx_L0; } /* "pandas/algos.pyx":755 * return (-1,-1,None) * * m = arr[0] # <<<<<<<<<<<<<< * S = m * T = 0 */ __pyx_t_3 = 0; __pyx_t_4 = -1; if (__pyx_t_3 < 0) { __pyx_t_3 += __pyx_pybuffernd_arr.diminfo[0].shape; if (unlikely(__pyx_t_3 < 0)) __pyx_t_4 = 0; } else if (unlikely(__pyx_t_3 >= __pyx_pybuffernd_arr.diminfo[0].shape)) __pyx_t_4 = 0; if (unlikely(__pyx_t_4 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_4); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 755; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_m = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_double_t *, __pyx_pybuffernd_arr.rcbuffer->pybuffer.buf, __pyx_t_3, __pyx_pybuffernd_arr.diminfo[0].strides)); /* "pandas/algos.pyx":756 * * m = arr[0] * S = m # <<<<<<<<<<<<<< * T = 0 * */ __pyx_v_S = __pyx_v_m; /* "pandas/algos.pyx":757 * m = arr[0] * S = m * T = 0 # <<<<<<<<<<<<<< * * for i in range(1, n): */ __pyx_v_T = 0; /* "pandas/algos.pyx":759 * T = 0 * * for i in range(1, n): # <<<<<<<<<<<<<< * # S = max { S + A[i], A[i] ) * if (S > 0): */ __pyx_t_1 = __pyx_v_n; for (__pyx_t_5 = 1; __pyx_t_5 < __pyx_t_1; __pyx_t_5+=1) { __pyx_v_i = __pyx_t_5; /* "pandas/algos.pyx":761 * for i in range(1, n): * # S = max { S + A[i], A[i] ) * if (S > 0): # <<<<<<<<<<<<<< * S = S + arr[i] * else: */ __pyx_t_2 = ((__pyx_v_S > 0.0) != 0); if (__pyx_t_2) { /* "pandas/algos.pyx":762 * # S = max { S + A[i], A[i] ) * if (S > 0): * S = S + arr[i] # <<<<<<<<<<<<<< * else: * S = arr[i] */ __pyx_t_6 = __pyx_v_i; __pyx_t_4 = -1; if (__pyx_t_6 < 0) { __pyx_t_6 += __pyx_pybuffernd_arr.diminfo[0].shape; if (unlikely(__pyx_t_6 < 0)) __pyx_t_4 = 0; } else if (unlikely(__pyx_t_6 >= __pyx_pybuffernd_arr.diminfo[0].shape)) __pyx_t_4 = 0; if (unlikely(__pyx_t_4 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_4); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 762; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_S = (__pyx_v_S + (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_double_t *, __pyx_pybuffernd_arr.rcbuffer->pybuffer.buf, __pyx_t_6, __pyx_pybuffernd_arr.diminfo[0].strides))); goto __pyx_L6; } /*else*/ { /* "pandas/algos.pyx":764 * S = S + arr[i] * else: * S = arr[i] # <<<<<<<<<<<<<< * T = i * if S > m: */ __pyx_t_7 = __pyx_v_i; __pyx_t_4 = -1; if (__pyx_t_7 < 0) { __pyx_t_7 += __pyx_pybuffernd_arr.diminfo[0].shape; if (unlikely(__pyx_t_7 < 0)) __pyx_t_4 = 0; } else if (unlikely(__pyx_t_7 >= __pyx_pybuffernd_arr.diminfo[0].shape)) __pyx_t_4 = 0; if (unlikely(__pyx_t_4 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_4); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 764; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_S = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_double_t *, __pyx_pybuffernd_arr.rcbuffer->pybuffer.buf, __pyx_t_7, __pyx_pybuffernd_arr.diminfo[0].strides)); /* "pandas/algos.pyx":765 * else: * S = arr[i] * T = i # <<<<<<<<<<<<<< * if S > m: * s = T */ __pyx_v_T = __pyx_v_i; } __pyx_L6:; /* "pandas/algos.pyx":766 * S = arr[i] * T = i * if S > m: # <<<<<<<<<<<<<< * s = T * e = i */ __pyx_t_2 = ((__pyx_v_S > __pyx_v_m) != 0); if (__pyx_t_2) { /* "pandas/algos.pyx":767 * T = i * if S > m: * s = T # <<<<<<<<<<<<<< * e = i * m = S */ __pyx_v_s = __pyx_v_T; /* "pandas/algos.pyx":768 * if S > m: * s = T * e = i # <<<<<<<<<<<<<< * m = S * */ __pyx_v_e = __pyx_v_i; /* "pandas/algos.pyx":769 * s = T * e = i * m = S # <<<<<<<<<<<<<< * * return (s, e, m) */ __pyx_v_m = __pyx_v_S; goto __pyx_L7; } __pyx_L7:; } /* "pandas/algos.pyx":771 * m = S * * return (s, e, m) # <<<<<<<<<<<<<< * * def min_subseq(ndarray[double_t] arr): */ __Pyx_XDECREF(__pyx_r); __pyx_t_8 = PyInt_FromSsize_t(__pyx_v_s); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 771; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_9 = PyInt_FromSsize_t(__pyx_v_e); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 771; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_t_10 = PyFloat_FromDouble(__pyx_v_m); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 771; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __pyx_t_11 = PyTuple_New(3); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 771; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_8); __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_11, 1, __pyx_t_9); __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_11, 2, __pyx_t_10); __Pyx_GIVEREF(__pyx_t_10); __pyx_t_8 = 0; __pyx_t_9 = 0; __pyx_t_10 = 0; __pyx_r = __pyx_t_11; __pyx_t_11 = 0; goto __pyx_L0; /* "pandas/algos.pyx":745 * # -------------- Min, Max subsequence * * def max_subseq(ndarray[double_t] arr): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i=0,s=0,e=0,T,n */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); __Pyx_XDECREF(__pyx_t_10); __Pyx_XDECREF(__pyx_t_11); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_arr.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.max_subseq", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_arr.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/algos.pyx":773 * return (s, e, m) * * def min_subseq(ndarray[double_t] arr): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t s, e */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_21min_subseq(PyObject *__pyx_self, PyObject *__pyx_v_arr); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_21min_subseq = {__Pyx_NAMESTR("min_subseq"), (PyCFunction)__pyx_pw_6pandas_5algos_21min_subseq, METH_O, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_21min_subseq(PyObject *__pyx_self, PyObject *__pyx_v_arr) { CYTHON_UNUSED int __pyx_lineno = 0; CYTHON_UNUSED const char *__pyx_filename = NULL; CYTHON_UNUSED int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("min_subseq (wrapper)", 0); if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_arr), __pyx_ptype_5numpy_ndarray, 1, "arr", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 773; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_20min_subseq(__pyx_self, ((PyArrayObject *)__pyx_v_arr)); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5algos_20min_subseq(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_arr) { Py_ssize_t __pyx_v_s; Py_ssize_t __pyx_v_e; double __pyx_v_m; __Pyx_LocalBuf_ND __pyx_pybuffernd_arr; __Pyx_Buffer __pyx_pybuffer_arr; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *(*__pyx_t_6)(PyObject *); Py_ssize_t __pyx_t_7; Py_ssize_t __pyx_t_8; double __pyx_t_9; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("min_subseq", 0); __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_nn___pyx_t_5numpy_double_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 773; __pyx_clineno = __LINE__; goto __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/algos.pyx":778 * double m * * (s, e, m) = max_subseq(-arr) # <<<<<<<<<<<<<< * * return (s, e, -m) */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_max_subseq); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 778; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyNumber_Negative(((PyObject *)__pyx_v_arr)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 778; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 778; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_Call(__pyx_t_1, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 778; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if ((likely(PyTuple_CheckExact(__pyx_t_2))) || (PyList_CheckExact(__pyx_t_2))) { PyObject* sequence = __pyx_t_2; #if CYTHON_COMPILING_IN_CPYTHON Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 3)) { if (size > 3) __Pyx_RaiseTooManyValuesError(3); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 778; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_1 = PyTuple_GET_ITEM(sequence, 1); __pyx_t_4 = PyTuple_GET_ITEM(sequence, 2); } else { __pyx_t_3 = PyList_GET_ITEM(sequence, 0); __pyx_t_1 = PyList_GET_ITEM(sequence, 1); __pyx_t_4 = PyList_GET_ITEM(sequence, 2); } __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(__pyx_t_1); __Pyx_INCREF(__pyx_t_4); #else __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 778; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 778; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 778; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); #endif __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } else { Py_ssize_t index = -1; __pyx_t_5 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 778; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_6 = Py_TYPE(__pyx_t_5)->tp_iternext; index = 0; __pyx_t_3 = __pyx_t_6(__pyx_t_5); if (unlikely(!__pyx_t_3)) goto __pyx_L3_unpacking_failed; __Pyx_GOTREF(__pyx_t_3); index = 1; __pyx_t_1 = __pyx_t_6(__pyx_t_5); if (unlikely(!__pyx_t_1)) goto __pyx_L3_unpacking_failed; __Pyx_GOTREF(__pyx_t_1); index = 2; __pyx_t_4 = __pyx_t_6(__pyx_t_5); if (unlikely(!__pyx_t_4)) goto __pyx_L3_unpacking_failed; __Pyx_GOTREF(__pyx_t_4); if (__Pyx_IternextUnpackEndCheck(__pyx_t_6(__pyx_t_5), 3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 778; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_6 = NULL; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; goto __pyx_L4_unpacking_done; __pyx_L3_unpacking_failed:; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_6 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 778; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_L4_unpacking_done:; } __pyx_t_7 = __Pyx_PyIndex_AsSsize_t(__pyx_t_3); if (unlikely((__pyx_t_7 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 778; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_8 = __Pyx_PyIndex_AsSsize_t(__pyx_t_1); if (unlikely((__pyx_t_8 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 778; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_9 = __pyx_PyFloat_AsDouble(__pyx_t_4); if (unlikely((__pyx_t_9 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 778; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_s = __pyx_t_7; __pyx_v_e = __pyx_t_8; __pyx_v_m = __pyx_t_9; /* "pandas/algos.pyx":780 * (s, e, m) = max_subseq(-arr) * * return (s, e, -m) # <<<<<<<<<<<<<< * * #------------------------------------------------------------------------------- */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_s); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 780; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = PyInt_FromSsize_t(__pyx_v_e); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 780; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_1 = PyFloat_FromDouble((-__pyx_v_m)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 780; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 780; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_2 = 0; __pyx_t_4 = 0; __pyx_t_1 = 0; __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; /* "pandas/algos.pyx":773 * return (s, e, m) * * def min_subseq(ndarray[double_t] arr): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t s, e */ /* 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_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_arr.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.min_subseq", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_arr.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/algos.pyx":785 * # Rolling sum * * def roll_sum(ndarray[double_t] input, int win, int minp): # <<<<<<<<<<<<<< * cdef double val, prev, sum_x = 0 * cdef int nobs = 0, i */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_23roll_sum(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_23roll_sum = {__Pyx_NAMESTR("roll_sum"), (PyCFunction)__pyx_pw_6pandas_5algos_23roll_sum, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_23roll_sum(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_input = 0; int __pyx_v_win; int __pyx_v_minp; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("roll_sum (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_input,&__pyx_n_s_win,&__pyx_n_s_minp,0}; PyObject* values[3] = {0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_input)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_win)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("roll_sum", 1, 3, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 785; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_minp)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("roll_sum", 1, 3, 3, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 785; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "roll_sum") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 785; __pyx_clineno = __LINE__; goto __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_input = ((PyArrayObject *)values[0]); __pyx_v_win = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_win == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 785; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_minp = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_minp == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 785; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("roll_sum", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 785; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.roll_sum", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_input), __pyx_ptype_5numpy_ndarray, 1, "input", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 785; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_22roll_sum(__pyx_self, __pyx_v_input, __pyx_v_win, __pyx_v_minp); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5algos_22roll_sum(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_input, int __pyx_v_win, int __pyx_v_minp) { double __pyx_v_val; double __pyx_v_prev; double __pyx_v_sum_x; int __pyx_v_nobs; int __pyx_v_i; int __pyx_v_N; PyArrayObject *__pyx_v_output = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_input; __Pyx_Buffer __pyx_pybuffer_input; __Pyx_LocalBuf_ND __pyx_pybuffernd_output; __Pyx_Buffer __pyx_pybuffer_output; 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; PyArrayObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; int __pyx_t_8; long __pyx_t_9; int __pyx_t_10; int __pyx_t_11; int __pyx_t_12; int __pyx_t_13; int __pyx_t_14; int __pyx_t_15; int __pyx_t_16; int __pyx_t_17; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("roll_sum", 0); __pyx_pybuffer_output.pybuffer.buf = NULL; __pyx_pybuffer_output.refcount = 0; __pyx_pybuffernd_output.data = NULL; __pyx_pybuffernd_output.rcbuffer = &__pyx_pybuffer_output; __pyx_pybuffer_input.pybuffer.buf = NULL; __pyx_pybuffer_input.refcount = 0; __pyx_pybuffernd_input.data = NULL; __pyx_pybuffernd_input.rcbuffer = &__pyx_pybuffer_input; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_input.rcbuffer->pybuffer, (PyObject*)__pyx_v_input, &__Pyx_TypeInfo_nn___pyx_t_5numpy_double_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 785; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_input.diminfo[0].strides = __pyx_pybuffernd_input.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_input.diminfo[0].shape = __pyx_pybuffernd_input.rcbuffer->pybuffer.shape[0]; /* "pandas/algos.pyx":786 * * def roll_sum(ndarray[double_t] input, int win, int minp): * cdef double val, prev, sum_x = 0 # <<<<<<<<<<<<<< * cdef int nobs = 0, i * cdef int N = len(input) */ __pyx_v_sum_x = 0.0; /* "pandas/algos.pyx":787 * def roll_sum(ndarray[double_t] input, int win, int minp): * cdef double val, prev, sum_x = 0 * cdef int nobs = 0, i # <<<<<<<<<<<<<< * cdef int N = len(input) * */ __pyx_v_nobs = 0; /* "pandas/algos.pyx":788 * cdef double val, prev, sum_x = 0 * cdef int nobs = 0, i * cdef int N = len(input) # <<<<<<<<<<<<<< * * cdef ndarray[double_t] output = np.empty(N, dtype=float) */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_input)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 788; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_N = __pyx_t_1; /* "pandas/algos.pyx":790 * cdef int N = len(input) * * cdef ndarray[double_t] output = np.empty(N, dtype=float) # <<<<<<<<<<<<<< * * minp = _check_minp(win, minp, N) */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 790; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 790; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_N); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 790; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 790; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 790; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_dtype, ((PyObject *)((PyObject*)(&PyFloat_Type)))) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 790; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_5 = PyObject_Call(__pyx_t_3, __pyx_t_4, __pyx_t_2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 790; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 790; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_6 = ((PyArrayObject *)__pyx_t_5); { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_output.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_nn___pyx_t_5numpy_double_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { __pyx_v_output = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_output.rcbuffer->pybuffer.buf = NULL; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 790; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } else {__pyx_pybuffernd_output.diminfo[0].strides = __pyx_pybuffernd_output.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_output.diminfo[0].shape = __pyx_pybuffernd_output.rcbuffer->pybuffer.shape[0]; } } __pyx_t_6 = 0; __pyx_v_output = ((PyArrayObject *)__pyx_t_5); __pyx_t_5 = 0; /* "pandas/algos.pyx":792 * cdef ndarray[double_t] output = np.empty(N, dtype=float) * * minp = _check_minp(win, minp, N) # <<<<<<<<<<<<<< * * for i from 0 <= i < minp - 1: */ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_check_minp); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 792; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_win); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 792; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_minp); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 792; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_N); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 792; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_7 = PyTuple_New(3); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 792; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_7, 2, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_2 = 0; __pyx_t_4 = 0; __pyx_t_3 = 0; __pyx_t_3 = PyObject_Call(__pyx_t_5, __pyx_t_7, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 792; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_8 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 792; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_minp = __pyx_t_8; /* "pandas/algos.pyx":794 * minp = _check_minp(win, minp, N) * * for i from 0 <= i < minp - 1: # <<<<<<<<<<<<<< * val = input[i] * */ __pyx_t_9 = (__pyx_v_minp - 1); for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_9; __pyx_v_i++) { /* "pandas/algos.pyx":795 * * for i from 0 <= i < minp - 1: * val = input[i] # <<<<<<<<<<<<<< * * # Not NaN */ __pyx_t_8 = __pyx_v_i; __pyx_t_10 = -1; if (__pyx_t_8 < 0) { __pyx_t_8 += __pyx_pybuffernd_input.diminfo[0].shape; if (unlikely(__pyx_t_8 < 0)) __pyx_t_10 = 0; } else if (unlikely(__pyx_t_8 >= __pyx_pybuffernd_input.diminfo[0].shape)) __pyx_t_10 = 0; if (unlikely(__pyx_t_10 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_10); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 795; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_val = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_double_t *, __pyx_pybuffernd_input.rcbuffer->pybuffer.buf, __pyx_t_8, __pyx_pybuffernd_input.diminfo[0].strides)); /* "pandas/algos.pyx":798 * * # Not NaN * if val == val: # <<<<<<<<<<<<<< * nobs += 1 * sum_x += val */ __pyx_t_11 = ((__pyx_v_val == __pyx_v_val) != 0); if (__pyx_t_11) { /* "pandas/algos.pyx":799 * # Not NaN * if val == val: * nobs += 1 # <<<<<<<<<<<<<< * sum_x += val * */ __pyx_v_nobs = (__pyx_v_nobs + 1); /* "pandas/algos.pyx":800 * if val == val: * nobs += 1 * sum_x += val # <<<<<<<<<<<<<< * * output[i] = NaN */ __pyx_v_sum_x = (__pyx_v_sum_x + __pyx_v_val); goto __pyx_L5; } __pyx_L5:; /* "pandas/algos.pyx":802 * sum_x += val * * output[i] = NaN # <<<<<<<<<<<<<< * * for i from minp - 1 <= i < N: */ __pyx_t_10 = __pyx_v_i; __pyx_t_12 = -1; if (__pyx_t_10 < 0) { __pyx_t_10 += __pyx_pybuffernd_output.diminfo[0].shape; if (unlikely(__pyx_t_10 < 0)) __pyx_t_12 = 0; } else if (unlikely(__pyx_t_10 >= __pyx_pybuffernd_output.diminfo[0].shape)) __pyx_t_12 = 0; if (unlikely(__pyx_t_12 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_12); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 802; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_double_t *, __pyx_pybuffernd_output.rcbuffer->pybuffer.buf, __pyx_t_10, __pyx_pybuffernd_output.diminfo[0].strides) = __pyx_v_6pandas_5algos_NaN; } /* "pandas/algos.pyx":804 * output[i] = NaN * * for i from minp - 1 <= i < N: # <<<<<<<<<<<<<< * val = input[i] * */ __pyx_t_12 = __pyx_v_N; for (__pyx_v_i = (__pyx_v_minp - 1); __pyx_v_i < __pyx_t_12; __pyx_v_i++) { /* "pandas/algos.pyx":805 * * for i from minp - 1 <= i < N: * val = input[i] # <<<<<<<<<<<<<< * * if val == val: */ __pyx_t_13 = __pyx_v_i; __pyx_t_14 = -1; if (__pyx_t_13 < 0) { __pyx_t_13 += __pyx_pybuffernd_input.diminfo[0].shape; if (unlikely(__pyx_t_13 < 0)) __pyx_t_14 = 0; } else if (unlikely(__pyx_t_13 >= __pyx_pybuffernd_input.diminfo[0].shape)) __pyx_t_14 = 0; if (unlikely(__pyx_t_14 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_14); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 805; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_val = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_double_t *, __pyx_pybuffernd_input.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_input.diminfo[0].strides)); /* "pandas/algos.pyx":807 * val = input[i] * * if val == val: # <<<<<<<<<<<<<< * nobs += 1 * sum_x += val */ __pyx_t_11 = ((__pyx_v_val == __pyx_v_val) != 0); if (__pyx_t_11) { /* "pandas/algos.pyx":808 * * if val == val: * nobs += 1 # <<<<<<<<<<<<<< * sum_x += val * */ __pyx_v_nobs = (__pyx_v_nobs + 1); /* "pandas/algos.pyx":809 * if val == val: * nobs += 1 * sum_x += val # <<<<<<<<<<<<<< * * if i > win - 1: */ __pyx_v_sum_x = (__pyx_v_sum_x + __pyx_v_val); goto __pyx_L8; } __pyx_L8:; /* "pandas/algos.pyx":811 * sum_x += val * * if i > win - 1: # <<<<<<<<<<<<<< * prev = input[i - win] * if prev == prev: */ __pyx_t_11 = ((__pyx_v_i > (__pyx_v_win - 1)) != 0); if (__pyx_t_11) { /* "pandas/algos.pyx":812 * * if i > win - 1: * prev = input[i - win] # <<<<<<<<<<<<<< * if prev == prev: * sum_x -= prev */ __pyx_t_14 = (__pyx_v_i - __pyx_v_win); __pyx_t_15 = -1; if (__pyx_t_14 < 0) { __pyx_t_14 += __pyx_pybuffernd_input.diminfo[0].shape; if (unlikely(__pyx_t_14 < 0)) __pyx_t_15 = 0; } else if (unlikely(__pyx_t_14 >= __pyx_pybuffernd_input.diminfo[0].shape)) __pyx_t_15 = 0; if (unlikely(__pyx_t_15 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_15); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 812; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_prev = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_double_t *, __pyx_pybuffernd_input.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_input.diminfo[0].strides)); /* "pandas/algos.pyx":813 * if i > win - 1: * prev = input[i - win] * if prev == prev: # <<<<<<<<<<<<<< * sum_x -= prev * nobs -= 1 */ __pyx_t_11 = ((__pyx_v_prev == __pyx_v_prev) != 0); if (__pyx_t_11) { /* "pandas/algos.pyx":814 * prev = input[i - win] * if prev == prev: * sum_x -= prev # <<<<<<<<<<<<<< * nobs -= 1 * */ __pyx_v_sum_x = (__pyx_v_sum_x - __pyx_v_prev); /* "pandas/algos.pyx":815 * if prev == prev: * sum_x -= prev * nobs -= 1 # <<<<<<<<<<<<<< * * if nobs >= minp: */ __pyx_v_nobs = (__pyx_v_nobs - 1); goto __pyx_L10; } __pyx_L10:; goto __pyx_L9; } __pyx_L9:; /* "pandas/algos.pyx":817 * nobs -= 1 * * if nobs >= minp: # <<<<<<<<<<<<<< * output[i] = sum_x * else: */ __pyx_t_11 = ((__pyx_v_nobs >= __pyx_v_minp) != 0); if (__pyx_t_11) { /* "pandas/algos.pyx":818 * * if nobs >= minp: * output[i] = sum_x # <<<<<<<<<<<<<< * else: * output[i] = NaN */ __pyx_t_15 = __pyx_v_i; __pyx_t_16 = -1; if (__pyx_t_15 < 0) { __pyx_t_15 += __pyx_pybuffernd_output.diminfo[0].shape; if (unlikely(__pyx_t_15 < 0)) __pyx_t_16 = 0; } else if (unlikely(__pyx_t_15 >= __pyx_pybuffernd_output.diminfo[0].shape)) __pyx_t_16 = 0; if (unlikely(__pyx_t_16 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_16); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 818; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_double_t *, __pyx_pybuffernd_output.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_output.diminfo[0].strides) = __pyx_v_sum_x; goto __pyx_L11; } /*else*/ { /* "pandas/algos.pyx":820 * output[i] = sum_x * else: * output[i] = NaN # <<<<<<<<<<<<<< * * return output */ __pyx_t_16 = __pyx_v_i; __pyx_t_17 = -1; if (__pyx_t_16 < 0) { __pyx_t_16 += __pyx_pybuffernd_output.diminfo[0].shape; if (unlikely(__pyx_t_16 < 0)) __pyx_t_17 = 0; } else if (unlikely(__pyx_t_16 >= __pyx_pybuffernd_output.diminfo[0].shape)) __pyx_t_17 = 0; if (unlikely(__pyx_t_17 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_17); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 820; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_double_t *, __pyx_pybuffernd_output.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_output.diminfo[0].strides) = __pyx_v_6pandas_5algos_NaN; } __pyx_L11:; } /* "pandas/algos.pyx":822 * output[i] = NaN * * return output # <<<<<<<<<<<<<< * * #------------------------------------------------------------------------------- */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_output)); __pyx_r = ((PyObject *)__pyx_v_output); goto __pyx_L0; /* "pandas/algos.pyx":785 * # Rolling sum * * def roll_sum(ndarray[double_t] input, int win, int minp): # <<<<<<<<<<<<<< * cdef double val, prev, sum_x = 0 * cdef int nobs = 0, 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_7); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_input.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_output.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.roll_sum", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_input.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_output.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_output); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/algos.pyx":827 * # Rolling mean * * def roll_mean(ndarray[double_t] input, # <<<<<<<<<<<<<< * int win, int minp): * cdef: */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_25roll_mean(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_25roll_mean = {__Pyx_NAMESTR("roll_mean"), (PyCFunction)__pyx_pw_6pandas_5algos_25roll_mean, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_25roll_mean(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_input = 0; int __pyx_v_win; int __pyx_v_minp; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("roll_mean (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_input,&__pyx_n_s_win,&__pyx_n_s_minp,0}; PyObject* values[3] = {0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_input)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_win)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("roll_mean", 1, 3, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 827; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_minp)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("roll_mean", 1, 3, 3, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 827; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "roll_mean") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 827; __pyx_clineno = __LINE__; goto __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_input = ((PyArrayObject *)values[0]); __pyx_v_win = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_win == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 828; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_minp = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_minp == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 828; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("roll_mean", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 827; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.roll_mean", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_input), __pyx_ptype_5numpy_ndarray, 1, "input", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 827; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_24roll_mean(__pyx_self, __pyx_v_input, __pyx_v_win, __pyx_v_minp); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5algos_24roll_mean(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_input, int __pyx_v_win, int __pyx_v_minp) { double __pyx_v_val; double __pyx_v_prev; double __pyx_v_result; double __pyx_v_sum_x; Py_ssize_t __pyx_v_nobs; Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_neg_ct; Py_ssize_t __pyx_v_N; PyArrayObject *__pyx_v_output = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_input; __Pyx_Buffer __pyx_pybuffer_input; __Pyx_LocalBuf_ND __pyx_pybuffernd_output; __Pyx_Buffer __pyx_pybuffer_output; 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; PyArrayObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; int __pyx_t_8; long __pyx_t_9; int __pyx_t_10; Py_ssize_t __pyx_t_11; 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; Py_ssize_t __pyx_t_18; Py_ssize_t __pyx_t_19; Py_ssize_t __pyx_t_20; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("roll_mean", 0); __pyx_pybuffer_output.pybuffer.buf = NULL; __pyx_pybuffer_output.refcount = 0; __pyx_pybuffernd_output.data = NULL; __pyx_pybuffernd_output.rcbuffer = &__pyx_pybuffer_output; __pyx_pybuffer_input.pybuffer.buf = NULL; __pyx_pybuffer_input.refcount = 0; __pyx_pybuffernd_input.data = NULL; __pyx_pybuffernd_input.rcbuffer = &__pyx_pybuffer_input; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_input.rcbuffer->pybuffer, (PyObject*)__pyx_v_input, &__Pyx_TypeInfo_nn___pyx_t_5numpy_double_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 827; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_input.diminfo[0].strides = __pyx_pybuffernd_input.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_input.diminfo[0].shape = __pyx_pybuffernd_input.rcbuffer->pybuffer.shape[0]; /* "pandas/algos.pyx":830 * int win, int minp): * cdef: * double val, prev, result, sum_x = 0 # <<<<<<<<<<<<<< * Py_ssize_t nobs = 0, i, neg_ct = 0 * Py_ssize_t N = len(input) */ __pyx_v_sum_x = 0.0; /* "pandas/algos.pyx":831 * cdef: * double val, prev, result, sum_x = 0 * Py_ssize_t nobs = 0, i, neg_ct = 0 # <<<<<<<<<<<<<< * Py_ssize_t N = len(input) * */ __pyx_v_nobs = 0; __pyx_v_neg_ct = 0; /* "pandas/algos.pyx":832 * double val, prev, result, sum_x = 0 * Py_ssize_t nobs = 0, i, neg_ct = 0 * Py_ssize_t N = len(input) # <<<<<<<<<<<<<< * * cdef ndarray[double_t] output = np.empty(N, dtype=float) */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_input)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 832; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_N = __pyx_t_1; /* "pandas/algos.pyx":834 * Py_ssize_t N = len(input) * * cdef ndarray[double_t] output = np.empty(N, dtype=float) # <<<<<<<<<<<<<< * minp = _check_minp(win, minp, N) * */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 834; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 834; __pyx_clineno = __LINE__; goto __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_N); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 834; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 834; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 834; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_dtype, ((PyObject *)((PyObject*)(&PyFloat_Type)))) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 834; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_5 = PyObject_Call(__pyx_t_3, __pyx_t_4, __pyx_t_2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 834; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 834; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_6 = ((PyArrayObject *)__pyx_t_5); { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_output.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_nn___pyx_t_5numpy_double_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { __pyx_v_output = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_output.rcbuffer->pybuffer.buf = NULL; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 834; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } else {__pyx_pybuffernd_output.diminfo[0].strides = __pyx_pybuffernd_output.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_output.diminfo[0].shape = __pyx_pybuffernd_output.rcbuffer->pybuffer.shape[0]; } } __pyx_t_6 = 0; __pyx_v_output = ((PyArrayObject *)__pyx_t_5); __pyx_t_5 = 0; /* "pandas/algos.pyx":835 * * cdef ndarray[double_t] output = np.empty(N, dtype=float) * minp = _check_minp(win, minp, N) # <<<<<<<<<<<<<< * * for i from 0 <= i < minp - 1: */ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_check_minp); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 835; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_win); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 835; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_minp); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 835; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = PyInt_FromSsize_t(__pyx_v_N); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 835; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_7 = PyTuple_New(3); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 835; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_7, 2, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_2 = 0; __pyx_t_4 = 0; __pyx_t_3 = 0; __pyx_t_3 = PyObject_Call(__pyx_t_5, __pyx_t_7, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 835; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_8 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 835; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_minp = __pyx_t_8; /* "pandas/algos.pyx":837 * minp = _check_minp(win, minp, N) * * for i from 0 <= i < minp - 1: # <<<<<<<<<<<<<< * val = input[i] * */ __pyx_t_9 = (__pyx_v_minp - 1); for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_9; __pyx_v_i++) { /* "pandas/algos.pyx":838 * * for i from 0 <= i < minp - 1: * val = input[i] # <<<<<<<<<<<<<< * * # Not NaN */ __pyx_t_1 = __pyx_v_i; __pyx_t_8 = -1; if (__pyx_t_1 < 0) { __pyx_t_1 += __pyx_pybuffernd_input.diminfo[0].shape; if (unlikely(__pyx_t_1 < 0)) __pyx_t_8 = 0; } else if (unlikely(__pyx_t_1 >= __pyx_pybuffernd_input.diminfo[0].shape)) __pyx_t_8 = 0; if (unlikely(__pyx_t_8 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_8); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 838; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_val = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_double_t *, __pyx_pybuffernd_input.rcbuffer->pybuffer.buf, __pyx_t_1, __pyx_pybuffernd_input.diminfo[0].strides)); /* "pandas/algos.pyx":841 * * # Not NaN * if val == val: # <<<<<<<<<<<<<< * nobs += 1 * sum_x += val */ __pyx_t_10 = ((__pyx_v_val == __pyx_v_val) != 0); if (__pyx_t_10) { /* "pandas/algos.pyx":842 * # Not NaN * if val == val: * nobs += 1 # <<<<<<<<<<<<<< * sum_x += val * if signbit(val): */ __pyx_v_nobs = (__pyx_v_nobs + 1); /* "pandas/algos.pyx":843 * if val == val: * nobs += 1 * sum_x += val # <<<<<<<<<<<<<< * if signbit(val): * neg_ct += 1 */ __pyx_v_sum_x = (__pyx_v_sum_x + __pyx_v_val); /* "pandas/algos.pyx":844 * nobs += 1 * sum_x += val * if signbit(val): # <<<<<<<<<<<<<< * neg_ct += 1 * */ __pyx_t_10 = (signbit(__pyx_v_val) != 0); if (__pyx_t_10) { /* "pandas/algos.pyx":845 * sum_x += val * if signbit(val): * neg_ct += 1 # <<<<<<<<<<<<<< * * output[i] = NaN */ __pyx_v_neg_ct = (__pyx_v_neg_ct + 1); goto __pyx_L6; } __pyx_L6:; goto __pyx_L5; } __pyx_L5:; /* "pandas/algos.pyx":847 * neg_ct += 1 * * output[i] = NaN # <<<<<<<<<<<<<< * * for i from minp - 1 <= i < N: */ __pyx_t_11 = __pyx_v_i; __pyx_t_8 = -1; if (__pyx_t_11 < 0) { __pyx_t_11 += __pyx_pybuffernd_output.diminfo[0].shape; if (unlikely(__pyx_t_11 < 0)) __pyx_t_8 = 0; } else if (unlikely(__pyx_t_11 >= __pyx_pybuffernd_output.diminfo[0].shape)) __pyx_t_8 = 0; if (unlikely(__pyx_t_8 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_8); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 847; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_double_t *, __pyx_pybuffernd_output.rcbuffer->pybuffer.buf, __pyx_t_11, __pyx_pybuffernd_output.diminfo[0].strides) = __pyx_v_6pandas_5algos_NaN; } /* "pandas/algos.pyx":849 * output[i] = NaN * * for i from minp - 1 <= i < N: # <<<<<<<<<<<<<< * val = input[i] * */ __pyx_t_12 = __pyx_v_N; for (__pyx_v_i = (__pyx_v_minp - 1); __pyx_v_i < __pyx_t_12; __pyx_v_i++) { /* "pandas/algos.pyx":850 * * for i from minp - 1 <= i < N: * val = input[i] # <<<<<<<<<<<<<< * * if val == val: */ __pyx_t_13 = __pyx_v_i; __pyx_t_8 = -1; if (__pyx_t_13 < 0) { __pyx_t_13 += __pyx_pybuffernd_input.diminfo[0].shape; if (unlikely(__pyx_t_13 < 0)) __pyx_t_8 = 0; } else if (unlikely(__pyx_t_13 >= __pyx_pybuffernd_input.diminfo[0].shape)) __pyx_t_8 = 0; if (unlikely(__pyx_t_8 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_8); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 850; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_val = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_double_t *, __pyx_pybuffernd_input.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_input.diminfo[0].strides)); /* "pandas/algos.pyx":852 * val = input[i] * * if val == val: # <<<<<<<<<<<<<< * nobs += 1 * sum_x += val */ __pyx_t_10 = ((__pyx_v_val == __pyx_v_val) != 0); if (__pyx_t_10) { /* "pandas/algos.pyx":853 * * if val == val: * nobs += 1 # <<<<<<<<<<<<<< * sum_x += val * if signbit(val): */ __pyx_v_nobs = (__pyx_v_nobs + 1); /* "pandas/algos.pyx":854 * if val == val: * nobs += 1 * sum_x += val # <<<<<<<<<<<<<< * if signbit(val): * neg_ct += 1 */ __pyx_v_sum_x = (__pyx_v_sum_x + __pyx_v_val); /* "pandas/algos.pyx":855 * nobs += 1 * sum_x += val * if signbit(val): # <<<<<<<<<<<<<< * neg_ct += 1 * */ __pyx_t_10 = (signbit(__pyx_v_val) != 0); if (__pyx_t_10) { /* "pandas/algos.pyx":856 * sum_x += val * if signbit(val): * neg_ct += 1 # <<<<<<<<<<<<<< * * if i > win - 1: */ __pyx_v_neg_ct = (__pyx_v_neg_ct + 1); goto __pyx_L10; } __pyx_L10:; goto __pyx_L9; } __pyx_L9:; /* "pandas/algos.pyx":858 * neg_ct += 1 * * if i > win - 1: # <<<<<<<<<<<<<< * prev = input[i - win] * if prev == prev: */ __pyx_t_10 = ((__pyx_v_i > (__pyx_v_win - 1)) != 0); if (__pyx_t_10) { /* "pandas/algos.pyx":859 * * if i > win - 1: * prev = input[i - win] # <<<<<<<<<<<<<< * if prev == prev: * sum_x -= prev */ __pyx_t_14 = (__pyx_v_i - __pyx_v_win); __pyx_t_8 = -1; if (__pyx_t_14 < 0) { __pyx_t_14 += __pyx_pybuffernd_input.diminfo[0].shape; if (unlikely(__pyx_t_14 < 0)) __pyx_t_8 = 0; } else if (unlikely(__pyx_t_14 >= __pyx_pybuffernd_input.diminfo[0].shape)) __pyx_t_8 = 0; if (unlikely(__pyx_t_8 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_8); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 859; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_prev = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_double_t *, __pyx_pybuffernd_input.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_input.diminfo[0].strides)); /* "pandas/algos.pyx":860 * if i > win - 1: * prev = input[i - win] * if prev == prev: # <<<<<<<<<<<<<< * sum_x -= prev * nobs -= 1 */ __pyx_t_10 = ((__pyx_v_prev == __pyx_v_prev) != 0); if (__pyx_t_10) { /* "pandas/algos.pyx":861 * prev = input[i - win] * if prev == prev: * sum_x -= prev # <<<<<<<<<<<<<< * nobs -= 1 * if signbit(prev): */ __pyx_v_sum_x = (__pyx_v_sum_x - __pyx_v_prev); /* "pandas/algos.pyx":862 * if prev == prev: * sum_x -= prev * nobs -= 1 # <<<<<<<<<<<<<< * if signbit(prev): * neg_ct -= 1 */ __pyx_v_nobs = (__pyx_v_nobs - 1); /* "pandas/algos.pyx":863 * sum_x -= prev * nobs -= 1 * if signbit(prev): # <<<<<<<<<<<<<< * neg_ct -= 1 * */ __pyx_t_10 = (signbit(__pyx_v_prev) != 0); if (__pyx_t_10) { /* "pandas/algos.pyx":864 * nobs -= 1 * if signbit(prev): * neg_ct -= 1 # <<<<<<<<<<<<<< * * if nobs >= minp: */ __pyx_v_neg_ct = (__pyx_v_neg_ct - 1); goto __pyx_L13; } __pyx_L13:; goto __pyx_L12; } __pyx_L12:; goto __pyx_L11; } __pyx_L11:; /* "pandas/algos.pyx":866 * neg_ct -= 1 * * if nobs >= minp: # <<<<<<<<<<<<<< * result = sum_x / nobs * if neg_ct == 0 and result < 0: */ __pyx_t_10 = ((__pyx_v_nobs >= __pyx_v_minp) != 0); if (__pyx_t_10) { /* "pandas/algos.pyx":867 * * if nobs >= minp: * result = sum_x / nobs # <<<<<<<<<<<<<< * if neg_ct == 0 and result < 0: * # all positive */ if (unlikely(__pyx_v_nobs == 0)) { #ifdef WITH_THREAD PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure(); #endif PyErr_SetString(PyExc_ZeroDivisionError, "float division"); #ifdef WITH_THREAD PyGILState_Release(__pyx_gilstate_save); #endif {__pyx_filename = __pyx_f[0]; __pyx_lineno = 867; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_result = (__pyx_v_sum_x / __pyx_v_nobs); /* "pandas/algos.pyx":868 * if nobs >= minp: * result = sum_x / nobs * if neg_ct == 0 and result < 0: # <<<<<<<<<<<<<< * # all positive * output[i] = 0 */ __pyx_t_10 = ((__pyx_v_neg_ct == 0) != 0); if (__pyx_t_10) { __pyx_t_15 = ((__pyx_v_result < 0.0) != 0); __pyx_t_16 = __pyx_t_15; } else { __pyx_t_16 = __pyx_t_10; } if (__pyx_t_16) { /* "pandas/algos.pyx":870 * if neg_ct == 0 and result < 0: * # all positive * output[i] = 0 # <<<<<<<<<<<<<< * elif neg_ct == nobs and result > 0: * # all negative */ __pyx_t_17 = __pyx_v_i; __pyx_t_8 = -1; if (__pyx_t_17 < 0) { __pyx_t_17 += __pyx_pybuffernd_output.diminfo[0].shape; if (unlikely(__pyx_t_17 < 0)) __pyx_t_8 = 0; } else if (unlikely(__pyx_t_17 >= __pyx_pybuffernd_output.diminfo[0].shape)) __pyx_t_8 = 0; if (unlikely(__pyx_t_8 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_8); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 870; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_double_t *, __pyx_pybuffernd_output.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_output.diminfo[0].strides) = 0.0; goto __pyx_L15; } /* "pandas/algos.pyx":871 * # all positive * output[i] = 0 * elif neg_ct == nobs and result > 0: # <<<<<<<<<<<<<< * # all negative * output[i] = 0 */ __pyx_t_16 = ((__pyx_v_neg_ct == __pyx_v_nobs) != 0); if (__pyx_t_16) { __pyx_t_10 = ((__pyx_v_result > 0.0) != 0); __pyx_t_15 = __pyx_t_10; } else { __pyx_t_15 = __pyx_t_16; } if (__pyx_t_15) { /* "pandas/algos.pyx":873 * elif neg_ct == nobs and result > 0: * # all negative * output[i] = 0 # <<<<<<<<<<<<<< * else: * output[i] = result */ __pyx_t_18 = __pyx_v_i; __pyx_t_8 = -1; if (__pyx_t_18 < 0) { __pyx_t_18 += __pyx_pybuffernd_output.diminfo[0].shape; if (unlikely(__pyx_t_18 < 0)) __pyx_t_8 = 0; } else if (unlikely(__pyx_t_18 >= __pyx_pybuffernd_output.diminfo[0].shape)) __pyx_t_8 = 0; if (unlikely(__pyx_t_8 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_8); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 873; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_double_t *, __pyx_pybuffernd_output.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_output.diminfo[0].strides) = 0.0; goto __pyx_L15; } /*else*/ { /* "pandas/algos.pyx":875 * output[i] = 0 * else: * output[i] = result # <<<<<<<<<<<<<< * else: * output[i] = NaN */ __pyx_t_19 = __pyx_v_i; __pyx_t_8 = -1; if (__pyx_t_19 < 0) { __pyx_t_19 += __pyx_pybuffernd_output.diminfo[0].shape; if (unlikely(__pyx_t_19 < 0)) __pyx_t_8 = 0; } else if (unlikely(__pyx_t_19 >= __pyx_pybuffernd_output.diminfo[0].shape)) __pyx_t_8 = 0; if (unlikely(__pyx_t_8 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_8); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 875; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_double_t *, __pyx_pybuffernd_output.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_output.diminfo[0].strides) = __pyx_v_result; } __pyx_L15:; goto __pyx_L14; } /*else*/ { /* "pandas/algos.pyx":877 * output[i] = result * else: * output[i] = NaN # <<<<<<<<<<<<<< * * return output */ __pyx_t_20 = __pyx_v_i; __pyx_t_8 = -1; if (__pyx_t_20 < 0) { __pyx_t_20 += __pyx_pybuffernd_output.diminfo[0].shape; if (unlikely(__pyx_t_20 < 0)) __pyx_t_8 = 0; } else if (unlikely(__pyx_t_20 >= __pyx_pybuffernd_output.diminfo[0].shape)) __pyx_t_8 = 0; if (unlikely(__pyx_t_8 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_8); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 877; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_double_t *, __pyx_pybuffernd_output.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_output.diminfo[0].strides) = __pyx_v_6pandas_5algos_NaN; } __pyx_L14:; } /* "pandas/algos.pyx":879 * output[i] = NaN * * return output # <<<<<<<<<<<<<< * * #------------------------------------------------------------------------------- */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_output)); __pyx_r = ((PyObject *)__pyx_v_output); goto __pyx_L0; /* "pandas/algos.pyx":827 * # Rolling mean * * def roll_mean(ndarray[double_t] input, # <<<<<<<<<<<<<< * int win, int minp): * cdef: */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_7); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_input.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_output.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.roll_mean", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_input.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_output.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_output); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/algos.pyx":884 * # Exponentially weighted moving average * * def ewma(ndarray[double_t] input, double_t com, int adjust): # <<<<<<<<<<<<<< * ''' * Compute exponentially-weighted moving average using center-of-mass. */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_27ewma(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6pandas_5algos_26ewma[] = "\n Compute exponentially-weighted moving average using center-of-mass.\n\n Parameters\n ----------\n input : ndarray (float64 type)\n com : float64\n\n Returns\n -------\n y : ndarray\n "; static PyMethodDef __pyx_mdef_6pandas_5algos_27ewma = {__Pyx_NAMESTR("ewma"), (PyCFunction)__pyx_pw_6pandas_5algos_27ewma, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_5algos_26ewma)}; static PyObject *__pyx_pw_6pandas_5algos_27ewma(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_input = 0; __pyx_t_5numpy_double_t __pyx_v_com; int __pyx_v_adjust; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("ewma (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_input,&__pyx_n_s_com,&__pyx_n_s_adjust,0}; PyObject* values[3] = {0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_input)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_com)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("ewma", 1, 3, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 884; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_adjust)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("ewma", 1, 3, 3, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 884; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "ewma") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 884; __pyx_clineno = __LINE__; goto __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_input = ((PyArrayObject *)values[0]); __pyx_v_com = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_com == (npy_double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 884; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_adjust = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_adjust == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 884; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("ewma", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 884; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.ewma", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_input), __pyx_ptype_5numpy_ndarray, 1, "input", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 884; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_26ewma(__pyx_self, __pyx_v_input, __pyx_v_com, __pyx_v_adjust); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5algos_26ewma(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_input, __pyx_t_5numpy_double_t __pyx_v_com, int __pyx_v_adjust) { double __pyx_v_cur; double __pyx_v_prev; double __pyx_v_neww; double __pyx_v_oldw; double __pyx_v_adj; Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_N; PyArrayObject *__pyx_v_output = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_input; __Pyx_Buffer __pyx_pybuffer_input; __Pyx_LocalBuf_ND __pyx_pybuffernd_output; __Pyx_Buffer __pyx_pybuffer_output; 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; PyArrayObject *__pyx_t_6 = NULL; int __pyx_t_7; __pyx_t_5numpy_double_t __pyx_t_8; long __pyx_t_9; int __pyx_t_10; long __pyx_t_11; long __pyx_t_12; long __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; double __pyx_t_21; Py_ssize_t __pyx_t_22; Py_ssize_t __pyx_t_23; Py_ssize_t __pyx_t_24; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("ewma", 0); __pyx_pybuffer_output.pybuffer.buf = NULL; __pyx_pybuffer_output.refcount = 0; __pyx_pybuffernd_output.data = NULL; __pyx_pybuffernd_output.rcbuffer = &__pyx_pybuffer_output; __pyx_pybuffer_input.pybuffer.buf = NULL; __pyx_pybuffer_input.refcount = 0; __pyx_pybuffernd_input.data = NULL; __pyx_pybuffernd_input.rcbuffer = &__pyx_pybuffer_input; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_input.rcbuffer->pybuffer, (PyObject*)__pyx_v_input, &__Pyx_TypeInfo_nn___pyx_t_5numpy_double_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 884; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_input.diminfo[0].strides = __pyx_pybuffernd_input.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_input.diminfo[0].shape = __pyx_pybuffernd_input.rcbuffer->pybuffer.shape[0]; /* "pandas/algos.pyx":900 * cdef double cur, prev, neww, oldw, adj * cdef Py_ssize_t i * cdef Py_ssize_t N = len(input) # <<<<<<<<<<<<<< * * cdef ndarray[double_t] output = np.empty(N, dtype=float) */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_input)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 900; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_N = __pyx_t_1; /* "pandas/algos.pyx":902 * cdef Py_ssize_t N = len(input) * * cdef ndarray[double_t] output = np.empty(N, dtype=float) # <<<<<<<<<<<<<< * * if N == 0: */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 902; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 902; __pyx_clineno = __LINE__; goto __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_N); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 902; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 902; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 902; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_dtype, ((PyObject *)((PyObject*)(&PyFloat_Type)))) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 902; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_5 = PyObject_Call(__pyx_t_3, __pyx_t_4, __pyx_t_2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 902; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 902; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_6 = ((PyArrayObject *)__pyx_t_5); { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_output.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_nn___pyx_t_5numpy_double_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { __pyx_v_output = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_output.rcbuffer->pybuffer.buf = NULL; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 902; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } else {__pyx_pybuffernd_output.diminfo[0].strides = __pyx_pybuffernd_output.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_output.diminfo[0].shape = __pyx_pybuffernd_output.rcbuffer->pybuffer.shape[0]; } } __pyx_t_6 = 0; __pyx_v_output = ((PyArrayObject *)__pyx_t_5); __pyx_t_5 = 0; /* "pandas/algos.pyx":904 * cdef ndarray[double_t] output = np.empty(N, dtype=float) * * if N == 0: # <<<<<<<<<<<<<< * return output * */ __pyx_t_7 = ((__pyx_v_N == 0) != 0); if (__pyx_t_7) { /* "pandas/algos.pyx":905 * * if N == 0: * return output # <<<<<<<<<<<<<< * * neww = 1. / (1. + com) */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_output)); __pyx_r = ((PyObject *)__pyx_v_output); goto __pyx_L0; } /* "pandas/algos.pyx":907 * return output * * neww = 1. / (1. + com) # <<<<<<<<<<<<<< * oldw = 1. - neww * adj = oldw */ __pyx_t_8 = (1. + __pyx_v_com); if (unlikely(__pyx_t_8 == 0)) { #ifdef WITH_THREAD PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure(); #endif PyErr_SetString(PyExc_ZeroDivisionError, "float division"); #ifdef WITH_THREAD PyGILState_Release(__pyx_gilstate_save); #endif {__pyx_filename = __pyx_f[0]; __pyx_lineno = 907; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_neww = (1. / __pyx_t_8); /* "pandas/algos.pyx":908 * * neww = 1. / (1. + com) * oldw = 1. - neww # <<<<<<<<<<<<<< * adj = oldw * */ __pyx_v_oldw = (1. - __pyx_v_neww); /* "pandas/algos.pyx":909 * neww = 1. / (1. + com) * oldw = 1. - neww * adj = oldw # <<<<<<<<<<<<<< * * if adjust: */ __pyx_v_adj = __pyx_v_oldw; /* "pandas/algos.pyx":911 * adj = oldw * * if adjust: # <<<<<<<<<<<<<< * output[0] = neww * input[0] * else: */ __pyx_t_7 = (__pyx_v_adjust != 0); if (__pyx_t_7) { /* "pandas/algos.pyx":912 * * if adjust: * output[0] = neww * input[0] # <<<<<<<<<<<<<< * else: * output[0] = input[0] */ __pyx_t_9 = 0; __pyx_t_10 = -1; if (__pyx_t_9 < 0) { __pyx_t_9 += __pyx_pybuffernd_input.diminfo[0].shape; if (unlikely(__pyx_t_9 < 0)) __pyx_t_10 = 0; } else if (unlikely(__pyx_t_9 >= __pyx_pybuffernd_input.diminfo[0].shape)) __pyx_t_10 = 0; if (unlikely(__pyx_t_10 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_10); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 912; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_11 = 0; __pyx_t_10 = -1; if (__pyx_t_11 < 0) { __pyx_t_11 += __pyx_pybuffernd_output.diminfo[0].shape; if (unlikely(__pyx_t_11 < 0)) __pyx_t_10 = 0; } else if (unlikely(__pyx_t_11 >= __pyx_pybuffernd_output.diminfo[0].shape)) __pyx_t_10 = 0; if (unlikely(__pyx_t_10 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_10); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 912; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_double_t *, __pyx_pybuffernd_output.rcbuffer->pybuffer.buf, __pyx_t_11, __pyx_pybuffernd_output.diminfo[0].strides) = (__pyx_v_neww * (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_double_t *, __pyx_pybuffernd_input.rcbuffer->pybuffer.buf, __pyx_t_9, __pyx_pybuffernd_input.diminfo[0].strides))); goto __pyx_L4; } /*else*/ { /* "pandas/algos.pyx":914 * output[0] = neww * input[0] * else: * output[0] = input[0] # <<<<<<<<<<<<<< * * for i from 1 <= i < N: */ __pyx_t_12 = 0; __pyx_t_10 = -1; if (__pyx_t_12 < 0) { __pyx_t_12 += __pyx_pybuffernd_input.diminfo[0].shape; if (unlikely(__pyx_t_12 < 0)) __pyx_t_10 = 0; } else if (unlikely(__pyx_t_12 >= __pyx_pybuffernd_input.diminfo[0].shape)) __pyx_t_10 = 0; if (unlikely(__pyx_t_10 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_10); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 914; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_13 = 0; __pyx_t_10 = -1; if (__pyx_t_13 < 0) { __pyx_t_13 += __pyx_pybuffernd_output.diminfo[0].shape; if (unlikely(__pyx_t_13 < 0)) __pyx_t_10 = 0; } else if (unlikely(__pyx_t_13 >= __pyx_pybuffernd_output.diminfo[0].shape)) __pyx_t_10 = 0; if (unlikely(__pyx_t_10 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_10); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 914; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_double_t *, __pyx_pybuffernd_output.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_output.diminfo[0].strides) = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_double_t *, __pyx_pybuffernd_input.rcbuffer->pybuffer.buf, __pyx_t_12, __pyx_pybuffernd_input.diminfo[0].strides)); } __pyx_L4:; /* "pandas/algos.pyx":916 * output[0] = input[0] * * for i from 1 <= i < N: # <<<<<<<<<<<<<< * cur = input[i] * prev = output[i - 1] */ __pyx_t_1 = __pyx_v_N; for (__pyx_v_i = 1; __pyx_v_i < __pyx_t_1; __pyx_v_i++) { /* "pandas/algos.pyx":917 * * for i from 1 <= i < N: * cur = input[i] # <<<<<<<<<<<<<< * prev = output[i - 1] * */ __pyx_t_14 = __pyx_v_i; __pyx_t_10 = -1; if (__pyx_t_14 < 0) { __pyx_t_14 += __pyx_pybuffernd_input.diminfo[0].shape; if (unlikely(__pyx_t_14 < 0)) __pyx_t_10 = 0; } else if (unlikely(__pyx_t_14 >= __pyx_pybuffernd_input.diminfo[0].shape)) __pyx_t_10 = 0; if (unlikely(__pyx_t_10 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_10); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 917; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_cur = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_double_t *, __pyx_pybuffernd_input.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_input.diminfo[0].strides)); /* "pandas/algos.pyx":918 * for i from 1 <= i < N: * cur = input[i] * prev = output[i - 1] # <<<<<<<<<<<<<< * * if cur == cur: */ __pyx_t_15 = (__pyx_v_i - 1); __pyx_t_10 = -1; if (__pyx_t_15 < 0) { __pyx_t_15 += __pyx_pybuffernd_output.diminfo[0].shape; if (unlikely(__pyx_t_15 < 0)) __pyx_t_10 = 0; } else if (unlikely(__pyx_t_15 >= __pyx_pybuffernd_output.diminfo[0].shape)) __pyx_t_10 = 0; if (unlikely(__pyx_t_10 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_10); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 918; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_prev = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_double_t *, __pyx_pybuffernd_output.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_output.diminfo[0].strides)); /* "pandas/algos.pyx":920 * prev = output[i - 1] * * if cur == cur: # <<<<<<<<<<<<<< * if prev == prev: * output[i] = oldw * prev + neww * cur */ __pyx_t_7 = ((__pyx_v_cur == __pyx_v_cur) != 0); if (__pyx_t_7) { /* "pandas/algos.pyx":921 * * if cur == cur: * if prev == prev: # <<<<<<<<<<<<<< * output[i] = oldw * prev + neww * cur * else: */ __pyx_t_7 = ((__pyx_v_prev == __pyx_v_prev) != 0); if (__pyx_t_7) { /* "pandas/algos.pyx":922 * if cur == cur: * if prev == prev: * output[i] = oldw * prev + neww * cur # <<<<<<<<<<<<<< * else: * output[i] = neww * cur */ __pyx_t_16 = __pyx_v_i; __pyx_t_10 = -1; if (__pyx_t_16 < 0) { __pyx_t_16 += __pyx_pybuffernd_output.diminfo[0].shape; if (unlikely(__pyx_t_16 < 0)) __pyx_t_10 = 0; } else if (unlikely(__pyx_t_16 >= __pyx_pybuffernd_output.diminfo[0].shape)) __pyx_t_10 = 0; if (unlikely(__pyx_t_10 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_10); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 922; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_double_t *, __pyx_pybuffernd_output.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_output.diminfo[0].strides) = ((__pyx_v_oldw * __pyx_v_prev) + (__pyx_v_neww * __pyx_v_cur)); goto __pyx_L8; } /*else*/ { /* "pandas/algos.pyx":924 * output[i] = oldw * prev + neww * cur * else: * output[i] = neww * cur # <<<<<<<<<<<<<< * else: * output[i] = prev */ __pyx_t_17 = __pyx_v_i; __pyx_t_10 = -1; if (__pyx_t_17 < 0) { __pyx_t_17 += __pyx_pybuffernd_output.diminfo[0].shape; if (unlikely(__pyx_t_17 < 0)) __pyx_t_10 = 0; } else if (unlikely(__pyx_t_17 >= __pyx_pybuffernd_output.diminfo[0].shape)) __pyx_t_10 = 0; if (unlikely(__pyx_t_10 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_10); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 924; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_double_t *, __pyx_pybuffernd_output.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_output.diminfo[0].strides) = (__pyx_v_neww * __pyx_v_cur); } __pyx_L8:; goto __pyx_L7; } /*else*/ { /* "pandas/algos.pyx":926 * output[i] = neww * cur * else: * output[i] = prev # <<<<<<<<<<<<<< * * if adjust: */ __pyx_t_18 = __pyx_v_i; __pyx_t_10 = -1; if (__pyx_t_18 < 0) { __pyx_t_18 += __pyx_pybuffernd_output.diminfo[0].shape; if (unlikely(__pyx_t_18 < 0)) __pyx_t_10 = 0; } else if (unlikely(__pyx_t_18 >= __pyx_pybuffernd_output.diminfo[0].shape)) __pyx_t_10 = 0; if (unlikely(__pyx_t_10 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_10); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 926; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_double_t *, __pyx_pybuffernd_output.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_output.diminfo[0].strides) = __pyx_v_prev; } __pyx_L7:; } /* "pandas/algos.pyx":928 * output[i] = prev * * if adjust: # <<<<<<<<<<<<<< * for i from 0 <= i < N: * cur = input[i] */ __pyx_t_7 = (__pyx_v_adjust != 0); if (__pyx_t_7) { /* "pandas/algos.pyx":929 * * if adjust: * for i from 0 <= i < N: # <<<<<<<<<<<<<< * cur = input[i] * */ __pyx_t_1 = __pyx_v_N; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_1; __pyx_v_i++) { /* "pandas/algos.pyx":930 * if adjust: * for i from 0 <= i < N: * cur = input[i] # <<<<<<<<<<<<<< * * if cur == cur: */ __pyx_t_19 = __pyx_v_i; __pyx_t_10 = -1; if (__pyx_t_19 < 0) { __pyx_t_19 += __pyx_pybuffernd_input.diminfo[0].shape; if (unlikely(__pyx_t_19 < 0)) __pyx_t_10 = 0; } else if (unlikely(__pyx_t_19 >= __pyx_pybuffernd_input.diminfo[0].shape)) __pyx_t_10 = 0; if (unlikely(__pyx_t_10 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_10); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 930; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_cur = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_double_t *, __pyx_pybuffernd_input.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_input.diminfo[0].strides)); /* "pandas/algos.pyx":932 * cur = input[i] * * if cur == cur: # <<<<<<<<<<<<<< * output[i] = output[i] / (1. - adj) * adj *= oldw */ __pyx_t_7 = ((__pyx_v_cur == __pyx_v_cur) != 0); if (__pyx_t_7) { /* "pandas/algos.pyx":933 * * if cur == cur: * output[i] = output[i] / (1. - adj) # <<<<<<<<<<<<<< * adj *= oldw * else: */ __pyx_t_20 = __pyx_v_i; __pyx_t_10 = -1; if (__pyx_t_20 < 0) { __pyx_t_20 += __pyx_pybuffernd_output.diminfo[0].shape; if (unlikely(__pyx_t_20 < 0)) __pyx_t_10 = 0; } else if (unlikely(__pyx_t_20 >= __pyx_pybuffernd_output.diminfo[0].shape)) __pyx_t_10 = 0; if (unlikely(__pyx_t_10 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_10); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 933; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_8 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_double_t *, __pyx_pybuffernd_output.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_output.diminfo[0].strides)); __pyx_t_21 = (1. - __pyx_v_adj); if (unlikely(__pyx_t_21 == 0)) { #ifdef WITH_THREAD PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure(); #endif PyErr_SetString(PyExc_ZeroDivisionError, "float division"); #ifdef WITH_THREAD PyGILState_Release(__pyx_gilstate_save); #endif {__pyx_filename = __pyx_f[0]; __pyx_lineno = 933; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_22 = __pyx_v_i; __pyx_t_10 = -1; if (__pyx_t_22 < 0) { __pyx_t_22 += __pyx_pybuffernd_output.diminfo[0].shape; if (unlikely(__pyx_t_22 < 0)) __pyx_t_10 = 0; } else if (unlikely(__pyx_t_22 >= __pyx_pybuffernd_output.diminfo[0].shape)) __pyx_t_10 = 0; if (unlikely(__pyx_t_10 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_10); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 933; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_double_t *, __pyx_pybuffernd_output.rcbuffer->pybuffer.buf, __pyx_t_22, __pyx_pybuffernd_output.diminfo[0].strides) = (__pyx_t_8 / __pyx_t_21); /* "pandas/algos.pyx":934 * if cur == cur: * output[i] = output[i] / (1. - adj) * adj *= oldw # <<<<<<<<<<<<<< * else: * if i >= 1: */ __pyx_v_adj = (__pyx_v_adj * __pyx_v_oldw); goto __pyx_L12; } /*else*/ { /* "pandas/algos.pyx":936 * adj *= oldw * else: * if i >= 1: # <<<<<<<<<<<<<< * output[i] = output[i - 1] * */ __pyx_t_7 = ((__pyx_v_i >= 1) != 0); if (__pyx_t_7) { /* "pandas/algos.pyx":937 * else: * if i >= 1: * output[i] = output[i - 1] # <<<<<<<<<<<<<< * * return output */ __pyx_t_23 = (__pyx_v_i - 1); __pyx_t_10 = -1; if (__pyx_t_23 < 0) { __pyx_t_23 += __pyx_pybuffernd_output.diminfo[0].shape; if (unlikely(__pyx_t_23 < 0)) __pyx_t_10 = 0; } else if (unlikely(__pyx_t_23 >= __pyx_pybuffernd_output.diminfo[0].shape)) __pyx_t_10 = 0; if (unlikely(__pyx_t_10 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_10); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 937; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_24 = __pyx_v_i; __pyx_t_10 = -1; if (__pyx_t_24 < 0) { __pyx_t_24 += __pyx_pybuffernd_output.diminfo[0].shape; if (unlikely(__pyx_t_24 < 0)) __pyx_t_10 = 0; } else if (unlikely(__pyx_t_24 >= __pyx_pybuffernd_output.diminfo[0].shape)) __pyx_t_10 = 0; if (unlikely(__pyx_t_10 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_10); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 937; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_double_t *, __pyx_pybuffernd_output.rcbuffer->pybuffer.buf, __pyx_t_24, __pyx_pybuffernd_output.diminfo[0].strides) = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_double_t *, __pyx_pybuffernd_output.rcbuffer->pybuffer.buf, __pyx_t_23, __pyx_pybuffernd_output.diminfo[0].strides)); goto __pyx_L13; } __pyx_L13:; } __pyx_L12:; } goto __pyx_L9; } __pyx_L9:; /* "pandas/algos.pyx":939 * output[i] = output[i - 1] * * return output # <<<<<<<<<<<<<< * * #---------------------------------------------------------------------- */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_output)); __pyx_r = ((PyObject *)__pyx_v_output); goto __pyx_L0; /* "pandas/algos.pyx":884 * # Exponentially weighted moving average * * def ewma(ndarray[double_t] input, double_t com, int adjust): # <<<<<<<<<<<<<< * ''' * Compute exponentially-weighted moving average using center-of-mass. */ /* 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); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_input.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_output.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.ewma", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_input.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_output.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_output); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/algos.pyx":946 * @cython.boundscheck(False) * @cython.wraparound(False) * def nancorr(ndarray[float64_t, ndim=2] mat, cov=False, minp=None): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, j, xi, yi, N, K */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_29nancorr(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_29nancorr = {__Pyx_NAMESTR("nancorr"), (PyCFunction)__pyx_pw_6pandas_5algos_29nancorr, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_29nancorr(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_mat = 0; PyObject *__pyx_v_cov = 0; PyObject *__pyx_v_minp = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("nancorr (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_mat,&__pyx_n_s_cov,&__pyx_n_s_minp,0}; PyObject* values[3] = {0,0,0}; values[1] = ((PyObject *)Py_False); values[2] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_mat)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_cov); if (value) { values[1] = value; kw_args--; } } case 2: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_minp); if (value) { values[2] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "nancorr") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 946; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_mat = ((PyArrayObject *)values[0]); __pyx_v_cov = values[1]; __pyx_v_minp = values[2]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("nancorr", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 946; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.nancorr", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_mat), __pyx_ptype_5numpy_ndarray, 1, "mat", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 946; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_28nancorr(__pyx_self, __pyx_v_mat, __pyx_v_cov, __pyx_v_minp); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5algos_28nancorr(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_mat, PyObject *__pyx_v_cov, PyObject *__pyx_v_minp) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_xi; Py_ssize_t __pyx_v_yi; Py_ssize_t __pyx_v_N; Py_ssize_t __pyx_v_K; PyArrayObject *__pyx_v_result = 0; PyArrayObject *__pyx_v_mask = 0; __pyx_t_5numpy_int64_t __pyx_v_nobs; __pyx_t_5numpy_float64_t __pyx_v_vx; __pyx_t_5numpy_float64_t __pyx_v_vy; __pyx_t_5numpy_float64_t __pyx_v_sumx; __pyx_t_5numpy_float64_t __pyx_v_sumy; __pyx_t_5numpy_float64_t __pyx_v_sumxx; __pyx_t_5numpy_float64_t __pyx_v_sumyy; __pyx_t_5numpy_float64_t __pyx_v_meanx; __pyx_t_5numpy_float64_t __pyx_v_meany; __pyx_t_5numpy_float64_t __pyx_v_divisor; __Pyx_LocalBuf_ND __pyx_pybuffernd_mask; __Pyx_Buffer __pyx_pybuffer_mask; __Pyx_LocalBuf_ND __pyx_pybuffernd_mat; __Pyx_Buffer __pyx_pybuffer_mat; __Pyx_LocalBuf_ND __pyx_pybuffernd_result; __Pyx_Buffer __pyx_pybuffer_result; 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 *); Py_ssize_t __pyx_t_6; Py_ssize_t __pyx_t_7; int __pyx_t_8; int __pyx_t_9; PyObject *__pyx_t_10 = NULL; PyArrayObject *__pyx_t_11 = NULL; int __pyx_t_12; PyObject *__pyx_t_13 = NULL; PyObject *__pyx_t_14 = NULL; PyObject *__pyx_t_15 = NULL; PyArrayObject *__pyx_t_16 = NULL; 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; int __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; __pyx_t_5numpy_float64_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; Py_ssize_t __pyx_t_37; Py_ssize_t __pyx_t_38; Py_ssize_t __pyx_t_39; Py_ssize_t __pyx_t_40; Py_ssize_t __pyx_t_41; Py_ssize_t __pyx_t_42; double __pyx_t_43; Py_ssize_t __pyx_t_44; Py_ssize_t __pyx_t_45; Py_ssize_t __pyx_t_46; Py_ssize_t __pyx_t_47; Py_ssize_t __pyx_t_48; Py_ssize_t __pyx_t_49; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("nancorr", 0); __Pyx_INCREF(__pyx_v_minp); __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_mask.pybuffer.buf = NULL; __pyx_pybuffer_mask.refcount = 0; __pyx_pybuffernd_mask.data = NULL; __pyx_pybuffernd_mask.rcbuffer = &__pyx_pybuffer_mask; __pyx_pybuffer_mat.pybuffer.buf = NULL; __pyx_pybuffer_mat.refcount = 0; __pyx_pybuffernd_mat.data = NULL; __pyx_pybuffernd_mat.rcbuffer = &__pyx_pybuffer_mat; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_mat.rcbuffer->pybuffer, (PyObject*)__pyx_v_mat, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 946; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_mat.diminfo[0].strides = __pyx_pybuffernd_mat.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_mat.diminfo[0].shape = __pyx_pybuffernd_mat.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_mat.diminfo[1].strides = __pyx_pybuffernd_mat.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_mat.diminfo[1].shape = __pyx_pybuffernd_mat.rcbuffer->pybuffer.shape[1]; /* "pandas/algos.pyx":951 * ndarray[float64_t, ndim=2] result * ndarray[uint8_t, ndim=2] mask * int64_t nobs = 0 # <<<<<<<<<<<<<< * float64_t vx, vy, sumx, sumy, sumxx, sumyy, meanx, meany, divisor * */ __pyx_v_nobs = 0; /* "pandas/algos.pyx":954 * float64_t vx, vy, sumx, sumy, sumxx, sumyy, meanx, meany, divisor * * N, K = ( mat).shape # <<<<<<<<<<<<<< * * if minp is None: */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_mat), __pyx_n_s_shape); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 954; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) { PyObject* sequence = __pyx_t_1; #if CYTHON_COMPILING_IN_CPYTHON Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 954; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1); } else { __pyx_t_2 = PyList_GET_ITEM(sequence, 0); __pyx_t_3 = PyList_GET_ITEM(sequence, 1); } __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); #else __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 954; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 954; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } else { Py_ssize_t index = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 954; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_5 = Py_TYPE(__pyx_t_4)->tp_iternext; index = 0; __pyx_t_2 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_2)) goto __pyx_L3_unpacking_failed; __Pyx_GOTREF(__pyx_t_2); index = 1; __pyx_t_3 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_3)) goto __pyx_L3_unpacking_failed; __Pyx_GOTREF(__pyx_t_3); if (__Pyx_IternextUnpackEndCheck(__pyx_t_5(__pyx_t_4), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 954; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 954; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_L4_unpacking_done:; } __pyx_t_6 = __Pyx_PyIndex_AsSsize_t(__pyx_t_2); if (unlikely((__pyx_t_6 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 954; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_7 = __Pyx_PyIndex_AsSsize_t(__pyx_t_3); if (unlikely((__pyx_t_7 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 954; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_N = __pyx_t_6; __pyx_v_K = __pyx_t_7; /* "pandas/algos.pyx":956 * N, K = ( mat).shape * * if minp is None: # <<<<<<<<<<<<<< * minp = 1 * */ __pyx_t_8 = (__pyx_v_minp == Py_None); __pyx_t_9 = (__pyx_t_8 != 0); if (__pyx_t_9) { /* "pandas/algos.pyx":957 * * if minp is None: * minp = 1 # <<<<<<<<<<<<<< * * result = np.empty((K, K), dtype=np.float64) */ __Pyx_INCREF(__pyx_int_1); __Pyx_DECREF_SET(__pyx_v_minp, __pyx_int_1); goto __pyx_L5; } __pyx_L5:; /* "pandas/algos.pyx":959 * minp = 1 * * result = np.empty((K, K), dtype=np.float64) # <<<<<<<<<<<<<< * mask = np.isfinite(mat).view(np.uint8) * */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 959; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_empty); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 959; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_K); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 959; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_K); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 959; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 959; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_1 = 0; __pyx_t_2 = 0; __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 959; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyDict_New(); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 959; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 959; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_float64); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 959; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_dtype, __pyx_t_10) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 959; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_t_10 = PyObject_Call(__pyx_t_3, __pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 959; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (!(likely(((__pyx_t_10) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_10, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 959; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_11 = ((PyArrayObject *)__pyx_t_10); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __pyx_t_12 = __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, 2, 0, __pyx_stack); if (unlikely(__pyx_t_12 < 0)) { PyErr_Fetch(&__pyx_t_13, &__pyx_t_14, &__pyx_t_15); 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, 2, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_13); Py_XDECREF(__pyx_t_14); Py_XDECREF(__pyx_t_15); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_13, __pyx_t_14, __pyx_t_15); } } __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]; __pyx_pybuffernd_result.diminfo[1].strides = __pyx_pybuffernd_result.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_result.diminfo[1].shape = __pyx_pybuffernd_result.rcbuffer->pybuffer.shape[1]; if (unlikely(__pyx_t_12 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 959; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_11 = 0; __pyx_v_result = ((PyArrayObject *)__pyx_t_10); __pyx_t_10 = 0; /* "pandas/algos.pyx":960 * * result = np.empty((K, K), dtype=np.float64) * mask = np.isfinite(mat).view(np.uint8) # <<<<<<<<<<<<<< * * for xi in range(K): */ __pyx_t_10 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 960; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_isfinite); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 960; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_t_10 = PyTuple_New(1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 960; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_INCREF(((PyObject *)__pyx_v_mat)); PyTuple_SET_ITEM(__pyx_t_10, 0, ((PyObject *)__pyx_v_mat)); __Pyx_GIVEREF(((PyObject *)__pyx_v_mat)); __pyx_t_2 = PyObject_Call(__pyx_t_4, __pyx_t_10, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 960; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_view); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 960; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 960; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_uint8); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 960; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 960; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyObject_Call(__pyx_t_10, __pyx_t_2, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 960; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 960; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_16 = ((PyArrayObject *)__pyx_t_4); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_mask.rcbuffer->pybuffer); __pyx_t_12 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_mask.rcbuffer->pybuffer, (PyObject*)__pyx_t_16, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack); if (unlikely(__pyx_t_12 < 0)) { PyErr_Fetch(&__pyx_t_15, &__pyx_t_14, &__pyx_t_13); 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, 2, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_15); Py_XDECREF(__pyx_t_14); Py_XDECREF(__pyx_t_13); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_15, __pyx_t_14, __pyx_t_13); } } __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]; __pyx_pybuffernd_mask.diminfo[1].strides = __pyx_pybuffernd_mask.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_mask.diminfo[1].shape = __pyx_pybuffernd_mask.rcbuffer->pybuffer.shape[1]; if (unlikely(__pyx_t_12 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 960; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_16 = 0; __pyx_v_mask = ((PyArrayObject *)__pyx_t_4); __pyx_t_4 = 0; /* "pandas/algos.pyx":962 * mask = np.isfinite(mat).view(np.uint8) * * for xi in range(K): # <<<<<<<<<<<<<< * for yi in range(xi + 1): * nobs = sumxx = sumyy = sumx = sumy = 0 */ __pyx_t_7 = __pyx_v_K; for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_7; __pyx_t_6+=1) { __pyx_v_xi = __pyx_t_6; /* "pandas/algos.pyx":963 * * for xi in range(K): * for yi in range(xi + 1): # <<<<<<<<<<<<<< * nobs = sumxx = sumyy = sumx = sumy = 0 * for i in range(N): */ __pyx_t_17 = (__pyx_v_xi + 1); for (__pyx_t_18 = 0; __pyx_t_18 < __pyx_t_17; __pyx_t_18+=1) { __pyx_v_yi = __pyx_t_18; /* "pandas/algos.pyx":964 * for xi in range(K): * for yi in range(xi + 1): * nobs = sumxx = sumyy = sumx = sumy = 0 # <<<<<<<<<<<<<< * for i in range(N): * if mask[i, xi] and mask[i, yi]: */ __pyx_v_nobs = 0; __pyx_v_sumxx = 0; __pyx_v_sumyy = 0; __pyx_v_sumx = 0; __pyx_v_sumy = 0; /* "pandas/algos.pyx":965 * for yi in range(xi + 1): * nobs = sumxx = sumyy = sumx = sumy = 0 * for i in range(N): # <<<<<<<<<<<<<< * if mask[i, xi] and mask[i, yi]: * vx = mat[i, xi] */ __pyx_t_19 = __pyx_v_N; for (__pyx_t_20 = 0; __pyx_t_20 < __pyx_t_19; __pyx_t_20+=1) { __pyx_v_i = __pyx_t_20; /* "pandas/algos.pyx":966 * nobs = sumxx = sumyy = sumx = sumy = 0 * for i in range(N): * if mask[i, xi] and mask[i, yi]: # <<<<<<<<<<<<<< * vx = mat[i, xi] * vy = mat[i, yi] */ __pyx_t_21 = __pyx_v_i; __pyx_t_22 = __pyx_v_xi; __pyx_t_9 = ((*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_mask.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_mask.diminfo[0].strides, __pyx_t_22, __pyx_pybuffernd_mask.diminfo[1].strides)) != 0); if (__pyx_t_9) { __pyx_t_23 = __pyx_v_i; __pyx_t_24 = __pyx_v_yi; __pyx_t_8 = ((*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_mask.rcbuffer->pybuffer.buf, __pyx_t_23, __pyx_pybuffernd_mask.diminfo[0].strides, __pyx_t_24, __pyx_pybuffernd_mask.diminfo[1].strides)) != 0); __pyx_t_25 = __pyx_t_8; } else { __pyx_t_25 = __pyx_t_9; } if (__pyx_t_25) { /* "pandas/algos.pyx":967 * for i in range(N): * if mask[i, xi] and mask[i, yi]: * vx = mat[i, xi] # <<<<<<<<<<<<<< * vy = mat[i, yi] * nobs += 1 */ __pyx_t_26 = __pyx_v_i; __pyx_t_27 = __pyx_v_xi; __pyx_v_vx = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_mat.rcbuffer->pybuffer.buf, __pyx_t_26, __pyx_pybuffernd_mat.diminfo[0].strides, __pyx_t_27, __pyx_pybuffernd_mat.diminfo[1].strides)); /* "pandas/algos.pyx":968 * if mask[i, xi] and mask[i, yi]: * vx = mat[i, xi] * vy = mat[i, yi] # <<<<<<<<<<<<<< * nobs += 1 * sumx += vx */ __pyx_t_28 = __pyx_v_i; __pyx_t_29 = __pyx_v_yi; __pyx_v_vy = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_mat.rcbuffer->pybuffer.buf, __pyx_t_28, __pyx_pybuffernd_mat.diminfo[0].strides, __pyx_t_29, __pyx_pybuffernd_mat.diminfo[1].strides)); /* "pandas/algos.pyx":969 * vx = mat[i, xi] * vy = mat[i, yi] * nobs += 1 # <<<<<<<<<<<<<< * sumx += vx * sumy += vy */ __pyx_v_nobs = (__pyx_v_nobs + 1); /* "pandas/algos.pyx":970 * vy = mat[i, yi] * nobs += 1 * sumx += vx # <<<<<<<<<<<<<< * sumy += vy * */ __pyx_v_sumx = (__pyx_v_sumx + __pyx_v_vx); /* "pandas/algos.pyx":971 * nobs += 1 * sumx += vx * sumy += vy # <<<<<<<<<<<<<< * * if nobs < minp: */ __pyx_v_sumy = (__pyx_v_sumy + __pyx_v_vy); goto __pyx_L12; } __pyx_L12:; } /* "pandas/algos.pyx":973 * sumy += vy * * if nobs < minp: # <<<<<<<<<<<<<< * result[xi, yi] = result[yi, xi] = np.NaN * else: */ __pyx_t_4 = __Pyx_PyInt_From_npy_int64(__pyx_v_nobs); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 973; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_2 = PyObject_RichCompare(__pyx_t_4, __pyx_v_minp, Py_LT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 973; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_25 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_25 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 973; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_25) { /* "pandas/algos.pyx":974 * * if nobs < minp: * result[xi, yi] = result[yi, xi] = np.NaN # <<<<<<<<<<<<<< * else: * meanx = sumx / nobs */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 974; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_NaN); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 974; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_30 = __pyx_PyFloat_AsDouble(__pyx_t_4); if (unlikely((__pyx_t_30 == (npy_float64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 974; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_19 = __pyx_v_xi; __pyx_t_20 = __pyx_v_yi; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_result.diminfo[0].strides, __pyx_t_20, __pyx_pybuffernd_result.diminfo[1].strides) = __pyx_t_30; __pyx_t_30 = __pyx_PyFloat_AsDouble(__pyx_t_4); if (unlikely((__pyx_t_30 == (npy_float64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 974; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_31 = __pyx_v_yi; __pyx_t_32 = __pyx_v_xi; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_31, __pyx_pybuffernd_result.diminfo[0].strides, __pyx_t_32, __pyx_pybuffernd_result.diminfo[1].strides) = __pyx_t_30; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; goto __pyx_L13; } /*else*/ { /* "pandas/algos.pyx":976 * result[xi, yi] = result[yi, xi] = np.NaN * else: * meanx = sumx / nobs # <<<<<<<<<<<<<< * meany = sumy / nobs * */ if (unlikely(__pyx_v_nobs == 0)) { #ifdef WITH_THREAD PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure(); #endif PyErr_SetString(PyExc_ZeroDivisionError, "float division"); #ifdef WITH_THREAD PyGILState_Release(__pyx_gilstate_save); #endif {__pyx_filename = __pyx_f[0]; __pyx_lineno = 976; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_meanx = (__pyx_v_sumx / __pyx_v_nobs); /* "pandas/algos.pyx":977 * else: * meanx = sumx / nobs * meany = sumy / nobs # <<<<<<<<<<<<<< * * # now the cov numerator */ if (unlikely(__pyx_v_nobs == 0)) { #ifdef WITH_THREAD PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure(); #endif PyErr_SetString(PyExc_ZeroDivisionError, "float division"); #ifdef WITH_THREAD PyGILState_Release(__pyx_gilstate_save); #endif {__pyx_filename = __pyx_f[0]; __pyx_lineno = 977; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_meany = (__pyx_v_sumy / __pyx_v_nobs); /* "pandas/algos.pyx":980 * * # now the cov numerator * sumx = 0 # <<<<<<<<<<<<<< * * for i in range(N): */ __pyx_v_sumx = 0.0; /* "pandas/algos.pyx":982 * sumx = 0 * * for i in range(N): # <<<<<<<<<<<<<< * if mask[i, xi] and mask[i, yi]: * vx = mat[i, xi] - meanx */ __pyx_t_33 = __pyx_v_N; for (__pyx_t_34 = 0; __pyx_t_34 < __pyx_t_33; __pyx_t_34+=1) { __pyx_v_i = __pyx_t_34; /* "pandas/algos.pyx":983 * * for i in range(N): * if mask[i, xi] and mask[i, yi]: # <<<<<<<<<<<<<< * vx = mat[i, xi] - meanx * vy = mat[i, yi] - meany */ __pyx_t_35 = __pyx_v_i; __pyx_t_36 = __pyx_v_xi; __pyx_t_25 = ((*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_mask.rcbuffer->pybuffer.buf, __pyx_t_35, __pyx_pybuffernd_mask.diminfo[0].strides, __pyx_t_36, __pyx_pybuffernd_mask.diminfo[1].strides)) != 0); if (__pyx_t_25) { __pyx_t_37 = __pyx_v_i; __pyx_t_38 = __pyx_v_yi; __pyx_t_9 = ((*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_mask.rcbuffer->pybuffer.buf, __pyx_t_37, __pyx_pybuffernd_mask.diminfo[0].strides, __pyx_t_38, __pyx_pybuffernd_mask.diminfo[1].strides)) != 0); __pyx_t_8 = __pyx_t_9; } else { __pyx_t_8 = __pyx_t_25; } if (__pyx_t_8) { /* "pandas/algos.pyx":984 * for i in range(N): * if mask[i, xi] and mask[i, yi]: * vx = mat[i, xi] - meanx # <<<<<<<<<<<<<< * vy = mat[i, yi] - meany * */ __pyx_t_39 = __pyx_v_i; __pyx_t_40 = __pyx_v_xi; __pyx_v_vx = ((*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_mat.rcbuffer->pybuffer.buf, __pyx_t_39, __pyx_pybuffernd_mat.diminfo[0].strides, __pyx_t_40, __pyx_pybuffernd_mat.diminfo[1].strides)) - __pyx_v_meanx); /* "pandas/algos.pyx":985 * if mask[i, xi] and mask[i, yi]: * vx = mat[i, xi] - meanx * vy = mat[i, yi] - meany # <<<<<<<<<<<<<< * * sumx += vx * vy */ __pyx_t_41 = __pyx_v_i; __pyx_t_42 = __pyx_v_yi; __pyx_v_vy = ((*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_mat.rcbuffer->pybuffer.buf, __pyx_t_41, __pyx_pybuffernd_mat.diminfo[0].strides, __pyx_t_42, __pyx_pybuffernd_mat.diminfo[1].strides)) - __pyx_v_meany); /* "pandas/algos.pyx":987 * vy = mat[i, yi] - meany * * sumx += vx * vy # <<<<<<<<<<<<<< * sumxx += vx * vx * sumyy += vy * vy */ __pyx_v_sumx = (__pyx_v_sumx + (__pyx_v_vx * __pyx_v_vy)); /* "pandas/algos.pyx":988 * * sumx += vx * vy * sumxx += vx * vx # <<<<<<<<<<<<<< * sumyy += vy * vy * */ __pyx_v_sumxx = (__pyx_v_sumxx + (__pyx_v_vx * __pyx_v_vx)); /* "pandas/algos.pyx":989 * sumx += vx * vy * sumxx += vx * vx * sumyy += vy * vy # <<<<<<<<<<<<<< * * divisor = (nobs - 1.0) if cov else sqrt(sumxx * sumyy) */ __pyx_v_sumyy = (__pyx_v_sumyy + (__pyx_v_vy * __pyx_v_vy)); goto __pyx_L16; } __pyx_L16:; } /* "pandas/algos.pyx":991 * sumyy += vy * vy * * divisor = (nobs - 1.0) if cov else sqrt(sumxx * sumyy) # <<<<<<<<<<<<<< * * if divisor != 0: */ __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_v_cov); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 991; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__pyx_t_8) { __pyx_t_43 = (__pyx_v_nobs - 1.0); } else { __pyx_t_43 = sqrt((__pyx_v_sumxx * __pyx_v_sumyy)); } __pyx_v_divisor = __pyx_t_43; /* "pandas/algos.pyx":993 * divisor = (nobs - 1.0) if cov else sqrt(sumxx * sumyy) * * if divisor != 0: # <<<<<<<<<<<<<< * result[xi, yi] = result[yi, xi] = sumx / divisor * else: */ __pyx_t_8 = ((__pyx_v_divisor != 0.0) != 0); if (__pyx_t_8) { /* "pandas/algos.pyx":994 * * if divisor != 0: * result[xi, yi] = result[yi, xi] = sumx / divisor # <<<<<<<<<<<<<< * else: * result[xi, yi] = result[yi, xi] = np.NaN */ if (unlikely(__pyx_v_divisor == 0)) { #ifdef WITH_THREAD PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure(); #endif PyErr_SetString(PyExc_ZeroDivisionError, "float division"); #ifdef WITH_THREAD PyGILState_Release(__pyx_gilstate_save); #endif {__pyx_filename = __pyx_f[0]; __pyx_lineno = 994; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_30 = (__pyx_v_sumx / __pyx_v_divisor); __pyx_t_33 = __pyx_v_xi; __pyx_t_34 = __pyx_v_yi; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_33, __pyx_pybuffernd_result.diminfo[0].strides, __pyx_t_34, __pyx_pybuffernd_result.diminfo[1].strides) = __pyx_t_30; __pyx_t_44 = __pyx_v_yi; __pyx_t_45 = __pyx_v_xi; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_44, __pyx_pybuffernd_result.diminfo[0].strides, __pyx_t_45, __pyx_pybuffernd_result.diminfo[1].strides) = __pyx_t_30; goto __pyx_L17; } /*else*/ { /* "pandas/algos.pyx":996 * result[xi, yi] = result[yi, xi] = sumx / divisor * else: * result[xi, yi] = result[yi, xi] = np.NaN # <<<<<<<<<<<<<< * * return result */ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 996; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_NaN); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 996; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_30 = __pyx_PyFloat_AsDouble(__pyx_t_2); if (unlikely((__pyx_t_30 == (npy_float64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 996; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_46 = __pyx_v_xi; __pyx_t_47 = __pyx_v_yi; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_46, __pyx_pybuffernd_result.diminfo[0].strides, __pyx_t_47, __pyx_pybuffernd_result.diminfo[1].strides) = __pyx_t_30; __pyx_t_30 = __pyx_PyFloat_AsDouble(__pyx_t_2); if (unlikely((__pyx_t_30 == (npy_float64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 996; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_48 = __pyx_v_yi; __pyx_t_49 = __pyx_v_xi; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_48, __pyx_pybuffernd_result.diminfo[0].strides, __pyx_t_49, __pyx_pybuffernd_result.diminfo[1].strides) = __pyx_t_30; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } __pyx_L17:; } __pyx_L13:; } } /* "pandas/algos.pyx":998 * result[xi, yi] = result[yi, xi] = np.NaN * * return result # <<<<<<<<<<<<<< * * #---------------------------------------------------------------------- */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_result)); __pyx_r = ((PyObject *)__pyx_v_result); goto __pyx_L0; /* "pandas/algos.pyx":946 * @cython.boundscheck(False) * @cython.wraparound(False) * def nancorr(ndarray[float64_t, ndim=2] mat, cov=False, minp=None): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, j, xi, yi, N, K */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_10); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_mask.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_mat.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.nancorr", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_mask.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_mat.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_result); __Pyx_XDECREF((PyObject *)__pyx_v_mask); __Pyx_XDECREF(__pyx_v_minp); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/algos.pyx":1005 * @cython.boundscheck(False) * @cython.wraparound(False) * def nancorr_spearman(ndarray[float64_t, ndim=2] mat, Py_ssize_t minp=1): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, j, xi, yi, N, K */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_31nancorr_spearman(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_31nancorr_spearman = {__Pyx_NAMESTR("nancorr_spearman"), (PyCFunction)__pyx_pw_6pandas_5algos_31nancorr_spearman, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_31nancorr_spearman(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_mat = 0; Py_ssize_t __pyx_v_minp; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("nancorr_spearman (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_mat,&__pyx_n_s_minp,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_mat)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_minp); if (value) { values[1] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "nancorr_spearman") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1005; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_mat = ((PyArrayObject *)values[0]); if (values[1]) { __pyx_v_minp = __Pyx_PyIndex_AsSsize_t(values[1]); if (unlikely((__pyx_v_minp == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1005; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } else { __pyx_v_minp = ((Py_ssize_t)1); } } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("nancorr_spearman", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1005; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.nancorr_spearman", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_mat), __pyx_ptype_5numpy_ndarray, 1, "mat", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1005; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_30nancorr_spearman(__pyx_self, __pyx_v_mat, __pyx_v_minp); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5algos_30nancorr_spearman(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_mat, Py_ssize_t __pyx_v_minp) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_xi; Py_ssize_t __pyx_v_yi; Py_ssize_t __pyx_v_N; Py_ssize_t __pyx_v_K; PyArrayObject *__pyx_v_result = 0; PyArrayObject *__pyx_v_maskedx = 0; PyArrayObject *__pyx_v_maskedy = 0; PyArrayObject *__pyx_v_mask = 0; __pyx_t_5numpy_int64_t __pyx_v_nobs; __pyx_t_5numpy_float64_t __pyx_v_vx; __pyx_t_5numpy_float64_t __pyx_v_vy; __pyx_t_5numpy_float64_t __pyx_v_sumx; __pyx_t_5numpy_float64_t __pyx_v_sumxx; __pyx_t_5numpy_float64_t __pyx_v_sumyy; __pyx_t_5numpy_float64_t __pyx_v_mean; __pyx_t_5numpy_float64_t __pyx_v_divisor; __Pyx_LocalBuf_ND __pyx_pybuffernd_mask; __Pyx_Buffer __pyx_pybuffer_mask; __Pyx_LocalBuf_ND __pyx_pybuffernd_maskedx; __Pyx_Buffer __pyx_pybuffer_maskedx; __Pyx_LocalBuf_ND __pyx_pybuffernd_maskedy; __Pyx_Buffer __pyx_pybuffer_maskedy; __Pyx_LocalBuf_ND __pyx_pybuffernd_mat; __Pyx_Buffer __pyx_pybuffer_mat; __Pyx_LocalBuf_ND __pyx_pybuffernd_result; __Pyx_Buffer __pyx_pybuffer_result; 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 *); Py_ssize_t __pyx_t_6; Py_ssize_t __pyx_t_7; 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; PyArrayObject *__pyx_t_14 = NULL; 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; int __pyx_t_21; Py_ssize_t __pyx_t_22; Py_ssize_t __pyx_t_23; int __pyx_t_24; int __pyx_t_25; __pyx_t_5numpy_float64_t __pyx_t_26; Py_ssize_t __pyx_t_27; Py_ssize_t __pyx_t_28; PyArrayObject *__pyx_t_29 = NULL; PyArrayObject *__pyx_t_30 = NULL; 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; Py_ssize_t __pyx_t_37; Py_ssize_t __pyx_t_38; Py_ssize_t __pyx_t_39; Py_ssize_t __pyx_t_40; Py_ssize_t __pyx_t_41; Py_ssize_t __pyx_t_42; __pyx_t_5numpy_int64_t __pyx_t_43; Py_ssize_t __pyx_t_44; Py_ssize_t __pyx_t_45; Py_ssize_t __pyx_t_46; Py_ssize_t __pyx_t_47; Py_ssize_t __pyx_t_48; Py_ssize_t __pyx_t_49; Py_ssize_t __pyx_t_50; Py_ssize_t __pyx_t_51; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("nancorr_spearman", 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_maskedx.pybuffer.buf = NULL; __pyx_pybuffer_maskedx.refcount = 0; __pyx_pybuffernd_maskedx.data = NULL; __pyx_pybuffernd_maskedx.rcbuffer = &__pyx_pybuffer_maskedx; __pyx_pybuffer_maskedy.pybuffer.buf = NULL; __pyx_pybuffer_maskedy.refcount = 0; __pyx_pybuffernd_maskedy.data = NULL; __pyx_pybuffernd_maskedy.rcbuffer = &__pyx_pybuffer_maskedy; __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_mat.pybuffer.buf = NULL; __pyx_pybuffer_mat.refcount = 0; __pyx_pybuffernd_mat.data = NULL; __pyx_pybuffernd_mat.rcbuffer = &__pyx_pybuffer_mat; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_mat.rcbuffer->pybuffer, (PyObject*)__pyx_v_mat, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1005; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_mat.diminfo[0].strides = __pyx_pybuffernd_mat.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_mat.diminfo[0].shape = __pyx_pybuffernd_mat.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_mat.diminfo[1].strides = __pyx_pybuffernd_mat.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_mat.diminfo[1].shape = __pyx_pybuffernd_mat.rcbuffer->pybuffer.shape[1]; /* "pandas/algos.pyx":1012 * ndarray[float64_t, ndim=1] maskedy * ndarray[uint8_t, ndim=2] mask * int64_t nobs = 0 # <<<<<<<<<<<<<< * float64_t vx, vy, sumx, sumxx, sumyy, mean, divisor * */ __pyx_v_nobs = 0; /* "pandas/algos.pyx":1015 * float64_t vx, vy, sumx, sumxx, sumyy, mean, divisor * * N, K = ( mat).shape # <<<<<<<<<<<<<< * * result = np.empty((K, K), dtype=np.float64) */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_mat), __pyx_n_s_shape); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1015; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) { PyObject* sequence = __pyx_t_1; #if CYTHON_COMPILING_IN_CPYTHON Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1015; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1); } else { __pyx_t_2 = PyList_GET_ITEM(sequence, 0); __pyx_t_3 = PyList_GET_ITEM(sequence, 1); } __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); #else __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1015; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1015; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } else { Py_ssize_t index = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1015; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_5 = Py_TYPE(__pyx_t_4)->tp_iternext; index = 0; __pyx_t_2 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_2)) goto __pyx_L3_unpacking_failed; __Pyx_GOTREF(__pyx_t_2); index = 1; __pyx_t_3 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_3)) goto __pyx_L3_unpacking_failed; __Pyx_GOTREF(__pyx_t_3); if (__Pyx_IternextUnpackEndCheck(__pyx_t_5(__pyx_t_4), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1015; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 1015; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_L4_unpacking_done:; } __pyx_t_6 = __Pyx_PyIndex_AsSsize_t(__pyx_t_2); if (unlikely((__pyx_t_6 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1015; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_7 = __Pyx_PyIndex_AsSsize_t(__pyx_t_3); if (unlikely((__pyx_t_7 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1015; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_N = __pyx_t_6; __pyx_v_K = __pyx_t_7; /* "pandas/algos.pyx":1017 * N, K = ( mat).shape * * result = np.empty((K, K), dtype=np.float64) # <<<<<<<<<<<<<< * mask = np.isfinite(mat).view(np.uint8) * */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1017; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_empty); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1017; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_K); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1017; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_K); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1017; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1017; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_1 = 0; __pyx_t_2 = 0; __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1017; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyDict_New(); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1017; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1017; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_float64); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1017; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_dtype, __pyx_t_8) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1017; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_8 = PyObject_Call(__pyx_t_3, __pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1017; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (!(likely(((__pyx_t_8) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_8, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1017; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_9 = ((PyArrayObject *)__pyx_t_8); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __pyx_t_10 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_t_9, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_result.rcbuffer->pybuffer, (PyObject*)__pyx_v_result, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_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]; __pyx_pybuffernd_result.diminfo[1].strides = __pyx_pybuffernd_result.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_result.diminfo[1].shape = __pyx_pybuffernd_result.rcbuffer->pybuffer.shape[1]; if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1017; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_9 = 0; __pyx_v_result = ((PyArrayObject *)__pyx_t_8); __pyx_t_8 = 0; /* "pandas/algos.pyx":1018 * * result = np.empty((K, K), dtype=np.float64) * mask = np.isfinite(mat).view(np.uint8) # <<<<<<<<<<<<<< * * for xi in range(K): */ __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1018; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_isfinite); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1018; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1018; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_INCREF(((PyObject *)__pyx_v_mat)); PyTuple_SET_ITEM(__pyx_t_8, 0, ((PyObject *)__pyx_v_mat)); __Pyx_GIVEREF(((PyObject *)__pyx_v_mat)); __pyx_t_2 = PyObject_Call(__pyx_t_4, __pyx_t_8, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1018; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_view); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1018; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1018; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_uint8); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1018; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1018; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyObject_Call(__pyx_t_8, __pyx_t_2, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1018; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1018; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_14 = ((PyArrayObject *)__pyx_t_4); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_mask.rcbuffer->pybuffer); __pyx_t_10 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_mask.rcbuffer->pybuffer, (PyObject*)__pyx_t_14, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 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_mask.rcbuffer->pybuffer, (PyObject*)__pyx_v_mask, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 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_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]; __pyx_pybuffernd_mask.diminfo[1].strides = __pyx_pybuffernd_mask.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_mask.diminfo[1].shape = __pyx_pybuffernd_mask.rcbuffer->pybuffer.shape[1]; if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1018; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_14 = 0; __pyx_v_mask = ((PyArrayObject *)__pyx_t_4); __pyx_t_4 = 0; /* "pandas/algos.pyx":1020 * mask = np.isfinite(mat).view(np.uint8) * * for xi in range(K): # <<<<<<<<<<<<<< * for yi in range(xi + 1): * nobs = 0 */ __pyx_t_7 = __pyx_v_K; for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_7; __pyx_t_6+=1) { __pyx_v_xi = __pyx_t_6; /* "pandas/algos.pyx":1021 * * for xi in range(K): * for yi in range(xi + 1): # <<<<<<<<<<<<<< * nobs = 0 * for i in range(N): */ __pyx_t_15 = (__pyx_v_xi + 1); for (__pyx_t_16 = 0; __pyx_t_16 < __pyx_t_15; __pyx_t_16+=1) { __pyx_v_yi = __pyx_t_16; /* "pandas/algos.pyx":1022 * for xi in range(K): * for yi in range(xi + 1): * nobs = 0 # <<<<<<<<<<<<<< * for i in range(N): * if mask[i, xi] and mask[i, yi]: */ __pyx_v_nobs = 0; /* "pandas/algos.pyx":1023 * for yi in range(xi + 1): * nobs = 0 * for i in range(N): # <<<<<<<<<<<<<< * if mask[i, xi] and mask[i, yi]: * nobs += 1 */ __pyx_t_17 = __pyx_v_N; for (__pyx_t_18 = 0; __pyx_t_18 < __pyx_t_17; __pyx_t_18+=1) { __pyx_v_i = __pyx_t_18; /* "pandas/algos.pyx":1024 * nobs = 0 * for i in range(N): * if mask[i, xi] and mask[i, yi]: # <<<<<<<<<<<<<< * nobs += 1 * */ __pyx_t_19 = __pyx_v_i; __pyx_t_20 = __pyx_v_xi; __pyx_t_21 = ((*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_mask.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_mask.diminfo[0].strides, __pyx_t_20, __pyx_pybuffernd_mask.diminfo[1].strides)) != 0); if (__pyx_t_21) { __pyx_t_22 = __pyx_v_i; __pyx_t_23 = __pyx_v_yi; __pyx_t_24 = ((*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_mask.rcbuffer->pybuffer.buf, __pyx_t_22, __pyx_pybuffernd_mask.diminfo[0].strides, __pyx_t_23, __pyx_pybuffernd_mask.diminfo[1].strides)) != 0); __pyx_t_25 = __pyx_t_24; } else { __pyx_t_25 = __pyx_t_21; } if (__pyx_t_25) { /* "pandas/algos.pyx":1025 * for i in range(N): * if mask[i, xi] and mask[i, yi]: * nobs += 1 # <<<<<<<<<<<<<< * * if nobs < minp: */ __pyx_v_nobs = (__pyx_v_nobs + 1); goto __pyx_L11; } __pyx_L11:; } /* "pandas/algos.pyx":1027 * nobs += 1 * * if nobs < minp: # <<<<<<<<<<<<<< * result[xi, yi] = result[yi, xi] = np.NaN * else: */ __pyx_t_25 = ((__pyx_v_nobs < __pyx_v_minp) != 0); if (__pyx_t_25) { /* "pandas/algos.pyx":1028 * * if nobs < minp: * result[xi, yi] = result[yi, xi] = np.NaN # <<<<<<<<<<<<<< * else: * maskedx = np.empty(nobs, dtype=np.float64) */ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1028; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_NaN); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1028; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_26 = __pyx_PyFloat_AsDouble(__pyx_t_2); if (unlikely((__pyx_t_26 == (npy_float64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1028; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_17 = __pyx_v_xi; __pyx_t_18 = __pyx_v_yi; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_result.diminfo[0].strides, __pyx_t_18, __pyx_pybuffernd_result.diminfo[1].strides) = __pyx_t_26; __pyx_t_26 = __pyx_PyFloat_AsDouble(__pyx_t_2); if (unlikely((__pyx_t_26 == (npy_float64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1028; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_27 = __pyx_v_yi; __pyx_t_28 = __pyx_v_xi; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_27, __pyx_pybuffernd_result.diminfo[0].strides, __pyx_t_28, __pyx_pybuffernd_result.diminfo[1].strides) = __pyx_t_26; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; goto __pyx_L12; } /*else*/ { /* "pandas/algos.pyx":1030 * result[xi, yi] = result[yi, xi] = np.NaN * else: * maskedx = np.empty(nobs, dtype=np.float64) # <<<<<<<<<<<<<< * maskedy = np.empty(nobs, dtype=np.float64) * j = 0 */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1030; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_empty); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1030; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyInt_From_npy_int64(__pyx_v_nobs); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1030; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1030; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1030; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1030; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_float64); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1030; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_dtype, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1030; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyObject_Call(__pyx_t_4, __pyx_t_8, __pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1030; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1030; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_29 = ((PyArrayObject *)__pyx_t_1); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_maskedx.rcbuffer->pybuffer); __pyx_t_10 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_maskedx.rcbuffer->pybuffer, (PyObject*)__pyx_t_29, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_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_maskedx.rcbuffer->pybuffer, (PyObject*)__pyx_v_maskedx, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_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_pybuffernd_maskedx.diminfo[0].strides = __pyx_pybuffernd_maskedx.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_maskedx.diminfo[0].shape = __pyx_pybuffernd_maskedx.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1030; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_29 = 0; __Pyx_XDECREF_SET(__pyx_v_maskedx, ((PyArrayObject *)__pyx_t_1)); __pyx_t_1 = 0; /* "pandas/algos.pyx":1031 * else: * maskedx = np.empty(nobs, dtype=np.float64) * maskedy = np.empty(nobs, dtype=np.float64) # <<<<<<<<<<<<<< * j = 0 * for i in range(N): */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1031; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 1031; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_PyInt_From_npy_int64(__pyx_v_nobs); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1031; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1031; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1031; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1031; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_float64); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1031; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_dtype, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1031; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyObject_Call(__pyx_t_2, __pyx_t_8, __pyx_t_1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1031; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1031; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_30 = ((PyArrayObject *)__pyx_t_3); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_maskedy.rcbuffer->pybuffer); __pyx_t_10 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_maskedy.rcbuffer->pybuffer, (PyObject*)__pyx_t_30, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_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_maskedy.rcbuffer->pybuffer, (PyObject*)__pyx_v_maskedy, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_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_pybuffernd_maskedy.diminfo[0].strides = __pyx_pybuffernd_maskedy.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_maskedy.diminfo[0].shape = __pyx_pybuffernd_maskedy.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1031; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_30 = 0; __Pyx_XDECREF_SET(__pyx_v_maskedy, ((PyArrayObject *)__pyx_t_3)); __pyx_t_3 = 0; /* "pandas/algos.pyx":1032 * maskedx = np.empty(nobs, dtype=np.float64) * maskedy = np.empty(nobs, dtype=np.float64) * j = 0 # <<<<<<<<<<<<<< * for i in range(N): * if mask[i, xi] and mask[i, yi]: */ __pyx_v_j = 0; /* "pandas/algos.pyx":1033 * maskedy = np.empty(nobs, dtype=np.float64) * j = 0 * for i in range(N): # <<<<<<<<<<<<<< * if mask[i, xi] and mask[i, yi]: * maskedx[j] = mat[i, xi] */ __pyx_t_31 = __pyx_v_N; for (__pyx_t_32 = 0; __pyx_t_32 < __pyx_t_31; __pyx_t_32+=1) { __pyx_v_i = __pyx_t_32; /* "pandas/algos.pyx":1034 * j = 0 * for i in range(N): * if mask[i, xi] and mask[i, yi]: # <<<<<<<<<<<<<< * maskedx[j] = mat[i, xi] * maskedy[j] = mat[i, yi] */ __pyx_t_33 = __pyx_v_i; __pyx_t_34 = __pyx_v_xi; __pyx_t_25 = ((*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_mask.rcbuffer->pybuffer.buf, __pyx_t_33, __pyx_pybuffernd_mask.diminfo[0].strides, __pyx_t_34, __pyx_pybuffernd_mask.diminfo[1].strides)) != 0); if (__pyx_t_25) { __pyx_t_35 = __pyx_v_i; __pyx_t_36 = __pyx_v_yi; __pyx_t_21 = ((*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_mask.rcbuffer->pybuffer.buf, __pyx_t_35, __pyx_pybuffernd_mask.diminfo[0].strides, __pyx_t_36, __pyx_pybuffernd_mask.diminfo[1].strides)) != 0); __pyx_t_24 = __pyx_t_21; } else { __pyx_t_24 = __pyx_t_25; } if (__pyx_t_24) { /* "pandas/algos.pyx":1035 * for i in range(N): * if mask[i, xi] and mask[i, yi]: * maskedx[j] = mat[i, xi] # <<<<<<<<<<<<<< * maskedy[j] = mat[i, yi] * j += 1 */ __pyx_t_37 = __pyx_v_i; __pyx_t_38 = __pyx_v_xi; __pyx_t_39 = __pyx_v_j; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_maskedx.rcbuffer->pybuffer.buf, __pyx_t_39, __pyx_pybuffernd_maskedx.diminfo[0].strides) = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_mat.rcbuffer->pybuffer.buf, __pyx_t_37, __pyx_pybuffernd_mat.diminfo[0].strides, __pyx_t_38, __pyx_pybuffernd_mat.diminfo[1].strides)); /* "pandas/algos.pyx":1036 * if mask[i, xi] and mask[i, yi]: * maskedx[j] = mat[i, xi] * maskedy[j] = mat[i, yi] # <<<<<<<<<<<<<< * j += 1 * maskedx = rank_1d_float64(maskedx) */ __pyx_t_40 = __pyx_v_i; __pyx_t_41 = __pyx_v_yi; __pyx_t_42 = __pyx_v_j; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_maskedy.rcbuffer->pybuffer.buf, __pyx_t_42, __pyx_pybuffernd_maskedy.diminfo[0].strides) = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_mat.rcbuffer->pybuffer.buf, __pyx_t_40, __pyx_pybuffernd_mat.diminfo[0].strides, __pyx_t_41, __pyx_pybuffernd_mat.diminfo[1].strides)); /* "pandas/algos.pyx":1037 * maskedx[j] = mat[i, xi] * maskedy[j] = mat[i, yi] * j += 1 # <<<<<<<<<<<<<< * maskedx = rank_1d_float64(maskedx) * maskedy = rank_1d_float64(maskedy) */ __pyx_v_j = (__pyx_v_j + 1); goto __pyx_L15; } __pyx_L15:; } /* "pandas/algos.pyx":1038 * maskedy[j] = mat[i, yi] * j += 1 * maskedx = rank_1d_float64(maskedx) # <<<<<<<<<<<<<< * maskedy = rank_1d_float64(maskedy) * */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_rank_1d_float64); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1038; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1038; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)__pyx_v_maskedx)); PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_maskedx)); __Pyx_GIVEREF(((PyObject *)__pyx_v_maskedx)); __pyx_t_8 = PyObject_Call(__pyx_t_3, __pyx_t_1, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1038; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (!(likely(((__pyx_t_8) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_8, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1038; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_29 = ((PyArrayObject *)__pyx_t_8); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_maskedx.rcbuffer->pybuffer); __pyx_t_10 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_maskedx.rcbuffer->pybuffer, (PyObject*)__pyx_t_29, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_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_maskedx.rcbuffer->pybuffer, (PyObject*)__pyx_v_maskedx, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_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_pybuffernd_maskedx.diminfo[0].strides = __pyx_pybuffernd_maskedx.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_maskedx.diminfo[0].shape = __pyx_pybuffernd_maskedx.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1038; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_29 = 0; __Pyx_DECREF_SET(__pyx_v_maskedx, ((PyArrayObject *)__pyx_t_8)); __pyx_t_8 = 0; /* "pandas/algos.pyx":1039 * j += 1 * maskedx = rank_1d_float64(maskedx) * maskedy = rank_1d_float64(maskedy) # <<<<<<<<<<<<<< * * mean = (nobs + 1) / 2. */ __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_rank_1d_float64); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1039; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1039; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)__pyx_v_maskedy)); PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_maskedy)); __Pyx_GIVEREF(((PyObject *)__pyx_v_maskedy)); __pyx_t_3 = PyObject_Call(__pyx_t_8, __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1039; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 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_filename = __pyx_f[0]; __pyx_lineno = 1039; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_30 = ((PyArrayObject *)__pyx_t_3); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_maskedy.rcbuffer->pybuffer); __pyx_t_10 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_maskedy.rcbuffer->pybuffer, (PyObject*)__pyx_t_30, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_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_maskedy.rcbuffer->pybuffer, (PyObject*)__pyx_v_maskedy, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_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_pybuffernd_maskedy.diminfo[0].strides = __pyx_pybuffernd_maskedy.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_maskedy.diminfo[0].shape = __pyx_pybuffernd_maskedy.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1039; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_30 = 0; __Pyx_DECREF_SET(__pyx_v_maskedy, ((PyArrayObject *)__pyx_t_3)); __pyx_t_3 = 0; /* "pandas/algos.pyx":1041 * maskedy = rank_1d_float64(maskedy) * * mean = (nobs + 1) / 2. # <<<<<<<<<<<<<< * * # now the cov numerator */ __pyx_v_mean = ((__pyx_v_nobs + 1) / 2.); /* "pandas/algos.pyx":1044 * * # now the cov numerator * sumx = sumxx = sumyy = 0 # <<<<<<<<<<<<<< * * for i in range(nobs): */ __pyx_v_sumx = 0; __pyx_v_sumxx = 0; __pyx_v_sumyy = 0; /* "pandas/algos.pyx":1046 * sumx = sumxx = sumyy = 0 * * for i in range(nobs): # <<<<<<<<<<<<<< * vx = maskedx[i] - mean * vy = maskedy[i] - mean */ __pyx_t_43 = __pyx_v_nobs; for (__pyx_t_31 = 0; __pyx_t_31 < __pyx_t_43; __pyx_t_31+=1) { __pyx_v_i = __pyx_t_31; /* "pandas/algos.pyx":1047 * * for i in range(nobs): * vx = maskedx[i] - mean # <<<<<<<<<<<<<< * vy = maskedy[i] - mean * */ __pyx_t_32 = __pyx_v_i; __pyx_v_vx = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_maskedx.rcbuffer->pybuffer.buf, __pyx_t_32, __pyx_pybuffernd_maskedx.diminfo[0].strides)) - __pyx_v_mean); /* "pandas/algos.pyx":1048 * for i in range(nobs): * vx = maskedx[i] - mean * vy = maskedy[i] - mean # <<<<<<<<<<<<<< * * sumx += vx * vy */ __pyx_t_44 = __pyx_v_i; __pyx_v_vy = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_maskedy.rcbuffer->pybuffer.buf, __pyx_t_44, __pyx_pybuffernd_maskedy.diminfo[0].strides)) - __pyx_v_mean); /* "pandas/algos.pyx":1050 * vy = maskedy[i] - mean * * sumx += vx * vy # <<<<<<<<<<<<<< * sumxx += vx * vx * sumyy += vy * vy */ __pyx_v_sumx = (__pyx_v_sumx + (__pyx_v_vx * __pyx_v_vy)); /* "pandas/algos.pyx":1051 * * sumx += vx * vy * sumxx += vx * vx # <<<<<<<<<<<<<< * sumyy += vy * vy * */ __pyx_v_sumxx = (__pyx_v_sumxx + (__pyx_v_vx * __pyx_v_vx)); /* "pandas/algos.pyx":1052 * sumx += vx * vy * sumxx += vx * vx * sumyy += vy * vy # <<<<<<<<<<<<<< * * divisor = sqrt(sumxx * sumyy) */ __pyx_v_sumyy = (__pyx_v_sumyy + (__pyx_v_vy * __pyx_v_vy)); } /* "pandas/algos.pyx":1054 * sumyy += vy * vy * * divisor = sqrt(sumxx * sumyy) # <<<<<<<<<<<<<< * * if divisor != 0: */ __pyx_v_divisor = sqrt((__pyx_v_sumxx * __pyx_v_sumyy)); /* "pandas/algos.pyx":1056 * divisor = sqrt(sumxx * sumyy) * * if divisor != 0: # <<<<<<<<<<<<<< * result[xi, yi] = result[yi, xi] = sumx / divisor * else: */ __pyx_t_24 = ((__pyx_v_divisor != 0.0) != 0); if (__pyx_t_24) { /* "pandas/algos.pyx":1057 * * if divisor != 0: * result[xi, yi] = result[yi, xi] = sumx / divisor # <<<<<<<<<<<<<< * else: * result[xi, yi] = result[yi, xi] = np.NaN */ if (unlikely(__pyx_v_divisor == 0)) { #ifdef WITH_THREAD PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure(); #endif PyErr_SetString(PyExc_ZeroDivisionError, "float division"); #ifdef WITH_THREAD PyGILState_Release(__pyx_gilstate_save); #endif {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1057; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_26 = (__pyx_v_sumx / __pyx_v_divisor); __pyx_t_31 = __pyx_v_xi; __pyx_t_45 = __pyx_v_yi; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_31, __pyx_pybuffernd_result.diminfo[0].strides, __pyx_t_45, __pyx_pybuffernd_result.diminfo[1].strides) = __pyx_t_26; __pyx_t_46 = __pyx_v_yi; __pyx_t_47 = __pyx_v_xi; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_46, __pyx_pybuffernd_result.diminfo[0].strides, __pyx_t_47, __pyx_pybuffernd_result.diminfo[1].strides) = __pyx_t_26; goto __pyx_L18; } /*else*/ { /* "pandas/algos.pyx":1059 * result[xi, yi] = result[yi, xi] = sumx / divisor * else: * result[xi, yi] = result[yi, xi] = np.NaN # <<<<<<<<<<<<<< * * return result */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1059; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 1059; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_26 = __pyx_PyFloat_AsDouble(__pyx_t_1); if (unlikely((__pyx_t_26 == (npy_float64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1059; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_48 = __pyx_v_xi; __pyx_t_49 = __pyx_v_yi; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_48, __pyx_pybuffernd_result.diminfo[0].strides, __pyx_t_49, __pyx_pybuffernd_result.diminfo[1].strides) = __pyx_t_26; __pyx_t_26 = __pyx_PyFloat_AsDouble(__pyx_t_1); if (unlikely((__pyx_t_26 == (npy_float64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1059; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_50 = __pyx_v_yi; __pyx_t_51 = __pyx_v_xi; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_50, __pyx_pybuffernd_result.diminfo[0].strides, __pyx_t_51, __pyx_pybuffernd_result.diminfo[1].strides) = __pyx_t_26; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } __pyx_L18:; } __pyx_L12:; } } /* "pandas/algos.pyx":1061 * result[xi, yi] = result[yi, xi] = np.NaN * * return result # <<<<<<<<<<<<<< * * #---------------------------------------------------------------------- */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_result)); __pyx_r = ((PyObject *)__pyx_v_result); goto __pyx_L0; /* "pandas/algos.pyx":1005 * @cython.boundscheck(False) * @cython.wraparound(False) * def nancorr_spearman(ndarray[float64_t, ndim=2] mat, Py_ssize_t minp=1): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, j, xi, yi, N, K */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_8); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_mask.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_maskedx.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_maskedy.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_mat.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.nancorr_spearman", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_mask.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_maskedx.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_maskedy.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_mat.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_result); __Pyx_XDECREF((PyObject *)__pyx_v_maskedx); __Pyx_XDECREF((PyObject *)__pyx_v_maskedy); __Pyx_XDECREF((PyObject *)__pyx_v_mask); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/algos.pyx":1066 * # Rolling variance * * def roll_var(ndarray[double_t] input, int win, int minp, int ddof=1): # <<<<<<<<<<<<<< * cdef double val, prev, sum_x = 0, sum_xx = 0, nobs = 0 * cdef Py_ssize_t i */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_33roll_var(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_33roll_var = {__Pyx_NAMESTR("roll_var"), (PyCFunction)__pyx_pw_6pandas_5algos_33roll_var, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_33roll_var(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_input = 0; int __pyx_v_win; int __pyx_v_minp; int __pyx_v_ddof; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("roll_var (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_input,&__pyx_n_s_win,&__pyx_n_s_minp,&__pyx_n_s_ddof,0}; PyObject* values[4] = {0,0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_input)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_win)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("roll_var", 0, 3, 4, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1066; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_minp)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("roll_var", 0, 3, 4, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1066; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ddof); if (value) { values[3] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "roll_var") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1066; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_input = ((PyArrayObject *)values[0]); __pyx_v_win = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_win == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1066; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_minp = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_minp == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1066; __pyx_clineno = __LINE__; goto __pyx_L3_error;} if (values[3]) { __pyx_v_ddof = __Pyx_PyInt_As_int(values[3]); if (unlikely((__pyx_v_ddof == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1066; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } else { __pyx_v_ddof = ((int)1); } } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("roll_var", 0, 3, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1066; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.roll_var", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_input), __pyx_ptype_5numpy_ndarray, 1, "input", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1066; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_32roll_var(__pyx_self, __pyx_v_input, __pyx_v_win, __pyx_v_minp, __pyx_v_ddof); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5algos_32roll_var(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_input, int __pyx_v_win, int __pyx_v_minp, int __pyx_v_ddof) { double __pyx_v_val; double __pyx_v_prev; double __pyx_v_sum_x; double __pyx_v_sum_xx; double __pyx_v_nobs; Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_N; PyArrayObject *__pyx_v_output = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_input; __Pyx_Buffer __pyx_pybuffer_input; __Pyx_LocalBuf_ND __pyx_pybuffernd_output; __Pyx_Buffer __pyx_pybuffer_output; 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; PyArrayObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; int __pyx_t_8; long __pyx_t_9; int __pyx_t_10; Py_ssize_t __pyx_t_11; Py_ssize_t __pyx_t_12; Py_ssize_t __pyx_t_13; Py_ssize_t __pyx_t_14; Py_ssize_t __pyx_t_15; double __pyx_t_16; double __pyx_t_17; Py_ssize_t __pyx_t_18; Py_ssize_t __pyx_t_19; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("roll_var", 0); __pyx_pybuffer_output.pybuffer.buf = NULL; __pyx_pybuffer_output.refcount = 0; __pyx_pybuffernd_output.data = NULL; __pyx_pybuffernd_output.rcbuffer = &__pyx_pybuffer_output; __pyx_pybuffer_input.pybuffer.buf = NULL; __pyx_pybuffer_input.refcount = 0; __pyx_pybuffernd_input.data = NULL; __pyx_pybuffernd_input.rcbuffer = &__pyx_pybuffer_input; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_input.rcbuffer->pybuffer, (PyObject*)__pyx_v_input, &__Pyx_TypeInfo_nn___pyx_t_5numpy_double_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1066; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_input.diminfo[0].strides = __pyx_pybuffernd_input.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_input.diminfo[0].shape = __pyx_pybuffernd_input.rcbuffer->pybuffer.shape[0]; /* "pandas/algos.pyx":1067 * * def roll_var(ndarray[double_t] input, int win, int minp, int ddof=1): * cdef double val, prev, sum_x = 0, sum_xx = 0, nobs = 0 # <<<<<<<<<<<<<< * cdef Py_ssize_t i * cdef Py_ssize_t N = len(input) */ __pyx_v_sum_x = 0.0; __pyx_v_sum_xx = 0.0; __pyx_v_nobs = 0.0; /* "pandas/algos.pyx":1069 * cdef double val, prev, sum_x = 0, sum_xx = 0, nobs = 0 * cdef Py_ssize_t i * cdef Py_ssize_t N = len(input) # <<<<<<<<<<<<<< * * cdef ndarray[double_t] output = np.empty(N, dtype=float) */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_input)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1069; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_N = __pyx_t_1; /* "pandas/algos.pyx":1071 * cdef Py_ssize_t N = len(input) * * cdef ndarray[double_t] output = np.empty(N, dtype=float) # <<<<<<<<<<<<<< * * minp = _check_minp(win, minp, N) */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1071; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 1071; __pyx_clineno = __LINE__; goto __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_N); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1071; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1071; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1071; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_dtype, ((PyObject *)((PyObject*)(&PyFloat_Type)))) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1071; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_5 = PyObject_Call(__pyx_t_3, __pyx_t_4, __pyx_t_2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1071; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1071; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_6 = ((PyArrayObject *)__pyx_t_5); { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_output.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_nn___pyx_t_5numpy_double_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { __pyx_v_output = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_output.rcbuffer->pybuffer.buf = NULL; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1071; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } else {__pyx_pybuffernd_output.diminfo[0].strides = __pyx_pybuffernd_output.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_output.diminfo[0].shape = __pyx_pybuffernd_output.rcbuffer->pybuffer.shape[0]; } } __pyx_t_6 = 0; __pyx_v_output = ((PyArrayObject *)__pyx_t_5); __pyx_t_5 = 0; /* "pandas/algos.pyx":1073 * cdef ndarray[double_t] output = np.empty(N, dtype=float) * * minp = _check_minp(win, minp, N) # <<<<<<<<<<<<<< * * for i from 0 <= i < minp - 1: */ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_check_minp); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1073; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_win); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1073; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_minp); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1073; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = PyInt_FromSsize_t(__pyx_v_N); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1073; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_7 = PyTuple_New(3); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1073; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_7, 2, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_2 = 0; __pyx_t_4 = 0; __pyx_t_3 = 0; __pyx_t_3 = PyObject_Call(__pyx_t_5, __pyx_t_7, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1073; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_8 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1073; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_minp = __pyx_t_8; /* "pandas/algos.pyx":1075 * minp = _check_minp(win, minp, N) * * for i from 0 <= i < minp - 1: # <<<<<<<<<<<<<< * val = input[i] * */ __pyx_t_9 = (__pyx_v_minp - 1); for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_9; __pyx_v_i++) { /* "pandas/algos.pyx":1076 * * for i from 0 <= i < minp - 1: * val = input[i] # <<<<<<<<<<<<<< * * # Not NaN */ __pyx_t_1 = __pyx_v_i; __pyx_t_8 = -1; if (__pyx_t_1 < 0) { __pyx_t_1 += __pyx_pybuffernd_input.diminfo[0].shape; if (unlikely(__pyx_t_1 < 0)) __pyx_t_8 = 0; } else if (unlikely(__pyx_t_1 >= __pyx_pybuffernd_input.diminfo[0].shape)) __pyx_t_8 = 0; if (unlikely(__pyx_t_8 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_8); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1076; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_val = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_double_t *, __pyx_pybuffernd_input.rcbuffer->pybuffer.buf, __pyx_t_1, __pyx_pybuffernd_input.diminfo[0].strides)); /* "pandas/algos.pyx":1079 * * # Not NaN * if val == val: # <<<<<<<<<<<<<< * nobs += 1 * sum_x += val */ __pyx_t_10 = ((__pyx_v_val == __pyx_v_val) != 0); if (__pyx_t_10) { /* "pandas/algos.pyx":1080 * # Not NaN * if val == val: * nobs += 1 # <<<<<<<<<<<<<< * sum_x += val * sum_xx += val * val */ __pyx_v_nobs = (__pyx_v_nobs + 1.0); /* "pandas/algos.pyx":1081 * if val == val: * nobs += 1 * sum_x += val # <<<<<<<<<<<<<< * sum_xx += val * val * */ __pyx_v_sum_x = (__pyx_v_sum_x + __pyx_v_val); /* "pandas/algos.pyx":1082 * nobs += 1 * sum_x += val * sum_xx += val * val # <<<<<<<<<<<<<< * * output[i] = NaN */ __pyx_v_sum_xx = (__pyx_v_sum_xx + (__pyx_v_val * __pyx_v_val)); goto __pyx_L5; } __pyx_L5:; /* "pandas/algos.pyx":1084 * sum_xx += val * val * * output[i] = NaN # <<<<<<<<<<<<<< * * for i from minp - 1 <= i < N: */ __pyx_t_11 = __pyx_v_i; __pyx_t_8 = -1; if (__pyx_t_11 < 0) { __pyx_t_11 += __pyx_pybuffernd_output.diminfo[0].shape; if (unlikely(__pyx_t_11 < 0)) __pyx_t_8 = 0; } else if (unlikely(__pyx_t_11 >= __pyx_pybuffernd_output.diminfo[0].shape)) __pyx_t_8 = 0; if (unlikely(__pyx_t_8 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_8); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1084; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_double_t *, __pyx_pybuffernd_output.rcbuffer->pybuffer.buf, __pyx_t_11, __pyx_pybuffernd_output.diminfo[0].strides) = __pyx_v_6pandas_5algos_NaN; } /* "pandas/algos.pyx":1086 * output[i] = NaN * * for i from minp - 1 <= i < N: # <<<<<<<<<<<<<< * val = input[i] * */ __pyx_t_12 = __pyx_v_N; for (__pyx_v_i = (__pyx_v_minp - 1); __pyx_v_i < __pyx_t_12; __pyx_v_i++) { /* "pandas/algos.pyx":1087 * * for i from minp - 1 <= i < N: * val = input[i] # <<<<<<<<<<<<<< * * if val == val: */ __pyx_t_13 = __pyx_v_i; __pyx_t_8 = -1; if (__pyx_t_13 < 0) { __pyx_t_13 += __pyx_pybuffernd_input.diminfo[0].shape; if (unlikely(__pyx_t_13 < 0)) __pyx_t_8 = 0; } else if (unlikely(__pyx_t_13 >= __pyx_pybuffernd_input.diminfo[0].shape)) __pyx_t_8 = 0; if (unlikely(__pyx_t_8 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_8); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1087; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_val = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_double_t *, __pyx_pybuffernd_input.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_input.diminfo[0].strides)); /* "pandas/algos.pyx":1089 * val = input[i] * * if val == val: # <<<<<<<<<<<<<< * nobs += 1 * sum_x += val */ __pyx_t_10 = ((__pyx_v_val == __pyx_v_val) != 0); if (__pyx_t_10) { /* "pandas/algos.pyx":1090 * * if val == val: * nobs += 1 # <<<<<<<<<<<<<< * sum_x += val * sum_xx += val * val */ __pyx_v_nobs = (__pyx_v_nobs + 1.0); /* "pandas/algos.pyx":1091 * if val == val: * nobs += 1 * sum_x += val # <<<<<<<<<<<<<< * sum_xx += val * val * */ __pyx_v_sum_x = (__pyx_v_sum_x + __pyx_v_val); /* "pandas/algos.pyx":1092 * nobs += 1 * sum_x += val * sum_xx += val * val # <<<<<<<<<<<<<< * * if i > win - 1: */ __pyx_v_sum_xx = (__pyx_v_sum_xx + (__pyx_v_val * __pyx_v_val)); goto __pyx_L8; } __pyx_L8:; /* "pandas/algos.pyx":1094 * sum_xx += val * val * * if i > win - 1: # <<<<<<<<<<<<<< * prev = input[i - win] * if prev == prev: */ __pyx_t_10 = ((__pyx_v_i > (__pyx_v_win - 1)) != 0); if (__pyx_t_10) { /* "pandas/algos.pyx":1095 * * if i > win - 1: * prev = input[i - win] # <<<<<<<<<<<<<< * if prev == prev: * sum_x -= prev */ __pyx_t_14 = (__pyx_v_i - __pyx_v_win); __pyx_t_8 = -1; if (__pyx_t_14 < 0) { __pyx_t_14 += __pyx_pybuffernd_input.diminfo[0].shape; if (unlikely(__pyx_t_14 < 0)) __pyx_t_8 = 0; } else if (unlikely(__pyx_t_14 >= __pyx_pybuffernd_input.diminfo[0].shape)) __pyx_t_8 = 0; if (unlikely(__pyx_t_8 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_8); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1095; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_prev = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_double_t *, __pyx_pybuffernd_input.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_input.diminfo[0].strides)); /* "pandas/algos.pyx":1096 * if i > win - 1: * prev = input[i - win] * if prev == prev: # <<<<<<<<<<<<<< * sum_x -= prev * sum_xx -= prev * prev */ __pyx_t_10 = ((__pyx_v_prev == __pyx_v_prev) != 0); if (__pyx_t_10) { /* "pandas/algos.pyx":1097 * prev = input[i - win] * if prev == prev: * sum_x -= prev # <<<<<<<<<<<<<< * sum_xx -= prev * prev * nobs -= 1 */ __pyx_v_sum_x = (__pyx_v_sum_x - __pyx_v_prev); /* "pandas/algos.pyx":1098 * if prev == prev: * sum_x -= prev * sum_xx -= prev * prev # <<<<<<<<<<<<<< * nobs -= 1 * */ __pyx_v_sum_xx = (__pyx_v_sum_xx - (__pyx_v_prev * __pyx_v_prev)); /* "pandas/algos.pyx":1099 * sum_x -= prev * sum_xx -= prev * prev * nobs -= 1 # <<<<<<<<<<<<<< * * if nobs >= minp: */ __pyx_v_nobs = (__pyx_v_nobs - 1.0); goto __pyx_L10; } __pyx_L10:; goto __pyx_L9; } __pyx_L9:; /* "pandas/algos.pyx":1101 * nobs -= 1 * * if nobs >= minp: # <<<<<<<<<<<<<< * # pathological case * if nobs == 1: */ __pyx_t_10 = ((__pyx_v_nobs >= __pyx_v_minp) != 0); if (__pyx_t_10) { /* "pandas/algos.pyx":1103 * if nobs >= minp: * # pathological case * if nobs == 1: # <<<<<<<<<<<<<< * output[i] = 0 * continue */ __pyx_t_10 = ((__pyx_v_nobs == 1.0) != 0); if (__pyx_t_10) { /* "pandas/algos.pyx":1104 * # pathological case * if nobs == 1: * output[i] = 0 # <<<<<<<<<<<<<< * continue * */ __pyx_t_15 = __pyx_v_i; __pyx_t_8 = -1; if (__pyx_t_15 < 0) { __pyx_t_15 += __pyx_pybuffernd_output.diminfo[0].shape; if (unlikely(__pyx_t_15 < 0)) __pyx_t_8 = 0; } else if (unlikely(__pyx_t_15 >= __pyx_pybuffernd_output.diminfo[0].shape)) __pyx_t_8 = 0; if (unlikely(__pyx_t_8 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_8); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1104; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_double_t *, __pyx_pybuffernd_output.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_output.diminfo[0].strides) = 0.0; /* "pandas/algos.pyx":1105 * if nobs == 1: * output[i] = 0 * continue # <<<<<<<<<<<<<< * * val = (nobs * sum_xx - sum_x * sum_x) / (nobs * (nobs - ddof)) */ goto __pyx_L6_continue; } /* "pandas/algos.pyx":1107 * continue * * val = (nobs * sum_xx - sum_x * sum_x) / (nobs * (nobs - ddof)) # <<<<<<<<<<<<<< * if val < 0: * val = 0 */ __pyx_t_16 = ((__pyx_v_nobs * __pyx_v_sum_xx) - (__pyx_v_sum_x * __pyx_v_sum_x)); __pyx_t_17 = (__pyx_v_nobs * (__pyx_v_nobs - __pyx_v_ddof)); if (unlikely(__pyx_t_17 == 0)) { #ifdef WITH_THREAD PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure(); #endif PyErr_SetString(PyExc_ZeroDivisionError, "float division"); #ifdef WITH_THREAD PyGILState_Release(__pyx_gilstate_save); #endif {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1107; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_val = (__pyx_t_16 / __pyx_t_17); /* "pandas/algos.pyx":1108 * * val = (nobs * sum_xx - sum_x * sum_x) / (nobs * (nobs - ddof)) * if val < 0: # <<<<<<<<<<<<<< * val = 0 * */ __pyx_t_10 = ((__pyx_v_val < 0.0) != 0); if (__pyx_t_10) { /* "pandas/algos.pyx":1109 * val = (nobs * sum_xx - sum_x * sum_x) / (nobs * (nobs - ddof)) * if val < 0: * val = 0 # <<<<<<<<<<<<<< * * output[i] = val */ __pyx_v_val = 0.0; goto __pyx_L13; } __pyx_L13:; /* "pandas/algos.pyx":1111 * val = 0 * * output[i] = val # <<<<<<<<<<<<<< * else: * output[i] = NaN */ __pyx_t_18 = __pyx_v_i; __pyx_t_8 = -1; if (__pyx_t_18 < 0) { __pyx_t_18 += __pyx_pybuffernd_output.diminfo[0].shape; if (unlikely(__pyx_t_18 < 0)) __pyx_t_8 = 0; } else if (unlikely(__pyx_t_18 >= __pyx_pybuffernd_output.diminfo[0].shape)) __pyx_t_8 = 0; if (unlikely(__pyx_t_8 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_8); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1111; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_double_t *, __pyx_pybuffernd_output.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_output.diminfo[0].strides) = __pyx_v_val; goto __pyx_L11; } /*else*/ { /* "pandas/algos.pyx":1113 * output[i] = val * else: * output[i] = NaN # <<<<<<<<<<<<<< * * return output */ __pyx_t_19 = __pyx_v_i; __pyx_t_8 = -1; if (__pyx_t_19 < 0) { __pyx_t_19 += __pyx_pybuffernd_output.diminfo[0].shape; if (unlikely(__pyx_t_19 < 0)) __pyx_t_8 = 0; } else if (unlikely(__pyx_t_19 >= __pyx_pybuffernd_output.diminfo[0].shape)) __pyx_t_8 = 0; if (unlikely(__pyx_t_8 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_8); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1113; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_double_t *, __pyx_pybuffernd_output.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_output.diminfo[0].strides) = __pyx_v_6pandas_5algos_NaN; } __pyx_L11:; __pyx_L6_continue:; } /* "pandas/algos.pyx":1115 * output[i] = NaN * * return output # <<<<<<<<<<<<<< * * #------------------------------------------------------------------------------- */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_output)); __pyx_r = ((PyObject *)__pyx_v_output); goto __pyx_L0; /* "pandas/algos.pyx":1066 * # Rolling variance * * def roll_var(ndarray[double_t] input, int win, int minp, int ddof=1): # <<<<<<<<<<<<<< * cdef double val, prev, sum_x = 0, sum_xx = 0, nobs = 0 * 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_7); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_input.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_output.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.roll_var", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_input.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_output.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_output); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/algos.pyx":1120 * # Rolling skewness * * def roll_skew(ndarray[double_t] input, int win, int minp): # <<<<<<<<<<<<<< * cdef double val, prev * cdef double x = 0, xx = 0, xxx = 0 */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_35roll_skew(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_35roll_skew = {__Pyx_NAMESTR("roll_skew"), (PyCFunction)__pyx_pw_6pandas_5algos_35roll_skew, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_35roll_skew(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_input = 0; int __pyx_v_win; int __pyx_v_minp; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("roll_skew (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_input,&__pyx_n_s_win,&__pyx_n_s_minp,0}; PyObject* values[3] = {0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_input)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_win)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("roll_skew", 1, 3, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1120; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_minp)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("roll_skew", 1, 3, 3, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1120; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "roll_skew") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1120; __pyx_clineno = __LINE__; goto __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_input = ((PyArrayObject *)values[0]); __pyx_v_win = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_win == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1120; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_minp = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_minp == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1120; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("roll_skew", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1120; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.roll_skew", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_input), __pyx_ptype_5numpy_ndarray, 1, "input", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1120; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_34roll_skew(__pyx_self, __pyx_v_input, __pyx_v_win, __pyx_v_minp); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5algos_34roll_skew(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_input, int __pyx_v_win, int __pyx_v_minp) { double __pyx_v_val; double __pyx_v_prev; double __pyx_v_x; double __pyx_v_xx; double __pyx_v_xxx; Py_ssize_t __pyx_v_nobs; Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_N; PyArrayObject *__pyx_v_output = 0; double __pyx_v_A; double __pyx_v_B; double __pyx_v_C; double __pyx_v_R; __Pyx_LocalBuf_ND __pyx_pybuffernd_input; __Pyx_Buffer __pyx_pybuffer_input; __Pyx_LocalBuf_ND __pyx_pybuffernd_output; __Pyx_Buffer __pyx_pybuffer_output; 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; PyArrayObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; int __pyx_t_8; long __pyx_t_9; int __pyx_t_10; Py_ssize_t __pyx_t_11; 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; double __pyx_t_18; double __pyx_t_19; Py_ssize_t __pyx_t_20; Py_ssize_t __pyx_t_21; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("roll_skew", 0); __pyx_pybuffer_output.pybuffer.buf = NULL; __pyx_pybuffer_output.refcount = 0; __pyx_pybuffernd_output.data = NULL; __pyx_pybuffernd_output.rcbuffer = &__pyx_pybuffer_output; __pyx_pybuffer_input.pybuffer.buf = NULL; __pyx_pybuffer_input.refcount = 0; __pyx_pybuffernd_input.data = NULL; __pyx_pybuffernd_input.rcbuffer = &__pyx_pybuffer_input; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_input.rcbuffer->pybuffer, (PyObject*)__pyx_v_input, &__Pyx_TypeInfo_nn___pyx_t_5numpy_double_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1120; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_input.diminfo[0].strides = __pyx_pybuffernd_input.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_input.diminfo[0].shape = __pyx_pybuffernd_input.rcbuffer->pybuffer.shape[0]; /* "pandas/algos.pyx":1122 * def roll_skew(ndarray[double_t] input, int win, int minp): * cdef double val, prev * cdef double x = 0, xx = 0, xxx = 0 # <<<<<<<<<<<<<< * cdef Py_ssize_t nobs = 0, i * cdef Py_ssize_t N = len(input) */ __pyx_v_x = 0.0; __pyx_v_xx = 0.0; __pyx_v_xxx = 0.0; /* "pandas/algos.pyx":1123 * cdef double val, prev * cdef double x = 0, xx = 0, xxx = 0 * cdef Py_ssize_t nobs = 0, i # <<<<<<<<<<<<<< * cdef Py_ssize_t N = len(input) * */ __pyx_v_nobs = 0; /* "pandas/algos.pyx":1124 * cdef double x = 0, xx = 0, xxx = 0 * cdef Py_ssize_t nobs = 0, i * cdef Py_ssize_t N = len(input) # <<<<<<<<<<<<<< * * cdef ndarray[double_t] output = np.empty(N, dtype=float) */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_input)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1124; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_N = __pyx_t_1; /* "pandas/algos.pyx":1126 * cdef Py_ssize_t N = len(input) * * cdef ndarray[double_t] output = np.empty(N, dtype=float) # <<<<<<<<<<<<<< * * # 3 components of the skewness equation */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1126; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 1126; __pyx_clineno = __LINE__; goto __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_N); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1126; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1126; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1126; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_dtype, ((PyObject *)((PyObject*)(&PyFloat_Type)))) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1126; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_5 = PyObject_Call(__pyx_t_3, __pyx_t_4, __pyx_t_2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1126; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1126; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_6 = ((PyArrayObject *)__pyx_t_5); { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_output.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_nn___pyx_t_5numpy_double_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { __pyx_v_output = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_output.rcbuffer->pybuffer.buf = NULL; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1126; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } else {__pyx_pybuffernd_output.diminfo[0].strides = __pyx_pybuffernd_output.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_output.diminfo[0].shape = __pyx_pybuffernd_output.rcbuffer->pybuffer.shape[0]; } } __pyx_t_6 = 0; __pyx_v_output = ((PyArrayObject *)__pyx_t_5); __pyx_t_5 = 0; /* "pandas/algos.pyx":1131 * cdef double A, B, C, R * * minp = _check_minp(win, minp, N) # <<<<<<<<<<<<<< * * for i from 0 <= i < minp - 1: */ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_check_minp); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1131; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_win); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1131; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_minp); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1131; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = PyInt_FromSsize_t(__pyx_v_N); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1131; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_7 = PyTuple_New(3); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1131; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_7, 2, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_2 = 0; __pyx_t_4 = 0; __pyx_t_3 = 0; __pyx_t_3 = PyObject_Call(__pyx_t_5, __pyx_t_7, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1131; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_8 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1131; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_minp = __pyx_t_8; /* "pandas/algos.pyx":1133 * minp = _check_minp(win, minp, N) * * for i from 0 <= i < minp - 1: # <<<<<<<<<<<<<< * val = input[i] * */ __pyx_t_9 = (__pyx_v_minp - 1); for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_9; __pyx_v_i++) { /* "pandas/algos.pyx":1134 * * for i from 0 <= i < minp - 1: * val = input[i] # <<<<<<<<<<<<<< * * # Not NaN */ __pyx_t_1 = __pyx_v_i; __pyx_t_8 = -1; if (__pyx_t_1 < 0) { __pyx_t_1 += __pyx_pybuffernd_input.diminfo[0].shape; if (unlikely(__pyx_t_1 < 0)) __pyx_t_8 = 0; } else if (unlikely(__pyx_t_1 >= __pyx_pybuffernd_input.diminfo[0].shape)) __pyx_t_8 = 0; if (unlikely(__pyx_t_8 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_8); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1134; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_val = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_double_t *, __pyx_pybuffernd_input.rcbuffer->pybuffer.buf, __pyx_t_1, __pyx_pybuffernd_input.diminfo[0].strides)); /* "pandas/algos.pyx":1137 * * # Not NaN * if val == val: # <<<<<<<<<<<<<< * nobs += 1 * x += val */ __pyx_t_10 = ((__pyx_v_val == __pyx_v_val) != 0); if (__pyx_t_10) { /* "pandas/algos.pyx":1138 * # Not NaN * if val == val: * nobs += 1 # <<<<<<<<<<<<<< * x += val * xx += val * val */ __pyx_v_nobs = (__pyx_v_nobs + 1); /* "pandas/algos.pyx":1139 * if val == val: * nobs += 1 * x += val # <<<<<<<<<<<<<< * xx += val * val * xxx += val * val * val */ __pyx_v_x = (__pyx_v_x + __pyx_v_val); /* "pandas/algos.pyx":1140 * nobs += 1 * x += val * xx += val * val # <<<<<<<<<<<<<< * xxx += val * val * val * */ __pyx_v_xx = (__pyx_v_xx + (__pyx_v_val * __pyx_v_val)); /* "pandas/algos.pyx":1141 * x += val * xx += val * val * xxx += val * val * val # <<<<<<<<<<<<<< * * output[i] = NaN */ __pyx_v_xxx = (__pyx_v_xxx + ((__pyx_v_val * __pyx_v_val) * __pyx_v_val)); goto __pyx_L5; } __pyx_L5:; /* "pandas/algos.pyx":1143 * xxx += val * val * val * * output[i] = NaN # <<<<<<<<<<<<<< * * for i from minp - 1 <= i < N: */ __pyx_t_11 = __pyx_v_i; __pyx_t_8 = -1; if (__pyx_t_11 < 0) { __pyx_t_11 += __pyx_pybuffernd_output.diminfo[0].shape; if (unlikely(__pyx_t_11 < 0)) __pyx_t_8 = 0; } else if (unlikely(__pyx_t_11 >= __pyx_pybuffernd_output.diminfo[0].shape)) __pyx_t_8 = 0; if (unlikely(__pyx_t_8 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_8); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1143; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_double_t *, __pyx_pybuffernd_output.rcbuffer->pybuffer.buf, __pyx_t_11, __pyx_pybuffernd_output.diminfo[0].strides) = __pyx_v_6pandas_5algos_NaN; } /* "pandas/algos.pyx":1145 * output[i] = NaN * * for i from minp - 1 <= i < N: # <<<<<<<<<<<<<< * val = input[i] * */ __pyx_t_12 = __pyx_v_N; for (__pyx_v_i = (__pyx_v_minp - 1); __pyx_v_i < __pyx_t_12; __pyx_v_i++) { /* "pandas/algos.pyx":1146 * * for i from minp - 1 <= i < N: * val = input[i] # <<<<<<<<<<<<<< * * if val == val: */ __pyx_t_13 = __pyx_v_i; __pyx_t_8 = -1; if (__pyx_t_13 < 0) { __pyx_t_13 += __pyx_pybuffernd_input.diminfo[0].shape; if (unlikely(__pyx_t_13 < 0)) __pyx_t_8 = 0; } else if (unlikely(__pyx_t_13 >= __pyx_pybuffernd_input.diminfo[0].shape)) __pyx_t_8 = 0; if (unlikely(__pyx_t_8 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_8); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1146; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_val = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_double_t *, __pyx_pybuffernd_input.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_input.diminfo[0].strides)); /* "pandas/algos.pyx":1148 * val = input[i] * * if val == val: # <<<<<<<<<<<<<< * nobs += 1 * x += val */ __pyx_t_10 = ((__pyx_v_val == __pyx_v_val) != 0); if (__pyx_t_10) { /* "pandas/algos.pyx":1149 * * if val == val: * nobs += 1 # <<<<<<<<<<<<<< * x += val * xx += val * val */ __pyx_v_nobs = (__pyx_v_nobs + 1); /* "pandas/algos.pyx":1150 * if val == val: * nobs += 1 * x += val # <<<<<<<<<<<<<< * xx += val * val * xxx += val * val * val */ __pyx_v_x = (__pyx_v_x + __pyx_v_val); /* "pandas/algos.pyx":1151 * nobs += 1 * x += val * xx += val * val # <<<<<<<<<<<<<< * xxx += val * val * val * */ __pyx_v_xx = (__pyx_v_xx + (__pyx_v_val * __pyx_v_val)); /* "pandas/algos.pyx":1152 * x += val * xx += val * val * xxx += val * val * val # <<<<<<<<<<<<<< * * if i > win - 1: */ __pyx_v_xxx = (__pyx_v_xxx + ((__pyx_v_val * __pyx_v_val) * __pyx_v_val)); goto __pyx_L8; } __pyx_L8:; /* "pandas/algos.pyx":1154 * xxx += val * val * val * * if i > win - 1: # <<<<<<<<<<<<<< * prev = input[i - win] * if prev == prev: */ __pyx_t_10 = ((__pyx_v_i > (__pyx_v_win - 1)) != 0); if (__pyx_t_10) { /* "pandas/algos.pyx":1155 * * if i > win - 1: * prev = input[i - win] # <<<<<<<<<<<<<< * if prev == prev: * x -= prev */ __pyx_t_14 = (__pyx_v_i - __pyx_v_win); __pyx_t_8 = -1; if (__pyx_t_14 < 0) { __pyx_t_14 += __pyx_pybuffernd_input.diminfo[0].shape; if (unlikely(__pyx_t_14 < 0)) __pyx_t_8 = 0; } else if (unlikely(__pyx_t_14 >= __pyx_pybuffernd_input.diminfo[0].shape)) __pyx_t_8 = 0; if (unlikely(__pyx_t_8 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_8); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1155; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_prev = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_double_t *, __pyx_pybuffernd_input.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_input.diminfo[0].strides)); /* "pandas/algos.pyx":1156 * if i > win - 1: * prev = input[i - win] * if prev == prev: # <<<<<<<<<<<<<< * x -= prev * xx -= prev * prev */ __pyx_t_10 = ((__pyx_v_prev == __pyx_v_prev) != 0); if (__pyx_t_10) { /* "pandas/algos.pyx":1157 * prev = input[i - win] * if prev == prev: * x -= prev # <<<<<<<<<<<<<< * xx -= prev * prev * xxx -= prev * prev * prev */ __pyx_v_x = (__pyx_v_x - __pyx_v_prev); /* "pandas/algos.pyx":1158 * if prev == prev: * x -= prev * xx -= prev * prev # <<<<<<<<<<<<<< * xxx -= prev * prev * prev * */ __pyx_v_xx = (__pyx_v_xx - (__pyx_v_prev * __pyx_v_prev)); /* "pandas/algos.pyx":1159 * x -= prev * xx -= prev * prev * xxx -= prev * prev * prev # <<<<<<<<<<<<<< * * nobs -= 1 */ __pyx_v_xxx = (__pyx_v_xxx - ((__pyx_v_prev * __pyx_v_prev) * __pyx_v_prev)); /* "pandas/algos.pyx":1161 * xxx -= prev * prev * prev * * nobs -= 1 # <<<<<<<<<<<<<< * * if nobs >= minp: */ __pyx_v_nobs = (__pyx_v_nobs - 1); goto __pyx_L10; } __pyx_L10:; goto __pyx_L9; } __pyx_L9:; /* "pandas/algos.pyx":1163 * nobs -= 1 * * if nobs >= minp: # <<<<<<<<<<<<<< * A = x / nobs * B = xx / nobs - A * A */ __pyx_t_10 = ((__pyx_v_nobs >= __pyx_v_minp) != 0); if (__pyx_t_10) { /* "pandas/algos.pyx":1164 * * if nobs >= minp: * A = x / nobs # <<<<<<<<<<<<<< * B = xx / nobs - A * A * C = xxx / nobs - A * A * A - 3 * A * B */ if (unlikely(__pyx_v_nobs == 0)) { #ifdef WITH_THREAD PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure(); #endif PyErr_SetString(PyExc_ZeroDivisionError, "float division"); #ifdef WITH_THREAD PyGILState_Release(__pyx_gilstate_save); #endif {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1164; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_A = (__pyx_v_x / __pyx_v_nobs); /* "pandas/algos.pyx":1165 * if nobs >= minp: * A = x / nobs * B = xx / nobs - A * A # <<<<<<<<<<<<<< * C = xxx / nobs - A * A * A - 3 * A * B * */ if (unlikely(__pyx_v_nobs == 0)) { #ifdef WITH_THREAD PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure(); #endif PyErr_SetString(PyExc_ZeroDivisionError, "float division"); #ifdef WITH_THREAD PyGILState_Release(__pyx_gilstate_save); #endif {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1165; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_B = ((__pyx_v_xx / __pyx_v_nobs) - (__pyx_v_A * __pyx_v_A)); /* "pandas/algos.pyx":1166 * A = x / nobs * B = xx / nobs - A * A * C = xxx / nobs - A * A * A - 3 * A * B # <<<<<<<<<<<<<< * * R = sqrt(B) */ if (unlikely(__pyx_v_nobs == 0)) { #ifdef WITH_THREAD PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure(); #endif PyErr_SetString(PyExc_ZeroDivisionError, "float division"); #ifdef WITH_THREAD PyGILState_Release(__pyx_gilstate_save); #endif {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1166; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_C = (((__pyx_v_xxx / __pyx_v_nobs) - ((__pyx_v_A * __pyx_v_A) * __pyx_v_A)) - ((3.0 * __pyx_v_A) * __pyx_v_B)); /* "pandas/algos.pyx":1168 * C = xxx / nobs - A * A * A - 3 * A * B * * R = sqrt(B) # <<<<<<<<<<<<<< * * if B == 0 or nobs < 3: */ __pyx_v_R = sqrt(__pyx_v_B); /* "pandas/algos.pyx":1170 * R = sqrt(B) * * if B == 0 or nobs < 3: # <<<<<<<<<<<<<< * output[i] = NaN * else: */ __pyx_t_10 = ((__pyx_v_B == 0.0) != 0); if (!__pyx_t_10) { __pyx_t_15 = ((__pyx_v_nobs < 3) != 0); __pyx_t_16 = __pyx_t_15; } else { __pyx_t_16 = __pyx_t_10; } if (__pyx_t_16) { /* "pandas/algos.pyx":1171 * * if B == 0 or nobs < 3: * output[i] = NaN # <<<<<<<<<<<<<< * else: * output[i] = ((sqrt(nobs * (nobs - 1.)) * C) / */ __pyx_t_17 = __pyx_v_i; __pyx_t_8 = -1; if (__pyx_t_17 < 0) { __pyx_t_17 += __pyx_pybuffernd_output.diminfo[0].shape; if (unlikely(__pyx_t_17 < 0)) __pyx_t_8 = 0; } else if (unlikely(__pyx_t_17 >= __pyx_pybuffernd_output.diminfo[0].shape)) __pyx_t_8 = 0; if (unlikely(__pyx_t_8 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_8); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1171; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_double_t *, __pyx_pybuffernd_output.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_output.diminfo[0].strides) = __pyx_v_6pandas_5algos_NaN; goto __pyx_L12; } /*else*/ { /* "pandas/algos.pyx":1173 * output[i] = NaN * else: * output[i] = ((sqrt(nobs * (nobs - 1.)) * C) / # <<<<<<<<<<<<<< * ((nobs-2) * R * R * R)) * else: */ __pyx_t_18 = (sqrt((__pyx_v_nobs * (__pyx_v_nobs - 1.))) * __pyx_v_C); /* "pandas/algos.pyx":1174 * else: * output[i] = ((sqrt(nobs * (nobs - 1.)) * C) / * ((nobs-2) * R * R * R)) # <<<<<<<<<<<<<< * else: * output[i] = NaN */ __pyx_t_19 = ((((__pyx_v_nobs - 2) * __pyx_v_R) * __pyx_v_R) * __pyx_v_R); /* "pandas/algos.pyx":1173 * output[i] = NaN * else: * output[i] = ((sqrt(nobs * (nobs - 1.)) * C) / # <<<<<<<<<<<<<< * ((nobs-2) * R * R * R)) * else: */ if (unlikely(__pyx_t_19 == 0)) { #ifdef WITH_THREAD PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure(); #endif PyErr_SetString(PyExc_ZeroDivisionError, "float division"); #ifdef WITH_THREAD PyGILState_Release(__pyx_gilstate_save); #endif {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1173; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_20 = __pyx_v_i; __pyx_t_8 = -1; if (__pyx_t_20 < 0) { __pyx_t_20 += __pyx_pybuffernd_output.diminfo[0].shape; if (unlikely(__pyx_t_20 < 0)) __pyx_t_8 = 0; } else if (unlikely(__pyx_t_20 >= __pyx_pybuffernd_output.diminfo[0].shape)) __pyx_t_8 = 0; if (unlikely(__pyx_t_8 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_8); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1173; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_double_t *, __pyx_pybuffernd_output.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_output.diminfo[0].strides) = (__pyx_t_18 / __pyx_t_19); } __pyx_L12:; goto __pyx_L11; } /*else*/ { /* "pandas/algos.pyx":1176 * ((nobs-2) * R * R * R)) * else: * output[i] = NaN # <<<<<<<<<<<<<< * * return output */ __pyx_t_21 = __pyx_v_i; __pyx_t_8 = -1; if (__pyx_t_21 < 0) { __pyx_t_21 += __pyx_pybuffernd_output.diminfo[0].shape; if (unlikely(__pyx_t_21 < 0)) __pyx_t_8 = 0; } else if (unlikely(__pyx_t_21 >= __pyx_pybuffernd_output.diminfo[0].shape)) __pyx_t_8 = 0; if (unlikely(__pyx_t_8 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_8); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1176; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_double_t *, __pyx_pybuffernd_output.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_output.diminfo[0].strides) = __pyx_v_6pandas_5algos_NaN; } __pyx_L11:; } /* "pandas/algos.pyx":1178 * output[i] = NaN * * return output # <<<<<<<<<<<<<< * * #------------------------------------------------------------------------------- */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_output)); __pyx_r = ((PyObject *)__pyx_v_output); goto __pyx_L0; /* "pandas/algos.pyx":1120 * # Rolling skewness * * def roll_skew(ndarray[double_t] input, int win, int minp): # <<<<<<<<<<<<<< * cdef double val, prev * cdef double x = 0, xx = 0, xxx = 0 */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_7); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_input.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_output.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.roll_skew", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_input.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_output.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_output); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/algos.pyx":1184 * * * def roll_kurt(ndarray[double_t] input, # <<<<<<<<<<<<<< * int win, int minp): * cdef double val, prev */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_37roll_kurt(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_37roll_kurt = {__Pyx_NAMESTR("roll_kurt"), (PyCFunction)__pyx_pw_6pandas_5algos_37roll_kurt, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_37roll_kurt(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_input = 0; int __pyx_v_win; int __pyx_v_minp; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("roll_kurt (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_input,&__pyx_n_s_win,&__pyx_n_s_minp,0}; PyObject* values[3] = {0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_input)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_win)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("roll_kurt", 1, 3, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1184; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_minp)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("roll_kurt", 1, 3, 3, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1184; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "roll_kurt") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1184; __pyx_clineno = __LINE__; goto __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_input = ((PyArrayObject *)values[0]); __pyx_v_win = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_win == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1185; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_minp = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_minp == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1185; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("roll_kurt", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1184; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.roll_kurt", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_input), __pyx_ptype_5numpy_ndarray, 1, "input", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1184; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_36roll_kurt(__pyx_self, __pyx_v_input, __pyx_v_win, __pyx_v_minp); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5algos_36roll_kurt(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_input, int __pyx_v_win, int __pyx_v_minp) { double __pyx_v_val; double __pyx_v_prev; double __pyx_v_x; double __pyx_v_xx; double __pyx_v_xxx; double __pyx_v_xxxx; Py_ssize_t __pyx_v_nobs; Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_N; PyArrayObject *__pyx_v_output = 0; double __pyx_v_A; double __pyx_v_B; double __pyx_v_C; double __pyx_v_D; double __pyx_v_R; double __pyx_v_K; __Pyx_LocalBuf_ND __pyx_pybuffernd_input; __Pyx_Buffer __pyx_pybuffer_input; __Pyx_LocalBuf_ND __pyx_pybuffernd_output; __Pyx_Buffer __pyx_pybuffer_output; 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; PyArrayObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; int __pyx_t_8; long __pyx_t_9; int __pyx_t_10; Py_ssize_t __pyx_t_11; 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; double __pyx_t_18; double __pyx_t_19; Py_ssize_t __pyx_t_20; Py_ssize_t __pyx_t_21; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("roll_kurt", 0); __pyx_pybuffer_output.pybuffer.buf = NULL; __pyx_pybuffer_output.refcount = 0; __pyx_pybuffernd_output.data = NULL; __pyx_pybuffernd_output.rcbuffer = &__pyx_pybuffer_output; __pyx_pybuffer_input.pybuffer.buf = NULL; __pyx_pybuffer_input.refcount = 0; __pyx_pybuffernd_input.data = NULL; __pyx_pybuffernd_input.rcbuffer = &__pyx_pybuffer_input; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_input.rcbuffer->pybuffer, (PyObject*)__pyx_v_input, &__Pyx_TypeInfo_nn___pyx_t_5numpy_double_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1184; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_input.diminfo[0].strides = __pyx_pybuffernd_input.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_input.diminfo[0].shape = __pyx_pybuffernd_input.rcbuffer->pybuffer.shape[0]; /* "pandas/algos.pyx":1187 * int win, int minp): * cdef double val, prev * cdef double x = 0, xx = 0, xxx = 0, xxxx = 0 # <<<<<<<<<<<<<< * cdef Py_ssize_t nobs = 0, i * cdef Py_ssize_t N = len(input) */ __pyx_v_x = 0.0; __pyx_v_xx = 0.0; __pyx_v_xxx = 0.0; __pyx_v_xxxx = 0.0; /* "pandas/algos.pyx":1188 * cdef double val, prev * cdef double x = 0, xx = 0, xxx = 0, xxxx = 0 * cdef Py_ssize_t nobs = 0, i # <<<<<<<<<<<<<< * cdef Py_ssize_t N = len(input) * */ __pyx_v_nobs = 0; /* "pandas/algos.pyx":1189 * cdef double x = 0, xx = 0, xxx = 0, xxxx = 0 * cdef Py_ssize_t nobs = 0, i * cdef Py_ssize_t N = len(input) # <<<<<<<<<<<<<< * * cdef ndarray[double_t] output = np.empty(N, dtype=float) */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_input)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1189; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_N = __pyx_t_1; /* "pandas/algos.pyx":1191 * cdef Py_ssize_t N = len(input) * * cdef ndarray[double_t] output = np.empty(N, dtype=float) # <<<<<<<<<<<<<< * * # 5 components of the kurtosis equation */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1191; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 1191; __pyx_clineno = __LINE__; goto __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_N); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1191; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1191; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1191; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_dtype, ((PyObject *)((PyObject*)(&PyFloat_Type)))) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1191; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_5 = PyObject_Call(__pyx_t_3, __pyx_t_4, __pyx_t_2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1191; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1191; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_6 = ((PyArrayObject *)__pyx_t_5); { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_output.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_nn___pyx_t_5numpy_double_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { __pyx_v_output = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_output.rcbuffer->pybuffer.buf = NULL; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1191; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } else {__pyx_pybuffernd_output.diminfo[0].strides = __pyx_pybuffernd_output.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_output.diminfo[0].shape = __pyx_pybuffernd_output.rcbuffer->pybuffer.shape[0]; } } __pyx_t_6 = 0; __pyx_v_output = ((PyArrayObject *)__pyx_t_5); __pyx_t_5 = 0; /* "pandas/algos.pyx":1196 * cdef double A, B, C, D, R, K * * minp = _check_minp(win, minp, N) # <<<<<<<<<<<<<< * * for i from 0 <= i < minp - 1: */ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_check_minp); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1196; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_win); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1196; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_minp); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1196; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = PyInt_FromSsize_t(__pyx_v_N); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1196; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_7 = PyTuple_New(3); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1196; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_7, 2, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_2 = 0; __pyx_t_4 = 0; __pyx_t_3 = 0; __pyx_t_3 = PyObject_Call(__pyx_t_5, __pyx_t_7, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1196; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_8 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1196; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_minp = __pyx_t_8; /* "pandas/algos.pyx":1198 * minp = _check_minp(win, minp, N) * * for i from 0 <= i < minp - 1: # <<<<<<<<<<<<<< * val = input[i] * */ __pyx_t_9 = (__pyx_v_minp - 1); for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_9; __pyx_v_i++) { /* "pandas/algos.pyx":1199 * * for i from 0 <= i < minp - 1: * val = input[i] # <<<<<<<<<<<<<< * * # Not NaN */ __pyx_t_1 = __pyx_v_i; __pyx_t_8 = -1; if (__pyx_t_1 < 0) { __pyx_t_1 += __pyx_pybuffernd_input.diminfo[0].shape; if (unlikely(__pyx_t_1 < 0)) __pyx_t_8 = 0; } else if (unlikely(__pyx_t_1 >= __pyx_pybuffernd_input.diminfo[0].shape)) __pyx_t_8 = 0; if (unlikely(__pyx_t_8 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_8); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1199; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_val = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_double_t *, __pyx_pybuffernd_input.rcbuffer->pybuffer.buf, __pyx_t_1, __pyx_pybuffernd_input.diminfo[0].strides)); /* "pandas/algos.pyx":1202 * * # Not NaN * if val == val: # <<<<<<<<<<<<<< * nobs += 1 * */ __pyx_t_10 = ((__pyx_v_val == __pyx_v_val) != 0); if (__pyx_t_10) { /* "pandas/algos.pyx":1203 * # Not NaN * if val == val: * nobs += 1 # <<<<<<<<<<<<<< * * # seriously don't ask me why this is faster */ __pyx_v_nobs = (__pyx_v_nobs + 1); /* "pandas/algos.pyx":1206 * * # seriously don't ask me why this is faster * x += val # <<<<<<<<<<<<<< * xx += val * val * xxx += val * val * val */ __pyx_v_x = (__pyx_v_x + __pyx_v_val); /* "pandas/algos.pyx":1207 * # seriously don't ask me why this is faster * x += val * xx += val * val # <<<<<<<<<<<<<< * xxx += val * val * val * xxxx += val * val * val * val */ __pyx_v_xx = (__pyx_v_xx + (__pyx_v_val * __pyx_v_val)); /* "pandas/algos.pyx":1208 * x += val * xx += val * val * xxx += val * val * val # <<<<<<<<<<<<<< * xxxx += val * val * val * val * */ __pyx_v_xxx = (__pyx_v_xxx + ((__pyx_v_val * __pyx_v_val) * __pyx_v_val)); /* "pandas/algos.pyx":1209 * xx += val * val * xxx += val * val * val * xxxx += val * val * val * val # <<<<<<<<<<<<<< * * output[i] = NaN */ __pyx_v_xxxx = (__pyx_v_xxxx + (((__pyx_v_val * __pyx_v_val) * __pyx_v_val) * __pyx_v_val)); goto __pyx_L5; } __pyx_L5:; /* "pandas/algos.pyx":1211 * xxxx += val * val * val * val * * output[i] = NaN # <<<<<<<<<<<<<< * * for i from minp - 1 <= i < N: */ __pyx_t_11 = __pyx_v_i; __pyx_t_8 = -1; if (__pyx_t_11 < 0) { __pyx_t_11 += __pyx_pybuffernd_output.diminfo[0].shape; if (unlikely(__pyx_t_11 < 0)) __pyx_t_8 = 0; } else if (unlikely(__pyx_t_11 >= __pyx_pybuffernd_output.diminfo[0].shape)) __pyx_t_8 = 0; if (unlikely(__pyx_t_8 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_8); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1211; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_double_t *, __pyx_pybuffernd_output.rcbuffer->pybuffer.buf, __pyx_t_11, __pyx_pybuffernd_output.diminfo[0].strides) = __pyx_v_6pandas_5algos_NaN; } /* "pandas/algos.pyx":1213 * output[i] = NaN * * for i from minp - 1 <= i < N: # <<<<<<<<<<<<<< * val = input[i] * */ __pyx_t_12 = __pyx_v_N; for (__pyx_v_i = (__pyx_v_minp - 1); __pyx_v_i < __pyx_t_12; __pyx_v_i++) { /* "pandas/algos.pyx":1214 * * for i from minp - 1 <= i < N: * val = input[i] # <<<<<<<<<<<<<< * * if val == val: */ __pyx_t_13 = __pyx_v_i; __pyx_t_8 = -1; if (__pyx_t_13 < 0) { __pyx_t_13 += __pyx_pybuffernd_input.diminfo[0].shape; if (unlikely(__pyx_t_13 < 0)) __pyx_t_8 = 0; } else if (unlikely(__pyx_t_13 >= __pyx_pybuffernd_input.diminfo[0].shape)) __pyx_t_8 = 0; if (unlikely(__pyx_t_8 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_8); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1214; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_val = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_double_t *, __pyx_pybuffernd_input.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_input.diminfo[0].strides)); /* "pandas/algos.pyx":1216 * val = input[i] * * if val == val: # <<<<<<<<<<<<<< * nobs += 1 * x += val */ __pyx_t_10 = ((__pyx_v_val == __pyx_v_val) != 0); if (__pyx_t_10) { /* "pandas/algos.pyx":1217 * * if val == val: * nobs += 1 # <<<<<<<<<<<<<< * x += val * xx += val * val */ __pyx_v_nobs = (__pyx_v_nobs + 1); /* "pandas/algos.pyx":1218 * if val == val: * nobs += 1 * x += val # <<<<<<<<<<<<<< * xx += val * val * xxx += val * val * val */ __pyx_v_x = (__pyx_v_x + __pyx_v_val); /* "pandas/algos.pyx":1219 * nobs += 1 * x += val * xx += val * val # <<<<<<<<<<<<<< * xxx += val * val * val * xxxx += val * val * val * val */ __pyx_v_xx = (__pyx_v_xx + (__pyx_v_val * __pyx_v_val)); /* "pandas/algos.pyx":1220 * x += val * xx += val * val * xxx += val * val * val # <<<<<<<<<<<<<< * xxxx += val * val * val * val * */ __pyx_v_xxx = (__pyx_v_xxx + ((__pyx_v_val * __pyx_v_val) * __pyx_v_val)); /* "pandas/algos.pyx":1221 * xx += val * val * xxx += val * val * val * xxxx += val * val * val * val # <<<<<<<<<<<<<< * * if i > win - 1: */ __pyx_v_xxxx = (__pyx_v_xxxx + (((__pyx_v_val * __pyx_v_val) * __pyx_v_val) * __pyx_v_val)); goto __pyx_L8; } __pyx_L8:; /* "pandas/algos.pyx":1223 * xxxx += val * val * val * val * * if i > win - 1: # <<<<<<<<<<<<<< * prev = input[i - win] * if prev == prev: */ __pyx_t_10 = ((__pyx_v_i > (__pyx_v_win - 1)) != 0); if (__pyx_t_10) { /* "pandas/algos.pyx":1224 * * if i > win - 1: * prev = input[i - win] # <<<<<<<<<<<<<< * if prev == prev: * x -= prev */ __pyx_t_14 = (__pyx_v_i - __pyx_v_win); __pyx_t_8 = -1; if (__pyx_t_14 < 0) { __pyx_t_14 += __pyx_pybuffernd_input.diminfo[0].shape; if (unlikely(__pyx_t_14 < 0)) __pyx_t_8 = 0; } else if (unlikely(__pyx_t_14 >= __pyx_pybuffernd_input.diminfo[0].shape)) __pyx_t_8 = 0; if (unlikely(__pyx_t_8 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_8); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1224; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_prev = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_double_t *, __pyx_pybuffernd_input.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_input.diminfo[0].strides)); /* "pandas/algos.pyx":1225 * if i > win - 1: * prev = input[i - win] * if prev == prev: # <<<<<<<<<<<<<< * x -= prev * xx -= prev * prev */ __pyx_t_10 = ((__pyx_v_prev == __pyx_v_prev) != 0); if (__pyx_t_10) { /* "pandas/algos.pyx":1226 * prev = input[i - win] * if prev == prev: * x -= prev # <<<<<<<<<<<<<< * xx -= prev * prev * xxx -= prev * prev * prev */ __pyx_v_x = (__pyx_v_x - __pyx_v_prev); /* "pandas/algos.pyx":1227 * if prev == prev: * x -= prev * xx -= prev * prev # <<<<<<<<<<<<<< * xxx -= prev * prev * prev * xxxx -= prev * prev * prev * prev */ __pyx_v_xx = (__pyx_v_xx - (__pyx_v_prev * __pyx_v_prev)); /* "pandas/algos.pyx":1228 * x -= prev * xx -= prev * prev * xxx -= prev * prev * prev # <<<<<<<<<<<<<< * xxxx -= prev * prev * prev * prev * */ __pyx_v_xxx = (__pyx_v_xxx - ((__pyx_v_prev * __pyx_v_prev) * __pyx_v_prev)); /* "pandas/algos.pyx":1229 * xx -= prev * prev * xxx -= prev * prev * prev * xxxx -= prev * prev * prev * prev # <<<<<<<<<<<<<< * * nobs -= 1 */ __pyx_v_xxxx = (__pyx_v_xxxx - (((__pyx_v_prev * __pyx_v_prev) * __pyx_v_prev) * __pyx_v_prev)); /* "pandas/algos.pyx":1231 * xxxx -= prev * prev * prev * prev * * nobs -= 1 # <<<<<<<<<<<<<< * * if nobs >= minp: */ __pyx_v_nobs = (__pyx_v_nobs - 1); goto __pyx_L10; } __pyx_L10:; goto __pyx_L9; } __pyx_L9:; /* "pandas/algos.pyx":1233 * nobs -= 1 * * if nobs >= minp: # <<<<<<<<<<<<<< * A = x / nobs * R = A * A */ __pyx_t_10 = ((__pyx_v_nobs >= __pyx_v_minp) != 0); if (__pyx_t_10) { /* "pandas/algos.pyx":1234 * * if nobs >= minp: * A = x / nobs # <<<<<<<<<<<<<< * R = A * A * B = xx / nobs - R */ if (unlikely(__pyx_v_nobs == 0)) { #ifdef WITH_THREAD PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure(); #endif PyErr_SetString(PyExc_ZeroDivisionError, "float division"); #ifdef WITH_THREAD PyGILState_Release(__pyx_gilstate_save); #endif {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1234; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_A = (__pyx_v_x / __pyx_v_nobs); /* "pandas/algos.pyx":1235 * if nobs >= minp: * A = x / nobs * R = A * A # <<<<<<<<<<<<<< * B = xx / nobs - R * R = R * A */ __pyx_v_R = (__pyx_v_A * __pyx_v_A); /* "pandas/algos.pyx":1236 * A = x / nobs * R = A * A * B = xx / nobs - R # <<<<<<<<<<<<<< * R = R * A * C = xxx / nobs - R - 3 * A * B */ if (unlikely(__pyx_v_nobs == 0)) { #ifdef WITH_THREAD PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure(); #endif PyErr_SetString(PyExc_ZeroDivisionError, "float division"); #ifdef WITH_THREAD PyGILState_Release(__pyx_gilstate_save); #endif {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1236; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_B = ((__pyx_v_xx / __pyx_v_nobs) - __pyx_v_R); /* "pandas/algos.pyx":1237 * R = A * A * B = xx / nobs - R * R = R * A # <<<<<<<<<<<<<< * C = xxx / nobs - R - 3 * A * B * R = R * A */ __pyx_v_R = (__pyx_v_R * __pyx_v_A); /* "pandas/algos.pyx":1238 * B = xx / nobs - R * R = R * A * C = xxx / nobs - R - 3 * A * B # <<<<<<<<<<<<<< * R = R * A * D = xxxx / nobs - R - 6*B*A*A - 4*C*A */ if (unlikely(__pyx_v_nobs == 0)) { #ifdef WITH_THREAD PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure(); #endif PyErr_SetString(PyExc_ZeroDivisionError, "float division"); #ifdef WITH_THREAD PyGILState_Release(__pyx_gilstate_save); #endif {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1238; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_C = (((__pyx_v_xxx / __pyx_v_nobs) - __pyx_v_R) - ((3.0 * __pyx_v_A) * __pyx_v_B)); /* "pandas/algos.pyx":1239 * R = R * A * C = xxx / nobs - R - 3 * A * B * R = R * A # <<<<<<<<<<<<<< * D = xxxx / nobs - R - 6*B*A*A - 4*C*A * */ __pyx_v_R = (__pyx_v_R * __pyx_v_A); /* "pandas/algos.pyx":1240 * C = xxx / nobs - R - 3 * A * B * R = R * A * D = xxxx / nobs - R - 6*B*A*A - 4*C*A # <<<<<<<<<<<<<< * * if B == 0 or nobs < 4: */ if (unlikely(__pyx_v_nobs == 0)) { #ifdef WITH_THREAD PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure(); #endif PyErr_SetString(PyExc_ZeroDivisionError, "float division"); #ifdef WITH_THREAD PyGILState_Release(__pyx_gilstate_save); #endif {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1240; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_D = ((((__pyx_v_xxxx / __pyx_v_nobs) - __pyx_v_R) - (((6.0 * __pyx_v_B) * __pyx_v_A) * __pyx_v_A)) - ((4.0 * __pyx_v_C) * __pyx_v_A)); /* "pandas/algos.pyx":1242 * D = xxxx / nobs - R - 6*B*A*A - 4*C*A * * if B == 0 or nobs < 4: # <<<<<<<<<<<<<< * output[i] = NaN * */ __pyx_t_10 = ((__pyx_v_B == 0.0) != 0); if (!__pyx_t_10) { __pyx_t_15 = ((__pyx_v_nobs < 4) != 0); __pyx_t_16 = __pyx_t_15; } else { __pyx_t_16 = __pyx_t_10; } if (__pyx_t_16) { /* "pandas/algos.pyx":1243 * * if B == 0 or nobs < 4: * output[i] = NaN # <<<<<<<<<<<<<< * * else: */ __pyx_t_17 = __pyx_v_i; __pyx_t_8 = -1; if (__pyx_t_17 < 0) { __pyx_t_17 += __pyx_pybuffernd_output.diminfo[0].shape; if (unlikely(__pyx_t_17 < 0)) __pyx_t_8 = 0; } else if (unlikely(__pyx_t_17 >= __pyx_pybuffernd_output.diminfo[0].shape)) __pyx_t_8 = 0; if (unlikely(__pyx_t_8 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_8); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1243; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_double_t *, __pyx_pybuffernd_output.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_output.diminfo[0].strides) = __pyx_v_6pandas_5algos_NaN; goto __pyx_L12; } /*else*/ { /* "pandas/algos.pyx":1246 * * else: * K = (nobs * nobs - 1.)*D/(B*B) - 3*((nobs-1.)**2) # <<<<<<<<<<<<<< * K = K / ((nobs - 2.)*(nobs-3.)) * */ __pyx_t_18 = (((__pyx_v_nobs * __pyx_v_nobs) - 1.) * __pyx_v_D); __pyx_t_19 = (__pyx_v_B * __pyx_v_B); if (unlikely(__pyx_t_19 == 0)) { #ifdef WITH_THREAD PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure(); #endif PyErr_SetString(PyExc_ZeroDivisionError, "float division"); #ifdef WITH_THREAD PyGILState_Release(__pyx_gilstate_save); #endif {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1246; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_K = ((__pyx_t_18 / __pyx_t_19) - (3.0 * pow((__pyx_v_nobs - 1.), 2.0))); /* "pandas/algos.pyx":1247 * else: * K = (nobs * nobs - 1.)*D/(B*B) - 3*((nobs-1.)**2) * K = K / ((nobs - 2.)*(nobs-3.)) # <<<<<<<<<<<<<< * * output[i] = K */ __pyx_t_19 = ((__pyx_v_nobs - 2.) * (__pyx_v_nobs - 3.)); if (unlikely(__pyx_t_19 == 0)) { #ifdef WITH_THREAD PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure(); #endif PyErr_SetString(PyExc_ZeroDivisionError, "float division"); #ifdef WITH_THREAD PyGILState_Release(__pyx_gilstate_save); #endif {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1247; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_K = (__pyx_v_K / __pyx_t_19); /* "pandas/algos.pyx":1249 * K = K / ((nobs - 2.)*(nobs-3.)) * * output[i] = K # <<<<<<<<<<<<<< * * else: */ __pyx_t_20 = __pyx_v_i; __pyx_t_8 = -1; if (__pyx_t_20 < 0) { __pyx_t_20 += __pyx_pybuffernd_output.diminfo[0].shape; if (unlikely(__pyx_t_20 < 0)) __pyx_t_8 = 0; } else if (unlikely(__pyx_t_20 >= __pyx_pybuffernd_output.diminfo[0].shape)) __pyx_t_8 = 0; if (unlikely(__pyx_t_8 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_8); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1249; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_double_t *, __pyx_pybuffernd_output.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_output.diminfo[0].strides) = __pyx_v_K; } __pyx_L12:; goto __pyx_L11; } /*else*/ { /* "pandas/algos.pyx":1252 * * else: * output[i] = NaN # <<<<<<<<<<<<<< * * return output */ __pyx_t_21 = __pyx_v_i; __pyx_t_8 = -1; if (__pyx_t_21 < 0) { __pyx_t_21 += __pyx_pybuffernd_output.diminfo[0].shape; if (unlikely(__pyx_t_21 < 0)) __pyx_t_8 = 0; } else if (unlikely(__pyx_t_21 >= __pyx_pybuffernd_output.diminfo[0].shape)) __pyx_t_8 = 0; if (unlikely(__pyx_t_8 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_8); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1252; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_double_t *, __pyx_pybuffernd_output.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_output.diminfo[0].strides) = __pyx_v_6pandas_5algos_NaN; } __pyx_L11:; } /* "pandas/algos.pyx":1254 * output[i] = NaN * * return output # <<<<<<<<<<<<<< * * #------------------------------------------------------------------------------- */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_output)); __pyx_r = ((PyObject *)__pyx_v_output); goto __pyx_L0; /* "pandas/algos.pyx":1184 * * * def roll_kurt(ndarray[double_t] input, # <<<<<<<<<<<<<< * int win, int minp): * cdef double val, prev */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_7); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_input.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_output.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.roll_kurt", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_input.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_output.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_output); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/algos.pyx":1261 * ctypedef double_t (* skiplist_f)(object sl, int n, int p) * * cdef _roll_skiplist_op(ndarray arg, int win, int minp, skiplist_f op): # <<<<<<<<<<<<<< * cdef ndarray[double_t] input = arg * cdef double val, prev, midpoint */ static PyObject *__pyx_f_6pandas_5algos__roll_skiplist_op(PyArrayObject *__pyx_v_arg, int __pyx_v_win, int __pyx_v_minp, __pyx_t_6pandas_5algos_skiplist_f __pyx_v_op) { PyArrayObject *__pyx_v_input = 0; double __pyx_v_val; double __pyx_v_prev; struct __pyx_obj_6pandas_5algos_IndexableSkiplist *__pyx_v_skiplist = 0; Py_ssize_t __pyx_v_nobs; Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_N; PyArrayObject *__pyx_v_output = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_input; __Pyx_Buffer __pyx_pybuffer_input; __Pyx_LocalBuf_ND __pyx_pybuffernd_output; __Pyx_Buffer __pyx_pybuffer_output; 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; PyArrayObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; int __pyx_t_8; long __pyx_t_9; int __pyx_t_10; Py_ssize_t __pyx_t_11; Py_ssize_t __pyx_t_12; Py_ssize_t __pyx_t_13; Py_ssize_t __pyx_t_14; Py_ssize_t __pyx_t_15; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_roll_skiplist_op", 0); __pyx_pybuffer_input.pybuffer.buf = NULL; __pyx_pybuffer_input.refcount = 0; __pyx_pybuffernd_input.data = NULL; __pyx_pybuffernd_input.rcbuffer = &__pyx_pybuffer_input; __pyx_pybuffer_output.pybuffer.buf = NULL; __pyx_pybuffer_output.refcount = 0; __pyx_pybuffernd_output.data = NULL; __pyx_pybuffernd_output.rcbuffer = &__pyx_pybuffer_output; /* "pandas/algos.pyx":1262 * * cdef _roll_skiplist_op(ndarray arg, int win, int minp, skiplist_f op): * cdef ndarray[double_t] input = arg # <<<<<<<<<<<<<< * cdef double val, prev, midpoint * cdef IndexableSkiplist skiplist */ { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_input.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_v_arg), &__Pyx_TypeInfo_nn___pyx_t_5numpy_double_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { __pyx_v_input = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_input.rcbuffer->pybuffer.buf = NULL; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1262; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } else {__pyx_pybuffernd_input.diminfo[0].strides = __pyx_pybuffernd_input.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_input.diminfo[0].shape = __pyx_pybuffernd_input.rcbuffer->pybuffer.shape[0]; } } __Pyx_INCREF(((PyObject *)__pyx_v_arg)); __pyx_v_input = ((PyArrayObject *)__pyx_v_arg); /* "pandas/algos.pyx":1265 * cdef double val, prev, midpoint * cdef IndexableSkiplist skiplist * cdef Py_ssize_t nobs = 0, i # <<<<<<<<<<<<<< * * cdef Py_ssize_t N = len(input) */ __pyx_v_nobs = 0; /* "pandas/algos.pyx":1267 * cdef Py_ssize_t nobs = 0, i * * cdef Py_ssize_t N = len(input) # <<<<<<<<<<<<<< * cdef ndarray[double_t] output = np.empty(N, dtype=float) * */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_input)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1267; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_N = __pyx_t_1; /* "pandas/algos.pyx":1268 * * cdef Py_ssize_t N = len(input) * cdef ndarray[double_t] output = np.empty(N, dtype=float) # <<<<<<<<<<<<<< * * skiplist = IndexableSkiplist(win) */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1268; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 1268; __pyx_clineno = __LINE__; goto __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_N); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1268; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1268; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1268; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_dtype, ((PyObject *)((PyObject*)(&PyFloat_Type)))) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1268; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_5 = PyObject_Call(__pyx_t_3, __pyx_t_4, __pyx_t_2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1268; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1268; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_6 = ((PyArrayObject *)__pyx_t_5); { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_output.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_nn___pyx_t_5numpy_double_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { __pyx_v_output = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_output.rcbuffer->pybuffer.buf = NULL; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1268; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } else {__pyx_pybuffernd_output.diminfo[0].strides = __pyx_pybuffernd_output.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_output.diminfo[0].shape = __pyx_pybuffernd_output.rcbuffer->pybuffer.shape[0]; } } __pyx_t_6 = 0; __pyx_v_output = ((PyArrayObject *)__pyx_t_5); __pyx_t_5 = 0; /* "pandas/algos.pyx":1270 * cdef ndarray[double_t] output = np.empty(N, dtype=float) * * skiplist = IndexableSkiplist(win) # <<<<<<<<<<<<<< * * minp = _check_minp(win, minp, N) */ __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_win); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1270; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1270; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_6pandas_5algos_IndexableSkiplist)), __pyx_t_2, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1270; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_skiplist = ((struct __pyx_obj_6pandas_5algos_IndexableSkiplist *)__pyx_t_5); __pyx_t_5 = 0; /* "pandas/algos.pyx":1272 * skiplist = IndexableSkiplist(win) * * minp = _check_minp(win, minp, N) # <<<<<<<<<<<<<< * * for i from 0 <= i < minp - 1: */ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_check_minp); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1272; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_win); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1272; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_minp); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1272; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = PyInt_FromSsize_t(__pyx_v_N); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1272; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_7 = PyTuple_New(3); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1272; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_7, 2, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_2 = 0; __pyx_t_4 = 0; __pyx_t_3 = 0; __pyx_t_3 = PyObject_Call(__pyx_t_5, __pyx_t_7, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1272; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_8 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1272; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_minp = __pyx_t_8; /* "pandas/algos.pyx":1274 * minp = _check_minp(win, minp, N) * * for i from 0 <= i < minp - 1: # <<<<<<<<<<<<<< * val = input[i] * */ __pyx_t_9 = (__pyx_v_minp - 1); for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_9; __pyx_v_i++) { /* "pandas/algos.pyx":1275 * * for i from 0 <= i < minp - 1: * val = input[i] # <<<<<<<<<<<<<< * * # Not NaN */ __pyx_t_1 = __pyx_v_i; __pyx_t_8 = -1; if (__pyx_t_1 < 0) { __pyx_t_1 += __pyx_pybuffernd_input.diminfo[0].shape; if (unlikely(__pyx_t_1 < 0)) __pyx_t_8 = 0; } else if (unlikely(__pyx_t_1 >= __pyx_pybuffernd_input.diminfo[0].shape)) __pyx_t_8 = 0; if (unlikely(__pyx_t_8 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_8); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1275; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_val = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_double_t *, __pyx_pybuffernd_input.rcbuffer->pybuffer.buf, __pyx_t_1, __pyx_pybuffernd_input.diminfo[0].strides)); /* "pandas/algos.pyx":1278 * * # Not NaN * if val == val: # <<<<<<<<<<<<<< * nobs += 1 * skiplist.insert(val) */ __pyx_t_10 = ((__pyx_v_val == __pyx_v_val) != 0); if (__pyx_t_10) { /* "pandas/algos.pyx":1279 * # Not NaN * if val == val: * nobs += 1 # <<<<<<<<<<<<<< * skiplist.insert(val) * */ __pyx_v_nobs = (__pyx_v_nobs + 1); /* "pandas/algos.pyx":1280 * if val == val: * nobs += 1 * skiplist.insert(val) # <<<<<<<<<<<<<< * * output[i] = NaN */ __pyx_t_3 = ((struct __pyx_vtabstruct_6pandas_5algos_IndexableSkiplist *)__pyx_v_skiplist->__pyx_vtab)->insert(__pyx_v_skiplist, __pyx_v_val, 0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1280; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L5; } __pyx_L5:; /* "pandas/algos.pyx":1282 * skiplist.insert(val) * * output[i] = NaN # <<<<<<<<<<<<<< * * for i from minp - 1 <= i < N: */ __pyx_t_11 = __pyx_v_i; __pyx_t_8 = -1; if (__pyx_t_11 < 0) { __pyx_t_11 += __pyx_pybuffernd_output.diminfo[0].shape; if (unlikely(__pyx_t_11 < 0)) __pyx_t_8 = 0; } else if (unlikely(__pyx_t_11 >= __pyx_pybuffernd_output.diminfo[0].shape)) __pyx_t_8 = 0; if (unlikely(__pyx_t_8 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_8); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1282; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_double_t *, __pyx_pybuffernd_output.rcbuffer->pybuffer.buf, __pyx_t_11, __pyx_pybuffernd_output.diminfo[0].strides) = __pyx_v_6pandas_5algos_NaN; } /* "pandas/algos.pyx":1284 * output[i] = NaN * * for i from minp - 1 <= i < N: # <<<<<<<<<<<<<< * val = input[i] * */ __pyx_t_12 = __pyx_v_N; for (__pyx_v_i = (__pyx_v_minp - 1); __pyx_v_i < __pyx_t_12; __pyx_v_i++) { /* "pandas/algos.pyx":1285 * * for i from minp - 1 <= i < N: * val = input[i] # <<<<<<<<<<<<<< * * if i > win - 1: */ __pyx_t_13 = __pyx_v_i; __pyx_t_8 = -1; if (__pyx_t_13 < 0) { __pyx_t_13 += __pyx_pybuffernd_input.diminfo[0].shape; if (unlikely(__pyx_t_13 < 0)) __pyx_t_8 = 0; } else if (unlikely(__pyx_t_13 >= __pyx_pybuffernd_input.diminfo[0].shape)) __pyx_t_8 = 0; if (unlikely(__pyx_t_8 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_8); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1285; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_val = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_double_t *, __pyx_pybuffernd_input.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_input.diminfo[0].strides)); /* "pandas/algos.pyx":1287 * val = input[i] * * if i > win - 1: # <<<<<<<<<<<<<< * prev = input[i - win] * */ __pyx_t_10 = ((__pyx_v_i > (__pyx_v_win - 1)) != 0); if (__pyx_t_10) { /* "pandas/algos.pyx":1288 * * if i > win - 1: * prev = input[i - win] # <<<<<<<<<<<<<< * * if prev == prev: */ __pyx_t_14 = (__pyx_v_i - __pyx_v_win); __pyx_t_8 = -1; if (__pyx_t_14 < 0) { __pyx_t_14 += __pyx_pybuffernd_input.diminfo[0].shape; if (unlikely(__pyx_t_14 < 0)) __pyx_t_8 = 0; } else if (unlikely(__pyx_t_14 >= __pyx_pybuffernd_input.diminfo[0].shape)) __pyx_t_8 = 0; if (unlikely(__pyx_t_8 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_8); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1288; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_prev = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_double_t *, __pyx_pybuffernd_input.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_input.diminfo[0].strides)); /* "pandas/algos.pyx":1290 * prev = input[i - win] * * if prev == prev: # <<<<<<<<<<<<<< * skiplist.remove(prev) * nobs -= 1 */ __pyx_t_10 = ((__pyx_v_prev == __pyx_v_prev) != 0); if (__pyx_t_10) { /* "pandas/algos.pyx":1291 * * if prev == prev: * skiplist.remove(prev) # <<<<<<<<<<<<<< * nobs -= 1 * */ __pyx_t_3 = ((struct __pyx_vtabstruct_6pandas_5algos_IndexableSkiplist *)__pyx_v_skiplist->__pyx_vtab)->remove(__pyx_v_skiplist, __pyx_v_prev, 0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1291; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/algos.pyx":1292 * if prev == prev: * skiplist.remove(prev) * nobs -= 1 # <<<<<<<<<<<<<< * * if val == val: */ __pyx_v_nobs = (__pyx_v_nobs - 1); goto __pyx_L9; } __pyx_L9:; goto __pyx_L8; } __pyx_L8:; /* "pandas/algos.pyx":1294 * nobs -= 1 * * if val == val: # <<<<<<<<<<<<<< * nobs += 1 * skiplist.insert(val) */ __pyx_t_10 = ((__pyx_v_val == __pyx_v_val) != 0); if (__pyx_t_10) { /* "pandas/algos.pyx":1295 * * if val == val: * nobs += 1 # <<<<<<<<<<<<<< * skiplist.insert(val) * */ __pyx_v_nobs = (__pyx_v_nobs + 1); /* "pandas/algos.pyx":1296 * if val == val: * nobs += 1 * skiplist.insert(val) # <<<<<<<<<<<<<< * * output[i] = op(skiplist, nobs, minp) */ __pyx_t_3 = ((struct __pyx_vtabstruct_6pandas_5algos_IndexableSkiplist *)__pyx_v_skiplist->__pyx_vtab)->insert(__pyx_v_skiplist, __pyx_v_val, 0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1296; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L10; } __pyx_L10:; /* "pandas/algos.pyx":1298 * skiplist.insert(val) * * output[i] = op(skiplist, nobs, minp) # <<<<<<<<<<<<<< * * return output */ __pyx_t_15 = __pyx_v_i; __pyx_t_8 = -1; if (__pyx_t_15 < 0) { __pyx_t_15 += __pyx_pybuffernd_output.diminfo[0].shape; if (unlikely(__pyx_t_15 < 0)) __pyx_t_8 = 0; } else if (unlikely(__pyx_t_15 >= __pyx_pybuffernd_output.diminfo[0].shape)) __pyx_t_8 = 0; if (unlikely(__pyx_t_8 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_8); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1298; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_double_t *, __pyx_pybuffernd_output.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_output.diminfo[0].strides) = __pyx_v_op(((PyObject *)__pyx_v_skiplist), __pyx_v_nobs, __pyx_v_minp); } /* "pandas/algos.pyx":1300 * output[i] = op(skiplist, nobs, minp) * * return output # <<<<<<<<<<<<<< * * from skiplist cimport * */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_output)); __pyx_r = ((PyObject *)__pyx_v_output); goto __pyx_L0; /* "pandas/algos.pyx":1261 * ctypedef double_t (* skiplist_f)(object sl, int n, int p) * * cdef _roll_skiplist_op(ndarray arg, int win, int minp, skiplist_f op): # <<<<<<<<<<<<<< * cdef ndarray[double_t] input = arg * cdef double val, prev, midpoint */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_7); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_input.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_output.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos._roll_skiplist_op", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_input.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_output.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_input); __Pyx_XDECREF((PyObject *)__pyx_v_skiplist); __Pyx_XDECREF((PyObject *)__pyx_v_output); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/algos.pyx":1304 * from skiplist cimport * * * def roll_median_c(ndarray[float64_t] arg, int win, int minp): # <<<<<<<<<<<<<< * cdef double val, res, prev * cdef: */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_39roll_median_c(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_39roll_median_c = {__Pyx_NAMESTR("roll_median_c"), (PyCFunction)__pyx_pw_6pandas_5algos_39roll_median_c, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_39roll_median_c(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_arg = 0; int __pyx_v_win; int __pyx_v_minp; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("roll_median_c (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_arg,&__pyx_n_s_win,&__pyx_n_s_minp,0}; PyObject* values[3] = {0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_arg)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_win)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("roll_median_c", 1, 3, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1304; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_minp)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("roll_median_c", 1, 3, 3, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1304; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "roll_median_c") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1304; __pyx_clineno = __LINE__; goto __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_arg = ((PyArrayObject *)values[0]); __pyx_v_win = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_win == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1304; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_minp = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_minp == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1304; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("roll_median_c", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1304; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.roll_median_c", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_arg), __pyx_ptype_5numpy_ndarray, 1, "arg", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1304; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_38roll_median_c(__pyx_self, __pyx_v_arg, __pyx_v_win, __pyx_v_minp); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5algos_38roll_median_c(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_arg, int __pyx_v_win, int __pyx_v_minp) { double __pyx_v_val; double __pyx_v_res; double __pyx_v_prev; int __pyx_v_ret; skiplist_t *__pyx_v_sl; Py_ssize_t __pyx_v_midpoint; Py_ssize_t __pyx_v_nobs; Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_N; PyArrayObject *__pyx_v_output = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_arg; __Pyx_Buffer __pyx_pybuffer_arg; __Pyx_LocalBuf_ND __pyx_pybuffernd_output; __Pyx_Buffer __pyx_pybuffer_output; 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; PyArrayObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; int __pyx_t_8; long __pyx_t_9; int __pyx_t_10; Py_ssize_t __pyx_t_11; Py_ssize_t __pyx_t_12; Py_ssize_t __pyx_t_13; Py_ssize_t __pyx_t_14; Py_ssize_t __pyx_t_15; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("roll_median_c", 0); __pyx_pybuffer_output.pybuffer.buf = NULL; __pyx_pybuffer_output.refcount = 0; __pyx_pybuffernd_output.data = NULL; __pyx_pybuffernd_output.rcbuffer = &__pyx_pybuffer_output; __pyx_pybuffer_arg.pybuffer.buf = NULL; __pyx_pybuffer_arg.refcount = 0; __pyx_pybuffernd_arg.data = NULL; __pyx_pybuffernd_arg.rcbuffer = &__pyx_pybuffer_arg; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_arg.rcbuffer->pybuffer, (PyObject*)__pyx_v_arg, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1304; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_arg.diminfo[0].strides = __pyx_pybuffernd_arg.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_arg.diminfo[0].shape = __pyx_pybuffernd_arg.rcbuffer->pybuffer.shape[0]; /* "pandas/algos.pyx":1307 * cdef double val, res, prev * cdef: * int ret=0 # <<<<<<<<<<<<<< * skiplist_t *sl * Py_ssize_t midpoint, nobs = 0, i */ __pyx_v_ret = 0; /* "pandas/algos.pyx":1309 * int ret=0 * skiplist_t *sl * Py_ssize_t midpoint, nobs = 0, i # <<<<<<<<<<<<<< * * */ __pyx_v_nobs = 0; /* "pandas/algos.pyx":1312 * * * cdef Py_ssize_t N = len(arg) # <<<<<<<<<<<<<< * cdef ndarray[double_t] output = np.empty(N, dtype=float) * */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_arg)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1312; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_N = __pyx_t_1; /* "pandas/algos.pyx":1313 * * cdef Py_ssize_t N = len(arg) * cdef ndarray[double_t] output = np.empty(N, dtype=float) # <<<<<<<<<<<<<< * * sl = skiplist_init(win) */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1313; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 1313; __pyx_clineno = __LINE__; goto __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_N); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1313; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1313; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1313; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_dtype, ((PyObject *)((PyObject*)(&PyFloat_Type)))) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1313; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_5 = PyObject_Call(__pyx_t_3, __pyx_t_4, __pyx_t_2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1313; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1313; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_6 = ((PyArrayObject *)__pyx_t_5); { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_output.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_nn___pyx_t_5numpy_double_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { __pyx_v_output = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_output.rcbuffer->pybuffer.buf = NULL; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1313; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } else {__pyx_pybuffernd_output.diminfo[0].strides = __pyx_pybuffernd_output.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_output.diminfo[0].shape = __pyx_pybuffernd_output.rcbuffer->pybuffer.shape[0]; } } __pyx_t_6 = 0; __pyx_v_output = ((PyArrayObject *)__pyx_t_5); __pyx_t_5 = 0; /* "pandas/algos.pyx":1315 * cdef ndarray[double_t] output = np.empty(N, dtype=float) * * sl = skiplist_init(win) # <<<<<<<<<<<<<< * * minp = _check_minp(win, minp, N) */ __pyx_v_sl = skiplist_init(__pyx_v_win); /* "pandas/algos.pyx":1317 * sl = skiplist_init(win) * * minp = _check_minp(win, minp, N) # <<<<<<<<<<<<<< * * for i from 0 <= i < minp - 1: */ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_check_minp); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1317; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_win); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1317; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_minp); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1317; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = PyInt_FromSsize_t(__pyx_v_N); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1317; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_7 = PyTuple_New(3); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1317; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_7, 2, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_2 = 0; __pyx_t_4 = 0; __pyx_t_3 = 0; __pyx_t_3 = PyObject_Call(__pyx_t_5, __pyx_t_7, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1317; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_8 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1317; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_minp = __pyx_t_8; /* "pandas/algos.pyx":1319 * minp = _check_minp(win, minp, N) * * for i from 0 <= i < minp - 1: # <<<<<<<<<<<<<< * val = arg[i] * */ __pyx_t_9 = (__pyx_v_minp - 1); for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_9; __pyx_v_i++) { /* "pandas/algos.pyx":1320 * * for i from 0 <= i < minp - 1: * val = arg[i] # <<<<<<<<<<<<<< * * # Not NaN */ __pyx_t_1 = __pyx_v_i; __pyx_t_8 = -1; if (__pyx_t_1 < 0) { __pyx_t_1 += __pyx_pybuffernd_arg.diminfo[0].shape; if (unlikely(__pyx_t_1 < 0)) __pyx_t_8 = 0; } else if (unlikely(__pyx_t_1 >= __pyx_pybuffernd_arg.diminfo[0].shape)) __pyx_t_8 = 0; if (unlikely(__pyx_t_8 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_8); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1320; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_val = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_arg.rcbuffer->pybuffer.buf, __pyx_t_1, __pyx_pybuffernd_arg.diminfo[0].strides)); /* "pandas/algos.pyx":1323 * * # Not NaN * if val == val: # <<<<<<<<<<<<<< * nobs += 1 * skiplist_insert(sl, val) */ __pyx_t_10 = ((__pyx_v_val == __pyx_v_val) != 0); if (__pyx_t_10) { /* "pandas/algos.pyx":1324 * # Not NaN * if val == val: * nobs += 1 # <<<<<<<<<<<<<< * skiplist_insert(sl, val) * */ __pyx_v_nobs = (__pyx_v_nobs + 1); /* "pandas/algos.pyx":1325 * if val == val: * nobs += 1 * skiplist_insert(sl, val) # <<<<<<<<<<<<<< * * output[i] = NaN */ skiplist_insert(__pyx_v_sl, __pyx_v_val); goto __pyx_L5; } __pyx_L5:; /* "pandas/algos.pyx":1327 * skiplist_insert(sl, val) * * output[i] = NaN # <<<<<<<<<<<<<< * * for i from minp - 1 <= i < N: */ __pyx_t_11 = __pyx_v_i; __pyx_t_8 = -1; if (__pyx_t_11 < 0) { __pyx_t_11 += __pyx_pybuffernd_output.diminfo[0].shape; if (unlikely(__pyx_t_11 < 0)) __pyx_t_8 = 0; } else if (unlikely(__pyx_t_11 >= __pyx_pybuffernd_output.diminfo[0].shape)) __pyx_t_8 = 0; if (unlikely(__pyx_t_8 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_8); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1327; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_double_t *, __pyx_pybuffernd_output.rcbuffer->pybuffer.buf, __pyx_t_11, __pyx_pybuffernd_output.diminfo[0].strides) = __pyx_v_6pandas_5algos_NaN; } /* "pandas/algos.pyx":1329 * output[i] = NaN * * for i from minp - 1 <= i < N: # <<<<<<<<<<<<<< * val = arg[i] * */ __pyx_t_12 = __pyx_v_N; for (__pyx_v_i = (__pyx_v_minp - 1); __pyx_v_i < __pyx_t_12; __pyx_v_i++) { /* "pandas/algos.pyx":1330 * * for i from minp - 1 <= i < N: * val = arg[i] # <<<<<<<<<<<<<< * * if i > win - 1: */ __pyx_t_13 = __pyx_v_i; __pyx_t_8 = -1; if (__pyx_t_13 < 0) { __pyx_t_13 += __pyx_pybuffernd_arg.diminfo[0].shape; if (unlikely(__pyx_t_13 < 0)) __pyx_t_8 = 0; } else if (unlikely(__pyx_t_13 >= __pyx_pybuffernd_arg.diminfo[0].shape)) __pyx_t_8 = 0; if (unlikely(__pyx_t_8 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_8); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1330; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_val = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_arg.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_arg.diminfo[0].strides)); /* "pandas/algos.pyx":1332 * val = arg[i] * * if i > win - 1: # <<<<<<<<<<<<<< * prev = arg[i - win] * */ __pyx_t_10 = ((__pyx_v_i > (__pyx_v_win - 1)) != 0); if (__pyx_t_10) { /* "pandas/algos.pyx":1333 * * if i > win - 1: * prev = arg[i - win] # <<<<<<<<<<<<<< * * if prev == prev: */ __pyx_t_14 = (__pyx_v_i - __pyx_v_win); __pyx_t_8 = -1; if (__pyx_t_14 < 0) { __pyx_t_14 += __pyx_pybuffernd_arg.diminfo[0].shape; if (unlikely(__pyx_t_14 < 0)) __pyx_t_8 = 0; } else if (unlikely(__pyx_t_14 >= __pyx_pybuffernd_arg.diminfo[0].shape)) __pyx_t_8 = 0; if (unlikely(__pyx_t_8 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_8); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1333; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_prev = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_arg.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_arg.diminfo[0].strides)); /* "pandas/algos.pyx":1335 * prev = arg[i - win] * * if prev == prev: # <<<<<<<<<<<<<< * skiplist_remove(sl, prev) * nobs -= 1 */ __pyx_t_10 = ((__pyx_v_prev == __pyx_v_prev) != 0); if (__pyx_t_10) { /* "pandas/algos.pyx":1336 * * if prev == prev: * skiplist_remove(sl, prev) # <<<<<<<<<<<<<< * nobs -= 1 * */ skiplist_remove(__pyx_v_sl, __pyx_v_prev); /* "pandas/algos.pyx":1337 * if prev == prev: * skiplist_remove(sl, prev) * nobs -= 1 # <<<<<<<<<<<<<< * * if val == val: */ __pyx_v_nobs = (__pyx_v_nobs - 1); goto __pyx_L9; } __pyx_L9:; goto __pyx_L8; } __pyx_L8:; /* "pandas/algos.pyx":1339 * nobs -= 1 * * if val == val: # <<<<<<<<<<<<<< * nobs += 1 * skiplist_insert(sl, val) */ __pyx_t_10 = ((__pyx_v_val == __pyx_v_val) != 0); if (__pyx_t_10) { /* "pandas/algos.pyx":1340 * * if val == val: * nobs += 1 # <<<<<<<<<<<<<< * skiplist_insert(sl, val) * */ __pyx_v_nobs = (__pyx_v_nobs + 1); /* "pandas/algos.pyx":1341 * if val == val: * nobs += 1 * skiplist_insert(sl, val) # <<<<<<<<<<<<<< * * if nobs >= minp: */ skiplist_insert(__pyx_v_sl, __pyx_v_val); goto __pyx_L10; } __pyx_L10:; /* "pandas/algos.pyx":1343 * skiplist_insert(sl, val) * * if nobs >= minp: # <<<<<<<<<<<<<< * midpoint = nobs / 2 * if nobs % 2: */ __pyx_t_10 = ((__pyx_v_nobs >= __pyx_v_minp) != 0); if (__pyx_t_10) { /* "pandas/algos.pyx":1344 * * if nobs >= minp: * midpoint = nobs / 2 # <<<<<<<<<<<<<< * if nobs % 2: * res = skiplist_get(sl, midpoint, &ret) */ __pyx_v_midpoint = __Pyx_div_Py_ssize_t(__pyx_v_nobs, 2); /* "pandas/algos.pyx":1345 * if nobs >= minp: * midpoint = nobs / 2 * if nobs % 2: # <<<<<<<<<<<<<< * res = skiplist_get(sl, midpoint, &ret) * else: */ __pyx_t_10 = (__Pyx_mod_Py_ssize_t(__pyx_v_nobs, 2) != 0); if (__pyx_t_10) { /* "pandas/algos.pyx":1346 * midpoint = nobs / 2 * if nobs % 2: * res = skiplist_get(sl, midpoint, &ret) # <<<<<<<<<<<<<< * else: * res = (skiplist_get(sl, midpoint, &ret) + */ __pyx_v_res = skiplist_get(__pyx_v_sl, __pyx_v_midpoint, (&__pyx_v_ret)); goto __pyx_L12; } /*else*/ { /* "pandas/algos.pyx":1349 * else: * res = (skiplist_get(sl, midpoint, &ret) + * skiplist_get(sl, (midpoint - 1), &ret)) / 2 # <<<<<<<<<<<<<< * else: * res = NaN */ __pyx_v_res = ((skiplist_get(__pyx_v_sl, __pyx_v_midpoint, (&__pyx_v_ret)) + skiplist_get(__pyx_v_sl, (__pyx_v_midpoint - 1), (&__pyx_v_ret))) / 2.0); } __pyx_L12:; goto __pyx_L11; } /*else*/ { /* "pandas/algos.pyx":1351 * skiplist_get(sl, (midpoint - 1), &ret)) / 2 * else: * res = NaN # <<<<<<<<<<<<<< * * output[i] = res */ __pyx_v_res = __pyx_v_6pandas_5algos_NaN; } __pyx_L11:; /* "pandas/algos.pyx":1353 * res = NaN * * output[i] = res # <<<<<<<<<<<<<< * * skiplist_destroy(sl) */ __pyx_t_15 = __pyx_v_i; __pyx_t_8 = -1; if (__pyx_t_15 < 0) { __pyx_t_15 += __pyx_pybuffernd_output.diminfo[0].shape; if (unlikely(__pyx_t_15 < 0)) __pyx_t_8 = 0; } else if (unlikely(__pyx_t_15 >= __pyx_pybuffernd_output.diminfo[0].shape)) __pyx_t_8 = 0; if (unlikely(__pyx_t_8 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_8); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1353; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_double_t *, __pyx_pybuffernd_output.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_output.diminfo[0].strides) = __pyx_v_res; } /* "pandas/algos.pyx":1355 * output[i] = res * * skiplist_destroy(sl) # <<<<<<<<<<<<<< * * return output */ skiplist_destroy(__pyx_v_sl); /* "pandas/algos.pyx":1357 * skiplist_destroy(sl) * * return output # <<<<<<<<<<<<<< * * def roll_median_cython(ndarray input, int win, int minp): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_output)); __pyx_r = ((PyObject *)__pyx_v_output); goto __pyx_L0; /* "pandas/algos.pyx":1304 * from skiplist cimport * * * def roll_median_c(ndarray[float64_t] arg, int win, int minp): # <<<<<<<<<<<<<< * cdef double val, res, prev * cdef: */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_7); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_arg.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_output.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.roll_median_c", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_arg.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_output.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_output); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/algos.pyx":1359 * return output * * def roll_median_cython(ndarray input, int win, int minp): # <<<<<<<<<<<<<< * ''' * O(N log(window)) implementation using skip list */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_41roll_median_cython(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6pandas_5algos_40roll_median_cython[] = "\n O(N log(window)) implementation using skip list\n "; static PyMethodDef __pyx_mdef_6pandas_5algos_41roll_median_cython = {__Pyx_NAMESTR("roll_median_cython"), (PyCFunction)__pyx_pw_6pandas_5algos_41roll_median_cython, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_5algos_40roll_median_cython)}; static PyObject *__pyx_pw_6pandas_5algos_41roll_median_cython(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_input = 0; int __pyx_v_win; int __pyx_v_minp; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("roll_median_cython (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_input,&__pyx_n_s_win,&__pyx_n_s_minp,0}; PyObject* values[3] = {0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_input)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_win)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("roll_median_cython", 1, 3, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1359; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_minp)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("roll_median_cython", 1, 3, 3, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1359; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "roll_median_cython") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1359; __pyx_clineno = __LINE__; goto __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_input = ((PyArrayObject *)values[0]); __pyx_v_win = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_win == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1359; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_minp = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_minp == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1359; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("roll_median_cython", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1359; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.roll_median_cython", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_input), __pyx_ptype_5numpy_ndarray, 1, "input", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1359; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_40roll_median_cython(__pyx_self, __pyx_v_input, __pyx_v_win, __pyx_v_minp); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5algos_40roll_median_cython(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_input, int __pyx_v_win, int __pyx_v_minp) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("roll_median_cython", 0); /* "pandas/algos.pyx":1363 * O(N log(window)) implementation using skip list * ''' * return _roll_skiplist_op(input, win, minp, _get_median) # <<<<<<<<<<<<<< * * # Unfortunately had to resort to some hackery here, would like for */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_6pandas_5algos__roll_skiplist_op(__pyx_v_input, __pyx_v_win, __pyx_v_minp, __pyx_f_6pandas_5algos__get_median); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1363; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "pandas/algos.pyx":1359 * return output * * def roll_median_cython(ndarray input, int win, int minp): # <<<<<<<<<<<<<< * ''' * O(N log(window)) implementation using skip list */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas.algos.roll_median_cython", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/algos.pyx":1368 * # Cython to be able to get this right. * * cdef double_t _get_median(object sl, int nobs, int minp): # <<<<<<<<<<<<<< * cdef Py_ssize_t midpoint * cdef IndexableSkiplist skiplist = sl */ static __pyx_t_5numpy_double_t __pyx_f_6pandas_5algos__get_median(PyObject *__pyx_v_sl, int __pyx_v_nobs, int __pyx_v_minp) { Py_ssize_t __pyx_v_midpoint; struct __pyx_obj_6pandas_5algos_IndexableSkiplist *__pyx_v_skiplist = 0; __pyx_t_5numpy_double_t __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; __pyx_t_5numpy_double_t __pyx_t_3; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_get_median", 0); /* "pandas/algos.pyx":1370 * cdef double_t _get_median(object sl, int nobs, int minp): * cdef Py_ssize_t midpoint * cdef IndexableSkiplist skiplist = sl # <<<<<<<<<<<<<< * if nobs >= minp: * midpoint = nobs / 2 */ __pyx_t_1 = __pyx_v_sl; __Pyx_INCREF(__pyx_t_1); __pyx_v_skiplist = ((struct __pyx_obj_6pandas_5algos_IndexableSkiplist *)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/algos.pyx":1371 * cdef Py_ssize_t midpoint * cdef IndexableSkiplist skiplist = sl * if nobs >= minp: # <<<<<<<<<<<<<< * midpoint = nobs / 2 * if nobs % 2: */ __pyx_t_2 = ((__pyx_v_nobs >= __pyx_v_minp) != 0); if (__pyx_t_2) { /* "pandas/algos.pyx":1372 * cdef IndexableSkiplist skiplist = sl * if nobs >= minp: * midpoint = nobs / 2 # <<<<<<<<<<<<<< * if nobs % 2: * return skiplist.get(midpoint) */ __pyx_v_midpoint = __Pyx_div_long(__pyx_v_nobs, 2); /* "pandas/algos.pyx":1373 * if nobs >= minp: * midpoint = nobs / 2 * if nobs % 2: # <<<<<<<<<<<<<< * return skiplist.get(midpoint) * else: */ __pyx_t_2 = (__Pyx_mod_long(__pyx_v_nobs, 2) != 0); if (__pyx_t_2) { /* "pandas/algos.pyx":1374 * midpoint = nobs / 2 * if nobs % 2: * return skiplist.get(midpoint) # <<<<<<<<<<<<<< * else: * return (skiplist.get(midpoint) + */ __pyx_t_1 = ((struct __pyx_vtabstruct_6pandas_5algos_IndexableSkiplist *)__pyx_v_skiplist->__pyx_vtab)->get(__pyx_v_skiplist, __pyx_v_midpoint, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1374; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __pyx_PyFloat_AsDouble(__pyx_t_1); if (unlikely((__pyx_t_3 == (npy_double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1374; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_3; goto __pyx_L0; } /*else*/ { /* "pandas/algos.pyx":1376 * return skiplist.get(midpoint) * else: * return (skiplist.get(midpoint) + # <<<<<<<<<<<<<< * skiplist.get(midpoint - 1)) / 2 * else: */ __pyx_t_1 = ((struct __pyx_vtabstruct_6pandas_5algos_IndexableSkiplist *)__pyx_v_skiplist->__pyx_vtab)->get(__pyx_v_skiplist, __pyx_v_midpoint, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1376; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); /* "pandas/algos.pyx":1377 * else: * return (skiplist.get(midpoint) + * skiplist.get(midpoint - 1)) / 2 # <<<<<<<<<<<<<< * else: * return NaN */ __pyx_t_4 = ((struct __pyx_vtabstruct_6pandas_5algos_IndexableSkiplist *)__pyx_v_skiplist->__pyx_vtab)->get(__pyx_v_skiplist, (__pyx_v_midpoint - 1), 0); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1377; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); /* "pandas/algos.pyx":1376 * return skiplist.get(midpoint) * else: * return (skiplist.get(midpoint) + # <<<<<<<<<<<<<< * skiplist.get(midpoint - 1)) / 2 * else: */ __pyx_t_5 = PyNumber_Add(__pyx_t_1, __pyx_t_4); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1376; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "pandas/algos.pyx":1377 * else: * return (skiplist.get(midpoint) + * skiplist.get(midpoint - 1)) / 2 # <<<<<<<<<<<<<< * else: * return NaN */ __pyx_t_4 = __Pyx_PyNumber_Divide(__pyx_t_5, __pyx_int_2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1377; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_3 = __pyx_PyFloat_AsDouble(__pyx_t_4); if (unlikely((__pyx_t_3 == (npy_double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1377; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_r = __pyx_t_3; goto __pyx_L0; } } /*else*/ { /* "pandas/algos.pyx":1379 * skiplist.get(midpoint - 1)) / 2 * else: * return NaN # <<<<<<<<<<<<<< * * #---------------------------------------------------------------------- */ __pyx_r = __pyx_v_6pandas_5algos_NaN; goto __pyx_L0; } /* "pandas/algos.pyx":1368 * # Cython to be able to get this right. * * cdef double_t _get_median(object sl, int nobs, int minp): # <<<<<<<<<<<<<< * cdef Py_ssize_t midpoint * cdef IndexableSkiplist skiplist = sl */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_WriteUnraisable("pandas.algos._get_median", __pyx_clineno, __pyx_lineno, __pyx_filename, 0); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_skiplist); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/algos.pyx":1395 * @cython.boundscheck(False) * @cython.wraparound(False) * def roll_max2(ndarray[float64_t] a, int window, int minp): # <<<<<<<<<<<<<< * "Moving max of 1d array of dtype=float64 along axis=0 ignoring NaNs." * cdef np.float64_t ai, aold */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_43roll_max2(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6pandas_5algos_42roll_max2[] = "Moving max of 1d array of dtype=float64 along axis=0 ignoring NaNs."; static PyMethodDef __pyx_mdef_6pandas_5algos_43roll_max2 = {__Pyx_NAMESTR("roll_max2"), (PyCFunction)__pyx_pw_6pandas_5algos_43roll_max2, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_5algos_42roll_max2)}; static PyObject *__pyx_pw_6pandas_5algos_43roll_max2(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_a = 0; int __pyx_v_window; int __pyx_v_minp; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("roll_max2 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_a,&__pyx_n_s_window,&__pyx_n_s_minp,0}; PyObject* values[3] = {0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_a)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_window)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("roll_max2", 1, 3, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1395; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_minp)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("roll_max2", 1, 3, 3, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1395; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "roll_max2") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1395; __pyx_clineno = __LINE__; goto __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_a = ((PyArrayObject *)values[0]); __pyx_v_window = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_window == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1395; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_minp = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_minp == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1395; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("roll_max2", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1395; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.roll_max2", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_a), __pyx_ptype_5numpy_ndarray, 1, "a", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1395; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_42roll_max2(__pyx_self, __pyx_v_a, __pyx_v_window, __pyx_v_minp); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5algos_42roll_max2(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_a, int __pyx_v_window, int __pyx_v_minp) { __pyx_t_5numpy_float64_t __pyx_v_ai; __pyx_t_5numpy_float64_t __pyx_v_aold; Py_ssize_t __pyx_v_count; struct __pyx_t_6pandas_5algos_pairs *__pyx_v_ring; struct __pyx_t_6pandas_5algos_pairs *__pyx_v_minpair; struct __pyx_t_6pandas_5algos_pairs *__pyx_v_end; struct __pyx_t_6pandas_5algos_pairs *__pyx_v_last; Py_ssize_t __pyx_v_i0; npy_intp *__pyx_v_dim; Py_ssize_t __pyx_v_n0; npy_intp *__pyx_v_dims; PyArrayObject *__pyx_v_y = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_a; __Pyx_Buffer __pyx_pybuffer_a; __Pyx_LocalBuf_ND __pyx_pybuffernd_y; __Pyx_Buffer __pyx_pybuffer_y; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations npy_intp __pyx_t_1[1]; PyObject *__pyx_t_2 = NULL; PyArrayObject *__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; int __pyx_t_9; Py_ssize_t __pyx_t_10; Py_ssize_t __pyx_t_11; long __pyx_t_12; Py_ssize_t __pyx_t_13; Py_ssize_t __pyx_t_14; double __pyx_t_15; Py_ssize_t __pyx_t_16; Py_ssize_t __pyx_t_17; long __pyx_t_18; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("roll_max2", 0); __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_a.pybuffer.buf = NULL; __pyx_pybuffer_a.refcount = 0; __pyx_pybuffernd_a.data = NULL; __pyx_pybuffernd_a.rcbuffer = &__pyx_pybuffer_a; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_a.rcbuffer->pybuffer, (PyObject*)__pyx_v_a, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1395; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_a.diminfo[0].strides = __pyx_pybuffernd_a.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_a.diminfo[0].shape = __pyx_pybuffernd_a.rcbuffer->pybuffer.shape[0]; /* "pandas/algos.pyx":1405 * cdef Py_ssize_t i0 * cdef np.npy_intp *dim * dim = PyArray_DIMS(a) # <<<<<<<<<<<<<< * cdef Py_ssize_t n0 = dim[0] * cdef np.npy_intp *dims = [n0] */ __pyx_v_dim = PyArray_DIMS(((PyArrayObject *)__pyx_v_a)); /* "pandas/algos.pyx":1406 * cdef np.npy_intp *dim * dim = PyArray_DIMS(a) * cdef Py_ssize_t n0 = dim[0] # <<<<<<<<<<<<<< * cdef np.npy_intp *dims = [n0] * cdef np.ndarray[np.float64_t, ndim=1] y = PyArray_EMPTY(1, dims, */ __pyx_v_n0 = (__pyx_v_dim[0]); /* "pandas/algos.pyx":1407 * dim = PyArray_DIMS(a) * cdef Py_ssize_t n0 = dim[0] * cdef np.npy_intp *dims = [n0] # <<<<<<<<<<<<<< * cdef np.ndarray[np.float64_t, ndim=1] y = PyArray_EMPTY(1, dims, * NPY_float64, 0) */ __pyx_t_1[0] = __pyx_v_n0; __pyx_v_dims = __pyx_t_1; /* "pandas/algos.pyx":1408 * cdef Py_ssize_t n0 = dim[0] * cdef np.npy_intp *dims = [n0] * cdef np.ndarray[np.float64_t, ndim=1] y = PyArray_EMPTY(1, dims, # <<<<<<<<<<<<<< * NPY_float64, 0) * */ __pyx_t_2 = PyArray_EMPTY(1, __pyx_v_dims, NPY_FLOAT64, 0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1408; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 1408; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_3 = ((PyArrayObject *)__pyx_t_2); { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_y.rcbuffer->pybuffer, (PyObject*)__pyx_t_3, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { __pyx_v_y = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_y.rcbuffer->pybuffer.buf = NULL; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1408; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } else {__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_t_3 = 0; __pyx_v_y = ((PyArrayObject *)__pyx_t_2); __pyx_t_2 = 0; /* "pandas/algos.pyx":1411 * NPY_float64, 0) * * if window < 1: # <<<<<<<<<<<<<< * raise ValueError('Invalid window size %d' * % (window)) */ __pyx_t_4 = ((__pyx_v_window < 1) != 0); if (__pyx_t_4) { /* "pandas/algos.pyx":1413 * if window < 1: * raise ValueError('Invalid window size %d' * % (window)) # <<<<<<<<<<<<<< * * if minp > window: */ __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_window); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1413; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = __Pyx_PyString_Format(__pyx_kp_s_Invalid_window_size_d, __pyx_t_2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1413; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/algos.pyx":1412 * * if window < 1: * raise ValueError('Invalid window size %d' # <<<<<<<<<<<<<< * % (window)) * */ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1412; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyObject_Call(__pyx_builtin_ValueError, __pyx_t_2, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1412; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_Raise(__pyx_t_5, 0, 0, 0); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1412; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } /* "pandas/algos.pyx":1415 * % (window)) * * if minp > window: # <<<<<<<<<<<<<< * raise ValueError('Invalid min_periods size %d greater than window %d' * % (minp, window)) */ __pyx_t_4 = ((__pyx_v_minp > __pyx_v_window) != 0); if (__pyx_t_4) { /* "pandas/algos.pyx":1417 * if minp > window: * raise ValueError('Invalid min_periods size %d greater than window %d' * % (minp, window)) # <<<<<<<<<<<<<< * * minp = _check_minp(window, minp, n0) */ __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_minp); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1417; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_window); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1417; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1417; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_5 = 0; __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_Invalid_min_periods_size_d_great, __pyx_t_6); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1417; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; /* "pandas/algos.pyx":1416 * * if minp > window: * raise ValueError('Invalid min_periods size %d greater than window %d' # <<<<<<<<<<<<<< * % (minp, window)) * */ __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1416; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1416; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1416; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } /* "pandas/algos.pyx":1419 * % (minp, window)) * * minp = _check_minp(window, minp, n0) # <<<<<<<<<<<<<< * * window = min(window, n0) */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_check_minp); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1419; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_window); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1419; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_minp); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1419; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_7 = PyInt_FromSsize_t(__pyx_v_n0); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1419; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_t_8 = PyTuple_New(3); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1419; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_8, 2, __pyx_t_7); __Pyx_GIVEREF(__pyx_t_7); __pyx_t_6 = 0; __pyx_t_5 = 0; __pyx_t_7 = 0; __pyx_t_7 = PyObject_Call(__pyx_t_2, __pyx_t_8, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1419; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_9 = __Pyx_PyInt_As_int(__pyx_t_7); if (unlikely((__pyx_t_9 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1419; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_v_minp = __pyx_t_9; /* "pandas/algos.pyx":1421 * minp = _check_minp(window, minp, n0) * * window = min(window, n0) # <<<<<<<<<<<<<< * * ring = stdlib.malloc(window * sizeof(pairs)) */ __pyx_t_10 = __pyx_v_n0; __pyx_t_9 = __pyx_v_window; if (((__pyx_t_10 < __pyx_t_9) != 0)) { __pyx_t_11 = __pyx_t_10; } else { __pyx_t_11 = __pyx_t_9; } __pyx_v_window = __pyx_t_11; /* "pandas/algos.pyx":1423 * window = min(window, n0) * * ring = stdlib.malloc(window * sizeof(pairs)) # <<<<<<<<<<<<<< * end = ring + window * last = ring */ __pyx_v_ring = ((struct __pyx_t_6pandas_5algos_pairs *)malloc((__pyx_v_window * (sizeof(struct __pyx_t_6pandas_5algos_pairs))))); /* "pandas/algos.pyx":1424 * * ring = stdlib.malloc(window * sizeof(pairs)) * end = ring + window # <<<<<<<<<<<<<< * last = ring * */ __pyx_v_end = (__pyx_v_ring + __pyx_v_window); /* "pandas/algos.pyx":1425 * ring = stdlib.malloc(window * sizeof(pairs)) * end = ring + window * last = ring # <<<<<<<<<<<<<< * * minpair = ring */ __pyx_v_last = __pyx_v_ring; /* "pandas/algos.pyx":1427 * last = ring * * minpair = ring # <<<<<<<<<<<<<< * ai = a[0] * if ai == ai: */ __pyx_v_minpair = __pyx_v_ring; /* "pandas/algos.pyx":1428 * * minpair = ring * ai = a[0] # <<<<<<<<<<<<<< * if ai == ai: * minpair.value = ai */ __pyx_t_12 = 0; __pyx_v_ai = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_a.rcbuffer->pybuffer.buf, __pyx_t_12, __pyx_pybuffernd_a.diminfo[0].strides)); /* "pandas/algos.pyx":1429 * minpair = ring * ai = a[0] * if ai == ai: # <<<<<<<<<<<<<< * minpair.value = ai * else: */ __pyx_t_4 = ((__pyx_v_ai == __pyx_v_ai) != 0); if (__pyx_t_4) { /* "pandas/algos.pyx":1430 * ai = a[0] * if ai == ai: * minpair.value = ai # <<<<<<<<<<<<<< * else: * minpair.value = MINfloat64 */ __pyx_v_minpair->value = __pyx_v_ai; goto __pyx_L5; } /*else*/ { /* "pandas/algos.pyx":1432 * minpair.value = ai * else: * minpair.value = MINfloat64 # <<<<<<<<<<<<<< * minpair.death = window * */ __pyx_v_minpair->value = __pyx_v_6pandas_5algos_MINfloat64; } __pyx_L5:; /* "pandas/algos.pyx":1433 * else: * minpair.value = MINfloat64 * minpair.death = window # <<<<<<<<<<<<<< * * count = 0 */ __pyx_v_minpair->death = __pyx_v_window; /* "pandas/algos.pyx":1435 * minpair.death = window * * count = 0 # <<<<<<<<<<<<<< * for i0 in range(n0): * ai = a[i0] */ __pyx_v_count = 0; /* "pandas/algos.pyx":1436 * * count = 0 * for i0 in range(n0): # <<<<<<<<<<<<<< * ai = a[i0] * if ai == ai: */ __pyx_t_11 = __pyx_v_n0; for (__pyx_t_10 = 0; __pyx_t_10 < __pyx_t_11; __pyx_t_10+=1) { __pyx_v_i0 = __pyx_t_10; /* "pandas/algos.pyx":1437 * count = 0 * for i0 in range(n0): * ai = a[i0] # <<<<<<<<<<<<<< * if ai == ai: * count += 1 */ __pyx_t_13 = __pyx_v_i0; __pyx_v_ai = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_a.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_a.diminfo[0].strides)); /* "pandas/algos.pyx":1438 * for i0 in range(n0): * ai = a[i0] * if ai == ai: # <<<<<<<<<<<<<< * count += 1 * else: */ __pyx_t_4 = ((__pyx_v_ai == __pyx_v_ai) != 0); if (__pyx_t_4) { /* "pandas/algos.pyx":1439 * ai = a[i0] * if ai == ai: * count += 1 # <<<<<<<<<<<<<< * else: * ai = MINfloat64 */ __pyx_v_count = (__pyx_v_count + 1); goto __pyx_L8; } /*else*/ { /* "pandas/algos.pyx":1441 * count += 1 * else: * ai = MINfloat64 # <<<<<<<<<<<<<< * if i0 >= window: * aold = a[i0 - window] */ __pyx_v_ai = __pyx_v_6pandas_5algos_MINfloat64; } __pyx_L8:; /* "pandas/algos.pyx":1442 * else: * ai = MINfloat64 * if i0 >= window: # <<<<<<<<<<<<<< * aold = a[i0 - window] * if aold == aold: */ __pyx_t_4 = ((__pyx_v_i0 >= __pyx_v_window) != 0); if (__pyx_t_4) { /* "pandas/algos.pyx":1443 * ai = MINfloat64 * if i0 >= window: * aold = a[i0 - window] # <<<<<<<<<<<<<< * if aold == aold: * count -= 1 */ __pyx_t_14 = (__pyx_v_i0 - __pyx_v_window); __pyx_v_aold = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_a.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_a.diminfo[0].strides)); /* "pandas/algos.pyx":1444 * if i0 >= window: * aold = a[i0 - window] * if aold == aold: # <<<<<<<<<<<<<< * count -= 1 * if minpair.death == i0: */ __pyx_t_4 = ((__pyx_v_aold == __pyx_v_aold) != 0); if (__pyx_t_4) { /* "pandas/algos.pyx":1445 * aold = a[i0 - window] * if aold == aold: * count -= 1 # <<<<<<<<<<<<<< * if minpair.death == i0: * minpair += 1 */ __pyx_v_count = (__pyx_v_count - 1); goto __pyx_L10; } __pyx_L10:; goto __pyx_L9; } __pyx_L9:; /* "pandas/algos.pyx":1446 * if aold == aold: * count -= 1 * if minpair.death == i0: # <<<<<<<<<<<<<< * minpair += 1 * if minpair >= end: */ __pyx_t_4 = ((__pyx_v_minpair->death == __pyx_v_i0) != 0); if (__pyx_t_4) { /* "pandas/algos.pyx":1447 * count -= 1 * if minpair.death == i0: * minpair += 1 # <<<<<<<<<<<<<< * if minpair >= end: * minpair = ring */ __pyx_v_minpair = (__pyx_v_minpair + 1); /* "pandas/algos.pyx":1448 * if minpair.death == i0: * minpair += 1 * if minpair >= end: # <<<<<<<<<<<<<< * minpair = ring * if ai >= minpair.value: */ __pyx_t_4 = ((__pyx_v_minpair >= __pyx_v_end) != 0); if (__pyx_t_4) { /* "pandas/algos.pyx":1449 * minpair += 1 * if minpair >= end: * minpair = ring # <<<<<<<<<<<<<< * if ai >= minpair.value: * minpair.value = ai */ __pyx_v_minpair = __pyx_v_ring; goto __pyx_L12; } __pyx_L12:; goto __pyx_L11; } __pyx_L11:; /* "pandas/algos.pyx":1450 * if minpair >= end: * minpair = ring * if ai >= minpair.value: # <<<<<<<<<<<<<< * minpair.value = ai * minpair.death = i0 + window */ __pyx_t_4 = ((__pyx_v_ai >= __pyx_v_minpair->value) != 0); if (__pyx_t_4) { /* "pandas/algos.pyx":1451 * minpair = ring * if ai >= minpair.value: * minpair.value = ai # <<<<<<<<<<<<<< * minpair.death = i0 + window * last = minpair */ __pyx_v_minpair->value = __pyx_v_ai; /* "pandas/algos.pyx":1452 * if ai >= minpair.value: * minpair.value = ai * minpair.death = i0 + window # <<<<<<<<<<<<<< * last = minpair * else: */ __pyx_v_minpair->death = (__pyx_v_i0 + __pyx_v_window); /* "pandas/algos.pyx":1453 * minpair.value = ai * minpair.death = i0 + window * last = minpair # <<<<<<<<<<<<<< * else: * while last.value <= ai: */ __pyx_v_last = __pyx_v_minpair; goto __pyx_L13; } /*else*/ { /* "pandas/algos.pyx":1455 * last = minpair * else: * while last.value <= ai: # <<<<<<<<<<<<<< * if last == ring: * last = end */ while (1) { __pyx_t_4 = ((__pyx_v_last->value <= __pyx_v_ai) != 0); if (!__pyx_t_4) break; /* "pandas/algos.pyx":1456 * else: * while last.value <= ai: * if last == ring: # <<<<<<<<<<<<<< * last = end * last -= 1 */ __pyx_t_4 = ((__pyx_v_last == __pyx_v_ring) != 0); if (__pyx_t_4) { /* "pandas/algos.pyx":1457 * while last.value <= ai: * if last == ring: * last = end # <<<<<<<<<<<<<< * last -= 1 * last += 1 */ __pyx_v_last = __pyx_v_end; goto __pyx_L16; } __pyx_L16:; /* "pandas/algos.pyx":1458 * if last == ring: * last = end * last -= 1 # <<<<<<<<<<<<<< * last += 1 * if last == end: */ __pyx_v_last = (__pyx_v_last - 1); } /* "pandas/algos.pyx":1459 * last = end * last -= 1 * last += 1 # <<<<<<<<<<<<<< * if last == end: * last = ring */ __pyx_v_last = (__pyx_v_last + 1); /* "pandas/algos.pyx":1460 * last -= 1 * last += 1 * if last == end: # <<<<<<<<<<<<<< * last = ring * last.value = ai */ __pyx_t_4 = ((__pyx_v_last == __pyx_v_end) != 0); if (__pyx_t_4) { /* "pandas/algos.pyx":1461 * last += 1 * if last == end: * last = ring # <<<<<<<<<<<<<< * last.value = ai * last.death = i0 + window */ __pyx_v_last = __pyx_v_ring; goto __pyx_L17; } __pyx_L17:; /* "pandas/algos.pyx":1462 * if last == end: * last = ring * last.value = ai # <<<<<<<<<<<<<< * last.death = i0 + window * if count >= minp: */ __pyx_v_last->value = __pyx_v_ai; /* "pandas/algos.pyx":1463 * last = ring * last.value = ai * last.death = i0 + window # <<<<<<<<<<<<<< * if count >= minp: * y[i0] = minpair.value */ __pyx_v_last->death = (__pyx_v_i0 + __pyx_v_window); } __pyx_L13:; /* "pandas/algos.pyx":1464 * last.value = ai * last.death = i0 + window * if count >= minp: # <<<<<<<<<<<<<< * y[i0] = minpair.value * else: */ __pyx_t_4 = ((__pyx_v_count >= __pyx_v_minp) != 0); if (__pyx_t_4) { /* "pandas/algos.pyx":1465 * last.death = i0 + window * if count >= minp: * y[i0] = minpair.value # <<<<<<<<<<<<<< * else: * y[i0] = NaN */ __pyx_t_15 = __pyx_v_minpair->value; __pyx_t_16 = __pyx_v_i0; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_y.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_y.diminfo[0].strides) = __pyx_t_15; goto __pyx_L18; } /*else*/ { /* "pandas/algos.pyx":1467 * y[i0] = minpair.value * else: * y[i0] = NaN # <<<<<<<<<<<<<< * * for i0 in range(minp - 1): */ __pyx_t_17 = __pyx_v_i0; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_y.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_y.diminfo[0].strides) = __pyx_v_6pandas_5algos_NaN; } __pyx_L18:; } /* "pandas/algos.pyx":1469 * y[i0] = NaN * * for i0 in range(minp - 1): # <<<<<<<<<<<<<< * y[i0] = NaN * */ __pyx_t_18 = (__pyx_v_minp - 1); for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_18; __pyx_t_11+=1) { __pyx_v_i0 = __pyx_t_11; /* "pandas/algos.pyx":1470 * * for i0 in range(minp - 1): * y[i0] = NaN # <<<<<<<<<<<<<< * * stdlib.free(ring) */ __pyx_t_10 = __pyx_v_i0; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_y.rcbuffer->pybuffer.buf, __pyx_t_10, __pyx_pybuffernd_y.diminfo[0].strides) = __pyx_v_6pandas_5algos_NaN; } /* "pandas/algos.pyx":1472 * y[i0] = NaN * * stdlib.free(ring) # <<<<<<<<<<<<<< * return y * */ free(__pyx_v_ring); /* "pandas/algos.pyx":1473 * * stdlib.free(ring) * return y # <<<<<<<<<<<<<< * * def roll_max(ndarray input, int win, int minp): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_y)); __pyx_r = ((PyObject *)__pyx_v_y); goto __pyx_L0; /* "pandas/algos.pyx":1395 * @cython.boundscheck(False) * @cython.wraparound(False) * def roll_max2(ndarray[float64_t] a, int window, int minp): # <<<<<<<<<<<<<< * "Moving max of 1d array of dtype=float64 along axis=0 ignoring NaNs." * cdef np.float64_t ai, aold */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_a.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.roll_max2", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_a.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_y); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/algos.pyx":1475 * return y * * def roll_max(ndarray input, int win, int minp): # <<<<<<<<<<<<<< * ''' * O(N log(window)) implementation using skip list */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_45roll_max(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6pandas_5algos_44roll_max[] = "\n O(N log(window)) implementation using skip list\n "; static PyMethodDef __pyx_mdef_6pandas_5algos_45roll_max = {__Pyx_NAMESTR("roll_max"), (PyCFunction)__pyx_pw_6pandas_5algos_45roll_max, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_5algos_44roll_max)}; static PyObject *__pyx_pw_6pandas_5algos_45roll_max(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_input = 0; int __pyx_v_win; int __pyx_v_minp; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("roll_max (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_input,&__pyx_n_s_win,&__pyx_n_s_minp,0}; PyObject* values[3] = {0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_input)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_win)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("roll_max", 1, 3, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1475; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_minp)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("roll_max", 1, 3, 3, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1475; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "roll_max") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1475; __pyx_clineno = __LINE__; goto __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_input = ((PyArrayObject *)values[0]); __pyx_v_win = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_win == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1475; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_minp = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_minp == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1475; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("roll_max", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1475; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.roll_max", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_input), __pyx_ptype_5numpy_ndarray, 1, "input", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1475; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_44roll_max(__pyx_self, __pyx_v_input, __pyx_v_win, __pyx_v_minp); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5algos_44roll_max(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_input, int __pyx_v_win, int __pyx_v_minp) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("roll_max", 0); /* "pandas/algos.pyx":1479 * O(N log(window)) implementation using skip list * ''' * return _roll_skiplist_op(input, win, minp, _get_max) # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_6pandas_5algos__roll_skiplist_op(__pyx_v_input, __pyx_v_win, __pyx_v_minp, __pyx_f_6pandas_5algos__get_max); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1479; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "pandas/algos.pyx":1475 * return y * * def roll_max(ndarray input, int win, int minp): # <<<<<<<<<<<<<< * ''' * O(N log(window)) implementation using skip list */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas.algos.roll_max", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/algos.pyx":1482 * * * cdef double_t _get_max(object skiplist, int nobs, int minp): # <<<<<<<<<<<<<< * if nobs >= minp: * return skiplist.get(nobs - 1) */ static __pyx_t_5numpy_double_t __pyx_f_6pandas_5algos__get_max(PyObject *__pyx_v_skiplist, int __pyx_v_nobs, int __pyx_v_minp) { __pyx_t_5numpy_double_t __pyx_r; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; __pyx_t_5numpy_double_t __pyx_t_5; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_get_max", 0); /* "pandas/algos.pyx":1483 * * cdef double_t _get_max(object skiplist, int nobs, int minp): * if nobs >= minp: # <<<<<<<<<<<<<< * return skiplist.get(nobs - 1) * else: */ __pyx_t_1 = ((__pyx_v_nobs >= __pyx_v_minp) != 0); if (__pyx_t_1) { /* "pandas/algos.pyx":1484 * cdef double_t _get_max(object skiplist, int nobs, int minp): * if nobs >= minp: * return skiplist.get(nobs - 1) # <<<<<<<<<<<<<< * else: * return NaN */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_skiplist, __pyx_n_s_get); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1484; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyInt_From_long((__pyx_v_nobs - 1)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1484; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1484; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1484; __pyx_clineno = __LINE__; goto __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_t_5 = __pyx_PyFloat_AsDouble(__pyx_t_3); if (unlikely((__pyx_t_5 == (npy_double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1484; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_r = __pyx_t_5; goto __pyx_L0; } /*else*/ { /* "pandas/algos.pyx":1486 * return skiplist.get(nobs - 1) * else: * return NaN # <<<<<<<<<<<<<< * * def roll_min(ndarray input, int win, int minp): */ __pyx_r = __pyx_v_6pandas_5algos_NaN; goto __pyx_L0; } /* "pandas/algos.pyx":1482 * * * cdef double_t _get_max(object skiplist, int nobs, int minp): # <<<<<<<<<<<<<< * if nobs >= minp: * return skiplist.get(nobs - 1) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_WriteUnraisable("pandas.algos._get_max", __pyx_clineno, __pyx_lineno, __pyx_filename, 0); __pyx_r = 0; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/algos.pyx":1488 * return NaN * * def roll_min(ndarray input, int win, int minp): # <<<<<<<<<<<<<< * ''' * O(N log(window)) implementation using skip list */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_47roll_min(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6pandas_5algos_46roll_min[] = "\n O(N log(window)) implementation using skip list\n "; static PyMethodDef __pyx_mdef_6pandas_5algos_47roll_min = {__Pyx_NAMESTR("roll_min"), (PyCFunction)__pyx_pw_6pandas_5algos_47roll_min, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_5algos_46roll_min)}; static PyObject *__pyx_pw_6pandas_5algos_47roll_min(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_input = 0; int __pyx_v_win; int __pyx_v_minp; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("roll_min (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_input,&__pyx_n_s_win,&__pyx_n_s_minp,0}; PyObject* values[3] = {0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_input)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_win)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("roll_min", 1, 3, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1488; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_minp)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("roll_min", 1, 3, 3, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1488; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "roll_min") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1488; __pyx_clineno = __LINE__; goto __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_input = ((PyArrayObject *)values[0]); __pyx_v_win = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_win == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1488; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_minp = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_minp == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1488; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("roll_min", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1488; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.roll_min", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_input), __pyx_ptype_5numpy_ndarray, 1, "input", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1488; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_46roll_min(__pyx_self, __pyx_v_input, __pyx_v_win, __pyx_v_minp); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5algos_46roll_min(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_input, int __pyx_v_win, int __pyx_v_minp) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("roll_min", 0); /* "pandas/algos.pyx":1492 * O(N log(window)) implementation using skip list * ''' * return _roll_skiplist_op(input, win, minp, _get_min) # <<<<<<<<<<<<<< * * @cython.boundscheck(False) */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_6pandas_5algos__roll_skiplist_op(__pyx_v_input, __pyx_v_win, __pyx_v_minp, __pyx_f_6pandas_5algos__get_min); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1492; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "pandas/algos.pyx":1488 * return NaN * * def roll_min(ndarray input, int win, int minp): # <<<<<<<<<<<<<< * ''' * O(N log(window)) implementation using skip list */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas.algos.roll_min", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/algos.pyx":1496 * @cython.boundscheck(False) * @cython.wraparound(False) * def roll_min2(np.ndarray[np.float64_t, ndim=1] a, int window, int minp): # <<<<<<<<<<<<<< * "Moving min of 1d array of dtype=float64 along axis=0 ignoring NaNs." * cdef np.float64_t ai, aold */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_49roll_min2(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6pandas_5algos_48roll_min2[] = "Moving min of 1d array of dtype=float64 along axis=0 ignoring NaNs."; static PyMethodDef __pyx_mdef_6pandas_5algos_49roll_min2 = {__Pyx_NAMESTR("roll_min2"), (PyCFunction)__pyx_pw_6pandas_5algos_49roll_min2, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_5algos_48roll_min2)}; static PyObject *__pyx_pw_6pandas_5algos_49roll_min2(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_a = 0; int __pyx_v_window; int __pyx_v_minp; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("roll_min2 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_a,&__pyx_n_s_window,&__pyx_n_s_minp,0}; PyObject* values[3] = {0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_a)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_window)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("roll_min2", 1, 3, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1496; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_minp)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("roll_min2", 1, 3, 3, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1496; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "roll_min2") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1496; __pyx_clineno = __LINE__; goto __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_a = ((PyArrayObject *)values[0]); __pyx_v_window = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_window == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1496; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_minp = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_minp == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1496; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("roll_min2", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1496; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.roll_min2", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_a), __pyx_ptype_5numpy_ndarray, 1, "a", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1496; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_48roll_min2(__pyx_self, __pyx_v_a, __pyx_v_window, __pyx_v_minp); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5algos_48roll_min2(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_a, int __pyx_v_window, int __pyx_v_minp) { __pyx_t_5numpy_float64_t __pyx_v_ai; __pyx_t_5numpy_float64_t __pyx_v_aold; Py_ssize_t __pyx_v_count; struct __pyx_t_6pandas_5algos_pairs *__pyx_v_ring; struct __pyx_t_6pandas_5algos_pairs *__pyx_v_minpair; struct __pyx_t_6pandas_5algos_pairs *__pyx_v_end; struct __pyx_t_6pandas_5algos_pairs *__pyx_v_last; Py_ssize_t __pyx_v_i0; npy_intp *__pyx_v_dim; Py_ssize_t __pyx_v_n0; npy_intp *__pyx_v_dims; PyArrayObject *__pyx_v_y = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_a; __Pyx_Buffer __pyx_pybuffer_a; __Pyx_LocalBuf_ND __pyx_pybuffernd_y; __Pyx_Buffer __pyx_pybuffer_y; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations npy_intp __pyx_t_1[1]; PyObject *__pyx_t_2 = NULL; PyArrayObject *__pyx_t_3 = NULL; int __pyx_t_4; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; Py_ssize_t __pyx_t_7; int __pyx_t_8; Py_ssize_t __pyx_t_9; PyObject *__pyx_t_10 = NULL; PyObject *__pyx_t_11 = NULL; long __pyx_t_12; Py_ssize_t __pyx_t_13; Py_ssize_t __pyx_t_14; double __pyx_t_15; Py_ssize_t __pyx_t_16; Py_ssize_t __pyx_t_17; long __pyx_t_18; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("roll_min2", 0); __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_a.pybuffer.buf = NULL; __pyx_pybuffer_a.refcount = 0; __pyx_pybuffernd_a.data = NULL; __pyx_pybuffernd_a.rcbuffer = &__pyx_pybuffer_a; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_a.rcbuffer->pybuffer, (PyObject*)__pyx_v_a, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1496; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_a.diminfo[0].strides = __pyx_pybuffernd_a.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_a.diminfo[0].shape = __pyx_pybuffernd_a.rcbuffer->pybuffer.shape[0]; /* "pandas/algos.pyx":1506 * cdef Py_ssize_t i0 * cdef np.npy_intp *dim * dim = PyArray_DIMS(a) # <<<<<<<<<<<<<< * cdef Py_ssize_t n0 = dim[0] * cdef np.npy_intp *dims = [n0] */ __pyx_v_dim = PyArray_DIMS(((PyArrayObject *)__pyx_v_a)); /* "pandas/algos.pyx":1507 * cdef np.npy_intp *dim * dim = PyArray_DIMS(a) * cdef Py_ssize_t n0 = dim[0] # <<<<<<<<<<<<<< * cdef np.npy_intp *dims = [n0] * cdef np.ndarray[np.float64_t, ndim=1] y = PyArray_EMPTY(1, dims, */ __pyx_v_n0 = (__pyx_v_dim[0]); /* "pandas/algos.pyx":1508 * dim = PyArray_DIMS(a) * cdef Py_ssize_t n0 = dim[0] * cdef np.npy_intp *dims = [n0] # <<<<<<<<<<<<<< * cdef np.ndarray[np.float64_t, ndim=1] y = PyArray_EMPTY(1, dims, * NPY_float64, 0) */ __pyx_t_1[0] = __pyx_v_n0; __pyx_v_dims = __pyx_t_1; /* "pandas/algos.pyx":1509 * cdef Py_ssize_t n0 = dim[0] * cdef np.npy_intp *dims = [n0] * cdef np.ndarray[np.float64_t, ndim=1] y = PyArray_EMPTY(1, dims, # <<<<<<<<<<<<<< * NPY_float64, 0) * */ __pyx_t_2 = PyArray_EMPTY(1, __pyx_v_dims, NPY_FLOAT64, 0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1509; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 1509; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_3 = ((PyArrayObject *)__pyx_t_2); { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_y.rcbuffer->pybuffer, (PyObject*)__pyx_t_3, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { __pyx_v_y = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_y.rcbuffer->pybuffer.buf = NULL; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1509; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } else {__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_t_3 = 0; __pyx_v_y = ((PyArrayObject *)__pyx_t_2); __pyx_t_2 = 0; /* "pandas/algos.pyx":1512 * NPY_float64, 0) * * if window < 1: # <<<<<<<<<<<<<< * raise ValueError('Invalid window size %d' * % (window)) */ __pyx_t_4 = ((__pyx_v_window < 1) != 0); if (__pyx_t_4) { /* "pandas/algos.pyx":1514 * if window < 1: * raise ValueError('Invalid window size %d' * % (window)) # <<<<<<<<<<<<<< * * if minp > window: */ __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_window); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1514; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = __Pyx_PyString_Format(__pyx_kp_s_Invalid_window_size_d, __pyx_t_2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1514; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/algos.pyx":1513 * * if window < 1: * raise ValueError('Invalid window size %d' # <<<<<<<<<<<<<< * % (window)) * */ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1513; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyObject_Call(__pyx_builtin_ValueError, __pyx_t_2, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1513; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_Raise(__pyx_t_5, 0, 0, 0); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1513; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } /* "pandas/algos.pyx":1516 * % (window)) * * if minp > window: # <<<<<<<<<<<<<< * raise ValueError('Invalid min_periods size %d greater than window %d' * % (minp, window)) */ __pyx_t_4 = ((__pyx_v_minp > __pyx_v_window) != 0); if (__pyx_t_4) { /* "pandas/algos.pyx":1518 * if minp > window: * raise ValueError('Invalid min_periods size %d greater than window %d' * % (minp, window)) # <<<<<<<<<<<<<< * * window = min(window, n0) */ __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_minp); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1518; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_window); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1518; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1518; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_5 = 0; __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_Invalid_min_periods_size_d_great, __pyx_t_6); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1518; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; /* "pandas/algos.pyx":1517 * * if minp > window: * raise ValueError('Invalid min_periods size %d greater than window %d' # <<<<<<<<<<<<<< * % (minp, window)) * */ __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1517; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1517; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1517; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } /* "pandas/algos.pyx":1520 * % (minp, window)) * * window = min(window, n0) # <<<<<<<<<<<<<< * * minp = _check_minp(window, minp, n0) */ __pyx_t_7 = __pyx_v_n0; __pyx_t_8 = __pyx_v_window; if (((__pyx_t_7 < __pyx_t_8) != 0)) { __pyx_t_9 = __pyx_t_7; } else { __pyx_t_9 = __pyx_t_8; } __pyx_v_window = __pyx_t_9; /* "pandas/algos.pyx":1522 * window = min(window, n0) * * minp = _check_minp(window, minp, n0) # <<<<<<<<<<<<<< * * ring = stdlib.malloc(window * sizeof(pairs)) */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_check_minp); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1522; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_window); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1522; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_minp); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1522; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_10 = PyInt_FromSsize_t(__pyx_v_n0); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1522; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __pyx_t_11 = PyTuple_New(3); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1522; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_11, 1, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_11, 2, __pyx_t_10); __Pyx_GIVEREF(__pyx_t_10); __pyx_t_6 = 0; __pyx_t_5 = 0; __pyx_t_10 = 0; __pyx_t_10 = PyObject_Call(__pyx_t_2, __pyx_t_11, NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1522; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __pyx_t_8 = __Pyx_PyInt_As_int(__pyx_t_10); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1522; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_v_minp = __pyx_t_8; /* "pandas/algos.pyx":1524 * minp = _check_minp(window, minp, n0) * * ring = stdlib.malloc(window * sizeof(pairs)) # <<<<<<<<<<<<<< * end = ring + window * last = ring */ __pyx_v_ring = ((struct __pyx_t_6pandas_5algos_pairs *)malloc((__pyx_v_window * (sizeof(struct __pyx_t_6pandas_5algos_pairs))))); /* "pandas/algos.pyx":1525 * * ring = stdlib.malloc(window * sizeof(pairs)) * end = ring + window # <<<<<<<<<<<<<< * last = ring * */ __pyx_v_end = (__pyx_v_ring + __pyx_v_window); /* "pandas/algos.pyx":1526 * ring = stdlib.malloc(window * sizeof(pairs)) * end = ring + window * last = ring # <<<<<<<<<<<<<< * * minpair = ring */ __pyx_v_last = __pyx_v_ring; /* "pandas/algos.pyx":1528 * last = ring * * minpair = ring # <<<<<<<<<<<<<< * ai = a[0] * if ai == ai: */ __pyx_v_minpair = __pyx_v_ring; /* "pandas/algos.pyx":1529 * * minpair = ring * ai = a[0] # <<<<<<<<<<<<<< * if ai == ai: * minpair.value = ai */ __pyx_t_12 = 0; __pyx_v_ai = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_a.rcbuffer->pybuffer.buf, __pyx_t_12, __pyx_pybuffernd_a.diminfo[0].strides)); /* "pandas/algos.pyx":1530 * minpair = ring * ai = a[0] * if ai == ai: # <<<<<<<<<<<<<< * minpair.value = ai * else: */ __pyx_t_4 = ((__pyx_v_ai == __pyx_v_ai) != 0); if (__pyx_t_4) { /* "pandas/algos.pyx":1531 * ai = a[0] * if ai == ai: * minpair.value = ai # <<<<<<<<<<<<<< * else: * minpair.value = MAXfloat64 */ __pyx_v_minpair->value = __pyx_v_ai; goto __pyx_L5; } /*else*/ { /* "pandas/algos.pyx":1533 * minpair.value = ai * else: * minpair.value = MAXfloat64 # <<<<<<<<<<<<<< * minpair.death = window * */ __pyx_v_minpair->value = __pyx_v_6pandas_5algos_MAXfloat64; } __pyx_L5:; /* "pandas/algos.pyx":1534 * else: * minpair.value = MAXfloat64 * minpair.death = window # <<<<<<<<<<<<<< * * count = 0 */ __pyx_v_minpair->death = __pyx_v_window; /* "pandas/algos.pyx":1536 * minpair.death = window * * count = 0 # <<<<<<<<<<<<<< * for i0 in range(n0): * ai = a[i0] */ __pyx_v_count = 0; /* "pandas/algos.pyx":1537 * * count = 0 * for i0 in range(n0): # <<<<<<<<<<<<<< * ai = a[i0] * if ai == ai: */ __pyx_t_9 = __pyx_v_n0; for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_9; __pyx_t_7+=1) { __pyx_v_i0 = __pyx_t_7; /* "pandas/algos.pyx":1538 * count = 0 * for i0 in range(n0): * ai = a[i0] # <<<<<<<<<<<<<< * if ai == ai: * count += 1 */ __pyx_t_13 = __pyx_v_i0; __pyx_v_ai = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_a.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_a.diminfo[0].strides)); /* "pandas/algos.pyx":1539 * for i0 in range(n0): * ai = a[i0] * if ai == ai: # <<<<<<<<<<<<<< * count += 1 * else: */ __pyx_t_4 = ((__pyx_v_ai == __pyx_v_ai) != 0); if (__pyx_t_4) { /* "pandas/algos.pyx":1540 * ai = a[i0] * if ai == ai: * count += 1 # <<<<<<<<<<<<<< * else: * ai = MAXfloat64 */ __pyx_v_count = (__pyx_v_count + 1); goto __pyx_L8; } /*else*/ { /* "pandas/algos.pyx":1542 * count += 1 * else: * ai = MAXfloat64 # <<<<<<<<<<<<<< * if i0 >= window: * aold = a[i0 - window] */ __pyx_v_ai = __pyx_v_6pandas_5algos_MAXfloat64; } __pyx_L8:; /* "pandas/algos.pyx":1543 * else: * ai = MAXfloat64 * if i0 >= window: # <<<<<<<<<<<<<< * aold = a[i0 - window] * if aold == aold: */ __pyx_t_4 = ((__pyx_v_i0 >= __pyx_v_window) != 0); if (__pyx_t_4) { /* "pandas/algos.pyx":1544 * ai = MAXfloat64 * if i0 >= window: * aold = a[i0 - window] # <<<<<<<<<<<<<< * if aold == aold: * count -= 1 */ __pyx_t_14 = (__pyx_v_i0 - __pyx_v_window); __pyx_v_aold = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_a.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_a.diminfo[0].strides)); /* "pandas/algos.pyx":1545 * if i0 >= window: * aold = a[i0 - window] * if aold == aold: # <<<<<<<<<<<<<< * count -= 1 * if minpair.death == i0: */ __pyx_t_4 = ((__pyx_v_aold == __pyx_v_aold) != 0); if (__pyx_t_4) { /* "pandas/algos.pyx":1546 * aold = a[i0 - window] * if aold == aold: * count -= 1 # <<<<<<<<<<<<<< * if minpair.death == i0: * minpair += 1 */ __pyx_v_count = (__pyx_v_count - 1); goto __pyx_L10; } __pyx_L10:; goto __pyx_L9; } __pyx_L9:; /* "pandas/algos.pyx":1547 * if aold == aold: * count -= 1 * if minpair.death == i0: # <<<<<<<<<<<<<< * minpair += 1 * if minpair >= end: */ __pyx_t_4 = ((__pyx_v_minpair->death == __pyx_v_i0) != 0); if (__pyx_t_4) { /* "pandas/algos.pyx":1548 * count -= 1 * if minpair.death == i0: * minpair += 1 # <<<<<<<<<<<<<< * if minpair >= end: * minpair = ring */ __pyx_v_minpair = (__pyx_v_minpair + 1); /* "pandas/algos.pyx":1549 * if minpair.death == i0: * minpair += 1 * if minpair >= end: # <<<<<<<<<<<<<< * minpair = ring * if ai <= minpair.value: */ __pyx_t_4 = ((__pyx_v_minpair >= __pyx_v_end) != 0); if (__pyx_t_4) { /* "pandas/algos.pyx":1550 * minpair += 1 * if minpair >= end: * minpair = ring # <<<<<<<<<<<<<< * if ai <= minpair.value: * minpair.value = ai */ __pyx_v_minpair = __pyx_v_ring; goto __pyx_L12; } __pyx_L12:; goto __pyx_L11; } __pyx_L11:; /* "pandas/algos.pyx":1551 * if minpair >= end: * minpair = ring * if ai <= minpair.value: # <<<<<<<<<<<<<< * minpair.value = ai * minpair.death = i0 + window */ __pyx_t_4 = ((__pyx_v_ai <= __pyx_v_minpair->value) != 0); if (__pyx_t_4) { /* "pandas/algos.pyx":1552 * minpair = ring * if ai <= minpair.value: * minpair.value = ai # <<<<<<<<<<<<<< * minpair.death = i0 + window * last = minpair */ __pyx_v_minpair->value = __pyx_v_ai; /* "pandas/algos.pyx":1553 * if ai <= minpair.value: * minpair.value = ai * minpair.death = i0 + window # <<<<<<<<<<<<<< * last = minpair * else: */ __pyx_v_minpair->death = (__pyx_v_i0 + __pyx_v_window); /* "pandas/algos.pyx":1554 * minpair.value = ai * minpair.death = i0 + window * last = minpair # <<<<<<<<<<<<<< * else: * while last.value >= ai: */ __pyx_v_last = __pyx_v_minpair; goto __pyx_L13; } /*else*/ { /* "pandas/algos.pyx":1556 * last = minpair * else: * while last.value >= ai: # <<<<<<<<<<<<<< * if last == ring: * last = end */ while (1) { __pyx_t_4 = ((__pyx_v_last->value >= __pyx_v_ai) != 0); if (!__pyx_t_4) break; /* "pandas/algos.pyx":1557 * else: * while last.value >= ai: * if last == ring: # <<<<<<<<<<<<<< * last = end * last -= 1 */ __pyx_t_4 = ((__pyx_v_last == __pyx_v_ring) != 0); if (__pyx_t_4) { /* "pandas/algos.pyx":1558 * while last.value >= ai: * if last == ring: * last = end # <<<<<<<<<<<<<< * last -= 1 * last += 1 */ __pyx_v_last = __pyx_v_end; goto __pyx_L16; } __pyx_L16:; /* "pandas/algos.pyx":1559 * if last == ring: * last = end * last -= 1 # <<<<<<<<<<<<<< * last += 1 * if last == end: */ __pyx_v_last = (__pyx_v_last - 1); } /* "pandas/algos.pyx":1560 * last = end * last -= 1 * last += 1 # <<<<<<<<<<<<<< * if last == end: * last = ring */ __pyx_v_last = (__pyx_v_last + 1); /* "pandas/algos.pyx":1561 * last -= 1 * last += 1 * if last == end: # <<<<<<<<<<<<<< * last = ring * last.value = ai */ __pyx_t_4 = ((__pyx_v_last == __pyx_v_end) != 0); if (__pyx_t_4) { /* "pandas/algos.pyx":1562 * last += 1 * if last == end: * last = ring # <<<<<<<<<<<<<< * last.value = ai * last.death = i0 + window */ __pyx_v_last = __pyx_v_ring; goto __pyx_L17; } __pyx_L17:; /* "pandas/algos.pyx":1563 * if last == end: * last = ring * last.value = ai # <<<<<<<<<<<<<< * last.death = i0 + window * if count >= minp: */ __pyx_v_last->value = __pyx_v_ai; /* "pandas/algos.pyx":1564 * last = ring * last.value = ai * last.death = i0 + window # <<<<<<<<<<<<<< * if count >= minp: * y[i0] = minpair.value */ __pyx_v_last->death = (__pyx_v_i0 + __pyx_v_window); } __pyx_L13:; /* "pandas/algos.pyx":1565 * last.value = ai * last.death = i0 + window * if count >= minp: # <<<<<<<<<<<<<< * y[i0] = minpair.value * else: */ __pyx_t_4 = ((__pyx_v_count >= __pyx_v_minp) != 0); if (__pyx_t_4) { /* "pandas/algos.pyx":1566 * last.death = i0 + window * if count >= minp: * y[i0] = minpair.value # <<<<<<<<<<<<<< * else: * y[i0] = NaN */ __pyx_t_15 = __pyx_v_minpair->value; __pyx_t_16 = __pyx_v_i0; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_y.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_y.diminfo[0].strides) = __pyx_t_15; goto __pyx_L18; } /*else*/ { /* "pandas/algos.pyx":1568 * y[i0] = minpair.value * else: * y[i0] = NaN # <<<<<<<<<<<<<< * * for i0 in range(minp - 1): */ __pyx_t_17 = __pyx_v_i0; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_y.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_y.diminfo[0].strides) = __pyx_v_6pandas_5algos_NaN; } __pyx_L18:; } /* "pandas/algos.pyx":1570 * y[i0] = NaN * * for i0 in range(minp - 1): # <<<<<<<<<<<<<< * y[i0] = NaN * */ __pyx_t_18 = (__pyx_v_minp - 1); for (__pyx_t_9 = 0; __pyx_t_9 < __pyx_t_18; __pyx_t_9+=1) { __pyx_v_i0 = __pyx_t_9; /* "pandas/algos.pyx":1571 * * for i0 in range(minp - 1): * y[i0] = NaN # <<<<<<<<<<<<<< * * stdlib.free(ring) */ __pyx_t_7 = __pyx_v_i0; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_y.rcbuffer->pybuffer.buf, __pyx_t_7, __pyx_pybuffernd_y.diminfo[0].strides) = __pyx_v_6pandas_5algos_NaN; } /* "pandas/algos.pyx":1573 * y[i0] = NaN * * stdlib.free(ring) # <<<<<<<<<<<<<< * return y * */ free(__pyx_v_ring); /* "pandas/algos.pyx":1574 * * stdlib.free(ring) * return y # <<<<<<<<<<<<<< * * cdef double_t _get_min(object skiplist, int nobs, int minp): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_y)); __pyx_r = ((PyObject *)__pyx_v_y); goto __pyx_L0; /* "pandas/algos.pyx":1496 * @cython.boundscheck(False) * @cython.wraparound(False) * def roll_min2(np.ndarray[np.float64_t, ndim=1] a, int window, int minp): # <<<<<<<<<<<<<< * "Moving min of 1d array of dtype=float64 along axis=0 ignoring NaNs." * cdef np.float64_t ai, aold */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_10); __Pyx_XDECREF(__pyx_t_11); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_a.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.roll_min2", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_a.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_y); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/algos.pyx":1576 * return y * * cdef double_t _get_min(object skiplist, int nobs, int minp): # <<<<<<<<<<<<<< * if nobs >= minp: * return skiplist.get(0) */ static __pyx_t_5numpy_double_t __pyx_f_6pandas_5algos__get_min(PyObject *__pyx_v_skiplist, int __pyx_v_nobs, int __pyx_v_minp) { __pyx_t_5numpy_double_t __pyx_r; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; __pyx_t_5numpy_double_t __pyx_t_4; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_get_min", 0); /* "pandas/algos.pyx":1577 * * cdef double_t _get_min(object skiplist, int nobs, int minp): * if nobs >= minp: # <<<<<<<<<<<<<< * return skiplist.get(0) * else: */ __pyx_t_1 = ((__pyx_v_nobs >= __pyx_v_minp) != 0); if (__pyx_t_1) { /* "pandas/algos.pyx":1578 * cdef double_t _get_min(object skiplist, int nobs, int minp): * if nobs >= minp: * return skiplist.get(0) # <<<<<<<<<<<<<< * else: * return NaN */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_skiplist, __pyx_n_s_get); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1578; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyObject_Call(__pyx_t_2, __pyx_tuple__29, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1578; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_4 = __pyx_PyFloat_AsDouble(__pyx_t_3); if (unlikely((__pyx_t_4 == (npy_double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1578; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_r = __pyx_t_4; goto __pyx_L0; } /*else*/ { /* "pandas/algos.pyx":1580 * return skiplist.get(0) * else: * return NaN # <<<<<<<<<<<<<< * * def roll_quantile(ndarray[float64_t, cast=True] input, int win, */ __pyx_r = __pyx_v_6pandas_5algos_NaN; goto __pyx_L0; } /* "pandas/algos.pyx":1576 * return y * * cdef double_t _get_min(object skiplist, int nobs, int minp): # <<<<<<<<<<<<<< * if nobs >= minp: * return skiplist.get(0) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_WriteUnraisable("pandas.algos._get_min", __pyx_clineno, __pyx_lineno, __pyx_filename, 0); __pyx_r = 0; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/algos.pyx":1582 * return NaN * * def roll_quantile(ndarray[float64_t, cast=True] input, int win, # <<<<<<<<<<<<<< * int minp, double quantile): * ''' */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_51roll_quantile(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6pandas_5algos_50roll_quantile[] = "\n O(N log(window)) implementation using skip list\n "; static PyMethodDef __pyx_mdef_6pandas_5algos_51roll_quantile = {__Pyx_NAMESTR("roll_quantile"), (PyCFunction)__pyx_pw_6pandas_5algos_51roll_quantile, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_5algos_50roll_quantile)}; static PyObject *__pyx_pw_6pandas_5algos_51roll_quantile(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_input = 0; int __pyx_v_win; int __pyx_v_minp; double __pyx_v_quantile; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("roll_quantile (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_input,&__pyx_n_s_win,&__pyx_n_s_minp,&__pyx_n_s_quantile,0}; PyObject* values[4] = {0,0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_input)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_win)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("roll_quantile", 1, 4, 4, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1582; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_minp)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("roll_quantile", 1, 4, 4, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1582; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_quantile)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("roll_quantile", 1, 4, 4, 3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1582; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "roll_quantile") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1582; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 4) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[3] = PyTuple_GET_ITEM(__pyx_args, 3); } __pyx_v_input = ((PyArrayObject *)values[0]); __pyx_v_win = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_win == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1582; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_minp = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_minp == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1583; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_quantile = __pyx_PyFloat_AsDouble(values[3]); if (unlikely((__pyx_v_quantile == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1583; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("roll_quantile", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1582; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.roll_quantile", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_input), __pyx_ptype_5numpy_ndarray, 1, "input", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1582; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_50roll_quantile(__pyx_self, __pyx_v_input, __pyx_v_win, __pyx_v_minp, __pyx_v_quantile); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5algos_50roll_quantile(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_input, int __pyx_v_win, int __pyx_v_minp, double __pyx_v_quantile) { double __pyx_v_val; double __pyx_v_prev; struct __pyx_obj_6pandas_5algos_IndexableSkiplist *__pyx_v_skiplist = 0; Py_ssize_t __pyx_v_nobs; Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_N; PyArrayObject *__pyx_v_output = 0; PyObject *__pyx_v_idx = NULL; __Pyx_LocalBuf_ND __pyx_pybuffernd_input; __Pyx_Buffer __pyx_pybuffer_input; __Pyx_LocalBuf_ND __pyx_pybuffernd_output; __Pyx_Buffer __pyx_pybuffer_output; 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; PyArrayObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; int __pyx_t_8; long __pyx_t_9; int __pyx_t_10; Py_ssize_t __pyx_t_11; Py_ssize_t __pyx_t_12; Py_ssize_t __pyx_t_13; Py_ssize_t __pyx_t_14; Py_ssize_t __pyx_t_15; __pyx_t_5numpy_double_t __pyx_t_16; Py_ssize_t __pyx_t_17; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("roll_quantile", 0); __pyx_pybuffer_output.pybuffer.buf = NULL; __pyx_pybuffer_output.refcount = 0; __pyx_pybuffernd_output.data = NULL; __pyx_pybuffernd_output.rcbuffer = &__pyx_pybuffer_output; __pyx_pybuffer_input.pybuffer.buf = NULL; __pyx_pybuffer_input.refcount = 0; __pyx_pybuffernd_input.data = NULL; __pyx_pybuffernd_input.rcbuffer = &__pyx_pybuffer_input; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_input.rcbuffer->pybuffer, (PyObject*)__pyx_v_input, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 1, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1582; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_input.diminfo[0].strides = __pyx_pybuffernd_input.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_input.diminfo[0].shape = __pyx_pybuffernd_input.rcbuffer->pybuffer.shape[0]; /* "pandas/algos.pyx":1589 * cdef double val, prev, midpoint * cdef IndexableSkiplist skiplist * cdef Py_ssize_t nobs = 0, i # <<<<<<<<<<<<<< * cdef Py_ssize_t N = len(input) * cdef ndarray[double_t] output = np.empty(N, dtype=float) */ __pyx_v_nobs = 0; /* "pandas/algos.pyx":1590 * cdef IndexableSkiplist skiplist * cdef Py_ssize_t nobs = 0, i * cdef Py_ssize_t N = len(input) # <<<<<<<<<<<<<< * cdef ndarray[double_t] output = np.empty(N, dtype=float) * */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_input)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1590; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_N = __pyx_t_1; /* "pandas/algos.pyx":1591 * cdef Py_ssize_t nobs = 0, i * cdef Py_ssize_t N = len(input) * cdef ndarray[double_t] output = np.empty(N, dtype=float) # <<<<<<<<<<<<<< * * skiplist = IndexableSkiplist(win) */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1591; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 1591; __pyx_clineno = __LINE__; goto __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_N); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1591; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1591; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1591; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_dtype, ((PyObject *)((PyObject*)(&PyFloat_Type)))) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1591; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_5 = PyObject_Call(__pyx_t_3, __pyx_t_4, __pyx_t_2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1591; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1591; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_6 = ((PyArrayObject *)__pyx_t_5); { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_output.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_nn___pyx_t_5numpy_double_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { __pyx_v_output = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_output.rcbuffer->pybuffer.buf = NULL; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1591; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } else {__pyx_pybuffernd_output.diminfo[0].strides = __pyx_pybuffernd_output.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_output.diminfo[0].shape = __pyx_pybuffernd_output.rcbuffer->pybuffer.shape[0]; } } __pyx_t_6 = 0; __pyx_v_output = ((PyArrayObject *)__pyx_t_5); __pyx_t_5 = 0; /* "pandas/algos.pyx":1593 * cdef ndarray[double_t] output = np.empty(N, dtype=float) * * skiplist = IndexableSkiplist(win) # <<<<<<<<<<<<<< * * minp = _check_minp(win, minp, N) */ __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_win); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1593; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1593; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_6pandas_5algos_IndexableSkiplist)), __pyx_t_2, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1593; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_skiplist = ((struct __pyx_obj_6pandas_5algos_IndexableSkiplist *)__pyx_t_5); __pyx_t_5 = 0; /* "pandas/algos.pyx":1595 * skiplist = IndexableSkiplist(win) * * minp = _check_minp(win, minp, N) # <<<<<<<<<<<<<< * * for i from 0 <= i < minp - 1: */ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_check_minp); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1595; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_win); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1595; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_minp); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1595; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = PyInt_FromSsize_t(__pyx_v_N); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1595; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_7 = PyTuple_New(3); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1595; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_7, 2, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_2 = 0; __pyx_t_4 = 0; __pyx_t_3 = 0; __pyx_t_3 = PyObject_Call(__pyx_t_5, __pyx_t_7, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1595; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_8 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1595; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_minp = __pyx_t_8; /* "pandas/algos.pyx":1597 * minp = _check_minp(win, minp, N) * * for i from 0 <= i < minp - 1: # <<<<<<<<<<<<<< * val = input[i] * */ __pyx_t_9 = (__pyx_v_minp - 1); for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_9; __pyx_v_i++) { /* "pandas/algos.pyx":1598 * * for i from 0 <= i < minp - 1: * val = input[i] # <<<<<<<<<<<<<< * * # Not NaN */ __pyx_t_1 = __pyx_v_i; __pyx_t_8 = -1; if (__pyx_t_1 < 0) { __pyx_t_1 += __pyx_pybuffernd_input.diminfo[0].shape; if (unlikely(__pyx_t_1 < 0)) __pyx_t_8 = 0; } else if (unlikely(__pyx_t_1 >= __pyx_pybuffernd_input.diminfo[0].shape)) __pyx_t_8 = 0; if (unlikely(__pyx_t_8 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_8); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1598; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_val = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_input.rcbuffer->pybuffer.buf, __pyx_t_1, __pyx_pybuffernd_input.diminfo[0].strides)); /* "pandas/algos.pyx":1601 * * # Not NaN * if val == val: # <<<<<<<<<<<<<< * nobs += 1 * skiplist.insert(val) */ __pyx_t_10 = ((__pyx_v_val == __pyx_v_val) != 0); if (__pyx_t_10) { /* "pandas/algos.pyx":1602 * # Not NaN * if val == val: * nobs += 1 # <<<<<<<<<<<<<< * skiplist.insert(val) * */ __pyx_v_nobs = (__pyx_v_nobs + 1); /* "pandas/algos.pyx":1603 * if val == val: * nobs += 1 * skiplist.insert(val) # <<<<<<<<<<<<<< * * output[i] = NaN */ __pyx_t_3 = ((struct __pyx_vtabstruct_6pandas_5algos_IndexableSkiplist *)__pyx_v_skiplist->__pyx_vtab)->insert(__pyx_v_skiplist, __pyx_v_val, 0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1603; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L5; } __pyx_L5:; /* "pandas/algos.pyx":1605 * skiplist.insert(val) * * output[i] = NaN # <<<<<<<<<<<<<< * * for i from minp - 1 <= i < N: */ __pyx_t_11 = __pyx_v_i; __pyx_t_8 = -1; if (__pyx_t_11 < 0) { __pyx_t_11 += __pyx_pybuffernd_output.diminfo[0].shape; if (unlikely(__pyx_t_11 < 0)) __pyx_t_8 = 0; } else if (unlikely(__pyx_t_11 >= __pyx_pybuffernd_output.diminfo[0].shape)) __pyx_t_8 = 0; if (unlikely(__pyx_t_8 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_8); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1605; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_double_t *, __pyx_pybuffernd_output.rcbuffer->pybuffer.buf, __pyx_t_11, __pyx_pybuffernd_output.diminfo[0].strides) = __pyx_v_6pandas_5algos_NaN; } /* "pandas/algos.pyx":1607 * output[i] = NaN * * for i from minp - 1 <= i < N: # <<<<<<<<<<<<<< * val = input[i] * */ __pyx_t_12 = __pyx_v_N; for (__pyx_v_i = (__pyx_v_minp - 1); __pyx_v_i < __pyx_t_12; __pyx_v_i++) { /* "pandas/algos.pyx":1608 * * for i from minp - 1 <= i < N: * val = input[i] # <<<<<<<<<<<<<< * * if i > win - 1: */ __pyx_t_13 = __pyx_v_i; __pyx_t_8 = -1; if (__pyx_t_13 < 0) { __pyx_t_13 += __pyx_pybuffernd_input.diminfo[0].shape; if (unlikely(__pyx_t_13 < 0)) __pyx_t_8 = 0; } else if (unlikely(__pyx_t_13 >= __pyx_pybuffernd_input.diminfo[0].shape)) __pyx_t_8 = 0; if (unlikely(__pyx_t_8 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_8); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1608; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_val = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_input.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_input.diminfo[0].strides)); /* "pandas/algos.pyx":1610 * val = input[i] * * if i > win - 1: # <<<<<<<<<<<<<< * prev = input[i - win] * */ __pyx_t_10 = ((__pyx_v_i > (__pyx_v_win - 1)) != 0); if (__pyx_t_10) { /* "pandas/algos.pyx":1611 * * if i > win - 1: * prev = input[i - win] # <<<<<<<<<<<<<< * * if prev == prev: */ __pyx_t_14 = (__pyx_v_i - __pyx_v_win); __pyx_t_8 = -1; if (__pyx_t_14 < 0) { __pyx_t_14 += __pyx_pybuffernd_input.diminfo[0].shape; if (unlikely(__pyx_t_14 < 0)) __pyx_t_8 = 0; } else if (unlikely(__pyx_t_14 >= __pyx_pybuffernd_input.diminfo[0].shape)) __pyx_t_8 = 0; if (unlikely(__pyx_t_8 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_8); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1611; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_prev = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_input.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_input.diminfo[0].strides)); /* "pandas/algos.pyx":1613 * prev = input[i - win] * * if prev == prev: # <<<<<<<<<<<<<< * skiplist.remove(prev) * nobs -= 1 */ __pyx_t_10 = ((__pyx_v_prev == __pyx_v_prev) != 0); if (__pyx_t_10) { /* "pandas/algos.pyx":1614 * * if prev == prev: * skiplist.remove(prev) # <<<<<<<<<<<<<< * nobs -= 1 * */ __pyx_t_3 = ((struct __pyx_vtabstruct_6pandas_5algos_IndexableSkiplist *)__pyx_v_skiplist->__pyx_vtab)->remove(__pyx_v_skiplist, __pyx_v_prev, 0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1614; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/algos.pyx":1615 * if prev == prev: * skiplist.remove(prev) * nobs -= 1 # <<<<<<<<<<<<<< * * if val == val: */ __pyx_v_nobs = (__pyx_v_nobs - 1); goto __pyx_L9; } __pyx_L9:; goto __pyx_L8; } __pyx_L8:; /* "pandas/algos.pyx":1617 * nobs -= 1 * * if val == val: # <<<<<<<<<<<<<< * nobs += 1 * skiplist.insert(val) */ __pyx_t_10 = ((__pyx_v_val == __pyx_v_val) != 0); if (__pyx_t_10) { /* "pandas/algos.pyx":1618 * * if val == val: * nobs += 1 # <<<<<<<<<<<<<< * skiplist.insert(val) * */ __pyx_v_nobs = (__pyx_v_nobs + 1); /* "pandas/algos.pyx":1619 * if val == val: * nobs += 1 * skiplist.insert(val) # <<<<<<<<<<<<<< * * if nobs >= minp: */ __pyx_t_3 = ((struct __pyx_vtabstruct_6pandas_5algos_IndexableSkiplist *)__pyx_v_skiplist->__pyx_vtab)->insert(__pyx_v_skiplist, __pyx_v_val, 0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1619; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L10; } __pyx_L10:; /* "pandas/algos.pyx":1621 * skiplist.insert(val) * * if nobs >= minp: # <<<<<<<<<<<<<< * idx = int((quantile / 1.) * (nobs - 1)) * output[i] = skiplist.get(idx) */ __pyx_t_10 = ((__pyx_v_nobs >= __pyx_v_minp) != 0); if (__pyx_t_10) { /* "pandas/algos.pyx":1622 * * if nobs >= minp: * idx = int((quantile / 1.) * (nobs - 1)) # <<<<<<<<<<<<<< * output[i] = skiplist.get(idx) * else: */ __pyx_t_3 = PyFloat_FromDouble(((__pyx_v_quantile / 1.) * (__pyx_v_nobs - 1))); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1622; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1622; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyObject_Call(((PyObject *)((PyObject*)(&PyInt_Type))), __pyx_t_7, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1622; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_XDECREF_SET(__pyx_v_idx, __pyx_t_3); __pyx_t_3 = 0; /* "pandas/algos.pyx":1623 * if nobs >= minp: * idx = int((quantile / 1.) * (nobs - 1)) * output[i] = skiplist.get(idx) # <<<<<<<<<<<<<< * else: * output[i] = NaN */ __pyx_t_15 = __Pyx_PyIndex_AsSsize_t(__pyx_v_idx); if (unlikely((__pyx_t_15 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1623; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_3 = ((struct __pyx_vtabstruct_6pandas_5algos_IndexableSkiplist *)__pyx_v_skiplist->__pyx_vtab)->get(__pyx_v_skiplist, __pyx_t_15, 0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1623; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_16 = __pyx_PyFloat_AsDouble(__pyx_t_3); if (unlikely((__pyx_t_16 == (npy_double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1623; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_15 = __pyx_v_i; __pyx_t_8 = -1; if (__pyx_t_15 < 0) { __pyx_t_15 += __pyx_pybuffernd_output.diminfo[0].shape; if (unlikely(__pyx_t_15 < 0)) __pyx_t_8 = 0; } else if (unlikely(__pyx_t_15 >= __pyx_pybuffernd_output.diminfo[0].shape)) __pyx_t_8 = 0; if (unlikely(__pyx_t_8 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_8); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1623; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_double_t *, __pyx_pybuffernd_output.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_output.diminfo[0].strides) = __pyx_t_16; goto __pyx_L11; } /*else*/ { /* "pandas/algos.pyx":1625 * output[i] = skiplist.get(idx) * else: * output[i] = NaN # <<<<<<<<<<<<<< * * return output */ __pyx_t_17 = __pyx_v_i; __pyx_t_8 = -1; if (__pyx_t_17 < 0) { __pyx_t_17 += __pyx_pybuffernd_output.diminfo[0].shape; if (unlikely(__pyx_t_17 < 0)) __pyx_t_8 = 0; } else if (unlikely(__pyx_t_17 >= __pyx_pybuffernd_output.diminfo[0].shape)) __pyx_t_8 = 0; if (unlikely(__pyx_t_8 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_8); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1625; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_double_t *, __pyx_pybuffernd_output.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_output.diminfo[0].strides) = __pyx_v_6pandas_5algos_NaN; } __pyx_L11:; } /* "pandas/algos.pyx":1627 * output[i] = NaN * * return output # <<<<<<<<<<<<<< * * def roll_generic(ndarray[float64_t, cast=True] input, int win, */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_output)); __pyx_r = ((PyObject *)__pyx_v_output); goto __pyx_L0; /* "pandas/algos.pyx":1582 * return NaN * * def roll_quantile(ndarray[float64_t, cast=True] input, int win, # <<<<<<<<<<<<<< * int minp, double quantile): * ''' */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_7); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_input.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_output.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.roll_quantile", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_input.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_output.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_skiplist); __Pyx_XDECREF((PyObject *)__pyx_v_output); __Pyx_XDECREF(__pyx_v_idx); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/algos.pyx":1629 * return output * * def roll_generic(ndarray[float64_t, cast=True] input, int win, # <<<<<<<<<<<<<< * int minp, object func): * cdef ndarray[double_t] output, counts, bufarr */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_53roll_generic(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_53roll_generic = {__Pyx_NAMESTR("roll_generic"), (PyCFunction)__pyx_pw_6pandas_5algos_53roll_generic, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_53roll_generic(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_input = 0; int __pyx_v_win; int __pyx_v_minp; PyObject *__pyx_v_func = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("roll_generic (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_input,&__pyx_n_s_win,&__pyx_n_s_minp,&__pyx_n_s_func,0}; PyObject* values[4] = {0,0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_input)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_win)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("roll_generic", 1, 4, 4, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1629; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_minp)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("roll_generic", 1, 4, 4, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1629; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_func)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("roll_generic", 1, 4, 4, 3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1629; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "roll_generic") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1629; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 4) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[3] = PyTuple_GET_ITEM(__pyx_args, 3); } __pyx_v_input = ((PyArrayObject *)values[0]); __pyx_v_win = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_win == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1629; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_minp = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_minp == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1630; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_func = values[3]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("roll_generic", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1629; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.roll_generic", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_input), __pyx_ptype_5numpy_ndarray, 1, "input", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1629; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_52roll_generic(__pyx_self, __pyx_v_input, __pyx_v_win, __pyx_v_minp, __pyx_v_func); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5algos_52roll_generic(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_input, int __pyx_v_win, int __pyx_v_minp, PyObject *__pyx_v_func) { PyArrayObject *__pyx_v_output = 0; PyArrayObject *__pyx_v_counts = 0; PyArrayObject *__pyx_v_bufarr = 0; Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_n; __pyx_t_5numpy_float64_t *__pyx_v_buf; __pyx_t_5numpy_float64_t *__pyx_v_oldbuf; __Pyx_LocalBuf_ND __pyx_pybuffernd_bufarr; __Pyx_Buffer __pyx_pybuffer_bufarr; __Pyx_LocalBuf_ND __pyx_pybuffernd_counts; __Pyx_Buffer __pyx_pybuffer_counts; __Pyx_LocalBuf_ND __pyx_pybuffernd_input; __Pyx_Buffer __pyx_pybuffer_input; __Pyx_LocalBuf_ND __pyx_pybuffernd_output; __Pyx_Buffer __pyx_pybuffer_output; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_t_3; int __pyx_t_4; PyArrayObject *__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; PyObject *__pyx_t_11 = NULL; PyObject *__pyx_t_12 = NULL; PyObject *__pyx_t_13 = NULL; PyArrayObject *__pyx_t_14 = NULL; int __pyx_t_15; __pyx_t_5numpy_double_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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("roll_generic", 0); __Pyx_INCREF((PyObject *)__pyx_v_input); __pyx_pybuffer_output.pybuffer.buf = NULL; __pyx_pybuffer_output.refcount = 0; __pyx_pybuffernd_output.data = NULL; __pyx_pybuffernd_output.rcbuffer = &__pyx_pybuffer_output; __pyx_pybuffer_counts.pybuffer.buf = NULL; __pyx_pybuffer_counts.refcount = 0; __pyx_pybuffernd_counts.data = NULL; __pyx_pybuffernd_counts.rcbuffer = &__pyx_pybuffer_counts; __pyx_pybuffer_bufarr.pybuffer.buf = NULL; __pyx_pybuffer_bufarr.refcount = 0; __pyx_pybuffernd_bufarr.data = NULL; __pyx_pybuffernd_bufarr.rcbuffer = &__pyx_pybuffer_bufarr; __pyx_pybuffer_input.pybuffer.buf = NULL; __pyx_pybuffer_input.refcount = 0; __pyx_pybuffernd_input.data = NULL; __pyx_pybuffernd_input.rcbuffer = &__pyx_pybuffer_input; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_input.rcbuffer->pybuffer, (PyObject*)__pyx_v_input, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 1, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1629; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_input.diminfo[0].strides = __pyx_pybuffernd_input.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_input.diminfo[0].shape = __pyx_pybuffernd_input.rcbuffer->pybuffer.shape[0]; /* "pandas/algos.pyx":1635 * cdef float64_t *buf, *oldbuf * * if not input.flags.c_contiguous: # <<<<<<<<<<<<<< * input = input.copy('C') * */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_input), __pyx_n_s_flags); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1635; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_c_contiguous); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1635; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1635; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_4 = ((!__pyx_t_3) != 0); if (__pyx_t_4) { /* "pandas/algos.pyx":1636 * * if not input.flags.c_contiguous: * input = input.copy('C') # <<<<<<<<<<<<<< * * buf = input.data */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_input), __pyx_n_s_copy); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1636; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = PyObject_Call(__pyx_t_2, __pyx_tuple__30, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1636; __pyx_clineno = __LINE__; goto __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_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1636; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_5 = ((PyArrayObject *)__pyx_t_1); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_input.rcbuffer->pybuffer); __pyx_t_6 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_input.rcbuffer->pybuffer, (PyObject*)__pyx_t_5, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 1, __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_input.rcbuffer->pybuffer, (PyObject*)__pyx_v_input, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 1, __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_pybuffernd_input.diminfo[0].strides = __pyx_pybuffernd_input.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_input.diminfo[0].shape = __pyx_pybuffernd_input.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1636; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_5 = 0; __Pyx_DECREF_SET(__pyx_v_input, ((PyArrayObject *)__pyx_t_1)); __pyx_t_1 = 0; goto __pyx_L3; } __pyx_L3:; /* "pandas/algos.pyx":1638 * input = input.copy('C') * * buf = input.data # <<<<<<<<<<<<<< * * n = len(input) */ __pyx_v_buf = ((__pyx_t_5numpy_float64_t *)__pyx_v_input->data); /* "pandas/algos.pyx":1640 * buf = input.data * * n = len(input) # <<<<<<<<<<<<<< * if n == 0: * return input */ __pyx_t_10 = PyObject_Length(((PyObject *)__pyx_v_input)); if (unlikely(__pyx_t_10 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1640; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_10; /* "pandas/algos.pyx":1641 * * n = len(input) * if n == 0: # <<<<<<<<<<<<<< * return input * */ __pyx_t_4 = ((__pyx_v_n == 0) != 0); if (__pyx_t_4) { /* "pandas/algos.pyx":1642 * n = len(input) * if n == 0: * return input # <<<<<<<<<<<<<< * * minp = _check_minp(win, minp, n) */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_input)); __pyx_r = ((PyObject *)__pyx_v_input); goto __pyx_L0; } /* "pandas/algos.pyx":1644 * return input * * minp = _check_minp(win, minp, n) # <<<<<<<<<<<<<< * output = np.empty(n, dtype=float) * counts = roll_sum(np.isfinite(input).astype(float), win, minp) */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_check_minp); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1644; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_win); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1644; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_11 = __Pyx_PyInt_From_int(__pyx_v_minp); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1644; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __pyx_t_12 = PyInt_FromSsize_t(__pyx_v_n); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1644; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __pyx_t_13 = PyTuple_New(3); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1644; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_13, 1, __pyx_t_11); __Pyx_GIVEREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_13, 2, __pyx_t_12); __Pyx_GIVEREF(__pyx_t_12); __pyx_t_2 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_12 = PyObject_Call(__pyx_t_1, __pyx_t_13, NULL); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1644; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_6 = __Pyx_PyInt_As_int(__pyx_t_12); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1644; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __pyx_v_minp = __pyx_t_6; /* "pandas/algos.pyx":1645 * * minp = _check_minp(win, minp, n) * output = np.empty(n, dtype=float) # <<<<<<<<<<<<<< * counts = roll_sum(np.isfinite(input).astype(float), win, minp) * */ __pyx_t_12 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1645; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_empty); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1645; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __pyx_t_12 = PyInt_FromSsize_t(__pyx_v_n); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1645; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1645; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_12); __Pyx_GIVEREF(__pyx_t_12); __pyx_t_12 = 0; __pyx_t_12 = PyDict_New(); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1645; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); if (PyDict_SetItem(__pyx_t_12, __pyx_n_s_dtype, ((PyObject *)((PyObject*)(&PyFloat_Type)))) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1645; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_11 = PyObject_Call(__pyx_t_13, __pyx_t_1, __pyx_t_12); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1645; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; if (!(likely(((__pyx_t_11) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_11, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1645; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_14 = ((PyArrayObject *)__pyx_t_11); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_output.rcbuffer->pybuffer); __pyx_t_6 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_output.rcbuffer->pybuffer, (PyObject*)__pyx_t_14, &__Pyx_TypeInfo_nn___pyx_t_5numpy_double_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 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_output.rcbuffer->pybuffer, (PyObject*)__pyx_v_output, &__Pyx_TypeInfo_nn___pyx_t_5numpy_double_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 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_pybuffernd_output.diminfo[0].strides = __pyx_pybuffernd_output.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_output.diminfo[0].shape = __pyx_pybuffernd_output.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1645; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_14 = 0; __pyx_v_output = ((PyArrayObject *)__pyx_t_11); __pyx_t_11 = 0; /* "pandas/algos.pyx":1646 * minp = _check_minp(win, minp, n) * output = np.empty(n, dtype=float) * counts = roll_sum(np.isfinite(input).astype(float), win, minp) # <<<<<<<<<<<<<< * * bufarr = np.empty(win, dtype=float) */ __pyx_t_11 = __Pyx_GetModuleGlobalName(__pyx_n_s_roll_sum); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1646; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __pyx_t_12 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1646; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_isfinite); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1646; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __pyx_t_12 = PyTuple_New(1); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1646; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __Pyx_INCREF(((PyObject *)__pyx_v_input)); PyTuple_SET_ITEM(__pyx_t_12, 0, ((PyObject *)__pyx_v_input)); __Pyx_GIVEREF(((PyObject *)__pyx_v_input)); __pyx_t_13 = PyObject_Call(__pyx_t_1, __pyx_t_12, NULL); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1646; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_13, __pyx_n_s_astype); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1646; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_13 = PyTuple_New(1); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1646; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __Pyx_INCREF(((PyObject *)((PyObject*)(&PyFloat_Type)))); PyTuple_SET_ITEM(__pyx_t_13, 0, ((PyObject *)((PyObject*)(&PyFloat_Type)))); __Pyx_GIVEREF(((PyObject *)((PyObject*)(&PyFloat_Type)))); __pyx_t_1 = PyObject_Call(__pyx_t_12, __pyx_t_13, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1646; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_13 = __Pyx_PyInt_From_int(__pyx_v_win); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1646; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __pyx_t_12 = __Pyx_PyInt_From_int(__pyx_v_minp); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1646; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1646; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_13); __Pyx_GIVEREF(__pyx_t_13); PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_t_12); __Pyx_GIVEREF(__pyx_t_12); __pyx_t_1 = 0; __pyx_t_13 = 0; __pyx_t_12 = 0; __pyx_t_12 = PyObject_Call(__pyx_t_11, __pyx_t_2, NULL); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1646; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (!(likely(((__pyx_t_12) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_12, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1646; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_14 = ((PyArrayObject *)__pyx_t_12); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_counts.rcbuffer->pybuffer); __pyx_t_6 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_counts.rcbuffer->pybuffer, (PyObject*)__pyx_t_14, &__Pyx_TypeInfo_nn___pyx_t_5numpy_double_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_counts.rcbuffer->pybuffer, (PyObject*)__pyx_v_counts, &__Pyx_TypeInfo_nn___pyx_t_5numpy_double_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_pybuffernd_counts.diminfo[0].strides = __pyx_pybuffernd_counts.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_counts.diminfo[0].shape = __pyx_pybuffernd_counts.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1646; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_14 = 0; __pyx_v_counts = ((PyArrayObject *)__pyx_t_12); __pyx_t_12 = 0; /* "pandas/algos.pyx":1648 * counts = roll_sum(np.isfinite(input).astype(float), win, minp) * * bufarr = np.empty(win, dtype=float) # <<<<<<<<<<<<<< * oldbuf = bufarr.data * */ __pyx_t_12 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1648; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_empty); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1648; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __pyx_t_12 = __Pyx_PyInt_From_int(__pyx_v_win); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1648; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __pyx_t_11 = PyTuple_New(1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1648; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_12); __Pyx_GIVEREF(__pyx_t_12); __pyx_t_12 = 0; __pyx_t_12 = PyDict_New(); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1648; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); if (PyDict_SetItem(__pyx_t_12, __pyx_n_s_dtype, ((PyObject *)((PyObject*)(&PyFloat_Type)))) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1648; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_13 = PyObject_Call(__pyx_t_2, __pyx_t_11, __pyx_t_12); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1648; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; if (!(likely(((__pyx_t_13) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_13, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1648; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_14 = ((PyArrayObject *)__pyx_t_13); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_bufarr.rcbuffer->pybuffer); __pyx_t_6 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_bufarr.rcbuffer->pybuffer, (PyObject*)__pyx_t_14, &__Pyx_TypeInfo_nn___pyx_t_5numpy_double_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_bufarr.rcbuffer->pybuffer, (PyObject*)__pyx_v_bufarr, &__Pyx_TypeInfo_nn___pyx_t_5numpy_double_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_pybuffernd_bufarr.diminfo[0].strides = __pyx_pybuffernd_bufarr.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_bufarr.diminfo[0].shape = __pyx_pybuffernd_bufarr.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1648; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_14 = 0; __pyx_v_bufarr = ((PyArrayObject *)__pyx_t_13); __pyx_t_13 = 0; /* "pandas/algos.pyx":1649 * * bufarr = np.empty(win, dtype=float) * oldbuf = bufarr.data # <<<<<<<<<<<<<< * * n = len(input) */ __pyx_v_oldbuf = ((__pyx_t_5numpy_float64_t *)__pyx_v_bufarr->data); /* "pandas/algos.pyx":1651 * oldbuf = bufarr.data * * n = len(input) # <<<<<<<<<<<<<< * for i from 0 <= i < int_min(win, n): * if counts[i] >= minp: */ __pyx_t_10 = PyObject_Length(((PyObject *)__pyx_v_input)); if (unlikely(__pyx_t_10 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1651; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_10; /* "pandas/algos.pyx":1652 * * n = len(input) * for i from 0 <= i < int_min(win, n): # <<<<<<<<<<<<<< * if counts[i] >= minp: * output[i] = func(input[int_max(i - win + 1, 0) : i + 1]) */ __pyx_t_6 = __pyx_f_6pandas_5algos_int_min(__pyx_v_win, __pyx_v_n); for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_6; __pyx_v_i++) { /* "pandas/algos.pyx":1653 * n = len(input) * for i from 0 <= i < int_min(win, n): * if counts[i] >= minp: # <<<<<<<<<<<<<< * output[i] = func(input[int_max(i - win + 1, 0) : i + 1]) * else: */ __pyx_t_10 = __pyx_v_i; __pyx_t_15 = -1; if (__pyx_t_10 < 0) { __pyx_t_10 += __pyx_pybuffernd_counts.diminfo[0].shape; if (unlikely(__pyx_t_10 < 0)) __pyx_t_15 = 0; } else if (unlikely(__pyx_t_10 >= __pyx_pybuffernd_counts.diminfo[0].shape)) __pyx_t_15 = 0; if (unlikely(__pyx_t_15 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_15); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1653; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_4 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_double_t *, __pyx_pybuffernd_counts.rcbuffer->pybuffer.buf, __pyx_t_10, __pyx_pybuffernd_counts.diminfo[0].strides)) >= __pyx_v_minp) != 0); if (__pyx_t_4) { /* "pandas/algos.pyx":1654 * for i from 0 <= i < int_min(win, n): * if counts[i] >= minp: * output[i] = func(input[int_max(i - win + 1, 0) : i + 1]) # <<<<<<<<<<<<<< * else: * output[i] = NaN */ __pyx_t_13 = __Pyx_PyObject_GetSlice(((PyObject *)__pyx_v_input), __pyx_f_6pandas_5algos_int_max(((__pyx_v_i - __pyx_v_win) + 1), 0), (__pyx_v_i + 1), NULL, NULL, NULL, 1, 1, 1); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1654; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __pyx_t_12 = PyTuple_New(1); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1654; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_13); __Pyx_GIVEREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_13 = PyObject_Call(__pyx_v_func, __pyx_t_12, NULL); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1654; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __pyx_t_16 = __pyx_PyFloat_AsDouble(__pyx_t_13); if (unlikely((__pyx_t_16 == (npy_double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1654; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_17 = __pyx_v_i; __pyx_t_15 = -1; if (__pyx_t_17 < 0) { __pyx_t_17 += __pyx_pybuffernd_output.diminfo[0].shape; if (unlikely(__pyx_t_17 < 0)) __pyx_t_15 = 0; } else if (unlikely(__pyx_t_17 >= __pyx_pybuffernd_output.diminfo[0].shape)) __pyx_t_15 = 0; if (unlikely(__pyx_t_15 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_15); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1654; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_double_t *, __pyx_pybuffernd_output.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_output.diminfo[0].strides) = __pyx_t_16; goto __pyx_L7; } /*else*/ { /* "pandas/algos.pyx":1656 * output[i] = func(input[int_max(i - win + 1, 0) : i + 1]) * else: * output[i] = NaN # <<<<<<<<<<<<<< * * for i from win <= i < n: */ __pyx_t_18 = __pyx_v_i; __pyx_t_15 = -1; if (__pyx_t_18 < 0) { __pyx_t_18 += __pyx_pybuffernd_output.diminfo[0].shape; if (unlikely(__pyx_t_18 < 0)) __pyx_t_15 = 0; } else if (unlikely(__pyx_t_18 >= __pyx_pybuffernd_output.diminfo[0].shape)) __pyx_t_15 = 0; if (unlikely(__pyx_t_15 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_15); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1656; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_double_t *, __pyx_pybuffernd_output.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_output.diminfo[0].strides) = __pyx_v_6pandas_5algos_NaN; } __pyx_L7:; } /* "pandas/algos.pyx":1658 * output[i] = NaN * * for i from win <= i < n: # <<<<<<<<<<<<<< * buf = buf + 1 * bufarr.data = buf */ __pyx_t_19 = __pyx_v_n; for (__pyx_v_i = __pyx_v_win; __pyx_v_i < __pyx_t_19; __pyx_v_i++) { /* "pandas/algos.pyx":1659 * * for i from win <= i < n: * buf = buf + 1 # <<<<<<<<<<<<<< * bufarr.data = buf * if counts[i] >= minp: */ __pyx_v_buf = (__pyx_v_buf + 1); /* "pandas/algos.pyx":1660 * for i from win <= i < n: * buf = buf + 1 * bufarr.data = buf # <<<<<<<<<<<<<< * if counts[i] >= minp: * output[i] = func(bufarr) */ __pyx_v_bufarr->data = ((char *)__pyx_v_buf); /* "pandas/algos.pyx":1661 * buf = buf + 1 * bufarr.data = buf * if counts[i] >= minp: # <<<<<<<<<<<<<< * output[i] = func(bufarr) * else: */ __pyx_t_20 = __pyx_v_i; __pyx_t_6 = -1; if (__pyx_t_20 < 0) { __pyx_t_20 += __pyx_pybuffernd_counts.diminfo[0].shape; if (unlikely(__pyx_t_20 < 0)) __pyx_t_6 = 0; } else if (unlikely(__pyx_t_20 >= __pyx_pybuffernd_counts.diminfo[0].shape)) __pyx_t_6 = 0; if (unlikely(__pyx_t_6 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_6); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1661; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_4 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_double_t *, __pyx_pybuffernd_counts.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_counts.diminfo[0].strides)) >= __pyx_v_minp) != 0); if (__pyx_t_4) { /* "pandas/algos.pyx":1662 * bufarr.data = buf * if counts[i] >= minp: * output[i] = func(bufarr) # <<<<<<<<<<<<<< * else: * output[i] = NaN */ __pyx_t_13 = PyTuple_New(1); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1662; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __Pyx_INCREF(((PyObject *)__pyx_v_bufarr)); PyTuple_SET_ITEM(__pyx_t_13, 0, ((PyObject *)__pyx_v_bufarr)); __Pyx_GIVEREF(((PyObject *)__pyx_v_bufarr)); __pyx_t_12 = PyObject_Call(__pyx_v_func, __pyx_t_13, NULL); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1662; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_16 = __pyx_PyFloat_AsDouble(__pyx_t_12); if (unlikely((__pyx_t_16 == (npy_double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1662; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __pyx_t_21 = __pyx_v_i; __pyx_t_6 = -1; if (__pyx_t_21 < 0) { __pyx_t_21 += __pyx_pybuffernd_output.diminfo[0].shape; if (unlikely(__pyx_t_21 < 0)) __pyx_t_6 = 0; } else if (unlikely(__pyx_t_21 >= __pyx_pybuffernd_output.diminfo[0].shape)) __pyx_t_6 = 0; if (unlikely(__pyx_t_6 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_6); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1662; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_double_t *, __pyx_pybuffernd_output.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_output.diminfo[0].strides) = __pyx_t_16; goto __pyx_L10; } /*else*/ { /* "pandas/algos.pyx":1664 * output[i] = func(bufarr) * else: * output[i] = NaN # <<<<<<<<<<<<<< * * bufarr.data = oldbuf */ __pyx_t_22 = __pyx_v_i; __pyx_t_6 = -1; if (__pyx_t_22 < 0) { __pyx_t_22 += __pyx_pybuffernd_output.diminfo[0].shape; if (unlikely(__pyx_t_22 < 0)) __pyx_t_6 = 0; } else if (unlikely(__pyx_t_22 >= __pyx_pybuffernd_output.diminfo[0].shape)) __pyx_t_6 = 0; if (unlikely(__pyx_t_6 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_6); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1664; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_double_t *, __pyx_pybuffernd_output.rcbuffer->pybuffer.buf, __pyx_t_22, __pyx_pybuffernd_output.diminfo[0].strides) = __pyx_v_6pandas_5algos_NaN; } __pyx_L10:; } /* "pandas/algos.pyx":1666 * output[i] = NaN * * bufarr.data = oldbuf # <<<<<<<<<<<<<< * * return output */ __pyx_v_bufarr->data = ((char *)__pyx_v_oldbuf); /* "pandas/algos.pyx":1668 * bufarr.data = oldbuf * * return output # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_output)); __pyx_r = ((PyObject *)__pyx_v_output); goto __pyx_L0; /* "pandas/algos.pyx":1629 * return output * * def roll_generic(ndarray[float64_t, cast=True] input, int win, # <<<<<<<<<<<<<< * int minp, object func): * cdef ndarray[double_t] output, counts, bufarr */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_11); __Pyx_XDECREF(__pyx_t_12); __Pyx_XDECREF(__pyx_t_13); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_bufarr.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_counts.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_input.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_output.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.roll_generic", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_bufarr.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_counts.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_input.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_output.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_output); __Pyx_XDECREF((PyObject *)__pyx_v_counts); __Pyx_XDECREF((PyObject *)__pyx_v_bufarr); __Pyx_XDECREF((PyObject *)__pyx_v_input); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/algos.pyx":1671 * * * def roll_window(ndarray[float64_t, ndim=1, cast=True] input, # <<<<<<<<<<<<<< * ndarray[float64_t, ndim=1, cast=True] weights, * int minp, bint avg=True, bint avg_wgt=False): */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_55roll_window(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6pandas_5algos_54roll_window[] = "\n Assume len(weights) << len(input)\n "; static PyMethodDef __pyx_mdef_6pandas_5algos_55roll_window = {__Pyx_NAMESTR("roll_window"), (PyCFunction)__pyx_pw_6pandas_5algos_55roll_window, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_5algos_54roll_window)}; static PyObject *__pyx_pw_6pandas_5algos_55roll_window(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_input = 0; PyArrayObject *__pyx_v_weights = 0; int __pyx_v_minp; int __pyx_v_avg; int __pyx_v_avg_wgt; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("roll_window (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_input,&__pyx_n_s_weights,&__pyx_n_s_minp,&__pyx_n_s_avg,&__pyx_n_s_avg_wgt,0}; PyObject* values[5] = {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 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_input)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_weights)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("roll_window", 0, 3, 5, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1671; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_minp)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("roll_window", 0, 3, 5, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1671; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_avg); if (value) { values[3] = value; kw_args--; } } case 4: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_avg_wgt); if (value) { values[4] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "roll_window") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1671; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_input = ((PyArrayObject *)values[0]); __pyx_v_weights = ((PyArrayObject *)values[1]); __pyx_v_minp = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_minp == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1673; __pyx_clineno = __LINE__; goto __pyx_L3_error;} if (values[3]) { __pyx_v_avg = __Pyx_PyObject_IsTrue(values[3]); if (unlikely((__pyx_v_avg == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1673; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } else { /* "pandas/algos.pyx":1673 * def roll_window(ndarray[float64_t, ndim=1, cast=True] input, * ndarray[float64_t, ndim=1, cast=True] weights, * int minp, bint avg=True, bint avg_wgt=False): # <<<<<<<<<<<<<< * """ * Assume len(weights) << len(input) */ __pyx_v_avg = ((int)1); } if (values[4]) { __pyx_v_avg_wgt = __Pyx_PyObject_IsTrue(values[4]); if (unlikely((__pyx_v_avg_wgt == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1673; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } else { __pyx_v_avg_wgt = ((int)0); } } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("roll_window", 0, 3, 5, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1671; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.roll_window", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_input), __pyx_ptype_5numpy_ndarray, 1, "input", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1671; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_weights), __pyx_ptype_5numpy_ndarray, 1, "weights", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1672; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_54roll_window(__pyx_self, __pyx_v_input, __pyx_v_weights, __pyx_v_minp, __pyx_v_avg, __pyx_v_avg_wgt); /* "pandas/algos.pyx":1671 * * * def roll_window(ndarray[float64_t, ndim=1, cast=True] input, # <<<<<<<<<<<<<< * ndarray[float64_t, ndim=1, cast=True] weights, * int minp, bint avg=True, bint avg_wgt=False): */ /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5algos_54roll_window(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_input, PyArrayObject *__pyx_v_weights, int __pyx_v_minp, int __pyx_v_avg, int __pyx_v_avg_wgt) { PyArrayObject *__pyx_v_output = 0; PyArrayObject *__pyx_v_tot_wgt = 0; PyArrayObject *__pyx_v_counts = 0; Py_ssize_t __pyx_v_in_i; Py_ssize_t __pyx_v_win_i; Py_ssize_t __pyx_v_win_n; Py_ssize_t __pyx_v_in_n; __pyx_t_5numpy_float64_t __pyx_v_val_in; __pyx_t_5numpy_float64_t __pyx_v_val_win; __pyx_t_5numpy_float64_t __pyx_v_c; __pyx_t_5numpy_float64_t __pyx_v_w; __Pyx_LocalBuf_ND __pyx_pybuffernd_counts; __Pyx_Buffer __pyx_pybuffer_counts; __Pyx_LocalBuf_ND __pyx_pybuffernd_input; __Pyx_Buffer __pyx_pybuffer_input; __Pyx_LocalBuf_ND __pyx_pybuffernd_output; __Pyx_Buffer __pyx_pybuffer_output; __Pyx_LocalBuf_ND __pyx_pybuffernd_tot_wgt; __Pyx_Buffer __pyx_pybuffer_tot_wgt; __Pyx_LocalBuf_ND __pyx_pybuffernd_weights; __Pyx_Buffer __pyx_pybuffer_weights; 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; PyArrayObject *__pyx_t_6 = NULL; int __pyx_t_7; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; int __pyx_t_11; PyObject *__pyx_t_12 = NULL; 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; 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("roll_window", 0); __pyx_pybuffer_output.pybuffer.buf = NULL; __pyx_pybuffer_output.refcount = 0; __pyx_pybuffernd_output.data = NULL; __pyx_pybuffernd_output.rcbuffer = &__pyx_pybuffer_output; __pyx_pybuffer_tot_wgt.pybuffer.buf = NULL; __pyx_pybuffer_tot_wgt.refcount = 0; __pyx_pybuffernd_tot_wgt.data = NULL; __pyx_pybuffernd_tot_wgt.rcbuffer = &__pyx_pybuffer_tot_wgt; __pyx_pybuffer_counts.pybuffer.buf = NULL; __pyx_pybuffer_counts.refcount = 0; __pyx_pybuffernd_counts.data = NULL; __pyx_pybuffernd_counts.rcbuffer = &__pyx_pybuffer_counts; __pyx_pybuffer_input.pybuffer.buf = NULL; __pyx_pybuffer_input.refcount = 0; __pyx_pybuffernd_input.data = NULL; __pyx_pybuffernd_input.rcbuffer = &__pyx_pybuffer_input; __pyx_pybuffer_weights.pybuffer.buf = NULL; __pyx_pybuffer_weights.refcount = 0; __pyx_pybuffernd_weights.data = NULL; __pyx_pybuffernd_weights.rcbuffer = &__pyx_pybuffer_weights; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_input.rcbuffer->pybuffer, (PyObject*)__pyx_v_input, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 1, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1671; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_input.diminfo[0].strides = __pyx_pybuffernd_input.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_input.diminfo[0].shape = __pyx_pybuffernd_input.rcbuffer->pybuffer.shape[0]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_weights.rcbuffer->pybuffer, (PyObject*)__pyx_v_weights, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 1, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1671; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_weights.diminfo[0].strides = __pyx_pybuffernd_weights.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_weights.diminfo[0].shape = __pyx_pybuffernd_weights.rcbuffer->pybuffer.shape[0]; /* "pandas/algos.pyx":1682 * float64_t val_in, val_win, c, w * * in_n = len(input) # <<<<<<<<<<<<<< * win_n = len(weights) * output = np.zeros(in_n, dtype=float) */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_input)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1682; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_in_n = __pyx_t_1; /* "pandas/algos.pyx":1683 * * in_n = len(input) * win_n = len(weights) # <<<<<<<<<<<<<< * output = np.zeros(in_n, dtype=float) * counts = np.zeros(in_n, dtype=float) */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_weights)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1683; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_win_n = __pyx_t_1; /* "pandas/algos.pyx":1684 * in_n = len(input) * win_n = len(weights) * output = np.zeros(in_n, dtype=float) # <<<<<<<<<<<<<< * counts = np.zeros(in_n, dtype=float) * if avg: */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1684; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_zeros); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1684; __pyx_clineno = __LINE__; goto __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_in_n); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1684; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1684; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1684; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_dtype, ((PyObject *)((PyObject*)(&PyFloat_Type)))) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1684; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_5 = PyObject_Call(__pyx_t_3, __pyx_t_4, __pyx_t_2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1684; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1684; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_6 = ((PyArrayObject *)__pyx_t_5); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_output.rcbuffer->pybuffer); __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_output.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_nn___pyx_t_5numpy_double_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_output.rcbuffer->pybuffer, (PyObject*)__pyx_v_output, &__Pyx_TypeInfo_nn___pyx_t_5numpy_double_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_pybuffernd_output.diminfo[0].strides = __pyx_pybuffernd_output.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_output.diminfo[0].shape = __pyx_pybuffernd_output.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1684; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_6 = 0; __pyx_v_output = ((PyArrayObject *)__pyx_t_5); __pyx_t_5 = 0; /* "pandas/algos.pyx":1685 * win_n = len(weights) * output = np.zeros(in_n, dtype=float) * counts = np.zeros(in_n, dtype=float) # <<<<<<<<<<<<<< * if avg: * tot_wgt = np.zeros(in_n, dtype=float) */ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1685; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_zeros); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1685; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyInt_FromSsize_t(__pyx_v_in_n); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1685; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1685; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyDict_New(); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1685; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_dtype, ((PyObject *)((PyObject*)(&PyFloat_Type)))) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1685; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_3 = PyObject_Call(__pyx_t_2, __pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1685; __pyx_clineno = __LINE__; goto __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_5); __pyx_t_5 = 0; if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1685; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_6 = ((PyArrayObject *)__pyx_t_3); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_counts.rcbuffer->pybuffer); __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_counts.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_nn___pyx_t_5numpy_double_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_counts.rcbuffer->pybuffer, (PyObject*)__pyx_v_counts, &__Pyx_TypeInfo_nn___pyx_t_5numpy_double_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_pybuffernd_counts.diminfo[0].strides = __pyx_pybuffernd_counts.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_counts.diminfo[0].shape = __pyx_pybuffernd_counts.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1685; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_6 = 0; __pyx_v_counts = ((PyArrayObject *)__pyx_t_3); __pyx_t_3 = 0; /* "pandas/algos.pyx":1686 * output = np.zeros(in_n, dtype=float) * counts = np.zeros(in_n, dtype=float) * if avg: # <<<<<<<<<<<<<< * tot_wgt = np.zeros(in_n, dtype=float) * */ __pyx_t_11 = (__pyx_v_avg != 0); if (__pyx_t_11) { /* "pandas/algos.pyx":1687 * counts = np.zeros(in_n, dtype=float) * if avg: * tot_wgt = np.zeros(in_n, dtype=float) # <<<<<<<<<<<<<< * * minp = _check_minp(len(weights), minp, in_n) */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1687; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_zeros); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1687; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyInt_FromSsize_t(__pyx_v_in_n); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1687; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1687; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1687; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dtype, ((PyObject *)((PyObject*)(&PyFloat_Type)))) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1687; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_2 = PyObject_Call(__pyx_t_5, __pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1687; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_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_filename = __pyx_f[0]; __pyx_lineno = 1687; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_6 = ((PyArrayObject *)__pyx_t_2); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tot_wgt.rcbuffer->pybuffer); __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tot_wgt.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_nn___pyx_t_5numpy_double_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_tot_wgt.rcbuffer->pybuffer, (PyObject*)__pyx_v_tot_wgt, &__Pyx_TypeInfo_nn___pyx_t_5numpy_double_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_pybuffernd_tot_wgt.diminfo[0].strides = __pyx_pybuffernd_tot_wgt.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_tot_wgt.diminfo[0].shape = __pyx_pybuffernd_tot_wgt.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1687; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_6 = 0; __pyx_v_tot_wgt = ((PyArrayObject *)__pyx_t_2); __pyx_t_2 = 0; goto __pyx_L3; } __pyx_L3:; /* "pandas/algos.pyx":1689 * tot_wgt = np.zeros(in_n, dtype=float) * * minp = _check_minp(len(weights), minp, in_n) # <<<<<<<<<<<<<< * * if avg_wgt: */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_check_minp); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1689; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_weights)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1689; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_3 = PyInt_FromSsize_t(__pyx_t_1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1689; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_minp); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1689; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = PyInt_FromSsize_t(__pyx_v_in_n); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1689; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_12 = PyTuple_New(3); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1689; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_12, 1, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_12, 2, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __pyx_t_3 = 0; __pyx_t_4 = 0; __pyx_t_5 = 0; __pyx_t_5 = PyObject_Call(__pyx_t_2, __pyx_t_12, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1689; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __pyx_t_7 = __Pyx_PyInt_As_int(__pyx_t_5); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1689; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_v_minp = __pyx_t_7; /* "pandas/algos.pyx":1691 * minp = _check_minp(len(weights), minp, in_n) * * if avg_wgt: # <<<<<<<<<<<<<< * for win_i from 0 <= win_i < win_n: * val_win = weights[win_i] */ __pyx_t_11 = (__pyx_v_avg_wgt != 0); if (__pyx_t_11) { /* "pandas/algos.pyx":1692 * * if avg_wgt: * for win_i from 0 <= win_i < win_n: # <<<<<<<<<<<<<< * val_win = weights[win_i] * if val_win != val_win: */ __pyx_t_1 = __pyx_v_win_n; for (__pyx_v_win_i = 0; __pyx_v_win_i < __pyx_t_1; __pyx_v_win_i++) { /* "pandas/algos.pyx":1693 * if avg_wgt: * for win_i from 0 <= win_i < win_n: * val_win = weights[win_i] # <<<<<<<<<<<<<< * if val_win != val_win: * continue */ __pyx_t_13 = __pyx_v_win_i; __pyx_t_7 = -1; if (__pyx_t_13 < 0) { __pyx_t_13 += __pyx_pybuffernd_weights.diminfo[0].shape; if (unlikely(__pyx_t_13 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_13 >= __pyx_pybuffernd_weights.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1693; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_val_win = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_weights.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_weights.diminfo[0].strides)); /* "pandas/algos.pyx":1694 * for win_i from 0 <= win_i < win_n: * val_win = weights[win_i] * if val_win != val_win: # <<<<<<<<<<<<<< * continue * */ __pyx_t_11 = ((__pyx_v_val_win != __pyx_v_val_win) != 0); if (__pyx_t_11) { /* "pandas/algos.pyx":1695 * val_win = weights[win_i] * if val_win != val_win: * continue # <<<<<<<<<<<<<< * * for in_i from 0 <= in_i < in_n - (win_n - win_i) + 1: */ goto __pyx_L5_continue; } /* "pandas/algos.pyx":1697 * continue * * for in_i from 0 <= in_i < in_n - (win_n - win_i) + 1: # <<<<<<<<<<<<<< * val_in = input[in_i] * if val_in == val_in: */ __pyx_t_14 = ((__pyx_v_in_n - (__pyx_v_win_n - __pyx_v_win_i)) + 1); for (__pyx_v_in_i = 0; __pyx_v_in_i < __pyx_t_14; __pyx_v_in_i++) { /* "pandas/algos.pyx":1698 * * for in_i from 0 <= in_i < in_n - (win_n - win_i) + 1: * val_in = input[in_i] # <<<<<<<<<<<<<< * if val_in == val_in: * output[in_i + (win_n - win_i) - 1] += val_in * val_win */ __pyx_t_15 = __pyx_v_in_i; __pyx_t_7 = -1; if (__pyx_t_15 < 0) { __pyx_t_15 += __pyx_pybuffernd_input.diminfo[0].shape; if (unlikely(__pyx_t_15 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_15 >= __pyx_pybuffernd_input.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1698; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_val_in = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_input.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_input.diminfo[0].strides)); /* "pandas/algos.pyx":1699 * for in_i from 0 <= in_i < in_n - (win_n - win_i) + 1: * val_in = input[in_i] * if val_in == val_in: # <<<<<<<<<<<<<< * output[in_i + (win_n - win_i) - 1] += val_in * val_win * counts[in_i + (win_n - win_i) - 1] += 1 */ __pyx_t_11 = ((__pyx_v_val_in == __pyx_v_val_in) != 0); if (__pyx_t_11) { /* "pandas/algos.pyx":1700 * val_in = input[in_i] * if val_in == val_in: * output[in_i + (win_n - win_i) - 1] += val_in * val_win # <<<<<<<<<<<<<< * counts[in_i + (win_n - win_i) - 1] += 1 * tot_wgt[in_i + (win_n - win_i) - 1] += val_win */ __pyx_t_16 = ((__pyx_v_in_i + (__pyx_v_win_n - __pyx_v_win_i)) - 1); __pyx_t_7 = -1; if (__pyx_t_16 < 0) { __pyx_t_16 += __pyx_pybuffernd_output.diminfo[0].shape; if (unlikely(__pyx_t_16 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_16 >= __pyx_pybuffernd_output.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1700; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_double_t *, __pyx_pybuffernd_output.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_output.diminfo[0].strides) += (__pyx_v_val_in * __pyx_v_val_win); /* "pandas/algos.pyx":1701 * if val_in == val_in: * output[in_i + (win_n - win_i) - 1] += val_in * val_win * counts[in_i + (win_n - win_i) - 1] += 1 # <<<<<<<<<<<<<< * tot_wgt[in_i + (win_n - win_i) - 1] += val_win * */ __pyx_t_17 = ((__pyx_v_in_i + (__pyx_v_win_n - __pyx_v_win_i)) - 1); __pyx_t_7 = -1; if (__pyx_t_17 < 0) { __pyx_t_17 += __pyx_pybuffernd_counts.diminfo[0].shape; if (unlikely(__pyx_t_17 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_17 >= __pyx_pybuffernd_counts.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1701; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_double_t *, __pyx_pybuffernd_counts.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_counts.diminfo[0].strides) += 1.0; /* "pandas/algos.pyx":1702 * output[in_i + (win_n - win_i) - 1] += val_in * val_win * counts[in_i + (win_n - win_i) - 1] += 1 * tot_wgt[in_i + (win_n - win_i) - 1] += val_win # <<<<<<<<<<<<<< * * for in_i from 0 <= in_i < in_n: */ __pyx_t_18 = ((__pyx_v_in_i + (__pyx_v_win_n - __pyx_v_win_i)) - 1); __pyx_t_7 = -1; if (__pyx_t_18 < 0) { __pyx_t_18 += __pyx_pybuffernd_tot_wgt.diminfo[0].shape; if (unlikely(__pyx_t_18 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_18 >= __pyx_pybuffernd_tot_wgt.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1702; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_double_t *, __pyx_pybuffernd_tot_wgt.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_tot_wgt.diminfo[0].strides) += __pyx_v_val_win; goto __pyx_L10; } __pyx_L10:; } __pyx_L5_continue:; } /* "pandas/algos.pyx":1704 * tot_wgt[in_i + (win_n - win_i) - 1] += val_win * * for in_i from 0 <= in_i < in_n: # <<<<<<<<<<<<<< * c = counts[in_i] * if c < minp: */ __pyx_t_1 = __pyx_v_in_n; for (__pyx_v_in_i = 0; __pyx_v_in_i < __pyx_t_1; __pyx_v_in_i++) { /* "pandas/algos.pyx":1705 * * for in_i from 0 <= in_i < in_n: * c = counts[in_i] # <<<<<<<<<<<<<< * if c < minp: * output[in_i] = NaN */ __pyx_t_14 = __pyx_v_in_i; __pyx_t_7 = -1; if (__pyx_t_14 < 0) { __pyx_t_14 += __pyx_pybuffernd_counts.diminfo[0].shape; if (unlikely(__pyx_t_14 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_14 >= __pyx_pybuffernd_counts.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1705; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_c = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_double_t *, __pyx_pybuffernd_counts.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_counts.diminfo[0].strides)); /* "pandas/algos.pyx":1706 * for in_i from 0 <= in_i < in_n: * c = counts[in_i] * if c < minp: # <<<<<<<<<<<<<< * output[in_i] = NaN * else: */ __pyx_t_11 = ((__pyx_v_c < __pyx_v_minp) != 0); if (__pyx_t_11) { /* "pandas/algos.pyx":1707 * c = counts[in_i] * if c < minp: * output[in_i] = NaN # <<<<<<<<<<<<<< * else: * w = tot_wgt[in_i] */ __pyx_t_19 = __pyx_v_in_i; __pyx_t_7 = -1; if (__pyx_t_19 < 0) { __pyx_t_19 += __pyx_pybuffernd_output.diminfo[0].shape; if (unlikely(__pyx_t_19 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_19 >= __pyx_pybuffernd_output.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1707; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_double_t *, __pyx_pybuffernd_output.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_output.diminfo[0].strides) = __pyx_v_6pandas_5algos_NaN; goto __pyx_L13; } /*else*/ { /* "pandas/algos.pyx":1709 * output[in_i] = NaN * else: * w = tot_wgt[in_i] # <<<<<<<<<<<<<< * if w == 0: * output[in_i] = NaN */ __pyx_t_20 = __pyx_v_in_i; __pyx_t_7 = -1; if (__pyx_t_20 < 0) { __pyx_t_20 += __pyx_pybuffernd_tot_wgt.diminfo[0].shape; if (unlikely(__pyx_t_20 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_20 >= __pyx_pybuffernd_tot_wgt.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1709; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_w = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_double_t *, __pyx_pybuffernd_tot_wgt.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_tot_wgt.diminfo[0].strides)); /* "pandas/algos.pyx":1710 * else: * w = tot_wgt[in_i] * if w == 0: # <<<<<<<<<<<<<< * output[in_i] = NaN * else: */ __pyx_t_11 = ((__pyx_v_w == 0.0) != 0); if (__pyx_t_11) { /* "pandas/algos.pyx":1711 * w = tot_wgt[in_i] * if w == 0: * output[in_i] = NaN # <<<<<<<<<<<<<< * else: * output[in_i] /= tot_wgt[in_i] */ __pyx_t_21 = __pyx_v_in_i; __pyx_t_7 = -1; if (__pyx_t_21 < 0) { __pyx_t_21 += __pyx_pybuffernd_output.diminfo[0].shape; if (unlikely(__pyx_t_21 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_21 >= __pyx_pybuffernd_output.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1711; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_double_t *, __pyx_pybuffernd_output.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_output.diminfo[0].strides) = __pyx_v_6pandas_5algos_NaN; goto __pyx_L14; } /*else*/ { /* "pandas/algos.pyx":1713 * output[in_i] = NaN * else: * output[in_i] /= tot_wgt[in_i] # <<<<<<<<<<<<<< * * else: */ __pyx_t_22 = __pyx_v_in_i; __pyx_t_7 = -1; if (__pyx_t_22 < 0) { __pyx_t_22 += __pyx_pybuffernd_tot_wgt.diminfo[0].shape; if (unlikely(__pyx_t_22 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_22 >= __pyx_pybuffernd_tot_wgt.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1713; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_23 = __pyx_v_in_i; __pyx_t_7 = -1; if (__pyx_t_23 < 0) { __pyx_t_23 += __pyx_pybuffernd_output.diminfo[0].shape; if (unlikely(__pyx_t_23 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_23 >= __pyx_pybuffernd_output.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1713; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_double_t *, __pyx_pybuffernd_output.rcbuffer->pybuffer.buf, __pyx_t_23, __pyx_pybuffernd_output.diminfo[0].strides) /= (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_double_t *, __pyx_pybuffernd_tot_wgt.rcbuffer->pybuffer.buf, __pyx_t_22, __pyx_pybuffernd_tot_wgt.diminfo[0].strides)); } __pyx_L14:; } __pyx_L13:; } goto __pyx_L4; } /*else*/ { /* "pandas/algos.pyx":1716 * * else: * for win_i from 0 <= win_i < win_n: # <<<<<<<<<<<<<< * val_win = weights[win_i] * if val_win != val_win: */ __pyx_t_1 = __pyx_v_win_n; for (__pyx_v_win_i = 0; __pyx_v_win_i < __pyx_t_1; __pyx_v_win_i++) { /* "pandas/algos.pyx":1717 * else: * for win_i from 0 <= win_i < win_n: * val_win = weights[win_i] # <<<<<<<<<<<<<< * if val_win != val_win: * continue */ __pyx_t_24 = __pyx_v_win_i; __pyx_t_7 = -1; if (__pyx_t_24 < 0) { __pyx_t_24 += __pyx_pybuffernd_weights.diminfo[0].shape; if (unlikely(__pyx_t_24 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_24 >= __pyx_pybuffernd_weights.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1717; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_val_win = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_weights.rcbuffer->pybuffer.buf, __pyx_t_24, __pyx_pybuffernd_weights.diminfo[0].strides)); /* "pandas/algos.pyx":1718 * for win_i from 0 <= win_i < win_n: * val_win = weights[win_i] * if val_win != val_win: # <<<<<<<<<<<<<< * continue * */ __pyx_t_11 = ((__pyx_v_val_win != __pyx_v_val_win) != 0); if (__pyx_t_11) { /* "pandas/algos.pyx":1719 * val_win = weights[win_i] * if val_win != val_win: * continue # <<<<<<<<<<<<<< * * for in_i from 0 <= in_i < in_n - (win_n - win_i) + 1: */ goto __pyx_L15_continue; } /* "pandas/algos.pyx":1721 * continue * * for in_i from 0 <= in_i < in_n - (win_n - win_i) + 1: # <<<<<<<<<<<<<< * val_in = input[in_i] * */ __pyx_t_25 = ((__pyx_v_in_n - (__pyx_v_win_n - __pyx_v_win_i)) + 1); for (__pyx_v_in_i = 0; __pyx_v_in_i < __pyx_t_25; __pyx_v_in_i++) { /* "pandas/algos.pyx":1722 * * for in_i from 0 <= in_i < in_n - (win_n - win_i) + 1: * val_in = input[in_i] # <<<<<<<<<<<<<< * * if val_in == val_in: */ __pyx_t_26 = __pyx_v_in_i; __pyx_t_7 = -1; if (__pyx_t_26 < 0) { __pyx_t_26 += __pyx_pybuffernd_input.diminfo[0].shape; if (unlikely(__pyx_t_26 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_26 >= __pyx_pybuffernd_input.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1722; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_val_in = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_input.rcbuffer->pybuffer.buf, __pyx_t_26, __pyx_pybuffernd_input.diminfo[0].strides)); /* "pandas/algos.pyx":1724 * val_in = input[in_i] * * if val_in == val_in: # <<<<<<<<<<<<<< * output[in_i + (win_n - win_i) - 1] += val_in * val_win * counts[in_i + (win_n - win_i) - 1] += 1 */ __pyx_t_11 = ((__pyx_v_val_in == __pyx_v_val_in) != 0); if (__pyx_t_11) { /* "pandas/algos.pyx":1725 * * if val_in == val_in: * output[in_i + (win_n - win_i) - 1] += val_in * val_win # <<<<<<<<<<<<<< * counts[in_i + (win_n - win_i) - 1] += 1 * */ __pyx_t_27 = ((__pyx_v_in_i + (__pyx_v_win_n - __pyx_v_win_i)) - 1); __pyx_t_7 = -1; if (__pyx_t_27 < 0) { __pyx_t_27 += __pyx_pybuffernd_output.diminfo[0].shape; if (unlikely(__pyx_t_27 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_27 >= __pyx_pybuffernd_output.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1725; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_double_t *, __pyx_pybuffernd_output.rcbuffer->pybuffer.buf, __pyx_t_27, __pyx_pybuffernd_output.diminfo[0].strides) += (__pyx_v_val_in * __pyx_v_val_win); /* "pandas/algos.pyx":1726 * if val_in == val_in: * output[in_i + (win_n - win_i) - 1] += val_in * val_win * counts[in_i + (win_n - win_i) - 1] += 1 # <<<<<<<<<<<<<< * * for in_i from 0 <= in_i < in_n: */ __pyx_t_28 = ((__pyx_v_in_i + (__pyx_v_win_n - __pyx_v_win_i)) - 1); __pyx_t_7 = -1; if (__pyx_t_28 < 0) { __pyx_t_28 += __pyx_pybuffernd_counts.diminfo[0].shape; if (unlikely(__pyx_t_28 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_28 >= __pyx_pybuffernd_counts.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1726; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_double_t *, __pyx_pybuffernd_counts.rcbuffer->pybuffer.buf, __pyx_t_28, __pyx_pybuffernd_counts.diminfo[0].strides) += 1.0; goto __pyx_L20; } __pyx_L20:; } __pyx_L15_continue:; } /* "pandas/algos.pyx":1728 * counts[in_i + (win_n - win_i) - 1] += 1 * * for in_i from 0 <= in_i < in_n: # <<<<<<<<<<<<<< * c = counts[in_i] * if c < minp: */ __pyx_t_1 = __pyx_v_in_n; for (__pyx_v_in_i = 0; __pyx_v_in_i < __pyx_t_1; __pyx_v_in_i++) { /* "pandas/algos.pyx":1729 * * for in_i from 0 <= in_i < in_n: * c = counts[in_i] # <<<<<<<<<<<<<< * if c < minp: * output[in_i] = NaN */ __pyx_t_25 = __pyx_v_in_i; __pyx_t_7 = -1; if (__pyx_t_25 < 0) { __pyx_t_25 += __pyx_pybuffernd_counts.diminfo[0].shape; if (unlikely(__pyx_t_25 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_25 >= __pyx_pybuffernd_counts.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1729; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_c = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_double_t *, __pyx_pybuffernd_counts.rcbuffer->pybuffer.buf, __pyx_t_25, __pyx_pybuffernd_counts.diminfo[0].strides)); /* "pandas/algos.pyx":1730 * for in_i from 0 <= in_i < in_n: * c = counts[in_i] * if c < minp: # <<<<<<<<<<<<<< * output[in_i] = NaN * elif avg: */ __pyx_t_11 = ((__pyx_v_c < __pyx_v_minp) != 0); if (__pyx_t_11) { /* "pandas/algos.pyx":1731 * c = counts[in_i] * if c < minp: * output[in_i] = NaN # <<<<<<<<<<<<<< * elif avg: * output[in_i] /= c */ __pyx_t_29 = __pyx_v_in_i; __pyx_t_7 = -1; if (__pyx_t_29 < 0) { __pyx_t_29 += __pyx_pybuffernd_output.diminfo[0].shape; if (unlikely(__pyx_t_29 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_29 >= __pyx_pybuffernd_output.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1731; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_double_t *, __pyx_pybuffernd_output.rcbuffer->pybuffer.buf, __pyx_t_29, __pyx_pybuffernd_output.diminfo[0].strides) = __pyx_v_6pandas_5algos_NaN; goto __pyx_L23; } /* "pandas/algos.pyx":1732 * if c < minp: * output[in_i] = NaN * elif avg: # <<<<<<<<<<<<<< * output[in_i] /= c * */ __pyx_t_11 = (__pyx_v_avg != 0); if (__pyx_t_11) { /* "pandas/algos.pyx":1733 * output[in_i] = NaN * elif avg: * output[in_i] /= c # <<<<<<<<<<<<<< * * return output */ __pyx_t_30 = __pyx_v_in_i; __pyx_t_7 = -1; if (__pyx_t_30 < 0) { __pyx_t_30 += __pyx_pybuffernd_output.diminfo[0].shape; if (unlikely(__pyx_t_30 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_30 >= __pyx_pybuffernd_output.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1733; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_double_t *, __pyx_pybuffernd_output.rcbuffer->pybuffer.buf, __pyx_t_30, __pyx_pybuffernd_output.diminfo[0].strides) /= __pyx_v_c; goto __pyx_L23; } __pyx_L23:; } } __pyx_L4:; /* "pandas/algos.pyx":1735 * output[in_i] /= c * * return output # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_output)); __pyx_r = ((PyObject *)__pyx_v_output); goto __pyx_L0; /* "pandas/algos.pyx":1671 * * * def roll_window(ndarray[float64_t, ndim=1, cast=True] input, # <<<<<<<<<<<<<< * ndarray[float64_t, ndim=1, cast=True] weights, * int minp, bint avg=True, bint avg_wgt=False): */ /* 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_12); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_counts.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_input.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_output.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tot_wgt.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_weights.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.roll_window", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_counts.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_input.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_output.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tot_wgt.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_weights.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_output); __Pyx_XDECREF((PyObject *)__pyx_v_tot_wgt); __Pyx_XDECREF((PyObject *)__pyx_v_counts); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/algos.pyx":1744 * @cython.wraparound(False) * @cython.boundscheck(False) * def is_lexsorted(list list_of_arrays): # <<<<<<<<<<<<<< * cdef: * int i */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_57is_lexsorted(PyObject *__pyx_self, PyObject *__pyx_v_list_of_arrays); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_57is_lexsorted = {__Pyx_NAMESTR("is_lexsorted"), (PyCFunction)__pyx_pw_6pandas_5algos_57is_lexsorted, METH_O, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_57is_lexsorted(PyObject *__pyx_self, PyObject *__pyx_v_list_of_arrays) { CYTHON_UNUSED int __pyx_lineno = 0; CYTHON_UNUSED const char *__pyx_filename = NULL; CYTHON_UNUSED int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("is_lexsorted (wrapper)", 0); if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_list_of_arrays), (&PyList_Type), 1, "list_of_arrays", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1744; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_56is_lexsorted(__pyx_self, ((PyObject*)__pyx_v_list_of_arrays)); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5algos_56is_lexsorted(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_list_of_arrays) { int __pyx_v_i; Py_ssize_t __pyx_v_n; Py_ssize_t __pyx_v_nlevels; __pyx_t_5numpy_int64_t __pyx_v_k; __pyx_t_5numpy_int64_t __pyx_v_cur; __pyx_t_5numpy_int64_t __pyx_v_pre; PyArrayObject *__pyx_v_arr = 0; __pyx_t_5numpy_int64_t **__pyx_v_vecs; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; PyObject *__pyx_t_2 = NULL; Py_ssize_t __pyx_t_3; int __pyx_t_4; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("is_lexsorted", 0); /* "pandas/algos.pyx":1751 * ndarray arr * * nlevels = len(list_of_arrays) # <<<<<<<<<<<<<< * n = len(list_of_arrays[0]) * */ if (unlikely(__pyx_v_list_of_arrays == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1751; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_1 = PyList_GET_SIZE(__pyx_v_list_of_arrays); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1751; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_nlevels = __pyx_t_1; /* "pandas/algos.pyx":1752 * * nlevels = len(list_of_arrays) * n = len(list_of_arrays[0]) # <<<<<<<<<<<<<< * * cdef int64_t **vecs = malloc(nlevels * sizeof(int64_t*)) */ if (unlikely(__pyx_v_list_of_arrays == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1752; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_2 = PyList_GET_ITEM(__pyx_v_list_of_arrays, 0); __Pyx_INCREF(__pyx_t_2); __pyx_t_1 = PyObject_Length(__pyx_t_2); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1752; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_n = __pyx_t_1; /* "pandas/algos.pyx":1754 * n = len(list_of_arrays[0]) * * cdef int64_t **vecs = malloc(nlevels * sizeof(int64_t*)) # <<<<<<<<<<<<<< * for i from 0 <= i < nlevels: * # vecs[i] = ( list_of_arrays[i]).data */ __pyx_v_vecs = ((__pyx_t_5numpy_int64_t **)malloc((__pyx_v_nlevels * (sizeof(__pyx_t_5numpy_int64_t *))))); /* "pandas/algos.pyx":1755 * * cdef int64_t **vecs = malloc(nlevels * sizeof(int64_t*)) * for i from 0 <= i < nlevels: # <<<<<<<<<<<<<< * # vecs[i] = ( list_of_arrays[i]).data * */ __pyx_t_1 = __pyx_v_nlevels; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_1; __pyx_v_i++) { /* "pandas/algos.pyx":1758 * # vecs[i] = ( list_of_arrays[i]).data * * arr = list_of_arrays[i] # <<<<<<<<<<<<<< * vecs[i] = arr.data * # assume uniqueness?? */ if (unlikely(__pyx_v_list_of_arrays == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1758; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } if (!(likely(((PyList_GET_ITEM(__pyx_v_list_of_arrays, __pyx_v_i)) == Py_None) || likely(__Pyx_TypeTest(PyList_GET_ITEM(__pyx_v_list_of_arrays, __pyx_v_i), __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1758; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_2 = PyList_GET_ITEM(__pyx_v_list_of_arrays, __pyx_v_i); __Pyx_INCREF(__pyx_t_2); __Pyx_XDECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_2)); __pyx_t_2 = 0; /* "pandas/algos.pyx":1759 * * arr = list_of_arrays[i] * vecs[i] = arr.data # <<<<<<<<<<<<<< * # assume uniqueness?? * */ (__pyx_v_vecs[__pyx_v_i]) = ((__pyx_t_5numpy_int64_t *)__pyx_v_arr->data); } /* "pandas/algos.pyx":1762 * # assume uniqueness?? * * for i from 1 <= i < n: # <<<<<<<<<<<<<< * for k from 0 <= k < nlevels: * cur = vecs[k][i] */ __pyx_t_1 = __pyx_v_n; for (__pyx_v_i = 1; __pyx_v_i < __pyx_t_1; __pyx_v_i++) { /* "pandas/algos.pyx":1763 * * for i from 1 <= i < n: * for k from 0 <= k < nlevels: # <<<<<<<<<<<<<< * cur = vecs[k][i] * pre = vecs[k][i-1] */ __pyx_t_3 = __pyx_v_nlevels; for (__pyx_v_k = 0; __pyx_v_k < __pyx_t_3; __pyx_v_k++) { /* "pandas/algos.pyx":1764 * for i from 1 <= i < n: * for k from 0 <= k < nlevels: * cur = vecs[k][i] # <<<<<<<<<<<<<< * pre = vecs[k][i-1] * if cur == pre: */ __pyx_v_cur = ((__pyx_v_vecs[__pyx_v_k])[__pyx_v_i]); /* "pandas/algos.pyx":1765 * for k from 0 <= k < nlevels: * cur = vecs[k][i] * pre = vecs[k][i-1] # <<<<<<<<<<<<<< * if cur == pre: * continue */ __pyx_v_pre = ((__pyx_v_vecs[__pyx_v_k])[(__pyx_v_i - 1)]); /* "pandas/algos.pyx":1766 * cur = vecs[k][i] * pre = vecs[k][i-1] * if cur == pre: # <<<<<<<<<<<<<< * continue * elif cur > pre: */ __pyx_t_4 = ((__pyx_v_cur == __pyx_v_pre) != 0); if (__pyx_t_4) { /* "pandas/algos.pyx":1767 * pre = vecs[k][i-1] * if cur == pre: * continue # <<<<<<<<<<<<<< * elif cur > pre: * break */ goto __pyx_L7_continue; } /* "pandas/algos.pyx":1768 * if cur == pre: * continue * elif cur > pre: # <<<<<<<<<<<<<< * break * else: */ __pyx_t_4 = ((__pyx_v_cur > __pyx_v_pre) != 0); if (__pyx_t_4) { /* "pandas/algos.pyx":1769 * continue * elif cur > pre: * break # <<<<<<<<<<<<<< * else: * return False */ goto __pyx_L8_break; } /*else*/ { /* "pandas/algos.pyx":1771 * break * else: * return False # <<<<<<<<<<<<<< * free(vecs) * return True */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(Py_False); __pyx_r = Py_False; goto __pyx_L0; } __pyx_L7_continue:; } __pyx_L8_break:; } /* "pandas/algos.pyx":1772 * else: * return False * free(vecs) # <<<<<<<<<<<<<< * return True * */ free(__pyx_v_vecs); /* "pandas/algos.pyx":1773 * return False * free(vecs) * return True # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(Py_True); __pyx_r = Py_True; goto __pyx_L0; /* "pandas/algos.pyx":1744 * @cython.wraparound(False) * @cython.boundscheck(False) * def is_lexsorted(list list_of_arrays): # <<<<<<<<<<<<<< * cdef: * int i */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("pandas.algos.is_lexsorted", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_arr); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/algos.pyx":1777 * * @cython.boundscheck(False) * def groupby_indices(ndarray values): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = len(values) */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_59groupby_indices(PyObject *__pyx_self, PyObject *__pyx_v_values); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_59groupby_indices = {__Pyx_NAMESTR("groupby_indices"), (PyCFunction)__pyx_pw_6pandas_5algos_59groupby_indices, METH_O, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_59groupby_indices(PyObject *__pyx_self, PyObject *__pyx_v_values) { CYTHON_UNUSED int __pyx_lineno = 0; CYTHON_UNUSED const char *__pyx_filename = NULL; CYTHON_UNUSED int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("groupby_indices (wrapper)", 0); if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1777; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_58groupby_indices(__pyx_self, ((PyArrayObject *)__pyx_v_values)); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5algos_58groupby_indices(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_n; PyArrayObject *__pyx_v_labels = 0; PyArrayObject *__pyx_v_counts = 0; PyArrayObject *__pyx_v_arr = 0; PyArrayObject *__pyx_v_seen = 0; __pyx_t_5numpy_int64_t __pyx_v_loc; PyObject *__pyx_v_ids = 0; __pyx_t_5numpy_int64_t __pyx_v_k; __pyx_t_5numpy_int64_t **__pyx_v_vecs; PyObject *__pyx_v_result = NULL; __Pyx_LocalBuf_ND __pyx_pybuffernd_arr; __Pyx_Buffer __pyx_pybuffer_arr; __Pyx_LocalBuf_ND __pyx_pybuffernd_counts; __Pyx_Buffer __pyx_pybuffer_counts; __Pyx_LocalBuf_ND __pyx_pybuffernd_labels; __Pyx_Buffer __pyx_pybuffer_labels; __Pyx_LocalBuf_ND __pyx_pybuffernd_seen; __Pyx_Buffer __pyx_pybuffer_seen; 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; PyObject *(*__pyx_t_7)(PyObject *); PyArrayObject *__pyx_t_8 = NULL; int __pyx_t_9; PyObject *__pyx_t_10 = NULL; PyObject *__pyx_t_11 = NULL; PyObject *__pyx_t_12 = NULL; Py_ssize_t __pyx_t_13; Py_ssize_t __pyx_t_14; int __pyx_t_15; __pyx_t_5numpy_int64_t __pyx_t_16; __pyx_t_5numpy_int64_t __pyx_t_17; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("groupby_indices", 0); __pyx_pybuffer_labels.pybuffer.buf = NULL; __pyx_pybuffer_labels.refcount = 0; __pyx_pybuffernd_labels.data = NULL; __pyx_pybuffernd_labels.rcbuffer = &__pyx_pybuffer_labels; __pyx_pybuffer_counts.pybuffer.buf = NULL; __pyx_pybuffer_counts.refcount = 0; __pyx_pybuffernd_counts.data = NULL; __pyx_pybuffernd_counts.rcbuffer = &__pyx_pybuffer_counts; __pyx_pybuffer_arr.pybuffer.buf = NULL; __pyx_pybuffer_arr.refcount = 0; __pyx_pybuffernd_arr.data = NULL; __pyx_pybuffernd_arr.rcbuffer = &__pyx_pybuffer_arr; __pyx_pybuffer_seen.pybuffer.buf = NULL; __pyx_pybuffer_seen.refcount = 0; __pyx_pybuffernd_seen.data = NULL; __pyx_pybuffernd_seen.rcbuffer = &__pyx_pybuffer_seen; /* "pandas/algos.pyx":1779 * def groupby_indices(ndarray values): * cdef: * Py_ssize_t i, n = len(values) # <<<<<<<<<<<<<< * ndarray[int64_t] labels, counts, arr, seen * int64_t loc */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1779; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/algos.pyx":1782 * ndarray[int64_t] labels, counts, arr, seen * int64_t loc * dict ids = {} # <<<<<<<<<<<<<< * object val * int64_t k */ __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1782; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_v_ids = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; /* "pandas/algos.pyx":1786 * int64_t k * * ids, labels, counts = group_labels(values) # <<<<<<<<<<<<<< * seen = np.zeros_like(counts) * */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_group_labels); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1786; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1786; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(((PyObject *)__pyx_v_values)); PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_v_values)); __Pyx_GIVEREF(((PyObject *)__pyx_v_values)); __pyx_t_4 = PyObject_Call(__pyx_t_2, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1786; __pyx_clineno = __LINE__; goto __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; if ((likely(PyTuple_CheckExact(__pyx_t_4))) || (PyList_CheckExact(__pyx_t_4))) { PyObject* sequence = __pyx_t_4; #if CYTHON_COMPILING_IN_CPYTHON Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 3)) { if (size > 3) __Pyx_RaiseTooManyValuesError(3); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1786; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_2 = PyTuple_GET_ITEM(sequence, 1); __pyx_t_5 = PyTuple_GET_ITEM(sequence, 2); } else { __pyx_t_3 = PyList_GET_ITEM(sequence, 0); __pyx_t_2 = PyList_GET_ITEM(sequence, 1); __pyx_t_5 = PyList_GET_ITEM(sequence, 2); } __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(__pyx_t_5); #else __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1786; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1786; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1786; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); #endif __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else { Py_ssize_t index = -1; __pyx_t_6 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1786; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_7 = Py_TYPE(__pyx_t_6)->tp_iternext; index = 0; __pyx_t_3 = __pyx_t_7(__pyx_t_6); if (unlikely(!__pyx_t_3)) goto __pyx_L3_unpacking_failed; __Pyx_GOTREF(__pyx_t_3); index = 1; __pyx_t_2 = __pyx_t_7(__pyx_t_6); if (unlikely(!__pyx_t_2)) goto __pyx_L3_unpacking_failed; __Pyx_GOTREF(__pyx_t_2); index = 2; __pyx_t_5 = __pyx_t_7(__pyx_t_6); if (unlikely(!__pyx_t_5)) goto __pyx_L3_unpacking_failed; __Pyx_GOTREF(__pyx_t_5); if (__Pyx_IternextUnpackEndCheck(__pyx_t_7(__pyx_t_6), 3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1786; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_7 = NULL; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; goto __pyx_L4_unpacking_done; __pyx_L3_unpacking_failed:; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_7 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1786; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_L4_unpacking_done:; } if (!(likely(PyDict_CheckExact(__pyx_t_3))||((__pyx_t_3) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_t_3)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1786; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1786; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1786; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF_SET(__pyx_v_ids, ((PyObject*)__pyx_t_3)); __pyx_t_3 = 0; __pyx_t_8 = ((PyArrayObject *)__pyx_t_2); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_labels.rcbuffer->pybuffer); __pyx_t_9 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_labels.rcbuffer->pybuffer, (PyObject*)__pyx_t_8, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_9 < 0)) { PyErr_Fetch(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_labels.rcbuffer->pybuffer, (PyObject*)__pyx_v_labels, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_11); Py_XDECREF(__pyx_t_12); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_10, __pyx_t_11, __pyx_t_12); } } __pyx_pybuffernd_labels.diminfo[0].strides = __pyx_pybuffernd_labels.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_labels.diminfo[0].shape = __pyx_pybuffernd_labels.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1786; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_8 = 0; __pyx_v_labels = ((PyArrayObject *)__pyx_t_2); __pyx_t_2 = 0; __pyx_t_8 = ((PyArrayObject *)__pyx_t_5); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_counts.rcbuffer->pybuffer); __pyx_t_9 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_counts.rcbuffer->pybuffer, (PyObject*)__pyx_t_8, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_9 < 0)) { PyErr_Fetch(&__pyx_t_12, &__pyx_t_11, &__pyx_t_10); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_counts.rcbuffer->pybuffer, (PyObject*)__pyx_v_counts, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_12); Py_XDECREF(__pyx_t_11); Py_XDECREF(__pyx_t_10); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_12, __pyx_t_11, __pyx_t_10); } } __pyx_pybuffernd_counts.diminfo[0].strides = __pyx_pybuffernd_counts.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_counts.diminfo[0].shape = __pyx_pybuffernd_counts.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1786; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_8 = 0; __pyx_v_counts = ((PyArrayObject *)__pyx_t_5); __pyx_t_5 = 0; /* "pandas/algos.pyx":1787 * * ids, labels, counts = group_labels(values) * seen = np.zeros_like(counts) # <<<<<<<<<<<<<< * * # try not to get in trouble here... */ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1787; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_zeros_like); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1787; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1787; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(((PyObject *)__pyx_v_counts)); PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_v_counts)); __Pyx_GIVEREF(((PyObject *)__pyx_v_counts)); __pyx_t_2 = PyObject_Call(__pyx_t_5, __pyx_t_4, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1787; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1787; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_8 = ((PyArrayObject *)__pyx_t_2); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_seen.rcbuffer->pybuffer); __pyx_t_9 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_seen.rcbuffer->pybuffer, (PyObject*)__pyx_t_8, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_9 < 0)) { PyErr_Fetch(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_seen.rcbuffer->pybuffer, (PyObject*)__pyx_v_seen, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_11); Py_XDECREF(__pyx_t_12); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_10, __pyx_t_11, __pyx_t_12); } } __pyx_pybuffernd_seen.diminfo[0].strides = __pyx_pybuffernd_seen.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_seen.diminfo[0].shape = __pyx_pybuffernd_seen.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1787; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_8 = 0; __pyx_v_seen = ((PyArrayObject *)__pyx_t_2); __pyx_t_2 = 0; /* "pandas/algos.pyx":1790 * * # try not to get in trouble here... * cdef int64_t **vecs = malloc(len(ids) * sizeof(int64_t*)) # <<<<<<<<<<<<<< * result = {} * for i from 0 <= i < len(counts): */ if (unlikely(__pyx_v_ids == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1790; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_1 = PyDict_Size(__pyx_v_ids); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1790; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_vecs = ((__pyx_t_5numpy_int64_t **)malloc((__pyx_t_1 * (sizeof(__pyx_t_5numpy_int64_t *))))); /* "pandas/algos.pyx":1791 * # try not to get in trouble here... * cdef int64_t **vecs = malloc(len(ids) * sizeof(int64_t*)) * result = {} # <<<<<<<<<<<<<< * for i from 0 <= i < len(counts): * arr = np.empty(counts[i], dtype=np.int64) */ __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1791; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_v_result = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; /* "pandas/algos.pyx":1792 * cdef int64_t **vecs = malloc(len(ids) * sizeof(int64_t*)) * result = {} * for i from 0 <= i < len(counts): # <<<<<<<<<<<<<< * arr = np.empty(counts[i], dtype=np.int64) * result[ids[i]] = arr */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_counts)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1792; __pyx_clineno = __LINE__; goto __pyx_L1_error;} for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_1; __pyx_v_i++) { /* "pandas/algos.pyx":1793 * result = {} * for i from 0 <= i < len(counts): * arr = np.empty(counts[i], dtype=np.int64) # <<<<<<<<<<<<<< * result[ids[i]] = arr * vecs[i] = arr.data */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1793; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_empty); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1793; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_13 = __pyx_v_i; if (__pyx_t_13 < 0) __pyx_t_13 += __pyx_pybuffernd_counts.diminfo[0].shape; __pyx_t_2 = __Pyx_PyInt_From_npy_int64((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_counts.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_counts.diminfo[0].strides))); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1793; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1793; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1793; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1793; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_int64); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1793; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_dtype, __pyx_t_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1793; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyObject_Call(__pyx_t_4, __pyx_t_5, __pyx_t_2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1793; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1793; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_8 = ((PyArrayObject *)__pyx_t_6); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_arr.rcbuffer->pybuffer); __pyx_t_9 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_arr.rcbuffer->pybuffer, (PyObject*)__pyx_t_8, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_9 < 0)) { PyErr_Fetch(&__pyx_t_12, &__pyx_t_11, &__pyx_t_10); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_arr.rcbuffer->pybuffer, (PyObject*)__pyx_v_arr, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_12); Py_XDECREF(__pyx_t_11); Py_XDECREF(__pyx_t_10); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_12, __pyx_t_11, __pyx_t_10); } } __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]; if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1793; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_8 = 0; __Pyx_XDECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_6)); __pyx_t_6 = 0; /* "pandas/algos.pyx":1794 * for i from 0 <= i < len(counts): * arr = np.empty(counts[i], dtype=np.int64) * result[ids[i]] = arr # <<<<<<<<<<<<<< * vecs[i] = arr.data * */ if (unlikely(__pyx_v_ids == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1794; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_6 = PyInt_FromSsize_t(__pyx_v_i); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1794; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_2 = __Pyx_PyDict_GetItem(__pyx_v_ids, __pyx_t_6); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1794; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(PyDict_SetItem(__pyx_v_result, __pyx_t_2, ((PyObject *)__pyx_v_arr)) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1794; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/algos.pyx":1795 * arr = np.empty(counts[i], dtype=np.int64) * result[ids[i]] = arr * vecs[i] = arr.data # <<<<<<<<<<<<<< * * for i from 0 <= i < n: */ (__pyx_v_vecs[__pyx_v_i]) = ((__pyx_t_5numpy_int64_t *)__pyx_v_arr->data); } /* "pandas/algos.pyx":1797 * vecs[i] = arr.data * * for i from 0 <= i < n: # <<<<<<<<<<<<<< * k = labels[i] * */ __pyx_t_1 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_1; __pyx_v_i++) { /* "pandas/algos.pyx":1798 * * for i from 0 <= i < n: * k = labels[i] # <<<<<<<<<<<<<< * * # was NaN */ __pyx_t_14 = __pyx_v_i; if (__pyx_t_14 < 0) __pyx_t_14 += __pyx_pybuffernd_labels.diminfo[0].shape; __pyx_v_k = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_labels.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_labels.diminfo[0].strides)); /* "pandas/algos.pyx":1801 * * # was NaN * if k == -1: # <<<<<<<<<<<<<< * continue * */ __pyx_t_15 = ((__pyx_v_k == -1) != 0); if (__pyx_t_15) { /* "pandas/algos.pyx":1802 * # was NaN * if k == -1: * continue # <<<<<<<<<<<<<< * * loc = seen[k] */ goto __pyx_L7_continue; } /* "pandas/algos.pyx":1804 * continue * * loc = seen[k] # <<<<<<<<<<<<<< * vecs[k][loc] = i * seen[k] = loc + 1 */ __pyx_t_16 = __pyx_v_k; if (__pyx_t_16 < 0) __pyx_t_16 += __pyx_pybuffernd_seen.diminfo[0].shape; __pyx_v_loc = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_seen.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_seen.diminfo[0].strides)); /* "pandas/algos.pyx":1805 * * loc = seen[k] * vecs[k][loc] = i # <<<<<<<<<<<<<< * seen[k] = loc + 1 * */ ((__pyx_v_vecs[__pyx_v_k])[__pyx_v_loc]) = __pyx_v_i; /* "pandas/algos.pyx":1806 * loc = seen[k] * vecs[k][loc] = i * seen[k] = loc + 1 # <<<<<<<<<<<<<< * * free(vecs) */ __pyx_t_17 = __pyx_v_k; if (__pyx_t_17 < 0) __pyx_t_17 += __pyx_pybuffernd_seen.diminfo[0].shape; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_seen.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_seen.diminfo[0].strides) = (__pyx_v_loc + 1); __pyx_L7_continue:; } /* "pandas/algos.pyx":1808 * seen[k] = loc + 1 * * free(vecs) # <<<<<<<<<<<<<< * * return result */ free(__pyx_v_vecs); /* "pandas/algos.pyx":1810 * free(vecs) * * return result # <<<<<<<<<<<<<< * * @cython.wraparound(False) */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_result); __pyx_r = __pyx_v_result; goto __pyx_L0; /* "pandas/algos.pyx":1777 * * @cython.boundscheck(False) * def groupby_indices(ndarray values): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = len(values) */ /* 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_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_arr.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_counts.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_labels.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_seen.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.groupby_indices", __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_counts.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_labels.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_seen.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_labels); __Pyx_XDECREF((PyObject *)__pyx_v_counts); __Pyx_XDECREF((PyObject *)__pyx_v_arr); __Pyx_XDECREF((PyObject *)__pyx_v_seen); __Pyx_XDECREF(__pyx_v_ids); __Pyx_XDECREF(__pyx_v_result); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/algos.pyx":1814 * @cython.wraparound(False) * @cython.boundscheck(False) * def group_labels(ndarray[object] values): # <<<<<<<<<<<<<< * ''' * Compute label vector from input values and associated useful data */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_61group_labels(PyObject *__pyx_self, PyObject *__pyx_v_values); /*proto*/ static char __pyx_doc_6pandas_5algos_60group_labels[] = "\n Compute label vector from input values and associated useful data\n\n Returns\n -------\n "; static PyMethodDef __pyx_mdef_6pandas_5algos_61group_labels = {__Pyx_NAMESTR("group_labels"), (PyCFunction)__pyx_pw_6pandas_5algos_61group_labels, METH_O, __Pyx_DOCSTR(__pyx_doc_6pandas_5algos_60group_labels)}; static PyObject *__pyx_pw_6pandas_5algos_61group_labels(PyObject *__pyx_self, PyObject *__pyx_v_values) { CYTHON_UNUSED int __pyx_lineno = 0; CYTHON_UNUSED const char *__pyx_filename = NULL; CYTHON_UNUSED int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("group_labels (wrapper)", 0); if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1814; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_60group_labels(__pyx_self, ((PyArrayObject *)__pyx_v_values)); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5algos_60group_labels(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_n; PyArrayObject *__pyx_v_labels = 0; PyArrayObject *__pyx_v_counts = 0; PyObject *__pyx_v_ids = 0; PyObject *__pyx_v_reverse = 0; __pyx_t_5numpy_int64_t __pyx_v_idx; PyObject *__pyx_v_val = 0; __pyx_t_5numpy_int64_t __pyx_v_count; __Pyx_LocalBuf_ND __pyx_pybuffernd_counts; __Pyx_Buffer __pyx_pybuffer_counts; __Pyx_LocalBuf_ND __pyx_pybuffernd_labels; __Pyx_Buffer __pyx_pybuffer_labels; __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; PyArrayObject *__pyx_t_8 = NULL; Py_ssize_t __pyx_t_9; int __pyx_t_10; Py_ssize_t __pyx_t_11; int __pyx_t_12; __pyx_t_5numpy_int64_t __pyx_t_13; Py_ssize_t __pyx_t_14; __pyx_t_5numpy_int64_t __pyx_t_15; Py_ssize_t __pyx_t_16; __pyx_t_5numpy_int64_t __pyx_t_17; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("group_labels", 0); __pyx_pybuffer_labels.pybuffer.buf = NULL; __pyx_pybuffer_labels.refcount = 0; __pyx_pybuffernd_labels.data = NULL; __pyx_pybuffernd_labels.rcbuffer = &__pyx_pybuffer_labels; __pyx_pybuffer_counts.pybuffer.buf = NULL; __pyx_pybuffer_counts.refcount = 0; __pyx_pybuffernd_counts.data = NULL; __pyx_pybuffernd_counts.rcbuffer = &__pyx_pybuffer_counts; __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_filename = __pyx_f[0]; __pyx_lineno = 1814; __pyx_clineno = __LINE__; goto __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/algos.pyx":1822 * ''' * cdef: * Py_ssize_t i, n = len(values) # <<<<<<<<<<<<<< * ndarray[int64_t] labels = np.empty(n, dtype=np.int64) * ndarray[int64_t] counts = np.empty(n, dtype=np.int64) */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1822; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/algos.pyx":1823 * cdef: * Py_ssize_t i, n = len(values) * ndarray[int64_t] labels = np.empty(n, dtype=np.int64) # <<<<<<<<<<<<<< * ndarray[int64_t] counts = np.empty(n, dtype=np.int64) * dict ids = {}, reverse = {} */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1823; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 1823; __pyx_clineno = __LINE__; goto __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_n); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1823; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1823; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1823; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1823; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_int64); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1823; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 1823; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyObject_Call(__pyx_t_3, __pyx_t_4, __pyx_t_2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1823; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 1823; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_7 = ((PyArrayObject *)__pyx_t_6); { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_labels.rcbuffer->pybuffer, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { __pyx_v_labels = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_labels.rcbuffer->pybuffer.buf = NULL; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1823; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } else {__pyx_pybuffernd_labels.diminfo[0].strides = __pyx_pybuffernd_labels.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_labels.diminfo[0].shape = __pyx_pybuffernd_labels.rcbuffer->pybuffer.shape[0]; } } __pyx_t_7 = 0; __pyx_v_labels = ((PyArrayObject *)__pyx_t_6); __pyx_t_6 = 0; /* "pandas/algos.pyx":1824 * Py_ssize_t i, n = len(values) * ndarray[int64_t] labels = np.empty(n, dtype=np.int64) * ndarray[int64_t] counts = np.empty(n, dtype=np.int64) # <<<<<<<<<<<<<< * dict ids = {}, reverse = {} * int64_t idx */ __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1824; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_empty); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1824; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyInt_FromSsize_t(__pyx_v_n); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1824; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1824; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyDict_New(); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1824; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1824; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_int64); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1824; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_dtype, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1824; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyObject_Call(__pyx_t_2, __pyx_t_4, __pyx_t_6); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1824; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1824; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_8 = ((PyArrayObject *)__pyx_t_5); { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_counts.rcbuffer->pybuffer, (PyObject*)__pyx_t_8, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { __pyx_v_counts = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_counts.rcbuffer->pybuffer.buf = NULL; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1824; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } else {__pyx_pybuffernd_counts.diminfo[0].strides = __pyx_pybuffernd_counts.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_counts.diminfo[0].shape = __pyx_pybuffernd_counts.rcbuffer->pybuffer.shape[0]; } } __pyx_t_8 = 0; __pyx_v_counts = ((PyArrayObject *)__pyx_t_5); __pyx_t_5 = 0; /* "pandas/algos.pyx":1825 * ndarray[int64_t] labels = np.empty(n, dtype=np.int64) * ndarray[int64_t] counts = np.empty(n, dtype=np.int64) * dict ids = {}, reverse = {} # <<<<<<<<<<<<<< * int64_t idx * object val */ __pyx_t_5 = PyDict_New(); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1825; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_v_ids = ((PyObject*)__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyDict_New(); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1825; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_v_reverse = ((PyObject*)__pyx_t_5); __pyx_t_5 = 0; /* "pandas/algos.pyx":1828 * int64_t idx * object val * int64_t count = 0 # <<<<<<<<<<<<<< * * for i from 0 <= i < n: */ __pyx_v_count = 0; /* "pandas/algos.pyx":1830 * int64_t count = 0 * * for i from 0 <= i < n: # <<<<<<<<<<<<<< * val = values[i] * */ __pyx_t_1 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_1; __pyx_v_i++) { /* "pandas/algos.pyx":1831 * * for i from 0 <= i < n: * val = values[i] # <<<<<<<<<<<<<< * * # is NaN */ __pyx_t_9 = __pyx_v_i; __pyx_t_5 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_9, __pyx_pybuffernd_values.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_5); __Pyx_XDECREF_SET(__pyx_v_val, __pyx_t_5); __pyx_t_5 = 0; /* "pandas/algos.pyx":1834 * * # is NaN * if val != val: # <<<<<<<<<<<<<< * labels[i] = -1 * continue */ __pyx_t_5 = PyObject_RichCompare(__pyx_v_val, __pyx_v_val, Py_NE); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1834; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1834; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_10) { /* "pandas/algos.pyx":1835 * # is NaN * if val != val: * labels[i] = -1 # <<<<<<<<<<<<<< * continue * */ __pyx_t_11 = __pyx_v_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_labels.rcbuffer->pybuffer.buf, __pyx_t_11, __pyx_pybuffernd_labels.diminfo[0].strides) = -1; /* "pandas/algos.pyx":1836 * if val != val: * labels[i] = -1 * continue # <<<<<<<<<<<<<< * * # for large number of groups, not doing try: except: makes a big */ goto __pyx_L3_continue; } /* "pandas/algos.pyx":1840 * # for large number of groups, not doing try: except: makes a big * # difference * if val in ids: # <<<<<<<<<<<<<< * idx = ids[val] * labels[i] = idx */ __pyx_t_10 = (__Pyx_PyDict_Contains(__pyx_v_val, __pyx_v_ids, Py_EQ)); if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1840; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_12 = (__pyx_t_10 != 0); if (__pyx_t_12) { /* "pandas/algos.pyx":1841 * # difference * if val in ids: * idx = ids[val] # <<<<<<<<<<<<<< * labels[i] = idx * counts[idx] = counts[idx] + 1 */ __pyx_t_5 = __Pyx_PyDict_GetItem(__pyx_v_ids, __pyx_v_val); if (unlikely(__pyx_t_5 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1841; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_5); __pyx_t_13 = __Pyx_PyInt_As_npy_int64(__pyx_t_5); if (unlikely((__pyx_t_13 == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1841; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_v_idx = __pyx_t_13; /* "pandas/algos.pyx":1842 * if val in ids: * idx = ids[val] * labels[i] = idx # <<<<<<<<<<<<<< * counts[idx] = counts[idx] + 1 * else: */ __pyx_t_14 = __pyx_v_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_labels.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_labels.diminfo[0].strides) = __pyx_v_idx; /* "pandas/algos.pyx":1843 * idx = ids[val] * labels[i] = idx * counts[idx] = counts[idx] + 1 # <<<<<<<<<<<<<< * else: * ids[val] = count */ __pyx_t_13 = __pyx_v_idx; __pyx_t_15 = __pyx_v_idx; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_counts.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_counts.diminfo[0].strides) = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_counts.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_counts.diminfo[0].strides)) + 1); goto __pyx_L6; } /*else*/ { /* "pandas/algos.pyx":1845 * counts[idx] = counts[idx] + 1 * else: * ids[val] = count # <<<<<<<<<<<<<< * reverse[count] = val * labels[i] = count */ __pyx_t_5 = __Pyx_PyInt_From_npy_int64(__pyx_v_count); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1845; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); if (unlikely(PyDict_SetItem(__pyx_v_ids, __pyx_v_val, __pyx_t_5) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1845; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "pandas/algos.pyx":1846 * else: * ids[val] = count * reverse[count] = val # <<<<<<<<<<<<<< * labels[i] = count * counts[count] = 1 */ __pyx_t_5 = __Pyx_PyInt_From_npy_int64(__pyx_v_count); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1846; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); if (unlikely(PyDict_SetItem(__pyx_v_reverse, __pyx_t_5, __pyx_v_val) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1846; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "pandas/algos.pyx":1847 * ids[val] = count * reverse[count] = val * labels[i] = count # <<<<<<<<<<<<<< * counts[count] = 1 * count += 1 */ __pyx_t_16 = __pyx_v_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_labels.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_labels.diminfo[0].strides) = __pyx_v_count; /* "pandas/algos.pyx":1848 * reverse[count] = val * labels[i] = count * counts[count] = 1 # <<<<<<<<<<<<<< * count += 1 * */ __pyx_t_17 = __pyx_v_count; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_counts.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_counts.diminfo[0].strides) = 1; /* "pandas/algos.pyx":1849 * labels[i] = count * counts[count] = 1 * count += 1 # <<<<<<<<<<<<<< * * return reverse, labels, counts[:count].copy() */ __pyx_v_count = (__pyx_v_count + 1); } __pyx_L6:; __pyx_L3_continue:; } /* "pandas/algos.pyx":1851 * count += 1 * * return reverse, labels, counts[:count].copy() # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_5 = __Pyx_PyObject_GetSlice(((PyObject *)__pyx_v_counts), 0, __pyx_v_count, NULL, NULL, NULL, 0, 1, 0); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1851; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_copy); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1851; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyObject_Call(__pyx_t_6, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1851; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1851; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(__pyx_v_reverse); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_reverse); __Pyx_GIVEREF(__pyx_v_reverse); __Pyx_INCREF(((PyObject *)__pyx_v_labels)); PyTuple_SET_ITEM(__pyx_t_6, 1, ((PyObject *)__pyx_v_labels)); __Pyx_GIVEREF(((PyObject *)__pyx_v_labels)); PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_r = __pyx_t_6; __pyx_t_6 = 0; goto __pyx_L0; /* "pandas/algos.pyx":1814 * @cython.wraparound(False) * @cython.boundscheck(False) * def group_labels(ndarray[object] values): # <<<<<<<<<<<<<< * ''' * Compute label vector from input values and associated useful data */ /* 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_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_counts.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_labels.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.group_labels", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_counts.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_labels.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_labels); __Pyx_XDECREF((PyObject *)__pyx_v_counts); __Pyx_XDECREF(__pyx_v_ids); __Pyx_XDECREF(__pyx_v_reverse); __Pyx_XDECREF(__pyx_v_val); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/algos.pyx":1856 * @cython.boundscheck(False) * @cython.wraparound(False) * def groupsort_indexer(ndarray[int64_t] index, Py_ssize_t ngroups): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, loc, label, n */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_63groupsort_indexer(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_63groupsort_indexer = {__Pyx_NAMESTR("groupsort_indexer"), (PyCFunction)__pyx_pw_6pandas_5algos_63groupsort_indexer, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_63groupsort_indexer(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_index = 0; Py_ssize_t __pyx_v_ngroups; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("groupsort_indexer (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_index,&__pyx_n_s_ngroups,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_index)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ngroups)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("groupsort_indexer", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1856; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "groupsort_indexer") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1856; __pyx_clineno = __LINE__; goto __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_index = ((PyArrayObject *)values[0]); __pyx_v_ngroups = __Pyx_PyIndex_AsSsize_t(values[1]); if (unlikely((__pyx_v_ngroups == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1856; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("groupsort_indexer", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1856; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.groupsort_indexer", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_index), __pyx_ptype_5numpy_ndarray, 1, "index", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1856; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_62groupsort_indexer(__pyx_self, __pyx_v_index, __pyx_v_ngroups); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5algos_62groupsort_indexer(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_index, Py_ssize_t __pyx_v_ngroups) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_label; Py_ssize_t __pyx_v_n; PyArrayObject *__pyx_v_counts = 0; PyArrayObject *__pyx_v_where = 0; PyArrayObject *__pyx_v_result = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_counts; __Pyx_Buffer __pyx_pybuffer_counts; __Pyx_LocalBuf_ND __pyx_pybuffernd_index; __Pyx_Buffer __pyx_pybuffer_index; __Pyx_LocalBuf_ND __pyx_pybuffernd_result; __Pyx_Buffer __pyx_pybuffer_result; __Pyx_LocalBuf_ND __pyx_pybuffernd_where; __Pyx_Buffer __pyx_pybuffer_where; 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; Py_ssize_t __pyx_t_11; Py_ssize_t __pyx_t_12; __pyx_t_5numpy_int64_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; __pyx_t_5numpy_int64_t __pyx_t_19; Py_ssize_t __pyx_t_20; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("groupsort_indexer", 0); __pyx_pybuffer_counts.pybuffer.buf = NULL; __pyx_pybuffer_counts.refcount = 0; __pyx_pybuffernd_counts.data = NULL; __pyx_pybuffernd_counts.rcbuffer = &__pyx_pybuffer_counts; __pyx_pybuffer_where.pybuffer.buf = NULL; __pyx_pybuffer_where.refcount = 0; __pyx_pybuffernd_where.data = NULL; __pyx_pybuffernd_where.rcbuffer = &__pyx_pybuffer_where; __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_index.pybuffer.buf = NULL; __pyx_pybuffer_index.refcount = 0; __pyx_pybuffernd_index.data = NULL; __pyx_pybuffernd_index.rcbuffer = &__pyx_pybuffer_index; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_index.rcbuffer->pybuffer, (PyObject*)__pyx_v_index, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1856; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_index.diminfo[0].strides = __pyx_pybuffernd_index.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_index.diminfo[0].shape = __pyx_pybuffernd_index.rcbuffer->pybuffer.shape[0]; /* "pandas/algos.pyx":1862 * * # count group sizes, location 0 for NA * counts = np.zeros(ngroups + 1, dtype=np.int64) # <<<<<<<<<<<<<< * n = len(index) * for i from 0 <= i < n: */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1862; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_zeros); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1862; __pyx_clineno = __LINE__; goto __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_ngroups + 1)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1862; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1862; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1862; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1862; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_int64); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1862; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 1862; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyObject_Call(__pyx_t_2, __pyx_t_3, __pyx_t_1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1862; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 1862; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_6 = ((PyArrayObject *)__pyx_t_5); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_counts.rcbuffer->pybuffer); __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_counts.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_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_counts.rcbuffer->pybuffer, (PyObject*)__pyx_v_counts, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_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_pybuffernd_counts.diminfo[0].strides = __pyx_pybuffernd_counts.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_counts.diminfo[0].shape = __pyx_pybuffernd_counts.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1862; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_6 = 0; __pyx_v_counts = ((PyArrayObject *)__pyx_t_5); __pyx_t_5 = 0; /* "pandas/algos.pyx":1863 * # count group sizes, location 0 for NA * counts = np.zeros(ngroups + 1, dtype=np.int64) * n = len(index) # <<<<<<<<<<<<<< * for i from 0 <= i < n: * counts[index[i] + 1] += 1 */ __pyx_t_11 = PyObject_Length(((PyObject *)__pyx_v_index)); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1863; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_11; /* "pandas/algos.pyx":1864 * counts = np.zeros(ngroups + 1, dtype=np.int64) * n = len(index) * for i from 0 <= i < n: # <<<<<<<<<<<<<< * counts[index[i] + 1] += 1 * */ __pyx_t_11 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_11; __pyx_v_i++) { /* "pandas/algos.pyx":1865 * n = len(index) * for i from 0 <= i < n: * counts[index[i] + 1] += 1 # <<<<<<<<<<<<<< * * # mark the start of each contiguous group of like-indexed data */ __pyx_t_12 = __pyx_v_i; __pyx_t_13 = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_index.rcbuffer->pybuffer.buf, __pyx_t_12, __pyx_pybuffernd_index.diminfo[0].strides)) + 1); *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_counts.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_counts.diminfo[0].strides) += 1; } /* "pandas/algos.pyx":1868 * * # mark the start of each contiguous group of like-indexed data * where = np.zeros(ngroups + 1, dtype=np.int64) # <<<<<<<<<<<<<< * for i from 1 <= i < ngroups + 1: * where[i] = where[i - 1] + counts[i - 1] */ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1868; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_zeros); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1868; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyInt_FromSsize_t((__pyx_v_ngroups + 1)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1868; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1868; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyDict_New(); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1868; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1868; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_int64); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1868; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_dtype, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1868; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyObject_Call(__pyx_t_1, __pyx_t_3, __pyx_t_5); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1868; __pyx_clineno = __LINE__; goto __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_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_filename = __pyx_f[0]; __pyx_lineno = 1868; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_6 = ((PyArrayObject *)__pyx_t_4); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_where.rcbuffer->pybuffer); __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_where.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_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_where.rcbuffer->pybuffer, (PyObject*)__pyx_v_where, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_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_pybuffernd_where.diminfo[0].strides = __pyx_pybuffernd_where.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_where.diminfo[0].shape = __pyx_pybuffernd_where.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1868; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_6 = 0; __pyx_v_where = ((PyArrayObject *)__pyx_t_4); __pyx_t_4 = 0; /* "pandas/algos.pyx":1869 * # mark the start of each contiguous group of like-indexed data * where = np.zeros(ngroups + 1, dtype=np.int64) * for i from 1 <= i < ngroups + 1: # <<<<<<<<<<<<<< * where[i] = where[i - 1] + counts[i - 1] * */ __pyx_t_11 = (__pyx_v_ngroups + 1); for (__pyx_v_i = 1; __pyx_v_i < __pyx_t_11; __pyx_v_i++) { /* "pandas/algos.pyx":1870 * where = np.zeros(ngroups + 1, dtype=np.int64) * for i from 1 <= i < ngroups + 1: * where[i] = where[i - 1] + counts[i - 1] # <<<<<<<<<<<<<< * * # this is our indexer */ __pyx_t_14 = (__pyx_v_i - 1); __pyx_t_15 = (__pyx_v_i - 1); __pyx_t_16 = __pyx_v_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_where.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_where.diminfo[0].strides) = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_where.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_where.diminfo[0].strides)) + (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_counts.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_counts.diminfo[0].strides))); } /* "pandas/algos.pyx":1873 * * # this is our indexer * result = np.zeros(n, dtype=np.int64) # <<<<<<<<<<<<<< * for i from 0 <= i < n: * label = index[i] + 1 */ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1873; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_zeros); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1873; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyInt_FromSsize_t(__pyx_v_n); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1873; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1873; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyDict_New(); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1873; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1873; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_int64); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1873; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_dtype, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1873; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_Call(__pyx_t_5, __pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1873; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__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_filename = __pyx_f[0]; __pyx_lineno = 1873; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_6 = ((PyArrayObject *)__pyx_t_2); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_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_result.rcbuffer->pybuffer, (PyObject*)__pyx_v_result, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_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_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_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1873; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_6 = 0; __pyx_v_result = ((PyArrayObject *)__pyx_t_2); __pyx_t_2 = 0; /* "pandas/algos.pyx":1874 * # this is our indexer * result = np.zeros(n, dtype=np.int64) * for i from 0 <= i < n: # <<<<<<<<<<<<<< * label = index[i] + 1 * result[where[label]] = i */ __pyx_t_11 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_11; __pyx_v_i++) { /* "pandas/algos.pyx":1875 * result = np.zeros(n, dtype=np.int64) * for i from 0 <= i < n: * label = index[i] + 1 # <<<<<<<<<<<<<< * result[where[label]] = i * where[label] += 1 */ __pyx_t_17 = __pyx_v_i; __pyx_v_label = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_index.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_index.diminfo[0].strides)) + 1); /* "pandas/algos.pyx":1876 * for i from 0 <= i < n: * label = index[i] + 1 * result[where[label]] = i # <<<<<<<<<<<<<< * where[label] += 1 * */ __pyx_t_18 = __pyx_v_label; __pyx_t_19 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_where.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_where.diminfo[0].strides)); *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_result.diminfo[0].strides) = __pyx_v_i; /* "pandas/algos.pyx":1877 * label = index[i] + 1 * result[where[label]] = i * where[label] += 1 # <<<<<<<<<<<<<< * * return result, counts */ __pyx_t_20 = __pyx_v_label; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_where.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_where.diminfo[0].strides) += 1; } /* "pandas/algos.pyx":1879 * where[label] += 1 * * return result, counts # <<<<<<<<<<<<<< * * # TODO: aggregate multiple columns in single pass */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1879; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(((PyObject *)__pyx_v_result)); PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_result)); __Pyx_GIVEREF(((PyObject *)__pyx_v_result)); __Pyx_INCREF(((PyObject *)__pyx_v_counts)); PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)__pyx_v_counts)); __Pyx_GIVEREF(((PyObject *)__pyx_v_counts)); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "pandas/algos.pyx":1856 * @cython.boundscheck(False) * @cython.wraparound(False) * def groupsort_indexer(ndarray[int64_t] index, Py_ssize_t ngroups): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, loc, label, n */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_counts.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_index.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_where.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.groupsort_indexer", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_counts.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_index.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_where.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_counts); __Pyx_XDECREF((PyObject *)__pyx_v_where); __Pyx_XDECREF((PyObject *)__pyx_v_result); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/algos.pyx":1887 * @cython.boundscheck(False) * @cython.wraparound(False) * def group_nth_object(ndarray[object, ndim=2] out, # <<<<<<<<<<<<<< * ndarray[int64_t] counts, * ndarray[object, ndim=2] values, */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_65group_nth_object(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6pandas_5algos_64group_nth_object[] = "\n Only aggregates on axis=0\n "; static PyMethodDef __pyx_mdef_6pandas_5algos_65group_nth_object = {__Pyx_NAMESTR("group_nth_object"), (PyCFunction)__pyx_pw_6pandas_5algos_65group_nth_object, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_5algos_64group_nth_object)}; static PyObject *__pyx_pw_6pandas_5algos_65group_nth_object(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_out = 0; PyArrayObject *__pyx_v_counts = 0; PyArrayObject *__pyx_v_values = 0; PyArrayObject *__pyx_v_labels = 0; __pyx_t_5numpy_int64_t __pyx_v_rank; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("group_nth_object (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_out,&__pyx_n_s_counts,&__pyx_n_s_values,&__pyx_n_s_labels,&__pyx_n_s_rank,0}; PyObject* values[5] = {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 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_out)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_counts)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("group_nth_object", 1, 5, 5, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1887; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_values)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("group_nth_object", 1, 5, 5, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1887; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_labels)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("group_nth_object", 1, 5, 5, 3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1887; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 4: if (likely((values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_rank)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("group_nth_object", 1, 5, 5, 4); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1887; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "group_nth_object") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1887; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 5) { 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); } __pyx_v_out = ((PyArrayObject *)values[0]); __pyx_v_counts = ((PyArrayObject *)values[1]); __pyx_v_values = ((PyArrayObject *)values[2]); __pyx_v_labels = ((PyArrayObject *)values[3]); __pyx_v_rank = __Pyx_PyInt_As_npy_int64(values[4]); if (unlikely((__pyx_v_rank == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1891; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("group_nth_object", 1, 5, 5, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1887; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.group_nth_object", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_5numpy_ndarray, 1, "out", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1887; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_counts), __pyx_ptype_5numpy_ndarray, 1, "counts", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1888; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1889; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_labels), __pyx_ptype_5numpy_ndarray, 1, "labels", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1890; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_64group_nth_object(__pyx_self, __pyx_v_out, __pyx_v_counts, __pyx_v_values, __pyx_v_labels, __pyx_v_rank); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5algos_64group_nth_object(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_out, PyArrayObject *__pyx_v_counts, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_labels, __pyx_t_5numpy_int64_t __pyx_v_rank) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_N; Py_ssize_t __pyx_v_K; Py_ssize_t __pyx_v_lab; PyObject *__pyx_v_val = 0; PyArrayObject *__pyx_v_nobs = 0; PyArrayObject *__pyx_v_resx = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_counts; __Pyx_Buffer __pyx_pybuffer_counts; __Pyx_LocalBuf_ND __pyx_pybuffernd_labels; __Pyx_Buffer __pyx_pybuffer_labels; __Pyx_LocalBuf_ND __pyx_pybuffernd_nobs; __Pyx_Buffer __pyx_pybuffer_nobs; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_resx; __Pyx_Buffer __pyx_pybuffer_resx; __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; 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; PyArrayObject *__pyx_t_11 = NULL; PyObject *(*__pyx_t_12)(PyObject *); Py_ssize_t __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; 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; PyObject **__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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("group_nth_object", 0); __pyx_pybuffer_nobs.pybuffer.buf = NULL; __pyx_pybuffer_nobs.refcount = 0; __pyx_pybuffernd_nobs.data = NULL; __pyx_pybuffernd_nobs.rcbuffer = &__pyx_pybuffer_nobs; __pyx_pybuffer_resx.pybuffer.buf = NULL; __pyx_pybuffer_resx.refcount = 0; __pyx_pybuffernd_resx.data = NULL; __pyx_pybuffernd_resx.rcbuffer = &__pyx_pybuffer_resx; __pyx_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; __pyx_pybuffer_counts.pybuffer.buf = NULL; __pyx_pybuffer_counts.refcount = 0; __pyx_pybuffernd_counts.data = NULL; __pyx_pybuffernd_counts.rcbuffer = &__pyx_pybuffer_counts; __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_labels.pybuffer.buf = NULL; __pyx_pybuffer_labels.refcount = 0; __pyx_pybuffernd_labels.data = NULL; __pyx_pybuffernd_labels.rcbuffer = &__pyx_pybuffer_labels; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_v_out, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1887; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; __pyx_pybuffernd_out.diminfo[1].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_out.diminfo[1].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[1]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_counts.rcbuffer->pybuffer, (PyObject*)__pyx_v_counts, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1887; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_counts.diminfo[0].strides = __pyx_pybuffernd_counts.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_counts.diminfo[0].shape = __pyx_pybuffernd_counts.rcbuffer->pybuffer.shape[0]; { __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, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1887; __pyx_clineno = __LINE__; goto __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_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_labels.rcbuffer->pybuffer, (PyObject*)__pyx_v_labels, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1887; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_labels.diminfo[0].strides = __pyx_pybuffernd_labels.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_labels.diminfo[0].shape = __pyx_pybuffernd_labels.rcbuffer->pybuffer.shape[0]; /* "pandas/algos.pyx":1902 * ndarray[object, ndim=2] resx * * nobs = np.zeros(( out).shape, dtype=np.int64) # <<<<<<<<<<<<<< * resx = np.empty(( out).shape, dtype=object) * */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1902; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_zeros); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1902; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_out), __pyx_n_s_shape); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1902; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1902; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1902; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1902; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_int64); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1902; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 1902; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyObject_Call(__pyx_t_2, __pyx_t_3, __pyx_t_1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1902; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 1902; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_6 = ((PyArrayObject *)__pyx_t_5); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer); __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_nobs.rcbuffer->pybuffer, (PyObject*)__pyx_v_nobs, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_pybuffernd_nobs.diminfo[0].strides = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_nobs.diminfo[0].shape = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_nobs.diminfo[1].strides = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_nobs.diminfo[1].shape = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.shape[1]; if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1902; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_6 = 0; __pyx_v_nobs = ((PyArrayObject *)__pyx_t_5); __pyx_t_5 = 0; /* "pandas/algos.pyx":1903 * * nobs = np.zeros(( out).shape, dtype=np.int64) * resx = np.empty(( out).shape, dtype=object) # <<<<<<<<<<<<<< * * N, K = ( values).shape */ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1903; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_empty); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1903; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_out), __pyx_n_s_shape); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1903; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1903; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyDict_New(); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1903; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_dtype, __pyx_builtin_object) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1903; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_2 = PyObject_Call(__pyx_t_1, __pyx_t_3, __pyx_t_5); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1903; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1903; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_11 = ((PyArrayObject *)__pyx_t_2); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_resx.rcbuffer->pybuffer); __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_resx.rcbuffer->pybuffer, (PyObject*)__pyx_t_11, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_resx.rcbuffer->pybuffer, (PyObject*)__pyx_v_resx, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_pybuffernd_resx.diminfo[0].strides = __pyx_pybuffernd_resx.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_resx.diminfo[0].shape = __pyx_pybuffernd_resx.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_resx.diminfo[1].strides = __pyx_pybuffernd_resx.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_resx.diminfo[1].shape = __pyx_pybuffernd_resx.rcbuffer->pybuffer.shape[1]; if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1903; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_11 = 0; __pyx_v_resx = ((PyArrayObject *)__pyx_t_2); __pyx_t_2 = 0; /* "pandas/algos.pyx":1905 * resx = np.empty(( out).shape, dtype=object) * * N, K = ( values).shape # <<<<<<<<<<<<<< * * for i in range(N): */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_values), __pyx_n_s_shape); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1905; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if ((likely(PyTuple_CheckExact(__pyx_t_2))) || (PyList_CheckExact(__pyx_t_2))) { PyObject* sequence = __pyx_t_2; #if CYTHON_COMPILING_IN_CPYTHON Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1905; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_5 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1); } else { __pyx_t_5 = PyList_GET_ITEM(sequence, 0); __pyx_t_3 = PyList_GET_ITEM(sequence, 1); } __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(__pyx_t_3); #else __pyx_t_5 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1905; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1905; __pyx_clineno = __LINE__; goto __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_1 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1905; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_12 = Py_TYPE(__pyx_t_1)->tp_iternext; index = 0; __pyx_t_5 = __pyx_t_12(__pyx_t_1); if (unlikely(!__pyx_t_5)) goto __pyx_L3_unpacking_failed; __Pyx_GOTREF(__pyx_t_5); index = 1; __pyx_t_3 = __pyx_t_12(__pyx_t_1); if (unlikely(!__pyx_t_3)) goto __pyx_L3_unpacking_failed; __Pyx_GOTREF(__pyx_t_3); if (__Pyx_IternextUnpackEndCheck(__pyx_t_12(__pyx_t_1), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1905; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_12 = NULL; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L4_unpacking_done; __pyx_L3_unpacking_failed:; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_12 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1905; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_L4_unpacking_done:; } __pyx_t_13 = __Pyx_PyIndex_AsSsize_t(__pyx_t_5); if (unlikely((__pyx_t_13 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1905; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_14 = __Pyx_PyIndex_AsSsize_t(__pyx_t_3); if (unlikely((__pyx_t_14 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1905; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_N = __pyx_t_13; __pyx_v_K = __pyx_t_14; /* "pandas/algos.pyx":1907 * N, K = ( values).shape * * for i in range(N): # <<<<<<<<<<<<<< * lab = labels[i] * if lab < 0: */ __pyx_t_14 = __pyx_v_N; for (__pyx_t_13 = 0; __pyx_t_13 < __pyx_t_14; __pyx_t_13+=1) { __pyx_v_i = __pyx_t_13; /* "pandas/algos.pyx":1908 * * for i in range(N): * lab = labels[i] # <<<<<<<<<<<<<< * if lab < 0: * continue */ __pyx_t_15 = __pyx_v_i; __pyx_v_lab = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_labels.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_labels.diminfo[0].strides)); /* "pandas/algos.pyx":1909 * for i in range(N): * lab = labels[i] * if lab < 0: # <<<<<<<<<<<<<< * continue * */ __pyx_t_16 = ((__pyx_v_lab < 0) != 0); if (__pyx_t_16) { /* "pandas/algos.pyx":1910 * lab = labels[i] * if lab < 0: * continue # <<<<<<<<<<<<<< * * counts[lab] += 1 */ goto __pyx_L5_continue; } /* "pandas/algos.pyx":1912 * continue * * counts[lab] += 1 # <<<<<<<<<<<<<< * for j in range(K): * val = values[i, j] */ __pyx_t_17 = __pyx_v_lab; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_counts.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_counts.diminfo[0].strides) += 1; /* "pandas/algos.pyx":1913 * * counts[lab] += 1 * for j in range(K): # <<<<<<<<<<<<<< * val = values[i, j] * */ __pyx_t_18 = __pyx_v_K; for (__pyx_t_19 = 0; __pyx_t_19 < __pyx_t_18; __pyx_t_19+=1) { __pyx_v_j = __pyx_t_19; /* "pandas/algos.pyx":1914 * counts[lab] += 1 * for j in range(K): * val = values[i, j] # <<<<<<<<<<<<<< * * # not nan */ __pyx_t_20 = __pyx_v_i; __pyx_t_21 = __pyx_v_j; __pyx_t_2 = (PyObject *) *__Pyx_BufPtrStrided2d(PyObject **, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_21, __pyx_pybuffernd_values.diminfo[1].strides); __Pyx_INCREF((PyObject*)__pyx_t_2); __Pyx_XDECREF_SET(__pyx_v_val, __pyx_t_2); __pyx_t_2 = 0; /* "pandas/algos.pyx":1917 * * # not nan * if val == val: # <<<<<<<<<<<<<< * nobs[lab, j] += 1 * if nobs[lab, j] == rank: */ __pyx_t_2 = PyObject_RichCompare(__pyx_v_val, __pyx_v_val, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1917; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_16 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_16 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1917; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_16) { /* "pandas/algos.pyx":1918 * # not nan * if val == val: * nobs[lab, j] += 1 # <<<<<<<<<<<<<< * if nobs[lab, j] == rank: * resx[lab, j] = val */ __pyx_t_22 = __pyx_v_lab; __pyx_t_23 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_nobs.rcbuffer->pybuffer.buf, __pyx_t_22, __pyx_pybuffernd_nobs.diminfo[0].strides, __pyx_t_23, __pyx_pybuffernd_nobs.diminfo[1].strides) += 1; /* "pandas/algos.pyx":1919 * if val == val: * nobs[lab, j] += 1 * if nobs[lab, j] == rank: # <<<<<<<<<<<<<< * resx[lab, j] = val * */ __pyx_t_24 = __pyx_v_lab; __pyx_t_25 = __pyx_v_j; __pyx_t_16 = (((*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_nobs.rcbuffer->pybuffer.buf, __pyx_t_24, __pyx_pybuffernd_nobs.diminfo[0].strides, __pyx_t_25, __pyx_pybuffernd_nobs.diminfo[1].strides)) == __pyx_v_rank) != 0); if (__pyx_t_16) { /* "pandas/algos.pyx":1920 * nobs[lab, j] += 1 * if nobs[lab, j] == rank: * resx[lab, j] = val # <<<<<<<<<<<<<< * * for i in range(len(counts)): */ __pyx_t_26 = __pyx_v_lab; __pyx_t_27 = __pyx_v_j; __pyx_t_28 = __Pyx_BufPtrStrided2d(PyObject **, __pyx_pybuffernd_resx.rcbuffer->pybuffer.buf, __pyx_t_26, __pyx_pybuffernd_resx.diminfo[0].strides, __pyx_t_27, __pyx_pybuffernd_resx.diminfo[1].strides); __Pyx_GOTREF(*__pyx_t_28); __Pyx_INCREF(__pyx_v_val); __Pyx_DECREF(*__pyx_t_28); *__pyx_t_28 = __pyx_v_val; __Pyx_GIVEREF(*__pyx_t_28); goto __pyx_L11; } __pyx_L11:; goto __pyx_L10; } __pyx_L10:; } __pyx_L5_continue:; } /* "pandas/algos.pyx":1922 * resx[lab, j] = val * * for i in range(len(counts)): # <<<<<<<<<<<<<< * for j in range(K): * if nobs[i, j] == 0: */ __pyx_t_14 = PyObject_Length(((PyObject *)__pyx_v_counts)); if (unlikely(__pyx_t_14 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1922; __pyx_clineno = __LINE__; goto __pyx_L1_error;} for (__pyx_t_13 = 0; __pyx_t_13 < __pyx_t_14; __pyx_t_13+=1) { __pyx_v_i = __pyx_t_13; /* "pandas/algos.pyx":1923 * * for i in range(len(counts)): * for j in range(K): # <<<<<<<<<<<<<< * if nobs[i, j] == 0: * out[i, j] = nan */ __pyx_t_18 = __pyx_v_K; for (__pyx_t_19 = 0; __pyx_t_19 < __pyx_t_18; __pyx_t_19+=1) { __pyx_v_j = __pyx_t_19; /* "pandas/algos.pyx":1924 * for i in range(len(counts)): * for j in range(K): * if nobs[i, j] == 0: # <<<<<<<<<<<<<< * out[i, j] = nan * else: */ __pyx_t_29 = __pyx_v_i; __pyx_t_30 = __pyx_v_j; __pyx_t_16 = (((*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_nobs.rcbuffer->pybuffer.buf, __pyx_t_29, __pyx_pybuffernd_nobs.diminfo[0].strides, __pyx_t_30, __pyx_pybuffernd_nobs.diminfo[1].strides)) == 0) != 0); if (__pyx_t_16) { /* "pandas/algos.pyx":1925 * for j in range(K): * if nobs[i, j] == 0: * out[i, j] = nan # <<<<<<<<<<<<<< * else: * out[i, j] = resx[i, j] */ __pyx_t_2 = PyFloat_FromDouble(__pyx_v_6pandas_5algos_nan); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1925; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __pyx_t_2; __Pyx_INCREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_31 = __pyx_v_i; __pyx_t_32 = __pyx_v_j; __pyx_t_28 = __Pyx_BufPtrStrided2d(PyObject **, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_31, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_32, __pyx_pybuffernd_out.diminfo[1].strides); __Pyx_GOTREF(*__pyx_t_28); __Pyx_INCREF(__pyx_t_3); __Pyx_DECREF(*__pyx_t_28); *__pyx_t_28 = __pyx_t_3; __Pyx_GIVEREF(*__pyx_t_28); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L16; } /*else*/ { /* "pandas/algos.pyx":1927 * out[i, j] = nan * else: * out[i, j] = resx[i, j] # <<<<<<<<<<<<<< * * @cython.boundscheck(False) */ __pyx_t_33 = __pyx_v_i; __pyx_t_34 = __pyx_v_j; __pyx_t_3 = (PyObject *) *__Pyx_BufPtrStrided2d(PyObject **, __pyx_pybuffernd_resx.rcbuffer->pybuffer.buf, __pyx_t_33, __pyx_pybuffernd_resx.diminfo[0].strides, __pyx_t_34, __pyx_pybuffernd_resx.diminfo[1].strides); __Pyx_INCREF((PyObject*)__pyx_t_3); __pyx_t_35 = __pyx_v_i; __pyx_t_36 = __pyx_v_j; __pyx_t_28 = __Pyx_BufPtrStrided2d(PyObject **, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_35, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_36, __pyx_pybuffernd_out.diminfo[1].strides); __Pyx_GOTREF(*__pyx_t_28); __Pyx_INCREF(__pyx_t_3); __Pyx_DECREF(*__pyx_t_28); *__pyx_t_28 = __pyx_t_3; __Pyx_GIVEREF(*__pyx_t_28); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } __pyx_L16:; } } /* "pandas/algos.pyx":1887 * @cython.boundscheck(False) * @cython.wraparound(False) * def group_nth_object(ndarray[object, ndim=2] out, # <<<<<<<<<<<<<< * ndarray[int64_t] counts, * ndarray[object, ndim=2] 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_5); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_counts.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_labels.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_resx.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.group_nth_object", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_counts.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_labels.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_resx.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF(__pyx_v_val); __Pyx_XDECREF((PyObject *)__pyx_v_nobs); __Pyx_XDECREF((PyObject *)__pyx_v_resx); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/algos.pyx":1931 * @cython.boundscheck(False) * @cython.wraparound(False) * def group_nth_bin_object(ndarray[object, ndim=2] out, # <<<<<<<<<<<<<< * ndarray[int64_t] counts, * ndarray[object, ndim=2] values, */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_67group_nth_bin_object(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6pandas_5algos_66group_nth_bin_object[] = "\n Only aggregates on axis=0\n "; static PyMethodDef __pyx_mdef_6pandas_5algos_67group_nth_bin_object = {__Pyx_NAMESTR("group_nth_bin_object"), (PyCFunction)__pyx_pw_6pandas_5algos_67group_nth_bin_object, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_5algos_66group_nth_bin_object)}; static PyObject *__pyx_pw_6pandas_5algos_67group_nth_bin_object(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_out = 0; PyArrayObject *__pyx_v_counts = 0; PyArrayObject *__pyx_v_values = 0; PyArrayObject *__pyx_v_bins = 0; __pyx_t_5numpy_int64_t __pyx_v_rank; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("group_nth_bin_object (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_out,&__pyx_n_s_counts,&__pyx_n_s_values,&__pyx_n_s_bins,&__pyx_n_s_rank,0}; PyObject* values[5] = {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 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_out)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_counts)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("group_nth_bin_object", 1, 5, 5, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1931; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_values)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("group_nth_bin_object", 1, 5, 5, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1931; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_bins)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("group_nth_bin_object", 1, 5, 5, 3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1931; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 4: if (likely((values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_rank)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("group_nth_bin_object", 1, 5, 5, 4); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1931; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "group_nth_bin_object") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1931; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 5) { 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); } __pyx_v_out = ((PyArrayObject *)values[0]); __pyx_v_counts = ((PyArrayObject *)values[1]); __pyx_v_values = ((PyArrayObject *)values[2]); __pyx_v_bins = ((PyArrayObject *)values[3]); __pyx_v_rank = __Pyx_PyInt_As_npy_int64(values[4]); if (unlikely((__pyx_v_rank == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1934; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("group_nth_bin_object", 1, 5, 5, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1931; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.group_nth_bin_object", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_5numpy_ndarray, 1, "out", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1931; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_counts), __pyx_ptype_5numpy_ndarray, 1, "counts", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1932; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1933; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_bins), __pyx_ptype_5numpy_ndarray, 1, "bins", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1934; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_66group_nth_bin_object(__pyx_self, __pyx_v_out, __pyx_v_counts, __pyx_v_values, __pyx_v_bins, __pyx_v_rank); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5algos_66group_nth_bin_object(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_out, PyArrayObject *__pyx_v_counts, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_bins, __pyx_t_5numpy_int64_t __pyx_v_rank) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_N; Py_ssize_t __pyx_v_K; Py_ssize_t __pyx_v_ngroups; Py_ssize_t __pyx_v_b; PyObject *__pyx_v_val = 0; PyArrayObject *__pyx_v_resx = 0; PyArrayObject *__pyx_v_nobs = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_bins; __Pyx_Buffer __pyx_pybuffer_bins; __Pyx_LocalBuf_ND __pyx_pybuffernd_counts; __Pyx_Buffer __pyx_pybuffer_counts; __Pyx_LocalBuf_ND __pyx_pybuffernd_nobs; __Pyx_Buffer __pyx_pybuffer_nobs; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_resx; __Pyx_Buffer __pyx_pybuffer_resx; __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; 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; PyArrayObject *__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; PyObject *(*__pyx_t_16)(PyObject *); Py_ssize_t __pyx_t_17; int __pyx_t_18; int __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; PyObject **__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; Py_ssize_t __pyx_t_37; Py_ssize_t __pyx_t_38; Py_ssize_t __pyx_t_39; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("group_nth_bin_object", 0); __pyx_pybuffer_resx.pybuffer.buf = NULL; __pyx_pybuffer_resx.refcount = 0; __pyx_pybuffernd_resx.data = NULL; __pyx_pybuffernd_resx.rcbuffer = &__pyx_pybuffer_resx; __pyx_pybuffer_nobs.pybuffer.buf = NULL; __pyx_pybuffer_nobs.refcount = 0; __pyx_pybuffernd_nobs.data = NULL; __pyx_pybuffernd_nobs.rcbuffer = &__pyx_pybuffer_nobs; __pyx_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; __pyx_pybuffer_counts.pybuffer.buf = NULL; __pyx_pybuffer_counts.refcount = 0; __pyx_pybuffernd_counts.data = NULL; __pyx_pybuffernd_counts.rcbuffer = &__pyx_pybuffer_counts; __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_bins.pybuffer.buf = NULL; __pyx_pybuffer_bins.refcount = 0; __pyx_pybuffernd_bins.data = NULL; __pyx_pybuffernd_bins.rcbuffer = &__pyx_pybuffer_bins; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_v_out, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1931; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; __pyx_pybuffernd_out.diminfo[1].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_out.diminfo[1].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[1]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_counts.rcbuffer->pybuffer, (PyObject*)__pyx_v_counts, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1931; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_counts.diminfo[0].strides = __pyx_pybuffernd_counts.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_counts.diminfo[0].shape = __pyx_pybuffernd_counts.rcbuffer->pybuffer.shape[0]; { __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, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1931; __pyx_clineno = __LINE__; goto __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_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_bins.rcbuffer->pybuffer, (PyObject*)__pyx_v_bins, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1931; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_bins.diminfo[0].strides = __pyx_pybuffernd_bins.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_bins.diminfo[0].shape = __pyx_pybuffernd_bins.rcbuffer->pybuffer.shape[0]; /* "pandas/algos.pyx":1945 * ndarray[float64_t, ndim=2] nobs * * nobs = np.zeros(( out).shape, dtype=np.float64) # <<<<<<<<<<<<<< * resx = np.empty(( out).shape, dtype=object) * */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1945; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_zeros); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1945; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_out), __pyx_n_s_shape); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1945; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1945; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1945; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1945; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_float64); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1945; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 1945; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyObject_Call(__pyx_t_2, __pyx_t_3, __pyx_t_1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1945; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 1945; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_6 = ((PyArrayObject *)__pyx_t_5); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer); __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_nobs.rcbuffer->pybuffer, (PyObject*)__pyx_v_nobs, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_pybuffernd_nobs.diminfo[0].strides = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_nobs.diminfo[0].shape = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_nobs.diminfo[1].strides = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_nobs.diminfo[1].shape = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.shape[1]; if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1945; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_6 = 0; __pyx_v_nobs = ((PyArrayObject *)__pyx_t_5); __pyx_t_5 = 0; /* "pandas/algos.pyx":1946 * * nobs = np.zeros(( out).shape, dtype=np.float64) * resx = np.empty(( out).shape, dtype=object) # <<<<<<<<<<<<<< * * if bins[len(bins) - 1] == len(values): */ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1946; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_empty); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1946; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_out), __pyx_n_s_shape); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1946; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1946; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyDict_New(); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1946; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_dtype, __pyx_builtin_object) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1946; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_2 = PyObject_Call(__pyx_t_1, __pyx_t_3, __pyx_t_5); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1946; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1946; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_11 = ((PyArrayObject *)__pyx_t_2); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_resx.rcbuffer->pybuffer); __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_resx.rcbuffer->pybuffer, (PyObject*)__pyx_t_11, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_resx.rcbuffer->pybuffer, (PyObject*)__pyx_v_resx, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_pybuffernd_resx.diminfo[0].strides = __pyx_pybuffernd_resx.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_resx.diminfo[0].shape = __pyx_pybuffernd_resx.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_resx.diminfo[1].strides = __pyx_pybuffernd_resx.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_resx.diminfo[1].shape = __pyx_pybuffernd_resx.rcbuffer->pybuffer.shape[1]; if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1946; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_11 = 0; __pyx_v_resx = ((PyArrayObject *)__pyx_t_2); __pyx_t_2 = 0; /* "pandas/algos.pyx":1948 * resx = np.empty(( out).shape, dtype=object) * * if bins[len(bins) - 1] == len(values): # <<<<<<<<<<<<<< * ngroups = len(bins) * else: */ __pyx_t_12 = PyObject_Length(((PyObject *)__pyx_v_bins)); if (unlikely(__pyx_t_12 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1948; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_13 = (__pyx_t_12 - 1); __pyx_t_14 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_14 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1948; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_15 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_bins.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_bins.diminfo[0].strides)) == __pyx_t_14) != 0); if (__pyx_t_15) { /* "pandas/algos.pyx":1949 * * if bins[len(bins) - 1] == len(values): * ngroups = len(bins) # <<<<<<<<<<<<<< * else: * ngroups = len(bins) + 1 */ __pyx_t_14 = PyObject_Length(((PyObject *)__pyx_v_bins)); if (unlikely(__pyx_t_14 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1949; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_ngroups = __pyx_t_14; goto __pyx_L3; } /*else*/ { /* "pandas/algos.pyx":1951 * ngroups = len(bins) * else: * ngroups = len(bins) + 1 # <<<<<<<<<<<<<< * * N, K = ( values).shape */ __pyx_t_14 = PyObject_Length(((PyObject *)__pyx_v_bins)); if (unlikely(__pyx_t_14 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1951; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_ngroups = (__pyx_t_14 + 1); } __pyx_L3:; /* "pandas/algos.pyx":1953 * ngroups = len(bins) + 1 * * N, K = ( values).shape # <<<<<<<<<<<<<< * * b = 0 */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_values), __pyx_n_s_shape); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1953; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if ((likely(PyTuple_CheckExact(__pyx_t_2))) || (PyList_CheckExact(__pyx_t_2))) { PyObject* sequence = __pyx_t_2; #if CYTHON_COMPILING_IN_CPYTHON Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1953; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_5 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1); } else { __pyx_t_5 = PyList_GET_ITEM(sequence, 0); __pyx_t_3 = PyList_GET_ITEM(sequence, 1); } __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(__pyx_t_3); #else __pyx_t_5 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1953; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1953; __pyx_clineno = __LINE__; goto __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_1 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1953; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_16 = Py_TYPE(__pyx_t_1)->tp_iternext; index = 0; __pyx_t_5 = __pyx_t_16(__pyx_t_1); if (unlikely(!__pyx_t_5)) goto __pyx_L4_unpacking_failed; __Pyx_GOTREF(__pyx_t_5); index = 1; __pyx_t_3 = __pyx_t_16(__pyx_t_1); if (unlikely(!__pyx_t_3)) goto __pyx_L4_unpacking_failed; __Pyx_GOTREF(__pyx_t_3); if (__Pyx_IternextUnpackEndCheck(__pyx_t_16(__pyx_t_1), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1953; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_16 = NULL; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L5_unpacking_done; __pyx_L4_unpacking_failed:; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_16 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1953; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_L5_unpacking_done:; } __pyx_t_14 = __Pyx_PyIndex_AsSsize_t(__pyx_t_5); if (unlikely((__pyx_t_14 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1953; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_12 = __Pyx_PyIndex_AsSsize_t(__pyx_t_3); if (unlikely((__pyx_t_12 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1953; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_N = __pyx_t_14; __pyx_v_K = __pyx_t_12; /* "pandas/algos.pyx":1955 * N, K = ( values).shape * * b = 0 # <<<<<<<<<<<<<< * for i in range(N): * while b < ngroups - 1 and i >= bins[b]: */ __pyx_v_b = 0; /* "pandas/algos.pyx":1956 * * b = 0 * for i in range(N): # <<<<<<<<<<<<<< * while b < ngroups - 1 and i >= bins[b]: * b += 1 */ __pyx_t_12 = __pyx_v_N; for (__pyx_t_14 = 0; __pyx_t_14 < __pyx_t_12; __pyx_t_14+=1) { __pyx_v_i = __pyx_t_14; /* "pandas/algos.pyx":1957 * b = 0 * for i in range(N): * while b < ngroups - 1 and i >= bins[b]: # <<<<<<<<<<<<<< * b += 1 * */ while (1) { __pyx_t_15 = ((__pyx_v_b < (__pyx_v_ngroups - 1)) != 0); if (__pyx_t_15) { __pyx_t_17 = __pyx_v_b; __pyx_t_18 = ((__pyx_v_i >= (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_bins.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_bins.diminfo[0].strides))) != 0); __pyx_t_19 = __pyx_t_18; } else { __pyx_t_19 = __pyx_t_15; } if (!__pyx_t_19) break; /* "pandas/algos.pyx":1958 * for i in range(N): * while b < ngroups - 1 and i >= bins[b]: * b += 1 # <<<<<<<<<<<<<< * * counts[b] += 1 */ __pyx_v_b = (__pyx_v_b + 1); } /* "pandas/algos.pyx":1960 * b += 1 * * counts[b] += 1 # <<<<<<<<<<<<<< * for j in range(K): * val = values[i, j] */ __pyx_t_20 = __pyx_v_b; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_counts.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_counts.diminfo[0].strides) += 1; /* "pandas/algos.pyx":1961 * * counts[b] += 1 * for j in range(K): # <<<<<<<<<<<<<< * val = values[i, j] * */ __pyx_t_21 = __pyx_v_K; for (__pyx_t_22 = 0; __pyx_t_22 < __pyx_t_21; __pyx_t_22+=1) { __pyx_v_j = __pyx_t_22; /* "pandas/algos.pyx":1962 * counts[b] += 1 * for j in range(K): * val = values[i, j] # <<<<<<<<<<<<<< * * # not nan */ __pyx_t_23 = __pyx_v_i; __pyx_t_24 = __pyx_v_j; __pyx_t_2 = (PyObject *) *__Pyx_BufPtrStrided2d(PyObject **, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_23, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_24, __pyx_pybuffernd_values.diminfo[1].strides); __Pyx_INCREF((PyObject*)__pyx_t_2); __Pyx_XDECREF_SET(__pyx_v_val, __pyx_t_2); __pyx_t_2 = 0; /* "pandas/algos.pyx":1965 * * # not nan * if val == val: # <<<<<<<<<<<<<< * nobs[b, j] += 1 * if nobs[b, j] == rank: */ __pyx_t_2 = PyObject_RichCompare(__pyx_v_val, __pyx_v_val, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1965; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_19 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_19 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1965; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_19) { /* "pandas/algos.pyx":1966 * # not nan * if val == val: * nobs[b, j] += 1 # <<<<<<<<<<<<<< * if nobs[b, j] == rank: * resx[b, j] = val */ __pyx_t_25 = __pyx_v_b; __pyx_t_26 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_nobs.rcbuffer->pybuffer.buf, __pyx_t_25, __pyx_pybuffernd_nobs.diminfo[0].strides, __pyx_t_26, __pyx_pybuffernd_nobs.diminfo[1].strides) += 1.0; /* "pandas/algos.pyx":1967 * if val == val: * nobs[b, j] += 1 * if nobs[b, j] == rank: # <<<<<<<<<<<<<< * resx[b, j] = val * */ __pyx_t_27 = __pyx_v_b; __pyx_t_28 = __pyx_v_j; __pyx_t_19 = (((*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_nobs.rcbuffer->pybuffer.buf, __pyx_t_27, __pyx_pybuffernd_nobs.diminfo[0].strides, __pyx_t_28, __pyx_pybuffernd_nobs.diminfo[1].strides)) == __pyx_v_rank) != 0); if (__pyx_t_19) { /* "pandas/algos.pyx":1968 * nobs[b, j] += 1 * if nobs[b, j] == rank: * resx[b, j] = val # <<<<<<<<<<<<<< * * for i in range(ngroups): */ __pyx_t_29 = __pyx_v_b; __pyx_t_30 = __pyx_v_j; __pyx_t_31 = __Pyx_BufPtrStrided2d(PyObject **, __pyx_pybuffernd_resx.rcbuffer->pybuffer.buf, __pyx_t_29, __pyx_pybuffernd_resx.diminfo[0].strides, __pyx_t_30, __pyx_pybuffernd_resx.diminfo[1].strides); __Pyx_GOTREF(*__pyx_t_31); __Pyx_INCREF(__pyx_v_val); __Pyx_DECREF(*__pyx_t_31); *__pyx_t_31 = __pyx_v_val; __Pyx_GIVEREF(*__pyx_t_31); goto __pyx_L13; } __pyx_L13:; goto __pyx_L12; } __pyx_L12:; } } /* "pandas/algos.pyx":1970 * resx[b, j] = val * * for i in range(ngroups): # <<<<<<<<<<<<<< * for j in range(K): * if nobs[i, j] == 0: */ __pyx_t_12 = __pyx_v_ngroups; for (__pyx_t_14 = 0; __pyx_t_14 < __pyx_t_12; __pyx_t_14+=1) { __pyx_v_i = __pyx_t_14; /* "pandas/algos.pyx":1971 * * for i in range(ngroups): * for j in range(K): # <<<<<<<<<<<<<< * if nobs[i, j] == 0: * out[i, j] = nan */ __pyx_t_21 = __pyx_v_K; for (__pyx_t_22 = 0; __pyx_t_22 < __pyx_t_21; __pyx_t_22+=1) { __pyx_v_j = __pyx_t_22; /* "pandas/algos.pyx":1972 * for i in range(ngroups): * for j in range(K): * if nobs[i, j] == 0: # <<<<<<<<<<<<<< * out[i, j] = nan * else: */ __pyx_t_32 = __pyx_v_i; __pyx_t_33 = __pyx_v_j; __pyx_t_19 = (((*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_nobs.rcbuffer->pybuffer.buf, __pyx_t_32, __pyx_pybuffernd_nobs.diminfo[0].strides, __pyx_t_33, __pyx_pybuffernd_nobs.diminfo[1].strides)) == 0.0) != 0); if (__pyx_t_19) { /* "pandas/algos.pyx":1973 * for j in range(K): * if nobs[i, j] == 0: * out[i, j] = nan # <<<<<<<<<<<<<< * else: * out[i, j] = resx[i, j] */ __pyx_t_2 = PyFloat_FromDouble(__pyx_v_6pandas_5algos_nan); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1973; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_34 = __pyx_v_i; __pyx_t_35 = __pyx_v_j; __pyx_t_31 = __Pyx_BufPtrStrided2d(PyObject **, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_34, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_35, __pyx_pybuffernd_out.diminfo[1].strides); __Pyx_GOTREF(*__pyx_t_31); __Pyx_INCREF(__pyx_t_2); __Pyx_DECREF(*__pyx_t_31); *__pyx_t_31 = __pyx_t_2; __Pyx_GIVEREF(*__pyx_t_31); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; goto __pyx_L18; } /*else*/ { /* "pandas/algos.pyx":1975 * out[i, j] = nan * else: * out[i, j] = resx[i, j] # <<<<<<<<<<<<<< * * @cython.boundscheck(False) */ __pyx_t_36 = __pyx_v_i; __pyx_t_37 = __pyx_v_j; __pyx_t_2 = (PyObject *) *__Pyx_BufPtrStrided2d(PyObject **, __pyx_pybuffernd_resx.rcbuffer->pybuffer.buf, __pyx_t_36, __pyx_pybuffernd_resx.diminfo[0].strides, __pyx_t_37, __pyx_pybuffernd_resx.diminfo[1].strides); __Pyx_INCREF((PyObject*)__pyx_t_2); __pyx_t_38 = __pyx_v_i; __pyx_t_39 = __pyx_v_j; __pyx_t_31 = __Pyx_BufPtrStrided2d(PyObject **, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_38, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_39, __pyx_pybuffernd_out.diminfo[1].strides); __Pyx_GOTREF(*__pyx_t_31); __Pyx_INCREF(__pyx_t_2); __Pyx_DECREF(*__pyx_t_31); *__pyx_t_31 = __pyx_t_2; __Pyx_GIVEREF(*__pyx_t_31); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } __pyx_L18:; } } /* "pandas/algos.pyx":1931 * @cython.boundscheck(False) * @cython.wraparound(False) * def group_nth_bin_object(ndarray[object, ndim=2] out, # <<<<<<<<<<<<<< * ndarray[int64_t] counts, * ndarray[object, ndim=2] 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_5); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_bins.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_counts.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_resx.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.group_nth_bin_object", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_bins.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_counts.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_resx.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF(__pyx_v_val); __Pyx_XDECREF((PyObject *)__pyx_v_resx); __Pyx_XDECREF((PyObject *)__pyx_v_nobs); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/algos.pyx":1979 * @cython.boundscheck(False) * @cython.wraparound(False) * def group_last_object(ndarray[object, ndim=2] out, # <<<<<<<<<<<<<< * ndarray[int64_t] counts, * ndarray[object, ndim=2] values, */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_69group_last_object(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6pandas_5algos_68group_last_object[] = "\n Only aggregates on axis=0\n "; static PyMethodDef __pyx_mdef_6pandas_5algos_69group_last_object = {__Pyx_NAMESTR("group_last_object"), (PyCFunction)__pyx_pw_6pandas_5algos_69group_last_object, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_5algos_68group_last_object)}; static PyObject *__pyx_pw_6pandas_5algos_69group_last_object(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_out = 0; PyArrayObject *__pyx_v_counts = 0; PyArrayObject *__pyx_v_values = 0; PyArrayObject *__pyx_v_labels = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("group_last_object (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_out,&__pyx_n_s_counts,&__pyx_n_s_values,&__pyx_n_s_labels,0}; PyObject* values[4] = {0,0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_out)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_counts)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("group_last_object", 1, 4, 4, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1979; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_values)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("group_last_object", 1, 4, 4, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1979; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_labels)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("group_last_object", 1, 4, 4, 3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1979; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "group_last_object") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1979; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 4) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[3] = PyTuple_GET_ITEM(__pyx_args, 3); } __pyx_v_out = ((PyArrayObject *)values[0]); __pyx_v_counts = ((PyArrayObject *)values[1]); __pyx_v_values = ((PyArrayObject *)values[2]); __pyx_v_labels = ((PyArrayObject *)values[3]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("group_last_object", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1979; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.group_last_object", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_5numpy_ndarray, 1, "out", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1979; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_counts), __pyx_ptype_5numpy_ndarray, 1, "counts", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1980; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1981; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_labels), __pyx_ptype_5numpy_ndarray, 1, "labels", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1982; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_68group_last_object(__pyx_self, __pyx_v_out, __pyx_v_counts, __pyx_v_values, __pyx_v_labels); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5algos_68group_last_object(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_out, PyArrayObject *__pyx_v_counts, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_labels) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_N; Py_ssize_t __pyx_v_K; Py_ssize_t __pyx_v_lab; PyObject *__pyx_v_val = 0; PyArrayObject *__pyx_v_resx = 0; PyArrayObject *__pyx_v_nobs = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_counts; __Pyx_Buffer __pyx_pybuffer_counts; __Pyx_LocalBuf_ND __pyx_pybuffernd_labels; __Pyx_Buffer __pyx_pybuffer_labels; __Pyx_LocalBuf_ND __pyx_pybuffernd_nobs; __Pyx_Buffer __pyx_pybuffer_nobs; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_resx; __Pyx_Buffer __pyx_pybuffer_resx; __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; 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; PyArrayObject *__pyx_t_11 = NULL; PyObject *(*__pyx_t_12)(PyObject *); Py_ssize_t __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; Py_ssize_t __pyx_t_23; Py_ssize_t __pyx_t_24; Py_ssize_t __pyx_t_25; PyObject **__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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("group_last_object", 0); __pyx_pybuffer_resx.pybuffer.buf = NULL; __pyx_pybuffer_resx.refcount = 0; __pyx_pybuffernd_resx.data = NULL; __pyx_pybuffernd_resx.rcbuffer = &__pyx_pybuffer_resx; __pyx_pybuffer_nobs.pybuffer.buf = NULL; __pyx_pybuffer_nobs.refcount = 0; __pyx_pybuffernd_nobs.data = NULL; __pyx_pybuffernd_nobs.rcbuffer = &__pyx_pybuffer_nobs; __pyx_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; __pyx_pybuffer_counts.pybuffer.buf = NULL; __pyx_pybuffer_counts.refcount = 0; __pyx_pybuffernd_counts.data = NULL; __pyx_pybuffernd_counts.rcbuffer = &__pyx_pybuffer_counts; __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_labels.pybuffer.buf = NULL; __pyx_pybuffer_labels.refcount = 0; __pyx_pybuffernd_labels.data = NULL; __pyx_pybuffernd_labels.rcbuffer = &__pyx_pybuffer_labels; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_v_out, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1979; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; __pyx_pybuffernd_out.diminfo[1].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_out.diminfo[1].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[1]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_counts.rcbuffer->pybuffer, (PyObject*)__pyx_v_counts, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1979; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_counts.diminfo[0].strides = __pyx_pybuffernd_counts.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_counts.diminfo[0].shape = __pyx_pybuffernd_counts.rcbuffer->pybuffer.shape[0]; { __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, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1979; __pyx_clineno = __LINE__; goto __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_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_labels.rcbuffer->pybuffer, (PyObject*)__pyx_v_labels, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1979; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_labels.diminfo[0].strides = __pyx_pybuffernd_labels.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_labels.diminfo[0].shape = __pyx_pybuffernd_labels.rcbuffer->pybuffer.shape[0]; /* "pandas/algos.pyx":1993 * ndarray[int64_t, ndim=2] nobs * * nobs = np.zeros(( out).shape, dtype=np.int64) # <<<<<<<<<<<<<< * resx = np.empty(( out).shape, dtype=object) * */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1993; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_zeros); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1993; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_out), __pyx_n_s_shape); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1993; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1993; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1993; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1993; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_int64); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1993; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 1993; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyObject_Call(__pyx_t_2, __pyx_t_3, __pyx_t_1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1993; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 1993; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_6 = ((PyArrayObject *)__pyx_t_5); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer); __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_nobs.rcbuffer->pybuffer, (PyObject*)__pyx_v_nobs, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_pybuffernd_nobs.diminfo[0].strides = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_nobs.diminfo[0].shape = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_nobs.diminfo[1].strides = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_nobs.diminfo[1].shape = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.shape[1]; if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1993; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_6 = 0; __pyx_v_nobs = ((PyArrayObject *)__pyx_t_5); __pyx_t_5 = 0; /* "pandas/algos.pyx":1994 * * nobs = np.zeros(( out).shape, dtype=np.int64) * resx = np.empty(( out).shape, dtype=object) # <<<<<<<<<<<<<< * * N, K = ( values).shape */ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1994; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_empty); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1994; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_out), __pyx_n_s_shape); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1994; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1994; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyDict_New(); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1994; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_dtype, __pyx_builtin_object) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1994; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_2 = PyObject_Call(__pyx_t_1, __pyx_t_3, __pyx_t_5); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1994; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1994; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_11 = ((PyArrayObject *)__pyx_t_2); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_resx.rcbuffer->pybuffer); __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_resx.rcbuffer->pybuffer, (PyObject*)__pyx_t_11, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_resx.rcbuffer->pybuffer, (PyObject*)__pyx_v_resx, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_pybuffernd_resx.diminfo[0].strides = __pyx_pybuffernd_resx.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_resx.diminfo[0].shape = __pyx_pybuffernd_resx.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_resx.diminfo[1].strides = __pyx_pybuffernd_resx.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_resx.diminfo[1].shape = __pyx_pybuffernd_resx.rcbuffer->pybuffer.shape[1]; if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1994; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_11 = 0; __pyx_v_resx = ((PyArrayObject *)__pyx_t_2); __pyx_t_2 = 0; /* "pandas/algos.pyx":1996 * resx = np.empty(( out).shape, dtype=object) * * N, K = ( values).shape # <<<<<<<<<<<<<< * * for i in range(N): */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_values), __pyx_n_s_shape); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1996; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if ((likely(PyTuple_CheckExact(__pyx_t_2))) || (PyList_CheckExact(__pyx_t_2))) { PyObject* sequence = __pyx_t_2; #if CYTHON_COMPILING_IN_CPYTHON Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1996; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_5 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1); } else { __pyx_t_5 = PyList_GET_ITEM(sequence, 0); __pyx_t_3 = PyList_GET_ITEM(sequence, 1); } __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(__pyx_t_3); #else __pyx_t_5 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1996; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1996; __pyx_clineno = __LINE__; goto __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_1 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1996; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_12 = Py_TYPE(__pyx_t_1)->tp_iternext; index = 0; __pyx_t_5 = __pyx_t_12(__pyx_t_1); if (unlikely(!__pyx_t_5)) goto __pyx_L3_unpacking_failed; __Pyx_GOTREF(__pyx_t_5); index = 1; __pyx_t_3 = __pyx_t_12(__pyx_t_1); if (unlikely(!__pyx_t_3)) goto __pyx_L3_unpacking_failed; __Pyx_GOTREF(__pyx_t_3); if (__Pyx_IternextUnpackEndCheck(__pyx_t_12(__pyx_t_1), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1996; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_12 = NULL; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L4_unpacking_done; __pyx_L3_unpacking_failed:; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_12 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1996; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_L4_unpacking_done:; } __pyx_t_13 = __Pyx_PyIndex_AsSsize_t(__pyx_t_5); if (unlikely((__pyx_t_13 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1996; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_14 = __Pyx_PyIndex_AsSsize_t(__pyx_t_3); if (unlikely((__pyx_t_14 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1996; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_N = __pyx_t_13; __pyx_v_K = __pyx_t_14; /* "pandas/algos.pyx":1998 * N, K = ( values).shape * * for i in range(N): # <<<<<<<<<<<<<< * lab = labels[i] * if lab < 0: */ __pyx_t_14 = __pyx_v_N; for (__pyx_t_13 = 0; __pyx_t_13 < __pyx_t_14; __pyx_t_13+=1) { __pyx_v_i = __pyx_t_13; /* "pandas/algos.pyx":1999 * * for i in range(N): * lab = labels[i] # <<<<<<<<<<<<<< * if lab < 0: * continue */ __pyx_t_15 = __pyx_v_i; __pyx_v_lab = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_labels.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_labels.diminfo[0].strides)); /* "pandas/algos.pyx":2000 * for i in range(N): * lab = labels[i] * if lab < 0: # <<<<<<<<<<<<<< * continue * */ __pyx_t_16 = ((__pyx_v_lab < 0) != 0); if (__pyx_t_16) { /* "pandas/algos.pyx":2001 * lab = labels[i] * if lab < 0: * continue # <<<<<<<<<<<<<< * * counts[lab] += 1 */ goto __pyx_L5_continue; } /* "pandas/algos.pyx":2003 * continue * * counts[lab] += 1 # <<<<<<<<<<<<<< * for j in range(K): * val = values[i, j] */ __pyx_t_17 = __pyx_v_lab; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_counts.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_counts.diminfo[0].strides) += 1; /* "pandas/algos.pyx":2004 * * counts[lab] += 1 * for j in range(K): # <<<<<<<<<<<<<< * val = values[i, j] * */ __pyx_t_18 = __pyx_v_K; for (__pyx_t_19 = 0; __pyx_t_19 < __pyx_t_18; __pyx_t_19+=1) { __pyx_v_j = __pyx_t_19; /* "pandas/algos.pyx":2005 * counts[lab] += 1 * for j in range(K): * val = values[i, j] # <<<<<<<<<<<<<< * * # not nan */ __pyx_t_20 = __pyx_v_i; __pyx_t_21 = __pyx_v_j; __pyx_t_2 = (PyObject *) *__Pyx_BufPtrStrided2d(PyObject **, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_21, __pyx_pybuffernd_values.diminfo[1].strides); __Pyx_INCREF((PyObject*)__pyx_t_2); __Pyx_XDECREF_SET(__pyx_v_val, __pyx_t_2); __pyx_t_2 = 0; /* "pandas/algos.pyx":2008 * * # not nan * if val == val: # <<<<<<<<<<<<<< * nobs[lab, j] += 1 * resx[lab, j] = val */ __pyx_t_2 = PyObject_RichCompare(__pyx_v_val, __pyx_v_val, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2008; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_16 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_16 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2008; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_16) { /* "pandas/algos.pyx":2009 * # not nan * if val == val: * nobs[lab, j] += 1 # <<<<<<<<<<<<<< * resx[lab, j] = val * */ __pyx_t_22 = __pyx_v_lab; __pyx_t_23 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_nobs.rcbuffer->pybuffer.buf, __pyx_t_22, __pyx_pybuffernd_nobs.diminfo[0].strides, __pyx_t_23, __pyx_pybuffernd_nobs.diminfo[1].strides) += 1; /* "pandas/algos.pyx":2010 * if val == val: * nobs[lab, j] += 1 * resx[lab, j] = val # <<<<<<<<<<<<<< * * for i in range(len(counts)): */ __pyx_t_24 = __pyx_v_lab; __pyx_t_25 = __pyx_v_j; __pyx_t_26 = __Pyx_BufPtrStrided2d(PyObject **, __pyx_pybuffernd_resx.rcbuffer->pybuffer.buf, __pyx_t_24, __pyx_pybuffernd_resx.diminfo[0].strides, __pyx_t_25, __pyx_pybuffernd_resx.diminfo[1].strides); __Pyx_GOTREF(*__pyx_t_26); __Pyx_INCREF(__pyx_v_val); __Pyx_DECREF(*__pyx_t_26); *__pyx_t_26 = __pyx_v_val; __Pyx_GIVEREF(*__pyx_t_26); goto __pyx_L10; } __pyx_L10:; } __pyx_L5_continue:; } /* "pandas/algos.pyx":2012 * resx[lab, j] = val * * for i in range(len(counts)): # <<<<<<<<<<<<<< * for j in range(K): * if nobs[i, j] == 0: */ __pyx_t_14 = PyObject_Length(((PyObject *)__pyx_v_counts)); if (unlikely(__pyx_t_14 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2012; __pyx_clineno = __LINE__; goto __pyx_L1_error;} for (__pyx_t_13 = 0; __pyx_t_13 < __pyx_t_14; __pyx_t_13+=1) { __pyx_v_i = __pyx_t_13; /* "pandas/algos.pyx":2013 * * for i in range(len(counts)): * for j in range(K): # <<<<<<<<<<<<<< * if nobs[i, j] == 0: * out[i, j] = nan */ __pyx_t_18 = __pyx_v_K; for (__pyx_t_19 = 0; __pyx_t_19 < __pyx_t_18; __pyx_t_19+=1) { __pyx_v_j = __pyx_t_19; /* "pandas/algos.pyx":2014 * for i in range(len(counts)): * for j in range(K): * if nobs[i, j] == 0: # <<<<<<<<<<<<<< * out[i, j] = nan * else: */ __pyx_t_27 = __pyx_v_i; __pyx_t_28 = __pyx_v_j; __pyx_t_16 = (((*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_nobs.rcbuffer->pybuffer.buf, __pyx_t_27, __pyx_pybuffernd_nobs.diminfo[0].strides, __pyx_t_28, __pyx_pybuffernd_nobs.diminfo[1].strides)) == 0) != 0); if (__pyx_t_16) { /* "pandas/algos.pyx":2015 * for j in range(K): * if nobs[i, j] == 0: * out[i, j] = nan # <<<<<<<<<<<<<< * else: * out[i, j] = resx[i, j] */ __pyx_t_2 = PyFloat_FromDouble(__pyx_v_6pandas_5algos_nan); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2015; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_29 = __pyx_v_i; __pyx_t_30 = __pyx_v_j; __pyx_t_26 = __Pyx_BufPtrStrided2d(PyObject **, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_29, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_30, __pyx_pybuffernd_out.diminfo[1].strides); __Pyx_GOTREF(*__pyx_t_26); __Pyx_INCREF(__pyx_t_2); __Pyx_DECREF(*__pyx_t_26); *__pyx_t_26 = __pyx_t_2; __Pyx_GIVEREF(*__pyx_t_26); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; goto __pyx_L15; } /*else*/ { /* "pandas/algos.pyx":2017 * out[i, j] = nan * else: * out[i, j] = resx[i, j] # <<<<<<<<<<<<<< * * @cython.boundscheck(False) */ __pyx_t_31 = __pyx_v_i; __pyx_t_32 = __pyx_v_j; __pyx_t_2 = (PyObject *) *__Pyx_BufPtrStrided2d(PyObject **, __pyx_pybuffernd_resx.rcbuffer->pybuffer.buf, __pyx_t_31, __pyx_pybuffernd_resx.diminfo[0].strides, __pyx_t_32, __pyx_pybuffernd_resx.diminfo[1].strides); __Pyx_INCREF((PyObject*)__pyx_t_2); __pyx_t_33 = __pyx_v_i; __pyx_t_34 = __pyx_v_j; __pyx_t_26 = __Pyx_BufPtrStrided2d(PyObject **, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_33, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_34, __pyx_pybuffernd_out.diminfo[1].strides); __Pyx_GOTREF(*__pyx_t_26); __Pyx_INCREF(__pyx_t_2); __Pyx_DECREF(*__pyx_t_26); *__pyx_t_26 = __pyx_t_2; __Pyx_GIVEREF(*__pyx_t_26); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } __pyx_L15:; } } /* "pandas/algos.pyx":1979 * @cython.boundscheck(False) * @cython.wraparound(False) * def group_last_object(ndarray[object, ndim=2] out, # <<<<<<<<<<<<<< * ndarray[int64_t] counts, * ndarray[object, ndim=2] 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_5); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_counts.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_labels.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_resx.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.group_last_object", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_counts.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_labels.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_resx.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF(__pyx_v_val); __Pyx_XDECREF((PyObject *)__pyx_v_resx); __Pyx_XDECREF((PyObject *)__pyx_v_nobs); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/algos.pyx":2021 * @cython.boundscheck(False) * @cython.wraparound(False) * def group_last_bin_object(ndarray[object, ndim=2] out, # <<<<<<<<<<<<<< * ndarray[int64_t] counts, * ndarray[object, ndim=2] values, */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_71group_last_bin_object(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6pandas_5algos_70group_last_bin_object[] = "\n Only aggregates on axis=0\n "; static PyMethodDef __pyx_mdef_6pandas_5algos_71group_last_bin_object = {__Pyx_NAMESTR("group_last_bin_object"), (PyCFunction)__pyx_pw_6pandas_5algos_71group_last_bin_object, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_5algos_70group_last_bin_object)}; static PyObject *__pyx_pw_6pandas_5algos_71group_last_bin_object(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_out = 0; PyArrayObject *__pyx_v_counts = 0; PyArrayObject *__pyx_v_values = 0; PyArrayObject *__pyx_v_bins = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("group_last_bin_object (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_out,&__pyx_n_s_counts,&__pyx_n_s_values,&__pyx_n_s_bins,0}; PyObject* values[4] = {0,0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_out)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_counts)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("group_last_bin_object", 1, 4, 4, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2021; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_values)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("group_last_bin_object", 1, 4, 4, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2021; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_bins)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("group_last_bin_object", 1, 4, 4, 3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2021; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "group_last_bin_object") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2021; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 4) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[3] = PyTuple_GET_ITEM(__pyx_args, 3); } __pyx_v_out = ((PyArrayObject *)values[0]); __pyx_v_counts = ((PyArrayObject *)values[1]); __pyx_v_values = ((PyArrayObject *)values[2]); __pyx_v_bins = ((PyArrayObject *)values[3]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("group_last_bin_object", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2021; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.group_last_bin_object", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_5numpy_ndarray, 1, "out", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2021; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_counts), __pyx_ptype_5numpy_ndarray, 1, "counts", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2022; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2023; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_bins), __pyx_ptype_5numpy_ndarray, 1, "bins", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2024; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_70group_last_bin_object(__pyx_self, __pyx_v_out, __pyx_v_counts, __pyx_v_values, __pyx_v_bins); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5algos_70group_last_bin_object(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_out, PyArrayObject *__pyx_v_counts, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_bins) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_N; Py_ssize_t __pyx_v_K; Py_ssize_t __pyx_v_ngroups; Py_ssize_t __pyx_v_b; PyObject *__pyx_v_val = 0; PyArrayObject *__pyx_v_resx = 0; PyArrayObject *__pyx_v_nobs = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_bins; __Pyx_Buffer __pyx_pybuffer_bins; __Pyx_LocalBuf_ND __pyx_pybuffernd_counts; __Pyx_Buffer __pyx_pybuffer_counts; __Pyx_LocalBuf_ND __pyx_pybuffernd_nobs; __Pyx_Buffer __pyx_pybuffer_nobs; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_resx; __Pyx_Buffer __pyx_pybuffer_resx; __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; 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; PyArrayObject *__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; PyObject *(*__pyx_t_16)(PyObject *); Py_ssize_t __pyx_t_17; int __pyx_t_18; int __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; PyObject **__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; Py_ssize_t __pyx_t_37; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("group_last_bin_object", 0); __pyx_pybuffer_resx.pybuffer.buf = NULL; __pyx_pybuffer_resx.refcount = 0; __pyx_pybuffernd_resx.data = NULL; __pyx_pybuffernd_resx.rcbuffer = &__pyx_pybuffer_resx; __pyx_pybuffer_nobs.pybuffer.buf = NULL; __pyx_pybuffer_nobs.refcount = 0; __pyx_pybuffernd_nobs.data = NULL; __pyx_pybuffernd_nobs.rcbuffer = &__pyx_pybuffer_nobs; __pyx_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; __pyx_pybuffer_counts.pybuffer.buf = NULL; __pyx_pybuffer_counts.refcount = 0; __pyx_pybuffernd_counts.data = NULL; __pyx_pybuffernd_counts.rcbuffer = &__pyx_pybuffer_counts; __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_bins.pybuffer.buf = NULL; __pyx_pybuffer_bins.refcount = 0; __pyx_pybuffernd_bins.data = NULL; __pyx_pybuffernd_bins.rcbuffer = &__pyx_pybuffer_bins; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_v_out, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2021; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; __pyx_pybuffernd_out.diminfo[1].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_out.diminfo[1].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[1]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_counts.rcbuffer->pybuffer, (PyObject*)__pyx_v_counts, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2021; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_counts.diminfo[0].strides = __pyx_pybuffernd_counts.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_counts.diminfo[0].shape = __pyx_pybuffernd_counts.rcbuffer->pybuffer.shape[0]; { __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, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2021; __pyx_clineno = __LINE__; goto __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_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_bins.rcbuffer->pybuffer, (PyObject*)__pyx_v_bins, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2021; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_bins.diminfo[0].strides = __pyx_pybuffernd_bins.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_bins.diminfo[0].shape = __pyx_pybuffernd_bins.rcbuffer->pybuffer.shape[0]; /* "pandas/algos.pyx":2035 * ndarray[float64_t, ndim=2] nobs * * nobs = np.zeros(( out).shape, dtype=np.float64) # <<<<<<<<<<<<<< * resx = np.empty(( out).shape, dtype=object) * */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2035; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_zeros); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2035; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_out), __pyx_n_s_shape); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2035; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2035; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2035; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2035; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_float64); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2035; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 2035; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyObject_Call(__pyx_t_2, __pyx_t_3, __pyx_t_1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2035; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 2035; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_6 = ((PyArrayObject *)__pyx_t_5); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer); __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_nobs.rcbuffer->pybuffer, (PyObject*)__pyx_v_nobs, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_pybuffernd_nobs.diminfo[0].strides = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_nobs.diminfo[0].shape = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_nobs.diminfo[1].strides = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_nobs.diminfo[1].shape = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.shape[1]; if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2035; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_6 = 0; __pyx_v_nobs = ((PyArrayObject *)__pyx_t_5); __pyx_t_5 = 0; /* "pandas/algos.pyx":2036 * * nobs = np.zeros(( out).shape, dtype=np.float64) * resx = np.empty(( out).shape, dtype=object) # <<<<<<<<<<<<<< * * if bins[len(bins) - 1] == len(values): */ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2036; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_empty); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2036; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_out), __pyx_n_s_shape); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2036; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2036; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyDict_New(); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2036; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_dtype, __pyx_builtin_object) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2036; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_2 = PyObject_Call(__pyx_t_1, __pyx_t_3, __pyx_t_5); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2036; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2036; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_11 = ((PyArrayObject *)__pyx_t_2); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_resx.rcbuffer->pybuffer); __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_resx.rcbuffer->pybuffer, (PyObject*)__pyx_t_11, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_resx.rcbuffer->pybuffer, (PyObject*)__pyx_v_resx, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_pybuffernd_resx.diminfo[0].strides = __pyx_pybuffernd_resx.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_resx.diminfo[0].shape = __pyx_pybuffernd_resx.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_resx.diminfo[1].strides = __pyx_pybuffernd_resx.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_resx.diminfo[1].shape = __pyx_pybuffernd_resx.rcbuffer->pybuffer.shape[1]; if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2036; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_11 = 0; __pyx_v_resx = ((PyArrayObject *)__pyx_t_2); __pyx_t_2 = 0; /* "pandas/algos.pyx":2038 * resx = np.empty(( out).shape, dtype=object) * * if bins[len(bins) - 1] == len(values): # <<<<<<<<<<<<<< * ngroups = len(bins) * else: */ __pyx_t_12 = PyObject_Length(((PyObject *)__pyx_v_bins)); if (unlikely(__pyx_t_12 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2038; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_13 = (__pyx_t_12 - 1); __pyx_t_14 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_14 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2038; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_15 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_bins.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_bins.diminfo[0].strides)) == __pyx_t_14) != 0); if (__pyx_t_15) { /* "pandas/algos.pyx":2039 * * if bins[len(bins) - 1] == len(values): * ngroups = len(bins) # <<<<<<<<<<<<<< * else: * ngroups = len(bins) + 1 */ __pyx_t_14 = PyObject_Length(((PyObject *)__pyx_v_bins)); if (unlikely(__pyx_t_14 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2039; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_ngroups = __pyx_t_14; goto __pyx_L3; } /*else*/ { /* "pandas/algos.pyx":2041 * ngroups = len(bins) * else: * ngroups = len(bins) + 1 # <<<<<<<<<<<<<< * * N, K = ( values).shape */ __pyx_t_14 = PyObject_Length(((PyObject *)__pyx_v_bins)); if (unlikely(__pyx_t_14 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2041; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_ngroups = (__pyx_t_14 + 1); } __pyx_L3:; /* "pandas/algos.pyx":2043 * ngroups = len(bins) + 1 * * N, K = ( values).shape # <<<<<<<<<<<<<< * * b = 0 */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_values), __pyx_n_s_shape); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2043; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if ((likely(PyTuple_CheckExact(__pyx_t_2))) || (PyList_CheckExact(__pyx_t_2))) { PyObject* sequence = __pyx_t_2; #if CYTHON_COMPILING_IN_CPYTHON Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2043; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_5 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1); } else { __pyx_t_5 = PyList_GET_ITEM(sequence, 0); __pyx_t_3 = PyList_GET_ITEM(sequence, 1); } __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(__pyx_t_3); #else __pyx_t_5 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2043; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2043; __pyx_clineno = __LINE__; goto __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_1 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2043; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_16 = Py_TYPE(__pyx_t_1)->tp_iternext; index = 0; __pyx_t_5 = __pyx_t_16(__pyx_t_1); if (unlikely(!__pyx_t_5)) goto __pyx_L4_unpacking_failed; __Pyx_GOTREF(__pyx_t_5); index = 1; __pyx_t_3 = __pyx_t_16(__pyx_t_1); if (unlikely(!__pyx_t_3)) goto __pyx_L4_unpacking_failed; __Pyx_GOTREF(__pyx_t_3); if (__Pyx_IternextUnpackEndCheck(__pyx_t_16(__pyx_t_1), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2043; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_16 = NULL; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L5_unpacking_done; __pyx_L4_unpacking_failed:; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_16 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2043; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_L5_unpacking_done:; } __pyx_t_14 = __Pyx_PyIndex_AsSsize_t(__pyx_t_5); if (unlikely((__pyx_t_14 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2043; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_12 = __Pyx_PyIndex_AsSsize_t(__pyx_t_3); if (unlikely((__pyx_t_12 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2043; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_N = __pyx_t_14; __pyx_v_K = __pyx_t_12; /* "pandas/algos.pyx":2045 * N, K = ( values).shape * * b = 0 # <<<<<<<<<<<<<< * for i in range(N): * while b < ngroups - 1 and i >= bins[b]: */ __pyx_v_b = 0; /* "pandas/algos.pyx":2046 * * b = 0 * for i in range(N): # <<<<<<<<<<<<<< * while b < ngroups - 1 and i >= bins[b]: * b += 1 */ __pyx_t_12 = __pyx_v_N; for (__pyx_t_14 = 0; __pyx_t_14 < __pyx_t_12; __pyx_t_14+=1) { __pyx_v_i = __pyx_t_14; /* "pandas/algos.pyx":2047 * b = 0 * for i in range(N): * while b < ngroups - 1 and i >= bins[b]: # <<<<<<<<<<<<<< * b += 1 * */ while (1) { __pyx_t_15 = ((__pyx_v_b < (__pyx_v_ngroups - 1)) != 0); if (__pyx_t_15) { __pyx_t_17 = __pyx_v_b; __pyx_t_18 = ((__pyx_v_i >= (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_bins.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_bins.diminfo[0].strides))) != 0); __pyx_t_19 = __pyx_t_18; } else { __pyx_t_19 = __pyx_t_15; } if (!__pyx_t_19) break; /* "pandas/algos.pyx":2048 * for i in range(N): * while b < ngroups - 1 and i >= bins[b]: * b += 1 # <<<<<<<<<<<<<< * * counts[b] += 1 */ __pyx_v_b = (__pyx_v_b + 1); } /* "pandas/algos.pyx":2050 * b += 1 * * counts[b] += 1 # <<<<<<<<<<<<<< * for j in range(K): * val = values[i, j] */ __pyx_t_20 = __pyx_v_b; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_counts.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_counts.diminfo[0].strides) += 1; /* "pandas/algos.pyx":2051 * * counts[b] += 1 * for j in range(K): # <<<<<<<<<<<<<< * val = values[i, j] * */ __pyx_t_21 = __pyx_v_K; for (__pyx_t_22 = 0; __pyx_t_22 < __pyx_t_21; __pyx_t_22+=1) { __pyx_v_j = __pyx_t_22; /* "pandas/algos.pyx":2052 * counts[b] += 1 * for j in range(K): * val = values[i, j] # <<<<<<<<<<<<<< * * # not nan */ __pyx_t_23 = __pyx_v_i; __pyx_t_24 = __pyx_v_j; __pyx_t_2 = (PyObject *) *__Pyx_BufPtrStrided2d(PyObject **, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_23, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_24, __pyx_pybuffernd_values.diminfo[1].strides); __Pyx_INCREF((PyObject*)__pyx_t_2); __Pyx_XDECREF_SET(__pyx_v_val, __pyx_t_2); __pyx_t_2 = 0; /* "pandas/algos.pyx":2055 * * # not nan * if val == val: # <<<<<<<<<<<<<< * nobs[b, j] += 1 * resx[b, j] = val */ __pyx_t_2 = PyObject_RichCompare(__pyx_v_val, __pyx_v_val, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2055; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_19 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_19 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2055; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_19) { /* "pandas/algos.pyx":2056 * # not nan * if val == val: * nobs[b, j] += 1 # <<<<<<<<<<<<<< * resx[b, j] = val * */ __pyx_t_25 = __pyx_v_b; __pyx_t_26 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_nobs.rcbuffer->pybuffer.buf, __pyx_t_25, __pyx_pybuffernd_nobs.diminfo[0].strides, __pyx_t_26, __pyx_pybuffernd_nobs.diminfo[1].strides) += 1.0; /* "pandas/algos.pyx":2057 * if val == val: * nobs[b, j] += 1 * resx[b, j] = val # <<<<<<<<<<<<<< * * for i in range(ngroups): */ __pyx_t_27 = __pyx_v_b; __pyx_t_28 = __pyx_v_j; __pyx_t_29 = __Pyx_BufPtrStrided2d(PyObject **, __pyx_pybuffernd_resx.rcbuffer->pybuffer.buf, __pyx_t_27, __pyx_pybuffernd_resx.diminfo[0].strides, __pyx_t_28, __pyx_pybuffernd_resx.diminfo[1].strides); __Pyx_GOTREF(*__pyx_t_29); __Pyx_INCREF(__pyx_v_val); __Pyx_DECREF(*__pyx_t_29); *__pyx_t_29 = __pyx_v_val; __Pyx_GIVEREF(*__pyx_t_29); goto __pyx_L12; } __pyx_L12:; } } /* "pandas/algos.pyx":2059 * resx[b, j] = val * * for i in range(ngroups): # <<<<<<<<<<<<<< * for j in range(K): * if nobs[i, j] == 0: */ __pyx_t_12 = __pyx_v_ngroups; for (__pyx_t_14 = 0; __pyx_t_14 < __pyx_t_12; __pyx_t_14+=1) { __pyx_v_i = __pyx_t_14; /* "pandas/algos.pyx":2060 * * for i in range(ngroups): * for j in range(K): # <<<<<<<<<<<<<< * if nobs[i, j] == 0: * out[i, j] = nan */ __pyx_t_21 = __pyx_v_K; for (__pyx_t_22 = 0; __pyx_t_22 < __pyx_t_21; __pyx_t_22+=1) { __pyx_v_j = __pyx_t_22; /* "pandas/algos.pyx":2061 * for i in range(ngroups): * for j in range(K): * if nobs[i, j] == 0: # <<<<<<<<<<<<<< * out[i, j] = nan * else: */ __pyx_t_30 = __pyx_v_i; __pyx_t_31 = __pyx_v_j; __pyx_t_19 = (((*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_nobs.rcbuffer->pybuffer.buf, __pyx_t_30, __pyx_pybuffernd_nobs.diminfo[0].strides, __pyx_t_31, __pyx_pybuffernd_nobs.diminfo[1].strides)) == 0.0) != 0); if (__pyx_t_19) { /* "pandas/algos.pyx":2062 * for j in range(K): * if nobs[i, j] == 0: * out[i, j] = nan # <<<<<<<<<<<<<< * else: * out[i, j] = resx[i, j] */ __pyx_t_2 = PyFloat_FromDouble(__pyx_v_6pandas_5algos_nan); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2062; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_32 = __pyx_v_i; __pyx_t_33 = __pyx_v_j; __pyx_t_29 = __Pyx_BufPtrStrided2d(PyObject **, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_32, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_33, __pyx_pybuffernd_out.diminfo[1].strides); __Pyx_GOTREF(*__pyx_t_29); __Pyx_INCREF(__pyx_t_2); __Pyx_DECREF(*__pyx_t_29); *__pyx_t_29 = __pyx_t_2; __Pyx_GIVEREF(*__pyx_t_29); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; goto __pyx_L17; } /*else*/ { /* "pandas/algos.pyx":2064 * out[i, j] = nan * else: * out[i, j] = resx[i, j] # <<<<<<<<<<<<<< * * */ __pyx_t_34 = __pyx_v_i; __pyx_t_35 = __pyx_v_j; __pyx_t_2 = (PyObject *) *__Pyx_BufPtrStrided2d(PyObject **, __pyx_pybuffernd_resx.rcbuffer->pybuffer.buf, __pyx_t_34, __pyx_pybuffernd_resx.diminfo[0].strides, __pyx_t_35, __pyx_pybuffernd_resx.diminfo[1].strides); __Pyx_INCREF((PyObject*)__pyx_t_2); __pyx_t_36 = __pyx_v_i; __pyx_t_37 = __pyx_v_j; __pyx_t_29 = __Pyx_BufPtrStrided2d(PyObject **, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_36, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_37, __pyx_pybuffernd_out.diminfo[1].strides); __Pyx_GOTREF(*__pyx_t_29); __Pyx_INCREF(__pyx_t_2); __Pyx_DECREF(*__pyx_t_29); *__pyx_t_29 = __pyx_t_2; __Pyx_GIVEREF(*__pyx_t_29); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } __pyx_L17:; } } /* "pandas/algos.pyx":2021 * @cython.boundscheck(False) * @cython.wraparound(False) * def group_last_bin_object(ndarray[object, ndim=2] out, # <<<<<<<<<<<<<< * ndarray[int64_t] counts, * ndarray[object, ndim=2] 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_5); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_bins.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_counts.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_resx.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.group_last_bin_object", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_bins.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_counts.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_resx.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF(__pyx_v_val); __Pyx_XDECREF((PyObject *)__pyx_v_resx); __Pyx_XDECREF((PyObject *)__pyx_v_nobs); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/algos.pyx":2071 * # median * * def group_median(ndarray[float64_t, ndim=2] out, # <<<<<<<<<<<<<< * ndarray[int64_t] counts, * ndarray[float64_t, ndim=2] values, */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_73group_median(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6pandas_5algos_72group_median[] = "\n Only aggregates on axis=0\n "; static PyMethodDef __pyx_mdef_6pandas_5algos_73group_median = {__Pyx_NAMESTR("group_median"), (PyCFunction)__pyx_pw_6pandas_5algos_73group_median, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_5algos_72group_median)}; static PyObject *__pyx_pw_6pandas_5algos_73group_median(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_out = 0; PyArrayObject *__pyx_v_counts = 0; PyArrayObject *__pyx_v_values = 0; PyArrayObject *__pyx_v_labels = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("group_median (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_out,&__pyx_n_s_counts,&__pyx_n_s_values,&__pyx_n_s_labels,0}; PyObject* values[4] = {0,0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_out)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_counts)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("group_median", 1, 4, 4, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2071; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_values)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("group_median", 1, 4, 4, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2071; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_labels)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("group_median", 1, 4, 4, 3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2071; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "group_median") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2071; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 4) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[3] = PyTuple_GET_ITEM(__pyx_args, 3); } __pyx_v_out = ((PyArrayObject *)values[0]); __pyx_v_counts = ((PyArrayObject *)values[1]); __pyx_v_values = ((PyArrayObject *)values[2]); __pyx_v_labels = ((PyArrayObject *)values[3]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("group_median", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2071; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.group_median", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_5numpy_ndarray, 1, "out", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2071; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_counts), __pyx_ptype_5numpy_ndarray, 1, "counts", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2072; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2073; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_labels), __pyx_ptype_5numpy_ndarray, 1, "labels", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2074; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_72group_median(__pyx_self, __pyx_v_out, __pyx_v_counts, __pyx_v_values, __pyx_v_labels); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5algos_72group_median(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_out, PyArrayObject *__pyx_v_counts, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_labels) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_N; Py_ssize_t __pyx_v_K; Py_ssize_t __pyx_v_ngroups; Py_ssize_t __pyx_v_size; PyArrayObject *__pyx_v__counts = 0; PyArrayObject *__pyx_v_data = 0; __pyx_t_5numpy_float64_t *__pyx_v_ptr; PyObject *__pyx_v_indexer = NULL; __Pyx_LocalBuf_ND __pyx_pybuffernd__counts; __Pyx_Buffer __pyx_pybuffer__counts; __Pyx_LocalBuf_ND __pyx_pybuffernd_counts; __Pyx_Buffer __pyx_pybuffer_counts; __Pyx_LocalBuf_ND __pyx_pybuffernd_labels; __Pyx_Buffer __pyx_pybuffer_labels; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __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)(PyObject *); Py_ssize_t __pyx_t_7; PyArrayObject *__pyx_t_8 = NULL; int __pyx_t_9; PyObject *__pyx_t_10 = NULL; PyObject *__pyx_t_11 = NULL; PyObject *__pyx_t_12 = NULL; PyObject *__pyx_t_13 = NULL; long __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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("group_median", 0); __pyx_pybuffer__counts.pybuffer.buf = NULL; __pyx_pybuffer__counts.refcount = 0; __pyx_pybuffernd__counts.data = NULL; __pyx_pybuffernd__counts.rcbuffer = &__pyx_pybuffer__counts; __pyx_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; __pyx_pybuffer_counts.pybuffer.buf = NULL; __pyx_pybuffer_counts.refcount = 0; __pyx_pybuffernd_counts.data = NULL; __pyx_pybuffernd_counts.rcbuffer = &__pyx_pybuffer_counts; __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_labels.pybuffer.buf = NULL; __pyx_pybuffer_labels.refcount = 0; __pyx_pybuffernd_labels.data = NULL; __pyx_pybuffernd_labels.rcbuffer = &__pyx_pybuffer_labels; { __Pyx_BufFmt_StackElem __pyx_stack[1]; 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, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2071; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; __pyx_pybuffernd_out.diminfo[1].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_out.diminfo[1].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[1]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_counts.rcbuffer->pybuffer, (PyObject*)__pyx_v_counts, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2071; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_counts.diminfo[0].strides = __pyx_pybuffernd_counts.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_counts.diminfo[0].shape = __pyx_pybuffernd_counts.rcbuffer->pybuffer.shape[0]; { __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, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2071; __pyx_clineno = __LINE__; goto __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_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_labels.rcbuffer->pybuffer, (PyObject*)__pyx_v_labels, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2071; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_labels.diminfo[0].strides = __pyx_pybuffernd_labels.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_labels.diminfo[0].shape = __pyx_pybuffernd_labels.rcbuffer->pybuffer.shape[0]; /* "pandas/algos.pyx":2083 * ndarray data * float64_t* ptr * ngroups = len(counts) # <<<<<<<<<<<<<< * N, K = ( values).shape * */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_counts)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2083; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_ngroups = __pyx_t_1; /* "pandas/algos.pyx":2084 * float64_t* ptr * ngroups = len(counts) * N, K = ( values).shape # <<<<<<<<<<<<<< * * indexer, _counts = groupsort_indexer(labels, ngroups) */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_values), __pyx_n_s_shape); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2084; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if ((likely(PyTuple_CheckExact(__pyx_t_2))) || (PyList_CheckExact(__pyx_t_2))) { PyObject* sequence = __pyx_t_2; #if CYTHON_COMPILING_IN_CPYTHON Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2084; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_4 = PyTuple_GET_ITEM(sequence, 1); } else { __pyx_t_3 = PyList_GET_ITEM(sequence, 0); __pyx_t_4 = PyList_GET_ITEM(sequence, 1); } __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(__pyx_t_4); #else __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2084; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2084; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); #endif __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } else { Py_ssize_t index = -1; __pyx_t_5 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2084; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_6 = Py_TYPE(__pyx_t_5)->tp_iternext; index = 0; __pyx_t_3 = __pyx_t_6(__pyx_t_5); if (unlikely(!__pyx_t_3)) goto __pyx_L3_unpacking_failed; __Pyx_GOTREF(__pyx_t_3); index = 1; __pyx_t_4 = __pyx_t_6(__pyx_t_5); if (unlikely(!__pyx_t_4)) goto __pyx_L3_unpacking_failed; __Pyx_GOTREF(__pyx_t_4); if (__Pyx_IternextUnpackEndCheck(__pyx_t_6(__pyx_t_5), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2084; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_6 = NULL; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; goto __pyx_L4_unpacking_done; __pyx_L3_unpacking_failed:; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_6 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2084; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_L4_unpacking_done:; } __pyx_t_1 = __Pyx_PyIndex_AsSsize_t(__pyx_t_3); if (unlikely((__pyx_t_1 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2084; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_7 = __Pyx_PyIndex_AsSsize_t(__pyx_t_4); if (unlikely((__pyx_t_7 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2084; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_N = __pyx_t_1; __pyx_v_K = __pyx_t_7; /* "pandas/algos.pyx":2086 * N, K = ( values).shape * * indexer, _counts = groupsort_indexer(labels, ngroups) # <<<<<<<<<<<<<< * counts[:] = _counts[1:] * */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_groupsort_indexer); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2086; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = PyInt_FromSsize_t(__pyx_v_ngroups); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2086; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2086; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(((PyObject *)__pyx_v_labels)); PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_v_labels)); __Pyx_GIVEREF(((PyObject *)__pyx_v_labels)); PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyObject_Call(__pyx_t_2, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2086; __pyx_clineno = __LINE__; goto __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; if ((likely(PyTuple_CheckExact(__pyx_t_4))) || (PyList_CheckExact(__pyx_t_4))) { PyObject* sequence = __pyx_t_4; #if CYTHON_COMPILING_IN_CPYTHON Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2086; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_2 = PyTuple_GET_ITEM(sequence, 1); } else { __pyx_t_3 = PyList_GET_ITEM(sequence, 0); __pyx_t_2 = PyList_GET_ITEM(sequence, 1); } __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(__pyx_t_2); #else __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2086; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2086; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); #endif __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else { Py_ssize_t index = -1; __pyx_t_5 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2086; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_6 = Py_TYPE(__pyx_t_5)->tp_iternext; index = 0; __pyx_t_3 = __pyx_t_6(__pyx_t_5); if (unlikely(!__pyx_t_3)) goto __pyx_L5_unpacking_failed; __Pyx_GOTREF(__pyx_t_3); index = 1; __pyx_t_2 = __pyx_t_6(__pyx_t_5); if (unlikely(!__pyx_t_2)) goto __pyx_L5_unpacking_failed; __Pyx_GOTREF(__pyx_t_2); if (__Pyx_IternextUnpackEndCheck(__pyx_t_6(__pyx_t_5), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2086; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_6 = NULL; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; goto __pyx_L6_unpacking_done; __pyx_L5_unpacking_failed:; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_6 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2086; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_L6_unpacking_done:; } if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2086; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_indexer = __pyx_t_3; __pyx_t_3 = 0; __pyx_t_8 = ((PyArrayObject *)__pyx_t_2); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd__counts.rcbuffer->pybuffer); __pyx_t_9 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd__counts.rcbuffer->pybuffer, (PyObject*)__pyx_t_8, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_9 < 0)) { PyErr_Fetch(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd__counts.rcbuffer->pybuffer, (PyObject*)__pyx_v__counts, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_11); Py_XDECREF(__pyx_t_12); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_10, __pyx_t_11, __pyx_t_12); } } __pyx_pybuffernd__counts.diminfo[0].strides = __pyx_pybuffernd__counts.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd__counts.diminfo[0].shape = __pyx_pybuffernd__counts.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2086; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_8 = 0; __pyx_v__counts = ((PyArrayObject *)__pyx_t_2); __pyx_t_2 = 0; /* "pandas/algos.pyx":2087 * * indexer, _counts = groupsort_indexer(labels, ngroups) * counts[:] = _counts[1:] # <<<<<<<<<<<<<< * * data = np.empty((K, N), dtype=np.float64) */ __pyx_t_4 = __Pyx_PyObject_GetSlice(((PyObject *)__pyx_v__counts), 1, 0, NULL, NULL, &__pyx_slice__31, 1, 0, 1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2087; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); if (__Pyx_PyObject_SetSlice(((PyObject *)__pyx_v_counts), __pyx_t_4, 0, 0, NULL, NULL, &__pyx_slice__32, 0, 0, 1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2087; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "pandas/algos.pyx":2089 * counts[:] = _counts[1:] * * data = np.empty((K, N), dtype=np.float64) # <<<<<<<<<<<<<< * ptr = data.data * */ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2089; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_empty); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2089; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyInt_FromSsize_t(__pyx_v_K); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2089; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = PyInt_FromSsize_t(__pyx_v_N); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2089; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2089; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_4 = 0; __pyx_t_3 = 0; __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2089; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyDict_New(); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2089; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2089; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_float64); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2089; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_dtype, __pyx_t_13) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2089; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_13 = PyObject_Call(__pyx_t_2, __pyx_t_3, __pyx_t_5); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2089; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (!(likely(((__pyx_t_13) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_13, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2089; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_data = ((PyArrayObject *)__pyx_t_13); __pyx_t_13 = 0; /* "pandas/algos.pyx":2090 * * data = np.empty((K, N), dtype=np.float64) * ptr = data.data # <<<<<<<<<<<<<< * * take_2d_axis1_float64_float64(values.T, indexer, out=data) */ __pyx_v_ptr = ((__pyx_t_5numpy_float64_t *)__pyx_v_data->data); /* "pandas/algos.pyx":2092 * ptr = data.data * * take_2d_axis1_float64_float64(values.T, indexer, out=data) # <<<<<<<<<<<<<< * * for i in range(K): */ __pyx_t_13 = __Pyx_GetModuleGlobalName(__pyx_n_s_take_2d_axis1_float64_float64); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2092; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_values), __pyx_n_s_T); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2092; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2092; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __Pyx_INCREF(__pyx_v_indexer); PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_indexer); __Pyx_GIVEREF(__pyx_v_indexer); __pyx_t_5 = 0; __pyx_t_5 = PyDict_New(); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2092; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_out, ((PyObject *)__pyx_v_data)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2092; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_2 = PyObject_Call(__pyx_t_13, __pyx_t_3, __pyx_t_5); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2092; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/algos.pyx":2094 * take_2d_axis1_float64_float64(values.T, indexer, out=data) * * for i in range(K): # <<<<<<<<<<<<<< * # exclude NA group * ptr += _counts[0] */ __pyx_t_7 = __pyx_v_K; for (__pyx_t_1 = 0; __pyx_t_1 < __pyx_t_7; __pyx_t_1+=1) { __pyx_v_i = __pyx_t_1; /* "pandas/algos.pyx":2096 * for i in range(K): * # exclude NA group * ptr += _counts[0] # <<<<<<<<<<<<<< * for j in range(ngroups): * size = _counts[j + 1] */ __pyx_t_14 = 0; __pyx_t_9 = -1; if (__pyx_t_14 < 0) { __pyx_t_14 += __pyx_pybuffernd__counts.diminfo[0].shape; if (unlikely(__pyx_t_14 < 0)) __pyx_t_9 = 0; } else if (unlikely(__pyx_t_14 >= __pyx_pybuffernd__counts.diminfo[0].shape)) __pyx_t_9 = 0; if (unlikely(__pyx_t_9 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_9); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2096; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_ptr = (__pyx_v_ptr + (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd__counts.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd__counts.diminfo[0].strides))); /* "pandas/algos.pyx":2097 * # exclude NA group * ptr += _counts[0] * for j in range(ngroups): # <<<<<<<<<<<<<< * size = _counts[j + 1] * out[j, i] = _median_linear(ptr, size) */ __pyx_t_15 = __pyx_v_ngroups; for (__pyx_t_16 = 0; __pyx_t_16 < __pyx_t_15; __pyx_t_16+=1) { __pyx_v_j = __pyx_t_16; /* "pandas/algos.pyx":2098 * ptr += _counts[0] * for j in range(ngroups): * size = _counts[j + 1] # <<<<<<<<<<<<<< * out[j, i] = _median_linear(ptr, size) * ptr += size */ __pyx_t_17 = (__pyx_v_j + 1); __pyx_t_9 = -1; if (__pyx_t_17 < 0) { __pyx_t_17 += __pyx_pybuffernd__counts.diminfo[0].shape; if (unlikely(__pyx_t_17 < 0)) __pyx_t_9 = 0; } else if (unlikely(__pyx_t_17 >= __pyx_pybuffernd__counts.diminfo[0].shape)) __pyx_t_9 = 0; if (unlikely(__pyx_t_9 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_9); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2098; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_size = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd__counts.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd__counts.diminfo[0].strides)); /* "pandas/algos.pyx":2099 * for j in range(ngroups): * size = _counts[j + 1] * out[j, i] = _median_linear(ptr, size) # <<<<<<<<<<<<<< * ptr += size * */ __pyx_t_18 = __pyx_v_j; __pyx_t_19 = __pyx_v_i; __pyx_t_9 = -1; if (__pyx_t_18 < 0) { __pyx_t_18 += __pyx_pybuffernd_out.diminfo[0].shape; if (unlikely(__pyx_t_18 < 0)) __pyx_t_9 = 0; } else if (unlikely(__pyx_t_18 >= __pyx_pybuffernd_out.diminfo[0].shape)) __pyx_t_9 = 0; if (__pyx_t_19 < 0) { __pyx_t_19 += __pyx_pybuffernd_out.diminfo[1].shape; if (unlikely(__pyx_t_19 < 0)) __pyx_t_9 = 1; } else if (unlikely(__pyx_t_19 >= __pyx_pybuffernd_out.diminfo[1].shape)) __pyx_t_9 = 1; if (unlikely(__pyx_t_9 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_9); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2099; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_19, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_f_6pandas_5algos__median_linear(__pyx_v_ptr, __pyx_v_size); /* "pandas/algos.pyx":2100 * size = _counts[j + 1] * out[j, i] = _median_linear(ptr, size) * ptr += size # <<<<<<<<<<<<<< * * */ __pyx_v_ptr = (__pyx_v_ptr + __pyx_v_size); } } /* "pandas/algos.pyx":2071 * # median * * def group_median(ndarray[float64_t, ndim=2] out, # <<<<<<<<<<<<<< * ndarray[int64_t] counts, * ndarray[float64_t, ndim=2] values, */ /* 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_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_13); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd__counts.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_counts.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_labels.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.group_median", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd__counts.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_counts.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_labels.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v__counts); __Pyx_XDECREF((PyObject *)__pyx_v_data); __Pyx_XDECREF(__pyx_v_indexer); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/algos.pyx":2103 * * * cdef inline float64_t _median_linear(float64_t* a, int n): # <<<<<<<<<<<<<< * cdef int i, j, na_count = 0 * cdef float64_t result */ static CYTHON_INLINE __pyx_t_5numpy_float64_t __pyx_f_6pandas_5algos__median_linear(__pyx_t_5numpy_float64_t *__pyx_v_a, int __pyx_v_n) { int __pyx_v_i; int __pyx_v_j; int __pyx_v_na_count; __pyx_t_5numpy_float64_t __pyx_v_result; __pyx_t_5numpy_float64_t *__pyx_v_tmp; __pyx_t_5numpy_float64_t __pyx_r; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; __pyx_t_5numpy_float64_t __pyx_t_5; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_median_linear", 0); /* "pandas/algos.pyx":2104 * * cdef inline float64_t _median_linear(float64_t* a, int n): * cdef int i, j, na_count = 0 # <<<<<<<<<<<<<< * cdef float64_t result * cdef float64_t* tmp */ __pyx_v_na_count = 0; /* "pandas/algos.pyx":2109 * * # count NAs * for i in range(n): # <<<<<<<<<<<<<< * if a[i] != a[i]: * na_count += 1 */ __pyx_t_1 = __pyx_v_n; for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) { __pyx_v_i = __pyx_t_2; /* "pandas/algos.pyx":2110 * # count NAs * for i in range(n): * if a[i] != a[i]: # <<<<<<<<<<<<<< * na_count += 1 * */ __pyx_t_3 = (((__pyx_v_a[__pyx_v_i]) != (__pyx_v_a[__pyx_v_i])) != 0); if (__pyx_t_3) { /* "pandas/algos.pyx":2111 * for i in range(n): * if a[i] != a[i]: * na_count += 1 # <<<<<<<<<<<<<< * * if na_count: */ __pyx_v_na_count = (__pyx_v_na_count + 1); goto __pyx_L5; } __pyx_L5:; } /* "pandas/algos.pyx":2113 * na_count += 1 * * if na_count: # <<<<<<<<<<<<<< * if na_count == n: * return NaN */ __pyx_t_3 = (__pyx_v_na_count != 0); if (__pyx_t_3) { /* "pandas/algos.pyx":2114 * * if na_count: * if na_count == n: # <<<<<<<<<<<<<< * return NaN * */ __pyx_t_3 = ((__pyx_v_na_count == __pyx_v_n) != 0); if (__pyx_t_3) { /* "pandas/algos.pyx":2115 * if na_count: * if na_count == n: * return NaN # <<<<<<<<<<<<<< * * tmp = malloc((n - na_count) * sizeof(float64_t)) */ __pyx_r = __pyx_v_6pandas_5algos_NaN; goto __pyx_L0; } /* "pandas/algos.pyx":2117 * return NaN * * tmp = malloc((n - na_count) * sizeof(float64_t)) # <<<<<<<<<<<<<< * * j = 0 */ __pyx_v_tmp = ((__pyx_t_5numpy_float64_t *)malloc(((__pyx_v_n - __pyx_v_na_count) * (sizeof(__pyx_t_5numpy_float64_t))))); /* "pandas/algos.pyx":2119 * tmp = malloc((n - na_count) * sizeof(float64_t)) * * j = 0 # <<<<<<<<<<<<<< * for i in range(n): * if a[i] == a[i]: */ __pyx_v_j = 0; /* "pandas/algos.pyx":2120 * * j = 0 * for i in range(n): # <<<<<<<<<<<<<< * if a[i] == a[i]: * tmp[j] = a[i] */ __pyx_t_1 = __pyx_v_n; for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) { __pyx_v_i = __pyx_t_2; /* "pandas/algos.pyx":2121 * j = 0 * for i in range(n): * if a[i] == a[i]: # <<<<<<<<<<<<<< * tmp[j] = a[i] * j += 1 */ __pyx_t_3 = (((__pyx_v_a[__pyx_v_i]) == (__pyx_v_a[__pyx_v_i])) != 0); if (__pyx_t_3) { /* "pandas/algos.pyx":2122 * for i in range(n): * if a[i] == a[i]: * tmp[j] = a[i] # <<<<<<<<<<<<<< * j += 1 * */ (__pyx_v_tmp[__pyx_v_j]) = (__pyx_v_a[__pyx_v_i]); /* "pandas/algos.pyx":2123 * if a[i] == a[i]: * tmp[j] = a[i] * j += 1 # <<<<<<<<<<<<<< * * a = tmp */ __pyx_v_j = (__pyx_v_j + 1); goto __pyx_L10; } __pyx_L10:; } /* "pandas/algos.pyx":2125 * j += 1 * * a = tmp # <<<<<<<<<<<<<< * n -= na_count * */ __pyx_v_a = __pyx_v_tmp; /* "pandas/algos.pyx":2126 * * a = tmp * n -= na_count # <<<<<<<<<<<<<< * * */ __pyx_v_n = (__pyx_v_n - __pyx_v_na_count); goto __pyx_L6; } __pyx_L6:; /* "pandas/algos.pyx":2129 * * * if n % 2: # <<<<<<<<<<<<<< * result = kth_smallest_c(a, n / 2, n) * else: */ __pyx_t_3 = (__Pyx_mod_long(__pyx_v_n, 2) != 0); if (__pyx_t_3) { /* "pandas/algos.pyx":2130 * * if n % 2: * result = kth_smallest_c(a, n / 2, n) # <<<<<<<<<<<<<< * else: * result = (kth_smallest_c(a, n / 2, n) + */ __pyx_t_4 = __pyx_f_6pandas_5algos_kth_smallest_c(__pyx_v_a, __Pyx_div_long(__pyx_v_n, 2), __pyx_v_n); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2130; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __pyx_PyFloat_AsDouble(__pyx_t_4); if (unlikely((__pyx_t_5 == (npy_float64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2130; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_result = __pyx_t_5; goto __pyx_L11; } /*else*/ { /* "pandas/algos.pyx":2132 * result = kth_smallest_c(a, n / 2, n) * else: * result = (kth_smallest_c(a, n / 2, n) + # <<<<<<<<<<<<<< * kth_smallest_c(a, n / 2 - 1, n)) / 2 * */ __pyx_t_4 = __pyx_f_6pandas_5algos_kth_smallest_c(__pyx_v_a, __Pyx_div_long(__pyx_v_n, 2), __pyx_v_n); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2132; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); /* "pandas/algos.pyx":2133 * else: * result = (kth_smallest_c(a, n / 2, n) + * kth_smallest_c(a, n / 2 - 1, n)) / 2 # <<<<<<<<<<<<<< * * if na_count: */ __pyx_t_6 = __pyx_f_6pandas_5algos_kth_smallest_c(__pyx_v_a, (__Pyx_div_long(__pyx_v_n, 2) - 1), __pyx_v_n); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2133; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); /* "pandas/algos.pyx":2132 * result = kth_smallest_c(a, n / 2, n) * else: * result = (kth_smallest_c(a, n / 2, n) + # <<<<<<<<<<<<<< * kth_smallest_c(a, n / 2 - 1, n)) / 2 * */ __pyx_t_7 = PyNumber_Add(__pyx_t_4, __pyx_t_6); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2132; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; /* "pandas/algos.pyx":2133 * else: * result = (kth_smallest_c(a, n / 2, n) + * kth_smallest_c(a, n / 2 - 1, n)) / 2 # <<<<<<<<<<<<<< * * if na_count: */ __pyx_t_6 = __Pyx_PyNumber_Divide(__pyx_t_7, __pyx_int_2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2133; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_5 = __pyx_PyFloat_AsDouble(__pyx_t_6); if (unlikely((__pyx_t_5 == (npy_float64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2133; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_v_result = __pyx_t_5; } __pyx_L11:; /* "pandas/algos.pyx":2135 * kth_smallest_c(a, n / 2 - 1, n)) / 2 * * if na_count: # <<<<<<<<<<<<<< * free(a) * */ __pyx_t_3 = (__pyx_v_na_count != 0); if (__pyx_t_3) { /* "pandas/algos.pyx":2136 * * if na_count: * free(a) # <<<<<<<<<<<<<< * * return result */ free(__pyx_v_a); goto __pyx_L12; } __pyx_L12:; /* "pandas/algos.pyx":2138 * free(a) * * return result # <<<<<<<<<<<<<< * * include "join.pyx" */ __pyx_r = __pyx_v_result; goto __pyx_L0; /* "pandas/algos.pyx":2103 * * * cdef inline float64_t _median_linear(float64_t* a, int n): # <<<<<<<<<<<<<< * cdef int i, j, na_count = 0 * cdef float64_t result */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_WriteUnraisable("pandas.algos._median_linear", __pyx_clineno, __pyx_lineno, __pyx_filename, 0); __pyx_r = 0; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/join.pyx":1 * def inner_join(ndarray[int64_t] left, ndarray[int64_t] right, # <<<<<<<<<<<<<< * Py_ssize_t max_groups): * cdef: */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_75inner_join(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_75inner_join = {__Pyx_NAMESTR("inner_join"), (PyCFunction)__pyx_pw_6pandas_5algos_75inner_join, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_75inner_join(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_left = 0; PyArrayObject *__pyx_v_right = 0; Py_ssize_t __pyx_v_max_groups; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("inner_join (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_left,&__pyx_n_s_right,&__pyx_n_s_max_groups,0}; PyObject* values[3] = {0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_left)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_right)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("inner_join", 1, 3, 3, 1); {__pyx_filename = __pyx_f[3]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_max_groups)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("inner_join", 1, 3, 3, 2); {__pyx_filename = __pyx_f[3]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "inner_join") < 0)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __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_left = ((PyArrayObject *)values[0]); __pyx_v_right = ((PyArrayObject *)values[1]); __pyx_v_max_groups = __Pyx_PyIndex_AsSsize_t(values[2]); if (unlikely((__pyx_v_max_groups == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("inner_join", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[3]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.inner_join", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_left), __pyx_ptype_5numpy_ndarray, 1, "left", 0))) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_right), __pyx_ptype_5numpy_ndarray, 1, "right", 0))) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_74inner_join(__pyx_self, __pyx_v_left, __pyx_v_right, __pyx_v_max_groups); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5algos_74inner_join(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_left, PyArrayObject *__pyx_v_right, Py_ssize_t __pyx_v_max_groups) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_k; Py_ssize_t __pyx_v_count; PyArrayObject *__pyx_v_left_count = 0; PyArrayObject *__pyx_v_right_count = 0; PyArrayObject *__pyx_v_left_sorter = 0; PyArrayObject *__pyx_v_right_sorter = 0; PyArrayObject *__pyx_v_left_indexer = 0; PyArrayObject *__pyx_v_right_indexer = 0; __pyx_t_5numpy_int64_t __pyx_v_lc; __pyx_t_5numpy_int64_t __pyx_v_rc; Py_ssize_t __pyx_v_left_pos; Py_ssize_t __pyx_v_right_pos; Py_ssize_t __pyx_v_position; Py_ssize_t __pyx_v_offset; __Pyx_LocalBuf_ND __pyx_pybuffernd_left; __Pyx_Buffer __pyx_pybuffer_left; __Pyx_LocalBuf_ND __pyx_pybuffernd_left_count; __Pyx_Buffer __pyx_pybuffer_left_count; __Pyx_LocalBuf_ND __pyx_pybuffernd_left_indexer; __Pyx_Buffer __pyx_pybuffer_left_indexer; __Pyx_LocalBuf_ND __pyx_pybuffernd_left_sorter; __Pyx_Buffer __pyx_pybuffer_left_sorter; __Pyx_LocalBuf_ND __pyx_pybuffernd_right; __Pyx_Buffer __pyx_pybuffer_right; __Pyx_LocalBuf_ND __pyx_pybuffernd_right_count; __Pyx_Buffer __pyx_pybuffer_right_count; __Pyx_LocalBuf_ND __pyx_pybuffernd_right_indexer; __Pyx_Buffer __pyx_pybuffer_right_indexer; __Pyx_LocalBuf_ND __pyx_pybuffernd_right_sorter; __Pyx_Buffer __pyx_pybuffer_right_sorter; 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 *); PyArrayObject *__pyx_t_6 = NULL; 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; Py_ssize_t __pyx_t_14; int __pyx_t_15; int __pyx_t_16; int __pyx_t_17; long __pyx_t_18; long __pyx_t_19; PyObject *__pyx_t_20 = NULL; PyArrayObject *__pyx_t_21 = NULL; Py_ssize_t __pyx_t_22; Py_ssize_t __pyx_t_23; __pyx_t_5numpy_int64_t __pyx_t_24; Py_ssize_t __pyx_t_25; __pyx_t_5numpy_int64_t __pyx_t_26; Py_ssize_t __pyx_t_27; Py_ssize_t __pyx_t_28; Py_ssize_t __pyx_t_29; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("inner_join", 0); __pyx_pybuffer_left_count.pybuffer.buf = NULL; __pyx_pybuffer_left_count.refcount = 0; __pyx_pybuffernd_left_count.data = NULL; __pyx_pybuffernd_left_count.rcbuffer = &__pyx_pybuffer_left_count; __pyx_pybuffer_right_count.pybuffer.buf = NULL; __pyx_pybuffer_right_count.refcount = 0; __pyx_pybuffernd_right_count.data = NULL; __pyx_pybuffernd_right_count.rcbuffer = &__pyx_pybuffer_right_count; __pyx_pybuffer_left_sorter.pybuffer.buf = NULL; __pyx_pybuffer_left_sorter.refcount = 0; __pyx_pybuffernd_left_sorter.data = NULL; __pyx_pybuffernd_left_sorter.rcbuffer = &__pyx_pybuffer_left_sorter; __pyx_pybuffer_right_sorter.pybuffer.buf = NULL; __pyx_pybuffer_right_sorter.refcount = 0; __pyx_pybuffernd_right_sorter.data = NULL; __pyx_pybuffernd_right_sorter.rcbuffer = &__pyx_pybuffer_right_sorter; __pyx_pybuffer_left_indexer.pybuffer.buf = NULL; __pyx_pybuffer_left_indexer.refcount = 0; __pyx_pybuffernd_left_indexer.data = NULL; __pyx_pybuffernd_left_indexer.rcbuffer = &__pyx_pybuffer_left_indexer; __pyx_pybuffer_right_indexer.pybuffer.buf = NULL; __pyx_pybuffer_right_indexer.refcount = 0; __pyx_pybuffernd_right_indexer.data = NULL; __pyx_pybuffernd_right_indexer.rcbuffer = &__pyx_pybuffer_right_indexer; __pyx_pybuffer_left.pybuffer.buf = NULL; __pyx_pybuffer_left.refcount = 0; __pyx_pybuffernd_left.data = NULL; __pyx_pybuffernd_left.rcbuffer = &__pyx_pybuffer_left; __pyx_pybuffer_right.pybuffer.buf = NULL; __pyx_pybuffer_right.refcount = 0; __pyx_pybuffernd_right.data = NULL; __pyx_pybuffernd_right.rcbuffer = &__pyx_pybuffer_right; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_left.rcbuffer->pybuffer, (PyObject*)__pyx_v_left, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_left.diminfo[0].strides = __pyx_pybuffernd_left.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_left.diminfo[0].shape = __pyx_pybuffernd_left.rcbuffer->pybuffer.shape[0]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_right.rcbuffer->pybuffer, (PyObject*)__pyx_v_right, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_right.diminfo[0].strides = __pyx_pybuffernd_right.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_right.diminfo[0].shape = __pyx_pybuffernd_right.rcbuffer->pybuffer.shape[0]; /* "pandas/src/join.pyx":4 * Py_ssize_t max_groups): * cdef: * Py_ssize_t i, j, k, count = 0 # <<<<<<<<<<<<<< * ndarray[int64_t] left_count, right_count, left_sorter, right_sorter * ndarray[int64_t] left_indexer, right_indexer */ __pyx_v_count = 0; /* "pandas/src/join.pyx":11 * # NA group in location 0 * * left_sorter, left_count = groupsort_indexer(left, max_groups) # <<<<<<<<<<<<<< * right_sorter, right_count = groupsort_indexer(right, max_groups) * */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_groupsort_indexer); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 11; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_max_groups); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 11; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 11; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(((PyObject *)__pyx_v_left)); PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_v_left)); __Pyx_GIVEREF(((PyObject *)__pyx_v_left)); PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_Call(__pyx_t_1, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 11; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if ((likely(PyTuple_CheckExact(__pyx_t_2))) || (PyList_CheckExact(__pyx_t_2))) { PyObject* sequence = __pyx_t_2; #if CYTHON_COMPILING_IN_CPYTHON Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); {__pyx_filename = __pyx_f[3]; __pyx_lineno = 11; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_1 = PyTuple_GET_ITEM(sequence, 1); } else { __pyx_t_3 = PyList_GET_ITEM(sequence, 0); __pyx_t_1 = PyList_GET_ITEM(sequence, 1); } __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(__pyx_t_1); #else __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 11; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 11; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); #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_filename = __pyx_f[3]; __pyx_lineno = 11; __pyx_clineno = __LINE__; goto __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_3 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_3)) goto __pyx_L3_unpacking_failed; __Pyx_GOTREF(__pyx_t_3); index = 1; __pyx_t_1 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_1)) goto __pyx_L3_unpacking_failed; __Pyx_GOTREF(__pyx_t_1); if (__Pyx_IternextUnpackEndCheck(__pyx_t_5(__pyx_t_4), 2) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 11; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[3]; __pyx_lineno = 11; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_L4_unpacking_done:; } if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 11; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 11; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_6 = ((PyArrayObject *)__pyx_t_3); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_left_sorter.rcbuffer->pybuffer); __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_left_sorter.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_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_left_sorter.rcbuffer->pybuffer, (PyObject*)__pyx_v_left_sorter, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_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_pybuffernd_left_sorter.diminfo[0].strides = __pyx_pybuffernd_left_sorter.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_left_sorter.diminfo[0].shape = __pyx_pybuffernd_left_sorter.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 11; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_6 = 0; __pyx_v_left_sorter = ((PyArrayObject *)__pyx_t_3); __pyx_t_3 = 0; __pyx_t_6 = ((PyArrayObject *)__pyx_t_1); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_left_count.rcbuffer->pybuffer); __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_left_count.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_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_left_count.rcbuffer->pybuffer, (PyObject*)__pyx_v_left_count, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_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_pybuffernd_left_count.diminfo[0].strides = __pyx_pybuffernd_left_count.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_left_count.diminfo[0].shape = __pyx_pybuffernd_left_count.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 11; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_6 = 0; __pyx_v_left_count = ((PyArrayObject *)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/join.pyx":12 * * left_sorter, left_count = groupsort_indexer(left, max_groups) * right_sorter, right_count = groupsort_indexer(right, max_groups) # <<<<<<<<<<<<<< * * # First pass, determine size of result set, do not use the NA group */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_groupsort_indexer); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 12; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_max_groups); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 12; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 12; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(((PyObject *)__pyx_v_right)); PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_v_right)); __Pyx_GIVEREF(((PyObject *)__pyx_v_right)); PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyObject_Call(__pyx_t_2, __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 12; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) { PyObject* sequence = __pyx_t_1; #if CYTHON_COMPILING_IN_CPYTHON Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); {__pyx_filename = __pyx_f[3]; __pyx_lineno = 12; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_2 = PyTuple_GET_ITEM(sequence, 1); } else { __pyx_t_3 = PyList_GET_ITEM(sequence, 0); __pyx_t_2 = PyList_GET_ITEM(sequence, 1); } __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(__pyx_t_2); #else __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 12; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 12; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } else { Py_ssize_t index = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 12; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_5 = Py_TYPE(__pyx_t_4)->tp_iternext; index = 0; __pyx_t_3 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_3)) goto __pyx_L5_unpacking_failed; __Pyx_GOTREF(__pyx_t_3); index = 1; __pyx_t_2 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_2)) goto __pyx_L5_unpacking_failed; __Pyx_GOTREF(__pyx_t_2); if (__Pyx_IternextUnpackEndCheck(__pyx_t_5(__pyx_t_4), 2) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 12; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_5 = NULL; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; goto __pyx_L6_unpacking_done; __pyx_L5_unpacking_failed:; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_5 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); {__pyx_filename = __pyx_f[3]; __pyx_lineno = 12; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_L6_unpacking_done:; } if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 12; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 12; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_6 = ((PyArrayObject *)__pyx_t_3); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_right_sorter.rcbuffer->pybuffer); __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_right_sorter.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_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_right_sorter.rcbuffer->pybuffer, (PyObject*)__pyx_v_right_sorter, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_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_pybuffernd_right_sorter.diminfo[0].strides = __pyx_pybuffernd_right_sorter.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_right_sorter.diminfo[0].shape = __pyx_pybuffernd_right_sorter.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 12; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_6 = 0; __pyx_v_right_sorter = ((PyArrayObject *)__pyx_t_3); __pyx_t_3 = 0; __pyx_t_6 = ((PyArrayObject *)__pyx_t_2); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_right_count.rcbuffer->pybuffer); __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_right_count.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_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_right_count.rcbuffer->pybuffer, (PyObject*)__pyx_v_right_count, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_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_pybuffernd_right_count.diminfo[0].strides = __pyx_pybuffernd_right_count.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_right_count.diminfo[0].shape = __pyx_pybuffernd_right_count.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 12; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_6 = 0; __pyx_v_right_count = ((PyArrayObject *)__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/join.pyx":15 * * # First pass, determine size of result set, do not use the NA group * for i in range(1, max_groups + 1): # <<<<<<<<<<<<<< * lc = left_count[i] * rc = right_count[i] */ __pyx_t_11 = (__pyx_v_max_groups + 1); for (__pyx_t_12 = 1; __pyx_t_12 < __pyx_t_11; __pyx_t_12+=1) { __pyx_v_i = __pyx_t_12; /* "pandas/src/join.pyx":16 * # First pass, determine size of result set, do not use the NA group * for i in range(1, max_groups + 1): * lc = left_count[i] # <<<<<<<<<<<<<< * rc = right_count[i] * */ __pyx_t_13 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_13 < 0) { __pyx_t_13 += __pyx_pybuffernd_left_count.diminfo[0].shape; if (unlikely(__pyx_t_13 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_13 >= __pyx_pybuffernd_left_count.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[3]; __pyx_lineno = 16; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_lc = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_left_count.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_left_count.diminfo[0].strides)); /* "pandas/src/join.pyx":17 * for i in range(1, max_groups + 1): * lc = left_count[i] * rc = right_count[i] # <<<<<<<<<<<<<< * * if rc > 0 and lc > 0: */ __pyx_t_14 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_14 < 0) { __pyx_t_14 += __pyx_pybuffernd_right_count.diminfo[0].shape; if (unlikely(__pyx_t_14 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_14 >= __pyx_pybuffernd_right_count.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[3]; __pyx_lineno = 17; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_rc = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_right_count.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_right_count.diminfo[0].strides)); /* "pandas/src/join.pyx":19 * rc = right_count[i] * * if rc > 0 and lc > 0: # <<<<<<<<<<<<<< * count += lc * rc * */ __pyx_t_15 = ((__pyx_v_rc > 0) != 0); if (__pyx_t_15) { __pyx_t_16 = ((__pyx_v_lc > 0) != 0); __pyx_t_17 = __pyx_t_16; } else { __pyx_t_17 = __pyx_t_15; } if (__pyx_t_17) { /* "pandas/src/join.pyx":20 * * if rc > 0 and lc > 0: * count += lc * rc # <<<<<<<<<<<<<< * * # group 0 is the NA group */ __pyx_v_count = (__pyx_v_count + (__pyx_v_lc * __pyx_v_rc)); goto __pyx_L9; } __pyx_L9:; } /* "pandas/src/join.pyx":24 * # group 0 is the NA group * cdef: * Py_ssize_t loc, left_pos = 0, right_pos = 0, position = 0 # <<<<<<<<<<<<<< * Py_ssize_t offset * */ __pyx_v_left_pos = 0; __pyx_v_right_pos = 0; __pyx_v_position = 0; /* "pandas/src/join.pyx":28 * * # exclude the NA group * left_pos = left_count[0] # <<<<<<<<<<<<<< * right_pos = right_count[0] * */ __pyx_t_18 = 0; __pyx_t_7 = -1; if (__pyx_t_18 < 0) { __pyx_t_18 += __pyx_pybuffernd_left_count.diminfo[0].shape; if (unlikely(__pyx_t_18 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_18 >= __pyx_pybuffernd_left_count.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[3]; __pyx_lineno = 28; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_left_pos = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_left_count.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_left_count.diminfo[0].strides)); /* "pandas/src/join.pyx":29 * # exclude the NA group * left_pos = left_count[0] * right_pos = right_count[0] # <<<<<<<<<<<<<< * * left_indexer = np.empty(count, dtype=np.int64) */ __pyx_t_19 = 0; __pyx_t_7 = -1; if (__pyx_t_19 < 0) { __pyx_t_19 += __pyx_pybuffernd_right_count.diminfo[0].shape; if (unlikely(__pyx_t_19 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_19 >= __pyx_pybuffernd_right_count.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[3]; __pyx_lineno = 29; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_right_pos = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_right_count.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_right_count.diminfo[0].strides)); /* "pandas/src/join.pyx":31 * right_pos = right_count[0] * * left_indexer = np.empty(count, dtype=np.int64) # <<<<<<<<<<<<<< * right_indexer = np.empty(count, dtype=np.int64) * */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 31; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[3]; __pyx_lineno = 31; __pyx_clineno = __LINE__; goto __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_count); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 31; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 31; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 31; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 31; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_20 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_int64); if (unlikely(!__pyx_t_20)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 31; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_20); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_dtype, __pyx_t_20) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 31; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0; __pyx_t_20 = PyObject_Call(__pyx_t_2, __pyx_t_3, __pyx_t_1); if (unlikely(!__pyx_t_20)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 31; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_20); __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_20) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_20, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 31; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_21 = ((PyArrayObject *)__pyx_t_20); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_left_indexer.rcbuffer->pybuffer); __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_left_indexer.rcbuffer->pybuffer, (PyObject*)__pyx_t_21, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_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_left_indexer.rcbuffer->pybuffer, (PyObject*)__pyx_v_left_indexer, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_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_pybuffernd_left_indexer.diminfo[0].strides = __pyx_pybuffernd_left_indexer.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_left_indexer.diminfo[0].shape = __pyx_pybuffernd_left_indexer.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 31; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_21 = 0; __pyx_v_left_indexer = ((PyArrayObject *)__pyx_t_20); __pyx_t_20 = 0; /* "pandas/src/join.pyx":32 * * left_indexer = np.empty(count, dtype=np.int64) * right_indexer = np.empty(count, dtype=np.int64) # <<<<<<<<<<<<<< * * for i in range(1, max_groups + 1): */ __pyx_t_20 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_20)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 32; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_20); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_20, __pyx_n_s_empty); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 32; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0; __pyx_t_20 = PyInt_FromSsize_t(__pyx_v_count); if (unlikely(!__pyx_t_20)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 32; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_20); __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 32; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_20); __Pyx_GIVEREF(__pyx_t_20); __pyx_t_20 = 0; __pyx_t_20 = PyDict_New(); if (unlikely(!__pyx_t_20)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 32; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_20); __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 32; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_int64); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 32; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (PyDict_SetItem(__pyx_t_20, __pyx_n_s_dtype, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 32; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyObject_Call(__pyx_t_1, __pyx_t_3, __pyx_t_20); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 32; __pyx_clineno = __LINE__; goto __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_DECREF(__pyx_t_20); __pyx_t_20 = 0; if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 32; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_21 = ((PyArrayObject *)__pyx_t_4); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_right_indexer.rcbuffer->pybuffer); __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_right_indexer.rcbuffer->pybuffer, (PyObject*)__pyx_t_21, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_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_right_indexer.rcbuffer->pybuffer, (PyObject*)__pyx_v_right_indexer, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_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_pybuffernd_right_indexer.diminfo[0].strides = __pyx_pybuffernd_right_indexer.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_right_indexer.diminfo[0].shape = __pyx_pybuffernd_right_indexer.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 32; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_21 = 0; __pyx_v_right_indexer = ((PyArrayObject *)__pyx_t_4); __pyx_t_4 = 0; /* "pandas/src/join.pyx":34 * right_indexer = np.empty(count, dtype=np.int64) * * for i in range(1, max_groups + 1): # <<<<<<<<<<<<<< * lc = left_count[i] * rc = right_count[i] */ __pyx_t_11 = (__pyx_v_max_groups + 1); for (__pyx_t_12 = 1; __pyx_t_12 < __pyx_t_11; __pyx_t_12+=1) { __pyx_v_i = __pyx_t_12; /* "pandas/src/join.pyx":35 * * for i in range(1, max_groups + 1): * lc = left_count[i] # <<<<<<<<<<<<<< * rc = right_count[i] * */ __pyx_t_22 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_22 < 0) { __pyx_t_22 += __pyx_pybuffernd_left_count.diminfo[0].shape; if (unlikely(__pyx_t_22 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_22 >= __pyx_pybuffernd_left_count.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[3]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_lc = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_left_count.rcbuffer->pybuffer.buf, __pyx_t_22, __pyx_pybuffernd_left_count.diminfo[0].strides)); /* "pandas/src/join.pyx":36 * for i in range(1, max_groups + 1): * lc = left_count[i] * rc = right_count[i] # <<<<<<<<<<<<<< * * if rc > 0 and lc > 0: */ __pyx_t_23 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_23 < 0) { __pyx_t_23 += __pyx_pybuffernd_right_count.diminfo[0].shape; if (unlikely(__pyx_t_23 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_23 >= __pyx_pybuffernd_right_count.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[3]; __pyx_lineno = 36; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_rc = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_right_count.rcbuffer->pybuffer.buf, __pyx_t_23, __pyx_pybuffernd_right_count.diminfo[0].strides)); /* "pandas/src/join.pyx":38 * rc = right_count[i] * * if rc > 0 and lc > 0: # <<<<<<<<<<<<<< * for j in range(lc): * offset = position + j * rc */ __pyx_t_17 = ((__pyx_v_rc > 0) != 0); if (__pyx_t_17) { __pyx_t_15 = ((__pyx_v_lc > 0) != 0); __pyx_t_16 = __pyx_t_15; } else { __pyx_t_16 = __pyx_t_17; } if (__pyx_t_16) { /* "pandas/src/join.pyx":39 * * if rc > 0 and lc > 0: * for j in range(lc): # <<<<<<<<<<<<<< * offset = position + j * rc * for k in range(rc): */ __pyx_t_24 = __pyx_v_lc; for (__pyx_t_25 = 0; __pyx_t_25 < __pyx_t_24; __pyx_t_25+=1) { __pyx_v_j = __pyx_t_25; /* "pandas/src/join.pyx":40 * if rc > 0 and lc > 0: * for j in range(lc): * offset = position + j * rc # <<<<<<<<<<<<<< * for k in range(rc): * left_indexer[offset + k] = left_pos + j */ __pyx_v_offset = (__pyx_v_position + (__pyx_v_j * __pyx_v_rc)); /* "pandas/src/join.pyx":41 * for j in range(lc): * offset = position + j * rc * for k in range(rc): # <<<<<<<<<<<<<< * left_indexer[offset + k] = left_pos + j * right_indexer[offset + k] = right_pos + k */ __pyx_t_26 = __pyx_v_rc; for (__pyx_t_27 = 0; __pyx_t_27 < __pyx_t_26; __pyx_t_27+=1) { __pyx_v_k = __pyx_t_27; /* "pandas/src/join.pyx":42 * offset = position + j * rc * for k in range(rc): * left_indexer[offset + k] = left_pos + j # <<<<<<<<<<<<<< * right_indexer[offset + k] = right_pos + k * position += lc * rc */ __pyx_t_28 = (__pyx_v_offset + __pyx_v_k); __pyx_t_7 = -1; if (__pyx_t_28 < 0) { __pyx_t_28 += __pyx_pybuffernd_left_indexer.diminfo[0].shape; if (unlikely(__pyx_t_28 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_28 >= __pyx_pybuffernd_left_indexer.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[3]; __pyx_lineno = 42; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_left_indexer.rcbuffer->pybuffer.buf, __pyx_t_28, __pyx_pybuffernd_left_indexer.diminfo[0].strides) = (__pyx_v_left_pos + __pyx_v_j); /* "pandas/src/join.pyx":43 * for k in range(rc): * left_indexer[offset + k] = left_pos + j * right_indexer[offset + k] = right_pos + k # <<<<<<<<<<<<<< * position += lc * rc * left_pos += lc */ __pyx_t_29 = (__pyx_v_offset + __pyx_v_k); __pyx_t_7 = -1; if (__pyx_t_29 < 0) { __pyx_t_29 += __pyx_pybuffernd_right_indexer.diminfo[0].shape; if (unlikely(__pyx_t_29 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_29 >= __pyx_pybuffernd_right_indexer.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[3]; __pyx_lineno = 43; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_right_indexer.rcbuffer->pybuffer.buf, __pyx_t_29, __pyx_pybuffernd_right_indexer.diminfo[0].strides) = (__pyx_v_right_pos + __pyx_v_k); } } /* "pandas/src/join.pyx":44 * left_indexer[offset + k] = left_pos + j * right_indexer[offset + k] = right_pos + k * position += lc * rc # <<<<<<<<<<<<<< * left_pos += lc * right_pos += rc */ __pyx_v_position = (__pyx_v_position + (__pyx_v_lc * __pyx_v_rc)); goto __pyx_L12; } __pyx_L12:; /* "pandas/src/join.pyx":45 * right_indexer[offset + k] = right_pos + k * position += lc * rc * left_pos += lc # <<<<<<<<<<<<<< * right_pos += rc * */ __pyx_v_left_pos = (__pyx_v_left_pos + __pyx_v_lc); /* "pandas/src/join.pyx":46 * position += lc * rc * left_pos += lc * right_pos += rc # <<<<<<<<<<<<<< * * return (_get_result_indexer(left_sorter, left_indexer), */ __pyx_v_right_pos = (__pyx_v_right_pos + __pyx_v_rc); } /* "pandas/src/join.pyx":48 * right_pos += rc * * return (_get_result_indexer(left_sorter, left_indexer), # <<<<<<<<<<<<<< * _get_result_indexer(right_sorter, right_indexer)) * */ __Pyx_XDECREF(__pyx_r); __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_get_result_indexer); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_20 = PyTuple_New(2); if (unlikely(!__pyx_t_20)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_20); __Pyx_INCREF(((PyObject *)__pyx_v_left_sorter)); PyTuple_SET_ITEM(__pyx_t_20, 0, ((PyObject *)__pyx_v_left_sorter)); __Pyx_GIVEREF(((PyObject *)__pyx_v_left_sorter)); __Pyx_INCREF(((PyObject *)__pyx_v_left_indexer)); PyTuple_SET_ITEM(__pyx_t_20, 1, ((PyObject *)__pyx_v_left_indexer)); __Pyx_GIVEREF(((PyObject *)__pyx_v_left_indexer)); __pyx_t_3 = PyObject_Call(__pyx_t_4, __pyx_t_20, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0; /* "pandas/src/join.pyx":49 * * return (_get_result_indexer(left_sorter, left_indexer), * _get_result_indexer(right_sorter, right_indexer)) # <<<<<<<<<<<<<< * * def left_outer_join(ndarray[int64_t] left, ndarray[int64_t] right, */ __pyx_t_20 = __Pyx_GetModuleGlobalName(__pyx_n_s_get_result_indexer); if (unlikely(!__pyx_t_20)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_20); __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(((PyObject *)__pyx_v_right_sorter)); PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_v_right_sorter)); __Pyx_GIVEREF(((PyObject *)__pyx_v_right_sorter)); __Pyx_INCREF(((PyObject *)__pyx_v_right_indexer)); PyTuple_SET_ITEM(__pyx_t_4, 1, ((PyObject *)__pyx_v_right_indexer)); __Pyx_GIVEREF(((PyObject *)__pyx_v_right_indexer)); __pyx_t_1 = PyObject_Call(__pyx_t_20, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "pandas/src/join.pyx":48 * right_pos += rc * * return (_get_result_indexer(left_sorter, left_indexer), # <<<<<<<<<<<<<< * _get_result_indexer(right_sorter, right_indexer)) * */ __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_3 = 0; __pyx_t_1 = 0; __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; /* "pandas/src/join.pyx":1 * def inner_join(ndarray[int64_t] left, ndarray[int64_t] right, # <<<<<<<<<<<<<< * Py_ssize_t max_groups): * 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_20); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_left.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_left_count.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_left_indexer.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_left_sorter.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_right.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_right_count.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_right_indexer.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_right_sorter.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.inner_join", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_left.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_left_count.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_left_indexer.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_left_sorter.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_right.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_right_count.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_right_indexer.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_right_sorter.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_left_count); __Pyx_XDECREF((PyObject *)__pyx_v_right_count); __Pyx_XDECREF((PyObject *)__pyx_v_left_sorter); __Pyx_XDECREF((PyObject *)__pyx_v_right_sorter); __Pyx_XDECREF((PyObject *)__pyx_v_left_indexer); __Pyx_XDECREF((PyObject *)__pyx_v_right_indexer); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/join.pyx":51 * _get_result_indexer(right_sorter, right_indexer)) * * def left_outer_join(ndarray[int64_t] left, ndarray[int64_t] right, # <<<<<<<<<<<<<< * Py_ssize_t max_groups, sort=True): * cdef: */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_77left_outer_join(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_77left_outer_join = {__Pyx_NAMESTR("left_outer_join"), (PyCFunction)__pyx_pw_6pandas_5algos_77left_outer_join, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_77left_outer_join(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_left = 0; PyArrayObject *__pyx_v_right = 0; Py_ssize_t __pyx_v_max_groups; PyObject *__pyx_v_sort = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("left_outer_join (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_left,&__pyx_n_s_right,&__pyx_n_s_max_groups,&__pyx_n_s_sort,0}; PyObject* values[4] = {0,0,0,0}; /* "pandas/src/join.pyx":52 * * def left_outer_join(ndarray[int64_t] left, ndarray[int64_t] right, * Py_ssize_t max_groups, sort=True): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, j, k, count = 0 */ values[3] = ((PyObject *)Py_True); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_left)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_right)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("left_outer_join", 0, 3, 4, 1); {__pyx_filename = __pyx_f[3]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_max_groups)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("left_outer_join", 0, 3, 4, 2); {__pyx_filename = __pyx_f[3]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_sort); if (value) { values[3] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "left_outer_join") < 0)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_left = ((PyArrayObject *)values[0]); __pyx_v_right = ((PyArrayObject *)values[1]); __pyx_v_max_groups = __Pyx_PyIndex_AsSsize_t(values[2]); if (unlikely((__pyx_v_max_groups == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 52; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_sort = values[3]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("left_outer_join", 0, 3, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[3]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.left_outer_join", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_left), __pyx_ptype_5numpy_ndarray, 1, "left", 0))) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_right), __pyx_ptype_5numpy_ndarray, 1, "right", 0))) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_76left_outer_join(__pyx_self, __pyx_v_left, __pyx_v_right, __pyx_v_max_groups, __pyx_v_sort); /* "pandas/src/join.pyx":51 * _get_result_indexer(right_sorter, right_indexer)) * * def left_outer_join(ndarray[int64_t] left, ndarray[int64_t] right, # <<<<<<<<<<<<<< * Py_ssize_t max_groups, sort=True): * cdef: */ /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5algos_76left_outer_join(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_left, PyArrayObject *__pyx_v_right, Py_ssize_t __pyx_v_max_groups, PyObject *__pyx_v_sort) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_k; Py_ssize_t __pyx_v_count; PyArrayObject *__pyx_v_left_count = 0; PyArrayObject *__pyx_v_right_count = 0; PyArrayObject *__pyx_v_left_sorter = 0; PyArrayObject *__pyx_v_right_sorter = 0; PyArrayObject *__pyx_v_rev = 0; PyArrayObject *__pyx_v_left_indexer = 0; PyArrayObject *__pyx_v_right_indexer = 0; __pyx_t_5numpy_int64_t __pyx_v_lc; __pyx_t_5numpy_int64_t __pyx_v_rc; Py_ssize_t __pyx_v_left_pos; Py_ssize_t __pyx_v_right_pos; Py_ssize_t __pyx_v_position; Py_ssize_t __pyx_v_offset; __Pyx_LocalBuf_ND __pyx_pybuffernd_left; __Pyx_Buffer __pyx_pybuffer_left; __Pyx_LocalBuf_ND __pyx_pybuffernd_left_count; __Pyx_Buffer __pyx_pybuffer_left_count; __Pyx_LocalBuf_ND __pyx_pybuffernd_left_indexer; __Pyx_Buffer __pyx_pybuffer_left_indexer; __Pyx_LocalBuf_ND __pyx_pybuffernd_right; __Pyx_Buffer __pyx_pybuffer_right; __Pyx_LocalBuf_ND __pyx_pybuffernd_right_count; __Pyx_Buffer __pyx_pybuffer_right_count; __Pyx_LocalBuf_ND __pyx_pybuffernd_right_indexer; __Pyx_Buffer __pyx_pybuffer_right_indexer; 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 *); PyArrayObject *__pyx_t_6 = NULL; 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; int __pyx_t_14; Py_ssize_t __pyx_t_15; Py_ssize_t __pyx_t_16; Py_ssize_t __pyx_t_17; long __pyx_t_18; long __pyx_t_19; PyObject *__pyx_t_20 = NULL; PyArrayObject *__pyx_t_21 = NULL; Py_ssize_t __pyx_t_22; Py_ssize_t __pyx_t_23; __pyx_t_5numpy_int64_t __pyx_t_24; Py_ssize_t __pyx_t_25; Py_ssize_t __pyx_t_26; Py_ssize_t __pyx_t_27; __pyx_t_5numpy_int64_t __pyx_t_28; Py_ssize_t __pyx_t_29; Py_ssize_t __pyx_t_30; Py_ssize_t __pyx_t_31; int __pyx_t_32; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("left_outer_join", 0); __pyx_pybuffer_left_count.pybuffer.buf = NULL; __pyx_pybuffer_left_count.refcount = 0; __pyx_pybuffernd_left_count.data = NULL; __pyx_pybuffernd_left_count.rcbuffer = &__pyx_pybuffer_left_count; __pyx_pybuffer_right_count.pybuffer.buf = NULL; __pyx_pybuffer_right_count.refcount = 0; __pyx_pybuffernd_right_count.data = NULL; __pyx_pybuffernd_right_count.rcbuffer = &__pyx_pybuffer_right_count; __pyx_pybuffer_left_indexer.pybuffer.buf = NULL; __pyx_pybuffer_left_indexer.refcount = 0; __pyx_pybuffernd_left_indexer.data = NULL; __pyx_pybuffernd_left_indexer.rcbuffer = &__pyx_pybuffer_left_indexer; __pyx_pybuffer_right_indexer.pybuffer.buf = NULL; __pyx_pybuffer_right_indexer.refcount = 0; __pyx_pybuffernd_right_indexer.data = NULL; __pyx_pybuffernd_right_indexer.rcbuffer = &__pyx_pybuffer_right_indexer; __pyx_pybuffer_left.pybuffer.buf = NULL; __pyx_pybuffer_left.refcount = 0; __pyx_pybuffernd_left.data = NULL; __pyx_pybuffernd_left.rcbuffer = &__pyx_pybuffer_left; __pyx_pybuffer_right.pybuffer.buf = NULL; __pyx_pybuffer_right.refcount = 0; __pyx_pybuffernd_right.data = NULL; __pyx_pybuffernd_right.rcbuffer = &__pyx_pybuffer_right; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_left.rcbuffer->pybuffer, (PyObject*)__pyx_v_left, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_left.diminfo[0].strides = __pyx_pybuffernd_left.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_left.diminfo[0].shape = __pyx_pybuffernd_left.rcbuffer->pybuffer.shape[0]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_right.rcbuffer->pybuffer, (PyObject*)__pyx_v_right, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_right.diminfo[0].strides = __pyx_pybuffernd_right.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_right.diminfo[0].shape = __pyx_pybuffernd_right.rcbuffer->pybuffer.shape[0]; /* "pandas/src/join.pyx":54 * Py_ssize_t max_groups, sort=True): * cdef: * Py_ssize_t i, j, k, count = 0 # <<<<<<<<<<<<<< * ndarray[int64_t] left_count, right_count * ndarray left_sorter, right_sorter, rev */ __pyx_v_count = 0; /* "pandas/src/join.pyx":62 * # NA group in location 0 * * left_sorter, left_count = groupsort_indexer(left, max_groups) # <<<<<<<<<<<<<< * right_sorter, right_count = groupsort_indexer(right, max_groups) * */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_groupsort_indexer); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_max_groups); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(((PyObject *)__pyx_v_left)); PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_v_left)); __Pyx_GIVEREF(((PyObject *)__pyx_v_left)); PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_Call(__pyx_t_1, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if ((likely(PyTuple_CheckExact(__pyx_t_2))) || (PyList_CheckExact(__pyx_t_2))) { PyObject* sequence = __pyx_t_2; #if CYTHON_COMPILING_IN_CPYTHON Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); {__pyx_filename = __pyx_f[3]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_1 = PyTuple_GET_ITEM(sequence, 1); } else { __pyx_t_3 = PyList_GET_ITEM(sequence, 0); __pyx_t_1 = PyList_GET_ITEM(sequence, 1); } __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(__pyx_t_1); #else __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); #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_filename = __pyx_f[3]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __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_3 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_3)) goto __pyx_L3_unpacking_failed; __Pyx_GOTREF(__pyx_t_3); index = 1; __pyx_t_1 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_1)) goto __pyx_L3_unpacking_failed; __Pyx_GOTREF(__pyx_t_1); if (__Pyx_IternextUnpackEndCheck(__pyx_t_5(__pyx_t_4), 2) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[3]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_L4_unpacking_done:; } if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_left_sorter = ((PyArrayObject *)__pyx_t_3); __pyx_t_3 = 0; __pyx_t_6 = ((PyArrayObject *)__pyx_t_1); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_left_count.rcbuffer->pybuffer); __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_left_count.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_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_left_count.rcbuffer->pybuffer, (PyObject*)__pyx_v_left_count, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_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_pybuffernd_left_count.diminfo[0].strides = __pyx_pybuffernd_left_count.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_left_count.diminfo[0].shape = __pyx_pybuffernd_left_count.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_6 = 0; __pyx_v_left_count = ((PyArrayObject *)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/join.pyx":63 * * left_sorter, left_count = groupsort_indexer(left, max_groups) * right_sorter, right_count = groupsort_indexer(right, max_groups) # <<<<<<<<<<<<<< * * # First pass, determine size of result set, do not use the NA group */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_groupsort_indexer); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_max_groups); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(((PyObject *)__pyx_v_right)); PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_v_right)); __Pyx_GIVEREF(((PyObject *)__pyx_v_right)); PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyObject_Call(__pyx_t_2, __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) { PyObject* sequence = __pyx_t_1; #if CYTHON_COMPILING_IN_CPYTHON Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); {__pyx_filename = __pyx_f[3]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_2 = PyTuple_GET_ITEM(sequence, 1); } else { __pyx_t_3 = PyList_GET_ITEM(sequence, 0); __pyx_t_2 = PyList_GET_ITEM(sequence, 1); } __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(__pyx_t_2); #else __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } else { Py_ssize_t index = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_5 = Py_TYPE(__pyx_t_4)->tp_iternext; index = 0; __pyx_t_3 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_3)) goto __pyx_L5_unpacking_failed; __Pyx_GOTREF(__pyx_t_3); index = 1; __pyx_t_2 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_2)) goto __pyx_L5_unpacking_failed; __Pyx_GOTREF(__pyx_t_2); if (__Pyx_IternextUnpackEndCheck(__pyx_t_5(__pyx_t_4), 2) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_5 = NULL; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; goto __pyx_L6_unpacking_done; __pyx_L5_unpacking_failed:; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_5 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); {__pyx_filename = __pyx_f[3]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_L6_unpacking_done:; } if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_right_sorter = ((PyArrayObject *)__pyx_t_3); __pyx_t_3 = 0; __pyx_t_6 = ((PyArrayObject *)__pyx_t_2); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_right_count.rcbuffer->pybuffer); __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_right_count.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_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_right_count.rcbuffer->pybuffer, (PyObject*)__pyx_v_right_count, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_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_pybuffernd_right_count.diminfo[0].strides = __pyx_pybuffernd_right_count.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_right_count.diminfo[0].shape = __pyx_pybuffernd_right_count.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_6 = 0; __pyx_v_right_count = ((PyArrayObject *)__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/join.pyx":66 * * # First pass, determine size of result set, do not use the NA group * for i in range(1, max_groups + 1): # <<<<<<<<<<<<<< * if right_count[i] > 0: * count += left_count[i] * right_count[i] */ __pyx_t_11 = (__pyx_v_max_groups + 1); for (__pyx_t_12 = 1; __pyx_t_12 < __pyx_t_11; __pyx_t_12+=1) { __pyx_v_i = __pyx_t_12; /* "pandas/src/join.pyx":67 * # First pass, determine size of result set, do not use the NA group * for i in range(1, max_groups + 1): * if right_count[i] > 0: # <<<<<<<<<<<<<< * count += left_count[i] * right_count[i] * else: */ __pyx_t_13 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_13 < 0) { __pyx_t_13 += __pyx_pybuffernd_right_count.diminfo[0].shape; if (unlikely(__pyx_t_13 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_13 >= __pyx_pybuffernd_right_count.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[3]; __pyx_lineno = 67; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_14 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_right_count.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_right_count.diminfo[0].strides)) > 0) != 0); if (__pyx_t_14) { /* "pandas/src/join.pyx":68 * for i in range(1, max_groups + 1): * if right_count[i] > 0: * count += left_count[i] * right_count[i] # <<<<<<<<<<<<<< * else: * count += left_count[i] */ __pyx_t_15 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_15 < 0) { __pyx_t_15 += __pyx_pybuffernd_left_count.diminfo[0].shape; if (unlikely(__pyx_t_15 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_15 >= __pyx_pybuffernd_left_count.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[3]; __pyx_lineno = 68; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_16 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_16 < 0) { __pyx_t_16 += __pyx_pybuffernd_right_count.diminfo[0].shape; if (unlikely(__pyx_t_16 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_16 >= __pyx_pybuffernd_right_count.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[3]; __pyx_lineno = 68; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_count = (__pyx_v_count + ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_left_count.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_left_count.diminfo[0].strides)) * (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_right_count.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_right_count.diminfo[0].strides)))); goto __pyx_L9; } /*else*/ { /* "pandas/src/join.pyx":70 * count += left_count[i] * right_count[i] * else: * count += left_count[i] # <<<<<<<<<<<<<< * * # group 0 is the NA group */ __pyx_t_17 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_17 < 0) { __pyx_t_17 += __pyx_pybuffernd_left_count.diminfo[0].shape; if (unlikely(__pyx_t_17 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_17 >= __pyx_pybuffernd_left_count.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[3]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_count = (__pyx_v_count + (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_left_count.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_left_count.diminfo[0].strides))); } __pyx_L9:; } /* "pandas/src/join.pyx":74 * # group 0 is the NA group * cdef: * Py_ssize_t loc, left_pos = 0, right_pos = 0, position = 0 # <<<<<<<<<<<<<< * Py_ssize_t offset * */ __pyx_v_left_pos = 0; __pyx_v_right_pos = 0; __pyx_v_position = 0; /* "pandas/src/join.pyx":78 * * # exclude the NA group * left_pos = left_count[0] # <<<<<<<<<<<<<< * right_pos = right_count[0] * */ __pyx_t_18 = 0; __pyx_t_7 = -1; if (__pyx_t_18 < 0) { __pyx_t_18 += __pyx_pybuffernd_left_count.diminfo[0].shape; if (unlikely(__pyx_t_18 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_18 >= __pyx_pybuffernd_left_count.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[3]; __pyx_lineno = 78; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_left_pos = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_left_count.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_left_count.diminfo[0].strides)); /* "pandas/src/join.pyx":79 * # exclude the NA group * left_pos = left_count[0] * right_pos = right_count[0] # <<<<<<<<<<<<<< * * left_indexer = np.empty(count, dtype=np.int64) */ __pyx_t_19 = 0; __pyx_t_7 = -1; if (__pyx_t_19 < 0) { __pyx_t_19 += __pyx_pybuffernd_right_count.diminfo[0].shape; if (unlikely(__pyx_t_19 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_19 >= __pyx_pybuffernd_right_count.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[3]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_right_pos = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_right_count.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_right_count.diminfo[0].strides)); /* "pandas/src/join.pyx":81 * right_pos = right_count[0] * * left_indexer = np.empty(count, dtype=np.int64) # <<<<<<<<<<<<<< * right_indexer = np.empty(count, dtype=np.int64) * */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[3]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __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_count); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_20 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_int64); if (unlikely(!__pyx_t_20)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_20); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_dtype, __pyx_t_20) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0; __pyx_t_20 = PyObject_Call(__pyx_t_2, __pyx_t_3, __pyx_t_1); if (unlikely(!__pyx_t_20)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_20); __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_20) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_20, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_21 = ((PyArrayObject *)__pyx_t_20); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_left_indexer.rcbuffer->pybuffer); __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_left_indexer.rcbuffer->pybuffer, (PyObject*)__pyx_t_21, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_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_left_indexer.rcbuffer->pybuffer, (PyObject*)__pyx_v_left_indexer, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_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_pybuffernd_left_indexer.diminfo[0].strides = __pyx_pybuffernd_left_indexer.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_left_indexer.diminfo[0].shape = __pyx_pybuffernd_left_indexer.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_21 = 0; __pyx_v_left_indexer = ((PyArrayObject *)__pyx_t_20); __pyx_t_20 = 0; /* "pandas/src/join.pyx":82 * * left_indexer = np.empty(count, dtype=np.int64) * right_indexer = np.empty(count, dtype=np.int64) # <<<<<<<<<<<<<< * * for i in range(1, max_groups + 1): */ __pyx_t_20 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_20)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_20); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_20, __pyx_n_s_empty); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0; __pyx_t_20 = PyInt_FromSsize_t(__pyx_v_count); if (unlikely(!__pyx_t_20)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_20); __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_20); __Pyx_GIVEREF(__pyx_t_20); __pyx_t_20 = 0; __pyx_t_20 = PyDict_New(); if (unlikely(!__pyx_t_20)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_20); __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_int64); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (PyDict_SetItem(__pyx_t_20, __pyx_n_s_dtype, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyObject_Call(__pyx_t_1, __pyx_t_3, __pyx_t_20); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __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_DECREF(__pyx_t_20); __pyx_t_20 = 0; if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_21 = ((PyArrayObject *)__pyx_t_4); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_right_indexer.rcbuffer->pybuffer); __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_right_indexer.rcbuffer->pybuffer, (PyObject*)__pyx_t_21, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_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_right_indexer.rcbuffer->pybuffer, (PyObject*)__pyx_v_right_indexer, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_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_pybuffernd_right_indexer.diminfo[0].strides = __pyx_pybuffernd_right_indexer.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_right_indexer.diminfo[0].shape = __pyx_pybuffernd_right_indexer.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_21 = 0; __pyx_v_right_indexer = ((PyArrayObject *)__pyx_t_4); __pyx_t_4 = 0; /* "pandas/src/join.pyx":84 * right_indexer = np.empty(count, dtype=np.int64) * * for i in range(1, max_groups + 1): # <<<<<<<<<<<<<< * lc = left_count[i] * rc = right_count[i] */ __pyx_t_11 = (__pyx_v_max_groups + 1); for (__pyx_t_12 = 1; __pyx_t_12 < __pyx_t_11; __pyx_t_12+=1) { __pyx_v_i = __pyx_t_12; /* "pandas/src/join.pyx":85 * * for i in range(1, max_groups + 1): * lc = left_count[i] # <<<<<<<<<<<<<< * rc = right_count[i] * */ __pyx_t_22 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_22 < 0) { __pyx_t_22 += __pyx_pybuffernd_left_count.diminfo[0].shape; if (unlikely(__pyx_t_22 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_22 >= __pyx_pybuffernd_left_count.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[3]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_lc = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_left_count.rcbuffer->pybuffer.buf, __pyx_t_22, __pyx_pybuffernd_left_count.diminfo[0].strides)); /* "pandas/src/join.pyx":86 * for i in range(1, max_groups + 1): * lc = left_count[i] * rc = right_count[i] # <<<<<<<<<<<<<< * * if rc == 0: */ __pyx_t_23 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_23 < 0) { __pyx_t_23 += __pyx_pybuffernd_right_count.diminfo[0].shape; if (unlikely(__pyx_t_23 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_23 >= __pyx_pybuffernd_right_count.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[3]; __pyx_lineno = 86; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_rc = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_right_count.rcbuffer->pybuffer.buf, __pyx_t_23, __pyx_pybuffernd_right_count.diminfo[0].strides)); /* "pandas/src/join.pyx":88 * rc = right_count[i] * * if rc == 0: # <<<<<<<<<<<<<< * for j in range(lc): * left_indexer[position + j] = left_pos + j */ __pyx_t_14 = ((__pyx_v_rc == 0) != 0); if (__pyx_t_14) { /* "pandas/src/join.pyx":89 * * if rc == 0: * for j in range(lc): # <<<<<<<<<<<<<< * left_indexer[position + j] = left_pos + j * right_indexer[position + j] = -1 */ __pyx_t_24 = __pyx_v_lc; for (__pyx_t_25 = 0; __pyx_t_25 < __pyx_t_24; __pyx_t_25+=1) { __pyx_v_j = __pyx_t_25; /* "pandas/src/join.pyx":90 * if rc == 0: * for j in range(lc): * left_indexer[position + j] = left_pos + j # <<<<<<<<<<<<<< * right_indexer[position + j] = -1 * position += lc */ __pyx_t_26 = (__pyx_v_position + __pyx_v_j); __pyx_t_7 = -1; if (__pyx_t_26 < 0) { __pyx_t_26 += __pyx_pybuffernd_left_indexer.diminfo[0].shape; if (unlikely(__pyx_t_26 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_26 >= __pyx_pybuffernd_left_indexer.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[3]; __pyx_lineno = 90; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_left_indexer.rcbuffer->pybuffer.buf, __pyx_t_26, __pyx_pybuffernd_left_indexer.diminfo[0].strides) = (__pyx_v_left_pos + __pyx_v_j); /* "pandas/src/join.pyx":91 * for j in range(lc): * left_indexer[position + j] = left_pos + j * right_indexer[position + j] = -1 # <<<<<<<<<<<<<< * position += lc * else: */ __pyx_t_27 = (__pyx_v_position + __pyx_v_j); __pyx_t_7 = -1; if (__pyx_t_27 < 0) { __pyx_t_27 += __pyx_pybuffernd_right_indexer.diminfo[0].shape; if (unlikely(__pyx_t_27 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_27 >= __pyx_pybuffernd_right_indexer.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[3]; __pyx_lineno = 91; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_right_indexer.rcbuffer->pybuffer.buf, __pyx_t_27, __pyx_pybuffernd_right_indexer.diminfo[0].strides) = -1; } /* "pandas/src/join.pyx":92 * left_indexer[position + j] = left_pos + j * right_indexer[position + j] = -1 * position += lc # <<<<<<<<<<<<<< * else: * for j in range(lc): */ __pyx_v_position = (__pyx_v_position + __pyx_v_lc); goto __pyx_L12; } /*else*/ { /* "pandas/src/join.pyx":94 * position += lc * else: * for j in range(lc): # <<<<<<<<<<<<<< * offset = position + j * rc * for k in range(rc): */ __pyx_t_24 = __pyx_v_lc; for (__pyx_t_25 = 0; __pyx_t_25 < __pyx_t_24; __pyx_t_25+=1) { __pyx_v_j = __pyx_t_25; /* "pandas/src/join.pyx":95 * else: * for j in range(lc): * offset = position + j * rc # <<<<<<<<<<<<<< * for k in range(rc): * left_indexer[offset + k] = left_pos + j */ __pyx_v_offset = (__pyx_v_position + (__pyx_v_j * __pyx_v_rc)); /* "pandas/src/join.pyx":96 * for j in range(lc): * offset = position + j * rc * for k in range(rc): # <<<<<<<<<<<<<< * left_indexer[offset + k] = left_pos + j * right_indexer[offset + k] = right_pos + k */ __pyx_t_28 = __pyx_v_rc; for (__pyx_t_29 = 0; __pyx_t_29 < __pyx_t_28; __pyx_t_29+=1) { __pyx_v_k = __pyx_t_29; /* "pandas/src/join.pyx":97 * offset = position + j * rc * for k in range(rc): * left_indexer[offset + k] = left_pos + j # <<<<<<<<<<<<<< * right_indexer[offset + k] = right_pos + k * position += lc * rc */ __pyx_t_30 = (__pyx_v_offset + __pyx_v_k); __pyx_t_7 = -1; if (__pyx_t_30 < 0) { __pyx_t_30 += __pyx_pybuffernd_left_indexer.diminfo[0].shape; if (unlikely(__pyx_t_30 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_30 >= __pyx_pybuffernd_left_indexer.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[3]; __pyx_lineno = 97; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_left_indexer.rcbuffer->pybuffer.buf, __pyx_t_30, __pyx_pybuffernd_left_indexer.diminfo[0].strides) = (__pyx_v_left_pos + __pyx_v_j); /* "pandas/src/join.pyx":98 * for k in range(rc): * left_indexer[offset + k] = left_pos + j * right_indexer[offset + k] = right_pos + k # <<<<<<<<<<<<<< * position += lc * rc * left_pos += lc */ __pyx_t_31 = (__pyx_v_offset + __pyx_v_k); __pyx_t_7 = -1; if (__pyx_t_31 < 0) { __pyx_t_31 += __pyx_pybuffernd_right_indexer.diminfo[0].shape; if (unlikely(__pyx_t_31 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_31 >= __pyx_pybuffernd_right_indexer.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[3]; __pyx_lineno = 98; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_right_indexer.rcbuffer->pybuffer.buf, __pyx_t_31, __pyx_pybuffernd_right_indexer.diminfo[0].strides) = (__pyx_v_right_pos + __pyx_v_k); } } /* "pandas/src/join.pyx":99 * left_indexer[offset + k] = left_pos + j * right_indexer[offset + k] = right_pos + k * position += lc * rc # <<<<<<<<<<<<<< * left_pos += lc * right_pos += rc */ __pyx_v_position = (__pyx_v_position + (__pyx_v_lc * __pyx_v_rc)); } __pyx_L12:; /* "pandas/src/join.pyx":100 * right_indexer[offset + k] = right_pos + k * position += lc * rc * left_pos += lc # <<<<<<<<<<<<<< * right_pos += rc * */ __pyx_v_left_pos = (__pyx_v_left_pos + __pyx_v_lc); /* "pandas/src/join.pyx":101 * position += lc * rc * left_pos += lc * right_pos += rc # <<<<<<<<<<<<<< * * left_indexer = _get_result_indexer(left_sorter, left_indexer) */ __pyx_v_right_pos = (__pyx_v_right_pos + __pyx_v_rc); } /* "pandas/src/join.pyx":103 * right_pos += rc * * left_indexer = _get_result_indexer(left_sorter, left_indexer) # <<<<<<<<<<<<<< * right_indexer = _get_result_indexer(right_sorter, right_indexer) * */ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_get_result_indexer); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_20 = PyTuple_New(2); if (unlikely(!__pyx_t_20)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_20); __Pyx_INCREF(((PyObject *)__pyx_v_left_sorter)); PyTuple_SET_ITEM(__pyx_t_20, 0, ((PyObject *)__pyx_v_left_sorter)); __Pyx_GIVEREF(((PyObject *)__pyx_v_left_sorter)); __Pyx_INCREF(((PyObject *)__pyx_v_left_indexer)); PyTuple_SET_ITEM(__pyx_t_20, 1, ((PyObject *)__pyx_v_left_indexer)); __Pyx_GIVEREF(((PyObject *)__pyx_v_left_indexer)); __pyx_t_3 = PyObject_Call(__pyx_t_4, __pyx_t_20, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0; if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_21 = ((PyArrayObject *)__pyx_t_3); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_left_indexer.rcbuffer->pybuffer); __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_left_indexer.rcbuffer->pybuffer, (PyObject*)__pyx_t_21, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_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_left_indexer.rcbuffer->pybuffer, (PyObject*)__pyx_v_left_indexer, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_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_pybuffernd_left_indexer.diminfo[0].strides = __pyx_pybuffernd_left_indexer.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_left_indexer.diminfo[0].shape = __pyx_pybuffernd_left_indexer.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_21 = 0; __Pyx_DECREF_SET(__pyx_v_left_indexer, ((PyArrayObject *)__pyx_t_3)); __pyx_t_3 = 0; /* "pandas/src/join.pyx":104 * * left_indexer = _get_result_indexer(left_sorter, left_indexer) * right_indexer = _get_result_indexer(right_sorter, right_indexer) # <<<<<<<<<<<<<< * * if not sort: */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_get_result_indexer); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_20 = PyTuple_New(2); if (unlikely(!__pyx_t_20)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_20); __Pyx_INCREF(((PyObject *)__pyx_v_right_sorter)); PyTuple_SET_ITEM(__pyx_t_20, 0, ((PyObject *)__pyx_v_right_sorter)); __Pyx_GIVEREF(((PyObject *)__pyx_v_right_sorter)); __Pyx_INCREF(((PyObject *)__pyx_v_right_indexer)); PyTuple_SET_ITEM(__pyx_t_20, 1, ((PyObject *)__pyx_v_right_indexer)); __Pyx_GIVEREF(((PyObject *)__pyx_v_right_indexer)); __pyx_t_4 = PyObject_Call(__pyx_t_3, __pyx_t_20, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0; if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_21 = ((PyArrayObject *)__pyx_t_4); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_right_indexer.rcbuffer->pybuffer); __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_right_indexer.rcbuffer->pybuffer, (PyObject*)__pyx_t_21, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_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_right_indexer.rcbuffer->pybuffer, (PyObject*)__pyx_v_right_indexer, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_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_pybuffernd_right_indexer.diminfo[0].strides = __pyx_pybuffernd_right_indexer.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_right_indexer.diminfo[0].shape = __pyx_pybuffernd_right_indexer.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_21 = 0; __Pyx_DECREF_SET(__pyx_v_right_indexer, ((PyArrayObject *)__pyx_t_4)); __pyx_t_4 = 0; /* "pandas/src/join.pyx":106 * right_indexer = _get_result_indexer(right_sorter, right_indexer) * * if not sort: # <<<<<<<<<<<<<< * if left_sorter.dtype != np.int_: * left_sorter = left_sorter.astype(np.int_) */ __pyx_t_14 = __Pyx_PyObject_IsTrue(__pyx_v_sort); if (unlikely(__pyx_t_14 < 0)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 106; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_32 = ((!__pyx_t_14) != 0); if (__pyx_t_32) { /* "pandas/src/join.pyx":107 * * if not sort: * if left_sorter.dtype != np.int_: # <<<<<<<<<<<<<< * left_sorter = left_sorter.astype(np.int_) * */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_left_sorter), __pyx_n_s_dtype); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_20 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_20)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_20); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_20, __pyx_n_s_int); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0; __pyx_t_20 = PyObject_RichCompare(__pyx_t_4, __pyx_t_3, Py_NE); __Pyx_XGOTREF(__pyx_t_20); if (unlikely(!__pyx_t_20)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_32 = __Pyx_PyObject_IsTrue(__pyx_t_20); if (unlikely(__pyx_t_32 < 0)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0; if (__pyx_t_32) { /* "pandas/src/join.pyx":108 * if not sort: * if left_sorter.dtype != np.int_: * left_sorter = left_sorter.astype(np.int_) # <<<<<<<<<<<<<< * * rev = np.empty(len(left), dtype=np.int_) */ __pyx_t_20 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_left_sorter), __pyx_n_s_astype); if (unlikely(!__pyx_t_20)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 108; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_20); __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 108; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_int); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 108; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 108; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyObject_Call(__pyx_t_20, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 108; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 108; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF_SET(__pyx_v_left_sorter, ((PyArrayObject *)__pyx_t_4)); __pyx_t_4 = 0; goto __pyx_L20; } __pyx_L20:; /* "pandas/src/join.pyx":110 * left_sorter = left_sorter.astype(np.int_) * * rev = np.empty(len(left), dtype=np.int_) # <<<<<<<<<<<<<< * rev.put(left_sorter, np.arange(len(left))) * */ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 110; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_empty); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 110; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_11 = PyObject_Length(((PyObject *)__pyx_v_left)); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 110; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_4 = PyInt_FromSsize_t(__pyx_t_11); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 110; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_20 = PyTuple_New(1); if (unlikely(!__pyx_t_20)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 110; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_20); PyTuple_SET_ITEM(__pyx_t_20, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyDict_New(); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 110; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 110; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_int); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 110; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_dtype, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 110; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_Call(__pyx_t_3, __pyx_t_20, __pyx_t_4); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 110; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 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_filename = __pyx_f[3]; __pyx_lineno = 110; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_rev = ((PyArrayObject *)__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/join.pyx":111 * * rev = np.empty(len(left), dtype=np.int_) * rev.put(left_sorter, np.arange(len(left))) # <<<<<<<<<<<<<< * * right_indexer = right_indexer.take(rev) */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_rev), __pyx_n_s_put); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 111; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 111; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_20 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_arange); if (unlikely(!__pyx_t_20)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 111; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_20); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_11 = PyObject_Length(((PyObject *)__pyx_v_left)); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 111; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_4 = PyInt_FromSsize_t(__pyx_t_11); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 111; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 111; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyObject_Call(__pyx_t_20, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 111; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 111; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(((PyObject *)__pyx_v_left_sorter)); PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_v_left_sorter)); __Pyx_GIVEREF(((PyObject *)__pyx_v_left_sorter)); PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyObject_Call(__pyx_t_2, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 111; __pyx_clineno = __LINE__; goto __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_4); __pyx_t_4 = 0; /* "pandas/src/join.pyx":113 * rev.put(left_sorter, np.arange(len(left))) * * right_indexer = right_indexer.take(rev) # <<<<<<<<<<<<<< * left_indexer = left_indexer.take(rev) * */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_right_indexer), __pyx_n_s_take); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 113; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 113; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(((PyObject *)__pyx_v_rev)); PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_v_rev)); __Pyx_GIVEREF(((PyObject *)__pyx_v_rev)); __pyx_t_2 = PyObject_Call(__pyx_t_4, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 113; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 113; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_21 = ((PyArrayObject *)__pyx_t_2); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_right_indexer.rcbuffer->pybuffer); __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_right_indexer.rcbuffer->pybuffer, (PyObject*)__pyx_t_21, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_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_right_indexer.rcbuffer->pybuffer, (PyObject*)__pyx_v_right_indexer, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_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_pybuffernd_right_indexer.diminfo[0].strides = __pyx_pybuffernd_right_indexer.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_right_indexer.diminfo[0].shape = __pyx_pybuffernd_right_indexer.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 113; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_21 = 0; __Pyx_DECREF_SET(__pyx_v_right_indexer, ((PyArrayObject *)__pyx_t_2)); __pyx_t_2 = 0; /* "pandas/src/join.pyx":114 * * right_indexer = right_indexer.take(rev) * left_indexer = left_indexer.take(rev) # <<<<<<<<<<<<<< * * return left_indexer, right_indexer */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_left_indexer), __pyx_n_s_take); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 114; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 114; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(((PyObject *)__pyx_v_rev)); PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_v_rev)); __Pyx_GIVEREF(((PyObject *)__pyx_v_rev)); __pyx_t_4 = PyObject_Call(__pyx_t_2, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 114; __pyx_clineno = __LINE__; goto __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; if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 114; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_21 = ((PyArrayObject *)__pyx_t_4); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_left_indexer.rcbuffer->pybuffer); __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_left_indexer.rcbuffer->pybuffer, (PyObject*)__pyx_t_21, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_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_left_indexer.rcbuffer->pybuffer, (PyObject*)__pyx_v_left_indexer, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_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_pybuffernd_left_indexer.diminfo[0].strides = __pyx_pybuffernd_left_indexer.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_left_indexer.diminfo[0].shape = __pyx_pybuffernd_left_indexer.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 114; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_21 = 0; __Pyx_DECREF_SET(__pyx_v_left_indexer, ((PyArrayObject *)__pyx_t_4)); __pyx_t_4 = 0; goto __pyx_L19; } __pyx_L19:; /* "pandas/src/join.pyx":116 * left_indexer = left_indexer.take(rev) * * return left_indexer, right_indexer # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 116; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(((PyObject *)__pyx_v_left_indexer)); PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_v_left_indexer)); __Pyx_GIVEREF(((PyObject *)__pyx_v_left_indexer)); __Pyx_INCREF(((PyObject *)__pyx_v_right_indexer)); PyTuple_SET_ITEM(__pyx_t_4, 1, ((PyObject *)__pyx_v_right_indexer)); __Pyx_GIVEREF(((PyObject *)__pyx_v_right_indexer)); __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; /* "pandas/src/join.pyx":51 * _get_result_indexer(right_sorter, right_indexer)) * * def left_outer_join(ndarray[int64_t] left, ndarray[int64_t] right, # <<<<<<<<<<<<<< * Py_ssize_t max_groups, sort=True): * 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_20); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_left.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_left_count.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_left_indexer.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_right.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_right_count.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_right_indexer.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.left_outer_join", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_left.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_left_count.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_left_indexer.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_right.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_right_count.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_right_indexer.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_left_count); __Pyx_XDECREF((PyObject *)__pyx_v_right_count); __Pyx_XDECREF((PyObject *)__pyx_v_left_sorter); __Pyx_XDECREF((PyObject *)__pyx_v_right_sorter); __Pyx_XDECREF((PyObject *)__pyx_v_rev); __Pyx_XDECREF((PyObject *)__pyx_v_left_indexer); __Pyx_XDECREF((PyObject *)__pyx_v_right_indexer); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/join.pyx":120 * * * def full_outer_join(ndarray[int64_t] left, ndarray[int64_t] right, # <<<<<<<<<<<<<< * Py_ssize_t max_groups): * cdef: */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_79full_outer_join(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_79full_outer_join = {__Pyx_NAMESTR("full_outer_join"), (PyCFunction)__pyx_pw_6pandas_5algos_79full_outer_join, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_79full_outer_join(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_left = 0; PyArrayObject *__pyx_v_right = 0; Py_ssize_t __pyx_v_max_groups; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("full_outer_join (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_left,&__pyx_n_s_right,&__pyx_n_s_max_groups,0}; PyObject* values[3] = {0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_left)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_right)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("full_outer_join", 1, 3, 3, 1); {__pyx_filename = __pyx_f[3]; __pyx_lineno = 120; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_max_groups)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("full_outer_join", 1, 3, 3, 2); {__pyx_filename = __pyx_f[3]; __pyx_lineno = 120; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "full_outer_join") < 0)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 120; __pyx_clineno = __LINE__; goto __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_left = ((PyArrayObject *)values[0]); __pyx_v_right = ((PyArrayObject *)values[1]); __pyx_v_max_groups = __Pyx_PyIndex_AsSsize_t(values[2]); if (unlikely((__pyx_v_max_groups == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 121; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("full_outer_join", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[3]; __pyx_lineno = 120; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.full_outer_join", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_left), __pyx_ptype_5numpy_ndarray, 1, "left", 0))) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 120; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_right), __pyx_ptype_5numpy_ndarray, 1, "right", 0))) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 120; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_78full_outer_join(__pyx_self, __pyx_v_left, __pyx_v_right, __pyx_v_max_groups); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5algos_78full_outer_join(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_left, PyArrayObject *__pyx_v_right, Py_ssize_t __pyx_v_max_groups) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_k; Py_ssize_t __pyx_v_count; PyArrayObject *__pyx_v_left_count = 0; PyArrayObject *__pyx_v_right_count = 0; PyArrayObject *__pyx_v_left_sorter = 0; PyArrayObject *__pyx_v_right_sorter = 0; PyArrayObject *__pyx_v_left_indexer = 0; PyArrayObject *__pyx_v_right_indexer = 0; __pyx_t_5numpy_int64_t __pyx_v_lc; __pyx_t_5numpy_int64_t __pyx_v_rc; __pyx_t_5numpy_int64_t __pyx_v_left_pos; __pyx_t_5numpy_int64_t __pyx_v_right_pos; Py_ssize_t __pyx_v_offset; Py_ssize_t __pyx_v_position; __Pyx_LocalBuf_ND __pyx_pybuffernd_left; __Pyx_Buffer __pyx_pybuffer_left; __Pyx_LocalBuf_ND __pyx_pybuffernd_left_count; __Pyx_Buffer __pyx_pybuffer_left_count; __Pyx_LocalBuf_ND __pyx_pybuffernd_left_indexer; __Pyx_Buffer __pyx_pybuffer_left_indexer; __Pyx_LocalBuf_ND __pyx_pybuffernd_left_sorter; __Pyx_Buffer __pyx_pybuffer_left_sorter; __Pyx_LocalBuf_ND __pyx_pybuffernd_right; __Pyx_Buffer __pyx_pybuffer_right; __Pyx_LocalBuf_ND __pyx_pybuffernd_right_count; __Pyx_Buffer __pyx_pybuffer_right_count; __Pyx_LocalBuf_ND __pyx_pybuffernd_right_indexer; __Pyx_Buffer __pyx_pybuffer_right_indexer; __Pyx_LocalBuf_ND __pyx_pybuffernd_right_sorter; __Pyx_Buffer __pyx_pybuffer_right_sorter; 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 *); PyArrayObject *__pyx_t_6 = NULL; 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; Py_ssize_t __pyx_t_14; int __pyx_t_15; int __pyx_t_16; int __pyx_t_17; long __pyx_t_18; long __pyx_t_19; PyObject *__pyx_t_20 = NULL; PyArrayObject *__pyx_t_21 = NULL; Py_ssize_t __pyx_t_22; Py_ssize_t __pyx_t_23; __pyx_t_5numpy_int64_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; __pyx_t_5numpy_int64_t __pyx_t_30; Py_ssize_t __pyx_t_31; Py_ssize_t __pyx_t_32; Py_ssize_t __pyx_t_33; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("full_outer_join", 0); __pyx_pybuffer_left_count.pybuffer.buf = NULL; __pyx_pybuffer_left_count.refcount = 0; __pyx_pybuffernd_left_count.data = NULL; __pyx_pybuffernd_left_count.rcbuffer = &__pyx_pybuffer_left_count; __pyx_pybuffer_right_count.pybuffer.buf = NULL; __pyx_pybuffer_right_count.refcount = 0; __pyx_pybuffernd_right_count.data = NULL; __pyx_pybuffernd_right_count.rcbuffer = &__pyx_pybuffer_right_count; __pyx_pybuffer_left_sorter.pybuffer.buf = NULL; __pyx_pybuffer_left_sorter.refcount = 0; __pyx_pybuffernd_left_sorter.data = NULL; __pyx_pybuffernd_left_sorter.rcbuffer = &__pyx_pybuffer_left_sorter; __pyx_pybuffer_right_sorter.pybuffer.buf = NULL; __pyx_pybuffer_right_sorter.refcount = 0; __pyx_pybuffernd_right_sorter.data = NULL; __pyx_pybuffernd_right_sorter.rcbuffer = &__pyx_pybuffer_right_sorter; __pyx_pybuffer_left_indexer.pybuffer.buf = NULL; __pyx_pybuffer_left_indexer.refcount = 0; __pyx_pybuffernd_left_indexer.data = NULL; __pyx_pybuffernd_left_indexer.rcbuffer = &__pyx_pybuffer_left_indexer; __pyx_pybuffer_right_indexer.pybuffer.buf = NULL; __pyx_pybuffer_right_indexer.refcount = 0; __pyx_pybuffernd_right_indexer.data = NULL; __pyx_pybuffernd_right_indexer.rcbuffer = &__pyx_pybuffer_right_indexer; __pyx_pybuffer_left.pybuffer.buf = NULL; __pyx_pybuffer_left.refcount = 0; __pyx_pybuffernd_left.data = NULL; __pyx_pybuffernd_left.rcbuffer = &__pyx_pybuffer_left; __pyx_pybuffer_right.pybuffer.buf = NULL; __pyx_pybuffer_right.refcount = 0; __pyx_pybuffernd_right.data = NULL; __pyx_pybuffernd_right.rcbuffer = &__pyx_pybuffer_right; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_left.rcbuffer->pybuffer, (PyObject*)__pyx_v_left, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 120; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_left.diminfo[0].strides = __pyx_pybuffernd_left.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_left.diminfo[0].shape = __pyx_pybuffernd_left.rcbuffer->pybuffer.shape[0]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_right.rcbuffer->pybuffer, (PyObject*)__pyx_v_right, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 120; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_right.diminfo[0].strides = __pyx_pybuffernd_right.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_right.diminfo[0].shape = __pyx_pybuffernd_right.rcbuffer->pybuffer.shape[0]; /* "pandas/src/join.pyx":123 * Py_ssize_t max_groups): * cdef: * Py_ssize_t i, j, k, count = 0 # <<<<<<<<<<<<<< * ndarray[int64_t] left_count, right_count, left_sorter, right_sorter * ndarray[int64_t] left_indexer, right_indexer */ __pyx_v_count = 0; /* "pandas/src/join.pyx":130 * # NA group in location 0 * * left_sorter, left_count = groupsort_indexer(left, max_groups) # <<<<<<<<<<<<<< * right_sorter, right_count = groupsort_indexer(right, max_groups) * */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_groupsort_indexer); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 130; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_max_groups); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 130; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 130; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(((PyObject *)__pyx_v_left)); PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_v_left)); __Pyx_GIVEREF(((PyObject *)__pyx_v_left)); PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_Call(__pyx_t_1, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 130; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if ((likely(PyTuple_CheckExact(__pyx_t_2))) || (PyList_CheckExact(__pyx_t_2))) { PyObject* sequence = __pyx_t_2; #if CYTHON_COMPILING_IN_CPYTHON Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); {__pyx_filename = __pyx_f[3]; __pyx_lineno = 130; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_1 = PyTuple_GET_ITEM(sequence, 1); } else { __pyx_t_3 = PyList_GET_ITEM(sequence, 0); __pyx_t_1 = PyList_GET_ITEM(sequence, 1); } __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(__pyx_t_1); #else __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 130; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 130; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); #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_filename = __pyx_f[3]; __pyx_lineno = 130; __pyx_clineno = __LINE__; goto __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_3 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_3)) goto __pyx_L3_unpacking_failed; __Pyx_GOTREF(__pyx_t_3); index = 1; __pyx_t_1 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_1)) goto __pyx_L3_unpacking_failed; __Pyx_GOTREF(__pyx_t_1); if (__Pyx_IternextUnpackEndCheck(__pyx_t_5(__pyx_t_4), 2) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 130; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[3]; __pyx_lineno = 130; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_L4_unpacking_done:; } if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 130; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 130; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_6 = ((PyArrayObject *)__pyx_t_3); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_left_sorter.rcbuffer->pybuffer); __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_left_sorter.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_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_left_sorter.rcbuffer->pybuffer, (PyObject*)__pyx_v_left_sorter, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_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_pybuffernd_left_sorter.diminfo[0].strides = __pyx_pybuffernd_left_sorter.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_left_sorter.diminfo[0].shape = __pyx_pybuffernd_left_sorter.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 130; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_6 = 0; __pyx_v_left_sorter = ((PyArrayObject *)__pyx_t_3); __pyx_t_3 = 0; __pyx_t_6 = ((PyArrayObject *)__pyx_t_1); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_left_count.rcbuffer->pybuffer); __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_left_count.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_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_left_count.rcbuffer->pybuffer, (PyObject*)__pyx_v_left_count, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_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_pybuffernd_left_count.diminfo[0].strides = __pyx_pybuffernd_left_count.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_left_count.diminfo[0].shape = __pyx_pybuffernd_left_count.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 130; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_6 = 0; __pyx_v_left_count = ((PyArrayObject *)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/join.pyx":131 * * left_sorter, left_count = groupsort_indexer(left, max_groups) * right_sorter, right_count = groupsort_indexer(right, max_groups) # <<<<<<<<<<<<<< * * # First pass, determine size of result set, do not use the NA group */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_groupsort_indexer); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 131; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_max_groups); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 131; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 131; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(((PyObject *)__pyx_v_right)); PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_v_right)); __Pyx_GIVEREF(((PyObject *)__pyx_v_right)); PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyObject_Call(__pyx_t_2, __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 131; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) { PyObject* sequence = __pyx_t_1; #if CYTHON_COMPILING_IN_CPYTHON Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); {__pyx_filename = __pyx_f[3]; __pyx_lineno = 131; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_2 = PyTuple_GET_ITEM(sequence, 1); } else { __pyx_t_3 = PyList_GET_ITEM(sequence, 0); __pyx_t_2 = PyList_GET_ITEM(sequence, 1); } __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(__pyx_t_2); #else __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 131; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 131; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } else { Py_ssize_t index = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 131; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_5 = Py_TYPE(__pyx_t_4)->tp_iternext; index = 0; __pyx_t_3 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_3)) goto __pyx_L5_unpacking_failed; __Pyx_GOTREF(__pyx_t_3); index = 1; __pyx_t_2 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_2)) goto __pyx_L5_unpacking_failed; __Pyx_GOTREF(__pyx_t_2); if (__Pyx_IternextUnpackEndCheck(__pyx_t_5(__pyx_t_4), 2) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 131; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_5 = NULL; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; goto __pyx_L6_unpacking_done; __pyx_L5_unpacking_failed:; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_5 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); {__pyx_filename = __pyx_f[3]; __pyx_lineno = 131; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_L6_unpacking_done:; } if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 131; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 131; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_6 = ((PyArrayObject *)__pyx_t_3); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_right_sorter.rcbuffer->pybuffer); __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_right_sorter.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_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_right_sorter.rcbuffer->pybuffer, (PyObject*)__pyx_v_right_sorter, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_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_pybuffernd_right_sorter.diminfo[0].strides = __pyx_pybuffernd_right_sorter.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_right_sorter.diminfo[0].shape = __pyx_pybuffernd_right_sorter.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 131; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_6 = 0; __pyx_v_right_sorter = ((PyArrayObject *)__pyx_t_3); __pyx_t_3 = 0; __pyx_t_6 = ((PyArrayObject *)__pyx_t_2); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_right_count.rcbuffer->pybuffer); __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_right_count.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_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_right_count.rcbuffer->pybuffer, (PyObject*)__pyx_v_right_count, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_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_pybuffernd_right_count.diminfo[0].strides = __pyx_pybuffernd_right_count.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_right_count.diminfo[0].shape = __pyx_pybuffernd_right_count.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 131; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_6 = 0; __pyx_v_right_count = ((PyArrayObject *)__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/join.pyx":134 * * # First pass, determine size of result set, do not use the NA group * for i in range(1, max_groups + 1): # <<<<<<<<<<<<<< * lc = left_count[i] * rc = right_count[i] */ __pyx_t_11 = (__pyx_v_max_groups + 1); for (__pyx_t_12 = 1; __pyx_t_12 < __pyx_t_11; __pyx_t_12+=1) { __pyx_v_i = __pyx_t_12; /* "pandas/src/join.pyx":135 * # First pass, determine size of result set, do not use the NA group * for i in range(1, max_groups + 1): * lc = left_count[i] # <<<<<<<<<<<<<< * rc = right_count[i] * */ __pyx_t_13 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_13 < 0) { __pyx_t_13 += __pyx_pybuffernd_left_count.diminfo[0].shape; if (unlikely(__pyx_t_13 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_13 >= __pyx_pybuffernd_left_count.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[3]; __pyx_lineno = 135; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_lc = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_left_count.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_left_count.diminfo[0].strides)); /* "pandas/src/join.pyx":136 * for i in range(1, max_groups + 1): * lc = left_count[i] * rc = right_count[i] # <<<<<<<<<<<<<< * * if rc > 0 and lc > 0: */ __pyx_t_14 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_14 < 0) { __pyx_t_14 += __pyx_pybuffernd_right_count.diminfo[0].shape; if (unlikely(__pyx_t_14 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_14 >= __pyx_pybuffernd_right_count.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[3]; __pyx_lineno = 136; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_rc = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_right_count.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_right_count.diminfo[0].strides)); /* "pandas/src/join.pyx":138 * rc = right_count[i] * * if rc > 0 and lc > 0: # <<<<<<<<<<<<<< * count += lc * rc * else: */ __pyx_t_15 = ((__pyx_v_rc > 0) != 0); if (__pyx_t_15) { __pyx_t_16 = ((__pyx_v_lc > 0) != 0); __pyx_t_17 = __pyx_t_16; } else { __pyx_t_17 = __pyx_t_15; } if (__pyx_t_17) { /* "pandas/src/join.pyx":139 * * if rc > 0 and lc > 0: * count += lc * rc # <<<<<<<<<<<<<< * else: * count += lc + rc */ __pyx_v_count = (__pyx_v_count + (__pyx_v_lc * __pyx_v_rc)); goto __pyx_L9; } /*else*/ { /* "pandas/src/join.pyx":141 * count += lc * rc * else: * count += lc + rc # <<<<<<<<<<<<<< * * # group 0 is the NA group */ __pyx_v_count = (__pyx_v_count + (__pyx_v_lc + __pyx_v_rc)); } __pyx_L9:; } /* "pandas/src/join.pyx":145 * # group 0 is the NA group * cdef: * int64_t left_pos = 0, right_pos = 0 # <<<<<<<<<<<<<< * Py_ssize_t offset, position = 0 * */ __pyx_v_left_pos = 0; __pyx_v_right_pos = 0; /* "pandas/src/join.pyx":146 * cdef: * int64_t left_pos = 0, right_pos = 0 * Py_ssize_t offset, position = 0 # <<<<<<<<<<<<<< * * # exclude the NA group */ __pyx_v_position = 0; /* "pandas/src/join.pyx":149 * * # exclude the NA group * left_pos = left_count[0] # <<<<<<<<<<<<<< * right_pos = right_count[0] * */ __pyx_t_18 = 0; __pyx_t_7 = -1; if (__pyx_t_18 < 0) { __pyx_t_18 += __pyx_pybuffernd_left_count.diminfo[0].shape; if (unlikely(__pyx_t_18 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_18 >= __pyx_pybuffernd_left_count.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[3]; __pyx_lineno = 149; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_left_pos = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_left_count.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_left_count.diminfo[0].strides)); /* "pandas/src/join.pyx":150 * # exclude the NA group * left_pos = left_count[0] * right_pos = right_count[0] # <<<<<<<<<<<<<< * * left_indexer = np.empty(count, dtype=np.int64) */ __pyx_t_19 = 0; __pyx_t_7 = -1; if (__pyx_t_19 < 0) { __pyx_t_19 += __pyx_pybuffernd_right_count.diminfo[0].shape; if (unlikely(__pyx_t_19 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_19 >= __pyx_pybuffernd_right_count.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[3]; __pyx_lineno = 150; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_right_pos = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_right_count.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_right_count.diminfo[0].strides)); /* "pandas/src/join.pyx":152 * right_pos = right_count[0] * * left_indexer = np.empty(count, dtype=np.int64) # <<<<<<<<<<<<<< * right_indexer = np.empty(count, dtype=np.int64) * */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 152; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[3]; __pyx_lineno = 152; __pyx_clineno = __LINE__; goto __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_count); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 152; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 152; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 152; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 152; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_20 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_int64); if (unlikely(!__pyx_t_20)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 152; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_20); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_dtype, __pyx_t_20) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 152; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0; __pyx_t_20 = PyObject_Call(__pyx_t_2, __pyx_t_3, __pyx_t_1); if (unlikely(!__pyx_t_20)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 152; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_20); __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_20) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_20, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 152; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_21 = ((PyArrayObject *)__pyx_t_20); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_left_indexer.rcbuffer->pybuffer); __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_left_indexer.rcbuffer->pybuffer, (PyObject*)__pyx_t_21, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_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_left_indexer.rcbuffer->pybuffer, (PyObject*)__pyx_v_left_indexer, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_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_pybuffernd_left_indexer.diminfo[0].strides = __pyx_pybuffernd_left_indexer.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_left_indexer.diminfo[0].shape = __pyx_pybuffernd_left_indexer.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 152; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_21 = 0; __pyx_v_left_indexer = ((PyArrayObject *)__pyx_t_20); __pyx_t_20 = 0; /* "pandas/src/join.pyx":153 * * left_indexer = np.empty(count, dtype=np.int64) * right_indexer = np.empty(count, dtype=np.int64) # <<<<<<<<<<<<<< * * for i in range(1, max_groups + 1): */ __pyx_t_20 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_20)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 153; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_20); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_20, __pyx_n_s_empty); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 153; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0; __pyx_t_20 = PyInt_FromSsize_t(__pyx_v_count); if (unlikely(!__pyx_t_20)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 153; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_20); __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 153; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_20); __Pyx_GIVEREF(__pyx_t_20); __pyx_t_20 = 0; __pyx_t_20 = PyDict_New(); if (unlikely(!__pyx_t_20)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 153; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_20); __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 153; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_int64); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 153; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (PyDict_SetItem(__pyx_t_20, __pyx_n_s_dtype, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 153; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyObject_Call(__pyx_t_1, __pyx_t_3, __pyx_t_20); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 153; __pyx_clineno = __LINE__; goto __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_DECREF(__pyx_t_20); __pyx_t_20 = 0; if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 153; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_21 = ((PyArrayObject *)__pyx_t_4); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_right_indexer.rcbuffer->pybuffer); __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_right_indexer.rcbuffer->pybuffer, (PyObject*)__pyx_t_21, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_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_right_indexer.rcbuffer->pybuffer, (PyObject*)__pyx_v_right_indexer, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_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_pybuffernd_right_indexer.diminfo[0].strides = __pyx_pybuffernd_right_indexer.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_right_indexer.diminfo[0].shape = __pyx_pybuffernd_right_indexer.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 153; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_21 = 0; __pyx_v_right_indexer = ((PyArrayObject *)__pyx_t_4); __pyx_t_4 = 0; /* "pandas/src/join.pyx":155 * right_indexer = np.empty(count, dtype=np.int64) * * for i in range(1, max_groups + 1): # <<<<<<<<<<<<<< * lc = left_count[i] * rc = right_count[i] */ __pyx_t_11 = (__pyx_v_max_groups + 1); for (__pyx_t_12 = 1; __pyx_t_12 < __pyx_t_11; __pyx_t_12+=1) { __pyx_v_i = __pyx_t_12; /* "pandas/src/join.pyx":156 * * for i in range(1, max_groups + 1): * lc = left_count[i] # <<<<<<<<<<<<<< * rc = right_count[i] * */ __pyx_t_22 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_22 < 0) { __pyx_t_22 += __pyx_pybuffernd_left_count.diminfo[0].shape; if (unlikely(__pyx_t_22 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_22 >= __pyx_pybuffernd_left_count.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[3]; __pyx_lineno = 156; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_lc = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_left_count.rcbuffer->pybuffer.buf, __pyx_t_22, __pyx_pybuffernd_left_count.diminfo[0].strides)); /* "pandas/src/join.pyx":157 * for i in range(1, max_groups + 1): * lc = left_count[i] * rc = right_count[i] # <<<<<<<<<<<<<< * * if rc == 0: */ __pyx_t_23 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_23 < 0) { __pyx_t_23 += __pyx_pybuffernd_right_count.diminfo[0].shape; if (unlikely(__pyx_t_23 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_23 >= __pyx_pybuffernd_right_count.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[3]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_rc = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_right_count.rcbuffer->pybuffer.buf, __pyx_t_23, __pyx_pybuffernd_right_count.diminfo[0].strides)); /* "pandas/src/join.pyx":159 * rc = right_count[i] * * if rc == 0: # <<<<<<<<<<<<<< * for j in range(lc): * left_indexer[position + j] = left_pos + j */ __pyx_t_17 = ((__pyx_v_rc == 0) != 0); if (__pyx_t_17) { /* "pandas/src/join.pyx":160 * * if rc == 0: * for j in range(lc): # <<<<<<<<<<<<<< * left_indexer[position + j] = left_pos + j * right_indexer[position + j] = -1 */ __pyx_t_24 = __pyx_v_lc; for (__pyx_t_25 = 0; __pyx_t_25 < __pyx_t_24; __pyx_t_25+=1) { __pyx_v_j = __pyx_t_25; /* "pandas/src/join.pyx":161 * if rc == 0: * for j in range(lc): * left_indexer[position + j] = left_pos + j # <<<<<<<<<<<<<< * right_indexer[position + j] = -1 * position += lc */ __pyx_t_26 = (__pyx_v_position + __pyx_v_j); __pyx_t_7 = -1; if (__pyx_t_26 < 0) { __pyx_t_26 += __pyx_pybuffernd_left_indexer.diminfo[0].shape; if (unlikely(__pyx_t_26 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_26 >= __pyx_pybuffernd_left_indexer.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[3]; __pyx_lineno = 161; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_left_indexer.rcbuffer->pybuffer.buf, __pyx_t_26, __pyx_pybuffernd_left_indexer.diminfo[0].strides) = (__pyx_v_left_pos + __pyx_v_j); /* "pandas/src/join.pyx":162 * for j in range(lc): * left_indexer[position + j] = left_pos + j * right_indexer[position + j] = -1 # <<<<<<<<<<<<<< * position += lc * elif lc == 0: */ __pyx_t_27 = (__pyx_v_position + __pyx_v_j); __pyx_t_7 = -1; if (__pyx_t_27 < 0) { __pyx_t_27 += __pyx_pybuffernd_right_indexer.diminfo[0].shape; if (unlikely(__pyx_t_27 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_27 >= __pyx_pybuffernd_right_indexer.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[3]; __pyx_lineno = 162; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_right_indexer.rcbuffer->pybuffer.buf, __pyx_t_27, __pyx_pybuffernd_right_indexer.diminfo[0].strides) = -1; } /* "pandas/src/join.pyx":163 * left_indexer[position + j] = left_pos + j * right_indexer[position + j] = -1 * position += lc # <<<<<<<<<<<<<< * elif lc == 0: * for j in range(rc): */ __pyx_v_position = (__pyx_v_position + __pyx_v_lc); goto __pyx_L12; } /* "pandas/src/join.pyx":164 * right_indexer[position + j] = -1 * position += lc * elif lc == 0: # <<<<<<<<<<<<<< * for j in range(rc): * left_indexer[position + j] = -1 */ __pyx_t_17 = ((__pyx_v_lc == 0) != 0); if (__pyx_t_17) { /* "pandas/src/join.pyx":165 * position += lc * elif lc == 0: * for j in range(rc): # <<<<<<<<<<<<<< * left_indexer[position + j] = -1 * right_indexer[position + j] = right_pos + j */ __pyx_t_24 = __pyx_v_rc; for (__pyx_t_25 = 0; __pyx_t_25 < __pyx_t_24; __pyx_t_25+=1) { __pyx_v_j = __pyx_t_25; /* "pandas/src/join.pyx":166 * elif lc == 0: * for j in range(rc): * left_indexer[position + j] = -1 # <<<<<<<<<<<<<< * right_indexer[position + j] = right_pos + j * position += rc */ __pyx_t_28 = (__pyx_v_position + __pyx_v_j); __pyx_t_7 = -1; if (__pyx_t_28 < 0) { __pyx_t_28 += __pyx_pybuffernd_left_indexer.diminfo[0].shape; if (unlikely(__pyx_t_28 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_28 >= __pyx_pybuffernd_left_indexer.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[3]; __pyx_lineno = 166; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_left_indexer.rcbuffer->pybuffer.buf, __pyx_t_28, __pyx_pybuffernd_left_indexer.diminfo[0].strides) = -1; /* "pandas/src/join.pyx":167 * for j in range(rc): * left_indexer[position + j] = -1 * right_indexer[position + j] = right_pos + j # <<<<<<<<<<<<<< * position += rc * else: */ __pyx_t_29 = (__pyx_v_position + __pyx_v_j); __pyx_t_7 = -1; if (__pyx_t_29 < 0) { __pyx_t_29 += __pyx_pybuffernd_right_indexer.diminfo[0].shape; if (unlikely(__pyx_t_29 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_29 >= __pyx_pybuffernd_right_indexer.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[3]; __pyx_lineno = 167; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_right_indexer.rcbuffer->pybuffer.buf, __pyx_t_29, __pyx_pybuffernd_right_indexer.diminfo[0].strides) = (__pyx_v_right_pos + __pyx_v_j); } /* "pandas/src/join.pyx":168 * left_indexer[position + j] = -1 * right_indexer[position + j] = right_pos + j * position += rc # <<<<<<<<<<<<<< * else: * for j in range(lc): */ __pyx_v_position = (__pyx_v_position + __pyx_v_rc); goto __pyx_L12; } /*else*/ { /* "pandas/src/join.pyx":170 * position += rc * else: * for j in range(lc): # <<<<<<<<<<<<<< * offset = position + j * rc * for k in range(rc): */ __pyx_t_24 = __pyx_v_lc; for (__pyx_t_25 = 0; __pyx_t_25 < __pyx_t_24; __pyx_t_25+=1) { __pyx_v_j = __pyx_t_25; /* "pandas/src/join.pyx":171 * else: * for j in range(lc): * offset = position + j * rc # <<<<<<<<<<<<<< * for k in range(rc): * left_indexer[offset + k] = left_pos + j */ __pyx_v_offset = (__pyx_v_position + (__pyx_v_j * __pyx_v_rc)); /* "pandas/src/join.pyx":172 * for j in range(lc): * offset = position + j * rc * for k in range(rc): # <<<<<<<<<<<<<< * left_indexer[offset + k] = left_pos + j * right_indexer[offset + k] = right_pos + k */ __pyx_t_30 = __pyx_v_rc; for (__pyx_t_31 = 0; __pyx_t_31 < __pyx_t_30; __pyx_t_31+=1) { __pyx_v_k = __pyx_t_31; /* "pandas/src/join.pyx":173 * offset = position + j * rc * for k in range(rc): * left_indexer[offset + k] = left_pos + j # <<<<<<<<<<<<<< * right_indexer[offset + k] = right_pos + k * position += lc * rc */ __pyx_t_32 = (__pyx_v_offset + __pyx_v_k); __pyx_t_7 = -1; if (__pyx_t_32 < 0) { __pyx_t_32 += __pyx_pybuffernd_left_indexer.diminfo[0].shape; if (unlikely(__pyx_t_32 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_32 >= __pyx_pybuffernd_left_indexer.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[3]; __pyx_lineno = 173; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_left_indexer.rcbuffer->pybuffer.buf, __pyx_t_32, __pyx_pybuffernd_left_indexer.diminfo[0].strides) = (__pyx_v_left_pos + __pyx_v_j); /* "pandas/src/join.pyx":174 * for k in range(rc): * left_indexer[offset + k] = left_pos + j * right_indexer[offset + k] = right_pos + k # <<<<<<<<<<<<<< * position += lc * rc * left_pos += lc */ __pyx_t_33 = (__pyx_v_offset + __pyx_v_k); __pyx_t_7 = -1; if (__pyx_t_33 < 0) { __pyx_t_33 += __pyx_pybuffernd_right_indexer.diminfo[0].shape; if (unlikely(__pyx_t_33 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_33 >= __pyx_pybuffernd_right_indexer.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[3]; __pyx_lineno = 174; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_right_indexer.rcbuffer->pybuffer.buf, __pyx_t_33, __pyx_pybuffernd_right_indexer.diminfo[0].strides) = (__pyx_v_right_pos + __pyx_v_k); } } /* "pandas/src/join.pyx":175 * left_indexer[offset + k] = left_pos + j * right_indexer[offset + k] = right_pos + k * position += lc * rc # <<<<<<<<<<<<<< * left_pos += lc * right_pos += rc */ __pyx_v_position = (__pyx_v_position + (__pyx_v_lc * __pyx_v_rc)); } __pyx_L12:; /* "pandas/src/join.pyx":176 * right_indexer[offset + k] = right_pos + k * position += lc * rc * left_pos += lc # <<<<<<<<<<<<<< * right_pos += rc * */ __pyx_v_left_pos = (__pyx_v_left_pos + __pyx_v_lc); /* "pandas/src/join.pyx":177 * position += lc * rc * left_pos += lc * right_pos += rc # <<<<<<<<<<<<<< * * return (_get_result_indexer(left_sorter, left_indexer), */ __pyx_v_right_pos = (__pyx_v_right_pos + __pyx_v_rc); } /* "pandas/src/join.pyx":179 * right_pos += rc * * return (_get_result_indexer(left_sorter, left_indexer), # <<<<<<<<<<<<<< * _get_result_indexer(right_sorter, right_indexer)) * */ __Pyx_XDECREF(__pyx_r); __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_get_result_indexer); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 179; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_20 = PyTuple_New(2); if (unlikely(!__pyx_t_20)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 179; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_20); __Pyx_INCREF(((PyObject *)__pyx_v_left_sorter)); PyTuple_SET_ITEM(__pyx_t_20, 0, ((PyObject *)__pyx_v_left_sorter)); __Pyx_GIVEREF(((PyObject *)__pyx_v_left_sorter)); __Pyx_INCREF(((PyObject *)__pyx_v_left_indexer)); PyTuple_SET_ITEM(__pyx_t_20, 1, ((PyObject *)__pyx_v_left_indexer)); __Pyx_GIVEREF(((PyObject *)__pyx_v_left_indexer)); __pyx_t_3 = PyObject_Call(__pyx_t_4, __pyx_t_20, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 179; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0; /* "pandas/src/join.pyx":180 * * return (_get_result_indexer(left_sorter, left_indexer), * _get_result_indexer(right_sorter, right_indexer)) # <<<<<<<<<<<<<< * * */ __pyx_t_20 = __Pyx_GetModuleGlobalName(__pyx_n_s_get_result_indexer); if (unlikely(!__pyx_t_20)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_20); __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(((PyObject *)__pyx_v_right_sorter)); PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_v_right_sorter)); __Pyx_GIVEREF(((PyObject *)__pyx_v_right_sorter)); __Pyx_INCREF(((PyObject *)__pyx_v_right_indexer)); PyTuple_SET_ITEM(__pyx_t_4, 1, ((PyObject *)__pyx_v_right_indexer)); __Pyx_GIVEREF(((PyObject *)__pyx_v_right_indexer)); __pyx_t_1 = PyObject_Call(__pyx_t_20, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "pandas/src/join.pyx":179 * right_pos += rc * * return (_get_result_indexer(left_sorter, left_indexer), # <<<<<<<<<<<<<< * _get_result_indexer(right_sorter, right_indexer)) * */ __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 179; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_3 = 0; __pyx_t_1 = 0; __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; /* "pandas/src/join.pyx":120 * * * def full_outer_join(ndarray[int64_t] left, ndarray[int64_t] right, # <<<<<<<<<<<<<< * Py_ssize_t max_groups): * 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_20); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_left.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_left_count.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_left_indexer.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_left_sorter.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_right.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_right_count.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_right_indexer.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_right_sorter.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.full_outer_join", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_left.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_left_count.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_left_indexer.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_left_sorter.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_right.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_right_count.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_right_indexer.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_right_sorter.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_left_count); __Pyx_XDECREF((PyObject *)__pyx_v_right_count); __Pyx_XDECREF((PyObject *)__pyx_v_left_sorter); __Pyx_XDECREF((PyObject *)__pyx_v_right_sorter); __Pyx_XDECREF((PyObject *)__pyx_v_left_indexer); __Pyx_XDECREF((PyObject *)__pyx_v_right_indexer); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/join.pyx":184 * * * def _get_result_indexer(sorter, indexer): # <<<<<<<<<<<<<< * if indexer.dtype != np.int_: * indexer = indexer.astype(np.int_) */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_81_get_result_indexer(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_81_get_result_indexer = {__Pyx_NAMESTR("_get_result_indexer"), (PyCFunction)__pyx_pw_6pandas_5algos_81_get_result_indexer, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_81_get_result_indexer(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_sorter = 0; PyObject *__pyx_v_indexer = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_get_result_indexer (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_sorter,&__pyx_n_s_indexer,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_sorter)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_indexer)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("_get_result_indexer", 1, 2, 2, 1); {__pyx_filename = __pyx_f[3]; __pyx_lineno = 184; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_get_result_indexer") < 0)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 184; __pyx_clineno = __LINE__; goto __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_sorter = values[0]; __pyx_v_indexer = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("_get_result_indexer", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[3]; __pyx_lineno = 184; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos._get_result_indexer", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pandas_5algos_80_get_result_indexer(__pyx_self, __pyx_v_sorter, __pyx_v_indexer); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5algos_80_get_result_indexer(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_sorter, PyObject *__pyx_v_indexer) { PyObject *__pyx_v_res = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_t_4; Py_ssize_t __pyx_t_5; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_get_result_indexer", 0); __Pyx_INCREF(__pyx_v_indexer); /* "pandas/src/join.pyx":185 * * def _get_result_indexer(sorter, indexer): * if indexer.dtype != np.int_: # <<<<<<<<<<<<<< * indexer = indexer.astype(np.int_) * if len(sorter) > 0: */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_indexer, __pyx_n_s_dtype); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 185; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 185; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_int); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 185; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_RichCompare(__pyx_t_1, __pyx_t_3, Py_NE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 185; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 185; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_4) { /* "pandas/src/join.pyx":186 * def _get_result_indexer(sorter, indexer): * if indexer.dtype != np.int_: * indexer = indexer.astype(np.int_) # <<<<<<<<<<<<<< * if len(sorter) > 0: * res = sorter.take(indexer) */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_indexer, __pyx_n_s_astype); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 186; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 186; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_int); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 186; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 186; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyObject_Call(__pyx_t_2, __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 186; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF_SET(__pyx_v_indexer, __pyx_t_1); __pyx_t_1 = 0; goto __pyx_L3; } __pyx_L3:; /* "pandas/src/join.pyx":187 * if indexer.dtype != np.int_: * indexer = indexer.astype(np.int_) * if len(sorter) > 0: # <<<<<<<<<<<<<< * res = sorter.take(indexer) * np.putmask(res, indexer == -1, -1) */ __pyx_t_5 = PyObject_Length(__pyx_v_sorter); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 187; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_4 = ((__pyx_t_5 > 0) != 0); if (__pyx_t_4) { /* "pandas/src/join.pyx":188 * indexer = indexer.astype(np.int_) * if len(sorter) > 0: * res = sorter.take(indexer) # <<<<<<<<<<<<<< * np.putmask(res, indexer == -1, -1) * else: */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_sorter, __pyx_n_s_take); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 188; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 188; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_v_indexer); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_indexer); __Pyx_GIVEREF(__pyx_v_indexer); __pyx_t_2 = PyObject_Call(__pyx_t_1, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 188; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_res = __pyx_t_2; __pyx_t_2 = 0; /* "pandas/src/join.pyx":189 * if len(sorter) > 0: * res = sorter.take(indexer) * np.putmask(res, indexer == -1, -1) # <<<<<<<<<<<<<< * else: * # length-0 case */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 189; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_putmask); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 189; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_RichCompare(__pyx_v_indexer, __pyx_int_neg_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 189; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 189; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_res); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_res); __Pyx_GIVEREF(__pyx_v_res); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __Pyx_INCREF(__pyx_int_neg_1); PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_int_neg_1); __Pyx_GIVEREF(__pyx_int_neg_1); __pyx_t_2 = 0; __pyx_t_2 = PyObject_Call(__pyx_t_3, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 189; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; goto __pyx_L4; } /*else*/ { /* "pandas/src/join.pyx":192 * else: * # length-0 case * res = np.empty(len(indexer), dtype=np.int64) # <<<<<<<<<<<<<< * res.fill(-1) * */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 192; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_empty); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 192; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_5 = PyObject_Length(__pyx_v_indexer); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 192; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_2 = PyInt_FromSsize_t(__pyx_t_5); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 192; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 192; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 192; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 192; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_int64); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 192; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_dtype, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 192; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_7 = PyObject_Call(__pyx_t_1, __pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 192; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_res = __pyx_t_7; __pyx_t_7 = 0; /* "pandas/src/join.pyx":193 * # length-0 case * res = np.empty(len(indexer), dtype=np.int64) * res.fill(-1) # <<<<<<<<<<<<<< * * return res */ __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_res, __pyx_n_s_fill); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 193; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_t_2 = PyObject_Call(__pyx_t_7, __pyx_tuple__33, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 193; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } __pyx_L4:; /* "pandas/src/join.pyx":195 * res.fill(-1) * * return res # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_res); __pyx_r = __pyx_v_res; goto __pyx_L0; /* "pandas/src/join.pyx":184 * * * def _get_result_indexer(sorter, indexer): # <<<<<<<<<<<<<< * if indexer.dtype != np.int_: * indexer = indexer.astype(np.int_) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_AddTraceback("pandas.algos._get_result_indexer", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_res); __Pyx_XDECREF(__pyx_v_indexer); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/join.pyx":199 * * * def ffill_indexer(ndarray[int64_t] indexer): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = len(indexer) */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_83ffill_indexer(PyObject *__pyx_self, PyObject *__pyx_v_indexer); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_83ffill_indexer = {__Pyx_NAMESTR("ffill_indexer"), (PyCFunction)__pyx_pw_6pandas_5algos_83ffill_indexer, METH_O, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_83ffill_indexer(PyObject *__pyx_self, PyObject *__pyx_v_indexer) { CYTHON_UNUSED int __pyx_lineno = 0; CYTHON_UNUSED const char *__pyx_filename = NULL; CYTHON_UNUSED int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("ffill_indexer (wrapper)", 0); if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_indexer), __pyx_ptype_5numpy_ndarray, 1, "indexer", 0))) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 199; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_82ffill_indexer(__pyx_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_5algos_82ffill_indexer(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_indexer) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_n; PyArrayObject *__pyx_v_result = 0; __pyx_t_5numpy_int64_t __pyx_v_val; __pyx_t_5numpy_int64_t __pyx_v_last_obs; __Pyx_LocalBuf_ND __pyx_pybuffernd_indexer; __Pyx_Buffer __pyx_pybuffer_indexer; __Pyx_LocalBuf_ND __pyx_pybuffernd_result; __Pyx_Buffer __pyx_pybuffer_result; 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; int __pyx_t_14; Py_ssize_t __pyx_t_15; Py_ssize_t __pyx_t_16; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("ffill_indexer", 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_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_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 199; __pyx_clineno = __LINE__; goto __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]; /* "pandas/src/join.pyx":201 * def ffill_indexer(ndarray[int64_t] indexer): * cdef: * Py_ssize_t i, n = len(indexer) # <<<<<<<<<<<<<< * ndarray[int64_t] result * int64_t val, last_obs */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_indexer)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 201; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/src/join.pyx":205 * int64_t val, last_obs * * result = np.empty(n, dtype=np.int64) # <<<<<<<<<<<<<< * last_obs = -1 * */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 205; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[3]; __pyx_lineno = 205; __pyx_clineno = __LINE__; goto __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_n); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 205; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 205; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 205; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 205; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_int64); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 205; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[3]; __pyx_lineno = 205; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyObject_Call(__pyx_t_3, __pyx_t_4, __pyx_t_2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 205; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[3]; __pyx_lineno = 205; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_7 = ((PyArrayObject *)__pyx_t_6); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_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_result.rcbuffer->pybuffer, (PyObject*)__pyx_v_result, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_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_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_8 < 0)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 205; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_7 = 0; __pyx_v_result = ((PyArrayObject *)__pyx_t_6); __pyx_t_6 = 0; /* "pandas/src/join.pyx":206 * * result = np.empty(n, dtype=np.int64) * last_obs = -1 # <<<<<<<<<<<<<< * * for i in range(n): */ __pyx_v_last_obs = -1; /* "pandas/src/join.pyx":208 * last_obs = -1 * * for i in range(n): # <<<<<<<<<<<<<< * val = indexer[i] * if val == -1: */ __pyx_t_1 = __pyx_v_n; for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_1; __pyx_t_12+=1) { __pyx_v_i = __pyx_t_12; /* "pandas/src/join.pyx":209 * * for i in range(n): * val = indexer[i] # <<<<<<<<<<<<<< * if val == -1: * result[i] = last_obs */ __pyx_t_13 = __pyx_v_i; __pyx_t_8 = -1; if (__pyx_t_13 < 0) { __pyx_t_13 += __pyx_pybuffernd_indexer.diminfo[0].shape; if (unlikely(__pyx_t_13 < 0)) __pyx_t_8 = 0; } else if (unlikely(__pyx_t_13 >= __pyx_pybuffernd_indexer.diminfo[0].shape)) __pyx_t_8 = 0; if (unlikely(__pyx_t_8 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_8); {__pyx_filename = __pyx_f[3]; __pyx_lineno = 209; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_val = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_indexer.diminfo[0].strides)); /* "pandas/src/join.pyx":210 * for i in range(n): * val = indexer[i] * if val == -1: # <<<<<<<<<<<<<< * result[i] = last_obs * else: */ __pyx_t_14 = ((__pyx_v_val == -1) != 0); if (__pyx_t_14) { /* "pandas/src/join.pyx":211 * val = indexer[i] * if val == -1: * result[i] = last_obs # <<<<<<<<<<<<<< * else: * result[i] = val */ __pyx_t_15 = __pyx_v_i; __pyx_t_8 = -1; if (__pyx_t_15 < 0) { __pyx_t_15 += __pyx_pybuffernd_result.diminfo[0].shape; if (unlikely(__pyx_t_15 < 0)) __pyx_t_8 = 0; } else if (unlikely(__pyx_t_15 >= __pyx_pybuffernd_result.diminfo[0].shape)) __pyx_t_8 = 0; if (unlikely(__pyx_t_8 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_8); {__pyx_filename = __pyx_f[3]; __pyx_lineno = 211; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_result.diminfo[0].strides) = __pyx_v_last_obs; goto __pyx_L5; } /*else*/ { /* "pandas/src/join.pyx":213 * result[i] = last_obs * else: * result[i] = val # <<<<<<<<<<<<<< * last_obs = val * */ __pyx_t_16 = __pyx_v_i; __pyx_t_8 = -1; if (__pyx_t_16 < 0) { __pyx_t_16 += __pyx_pybuffernd_result.diminfo[0].shape; if (unlikely(__pyx_t_16 < 0)) __pyx_t_8 = 0; } else if (unlikely(__pyx_t_16 >= __pyx_pybuffernd_result.diminfo[0].shape)) __pyx_t_8 = 0; if (unlikely(__pyx_t_8 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_8); {__pyx_filename = __pyx_f[3]; __pyx_lineno = 213; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_result.diminfo[0].strides) = __pyx_v_val; /* "pandas/src/join.pyx":214 * else: * result[i] = val * last_obs = val # <<<<<<<<<<<<<< * * return result */ __pyx_v_last_obs = __pyx_v_val; } __pyx_L5:; } /* "pandas/src/join.pyx":216 * last_obs = val * * return result # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_result)); __pyx_r = ((PyObject *)__pyx_v_result); goto __pyx_L0; /* "pandas/src/join.pyx":199 * * * def ffill_indexer(ndarray[int64_t] indexer): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = len(indexer) */ /* 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_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.ffill_indexer", __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_result.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_result); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/join.pyx":219 * * * def ffill_by_group(ndarray[int64_t] indexer, ndarray[int64_t] group_ids, # <<<<<<<<<<<<<< * int64_t max_group): * cdef: */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_85ffill_by_group(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_85ffill_by_group = {__Pyx_NAMESTR("ffill_by_group"), (PyCFunction)__pyx_pw_6pandas_5algos_85ffill_by_group, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_85ffill_by_group(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_indexer = 0; PyArrayObject *__pyx_v_group_ids = 0; __pyx_t_5numpy_int64_t __pyx_v_max_group; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("ffill_by_group (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_indexer,&__pyx_n_s_group_ids,&__pyx_n_s_max_group,0}; PyObject* values[3] = {0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_indexer)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_group_ids)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("ffill_by_group", 1, 3, 3, 1); {__pyx_filename = __pyx_f[3]; __pyx_lineno = 219; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_max_group)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("ffill_by_group", 1, 3, 3, 2); {__pyx_filename = __pyx_f[3]; __pyx_lineno = 219; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "ffill_by_group") < 0)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 219; __pyx_clineno = __LINE__; goto __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_indexer = ((PyArrayObject *)values[0]); __pyx_v_group_ids = ((PyArrayObject *)values[1]); __pyx_v_max_group = __Pyx_PyInt_As_npy_int64(values[2]); if (unlikely((__pyx_v_max_group == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 220; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("ffill_by_group", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[3]; __pyx_lineno = 219; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.ffill_by_group", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_indexer), __pyx_ptype_5numpy_ndarray, 1, "indexer", 0))) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 219; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_group_ids), __pyx_ptype_5numpy_ndarray, 1, "group_ids", 0))) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 219; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_84ffill_by_group(__pyx_self, __pyx_v_indexer, __pyx_v_group_ids, __pyx_v_max_group); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5algos_84ffill_by_group(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_indexer, PyArrayObject *__pyx_v_group_ids, __pyx_t_5numpy_int64_t __pyx_v_max_group) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_n; PyArrayObject *__pyx_v_result = 0; PyArrayObject *__pyx_v_last_obs = 0; __pyx_t_5numpy_int64_t __pyx_v_gid; __pyx_t_5numpy_int64_t __pyx_v_val; __Pyx_LocalBuf_ND __pyx_pybuffernd_group_ids; __Pyx_Buffer __pyx_pybuffer_group_ids; __Pyx_LocalBuf_ND __pyx_pybuffernd_indexer; __Pyx_Buffer __pyx_pybuffer_indexer; __Pyx_LocalBuf_ND __pyx_pybuffernd_last_obs; __Pyx_Buffer __pyx_pybuffer_last_obs; __Pyx_LocalBuf_ND __pyx_pybuffernd_result; __Pyx_Buffer __pyx_pybuffer_result; 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; __pyx_t_5numpy_int64_t __pyx_t_16; Py_ssize_t __pyx_t_17; Py_ssize_t __pyx_t_18; __pyx_t_5numpy_int64_t __pyx_t_19; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("ffill_by_group", 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_last_obs.pybuffer.buf = NULL; __pyx_pybuffer_last_obs.refcount = 0; __pyx_pybuffernd_last_obs.data = NULL; __pyx_pybuffernd_last_obs.rcbuffer = &__pyx_pybuffer_last_obs; __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_group_ids.pybuffer.buf = NULL; __pyx_pybuffer_group_ids.refcount = 0; __pyx_pybuffernd_group_ids.data = NULL; __pyx_pybuffernd_group_ids.rcbuffer = &__pyx_pybuffer_group_ids; { __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_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 219; __pyx_clineno = __LINE__; goto __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_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_group_ids.rcbuffer->pybuffer, (PyObject*)__pyx_v_group_ids, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 219; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_group_ids.diminfo[0].strides = __pyx_pybuffernd_group_ids.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_group_ids.diminfo[0].shape = __pyx_pybuffernd_group_ids.rcbuffer->pybuffer.shape[0]; /* "pandas/src/join.pyx":222 * int64_t max_group): * cdef: * Py_ssize_t i, n = len(indexer) # <<<<<<<<<<<<<< * ndarray[int64_t] result, last_obs * int64_t gid, val */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_indexer)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 222; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/src/join.pyx":226 * int64_t gid, val * * result = np.empty(n, dtype=np.int64) # <<<<<<<<<<<<<< * * last_obs = np.empty(max_group, dtype=np.int64) */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 226; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[3]; __pyx_lineno = 226; __pyx_clineno = __LINE__; goto __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_n); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 226; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 226; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 226; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 226; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_int64); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 226; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[3]; __pyx_lineno = 226; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyObject_Call(__pyx_t_3, __pyx_t_4, __pyx_t_2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 226; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[3]; __pyx_lineno = 226; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_7 = ((PyArrayObject *)__pyx_t_6); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_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_result.rcbuffer->pybuffer, (PyObject*)__pyx_v_result, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_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_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_8 < 0)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 226; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_7 = 0; __pyx_v_result = ((PyArrayObject *)__pyx_t_6); __pyx_t_6 = 0; /* "pandas/src/join.pyx":228 * result = np.empty(n, dtype=np.int64) * * last_obs = np.empty(max_group, dtype=np.int64) # <<<<<<<<<<<<<< * last_obs.fill(-1) * */ __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 228; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_empty); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 228; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = __Pyx_PyInt_From_npy_int64(__pyx_v_max_group); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 228; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 228; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyDict_New(); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 228; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 228; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_int64); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 228; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_dtype, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 228; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyObject_Call(__pyx_t_2, __pyx_t_4, __pyx_t_6); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 228; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 228; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_7 = ((PyArrayObject *)__pyx_t_5); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_last_obs.rcbuffer->pybuffer); __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_last_obs.rcbuffer->pybuffer, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 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_last_obs.rcbuffer->pybuffer, (PyObject*)__pyx_v_last_obs, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 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_pybuffernd_last_obs.diminfo[0].strides = __pyx_pybuffernd_last_obs.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_last_obs.diminfo[0].shape = __pyx_pybuffernd_last_obs.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 228; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_7 = 0; __pyx_v_last_obs = ((PyArrayObject *)__pyx_t_5); __pyx_t_5 = 0; /* "pandas/src/join.pyx":229 * * last_obs = np.empty(max_group, dtype=np.int64) * last_obs.fill(-1) # <<<<<<<<<<<<<< * * for i in range(n): */ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_last_obs), __pyx_n_s_fill); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 229; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = PyObject_Call(__pyx_t_5, __pyx_tuple__34, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 229; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; /* "pandas/src/join.pyx":231 * last_obs.fill(-1) * * for i in range(n): # <<<<<<<<<<<<<< * gid = group_ids[i] * val = indexer[i] */ __pyx_t_1 = __pyx_v_n; for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_1; __pyx_t_12+=1) { __pyx_v_i = __pyx_t_12; /* "pandas/src/join.pyx":232 * * for i in range(n): * gid = group_ids[i] # <<<<<<<<<<<<<< * val = indexer[i] * if val == -1: */ __pyx_t_13 = __pyx_v_i; __pyx_t_8 = -1; if (__pyx_t_13 < 0) { __pyx_t_13 += __pyx_pybuffernd_group_ids.diminfo[0].shape; if (unlikely(__pyx_t_13 < 0)) __pyx_t_8 = 0; } else if (unlikely(__pyx_t_13 >= __pyx_pybuffernd_group_ids.diminfo[0].shape)) __pyx_t_8 = 0; if (unlikely(__pyx_t_8 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_8); {__pyx_filename = __pyx_f[3]; __pyx_lineno = 232; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_gid = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_group_ids.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_group_ids.diminfo[0].strides)); /* "pandas/src/join.pyx":233 * for i in range(n): * gid = group_ids[i] * val = indexer[i] # <<<<<<<<<<<<<< * if val == -1: * result[i] = last_obs[gid] */ __pyx_t_14 = __pyx_v_i; __pyx_t_8 = -1; if (__pyx_t_14 < 0) { __pyx_t_14 += __pyx_pybuffernd_indexer.diminfo[0].shape; if (unlikely(__pyx_t_14 < 0)) __pyx_t_8 = 0; } else if (unlikely(__pyx_t_14 >= __pyx_pybuffernd_indexer.diminfo[0].shape)) __pyx_t_8 = 0; if (unlikely(__pyx_t_8 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_8); {__pyx_filename = __pyx_f[3]; __pyx_lineno = 233; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_val = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_indexer.diminfo[0].strides)); /* "pandas/src/join.pyx":234 * gid = group_ids[i] * val = indexer[i] * if val == -1: # <<<<<<<<<<<<<< * result[i] = last_obs[gid] * else: */ __pyx_t_15 = ((__pyx_v_val == -1) != 0); if (__pyx_t_15) { /* "pandas/src/join.pyx":235 * val = indexer[i] * if val == -1: * result[i] = last_obs[gid] # <<<<<<<<<<<<<< * else: * result[i] = val */ __pyx_t_16 = __pyx_v_gid; __pyx_t_8 = -1; if (__pyx_t_16 < 0) { __pyx_t_16 += __pyx_pybuffernd_last_obs.diminfo[0].shape; if (unlikely(__pyx_t_16 < 0)) __pyx_t_8 = 0; } else if (unlikely(__pyx_t_16 >= __pyx_pybuffernd_last_obs.diminfo[0].shape)) __pyx_t_8 = 0; if (unlikely(__pyx_t_8 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_8); {__pyx_filename = __pyx_f[3]; __pyx_lineno = 235; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_17 = __pyx_v_i; __pyx_t_8 = -1; if (__pyx_t_17 < 0) { __pyx_t_17 += __pyx_pybuffernd_result.diminfo[0].shape; if (unlikely(__pyx_t_17 < 0)) __pyx_t_8 = 0; } else if (unlikely(__pyx_t_17 >= __pyx_pybuffernd_result.diminfo[0].shape)) __pyx_t_8 = 0; if (unlikely(__pyx_t_8 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_8); {__pyx_filename = __pyx_f[3]; __pyx_lineno = 235; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_result.diminfo[0].strides) = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_last_obs.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_last_obs.diminfo[0].strides)); goto __pyx_L5; } /*else*/ { /* "pandas/src/join.pyx":237 * result[i] = last_obs[gid] * else: * result[i] = val # <<<<<<<<<<<<<< * last_obs[gid] = val * */ __pyx_t_18 = __pyx_v_i; __pyx_t_8 = -1; if (__pyx_t_18 < 0) { __pyx_t_18 += __pyx_pybuffernd_result.diminfo[0].shape; if (unlikely(__pyx_t_18 < 0)) __pyx_t_8 = 0; } else if (unlikely(__pyx_t_18 >= __pyx_pybuffernd_result.diminfo[0].shape)) __pyx_t_8 = 0; if (unlikely(__pyx_t_8 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_8); {__pyx_filename = __pyx_f[3]; __pyx_lineno = 237; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_result.diminfo[0].strides) = __pyx_v_val; /* "pandas/src/join.pyx":238 * else: * result[i] = val * last_obs[gid] = val # <<<<<<<<<<<<<< * * return result */ __pyx_t_19 = __pyx_v_gid; __pyx_t_8 = -1; if (__pyx_t_19 < 0) { __pyx_t_19 += __pyx_pybuffernd_last_obs.diminfo[0].shape; if (unlikely(__pyx_t_19 < 0)) __pyx_t_8 = 0; } else if (unlikely(__pyx_t_19 >= __pyx_pybuffernd_last_obs.diminfo[0].shape)) __pyx_t_8 = 0; if (unlikely(__pyx_t_8 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_8); {__pyx_filename = __pyx_f[3]; __pyx_lineno = 238; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_last_obs.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_last_obs.diminfo[0].strides) = __pyx_v_val; } __pyx_L5:; } /* "pandas/src/join.pyx":240 * last_obs[gid] = val * * return result # <<<<<<<<<<<<<< * */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_result)); __pyx_r = ((PyObject *)__pyx_v_result); goto __pyx_L0; /* "pandas/src/join.pyx":219 * * * def ffill_by_group(ndarray[int64_t] indexer, ndarray[int64_t] group_ids, # <<<<<<<<<<<<<< * int64_t max_group): * cdef: */ /* 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_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_group_ids.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_last_obs.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.ffill_by_group", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_group_ids.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_last_obs.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_result); __Pyx_XDECREF((PyObject *)__pyx_v_last_obs); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":41 * cdef int PLATFORM_INT = ( np.arange(0, dtype=np.int_)).descr.type_num * * cpdef ensure_platform_int(object arr): # <<<<<<<<<<<<<< * if util.is_array(arr): * if ( arr).descr.type_num == PLATFORM_INT: */ static PyObject *__pyx_pw_6pandas_5algos_87ensure_platform_int(PyObject *__pyx_self, PyObject *__pyx_v_arr); /*proto*/ static PyObject *__pyx_f_6pandas_5algos_ensure_platform_int(PyObject *__pyx_v_arr, CYTHON_UNUSED int __pyx_skip_dispatch) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("ensure_platform_int", 0); /* "pandas/src/generated.pyx":42 * * cpdef ensure_platform_int(object arr): * if util.is_array(arr): # <<<<<<<<<<<<<< * if ( arr).descr.type_num == PLATFORM_INT: * return arr */ __pyx_t_1 = __pyx_f_4util_is_array(__pyx_v_arr); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 42; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 42; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_2) { /* "pandas/src/generated.pyx":43 * cpdef ensure_platform_int(object arr): * if util.is_array(arr): * if ( arr).descr.type_num == PLATFORM_INT: # <<<<<<<<<<<<<< * return arr * else: */ __pyx_t_2 = ((((PyArrayObject *)__pyx_v_arr)->descr->type_num == __pyx_v_6pandas_5algos_PLATFORM_INT) != 0); if (__pyx_t_2) { /* "pandas/src/generated.pyx":44 * if util.is_array(arr): * if ( arr).descr.type_num == PLATFORM_INT: * return arr # <<<<<<<<<<<<<< * else: * return arr.astype(np.int_) */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_arr); __pyx_r = __pyx_v_arr; goto __pyx_L0; } /*else*/ { /* "pandas/src/generated.pyx":46 * return arr * else: * return arr.astype(np.int_) # <<<<<<<<<<<<<< * else: * return np.array(arr, dtype=np.int_) */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_arr, __pyx_n_s_astype); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 46; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 46; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_int); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 46; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 46; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyObject_Call(__pyx_t_1, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 46; __pyx_clineno = __LINE__; goto __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_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; } } /*else*/ { /* "pandas/src/generated.pyx":48 * return arr.astype(np.int_) * else: * return np.array(arr, dtype=np.int_) # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_array); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_v_arr); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_arr); __Pyx_GIVEREF(__pyx_v_arr); __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_int); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_dtype, __pyx_t_6) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyObject_Call(__pyx_t_3, __pyx_t_4, __pyx_t_1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __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_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_6; __pyx_t_6 = 0; goto __pyx_L0; } /* "pandas/src/generated.pyx":41 * cdef int PLATFORM_INT = ( np.arange(0, dtype=np.int_)).descr.type_num * * cpdef ensure_platform_int(object arr): # <<<<<<<<<<<<<< * if util.is_array(arr): * if ( arr).descr.type_num == PLATFORM_INT: */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("pandas.algos.ensure_platform_int", __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_5algos_87ensure_platform_int(PyObject *__pyx_self, PyObject *__pyx_v_arr); /*proto*/ static PyObject *__pyx_pw_6pandas_5algos_87ensure_platform_int(PyObject *__pyx_self, PyObject *__pyx_v_arr) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("ensure_platform_int (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_5algos_86ensure_platform_int(__pyx_self, ((PyObject *)__pyx_v_arr)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5algos_86ensure_platform_int(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_arr) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("ensure_platform_int", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_6pandas_5algos_ensure_platform_int(__pyx_v_arr, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 41; __pyx_clineno = __LINE__; goto __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.algos.ensure_platform_int", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":52 * * * cpdef ensure_float64(object arr): # <<<<<<<<<<<<<< * if util.is_array(arr): * if ( arr).descr.type_num == NPY_FLOAT64: */ static PyObject *__pyx_pw_6pandas_5algos_89ensure_float64(PyObject *__pyx_self, PyObject *__pyx_v_arr); /*proto*/ static PyObject *__pyx_f_6pandas_5algos_ensure_float64(PyObject *__pyx_v_arr, CYTHON_UNUSED int __pyx_skip_dispatch) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("ensure_float64", 0); /* "pandas/src/generated.pyx":53 * * cpdef ensure_float64(object arr): * if util.is_array(arr): # <<<<<<<<<<<<<< * if ( arr).descr.type_num == NPY_FLOAT64: * return arr */ __pyx_t_1 = __pyx_f_4util_is_array(__pyx_v_arr); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 53; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 53; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_2) { /* "pandas/src/generated.pyx":54 * cpdef ensure_float64(object arr): * if util.is_array(arr): * if ( arr).descr.type_num == NPY_FLOAT64: # <<<<<<<<<<<<<< * return arr * else: */ __pyx_t_2 = ((((PyArrayObject *)__pyx_v_arr)->descr->type_num == NPY_FLOAT64) != 0); if (__pyx_t_2) { /* "pandas/src/generated.pyx":55 * if util.is_array(arr): * if ( arr).descr.type_num == NPY_FLOAT64: * return arr # <<<<<<<<<<<<<< * else: * return arr.astype(np.float64) */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_arr); __pyx_r = __pyx_v_arr; goto __pyx_L0; } /*else*/ { /* "pandas/src/generated.pyx":57 * return arr * else: * return arr.astype(np.float64) # <<<<<<<<<<<<<< * else: * return np.array(arr, dtype=np.float64) */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_arr, __pyx_n_s_astype); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 57; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 57; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_float64); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 57; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 57; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyObject_Call(__pyx_t_1, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 57; __pyx_clineno = __LINE__; goto __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_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; } } /*else*/ { /* "pandas/src/generated.pyx":59 * return arr.astype(np.float64) * else: * return np.array(arr, dtype=np.float64) # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 59; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_array); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 59; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 59; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_v_arr); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_arr); __Pyx_GIVEREF(__pyx_v_arr); __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 59; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 59; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_float64); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 59; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_dtype, __pyx_t_6) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 59; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyObject_Call(__pyx_t_3, __pyx_t_4, __pyx_t_1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 59; __pyx_clineno = __LINE__; goto __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_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_6; __pyx_t_6 = 0; goto __pyx_L0; } /* "pandas/src/generated.pyx":52 * * * cpdef ensure_float64(object arr): # <<<<<<<<<<<<<< * if util.is_array(arr): * if ( arr).descr.type_num == NPY_FLOAT64: */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("pandas.algos.ensure_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_5algos_89ensure_float64(PyObject *__pyx_self, PyObject *__pyx_v_arr); /*proto*/ static PyObject *__pyx_pw_6pandas_5algos_89ensure_float64(PyObject *__pyx_self, PyObject *__pyx_v_arr) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("ensure_float64 (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_5algos_88ensure_float64(__pyx_self, ((PyObject *)__pyx_v_arr)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5algos_88ensure_float64(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_arr) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("ensure_float64", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_6pandas_5algos_ensure_float64(__pyx_v_arr, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 52; __pyx_clineno = __LINE__; goto __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.algos.ensure_float64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":62 * * * cpdef ensure_float32(object arr): # <<<<<<<<<<<<<< * if util.is_array(arr): * if ( arr).descr.type_num == NPY_FLOAT32: */ static PyObject *__pyx_pw_6pandas_5algos_91ensure_float32(PyObject *__pyx_self, PyObject *__pyx_v_arr); /*proto*/ static PyObject *__pyx_f_6pandas_5algos_ensure_float32(PyObject *__pyx_v_arr, CYTHON_UNUSED int __pyx_skip_dispatch) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("ensure_float32", 0); /* "pandas/src/generated.pyx":63 * * cpdef ensure_float32(object arr): * if util.is_array(arr): # <<<<<<<<<<<<<< * if ( arr).descr.type_num == NPY_FLOAT32: * return arr */ __pyx_t_1 = __pyx_f_4util_is_array(__pyx_v_arr); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_2) { /* "pandas/src/generated.pyx":64 * cpdef ensure_float32(object arr): * if util.is_array(arr): * if ( arr).descr.type_num == NPY_FLOAT32: # <<<<<<<<<<<<<< * return arr * else: */ __pyx_t_2 = ((((PyArrayObject *)__pyx_v_arr)->descr->type_num == NPY_FLOAT32) != 0); if (__pyx_t_2) { /* "pandas/src/generated.pyx":65 * if util.is_array(arr): * if ( arr).descr.type_num == NPY_FLOAT32: * return arr # <<<<<<<<<<<<<< * else: * return arr.astype(np.float32) */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_arr); __pyx_r = __pyx_v_arr; goto __pyx_L0; } /*else*/ { /* "pandas/src/generated.pyx":67 * return arr * else: * return arr.astype(np.float32) # <<<<<<<<<<<<<< * else: * return np.array(arr, dtype=np.float32) */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_arr, __pyx_n_s_astype); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 67; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 67; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_float32); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 67; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 67; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyObject_Call(__pyx_t_1, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 67; __pyx_clineno = __LINE__; goto __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_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; } } /*else*/ { /* "pandas/src/generated.pyx":69 * return arr.astype(np.float32) * else: * return np.array(arr, dtype=np.float32) # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_array); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_v_arr); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_arr); __Pyx_GIVEREF(__pyx_v_arr); __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_float32); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_dtype, __pyx_t_6) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyObject_Call(__pyx_t_3, __pyx_t_4, __pyx_t_1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __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_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_6; __pyx_t_6 = 0; goto __pyx_L0; } /* "pandas/src/generated.pyx":62 * * * cpdef ensure_float32(object arr): # <<<<<<<<<<<<<< * if util.is_array(arr): * if ( arr).descr.type_num == NPY_FLOAT32: */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("pandas.algos.ensure_float32", __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_5algos_91ensure_float32(PyObject *__pyx_self, PyObject *__pyx_v_arr); /*proto*/ static PyObject *__pyx_pw_6pandas_5algos_91ensure_float32(PyObject *__pyx_self, PyObject *__pyx_v_arr) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("ensure_float32 (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_5algos_90ensure_float32(__pyx_self, ((PyObject *)__pyx_v_arr)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5algos_90ensure_float32(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_arr) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("ensure_float32", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_6pandas_5algos_ensure_float32(__pyx_v_arr, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __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.algos.ensure_float32", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":72 * * * cpdef ensure_int8(object arr): # <<<<<<<<<<<<<< * if util.is_array(arr): * if ( arr).descr.type_num == NPY_INT8: */ static PyObject *__pyx_pw_6pandas_5algos_93ensure_int8(PyObject *__pyx_self, PyObject *__pyx_v_arr); /*proto*/ static PyObject *__pyx_f_6pandas_5algos_ensure_int8(PyObject *__pyx_v_arr, CYTHON_UNUSED int __pyx_skip_dispatch) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("ensure_int8", 0); /* "pandas/src/generated.pyx":73 * * cpdef ensure_int8(object arr): * if util.is_array(arr): # <<<<<<<<<<<<<< * if ( arr).descr.type_num == NPY_INT8: * return arr */ __pyx_t_1 = __pyx_f_4util_is_array(__pyx_v_arr); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 73; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 73; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_2) { /* "pandas/src/generated.pyx":74 * cpdef ensure_int8(object arr): * if util.is_array(arr): * if ( arr).descr.type_num == NPY_INT8: # <<<<<<<<<<<<<< * return arr * else: */ __pyx_t_2 = ((((PyArrayObject *)__pyx_v_arr)->descr->type_num == NPY_INT8) != 0); if (__pyx_t_2) { /* "pandas/src/generated.pyx":75 * if util.is_array(arr): * if ( arr).descr.type_num == NPY_INT8: * return arr # <<<<<<<<<<<<<< * else: * return arr.astype(np.int8) */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_arr); __pyx_r = __pyx_v_arr; goto __pyx_L0; } /*else*/ { /* "pandas/src/generated.pyx":77 * return arr * else: * return arr.astype(np.int8) # <<<<<<<<<<<<<< * else: * return np.array(arr, dtype=np.int8) */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_arr, __pyx_n_s_astype); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 77; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 77; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_int8); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 77; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 77; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyObject_Call(__pyx_t_1, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 77; __pyx_clineno = __LINE__; goto __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_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; } } /*else*/ { /* "pandas/src/generated.pyx":79 * return arr.astype(np.int8) * else: * return np.array(arr, dtype=np.int8) # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_array); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_v_arr); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_arr); __Pyx_GIVEREF(__pyx_v_arr); __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_dtype, __pyx_t_6) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyObject_Call(__pyx_t_3, __pyx_t_4, __pyx_t_1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __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_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_6; __pyx_t_6 = 0; goto __pyx_L0; } /* "pandas/src/generated.pyx":72 * * * cpdef ensure_int8(object arr): # <<<<<<<<<<<<<< * if util.is_array(arr): * if ( arr).descr.type_num == NPY_INT8: */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("pandas.algos.ensure_int8", __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_5algos_93ensure_int8(PyObject *__pyx_self, PyObject *__pyx_v_arr); /*proto*/ static PyObject *__pyx_pw_6pandas_5algos_93ensure_int8(PyObject *__pyx_self, PyObject *__pyx_v_arr) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("ensure_int8 (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_5algos_92ensure_int8(__pyx_self, ((PyObject *)__pyx_v_arr)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5algos_92ensure_int8(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_arr) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("ensure_int8", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_6pandas_5algos_ensure_int8(__pyx_v_arr, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 72; __pyx_clineno = __LINE__; goto __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.algos.ensure_int8", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":82 * * * cpdef ensure_int16(object arr): # <<<<<<<<<<<<<< * if util.is_array(arr): * if ( arr).descr.type_num == NPY_INT16: */ static PyObject *__pyx_pw_6pandas_5algos_95ensure_int16(PyObject *__pyx_self, PyObject *__pyx_v_arr); /*proto*/ static PyObject *__pyx_f_6pandas_5algos_ensure_int16(PyObject *__pyx_v_arr, CYTHON_UNUSED int __pyx_skip_dispatch) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("ensure_int16", 0); /* "pandas/src/generated.pyx":83 * * cpdef ensure_int16(object arr): * if util.is_array(arr): # <<<<<<<<<<<<<< * if ( arr).descr.type_num == NPY_INT16: * return arr */ __pyx_t_1 = __pyx_f_4util_is_array(__pyx_v_arr); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_2) { /* "pandas/src/generated.pyx":84 * cpdef ensure_int16(object arr): * if util.is_array(arr): * if ( arr).descr.type_num == NPY_INT16: # <<<<<<<<<<<<<< * return arr * else: */ __pyx_t_2 = ((((PyArrayObject *)__pyx_v_arr)->descr->type_num == NPY_INT16) != 0); if (__pyx_t_2) { /* "pandas/src/generated.pyx":85 * if util.is_array(arr): * if ( arr).descr.type_num == NPY_INT16: * return arr # <<<<<<<<<<<<<< * else: * return arr.astype(np.int16) */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_arr); __pyx_r = __pyx_v_arr; goto __pyx_L0; } /*else*/ { /* "pandas/src/generated.pyx":87 * return arr * else: * return arr.astype(np.int16) # <<<<<<<<<<<<<< * else: * return np.array(arr, dtype=np.int16) */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_arr, __pyx_n_s_astype); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 87; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 87; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_int16); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 87; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 87; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyObject_Call(__pyx_t_1, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 87; __pyx_clineno = __LINE__; goto __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_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; } } /*else*/ { /* "pandas/src/generated.pyx":89 * return arr.astype(np.int16) * else: * return np.array(arr, dtype=np.int16) # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 89; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_array); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 89; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 89; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_v_arr); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_arr); __Pyx_GIVEREF(__pyx_v_arr); __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 89; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 89; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_int16); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 89; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_dtype, __pyx_t_6) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 89; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyObject_Call(__pyx_t_3, __pyx_t_4, __pyx_t_1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 89; __pyx_clineno = __LINE__; goto __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_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_6; __pyx_t_6 = 0; goto __pyx_L0; } /* "pandas/src/generated.pyx":82 * * * cpdef ensure_int16(object arr): # <<<<<<<<<<<<<< * if util.is_array(arr): * if ( arr).descr.type_num == NPY_INT16: */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("pandas.algos.ensure_int16", __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_5algos_95ensure_int16(PyObject *__pyx_self, PyObject *__pyx_v_arr); /*proto*/ static PyObject *__pyx_pw_6pandas_5algos_95ensure_int16(PyObject *__pyx_self, PyObject *__pyx_v_arr) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("ensure_int16 (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_5algos_94ensure_int16(__pyx_self, ((PyObject *)__pyx_v_arr)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5algos_94ensure_int16(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_arr) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("ensure_int16", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_6pandas_5algos_ensure_int16(__pyx_v_arr, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __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.algos.ensure_int16", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":92 * * * cpdef ensure_int32(object arr): # <<<<<<<<<<<<<< * if util.is_array(arr): * if ( arr).descr.type_num == NPY_INT32: */ static PyObject *__pyx_pw_6pandas_5algos_97ensure_int32(PyObject *__pyx_self, PyObject *__pyx_v_arr); /*proto*/ static PyObject *__pyx_f_6pandas_5algos_ensure_int32(PyObject *__pyx_v_arr, CYTHON_UNUSED int __pyx_skip_dispatch) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("ensure_int32", 0); /* "pandas/src/generated.pyx":93 * * cpdef ensure_int32(object arr): * if util.is_array(arr): # <<<<<<<<<<<<<< * if ( arr).descr.type_num == NPY_INT32: * return arr */ __pyx_t_1 = __pyx_f_4util_is_array(__pyx_v_arr); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 93; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 93; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_2) { /* "pandas/src/generated.pyx":94 * cpdef ensure_int32(object arr): * if util.is_array(arr): * if ( arr).descr.type_num == NPY_INT32: # <<<<<<<<<<<<<< * return arr * else: */ __pyx_t_2 = ((((PyArrayObject *)__pyx_v_arr)->descr->type_num == NPY_INT32) != 0); if (__pyx_t_2) { /* "pandas/src/generated.pyx":95 * if util.is_array(arr): * if ( arr).descr.type_num == NPY_INT32: * return arr # <<<<<<<<<<<<<< * else: * return arr.astype(np.int32) */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_arr); __pyx_r = __pyx_v_arr; goto __pyx_L0; } /*else*/ { /* "pandas/src/generated.pyx":97 * return arr * else: * return arr.astype(np.int32) # <<<<<<<<<<<<<< * else: * return np.array(arr, dtype=np.int32) */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_arr, __pyx_n_s_astype); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 97; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 97; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_int32); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 97; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 97; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyObject_Call(__pyx_t_1, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 97; __pyx_clineno = __LINE__; goto __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_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; } } /*else*/ { /* "pandas/src/generated.pyx":99 * return arr.astype(np.int32) * else: * return np.array(arr, dtype=np.int32) # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 99; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_array); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 99; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 99; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_v_arr); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_arr); __Pyx_GIVEREF(__pyx_v_arr); __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 99; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 99; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 99; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_dtype, __pyx_t_6) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 99; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyObject_Call(__pyx_t_3, __pyx_t_4, __pyx_t_1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 99; __pyx_clineno = __LINE__; goto __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_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_6; __pyx_t_6 = 0; goto __pyx_L0; } /* "pandas/src/generated.pyx":92 * * * cpdef ensure_int32(object arr): # <<<<<<<<<<<<<< * if util.is_array(arr): * if ( arr).descr.type_num == NPY_INT32: */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("pandas.algos.ensure_int32", __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_5algos_97ensure_int32(PyObject *__pyx_self, PyObject *__pyx_v_arr); /*proto*/ static PyObject *__pyx_pw_6pandas_5algos_97ensure_int32(PyObject *__pyx_self, PyObject *__pyx_v_arr) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("ensure_int32 (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_5algos_96ensure_int32(__pyx_self, ((PyObject *)__pyx_v_arr)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5algos_96ensure_int32(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_arr) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("ensure_int32", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_6pandas_5algos_ensure_int32(__pyx_v_arr, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 92; __pyx_clineno = __LINE__; goto __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.algos.ensure_int32", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":102 * * * cpdef ensure_int64(object arr): # <<<<<<<<<<<<<< * if util.is_array(arr): * if ( arr).descr.type_num == NPY_INT64: */ static PyObject *__pyx_pw_6pandas_5algos_99ensure_int64(PyObject *__pyx_self, PyObject *__pyx_v_arr); /*proto*/ static PyObject *__pyx_f_6pandas_5algos_ensure_int64(PyObject *__pyx_v_arr, CYTHON_UNUSED int __pyx_skip_dispatch) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("ensure_int64", 0); /* "pandas/src/generated.pyx":103 * * cpdef ensure_int64(object arr): * if util.is_array(arr): # <<<<<<<<<<<<<< * if ( arr).descr.type_num == NPY_INT64: * return arr */ __pyx_t_1 = __pyx_f_4util_is_array(__pyx_v_arr); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_2) { /* "pandas/src/generated.pyx":104 * cpdef ensure_int64(object arr): * if util.is_array(arr): * if ( arr).descr.type_num == NPY_INT64: # <<<<<<<<<<<<<< * return arr * else: */ __pyx_t_2 = ((((PyArrayObject *)__pyx_v_arr)->descr->type_num == NPY_INT64) != 0); if (__pyx_t_2) { /* "pandas/src/generated.pyx":105 * if util.is_array(arr): * if ( arr).descr.type_num == NPY_INT64: * return arr # <<<<<<<<<<<<<< * else: * return arr.astype(np.int64) */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_arr); __pyx_r = __pyx_v_arr; goto __pyx_L0; } /*else*/ { /* "pandas/src/generated.pyx":107 * return arr * else: * return arr.astype(np.int64) # <<<<<<<<<<<<<< * else: * return np.array(arr, dtype=np.int64) */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_arr, __pyx_n_s_astype); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_int64); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyObject_Call(__pyx_t_1, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __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_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; } } /*else*/ { /* "pandas/src/generated.pyx":109 * return arr.astype(np.int64) * else: * return np.array(arr, dtype=np.int64) # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 109; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_array); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 109; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 109; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_v_arr); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_arr); __Pyx_GIVEREF(__pyx_v_arr); __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 109; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 109; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_int64); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 109; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_dtype, __pyx_t_6) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 109; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyObject_Call(__pyx_t_3, __pyx_t_4, __pyx_t_1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 109; __pyx_clineno = __LINE__; goto __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_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_6; __pyx_t_6 = 0; goto __pyx_L0; } /* "pandas/src/generated.pyx":102 * * * cpdef ensure_int64(object arr): # <<<<<<<<<<<<<< * if util.is_array(arr): * if ( arr).descr.type_num == NPY_INT64: */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("pandas.algos.ensure_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_5algos_99ensure_int64(PyObject *__pyx_self, PyObject *__pyx_v_arr); /*proto*/ static PyObject *__pyx_pw_6pandas_5algos_99ensure_int64(PyObject *__pyx_self, PyObject *__pyx_v_arr) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("ensure_int64 (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_5algos_98ensure_int64(__pyx_self, ((PyObject *)__pyx_v_arr)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5algos_98ensure_int64(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_arr) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("ensure_int64", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_6pandas_5algos_ensure_int64(__pyx_v_arr, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __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.algos.ensure_int64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":112 * * * cpdef ensure_object(object arr): # <<<<<<<<<<<<<< * if util.is_array(arr): * if ( arr).descr.type_num == NPY_OBJECT: */ static PyObject *__pyx_pw_6pandas_5algos_101ensure_object(PyObject *__pyx_self, PyObject *__pyx_v_arr); /*proto*/ static PyObject *__pyx_f_6pandas_5algos_ensure_object(PyObject *__pyx_v_arr, CYTHON_UNUSED int __pyx_skip_dispatch) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("ensure_object", 0); /* "pandas/src/generated.pyx":113 * * cpdef ensure_object(object arr): * if util.is_array(arr): # <<<<<<<<<<<<<< * if ( arr).descr.type_num == NPY_OBJECT: * return arr */ __pyx_t_1 = __pyx_f_4util_is_array(__pyx_v_arr); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 113; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 113; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_2) { /* "pandas/src/generated.pyx":114 * cpdef ensure_object(object arr): * if util.is_array(arr): * if ( arr).descr.type_num == NPY_OBJECT: # <<<<<<<<<<<<<< * return arr * else: */ __pyx_t_2 = ((((PyArrayObject *)__pyx_v_arr)->descr->type_num == NPY_OBJECT) != 0); if (__pyx_t_2) { /* "pandas/src/generated.pyx":115 * if util.is_array(arr): * if ( arr).descr.type_num == NPY_OBJECT: * return arr # <<<<<<<<<<<<<< * else: * return arr.astype(np.object_) */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_arr); __pyx_r = __pyx_v_arr; goto __pyx_L0; } /*else*/ { /* "pandas/src/generated.pyx":117 * return arr * else: * return arr.astype(np.object_) # <<<<<<<<<<<<<< * else: * return np.array(arr, dtype=np.object_) */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_arr, __pyx_n_s_astype); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 117; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 117; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_object_2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 117; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 117; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyObject_Call(__pyx_t_1, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 117; __pyx_clineno = __LINE__; goto __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_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; } } /*else*/ { /* "pandas/src/generated.pyx":119 * return arr.astype(np.object_) * else: * return np.array(arr, dtype=np.object_) # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 119; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_array); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 119; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 119; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_v_arr); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_arr); __Pyx_GIVEREF(__pyx_v_arr); __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 119; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 119; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_object_2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 119; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_dtype, __pyx_t_6) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 119; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyObject_Call(__pyx_t_3, __pyx_t_4, __pyx_t_1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 119; __pyx_clineno = __LINE__; goto __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_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_6; __pyx_t_6 = 0; goto __pyx_L0; } /* "pandas/src/generated.pyx":112 * * * cpdef ensure_object(object arr): # <<<<<<<<<<<<<< * if util.is_array(arr): * if ( arr).descr.type_num == NPY_OBJECT: */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("pandas.algos.ensure_object", __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_5algos_101ensure_object(PyObject *__pyx_self, PyObject *__pyx_v_arr); /*proto*/ static PyObject *__pyx_pw_6pandas_5algos_101ensure_object(PyObject *__pyx_self, PyObject *__pyx_v_arr) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("ensure_object (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_5algos_100ensure_object(__pyx_self, ((PyObject *)__pyx_v_arr)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5algos_100ensure_object(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_arr) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("ensure_object", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_6pandas_5algos_ensure_object(__pyx_v_arr, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 112; __pyx_clineno = __LINE__; goto __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.algos.ensure_object", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":124 * @cython.wraparound(False) * @cython.boundscheck(False) * cpdef map_indices_float64(ndarray[float64_t] index): # <<<<<<<<<<<<<< * ''' * Produce a dict mapping the values of the input array to their respective */ static PyObject *__pyx_pw_6pandas_5algos_103map_indices_float64(PyObject *__pyx_self, PyObject *__pyx_v_index); /*proto*/ static PyObject *__pyx_f_6pandas_5algos_map_indices_float64(PyArrayObject *__pyx_v_index, CYTHON_UNUSED int __pyx_skip_dispatch) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_length; PyObject *__pyx_v_result = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_index; __Pyx_Buffer __pyx_pybuffer_index; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; Py_ssize_t __pyx_t_2; Py_ssize_t __pyx_t_3; Py_ssize_t __pyx_t_4; PyObject *__pyx_t_5 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("map_indices_float64", 0); __pyx_pybuffer_index.pybuffer.buf = NULL; __pyx_pybuffer_index.refcount = 0; __pyx_pybuffernd_index.data = NULL; __pyx_pybuffernd_index.rcbuffer = &__pyx_pybuffer_index; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_index.rcbuffer->pybuffer, (PyObject*)__pyx_v_index, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 124; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_index.diminfo[0].strides = __pyx_pybuffernd_index.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_index.diminfo[0].shape = __pyx_pybuffernd_index.rcbuffer->pybuffer.shape[0]; /* "pandas/src/generated.pyx":135 * ''' * cdef Py_ssize_t i, length * cdef dict result = {} # <<<<<<<<<<<<<< * * length = len(index) */ __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 135; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_v_result = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/generated.pyx":137 * cdef dict result = {} * * length = len(index) # <<<<<<<<<<<<<< * * for i in range(length): */ __pyx_t_2 = PyObject_Length(((PyObject *)__pyx_v_index)); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 137; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_length = __pyx_t_2; /* "pandas/src/generated.pyx":139 * length = len(index) * * for i in range(length): # <<<<<<<<<<<<<< * result[index[i]] = i * */ __pyx_t_2 = __pyx_v_length; for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) { __pyx_v_i = __pyx_t_3; /* "pandas/src/generated.pyx":140 * * for i in range(length): * result[index[i]] = i # <<<<<<<<<<<<<< * * return result */ __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_i); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 140; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = __pyx_v_i; __pyx_t_5 = PyFloat_FromDouble((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_index.rcbuffer->pybuffer.buf, __pyx_t_4, __pyx_pybuffernd_index.diminfo[0].strides))); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 140; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); if (unlikely(PyDict_SetItem(__pyx_v_result, __pyx_t_5, __pyx_t_1) < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 140; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } /* "pandas/src/generated.pyx":142 * result[index[i]] = i * * return result # <<<<<<<<<<<<<< * * @cython.wraparound(False) */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_result); __pyx_r = __pyx_v_result; goto __pyx_L0; /* "pandas/src/generated.pyx":124 * @cython.wraparound(False) * @cython.boundscheck(False) * cpdef map_indices_float64(ndarray[float64_t] index): # <<<<<<<<<<<<<< * ''' * Produce a dict mapping the values of the input array to their respective */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_5); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_index.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.map_indices_float64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_index.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF(__pyx_v_result); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_103map_indices_float64(PyObject *__pyx_self, PyObject *__pyx_v_index); /*proto*/ static char __pyx_doc_6pandas_5algos_102map_indices_float64[] = "\n Produce a dict mapping the values of the input array to their respective\n locations.\n\n Example:\n array(['hi', 'there']) --> {'hi' : 0 , 'there' : 1}\n\n Better to do this with Cython because of the enormous speed boost.\n "; static PyObject *__pyx_pw_6pandas_5algos_103map_indices_float64(PyObject *__pyx_self, PyObject *__pyx_v_index) { CYTHON_UNUSED int __pyx_lineno = 0; CYTHON_UNUSED const char *__pyx_filename = NULL; CYTHON_UNUSED int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("map_indices_float64 (wrapper)", 0); if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_index), __pyx_ptype_5numpy_ndarray, 1, "index", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 124; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_102map_indices_float64(__pyx_self, ((PyArrayObject *)__pyx_v_index)); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5algos_102map_indices_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_index) { __Pyx_LocalBuf_ND __pyx_pybuffernd_index; __Pyx_Buffer __pyx_pybuffer_index; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("map_indices_float64", 0); __pyx_pybuffer_index.pybuffer.buf = NULL; __pyx_pybuffer_index.refcount = 0; __pyx_pybuffernd_index.data = NULL; __pyx_pybuffernd_index.rcbuffer = &__pyx_pybuffer_index; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_index.rcbuffer->pybuffer, (PyObject*)__pyx_v_index, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 124; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_index.diminfo[0].strides = __pyx_pybuffernd_index.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_index.diminfo[0].shape = __pyx_pybuffernd_index.rcbuffer->pybuffer.shape[0]; __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_6pandas_5algos_map_indices_float64(__pyx_v_index, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 124; __pyx_clineno = __LINE__; goto __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_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_index.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.map_indices_float64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_index.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":146 * @cython.wraparound(False) * @cython.boundscheck(False) * cpdef map_indices_float32(ndarray[float32_t] index): # <<<<<<<<<<<<<< * ''' * Produce a dict mapping the values of the input array to their respective */ static PyObject *__pyx_pw_6pandas_5algos_105map_indices_float32(PyObject *__pyx_self, PyObject *__pyx_v_index); /*proto*/ static PyObject *__pyx_f_6pandas_5algos_map_indices_float32(PyArrayObject *__pyx_v_index, CYTHON_UNUSED int __pyx_skip_dispatch) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_length; PyObject *__pyx_v_result = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_index; __Pyx_Buffer __pyx_pybuffer_index; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; Py_ssize_t __pyx_t_2; Py_ssize_t __pyx_t_3; Py_ssize_t __pyx_t_4; PyObject *__pyx_t_5 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("map_indices_float32", 0); __pyx_pybuffer_index.pybuffer.buf = NULL; __pyx_pybuffer_index.refcount = 0; __pyx_pybuffernd_index.data = NULL; __pyx_pybuffernd_index.rcbuffer = &__pyx_pybuffer_index; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_index.rcbuffer->pybuffer, (PyObject*)__pyx_v_index, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 146; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_index.diminfo[0].strides = __pyx_pybuffernd_index.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_index.diminfo[0].shape = __pyx_pybuffernd_index.rcbuffer->pybuffer.shape[0]; /* "pandas/src/generated.pyx":157 * ''' * cdef Py_ssize_t i, length * cdef dict result = {} # <<<<<<<<<<<<<< * * length = len(index) */ __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_v_result = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/generated.pyx":159 * cdef dict result = {} * * length = len(index) # <<<<<<<<<<<<<< * * for i in range(length): */ __pyx_t_2 = PyObject_Length(((PyObject *)__pyx_v_index)); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 159; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_length = __pyx_t_2; /* "pandas/src/generated.pyx":161 * length = len(index) * * for i in range(length): # <<<<<<<<<<<<<< * result[index[i]] = i * */ __pyx_t_2 = __pyx_v_length; for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) { __pyx_v_i = __pyx_t_3; /* "pandas/src/generated.pyx":162 * * for i in range(length): * result[index[i]] = i # <<<<<<<<<<<<<< * * return result */ __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_i); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 162; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = __pyx_v_i; __pyx_t_5 = PyFloat_FromDouble((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_index.rcbuffer->pybuffer.buf, __pyx_t_4, __pyx_pybuffernd_index.diminfo[0].strides))); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 162; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); if (unlikely(PyDict_SetItem(__pyx_v_result, __pyx_t_5, __pyx_t_1) < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 162; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } /* "pandas/src/generated.pyx":164 * result[index[i]] = i * * return result # <<<<<<<<<<<<<< * * @cython.wraparound(False) */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_result); __pyx_r = __pyx_v_result; goto __pyx_L0; /* "pandas/src/generated.pyx":146 * @cython.wraparound(False) * @cython.boundscheck(False) * cpdef map_indices_float32(ndarray[float32_t] index): # <<<<<<<<<<<<<< * ''' * Produce a dict mapping the values of the input array to their respective */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_5); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_index.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.map_indices_float32", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_index.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF(__pyx_v_result); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_105map_indices_float32(PyObject *__pyx_self, PyObject *__pyx_v_index); /*proto*/ static char __pyx_doc_6pandas_5algos_104map_indices_float32[] = "\n Produce a dict mapping the values of the input array to their respective\n locations.\n\n Example:\n array(['hi', 'there']) --> {'hi' : 0 , 'there' : 1}\n\n Better to do this with Cython because of the enormous speed boost.\n "; static PyObject *__pyx_pw_6pandas_5algos_105map_indices_float32(PyObject *__pyx_self, PyObject *__pyx_v_index) { CYTHON_UNUSED int __pyx_lineno = 0; CYTHON_UNUSED const char *__pyx_filename = NULL; CYTHON_UNUSED int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("map_indices_float32 (wrapper)", 0); if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_index), __pyx_ptype_5numpy_ndarray, 1, "index", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 146; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_104map_indices_float32(__pyx_self, ((PyArrayObject *)__pyx_v_index)); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5algos_104map_indices_float32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_index) { __Pyx_LocalBuf_ND __pyx_pybuffernd_index; __Pyx_Buffer __pyx_pybuffer_index; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("map_indices_float32", 0); __pyx_pybuffer_index.pybuffer.buf = NULL; __pyx_pybuffer_index.refcount = 0; __pyx_pybuffernd_index.data = NULL; __pyx_pybuffernd_index.rcbuffer = &__pyx_pybuffer_index; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_index.rcbuffer->pybuffer, (PyObject*)__pyx_v_index, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 146; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_index.diminfo[0].strides = __pyx_pybuffernd_index.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_index.diminfo[0].shape = __pyx_pybuffernd_index.rcbuffer->pybuffer.shape[0]; __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_6pandas_5algos_map_indices_float32(__pyx_v_index, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 146; __pyx_clineno = __LINE__; goto __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_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_index.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.map_indices_float32", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_index.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":168 * @cython.wraparound(False) * @cython.boundscheck(False) * cpdef map_indices_object(ndarray[object] index): # <<<<<<<<<<<<<< * ''' * Produce a dict mapping the values of the input array to their respective */ static PyObject *__pyx_pw_6pandas_5algos_107map_indices_object(PyObject *__pyx_self, PyObject *__pyx_v_index); /*proto*/ static PyObject *__pyx_f_6pandas_5algos_map_indices_object(PyArrayObject *__pyx_v_index, CYTHON_UNUSED int __pyx_skip_dispatch) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_length; PyObject *__pyx_v_result = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_index; __Pyx_Buffer __pyx_pybuffer_index; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; Py_ssize_t __pyx_t_2; Py_ssize_t __pyx_t_3; PyObject *__pyx_t_4 = NULL; Py_ssize_t __pyx_t_5; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("map_indices_object", 0); __pyx_pybuffer_index.pybuffer.buf = NULL; __pyx_pybuffer_index.refcount = 0; __pyx_pybuffernd_index.data = NULL; __pyx_pybuffernd_index.rcbuffer = &__pyx_pybuffer_index; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_index.rcbuffer->pybuffer, (PyObject*)__pyx_v_index, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_index.diminfo[0].strides = __pyx_pybuffernd_index.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_index.diminfo[0].shape = __pyx_pybuffernd_index.rcbuffer->pybuffer.shape[0]; /* "pandas/src/generated.pyx":179 * ''' * cdef Py_ssize_t i, length * cdef dict result = {} # <<<<<<<<<<<<<< * * length = len(index) */ __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 179; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_v_result = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/generated.pyx":181 * cdef dict result = {} * * length = len(index) # <<<<<<<<<<<<<< * * for i in range(length): */ __pyx_t_2 = PyObject_Length(((PyObject *)__pyx_v_index)); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 181; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_length = __pyx_t_2; /* "pandas/src/generated.pyx":183 * length = len(index) * * for i in range(length): # <<<<<<<<<<<<<< * result[index[i]] = i * */ __pyx_t_2 = __pyx_v_length; for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) { __pyx_v_i = __pyx_t_3; /* "pandas/src/generated.pyx":184 * * for i in range(length): * result[index[i]] = i # <<<<<<<<<<<<<< * * return result */ __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_i); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 184; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_5 = __pyx_v_i; __pyx_t_4 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_index.rcbuffer->pybuffer.buf, __pyx_t_5, __pyx_pybuffernd_index.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_4); if (unlikely(PyDict_SetItem(__pyx_v_result, __pyx_t_4, __pyx_t_1) < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 184; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } /* "pandas/src/generated.pyx":186 * result[index[i]] = i * * return result # <<<<<<<<<<<<<< * * @cython.wraparound(False) */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_result); __pyx_r = __pyx_v_result; goto __pyx_L0; /* "pandas/src/generated.pyx":168 * @cython.wraparound(False) * @cython.boundscheck(False) * cpdef map_indices_object(ndarray[object] index): # <<<<<<<<<<<<<< * ''' * Produce a dict mapping the values of the input array to their respective */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_4); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_index.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.map_indices_object", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_index.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF(__pyx_v_result); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_107map_indices_object(PyObject *__pyx_self, PyObject *__pyx_v_index); /*proto*/ static char __pyx_doc_6pandas_5algos_106map_indices_object[] = "\n Produce a dict mapping the values of the input array to their respective\n locations.\n\n Example:\n array(['hi', 'there']) --> {'hi' : 0 , 'there' : 1}\n\n Better to do this with Cython because of the enormous speed boost.\n "; static PyObject *__pyx_pw_6pandas_5algos_107map_indices_object(PyObject *__pyx_self, PyObject *__pyx_v_index) { CYTHON_UNUSED int __pyx_lineno = 0; CYTHON_UNUSED const char *__pyx_filename = NULL; CYTHON_UNUSED int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("map_indices_object (wrapper)", 0); if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_index), __pyx_ptype_5numpy_ndarray, 1, "index", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_106map_indices_object(__pyx_self, ((PyArrayObject *)__pyx_v_index)); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5algos_106map_indices_object(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_index) { __Pyx_LocalBuf_ND __pyx_pybuffernd_index; __Pyx_Buffer __pyx_pybuffer_index; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("map_indices_object", 0); __pyx_pybuffer_index.pybuffer.buf = NULL; __pyx_pybuffer_index.refcount = 0; __pyx_pybuffernd_index.data = NULL; __pyx_pybuffernd_index.rcbuffer = &__pyx_pybuffer_index; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_index.rcbuffer->pybuffer, (PyObject*)__pyx_v_index, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_index.diminfo[0].strides = __pyx_pybuffernd_index.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_index.diminfo[0].shape = __pyx_pybuffernd_index.rcbuffer->pybuffer.shape[0]; __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_6pandas_5algos_map_indices_object(__pyx_v_index, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __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_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_index.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.map_indices_object", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_index.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":190 * @cython.wraparound(False) * @cython.boundscheck(False) * cpdef map_indices_int32(ndarray[int32_t] index): # <<<<<<<<<<<<<< * ''' * Produce a dict mapping the values of the input array to their respective */ static PyObject *__pyx_pw_6pandas_5algos_109map_indices_int32(PyObject *__pyx_self, PyObject *__pyx_v_index); /*proto*/ static PyObject *__pyx_f_6pandas_5algos_map_indices_int32(PyArrayObject *__pyx_v_index, CYTHON_UNUSED int __pyx_skip_dispatch) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_length; PyObject *__pyx_v_result = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_index; __Pyx_Buffer __pyx_pybuffer_index; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; Py_ssize_t __pyx_t_2; Py_ssize_t __pyx_t_3; Py_ssize_t __pyx_t_4; PyObject *__pyx_t_5 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("map_indices_int32", 0); __pyx_pybuffer_index.pybuffer.buf = NULL; __pyx_pybuffer_index.refcount = 0; __pyx_pybuffernd_index.data = NULL; __pyx_pybuffernd_index.rcbuffer = &__pyx_pybuffer_index; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_index.rcbuffer->pybuffer, (PyObject*)__pyx_v_index, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 190; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_index.diminfo[0].strides = __pyx_pybuffernd_index.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_index.diminfo[0].shape = __pyx_pybuffernd_index.rcbuffer->pybuffer.shape[0]; /* "pandas/src/generated.pyx":201 * ''' * cdef Py_ssize_t i, length * cdef dict result = {} # <<<<<<<<<<<<<< * * length = len(index) */ __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 201; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_v_result = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/generated.pyx":203 * cdef dict result = {} * * length = len(index) # <<<<<<<<<<<<<< * * for i in range(length): */ __pyx_t_2 = PyObject_Length(((PyObject *)__pyx_v_index)); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 203; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_length = __pyx_t_2; /* "pandas/src/generated.pyx":205 * length = len(index) * * for i in range(length): # <<<<<<<<<<<<<< * result[index[i]] = i * */ __pyx_t_2 = __pyx_v_length; for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) { __pyx_v_i = __pyx_t_3; /* "pandas/src/generated.pyx":206 * * for i in range(length): * result[index[i]] = i # <<<<<<<<<<<<<< * * return result */ __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_i); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 206; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = __pyx_v_i; __pyx_t_5 = __Pyx_PyInt_From_npy_int32((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_index.rcbuffer->pybuffer.buf, __pyx_t_4, __pyx_pybuffernd_index.diminfo[0].strides))); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 206; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); if (unlikely(PyDict_SetItem(__pyx_v_result, __pyx_t_5, __pyx_t_1) < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 206; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } /* "pandas/src/generated.pyx":208 * result[index[i]] = i * * return result # <<<<<<<<<<<<<< * * @cython.wraparound(False) */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_result); __pyx_r = __pyx_v_result; goto __pyx_L0; /* "pandas/src/generated.pyx":190 * @cython.wraparound(False) * @cython.boundscheck(False) * cpdef map_indices_int32(ndarray[int32_t] index): # <<<<<<<<<<<<<< * ''' * Produce a dict mapping the values of the input array to their respective */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_5); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_index.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.map_indices_int32", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_index.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF(__pyx_v_result); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_109map_indices_int32(PyObject *__pyx_self, PyObject *__pyx_v_index); /*proto*/ static char __pyx_doc_6pandas_5algos_108map_indices_int32[] = "\n Produce a dict mapping the values of the input array to their respective\n locations.\n\n Example:\n array(['hi', 'there']) --> {'hi' : 0 , 'there' : 1}\n\n Better to do this with Cython because of the enormous speed boost.\n "; static PyObject *__pyx_pw_6pandas_5algos_109map_indices_int32(PyObject *__pyx_self, PyObject *__pyx_v_index) { CYTHON_UNUSED int __pyx_lineno = 0; CYTHON_UNUSED const char *__pyx_filename = NULL; CYTHON_UNUSED int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("map_indices_int32 (wrapper)", 0); if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_index), __pyx_ptype_5numpy_ndarray, 1, "index", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 190; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_108map_indices_int32(__pyx_self, ((PyArrayObject *)__pyx_v_index)); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5algos_108map_indices_int32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_index) { __Pyx_LocalBuf_ND __pyx_pybuffernd_index; __Pyx_Buffer __pyx_pybuffer_index; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("map_indices_int32", 0); __pyx_pybuffer_index.pybuffer.buf = NULL; __pyx_pybuffer_index.refcount = 0; __pyx_pybuffernd_index.data = NULL; __pyx_pybuffernd_index.rcbuffer = &__pyx_pybuffer_index; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_index.rcbuffer->pybuffer, (PyObject*)__pyx_v_index, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 190; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_index.diminfo[0].strides = __pyx_pybuffernd_index.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_index.diminfo[0].shape = __pyx_pybuffernd_index.rcbuffer->pybuffer.shape[0]; __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_6pandas_5algos_map_indices_int32(__pyx_v_index, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 190; __pyx_clineno = __LINE__; goto __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_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_index.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.map_indices_int32", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_index.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":212 * @cython.wraparound(False) * @cython.boundscheck(False) * cpdef map_indices_int64(ndarray[int64_t] index): # <<<<<<<<<<<<<< * ''' * Produce a dict mapping the values of the input array to their respective */ static PyObject *__pyx_pw_6pandas_5algos_111map_indices_int64(PyObject *__pyx_self, PyObject *__pyx_v_index); /*proto*/ static PyObject *__pyx_f_6pandas_5algos_map_indices_int64(PyArrayObject *__pyx_v_index, CYTHON_UNUSED int __pyx_skip_dispatch) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_length; PyObject *__pyx_v_result = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_index; __Pyx_Buffer __pyx_pybuffer_index; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; Py_ssize_t __pyx_t_2; Py_ssize_t __pyx_t_3; Py_ssize_t __pyx_t_4; PyObject *__pyx_t_5 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("map_indices_int64", 0); __pyx_pybuffer_index.pybuffer.buf = NULL; __pyx_pybuffer_index.refcount = 0; __pyx_pybuffernd_index.data = NULL; __pyx_pybuffernd_index.rcbuffer = &__pyx_pybuffer_index; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_index.rcbuffer->pybuffer, (PyObject*)__pyx_v_index, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 212; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_index.diminfo[0].strides = __pyx_pybuffernd_index.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_index.diminfo[0].shape = __pyx_pybuffernd_index.rcbuffer->pybuffer.shape[0]; /* "pandas/src/generated.pyx":223 * ''' * cdef Py_ssize_t i, length * cdef dict result = {} # <<<<<<<<<<<<<< * * length = len(index) */ __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 223; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_v_result = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/generated.pyx":225 * cdef dict result = {} * * length = len(index) # <<<<<<<<<<<<<< * * for i in range(length): */ __pyx_t_2 = PyObject_Length(((PyObject *)__pyx_v_index)); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 225; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_length = __pyx_t_2; /* "pandas/src/generated.pyx":227 * length = len(index) * * for i in range(length): # <<<<<<<<<<<<<< * result[index[i]] = i * */ __pyx_t_2 = __pyx_v_length; for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) { __pyx_v_i = __pyx_t_3; /* "pandas/src/generated.pyx":228 * * for i in range(length): * result[index[i]] = i # <<<<<<<<<<<<<< * * return result */ __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_i); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 228; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = __pyx_v_i; __pyx_t_5 = __Pyx_PyInt_From_npy_int64((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_index.rcbuffer->pybuffer.buf, __pyx_t_4, __pyx_pybuffernd_index.diminfo[0].strides))); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 228; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); if (unlikely(PyDict_SetItem(__pyx_v_result, __pyx_t_5, __pyx_t_1) < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 228; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } /* "pandas/src/generated.pyx":230 * result[index[i]] = i * * return result # <<<<<<<<<<<<<< * * @cython.wraparound(False) */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_result); __pyx_r = __pyx_v_result; goto __pyx_L0; /* "pandas/src/generated.pyx":212 * @cython.wraparound(False) * @cython.boundscheck(False) * cpdef map_indices_int64(ndarray[int64_t] index): # <<<<<<<<<<<<<< * ''' * Produce a dict mapping the values of the input array to their respective */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_5); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_index.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.map_indices_int64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_index.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF(__pyx_v_result); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_111map_indices_int64(PyObject *__pyx_self, PyObject *__pyx_v_index); /*proto*/ static char __pyx_doc_6pandas_5algos_110map_indices_int64[] = "\n Produce a dict mapping the values of the input array to their respective\n locations.\n\n Example:\n array(['hi', 'there']) --> {'hi' : 0 , 'there' : 1}\n\n Better to do this with Cython because of the enormous speed boost.\n "; static PyObject *__pyx_pw_6pandas_5algos_111map_indices_int64(PyObject *__pyx_self, PyObject *__pyx_v_index) { CYTHON_UNUSED int __pyx_lineno = 0; CYTHON_UNUSED const char *__pyx_filename = NULL; CYTHON_UNUSED int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("map_indices_int64 (wrapper)", 0); if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_index), __pyx_ptype_5numpy_ndarray, 1, "index", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 212; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_110map_indices_int64(__pyx_self, ((PyArrayObject *)__pyx_v_index)); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5algos_110map_indices_int64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_index) { __Pyx_LocalBuf_ND __pyx_pybuffernd_index; __Pyx_Buffer __pyx_pybuffer_index; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("map_indices_int64", 0); __pyx_pybuffer_index.pybuffer.buf = NULL; __pyx_pybuffer_index.refcount = 0; __pyx_pybuffernd_index.data = NULL; __pyx_pybuffernd_index.rcbuffer = &__pyx_pybuffer_index; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_index.rcbuffer->pybuffer, (PyObject*)__pyx_v_index, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 212; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_index.diminfo[0].strides = __pyx_pybuffernd_index.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_index.diminfo[0].shape = __pyx_pybuffernd_index.rcbuffer->pybuffer.shape[0]; __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_6pandas_5algos_map_indices_int64(__pyx_v_index, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 212; __pyx_clineno = __LINE__; goto __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_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_index.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.map_indices_int64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_index.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":234 * @cython.wraparound(False) * @cython.boundscheck(False) * cpdef map_indices_bool(ndarray[uint8_t] index): # <<<<<<<<<<<<<< * ''' * Produce a dict mapping the values of the input array to their respective */ static PyObject *__pyx_pw_6pandas_5algos_113map_indices_bool(PyObject *__pyx_self, PyObject *__pyx_v_index); /*proto*/ static PyObject *__pyx_f_6pandas_5algos_map_indices_bool(PyArrayObject *__pyx_v_index, CYTHON_UNUSED int __pyx_skip_dispatch) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_length; PyObject *__pyx_v_result = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_index; __Pyx_Buffer __pyx_pybuffer_index; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; Py_ssize_t __pyx_t_2; Py_ssize_t __pyx_t_3; Py_ssize_t __pyx_t_4; PyObject *__pyx_t_5 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("map_indices_bool", 0); __pyx_pybuffer_index.pybuffer.buf = NULL; __pyx_pybuffer_index.refcount = 0; __pyx_pybuffernd_index.data = NULL; __pyx_pybuffernd_index.rcbuffer = &__pyx_pybuffer_index; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_index.rcbuffer->pybuffer, (PyObject*)__pyx_v_index, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 234; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_index.diminfo[0].strides = __pyx_pybuffernd_index.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_index.diminfo[0].shape = __pyx_pybuffernd_index.rcbuffer->pybuffer.shape[0]; /* "pandas/src/generated.pyx":245 * ''' * cdef Py_ssize_t i, length * cdef dict result = {} # <<<<<<<<<<<<<< * * length = len(index) */ __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 245; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_v_result = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/generated.pyx":247 * cdef dict result = {} * * length = len(index) # <<<<<<<<<<<<<< * * for i in range(length): */ __pyx_t_2 = PyObject_Length(((PyObject *)__pyx_v_index)); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 247; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_length = __pyx_t_2; /* "pandas/src/generated.pyx":249 * length = len(index) * * for i in range(length): # <<<<<<<<<<<<<< * result[index[i]] = i * */ __pyx_t_2 = __pyx_v_length; for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) { __pyx_v_i = __pyx_t_3; /* "pandas/src/generated.pyx":250 * * for i in range(length): * result[index[i]] = i # <<<<<<<<<<<<<< * * return result */ __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_i); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 250; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = __pyx_v_i; __pyx_t_5 = __Pyx_PyInt_From_npy_uint8((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_index.rcbuffer->pybuffer.buf, __pyx_t_4, __pyx_pybuffernd_index.diminfo[0].strides))); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 250; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); if (unlikely(PyDict_SetItem(__pyx_v_result, __pyx_t_5, __pyx_t_1) < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 250; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } /* "pandas/src/generated.pyx":252 * result[index[i]] = i * * return result # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_result); __pyx_r = __pyx_v_result; goto __pyx_L0; /* "pandas/src/generated.pyx":234 * @cython.wraparound(False) * @cython.boundscheck(False) * cpdef map_indices_bool(ndarray[uint8_t] index): # <<<<<<<<<<<<<< * ''' * Produce a dict mapping the values of the input array to their respective */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_5); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_index.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.map_indices_bool", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_index.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF(__pyx_v_result); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_113map_indices_bool(PyObject *__pyx_self, PyObject *__pyx_v_index); /*proto*/ static char __pyx_doc_6pandas_5algos_112map_indices_bool[] = "\n Produce a dict mapping the values of the input array to their respective\n locations.\n\n Example:\n array(['hi', 'there']) --> {'hi' : 0 , 'there' : 1}\n\n Better to do this with Cython because of the enormous speed boost.\n "; static PyObject *__pyx_pw_6pandas_5algos_113map_indices_bool(PyObject *__pyx_self, PyObject *__pyx_v_index) { CYTHON_UNUSED int __pyx_lineno = 0; CYTHON_UNUSED const char *__pyx_filename = NULL; CYTHON_UNUSED int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("map_indices_bool (wrapper)", 0); if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_index), __pyx_ptype_5numpy_ndarray, 1, "index", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 234; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_112map_indices_bool(__pyx_self, ((PyArrayObject *)__pyx_v_index)); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5algos_112map_indices_bool(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_index) { __Pyx_LocalBuf_ND __pyx_pybuffernd_index; __Pyx_Buffer __pyx_pybuffer_index; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("map_indices_bool", 0); __pyx_pybuffer_index.pybuffer.buf = NULL; __pyx_pybuffer_index.refcount = 0; __pyx_pybuffernd_index.data = NULL; __pyx_pybuffernd_index.rcbuffer = &__pyx_pybuffer_index; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_index.rcbuffer->pybuffer, (PyObject*)__pyx_v_index, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 234; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_index.diminfo[0].strides = __pyx_pybuffernd_index.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_index.diminfo[0].shape = __pyx_pybuffernd_index.rcbuffer->pybuffer.shape[0]; __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_6pandas_5algos_map_indices_bool(__pyx_v_index, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 234; __pyx_clineno = __LINE__; goto __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_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_index.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.map_indices_bool", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_index.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":257 * @cython.boundscheck(False) * @cython.wraparound(False) * def pad_float64(ndarray[float64_t] old, ndarray[float64_t] new, # <<<<<<<<<<<<<< * limit=None): * cdef Py_ssize_t i, j, nleft, nright */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_115pad_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_115pad_float64 = {__Pyx_NAMESTR("pad_float64"), (PyCFunction)__pyx_pw_6pandas_5algos_115pad_float64, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_115pad_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_old = 0; PyArrayObject *__pyx_v_new = 0; PyObject *__pyx_v_limit = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("pad_float64 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_old,&__pyx_n_s_new,&__pyx_n_s_limit,0}; PyObject* values[3] = {0,0,0}; /* "pandas/src/generated.pyx":258 * @cython.wraparound(False) * def pad_float64(ndarray[float64_t] old, ndarray[float64_t] new, * limit=None): # <<<<<<<<<<<<<< * cdef Py_ssize_t i, j, nleft, nright * cdef ndarray[int64_t, ndim=1] indexer */ values[2] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_old)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_new)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("pad_float64", 0, 2, 3, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 257; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_limit); if (value) { values[2] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "pad_float64") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 257; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_old = ((PyArrayObject *)values[0]); __pyx_v_new = ((PyArrayObject *)values[1]); __pyx_v_limit = values[2]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("pad_float64", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 257; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.pad_float64", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_old), __pyx_ptype_5numpy_ndarray, 1, "old", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 257; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_new), __pyx_ptype_5numpy_ndarray, 1, "new", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 257; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_114pad_float64(__pyx_self, __pyx_v_old, __pyx_v_new, __pyx_v_limit); /* "pandas/src/generated.pyx":257 * @cython.boundscheck(False) * @cython.wraparound(False) * def pad_float64(ndarray[float64_t] old, ndarray[float64_t] new, # <<<<<<<<<<<<<< * limit=None): * cdef Py_ssize_t i, j, nleft, nright */ /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5algos_114pad_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_old, PyArrayObject *__pyx_v_new, PyObject *__pyx_v_limit) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_nleft; Py_ssize_t __pyx_v_nright; PyArrayObject *__pyx_v_indexer = 0; __pyx_t_5numpy_float64_t __pyx_v_cur; __pyx_t_5numpy_float64_t __pyx_v_next; int __pyx_v_lim; int __pyx_v_fill_count; __Pyx_LocalBuf_ND __pyx_pybuffernd_indexer; __Pyx_Buffer __pyx_pybuffer_indexer; __Pyx_LocalBuf_ND __pyx_pybuffernd_new; __Pyx_Buffer __pyx_pybuffer_new; __Pyx_LocalBuf_ND __pyx_pybuffernd_old; __Pyx_Buffer __pyx_pybuffer_old; 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; int __pyx_t_12; int __pyx_t_13; long __pyx_t_14; int __pyx_t_15; int __pyx_t_16; long __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; __pyx_t_5numpy_float64_t __pyx_t_25; Py_ssize_t __pyx_t_26; Py_ssize_t __pyx_t_27; Py_ssize_t __pyx_t_28; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("pad_float64", 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_old.pybuffer.buf = NULL; __pyx_pybuffer_old.refcount = 0; __pyx_pybuffernd_old.data = NULL; __pyx_pybuffernd_old.rcbuffer = &__pyx_pybuffer_old; __pyx_pybuffer_new.pybuffer.buf = NULL; __pyx_pybuffer_new.refcount = 0; __pyx_pybuffernd_new.data = NULL; __pyx_pybuffernd_new.rcbuffer = &__pyx_pybuffer_new; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_old.rcbuffer->pybuffer, (PyObject*)__pyx_v_old, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 257; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_old.diminfo[0].strides = __pyx_pybuffernd_old.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_old.diminfo[0].shape = __pyx_pybuffernd_old.rcbuffer->pybuffer.shape[0]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_new.rcbuffer->pybuffer, (PyObject*)__pyx_v_new, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 257; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_new.diminfo[0].strides = __pyx_pybuffernd_new.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_new.diminfo[0].shape = __pyx_pybuffernd_new.rcbuffer->pybuffer.shape[0]; /* "pandas/src/generated.pyx":262 * cdef ndarray[int64_t, ndim=1] indexer * cdef float64_t cur, next * cdef int lim, fill_count = 0 # <<<<<<<<<<<<<< * * nleft = len(old) */ __pyx_v_fill_count = 0; /* "pandas/src/generated.pyx":264 * cdef int lim, fill_count = 0 * * nleft = len(old) # <<<<<<<<<<<<<< * nright = len(new) * indexer = np.empty(nright, dtype=np.int64) */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_old)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 264; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_nleft = __pyx_t_1; /* "pandas/src/generated.pyx":265 * * nleft = len(old) * nright = len(new) # <<<<<<<<<<<<<< * indexer = np.empty(nright, dtype=np.int64) * indexer.fill(-1) */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_new)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 265; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_nright = __pyx_t_1; /* "pandas/src/generated.pyx":266 * nleft = len(old) * nright = len(new) * indexer = np.empty(nright, dtype=np.int64) # <<<<<<<<<<<<<< * indexer.fill(-1) * */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 266; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 266; __pyx_clineno = __LINE__; goto __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_nright); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 266; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 266; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 266; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 266; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_int64); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 266; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 266; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyObject_Call(__pyx_t_3, __pyx_t_4, __pyx_t_2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 266; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 266; __pyx_clineno = __LINE__; goto __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_int64_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_int64_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_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_filename = __pyx_f[2]; __pyx_lineno = 266; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_7 = 0; __pyx_v_indexer = ((PyArrayObject *)__pyx_t_6); __pyx_t_6 = 0; /* "pandas/src/generated.pyx":267 * nright = len(new) * indexer = np.empty(nright, dtype=np.int64) * indexer.fill(-1) # <<<<<<<<<<<<<< * * if limit is None: */ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_indexer), __pyx_n_s_fill); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 267; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_2 = PyObject_Call(__pyx_t_6, __pyx_tuple__35, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 267; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":269 * indexer.fill(-1) * * if limit is None: # <<<<<<<<<<<<<< * lim = nright * else: */ __pyx_t_12 = (__pyx_v_limit == Py_None); __pyx_t_13 = (__pyx_t_12 != 0); if (__pyx_t_13) { /* "pandas/src/generated.pyx":270 * * if limit is None: * lim = nright # <<<<<<<<<<<<<< * else: * if limit < 0: */ __pyx_v_lim = __pyx_v_nright; goto __pyx_L3; } /*else*/ { /* "pandas/src/generated.pyx":272 * lim = nright * else: * if limit < 0: # <<<<<<<<<<<<<< * raise ValueError('Limit must be non-negative') * lim = limit */ __pyx_t_2 = PyObject_RichCompare(__pyx_v_limit, __pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 272; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_13 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 272; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_13) { /* "pandas/src/generated.pyx":273 * else: * if limit < 0: * raise ValueError('Limit must be non-negative') # <<<<<<<<<<<<<< * lim = limit * */ __pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__36, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 273; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 273; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } /* "pandas/src/generated.pyx":274 * if limit < 0: * raise ValueError('Limit must be non-negative') * lim = limit # <<<<<<<<<<<<<< * * if nleft == 0 or nright == 0 or new[nright - 1] < old[0]: */ __pyx_t_8 = __Pyx_PyInt_As_int(__pyx_v_limit); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 274; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_lim = __pyx_t_8; } __pyx_L3:; /* "pandas/src/generated.pyx":276 * lim = limit * * if nleft == 0 or nright == 0 or new[nright - 1] < old[0]: # <<<<<<<<<<<<<< * return indexer * */ __pyx_t_13 = ((__pyx_v_nleft == 0) != 0); if (!__pyx_t_13) { __pyx_t_12 = ((__pyx_v_nright == 0) != 0); if (!__pyx_t_12) { __pyx_t_1 = (__pyx_v_nright - 1); __pyx_t_14 = 0; __pyx_t_15 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_new.rcbuffer->pybuffer.buf, __pyx_t_1, __pyx_pybuffernd_new.diminfo[0].strides)) < (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_old.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_old.diminfo[0].strides))) != 0); __pyx_t_16 = __pyx_t_15; } else { __pyx_t_16 = __pyx_t_12; } __pyx_t_12 = __pyx_t_16; } else { __pyx_t_12 = __pyx_t_13; } if (__pyx_t_12) { /* "pandas/src/generated.pyx":277 * * if nleft == 0 or nright == 0 or new[nright - 1] < old[0]: * return indexer # <<<<<<<<<<<<<< * * i = j = 0 */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_indexer)); __pyx_r = ((PyObject *)__pyx_v_indexer); goto __pyx_L0; } /* "pandas/src/generated.pyx":279 * return indexer * * i = j = 0 # <<<<<<<<<<<<<< * * cur = old[0] */ __pyx_v_i = 0; __pyx_v_j = 0; /* "pandas/src/generated.pyx":281 * i = j = 0 * * cur = old[0] # <<<<<<<<<<<<<< * * while j <= nright - 1 and new[j] < cur: */ __pyx_t_17 = 0; __pyx_v_cur = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_old.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_old.diminfo[0].strides)); /* "pandas/src/generated.pyx":283 * cur = old[0] * * while j <= nright - 1 and new[j] < cur: # <<<<<<<<<<<<<< * j += 1 * */ while (1) { __pyx_t_12 = ((__pyx_v_j <= (__pyx_v_nright - 1)) != 0); if (__pyx_t_12) { __pyx_t_18 = __pyx_v_j; __pyx_t_13 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_new.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_new.diminfo[0].strides)) < __pyx_v_cur) != 0); __pyx_t_16 = __pyx_t_13; } else { __pyx_t_16 = __pyx_t_12; } if (!__pyx_t_16) break; /* "pandas/src/generated.pyx":284 * * while j <= nright - 1 and new[j] < cur: * j += 1 # <<<<<<<<<<<<<< * * while True: */ __pyx_v_j = (__pyx_v_j + 1); } /* "pandas/src/generated.pyx":286 * j += 1 * * while True: # <<<<<<<<<<<<<< * if j == nright: * break */ while (1) { /* "pandas/src/generated.pyx":287 * * while True: * if j == nright: # <<<<<<<<<<<<<< * break * */ __pyx_t_16 = ((__pyx_v_j == __pyx_v_nright) != 0); if (__pyx_t_16) { /* "pandas/src/generated.pyx":288 * while True: * if j == nright: * break # <<<<<<<<<<<<<< * * if i == nleft - 1: */ goto __pyx_L9_break; } /* "pandas/src/generated.pyx":290 * break * * if i == nleft - 1: # <<<<<<<<<<<<<< * while j < nright: * if new[j] == cur: */ __pyx_t_16 = ((__pyx_v_i == (__pyx_v_nleft - 1)) != 0); if (__pyx_t_16) { /* "pandas/src/generated.pyx":291 * * if i == nleft - 1: * while j < nright: # <<<<<<<<<<<<<< * if new[j] == cur: * indexer[j] = i */ while (1) { __pyx_t_16 = ((__pyx_v_j < __pyx_v_nright) != 0); if (!__pyx_t_16) break; /* "pandas/src/generated.pyx":292 * if i == nleft - 1: * while j < nright: * if new[j] == cur: # <<<<<<<<<<<<<< * indexer[j] = i * elif new[j] > cur and fill_count < lim: */ __pyx_t_19 = __pyx_v_j; __pyx_t_16 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_new.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_new.diminfo[0].strides)) == __pyx_v_cur) != 0); if (__pyx_t_16) { /* "pandas/src/generated.pyx":293 * while j < nright: * if new[j] == cur: * indexer[j] = i # <<<<<<<<<<<<<< * elif new[j] > cur and fill_count < lim: * indexer[j] = i */ __pyx_t_20 = __pyx_v_j; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_indexer.diminfo[0].strides) = __pyx_v_i; goto __pyx_L14; } /* "pandas/src/generated.pyx":294 * if new[j] == cur: * indexer[j] = i * elif new[j] > cur and fill_count < lim: # <<<<<<<<<<<<<< * indexer[j] = i * fill_count += 1 */ __pyx_t_21 = __pyx_v_j; __pyx_t_16 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_new.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_new.diminfo[0].strides)) > __pyx_v_cur) != 0); if (__pyx_t_16) { __pyx_t_12 = ((__pyx_v_fill_count < __pyx_v_lim) != 0); __pyx_t_13 = __pyx_t_12; } else { __pyx_t_13 = __pyx_t_16; } if (__pyx_t_13) { /* "pandas/src/generated.pyx":295 * indexer[j] = i * elif new[j] > cur and fill_count < lim: * indexer[j] = i # <<<<<<<<<<<<<< * fill_count += 1 * j += 1 */ __pyx_t_22 = __pyx_v_j; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_22, __pyx_pybuffernd_indexer.diminfo[0].strides) = __pyx_v_i; /* "pandas/src/generated.pyx":296 * elif new[j] > cur and fill_count < lim: * indexer[j] = i * fill_count += 1 # <<<<<<<<<<<<<< * j += 1 * break */ __pyx_v_fill_count = (__pyx_v_fill_count + 1); goto __pyx_L14; } __pyx_L14:; /* "pandas/src/generated.pyx":297 * indexer[j] = i * fill_count += 1 * j += 1 # <<<<<<<<<<<<<< * break * */ __pyx_v_j = (__pyx_v_j + 1); } /* "pandas/src/generated.pyx":298 * fill_count += 1 * j += 1 * break # <<<<<<<<<<<<<< * * next = old[i + 1] */ goto __pyx_L9_break; } /* "pandas/src/generated.pyx":300 * break * * next = old[i + 1] # <<<<<<<<<<<<<< * * while j < nright and cur <= new[j] < next: */ __pyx_t_23 = (__pyx_v_i + 1); __pyx_v_next = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_old.rcbuffer->pybuffer.buf, __pyx_t_23, __pyx_pybuffernd_old.diminfo[0].strides)); /* "pandas/src/generated.pyx":302 * next = old[i + 1] * * while j < nright and cur <= new[j] < next: # <<<<<<<<<<<<<< * if new[j] == cur: * indexer[j] = i */ while (1) { __pyx_t_13 = ((__pyx_v_j < __pyx_v_nright) != 0); if (__pyx_t_13) { __pyx_t_24 = __pyx_v_j; __pyx_t_25 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_new.rcbuffer->pybuffer.buf, __pyx_t_24, __pyx_pybuffernd_new.diminfo[0].strides)); __pyx_t_16 = (__pyx_v_cur <= __pyx_t_25); if (__pyx_t_16) { __pyx_t_16 = (__pyx_t_25 < __pyx_v_next); } __pyx_t_12 = (__pyx_t_16 != 0); } else { __pyx_t_12 = __pyx_t_13; } if (!__pyx_t_12) break; /* "pandas/src/generated.pyx":303 * * while j < nright and cur <= new[j] < next: * if new[j] == cur: # <<<<<<<<<<<<<< * indexer[j] = i * elif fill_count < lim: */ __pyx_t_26 = __pyx_v_j; __pyx_t_12 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_new.rcbuffer->pybuffer.buf, __pyx_t_26, __pyx_pybuffernd_new.diminfo[0].strides)) == __pyx_v_cur) != 0); if (__pyx_t_12) { /* "pandas/src/generated.pyx":304 * while j < nright and cur <= new[j] < next: * if new[j] == cur: * indexer[j] = i # <<<<<<<<<<<<<< * elif fill_count < lim: * indexer[j] = i */ __pyx_t_27 = __pyx_v_j; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_27, __pyx_pybuffernd_indexer.diminfo[0].strides) = __pyx_v_i; goto __pyx_L17; } /* "pandas/src/generated.pyx":305 * if new[j] == cur: * indexer[j] = i * elif fill_count < lim: # <<<<<<<<<<<<<< * indexer[j] = i * fill_count += 1 */ __pyx_t_12 = ((__pyx_v_fill_count < __pyx_v_lim) != 0); if (__pyx_t_12) { /* "pandas/src/generated.pyx":306 * indexer[j] = i * elif fill_count < lim: * indexer[j] = i # <<<<<<<<<<<<<< * fill_count += 1 * j += 1 */ __pyx_t_28 = __pyx_v_j; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_28, __pyx_pybuffernd_indexer.diminfo[0].strides) = __pyx_v_i; /* "pandas/src/generated.pyx":307 * elif fill_count < lim: * indexer[j] = i * fill_count += 1 # <<<<<<<<<<<<<< * j += 1 * */ __pyx_v_fill_count = (__pyx_v_fill_count + 1); goto __pyx_L17; } __pyx_L17:; /* "pandas/src/generated.pyx":308 * indexer[j] = i * fill_count += 1 * j += 1 # <<<<<<<<<<<<<< * * fill_count = 0 */ __pyx_v_j = (__pyx_v_j + 1); } /* "pandas/src/generated.pyx":310 * j += 1 * * fill_count = 0 # <<<<<<<<<<<<<< * i += 1 * cur = next */ __pyx_v_fill_count = 0; /* "pandas/src/generated.pyx":311 * * fill_count = 0 * i += 1 # <<<<<<<<<<<<<< * cur = next * */ __pyx_v_i = (__pyx_v_i + 1); /* "pandas/src/generated.pyx":312 * fill_count = 0 * i += 1 * cur = next # <<<<<<<<<<<<<< * * return indexer */ __pyx_v_cur = __pyx_v_next; } __pyx_L9_break:; /* "pandas/src/generated.pyx":314 * cur = next * * return indexer # <<<<<<<<<<<<<< * * @cython.boundscheck(False) */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_indexer)); __pyx_r = ((PyObject *)__pyx_v_indexer); goto __pyx_L0; /* "pandas/src/generated.pyx":257 * @cython.boundscheck(False) * @cython.wraparound(False) * def pad_float64(ndarray[float64_t] old, ndarray[float64_t] new, # <<<<<<<<<<<<<< * limit=None): * cdef Py_ssize_t i, j, nleft, nright */ /* 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_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_new.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_old.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.pad_float64", __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_new.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_old.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_indexer); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":318 * @cython.boundscheck(False) * @cython.wraparound(False) * def pad_float32(ndarray[float32_t] old, ndarray[float32_t] new, # <<<<<<<<<<<<<< * limit=None): * cdef Py_ssize_t i, j, nleft, nright */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_117pad_float32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_117pad_float32 = {__Pyx_NAMESTR("pad_float32"), (PyCFunction)__pyx_pw_6pandas_5algos_117pad_float32, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_117pad_float32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_old = 0; PyArrayObject *__pyx_v_new = 0; PyObject *__pyx_v_limit = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("pad_float32 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_old,&__pyx_n_s_new,&__pyx_n_s_limit,0}; PyObject* values[3] = {0,0,0}; /* "pandas/src/generated.pyx":319 * @cython.wraparound(False) * def pad_float32(ndarray[float32_t] old, ndarray[float32_t] new, * limit=None): # <<<<<<<<<<<<<< * cdef Py_ssize_t i, j, nleft, nright * cdef ndarray[int64_t, ndim=1] indexer */ values[2] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_old)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_new)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("pad_float32", 0, 2, 3, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 318; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_limit); if (value) { values[2] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "pad_float32") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 318; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_old = ((PyArrayObject *)values[0]); __pyx_v_new = ((PyArrayObject *)values[1]); __pyx_v_limit = values[2]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("pad_float32", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 318; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.pad_float32", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_old), __pyx_ptype_5numpy_ndarray, 1, "old", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 318; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_new), __pyx_ptype_5numpy_ndarray, 1, "new", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 318; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_116pad_float32(__pyx_self, __pyx_v_old, __pyx_v_new, __pyx_v_limit); /* "pandas/src/generated.pyx":318 * @cython.boundscheck(False) * @cython.wraparound(False) * def pad_float32(ndarray[float32_t] old, ndarray[float32_t] new, # <<<<<<<<<<<<<< * limit=None): * cdef Py_ssize_t i, j, nleft, nright */ /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5algos_116pad_float32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_old, PyArrayObject *__pyx_v_new, PyObject *__pyx_v_limit) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_nleft; Py_ssize_t __pyx_v_nright; PyArrayObject *__pyx_v_indexer = 0; __pyx_t_5numpy_float32_t __pyx_v_cur; __pyx_t_5numpy_float32_t __pyx_v_next; int __pyx_v_lim; int __pyx_v_fill_count; __Pyx_LocalBuf_ND __pyx_pybuffernd_indexer; __Pyx_Buffer __pyx_pybuffer_indexer; __Pyx_LocalBuf_ND __pyx_pybuffernd_new; __Pyx_Buffer __pyx_pybuffer_new; __Pyx_LocalBuf_ND __pyx_pybuffernd_old; __Pyx_Buffer __pyx_pybuffer_old; 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; int __pyx_t_12; int __pyx_t_13; long __pyx_t_14; int __pyx_t_15; int __pyx_t_16; long __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; __pyx_t_5numpy_float32_t __pyx_t_25; Py_ssize_t __pyx_t_26; Py_ssize_t __pyx_t_27; Py_ssize_t __pyx_t_28; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("pad_float32", 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_old.pybuffer.buf = NULL; __pyx_pybuffer_old.refcount = 0; __pyx_pybuffernd_old.data = NULL; __pyx_pybuffernd_old.rcbuffer = &__pyx_pybuffer_old; __pyx_pybuffer_new.pybuffer.buf = NULL; __pyx_pybuffer_new.refcount = 0; __pyx_pybuffernd_new.data = NULL; __pyx_pybuffernd_new.rcbuffer = &__pyx_pybuffer_new; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_old.rcbuffer->pybuffer, (PyObject*)__pyx_v_old, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 318; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_old.diminfo[0].strides = __pyx_pybuffernd_old.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_old.diminfo[0].shape = __pyx_pybuffernd_old.rcbuffer->pybuffer.shape[0]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_new.rcbuffer->pybuffer, (PyObject*)__pyx_v_new, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 318; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_new.diminfo[0].strides = __pyx_pybuffernd_new.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_new.diminfo[0].shape = __pyx_pybuffernd_new.rcbuffer->pybuffer.shape[0]; /* "pandas/src/generated.pyx":323 * cdef ndarray[int64_t, ndim=1] indexer * cdef float32_t cur, next * cdef int lim, fill_count = 0 # <<<<<<<<<<<<<< * * nleft = len(old) */ __pyx_v_fill_count = 0; /* "pandas/src/generated.pyx":325 * cdef int lim, fill_count = 0 * * nleft = len(old) # <<<<<<<<<<<<<< * nright = len(new) * indexer = np.empty(nright, dtype=np.int64) */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_old)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 325; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_nleft = __pyx_t_1; /* "pandas/src/generated.pyx":326 * * nleft = len(old) * nright = len(new) # <<<<<<<<<<<<<< * indexer = np.empty(nright, dtype=np.int64) * indexer.fill(-1) */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_new)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 326; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_nright = __pyx_t_1; /* "pandas/src/generated.pyx":327 * nleft = len(old) * nright = len(new) * indexer = np.empty(nright, dtype=np.int64) # <<<<<<<<<<<<<< * indexer.fill(-1) * */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 327; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 327; __pyx_clineno = __LINE__; goto __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_nright); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 327; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 327; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 327; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 327; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_int64); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 327; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 327; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyObject_Call(__pyx_t_3, __pyx_t_4, __pyx_t_2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 327; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 327; __pyx_clineno = __LINE__; goto __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_int64_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_int64_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_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_filename = __pyx_f[2]; __pyx_lineno = 327; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_7 = 0; __pyx_v_indexer = ((PyArrayObject *)__pyx_t_6); __pyx_t_6 = 0; /* "pandas/src/generated.pyx":328 * nright = len(new) * indexer = np.empty(nright, dtype=np.int64) * indexer.fill(-1) # <<<<<<<<<<<<<< * * if limit is None: */ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_indexer), __pyx_n_s_fill); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 328; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_2 = PyObject_Call(__pyx_t_6, __pyx_tuple__37, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 328; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":330 * indexer.fill(-1) * * if limit is None: # <<<<<<<<<<<<<< * lim = nright * else: */ __pyx_t_12 = (__pyx_v_limit == Py_None); __pyx_t_13 = (__pyx_t_12 != 0); if (__pyx_t_13) { /* "pandas/src/generated.pyx":331 * * if limit is None: * lim = nright # <<<<<<<<<<<<<< * else: * if limit < 0: */ __pyx_v_lim = __pyx_v_nright; goto __pyx_L3; } /*else*/ { /* "pandas/src/generated.pyx":333 * lim = nright * else: * if limit < 0: # <<<<<<<<<<<<<< * raise ValueError('Limit must be non-negative') * lim = limit */ __pyx_t_2 = PyObject_RichCompare(__pyx_v_limit, __pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 333; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_13 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 333; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_13) { /* "pandas/src/generated.pyx":334 * else: * if limit < 0: * raise ValueError('Limit must be non-negative') # <<<<<<<<<<<<<< * lim = limit * */ __pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__38, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 334; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 334; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } /* "pandas/src/generated.pyx":335 * if limit < 0: * raise ValueError('Limit must be non-negative') * lim = limit # <<<<<<<<<<<<<< * * if nleft == 0 or nright == 0 or new[nright - 1] < old[0]: */ __pyx_t_8 = __Pyx_PyInt_As_int(__pyx_v_limit); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 335; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_lim = __pyx_t_8; } __pyx_L3:; /* "pandas/src/generated.pyx":337 * lim = limit * * if nleft == 0 or nright == 0 or new[nright - 1] < old[0]: # <<<<<<<<<<<<<< * return indexer * */ __pyx_t_13 = ((__pyx_v_nleft == 0) != 0); if (!__pyx_t_13) { __pyx_t_12 = ((__pyx_v_nright == 0) != 0); if (!__pyx_t_12) { __pyx_t_1 = (__pyx_v_nright - 1); __pyx_t_14 = 0; __pyx_t_15 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_new.rcbuffer->pybuffer.buf, __pyx_t_1, __pyx_pybuffernd_new.diminfo[0].strides)) < (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_old.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_old.diminfo[0].strides))) != 0); __pyx_t_16 = __pyx_t_15; } else { __pyx_t_16 = __pyx_t_12; } __pyx_t_12 = __pyx_t_16; } else { __pyx_t_12 = __pyx_t_13; } if (__pyx_t_12) { /* "pandas/src/generated.pyx":338 * * if nleft == 0 or nright == 0 or new[nright - 1] < old[0]: * return indexer # <<<<<<<<<<<<<< * * i = j = 0 */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_indexer)); __pyx_r = ((PyObject *)__pyx_v_indexer); goto __pyx_L0; } /* "pandas/src/generated.pyx":340 * return indexer * * i = j = 0 # <<<<<<<<<<<<<< * * cur = old[0] */ __pyx_v_i = 0; __pyx_v_j = 0; /* "pandas/src/generated.pyx":342 * i = j = 0 * * cur = old[0] # <<<<<<<<<<<<<< * * while j <= nright - 1 and new[j] < cur: */ __pyx_t_17 = 0; __pyx_v_cur = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_old.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_old.diminfo[0].strides)); /* "pandas/src/generated.pyx":344 * cur = old[0] * * while j <= nright - 1 and new[j] < cur: # <<<<<<<<<<<<<< * j += 1 * */ while (1) { __pyx_t_12 = ((__pyx_v_j <= (__pyx_v_nright - 1)) != 0); if (__pyx_t_12) { __pyx_t_18 = __pyx_v_j; __pyx_t_13 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_new.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_new.diminfo[0].strides)) < __pyx_v_cur) != 0); __pyx_t_16 = __pyx_t_13; } else { __pyx_t_16 = __pyx_t_12; } if (!__pyx_t_16) break; /* "pandas/src/generated.pyx":345 * * while j <= nright - 1 and new[j] < cur: * j += 1 # <<<<<<<<<<<<<< * * while True: */ __pyx_v_j = (__pyx_v_j + 1); } /* "pandas/src/generated.pyx":347 * j += 1 * * while True: # <<<<<<<<<<<<<< * if j == nright: * break */ while (1) { /* "pandas/src/generated.pyx":348 * * while True: * if j == nright: # <<<<<<<<<<<<<< * break * */ __pyx_t_16 = ((__pyx_v_j == __pyx_v_nright) != 0); if (__pyx_t_16) { /* "pandas/src/generated.pyx":349 * while True: * if j == nright: * break # <<<<<<<<<<<<<< * * if i == nleft - 1: */ goto __pyx_L9_break; } /* "pandas/src/generated.pyx":351 * break * * if i == nleft - 1: # <<<<<<<<<<<<<< * while j < nright: * if new[j] == cur: */ __pyx_t_16 = ((__pyx_v_i == (__pyx_v_nleft - 1)) != 0); if (__pyx_t_16) { /* "pandas/src/generated.pyx":352 * * if i == nleft - 1: * while j < nright: # <<<<<<<<<<<<<< * if new[j] == cur: * indexer[j] = i */ while (1) { __pyx_t_16 = ((__pyx_v_j < __pyx_v_nright) != 0); if (!__pyx_t_16) break; /* "pandas/src/generated.pyx":353 * if i == nleft - 1: * while j < nright: * if new[j] == cur: # <<<<<<<<<<<<<< * indexer[j] = i * elif new[j] > cur and fill_count < lim: */ __pyx_t_19 = __pyx_v_j; __pyx_t_16 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_new.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_new.diminfo[0].strides)) == __pyx_v_cur) != 0); if (__pyx_t_16) { /* "pandas/src/generated.pyx":354 * while j < nright: * if new[j] == cur: * indexer[j] = i # <<<<<<<<<<<<<< * elif new[j] > cur and fill_count < lim: * indexer[j] = i */ __pyx_t_20 = __pyx_v_j; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_indexer.diminfo[0].strides) = __pyx_v_i; goto __pyx_L14; } /* "pandas/src/generated.pyx":355 * if new[j] == cur: * indexer[j] = i * elif new[j] > cur and fill_count < lim: # <<<<<<<<<<<<<< * indexer[j] = i * fill_count += 1 */ __pyx_t_21 = __pyx_v_j; __pyx_t_16 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_new.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_new.diminfo[0].strides)) > __pyx_v_cur) != 0); if (__pyx_t_16) { __pyx_t_12 = ((__pyx_v_fill_count < __pyx_v_lim) != 0); __pyx_t_13 = __pyx_t_12; } else { __pyx_t_13 = __pyx_t_16; } if (__pyx_t_13) { /* "pandas/src/generated.pyx":356 * indexer[j] = i * elif new[j] > cur and fill_count < lim: * indexer[j] = i # <<<<<<<<<<<<<< * fill_count += 1 * j += 1 */ __pyx_t_22 = __pyx_v_j; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_22, __pyx_pybuffernd_indexer.diminfo[0].strides) = __pyx_v_i; /* "pandas/src/generated.pyx":357 * elif new[j] > cur and fill_count < lim: * indexer[j] = i * fill_count += 1 # <<<<<<<<<<<<<< * j += 1 * break */ __pyx_v_fill_count = (__pyx_v_fill_count + 1); goto __pyx_L14; } __pyx_L14:; /* "pandas/src/generated.pyx":358 * indexer[j] = i * fill_count += 1 * j += 1 # <<<<<<<<<<<<<< * break * */ __pyx_v_j = (__pyx_v_j + 1); } /* "pandas/src/generated.pyx":359 * fill_count += 1 * j += 1 * break # <<<<<<<<<<<<<< * * next = old[i + 1] */ goto __pyx_L9_break; } /* "pandas/src/generated.pyx":361 * break * * next = old[i + 1] # <<<<<<<<<<<<<< * * while j < nright and cur <= new[j] < next: */ __pyx_t_23 = (__pyx_v_i + 1); __pyx_v_next = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_old.rcbuffer->pybuffer.buf, __pyx_t_23, __pyx_pybuffernd_old.diminfo[0].strides)); /* "pandas/src/generated.pyx":363 * next = old[i + 1] * * while j < nright and cur <= new[j] < next: # <<<<<<<<<<<<<< * if new[j] == cur: * indexer[j] = i */ while (1) { __pyx_t_13 = ((__pyx_v_j < __pyx_v_nright) != 0); if (__pyx_t_13) { __pyx_t_24 = __pyx_v_j; __pyx_t_25 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_new.rcbuffer->pybuffer.buf, __pyx_t_24, __pyx_pybuffernd_new.diminfo[0].strides)); __pyx_t_16 = (__pyx_v_cur <= __pyx_t_25); if (__pyx_t_16) { __pyx_t_16 = (__pyx_t_25 < __pyx_v_next); } __pyx_t_12 = (__pyx_t_16 != 0); } else { __pyx_t_12 = __pyx_t_13; } if (!__pyx_t_12) break; /* "pandas/src/generated.pyx":364 * * while j < nright and cur <= new[j] < next: * if new[j] == cur: # <<<<<<<<<<<<<< * indexer[j] = i * elif fill_count < lim: */ __pyx_t_26 = __pyx_v_j; __pyx_t_12 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_new.rcbuffer->pybuffer.buf, __pyx_t_26, __pyx_pybuffernd_new.diminfo[0].strides)) == __pyx_v_cur) != 0); if (__pyx_t_12) { /* "pandas/src/generated.pyx":365 * while j < nright and cur <= new[j] < next: * if new[j] == cur: * indexer[j] = i # <<<<<<<<<<<<<< * elif fill_count < lim: * indexer[j] = i */ __pyx_t_27 = __pyx_v_j; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_27, __pyx_pybuffernd_indexer.diminfo[0].strides) = __pyx_v_i; goto __pyx_L17; } /* "pandas/src/generated.pyx":366 * if new[j] == cur: * indexer[j] = i * elif fill_count < lim: # <<<<<<<<<<<<<< * indexer[j] = i * fill_count += 1 */ __pyx_t_12 = ((__pyx_v_fill_count < __pyx_v_lim) != 0); if (__pyx_t_12) { /* "pandas/src/generated.pyx":367 * indexer[j] = i * elif fill_count < lim: * indexer[j] = i # <<<<<<<<<<<<<< * fill_count += 1 * j += 1 */ __pyx_t_28 = __pyx_v_j; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_28, __pyx_pybuffernd_indexer.diminfo[0].strides) = __pyx_v_i; /* "pandas/src/generated.pyx":368 * elif fill_count < lim: * indexer[j] = i * fill_count += 1 # <<<<<<<<<<<<<< * j += 1 * */ __pyx_v_fill_count = (__pyx_v_fill_count + 1); goto __pyx_L17; } __pyx_L17:; /* "pandas/src/generated.pyx":369 * indexer[j] = i * fill_count += 1 * j += 1 # <<<<<<<<<<<<<< * * fill_count = 0 */ __pyx_v_j = (__pyx_v_j + 1); } /* "pandas/src/generated.pyx":371 * j += 1 * * fill_count = 0 # <<<<<<<<<<<<<< * i += 1 * cur = next */ __pyx_v_fill_count = 0; /* "pandas/src/generated.pyx":372 * * fill_count = 0 * i += 1 # <<<<<<<<<<<<<< * cur = next * */ __pyx_v_i = (__pyx_v_i + 1); /* "pandas/src/generated.pyx":373 * fill_count = 0 * i += 1 * cur = next # <<<<<<<<<<<<<< * * return indexer */ __pyx_v_cur = __pyx_v_next; } __pyx_L9_break:; /* "pandas/src/generated.pyx":375 * cur = next * * return indexer # <<<<<<<<<<<<<< * * @cython.boundscheck(False) */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_indexer)); __pyx_r = ((PyObject *)__pyx_v_indexer); goto __pyx_L0; /* "pandas/src/generated.pyx":318 * @cython.boundscheck(False) * @cython.wraparound(False) * def pad_float32(ndarray[float32_t] old, ndarray[float32_t] new, # <<<<<<<<<<<<<< * limit=None): * cdef Py_ssize_t i, j, nleft, nright */ /* 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_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_new.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_old.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.pad_float32", __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_new.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_old.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_indexer); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":379 * @cython.boundscheck(False) * @cython.wraparound(False) * def pad_object(ndarray[object] old, ndarray[object] new, # <<<<<<<<<<<<<< * limit=None): * cdef Py_ssize_t i, j, nleft, nright */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_119pad_object(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_119pad_object = {__Pyx_NAMESTR("pad_object"), (PyCFunction)__pyx_pw_6pandas_5algos_119pad_object, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_119pad_object(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_old = 0; PyArrayObject *__pyx_v_new = 0; PyObject *__pyx_v_limit = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("pad_object (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_old,&__pyx_n_s_new,&__pyx_n_s_limit,0}; PyObject* values[3] = {0,0,0}; /* "pandas/src/generated.pyx":380 * @cython.wraparound(False) * def pad_object(ndarray[object] old, ndarray[object] new, * limit=None): # <<<<<<<<<<<<<< * cdef Py_ssize_t i, j, nleft, nright * cdef ndarray[int64_t, ndim=1] indexer */ values[2] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_old)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_new)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("pad_object", 0, 2, 3, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 379; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_limit); if (value) { values[2] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "pad_object") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 379; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_old = ((PyArrayObject *)values[0]); __pyx_v_new = ((PyArrayObject *)values[1]); __pyx_v_limit = values[2]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("pad_object", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 379; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.pad_object", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_old), __pyx_ptype_5numpy_ndarray, 1, "old", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 379; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_new), __pyx_ptype_5numpy_ndarray, 1, "new", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 379; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_118pad_object(__pyx_self, __pyx_v_old, __pyx_v_new, __pyx_v_limit); /* "pandas/src/generated.pyx":379 * @cython.boundscheck(False) * @cython.wraparound(False) * def pad_object(ndarray[object] old, ndarray[object] new, # <<<<<<<<<<<<<< * limit=None): * cdef Py_ssize_t i, j, nleft, nright */ /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5algos_118pad_object(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_old, PyArrayObject *__pyx_v_new, PyObject *__pyx_v_limit) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_nleft; Py_ssize_t __pyx_v_nright; PyArrayObject *__pyx_v_indexer = 0; PyObject *__pyx_v_cur = 0; PyObject *__pyx_v_next = 0; int __pyx_v_lim; int __pyx_v_fill_count; __Pyx_LocalBuf_ND __pyx_pybuffernd_indexer; __Pyx_Buffer __pyx_pybuffer_indexer; __Pyx_LocalBuf_ND __pyx_pybuffernd_new; __Pyx_Buffer __pyx_pybuffer_new; __Pyx_LocalBuf_ND __pyx_pybuffernd_old; __Pyx_Buffer __pyx_pybuffer_old; 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; int __pyx_t_12; int __pyx_t_13; long __pyx_t_14; int __pyx_t_15; int __pyx_t_16; long __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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("pad_object", 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_old.pybuffer.buf = NULL; __pyx_pybuffer_old.refcount = 0; __pyx_pybuffernd_old.data = NULL; __pyx_pybuffernd_old.rcbuffer = &__pyx_pybuffer_old; __pyx_pybuffer_new.pybuffer.buf = NULL; __pyx_pybuffer_new.refcount = 0; __pyx_pybuffernd_new.data = NULL; __pyx_pybuffernd_new.rcbuffer = &__pyx_pybuffer_new; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_old.rcbuffer->pybuffer, (PyObject*)__pyx_v_old, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 379; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_old.diminfo[0].strides = __pyx_pybuffernd_old.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_old.diminfo[0].shape = __pyx_pybuffernd_old.rcbuffer->pybuffer.shape[0]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_new.rcbuffer->pybuffer, (PyObject*)__pyx_v_new, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 379; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_new.diminfo[0].strides = __pyx_pybuffernd_new.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_new.diminfo[0].shape = __pyx_pybuffernd_new.rcbuffer->pybuffer.shape[0]; /* "pandas/src/generated.pyx":384 * cdef ndarray[int64_t, ndim=1] indexer * cdef object cur, next * cdef int lim, fill_count = 0 # <<<<<<<<<<<<<< * * nleft = len(old) */ __pyx_v_fill_count = 0; /* "pandas/src/generated.pyx":386 * cdef int lim, fill_count = 0 * * nleft = len(old) # <<<<<<<<<<<<<< * nright = len(new) * indexer = np.empty(nright, dtype=np.int64) */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_old)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 386; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_nleft = __pyx_t_1; /* "pandas/src/generated.pyx":387 * * nleft = len(old) * nright = len(new) # <<<<<<<<<<<<<< * indexer = np.empty(nright, dtype=np.int64) * indexer.fill(-1) */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_new)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 387; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_nright = __pyx_t_1; /* "pandas/src/generated.pyx":388 * nleft = len(old) * nright = len(new) * indexer = np.empty(nright, dtype=np.int64) # <<<<<<<<<<<<<< * indexer.fill(-1) * */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 388; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 388; __pyx_clineno = __LINE__; goto __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_nright); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 388; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 388; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 388; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 388; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_int64); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 388; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 388; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyObject_Call(__pyx_t_3, __pyx_t_4, __pyx_t_2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 388; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 388; __pyx_clineno = __LINE__; goto __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_int64_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_int64_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_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_filename = __pyx_f[2]; __pyx_lineno = 388; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_7 = 0; __pyx_v_indexer = ((PyArrayObject *)__pyx_t_6); __pyx_t_6 = 0; /* "pandas/src/generated.pyx":389 * nright = len(new) * indexer = np.empty(nright, dtype=np.int64) * indexer.fill(-1) # <<<<<<<<<<<<<< * * if limit is None: */ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_indexer), __pyx_n_s_fill); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 389; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_2 = PyObject_Call(__pyx_t_6, __pyx_tuple__39, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 389; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":391 * indexer.fill(-1) * * if limit is None: # <<<<<<<<<<<<<< * lim = nright * else: */ __pyx_t_12 = (__pyx_v_limit == Py_None); __pyx_t_13 = (__pyx_t_12 != 0); if (__pyx_t_13) { /* "pandas/src/generated.pyx":392 * * if limit is None: * lim = nright # <<<<<<<<<<<<<< * else: * if limit < 0: */ __pyx_v_lim = __pyx_v_nright; goto __pyx_L3; } /*else*/ { /* "pandas/src/generated.pyx":394 * lim = nright * else: * if limit < 0: # <<<<<<<<<<<<<< * raise ValueError('Limit must be non-negative') * lim = limit */ __pyx_t_2 = PyObject_RichCompare(__pyx_v_limit, __pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 394; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_13 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 394; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_13) { /* "pandas/src/generated.pyx":395 * else: * if limit < 0: * raise ValueError('Limit must be non-negative') # <<<<<<<<<<<<<< * lim = limit * */ __pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__40, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 395; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 395; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } /* "pandas/src/generated.pyx":396 * if limit < 0: * raise ValueError('Limit must be non-negative') * lim = limit # <<<<<<<<<<<<<< * * if nleft == 0 or nright == 0 or new[nright - 1] < old[0]: */ __pyx_t_8 = __Pyx_PyInt_As_int(__pyx_v_limit); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 396; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_lim = __pyx_t_8; } __pyx_L3:; /* "pandas/src/generated.pyx":398 * lim = limit * * if nleft == 0 or nright == 0 or new[nright - 1] < old[0]: # <<<<<<<<<<<<<< * return indexer * */ __pyx_t_13 = (__pyx_v_nleft == 0); if (!__pyx_t_13) { __pyx_t_12 = (__pyx_v_nright == 0); if (!__pyx_t_12) { __pyx_t_1 = (__pyx_v_nright - 1); __pyx_t_2 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_new.rcbuffer->pybuffer.buf, __pyx_t_1, __pyx_pybuffernd_new.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_2); __pyx_t_14 = 0; __pyx_t_6 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_old.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_old.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_6); __pyx_t_4 = PyObject_RichCompare(__pyx_t_2, __pyx_t_6, Py_LT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 398; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_15 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_15 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 398; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_16 = __pyx_t_15; } else { __pyx_t_16 = __pyx_t_12; } __pyx_t_12 = __pyx_t_16; } else { __pyx_t_12 = __pyx_t_13; } if (__pyx_t_12) { /* "pandas/src/generated.pyx":399 * * if nleft == 0 or nright == 0 or new[nright - 1] < old[0]: * return indexer # <<<<<<<<<<<<<< * * i = j = 0 */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_indexer)); __pyx_r = ((PyObject *)__pyx_v_indexer); goto __pyx_L0; } /* "pandas/src/generated.pyx":401 * return indexer * * i = j = 0 # <<<<<<<<<<<<<< * * cur = old[0] */ __pyx_v_i = 0; __pyx_v_j = 0; /* "pandas/src/generated.pyx":403 * i = j = 0 * * cur = old[0] # <<<<<<<<<<<<<< * * while j <= nright - 1 and new[j] < cur: */ __pyx_t_17 = 0; __pyx_t_4 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_old.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_old.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_4); __pyx_v_cur = __pyx_t_4; __pyx_t_4 = 0; /* "pandas/src/generated.pyx":405 * cur = old[0] * * while j <= nright - 1 and new[j] < cur: # <<<<<<<<<<<<<< * j += 1 * */ while (1) { __pyx_t_12 = (__pyx_v_j <= (__pyx_v_nright - 1)); if (__pyx_t_12) { __pyx_t_18 = __pyx_v_j; __pyx_t_4 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_new.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_new.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_4); __pyx_t_6 = PyObject_RichCompare(__pyx_t_4, __pyx_v_cur, Py_LT); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 405; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_13 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 405; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_16 = __pyx_t_13; } else { __pyx_t_16 = __pyx_t_12; } if (!__pyx_t_16) break; /* "pandas/src/generated.pyx":406 * * while j <= nright - 1 and new[j] < cur: * j += 1 # <<<<<<<<<<<<<< * * while True: */ __pyx_v_j = (__pyx_v_j + 1); } /* "pandas/src/generated.pyx":408 * j += 1 * * while True: # <<<<<<<<<<<<<< * if j == nright: * break */ while (1) { /* "pandas/src/generated.pyx":409 * * while True: * if j == nright: # <<<<<<<<<<<<<< * break * */ __pyx_t_16 = ((__pyx_v_j == __pyx_v_nright) != 0); if (__pyx_t_16) { /* "pandas/src/generated.pyx":410 * while True: * if j == nright: * break # <<<<<<<<<<<<<< * * if i == nleft - 1: */ goto __pyx_L9_break; } /* "pandas/src/generated.pyx":412 * break * * if i == nleft - 1: # <<<<<<<<<<<<<< * while j < nright: * if new[j] == cur: */ __pyx_t_16 = ((__pyx_v_i == (__pyx_v_nleft - 1)) != 0); if (__pyx_t_16) { /* "pandas/src/generated.pyx":413 * * if i == nleft - 1: * while j < nright: # <<<<<<<<<<<<<< * if new[j] == cur: * indexer[j] = i */ while (1) { __pyx_t_16 = ((__pyx_v_j < __pyx_v_nright) != 0); if (!__pyx_t_16) break; /* "pandas/src/generated.pyx":414 * if i == nleft - 1: * while j < nright: * if new[j] == cur: # <<<<<<<<<<<<<< * indexer[j] = i * elif new[j] > cur and fill_count < lim: */ __pyx_t_19 = __pyx_v_j; __pyx_t_6 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_new.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_new.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_6); __pyx_t_4 = PyObject_RichCompare(__pyx_t_6, __pyx_v_cur, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 414; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_16 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_16 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 414; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_16) { /* "pandas/src/generated.pyx":415 * while j < nright: * if new[j] == cur: * indexer[j] = i # <<<<<<<<<<<<<< * elif new[j] > cur and fill_count < lim: * indexer[j] = i */ __pyx_t_20 = __pyx_v_j; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_indexer.diminfo[0].strides) = __pyx_v_i; goto __pyx_L14; } /* "pandas/src/generated.pyx":416 * if new[j] == cur: * indexer[j] = i * elif new[j] > cur and fill_count < lim: # <<<<<<<<<<<<<< * indexer[j] = i * fill_count += 1 */ __pyx_t_21 = __pyx_v_j; __pyx_t_4 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_new.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_new.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_4); __pyx_t_6 = PyObject_RichCompare(__pyx_t_4, __pyx_v_cur, Py_GT); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 416; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_16 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_16 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 416; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (__pyx_t_16) { __pyx_t_12 = (__pyx_v_fill_count < __pyx_v_lim); __pyx_t_13 = __pyx_t_12; } else { __pyx_t_13 = __pyx_t_16; } if (__pyx_t_13) { /* "pandas/src/generated.pyx":417 * indexer[j] = i * elif new[j] > cur and fill_count < lim: * indexer[j] = i # <<<<<<<<<<<<<< * fill_count += 1 * j += 1 */ __pyx_t_22 = __pyx_v_j; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_22, __pyx_pybuffernd_indexer.diminfo[0].strides) = __pyx_v_i; /* "pandas/src/generated.pyx":418 * elif new[j] > cur and fill_count < lim: * indexer[j] = i * fill_count += 1 # <<<<<<<<<<<<<< * j += 1 * break */ __pyx_v_fill_count = (__pyx_v_fill_count + 1); goto __pyx_L14; } __pyx_L14:; /* "pandas/src/generated.pyx":419 * indexer[j] = i * fill_count += 1 * j += 1 # <<<<<<<<<<<<<< * break * */ __pyx_v_j = (__pyx_v_j + 1); } /* "pandas/src/generated.pyx":420 * fill_count += 1 * j += 1 * break # <<<<<<<<<<<<<< * * next = old[i + 1] */ goto __pyx_L9_break; } /* "pandas/src/generated.pyx":422 * break * * next = old[i + 1] # <<<<<<<<<<<<<< * * while j < nright and cur <= new[j] < next: */ __pyx_t_23 = (__pyx_v_i + 1); __pyx_t_6 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_old.rcbuffer->pybuffer.buf, __pyx_t_23, __pyx_pybuffernd_old.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_6); __Pyx_XDECREF_SET(__pyx_v_next, __pyx_t_6); __pyx_t_6 = 0; /* "pandas/src/generated.pyx":424 * next = old[i + 1] * * while j < nright and cur <= new[j] < next: # <<<<<<<<<<<<<< * if new[j] == cur: * indexer[j] = i */ while (1) { __pyx_t_13 = (__pyx_v_j < __pyx_v_nright); if (__pyx_t_13) { __pyx_t_24 = __pyx_v_j; __pyx_t_6 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_new.rcbuffer->pybuffer.buf, __pyx_t_24, __pyx_pybuffernd_new.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_6); __pyx_t_4 = PyObject_RichCompare(__pyx_v_cur, __pyx_t_6, Py_LE); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 424; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__Pyx_PyObject_IsTrue(__pyx_t_4)) { __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = PyObject_RichCompare(__pyx_t_6, __pyx_v_next, Py_LT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 424; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_16 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_16 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 424; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_12 = __pyx_t_16; } else { __pyx_t_12 = __pyx_t_13; } if (!__pyx_t_12) break; /* "pandas/src/generated.pyx":425 * * while j < nright and cur <= new[j] < next: * if new[j] == cur: # <<<<<<<<<<<<<< * indexer[j] = i * elif fill_count < lim: */ __pyx_t_25 = __pyx_v_j; __pyx_t_4 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_new.rcbuffer->pybuffer.buf, __pyx_t_25, __pyx_pybuffernd_new.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_4); __pyx_t_6 = PyObject_RichCompare(__pyx_t_4, __pyx_v_cur, Py_EQ); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 425; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_12 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 425; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (__pyx_t_12) { /* "pandas/src/generated.pyx":426 * while j < nright and cur <= new[j] < next: * if new[j] == cur: * indexer[j] = i # <<<<<<<<<<<<<< * elif fill_count < lim: * indexer[j] = i */ __pyx_t_26 = __pyx_v_j; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_26, __pyx_pybuffernd_indexer.diminfo[0].strides) = __pyx_v_i; goto __pyx_L17; } /* "pandas/src/generated.pyx":427 * if new[j] == cur: * indexer[j] = i * elif fill_count < lim: # <<<<<<<<<<<<<< * indexer[j] = i * fill_count += 1 */ __pyx_t_12 = ((__pyx_v_fill_count < __pyx_v_lim) != 0); if (__pyx_t_12) { /* "pandas/src/generated.pyx":428 * indexer[j] = i * elif fill_count < lim: * indexer[j] = i # <<<<<<<<<<<<<< * fill_count += 1 * j += 1 */ __pyx_t_27 = __pyx_v_j; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_27, __pyx_pybuffernd_indexer.diminfo[0].strides) = __pyx_v_i; /* "pandas/src/generated.pyx":429 * elif fill_count < lim: * indexer[j] = i * fill_count += 1 # <<<<<<<<<<<<<< * j += 1 * */ __pyx_v_fill_count = (__pyx_v_fill_count + 1); goto __pyx_L17; } __pyx_L17:; /* "pandas/src/generated.pyx":430 * indexer[j] = i * fill_count += 1 * j += 1 # <<<<<<<<<<<<<< * * fill_count = 0 */ __pyx_v_j = (__pyx_v_j + 1); } /* "pandas/src/generated.pyx":432 * j += 1 * * fill_count = 0 # <<<<<<<<<<<<<< * i += 1 * cur = next */ __pyx_v_fill_count = 0; /* "pandas/src/generated.pyx":433 * * fill_count = 0 * i += 1 # <<<<<<<<<<<<<< * cur = next * */ __pyx_v_i = (__pyx_v_i + 1); /* "pandas/src/generated.pyx":434 * fill_count = 0 * i += 1 * cur = next # <<<<<<<<<<<<<< * * return indexer */ __Pyx_INCREF(__pyx_v_next); __Pyx_DECREF_SET(__pyx_v_cur, __pyx_v_next); } __pyx_L9_break:; /* "pandas/src/generated.pyx":436 * cur = next * * return indexer # <<<<<<<<<<<<<< * * @cython.boundscheck(False) */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_indexer)); __pyx_r = ((PyObject *)__pyx_v_indexer); goto __pyx_L0; /* "pandas/src/generated.pyx":379 * @cython.boundscheck(False) * @cython.wraparound(False) * def pad_object(ndarray[object] old, ndarray[object] new, # <<<<<<<<<<<<<< * limit=None): * cdef Py_ssize_t i, j, nleft, nright */ /* 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_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_new.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_old.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.pad_object", __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_new.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_old.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_indexer); __Pyx_XDECREF(__pyx_v_cur); __Pyx_XDECREF(__pyx_v_next); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":440 * @cython.boundscheck(False) * @cython.wraparound(False) * def pad_int32(ndarray[int32_t] old, ndarray[int32_t] new, # <<<<<<<<<<<<<< * limit=None): * cdef Py_ssize_t i, j, nleft, nright */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_121pad_int32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_121pad_int32 = {__Pyx_NAMESTR("pad_int32"), (PyCFunction)__pyx_pw_6pandas_5algos_121pad_int32, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_121pad_int32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_old = 0; PyArrayObject *__pyx_v_new = 0; PyObject *__pyx_v_limit = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("pad_int32 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_old,&__pyx_n_s_new,&__pyx_n_s_limit,0}; PyObject* values[3] = {0,0,0}; /* "pandas/src/generated.pyx":441 * @cython.wraparound(False) * def pad_int32(ndarray[int32_t] old, ndarray[int32_t] new, * limit=None): # <<<<<<<<<<<<<< * cdef Py_ssize_t i, j, nleft, nright * cdef ndarray[int64_t, ndim=1] indexer */ values[2] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_old)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_new)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("pad_int32", 0, 2, 3, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 440; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_limit); if (value) { values[2] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "pad_int32") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 440; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_old = ((PyArrayObject *)values[0]); __pyx_v_new = ((PyArrayObject *)values[1]); __pyx_v_limit = values[2]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("pad_int32", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 440; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.pad_int32", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_old), __pyx_ptype_5numpy_ndarray, 1, "old", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 440; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_new), __pyx_ptype_5numpy_ndarray, 1, "new", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 440; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_120pad_int32(__pyx_self, __pyx_v_old, __pyx_v_new, __pyx_v_limit); /* "pandas/src/generated.pyx":440 * @cython.boundscheck(False) * @cython.wraparound(False) * def pad_int32(ndarray[int32_t] old, ndarray[int32_t] new, # <<<<<<<<<<<<<< * limit=None): * cdef Py_ssize_t i, j, nleft, nright */ /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5algos_120pad_int32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_old, PyArrayObject *__pyx_v_new, PyObject *__pyx_v_limit) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_nleft; Py_ssize_t __pyx_v_nright; PyArrayObject *__pyx_v_indexer = 0; __pyx_t_5numpy_int32_t __pyx_v_cur; __pyx_t_5numpy_int32_t __pyx_v_next; int __pyx_v_lim; int __pyx_v_fill_count; __Pyx_LocalBuf_ND __pyx_pybuffernd_indexer; __Pyx_Buffer __pyx_pybuffer_indexer; __Pyx_LocalBuf_ND __pyx_pybuffernd_new; __Pyx_Buffer __pyx_pybuffer_new; __Pyx_LocalBuf_ND __pyx_pybuffernd_old; __Pyx_Buffer __pyx_pybuffer_old; 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; int __pyx_t_12; int __pyx_t_13; long __pyx_t_14; int __pyx_t_15; int __pyx_t_16; long __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; __pyx_t_5numpy_int32_t __pyx_t_25; Py_ssize_t __pyx_t_26; Py_ssize_t __pyx_t_27; Py_ssize_t __pyx_t_28; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("pad_int32", 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_old.pybuffer.buf = NULL; __pyx_pybuffer_old.refcount = 0; __pyx_pybuffernd_old.data = NULL; __pyx_pybuffernd_old.rcbuffer = &__pyx_pybuffer_old; __pyx_pybuffer_new.pybuffer.buf = NULL; __pyx_pybuffer_new.refcount = 0; __pyx_pybuffernd_new.data = NULL; __pyx_pybuffernd_new.rcbuffer = &__pyx_pybuffer_new; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_old.rcbuffer->pybuffer, (PyObject*)__pyx_v_old, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 440; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_old.diminfo[0].strides = __pyx_pybuffernd_old.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_old.diminfo[0].shape = __pyx_pybuffernd_old.rcbuffer->pybuffer.shape[0]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_new.rcbuffer->pybuffer, (PyObject*)__pyx_v_new, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 440; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_new.diminfo[0].strides = __pyx_pybuffernd_new.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_new.diminfo[0].shape = __pyx_pybuffernd_new.rcbuffer->pybuffer.shape[0]; /* "pandas/src/generated.pyx":445 * cdef ndarray[int64_t, ndim=1] indexer * cdef int32_t cur, next * cdef int lim, fill_count = 0 # <<<<<<<<<<<<<< * * nleft = len(old) */ __pyx_v_fill_count = 0; /* "pandas/src/generated.pyx":447 * cdef int lim, fill_count = 0 * * nleft = len(old) # <<<<<<<<<<<<<< * nright = len(new) * indexer = np.empty(nright, dtype=np.int64) */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_old)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 447; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_nleft = __pyx_t_1; /* "pandas/src/generated.pyx":448 * * nleft = len(old) * nright = len(new) # <<<<<<<<<<<<<< * indexer = np.empty(nright, dtype=np.int64) * indexer.fill(-1) */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_new)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 448; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_nright = __pyx_t_1; /* "pandas/src/generated.pyx":449 * nleft = len(old) * nright = len(new) * indexer = np.empty(nright, dtype=np.int64) # <<<<<<<<<<<<<< * indexer.fill(-1) * */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 449; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 449; __pyx_clineno = __LINE__; goto __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_nright); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 449; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 449; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 449; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 449; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_int64); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 449; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 449; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyObject_Call(__pyx_t_3, __pyx_t_4, __pyx_t_2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 449; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 449; __pyx_clineno = __LINE__; goto __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_int64_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_int64_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_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_filename = __pyx_f[2]; __pyx_lineno = 449; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_7 = 0; __pyx_v_indexer = ((PyArrayObject *)__pyx_t_6); __pyx_t_6 = 0; /* "pandas/src/generated.pyx":450 * nright = len(new) * indexer = np.empty(nright, dtype=np.int64) * indexer.fill(-1) # <<<<<<<<<<<<<< * * if limit is None: */ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_indexer), __pyx_n_s_fill); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 450; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_2 = PyObject_Call(__pyx_t_6, __pyx_tuple__41, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 450; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":452 * indexer.fill(-1) * * if limit is None: # <<<<<<<<<<<<<< * lim = nright * else: */ __pyx_t_12 = (__pyx_v_limit == Py_None); __pyx_t_13 = (__pyx_t_12 != 0); if (__pyx_t_13) { /* "pandas/src/generated.pyx":453 * * if limit is None: * lim = nright # <<<<<<<<<<<<<< * else: * if limit < 0: */ __pyx_v_lim = __pyx_v_nright; goto __pyx_L3; } /*else*/ { /* "pandas/src/generated.pyx":455 * lim = nright * else: * if limit < 0: # <<<<<<<<<<<<<< * raise ValueError('Limit must be non-negative') * lim = limit */ __pyx_t_2 = PyObject_RichCompare(__pyx_v_limit, __pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 455; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_13 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 455; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_13) { /* "pandas/src/generated.pyx":456 * else: * if limit < 0: * raise ValueError('Limit must be non-negative') # <<<<<<<<<<<<<< * lim = limit * */ __pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__42, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 456; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 456; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } /* "pandas/src/generated.pyx":457 * if limit < 0: * raise ValueError('Limit must be non-negative') * lim = limit # <<<<<<<<<<<<<< * * if nleft == 0 or nright == 0 or new[nright - 1] < old[0]: */ __pyx_t_8 = __Pyx_PyInt_As_int(__pyx_v_limit); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 457; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_lim = __pyx_t_8; } __pyx_L3:; /* "pandas/src/generated.pyx":459 * lim = limit * * if nleft == 0 or nright == 0 or new[nright - 1] < old[0]: # <<<<<<<<<<<<<< * return indexer * */ __pyx_t_13 = ((__pyx_v_nleft == 0) != 0); if (!__pyx_t_13) { __pyx_t_12 = ((__pyx_v_nright == 0) != 0); if (!__pyx_t_12) { __pyx_t_1 = (__pyx_v_nright - 1); __pyx_t_14 = 0; __pyx_t_15 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_new.rcbuffer->pybuffer.buf, __pyx_t_1, __pyx_pybuffernd_new.diminfo[0].strides)) < (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_old.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_old.diminfo[0].strides))) != 0); __pyx_t_16 = __pyx_t_15; } else { __pyx_t_16 = __pyx_t_12; } __pyx_t_12 = __pyx_t_16; } else { __pyx_t_12 = __pyx_t_13; } if (__pyx_t_12) { /* "pandas/src/generated.pyx":460 * * if nleft == 0 or nright == 0 or new[nright - 1] < old[0]: * return indexer # <<<<<<<<<<<<<< * * i = j = 0 */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_indexer)); __pyx_r = ((PyObject *)__pyx_v_indexer); goto __pyx_L0; } /* "pandas/src/generated.pyx":462 * return indexer * * i = j = 0 # <<<<<<<<<<<<<< * * cur = old[0] */ __pyx_v_i = 0; __pyx_v_j = 0; /* "pandas/src/generated.pyx":464 * i = j = 0 * * cur = old[0] # <<<<<<<<<<<<<< * * while j <= nright - 1 and new[j] < cur: */ __pyx_t_17 = 0; __pyx_v_cur = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_old.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_old.diminfo[0].strides)); /* "pandas/src/generated.pyx":466 * cur = old[0] * * while j <= nright - 1 and new[j] < cur: # <<<<<<<<<<<<<< * j += 1 * */ while (1) { __pyx_t_12 = ((__pyx_v_j <= (__pyx_v_nright - 1)) != 0); if (__pyx_t_12) { __pyx_t_18 = __pyx_v_j; __pyx_t_13 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_new.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_new.diminfo[0].strides)) < __pyx_v_cur) != 0); __pyx_t_16 = __pyx_t_13; } else { __pyx_t_16 = __pyx_t_12; } if (!__pyx_t_16) break; /* "pandas/src/generated.pyx":467 * * while j <= nright - 1 and new[j] < cur: * j += 1 # <<<<<<<<<<<<<< * * while True: */ __pyx_v_j = (__pyx_v_j + 1); } /* "pandas/src/generated.pyx":469 * j += 1 * * while True: # <<<<<<<<<<<<<< * if j == nright: * break */ while (1) { /* "pandas/src/generated.pyx":470 * * while True: * if j == nright: # <<<<<<<<<<<<<< * break * */ __pyx_t_16 = ((__pyx_v_j == __pyx_v_nright) != 0); if (__pyx_t_16) { /* "pandas/src/generated.pyx":471 * while True: * if j == nright: * break # <<<<<<<<<<<<<< * * if i == nleft - 1: */ goto __pyx_L9_break; } /* "pandas/src/generated.pyx":473 * break * * if i == nleft - 1: # <<<<<<<<<<<<<< * while j < nright: * if new[j] == cur: */ __pyx_t_16 = ((__pyx_v_i == (__pyx_v_nleft - 1)) != 0); if (__pyx_t_16) { /* "pandas/src/generated.pyx":474 * * if i == nleft - 1: * while j < nright: # <<<<<<<<<<<<<< * if new[j] == cur: * indexer[j] = i */ while (1) { __pyx_t_16 = ((__pyx_v_j < __pyx_v_nright) != 0); if (!__pyx_t_16) break; /* "pandas/src/generated.pyx":475 * if i == nleft - 1: * while j < nright: * if new[j] == cur: # <<<<<<<<<<<<<< * indexer[j] = i * elif new[j] > cur and fill_count < lim: */ __pyx_t_19 = __pyx_v_j; __pyx_t_16 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_new.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_new.diminfo[0].strides)) == __pyx_v_cur) != 0); if (__pyx_t_16) { /* "pandas/src/generated.pyx":476 * while j < nright: * if new[j] == cur: * indexer[j] = i # <<<<<<<<<<<<<< * elif new[j] > cur and fill_count < lim: * indexer[j] = i */ __pyx_t_20 = __pyx_v_j; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_indexer.diminfo[0].strides) = __pyx_v_i; goto __pyx_L14; } /* "pandas/src/generated.pyx":477 * if new[j] == cur: * indexer[j] = i * elif new[j] > cur and fill_count < lim: # <<<<<<<<<<<<<< * indexer[j] = i * fill_count += 1 */ __pyx_t_21 = __pyx_v_j; __pyx_t_16 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_new.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_new.diminfo[0].strides)) > __pyx_v_cur) != 0); if (__pyx_t_16) { __pyx_t_12 = ((__pyx_v_fill_count < __pyx_v_lim) != 0); __pyx_t_13 = __pyx_t_12; } else { __pyx_t_13 = __pyx_t_16; } if (__pyx_t_13) { /* "pandas/src/generated.pyx":478 * indexer[j] = i * elif new[j] > cur and fill_count < lim: * indexer[j] = i # <<<<<<<<<<<<<< * fill_count += 1 * j += 1 */ __pyx_t_22 = __pyx_v_j; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_22, __pyx_pybuffernd_indexer.diminfo[0].strides) = __pyx_v_i; /* "pandas/src/generated.pyx":479 * elif new[j] > cur and fill_count < lim: * indexer[j] = i * fill_count += 1 # <<<<<<<<<<<<<< * j += 1 * break */ __pyx_v_fill_count = (__pyx_v_fill_count + 1); goto __pyx_L14; } __pyx_L14:; /* "pandas/src/generated.pyx":480 * indexer[j] = i * fill_count += 1 * j += 1 # <<<<<<<<<<<<<< * break * */ __pyx_v_j = (__pyx_v_j + 1); } /* "pandas/src/generated.pyx":481 * fill_count += 1 * j += 1 * break # <<<<<<<<<<<<<< * * next = old[i + 1] */ goto __pyx_L9_break; } /* "pandas/src/generated.pyx":483 * break * * next = old[i + 1] # <<<<<<<<<<<<<< * * while j < nright and cur <= new[j] < next: */ __pyx_t_23 = (__pyx_v_i + 1); __pyx_v_next = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_old.rcbuffer->pybuffer.buf, __pyx_t_23, __pyx_pybuffernd_old.diminfo[0].strides)); /* "pandas/src/generated.pyx":485 * next = old[i + 1] * * while j < nright and cur <= new[j] < next: # <<<<<<<<<<<<<< * if new[j] == cur: * indexer[j] = i */ while (1) { __pyx_t_13 = ((__pyx_v_j < __pyx_v_nright) != 0); if (__pyx_t_13) { __pyx_t_24 = __pyx_v_j; __pyx_t_25 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_new.rcbuffer->pybuffer.buf, __pyx_t_24, __pyx_pybuffernd_new.diminfo[0].strides)); __pyx_t_16 = (__pyx_v_cur <= __pyx_t_25); if (__pyx_t_16) { __pyx_t_16 = (__pyx_t_25 < __pyx_v_next); } __pyx_t_12 = (__pyx_t_16 != 0); } else { __pyx_t_12 = __pyx_t_13; } if (!__pyx_t_12) break; /* "pandas/src/generated.pyx":486 * * while j < nright and cur <= new[j] < next: * if new[j] == cur: # <<<<<<<<<<<<<< * indexer[j] = i * elif fill_count < lim: */ __pyx_t_26 = __pyx_v_j; __pyx_t_12 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_new.rcbuffer->pybuffer.buf, __pyx_t_26, __pyx_pybuffernd_new.diminfo[0].strides)) == __pyx_v_cur) != 0); if (__pyx_t_12) { /* "pandas/src/generated.pyx":487 * while j < nright and cur <= new[j] < next: * if new[j] == cur: * indexer[j] = i # <<<<<<<<<<<<<< * elif fill_count < lim: * indexer[j] = i */ __pyx_t_27 = __pyx_v_j; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_27, __pyx_pybuffernd_indexer.diminfo[0].strides) = __pyx_v_i; goto __pyx_L17; } /* "pandas/src/generated.pyx":488 * if new[j] == cur: * indexer[j] = i * elif fill_count < lim: # <<<<<<<<<<<<<< * indexer[j] = i * fill_count += 1 */ __pyx_t_12 = ((__pyx_v_fill_count < __pyx_v_lim) != 0); if (__pyx_t_12) { /* "pandas/src/generated.pyx":489 * indexer[j] = i * elif fill_count < lim: * indexer[j] = i # <<<<<<<<<<<<<< * fill_count += 1 * j += 1 */ __pyx_t_28 = __pyx_v_j; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_28, __pyx_pybuffernd_indexer.diminfo[0].strides) = __pyx_v_i; /* "pandas/src/generated.pyx":490 * elif fill_count < lim: * indexer[j] = i * fill_count += 1 # <<<<<<<<<<<<<< * j += 1 * */ __pyx_v_fill_count = (__pyx_v_fill_count + 1); goto __pyx_L17; } __pyx_L17:; /* "pandas/src/generated.pyx":491 * indexer[j] = i * fill_count += 1 * j += 1 # <<<<<<<<<<<<<< * * fill_count = 0 */ __pyx_v_j = (__pyx_v_j + 1); } /* "pandas/src/generated.pyx":493 * j += 1 * * fill_count = 0 # <<<<<<<<<<<<<< * i += 1 * cur = next */ __pyx_v_fill_count = 0; /* "pandas/src/generated.pyx":494 * * fill_count = 0 * i += 1 # <<<<<<<<<<<<<< * cur = next * */ __pyx_v_i = (__pyx_v_i + 1); /* "pandas/src/generated.pyx":495 * fill_count = 0 * i += 1 * cur = next # <<<<<<<<<<<<<< * * return indexer */ __pyx_v_cur = __pyx_v_next; } __pyx_L9_break:; /* "pandas/src/generated.pyx":497 * cur = next * * return indexer # <<<<<<<<<<<<<< * * @cython.boundscheck(False) */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_indexer)); __pyx_r = ((PyObject *)__pyx_v_indexer); goto __pyx_L0; /* "pandas/src/generated.pyx":440 * @cython.boundscheck(False) * @cython.wraparound(False) * def pad_int32(ndarray[int32_t] old, ndarray[int32_t] new, # <<<<<<<<<<<<<< * limit=None): * cdef Py_ssize_t i, j, nleft, nright */ /* 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_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_new.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_old.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.pad_int32", __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_new.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_old.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_indexer); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":501 * @cython.boundscheck(False) * @cython.wraparound(False) * def pad_int64(ndarray[int64_t] old, ndarray[int64_t] new, # <<<<<<<<<<<<<< * limit=None): * cdef Py_ssize_t i, j, nleft, nright */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_123pad_int64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_123pad_int64 = {__Pyx_NAMESTR("pad_int64"), (PyCFunction)__pyx_pw_6pandas_5algos_123pad_int64, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_123pad_int64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_old = 0; PyArrayObject *__pyx_v_new = 0; PyObject *__pyx_v_limit = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("pad_int64 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_old,&__pyx_n_s_new,&__pyx_n_s_limit,0}; PyObject* values[3] = {0,0,0}; /* "pandas/src/generated.pyx":502 * @cython.wraparound(False) * def pad_int64(ndarray[int64_t] old, ndarray[int64_t] new, * limit=None): # <<<<<<<<<<<<<< * cdef Py_ssize_t i, j, nleft, nright * cdef ndarray[int64_t, ndim=1] indexer */ values[2] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_old)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_new)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("pad_int64", 0, 2, 3, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 501; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_limit); if (value) { values[2] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "pad_int64") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 501; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_old = ((PyArrayObject *)values[0]); __pyx_v_new = ((PyArrayObject *)values[1]); __pyx_v_limit = values[2]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("pad_int64", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 501; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.pad_int64", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_old), __pyx_ptype_5numpy_ndarray, 1, "old", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 501; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_new), __pyx_ptype_5numpy_ndarray, 1, "new", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 501; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_122pad_int64(__pyx_self, __pyx_v_old, __pyx_v_new, __pyx_v_limit); /* "pandas/src/generated.pyx":501 * @cython.boundscheck(False) * @cython.wraparound(False) * def pad_int64(ndarray[int64_t] old, ndarray[int64_t] new, # <<<<<<<<<<<<<< * limit=None): * cdef Py_ssize_t i, j, nleft, nright */ /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5algos_122pad_int64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_old, PyArrayObject *__pyx_v_new, PyObject *__pyx_v_limit) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_nleft; Py_ssize_t __pyx_v_nright; PyArrayObject *__pyx_v_indexer = 0; __pyx_t_5numpy_int64_t __pyx_v_cur; __pyx_t_5numpy_int64_t __pyx_v_next; int __pyx_v_lim; int __pyx_v_fill_count; __Pyx_LocalBuf_ND __pyx_pybuffernd_indexer; __Pyx_Buffer __pyx_pybuffer_indexer; __Pyx_LocalBuf_ND __pyx_pybuffernd_new; __Pyx_Buffer __pyx_pybuffer_new; __Pyx_LocalBuf_ND __pyx_pybuffernd_old; __Pyx_Buffer __pyx_pybuffer_old; 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; int __pyx_t_12; int __pyx_t_13; long __pyx_t_14; int __pyx_t_15; int __pyx_t_16; long __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; __pyx_t_5numpy_int64_t __pyx_t_25; Py_ssize_t __pyx_t_26; Py_ssize_t __pyx_t_27; Py_ssize_t __pyx_t_28; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("pad_int64", 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_old.pybuffer.buf = NULL; __pyx_pybuffer_old.refcount = 0; __pyx_pybuffernd_old.data = NULL; __pyx_pybuffernd_old.rcbuffer = &__pyx_pybuffer_old; __pyx_pybuffer_new.pybuffer.buf = NULL; __pyx_pybuffer_new.refcount = 0; __pyx_pybuffernd_new.data = NULL; __pyx_pybuffernd_new.rcbuffer = &__pyx_pybuffer_new; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_old.rcbuffer->pybuffer, (PyObject*)__pyx_v_old, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 501; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_old.diminfo[0].strides = __pyx_pybuffernd_old.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_old.diminfo[0].shape = __pyx_pybuffernd_old.rcbuffer->pybuffer.shape[0]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_new.rcbuffer->pybuffer, (PyObject*)__pyx_v_new, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 501; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_new.diminfo[0].strides = __pyx_pybuffernd_new.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_new.diminfo[0].shape = __pyx_pybuffernd_new.rcbuffer->pybuffer.shape[0]; /* "pandas/src/generated.pyx":506 * cdef ndarray[int64_t, ndim=1] indexer * cdef int64_t cur, next * cdef int lim, fill_count = 0 # <<<<<<<<<<<<<< * * nleft = len(old) */ __pyx_v_fill_count = 0; /* "pandas/src/generated.pyx":508 * cdef int lim, fill_count = 0 * * nleft = len(old) # <<<<<<<<<<<<<< * nright = len(new) * indexer = np.empty(nright, dtype=np.int64) */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_old)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 508; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_nleft = __pyx_t_1; /* "pandas/src/generated.pyx":509 * * nleft = len(old) * nright = len(new) # <<<<<<<<<<<<<< * indexer = np.empty(nright, dtype=np.int64) * indexer.fill(-1) */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_new)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 509; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_nright = __pyx_t_1; /* "pandas/src/generated.pyx":510 * nleft = len(old) * nright = len(new) * indexer = np.empty(nright, dtype=np.int64) # <<<<<<<<<<<<<< * indexer.fill(-1) * */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 510; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 510; __pyx_clineno = __LINE__; goto __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_nright); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 510; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 510; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 510; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 510; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_int64); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 510; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 510; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyObject_Call(__pyx_t_3, __pyx_t_4, __pyx_t_2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 510; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 510; __pyx_clineno = __LINE__; goto __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_int64_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_int64_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_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_filename = __pyx_f[2]; __pyx_lineno = 510; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_7 = 0; __pyx_v_indexer = ((PyArrayObject *)__pyx_t_6); __pyx_t_6 = 0; /* "pandas/src/generated.pyx":511 * nright = len(new) * indexer = np.empty(nright, dtype=np.int64) * indexer.fill(-1) # <<<<<<<<<<<<<< * * if limit is None: */ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_indexer), __pyx_n_s_fill); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 511; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_2 = PyObject_Call(__pyx_t_6, __pyx_tuple__43, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 511; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":513 * indexer.fill(-1) * * if limit is None: # <<<<<<<<<<<<<< * lim = nright * else: */ __pyx_t_12 = (__pyx_v_limit == Py_None); __pyx_t_13 = (__pyx_t_12 != 0); if (__pyx_t_13) { /* "pandas/src/generated.pyx":514 * * if limit is None: * lim = nright # <<<<<<<<<<<<<< * else: * if limit < 0: */ __pyx_v_lim = __pyx_v_nright; goto __pyx_L3; } /*else*/ { /* "pandas/src/generated.pyx":516 * lim = nright * else: * if limit < 0: # <<<<<<<<<<<<<< * raise ValueError('Limit must be non-negative') * lim = limit */ __pyx_t_2 = PyObject_RichCompare(__pyx_v_limit, __pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 516; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_13 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 516; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_13) { /* "pandas/src/generated.pyx":517 * else: * if limit < 0: * raise ValueError('Limit must be non-negative') # <<<<<<<<<<<<<< * lim = limit * */ __pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__44, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 517; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 517; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } /* "pandas/src/generated.pyx":518 * if limit < 0: * raise ValueError('Limit must be non-negative') * lim = limit # <<<<<<<<<<<<<< * * if nleft == 0 or nright == 0 or new[nright - 1] < old[0]: */ __pyx_t_8 = __Pyx_PyInt_As_int(__pyx_v_limit); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 518; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_lim = __pyx_t_8; } __pyx_L3:; /* "pandas/src/generated.pyx":520 * lim = limit * * if nleft == 0 or nright == 0 or new[nright - 1] < old[0]: # <<<<<<<<<<<<<< * return indexer * */ __pyx_t_13 = ((__pyx_v_nleft == 0) != 0); if (!__pyx_t_13) { __pyx_t_12 = ((__pyx_v_nright == 0) != 0); if (!__pyx_t_12) { __pyx_t_1 = (__pyx_v_nright - 1); __pyx_t_14 = 0; __pyx_t_15 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_new.rcbuffer->pybuffer.buf, __pyx_t_1, __pyx_pybuffernd_new.diminfo[0].strides)) < (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_old.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_old.diminfo[0].strides))) != 0); __pyx_t_16 = __pyx_t_15; } else { __pyx_t_16 = __pyx_t_12; } __pyx_t_12 = __pyx_t_16; } else { __pyx_t_12 = __pyx_t_13; } if (__pyx_t_12) { /* "pandas/src/generated.pyx":521 * * if nleft == 0 or nright == 0 or new[nright - 1] < old[0]: * return indexer # <<<<<<<<<<<<<< * * i = j = 0 */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_indexer)); __pyx_r = ((PyObject *)__pyx_v_indexer); goto __pyx_L0; } /* "pandas/src/generated.pyx":523 * return indexer * * i = j = 0 # <<<<<<<<<<<<<< * * cur = old[0] */ __pyx_v_i = 0; __pyx_v_j = 0; /* "pandas/src/generated.pyx":525 * i = j = 0 * * cur = old[0] # <<<<<<<<<<<<<< * * while j <= nright - 1 and new[j] < cur: */ __pyx_t_17 = 0; __pyx_v_cur = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_old.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_old.diminfo[0].strides)); /* "pandas/src/generated.pyx":527 * cur = old[0] * * while j <= nright - 1 and new[j] < cur: # <<<<<<<<<<<<<< * j += 1 * */ while (1) { __pyx_t_12 = ((__pyx_v_j <= (__pyx_v_nright - 1)) != 0); if (__pyx_t_12) { __pyx_t_18 = __pyx_v_j; __pyx_t_13 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_new.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_new.diminfo[0].strides)) < __pyx_v_cur) != 0); __pyx_t_16 = __pyx_t_13; } else { __pyx_t_16 = __pyx_t_12; } if (!__pyx_t_16) break; /* "pandas/src/generated.pyx":528 * * while j <= nright - 1 and new[j] < cur: * j += 1 # <<<<<<<<<<<<<< * * while True: */ __pyx_v_j = (__pyx_v_j + 1); } /* "pandas/src/generated.pyx":530 * j += 1 * * while True: # <<<<<<<<<<<<<< * if j == nright: * break */ while (1) { /* "pandas/src/generated.pyx":531 * * while True: * if j == nright: # <<<<<<<<<<<<<< * break * */ __pyx_t_16 = ((__pyx_v_j == __pyx_v_nright) != 0); if (__pyx_t_16) { /* "pandas/src/generated.pyx":532 * while True: * if j == nright: * break # <<<<<<<<<<<<<< * * if i == nleft - 1: */ goto __pyx_L9_break; } /* "pandas/src/generated.pyx":534 * break * * if i == nleft - 1: # <<<<<<<<<<<<<< * while j < nright: * if new[j] == cur: */ __pyx_t_16 = ((__pyx_v_i == (__pyx_v_nleft - 1)) != 0); if (__pyx_t_16) { /* "pandas/src/generated.pyx":535 * * if i == nleft - 1: * while j < nright: # <<<<<<<<<<<<<< * if new[j] == cur: * indexer[j] = i */ while (1) { __pyx_t_16 = ((__pyx_v_j < __pyx_v_nright) != 0); if (!__pyx_t_16) break; /* "pandas/src/generated.pyx":536 * if i == nleft - 1: * while j < nright: * if new[j] == cur: # <<<<<<<<<<<<<< * indexer[j] = i * elif new[j] > cur and fill_count < lim: */ __pyx_t_19 = __pyx_v_j; __pyx_t_16 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_new.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_new.diminfo[0].strides)) == __pyx_v_cur) != 0); if (__pyx_t_16) { /* "pandas/src/generated.pyx":537 * while j < nright: * if new[j] == cur: * indexer[j] = i # <<<<<<<<<<<<<< * elif new[j] > cur and fill_count < lim: * indexer[j] = i */ __pyx_t_20 = __pyx_v_j; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_indexer.diminfo[0].strides) = __pyx_v_i; goto __pyx_L14; } /* "pandas/src/generated.pyx":538 * if new[j] == cur: * indexer[j] = i * elif new[j] > cur and fill_count < lim: # <<<<<<<<<<<<<< * indexer[j] = i * fill_count += 1 */ __pyx_t_21 = __pyx_v_j; __pyx_t_16 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_new.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_new.diminfo[0].strides)) > __pyx_v_cur) != 0); if (__pyx_t_16) { __pyx_t_12 = ((__pyx_v_fill_count < __pyx_v_lim) != 0); __pyx_t_13 = __pyx_t_12; } else { __pyx_t_13 = __pyx_t_16; } if (__pyx_t_13) { /* "pandas/src/generated.pyx":539 * indexer[j] = i * elif new[j] > cur and fill_count < lim: * indexer[j] = i # <<<<<<<<<<<<<< * fill_count += 1 * j += 1 */ __pyx_t_22 = __pyx_v_j; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_22, __pyx_pybuffernd_indexer.diminfo[0].strides) = __pyx_v_i; /* "pandas/src/generated.pyx":540 * elif new[j] > cur and fill_count < lim: * indexer[j] = i * fill_count += 1 # <<<<<<<<<<<<<< * j += 1 * break */ __pyx_v_fill_count = (__pyx_v_fill_count + 1); goto __pyx_L14; } __pyx_L14:; /* "pandas/src/generated.pyx":541 * indexer[j] = i * fill_count += 1 * j += 1 # <<<<<<<<<<<<<< * break * */ __pyx_v_j = (__pyx_v_j + 1); } /* "pandas/src/generated.pyx":542 * fill_count += 1 * j += 1 * break # <<<<<<<<<<<<<< * * next = old[i + 1] */ goto __pyx_L9_break; } /* "pandas/src/generated.pyx":544 * break * * next = old[i + 1] # <<<<<<<<<<<<<< * * while j < nright and cur <= new[j] < next: */ __pyx_t_23 = (__pyx_v_i + 1); __pyx_v_next = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_old.rcbuffer->pybuffer.buf, __pyx_t_23, __pyx_pybuffernd_old.diminfo[0].strides)); /* "pandas/src/generated.pyx":546 * next = old[i + 1] * * while j < nright and cur <= new[j] < next: # <<<<<<<<<<<<<< * if new[j] == cur: * indexer[j] = i */ while (1) { __pyx_t_13 = ((__pyx_v_j < __pyx_v_nright) != 0); if (__pyx_t_13) { __pyx_t_24 = __pyx_v_j; __pyx_t_25 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_new.rcbuffer->pybuffer.buf, __pyx_t_24, __pyx_pybuffernd_new.diminfo[0].strides)); __pyx_t_16 = (__pyx_v_cur <= __pyx_t_25); if (__pyx_t_16) { __pyx_t_16 = (__pyx_t_25 < __pyx_v_next); } __pyx_t_12 = (__pyx_t_16 != 0); } else { __pyx_t_12 = __pyx_t_13; } if (!__pyx_t_12) break; /* "pandas/src/generated.pyx":547 * * while j < nright and cur <= new[j] < next: * if new[j] == cur: # <<<<<<<<<<<<<< * indexer[j] = i * elif fill_count < lim: */ __pyx_t_26 = __pyx_v_j; __pyx_t_12 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_new.rcbuffer->pybuffer.buf, __pyx_t_26, __pyx_pybuffernd_new.diminfo[0].strides)) == __pyx_v_cur) != 0); if (__pyx_t_12) { /* "pandas/src/generated.pyx":548 * while j < nright and cur <= new[j] < next: * if new[j] == cur: * indexer[j] = i # <<<<<<<<<<<<<< * elif fill_count < lim: * indexer[j] = i */ __pyx_t_27 = __pyx_v_j; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_27, __pyx_pybuffernd_indexer.diminfo[0].strides) = __pyx_v_i; goto __pyx_L17; } /* "pandas/src/generated.pyx":549 * if new[j] == cur: * indexer[j] = i * elif fill_count < lim: # <<<<<<<<<<<<<< * indexer[j] = i * fill_count += 1 */ __pyx_t_12 = ((__pyx_v_fill_count < __pyx_v_lim) != 0); if (__pyx_t_12) { /* "pandas/src/generated.pyx":550 * indexer[j] = i * elif fill_count < lim: * indexer[j] = i # <<<<<<<<<<<<<< * fill_count += 1 * j += 1 */ __pyx_t_28 = __pyx_v_j; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_28, __pyx_pybuffernd_indexer.diminfo[0].strides) = __pyx_v_i; /* "pandas/src/generated.pyx":551 * elif fill_count < lim: * indexer[j] = i * fill_count += 1 # <<<<<<<<<<<<<< * j += 1 * */ __pyx_v_fill_count = (__pyx_v_fill_count + 1); goto __pyx_L17; } __pyx_L17:; /* "pandas/src/generated.pyx":552 * indexer[j] = i * fill_count += 1 * j += 1 # <<<<<<<<<<<<<< * * fill_count = 0 */ __pyx_v_j = (__pyx_v_j + 1); } /* "pandas/src/generated.pyx":554 * j += 1 * * fill_count = 0 # <<<<<<<<<<<<<< * i += 1 * cur = next */ __pyx_v_fill_count = 0; /* "pandas/src/generated.pyx":555 * * fill_count = 0 * i += 1 # <<<<<<<<<<<<<< * cur = next * */ __pyx_v_i = (__pyx_v_i + 1); /* "pandas/src/generated.pyx":556 * fill_count = 0 * i += 1 * cur = next # <<<<<<<<<<<<<< * * return indexer */ __pyx_v_cur = __pyx_v_next; } __pyx_L9_break:; /* "pandas/src/generated.pyx":558 * cur = next * * return indexer # <<<<<<<<<<<<<< * * @cython.boundscheck(False) */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_indexer)); __pyx_r = ((PyObject *)__pyx_v_indexer); goto __pyx_L0; /* "pandas/src/generated.pyx":501 * @cython.boundscheck(False) * @cython.wraparound(False) * def pad_int64(ndarray[int64_t] old, ndarray[int64_t] new, # <<<<<<<<<<<<<< * limit=None): * cdef Py_ssize_t i, j, nleft, nright */ /* 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_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_new.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_old.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.pad_int64", __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_new.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_old.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_indexer); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":562 * @cython.boundscheck(False) * @cython.wraparound(False) * def pad_bool(ndarray[uint8_t] old, ndarray[uint8_t] new, # <<<<<<<<<<<<<< * limit=None): * cdef Py_ssize_t i, j, nleft, nright */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_125pad_bool(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_125pad_bool = {__Pyx_NAMESTR("pad_bool"), (PyCFunction)__pyx_pw_6pandas_5algos_125pad_bool, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_125pad_bool(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_old = 0; PyArrayObject *__pyx_v_new = 0; PyObject *__pyx_v_limit = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("pad_bool (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_old,&__pyx_n_s_new,&__pyx_n_s_limit,0}; PyObject* values[3] = {0,0,0}; /* "pandas/src/generated.pyx":563 * @cython.wraparound(False) * def pad_bool(ndarray[uint8_t] old, ndarray[uint8_t] new, * limit=None): # <<<<<<<<<<<<<< * cdef Py_ssize_t i, j, nleft, nright * cdef ndarray[int64_t, ndim=1] indexer */ values[2] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_old)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_new)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("pad_bool", 0, 2, 3, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 562; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_limit); if (value) { values[2] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "pad_bool") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 562; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_old = ((PyArrayObject *)values[0]); __pyx_v_new = ((PyArrayObject *)values[1]); __pyx_v_limit = values[2]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("pad_bool", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 562; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.pad_bool", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_old), __pyx_ptype_5numpy_ndarray, 1, "old", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 562; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_new), __pyx_ptype_5numpy_ndarray, 1, "new", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 562; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_124pad_bool(__pyx_self, __pyx_v_old, __pyx_v_new, __pyx_v_limit); /* "pandas/src/generated.pyx":562 * @cython.boundscheck(False) * @cython.wraparound(False) * def pad_bool(ndarray[uint8_t] old, ndarray[uint8_t] new, # <<<<<<<<<<<<<< * limit=None): * cdef Py_ssize_t i, j, nleft, nright */ /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5algos_124pad_bool(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_old, PyArrayObject *__pyx_v_new, PyObject *__pyx_v_limit) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_nleft; Py_ssize_t __pyx_v_nright; PyArrayObject *__pyx_v_indexer = 0; __pyx_t_5numpy_uint8_t __pyx_v_cur; __pyx_t_5numpy_uint8_t __pyx_v_next; int __pyx_v_lim; int __pyx_v_fill_count; __Pyx_LocalBuf_ND __pyx_pybuffernd_indexer; __Pyx_Buffer __pyx_pybuffer_indexer; __Pyx_LocalBuf_ND __pyx_pybuffernd_new; __Pyx_Buffer __pyx_pybuffer_new; __Pyx_LocalBuf_ND __pyx_pybuffernd_old; __Pyx_Buffer __pyx_pybuffer_old; 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; int __pyx_t_12; int __pyx_t_13; long __pyx_t_14; int __pyx_t_15; int __pyx_t_16; long __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; __pyx_t_5numpy_uint8_t __pyx_t_25; Py_ssize_t __pyx_t_26; Py_ssize_t __pyx_t_27; Py_ssize_t __pyx_t_28; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("pad_bool", 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_old.pybuffer.buf = NULL; __pyx_pybuffer_old.refcount = 0; __pyx_pybuffernd_old.data = NULL; __pyx_pybuffernd_old.rcbuffer = &__pyx_pybuffer_old; __pyx_pybuffer_new.pybuffer.buf = NULL; __pyx_pybuffer_new.refcount = 0; __pyx_pybuffernd_new.data = NULL; __pyx_pybuffernd_new.rcbuffer = &__pyx_pybuffer_new; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_old.rcbuffer->pybuffer, (PyObject*)__pyx_v_old, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 562; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_old.diminfo[0].strides = __pyx_pybuffernd_old.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_old.diminfo[0].shape = __pyx_pybuffernd_old.rcbuffer->pybuffer.shape[0]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_new.rcbuffer->pybuffer, (PyObject*)__pyx_v_new, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 562; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_new.diminfo[0].strides = __pyx_pybuffernd_new.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_new.diminfo[0].shape = __pyx_pybuffernd_new.rcbuffer->pybuffer.shape[0]; /* "pandas/src/generated.pyx":567 * cdef ndarray[int64_t, ndim=1] indexer * cdef uint8_t cur, next * cdef int lim, fill_count = 0 # <<<<<<<<<<<<<< * * nleft = len(old) */ __pyx_v_fill_count = 0; /* "pandas/src/generated.pyx":569 * cdef int lim, fill_count = 0 * * nleft = len(old) # <<<<<<<<<<<<<< * nright = len(new) * indexer = np.empty(nright, dtype=np.int64) */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_old)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 569; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_nleft = __pyx_t_1; /* "pandas/src/generated.pyx":570 * * nleft = len(old) * nright = len(new) # <<<<<<<<<<<<<< * indexer = np.empty(nright, dtype=np.int64) * indexer.fill(-1) */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_new)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 570; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_nright = __pyx_t_1; /* "pandas/src/generated.pyx":571 * nleft = len(old) * nright = len(new) * indexer = np.empty(nright, dtype=np.int64) # <<<<<<<<<<<<<< * indexer.fill(-1) * */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 571; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 571; __pyx_clineno = __LINE__; goto __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_nright); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 571; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 571; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 571; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 571; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_int64); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 571; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 571; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyObject_Call(__pyx_t_3, __pyx_t_4, __pyx_t_2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 571; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 571; __pyx_clineno = __LINE__; goto __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_int64_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_int64_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_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_filename = __pyx_f[2]; __pyx_lineno = 571; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_7 = 0; __pyx_v_indexer = ((PyArrayObject *)__pyx_t_6); __pyx_t_6 = 0; /* "pandas/src/generated.pyx":572 * nright = len(new) * indexer = np.empty(nright, dtype=np.int64) * indexer.fill(-1) # <<<<<<<<<<<<<< * * if limit is None: */ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_indexer), __pyx_n_s_fill); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 572; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_2 = PyObject_Call(__pyx_t_6, __pyx_tuple__45, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 572; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":574 * indexer.fill(-1) * * if limit is None: # <<<<<<<<<<<<<< * lim = nright * else: */ __pyx_t_12 = (__pyx_v_limit == Py_None); __pyx_t_13 = (__pyx_t_12 != 0); if (__pyx_t_13) { /* "pandas/src/generated.pyx":575 * * if limit is None: * lim = nright # <<<<<<<<<<<<<< * else: * if limit < 0: */ __pyx_v_lim = __pyx_v_nright; goto __pyx_L3; } /*else*/ { /* "pandas/src/generated.pyx":577 * lim = nright * else: * if limit < 0: # <<<<<<<<<<<<<< * raise ValueError('Limit must be non-negative') * lim = limit */ __pyx_t_2 = PyObject_RichCompare(__pyx_v_limit, __pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 577; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_13 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 577; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_13) { /* "pandas/src/generated.pyx":578 * else: * if limit < 0: * raise ValueError('Limit must be non-negative') # <<<<<<<<<<<<<< * lim = limit * */ __pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__46, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 578; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 578; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } /* "pandas/src/generated.pyx":579 * if limit < 0: * raise ValueError('Limit must be non-negative') * lim = limit # <<<<<<<<<<<<<< * * if nleft == 0 or nright == 0 or new[nright - 1] < old[0]: */ __pyx_t_8 = __Pyx_PyInt_As_int(__pyx_v_limit); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 579; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_lim = __pyx_t_8; } __pyx_L3:; /* "pandas/src/generated.pyx":581 * lim = limit * * if nleft == 0 or nright == 0 or new[nright - 1] < old[0]: # <<<<<<<<<<<<<< * return indexer * */ __pyx_t_13 = ((__pyx_v_nleft == 0) != 0); if (!__pyx_t_13) { __pyx_t_12 = ((__pyx_v_nright == 0) != 0); if (!__pyx_t_12) { __pyx_t_1 = (__pyx_v_nright - 1); __pyx_t_14 = 0; __pyx_t_15 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_new.rcbuffer->pybuffer.buf, __pyx_t_1, __pyx_pybuffernd_new.diminfo[0].strides)) < (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_old.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_old.diminfo[0].strides))) != 0); __pyx_t_16 = __pyx_t_15; } else { __pyx_t_16 = __pyx_t_12; } __pyx_t_12 = __pyx_t_16; } else { __pyx_t_12 = __pyx_t_13; } if (__pyx_t_12) { /* "pandas/src/generated.pyx":582 * * if nleft == 0 or nright == 0 or new[nright - 1] < old[0]: * return indexer # <<<<<<<<<<<<<< * * i = j = 0 */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_indexer)); __pyx_r = ((PyObject *)__pyx_v_indexer); goto __pyx_L0; } /* "pandas/src/generated.pyx":584 * return indexer * * i = j = 0 # <<<<<<<<<<<<<< * * cur = old[0] */ __pyx_v_i = 0; __pyx_v_j = 0; /* "pandas/src/generated.pyx":586 * i = j = 0 * * cur = old[0] # <<<<<<<<<<<<<< * * while j <= nright - 1 and new[j] < cur: */ __pyx_t_17 = 0; __pyx_v_cur = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_old.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_old.diminfo[0].strides)); /* "pandas/src/generated.pyx":588 * cur = old[0] * * while j <= nright - 1 and new[j] < cur: # <<<<<<<<<<<<<< * j += 1 * */ while (1) { __pyx_t_12 = ((__pyx_v_j <= (__pyx_v_nright - 1)) != 0); if (__pyx_t_12) { __pyx_t_18 = __pyx_v_j; __pyx_t_13 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_new.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_new.diminfo[0].strides)) < __pyx_v_cur) != 0); __pyx_t_16 = __pyx_t_13; } else { __pyx_t_16 = __pyx_t_12; } if (!__pyx_t_16) break; /* "pandas/src/generated.pyx":589 * * while j <= nright - 1 and new[j] < cur: * j += 1 # <<<<<<<<<<<<<< * * while True: */ __pyx_v_j = (__pyx_v_j + 1); } /* "pandas/src/generated.pyx":591 * j += 1 * * while True: # <<<<<<<<<<<<<< * if j == nright: * break */ while (1) { /* "pandas/src/generated.pyx":592 * * while True: * if j == nright: # <<<<<<<<<<<<<< * break * */ __pyx_t_16 = ((__pyx_v_j == __pyx_v_nright) != 0); if (__pyx_t_16) { /* "pandas/src/generated.pyx":593 * while True: * if j == nright: * break # <<<<<<<<<<<<<< * * if i == nleft - 1: */ goto __pyx_L9_break; } /* "pandas/src/generated.pyx":595 * break * * if i == nleft - 1: # <<<<<<<<<<<<<< * while j < nright: * if new[j] == cur: */ __pyx_t_16 = ((__pyx_v_i == (__pyx_v_nleft - 1)) != 0); if (__pyx_t_16) { /* "pandas/src/generated.pyx":596 * * if i == nleft - 1: * while j < nright: # <<<<<<<<<<<<<< * if new[j] == cur: * indexer[j] = i */ while (1) { __pyx_t_16 = ((__pyx_v_j < __pyx_v_nright) != 0); if (!__pyx_t_16) break; /* "pandas/src/generated.pyx":597 * if i == nleft - 1: * while j < nright: * if new[j] == cur: # <<<<<<<<<<<<<< * indexer[j] = i * elif new[j] > cur and fill_count < lim: */ __pyx_t_19 = __pyx_v_j; __pyx_t_16 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_new.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_new.diminfo[0].strides)) == __pyx_v_cur) != 0); if (__pyx_t_16) { /* "pandas/src/generated.pyx":598 * while j < nright: * if new[j] == cur: * indexer[j] = i # <<<<<<<<<<<<<< * elif new[j] > cur and fill_count < lim: * indexer[j] = i */ __pyx_t_20 = __pyx_v_j; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_indexer.diminfo[0].strides) = __pyx_v_i; goto __pyx_L14; } /* "pandas/src/generated.pyx":599 * if new[j] == cur: * indexer[j] = i * elif new[j] > cur and fill_count < lim: # <<<<<<<<<<<<<< * indexer[j] = i * fill_count += 1 */ __pyx_t_21 = __pyx_v_j; __pyx_t_16 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_new.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_new.diminfo[0].strides)) > __pyx_v_cur) != 0); if (__pyx_t_16) { __pyx_t_12 = ((__pyx_v_fill_count < __pyx_v_lim) != 0); __pyx_t_13 = __pyx_t_12; } else { __pyx_t_13 = __pyx_t_16; } if (__pyx_t_13) { /* "pandas/src/generated.pyx":600 * indexer[j] = i * elif new[j] > cur and fill_count < lim: * indexer[j] = i # <<<<<<<<<<<<<< * fill_count += 1 * j += 1 */ __pyx_t_22 = __pyx_v_j; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_22, __pyx_pybuffernd_indexer.diminfo[0].strides) = __pyx_v_i; /* "pandas/src/generated.pyx":601 * elif new[j] > cur and fill_count < lim: * indexer[j] = i * fill_count += 1 # <<<<<<<<<<<<<< * j += 1 * break */ __pyx_v_fill_count = (__pyx_v_fill_count + 1); goto __pyx_L14; } __pyx_L14:; /* "pandas/src/generated.pyx":602 * indexer[j] = i * fill_count += 1 * j += 1 # <<<<<<<<<<<<<< * break * */ __pyx_v_j = (__pyx_v_j + 1); } /* "pandas/src/generated.pyx":603 * fill_count += 1 * j += 1 * break # <<<<<<<<<<<<<< * * next = old[i + 1] */ goto __pyx_L9_break; } /* "pandas/src/generated.pyx":605 * break * * next = old[i + 1] # <<<<<<<<<<<<<< * * while j < nright and cur <= new[j] < next: */ __pyx_t_23 = (__pyx_v_i + 1); __pyx_v_next = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_old.rcbuffer->pybuffer.buf, __pyx_t_23, __pyx_pybuffernd_old.diminfo[0].strides)); /* "pandas/src/generated.pyx":607 * next = old[i + 1] * * while j < nright and cur <= new[j] < next: # <<<<<<<<<<<<<< * if new[j] == cur: * indexer[j] = i */ while (1) { __pyx_t_13 = ((__pyx_v_j < __pyx_v_nright) != 0); if (__pyx_t_13) { __pyx_t_24 = __pyx_v_j; __pyx_t_25 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_new.rcbuffer->pybuffer.buf, __pyx_t_24, __pyx_pybuffernd_new.diminfo[0].strides)); __pyx_t_16 = (__pyx_v_cur <= __pyx_t_25); if (__pyx_t_16) { __pyx_t_16 = (__pyx_t_25 < __pyx_v_next); } __pyx_t_12 = (__pyx_t_16 != 0); } else { __pyx_t_12 = __pyx_t_13; } if (!__pyx_t_12) break; /* "pandas/src/generated.pyx":608 * * while j < nright and cur <= new[j] < next: * if new[j] == cur: # <<<<<<<<<<<<<< * indexer[j] = i * elif fill_count < lim: */ __pyx_t_26 = __pyx_v_j; __pyx_t_12 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_new.rcbuffer->pybuffer.buf, __pyx_t_26, __pyx_pybuffernd_new.diminfo[0].strides)) == __pyx_v_cur) != 0); if (__pyx_t_12) { /* "pandas/src/generated.pyx":609 * while j < nright and cur <= new[j] < next: * if new[j] == cur: * indexer[j] = i # <<<<<<<<<<<<<< * elif fill_count < lim: * indexer[j] = i */ __pyx_t_27 = __pyx_v_j; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_27, __pyx_pybuffernd_indexer.diminfo[0].strides) = __pyx_v_i; goto __pyx_L17; } /* "pandas/src/generated.pyx":610 * if new[j] == cur: * indexer[j] = i * elif fill_count < lim: # <<<<<<<<<<<<<< * indexer[j] = i * fill_count += 1 */ __pyx_t_12 = ((__pyx_v_fill_count < __pyx_v_lim) != 0); if (__pyx_t_12) { /* "pandas/src/generated.pyx":611 * indexer[j] = i * elif fill_count < lim: * indexer[j] = i # <<<<<<<<<<<<<< * fill_count += 1 * j += 1 */ __pyx_t_28 = __pyx_v_j; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_28, __pyx_pybuffernd_indexer.diminfo[0].strides) = __pyx_v_i; /* "pandas/src/generated.pyx":612 * elif fill_count < lim: * indexer[j] = i * fill_count += 1 # <<<<<<<<<<<<<< * j += 1 * */ __pyx_v_fill_count = (__pyx_v_fill_count + 1); goto __pyx_L17; } __pyx_L17:; /* "pandas/src/generated.pyx":613 * indexer[j] = i * fill_count += 1 * j += 1 # <<<<<<<<<<<<<< * * fill_count = 0 */ __pyx_v_j = (__pyx_v_j + 1); } /* "pandas/src/generated.pyx":615 * j += 1 * * fill_count = 0 # <<<<<<<<<<<<<< * i += 1 * cur = next */ __pyx_v_fill_count = 0; /* "pandas/src/generated.pyx":616 * * fill_count = 0 * i += 1 # <<<<<<<<<<<<<< * cur = next * */ __pyx_v_i = (__pyx_v_i + 1); /* "pandas/src/generated.pyx":617 * fill_count = 0 * i += 1 * cur = next # <<<<<<<<<<<<<< * * return indexer */ __pyx_v_cur = __pyx_v_next; } __pyx_L9_break:; /* "pandas/src/generated.pyx":619 * cur = next * * return indexer # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_indexer)); __pyx_r = ((PyObject *)__pyx_v_indexer); goto __pyx_L0; /* "pandas/src/generated.pyx":562 * @cython.boundscheck(False) * @cython.wraparound(False) * def pad_bool(ndarray[uint8_t] old, ndarray[uint8_t] new, # <<<<<<<<<<<<<< * limit=None): * cdef Py_ssize_t i, j, nleft, nright */ /* 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_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_new.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_old.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.pad_bool", __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_new.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_old.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_indexer); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":624 * @cython.boundscheck(False) * @cython.wraparound(False) * def backfill_float64(ndarray[float64_t] old, ndarray[float64_t] new, # <<<<<<<<<<<<<< * limit=None): * cdef Py_ssize_t i, j, nleft, nright */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_127backfill_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_127backfill_float64 = {__Pyx_NAMESTR("backfill_float64"), (PyCFunction)__pyx_pw_6pandas_5algos_127backfill_float64, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_127backfill_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_old = 0; PyArrayObject *__pyx_v_new = 0; PyObject *__pyx_v_limit = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("backfill_float64 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_old,&__pyx_n_s_new,&__pyx_n_s_limit,0}; PyObject* values[3] = {0,0,0}; /* "pandas/src/generated.pyx":625 * @cython.wraparound(False) * def backfill_float64(ndarray[float64_t] old, ndarray[float64_t] new, * limit=None): # <<<<<<<<<<<<<< * cdef Py_ssize_t i, j, nleft, nright * cdef ndarray[int64_t, ndim=1] indexer */ values[2] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_old)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_new)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("backfill_float64", 0, 2, 3, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 624; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_limit); if (value) { values[2] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "backfill_float64") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 624; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_old = ((PyArrayObject *)values[0]); __pyx_v_new = ((PyArrayObject *)values[1]); __pyx_v_limit = values[2]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("backfill_float64", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 624; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.backfill_float64", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_old), __pyx_ptype_5numpy_ndarray, 1, "old", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 624; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_new), __pyx_ptype_5numpy_ndarray, 1, "new", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 624; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_126backfill_float64(__pyx_self, __pyx_v_old, __pyx_v_new, __pyx_v_limit); /* "pandas/src/generated.pyx":624 * @cython.boundscheck(False) * @cython.wraparound(False) * def backfill_float64(ndarray[float64_t] old, ndarray[float64_t] new, # <<<<<<<<<<<<<< * limit=None): * cdef Py_ssize_t i, j, nleft, nright */ /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5algos_126backfill_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_old, PyArrayObject *__pyx_v_new, PyObject *__pyx_v_limit) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_nleft; Py_ssize_t __pyx_v_nright; PyArrayObject *__pyx_v_indexer = 0; __pyx_t_5numpy_float64_t __pyx_v_cur; __pyx_t_5numpy_float64_t __pyx_v_prev; int __pyx_v_lim; int __pyx_v_fill_count; __Pyx_LocalBuf_ND __pyx_pybuffernd_indexer; __Pyx_Buffer __pyx_pybuffer_indexer; __Pyx_LocalBuf_ND __pyx_pybuffernd_new; __Pyx_Buffer __pyx_pybuffer_new; __Pyx_LocalBuf_ND __pyx_pybuffernd_old; __Pyx_Buffer __pyx_pybuffer_old; 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; int __pyx_t_12; int __pyx_t_13; long __pyx_t_14; 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; __pyx_t_5numpy_float64_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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("backfill_float64", 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_old.pybuffer.buf = NULL; __pyx_pybuffer_old.refcount = 0; __pyx_pybuffernd_old.data = NULL; __pyx_pybuffernd_old.rcbuffer = &__pyx_pybuffer_old; __pyx_pybuffer_new.pybuffer.buf = NULL; __pyx_pybuffer_new.refcount = 0; __pyx_pybuffernd_new.data = NULL; __pyx_pybuffernd_new.rcbuffer = &__pyx_pybuffer_new; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_old.rcbuffer->pybuffer, (PyObject*)__pyx_v_old, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 624; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_old.diminfo[0].strides = __pyx_pybuffernd_old.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_old.diminfo[0].shape = __pyx_pybuffernd_old.rcbuffer->pybuffer.shape[0]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_new.rcbuffer->pybuffer, (PyObject*)__pyx_v_new, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 624; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_new.diminfo[0].strides = __pyx_pybuffernd_new.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_new.diminfo[0].shape = __pyx_pybuffernd_new.rcbuffer->pybuffer.shape[0]; /* "pandas/src/generated.pyx":629 * cdef ndarray[int64_t, ndim=1] indexer * cdef float64_t cur, prev * cdef int lim, fill_count = 0 # <<<<<<<<<<<<<< * * nleft = len(old) */ __pyx_v_fill_count = 0; /* "pandas/src/generated.pyx":631 * cdef int lim, fill_count = 0 * * nleft = len(old) # <<<<<<<<<<<<<< * nright = len(new) * indexer = np.empty(nright, dtype=np.int64) */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_old)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 631; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_nleft = __pyx_t_1; /* "pandas/src/generated.pyx":632 * * nleft = len(old) * nright = len(new) # <<<<<<<<<<<<<< * indexer = np.empty(nright, dtype=np.int64) * indexer.fill(-1) */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_new)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 632; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_nright = __pyx_t_1; /* "pandas/src/generated.pyx":633 * nleft = len(old) * nright = len(new) * indexer = np.empty(nright, dtype=np.int64) # <<<<<<<<<<<<<< * indexer.fill(-1) * */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 633; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 633; __pyx_clineno = __LINE__; goto __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_nright); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 633; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 633; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 633; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 633; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_int64); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 633; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 633; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyObject_Call(__pyx_t_3, __pyx_t_4, __pyx_t_2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 633; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 633; __pyx_clineno = __LINE__; goto __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_int64_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_int64_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_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_filename = __pyx_f[2]; __pyx_lineno = 633; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_7 = 0; __pyx_v_indexer = ((PyArrayObject *)__pyx_t_6); __pyx_t_6 = 0; /* "pandas/src/generated.pyx":634 * nright = len(new) * indexer = np.empty(nright, dtype=np.int64) * indexer.fill(-1) # <<<<<<<<<<<<<< * * if limit is None: */ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_indexer), __pyx_n_s_fill); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 634; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_2 = PyObject_Call(__pyx_t_6, __pyx_tuple__47, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 634; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":636 * indexer.fill(-1) * * if limit is None: # <<<<<<<<<<<<<< * lim = nright * else: */ __pyx_t_12 = (__pyx_v_limit == Py_None); __pyx_t_13 = (__pyx_t_12 != 0); if (__pyx_t_13) { /* "pandas/src/generated.pyx":637 * * if limit is None: * lim = nright # <<<<<<<<<<<<<< * else: * if limit < 0: */ __pyx_v_lim = __pyx_v_nright; goto __pyx_L3; } /*else*/ { /* "pandas/src/generated.pyx":639 * lim = nright * else: * if limit < 0: # <<<<<<<<<<<<<< * raise ValueError('Limit must be non-negative') * lim = limit */ __pyx_t_2 = PyObject_RichCompare(__pyx_v_limit, __pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 639; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_13 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 639; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_13) { /* "pandas/src/generated.pyx":640 * else: * if limit < 0: * raise ValueError('Limit must be non-negative') # <<<<<<<<<<<<<< * lim = limit * */ __pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__48, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 640; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 640; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } /* "pandas/src/generated.pyx":641 * if limit < 0: * raise ValueError('Limit must be non-negative') * lim = limit # <<<<<<<<<<<<<< * * if nleft == 0 or nright == 0 or new[0] > old[nleft - 1]: */ __pyx_t_8 = __Pyx_PyInt_As_int(__pyx_v_limit); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 641; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_lim = __pyx_t_8; } __pyx_L3:; /* "pandas/src/generated.pyx":643 * lim = limit * * if nleft == 0 or nright == 0 or new[0] > old[nleft - 1]: # <<<<<<<<<<<<<< * return indexer * */ __pyx_t_13 = ((__pyx_v_nleft == 0) != 0); if (!__pyx_t_13) { __pyx_t_12 = ((__pyx_v_nright == 0) != 0); if (!__pyx_t_12) { __pyx_t_14 = 0; __pyx_t_1 = (__pyx_v_nleft - 1); __pyx_t_15 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_new.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_new.diminfo[0].strides)) > (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_old.rcbuffer->pybuffer.buf, __pyx_t_1, __pyx_pybuffernd_old.diminfo[0].strides))) != 0); __pyx_t_16 = __pyx_t_15; } else { __pyx_t_16 = __pyx_t_12; } __pyx_t_12 = __pyx_t_16; } else { __pyx_t_12 = __pyx_t_13; } if (__pyx_t_12) { /* "pandas/src/generated.pyx":644 * * if nleft == 0 or nright == 0 or new[0] > old[nleft - 1]: * return indexer # <<<<<<<<<<<<<< * * i = nleft - 1 */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_indexer)); __pyx_r = ((PyObject *)__pyx_v_indexer); goto __pyx_L0; } /* "pandas/src/generated.pyx":646 * return indexer * * i = nleft - 1 # <<<<<<<<<<<<<< * j = nright - 1 * */ __pyx_v_i = (__pyx_v_nleft - 1); /* "pandas/src/generated.pyx":647 * * i = nleft - 1 * j = nright - 1 # <<<<<<<<<<<<<< * * cur = old[nleft - 1] */ __pyx_v_j = (__pyx_v_nright - 1); /* "pandas/src/generated.pyx":649 * j = nright - 1 * * cur = old[nleft - 1] # <<<<<<<<<<<<<< * * while j >= 0 and new[j] > cur: */ __pyx_t_17 = (__pyx_v_nleft - 1); __pyx_v_cur = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_old.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_old.diminfo[0].strides)); /* "pandas/src/generated.pyx":651 * cur = old[nleft - 1] * * while j >= 0 and new[j] > cur: # <<<<<<<<<<<<<< * j -= 1 * */ while (1) { __pyx_t_12 = ((__pyx_v_j >= 0) != 0); if (__pyx_t_12) { __pyx_t_18 = __pyx_v_j; __pyx_t_13 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_new.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_new.diminfo[0].strides)) > __pyx_v_cur) != 0); __pyx_t_16 = __pyx_t_13; } else { __pyx_t_16 = __pyx_t_12; } if (!__pyx_t_16) break; /* "pandas/src/generated.pyx":652 * * while j >= 0 and new[j] > cur: * j -= 1 # <<<<<<<<<<<<<< * * while True: */ __pyx_v_j = (__pyx_v_j - 1); } /* "pandas/src/generated.pyx":654 * j -= 1 * * while True: # <<<<<<<<<<<<<< * if j < 0: * break */ while (1) { /* "pandas/src/generated.pyx":655 * * while True: * if j < 0: # <<<<<<<<<<<<<< * break * */ __pyx_t_16 = ((__pyx_v_j < 0) != 0); if (__pyx_t_16) { /* "pandas/src/generated.pyx":656 * while True: * if j < 0: * break # <<<<<<<<<<<<<< * * if i == 0: */ goto __pyx_L9_break; } /* "pandas/src/generated.pyx":658 * break * * if i == 0: # <<<<<<<<<<<<<< * while j >= 0: * if new[j] == cur: */ __pyx_t_16 = ((__pyx_v_i == 0) != 0); if (__pyx_t_16) { /* "pandas/src/generated.pyx":659 * * if i == 0: * while j >= 0: # <<<<<<<<<<<<<< * if new[j] == cur: * indexer[j] = i */ while (1) { __pyx_t_16 = ((__pyx_v_j >= 0) != 0); if (!__pyx_t_16) break; /* "pandas/src/generated.pyx":660 * if i == 0: * while j >= 0: * if new[j] == cur: # <<<<<<<<<<<<<< * indexer[j] = i * elif new[j] < cur and fill_count < lim: */ __pyx_t_19 = __pyx_v_j; __pyx_t_16 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_new.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_new.diminfo[0].strides)) == __pyx_v_cur) != 0); if (__pyx_t_16) { /* "pandas/src/generated.pyx":661 * while j >= 0: * if new[j] == cur: * indexer[j] = i # <<<<<<<<<<<<<< * elif new[j] < cur and fill_count < lim: * indexer[j] = i */ __pyx_t_20 = __pyx_v_j; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_indexer.diminfo[0].strides) = __pyx_v_i; goto __pyx_L14; } /* "pandas/src/generated.pyx":662 * if new[j] == cur: * indexer[j] = i * elif new[j] < cur and fill_count < lim: # <<<<<<<<<<<<<< * indexer[j] = i * fill_count += 1 */ __pyx_t_21 = __pyx_v_j; __pyx_t_16 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_new.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_new.diminfo[0].strides)) < __pyx_v_cur) != 0); if (__pyx_t_16) { __pyx_t_12 = ((__pyx_v_fill_count < __pyx_v_lim) != 0); __pyx_t_13 = __pyx_t_12; } else { __pyx_t_13 = __pyx_t_16; } if (__pyx_t_13) { /* "pandas/src/generated.pyx":663 * indexer[j] = i * elif new[j] < cur and fill_count < lim: * indexer[j] = i # <<<<<<<<<<<<<< * fill_count += 1 * j -= 1 */ __pyx_t_22 = __pyx_v_j; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_22, __pyx_pybuffernd_indexer.diminfo[0].strides) = __pyx_v_i; /* "pandas/src/generated.pyx":664 * elif new[j] < cur and fill_count < lim: * indexer[j] = i * fill_count += 1 # <<<<<<<<<<<<<< * j -= 1 * break */ __pyx_v_fill_count = (__pyx_v_fill_count + 1); goto __pyx_L14; } __pyx_L14:; /* "pandas/src/generated.pyx":665 * indexer[j] = i * fill_count += 1 * j -= 1 # <<<<<<<<<<<<<< * break * */ __pyx_v_j = (__pyx_v_j - 1); } /* "pandas/src/generated.pyx":666 * fill_count += 1 * j -= 1 * break # <<<<<<<<<<<<<< * * prev = old[i - 1] */ goto __pyx_L9_break; } /* "pandas/src/generated.pyx":668 * break * * prev = old[i - 1] # <<<<<<<<<<<<<< * * while j >= 0 and prev < new[j] <= cur: */ __pyx_t_23 = (__pyx_v_i - 1); __pyx_v_prev = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_old.rcbuffer->pybuffer.buf, __pyx_t_23, __pyx_pybuffernd_old.diminfo[0].strides)); /* "pandas/src/generated.pyx":670 * prev = old[i - 1] * * while j >= 0 and prev < new[j] <= cur: # <<<<<<<<<<<<<< * if new[j] == cur: * indexer[j] = i */ while (1) { __pyx_t_13 = ((__pyx_v_j >= 0) != 0); if (__pyx_t_13) { __pyx_t_24 = __pyx_v_j; __pyx_t_25 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_new.rcbuffer->pybuffer.buf, __pyx_t_24, __pyx_pybuffernd_new.diminfo[0].strides)); __pyx_t_16 = (__pyx_v_prev < __pyx_t_25); if (__pyx_t_16) { __pyx_t_16 = (__pyx_t_25 <= __pyx_v_cur); } __pyx_t_12 = (__pyx_t_16 != 0); } else { __pyx_t_12 = __pyx_t_13; } if (!__pyx_t_12) break; /* "pandas/src/generated.pyx":671 * * while j >= 0 and prev < new[j] <= cur: * if new[j] == cur: # <<<<<<<<<<<<<< * indexer[j] = i * elif new[j] < cur and fill_count < lim: */ __pyx_t_26 = __pyx_v_j; __pyx_t_12 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_new.rcbuffer->pybuffer.buf, __pyx_t_26, __pyx_pybuffernd_new.diminfo[0].strides)) == __pyx_v_cur) != 0); if (__pyx_t_12) { /* "pandas/src/generated.pyx":672 * while j >= 0 and prev < new[j] <= cur: * if new[j] == cur: * indexer[j] = i # <<<<<<<<<<<<<< * elif new[j] < cur and fill_count < lim: * indexer[j] = i */ __pyx_t_27 = __pyx_v_j; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_27, __pyx_pybuffernd_indexer.diminfo[0].strides) = __pyx_v_i; goto __pyx_L17; } /* "pandas/src/generated.pyx":673 * if new[j] == cur: * indexer[j] = i * elif new[j] < cur and fill_count < lim: # <<<<<<<<<<<<<< * indexer[j] = i * fill_count += 1 */ __pyx_t_28 = __pyx_v_j; __pyx_t_12 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_new.rcbuffer->pybuffer.buf, __pyx_t_28, __pyx_pybuffernd_new.diminfo[0].strides)) < __pyx_v_cur) != 0); if (__pyx_t_12) { __pyx_t_13 = ((__pyx_v_fill_count < __pyx_v_lim) != 0); __pyx_t_16 = __pyx_t_13; } else { __pyx_t_16 = __pyx_t_12; } if (__pyx_t_16) { /* "pandas/src/generated.pyx":674 * indexer[j] = i * elif new[j] < cur and fill_count < lim: * indexer[j] = i # <<<<<<<<<<<<<< * fill_count += 1 * j -= 1 */ __pyx_t_29 = __pyx_v_j; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_29, __pyx_pybuffernd_indexer.diminfo[0].strides) = __pyx_v_i; /* "pandas/src/generated.pyx":675 * elif new[j] < cur and fill_count < lim: * indexer[j] = i * fill_count += 1 # <<<<<<<<<<<<<< * j -= 1 * */ __pyx_v_fill_count = (__pyx_v_fill_count + 1); goto __pyx_L17; } __pyx_L17:; /* "pandas/src/generated.pyx":676 * indexer[j] = i * fill_count += 1 * j -= 1 # <<<<<<<<<<<<<< * * fill_count = 0 */ __pyx_v_j = (__pyx_v_j - 1); } /* "pandas/src/generated.pyx":678 * j -= 1 * * fill_count = 0 # <<<<<<<<<<<<<< * i -= 1 * cur = prev */ __pyx_v_fill_count = 0; /* "pandas/src/generated.pyx":679 * * fill_count = 0 * i -= 1 # <<<<<<<<<<<<<< * cur = prev * */ __pyx_v_i = (__pyx_v_i - 1); /* "pandas/src/generated.pyx":680 * fill_count = 0 * i -= 1 * cur = prev # <<<<<<<<<<<<<< * * return indexer */ __pyx_v_cur = __pyx_v_prev; } __pyx_L9_break:; /* "pandas/src/generated.pyx":682 * cur = prev * * return indexer # <<<<<<<<<<<<<< * * @cython.boundscheck(False) */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_indexer)); __pyx_r = ((PyObject *)__pyx_v_indexer); goto __pyx_L0; /* "pandas/src/generated.pyx":624 * @cython.boundscheck(False) * @cython.wraparound(False) * def backfill_float64(ndarray[float64_t] old, ndarray[float64_t] new, # <<<<<<<<<<<<<< * limit=None): * cdef Py_ssize_t i, j, nleft, nright */ /* 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_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_new.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_old.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.backfill_float64", __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_new.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_old.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_indexer); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":686 * @cython.boundscheck(False) * @cython.wraparound(False) * def backfill_float32(ndarray[float32_t] old, ndarray[float32_t] new, # <<<<<<<<<<<<<< * limit=None): * cdef Py_ssize_t i, j, nleft, nright */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_129backfill_float32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_129backfill_float32 = {__Pyx_NAMESTR("backfill_float32"), (PyCFunction)__pyx_pw_6pandas_5algos_129backfill_float32, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_129backfill_float32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_old = 0; PyArrayObject *__pyx_v_new = 0; PyObject *__pyx_v_limit = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("backfill_float32 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_old,&__pyx_n_s_new,&__pyx_n_s_limit,0}; PyObject* values[3] = {0,0,0}; /* "pandas/src/generated.pyx":687 * @cython.wraparound(False) * def backfill_float32(ndarray[float32_t] old, ndarray[float32_t] new, * limit=None): # <<<<<<<<<<<<<< * cdef Py_ssize_t i, j, nleft, nright * cdef ndarray[int64_t, ndim=1] indexer */ values[2] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_old)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_new)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("backfill_float32", 0, 2, 3, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 686; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_limit); if (value) { values[2] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "backfill_float32") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 686; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_old = ((PyArrayObject *)values[0]); __pyx_v_new = ((PyArrayObject *)values[1]); __pyx_v_limit = values[2]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("backfill_float32", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 686; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.backfill_float32", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_old), __pyx_ptype_5numpy_ndarray, 1, "old", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 686; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_new), __pyx_ptype_5numpy_ndarray, 1, "new", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 686; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_128backfill_float32(__pyx_self, __pyx_v_old, __pyx_v_new, __pyx_v_limit); /* "pandas/src/generated.pyx":686 * @cython.boundscheck(False) * @cython.wraparound(False) * def backfill_float32(ndarray[float32_t] old, ndarray[float32_t] new, # <<<<<<<<<<<<<< * limit=None): * cdef Py_ssize_t i, j, nleft, nright */ /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5algos_128backfill_float32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_old, PyArrayObject *__pyx_v_new, PyObject *__pyx_v_limit) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_nleft; Py_ssize_t __pyx_v_nright; PyArrayObject *__pyx_v_indexer = 0; __pyx_t_5numpy_float32_t __pyx_v_cur; __pyx_t_5numpy_float32_t __pyx_v_prev; int __pyx_v_lim; int __pyx_v_fill_count; __Pyx_LocalBuf_ND __pyx_pybuffernd_indexer; __Pyx_Buffer __pyx_pybuffer_indexer; __Pyx_LocalBuf_ND __pyx_pybuffernd_new; __Pyx_Buffer __pyx_pybuffer_new; __Pyx_LocalBuf_ND __pyx_pybuffernd_old; __Pyx_Buffer __pyx_pybuffer_old; 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; int __pyx_t_12; int __pyx_t_13; long __pyx_t_14; 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; __pyx_t_5numpy_float32_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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("backfill_float32", 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_old.pybuffer.buf = NULL; __pyx_pybuffer_old.refcount = 0; __pyx_pybuffernd_old.data = NULL; __pyx_pybuffernd_old.rcbuffer = &__pyx_pybuffer_old; __pyx_pybuffer_new.pybuffer.buf = NULL; __pyx_pybuffer_new.refcount = 0; __pyx_pybuffernd_new.data = NULL; __pyx_pybuffernd_new.rcbuffer = &__pyx_pybuffer_new; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_old.rcbuffer->pybuffer, (PyObject*)__pyx_v_old, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 686; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_old.diminfo[0].strides = __pyx_pybuffernd_old.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_old.diminfo[0].shape = __pyx_pybuffernd_old.rcbuffer->pybuffer.shape[0]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_new.rcbuffer->pybuffer, (PyObject*)__pyx_v_new, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 686; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_new.diminfo[0].strides = __pyx_pybuffernd_new.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_new.diminfo[0].shape = __pyx_pybuffernd_new.rcbuffer->pybuffer.shape[0]; /* "pandas/src/generated.pyx":691 * cdef ndarray[int64_t, ndim=1] indexer * cdef float32_t cur, prev * cdef int lim, fill_count = 0 # <<<<<<<<<<<<<< * * nleft = len(old) */ __pyx_v_fill_count = 0; /* "pandas/src/generated.pyx":693 * cdef int lim, fill_count = 0 * * nleft = len(old) # <<<<<<<<<<<<<< * nright = len(new) * indexer = np.empty(nright, dtype=np.int64) */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_old)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 693; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_nleft = __pyx_t_1; /* "pandas/src/generated.pyx":694 * * nleft = len(old) * nright = len(new) # <<<<<<<<<<<<<< * indexer = np.empty(nright, dtype=np.int64) * indexer.fill(-1) */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_new)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 694; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_nright = __pyx_t_1; /* "pandas/src/generated.pyx":695 * nleft = len(old) * nright = len(new) * indexer = np.empty(nright, dtype=np.int64) # <<<<<<<<<<<<<< * indexer.fill(-1) * */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 695; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 695; __pyx_clineno = __LINE__; goto __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_nright); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 695; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 695; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 695; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 695; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_int64); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 695; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 695; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyObject_Call(__pyx_t_3, __pyx_t_4, __pyx_t_2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 695; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 695; __pyx_clineno = __LINE__; goto __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_int64_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_int64_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_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_filename = __pyx_f[2]; __pyx_lineno = 695; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_7 = 0; __pyx_v_indexer = ((PyArrayObject *)__pyx_t_6); __pyx_t_6 = 0; /* "pandas/src/generated.pyx":696 * nright = len(new) * indexer = np.empty(nright, dtype=np.int64) * indexer.fill(-1) # <<<<<<<<<<<<<< * * if limit is None: */ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_indexer), __pyx_n_s_fill); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 696; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_2 = PyObject_Call(__pyx_t_6, __pyx_tuple__49, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 696; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":698 * indexer.fill(-1) * * if limit is None: # <<<<<<<<<<<<<< * lim = nright * else: */ __pyx_t_12 = (__pyx_v_limit == Py_None); __pyx_t_13 = (__pyx_t_12 != 0); if (__pyx_t_13) { /* "pandas/src/generated.pyx":699 * * if limit is None: * lim = nright # <<<<<<<<<<<<<< * else: * if limit < 0: */ __pyx_v_lim = __pyx_v_nright; goto __pyx_L3; } /*else*/ { /* "pandas/src/generated.pyx":701 * lim = nright * else: * if limit < 0: # <<<<<<<<<<<<<< * raise ValueError('Limit must be non-negative') * lim = limit */ __pyx_t_2 = PyObject_RichCompare(__pyx_v_limit, __pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 701; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_13 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 701; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_13) { /* "pandas/src/generated.pyx":702 * else: * if limit < 0: * raise ValueError('Limit must be non-negative') # <<<<<<<<<<<<<< * lim = limit * */ __pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__50, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 702; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 702; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } /* "pandas/src/generated.pyx":703 * if limit < 0: * raise ValueError('Limit must be non-negative') * lim = limit # <<<<<<<<<<<<<< * * if nleft == 0 or nright == 0 or new[0] > old[nleft - 1]: */ __pyx_t_8 = __Pyx_PyInt_As_int(__pyx_v_limit); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 703; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_lim = __pyx_t_8; } __pyx_L3:; /* "pandas/src/generated.pyx":705 * lim = limit * * if nleft == 0 or nright == 0 or new[0] > old[nleft - 1]: # <<<<<<<<<<<<<< * return indexer * */ __pyx_t_13 = ((__pyx_v_nleft == 0) != 0); if (!__pyx_t_13) { __pyx_t_12 = ((__pyx_v_nright == 0) != 0); if (!__pyx_t_12) { __pyx_t_14 = 0; __pyx_t_1 = (__pyx_v_nleft - 1); __pyx_t_15 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_new.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_new.diminfo[0].strides)) > (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_old.rcbuffer->pybuffer.buf, __pyx_t_1, __pyx_pybuffernd_old.diminfo[0].strides))) != 0); __pyx_t_16 = __pyx_t_15; } else { __pyx_t_16 = __pyx_t_12; } __pyx_t_12 = __pyx_t_16; } else { __pyx_t_12 = __pyx_t_13; } if (__pyx_t_12) { /* "pandas/src/generated.pyx":706 * * if nleft == 0 or nright == 0 or new[0] > old[nleft - 1]: * return indexer # <<<<<<<<<<<<<< * * i = nleft - 1 */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_indexer)); __pyx_r = ((PyObject *)__pyx_v_indexer); goto __pyx_L0; } /* "pandas/src/generated.pyx":708 * return indexer * * i = nleft - 1 # <<<<<<<<<<<<<< * j = nright - 1 * */ __pyx_v_i = (__pyx_v_nleft - 1); /* "pandas/src/generated.pyx":709 * * i = nleft - 1 * j = nright - 1 # <<<<<<<<<<<<<< * * cur = old[nleft - 1] */ __pyx_v_j = (__pyx_v_nright - 1); /* "pandas/src/generated.pyx":711 * j = nright - 1 * * cur = old[nleft - 1] # <<<<<<<<<<<<<< * * while j >= 0 and new[j] > cur: */ __pyx_t_17 = (__pyx_v_nleft - 1); __pyx_v_cur = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_old.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_old.diminfo[0].strides)); /* "pandas/src/generated.pyx":713 * cur = old[nleft - 1] * * while j >= 0 and new[j] > cur: # <<<<<<<<<<<<<< * j -= 1 * */ while (1) { __pyx_t_12 = ((__pyx_v_j >= 0) != 0); if (__pyx_t_12) { __pyx_t_18 = __pyx_v_j; __pyx_t_13 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_new.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_new.diminfo[0].strides)) > __pyx_v_cur) != 0); __pyx_t_16 = __pyx_t_13; } else { __pyx_t_16 = __pyx_t_12; } if (!__pyx_t_16) break; /* "pandas/src/generated.pyx":714 * * while j >= 0 and new[j] > cur: * j -= 1 # <<<<<<<<<<<<<< * * while True: */ __pyx_v_j = (__pyx_v_j - 1); } /* "pandas/src/generated.pyx":716 * j -= 1 * * while True: # <<<<<<<<<<<<<< * if j < 0: * break */ while (1) { /* "pandas/src/generated.pyx":717 * * while True: * if j < 0: # <<<<<<<<<<<<<< * break * */ __pyx_t_16 = ((__pyx_v_j < 0) != 0); if (__pyx_t_16) { /* "pandas/src/generated.pyx":718 * while True: * if j < 0: * break # <<<<<<<<<<<<<< * * if i == 0: */ goto __pyx_L9_break; } /* "pandas/src/generated.pyx":720 * break * * if i == 0: # <<<<<<<<<<<<<< * while j >= 0: * if new[j] == cur: */ __pyx_t_16 = ((__pyx_v_i == 0) != 0); if (__pyx_t_16) { /* "pandas/src/generated.pyx":721 * * if i == 0: * while j >= 0: # <<<<<<<<<<<<<< * if new[j] == cur: * indexer[j] = i */ while (1) { __pyx_t_16 = ((__pyx_v_j >= 0) != 0); if (!__pyx_t_16) break; /* "pandas/src/generated.pyx":722 * if i == 0: * while j >= 0: * if new[j] == cur: # <<<<<<<<<<<<<< * indexer[j] = i * elif new[j] < cur and fill_count < lim: */ __pyx_t_19 = __pyx_v_j; __pyx_t_16 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_new.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_new.diminfo[0].strides)) == __pyx_v_cur) != 0); if (__pyx_t_16) { /* "pandas/src/generated.pyx":723 * while j >= 0: * if new[j] == cur: * indexer[j] = i # <<<<<<<<<<<<<< * elif new[j] < cur and fill_count < lim: * indexer[j] = i */ __pyx_t_20 = __pyx_v_j; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_indexer.diminfo[0].strides) = __pyx_v_i; goto __pyx_L14; } /* "pandas/src/generated.pyx":724 * if new[j] == cur: * indexer[j] = i * elif new[j] < cur and fill_count < lim: # <<<<<<<<<<<<<< * indexer[j] = i * fill_count += 1 */ __pyx_t_21 = __pyx_v_j; __pyx_t_16 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_new.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_new.diminfo[0].strides)) < __pyx_v_cur) != 0); if (__pyx_t_16) { __pyx_t_12 = ((__pyx_v_fill_count < __pyx_v_lim) != 0); __pyx_t_13 = __pyx_t_12; } else { __pyx_t_13 = __pyx_t_16; } if (__pyx_t_13) { /* "pandas/src/generated.pyx":725 * indexer[j] = i * elif new[j] < cur and fill_count < lim: * indexer[j] = i # <<<<<<<<<<<<<< * fill_count += 1 * j -= 1 */ __pyx_t_22 = __pyx_v_j; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_22, __pyx_pybuffernd_indexer.diminfo[0].strides) = __pyx_v_i; /* "pandas/src/generated.pyx":726 * elif new[j] < cur and fill_count < lim: * indexer[j] = i * fill_count += 1 # <<<<<<<<<<<<<< * j -= 1 * break */ __pyx_v_fill_count = (__pyx_v_fill_count + 1); goto __pyx_L14; } __pyx_L14:; /* "pandas/src/generated.pyx":727 * indexer[j] = i * fill_count += 1 * j -= 1 # <<<<<<<<<<<<<< * break * */ __pyx_v_j = (__pyx_v_j - 1); } /* "pandas/src/generated.pyx":728 * fill_count += 1 * j -= 1 * break # <<<<<<<<<<<<<< * * prev = old[i - 1] */ goto __pyx_L9_break; } /* "pandas/src/generated.pyx":730 * break * * prev = old[i - 1] # <<<<<<<<<<<<<< * * while j >= 0 and prev < new[j] <= cur: */ __pyx_t_23 = (__pyx_v_i - 1); __pyx_v_prev = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_old.rcbuffer->pybuffer.buf, __pyx_t_23, __pyx_pybuffernd_old.diminfo[0].strides)); /* "pandas/src/generated.pyx":732 * prev = old[i - 1] * * while j >= 0 and prev < new[j] <= cur: # <<<<<<<<<<<<<< * if new[j] == cur: * indexer[j] = i */ while (1) { __pyx_t_13 = ((__pyx_v_j >= 0) != 0); if (__pyx_t_13) { __pyx_t_24 = __pyx_v_j; __pyx_t_25 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_new.rcbuffer->pybuffer.buf, __pyx_t_24, __pyx_pybuffernd_new.diminfo[0].strides)); __pyx_t_16 = (__pyx_v_prev < __pyx_t_25); if (__pyx_t_16) { __pyx_t_16 = (__pyx_t_25 <= __pyx_v_cur); } __pyx_t_12 = (__pyx_t_16 != 0); } else { __pyx_t_12 = __pyx_t_13; } if (!__pyx_t_12) break; /* "pandas/src/generated.pyx":733 * * while j >= 0 and prev < new[j] <= cur: * if new[j] == cur: # <<<<<<<<<<<<<< * indexer[j] = i * elif new[j] < cur and fill_count < lim: */ __pyx_t_26 = __pyx_v_j; __pyx_t_12 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_new.rcbuffer->pybuffer.buf, __pyx_t_26, __pyx_pybuffernd_new.diminfo[0].strides)) == __pyx_v_cur) != 0); if (__pyx_t_12) { /* "pandas/src/generated.pyx":734 * while j >= 0 and prev < new[j] <= cur: * if new[j] == cur: * indexer[j] = i # <<<<<<<<<<<<<< * elif new[j] < cur and fill_count < lim: * indexer[j] = i */ __pyx_t_27 = __pyx_v_j; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_27, __pyx_pybuffernd_indexer.diminfo[0].strides) = __pyx_v_i; goto __pyx_L17; } /* "pandas/src/generated.pyx":735 * if new[j] == cur: * indexer[j] = i * elif new[j] < cur and fill_count < lim: # <<<<<<<<<<<<<< * indexer[j] = i * fill_count += 1 */ __pyx_t_28 = __pyx_v_j; __pyx_t_12 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_new.rcbuffer->pybuffer.buf, __pyx_t_28, __pyx_pybuffernd_new.diminfo[0].strides)) < __pyx_v_cur) != 0); if (__pyx_t_12) { __pyx_t_13 = ((__pyx_v_fill_count < __pyx_v_lim) != 0); __pyx_t_16 = __pyx_t_13; } else { __pyx_t_16 = __pyx_t_12; } if (__pyx_t_16) { /* "pandas/src/generated.pyx":736 * indexer[j] = i * elif new[j] < cur and fill_count < lim: * indexer[j] = i # <<<<<<<<<<<<<< * fill_count += 1 * j -= 1 */ __pyx_t_29 = __pyx_v_j; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_29, __pyx_pybuffernd_indexer.diminfo[0].strides) = __pyx_v_i; /* "pandas/src/generated.pyx":737 * elif new[j] < cur and fill_count < lim: * indexer[j] = i * fill_count += 1 # <<<<<<<<<<<<<< * j -= 1 * */ __pyx_v_fill_count = (__pyx_v_fill_count + 1); goto __pyx_L17; } __pyx_L17:; /* "pandas/src/generated.pyx":738 * indexer[j] = i * fill_count += 1 * j -= 1 # <<<<<<<<<<<<<< * * fill_count = 0 */ __pyx_v_j = (__pyx_v_j - 1); } /* "pandas/src/generated.pyx":740 * j -= 1 * * fill_count = 0 # <<<<<<<<<<<<<< * i -= 1 * cur = prev */ __pyx_v_fill_count = 0; /* "pandas/src/generated.pyx":741 * * fill_count = 0 * i -= 1 # <<<<<<<<<<<<<< * cur = prev * */ __pyx_v_i = (__pyx_v_i - 1); /* "pandas/src/generated.pyx":742 * fill_count = 0 * i -= 1 * cur = prev # <<<<<<<<<<<<<< * * return indexer */ __pyx_v_cur = __pyx_v_prev; } __pyx_L9_break:; /* "pandas/src/generated.pyx":744 * cur = prev * * return indexer # <<<<<<<<<<<<<< * * @cython.boundscheck(False) */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_indexer)); __pyx_r = ((PyObject *)__pyx_v_indexer); goto __pyx_L0; /* "pandas/src/generated.pyx":686 * @cython.boundscheck(False) * @cython.wraparound(False) * def backfill_float32(ndarray[float32_t] old, ndarray[float32_t] new, # <<<<<<<<<<<<<< * limit=None): * cdef Py_ssize_t i, j, nleft, nright */ /* 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_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_new.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_old.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.backfill_float32", __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_new.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_old.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_indexer); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":748 * @cython.boundscheck(False) * @cython.wraparound(False) * def backfill_object(ndarray[object] old, ndarray[object] new, # <<<<<<<<<<<<<< * limit=None): * cdef Py_ssize_t i, j, nleft, nright */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_131backfill_object(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_131backfill_object = {__Pyx_NAMESTR("backfill_object"), (PyCFunction)__pyx_pw_6pandas_5algos_131backfill_object, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_131backfill_object(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_old = 0; PyArrayObject *__pyx_v_new = 0; PyObject *__pyx_v_limit = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("backfill_object (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_old,&__pyx_n_s_new,&__pyx_n_s_limit,0}; PyObject* values[3] = {0,0,0}; /* "pandas/src/generated.pyx":749 * @cython.wraparound(False) * def backfill_object(ndarray[object] old, ndarray[object] new, * limit=None): # <<<<<<<<<<<<<< * cdef Py_ssize_t i, j, nleft, nright * cdef ndarray[int64_t, ndim=1] indexer */ values[2] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_old)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_new)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("backfill_object", 0, 2, 3, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 748; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_limit); if (value) { values[2] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "backfill_object") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 748; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_old = ((PyArrayObject *)values[0]); __pyx_v_new = ((PyArrayObject *)values[1]); __pyx_v_limit = values[2]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("backfill_object", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 748; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.backfill_object", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_old), __pyx_ptype_5numpy_ndarray, 1, "old", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 748; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_new), __pyx_ptype_5numpy_ndarray, 1, "new", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 748; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_130backfill_object(__pyx_self, __pyx_v_old, __pyx_v_new, __pyx_v_limit); /* "pandas/src/generated.pyx":748 * @cython.boundscheck(False) * @cython.wraparound(False) * def backfill_object(ndarray[object] old, ndarray[object] new, # <<<<<<<<<<<<<< * limit=None): * cdef Py_ssize_t i, j, nleft, nright */ /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5algos_130backfill_object(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_old, PyArrayObject *__pyx_v_new, PyObject *__pyx_v_limit) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_nleft; Py_ssize_t __pyx_v_nright; PyArrayObject *__pyx_v_indexer = 0; PyObject *__pyx_v_cur = 0; PyObject *__pyx_v_prev = 0; int __pyx_v_lim; int __pyx_v_fill_count; __Pyx_LocalBuf_ND __pyx_pybuffernd_indexer; __Pyx_Buffer __pyx_pybuffer_indexer; __Pyx_LocalBuf_ND __pyx_pybuffernd_new; __Pyx_Buffer __pyx_pybuffer_new; __Pyx_LocalBuf_ND __pyx_pybuffernd_old; __Pyx_Buffer __pyx_pybuffer_old; 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; int __pyx_t_12; int __pyx_t_13; long __pyx_t_14; 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; Py_ssize_t __pyx_t_27; Py_ssize_t __pyx_t_28; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("backfill_object", 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_old.pybuffer.buf = NULL; __pyx_pybuffer_old.refcount = 0; __pyx_pybuffernd_old.data = NULL; __pyx_pybuffernd_old.rcbuffer = &__pyx_pybuffer_old; __pyx_pybuffer_new.pybuffer.buf = NULL; __pyx_pybuffer_new.refcount = 0; __pyx_pybuffernd_new.data = NULL; __pyx_pybuffernd_new.rcbuffer = &__pyx_pybuffer_new; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_old.rcbuffer->pybuffer, (PyObject*)__pyx_v_old, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 748; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_old.diminfo[0].strides = __pyx_pybuffernd_old.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_old.diminfo[0].shape = __pyx_pybuffernd_old.rcbuffer->pybuffer.shape[0]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_new.rcbuffer->pybuffer, (PyObject*)__pyx_v_new, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 748; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_new.diminfo[0].strides = __pyx_pybuffernd_new.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_new.diminfo[0].shape = __pyx_pybuffernd_new.rcbuffer->pybuffer.shape[0]; /* "pandas/src/generated.pyx":753 * cdef ndarray[int64_t, ndim=1] indexer * cdef object cur, prev * cdef int lim, fill_count = 0 # <<<<<<<<<<<<<< * * nleft = len(old) */ __pyx_v_fill_count = 0; /* "pandas/src/generated.pyx":755 * cdef int lim, fill_count = 0 * * nleft = len(old) # <<<<<<<<<<<<<< * nright = len(new) * indexer = np.empty(nright, dtype=np.int64) */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_old)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 755; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_nleft = __pyx_t_1; /* "pandas/src/generated.pyx":756 * * nleft = len(old) * nright = len(new) # <<<<<<<<<<<<<< * indexer = np.empty(nright, dtype=np.int64) * indexer.fill(-1) */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_new)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 756; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_nright = __pyx_t_1; /* "pandas/src/generated.pyx":757 * nleft = len(old) * nright = len(new) * indexer = np.empty(nright, dtype=np.int64) # <<<<<<<<<<<<<< * indexer.fill(-1) * */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 757; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 757; __pyx_clineno = __LINE__; goto __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_nright); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 757; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 757; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 757; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 757; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_int64); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 757; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 757; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyObject_Call(__pyx_t_3, __pyx_t_4, __pyx_t_2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 757; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 757; __pyx_clineno = __LINE__; goto __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_int64_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_int64_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_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_filename = __pyx_f[2]; __pyx_lineno = 757; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_7 = 0; __pyx_v_indexer = ((PyArrayObject *)__pyx_t_6); __pyx_t_6 = 0; /* "pandas/src/generated.pyx":758 * nright = len(new) * indexer = np.empty(nright, dtype=np.int64) * indexer.fill(-1) # <<<<<<<<<<<<<< * * if limit is None: */ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_indexer), __pyx_n_s_fill); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 758; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_2 = PyObject_Call(__pyx_t_6, __pyx_tuple__51, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 758; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":760 * indexer.fill(-1) * * if limit is None: # <<<<<<<<<<<<<< * lim = nright * else: */ __pyx_t_12 = (__pyx_v_limit == Py_None); __pyx_t_13 = (__pyx_t_12 != 0); if (__pyx_t_13) { /* "pandas/src/generated.pyx":761 * * if limit is None: * lim = nright # <<<<<<<<<<<<<< * else: * if limit < 0: */ __pyx_v_lim = __pyx_v_nright; goto __pyx_L3; } /*else*/ { /* "pandas/src/generated.pyx":763 * lim = nright * else: * if limit < 0: # <<<<<<<<<<<<<< * raise ValueError('Limit must be non-negative') * lim = limit */ __pyx_t_2 = PyObject_RichCompare(__pyx_v_limit, __pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 763; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_13 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 763; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_13) { /* "pandas/src/generated.pyx":764 * else: * if limit < 0: * raise ValueError('Limit must be non-negative') # <<<<<<<<<<<<<< * lim = limit * */ __pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__52, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 764; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 764; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } /* "pandas/src/generated.pyx":765 * if limit < 0: * raise ValueError('Limit must be non-negative') * lim = limit # <<<<<<<<<<<<<< * * if nleft == 0 or nright == 0 or new[0] > old[nleft - 1]: */ __pyx_t_8 = __Pyx_PyInt_As_int(__pyx_v_limit); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 765; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_lim = __pyx_t_8; } __pyx_L3:; /* "pandas/src/generated.pyx":767 * lim = limit * * if nleft == 0 or nright == 0 or new[0] > old[nleft - 1]: # <<<<<<<<<<<<<< * return indexer * */ __pyx_t_13 = (__pyx_v_nleft == 0); if (!__pyx_t_13) { __pyx_t_12 = (__pyx_v_nright == 0); if (!__pyx_t_12) { __pyx_t_14 = 0; __pyx_t_2 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_new.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_new.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_2); __pyx_t_1 = (__pyx_v_nleft - 1); __pyx_t_6 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_old.rcbuffer->pybuffer.buf, __pyx_t_1, __pyx_pybuffernd_old.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_6); __pyx_t_4 = PyObject_RichCompare(__pyx_t_2, __pyx_t_6, Py_GT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 767; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_15 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_15 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 767; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_16 = __pyx_t_15; } else { __pyx_t_16 = __pyx_t_12; } __pyx_t_12 = __pyx_t_16; } else { __pyx_t_12 = __pyx_t_13; } if (__pyx_t_12) { /* "pandas/src/generated.pyx":768 * * if nleft == 0 or nright == 0 or new[0] > old[nleft - 1]: * return indexer # <<<<<<<<<<<<<< * * i = nleft - 1 */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_indexer)); __pyx_r = ((PyObject *)__pyx_v_indexer); goto __pyx_L0; } /* "pandas/src/generated.pyx":770 * return indexer * * i = nleft - 1 # <<<<<<<<<<<<<< * j = nright - 1 * */ __pyx_v_i = (__pyx_v_nleft - 1); /* "pandas/src/generated.pyx":771 * * i = nleft - 1 * j = nright - 1 # <<<<<<<<<<<<<< * * cur = old[nleft - 1] */ __pyx_v_j = (__pyx_v_nright - 1); /* "pandas/src/generated.pyx":773 * j = nright - 1 * * cur = old[nleft - 1] # <<<<<<<<<<<<<< * * while j >= 0 and new[j] > cur: */ __pyx_t_17 = (__pyx_v_nleft - 1); __pyx_t_4 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_old.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_old.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_4); __pyx_v_cur = __pyx_t_4; __pyx_t_4 = 0; /* "pandas/src/generated.pyx":775 * cur = old[nleft - 1] * * while j >= 0 and new[j] > cur: # <<<<<<<<<<<<<< * j -= 1 * */ while (1) { __pyx_t_12 = (__pyx_v_j >= 0); if (__pyx_t_12) { __pyx_t_18 = __pyx_v_j; __pyx_t_4 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_new.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_new.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_4); __pyx_t_6 = PyObject_RichCompare(__pyx_t_4, __pyx_v_cur, Py_GT); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 775; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_13 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 775; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_16 = __pyx_t_13; } else { __pyx_t_16 = __pyx_t_12; } if (!__pyx_t_16) break; /* "pandas/src/generated.pyx":776 * * while j >= 0 and new[j] > cur: * j -= 1 # <<<<<<<<<<<<<< * * while True: */ __pyx_v_j = (__pyx_v_j - 1); } /* "pandas/src/generated.pyx":778 * j -= 1 * * while True: # <<<<<<<<<<<<<< * if j < 0: * break */ while (1) { /* "pandas/src/generated.pyx":779 * * while True: * if j < 0: # <<<<<<<<<<<<<< * break * */ __pyx_t_16 = ((__pyx_v_j < 0) != 0); if (__pyx_t_16) { /* "pandas/src/generated.pyx":780 * while True: * if j < 0: * break # <<<<<<<<<<<<<< * * if i == 0: */ goto __pyx_L9_break; } /* "pandas/src/generated.pyx":782 * break * * if i == 0: # <<<<<<<<<<<<<< * while j >= 0: * if new[j] == cur: */ __pyx_t_16 = ((__pyx_v_i == 0) != 0); if (__pyx_t_16) { /* "pandas/src/generated.pyx":783 * * if i == 0: * while j >= 0: # <<<<<<<<<<<<<< * if new[j] == cur: * indexer[j] = i */ while (1) { __pyx_t_16 = ((__pyx_v_j >= 0) != 0); if (!__pyx_t_16) break; /* "pandas/src/generated.pyx":784 * if i == 0: * while j >= 0: * if new[j] == cur: # <<<<<<<<<<<<<< * indexer[j] = i * elif new[j] < cur and fill_count < lim: */ __pyx_t_19 = __pyx_v_j; __pyx_t_6 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_new.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_new.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_6); __pyx_t_4 = PyObject_RichCompare(__pyx_t_6, __pyx_v_cur, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 784; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_16 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_16 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 784; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_16) { /* "pandas/src/generated.pyx":785 * while j >= 0: * if new[j] == cur: * indexer[j] = i # <<<<<<<<<<<<<< * elif new[j] < cur and fill_count < lim: * indexer[j] = i */ __pyx_t_20 = __pyx_v_j; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_indexer.diminfo[0].strides) = __pyx_v_i; goto __pyx_L14; } /* "pandas/src/generated.pyx":786 * if new[j] == cur: * indexer[j] = i * elif new[j] < cur and fill_count < lim: # <<<<<<<<<<<<<< * indexer[j] = i * fill_count += 1 */ __pyx_t_21 = __pyx_v_j; __pyx_t_4 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_new.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_new.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_4); __pyx_t_6 = PyObject_RichCompare(__pyx_t_4, __pyx_v_cur, Py_LT); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 786; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_16 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_16 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 786; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (__pyx_t_16) { __pyx_t_12 = (__pyx_v_fill_count < __pyx_v_lim); __pyx_t_13 = __pyx_t_12; } else { __pyx_t_13 = __pyx_t_16; } if (__pyx_t_13) { /* "pandas/src/generated.pyx":787 * indexer[j] = i * elif new[j] < cur and fill_count < lim: * indexer[j] = i # <<<<<<<<<<<<<< * fill_count += 1 * j -= 1 */ __pyx_t_22 = __pyx_v_j; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_22, __pyx_pybuffernd_indexer.diminfo[0].strides) = __pyx_v_i; /* "pandas/src/generated.pyx":788 * elif new[j] < cur and fill_count < lim: * indexer[j] = i * fill_count += 1 # <<<<<<<<<<<<<< * j -= 1 * break */ __pyx_v_fill_count = (__pyx_v_fill_count + 1); goto __pyx_L14; } __pyx_L14:; /* "pandas/src/generated.pyx":789 * indexer[j] = i * fill_count += 1 * j -= 1 # <<<<<<<<<<<<<< * break * */ __pyx_v_j = (__pyx_v_j - 1); } /* "pandas/src/generated.pyx":790 * fill_count += 1 * j -= 1 * break # <<<<<<<<<<<<<< * * prev = old[i - 1] */ goto __pyx_L9_break; } /* "pandas/src/generated.pyx":792 * break * * prev = old[i - 1] # <<<<<<<<<<<<<< * * while j >= 0 and prev < new[j] <= cur: */ __pyx_t_23 = (__pyx_v_i - 1); __pyx_t_6 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_old.rcbuffer->pybuffer.buf, __pyx_t_23, __pyx_pybuffernd_old.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_6); __Pyx_XDECREF_SET(__pyx_v_prev, __pyx_t_6); __pyx_t_6 = 0; /* "pandas/src/generated.pyx":794 * prev = old[i - 1] * * while j >= 0 and prev < new[j] <= cur: # <<<<<<<<<<<<<< * if new[j] == cur: * indexer[j] = i */ while (1) { __pyx_t_13 = (__pyx_v_j >= 0); if (__pyx_t_13) { __pyx_t_24 = __pyx_v_j; __pyx_t_6 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_new.rcbuffer->pybuffer.buf, __pyx_t_24, __pyx_pybuffernd_new.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_6); __pyx_t_4 = PyObject_RichCompare(__pyx_v_prev, __pyx_t_6, Py_LT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 794; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__Pyx_PyObject_IsTrue(__pyx_t_4)) { __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = PyObject_RichCompare(__pyx_t_6, __pyx_v_cur, Py_LE); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 794; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_16 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_16 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 794; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_12 = __pyx_t_16; } else { __pyx_t_12 = __pyx_t_13; } if (!__pyx_t_12) break; /* "pandas/src/generated.pyx":795 * * while j >= 0 and prev < new[j] <= cur: * if new[j] == cur: # <<<<<<<<<<<<<< * indexer[j] = i * elif new[j] < cur and fill_count < lim: */ __pyx_t_25 = __pyx_v_j; __pyx_t_4 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_new.rcbuffer->pybuffer.buf, __pyx_t_25, __pyx_pybuffernd_new.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_4); __pyx_t_6 = PyObject_RichCompare(__pyx_t_4, __pyx_v_cur, Py_EQ); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 795; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_12 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 795; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (__pyx_t_12) { /* "pandas/src/generated.pyx":796 * while j >= 0 and prev < new[j] <= cur: * if new[j] == cur: * indexer[j] = i # <<<<<<<<<<<<<< * elif new[j] < cur and fill_count < lim: * indexer[j] = i */ __pyx_t_26 = __pyx_v_j; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_26, __pyx_pybuffernd_indexer.diminfo[0].strides) = __pyx_v_i; goto __pyx_L17; } /* "pandas/src/generated.pyx":797 * if new[j] == cur: * indexer[j] = i * elif new[j] < cur and fill_count < lim: # <<<<<<<<<<<<<< * indexer[j] = i * fill_count += 1 */ __pyx_t_27 = __pyx_v_j; __pyx_t_6 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_new.rcbuffer->pybuffer.buf, __pyx_t_27, __pyx_pybuffernd_new.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_6); __pyx_t_4 = PyObject_RichCompare(__pyx_t_6, __pyx_v_cur, Py_LT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 797; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_12 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 797; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_12) { __pyx_t_13 = (__pyx_v_fill_count < __pyx_v_lim); __pyx_t_16 = __pyx_t_13; } else { __pyx_t_16 = __pyx_t_12; } if (__pyx_t_16) { /* "pandas/src/generated.pyx":798 * indexer[j] = i * elif new[j] < cur and fill_count < lim: * indexer[j] = i # <<<<<<<<<<<<<< * fill_count += 1 * j -= 1 */ __pyx_t_28 = __pyx_v_j; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_28, __pyx_pybuffernd_indexer.diminfo[0].strides) = __pyx_v_i; /* "pandas/src/generated.pyx":799 * elif new[j] < cur and fill_count < lim: * indexer[j] = i * fill_count += 1 # <<<<<<<<<<<<<< * j -= 1 * */ __pyx_v_fill_count = (__pyx_v_fill_count + 1); goto __pyx_L17; } __pyx_L17:; /* "pandas/src/generated.pyx":800 * indexer[j] = i * fill_count += 1 * j -= 1 # <<<<<<<<<<<<<< * * fill_count = 0 */ __pyx_v_j = (__pyx_v_j - 1); } /* "pandas/src/generated.pyx":802 * j -= 1 * * fill_count = 0 # <<<<<<<<<<<<<< * i -= 1 * cur = prev */ __pyx_v_fill_count = 0; /* "pandas/src/generated.pyx":803 * * fill_count = 0 * i -= 1 # <<<<<<<<<<<<<< * cur = prev * */ __pyx_v_i = (__pyx_v_i - 1); /* "pandas/src/generated.pyx":804 * fill_count = 0 * i -= 1 * cur = prev # <<<<<<<<<<<<<< * * return indexer */ __Pyx_INCREF(__pyx_v_prev); __Pyx_DECREF_SET(__pyx_v_cur, __pyx_v_prev); } __pyx_L9_break:; /* "pandas/src/generated.pyx":806 * cur = prev * * return indexer # <<<<<<<<<<<<<< * * @cython.boundscheck(False) */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_indexer)); __pyx_r = ((PyObject *)__pyx_v_indexer); goto __pyx_L0; /* "pandas/src/generated.pyx":748 * @cython.boundscheck(False) * @cython.wraparound(False) * def backfill_object(ndarray[object] old, ndarray[object] new, # <<<<<<<<<<<<<< * limit=None): * cdef Py_ssize_t i, j, nleft, nright */ /* 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_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_new.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_old.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.backfill_object", __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_new.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_old.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_indexer); __Pyx_XDECREF(__pyx_v_cur); __Pyx_XDECREF(__pyx_v_prev); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":810 * @cython.boundscheck(False) * @cython.wraparound(False) * def backfill_int32(ndarray[int32_t] old, ndarray[int32_t] new, # <<<<<<<<<<<<<< * limit=None): * cdef Py_ssize_t i, j, nleft, nright */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_133backfill_int32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_133backfill_int32 = {__Pyx_NAMESTR("backfill_int32"), (PyCFunction)__pyx_pw_6pandas_5algos_133backfill_int32, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_133backfill_int32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_old = 0; PyArrayObject *__pyx_v_new = 0; PyObject *__pyx_v_limit = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("backfill_int32 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_old,&__pyx_n_s_new,&__pyx_n_s_limit,0}; PyObject* values[3] = {0,0,0}; /* "pandas/src/generated.pyx":811 * @cython.wraparound(False) * def backfill_int32(ndarray[int32_t] old, ndarray[int32_t] new, * limit=None): # <<<<<<<<<<<<<< * cdef Py_ssize_t i, j, nleft, nright * cdef ndarray[int64_t, ndim=1] indexer */ values[2] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_old)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_new)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("backfill_int32", 0, 2, 3, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 810; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_limit); if (value) { values[2] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "backfill_int32") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 810; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_old = ((PyArrayObject *)values[0]); __pyx_v_new = ((PyArrayObject *)values[1]); __pyx_v_limit = values[2]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("backfill_int32", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 810; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.backfill_int32", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_old), __pyx_ptype_5numpy_ndarray, 1, "old", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 810; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_new), __pyx_ptype_5numpy_ndarray, 1, "new", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 810; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_132backfill_int32(__pyx_self, __pyx_v_old, __pyx_v_new, __pyx_v_limit); /* "pandas/src/generated.pyx":810 * @cython.boundscheck(False) * @cython.wraparound(False) * def backfill_int32(ndarray[int32_t] old, ndarray[int32_t] new, # <<<<<<<<<<<<<< * limit=None): * cdef Py_ssize_t i, j, nleft, nright */ /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5algos_132backfill_int32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_old, PyArrayObject *__pyx_v_new, PyObject *__pyx_v_limit) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_nleft; Py_ssize_t __pyx_v_nright; PyArrayObject *__pyx_v_indexer = 0; __pyx_t_5numpy_int32_t __pyx_v_cur; __pyx_t_5numpy_int32_t __pyx_v_prev; int __pyx_v_lim; int __pyx_v_fill_count; __Pyx_LocalBuf_ND __pyx_pybuffernd_indexer; __Pyx_Buffer __pyx_pybuffer_indexer; __Pyx_LocalBuf_ND __pyx_pybuffernd_new; __Pyx_Buffer __pyx_pybuffer_new; __Pyx_LocalBuf_ND __pyx_pybuffernd_old; __Pyx_Buffer __pyx_pybuffer_old; 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; int __pyx_t_12; int __pyx_t_13; long __pyx_t_14; 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; __pyx_t_5numpy_int32_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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("backfill_int32", 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_old.pybuffer.buf = NULL; __pyx_pybuffer_old.refcount = 0; __pyx_pybuffernd_old.data = NULL; __pyx_pybuffernd_old.rcbuffer = &__pyx_pybuffer_old; __pyx_pybuffer_new.pybuffer.buf = NULL; __pyx_pybuffer_new.refcount = 0; __pyx_pybuffernd_new.data = NULL; __pyx_pybuffernd_new.rcbuffer = &__pyx_pybuffer_new; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_old.rcbuffer->pybuffer, (PyObject*)__pyx_v_old, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 810; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_old.diminfo[0].strides = __pyx_pybuffernd_old.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_old.diminfo[0].shape = __pyx_pybuffernd_old.rcbuffer->pybuffer.shape[0]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_new.rcbuffer->pybuffer, (PyObject*)__pyx_v_new, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 810; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_new.diminfo[0].strides = __pyx_pybuffernd_new.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_new.diminfo[0].shape = __pyx_pybuffernd_new.rcbuffer->pybuffer.shape[0]; /* "pandas/src/generated.pyx":815 * cdef ndarray[int64_t, ndim=1] indexer * cdef int32_t cur, prev * cdef int lim, fill_count = 0 # <<<<<<<<<<<<<< * * nleft = len(old) */ __pyx_v_fill_count = 0; /* "pandas/src/generated.pyx":817 * cdef int lim, fill_count = 0 * * nleft = len(old) # <<<<<<<<<<<<<< * nright = len(new) * indexer = np.empty(nright, dtype=np.int64) */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_old)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 817; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_nleft = __pyx_t_1; /* "pandas/src/generated.pyx":818 * * nleft = len(old) * nright = len(new) # <<<<<<<<<<<<<< * indexer = np.empty(nright, dtype=np.int64) * indexer.fill(-1) */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_new)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 818; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_nright = __pyx_t_1; /* "pandas/src/generated.pyx":819 * nleft = len(old) * nright = len(new) * indexer = np.empty(nright, dtype=np.int64) # <<<<<<<<<<<<<< * indexer.fill(-1) * */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 819; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 819; __pyx_clineno = __LINE__; goto __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_nright); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 819; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 819; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 819; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 819; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_int64); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 819; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 819; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyObject_Call(__pyx_t_3, __pyx_t_4, __pyx_t_2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 819; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 819; __pyx_clineno = __LINE__; goto __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_int64_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_int64_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_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_filename = __pyx_f[2]; __pyx_lineno = 819; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_7 = 0; __pyx_v_indexer = ((PyArrayObject *)__pyx_t_6); __pyx_t_6 = 0; /* "pandas/src/generated.pyx":820 * nright = len(new) * indexer = np.empty(nright, dtype=np.int64) * indexer.fill(-1) # <<<<<<<<<<<<<< * * if limit is None: */ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_indexer), __pyx_n_s_fill); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 820; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_2 = PyObject_Call(__pyx_t_6, __pyx_tuple__53, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 820; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":822 * indexer.fill(-1) * * if limit is None: # <<<<<<<<<<<<<< * lim = nright * else: */ __pyx_t_12 = (__pyx_v_limit == Py_None); __pyx_t_13 = (__pyx_t_12 != 0); if (__pyx_t_13) { /* "pandas/src/generated.pyx":823 * * if limit is None: * lim = nright # <<<<<<<<<<<<<< * else: * if limit < 0: */ __pyx_v_lim = __pyx_v_nright; goto __pyx_L3; } /*else*/ { /* "pandas/src/generated.pyx":825 * lim = nright * else: * if limit < 0: # <<<<<<<<<<<<<< * raise ValueError('Limit must be non-negative') * lim = limit */ __pyx_t_2 = PyObject_RichCompare(__pyx_v_limit, __pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 825; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_13 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 825; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_13) { /* "pandas/src/generated.pyx":826 * else: * if limit < 0: * raise ValueError('Limit must be non-negative') # <<<<<<<<<<<<<< * lim = limit * */ __pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__54, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 826; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 826; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } /* "pandas/src/generated.pyx":827 * if limit < 0: * raise ValueError('Limit must be non-negative') * lim = limit # <<<<<<<<<<<<<< * * if nleft == 0 or nright == 0 or new[0] > old[nleft - 1]: */ __pyx_t_8 = __Pyx_PyInt_As_int(__pyx_v_limit); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 827; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_lim = __pyx_t_8; } __pyx_L3:; /* "pandas/src/generated.pyx":829 * lim = limit * * if nleft == 0 or nright == 0 or new[0] > old[nleft - 1]: # <<<<<<<<<<<<<< * return indexer * */ __pyx_t_13 = ((__pyx_v_nleft == 0) != 0); if (!__pyx_t_13) { __pyx_t_12 = ((__pyx_v_nright == 0) != 0); if (!__pyx_t_12) { __pyx_t_14 = 0; __pyx_t_1 = (__pyx_v_nleft - 1); __pyx_t_15 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_new.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_new.diminfo[0].strides)) > (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_old.rcbuffer->pybuffer.buf, __pyx_t_1, __pyx_pybuffernd_old.diminfo[0].strides))) != 0); __pyx_t_16 = __pyx_t_15; } else { __pyx_t_16 = __pyx_t_12; } __pyx_t_12 = __pyx_t_16; } else { __pyx_t_12 = __pyx_t_13; } if (__pyx_t_12) { /* "pandas/src/generated.pyx":830 * * if nleft == 0 or nright == 0 or new[0] > old[nleft - 1]: * return indexer # <<<<<<<<<<<<<< * * i = nleft - 1 */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_indexer)); __pyx_r = ((PyObject *)__pyx_v_indexer); goto __pyx_L0; } /* "pandas/src/generated.pyx":832 * return indexer * * i = nleft - 1 # <<<<<<<<<<<<<< * j = nright - 1 * */ __pyx_v_i = (__pyx_v_nleft - 1); /* "pandas/src/generated.pyx":833 * * i = nleft - 1 * j = nright - 1 # <<<<<<<<<<<<<< * * cur = old[nleft - 1] */ __pyx_v_j = (__pyx_v_nright - 1); /* "pandas/src/generated.pyx":835 * j = nright - 1 * * cur = old[nleft - 1] # <<<<<<<<<<<<<< * * while j >= 0 and new[j] > cur: */ __pyx_t_17 = (__pyx_v_nleft - 1); __pyx_v_cur = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_old.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_old.diminfo[0].strides)); /* "pandas/src/generated.pyx":837 * cur = old[nleft - 1] * * while j >= 0 and new[j] > cur: # <<<<<<<<<<<<<< * j -= 1 * */ while (1) { __pyx_t_12 = ((__pyx_v_j >= 0) != 0); if (__pyx_t_12) { __pyx_t_18 = __pyx_v_j; __pyx_t_13 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_new.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_new.diminfo[0].strides)) > __pyx_v_cur) != 0); __pyx_t_16 = __pyx_t_13; } else { __pyx_t_16 = __pyx_t_12; } if (!__pyx_t_16) break; /* "pandas/src/generated.pyx":838 * * while j >= 0 and new[j] > cur: * j -= 1 # <<<<<<<<<<<<<< * * while True: */ __pyx_v_j = (__pyx_v_j - 1); } /* "pandas/src/generated.pyx":840 * j -= 1 * * while True: # <<<<<<<<<<<<<< * if j < 0: * break */ while (1) { /* "pandas/src/generated.pyx":841 * * while True: * if j < 0: # <<<<<<<<<<<<<< * break * */ __pyx_t_16 = ((__pyx_v_j < 0) != 0); if (__pyx_t_16) { /* "pandas/src/generated.pyx":842 * while True: * if j < 0: * break # <<<<<<<<<<<<<< * * if i == 0: */ goto __pyx_L9_break; } /* "pandas/src/generated.pyx":844 * break * * if i == 0: # <<<<<<<<<<<<<< * while j >= 0: * if new[j] == cur: */ __pyx_t_16 = ((__pyx_v_i == 0) != 0); if (__pyx_t_16) { /* "pandas/src/generated.pyx":845 * * if i == 0: * while j >= 0: # <<<<<<<<<<<<<< * if new[j] == cur: * indexer[j] = i */ while (1) { __pyx_t_16 = ((__pyx_v_j >= 0) != 0); if (!__pyx_t_16) break; /* "pandas/src/generated.pyx":846 * if i == 0: * while j >= 0: * if new[j] == cur: # <<<<<<<<<<<<<< * indexer[j] = i * elif new[j] < cur and fill_count < lim: */ __pyx_t_19 = __pyx_v_j; __pyx_t_16 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_new.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_new.diminfo[0].strides)) == __pyx_v_cur) != 0); if (__pyx_t_16) { /* "pandas/src/generated.pyx":847 * while j >= 0: * if new[j] == cur: * indexer[j] = i # <<<<<<<<<<<<<< * elif new[j] < cur and fill_count < lim: * indexer[j] = i */ __pyx_t_20 = __pyx_v_j; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_indexer.diminfo[0].strides) = __pyx_v_i; goto __pyx_L14; } /* "pandas/src/generated.pyx":848 * if new[j] == cur: * indexer[j] = i * elif new[j] < cur and fill_count < lim: # <<<<<<<<<<<<<< * indexer[j] = i * fill_count += 1 */ __pyx_t_21 = __pyx_v_j; __pyx_t_16 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_new.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_new.diminfo[0].strides)) < __pyx_v_cur) != 0); if (__pyx_t_16) { __pyx_t_12 = ((__pyx_v_fill_count < __pyx_v_lim) != 0); __pyx_t_13 = __pyx_t_12; } else { __pyx_t_13 = __pyx_t_16; } if (__pyx_t_13) { /* "pandas/src/generated.pyx":849 * indexer[j] = i * elif new[j] < cur and fill_count < lim: * indexer[j] = i # <<<<<<<<<<<<<< * fill_count += 1 * j -= 1 */ __pyx_t_22 = __pyx_v_j; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_22, __pyx_pybuffernd_indexer.diminfo[0].strides) = __pyx_v_i; /* "pandas/src/generated.pyx":850 * elif new[j] < cur and fill_count < lim: * indexer[j] = i * fill_count += 1 # <<<<<<<<<<<<<< * j -= 1 * break */ __pyx_v_fill_count = (__pyx_v_fill_count + 1); goto __pyx_L14; } __pyx_L14:; /* "pandas/src/generated.pyx":851 * indexer[j] = i * fill_count += 1 * j -= 1 # <<<<<<<<<<<<<< * break * */ __pyx_v_j = (__pyx_v_j - 1); } /* "pandas/src/generated.pyx":852 * fill_count += 1 * j -= 1 * break # <<<<<<<<<<<<<< * * prev = old[i - 1] */ goto __pyx_L9_break; } /* "pandas/src/generated.pyx":854 * break * * prev = old[i - 1] # <<<<<<<<<<<<<< * * while j >= 0 and prev < new[j] <= cur: */ __pyx_t_23 = (__pyx_v_i - 1); __pyx_v_prev = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_old.rcbuffer->pybuffer.buf, __pyx_t_23, __pyx_pybuffernd_old.diminfo[0].strides)); /* "pandas/src/generated.pyx":856 * prev = old[i - 1] * * while j >= 0 and prev < new[j] <= cur: # <<<<<<<<<<<<<< * if new[j] == cur: * indexer[j] = i */ while (1) { __pyx_t_13 = ((__pyx_v_j >= 0) != 0); if (__pyx_t_13) { __pyx_t_24 = __pyx_v_j; __pyx_t_25 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_new.rcbuffer->pybuffer.buf, __pyx_t_24, __pyx_pybuffernd_new.diminfo[0].strides)); __pyx_t_16 = (__pyx_v_prev < __pyx_t_25); if (__pyx_t_16) { __pyx_t_16 = (__pyx_t_25 <= __pyx_v_cur); } __pyx_t_12 = (__pyx_t_16 != 0); } else { __pyx_t_12 = __pyx_t_13; } if (!__pyx_t_12) break; /* "pandas/src/generated.pyx":857 * * while j >= 0 and prev < new[j] <= cur: * if new[j] == cur: # <<<<<<<<<<<<<< * indexer[j] = i * elif new[j] < cur and fill_count < lim: */ __pyx_t_26 = __pyx_v_j; __pyx_t_12 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_new.rcbuffer->pybuffer.buf, __pyx_t_26, __pyx_pybuffernd_new.diminfo[0].strides)) == __pyx_v_cur) != 0); if (__pyx_t_12) { /* "pandas/src/generated.pyx":858 * while j >= 0 and prev < new[j] <= cur: * if new[j] == cur: * indexer[j] = i # <<<<<<<<<<<<<< * elif new[j] < cur and fill_count < lim: * indexer[j] = i */ __pyx_t_27 = __pyx_v_j; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_27, __pyx_pybuffernd_indexer.diminfo[0].strides) = __pyx_v_i; goto __pyx_L17; } /* "pandas/src/generated.pyx":859 * if new[j] == cur: * indexer[j] = i * elif new[j] < cur and fill_count < lim: # <<<<<<<<<<<<<< * indexer[j] = i * fill_count += 1 */ __pyx_t_28 = __pyx_v_j; __pyx_t_12 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_new.rcbuffer->pybuffer.buf, __pyx_t_28, __pyx_pybuffernd_new.diminfo[0].strides)) < __pyx_v_cur) != 0); if (__pyx_t_12) { __pyx_t_13 = ((__pyx_v_fill_count < __pyx_v_lim) != 0); __pyx_t_16 = __pyx_t_13; } else { __pyx_t_16 = __pyx_t_12; } if (__pyx_t_16) { /* "pandas/src/generated.pyx":860 * indexer[j] = i * elif new[j] < cur and fill_count < lim: * indexer[j] = i # <<<<<<<<<<<<<< * fill_count += 1 * j -= 1 */ __pyx_t_29 = __pyx_v_j; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_29, __pyx_pybuffernd_indexer.diminfo[0].strides) = __pyx_v_i; /* "pandas/src/generated.pyx":861 * elif new[j] < cur and fill_count < lim: * indexer[j] = i * fill_count += 1 # <<<<<<<<<<<<<< * j -= 1 * */ __pyx_v_fill_count = (__pyx_v_fill_count + 1); goto __pyx_L17; } __pyx_L17:; /* "pandas/src/generated.pyx":862 * indexer[j] = i * fill_count += 1 * j -= 1 # <<<<<<<<<<<<<< * * fill_count = 0 */ __pyx_v_j = (__pyx_v_j - 1); } /* "pandas/src/generated.pyx":864 * j -= 1 * * fill_count = 0 # <<<<<<<<<<<<<< * i -= 1 * cur = prev */ __pyx_v_fill_count = 0; /* "pandas/src/generated.pyx":865 * * fill_count = 0 * i -= 1 # <<<<<<<<<<<<<< * cur = prev * */ __pyx_v_i = (__pyx_v_i - 1); /* "pandas/src/generated.pyx":866 * fill_count = 0 * i -= 1 * cur = prev # <<<<<<<<<<<<<< * * return indexer */ __pyx_v_cur = __pyx_v_prev; } __pyx_L9_break:; /* "pandas/src/generated.pyx":868 * cur = prev * * return indexer # <<<<<<<<<<<<<< * * @cython.boundscheck(False) */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_indexer)); __pyx_r = ((PyObject *)__pyx_v_indexer); goto __pyx_L0; /* "pandas/src/generated.pyx":810 * @cython.boundscheck(False) * @cython.wraparound(False) * def backfill_int32(ndarray[int32_t] old, ndarray[int32_t] new, # <<<<<<<<<<<<<< * limit=None): * cdef Py_ssize_t i, j, nleft, nright */ /* 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_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_new.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_old.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.backfill_int32", __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_new.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_old.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_indexer); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":872 * @cython.boundscheck(False) * @cython.wraparound(False) * def backfill_int64(ndarray[int64_t] old, ndarray[int64_t] new, # <<<<<<<<<<<<<< * limit=None): * cdef Py_ssize_t i, j, nleft, nright */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_135backfill_int64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_135backfill_int64 = {__Pyx_NAMESTR("backfill_int64"), (PyCFunction)__pyx_pw_6pandas_5algos_135backfill_int64, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_135backfill_int64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_old = 0; PyArrayObject *__pyx_v_new = 0; PyObject *__pyx_v_limit = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("backfill_int64 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_old,&__pyx_n_s_new,&__pyx_n_s_limit,0}; PyObject* values[3] = {0,0,0}; /* "pandas/src/generated.pyx":873 * @cython.wraparound(False) * def backfill_int64(ndarray[int64_t] old, ndarray[int64_t] new, * limit=None): # <<<<<<<<<<<<<< * cdef Py_ssize_t i, j, nleft, nright * cdef ndarray[int64_t, ndim=1] indexer */ values[2] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_old)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_new)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("backfill_int64", 0, 2, 3, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 872; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_limit); if (value) { values[2] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "backfill_int64") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 872; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_old = ((PyArrayObject *)values[0]); __pyx_v_new = ((PyArrayObject *)values[1]); __pyx_v_limit = values[2]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("backfill_int64", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 872; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.backfill_int64", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_old), __pyx_ptype_5numpy_ndarray, 1, "old", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 872; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_new), __pyx_ptype_5numpy_ndarray, 1, "new", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 872; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_134backfill_int64(__pyx_self, __pyx_v_old, __pyx_v_new, __pyx_v_limit); /* "pandas/src/generated.pyx":872 * @cython.boundscheck(False) * @cython.wraparound(False) * def backfill_int64(ndarray[int64_t] old, ndarray[int64_t] new, # <<<<<<<<<<<<<< * limit=None): * cdef Py_ssize_t i, j, nleft, nright */ /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5algos_134backfill_int64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_old, PyArrayObject *__pyx_v_new, PyObject *__pyx_v_limit) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_nleft; Py_ssize_t __pyx_v_nright; PyArrayObject *__pyx_v_indexer = 0; __pyx_t_5numpy_int64_t __pyx_v_cur; __pyx_t_5numpy_int64_t __pyx_v_prev; int __pyx_v_lim; int __pyx_v_fill_count; __Pyx_LocalBuf_ND __pyx_pybuffernd_indexer; __Pyx_Buffer __pyx_pybuffer_indexer; __Pyx_LocalBuf_ND __pyx_pybuffernd_new; __Pyx_Buffer __pyx_pybuffer_new; __Pyx_LocalBuf_ND __pyx_pybuffernd_old; __Pyx_Buffer __pyx_pybuffer_old; 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; int __pyx_t_12; int __pyx_t_13; long __pyx_t_14; 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; __pyx_t_5numpy_int64_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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("backfill_int64", 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_old.pybuffer.buf = NULL; __pyx_pybuffer_old.refcount = 0; __pyx_pybuffernd_old.data = NULL; __pyx_pybuffernd_old.rcbuffer = &__pyx_pybuffer_old; __pyx_pybuffer_new.pybuffer.buf = NULL; __pyx_pybuffer_new.refcount = 0; __pyx_pybuffernd_new.data = NULL; __pyx_pybuffernd_new.rcbuffer = &__pyx_pybuffer_new; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_old.rcbuffer->pybuffer, (PyObject*)__pyx_v_old, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 872; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_old.diminfo[0].strides = __pyx_pybuffernd_old.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_old.diminfo[0].shape = __pyx_pybuffernd_old.rcbuffer->pybuffer.shape[0]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_new.rcbuffer->pybuffer, (PyObject*)__pyx_v_new, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 872; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_new.diminfo[0].strides = __pyx_pybuffernd_new.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_new.diminfo[0].shape = __pyx_pybuffernd_new.rcbuffer->pybuffer.shape[0]; /* "pandas/src/generated.pyx":877 * cdef ndarray[int64_t, ndim=1] indexer * cdef int64_t cur, prev * cdef int lim, fill_count = 0 # <<<<<<<<<<<<<< * * nleft = len(old) */ __pyx_v_fill_count = 0; /* "pandas/src/generated.pyx":879 * cdef int lim, fill_count = 0 * * nleft = len(old) # <<<<<<<<<<<<<< * nright = len(new) * indexer = np.empty(nright, dtype=np.int64) */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_old)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 879; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_nleft = __pyx_t_1; /* "pandas/src/generated.pyx":880 * * nleft = len(old) * nright = len(new) # <<<<<<<<<<<<<< * indexer = np.empty(nright, dtype=np.int64) * indexer.fill(-1) */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_new)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 880; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_nright = __pyx_t_1; /* "pandas/src/generated.pyx":881 * nleft = len(old) * nright = len(new) * indexer = np.empty(nright, dtype=np.int64) # <<<<<<<<<<<<<< * indexer.fill(-1) * */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 881; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 881; __pyx_clineno = __LINE__; goto __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_nright); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 881; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 881; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 881; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 881; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_int64); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 881; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 881; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyObject_Call(__pyx_t_3, __pyx_t_4, __pyx_t_2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 881; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 881; __pyx_clineno = __LINE__; goto __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_int64_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_int64_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_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_filename = __pyx_f[2]; __pyx_lineno = 881; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_7 = 0; __pyx_v_indexer = ((PyArrayObject *)__pyx_t_6); __pyx_t_6 = 0; /* "pandas/src/generated.pyx":882 * nright = len(new) * indexer = np.empty(nright, dtype=np.int64) * indexer.fill(-1) # <<<<<<<<<<<<<< * * if limit is None: */ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_indexer), __pyx_n_s_fill); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 882; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_2 = PyObject_Call(__pyx_t_6, __pyx_tuple__55, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 882; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":884 * indexer.fill(-1) * * if limit is None: # <<<<<<<<<<<<<< * lim = nright * else: */ __pyx_t_12 = (__pyx_v_limit == Py_None); __pyx_t_13 = (__pyx_t_12 != 0); if (__pyx_t_13) { /* "pandas/src/generated.pyx":885 * * if limit is None: * lim = nright # <<<<<<<<<<<<<< * else: * if limit < 0: */ __pyx_v_lim = __pyx_v_nright; goto __pyx_L3; } /*else*/ { /* "pandas/src/generated.pyx":887 * lim = nright * else: * if limit < 0: # <<<<<<<<<<<<<< * raise ValueError('Limit must be non-negative') * lim = limit */ __pyx_t_2 = PyObject_RichCompare(__pyx_v_limit, __pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 887; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_13 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 887; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_13) { /* "pandas/src/generated.pyx":888 * else: * if limit < 0: * raise ValueError('Limit must be non-negative') # <<<<<<<<<<<<<< * lim = limit * */ __pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__56, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 888; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 888; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } /* "pandas/src/generated.pyx":889 * if limit < 0: * raise ValueError('Limit must be non-negative') * lim = limit # <<<<<<<<<<<<<< * * if nleft == 0 or nright == 0 or new[0] > old[nleft - 1]: */ __pyx_t_8 = __Pyx_PyInt_As_int(__pyx_v_limit); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 889; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_lim = __pyx_t_8; } __pyx_L3:; /* "pandas/src/generated.pyx":891 * lim = limit * * if nleft == 0 or nright == 0 or new[0] > old[nleft - 1]: # <<<<<<<<<<<<<< * return indexer * */ __pyx_t_13 = ((__pyx_v_nleft == 0) != 0); if (!__pyx_t_13) { __pyx_t_12 = ((__pyx_v_nright == 0) != 0); if (!__pyx_t_12) { __pyx_t_14 = 0; __pyx_t_1 = (__pyx_v_nleft - 1); __pyx_t_15 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_new.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_new.diminfo[0].strides)) > (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_old.rcbuffer->pybuffer.buf, __pyx_t_1, __pyx_pybuffernd_old.diminfo[0].strides))) != 0); __pyx_t_16 = __pyx_t_15; } else { __pyx_t_16 = __pyx_t_12; } __pyx_t_12 = __pyx_t_16; } else { __pyx_t_12 = __pyx_t_13; } if (__pyx_t_12) { /* "pandas/src/generated.pyx":892 * * if nleft == 0 or nright == 0 or new[0] > old[nleft - 1]: * return indexer # <<<<<<<<<<<<<< * * i = nleft - 1 */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_indexer)); __pyx_r = ((PyObject *)__pyx_v_indexer); goto __pyx_L0; } /* "pandas/src/generated.pyx":894 * return indexer * * i = nleft - 1 # <<<<<<<<<<<<<< * j = nright - 1 * */ __pyx_v_i = (__pyx_v_nleft - 1); /* "pandas/src/generated.pyx":895 * * i = nleft - 1 * j = nright - 1 # <<<<<<<<<<<<<< * * cur = old[nleft - 1] */ __pyx_v_j = (__pyx_v_nright - 1); /* "pandas/src/generated.pyx":897 * j = nright - 1 * * cur = old[nleft - 1] # <<<<<<<<<<<<<< * * while j >= 0 and new[j] > cur: */ __pyx_t_17 = (__pyx_v_nleft - 1); __pyx_v_cur = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_old.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_old.diminfo[0].strides)); /* "pandas/src/generated.pyx":899 * cur = old[nleft - 1] * * while j >= 0 and new[j] > cur: # <<<<<<<<<<<<<< * j -= 1 * */ while (1) { __pyx_t_12 = ((__pyx_v_j >= 0) != 0); if (__pyx_t_12) { __pyx_t_18 = __pyx_v_j; __pyx_t_13 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_new.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_new.diminfo[0].strides)) > __pyx_v_cur) != 0); __pyx_t_16 = __pyx_t_13; } else { __pyx_t_16 = __pyx_t_12; } if (!__pyx_t_16) break; /* "pandas/src/generated.pyx":900 * * while j >= 0 and new[j] > cur: * j -= 1 # <<<<<<<<<<<<<< * * while True: */ __pyx_v_j = (__pyx_v_j - 1); } /* "pandas/src/generated.pyx":902 * j -= 1 * * while True: # <<<<<<<<<<<<<< * if j < 0: * break */ while (1) { /* "pandas/src/generated.pyx":903 * * while True: * if j < 0: # <<<<<<<<<<<<<< * break * */ __pyx_t_16 = ((__pyx_v_j < 0) != 0); if (__pyx_t_16) { /* "pandas/src/generated.pyx":904 * while True: * if j < 0: * break # <<<<<<<<<<<<<< * * if i == 0: */ goto __pyx_L9_break; } /* "pandas/src/generated.pyx":906 * break * * if i == 0: # <<<<<<<<<<<<<< * while j >= 0: * if new[j] == cur: */ __pyx_t_16 = ((__pyx_v_i == 0) != 0); if (__pyx_t_16) { /* "pandas/src/generated.pyx":907 * * if i == 0: * while j >= 0: # <<<<<<<<<<<<<< * if new[j] == cur: * indexer[j] = i */ while (1) { __pyx_t_16 = ((__pyx_v_j >= 0) != 0); if (!__pyx_t_16) break; /* "pandas/src/generated.pyx":908 * if i == 0: * while j >= 0: * if new[j] == cur: # <<<<<<<<<<<<<< * indexer[j] = i * elif new[j] < cur and fill_count < lim: */ __pyx_t_19 = __pyx_v_j; __pyx_t_16 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_new.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_new.diminfo[0].strides)) == __pyx_v_cur) != 0); if (__pyx_t_16) { /* "pandas/src/generated.pyx":909 * while j >= 0: * if new[j] == cur: * indexer[j] = i # <<<<<<<<<<<<<< * elif new[j] < cur and fill_count < lim: * indexer[j] = i */ __pyx_t_20 = __pyx_v_j; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_indexer.diminfo[0].strides) = __pyx_v_i; goto __pyx_L14; } /* "pandas/src/generated.pyx":910 * if new[j] == cur: * indexer[j] = i * elif new[j] < cur and fill_count < lim: # <<<<<<<<<<<<<< * indexer[j] = i * fill_count += 1 */ __pyx_t_21 = __pyx_v_j; __pyx_t_16 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_new.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_new.diminfo[0].strides)) < __pyx_v_cur) != 0); if (__pyx_t_16) { __pyx_t_12 = ((__pyx_v_fill_count < __pyx_v_lim) != 0); __pyx_t_13 = __pyx_t_12; } else { __pyx_t_13 = __pyx_t_16; } if (__pyx_t_13) { /* "pandas/src/generated.pyx":911 * indexer[j] = i * elif new[j] < cur and fill_count < lim: * indexer[j] = i # <<<<<<<<<<<<<< * fill_count += 1 * j -= 1 */ __pyx_t_22 = __pyx_v_j; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_22, __pyx_pybuffernd_indexer.diminfo[0].strides) = __pyx_v_i; /* "pandas/src/generated.pyx":912 * elif new[j] < cur and fill_count < lim: * indexer[j] = i * fill_count += 1 # <<<<<<<<<<<<<< * j -= 1 * break */ __pyx_v_fill_count = (__pyx_v_fill_count + 1); goto __pyx_L14; } __pyx_L14:; /* "pandas/src/generated.pyx":913 * indexer[j] = i * fill_count += 1 * j -= 1 # <<<<<<<<<<<<<< * break * */ __pyx_v_j = (__pyx_v_j - 1); } /* "pandas/src/generated.pyx":914 * fill_count += 1 * j -= 1 * break # <<<<<<<<<<<<<< * * prev = old[i - 1] */ goto __pyx_L9_break; } /* "pandas/src/generated.pyx":916 * break * * prev = old[i - 1] # <<<<<<<<<<<<<< * * while j >= 0 and prev < new[j] <= cur: */ __pyx_t_23 = (__pyx_v_i - 1); __pyx_v_prev = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_old.rcbuffer->pybuffer.buf, __pyx_t_23, __pyx_pybuffernd_old.diminfo[0].strides)); /* "pandas/src/generated.pyx":918 * prev = old[i - 1] * * while j >= 0 and prev < new[j] <= cur: # <<<<<<<<<<<<<< * if new[j] == cur: * indexer[j] = i */ while (1) { __pyx_t_13 = ((__pyx_v_j >= 0) != 0); if (__pyx_t_13) { __pyx_t_24 = __pyx_v_j; __pyx_t_25 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_new.rcbuffer->pybuffer.buf, __pyx_t_24, __pyx_pybuffernd_new.diminfo[0].strides)); __pyx_t_16 = (__pyx_v_prev < __pyx_t_25); if (__pyx_t_16) { __pyx_t_16 = (__pyx_t_25 <= __pyx_v_cur); } __pyx_t_12 = (__pyx_t_16 != 0); } else { __pyx_t_12 = __pyx_t_13; } if (!__pyx_t_12) break; /* "pandas/src/generated.pyx":919 * * while j >= 0 and prev < new[j] <= cur: * if new[j] == cur: # <<<<<<<<<<<<<< * indexer[j] = i * elif new[j] < cur and fill_count < lim: */ __pyx_t_26 = __pyx_v_j; __pyx_t_12 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_new.rcbuffer->pybuffer.buf, __pyx_t_26, __pyx_pybuffernd_new.diminfo[0].strides)) == __pyx_v_cur) != 0); if (__pyx_t_12) { /* "pandas/src/generated.pyx":920 * while j >= 0 and prev < new[j] <= cur: * if new[j] == cur: * indexer[j] = i # <<<<<<<<<<<<<< * elif new[j] < cur and fill_count < lim: * indexer[j] = i */ __pyx_t_27 = __pyx_v_j; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_27, __pyx_pybuffernd_indexer.diminfo[0].strides) = __pyx_v_i; goto __pyx_L17; } /* "pandas/src/generated.pyx":921 * if new[j] == cur: * indexer[j] = i * elif new[j] < cur and fill_count < lim: # <<<<<<<<<<<<<< * indexer[j] = i * fill_count += 1 */ __pyx_t_28 = __pyx_v_j; __pyx_t_12 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_new.rcbuffer->pybuffer.buf, __pyx_t_28, __pyx_pybuffernd_new.diminfo[0].strides)) < __pyx_v_cur) != 0); if (__pyx_t_12) { __pyx_t_13 = ((__pyx_v_fill_count < __pyx_v_lim) != 0); __pyx_t_16 = __pyx_t_13; } else { __pyx_t_16 = __pyx_t_12; } if (__pyx_t_16) { /* "pandas/src/generated.pyx":922 * indexer[j] = i * elif new[j] < cur and fill_count < lim: * indexer[j] = i # <<<<<<<<<<<<<< * fill_count += 1 * j -= 1 */ __pyx_t_29 = __pyx_v_j; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_29, __pyx_pybuffernd_indexer.diminfo[0].strides) = __pyx_v_i; /* "pandas/src/generated.pyx":923 * elif new[j] < cur and fill_count < lim: * indexer[j] = i * fill_count += 1 # <<<<<<<<<<<<<< * j -= 1 * */ __pyx_v_fill_count = (__pyx_v_fill_count + 1); goto __pyx_L17; } __pyx_L17:; /* "pandas/src/generated.pyx":924 * indexer[j] = i * fill_count += 1 * j -= 1 # <<<<<<<<<<<<<< * * fill_count = 0 */ __pyx_v_j = (__pyx_v_j - 1); } /* "pandas/src/generated.pyx":926 * j -= 1 * * fill_count = 0 # <<<<<<<<<<<<<< * i -= 1 * cur = prev */ __pyx_v_fill_count = 0; /* "pandas/src/generated.pyx":927 * * fill_count = 0 * i -= 1 # <<<<<<<<<<<<<< * cur = prev * */ __pyx_v_i = (__pyx_v_i - 1); /* "pandas/src/generated.pyx":928 * fill_count = 0 * i -= 1 * cur = prev # <<<<<<<<<<<<<< * * return indexer */ __pyx_v_cur = __pyx_v_prev; } __pyx_L9_break:; /* "pandas/src/generated.pyx":930 * cur = prev * * return indexer # <<<<<<<<<<<<<< * * @cython.boundscheck(False) */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_indexer)); __pyx_r = ((PyObject *)__pyx_v_indexer); goto __pyx_L0; /* "pandas/src/generated.pyx":872 * @cython.boundscheck(False) * @cython.wraparound(False) * def backfill_int64(ndarray[int64_t] old, ndarray[int64_t] new, # <<<<<<<<<<<<<< * limit=None): * cdef Py_ssize_t i, j, nleft, nright */ /* 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_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_new.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_old.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.backfill_int64", __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_new.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_old.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_indexer); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":934 * @cython.boundscheck(False) * @cython.wraparound(False) * def backfill_bool(ndarray[uint8_t] old, ndarray[uint8_t] new, # <<<<<<<<<<<<<< * limit=None): * cdef Py_ssize_t i, j, nleft, nright */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_137backfill_bool(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_137backfill_bool = {__Pyx_NAMESTR("backfill_bool"), (PyCFunction)__pyx_pw_6pandas_5algos_137backfill_bool, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_137backfill_bool(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_old = 0; PyArrayObject *__pyx_v_new = 0; PyObject *__pyx_v_limit = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("backfill_bool (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_old,&__pyx_n_s_new,&__pyx_n_s_limit,0}; PyObject* values[3] = {0,0,0}; /* "pandas/src/generated.pyx":935 * @cython.wraparound(False) * def backfill_bool(ndarray[uint8_t] old, ndarray[uint8_t] new, * limit=None): # <<<<<<<<<<<<<< * cdef Py_ssize_t i, j, nleft, nright * cdef ndarray[int64_t, ndim=1] indexer */ values[2] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_old)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_new)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("backfill_bool", 0, 2, 3, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 934; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_limit); if (value) { values[2] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "backfill_bool") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 934; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_old = ((PyArrayObject *)values[0]); __pyx_v_new = ((PyArrayObject *)values[1]); __pyx_v_limit = values[2]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("backfill_bool", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 934; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.backfill_bool", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_old), __pyx_ptype_5numpy_ndarray, 1, "old", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 934; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_new), __pyx_ptype_5numpy_ndarray, 1, "new", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 934; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_136backfill_bool(__pyx_self, __pyx_v_old, __pyx_v_new, __pyx_v_limit); /* "pandas/src/generated.pyx":934 * @cython.boundscheck(False) * @cython.wraparound(False) * def backfill_bool(ndarray[uint8_t] old, ndarray[uint8_t] new, # <<<<<<<<<<<<<< * limit=None): * cdef Py_ssize_t i, j, nleft, nright */ /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5algos_136backfill_bool(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_old, PyArrayObject *__pyx_v_new, PyObject *__pyx_v_limit) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_nleft; Py_ssize_t __pyx_v_nright; PyArrayObject *__pyx_v_indexer = 0; __pyx_t_5numpy_uint8_t __pyx_v_cur; __pyx_t_5numpy_uint8_t __pyx_v_prev; int __pyx_v_lim; int __pyx_v_fill_count; __Pyx_LocalBuf_ND __pyx_pybuffernd_indexer; __Pyx_Buffer __pyx_pybuffer_indexer; __Pyx_LocalBuf_ND __pyx_pybuffernd_new; __Pyx_Buffer __pyx_pybuffer_new; __Pyx_LocalBuf_ND __pyx_pybuffernd_old; __Pyx_Buffer __pyx_pybuffer_old; 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; int __pyx_t_12; int __pyx_t_13; long __pyx_t_14; 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; __pyx_t_5numpy_uint8_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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("backfill_bool", 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_old.pybuffer.buf = NULL; __pyx_pybuffer_old.refcount = 0; __pyx_pybuffernd_old.data = NULL; __pyx_pybuffernd_old.rcbuffer = &__pyx_pybuffer_old; __pyx_pybuffer_new.pybuffer.buf = NULL; __pyx_pybuffer_new.refcount = 0; __pyx_pybuffernd_new.data = NULL; __pyx_pybuffernd_new.rcbuffer = &__pyx_pybuffer_new; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_old.rcbuffer->pybuffer, (PyObject*)__pyx_v_old, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 934; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_old.diminfo[0].strides = __pyx_pybuffernd_old.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_old.diminfo[0].shape = __pyx_pybuffernd_old.rcbuffer->pybuffer.shape[0]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_new.rcbuffer->pybuffer, (PyObject*)__pyx_v_new, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 934; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_new.diminfo[0].strides = __pyx_pybuffernd_new.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_new.diminfo[0].shape = __pyx_pybuffernd_new.rcbuffer->pybuffer.shape[0]; /* "pandas/src/generated.pyx":939 * cdef ndarray[int64_t, ndim=1] indexer * cdef uint8_t cur, prev * cdef int lim, fill_count = 0 # <<<<<<<<<<<<<< * * nleft = len(old) */ __pyx_v_fill_count = 0; /* "pandas/src/generated.pyx":941 * cdef int lim, fill_count = 0 * * nleft = len(old) # <<<<<<<<<<<<<< * nright = len(new) * indexer = np.empty(nright, dtype=np.int64) */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_old)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 941; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_nleft = __pyx_t_1; /* "pandas/src/generated.pyx":942 * * nleft = len(old) * nright = len(new) # <<<<<<<<<<<<<< * indexer = np.empty(nright, dtype=np.int64) * indexer.fill(-1) */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_new)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 942; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_nright = __pyx_t_1; /* "pandas/src/generated.pyx":943 * nleft = len(old) * nright = len(new) * indexer = np.empty(nright, dtype=np.int64) # <<<<<<<<<<<<<< * indexer.fill(-1) * */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 943; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 943; __pyx_clineno = __LINE__; goto __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_nright); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 943; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 943; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 943; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 943; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_int64); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 943; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 943; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyObject_Call(__pyx_t_3, __pyx_t_4, __pyx_t_2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 943; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 943; __pyx_clineno = __LINE__; goto __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_int64_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_int64_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_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_filename = __pyx_f[2]; __pyx_lineno = 943; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_7 = 0; __pyx_v_indexer = ((PyArrayObject *)__pyx_t_6); __pyx_t_6 = 0; /* "pandas/src/generated.pyx":944 * nright = len(new) * indexer = np.empty(nright, dtype=np.int64) * indexer.fill(-1) # <<<<<<<<<<<<<< * * if limit is None: */ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_indexer), __pyx_n_s_fill); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 944; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_2 = PyObject_Call(__pyx_t_6, __pyx_tuple__57, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 944; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":946 * indexer.fill(-1) * * if limit is None: # <<<<<<<<<<<<<< * lim = nright * else: */ __pyx_t_12 = (__pyx_v_limit == Py_None); __pyx_t_13 = (__pyx_t_12 != 0); if (__pyx_t_13) { /* "pandas/src/generated.pyx":947 * * if limit is None: * lim = nright # <<<<<<<<<<<<<< * else: * if limit < 0: */ __pyx_v_lim = __pyx_v_nright; goto __pyx_L3; } /*else*/ { /* "pandas/src/generated.pyx":949 * lim = nright * else: * if limit < 0: # <<<<<<<<<<<<<< * raise ValueError('Limit must be non-negative') * lim = limit */ __pyx_t_2 = PyObject_RichCompare(__pyx_v_limit, __pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 949; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_13 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 949; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_13) { /* "pandas/src/generated.pyx":950 * else: * if limit < 0: * raise ValueError('Limit must be non-negative') # <<<<<<<<<<<<<< * lim = limit * */ __pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__58, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 950; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 950; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } /* "pandas/src/generated.pyx":951 * if limit < 0: * raise ValueError('Limit must be non-negative') * lim = limit # <<<<<<<<<<<<<< * * if nleft == 0 or nright == 0 or new[0] > old[nleft - 1]: */ __pyx_t_8 = __Pyx_PyInt_As_int(__pyx_v_limit); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 951; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_lim = __pyx_t_8; } __pyx_L3:; /* "pandas/src/generated.pyx":953 * lim = limit * * if nleft == 0 or nright == 0 or new[0] > old[nleft - 1]: # <<<<<<<<<<<<<< * return indexer * */ __pyx_t_13 = ((__pyx_v_nleft == 0) != 0); if (!__pyx_t_13) { __pyx_t_12 = ((__pyx_v_nright == 0) != 0); if (!__pyx_t_12) { __pyx_t_14 = 0; __pyx_t_1 = (__pyx_v_nleft - 1); __pyx_t_15 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_new.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_new.diminfo[0].strides)) > (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_old.rcbuffer->pybuffer.buf, __pyx_t_1, __pyx_pybuffernd_old.diminfo[0].strides))) != 0); __pyx_t_16 = __pyx_t_15; } else { __pyx_t_16 = __pyx_t_12; } __pyx_t_12 = __pyx_t_16; } else { __pyx_t_12 = __pyx_t_13; } if (__pyx_t_12) { /* "pandas/src/generated.pyx":954 * * if nleft == 0 or nright == 0 or new[0] > old[nleft - 1]: * return indexer # <<<<<<<<<<<<<< * * i = nleft - 1 */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_indexer)); __pyx_r = ((PyObject *)__pyx_v_indexer); goto __pyx_L0; } /* "pandas/src/generated.pyx":956 * return indexer * * i = nleft - 1 # <<<<<<<<<<<<<< * j = nright - 1 * */ __pyx_v_i = (__pyx_v_nleft - 1); /* "pandas/src/generated.pyx":957 * * i = nleft - 1 * j = nright - 1 # <<<<<<<<<<<<<< * * cur = old[nleft - 1] */ __pyx_v_j = (__pyx_v_nright - 1); /* "pandas/src/generated.pyx":959 * j = nright - 1 * * cur = old[nleft - 1] # <<<<<<<<<<<<<< * * while j >= 0 and new[j] > cur: */ __pyx_t_17 = (__pyx_v_nleft - 1); __pyx_v_cur = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_old.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_old.diminfo[0].strides)); /* "pandas/src/generated.pyx":961 * cur = old[nleft - 1] * * while j >= 0 and new[j] > cur: # <<<<<<<<<<<<<< * j -= 1 * */ while (1) { __pyx_t_12 = ((__pyx_v_j >= 0) != 0); if (__pyx_t_12) { __pyx_t_18 = __pyx_v_j; __pyx_t_13 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_new.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_new.diminfo[0].strides)) > __pyx_v_cur) != 0); __pyx_t_16 = __pyx_t_13; } else { __pyx_t_16 = __pyx_t_12; } if (!__pyx_t_16) break; /* "pandas/src/generated.pyx":962 * * while j >= 0 and new[j] > cur: * j -= 1 # <<<<<<<<<<<<<< * * while True: */ __pyx_v_j = (__pyx_v_j - 1); } /* "pandas/src/generated.pyx":964 * j -= 1 * * while True: # <<<<<<<<<<<<<< * if j < 0: * break */ while (1) { /* "pandas/src/generated.pyx":965 * * while True: * if j < 0: # <<<<<<<<<<<<<< * break * */ __pyx_t_16 = ((__pyx_v_j < 0) != 0); if (__pyx_t_16) { /* "pandas/src/generated.pyx":966 * while True: * if j < 0: * break # <<<<<<<<<<<<<< * * if i == 0: */ goto __pyx_L9_break; } /* "pandas/src/generated.pyx":968 * break * * if i == 0: # <<<<<<<<<<<<<< * while j >= 0: * if new[j] == cur: */ __pyx_t_16 = ((__pyx_v_i == 0) != 0); if (__pyx_t_16) { /* "pandas/src/generated.pyx":969 * * if i == 0: * while j >= 0: # <<<<<<<<<<<<<< * if new[j] == cur: * indexer[j] = i */ while (1) { __pyx_t_16 = ((__pyx_v_j >= 0) != 0); if (!__pyx_t_16) break; /* "pandas/src/generated.pyx":970 * if i == 0: * while j >= 0: * if new[j] == cur: # <<<<<<<<<<<<<< * indexer[j] = i * elif new[j] < cur and fill_count < lim: */ __pyx_t_19 = __pyx_v_j; __pyx_t_16 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_new.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_new.diminfo[0].strides)) == __pyx_v_cur) != 0); if (__pyx_t_16) { /* "pandas/src/generated.pyx":971 * while j >= 0: * if new[j] == cur: * indexer[j] = i # <<<<<<<<<<<<<< * elif new[j] < cur and fill_count < lim: * indexer[j] = i */ __pyx_t_20 = __pyx_v_j; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_indexer.diminfo[0].strides) = __pyx_v_i; goto __pyx_L14; } /* "pandas/src/generated.pyx":972 * if new[j] == cur: * indexer[j] = i * elif new[j] < cur and fill_count < lim: # <<<<<<<<<<<<<< * indexer[j] = i * fill_count += 1 */ __pyx_t_21 = __pyx_v_j; __pyx_t_16 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_new.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_new.diminfo[0].strides)) < __pyx_v_cur) != 0); if (__pyx_t_16) { __pyx_t_12 = ((__pyx_v_fill_count < __pyx_v_lim) != 0); __pyx_t_13 = __pyx_t_12; } else { __pyx_t_13 = __pyx_t_16; } if (__pyx_t_13) { /* "pandas/src/generated.pyx":973 * indexer[j] = i * elif new[j] < cur and fill_count < lim: * indexer[j] = i # <<<<<<<<<<<<<< * fill_count += 1 * j -= 1 */ __pyx_t_22 = __pyx_v_j; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_22, __pyx_pybuffernd_indexer.diminfo[0].strides) = __pyx_v_i; /* "pandas/src/generated.pyx":974 * elif new[j] < cur and fill_count < lim: * indexer[j] = i * fill_count += 1 # <<<<<<<<<<<<<< * j -= 1 * break */ __pyx_v_fill_count = (__pyx_v_fill_count + 1); goto __pyx_L14; } __pyx_L14:; /* "pandas/src/generated.pyx":975 * indexer[j] = i * fill_count += 1 * j -= 1 # <<<<<<<<<<<<<< * break * */ __pyx_v_j = (__pyx_v_j - 1); } /* "pandas/src/generated.pyx":976 * fill_count += 1 * j -= 1 * break # <<<<<<<<<<<<<< * * prev = old[i - 1] */ goto __pyx_L9_break; } /* "pandas/src/generated.pyx":978 * break * * prev = old[i - 1] # <<<<<<<<<<<<<< * * while j >= 0 and prev < new[j] <= cur: */ __pyx_t_23 = (__pyx_v_i - 1); __pyx_v_prev = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_old.rcbuffer->pybuffer.buf, __pyx_t_23, __pyx_pybuffernd_old.diminfo[0].strides)); /* "pandas/src/generated.pyx":980 * prev = old[i - 1] * * while j >= 0 and prev < new[j] <= cur: # <<<<<<<<<<<<<< * if new[j] == cur: * indexer[j] = i */ while (1) { __pyx_t_13 = ((__pyx_v_j >= 0) != 0); if (__pyx_t_13) { __pyx_t_24 = __pyx_v_j; __pyx_t_25 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_new.rcbuffer->pybuffer.buf, __pyx_t_24, __pyx_pybuffernd_new.diminfo[0].strides)); __pyx_t_16 = (__pyx_v_prev < __pyx_t_25); if (__pyx_t_16) { __pyx_t_16 = (__pyx_t_25 <= __pyx_v_cur); } __pyx_t_12 = (__pyx_t_16 != 0); } else { __pyx_t_12 = __pyx_t_13; } if (!__pyx_t_12) break; /* "pandas/src/generated.pyx":981 * * while j >= 0 and prev < new[j] <= cur: * if new[j] == cur: # <<<<<<<<<<<<<< * indexer[j] = i * elif new[j] < cur and fill_count < lim: */ __pyx_t_26 = __pyx_v_j; __pyx_t_12 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_new.rcbuffer->pybuffer.buf, __pyx_t_26, __pyx_pybuffernd_new.diminfo[0].strides)) == __pyx_v_cur) != 0); if (__pyx_t_12) { /* "pandas/src/generated.pyx":982 * while j >= 0 and prev < new[j] <= cur: * if new[j] == cur: * indexer[j] = i # <<<<<<<<<<<<<< * elif new[j] < cur and fill_count < lim: * indexer[j] = i */ __pyx_t_27 = __pyx_v_j; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_27, __pyx_pybuffernd_indexer.diminfo[0].strides) = __pyx_v_i; goto __pyx_L17; } /* "pandas/src/generated.pyx":983 * if new[j] == cur: * indexer[j] = i * elif new[j] < cur and fill_count < lim: # <<<<<<<<<<<<<< * indexer[j] = i * fill_count += 1 */ __pyx_t_28 = __pyx_v_j; __pyx_t_12 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_new.rcbuffer->pybuffer.buf, __pyx_t_28, __pyx_pybuffernd_new.diminfo[0].strides)) < __pyx_v_cur) != 0); if (__pyx_t_12) { __pyx_t_13 = ((__pyx_v_fill_count < __pyx_v_lim) != 0); __pyx_t_16 = __pyx_t_13; } else { __pyx_t_16 = __pyx_t_12; } if (__pyx_t_16) { /* "pandas/src/generated.pyx":984 * indexer[j] = i * elif new[j] < cur and fill_count < lim: * indexer[j] = i # <<<<<<<<<<<<<< * fill_count += 1 * j -= 1 */ __pyx_t_29 = __pyx_v_j; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_29, __pyx_pybuffernd_indexer.diminfo[0].strides) = __pyx_v_i; /* "pandas/src/generated.pyx":985 * elif new[j] < cur and fill_count < lim: * indexer[j] = i * fill_count += 1 # <<<<<<<<<<<<<< * j -= 1 * */ __pyx_v_fill_count = (__pyx_v_fill_count + 1); goto __pyx_L17; } __pyx_L17:; /* "pandas/src/generated.pyx":986 * indexer[j] = i * fill_count += 1 * j -= 1 # <<<<<<<<<<<<<< * * fill_count = 0 */ __pyx_v_j = (__pyx_v_j - 1); } /* "pandas/src/generated.pyx":988 * j -= 1 * * fill_count = 0 # <<<<<<<<<<<<<< * i -= 1 * cur = prev */ __pyx_v_fill_count = 0; /* "pandas/src/generated.pyx":989 * * fill_count = 0 * i -= 1 # <<<<<<<<<<<<<< * cur = prev * */ __pyx_v_i = (__pyx_v_i - 1); /* "pandas/src/generated.pyx":990 * fill_count = 0 * i -= 1 * cur = prev # <<<<<<<<<<<<<< * * return indexer */ __pyx_v_cur = __pyx_v_prev; } __pyx_L9_break:; /* "pandas/src/generated.pyx":992 * cur = prev * * return indexer # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_indexer)); __pyx_r = ((PyObject *)__pyx_v_indexer); goto __pyx_L0; /* "pandas/src/generated.pyx":934 * @cython.boundscheck(False) * @cython.wraparound(False) * def backfill_bool(ndarray[uint8_t] old, ndarray[uint8_t] new, # <<<<<<<<<<<<<< * limit=None): * cdef Py_ssize_t i, j, nleft, nright */ /* 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_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_new.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_old.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.backfill_bool", __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_new.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_old.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_indexer); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":997 * @cython.boundscheck(False) * @cython.wraparound(False) * def pad_inplace_float64(ndarray[float64_t] values, # <<<<<<<<<<<<<< * ndarray[uint8_t, cast=True] mask, * limit=None): */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_139pad_inplace_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_139pad_inplace_float64 = {__Pyx_NAMESTR("pad_inplace_float64"), (PyCFunction)__pyx_pw_6pandas_5algos_139pad_inplace_float64, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_139pad_inplace_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_values = 0; PyArrayObject *__pyx_v_mask = 0; PyObject *__pyx_v_limit = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("pad_inplace_float64 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_values,&__pyx_n_s_mask,&__pyx_n_s_limit,0}; PyObject* values[3] = {0,0,0}; /* "pandas/src/generated.pyx":999 * def pad_inplace_float64(ndarray[float64_t] values, * ndarray[uint8_t, cast=True] mask, * limit=None): # <<<<<<<<<<<<<< * cdef Py_ssize_t i, N * cdef float64_t val */ values[2] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_values)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_mask)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("pad_inplace_float64", 0, 2, 3, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 997; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_limit); if (value) { values[2] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "pad_inplace_float64") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 997; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_values = ((PyArrayObject *)values[0]); __pyx_v_mask = ((PyArrayObject *)values[1]); __pyx_v_limit = values[2]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("pad_inplace_float64", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 997; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.pad_inplace_float64", __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_filename = __pyx_f[2]; __pyx_lineno = 997; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_mask), __pyx_ptype_5numpy_ndarray, 1, "mask", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 998; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_138pad_inplace_float64(__pyx_self, __pyx_v_values, __pyx_v_mask, __pyx_v_limit); /* "pandas/src/generated.pyx":997 * @cython.boundscheck(False) * @cython.wraparound(False) * def pad_inplace_float64(ndarray[float64_t] values, # <<<<<<<<<<<<<< * ndarray[uint8_t, cast=True] mask, * limit=None): */ /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5algos_138pad_inplace_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_mask, PyObject *__pyx_v_limit) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_N; __pyx_t_5numpy_float64_t __pyx_v_val; int __pyx_v_lim; int __pyx_v_fill_count; __Pyx_LocalBuf_ND __pyx_pybuffernd_mask; __Pyx_Buffer __pyx_pybuffer_mask; __Pyx_LocalBuf_ND __pyx_pybuffernd_values; __Pyx_Buffer __pyx_pybuffer_values; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; int __pyx_t_2; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; int __pyx_t_5; long __pyx_t_6; Py_ssize_t __pyx_t_7; Py_ssize_t __pyx_t_8; Py_ssize_t __pyx_t_9; Py_ssize_t __pyx_t_10; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("pad_inplace_float64", 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_mask.pybuffer.buf = NULL; __pyx_pybuffer_mask.refcount = 0; __pyx_pybuffernd_mask.data = NULL; __pyx_pybuffernd_mask.rcbuffer = &__pyx_pybuffer_mask; { __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| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 997; __pyx_clineno = __LINE__; goto __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_mask.rcbuffer->pybuffer, (PyObject*)__pyx_v_mask, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 1, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 997; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; /* "pandas/src/generated.pyx":1002 * cdef Py_ssize_t i, N * cdef float64_t val * cdef int lim, fill_count = 0 # <<<<<<<<<<<<<< * * N = len(values) */ __pyx_v_fill_count = 0; /* "pandas/src/generated.pyx":1004 * cdef int lim, fill_count = 0 * * N = len(values) # <<<<<<<<<<<<<< * * # GH 2778 */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1004; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_N = __pyx_t_1; /* "pandas/src/generated.pyx":1007 * * # GH 2778 * if N == 0: # <<<<<<<<<<<<<< * return * */ __pyx_t_2 = ((__pyx_v_N == 0) != 0); if (__pyx_t_2) { /* "pandas/src/generated.pyx":1008 * # GH 2778 * if N == 0: * return # <<<<<<<<<<<<<< * * if limit is None: */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; } /* "pandas/src/generated.pyx":1010 * return * * if limit is None: # <<<<<<<<<<<<<< * lim = N * else: */ __pyx_t_2 = (__pyx_v_limit == Py_None); __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":1011 * * if limit is None: * lim = N # <<<<<<<<<<<<<< * else: * if limit < 0: */ __pyx_v_lim = __pyx_v_N; goto __pyx_L4; } /*else*/ { /* "pandas/src/generated.pyx":1013 * lim = N * else: * if limit < 0: # <<<<<<<<<<<<<< * raise ValueError('Limit must be non-negative') * lim = limit */ __pyx_t_4 = PyObject_RichCompare(__pyx_v_limit, __pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1013; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1013; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_3) { /* "pandas/src/generated.pyx":1014 * else: * if limit < 0: * raise ValueError('Limit must be non-negative') # <<<<<<<<<<<<<< * lim = limit * */ __pyx_t_4 = PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__59, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1014; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 1014; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } /* "pandas/src/generated.pyx":1015 * if limit < 0: * raise ValueError('Limit must be non-negative') * lim = limit # <<<<<<<<<<<<<< * * val = values[0] */ __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_v_limit); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1015; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_lim = __pyx_t_5; } __pyx_L4:; /* "pandas/src/generated.pyx":1017 * lim = limit * * val = values[0] # <<<<<<<<<<<<<< * for i in range(N): * if mask[i]: */ __pyx_t_6 = 0; __pyx_v_val = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_6, __pyx_pybuffernd_values.diminfo[0].strides)); /* "pandas/src/generated.pyx":1018 * * val = values[0] * for i in range(N): # <<<<<<<<<<<<<< * if mask[i]: * if fill_count >= lim: */ __pyx_t_1 = __pyx_v_N; for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_1; __pyx_t_7+=1) { __pyx_v_i = __pyx_t_7; /* "pandas/src/generated.pyx":1019 * val = values[0] * for i in range(N): * if mask[i]: # <<<<<<<<<<<<<< * if fill_count >= lim: * continue */ __pyx_t_8 = __pyx_v_i; __pyx_t_3 = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_mask.rcbuffer->pybuffer.buf, __pyx_t_8, __pyx_pybuffernd_mask.diminfo[0].strides)) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":1020 * for i in range(N): * if mask[i]: * if fill_count >= lim: # <<<<<<<<<<<<<< * continue * fill_count += 1 */ __pyx_t_3 = ((__pyx_v_fill_count >= __pyx_v_lim) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":1021 * if mask[i]: * if fill_count >= lim: * continue # <<<<<<<<<<<<<< * fill_count += 1 * values[i] = val */ goto __pyx_L6_continue; } /* "pandas/src/generated.pyx":1022 * if fill_count >= lim: * continue * fill_count += 1 # <<<<<<<<<<<<<< * values[i] = val * else: */ __pyx_v_fill_count = (__pyx_v_fill_count + 1); /* "pandas/src/generated.pyx":1023 * continue * fill_count += 1 * values[i] = val # <<<<<<<<<<<<<< * else: * fill_count = 0 */ __pyx_t_9 = __pyx_v_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_9, __pyx_pybuffernd_values.diminfo[0].strides) = __pyx_v_val; goto __pyx_L8; } /*else*/ { /* "pandas/src/generated.pyx":1025 * values[i] = val * else: * fill_count = 0 # <<<<<<<<<<<<<< * val = values[i] * */ __pyx_v_fill_count = 0; /* "pandas/src/generated.pyx":1026 * else: * fill_count = 0 * val = values[i] # <<<<<<<<<<<<<< * * @cython.boundscheck(False) */ __pyx_t_10 = __pyx_v_i; __pyx_v_val = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_10, __pyx_pybuffernd_values.diminfo[0].strides)); } __pyx_L8:; __pyx_L6_continue:; } /* "pandas/src/generated.pyx":997 * @cython.boundscheck(False) * @cython.wraparound(False) * def pad_inplace_float64(ndarray[float64_t] values, # <<<<<<<<<<<<<< * ndarray[uint8_t, cast=True] mask, * limit=None): */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_4); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_mask.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.pad_inplace_float64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_mask.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":1030 * @cython.boundscheck(False) * @cython.wraparound(False) * def pad_inplace_float32(ndarray[float32_t] values, # <<<<<<<<<<<<<< * ndarray[uint8_t, cast=True] mask, * limit=None): */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_141pad_inplace_float32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_141pad_inplace_float32 = {__Pyx_NAMESTR("pad_inplace_float32"), (PyCFunction)__pyx_pw_6pandas_5algos_141pad_inplace_float32, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_141pad_inplace_float32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_values = 0; PyArrayObject *__pyx_v_mask = 0; PyObject *__pyx_v_limit = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("pad_inplace_float32 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_values,&__pyx_n_s_mask,&__pyx_n_s_limit,0}; PyObject* values[3] = {0,0,0}; /* "pandas/src/generated.pyx":1032 * def pad_inplace_float32(ndarray[float32_t] values, * ndarray[uint8_t, cast=True] mask, * limit=None): # <<<<<<<<<<<<<< * cdef Py_ssize_t i, N * cdef float32_t val */ values[2] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_values)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_mask)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("pad_inplace_float32", 0, 2, 3, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1030; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_limit); if (value) { values[2] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "pad_inplace_float32") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1030; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_values = ((PyArrayObject *)values[0]); __pyx_v_mask = ((PyArrayObject *)values[1]); __pyx_v_limit = values[2]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("pad_inplace_float32", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1030; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.pad_inplace_float32", __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_filename = __pyx_f[2]; __pyx_lineno = 1030; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_mask), __pyx_ptype_5numpy_ndarray, 1, "mask", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1031; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_140pad_inplace_float32(__pyx_self, __pyx_v_values, __pyx_v_mask, __pyx_v_limit); /* "pandas/src/generated.pyx":1030 * @cython.boundscheck(False) * @cython.wraparound(False) * def pad_inplace_float32(ndarray[float32_t] values, # <<<<<<<<<<<<<< * ndarray[uint8_t, cast=True] mask, * limit=None): */ /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5algos_140pad_inplace_float32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_mask, PyObject *__pyx_v_limit) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_N; __pyx_t_5numpy_float32_t __pyx_v_val; int __pyx_v_lim; int __pyx_v_fill_count; __Pyx_LocalBuf_ND __pyx_pybuffernd_mask; __Pyx_Buffer __pyx_pybuffer_mask; __Pyx_LocalBuf_ND __pyx_pybuffernd_values; __Pyx_Buffer __pyx_pybuffer_values; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; int __pyx_t_2; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; int __pyx_t_5; long __pyx_t_6; Py_ssize_t __pyx_t_7; Py_ssize_t __pyx_t_8; Py_ssize_t __pyx_t_9; Py_ssize_t __pyx_t_10; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("pad_inplace_float32", 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_mask.pybuffer.buf = NULL; __pyx_pybuffer_mask.refcount = 0; __pyx_pybuffernd_mask.data = NULL; __pyx_pybuffernd_mask.rcbuffer = &__pyx_pybuffer_mask; { __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_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1030; __pyx_clineno = __LINE__; goto __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_mask.rcbuffer->pybuffer, (PyObject*)__pyx_v_mask, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 1, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1030; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; /* "pandas/src/generated.pyx":1035 * cdef Py_ssize_t i, N * cdef float32_t val * cdef int lim, fill_count = 0 # <<<<<<<<<<<<<< * * N = len(values) */ __pyx_v_fill_count = 0; /* "pandas/src/generated.pyx":1037 * cdef int lim, fill_count = 0 * * N = len(values) # <<<<<<<<<<<<<< * * # GH 2778 */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1037; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_N = __pyx_t_1; /* "pandas/src/generated.pyx":1040 * * # GH 2778 * if N == 0: # <<<<<<<<<<<<<< * return * */ __pyx_t_2 = ((__pyx_v_N == 0) != 0); if (__pyx_t_2) { /* "pandas/src/generated.pyx":1041 * # GH 2778 * if N == 0: * return # <<<<<<<<<<<<<< * * if limit is None: */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; } /* "pandas/src/generated.pyx":1043 * return * * if limit is None: # <<<<<<<<<<<<<< * lim = N * else: */ __pyx_t_2 = (__pyx_v_limit == Py_None); __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":1044 * * if limit is None: * lim = N # <<<<<<<<<<<<<< * else: * if limit < 0: */ __pyx_v_lim = __pyx_v_N; goto __pyx_L4; } /*else*/ { /* "pandas/src/generated.pyx":1046 * lim = N * else: * if limit < 0: # <<<<<<<<<<<<<< * raise ValueError('Limit must be non-negative') * lim = limit */ __pyx_t_4 = PyObject_RichCompare(__pyx_v_limit, __pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1046; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1046; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_3) { /* "pandas/src/generated.pyx":1047 * else: * if limit < 0: * raise ValueError('Limit must be non-negative') # <<<<<<<<<<<<<< * lim = limit * */ __pyx_t_4 = PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__60, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1047; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 1047; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } /* "pandas/src/generated.pyx":1048 * if limit < 0: * raise ValueError('Limit must be non-negative') * lim = limit # <<<<<<<<<<<<<< * * val = values[0] */ __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_v_limit); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1048; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_lim = __pyx_t_5; } __pyx_L4:; /* "pandas/src/generated.pyx":1050 * lim = limit * * val = values[0] # <<<<<<<<<<<<<< * for i in range(N): * if mask[i]: */ __pyx_t_6 = 0; __pyx_v_val = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_6, __pyx_pybuffernd_values.diminfo[0].strides)); /* "pandas/src/generated.pyx":1051 * * val = values[0] * for i in range(N): # <<<<<<<<<<<<<< * if mask[i]: * if fill_count >= lim: */ __pyx_t_1 = __pyx_v_N; for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_1; __pyx_t_7+=1) { __pyx_v_i = __pyx_t_7; /* "pandas/src/generated.pyx":1052 * val = values[0] * for i in range(N): * if mask[i]: # <<<<<<<<<<<<<< * if fill_count >= lim: * continue */ __pyx_t_8 = __pyx_v_i; __pyx_t_3 = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_mask.rcbuffer->pybuffer.buf, __pyx_t_8, __pyx_pybuffernd_mask.diminfo[0].strides)) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":1053 * for i in range(N): * if mask[i]: * if fill_count >= lim: # <<<<<<<<<<<<<< * continue * fill_count += 1 */ __pyx_t_3 = ((__pyx_v_fill_count >= __pyx_v_lim) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":1054 * if mask[i]: * if fill_count >= lim: * continue # <<<<<<<<<<<<<< * fill_count += 1 * values[i] = val */ goto __pyx_L6_continue; } /* "pandas/src/generated.pyx":1055 * if fill_count >= lim: * continue * fill_count += 1 # <<<<<<<<<<<<<< * values[i] = val * else: */ __pyx_v_fill_count = (__pyx_v_fill_count + 1); /* "pandas/src/generated.pyx":1056 * continue * fill_count += 1 * values[i] = val # <<<<<<<<<<<<<< * else: * fill_count = 0 */ __pyx_t_9 = __pyx_v_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_9, __pyx_pybuffernd_values.diminfo[0].strides) = __pyx_v_val; goto __pyx_L8; } /*else*/ { /* "pandas/src/generated.pyx":1058 * values[i] = val * else: * fill_count = 0 # <<<<<<<<<<<<<< * val = values[i] * */ __pyx_v_fill_count = 0; /* "pandas/src/generated.pyx":1059 * else: * fill_count = 0 * val = values[i] # <<<<<<<<<<<<<< * * @cython.boundscheck(False) */ __pyx_t_10 = __pyx_v_i; __pyx_v_val = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_10, __pyx_pybuffernd_values.diminfo[0].strides)); } __pyx_L8:; __pyx_L6_continue:; } /* "pandas/src/generated.pyx":1030 * @cython.boundscheck(False) * @cython.wraparound(False) * def pad_inplace_float32(ndarray[float32_t] values, # <<<<<<<<<<<<<< * ndarray[uint8_t, cast=True] mask, * limit=None): */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_4); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_mask.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.pad_inplace_float32", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_mask.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":1063 * @cython.boundscheck(False) * @cython.wraparound(False) * def pad_inplace_object(ndarray[object] values, # <<<<<<<<<<<<<< * ndarray[uint8_t, cast=True] mask, * limit=None): */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_143pad_inplace_object(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_143pad_inplace_object = {__Pyx_NAMESTR("pad_inplace_object"), (PyCFunction)__pyx_pw_6pandas_5algos_143pad_inplace_object, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_143pad_inplace_object(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_values = 0; PyArrayObject *__pyx_v_mask = 0; PyObject *__pyx_v_limit = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("pad_inplace_object (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_values,&__pyx_n_s_mask,&__pyx_n_s_limit,0}; PyObject* values[3] = {0,0,0}; /* "pandas/src/generated.pyx":1065 * def pad_inplace_object(ndarray[object] values, * ndarray[uint8_t, cast=True] mask, * limit=None): # <<<<<<<<<<<<<< * cdef Py_ssize_t i, N * cdef object val */ values[2] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_values)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_mask)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("pad_inplace_object", 0, 2, 3, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1063; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_limit); if (value) { values[2] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "pad_inplace_object") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1063; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_values = ((PyArrayObject *)values[0]); __pyx_v_mask = ((PyArrayObject *)values[1]); __pyx_v_limit = values[2]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("pad_inplace_object", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1063; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.pad_inplace_object", __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_filename = __pyx_f[2]; __pyx_lineno = 1063; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_mask), __pyx_ptype_5numpy_ndarray, 1, "mask", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1064; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_142pad_inplace_object(__pyx_self, __pyx_v_values, __pyx_v_mask, __pyx_v_limit); /* "pandas/src/generated.pyx":1063 * @cython.boundscheck(False) * @cython.wraparound(False) * def pad_inplace_object(ndarray[object] values, # <<<<<<<<<<<<<< * ndarray[uint8_t, cast=True] mask, * limit=None): */ /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5algos_142pad_inplace_object(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_mask, PyObject *__pyx_v_limit) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_N; PyObject *__pyx_v_val = 0; int __pyx_v_lim; int __pyx_v_fill_count; __Pyx_LocalBuf_ND __pyx_pybuffernd_mask; __Pyx_Buffer __pyx_pybuffer_mask; __Pyx_LocalBuf_ND __pyx_pybuffernd_values; __Pyx_Buffer __pyx_pybuffer_values; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; int __pyx_t_2; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; int __pyx_t_5; long __pyx_t_6; Py_ssize_t __pyx_t_7; Py_ssize_t __pyx_t_8; Py_ssize_t __pyx_t_9; PyObject **__pyx_t_10; Py_ssize_t __pyx_t_11; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("pad_inplace_object", 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_mask.pybuffer.buf = NULL; __pyx_pybuffer_mask.refcount = 0; __pyx_pybuffernd_mask.data = NULL; __pyx_pybuffernd_mask.rcbuffer = &__pyx_pybuffer_mask; { __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| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1063; __pyx_clineno = __LINE__; goto __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_mask.rcbuffer->pybuffer, (PyObject*)__pyx_v_mask, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 1, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1063; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; /* "pandas/src/generated.pyx":1068 * cdef Py_ssize_t i, N * cdef object val * cdef int lim, fill_count = 0 # <<<<<<<<<<<<<< * * N = len(values) */ __pyx_v_fill_count = 0; /* "pandas/src/generated.pyx":1070 * cdef int lim, fill_count = 0 * * N = len(values) # <<<<<<<<<<<<<< * * # GH 2778 */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1070; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_N = __pyx_t_1; /* "pandas/src/generated.pyx":1073 * * # GH 2778 * if N == 0: # <<<<<<<<<<<<<< * return * */ __pyx_t_2 = ((__pyx_v_N == 0) != 0); if (__pyx_t_2) { /* "pandas/src/generated.pyx":1074 * # GH 2778 * if N == 0: * return # <<<<<<<<<<<<<< * * if limit is None: */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; } /* "pandas/src/generated.pyx":1076 * return * * if limit is None: # <<<<<<<<<<<<<< * lim = N * else: */ __pyx_t_2 = (__pyx_v_limit == Py_None); __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":1077 * * if limit is None: * lim = N # <<<<<<<<<<<<<< * else: * if limit < 0: */ __pyx_v_lim = __pyx_v_N; goto __pyx_L4; } /*else*/ { /* "pandas/src/generated.pyx":1079 * lim = N * else: * if limit < 0: # <<<<<<<<<<<<<< * raise ValueError('Limit must be non-negative') * lim = limit */ __pyx_t_4 = PyObject_RichCompare(__pyx_v_limit, __pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1079; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1079; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_3) { /* "pandas/src/generated.pyx":1080 * else: * if limit < 0: * raise ValueError('Limit must be non-negative') # <<<<<<<<<<<<<< * lim = limit * */ __pyx_t_4 = PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__61, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1080; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 1080; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } /* "pandas/src/generated.pyx":1081 * if limit < 0: * raise ValueError('Limit must be non-negative') * lim = limit # <<<<<<<<<<<<<< * * val = values[0] */ __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_v_limit); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1081; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_lim = __pyx_t_5; } __pyx_L4:; /* "pandas/src/generated.pyx":1083 * lim = limit * * val = values[0] # <<<<<<<<<<<<<< * for i in range(N): * if mask[i]: */ __pyx_t_6 = 0; __pyx_t_4 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_6, __pyx_pybuffernd_values.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_4); __pyx_v_val = __pyx_t_4; __pyx_t_4 = 0; /* "pandas/src/generated.pyx":1084 * * val = values[0] * for i in range(N): # <<<<<<<<<<<<<< * if mask[i]: * if fill_count >= lim: */ __pyx_t_1 = __pyx_v_N; for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_1; __pyx_t_7+=1) { __pyx_v_i = __pyx_t_7; /* "pandas/src/generated.pyx":1085 * val = values[0] * for i in range(N): * if mask[i]: # <<<<<<<<<<<<<< * if fill_count >= lim: * continue */ __pyx_t_8 = __pyx_v_i; __pyx_t_3 = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_mask.rcbuffer->pybuffer.buf, __pyx_t_8, __pyx_pybuffernd_mask.diminfo[0].strides)) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":1086 * for i in range(N): * if mask[i]: * if fill_count >= lim: # <<<<<<<<<<<<<< * continue * fill_count += 1 */ __pyx_t_3 = ((__pyx_v_fill_count >= __pyx_v_lim) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":1087 * if mask[i]: * if fill_count >= lim: * continue # <<<<<<<<<<<<<< * fill_count += 1 * values[i] = val */ goto __pyx_L6_continue; } /* "pandas/src/generated.pyx":1088 * if fill_count >= lim: * continue * fill_count += 1 # <<<<<<<<<<<<<< * values[i] = val * else: */ __pyx_v_fill_count = (__pyx_v_fill_count + 1); /* "pandas/src/generated.pyx":1089 * continue * fill_count += 1 * values[i] = val # <<<<<<<<<<<<<< * else: * fill_count = 0 */ __pyx_t_9 = __pyx_v_i; __pyx_t_10 = __Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_9, __pyx_pybuffernd_values.diminfo[0].strides); __Pyx_GOTREF(*__pyx_t_10); __Pyx_INCREF(__pyx_v_val); __Pyx_DECREF(*__pyx_t_10); *__pyx_t_10 = __pyx_v_val; __Pyx_GIVEREF(*__pyx_t_10); goto __pyx_L8; } /*else*/ { /* "pandas/src/generated.pyx":1091 * values[i] = val * else: * fill_count = 0 # <<<<<<<<<<<<<< * val = values[i] * */ __pyx_v_fill_count = 0; /* "pandas/src/generated.pyx":1092 * else: * fill_count = 0 * val = values[i] # <<<<<<<<<<<<<< * * @cython.boundscheck(False) */ __pyx_t_11 = __pyx_v_i; __pyx_t_4 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_11, __pyx_pybuffernd_values.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_4); __Pyx_DECREF_SET(__pyx_v_val, __pyx_t_4); __pyx_t_4 = 0; } __pyx_L8:; __pyx_L6_continue:; } /* "pandas/src/generated.pyx":1063 * @cython.boundscheck(False) * @cython.wraparound(False) * def pad_inplace_object(ndarray[object] values, # <<<<<<<<<<<<<< * ndarray[uint8_t, cast=True] mask, * limit=None): */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_4); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_mask.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.pad_inplace_object", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_mask.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF(__pyx_v_val); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":1096 * @cython.boundscheck(False) * @cython.wraparound(False) * def pad_inplace_int32(ndarray[int32_t] values, # <<<<<<<<<<<<<< * ndarray[uint8_t, cast=True] mask, * limit=None): */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_145pad_inplace_int32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_145pad_inplace_int32 = {__Pyx_NAMESTR("pad_inplace_int32"), (PyCFunction)__pyx_pw_6pandas_5algos_145pad_inplace_int32, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_145pad_inplace_int32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_values = 0; PyArrayObject *__pyx_v_mask = 0; PyObject *__pyx_v_limit = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("pad_inplace_int32 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_values,&__pyx_n_s_mask,&__pyx_n_s_limit,0}; PyObject* values[3] = {0,0,0}; /* "pandas/src/generated.pyx":1098 * def pad_inplace_int32(ndarray[int32_t] values, * ndarray[uint8_t, cast=True] mask, * limit=None): # <<<<<<<<<<<<<< * cdef Py_ssize_t i, N * cdef int32_t val */ values[2] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_values)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_mask)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("pad_inplace_int32", 0, 2, 3, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1096; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_limit); if (value) { values[2] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "pad_inplace_int32") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1096; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_values = ((PyArrayObject *)values[0]); __pyx_v_mask = ((PyArrayObject *)values[1]); __pyx_v_limit = values[2]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("pad_inplace_int32", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1096; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.pad_inplace_int32", __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_filename = __pyx_f[2]; __pyx_lineno = 1096; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_mask), __pyx_ptype_5numpy_ndarray, 1, "mask", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1097; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_144pad_inplace_int32(__pyx_self, __pyx_v_values, __pyx_v_mask, __pyx_v_limit); /* "pandas/src/generated.pyx":1096 * @cython.boundscheck(False) * @cython.wraparound(False) * def pad_inplace_int32(ndarray[int32_t] values, # <<<<<<<<<<<<<< * ndarray[uint8_t, cast=True] mask, * limit=None): */ /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5algos_144pad_inplace_int32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_mask, PyObject *__pyx_v_limit) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_N; __pyx_t_5numpy_int32_t __pyx_v_val; int __pyx_v_lim; int __pyx_v_fill_count; __Pyx_LocalBuf_ND __pyx_pybuffernd_mask; __Pyx_Buffer __pyx_pybuffer_mask; __Pyx_LocalBuf_ND __pyx_pybuffernd_values; __Pyx_Buffer __pyx_pybuffer_values; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; int __pyx_t_2; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; int __pyx_t_5; long __pyx_t_6; Py_ssize_t __pyx_t_7; Py_ssize_t __pyx_t_8; Py_ssize_t __pyx_t_9; Py_ssize_t __pyx_t_10; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("pad_inplace_int32", 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_mask.pybuffer.buf = NULL; __pyx_pybuffer_mask.refcount = 0; __pyx_pybuffernd_mask.data = NULL; __pyx_pybuffernd_mask.rcbuffer = &__pyx_pybuffer_mask; { __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_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1096; __pyx_clineno = __LINE__; goto __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_mask.rcbuffer->pybuffer, (PyObject*)__pyx_v_mask, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 1, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1096; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; /* "pandas/src/generated.pyx":1101 * cdef Py_ssize_t i, N * cdef int32_t val * cdef int lim, fill_count = 0 # <<<<<<<<<<<<<< * * N = len(values) */ __pyx_v_fill_count = 0; /* "pandas/src/generated.pyx":1103 * cdef int lim, fill_count = 0 * * N = len(values) # <<<<<<<<<<<<<< * * # GH 2778 */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1103; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_N = __pyx_t_1; /* "pandas/src/generated.pyx":1106 * * # GH 2778 * if N == 0: # <<<<<<<<<<<<<< * return * */ __pyx_t_2 = ((__pyx_v_N == 0) != 0); if (__pyx_t_2) { /* "pandas/src/generated.pyx":1107 * # GH 2778 * if N == 0: * return # <<<<<<<<<<<<<< * * if limit is None: */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; } /* "pandas/src/generated.pyx":1109 * return * * if limit is None: # <<<<<<<<<<<<<< * lim = N * else: */ __pyx_t_2 = (__pyx_v_limit == Py_None); __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":1110 * * if limit is None: * lim = N # <<<<<<<<<<<<<< * else: * if limit < 0: */ __pyx_v_lim = __pyx_v_N; goto __pyx_L4; } /*else*/ { /* "pandas/src/generated.pyx":1112 * lim = N * else: * if limit < 0: # <<<<<<<<<<<<<< * raise ValueError('Limit must be non-negative') * lim = limit */ __pyx_t_4 = PyObject_RichCompare(__pyx_v_limit, __pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1112; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1112; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_3) { /* "pandas/src/generated.pyx":1113 * else: * if limit < 0: * raise ValueError('Limit must be non-negative') # <<<<<<<<<<<<<< * lim = limit * */ __pyx_t_4 = PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__62, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1113; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 1113; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } /* "pandas/src/generated.pyx":1114 * if limit < 0: * raise ValueError('Limit must be non-negative') * lim = limit # <<<<<<<<<<<<<< * * val = values[0] */ __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_v_limit); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1114; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_lim = __pyx_t_5; } __pyx_L4:; /* "pandas/src/generated.pyx":1116 * lim = limit * * val = values[0] # <<<<<<<<<<<<<< * for i in range(N): * if mask[i]: */ __pyx_t_6 = 0; __pyx_v_val = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_6, __pyx_pybuffernd_values.diminfo[0].strides)); /* "pandas/src/generated.pyx":1117 * * val = values[0] * for i in range(N): # <<<<<<<<<<<<<< * if mask[i]: * if fill_count >= lim: */ __pyx_t_1 = __pyx_v_N; for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_1; __pyx_t_7+=1) { __pyx_v_i = __pyx_t_7; /* "pandas/src/generated.pyx":1118 * val = values[0] * for i in range(N): * if mask[i]: # <<<<<<<<<<<<<< * if fill_count >= lim: * continue */ __pyx_t_8 = __pyx_v_i; __pyx_t_3 = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_mask.rcbuffer->pybuffer.buf, __pyx_t_8, __pyx_pybuffernd_mask.diminfo[0].strides)) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":1119 * for i in range(N): * if mask[i]: * if fill_count >= lim: # <<<<<<<<<<<<<< * continue * fill_count += 1 */ __pyx_t_3 = ((__pyx_v_fill_count >= __pyx_v_lim) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":1120 * if mask[i]: * if fill_count >= lim: * continue # <<<<<<<<<<<<<< * fill_count += 1 * values[i] = val */ goto __pyx_L6_continue; } /* "pandas/src/generated.pyx":1121 * if fill_count >= lim: * continue * fill_count += 1 # <<<<<<<<<<<<<< * values[i] = val * else: */ __pyx_v_fill_count = (__pyx_v_fill_count + 1); /* "pandas/src/generated.pyx":1122 * continue * fill_count += 1 * values[i] = val # <<<<<<<<<<<<<< * else: * fill_count = 0 */ __pyx_t_9 = __pyx_v_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_9, __pyx_pybuffernd_values.diminfo[0].strides) = __pyx_v_val; goto __pyx_L8; } /*else*/ { /* "pandas/src/generated.pyx":1124 * values[i] = val * else: * fill_count = 0 # <<<<<<<<<<<<<< * val = values[i] * */ __pyx_v_fill_count = 0; /* "pandas/src/generated.pyx":1125 * else: * fill_count = 0 * val = values[i] # <<<<<<<<<<<<<< * * @cython.boundscheck(False) */ __pyx_t_10 = __pyx_v_i; __pyx_v_val = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_10, __pyx_pybuffernd_values.diminfo[0].strides)); } __pyx_L8:; __pyx_L6_continue:; } /* "pandas/src/generated.pyx":1096 * @cython.boundscheck(False) * @cython.wraparound(False) * def pad_inplace_int32(ndarray[int32_t] values, # <<<<<<<<<<<<<< * ndarray[uint8_t, cast=True] mask, * limit=None): */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_4); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_mask.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.pad_inplace_int32", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_mask.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":1129 * @cython.boundscheck(False) * @cython.wraparound(False) * def pad_inplace_int64(ndarray[int64_t] values, # <<<<<<<<<<<<<< * ndarray[uint8_t, cast=True] mask, * limit=None): */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_147pad_inplace_int64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_147pad_inplace_int64 = {__Pyx_NAMESTR("pad_inplace_int64"), (PyCFunction)__pyx_pw_6pandas_5algos_147pad_inplace_int64, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_147pad_inplace_int64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_values = 0; PyArrayObject *__pyx_v_mask = 0; PyObject *__pyx_v_limit = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("pad_inplace_int64 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_values,&__pyx_n_s_mask,&__pyx_n_s_limit,0}; PyObject* values[3] = {0,0,0}; /* "pandas/src/generated.pyx":1131 * def pad_inplace_int64(ndarray[int64_t] values, * ndarray[uint8_t, cast=True] mask, * limit=None): # <<<<<<<<<<<<<< * cdef Py_ssize_t i, N * cdef int64_t val */ values[2] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_values)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_mask)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("pad_inplace_int64", 0, 2, 3, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1129; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_limit); if (value) { values[2] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "pad_inplace_int64") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1129; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_values = ((PyArrayObject *)values[0]); __pyx_v_mask = ((PyArrayObject *)values[1]); __pyx_v_limit = values[2]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("pad_inplace_int64", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1129; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.pad_inplace_int64", __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_filename = __pyx_f[2]; __pyx_lineno = 1129; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_mask), __pyx_ptype_5numpy_ndarray, 1, "mask", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1130; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_146pad_inplace_int64(__pyx_self, __pyx_v_values, __pyx_v_mask, __pyx_v_limit); /* "pandas/src/generated.pyx":1129 * @cython.boundscheck(False) * @cython.wraparound(False) * def pad_inplace_int64(ndarray[int64_t] values, # <<<<<<<<<<<<<< * ndarray[uint8_t, cast=True] mask, * limit=None): */ /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5algos_146pad_inplace_int64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_mask, PyObject *__pyx_v_limit) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_N; __pyx_t_5numpy_int64_t __pyx_v_val; int __pyx_v_lim; int __pyx_v_fill_count; __Pyx_LocalBuf_ND __pyx_pybuffernd_mask; __Pyx_Buffer __pyx_pybuffer_mask; __Pyx_LocalBuf_ND __pyx_pybuffernd_values; __Pyx_Buffer __pyx_pybuffer_values; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; int __pyx_t_2; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; int __pyx_t_5; long __pyx_t_6; Py_ssize_t __pyx_t_7; Py_ssize_t __pyx_t_8; Py_ssize_t __pyx_t_9; Py_ssize_t __pyx_t_10; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("pad_inplace_int64", 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_mask.pybuffer.buf = NULL; __pyx_pybuffer_mask.refcount = 0; __pyx_pybuffernd_mask.data = NULL; __pyx_pybuffernd_mask.rcbuffer = &__pyx_pybuffer_mask; { __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_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1129; __pyx_clineno = __LINE__; goto __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_mask.rcbuffer->pybuffer, (PyObject*)__pyx_v_mask, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 1, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1129; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; /* "pandas/src/generated.pyx":1134 * cdef Py_ssize_t i, N * cdef int64_t val * cdef int lim, fill_count = 0 # <<<<<<<<<<<<<< * * N = len(values) */ __pyx_v_fill_count = 0; /* "pandas/src/generated.pyx":1136 * cdef int lim, fill_count = 0 * * N = len(values) # <<<<<<<<<<<<<< * * # GH 2778 */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1136; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_N = __pyx_t_1; /* "pandas/src/generated.pyx":1139 * * # GH 2778 * if N == 0: # <<<<<<<<<<<<<< * return * */ __pyx_t_2 = ((__pyx_v_N == 0) != 0); if (__pyx_t_2) { /* "pandas/src/generated.pyx":1140 * # GH 2778 * if N == 0: * return # <<<<<<<<<<<<<< * * if limit is None: */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; } /* "pandas/src/generated.pyx":1142 * return * * if limit is None: # <<<<<<<<<<<<<< * lim = N * else: */ __pyx_t_2 = (__pyx_v_limit == Py_None); __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":1143 * * if limit is None: * lim = N # <<<<<<<<<<<<<< * else: * if limit < 0: */ __pyx_v_lim = __pyx_v_N; goto __pyx_L4; } /*else*/ { /* "pandas/src/generated.pyx":1145 * lim = N * else: * if limit < 0: # <<<<<<<<<<<<<< * raise ValueError('Limit must be non-negative') * lim = limit */ __pyx_t_4 = PyObject_RichCompare(__pyx_v_limit, __pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1145; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1145; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_3) { /* "pandas/src/generated.pyx":1146 * else: * if limit < 0: * raise ValueError('Limit must be non-negative') # <<<<<<<<<<<<<< * lim = limit * */ __pyx_t_4 = PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__63, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1146; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 1146; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } /* "pandas/src/generated.pyx":1147 * if limit < 0: * raise ValueError('Limit must be non-negative') * lim = limit # <<<<<<<<<<<<<< * * val = values[0] */ __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_v_limit); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1147; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_lim = __pyx_t_5; } __pyx_L4:; /* "pandas/src/generated.pyx":1149 * lim = limit * * val = values[0] # <<<<<<<<<<<<<< * for i in range(N): * if mask[i]: */ __pyx_t_6 = 0; __pyx_v_val = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_6, __pyx_pybuffernd_values.diminfo[0].strides)); /* "pandas/src/generated.pyx":1150 * * val = values[0] * for i in range(N): # <<<<<<<<<<<<<< * if mask[i]: * if fill_count >= lim: */ __pyx_t_1 = __pyx_v_N; for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_1; __pyx_t_7+=1) { __pyx_v_i = __pyx_t_7; /* "pandas/src/generated.pyx":1151 * val = values[0] * for i in range(N): * if mask[i]: # <<<<<<<<<<<<<< * if fill_count >= lim: * continue */ __pyx_t_8 = __pyx_v_i; __pyx_t_3 = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_mask.rcbuffer->pybuffer.buf, __pyx_t_8, __pyx_pybuffernd_mask.diminfo[0].strides)) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":1152 * for i in range(N): * if mask[i]: * if fill_count >= lim: # <<<<<<<<<<<<<< * continue * fill_count += 1 */ __pyx_t_3 = ((__pyx_v_fill_count >= __pyx_v_lim) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":1153 * if mask[i]: * if fill_count >= lim: * continue # <<<<<<<<<<<<<< * fill_count += 1 * values[i] = val */ goto __pyx_L6_continue; } /* "pandas/src/generated.pyx":1154 * if fill_count >= lim: * continue * fill_count += 1 # <<<<<<<<<<<<<< * values[i] = val * else: */ __pyx_v_fill_count = (__pyx_v_fill_count + 1); /* "pandas/src/generated.pyx":1155 * continue * fill_count += 1 * values[i] = val # <<<<<<<<<<<<<< * else: * fill_count = 0 */ __pyx_t_9 = __pyx_v_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_9, __pyx_pybuffernd_values.diminfo[0].strides) = __pyx_v_val; goto __pyx_L8; } /*else*/ { /* "pandas/src/generated.pyx":1157 * values[i] = val * else: * fill_count = 0 # <<<<<<<<<<<<<< * val = values[i] * */ __pyx_v_fill_count = 0; /* "pandas/src/generated.pyx":1158 * else: * fill_count = 0 * val = values[i] # <<<<<<<<<<<<<< * * @cython.boundscheck(False) */ __pyx_t_10 = __pyx_v_i; __pyx_v_val = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_10, __pyx_pybuffernd_values.diminfo[0].strides)); } __pyx_L8:; __pyx_L6_continue:; } /* "pandas/src/generated.pyx":1129 * @cython.boundscheck(False) * @cython.wraparound(False) * def pad_inplace_int64(ndarray[int64_t] values, # <<<<<<<<<<<<<< * ndarray[uint8_t, cast=True] mask, * limit=None): */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_4); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_mask.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.pad_inplace_int64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_mask.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":1162 * @cython.boundscheck(False) * @cython.wraparound(False) * def pad_inplace_bool(ndarray[uint8_t] values, # <<<<<<<<<<<<<< * ndarray[uint8_t, cast=True] mask, * limit=None): */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_149pad_inplace_bool(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_149pad_inplace_bool = {__Pyx_NAMESTR("pad_inplace_bool"), (PyCFunction)__pyx_pw_6pandas_5algos_149pad_inplace_bool, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_149pad_inplace_bool(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_values = 0; PyArrayObject *__pyx_v_mask = 0; PyObject *__pyx_v_limit = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("pad_inplace_bool (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_values,&__pyx_n_s_mask,&__pyx_n_s_limit,0}; PyObject* values[3] = {0,0,0}; /* "pandas/src/generated.pyx":1164 * def pad_inplace_bool(ndarray[uint8_t] values, * ndarray[uint8_t, cast=True] mask, * limit=None): # <<<<<<<<<<<<<< * cdef Py_ssize_t i, N * cdef uint8_t val */ values[2] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_values)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_mask)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("pad_inplace_bool", 0, 2, 3, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1162; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_limit); if (value) { values[2] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "pad_inplace_bool") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1162; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_values = ((PyArrayObject *)values[0]); __pyx_v_mask = ((PyArrayObject *)values[1]); __pyx_v_limit = values[2]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("pad_inplace_bool", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1162; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.pad_inplace_bool", __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_filename = __pyx_f[2]; __pyx_lineno = 1162; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_mask), __pyx_ptype_5numpy_ndarray, 1, "mask", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1163; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_148pad_inplace_bool(__pyx_self, __pyx_v_values, __pyx_v_mask, __pyx_v_limit); /* "pandas/src/generated.pyx":1162 * @cython.boundscheck(False) * @cython.wraparound(False) * def pad_inplace_bool(ndarray[uint8_t] values, # <<<<<<<<<<<<<< * ndarray[uint8_t, cast=True] mask, * limit=None): */ /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5algos_148pad_inplace_bool(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_mask, PyObject *__pyx_v_limit) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_N; __pyx_t_5numpy_uint8_t __pyx_v_val; int __pyx_v_lim; int __pyx_v_fill_count; __Pyx_LocalBuf_ND __pyx_pybuffernd_mask; __Pyx_Buffer __pyx_pybuffer_mask; __Pyx_LocalBuf_ND __pyx_pybuffernd_values; __Pyx_Buffer __pyx_pybuffer_values; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; int __pyx_t_2; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; int __pyx_t_5; long __pyx_t_6; Py_ssize_t __pyx_t_7; Py_ssize_t __pyx_t_8; Py_ssize_t __pyx_t_9; Py_ssize_t __pyx_t_10; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("pad_inplace_bool", 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_mask.pybuffer.buf = NULL; __pyx_pybuffer_mask.refcount = 0; __pyx_pybuffernd_mask.data = NULL; __pyx_pybuffernd_mask.rcbuffer = &__pyx_pybuffer_mask; { __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_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1162; __pyx_clineno = __LINE__; goto __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_mask.rcbuffer->pybuffer, (PyObject*)__pyx_v_mask, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 1, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1162; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; /* "pandas/src/generated.pyx":1167 * cdef Py_ssize_t i, N * cdef uint8_t val * cdef int lim, fill_count = 0 # <<<<<<<<<<<<<< * * N = len(values) */ __pyx_v_fill_count = 0; /* "pandas/src/generated.pyx":1169 * cdef int lim, fill_count = 0 * * N = len(values) # <<<<<<<<<<<<<< * * # GH 2778 */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1169; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_N = __pyx_t_1; /* "pandas/src/generated.pyx":1172 * * # GH 2778 * if N == 0: # <<<<<<<<<<<<<< * return * */ __pyx_t_2 = ((__pyx_v_N == 0) != 0); if (__pyx_t_2) { /* "pandas/src/generated.pyx":1173 * # GH 2778 * if N == 0: * return # <<<<<<<<<<<<<< * * if limit is None: */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; } /* "pandas/src/generated.pyx":1175 * return * * if limit is None: # <<<<<<<<<<<<<< * lim = N * else: */ __pyx_t_2 = (__pyx_v_limit == Py_None); __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":1176 * * if limit is None: * lim = N # <<<<<<<<<<<<<< * else: * if limit < 0: */ __pyx_v_lim = __pyx_v_N; goto __pyx_L4; } /*else*/ { /* "pandas/src/generated.pyx":1178 * lim = N * else: * if limit < 0: # <<<<<<<<<<<<<< * raise ValueError('Limit must be non-negative') * lim = limit */ __pyx_t_4 = PyObject_RichCompare(__pyx_v_limit, __pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1178; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1178; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_3) { /* "pandas/src/generated.pyx":1179 * else: * if limit < 0: * raise ValueError('Limit must be non-negative') # <<<<<<<<<<<<<< * lim = limit * */ __pyx_t_4 = PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__64, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1179; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 1179; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } /* "pandas/src/generated.pyx":1180 * if limit < 0: * raise ValueError('Limit must be non-negative') * lim = limit # <<<<<<<<<<<<<< * * val = values[0] */ __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_v_limit); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1180; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_lim = __pyx_t_5; } __pyx_L4:; /* "pandas/src/generated.pyx":1182 * lim = limit * * val = values[0] # <<<<<<<<<<<<<< * for i in range(N): * if mask[i]: */ __pyx_t_6 = 0; __pyx_v_val = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_6, __pyx_pybuffernd_values.diminfo[0].strides)); /* "pandas/src/generated.pyx":1183 * * val = values[0] * for i in range(N): # <<<<<<<<<<<<<< * if mask[i]: * if fill_count >= lim: */ __pyx_t_1 = __pyx_v_N; for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_1; __pyx_t_7+=1) { __pyx_v_i = __pyx_t_7; /* "pandas/src/generated.pyx":1184 * val = values[0] * for i in range(N): * if mask[i]: # <<<<<<<<<<<<<< * if fill_count >= lim: * continue */ __pyx_t_8 = __pyx_v_i; __pyx_t_3 = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_mask.rcbuffer->pybuffer.buf, __pyx_t_8, __pyx_pybuffernd_mask.diminfo[0].strides)) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":1185 * for i in range(N): * if mask[i]: * if fill_count >= lim: # <<<<<<<<<<<<<< * continue * fill_count += 1 */ __pyx_t_3 = ((__pyx_v_fill_count >= __pyx_v_lim) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":1186 * if mask[i]: * if fill_count >= lim: * continue # <<<<<<<<<<<<<< * fill_count += 1 * values[i] = val */ goto __pyx_L6_continue; } /* "pandas/src/generated.pyx":1187 * if fill_count >= lim: * continue * fill_count += 1 # <<<<<<<<<<<<<< * values[i] = val * else: */ __pyx_v_fill_count = (__pyx_v_fill_count + 1); /* "pandas/src/generated.pyx":1188 * continue * fill_count += 1 * values[i] = val # <<<<<<<<<<<<<< * else: * fill_count = 0 */ __pyx_t_9 = __pyx_v_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_9, __pyx_pybuffernd_values.diminfo[0].strides) = __pyx_v_val; goto __pyx_L8; } /*else*/ { /* "pandas/src/generated.pyx":1190 * values[i] = val * else: * fill_count = 0 # <<<<<<<<<<<<<< * val = values[i] * */ __pyx_v_fill_count = 0; /* "pandas/src/generated.pyx":1191 * else: * fill_count = 0 * val = values[i] # <<<<<<<<<<<<<< * * */ __pyx_t_10 = __pyx_v_i; __pyx_v_val = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_10, __pyx_pybuffernd_values.diminfo[0].strides)); } __pyx_L8:; __pyx_L6_continue:; } /* "pandas/src/generated.pyx":1162 * @cython.boundscheck(False) * @cython.wraparound(False) * def pad_inplace_bool(ndarray[uint8_t] values, # <<<<<<<<<<<<<< * ndarray[uint8_t, cast=True] mask, * limit=None): */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_4); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_mask.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.pad_inplace_bool", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_mask.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":1196 * @cython.boundscheck(False) * @cython.wraparound(False) * def backfill_inplace_float64(ndarray[float64_t] values, # <<<<<<<<<<<<<< * ndarray[uint8_t, cast=True] mask, * limit=None): */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_151backfill_inplace_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_151backfill_inplace_float64 = {__Pyx_NAMESTR("backfill_inplace_float64"), (PyCFunction)__pyx_pw_6pandas_5algos_151backfill_inplace_float64, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_151backfill_inplace_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_values = 0; PyArrayObject *__pyx_v_mask = 0; PyObject *__pyx_v_limit = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("backfill_inplace_float64 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_values,&__pyx_n_s_mask,&__pyx_n_s_limit,0}; PyObject* values[3] = {0,0,0}; /* "pandas/src/generated.pyx":1198 * def backfill_inplace_float64(ndarray[float64_t] values, * ndarray[uint8_t, cast=True] mask, * limit=None): # <<<<<<<<<<<<<< * cdef Py_ssize_t i, N * cdef float64_t val */ values[2] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_values)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_mask)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("backfill_inplace_float64", 0, 2, 3, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1196; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_limit); if (value) { values[2] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "backfill_inplace_float64") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1196; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_values = ((PyArrayObject *)values[0]); __pyx_v_mask = ((PyArrayObject *)values[1]); __pyx_v_limit = values[2]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("backfill_inplace_float64", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1196; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.backfill_inplace_float64", __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_filename = __pyx_f[2]; __pyx_lineno = 1196; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_mask), __pyx_ptype_5numpy_ndarray, 1, "mask", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1197; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_150backfill_inplace_float64(__pyx_self, __pyx_v_values, __pyx_v_mask, __pyx_v_limit); /* "pandas/src/generated.pyx":1196 * @cython.boundscheck(False) * @cython.wraparound(False) * def backfill_inplace_float64(ndarray[float64_t] values, # <<<<<<<<<<<<<< * ndarray[uint8_t, cast=True] mask, * limit=None): */ /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5algos_150backfill_inplace_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_mask, PyObject *__pyx_v_limit) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_N; __pyx_t_5numpy_float64_t __pyx_v_val; int __pyx_v_lim; int __pyx_v_fill_count; __Pyx_LocalBuf_ND __pyx_pybuffernd_mask; __Pyx_Buffer __pyx_pybuffer_mask; __Pyx_LocalBuf_ND __pyx_pybuffernd_values; __Pyx_Buffer __pyx_pybuffer_values; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; int __pyx_t_2; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; int __pyx_t_5; Py_ssize_t __pyx_t_6; Py_ssize_t __pyx_t_7; Py_ssize_t __pyx_t_8; Py_ssize_t __pyx_t_9; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("backfill_inplace_float64", 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_mask.pybuffer.buf = NULL; __pyx_pybuffer_mask.refcount = 0; __pyx_pybuffernd_mask.data = NULL; __pyx_pybuffernd_mask.rcbuffer = &__pyx_pybuffer_mask; { __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| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1196; __pyx_clineno = __LINE__; goto __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_mask.rcbuffer->pybuffer, (PyObject*)__pyx_v_mask, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 1, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1196; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; /* "pandas/src/generated.pyx":1201 * cdef Py_ssize_t i, N * cdef float64_t val * cdef int lim, fill_count = 0 # <<<<<<<<<<<<<< * * N = len(values) */ __pyx_v_fill_count = 0; /* "pandas/src/generated.pyx":1203 * cdef int lim, fill_count = 0 * * N = len(values) # <<<<<<<<<<<<<< * * # GH 2778 */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1203; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_N = __pyx_t_1; /* "pandas/src/generated.pyx":1206 * * # GH 2778 * if N == 0: # <<<<<<<<<<<<<< * return * */ __pyx_t_2 = ((__pyx_v_N == 0) != 0); if (__pyx_t_2) { /* "pandas/src/generated.pyx":1207 * # GH 2778 * if N == 0: * return # <<<<<<<<<<<<<< * * if limit is None: */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; } /* "pandas/src/generated.pyx":1209 * return * * if limit is None: # <<<<<<<<<<<<<< * lim = N * else: */ __pyx_t_2 = (__pyx_v_limit == Py_None); __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":1210 * * if limit is None: * lim = N # <<<<<<<<<<<<<< * else: * if limit < 0: */ __pyx_v_lim = __pyx_v_N; goto __pyx_L4; } /*else*/ { /* "pandas/src/generated.pyx":1212 * lim = N * else: * if limit < 0: # <<<<<<<<<<<<<< * raise ValueError('Limit must be non-negative') * lim = limit */ __pyx_t_4 = PyObject_RichCompare(__pyx_v_limit, __pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1212; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1212; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_3) { /* "pandas/src/generated.pyx":1213 * else: * if limit < 0: * raise ValueError('Limit must be non-negative') # <<<<<<<<<<<<<< * lim = limit * */ __pyx_t_4 = PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__65, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1213; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 1213; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } /* "pandas/src/generated.pyx":1214 * if limit < 0: * raise ValueError('Limit must be non-negative') * lim = limit # <<<<<<<<<<<<<< * * val = values[N - 1] */ __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_v_limit); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1214; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_lim = __pyx_t_5; } __pyx_L4:; /* "pandas/src/generated.pyx":1216 * lim = limit * * val = values[N - 1] # <<<<<<<<<<<<<< * for i in range(N - 1, -1 , -1): * if mask[i]: */ __pyx_t_1 = (__pyx_v_N - 1); __pyx_v_val = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_1, __pyx_pybuffernd_values.diminfo[0].strides)); /* "pandas/src/generated.pyx":1217 * * val = values[N - 1] * for i in range(N - 1, -1 , -1): # <<<<<<<<<<<<<< * if mask[i]: * if fill_count >= lim: */ for (__pyx_t_6 = (__pyx_v_N - 1); __pyx_t_6 > -1; __pyx_t_6-=1) { __pyx_v_i = __pyx_t_6; /* "pandas/src/generated.pyx":1218 * val = values[N - 1] * for i in range(N - 1, -1 , -1): * if mask[i]: # <<<<<<<<<<<<<< * if fill_count >= lim: * continue */ __pyx_t_7 = __pyx_v_i; __pyx_t_3 = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_mask.rcbuffer->pybuffer.buf, __pyx_t_7, __pyx_pybuffernd_mask.diminfo[0].strides)) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":1219 * for i in range(N - 1, -1 , -1): * if mask[i]: * if fill_count >= lim: # <<<<<<<<<<<<<< * continue * fill_count += 1 */ __pyx_t_3 = ((__pyx_v_fill_count >= __pyx_v_lim) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":1220 * if mask[i]: * if fill_count >= lim: * continue # <<<<<<<<<<<<<< * fill_count += 1 * values[i] = val */ goto __pyx_L6_continue; } /* "pandas/src/generated.pyx":1221 * if fill_count >= lim: * continue * fill_count += 1 # <<<<<<<<<<<<<< * values[i] = val * else: */ __pyx_v_fill_count = (__pyx_v_fill_count + 1); /* "pandas/src/generated.pyx":1222 * continue * fill_count += 1 * values[i] = val # <<<<<<<<<<<<<< * else: * fill_count = 0 */ __pyx_t_8 = __pyx_v_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_8, __pyx_pybuffernd_values.diminfo[0].strides) = __pyx_v_val; goto __pyx_L8; } /*else*/ { /* "pandas/src/generated.pyx":1224 * values[i] = val * else: * fill_count = 0 # <<<<<<<<<<<<<< * val = values[i] * @cython.boundscheck(False) */ __pyx_v_fill_count = 0; /* "pandas/src/generated.pyx":1225 * else: * fill_count = 0 * val = values[i] # <<<<<<<<<<<<<< * @cython.boundscheck(False) * @cython.wraparound(False) */ __pyx_t_9 = __pyx_v_i; __pyx_v_val = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_9, __pyx_pybuffernd_values.diminfo[0].strides)); } __pyx_L8:; __pyx_L6_continue:; } /* "pandas/src/generated.pyx":1196 * @cython.boundscheck(False) * @cython.wraparound(False) * def backfill_inplace_float64(ndarray[float64_t] values, # <<<<<<<<<<<<<< * ndarray[uint8_t, cast=True] mask, * limit=None): */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_4); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_mask.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.backfill_inplace_float64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_mask.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":1228 * @cython.boundscheck(False) * @cython.wraparound(False) * def backfill_inplace_float32(ndarray[float32_t] values, # <<<<<<<<<<<<<< * ndarray[uint8_t, cast=True] mask, * limit=None): */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_153backfill_inplace_float32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_153backfill_inplace_float32 = {__Pyx_NAMESTR("backfill_inplace_float32"), (PyCFunction)__pyx_pw_6pandas_5algos_153backfill_inplace_float32, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_153backfill_inplace_float32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_values = 0; PyArrayObject *__pyx_v_mask = 0; PyObject *__pyx_v_limit = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("backfill_inplace_float32 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_values,&__pyx_n_s_mask,&__pyx_n_s_limit,0}; PyObject* values[3] = {0,0,0}; /* "pandas/src/generated.pyx":1230 * def backfill_inplace_float32(ndarray[float32_t] values, * ndarray[uint8_t, cast=True] mask, * limit=None): # <<<<<<<<<<<<<< * cdef Py_ssize_t i, N * cdef float32_t val */ values[2] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_values)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_mask)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("backfill_inplace_float32", 0, 2, 3, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1228; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_limit); if (value) { values[2] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "backfill_inplace_float32") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1228; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_values = ((PyArrayObject *)values[0]); __pyx_v_mask = ((PyArrayObject *)values[1]); __pyx_v_limit = values[2]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("backfill_inplace_float32", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1228; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.backfill_inplace_float32", __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_filename = __pyx_f[2]; __pyx_lineno = 1228; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_mask), __pyx_ptype_5numpy_ndarray, 1, "mask", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1229; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_152backfill_inplace_float32(__pyx_self, __pyx_v_values, __pyx_v_mask, __pyx_v_limit); /* "pandas/src/generated.pyx":1228 * @cython.boundscheck(False) * @cython.wraparound(False) * def backfill_inplace_float32(ndarray[float32_t] values, # <<<<<<<<<<<<<< * ndarray[uint8_t, cast=True] mask, * limit=None): */ /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5algos_152backfill_inplace_float32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_mask, PyObject *__pyx_v_limit) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_N; __pyx_t_5numpy_float32_t __pyx_v_val; int __pyx_v_lim; int __pyx_v_fill_count; __Pyx_LocalBuf_ND __pyx_pybuffernd_mask; __Pyx_Buffer __pyx_pybuffer_mask; __Pyx_LocalBuf_ND __pyx_pybuffernd_values; __Pyx_Buffer __pyx_pybuffer_values; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; int __pyx_t_2; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; int __pyx_t_5; Py_ssize_t __pyx_t_6; Py_ssize_t __pyx_t_7; Py_ssize_t __pyx_t_8; Py_ssize_t __pyx_t_9; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("backfill_inplace_float32", 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_mask.pybuffer.buf = NULL; __pyx_pybuffer_mask.refcount = 0; __pyx_pybuffernd_mask.data = NULL; __pyx_pybuffernd_mask.rcbuffer = &__pyx_pybuffer_mask; { __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_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1228; __pyx_clineno = __LINE__; goto __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_mask.rcbuffer->pybuffer, (PyObject*)__pyx_v_mask, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 1, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1228; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; /* "pandas/src/generated.pyx":1233 * cdef Py_ssize_t i, N * cdef float32_t val * cdef int lim, fill_count = 0 # <<<<<<<<<<<<<< * * N = len(values) */ __pyx_v_fill_count = 0; /* "pandas/src/generated.pyx":1235 * cdef int lim, fill_count = 0 * * N = len(values) # <<<<<<<<<<<<<< * * # GH 2778 */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1235; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_N = __pyx_t_1; /* "pandas/src/generated.pyx":1238 * * # GH 2778 * if N == 0: # <<<<<<<<<<<<<< * return * */ __pyx_t_2 = ((__pyx_v_N == 0) != 0); if (__pyx_t_2) { /* "pandas/src/generated.pyx":1239 * # GH 2778 * if N == 0: * return # <<<<<<<<<<<<<< * * if limit is None: */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; } /* "pandas/src/generated.pyx":1241 * return * * if limit is None: # <<<<<<<<<<<<<< * lim = N * else: */ __pyx_t_2 = (__pyx_v_limit == Py_None); __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":1242 * * if limit is None: * lim = N # <<<<<<<<<<<<<< * else: * if limit < 0: */ __pyx_v_lim = __pyx_v_N; goto __pyx_L4; } /*else*/ { /* "pandas/src/generated.pyx":1244 * lim = N * else: * if limit < 0: # <<<<<<<<<<<<<< * raise ValueError('Limit must be non-negative') * lim = limit */ __pyx_t_4 = PyObject_RichCompare(__pyx_v_limit, __pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1244; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1244; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_3) { /* "pandas/src/generated.pyx":1245 * else: * if limit < 0: * raise ValueError('Limit must be non-negative') # <<<<<<<<<<<<<< * lim = limit * */ __pyx_t_4 = PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__66, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1245; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 1245; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } /* "pandas/src/generated.pyx":1246 * if limit < 0: * raise ValueError('Limit must be non-negative') * lim = limit # <<<<<<<<<<<<<< * * val = values[N - 1] */ __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_v_limit); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1246; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_lim = __pyx_t_5; } __pyx_L4:; /* "pandas/src/generated.pyx":1248 * lim = limit * * val = values[N - 1] # <<<<<<<<<<<<<< * for i in range(N - 1, -1 , -1): * if mask[i]: */ __pyx_t_1 = (__pyx_v_N - 1); __pyx_v_val = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_1, __pyx_pybuffernd_values.diminfo[0].strides)); /* "pandas/src/generated.pyx":1249 * * val = values[N - 1] * for i in range(N - 1, -1 , -1): # <<<<<<<<<<<<<< * if mask[i]: * if fill_count >= lim: */ for (__pyx_t_6 = (__pyx_v_N - 1); __pyx_t_6 > -1; __pyx_t_6-=1) { __pyx_v_i = __pyx_t_6; /* "pandas/src/generated.pyx":1250 * val = values[N - 1] * for i in range(N - 1, -1 , -1): * if mask[i]: # <<<<<<<<<<<<<< * if fill_count >= lim: * continue */ __pyx_t_7 = __pyx_v_i; __pyx_t_3 = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_mask.rcbuffer->pybuffer.buf, __pyx_t_7, __pyx_pybuffernd_mask.diminfo[0].strides)) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":1251 * for i in range(N - 1, -1 , -1): * if mask[i]: * if fill_count >= lim: # <<<<<<<<<<<<<< * continue * fill_count += 1 */ __pyx_t_3 = ((__pyx_v_fill_count >= __pyx_v_lim) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":1252 * if mask[i]: * if fill_count >= lim: * continue # <<<<<<<<<<<<<< * fill_count += 1 * values[i] = val */ goto __pyx_L6_continue; } /* "pandas/src/generated.pyx":1253 * if fill_count >= lim: * continue * fill_count += 1 # <<<<<<<<<<<<<< * values[i] = val * else: */ __pyx_v_fill_count = (__pyx_v_fill_count + 1); /* "pandas/src/generated.pyx":1254 * continue * fill_count += 1 * values[i] = val # <<<<<<<<<<<<<< * else: * fill_count = 0 */ __pyx_t_8 = __pyx_v_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_8, __pyx_pybuffernd_values.diminfo[0].strides) = __pyx_v_val; goto __pyx_L8; } /*else*/ { /* "pandas/src/generated.pyx":1256 * values[i] = val * else: * fill_count = 0 # <<<<<<<<<<<<<< * val = values[i] * @cython.boundscheck(False) */ __pyx_v_fill_count = 0; /* "pandas/src/generated.pyx":1257 * else: * fill_count = 0 * val = values[i] # <<<<<<<<<<<<<< * @cython.boundscheck(False) * @cython.wraparound(False) */ __pyx_t_9 = __pyx_v_i; __pyx_v_val = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_9, __pyx_pybuffernd_values.diminfo[0].strides)); } __pyx_L8:; __pyx_L6_continue:; } /* "pandas/src/generated.pyx":1228 * @cython.boundscheck(False) * @cython.wraparound(False) * def backfill_inplace_float32(ndarray[float32_t] values, # <<<<<<<<<<<<<< * ndarray[uint8_t, cast=True] mask, * limit=None): */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_4); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_mask.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.backfill_inplace_float32", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_mask.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":1260 * @cython.boundscheck(False) * @cython.wraparound(False) * def backfill_inplace_object(ndarray[object] values, # <<<<<<<<<<<<<< * ndarray[uint8_t, cast=True] mask, * limit=None): */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_155backfill_inplace_object(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_155backfill_inplace_object = {__Pyx_NAMESTR("backfill_inplace_object"), (PyCFunction)__pyx_pw_6pandas_5algos_155backfill_inplace_object, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_155backfill_inplace_object(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_values = 0; PyArrayObject *__pyx_v_mask = 0; PyObject *__pyx_v_limit = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("backfill_inplace_object (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_values,&__pyx_n_s_mask,&__pyx_n_s_limit,0}; PyObject* values[3] = {0,0,0}; /* "pandas/src/generated.pyx":1262 * def backfill_inplace_object(ndarray[object] values, * ndarray[uint8_t, cast=True] mask, * limit=None): # <<<<<<<<<<<<<< * cdef Py_ssize_t i, N * cdef object val */ values[2] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_values)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_mask)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("backfill_inplace_object", 0, 2, 3, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1260; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_limit); if (value) { values[2] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "backfill_inplace_object") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1260; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_values = ((PyArrayObject *)values[0]); __pyx_v_mask = ((PyArrayObject *)values[1]); __pyx_v_limit = values[2]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("backfill_inplace_object", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1260; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.backfill_inplace_object", __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_filename = __pyx_f[2]; __pyx_lineno = 1260; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_mask), __pyx_ptype_5numpy_ndarray, 1, "mask", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1261; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_154backfill_inplace_object(__pyx_self, __pyx_v_values, __pyx_v_mask, __pyx_v_limit); /* "pandas/src/generated.pyx":1260 * @cython.boundscheck(False) * @cython.wraparound(False) * def backfill_inplace_object(ndarray[object] values, # <<<<<<<<<<<<<< * ndarray[uint8_t, cast=True] mask, * limit=None): */ /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5algos_154backfill_inplace_object(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_mask, PyObject *__pyx_v_limit) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_N; PyObject *__pyx_v_val = 0; int __pyx_v_lim; int __pyx_v_fill_count; __Pyx_LocalBuf_ND __pyx_pybuffernd_mask; __Pyx_Buffer __pyx_pybuffer_mask; __Pyx_LocalBuf_ND __pyx_pybuffernd_values; __Pyx_Buffer __pyx_pybuffer_values; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; int __pyx_t_2; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; int __pyx_t_5; Py_ssize_t __pyx_t_6; Py_ssize_t __pyx_t_7; Py_ssize_t __pyx_t_8; PyObject **__pyx_t_9; Py_ssize_t __pyx_t_10; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("backfill_inplace_object", 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_mask.pybuffer.buf = NULL; __pyx_pybuffer_mask.refcount = 0; __pyx_pybuffernd_mask.data = NULL; __pyx_pybuffernd_mask.rcbuffer = &__pyx_pybuffer_mask; { __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| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1260; __pyx_clineno = __LINE__; goto __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_mask.rcbuffer->pybuffer, (PyObject*)__pyx_v_mask, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 1, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1260; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; /* "pandas/src/generated.pyx":1265 * cdef Py_ssize_t i, N * cdef object val * cdef int lim, fill_count = 0 # <<<<<<<<<<<<<< * * N = len(values) */ __pyx_v_fill_count = 0; /* "pandas/src/generated.pyx":1267 * cdef int lim, fill_count = 0 * * N = len(values) # <<<<<<<<<<<<<< * * # GH 2778 */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1267; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_N = __pyx_t_1; /* "pandas/src/generated.pyx":1270 * * # GH 2778 * if N == 0: # <<<<<<<<<<<<<< * return * */ __pyx_t_2 = ((__pyx_v_N == 0) != 0); if (__pyx_t_2) { /* "pandas/src/generated.pyx":1271 * # GH 2778 * if N == 0: * return # <<<<<<<<<<<<<< * * if limit is None: */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; } /* "pandas/src/generated.pyx":1273 * return * * if limit is None: # <<<<<<<<<<<<<< * lim = N * else: */ __pyx_t_2 = (__pyx_v_limit == Py_None); __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":1274 * * if limit is None: * lim = N # <<<<<<<<<<<<<< * else: * if limit < 0: */ __pyx_v_lim = __pyx_v_N; goto __pyx_L4; } /*else*/ { /* "pandas/src/generated.pyx":1276 * lim = N * else: * if limit < 0: # <<<<<<<<<<<<<< * raise ValueError('Limit must be non-negative') * lim = limit */ __pyx_t_4 = PyObject_RichCompare(__pyx_v_limit, __pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1276; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1276; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_3) { /* "pandas/src/generated.pyx":1277 * else: * if limit < 0: * raise ValueError('Limit must be non-negative') # <<<<<<<<<<<<<< * lim = limit * */ __pyx_t_4 = PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__67, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1277; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 1277; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } /* "pandas/src/generated.pyx":1278 * if limit < 0: * raise ValueError('Limit must be non-negative') * lim = limit # <<<<<<<<<<<<<< * * val = values[N - 1] */ __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_v_limit); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1278; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_lim = __pyx_t_5; } __pyx_L4:; /* "pandas/src/generated.pyx":1280 * lim = limit * * val = values[N - 1] # <<<<<<<<<<<<<< * for i in range(N - 1, -1 , -1): * if mask[i]: */ __pyx_t_1 = (__pyx_v_N - 1); __pyx_t_4 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_1, __pyx_pybuffernd_values.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_4); __pyx_v_val = __pyx_t_4; __pyx_t_4 = 0; /* "pandas/src/generated.pyx":1281 * * val = values[N - 1] * for i in range(N - 1, -1 , -1): # <<<<<<<<<<<<<< * if mask[i]: * if fill_count >= lim: */ for (__pyx_t_6 = (__pyx_v_N - 1); __pyx_t_6 > -1; __pyx_t_6-=1) { __pyx_v_i = __pyx_t_6; /* "pandas/src/generated.pyx":1282 * val = values[N - 1] * for i in range(N - 1, -1 , -1): * if mask[i]: # <<<<<<<<<<<<<< * if fill_count >= lim: * continue */ __pyx_t_7 = __pyx_v_i; __pyx_t_3 = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_mask.rcbuffer->pybuffer.buf, __pyx_t_7, __pyx_pybuffernd_mask.diminfo[0].strides)) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":1283 * for i in range(N - 1, -1 , -1): * if mask[i]: * if fill_count >= lim: # <<<<<<<<<<<<<< * continue * fill_count += 1 */ __pyx_t_3 = ((__pyx_v_fill_count >= __pyx_v_lim) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":1284 * if mask[i]: * if fill_count >= lim: * continue # <<<<<<<<<<<<<< * fill_count += 1 * values[i] = val */ goto __pyx_L6_continue; } /* "pandas/src/generated.pyx":1285 * if fill_count >= lim: * continue * fill_count += 1 # <<<<<<<<<<<<<< * values[i] = val * else: */ __pyx_v_fill_count = (__pyx_v_fill_count + 1); /* "pandas/src/generated.pyx":1286 * continue * fill_count += 1 * values[i] = val # <<<<<<<<<<<<<< * else: * fill_count = 0 */ __pyx_t_8 = __pyx_v_i; __pyx_t_9 = __Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_8, __pyx_pybuffernd_values.diminfo[0].strides); __Pyx_GOTREF(*__pyx_t_9); __Pyx_INCREF(__pyx_v_val); __Pyx_DECREF(*__pyx_t_9); *__pyx_t_9 = __pyx_v_val; __Pyx_GIVEREF(*__pyx_t_9); goto __pyx_L8; } /*else*/ { /* "pandas/src/generated.pyx":1288 * values[i] = val * else: * fill_count = 0 # <<<<<<<<<<<<<< * val = values[i] * @cython.boundscheck(False) */ __pyx_v_fill_count = 0; /* "pandas/src/generated.pyx":1289 * else: * fill_count = 0 * val = values[i] # <<<<<<<<<<<<<< * @cython.boundscheck(False) * @cython.wraparound(False) */ __pyx_t_10 = __pyx_v_i; __pyx_t_4 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_10, __pyx_pybuffernd_values.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_4); __Pyx_DECREF_SET(__pyx_v_val, __pyx_t_4); __pyx_t_4 = 0; } __pyx_L8:; __pyx_L6_continue:; } /* "pandas/src/generated.pyx":1260 * @cython.boundscheck(False) * @cython.wraparound(False) * def backfill_inplace_object(ndarray[object] values, # <<<<<<<<<<<<<< * ndarray[uint8_t, cast=True] mask, * limit=None): */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_4); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_mask.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.backfill_inplace_object", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_mask.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF(__pyx_v_val); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":1292 * @cython.boundscheck(False) * @cython.wraparound(False) * def backfill_inplace_int32(ndarray[int32_t] values, # <<<<<<<<<<<<<< * ndarray[uint8_t, cast=True] mask, * limit=None): */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_157backfill_inplace_int32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_157backfill_inplace_int32 = {__Pyx_NAMESTR("backfill_inplace_int32"), (PyCFunction)__pyx_pw_6pandas_5algos_157backfill_inplace_int32, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_157backfill_inplace_int32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_values = 0; PyArrayObject *__pyx_v_mask = 0; PyObject *__pyx_v_limit = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("backfill_inplace_int32 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_values,&__pyx_n_s_mask,&__pyx_n_s_limit,0}; PyObject* values[3] = {0,0,0}; /* "pandas/src/generated.pyx":1294 * def backfill_inplace_int32(ndarray[int32_t] values, * ndarray[uint8_t, cast=True] mask, * limit=None): # <<<<<<<<<<<<<< * cdef Py_ssize_t i, N * cdef int32_t val */ values[2] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_values)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_mask)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("backfill_inplace_int32", 0, 2, 3, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1292; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_limit); if (value) { values[2] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "backfill_inplace_int32") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1292; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_values = ((PyArrayObject *)values[0]); __pyx_v_mask = ((PyArrayObject *)values[1]); __pyx_v_limit = values[2]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("backfill_inplace_int32", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1292; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.backfill_inplace_int32", __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_filename = __pyx_f[2]; __pyx_lineno = 1292; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_mask), __pyx_ptype_5numpy_ndarray, 1, "mask", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1293; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_156backfill_inplace_int32(__pyx_self, __pyx_v_values, __pyx_v_mask, __pyx_v_limit); /* "pandas/src/generated.pyx":1292 * @cython.boundscheck(False) * @cython.wraparound(False) * def backfill_inplace_int32(ndarray[int32_t] values, # <<<<<<<<<<<<<< * ndarray[uint8_t, cast=True] mask, * limit=None): */ /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5algos_156backfill_inplace_int32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_mask, PyObject *__pyx_v_limit) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_N; __pyx_t_5numpy_int32_t __pyx_v_val; int __pyx_v_lim; int __pyx_v_fill_count; __Pyx_LocalBuf_ND __pyx_pybuffernd_mask; __Pyx_Buffer __pyx_pybuffer_mask; __Pyx_LocalBuf_ND __pyx_pybuffernd_values; __Pyx_Buffer __pyx_pybuffer_values; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; int __pyx_t_2; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; int __pyx_t_5; Py_ssize_t __pyx_t_6; Py_ssize_t __pyx_t_7; Py_ssize_t __pyx_t_8; Py_ssize_t __pyx_t_9; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("backfill_inplace_int32", 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_mask.pybuffer.buf = NULL; __pyx_pybuffer_mask.refcount = 0; __pyx_pybuffernd_mask.data = NULL; __pyx_pybuffernd_mask.rcbuffer = &__pyx_pybuffer_mask; { __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_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1292; __pyx_clineno = __LINE__; goto __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_mask.rcbuffer->pybuffer, (PyObject*)__pyx_v_mask, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 1, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1292; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; /* "pandas/src/generated.pyx":1297 * cdef Py_ssize_t i, N * cdef int32_t val * cdef int lim, fill_count = 0 # <<<<<<<<<<<<<< * * N = len(values) */ __pyx_v_fill_count = 0; /* "pandas/src/generated.pyx":1299 * cdef int lim, fill_count = 0 * * N = len(values) # <<<<<<<<<<<<<< * * # GH 2778 */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1299; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_N = __pyx_t_1; /* "pandas/src/generated.pyx":1302 * * # GH 2778 * if N == 0: # <<<<<<<<<<<<<< * return * */ __pyx_t_2 = ((__pyx_v_N == 0) != 0); if (__pyx_t_2) { /* "pandas/src/generated.pyx":1303 * # GH 2778 * if N == 0: * return # <<<<<<<<<<<<<< * * if limit is None: */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; } /* "pandas/src/generated.pyx":1305 * return * * if limit is None: # <<<<<<<<<<<<<< * lim = N * else: */ __pyx_t_2 = (__pyx_v_limit == Py_None); __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":1306 * * if limit is None: * lim = N # <<<<<<<<<<<<<< * else: * if limit < 0: */ __pyx_v_lim = __pyx_v_N; goto __pyx_L4; } /*else*/ { /* "pandas/src/generated.pyx":1308 * lim = N * else: * if limit < 0: # <<<<<<<<<<<<<< * raise ValueError('Limit must be non-negative') * lim = limit */ __pyx_t_4 = PyObject_RichCompare(__pyx_v_limit, __pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1308; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1308; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_3) { /* "pandas/src/generated.pyx":1309 * else: * if limit < 0: * raise ValueError('Limit must be non-negative') # <<<<<<<<<<<<<< * lim = limit * */ __pyx_t_4 = PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__68, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1309; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 1309; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } /* "pandas/src/generated.pyx":1310 * if limit < 0: * raise ValueError('Limit must be non-negative') * lim = limit # <<<<<<<<<<<<<< * * val = values[N - 1] */ __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_v_limit); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1310; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_lim = __pyx_t_5; } __pyx_L4:; /* "pandas/src/generated.pyx":1312 * lim = limit * * val = values[N - 1] # <<<<<<<<<<<<<< * for i in range(N - 1, -1 , -1): * if mask[i]: */ __pyx_t_1 = (__pyx_v_N - 1); __pyx_v_val = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_1, __pyx_pybuffernd_values.diminfo[0].strides)); /* "pandas/src/generated.pyx":1313 * * val = values[N - 1] * for i in range(N - 1, -1 , -1): # <<<<<<<<<<<<<< * if mask[i]: * if fill_count >= lim: */ for (__pyx_t_6 = (__pyx_v_N - 1); __pyx_t_6 > -1; __pyx_t_6-=1) { __pyx_v_i = __pyx_t_6; /* "pandas/src/generated.pyx":1314 * val = values[N - 1] * for i in range(N - 1, -1 , -1): * if mask[i]: # <<<<<<<<<<<<<< * if fill_count >= lim: * continue */ __pyx_t_7 = __pyx_v_i; __pyx_t_3 = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_mask.rcbuffer->pybuffer.buf, __pyx_t_7, __pyx_pybuffernd_mask.diminfo[0].strides)) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":1315 * for i in range(N - 1, -1 , -1): * if mask[i]: * if fill_count >= lim: # <<<<<<<<<<<<<< * continue * fill_count += 1 */ __pyx_t_3 = ((__pyx_v_fill_count >= __pyx_v_lim) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":1316 * if mask[i]: * if fill_count >= lim: * continue # <<<<<<<<<<<<<< * fill_count += 1 * values[i] = val */ goto __pyx_L6_continue; } /* "pandas/src/generated.pyx":1317 * if fill_count >= lim: * continue * fill_count += 1 # <<<<<<<<<<<<<< * values[i] = val * else: */ __pyx_v_fill_count = (__pyx_v_fill_count + 1); /* "pandas/src/generated.pyx":1318 * continue * fill_count += 1 * values[i] = val # <<<<<<<<<<<<<< * else: * fill_count = 0 */ __pyx_t_8 = __pyx_v_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_8, __pyx_pybuffernd_values.diminfo[0].strides) = __pyx_v_val; goto __pyx_L8; } /*else*/ { /* "pandas/src/generated.pyx":1320 * values[i] = val * else: * fill_count = 0 # <<<<<<<<<<<<<< * val = values[i] * @cython.boundscheck(False) */ __pyx_v_fill_count = 0; /* "pandas/src/generated.pyx":1321 * else: * fill_count = 0 * val = values[i] # <<<<<<<<<<<<<< * @cython.boundscheck(False) * @cython.wraparound(False) */ __pyx_t_9 = __pyx_v_i; __pyx_v_val = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_9, __pyx_pybuffernd_values.diminfo[0].strides)); } __pyx_L8:; __pyx_L6_continue:; } /* "pandas/src/generated.pyx":1292 * @cython.boundscheck(False) * @cython.wraparound(False) * def backfill_inplace_int32(ndarray[int32_t] values, # <<<<<<<<<<<<<< * ndarray[uint8_t, cast=True] mask, * limit=None): */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_4); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_mask.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.backfill_inplace_int32", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_mask.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":1324 * @cython.boundscheck(False) * @cython.wraparound(False) * def backfill_inplace_int64(ndarray[int64_t] values, # <<<<<<<<<<<<<< * ndarray[uint8_t, cast=True] mask, * limit=None): */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_159backfill_inplace_int64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_159backfill_inplace_int64 = {__Pyx_NAMESTR("backfill_inplace_int64"), (PyCFunction)__pyx_pw_6pandas_5algos_159backfill_inplace_int64, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_159backfill_inplace_int64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_values = 0; PyArrayObject *__pyx_v_mask = 0; PyObject *__pyx_v_limit = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("backfill_inplace_int64 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_values,&__pyx_n_s_mask,&__pyx_n_s_limit,0}; PyObject* values[3] = {0,0,0}; /* "pandas/src/generated.pyx":1326 * def backfill_inplace_int64(ndarray[int64_t] values, * ndarray[uint8_t, cast=True] mask, * limit=None): # <<<<<<<<<<<<<< * cdef Py_ssize_t i, N * cdef int64_t val */ values[2] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_values)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_mask)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("backfill_inplace_int64", 0, 2, 3, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1324; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_limit); if (value) { values[2] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "backfill_inplace_int64") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1324; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_values = ((PyArrayObject *)values[0]); __pyx_v_mask = ((PyArrayObject *)values[1]); __pyx_v_limit = values[2]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("backfill_inplace_int64", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1324; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.backfill_inplace_int64", __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_filename = __pyx_f[2]; __pyx_lineno = 1324; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_mask), __pyx_ptype_5numpy_ndarray, 1, "mask", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1325; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_158backfill_inplace_int64(__pyx_self, __pyx_v_values, __pyx_v_mask, __pyx_v_limit); /* "pandas/src/generated.pyx":1324 * @cython.boundscheck(False) * @cython.wraparound(False) * def backfill_inplace_int64(ndarray[int64_t] values, # <<<<<<<<<<<<<< * ndarray[uint8_t, cast=True] mask, * limit=None): */ /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5algos_158backfill_inplace_int64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_mask, PyObject *__pyx_v_limit) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_N; __pyx_t_5numpy_int64_t __pyx_v_val; int __pyx_v_lim; int __pyx_v_fill_count; __Pyx_LocalBuf_ND __pyx_pybuffernd_mask; __Pyx_Buffer __pyx_pybuffer_mask; __Pyx_LocalBuf_ND __pyx_pybuffernd_values; __Pyx_Buffer __pyx_pybuffer_values; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; int __pyx_t_2; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; int __pyx_t_5; Py_ssize_t __pyx_t_6; Py_ssize_t __pyx_t_7; Py_ssize_t __pyx_t_8; Py_ssize_t __pyx_t_9; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("backfill_inplace_int64", 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_mask.pybuffer.buf = NULL; __pyx_pybuffer_mask.refcount = 0; __pyx_pybuffernd_mask.data = NULL; __pyx_pybuffernd_mask.rcbuffer = &__pyx_pybuffer_mask; { __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_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1324; __pyx_clineno = __LINE__; goto __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_mask.rcbuffer->pybuffer, (PyObject*)__pyx_v_mask, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 1, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1324; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; /* "pandas/src/generated.pyx":1329 * cdef Py_ssize_t i, N * cdef int64_t val * cdef int lim, fill_count = 0 # <<<<<<<<<<<<<< * * N = len(values) */ __pyx_v_fill_count = 0; /* "pandas/src/generated.pyx":1331 * cdef int lim, fill_count = 0 * * N = len(values) # <<<<<<<<<<<<<< * * # GH 2778 */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1331; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_N = __pyx_t_1; /* "pandas/src/generated.pyx":1334 * * # GH 2778 * if N == 0: # <<<<<<<<<<<<<< * return * */ __pyx_t_2 = ((__pyx_v_N == 0) != 0); if (__pyx_t_2) { /* "pandas/src/generated.pyx":1335 * # GH 2778 * if N == 0: * return # <<<<<<<<<<<<<< * * if limit is None: */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; } /* "pandas/src/generated.pyx":1337 * return * * if limit is None: # <<<<<<<<<<<<<< * lim = N * else: */ __pyx_t_2 = (__pyx_v_limit == Py_None); __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":1338 * * if limit is None: * lim = N # <<<<<<<<<<<<<< * else: * if limit < 0: */ __pyx_v_lim = __pyx_v_N; goto __pyx_L4; } /*else*/ { /* "pandas/src/generated.pyx":1340 * lim = N * else: * if limit < 0: # <<<<<<<<<<<<<< * raise ValueError('Limit must be non-negative') * lim = limit */ __pyx_t_4 = PyObject_RichCompare(__pyx_v_limit, __pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1340; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1340; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_3) { /* "pandas/src/generated.pyx":1341 * else: * if limit < 0: * raise ValueError('Limit must be non-negative') # <<<<<<<<<<<<<< * lim = limit * */ __pyx_t_4 = PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__69, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1341; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 1341; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } /* "pandas/src/generated.pyx":1342 * if limit < 0: * raise ValueError('Limit must be non-negative') * lim = limit # <<<<<<<<<<<<<< * * val = values[N - 1] */ __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_v_limit); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1342; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_lim = __pyx_t_5; } __pyx_L4:; /* "pandas/src/generated.pyx":1344 * lim = limit * * val = values[N - 1] # <<<<<<<<<<<<<< * for i in range(N - 1, -1 , -1): * if mask[i]: */ __pyx_t_1 = (__pyx_v_N - 1); __pyx_v_val = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_1, __pyx_pybuffernd_values.diminfo[0].strides)); /* "pandas/src/generated.pyx":1345 * * val = values[N - 1] * for i in range(N - 1, -1 , -1): # <<<<<<<<<<<<<< * if mask[i]: * if fill_count >= lim: */ for (__pyx_t_6 = (__pyx_v_N - 1); __pyx_t_6 > -1; __pyx_t_6-=1) { __pyx_v_i = __pyx_t_6; /* "pandas/src/generated.pyx":1346 * val = values[N - 1] * for i in range(N - 1, -1 , -1): * if mask[i]: # <<<<<<<<<<<<<< * if fill_count >= lim: * continue */ __pyx_t_7 = __pyx_v_i; __pyx_t_3 = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_mask.rcbuffer->pybuffer.buf, __pyx_t_7, __pyx_pybuffernd_mask.diminfo[0].strides)) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":1347 * for i in range(N - 1, -1 , -1): * if mask[i]: * if fill_count >= lim: # <<<<<<<<<<<<<< * continue * fill_count += 1 */ __pyx_t_3 = ((__pyx_v_fill_count >= __pyx_v_lim) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":1348 * if mask[i]: * if fill_count >= lim: * continue # <<<<<<<<<<<<<< * fill_count += 1 * values[i] = val */ goto __pyx_L6_continue; } /* "pandas/src/generated.pyx":1349 * if fill_count >= lim: * continue * fill_count += 1 # <<<<<<<<<<<<<< * values[i] = val * else: */ __pyx_v_fill_count = (__pyx_v_fill_count + 1); /* "pandas/src/generated.pyx":1350 * continue * fill_count += 1 * values[i] = val # <<<<<<<<<<<<<< * else: * fill_count = 0 */ __pyx_t_8 = __pyx_v_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_8, __pyx_pybuffernd_values.diminfo[0].strides) = __pyx_v_val; goto __pyx_L8; } /*else*/ { /* "pandas/src/generated.pyx":1352 * values[i] = val * else: * fill_count = 0 # <<<<<<<<<<<<<< * val = values[i] * @cython.boundscheck(False) */ __pyx_v_fill_count = 0; /* "pandas/src/generated.pyx":1353 * else: * fill_count = 0 * val = values[i] # <<<<<<<<<<<<<< * @cython.boundscheck(False) * @cython.wraparound(False) */ __pyx_t_9 = __pyx_v_i; __pyx_v_val = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_9, __pyx_pybuffernd_values.diminfo[0].strides)); } __pyx_L8:; __pyx_L6_continue:; } /* "pandas/src/generated.pyx":1324 * @cython.boundscheck(False) * @cython.wraparound(False) * def backfill_inplace_int64(ndarray[int64_t] values, # <<<<<<<<<<<<<< * ndarray[uint8_t, cast=True] mask, * limit=None): */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_4); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_mask.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.backfill_inplace_int64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_mask.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":1356 * @cython.boundscheck(False) * @cython.wraparound(False) * def backfill_inplace_bool(ndarray[uint8_t] values, # <<<<<<<<<<<<<< * ndarray[uint8_t, cast=True] mask, * limit=None): */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_161backfill_inplace_bool(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_161backfill_inplace_bool = {__Pyx_NAMESTR("backfill_inplace_bool"), (PyCFunction)__pyx_pw_6pandas_5algos_161backfill_inplace_bool, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_161backfill_inplace_bool(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_values = 0; PyArrayObject *__pyx_v_mask = 0; PyObject *__pyx_v_limit = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("backfill_inplace_bool (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_values,&__pyx_n_s_mask,&__pyx_n_s_limit,0}; PyObject* values[3] = {0,0,0}; /* "pandas/src/generated.pyx":1358 * def backfill_inplace_bool(ndarray[uint8_t] values, * ndarray[uint8_t, cast=True] mask, * limit=None): # <<<<<<<<<<<<<< * cdef Py_ssize_t i, N * cdef uint8_t val */ values[2] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_values)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_mask)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("backfill_inplace_bool", 0, 2, 3, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1356; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_limit); if (value) { values[2] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "backfill_inplace_bool") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1356; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_values = ((PyArrayObject *)values[0]); __pyx_v_mask = ((PyArrayObject *)values[1]); __pyx_v_limit = values[2]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("backfill_inplace_bool", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1356; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.backfill_inplace_bool", __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_filename = __pyx_f[2]; __pyx_lineno = 1356; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_mask), __pyx_ptype_5numpy_ndarray, 1, "mask", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1357; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_160backfill_inplace_bool(__pyx_self, __pyx_v_values, __pyx_v_mask, __pyx_v_limit); /* "pandas/src/generated.pyx":1356 * @cython.boundscheck(False) * @cython.wraparound(False) * def backfill_inplace_bool(ndarray[uint8_t] values, # <<<<<<<<<<<<<< * ndarray[uint8_t, cast=True] mask, * limit=None): */ /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5algos_160backfill_inplace_bool(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_mask, PyObject *__pyx_v_limit) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_N; __pyx_t_5numpy_uint8_t __pyx_v_val; int __pyx_v_lim; int __pyx_v_fill_count; __Pyx_LocalBuf_ND __pyx_pybuffernd_mask; __Pyx_Buffer __pyx_pybuffer_mask; __Pyx_LocalBuf_ND __pyx_pybuffernd_values; __Pyx_Buffer __pyx_pybuffer_values; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; int __pyx_t_2; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; int __pyx_t_5; Py_ssize_t __pyx_t_6; Py_ssize_t __pyx_t_7; Py_ssize_t __pyx_t_8; Py_ssize_t __pyx_t_9; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("backfill_inplace_bool", 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_mask.pybuffer.buf = NULL; __pyx_pybuffer_mask.refcount = 0; __pyx_pybuffernd_mask.data = NULL; __pyx_pybuffernd_mask.rcbuffer = &__pyx_pybuffer_mask; { __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_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1356; __pyx_clineno = __LINE__; goto __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_mask.rcbuffer->pybuffer, (PyObject*)__pyx_v_mask, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 1, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1356; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; /* "pandas/src/generated.pyx":1361 * cdef Py_ssize_t i, N * cdef uint8_t val * cdef int lim, fill_count = 0 # <<<<<<<<<<<<<< * * N = len(values) */ __pyx_v_fill_count = 0; /* "pandas/src/generated.pyx":1363 * cdef int lim, fill_count = 0 * * N = len(values) # <<<<<<<<<<<<<< * * # GH 2778 */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1363; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_N = __pyx_t_1; /* "pandas/src/generated.pyx":1366 * * # GH 2778 * if N == 0: # <<<<<<<<<<<<<< * return * */ __pyx_t_2 = ((__pyx_v_N == 0) != 0); if (__pyx_t_2) { /* "pandas/src/generated.pyx":1367 * # GH 2778 * if N == 0: * return # <<<<<<<<<<<<<< * * if limit is None: */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; } /* "pandas/src/generated.pyx":1369 * return * * if limit is None: # <<<<<<<<<<<<<< * lim = N * else: */ __pyx_t_2 = (__pyx_v_limit == Py_None); __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":1370 * * if limit is None: * lim = N # <<<<<<<<<<<<<< * else: * if limit < 0: */ __pyx_v_lim = __pyx_v_N; goto __pyx_L4; } /*else*/ { /* "pandas/src/generated.pyx":1372 * lim = N * else: * if limit < 0: # <<<<<<<<<<<<<< * raise ValueError('Limit must be non-negative') * lim = limit */ __pyx_t_4 = PyObject_RichCompare(__pyx_v_limit, __pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1372; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1372; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_3) { /* "pandas/src/generated.pyx":1373 * else: * if limit < 0: * raise ValueError('Limit must be non-negative') # <<<<<<<<<<<<<< * lim = limit * */ __pyx_t_4 = PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__70, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1373; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 1373; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } /* "pandas/src/generated.pyx":1374 * if limit < 0: * raise ValueError('Limit must be non-negative') * lim = limit # <<<<<<<<<<<<<< * * val = values[N - 1] */ __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_v_limit); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1374; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_lim = __pyx_t_5; } __pyx_L4:; /* "pandas/src/generated.pyx":1376 * lim = limit * * val = values[N - 1] # <<<<<<<<<<<<<< * for i in range(N - 1, -1 , -1): * if mask[i]: */ __pyx_t_1 = (__pyx_v_N - 1); __pyx_v_val = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_1, __pyx_pybuffernd_values.diminfo[0].strides)); /* "pandas/src/generated.pyx":1377 * * val = values[N - 1] * for i in range(N - 1, -1 , -1): # <<<<<<<<<<<<<< * if mask[i]: * if fill_count >= lim: */ for (__pyx_t_6 = (__pyx_v_N - 1); __pyx_t_6 > -1; __pyx_t_6-=1) { __pyx_v_i = __pyx_t_6; /* "pandas/src/generated.pyx":1378 * val = values[N - 1] * for i in range(N - 1, -1 , -1): * if mask[i]: # <<<<<<<<<<<<<< * if fill_count >= lim: * continue */ __pyx_t_7 = __pyx_v_i; __pyx_t_3 = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_mask.rcbuffer->pybuffer.buf, __pyx_t_7, __pyx_pybuffernd_mask.diminfo[0].strides)) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":1379 * for i in range(N - 1, -1 , -1): * if mask[i]: * if fill_count >= lim: # <<<<<<<<<<<<<< * continue * fill_count += 1 */ __pyx_t_3 = ((__pyx_v_fill_count >= __pyx_v_lim) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":1380 * if mask[i]: * if fill_count >= lim: * continue # <<<<<<<<<<<<<< * fill_count += 1 * values[i] = val */ goto __pyx_L6_continue; } /* "pandas/src/generated.pyx":1381 * if fill_count >= lim: * continue * fill_count += 1 # <<<<<<<<<<<<<< * values[i] = val * else: */ __pyx_v_fill_count = (__pyx_v_fill_count + 1); /* "pandas/src/generated.pyx":1382 * continue * fill_count += 1 * values[i] = val # <<<<<<<<<<<<<< * else: * fill_count = 0 */ __pyx_t_8 = __pyx_v_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_8, __pyx_pybuffernd_values.diminfo[0].strides) = __pyx_v_val; goto __pyx_L8; } /*else*/ { /* "pandas/src/generated.pyx":1384 * values[i] = val * else: * fill_count = 0 # <<<<<<<<<<<<<< * val = values[i] * */ __pyx_v_fill_count = 0; /* "pandas/src/generated.pyx":1385 * else: * fill_count = 0 * val = values[i] # <<<<<<<<<<<<<< * * @cython.boundscheck(False) */ __pyx_t_9 = __pyx_v_i; __pyx_v_val = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_9, __pyx_pybuffernd_values.diminfo[0].strides)); } __pyx_L8:; __pyx_L6_continue:; } /* "pandas/src/generated.pyx":1356 * @cython.boundscheck(False) * @cython.wraparound(False) * def backfill_inplace_bool(ndarray[uint8_t] values, # <<<<<<<<<<<<<< * ndarray[uint8_t, cast=True] mask, * limit=None): */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_4); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_mask.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.backfill_inplace_bool", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_mask.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":1389 * @cython.boundscheck(False) * @cython.wraparound(False) * def pad_2d_inplace_float64(ndarray[float64_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[uint8_t, ndim=2] mask, * limit=None): */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_163pad_2d_inplace_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_163pad_2d_inplace_float64 = {__Pyx_NAMESTR("pad_2d_inplace_float64"), (PyCFunction)__pyx_pw_6pandas_5algos_163pad_2d_inplace_float64, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_163pad_2d_inplace_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_values = 0; PyArrayObject *__pyx_v_mask = 0; PyObject *__pyx_v_limit = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("pad_2d_inplace_float64 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_values,&__pyx_n_s_mask,&__pyx_n_s_limit,0}; PyObject* values[3] = {0,0,0}; /* "pandas/src/generated.pyx":1391 * def pad_2d_inplace_float64(ndarray[float64_t, ndim=2] values, * ndarray[uint8_t, ndim=2] mask, * limit=None): # <<<<<<<<<<<<<< * cdef Py_ssize_t i, j, N, K * cdef float64_t val */ values[2] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_values)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_mask)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("pad_2d_inplace_float64", 0, 2, 3, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1389; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_limit); if (value) { values[2] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "pad_2d_inplace_float64") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1389; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_values = ((PyArrayObject *)values[0]); __pyx_v_mask = ((PyArrayObject *)values[1]); __pyx_v_limit = values[2]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("pad_2d_inplace_float64", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1389; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.pad_2d_inplace_float64", __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_filename = __pyx_f[2]; __pyx_lineno = 1389; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_mask), __pyx_ptype_5numpy_ndarray, 1, "mask", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1390; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_162pad_2d_inplace_float64(__pyx_self, __pyx_v_values, __pyx_v_mask, __pyx_v_limit); /* "pandas/src/generated.pyx":1389 * @cython.boundscheck(False) * @cython.wraparound(False) * def pad_2d_inplace_float64(ndarray[float64_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[uint8_t, ndim=2] mask, * limit=None): */ /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5algos_162pad_2d_inplace_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_mask, PyObject *__pyx_v_limit) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_N; Py_ssize_t __pyx_v_K; __pyx_t_5numpy_float64_t __pyx_v_val; int __pyx_v_lim; int __pyx_v_fill_count; __Pyx_LocalBuf_ND __pyx_pybuffernd_mask; __Pyx_Buffer __pyx_pybuffer_mask; __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; PyObject *(*__pyx_t_5)(PyObject *); Py_ssize_t __pyx_t_6; Py_ssize_t __pyx_t_7; int __pyx_t_8; int __pyx_t_9; int __pyx_t_10; Py_ssize_t __pyx_t_11; long __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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("pad_2d_inplace_float64", 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_mask.pybuffer.buf = NULL; __pyx_pybuffer_mask.refcount = 0; __pyx_pybuffernd_mask.data = NULL; __pyx_pybuffernd_mask.rcbuffer = &__pyx_pybuffer_mask; { __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| PyBUF_WRITABLE, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1389; __pyx_clineno = __LINE__; goto __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_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; 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, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1389; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; __pyx_pybuffernd_mask.diminfo[1].strides = __pyx_pybuffernd_mask.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_mask.diminfo[1].shape = __pyx_pybuffernd_mask.rcbuffer->pybuffer.shape[1]; /* "pandas/src/generated.pyx":1394 * cdef Py_ssize_t i, j, N, K * cdef float64_t val * cdef int lim, fill_count = 0 # <<<<<<<<<<<<<< * * K, N = ( values).shape */ __pyx_v_fill_count = 0; /* "pandas/src/generated.pyx":1396 * cdef int lim, fill_count = 0 * * K, N = ( values).shape # <<<<<<<<<<<<<< * * # GH 2778 */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_values), __pyx_n_s_shape); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1396; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) { PyObject* sequence = __pyx_t_1; #if CYTHON_COMPILING_IN_CPYTHON Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1396; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1); } else { __pyx_t_2 = PyList_GET_ITEM(sequence, 0); __pyx_t_3 = PyList_GET_ITEM(sequence, 1); } __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); #else __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1396; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1396; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } else { Py_ssize_t index = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1396; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_5 = Py_TYPE(__pyx_t_4)->tp_iternext; index = 0; __pyx_t_2 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_2)) goto __pyx_L3_unpacking_failed; __Pyx_GOTREF(__pyx_t_2); index = 1; __pyx_t_3 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_3)) goto __pyx_L3_unpacking_failed; __Pyx_GOTREF(__pyx_t_3); if (__Pyx_IternextUnpackEndCheck(__pyx_t_5(__pyx_t_4), 2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1396; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 1396; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_L4_unpacking_done:; } __pyx_t_6 = __Pyx_PyIndex_AsSsize_t(__pyx_t_2); if (unlikely((__pyx_t_6 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1396; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_7 = __Pyx_PyIndex_AsSsize_t(__pyx_t_3); if (unlikely((__pyx_t_7 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1396; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_K = __pyx_t_6; __pyx_v_N = __pyx_t_7; /* "pandas/src/generated.pyx":1399 * * # GH 2778 * if N == 0: # <<<<<<<<<<<<<< * return * */ __pyx_t_8 = ((__pyx_v_N == 0) != 0); if (__pyx_t_8) { /* "pandas/src/generated.pyx":1400 * # GH 2778 * if N == 0: * return # <<<<<<<<<<<<<< * * if limit is None: */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; } /* "pandas/src/generated.pyx":1402 * return * * if limit is None: # <<<<<<<<<<<<<< * lim = N * else: */ __pyx_t_8 = (__pyx_v_limit == Py_None); __pyx_t_9 = (__pyx_t_8 != 0); if (__pyx_t_9) { /* "pandas/src/generated.pyx":1403 * * if limit is None: * lim = N # <<<<<<<<<<<<<< * else: * if limit < 0: */ __pyx_v_lim = __pyx_v_N; goto __pyx_L6; } /*else*/ { /* "pandas/src/generated.pyx":1405 * lim = N * else: * if limit < 0: # <<<<<<<<<<<<<< * raise ValueError('Limit must be non-negative') * lim = limit */ __pyx_t_1 = PyObject_RichCompare(__pyx_v_limit, __pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1405; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1405; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_9) { /* "pandas/src/generated.pyx":1406 * else: * if limit < 0: * raise ValueError('Limit must be non-negative') # <<<<<<<<<<<<<< * lim = limit * */ __pyx_t_1 = PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__71, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1406; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 1406; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } /* "pandas/src/generated.pyx":1407 * if limit < 0: * raise ValueError('Limit must be non-negative') * lim = limit # <<<<<<<<<<<<<< * * for j in range(K): */ __pyx_t_10 = __Pyx_PyInt_As_int(__pyx_v_limit); if (unlikely((__pyx_t_10 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1407; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_lim = __pyx_t_10; } __pyx_L6:; /* "pandas/src/generated.pyx":1409 * lim = limit * * for j in range(K): # <<<<<<<<<<<<<< * fill_count = 0 * val = values[j, 0] */ __pyx_t_7 = __pyx_v_K; for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_7; __pyx_t_6+=1) { __pyx_v_j = __pyx_t_6; /* "pandas/src/generated.pyx":1410 * * for j in range(K): * fill_count = 0 # <<<<<<<<<<<<<< * val = values[j, 0] * for i in range(N): */ __pyx_v_fill_count = 0; /* "pandas/src/generated.pyx":1411 * for j in range(K): * fill_count = 0 * val = values[j, 0] # <<<<<<<<<<<<<< * for i in range(N): * if mask[j, i]: */ __pyx_t_11 = __pyx_v_j; __pyx_t_12 = 0; __pyx_v_val = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_11, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_12, __pyx_pybuffernd_values.diminfo[1].strides)); /* "pandas/src/generated.pyx":1412 * fill_count = 0 * val = values[j, 0] * for i in range(N): # <<<<<<<<<<<<<< * if mask[j, i]: * if fill_count >= lim: */ __pyx_t_13 = __pyx_v_N; for (__pyx_t_14 = 0; __pyx_t_14 < __pyx_t_13; __pyx_t_14+=1) { __pyx_v_i = __pyx_t_14; /* "pandas/src/generated.pyx":1413 * val = values[j, 0] * for i in range(N): * if mask[j, i]: # <<<<<<<<<<<<<< * if fill_count >= lim: * continue */ __pyx_t_15 = __pyx_v_j; __pyx_t_16 = __pyx_v_i; __pyx_t_9 = ((*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_mask.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_mask.diminfo[0].strides, __pyx_t_16, __pyx_pybuffernd_mask.diminfo[1].strides)) != 0); if (__pyx_t_9) { /* "pandas/src/generated.pyx":1414 * for i in range(N): * if mask[j, i]: * if fill_count >= lim: # <<<<<<<<<<<<<< * continue * fill_count += 1 */ __pyx_t_9 = ((__pyx_v_fill_count >= __pyx_v_lim) != 0); if (__pyx_t_9) { /* "pandas/src/generated.pyx":1415 * if mask[j, i]: * if fill_count >= lim: * continue # <<<<<<<<<<<<<< * fill_count += 1 * values[j, i] = val */ goto __pyx_L10_continue; } /* "pandas/src/generated.pyx":1416 * if fill_count >= lim: * continue * fill_count += 1 # <<<<<<<<<<<<<< * values[j, i] = val * else: */ __pyx_v_fill_count = (__pyx_v_fill_count + 1); /* "pandas/src/generated.pyx":1417 * continue * fill_count += 1 * values[j, i] = val # <<<<<<<<<<<<<< * else: * fill_count = 0 */ __pyx_t_17 = __pyx_v_j; __pyx_t_18 = __pyx_v_i; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_18, __pyx_pybuffernd_values.diminfo[1].strides) = __pyx_v_val; goto __pyx_L12; } /*else*/ { /* "pandas/src/generated.pyx":1419 * values[j, i] = val * else: * fill_count = 0 # <<<<<<<<<<<<<< * val = values[j, i] * @cython.boundscheck(False) */ __pyx_v_fill_count = 0; /* "pandas/src/generated.pyx":1420 * else: * fill_count = 0 * val = values[j, i] # <<<<<<<<<<<<<< * @cython.boundscheck(False) * @cython.wraparound(False) */ __pyx_t_19 = __pyx_v_j; __pyx_t_20 = __pyx_v_i; __pyx_v_val = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_20, __pyx_pybuffernd_values.diminfo[1].strides)); } __pyx_L12:; __pyx_L10_continue:; } } /* "pandas/src/generated.pyx":1389 * @cython.boundscheck(False) * @cython.wraparound(False) * def pad_2d_inplace_float64(ndarray[float64_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[uint8_t, ndim=2] mask, * limit=None): */ /* 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_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_mask.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.pad_2d_inplace_float64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_mask.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":1423 * @cython.boundscheck(False) * @cython.wraparound(False) * def pad_2d_inplace_float32(ndarray[float32_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[uint8_t, ndim=2] mask, * limit=None): */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_165pad_2d_inplace_float32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_165pad_2d_inplace_float32 = {__Pyx_NAMESTR("pad_2d_inplace_float32"), (PyCFunction)__pyx_pw_6pandas_5algos_165pad_2d_inplace_float32, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_165pad_2d_inplace_float32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_values = 0; PyArrayObject *__pyx_v_mask = 0; PyObject *__pyx_v_limit = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("pad_2d_inplace_float32 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_values,&__pyx_n_s_mask,&__pyx_n_s_limit,0}; PyObject* values[3] = {0,0,0}; /* "pandas/src/generated.pyx":1425 * def pad_2d_inplace_float32(ndarray[float32_t, ndim=2] values, * ndarray[uint8_t, ndim=2] mask, * limit=None): # <<<<<<<<<<<<<< * cdef Py_ssize_t i, j, N, K * cdef float32_t val */ values[2] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_values)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_mask)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("pad_2d_inplace_float32", 0, 2, 3, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1423; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_limit); if (value) { values[2] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "pad_2d_inplace_float32") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1423; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_values = ((PyArrayObject *)values[0]); __pyx_v_mask = ((PyArrayObject *)values[1]); __pyx_v_limit = values[2]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("pad_2d_inplace_float32", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1423; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.pad_2d_inplace_float32", __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_filename = __pyx_f[2]; __pyx_lineno = 1423; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_mask), __pyx_ptype_5numpy_ndarray, 1, "mask", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1424; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_164pad_2d_inplace_float32(__pyx_self, __pyx_v_values, __pyx_v_mask, __pyx_v_limit); /* "pandas/src/generated.pyx":1423 * @cython.boundscheck(False) * @cython.wraparound(False) * def pad_2d_inplace_float32(ndarray[float32_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[uint8_t, ndim=2] mask, * limit=None): */ /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5algos_164pad_2d_inplace_float32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_mask, PyObject *__pyx_v_limit) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_N; Py_ssize_t __pyx_v_K; __pyx_t_5numpy_float32_t __pyx_v_val; int __pyx_v_lim; int __pyx_v_fill_count; __Pyx_LocalBuf_ND __pyx_pybuffernd_mask; __Pyx_Buffer __pyx_pybuffer_mask; __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; PyObject *(*__pyx_t_5)(PyObject *); Py_ssize_t __pyx_t_6; Py_ssize_t __pyx_t_7; int __pyx_t_8; int __pyx_t_9; int __pyx_t_10; Py_ssize_t __pyx_t_11; long __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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("pad_2d_inplace_float32", 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_mask.pybuffer.buf = NULL; __pyx_pybuffer_mask.refcount = 0; __pyx_pybuffernd_mask.data = NULL; __pyx_pybuffernd_mask.rcbuffer = &__pyx_pybuffer_mask; { __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_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1423; __pyx_clineno = __LINE__; goto __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_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; 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, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1423; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; __pyx_pybuffernd_mask.diminfo[1].strides = __pyx_pybuffernd_mask.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_mask.diminfo[1].shape = __pyx_pybuffernd_mask.rcbuffer->pybuffer.shape[1]; /* "pandas/src/generated.pyx":1428 * cdef Py_ssize_t i, j, N, K * cdef float32_t val * cdef int lim, fill_count = 0 # <<<<<<<<<<<<<< * * K, N = ( values).shape */ __pyx_v_fill_count = 0; /* "pandas/src/generated.pyx":1430 * cdef int lim, fill_count = 0 * * K, N = ( values).shape # <<<<<<<<<<<<<< * * # GH 2778 */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_values), __pyx_n_s_shape); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1430; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) { PyObject* sequence = __pyx_t_1; #if CYTHON_COMPILING_IN_CPYTHON Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1430; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1); } else { __pyx_t_2 = PyList_GET_ITEM(sequence, 0); __pyx_t_3 = PyList_GET_ITEM(sequence, 1); } __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); #else __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1430; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1430; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } else { Py_ssize_t index = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1430; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_5 = Py_TYPE(__pyx_t_4)->tp_iternext; index = 0; __pyx_t_2 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_2)) goto __pyx_L3_unpacking_failed; __Pyx_GOTREF(__pyx_t_2); index = 1; __pyx_t_3 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_3)) goto __pyx_L3_unpacking_failed; __Pyx_GOTREF(__pyx_t_3); if (__Pyx_IternextUnpackEndCheck(__pyx_t_5(__pyx_t_4), 2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1430; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 1430; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_L4_unpacking_done:; } __pyx_t_6 = __Pyx_PyIndex_AsSsize_t(__pyx_t_2); if (unlikely((__pyx_t_6 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1430; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_7 = __Pyx_PyIndex_AsSsize_t(__pyx_t_3); if (unlikely((__pyx_t_7 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1430; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_K = __pyx_t_6; __pyx_v_N = __pyx_t_7; /* "pandas/src/generated.pyx":1433 * * # GH 2778 * if N == 0: # <<<<<<<<<<<<<< * return * */ __pyx_t_8 = ((__pyx_v_N == 0) != 0); if (__pyx_t_8) { /* "pandas/src/generated.pyx":1434 * # GH 2778 * if N == 0: * return # <<<<<<<<<<<<<< * * if limit is None: */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; } /* "pandas/src/generated.pyx":1436 * return * * if limit is None: # <<<<<<<<<<<<<< * lim = N * else: */ __pyx_t_8 = (__pyx_v_limit == Py_None); __pyx_t_9 = (__pyx_t_8 != 0); if (__pyx_t_9) { /* "pandas/src/generated.pyx":1437 * * if limit is None: * lim = N # <<<<<<<<<<<<<< * else: * if limit < 0: */ __pyx_v_lim = __pyx_v_N; goto __pyx_L6; } /*else*/ { /* "pandas/src/generated.pyx":1439 * lim = N * else: * if limit < 0: # <<<<<<<<<<<<<< * raise ValueError('Limit must be non-negative') * lim = limit */ __pyx_t_1 = PyObject_RichCompare(__pyx_v_limit, __pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1439; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1439; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_9) { /* "pandas/src/generated.pyx":1440 * else: * if limit < 0: * raise ValueError('Limit must be non-negative') # <<<<<<<<<<<<<< * lim = limit * */ __pyx_t_1 = PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__72, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1440; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 1440; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } /* "pandas/src/generated.pyx":1441 * if limit < 0: * raise ValueError('Limit must be non-negative') * lim = limit # <<<<<<<<<<<<<< * * for j in range(K): */ __pyx_t_10 = __Pyx_PyInt_As_int(__pyx_v_limit); if (unlikely((__pyx_t_10 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1441; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_lim = __pyx_t_10; } __pyx_L6:; /* "pandas/src/generated.pyx":1443 * lim = limit * * for j in range(K): # <<<<<<<<<<<<<< * fill_count = 0 * val = values[j, 0] */ __pyx_t_7 = __pyx_v_K; for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_7; __pyx_t_6+=1) { __pyx_v_j = __pyx_t_6; /* "pandas/src/generated.pyx":1444 * * for j in range(K): * fill_count = 0 # <<<<<<<<<<<<<< * val = values[j, 0] * for i in range(N): */ __pyx_v_fill_count = 0; /* "pandas/src/generated.pyx":1445 * for j in range(K): * fill_count = 0 * val = values[j, 0] # <<<<<<<<<<<<<< * for i in range(N): * if mask[j, i]: */ __pyx_t_11 = __pyx_v_j; __pyx_t_12 = 0; __pyx_v_val = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_11, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_12, __pyx_pybuffernd_values.diminfo[1].strides)); /* "pandas/src/generated.pyx":1446 * fill_count = 0 * val = values[j, 0] * for i in range(N): # <<<<<<<<<<<<<< * if mask[j, i]: * if fill_count >= lim: */ __pyx_t_13 = __pyx_v_N; for (__pyx_t_14 = 0; __pyx_t_14 < __pyx_t_13; __pyx_t_14+=1) { __pyx_v_i = __pyx_t_14; /* "pandas/src/generated.pyx":1447 * val = values[j, 0] * for i in range(N): * if mask[j, i]: # <<<<<<<<<<<<<< * if fill_count >= lim: * continue */ __pyx_t_15 = __pyx_v_j; __pyx_t_16 = __pyx_v_i; __pyx_t_9 = ((*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_mask.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_mask.diminfo[0].strides, __pyx_t_16, __pyx_pybuffernd_mask.diminfo[1].strides)) != 0); if (__pyx_t_9) { /* "pandas/src/generated.pyx":1448 * for i in range(N): * if mask[j, i]: * if fill_count >= lim: # <<<<<<<<<<<<<< * continue * fill_count += 1 */ __pyx_t_9 = ((__pyx_v_fill_count >= __pyx_v_lim) != 0); if (__pyx_t_9) { /* "pandas/src/generated.pyx":1449 * if mask[j, i]: * if fill_count >= lim: * continue # <<<<<<<<<<<<<< * fill_count += 1 * values[j, i] = val */ goto __pyx_L10_continue; } /* "pandas/src/generated.pyx":1450 * if fill_count >= lim: * continue * fill_count += 1 # <<<<<<<<<<<<<< * values[j, i] = val * else: */ __pyx_v_fill_count = (__pyx_v_fill_count + 1); /* "pandas/src/generated.pyx":1451 * continue * fill_count += 1 * values[j, i] = val # <<<<<<<<<<<<<< * else: * fill_count = 0 */ __pyx_t_17 = __pyx_v_j; __pyx_t_18 = __pyx_v_i; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_18, __pyx_pybuffernd_values.diminfo[1].strides) = __pyx_v_val; goto __pyx_L12; } /*else*/ { /* "pandas/src/generated.pyx":1453 * values[j, i] = val * else: * fill_count = 0 # <<<<<<<<<<<<<< * val = values[j, i] * @cython.boundscheck(False) */ __pyx_v_fill_count = 0; /* "pandas/src/generated.pyx":1454 * else: * fill_count = 0 * val = values[j, i] # <<<<<<<<<<<<<< * @cython.boundscheck(False) * @cython.wraparound(False) */ __pyx_t_19 = __pyx_v_j; __pyx_t_20 = __pyx_v_i; __pyx_v_val = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_20, __pyx_pybuffernd_values.diminfo[1].strides)); } __pyx_L12:; __pyx_L10_continue:; } } /* "pandas/src/generated.pyx":1423 * @cython.boundscheck(False) * @cython.wraparound(False) * def pad_2d_inplace_float32(ndarray[float32_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[uint8_t, ndim=2] mask, * limit=None): */ /* 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_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_mask.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.pad_2d_inplace_float32", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_mask.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":1457 * @cython.boundscheck(False) * @cython.wraparound(False) * def pad_2d_inplace_object(ndarray[object, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[uint8_t, ndim=2] mask, * limit=None): */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_167pad_2d_inplace_object(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_167pad_2d_inplace_object = {__Pyx_NAMESTR("pad_2d_inplace_object"), (PyCFunction)__pyx_pw_6pandas_5algos_167pad_2d_inplace_object, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_167pad_2d_inplace_object(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_values = 0; PyArrayObject *__pyx_v_mask = 0; PyObject *__pyx_v_limit = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("pad_2d_inplace_object (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_values,&__pyx_n_s_mask,&__pyx_n_s_limit,0}; PyObject* values[3] = {0,0,0}; /* "pandas/src/generated.pyx":1459 * def pad_2d_inplace_object(ndarray[object, ndim=2] values, * ndarray[uint8_t, ndim=2] mask, * limit=None): # <<<<<<<<<<<<<< * cdef Py_ssize_t i, j, N, K * cdef object val */ values[2] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_values)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_mask)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("pad_2d_inplace_object", 0, 2, 3, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1457; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_limit); if (value) { values[2] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "pad_2d_inplace_object") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1457; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_values = ((PyArrayObject *)values[0]); __pyx_v_mask = ((PyArrayObject *)values[1]); __pyx_v_limit = values[2]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("pad_2d_inplace_object", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1457; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.pad_2d_inplace_object", __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_filename = __pyx_f[2]; __pyx_lineno = 1457; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_mask), __pyx_ptype_5numpy_ndarray, 1, "mask", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1458; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_166pad_2d_inplace_object(__pyx_self, __pyx_v_values, __pyx_v_mask, __pyx_v_limit); /* "pandas/src/generated.pyx":1457 * @cython.boundscheck(False) * @cython.wraparound(False) * def pad_2d_inplace_object(ndarray[object, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[uint8_t, ndim=2] mask, * limit=None): */ /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5algos_166pad_2d_inplace_object(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_mask, PyObject *__pyx_v_limit) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_N; Py_ssize_t __pyx_v_K; PyObject *__pyx_v_val = 0; int __pyx_v_lim; int __pyx_v_fill_count; __Pyx_LocalBuf_ND __pyx_pybuffernd_mask; __Pyx_Buffer __pyx_pybuffer_mask; __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; PyObject *(*__pyx_t_5)(PyObject *); Py_ssize_t __pyx_t_6; Py_ssize_t __pyx_t_7; int __pyx_t_8; int __pyx_t_9; int __pyx_t_10; Py_ssize_t __pyx_t_11; long __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; PyObject **__pyx_t_19; Py_ssize_t __pyx_t_20; Py_ssize_t __pyx_t_21; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("pad_2d_inplace_object", 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_mask.pybuffer.buf = NULL; __pyx_pybuffer_mask.refcount = 0; __pyx_pybuffernd_mask.data = NULL; __pyx_pybuffernd_mask.rcbuffer = &__pyx_pybuffer_mask; { __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| PyBUF_WRITABLE, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1457; __pyx_clineno = __LINE__; goto __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_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; 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, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1457; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; __pyx_pybuffernd_mask.diminfo[1].strides = __pyx_pybuffernd_mask.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_mask.diminfo[1].shape = __pyx_pybuffernd_mask.rcbuffer->pybuffer.shape[1]; /* "pandas/src/generated.pyx":1462 * cdef Py_ssize_t i, j, N, K * cdef object val * cdef int lim, fill_count = 0 # <<<<<<<<<<<<<< * * K, N = ( values).shape */ __pyx_v_fill_count = 0; /* "pandas/src/generated.pyx":1464 * cdef int lim, fill_count = 0 * * K, N = ( values).shape # <<<<<<<<<<<<<< * * # GH 2778 */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_values), __pyx_n_s_shape); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1464; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) { PyObject* sequence = __pyx_t_1; #if CYTHON_COMPILING_IN_CPYTHON Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1464; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1); } else { __pyx_t_2 = PyList_GET_ITEM(sequence, 0); __pyx_t_3 = PyList_GET_ITEM(sequence, 1); } __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); #else __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1464; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1464; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } else { Py_ssize_t index = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1464; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_5 = Py_TYPE(__pyx_t_4)->tp_iternext; index = 0; __pyx_t_2 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_2)) goto __pyx_L3_unpacking_failed; __Pyx_GOTREF(__pyx_t_2); index = 1; __pyx_t_3 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_3)) goto __pyx_L3_unpacking_failed; __Pyx_GOTREF(__pyx_t_3); if (__Pyx_IternextUnpackEndCheck(__pyx_t_5(__pyx_t_4), 2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1464; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 1464; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_L4_unpacking_done:; } __pyx_t_6 = __Pyx_PyIndex_AsSsize_t(__pyx_t_2); if (unlikely((__pyx_t_6 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1464; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_7 = __Pyx_PyIndex_AsSsize_t(__pyx_t_3); if (unlikely((__pyx_t_7 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1464; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_K = __pyx_t_6; __pyx_v_N = __pyx_t_7; /* "pandas/src/generated.pyx":1467 * * # GH 2778 * if N == 0: # <<<<<<<<<<<<<< * return * */ __pyx_t_8 = ((__pyx_v_N == 0) != 0); if (__pyx_t_8) { /* "pandas/src/generated.pyx":1468 * # GH 2778 * if N == 0: * return # <<<<<<<<<<<<<< * * if limit is None: */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; } /* "pandas/src/generated.pyx":1470 * return * * if limit is None: # <<<<<<<<<<<<<< * lim = N * else: */ __pyx_t_8 = (__pyx_v_limit == Py_None); __pyx_t_9 = (__pyx_t_8 != 0); if (__pyx_t_9) { /* "pandas/src/generated.pyx":1471 * * if limit is None: * lim = N # <<<<<<<<<<<<<< * else: * if limit < 0: */ __pyx_v_lim = __pyx_v_N; goto __pyx_L6; } /*else*/ { /* "pandas/src/generated.pyx":1473 * lim = N * else: * if limit < 0: # <<<<<<<<<<<<<< * raise ValueError('Limit must be non-negative') * lim = limit */ __pyx_t_1 = PyObject_RichCompare(__pyx_v_limit, __pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1473; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1473; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_9) { /* "pandas/src/generated.pyx":1474 * else: * if limit < 0: * raise ValueError('Limit must be non-negative') # <<<<<<<<<<<<<< * lim = limit * */ __pyx_t_1 = PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__73, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1474; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 1474; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } /* "pandas/src/generated.pyx":1475 * if limit < 0: * raise ValueError('Limit must be non-negative') * lim = limit # <<<<<<<<<<<<<< * * for j in range(K): */ __pyx_t_10 = __Pyx_PyInt_As_int(__pyx_v_limit); if (unlikely((__pyx_t_10 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1475; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_lim = __pyx_t_10; } __pyx_L6:; /* "pandas/src/generated.pyx":1477 * lim = limit * * for j in range(K): # <<<<<<<<<<<<<< * fill_count = 0 * val = values[j, 0] */ __pyx_t_7 = __pyx_v_K; for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_7; __pyx_t_6+=1) { __pyx_v_j = __pyx_t_6; /* "pandas/src/generated.pyx":1478 * * for j in range(K): * fill_count = 0 # <<<<<<<<<<<<<< * val = values[j, 0] * for i in range(N): */ __pyx_v_fill_count = 0; /* "pandas/src/generated.pyx":1479 * for j in range(K): * fill_count = 0 * val = values[j, 0] # <<<<<<<<<<<<<< * for i in range(N): * if mask[j, i]: */ __pyx_t_11 = __pyx_v_j; __pyx_t_12 = 0; __pyx_t_1 = (PyObject *) *__Pyx_BufPtrStrided2d(PyObject **, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_11, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_12, __pyx_pybuffernd_values.diminfo[1].strides); __Pyx_INCREF((PyObject*)__pyx_t_1); __Pyx_XDECREF_SET(__pyx_v_val, __pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/generated.pyx":1480 * fill_count = 0 * val = values[j, 0] * for i in range(N): # <<<<<<<<<<<<<< * if mask[j, i]: * if fill_count >= lim: */ __pyx_t_13 = __pyx_v_N; for (__pyx_t_14 = 0; __pyx_t_14 < __pyx_t_13; __pyx_t_14+=1) { __pyx_v_i = __pyx_t_14; /* "pandas/src/generated.pyx":1481 * val = values[j, 0] * for i in range(N): * if mask[j, i]: # <<<<<<<<<<<<<< * if fill_count >= lim: * continue */ __pyx_t_15 = __pyx_v_j; __pyx_t_16 = __pyx_v_i; __pyx_t_9 = ((*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_mask.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_mask.diminfo[0].strides, __pyx_t_16, __pyx_pybuffernd_mask.diminfo[1].strides)) != 0); if (__pyx_t_9) { /* "pandas/src/generated.pyx":1482 * for i in range(N): * if mask[j, i]: * if fill_count >= lim: # <<<<<<<<<<<<<< * continue * fill_count += 1 */ __pyx_t_9 = ((__pyx_v_fill_count >= __pyx_v_lim) != 0); if (__pyx_t_9) { /* "pandas/src/generated.pyx":1483 * if mask[j, i]: * if fill_count >= lim: * continue # <<<<<<<<<<<<<< * fill_count += 1 * values[j, i] = val */ goto __pyx_L10_continue; } /* "pandas/src/generated.pyx":1484 * if fill_count >= lim: * continue * fill_count += 1 # <<<<<<<<<<<<<< * values[j, i] = val * else: */ __pyx_v_fill_count = (__pyx_v_fill_count + 1); /* "pandas/src/generated.pyx":1485 * continue * fill_count += 1 * values[j, i] = val # <<<<<<<<<<<<<< * else: * fill_count = 0 */ __pyx_t_17 = __pyx_v_j; __pyx_t_18 = __pyx_v_i; __pyx_t_19 = __Pyx_BufPtrStrided2d(PyObject **, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_18, __pyx_pybuffernd_values.diminfo[1].strides); __Pyx_GOTREF(*__pyx_t_19); __Pyx_INCREF(__pyx_v_val); __Pyx_DECREF(*__pyx_t_19); *__pyx_t_19 = __pyx_v_val; __Pyx_GIVEREF(*__pyx_t_19); goto __pyx_L12; } /*else*/ { /* "pandas/src/generated.pyx":1487 * values[j, i] = val * else: * fill_count = 0 # <<<<<<<<<<<<<< * val = values[j, i] * @cython.boundscheck(False) */ __pyx_v_fill_count = 0; /* "pandas/src/generated.pyx":1488 * else: * fill_count = 0 * val = values[j, i] # <<<<<<<<<<<<<< * @cython.boundscheck(False) * @cython.wraparound(False) */ __pyx_t_20 = __pyx_v_j; __pyx_t_21 = __pyx_v_i; __pyx_t_1 = (PyObject *) *__Pyx_BufPtrStrided2d(PyObject **, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_21, __pyx_pybuffernd_values.diminfo[1].strides); __Pyx_INCREF((PyObject*)__pyx_t_1); __Pyx_DECREF_SET(__pyx_v_val, __pyx_t_1); __pyx_t_1 = 0; } __pyx_L12:; __pyx_L10_continue:; } } /* "pandas/src/generated.pyx":1457 * @cython.boundscheck(False) * @cython.wraparound(False) * def pad_2d_inplace_object(ndarray[object, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[uint8_t, ndim=2] mask, * limit=None): */ /* 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_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_mask.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.pad_2d_inplace_object", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_mask.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF(__pyx_v_val); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":1491 * @cython.boundscheck(False) * @cython.wraparound(False) * def pad_2d_inplace_int32(ndarray[int32_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[uint8_t, ndim=2] mask, * limit=None): */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_169pad_2d_inplace_int32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_169pad_2d_inplace_int32 = {__Pyx_NAMESTR("pad_2d_inplace_int32"), (PyCFunction)__pyx_pw_6pandas_5algos_169pad_2d_inplace_int32, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_169pad_2d_inplace_int32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_values = 0; PyArrayObject *__pyx_v_mask = 0; PyObject *__pyx_v_limit = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("pad_2d_inplace_int32 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_values,&__pyx_n_s_mask,&__pyx_n_s_limit,0}; PyObject* values[3] = {0,0,0}; /* "pandas/src/generated.pyx":1493 * def pad_2d_inplace_int32(ndarray[int32_t, ndim=2] values, * ndarray[uint8_t, ndim=2] mask, * limit=None): # <<<<<<<<<<<<<< * cdef Py_ssize_t i, j, N, K * cdef int32_t val */ values[2] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_values)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_mask)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("pad_2d_inplace_int32", 0, 2, 3, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1491; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_limit); if (value) { values[2] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "pad_2d_inplace_int32") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1491; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_values = ((PyArrayObject *)values[0]); __pyx_v_mask = ((PyArrayObject *)values[1]); __pyx_v_limit = values[2]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("pad_2d_inplace_int32", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1491; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.pad_2d_inplace_int32", __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_filename = __pyx_f[2]; __pyx_lineno = 1491; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_mask), __pyx_ptype_5numpy_ndarray, 1, "mask", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1492; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_168pad_2d_inplace_int32(__pyx_self, __pyx_v_values, __pyx_v_mask, __pyx_v_limit); /* "pandas/src/generated.pyx":1491 * @cython.boundscheck(False) * @cython.wraparound(False) * def pad_2d_inplace_int32(ndarray[int32_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[uint8_t, ndim=2] mask, * limit=None): */ /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5algos_168pad_2d_inplace_int32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_mask, PyObject *__pyx_v_limit) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_N; Py_ssize_t __pyx_v_K; __pyx_t_5numpy_int32_t __pyx_v_val; int __pyx_v_lim; int __pyx_v_fill_count; __Pyx_LocalBuf_ND __pyx_pybuffernd_mask; __Pyx_Buffer __pyx_pybuffer_mask; __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; PyObject *(*__pyx_t_5)(PyObject *); Py_ssize_t __pyx_t_6; Py_ssize_t __pyx_t_7; int __pyx_t_8; int __pyx_t_9; int __pyx_t_10; Py_ssize_t __pyx_t_11; long __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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("pad_2d_inplace_int32", 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_mask.pybuffer.buf = NULL; __pyx_pybuffer_mask.refcount = 0; __pyx_pybuffernd_mask.data = NULL; __pyx_pybuffernd_mask.rcbuffer = &__pyx_pybuffer_mask; { __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_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1491; __pyx_clineno = __LINE__; goto __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_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; 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, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1491; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; __pyx_pybuffernd_mask.diminfo[1].strides = __pyx_pybuffernd_mask.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_mask.diminfo[1].shape = __pyx_pybuffernd_mask.rcbuffer->pybuffer.shape[1]; /* "pandas/src/generated.pyx":1496 * cdef Py_ssize_t i, j, N, K * cdef int32_t val * cdef int lim, fill_count = 0 # <<<<<<<<<<<<<< * * K, N = ( values).shape */ __pyx_v_fill_count = 0; /* "pandas/src/generated.pyx":1498 * cdef int lim, fill_count = 0 * * K, N = ( values).shape # <<<<<<<<<<<<<< * * # GH 2778 */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_values), __pyx_n_s_shape); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1498; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) { PyObject* sequence = __pyx_t_1; #if CYTHON_COMPILING_IN_CPYTHON Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1498; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1); } else { __pyx_t_2 = PyList_GET_ITEM(sequence, 0); __pyx_t_3 = PyList_GET_ITEM(sequence, 1); } __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); #else __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1498; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1498; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } else { Py_ssize_t index = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1498; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_5 = Py_TYPE(__pyx_t_4)->tp_iternext; index = 0; __pyx_t_2 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_2)) goto __pyx_L3_unpacking_failed; __Pyx_GOTREF(__pyx_t_2); index = 1; __pyx_t_3 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_3)) goto __pyx_L3_unpacking_failed; __Pyx_GOTREF(__pyx_t_3); if (__Pyx_IternextUnpackEndCheck(__pyx_t_5(__pyx_t_4), 2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1498; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 1498; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_L4_unpacking_done:; } __pyx_t_6 = __Pyx_PyIndex_AsSsize_t(__pyx_t_2); if (unlikely((__pyx_t_6 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1498; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_7 = __Pyx_PyIndex_AsSsize_t(__pyx_t_3); if (unlikely((__pyx_t_7 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1498; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_K = __pyx_t_6; __pyx_v_N = __pyx_t_7; /* "pandas/src/generated.pyx":1501 * * # GH 2778 * if N == 0: # <<<<<<<<<<<<<< * return * */ __pyx_t_8 = ((__pyx_v_N == 0) != 0); if (__pyx_t_8) { /* "pandas/src/generated.pyx":1502 * # GH 2778 * if N == 0: * return # <<<<<<<<<<<<<< * * if limit is None: */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; } /* "pandas/src/generated.pyx":1504 * return * * if limit is None: # <<<<<<<<<<<<<< * lim = N * else: */ __pyx_t_8 = (__pyx_v_limit == Py_None); __pyx_t_9 = (__pyx_t_8 != 0); if (__pyx_t_9) { /* "pandas/src/generated.pyx":1505 * * if limit is None: * lim = N # <<<<<<<<<<<<<< * else: * if limit < 0: */ __pyx_v_lim = __pyx_v_N; goto __pyx_L6; } /*else*/ { /* "pandas/src/generated.pyx":1507 * lim = N * else: * if limit < 0: # <<<<<<<<<<<<<< * raise ValueError('Limit must be non-negative') * lim = limit */ __pyx_t_1 = PyObject_RichCompare(__pyx_v_limit, __pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1507; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1507; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_9) { /* "pandas/src/generated.pyx":1508 * else: * if limit < 0: * raise ValueError('Limit must be non-negative') # <<<<<<<<<<<<<< * lim = limit * */ __pyx_t_1 = PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__74, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1508; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 1508; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } /* "pandas/src/generated.pyx":1509 * if limit < 0: * raise ValueError('Limit must be non-negative') * lim = limit # <<<<<<<<<<<<<< * * for j in range(K): */ __pyx_t_10 = __Pyx_PyInt_As_int(__pyx_v_limit); if (unlikely((__pyx_t_10 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1509; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_lim = __pyx_t_10; } __pyx_L6:; /* "pandas/src/generated.pyx":1511 * lim = limit * * for j in range(K): # <<<<<<<<<<<<<< * fill_count = 0 * val = values[j, 0] */ __pyx_t_7 = __pyx_v_K; for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_7; __pyx_t_6+=1) { __pyx_v_j = __pyx_t_6; /* "pandas/src/generated.pyx":1512 * * for j in range(K): * fill_count = 0 # <<<<<<<<<<<<<< * val = values[j, 0] * for i in range(N): */ __pyx_v_fill_count = 0; /* "pandas/src/generated.pyx":1513 * for j in range(K): * fill_count = 0 * val = values[j, 0] # <<<<<<<<<<<<<< * for i in range(N): * if mask[j, i]: */ __pyx_t_11 = __pyx_v_j; __pyx_t_12 = 0; __pyx_v_val = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_11, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_12, __pyx_pybuffernd_values.diminfo[1].strides)); /* "pandas/src/generated.pyx":1514 * fill_count = 0 * val = values[j, 0] * for i in range(N): # <<<<<<<<<<<<<< * if mask[j, i]: * if fill_count >= lim: */ __pyx_t_13 = __pyx_v_N; for (__pyx_t_14 = 0; __pyx_t_14 < __pyx_t_13; __pyx_t_14+=1) { __pyx_v_i = __pyx_t_14; /* "pandas/src/generated.pyx":1515 * val = values[j, 0] * for i in range(N): * if mask[j, i]: # <<<<<<<<<<<<<< * if fill_count >= lim: * continue */ __pyx_t_15 = __pyx_v_j; __pyx_t_16 = __pyx_v_i; __pyx_t_9 = ((*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_mask.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_mask.diminfo[0].strides, __pyx_t_16, __pyx_pybuffernd_mask.diminfo[1].strides)) != 0); if (__pyx_t_9) { /* "pandas/src/generated.pyx":1516 * for i in range(N): * if mask[j, i]: * if fill_count >= lim: # <<<<<<<<<<<<<< * continue * fill_count += 1 */ __pyx_t_9 = ((__pyx_v_fill_count >= __pyx_v_lim) != 0); if (__pyx_t_9) { /* "pandas/src/generated.pyx":1517 * if mask[j, i]: * if fill_count >= lim: * continue # <<<<<<<<<<<<<< * fill_count += 1 * values[j, i] = val */ goto __pyx_L10_continue; } /* "pandas/src/generated.pyx":1518 * if fill_count >= lim: * continue * fill_count += 1 # <<<<<<<<<<<<<< * values[j, i] = val * else: */ __pyx_v_fill_count = (__pyx_v_fill_count + 1); /* "pandas/src/generated.pyx":1519 * continue * fill_count += 1 * values[j, i] = val # <<<<<<<<<<<<<< * else: * fill_count = 0 */ __pyx_t_17 = __pyx_v_j; __pyx_t_18 = __pyx_v_i; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_18, __pyx_pybuffernd_values.diminfo[1].strides) = __pyx_v_val; goto __pyx_L12; } /*else*/ { /* "pandas/src/generated.pyx":1521 * values[j, i] = val * else: * fill_count = 0 # <<<<<<<<<<<<<< * val = values[j, i] * @cython.boundscheck(False) */ __pyx_v_fill_count = 0; /* "pandas/src/generated.pyx":1522 * else: * fill_count = 0 * val = values[j, i] # <<<<<<<<<<<<<< * @cython.boundscheck(False) * @cython.wraparound(False) */ __pyx_t_19 = __pyx_v_j; __pyx_t_20 = __pyx_v_i; __pyx_v_val = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_20, __pyx_pybuffernd_values.diminfo[1].strides)); } __pyx_L12:; __pyx_L10_continue:; } } /* "pandas/src/generated.pyx":1491 * @cython.boundscheck(False) * @cython.wraparound(False) * def pad_2d_inplace_int32(ndarray[int32_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[uint8_t, ndim=2] mask, * limit=None): */ /* 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_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_mask.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.pad_2d_inplace_int32", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_mask.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":1525 * @cython.boundscheck(False) * @cython.wraparound(False) * def pad_2d_inplace_int64(ndarray[int64_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[uint8_t, ndim=2] mask, * limit=None): */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_171pad_2d_inplace_int64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_171pad_2d_inplace_int64 = {__Pyx_NAMESTR("pad_2d_inplace_int64"), (PyCFunction)__pyx_pw_6pandas_5algos_171pad_2d_inplace_int64, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_171pad_2d_inplace_int64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_values = 0; PyArrayObject *__pyx_v_mask = 0; PyObject *__pyx_v_limit = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("pad_2d_inplace_int64 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_values,&__pyx_n_s_mask,&__pyx_n_s_limit,0}; PyObject* values[3] = {0,0,0}; /* "pandas/src/generated.pyx":1527 * def pad_2d_inplace_int64(ndarray[int64_t, ndim=2] values, * ndarray[uint8_t, ndim=2] mask, * limit=None): # <<<<<<<<<<<<<< * cdef Py_ssize_t i, j, N, K * cdef int64_t val */ values[2] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_values)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_mask)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("pad_2d_inplace_int64", 0, 2, 3, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1525; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_limit); if (value) { values[2] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "pad_2d_inplace_int64") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1525; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_values = ((PyArrayObject *)values[0]); __pyx_v_mask = ((PyArrayObject *)values[1]); __pyx_v_limit = values[2]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("pad_2d_inplace_int64", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1525; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.pad_2d_inplace_int64", __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_filename = __pyx_f[2]; __pyx_lineno = 1525; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_mask), __pyx_ptype_5numpy_ndarray, 1, "mask", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1526; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_170pad_2d_inplace_int64(__pyx_self, __pyx_v_values, __pyx_v_mask, __pyx_v_limit); /* "pandas/src/generated.pyx":1525 * @cython.boundscheck(False) * @cython.wraparound(False) * def pad_2d_inplace_int64(ndarray[int64_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[uint8_t, ndim=2] mask, * limit=None): */ /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5algos_170pad_2d_inplace_int64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_mask, PyObject *__pyx_v_limit) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_N; Py_ssize_t __pyx_v_K; __pyx_t_5numpy_int64_t __pyx_v_val; int __pyx_v_lim; int __pyx_v_fill_count; __Pyx_LocalBuf_ND __pyx_pybuffernd_mask; __Pyx_Buffer __pyx_pybuffer_mask; __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; PyObject *(*__pyx_t_5)(PyObject *); Py_ssize_t __pyx_t_6; Py_ssize_t __pyx_t_7; int __pyx_t_8; int __pyx_t_9; int __pyx_t_10; Py_ssize_t __pyx_t_11; long __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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("pad_2d_inplace_int64", 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_mask.pybuffer.buf = NULL; __pyx_pybuffer_mask.refcount = 0; __pyx_pybuffernd_mask.data = NULL; __pyx_pybuffernd_mask.rcbuffer = &__pyx_pybuffer_mask; { __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_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1525; __pyx_clineno = __LINE__; goto __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_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; 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, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1525; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; __pyx_pybuffernd_mask.diminfo[1].strides = __pyx_pybuffernd_mask.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_mask.diminfo[1].shape = __pyx_pybuffernd_mask.rcbuffer->pybuffer.shape[1]; /* "pandas/src/generated.pyx":1530 * cdef Py_ssize_t i, j, N, K * cdef int64_t val * cdef int lim, fill_count = 0 # <<<<<<<<<<<<<< * * K, N = ( values).shape */ __pyx_v_fill_count = 0; /* "pandas/src/generated.pyx":1532 * cdef int lim, fill_count = 0 * * K, N = ( values).shape # <<<<<<<<<<<<<< * * # GH 2778 */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_values), __pyx_n_s_shape); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1532; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) { PyObject* sequence = __pyx_t_1; #if CYTHON_COMPILING_IN_CPYTHON Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1532; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1); } else { __pyx_t_2 = PyList_GET_ITEM(sequence, 0); __pyx_t_3 = PyList_GET_ITEM(sequence, 1); } __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); #else __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1532; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1532; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } else { Py_ssize_t index = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1532; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_5 = Py_TYPE(__pyx_t_4)->tp_iternext; index = 0; __pyx_t_2 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_2)) goto __pyx_L3_unpacking_failed; __Pyx_GOTREF(__pyx_t_2); index = 1; __pyx_t_3 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_3)) goto __pyx_L3_unpacking_failed; __Pyx_GOTREF(__pyx_t_3); if (__Pyx_IternextUnpackEndCheck(__pyx_t_5(__pyx_t_4), 2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1532; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 1532; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_L4_unpacking_done:; } __pyx_t_6 = __Pyx_PyIndex_AsSsize_t(__pyx_t_2); if (unlikely((__pyx_t_6 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1532; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_7 = __Pyx_PyIndex_AsSsize_t(__pyx_t_3); if (unlikely((__pyx_t_7 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1532; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_K = __pyx_t_6; __pyx_v_N = __pyx_t_7; /* "pandas/src/generated.pyx":1535 * * # GH 2778 * if N == 0: # <<<<<<<<<<<<<< * return * */ __pyx_t_8 = ((__pyx_v_N == 0) != 0); if (__pyx_t_8) { /* "pandas/src/generated.pyx":1536 * # GH 2778 * if N == 0: * return # <<<<<<<<<<<<<< * * if limit is None: */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; } /* "pandas/src/generated.pyx":1538 * return * * if limit is None: # <<<<<<<<<<<<<< * lim = N * else: */ __pyx_t_8 = (__pyx_v_limit == Py_None); __pyx_t_9 = (__pyx_t_8 != 0); if (__pyx_t_9) { /* "pandas/src/generated.pyx":1539 * * if limit is None: * lim = N # <<<<<<<<<<<<<< * else: * if limit < 0: */ __pyx_v_lim = __pyx_v_N; goto __pyx_L6; } /*else*/ { /* "pandas/src/generated.pyx":1541 * lim = N * else: * if limit < 0: # <<<<<<<<<<<<<< * raise ValueError('Limit must be non-negative') * lim = limit */ __pyx_t_1 = PyObject_RichCompare(__pyx_v_limit, __pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1541; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1541; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_9) { /* "pandas/src/generated.pyx":1542 * else: * if limit < 0: * raise ValueError('Limit must be non-negative') # <<<<<<<<<<<<<< * lim = limit * */ __pyx_t_1 = PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__75, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1542; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 1542; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } /* "pandas/src/generated.pyx":1543 * if limit < 0: * raise ValueError('Limit must be non-negative') * lim = limit # <<<<<<<<<<<<<< * * for j in range(K): */ __pyx_t_10 = __Pyx_PyInt_As_int(__pyx_v_limit); if (unlikely((__pyx_t_10 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1543; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_lim = __pyx_t_10; } __pyx_L6:; /* "pandas/src/generated.pyx":1545 * lim = limit * * for j in range(K): # <<<<<<<<<<<<<< * fill_count = 0 * val = values[j, 0] */ __pyx_t_7 = __pyx_v_K; for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_7; __pyx_t_6+=1) { __pyx_v_j = __pyx_t_6; /* "pandas/src/generated.pyx":1546 * * for j in range(K): * fill_count = 0 # <<<<<<<<<<<<<< * val = values[j, 0] * for i in range(N): */ __pyx_v_fill_count = 0; /* "pandas/src/generated.pyx":1547 * for j in range(K): * fill_count = 0 * val = values[j, 0] # <<<<<<<<<<<<<< * for i in range(N): * if mask[j, i]: */ __pyx_t_11 = __pyx_v_j; __pyx_t_12 = 0; __pyx_v_val = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_11, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_12, __pyx_pybuffernd_values.diminfo[1].strides)); /* "pandas/src/generated.pyx":1548 * fill_count = 0 * val = values[j, 0] * for i in range(N): # <<<<<<<<<<<<<< * if mask[j, i]: * if fill_count >= lim: */ __pyx_t_13 = __pyx_v_N; for (__pyx_t_14 = 0; __pyx_t_14 < __pyx_t_13; __pyx_t_14+=1) { __pyx_v_i = __pyx_t_14; /* "pandas/src/generated.pyx":1549 * val = values[j, 0] * for i in range(N): * if mask[j, i]: # <<<<<<<<<<<<<< * if fill_count >= lim: * continue */ __pyx_t_15 = __pyx_v_j; __pyx_t_16 = __pyx_v_i; __pyx_t_9 = ((*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_mask.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_mask.diminfo[0].strides, __pyx_t_16, __pyx_pybuffernd_mask.diminfo[1].strides)) != 0); if (__pyx_t_9) { /* "pandas/src/generated.pyx":1550 * for i in range(N): * if mask[j, i]: * if fill_count >= lim: # <<<<<<<<<<<<<< * continue * fill_count += 1 */ __pyx_t_9 = ((__pyx_v_fill_count >= __pyx_v_lim) != 0); if (__pyx_t_9) { /* "pandas/src/generated.pyx":1551 * if mask[j, i]: * if fill_count >= lim: * continue # <<<<<<<<<<<<<< * fill_count += 1 * values[j, i] = val */ goto __pyx_L10_continue; } /* "pandas/src/generated.pyx":1552 * if fill_count >= lim: * continue * fill_count += 1 # <<<<<<<<<<<<<< * values[j, i] = val * else: */ __pyx_v_fill_count = (__pyx_v_fill_count + 1); /* "pandas/src/generated.pyx":1553 * continue * fill_count += 1 * values[j, i] = val # <<<<<<<<<<<<<< * else: * fill_count = 0 */ __pyx_t_17 = __pyx_v_j; __pyx_t_18 = __pyx_v_i; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_18, __pyx_pybuffernd_values.diminfo[1].strides) = __pyx_v_val; goto __pyx_L12; } /*else*/ { /* "pandas/src/generated.pyx":1555 * values[j, i] = val * else: * fill_count = 0 # <<<<<<<<<<<<<< * val = values[j, i] * @cython.boundscheck(False) */ __pyx_v_fill_count = 0; /* "pandas/src/generated.pyx":1556 * else: * fill_count = 0 * val = values[j, i] # <<<<<<<<<<<<<< * @cython.boundscheck(False) * @cython.wraparound(False) */ __pyx_t_19 = __pyx_v_j; __pyx_t_20 = __pyx_v_i; __pyx_v_val = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_20, __pyx_pybuffernd_values.diminfo[1].strides)); } __pyx_L12:; __pyx_L10_continue:; } } /* "pandas/src/generated.pyx":1525 * @cython.boundscheck(False) * @cython.wraparound(False) * def pad_2d_inplace_int64(ndarray[int64_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[uint8_t, ndim=2] mask, * limit=None): */ /* 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_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_mask.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.pad_2d_inplace_int64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_mask.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":1559 * @cython.boundscheck(False) * @cython.wraparound(False) * def pad_2d_inplace_bool(ndarray[uint8_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[uint8_t, ndim=2] mask, * limit=None): */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_173pad_2d_inplace_bool(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_173pad_2d_inplace_bool = {__Pyx_NAMESTR("pad_2d_inplace_bool"), (PyCFunction)__pyx_pw_6pandas_5algos_173pad_2d_inplace_bool, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_173pad_2d_inplace_bool(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_values = 0; PyArrayObject *__pyx_v_mask = 0; PyObject *__pyx_v_limit = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("pad_2d_inplace_bool (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_values,&__pyx_n_s_mask,&__pyx_n_s_limit,0}; PyObject* values[3] = {0,0,0}; /* "pandas/src/generated.pyx":1561 * def pad_2d_inplace_bool(ndarray[uint8_t, ndim=2] values, * ndarray[uint8_t, ndim=2] mask, * limit=None): # <<<<<<<<<<<<<< * cdef Py_ssize_t i, j, N, K * cdef uint8_t val */ values[2] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_values)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_mask)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("pad_2d_inplace_bool", 0, 2, 3, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1559; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_limit); if (value) { values[2] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "pad_2d_inplace_bool") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1559; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_values = ((PyArrayObject *)values[0]); __pyx_v_mask = ((PyArrayObject *)values[1]); __pyx_v_limit = values[2]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("pad_2d_inplace_bool", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1559; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.pad_2d_inplace_bool", __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_filename = __pyx_f[2]; __pyx_lineno = 1559; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_mask), __pyx_ptype_5numpy_ndarray, 1, "mask", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1560; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_172pad_2d_inplace_bool(__pyx_self, __pyx_v_values, __pyx_v_mask, __pyx_v_limit); /* "pandas/src/generated.pyx":1559 * @cython.boundscheck(False) * @cython.wraparound(False) * def pad_2d_inplace_bool(ndarray[uint8_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[uint8_t, ndim=2] mask, * limit=None): */ /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5algos_172pad_2d_inplace_bool(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_mask, PyObject *__pyx_v_limit) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_N; Py_ssize_t __pyx_v_K; __pyx_t_5numpy_uint8_t __pyx_v_val; int __pyx_v_lim; int __pyx_v_fill_count; __Pyx_LocalBuf_ND __pyx_pybuffernd_mask; __Pyx_Buffer __pyx_pybuffer_mask; __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; PyObject *(*__pyx_t_5)(PyObject *); Py_ssize_t __pyx_t_6; Py_ssize_t __pyx_t_7; int __pyx_t_8; int __pyx_t_9; int __pyx_t_10; Py_ssize_t __pyx_t_11; long __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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("pad_2d_inplace_bool", 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_mask.pybuffer.buf = NULL; __pyx_pybuffer_mask.refcount = 0; __pyx_pybuffernd_mask.data = NULL; __pyx_pybuffernd_mask.rcbuffer = &__pyx_pybuffer_mask; { __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_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1559; __pyx_clineno = __LINE__; goto __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_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; 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, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1559; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; __pyx_pybuffernd_mask.diminfo[1].strides = __pyx_pybuffernd_mask.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_mask.diminfo[1].shape = __pyx_pybuffernd_mask.rcbuffer->pybuffer.shape[1]; /* "pandas/src/generated.pyx":1564 * cdef Py_ssize_t i, j, N, K * cdef uint8_t val * cdef int lim, fill_count = 0 # <<<<<<<<<<<<<< * * K, N = ( values).shape */ __pyx_v_fill_count = 0; /* "pandas/src/generated.pyx":1566 * cdef int lim, fill_count = 0 * * K, N = ( values).shape # <<<<<<<<<<<<<< * * # GH 2778 */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_values), __pyx_n_s_shape); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1566; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) { PyObject* sequence = __pyx_t_1; #if CYTHON_COMPILING_IN_CPYTHON Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1566; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1); } else { __pyx_t_2 = PyList_GET_ITEM(sequence, 0); __pyx_t_3 = PyList_GET_ITEM(sequence, 1); } __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); #else __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1566; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1566; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } else { Py_ssize_t index = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1566; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_5 = Py_TYPE(__pyx_t_4)->tp_iternext; index = 0; __pyx_t_2 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_2)) goto __pyx_L3_unpacking_failed; __Pyx_GOTREF(__pyx_t_2); index = 1; __pyx_t_3 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_3)) goto __pyx_L3_unpacking_failed; __Pyx_GOTREF(__pyx_t_3); if (__Pyx_IternextUnpackEndCheck(__pyx_t_5(__pyx_t_4), 2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1566; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 1566; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_L4_unpacking_done:; } __pyx_t_6 = __Pyx_PyIndex_AsSsize_t(__pyx_t_2); if (unlikely((__pyx_t_6 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1566; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_7 = __Pyx_PyIndex_AsSsize_t(__pyx_t_3); if (unlikely((__pyx_t_7 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1566; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_K = __pyx_t_6; __pyx_v_N = __pyx_t_7; /* "pandas/src/generated.pyx":1569 * * # GH 2778 * if N == 0: # <<<<<<<<<<<<<< * return * */ __pyx_t_8 = ((__pyx_v_N == 0) != 0); if (__pyx_t_8) { /* "pandas/src/generated.pyx":1570 * # GH 2778 * if N == 0: * return # <<<<<<<<<<<<<< * * if limit is None: */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; } /* "pandas/src/generated.pyx":1572 * return * * if limit is None: # <<<<<<<<<<<<<< * lim = N * else: */ __pyx_t_8 = (__pyx_v_limit == Py_None); __pyx_t_9 = (__pyx_t_8 != 0); if (__pyx_t_9) { /* "pandas/src/generated.pyx":1573 * * if limit is None: * lim = N # <<<<<<<<<<<<<< * else: * if limit < 0: */ __pyx_v_lim = __pyx_v_N; goto __pyx_L6; } /*else*/ { /* "pandas/src/generated.pyx":1575 * lim = N * else: * if limit < 0: # <<<<<<<<<<<<<< * raise ValueError('Limit must be non-negative') * lim = limit */ __pyx_t_1 = PyObject_RichCompare(__pyx_v_limit, __pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1575; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1575; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_9) { /* "pandas/src/generated.pyx":1576 * else: * if limit < 0: * raise ValueError('Limit must be non-negative') # <<<<<<<<<<<<<< * lim = limit * */ __pyx_t_1 = PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__76, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1576; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 1576; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } /* "pandas/src/generated.pyx":1577 * if limit < 0: * raise ValueError('Limit must be non-negative') * lim = limit # <<<<<<<<<<<<<< * * for j in range(K): */ __pyx_t_10 = __Pyx_PyInt_As_int(__pyx_v_limit); if (unlikely((__pyx_t_10 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1577; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_lim = __pyx_t_10; } __pyx_L6:; /* "pandas/src/generated.pyx":1579 * lim = limit * * for j in range(K): # <<<<<<<<<<<<<< * fill_count = 0 * val = values[j, 0] */ __pyx_t_7 = __pyx_v_K; for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_7; __pyx_t_6+=1) { __pyx_v_j = __pyx_t_6; /* "pandas/src/generated.pyx":1580 * * for j in range(K): * fill_count = 0 # <<<<<<<<<<<<<< * val = values[j, 0] * for i in range(N): */ __pyx_v_fill_count = 0; /* "pandas/src/generated.pyx":1581 * for j in range(K): * fill_count = 0 * val = values[j, 0] # <<<<<<<<<<<<<< * for i in range(N): * if mask[j, i]: */ __pyx_t_11 = __pyx_v_j; __pyx_t_12 = 0; __pyx_v_val = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_11, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_12, __pyx_pybuffernd_values.diminfo[1].strides)); /* "pandas/src/generated.pyx":1582 * fill_count = 0 * val = values[j, 0] * for i in range(N): # <<<<<<<<<<<<<< * if mask[j, i]: * if fill_count >= lim: */ __pyx_t_13 = __pyx_v_N; for (__pyx_t_14 = 0; __pyx_t_14 < __pyx_t_13; __pyx_t_14+=1) { __pyx_v_i = __pyx_t_14; /* "pandas/src/generated.pyx":1583 * val = values[j, 0] * for i in range(N): * if mask[j, i]: # <<<<<<<<<<<<<< * if fill_count >= lim: * continue */ __pyx_t_15 = __pyx_v_j; __pyx_t_16 = __pyx_v_i; __pyx_t_9 = ((*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_mask.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_mask.diminfo[0].strides, __pyx_t_16, __pyx_pybuffernd_mask.diminfo[1].strides)) != 0); if (__pyx_t_9) { /* "pandas/src/generated.pyx":1584 * for i in range(N): * if mask[j, i]: * if fill_count >= lim: # <<<<<<<<<<<<<< * continue * fill_count += 1 */ __pyx_t_9 = ((__pyx_v_fill_count >= __pyx_v_lim) != 0); if (__pyx_t_9) { /* "pandas/src/generated.pyx":1585 * if mask[j, i]: * if fill_count >= lim: * continue # <<<<<<<<<<<<<< * fill_count += 1 * values[j, i] = val */ goto __pyx_L10_continue; } /* "pandas/src/generated.pyx":1586 * if fill_count >= lim: * continue * fill_count += 1 # <<<<<<<<<<<<<< * values[j, i] = val * else: */ __pyx_v_fill_count = (__pyx_v_fill_count + 1); /* "pandas/src/generated.pyx":1587 * continue * fill_count += 1 * values[j, i] = val # <<<<<<<<<<<<<< * else: * fill_count = 0 */ __pyx_t_17 = __pyx_v_j; __pyx_t_18 = __pyx_v_i; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_18, __pyx_pybuffernd_values.diminfo[1].strides) = __pyx_v_val; goto __pyx_L12; } /*else*/ { /* "pandas/src/generated.pyx":1589 * values[j, i] = val * else: * fill_count = 0 # <<<<<<<<<<<<<< * val = values[j, i] * */ __pyx_v_fill_count = 0; /* "pandas/src/generated.pyx":1590 * else: * fill_count = 0 * val = values[j, i] # <<<<<<<<<<<<<< * * @cython.boundscheck(False) */ __pyx_t_19 = __pyx_v_j; __pyx_t_20 = __pyx_v_i; __pyx_v_val = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_20, __pyx_pybuffernd_values.diminfo[1].strides)); } __pyx_L12:; __pyx_L10_continue:; } } /* "pandas/src/generated.pyx":1559 * @cython.boundscheck(False) * @cython.wraparound(False) * def pad_2d_inplace_bool(ndarray[uint8_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[uint8_t, ndim=2] mask, * limit=None): */ /* 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_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_mask.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.pad_2d_inplace_bool", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_mask.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":1594 * @cython.boundscheck(False) * @cython.wraparound(False) * def backfill_2d_inplace_float64(ndarray[float64_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[uint8_t, ndim=2] mask, * limit=None): */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_175backfill_2d_inplace_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_175backfill_2d_inplace_float64 = {__Pyx_NAMESTR("backfill_2d_inplace_float64"), (PyCFunction)__pyx_pw_6pandas_5algos_175backfill_2d_inplace_float64, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_175backfill_2d_inplace_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_values = 0; PyArrayObject *__pyx_v_mask = 0; PyObject *__pyx_v_limit = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("backfill_2d_inplace_float64 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_values,&__pyx_n_s_mask,&__pyx_n_s_limit,0}; PyObject* values[3] = {0,0,0}; /* "pandas/src/generated.pyx":1596 * def backfill_2d_inplace_float64(ndarray[float64_t, ndim=2] values, * ndarray[uint8_t, ndim=2] mask, * limit=None): # <<<<<<<<<<<<<< * cdef Py_ssize_t i, j, N, K * cdef float64_t val */ values[2] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_values)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_mask)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("backfill_2d_inplace_float64", 0, 2, 3, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1594; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_limit); if (value) { values[2] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "backfill_2d_inplace_float64") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1594; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_values = ((PyArrayObject *)values[0]); __pyx_v_mask = ((PyArrayObject *)values[1]); __pyx_v_limit = values[2]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("backfill_2d_inplace_float64", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1594; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.backfill_2d_inplace_float64", __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_filename = __pyx_f[2]; __pyx_lineno = 1594; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_mask), __pyx_ptype_5numpy_ndarray, 1, "mask", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1595; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_174backfill_2d_inplace_float64(__pyx_self, __pyx_v_values, __pyx_v_mask, __pyx_v_limit); /* "pandas/src/generated.pyx":1594 * @cython.boundscheck(False) * @cython.wraparound(False) * def backfill_2d_inplace_float64(ndarray[float64_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[uint8_t, ndim=2] mask, * limit=None): */ /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5algos_174backfill_2d_inplace_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_mask, PyObject *__pyx_v_limit) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_N; Py_ssize_t __pyx_v_K; __pyx_t_5numpy_float64_t __pyx_v_val; int __pyx_v_lim; int __pyx_v_fill_count; __Pyx_LocalBuf_ND __pyx_pybuffernd_mask; __Pyx_Buffer __pyx_pybuffer_mask; __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; PyObject *(*__pyx_t_5)(PyObject *); Py_ssize_t __pyx_t_6; Py_ssize_t __pyx_t_7; int __pyx_t_8; int __pyx_t_9; int __pyx_t_10; Py_ssize_t __pyx_t_11; Py_ssize_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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("backfill_2d_inplace_float64", 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_mask.pybuffer.buf = NULL; __pyx_pybuffer_mask.refcount = 0; __pyx_pybuffernd_mask.data = NULL; __pyx_pybuffernd_mask.rcbuffer = &__pyx_pybuffer_mask; { __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| PyBUF_WRITABLE, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1594; __pyx_clineno = __LINE__; goto __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_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; 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, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1594; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; __pyx_pybuffernd_mask.diminfo[1].strides = __pyx_pybuffernd_mask.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_mask.diminfo[1].shape = __pyx_pybuffernd_mask.rcbuffer->pybuffer.shape[1]; /* "pandas/src/generated.pyx":1599 * cdef Py_ssize_t i, j, N, K * cdef float64_t val * cdef int lim, fill_count = 0 # <<<<<<<<<<<<<< * * K, N = ( values).shape */ __pyx_v_fill_count = 0; /* "pandas/src/generated.pyx":1601 * cdef int lim, fill_count = 0 * * K, N = ( values).shape # <<<<<<<<<<<<<< * * # GH 2778 */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_values), __pyx_n_s_shape); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1601; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) { PyObject* sequence = __pyx_t_1; #if CYTHON_COMPILING_IN_CPYTHON Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1601; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1); } else { __pyx_t_2 = PyList_GET_ITEM(sequence, 0); __pyx_t_3 = PyList_GET_ITEM(sequence, 1); } __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); #else __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1601; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1601; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } else { Py_ssize_t index = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1601; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_5 = Py_TYPE(__pyx_t_4)->tp_iternext; index = 0; __pyx_t_2 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_2)) goto __pyx_L3_unpacking_failed; __Pyx_GOTREF(__pyx_t_2); index = 1; __pyx_t_3 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_3)) goto __pyx_L3_unpacking_failed; __Pyx_GOTREF(__pyx_t_3); if (__Pyx_IternextUnpackEndCheck(__pyx_t_5(__pyx_t_4), 2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1601; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 1601; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_L4_unpacking_done:; } __pyx_t_6 = __Pyx_PyIndex_AsSsize_t(__pyx_t_2); if (unlikely((__pyx_t_6 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1601; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_7 = __Pyx_PyIndex_AsSsize_t(__pyx_t_3); if (unlikely((__pyx_t_7 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1601; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_K = __pyx_t_6; __pyx_v_N = __pyx_t_7; /* "pandas/src/generated.pyx":1604 * * # GH 2778 * if N == 0: # <<<<<<<<<<<<<< * return * */ __pyx_t_8 = ((__pyx_v_N == 0) != 0); if (__pyx_t_8) { /* "pandas/src/generated.pyx":1605 * # GH 2778 * if N == 0: * return # <<<<<<<<<<<<<< * * if limit is None: */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; } /* "pandas/src/generated.pyx":1607 * return * * if limit is None: # <<<<<<<<<<<<<< * lim = N * else: */ __pyx_t_8 = (__pyx_v_limit == Py_None); __pyx_t_9 = (__pyx_t_8 != 0); if (__pyx_t_9) { /* "pandas/src/generated.pyx":1608 * * if limit is None: * lim = N # <<<<<<<<<<<<<< * else: * if limit < 0: */ __pyx_v_lim = __pyx_v_N; goto __pyx_L6; } /*else*/ { /* "pandas/src/generated.pyx":1610 * lim = N * else: * if limit < 0: # <<<<<<<<<<<<<< * raise ValueError('Limit must be non-negative') * lim = limit */ __pyx_t_1 = PyObject_RichCompare(__pyx_v_limit, __pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1610; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1610; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_9) { /* "pandas/src/generated.pyx":1611 * else: * if limit < 0: * raise ValueError('Limit must be non-negative') # <<<<<<<<<<<<<< * lim = limit * */ __pyx_t_1 = PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__77, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1611; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 1611; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } /* "pandas/src/generated.pyx":1612 * if limit < 0: * raise ValueError('Limit must be non-negative') * lim = limit # <<<<<<<<<<<<<< * * for j in range(K): */ __pyx_t_10 = __Pyx_PyInt_As_int(__pyx_v_limit); if (unlikely((__pyx_t_10 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1612; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_lim = __pyx_t_10; } __pyx_L6:; /* "pandas/src/generated.pyx":1614 * lim = limit * * for j in range(K): # <<<<<<<<<<<<<< * fill_count = 0 * val = values[j, N - 1] */ __pyx_t_7 = __pyx_v_K; for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_7; __pyx_t_6+=1) { __pyx_v_j = __pyx_t_6; /* "pandas/src/generated.pyx":1615 * * for j in range(K): * fill_count = 0 # <<<<<<<<<<<<<< * val = values[j, N - 1] * for i in range(N - 1, -1 , -1): */ __pyx_v_fill_count = 0; /* "pandas/src/generated.pyx":1616 * for j in range(K): * fill_count = 0 * val = values[j, N - 1] # <<<<<<<<<<<<<< * for i in range(N - 1, -1 , -1): * if mask[j, i]: */ __pyx_t_11 = __pyx_v_j; __pyx_t_12 = (__pyx_v_N - 1); __pyx_v_val = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_11, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_12, __pyx_pybuffernd_values.diminfo[1].strides)); /* "pandas/src/generated.pyx":1617 * fill_count = 0 * val = values[j, N - 1] * for i in range(N - 1, -1 , -1): # <<<<<<<<<<<<<< * if mask[j, i]: * if fill_count >= lim: */ for (__pyx_t_13 = (__pyx_v_N - 1); __pyx_t_13 > -1; __pyx_t_13-=1) { __pyx_v_i = __pyx_t_13; /* "pandas/src/generated.pyx":1618 * val = values[j, N - 1] * for i in range(N - 1, -1 , -1): * if mask[j, i]: # <<<<<<<<<<<<<< * if fill_count >= lim: * continue */ __pyx_t_14 = __pyx_v_j; __pyx_t_15 = __pyx_v_i; __pyx_t_9 = ((*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_mask.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_mask.diminfo[0].strides, __pyx_t_15, __pyx_pybuffernd_mask.diminfo[1].strides)) != 0); if (__pyx_t_9) { /* "pandas/src/generated.pyx":1619 * for i in range(N - 1, -1 , -1): * if mask[j, i]: * if fill_count >= lim: # <<<<<<<<<<<<<< * continue * fill_count += 1 */ __pyx_t_9 = ((__pyx_v_fill_count >= __pyx_v_lim) != 0); if (__pyx_t_9) { /* "pandas/src/generated.pyx":1620 * if mask[j, i]: * if fill_count >= lim: * continue # <<<<<<<<<<<<<< * fill_count += 1 * values[j, i] = val */ goto __pyx_L10_continue; } /* "pandas/src/generated.pyx":1621 * if fill_count >= lim: * continue * fill_count += 1 # <<<<<<<<<<<<<< * values[j, i] = val * else: */ __pyx_v_fill_count = (__pyx_v_fill_count + 1); /* "pandas/src/generated.pyx":1622 * continue * fill_count += 1 * values[j, i] = val # <<<<<<<<<<<<<< * else: * fill_count = 0 */ __pyx_t_16 = __pyx_v_j; __pyx_t_17 = __pyx_v_i; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_17, __pyx_pybuffernd_values.diminfo[1].strides) = __pyx_v_val; goto __pyx_L12; } /*else*/ { /* "pandas/src/generated.pyx":1624 * values[j, i] = val * else: * fill_count = 0 # <<<<<<<<<<<<<< * val = values[j, i] * @cython.boundscheck(False) */ __pyx_v_fill_count = 0; /* "pandas/src/generated.pyx":1625 * else: * fill_count = 0 * val = values[j, i] # <<<<<<<<<<<<<< * @cython.boundscheck(False) * @cython.wraparound(False) */ __pyx_t_18 = __pyx_v_j; __pyx_t_19 = __pyx_v_i; __pyx_v_val = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_19, __pyx_pybuffernd_values.diminfo[1].strides)); } __pyx_L12:; __pyx_L10_continue:; } } /* "pandas/src/generated.pyx":1594 * @cython.boundscheck(False) * @cython.wraparound(False) * def backfill_2d_inplace_float64(ndarray[float64_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[uint8_t, ndim=2] mask, * limit=None): */ /* 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_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_mask.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.backfill_2d_inplace_float64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_mask.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":1628 * @cython.boundscheck(False) * @cython.wraparound(False) * def backfill_2d_inplace_float32(ndarray[float32_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[uint8_t, ndim=2] mask, * limit=None): */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_177backfill_2d_inplace_float32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_177backfill_2d_inplace_float32 = {__Pyx_NAMESTR("backfill_2d_inplace_float32"), (PyCFunction)__pyx_pw_6pandas_5algos_177backfill_2d_inplace_float32, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_177backfill_2d_inplace_float32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_values = 0; PyArrayObject *__pyx_v_mask = 0; PyObject *__pyx_v_limit = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("backfill_2d_inplace_float32 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_values,&__pyx_n_s_mask,&__pyx_n_s_limit,0}; PyObject* values[3] = {0,0,0}; /* "pandas/src/generated.pyx":1630 * def backfill_2d_inplace_float32(ndarray[float32_t, ndim=2] values, * ndarray[uint8_t, ndim=2] mask, * limit=None): # <<<<<<<<<<<<<< * cdef Py_ssize_t i, j, N, K * cdef float32_t val */ values[2] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_values)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_mask)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("backfill_2d_inplace_float32", 0, 2, 3, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1628; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_limit); if (value) { values[2] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "backfill_2d_inplace_float32") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1628; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_values = ((PyArrayObject *)values[0]); __pyx_v_mask = ((PyArrayObject *)values[1]); __pyx_v_limit = values[2]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("backfill_2d_inplace_float32", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1628; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.backfill_2d_inplace_float32", __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_filename = __pyx_f[2]; __pyx_lineno = 1628; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_mask), __pyx_ptype_5numpy_ndarray, 1, "mask", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1629; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_176backfill_2d_inplace_float32(__pyx_self, __pyx_v_values, __pyx_v_mask, __pyx_v_limit); /* "pandas/src/generated.pyx":1628 * @cython.boundscheck(False) * @cython.wraparound(False) * def backfill_2d_inplace_float32(ndarray[float32_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[uint8_t, ndim=2] mask, * limit=None): */ /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5algos_176backfill_2d_inplace_float32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_mask, PyObject *__pyx_v_limit) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_N; Py_ssize_t __pyx_v_K; __pyx_t_5numpy_float32_t __pyx_v_val; int __pyx_v_lim; int __pyx_v_fill_count; __Pyx_LocalBuf_ND __pyx_pybuffernd_mask; __Pyx_Buffer __pyx_pybuffer_mask; __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; PyObject *(*__pyx_t_5)(PyObject *); Py_ssize_t __pyx_t_6; Py_ssize_t __pyx_t_7; int __pyx_t_8; int __pyx_t_9; int __pyx_t_10; Py_ssize_t __pyx_t_11; Py_ssize_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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("backfill_2d_inplace_float32", 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_mask.pybuffer.buf = NULL; __pyx_pybuffer_mask.refcount = 0; __pyx_pybuffernd_mask.data = NULL; __pyx_pybuffernd_mask.rcbuffer = &__pyx_pybuffer_mask; { __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_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1628; __pyx_clineno = __LINE__; goto __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_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; 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, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1628; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; __pyx_pybuffernd_mask.diminfo[1].strides = __pyx_pybuffernd_mask.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_mask.diminfo[1].shape = __pyx_pybuffernd_mask.rcbuffer->pybuffer.shape[1]; /* "pandas/src/generated.pyx":1633 * cdef Py_ssize_t i, j, N, K * cdef float32_t val * cdef int lim, fill_count = 0 # <<<<<<<<<<<<<< * * K, N = ( values).shape */ __pyx_v_fill_count = 0; /* "pandas/src/generated.pyx":1635 * cdef int lim, fill_count = 0 * * K, N = ( values).shape # <<<<<<<<<<<<<< * * # GH 2778 */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_values), __pyx_n_s_shape); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1635; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) { PyObject* sequence = __pyx_t_1; #if CYTHON_COMPILING_IN_CPYTHON Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1635; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1); } else { __pyx_t_2 = PyList_GET_ITEM(sequence, 0); __pyx_t_3 = PyList_GET_ITEM(sequence, 1); } __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); #else __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1635; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1635; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } else { Py_ssize_t index = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1635; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_5 = Py_TYPE(__pyx_t_4)->tp_iternext; index = 0; __pyx_t_2 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_2)) goto __pyx_L3_unpacking_failed; __Pyx_GOTREF(__pyx_t_2); index = 1; __pyx_t_3 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_3)) goto __pyx_L3_unpacking_failed; __Pyx_GOTREF(__pyx_t_3); if (__Pyx_IternextUnpackEndCheck(__pyx_t_5(__pyx_t_4), 2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1635; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 1635; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_L4_unpacking_done:; } __pyx_t_6 = __Pyx_PyIndex_AsSsize_t(__pyx_t_2); if (unlikely((__pyx_t_6 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1635; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_7 = __Pyx_PyIndex_AsSsize_t(__pyx_t_3); if (unlikely((__pyx_t_7 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1635; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_K = __pyx_t_6; __pyx_v_N = __pyx_t_7; /* "pandas/src/generated.pyx":1638 * * # GH 2778 * if N == 0: # <<<<<<<<<<<<<< * return * */ __pyx_t_8 = ((__pyx_v_N == 0) != 0); if (__pyx_t_8) { /* "pandas/src/generated.pyx":1639 * # GH 2778 * if N == 0: * return # <<<<<<<<<<<<<< * * if limit is None: */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; } /* "pandas/src/generated.pyx":1641 * return * * if limit is None: # <<<<<<<<<<<<<< * lim = N * else: */ __pyx_t_8 = (__pyx_v_limit == Py_None); __pyx_t_9 = (__pyx_t_8 != 0); if (__pyx_t_9) { /* "pandas/src/generated.pyx":1642 * * if limit is None: * lim = N # <<<<<<<<<<<<<< * else: * if limit < 0: */ __pyx_v_lim = __pyx_v_N; goto __pyx_L6; } /*else*/ { /* "pandas/src/generated.pyx":1644 * lim = N * else: * if limit < 0: # <<<<<<<<<<<<<< * raise ValueError('Limit must be non-negative') * lim = limit */ __pyx_t_1 = PyObject_RichCompare(__pyx_v_limit, __pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1644; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1644; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_9) { /* "pandas/src/generated.pyx":1645 * else: * if limit < 0: * raise ValueError('Limit must be non-negative') # <<<<<<<<<<<<<< * lim = limit * */ __pyx_t_1 = PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__78, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1645; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 1645; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } /* "pandas/src/generated.pyx":1646 * if limit < 0: * raise ValueError('Limit must be non-negative') * lim = limit # <<<<<<<<<<<<<< * * for j in range(K): */ __pyx_t_10 = __Pyx_PyInt_As_int(__pyx_v_limit); if (unlikely((__pyx_t_10 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1646; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_lim = __pyx_t_10; } __pyx_L6:; /* "pandas/src/generated.pyx":1648 * lim = limit * * for j in range(K): # <<<<<<<<<<<<<< * fill_count = 0 * val = values[j, N - 1] */ __pyx_t_7 = __pyx_v_K; for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_7; __pyx_t_6+=1) { __pyx_v_j = __pyx_t_6; /* "pandas/src/generated.pyx":1649 * * for j in range(K): * fill_count = 0 # <<<<<<<<<<<<<< * val = values[j, N - 1] * for i in range(N - 1, -1 , -1): */ __pyx_v_fill_count = 0; /* "pandas/src/generated.pyx":1650 * for j in range(K): * fill_count = 0 * val = values[j, N - 1] # <<<<<<<<<<<<<< * for i in range(N - 1, -1 , -1): * if mask[j, i]: */ __pyx_t_11 = __pyx_v_j; __pyx_t_12 = (__pyx_v_N - 1); __pyx_v_val = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_11, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_12, __pyx_pybuffernd_values.diminfo[1].strides)); /* "pandas/src/generated.pyx":1651 * fill_count = 0 * val = values[j, N - 1] * for i in range(N - 1, -1 , -1): # <<<<<<<<<<<<<< * if mask[j, i]: * if fill_count >= lim: */ for (__pyx_t_13 = (__pyx_v_N - 1); __pyx_t_13 > -1; __pyx_t_13-=1) { __pyx_v_i = __pyx_t_13; /* "pandas/src/generated.pyx":1652 * val = values[j, N - 1] * for i in range(N - 1, -1 , -1): * if mask[j, i]: # <<<<<<<<<<<<<< * if fill_count >= lim: * continue */ __pyx_t_14 = __pyx_v_j; __pyx_t_15 = __pyx_v_i; __pyx_t_9 = ((*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_mask.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_mask.diminfo[0].strides, __pyx_t_15, __pyx_pybuffernd_mask.diminfo[1].strides)) != 0); if (__pyx_t_9) { /* "pandas/src/generated.pyx":1653 * for i in range(N - 1, -1 , -1): * if mask[j, i]: * if fill_count >= lim: # <<<<<<<<<<<<<< * continue * fill_count += 1 */ __pyx_t_9 = ((__pyx_v_fill_count >= __pyx_v_lim) != 0); if (__pyx_t_9) { /* "pandas/src/generated.pyx":1654 * if mask[j, i]: * if fill_count >= lim: * continue # <<<<<<<<<<<<<< * fill_count += 1 * values[j, i] = val */ goto __pyx_L10_continue; } /* "pandas/src/generated.pyx":1655 * if fill_count >= lim: * continue * fill_count += 1 # <<<<<<<<<<<<<< * values[j, i] = val * else: */ __pyx_v_fill_count = (__pyx_v_fill_count + 1); /* "pandas/src/generated.pyx":1656 * continue * fill_count += 1 * values[j, i] = val # <<<<<<<<<<<<<< * else: * fill_count = 0 */ __pyx_t_16 = __pyx_v_j; __pyx_t_17 = __pyx_v_i; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_17, __pyx_pybuffernd_values.diminfo[1].strides) = __pyx_v_val; goto __pyx_L12; } /*else*/ { /* "pandas/src/generated.pyx":1658 * values[j, i] = val * else: * fill_count = 0 # <<<<<<<<<<<<<< * val = values[j, i] * @cython.boundscheck(False) */ __pyx_v_fill_count = 0; /* "pandas/src/generated.pyx":1659 * else: * fill_count = 0 * val = values[j, i] # <<<<<<<<<<<<<< * @cython.boundscheck(False) * @cython.wraparound(False) */ __pyx_t_18 = __pyx_v_j; __pyx_t_19 = __pyx_v_i; __pyx_v_val = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_19, __pyx_pybuffernd_values.diminfo[1].strides)); } __pyx_L12:; __pyx_L10_continue:; } } /* "pandas/src/generated.pyx":1628 * @cython.boundscheck(False) * @cython.wraparound(False) * def backfill_2d_inplace_float32(ndarray[float32_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[uint8_t, ndim=2] mask, * limit=None): */ /* 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_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_mask.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.backfill_2d_inplace_float32", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_mask.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":1662 * @cython.boundscheck(False) * @cython.wraparound(False) * def backfill_2d_inplace_object(ndarray[object, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[uint8_t, ndim=2] mask, * limit=None): */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_179backfill_2d_inplace_object(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_179backfill_2d_inplace_object = {__Pyx_NAMESTR("backfill_2d_inplace_object"), (PyCFunction)__pyx_pw_6pandas_5algos_179backfill_2d_inplace_object, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_179backfill_2d_inplace_object(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_values = 0; PyArrayObject *__pyx_v_mask = 0; PyObject *__pyx_v_limit = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("backfill_2d_inplace_object (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_values,&__pyx_n_s_mask,&__pyx_n_s_limit,0}; PyObject* values[3] = {0,0,0}; /* "pandas/src/generated.pyx":1664 * def backfill_2d_inplace_object(ndarray[object, ndim=2] values, * ndarray[uint8_t, ndim=2] mask, * limit=None): # <<<<<<<<<<<<<< * cdef Py_ssize_t i, j, N, K * cdef object val */ values[2] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_values)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_mask)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("backfill_2d_inplace_object", 0, 2, 3, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1662; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_limit); if (value) { values[2] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "backfill_2d_inplace_object") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1662; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_values = ((PyArrayObject *)values[0]); __pyx_v_mask = ((PyArrayObject *)values[1]); __pyx_v_limit = values[2]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("backfill_2d_inplace_object", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1662; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.backfill_2d_inplace_object", __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_filename = __pyx_f[2]; __pyx_lineno = 1662; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_mask), __pyx_ptype_5numpy_ndarray, 1, "mask", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1663; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_178backfill_2d_inplace_object(__pyx_self, __pyx_v_values, __pyx_v_mask, __pyx_v_limit); /* "pandas/src/generated.pyx":1662 * @cython.boundscheck(False) * @cython.wraparound(False) * def backfill_2d_inplace_object(ndarray[object, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[uint8_t, ndim=2] mask, * limit=None): */ /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5algos_178backfill_2d_inplace_object(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_mask, PyObject *__pyx_v_limit) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_N; Py_ssize_t __pyx_v_K; PyObject *__pyx_v_val = 0; int __pyx_v_lim; int __pyx_v_fill_count; __Pyx_LocalBuf_ND __pyx_pybuffernd_mask; __Pyx_Buffer __pyx_pybuffer_mask; __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; PyObject *(*__pyx_t_5)(PyObject *); Py_ssize_t __pyx_t_6; Py_ssize_t __pyx_t_7; int __pyx_t_8; int __pyx_t_9; int __pyx_t_10; Py_ssize_t __pyx_t_11; Py_ssize_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; PyObject **__pyx_t_18; Py_ssize_t __pyx_t_19; Py_ssize_t __pyx_t_20; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("backfill_2d_inplace_object", 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_mask.pybuffer.buf = NULL; __pyx_pybuffer_mask.refcount = 0; __pyx_pybuffernd_mask.data = NULL; __pyx_pybuffernd_mask.rcbuffer = &__pyx_pybuffer_mask; { __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| PyBUF_WRITABLE, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1662; __pyx_clineno = __LINE__; goto __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_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; 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, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1662; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; __pyx_pybuffernd_mask.diminfo[1].strides = __pyx_pybuffernd_mask.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_mask.diminfo[1].shape = __pyx_pybuffernd_mask.rcbuffer->pybuffer.shape[1]; /* "pandas/src/generated.pyx":1667 * cdef Py_ssize_t i, j, N, K * cdef object val * cdef int lim, fill_count = 0 # <<<<<<<<<<<<<< * * K, N = ( values).shape */ __pyx_v_fill_count = 0; /* "pandas/src/generated.pyx":1669 * cdef int lim, fill_count = 0 * * K, N = ( values).shape # <<<<<<<<<<<<<< * * # GH 2778 */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_values), __pyx_n_s_shape); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1669; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) { PyObject* sequence = __pyx_t_1; #if CYTHON_COMPILING_IN_CPYTHON Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1669; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1); } else { __pyx_t_2 = PyList_GET_ITEM(sequence, 0); __pyx_t_3 = PyList_GET_ITEM(sequence, 1); } __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); #else __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1669; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1669; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } else { Py_ssize_t index = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1669; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_5 = Py_TYPE(__pyx_t_4)->tp_iternext; index = 0; __pyx_t_2 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_2)) goto __pyx_L3_unpacking_failed; __Pyx_GOTREF(__pyx_t_2); index = 1; __pyx_t_3 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_3)) goto __pyx_L3_unpacking_failed; __Pyx_GOTREF(__pyx_t_3); if (__Pyx_IternextUnpackEndCheck(__pyx_t_5(__pyx_t_4), 2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1669; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 1669; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_L4_unpacking_done:; } __pyx_t_6 = __Pyx_PyIndex_AsSsize_t(__pyx_t_2); if (unlikely((__pyx_t_6 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1669; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_7 = __Pyx_PyIndex_AsSsize_t(__pyx_t_3); if (unlikely((__pyx_t_7 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1669; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_K = __pyx_t_6; __pyx_v_N = __pyx_t_7; /* "pandas/src/generated.pyx":1672 * * # GH 2778 * if N == 0: # <<<<<<<<<<<<<< * return * */ __pyx_t_8 = ((__pyx_v_N == 0) != 0); if (__pyx_t_8) { /* "pandas/src/generated.pyx":1673 * # GH 2778 * if N == 0: * return # <<<<<<<<<<<<<< * * if limit is None: */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; } /* "pandas/src/generated.pyx":1675 * return * * if limit is None: # <<<<<<<<<<<<<< * lim = N * else: */ __pyx_t_8 = (__pyx_v_limit == Py_None); __pyx_t_9 = (__pyx_t_8 != 0); if (__pyx_t_9) { /* "pandas/src/generated.pyx":1676 * * if limit is None: * lim = N # <<<<<<<<<<<<<< * else: * if limit < 0: */ __pyx_v_lim = __pyx_v_N; goto __pyx_L6; } /*else*/ { /* "pandas/src/generated.pyx":1678 * lim = N * else: * if limit < 0: # <<<<<<<<<<<<<< * raise ValueError('Limit must be non-negative') * lim = limit */ __pyx_t_1 = PyObject_RichCompare(__pyx_v_limit, __pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1678; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1678; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_9) { /* "pandas/src/generated.pyx":1679 * else: * if limit < 0: * raise ValueError('Limit must be non-negative') # <<<<<<<<<<<<<< * lim = limit * */ __pyx_t_1 = PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__79, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1679; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 1679; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } /* "pandas/src/generated.pyx":1680 * if limit < 0: * raise ValueError('Limit must be non-negative') * lim = limit # <<<<<<<<<<<<<< * * for j in range(K): */ __pyx_t_10 = __Pyx_PyInt_As_int(__pyx_v_limit); if (unlikely((__pyx_t_10 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1680; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_lim = __pyx_t_10; } __pyx_L6:; /* "pandas/src/generated.pyx":1682 * lim = limit * * for j in range(K): # <<<<<<<<<<<<<< * fill_count = 0 * val = values[j, N - 1] */ __pyx_t_7 = __pyx_v_K; for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_7; __pyx_t_6+=1) { __pyx_v_j = __pyx_t_6; /* "pandas/src/generated.pyx":1683 * * for j in range(K): * fill_count = 0 # <<<<<<<<<<<<<< * val = values[j, N - 1] * for i in range(N - 1, -1 , -1): */ __pyx_v_fill_count = 0; /* "pandas/src/generated.pyx":1684 * for j in range(K): * fill_count = 0 * val = values[j, N - 1] # <<<<<<<<<<<<<< * for i in range(N - 1, -1 , -1): * if mask[j, i]: */ __pyx_t_11 = __pyx_v_j; __pyx_t_12 = (__pyx_v_N - 1); __pyx_t_1 = (PyObject *) *__Pyx_BufPtrStrided2d(PyObject **, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_11, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_12, __pyx_pybuffernd_values.diminfo[1].strides); __Pyx_INCREF((PyObject*)__pyx_t_1); __Pyx_XDECREF_SET(__pyx_v_val, __pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/generated.pyx":1685 * fill_count = 0 * val = values[j, N - 1] * for i in range(N - 1, -1 , -1): # <<<<<<<<<<<<<< * if mask[j, i]: * if fill_count >= lim: */ for (__pyx_t_13 = (__pyx_v_N - 1); __pyx_t_13 > -1; __pyx_t_13-=1) { __pyx_v_i = __pyx_t_13; /* "pandas/src/generated.pyx":1686 * val = values[j, N - 1] * for i in range(N - 1, -1 , -1): * if mask[j, i]: # <<<<<<<<<<<<<< * if fill_count >= lim: * continue */ __pyx_t_14 = __pyx_v_j; __pyx_t_15 = __pyx_v_i; __pyx_t_9 = ((*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_mask.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_mask.diminfo[0].strides, __pyx_t_15, __pyx_pybuffernd_mask.diminfo[1].strides)) != 0); if (__pyx_t_9) { /* "pandas/src/generated.pyx":1687 * for i in range(N - 1, -1 , -1): * if mask[j, i]: * if fill_count >= lim: # <<<<<<<<<<<<<< * continue * fill_count += 1 */ __pyx_t_9 = ((__pyx_v_fill_count >= __pyx_v_lim) != 0); if (__pyx_t_9) { /* "pandas/src/generated.pyx":1688 * if mask[j, i]: * if fill_count >= lim: * continue # <<<<<<<<<<<<<< * fill_count += 1 * values[j, i] = val */ goto __pyx_L10_continue; } /* "pandas/src/generated.pyx":1689 * if fill_count >= lim: * continue * fill_count += 1 # <<<<<<<<<<<<<< * values[j, i] = val * else: */ __pyx_v_fill_count = (__pyx_v_fill_count + 1); /* "pandas/src/generated.pyx":1690 * continue * fill_count += 1 * values[j, i] = val # <<<<<<<<<<<<<< * else: * fill_count = 0 */ __pyx_t_16 = __pyx_v_j; __pyx_t_17 = __pyx_v_i; __pyx_t_18 = __Pyx_BufPtrStrided2d(PyObject **, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_17, __pyx_pybuffernd_values.diminfo[1].strides); __Pyx_GOTREF(*__pyx_t_18); __Pyx_INCREF(__pyx_v_val); __Pyx_DECREF(*__pyx_t_18); *__pyx_t_18 = __pyx_v_val; __Pyx_GIVEREF(*__pyx_t_18); goto __pyx_L12; } /*else*/ { /* "pandas/src/generated.pyx":1692 * values[j, i] = val * else: * fill_count = 0 # <<<<<<<<<<<<<< * val = values[j, i] * @cython.boundscheck(False) */ __pyx_v_fill_count = 0; /* "pandas/src/generated.pyx":1693 * else: * fill_count = 0 * val = values[j, i] # <<<<<<<<<<<<<< * @cython.boundscheck(False) * @cython.wraparound(False) */ __pyx_t_19 = __pyx_v_j; __pyx_t_20 = __pyx_v_i; __pyx_t_1 = (PyObject *) *__Pyx_BufPtrStrided2d(PyObject **, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_20, __pyx_pybuffernd_values.diminfo[1].strides); __Pyx_INCREF((PyObject*)__pyx_t_1); __Pyx_DECREF_SET(__pyx_v_val, __pyx_t_1); __pyx_t_1 = 0; } __pyx_L12:; __pyx_L10_continue:; } } /* "pandas/src/generated.pyx":1662 * @cython.boundscheck(False) * @cython.wraparound(False) * def backfill_2d_inplace_object(ndarray[object, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[uint8_t, ndim=2] mask, * limit=None): */ /* 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_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_mask.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.backfill_2d_inplace_object", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_mask.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF(__pyx_v_val); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":1696 * @cython.boundscheck(False) * @cython.wraparound(False) * def backfill_2d_inplace_int32(ndarray[int32_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[uint8_t, ndim=2] mask, * limit=None): */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_181backfill_2d_inplace_int32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_181backfill_2d_inplace_int32 = {__Pyx_NAMESTR("backfill_2d_inplace_int32"), (PyCFunction)__pyx_pw_6pandas_5algos_181backfill_2d_inplace_int32, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_181backfill_2d_inplace_int32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_values = 0; PyArrayObject *__pyx_v_mask = 0; PyObject *__pyx_v_limit = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("backfill_2d_inplace_int32 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_values,&__pyx_n_s_mask,&__pyx_n_s_limit,0}; PyObject* values[3] = {0,0,0}; /* "pandas/src/generated.pyx":1698 * def backfill_2d_inplace_int32(ndarray[int32_t, ndim=2] values, * ndarray[uint8_t, ndim=2] mask, * limit=None): # <<<<<<<<<<<<<< * cdef Py_ssize_t i, j, N, K * cdef int32_t val */ values[2] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_values)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_mask)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("backfill_2d_inplace_int32", 0, 2, 3, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1696; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_limit); if (value) { values[2] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "backfill_2d_inplace_int32") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1696; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_values = ((PyArrayObject *)values[0]); __pyx_v_mask = ((PyArrayObject *)values[1]); __pyx_v_limit = values[2]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("backfill_2d_inplace_int32", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1696; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.backfill_2d_inplace_int32", __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_filename = __pyx_f[2]; __pyx_lineno = 1696; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_mask), __pyx_ptype_5numpy_ndarray, 1, "mask", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1697; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_180backfill_2d_inplace_int32(__pyx_self, __pyx_v_values, __pyx_v_mask, __pyx_v_limit); /* "pandas/src/generated.pyx":1696 * @cython.boundscheck(False) * @cython.wraparound(False) * def backfill_2d_inplace_int32(ndarray[int32_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[uint8_t, ndim=2] mask, * limit=None): */ /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5algos_180backfill_2d_inplace_int32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_mask, PyObject *__pyx_v_limit) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_N; Py_ssize_t __pyx_v_K; __pyx_t_5numpy_int32_t __pyx_v_val; int __pyx_v_lim; int __pyx_v_fill_count; __Pyx_LocalBuf_ND __pyx_pybuffernd_mask; __Pyx_Buffer __pyx_pybuffer_mask; __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; PyObject *(*__pyx_t_5)(PyObject *); Py_ssize_t __pyx_t_6; Py_ssize_t __pyx_t_7; int __pyx_t_8; int __pyx_t_9; int __pyx_t_10; Py_ssize_t __pyx_t_11; Py_ssize_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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("backfill_2d_inplace_int32", 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_mask.pybuffer.buf = NULL; __pyx_pybuffer_mask.refcount = 0; __pyx_pybuffernd_mask.data = NULL; __pyx_pybuffernd_mask.rcbuffer = &__pyx_pybuffer_mask; { __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_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1696; __pyx_clineno = __LINE__; goto __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_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; 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, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1696; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; __pyx_pybuffernd_mask.diminfo[1].strides = __pyx_pybuffernd_mask.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_mask.diminfo[1].shape = __pyx_pybuffernd_mask.rcbuffer->pybuffer.shape[1]; /* "pandas/src/generated.pyx":1701 * cdef Py_ssize_t i, j, N, K * cdef int32_t val * cdef int lim, fill_count = 0 # <<<<<<<<<<<<<< * * K, N = ( values).shape */ __pyx_v_fill_count = 0; /* "pandas/src/generated.pyx":1703 * cdef int lim, fill_count = 0 * * K, N = ( values).shape # <<<<<<<<<<<<<< * * # GH 2778 */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_values), __pyx_n_s_shape); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1703; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) { PyObject* sequence = __pyx_t_1; #if CYTHON_COMPILING_IN_CPYTHON Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1703; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1); } else { __pyx_t_2 = PyList_GET_ITEM(sequence, 0); __pyx_t_3 = PyList_GET_ITEM(sequence, 1); } __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); #else __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1703; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1703; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } else { Py_ssize_t index = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1703; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_5 = Py_TYPE(__pyx_t_4)->tp_iternext; index = 0; __pyx_t_2 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_2)) goto __pyx_L3_unpacking_failed; __Pyx_GOTREF(__pyx_t_2); index = 1; __pyx_t_3 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_3)) goto __pyx_L3_unpacking_failed; __Pyx_GOTREF(__pyx_t_3); if (__Pyx_IternextUnpackEndCheck(__pyx_t_5(__pyx_t_4), 2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1703; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 1703; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_L4_unpacking_done:; } __pyx_t_6 = __Pyx_PyIndex_AsSsize_t(__pyx_t_2); if (unlikely((__pyx_t_6 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1703; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_7 = __Pyx_PyIndex_AsSsize_t(__pyx_t_3); if (unlikely((__pyx_t_7 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1703; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_K = __pyx_t_6; __pyx_v_N = __pyx_t_7; /* "pandas/src/generated.pyx":1706 * * # GH 2778 * if N == 0: # <<<<<<<<<<<<<< * return * */ __pyx_t_8 = ((__pyx_v_N == 0) != 0); if (__pyx_t_8) { /* "pandas/src/generated.pyx":1707 * # GH 2778 * if N == 0: * return # <<<<<<<<<<<<<< * * if limit is None: */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; } /* "pandas/src/generated.pyx":1709 * return * * if limit is None: # <<<<<<<<<<<<<< * lim = N * else: */ __pyx_t_8 = (__pyx_v_limit == Py_None); __pyx_t_9 = (__pyx_t_8 != 0); if (__pyx_t_9) { /* "pandas/src/generated.pyx":1710 * * if limit is None: * lim = N # <<<<<<<<<<<<<< * else: * if limit < 0: */ __pyx_v_lim = __pyx_v_N; goto __pyx_L6; } /*else*/ { /* "pandas/src/generated.pyx":1712 * lim = N * else: * if limit < 0: # <<<<<<<<<<<<<< * raise ValueError('Limit must be non-negative') * lim = limit */ __pyx_t_1 = PyObject_RichCompare(__pyx_v_limit, __pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1712; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1712; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_9) { /* "pandas/src/generated.pyx":1713 * else: * if limit < 0: * raise ValueError('Limit must be non-negative') # <<<<<<<<<<<<<< * lim = limit * */ __pyx_t_1 = PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__80, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1713; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 1713; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } /* "pandas/src/generated.pyx":1714 * if limit < 0: * raise ValueError('Limit must be non-negative') * lim = limit # <<<<<<<<<<<<<< * * for j in range(K): */ __pyx_t_10 = __Pyx_PyInt_As_int(__pyx_v_limit); if (unlikely((__pyx_t_10 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1714; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_lim = __pyx_t_10; } __pyx_L6:; /* "pandas/src/generated.pyx":1716 * lim = limit * * for j in range(K): # <<<<<<<<<<<<<< * fill_count = 0 * val = values[j, N - 1] */ __pyx_t_7 = __pyx_v_K; for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_7; __pyx_t_6+=1) { __pyx_v_j = __pyx_t_6; /* "pandas/src/generated.pyx":1717 * * for j in range(K): * fill_count = 0 # <<<<<<<<<<<<<< * val = values[j, N - 1] * for i in range(N - 1, -1 , -1): */ __pyx_v_fill_count = 0; /* "pandas/src/generated.pyx":1718 * for j in range(K): * fill_count = 0 * val = values[j, N - 1] # <<<<<<<<<<<<<< * for i in range(N - 1, -1 , -1): * if mask[j, i]: */ __pyx_t_11 = __pyx_v_j; __pyx_t_12 = (__pyx_v_N - 1); __pyx_v_val = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_11, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_12, __pyx_pybuffernd_values.diminfo[1].strides)); /* "pandas/src/generated.pyx":1719 * fill_count = 0 * val = values[j, N - 1] * for i in range(N - 1, -1 , -1): # <<<<<<<<<<<<<< * if mask[j, i]: * if fill_count >= lim: */ for (__pyx_t_13 = (__pyx_v_N - 1); __pyx_t_13 > -1; __pyx_t_13-=1) { __pyx_v_i = __pyx_t_13; /* "pandas/src/generated.pyx":1720 * val = values[j, N - 1] * for i in range(N - 1, -1 , -1): * if mask[j, i]: # <<<<<<<<<<<<<< * if fill_count >= lim: * continue */ __pyx_t_14 = __pyx_v_j; __pyx_t_15 = __pyx_v_i; __pyx_t_9 = ((*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_mask.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_mask.diminfo[0].strides, __pyx_t_15, __pyx_pybuffernd_mask.diminfo[1].strides)) != 0); if (__pyx_t_9) { /* "pandas/src/generated.pyx":1721 * for i in range(N - 1, -1 , -1): * if mask[j, i]: * if fill_count >= lim: # <<<<<<<<<<<<<< * continue * fill_count += 1 */ __pyx_t_9 = ((__pyx_v_fill_count >= __pyx_v_lim) != 0); if (__pyx_t_9) { /* "pandas/src/generated.pyx":1722 * if mask[j, i]: * if fill_count >= lim: * continue # <<<<<<<<<<<<<< * fill_count += 1 * values[j, i] = val */ goto __pyx_L10_continue; } /* "pandas/src/generated.pyx":1723 * if fill_count >= lim: * continue * fill_count += 1 # <<<<<<<<<<<<<< * values[j, i] = val * else: */ __pyx_v_fill_count = (__pyx_v_fill_count + 1); /* "pandas/src/generated.pyx":1724 * continue * fill_count += 1 * values[j, i] = val # <<<<<<<<<<<<<< * else: * fill_count = 0 */ __pyx_t_16 = __pyx_v_j; __pyx_t_17 = __pyx_v_i; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_17, __pyx_pybuffernd_values.diminfo[1].strides) = __pyx_v_val; goto __pyx_L12; } /*else*/ { /* "pandas/src/generated.pyx":1726 * values[j, i] = val * else: * fill_count = 0 # <<<<<<<<<<<<<< * val = values[j, i] * @cython.boundscheck(False) */ __pyx_v_fill_count = 0; /* "pandas/src/generated.pyx":1727 * else: * fill_count = 0 * val = values[j, i] # <<<<<<<<<<<<<< * @cython.boundscheck(False) * @cython.wraparound(False) */ __pyx_t_18 = __pyx_v_j; __pyx_t_19 = __pyx_v_i; __pyx_v_val = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_19, __pyx_pybuffernd_values.diminfo[1].strides)); } __pyx_L12:; __pyx_L10_continue:; } } /* "pandas/src/generated.pyx":1696 * @cython.boundscheck(False) * @cython.wraparound(False) * def backfill_2d_inplace_int32(ndarray[int32_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[uint8_t, ndim=2] mask, * limit=None): */ /* 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_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_mask.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.backfill_2d_inplace_int32", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_mask.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":1730 * @cython.boundscheck(False) * @cython.wraparound(False) * def backfill_2d_inplace_int64(ndarray[int64_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[uint8_t, ndim=2] mask, * limit=None): */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_183backfill_2d_inplace_int64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_183backfill_2d_inplace_int64 = {__Pyx_NAMESTR("backfill_2d_inplace_int64"), (PyCFunction)__pyx_pw_6pandas_5algos_183backfill_2d_inplace_int64, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_183backfill_2d_inplace_int64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_values = 0; PyArrayObject *__pyx_v_mask = 0; PyObject *__pyx_v_limit = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("backfill_2d_inplace_int64 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_values,&__pyx_n_s_mask,&__pyx_n_s_limit,0}; PyObject* values[3] = {0,0,0}; /* "pandas/src/generated.pyx":1732 * def backfill_2d_inplace_int64(ndarray[int64_t, ndim=2] values, * ndarray[uint8_t, ndim=2] mask, * limit=None): # <<<<<<<<<<<<<< * cdef Py_ssize_t i, j, N, K * cdef int64_t val */ values[2] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_values)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_mask)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("backfill_2d_inplace_int64", 0, 2, 3, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1730; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_limit); if (value) { values[2] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "backfill_2d_inplace_int64") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1730; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_values = ((PyArrayObject *)values[0]); __pyx_v_mask = ((PyArrayObject *)values[1]); __pyx_v_limit = values[2]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("backfill_2d_inplace_int64", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1730; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.backfill_2d_inplace_int64", __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_filename = __pyx_f[2]; __pyx_lineno = 1730; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_mask), __pyx_ptype_5numpy_ndarray, 1, "mask", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1731; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_182backfill_2d_inplace_int64(__pyx_self, __pyx_v_values, __pyx_v_mask, __pyx_v_limit); /* "pandas/src/generated.pyx":1730 * @cython.boundscheck(False) * @cython.wraparound(False) * def backfill_2d_inplace_int64(ndarray[int64_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[uint8_t, ndim=2] mask, * limit=None): */ /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5algos_182backfill_2d_inplace_int64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_mask, PyObject *__pyx_v_limit) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_N; Py_ssize_t __pyx_v_K; __pyx_t_5numpy_int64_t __pyx_v_val; int __pyx_v_lim; int __pyx_v_fill_count; __Pyx_LocalBuf_ND __pyx_pybuffernd_mask; __Pyx_Buffer __pyx_pybuffer_mask; __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; PyObject *(*__pyx_t_5)(PyObject *); Py_ssize_t __pyx_t_6; Py_ssize_t __pyx_t_7; int __pyx_t_8; int __pyx_t_9; int __pyx_t_10; Py_ssize_t __pyx_t_11; Py_ssize_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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("backfill_2d_inplace_int64", 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_mask.pybuffer.buf = NULL; __pyx_pybuffer_mask.refcount = 0; __pyx_pybuffernd_mask.data = NULL; __pyx_pybuffernd_mask.rcbuffer = &__pyx_pybuffer_mask; { __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_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1730; __pyx_clineno = __LINE__; goto __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_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; 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, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1730; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; __pyx_pybuffernd_mask.diminfo[1].strides = __pyx_pybuffernd_mask.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_mask.diminfo[1].shape = __pyx_pybuffernd_mask.rcbuffer->pybuffer.shape[1]; /* "pandas/src/generated.pyx":1735 * cdef Py_ssize_t i, j, N, K * cdef int64_t val * cdef int lim, fill_count = 0 # <<<<<<<<<<<<<< * * K, N = ( values).shape */ __pyx_v_fill_count = 0; /* "pandas/src/generated.pyx":1737 * cdef int lim, fill_count = 0 * * K, N = ( values).shape # <<<<<<<<<<<<<< * * # GH 2778 */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_values), __pyx_n_s_shape); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1737; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) { PyObject* sequence = __pyx_t_1; #if CYTHON_COMPILING_IN_CPYTHON Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1737; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1); } else { __pyx_t_2 = PyList_GET_ITEM(sequence, 0); __pyx_t_3 = PyList_GET_ITEM(sequence, 1); } __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); #else __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1737; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1737; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } else { Py_ssize_t index = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1737; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_5 = Py_TYPE(__pyx_t_4)->tp_iternext; index = 0; __pyx_t_2 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_2)) goto __pyx_L3_unpacking_failed; __Pyx_GOTREF(__pyx_t_2); index = 1; __pyx_t_3 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_3)) goto __pyx_L3_unpacking_failed; __Pyx_GOTREF(__pyx_t_3); if (__Pyx_IternextUnpackEndCheck(__pyx_t_5(__pyx_t_4), 2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1737; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 1737; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_L4_unpacking_done:; } __pyx_t_6 = __Pyx_PyIndex_AsSsize_t(__pyx_t_2); if (unlikely((__pyx_t_6 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1737; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_7 = __Pyx_PyIndex_AsSsize_t(__pyx_t_3); if (unlikely((__pyx_t_7 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1737; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_K = __pyx_t_6; __pyx_v_N = __pyx_t_7; /* "pandas/src/generated.pyx":1740 * * # GH 2778 * if N == 0: # <<<<<<<<<<<<<< * return * */ __pyx_t_8 = ((__pyx_v_N == 0) != 0); if (__pyx_t_8) { /* "pandas/src/generated.pyx":1741 * # GH 2778 * if N == 0: * return # <<<<<<<<<<<<<< * * if limit is None: */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; } /* "pandas/src/generated.pyx":1743 * return * * if limit is None: # <<<<<<<<<<<<<< * lim = N * else: */ __pyx_t_8 = (__pyx_v_limit == Py_None); __pyx_t_9 = (__pyx_t_8 != 0); if (__pyx_t_9) { /* "pandas/src/generated.pyx":1744 * * if limit is None: * lim = N # <<<<<<<<<<<<<< * else: * if limit < 0: */ __pyx_v_lim = __pyx_v_N; goto __pyx_L6; } /*else*/ { /* "pandas/src/generated.pyx":1746 * lim = N * else: * if limit < 0: # <<<<<<<<<<<<<< * raise ValueError('Limit must be non-negative') * lim = limit */ __pyx_t_1 = PyObject_RichCompare(__pyx_v_limit, __pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1746; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1746; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_9) { /* "pandas/src/generated.pyx":1747 * else: * if limit < 0: * raise ValueError('Limit must be non-negative') # <<<<<<<<<<<<<< * lim = limit * */ __pyx_t_1 = PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__81, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1747; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 1747; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } /* "pandas/src/generated.pyx":1748 * if limit < 0: * raise ValueError('Limit must be non-negative') * lim = limit # <<<<<<<<<<<<<< * * for j in range(K): */ __pyx_t_10 = __Pyx_PyInt_As_int(__pyx_v_limit); if (unlikely((__pyx_t_10 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1748; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_lim = __pyx_t_10; } __pyx_L6:; /* "pandas/src/generated.pyx":1750 * lim = limit * * for j in range(K): # <<<<<<<<<<<<<< * fill_count = 0 * val = values[j, N - 1] */ __pyx_t_7 = __pyx_v_K; for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_7; __pyx_t_6+=1) { __pyx_v_j = __pyx_t_6; /* "pandas/src/generated.pyx":1751 * * for j in range(K): * fill_count = 0 # <<<<<<<<<<<<<< * val = values[j, N - 1] * for i in range(N - 1, -1 , -1): */ __pyx_v_fill_count = 0; /* "pandas/src/generated.pyx":1752 * for j in range(K): * fill_count = 0 * val = values[j, N - 1] # <<<<<<<<<<<<<< * for i in range(N - 1, -1 , -1): * if mask[j, i]: */ __pyx_t_11 = __pyx_v_j; __pyx_t_12 = (__pyx_v_N - 1); __pyx_v_val = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_11, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_12, __pyx_pybuffernd_values.diminfo[1].strides)); /* "pandas/src/generated.pyx":1753 * fill_count = 0 * val = values[j, N - 1] * for i in range(N - 1, -1 , -1): # <<<<<<<<<<<<<< * if mask[j, i]: * if fill_count >= lim: */ for (__pyx_t_13 = (__pyx_v_N - 1); __pyx_t_13 > -1; __pyx_t_13-=1) { __pyx_v_i = __pyx_t_13; /* "pandas/src/generated.pyx":1754 * val = values[j, N - 1] * for i in range(N - 1, -1 , -1): * if mask[j, i]: # <<<<<<<<<<<<<< * if fill_count >= lim: * continue */ __pyx_t_14 = __pyx_v_j; __pyx_t_15 = __pyx_v_i; __pyx_t_9 = ((*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_mask.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_mask.diminfo[0].strides, __pyx_t_15, __pyx_pybuffernd_mask.diminfo[1].strides)) != 0); if (__pyx_t_9) { /* "pandas/src/generated.pyx":1755 * for i in range(N - 1, -1 , -1): * if mask[j, i]: * if fill_count >= lim: # <<<<<<<<<<<<<< * continue * fill_count += 1 */ __pyx_t_9 = ((__pyx_v_fill_count >= __pyx_v_lim) != 0); if (__pyx_t_9) { /* "pandas/src/generated.pyx":1756 * if mask[j, i]: * if fill_count >= lim: * continue # <<<<<<<<<<<<<< * fill_count += 1 * values[j, i] = val */ goto __pyx_L10_continue; } /* "pandas/src/generated.pyx":1757 * if fill_count >= lim: * continue * fill_count += 1 # <<<<<<<<<<<<<< * values[j, i] = val * else: */ __pyx_v_fill_count = (__pyx_v_fill_count + 1); /* "pandas/src/generated.pyx":1758 * continue * fill_count += 1 * values[j, i] = val # <<<<<<<<<<<<<< * else: * fill_count = 0 */ __pyx_t_16 = __pyx_v_j; __pyx_t_17 = __pyx_v_i; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_17, __pyx_pybuffernd_values.diminfo[1].strides) = __pyx_v_val; goto __pyx_L12; } /*else*/ { /* "pandas/src/generated.pyx":1760 * values[j, i] = val * else: * fill_count = 0 # <<<<<<<<<<<<<< * val = values[j, i] * @cython.boundscheck(False) */ __pyx_v_fill_count = 0; /* "pandas/src/generated.pyx":1761 * else: * fill_count = 0 * val = values[j, i] # <<<<<<<<<<<<<< * @cython.boundscheck(False) * @cython.wraparound(False) */ __pyx_t_18 = __pyx_v_j; __pyx_t_19 = __pyx_v_i; __pyx_v_val = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_19, __pyx_pybuffernd_values.diminfo[1].strides)); } __pyx_L12:; __pyx_L10_continue:; } } /* "pandas/src/generated.pyx":1730 * @cython.boundscheck(False) * @cython.wraparound(False) * def backfill_2d_inplace_int64(ndarray[int64_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[uint8_t, ndim=2] mask, * limit=None): */ /* 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_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_mask.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.backfill_2d_inplace_int64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_mask.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":1764 * @cython.boundscheck(False) * @cython.wraparound(False) * def backfill_2d_inplace_bool(ndarray[uint8_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[uint8_t, ndim=2] mask, * limit=None): */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_185backfill_2d_inplace_bool(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_185backfill_2d_inplace_bool = {__Pyx_NAMESTR("backfill_2d_inplace_bool"), (PyCFunction)__pyx_pw_6pandas_5algos_185backfill_2d_inplace_bool, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_185backfill_2d_inplace_bool(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_values = 0; PyArrayObject *__pyx_v_mask = 0; PyObject *__pyx_v_limit = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("backfill_2d_inplace_bool (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_values,&__pyx_n_s_mask,&__pyx_n_s_limit,0}; PyObject* values[3] = {0,0,0}; /* "pandas/src/generated.pyx":1766 * def backfill_2d_inplace_bool(ndarray[uint8_t, ndim=2] values, * ndarray[uint8_t, ndim=2] mask, * limit=None): # <<<<<<<<<<<<<< * cdef Py_ssize_t i, j, N, K * cdef uint8_t val */ values[2] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_values)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_mask)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("backfill_2d_inplace_bool", 0, 2, 3, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1764; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_limit); if (value) { values[2] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "backfill_2d_inplace_bool") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1764; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_values = ((PyArrayObject *)values[0]); __pyx_v_mask = ((PyArrayObject *)values[1]); __pyx_v_limit = values[2]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("backfill_2d_inplace_bool", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1764; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.backfill_2d_inplace_bool", __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_filename = __pyx_f[2]; __pyx_lineno = 1764; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_mask), __pyx_ptype_5numpy_ndarray, 1, "mask", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1765; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_184backfill_2d_inplace_bool(__pyx_self, __pyx_v_values, __pyx_v_mask, __pyx_v_limit); /* "pandas/src/generated.pyx":1764 * @cython.boundscheck(False) * @cython.wraparound(False) * def backfill_2d_inplace_bool(ndarray[uint8_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[uint8_t, ndim=2] mask, * limit=None): */ /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5algos_184backfill_2d_inplace_bool(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_mask, PyObject *__pyx_v_limit) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_N; Py_ssize_t __pyx_v_K; __pyx_t_5numpy_uint8_t __pyx_v_val; int __pyx_v_lim; int __pyx_v_fill_count; __Pyx_LocalBuf_ND __pyx_pybuffernd_mask; __Pyx_Buffer __pyx_pybuffer_mask; __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; PyObject *(*__pyx_t_5)(PyObject *); Py_ssize_t __pyx_t_6; Py_ssize_t __pyx_t_7; int __pyx_t_8; int __pyx_t_9; int __pyx_t_10; Py_ssize_t __pyx_t_11; Py_ssize_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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("backfill_2d_inplace_bool", 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_mask.pybuffer.buf = NULL; __pyx_pybuffer_mask.refcount = 0; __pyx_pybuffernd_mask.data = NULL; __pyx_pybuffernd_mask.rcbuffer = &__pyx_pybuffer_mask; { __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_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1764; __pyx_clineno = __LINE__; goto __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_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; 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, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1764; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; __pyx_pybuffernd_mask.diminfo[1].strides = __pyx_pybuffernd_mask.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_mask.diminfo[1].shape = __pyx_pybuffernd_mask.rcbuffer->pybuffer.shape[1]; /* "pandas/src/generated.pyx":1769 * cdef Py_ssize_t i, j, N, K * cdef uint8_t val * cdef int lim, fill_count = 0 # <<<<<<<<<<<<<< * * K, N = ( values).shape */ __pyx_v_fill_count = 0; /* "pandas/src/generated.pyx":1771 * cdef int lim, fill_count = 0 * * K, N = ( values).shape # <<<<<<<<<<<<<< * * # GH 2778 */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_values), __pyx_n_s_shape); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1771; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) { PyObject* sequence = __pyx_t_1; #if CYTHON_COMPILING_IN_CPYTHON Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1771; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1); } else { __pyx_t_2 = PyList_GET_ITEM(sequence, 0); __pyx_t_3 = PyList_GET_ITEM(sequence, 1); } __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); #else __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1771; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1771; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } else { Py_ssize_t index = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1771; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_5 = Py_TYPE(__pyx_t_4)->tp_iternext; index = 0; __pyx_t_2 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_2)) goto __pyx_L3_unpacking_failed; __Pyx_GOTREF(__pyx_t_2); index = 1; __pyx_t_3 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_3)) goto __pyx_L3_unpacking_failed; __Pyx_GOTREF(__pyx_t_3); if (__Pyx_IternextUnpackEndCheck(__pyx_t_5(__pyx_t_4), 2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1771; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 1771; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_L4_unpacking_done:; } __pyx_t_6 = __Pyx_PyIndex_AsSsize_t(__pyx_t_2); if (unlikely((__pyx_t_6 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1771; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_7 = __Pyx_PyIndex_AsSsize_t(__pyx_t_3); if (unlikely((__pyx_t_7 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1771; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_K = __pyx_t_6; __pyx_v_N = __pyx_t_7; /* "pandas/src/generated.pyx":1774 * * # GH 2778 * if N == 0: # <<<<<<<<<<<<<< * return * */ __pyx_t_8 = ((__pyx_v_N == 0) != 0); if (__pyx_t_8) { /* "pandas/src/generated.pyx":1775 * # GH 2778 * if N == 0: * return # <<<<<<<<<<<<<< * * if limit is None: */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; } /* "pandas/src/generated.pyx":1777 * return * * if limit is None: # <<<<<<<<<<<<<< * lim = N * else: */ __pyx_t_8 = (__pyx_v_limit == Py_None); __pyx_t_9 = (__pyx_t_8 != 0); if (__pyx_t_9) { /* "pandas/src/generated.pyx":1778 * * if limit is None: * lim = N # <<<<<<<<<<<<<< * else: * if limit < 0: */ __pyx_v_lim = __pyx_v_N; goto __pyx_L6; } /*else*/ { /* "pandas/src/generated.pyx":1780 * lim = N * else: * if limit < 0: # <<<<<<<<<<<<<< * raise ValueError('Limit must be non-negative') * lim = limit */ __pyx_t_1 = PyObject_RichCompare(__pyx_v_limit, __pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1780; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1780; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_9) { /* "pandas/src/generated.pyx":1781 * else: * if limit < 0: * raise ValueError('Limit must be non-negative') # <<<<<<<<<<<<<< * lim = limit * */ __pyx_t_1 = PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__82, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1781; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 1781; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } /* "pandas/src/generated.pyx":1782 * if limit < 0: * raise ValueError('Limit must be non-negative') * lim = limit # <<<<<<<<<<<<<< * * for j in range(K): */ __pyx_t_10 = __Pyx_PyInt_As_int(__pyx_v_limit); if (unlikely((__pyx_t_10 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1782; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_lim = __pyx_t_10; } __pyx_L6:; /* "pandas/src/generated.pyx":1784 * lim = limit * * for j in range(K): # <<<<<<<<<<<<<< * fill_count = 0 * val = values[j, N - 1] */ __pyx_t_7 = __pyx_v_K; for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_7; __pyx_t_6+=1) { __pyx_v_j = __pyx_t_6; /* "pandas/src/generated.pyx":1785 * * for j in range(K): * fill_count = 0 # <<<<<<<<<<<<<< * val = values[j, N - 1] * for i in range(N - 1, -1 , -1): */ __pyx_v_fill_count = 0; /* "pandas/src/generated.pyx":1786 * for j in range(K): * fill_count = 0 * val = values[j, N - 1] # <<<<<<<<<<<<<< * for i in range(N - 1, -1 , -1): * if mask[j, i]: */ __pyx_t_11 = __pyx_v_j; __pyx_t_12 = (__pyx_v_N - 1); __pyx_v_val = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_11, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_12, __pyx_pybuffernd_values.diminfo[1].strides)); /* "pandas/src/generated.pyx":1787 * fill_count = 0 * val = values[j, N - 1] * for i in range(N - 1, -1 , -1): # <<<<<<<<<<<<<< * if mask[j, i]: * if fill_count >= lim: */ for (__pyx_t_13 = (__pyx_v_N - 1); __pyx_t_13 > -1; __pyx_t_13-=1) { __pyx_v_i = __pyx_t_13; /* "pandas/src/generated.pyx":1788 * val = values[j, N - 1] * for i in range(N - 1, -1 , -1): * if mask[j, i]: # <<<<<<<<<<<<<< * if fill_count >= lim: * continue */ __pyx_t_14 = __pyx_v_j; __pyx_t_15 = __pyx_v_i; __pyx_t_9 = ((*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_mask.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_mask.diminfo[0].strides, __pyx_t_15, __pyx_pybuffernd_mask.diminfo[1].strides)) != 0); if (__pyx_t_9) { /* "pandas/src/generated.pyx":1789 * for i in range(N - 1, -1 , -1): * if mask[j, i]: * if fill_count >= lim: # <<<<<<<<<<<<<< * continue * fill_count += 1 */ __pyx_t_9 = ((__pyx_v_fill_count >= __pyx_v_lim) != 0); if (__pyx_t_9) { /* "pandas/src/generated.pyx":1790 * if mask[j, i]: * if fill_count >= lim: * continue # <<<<<<<<<<<<<< * fill_count += 1 * values[j, i] = val */ goto __pyx_L10_continue; } /* "pandas/src/generated.pyx":1791 * if fill_count >= lim: * continue * fill_count += 1 # <<<<<<<<<<<<<< * values[j, i] = val * else: */ __pyx_v_fill_count = (__pyx_v_fill_count + 1); /* "pandas/src/generated.pyx":1792 * continue * fill_count += 1 * values[j, i] = val # <<<<<<<<<<<<<< * else: * fill_count = 0 */ __pyx_t_16 = __pyx_v_j; __pyx_t_17 = __pyx_v_i; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_17, __pyx_pybuffernd_values.diminfo[1].strides) = __pyx_v_val; goto __pyx_L12; } /*else*/ { /* "pandas/src/generated.pyx":1794 * values[j, i] = val * else: * fill_count = 0 # <<<<<<<<<<<<<< * val = values[j, i] * */ __pyx_v_fill_count = 0; /* "pandas/src/generated.pyx":1795 * else: * fill_count = 0 * val = values[j, i] # <<<<<<<<<<<<<< * * @cython.boundscheck(False) */ __pyx_t_18 = __pyx_v_j; __pyx_t_19 = __pyx_v_i; __pyx_v_val = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_19, __pyx_pybuffernd_values.diminfo[1].strides)); } __pyx_L12:; __pyx_L10_continue:; } } /* "pandas/src/generated.pyx":1764 * @cython.boundscheck(False) * @cython.wraparound(False) * def backfill_2d_inplace_bool(ndarray[uint8_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[uint8_t, ndim=2] mask, * limit=None): */ /* 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_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_mask.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.backfill_2d_inplace_bool", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_mask.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":1799 * @cython.boundscheck(False) * @cython.wraparound(False) * def is_monotonic_float64(ndarray[float64_t] arr): # <<<<<<<<<<<<<< * ''' * Returns */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_187is_monotonic_float64(PyObject *__pyx_self, PyObject *__pyx_v_arr); /*proto*/ static char __pyx_doc_6pandas_5algos_186is_monotonic_float64[] = "\n Returns\n -------\n is_monotonic, is_unique\n "; static PyMethodDef __pyx_mdef_6pandas_5algos_187is_monotonic_float64 = {__Pyx_NAMESTR("is_monotonic_float64"), (PyCFunction)__pyx_pw_6pandas_5algos_187is_monotonic_float64, METH_O, __Pyx_DOCSTR(__pyx_doc_6pandas_5algos_186is_monotonic_float64)}; static PyObject *__pyx_pw_6pandas_5algos_187is_monotonic_float64(PyObject *__pyx_self, PyObject *__pyx_v_arr) { CYTHON_UNUSED int __pyx_lineno = 0; CYTHON_UNUSED const char *__pyx_filename = NULL; CYTHON_UNUSED int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("is_monotonic_float64 (wrapper)", 0); if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_arr), __pyx_ptype_5numpy_ndarray, 1, "arr", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1799; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_186is_monotonic_float64(__pyx_self, ((PyArrayObject *)__pyx_v_arr)); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5algos_186is_monotonic_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_arr) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_n; __pyx_t_5numpy_float64_t __pyx_v_prev; __pyx_t_5numpy_float64_t __pyx_v_cur; int __pyx_v_is_unique; __Pyx_LocalBuf_ND __pyx_pybuffernd_arr; __Pyx_Buffer __pyx_pybuffer_arr; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; int __pyx_t_2; long __pyx_t_3; Py_ssize_t __pyx_t_4; Py_ssize_t __pyx_t_5; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("is_monotonic_float64", 0); __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_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1799; __pyx_clineno = __LINE__; goto __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/src/generated.pyx":1808 * Py_ssize_t i, n * float64_t prev, cur * bint is_unique = 1 # <<<<<<<<<<<<<< * * n = len(arr) */ __pyx_v_is_unique = 1; /* "pandas/src/generated.pyx":1810 * bint is_unique = 1 * * n = len(arr) # <<<<<<<<<<<<<< * * if n < 2: */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_arr)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1810; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/src/generated.pyx":1812 * n = len(arr) * * if n < 2: # <<<<<<<<<<<<<< * return True, True * */ __pyx_t_2 = ((__pyx_v_n < 2) != 0); if (__pyx_t_2) { /* "pandas/src/generated.pyx":1813 * * if n < 2: * return True, True # <<<<<<<<<<<<<< * * prev = arr[0] */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_tuple__83); __pyx_r = __pyx_tuple__83; goto __pyx_L0; } /* "pandas/src/generated.pyx":1815 * return True, True * * prev = arr[0] # <<<<<<<<<<<<<< * for i in range(1, n): * cur = arr[i] */ __pyx_t_3 = 0; __pyx_v_prev = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_arr.rcbuffer->pybuffer.buf, __pyx_t_3, __pyx_pybuffernd_arr.diminfo[0].strides)); /* "pandas/src/generated.pyx":1816 * * prev = arr[0] * for i in range(1, n): # <<<<<<<<<<<<<< * cur = arr[i] * if cur < prev: */ __pyx_t_1 = __pyx_v_n; for (__pyx_t_4 = 1; __pyx_t_4 < __pyx_t_1; __pyx_t_4+=1) { __pyx_v_i = __pyx_t_4; /* "pandas/src/generated.pyx":1817 * prev = arr[0] * for i in range(1, n): * cur = arr[i] # <<<<<<<<<<<<<< * if cur < prev: * return False, None */ __pyx_t_5 = __pyx_v_i; __pyx_v_cur = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_arr.rcbuffer->pybuffer.buf, __pyx_t_5, __pyx_pybuffernd_arr.diminfo[0].strides)); /* "pandas/src/generated.pyx":1818 * for i in range(1, n): * cur = arr[i] * if cur < prev: # <<<<<<<<<<<<<< * return False, None * elif cur == prev: */ __pyx_t_2 = ((__pyx_v_cur < __pyx_v_prev) != 0); if (__pyx_t_2) { /* "pandas/src/generated.pyx":1819 * cur = arr[i] * if cur < prev: * return False, None # <<<<<<<<<<<<<< * elif cur == prev: * is_unique = 0 */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_tuple__84); __pyx_r = __pyx_tuple__84; goto __pyx_L0; } /* "pandas/src/generated.pyx":1820 * if cur < prev: * return False, None * elif cur == prev: # <<<<<<<<<<<<<< * is_unique = 0 * prev = cur */ __pyx_t_2 = ((__pyx_v_cur == __pyx_v_prev) != 0); if (__pyx_t_2) { /* "pandas/src/generated.pyx":1821 * return False, None * elif cur == prev: * is_unique = 0 # <<<<<<<<<<<<<< * prev = cur * return True, is_unique */ __pyx_v_is_unique = 0; goto __pyx_L6; } __pyx_L6:; /* "pandas/src/generated.pyx":1822 * elif cur == prev: * is_unique = 0 * prev = cur # <<<<<<<<<<<<<< * return True, is_unique * @cython.boundscheck(False) */ __pyx_v_prev = __pyx_v_cur; } /* "pandas/src/generated.pyx":1823 * is_unique = 0 * prev = cur * return True, is_unique # <<<<<<<<<<<<<< * @cython.boundscheck(False) * @cython.wraparound(False) */ __Pyx_XDECREF(__pyx_r); __pyx_t_6 = __Pyx_PyBool_FromLong(__pyx_v_is_unique); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1823; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1823; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_INCREF(Py_True); PyTuple_SET_ITEM(__pyx_t_7, 0, Py_True); __Pyx_GIVEREF(Py_True); PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_r = __pyx_t_7; __pyx_t_7 = 0; goto __pyx_L0; /* "pandas/src/generated.pyx":1799 * @cython.boundscheck(False) * @cython.wraparound(False) * def is_monotonic_float64(ndarray[float64_t] arr): # <<<<<<<<<<<<<< * ''' * Returns */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_arr.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.is_monotonic_float64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_arr.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":1826 * @cython.boundscheck(False) * @cython.wraparound(False) * def is_monotonic_float32(ndarray[float32_t] arr): # <<<<<<<<<<<<<< * ''' * Returns */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_189is_monotonic_float32(PyObject *__pyx_self, PyObject *__pyx_v_arr); /*proto*/ static char __pyx_doc_6pandas_5algos_188is_monotonic_float32[] = "\n Returns\n -------\n is_monotonic, is_unique\n "; static PyMethodDef __pyx_mdef_6pandas_5algos_189is_monotonic_float32 = {__Pyx_NAMESTR("is_monotonic_float32"), (PyCFunction)__pyx_pw_6pandas_5algos_189is_monotonic_float32, METH_O, __Pyx_DOCSTR(__pyx_doc_6pandas_5algos_188is_monotonic_float32)}; static PyObject *__pyx_pw_6pandas_5algos_189is_monotonic_float32(PyObject *__pyx_self, PyObject *__pyx_v_arr) { CYTHON_UNUSED int __pyx_lineno = 0; CYTHON_UNUSED const char *__pyx_filename = NULL; CYTHON_UNUSED int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("is_monotonic_float32 (wrapper)", 0); if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_arr), __pyx_ptype_5numpy_ndarray, 1, "arr", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1826; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_188is_monotonic_float32(__pyx_self, ((PyArrayObject *)__pyx_v_arr)); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5algos_188is_monotonic_float32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_arr) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_n; __pyx_t_5numpy_float32_t __pyx_v_prev; __pyx_t_5numpy_float32_t __pyx_v_cur; int __pyx_v_is_unique; __Pyx_LocalBuf_ND __pyx_pybuffernd_arr; __Pyx_Buffer __pyx_pybuffer_arr; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; int __pyx_t_2; long __pyx_t_3; Py_ssize_t __pyx_t_4; Py_ssize_t __pyx_t_5; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("is_monotonic_float32", 0); __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_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1826; __pyx_clineno = __LINE__; goto __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/src/generated.pyx":1835 * Py_ssize_t i, n * float32_t prev, cur * bint is_unique = 1 # <<<<<<<<<<<<<< * * n = len(arr) */ __pyx_v_is_unique = 1; /* "pandas/src/generated.pyx":1837 * bint is_unique = 1 * * n = len(arr) # <<<<<<<<<<<<<< * * if n < 2: */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_arr)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1837; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/src/generated.pyx":1839 * n = len(arr) * * if n < 2: # <<<<<<<<<<<<<< * return True, True * */ __pyx_t_2 = ((__pyx_v_n < 2) != 0); if (__pyx_t_2) { /* "pandas/src/generated.pyx":1840 * * if n < 2: * return True, True # <<<<<<<<<<<<<< * * prev = arr[0] */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_tuple__85); __pyx_r = __pyx_tuple__85; goto __pyx_L0; } /* "pandas/src/generated.pyx":1842 * return True, True * * prev = arr[0] # <<<<<<<<<<<<<< * for i in range(1, n): * cur = arr[i] */ __pyx_t_3 = 0; __pyx_v_prev = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_arr.rcbuffer->pybuffer.buf, __pyx_t_3, __pyx_pybuffernd_arr.diminfo[0].strides)); /* "pandas/src/generated.pyx":1843 * * prev = arr[0] * for i in range(1, n): # <<<<<<<<<<<<<< * cur = arr[i] * if cur < prev: */ __pyx_t_1 = __pyx_v_n; for (__pyx_t_4 = 1; __pyx_t_4 < __pyx_t_1; __pyx_t_4+=1) { __pyx_v_i = __pyx_t_4; /* "pandas/src/generated.pyx":1844 * prev = arr[0] * for i in range(1, n): * cur = arr[i] # <<<<<<<<<<<<<< * if cur < prev: * return False, None */ __pyx_t_5 = __pyx_v_i; __pyx_v_cur = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_arr.rcbuffer->pybuffer.buf, __pyx_t_5, __pyx_pybuffernd_arr.diminfo[0].strides)); /* "pandas/src/generated.pyx":1845 * for i in range(1, n): * cur = arr[i] * if cur < prev: # <<<<<<<<<<<<<< * return False, None * elif cur == prev: */ __pyx_t_2 = ((__pyx_v_cur < __pyx_v_prev) != 0); if (__pyx_t_2) { /* "pandas/src/generated.pyx":1846 * cur = arr[i] * if cur < prev: * return False, None # <<<<<<<<<<<<<< * elif cur == prev: * is_unique = 0 */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_tuple__86); __pyx_r = __pyx_tuple__86; goto __pyx_L0; } /* "pandas/src/generated.pyx":1847 * if cur < prev: * return False, None * elif cur == prev: # <<<<<<<<<<<<<< * is_unique = 0 * prev = cur */ __pyx_t_2 = ((__pyx_v_cur == __pyx_v_prev) != 0); if (__pyx_t_2) { /* "pandas/src/generated.pyx":1848 * return False, None * elif cur == prev: * is_unique = 0 # <<<<<<<<<<<<<< * prev = cur * return True, is_unique */ __pyx_v_is_unique = 0; goto __pyx_L6; } __pyx_L6:; /* "pandas/src/generated.pyx":1849 * elif cur == prev: * is_unique = 0 * prev = cur # <<<<<<<<<<<<<< * return True, is_unique * @cython.boundscheck(False) */ __pyx_v_prev = __pyx_v_cur; } /* "pandas/src/generated.pyx":1850 * is_unique = 0 * prev = cur * return True, is_unique # <<<<<<<<<<<<<< * @cython.boundscheck(False) * @cython.wraparound(False) */ __Pyx_XDECREF(__pyx_r); __pyx_t_6 = __Pyx_PyBool_FromLong(__pyx_v_is_unique); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1850; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1850; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_INCREF(Py_True); PyTuple_SET_ITEM(__pyx_t_7, 0, Py_True); __Pyx_GIVEREF(Py_True); PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_r = __pyx_t_7; __pyx_t_7 = 0; goto __pyx_L0; /* "pandas/src/generated.pyx":1826 * @cython.boundscheck(False) * @cython.wraparound(False) * def is_monotonic_float32(ndarray[float32_t] arr): # <<<<<<<<<<<<<< * ''' * Returns */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_arr.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.is_monotonic_float32", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_arr.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":1853 * @cython.boundscheck(False) * @cython.wraparound(False) * def is_monotonic_object(ndarray[object] arr): # <<<<<<<<<<<<<< * ''' * Returns */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_191is_monotonic_object(PyObject *__pyx_self, PyObject *__pyx_v_arr); /*proto*/ static char __pyx_doc_6pandas_5algos_190is_monotonic_object[] = "\n Returns\n -------\n is_monotonic, is_unique\n "; static PyMethodDef __pyx_mdef_6pandas_5algos_191is_monotonic_object = {__Pyx_NAMESTR("is_monotonic_object"), (PyCFunction)__pyx_pw_6pandas_5algos_191is_monotonic_object, METH_O, __Pyx_DOCSTR(__pyx_doc_6pandas_5algos_190is_monotonic_object)}; static PyObject *__pyx_pw_6pandas_5algos_191is_monotonic_object(PyObject *__pyx_self, PyObject *__pyx_v_arr) { CYTHON_UNUSED int __pyx_lineno = 0; CYTHON_UNUSED const char *__pyx_filename = NULL; CYTHON_UNUSED int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("is_monotonic_object (wrapper)", 0); if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_arr), __pyx_ptype_5numpy_ndarray, 1, "arr", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1853; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_190is_monotonic_object(__pyx_self, ((PyArrayObject *)__pyx_v_arr)); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5algos_190is_monotonic_object(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_arr) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_n; PyObject *__pyx_v_prev = 0; PyObject *__pyx_v_cur = 0; int __pyx_v_is_unique; __Pyx_LocalBuf_ND __pyx_pybuffernd_arr; __Pyx_Buffer __pyx_pybuffer_arr; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; long __pyx_t_4; Py_ssize_t __pyx_t_5; Py_ssize_t __pyx_t_6; PyObject *__pyx_t_7 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("is_monotonic_object", 0); __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_filename = __pyx_f[2]; __pyx_lineno = 1853; __pyx_clineno = __LINE__; goto __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/src/generated.pyx":1862 * Py_ssize_t i, n * object prev, cur * bint is_unique = 1 # <<<<<<<<<<<<<< * * n = len(arr) */ __pyx_v_is_unique = 1; /* "pandas/src/generated.pyx":1864 * bint is_unique = 1 * * n = len(arr) # <<<<<<<<<<<<<< * * if n < 2: */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_arr)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1864; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/src/generated.pyx":1866 * n = len(arr) * * if n < 2: # <<<<<<<<<<<<<< * return True, True * */ __pyx_t_2 = ((__pyx_v_n < 2) != 0); if (__pyx_t_2) { /* "pandas/src/generated.pyx":1867 * * if n < 2: * return True, True # <<<<<<<<<<<<<< * * prev = arr[0] */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_tuple__87); __pyx_r = __pyx_tuple__87; goto __pyx_L0; } /* "pandas/src/generated.pyx":1869 * return True, True * * prev = arr[0] # <<<<<<<<<<<<<< * for i in range(1, n): * cur = arr[i] */ __pyx_t_4 = 0; __pyx_t_3 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_arr.rcbuffer->pybuffer.buf, __pyx_t_4, __pyx_pybuffernd_arr.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_3); __pyx_v_prev = __pyx_t_3; __pyx_t_3 = 0; /* "pandas/src/generated.pyx":1870 * * prev = arr[0] * for i in range(1, n): # <<<<<<<<<<<<<< * cur = arr[i] * if cur < prev: */ __pyx_t_1 = __pyx_v_n; for (__pyx_t_5 = 1; __pyx_t_5 < __pyx_t_1; __pyx_t_5+=1) { __pyx_v_i = __pyx_t_5; /* "pandas/src/generated.pyx":1871 * prev = arr[0] * for i in range(1, n): * cur = arr[i] # <<<<<<<<<<<<<< * if cur < prev: * return False, None */ __pyx_t_6 = __pyx_v_i; __pyx_t_3 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_arr.rcbuffer->pybuffer.buf, __pyx_t_6, __pyx_pybuffernd_arr.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_3); __Pyx_XDECREF_SET(__pyx_v_cur, __pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/generated.pyx":1872 * for i in range(1, n): * cur = arr[i] * if cur < prev: # <<<<<<<<<<<<<< * return False, None * elif cur == prev: */ __pyx_t_3 = PyObject_RichCompare(__pyx_v_cur, __pyx_v_prev, Py_LT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1872; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1872; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_2) { /* "pandas/src/generated.pyx":1873 * cur = arr[i] * if cur < prev: * return False, None # <<<<<<<<<<<<<< * elif cur == prev: * is_unique = 0 */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_tuple__88); __pyx_r = __pyx_tuple__88; goto __pyx_L0; } /* "pandas/src/generated.pyx":1874 * if cur < prev: * return False, None * elif cur == prev: # <<<<<<<<<<<<<< * is_unique = 0 * prev = cur */ __pyx_t_3 = PyObject_RichCompare(__pyx_v_cur, __pyx_v_prev, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1874; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1874; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_2) { /* "pandas/src/generated.pyx":1875 * return False, None * elif cur == prev: * is_unique = 0 # <<<<<<<<<<<<<< * prev = cur * return True, is_unique */ __pyx_v_is_unique = 0; goto __pyx_L6; } __pyx_L6:; /* "pandas/src/generated.pyx":1876 * elif cur == prev: * is_unique = 0 * prev = cur # <<<<<<<<<<<<<< * return True, is_unique * @cython.boundscheck(False) */ __Pyx_INCREF(__pyx_v_cur); __Pyx_DECREF_SET(__pyx_v_prev, __pyx_v_cur); } /* "pandas/src/generated.pyx":1877 * is_unique = 0 * prev = cur * return True, is_unique # <<<<<<<<<<<<<< * @cython.boundscheck(False) * @cython.wraparound(False) */ __Pyx_XDECREF(__pyx_r); __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_is_unique); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1877; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1877; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_INCREF(Py_True); PyTuple_SET_ITEM(__pyx_t_7, 0, Py_True); __Pyx_GIVEREF(Py_True); PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_r = __pyx_t_7; __pyx_t_7 = 0; goto __pyx_L0; /* "pandas/src/generated.pyx":1853 * @cython.boundscheck(False) * @cython.wraparound(False) * def is_monotonic_object(ndarray[object] arr): # <<<<<<<<<<<<<< * ''' * Returns */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_7); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_arr.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.is_monotonic_object", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_arr.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF(__pyx_v_prev); __Pyx_XDECREF(__pyx_v_cur); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":1880 * @cython.boundscheck(False) * @cython.wraparound(False) * def is_monotonic_int32(ndarray[int32_t] arr): # <<<<<<<<<<<<<< * ''' * Returns */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_193is_monotonic_int32(PyObject *__pyx_self, PyObject *__pyx_v_arr); /*proto*/ static char __pyx_doc_6pandas_5algos_192is_monotonic_int32[] = "\n Returns\n -------\n is_monotonic, is_unique\n "; static PyMethodDef __pyx_mdef_6pandas_5algos_193is_monotonic_int32 = {__Pyx_NAMESTR("is_monotonic_int32"), (PyCFunction)__pyx_pw_6pandas_5algos_193is_monotonic_int32, METH_O, __Pyx_DOCSTR(__pyx_doc_6pandas_5algos_192is_monotonic_int32)}; static PyObject *__pyx_pw_6pandas_5algos_193is_monotonic_int32(PyObject *__pyx_self, PyObject *__pyx_v_arr) { CYTHON_UNUSED int __pyx_lineno = 0; CYTHON_UNUSED const char *__pyx_filename = NULL; CYTHON_UNUSED int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("is_monotonic_int32 (wrapper)", 0); if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_arr), __pyx_ptype_5numpy_ndarray, 1, "arr", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1880; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_192is_monotonic_int32(__pyx_self, ((PyArrayObject *)__pyx_v_arr)); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5algos_192is_monotonic_int32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_arr) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_n; __pyx_t_5numpy_int32_t __pyx_v_prev; __pyx_t_5numpy_int32_t __pyx_v_cur; int __pyx_v_is_unique; __Pyx_LocalBuf_ND __pyx_pybuffernd_arr; __Pyx_Buffer __pyx_pybuffer_arr; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; int __pyx_t_2; long __pyx_t_3; Py_ssize_t __pyx_t_4; Py_ssize_t __pyx_t_5; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("is_monotonic_int32", 0); __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_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1880; __pyx_clineno = __LINE__; goto __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/src/generated.pyx":1889 * Py_ssize_t i, n * int32_t prev, cur * bint is_unique = 1 # <<<<<<<<<<<<<< * * n = len(arr) */ __pyx_v_is_unique = 1; /* "pandas/src/generated.pyx":1891 * bint is_unique = 1 * * n = len(arr) # <<<<<<<<<<<<<< * * if n < 2: */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_arr)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1891; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/src/generated.pyx":1893 * n = len(arr) * * if n < 2: # <<<<<<<<<<<<<< * return True, True * */ __pyx_t_2 = ((__pyx_v_n < 2) != 0); if (__pyx_t_2) { /* "pandas/src/generated.pyx":1894 * * if n < 2: * return True, True # <<<<<<<<<<<<<< * * prev = arr[0] */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_tuple__89); __pyx_r = __pyx_tuple__89; goto __pyx_L0; } /* "pandas/src/generated.pyx":1896 * return True, True * * prev = arr[0] # <<<<<<<<<<<<<< * for i in range(1, n): * cur = arr[i] */ __pyx_t_3 = 0; __pyx_v_prev = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_arr.rcbuffer->pybuffer.buf, __pyx_t_3, __pyx_pybuffernd_arr.diminfo[0].strides)); /* "pandas/src/generated.pyx":1897 * * prev = arr[0] * for i in range(1, n): # <<<<<<<<<<<<<< * cur = arr[i] * if cur < prev: */ __pyx_t_1 = __pyx_v_n; for (__pyx_t_4 = 1; __pyx_t_4 < __pyx_t_1; __pyx_t_4+=1) { __pyx_v_i = __pyx_t_4; /* "pandas/src/generated.pyx":1898 * prev = arr[0] * for i in range(1, n): * cur = arr[i] # <<<<<<<<<<<<<< * if cur < prev: * return False, None */ __pyx_t_5 = __pyx_v_i; __pyx_v_cur = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_arr.rcbuffer->pybuffer.buf, __pyx_t_5, __pyx_pybuffernd_arr.diminfo[0].strides)); /* "pandas/src/generated.pyx":1899 * for i in range(1, n): * cur = arr[i] * if cur < prev: # <<<<<<<<<<<<<< * return False, None * elif cur == prev: */ __pyx_t_2 = ((__pyx_v_cur < __pyx_v_prev) != 0); if (__pyx_t_2) { /* "pandas/src/generated.pyx":1900 * cur = arr[i] * if cur < prev: * return False, None # <<<<<<<<<<<<<< * elif cur == prev: * is_unique = 0 */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_tuple__90); __pyx_r = __pyx_tuple__90; goto __pyx_L0; } /* "pandas/src/generated.pyx":1901 * if cur < prev: * return False, None * elif cur == prev: # <<<<<<<<<<<<<< * is_unique = 0 * prev = cur */ __pyx_t_2 = ((__pyx_v_cur == __pyx_v_prev) != 0); if (__pyx_t_2) { /* "pandas/src/generated.pyx":1902 * return False, None * elif cur == prev: * is_unique = 0 # <<<<<<<<<<<<<< * prev = cur * return True, is_unique */ __pyx_v_is_unique = 0; goto __pyx_L6; } __pyx_L6:; /* "pandas/src/generated.pyx":1903 * elif cur == prev: * is_unique = 0 * prev = cur # <<<<<<<<<<<<<< * return True, is_unique * @cython.boundscheck(False) */ __pyx_v_prev = __pyx_v_cur; } /* "pandas/src/generated.pyx":1904 * is_unique = 0 * prev = cur * return True, is_unique # <<<<<<<<<<<<<< * @cython.boundscheck(False) * @cython.wraparound(False) */ __Pyx_XDECREF(__pyx_r); __pyx_t_6 = __Pyx_PyBool_FromLong(__pyx_v_is_unique); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1904; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1904; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_INCREF(Py_True); PyTuple_SET_ITEM(__pyx_t_7, 0, Py_True); __Pyx_GIVEREF(Py_True); PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_r = __pyx_t_7; __pyx_t_7 = 0; goto __pyx_L0; /* "pandas/src/generated.pyx":1880 * @cython.boundscheck(False) * @cython.wraparound(False) * def is_monotonic_int32(ndarray[int32_t] arr): # <<<<<<<<<<<<<< * ''' * Returns */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_arr.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.is_monotonic_int32", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_arr.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":1907 * @cython.boundscheck(False) * @cython.wraparound(False) * def is_monotonic_int64(ndarray[int64_t] arr): # <<<<<<<<<<<<<< * ''' * Returns */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_195is_monotonic_int64(PyObject *__pyx_self, PyObject *__pyx_v_arr); /*proto*/ static char __pyx_doc_6pandas_5algos_194is_monotonic_int64[] = "\n Returns\n -------\n is_monotonic, is_unique\n "; static PyMethodDef __pyx_mdef_6pandas_5algos_195is_monotonic_int64 = {__Pyx_NAMESTR("is_monotonic_int64"), (PyCFunction)__pyx_pw_6pandas_5algos_195is_monotonic_int64, METH_O, __Pyx_DOCSTR(__pyx_doc_6pandas_5algos_194is_monotonic_int64)}; static PyObject *__pyx_pw_6pandas_5algos_195is_monotonic_int64(PyObject *__pyx_self, PyObject *__pyx_v_arr) { CYTHON_UNUSED int __pyx_lineno = 0; CYTHON_UNUSED const char *__pyx_filename = NULL; CYTHON_UNUSED int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("is_monotonic_int64 (wrapper)", 0); if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_arr), __pyx_ptype_5numpy_ndarray, 1, "arr", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1907; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_194is_monotonic_int64(__pyx_self, ((PyArrayObject *)__pyx_v_arr)); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5algos_194is_monotonic_int64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_arr) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_n; __pyx_t_5numpy_int64_t __pyx_v_prev; __pyx_t_5numpy_int64_t __pyx_v_cur; int __pyx_v_is_unique; __Pyx_LocalBuf_ND __pyx_pybuffernd_arr; __Pyx_Buffer __pyx_pybuffer_arr; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; int __pyx_t_2; long __pyx_t_3; Py_ssize_t __pyx_t_4; Py_ssize_t __pyx_t_5; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("is_monotonic_int64", 0); __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_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1907; __pyx_clineno = __LINE__; goto __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/src/generated.pyx":1916 * Py_ssize_t i, n * int64_t prev, cur * bint is_unique = 1 # <<<<<<<<<<<<<< * * n = len(arr) */ __pyx_v_is_unique = 1; /* "pandas/src/generated.pyx":1918 * bint is_unique = 1 * * n = len(arr) # <<<<<<<<<<<<<< * * if n < 2: */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_arr)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1918; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/src/generated.pyx":1920 * n = len(arr) * * if n < 2: # <<<<<<<<<<<<<< * return True, True * */ __pyx_t_2 = ((__pyx_v_n < 2) != 0); if (__pyx_t_2) { /* "pandas/src/generated.pyx":1921 * * if n < 2: * return True, True # <<<<<<<<<<<<<< * * prev = arr[0] */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_tuple__91); __pyx_r = __pyx_tuple__91; goto __pyx_L0; } /* "pandas/src/generated.pyx":1923 * return True, True * * prev = arr[0] # <<<<<<<<<<<<<< * for i in range(1, n): * cur = arr[i] */ __pyx_t_3 = 0; __pyx_v_prev = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_arr.rcbuffer->pybuffer.buf, __pyx_t_3, __pyx_pybuffernd_arr.diminfo[0].strides)); /* "pandas/src/generated.pyx":1924 * * prev = arr[0] * for i in range(1, n): # <<<<<<<<<<<<<< * cur = arr[i] * if cur < prev: */ __pyx_t_1 = __pyx_v_n; for (__pyx_t_4 = 1; __pyx_t_4 < __pyx_t_1; __pyx_t_4+=1) { __pyx_v_i = __pyx_t_4; /* "pandas/src/generated.pyx":1925 * prev = arr[0] * for i in range(1, n): * cur = arr[i] # <<<<<<<<<<<<<< * if cur < prev: * return False, None */ __pyx_t_5 = __pyx_v_i; __pyx_v_cur = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_arr.rcbuffer->pybuffer.buf, __pyx_t_5, __pyx_pybuffernd_arr.diminfo[0].strides)); /* "pandas/src/generated.pyx":1926 * for i in range(1, n): * cur = arr[i] * if cur < prev: # <<<<<<<<<<<<<< * return False, None * elif cur == prev: */ __pyx_t_2 = ((__pyx_v_cur < __pyx_v_prev) != 0); if (__pyx_t_2) { /* "pandas/src/generated.pyx":1927 * cur = arr[i] * if cur < prev: * return False, None # <<<<<<<<<<<<<< * elif cur == prev: * is_unique = 0 */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_tuple__92); __pyx_r = __pyx_tuple__92; goto __pyx_L0; } /* "pandas/src/generated.pyx":1928 * if cur < prev: * return False, None * elif cur == prev: # <<<<<<<<<<<<<< * is_unique = 0 * prev = cur */ __pyx_t_2 = ((__pyx_v_cur == __pyx_v_prev) != 0); if (__pyx_t_2) { /* "pandas/src/generated.pyx":1929 * return False, None * elif cur == prev: * is_unique = 0 # <<<<<<<<<<<<<< * prev = cur * return True, is_unique */ __pyx_v_is_unique = 0; goto __pyx_L6; } __pyx_L6:; /* "pandas/src/generated.pyx":1930 * elif cur == prev: * is_unique = 0 * prev = cur # <<<<<<<<<<<<<< * return True, is_unique * @cython.boundscheck(False) */ __pyx_v_prev = __pyx_v_cur; } /* "pandas/src/generated.pyx":1931 * is_unique = 0 * prev = cur * return True, is_unique # <<<<<<<<<<<<<< * @cython.boundscheck(False) * @cython.wraparound(False) */ __Pyx_XDECREF(__pyx_r); __pyx_t_6 = __Pyx_PyBool_FromLong(__pyx_v_is_unique); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1931; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1931; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_INCREF(Py_True); PyTuple_SET_ITEM(__pyx_t_7, 0, Py_True); __Pyx_GIVEREF(Py_True); PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_r = __pyx_t_7; __pyx_t_7 = 0; goto __pyx_L0; /* "pandas/src/generated.pyx":1907 * @cython.boundscheck(False) * @cython.wraparound(False) * def is_monotonic_int64(ndarray[int64_t] arr): # <<<<<<<<<<<<<< * ''' * Returns */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_arr.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.is_monotonic_int64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_arr.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":1934 * @cython.boundscheck(False) * @cython.wraparound(False) * def is_monotonic_bool(ndarray[uint8_t] arr): # <<<<<<<<<<<<<< * ''' * Returns */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_197is_monotonic_bool(PyObject *__pyx_self, PyObject *__pyx_v_arr); /*proto*/ static char __pyx_doc_6pandas_5algos_196is_monotonic_bool[] = "\n Returns\n -------\n is_monotonic, is_unique\n "; static PyMethodDef __pyx_mdef_6pandas_5algos_197is_monotonic_bool = {__Pyx_NAMESTR("is_monotonic_bool"), (PyCFunction)__pyx_pw_6pandas_5algos_197is_monotonic_bool, METH_O, __Pyx_DOCSTR(__pyx_doc_6pandas_5algos_196is_monotonic_bool)}; static PyObject *__pyx_pw_6pandas_5algos_197is_monotonic_bool(PyObject *__pyx_self, PyObject *__pyx_v_arr) { CYTHON_UNUSED int __pyx_lineno = 0; CYTHON_UNUSED const char *__pyx_filename = NULL; CYTHON_UNUSED int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("is_monotonic_bool (wrapper)", 0); if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_arr), __pyx_ptype_5numpy_ndarray, 1, "arr", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1934; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_196is_monotonic_bool(__pyx_self, ((PyArrayObject *)__pyx_v_arr)); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5algos_196is_monotonic_bool(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_arr) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_n; __pyx_t_5numpy_uint8_t __pyx_v_prev; __pyx_t_5numpy_uint8_t __pyx_v_cur; int __pyx_v_is_unique; __Pyx_LocalBuf_ND __pyx_pybuffernd_arr; __Pyx_Buffer __pyx_pybuffer_arr; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; int __pyx_t_2; long __pyx_t_3; Py_ssize_t __pyx_t_4; Py_ssize_t __pyx_t_5; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("is_monotonic_bool", 0); __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_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1934; __pyx_clineno = __LINE__; goto __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/src/generated.pyx":1943 * Py_ssize_t i, n * uint8_t prev, cur * bint is_unique = 1 # <<<<<<<<<<<<<< * * n = len(arr) */ __pyx_v_is_unique = 1; /* "pandas/src/generated.pyx":1945 * bint is_unique = 1 * * n = len(arr) # <<<<<<<<<<<<<< * * if n < 2: */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_arr)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1945; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/src/generated.pyx":1947 * n = len(arr) * * if n < 2: # <<<<<<<<<<<<<< * return True, True * */ __pyx_t_2 = ((__pyx_v_n < 2) != 0); if (__pyx_t_2) { /* "pandas/src/generated.pyx":1948 * * if n < 2: * return True, True # <<<<<<<<<<<<<< * * prev = arr[0] */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_tuple__93); __pyx_r = __pyx_tuple__93; goto __pyx_L0; } /* "pandas/src/generated.pyx":1950 * return True, True * * prev = arr[0] # <<<<<<<<<<<<<< * for i in range(1, n): * cur = arr[i] */ __pyx_t_3 = 0; __pyx_v_prev = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_arr.rcbuffer->pybuffer.buf, __pyx_t_3, __pyx_pybuffernd_arr.diminfo[0].strides)); /* "pandas/src/generated.pyx":1951 * * prev = arr[0] * for i in range(1, n): # <<<<<<<<<<<<<< * cur = arr[i] * if cur < prev: */ __pyx_t_1 = __pyx_v_n; for (__pyx_t_4 = 1; __pyx_t_4 < __pyx_t_1; __pyx_t_4+=1) { __pyx_v_i = __pyx_t_4; /* "pandas/src/generated.pyx":1952 * prev = arr[0] * for i in range(1, n): * cur = arr[i] # <<<<<<<<<<<<<< * if cur < prev: * return False, None */ __pyx_t_5 = __pyx_v_i; __pyx_v_cur = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_arr.rcbuffer->pybuffer.buf, __pyx_t_5, __pyx_pybuffernd_arr.diminfo[0].strides)); /* "pandas/src/generated.pyx":1953 * for i in range(1, n): * cur = arr[i] * if cur < prev: # <<<<<<<<<<<<<< * return False, None * elif cur == prev: */ __pyx_t_2 = ((__pyx_v_cur < __pyx_v_prev) != 0); if (__pyx_t_2) { /* "pandas/src/generated.pyx":1954 * cur = arr[i] * if cur < prev: * return False, None # <<<<<<<<<<<<<< * elif cur == prev: * is_unique = 0 */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_tuple__94); __pyx_r = __pyx_tuple__94; goto __pyx_L0; } /* "pandas/src/generated.pyx":1955 * if cur < prev: * return False, None * elif cur == prev: # <<<<<<<<<<<<<< * is_unique = 0 * prev = cur */ __pyx_t_2 = ((__pyx_v_cur == __pyx_v_prev) != 0); if (__pyx_t_2) { /* "pandas/src/generated.pyx":1956 * return False, None * elif cur == prev: * is_unique = 0 # <<<<<<<<<<<<<< * prev = cur * return True, is_unique */ __pyx_v_is_unique = 0; goto __pyx_L6; } __pyx_L6:; /* "pandas/src/generated.pyx":1957 * elif cur == prev: * is_unique = 0 * prev = cur # <<<<<<<<<<<<<< * return True, is_unique * */ __pyx_v_prev = __pyx_v_cur; } /* "pandas/src/generated.pyx":1958 * is_unique = 0 * prev = cur * return True, is_unique # <<<<<<<<<<<<<< * * @cython.wraparound(False) */ __Pyx_XDECREF(__pyx_r); __pyx_t_6 = __Pyx_PyBool_FromLong(__pyx_v_is_unique); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1958; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1958; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_INCREF(Py_True); PyTuple_SET_ITEM(__pyx_t_7, 0, Py_True); __Pyx_GIVEREF(Py_True); PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_r = __pyx_t_7; __pyx_t_7 = 0; goto __pyx_L0; /* "pandas/src/generated.pyx":1934 * @cython.boundscheck(False) * @cython.wraparound(False) * def is_monotonic_bool(ndarray[uint8_t] arr): # <<<<<<<<<<<<<< * ''' * Returns */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_arr.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.is_monotonic_bool", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_arr.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":1962 * @cython.wraparound(False) * @cython.boundscheck(False) * def groupby_float64(ndarray[float64_t] index, ndarray labels): # <<<<<<<<<<<<<< * cdef dict result = {} * cdef Py_ssize_t i, length */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_199groupby_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_199groupby_float64 = {__Pyx_NAMESTR("groupby_float64"), (PyCFunction)__pyx_pw_6pandas_5algos_199groupby_float64, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_199groupby_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_index = 0; PyArrayObject *__pyx_v_labels = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("groupby_float64 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_index,&__pyx_n_s_labels,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_index)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_labels)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("groupby_float64", 1, 2, 2, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1962; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "groupby_float64") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1962; __pyx_clineno = __LINE__; goto __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_index = ((PyArrayObject *)values[0]); __pyx_v_labels = ((PyArrayObject *)values[1]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("groupby_float64", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1962; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.groupby_float64", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_index), __pyx_ptype_5numpy_ndarray, 1, "index", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1962; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_labels), __pyx_ptype_5numpy_ndarray, 1, "labels", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1962; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_198groupby_float64(__pyx_self, __pyx_v_index, __pyx_v_labels); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5algos_198groupby_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_index, PyArrayObject *__pyx_v_labels) { PyObject *__pyx_v_result = 0; Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_length; PyObject *__pyx_v_members = 0; PyObject *__pyx_v_idx = 0; PyObject *__pyx_v_key = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_index; __Pyx_Buffer __pyx_pybuffer_index; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; Py_ssize_t __pyx_t_2; int __pyx_t_3; Py_ssize_t __pyx_t_4; Py_ssize_t __pyx_t_5; int __pyx_t_6; int __pyx_t_7; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("groupby_float64", 0); __pyx_pybuffer_index.pybuffer.buf = NULL; __pyx_pybuffer_index.refcount = 0; __pyx_pybuffernd_index.data = NULL; __pyx_pybuffernd_index.rcbuffer = &__pyx_pybuffer_index; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_index.rcbuffer->pybuffer, (PyObject*)__pyx_v_index, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1962; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_index.diminfo[0].strides = __pyx_pybuffernd_index.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_index.diminfo[0].shape = __pyx_pybuffernd_index.rcbuffer->pybuffer.shape[0]; /* "pandas/src/generated.pyx":1963 * @cython.boundscheck(False) * def groupby_float64(ndarray[float64_t] index, ndarray labels): * cdef dict result = {} # <<<<<<<<<<<<<< * cdef Py_ssize_t i, length * cdef list members */ __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1963; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_v_result = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/generated.pyx":1968 * cdef object idx, key * * length = len(index) # <<<<<<<<<<<<<< * * if not length == len(labels): */ __pyx_t_2 = PyObject_Length(((PyObject *)__pyx_v_index)); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1968; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_length = __pyx_t_2; /* "pandas/src/generated.pyx":1970 * length = len(index) * * if not length == len(labels): # <<<<<<<<<<<<<< * raise AssertionError("len(index) != len(labels)") * */ __pyx_t_2 = PyObject_Length(((PyObject *)__pyx_v_labels)); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1970; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_3 = ((!((__pyx_v_length == __pyx_t_2) != 0)) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":1971 * * if not length == len(labels): * raise AssertionError("len(index) != len(labels)") # <<<<<<<<<<<<<< * * for i in range(length): */ __pyx_t_1 = PyObject_Call(__pyx_builtin_AssertionError, __pyx_tuple__95, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1971; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 1971; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } /* "pandas/src/generated.pyx":1973 * raise AssertionError("len(index) != len(labels)") * * for i in range(length): # <<<<<<<<<<<<<< * key = util.get_value_1d(labels, i) * */ __pyx_t_2 = __pyx_v_length; for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_2; __pyx_t_4+=1) { __pyx_v_i = __pyx_t_4; /* "pandas/src/generated.pyx":1974 * * for i in range(length): * key = util.get_value_1d(labels, i) # <<<<<<<<<<<<<< * * if _checknull(key): */ __pyx_t_1 = get_value_1d(__pyx_v_labels, __pyx_v_i); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1974; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_XDECREF_SET(__pyx_v_key, __pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/generated.pyx":1976 * key = util.get_value_1d(labels, i) * * if _checknull(key): # <<<<<<<<<<<<<< * continue * */ __pyx_t_3 = (__pyx_f_4util__checknull(__pyx_v_key) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":1977 * * if _checknull(key): * continue # <<<<<<<<<<<<<< * * idx = index[i] */ goto __pyx_L4_continue; } /* "pandas/src/generated.pyx":1979 * continue * * idx = index[i] # <<<<<<<<<<<<<< * if key in result: * members = result[key] */ __pyx_t_5 = __pyx_v_i; __pyx_t_1 = PyFloat_FromDouble((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_index.rcbuffer->pybuffer.buf, __pyx_t_5, __pyx_pybuffernd_index.diminfo[0].strides))); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1979; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_XDECREF_SET(__pyx_v_idx, __pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/generated.pyx":1980 * * idx = index[i] * if key in result: # <<<<<<<<<<<<<< * members = result[key] * members.append(idx) */ __pyx_t_3 = (__Pyx_PyDict_Contains(__pyx_v_key, __pyx_v_result, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1980; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_6 = (__pyx_t_3 != 0); if (__pyx_t_6) { /* "pandas/src/generated.pyx":1981 * idx = index[i] * if key in result: * members = result[key] # <<<<<<<<<<<<<< * members.append(idx) * else: */ __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_result, __pyx_v_key); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1981; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_1); if (!(likely(PyList_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_t_1)->tp_name), 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1981; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_XDECREF_SET(__pyx_v_members, ((PyObject*)__pyx_t_1)); __pyx_t_1 = 0; /* "pandas/src/generated.pyx":1982 * if key in result: * members = result[key] * members.append(idx) # <<<<<<<<<<<<<< * else: * result[key] = [idx] */ if (unlikely(__pyx_v_members == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "append"); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1982; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_7 = __Pyx_PyList_Append(__pyx_v_members, __pyx_v_idx); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1982; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L7; } /*else*/ { /* "pandas/src/generated.pyx":1984 * members.append(idx) * else: * result[key] = [idx] # <<<<<<<<<<<<<< * * return result */ __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1984; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_idx); PyList_SET_ITEM(__pyx_t_1, 0, __pyx_v_idx); __Pyx_GIVEREF(__pyx_v_idx); if (unlikely(PyDict_SetItem(__pyx_v_result, __pyx_v_key, __pyx_t_1) < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1984; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } __pyx_L7:; __pyx_L4_continue:; } /* "pandas/src/generated.pyx":1986 * result[key] = [idx] * * return result # <<<<<<<<<<<<<< * * @cython.wraparound(False) */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_result); __pyx_r = __pyx_v_result; goto __pyx_L0; /* "pandas/src/generated.pyx":1962 * @cython.wraparound(False) * @cython.boundscheck(False) * def groupby_float64(ndarray[float64_t] index, ndarray labels): # <<<<<<<<<<<<<< * cdef dict result = {} * cdef Py_ssize_t i, length */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_index.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.groupby_float64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_index.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF(__pyx_v_result); __Pyx_XDECREF(__pyx_v_members); __Pyx_XDECREF(__pyx_v_idx); __Pyx_XDECREF(__pyx_v_key); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":1990 * @cython.wraparound(False) * @cython.boundscheck(False) * def groupby_float32(ndarray[float32_t] index, ndarray labels): # <<<<<<<<<<<<<< * cdef dict result = {} * cdef Py_ssize_t i, length */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_201groupby_float32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_201groupby_float32 = {__Pyx_NAMESTR("groupby_float32"), (PyCFunction)__pyx_pw_6pandas_5algos_201groupby_float32, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_201groupby_float32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_index = 0; PyArrayObject *__pyx_v_labels = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("groupby_float32 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_index,&__pyx_n_s_labels,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_index)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_labels)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("groupby_float32", 1, 2, 2, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1990; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "groupby_float32") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1990; __pyx_clineno = __LINE__; goto __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_index = ((PyArrayObject *)values[0]); __pyx_v_labels = ((PyArrayObject *)values[1]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("groupby_float32", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1990; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.groupby_float32", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_index), __pyx_ptype_5numpy_ndarray, 1, "index", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1990; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_labels), __pyx_ptype_5numpy_ndarray, 1, "labels", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1990; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_200groupby_float32(__pyx_self, __pyx_v_index, __pyx_v_labels); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5algos_200groupby_float32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_index, PyArrayObject *__pyx_v_labels) { PyObject *__pyx_v_result = 0; Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_length; PyObject *__pyx_v_members = 0; PyObject *__pyx_v_idx = 0; PyObject *__pyx_v_key = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_index; __Pyx_Buffer __pyx_pybuffer_index; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; Py_ssize_t __pyx_t_2; int __pyx_t_3; Py_ssize_t __pyx_t_4; Py_ssize_t __pyx_t_5; int __pyx_t_6; int __pyx_t_7; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("groupby_float32", 0); __pyx_pybuffer_index.pybuffer.buf = NULL; __pyx_pybuffer_index.refcount = 0; __pyx_pybuffernd_index.data = NULL; __pyx_pybuffernd_index.rcbuffer = &__pyx_pybuffer_index; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_index.rcbuffer->pybuffer, (PyObject*)__pyx_v_index, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1990; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_index.diminfo[0].strides = __pyx_pybuffernd_index.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_index.diminfo[0].shape = __pyx_pybuffernd_index.rcbuffer->pybuffer.shape[0]; /* "pandas/src/generated.pyx":1991 * @cython.boundscheck(False) * def groupby_float32(ndarray[float32_t] index, ndarray labels): * cdef dict result = {} # <<<<<<<<<<<<<< * cdef Py_ssize_t i, length * cdef list members */ __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1991; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_v_result = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/generated.pyx":1996 * cdef object idx, key * * length = len(index) # <<<<<<<<<<<<<< * * if not length == len(labels): */ __pyx_t_2 = PyObject_Length(((PyObject *)__pyx_v_index)); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1996; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_length = __pyx_t_2; /* "pandas/src/generated.pyx":1998 * length = len(index) * * if not length == len(labels): # <<<<<<<<<<<<<< * raise AssertionError("len(index) != len(labels)") * */ __pyx_t_2 = PyObject_Length(((PyObject *)__pyx_v_labels)); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1998; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_3 = ((!((__pyx_v_length == __pyx_t_2) != 0)) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":1999 * * if not length == len(labels): * raise AssertionError("len(index) != len(labels)") # <<<<<<<<<<<<<< * * for i in range(length): */ __pyx_t_1 = PyObject_Call(__pyx_builtin_AssertionError, __pyx_tuple__96, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1999; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 1999; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } /* "pandas/src/generated.pyx":2001 * raise AssertionError("len(index) != len(labels)") * * for i in range(length): # <<<<<<<<<<<<<< * key = util.get_value_1d(labels, i) * */ __pyx_t_2 = __pyx_v_length; for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_2; __pyx_t_4+=1) { __pyx_v_i = __pyx_t_4; /* "pandas/src/generated.pyx":2002 * * for i in range(length): * key = util.get_value_1d(labels, i) # <<<<<<<<<<<<<< * * if _checknull(key): */ __pyx_t_1 = get_value_1d(__pyx_v_labels, __pyx_v_i); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2002; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_XDECREF_SET(__pyx_v_key, __pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/generated.pyx":2004 * key = util.get_value_1d(labels, i) * * if _checknull(key): # <<<<<<<<<<<<<< * continue * */ __pyx_t_3 = (__pyx_f_4util__checknull(__pyx_v_key) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":2005 * * if _checknull(key): * continue # <<<<<<<<<<<<<< * * idx = index[i] */ goto __pyx_L4_continue; } /* "pandas/src/generated.pyx":2007 * continue * * idx = index[i] # <<<<<<<<<<<<<< * if key in result: * members = result[key] */ __pyx_t_5 = __pyx_v_i; __pyx_t_1 = PyFloat_FromDouble((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_index.rcbuffer->pybuffer.buf, __pyx_t_5, __pyx_pybuffernd_index.diminfo[0].strides))); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2007; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_XDECREF_SET(__pyx_v_idx, __pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/generated.pyx":2008 * * idx = index[i] * if key in result: # <<<<<<<<<<<<<< * members = result[key] * members.append(idx) */ __pyx_t_3 = (__Pyx_PyDict_Contains(__pyx_v_key, __pyx_v_result, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2008; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_6 = (__pyx_t_3 != 0); if (__pyx_t_6) { /* "pandas/src/generated.pyx":2009 * idx = index[i] * if key in result: * members = result[key] # <<<<<<<<<<<<<< * members.append(idx) * else: */ __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_result, __pyx_v_key); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2009; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_1); if (!(likely(PyList_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_t_1)->tp_name), 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2009; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_XDECREF_SET(__pyx_v_members, ((PyObject*)__pyx_t_1)); __pyx_t_1 = 0; /* "pandas/src/generated.pyx":2010 * if key in result: * members = result[key] * members.append(idx) # <<<<<<<<<<<<<< * else: * result[key] = [idx] */ if (unlikely(__pyx_v_members == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "append"); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2010; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_7 = __Pyx_PyList_Append(__pyx_v_members, __pyx_v_idx); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2010; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L7; } /*else*/ { /* "pandas/src/generated.pyx":2012 * members.append(idx) * else: * result[key] = [idx] # <<<<<<<<<<<<<< * * return result */ __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2012; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_idx); PyList_SET_ITEM(__pyx_t_1, 0, __pyx_v_idx); __Pyx_GIVEREF(__pyx_v_idx); if (unlikely(PyDict_SetItem(__pyx_v_result, __pyx_v_key, __pyx_t_1) < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2012; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } __pyx_L7:; __pyx_L4_continue:; } /* "pandas/src/generated.pyx":2014 * result[key] = [idx] * * return result # <<<<<<<<<<<<<< * * @cython.wraparound(False) */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_result); __pyx_r = __pyx_v_result; goto __pyx_L0; /* "pandas/src/generated.pyx":1990 * @cython.wraparound(False) * @cython.boundscheck(False) * def groupby_float32(ndarray[float32_t] index, ndarray labels): # <<<<<<<<<<<<<< * cdef dict result = {} * cdef Py_ssize_t i, length */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_index.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.groupby_float32", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_index.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF(__pyx_v_result); __Pyx_XDECREF(__pyx_v_members); __Pyx_XDECREF(__pyx_v_idx); __Pyx_XDECREF(__pyx_v_key); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":2018 * @cython.wraparound(False) * @cython.boundscheck(False) * def groupby_object(ndarray[object] index, ndarray labels): # <<<<<<<<<<<<<< * cdef dict result = {} * cdef Py_ssize_t i, length */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_203groupby_object(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_203groupby_object = {__Pyx_NAMESTR("groupby_object"), (PyCFunction)__pyx_pw_6pandas_5algos_203groupby_object, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_203groupby_object(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_index = 0; PyArrayObject *__pyx_v_labels = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("groupby_object (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_index,&__pyx_n_s_labels,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_index)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_labels)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("groupby_object", 1, 2, 2, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2018; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "groupby_object") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2018; __pyx_clineno = __LINE__; goto __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_index = ((PyArrayObject *)values[0]); __pyx_v_labels = ((PyArrayObject *)values[1]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("groupby_object", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2018; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.groupby_object", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_index), __pyx_ptype_5numpy_ndarray, 1, "index", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2018; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_labels), __pyx_ptype_5numpy_ndarray, 1, "labels", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2018; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_202groupby_object(__pyx_self, __pyx_v_index, __pyx_v_labels); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5algos_202groupby_object(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_index, PyArrayObject *__pyx_v_labels) { PyObject *__pyx_v_result = 0; Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_length; PyObject *__pyx_v_members = 0; PyObject *__pyx_v_idx = 0; PyObject *__pyx_v_key = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_index; __Pyx_Buffer __pyx_pybuffer_index; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; Py_ssize_t __pyx_t_2; int __pyx_t_3; Py_ssize_t __pyx_t_4; Py_ssize_t __pyx_t_5; int __pyx_t_6; int __pyx_t_7; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("groupby_object", 0); __pyx_pybuffer_index.pybuffer.buf = NULL; __pyx_pybuffer_index.refcount = 0; __pyx_pybuffernd_index.data = NULL; __pyx_pybuffernd_index.rcbuffer = &__pyx_pybuffer_index; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_index.rcbuffer->pybuffer, (PyObject*)__pyx_v_index, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2018; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_index.diminfo[0].strides = __pyx_pybuffernd_index.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_index.diminfo[0].shape = __pyx_pybuffernd_index.rcbuffer->pybuffer.shape[0]; /* "pandas/src/generated.pyx":2019 * @cython.boundscheck(False) * def groupby_object(ndarray[object] index, ndarray labels): * cdef dict result = {} # <<<<<<<<<<<<<< * cdef Py_ssize_t i, length * cdef list members */ __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2019; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_v_result = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/generated.pyx":2024 * cdef object idx, key * * length = len(index) # <<<<<<<<<<<<<< * * if not length == len(labels): */ __pyx_t_2 = PyObject_Length(((PyObject *)__pyx_v_index)); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2024; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_length = __pyx_t_2; /* "pandas/src/generated.pyx":2026 * length = len(index) * * if not length == len(labels): # <<<<<<<<<<<<<< * raise AssertionError("len(index) != len(labels)") * */ __pyx_t_2 = PyObject_Length(((PyObject *)__pyx_v_labels)); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2026; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_3 = ((!((__pyx_v_length == __pyx_t_2) != 0)) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":2027 * * if not length == len(labels): * raise AssertionError("len(index) != len(labels)") # <<<<<<<<<<<<<< * * for i in range(length): */ __pyx_t_1 = PyObject_Call(__pyx_builtin_AssertionError, __pyx_tuple__97, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2027; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 2027; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } /* "pandas/src/generated.pyx":2029 * raise AssertionError("len(index) != len(labels)") * * for i in range(length): # <<<<<<<<<<<<<< * key = util.get_value_1d(labels, i) * */ __pyx_t_2 = __pyx_v_length; for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_2; __pyx_t_4+=1) { __pyx_v_i = __pyx_t_4; /* "pandas/src/generated.pyx":2030 * * for i in range(length): * key = util.get_value_1d(labels, i) # <<<<<<<<<<<<<< * * if _checknull(key): */ __pyx_t_1 = get_value_1d(__pyx_v_labels, __pyx_v_i); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2030; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_XDECREF_SET(__pyx_v_key, __pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/generated.pyx":2032 * key = util.get_value_1d(labels, i) * * if _checknull(key): # <<<<<<<<<<<<<< * continue * */ __pyx_t_3 = (__pyx_f_4util__checknull(__pyx_v_key) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":2033 * * if _checknull(key): * continue # <<<<<<<<<<<<<< * * idx = index[i] */ goto __pyx_L4_continue; } /* "pandas/src/generated.pyx":2035 * continue * * idx = index[i] # <<<<<<<<<<<<<< * if key in result: * members = result[key] */ __pyx_t_5 = __pyx_v_i; __pyx_t_1 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_index.rcbuffer->pybuffer.buf, __pyx_t_5, __pyx_pybuffernd_index.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_1); __Pyx_XDECREF_SET(__pyx_v_idx, __pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/generated.pyx":2036 * * idx = index[i] * if key in result: # <<<<<<<<<<<<<< * members = result[key] * members.append(idx) */ __pyx_t_3 = (__Pyx_PyDict_Contains(__pyx_v_key, __pyx_v_result, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2036; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_6 = (__pyx_t_3 != 0); if (__pyx_t_6) { /* "pandas/src/generated.pyx":2037 * idx = index[i] * if key in result: * members = result[key] # <<<<<<<<<<<<<< * members.append(idx) * else: */ __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_result, __pyx_v_key); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2037; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_1); if (!(likely(PyList_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_t_1)->tp_name), 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2037; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_XDECREF_SET(__pyx_v_members, ((PyObject*)__pyx_t_1)); __pyx_t_1 = 0; /* "pandas/src/generated.pyx":2038 * if key in result: * members = result[key] * members.append(idx) # <<<<<<<<<<<<<< * else: * result[key] = [idx] */ if (unlikely(__pyx_v_members == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "append"); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2038; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_7 = __Pyx_PyList_Append(__pyx_v_members, __pyx_v_idx); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2038; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L7; } /*else*/ { /* "pandas/src/generated.pyx":2040 * members.append(idx) * else: * result[key] = [idx] # <<<<<<<<<<<<<< * * return result */ __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2040; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_idx); PyList_SET_ITEM(__pyx_t_1, 0, __pyx_v_idx); __Pyx_GIVEREF(__pyx_v_idx); if (unlikely(PyDict_SetItem(__pyx_v_result, __pyx_v_key, __pyx_t_1) < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2040; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } __pyx_L7:; __pyx_L4_continue:; } /* "pandas/src/generated.pyx":2042 * result[key] = [idx] * * return result # <<<<<<<<<<<<<< * * @cython.wraparound(False) */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_result); __pyx_r = __pyx_v_result; goto __pyx_L0; /* "pandas/src/generated.pyx":2018 * @cython.wraparound(False) * @cython.boundscheck(False) * def groupby_object(ndarray[object] index, ndarray labels): # <<<<<<<<<<<<<< * cdef dict result = {} * cdef Py_ssize_t i, length */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_index.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.groupby_object", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_index.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF(__pyx_v_result); __Pyx_XDECREF(__pyx_v_members); __Pyx_XDECREF(__pyx_v_idx); __Pyx_XDECREF(__pyx_v_key); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":2046 * @cython.wraparound(False) * @cython.boundscheck(False) * def groupby_int32(ndarray[int32_t] index, ndarray labels): # <<<<<<<<<<<<<< * cdef dict result = {} * cdef Py_ssize_t i, length */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_205groupby_int32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_205groupby_int32 = {__Pyx_NAMESTR("groupby_int32"), (PyCFunction)__pyx_pw_6pandas_5algos_205groupby_int32, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_205groupby_int32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_index = 0; PyArrayObject *__pyx_v_labels = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("groupby_int32 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_index,&__pyx_n_s_labels,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_index)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_labels)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("groupby_int32", 1, 2, 2, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2046; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "groupby_int32") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2046; __pyx_clineno = __LINE__; goto __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_index = ((PyArrayObject *)values[0]); __pyx_v_labels = ((PyArrayObject *)values[1]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("groupby_int32", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2046; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.groupby_int32", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_index), __pyx_ptype_5numpy_ndarray, 1, "index", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2046; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_labels), __pyx_ptype_5numpy_ndarray, 1, "labels", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2046; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_204groupby_int32(__pyx_self, __pyx_v_index, __pyx_v_labels); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5algos_204groupby_int32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_index, PyArrayObject *__pyx_v_labels) { PyObject *__pyx_v_result = 0; Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_length; PyObject *__pyx_v_members = 0; PyObject *__pyx_v_idx = 0; PyObject *__pyx_v_key = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_index; __Pyx_Buffer __pyx_pybuffer_index; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; Py_ssize_t __pyx_t_2; int __pyx_t_3; Py_ssize_t __pyx_t_4; Py_ssize_t __pyx_t_5; int __pyx_t_6; int __pyx_t_7; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("groupby_int32", 0); __pyx_pybuffer_index.pybuffer.buf = NULL; __pyx_pybuffer_index.refcount = 0; __pyx_pybuffernd_index.data = NULL; __pyx_pybuffernd_index.rcbuffer = &__pyx_pybuffer_index; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_index.rcbuffer->pybuffer, (PyObject*)__pyx_v_index, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2046; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_index.diminfo[0].strides = __pyx_pybuffernd_index.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_index.diminfo[0].shape = __pyx_pybuffernd_index.rcbuffer->pybuffer.shape[0]; /* "pandas/src/generated.pyx":2047 * @cython.boundscheck(False) * def groupby_int32(ndarray[int32_t] index, ndarray labels): * cdef dict result = {} # <<<<<<<<<<<<<< * cdef Py_ssize_t i, length * cdef list members */ __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2047; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_v_result = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/generated.pyx":2052 * cdef object idx, key * * length = len(index) # <<<<<<<<<<<<<< * * if not length == len(labels): */ __pyx_t_2 = PyObject_Length(((PyObject *)__pyx_v_index)); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2052; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_length = __pyx_t_2; /* "pandas/src/generated.pyx":2054 * length = len(index) * * if not length == len(labels): # <<<<<<<<<<<<<< * raise AssertionError("len(index) != len(labels)") * */ __pyx_t_2 = PyObject_Length(((PyObject *)__pyx_v_labels)); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2054; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_3 = ((!((__pyx_v_length == __pyx_t_2) != 0)) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":2055 * * if not length == len(labels): * raise AssertionError("len(index) != len(labels)") # <<<<<<<<<<<<<< * * for i in range(length): */ __pyx_t_1 = PyObject_Call(__pyx_builtin_AssertionError, __pyx_tuple__98, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2055; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 2055; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } /* "pandas/src/generated.pyx":2057 * raise AssertionError("len(index) != len(labels)") * * for i in range(length): # <<<<<<<<<<<<<< * key = util.get_value_1d(labels, i) * */ __pyx_t_2 = __pyx_v_length; for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_2; __pyx_t_4+=1) { __pyx_v_i = __pyx_t_4; /* "pandas/src/generated.pyx":2058 * * for i in range(length): * key = util.get_value_1d(labels, i) # <<<<<<<<<<<<<< * * if _checknull(key): */ __pyx_t_1 = get_value_1d(__pyx_v_labels, __pyx_v_i); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2058; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_XDECREF_SET(__pyx_v_key, __pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/generated.pyx":2060 * key = util.get_value_1d(labels, i) * * if _checknull(key): # <<<<<<<<<<<<<< * continue * */ __pyx_t_3 = (__pyx_f_4util__checknull(__pyx_v_key) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":2061 * * if _checknull(key): * continue # <<<<<<<<<<<<<< * * idx = index[i] */ goto __pyx_L4_continue; } /* "pandas/src/generated.pyx":2063 * continue * * idx = index[i] # <<<<<<<<<<<<<< * if key in result: * members = result[key] */ __pyx_t_5 = __pyx_v_i; __pyx_t_1 = __Pyx_PyInt_From_npy_int32((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_index.rcbuffer->pybuffer.buf, __pyx_t_5, __pyx_pybuffernd_index.diminfo[0].strides))); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2063; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_XDECREF_SET(__pyx_v_idx, __pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/generated.pyx":2064 * * idx = index[i] * if key in result: # <<<<<<<<<<<<<< * members = result[key] * members.append(idx) */ __pyx_t_3 = (__Pyx_PyDict_Contains(__pyx_v_key, __pyx_v_result, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2064; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_6 = (__pyx_t_3 != 0); if (__pyx_t_6) { /* "pandas/src/generated.pyx":2065 * idx = index[i] * if key in result: * members = result[key] # <<<<<<<<<<<<<< * members.append(idx) * else: */ __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_result, __pyx_v_key); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2065; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_1); if (!(likely(PyList_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_t_1)->tp_name), 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2065; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_XDECREF_SET(__pyx_v_members, ((PyObject*)__pyx_t_1)); __pyx_t_1 = 0; /* "pandas/src/generated.pyx":2066 * if key in result: * members = result[key] * members.append(idx) # <<<<<<<<<<<<<< * else: * result[key] = [idx] */ if (unlikely(__pyx_v_members == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "append"); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2066; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_7 = __Pyx_PyList_Append(__pyx_v_members, __pyx_v_idx); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2066; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L7; } /*else*/ { /* "pandas/src/generated.pyx":2068 * members.append(idx) * else: * result[key] = [idx] # <<<<<<<<<<<<<< * * return result */ __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2068; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_idx); PyList_SET_ITEM(__pyx_t_1, 0, __pyx_v_idx); __Pyx_GIVEREF(__pyx_v_idx); if (unlikely(PyDict_SetItem(__pyx_v_result, __pyx_v_key, __pyx_t_1) < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2068; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } __pyx_L7:; __pyx_L4_continue:; } /* "pandas/src/generated.pyx":2070 * result[key] = [idx] * * return result # <<<<<<<<<<<<<< * * @cython.wraparound(False) */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_result); __pyx_r = __pyx_v_result; goto __pyx_L0; /* "pandas/src/generated.pyx":2046 * @cython.wraparound(False) * @cython.boundscheck(False) * def groupby_int32(ndarray[int32_t] index, ndarray labels): # <<<<<<<<<<<<<< * cdef dict result = {} * cdef Py_ssize_t i, length */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_index.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.groupby_int32", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_index.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF(__pyx_v_result); __Pyx_XDECREF(__pyx_v_members); __Pyx_XDECREF(__pyx_v_idx); __Pyx_XDECREF(__pyx_v_key); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":2074 * @cython.wraparound(False) * @cython.boundscheck(False) * def groupby_int64(ndarray[int64_t] index, ndarray labels): # <<<<<<<<<<<<<< * cdef dict result = {} * cdef Py_ssize_t i, length */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_207groupby_int64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_207groupby_int64 = {__Pyx_NAMESTR("groupby_int64"), (PyCFunction)__pyx_pw_6pandas_5algos_207groupby_int64, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_207groupby_int64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_index = 0; PyArrayObject *__pyx_v_labels = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("groupby_int64 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_index,&__pyx_n_s_labels,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_index)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_labels)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("groupby_int64", 1, 2, 2, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2074; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "groupby_int64") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2074; __pyx_clineno = __LINE__; goto __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_index = ((PyArrayObject *)values[0]); __pyx_v_labels = ((PyArrayObject *)values[1]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("groupby_int64", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2074; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.groupby_int64", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_index), __pyx_ptype_5numpy_ndarray, 1, "index", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2074; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_labels), __pyx_ptype_5numpy_ndarray, 1, "labels", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2074; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_206groupby_int64(__pyx_self, __pyx_v_index, __pyx_v_labels); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5algos_206groupby_int64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_index, PyArrayObject *__pyx_v_labels) { PyObject *__pyx_v_result = 0; Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_length; PyObject *__pyx_v_members = 0; PyObject *__pyx_v_idx = 0; PyObject *__pyx_v_key = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_index; __Pyx_Buffer __pyx_pybuffer_index; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; Py_ssize_t __pyx_t_2; int __pyx_t_3; Py_ssize_t __pyx_t_4; Py_ssize_t __pyx_t_5; int __pyx_t_6; int __pyx_t_7; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("groupby_int64", 0); __pyx_pybuffer_index.pybuffer.buf = NULL; __pyx_pybuffer_index.refcount = 0; __pyx_pybuffernd_index.data = NULL; __pyx_pybuffernd_index.rcbuffer = &__pyx_pybuffer_index; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_index.rcbuffer->pybuffer, (PyObject*)__pyx_v_index, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2074; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_index.diminfo[0].strides = __pyx_pybuffernd_index.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_index.diminfo[0].shape = __pyx_pybuffernd_index.rcbuffer->pybuffer.shape[0]; /* "pandas/src/generated.pyx":2075 * @cython.boundscheck(False) * def groupby_int64(ndarray[int64_t] index, ndarray labels): * cdef dict result = {} # <<<<<<<<<<<<<< * cdef Py_ssize_t i, length * cdef list members */ __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2075; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_v_result = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/generated.pyx":2080 * cdef object idx, key * * length = len(index) # <<<<<<<<<<<<<< * * if not length == len(labels): */ __pyx_t_2 = PyObject_Length(((PyObject *)__pyx_v_index)); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2080; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_length = __pyx_t_2; /* "pandas/src/generated.pyx":2082 * length = len(index) * * if not length == len(labels): # <<<<<<<<<<<<<< * raise AssertionError("len(index) != len(labels)") * */ __pyx_t_2 = PyObject_Length(((PyObject *)__pyx_v_labels)); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2082; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_3 = ((!((__pyx_v_length == __pyx_t_2) != 0)) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":2083 * * if not length == len(labels): * raise AssertionError("len(index) != len(labels)") # <<<<<<<<<<<<<< * * for i in range(length): */ __pyx_t_1 = PyObject_Call(__pyx_builtin_AssertionError, __pyx_tuple__99, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2083; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 2083; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } /* "pandas/src/generated.pyx":2085 * raise AssertionError("len(index) != len(labels)") * * for i in range(length): # <<<<<<<<<<<<<< * key = util.get_value_1d(labels, i) * */ __pyx_t_2 = __pyx_v_length; for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_2; __pyx_t_4+=1) { __pyx_v_i = __pyx_t_4; /* "pandas/src/generated.pyx":2086 * * for i in range(length): * key = util.get_value_1d(labels, i) # <<<<<<<<<<<<<< * * if _checknull(key): */ __pyx_t_1 = get_value_1d(__pyx_v_labels, __pyx_v_i); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2086; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_XDECREF_SET(__pyx_v_key, __pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/generated.pyx":2088 * key = util.get_value_1d(labels, i) * * if _checknull(key): # <<<<<<<<<<<<<< * continue * */ __pyx_t_3 = (__pyx_f_4util__checknull(__pyx_v_key) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":2089 * * if _checknull(key): * continue # <<<<<<<<<<<<<< * * idx = index[i] */ goto __pyx_L4_continue; } /* "pandas/src/generated.pyx":2091 * continue * * idx = index[i] # <<<<<<<<<<<<<< * if key in result: * members = result[key] */ __pyx_t_5 = __pyx_v_i; __pyx_t_1 = __Pyx_PyInt_From_npy_int64((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_index.rcbuffer->pybuffer.buf, __pyx_t_5, __pyx_pybuffernd_index.diminfo[0].strides))); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2091; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_XDECREF_SET(__pyx_v_idx, __pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/generated.pyx":2092 * * idx = index[i] * if key in result: # <<<<<<<<<<<<<< * members = result[key] * members.append(idx) */ __pyx_t_3 = (__Pyx_PyDict_Contains(__pyx_v_key, __pyx_v_result, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2092; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_6 = (__pyx_t_3 != 0); if (__pyx_t_6) { /* "pandas/src/generated.pyx":2093 * idx = index[i] * if key in result: * members = result[key] # <<<<<<<<<<<<<< * members.append(idx) * else: */ __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_result, __pyx_v_key); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2093; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_1); if (!(likely(PyList_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_t_1)->tp_name), 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2093; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_XDECREF_SET(__pyx_v_members, ((PyObject*)__pyx_t_1)); __pyx_t_1 = 0; /* "pandas/src/generated.pyx":2094 * if key in result: * members = result[key] * members.append(idx) # <<<<<<<<<<<<<< * else: * result[key] = [idx] */ if (unlikely(__pyx_v_members == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "append"); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2094; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_7 = __Pyx_PyList_Append(__pyx_v_members, __pyx_v_idx); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2094; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L7; } /*else*/ { /* "pandas/src/generated.pyx":2096 * members.append(idx) * else: * result[key] = [idx] # <<<<<<<<<<<<<< * * return result */ __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2096; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_idx); PyList_SET_ITEM(__pyx_t_1, 0, __pyx_v_idx); __Pyx_GIVEREF(__pyx_v_idx); if (unlikely(PyDict_SetItem(__pyx_v_result, __pyx_v_key, __pyx_t_1) < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2096; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } __pyx_L7:; __pyx_L4_continue:; } /* "pandas/src/generated.pyx":2098 * result[key] = [idx] * * return result # <<<<<<<<<<<<<< * * @cython.wraparound(False) */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_result); __pyx_r = __pyx_v_result; goto __pyx_L0; /* "pandas/src/generated.pyx":2074 * @cython.wraparound(False) * @cython.boundscheck(False) * def groupby_int64(ndarray[int64_t] index, ndarray labels): # <<<<<<<<<<<<<< * cdef dict result = {} * cdef Py_ssize_t i, length */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_index.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.groupby_int64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_index.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF(__pyx_v_result); __Pyx_XDECREF(__pyx_v_members); __Pyx_XDECREF(__pyx_v_idx); __Pyx_XDECREF(__pyx_v_key); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":2102 * @cython.wraparound(False) * @cython.boundscheck(False) * def groupby_bool(ndarray[uint8_t] index, ndarray labels): # <<<<<<<<<<<<<< * cdef dict result = {} * cdef Py_ssize_t i, length */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_209groupby_bool(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_209groupby_bool = {__Pyx_NAMESTR("groupby_bool"), (PyCFunction)__pyx_pw_6pandas_5algos_209groupby_bool, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_209groupby_bool(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_index = 0; PyArrayObject *__pyx_v_labels = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("groupby_bool (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_index,&__pyx_n_s_labels,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_index)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_labels)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("groupby_bool", 1, 2, 2, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2102; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "groupby_bool") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2102; __pyx_clineno = __LINE__; goto __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_index = ((PyArrayObject *)values[0]); __pyx_v_labels = ((PyArrayObject *)values[1]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("groupby_bool", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2102; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.groupby_bool", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_index), __pyx_ptype_5numpy_ndarray, 1, "index", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2102; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_labels), __pyx_ptype_5numpy_ndarray, 1, "labels", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2102; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_208groupby_bool(__pyx_self, __pyx_v_index, __pyx_v_labels); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5algos_208groupby_bool(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_index, PyArrayObject *__pyx_v_labels) { PyObject *__pyx_v_result = 0; Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_length; PyObject *__pyx_v_members = 0; PyObject *__pyx_v_idx = 0; PyObject *__pyx_v_key = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_index; __Pyx_Buffer __pyx_pybuffer_index; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; Py_ssize_t __pyx_t_2; int __pyx_t_3; Py_ssize_t __pyx_t_4; Py_ssize_t __pyx_t_5; int __pyx_t_6; int __pyx_t_7; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("groupby_bool", 0); __pyx_pybuffer_index.pybuffer.buf = NULL; __pyx_pybuffer_index.refcount = 0; __pyx_pybuffernd_index.data = NULL; __pyx_pybuffernd_index.rcbuffer = &__pyx_pybuffer_index; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_index.rcbuffer->pybuffer, (PyObject*)__pyx_v_index, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2102; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_index.diminfo[0].strides = __pyx_pybuffernd_index.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_index.diminfo[0].shape = __pyx_pybuffernd_index.rcbuffer->pybuffer.shape[0]; /* "pandas/src/generated.pyx":2103 * @cython.boundscheck(False) * def groupby_bool(ndarray[uint8_t] index, ndarray labels): * cdef dict result = {} # <<<<<<<<<<<<<< * cdef Py_ssize_t i, length * cdef list members */ __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2103; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_v_result = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/generated.pyx":2108 * cdef object idx, key * * length = len(index) # <<<<<<<<<<<<<< * * if not length == len(labels): */ __pyx_t_2 = PyObject_Length(((PyObject *)__pyx_v_index)); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2108; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_length = __pyx_t_2; /* "pandas/src/generated.pyx":2110 * length = len(index) * * if not length == len(labels): # <<<<<<<<<<<<<< * raise AssertionError("len(index) != len(labels)") * */ __pyx_t_2 = PyObject_Length(((PyObject *)__pyx_v_labels)); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2110; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_3 = ((!((__pyx_v_length == __pyx_t_2) != 0)) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":2111 * * if not length == len(labels): * raise AssertionError("len(index) != len(labels)") # <<<<<<<<<<<<<< * * for i in range(length): */ __pyx_t_1 = PyObject_Call(__pyx_builtin_AssertionError, __pyx_tuple__100, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2111; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 2111; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } /* "pandas/src/generated.pyx":2113 * raise AssertionError("len(index) != len(labels)") * * for i in range(length): # <<<<<<<<<<<<<< * key = util.get_value_1d(labels, i) * */ __pyx_t_2 = __pyx_v_length; for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_2; __pyx_t_4+=1) { __pyx_v_i = __pyx_t_4; /* "pandas/src/generated.pyx":2114 * * for i in range(length): * key = util.get_value_1d(labels, i) # <<<<<<<<<<<<<< * * if _checknull(key): */ __pyx_t_1 = get_value_1d(__pyx_v_labels, __pyx_v_i); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2114; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_XDECREF_SET(__pyx_v_key, __pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/generated.pyx":2116 * key = util.get_value_1d(labels, i) * * if _checknull(key): # <<<<<<<<<<<<<< * continue * */ __pyx_t_3 = (__pyx_f_4util__checknull(__pyx_v_key) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":2117 * * if _checknull(key): * continue # <<<<<<<<<<<<<< * * idx = index[i] */ goto __pyx_L4_continue; } /* "pandas/src/generated.pyx":2119 * continue * * idx = index[i] # <<<<<<<<<<<<<< * if key in result: * members = result[key] */ __pyx_t_5 = __pyx_v_i; __pyx_t_1 = __Pyx_PyInt_From_npy_uint8((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_index.rcbuffer->pybuffer.buf, __pyx_t_5, __pyx_pybuffernd_index.diminfo[0].strides))); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2119; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_XDECREF_SET(__pyx_v_idx, __pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/generated.pyx":2120 * * idx = index[i] * if key in result: # <<<<<<<<<<<<<< * members = result[key] * members.append(idx) */ __pyx_t_3 = (__Pyx_PyDict_Contains(__pyx_v_key, __pyx_v_result, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2120; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_6 = (__pyx_t_3 != 0); if (__pyx_t_6) { /* "pandas/src/generated.pyx":2121 * idx = index[i] * if key in result: * members = result[key] # <<<<<<<<<<<<<< * members.append(idx) * else: */ __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_result, __pyx_v_key); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2121; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_1); if (!(likely(PyList_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_t_1)->tp_name), 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2121; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_XDECREF_SET(__pyx_v_members, ((PyObject*)__pyx_t_1)); __pyx_t_1 = 0; /* "pandas/src/generated.pyx":2122 * if key in result: * members = result[key] * members.append(idx) # <<<<<<<<<<<<<< * else: * result[key] = [idx] */ if (unlikely(__pyx_v_members == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "append"); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2122; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_7 = __Pyx_PyList_Append(__pyx_v_members, __pyx_v_idx); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2122; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L7; } /*else*/ { /* "pandas/src/generated.pyx":2124 * members.append(idx) * else: * result[key] = [idx] # <<<<<<<<<<<<<< * * return result */ __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2124; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_idx); PyList_SET_ITEM(__pyx_t_1, 0, __pyx_v_idx); __Pyx_GIVEREF(__pyx_v_idx); if (unlikely(PyDict_SetItem(__pyx_v_result, __pyx_v_key, __pyx_t_1) < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2124; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } __pyx_L7:; __pyx_L4_continue:; } /* "pandas/src/generated.pyx":2126 * result[key] = [idx] * * return result # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_result); __pyx_r = __pyx_v_result; goto __pyx_L0; /* "pandas/src/generated.pyx":2102 * @cython.wraparound(False) * @cython.boundscheck(False) * def groupby_bool(ndarray[uint8_t] index, ndarray labels): # <<<<<<<<<<<<<< * cdef dict result = {} * cdef Py_ssize_t i, length */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_index.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.groupby_bool", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_index.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF(__pyx_v_result); __Pyx_XDECREF(__pyx_v_members); __Pyx_XDECREF(__pyx_v_idx); __Pyx_XDECREF(__pyx_v_key); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":2131 * @cython.wraparound(False) * @cython.boundscheck(False) * def arrmap_float64(ndarray[float64_t] index, object func): # <<<<<<<<<<<<<< * cdef Py_ssize_t length = index.shape[0] * cdef Py_ssize_t i = 0 */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_211arrmap_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_211arrmap_float64 = {__Pyx_NAMESTR("arrmap_float64"), (PyCFunction)__pyx_pw_6pandas_5algos_211arrmap_float64, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_211arrmap_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_index = 0; PyObject *__pyx_v_func = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("arrmap_float64 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_index,&__pyx_n_s_func,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_index)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_func)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("arrmap_float64", 1, 2, 2, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2131; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "arrmap_float64") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2131; __pyx_clineno = __LINE__; goto __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_index = ((PyArrayObject *)values[0]); __pyx_v_func = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("arrmap_float64", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2131; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.arrmap_float64", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_index), __pyx_ptype_5numpy_ndarray, 1, "index", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2131; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_210arrmap_float64(__pyx_self, __pyx_v_index, __pyx_v_func); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5algos_210arrmap_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_index, PyObject *__pyx_v_func) { Py_ssize_t __pyx_v_length; Py_ssize_t __pyx_v_i; PyArrayObject *__pyx_v_result = 0; PyObject *__pyx_v_maybe_convert_objects = NULL; __Pyx_LocalBuf_ND __pyx_pybuffernd_index; __Pyx_Buffer __pyx_pybuffer_index; __Pyx_LocalBuf_ND __pyx_pybuffernd_result; __Pyx_Buffer __pyx_pybuffer_result; 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; Py_ssize_t __pyx_t_7; Py_ssize_t __pyx_t_8; Py_ssize_t __pyx_t_9; Py_ssize_t __pyx_t_10; PyObject **__pyx_t_11; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("arrmap_float64", 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_index.pybuffer.buf = NULL; __pyx_pybuffer_index.refcount = 0; __pyx_pybuffernd_index.data = NULL; __pyx_pybuffernd_index.rcbuffer = &__pyx_pybuffer_index; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_index.rcbuffer->pybuffer, (PyObject*)__pyx_v_index, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2131; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_index.diminfo[0].strides = __pyx_pybuffernd_index.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_index.diminfo[0].shape = __pyx_pybuffernd_index.rcbuffer->pybuffer.shape[0]; /* "pandas/src/generated.pyx":2132 * @cython.boundscheck(False) * def arrmap_float64(ndarray[float64_t] index, object func): * cdef Py_ssize_t length = index.shape[0] # <<<<<<<<<<<<<< * cdef Py_ssize_t i = 0 * */ __pyx_v_length = (__pyx_v_index->dimensions[0]); /* "pandas/src/generated.pyx":2133 * def arrmap_float64(ndarray[float64_t] index, object func): * cdef Py_ssize_t length = index.shape[0] * cdef Py_ssize_t i = 0 # <<<<<<<<<<<<<< * * cdef ndarray[object] result = np.empty(length, dtype=np.object_) */ __pyx_v_i = 0; /* "pandas/src/generated.pyx":2135 * cdef Py_ssize_t i = 0 * * cdef ndarray[object] result = np.empty(length, dtype=np.object_) # <<<<<<<<<<<<<< * * from pandas.lib import maybe_convert_objects */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2135; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 2135; __pyx_clineno = __LINE__; goto __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_length); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2135; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2135; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2135; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2135; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_object_2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2135; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 2135; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyObject_Call(__pyx_t_2, __pyx_t_3, __pyx_t_1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2135; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 2135; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_6 = ((PyArrayObject *)__pyx_t_5); { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { __pyx_v_result = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_result.rcbuffer->pybuffer.buf = NULL; {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2135; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } else {__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]; } } __pyx_t_6 = 0; __pyx_v_result = ((PyArrayObject *)__pyx_t_5); __pyx_t_5 = 0; /* "pandas/src/generated.pyx":2137 * cdef ndarray[object] result = np.empty(length, dtype=np.object_) * * from pandas.lib import maybe_convert_objects # <<<<<<<<<<<<<< * * for i in range(length): */ __pyx_t_5 = PyList_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2137; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_n_s_maybe_convert_objects); PyList_SET_ITEM(__pyx_t_5, 0, __pyx_n_s_maybe_convert_objects); __Pyx_GIVEREF(__pyx_n_s_maybe_convert_objects); __pyx_t_1 = __Pyx_Import(__pyx_n_s_pandas_lib, __pyx_t_5, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2137; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_maybe_convert_objects); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2137; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_t_5); __pyx_v_maybe_convert_objects = __pyx_t_5; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/generated.pyx":2139 * from pandas.lib import maybe_convert_objects * * for i in range(length): # <<<<<<<<<<<<<< * result[i] = func(index[i]) * */ __pyx_t_7 = __pyx_v_length; for (__pyx_t_8 = 0; __pyx_t_8 < __pyx_t_7; __pyx_t_8+=1) { __pyx_v_i = __pyx_t_8; /* "pandas/src/generated.pyx":2140 * * for i in range(length): * result[i] = func(index[i]) # <<<<<<<<<<<<<< * * return maybe_convert_objects(result) */ __pyx_t_9 = __pyx_v_i; __pyx_t_1 = PyFloat_FromDouble((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_index.rcbuffer->pybuffer.buf, __pyx_t_9, __pyx_pybuffernd_index.diminfo[0].strides))); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2140; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2140; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyObject_Call(__pyx_v_func, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2140; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_10 = __pyx_v_i; __pyx_t_11 = __Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_10, __pyx_pybuffernd_result.diminfo[0].strides); __Pyx_GOTREF(*__pyx_t_11); __Pyx_INCREF(__pyx_t_1); __Pyx_DECREF(*__pyx_t_11); *__pyx_t_11 = __pyx_t_1; __Pyx_GIVEREF(*__pyx_t_11); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } /* "pandas/src/generated.pyx":2142 * result[i] = func(index[i]) * * return maybe_convert_objects(result) # <<<<<<<<<<<<<< * * @cython.wraparound(False) */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2142; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)__pyx_v_result)); PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_result)); __Pyx_GIVEREF(((PyObject *)__pyx_v_result)); __pyx_t_5 = PyObject_Call(__pyx_v_maybe_convert_objects, __pyx_t_1, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2142; __pyx_clineno = __LINE__; goto __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/src/generated.pyx":2131 * @cython.wraparound(False) * @cython.boundscheck(False) * def arrmap_float64(ndarray[float64_t] index, object func): # <<<<<<<<<<<<<< * cdef Py_ssize_t length = index.shape[0] * cdef Py_ssize_t i = 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_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_index.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.arrmap_float64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_index.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_result); __Pyx_XDECREF(__pyx_v_maybe_convert_objects); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":2146 * @cython.wraparound(False) * @cython.boundscheck(False) * def arrmap_float32(ndarray[float32_t] index, object func): # <<<<<<<<<<<<<< * cdef Py_ssize_t length = index.shape[0] * cdef Py_ssize_t i = 0 */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_213arrmap_float32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_213arrmap_float32 = {__Pyx_NAMESTR("arrmap_float32"), (PyCFunction)__pyx_pw_6pandas_5algos_213arrmap_float32, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_213arrmap_float32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_index = 0; PyObject *__pyx_v_func = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("arrmap_float32 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_index,&__pyx_n_s_func,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_index)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_func)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("arrmap_float32", 1, 2, 2, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2146; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "arrmap_float32") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2146; __pyx_clineno = __LINE__; goto __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_index = ((PyArrayObject *)values[0]); __pyx_v_func = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("arrmap_float32", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2146; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.arrmap_float32", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_index), __pyx_ptype_5numpy_ndarray, 1, "index", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2146; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_212arrmap_float32(__pyx_self, __pyx_v_index, __pyx_v_func); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5algos_212arrmap_float32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_index, PyObject *__pyx_v_func) { Py_ssize_t __pyx_v_length; Py_ssize_t __pyx_v_i; PyArrayObject *__pyx_v_result = 0; PyObject *__pyx_v_maybe_convert_objects = NULL; __Pyx_LocalBuf_ND __pyx_pybuffernd_index; __Pyx_Buffer __pyx_pybuffer_index; __Pyx_LocalBuf_ND __pyx_pybuffernd_result; __Pyx_Buffer __pyx_pybuffer_result; 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; Py_ssize_t __pyx_t_7; Py_ssize_t __pyx_t_8; Py_ssize_t __pyx_t_9; Py_ssize_t __pyx_t_10; PyObject **__pyx_t_11; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("arrmap_float32", 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_index.pybuffer.buf = NULL; __pyx_pybuffer_index.refcount = 0; __pyx_pybuffernd_index.data = NULL; __pyx_pybuffernd_index.rcbuffer = &__pyx_pybuffer_index; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_index.rcbuffer->pybuffer, (PyObject*)__pyx_v_index, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2146; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_index.diminfo[0].strides = __pyx_pybuffernd_index.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_index.diminfo[0].shape = __pyx_pybuffernd_index.rcbuffer->pybuffer.shape[0]; /* "pandas/src/generated.pyx":2147 * @cython.boundscheck(False) * def arrmap_float32(ndarray[float32_t] index, object func): * cdef Py_ssize_t length = index.shape[0] # <<<<<<<<<<<<<< * cdef Py_ssize_t i = 0 * */ __pyx_v_length = (__pyx_v_index->dimensions[0]); /* "pandas/src/generated.pyx":2148 * def arrmap_float32(ndarray[float32_t] index, object func): * cdef Py_ssize_t length = index.shape[0] * cdef Py_ssize_t i = 0 # <<<<<<<<<<<<<< * * cdef ndarray[object] result = np.empty(length, dtype=np.object_) */ __pyx_v_i = 0; /* "pandas/src/generated.pyx":2150 * cdef Py_ssize_t i = 0 * * cdef ndarray[object] result = np.empty(length, dtype=np.object_) # <<<<<<<<<<<<<< * * from pandas.lib import maybe_convert_objects */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2150; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 2150; __pyx_clineno = __LINE__; goto __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_length); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2150; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2150; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2150; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2150; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_object_2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2150; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 2150; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyObject_Call(__pyx_t_2, __pyx_t_3, __pyx_t_1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2150; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 2150; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_6 = ((PyArrayObject *)__pyx_t_5); { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { __pyx_v_result = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_result.rcbuffer->pybuffer.buf = NULL; {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2150; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } else {__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]; } } __pyx_t_6 = 0; __pyx_v_result = ((PyArrayObject *)__pyx_t_5); __pyx_t_5 = 0; /* "pandas/src/generated.pyx":2152 * cdef ndarray[object] result = np.empty(length, dtype=np.object_) * * from pandas.lib import maybe_convert_objects # <<<<<<<<<<<<<< * * for i in range(length): */ __pyx_t_5 = PyList_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2152; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_n_s_maybe_convert_objects); PyList_SET_ITEM(__pyx_t_5, 0, __pyx_n_s_maybe_convert_objects); __Pyx_GIVEREF(__pyx_n_s_maybe_convert_objects); __pyx_t_1 = __Pyx_Import(__pyx_n_s_pandas_lib, __pyx_t_5, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2152; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_maybe_convert_objects); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2152; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_t_5); __pyx_v_maybe_convert_objects = __pyx_t_5; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/generated.pyx":2154 * from pandas.lib import maybe_convert_objects * * for i in range(length): # <<<<<<<<<<<<<< * result[i] = func(index[i]) * */ __pyx_t_7 = __pyx_v_length; for (__pyx_t_8 = 0; __pyx_t_8 < __pyx_t_7; __pyx_t_8+=1) { __pyx_v_i = __pyx_t_8; /* "pandas/src/generated.pyx":2155 * * for i in range(length): * result[i] = func(index[i]) # <<<<<<<<<<<<<< * * return maybe_convert_objects(result) */ __pyx_t_9 = __pyx_v_i; __pyx_t_1 = PyFloat_FromDouble((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_index.rcbuffer->pybuffer.buf, __pyx_t_9, __pyx_pybuffernd_index.diminfo[0].strides))); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2155; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2155; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyObject_Call(__pyx_v_func, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2155; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_10 = __pyx_v_i; __pyx_t_11 = __Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_10, __pyx_pybuffernd_result.diminfo[0].strides); __Pyx_GOTREF(*__pyx_t_11); __Pyx_INCREF(__pyx_t_1); __Pyx_DECREF(*__pyx_t_11); *__pyx_t_11 = __pyx_t_1; __Pyx_GIVEREF(*__pyx_t_11); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } /* "pandas/src/generated.pyx":2157 * result[i] = func(index[i]) * * return maybe_convert_objects(result) # <<<<<<<<<<<<<< * * @cython.wraparound(False) */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2157; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)__pyx_v_result)); PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_result)); __Pyx_GIVEREF(((PyObject *)__pyx_v_result)); __pyx_t_5 = PyObject_Call(__pyx_v_maybe_convert_objects, __pyx_t_1, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2157; __pyx_clineno = __LINE__; goto __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/src/generated.pyx":2146 * @cython.wraparound(False) * @cython.boundscheck(False) * def arrmap_float32(ndarray[float32_t] index, object func): # <<<<<<<<<<<<<< * cdef Py_ssize_t length = index.shape[0] * cdef Py_ssize_t i = 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_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_index.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.arrmap_float32", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_index.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_result); __Pyx_XDECREF(__pyx_v_maybe_convert_objects); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":2161 * @cython.wraparound(False) * @cython.boundscheck(False) * def arrmap_object(ndarray[object] index, object func): # <<<<<<<<<<<<<< * cdef Py_ssize_t length = index.shape[0] * cdef Py_ssize_t i = 0 */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_215arrmap_object(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_215arrmap_object = {__Pyx_NAMESTR("arrmap_object"), (PyCFunction)__pyx_pw_6pandas_5algos_215arrmap_object, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_215arrmap_object(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_index = 0; PyObject *__pyx_v_func = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("arrmap_object (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_index,&__pyx_n_s_func,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_index)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_func)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("arrmap_object", 1, 2, 2, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2161; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "arrmap_object") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2161; __pyx_clineno = __LINE__; goto __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_index = ((PyArrayObject *)values[0]); __pyx_v_func = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("arrmap_object", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2161; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.arrmap_object", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_index), __pyx_ptype_5numpy_ndarray, 1, "index", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2161; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_214arrmap_object(__pyx_self, __pyx_v_index, __pyx_v_func); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5algos_214arrmap_object(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_index, PyObject *__pyx_v_func) { Py_ssize_t __pyx_v_length; Py_ssize_t __pyx_v_i; PyArrayObject *__pyx_v_result = 0; PyObject *__pyx_v_maybe_convert_objects = NULL; __Pyx_LocalBuf_ND __pyx_pybuffernd_index; __Pyx_Buffer __pyx_pybuffer_index; __Pyx_LocalBuf_ND __pyx_pybuffernd_result; __Pyx_Buffer __pyx_pybuffer_result; 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; Py_ssize_t __pyx_t_7; Py_ssize_t __pyx_t_8; Py_ssize_t __pyx_t_9; Py_ssize_t __pyx_t_10; PyObject **__pyx_t_11; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("arrmap_object", 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_index.pybuffer.buf = NULL; __pyx_pybuffer_index.refcount = 0; __pyx_pybuffernd_index.data = NULL; __pyx_pybuffernd_index.rcbuffer = &__pyx_pybuffer_index; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_index.rcbuffer->pybuffer, (PyObject*)__pyx_v_index, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2161; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_index.diminfo[0].strides = __pyx_pybuffernd_index.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_index.diminfo[0].shape = __pyx_pybuffernd_index.rcbuffer->pybuffer.shape[0]; /* "pandas/src/generated.pyx":2162 * @cython.boundscheck(False) * def arrmap_object(ndarray[object] index, object func): * cdef Py_ssize_t length = index.shape[0] # <<<<<<<<<<<<<< * cdef Py_ssize_t i = 0 * */ __pyx_v_length = (__pyx_v_index->dimensions[0]); /* "pandas/src/generated.pyx":2163 * def arrmap_object(ndarray[object] index, object func): * cdef Py_ssize_t length = index.shape[0] * cdef Py_ssize_t i = 0 # <<<<<<<<<<<<<< * * cdef ndarray[object] result = np.empty(length, dtype=np.object_) */ __pyx_v_i = 0; /* "pandas/src/generated.pyx":2165 * cdef Py_ssize_t i = 0 * * cdef ndarray[object] result = np.empty(length, dtype=np.object_) # <<<<<<<<<<<<<< * * from pandas.lib import maybe_convert_objects */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2165; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 2165; __pyx_clineno = __LINE__; goto __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_length); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2165; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2165; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2165; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2165; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_object_2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2165; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 2165; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyObject_Call(__pyx_t_2, __pyx_t_3, __pyx_t_1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2165; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 2165; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_6 = ((PyArrayObject *)__pyx_t_5); { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { __pyx_v_result = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_result.rcbuffer->pybuffer.buf = NULL; {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2165; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } else {__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]; } } __pyx_t_6 = 0; __pyx_v_result = ((PyArrayObject *)__pyx_t_5); __pyx_t_5 = 0; /* "pandas/src/generated.pyx":2167 * cdef ndarray[object] result = np.empty(length, dtype=np.object_) * * from pandas.lib import maybe_convert_objects # <<<<<<<<<<<<<< * * for i in range(length): */ __pyx_t_5 = PyList_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2167; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_n_s_maybe_convert_objects); PyList_SET_ITEM(__pyx_t_5, 0, __pyx_n_s_maybe_convert_objects); __Pyx_GIVEREF(__pyx_n_s_maybe_convert_objects); __pyx_t_1 = __Pyx_Import(__pyx_n_s_pandas_lib, __pyx_t_5, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2167; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_maybe_convert_objects); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2167; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_t_5); __pyx_v_maybe_convert_objects = __pyx_t_5; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/generated.pyx":2169 * from pandas.lib import maybe_convert_objects * * for i in range(length): # <<<<<<<<<<<<<< * result[i] = func(index[i]) * */ __pyx_t_7 = __pyx_v_length; for (__pyx_t_8 = 0; __pyx_t_8 < __pyx_t_7; __pyx_t_8+=1) { __pyx_v_i = __pyx_t_8; /* "pandas/src/generated.pyx":2170 * * for i in range(length): * result[i] = func(index[i]) # <<<<<<<<<<<<<< * * return maybe_convert_objects(result) */ __pyx_t_9 = __pyx_v_i; __pyx_t_1 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_index.rcbuffer->pybuffer.buf, __pyx_t_9, __pyx_pybuffernd_index.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_1); __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2170; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyObject_Call(__pyx_v_func, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2170; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_10 = __pyx_v_i; __pyx_t_11 = __Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_10, __pyx_pybuffernd_result.diminfo[0].strides); __Pyx_GOTREF(*__pyx_t_11); __Pyx_INCREF(__pyx_t_1); __Pyx_DECREF(*__pyx_t_11); *__pyx_t_11 = __pyx_t_1; __Pyx_GIVEREF(*__pyx_t_11); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } /* "pandas/src/generated.pyx":2172 * result[i] = func(index[i]) * * return maybe_convert_objects(result) # <<<<<<<<<<<<<< * * @cython.wraparound(False) */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2172; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)__pyx_v_result)); PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_result)); __Pyx_GIVEREF(((PyObject *)__pyx_v_result)); __pyx_t_5 = PyObject_Call(__pyx_v_maybe_convert_objects, __pyx_t_1, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2172; __pyx_clineno = __LINE__; goto __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/src/generated.pyx":2161 * @cython.wraparound(False) * @cython.boundscheck(False) * def arrmap_object(ndarray[object] index, object func): # <<<<<<<<<<<<<< * cdef Py_ssize_t length = index.shape[0] * cdef Py_ssize_t i = 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_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_index.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.arrmap_object", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_index.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_result); __Pyx_XDECREF(__pyx_v_maybe_convert_objects); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":2176 * @cython.wraparound(False) * @cython.boundscheck(False) * def arrmap_int32(ndarray[int32_t] index, object func): # <<<<<<<<<<<<<< * cdef Py_ssize_t length = index.shape[0] * cdef Py_ssize_t i = 0 */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_217arrmap_int32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_217arrmap_int32 = {__Pyx_NAMESTR("arrmap_int32"), (PyCFunction)__pyx_pw_6pandas_5algos_217arrmap_int32, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_217arrmap_int32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_index = 0; PyObject *__pyx_v_func = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("arrmap_int32 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_index,&__pyx_n_s_func,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_index)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_func)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("arrmap_int32", 1, 2, 2, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2176; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "arrmap_int32") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2176; __pyx_clineno = __LINE__; goto __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_index = ((PyArrayObject *)values[0]); __pyx_v_func = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("arrmap_int32", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2176; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.arrmap_int32", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_index), __pyx_ptype_5numpy_ndarray, 1, "index", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2176; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_216arrmap_int32(__pyx_self, __pyx_v_index, __pyx_v_func); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5algos_216arrmap_int32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_index, PyObject *__pyx_v_func) { Py_ssize_t __pyx_v_length; Py_ssize_t __pyx_v_i; PyArrayObject *__pyx_v_result = 0; PyObject *__pyx_v_maybe_convert_objects = NULL; __Pyx_LocalBuf_ND __pyx_pybuffernd_index; __Pyx_Buffer __pyx_pybuffer_index; __Pyx_LocalBuf_ND __pyx_pybuffernd_result; __Pyx_Buffer __pyx_pybuffer_result; 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; Py_ssize_t __pyx_t_7; Py_ssize_t __pyx_t_8; Py_ssize_t __pyx_t_9; Py_ssize_t __pyx_t_10; PyObject **__pyx_t_11; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("arrmap_int32", 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_index.pybuffer.buf = NULL; __pyx_pybuffer_index.refcount = 0; __pyx_pybuffernd_index.data = NULL; __pyx_pybuffernd_index.rcbuffer = &__pyx_pybuffer_index; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_index.rcbuffer->pybuffer, (PyObject*)__pyx_v_index, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2176; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_index.diminfo[0].strides = __pyx_pybuffernd_index.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_index.diminfo[0].shape = __pyx_pybuffernd_index.rcbuffer->pybuffer.shape[0]; /* "pandas/src/generated.pyx":2177 * @cython.boundscheck(False) * def arrmap_int32(ndarray[int32_t] index, object func): * cdef Py_ssize_t length = index.shape[0] # <<<<<<<<<<<<<< * cdef Py_ssize_t i = 0 * */ __pyx_v_length = (__pyx_v_index->dimensions[0]); /* "pandas/src/generated.pyx":2178 * def arrmap_int32(ndarray[int32_t] index, object func): * cdef Py_ssize_t length = index.shape[0] * cdef Py_ssize_t i = 0 # <<<<<<<<<<<<<< * * cdef ndarray[object] result = np.empty(length, dtype=np.object_) */ __pyx_v_i = 0; /* "pandas/src/generated.pyx":2180 * cdef Py_ssize_t i = 0 * * cdef ndarray[object] result = np.empty(length, dtype=np.object_) # <<<<<<<<<<<<<< * * from pandas.lib import maybe_convert_objects */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2180; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 2180; __pyx_clineno = __LINE__; goto __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_length); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2180; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2180; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2180; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2180; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_object_2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2180; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 2180; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyObject_Call(__pyx_t_2, __pyx_t_3, __pyx_t_1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2180; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 2180; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_6 = ((PyArrayObject *)__pyx_t_5); { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { __pyx_v_result = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_result.rcbuffer->pybuffer.buf = NULL; {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2180; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } else {__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]; } } __pyx_t_6 = 0; __pyx_v_result = ((PyArrayObject *)__pyx_t_5); __pyx_t_5 = 0; /* "pandas/src/generated.pyx":2182 * cdef ndarray[object] result = np.empty(length, dtype=np.object_) * * from pandas.lib import maybe_convert_objects # <<<<<<<<<<<<<< * * for i in range(length): */ __pyx_t_5 = PyList_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2182; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_n_s_maybe_convert_objects); PyList_SET_ITEM(__pyx_t_5, 0, __pyx_n_s_maybe_convert_objects); __Pyx_GIVEREF(__pyx_n_s_maybe_convert_objects); __pyx_t_1 = __Pyx_Import(__pyx_n_s_pandas_lib, __pyx_t_5, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2182; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_maybe_convert_objects); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2182; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_t_5); __pyx_v_maybe_convert_objects = __pyx_t_5; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/generated.pyx":2184 * from pandas.lib import maybe_convert_objects * * for i in range(length): # <<<<<<<<<<<<<< * result[i] = func(index[i]) * */ __pyx_t_7 = __pyx_v_length; for (__pyx_t_8 = 0; __pyx_t_8 < __pyx_t_7; __pyx_t_8+=1) { __pyx_v_i = __pyx_t_8; /* "pandas/src/generated.pyx":2185 * * for i in range(length): * result[i] = func(index[i]) # <<<<<<<<<<<<<< * * return maybe_convert_objects(result) */ __pyx_t_9 = __pyx_v_i; __pyx_t_1 = __Pyx_PyInt_From_npy_int32((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_index.rcbuffer->pybuffer.buf, __pyx_t_9, __pyx_pybuffernd_index.diminfo[0].strides))); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2185; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2185; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyObject_Call(__pyx_v_func, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2185; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_10 = __pyx_v_i; __pyx_t_11 = __Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_10, __pyx_pybuffernd_result.diminfo[0].strides); __Pyx_GOTREF(*__pyx_t_11); __Pyx_INCREF(__pyx_t_1); __Pyx_DECREF(*__pyx_t_11); *__pyx_t_11 = __pyx_t_1; __Pyx_GIVEREF(*__pyx_t_11); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } /* "pandas/src/generated.pyx":2187 * result[i] = func(index[i]) * * return maybe_convert_objects(result) # <<<<<<<<<<<<<< * * @cython.wraparound(False) */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2187; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)__pyx_v_result)); PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_result)); __Pyx_GIVEREF(((PyObject *)__pyx_v_result)); __pyx_t_5 = PyObject_Call(__pyx_v_maybe_convert_objects, __pyx_t_1, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2187; __pyx_clineno = __LINE__; goto __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/src/generated.pyx":2176 * @cython.wraparound(False) * @cython.boundscheck(False) * def arrmap_int32(ndarray[int32_t] index, object func): # <<<<<<<<<<<<<< * cdef Py_ssize_t length = index.shape[0] * cdef Py_ssize_t i = 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_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_index.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.arrmap_int32", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_index.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_result); __Pyx_XDECREF(__pyx_v_maybe_convert_objects); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":2191 * @cython.wraparound(False) * @cython.boundscheck(False) * def arrmap_int64(ndarray[int64_t] index, object func): # <<<<<<<<<<<<<< * cdef Py_ssize_t length = index.shape[0] * cdef Py_ssize_t i = 0 */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_219arrmap_int64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_219arrmap_int64 = {__Pyx_NAMESTR("arrmap_int64"), (PyCFunction)__pyx_pw_6pandas_5algos_219arrmap_int64, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_219arrmap_int64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_index = 0; PyObject *__pyx_v_func = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("arrmap_int64 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_index,&__pyx_n_s_func,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_index)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_func)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("arrmap_int64", 1, 2, 2, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2191; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "arrmap_int64") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2191; __pyx_clineno = __LINE__; goto __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_index = ((PyArrayObject *)values[0]); __pyx_v_func = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("arrmap_int64", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2191; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.arrmap_int64", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_index), __pyx_ptype_5numpy_ndarray, 1, "index", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2191; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_218arrmap_int64(__pyx_self, __pyx_v_index, __pyx_v_func); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5algos_218arrmap_int64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_index, PyObject *__pyx_v_func) { Py_ssize_t __pyx_v_length; Py_ssize_t __pyx_v_i; PyArrayObject *__pyx_v_result = 0; PyObject *__pyx_v_maybe_convert_objects = NULL; __Pyx_LocalBuf_ND __pyx_pybuffernd_index; __Pyx_Buffer __pyx_pybuffer_index; __Pyx_LocalBuf_ND __pyx_pybuffernd_result; __Pyx_Buffer __pyx_pybuffer_result; 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; Py_ssize_t __pyx_t_7; Py_ssize_t __pyx_t_8; Py_ssize_t __pyx_t_9; Py_ssize_t __pyx_t_10; PyObject **__pyx_t_11; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("arrmap_int64", 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_index.pybuffer.buf = NULL; __pyx_pybuffer_index.refcount = 0; __pyx_pybuffernd_index.data = NULL; __pyx_pybuffernd_index.rcbuffer = &__pyx_pybuffer_index; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_index.rcbuffer->pybuffer, (PyObject*)__pyx_v_index, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2191; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_index.diminfo[0].strides = __pyx_pybuffernd_index.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_index.diminfo[0].shape = __pyx_pybuffernd_index.rcbuffer->pybuffer.shape[0]; /* "pandas/src/generated.pyx":2192 * @cython.boundscheck(False) * def arrmap_int64(ndarray[int64_t] index, object func): * cdef Py_ssize_t length = index.shape[0] # <<<<<<<<<<<<<< * cdef Py_ssize_t i = 0 * */ __pyx_v_length = (__pyx_v_index->dimensions[0]); /* "pandas/src/generated.pyx":2193 * def arrmap_int64(ndarray[int64_t] index, object func): * cdef Py_ssize_t length = index.shape[0] * cdef Py_ssize_t i = 0 # <<<<<<<<<<<<<< * * cdef ndarray[object] result = np.empty(length, dtype=np.object_) */ __pyx_v_i = 0; /* "pandas/src/generated.pyx":2195 * cdef Py_ssize_t i = 0 * * cdef ndarray[object] result = np.empty(length, dtype=np.object_) # <<<<<<<<<<<<<< * * from pandas.lib import maybe_convert_objects */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2195; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 2195; __pyx_clineno = __LINE__; goto __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_length); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2195; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2195; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2195; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2195; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_object_2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2195; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 2195; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyObject_Call(__pyx_t_2, __pyx_t_3, __pyx_t_1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2195; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 2195; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_6 = ((PyArrayObject *)__pyx_t_5); { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { __pyx_v_result = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_result.rcbuffer->pybuffer.buf = NULL; {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2195; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } else {__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]; } } __pyx_t_6 = 0; __pyx_v_result = ((PyArrayObject *)__pyx_t_5); __pyx_t_5 = 0; /* "pandas/src/generated.pyx":2197 * cdef ndarray[object] result = np.empty(length, dtype=np.object_) * * from pandas.lib import maybe_convert_objects # <<<<<<<<<<<<<< * * for i in range(length): */ __pyx_t_5 = PyList_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2197; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_n_s_maybe_convert_objects); PyList_SET_ITEM(__pyx_t_5, 0, __pyx_n_s_maybe_convert_objects); __Pyx_GIVEREF(__pyx_n_s_maybe_convert_objects); __pyx_t_1 = __Pyx_Import(__pyx_n_s_pandas_lib, __pyx_t_5, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2197; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_maybe_convert_objects); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2197; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_t_5); __pyx_v_maybe_convert_objects = __pyx_t_5; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/generated.pyx":2199 * from pandas.lib import maybe_convert_objects * * for i in range(length): # <<<<<<<<<<<<<< * result[i] = func(index[i]) * */ __pyx_t_7 = __pyx_v_length; for (__pyx_t_8 = 0; __pyx_t_8 < __pyx_t_7; __pyx_t_8+=1) { __pyx_v_i = __pyx_t_8; /* "pandas/src/generated.pyx":2200 * * for i in range(length): * result[i] = func(index[i]) # <<<<<<<<<<<<<< * * return maybe_convert_objects(result) */ __pyx_t_9 = __pyx_v_i; __pyx_t_1 = __Pyx_PyInt_From_npy_int64((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_index.rcbuffer->pybuffer.buf, __pyx_t_9, __pyx_pybuffernd_index.diminfo[0].strides))); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2200; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2200; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyObject_Call(__pyx_v_func, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2200; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_10 = __pyx_v_i; __pyx_t_11 = __Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_10, __pyx_pybuffernd_result.diminfo[0].strides); __Pyx_GOTREF(*__pyx_t_11); __Pyx_INCREF(__pyx_t_1); __Pyx_DECREF(*__pyx_t_11); *__pyx_t_11 = __pyx_t_1; __Pyx_GIVEREF(*__pyx_t_11); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } /* "pandas/src/generated.pyx":2202 * result[i] = func(index[i]) * * return maybe_convert_objects(result) # <<<<<<<<<<<<<< * * @cython.wraparound(False) */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2202; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)__pyx_v_result)); PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_result)); __Pyx_GIVEREF(((PyObject *)__pyx_v_result)); __pyx_t_5 = PyObject_Call(__pyx_v_maybe_convert_objects, __pyx_t_1, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2202; __pyx_clineno = __LINE__; goto __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/src/generated.pyx":2191 * @cython.wraparound(False) * @cython.boundscheck(False) * def arrmap_int64(ndarray[int64_t] index, object func): # <<<<<<<<<<<<<< * cdef Py_ssize_t length = index.shape[0] * cdef Py_ssize_t i = 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_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_index.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.arrmap_int64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_index.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_result); __Pyx_XDECREF(__pyx_v_maybe_convert_objects); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":2206 * @cython.wraparound(False) * @cython.boundscheck(False) * def arrmap_bool(ndarray[uint8_t] index, object func): # <<<<<<<<<<<<<< * cdef Py_ssize_t length = index.shape[0] * cdef Py_ssize_t i = 0 */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_221arrmap_bool(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_221arrmap_bool = {__Pyx_NAMESTR("arrmap_bool"), (PyCFunction)__pyx_pw_6pandas_5algos_221arrmap_bool, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_221arrmap_bool(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_index = 0; PyObject *__pyx_v_func = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("arrmap_bool (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_index,&__pyx_n_s_func,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_index)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_func)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("arrmap_bool", 1, 2, 2, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2206; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "arrmap_bool") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2206; __pyx_clineno = __LINE__; goto __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_index = ((PyArrayObject *)values[0]); __pyx_v_func = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("arrmap_bool", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2206; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.arrmap_bool", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_index), __pyx_ptype_5numpy_ndarray, 1, "index", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2206; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_220arrmap_bool(__pyx_self, __pyx_v_index, __pyx_v_func); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5algos_220arrmap_bool(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_index, PyObject *__pyx_v_func) { Py_ssize_t __pyx_v_length; Py_ssize_t __pyx_v_i; PyArrayObject *__pyx_v_result = 0; PyObject *__pyx_v_maybe_convert_objects = NULL; __Pyx_LocalBuf_ND __pyx_pybuffernd_index; __Pyx_Buffer __pyx_pybuffer_index; __Pyx_LocalBuf_ND __pyx_pybuffernd_result; __Pyx_Buffer __pyx_pybuffer_result; 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; Py_ssize_t __pyx_t_7; Py_ssize_t __pyx_t_8; Py_ssize_t __pyx_t_9; Py_ssize_t __pyx_t_10; PyObject **__pyx_t_11; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("arrmap_bool", 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_index.pybuffer.buf = NULL; __pyx_pybuffer_index.refcount = 0; __pyx_pybuffernd_index.data = NULL; __pyx_pybuffernd_index.rcbuffer = &__pyx_pybuffer_index; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_index.rcbuffer->pybuffer, (PyObject*)__pyx_v_index, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2206; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_index.diminfo[0].strides = __pyx_pybuffernd_index.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_index.diminfo[0].shape = __pyx_pybuffernd_index.rcbuffer->pybuffer.shape[0]; /* "pandas/src/generated.pyx":2207 * @cython.boundscheck(False) * def arrmap_bool(ndarray[uint8_t] index, object func): * cdef Py_ssize_t length = index.shape[0] # <<<<<<<<<<<<<< * cdef Py_ssize_t i = 0 * */ __pyx_v_length = (__pyx_v_index->dimensions[0]); /* "pandas/src/generated.pyx":2208 * def arrmap_bool(ndarray[uint8_t] index, object func): * cdef Py_ssize_t length = index.shape[0] * cdef Py_ssize_t i = 0 # <<<<<<<<<<<<<< * * cdef ndarray[object] result = np.empty(length, dtype=np.object_) */ __pyx_v_i = 0; /* "pandas/src/generated.pyx":2210 * cdef Py_ssize_t i = 0 * * cdef ndarray[object] result = np.empty(length, dtype=np.object_) # <<<<<<<<<<<<<< * * from pandas.lib import maybe_convert_objects */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2210; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 2210; __pyx_clineno = __LINE__; goto __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_length); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2210; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2210; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2210; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2210; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_object_2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2210; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 2210; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyObject_Call(__pyx_t_2, __pyx_t_3, __pyx_t_1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2210; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 2210; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_6 = ((PyArrayObject *)__pyx_t_5); { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { __pyx_v_result = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_result.rcbuffer->pybuffer.buf = NULL; {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2210; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } else {__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]; } } __pyx_t_6 = 0; __pyx_v_result = ((PyArrayObject *)__pyx_t_5); __pyx_t_5 = 0; /* "pandas/src/generated.pyx":2212 * cdef ndarray[object] result = np.empty(length, dtype=np.object_) * * from pandas.lib import maybe_convert_objects # <<<<<<<<<<<<<< * * for i in range(length): */ __pyx_t_5 = PyList_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2212; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_n_s_maybe_convert_objects); PyList_SET_ITEM(__pyx_t_5, 0, __pyx_n_s_maybe_convert_objects); __Pyx_GIVEREF(__pyx_n_s_maybe_convert_objects); __pyx_t_1 = __Pyx_Import(__pyx_n_s_pandas_lib, __pyx_t_5, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2212; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_maybe_convert_objects); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2212; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_t_5); __pyx_v_maybe_convert_objects = __pyx_t_5; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/generated.pyx":2214 * from pandas.lib import maybe_convert_objects * * for i in range(length): # <<<<<<<<<<<<<< * result[i] = func(index[i]) * */ __pyx_t_7 = __pyx_v_length; for (__pyx_t_8 = 0; __pyx_t_8 < __pyx_t_7; __pyx_t_8+=1) { __pyx_v_i = __pyx_t_8; /* "pandas/src/generated.pyx":2215 * * for i in range(length): * result[i] = func(index[i]) # <<<<<<<<<<<<<< * * return maybe_convert_objects(result) */ __pyx_t_9 = __pyx_v_i; __pyx_t_1 = __Pyx_PyInt_From_npy_uint8((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_index.rcbuffer->pybuffer.buf, __pyx_t_9, __pyx_pybuffernd_index.diminfo[0].strides))); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2215; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2215; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyObject_Call(__pyx_v_func, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2215; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_10 = __pyx_v_i; __pyx_t_11 = __Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_10, __pyx_pybuffernd_result.diminfo[0].strides); __Pyx_GOTREF(*__pyx_t_11); __Pyx_INCREF(__pyx_t_1); __Pyx_DECREF(*__pyx_t_11); *__pyx_t_11 = __pyx_t_1; __Pyx_GIVEREF(*__pyx_t_11); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } /* "pandas/src/generated.pyx":2217 * result[i] = func(index[i]) * * return maybe_convert_objects(result) # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2217; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)__pyx_v_result)); PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_result)); __Pyx_GIVEREF(((PyObject *)__pyx_v_result)); __pyx_t_5 = PyObject_Call(__pyx_v_maybe_convert_objects, __pyx_t_1, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2217; __pyx_clineno = __LINE__; goto __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/src/generated.pyx":2206 * @cython.wraparound(False) * @cython.boundscheck(False) * def arrmap_bool(ndarray[uint8_t] index, object func): # <<<<<<<<<<<<<< * cdef Py_ssize_t length = index.shape[0] * cdef Py_ssize_t i = 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_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_index.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.arrmap_bool", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_index.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_result); __Pyx_XDECREF(__pyx_v_maybe_convert_objects); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":2221 * * @cython.wraparound(False) * def take_1d_bool_bool(ndarray[uint8_t] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[uint8_t] out, */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_223take_1d_bool_bool(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_223take_1d_bool_bool = {__Pyx_NAMESTR("take_1d_bool_bool"), (PyCFunction)__pyx_pw_6pandas_5algos_223take_1d_bool_bool, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_223take_1d_bool_bool(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_values = 0; PyArrayObject *__pyx_v_indexer = 0; PyArrayObject *__pyx_v_out = 0; PyObject *__pyx_v_fill_value = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("take_1d_bool_bool (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_values,&__pyx_n_s_indexer,&__pyx_n_s_out,&__pyx_n_s_fill_value,0}; PyObject* values[4] = {0,0,0,0}; values[3] = __pyx_k__101; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_values)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_indexer)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_1d_bool_bool", 0, 3, 4, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2221; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_out)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_1d_bool_bool", 0, 3, 4, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2221; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_fill_value); if (value) { values[3] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "take_1d_bool_bool") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2221; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_values = ((PyArrayObject *)values[0]); __pyx_v_indexer = ((PyArrayObject *)values[1]); __pyx_v_out = ((PyArrayObject *)values[2]); __pyx_v_fill_value = values[3]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("take_1d_bool_bool", 0, 3, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2221; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.take_1d_bool_bool", __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_filename = __pyx_f[2]; __pyx_lineno = 2221; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_indexer), __pyx_ptype_5numpy_ndarray, 1, "indexer", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2222; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_5numpy_ndarray, 1, "out", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2223; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_222take_1d_bool_bool(__pyx_self, __pyx_v_values, __pyx_v_indexer, __pyx_v_out, __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_5algos_222take_1d_bool_bool(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_n; Py_ssize_t __pyx_v_idx; __pyx_t_5numpy_uint8_t __pyx_v_fv; __Pyx_LocalBuf_ND __pyx_pybuffernd_indexer; __Pyx_Buffer __pyx_pybuffer_indexer; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_values; __Pyx_Buffer __pyx_pybuffer_values; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; __pyx_t_5numpy_uint8_t __pyx_t_2; Py_ssize_t __pyx_t_3; int __pyx_t_4; int __pyx_t_5; Py_ssize_t __pyx_t_6; Py_ssize_t __pyx_t_7; Py_ssize_t __pyx_t_8; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("take_1d_bool_bool", 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_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; { __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_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2221; __pyx_clineno = __LINE__; goto __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_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2221; __pyx_clineno = __LINE__; goto __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_BufFmt_StackElem __pyx_stack[1]; 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)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2221; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; /* "pandas/src/generated.pyx":2229 * uint8_t fv * * n = len(indexer) # <<<<<<<<<<<<<< * * fv = fill_value */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_indexer)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2229; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/src/generated.pyx":2231 * n = len(indexer) * * fv = fill_value # <<<<<<<<<<<<<< * for i from 0 <= i < n: * idx = indexer[i] */ __pyx_t_2 = __Pyx_PyInt_As_npy_uint8(__pyx_v_fill_value); if (unlikely((__pyx_t_2 == (npy_uint8)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2231; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_fv = __pyx_t_2; /* "pandas/src/generated.pyx":2232 * * fv = fill_value * for i from 0 <= i < n: # <<<<<<<<<<<<<< * idx = indexer[i] * if idx == -1: */ __pyx_t_1 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_1; __pyx_v_i++) { /* "pandas/src/generated.pyx":2233 * fv = fill_value * for i from 0 <= i < n: * idx = indexer[i] # <<<<<<<<<<<<<< * if idx == -1: * out[i] = fv */ __pyx_t_3 = __pyx_v_i; __pyx_t_4 = -1; if (__pyx_t_3 < 0) { __pyx_t_4 = 0; } else if (unlikely(__pyx_t_3 >= __pyx_pybuffernd_indexer.diminfo[0].shape)) __pyx_t_4 = 0; if (unlikely(__pyx_t_4 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_4); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2233; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_idx = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_3, __pyx_pybuffernd_indexer.diminfo[0].strides)); /* "pandas/src/generated.pyx":2234 * for i from 0 <= i < n: * idx = indexer[i] * if idx == -1: # <<<<<<<<<<<<<< * out[i] = fv * else: */ __pyx_t_5 = ((__pyx_v_idx == -1) != 0); if (__pyx_t_5) { /* "pandas/src/generated.pyx":2235 * idx = indexer[i] * if idx == -1: * out[i] = fv # <<<<<<<<<<<<<< * else: * out[i] = values[idx] */ __pyx_t_6 = __pyx_v_i; __pyx_t_4 = -1; if (__pyx_t_6 < 0) { __pyx_t_4 = 0; } else if (unlikely(__pyx_t_6 >= __pyx_pybuffernd_out.diminfo[0].shape)) __pyx_t_4 = 0; if (unlikely(__pyx_t_4 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_4); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2235; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_6, __pyx_pybuffernd_out.diminfo[0].strides) = __pyx_v_fv; goto __pyx_L5; } /*else*/ { /* "pandas/src/generated.pyx":2237 * out[i] = fv * else: * out[i] = values[idx] # <<<<<<<<<<<<<< * * @cython.wraparound(False) */ __pyx_t_7 = __pyx_v_idx; __pyx_t_4 = -1; if (__pyx_t_7 < 0) { __pyx_t_4 = 0; } else if (unlikely(__pyx_t_7 >= __pyx_pybuffernd_values.diminfo[0].shape)) __pyx_t_4 = 0; if (unlikely(__pyx_t_4 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_4); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2237; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_8 = __pyx_v_i; __pyx_t_4 = -1; if (__pyx_t_8 < 0) { __pyx_t_4 = 0; } else if (unlikely(__pyx_t_8 >= __pyx_pybuffernd_out.diminfo[0].shape)) __pyx_t_4 = 0; if (unlikely(__pyx_t_4 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_4); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2237; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_8, __pyx_pybuffernd_out.diminfo[0].strides) = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_7, __pyx_pybuffernd_values.diminfo[0].strides)); } __pyx_L5:; } /* "pandas/src/generated.pyx":2221 * * @cython.wraparound(False) * def take_1d_bool_bool(ndarray[uint8_t] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[uint8_t] out, */ /* 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_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.take_1d_bool_bool", __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_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":2240 * * @cython.wraparound(False) * def take_1d_bool_object(ndarray[uint8_t] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[object] out, */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_225take_1d_bool_object(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_225take_1d_bool_object = {__Pyx_NAMESTR("take_1d_bool_object"), (PyCFunction)__pyx_pw_6pandas_5algos_225take_1d_bool_object, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_225take_1d_bool_object(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_values = 0; PyArrayObject *__pyx_v_indexer = 0; PyArrayObject *__pyx_v_out = 0; PyObject *__pyx_v_fill_value = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("take_1d_bool_object (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_values,&__pyx_n_s_indexer,&__pyx_n_s_out,&__pyx_n_s_fill_value,0}; PyObject* values[4] = {0,0,0,0}; values[3] = __pyx_k__102; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_values)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_indexer)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_1d_bool_object", 0, 3, 4, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2240; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_out)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_1d_bool_object", 0, 3, 4, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2240; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_fill_value); if (value) { values[3] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "take_1d_bool_object") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2240; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_values = ((PyArrayObject *)values[0]); __pyx_v_indexer = ((PyArrayObject *)values[1]); __pyx_v_out = ((PyArrayObject *)values[2]); __pyx_v_fill_value = values[3]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("take_1d_bool_object", 0, 3, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2240; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.take_1d_bool_object", __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_filename = __pyx_f[2]; __pyx_lineno = 2240; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_indexer), __pyx_ptype_5numpy_ndarray, 1, "indexer", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2241; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_5numpy_ndarray, 1, "out", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2242; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_224take_1d_bool_object(__pyx_self, __pyx_v_values, __pyx_v_indexer, __pyx_v_out, __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_5algos_224take_1d_bool_object(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_n; Py_ssize_t __pyx_v_idx; PyObject *__pyx_v_fv = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_indexer; __Pyx_Buffer __pyx_pybuffer_indexer; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_values; __Pyx_Buffer __pyx_pybuffer_values; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; Py_ssize_t __pyx_t_2; int __pyx_t_3; int __pyx_t_4; Py_ssize_t __pyx_t_5; PyObject **__pyx_t_6; PyObject *__pyx_t_7 = NULL; Py_ssize_t __pyx_t_8; Py_ssize_t __pyx_t_9; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("take_1d_bool_object", 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_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; { __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_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2240; __pyx_clineno = __LINE__; goto __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_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2240; __pyx_clineno = __LINE__; goto __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_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_v_out, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2240; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; /* "pandas/src/generated.pyx":2248 * object fv * * n = len(indexer) # <<<<<<<<<<<<<< * * fv = fill_value */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_indexer)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2248; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/src/generated.pyx":2250 * n = len(indexer) * * fv = fill_value # <<<<<<<<<<<<<< * for i from 0 <= i < n: * idx = indexer[i] */ __Pyx_INCREF(__pyx_v_fill_value); __pyx_v_fv = __pyx_v_fill_value; /* "pandas/src/generated.pyx":2251 * * fv = fill_value * for i from 0 <= i < n: # <<<<<<<<<<<<<< * idx = indexer[i] * if idx == -1: */ __pyx_t_1 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_1; __pyx_v_i++) { /* "pandas/src/generated.pyx":2252 * fv = fill_value * for i from 0 <= i < n: * idx = indexer[i] # <<<<<<<<<<<<<< * if idx == -1: * out[i] = fv */ __pyx_t_2 = __pyx_v_i; __pyx_t_3 = -1; if (__pyx_t_2 < 0) { __pyx_t_3 = 0; } else if (unlikely(__pyx_t_2 >= __pyx_pybuffernd_indexer.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2252; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_idx = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_2, __pyx_pybuffernd_indexer.diminfo[0].strides)); /* "pandas/src/generated.pyx":2253 * for i from 0 <= i < n: * idx = indexer[i] * if idx == -1: # <<<<<<<<<<<<<< * out[i] = fv * else: */ __pyx_t_4 = ((__pyx_v_idx == -1) != 0); if (__pyx_t_4) { /* "pandas/src/generated.pyx":2254 * idx = indexer[i] * if idx == -1: * out[i] = fv # <<<<<<<<<<<<<< * else: * out[i] = True if values[idx] > 0 else False */ __pyx_t_5 = __pyx_v_i; __pyx_t_3 = -1; if (__pyx_t_5 < 0) { __pyx_t_3 = 0; } else if (unlikely(__pyx_t_5 >= __pyx_pybuffernd_out.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2254; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_6 = __Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_5, __pyx_pybuffernd_out.diminfo[0].strides); __Pyx_GOTREF(*__pyx_t_6); __Pyx_INCREF(__pyx_v_fv); __Pyx_DECREF(*__pyx_t_6); *__pyx_t_6 = __pyx_v_fv; __Pyx_GIVEREF(*__pyx_t_6); goto __pyx_L5; } /*else*/ { /* "pandas/src/generated.pyx":2256 * out[i] = fv * else: * out[i] = True if values[idx] > 0 else False # <<<<<<<<<<<<<< * * @cython.wraparound(False) */ __pyx_t_8 = __pyx_v_idx; __pyx_t_3 = -1; if (__pyx_t_8 < 0) { __pyx_t_3 = 0; } else if (unlikely(__pyx_t_8 >= __pyx_pybuffernd_values.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2256; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } if ((((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_8, __pyx_pybuffernd_values.diminfo[0].strides)) > 0) != 0)) { __Pyx_INCREF(Py_True); __pyx_t_7 = Py_True; } else { __Pyx_INCREF(Py_False); __pyx_t_7 = Py_False; } __pyx_t_9 = __pyx_v_i; __pyx_t_3 = -1; if (__pyx_t_9 < 0) { __pyx_t_3 = 0; } else if (unlikely(__pyx_t_9 >= __pyx_pybuffernd_out.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2256; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_6 = __Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_9, __pyx_pybuffernd_out.diminfo[0].strides); __Pyx_GOTREF(*__pyx_t_6); __Pyx_INCREF(__pyx_t_7); __Pyx_DECREF(*__pyx_t_6); *__pyx_t_6 = __pyx_t_7; __Pyx_GIVEREF(*__pyx_t_6); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } __pyx_L5:; } /* "pandas/src/generated.pyx":2240 * * @cython.wraparound(False) * def take_1d_bool_object(ndarray[uint8_t] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[object] out, */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_7); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.take_1d_bool_object", __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_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF(__pyx_v_fv); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":2259 * * @cython.wraparound(False) * def take_1d_int8_int8(ndarray[int8_t] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[int8_t] out, */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_227take_1d_int8_int8(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_227take_1d_int8_int8 = {__Pyx_NAMESTR("take_1d_int8_int8"), (PyCFunction)__pyx_pw_6pandas_5algos_227take_1d_int8_int8, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_227take_1d_int8_int8(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_values = 0; PyArrayObject *__pyx_v_indexer = 0; PyArrayObject *__pyx_v_out = 0; PyObject *__pyx_v_fill_value = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("take_1d_int8_int8 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_values,&__pyx_n_s_indexer,&__pyx_n_s_out,&__pyx_n_s_fill_value,0}; PyObject* values[4] = {0,0,0,0}; values[3] = __pyx_k__103; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_values)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_indexer)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_1d_int8_int8", 0, 3, 4, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2259; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_out)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_1d_int8_int8", 0, 3, 4, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2259; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_fill_value); if (value) { values[3] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "take_1d_int8_int8") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2259; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_values = ((PyArrayObject *)values[0]); __pyx_v_indexer = ((PyArrayObject *)values[1]); __pyx_v_out = ((PyArrayObject *)values[2]); __pyx_v_fill_value = values[3]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("take_1d_int8_int8", 0, 3, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2259; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.take_1d_int8_int8", __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_filename = __pyx_f[2]; __pyx_lineno = 2259; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_indexer), __pyx_ptype_5numpy_ndarray, 1, "indexer", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2260; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_5numpy_ndarray, 1, "out", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2261; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_226take_1d_int8_int8(__pyx_self, __pyx_v_values, __pyx_v_indexer, __pyx_v_out, __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_5algos_226take_1d_int8_int8(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_n; Py_ssize_t __pyx_v_idx; __pyx_t_5numpy_int8_t __pyx_v_fv; __Pyx_LocalBuf_ND __pyx_pybuffernd_indexer; __Pyx_Buffer __pyx_pybuffer_indexer; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_values; __Pyx_Buffer __pyx_pybuffer_values; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; __pyx_t_5numpy_int8_t __pyx_t_2; Py_ssize_t __pyx_t_3; int __pyx_t_4; int __pyx_t_5; Py_ssize_t __pyx_t_6; Py_ssize_t __pyx_t_7; Py_ssize_t __pyx_t_8; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("take_1d_int8_int8", 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_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; { __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_int8_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2259; __pyx_clineno = __LINE__; goto __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_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2259; __pyx_clineno = __LINE__; goto __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_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_v_out, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int8_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2259; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; /* "pandas/src/generated.pyx":2267 * int8_t fv * * n = len(indexer) # <<<<<<<<<<<<<< * * fv = fill_value */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_indexer)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2267; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/src/generated.pyx":2269 * n = len(indexer) * * fv = fill_value # <<<<<<<<<<<<<< * for i from 0 <= i < n: * idx = indexer[i] */ __pyx_t_2 = __Pyx_PyInt_As_npy_int8(__pyx_v_fill_value); if (unlikely((__pyx_t_2 == (npy_int8)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2269; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_fv = __pyx_t_2; /* "pandas/src/generated.pyx":2270 * * fv = fill_value * for i from 0 <= i < n: # <<<<<<<<<<<<<< * idx = indexer[i] * if idx == -1: */ __pyx_t_1 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_1; __pyx_v_i++) { /* "pandas/src/generated.pyx":2271 * fv = fill_value * for i from 0 <= i < n: * idx = indexer[i] # <<<<<<<<<<<<<< * if idx == -1: * out[i] = fv */ __pyx_t_3 = __pyx_v_i; __pyx_t_4 = -1; if (__pyx_t_3 < 0) { __pyx_t_4 = 0; } else if (unlikely(__pyx_t_3 >= __pyx_pybuffernd_indexer.diminfo[0].shape)) __pyx_t_4 = 0; if (unlikely(__pyx_t_4 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_4); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2271; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_idx = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_3, __pyx_pybuffernd_indexer.diminfo[0].strides)); /* "pandas/src/generated.pyx":2272 * for i from 0 <= i < n: * idx = indexer[i] * if idx == -1: # <<<<<<<<<<<<<< * out[i] = fv * else: */ __pyx_t_5 = ((__pyx_v_idx == -1) != 0); if (__pyx_t_5) { /* "pandas/src/generated.pyx":2273 * idx = indexer[i] * if idx == -1: * out[i] = fv # <<<<<<<<<<<<<< * else: * out[i] = values[idx] */ __pyx_t_6 = __pyx_v_i; __pyx_t_4 = -1; if (__pyx_t_6 < 0) { __pyx_t_4 = 0; } else if (unlikely(__pyx_t_6 >= __pyx_pybuffernd_out.diminfo[0].shape)) __pyx_t_4 = 0; if (unlikely(__pyx_t_4 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_4); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2273; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int8_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_6, __pyx_pybuffernd_out.diminfo[0].strides) = __pyx_v_fv; goto __pyx_L5; } /*else*/ { /* "pandas/src/generated.pyx":2275 * out[i] = fv * else: * out[i] = values[idx] # <<<<<<<<<<<<<< * * @cython.wraparound(False) */ __pyx_t_7 = __pyx_v_idx; __pyx_t_4 = -1; if (__pyx_t_7 < 0) { __pyx_t_4 = 0; } else if (unlikely(__pyx_t_7 >= __pyx_pybuffernd_values.diminfo[0].shape)) __pyx_t_4 = 0; if (unlikely(__pyx_t_4 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_4); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2275; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_8 = __pyx_v_i; __pyx_t_4 = -1; if (__pyx_t_8 < 0) { __pyx_t_4 = 0; } else if (unlikely(__pyx_t_8 >= __pyx_pybuffernd_out.diminfo[0].shape)) __pyx_t_4 = 0; if (unlikely(__pyx_t_4 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_4); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2275; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int8_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_8, __pyx_pybuffernd_out.diminfo[0].strides) = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int8_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_7, __pyx_pybuffernd_values.diminfo[0].strides)); } __pyx_L5:; } /* "pandas/src/generated.pyx":2259 * * @cython.wraparound(False) * def take_1d_int8_int8(ndarray[int8_t] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[int8_t] out, */ /* 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_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.take_1d_int8_int8", __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_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":2278 * * @cython.wraparound(False) * def take_1d_int8_int32(ndarray[int8_t] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[int32_t] out, */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_229take_1d_int8_int32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_229take_1d_int8_int32 = {__Pyx_NAMESTR("take_1d_int8_int32"), (PyCFunction)__pyx_pw_6pandas_5algos_229take_1d_int8_int32, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_229take_1d_int8_int32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_values = 0; PyArrayObject *__pyx_v_indexer = 0; PyArrayObject *__pyx_v_out = 0; PyObject *__pyx_v_fill_value = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("take_1d_int8_int32 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_values,&__pyx_n_s_indexer,&__pyx_n_s_out,&__pyx_n_s_fill_value,0}; PyObject* values[4] = {0,0,0,0}; values[3] = __pyx_k__104; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_values)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_indexer)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_1d_int8_int32", 0, 3, 4, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2278; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_out)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_1d_int8_int32", 0, 3, 4, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2278; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_fill_value); if (value) { values[3] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "take_1d_int8_int32") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2278; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_values = ((PyArrayObject *)values[0]); __pyx_v_indexer = ((PyArrayObject *)values[1]); __pyx_v_out = ((PyArrayObject *)values[2]); __pyx_v_fill_value = values[3]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("take_1d_int8_int32", 0, 3, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2278; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.take_1d_int8_int32", __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_filename = __pyx_f[2]; __pyx_lineno = 2278; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_indexer), __pyx_ptype_5numpy_ndarray, 1, "indexer", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2279; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_5numpy_ndarray, 1, "out", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2280; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_228take_1d_int8_int32(__pyx_self, __pyx_v_values, __pyx_v_indexer, __pyx_v_out, __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_5algos_228take_1d_int8_int32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_n; Py_ssize_t __pyx_v_idx; __pyx_t_5numpy_int32_t __pyx_v_fv; __Pyx_LocalBuf_ND __pyx_pybuffernd_indexer; __Pyx_Buffer __pyx_pybuffer_indexer; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_values; __Pyx_Buffer __pyx_pybuffer_values; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; __pyx_t_5numpy_int32_t __pyx_t_2; Py_ssize_t __pyx_t_3; int __pyx_t_4; int __pyx_t_5; Py_ssize_t __pyx_t_6; Py_ssize_t __pyx_t_7; Py_ssize_t __pyx_t_8; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("take_1d_int8_int32", 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_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; { __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_int8_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2278; __pyx_clineno = __LINE__; goto __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_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2278; __pyx_clineno = __LINE__; goto __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_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_v_out, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2278; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; /* "pandas/src/generated.pyx":2286 * int32_t fv * * n = len(indexer) # <<<<<<<<<<<<<< * * fv = fill_value */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_indexer)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2286; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/src/generated.pyx":2288 * n = len(indexer) * * fv = fill_value # <<<<<<<<<<<<<< * for i from 0 <= i < n: * idx = indexer[i] */ __pyx_t_2 = __Pyx_PyInt_As_npy_int32(__pyx_v_fill_value); if (unlikely((__pyx_t_2 == (npy_int32)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2288; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_fv = __pyx_t_2; /* "pandas/src/generated.pyx":2289 * * fv = fill_value * for i from 0 <= i < n: # <<<<<<<<<<<<<< * idx = indexer[i] * if idx == -1: */ __pyx_t_1 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_1; __pyx_v_i++) { /* "pandas/src/generated.pyx":2290 * fv = fill_value * for i from 0 <= i < n: * idx = indexer[i] # <<<<<<<<<<<<<< * if idx == -1: * out[i] = fv */ __pyx_t_3 = __pyx_v_i; __pyx_t_4 = -1; if (__pyx_t_3 < 0) { __pyx_t_4 = 0; } else if (unlikely(__pyx_t_3 >= __pyx_pybuffernd_indexer.diminfo[0].shape)) __pyx_t_4 = 0; if (unlikely(__pyx_t_4 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_4); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2290; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_idx = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_3, __pyx_pybuffernd_indexer.diminfo[0].strides)); /* "pandas/src/generated.pyx":2291 * for i from 0 <= i < n: * idx = indexer[i] * if idx == -1: # <<<<<<<<<<<<<< * out[i] = fv * else: */ __pyx_t_5 = ((__pyx_v_idx == -1) != 0); if (__pyx_t_5) { /* "pandas/src/generated.pyx":2292 * idx = indexer[i] * if idx == -1: * out[i] = fv # <<<<<<<<<<<<<< * else: * out[i] = values[idx] */ __pyx_t_6 = __pyx_v_i; __pyx_t_4 = -1; if (__pyx_t_6 < 0) { __pyx_t_4 = 0; } else if (unlikely(__pyx_t_6 >= __pyx_pybuffernd_out.diminfo[0].shape)) __pyx_t_4 = 0; if (unlikely(__pyx_t_4 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_4); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2292; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_6, __pyx_pybuffernd_out.diminfo[0].strides) = __pyx_v_fv; goto __pyx_L5; } /*else*/ { /* "pandas/src/generated.pyx":2294 * out[i] = fv * else: * out[i] = values[idx] # <<<<<<<<<<<<<< * * @cython.wraparound(False) */ __pyx_t_7 = __pyx_v_idx; __pyx_t_4 = -1; if (__pyx_t_7 < 0) { __pyx_t_4 = 0; } else if (unlikely(__pyx_t_7 >= __pyx_pybuffernd_values.diminfo[0].shape)) __pyx_t_4 = 0; if (unlikely(__pyx_t_4 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_4); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2294; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_8 = __pyx_v_i; __pyx_t_4 = -1; if (__pyx_t_8 < 0) { __pyx_t_4 = 0; } else if (unlikely(__pyx_t_8 >= __pyx_pybuffernd_out.diminfo[0].shape)) __pyx_t_4 = 0; if (unlikely(__pyx_t_4 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_4); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2294; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_8, __pyx_pybuffernd_out.diminfo[0].strides) = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int8_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_7, __pyx_pybuffernd_values.diminfo[0].strides)); } __pyx_L5:; } /* "pandas/src/generated.pyx":2278 * * @cython.wraparound(False) * def take_1d_int8_int32(ndarray[int8_t] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[int32_t] out, */ /* 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_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.take_1d_int8_int32", __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_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":2297 * * @cython.wraparound(False) * def take_1d_int8_int64(ndarray[int8_t] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[int64_t] out, */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_231take_1d_int8_int64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_231take_1d_int8_int64 = {__Pyx_NAMESTR("take_1d_int8_int64"), (PyCFunction)__pyx_pw_6pandas_5algos_231take_1d_int8_int64, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_231take_1d_int8_int64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_values = 0; PyArrayObject *__pyx_v_indexer = 0; PyArrayObject *__pyx_v_out = 0; PyObject *__pyx_v_fill_value = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("take_1d_int8_int64 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_values,&__pyx_n_s_indexer,&__pyx_n_s_out,&__pyx_n_s_fill_value,0}; PyObject* values[4] = {0,0,0,0}; values[3] = __pyx_k__105; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_values)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_indexer)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_1d_int8_int64", 0, 3, 4, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2297; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_out)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_1d_int8_int64", 0, 3, 4, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2297; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_fill_value); if (value) { values[3] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "take_1d_int8_int64") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2297; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_values = ((PyArrayObject *)values[0]); __pyx_v_indexer = ((PyArrayObject *)values[1]); __pyx_v_out = ((PyArrayObject *)values[2]); __pyx_v_fill_value = values[3]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("take_1d_int8_int64", 0, 3, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2297; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.take_1d_int8_int64", __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_filename = __pyx_f[2]; __pyx_lineno = 2297; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_indexer), __pyx_ptype_5numpy_ndarray, 1, "indexer", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2298; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_5numpy_ndarray, 1, "out", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2299; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_230take_1d_int8_int64(__pyx_self, __pyx_v_values, __pyx_v_indexer, __pyx_v_out, __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_5algos_230take_1d_int8_int64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_n; Py_ssize_t __pyx_v_idx; __pyx_t_5numpy_int64_t __pyx_v_fv; __Pyx_LocalBuf_ND __pyx_pybuffernd_indexer; __Pyx_Buffer __pyx_pybuffer_indexer; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_values; __Pyx_Buffer __pyx_pybuffer_values; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; __pyx_t_5numpy_int64_t __pyx_t_2; Py_ssize_t __pyx_t_3; int __pyx_t_4; int __pyx_t_5; Py_ssize_t __pyx_t_6; Py_ssize_t __pyx_t_7; Py_ssize_t __pyx_t_8; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("take_1d_int8_int64", 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_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; { __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_int8_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2297; __pyx_clineno = __LINE__; goto __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_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2297; __pyx_clineno = __LINE__; goto __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_BufFmt_StackElem __pyx_stack[1]; 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)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2297; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; /* "pandas/src/generated.pyx":2305 * int64_t fv * * n = len(indexer) # <<<<<<<<<<<<<< * * fv = fill_value */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_indexer)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2305; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/src/generated.pyx":2307 * n = len(indexer) * * fv = fill_value # <<<<<<<<<<<<<< * for i from 0 <= i < n: * idx = indexer[i] */ __pyx_t_2 = __Pyx_PyInt_As_npy_int64(__pyx_v_fill_value); if (unlikely((__pyx_t_2 == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2307; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_fv = __pyx_t_2; /* "pandas/src/generated.pyx":2308 * * fv = fill_value * for i from 0 <= i < n: # <<<<<<<<<<<<<< * idx = indexer[i] * if idx == -1: */ __pyx_t_1 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_1; __pyx_v_i++) { /* "pandas/src/generated.pyx":2309 * fv = fill_value * for i from 0 <= i < n: * idx = indexer[i] # <<<<<<<<<<<<<< * if idx == -1: * out[i] = fv */ __pyx_t_3 = __pyx_v_i; __pyx_t_4 = -1; if (__pyx_t_3 < 0) { __pyx_t_4 = 0; } else if (unlikely(__pyx_t_3 >= __pyx_pybuffernd_indexer.diminfo[0].shape)) __pyx_t_4 = 0; if (unlikely(__pyx_t_4 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_4); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2309; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_idx = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_3, __pyx_pybuffernd_indexer.diminfo[0].strides)); /* "pandas/src/generated.pyx":2310 * for i from 0 <= i < n: * idx = indexer[i] * if idx == -1: # <<<<<<<<<<<<<< * out[i] = fv * else: */ __pyx_t_5 = ((__pyx_v_idx == -1) != 0); if (__pyx_t_5) { /* "pandas/src/generated.pyx":2311 * idx = indexer[i] * if idx == -1: * out[i] = fv # <<<<<<<<<<<<<< * else: * out[i] = values[idx] */ __pyx_t_6 = __pyx_v_i; __pyx_t_4 = -1; if (__pyx_t_6 < 0) { __pyx_t_4 = 0; } else if (unlikely(__pyx_t_6 >= __pyx_pybuffernd_out.diminfo[0].shape)) __pyx_t_4 = 0; if (unlikely(__pyx_t_4 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_4); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2311; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_6, __pyx_pybuffernd_out.diminfo[0].strides) = __pyx_v_fv; goto __pyx_L5; } /*else*/ { /* "pandas/src/generated.pyx":2313 * out[i] = fv * else: * out[i] = values[idx] # <<<<<<<<<<<<<< * * @cython.wraparound(False) */ __pyx_t_7 = __pyx_v_idx; __pyx_t_4 = -1; if (__pyx_t_7 < 0) { __pyx_t_4 = 0; } else if (unlikely(__pyx_t_7 >= __pyx_pybuffernd_values.diminfo[0].shape)) __pyx_t_4 = 0; if (unlikely(__pyx_t_4 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_4); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2313; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_8 = __pyx_v_i; __pyx_t_4 = -1; if (__pyx_t_8 < 0) { __pyx_t_4 = 0; } else if (unlikely(__pyx_t_8 >= __pyx_pybuffernd_out.diminfo[0].shape)) __pyx_t_4 = 0; if (unlikely(__pyx_t_4 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_4); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2313; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_8, __pyx_pybuffernd_out.diminfo[0].strides) = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int8_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_7, __pyx_pybuffernd_values.diminfo[0].strides)); } __pyx_L5:; } /* "pandas/src/generated.pyx":2297 * * @cython.wraparound(False) * def take_1d_int8_int64(ndarray[int8_t] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[int64_t] out, */ /* 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_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.take_1d_int8_int64", __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_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":2316 * * @cython.wraparound(False) * def take_1d_int8_float64(ndarray[int8_t] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[float64_t] out, */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_233take_1d_int8_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_233take_1d_int8_float64 = {__Pyx_NAMESTR("take_1d_int8_float64"), (PyCFunction)__pyx_pw_6pandas_5algos_233take_1d_int8_float64, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_233take_1d_int8_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_values = 0; PyArrayObject *__pyx_v_indexer = 0; PyArrayObject *__pyx_v_out = 0; PyObject *__pyx_v_fill_value = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("take_1d_int8_float64 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_values,&__pyx_n_s_indexer,&__pyx_n_s_out,&__pyx_n_s_fill_value,0}; PyObject* values[4] = {0,0,0,0}; values[3] = __pyx_k__106; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_values)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_indexer)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_1d_int8_float64", 0, 3, 4, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2316; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_out)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_1d_int8_float64", 0, 3, 4, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2316; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_fill_value); if (value) { values[3] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "take_1d_int8_float64") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2316; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_values = ((PyArrayObject *)values[0]); __pyx_v_indexer = ((PyArrayObject *)values[1]); __pyx_v_out = ((PyArrayObject *)values[2]); __pyx_v_fill_value = values[3]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("take_1d_int8_float64", 0, 3, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2316; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.take_1d_int8_float64", __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_filename = __pyx_f[2]; __pyx_lineno = 2316; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_indexer), __pyx_ptype_5numpy_ndarray, 1, "indexer", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2317; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_5numpy_ndarray, 1, "out", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2318; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_232take_1d_int8_float64(__pyx_self, __pyx_v_values, __pyx_v_indexer, __pyx_v_out, __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_5algos_232take_1d_int8_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_n; Py_ssize_t __pyx_v_idx; __pyx_t_5numpy_float64_t __pyx_v_fv; __Pyx_LocalBuf_ND __pyx_pybuffernd_indexer; __Pyx_Buffer __pyx_pybuffer_indexer; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_values; __Pyx_Buffer __pyx_pybuffer_values; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; __pyx_t_5numpy_float64_t __pyx_t_2; Py_ssize_t __pyx_t_3; int __pyx_t_4; int __pyx_t_5; Py_ssize_t __pyx_t_6; Py_ssize_t __pyx_t_7; Py_ssize_t __pyx_t_8; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("take_1d_int8_float64", 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_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; { __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_int8_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2316; __pyx_clineno = __LINE__; goto __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_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2316; __pyx_clineno = __LINE__; goto __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_BufFmt_StackElem __pyx_stack[1]; 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)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2316; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; /* "pandas/src/generated.pyx":2324 * float64_t fv * * n = len(indexer) # <<<<<<<<<<<<<< * * fv = fill_value */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_indexer)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2324; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/src/generated.pyx":2326 * n = len(indexer) * * fv = fill_value # <<<<<<<<<<<<<< * for i from 0 <= i < n: * idx = indexer[i] */ __pyx_t_2 = __pyx_PyFloat_AsDouble(__pyx_v_fill_value); if (unlikely((__pyx_t_2 == (npy_float64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2326; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_fv = __pyx_t_2; /* "pandas/src/generated.pyx":2327 * * fv = fill_value * for i from 0 <= i < n: # <<<<<<<<<<<<<< * idx = indexer[i] * if idx == -1: */ __pyx_t_1 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_1; __pyx_v_i++) { /* "pandas/src/generated.pyx":2328 * fv = fill_value * for i from 0 <= i < n: * idx = indexer[i] # <<<<<<<<<<<<<< * if idx == -1: * out[i] = fv */ __pyx_t_3 = __pyx_v_i; __pyx_t_4 = -1; if (__pyx_t_3 < 0) { __pyx_t_4 = 0; } else if (unlikely(__pyx_t_3 >= __pyx_pybuffernd_indexer.diminfo[0].shape)) __pyx_t_4 = 0; if (unlikely(__pyx_t_4 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_4); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2328; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_idx = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_3, __pyx_pybuffernd_indexer.diminfo[0].strides)); /* "pandas/src/generated.pyx":2329 * for i from 0 <= i < n: * idx = indexer[i] * if idx == -1: # <<<<<<<<<<<<<< * out[i] = fv * else: */ __pyx_t_5 = ((__pyx_v_idx == -1) != 0); if (__pyx_t_5) { /* "pandas/src/generated.pyx":2330 * idx = indexer[i] * if idx == -1: * out[i] = fv # <<<<<<<<<<<<<< * else: * out[i] = values[idx] */ __pyx_t_6 = __pyx_v_i; __pyx_t_4 = -1; if (__pyx_t_6 < 0) { __pyx_t_4 = 0; } else if (unlikely(__pyx_t_6 >= __pyx_pybuffernd_out.diminfo[0].shape)) __pyx_t_4 = 0; if (unlikely(__pyx_t_4 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_4); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2330; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_6, __pyx_pybuffernd_out.diminfo[0].strides) = __pyx_v_fv; goto __pyx_L5; } /*else*/ { /* "pandas/src/generated.pyx":2332 * out[i] = fv * else: * out[i] = values[idx] # <<<<<<<<<<<<<< * * @cython.wraparound(False) */ __pyx_t_7 = __pyx_v_idx; __pyx_t_4 = -1; if (__pyx_t_7 < 0) { __pyx_t_4 = 0; } else if (unlikely(__pyx_t_7 >= __pyx_pybuffernd_values.diminfo[0].shape)) __pyx_t_4 = 0; if (unlikely(__pyx_t_4 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_4); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2332; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_8 = __pyx_v_i; __pyx_t_4 = -1; if (__pyx_t_8 < 0) { __pyx_t_4 = 0; } else if (unlikely(__pyx_t_8 >= __pyx_pybuffernd_out.diminfo[0].shape)) __pyx_t_4 = 0; if (unlikely(__pyx_t_4 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_4); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2332; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_8, __pyx_pybuffernd_out.diminfo[0].strides) = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int8_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_7, __pyx_pybuffernd_values.diminfo[0].strides)); } __pyx_L5:; } /* "pandas/src/generated.pyx":2316 * * @cython.wraparound(False) * def take_1d_int8_float64(ndarray[int8_t] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[float64_t] out, */ /* 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_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.take_1d_int8_float64", __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_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":2335 * * @cython.wraparound(False) * def take_1d_int16_int16(ndarray[int16_t] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[int16_t] out, */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_235take_1d_int16_int16(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_235take_1d_int16_int16 = {__Pyx_NAMESTR("take_1d_int16_int16"), (PyCFunction)__pyx_pw_6pandas_5algos_235take_1d_int16_int16, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_235take_1d_int16_int16(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_values = 0; PyArrayObject *__pyx_v_indexer = 0; PyArrayObject *__pyx_v_out = 0; PyObject *__pyx_v_fill_value = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("take_1d_int16_int16 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_values,&__pyx_n_s_indexer,&__pyx_n_s_out,&__pyx_n_s_fill_value,0}; PyObject* values[4] = {0,0,0,0}; values[3] = __pyx_k__107; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_values)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_indexer)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_1d_int16_int16", 0, 3, 4, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2335; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_out)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_1d_int16_int16", 0, 3, 4, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2335; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_fill_value); if (value) { values[3] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "take_1d_int16_int16") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2335; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_values = ((PyArrayObject *)values[0]); __pyx_v_indexer = ((PyArrayObject *)values[1]); __pyx_v_out = ((PyArrayObject *)values[2]); __pyx_v_fill_value = values[3]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("take_1d_int16_int16", 0, 3, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2335; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.take_1d_int16_int16", __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_filename = __pyx_f[2]; __pyx_lineno = 2335; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_indexer), __pyx_ptype_5numpy_ndarray, 1, "indexer", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2336; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_5numpy_ndarray, 1, "out", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2337; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_234take_1d_int16_int16(__pyx_self, __pyx_v_values, __pyx_v_indexer, __pyx_v_out, __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_5algos_234take_1d_int16_int16(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_n; Py_ssize_t __pyx_v_idx; __pyx_t_5numpy_int16_t __pyx_v_fv; __Pyx_LocalBuf_ND __pyx_pybuffernd_indexer; __Pyx_Buffer __pyx_pybuffer_indexer; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_values; __Pyx_Buffer __pyx_pybuffer_values; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; __pyx_t_5numpy_int16_t __pyx_t_2; Py_ssize_t __pyx_t_3; int __pyx_t_4; int __pyx_t_5; Py_ssize_t __pyx_t_6; Py_ssize_t __pyx_t_7; Py_ssize_t __pyx_t_8; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("take_1d_int16_int16", 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_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; { __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_int16_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2335; __pyx_clineno = __LINE__; goto __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_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2335; __pyx_clineno = __LINE__; goto __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_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_v_out, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int16_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2335; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; /* "pandas/src/generated.pyx":2343 * int16_t fv * * n = len(indexer) # <<<<<<<<<<<<<< * * fv = fill_value */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_indexer)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2343; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/src/generated.pyx":2345 * n = len(indexer) * * fv = fill_value # <<<<<<<<<<<<<< * for i from 0 <= i < n: * idx = indexer[i] */ __pyx_t_2 = __Pyx_PyInt_As_npy_int16(__pyx_v_fill_value); if (unlikely((__pyx_t_2 == (npy_int16)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2345; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_fv = __pyx_t_2; /* "pandas/src/generated.pyx":2346 * * fv = fill_value * for i from 0 <= i < n: # <<<<<<<<<<<<<< * idx = indexer[i] * if idx == -1: */ __pyx_t_1 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_1; __pyx_v_i++) { /* "pandas/src/generated.pyx":2347 * fv = fill_value * for i from 0 <= i < n: * idx = indexer[i] # <<<<<<<<<<<<<< * if idx == -1: * out[i] = fv */ __pyx_t_3 = __pyx_v_i; __pyx_t_4 = -1; if (__pyx_t_3 < 0) { __pyx_t_4 = 0; } else if (unlikely(__pyx_t_3 >= __pyx_pybuffernd_indexer.diminfo[0].shape)) __pyx_t_4 = 0; if (unlikely(__pyx_t_4 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_4); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2347; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_idx = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_3, __pyx_pybuffernd_indexer.diminfo[0].strides)); /* "pandas/src/generated.pyx":2348 * for i from 0 <= i < n: * idx = indexer[i] * if idx == -1: # <<<<<<<<<<<<<< * out[i] = fv * else: */ __pyx_t_5 = ((__pyx_v_idx == -1) != 0); if (__pyx_t_5) { /* "pandas/src/generated.pyx":2349 * idx = indexer[i] * if idx == -1: * out[i] = fv # <<<<<<<<<<<<<< * else: * out[i] = values[idx] */ __pyx_t_6 = __pyx_v_i; __pyx_t_4 = -1; if (__pyx_t_6 < 0) { __pyx_t_4 = 0; } else if (unlikely(__pyx_t_6 >= __pyx_pybuffernd_out.diminfo[0].shape)) __pyx_t_4 = 0; if (unlikely(__pyx_t_4 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_4); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2349; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int16_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_6, __pyx_pybuffernd_out.diminfo[0].strides) = __pyx_v_fv; goto __pyx_L5; } /*else*/ { /* "pandas/src/generated.pyx":2351 * out[i] = fv * else: * out[i] = values[idx] # <<<<<<<<<<<<<< * * @cython.wraparound(False) */ __pyx_t_7 = __pyx_v_idx; __pyx_t_4 = -1; if (__pyx_t_7 < 0) { __pyx_t_4 = 0; } else if (unlikely(__pyx_t_7 >= __pyx_pybuffernd_values.diminfo[0].shape)) __pyx_t_4 = 0; if (unlikely(__pyx_t_4 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_4); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2351; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_8 = __pyx_v_i; __pyx_t_4 = -1; if (__pyx_t_8 < 0) { __pyx_t_4 = 0; } else if (unlikely(__pyx_t_8 >= __pyx_pybuffernd_out.diminfo[0].shape)) __pyx_t_4 = 0; if (unlikely(__pyx_t_4 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_4); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2351; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int16_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_8, __pyx_pybuffernd_out.diminfo[0].strides) = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int16_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_7, __pyx_pybuffernd_values.diminfo[0].strides)); } __pyx_L5:; } /* "pandas/src/generated.pyx":2335 * * @cython.wraparound(False) * def take_1d_int16_int16(ndarray[int16_t] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[int16_t] out, */ /* 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_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.take_1d_int16_int16", __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_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":2354 * * @cython.wraparound(False) * def take_1d_int16_int32(ndarray[int16_t] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[int32_t] out, */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_237take_1d_int16_int32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_237take_1d_int16_int32 = {__Pyx_NAMESTR("take_1d_int16_int32"), (PyCFunction)__pyx_pw_6pandas_5algos_237take_1d_int16_int32, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_237take_1d_int16_int32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_values = 0; PyArrayObject *__pyx_v_indexer = 0; PyArrayObject *__pyx_v_out = 0; PyObject *__pyx_v_fill_value = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("take_1d_int16_int32 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_values,&__pyx_n_s_indexer,&__pyx_n_s_out,&__pyx_n_s_fill_value,0}; PyObject* values[4] = {0,0,0,0}; values[3] = __pyx_k__108; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_values)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_indexer)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_1d_int16_int32", 0, 3, 4, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2354; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_out)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_1d_int16_int32", 0, 3, 4, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2354; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_fill_value); if (value) { values[3] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "take_1d_int16_int32") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2354; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_values = ((PyArrayObject *)values[0]); __pyx_v_indexer = ((PyArrayObject *)values[1]); __pyx_v_out = ((PyArrayObject *)values[2]); __pyx_v_fill_value = values[3]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("take_1d_int16_int32", 0, 3, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2354; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.take_1d_int16_int32", __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_filename = __pyx_f[2]; __pyx_lineno = 2354; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_indexer), __pyx_ptype_5numpy_ndarray, 1, "indexer", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2355; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_5numpy_ndarray, 1, "out", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2356; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_236take_1d_int16_int32(__pyx_self, __pyx_v_values, __pyx_v_indexer, __pyx_v_out, __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_5algos_236take_1d_int16_int32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_n; Py_ssize_t __pyx_v_idx; __pyx_t_5numpy_int32_t __pyx_v_fv; __Pyx_LocalBuf_ND __pyx_pybuffernd_indexer; __Pyx_Buffer __pyx_pybuffer_indexer; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_values; __Pyx_Buffer __pyx_pybuffer_values; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; __pyx_t_5numpy_int32_t __pyx_t_2; Py_ssize_t __pyx_t_3; int __pyx_t_4; int __pyx_t_5; Py_ssize_t __pyx_t_6; Py_ssize_t __pyx_t_7; Py_ssize_t __pyx_t_8; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("take_1d_int16_int32", 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_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; { __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_int16_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2354; __pyx_clineno = __LINE__; goto __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_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2354; __pyx_clineno = __LINE__; goto __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_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_v_out, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2354; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; /* "pandas/src/generated.pyx":2362 * int32_t fv * * n = len(indexer) # <<<<<<<<<<<<<< * * fv = fill_value */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_indexer)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2362; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/src/generated.pyx":2364 * n = len(indexer) * * fv = fill_value # <<<<<<<<<<<<<< * for i from 0 <= i < n: * idx = indexer[i] */ __pyx_t_2 = __Pyx_PyInt_As_npy_int32(__pyx_v_fill_value); if (unlikely((__pyx_t_2 == (npy_int32)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2364; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_fv = __pyx_t_2; /* "pandas/src/generated.pyx":2365 * * fv = fill_value * for i from 0 <= i < n: # <<<<<<<<<<<<<< * idx = indexer[i] * if idx == -1: */ __pyx_t_1 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_1; __pyx_v_i++) { /* "pandas/src/generated.pyx":2366 * fv = fill_value * for i from 0 <= i < n: * idx = indexer[i] # <<<<<<<<<<<<<< * if idx == -1: * out[i] = fv */ __pyx_t_3 = __pyx_v_i; __pyx_t_4 = -1; if (__pyx_t_3 < 0) { __pyx_t_4 = 0; } else if (unlikely(__pyx_t_3 >= __pyx_pybuffernd_indexer.diminfo[0].shape)) __pyx_t_4 = 0; if (unlikely(__pyx_t_4 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_4); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2366; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_idx = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_3, __pyx_pybuffernd_indexer.diminfo[0].strides)); /* "pandas/src/generated.pyx":2367 * for i from 0 <= i < n: * idx = indexer[i] * if idx == -1: # <<<<<<<<<<<<<< * out[i] = fv * else: */ __pyx_t_5 = ((__pyx_v_idx == -1) != 0); if (__pyx_t_5) { /* "pandas/src/generated.pyx":2368 * idx = indexer[i] * if idx == -1: * out[i] = fv # <<<<<<<<<<<<<< * else: * out[i] = values[idx] */ __pyx_t_6 = __pyx_v_i; __pyx_t_4 = -1; if (__pyx_t_6 < 0) { __pyx_t_4 = 0; } else if (unlikely(__pyx_t_6 >= __pyx_pybuffernd_out.diminfo[0].shape)) __pyx_t_4 = 0; if (unlikely(__pyx_t_4 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_4); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2368; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_6, __pyx_pybuffernd_out.diminfo[0].strides) = __pyx_v_fv; goto __pyx_L5; } /*else*/ { /* "pandas/src/generated.pyx":2370 * out[i] = fv * else: * out[i] = values[idx] # <<<<<<<<<<<<<< * * @cython.wraparound(False) */ __pyx_t_7 = __pyx_v_idx; __pyx_t_4 = -1; if (__pyx_t_7 < 0) { __pyx_t_4 = 0; } else if (unlikely(__pyx_t_7 >= __pyx_pybuffernd_values.diminfo[0].shape)) __pyx_t_4 = 0; if (unlikely(__pyx_t_4 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_4); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2370; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_8 = __pyx_v_i; __pyx_t_4 = -1; if (__pyx_t_8 < 0) { __pyx_t_4 = 0; } else if (unlikely(__pyx_t_8 >= __pyx_pybuffernd_out.diminfo[0].shape)) __pyx_t_4 = 0; if (unlikely(__pyx_t_4 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_4); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2370; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_8, __pyx_pybuffernd_out.diminfo[0].strides) = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int16_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_7, __pyx_pybuffernd_values.diminfo[0].strides)); } __pyx_L5:; } /* "pandas/src/generated.pyx":2354 * * @cython.wraparound(False) * def take_1d_int16_int32(ndarray[int16_t] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[int32_t] out, */ /* 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_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.take_1d_int16_int32", __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_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":2373 * * @cython.wraparound(False) * def take_1d_int16_int64(ndarray[int16_t] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[int64_t] out, */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_239take_1d_int16_int64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_239take_1d_int16_int64 = {__Pyx_NAMESTR("take_1d_int16_int64"), (PyCFunction)__pyx_pw_6pandas_5algos_239take_1d_int16_int64, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_239take_1d_int16_int64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_values = 0; PyArrayObject *__pyx_v_indexer = 0; PyArrayObject *__pyx_v_out = 0; PyObject *__pyx_v_fill_value = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("take_1d_int16_int64 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_values,&__pyx_n_s_indexer,&__pyx_n_s_out,&__pyx_n_s_fill_value,0}; PyObject* values[4] = {0,0,0,0}; values[3] = __pyx_k__109; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_values)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_indexer)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_1d_int16_int64", 0, 3, 4, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2373; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_out)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_1d_int16_int64", 0, 3, 4, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2373; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_fill_value); if (value) { values[3] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "take_1d_int16_int64") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2373; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_values = ((PyArrayObject *)values[0]); __pyx_v_indexer = ((PyArrayObject *)values[1]); __pyx_v_out = ((PyArrayObject *)values[2]); __pyx_v_fill_value = values[3]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("take_1d_int16_int64", 0, 3, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2373; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.take_1d_int16_int64", __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_filename = __pyx_f[2]; __pyx_lineno = 2373; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_indexer), __pyx_ptype_5numpy_ndarray, 1, "indexer", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2374; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_5numpy_ndarray, 1, "out", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2375; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_238take_1d_int16_int64(__pyx_self, __pyx_v_values, __pyx_v_indexer, __pyx_v_out, __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_5algos_238take_1d_int16_int64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_n; Py_ssize_t __pyx_v_idx; __pyx_t_5numpy_int64_t __pyx_v_fv; __Pyx_LocalBuf_ND __pyx_pybuffernd_indexer; __Pyx_Buffer __pyx_pybuffer_indexer; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_values; __Pyx_Buffer __pyx_pybuffer_values; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; __pyx_t_5numpy_int64_t __pyx_t_2; Py_ssize_t __pyx_t_3; int __pyx_t_4; int __pyx_t_5; Py_ssize_t __pyx_t_6; Py_ssize_t __pyx_t_7; Py_ssize_t __pyx_t_8; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("take_1d_int16_int64", 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_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; { __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_int16_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2373; __pyx_clineno = __LINE__; goto __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_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2373; __pyx_clineno = __LINE__; goto __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_BufFmt_StackElem __pyx_stack[1]; 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)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2373; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; /* "pandas/src/generated.pyx":2381 * int64_t fv * * n = len(indexer) # <<<<<<<<<<<<<< * * fv = fill_value */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_indexer)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2381; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/src/generated.pyx":2383 * n = len(indexer) * * fv = fill_value # <<<<<<<<<<<<<< * for i from 0 <= i < n: * idx = indexer[i] */ __pyx_t_2 = __Pyx_PyInt_As_npy_int64(__pyx_v_fill_value); if (unlikely((__pyx_t_2 == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2383; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_fv = __pyx_t_2; /* "pandas/src/generated.pyx":2384 * * fv = fill_value * for i from 0 <= i < n: # <<<<<<<<<<<<<< * idx = indexer[i] * if idx == -1: */ __pyx_t_1 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_1; __pyx_v_i++) { /* "pandas/src/generated.pyx":2385 * fv = fill_value * for i from 0 <= i < n: * idx = indexer[i] # <<<<<<<<<<<<<< * if idx == -1: * out[i] = fv */ __pyx_t_3 = __pyx_v_i; __pyx_t_4 = -1; if (__pyx_t_3 < 0) { __pyx_t_4 = 0; } else if (unlikely(__pyx_t_3 >= __pyx_pybuffernd_indexer.diminfo[0].shape)) __pyx_t_4 = 0; if (unlikely(__pyx_t_4 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_4); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2385; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_idx = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_3, __pyx_pybuffernd_indexer.diminfo[0].strides)); /* "pandas/src/generated.pyx":2386 * for i from 0 <= i < n: * idx = indexer[i] * if idx == -1: # <<<<<<<<<<<<<< * out[i] = fv * else: */ __pyx_t_5 = ((__pyx_v_idx == -1) != 0); if (__pyx_t_5) { /* "pandas/src/generated.pyx":2387 * idx = indexer[i] * if idx == -1: * out[i] = fv # <<<<<<<<<<<<<< * else: * out[i] = values[idx] */ __pyx_t_6 = __pyx_v_i; __pyx_t_4 = -1; if (__pyx_t_6 < 0) { __pyx_t_4 = 0; } else if (unlikely(__pyx_t_6 >= __pyx_pybuffernd_out.diminfo[0].shape)) __pyx_t_4 = 0; if (unlikely(__pyx_t_4 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_4); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2387; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_6, __pyx_pybuffernd_out.diminfo[0].strides) = __pyx_v_fv; goto __pyx_L5; } /*else*/ { /* "pandas/src/generated.pyx":2389 * out[i] = fv * else: * out[i] = values[idx] # <<<<<<<<<<<<<< * * @cython.wraparound(False) */ __pyx_t_7 = __pyx_v_idx; __pyx_t_4 = -1; if (__pyx_t_7 < 0) { __pyx_t_4 = 0; } else if (unlikely(__pyx_t_7 >= __pyx_pybuffernd_values.diminfo[0].shape)) __pyx_t_4 = 0; if (unlikely(__pyx_t_4 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_4); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2389; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_8 = __pyx_v_i; __pyx_t_4 = -1; if (__pyx_t_8 < 0) { __pyx_t_4 = 0; } else if (unlikely(__pyx_t_8 >= __pyx_pybuffernd_out.diminfo[0].shape)) __pyx_t_4 = 0; if (unlikely(__pyx_t_4 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_4); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2389; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_8, __pyx_pybuffernd_out.diminfo[0].strides) = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int16_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_7, __pyx_pybuffernd_values.diminfo[0].strides)); } __pyx_L5:; } /* "pandas/src/generated.pyx":2373 * * @cython.wraparound(False) * def take_1d_int16_int64(ndarray[int16_t] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[int64_t] out, */ /* 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_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.take_1d_int16_int64", __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_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":2392 * * @cython.wraparound(False) * def take_1d_int16_float64(ndarray[int16_t] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[float64_t] out, */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_241take_1d_int16_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_241take_1d_int16_float64 = {__Pyx_NAMESTR("take_1d_int16_float64"), (PyCFunction)__pyx_pw_6pandas_5algos_241take_1d_int16_float64, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_241take_1d_int16_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_values = 0; PyArrayObject *__pyx_v_indexer = 0; PyArrayObject *__pyx_v_out = 0; PyObject *__pyx_v_fill_value = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("take_1d_int16_float64 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_values,&__pyx_n_s_indexer,&__pyx_n_s_out,&__pyx_n_s_fill_value,0}; PyObject* values[4] = {0,0,0,0}; values[3] = __pyx_k__110; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_values)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_indexer)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_1d_int16_float64", 0, 3, 4, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2392; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_out)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_1d_int16_float64", 0, 3, 4, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2392; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_fill_value); if (value) { values[3] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "take_1d_int16_float64") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2392; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_values = ((PyArrayObject *)values[0]); __pyx_v_indexer = ((PyArrayObject *)values[1]); __pyx_v_out = ((PyArrayObject *)values[2]); __pyx_v_fill_value = values[3]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("take_1d_int16_float64", 0, 3, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2392; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.take_1d_int16_float64", __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_filename = __pyx_f[2]; __pyx_lineno = 2392; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_indexer), __pyx_ptype_5numpy_ndarray, 1, "indexer", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2393; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_5numpy_ndarray, 1, "out", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2394; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_240take_1d_int16_float64(__pyx_self, __pyx_v_values, __pyx_v_indexer, __pyx_v_out, __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_5algos_240take_1d_int16_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_n; Py_ssize_t __pyx_v_idx; __pyx_t_5numpy_float64_t __pyx_v_fv; __Pyx_LocalBuf_ND __pyx_pybuffernd_indexer; __Pyx_Buffer __pyx_pybuffer_indexer; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_values; __Pyx_Buffer __pyx_pybuffer_values; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; __pyx_t_5numpy_float64_t __pyx_t_2; Py_ssize_t __pyx_t_3; int __pyx_t_4; int __pyx_t_5; Py_ssize_t __pyx_t_6; Py_ssize_t __pyx_t_7; Py_ssize_t __pyx_t_8; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("take_1d_int16_float64", 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_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; { __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_int16_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2392; __pyx_clineno = __LINE__; goto __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_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2392; __pyx_clineno = __LINE__; goto __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_BufFmt_StackElem __pyx_stack[1]; 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)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2392; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; /* "pandas/src/generated.pyx":2400 * float64_t fv * * n = len(indexer) # <<<<<<<<<<<<<< * * fv = fill_value */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_indexer)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2400; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/src/generated.pyx":2402 * n = len(indexer) * * fv = fill_value # <<<<<<<<<<<<<< * for i from 0 <= i < n: * idx = indexer[i] */ __pyx_t_2 = __pyx_PyFloat_AsDouble(__pyx_v_fill_value); if (unlikely((__pyx_t_2 == (npy_float64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2402; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_fv = __pyx_t_2; /* "pandas/src/generated.pyx":2403 * * fv = fill_value * for i from 0 <= i < n: # <<<<<<<<<<<<<< * idx = indexer[i] * if idx == -1: */ __pyx_t_1 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_1; __pyx_v_i++) { /* "pandas/src/generated.pyx":2404 * fv = fill_value * for i from 0 <= i < n: * idx = indexer[i] # <<<<<<<<<<<<<< * if idx == -1: * out[i] = fv */ __pyx_t_3 = __pyx_v_i; __pyx_t_4 = -1; if (__pyx_t_3 < 0) { __pyx_t_4 = 0; } else if (unlikely(__pyx_t_3 >= __pyx_pybuffernd_indexer.diminfo[0].shape)) __pyx_t_4 = 0; if (unlikely(__pyx_t_4 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_4); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2404; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_idx = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_3, __pyx_pybuffernd_indexer.diminfo[0].strides)); /* "pandas/src/generated.pyx":2405 * for i from 0 <= i < n: * idx = indexer[i] * if idx == -1: # <<<<<<<<<<<<<< * out[i] = fv * else: */ __pyx_t_5 = ((__pyx_v_idx == -1) != 0); if (__pyx_t_5) { /* "pandas/src/generated.pyx":2406 * idx = indexer[i] * if idx == -1: * out[i] = fv # <<<<<<<<<<<<<< * else: * out[i] = values[idx] */ __pyx_t_6 = __pyx_v_i; __pyx_t_4 = -1; if (__pyx_t_6 < 0) { __pyx_t_4 = 0; } else if (unlikely(__pyx_t_6 >= __pyx_pybuffernd_out.diminfo[0].shape)) __pyx_t_4 = 0; if (unlikely(__pyx_t_4 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_4); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2406; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_6, __pyx_pybuffernd_out.diminfo[0].strides) = __pyx_v_fv; goto __pyx_L5; } /*else*/ { /* "pandas/src/generated.pyx":2408 * out[i] = fv * else: * out[i] = values[idx] # <<<<<<<<<<<<<< * * @cython.wraparound(False) */ __pyx_t_7 = __pyx_v_idx; __pyx_t_4 = -1; if (__pyx_t_7 < 0) { __pyx_t_4 = 0; } else if (unlikely(__pyx_t_7 >= __pyx_pybuffernd_values.diminfo[0].shape)) __pyx_t_4 = 0; if (unlikely(__pyx_t_4 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_4); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2408; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_8 = __pyx_v_i; __pyx_t_4 = -1; if (__pyx_t_8 < 0) { __pyx_t_4 = 0; } else if (unlikely(__pyx_t_8 >= __pyx_pybuffernd_out.diminfo[0].shape)) __pyx_t_4 = 0; if (unlikely(__pyx_t_4 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_4); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2408; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_8, __pyx_pybuffernd_out.diminfo[0].strides) = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int16_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_7, __pyx_pybuffernd_values.diminfo[0].strides)); } __pyx_L5:; } /* "pandas/src/generated.pyx":2392 * * @cython.wraparound(False) * def take_1d_int16_float64(ndarray[int16_t] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[float64_t] out, */ /* 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_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.take_1d_int16_float64", __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_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":2411 * * @cython.wraparound(False) * def take_1d_int32_int32(ndarray[int32_t] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[int32_t] out, */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_243take_1d_int32_int32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_243take_1d_int32_int32 = {__Pyx_NAMESTR("take_1d_int32_int32"), (PyCFunction)__pyx_pw_6pandas_5algos_243take_1d_int32_int32, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_243take_1d_int32_int32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_values = 0; PyArrayObject *__pyx_v_indexer = 0; PyArrayObject *__pyx_v_out = 0; PyObject *__pyx_v_fill_value = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("take_1d_int32_int32 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_values,&__pyx_n_s_indexer,&__pyx_n_s_out,&__pyx_n_s_fill_value,0}; PyObject* values[4] = {0,0,0,0}; values[3] = __pyx_k__111; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_values)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_indexer)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_1d_int32_int32", 0, 3, 4, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2411; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_out)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_1d_int32_int32", 0, 3, 4, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2411; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_fill_value); if (value) { values[3] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "take_1d_int32_int32") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2411; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_values = ((PyArrayObject *)values[0]); __pyx_v_indexer = ((PyArrayObject *)values[1]); __pyx_v_out = ((PyArrayObject *)values[2]); __pyx_v_fill_value = values[3]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("take_1d_int32_int32", 0, 3, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2411; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.take_1d_int32_int32", __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_filename = __pyx_f[2]; __pyx_lineno = 2411; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_indexer), __pyx_ptype_5numpy_ndarray, 1, "indexer", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2412; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_5numpy_ndarray, 1, "out", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2413; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_242take_1d_int32_int32(__pyx_self, __pyx_v_values, __pyx_v_indexer, __pyx_v_out, __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_5algos_242take_1d_int32_int32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_n; Py_ssize_t __pyx_v_idx; __pyx_t_5numpy_int32_t __pyx_v_fv; __Pyx_LocalBuf_ND __pyx_pybuffernd_indexer; __Pyx_Buffer __pyx_pybuffer_indexer; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_values; __Pyx_Buffer __pyx_pybuffer_values; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; __pyx_t_5numpy_int32_t __pyx_t_2; Py_ssize_t __pyx_t_3; int __pyx_t_4; int __pyx_t_5; Py_ssize_t __pyx_t_6; Py_ssize_t __pyx_t_7; Py_ssize_t __pyx_t_8; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("take_1d_int32_int32", 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_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; { __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_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2411; __pyx_clineno = __LINE__; goto __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_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2411; __pyx_clineno = __LINE__; goto __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_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_v_out, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2411; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; /* "pandas/src/generated.pyx":2419 * int32_t fv * * n = len(indexer) # <<<<<<<<<<<<<< * * fv = fill_value */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_indexer)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2419; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/src/generated.pyx":2421 * n = len(indexer) * * fv = fill_value # <<<<<<<<<<<<<< * for i from 0 <= i < n: * idx = indexer[i] */ __pyx_t_2 = __Pyx_PyInt_As_npy_int32(__pyx_v_fill_value); if (unlikely((__pyx_t_2 == (npy_int32)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2421; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_fv = __pyx_t_2; /* "pandas/src/generated.pyx":2422 * * fv = fill_value * for i from 0 <= i < n: # <<<<<<<<<<<<<< * idx = indexer[i] * if idx == -1: */ __pyx_t_1 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_1; __pyx_v_i++) { /* "pandas/src/generated.pyx":2423 * fv = fill_value * for i from 0 <= i < n: * idx = indexer[i] # <<<<<<<<<<<<<< * if idx == -1: * out[i] = fv */ __pyx_t_3 = __pyx_v_i; __pyx_t_4 = -1; if (__pyx_t_3 < 0) { __pyx_t_4 = 0; } else if (unlikely(__pyx_t_3 >= __pyx_pybuffernd_indexer.diminfo[0].shape)) __pyx_t_4 = 0; if (unlikely(__pyx_t_4 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_4); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2423; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_idx = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_3, __pyx_pybuffernd_indexer.diminfo[0].strides)); /* "pandas/src/generated.pyx":2424 * for i from 0 <= i < n: * idx = indexer[i] * if idx == -1: # <<<<<<<<<<<<<< * out[i] = fv * else: */ __pyx_t_5 = ((__pyx_v_idx == -1) != 0); if (__pyx_t_5) { /* "pandas/src/generated.pyx":2425 * idx = indexer[i] * if idx == -1: * out[i] = fv # <<<<<<<<<<<<<< * else: * out[i] = values[idx] */ __pyx_t_6 = __pyx_v_i; __pyx_t_4 = -1; if (__pyx_t_6 < 0) { __pyx_t_4 = 0; } else if (unlikely(__pyx_t_6 >= __pyx_pybuffernd_out.diminfo[0].shape)) __pyx_t_4 = 0; if (unlikely(__pyx_t_4 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_4); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2425; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_6, __pyx_pybuffernd_out.diminfo[0].strides) = __pyx_v_fv; goto __pyx_L5; } /*else*/ { /* "pandas/src/generated.pyx":2427 * out[i] = fv * else: * out[i] = values[idx] # <<<<<<<<<<<<<< * * @cython.wraparound(False) */ __pyx_t_7 = __pyx_v_idx; __pyx_t_4 = -1; if (__pyx_t_7 < 0) { __pyx_t_4 = 0; } else if (unlikely(__pyx_t_7 >= __pyx_pybuffernd_values.diminfo[0].shape)) __pyx_t_4 = 0; if (unlikely(__pyx_t_4 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_4); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2427; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_8 = __pyx_v_i; __pyx_t_4 = -1; if (__pyx_t_8 < 0) { __pyx_t_4 = 0; } else if (unlikely(__pyx_t_8 >= __pyx_pybuffernd_out.diminfo[0].shape)) __pyx_t_4 = 0; if (unlikely(__pyx_t_4 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_4); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2427; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_8, __pyx_pybuffernd_out.diminfo[0].strides) = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_7, __pyx_pybuffernd_values.diminfo[0].strides)); } __pyx_L5:; } /* "pandas/src/generated.pyx":2411 * * @cython.wraparound(False) * def take_1d_int32_int32(ndarray[int32_t] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[int32_t] out, */ /* 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_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.take_1d_int32_int32", __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_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":2430 * * @cython.wraparound(False) * def take_1d_int32_int64(ndarray[int32_t] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[int64_t] out, */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_245take_1d_int32_int64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_245take_1d_int32_int64 = {__Pyx_NAMESTR("take_1d_int32_int64"), (PyCFunction)__pyx_pw_6pandas_5algos_245take_1d_int32_int64, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_245take_1d_int32_int64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_values = 0; PyArrayObject *__pyx_v_indexer = 0; PyArrayObject *__pyx_v_out = 0; PyObject *__pyx_v_fill_value = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("take_1d_int32_int64 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_values,&__pyx_n_s_indexer,&__pyx_n_s_out,&__pyx_n_s_fill_value,0}; PyObject* values[4] = {0,0,0,0}; values[3] = __pyx_k__112; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_values)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_indexer)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_1d_int32_int64", 0, 3, 4, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2430; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_out)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_1d_int32_int64", 0, 3, 4, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2430; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_fill_value); if (value) { values[3] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "take_1d_int32_int64") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2430; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_values = ((PyArrayObject *)values[0]); __pyx_v_indexer = ((PyArrayObject *)values[1]); __pyx_v_out = ((PyArrayObject *)values[2]); __pyx_v_fill_value = values[3]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("take_1d_int32_int64", 0, 3, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2430; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.take_1d_int32_int64", __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_filename = __pyx_f[2]; __pyx_lineno = 2430; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_indexer), __pyx_ptype_5numpy_ndarray, 1, "indexer", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2431; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_5numpy_ndarray, 1, "out", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2432; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_244take_1d_int32_int64(__pyx_self, __pyx_v_values, __pyx_v_indexer, __pyx_v_out, __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_5algos_244take_1d_int32_int64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_n; Py_ssize_t __pyx_v_idx; __pyx_t_5numpy_int64_t __pyx_v_fv; __Pyx_LocalBuf_ND __pyx_pybuffernd_indexer; __Pyx_Buffer __pyx_pybuffer_indexer; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_values; __Pyx_Buffer __pyx_pybuffer_values; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; __pyx_t_5numpy_int64_t __pyx_t_2; Py_ssize_t __pyx_t_3; int __pyx_t_4; int __pyx_t_5; Py_ssize_t __pyx_t_6; Py_ssize_t __pyx_t_7; Py_ssize_t __pyx_t_8; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("take_1d_int32_int64", 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_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; { __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_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2430; __pyx_clineno = __LINE__; goto __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_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2430; __pyx_clineno = __LINE__; goto __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_BufFmt_StackElem __pyx_stack[1]; 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)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2430; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; /* "pandas/src/generated.pyx":2438 * int64_t fv * * n = len(indexer) # <<<<<<<<<<<<<< * * fv = fill_value */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_indexer)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2438; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/src/generated.pyx":2440 * n = len(indexer) * * fv = fill_value # <<<<<<<<<<<<<< * for i from 0 <= i < n: * idx = indexer[i] */ __pyx_t_2 = __Pyx_PyInt_As_npy_int64(__pyx_v_fill_value); if (unlikely((__pyx_t_2 == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2440; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_fv = __pyx_t_2; /* "pandas/src/generated.pyx":2441 * * fv = fill_value * for i from 0 <= i < n: # <<<<<<<<<<<<<< * idx = indexer[i] * if idx == -1: */ __pyx_t_1 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_1; __pyx_v_i++) { /* "pandas/src/generated.pyx":2442 * fv = fill_value * for i from 0 <= i < n: * idx = indexer[i] # <<<<<<<<<<<<<< * if idx == -1: * out[i] = fv */ __pyx_t_3 = __pyx_v_i; __pyx_t_4 = -1; if (__pyx_t_3 < 0) { __pyx_t_4 = 0; } else if (unlikely(__pyx_t_3 >= __pyx_pybuffernd_indexer.diminfo[0].shape)) __pyx_t_4 = 0; if (unlikely(__pyx_t_4 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_4); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2442; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_idx = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_3, __pyx_pybuffernd_indexer.diminfo[0].strides)); /* "pandas/src/generated.pyx":2443 * for i from 0 <= i < n: * idx = indexer[i] * if idx == -1: # <<<<<<<<<<<<<< * out[i] = fv * else: */ __pyx_t_5 = ((__pyx_v_idx == -1) != 0); if (__pyx_t_5) { /* "pandas/src/generated.pyx":2444 * idx = indexer[i] * if idx == -1: * out[i] = fv # <<<<<<<<<<<<<< * else: * out[i] = values[idx] */ __pyx_t_6 = __pyx_v_i; __pyx_t_4 = -1; if (__pyx_t_6 < 0) { __pyx_t_4 = 0; } else if (unlikely(__pyx_t_6 >= __pyx_pybuffernd_out.diminfo[0].shape)) __pyx_t_4 = 0; if (unlikely(__pyx_t_4 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_4); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2444; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_6, __pyx_pybuffernd_out.diminfo[0].strides) = __pyx_v_fv; goto __pyx_L5; } /*else*/ { /* "pandas/src/generated.pyx":2446 * out[i] = fv * else: * out[i] = values[idx] # <<<<<<<<<<<<<< * * @cython.wraparound(False) */ __pyx_t_7 = __pyx_v_idx; __pyx_t_4 = -1; if (__pyx_t_7 < 0) { __pyx_t_4 = 0; } else if (unlikely(__pyx_t_7 >= __pyx_pybuffernd_values.diminfo[0].shape)) __pyx_t_4 = 0; if (unlikely(__pyx_t_4 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_4); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2446; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_8 = __pyx_v_i; __pyx_t_4 = -1; if (__pyx_t_8 < 0) { __pyx_t_4 = 0; } else if (unlikely(__pyx_t_8 >= __pyx_pybuffernd_out.diminfo[0].shape)) __pyx_t_4 = 0; if (unlikely(__pyx_t_4 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_4); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2446; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_8, __pyx_pybuffernd_out.diminfo[0].strides) = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_7, __pyx_pybuffernd_values.diminfo[0].strides)); } __pyx_L5:; } /* "pandas/src/generated.pyx":2430 * * @cython.wraparound(False) * def take_1d_int32_int64(ndarray[int32_t] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[int64_t] out, */ /* 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_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.take_1d_int32_int64", __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_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":2449 * * @cython.wraparound(False) * def take_1d_int32_float64(ndarray[int32_t] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[float64_t] out, */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_247take_1d_int32_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_247take_1d_int32_float64 = {__Pyx_NAMESTR("take_1d_int32_float64"), (PyCFunction)__pyx_pw_6pandas_5algos_247take_1d_int32_float64, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_247take_1d_int32_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_values = 0; PyArrayObject *__pyx_v_indexer = 0; PyArrayObject *__pyx_v_out = 0; PyObject *__pyx_v_fill_value = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("take_1d_int32_float64 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_values,&__pyx_n_s_indexer,&__pyx_n_s_out,&__pyx_n_s_fill_value,0}; PyObject* values[4] = {0,0,0,0}; values[3] = __pyx_k__113; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_values)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_indexer)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_1d_int32_float64", 0, 3, 4, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2449; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_out)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_1d_int32_float64", 0, 3, 4, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2449; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_fill_value); if (value) { values[3] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "take_1d_int32_float64") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2449; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_values = ((PyArrayObject *)values[0]); __pyx_v_indexer = ((PyArrayObject *)values[1]); __pyx_v_out = ((PyArrayObject *)values[2]); __pyx_v_fill_value = values[3]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("take_1d_int32_float64", 0, 3, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2449; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.take_1d_int32_float64", __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_filename = __pyx_f[2]; __pyx_lineno = 2449; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_indexer), __pyx_ptype_5numpy_ndarray, 1, "indexer", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2450; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_5numpy_ndarray, 1, "out", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2451; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_246take_1d_int32_float64(__pyx_self, __pyx_v_values, __pyx_v_indexer, __pyx_v_out, __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_5algos_246take_1d_int32_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_n; Py_ssize_t __pyx_v_idx; __pyx_t_5numpy_float64_t __pyx_v_fv; __Pyx_LocalBuf_ND __pyx_pybuffernd_indexer; __Pyx_Buffer __pyx_pybuffer_indexer; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_values; __Pyx_Buffer __pyx_pybuffer_values; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; __pyx_t_5numpy_float64_t __pyx_t_2; Py_ssize_t __pyx_t_3; int __pyx_t_4; int __pyx_t_5; Py_ssize_t __pyx_t_6; Py_ssize_t __pyx_t_7; Py_ssize_t __pyx_t_8; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("take_1d_int32_float64", 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_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; { __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_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2449; __pyx_clineno = __LINE__; goto __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_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2449; __pyx_clineno = __LINE__; goto __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_BufFmt_StackElem __pyx_stack[1]; 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)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2449; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; /* "pandas/src/generated.pyx":2457 * float64_t fv * * n = len(indexer) # <<<<<<<<<<<<<< * * fv = fill_value */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_indexer)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2457; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/src/generated.pyx":2459 * n = len(indexer) * * fv = fill_value # <<<<<<<<<<<<<< * for i from 0 <= i < n: * idx = indexer[i] */ __pyx_t_2 = __pyx_PyFloat_AsDouble(__pyx_v_fill_value); if (unlikely((__pyx_t_2 == (npy_float64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2459; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_fv = __pyx_t_2; /* "pandas/src/generated.pyx":2460 * * fv = fill_value * for i from 0 <= i < n: # <<<<<<<<<<<<<< * idx = indexer[i] * if idx == -1: */ __pyx_t_1 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_1; __pyx_v_i++) { /* "pandas/src/generated.pyx":2461 * fv = fill_value * for i from 0 <= i < n: * idx = indexer[i] # <<<<<<<<<<<<<< * if idx == -1: * out[i] = fv */ __pyx_t_3 = __pyx_v_i; __pyx_t_4 = -1; if (__pyx_t_3 < 0) { __pyx_t_4 = 0; } else if (unlikely(__pyx_t_3 >= __pyx_pybuffernd_indexer.diminfo[0].shape)) __pyx_t_4 = 0; if (unlikely(__pyx_t_4 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_4); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2461; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_idx = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_3, __pyx_pybuffernd_indexer.diminfo[0].strides)); /* "pandas/src/generated.pyx":2462 * for i from 0 <= i < n: * idx = indexer[i] * if idx == -1: # <<<<<<<<<<<<<< * out[i] = fv * else: */ __pyx_t_5 = ((__pyx_v_idx == -1) != 0); if (__pyx_t_5) { /* "pandas/src/generated.pyx":2463 * idx = indexer[i] * if idx == -1: * out[i] = fv # <<<<<<<<<<<<<< * else: * out[i] = values[idx] */ __pyx_t_6 = __pyx_v_i; __pyx_t_4 = -1; if (__pyx_t_6 < 0) { __pyx_t_4 = 0; } else if (unlikely(__pyx_t_6 >= __pyx_pybuffernd_out.diminfo[0].shape)) __pyx_t_4 = 0; if (unlikely(__pyx_t_4 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_4); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2463; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_6, __pyx_pybuffernd_out.diminfo[0].strides) = __pyx_v_fv; goto __pyx_L5; } /*else*/ { /* "pandas/src/generated.pyx":2465 * out[i] = fv * else: * out[i] = values[idx] # <<<<<<<<<<<<<< * * @cython.wraparound(False) */ __pyx_t_7 = __pyx_v_idx; __pyx_t_4 = -1; if (__pyx_t_7 < 0) { __pyx_t_4 = 0; } else if (unlikely(__pyx_t_7 >= __pyx_pybuffernd_values.diminfo[0].shape)) __pyx_t_4 = 0; if (unlikely(__pyx_t_4 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_4); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2465; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_8 = __pyx_v_i; __pyx_t_4 = -1; if (__pyx_t_8 < 0) { __pyx_t_4 = 0; } else if (unlikely(__pyx_t_8 >= __pyx_pybuffernd_out.diminfo[0].shape)) __pyx_t_4 = 0; if (unlikely(__pyx_t_4 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_4); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2465; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_8, __pyx_pybuffernd_out.diminfo[0].strides) = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_7, __pyx_pybuffernd_values.diminfo[0].strides)); } __pyx_L5:; } /* "pandas/src/generated.pyx":2449 * * @cython.wraparound(False) * def take_1d_int32_float64(ndarray[int32_t] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[float64_t] out, */ /* 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_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.take_1d_int32_float64", __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_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":2468 * * @cython.wraparound(False) * def take_1d_int64_int64(ndarray[int64_t] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[int64_t] out, */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_249take_1d_int64_int64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_249take_1d_int64_int64 = {__Pyx_NAMESTR("take_1d_int64_int64"), (PyCFunction)__pyx_pw_6pandas_5algos_249take_1d_int64_int64, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_249take_1d_int64_int64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_values = 0; PyArrayObject *__pyx_v_indexer = 0; PyArrayObject *__pyx_v_out = 0; PyObject *__pyx_v_fill_value = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("take_1d_int64_int64 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_values,&__pyx_n_s_indexer,&__pyx_n_s_out,&__pyx_n_s_fill_value,0}; PyObject* values[4] = {0,0,0,0}; values[3] = __pyx_k__114; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_values)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_indexer)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_1d_int64_int64", 0, 3, 4, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2468; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_out)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_1d_int64_int64", 0, 3, 4, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2468; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_fill_value); if (value) { values[3] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "take_1d_int64_int64") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2468; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_values = ((PyArrayObject *)values[0]); __pyx_v_indexer = ((PyArrayObject *)values[1]); __pyx_v_out = ((PyArrayObject *)values[2]); __pyx_v_fill_value = values[3]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("take_1d_int64_int64", 0, 3, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2468; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.take_1d_int64_int64", __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_filename = __pyx_f[2]; __pyx_lineno = 2468; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_indexer), __pyx_ptype_5numpy_ndarray, 1, "indexer", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2469; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_5numpy_ndarray, 1, "out", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2470; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_248take_1d_int64_int64(__pyx_self, __pyx_v_values, __pyx_v_indexer, __pyx_v_out, __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_5algos_248take_1d_int64_int64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_n; Py_ssize_t __pyx_v_idx; __pyx_t_5numpy_int64_t __pyx_v_fv; __Pyx_LocalBuf_ND __pyx_pybuffernd_indexer; __Pyx_Buffer __pyx_pybuffer_indexer; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_values; __Pyx_Buffer __pyx_pybuffer_values; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; __pyx_t_5numpy_int64_t __pyx_t_2; Py_ssize_t __pyx_t_3; int __pyx_t_4; int __pyx_t_5; Py_ssize_t __pyx_t_6; Py_ssize_t __pyx_t_7; Py_ssize_t __pyx_t_8; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("take_1d_int64_int64", 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_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; { __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_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2468; __pyx_clineno = __LINE__; goto __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_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2468; __pyx_clineno = __LINE__; goto __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_BufFmt_StackElem __pyx_stack[1]; 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)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2468; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; /* "pandas/src/generated.pyx":2476 * int64_t fv * * n = len(indexer) # <<<<<<<<<<<<<< * * fv = fill_value */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_indexer)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2476; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/src/generated.pyx":2478 * n = len(indexer) * * fv = fill_value # <<<<<<<<<<<<<< * for i from 0 <= i < n: * idx = indexer[i] */ __pyx_t_2 = __Pyx_PyInt_As_npy_int64(__pyx_v_fill_value); if (unlikely((__pyx_t_2 == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2478; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_fv = __pyx_t_2; /* "pandas/src/generated.pyx":2479 * * fv = fill_value * for i from 0 <= i < n: # <<<<<<<<<<<<<< * idx = indexer[i] * if idx == -1: */ __pyx_t_1 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_1; __pyx_v_i++) { /* "pandas/src/generated.pyx":2480 * fv = fill_value * for i from 0 <= i < n: * idx = indexer[i] # <<<<<<<<<<<<<< * if idx == -1: * out[i] = fv */ __pyx_t_3 = __pyx_v_i; __pyx_t_4 = -1; if (__pyx_t_3 < 0) { __pyx_t_4 = 0; } else if (unlikely(__pyx_t_3 >= __pyx_pybuffernd_indexer.diminfo[0].shape)) __pyx_t_4 = 0; if (unlikely(__pyx_t_4 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_4); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2480; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_idx = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_3, __pyx_pybuffernd_indexer.diminfo[0].strides)); /* "pandas/src/generated.pyx":2481 * for i from 0 <= i < n: * idx = indexer[i] * if idx == -1: # <<<<<<<<<<<<<< * out[i] = fv * else: */ __pyx_t_5 = ((__pyx_v_idx == -1) != 0); if (__pyx_t_5) { /* "pandas/src/generated.pyx":2482 * idx = indexer[i] * if idx == -1: * out[i] = fv # <<<<<<<<<<<<<< * else: * out[i] = values[idx] */ __pyx_t_6 = __pyx_v_i; __pyx_t_4 = -1; if (__pyx_t_6 < 0) { __pyx_t_4 = 0; } else if (unlikely(__pyx_t_6 >= __pyx_pybuffernd_out.diminfo[0].shape)) __pyx_t_4 = 0; if (unlikely(__pyx_t_4 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_4); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2482; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_6, __pyx_pybuffernd_out.diminfo[0].strides) = __pyx_v_fv; goto __pyx_L5; } /*else*/ { /* "pandas/src/generated.pyx":2484 * out[i] = fv * else: * out[i] = values[idx] # <<<<<<<<<<<<<< * * @cython.wraparound(False) */ __pyx_t_7 = __pyx_v_idx; __pyx_t_4 = -1; if (__pyx_t_7 < 0) { __pyx_t_4 = 0; } else if (unlikely(__pyx_t_7 >= __pyx_pybuffernd_values.diminfo[0].shape)) __pyx_t_4 = 0; if (unlikely(__pyx_t_4 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_4); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2484; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_8 = __pyx_v_i; __pyx_t_4 = -1; if (__pyx_t_8 < 0) { __pyx_t_4 = 0; } else if (unlikely(__pyx_t_8 >= __pyx_pybuffernd_out.diminfo[0].shape)) __pyx_t_4 = 0; if (unlikely(__pyx_t_4 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_4); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2484; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_8, __pyx_pybuffernd_out.diminfo[0].strides) = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_7, __pyx_pybuffernd_values.diminfo[0].strides)); } __pyx_L5:; } /* "pandas/src/generated.pyx":2468 * * @cython.wraparound(False) * def take_1d_int64_int64(ndarray[int64_t] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[int64_t] out, */ /* 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_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.take_1d_int64_int64", __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_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":2487 * * @cython.wraparound(False) * def take_1d_int64_float64(ndarray[int64_t] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[float64_t] out, */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_251take_1d_int64_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_251take_1d_int64_float64 = {__Pyx_NAMESTR("take_1d_int64_float64"), (PyCFunction)__pyx_pw_6pandas_5algos_251take_1d_int64_float64, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_251take_1d_int64_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_values = 0; PyArrayObject *__pyx_v_indexer = 0; PyArrayObject *__pyx_v_out = 0; PyObject *__pyx_v_fill_value = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("take_1d_int64_float64 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_values,&__pyx_n_s_indexer,&__pyx_n_s_out,&__pyx_n_s_fill_value,0}; PyObject* values[4] = {0,0,0,0}; values[3] = __pyx_k__115; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_values)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_indexer)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_1d_int64_float64", 0, 3, 4, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2487; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_out)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_1d_int64_float64", 0, 3, 4, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2487; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_fill_value); if (value) { values[3] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "take_1d_int64_float64") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2487; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_values = ((PyArrayObject *)values[0]); __pyx_v_indexer = ((PyArrayObject *)values[1]); __pyx_v_out = ((PyArrayObject *)values[2]); __pyx_v_fill_value = values[3]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("take_1d_int64_float64", 0, 3, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2487; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.take_1d_int64_float64", __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_filename = __pyx_f[2]; __pyx_lineno = 2487; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_indexer), __pyx_ptype_5numpy_ndarray, 1, "indexer", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2488; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_5numpy_ndarray, 1, "out", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2489; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_250take_1d_int64_float64(__pyx_self, __pyx_v_values, __pyx_v_indexer, __pyx_v_out, __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_5algos_250take_1d_int64_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_n; Py_ssize_t __pyx_v_idx; __pyx_t_5numpy_float64_t __pyx_v_fv; __Pyx_LocalBuf_ND __pyx_pybuffernd_indexer; __Pyx_Buffer __pyx_pybuffer_indexer; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_values; __Pyx_Buffer __pyx_pybuffer_values; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; __pyx_t_5numpy_float64_t __pyx_t_2; Py_ssize_t __pyx_t_3; int __pyx_t_4; int __pyx_t_5; Py_ssize_t __pyx_t_6; Py_ssize_t __pyx_t_7; Py_ssize_t __pyx_t_8; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("take_1d_int64_float64", 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_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; { __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_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2487; __pyx_clineno = __LINE__; goto __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_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2487; __pyx_clineno = __LINE__; goto __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_BufFmt_StackElem __pyx_stack[1]; 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)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2487; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; /* "pandas/src/generated.pyx":2495 * float64_t fv * * n = len(indexer) # <<<<<<<<<<<<<< * * fv = fill_value */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_indexer)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2495; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/src/generated.pyx":2497 * n = len(indexer) * * fv = fill_value # <<<<<<<<<<<<<< * for i from 0 <= i < n: * idx = indexer[i] */ __pyx_t_2 = __pyx_PyFloat_AsDouble(__pyx_v_fill_value); if (unlikely((__pyx_t_2 == (npy_float64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2497; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_fv = __pyx_t_2; /* "pandas/src/generated.pyx":2498 * * fv = fill_value * for i from 0 <= i < n: # <<<<<<<<<<<<<< * idx = indexer[i] * if idx == -1: */ __pyx_t_1 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_1; __pyx_v_i++) { /* "pandas/src/generated.pyx":2499 * fv = fill_value * for i from 0 <= i < n: * idx = indexer[i] # <<<<<<<<<<<<<< * if idx == -1: * out[i] = fv */ __pyx_t_3 = __pyx_v_i; __pyx_t_4 = -1; if (__pyx_t_3 < 0) { __pyx_t_4 = 0; } else if (unlikely(__pyx_t_3 >= __pyx_pybuffernd_indexer.diminfo[0].shape)) __pyx_t_4 = 0; if (unlikely(__pyx_t_4 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_4); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2499; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_idx = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_3, __pyx_pybuffernd_indexer.diminfo[0].strides)); /* "pandas/src/generated.pyx":2500 * for i from 0 <= i < n: * idx = indexer[i] * if idx == -1: # <<<<<<<<<<<<<< * out[i] = fv * else: */ __pyx_t_5 = ((__pyx_v_idx == -1) != 0); if (__pyx_t_5) { /* "pandas/src/generated.pyx":2501 * idx = indexer[i] * if idx == -1: * out[i] = fv # <<<<<<<<<<<<<< * else: * out[i] = values[idx] */ __pyx_t_6 = __pyx_v_i; __pyx_t_4 = -1; if (__pyx_t_6 < 0) { __pyx_t_4 = 0; } else if (unlikely(__pyx_t_6 >= __pyx_pybuffernd_out.diminfo[0].shape)) __pyx_t_4 = 0; if (unlikely(__pyx_t_4 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_4); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2501; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_6, __pyx_pybuffernd_out.diminfo[0].strides) = __pyx_v_fv; goto __pyx_L5; } /*else*/ { /* "pandas/src/generated.pyx":2503 * out[i] = fv * else: * out[i] = values[idx] # <<<<<<<<<<<<<< * * @cython.wraparound(False) */ __pyx_t_7 = __pyx_v_idx; __pyx_t_4 = -1; if (__pyx_t_7 < 0) { __pyx_t_4 = 0; } else if (unlikely(__pyx_t_7 >= __pyx_pybuffernd_values.diminfo[0].shape)) __pyx_t_4 = 0; if (unlikely(__pyx_t_4 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_4); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2503; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_8 = __pyx_v_i; __pyx_t_4 = -1; if (__pyx_t_8 < 0) { __pyx_t_4 = 0; } else if (unlikely(__pyx_t_8 >= __pyx_pybuffernd_out.diminfo[0].shape)) __pyx_t_4 = 0; if (unlikely(__pyx_t_4 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_4); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2503; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_8, __pyx_pybuffernd_out.diminfo[0].strides) = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_7, __pyx_pybuffernd_values.diminfo[0].strides)); } __pyx_L5:; } /* "pandas/src/generated.pyx":2487 * * @cython.wraparound(False) * def take_1d_int64_float64(ndarray[int64_t] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[float64_t] out, */ /* 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_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.take_1d_int64_float64", __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_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":2506 * * @cython.wraparound(False) * def take_1d_float32_float32(ndarray[float32_t] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[float32_t] out, */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_253take_1d_float32_float32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_253take_1d_float32_float32 = {__Pyx_NAMESTR("take_1d_float32_float32"), (PyCFunction)__pyx_pw_6pandas_5algos_253take_1d_float32_float32, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_253take_1d_float32_float32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_values = 0; PyArrayObject *__pyx_v_indexer = 0; PyArrayObject *__pyx_v_out = 0; PyObject *__pyx_v_fill_value = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("take_1d_float32_float32 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_values,&__pyx_n_s_indexer,&__pyx_n_s_out,&__pyx_n_s_fill_value,0}; PyObject* values[4] = {0,0,0,0}; values[3] = __pyx_k__116; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_values)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_indexer)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_1d_float32_float32", 0, 3, 4, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2506; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_out)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_1d_float32_float32", 0, 3, 4, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2506; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_fill_value); if (value) { values[3] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "take_1d_float32_float32") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2506; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_values = ((PyArrayObject *)values[0]); __pyx_v_indexer = ((PyArrayObject *)values[1]); __pyx_v_out = ((PyArrayObject *)values[2]); __pyx_v_fill_value = values[3]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("take_1d_float32_float32", 0, 3, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2506; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.take_1d_float32_float32", __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_filename = __pyx_f[2]; __pyx_lineno = 2506; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_indexer), __pyx_ptype_5numpy_ndarray, 1, "indexer", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2507; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_5numpy_ndarray, 1, "out", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2508; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_252take_1d_float32_float32(__pyx_self, __pyx_v_values, __pyx_v_indexer, __pyx_v_out, __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_5algos_252take_1d_float32_float32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_n; Py_ssize_t __pyx_v_idx; __pyx_t_5numpy_float32_t __pyx_v_fv; __Pyx_LocalBuf_ND __pyx_pybuffernd_indexer; __Pyx_Buffer __pyx_pybuffer_indexer; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_values; __Pyx_Buffer __pyx_pybuffer_values; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; __pyx_t_5numpy_float32_t __pyx_t_2; Py_ssize_t __pyx_t_3; int __pyx_t_4; int __pyx_t_5; Py_ssize_t __pyx_t_6; Py_ssize_t __pyx_t_7; Py_ssize_t __pyx_t_8; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("take_1d_float32_float32", 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_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; { __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_float32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2506; __pyx_clineno = __LINE__; goto __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_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2506; __pyx_clineno = __LINE__; goto __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_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_v_out, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2506; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; /* "pandas/src/generated.pyx":2514 * float32_t fv * * n = len(indexer) # <<<<<<<<<<<<<< * * fv = fill_value */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_indexer)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2514; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/src/generated.pyx":2516 * n = len(indexer) * * fv = fill_value # <<<<<<<<<<<<<< * for i from 0 <= i < n: * idx = indexer[i] */ __pyx_t_2 = __pyx_PyFloat_AsFloat(__pyx_v_fill_value); if (unlikely((__pyx_t_2 == (npy_float32)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2516; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_fv = __pyx_t_2; /* "pandas/src/generated.pyx":2517 * * fv = fill_value * for i from 0 <= i < n: # <<<<<<<<<<<<<< * idx = indexer[i] * if idx == -1: */ __pyx_t_1 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_1; __pyx_v_i++) { /* "pandas/src/generated.pyx":2518 * fv = fill_value * for i from 0 <= i < n: * idx = indexer[i] # <<<<<<<<<<<<<< * if idx == -1: * out[i] = fv */ __pyx_t_3 = __pyx_v_i; __pyx_t_4 = -1; if (__pyx_t_3 < 0) { __pyx_t_4 = 0; } else if (unlikely(__pyx_t_3 >= __pyx_pybuffernd_indexer.diminfo[0].shape)) __pyx_t_4 = 0; if (unlikely(__pyx_t_4 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_4); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2518; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_idx = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_3, __pyx_pybuffernd_indexer.diminfo[0].strides)); /* "pandas/src/generated.pyx":2519 * for i from 0 <= i < n: * idx = indexer[i] * if idx == -1: # <<<<<<<<<<<<<< * out[i] = fv * else: */ __pyx_t_5 = ((__pyx_v_idx == -1) != 0); if (__pyx_t_5) { /* "pandas/src/generated.pyx":2520 * idx = indexer[i] * if idx == -1: * out[i] = fv # <<<<<<<<<<<<<< * else: * out[i] = values[idx] */ __pyx_t_6 = __pyx_v_i; __pyx_t_4 = -1; if (__pyx_t_6 < 0) { __pyx_t_4 = 0; } else if (unlikely(__pyx_t_6 >= __pyx_pybuffernd_out.diminfo[0].shape)) __pyx_t_4 = 0; if (unlikely(__pyx_t_4 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_4); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2520; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_6, __pyx_pybuffernd_out.diminfo[0].strides) = __pyx_v_fv; goto __pyx_L5; } /*else*/ { /* "pandas/src/generated.pyx":2522 * out[i] = fv * else: * out[i] = values[idx] # <<<<<<<<<<<<<< * * @cython.wraparound(False) */ __pyx_t_7 = __pyx_v_idx; __pyx_t_4 = -1; if (__pyx_t_7 < 0) { __pyx_t_4 = 0; } else if (unlikely(__pyx_t_7 >= __pyx_pybuffernd_values.diminfo[0].shape)) __pyx_t_4 = 0; if (unlikely(__pyx_t_4 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_4); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2522; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_8 = __pyx_v_i; __pyx_t_4 = -1; if (__pyx_t_8 < 0) { __pyx_t_4 = 0; } else if (unlikely(__pyx_t_8 >= __pyx_pybuffernd_out.diminfo[0].shape)) __pyx_t_4 = 0; if (unlikely(__pyx_t_4 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_4); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2522; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_8, __pyx_pybuffernd_out.diminfo[0].strides) = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_7, __pyx_pybuffernd_values.diminfo[0].strides)); } __pyx_L5:; } /* "pandas/src/generated.pyx":2506 * * @cython.wraparound(False) * def take_1d_float32_float32(ndarray[float32_t] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[float32_t] out, */ /* 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_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.take_1d_float32_float32", __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_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":2525 * * @cython.wraparound(False) * def take_1d_float32_float64(ndarray[float32_t] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[float64_t] out, */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_255take_1d_float32_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_255take_1d_float32_float64 = {__Pyx_NAMESTR("take_1d_float32_float64"), (PyCFunction)__pyx_pw_6pandas_5algos_255take_1d_float32_float64, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_255take_1d_float32_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_values = 0; PyArrayObject *__pyx_v_indexer = 0; PyArrayObject *__pyx_v_out = 0; PyObject *__pyx_v_fill_value = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("take_1d_float32_float64 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_values,&__pyx_n_s_indexer,&__pyx_n_s_out,&__pyx_n_s_fill_value,0}; PyObject* values[4] = {0,0,0,0}; values[3] = __pyx_k__117; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_values)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_indexer)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_1d_float32_float64", 0, 3, 4, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2525; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_out)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_1d_float32_float64", 0, 3, 4, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2525; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_fill_value); if (value) { values[3] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "take_1d_float32_float64") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2525; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_values = ((PyArrayObject *)values[0]); __pyx_v_indexer = ((PyArrayObject *)values[1]); __pyx_v_out = ((PyArrayObject *)values[2]); __pyx_v_fill_value = values[3]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("take_1d_float32_float64", 0, 3, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2525; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.take_1d_float32_float64", __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_filename = __pyx_f[2]; __pyx_lineno = 2525; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_indexer), __pyx_ptype_5numpy_ndarray, 1, "indexer", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2526; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_5numpy_ndarray, 1, "out", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2527; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_254take_1d_float32_float64(__pyx_self, __pyx_v_values, __pyx_v_indexer, __pyx_v_out, __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_5algos_254take_1d_float32_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_n; Py_ssize_t __pyx_v_idx; __pyx_t_5numpy_float64_t __pyx_v_fv; __Pyx_LocalBuf_ND __pyx_pybuffernd_indexer; __Pyx_Buffer __pyx_pybuffer_indexer; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_values; __Pyx_Buffer __pyx_pybuffer_values; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; __pyx_t_5numpy_float64_t __pyx_t_2; Py_ssize_t __pyx_t_3; int __pyx_t_4; int __pyx_t_5; Py_ssize_t __pyx_t_6; Py_ssize_t __pyx_t_7; Py_ssize_t __pyx_t_8; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("take_1d_float32_float64", 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_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; { __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_float32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2525; __pyx_clineno = __LINE__; goto __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_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2525; __pyx_clineno = __LINE__; goto __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_BufFmt_StackElem __pyx_stack[1]; 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)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2525; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; /* "pandas/src/generated.pyx":2533 * float64_t fv * * n = len(indexer) # <<<<<<<<<<<<<< * * fv = fill_value */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_indexer)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2533; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/src/generated.pyx":2535 * n = len(indexer) * * fv = fill_value # <<<<<<<<<<<<<< * for i from 0 <= i < n: * idx = indexer[i] */ __pyx_t_2 = __pyx_PyFloat_AsDouble(__pyx_v_fill_value); if (unlikely((__pyx_t_2 == (npy_float64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2535; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_fv = __pyx_t_2; /* "pandas/src/generated.pyx":2536 * * fv = fill_value * for i from 0 <= i < n: # <<<<<<<<<<<<<< * idx = indexer[i] * if idx == -1: */ __pyx_t_1 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_1; __pyx_v_i++) { /* "pandas/src/generated.pyx":2537 * fv = fill_value * for i from 0 <= i < n: * idx = indexer[i] # <<<<<<<<<<<<<< * if idx == -1: * out[i] = fv */ __pyx_t_3 = __pyx_v_i; __pyx_t_4 = -1; if (__pyx_t_3 < 0) { __pyx_t_4 = 0; } else if (unlikely(__pyx_t_3 >= __pyx_pybuffernd_indexer.diminfo[0].shape)) __pyx_t_4 = 0; if (unlikely(__pyx_t_4 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_4); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2537; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_idx = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_3, __pyx_pybuffernd_indexer.diminfo[0].strides)); /* "pandas/src/generated.pyx":2538 * for i from 0 <= i < n: * idx = indexer[i] * if idx == -1: # <<<<<<<<<<<<<< * out[i] = fv * else: */ __pyx_t_5 = ((__pyx_v_idx == -1) != 0); if (__pyx_t_5) { /* "pandas/src/generated.pyx":2539 * idx = indexer[i] * if idx == -1: * out[i] = fv # <<<<<<<<<<<<<< * else: * out[i] = values[idx] */ __pyx_t_6 = __pyx_v_i; __pyx_t_4 = -1; if (__pyx_t_6 < 0) { __pyx_t_4 = 0; } else if (unlikely(__pyx_t_6 >= __pyx_pybuffernd_out.diminfo[0].shape)) __pyx_t_4 = 0; if (unlikely(__pyx_t_4 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_4); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2539; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_6, __pyx_pybuffernd_out.diminfo[0].strides) = __pyx_v_fv; goto __pyx_L5; } /*else*/ { /* "pandas/src/generated.pyx":2541 * out[i] = fv * else: * out[i] = values[idx] # <<<<<<<<<<<<<< * * @cython.wraparound(False) */ __pyx_t_7 = __pyx_v_idx; __pyx_t_4 = -1; if (__pyx_t_7 < 0) { __pyx_t_4 = 0; } else if (unlikely(__pyx_t_7 >= __pyx_pybuffernd_values.diminfo[0].shape)) __pyx_t_4 = 0; if (unlikely(__pyx_t_4 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_4); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2541; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_8 = __pyx_v_i; __pyx_t_4 = -1; if (__pyx_t_8 < 0) { __pyx_t_4 = 0; } else if (unlikely(__pyx_t_8 >= __pyx_pybuffernd_out.diminfo[0].shape)) __pyx_t_4 = 0; if (unlikely(__pyx_t_4 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_4); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2541; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_8, __pyx_pybuffernd_out.diminfo[0].strides) = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_7, __pyx_pybuffernd_values.diminfo[0].strides)); } __pyx_L5:; } /* "pandas/src/generated.pyx":2525 * * @cython.wraparound(False) * def take_1d_float32_float64(ndarray[float32_t] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[float64_t] out, */ /* 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_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.take_1d_float32_float64", __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_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":2544 * * @cython.wraparound(False) * def take_1d_float64_float64(ndarray[float64_t] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[float64_t] out, */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_257take_1d_float64_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_257take_1d_float64_float64 = {__Pyx_NAMESTR("take_1d_float64_float64"), (PyCFunction)__pyx_pw_6pandas_5algos_257take_1d_float64_float64, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_257take_1d_float64_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_values = 0; PyArrayObject *__pyx_v_indexer = 0; PyArrayObject *__pyx_v_out = 0; PyObject *__pyx_v_fill_value = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("take_1d_float64_float64 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_values,&__pyx_n_s_indexer,&__pyx_n_s_out,&__pyx_n_s_fill_value,0}; PyObject* values[4] = {0,0,0,0}; values[3] = __pyx_k__118; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_values)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_indexer)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_1d_float64_float64", 0, 3, 4, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2544; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_out)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_1d_float64_float64", 0, 3, 4, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2544; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_fill_value); if (value) { values[3] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "take_1d_float64_float64") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2544; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_values = ((PyArrayObject *)values[0]); __pyx_v_indexer = ((PyArrayObject *)values[1]); __pyx_v_out = ((PyArrayObject *)values[2]); __pyx_v_fill_value = values[3]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("take_1d_float64_float64", 0, 3, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2544; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.take_1d_float64_float64", __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_filename = __pyx_f[2]; __pyx_lineno = 2544; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_indexer), __pyx_ptype_5numpy_ndarray, 1, "indexer", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2545; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_5numpy_ndarray, 1, "out", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2546; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_256take_1d_float64_float64(__pyx_self, __pyx_v_values, __pyx_v_indexer, __pyx_v_out, __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_5algos_256take_1d_float64_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_n; Py_ssize_t __pyx_v_idx; __pyx_t_5numpy_float64_t __pyx_v_fv; __Pyx_LocalBuf_ND __pyx_pybuffernd_indexer; __Pyx_Buffer __pyx_pybuffer_indexer; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_values; __Pyx_Buffer __pyx_pybuffer_values; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; __pyx_t_5numpy_float64_t __pyx_t_2; Py_ssize_t __pyx_t_3; int __pyx_t_4; int __pyx_t_5; Py_ssize_t __pyx_t_6; Py_ssize_t __pyx_t_7; Py_ssize_t __pyx_t_8; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("take_1d_float64_float64", 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_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; { __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_filename = __pyx_f[2]; __pyx_lineno = 2544; __pyx_clineno = __LINE__; goto __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_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2544; __pyx_clineno = __LINE__; goto __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_BufFmt_StackElem __pyx_stack[1]; 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)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2544; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; /* "pandas/src/generated.pyx":2552 * float64_t fv * * n = len(indexer) # <<<<<<<<<<<<<< * * fv = fill_value */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_indexer)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2552; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/src/generated.pyx":2554 * n = len(indexer) * * fv = fill_value # <<<<<<<<<<<<<< * for i from 0 <= i < n: * idx = indexer[i] */ __pyx_t_2 = __pyx_PyFloat_AsDouble(__pyx_v_fill_value); if (unlikely((__pyx_t_2 == (npy_float64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2554; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_fv = __pyx_t_2; /* "pandas/src/generated.pyx":2555 * * fv = fill_value * for i from 0 <= i < n: # <<<<<<<<<<<<<< * idx = indexer[i] * if idx == -1: */ __pyx_t_1 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_1; __pyx_v_i++) { /* "pandas/src/generated.pyx":2556 * fv = fill_value * for i from 0 <= i < n: * idx = indexer[i] # <<<<<<<<<<<<<< * if idx == -1: * out[i] = fv */ __pyx_t_3 = __pyx_v_i; __pyx_t_4 = -1; if (__pyx_t_3 < 0) { __pyx_t_4 = 0; } else if (unlikely(__pyx_t_3 >= __pyx_pybuffernd_indexer.diminfo[0].shape)) __pyx_t_4 = 0; if (unlikely(__pyx_t_4 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_4); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2556; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_idx = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_3, __pyx_pybuffernd_indexer.diminfo[0].strides)); /* "pandas/src/generated.pyx":2557 * for i from 0 <= i < n: * idx = indexer[i] * if idx == -1: # <<<<<<<<<<<<<< * out[i] = fv * else: */ __pyx_t_5 = ((__pyx_v_idx == -1) != 0); if (__pyx_t_5) { /* "pandas/src/generated.pyx":2558 * idx = indexer[i] * if idx == -1: * out[i] = fv # <<<<<<<<<<<<<< * else: * out[i] = values[idx] */ __pyx_t_6 = __pyx_v_i; __pyx_t_4 = -1; if (__pyx_t_6 < 0) { __pyx_t_4 = 0; } else if (unlikely(__pyx_t_6 >= __pyx_pybuffernd_out.diminfo[0].shape)) __pyx_t_4 = 0; if (unlikely(__pyx_t_4 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_4); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2558; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_6, __pyx_pybuffernd_out.diminfo[0].strides) = __pyx_v_fv; goto __pyx_L5; } /*else*/ { /* "pandas/src/generated.pyx":2560 * out[i] = fv * else: * out[i] = values[idx] # <<<<<<<<<<<<<< * * @cython.wraparound(False) */ __pyx_t_7 = __pyx_v_idx; __pyx_t_4 = -1; if (__pyx_t_7 < 0) { __pyx_t_4 = 0; } else if (unlikely(__pyx_t_7 >= __pyx_pybuffernd_values.diminfo[0].shape)) __pyx_t_4 = 0; if (unlikely(__pyx_t_4 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_4); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2560; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_8 = __pyx_v_i; __pyx_t_4 = -1; if (__pyx_t_8 < 0) { __pyx_t_4 = 0; } else if (unlikely(__pyx_t_8 >= __pyx_pybuffernd_out.diminfo[0].shape)) __pyx_t_4 = 0; if (unlikely(__pyx_t_4 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_4); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2560; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_8, __pyx_pybuffernd_out.diminfo[0].strides) = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_7, __pyx_pybuffernd_values.diminfo[0].strides)); } __pyx_L5:; } /* "pandas/src/generated.pyx":2544 * * @cython.wraparound(False) * def take_1d_float64_float64(ndarray[float64_t] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[float64_t] out, */ /* 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_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.take_1d_float64_float64", __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_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":2563 * * @cython.wraparound(False) * def take_1d_object_object(ndarray[object] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[object] out, */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_259take_1d_object_object(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_259take_1d_object_object = {__Pyx_NAMESTR("take_1d_object_object"), (PyCFunction)__pyx_pw_6pandas_5algos_259take_1d_object_object, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_259take_1d_object_object(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_values = 0; PyArrayObject *__pyx_v_indexer = 0; PyArrayObject *__pyx_v_out = 0; PyObject *__pyx_v_fill_value = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("take_1d_object_object (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_values,&__pyx_n_s_indexer,&__pyx_n_s_out,&__pyx_n_s_fill_value,0}; PyObject* values[4] = {0,0,0,0}; values[3] = __pyx_k__119; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_values)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_indexer)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_1d_object_object", 0, 3, 4, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2563; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_out)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_1d_object_object", 0, 3, 4, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2563; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_fill_value); if (value) { values[3] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "take_1d_object_object") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2563; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_values = ((PyArrayObject *)values[0]); __pyx_v_indexer = ((PyArrayObject *)values[1]); __pyx_v_out = ((PyArrayObject *)values[2]); __pyx_v_fill_value = values[3]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("take_1d_object_object", 0, 3, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2563; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.take_1d_object_object", __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_filename = __pyx_f[2]; __pyx_lineno = 2563; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_indexer), __pyx_ptype_5numpy_ndarray, 1, "indexer", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2564; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_5numpy_ndarray, 1, "out", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2565; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_258take_1d_object_object(__pyx_self, __pyx_v_values, __pyx_v_indexer, __pyx_v_out, __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_5algos_258take_1d_object_object(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_n; Py_ssize_t __pyx_v_idx; PyObject *__pyx_v_fv = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_indexer; __Pyx_Buffer __pyx_pybuffer_indexer; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_values; __Pyx_Buffer __pyx_pybuffer_values; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; Py_ssize_t __pyx_t_2; int __pyx_t_3; int __pyx_t_4; Py_ssize_t __pyx_t_5; PyObject **__pyx_t_6; PyObject *__pyx_t_7 = NULL; Py_ssize_t __pyx_t_8; Py_ssize_t __pyx_t_9; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("take_1d_object_object", 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_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; { __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_filename = __pyx_f[2]; __pyx_lineno = 2563; __pyx_clineno = __LINE__; goto __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_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2563; __pyx_clineno = __LINE__; goto __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_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_v_out, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2563; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; /* "pandas/src/generated.pyx":2571 * object fv * * n = len(indexer) # <<<<<<<<<<<<<< * * fv = fill_value */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_indexer)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2571; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/src/generated.pyx":2573 * n = len(indexer) * * fv = fill_value # <<<<<<<<<<<<<< * for i from 0 <= i < n: * idx = indexer[i] */ __Pyx_INCREF(__pyx_v_fill_value); __pyx_v_fv = __pyx_v_fill_value; /* "pandas/src/generated.pyx":2574 * * fv = fill_value * for i from 0 <= i < n: # <<<<<<<<<<<<<< * idx = indexer[i] * if idx == -1: */ __pyx_t_1 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_1; __pyx_v_i++) { /* "pandas/src/generated.pyx":2575 * fv = fill_value * for i from 0 <= i < n: * idx = indexer[i] # <<<<<<<<<<<<<< * if idx == -1: * out[i] = fv */ __pyx_t_2 = __pyx_v_i; __pyx_t_3 = -1; if (__pyx_t_2 < 0) { __pyx_t_3 = 0; } else if (unlikely(__pyx_t_2 >= __pyx_pybuffernd_indexer.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2575; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_idx = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_2, __pyx_pybuffernd_indexer.diminfo[0].strides)); /* "pandas/src/generated.pyx":2576 * for i from 0 <= i < n: * idx = indexer[i] * if idx == -1: # <<<<<<<<<<<<<< * out[i] = fv * else: */ __pyx_t_4 = ((__pyx_v_idx == -1) != 0); if (__pyx_t_4) { /* "pandas/src/generated.pyx":2577 * idx = indexer[i] * if idx == -1: * out[i] = fv # <<<<<<<<<<<<<< * else: * out[i] = values[idx] */ __pyx_t_5 = __pyx_v_i; __pyx_t_3 = -1; if (__pyx_t_5 < 0) { __pyx_t_3 = 0; } else if (unlikely(__pyx_t_5 >= __pyx_pybuffernd_out.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2577; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_6 = __Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_5, __pyx_pybuffernd_out.diminfo[0].strides); __Pyx_GOTREF(*__pyx_t_6); __Pyx_INCREF(__pyx_v_fv); __Pyx_DECREF(*__pyx_t_6); *__pyx_t_6 = __pyx_v_fv; __Pyx_GIVEREF(*__pyx_t_6); goto __pyx_L5; } /*else*/ { /* "pandas/src/generated.pyx":2579 * out[i] = fv * else: * out[i] = values[idx] # <<<<<<<<<<<<<< * * */ __pyx_t_8 = __pyx_v_idx; __pyx_t_3 = -1; if (__pyx_t_8 < 0) { __pyx_t_3 = 0; } else if (unlikely(__pyx_t_8 >= __pyx_pybuffernd_values.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2579; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_7 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_8, __pyx_pybuffernd_values.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_7); __pyx_t_9 = __pyx_v_i; __pyx_t_3 = -1; if (__pyx_t_9 < 0) { __pyx_t_3 = 0; } else if (unlikely(__pyx_t_9 >= __pyx_pybuffernd_out.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2579; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_6 = __Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_9, __pyx_pybuffernd_out.diminfo[0].strides); __Pyx_GOTREF(*__pyx_t_6); __Pyx_INCREF(__pyx_t_7); __Pyx_DECREF(*__pyx_t_6); *__pyx_t_6 = __pyx_t_7; __Pyx_GIVEREF(*__pyx_t_6); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } __pyx_L5:; } /* "pandas/src/generated.pyx":2563 * * @cython.wraparound(False) * def take_1d_object_object(ndarray[object] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[object] out, */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_7); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.take_1d_object_object", __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_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF(__pyx_v_fv); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":2584 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_axis0_bool_bool(ndarray[uint8_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[uint8_t, ndim=2] out, */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_261take_2d_axis0_bool_bool(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_261take_2d_axis0_bool_bool = {__Pyx_NAMESTR("take_2d_axis0_bool_bool"), (PyCFunction)__pyx_pw_6pandas_5algos_261take_2d_axis0_bool_bool, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_261take_2d_axis0_bool_bool(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_values = 0; PyArrayObject *__pyx_v_indexer = 0; PyArrayObject *__pyx_v_out = 0; PyObject *__pyx_v_fill_value = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("take_2d_axis0_bool_bool (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_values,&__pyx_n_s_indexer,&__pyx_n_s_out,&__pyx_n_s_fill_value,0}; PyObject* values[4] = {0,0,0,0}; values[3] = __pyx_k__120; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_values)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_indexer)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_2d_axis0_bool_bool", 0, 3, 4, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2584; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_out)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_2d_axis0_bool_bool", 0, 3, 4, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2584; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_fill_value); if (value) { values[3] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "take_2d_axis0_bool_bool") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2584; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_values = ((PyArrayObject *)values[0]); __pyx_v_indexer = ((PyArrayObject *)values[1]); __pyx_v_out = ((PyArrayObject *)values[2]); __pyx_v_fill_value = values[3]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("take_2d_axis0_bool_bool", 0, 3, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2584; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.take_2d_axis0_bool_bool", __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_filename = __pyx_f[2]; __pyx_lineno = 2584; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_indexer), __pyx_ptype_5numpy_ndarray, 1, "indexer", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2585; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_5numpy_ndarray, 1, "out", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2586; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_260take_2d_axis0_bool_bool(__pyx_self, __pyx_v_values, __pyx_v_indexer, __pyx_v_out, __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_5algos_260take_2d_axis0_bool_bool(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_k; Py_ssize_t __pyx_v_n; Py_ssize_t __pyx_v_idx; __pyx_t_5numpy_uint8_t __pyx_v_fv; __pyx_t_5numpy_uint8_t *__pyx_v_v; __pyx_t_5numpy_uint8_t *__pyx_v_o; __Pyx_LocalBuf_ND __pyx_pybuffernd_indexer; __Pyx_Buffer __pyx_pybuffer_indexer; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_values; __Pyx_Buffer __pyx_pybuffer_values; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; __pyx_t_5numpy_uint8_t __pyx_t_2; int __pyx_t_3; int __pyx_t_4; int __pyx_t_5; int __pyx_t_6; Py_ssize_t __pyx_t_7; Py_ssize_t __pyx_t_8; Py_ssize_t __pyx_t_9; Py_ssize_t __pyx_t_10; long __pyx_t_11; Py_ssize_t __pyx_t_12; long __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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("take_2d_axis0_bool_bool", 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_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; { __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_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2584; __pyx_clineno = __LINE__; goto __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_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1]; { __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_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2584; __pyx_clineno = __LINE__; goto __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_BufFmt_StackElem __pyx_stack[1]; 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, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2584; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; __pyx_pybuffernd_out.diminfo[1].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_out.diminfo[1].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[1]; /* "pandas/src/generated.pyx":2592 * uint8_t fv * * n = len(indexer) # <<<<<<<<<<<<<< * k = values.shape[1] * */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_indexer)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2592; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/src/generated.pyx":2593 * * n = len(indexer) * k = values.shape[1] # <<<<<<<<<<<<<< * * fv = fill_value */ __pyx_v_k = (__pyx_v_values->dimensions[1]); /* "pandas/src/generated.pyx":2595 * k = values.shape[1] * * fv = fill_value # <<<<<<<<<<<<<< * * IF True: */ __pyx_t_2 = __Pyx_PyInt_As_npy_uint8(__pyx_v_fill_value); if (unlikely((__pyx_t_2 == (npy_uint8)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2595; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_fv = __pyx_t_2; /* "pandas/src/generated.pyx":2601 * uint8_t *v, *o * * if (values.strides[1] == out.strides[1] and # <<<<<<<<<<<<<< * values.strides[1] == sizeof(uint8_t) and * sizeof(uint8_t) * n >= 256): */ __pyx_t_3 = (((__pyx_v_values->strides[1]) == (__pyx_v_out->strides[1])) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":2602 * * if (values.strides[1] == out.strides[1] and * values.strides[1] == sizeof(uint8_t) and # <<<<<<<<<<<<<< * sizeof(uint8_t) * n >= 256): * */ __pyx_t_4 = (((__pyx_v_values->strides[1]) == (sizeof(__pyx_t_5numpy_uint8_t))) != 0); if (__pyx_t_4) { /* "pandas/src/generated.pyx":2603 * if (values.strides[1] == out.strides[1] and * values.strides[1] == sizeof(uint8_t) and * sizeof(uint8_t) * n >= 256): # <<<<<<<<<<<<<< * * for i from 0 <= i < n: */ __pyx_t_5 = ((((sizeof(__pyx_t_5numpy_uint8_t)) * __pyx_v_n) >= 256) != 0); __pyx_t_6 = __pyx_t_5; } else { __pyx_t_6 = __pyx_t_4; } __pyx_t_4 = __pyx_t_6; } else { __pyx_t_4 = __pyx_t_3; } if (__pyx_t_4) { /* "pandas/src/generated.pyx":2605 * sizeof(uint8_t) * n >= 256): * * for i from 0 <= i < n: # <<<<<<<<<<<<<< * idx = indexer[i] * if idx == -1: */ __pyx_t_1 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_1; __pyx_v_i++) { /* "pandas/src/generated.pyx":2606 * * for i from 0 <= i < n: * idx = indexer[i] # <<<<<<<<<<<<<< * if idx == -1: * for j from 0 <= j < k: */ __pyx_t_7 = __pyx_v_i; __pyx_v_idx = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_7, __pyx_pybuffernd_indexer.diminfo[0].strides)); /* "pandas/src/generated.pyx":2607 * for i from 0 <= i < n: * idx = indexer[i] * if idx == -1: # <<<<<<<<<<<<<< * for j from 0 <= j < k: * out[i, j] = fv */ __pyx_t_4 = ((__pyx_v_idx == -1) != 0); if (__pyx_t_4) { /* "pandas/src/generated.pyx":2608 * idx = indexer[i] * if idx == -1: * for j from 0 <= j < k: # <<<<<<<<<<<<<< * out[i, j] = fv * else: */ __pyx_t_8 = __pyx_v_k; for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_8; __pyx_v_j++) { /* "pandas/src/generated.pyx":2609 * if idx == -1: * for j from 0 <= j < k: * out[i, j] = fv # <<<<<<<<<<<<<< * else: * v = &values[idx, 0] */ __pyx_t_9 = __pyx_v_i; __pyx_t_10 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_9, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_10, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_fv; } goto __pyx_L6; } /*else*/ { /* "pandas/src/generated.pyx":2611 * out[i, j] = fv * else: * v = &values[idx, 0] # <<<<<<<<<<<<<< * o = &out[i, 0] * memmove(o, v, (sizeof(uint8_t) * k)) */ __pyx_t_8 = __pyx_v_idx; __pyx_t_11 = 0; __pyx_v_v = (&(*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_8, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_11, __pyx_pybuffernd_values.diminfo[1].strides))); /* "pandas/src/generated.pyx":2612 * else: * v = &values[idx, 0] * o = &out[i, 0] # <<<<<<<<<<<<<< * memmove(o, v, (sizeof(uint8_t) * k)) * return */ __pyx_t_12 = __pyx_v_i; __pyx_t_13 = 0; __pyx_v_o = (&(*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_12, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_13, __pyx_pybuffernd_out.diminfo[1].strides))); /* "pandas/src/generated.pyx":2613 * v = &values[idx, 0] * o = &out[i, 0] * memmove(o, v, (sizeof(uint8_t) * k)) # <<<<<<<<<<<<<< * return * */ memmove(__pyx_v_o, __pyx_v_v, ((size_t)((sizeof(__pyx_t_5numpy_uint8_t)) * __pyx_v_k))); } __pyx_L6:; } /* "pandas/src/generated.pyx":2614 * o = &out[i, 0] * memmove(o, v, (sizeof(uint8_t) * k)) * return # <<<<<<<<<<<<<< * * for i from 0 <= i < n: */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; } /* "pandas/src/generated.pyx":2616 * return * * for i from 0 <= i < n: # <<<<<<<<<<<<<< * idx = indexer[i] * if idx == -1: */ __pyx_t_1 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_1; __pyx_v_i++) { /* "pandas/src/generated.pyx":2617 * * for i from 0 <= i < n: * idx = indexer[i] # <<<<<<<<<<<<<< * if idx == -1: * for j from 0 <= j < k: */ __pyx_t_14 = __pyx_v_i; __pyx_v_idx = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_indexer.diminfo[0].strides)); /* "pandas/src/generated.pyx":2618 * for i from 0 <= i < n: * idx = indexer[i] * if idx == -1: # <<<<<<<<<<<<<< * for j from 0 <= j < k: * out[i, j] = fv */ __pyx_t_4 = ((__pyx_v_idx == -1) != 0); if (__pyx_t_4) { /* "pandas/src/generated.pyx":2619 * idx = indexer[i] * if idx == -1: * for j from 0 <= j < k: # <<<<<<<<<<<<<< * out[i, j] = fv * else: */ __pyx_t_15 = __pyx_v_k; for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_15; __pyx_v_j++) { /* "pandas/src/generated.pyx":2620 * if idx == -1: * for j from 0 <= j < k: * out[i, j] = fv # <<<<<<<<<<<<<< * else: * for j from 0 <= j < k: */ __pyx_t_16 = __pyx_v_i; __pyx_t_17 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_17, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_fv; } goto __pyx_L11; } /*else*/ { /* "pandas/src/generated.pyx":2622 * out[i, j] = fv * else: * for j from 0 <= j < k: # <<<<<<<<<<<<<< * out[i, j] = values[idx, j] * */ __pyx_t_15 = __pyx_v_k; for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_15; __pyx_v_j++) { /* "pandas/src/generated.pyx":2623 * else: * for j from 0 <= j < k: * out[i, j] = values[idx, j] # <<<<<<<<<<<<<< * * @cython.wraparound(False) */ __pyx_t_18 = __pyx_v_idx; __pyx_t_19 = __pyx_v_j; __pyx_t_20 = __pyx_v_i; __pyx_t_21 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_21, __pyx_pybuffernd_out.diminfo[1].strides) = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_19, __pyx_pybuffernd_values.diminfo[1].strides)); } } __pyx_L11:; } /* "pandas/src/generated.pyx":2584 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_axis0_bool_bool(ndarray[uint8_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[uint8_t, ndim=2] out, */ /* 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_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.take_2d_axis0_bool_bool", __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_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":2627 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_axis0_bool_object(ndarray[uint8_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[object, ndim=2] out, */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_263take_2d_axis0_bool_object(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_263take_2d_axis0_bool_object = {__Pyx_NAMESTR("take_2d_axis0_bool_object"), (PyCFunction)__pyx_pw_6pandas_5algos_263take_2d_axis0_bool_object, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_263take_2d_axis0_bool_object(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_values = 0; PyArrayObject *__pyx_v_indexer = 0; PyArrayObject *__pyx_v_out = 0; PyObject *__pyx_v_fill_value = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("take_2d_axis0_bool_object (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_values,&__pyx_n_s_indexer,&__pyx_n_s_out,&__pyx_n_s_fill_value,0}; PyObject* values[4] = {0,0,0,0}; values[3] = __pyx_k__121; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_values)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_indexer)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_2d_axis0_bool_object", 0, 3, 4, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2627; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_out)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_2d_axis0_bool_object", 0, 3, 4, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2627; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_fill_value); if (value) { values[3] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "take_2d_axis0_bool_object") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2627; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_values = ((PyArrayObject *)values[0]); __pyx_v_indexer = ((PyArrayObject *)values[1]); __pyx_v_out = ((PyArrayObject *)values[2]); __pyx_v_fill_value = values[3]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("take_2d_axis0_bool_object", 0, 3, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2627; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.take_2d_axis0_bool_object", __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_filename = __pyx_f[2]; __pyx_lineno = 2627; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_indexer), __pyx_ptype_5numpy_ndarray, 1, "indexer", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2628; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_5numpy_ndarray, 1, "out", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2629; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_262take_2d_axis0_bool_object(__pyx_self, __pyx_v_values, __pyx_v_indexer, __pyx_v_out, __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_5algos_262take_2d_axis0_bool_object(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_k; Py_ssize_t __pyx_v_n; Py_ssize_t __pyx_v_idx; PyObject *__pyx_v_fv = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_indexer; __Pyx_Buffer __pyx_pybuffer_indexer; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_values; __Pyx_Buffer __pyx_pybuffer_values; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; Py_ssize_t __pyx_t_2; int __pyx_t_3; Py_ssize_t __pyx_t_4; Py_ssize_t __pyx_t_5; Py_ssize_t __pyx_t_6; PyObject **__pyx_t_7; PyObject *__pyx_t_8 = NULL; Py_ssize_t __pyx_t_9; Py_ssize_t __pyx_t_10; Py_ssize_t __pyx_t_11; Py_ssize_t __pyx_t_12; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("take_2d_axis0_bool_object", 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_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; { __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_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2627; __pyx_clineno = __LINE__; goto __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_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1]; { __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_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2627; __pyx_clineno = __LINE__; goto __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_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_v_out, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2627; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; __pyx_pybuffernd_out.diminfo[1].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_out.diminfo[1].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[1]; /* "pandas/src/generated.pyx":2635 * object fv * * n = len(indexer) # <<<<<<<<<<<<<< * k = values.shape[1] * */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_indexer)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2635; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/src/generated.pyx":2636 * * n = len(indexer) * k = values.shape[1] # <<<<<<<<<<<<<< * * fv = fill_value */ __pyx_v_k = (__pyx_v_values->dimensions[1]); /* "pandas/src/generated.pyx":2638 * k = values.shape[1] * * fv = fill_value # <<<<<<<<<<<<<< * * IF False: */ __Pyx_INCREF(__pyx_v_fill_value); __pyx_v_fv = __pyx_v_fill_value; /* "pandas/src/generated.pyx":2659 * return * * for i from 0 <= i < n: # <<<<<<<<<<<<<< * idx = indexer[i] * if idx == -1: */ __pyx_t_1 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_1; __pyx_v_i++) { /* "pandas/src/generated.pyx":2660 * * for i from 0 <= i < n: * idx = indexer[i] # <<<<<<<<<<<<<< * if idx == -1: * for j from 0 <= j < k: */ __pyx_t_2 = __pyx_v_i; __pyx_v_idx = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_2, __pyx_pybuffernd_indexer.diminfo[0].strides)); /* "pandas/src/generated.pyx":2661 * for i from 0 <= i < n: * idx = indexer[i] * if idx == -1: # <<<<<<<<<<<<<< * for j from 0 <= j < k: * out[i, j] = fv */ __pyx_t_3 = ((__pyx_v_idx == -1) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":2662 * idx = indexer[i] * if idx == -1: * for j from 0 <= j < k: # <<<<<<<<<<<<<< * out[i, j] = fv * else: */ __pyx_t_4 = __pyx_v_k; for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_4; __pyx_v_j++) { /* "pandas/src/generated.pyx":2663 * if idx == -1: * for j from 0 <= j < k: * out[i, j] = fv # <<<<<<<<<<<<<< * else: * for j from 0 <= j < k: */ __pyx_t_5 = __pyx_v_i; __pyx_t_6 = __pyx_v_j; __pyx_t_7 = __Pyx_BufPtrStrided2d(PyObject **, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_5, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_6, __pyx_pybuffernd_out.diminfo[1].strides); __Pyx_GOTREF(*__pyx_t_7); __Pyx_INCREF(__pyx_v_fv); __Pyx_DECREF(*__pyx_t_7); *__pyx_t_7 = __pyx_v_fv; __Pyx_GIVEREF(*__pyx_t_7); } goto __pyx_L5; } /*else*/ { /* "pandas/src/generated.pyx":2665 * out[i, j] = fv * else: * for j from 0 <= j < k: # <<<<<<<<<<<<<< * out[i, j] = True if values[idx, j] > 0 else False * */ __pyx_t_4 = __pyx_v_k; for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_4; __pyx_v_j++) { /* "pandas/src/generated.pyx":2666 * else: * for j from 0 <= j < k: * out[i, j] = True if values[idx, j] > 0 else False # <<<<<<<<<<<<<< * * @cython.wraparound(False) */ __pyx_t_9 = __pyx_v_idx; __pyx_t_10 = __pyx_v_j; if ((((*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_9, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_10, __pyx_pybuffernd_values.diminfo[1].strides)) > 0) != 0)) { __Pyx_INCREF(Py_True); __pyx_t_8 = Py_True; } else { __Pyx_INCREF(Py_False); __pyx_t_8 = Py_False; } __pyx_t_11 = __pyx_v_i; __pyx_t_12 = __pyx_v_j; __pyx_t_7 = __Pyx_BufPtrStrided2d(PyObject **, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_11, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_12, __pyx_pybuffernd_out.diminfo[1].strides); __Pyx_GOTREF(*__pyx_t_7); __Pyx_INCREF(__pyx_t_8); __Pyx_DECREF(*__pyx_t_7); *__pyx_t_7 = __pyx_t_8; __Pyx_GIVEREF(*__pyx_t_7); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } } __pyx_L5:; } /* "pandas/src/generated.pyx":2627 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_axis0_bool_object(ndarray[uint8_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[object, ndim=2] out, */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_8); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.take_2d_axis0_bool_object", __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_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF(__pyx_v_fv); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":2670 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_axis0_int8_int8(ndarray[int8_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[int8_t, ndim=2] out, */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_265take_2d_axis0_int8_int8(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_265take_2d_axis0_int8_int8 = {__Pyx_NAMESTR("take_2d_axis0_int8_int8"), (PyCFunction)__pyx_pw_6pandas_5algos_265take_2d_axis0_int8_int8, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_265take_2d_axis0_int8_int8(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_values = 0; PyArrayObject *__pyx_v_indexer = 0; PyArrayObject *__pyx_v_out = 0; PyObject *__pyx_v_fill_value = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("take_2d_axis0_int8_int8 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_values,&__pyx_n_s_indexer,&__pyx_n_s_out,&__pyx_n_s_fill_value,0}; PyObject* values[4] = {0,0,0,0}; values[3] = __pyx_k__122; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_values)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_indexer)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_2d_axis0_int8_int8", 0, 3, 4, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2670; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_out)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_2d_axis0_int8_int8", 0, 3, 4, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2670; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_fill_value); if (value) { values[3] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "take_2d_axis0_int8_int8") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2670; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_values = ((PyArrayObject *)values[0]); __pyx_v_indexer = ((PyArrayObject *)values[1]); __pyx_v_out = ((PyArrayObject *)values[2]); __pyx_v_fill_value = values[3]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("take_2d_axis0_int8_int8", 0, 3, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2670; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.take_2d_axis0_int8_int8", __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_filename = __pyx_f[2]; __pyx_lineno = 2670; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_indexer), __pyx_ptype_5numpy_ndarray, 1, "indexer", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2671; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_5numpy_ndarray, 1, "out", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2672; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_264take_2d_axis0_int8_int8(__pyx_self, __pyx_v_values, __pyx_v_indexer, __pyx_v_out, __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_5algos_264take_2d_axis0_int8_int8(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_k; Py_ssize_t __pyx_v_n; Py_ssize_t __pyx_v_idx; __pyx_t_5numpy_int8_t __pyx_v_fv; __pyx_t_5numpy_int8_t *__pyx_v_v; __pyx_t_5numpy_int8_t *__pyx_v_o; __Pyx_LocalBuf_ND __pyx_pybuffernd_indexer; __Pyx_Buffer __pyx_pybuffer_indexer; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_values; __Pyx_Buffer __pyx_pybuffer_values; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; __pyx_t_5numpy_int8_t __pyx_t_2; int __pyx_t_3; int __pyx_t_4; int __pyx_t_5; int __pyx_t_6; Py_ssize_t __pyx_t_7; Py_ssize_t __pyx_t_8; Py_ssize_t __pyx_t_9; Py_ssize_t __pyx_t_10; long __pyx_t_11; Py_ssize_t __pyx_t_12; long __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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("take_2d_axis0_int8_int8", 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_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; { __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_int8_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2670; __pyx_clineno = __LINE__; goto __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_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1]; { __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_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2670; __pyx_clineno = __LINE__; goto __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_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_v_out, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int8_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2670; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; __pyx_pybuffernd_out.diminfo[1].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_out.diminfo[1].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[1]; /* "pandas/src/generated.pyx":2678 * int8_t fv * * n = len(indexer) # <<<<<<<<<<<<<< * k = values.shape[1] * */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_indexer)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2678; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/src/generated.pyx":2679 * * n = len(indexer) * k = values.shape[1] # <<<<<<<<<<<<<< * * fv = fill_value */ __pyx_v_k = (__pyx_v_values->dimensions[1]); /* "pandas/src/generated.pyx":2681 * k = values.shape[1] * * fv = fill_value # <<<<<<<<<<<<<< * * IF True: */ __pyx_t_2 = __Pyx_PyInt_As_npy_int8(__pyx_v_fill_value); if (unlikely((__pyx_t_2 == (npy_int8)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2681; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_fv = __pyx_t_2; /* "pandas/src/generated.pyx":2687 * int8_t *v, *o * * if (values.strides[1] == out.strides[1] and # <<<<<<<<<<<<<< * values.strides[1] == sizeof(int8_t) and * sizeof(int8_t) * n >= 256): */ __pyx_t_3 = (((__pyx_v_values->strides[1]) == (__pyx_v_out->strides[1])) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":2688 * * if (values.strides[1] == out.strides[1] and * values.strides[1] == sizeof(int8_t) and # <<<<<<<<<<<<<< * sizeof(int8_t) * n >= 256): * */ __pyx_t_4 = (((__pyx_v_values->strides[1]) == (sizeof(__pyx_t_5numpy_int8_t))) != 0); if (__pyx_t_4) { /* "pandas/src/generated.pyx":2689 * if (values.strides[1] == out.strides[1] and * values.strides[1] == sizeof(int8_t) and * sizeof(int8_t) * n >= 256): # <<<<<<<<<<<<<< * * for i from 0 <= i < n: */ __pyx_t_5 = ((((sizeof(__pyx_t_5numpy_int8_t)) * __pyx_v_n) >= 256) != 0); __pyx_t_6 = __pyx_t_5; } else { __pyx_t_6 = __pyx_t_4; } __pyx_t_4 = __pyx_t_6; } else { __pyx_t_4 = __pyx_t_3; } if (__pyx_t_4) { /* "pandas/src/generated.pyx":2691 * sizeof(int8_t) * n >= 256): * * for i from 0 <= i < n: # <<<<<<<<<<<<<< * idx = indexer[i] * if idx == -1: */ __pyx_t_1 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_1; __pyx_v_i++) { /* "pandas/src/generated.pyx":2692 * * for i from 0 <= i < n: * idx = indexer[i] # <<<<<<<<<<<<<< * if idx == -1: * for j from 0 <= j < k: */ __pyx_t_7 = __pyx_v_i; __pyx_v_idx = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_7, __pyx_pybuffernd_indexer.diminfo[0].strides)); /* "pandas/src/generated.pyx":2693 * for i from 0 <= i < n: * idx = indexer[i] * if idx == -1: # <<<<<<<<<<<<<< * for j from 0 <= j < k: * out[i, j] = fv */ __pyx_t_4 = ((__pyx_v_idx == -1) != 0); if (__pyx_t_4) { /* "pandas/src/generated.pyx":2694 * idx = indexer[i] * if idx == -1: * for j from 0 <= j < k: # <<<<<<<<<<<<<< * out[i, j] = fv * else: */ __pyx_t_8 = __pyx_v_k; for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_8; __pyx_v_j++) { /* "pandas/src/generated.pyx":2695 * if idx == -1: * for j from 0 <= j < k: * out[i, j] = fv # <<<<<<<<<<<<<< * else: * v = &values[idx, 0] */ __pyx_t_9 = __pyx_v_i; __pyx_t_10 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int8_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_9, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_10, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_fv; } goto __pyx_L6; } /*else*/ { /* "pandas/src/generated.pyx":2697 * out[i, j] = fv * else: * v = &values[idx, 0] # <<<<<<<<<<<<<< * o = &out[i, 0] * memmove(o, v, (sizeof(int8_t) * k)) */ __pyx_t_8 = __pyx_v_idx; __pyx_t_11 = 0; __pyx_v_v = (&(*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int8_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_8, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_11, __pyx_pybuffernd_values.diminfo[1].strides))); /* "pandas/src/generated.pyx":2698 * else: * v = &values[idx, 0] * o = &out[i, 0] # <<<<<<<<<<<<<< * memmove(o, v, (sizeof(int8_t) * k)) * return */ __pyx_t_12 = __pyx_v_i; __pyx_t_13 = 0; __pyx_v_o = (&(*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int8_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_12, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_13, __pyx_pybuffernd_out.diminfo[1].strides))); /* "pandas/src/generated.pyx":2699 * v = &values[idx, 0] * o = &out[i, 0] * memmove(o, v, (sizeof(int8_t) * k)) # <<<<<<<<<<<<<< * return * */ memmove(__pyx_v_o, __pyx_v_v, ((size_t)((sizeof(__pyx_t_5numpy_int8_t)) * __pyx_v_k))); } __pyx_L6:; } /* "pandas/src/generated.pyx":2700 * o = &out[i, 0] * memmove(o, v, (sizeof(int8_t) * k)) * return # <<<<<<<<<<<<<< * * for i from 0 <= i < n: */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; } /* "pandas/src/generated.pyx":2702 * return * * for i from 0 <= i < n: # <<<<<<<<<<<<<< * idx = indexer[i] * if idx == -1: */ __pyx_t_1 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_1; __pyx_v_i++) { /* "pandas/src/generated.pyx":2703 * * for i from 0 <= i < n: * idx = indexer[i] # <<<<<<<<<<<<<< * if idx == -1: * for j from 0 <= j < k: */ __pyx_t_14 = __pyx_v_i; __pyx_v_idx = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_indexer.diminfo[0].strides)); /* "pandas/src/generated.pyx":2704 * for i from 0 <= i < n: * idx = indexer[i] * if idx == -1: # <<<<<<<<<<<<<< * for j from 0 <= j < k: * out[i, j] = fv */ __pyx_t_4 = ((__pyx_v_idx == -1) != 0); if (__pyx_t_4) { /* "pandas/src/generated.pyx":2705 * idx = indexer[i] * if idx == -1: * for j from 0 <= j < k: # <<<<<<<<<<<<<< * out[i, j] = fv * else: */ __pyx_t_15 = __pyx_v_k; for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_15; __pyx_v_j++) { /* "pandas/src/generated.pyx":2706 * if idx == -1: * for j from 0 <= j < k: * out[i, j] = fv # <<<<<<<<<<<<<< * else: * for j from 0 <= j < k: */ __pyx_t_16 = __pyx_v_i; __pyx_t_17 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int8_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_17, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_fv; } goto __pyx_L11; } /*else*/ { /* "pandas/src/generated.pyx":2708 * out[i, j] = fv * else: * for j from 0 <= j < k: # <<<<<<<<<<<<<< * out[i, j] = values[idx, j] * */ __pyx_t_15 = __pyx_v_k; for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_15; __pyx_v_j++) { /* "pandas/src/generated.pyx":2709 * else: * for j from 0 <= j < k: * out[i, j] = values[idx, j] # <<<<<<<<<<<<<< * * @cython.wraparound(False) */ __pyx_t_18 = __pyx_v_idx; __pyx_t_19 = __pyx_v_j; __pyx_t_20 = __pyx_v_i; __pyx_t_21 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int8_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_21, __pyx_pybuffernd_out.diminfo[1].strides) = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int8_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_19, __pyx_pybuffernd_values.diminfo[1].strides)); } } __pyx_L11:; } /* "pandas/src/generated.pyx":2670 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_axis0_int8_int8(ndarray[int8_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[int8_t, ndim=2] out, */ /* 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_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.take_2d_axis0_int8_int8", __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_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":2713 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_axis0_int8_int32(ndarray[int8_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[int32_t, ndim=2] out, */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_267take_2d_axis0_int8_int32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_267take_2d_axis0_int8_int32 = {__Pyx_NAMESTR("take_2d_axis0_int8_int32"), (PyCFunction)__pyx_pw_6pandas_5algos_267take_2d_axis0_int8_int32, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_267take_2d_axis0_int8_int32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_values = 0; PyArrayObject *__pyx_v_indexer = 0; PyArrayObject *__pyx_v_out = 0; PyObject *__pyx_v_fill_value = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("take_2d_axis0_int8_int32 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_values,&__pyx_n_s_indexer,&__pyx_n_s_out,&__pyx_n_s_fill_value,0}; PyObject* values[4] = {0,0,0,0}; values[3] = __pyx_k__123; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_values)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_indexer)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_2d_axis0_int8_int32", 0, 3, 4, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2713; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_out)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_2d_axis0_int8_int32", 0, 3, 4, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2713; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_fill_value); if (value) { values[3] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "take_2d_axis0_int8_int32") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2713; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_values = ((PyArrayObject *)values[0]); __pyx_v_indexer = ((PyArrayObject *)values[1]); __pyx_v_out = ((PyArrayObject *)values[2]); __pyx_v_fill_value = values[3]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("take_2d_axis0_int8_int32", 0, 3, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2713; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.take_2d_axis0_int8_int32", __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_filename = __pyx_f[2]; __pyx_lineno = 2713; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_indexer), __pyx_ptype_5numpy_ndarray, 1, "indexer", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2714; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_5numpy_ndarray, 1, "out", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2715; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_266take_2d_axis0_int8_int32(__pyx_self, __pyx_v_values, __pyx_v_indexer, __pyx_v_out, __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_5algos_266take_2d_axis0_int8_int32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_k; Py_ssize_t __pyx_v_n; Py_ssize_t __pyx_v_idx; __pyx_t_5numpy_int32_t __pyx_v_fv; __Pyx_LocalBuf_ND __pyx_pybuffernd_indexer; __Pyx_Buffer __pyx_pybuffer_indexer; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_values; __Pyx_Buffer __pyx_pybuffer_values; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; __pyx_t_5numpy_int32_t __pyx_t_2; Py_ssize_t __pyx_t_3; int __pyx_t_4; Py_ssize_t __pyx_t_5; Py_ssize_t __pyx_t_6; Py_ssize_t __pyx_t_7; Py_ssize_t __pyx_t_8; Py_ssize_t __pyx_t_9; Py_ssize_t __pyx_t_10; Py_ssize_t __pyx_t_11; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("take_2d_axis0_int8_int32", 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_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; { __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_int8_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2713; __pyx_clineno = __LINE__; goto __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_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1]; { __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_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2713; __pyx_clineno = __LINE__; goto __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_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_v_out, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2713; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; __pyx_pybuffernd_out.diminfo[1].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_out.diminfo[1].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[1]; /* "pandas/src/generated.pyx":2721 * int32_t fv * * n = len(indexer) # <<<<<<<<<<<<<< * k = values.shape[1] * */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_indexer)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2721; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/src/generated.pyx":2722 * * n = len(indexer) * k = values.shape[1] # <<<<<<<<<<<<<< * * fv = fill_value */ __pyx_v_k = (__pyx_v_values->dimensions[1]); /* "pandas/src/generated.pyx":2724 * k = values.shape[1] * * fv = fill_value # <<<<<<<<<<<<<< * * IF False: */ __pyx_t_2 = __Pyx_PyInt_As_npy_int32(__pyx_v_fill_value); if (unlikely((__pyx_t_2 == (npy_int32)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2724; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_fv = __pyx_t_2; /* "pandas/src/generated.pyx":2745 * return * * for i from 0 <= i < n: # <<<<<<<<<<<<<< * idx = indexer[i] * if idx == -1: */ __pyx_t_1 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_1; __pyx_v_i++) { /* "pandas/src/generated.pyx":2746 * * for i from 0 <= i < n: * idx = indexer[i] # <<<<<<<<<<<<<< * if idx == -1: * for j from 0 <= j < k: */ __pyx_t_3 = __pyx_v_i; __pyx_v_idx = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_3, __pyx_pybuffernd_indexer.diminfo[0].strides)); /* "pandas/src/generated.pyx":2747 * for i from 0 <= i < n: * idx = indexer[i] * if idx == -1: # <<<<<<<<<<<<<< * for j from 0 <= j < k: * out[i, j] = fv */ __pyx_t_4 = ((__pyx_v_idx == -1) != 0); if (__pyx_t_4) { /* "pandas/src/generated.pyx":2748 * idx = indexer[i] * if idx == -1: * for j from 0 <= j < k: # <<<<<<<<<<<<<< * out[i, j] = fv * else: */ __pyx_t_5 = __pyx_v_k; for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_5; __pyx_v_j++) { /* "pandas/src/generated.pyx":2749 * if idx == -1: * for j from 0 <= j < k: * out[i, j] = fv # <<<<<<<<<<<<<< * else: * for j from 0 <= j < k: */ __pyx_t_6 = __pyx_v_i; __pyx_t_7 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_6, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_7, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_fv; } goto __pyx_L5; } /*else*/ { /* "pandas/src/generated.pyx":2751 * out[i, j] = fv * else: * for j from 0 <= j < k: # <<<<<<<<<<<<<< * out[i, j] = values[idx, j] * */ __pyx_t_5 = __pyx_v_k; for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_5; __pyx_v_j++) { /* "pandas/src/generated.pyx":2752 * else: * for j from 0 <= j < k: * out[i, j] = values[idx, j] # <<<<<<<<<<<<<< * * @cython.wraparound(False) */ __pyx_t_8 = __pyx_v_idx; __pyx_t_9 = __pyx_v_j; __pyx_t_10 = __pyx_v_i; __pyx_t_11 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_10, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_11, __pyx_pybuffernd_out.diminfo[1].strides) = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int8_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_8, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_9, __pyx_pybuffernd_values.diminfo[1].strides)); } } __pyx_L5:; } /* "pandas/src/generated.pyx":2713 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_axis0_int8_int32(ndarray[int8_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[int32_t, ndim=2] out, */ /* 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_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.take_2d_axis0_int8_int32", __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_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":2756 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_axis0_int8_int64(ndarray[int8_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[int64_t, ndim=2] out, */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_269take_2d_axis0_int8_int64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_269take_2d_axis0_int8_int64 = {__Pyx_NAMESTR("take_2d_axis0_int8_int64"), (PyCFunction)__pyx_pw_6pandas_5algos_269take_2d_axis0_int8_int64, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_269take_2d_axis0_int8_int64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_values = 0; PyArrayObject *__pyx_v_indexer = 0; PyArrayObject *__pyx_v_out = 0; PyObject *__pyx_v_fill_value = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("take_2d_axis0_int8_int64 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_values,&__pyx_n_s_indexer,&__pyx_n_s_out,&__pyx_n_s_fill_value,0}; PyObject* values[4] = {0,0,0,0}; values[3] = __pyx_k__124; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_values)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_indexer)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_2d_axis0_int8_int64", 0, 3, 4, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2756; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_out)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_2d_axis0_int8_int64", 0, 3, 4, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2756; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_fill_value); if (value) { values[3] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "take_2d_axis0_int8_int64") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2756; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_values = ((PyArrayObject *)values[0]); __pyx_v_indexer = ((PyArrayObject *)values[1]); __pyx_v_out = ((PyArrayObject *)values[2]); __pyx_v_fill_value = values[3]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("take_2d_axis0_int8_int64", 0, 3, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2756; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.take_2d_axis0_int8_int64", __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_filename = __pyx_f[2]; __pyx_lineno = 2756; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_indexer), __pyx_ptype_5numpy_ndarray, 1, "indexer", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2757; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_5numpy_ndarray, 1, "out", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2758; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_268take_2d_axis0_int8_int64(__pyx_self, __pyx_v_values, __pyx_v_indexer, __pyx_v_out, __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_5algos_268take_2d_axis0_int8_int64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_k; Py_ssize_t __pyx_v_n; Py_ssize_t __pyx_v_idx; __pyx_t_5numpy_int64_t __pyx_v_fv; __Pyx_LocalBuf_ND __pyx_pybuffernd_indexer; __Pyx_Buffer __pyx_pybuffer_indexer; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_values; __Pyx_Buffer __pyx_pybuffer_values; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; __pyx_t_5numpy_int64_t __pyx_t_2; Py_ssize_t __pyx_t_3; int __pyx_t_4; Py_ssize_t __pyx_t_5; Py_ssize_t __pyx_t_6; Py_ssize_t __pyx_t_7; Py_ssize_t __pyx_t_8; Py_ssize_t __pyx_t_9; Py_ssize_t __pyx_t_10; Py_ssize_t __pyx_t_11; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("take_2d_axis0_int8_int64", 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_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; { __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_int8_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2756; __pyx_clineno = __LINE__; goto __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_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1]; { __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_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2756; __pyx_clineno = __LINE__; goto __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_BufFmt_StackElem __pyx_stack[1]; 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, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2756; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; __pyx_pybuffernd_out.diminfo[1].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_out.diminfo[1].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[1]; /* "pandas/src/generated.pyx":2764 * int64_t fv * * n = len(indexer) # <<<<<<<<<<<<<< * k = values.shape[1] * */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_indexer)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2764; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/src/generated.pyx":2765 * * n = len(indexer) * k = values.shape[1] # <<<<<<<<<<<<<< * * fv = fill_value */ __pyx_v_k = (__pyx_v_values->dimensions[1]); /* "pandas/src/generated.pyx":2767 * k = values.shape[1] * * fv = fill_value # <<<<<<<<<<<<<< * * IF False: */ __pyx_t_2 = __Pyx_PyInt_As_npy_int64(__pyx_v_fill_value); if (unlikely((__pyx_t_2 == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2767; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_fv = __pyx_t_2; /* "pandas/src/generated.pyx":2788 * return * * for i from 0 <= i < n: # <<<<<<<<<<<<<< * idx = indexer[i] * if idx == -1: */ __pyx_t_1 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_1; __pyx_v_i++) { /* "pandas/src/generated.pyx":2789 * * for i from 0 <= i < n: * idx = indexer[i] # <<<<<<<<<<<<<< * if idx == -1: * for j from 0 <= j < k: */ __pyx_t_3 = __pyx_v_i; __pyx_v_idx = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_3, __pyx_pybuffernd_indexer.diminfo[0].strides)); /* "pandas/src/generated.pyx":2790 * for i from 0 <= i < n: * idx = indexer[i] * if idx == -1: # <<<<<<<<<<<<<< * for j from 0 <= j < k: * out[i, j] = fv */ __pyx_t_4 = ((__pyx_v_idx == -1) != 0); if (__pyx_t_4) { /* "pandas/src/generated.pyx":2791 * idx = indexer[i] * if idx == -1: * for j from 0 <= j < k: # <<<<<<<<<<<<<< * out[i, j] = fv * else: */ __pyx_t_5 = __pyx_v_k; for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_5; __pyx_v_j++) { /* "pandas/src/generated.pyx":2792 * if idx == -1: * for j from 0 <= j < k: * out[i, j] = fv # <<<<<<<<<<<<<< * else: * for j from 0 <= j < k: */ __pyx_t_6 = __pyx_v_i; __pyx_t_7 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_6, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_7, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_fv; } goto __pyx_L5; } /*else*/ { /* "pandas/src/generated.pyx":2794 * out[i, j] = fv * else: * for j from 0 <= j < k: # <<<<<<<<<<<<<< * out[i, j] = values[idx, j] * */ __pyx_t_5 = __pyx_v_k; for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_5; __pyx_v_j++) { /* "pandas/src/generated.pyx":2795 * else: * for j from 0 <= j < k: * out[i, j] = values[idx, j] # <<<<<<<<<<<<<< * * @cython.wraparound(False) */ __pyx_t_8 = __pyx_v_idx; __pyx_t_9 = __pyx_v_j; __pyx_t_10 = __pyx_v_i; __pyx_t_11 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_10, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_11, __pyx_pybuffernd_out.diminfo[1].strides) = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int8_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_8, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_9, __pyx_pybuffernd_values.diminfo[1].strides)); } } __pyx_L5:; } /* "pandas/src/generated.pyx":2756 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_axis0_int8_int64(ndarray[int8_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[int64_t, ndim=2] out, */ /* 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_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.take_2d_axis0_int8_int64", __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_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":2799 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_axis0_int8_float64(ndarray[int8_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[float64_t, ndim=2] out, */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_271take_2d_axis0_int8_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_271take_2d_axis0_int8_float64 = {__Pyx_NAMESTR("take_2d_axis0_int8_float64"), (PyCFunction)__pyx_pw_6pandas_5algos_271take_2d_axis0_int8_float64, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_271take_2d_axis0_int8_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_values = 0; PyArrayObject *__pyx_v_indexer = 0; PyArrayObject *__pyx_v_out = 0; PyObject *__pyx_v_fill_value = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("take_2d_axis0_int8_float64 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_values,&__pyx_n_s_indexer,&__pyx_n_s_out,&__pyx_n_s_fill_value,0}; PyObject* values[4] = {0,0,0,0}; values[3] = __pyx_k__125; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_values)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_indexer)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_2d_axis0_int8_float64", 0, 3, 4, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2799; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_out)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_2d_axis0_int8_float64", 0, 3, 4, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2799; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_fill_value); if (value) { values[3] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "take_2d_axis0_int8_float64") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2799; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_values = ((PyArrayObject *)values[0]); __pyx_v_indexer = ((PyArrayObject *)values[1]); __pyx_v_out = ((PyArrayObject *)values[2]); __pyx_v_fill_value = values[3]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("take_2d_axis0_int8_float64", 0, 3, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2799; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.take_2d_axis0_int8_float64", __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_filename = __pyx_f[2]; __pyx_lineno = 2799; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_indexer), __pyx_ptype_5numpy_ndarray, 1, "indexer", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2800; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_5numpy_ndarray, 1, "out", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2801; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_270take_2d_axis0_int8_float64(__pyx_self, __pyx_v_values, __pyx_v_indexer, __pyx_v_out, __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_5algos_270take_2d_axis0_int8_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_k; Py_ssize_t __pyx_v_n; Py_ssize_t __pyx_v_idx; __pyx_t_5numpy_float64_t __pyx_v_fv; __Pyx_LocalBuf_ND __pyx_pybuffernd_indexer; __Pyx_Buffer __pyx_pybuffer_indexer; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_values; __Pyx_Buffer __pyx_pybuffer_values; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; __pyx_t_5numpy_float64_t __pyx_t_2; Py_ssize_t __pyx_t_3; int __pyx_t_4; Py_ssize_t __pyx_t_5; Py_ssize_t __pyx_t_6; Py_ssize_t __pyx_t_7; Py_ssize_t __pyx_t_8; Py_ssize_t __pyx_t_9; Py_ssize_t __pyx_t_10; Py_ssize_t __pyx_t_11; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("take_2d_axis0_int8_float64", 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_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; { __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_int8_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2799; __pyx_clineno = __LINE__; goto __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_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1]; { __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_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2799; __pyx_clineno = __LINE__; goto __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_BufFmt_StackElem __pyx_stack[1]; 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, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2799; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; __pyx_pybuffernd_out.diminfo[1].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_out.diminfo[1].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[1]; /* "pandas/src/generated.pyx":2807 * float64_t fv * * n = len(indexer) # <<<<<<<<<<<<<< * k = values.shape[1] * */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_indexer)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2807; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/src/generated.pyx":2808 * * n = len(indexer) * k = values.shape[1] # <<<<<<<<<<<<<< * * fv = fill_value */ __pyx_v_k = (__pyx_v_values->dimensions[1]); /* "pandas/src/generated.pyx":2810 * k = values.shape[1] * * fv = fill_value # <<<<<<<<<<<<<< * * IF False: */ __pyx_t_2 = __pyx_PyFloat_AsDouble(__pyx_v_fill_value); if (unlikely((__pyx_t_2 == (npy_float64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2810; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_fv = __pyx_t_2; /* "pandas/src/generated.pyx":2831 * return * * for i from 0 <= i < n: # <<<<<<<<<<<<<< * idx = indexer[i] * if idx == -1: */ __pyx_t_1 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_1; __pyx_v_i++) { /* "pandas/src/generated.pyx":2832 * * for i from 0 <= i < n: * idx = indexer[i] # <<<<<<<<<<<<<< * if idx == -1: * for j from 0 <= j < k: */ __pyx_t_3 = __pyx_v_i; __pyx_v_idx = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_3, __pyx_pybuffernd_indexer.diminfo[0].strides)); /* "pandas/src/generated.pyx":2833 * for i from 0 <= i < n: * idx = indexer[i] * if idx == -1: # <<<<<<<<<<<<<< * for j from 0 <= j < k: * out[i, j] = fv */ __pyx_t_4 = ((__pyx_v_idx == -1) != 0); if (__pyx_t_4) { /* "pandas/src/generated.pyx":2834 * idx = indexer[i] * if idx == -1: * for j from 0 <= j < k: # <<<<<<<<<<<<<< * out[i, j] = fv * else: */ __pyx_t_5 = __pyx_v_k; for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_5; __pyx_v_j++) { /* "pandas/src/generated.pyx":2835 * if idx == -1: * for j from 0 <= j < k: * out[i, j] = fv # <<<<<<<<<<<<<< * else: * for j from 0 <= j < k: */ __pyx_t_6 = __pyx_v_i; __pyx_t_7 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_6, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_7, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_fv; } goto __pyx_L5; } /*else*/ { /* "pandas/src/generated.pyx":2837 * out[i, j] = fv * else: * for j from 0 <= j < k: # <<<<<<<<<<<<<< * out[i, j] = values[idx, j] * */ __pyx_t_5 = __pyx_v_k; for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_5; __pyx_v_j++) { /* "pandas/src/generated.pyx":2838 * else: * for j from 0 <= j < k: * out[i, j] = values[idx, j] # <<<<<<<<<<<<<< * * @cython.wraparound(False) */ __pyx_t_8 = __pyx_v_idx; __pyx_t_9 = __pyx_v_j; __pyx_t_10 = __pyx_v_i; __pyx_t_11 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_10, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_11, __pyx_pybuffernd_out.diminfo[1].strides) = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int8_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_8, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_9, __pyx_pybuffernd_values.diminfo[1].strides)); } } __pyx_L5:; } /* "pandas/src/generated.pyx":2799 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_axis0_int8_float64(ndarray[int8_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[float64_t, ndim=2] out, */ /* 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_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.take_2d_axis0_int8_float64", __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_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":2842 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_axis0_int16_int16(ndarray[int16_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[int16_t, ndim=2] out, */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_273take_2d_axis0_int16_int16(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_273take_2d_axis0_int16_int16 = {__Pyx_NAMESTR("take_2d_axis0_int16_int16"), (PyCFunction)__pyx_pw_6pandas_5algos_273take_2d_axis0_int16_int16, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_273take_2d_axis0_int16_int16(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_values = 0; PyArrayObject *__pyx_v_indexer = 0; PyArrayObject *__pyx_v_out = 0; PyObject *__pyx_v_fill_value = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("take_2d_axis0_int16_int16 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_values,&__pyx_n_s_indexer,&__pyx_n_s_out,&__pyx_n_s_fill_value,0}; PyObject* values[4] = {0,0,0,0}; values[3] = __pyx_k__126; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_values)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_indexer)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_2d_axis0_int16_int16", 0, 3, 4, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2842; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_out)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_2d_axis0_int16_int16", 0, 3, 4, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2842; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_fill_value); if (value) { values[3] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "take_2d_axis0_int16_int16") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2842; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_values = ((PyArrayObject *)values[0]); __pyx_v_indexer = ((PyArrayObject *)values[1]); __pyx_v_out = ((PyArrayObject *)values[2]); __pyx_v_fill_value = values[3]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("take_2d_axis0_int16_int16", 0, 3, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2842; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.take_2d_axis0_int16_int16", __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_filename = __pyx_f[2]; __pyx_lineno = 2842; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_indexer), __pyx_ptype_5numpy_ndarray, 1, "indexer", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2843; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_5numpy_ndarray, 1, "out", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2844; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_272take_2d_axis0_int16_int16(__pyx_self, __pyx_v_values, __pyx_v_indexer, __pyx_v_out, __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_5algos_272take_2d_axis0_int16_int16(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_k; Py_ssize_t __pyx_v_n; Py_ssize_t __pyx_v_idx; __pyx_t_5numpy_int16_t __pyx_v_fv; __pyx_t_5numpy_int16_t *__pyx_v_v; __pyx_t_5numpy_int16_t *__pyx_v_o; __Pyx_LocalBuf_ND __pyx_pybuffernd_indexer; __Pyx_Buffer __pyx_pybuffer_indexer; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_values; __Pyx_Buffer __pyx_pybuffer_values; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; __pyx_t_5numpy_int16_t __pyx_t_2; int __pyx_t_3; int __pyx_t_4; int __pyx_t_5; int __pyx_t_6; Py_ssize_t __pyx_t_7; Py_ssize_t __pyx_t_8; Py_ssize_t __pyx_t_9; Py_ssize_t __pyx_t_10; long __pyx_t_11; Py_ssize_t __pyx_t_12; long __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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("take_2d_axis0_int16_int16", 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_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; { __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_int16_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2842; __pyx_clineno = __LINE__; goto __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_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1]; { __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_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2842; __pyx_clineno = __LINE__; goto __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_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_v_out, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int16_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2842; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; __pyx_pybuffernd_out.diminfo[1].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_out.diminfo[1].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[1]; /* "pandas/src/generated.pyx":2850 * int16_t fv * * n = len(indexer) # <<<<<<<<<<<<<< * k = values.shape[1] * */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_indexer)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2850; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/src/generated.pyx":2851 * * n = len(indexer) * k = values.shape[1] # <<<<<<<<<<<<<< * * fv = fill_value */ __pyx_v_k = (__pyx_v_values->dimensions[1]); /* "pandas/src/generated.pyx":2853 * k = values.shape[1] * * fv = fill_value # <<<<<<<<<<<<<< * * IF True: */ __pyx_t_2 = __Pyx_PyInt_As_npy_int16(__pyx_v_fill_value); if (unlikely((__pyx_t_2 == (npy_int16)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2853; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_fv = __pyx_t_2; /* "pandas/src/generated.pyx":2859 * int16_t *v, *o * * if (values.strides[1] == out.strides[1] and # <<<<<<<<<<<<<< * values.strides[1] == sizeof(int16_t) and * sizeof(int16_t) * n >= 256): */ __pyx_t_3 = (((__pyx_v_values->strides[1]) == (__pyx_v_out->strides[1])) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":2860 * * if (values.strides[1] == out.strides[1] and * values.strides[1] == sizeof(int16_t) and # <<<<<<<<<<<<<< * sizeof(int16_t) * n >= 256): * */ __pyx_t_4 = (((__pyx_v_values->strides[1]) == (sizeof(__pyx_t_5numpy_int16_t))) != 0); if (__pyx_t_4) { /* "pandas/src/generated.pyx":2861 * if (values.strides[1] == out.strides[1] and * values.strides[1] == sizeof(int16_t) and * sizeof(int16_t) * n >= 256): # <<<<<<<<<<<<<< * * for i from 0 <= i < n: */ __pyx_t_5 = ((((sizeof(__pyx_t_5numpy_int16_t)) * __pyx_v_n) >= 256) != 0); __pyx_t_6 = __pyx_t_5; } else { __pyx_t_6 = __pyx_t_4; } __pyx_t_4 = __pyx_t_6; } else { __pyx_t_4 = __pyx_t_3; } if (__pyx_t_4) { /* "pandas/src/generated.pyx":2863 * sizeof(int16_t) * n >= 256): * * for i from 0 <= i < n: # <<<<<<<<<<<<<< * idx = indexer[i] * if idx == -1: */ __pyx_t_1 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_1; __pyx_v_i++) { /* "pandas/src/generated.pyx":2864 * * for i from 0 <= i < n: * idx = indexer[i] # <<<<<<<<<<<<<< * if idx == -1: * for j from 0 <= j < k: */ __pyx_t_7 = __pyx_v_i; __pyx_v_idx = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_7, __pyx_pybuffernd_indexer.diminfo[0].strides)); /* "pandas/src/generated.pyx":2865 * for i from 0 <= i < n: * idx = indexer[i] * if idx == -1: # <<<<<<<<<<<<<< * for j from 0 <= j < k: * out[i, j] = fv */ __pyx_t_4 = ((__pyx_v_idx == -1) != 0); if (__pyx_t_4) { /* "pandas/src/generated.pyx":2866 * idx = indexer[i] * if idx == -1: * for j from 0 <= j < k: # <<<<<<<<<<<<<< * out[i, j] = fv * else: */ __pyx_t_8 = __pyx_v_k; for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_8; __pyx_v_j++) { /* "pandas/src/generated.pyx":2867 * if idx == -1: * for j from 0 <= j < k: * out[i, j] = fv # <<<<<<<<<<<<<< * else: * v = &values[idx, 0] */ __pyx_t_9 = __pyx_v_i; __pyx_t_10 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int16_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_9, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_10, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_fv; } goto __pyx_L6; } /*else*/ { /* "pandas/src/generated.pyx":2869 * out[i, j] = fv * else: * v = &values[idx, 0] # <<<<<<<<<<<<<< * o = &out[i, 0] * memmove(o, v, (sizeof(int16_t) * k)) */ __pyx_t_8 = __pyx_v_idx; __pyx_t_11 = 0; __pyx_v_v = (&(*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int16_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_8, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_11, __pyx_pybuffernd_values.diminfo[1].strides))); /* "pandas/src/generated.pyx":2870 * else: * v = &values[idx, 0] * o = &out[i, 0] # <<<<<<<<<<<<<< * memmove(o, v, (sizeof(int16_t) * k)) * return */ __pyx_t_12 = __pyx_v_i; __pyx_t_13 = 0; __pyx_v_o = (&(*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int16_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_12, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_13, __pyx_pybuffernd_out.diminfo[1].strides))); /* "pandas/src/generated.pyx":2871 * v = &values[idx, 0] * o = &out[i, 0] * memmove(o, v, (sizeof(int16_t) * k)) # <<<<<<<<<<<<<< * return * */ memmove(__pyx_v_o, __pyx_v_v, ((size_t)((sizeof(__pyx_t_5numpy_int16_t)) * __pyx_v_k))); } __pyx_L6:; } /* "pandas/src/generated.pyx":2872 * o = &out[i, 0] * memmove(o, v, (sizeof(int16_t) * k)) * return # <<<<<<<<<<<<<< * * for i from 0 <= i < n: */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; } /* "pandas/src/generated.pyx":2874 * return * * for i from 0 <= i < n: # <<<<<<<<<<<<<< * idx = indexer[i] * if idx == -1: */ __pyx_t_1 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_1; __pyx_v_i++) { /* "pandas/src/generated.pyx":2875 * * for i from 0 <= i < n: * idx = indexer[i] # <<<<<<<<<<<<<< * if idx == -1: * for j from 0 <= j < k: */ __pyx_t_14 = __pyx_v_i; __pyx_v_idx = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_indexer.diminfo[0].strides)); /* "pandas/src/generated.pyx":2876 * for i from 0 <= i < n: * idx = indexer[i] * if idx == -1: # <<<<<<<<<<<<<< * for j from 0 <= j < k: * out[i, j] = fv */ __pyx_t_4 = ((__pyx_v_idx == -1) != 0); if (__pyx_t_4) { /* "pandas/src/generated.pyx":2877 * idx = indexer[i] * if idx == -1: * for j from 0 <= j < k: # <<<<<<<<<<<<<< * out[i, j] = fv * else: */ __pyx_t_15 = __pyx_v_k; for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_15; __pyx_v_j++) { /* "pandas/src/generated.pyx":2878 * if idx == -1: * for j from 0 <= j < k: * out[i, j] = fv # <<<<<<<<<<<<<< * else: * for j from 0 <= j < k: */ __pyx_t_16 = __pyx_v_i; __pyx_t_17 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int16_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_17, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_fv; } goto __pyx_L11; } /*else*/ { /* "pandas/src/generated.pyx":2880 * out[i, j] = fv * else: * for j from 0 <= j < k: # <<<<<<<<<<<<<< * out[i, j] = values[idx, j] * */ __pyx_t_15 = __pyx_v_k; for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_15; __pyx_v_j++) { /* "pandas/src/generated.pyx":2881 * else: * for j from 0 <= j < k: * out[i, j] = values[idx, j] # <<<<<<<<<<<<<< * * @cython.wraparound(False) */ __pyx_t_18 = __pyx_v_idx; __pyx_t_19 = __pyx_v_j; __pyx_t_20 = __pyx_v_i; __pyx_t_21 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int16_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_21, __pyx_pybuffernd_out.diminfo[1].strides) = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int16_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_19, __pyx_pybuffernd_values.diminfo[1].strides)); } } __pyx_L11:; } /* "pandas/src/generated.pyx":2842 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_axis0_int16_int16(ndarray[int16_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[int16_t, ndim=2] out, */ /* 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_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.take_2d_axis0_int16_int16", __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_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":2885 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_axis0_int16_int32(ndarray[int16_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[int32_t, ndim=2] out, */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_275take_2d_axis0_int16_int32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_275take_2d_axis0_int16_int32 = {__Pyx_NAMESTR("take_2d_axis0_int16_int32"), (PyCFunction)__pyx_pw_6pandas_5algos_275take_2d_axis0_int16_int32, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_275take_2d_axis0_int16_int32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_values = 0; PyArrayObject *__pyx_v_indexer = 0; PyArrayObject *__pyx_v_out = 0; PyObject *__pyx_v_fill_value = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("take_2d_axis0_int16_int32 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_values,&__pyx_n_s_indexer,&__pyx_n_s_out,&__pyx_n_s_fill_value,0}; PyObject* values[4] = {0,0,0,0}; values[3] = __pyx_k__127; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_values)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_indexer)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_2d_axis0_int16_int32", 0, 3, 4, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2885; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_out)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_2d_axis0_int16_int32", 0, 3, 4, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2885; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_fill_value); if (value) { values[3] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "take_2d_axis0_int16_int32") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2885; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_values = ((PyArrayObject *)values[0]); __pyx_v_indexer = ((PyArrayObject *)values[1]); __pyx_v_out = ((PyArrayObject *)values[2]); __pyx_v_fill_value = values[3]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("take_2d_axis0_int16_int32", 0, 3, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2885; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.take_2d_axis0_int16_int32", __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_filename = __pyx_f[2]; __pyx_lineno = 2885; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_indexer), __pyx_ptype_5numpy_ndarray, 1, "indexer", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2886; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_5numpy_ndarray, 1, "out", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2887; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_274take_2d_axis0_int16_int32(__pyx_self, __pyx_v_values, __pyx_v_indexer, __pyx_v_out, __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_5algos_274take_2d_axis0_int16_int32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_k; Py_ssize_t __pyx_v_n; Py_ssize_t __pyx_v_idx; __pyx_t_5numpy_int32_t __pyx_v_fv; __Pyx_LocalBuf_ND __pyx_pybuffernd_indexer; __Pyx_Buffer __pyx_pybuffer_indexer; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_values; __Pyx_Buffer __pyx_pybuffer_values; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; __pyx_t_5numpy_int32_t __pyx_t_2; Py_ssize_t __pyx_t_3; int __pyx_t_4; Py_ssize_t __pyx_t_5; Py_ssize_t __pyx_t_6; Py_ssize_t __pyx_t_7; Py_ssize_t __pyx_t_8; Py_ssize_t __pyx_t_9; Py_ssize_t __pyx_t_10; Py_ssize_t __pyx_t_11; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("take_2d_axis0_int16_int32", 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_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; { __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_int16_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2885; __pyx_clineno = __LINE__; goto __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_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1]; { __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_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2885; __pyx_clineno = __LINE__; goto __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_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_v_out, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2885; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; __pyx_pybuffernd_out.diminfo[1].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_out.diminfo[1].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[1]; /* "pandas/src/generated.pyx":2893 * int32_t fv * * n = len(indexer) # <<<<<<<<<<<<<< * k = values.shape[1] * */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_indexer)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2893; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/src/generated.pyx":2894 * * n = len(indexer) * k = values.shape[1] # <<<<<<<<<<<<<< * * fv = fill_value */ __pyx_v_k = (__pyx_v_values->dimensions[1]); /* "pandas/src/generated.pyx":2896 * k = values.shape[1] * * fv = fill_value # <<<<<<<<<<<<<< * * IF False: */ __pyx_t_2 = __Pyx_PyInt_As_npy_int32(__pyx_v_fill_value); if (unlikely((__pyx_t_2 == (npy_int32)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2896; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_fv = __pyx_t_2; /* "pandas/src/generated.pyx":2917 * return * * for i from 0 <= i < n: # <<<<<<<<<<<<<< * idx = indexer[i] * if idx == -1: */ __pyx_t_1 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_1; __pyx_v_i++) { /* "pandas/src/generated.pyx":2918 * * for i from 0 <= i < n: * idx = indexer[i] # <<<<<<<<<<<<<< * if idx == -1: * for j from 0 <= j < k: */ __pyx_t_3 = __pyx_v_i; __pyx_v_idx = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_3, __pyx_pybuffernd_indexer.diminfo[0].strides)); /* "pandas/src/generated.pyx":2919 * for i from 0 <= i < n: * idx = indexer[i] * if idx == -1: # <<<<<<<<<<<<<< * for j from 0 <= j < k: * out[i, j] = fv */ __pyx_t_4 = ((__pyx_v_idx == -1) != 0); if (__pyx_t_4) { /* "pandas/src/generated.pyx":2920 * idx = indexer[i] * if idx == -1: * for j from 0 <= j < k: # <<<<<<<<<<<<<< * out[i, j] = fv * else: */ __pyx_t_5 = __pyx_v_k; for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_5; __pyx_v_j++) { /* "pandas/src/generated.pyx":2921 * if idx == -1: * for j from 0 <= j < k: * out[i, j] = fv # <<<<<<<<<<<<<< * else: * for j from 0 <= j < k: */ __pyx_t_6 = __pyx_v_i; __pyx_t_7 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_6, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_7, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_fv; } goto __pyx_L5; } /*else*/ { /* "pandas/src/generated.pyx":2923 * out[i, j] = fv * else: * for j from 0 <= j < k: # <<<<<<<<<<<<<< * out[i, j] = values[idx, j] * */ __pyx_t_5 = __pyx_v_k; for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_5; __pyx_v_j++) { /* "pandas/src/generated.pyx":2924 * else: * for j from 0 <= j < k: * out[i, j] = values[idx, j] # <<<<<<<<<<<<<< * * @cython.wraparound(False) */ __pyx_t_8 = __pyx_v_idx; __pyx_t_9 = __pyx_v_j; __pyx_t_10 = __pyx_v_i; __pyx_t_11 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_10, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_11, __pyx_pybuffernd_out.diminfo[1].strides) = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int16_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_8, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_9, __pyx_pybuffernd_values.diminfo[1].strides)); } } __pyx_L5:; } /* "pandas/src/generated.pyx":2885 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_axis0_int16_int32(ndarray[int16_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[int32_t, ndim=2] out, */ /* 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_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.take_2d_axis0_int16_int32", __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_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":2928 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_axis0_int16_int64(ndarray[int16_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[int64_t, ndim=2] out, */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_277take_2d_axis0_int16_int64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_277take_2d_axis0_int16_int64 = {__Pyx_NAMESTR("take_2d_axis0_int16_int64"), (PyCFunction)__pyx_pw_6pandas_5algos_277take_2d_axis0_int16_int64, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_277take_2d_axis0_int16_int64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_values = 0; PyArrayObject *__pyx_v_indexer = 0; PyArrayObject *__pyx_v_out = 0; PyObject *__pyx_v_fill_value = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("take_2d_axis0_int16_int64 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_values,&__pyx_n_s_indexer,&__pyx_n_s_out,&__pyx_n_s_fill_value,0}; PyObject* values[4] = {0,0,0,0}; values[3] = __pyx_k__128; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_values)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_indexer)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_2d_axis0_int16_int64", 0, 3, 4, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2928; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_out)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_2d_axis0_int16_int64", 0, 3, 4, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2928; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_fill_value); if (value) { values[3] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "take_2d_axis0_int16_int64") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2928; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_values = ((PyArrayObject *)values[0]); __pyx_v_indexer = ((PyArrayObject *)values[1]); __pyx_v_out = ((PyArrayObject *)values[2]); __pyx_v_fill_value = values[3]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("take_2d_axis0_int16_int64", 0, 3, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2928; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.take_2d_axis0_int16_int64", __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_filename = __pyx_f[2]; __pyx_lineno = 2928; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_indexer), __pyx_ptype_5numpy_ndarray, 1, "indexer", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2929; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_5numpy_ndarray, 1, "out", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2930; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_276take_2d_axis0_int16_int64(__pyx_self, __pyx_v_values, __pyx_v_indexer, __pyx_v_out, __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_5algos_276take_2d_axis0_int16_int64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_k; Py_ssize_t __pyx_v_n; Py_ssize_t __pyx_v_idx; __pyx_t_5numpy_int64_t __pyx_v_fv; __Pyx_LocalBuf_ND __pyx_pybuffernd_indexer; __Pyx_Buffer __pyx_pybuffer_indexer; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_values; __Pyx_Buffer __pyx_pybuffer_values; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; __pyx_t_5numpy_int64_t __pyx_t_2; Py_ssize_t __pyx_t_3; int __pyx_t_4; Py_ssize_t __pyx_t_5; Py_ssize_t __pyx_t_6; Py_ssize_t __pyx_t_7; Py_ssize_t __pyx_t_8; Py_ssize_t __pyx_t_9; Py_ssize_t __pyx_t_10; Py_ssize_t __pyx_t_11; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("take_2d_axis0_int16_int64", 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_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; { __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_int16_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2928; __pyx_clineno = __LINE__; goto __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_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1]; { __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_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2928; __pyx_clineno = __LINE__; goto __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_BufFmt_StackElem __pyx_stack[1]; 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, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2928; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; __pyx_pybuffernd_out.diminfo[1].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_out.diminfo[1].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[1]; /* "pandas/src/generated.pyx":2936 * int64_t fv * * n = len(indexer) # <<<<<<<<<<<<<< * k = values.shape[1] * */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_indexer)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2936; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/src/generated.pyx":2937 * * n = len(indexer) * k = values.shape[1] # <<<<<<<<<<<<<< * * fv = fill_value */ __pyx_v_k = (__pyx_v_values->dimensions[1]); /* "pandas/src/generated.pyx":2939 * k = values.shape[1] * * fv = fill_value # <<<<<<<<<<<<<< * * IF False: */ __pyx_t_2 = __Pyx_PyInt_As_npy_int64(__pyx_v_fill_value); if (unlikely((__pyx_t_2 == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2939; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_fv = __pyx_t_2; /* "pandas/src/generated.pyx":2960 * return * * for i from 0 <= i < n: # <<<<<<<<<<<<<< * idx = indexer[i] * if idx == -1: */ __pyx_t_1 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_1; __pyx_v_i++) { /* "pandas/src/generated.pyx":2961 * * for i from 0 <= i < n: * idx = indexer[i] # <<<<<<<<<<<<<< * if idx == -1: * for j from 0 <= j < k: */ __pyx_t_3 = __pyx_v_i; __pyx_v_idx = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_3, __pyx_pybuffernd_indexer.diminfo[0].strides)); /* "pandas/src/generated.pyx":2962 * for i from 0 <= i < n: * idx = indexer[i] * if idx == -1: # <<<<<<<<<<<<<< * for j from 0 <= j < k: * out[i, j] = fv */ __pyx_t_4 = ((__pyx_v_idx == -1) != 0); if (__pyx_t_4) { /* "pandas/src/generated.pyx":2963 * idx = indexer[i] * if idx == -1: * for j from 0 <= j < k: # <<<<<<<<<<<<<< * out[i, j] = fv * else: */ __pyx_t_5 = __pyx_v_k; for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_5; __pyx_v_j++) { /* "pandas/src/generated.pyx":2964 * if idx == -1: * for j from 0 <= j < k: * out[i, j] = fv # <<<<<<<<<<<<<< * else: * for j from 0 <= j < k: */ __pyx_t_6 = __pyx_v_i; __pyx_t_7 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_6, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_7, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_fv; } goto __pyx_L5; } /*else*/ { /* "pandas/src/generated.pyx":2966 * out[i, j] = fv * else: * for j from 0 <= j < k: # <<<<<<<<<<<<<< * out[i, j] = values[idx, j] * */ __pyx_t_5 = __pyx_v_k; for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_5; __pyx_v_j++) { /* "pandas/src/generated.pyx":2967 * else: * for j from 0 <= j < k: * out[i, j] = values[idx, j] # <<<<<<<<<<<<<< * * @cython.wraparound(False) */ __pyx_t_8 = __pyx_v_idx; __pyx_t_9 = __pyx_v_j; __pyx_t_10 = __pyx_v_i; __pyx_t_11 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_10, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_11, __pyx_pybuffernd_out.diminfo[1].strides) = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int16_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_8, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_9, __pyx_pybuffernd_values.diminfo[1].strides)); } } __pyx_L5:; } /* "pandas/src/generated.pyx":2928 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_axis0_int16_int64(ndarray[int16_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[int64_t, ndim=2] out, */ /* 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_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.take_2d_axis0_int16_int64", __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_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":2971 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_axis0_int16_float64(ndarray[int16_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[float64_t, ndim=2] out, */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_279take_2d_axis0_int16_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_279take_2d_axis0_int16_float64 = {__Pyx_NAMESTR("take_2d_axis0_int16_float64"), (PyCFunction)__pyx_pw_6pandas_5algos_279take_2d_axis0_int16_float64, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_279take_2d_axis0_int16_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_values = 0; PyArrayObject *__pyx_v_indexer = 0; PyArrayObject *__pyx_v_out = 0; PyObject *__pyx_v_fill_value = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("take_2d_axis0_int16_float64 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_values,&__pyx_n_s_indexer,&__pyx_n_s_out,&__pyx_n_s_fill_value,0}; PyObject* values[4] = {0,0,0,0}; values[3] = __pyx_k__129; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_values)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_indexer)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_2d_axis0_int16_float64", 0, 3, 4, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2971; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_out)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_2d_axis0_int16_float64", 0, 3, 4, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2971; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_fill_value); if (value) { values[3] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "take_2d_axis0_int16_float64") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2971; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_values = ((PyArrayObject *)values[0]); __pyx_v_indexer = ((PyArrayObject *)values[1]); __pyx_v_out = ((PyArrayObject *)values[2]); __pyx_v_fill_value = values[3]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("take_2d_axis0_int16_float64", 0, 3, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2971; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.take_2d_axis0_int16_float64", __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_filename = __pyx_f[2]; __pyx_lineno = 2971; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_indexer), __pyx_ptype_5numpy_ndarray, 1, "indexer", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2972; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_5numpy_ndarray, 1, "out", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2973; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_278take_2d_axis0_int16_float64(__pyx_self, __pyx_v_values, __pyx_v_indexer, __pyx_v_out, __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_5algos_278take_2d_axis0_int16_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_k; Py_ssize_t __pyx_v_n; Py_ssize_t __pyx_v_idx; __pyx_t_5numpy_float64_t __pyx_v_fv; __Pyx_LocalBuf_ND __pyx_pybuffernd_indexer; __Pyx_Buffer __pyx_pybuffer_indexer; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_values; __Pyx_Buffer __pyx_pybuffer_values; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; __pyx_t_5numpy_float64_t __pyx_t_2; Py_ssize_t __pyx_t_3; int __pyx_t_4; Py_ssize_t __pyx_t_5; Py_ssize_t __pyx_t_6; Py_ssize_t __pyx_t_7; Py_ssize_t __pyx_t_8; Py_ssize_t __pyx_t_9; Py_ssize_t __pyx_t_10; Py_ssize_t __pyx_t_11; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("take_2d_axis0_int16_float64", 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_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; { __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_int16_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2971; __pyx_clineno = __LINE__; goto __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_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1]; { __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_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2971; __pyx_clineno = __LINE__; goto __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_BufFmt_StackElem __pyx_stack[1]; 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, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2971; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; __pyx_pybuffernd_out.diminfo[1].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_out.diminfo[1].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[1]; /* "pandas/src/generated.pyx":2979 * float64_t fv * * n = len(indexer) # <<<<<<<<<<<<<< * k = values.shape[1] * */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_indexer)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2979; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/src/generated.pyx":2980 * * n = len(indexer) * k = values.shape[1] # <<<<<<<<<<<<<< * * fv = fill_value */ __pyx_v_k = (__pyx_v_values->dimensions[1]); /* "pandas/src/generated.pyx":2982 * k = values.shape[1] * * fv = fill_value # <<<<<<<<<<<<<< * * IF False: */ __pyx_t_2 = __pyx_PyFloat_AsDouble(__pyx_v_fill_value); if (unlikely((__pyx_t_2 == (npy_float64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2982; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_fv = __pyx_t_2; /* "pandas/src/generated.pyx":3003 * return * * for i from 0 <= i < n: # <<<<<<<<<<<<<< * idx = indexer[i] * if idx == -1: */ __pyx_t_1 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_1; __pyx_v_i++) { /* "pandas/src/generated.pyx":3004 * * for i from 0 <= i < n: * idx = indexer[i] # <<<<<<<<<<<<<< * if idx == -1: * for j from 0 <= j < k: */ __pyx_t_3 = __pyx_v_i; __pyx_v_idx = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_3, __pyx_pybuffernd_indexer.diminfo[0].strides)); /* "pandas/src/generated.pyx":3005 * for i from 0 <= i < n: * idx = indexer[i] * if idx == -1: # <<<<<<<<<<<<<< * for j from 0 <= j < k: * out[i, j] = fv */ __pyx_t_4 = ((__pyx_v_idx == -1) != 0); if (__pyx_t_4) { /* "pandas/src/generated.pyx":3006 * idx = indexer[i] * if idx == -1: * for j from 0 <= j < k: # <<<<<<<<<<<<<< * out[i, j] = fv * else: */ __pyx_t_5 = __pyx_v_k; for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_5; __pyx_v_j++) { /* "pandas/src/generated.pyx":3007 * if idx == -1: * for j from 0 <= j < k: * out[i, j] = fv # <<<<<<<<<<<<<< * else: * for j from 0 <= j < k: */ __pyx_t_6 = __pyx_v_i; __pyx_t_7 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_6, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_7, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_fv; } goto __pyx_L5; } /*else*/ { /* "pandas/src/generated.pyx":3009 * out[i, j] = fv * else: * for j from 0 <= j < k: # <<<<<<<<<<<<<< * out[i, j] = values[idx, j] * */ __pyx_t_5 = __pyx_v_k; for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_5; __pyx_v_j++) { /* "pandas/src/generated.pyx":3010 * else: * for j from 0 <= j < k: * out[i, j] = values[idx, j] # <<<<<<<<<<<<<< * * @cython.wraparound(False) */ __pyx_t_8 = __pyx_v_idx; __pyx_t_9 = __pyx_v_j; __pyx_t_10 = __pyx_v_i; __pyx_t_11 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_10, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_11, __pyx_pybuffernd_out.diminfo[1].strides) = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int16_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_8, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_9, __pyx_pybuffernd_values.diminfo[1].strides)); } } __pyx_L5:; } /* "pandas/src/generated.pyx":2971 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_axis0_int16_float64(ndarray[int16_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[float64_t, ndim=2] out, */ /* 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_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.take_2d_axis0_int16_float64", __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_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":3014 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_axis0_int32_int32(ndarray[int32_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[int32_t, ndim=2] out, */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_281take_2d_axis0_int32_int32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_281take_2d_axis0_int32_int32 = {__Pyx_NAMESTR("take_2d_axis0_int32_int32"), (PyCFunction)__pyx_pw_6pandas_5algos_281take_2d_axis0_int32_int32, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_281take_2d_axis0_int32_int32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_values = 0; PyArrayObject *__pyx_v_indexer = 0; PyArrayObject *__pyx_v_out = 0; PyObject *__pyx_v_fill_value = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("take_2d_axis0_int32_int32 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_values,&__pyx_n_s_indexer,&__pyx_n_s_out,&__pyx_n_s_fill_value,0}; PyObject* values[4] = {0,0,0,0}; values[3] = __pyx_k__130; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_values)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_indexer)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_2d_axis0_int32_int32", 0, 3, 4, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3014; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_out)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_2d_axis0_int32_int32", 0, 3, 4, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3014; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_fill_value); if (value) { values[3] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "take_2d_axis0_int32_int32") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3014; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_values = ((PyArrayObject *)values[0]); __pyx_v_indexer = ((PyArrayObject *)values[1]); __pyx_v_out = ((PyArrayObject *)values[2]); __pyx_v_fill_value = values[3]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("take_2d_axis0_int32_int32", 0, 3, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3014; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.take_2d_axis0_int32_int32", __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_filename = __pyx_f[2]; __pyx_lineno = 3014; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_indexer), __pyx_ptype_5numpy_ndarray, 1, "indexer", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3015; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_5numpy_ndarray, 1, "out", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3016; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_280take_2d_axis0_int32_int32(__pyx_self, __pyx_v_values, __pyx_v_indexer, __pyx_v_out, __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_5algos_280take_2d_axis0_int32_int32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_k; Py_ssize_t __pyx_v_n; Py_ssize_t __pyx_v_idx; __pyx_t_5numpy_int32_t __pyx_v_fv; __pyx_t_5numpy_int32_t *__pyx_v_v; __pyx_t_5numpy_int32_t *__pyx_v_o; __Pyx_LocalBuf_ND __pyx_pybuffernd_indexer; __Pyx_Buffer __pyx_pybuffer_indexer; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_values; __Pyx_Buffer __pyx_pybuffer_values; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; __pyx_t_5numpy_int32_t __pyx_t_2; int __pyx_t_3; int __pyx_t_4; int __pyx_t_5; int __pyx_t_6; Py_ssize_t __pyx_t_7; Py_ssize_t __pyx_t_8; Py_ssize_t __pyx_t_9; Py_ssize_t __pyx_t_10; long __pyx_t_11; Py_ssize_t __pyx_t_12; long __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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("take_2d_axis0_int32_int32", 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_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; { __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_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3014; __pyx_clineno = __LINE__; goto __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_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1]; { __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_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3014; __pyx_clineno = __LINE__; goto __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_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_v_out, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3014; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; __pyx_pybuffernd_out.diminfo[1].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_out.diminfo[1].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[1]; /* "pandas/src/generated.pyx":3022 * int32_t fv * * n = len(indexer) # <<<<<<<<<<<<<< * k = values.shape[1] * */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_indexer)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3022; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/src/generated.pyx":3023 * * n = len(indexer) * k = values.shape[1] # <<<<<<<<<<<<<< * * fv = fill_value */ __pyx_v_k = (__pyx_v_values->dimensions[1]); /* "pandas/src/generated.pyx":3025 * k = values.shape[1] * * fv = fill_value # <<<<<<<<<<<<<< * * IF True: */ __pyx_t_2 = __Pyx_PyInt_As_npy_int32(__pyx_v_fill_value); if (unlikely((__pyx_t_2 == (npy_int32)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3025; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_fv = __pyx_t_2; /* "pandas/src/generated.pyx":3031 * int32_t *v, *o * * if (values.strides[1] == out.strides[1] and # <<<<<<<<<<<<<< * values.strides[1] == sizeof(int32_t) and * sizeof(int32_t) * n >= 256): */ __pyx_t_3 = (((__pyx_v_values->strides[1]) == (__pyx_v_out->strides[1])) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":3032 * * if (values.strides[1] == out.strides[1] and * values.strides[1] == sizeof(int32_t) and # <<<<<<<<<<<<<< * sizeof(int32_t) * n >= 256): * */ __pyx_t_4 = (((__pyx_v_values->strides[1]) == (sizeof(__pyx_t_5numpy_int32_t))) != 0); if (__pyx_t_4) { /* "pandas/src/generated.pyx":3033 * if (values.strides[1] == out.strides[1] and * values.strides[1] == sizeof(int32_t) and * sizeof(int32_t) * n >= 256): # <<<<<<<<<<<<<< * * for i from 0 <= i < n: */ __pyx_t_5 = ((((sizeof(__pyx_t_5numpy_int32_t)) * __pyx_v_n) >= 256) != 0); __pyx_t_6 = __pyx_t_5; } else { __pyx_t_6 = __pyx_t_4; } __pyx_t_4 = __pyx_t_6; } else { __pyx_t_4 = __pyx_t_3; } if (__pyx_t_4) { /* "pandas/src/generated.pyx":3035 * sizeof(int32_t) * n >= 256): * * for i from 0 <= i < n: # <<<<<<<<<<<<<< * idx = indexer[i] * if idx == -1: */ __pyx_t_1 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_1; __pyx_v_i++) { /* "pandas/src/generated.pyx":3036 * * for i from 0 <= i < n: * idx = indexer[i] # <<<<<<<<<<<<<< * if idx == -1: * for j from 0 <= j < k: */ __pyx_t_7 = __pyx_v_i; __pyx_v_idx = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_7, __pyx_pybuffernd_indexer.diminfo[0].strides)); /* "pandas/src/generated.pyx":3037 * for i from 0 <= i < n: * idx = indexer[i] * if idx == -1: # <<<<<<<<<<<<<< * for j from 0 <= j < k: * out[i, j] = fv */ __pyx_t_4 = ((__pyx_v_idx == -1) != 0); if (__pyx_t_4) { /* "pandas/src/generated.pyx":3038 * idx = indexer[i] * if idx == -1: * for j from 0 <= j < k: # <<<<<<<<<<<<<< * out[i, j] = fv * else: */ __pyx_t_8 = __pyx_v_k; for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_8; __pyx_v_j++) { /* "pandas/src/generated.pyx":3039 * if idx == -1: * for j from 0 <= j < k: * out[i, j] = fv # <<<<<<<<<<<<<< * else: * v = &values[idx, 0] */ __pyx_t_9 = __pyx_v_i; __pyx_t_10 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_9, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_10, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_fv; } goto __pyx_L6; } /*else*/ { /* "pandas/src/generated.pyx":3041 * out[i, j] = fv * else: * v = &values[idx, 0] # <<<<<<<<<<<<<< * o = &out[i, 0] * memmove(o, v, (sizeof(int32_t) * k)) */ __pyx_t_8 = __pyx_v_idx; __pyx_t_11 = 0; __pyx_v_v = (&(*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_8, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_11, __pyx_pybuffernd_values.diminfo[1].strides))); /* "pandas/src/generated.pyx":3042 * else: * v = &values[idx, 0] * o = &out[i, 0] # <<<<<<<<<<<<<< * memmove(o, v, (sizeof(int32_t) * k)) * return */ __pyx_t_12 = __pyx_v_i; __pyx_t_13 = 0; __pyx_v_o = (&(*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_12, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_13, __pyx_pybuffernd_out.diminfo[1].strides))); /* "pandas/src/generated.pyx":3043 * v = &values[idx, 0] * o = &out[i, 0] * memmove(o, v, (sizeof(int32_t) * k)) # <<<<<<<<<<<<<< * return * */ memmove(__pyx_v_o, __pyx_v_v, ((size_t)((sizeof(__pyx_t_5numpy_int32_t)) * __pyx_v_k))); } __pyx_L6:; } /* "pandas/src/generated.pyx":3044 * o = &out[i, 0] * memmove(o, v, (sizeof(int32_t) * k)) * return # <<<<<<<<<<<<<< * * for i from 0 <= i < n: */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; } /* "pandas/src/generated.pyx":3046 * return * * for i from 0 <= i < n: # <<<<<<<<<<<<<< * idx = indexer[i] * if idx == -1: */ __pyx_t_1 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_1; __pyx_v_i++) { /* "pandas/src/generated.pyx":3047 * * for i from 0 <= i < n: * idx = indexer[i] # <<<<<<<<<<<<<< * if idx == -1: * for j from 0 <= j < k: */ __pyx_t_14 = __pyx_v_i; __pyx_v_idx = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_indexer.diminfo[0].strides)); /* "pandas/src/generated.pyx":3048 * for i from 0 <= i < n: * idx = indexer[i] * if idx == -1: # <<<<<<<<<<<<<< * for j from 0 <= j < k: * out[i, j] = fv */ __pyx_t_4 = ((__pyx_v_idx == -1) != 0); if (__pyx_t_4) { /* "pandas/src/generated.pyx":3049 * idx = indexer[i] * if idx == -1: * for j from 0 <= j < k: # <<<<<<<<<<<<<< * out[i, j] = fv * else: */ __pyx_t_15 = __pyx_v_k; for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_15; __pyx_v_j++) { /* "pandas/src/generated.pyx":3050 * if idx == -1: * for j from 0 <= j < k: * out[i, j] = fv # <<<<<<<<<<<<<< * else: * for j from 0 <= j < k: */ __pyx_t_16 = __pyx_v_i; __pyx_t_17 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_17, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_fv; } goto __pyx_L11; } /*else*/ { /* "pandas/src/generated.pyx":3052 * out[i, j] = fv * else: * for j from 0 <= j < k: # <<<<<<<<<<<<<< * out[i, j] = values[idx, j] * */ __pyx_t_15 = __pyx_v_k; for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_15; __pyx_v_j++) { /* "pandas/src/generated.pyx":3053 * else: * for j from 0 <= j < k: * out[i, j] = values[idx, j] # <<<<<<<<<<<<<< * * @cython.wraparound(False) */ __pyx_t_18 = __pyx_v_idx; __pyx_t_19 = __pyx_v_j; __pyx_t_20 = __pyx_v_i; __pyx_t_21 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_21, __pyx_pybuffernd_out.diminfo[1].strides) = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_19, __pyx_pybuffernd_values.diminfo[1].strides)); } } __pyx_L11:; } /* "pandas/src/generated.pyx":3014 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_axis0_int32_int32(ndarray[int32_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[int32_t, ndim=2] out, */ /* 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_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.take_2d_axis0_int32_int32", __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_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":3057 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_axis0_int32_int64(ndarray[int32_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[int64_t, ndim=2] out, */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_283take_2d_axis0_int32_int64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_283take_2d_axis0_int32_int64 = {__Pyx_NAMESTR("take_2d_axis0_int32_int64"), (PyCFunction)__pyx_pw_6pandas_5algos_283take_2d_axis0_int32_int64, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_283take_2d_axis0_int32_int64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_values = 0; PyArrayObject *__pyx_v_indexer = 0; PyArrayObject *__pyx_v_out = 0; PyObject *__pyx_v_fill_value = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("take_2d_axis0_int32_int64 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_values,&__pyx_n_s_indexer,&__pyx_n_s_out,&__pyx_n_s_fill_value,0}; PyObject* values[4] = {0,0,0,0}; values[3] = __pyx_k__131; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_values)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_indexer)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_2d_axis0_int32_int64", 0, 3, 4, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3057; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_out)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_2d_axis0_int32_int64", 0, 3, 4, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3057; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_fill_value); if (value) { values[3] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "take_2d_axis0_int32_int64") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3057; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_values = ((PyArrayObject *)values[0]); __pyx_v_indexer = ((PyArrayObject *)values[1]); __pyx_v_out = ((PyArrayObject *)values[2]); __pyx_v_fill_value = values[3]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("take_2d_axis0_int32_int64", 0, 3, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3057; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.take_2d_axis0_int32_int64", __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_filename = __pyx_f[2]; __pyx_lineno = 3057; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_indexer), __pyx_ptype_5numpy_ndarray, 1, "indexer", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3058; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_5numpy_ndarray, 1, "out", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3059; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_282take_2d_axis0_int32_int64(__pyx_self, __pyx_v_values, __pyx_v_indexer, __pyx_v_out, __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_5algos_282take_2d_axis0_int32_int64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_k; Py_ssize_t __pyx_v_n; Py_ssize_t __pyx_v_idx; __pyx_t_5numpy_int64_t __pyx_v_fv; __Pyx_LocalBuf_ND __pyx_pybuffernd_indexer; __Pyx_Buffer __pyx_pybuffer_indexer; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_values; __Pyx_Buffer __pyx_pybuffer_values; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; __pyx_t_5numpy_int64_t __pyx_t_2; Py_ssize_t __pyx_t_3; int __pyx_t_4; Py_ssize_t __pyx_t_5; Py_ssize_t __pyx_t_6; Py_ssize_t __pyx_t_7; Py_ssize_t __pyx_t_8; Py_ssize_t __pyx_t_9; Py_ssize_t __pyx_t_10; Py_ssize_t __pyx_t_11; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("take_2d_axis0_int32_int64", 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_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; { __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_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3057; __pyx_clineno = __LINE__; goto __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_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1]; { __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_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3057; __pyx_clineno = __LINE__; goto __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_BufFmt_StackElem __pyx_stack[1]; 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, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3057; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; __pyx_pybuffernd_out.diminfo[1].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_out.diminfo[1].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[1]; /* "pandas/src/generated.pyx":3065 * int64_t fv * * n = len(indexer) # <<<<<<<<<<<<<< * k = values.shape[1] * */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_indexer)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3065; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/src/generated.pyx":3066 * * n = len(indexer) * k = values.shape[1] # <<<<<<<<<<<<<< * * fv = fill_value */ __pyx_v_k = (__pyx_v_values->dimensions[1]); /* "pandas/src/generated.pyx":3068 * k = values.shape[1] * * fv = fill_value # <<<<<<<<<<<<<< * * IF False: */ __pyx_t_2 = __Pyx_PyInt_As_npy_int64(__pyx_v_fill_value); if (unlikely((__pyx_t_2 == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3068; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_fv = __pyx_t_2; /* "pandas/src/generated.pyx":3089 * return * * for i from 0 <= i < n: # <<<<<<<<<<<<<< * idx = indexer[i] * if idx == -1: */ __pyx_t_1 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_1; __pyx_v_i++) { /* "pandas/src/generated.pyx":3090 * * for i from 0 <= i < n: * idx = indexer[i] # <<<<<<<<<<<<<< * if idx == -1: * for j from 0 <= j < k: */ __pyx_t_3 = __pyx_v_i; __pyx_v_idx = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_3, __pyx_pybuffernd_indexer.diminfo[0].strides)); /* "pandas/src/generated.pyx":3091 * for i from 0 <= i < n: * idx = indexer[i] * if idx == -1: # <<<<<<<<<<<<<< * for j from 0 <= j < k: * out[i, j] = fv */ __pyx_t_4 = ((__pyx_v_idx == -1) != 0); if (__pyx_t_4) { /* "pandas/src/generated.pyx":3092 * idx = indexer[i] * if idx == -1: * for j from 0 <= j < k: # <<<<<<<<<<<<<< * out[i, j] = fv * else: */ __pyx_t_5 = __pyx_v_k; for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_5; __pyx_v_j++) { /* "pandas/src/generated.pyx":3093 * if idx == -1: * for j from 0 <= j < k: * out[i, j] = fv # <<<<<<<<<<<<<< * else: * for j from 0 <= j < k: */ __pyx_t_6 = __pyx_v_i; __pyx_t_7 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_6, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_7, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_fv; } goto __pyx_L5; } /*else*/ { /* "pandas/src/generated.pyx":3095 * out[i, j] = fv * else: * for j from 0 <= j < k: # <<<<<<<<<<<<<< * out[i, j] = values[idx, j] * */ __pyx_t_5 = __pyx_v_k; for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_5; __pyx_v_j++) { /* "pandas/src/generated.pyx":3096 * else: * for j from 0 <= j < k: * out[i, j] = values[idx, j] # <<<<<<<<<<<<<< * * @cython.wraparound(False) */ __pyx_t_8 = __pyx_v_idx; __pyx_t_9 = __pyx_v_j; __pyx_t_10 = __pyx_v_i; __pyx_t_11 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_10, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_11, __pyx_pybuffernd_out.diminfo[1].strides) = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_8, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_9, __pyx_pybuffernd_values.diminfo[1].strides)); } } __pyx_L5:; } /* "pandas/src/generated.pyx":3057 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_axis0_int32_int64(ndarray[int32_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[int64_t, ndim=2] out, */ /* 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_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.take_2d_axis0_int32_int64", __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_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":3100 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_axis0_int32_float64(ndarray[int32_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[float64_t, ndim=2] out, */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_285take_2d_axis0_int32_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_285take_2d_axis0_int32_float64 = {__Pyx_NAMESTR("take_2d_axis0_int32_float64"), (PyCFunction)__pyx_pw_6pandas_5algos_285take_2d_axis0_int32_float64, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_285take_2d_axis0_int32_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_values = 0; PyArrayObject *__pyx_v_indexer = 0; PyArrayObject *__pyx_v_out = 0; PyObject *__pyx_v_fill_value = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("take_2d_axis0_int32_float64 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_values,&__pyx_n_s_indexer,&__pyx_n_s_out,&__pyx_n_s_fill_value,0}; PyObject* values[4] = {0,0,0,0}; values[3] = __pyx_k__132; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_values)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_indexer)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_2d_axis0_int32_float64", 0, 3, 4, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3100; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_out)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_2d_axis0_int32_float64", 0, 3, 4, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3100; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_fill_value); if (value) { values[3] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "take_2d_axis0_int32_float64") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3100; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_values = ((PyArrayObject *)values[0]); __pyx_v_indexer = ((PyArrayObject *)values[1]); __pyx_v_out = ((PyArrayObject *)values[2]); __pyx_v_fill_value = values[3]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("take_2d_axis0_int32_float64", 0, 3, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3100; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.take_2d_axis0_int32_float64", __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_filename = __pyx_f[2]; __pyx_lineno = 3100; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_indexer), __pyx_ptype_5numpy_ndarray, 1, "indexer", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3101; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_5numpy_ndarray, 1, "out", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3102; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_284take_2d_axis0_int32_float64(__pyx_self, __pyx_v_values, __pyx_v_indexer, __pyx_v_out, __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_5algos_284take_2d_axis0_int32_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_k; Py_ssize_t __pyx_v_n; Py_ssize_t __pyx_v_idx; __pyx_t_5numpy_float64_t __pyx_v_fv; __Pyx_LocalBuf_ND __pyx_pybuffernd_indexer; __Pyx_Buffer __pyx_pybuffer_indexer; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_values; __Pyx_Buffer __pyx_pybuffer_values; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; __pyx_t_5numpy_float64_t __pyx_t_2; Py_ssize_t __pyx_t_3; int __pyx_t_4; Py_ssize_t __pyx_t_5; Py_ssize_t __pyx_t_6; Py_ssize_t __pyx_t_7; Py_ssize_t __pyx_t_8; Py_ssize_t __pyx_t_9; Py_ssize_t __pyx_t_10; Py_ssize_t __pyx_t_11; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("take_2d_axis0_int32_float64", 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_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; { __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_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3100; __pyx_clineno = __LINE__; goto __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_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1]; { __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_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3100; __pyx_clineno = __LINE__; goto __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_BufFmt_StackElem __pyx_stack[1]; 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, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3100; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; __pyx_pybuffernd_out.diminfo[1].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_out.diminfo[1].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[1]; /* "pandas/src/generated.pyx":3108 * float64_t fv * * n = len(indexer) # <<<<<<<<<<<<<< * k = values.shape[1] * */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_indexer)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3108; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/src/generated.pyx":3109 * * n = len(indexer) * k = values.shape[1] # <<<<<<<<<<<<<< * * fv = fill_value */ __pyx_v_k = (__pyx_v_values->dimensions[1]); /* "pandas/src/generated.pyx":3111 * k = values.shape[1] * * fv = fill_value # <<<<<<<<<<<<<< * * IF False: */ __pyx_t_2 = __pyx_PyFloat_AsDouble(__pyx_v_fill_value); if (unlikely((__pyx_t_2 == (npy_float64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3111; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_fv = __pyx_t_2; /* "pandas/src/generated.pyx":3132 * return * * for i from 0 <= i < n: # <<<<<<<<<<<<<< * idx = indexer[i] * if idx == -1: */ __pyx_t_1 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_1; __pyx_v_i++) { /* "pandas/src/generated.pyx":3133 * * for i from 0 <= i < n: * idx = indexer[i] # <<<<<<<<<<<<<< * if idx == -1: * for j from 0 <= j < k: */ __pyx_t_3 = __pyx_v_i; __pyx_v_idx = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_3, __pyx_pybuffernd_indexer.diminfo[0].strides)); /* "pandas/src/generated.pyx":3134 * for i from 0 <= i < n: * idx = indexer[i] * if idx == -1: # <<<<<<<<<<<<<< * for j from 0 <= j < k: * out[i, j] = fv */ __pyx_t_4 = ((__pyx_v_idx == -1) != 0); if (__pyx_t_4) { /* "pandas/src/generated.pyx":3135 * idx = indexer[i] * if idx == -1: * for j from 0 <= j < k: # <<<<<<<<<<<<<< * out[i, j] = fv * else: */ __pyx_t_5 = __pyx_v_k; for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_5; __pyx_v_j++) { /* "pandas/src/generated.pyx":3136 * if idx == -1: * for j from 0 <= j < k: * out[i, j] = fv # <<<<<<<<<<<<<< * else: * for j from 0 <= j < k: */ __pyx_t_6 = __pyx_v_i; __pyx_t_7 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_6, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_7, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_fv; } goto __pyx_L5; } /*else*/ { /* "pandas/src/generated.pyx":3138 * out[i, j] = fv * else: * for j from 0 <= j < k: # <<<<<<<<<<<<<< * out[i, j] = values[idx, j] * */ __pyx_t_5 = __pyx_v_k; for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_5; __pyx_v_j++) { /* "pandas/src/generated.pyx":3139 * else: * for j from 0 <= j < k: * out[i, j] = values[idx, j] # <<<<<<<<<<<<<< * * @cython.wraparound(False) */ __pyx_t_8 = __pyx_v_idx; __pyx_t_9 = __pyx_v_j; __pyx_t_10 = __pyx_v_i; __pyx_t_11 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_10, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_11, __pyx_pybuffernd_out.diminfo[1].strides) = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_8, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_9, __pyx_pybuffernd_values.diminfo[1].strides)); } } __pyx_L5:; } /* "pandas/src/generated.pyx":3100 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_axis0_int32_float64(ndarray[int32_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[float64_t, ndim=2] out, */ /* 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_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.take_2d_axis0_int32_float64", __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_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":3143 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_axis0_int64_int64(ndarray[int64_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[int64_t, ndim=2] out, */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_287take_2d_axis0_int64_int64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_287take_2d_axis0_int64_int64 = {__Pyx_NAMESTR("take_2d_axis0_int64_int64"), (PyCFunction)__pyx_pw_6pandas_5algos_287take_2d_axis0_int64_int64, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_287take_2d_axis0_int64_int64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_values = 0; PyArrayObject *__pyx_v_indexer = 0; PyArrayObject *__pyx_v_out = 0; PyObject *__pyx_v_fill_value = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("take_2d_axis0_int64_int64 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_values,&__pyx_n_s_indexer,&__pyx_n_s_out,&__pyx_n_s_fill_value,0}; PyObject* values[4] = {0,0,0,0}; values[3] = __pyx_k__133; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_values)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_indexer)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_2d_axis0_int64_int64", 0, 3, 4, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3143; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_out)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_2d_axis0_int64_int64", 0, 3, 4, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3143; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_fill_value); if (value) { values[3] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "take_2d_axis0_int64_int64") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3143; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_values = ((PyArrayObject *)values[0]); __pyx_v_indexer = ((PyArrayObject *)values[1]); __pyx_v_out = ((PyArrayObject *)values[2]); __pyx_v_fill_value = values[3]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("take_2d_axis0_int64_int64", 0, 3, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3143; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.take_2d_axis0_int64_int64", __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_filename = __pyx_f[2]; __pyx_lineno = 3143; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_indexer), __pyx_ptype_5numpy_ndarray, 1, "indexer", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3144; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_5numpy_ndarray, 1, "out", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3145; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_286take_2d_axis0_int64_int64(__pyx_self, __pyx_v_values, __pyx_v_indexer, __pyx_v_out, __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_5algos_286take_2d_axis0_int64_int64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_k; Py_ssize_t __pyx_v_n; Py_ssize_t __pyx_v_idx; __pyx_t_5numpy_int64_t __pyx_v_fv; __pyx_t_5numpy_int64_t *__pyx_v_v; __pyx_t_5numpy_int64_t *__pyx_v_o; __Pyx_LocalBuf_ND __pyx_pybuffernd_indexer; __Pyx_Buffer __pyx_pybuffer_indexer; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_values; __Pyx_Buffer __pyx_pybuffer_values; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; __pyx_t_5numpy_int64_t __pyx_t_2; int __pyx_t_3; int __pyx_t_4; int __pyx_t_5; int __pyx_t_6; Py_ssize_t __pyx_t_7; Py_ssize_t __pyx_t_8; Py_ssize_t __pyx_t_9; Py_ssize_t __pyx_t_10; long __pyx_t_11; Py_ssize_t __pyx_t_12; long __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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("take_2d_axis0_int64_int64", 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_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; { __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_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3143; __pyx_clineno = __LINE__; goto __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_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1]; { __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_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3143; __pyx_clineno = __LINE__; goto __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_BufFmt_StackElem __pyx_stack[1]; 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, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3143; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; __pyx_pybuffernd_out.diminfo[1].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_out.diminfo[1].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[1]; /* "pandas/src/generated.pyx":3151 * int64_t fv * * n = len(indexer) # <<<<<<<<<<<<<< * k = values.shape[1] * */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_indexer)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3151; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/src/generated.pyx":3152 * * n = len(indexer) * k = values.shape[1] # <<<<<<<<<<<<<< * * fv = fill_value */ __pyx_v_k = (__pyx_v_values->dimensions[1]); /* "pandas/src/generated.pyx":3154 * k = values.shape[1] * * fv = fill_value # <<<<<<<<<<<<<< * * IF True: */ __pyx_t_2 = __Pyx_PyInt_As_npy_int64(__pyx_v_fill_value); if (unlikely((__pyx_t_2 == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3154; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_fv = __pyx_t_2; /* "pandas/src/generated.pyx":3160 * int64_t *v, *o * * if (values.strides[1] == out.strides[1] and # <<<<<<<<<<<<<< * values.strides[1] == sizeof(int64_t) and * sizeof(int64_t) * n >= 256): */ __pyx_t_3 = (((__pyx_v_values->strides[1]) == (__pyx_v_out->strides[1])) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":3161 * * if (values.strides[1] == out.strides[1] and * values.strides[1] == sizeof(int64_t) and # <<<<<<<<<<<<<< * sizeof(int64_t) * n >= 256): * */ __pyx_t_4 = (((__pyx_v_values->strides[1]) == (sizeof(__pyx_t_5numpy_int64_t))) != 0); if (__pyx_t_4) { /* "pandas/src/generated.pyx":3162 * if (values.strides[1] == out.strides[1] and * values.strides[1] == sizeof(int64_t) and * sizeof(int64_t) * n >= 256): # <<<<<<<<<<<<<< * * for i from 0 <= i < n: */ __pyx_t_5 = ((((sizeof(__pyx_t_5numpy_int64_t)) * __pyx_v_n) >= 256) != 0); __pyx_t_6 = __pyx_t_5; } else { __pyx_t_6 = __pyx_t_4; } __pyx_t_4 = __pyx_t_6; } else { __pyx_t_4 = __pyx_t_3; } if (__pyx_t_4) { /* "pandas/src/generated.pyx":3164 * sizeof(int64_t) * n >= 256): * * for i from 0 <= i < n: # <<<<<<<<<<<<<< * idx = indexer[i] * if idx == -1: */ __pyx_t_1 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_1; __pyx_v_i++) { /* "pandas/src/generated.pyx":3165 * * for i from 0 <= i < n: * idx = indexer[i] # <<<<<<<<<<<<<< * if idx == -1: * for j from 0 <= j < k: */ __pyx_t_7 = __pyx_v_i; __pyx_v_idx = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_7, __pyx_pybuffernd_indexer.diminfo[0].strides)); /* "pandas/src/generated.pyx":3166 * for i from 0 <= i < n: * idx = indexer[i] * if idx == -1: # <<<<<<<<<<<<<< * for j from 0 <= j < k: * out[i, j] = fv */ __pyx_t_4 = ((__pyx_v_idx == -1) != 0); if (__pyx_t_4) { /* "pandas/src/generated.pyx":3167 * idx = indexer[i] * if idx == -1: * for j from 0 <= j < k: # <<<<<<<<<<<<<< * out[i, j] = fv * else: */ __pyx_t_8 = __pyx_v_k; for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_8; __pyx_v_j++) { /* "pandas/src/generated.pyx":3168 * if idx == -1: * for j from 0 <= j < k: * out[i, j] = fv # <<<<<<<<<<<<<< * else: * v = &values[idx, 0] */ __pyx_t_9 = __pyx_v_i; __pyx_t_10 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_9, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_10, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_fv; } goto __pyx_L6; } /*else*/ { /* "pandas/src/generated.pyx":3170 * out[i, j] = fv * else: * v = &values[idx, 0] # <<<<<<<<<<<<<< * o = &out[i, 0] * memmove(o, v, (sizeof(int64_t) * k)) */ __pyx_t_8 = __pyx_v_idx; __pyx_t_11 = 0; __pyx_v_v = (&(*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_8, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_11, __pyx_pybuffernd_values.diminfo[1].strides))); /* "pandas/src/generated.pyx":3171 * else: * v = &values[idx, 0] * o = &out[i, 0] # <<<<<<<<<<<<<< * memmove(o, v, (sizeof(int64_t) * k)) * return */ __pyx_t_12 = __pyx_v_i; __pyx_t_13 = 0; __pyx_v_o = (&(*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_12, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_13, __pyx_pybuffernd_out.diminfo[1].strides))); /* "pandas/src/generated.pyx":3172 * v = &values[idx, 0] * o = &out[i, 0] * memmove(o, v, (sizeof(int64_t) * k)) # <<<<<<<<<<<<<< * return * */ memmove(__pyx_v_o, __pyx_v_v, ((size_t)((sizeof(__pyx_t_5numpy_int64_t)) * __pyx_v_k))); } __pyx_L6:; } /* "pandas/src/generated.pyx":3173 * o = &out[i, 0] * memmove(o, v, (sizeof(int64_t) * k)) * return # <<<<<<<<<<<<<< * * for i from 0 <= i < n: */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; } /* "pandas/src/generated.pyx":3175 * return * * for i from 0 <= i < n: # <<<<<<<<<<<<<< * idx = indexer[i] * if idx == -1: */ __pyx_t_1 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_1; __pyx_v_i++) { /* "pandas/src/generated.pyx":3176 * * for i from 0 <= i < n: * idx = indexer[i] # <<<<<<<<<<<<<< * if idx == -1: * for j from 0 <= j < k: */ __pyx_t_14 = __pyx_v_i; __pyx_v_idx = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_indexer.diminfo[0].strides)); /* "pandas/src/generated.pyx":3177 * for i from 0 <= i < n: * idx = indexer[i] * if idx == -1: # <<<<<<<<<<<<<< * for j from 0 <= j < k: * out[i, j] = fv */ __pyx_t_4 = ((__pyx_v_idx == -1) != 0); if (__pyx_t_4) { /* "pandas/src/generated.pyx":3178 * idx = indexer[i] * if idx == -1: * for j from 0 <= j < k: # <<<<<<<<<<<<<< * out[i, j] = fv * else: */ __pyx_t_15 = __pyx_v_k; for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_15; __pyx_v_j++) { /* "pandas/src/generated.pyx":3179 * if idx == -1: * for j from 0 <= j < k: * out[i, j] = fv # <<<<<<<<<<<<<< * else: * for j from 0 <= j < k: */ __pyx_t_16 = __pyx_v_i; __pyx_t_17 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_17, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_fv; } goto __pyx_L11; } /*else*/ { /* "pandas/src/generated.pyx":3181 * out[i, j] = fv * else: * for j from 0 <= j < k: # <<<<<<<<<<<<<< * out[i, j] = values[idx, j] * */ __pyx_t_15 = __pyx_v_k; for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_15; __pyx_v_j++) { /* "pandas/src/generated.pyx":3182 * else: * for j from 0 <= j < k: * out[i, j] = values[idx, j] # <<<<<<<<<<<<<< * * @cython.wraparound(False) */ __pyx_t_18 = __pyx_v_idx; __pyx_t_19 = __pyx_v_j; __pyx_t_20 = __pyx_v_i; __pyx_t_21 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_21, __pyx_pybuffernd_out.diminfo[1].strides) = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_19, __pyx_pybuffernd_values.diminfo[1].strides)); } } __pyx_L11:; } /* "pandas/src/generated.pyx":3143 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_axis0_int64_int64(ndarray[int64_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[int64_t, ndim=2] out, */ /* 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_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.take_2d_axis0_int64_int64", __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_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":3186 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_axis0_int64_float64(ndarray[int64_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[float64_t, ndim=2] out, */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_289take_2d_axis0_int64_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_289take_2d_axis0_int64_float64 = {__Pyx_NAMESTR("take_2d_axis0_int64_float64"), (PyCFunction)__pyx_pw_6pandas_5algos_289take_2d_axis0_int64_float64, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_289take_2d_axis0_int64_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_values = 0; PyArrayObject *__pyx_v_indexer = 0; PyArrayObject *__pyx_v_out = 0; PyObject *__pyx_v_fill_value = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("take_2d_axis0_int64_float64 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_values,&__pyx_n_s_indexer,&__pyx_n_s_out,&__pyx_n_s_fill_value,0}; PyObject* values[4] = {0,0,0,0}; values[3] = __pyx_k__134; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_values)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_indexer)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_2d_axis0_int64_float64", 0, 3, 4, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3186; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_out)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_2d_axis0_int64_float64", 0, 3, 4, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3186; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_fill_value); if (value) { values[3] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "take_2d_axis0_int64_float64") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3186; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_values = ((PyArrayObject *)values[0]); __pyx_v_indexer = ((PyArrayObject *)values[1]); __pyx_v_out = ((PyArrayObject *)values[2]); __pyx_v_fill_value = values[3]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("take_2d_axis0_int64_float64", 0, 3, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3186; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.take_2d_axis0_int64_float64", __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_filename = __pyx_f[2]; __pyx_lineno = 3186; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_indexer), __pyx_ptype_5numpy_ndarray, 1, "indexer", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3187; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_5numpy_ndarray, 1, "out", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3188; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_288take_2d_axis0_int64_float64(__pyx_self, __pyx_v_values, __pyx_v_indexer, __pyx_v_out, __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_5algos_288take_2d_axis0_int64_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_k; Py_ssize_t __pyx_v_n; Py_ssize_t __pyx_v_idx; __pyx_t_5numpy_float64_t __pyx_v_fv; __Pyx_LocalBuf_ND __pyx_pybuffernd_indexer; __Pyx_Buffer __pyx_pybuffer_indexer; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_values; __Pyx_Buffer __pyx_pybuffer_values; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; __pyx_t_5numpy_float64_t __pyx_t_2; Py_ssize_t __pyx_t_3; int __pyx_t_4; Py_ssize_t __pyx_t_5; Py_ssize_t __pyx_t_6; Py_ssize_t __pyx_t_7; Py_ssize_t __pyx_t_8; Py_ssize_t __pyx_t_9; Py_ssize_t __pyx_t_10; Py_ssize_t __pyx_t_11; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("take_2d_axis0_int64_float64", 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_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; { __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_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3186; __pyx_clineno = __LINE__; goto __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_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1]; { __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_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3186; __pyx_clineno = __LINE__; goto __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_BufFmt_StackElem __pyx_stack[1]; 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, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3186; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; __pyx_pybuffernd_out.diminfo[1].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_out.diminfo[1].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[1]; /* "pandas/src/generated.pyx":3194 * float64_t fv * * n = len(indexer) # <<<<<<<<<<<<<< * k = values.shape[1] * */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_indexer)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3194; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/src/generated.pyx":3195 * * n = len(indexer) * k = values.shape[1] # <<<<<<<<<<<<<< * * fv = fill_value */ __pyx_v_k = (__pyx_v_values->dimensions[1]); /* "pandas/src/generated.pyx":3197 * k = values.shape[1] * * fv = fill_value # <<<<<<<<<<<<<< * * IF False: */ __pyx_t_2 = __pyx_PyFloat_AsDouble(__pyx_v_fill_value); if (unlikely((__pyx_t_2 == (npy_float64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3197; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_fv = __pyx_t_2; /* "pandas/src/generated.pyx":3218 * return * * for i from 0 <= i < n: # <<<<<<<<<<<<<< * idx = indexer[i] * if idx == -1: */ __pyx_t_1 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_1; __pyx_v_i++) { /* "pandas/src/generated.pyx":3219 * * for i from 0 <= i < n: * idx = indexer[i] # <<<<<<<<<<<<<< * if idx == -1: * for j from 0 <= j < k: */ __pyx_t_3 = __pyx_v_i; __pyx_v_idx = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_3, __pyx_pybuffernd_indexer.diminfo[0].strides)); /* "pandas/src/generated.pyx":3220 * for i from 0 <= i < n: * idx = indexer[i] * if idx == -1: # <<<<<<<<<<<<<< * for j from 0 <= j < k: * out[i, j] = fv */ __pyx_t_4 = ((__pyx_v_idx == -1) != 0); if (__pyx_t_4) { /* "pandas/src/generated.pyx":3221 * idx = indexer[i] * if idx == -1: * for j from 0 <= j < k: # <<<<<<<<<<<<<< * out[i, j] = fv * else: */ __pyx_t_5 = __pyx_v_k; for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_5; __pyx_v_j++) { /* "pandas/src/generated.pyx":3222 * if idx == -1: * for j from 0 <= j < k: * out[i, j] = fv # <<<<<<<<<<<<<< * else: * for j from 0 <= j < k: */ __pyx_t_6 = __pyx_v_i; __pyx_t_7 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_6, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_7, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_fv; } goto __pyx_L5; } /*else*/ { /* "pandas/src/generated.pyx":3224 * out[i, j] = fv * else: * for j from 0 <= j < k: # <<<<<<<<<<<<<< * out[i, j] = values[idx, j] * */ __pyx_t_5 = __pyx_v_k; for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_5; __pyx_v_j++) { /* "pandas/src/generated.pyx":3225 * else: * for j from 0 <= j < k: * out[i, j] = values[idx, j] # <<<<<<<<<<<<<< * * @cython.wraparound(False) */ __pyx_t_8 = __pyx_v_idx; __pyx_t_9 = __pyx_v_j; __pyx_t_10 = __pyx_v_i; __pyx_t_11 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_10, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_11, __pyx_pybuffernd_out.diminfo[1].strides) = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_8, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_9, __pyx_pybuffernd_values.diminfo[1].strides)); } } __pyx_L5:; } /* "pandas/src/generated.pyx":3186 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_axis0_int64_float64(ndarray[int64_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[float64_t, ndim=2] out, */ /* 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_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.take_2d_axis0_int64_float64", __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_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":3229 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_axis0_float32_float32(ndarray[float32_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[float32_t, ndim=2] out, */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_291take_2d_axis0_float32_float32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_291take_2d_axis0_float32_float32 = {__Pyx_NAMESTR("take_2d_axis0_float32_float32"), (PyCFunction)__pyx_pw_6pandas_5algos_291take_2d_axis0_float32_float32, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_291take_2d_axis0_float32_float32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_values = 0; PyArrayObject *__pyx_v_indexer = 0; PyArrayObject *__pyx_v_out = 0; PyObject *__pyx_v_fill_value = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("take_2d_axis0_float32_float32 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_values,&__pyx_n_s_indexer,&__pyx_n_s_out,&__pyx_n_s_fill_value,0}; PyObject* values[4] = {0,0,0,0}; values[3] = __pyx_k__135; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_values)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_indexer)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_2d_axis0_float32_float32", 0, 3, 4, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3229; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_out)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_2d_axis0_float32_float32", 0, 3, 4, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3229; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_fill_value); if (value) { values[3] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "take_2d_axis0_float32_float32") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3229; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_values = ((PyArrayObject *)values[0]); __pyx_v_indexer = ((PyArrayObject *)values[1]); __pyx_v_out = ((PyArrayObject *)values[2]); __pyx_v_fill_value = values[3]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("take_2d_axis0_float32_float32", 0, 3, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3229; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.take_2d_axis0_float32_float32", __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_filename = __pyx_f[2]; __pyx_lineno = 3229; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_indexer), __pyx_ptype_5numpy_ndarray, 1, "indexer", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3230; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_5numpy_ndarray, 1, "out", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3231; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_290take_2d_axis0_float32_float32(__pyx_self, __pyx_v_values, __pyx_v_indexer, __pyx_v_out, __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_5algos_290take_2d_axis0_float32_float32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_k; Py_ssize_t __pyx_v_n; Py_ssize_t __pyx_v_idx; __pyx_t_5numpy_float32_t __pyx_v_fv; __pyx_t_5numpy_float32_t *__pyx_v_v; __pyx_t_5numpy_float32_t *__pyx_v_o; __Pyx_LocalBuf_ND __pyx_pybuffernd_indexer; __Pyx_Buffer __pyx_pybuffer_indexer; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_values; __Pyx_Buffer __pyx_pybuffer_values; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; __pyx_t_5numpy_float32_t __pyx_t_2; int __pyx_t_3; int __pyx_t_4; int __pyx_t_5; int __pyx_t_6; Py_ssize_t __pyx_t_7; Py_ssize_t __pyx_t_8; Py_ssize_t __pyx_t_9; Py_ssize_t __pyx_t_10; long __pyx_t_11; Py_ssize_t __pyx_t_12; long __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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("take_2d_axis0_float32_float32", 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_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; { __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_float32_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3229; __pyx_clineno = __LINE__; goto __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_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1]; { __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_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3229; __pyx_clineno = __LINE__; goto __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_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_v_out, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3229; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; __pyx_pybuffernd_out.diminfo[1].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_out.diminfo[1].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[1]; /* "pandas/src/generated.pyx":3237 * float32_t fv * * n = len(indexer) # <<<<<<<<<<<<<< * k = values.shape[1] * */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_indexer)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3237; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/src/generated.pyx":3238 * * n = len(indexer) * k = values.shape[1] # <<<<<<<<<<<<<< * * fv = fill_value */ __pyx_v_k = (__pyx_v_values->dimensions[1]); /* "pandas/src/generated.pyx":3240 * k = values.shape[1] * * fv = fill_value # <<<<<<<<<<<<<< * * IF True: */ __pyx_t_2 = __pyx_PyFloat_AsFloat(__pyx_v_fill_value); if (unlikely((__pyx_t_2 == (npy_float32)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3240; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_fv = __pyx_t_2; /* "pandas/src/generated.pyx":3246 * float32_t *v, *o * * if (values.strides[1] == out.strides[1] and # <<<<<<<<<<<<<< * values.strides[1] == sizeof(float32_t) and * sizeof(float32_t) * n >= 256): */ __pyx_t_3 = (((__pyx_v_values->strides[1]) == (__pyx_v_out->strides[1])) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":3247 * * if (values.strides[1] == out.strides[1] and * values.strides[1] == sizeof(float32_t) and # <<<<<<<<<<<<<< * sizeof(float32_t) * n >= 256): * */ __pyx_t_4 = (((__pyx_v_values->strides[1]) == (sizeof(__pyx_t_5numpy_float32_t))) != 0); if (__pyx_t_4) { /* "pandas/src/generated.pyx":3248 * if (values.strides[1] == out.strides[1] and * values.strides[1] == sizeof(float32_t) and * sizeof(float32_t) * n >= 256): # <<<<<<<<<<<<<< * * for i from 0 <= i < n: */ __pyx_t_5 = ((((sizeof(__pyx_t_5numpy_float32_t)) * __pyx_v_n) >= 256) != 0); __pyx_t_6 = __pyx_t_5; } else { __pyx_t_6 = __pyx_t_4; } __pyx_t_4 = __pyx_t_6; } else { __pyx_t_4 = __pyx_t_3; } if (__pyx_t_4) { /* "pandas/src/generated.pyx":3250 * sizeof(float32_t) * n >= 256): * * for i from 0 <= i < n: # <<<<<<<<<<<<<< * idx = indexer[i] * if idx == -1: */ __pyx_t_1 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_1; __pyx_v_i++) { /* "pandas/src/generated.pyx":3251 * * for i from 0 <= i < n: * idx = indexer[i] # <<<<<<<<<<<<<< * if idx == -1: * for j from 0 <= j < k: */ __pyx_t_7 = __pyx_v_i; __pyx_v_idx = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_7, __pyx_pybuffernd_indexer.diminfo[0].strides)); /* "pandas/src/generated.pyx":3252 * for i from 0 <= i < n: * idx = indexer[i] * if idx == -1: # <<<<<<<<<<<<<< * for j from 0 <= j < k: * out[i, j] = fv */ __pyx_t_4 = ((__pyx_v_idx == -1) != 0); if (__pyx_t_4) { /* "pandas/src/generated.pyx":3253 * idx = indexer[i] * if idx == -1: * for j from 0 <= j < k: # <<<<<<<<<<<<<< * out[i, j] = fv * else: */ __pyx_t_8 = __pyx_v_k; for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_8; __pyx_v_j++) { /* "pandas/src/generated.pyx":3254 * if idx == -1: * for j from 0 <= j < k: * out[i, j] = fv # <<<<<<<<<<<<<< * else: * v = &values[idx, 0] */ __pyx_t_9 = __pyx_v_i; __pyx_t_10 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_9, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_10, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_fv; } goto __pyx_L6; } /*else*/ { /* "pandas/src/generated.pyx":3256 * out[i, j] = fv * else: * v = &values[idx, 0] # <<<<<<<<<<<<<< * o = &out[i, 0] * memmove(o, v, (sizeof(float32_t) * k)) */ __pyx_t_8 = __pyx_v_idx; __pyx_t_11 = 0; __pyx_v_v = (&(*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_8, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_11, __pyx_pybuffernd_values.diminfo[1].strides))); /* "pandas/src/generated.pyx":3257 * else: * v = &values[idx, 0] * o = &out[i, 0] # <<<<<<<<<<<<<< * memmove(o, v, (sizeof(float32_t) * k)) * return */ __pyx_t_12 = __pyx_v_i; __pyx_t_13 = 0; __pyx_v_o = (&(*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_12, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_13, __pyx_pybuffernd_out.diminfo[1].strides))); /* "pandas/src/generated.pyx":3258 * v = &values[idx, 0] * o = &out[i, 0] * memmove(o, v, (sizeof(float32_t) * k)) # <<<<<<<<<<<<<< * return * */ memmove(__pyx_v_o, __pyx_v_v, ((size_t)((sizeof(__pyx_t_5numpy_float32_t)) * __pyx_v_k))); } __pyx_L6:; } /* "pandas/src/generated.pyx":3259 * o = &out[i, 0] * memmove(o, v, (sizeof(float32_t) * k)) * return # <<<<<<<<<<<<<< * * for i from 0 <= i < n: */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; } /* "pandas/src/generated.pyx":3261 * return * * for i from 0 <= i < n: # <<<<<<<<<<<<<< * idx = indexer[i] * if idx == -1: */ __pyx_t_1 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_1; __pyx_v_i++) { /* "pandas/src/generated.pyx":3262 * * for i from 0 <= i < n: * idx = indexer[i] # <<<<<<<<<<<<<< * if idx == -1: * for j from 0 <= j < k: */ __pyx_t_14 = __pyx_v_i; __pyx_v_idx = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_indexer.diminfo[0].strides)); /* "pandas/src/generated.pyx":3263 * for i from 0 <= i < n: * idx = indexer[i] * if idx == -1: # <<<<<<<<<<<<<< * for j from 0 <= j < k: * out[i, j] = fv */ __pyx_t_4 = ((__pyx_v_idx == -1) != 0); if (__pyx_t_4) { /* "pandas/src/generated.pyx":3264 * idx = indexer[i] * if idx == -1: * for j from 0 <= j < k: # <<<<<<<<<<<<<< * out[i, j] = fv * else: */ __pyx_t_15 = __pyx_v_k; for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_15; __pyx_v_j++) { /* "pandas/src/generated.pyx":3265 * if idx == -1: * for j from 0 <= j < k: * out[i, j] = fv # <<<<<<<<<<<<<< * else: * for j from 0 <= j < k: */ __pyx_t_16 = __pyx_v_i; __pyx_t_17 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_17, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_fv; } goto __pyx_L11; } /*else*/ { /* "pandas/src/generated.pyx":3267 * out[i, j] = fv * else: * for j from 0 <= j < k: # <<<<<<<<<<<<<< * out[i, j] = values[idx, j] * */ __pyx_t_15 = __pyx_v_k; for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_15; __pyx_v_j++) { /* "pandas/src/generated.pyx":3268 * else: * for j from 0 <= j < k: * out[i, j] = values[idx, j] # <<<<<<<<<<<<<< * * @cython.wraparound(False) */ __pyx_t_18 = __pyx_v_idx; __pyx_t_19 = __pyx_v_j; __pyx_t_20 = __pyx_v_i; __pyx_t_21 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_21, __pyx_pybuffernd_out.diminfo[1].strides) = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_19, __pyx_pybuffernd_values.diminfo[1].strides)); } } __pyx_L11:; } /* "pandas/src/generated.pyx":3229 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_axis0_float32_float32(ndarray[float32_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[float32_t, ndim=2] out, */ /* 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_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.take_2d_axis0_float32_float32", __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_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":3272 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_axis0_float32_float64(ndarray[float32_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[float64_t, ndim=2] out, */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_293take_2d_axis0_float32_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_293take_2d_axis0_float32_float64 = {__Pyx_NAMESTR("take_2d_axis0_float32_float64"), (PyCFunction)__pyx_pw_6pandas_5algos_293take_2d_axis0_float32_float64, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_293take_2d_axis0_float32_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_values = 0; PyArrayObject *__pyx_v_indexer = 0; PyArrayObject *__pyx_v_out = 0; PyObject *__pyx_v_fill_value = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("take_2d_axis0_float32_float64 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_values,&__pyx_n_s_indexer,&__pyx_n_s_out,&__pyx_n_s_fill_value,0}; PyObject* values[4] = {0,0,0,0}; values[3] = __pyx_k__136; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_values)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_indexer)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_2d_axis0_float32_float64", 0, 3, 4, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3272; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_out)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_2d_axis0_float32_float64", 0, 3, 4, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3272; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_fill_value); if (value) { values[3] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "take_2d_axis0_float32_float64") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3272; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_values = ((PyArrayObject *)values[0]); __pyx_v_indexer = ((PyArrayObject *)values[1]); __pyx_v_out = ((PyArrayObject *)values[2]); __pyx_v_fill_value = values[3]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("take_2d_axis0_float32_float64", 0, 3, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3272; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.take_2d_axis0_float32_float64", __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_filename = __pyx_f[2]; __pyx_lineno = 3272; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_indexer), __pyx_ptype_5numpy_ndarray, 1, "indexer", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3273; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_5numpy_ndarray, 1, "out", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3274; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_292take_2d_axis0_float32_float64(__pyx_self, __pyx_v_values, __pyx_v_indexer, __pyx_v_out, __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_5algos_292take_2d_axis0_float32_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_k; Py_ssize_t __pyx_v_n; Py_ssize_t __pyx_v_idx; __pyx_t_5numpy_float64_t __pyx_v_fv; __Pyx_LocalBuf_ND __pyx_pybuffernd_indexer; __Pyx_Buffer __pyx_pybuffer_indexer; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_values; __Pyx_Buffer __pyx_pybuffer_values; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; __pyx_t_5numpy_float64_t __pyx_t_2; Py_ssize_t __pyx_t_3; int __pyx_t_4; Py_ssize_t __pyx_t_5; Py_ssize_t __pyx_t_6; Py_ssize_t __pyx_t_7; Py_ssize_t __pyx_t_8; Py_ssize_t __pyx_t_9; Py_ssize_t __pyx_t_10; Py_ssize_t __pyx_t_11; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("take_2d_axis0_float32_float64", 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_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; { __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_float32_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3272; __pyx_clineno = __LINE__; goto __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_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1]; { __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_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3272; __pyx_clineno = __LINE__; goto __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_BufFmt_StackElem __pyx_stack[1]; 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, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3272; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; __pyx_pybuffernd_out.diminfo[1].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_out.diminfo[1].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[1]; /* "pandas/src/generated.pyx":3280 * float64_t fv * * n = len(indexer) # <<<<<<<<<<<<<< * k = values.shape[1] * */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_indexer)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3280; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/src/generated.pyx":3281 * * n = len(indexer) * k = values.shape[1] # <<<<<<<<<<<<<< * * fv = fill_value */ __pyx_v_k = (__pyx_v_values->dimensions[1]); /* "pandas/src/generated.pyx":3283 * k = values.shape[1] * * fv = fill_value # <<<<<<<<<<<<<< * * IF False: */ __pyx_t_2 = __pyx_PyFloat_AsDouble(__pyx_v_fill_value); if (unlikely((__pyx_t_2 == (npy_float64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3283; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_fv = __pyx_t_2; /* "pandas/src/generated.pyx":3304 * return * * for i from 0 <= i < n: # <<<<<<<<<<<<<< * idx = indexer[i] * if idx == -1: */ __pyx_t_1 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_1; __pyx_v_i++) { /* "pandas/src/generated.pyx":3305 * * for i from 0 <= i < n: * idx = indexer[i] # <<<<<<<<<<<<<< * if idx == -1: * for j from 0 <= j < k: */ __pyx_t_3 = __pyx_v_i; __pyx_v_idx = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_3, __pyx_pybuffernd_indexer.diminfo[0].strides)); /* "pandas/src/generated.pyx":3306 * for i from 0 <= i < n: * idx = indexer[i] * if idx == -1: # <<<<<<<<<<<<<< * for j from 0 <= j < k: * out[i, j] = fv */ __pyx_t_4 = ((__pyx_v_idx == -1) != 0); if (__pyx_t_4) { /* "pandas/src/generated.pyx":3307 * idx = indexer[i] * if idx == -1: * for j from 0 <= j < k: # <<<<<<<<<<<<<< * out[i, j] = fv * else: */ __pyx_t_5 = __pyx_v_k; for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_5; __pyx_v_j++) { /* "pandas/src/generated.pyx":3308 * if idx == -1: * for j from 0 <= j < k: * out[i, j] = fv # <<<<<<<<<<<<<< * else: * for j from 0 <= j < k: */ __pyx_t_6 = __pyx_v_i; __pyx_t_7 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_6, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_7, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_fv; } goto __pyx_L5; } /*else*/ { /* "pandas/src/generated.pyx":3310 * out[i, j] = fv * else: * for j from 0 <= j < k: # <<<<<<<<<<<<<< * out[i, j] = values[idx, j] * */ __pyx_t_5 = __pyx_v_k; for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_5; __pyx_v_j++) { /* "pandas/src/generated.pyx":3311 * else: * for j from 0 <= j < k: * out[i, j] = values[idx, j] # <<<<<<<<<<<<<< * * @cython.wraparound(False) */ __pyx_t_8 = __pyx_v_idx; __pyx_t_9 = __pyx_v_j; __pyx_t_10 = __pyx_v_i; __pyx_t_11 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_10, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_11, __pyx_pybuffernd_out.diminfo[1].strides) = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_8, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_9, __pyx_pybuffernd_values.diminfo[1].strides)); } } __pyx_L5:; } /* "pandas/src/generated.pyx":3272 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_axis0_float32_float64(ndarray[float32_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[float64_t, ndim=2] out, */ /* 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_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.take_2d_axis0_float32_float64", __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_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":3315 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_axis0_float64_float64(ndarray[float64_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[float64_t, ndim=2] out, */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_295take_2d_axis0_float64_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_295take_2d_axis0_float64_float64 = {__Pyx_NAMESTR("take_2d_axis0_float64_float64"), (PyCFunction)__pyx_pw_6pandas_5algos_295take_2d_axis0_float64_float64, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_295take_2d_axis0_float64_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_values = 0; PyArrayObject *__pyx_v_indexer = 0; PyArrayObject *__pyx_v_out = 0; PyObject *__pyx_v_fill_value = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("take_2d_axis0_float64_float64 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_values,&__pyx_n_s_indexer,&__pyx_n_s_out,&__pyx_n_s_fill_value,0}; PyObject* values[4] = {0,0,0,0}; values[3] = __pyx_k__137; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_values)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_indexer)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_2d_axis0_float64_float64", 0, 3, 4, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3315; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_out)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_2d_axis0_float64_float64", 0, 3, 4, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3315; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_fill_value); if (value) { values[3] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "take_2d_axis0_float64_float64") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3315; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_values = ((PyArrayObject *)values[0]); __pyx_v_indexer = ((PyArrayObject *)values[1]); __pyx_v_out = ((PyArrayObject *)values[2]); __pyx_v_fill_value = values[3]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("take_2d_axis0_float64_float64", 0, 3, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3315; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.take_2d_axis0_float64_float64", __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_filename = __pyx_f[2]; __pyx_lineno = 3315; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_indexer), __pyx_ptype_5numpy_ndarray, 1, "indexer", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3316; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_5numpy_ndarray, 1, "out", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3317; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_294take_2d_axis0_float64_float64(__pyx_self, __pyx_v_values, __pyx_v_indexer, __pyx_v_out, __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_5algos_294take_2d_axis0_float64_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_k; Py_ssize_t __pyx_v_n; Py_ssize_t __pyx_v_idx; __pyx_t_5numpy_float64_t __pyx_v_fv; __pyx_t_5numpy_float64_t *__pyx_v_v; __pyx_t_5numpy_float64_t *__pyx_v_o; __Pyx_LocalBuf_ND __pyx_pybuffernd_indexer; __Pyx_Buffer __pyx_pybuffer_indexer; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_values; __Pyx_Buffer __pyx_pybuffer_values; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; __pyx_t_5numpy_float64_t __pyx_t_2; int __pyx_t_3; int __pyx_t_4; int __pyx_t_5; int __pyx_t_6; Py_ssize_t __pyx_t_7; Py_ssize_t __pyx_t_8; Py_ssize_t __pyx_t_9; Py_ssize_t __pyx_t_10; long __pyx_t_11; Py_ssize_t __pyx_t_12; long __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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("take_2d_axis0_float64_float64", 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_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; { __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, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3315; __pyx_clineno = __LINE__; goto __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_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1]; { __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_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3315; __pyx_clineno = __LINE__; goto __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_BufFmt_StackElem __pyx_stack[1]; 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, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3315; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; __pyx_pybuffernd_out.diminfo[1].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_out.diminfo[1].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[1]; /* "pandas/src/generated.pyx":3323 * float64_t fv * * n = len(indexer) # <<<<<<<<<<<<<< * k = values.shape[1] * */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_indexer)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3323; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/src/generated.pyx":3324 * * n = len(indexer) * k = values.shape[1] # <<<<<<<<<<<<<< * * fv = fill_value */ __pyx_v_k = (__pyx_v_values->dimensions[1]); /* "pandas/src/generated.pyx":3326 * k = values.shape[1] * * fv = fill_value # <<<<<<<<<<<<<< * * IF True: */ __pyx_t_2 = __pyx_PyFloat_AsDouble(__pyx_v_fill_value); if (unlikely((__pyx_t_2 == (npy_float64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3326; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_fv = __pyx_t_2; /* "pandas/src/generated.pyx":3332 * float64_t *v, *o * * if (values.strides[1] == out.strides[1] and # <<<<<<<<<<<<<< * values.strides[1] == sizeof(float64_t) and * sizeof(float64_t) * n >= 256): */ __pyx_t_3 = (((__pyx_v_values->strides[1]) == (__pyx_v_out->strides[1])) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":3333 * * if (values.strides[1] == out.strides[1] and * values.strides[1] == sizeof(float64_t) and # <<<<<<<<<<<<<< * sizeof(float64_t) * n >= 256): * */ __pyx_t_4 = (((__pyx_v_values->strides[1]) == (sizeof(__pyx_t_5numpy_float64_t))) != 0); if (__pyx_t_4) { /* "pandas/src/generated.pyx":3334 * if (values.strides[1] == out.strides[1] and * values.strides[1] == sizeof(float64_t) and * sizeof(float64_t) * n >= 256): # <<<<<<<<<<<<<< * * for i from 0 <= i < n: */ __pyx_t_5 = ((((sizeof(__pyx_t_5numpy_float64_t)) * __pyx_v_n) >= 256) != 0); __pyx_t_6 = __pyx_t_5; } else { __pyx_t_6 = __pyx_t_4; } __pyx_t_4 = __pyx_t_6; } else { __pyx_t_4 = __pyx_t_3; } if (__pyx_t_4) { /* "pandas/src/generated.pyx":3336 * sizeof(float64_t) * n >= 256): * * for i from 0 <= i < n: # <<<<<<<<<<<<<< * idx = indexer[i] * if idx == -1: */ __pyx_t_1 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_1; __pyx_v_i++) { /* "pandas/src/generated.pyx":3337 * * for i from 0 <= i < n: * idx = indexer[i] # <<<<<<<<<<<<<< * if idx == -1: * for j from 0 <= j < k: */ __pyx_t_7 = __pyx_v_i; __pyx_v_idx = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_7, __pyx_pybuffernd_indexer.diminfo[0].strides)); /* "pandas/src/generated.pyx":3338 * for i from 0 <= i < n: * idx = indexer[i] * if idx == -1: # <<<<<<<<<<<<<< * for j from 0 <= j < k: * out[i, j] = fv */ __pyx_t_4 = ((__pyx_v_idx == -1) != 0); if (__pyx_t_4) { /* "pandas/src/generated.pyx":3339 * idx = indexer[i] * if idx == -1: * for j from 0 <= j < k: # <<<<<<<<<<<<<< * out[i, j] = fv * else: */ __pyx_t_8 = __pyx_v_k; for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_8; __pyx_v_j++) { /* "pandas/src/generated.pyx":3340 * if idx == -1: * for j from 0 <= j < k: * out[i, j] = fv # <<<<<<<<<<<<<< * else: * v = &values[idx, 0] */ __pyx_t_9 = __pyx_v_i; __pyx_t_10 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_9, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_10, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_fv; } goto __pyx_L6; } /*else*/ { /* "pandas/src/generated.pyx":3342 * out[i, j] = fv * else: * v = &values[idx, 0] # <<<<<<<<<<<<<< * o = &out[i, 0] * memmove(o, v, (sizeof(float64_t) * k)) */ __pyx_t_8 = __pyx_v_idx; __pyx_t_11 = 0; __pyx_v_v = (&(*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_8, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_11, __pyx_pybuffernd_values.diminfo[1].strides))); /* "pandas/src/generated.pyx":3343 * else: * v = &values[idx, 0] * o = &out[i, 0] # <<<<<<<<<<<<<< * memmove(o, v, (sizeof(float64_t) * k)) * return */ __pyx_t_12 = __pyx_v_i; __pyx_t_13 = 0; __pyx_v_o = (&(*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_12, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_13, __pyx_pybuffernd_out.diminfo[1].strides))); /* "pandas/src/generated.pyx":3344 * v = &values[idx, 0] * o = &out[i, 0] * memmove(o, v, (sizeof(float64_t) * k)) # <<<<<<<<<<<<<< * return * */ memmove(__pyx_v_o, __pyx_v_v, ((size_t)((sizeof(__pyx_t_5numpy_float64_t)) * __pyx_v_k))); } __pyx_L6:; } /* "pandas/src/generated.pyx":3345 * o = &out[i, 0] * memmove(o, v, (sizeof(float64_t) * k)) * return # <<<<<<<<<<<<<< * * for i from 0 <= i < n: */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; } /* "pandas/src/generated.pyx":3347 * return * * for i from 0 <= i < n: # <<<<<<<<<<<<<< * idx = indexer[i] * if idx == -1: */ __pyx_t_1 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_1; __pyx_v_i++) { /* "pandas/src/generated.pyx":3348 * * for i from 0 <= i < n: * idx = indexer[i] # <<<<<<<<<<<<<< * if idx == -1: * for j from 0 <= j < k: */ __pyx_t_14 = __pyx_v_i; __pyx_v_idx = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_indexer.diminfo[0].strides)); /* "pandas/src/generated.pyx":3349 * for i from 0 <= i < n: * idx = indexer[i] * if idx == -1: # <<<<<<<<<<<<<< * for j from 0 <= j < k: * out[i, j] = fv */ __pyx_t_4 = ((__pyx_v_idx == -1) != 0); if (__pyx_t_4) { /* "pandas/src/generated.pyx":3350 * idx = indexer[i] * if idx == -1: * for j from 0 <= j < k: # <<<<<<<<<<<<<< * out[i, j] = fv * else: */ __pyx_t_15 = __pyx_v_k; for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_15; __pyx_v_j++) { /* "pandas/src/generated.pyx":3351 * if idx == -1: * for j from 0 <= j < k: * out[i, j] = fv # <<<<<<<<<<<<<< * else: * for j from 0 <= j < k: */ __pyx_t_16 = __pyx_v_i; __pyx_t_17 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_17, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_fv; } goto __pyx_L11; } /*else*/ { /* "pandas/src/generated.pyx":3353 * out[i, j] = fv * else: * for j from 0 <= j < k: # <<<<<<<<<<<<<< * out[i, j] = values[idx, j] * */ __pyx_t_15 = __pyx_v_k; for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_15; __pyx_v_j++) { /* "pandas/src/generated.pyx":3354 * else: * for j from 0 <= j < k: * out[i, j] = values[idx, j] # <<<<<<<<<<<<<< * * @cython.wraparound(False) */ __pyx_t_18 = __pyx_v_idx; __pyx_t_19 = __pyx_v_j; __pyx_t_20 = __pyx_v_i; __pyx_t_21 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_21, __pyx_pybuffernd_out.diminfo[1].strides) = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_19, __pyx_pybuffernd_values.diminfo[1].strides)); } } __pyx_L11:; } /* "pandas/src/generated.pyx":3315 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_axis0_float64_float64(ndarray[float64_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[float64_t, ndim=2] out, */ /* 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_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.take_2d_axis0_float64_float64", __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_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":3358 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_axis0_object_object(ndarray[object, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[object, ndim=2] out, */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_297take_2d_axis0_object_object(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_297take_2d_axis0_object_object = {__Pyx_NAMESTR("take_2d_axis0_object_object"), (PyCFunction)__pyx_pw_6pandas_5algos_297take_2d_axis0_object_object, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_297take_2d_axis0_object_object(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_values = 0; PyArrayObject *__pyx_v_indexer = 0; PyArrayObject *__pyx_v_out = 0; PyObject *__pyx_v_fill_value = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("take_2d_axis0_object_object (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_values,&__pyx_n_s_indexer,&__pyx_n_s_out,&__pyx_n_s_fill_value,0}; PyObject* values[4] = {0,0,0,0}; values[3] = __pyx_k__138; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_values)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_indexer)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_2d_axis0_object_object", 0, 3, 4, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3358; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_out)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_2d_axis0_object_object", 0, 3, 4, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3358; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_fill_value); if (value) { values[3] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "take_2d_axis0_object_object") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3358; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_values = ((PyArrayObject *)values[0]); __pyx_v_indexer = ((PyArrayObject *)values[1]); __pyx_v_out = ((PyArrayObject *)values[2]); __pyx_v_fill_value = values[3]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("take_2d_axis0_object_object", 0, 3, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3358; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.take_2d_axis0_object_object", __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_filename = __pyx_f[2]; __pyx_lineno = 3358; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_indexer), __pyx_ptype_5numpy_ndarray, 1, "indexer", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3359; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_5numpy_ndarray, 1, "out", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3360; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_296take_2d_axis0_object_object(__pyx_self, __pyx_v_values, __pyx_v_indexer, __pyx_v_out, __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_5algos_296take_2d_axis0_object_object(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_k; Py_ssize_t __pyx_v_n; Py_ssize_t __pyx_v_idx; PyObject *__pyx_v_fv = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_indexer; __Pyx_Buffer __pyx_pybuffer_indexer; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_values; __Pyx_Buffer __pyx_pybuffer_values; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; Py_ssize_t __pyx_t_2; int __pyx_t_3; Py_ssize_t __pyx_t_4; Py_ssize_t __pyx_t_5; Py_ssize_t __pyx_t_6; PyObject **__pyx_t_7; PyObject *__pyx_t_8 = NULL; Py_ssize_t __pyx_t_9; Py_ssize_t __pyx_t_10; Py_ssize_t __pyx_t_11; Py_ssize_t __pyx_t_12; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("take_2d_axis0_object_object", 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_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; { __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, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3358; __pyx_clineno = __LINE__; goto __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_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1]; { __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_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3358; __pyx_clineno = __LINE__; goto __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_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_v_out, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3358; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; __pyx_pybuffernd_out.diminfo[1].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_out.diminfo[1].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[1]; /* "pandas/src/generated.pyx":3366 * object fv * * n = len(indexer) # <<<<<<<<<<<<<< * k = values.shape[1] * */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_indexer)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3366; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/src/generated.pyx":3367 * * n = len(indexer) * k = values.shape[1] # <<<<<<<<<<<<<< * * fv = fill_value */ __pyx_v_k = (__pyx_v_values->dimensions[1]); /* "pandas/src/generated.pyx":3369 * k = values.shape[1] * * fv = fill_value # <<<<<<<<<<<<<< * * IF False: */ __Pyx_INCREF(__pyx_v_fill_value); __pyx_v_fv = __pyx_v_fill_value; /* "pandas/src/generated.pyx":3390 * return * * for i from 0 <= i < n: # <<<<<<<<<<<<<< * idx = indexer[i] * if idx == -1: */ __pyx_t_1 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_1; __pyx_v_i++) { /* "pandas/src/generated.pyx":3391 * * for i from 0 <= i < n: * idx = indexer[i] # <<<<<<<<<<<<<< * if idx == -1: * for j from 0 <= j < k: */ __pyx_t_2 = __pyx_v_i; __pyx_v_idx = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_2, __pyx_pybuffernd_indexer.diminfo[0].strides)); /* "pandas/src/generated.pyx":3392 * for i from 0 <= i < n: * idx = indexer[i] * if idx == -1: # <<<<<<<<<<<<<< * for j from 0 <= j < k: * out[i, j] = fv */ __pyx_t_3 = ((__pyx_v_idx == -1) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":3393 * idx = indexer[i] * if idx == -1: * for j from 0 <= j < k: # <<<<<<<<<<<<<< * out[i, j] = fv * else: */ __pyx_t_4 = __pyx_v_k; for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_4; __pyx_v_j++) { /* "pandas/src/generated.pyx":3394 * if idx == -1: * for j from 0 <= j < k: * out[i, j] = fv # <<<<<<<<<<<<<< * else: * for j from 0 <= j < k: */ __pyx_t_5 = __pyx_v_i; __pyx_t_6 = __pyx_v_j; __pyx_t_7 = __Pyx_BufPtrStrided2d(PyObject **, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_5, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_6, __pyx_pybuffernd_out.diminfo[1].strides); __Pyx_GOTREF(*__pyx_t_7); __Pyx_INCREF(__pyx_v_fv); __Pyx_DECREF(*__pyx_t_7); *__pyx_t_7 = __pyx_v_fv; __Pyx_GIVEREF(*__pyx_t_7); } goto __pyx_L5; } /*else*/ { /* "pandas/src/generated.pyx":3396 * out[i, j] = fv * else: * for j from 0 <= j < k: # <<<<<<<<<<<<<< * out[i, j] = values[idx, j] * */ __pyx_t_4 = __pyx_v_k; for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_4; __pyx_v_j++) { /* "pandas/src/generated.pyx":3397 * else: * for j from 0 <= j < k: * out[i, j] = values[idx, j] # <<<<<<<<<<<<<< * * */ __pyx_t_9 = __pyx_v_idx; __pyx_t_10 = __pyx_v_j; __pyx_t_8 = (PyObject *) *__Pyx_BufPtrStrided2d(PyObject **, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_9, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_10, __pyx_pybuffernd_values.diminfo[1].strides); __Pyx_INCREF((PyObject*)__pyx_t_8); __pyx_t_11 = __pyx_v_i; __pyx_t_12 = __pyx_v_j; __pyx_t_7 = __Pyx_BufPtrStrided2d(PyObject **, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_11, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_12, __pyx_pybuffernd_out.diminfo[1].strides); __Pyx_GOTREF(*__pyx_t_7); __Pyx_INCREF(__pyx_t_8); __Pyx_DECREF(*__pyx_t_7); *__pyx_t_7 = __pyx_t_8; __Pyx_GIVEREF(*__pyx_t_7); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } } __pyx_L5:; } /* "pandas/src/generated.pyx":3358 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_axis0_object_object(ndarray[object, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[object, ndim=2] out, */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_8); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.take_2d_axis0_object_object", __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_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF(__pyx_v_fv); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":3402 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_axis1_bool_bool(ndarray[uint8_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[uint8_t, ndim=2] out, */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_299take_2d_axis1_bool_bool(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_299take_2d_axis1_bool_bool = {__Pyx_NAMESTR("take_2d_axis1_bool_bool"), (PyCFunction)__pyx_pw_6pandas_5algos_299take_2d_axis1_bool_bool, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_299take_2d_axis1_bool_bool(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_values = 0; PyArrayObject *__pyx_v_indexer = 0; PyArrayObject *__pyx_v_out = 0; PyObject *__pyx_v_fill_value = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("take_2d_axis1_bool_bool (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_values,&__pyx_n_s_indexer,&__pyx_n_s_out,&__pyx_n_s_fill_value,0}; PyObject* values[4] = {0,0,0,0}; values[3] = __pyx_k__139; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_values)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_indexer)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_2d_axis1_bool_bool", 0, 3, 4, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3402; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_out)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_2d_axis1_bool_bool", 0, 3, 4, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3402; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_fill_value); if (value) { values[3] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "take_2d_axis1_bool_bool") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3402; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_values = ((PyArrayObject *)values[0]); __pyx_v_indexer = ((PyArrayObject *)values[1]); __pyx_v_out = ((PyArrayObject *)values[2]); __pyx_v_fill_value = values[3]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("take_2d_axis1_bool_bool", 0, 3, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3402; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.take_2d_axis1_bool_bool", __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_filename = __pyx_f[2]; __pyx_lineno = 3402; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_indexer), __pyx_ptype_5numpy_ndarray, 1, "indexer", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3403; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_5numpy_ndarray, 1, "out", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3404; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_298take_2d_axis1_bool_bool(__pyx_self, __pyx_v_values, __pyx_v_indexer, __pyx_v_out, __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_5algos_298take_2d_axis1_bool_bool(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_k; Py_ssize_t __pyx_v_n; Py_ssize_t __pyx_v_idx; __pyx_t_5numpy_uint8_t __pyx_v_fv; __pyx_t_5numpy_uint8_t *__pyx_v_v; __pyx_t_5numpy_uint8_t *__pyx_v_o; __Pyx_LocalBuf_ND __pyx_pybuffernd_indexer; __Pyx_Buffer __pyx_pybuffer_indexer; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_values; __Pyx_Buffer __pyx_pybuffer_values; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; int __pyx_t_2; int __pyx_t_3; int __pyx_t_4; __pyx_t_5numpy_uint8_t __pyx_t_5; int __pyx_t_6; Py_ssize_t __pyx_t_7; Py_ssize_t __pyx_t_8; Py_ssize_t __pyx_t_9; Py_ssize_t __pyx_t_10; long __pyx_t_11; long __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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("take_2d_axis1_bool_bool", 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_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; { __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_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3402; __pyx_clineno = __LINE__; goto __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_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1]; { __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_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3402; __pyx_clineno = __LINE__; goto __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_BufFmt_StackElem __pyx_stack[1]; 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, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3402; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; __pyx_pybuffernd_out.diminfo[1].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_out.diminfo[1].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[1]; /* "pandas/src/generated.pyx":3410 * uint8_t fv * * n = len(values) # <<<<<<<<<<<<<< * k = len(indexer) * */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3410; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/src/generated.pyx":3411 * * n = len(values) * k = len(indexer) # <<<<<<<<<<<<<< * * if n == 0 or k == 0: */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_indexer)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3411; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_k = __pyx_t_1; /* "pandas/src/generated.pyx":3413 * k = len(indexer) * * if n == 0 or k == 0: # <<<<<<<<<<<<<< * return * */ __pyx_t_2 = ((__pyx_v_n == 0) != 0); if (!__pyx_t_2) { __pyx_t_3 = ((__pyx_v_k == 0) != 0); __pyx_t_4 = __pyx_t_3; } else { __pyx_t_4 = __pyx_t_2; } if (__pyx_t_4) { /* "pandas/src/generated.pyx":3414 * * if n == 0 or k == 0: * return # <<<<<<<<<<<<<< * * fv = fill_value */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; } /* "pandas/src/generated.pyx":3416 * return * * fv = fill_value # <<<<<<<<<<<<<< * * IF True: */ __pyx_t_5 = __Pyx_PyInt_As_npy_uint8(__pyx_v_fill_value); if (unlikely((__pyx_t_5 == (npy_uint8)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3416; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_fv = __pyx_t_5; /* "pandas/src/generated.pyx":3422 * uint8_t *v, *o * * if (values.strides[0] == out.strides[0] and # <<<<<<<<<<<<<< * values.strides[0] == sizeof(uint8_t) and * sizeof(uint8_t) * n >= 256): */ __pyx_t_4 = (((__pyx_v_values->strides[0]) == (__pyx_v_out->strides[0])) != 0); if (__pyx_t_4) { /* "pandas/src/generated.pyx":3423 * * if (values.strides[0] == out.strides[0] and * values.strides[0] == sizeof(uint8_t) and # <<<<<<<<<<<<<< * sizeof(uint8_t) * n >= 256): * */ __pyx_t_2 = (((__pyx_v_values->strides[0]) == (sizeof(__pyx_t_5numpy_uint8_t))) != 0); if (__pyx_t_2) { /* "pandas/src/generated.pyx":3424 * if (values.strides[0] == out.strides[0] and * values.strides[0] == sizeof(uint8_t) and * sizeof(uint8_t) * n >= 256): # <<<<<<<<<<<<<< * * for j from 0 <= j < k: */ __pyx_t_3 = ((((sizeof(__pyx_t_5numpy_uint8_t)) * __pyx_v_n) >= 256) != 0); __pyx_t_6 = __pyx_t_3; } else { __pyx_t_6 = __pyx_t_2; } __pyx_t_2 = __pyx_t_6; } else { __pyx_t_2 = __pyx_t_4; } if (__pyx_t_2) { /* "pandas/src/generated.pyx":3426 * sizeof(uint8_t) * n >= 256): * * for j from 0 <= j < k: # <<<<<<<<<<<<<< * idx = indexer[j] * if idx == -1: */ __pyx_t_1 = __pyx_v_k; for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_1; __pyx_v_j++) { /* "pandas/src/generated.pyx":3427 * * for j from 0 <= j < k: * idx = indexer[j] # <<<<<<<<<<<<<< * if idx == -1: * for i from 0 <= i < n: */ __pyx_t_7 = __pyx_v_j; __pyx_v_idx = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_7, __pyx_pybuffernd_indexer.diminfo[0].strides)); /* "pandas/src/generated.pyx":3428 * for j from 0 <= j < k: * idx = indexer[j] * if idx == -1: # <<<<<<<<<<<<<< * for i from 0 <= i < n: * out[i, j] = fv */ __pyx_t_2 = ((__pyx_v_idx == -1) != 0); if (__pyx_t_2) { /* "pandas/src/generated.pyx":3429 * idx = indexer[j] * if idx == -1: * for i from 0 <= i < n: # <<<<<<<<<<<<<< * out[i, j] = fv * else: */ __pyx_t_8 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_8; __pyx_v_i++) { /* "pandas/src/generated.pyx":3430 * if idx == -1: * for i from 0 <= i < n: * out[i, j] = fv # <<<<<<<<<<<<<< * else: * v = &values[0, idx] */ __pyx_t_9 = __pyx_v_i; __pyx_t_10 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_9, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_10, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_fv; } goto __pyx_L7; } /*else*/ { /* "pandas/src/generated.pyx":3432 * out[i, j] = fv * else: * v = &values[0, idx] # <<<<<<<<<<<<<< * o = &out[0, j] * memmove(o, v, (sizeof(uint8_t) * n)) */ __pyx_t_11 = 0; __pyx_t_8 = __pyx_v_idx; __pyx_v_v = (&(*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_11, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_8, __pyx_pybuffernd_values.diminfo[1].strides))); /* "pandas/src/generated.pyx":3433 * else: * v = &values[0, idx] * o = &out[0, j] # <<<<<<<<<<<<<< * memmove(o, v, (sizeof(uint8_t) * n)) * return */ __pyx_t_12 = 0; __pyx_t_13 = __pyx_v_j; __pyx_v_o = (&(*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_12, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_13, __pyx_pybuffernd_out.diminfo[1].strides))); /* "pandas/src/generated.pyx":3434 * v = &values[0, idx] * o = &out[0, j] * memmove(o, v, (sizeof(uint8_t) * n)) # <<<<<<<<<<<<<< * return * */ memmove(__pyx_v_o, __pyx_v_v, ((size_t)((sizeof(__pyx_t_5numpy_uint8_t)) * __pyx_v_n))); } __pyx_L7:; } /* "pandas/src/generated.pyx":3435 * o = &out[0, j] * memmove(o, v, (sizeof(uint8_t) * n)) * return # <<<<<<<<<<<<<< * * for j from 0 <= j < k: */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; } /* "pandas/src/generated.pyx":3437 * return * * for j from 0 <= j < k: # <<<<<<<<<<<<<< * idx = indexer[j] * if idx == -1: */ __pyx_t_1 = __pyx_v_k; for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_1; __pyx_v_j++) { /* "pandas/src/generated.pyx":3438 * * for j from 0 <= j < k: * idx = indexer[j] # <<<<<<<<<<<<<< * if idx == -1: * for i from 0 <= i < n: */ __pyx_t_14 = __pyx_v_j; __pyx_v_idx = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_indexer.diminfo[0].strides)); /* "pandas/src/generated.pyx":3439 * for j from 0 <= j < k: * idx = indexer[j] * if idx == -1: # <<<<<<<<<<<<<< * for i from 0 <= i < n: * out[i, j] = fv */ __pyx_t_2 = ((__pyx_v_idx == -1) != 0); if (__pyx_t_2) { /* "pandas/src/generated.pyx":3440 * idx = indexer[j] * if idx == -1: * for i from 0 <= i < n: # <<<<<<<<<<<<<< * out[i, j] = fv * else: */ __pyx_t_15 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_15; __pyx_v_i++) { /* "pandas/src/generated.pyx":3441 * if idx == -1: * for i from 0 <= i < n: * out[i, j] = fv # <<<<<<<<<<<<<< * else: * for i from 0 <= i < n: */ __pyx_t_16 = __pyx_v_i; __pyx_t_17 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_17, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_fv; } goto __pyx_L12; } /*else*/ { /* "pandas/src/generated.pyx":3443 * out[i, j] = fv * else: * for i from 0 <= i < n: # <<<<<<<<<<<<<< * out[i, j] = values[i, idx] * */ __pyx_t_15 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_15; __pyx_v_i++) { /* "pandas/src/generated.pyx":3444 * else: * for i from 0 <= i < n: * out[i, j] = values[i, idx] # <<<<<<<<<<<<<< * * @cython.wraparound(False) */ __pyx_t_18 = __pyx_v_i; __pyx_t_19 = __pyx_v_idx; __pyx_t_20 = __pyx_v_i; __pyx_t_21 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_21, __pyx_pybuffernd_out.diminfo[1].strides) = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_19, __pyx_pybuffernd_values.diminfo[1].strides)); } } __pyx_L12:; } /* "pandas/src/generated.pyx":3402 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_axis1_bool_bool(ndarray[uint8_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[uint8_t, ndim=2] out, */ /* 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_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.take_2d_axis1_bool_bool", __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_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":3448 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_axis1_bool_object(ndarray[uint8_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[object, ndim=2] out, */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_301take_2d_axis1_bool_object(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_301take_2d_axis1_bool_object = {__Pyx_NAMESTR("take_2d_axis1_bool_object"), (PyCFunction)__pyx_pw_6pandas_5algos_301take_2d_axis1_bool_object, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_301take_2d_axis1_bool_object(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_values = 0; PyArrayObject *__pyx_v_indexer = 0; PyArrayObject *__pyx_v_out = 0; PyObject *__pyx_v_fill_value = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("take_2d_axis1_bool_object (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_values,&__pyx_n_s_indexer,&__pyx_n_s_out,&__pyx_n_s_fill_value,0}; PyObject* values[4] = {0,0,0,0}; values[3] = __pyx_k__140; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_values)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_indexer)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_2d_axis1_bool_object", 0, 3, 4, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3448; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_out)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_2d_axis1_bool_object", 0, 3, 4, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3448; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_fill_value); if (value) { values[3] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "take_2d_axis1_bool_object") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3448; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_values = ((PyArrayObject *)values[0]); __pyx_v_indexer = ((PyArrayObject *)values[1]); __pyx_v_out = ((PyArrayObject *)values[2]); __pyx_v_fill_value = values[3]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("take_2d_axis1_bool_object", 0, 3, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3448; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.take_2d_axis1_bool_object", __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_filename = __pyx_f[2]; __pyx_lineno = 3448; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_indexer), __pyx_ptype_5numpy_ndarray, 1, "indexer", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3449; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_5numpy_ndarray, 1, "out", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3450; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_300take_2d_axis1_bool_object(__pyx_self, __pyx_v_values, __pyx_v_indexer, __pyx_v_out, __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_5algos_300take_2d_axis1_bool_object(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_k; Py_ssize_t __pyx_v_n; Py_ssize_t __pyx_v_idx; PyObject *__pyx_v_fv = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_indexer; __Pyx_Buffer __pyx_pybuffer_indexer; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_values; __Pyx_Buffer __pyx_pybuffer_values; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; int __pyx_t_2; int __pyx_t_3; int __pyx_t_4; Py_ssize_t __pyx_t_5; Py_ssize_t __pyx_t_6; Py_ssize_t __pyx_t_7; Py_ssize_t __pyx_t_8; PyObject **__pyx_t_9; PyObject *__pyx_t_10 = NULL; Py_ssize_t __pyx_t_11; Py_ssize_t __pyx_t_12; Py_ssize_t __pyx_t_13; Py_ssize_t __pyx_t_14; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("take_2d_axis1_bool_object", 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_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; { __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_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3448; __pyx_clineno = __LINE__; goto __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_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1]; { __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_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3448; __pyx_clineno = __LINE__; goto __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_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_v_out, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3448; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; __pyx_pybuffernd_out.diminfo[1].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_out.diminfo[1].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[1]; /* "pandas/src/generated.pyx":3456 * object fv * * n = len(values) # <<<<<<<<<<<<<< * k = len(indexer) * */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3456; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/src/generated.pyx":3457 * * n = len(values) * k = len(indexer) # <<<<<<<<<<<<<< * * if n == 0 or k == 0: */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_indexer)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3457; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_k = __pyx_t_1; /* "pandas/src/generated.pyx":3459 * k = len(indexer) * * if n == 0 or k == 0: # <<<<<<<<<<<<<< * return * */ __pyx_t_2 = ((__pyx_v_n == 0) != 0); if (!__pyx_t_2) { __pyx_t_3 = ((__pyx_v_k == 0) != 0); __pyx_t_4 = __pyx_t_3; } else { __pyx_t_4 = __pyx_t_2; } if (__pyx_t_4) { /* "pandas/src/generated.pyx":3460 * * if n == 0 or k == 0: * return # <<<<<<<<<<<<<< * * fv = fill_value */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; } /* "pandas/src/generated.pyx":3462 * return * * fv = fill_value # <<<<<<<<<<<<<< * * IF False: */ __Pyx_INCREF(__pyx_v_fill_value); __pyx_v_fv = __pyx_v_fill_value; /* "pandas/src/generated.pyx":3483 * return * * for j from 0 <= j < k: # <<<<<<<<<<<<<< * idx = indexer[j] * if idx == -1: */ __pyx_t_1 = __pyx_v_k; for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_1; __pyx_v_j++) { /* "pandas/src/generated.pyx":3484 * * for j from 0 <= j < k: * idx = indexer[j] # <<<<<<<<<<<<<< * if idx == -1: * for i from 0 <= i < n: */ __pyx_t_5 = __pyx_v_j; __pyx_v_idx = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_5, __pyx_pybuffernd_indexer.diminfo[0].strides)); /* "pandas/src/generated.pyx":3485 * for j from 0 <= j < k: * idx = indexer[j] * if idx == -1: # <<<<<<<<<<<<<< * for i from 0 <= i < n: * out[i, j] = fv */ __pyx_t_4 = ((__pyx_v_idx == -1) != 0); if (__pyx_t_4) { /* "pandas/src/generated.pyx":3486 * idx = indexer[j] * if idx == -1: * for i from 0 <= i < n: # <<<<<<<<<<<<<< * out[i, j] = fv * else: */ __pyx_t_6 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_6; __pyx_v_i++) { /* "pandas/src/generated.pyx":3487 * if idx == -1: * for i from 0 <= i < n: * out[i, j] = fv # <<<<<<<<<<<<<< * else: * for i from 0 <= i < n: */ __pyx_t_7 = __pyx_v_i; __pyx_t_8 = __pyx_v_j; __pyx_t_9 = __Pyx_BufPtrStrided2d(PyObject **, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_7, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_8, __pyx_pybuffernd_out.diminfo[1].strides); __Pyx_GOTREF(*__pyx_t_9); __Pyx_INCREF(__pyx_v_fv); __Pyx_DECREF(*__pyx_t_9); *__pyx_t_9 = __pyx_v_fv; __Pyx_GIVEREF(*__pyx_t_9); } goto __pyx_L6; } /*else*/ { /* "pandas/src/generated.pyx":3489 * out[i, j] = fv * else: * for i from 0 <= i < n: # <<<<<<<<<<<<<< * out[i, j] = True if values[i, idx] > 0 else False * */ __pyx_t_6 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_6; __pyx_v_i++) { /* "pandas/src/generated.pyx":3490 * else: * for i from 0 <= i < n: * out[i, j] = True if values[i, idx] > 0 else False # <<<<<<<<<<<<<< * * @cython.wraparound(False) */ __pyx_t_11 = __pyx_v_i; __pyx_t_12 = __pyx_v_idx; if ((((*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_11, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_12, __pyx_pybuffernd_values.diminfo[1].strides)) > 0) != 0)) { __Pyx_INCREF(Py_True); __pyx_t_10 = Py_True; } else { __Pyx_INCREF(Py_False); __pyx_t_10 = Py_False; } __pyx_t_13 = __pyx_v_i; __pyx_t_14 = __pyx_v_j; __pyx_t_9 = __Pyx_BufPtrStrided2d(PyObject **, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_14, __pyx_pybuffernd_out.diminfo[1].strides); __Pyx_GOTREF(*__pyx_t_9); __Pyx_INCREF(__pyx_t_10); __Pyx_DECREF(*__pyx_t_9); *__pyx_t_9 = __pyx_t_10; __Pyx_GIVEREF(*__pyx_t_9); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; } } __pyx_L6:; } /* "pandas/src/generated.pyx":3448 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_axis1_bool_object(ndarray[uint8_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[object, ndim=2] out, */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_10); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.take_2d_axis1_bool_object", __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_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF(__pyx_v_fv); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":3494 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_axis1_int8_int8(ndarray[int8_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[int8_t, ndim=2] out, */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_303take_2d_axis1_int8_int8(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_303take_2d_axis1_int8_int8 = {__Pyx_NAMESTR("take_2d_axis1_int8_int8"), (PyCFunction)__pyx_pw_6pandas_5algos_303take_2d_axis1_int8_int8, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_303take_2d_axis1_int8_int8(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_values = 0; PyArrayObject *__pyx_v_indexer = 0; PyArrayObject *__pyx_v_out = 0; PyObject *__pyx_v_fill_value = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("take_2d_axis1_int8_int8 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_values,&__pyx_n_s_indexer,&__pyx_n_s_out,&__pyx_n_s_fill_value,0}; PyObject* values[4] = {0,0,0,0}; values[3] = __pyx_k__141; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_values)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_indexer)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_2d_axis1_int8_int8", 0, 3, 4, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3494; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_out)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_2d_axis1_int8_int8", 0, 3, 4, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3494; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_fill_value); if (value) { values[3] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "take_2d_axis1_int8_int8") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3494; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_values = ((PyArrayObject *)values[0]); __pyx_v_indexer = ((PyArrayObject *)values[1]); __pyx_v_out = ((PyArrayObject *)values[2]); __pyx_v_fill_value = values[3]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("take_2d_axis1_int8_int8", 0, 3, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3494; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.take_2d_axis1_int8_int8", __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_filename = __pyx_f[2]; __pyx_lineno = 3494; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_indexer), __pyx_ptype_5numpy_ndarray, 1, "indexer", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3495; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_5numpy_ndarray, 1, "out", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3496; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_302take_2d_axis1_int8_int8(__pyx_self, __pyx_v_values, __pyx_v_indexer, __pyx_v_out, __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_5algos_302take_2d_axis1_int8_int8(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_k; Py_ssize_t __pyx_v_n; Py_ssize_t __pyx_v_idx; __pyx_t_5numpy_int8_t __pyx_v_fv; __pyx_t_5numpy_int8_t *__pyx_v_v; __pyx_t_5numpy_int8_t *__pyx_v_o; __Pyx_LocalBuf_ND __pyx_pybuffernd_indexer; __Pyx_Buffer __pyx_pybuffer_indexer; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_values; __Pyx_Buffer __pyx_pybuffer_values; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; int __pyx_t_2; int __pyx_t_3; int __pyx_t_4; __pyx_t_5numpy_int8_t __pyx_t_5; int __pyx_t_6; Py_ssize_t __pyx_t_7; Py_ssize_t __pyx_t_8; Py_ssize_t __pyx_t_9; Py_ssize_t __pyx_t_10; long __pyx_t_11; long __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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("take_2d_axis1_int8_int8", 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_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; { __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_int8_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3494; __pyx_clineno = __LINE__; goto __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_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1]; { __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_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3494; __pyx_clineno = __LINE__; goto __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_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_v_out, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int8_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3494; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; __pyx_pybuffernd_out.diminfo[1].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_out.diminfo[1].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[1]; /* "pandas/src/generated.pyx":3502 * int8_t fv * * n = len(values) # <<<<<<<<<<<<<< * k = len(indexer) * */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3502; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/src/generated.pyx":3503 * * n = len(values) * k = len(indexer) # <<<<<<<<<<<<<< * * if n == 0 or k == 0: */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_indexer)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3503; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_k = __pyx_t_1; /* "pandas/src/generated.pyx":3505 * k = len(indexer) * * if n == 0 or k == 0: # <<<<<<<<<<<<<< * return * */ __pyx_t_2 = ((__pyx_v_n == 0) != 0); if (!__pyx_t_2) { __pyx_t_3 = ((__pyx_v_k == 0) != 0); __pyx_t_4 = __pyx_t_3; } else { __pyx_t_4 = __pyx_t_2; } if (__pyx_t_4) { /* "pandas/src/generated.pyx":3506 * * if n == 0 or k == 0: * return # <<<<<<<<<<<<<< * * fv = fill_value */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; } /* "pandas/src/generated.pyx":3508 * return * * fv = fill_value # <<<<<<<<<<<<<< * * IF True: */ __pyx_t_5 = __Pyx_PyInt_As_npy_int8(__pyx_v_fill_value); if (unlikely((__pyx_t_5 == (npy_int8)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3508; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_fv = __pyx_t_5; /* "pandas/src/generated.pyx":3514 * int8_t *v, *o * * if (values.strides[0] == out.strides[0] and # <<<<<<<<<<<<<< * values.strides[0] == sizeof(int8_t) and * sizeof(int8_t) * n >= 256): */ __pyx_t_4 = (((__pyx_v_values->strides[0]) == (__pyx_v_out->strides[0])) != 0); if (__pyx_t_4) { /* "pandas/src/generated.pyx":3515 * * if (values.strides[0] == out.strides[0] and * values.strides[0] == sizeof(int8_t) and # <<<<<<<<<<<<<< * sizeof(int8_t) * n >= 256): * */ __pyx_t_2 = (((__pyx_v_values->strides[0]) == (sizeof(__pyx_t_5numpy_int8_t))) != 0); if (__pyx_t_2) { /* "pandas/src/generated.pyx":3516 * if (values.strides[0] == out.strides[0] and * values.strides[0] == sizeof(int8_t) and * sizeof(int8_t) * n >= 256): # <<<<<<<<<<<<<< * * for j from 0 <= j < k: */ __pyx_t_3 = ((((sizeof(__pyx_t_5numpy_int8_t)) * __pyx_v_n) >= 256) != 0); __pyx_t_6 = __pyx_t_3; } else { __pyx_t_6 = __pyx_t_2; } __pyx_t_2 = __pyx_t_6; } else { __pyx_t_2 = __pyx_t_4; } if (__pyx_t_2) { /* "pandas/src/generated.pyx":3518 * sizeof(int8_t) * n >= 256): * * for j from 0 <= j < k: # <<<<<<<<<<<<<< * idx = indexer[j] * if idx == -1: */ __pyx_t_1 = __pyx_v_k; for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_1; __pyx_v_j++) { /* "pandas/src/generated.pyx":3519 * * for j from 0 <= j < k: * idx = indexer[j] # <<<<<<<<<<<<<< * if idx == -1: * for i from 0 <= i < n: */ __pyx_t_7 = __pyx_v_j; __pyx_v_idx = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_7, __pyx_pybuffernd_indexer.diminfo[0].strides)); /* "pandas/src/generated.pyx":3520 * for j from 0 <= j < k: * idx = indexer[j] * if idx == -1: # <<<<<<<<<<<<<< * for i from 0 <= i < n: * out[i, j] = fv */ __pyx_t_2 = ((__pyx_v_idx == -1) != 0); if (__pyx_t_2) { /* "pandas/src/generated.pyx":3521 * idx = indexer[j] * if idx == -1: * for i from 0 <= i < n: # <<<<<<<<<<<<<< * out[i, j] = fv * else: */ __pyx_t_8 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_8; __pyx_v_i++) { /* "pandas/src/generated.pyx":3522 * if idx == -1: * for i from 0 <= i < n: * out[i, j] = fv # <<<<<<<<<<<<<< * else: * v = &values[0, idx] */ __pyx_t_9 = __pyx_v_i; __pyx_t_10 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int8_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_9, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_10, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_fv; } goto __pyx_L7; } /*else*/ { /* "pandas/src/generated.pyx":3524 * out[i, j] = fv * else: * v = &values[0, idx] # <<<<<<<<<<<<<< * o = &out[0, j] * memmove(o, v, (sizeof(int8_t) * n)) */ __pyx_t_11 = 0; __pyx_t_8 = __pyx_v_idx; __pyx_v_v = (&(*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int8_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_11, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_8, __pyx_pybuffernd_values.diminfo[1].strides))); /* "pandas/src/generated.pyx":3525 * else: * v = &values[0, idx] * o = &out[0, j] # <<<<<<<<<<<<<< * memmove(o, v, (sizeof(int8_t) * n)) * return */ __pyx_t_12 = 0; __pyx_t_13 = __pyx_v_j; __pyx_v_o = (&(*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int8_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_12, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_13, __pyx_pybuffernd_out.diminfo[1].strides))); /* "pandas/src/generated.pyx":3526 * v = &values[0, idx] * o = &out[0, j] * memmove(o, v, (sizeof(int8_t) * n)) # <<<<<<<<<<<<<< * return * */ memmove(__pyx_v_o, __pyx_v_v, ((size_t)((sizeof(__pyx_t_5numpy_int8_t)) * __pyx_v_n))); } __pyx_L7:; } /* "pandas/src/generated.pyx":3527 * o = &out[0, j] * memmove(o, v, (sizeof(int8_t) * n)) * return # <<<<<<<<<<<<<< * * for j from 0 <= j < k: */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; } /* "pandas/src/generated.pyx":3529 * return * * for j from 0 <= j < k: # <<<<<<<<<<<<<< * idx = indexer[j] * if idx == -1: */ __pyx_t_1 = __pyx_v_k; for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_1; __pyx_v_j++) { /* "pandas/src/generated.pyx":3530 * * for j from 0 <= j < k: * idx = indexer[j] # <<<<<<<<<<<<<< * if idx == -1: * for i from 0 <= i < n: */ __pyx_t_14 = __pyx_v_j; __pyx_v_idx = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_indexer.diminfo[0].strides)); /* "pandas/src/generated.pyx":3531 * for j from 0 <= j < k: * idx = indexer[j] * if idx == -1: # <<<<<<<<<<<<<< * for i from 0 <= i < n: * out[i, j] = fv */ __pyx_t_2 = ((__pyx_v_idx == -1) != 0); if (__pyx_t_2) { /* "pandas/src/generated.pyx":3532 * idx = indexer[j] * if idx == -1: * for i from 0 <= i < n: # <<<<<<<<<<<<<< * out[i, j] = fv * else: */ __pyx_t_15 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_15; __pyx_v_i++) { /* "pandas/src/generated.pyx":3533 * if idx == -1: * for i from 0 <= i < n: * out[i, j] = fv # <<<<<<<<<<<<<< * else: * for i from 0 <= i < n: */ __pyx_t_16 = __pyx_v_i; __pyx_t_17 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int8_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_17, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_fv; } goto __pyx_L12; } /*else*/ { /* "pandas/src/generated.pyx":3535 * out[i, j] = fv * else: * for i from 0 <= i < n: # <<<<<<<<<<<<<< * out[i, j] = values[i, idx] * */ __pyx_t_15 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_15; __pyx_v_i++) { /* "pandas/src/generated.pyx":3536 * else: * for i from 0 <= i < n: * out[i, j] = values[i, idx] # <<<<<<<<<<<<<< * * @cython.wraparound(False) */ __pyx_t_18 = __pyx_v_i; __pyx_t_19 = __pyx_v_idx; __pyx_t_20 = __pyx_v_i; __pyx_t_21 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int8_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_21, __pyx_pybuffernd_out.diminfo[1].strides) = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int8_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_19, __pyx_pybuffernd_values.diminfo[1].strides)); } } __pyx_L12:; } /* "pandas/src/generated.pyx":3494 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_axis1_int8_int8(ndarray[int8_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[int8_t, ndim=2] out, */ /* 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_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.take_2d_axis1_int8_int8", __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_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":3540 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_axis1_int8_int32(ndarray[int8_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[int32_t, ndim=2] out, */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_305take_2d_axis1_int8_int32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_305take_2d_axis1_int8_int32 = {__Pyx_NAMESTR("take_2d_axis1_int8_int32"), (PyCFunction)__pyx_pw_6pandas_5algos_305take_2d_axis1_int8_int32, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_305take_2d_axis1_int8_int32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_values = 0; PyArrayObject *__pyx_v_indexer = 0; PyArrayObject *__pyx_v_out = 0; PyObject *__pyx_v_fill_value = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("take_2d_axis1_int8_int32 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_values,&__pyx_n_s_indexer,&__pyx_n_s_out,&__pyx_n_s_fill_value,0}; PyObject* values[4] = {0,0,0,0}; values[3] = __pyx_k__142; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_values)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_indexer)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_2d_axis1_int8_int32", 0, 3, 4, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3540; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_out)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_2d_axis1_int8_int32", 0, 3, 4, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3540; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_fill_value); if (value) { values[3] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "take_2d_axis1_int8_int32") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3540; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_values = ((PyArrayObject *)values[0]); __pyx_v_indexer = ((PyArrayObject *)values[1]); __pyx_v_out = ((PyArrayObject *)values[2]); __pyx_v_fill_value = values[3]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("take_2d_axis1_int8_int32", 0, 3, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3540; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.take_2d_axis1_int8_int32", __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_filename = __pyx_f[2]; __pyx_lineno = 3540; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_indexer), __pyx_ptype_5numpy_ndarray, 1, "indexer", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3541; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_5numpy_ndarray, 1, "out", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3542; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_304take_2d_axis1_int8_int32(__pyx_self, __pyx_v_values, __pyx_v_indexer, __pyx_v_out, __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_5algos_304take_2d_axis1_int8_int32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_k; Py_ssize_t __pyx_v_n; Py_ssize_t __pyx_v_idx; __pyx_t_5numpy_int32_t __pyx_v_fv; __Pyx_LocalBuf_ND __pyx_pybuffernd_indexer; __Pyx_Buffer __pyx_pybuffer_indexer; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_values; __Pyx_Buffer __pyx_pybuffer_values; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; int __pyx_t_2; int __pyx_t_3; int __pyx_t_4; __pyx_t_5numpy_int32_t __pyx_t_5; Py_ssize_t __pyx_t_6; Py_ssize_t __pyx_t_7; Py_ssize_t __pyx_t_8; Py_ssize_t __pyx_t_9; Py_ssize_t __pyx_t_10; Py_ssize_t __pyx_t_11; Py_ssize_t __pyx_t_12; Py_ssize_t __pyx_t_13; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("take_2d_axis1_int8_int32", 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_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; { __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_int8_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3540; __pyx_clineno = __LINE__; goto __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_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1]; { __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_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3540; __pyx_clineno = __LINE__; goto __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_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_v_out, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3540; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; __pyx_pybuffernd_out.diminfo[1].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_out.diminfo[1].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[1]; /* "pandas/src/generated.pyx":3548 * int32_t fv * * n = len(values) # <<<<<<<<<<<<<< * k = len(indexer) * */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3548; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/src/generated.pyx":3549 * * n = len(values) * k = len(indexer) # <<<<<<<<<<<<<< * * if n == 0 or k == 0: */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_indexer)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3549; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_k = __pyx_t_1; /* "pandas/src/generated.pyx":3551 * k = len(indexer) * * if n == 0 or k == 0: # <<<<<<<<<<<<<< * return * */ __pyx_t_2 = ((__pyx_v_n == 0) != 0); if (!__pyx_t_2) { __pyx_t_3 = ((__pyx_v_k == 0) != 0); __pyx_t_4 = __pyx_t_3; } else { __pyx_t_4 = __pyx_t_2; } if (__pyx_t_4) { /* "pandas/src/generated.pyx":3552 * * if n == 0 or k == 0: * return # <<<<<<<<<<<<<< * * fv = fill_value */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; } /* "pandas/src/generated.pyx":3554 * return * * fv = fill_value # <<<<<<<<<<<<<< * * IF False: */ __pyx_t_5 = __Pyx_PyInt_As_npy_int32(__pyx_v_fill_value); if (unlikely((__pyx_t_5 == (npy_int32)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3554; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_fv = __pyx_t_5; /* "pandas/src/generated.pyx":3575 * return * * for j from 0 <= j < k: # <<<<<<<<<<<<<< * idx = indexer[j] * if idx == -1: */ __pyx_t_1 = __pyx_v_k; for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_1; __pyx_v_j++) { /* "pandas/src/generated.pyx":3576 * * for j from 0 <= j < k: * idx = indexer[j] # <<<<<<<<<<<<<< * if idx == -1: * for i from 0 <= i < n: */ __pyx_t_6 = __pyx_v_j; __pyx_v_idx = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_6, __pyx_pybuffernd_indexer.diminfo[0].strides)); /* "pandas/src/generated.pyx":3577 * for j from 0 <= j < k: * idx = indexer[j] * if idx == -1: # <<<<<<<<<<<<<< * for i from 0 <= i < n: * out[i, j] = fv */ __pyx_t_4 = ((__pyx_v_idx == -1) != 0); if (__pyx_t_4) { /* "pandas/src/generated.pyx":3578 * idx = indexer[j] * if idx == -1: * for i from 0 <= i < n: # <<<<<<<<<<<<<< * out[i, j] = fv * else: */ __pyx_t_7 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_7; __pyx_v_i++) { /* "pandas/src/generated.pyx":3579 * if idx == -1: * for i from 0 <= i < n: * out[i, j] = fv # <<<<<<<<<<<<<< * else: * for i from 0 <= i < n: */ __pyx_t_8 = __pyx_v_i; __pyx_t_9 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_8, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_9, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_fv; } goto __pyx_L6; } /*else*/ { /* "pandas/src/generated.pyx":3581 * out[i, j] = fv * else: * for i from 0 <= i < n: # <<<<<<<<<<<<<< * out[i, j] = values[i, idx] * */ __pyx_t_7 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_7; __pyx_v_i++) { /* "pandas/src/generated.pyx":3582 * else: * for i from 0 <= i < n: * out[i, j] = values[i, idx] # <<<<<<<<<<<<<< * * @cython.wraparound(False) */ __pyx_t_10 = __pyx_v_i; __pyx_t_11 = __pyx_v_idx; __pyx_t_12 = __pyx_v_i; __pyx_t_13 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_12, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_13, __pyx_pybuffernd_out.diminfo[1].strides) = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int8_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_10, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_11, __pyx_pybuffernd_values.diminfo[1].strides)); } } __pyx_L6:; } /* "pandas/src/generated.pyx":3540 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_axis1_int8_int32(ndarray[int8_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[int32_t, ndim=2] out, */ /* 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_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.take_2d_axis1_int8_int32", __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_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":3586 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_axis1_int8_int64(ndarray[int8_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[int64_t, ndim=2] out, */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_307take_2d_axis1_int8_int64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_307take_2d_axis1_int8_int64 = {__Pyx_NAMESTR("take_2d_axis1_int8_int64"), (PyCFunction)__pyx_pw_6pandas_5algos_307take_2d_axis1_int8_int64, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_307take_2d_axis1_int8_int64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_values = 0; PyArrayObject *__pyx_v_indexer = 0; PyArrayObject *__pyx_v_out = 0; PyObject *__pyx_v_fill_value = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("take_2d_axis1_int8_int64 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_values,&__pyx_n_s_indexer,&__pyx_n_s_out,&__pyx_n_s_fill_value,0}; PyObject* values[4] = {0,0,0,0}; values[3] = __pyx_k__143; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_values)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_indexer)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_2d_axis1_int8_int64", 0, 3, 4, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3586; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_out)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_2d_axis1_int8_int64", 0, 3, 4, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3586; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_fill_value); if (value) { values[3] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "take_2d_axis1_int8_int64") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3586; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_values = ((PyArrayObject *)values[0]); __pyx_v_indexer = ((PyArrayObject *)values[1]); __pyx_v_out = ((PyArrayObject *)values[2]); __pyx_v_fill_value = values[3]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("take_2d_axis1_int8_int64", 0, 3, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3586; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.take_2d_axis1_int8_int64", __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_filename = __pyx_f[2]; __pyx_lineno = 3586; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_indexer), __pyx_ptype_5numpy_ndarray, 1, "indexer", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3587; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_5numpy_ndarray, 1, "out", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3588; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_306take_2d_axis1_int8_int64(__pyx_self, __pyx_v_values, __pyx_v_indexer, __pyx_v_out, __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_5algos_306take_2d_axis1_int8_int64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_k; Py_ssize_t __pyx_v_n; Py_ssize_t __pyx_v_idx; __pyx_t_5numpy_int64_t __pyx_v_fv; __Pyx_LocalBuf_ND __pyx_pybuffernd_indexer; __Pyx_Buffer __pyx_pybuffer_indexer; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_values; __Pyx_Buffer __pyx_pybuffer_values; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; int __pyx_t_2; int __pyx_t_3; int __pyx_t_4; __pyx_t_5numpy_int64_t __pyx_t_5; Py_ssize_t __pyx_t_6; Py_ssize_t __pyx_t_7; Py_ssize_t __pyx_t_8; Py_ssize_t __pyx_t_9; Py_ssize_t __pyx_t_10; Py_ssize_t __pyx_t_11; Py_ssize_t __pyx_t_12; Py_ssize_t __pyx_t_13; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("take_2d_axis1_int8_int64", 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_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; { __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_int8_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3586; __pyx_clineno = __LINE__; goto __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_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1]; { __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_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3586; __pyx_clineno = __LINE__; goto __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_BufFmt_StackElem __pyx_stack[1]; 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, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3586; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; __pyx_pybuffernd_out.diminfo[1].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_out.diminfo[1].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[1]; /* "pandas/src/generated.pyx":3594 * int64_t fv * * n = len(values) # <<<<<<<<<<<<<< * k = len(indexer) * */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3594; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/src/generated.pyx":3595 * * n = len(values) * k = len(indexer) # <<<<<<<<<<<<<< * * if n == 0 or k == 0: */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_indexer)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3595; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_k = __pyx_t_1; /* "pandas/src/generated.pyx":3597 * k = len(indexer) * * if n == 0 or k == 0: # <<<<<<<<<<<<<< * return * */ __pyx_t_2 = ((__pyx_v_n == 0) != 0); if (!__pyx_t_2) { __pyx_t_3 = ((__pyx_v_k == 0) != 0); __pyx_t_4 = __pyx_t_3; } else { __pyx_t_4 = __pyx_t_2; } if (__pyx_t_4) { /* "pandas/src/generated.pyx":3598 * * if n == 0 or k == 0: * return # <<<<<<<<<<<<<< * * fv = fill_value */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; } /* "pandas/src/generated.pyx":3600 * return * * fv = fill_value # <<<<<<<<<<<<<< * * IF False: */ __pyx_t_5 = __Pyx_PyInt_As_npy_int64(__pyx_v_fill_value); if (unlikely((__pyx_t_5 == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3600; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_fv = __pyx_t_5; /* "pandas/src/generated.pyx":3621 * return * * for j from 0 <= j < k: # <<<<<<<<<<<<<< * idx = indexer[j] * if idx == -1: */ __pyx_t_1 = __pyx_v_k; for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_1; __pyx_v_j++) { /* "pandas/src/generated.pyx":3622 * * for j from 0 <= j < k: * idx = indexer[j] # <<<<<<<<<<<<<< * if idx == -1: * for i from 0 <= i < n: */ __pyx_t_6 = __pyx_v_j; __pyx_v_idx = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_6, __pyx_pybuffernd_indexer.diminfo[0].strides)); /* "pandas/src/generated.pyx":3623 * for j from 0 <= j < k: * idx = indexer[j] * if idx == -1: # <<<<<<<<<<<<<< * for i from 0 <= i < n: * out[i, j] = fv */ __pyx_t_4 = ((__pyx_v_idx == -1) != 0); if (__pyx_t_4) { /* "pandas/src/generated.pyx":3624 * idx = indexer[j] * if idx == -1: * for i from 0 <= i < n: # <<<<<<<<<<<<<< * out[i, j] = fv * else: */ __pyx_t_7 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_7; __pyx_v_i++) { /* "pandas/src/generated.pyx":3625 * if idx == -1: * for i from 0 <= i < n: * out[i, j] = fv # <<<<<<<<<<<<<< * else: * for i from 0 <= i < n: */ __pyx_t_8 = __pyx_v_i; __pyx_t_9 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_8, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_9, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_fv; } goto __pyx_L6; } /*else*/ { /* "pandas/src/generated.pyx":3627 * out[i, j] = fv * else: * for i from 0 <= i < n: # <<<<<<<<<<<<<< * out[i, j] = values[i, idx] * */ __pyx_t_7 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_7; __pyx_v_i++) { /* "pandas/src/generated.pyx":3628 * else: * for i from 0 <= i < n: * out[i, j] = values[i, idx] # <<<<<<<<<<<<<< * * @cython.wraparound(False) */ __pyx_t_10 = __pyx_v_i; __pyx_t_11 = __pyx_v_idx; __pyx_t_12 = __pyx_v_i; __pyx_t_13 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_12, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_13, __pyx_pybuffernd_out.diminfo[1].strides) = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int8_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_10, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_11, __pyx_pybuffernd_values.diminfo[1].strides)); } } __pyx_L6:; } /* "pandas/src/generated.pyx":3586 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_axis1_int8_int64(ndarray[int8_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[int64_t, ndim=2] out, */ /* 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_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.take_2d_axis1_int8_int64", __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_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":3632 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_axis1_int8_float64(ndarray[int8_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[float64_t, ndim=2] out, */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_309take_2d_axis1_int8_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_309take_2d_axis1_int8_float64 = {__Pyx_NAMESTR("take_2d_axis1_int8_float64"), (PyCFunction)__pyx_pw_6pandas_5algos_309take_2d_axis1_int8_float64, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_309take_2d_axis1_int8_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_values = 0; PyArrayObject *__pyx_v_indexer = 0; PyArrayObject *__pyx_v_out = 0; PyObject *__pyx_v_fill_value = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("take_2d_axis1_int8_float64 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_values,&__pyx_n_s_indexer,&__pyx_n_s_out,&__pyx_n_s_fill_value,0}; PyObject* values[4] = {0,0,0,0}; values[3] = __pyx_k__144; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_values)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_indexer)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_2d_axis1_int8_float64", 0, 3, 4, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3632; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_out)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_2d_axis1_int8_float64", 0, 3, 4, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3632; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_fill_value); if (value) { values[3] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "take_2d_axis1_int8_float64") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3632; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_values = ((PyArrayObject *)values[0]); __pyx_v_indexer = ((PyArrayObject *)values[1]); __pyx_v_out = ((PyArrayObject *)values[2]); __pyx_v_fill_value = values[3]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("take_2d_axis1_int8_float64", 0, 3, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3632; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.take_2d_axis1_int8_float64", __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_filename = __pyx_f[2]; __pyx_lineno = 3632; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_indexer), __pyx_ptype_5numpy_ndarray, 1, "indexer", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3633; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_5numpy_ndarray, 1, "out", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3634; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_308take_2d_axis1_int8_float64(__pyx_self, __pyx_v_values, __pyx_v_indexer, __pyx_v_out, __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_5algos_308take_2d_axis1_int8_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_k; Py_ssize_t __pyx_v_n; Py_ssize_t __pyx_v_idx; __pyx_t_5numpy_float64_t __pyx_v_fv; __Pyx_LocalBuf_ND __pyx_pybuffernd_indexer; __Pyx_Buffer __pyx_pybuffer_indexer; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_values; __Pyx_Buffer __pyx_pybuffer_values; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; int __pyx_t_2; int __pyx_t_3; int __pyx_t_4; __pyx_t_5numpy_float64_t __pyx_t_5; Py_ssize_t __pyx_t_6; Py_ssize_t __pyx_t_7; Py_ssize_t __pyx_t_8; Py_ssize_t __pyx_t_9; Py_ssize_t __pyx_t_10; Py_ssize_t __pyx_t_11; Py_ssize_t __pyx_t_12; Py_ssize_t __pyx_t_13; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("take_2d_axis1_int8_float64", 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_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; { __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_int8_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3632; __pyx_clineno = __LINE__; goto __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_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1]; { __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_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3632; __pyx_clineno = __LINE__; goto __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_BufFmt_StackElem __pyx_stack[1]; 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, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3632; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; __pyx_pybuffernd_out.diminfo[1].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_out.diminfo[1].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[1]; /* "pandas/src/generated.pyx":3640 * float64_t fv * * n = len(values) # <<<<<<<<<<<<<< * k = len(indexer) * */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3640; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/src/generated.pyx":3641 * * n = len(values) * k = len(indexer) # <<<<<<<<<<<<<< * * if n == 0 or k == 0: */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_indexer)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3641; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_k = __pyx_t_1; /* "pandas/src/generated.pyx":3643 * k = len(indexer) * * if n == 0 or k == 0: # <<<<<<<<<<<<<< * return * */ __pyx_t_2 = ((__pyx_v_n == 0) != 0); if (!__pyx_t_2) { __pyx_t_3 = ((__pyx_v_k == 0) != 0); __pyx_t_4 = __pyx_t_3; } else { __pyx_t_4 = __pyx_t_2; } if (__pyx_t_4) { /* "pandas/src/generated.pyx":3644 * * if n == 0 or k == 0: * return # <<<<<<<<<<<<<< * * fv = fill_value */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; } /* "pandas/src/generated.pyx":3646 * return * * fv = fill_value # <<<<<<<<<<<<<< * * IF False: */ __pyx_t_5 = __pyx_PyFloat_AsDouble(__pyx_v_fill_value); if (unlikely((__pyx_t_5 == (npy_float64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3646; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_fv = __pyx_t_5; /* "pandas/src/generated.pyx":3667 * return * * for j from 0 <= j < k: # <<<<<<<<<<<<<< * idx = indexer[j] * if idx == -1: */ __pyx_t_1 = __pyx_v_k; for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_1; __pyx_v_j++) { /* "pandas/src/generated.pyx":3668 * * for j from 0 <= j < k: * idx = indexer[j] # <<<<<<<<<<<<<< * if idx == -1: * for i from 0 <= i < n: */ __pyx_t_6 = __pyx_v_j; __pyx_v_idx = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_6, __pyx_pybuffernd_indexer.diminfo[0].strides)); /* "pandas/src/generated.pyx":3669 * for j from 0 <= j < k: * idx = indexer[j] * if idx == -1: # <<<<<<<<<<<<<< * for i from 0 <= i < n: * out[i, j] = fv */ __pyx_t_4 = ((__pyx_v_idx == -1) != 0); if (__pyx_t_4) { /* "pandas/src/generated.pyx":3670 * idx = indexer[j] * if idx == -1: * for i from 0 <= i < n: # <<<<<<<<<<<<<< * out[i, j] = fv * else: */ __pyx_t_7 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_7; __pyx_v_i++) { /* "pandas/src/generated.pyx":3671 * if idx == -1: * for i from 0 <= i < n: * out[i, j] = fv # <<<<<<<<<<<<<< * else: * for i from 0 <= i < n: */ __pyx_t_8 = __pyx_v_i; __pyx_t_9 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_8, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_9, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_fv; } goto __pyx_L6; } /*else*/ { /* "pandas/src/generated.pyx":3673 * out[i, j] = fv * else: * for i from 0 <= i < n: # <<<<<<<<<<<<<< * out[i, j] = values[i, idx] * */ __pyx_t_7 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_7; __pyx_v_i++) { /* "pandas/src/generated.pyx":3674 * else: * for i from 0 <= i < n: * out[i, j] = values[i, idx] # <<<<<<<<<<<<<< * * @cython.wraparound(False) */ __pyx_t_10 = __pyx_v_i; __pyx_t_11 = __pyx_v_idx; __pyx_t_12 = __pyx_v_i; __pyx_t_13 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_12, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_13, __pyx_pybuffernd_out.diminfo[1].strides) = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int8_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_10, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_11, __pyx_pybuffernd_values.diminfo[1].strides)); } } __pyx_L6:; } /* "pandas/src/generated.pyx":3632 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_axis1_int8_float64(ndarray[int8_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[float64_t, ndim=2] out, */ /* 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_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.take_2d_axis1_int8_float64", __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_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":3678 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_axis1_int16_int16(ndarray[int16_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[int16_t, ndim=2] out, */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_311take_2d_axis1_int16_int16(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_311take_2d_axis1_int16_int16 = {__Pyx_NAMESTR("take_2d_axis1_int16_int16"), (PyCFunction)__pyx_pw_6pandas_5algos_311take_2d_axis1_int16_int16, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_311take_2d_axis1_int16_int16(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_values = 0; PyArrayObject *__pyx_v_indexer = 0; PyArrayObject *__pyx_v_out = 0; PyObject *__pyx_v_fill_value = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("take_2d_axis1_int16_int16 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_values,&__pyx_n_s_indexer,&__pyx_n_s_out,&__pyx_n_s_fill_value,0}; PyObject* values[4] = {0,0,0,0}; values[3] = __pyx_k__145; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_values)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_indexer)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_2d_axis1_int16_int16", 0, 3, 4, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3678; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_out)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_2d_axis1_int16_int16", 0, 3, 4, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3678; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_fill_value); if (value) { values[3] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "take_2d_axis1_int16_int16") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3678; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_values = ((PyArrayObject *)values[0]); __pyx_v_indexer = ((PyArrayObject *)values[1]); __pyx_v_out = ((PyArrayObject *)values[2]); __pyx_v_fill_value = values[3]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("take_2d_axis1_int16_int16", 0, 3, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3678; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.take_2d_axis1_int16_int16", __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_filename = __pyx_f[2]; __pyx_lineno = 3678; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_indexer), __pyx_ptype_5numpy_ndarray, 1, "indexer", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3679; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_5numpy_ndarray, 1, "out", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3680; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_310take_2d_axis1_int16_int16(__pyx_self, __pyx_v_values, __pyx_v_indexer, __pyx_v_out, __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_5algos_310take_2d_axis1_int16_int16(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_k; Py_ssize_t __pyx_v_n; Py_ssize_t __pyx_v_idx; __pyx_t_5numpy_int16_t __pyx_v_fv; __pyx_t_5numpy_int16_t *__pyx_v_v; __pyx_t_5numpy_int16_t *__pyx_v_o; __Pyx_LocalBuf_ND __pyx_pybuffernd_indexer; __Pyx_Buffer __pyx_pybuffer_indexer; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_values; __Pyx_Buffer __pyx_pybuffer_values; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; int __pyx_t_2; int __pyx_t_3; int __pyx_t_4; __pyx_t_5numpy_int16_t __pyx_t_5; int __pyx_t_6; Py_ssize_t __pyx_t_7; Py_ssize_t __pyx_t_8; Py_ssize_t __pyx_t_9; Py_ssize_t __pyx_t_10; long __pyx_t_11; long __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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("take_2d_axis1_int16_int16", 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_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; { __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_int16_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3678; __pyx_clineno = __LINE__; goto __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_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1]; { __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_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3678; __pyx_clineno = __LINE__; goto __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_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_v_out, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int16_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3678; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; __pyx_pybuffernd_out.diminfo[1].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_out.diminfo[1].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[1]; /* "pandas/src/generated.pyx":3686 * int16_t fv * * n = len(values) # <<<<<<<<<<<<<< * k = len(indexer) * */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3686; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/src/generated.pyx":3687 * * n = len(values) * k = len(indexer) # <<<<<<<<<<<<<< * * if n == 0 or k == 0: */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_indexer)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3687; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_k = __pyx_t_1; /* "pandas/src/generated.pyx":3689 * k = len(indexer) * * if n == 0 or k == 0: # <<<<<<<<<<<<<< * return * */ __pyx_t_2 = ((__pyx_v_n == 0) != 0); if (!__pyx_t_2) { __pyx_t_3 = ((__pyx_v_k == 0) != 0); __pyx_t_4 = __pyx_t_3; } else { __pyx_t_4 = __pyx_t_2; } if (__pyx_t_4) { /* "pandas/src/generated.pyx":3690 * * if n == 0 or k == 0: * return # <<<<<<<<<<<<<< * * fv = fill_value */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; } /* "pandas/src/generated.pyx":3692 * return * * fv = fill_value # <<<<<<<<<<<<<< * * IF True: */ __pyx_t_5 = __Pyx_PyInt_As_npy_int16(__pyx_v_fill_value); if (unlikely((__pyx_t_5 == (npy_int16)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3692; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_fv = __pyx_t_5; /* "pandas/src/generated.pyx":3698 * int16_t *v, *o * * if (values.strides[0] == out.strides[0] and # <<<<<<<<<<<<<< * values.strides[0] == sizeof(int16_t) and * sizeof(int16_t) * n >= 256): */ __pyx_t_4 = (((__pyx_v_values->strides[0]) == (__pyx_v_out->strides[0])) != 0); if (__pyx_t_4) { /* "pandas/src/generated.pyx":3699 * * if (values.strides[0] == out.strides[0] and * values.strides[0] == sizeof(int16_t) and # <<<<<<<<<<<<<< * sizeof(int16_t) * n >= 256): * */ __pyx_t_2 = (((__pyx_v_values->strides[0]) == (sizeof(__pyx_t_5numpy_int16_t))) != 0); if (__pyx_t_2) { /* "pandas/src/generated.pyx":3700 * if (values.strides[0] == out.strides[0] and * values.strides[0] == sizeof(int16_t) and * sizeof(int16_t) * n >= 256): # <<<<<<<<<<<<<< * * for j from 0 <= j < k: */ __pyx_t_3 = ((((sizeof(__pyx_t_5numpy_int16_t)) * __pyx_v_n) >= 256) != 0); __pyx_t_6 = __pyx_t_3; } else { __pyx_t_6 = __pyx_t_2; } __pyx_t_2 = __pyx_t_6; } else { __pyx_t_2 = __pyx_t_4; } if (__pyx_t_2) { /* "pandas/src/generated.pyx":3702 * sizeof(int16_t) * n >= 256): * * for j from 0 <= j < k: # <<<<<<<<<<<<<< * idx = indexer[j] * if idx == -1: */ __pyx_t_1 = __pyx_v_k; for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_1; __pyx_v_j++) { /* "pandas/src/generated.pyx":3703 * * for j from 0 <= j < k: * idx = indexer[j] # <<<<<<<<<<<<<< * if idx == -1: * for i from 0 <= i < n: */ __pyx_t_7 = __pyx_v_j; __pyx_v_idx = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_7, __pyx_pybuffernd_indexer.diminfo[0].strides)); /* "pandas/src/generated.pyx":3704 * for j from 0 <= j < k: * idx = indexer[j] * if idx == -1: # <<<<<<<<<<<<<< * for i from 0 <= i < n: * out[i, j] = fv */ __pyx_t_2 = ((__pyx_v_idx == -1) != 0); if (__pyx_t_2) { /* "pandas/src/generated.pyx":3705 * idx = indexer[j] * if idx == -1: * for i from 0 <= i < n: # <<<<<<<<<<<<<< * out[i, j] = fv * else: */ __pyx_t_8 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_8; __pyx_v_i++) { /* "pandas/src/generated.pyx":3706 * if idx == -1: * for i from 0 <= i < n: * out[i, j] = fv # <<<<<<<<<<<<<< * else: * v = &values[0, idx] */ __pyx_t_9 = __pyx_v_i; __pyx_t_10 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int16_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_9, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_10, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_fv; } goto __pyx_L7; } /*else*/ { /* "pandas/src/generated.pyx":3708 * out[i, j] = fv * else: * v = &values[0, idx] # <<<<<<<<<<<<<< * o = &out[0, j] * memmove(o, v, (sizeof(int16_t) * n)) */ __pyx_t_11 = 0; __pyx_t_8 = __pyx_v_idx; __pyx_v_v = (&(*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int16_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_11, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_8, __pyx_pybuffernd_values.diminfo[1].strides))); /* "pandas/src/generated.pyx":3709 * else: * v = &values[0, idx] * o = &out[0, j] # <<<<<<<<<<<<<< * memmove(o, v, (sizeof(int16_t) * n)) * return */ __pyx_t_12 = 0; __pyx_t_13 = __pyx_v_j; __pyx_v_o = (&(*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int16_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_12, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_13, __pyx_pybuffernd_out.diminfo[1].strides))); /* "pandas/src/generated.pyx":3710 * v = &values[0, idx] * o = &out[0, j] * memmove(o, v, (sizeof(int16_t) * n)) # <<<<<<<<<<<<<< * return * */ memmove(__pyx_v_o, __pyx_v_v, ((size_t)((sizeof(__pyx_t_5numpy_int16_t)) * __pyx_v_n))); } __pyx_L7:; } /* "pandas/src/generated.pyx":3711 * o = &out[0, j] * memmove(o, v, (sizeof(int16_t) * n)) * return # <<<<<<<<<<<<<< * * for j from 0 <= j < k: */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; } /* "pandas/src/generated.pyx":3713 * return * * for j from 0 <= j < k: # <<<<<<<<<<<<<< * idx = indexer[j] * if idx == -1: */ __pyx_t_1 = __pyx_v_k; for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_1; __pyx_v_j++) { /* "pandas/src/generated.pyx":3714 * * for j from 0 <= j < k: * idx = indexer[j] # <<<<<<<<<<<<<< * if idx == -1: * for i from 0 <= i < n: */ __pyx_t_14 = __pyx_v_j; __pyx_v_idx = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_indexer.diminfo[0].strides)); /* "pandas/src/generated.pyx":3715 * for j from 0 <= j < k: * idx = indexer[j] * if idx == -1: # <<<<<<<<<<<<<< * for i from 0 <= i < n: * out[i, j] = fv */ __pyx_t_2 = ((__pyx_v_idx == -1) != 0); if (__pyx_t_2) { /* "pandas/src/generated.pyx":3716 * idx = indexer[j] * if idx == -1: * for i from 0 <= i < n: # <<<<<<<<<<<<<< * out[i, j] = fv * else: */ __pyx_t_15 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_15; __pyx_v_i++) { /* "pandas/src/generated.pyx":3717 * if idx == -1: * for i from 0 <= i < n: * out[i, j] = fv # <<<<<<<<<<<<<< * else: * for i from 0 <= i < n: */ __pyx_t_16 = __pyx_v_i; __pyx_t_17 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int16_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_17, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_fv; } goto __pyx_L12; } /*else*/ { /* "pandas/src/generated.pyx":3719 * out[i, j] = fv * else: * for i from 0 <= i < n: # <<<<<<<<<<<<<< * out[i, j] = values[i, idx] * */ __pyx_t_15 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_15; __pyx_v_i++) { /* "pandas/src/generated.pyx":3720 * else: * for i from 0 <= i < n: * out[i, j] = values[i, idx] # <<<<<<<<<<<<<< * * @cython.wraparound(False) */ __pyx_t_18 = __pyx_v_i; __pyx_t_19 = __pyx_v_idx; __pyx_t_20 = __pyx_v_i; __pyx_t_21 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int16_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_21, __pyx_pybuffernd_out.diminfo[1].strides) = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int16_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_19, __pyx_pybuffernd_values.diminfo[1].strides)); } } __pyx_L12:; } /* "pandas/src/generated.pyx":3678 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_axis1_int16_int16(ndarray[int16_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[int16_t, ndim=2] out, */ /* 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_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.take_2d_axis1_int16_int16", __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_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":3724 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_axis1_int16_int32(ndarray[int16_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[int32_t, ndim=2] out, */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_313take_2d_axis1_int16_int32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_313take_2d_axis1_int16_int32 = {__Pyx_NAMESTR("take_2d_axis1_int16_int32"), (PyCFunction)__pyx_pw_6pandas_5algos_313take_2d_axis1_int16_int32, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_313take_2d_axis1_int16_int32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_values = 0; PyArrayObject *__pyx_v_indexer = 0; PyArrayObject *__pyx_v_out = 0; PyObject *__pyx_v_fill_value = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("take_2d_axis1_int16_int32 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_values,&__pyx_n_s_indexer,&__pyx_n_s_out,&__pyx_n_s_fill_value,0}; PyObject* values[4] = {0,0,0,0}; values[3] = __pyx_k__146; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_values)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_indexer)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_2d_axis1_int16_int32", 0, 3, 4, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3724; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_out)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_2d_axis1_int16_int32", 0, 3, 4, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3724; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_fill_value); if (value) { values[3] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "take_2d_axis1_int16_int32") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3724; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_values = ((PyArrayObject *)values[0]); __pyx_v_indexer = ((PyArrayObject *)values[1]); __pyx_v_out = ((PyArrayObject *)values[2]); __pyx_v_fill_value = values[3]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("take_2d_axis1_int16_int32", 0, 3, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3724; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.take_2d_axis1_int16_int32", __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_filename = __pyx_f[2]; __pyx_lineno = 3724; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_indexer), __pyx_ptype_5numpy_ndarray, 1, "indexer", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3725; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_5numpy_ndarray, 1, "out", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3726; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_312take_2d_axis1_int16_int32(__pyx_self, __pyx_v_values, __pyx_v_indexer, __pyx_v_out, __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_5algos_312take_2d_axis1_int16_int32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_k; Py_ssize_t __pyx_v_n; Py_ssize_t __pyx_v_idx; __pyx_t_5numpy_int32_t __pyx_v_fv; __Pyx_LocalBuf_ND __pyx_pybuffernd_indexer; __Pyx_Buffer __pyx_pybuffer_indexer; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_values; __Pyx_Buffer __pyx_pybuffer_values; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; int __pyx_t_2; int __pyx_t_3; int __pyx_t_4; __pyx_t_5numpy_int32_t __pyx_t_5; Py_ssize_t __pyx_t_6; Py_ssize_t __pyx_t_7; Py_ssize_t __pyx_t_8; Py_ssize_t __pyx_t_9; Py_ssize_t __pyx_t_10; Py_ssize_t __pyx_t_11; Py_ssize_t __pyx_t_12; Py_ssize_t __pyx_t_13; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("take_2d_axis1_int16_int32", 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_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; { __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_int16_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3724; __pyx_clineno = __LINE__; goto __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_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1]; { __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_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3724; __pyx_clineno = __LINE__; goto __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_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_v_out, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3724; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; __pyx_pybuffernd_out.diminfo[1].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_out.diminfo[1].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[1]; /* "pandas/src/generated.pyx":3732 * int32_t fv * * n = len(values) # <<<<<<<<<<<<<< * k = len(indexer) * */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3732; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/src/generated.pyx":3733 * * n = len(values) * k = len(indexer) # <<<<<<<<<<<<<< * * if n == 0 or k == 0: */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_indexer)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3733; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_k = __pyx_t_1; /* "pandas/src/generated.pyx":3735 * k = len(indexer) * * if n == 0 or k == 0: # <<<<<<<<<<<<<< * return * */ __pyx_t_2 = ((__pyx_v_n == 0) != 0); if (!__pyx_t_2) { __pyx_t_3 = ((__pyx_v_k == 0) != 0); __pyx_t_4 = __pyx_t_3; } else { __pyx_t_4 = __pyx_t_2; } if (__pyx_t_4) { /* "pandas/src/generated.pyx":3736 * * if n == 0 or k == 0: * return # <<<<<<<<<<<<<< * * fv = fill_value */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; } /* "pandas/src/generated.pyx":3738 * return * * fv = fill_value # <<<<<<<<<<<<<< * * IF False: */ __pyx_t_5 = __Pyx_PyInt_As_npy_int32(__pyx_v_fill_value); if (unlikely((__pyx_t_5 == (npy_int32)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3738; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_fv = __pyx_t_5; /* "pandas/src/generated.pyx":3759 * return * * for j from 0 <= j < k: # <<<<<<<<<<<<<< * idx = indexer[j] * if idx == -1: */ __pyx_t_1 = __pyx_v_k; for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_1; __pyx_v_j++) { /* "pandas/src/generated.pyx":3760 * * for j from 0 <= j < k: * idx = indexer[j] # <<<<<<<<<<<<<< * if idx == -1: * for i from 0 <= i < n: */ __pyx_t_6 = __pyx_v_j; __pyx_v_idx = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_6, __pyx_pybuffernd_indexer.diminfo[0].strides)); /* "pandas/src/generated.pyx":3761 * for j from 0 <= j < k: * idx = indexer[j] * if idx == -1: # <<<<<<<<<<<<<< * for i from 0 <= i < n: * out[i, j] = fv */ __pyx_t_4 = ((__pyx_v_idx == -1) != 0); if (__pyx_t_4) { /* "pandas/src/generated.pyx":3762 * idx = indexer[j] * if idx == -1: * for i from 0 <= i < n: # <<<<<<<<<<<<<< * out[i, j] = fv * else: */ __pyx_t_7 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_7; __pyx_v_i++) { /* "pandas/src/generated.pyx":3763 * if idx == -1: * for i from 0 <= i < n: * out[i, j] = fv # <<<<<<<<<<<<<< * else: * for i from 0 <= i < n: */ __pyx_t_8 = __pyx_v_i; __pyx_t_9 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_8, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_9, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_fv; } goto __pyx_L6; } /*else*/ { /* "pandas/src/generated.pyx":3765 * out[i, j] = fv * else: * for i from 0 <= i < n: # <<<<<<<<<<<<<< * out[i, j] = values[i, idx] * */ __pyx_t_7 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_7; __pyx_v_i++) { /* "pandas/src/generated.pyx":3766 * else: * for i from 0 <= i < n: * out[i, j] = values[i, idx] # <<<<<<<<<<<<<< * * @cython.wraparound(False) */ __pyx_t_10 = __pyx_v_i; __pyx_t_11 = __pyx_v_idx; __pyx_t_12 = __pyx_v_i; __pyx_t_13 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_12, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_13, __pyx_pybuffernd_out.diminfo[1].strides) = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int16_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_10, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_11, __pyx_pybuffernd_values.diminfo[1].strides)); } } __pyx_L6:; } /* "pandas/src/generated.pyx":3724 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_axis1_int16_int32(ndarray[int16_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[int32_t, ndim=2] out, */ /* 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_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.take_2d_axis1_int16_int32", __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_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":3770 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_axis1_int16_int64(ndarray[int16_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[int64_t, ndim=2] out, */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_315take_2d_axis1_int16_int64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_315take_2d_axis1_int16_int64 = {__Pyx_NAMESTR("take_2d_axis1_int16_int64"), (PyCFunction)__pyx_pw_6pandas_5algos_315take_2d_axis1_int16_int64, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_315take_2d_axis1_int16_int64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_values = 0; PyArrayObject *__pyx_v_indexer = 0; PyArrayObject *__pyx_v_out = 0; PyObject *__pyx_v_fill_value = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("take_2d_axis1_int16_int64 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_values,&__pyx_n_s_indexer,&__pyx_n_s_out,&__pyx_n_s_fill_value,0}; PyObject* values[4] = {0,0,0,0}; values[3] = __pyx_k__147; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_values)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_indexer)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_2d_axis1_int16_int64", 0, 3, 4, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3770; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_out)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_2d_axis1_int16_int64", 0, 3, 4, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3770; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_fill_value); if (value) { values[3] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "take_2d_axis1_int16_int64") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3770; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_values = ((PyArrayObject *)values[0]); __pyx_v_indexer = ((PyArrayObject *)values[1]); __pyx_v_out = ((PyArrayObject *)values[2]); __pyx_v_fill_value = values[3]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("take_2d_axis1_int16_int64", 0, 3, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3770; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.take_2d_axis1_int16_int64", __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_filename = __pyx_f[2]; __pyx_lineno = 3770; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_indexer), __pyx_ptype_5numpy_ndarray, 1, "indexer", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3771; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_5numpy_ndarray, 1, "out", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3772; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_314take_2d_axis1_int16_int64(__pyx_self, __pyx_v_values, __pyx_v_indexer, __pyx_v_out, __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_5algos_314take_2d_axis1_int16_int64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_k; Py_ssize_t __pyx_v_n; Py_ssize_t __pyx_v_idx; __pyx_t_5numpy_int64_t __pyx_v_fv; __Pyx_LocalBuf_ND __pyx_pybuffernd_indexer; __Pyx_Buffer __pyx_pybuffer_indexer; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_values; __Pyx_Buffer __pyx_pybuffer_values; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; int __pyx_t_2; int __pyx_t_3; int __pyx_t_4; __pyx_t_5numpy_int64_t __pyx_t_5; Py_ssize_t __pyx_t_6; Py_ssize_t __pyx_t_7; Py_ssize_t __pyx_t_8; Py_ssize_t __pyx_t_9; Py_ssize_t __pyx_t_10; Py_ssize_t __pyx_t_11; Py_ssize_t __pyx_t_12; Py_ssize_t __pyx_t_13; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("take_2d_axis1_int16_int64", 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_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; { __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_int16_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3770; __pyx_clineno = __LINE__; goto __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_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1]; { __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_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3770; __pyx_clineno = __LINE__; goto __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_BufFmt_StackElem __pyx_stack[1]; 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, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3770; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; __pyx_pybuffernd_out.diminfo[1].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_out.diminfo[1].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[1]; /* "pandas/src/generated.pyx":3778 * int64_t fv * * n = len(values) # <<<<<<<<<<<<<< * k = len(indexer) * */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3778; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/src/generated.pyx":3779 * * n = len(values) * k = len(indexer) # <<<<<<<<<<<<<< * * if n == 0 or k == 0: */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_indexer)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3779; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_k = __pyx_t_1; /* "pandas/src/generated.pyx":3781 * k = len(indexer) * * if n == 0 or k == 0: # <<<<<<<<<<<<<< * return * */ __pyx_t_2 = ((__pyx_v_n == 0) != 0); if (!__pyx_t_2) { __pyx_t_3 = ((__pyx_v_k == 0) != 0); __pyx_t_4 = __pyx_t_3; } else { __pyx_t_4 = __pyx_t_2; } if (__pyx_t_4) { /* "pandas/src/generated.pyx":3782 * * if n == 0 or k == 0: * return # <<<<<<<<<<<<<< * * fv = fill_value */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; } /* "pandas/src/generated.pyx":3784 * return * * fv = fill_value # <<<<<<<<<<<<<< * * IF False: */ __pyx_t_5 = __Pyx_PyInt_As_npy_int64(__pyx_v_fill_value); if (unlikely((__pyx_t_5 == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3784; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_fv = __pyx_t_5; /* "pandas/src/generated.pyx":3805 * return * * for j from 0 <= j < k: # <<<<<<<<<<<<<< * idx = indexer[j] * if idx == -1: */ __pyx_t_1 = __pyx_v_k; for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_1; __pyx_v_j++) { /* "pandas/src/generated.pyx":3806 * * for j from 0 <= j < k: * idx = indexer[j] # <<<<<<<<<<<<<< * if idx == -1: * for i from 0 <= i < n: */ __pyx_t_6 = __pyx_v_j; __pyx_v_idx = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_6, __pyx_pybuffernd_indexer.diminfo[0].strides)); /* "pandas/src/generated.pyx":3807 * for j from 0 <= j < k: * idx = indexer[j] * if idx == -1: # <<<<<<<<<<<<<< * for i from 0 <= i < n: * out[i, j] = fv */ __pyx_t_4 = ((__pyx_v_idx == -1) != 0); if (__pyx_t_4) { /* "pandas/src/generated.pyx":3808 * idx = indexer[j] * if idx == -1: * for i from 0 <= i < n: # <<<<<<<<<<<<<< * out[i, j] = fv * else: */ __pyx_t_7 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_7; __pyx_v_i++) { /* "pandas/src/generated.pyx":3809 * if idx == -1: * for i from 0 <= i < n: * out[i, j] = fv # <<<<<<<<<<<<<< * else: * for i from 0 <= i < n: */ __pyx_t_8 = __pyx_v_i; __pyx_t_9 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_8, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_9, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_fv; } goto __pyx_L6; } /*else*/ { /* "pandas/src/generated.pyx":3811 * out[i, j] = fv * else: * for i from 0 <= i < n: # <<<<<<<<<<<<<< * out[i, j] = values[i, idx] * */ __pyx_t_7 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_7; __pyx_v_i++) { /* "pandas/src/generated.pyx":3812 * else: * for i from 0 <= i < n: * out[i, j] = values[i, idx] # <<<<<<<<<<<<<< * * @cython.wraparound(False) */ __pyx_t_10 = __pyx_v_i; __pyx_t_11 = __pyx_v_idx; __pyx_t_12 = __pyx_v_i; __pyx_t_13 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_12, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_13, __pyx_pybuffernd_out.diminfo[1].strides) = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int16_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_10, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_11, __pyx_pybuffernd_values.diminfo[1].strides)); } } __pyx_L6:; } /* "pandas/src/generated.pyx":3770 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_axis1_int16_int64(ndarray[int16_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[int64_t, ndim=2] out, */ /* 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_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.take_2d_axis1_int16_int64", __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_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":3816 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_axis1_int16_float64(ndarray[int16_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[float64_t, ndim=2] out, */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_317take_2d_axis1_int16_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_317take_2d_axis1_int16_float64 = {__Pyx_NAMESTR("take_2d_axis1_int16_float64"), (PyCFunction)__pyx_pw_6pandas_5algos_317take_2d_axis1_int16_float64, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_317take_2d_axis1_int16_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_values = 0; PyArrayObject *__pyx_v_indexer = 0; PyArrayObject *__pyx_v_out = 0; PyObject *__pyx_v_fill_value = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("take_2d_axis1_int16_float64 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_values,&__pyx_n_s_indexer,&__pyx_n_s_out,&__pyx_n_s_fill_value,0}; PyObject* values[4] = {0,0,0,0}; values[3] = __pyx_k__148; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_values)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_indexer)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_2d_axis1_int16_float64", 0, 3, 4, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3816; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_out)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_2d_axis1_int16_float64", 0, 3, 4, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3816; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_fill_value); if (value) { values[3] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "take_2d_axis1_int16_float64") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3816; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_values = ((PyArrayObject *)values[0]); __pyx_v_indexer = ((PyArrayObject *)values[1]); __pyx_v_out = ((PyArrayObject *)values[2]); __pyx_v_fill_value = values[3]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("take_2d_axis1_int16_float64", 0, 3, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3816; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.take_2d_axis1_int16_float64", __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_filename = __pyx_f[2]; __pyx_lineno = 3816; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_indexer), __pyx_ptype_5numpy_ndarray, 1, "indexer", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3817; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_5numpy_ndarray, 1, "out", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3818; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_316take_2d_axis1_int16_float64(__pyx_self, __pyx_v_values, __pyx_v_indexer, __pyx_v_out, __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_5algos_316take_2d_axis1_int16_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_k; Py_ssize_t __pyx_v_n; Py_ssize_t __pyx_v_idx; __pyx_t_5numpy_float64_t __pyx_v_fv; __Pyx_LocalBuf_ND __pyx_pybuffernd_indexer; __Pyx_Buffer __pyx_pybuffer_indexer; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_values; __Pyx_Buffer __pyx_pybuffer_values; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; int __pyx_t_2; int __pyx_t_3; int __pyx_t_4; __pyx_t_5numpy_float64_t __pyx_t_5; Py_ssize_t __pyx_t_6; Py_ssize_t __pyx_t_7; Py_ssize_t __pyx_t_8; Py_ssize_t __pyx_t_9; Py_ssize_t __pyx_t_10; Py_ssize_t __pyx_t_11; Py_ssize_t __pyx_t_12; Py_ssize_t __pyx_t_13; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("take_2d_axis1_int16_float64", 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_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; { __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_int16_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3816; __pyx_clineno = __LINE__; goto __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_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1]; { __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_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3816; __pyx_clineno = __LINE__; goto __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_BufFmt_StackElem __pyx_stack[1]; 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, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3816; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; __pyx_pybuffernd_out.diminfo[1].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_out.diminfo[1].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[1]; /* "pandas/src/generated.pyx":3824 * float64_t fv * * n = len(values) # <<<<<<<<<<<<<< * k = len(indexer) * */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3824; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/src/generated.pyx":3825 * * n = len(values) * k = len(indexer) # <<<<<<<<<<<<<< * * if n == 0 or k == 0: */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_indexer)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3825; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_k = __pyx_t_1; /* "pandas/src/generated.pyx":3827 * k = len(indexer) * * if n == 0 or k == 0: # <<<<<<<<<<<<<< * return * */ __pyx_t_2 = ((__pyx_v_n == 0) != 0); if (!__pyx_t_2) { __pyx_t_3 = ((__pyx_v_k == 0) != 0); __pyx_t_4 = __pyx_t_3; } else { __pyx_t_4 = __pyx_t_2; } if (__pyx_t_4) { /* "pandas/src/generated.pyx":3828 * * if n == 0 or k == 0: * return # <<<<<<<<<<<<<< * * fv = fill_value */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; } /* "pandas/src/generated.pyx":3830 * return * * fv = fill_value # <<<<<<<<<<<<<< * * IF False: */ __pyx_t_5 = __pyx_PyFloat_AsDouble(__pyx_v_fill_value); if (unlikely((__pyx_t_5 == (npy_float64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3830; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_fv = __pyx_t_5; /* "pandas/src/generated.pyx":3851 * return * * for j from 0 <= j < k: # <<<<<<<<<<<<<< * idx = indexer[j] * if idx == -1: */ __pyx_t_1 = __pyx_v_k; for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_1; __pyx_v_j++) { /* "pandas/src/generated.pyx":3852 * * for j from 0 <= j < k: * idx = indexer[j] # <<<<<<<<<<<<<< * if idx == -1: * for i from 0 <= i < n: */ __pyx_t_6 = __pyx_v_j; __pyx_v_idx = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_6, __pyx_pybuffernd_indexer.diminfo[0].strides)); /* "pandas/src/generated.pyx":3853 * for j from 0 <= j < k: * idx = indexer[j] * if idx == -1: # <<<<<<<<<<<<<< * for i from 0 <= i < n: * out[i, j] = fv */ __pyx_t_4 = ((__pyx_v_idx == -1) != 0); if (__pyx_t_4) { /* "pandas/src/generated.pyx":3854 * idx = indexer[j] * if idx == -1: * for i from 0 <= i < n: # <<<<<<<<<<<<<< * out[i, j] = fv * else: */ __pyx_t_7 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_7; __pyx_v_i++) { /* "pandas/src/generated.pyx":3855 * if idx == -1: * for i from 0 <= i < n: * out[i, j] = fv # <<<<<<<<<<<<<< * else: * for i from 0 <= i < n: */ __pyx_t_8 = __pyx_v_i; __pyx_t_9 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_8, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_9, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_fv; } goto __pyx_L6; } /*else*/ { /* "pandas/src/generated.pyx":3857 * out[i, j] = fv * else: * for i from 0 <= i < n: # <<<<<<<<<<<<<< * out[i, j] = values[i, idx] * */ __pyx_t_7 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_7; __pyx_v_i++) { /* "pandas/src/generated.pyx":3858 * else: * for i from 0 <= i < n: * out[i, j] = values[i, idx] # <<<<<<<<<<<<<< * * @cython.wraparound(False) */ __pyx_t_10 = __pyx_v_i; __pyx_t_11 = __pyx_v_idx; __pyx_t_12 = __pyx_v_i; __pyx_t_13 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_12, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_13, __pyx_pybuffernd_out.diminfo[1].strides) = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int16_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_10, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_11, __pyx_pybuffernd_values.diminfo[1].strides)); } } __pyx_L6:; } /* "pandas/src/generated.pyx":3816 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_axis1_int16_float64(ndarray[int16_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[float64_t, ndim=2] out, */ /* 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_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.take_2d_axis1_int16_float64", __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_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":3862 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_axis1_int32_int32(ndarray[int32_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[int32_t, ndim=2] out, */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_319take_2d_axis1_int32_int32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_319take_2d_axis1_int32_int32 = {__Pyx_NAMESTR("take_2d_axis1_int32_int32"), (PyCFunction)__pyx_pw_6pandas_5algos_319take_2d_axis1_int32_int32, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_319take_2d_axis1_int32_int32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_values = 0; PyArrayObject *__pyx_v_indexer = 0; PyArrayObject *__pyx_v_out = 0; PyObject *__pyx_v_fill_value = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("take_2d_axis1_int32_int32 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_values,&__pyx_n_s_indexer,&__pyx_n_s_out,&__pyx_n_s_fill_value,0}; PyObject* values[4] = {0,0,0,0}; values[3] = __pyx_k__149; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_values)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_indexer)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_2d_axis1_int32_int32", 0, 3, 4, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3862; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_out)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_2d_axis1_int32_int32", 0, 3, 4, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3862; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_fill_value); if (value) { values[3] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "take_2d_axis1_int32_int32") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3862; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_values = ((PyArrayObject *)values[0]); __pyx_v_indexer = ((PyArrayObject *)values[1]); __pyx_v_out = ((PyArrayObject *)values[2]); __pyx_v_fill_value = values[3]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("take_2d_axis1_int32_int32", 0, 3, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3862; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.take_2d_axis1_int32_int32", __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_filename = __pyx_f[2]; __pyx_lineno = 3862; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_indexer), __pyx_ptype_5numpy_ndarray, 1, "indexer", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3863; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_5numpy_ndarray, 1, "out", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3864; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_318take_2d_axis1_int32_int32(__pyx_self, __pyx_v_values, __pyx_v_indexer, __pyx_v_out, __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_5algos_318take_2d_axis1_int32_int32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_k; Py_ssize_t __pyx_v_n; Py_ssize_t __pyx_v_idx; __pyx_t_5numpy_int32_t __pyx_v_fv; __pyx_t_5numpy_int32_t *__pyx_v_v; __pyx_t_5numpy_int32_t *__pyx_v_o; __Pyx_LocalBuf_ND __pyx_pybuffernd_indexer; __Pyx_Buffer __pyx_pybuffer_indexer; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_values; __Pyx_Buffer __pyx_pybuffer_values; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; int __pyx_t_2; int __pyx_t_3; int __pyx_t_4; __pyx_t_5numpy_int32_t __pyx_t_5; int __pyx_t_6; Py_ssize_t __pyx_t_7; Py_ssize_t __pyx_t_8; Py_ssize_t __pyx_t_9; Py_ssize_t __pyx_t_10; long __pyx_t_11; long __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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("take_2d_axis1_int32_int32", 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_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; { __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_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3862; __pyx_clineno = __LINE__; goto __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_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1]; { __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_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3862; __pyx_clineno = __LINE__; goto __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_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_v_out, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3862; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; __pyx_pybuffernd_out.diminfo[1].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_out.diminfo[1].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[1]; /* "pandas/src/generated.pyx":3870 * int32_t fv * * n = len(values) # <<<<<<<<<<<<<< * k = len(indexer) * */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3870; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/src/generated.pyx":3871 * * n = len(values) * k = len(indexer) # <<<<<<<<<<<<<< * * if n == 0 or k == 0: */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_indexer)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3871; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_k = __pyx_t_1; /* "pandas/src/generated.pyx":3873 * k = len(indexer) * * if n == 0 or k == 0: # <<<<<<<<<<<<<< * return * */ __pyx_t_2 = ((__pyx_v_n == 0) != 0); if (!__pyx_t_2) { __pyx_t_3 = ((__pyx_v_k == 0) != 0); __pyx_t_4 = __pyx_t_3; } else { __pyx_t_4 = __pyx_t_2; } if (__pyx_t_4) { /* "pandas/src/generated.pyx":3874 * * if n == 0 or k == 0: * return # <<<<<<<<<<<<<< * * fv = fill_value */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; } /* "pandas/src/generated.pyx":3876 * return * * fv = fill_value # <<<<<<<<<<<<<< * * IF True: */ __pyx_t_5 = __Pyx_PyInt_As_npy_int32(__pyx_v_fill_value); if (unlikely((__pyx_t_5 == (npy_int32)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3876; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_fv = __pyx_t_5; /* "pandas/src/generated.pyx":3882 * int32_t *v, *o * * if (values.strides[0] == out.strides[0] and # <<<<<<<<<<<<<< * values.strides[0] == sizeof(int32_t) and * sizeof(int32_t) * n >= 256): */ __pyx_t_4 = (((__pyx_v_values->strides[0]) == (__pyx_v_out->strides[0])) != 0); if (__pyx_t_4) { /* "pandas/src/generated.pyx":3883 * * if (values.strides[0] == out.strides[0] and * values.strides[0] == sizeof(int32_t) and # <<<<<<<<<<<<<< * sizeof(int32_t) * n >= 256): * */ __pyx_t_2 = (((__pyx_v_values->strides[0]) == (sizeof(__pyx_t_5numpy_int32_t))) != 0); if (__pyx_t_2) { /* "pandas/src/generated.pyx":3884 * if (values.strides[0] == out.strides[0] and * values.strides[0] == sizeof(int32_t) and * sizeof(int32_t) * n >= 256): # <<<<<<<<<<<<<< * * for j from 0 <= j < k: */ __pyx_t_3 = ((((sizeof(__pyx_t_5numpy_int32_t)) * __pyx_v_n) >= 256) != 0); __pyx_t_6 = __pyx_t_3; } else { __pyx_t_6 = __pyx_t_2; } __pyx_t_2 = __pyx_t_6; } else { __pyx_t_2 = __pyx_t_4; } if (__pyx_t_2) { /* "pandas/src/generated.pyx":3886 * sizeof(int32_t) * n >= 256): * * for j from 0 <= j < k: # <<<<<<<<<<<<<< * idx = indexer[j] * if idx == -1: */ __pyx_t_1 = __pyx_v_k; for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_1; __pyx_v_j++) { /* "pandas/src/generated.pyx":3887 * * for j from 0 <= j < k: * idx = indexer[j] # <<<<<<<<<<<<<< * if idx == -1: * for i from 0 <= i < n: */ __pyx_t_7 = __pyx_v_j; __pyx_v_idx = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_7, __pyx_pybuffernd_indexer.diminfo[0].strides)); /* "pandas/src/generated.pyx":3888 * for j from 0 <= j < k: * idx = indexer[j] * if idx == -1: # <<<<<<<<<<<<<< * for i from 0 <= i < n: * out[i, j] = fv */ __pyx_t_2 = ((__pyx_v_idx == -1) != 0); if (__pyx_t_2) { /* "pandas/src/generated.pyx":3889 * idx = indexer[j] * if idx == -1: * for i from 0 <= i < n: # <<<<<<<<<<<<<< * out[i, j] = fv * else: */ __pyx_t_8 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_8; __pyx_v_i++) { /* "pandas/src/generated.pyx":3890 * if idx == -1: * for i from 0 <= i < n: * out[i, j] = fv # <<<<<<<<<<<<<< * else: * v = &values[0, idx] */ __pyx_t_9 = __pyx_v_i; __pyx_t_10 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_9, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_10, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_fv; } goto __pyx_L7; } /*else*/ { /* "pandas/src/generated.pyx":3892 * out[i, j] = fv * else: * v = &values[0, idx] # <<<<<<<<<<<<<< * o = &out[0, j] * memmove(o, v, (sizeof(int32_t) * n)) */ __pyx_t_11 = 0; __pyx_t_8 = __pyx_v_idx; __pyx_v_v = (&(*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_11, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_8, __pyx_pybuffernd_values.diminfo[1].strides))); /* "pandas/src/generated.pyx":3893 * else: * v = &values[0, idx] * o = &out[0, j] # <<<<<<<<<<<<<< * memmove(o, v, (sizeof(int32_t) * n)) * return */ __pyx_t_12 = 0; __pyx_t_13 = __pyx_v_j; __pyx_v_o = (&(*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_12, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_13, __pyx_pybuffernd_out.diminfo[1].strides))); /* "pandas/src/generated.pyx":3894 * v = &values[0, idx] * o = &out[0, j] * memmove(o, v, (sizeof(int32_t) * n)) # <<<<<<<<<<<<<< * return * */ memmove(__pyx_v_o, __pyx_v_v, ((size_t)((sizeof(__pyx_t_5numpy_int32_t)) * __pyx_v_n))); } __pyx_L7:; } /* "pandas/src/generated.pyx":3895 * o = &out[0, j] * memmove(o, v, (sizeof(int32_t) * n)) * return # <<<<<<<<<<<<<< * * for j from 0 <= j < k: */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; } /* "pandas/src/generated.pyx":3897 * return * * for j from 0 <= j < k: # <<<<<<<<<<<<<< * idx = indexer[j] * if idx == -1: */ __pyx_t_1 = __pyx_v_k; for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_1; __pyx_v_j++) { /* "pandas/src/generated.pyx":3898 * * for j from 0 <= j < k: * idx = indexer[j] # <<<<<<<<<<<<<< * if idx == -1: * for i from 0 <= i < n: */ __pyx_t_14 = __pyx_v_j; __pyx_v_idx = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_indexer.diminfo[0].strides)); /* "pandas/src/generated.pyx":3899 * for j from 0 <= j < k: * idx = indexer[j] * if idx == -1: # <<<<<<<<<<<<<< * for i from 0 <= i < n: * out[i, j] = fv */ __pyx_t_2 = ((__pyx_v_idx == -1) != 0); if (__pyx_t_2) { /* "pandas/src/generated.pyx":3900 * idx = indexer[j] * if idx == -1: * for i from 0 <= i < n: # <<<<<<<<<<<<<< * out[i, j] = fv * else: */ __pyx_t_15 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_15; __pyx_v_i++) { /* "pandas/src/generated.pyx":3901 * if idx == -1: * for i from 0 <= i < n: * out[i, j] = fv # <<<<<<<<<<<<<< * else: * for i from 0 <= i < n: */ __pyx_t_16 = __pyx_v_i; __pyx_t_17 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_17, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_fv; } goto __pyx_L12; } /*else*/ { /* "pandas/src/generated.pyx":3903 * out[i, j] = fv * else: * for i from 0 <= i < n: # <<<<<<<<<<<<<< * out[i, j] = values[i, idx] * */ __pyx_t_15 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_15; __pyx_v_i++) { /* "pandas/src/generated.pyx":3904 * else: * for i from 0 <= i < n: * out[i, j] = values[i, idx] # <<<<<<<<<<<<<< * * @cython.wraparound(False) */ __pyx_t_18 = __pyx_v_i; __pyx_t_19 = __pyx_v_idx; __pyx_t_20 = __pyx_v_i; __pyx_t_21 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_21, __pyx_pybuffernd_out.diminfo[1].strides) = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_19, __pyx_pybuffernd_values.diminfo[1].strides)); } } __pyx_L12:; } /* "pandas/src/generated.pyx":3862 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_axis1_int32_int32(ndarray[int32_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[int32_t, ndim=2] out, */ /* 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_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.take_2d_axis1_int32_int32", __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_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":3908 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_axis1_int32_int64(ndarray[int32_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[int64_t, ndim=2] out, */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_321take_2d_axis1_int32_int64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_321take_2d_axis1_int32_int64 = {__Pyx_NAMESTR("take_2d_axis1_int32_int64"), (PyCFunction)__pyx_pw_6pandas_5algos_321take_2d_axis1_int32_int64, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_321take_2d_axis1_int32_int64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_values = 0; PyArrayObject *__pyx_v_indexer = 0; PyArrayObject *__pyx_v_out = 0; PyObject *__pyx_v_fill_value = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("take_2d_axis1_int32_int64 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_values,&__pyx_n_s_indexer,&__pyx_n_s_out,&__pyx_n_s_fill_value,0}; PyObject* values[4] = {0,0,0,0}; values[3] = __pyx_k__150; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_values)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_indexer)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_2d_axis1_int32_int64", 0, 3, 4, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3908; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_out)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_2d_axis1_int32_int64", 0, 3, 4, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3908; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_fill_value); if (value) { values[3] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "take_2d_axis1_int32_int64") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3908; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_values = ((PyArrayObject *)values[0]); __pyx_v_indexer = ((PyArrayObject *)values[1]); __pyx_v_out = ((PyArrayObject *)values[2]); __pyx_v_fill_value = values[3]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("take_2d_axis1_int32_int64", 0, 3, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3908; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.take_2d_axis1_int32_int64", __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_filename = __pyx_f[2]; __pyx_lineno = 3908; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_indexer), __pyx_ptype_5numpy_ndarray, 1, "indexer", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3909; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_5numpy_ndarray, 1, "out", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3910; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_320take_2d_axis1_int32_int64(__pyx_self, __pyx_v_values, __pyx_v_indexer, __pyx_v_out, __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_5algos_320take_2d_axis1_int32_int64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_k; Py_ssize_t __pyx_v_n; Py_ssize_t __pyx_v_idx; __pyx_t_5numpy_int64_t __pyx_v_fv; __Pyx_LocalBuf_ND __pyx_pybuffernd_indexer; __Pyx_Buffer __pyx_pybuffer_indexer; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_values; __Pyx_Buffer __pyx_pybuffer_values; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; int __pyx_t_2; int __pyx_t_3; int __pyx_t_4; __pyx_t_5numpy_int64_t __pyx_t_5; Py_ssize_t __pyx_t_6; Py_ssize_t __pyx_t_7; Py_ssize_t __pyx_t_8; Py_ssize_t __pyx_t_9; Py_ssize_t __pyx_t_10; Py_ssize_t __pyx_t_11; Py_ssize_t __pyx_t_12; Py_ssize_t __pyx_t_13; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("take_2d_axis1_int32_int64", 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_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; { __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_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3908; __pyx_clineno = __LINE__; goto __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_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1]; { __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_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3908; __pyx_clineno = __LINE__; goto __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_BufFmt_StackElem __pyx_stack[1]; 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, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3908; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; __pyx_pybuffernd_out.diminfo[1].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_out.diminfo[1].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[1]; /* "pandas/src/generated.pyx":3916 * int64_t fv * * n = len(values) # <<<<<<<<<<<<<< * k = len(indexer) * */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3916; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/src/generated.pyx":3917 * * n = len(values) * k = len(indexer) # <<<<<<<<<<<<<< * * if n == 0 or k == 0: */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_indexer)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3917; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_k = __pyx_t_1; /* "pandas/src/generated.pyx":3919 * k = len(indexer) * * if n == 0 or k == 0: # <<<<<<<<<<<<<< * return * */ __pyx_t_2 = ((__pyx_v_n == 0) != 0); if (!__pyx_t_2) { __pyx_t_3 = ((__pyx_v_k == 0) != 0); __pyx_t_4 = __pyx_t_3; } else { __pyx_t_4 = __pyx_t_2; } if (__pyx_t_4) { /* "pandas/src/generated.pyx":3920 * * if n == 0 or k == 0: * return # <<<<<<<<<<<<<< * * fv = fill_value */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; } /* "pandas/src/generated.pyx":3922 * return * * fv = fill_value # <<<<<<<<<<<<<< * * IF False: */ __pyx_t_5 = __Pyx_PyInt_As_npy_int64(__pyx_v_fill_value); if (unlikely((__pyx_t_5 == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3922; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_fv = __pyx_t_5; /* "pandas/src/generated.pyx":3943 * return * * for j from 0 <= j < k: # <<<<<<<<<<<<<< * idx = indexer[j] * if idx == -1: */ __pyx_t_1 = __pyx_v_k; for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_1; __pyx_v_j++) { /* "pandas/src/generated.pyx":3944 * * for j from 0 <= j < k: * idx = indexer[j] # <<<<<<<<<<<<<< * if idx == -1: * for i from 0 <= i < n: */ __pyx_t_6 = __pyx_v_j; __pyx_v_idx = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_6, __pyx_pybuffernd_indexer.diminfo[0].strides)); /* "pandas/src/generated.pyx":3945 * for j from 0 <= j < k: * idx = indexer[j] * if idx == -1: # <<<<<<<<<<<<<< * for i from 0 <= i < n: * out[i, j] = fv */ __pyx_t_4 = ((__pyx_v_idx == -1) != 0); if (__pyx_t_4) { /* "pandas/src/generated.pyx":3946 * idx = indexer[j] * if idx == -1: * for i from 0 <= i < n: # <<<<<<<<<<<<<< * out[i, j] = fv * else: */ __pyx_t_7 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_7; __pyx_v_i++) { /* "pandas/src/generated.pyx":3947 * if idx == -1: * for i from 0 <= i < n: * out[i, j] = fv # <<<<<<<<<<<<<< * else: * for i from 0 <= i < n: */ __pyx_t_8 = __pyx_v_i; __pyx_t_9 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_8, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_9, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_fv; } goto __pyx_L6; } /*else*/ { /* "pandas/src/generated.pyx":3949 * out[i, j] = fv * else: * for i from 0 <= i < n: # <<<<<<<<<<<<<< * out[i, j] = values[i, idx] * */ __pyx_t_7 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_7; __pyx_v_i++) { /* "pandas/src/generated.pyx":3950 * else: * for i from 0 <= i < n: * out[i, j] = values[i, idx] # <<<<<<<<<<<<<< * * @cython.wraparound(False) */ __pyx_t_10 = __pyx_v_i; __pyx_t_11 = __pyx_v_idx; __pyx_t_12 = __pyx_v_i; __pyx_t_13 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_12, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_13, __pyx_pybuffernd_out.diminfo[1].strides) = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_10, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_11, __pyx_pybuffernd_values.diminfo[1].strides)); } } __pyx_L6:; } /* "pandas/src/generated.pyx":3908 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_axis1_int32_int64(ndarray[int32_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[int64_t, ndim=2] out, */ /* 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_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.take_2d_axis1_int32_int64", __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_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":3954 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_axis1_int32_float64(ndarray[int32_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[float64_t, ndim=2] out, */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_323take_2d_axis1_int32_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_323take_2d_axis1_int32_float64 = {__Pyx_NAMESTR("take_2d_axis1_int32_float64"), (PyCFunction)__pyx_pw_6pandas_5algos_323take_2d_axis1_int32_float64, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_323take_2d_axis1_int32_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_values = 0; PyArrayObject *__pyx_v_indexer = 0; PyArrayObject *__pyx_v_out = 0; PyObject *__pyx_v_fill_value = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("take_2d_axis1_int32_float64 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_values,&__pyx_n_s_indexer,&__pyx_n_s_out,&__pyx_n_s_fill_value,0}; PyObject* values[4] = {0,0,0,0}; values[3] = __pyx_k__151; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_values)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_indexer)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_2d_axis1_int32_float64", 0, 3, 4, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3954; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_out)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_2d_axis1_int32_float64", 0, 3, 4, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3954; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_fill_value); if (value) { values[3] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "take_2d_axis1_int32_float64") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3954; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_values = ((PyArrayObject *)values[0]); __pyx_v_indexer = ((PyArrayObject *)values[1]); __pyx_v_out = ((PyArrayObject *)values[2]); __pyx_v_fill_value = values[3]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("take_2d_axis1_int32_float64", 0, 3, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3954; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.take_2d_axis1_int32_float64", __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_filename = __pyx_f[2]; __pyx_lineno = 3954; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_indexer), __pyx_ptype_5numpy_ndarray, 1, "indexer", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3955; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_5numpy_ndarray, 1, "out", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3956; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_322take_2d_axis1_int32_float64(__pyx_self, __pyx_v_values, __pyx_v_indexer, __pyx_v_out, __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_5algos_322take_2d_axis1_int32_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_k; Py_ssize_t __pyx_v_n; Py_ssize_t __pyx_v_idx; __pyx_t_5numpy_float64_t __pyx_v_fv; __Pyx_LocalBuf_ND __pyx_pybuffernd_indexer; __Pyx_Buffer __pyx_pybuffer_indexer; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_values; __Pyx_Buffer __pyx_pybuffer_values; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; int __pyx_t_2; int __pyx_t_3; int __pyx_t_4; __pyx_t_5numpy_float64_t __pyx_t_5; Py_ssize_t __pyx_t_6; Py_ssize_t __pyx_t_7; Py_ssize_t __pyx_t_8; Py_ssize_t __pyx_t_9; Py_ssize_t __pyx_t_10; Py_ssize_t __pyx_t_11; Py_ssize_t __pyx_t_12; Py_ssize_t __pyx_t_13; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("take_2d_axis1_int32_float64", 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_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; { __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_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3954; __pyx_clineno = __LINE__; goto __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_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1]; { __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_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3954; __pyx_clineno = __LINE__; goto __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_BufFmt_StackElem __pyx_stack[1]; 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, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3954; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; __pyx_pybuffernd_out.diminfo[1].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_out.diminfo[1].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[1]; /* "pandas/src/generated.pyx":3962 * float64_t fv * * n = len(values) # <<<<<<<<<<<<<< * k = len(indexer) * */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3962; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/src/generated.pyx":3963 * * n = len(values) * k = len(indexer) # <<<<<<<<<<<<<< * * if n == 0 or k == 0: */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_indexer)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3963; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_k = __pyx_t_1; /* "pandas/src/generated.pyx":3965 * k = len(indexer) * * if n == 0 or k == 0: # <<<<<<<<<<<<<< * return * */ __pyx_t_2 = ((__pyx_v_n == 0) != 0); if (!__pyx_t_2) { __pyx_t_3 = ((__pyx_v_k == 0) != 0); __pyx_t_4 = __pyx_t_3; } else { __pyx_t_4 = __pyx_t_2; } if (__pyx_t_4) { /* "pandas/src/generated.pyx":3966 * * if n == 0 or k == 0: * return # <<<<<<<<<<<<<< * * fv = fill_value */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; } /* "pandas/src/generated.pyx":3968 * return * * fv = fill_value # <<<<<<<<<<<<<< * * IF False: */ __pyx_t_5 = __pyx_PyFloat_AsDouble(__pyx_v_fill_value); if (unlikely((__pyx_t_5 == (npy_float64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3968; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_fv = __pyx_t_5; /* "pandas/src/generated.pyx":3989 * return * * for j from 0 <= j < k: # <<<<<<<<<<<<<< * idx = indexer[j] * if idx == -1: */ __pyx_t_1 = __pyx_v_k; for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_1; __pyx_v_j++) { /* "pandas/src/generated.pyx":3990 * * for j from 0 <= j < k: * idx = indexer[j] # <<<<<<<<<<<<<< * if idx == -1: * for i from 0 <= i < n: */ __pyx_t_6 = __pyx_v_j; __pyx_v_idx = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_6, __pyx_pybuffernd_indexer.diminfo[0].strides)); /* "pandas/src/generated.pyx":3991 * for j from 0 <= j < k: * idx = indexer[j] * if idx == -1: # <<<<<<<<<<<<<< * for i from 0 <= i < n: * out[i, j] = fv */ __pyx_t_4 = ((__pyx_v_idx == -1) != 0); if (__pyx_t_4) { /* "pandas/src/generated.pyx":3992 * idx = indexer[j] * if idx == -1: * for i from 0 <= i < n: # <<<<<<<<<<<<<< * out[i, j] = fv * else: */ __pyx_t_7 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_7; __pyx_v_i++) { /* "pandas/src/generated.pyx":3993 * if idx == -1: * for i from 0 <= i < n: * out[i, j] = fv # <<<<<<<<<<<<<< * else: * for i from 0 <= i < n: */ __pyx_t_8 = __pyx_v_i; __pyx_t_9 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_8, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_9, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_fv; } goto __pyx_L6; } /*else*/ { /* "pandas/src/generated.pyx":3995 * out[i, j] = fv * else: * for i from 0 <= i < n: # <<<<<<<<<<<<<< * out[i, j] = values[i, idx] * */ __pyx_t_7 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_7; __pyx_v_i++) { /* "pandas/src/generated.pyx":3996 * else: * for i from 0 <= i < n: * out[i, j] = values[i, idx] # <<<<<<<<<<<<<< * * @cython.wraparound(False) */ __pyx_t_10 = __pyx_v_i; __pyx_t_11 = __pyx_v_idx; __pyx_t_12 = __pyx_v_i; __pyx_t_13 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_12, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_13, __pyx_pybuffernd_out.diminfo[1].strides) = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_10, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_11, __pyx_pybuffernd_values.diminfo[1].strides)); } } __pyx_L6:; } /* "pandas/src/generated.pyx":3954 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_axis1_int32_float64(ndarray[int32_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[float64_t, ndim=2] out, */ /* 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_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.take_2d_axis1_int32_float64", __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_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":4000 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_axis1_int64_int64(ndarray[int64_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[int64_t, ndim=2] out, */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_325take_2d_axis1_int64_int64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_325take_2d_axis1_int64_int64 = {__Pyx_NAMESTR("take_2d_axis1_int64_int64"), (PyCFunction)__pyx_pw_6pandas_5algos_325take_2d_axis1_int64_int64, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_325take_2d_axis1_int64_int64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_values = 0; PyArrayObject *__pyx_v_indexer = 0; PyArrayObject *__pyx_v_out = 0; PyObject *__pyx_v_fill_value = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("take_2d_axis1_int64_int64 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_values,&__pyx_n_s_indexer,&__pyx_n_s_out,&__pyx_n_s_fill_value,0}; PyObject* values[4] = {0,0,0,0}; values[3] = __pyx_k__152; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_values)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_indexer)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_2d_axis1_int64_int64", 0, 3, 4, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4000; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_out)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_2d_axis1_int64_int64", 0, 3, 4, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4000; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_fill_value); if (value) { values[3] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "take_2d_axis1_int64_int64") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4000; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_values = ((PyArrayObject *)values[0]); __pyx_v_indexer = ((PyArrayObject *)values[1]); __pyx_v_out = ((PyArrayObject *)values[2]); __pyx_v_fill_value = values[3]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("take_2d_axis1_int64_int64", 0, 3, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4000; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.take_2d_axis1_int64_int64", __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_filename = __pyx_f[2]; __pyx_lineno = 4000; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_indexer), __pyx_ptype_5numpy_ndarray, 1, "indexer", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4001; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_5numpy_ndarray, 1, "out", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4002; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_324take_2d_axis1_int64_int64(__pyx_self, __pyx_v_values, __pyx_v_indexer, __pyx_v_out, __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_5algos_324take_2d_axis1_int64_int64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_k; Py_ssize_t __pyx_v_n; Py_ssize_t __pyx_v_idx; __pyx_t_5numpy_int64_t __pyx_v_fv; __pyx_t_5numpy_int64_t *__pyx_v_v; __pyx_t_5numpy_int64_t *__pyx_v_o; __Pyx_LocalBuf_ND __pyx_pybuffernd_indexer; __Pyx_Buffer __pyx_pybuffer_indexer; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_values; __Pyx_Buffer __pyx_pybuffer_values; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; int __pyx_t_2; int __pyx_t_3; int __pyx_t_4; __pyx_t_5numpy_int64_t __pyx_t_5; int __pyx_t_6; Py_ssize_t __pyx_t_7; Py_ssize_t __pyx_t_8; Py_ssize_t __pyx_t_9; Py_ssize_t __pyx_t_10; long __pyx_t_11; long __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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("take_2d_axis1_int64_int64", 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_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; { __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_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4000; __pyx_clineno = __LINE__; goto __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_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1]; { __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_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4000; __pyx_clineno = __LINE__; goto __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_BufFmt_StackElem __pyx_stack[1]; 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, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4000; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; __pyx_pybuffernd_out.diminfo[1].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_out.diminfo[1].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[1]; /* "pandas/src/generated.pyx":4008 * int64_t fv * * n = len(values) # <<<<<<<<<<<<<< * k = len(indexer) * */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4008; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/src/generated.pyx":4009 * * n = len(values) * k = len(indexer) # <<<<<<<<<<<<<< * * if n == 0 or k == 0: */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_indexer)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4009; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_k = __pyx_t_1; /* "pandas/src/generated.pyx":4011 * k = len(indexer) * * if n == 0 or k == 0: # <<<<<<<<<<<<<< * return * */ __pyx_t_2 = ((__pyx_v_n == 0) != 0); if (!__pyx_t_2) { __pyx_t_3 = ((__pyx_v_k == 0) != 0); __pyx_t_4 = __pyx_t_3; } else { __pyx_t_4 = __pyx_t_2; } if (__pyx_t_4) { /* "pandas/src/generated.pyx":4012 * * if n == 0 or k == 0: * return # <<<<<<<<<<<<<< * * fv = fill_value */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; } /* "pandas/src/generated.pyx":4014 * return * * fv = fill_value # <<<<<<<<<<<<<< * * IF True: */ __pyx_t_5 = __Pyx_PyInt_As_npy_int64(__pyx_v_fill_value); if (unlikely((__pyx_t_5 == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4014; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_fv = __pyx_t_5; /* "pandas/src/generated.pyx":4020 * int64_t *v, *o * * if (values.strides[0] == out.strides[0] and # <<<<<<<<<<<<<< * values.strides[0] == sizeof(int64_t) and * sizeof(int64_t) * n >= 256): */ __pyx_t_4 = (((__pyx_v_values->strides[0]) == (__pyx_v_out->strides[0])) != 0); if (__pyx_t_4) { /* "pandas/src/generated.pyx":4021 * * if (values.strides[0] == out.strides[0] and * values.strides[0] == sizeof(int64_t) and # <<<<<<<<<<<<<< * sizeof(int64_t) * n >= 256): * */ __pyx_t_2 = (((__pyx_v_values->strides[0]) == (sizeof(__pyx_t_5numpy_int64_t))) != 0); if (__pyx_t_2) { /* "pandas/src/generated.pyx":4022 * if (values.strides[0] == out.strides[0] and * values.strides[0] == sizeof(int64_t) and * sizeof(int64_t) * n >= 256): # <<<<<<<<<<<<<< * * for j from 0 <= j < k: */ __pyx_t_3 = ((((sizeof(__pyx_t_5numpy_int64_t)) * __pyx_v_n) >= 256) != 0); __pyx_t_6 = __pyx_t_3; } else { __pyx_t_6 = __pyx_t_2; } __pyx_t_2 = __pyx_t_6; } else { __pyx_t_2 = __pyx_t_4; } if (__pyx_t_2) { /* "pandas/src/generated.pyx":4024 * sizeof(int64_t) * n >= 256): * * for j from 0 <= j < k: # <<<<<<<<<<<<<< * idx = indexer[j] * if idx == -1: */ __pyx_t_1 = __pyx_v_k; for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_1; __pyx_v_j++) { /* "pandas/src/generated.pyx":4025 * * for j from 0 <= j < k: * idx = indexer[j] # <<<<<<<<<<<<<< * if idx == -1: * for i from 0 <= i < n: */ __pyx_t_7 = __pyx_v_j; __pyx_v_idx = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_7, __pyx_pybuffernd_indexer.diminfo[0].strides)); /* "pandas/src/generated.pyx":4026 * for j from 0 <= j < k: * idx = indexer[j] * if idx == -1: # <<<<<<<<<<<<<< * for i from 0 <= i < n: * out[i, j] = fv */ __pyx_t_2 = ((__pyx_v_idx == -1) != 0); if (__pyx_t_2) { /* "pandas/src/generated.pyx":4027 * idx = indexer[j] * if idx == -1: * for i from 0 <= i < n: # <<<<<<<<<<<<<< * out[i, j] = fv * else: */ __pyx_t_8 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_8; __pyx_v_i++) { /* "pandas/src/generated.pyx":4028 * if idx == -1: * for i from 0 <= i < n: * out[i, j] = fv # <<<<<<<<<<<<<< * else: * v = &values[0, idx] */ __pyx_t_9 = __pyx_v_i; __pyx_t_10 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_9, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_10, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_fv; } goto __pyx_L7; } /*else*/ { /* "pandas/src/generated.pyx":4030 * out[i, j] = fv * else: * v = &values[0, idx] # <<<<<<<<<<<<<< * o = &out[0, j] * memmove(o, v, (sizeof(int64_t) * n)) */ __pyx_t_11 = 0; __pyx_t_8 = __pyx_v_idx; __pyx_v_v = (&(*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_11, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_8, __pyx_pybuffernd_values.diminfo[1].strides))); /* "pandas/src/generated.pyx":4031 * else: * v = &values[0, idx] * o = &out[0, j] # <<<<<<<<<<<<<< * memmove(o, v, (sizeof(int64_t) * n)) * return */ __pyx_t_12 = 0; __pyx_t_13 = __pyx_v_j; __pyx_v_o = (&(*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_12, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_13, __pyx_pybuffernd_out.diminfo[1].strides))); /* "pandas/src/generated.pyx":4032 * v = &values[0, idx] * o = &out[0, j] * memmove(o, v, (sizeof(int64_t) * n)) # <<<<<<<<<<<<<< * return * */ memmove(__pyx_v_o, __pyx_v_v, ((size_t)((sizeof(__pyx_t_5numpy_int64_t)) * __pyx_v_n))); } __pyx_L7:; } /* "pandas/src/generated.pyx":4033 * o = &out[0, j] * memmove(o, v, (sizeof(int64_t) * n)) * return # <<<<<<<<<<<<<< * * for j from 0 <= j < k: */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; } /* "pandas/src/generated.pyx":4035 * return * * for j from 0 <= j < k: # <<<<<<<<<<<<<< * idx = indexer[j] * if idx == -1: */ __pyx_t_1 = __pyx_v_k; for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_1; __pyx_v_j++) { /* "pandas/src/generated.pyx":4036 * * for j from 0 <= j < k: * idx = indexer[j] # <<<<<<<<<<<<<< * if idx == -1: * for i from 0 <= i < n: */ __pyx_t_14 = __pyx_v_j; __pyx_v_idx = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_indexer.diminfo[0].strides)); /* "pandas/src/generated.pyx":4037 * for j from 0 <= j < k: * idx = indexer[j] * if idx == -1: # <<<<<<<<<<<<<< * for i from 0 <= i < n: * out[i, j] = fv */ __pyx_t_2 = ((__pyx_v_idx == -1) != 0); if (__pyx_t_2) { /* "pandas/src/generated.pyx":4038 * idx = indexer[j] * if idx == -1: * for i from 0 <= i < n: # <<<<<<<<<<<<<< * out[i, j] = fv * else: */ __pyx_t_15 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_15; __pyx_v_i++) { /* "pandas/src/generated.pyx":4039 * if idx == -1: * for i from 0 <= i < n: * out[i, j] = fv # <<<<<<<<<<<<<< * else: * for i from 0 <= i < n: */ __pyx_t_16 = __pyx_v_i; __pyx_t_17 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_17, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_fv; } goto __pyx_L12; } /*else*/ { /* "pandas/src/generated.pyx":4041 * out[i, j] = fv * else: * for i from 0 <= i < n: # <<<<<<<<<<<<<< * out[i, j] = values[i, idx] * */ __pyx_t_15 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_15; __pyx_v_i++) { /* "pandas/src/generated.pyx":4042 * else: * for i from 0 <= i < n: * out[i, j] = values[i, idx] # <<<<<<<<<<<<<< * * @cython.wraparound(False) */ __pyx_t_18 = __pyx_v_i; __pyx_t_19 = __pyx_v_idx; __pyx_t_20 = __pyx_v_i; __pyx_t_21 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_21, __pyx_pybuffernd_out.diminfo[1].strides) = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_19, __pyx_pybuffernd_values.diminfo[1].strides)); } } __pyx_L12:; } /* "pandas/src/generated.pyx":4000 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_axis1_int64_int64(ndarray[int64_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[int64_t, ndim=2] out, */ /* 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_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.take_2d_axis1_int64_int64", __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_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":4046 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_axis1_int64_float64(ndarray[int64_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[float64_t, ndim=2] out, */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_327take_2d_axis1_int64_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_327take_2d_axis1_int64_float64 = {__Pyx_NAMESTR("take_2d_axis1_int64_float64"), (PyCFunction)__pyx_pw_6pandas_5algos_327take_2d_axis1_int64_float64, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_327take_2d_axis1_int64_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_values = 0; PyArrayObject *__pyx_v_indexer = 0; PyArrayObject *__pyx_v_out = 0; PyObject *__pyx_v_fill_value = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("take_2d_axis1_int64_float64 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_values,&__pyx_n_s_indexer,&__pyx_n_s_out,&__pyx_n_s_fill_value,0}; PyObject* values[4] = {0,0,0,0}; values[3] = __pyx_k__153; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_values)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_indexer)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_2d_axis1_int64_float64", 0, 3, 4, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4046; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_out)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_2d_axis1_int64_float64", 0, 3, 4, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4046; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_fill_value); if (value) { values[3] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "take_2d_axis1_int64_float64") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4046; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_values = ((PyArrayObject *)values[0]); __pyx_v_indexer = ((PyArrayObject *)values[1]); __pyx_v_out = ((PyArrayObject *)values[2]); __pyx_v_fill_value = values[3]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("take_2d_axis1_int64_float64", 0, 3, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4046; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.take_2d_axis1_int64_float64", __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_filename = __pyx_f[2]; __pyx_lineno = 4046; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_indexer), __pyx_ptype_5numpy_ndarray, 1, "indexer", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4047; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_5numpy_ndarray, 1, "out", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4048; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_326take_2d_axis1_int64_float64(__pyx_self, __pyx_v_values, __pyx_v_indexer, __pyx_v_out, __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_5algos_326take_2d_axis1_int64_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_k; Py_ssize_t __pyx_v_n; Py_ssize_t __pyx_v_idx; __pyx_t_5numpy_float64_t __pyx_v_fv; __Pyx_LocalBuf_ND __pyx_pybuffernd_indexer; __Pyx_Buffer __pyx_pybuffer_indexer; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_values; __Pyx_Buffer __pyx_pybuffer_values; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; int __pyx_t_2; int __pyx_t_3; int __pyx_t_4; __pyx_t_5numpy_float64_t __pyx_t_5; Py_ssize_t __pyx_t_6; Py_ssize_t __pyx_t_7; Py_ssize_t __pyx_t_8; Py_ssize_t __pyx_t_9; Py_ssize_t __pyx_t_10; Py_ssize_t __pyx_t_11; Py_ssize_t __pyx_t_12; Py_ssize_t __pyx_t_13; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("take_2d_axis1_int64_float64", 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_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; { __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_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4046; __pyx_clineno = __LINE__; goto __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_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1]; { __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_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4046; __pyx_clineno = __LINE__; goto __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_BufFmt_StackElem __pyx_stack[1]; 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, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4046; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; __pyx_pybuffernd_out.diminfo[1].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_out.diminfo[1].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[1]; /* "pandas/src/generated.pyx":4054 * float64_t fv * * n = len(values) # <<<<<<<<<<<<<< * k = len(indexer) * */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4054; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/src/generated.pyx":4055 * * n = len(values) * k = len(indexer) # <<<<<<<<<<<<<< * * if n == 0 or k == 0: */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_indexer)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4055; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_k = __pyx_t_1; /* "pandas/src/generated.pyx":4057 * k = len(indexer) * * if n == 0 or k == 0: # <<<<<<<<<<<<<< * return * */ __pyx_t_2 = ((__pyx_v_n == 0) != 0); if (!__pyx_t_2) { __pyx_t_3 = ((__pyx_v_k == 0) != 0); __pyx_t_4 = __pyx_t_3; } else { __pyx_t_4 = __pyx_t_2; } if (__pyx_t_4) { /* "pandas/src/generated.pyx":4058 * * if n == 0 or k == 0: * return # <<<<<<<<<<<<<< * * fv = fill_value */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; } /* "pandas/src/generated.pyx":4060 * return * * fv = fill_value # <<<<<<<<<<<<<< * * IF False: */ __pyx_t_5 = __pyx_PyFloat_AsDouble(__pyx_v_fill_value); if (unlikely((__pyx_t_5 == (npy_float64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4060; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_fv = __pyx_t_5; /* "pandas/src/generated.pyx":4081 * return * * for j from 0 <= j < k: # <<<<<<<<<<<<<< * idx = indexer[j] * if idx == -1: */ __pyx_t_1 = __pyx_v_k; for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_1; __pyx_v_j++) { /* "pandas/src/generated.pyx":4082 * * for j from 0 <= j < k: * idx = indexer[j] # <<<<<<<<<<<<<< * if idx == -1: * for i from 0 <= i < n: */ __pyx_t_6 = __pyx_v_j; __pyx_v_idx = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_6, __pyx_pybuffernd_indexer.diminfo[0].strides)); /* "pandas/src/generated.pyx":4083 * for j from 0 <= j < k: * idx = indexer[j] * if idx == -1: # <<<<<<<<<<<<<< * for i from 0 <= i < n: * out[i, j] = fv */ __pyx_t_4 = ((__pyx_v_idx == -1) != 0); if (__pyx_t_4) { /* "pandas/src/generated.pyx":4084 * idx = indexer[j] * if idx == -1: * for i from 0 <= i < n: # <<<<<<<<<<<<<< * out[i, j] = fv * else: */ __pyx_t_7 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_7; __pyx_v_i++) { /* "pandas/src/generated.pyx":4085 * if idx == -1: * for i from 0 <= i < n: * out[i, j] = fv # <<<<<<<<<<<<<< * else: * for i from 0 <= i < n: */ __pyx_t_8 = __pyx_v_i; __pyx_t_9 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_8, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_9, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_fv; } goto __pyx_L6; } /*else*/ { /* "pandas/src/generated.pyx":4087 * out[i, j] = fv * else: * for i from 0 <= i < n: # <<<<<<<<<<<<<< * out[i, j] = values[i, idx] * */ __pyx_t_7 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_7; __pyx_v_i++) { /* "pandas/src/generated.pyx":4088 * else: * for i from 0 <= i < n: * out[i, j] = values[i, idx] # <<<<<<<<<<<<<< * * @cython.wraparound(False) */ __pyx_t_10 = __pyx_v_i; __pyx_t_11 = __pyx_v_idx; __pyx_t_12 = __pyx_v_i; __pyx_t_13 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_12, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_13, __pyx_pybuffernd_out.diminfo[1].strides) = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_10, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_11, __pyx_pybuffernd_values.diminfo[1].strides)); } } __pyx_L6:; } /* "pandas/src/generated.pyx":4046 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_axis1_int64_float64(ndarray[int64_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[float64_t, ndim=2] out, */ /* 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_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.take_2d_axis1_int64_float64", __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_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":4092 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_axis1_float32_float32(ndarray[float32_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[float32_t, ndim=2] out, */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_329take_2d_axis1_float32_float32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_329take_2d_axis1_float32_float32 = {__Pyx_NAMESTR("take_2d_axis1_float32_float32"), (PyCFunction)__pyx_pw_6pandas_5algos_329take_2d_axis1_float32_float32, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_329take_2d_axis1_float32_float32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_values = 0; PyArrayObject *__pyx_v_indexer = 0; PyArrayObject *__pyx_v_out = 0; PyObject *__pyx_v_fill_value = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("take_2d_axis1_float32_float32 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_values,&__pyx_n_s_indexer,&__pyx_n_s_out,&__pyx_n_s_fill_value,0}; PyObject* values[4] = {0,0,0,0}; values[3] = __pyx_k__154; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_values)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_indexer)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_2d_axis1_float32_float32", 0, 3, 4, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4092; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_out)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_2d_axis1_float32_float32", 0, 3, 4, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4092; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_fill_value); if (value) { values[3] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "take_2d_axis1_float32_float32") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4092; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_values = ((PyArrayObject *)values[0]); __pyx_v_indexer = ((PyArrayObject *)values[1]); __pyx_v_out = ((PyArrayObject *)values[2]); __pyx_v_fill_value = values[3]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("take_2d_axis1_float32_float32", 0, 3, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4092; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.take_2d_axis1_float32_float32", __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_filename = __pyx_f[2]; __pyx_lineno = 4092; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_indexer), __pyx_ptype_5numpy_ndarray, 1, "indexer", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4093; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_5numpy_ndarray, 1, "out", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4094; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_328take_2d_axis1_float32_float32(__pyx_self, __pyx_v_values, __pyx_v_indexer, __pyx_v_out, __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_5algos_328take_2d_axis1_float32_float32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_k; Py_ssize_t __pyx_v_n; Py_ssize_t __pyx_v_idx; __pyx_t_5numpy_float32_t __pyx_v_fv; __pyx_t_5numpy_float32_t *__pyx_v_v; __pyx_t_5numpy_float32_t *__pyx_v_o; __Pyx_LocalBuf_ND __pyx_pybuffernd_indexer; __Pyx_Buffer __pyx_pybuffer_indexer; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_values; __Pyx_Buffer __pyx_pybuffer_values; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; int __pyx_t_2; int __pyx_t_3; int __pyx_t_4; __pyx_t_5numpy_float32_t __pyx_t_5; int __pyx_t_6; Py_ssize_t __pyx_t_7; Py_ssize_t __pyx_t_8; Py_ssize_t __pyx_t_9; Py_ssize_t __pyx_t_10; long __pyx_t_11; long __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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("take_2d_axis1_float32_float32", 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_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; { __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_float32_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4092; __pyx_clineno = __LINE__; goto __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_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1]; { __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_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4092; __pyx_clineno = __LINE__; goto __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_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_v_out, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4092; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; __pyx_pybuffernd_out.diminfo[1].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_out.diminfo[1].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[1]; /* "pandas/src/generated.pyx":4100 * float32_t fv * * n = len(values) # <<<<<<<<<<<<<< * k = len(indexer) * */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4100; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/src/generated.pyx":4101 * * n = len(values) * k = len(indexer) # <<<<<<<<<<<<<< * * if n == 0 or k == 0: */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_indexer)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4101; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_k = __pyx_t_1; /* "pandas/src/generated.pyx":4103 * k = len(indexer) * * if n == 0 or k == 0: # <<<<<<<<<<<<<< * return * */ __pyx_t_2 = ((__pyx_v_n == 0) != 0); if (!__pyx_t_2) { __pyx_t_3 = ((__pyx_v_k == 0) != 0); __pyx_t_4 = __pyx_t_3; } else { __pyx_t_4 = __pyx_t_2; } if (__pyx_t_4) { /* "pandas/src/generated.pyx":4104 * * if n == 0 or k == 0: * return # <<<<<<<<<<<<<< * * fv = fill_value */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; } /* "pandas/src/generated.pyx":4106 * return * * fv = fill_value # <<<<<<<<<<<<<< * * IF True: */ __pyx_t_5 = __pyx_PyFloat_AsFloat(__pyx_v_fill_value); if (unlikely((__pyx_t_5 == (npy_float32)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4106; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_fv = __pyx_t_5; /* "pandas/src/generated.pyx":4112 * float32_t *v, *o * * if (values.strides[0] == out.strides[0] and # <<<<<<<<<<<<<< * values.strides[0] == sizeof(float32_t) and * sizeof(float32_t) * n >= 256): */ __pyx_t_4 = (((__pyx_v_values->strides[0]) == (__pyx_v_out->strides[0])) != 0); if (__pyx_t_4) { /* "pandas/src/generated.pyx":4113 * * if (values.strides[0] == out.strides[0] and * values.strides[0] == sizeof(float32_t) and # <<<<<<<<<<<<<< * sizeof(float32_t) * n >= 256): * */ __pyx_t_2 = (((__pyx_v_values->strides[0]) == (sizeof(__pyx_t_5numpy_float32_t))) != 0); if (__pyx_t_2) { /* "pandas/src/generated.pyx":4114 * if (values.strides[0] == out.strides[0] and * values.strides[0] == sizeof(float32_t) and * sizeof(float32_t) * n >= 256): # <<<<<<<<<<<<<< * * for j from 0 <= j < k: */ __pyx_t_3 = ((((sizeof(__pyx_t_5numpy_float32_t)) * __pyx_v_n) >= 256) != 0); __pyx_t_6 = __pyx_t_3; } else { __pyx_t_6 = __pyx_t_2; } __pyx_t_2 = __pyx_t_6; } else { __pyx_t_2 = __pyx_t_4; } if (__pyx_t_2) { /* "pandas/src/generated.pyx":4116 * sizeof(float32_t) * n >= 256): * * for j from 0 <= j < k: # <<<<<<<<<<<<<< * idx = indexer[j] * if idx == -1: */ __pyx_t_1 = __pyx_v_k; for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_1; __pyx_v_j++) { /* "pandas/src/generated.pyx":4117 * * for j from 0 <= j < k: * idx = indexer[j] # <<<<<<<<<<<<<< * if idx == -1: * for i from 0 <= i < n: */ __pyx_t_7 = __pyx_v_j; __pyx_v_idx = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_7, __pyx_pybuffernd_indexer.diminfo[0].strides)); /* "pandas/src/generated.pyx":4118 * for j from 0 <= j < k: * idx = indexer[j] * if idx == -1: # <<<<<<<<<<<<<< * for i from 0 <= i < n: * out[i, j] = fv */ __pyx_t_2 = ((__pyx_v_idx == -1) != 0); if (__pyx_t_2) { /* "pandas/src/generated.pyx":4119 * idx = indexer[j] * if idx == -1: * for i from 0 <= i < n: # <<<<<<<<<<<<<< * out[i, j] = fv * else: */ __pyx_t_8 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_8; __pyx_v_i++) { /* "pandas/src/generated.pyx":4120 * if idx == -1: * for i from 0 <= i < n: * out[i, j] = fv # <<<<<<<<<<<<<< * else: * v = &values[0, idx] */ __pyx_t_9 = __pyx_v_i; __pyx_t_10 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_9, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_10, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_fv; } goto __pyx_L7; } /*else*/ { /* "pandas/src/generated.pyx":4122 * out[i, j] = fv * else: * v = &values[0, idx] # <<<<<<<<<<<<<< * o = &out[0, j] * memmove(o, v, (sizeof(float32_t) * n)) */ __pyx_t_11 = 0; __pyx_t_8 = __pyx_v_idx; __pyx_v_v = (&(*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_11, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_8, __pyx_pybuffernd_values.diminfo[1].strides))); /* "pandas/src/generated.pyx":4123 * else: * v = &values[0, idx] * o = &out[0, j] # <<<<<<<<<<<<<< * memmove(o, v, (sizeof(float32_t) * n)) * return */ __pyx_t_12 = 0; __pyx_t_13 = __pyx_v_j; __pyx_v_o = (&(*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_12, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_13, __pyx_pybuffernd_out.diminfo[1].strides))); /* "pandas/src/generated.pyx":4124 * v = &values[0, idx] * o = &out[0, j] * memmove(o, v, (sizeof(float32_t) * n)) # <<<<<<<<<<<<<< * return * */ memmove(__pyx_v_o, __pyx_v_v, ((size_t)((sizeof(__pyx_t_5numpy_float32_t)) * __pyx_v_n))); } __pyx_L7:; } /* "pandas/src/generated.pyx":4125 * o = &out[0, j] * memmove(o, v, (sizeof(float32_t) * n)) * return # <<<<<<<<<<<<<< * * for j from 0 <= j < k: */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; } /* "pandas/src/generated.pyx":4127 * return * * for j from 0 <= j < k: # <<<<<<<<<<<<<< * idx = indexer[j] * if idx == -1: */ __pyx_t_1 = __pyx_v_k; for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_1; __pyx_v_j++) { /* "pandas/src/generated.pyx":4128 * * for j from 0 <= j < k: * idx = indexer[j] # <<<<<<<<<<<<<< * if idx == -1: * for i from 0 <= i < n: */ __pyx_t_14 = __pyx_v_j; __pyx_v_idx = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_indexer.diminfo[0].strides)); /* "pandas/src/generated.pyx":4129 * for j from 0 <= j < k: * idx = indexer[j] * if idx == -1: # <<<<<<<<<<<<<< * for i from 0 <= i < n: * out[i, j] = fv */ __pyx_t_2 = ((__pyx_v_idx == -1) != 0); if (__pyx_t_2) { /* "pandas/src/generated.pyx":4130 * idx = indexer[j] * if idx == -1: * for i from 0 <= i < n: # <<<<<<<<<<<<<< * out[i, j] = fv * else: */ __pyx_t_15 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_15; __pyx_v_i++) { /* "pandas/src/generated.pyx":4131 * if idx == -1: * for i from 0 <= i < n: * out[i, j] = fv # <<<<<<<<<<<<<< * else: * for i from 0 <= i < n: */ __pyx_t_16 = __pyx_v_i; __pyx_t_17 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_17, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_fv; } goto __pyx_L12; } /*else*/ { /* "pandas/src/generated.pyx":4133 * out[i, j] = fv * else: * for i from 0 <= i < n: # <<<<<<<<<<<<<< * out[i, j] = values[i, idx] * */ __pyx_t_15 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_15; __pyx_v_i++) { /* "pandas/src/generated.pyx":4134 * else: * for i from 0 <= i < n: * out[i, j] = values[i, idx] # <<<<<<<<<<<<<< * * @cython.wraparound(False) */ __pyx_t_18 = __pyx_v_i; __pyx_t_19 = __pyx_v_idx; __pyx_t_20 = __pyx_v_i; __pyx_t_21 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_21, __pyx_pybuffernd_out.diminfo[1].strides) = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_19, __pyx_pybuffernd_values.diminfo[1].strides)); } } __pyx_L12:; } /* "pandas/src/generated.pyx":4092 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_axis1_float32_float32(ndarray[float32_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[float32_t, ndim=2] out, */ /* 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_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.take_2d_axis1_float32_float32", __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_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":4138 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_axis1_float32_float64(ndarray[float32_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[float64_t, ndim=2] out, */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_331take_2d_axis1_float32_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_331take_2d_axis1_float32_float64 = {__Pyx_NAMESTR("take_2d_axis1_float32_float64"), (PyCFunction)__pyx_pw_6pandas_5algos_331take_2d_axis1_float32_float64, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_331take_2d_axis1_float32_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_values = 0; PyArrayObject *__pyx_v_indexer = 0; PyArrayObject *__pyx_v_out = 0; PyObject *__pyx_v_fill_value = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("take_2d_axis1_float32_float64 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_values,&__pyx_n_s_indexer,&__pyx_n_s_out,&__pyx_n_s_fill_value,0}; PyObject* values[4] = {0,0,0,0}; values[3] = __pyx_k__155; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_values)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_indexer)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_2d_axis1_float32_float64", 0, 3, 4, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4138; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_out)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_2d_axis1_float32_float64", 0, 3, 4, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4138; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_fill_value); if (value) { values[3] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "take_2d_axis1_float32_float64") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4138; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_values = ((PyArrayObject *)values[0]); __pyx_v_indexer = ((PyArrayObject *)values[1]); __pyx_v_out = ((PyArrayObject *)values[2]); __pyx_v_fill_value = values[3]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("take_2d_axis1_float32_float64", 0, 3, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4138; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.take_2d_axis1_float32_float64", __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_filename = __pyx_f[2]; __pyx_lineno = 4138; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_indexer), __pyx_ptype_5numpy_ndarray, 1, "indexer", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4139; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_5numpy_ndarray, 1, "out", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4140; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_330take_2d_axis1_float32_float64(__pyx_self, __pyx_v_values, __pyx_v_indexer, __pyx_v_out, __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_5algos_330take_2d_axis1_float32_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_k; Py_ssize_t __pyx_v_n; Py_ssize_t __pyx_v_idx; __pyx_t_5numpy_float64_t __pyx_v_fv; __Pyx_LocalBuf_ND __pyx_pybuffernd_indexer; __Pyx_Buffer __pyx_pybuffer_indexer; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_values; __Pyx_Buffer __pyx_pybuffer_values; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; int __pyx_t_2; int __pyx_t_3; int __pyx_t_4; __pyx_t_5numpy_float64_t __pyx_t_5; Py_ssize_t __pyx_t_6; Py_ssize_t __pyx_t_7; Py_ssize_t __pyx_t_8; Py_ssize_t __pyx_t_9; Py_ssize_t __pyx_t_10; Py_ssize_t __pyx_t_11; Py_ssize_t __pyx_t_12; Py_ssize_t __pyx_t_13; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("take_2d_axis1_float32_float64", 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_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; { __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_float32_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4138; __pyx_clineno = __LINE__; goto __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_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1]; { __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_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4138; __pyx_clineno = __LINE__; goto __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_BufFmt_StackElem __pyx_stack[1]; 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, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4138; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; __pyx_pybuffernd_out.diminfo[1].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_out.diminfo[1].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[1]; /* "pandas/src/generated.pyx":4146 * float64_t fv * * n = len(values) # <<<<<<<<<<<<<< * k = len(indexer) * */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4146; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/src/generated.pyx":4147 * * n = len(values) * k = len(indexer) # <<<<<<<<<<<<<< * * if n == 0 or k == 0: */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_indexer)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4147; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_k = __pyx_t_1; /* "pandas/src/generated.pyx":4149 * k = len(indexer) * * if n == 0 or k == 0: # <<<<<<<<<<<<<< * return * */ __pyx_t_2 = ((__pyx_v_n == 0) != 0); if (!__pyx_t_2) { __pyx_t_3 = ((__pyx_v_k == 0) != 0); __pyx_t_4 = __pyx_t_3; } else { __pyx_t_4 = __pyx_t_2; } if (__pyx_t_4) { /* "pandas/src/generated.pyx":4150 * * if n == 0 or k == 0: * return # <<<<<<<<<<<<<< * * fv = fill_value */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; } /* "pandas/src/generated.pyx":4152 * return * * fv = fill_value # <<<<<<<<<<<<<< * * IF False: */ __pyx_t_5 = __pyx_PyFloat_AsDouble(__pyx_v_fill_value); if (unlikely((__pyx_t_5 == (npy_float64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4152; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_fv = __pyx_t_5; /* "pandas/src/generated.pyx":4173 * return * * for j from 0 <= j < k: # <<<<<<<<<<<<<< * idx = indexer[j] * if idx == -1: */ __pyx_t_1 = __pyx_v_k; for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_1; __pyx_v_j++) { /* "pandas/src/generated.pyx":4174 * * for j from 0 <= j < k: * idx = indexer[j] # <<<<<<<<<<<<<< * if idx == -1: * for i from 0 <= i < n: */ __pyx_t_6 = __pyx_v_j; __pyx_v_idx = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_6, __pyx_pybuffernd_indexer.diminfo[0].strides)); /* "pandas/src/generated.pyx":4175 * for j from 0 <= j < k: * idx = indexer[j] * if idx == -1: # <<<<<<<<<<<<<< * for i from 0 <= i < n: * out[i, j] = fv */ __pyx_t_4 = ((__pyx_v_idx == -1) != 0); if (__pyx_t_4) { /* "pandas/src/generated.pyx":4176 * idx = indexer[j] * if idx == -1: * for i from 0 <= i < n: # <<<<<<<<<<<<<< * out[i, j] = fv * else: */ __pyx_t_7 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_7; __pyx_v_i++) { /* "pandas/src/generated.pyx":4177 * if idx == -1: * for i from 0 <= i < n: * out[i, j] = fv # <<<<<<<<<<<<<< * else: * for i from 0 <= i < n: */ __pyx_t_8 = __pyx_v_i; __pyx_t_9 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_8, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_9, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_fv; } goto __pyx_L6; } /*else*/ { /* "pandas/src/generated.pyx":4179 * out[i, j] = fv * else: * for i from 0 <= i < n: # <<<<<<<<<<<<<< * out[i, j] = values[i, idx] * */ __pyx_t_7 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_7; __pyx_v_i++) { /* "pandas/src/generated.pyx":4180 * else: * for i from 0 <= i < n: * out[i, j] = values[i, idx] # <<<<<<<<<<<<<< * * @cython.wraparound(False) */ __pyx_t_10 = __pyx_v_i; __pyx_t_11 = __pyx_v_idx; __pyx_t_12 = __pyx_v_i; __pyx_t_13 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_12, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_13, __pyx_pybuffernd_out.diminfo[1].strides) = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_10, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_11, __pyx_pybuffernd_values.diminfo[1].strides)); } } __pyx_L6:; } /* "pandas/src/generated.pyx":4138 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_axis1_float32_float64(ndarray[float32_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[float64_t, ndim=2] out, */ /* 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_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.take_2d_axis1_float32_float64", __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_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":4184 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_axis1_float64_float64(ndarray[float64_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[float64_t, ndim=2] out, */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_333take_2d_axis1_float64_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_333take_2d_axis1_float64_float64 = {__Pyx_NAMESTR("take_2d_axis1_float64_float64"), (PyCFunction)__pyx_pw_6pandas_5algos_333take_2d_axis1_float64_float64, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_333take_2d_axis1_float64_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_values = 0; PyArrayObject *__pyx_v_indexer = 0; PyArrayObject *__pyx_v_out = 0; PyObject *__pyx_v_fill_value = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("take_2d_axis1_float64_float64 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_values,&__pyx_n_s_indexer,&__pyx_n_s_out,&__pyx_n_s_fill_value,0}; PyObject* values[4] = {0,0,0,0}; values[3] = __pyx_k__156; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_values)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_indexer)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_2d_axis1_float64_float64", 0, 3, 4, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4184; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_out)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_2d_axis1_float64_float64", 0, 3, 4, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4184; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_fill_value); if (value) { values[3] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "take_2d_axis1_float64_float64") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4184; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_values = ((PyArrayObject *)values[0]); __pyx_v_indexer = ((PyArrayObject *)values[1]); __pyx_v_out = ((PyArrayObject *)values[2]); __pyx_v_fill_value = values[3]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("take_2d_axis1_float64_float64", 0, 3, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4184; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.take_2d_axis1_float64_float64", __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_filename = __pyx_f[2]; __pyx_lineno = 4184; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_indexer), __pyx_ptype_5numpy_ndarray, 1, "indexer", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4185; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_5numpy_ndarray, 1, "out", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4186; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_332take_2d_axis1_float64_float64(__pyx_self, __pyx_v_values, __pyx_v_indexer, __pyx_v_out, __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_5algos_332take_2d_axis1_float64_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_k; Py_ssize_t __pyx_v_n; Py_ssize_t __pyx_v_idx; __pyx_t_5numpy_float64_t __pyx_v_fv; __pyx_t_5numpy_float64_t *__pyx_v_v; __pyx_t_5numpy_float64_t *__pyx_v_o; __Pyx_LocalBuf_ND __pyx_pybuffernd_indexer; __Pyx_Buffer __pyx_pybuffer_indexer; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_values; __Pyx_Buffer __pyx_pybuffer_values; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; int __pyx_t_2; int __pyx_t_3; int __pyx_t_4; __pyx_t_5numpy_float64_t __pyx_t_5; int __pyx_t_6; Py_ssize_t __pyx_t_7; Py_ssize_t __pyx_t_8; Py_ssize_t __pyx_t_9; Py_ssize_t __pyx_t_10; long __pyx_t_11; long __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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("take_2d_axis1_float64_float64", 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_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; { __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, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4184; __pyx_clineno = __LINE__; goto __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_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1]; { __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_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4184; __pyx_clineno = __LINE__; goto __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_BufFmt_StackElem __pyx_stack[1]; 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, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4184; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; __pyx_pybuffernd_out.diminfo[1].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_out.diminfo[1].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[1]; /* "pandas/src/generated.pyx":4192 * float64_t fv * * n = len(values) # <<<<<<<<<<<<<< * k = len(indexer) * */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4192; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/src/generated.pyx":4193 * * n = len(values) * k = len(indexer) # <<<<<<<<<<<<<< * * if n == 0 or k == 0: */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_indexer)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4193; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_k = __pyx_t_1; /* "pandas/src/generated.pyx":4195 * k = len(indexer) * * if n == 0 or k == 0: # <<<<<<<<<<<<<< * return * */ __pyx_t_2 = ((__pyx_v_n == 0) != 0); if (!__pyx_t_2) { __pyx_t_3 = ((__pyx_v_k == 0) != 0); __pyx_t_4 = __pyx_t_3; } else { __pyx_t_4 = __pyx_t_2; } if (__pyx_t_4) { /* "pandas/src/generated.pyx":4196 * * if n == 0 or k == 0: * return # <<<<<<<<<<<<<< * * fv = fill_value */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; } /* "pandas/src/generated.pyx":4198 * return * * fv = fill_value # <<<<<<<<<<<<<< * * IF True: */ __pyx_t_5 = __pyx_PyFloat_AsDouble(__pyx_v_fill_value); if (unlikely((__pyx_t_5 == (npy_float64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4198; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_fv = __pyx_t_5; /* "pandas/src/generated.pyx":4204 * float64_t *v, *o * * if (values.strides[0] == out.strides[0] and # <<<<<<<<<<<<<< * values.strides[0] == sizeof(float64_t) and * sizeof(float64_t) * n >= 256): */ __pyx_t_4 = (((__pyx_v_values->strides[0]) == (__pyx_v_out->strides[0])) != 0); if (__pyx_t_4) { /* "pandas/src/generated.pyx":4205 * * if (values.strides[0] == out.strides[0] and * values.strides[0] == sizeof(float64_t) and # <<<<<<<<<<<<<< * sizeof(float64_t) * n >= 256): * */ __pyx_t_2 = (((__pyx_v_values->strides[0]) == (sizeof(__pyx_t_5numpy_float64_t))) != 0); if (__pyx_t_2) { /* "pandas/src/generated.pyx":4206 * if (values.strides[0] == out.strides[0] and * values.strides[0] == sizeof(float64_t) and * sizeof(float64_t) * n >= 256): # <<<<<<<<<<<<<< * * for j from 0 <= j < k: */ __pyx_t_3 = ((((sizeof(__pyx_t_5numpy_float64_t)) * __pyx_v_n) >= 256) != 0); __pyx_t_6 = __pyx_t_3; } else { __pyx_t_6 = __pyx_t_2; } __pyx_t_2 = __pyx_t_6; } else { __pyx_t_2 = __pyx_t_4; } if (__pyx_t_2) { /* "pandas/src/generated.pyx":4208 * sizeof(float64_t) * n >= 256): * * for j from 0 <= j < k: # <<<<<<<<<<<<<< * idx = indexer[j] * if idx == -1: */ __pyx_t_1 = __pyx_v_k; for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_1; __pyx_v_j++) { /* "pandas/src/generated.pyx":4209 * * for j from 0 <= j < k: * idx = indexer[j] # <<<<<<<<<<<<<< * if idx == -1: * for i from 0 <= i < n: */ __pyx_t_7 = __pyx_v_j; __pyx_v_idx = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_7, __pyx_pybuffernd_indexer.diminfo[0].strides)); /* "pandas/src/generated.pyx":4210 * for j from 0 <= j < k: * idx = indexer[j] * if idx == -1: # <<<<<<<<<<<<<< * for i from 0 <= i < n: * out[i, j] = fv */ __pyx_t_2 = ((__pyx_v_idx == -1) != 0); if (__pyx_t_2) { /* "pandas/src/generated.pyx":4211 * idx = indexer[j] * if idx == -1: * for i from 0 <= i < n: # <<<<<<<<<<<<<< * out[i, j] = fv * else: */ __pyx_t_8 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_8; __pyx_v_i++) { /* "pandas/src/generated.pyx":4212 * if idx == -1: * for i from 0 <= i < n: * out[i, j] = fv # <<<<<<<<<<<<<< * else: * v = &values[0, idx] */ __pyx_t_9 = __pyx_v_i; __pyx_t_10 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_9, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_10, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_fv; } goto __pyx_L7; } /*else*/ { /* "pandas/src/generated.pyx":4214 * out[i, j] = fv * else: * v = &values[0, idx] # <<<<<<<<<<<<<< * o = &out[0, j] * memmove(o, v, (sizeof(float64_t) * n)) */ __pyx_t_11 = 0; __pyx_t_8 = __pyx_v_idx; __pyx_v_v = (&(*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_11, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_8, __pyx_pybuffernd_values.diminfo[1].strides))); /* "pandas/src/generated.pyx":4215 * else: * v = &values[0, idx] * o = &out[0, j] # <<<<<<<<<<<<<< * memmove(o, v, (sizeof(float64_t) * n)) * return */ __pyx_t_12 = 0; __pyx_t_13 = __pyx_v_j; __pyx_v_o = (&(*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_12, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_13, __pyx_pybuffernd_out.diminfo[1].strides))); /* "pandas/src/generated.pyx":4216 * v = &values[0, idx] * o = &out[0, j] * memmove(o, v, (sizeof(float64_t) * n)) # <<<<<<<<<<<<<< * return * */ memmove(__pyx_v_o, __pyx_v_v, ((size_t)((sizeof(__pyx_t_5numpy_float64_t)) * __pyx_v_n))); } __pyx_L7:; } /* "pandas/src/generated.pyx":4217 * o = &out[0, j] * memmove(o, v, (sizeof(float64_t) * n)) * return # <<<<<<<<<<<<<< * * for j from 0 <= j < k: */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; } /* "pandas/src/generated.pyx":4219 * return * * for j from 0 <= j < k: # <<<<<<<<<<<<<< * idx = indexer[j] * if idx == -1: */ __pyx_t_1 = __pyx_v_k; for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_1; __pyx_v_j++) { /* "pandas/src/generated.pyx":4220 * * for j from 0 <= j < k: * idx = indexer[j] # <<<<<<<<<<<<<< * if idx == -1: * for i from 0 <= i < n: */ __pyx_t_14 = __pyx_v_j; __pyx_v_idx = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_indexer.diminfo[0].strides)); /* "pandas/src/generated.pyx":4221 * for j from 0 <= j < k: * idx = indexer[j] * if idx == -1: # <<<<<<<<<<<<<< * for i from 0 <= i < n: * out[i, j] = fv */ __pyx_t_2 = ((__pyx_v_idx == -1) != 0); if (__pyx_t_2) { /* "pandas/src/generated.pyx":4222 * idx = indexer[j] * if idx == -1: * for i from 0 <= i < n: # <<<<<<<<<<<<<< * out[i, j] = fv * else: */ __pyx_t_15 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_15; __pyx_v_i++) { /* "pandas/src/generated.pyx":4223 * if idx == -1: * for i from 0 <= i < n: * out[i, j] = fv # <<<<<<<<<<<<<< * else: * for i from 0 <= i < n: */ __pyx_t_16 = __pyx_v_i; __pyx_t_17 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_17, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_fv; } goto __pyx_L12; } /*else*/ { /* "pandas/src/generated.pyx":4225 * out[i, j] = fv * else: * for i from 0 <= i < n: # <<<<<<<<<<<<<< * out[i, j] = values[i, idx] * */ __pyx_t_15 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_15; __pyx_v_i++) { /* "pandas/src/generated.pyx":4226 * else: * for i from 0 <= i < n: * out[i, j] = values[i, idx] # <<<<<<<<<<<<<< * * @cython.wraparound(False) */ __pyx_t_18 = __pyx_v_i; __pyx_t_19 = __pyx_v_idx; __pyx_t_20 = __pyx_v_i; __pyx_t_21 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_21, __pyx_pybuffernd_out.diminfo[1].strides) = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_19, __pyx_pybuffernd_values.diminfo[1].strides)); } } __pyx_L12:; } /* "pandas/src/generated.pyx":4184 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_axis1_float64_float64(ndarray[float64_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[float64_t, ndim=2] out, */ /* 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_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.take_2d_axis1_float64_float64", __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_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":4230 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_axis1_object_object(ndarray[object, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[object, ndim=2] out, */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_335take_2d_axis1_object_object(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_335take_2d_axis1_object_object = {__Pyx_NAMESTR("take_2d_axis1_object_object"), (PyCFunction)__pyx_pw_6pandas_5algos_335take_2d_axis1_object_object, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_335take_2d_axis1_object_object(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_values = 0; PyArrayObject *__pyx_v_indexer = 0; PyArrayObject *__pyx_v_out = 0; PyObject *__pyx_v_fill_value = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("take_2d_axis1_object_object (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_values,&__pyx_n_s_indexer,&__pyx_n_s_out,&__pyx_n_s_fill_value,0}; PyObject* values[4] = {0,0,0,0}; values[3] = __pyx_k__157; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_values)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_indexer)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_2d_axis1_object_object", 0, 3, 4, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4230; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_out)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_2d_axis1_object_object", 0, 3, 4, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4230; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_fill_value); if (value) { values[3] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "take_2d_axis1_object_object") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4230; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_values = ((PyArrayObject *)values[0]); __pyx_v_indexer = ((PyArrayObject *)values[1]); __pyx_v_out = ((PyArrayObject *)values[2]); __pyx_v_fill_value = values[3]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("take_2d_axis1_object_object", 0, 3, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4230; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.take_2d_axis1_object_object", __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_filename = __pyx_f[2]; __pyx_lineno = 4230; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_indexer), __pyx_ptype_5numpy_ndarray, 1, "indexer", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4231; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_5numpy_ndarray, 1, "out", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4232; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_334take_2d_axis1_object_object(__pyx_self, __pyx_v_values, __pyx_v_indexer, __pyx_v_out, __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_5algos_334take_2d_axis1_object_object(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_k; Py_ssize_t __pyx_v_n; Py_ssize_t __pyx_v_idx; PyObject *__pyx_v_fv = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_indexer; __Pyx_Buffer __pyx_pybuffer_indexer; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_values; __Pyx_Buffer __pyx_pybuffer_values; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; int __pyx_t_2; int __pyx_t_3; int __pyx_t_4; Py_ssize_t __pyx_t_5; Py_ssize_t __pyx_t_6; Py_ssize_t __pyx_t_7; Py_ssize_t __pyx_t_8; PyObject **__pyx_t_9; PyObject *__pyx_t_10 = NULL; Py_ssize_t __pyx_t_11; Py_ssize_t __pyx_t_12; Py_ssize_t __pyx_t_13; Py_ssize_t __pyx_t_14; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("take_2d_axis1_object_object", 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_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; { __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, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4230; __pyx_clineno = __LINE__; goto __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_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1]; { __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_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4230; __pyx_clineno = __LINE__; goto __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_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_v_out, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4230; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; __pyx_pybuffernd_out.diminfo[1].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_out.diminfo[1].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[1]; /* "pandas/src/generated.pyx":4238 * object fv * * n = len(values) # <<<<<<<<<<<<<< * k = len(indexer) * */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4238; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/src/generated.pyx":4239 * * n = len(values) * k = len(indexer) # <<<<<<<<<<<<<< * * if n == 0 or k == 0: */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_indexer)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4239; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_k = __pyx_t_1; /* "pandas/src/generated.pyx":4241 * k = len(indexer) * * if n == 0 or k == 0: # <<<<<<<<<<<<<< * return * */ __pyx_t_2 = ((__pyx_v_n == 0) != 0); if (!__pyx_t_2) { __pyx_t_3 = ((__pyx_v_k == 0) != 0); __pyx_t_4 = __pyx_t_3; } else { __pyx_t_4 = __pyx_t_2; } if (__pyx_t_4) { /* "pandas/src/generated.pyx":4242 * * if n == 0 or k == 0: * return # <<<<<<<<<<<<<< * * fv = fill_value */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; } /* "pandas/src/generated.pyx":4244 * return * * fv = fill_value # <<<<<<<<<<<<<< * * IF False: */ __Pyx_INCREF(__pyx_v_fill_value); __pyx_v_fv = __pyx_v_fill_value; /* "pandas/src/generated.pyx":4265 * return * * for j from 0 <= j < k: # <<<<<<<<<<<<<< * idx = indexer[j] * if idx == -1: */ __pyx_t_1 = __pyx_v_k; for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_1; __pyx_v_j++) { /* "pandas/src/generated.pyx":4266 * * for j from 0 <= j < k: * idx = indexer[j] # <<<<<<<<<<<<<< * if idx == -1: * for i from 0 <= i < n: */ __pyx_t_5 = __pyx_v_j; __pyx_v_idx = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_5, __pyx_pybuffernd_indexer.diminfo[0].strides)); /* "pandas/src/generated.pyx":4267 * for j from 0 <= j < k: * idx = indexer[j] * if idx == -1: # <<<<<<<<<<<<<< * for i from 0 <= i < n: * out[i, j] = fv */ __pyx_t_4 = ((__pyx_v_idx == -1) != 0); if (__pyx_t_4) { /* "pandas/src/generated.pyx":4268 * idx = indexer[j] * if idx == -1: * for i from 0 <= i < n: # <<<<<<<<<<<<<< * out[i, j] = fv * else: */ __pyx_t_6 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_6; __pyx_v_i++) { /* "pandas/src/generated.pyx":4269 * if idx == -1: * for i from 0 <= i < n: * out[i, j] = fv # <<<<<<<<<<<<<< * else: * for i from 0 <= i < n: */ __pyx_t_7 = __pyx_v_i; __pyx_t_8 = __pyx_v_j; __pyx_t_9 = __Pyx_BufPtrStrided2d(PyObject **, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_7, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_8, __pyx_pybuffernd_out.diminfo[1].strides); __Pyx_GOTREF(*__pyx_t_9); __Pyx_INCREF(__pyx_v_fv); __Pyx_DECREF(*__pyx_t_9); *__pyx_t_9 = __pyx_v_fv; __Pyx_GIVEREF(*__pyx_t_9); } goto __pyx_L6; } /*else*/ { /* "pandas/src/generated.pyx":4271 * out[i, j] = fv * else: * for i from 0 <= i < n: # <<<<<<<<<<<<<< * out[i, j] = values[i, idx] * */ __pyx_t_6 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_6; __pyx_v_i++) { /* "pandas/src/generated.pyx":4272 * else: * for i from 0 <= i < n: * out[i, j] = values[i, idx] # <<<<<<<<<<<<<< * * */ __pyx_t_11 = __pyx_v_i; __pyx_t_12 = __pyx_v_idx; __pyx_t_10 = (PyObject *) *__Pyx_BufPtrStrided2d(PyObject **, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_11, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_12, __pyx_pybuffernd_values.diminfo[1].strides); __Pyx_INCREF((PyObject*)__pyx_t_10); __pyx_t_13 = __pyx_v_i; __pyx_t_14 = __pyx_v_j; __pyx_t_9 = __Pyx_BufPtrStrided2d(PyObject **, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_14, __pyx_pybuffernd_out.diminfo[1].strides); __Pyx_GOTREF(*__pyx_t_9); __Pyx_INCREF(__pyx_t_10); __Pyx_DECREF(*__pyx_t_9); *__pyx_t_9 = __pyx_t_10; __Pyx_GIVEREF(*__pyx_t_9); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; } } __pyx_L6:; } /* "pandas/src/generated.pyx":4230 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_axis1_object_object(ndarray[object, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[object, ndim=2] out, */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_10); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.take_2d_axis1_object_object", __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_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF(__pyx_v_fv); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":4277 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_multi_bool_bool(ndarray[uint8_t, ndim=2] values, # <<<<<<<<<<<<<< * indexer, * ndarray[uint8_t, ndim=2] out, */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_337take_2d_multi_bool_bool(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_337take_2d_multi_bool_bool = {__Pyx_NAMESTR("take_2d_multi_bool_bool"), (PyCFunction)__pyx_pw_6pandas_5algos_337take_2d_multi_bool_bool, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_337take_2d_multi_bool_bool(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_values = 0; PyObject *__pyx_v_indexer = 0; PyArrayObject *__pyx_v_out = 0; PyObject *__pyx_v_fill_value = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("take_2d_multi_bool_bool (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_values,&__pyx_n_s_indexer,&__pyx_n_s_out,&__pyx_n_s_fill_value,0}; PyObject* values[4] = {0,0,0,0}; values[3] = __pyx_k__158; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_values)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_indexer)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_2d_multi_bool_bool", 0, 3, 4, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4277; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_out)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_2d_multi_bool_bool", 0, 3, 4, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4277; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_fill_value); if (value) { values[3] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "take_2d_multi_bool_bool") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4277; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_values = ((PyArrayObject *)values[0]); __pyx_v_indexer = values[1]; __pyx_v_out = ((PyArrayObject *)values[2]); __pyx_v_fill_value = values[3]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("take_2d_multi_bool_bool", 0, 3, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4277; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.take_2d_multi_bool_bool", __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_filename = __pyx_f[2]; __pyx_lineno = 4277; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_5numpy_ndarray, 1, "out", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4279; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_336take_2d_multi_bool_bool(__pyx_self, __pyx_v_values, __pyx_v_indexer, __pyx_v_out, __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_5algos_336take_2d_multi_bool_bool(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_k; Py_ssize_t __pyx_v_n; Py_ssize_t __pyx_v_idx; PyArrayObject *__pyx_v_idx0 = 0; PyArrayObject *__pyx_v_idx1 = 0; __pyx_t_5numpy_uint8_t __pyx_v_fv; __Pyx_LocalBuf_ND __pyx_pybuffernd_idx0; __Pyx_Buffer __pyx_pybuffer_idx0; __Pyx_LocalBuf_ND __pyx_pybuffernd_idx1; __Pyx_Buffer __pyx_pybuffer_idx1; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_values; __Pyx_Buffer __pyx_pybuffer_values; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyArrayObject *__pyx_t_2 = NULL; PyArrayObject *__pyx_t_3 = NULL; Py_ssize_t __pyx_t_4; __pyx_t_5numpy_uint8_t __pyx_t_5; Py_ssize_t __pyx_t_6; int __pyx_t_7; Py_ssize_t __pyx_t_8; Py_ssize_t __pyx_t_9; Py_ssize_t __pyx_t_10; Py_ssize_t __pyx_t_11; Py_ssize_t __pyx_t_12; Py_ssize_t __pyx_t_13; Py_ssize_t __pyx_t_14; Py_ssize_t __pyx_t_15; __pyx_t_5numpy_int64_t __pyx_t_16; Py_ssize_t __pyx_t_17; Py_ssize_t __pyx_t_18; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("take_2d_multi_bool_bool", 0); __pyx_pybuffer_idx0.pybuffer.buf = NULL; __pyx_pybuffer_idx0.refcount = 0; __pyx_pybuffernd_idx0.data = NULL; __pyx_pybuffernd_idx0.rcbuffer = &__pyx_pybuffer_idx0; __pyx_pybuffer_idx1.pybuffer.buf = NULL; __pyx_pybuffer_idx1.refcount = 0; __pyx_pybuffernd_idx1.data = NULL; __pyx_pybuffernd_idx1.rcbuffer = &__pyx_pybuffer_idx1; __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_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; { __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_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4277; __pyx_clineno = __LINE__; goto __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_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; 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, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4277; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; __pyx_pybuffernd_out.diminfo[1].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_out.diminfo[1].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[1]; /* "pandas/src/generated.pyx":4283 * cdef: * Py_ssize_t i, j, k, n, idx * ndarray[int64_t] idx0 = indexer[0] # <<<<<<<<<<<<<< * ndarray[int64_t] idx1 = indexer[1] * uint8_t fv */ __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_indexer, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4283; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 4283; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_2 = ((PyArrayObject *)__pyx_t_1); { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_idx0.rcbuffer->pybuffer, (PyObject*)__pyx_t_2, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { __pyx_v_idx0 = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_idx0.rcbuffer->pybuffer.buf = NULL; {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4283; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } else {__pyx_pybuffernd_idx0.diminfo[0].strides = __pyx_pybuffernd_idx0.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_idx0.diminfo[0].shape = __pyx_pybuffernd_idx0.rcbuffer->pybuffer.shape[0]; } } __pyx_t_2 = 0; __pyx_v_idx0 = ((PyArrayObject *)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/generated.pyx":4284 * Py_ssize_t i, j, k, n, idx * ndarray[int64_t] idx0 = indexer[0] * ndarray[int64_t] idx1 = indexer[1] # <<<<<<<<<<<<<< * uint8_t fv * */ __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_indexer, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4284; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 4284; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_3 = ((PyArrayObject *)__pyx_t_1); { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_idx1.rcbuffer->pybuffer, (PyObject*)__pyx_t_3, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { __pyx_v_idx1 = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_idx1.rcbuffer->pybuffer.buf = NULL; {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4284; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } else {__pyx_pybuffernd_idx1.diminfo[0].strides = __pyx_pybuffernd_idx1.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_idx1.diminfo[0].shape = __pyx_pybuffernd_idx1.rcbuffer->pybuffer.shape[0]; } } __pyx_t_3 = 0; __pyx_v_idx1 = ((PyArrayObject *)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/generated.pyx":4287 * uint8_t fv * * n = len(idx0) # <<<<<<<<<<<<<< * k = len(idx1) * */ __pyx_t_4 = PyObject_Length(((PyObject *)__pyx_v_idx0)); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4287; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_4; /* "pandas/src/generated.pyx":4288 * * n = len(idx0) * k = len(idx1) # <<<<<<<<<<<<<< * * fv = fill_value */ __pyx_t_4 = PyObject_Length(((PyObject *)__pyx_v_idx1)); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4288; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_k = __pyx_t_4; /* "pandas/src/generated.pyx":4290 * k = len(idx1) * * fv = fill_value # <<<<<<<<<<<<<< * for i from 0 <= i < n: * idx = idx0[i] */ __pyx_t_5 = __Pyx_PyInt_As_npy_uint8(__pyx_v_fill_value); if (unlikely((__pyx_t_5 == (npy_uint8)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4290; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_fv = __pyx_t_5; /* "pandas/src/generated.pyx":4291 * * fv = fill_value * for i from 0 <= i < n: # <<<<<<<<<<<<<< * idx = idx0[i] * if idx == -1: */ __pyx_t_4 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_4; __pyx_v_i++) { /* "pandas/src/generated.pyx":4292 * fv = fill_value * for i from 0 <= i < n: * idx = idx0[i] # <<<<<<<<<<<<<< * if idx == -1: * for j from 0 <= j < k: */ __pyx_t_6 = __pyx_v_i; __pyx_v_idx = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_idx0.rcbuffer->pybuffer.buf, __pyx_t_6, __pyx_pybuffernd_idx0.diminfo[0].strides)); /* "pandas/src/generated.pyx":4293 * for i from 0 <= i < n: * idx = idx0[i] * if idx == -1: # <<<<<<<<<<<<<< * for j from 0 <= j < k: * out[i, j] = fv */ __pyx_t_7 = ((__pyx_v_idx == -1) != 0); if (__pyx_t_7) { /* "pandas/src/generated.pyx":4294 * idx = idx0[i] * if idx == -1: * for j from 0 <= j < k: # <<<<<<<<<<<<<< * out[i, j] = fv * else: */ __pyx_t_8 = __pyx_v_k; for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_8; __pyx_v_j++) { /* "pandas/src/generated.pyx":4295 * if idx == -1: * for j from 0 <= j < k: * out[i, j] = fv # <<<<<<<<<<<<<< * else: * for j from 0 <= j < k: */ __pyx_t_9 = __pyx_v_i; __pyx_t_10 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_9, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_10, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_fv; } goto __pyx_L5; } /*else*/ { /* "pandas/src/generated.pyx":4297 * out[i, j] = fv * else: * for j from 0 <= j < k: # <<<<<<<<<<<<<< * if idx1[j] == -1: * out[i, j] = fv */ __pyx_t_8 = __pyx_v_k; for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_8; __pyx_v_j++) { /* "pandas/src/generated.pyx":4298 * else: * for j from 0 <= j < k: * if idx1[j] == -1: # <<<<<<<<<<<<<< * out[i, j] = fv * else: */ __pyx_t_11 = __pyx_v_j; __pyx_t_7 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_idx1.rcbuffer->pybuffer.buf, __pyx_t_11, __pyx_pybuffernd_idx1.diminfo[0].strides)) == -1) != 0); if (__pyx_t_7) { /* "pandas/src/generated.pyx":4299 * for j from 0 <= j < k: * if idx1[j] == -1: * out[i, j] = fv # <<<<<<<<<<<<<< * else: * out[i, j] = values[idx, idx1[j]] */ __pyx_t_12 = __pyx_v_i; __pyx_t_13 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_12, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_13, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_fv; goto __pyx_L10; } /*else*/ { /* "pandas/src/generated.pyx":4301 * out[i, j] = fv * else: * out[i, j] = values[idx, idx1[j]] # <<<<<<<<<<<<<< * * @cython.wraparound(False) */ __pyx_t_14 = __pyx_v_j; __pyx_t_15 = __pyx_v_idx; __pyx_t_16 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_idx1.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_idx1.diminfo[0].strides)); __pyx_t_17 = __pyx_v_i; __pyx_t_18 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_18, __pyx_pybuffernd_out.diminfo[1].strides) = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_16, __pyx_pybuffernd_values.diminfo[1].strides)); } __pyx_L10:; } } __pyx_L5:; } /* "pandas/src/generated.pyx":4277 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_multi_bool_bool(ndarray[uint8_t, ndim=2] values, # <<<<<<<<<<<<<< * indexer, * ndarray[uint8_t, ndim=2] out, */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_idx0.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_idx1.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.take_2d_multi_bool_bool", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_idx0.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_idx1.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_idx0); __Pyx_XDECREF((PyObject *)__pyx_v_idx1); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":4305 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_multi_bool_object(ndarray[uint8_t, ndim=2] values, # <<<<<<<<<<<<<< * indexer, * ndarray[object, ndim=2] out, */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_339take_2d_multi_bool_object(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_339take_2d_multi_bool_object = {__Pyx_NAMESTR("take_2d_multi_bool_object"), (PyCFunction)__pyx_pw_6pandas_5algos_339take_2d_multi_bool_object, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_339take_2d_multi_bool_object(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_values = 0; PyObject *__pyx_v_indexer = 0; PyArrayObject *__pyx_v_out = 0; PyObject *__pyx_v_fill_value = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("take_2d_multi_bool_object (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_values,&__pyx_n_s_indexer,&__pyx_n_s_out,&__pyx_n_s_fill_value,0}; PyObject* values[4] = {0,0,0,0}; values[3] = __pyx_k__159; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_values)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_indexer)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_2d_multi_bool_object", 0, 3, 4, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4305; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_out)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_2d_multi_bool_object", 0, 3, 4, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4305; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_fill_value); if (value) { values[3] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "take_2d_multi_bool_object") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4305; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_values = ((PyArrayObject *)values[0]); __pyx_v_indexer = values[1]; __pyx_v_out = ((PyArrayObject *)values[2]); __pyx_v_fill_value = values[3]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("take_2d_multi_bool_object", 0, 3, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4305; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.take_2d_multi_bool_object", __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_filename = __pyx_f[2]; __pyx_lineno = 4305; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_5numpy_ndarray, 1, "out", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4307; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_338take_2d_multi_bool_object(__pyx_self, __pyx_v_values, __pyx_v_indexer, __pyx_v_out, __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_5algos_338take_2d_multi_bool_object(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_k; Py_ssize_t __pyx_v_n; Py_ssize_t __pyx_v_idx; PyArrayObject *__pyx_v_idx0 = 0; PyArrayObject *__pyx_v_idx1 = 0; PyObject *__pyx_v_fv = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_idx0; __Pyx_Buffer __pyx_pybuffer_idx0; __Pyx_LocalBuf_ND __pyx_pybuffernd_idx1; __Pyx_Buffer __pyx_pybuffer_idx1; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_values; __Pyx_Buffer __pyx_pybuffer_values; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyArrayObject *__pyx_t_2 = NULL; PyArrayObject *__pyx_t_3 = NULL; Py_ssize_t __pyx_t_4; Py_ssize_t __pyx_t_5; int __pyx_t_6; Py_ssize_t __pyx_t_7; Py_ssize_t __pyx_t_8; Py_ssize_t __pyx_t_9; PyObject **__pyx_t_10; Py_ssize_t __pyx_t_11; Py_ssize_t __pyx_t_12; Py_ssize_t __pyx_t_13; Py_ssize_t __pyx_t_14; Py_ssize_t __pyx_t_15; __pyx_t_5numpy_int64_t __pyx_t_16; Py_ssize_t __pyx_t_17; Py_ssize_t __pyx_t_18; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("take_2d_multi_bool_object", 0); __pyx_pybuffer_idx0.pybuffer.buf = NULL; __pyx_pybuffer_idx0.refcount = 0; __pyx_pybuffernd_idx0.data = NULL; __pyx_pybuffernd_idx0.rcbuffer = &__pyx_pybuffer_idx0; __pyx_pybuffer_idx1.pybuffer.buf = NULL; __pyx_pybuffer_idx1.refcount = 0; __pyx_pybuffernd_idx1.data = NULL; __pyx_pybuffernd_idx1.rcbuffer = &__pyx_pybuffer_idx1; __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_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; { __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_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4305; __pyx_clineno = __LINE__; goto __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_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_v_out, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4305; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; __pyx_pybuffernd_out.diminfo[1].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_out.diminfo[1].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[1]; /* "pandas/src/generated.pyx":4311 * cdef: * Py_ssize_t i, j, k, n, idx * ndarray[int64_t] idx0 = indexer[0] # <<<<<<<<<<<<<< * ndarray[int64_t] idx1 = indexer[1] * object fv */ __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_indexer, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4311; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 4311; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_2 = ((PyArrayObject *)__pyx_t_1); { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_idx0.rcbuffer->pybuffer, (PyObject*)__pyx_t_2, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { __pyx_v_idx0 = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_idx0.rcbuffer->pybuffer.buf = NULL; {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4311; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } else {__pyx_pybuffernd_idx0.diminfo[0].strides = __pyx_pybuffernd_idx0.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_idx0.diminfo[0].shape = __pyx_pybuffernd_idx0.rcbuffer->pybuffer.shape[0]; } } __pyx_t_2 = 0; __pyx_v_idx0 = ((PyArrayObject *)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/generated.pyx":4312 * Py_ssize_t i, j, k, n, idx * ndarray[int64_t] idx0 = indexer[0] * ndarray[int64_t] idx1 = indexer[1] # <<<<<<<<<<<<<< * object fv * */ __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_indexer, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4312; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 4312; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_3 = ((PyArrayObject *)__pyx_t_1); { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_idx1.rcbuffer->pybuffer, (PyObject*)__pyx_t_3, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { __pyx_v_idx1 = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_idx1.rcbuffer->pybuffer.buf = NULL; {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4312; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } else {__pyx_pybuffernd_idx1.diminfo[0].strides = __pyx_pybuffernd_idx1.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_idx1.diminfo[0].shape = __pyx_pybuffernd_idx1.rcbuffer->pybuffer.shape[0]; } } __pyx_t_3 = 0; __pyx_v_idx1 = ((PyArrayObject *)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/generated.pyx":4315 * object fv * * n = len(idx0) # <<<<<<<<<<<<<< * k = len(idx1) * */ __pyx_t_4 = PyObject_Length(((PyObject *)__pyx_v_idx0)); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4315; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_4; /* "pandas/src/generated.pyx":4316 * * n = len(idx0) * k = len(idx1) # <<<<<<<<<<<<<< * * fv = fill_value */ __pyx_t_4 = PyObject_Length(((PyObject *)__pyx_v_idx1)); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4316; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_k = __pyx_t_4; /* "pandas/src/generated.pyx":4318 * k = len(idx1) * * fv = fill_value # <<<<<<<<<<<<<< * for i from 0 <= i < n: * idx = idx0[i] */ __Pyx_INCREF(__pyx_v_fill_value); __pyx_v_fv = __pyx_v_fill_value; /* "pandas/src/generated.pyx":4319 * * fv = fill_value * for i from 0 <= i < n: # <<<<<<<<<<<<<< * idx = idx0[i] * if idx == -1: */ __pyx_t_4 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_4; __pyx_v_i++) { /* "pandas/src/generated.pyx":4320 * fv = fill_value * for i from 0 <= i < n: * idx = idx0[i] # <<<<<<<<<<<<<< * if idx == -1: * for j from 0 <= j < k: */ __pyx_t_5 = __pyx_v_i; __pyx_v_idx = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_idx0.rcbuffer->pybuffer.buf, __pyx_t_5, __pyx_pybuffernd_idx0.diminfo[0].strides)); /* "pandas/src/generated.pyx":4321 * for i from 0 <= i < n: * idx = idx0[i] * if idx == -1: # <<<<<<<<<<<<<< * for j from 0 <= j < k: * out[i, j] = fv */ __pyx_t_6 = ((__pyx_v_idx == -1) != 0); if (__pyx_t_6) { /* "pandas/src/generated.pyx":4322 * idx = idx0[i] * if idx == -1: * for j from 0 <= j < k: # <<<<<<<<<<<<<< * out[i, j] = fv * else: */ __pyx_t_7 = __pyx_v_k; for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_7; __pyx_v_j++) { /* "pandas/src/generated.pyx":4323 * if idx == -1: * for j from 0 <= j < k: * out[i, j] = fv # <<<<<<<<<<<<<< * else: * for j from 0 <= j < k: */ __pyx_t_8 = __pyx_v_i; __pyx_t_9 = __pyx_v_j; __pyx_t_10 = __Pyx_BufPtrStrided2d(PyObject **, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_8, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_9, __pyx_pybuffernd_out.diminfo[1].strides); __Pyx_GOTREF(*__pyx_t_10); __Pyx_INCREF(__pyx_v_fv); __Pyx_DECREF(*__pyx_t_10); *__pyx_t_10 = __pyx_v_fv; __Pyx_GIVEREF(*__pyx_t_10); } goto __pyx_L5; } /*else*/ { /* "pandas/src/generated.pyx":4325 * out[i, j] = fv * else: * for j from 0 <= j < k: # <<<<<<<<<<<<<< * if idx1[j] == -1: * out[i, j] = fv */ __pyx_t_7 = __pyx_v_k; for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_7; __pyx_v_j++) { /* "pandas/src/generated.pyx":4326 * else: * for j from 0 <= j < k: * if idx1[j] == -1: # <<<<<<<<<<<<<< * out[i, j] = fv * else: */ __pyx_t_11 = __pyx_v_j; __pyx_t_6 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_idx1.rcbuffer->pybuffer.buf, __pyx_t_11, __pyx_pybuffernd_idx1.diminfo[0].strides)) == -1) != 0); if (__pyx_t_6) { /* "pandas/src/generated.pyx":4327 * for j from 0 <= j < k: * if idx1[j] == -1: * out[i, j] = fv # <<<<<<<<<<<<<< * else: * out[i, j] = True if values[idx, idx1[j]] > 0 else False */ __pyx_t_12 = __pyx_v_i; __pyx_t_13 = __pyx_v_j; __pyx_t_10 = __Pyx_BufPtrStrided2d(PyObject **, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_12, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_13, __pyx_pybuffernd_out.diminfo[1].strides); __Pyx_GOTREF(*__pyx_t_10); __Pyx_INCREF(__pyx_v_fv); __Pyx_DECREF(*__pyx_t_10); *__pyx_t_10 = __pyx_v_fv; __Pyx_GIVEREF(*__pyx_t_10); goto __pyx_L10; } /*else*/ { /* "pandas/src/generated.pyx":4329 * out[i, j] = fv * else: * out[i, j] = True if values[idx, idx1[j]] > 0 else False # <<<<<<<<<<<<<< * * @cython.wraparound(False) */ __pyx_t_14 = __pyx_v_j; __pyx_t_15 = __pyx_v_idx; __pyx_t_16 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_idx1.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_idx1.diminfo[0].strides)); if ((((*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_16, __pyx_pybuffernd_values.diminfo[1].strides)) > 0) != 0)) { __Pyx_INCREF(Py_True); __pyx_t_1 = Py_True; } else { __Pyx_INCREF(Py_False); __pyx_t_1 = Py_False; } __pyx_t_17 = __pyx_v_i; __pyx_t_18 = __pyx_v_j; __pyx_t_10 = __Pyx_BufPtrStrided2d(PyObject **, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_18, __pyx_pybuffernd_out.diminfo[1].strides); __Pyx_GOTREF(*__pyx_t_10); __Pyx_INCREF(__pyx_t_1); __Pyx_DECREF(*__pyx_t_10); *__pyx_t_10 = __pyx_t_1; __Pyx_GIVEREF(*__pyx_t_10); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } __pyx_L10:; } } __pyx_L5:; } /* "pandas/src/generated.pyx":4305 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_multi_bool_object(ndarray[uint8_t, ndim=2] values, # <<<<<<<<<<<<<< * indexer, * ndarray[object, ndim=2] out, */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_idx0.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_idx1.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.take_2d_multi_bool_object", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_idx0.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_idx1.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_idx0); __Pyx_XDECREF((PyObject *)__pyx_v_idx1); __Pyx_XDECREF(__pyx_v_fv); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":4333 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_multi_int8_int8(ndarray[int8_t, ndim=2] values, # <<<<<<<<<<<<<< * indexer, * ndarray[int8_t, ndim=2] out, */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_341take_2d_multi_int8_int8(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_341take_2d_multi_int8_int8 = {__Pyx_NAMESTR("take_2d_multi_int8_int8"), (PyCFunction)__pyx_pw_6pandas_5algos_341take_2d_multi_int8_int8, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_341take_2d_multi_int8_int8(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_values = 0; PyObject *__pyx_v_indexer = 0; PyArrayObject *__pyx_v_out = 0; PyObject *__pyx_v_fill_value = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("take_2d_multi_int8_int8 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_values,&__pyx_n_s_indexer,&__pyx_n_s_out,&__pyx_n_s_fill_value,0}; PyObject* values[4] = {0,0,0,0}; values[3] = __pyx_k__160; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_values)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_indexer)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_2d_multi_int8_int8", 0, 3, 4, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4333; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_out)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_2d_multi_int8_int8", 0, 3, 4, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4333; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_fill_value); if (value) { values[3] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "take_2d_multi_int8_int8") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4333; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_values = ((PyArrayObject *)values[0]); __pyx_v_indexer = values[1]; __pyx_v_out = ((PyArrayObject *)values[2]); __pyx_v_fill_value = values[3]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("take_2d_multi_int8_int8", 0, 3, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4333; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.take_2d_multi_int8_int8", __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_filename = __pyx_f[2]; __pyx_lineno = 4333; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_5numpy_ndarray, 1, "out", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4335; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_340take_2d_multi_int8_int8(__pyx_self, __pyx_v_values, __pyx_v_indexer, __pyx_v_out, __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_5algos_340take_2d_multi_int8_int8(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_k; Py_ssize_t __pyx_v_n; Py_ssize_t __pyx_v_idx; PyArrayObject *__pyx_v_idx0 = 0; PyArrayObject *__pyx_v_idx1 = 0; __pyx_t_5numpy_int8_t __pyx_v_fv; __Pyx_LocalBuf_ND __pyx_pybuffernd_idx0; __Pyx_Buffer __pyx_pybuffer_idx0; __Pyx_LocalBuf_ND __pyx_pybuffernd_idx1; __Pyx_Buffer __pyx_pybuffer_idx1; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_values; __Pyx_Buffer __pyx_pybuffer_values; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyArrayObject *__pyx_t_2 = NULL; PyArrayObject *__pyx_t_3 = NULL; Py_ssize_t __pyx_t_4; __pyx_t_5numpy_int8_t __pyx_t_5; Py_ssize_t __pyx_t_6; int __pyx_t_7; Py_ssize_t __pyx_t_8; Py_ssize_t __pyx_t_9; Py_ssize_t __pyx_t_10; Py_ssize_t __pyx_t_11; Py_ssize_t __pyx_t_12; Py_ssize_t __pyx_t_13; Py_ssize_t __pyx_t_14; Py_ssize_t __pyx_t_15; __pyx_t_5numpy_int64_t __pyx_t_16; Py_ssize_t __pyx_t_17; Py_ssize_t __pyx_t_18; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("take_2d_multi_int8_int8", 0); __pyx_pybuffer_idx0.pybuffer.buf = NULL; __pyx_pybuffer_idx0.refcount = 0; __pyx_pybuffernd_idx0.data = NULL; __pyx_pybuffernd_idx0.rcbuffer = &__pyx_pybuffer_idx0; __pyx_pybuffer_idx1.pybuffer.buf = NULL; __pyx_pybuffer_idx1.refcount = 0; __pyx_pybuffernd_idx1.data = NULL; __pyx_pybuffernd_idx1.rcbuffer = &__pyx_pybuffer_idx1; __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_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; { __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_int8_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4333; __pyx_clineno = __LINE__; goto __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_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_v_out, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int8_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4333; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; __pyx_pybuffernd_out.diminfo[1].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_out.diminfo[1].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[1]; /* "pandas/src/generated.pyx":4339 * cdef: * Py_ssize_t i, j, k, n, idx * ndarray[int64_t] idx0 = indexer[0] # <<<<<<<<<<<<<< * ndarray[int64_t] idx1 = indexer[1] * int8_t fv */ __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_indexer, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4339; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 4339; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_2 = ((PyArrayObject *)__pyx_t_1); { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_idx0.rcbuffer->pybuffer, (PyObject*)__pyx_t_2, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { __pyx_v_idx0 = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_idx0.rcbuffer->pybuffer.buf = NULL; {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4339; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } else {__pyx_pybuffernd_idx0.diminfo[0].strides = __pyx_pybuffernd_idx0.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_idx0.diminfo[0].shape = __pyx_pybuffernd_idx0.rcbuffer->pybuffer.shape[0]; } } __pyx_t_2 = 0; __pyx_v_idx0 = ((PyArrayObject *)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/generated.pyx":4340 * Py_ssize_t i, j, k, n, idx * ndarray[int64_t] idx0 = indexer[0] * ndarray[int64_t] idx1 = indexer[1] # <<<<<<<<<<<<<< * int8_t fv * */ __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_indexer, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4340; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 4340; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_3 = ((PyArrayObject *)__pyx_t_1); { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_idx1.rcbuffer->pybuffer, (PyObject*)__pyx_t_3, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { __pyx_v_idx1 = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_idx1.rcbuffer->pybuffer.buf = NULL; {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4340; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } else {__pyx_pybuffernd_idx1.diminfo[0].strides = __pyx_pybuffernd_idx1.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_idx1.diminfo[0].shape = __pyx_pybuffernd_idx1.rcbuffer->pybuffer.shape[0]; } } __pyx_t_3 = 0; __pyx_v_idx1 = ((PyArrayObject *)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/generated.pyx":4343 * int8_t fv * * n = len(idx0) # <<<<<<<<<<<<<< * k = len(idx1) * */ __pyx_t_4 = PyObject_Length(((PyObject *)__pyx_v_idx0)); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4343; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_4; /* "pandas/src/generated.pyx":4344 * * n = len(idx0) * k = len(idx1) # <<<<<<<<<<<<<< * * fv = fill_value */ __pyx_t_4 = PyObject_Length(((PyObject *)__pyx_v_idx1)); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4344; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_k = __pyx_t_4; /* "pandas/src/generated.pyx":4346 * k = len(idx1) * * fv = fill_value # <<<<<<<<<<<<<< * for i from 0 <= i < n: * idx = idx0[i] */ __pyx_t_5 = __Pyx_PyInt_As_npy_int8(__pyx_v_fill_value); if (unlikely((__pyx_t_5 == (npy_int8)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4346; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_fv = __pyx_t_5; /* "pandas/src/generated.pyx":4347 * * fv = fill_value * for i from 0 <= i < n: # <<<<<<<<<<<<<< * idx = idx0[i] * if idx == -1: */ __pyx_t_4 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_4; __pyx_v_i++) { /* "pandas/src/generated.pyx":4348 * fv = fill_value * for i from 0 <= i < n: * idx = idx0[i] # <<<<<<<<<<<<<< * if idx == -1: * for j from 0 <= j < k: */ __pyx_t_6 = __pyx_v_i; __pyx_v_idx = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_idx0.rcbuffer->pybuffer.buf, __pyx_t_6, __pyx_pybuffernd_idx0.diminfo[0].strides)); /* "pandas/src/generated.pyx":4349 * for i from 0 <= i < n: * idx = idx0[i] * if idx == -1: # <<<<<<<<<<<<<< * for j from 0 <= j < k: * out[i, j] = fv */ __pyx_t_7 = ((__pyx_v_idx == -1) != 0); if (__pyx_t_7) { /* "pandas/src/generated.pyx":4350 * idx = idx0[i] * if idx == -1: * for j from 0 <= j < k: # <<<<<<<<<<<<<< * out[i, j] = fv * else: */ __pyx_t_8 = __pyx_v_k; for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_8; __pyx_v_j++) { /* "pandas/src/generated.pyx":4351 * if idx == -1: * for j from 0 <= j < k: * out[i, j] = fv # <<<<<<<<<<<<<< * else: * for j from 0 <= j < k: */ __pyx_t_9 = __pyx_v_i; __pyx_t_10 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int8_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_9, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_10, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_fv; } goto __pyx_L5; } /*else*/ { /* "pandas/src/generated.pyx":4353 * out[i, j] = fv * else: * for j from 0 <= j < k: # <<<<<<<<<<<<<< * if idx1[j] == -1: * out[i, j] = fv */ __pyx_t_8 = __pyx_v_k; for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_8; __pyx_v_j++) { /* "pandas/src/generated.pyx":4354 * else: * for j from 0 <= j < k: * if idx1[j] == -1: # <<<<<<<<<<<<<< * out[i, j] = fv * else: */ __pyx_t_11 = __pyx_v_j; __pyx_t_7 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_idx1.rcbuffer->pybuffer.buf, __pyx_t_11, __pyx_pybuffernd_idx1.diminfo[0].strides)) == -1) != 0); if (__pyx_t_7) { /* "pandas/src/generated.pyx":4355 * for j from 0 <= j < k: * if idx1[j] == -1: * out[i, j] = fv # <<<<<<<<<<<<<< * else: * out[i, j] = values[idx, idx1[j]] */ __pyx_t_12 = __pyx_v_i; __pyx_t_13 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int8_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_12, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_13, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_fv; goto __pyx_L10; } /*else*/ { /* "pandas/src/generated.pyx":4357 * out[i, j] = fv * else: * out[i, j] = values[idx, idx1[j]] # <<<<<<<<<<<<<< * * @cython.wraparound(False) */ __pyx_t_14 = __pyx_v_j; __pyx_t_15 = __pyx_v_idx; __pyx_t_16 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_idx1.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_idx1.diminfo[0].strides)); __pyx_t_17 = __pyx_v_i; __pyx_t_18 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int8_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_18, __pyx_pybuffernd_out.diminfo[1].strides) = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int8_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_16, __pyx_pybuffernd_values.diminfo[1].strides)); } __pyx_L10:; } } __pyx_L5:; } /* "pandas/src/generated.pyx":4333 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_multi_int8_int8(ndarray[int8_t, ndim=2] values, # <<<<<<<<<<<<<< * indexer, * ndarray[int8_t, ndim=2] out, */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_idx0.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_idx1.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.take_2d_multi_int8_int8", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_idx0.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_idx1.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_idx0); __Pyx_XDECREF((PyObject *)__pyx_v_idx1); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":4361 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_multi_int8_int32(ndarray[int8_t, ndim=2] values, # <<<<<<<<<<<<<< * indexer, * ndarray[int32_t, ndim=2] out, */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_343take_2d_multi_int8_int32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_343take_2d_multi_int8_int32 = {__Pyx_NAMESTR("take_2d_multi_int8_int32"), (PyCFunction)__pyx_pw_6pandas_5algos_343take_2d_multi_int8_int32, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_343take_2d_multi_int8_int32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_values = 0; PyObject *__pyx_v_indexer = 0; PyArrayObject *__pyx_v_out = 0; PyObject *__pyx_v_fill_value = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("take_2d_multi_int8_int32 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_values,&__pyx_n_s_indexer,&__pyx_n_s_out,&__pyx_n_s_fill_value,0}; PyObject* values[4] = {0,0,0,0}; values[3] = __pyx_k__161; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_values)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_indexer)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_2d_multi_int8_int32", 0, 3, 4, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4361; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_out)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_2d_multi_int8_int32", 0, 3, 4, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4361; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_fill_value); if (value) { values[3] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "take_2d_multi_int8_int32") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4361; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_values = ((PyArrayObject *)values[0]); __pyx_v_indexer = values[1]; __pyx_v_out = ((PyArrayObject *)values[2]); __pyx_v_fill_value = values[3]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("take_2d_multi_int8_int32", 0, 3, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4361; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.take_2d_multi_int8_int32", __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_filename = __pyx_f[2]; __pyx_lineno = 4361; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_5numpy_ndarray, 1, "out", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4363; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_342take_2d_multi_int8_int32(__pyx_self, __pyx_v_values, __pyx_v_indexer, __pyx_v_out, __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_5algos_342take_2d_multi_int8_int32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_k; Py_ssize_t __pyx_v_n; Py_ssize_t __pyx_v_idx; PyArrayObject *__pyx_v_idx0 = 0; PyArrayObject *__pyx_v_idx1 = 0; __pyx_t_5numpy_int32_t __pyx_v_fv; __Pyx_LocalBuf_ND __pyx_pybuffernd_idx0; __Pyx_Buffer __pyx_pybuffer_idx0; __Pyx_LocalBuf_ND __pyx_pybuffernd_idx1; __Pyx_Buffer __pyx_pybuffer_idx1; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_values; __Pyx_Buffer __pyx_pybuffer_values; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyArrayObject *__pyx_t_2 = NULL; PyArrayObject *__pyx_t_3 = NULL; Py_ssize_t __pyx_t_4; __pyx_t_5numpy_int32_t __pyx_t_5; Py_ssize_t __pyx_t_6; int __pyx_t_7; Py_ssize_t __pyx_t_8; Py_ssize_t __pyx_t_9; Py_ssize_t __pyx_t_10; Py_ssize_t __pyx_t_11; Py_ssize_t __pyx_t_12; Py_ssize_t __pyx_t_13; Py_ssize_t __pyx_t_14; Py_ssize_t __pyx_t_15; __pyx_t_5numpy_int64_t __pyx_t_16; Py_ssize_t __pyx_t_17; Py_ssize_t __pyx_t_18; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("take_2d_multi_int8_int32", 0); __pyx_pybuffer_idx0.pybuffer.buf = NULL; __pyx_pybuffer_idx0.refcount = 0; __pyx_pybuffernd_idx0.data = NULL; __pyx_pybuffernd_idx0.rcbuffer = &__pyx_pybuffer_idx0; __pyx_pybuffer_idx1.pybuffer.buf = NULL; __pyx_pybuffer_idx1.refcount = 0; __pyx_pybuffernd_idx1.data = NULL; __pyx_pybuffernd_idx1.rcbuffer = &__pyx_pybuffer_idx1; __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_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; { __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_int8_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4361; __pyx_clineno = __LINE__; goto __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_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_v_out, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4361; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; __pyx_pybuffernd_out.diminfo[1].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_out.diminfo[1].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[1]; /* "pandas/src/generated.pyx":4367 * cdef: * Py_ssize_t i, j, k, n, idx * ndarray[int64_t] idx0 = indexer[0] # <<<<<<<<<<<<<< * ndarray[int64_t] idx1 = indexer[1] * int32_t fv */ __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_indexer, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4367; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 4367; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_2 = ((PyArrayObject *)__pyx_t_1); { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_idx0.rcbuffer->pybuffer, (PyObject*)__pyx_t_2, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { __pyx_v_idx0 = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_idx0.rcbuffer->pybuffer.buf = NULL; {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4367; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } else {__pyx_pybuffernd_idx0.diminfo[0].strides = __pyx_pybuffernd_idx0.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_idx0.diminfo[0].shape = __pyx_pybuffernd_idx0.rcbuffer->pybuffer.shape[0]; } } __pyx_t_2 = 0; __pyx_v_idx0 = ((PyArrayObject *)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/generated.pyx":4368 * Py_ssize_t i, j, k, n, idx * ndarray[int64_t] idx0 = indexer[0] * ndarray[int64_t] idx1 = indexer[1] # <<<<<<<<<<<<<< * int32_t fv * */ __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_indexer, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4368; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 4368; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_3 = ((PyArrayObject *)__pyx_t_1); { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_idx1.rcbuffer->pybuffer, (PyObject*)__pyx_t_3, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { __pyx_v_idx1 = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_idx1.rcbuffer->pybuffer.buf = NULL; {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4368; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } else {__pyx_pybuffernd_idx1.diminfo[0].strides = __pyx_pybuffernd_idx1.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_idx1.diminfo[0].shape = __pyx_pybuffernd_idx1.rcbuffer->pybuffer.shape[0]; } } __pyx_t_3 = 0; __pyx_v_idx1 = ((PyArrayObject *)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/generated.pyx":4371 * int32_t fv * * n = len(idx0) # <<<<<<<<<<<<<< * k = len(idx1) * */ __pyx_t_4 = PyObject_Length(((PyObject *)__pyx_v_idx0)); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4371; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_4; /* "pandas/src/generated.pyx":4372 * * n = len(idx0) * k = len(idx1) # <<<<<<<<<<<<<< * * fv = fill_value */ __pyx_t_4 = PyObject_Length(((PyObject *)__pyx_v_idx1)); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4372; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_k = __pyx_t_4; /* "pandas/src/generated.pyx":4374 * k = len(idx1) * * fv = fill_value # <<<<<<<<<<<<<< * for i from 0 <= i < n: * idx = idx0[i] */ __pyx_t_5 = __Pyx_PyInt_As_npy_int32(__pyx_v_fill_value); if (unlikely((__pyx_t_5 == (npy_int32)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4374; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_fv = __pyx_t_5; /* "pandas/src/generated.pyx":4375 * * fv = fill_value * for i from 0 <= i < n: # <<<<<<<<<<<<<< * idx = idx0[i] * if idx == -1: */ __pyx_t_4 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_4; __pyx_v_i++) { /* "pandas/src/generated.pyx":4376 * fv = fill_value * for i from 0 <= i < n: * idx = idx0[i] # <<<<<<<<<<<<<< * if idx == -1: * for j from 0 <= j < k: */ __pyx_t_6 = __pyx_v_i; __pyx_v_idx = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_idx0.rcbuffer->pybuffer.buf, __pyx_t_6, __pyx_pybuffernd_idx0.diminfo[0].strides)); /* "pandas/src/generated.pyx":4377 * for i from 0 <= i < n: * idx = idx0[i] * if idx == -1: # <<<<<<<<<<<<<< * for j from 0 <= j < k: * out[i, j] = fv */ __pyx_t_7 = ((__pyx_v_idx == -1) != 0); if (__pyx_t_7) { /* "pandas/src/generated.pyx":4378 * idx = idx0[i] * if idx == -1: * for j from 0 <= j < k: # <<<<<<<<<<<<<< * out[i, j] = fv * else: */ __pyx_t_8 = __pyx_v_k; for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_8; __pyx_v_j++) { /* "pandas/src/generated.pyx":4379 * if idx == -1: * for j from 0 <= j < k: * out[i, j] = fv # <<<<<<<<<<<<<< * else: * for j from 0 <= j < k: */ __pyx_t_9 = __pyx_v_i; __pyx_t_10 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_9, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_10, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_fv; } goto __pyx_L5; } /*else*/ { /* "pandas/src/generated.pyx":4381 * out[i, j] = fv * else: * for j from 0 <= j < k: # <<<<<<<<<<<<<< * if idx1[j] == -1: * out[i, j] = fv */ __pyx_t_8 = __pyx_v_k; for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_8; __pyx_v_j++) { /* "pandas/src/generated.pyx":4382 * else: * for j from 0 <= j < k: * if idx1[j] == -1: # <<<<<<<<<<<<<< * out[i, j] = fv * else: */ __pyx_t_11 = __pyx_v_j; __pyx_t_7 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_idx1.rcbuffer->pybuffer.buf, __pyx_t_11, __pyx_pybuffernd_idx1.diminfo[0].strides)) == -1) != 0); if (__pyx_t_7) { /* "pandas/src/generated.pyx":4383 * for j from 0 <= j < k: * if idx1[j] == -1: * out[i, j] = fv # <<<<<<<<<<<<<< * else: * out[i, j] = values[idx, idx1[j]] */ __pyx_t_12 = __pyx_v_i; __pyx_t_13 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_12, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_13, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_fv; goto __pyx_L10; } /*else*/ { /* "pandas/src/generated.pyx":4385 * out[i, j] = fv * else: * out[i, j] = values[idx, idx1[j]] # <<<<<<<<<<<<<< * * @cython.wraparound(False) */ __pyx_t_14 = __pyx_v_j; __pyx_t_15 = __pyx_v_idx; __pyx_t_16 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_idx1.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_idx1.diminfo[0].strides)); __pyx_t_17 = __pyx_v_i; __pyx_t_18 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_18, __pyx_pybuffernd_out.diminfo[1].strides) = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int8_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_16, __pyx_pybuffernd_values.diminfo[1].strides)); } __pyx_L10:; } } __pyx_L5:; } /* "pandas/src/generated.pyx":4361 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_multi_int8_int32(ndarray[int8_t, ndim=2] values, # <<<<<<<<<<<<<< * indexer, * ndarray[int32_t, ndim=2] out, */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_idx0.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_idx1.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.take_2d_multi_int8_int32", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_idx0.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_idx1.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_idx0); __Pyx_XDECREF((PyObject *)__pyx_v_idx1); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":4389 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_multi_int8_int64(ndarray[int8_t, ndim=2] values, # <<<<<<<<<<<<<< * indexer, * ndarray[int64_t, ndim=2] out, */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_345take_2d_multi_int8_int64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_345take_2d_multi_int8_int64 = {__Pyx_NAMESTR("take_2d_multi_int8_int64"), (PyCFunction)__pyx_pw_6pandas_5algos_345take_2d_multi_int8_int64, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_345take_2d_multi_int8_int64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_values = 0; PyObject *__pyx_v_indexer = 0; PyArrayObject *__pyx_v_out = 0; PyObject *__pyx_v_fill_value = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("take_2d_multi_int8_int64 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_values,&__pyx_n_s_indexer,&__pyx_n_s_out,&__pyx_n_s_fill_value,0}; PyObject* values[4] = {0,0,0,0}; values[3] = __pyx_k__162; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_values)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_indexer)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_2d_multi_int8_int64", 0, 3, 4, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4389; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_out)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_2d_multi_int8_int64", 0, 3, 4, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4389; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_fill_value); if (value) { values[3] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "take_2d_multi_int8_int64") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4389; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_values = ((PyArrayObject *)values[0]); __pyx_v_indexer = values[1]; __pyx_v_out = ((PyArrayObject *)values[2]); __pyx_v_fill_value = values[3]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("take_2d_multi_int8_int64", 0, 3, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4389; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.take_2d_multi_int8_int64", __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_filename = __pyx_f[2]; __pyx_lineno = 4389; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_5numpy_ndarray, 1, "out", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4391; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_344take_2d_multi_int8_int64(__pyx_self, __pyx_v_values, __pyx_v_indexer, __pyx_v_out, __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_5algos_344take_2d_multi_int8_int64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_k; Py_ssize_t __pyx_v_n; Py_ssize_t __pyx_v_idx; PyArrayObject *__pyx_v_idx0 = 0; PyArrayObject *__pyx_v_idx1 = 0; __pyx_t_5numpy_int64_t __pyx_v_fv; __Pyx_LocalBuf_ND __pyx_pybuffernd_idx0; __Pyx_Buffer __pyx_pybuffer_idx0; __Pyx_LocalBuf_ND __pyx_pybuffernd_idx1; __Pyx_Buffer __pyx_pybuffer_idx1; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_values; __Pyx_Buffer __pyx_pybuffer_values; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyArrayObject *__pyx_t_2 = NULL; PyArrayObject *__pyx_t_3 = NULL; Py_ssize_t __pyx_t_4; __pyx_t_5numpy_int64_t __pyx_t_5; Py_ssize_t __pyx_t_6; int __pyx_t_7; Py_ssize_t __pyx_t_8; Py_ssize_t __pyx_t_9; Py_ssize_t __pyx_t_10; Py_ssize_t __pyx_t_11; Py_ssize_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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("take_2d_multi_int8_int64", 0); __pyx_pybuffer_idx0.pybuffer.buf = NULL; __pyx_pybuffer_idx0.refcount = 0; __pyx_pybuffernd_idx0.data = NULL; __pyx_pybuffernd_idx0.rcbuffer = &__pyx_pybuffer_idx0; __pyx_pybuffer_idx1.pybuffer.buf = NULL; __pyx_pybuffer_idx1.refcount = 0; __pyx_pybuffernd_idx1.data = NULL; __pyx_pybuffernd_idx1.rcbuffer = &__pyx_pybuffer_idx1; __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_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; { __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_int8_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4389; __pyx_clineno = __LINE__; goto __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_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; 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, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4389; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; __pyx_pybuffernd_out.diminfo[1].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_out.diminfo[1].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[1]; /* "pandas/src/generated.pyx":4395 * cdef: * Py_ssize_t i, j, k, n, idx * ndarray[int64_t] idx0 = indexer[0] # <<<<<<<<<<<<<< * ndarray[int64_t] idx1 = indexer[1] * int64_t fv */ __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_indexer, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4395; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 4395; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_2 = ((PyArrayObject *)__pyx_t_1); { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_idx0.rcbuffer->pybuffer, (PyObject*)__pyx_t_2, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { __pyx_v_idx0 = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_idx0.rcbuffer->pybuffer.buf = NULL; {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4395; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } else {__pyx_pybuffernd_idx0.diminfo[0].strides = __pyx_pybuffernd_idx0.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_idx0.diminfo[0].shape = __pyx_pybuffernd_idx0.rcbuffer->pybuffer.shape[0]; } } __pyx_t_2 = 0; __pyx_v_idx0 = ((PyArrayObject *)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/generated.pyx":4396 * Py_ssize_t i, j, k, n, idx * ndarray[int64_t] idx0 = indexer[0] * ndarray[int64_t] idx1 = indexer[1] # <<<<<<<<<<<<<< * int64_t fv * */ __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_indexer, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4396; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 4396; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_3 = ((PyArrayObject *)__pyx_t_1); { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_idx1.rcbuffer->pybuffer, (PyObject*)__pyx_t_3, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { __pyx_v_idx1 = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_idx1.rcbuffer->pybuffer.buf = NULL; {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4396; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } else {__pyx_pybuffernd_idx1.diminfo[0].strides = __pyx_pybuffernd_idx1.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_idx1.diminfo[0].shape = __pyx_pybuffernd_idx1.rcbuffer->pybuffer.shape[0]; } } __pyx_t_3 = 0; __pyx_v_idx1 = ((PyArrayObject *)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/generated.pyx":4399 * int64_t fv * * n = len(idx0) # <<<<<<<<<<<<<< * k = len(idx1) * */ __pyx_t_4 = PyObject_Length(((PyObject *)__pyx_v_idx0)); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4399; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_4; /* "pandas/src/generated.pyx":4400 * * n = len(idx0) * k = len(idx1) # <<<<<<<<<<<<<< * * fv = fill_value */ __pyx_t_4 = PyObject_Length(((PyObject *)__pyx_v_idx1)); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4400; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_k = __pyx_t_4; /* "pandas/src/generated.pyx":4402 * k = len(idx1) * * fv = fill_value # <<<<<<<<<<<<<< * for i from 0 <= i < n: * idx = idx0[i] */ __pyx_t_5 = __Pyx_PyInt_As_npy_int64(__pyx_v_fill_value); if (unlikely((__pyx_t_5 == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4402; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_fv = __pyx_t_5; /* "pandas/src/generated.pyx":4403 * * fv = fill_value * for i from 0 <= i < n: # <<<<<<<<<<<<<< * idx = idx0[i] * if idx == -1: */ __pyx_t_4 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_4; __pyx_v_i++) { /* "pandas/src/generated.pyx":4404 * fv = fill_value * for i from 0 <= i < n: * idx = idx0[i] # <<<<<<<<<<<<<< * if idx == -1: * for j from 0 <= j < k: */ __pyx_t_6 = __pyx_v_i; __pyx_v_idx = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_idx0.rcbuffer->pybuffer.buf, __pyx_t_6, __pyx_pybuffernd_idx0.diminfo[0].strides)); /* "pandas/src/generated.pyx":4405 * for i from 0 <= i < n: * idx = idx0[i] * if idx == -1: # <<<<<<<<<<<<<< * for j from 0 <= j < k: * out[i, j] = fv */ __pyx_t_7 = ((__pyx_v_idx == -1) != 0); if (__pyx_t_7) { /* "pandas/src/generated.pyx":4406 * idx = idx0[i] * if idx == -1: * for j from 0 <= j < k: # <<<<<<<<<<<<<< * out[i, j] = fv * else: */ __pyx_t_8 = __pyx_v_k; for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_8; __pyx_v_j++) { /* "pandas/src/generated.pyx":4407 * if idx == -1: * for j from 0 <= j < k: * out[i, j] = fv # <<<<<<<<<<<<<< * else: * for j from 0 <= j < k: */ __pyx_t_9 = __pyx_v_i; __pyx_t_10 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_9, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_10, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_fv; } goto __pyx_L5; } /*else*/ { /* "pandas/src/generated.pyx":4409 * out[i, j] = fv * else: * for j from 0 <= j < k: # <<<<<<<<<<<<<< * if idx1[j] == -1: * out[i, j] = fv */ __pyx_t_8 = __pyx_v_k; for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_8; __pyx_v_j++) { /* "pandas/src/generated.pyx":4410 * else: * for j from 0 <= j < k: * if idx1[j] == -1: # <<<<<<<<<<<<<< * out[i, j] = fv * else: */ __pyx_t_11 = __pyx_v_j; __pyx_t_7 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_idx1.rcbuffer->pybuffer.buf, __pyx_t_11, __pyx_pybuffernd_idx1.diminfo[0].strides)) == -1) != 0); if (__pyx_t_7) { /* "pandas/src/generated.pyx":4411 * for j from 0 <= j < k: * if idx1[j] == -1: * out[i, j] = fv # <<<<<<<<<<<<<< * else: * out[i, j] = values[idx, idx1[j]] */ __pyx_t_12 = __pyx_v_i; __pyx_t_13 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_12, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_13, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_fv; goto __pyx_L10; } /*else*/ { /* "pandas/src/generated.pyx":4413 * out[i, j] = fv * else: * out[i, j] = values[idx, idx1[j]] # <<<<<<<<<<<<<< * * @cython.wraparound(False) */ __pyx_t_14 = __pyx_v_j; __pyx_t_15 = __pyx_v_idx; __pyx_t_5 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_idx1.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_idx1.diminfo[0].strides)); __pyx_t_16 = __pyx_v_i; __pyx_t_17 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_17, __pyx_pybuffernd_out.diminfo[1].strides) = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int8_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_5, __pyx_pybuffernd_values.diminfo[1].strides)); } __pyx_L10:; } } __pyx_L5:; } /* "pandas/src/generated.pyx":4389 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_multi_int8_int64(ndarray[int8_t, ndim=2] values, # <<<<<<<<<<<<<< * indexer, * ndarray[int64_t, ndim=2] out, */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_idx0.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_idx1.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.take_2d_multi_int8_int64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_idx0.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_idx1.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_idx0); __Pyx_XDECREF((PyObject *)__pyx_v_idx1); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":4417 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_multi_int8_float64(ndarray[int8_t, ndim=2] values, # <<<<<<<<<<<<<< * indexer, * ndarray[float64_t, ndim=2] out, */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_347take_2d_multi_int8_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_347take_2d_multi_int8_float64 = {__Pyx_NAMESTR("take_2d_multi_int8_float64"), (PyCFunction)__pyx_pw_6pandas_5algos_347take_2d_multi_int8_float64, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_347take_2d_multi_int8_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_values = 0; PyObject *__pyx_v_indexer = 0; PyArrayObject *__pyx_v_out = 0; PyObject *__pyx_v_fill_value = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("take_2d_multi_int8_float64 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_values,&__pyx_n_s_indexer,&__pyx_n_s_out,&__pyx_n_s_fill_value,0}; PyObject* values[4] = {0,0,0,0}; values[3] = __pyx_k__163; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_values)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_indexer)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_2d_multi_int8_float64", 0, 3, 4, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4417; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_out)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_2d_multi_int8_float64", 0, 3, 4, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4417; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_fill_value); if (value) { values[3] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "take_2d_multi_int8_float64") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4417; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_values = ((PyArrayObject *)values[0]); __pyx_v_indexer = values[1]; __pyx_v_out = ((PyArrayObject *)values[2]); __pyx_v_fill_value = values[3]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("take_2d_multi_int8_float64", 0, 3, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4417; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.take_2d_multi_int8_float64", __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_filename = __pyx_f[2]; __pyx_lineno = 4417; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_5numpy_ndarray, 1, "out", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4419; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_346take_2d_multi_int8_float64(__pyx_self, __pyx_v_values, __pyx_v_indexer, __pyx_v_out, __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_5algos_346take_2d_multi_int8_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_k; Py_ssize_t __pyx_v_n; Py_ssize_t __pyx_v_idx; PyArrayObject *__pyx_v_idx0 = 0; PyArrayObject *__pyx_v_idx1 = 0; __pyx_t_5numpy_float64_t __pyx_v_fv; __Pyx_LocalBuf_ND __pyx_pybuffernd_idx0; __Pyx_Buffer __pyx_pybuffer_idx0; __Pyx_LocalBuf_ND __pyx_pybuffernd_idx1; __Pyx_Buffer __pyx_pybuffer_idx1; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_values; __Pyx_Buffer __pyx_pybuffer_values; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyArrayObject *__pyx_t_2 = NULL; PyArrayObject *__pyx_t_3 = NULL; Py_ssize_t __pyx_t_4; __pyx_t_5numpy_float64_t __pyx_t_5; Py_ssize_t __pyx_t_6; int __pyx_t_7; Py_ssize_t __pyx_t_8; Py_ssize_t __pyx_t_9; Py_ssize_t __pyx_t_10; Py_ssize_t __pyx_t_11; Py_ssize_t __pyx_t_12; Py_ssize_t __pyx_t_13; Py_ssize_t __pyx_t_14; Py_ssize_t __pyx_t_15; __pyx_t_5numpy_int64_t __pyx_t_16; Py_ssize_t __pyx_t_17; Py_ssize_t __pyx_t_18; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("take_2d_multi_int8_float64", 0); __pyx_pybuffer_idx0.pybuffer.buf = NULL; __pyx_pybuffer_idx0.refcount = 0; __pyx_pybuffernd_idx0.data = NULL; __pyx_pybuffernd_idx0.rcbuffer = &__pyx_pybuffer_idx0; __pyx_pybuffer_idx1.pybuffer.buf = NULL; __pyx_pybuffer_idx1.refcount = 0; __pyx_pybuffernd_idx1.data = NULL; __pyx_pybuffernd_idx1.rcbuffer = &__pyx_pybuffer_idx1; __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_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; { __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_int8_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4417; __pyx_clineno = __LINE__; goto __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_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; 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, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4417; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; __pyx_pybuffernd_out.diminfo[1].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_out.diminfo[1].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[1]; /* "pandas/src/generated.pyx":4423 * cdef: * Py_ssize_t i, j, k, n, idx * ndarray[int64_t] idx0 = indexer[0] # <<<<<<<<<<<<<< * ndarray[int64_t] idx1 = indexer[1] * float64_t fv */ __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_indexer, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4423; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 4423; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_2 = ((PyArrayObject *)__pyx_t_1); { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_idx0.rcbuffer->pybuffer, (PyObject*)__pyx_t_2, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { __pyx_v_idx0 = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_idx0.rcbuffer->pybuffer.buf = NULL; {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4423; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } else {__pyx_pybuffernd_idx0.diminfo[0].strides = __pyx_pybuffernd_idx0.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_idx0.diminfo[0].shape = __pyx_pybuffernd_idx0.rcbuffer->pybuffer.shape[0]; } } __pyx_t_2 = 0; __pyx_v_idx0 = ((PyArrayObject *)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/generated.pyx":4424 * Py_ssize_t i, j, k, n, idx * ndarray[int64_t] idx0 = indexer[0] * ndarray[int64_t] idx1 = indexer[1] # <<<<<<<<<<<<<< * float64_t fv * */ __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_indexer, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4424; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 4424; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_3 = ((PyArrayObject *)__pyx_t_1); { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_idx1.rcbuffer->pybuffer, (PyObject*)__pyx_t_3, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { __pyx_v_idx1 = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_idx1.rcbuffer->pybuffer.buf = NULL; {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4424; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } else {__pyx_pybuffernd_idx1.diminfo[0].strides = __pyx_pybuffernd_idx1.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_idx1.diminfo[0].shape = __pyx_pybuffernd_idx1.rcbuffer->pybuffer.shape[0]; } } __pyx_t_3 = 0; __pyx_v_idx1 = ((PyArrayObject *)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/generated.pyx":4427 * float64_t fv * * n = len(idx0) # <<<<<<<<<<<<<< * k = len(idx1) * */ __pyx_t_4 = PyObject_Length(((PyObject *)__pyx_v_idx0)); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4427; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_4; /* "pandas/src/generated.pyx":4428 * * n = len(idx0) * k = len(idx1) # <<<<<<<<<<<<<< * * fv = fill_value */ __pyx_t_4 = PyObject_Length(((PyObject *)__pyx_v_idx1)); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4428; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_k = __pyx_t_4; /* "pandas/src/generated.pyx":4430 * k = len(idx1) * * fv = fill_value # <<<<<<<<<<<<<< * for i from 0 <= i < n: * idx = idx0[i] */ __pyx_t_5 = __pyx_PyFloat_AsDouble(__pyx_v_fill_value); if (unlikely((__pyx_t_5 == (npy_float64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4430; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_fv = __pyx_t_5; /* "pandas/src/generated.pyx":4431 * * fv = fill_value * for i from 0 <= i < n: # <<<<<<<<<<<<<< * idx = idx0[i] * if idx == -1: */ __pyx_t_4 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_4; __pyx_v_i++) { /* "pandas/src/generated.pyx":4432 * fv = fill_value * for i from 0 <= i < n: * idx = idx0[i] # <<<<<<<<<<<<<< * if idx == -1: * for j from 0 <= j < k: */ __pyx_t_6 = __pyx_v_i; __pyx_v_idx = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_idx0.rcbuffer->pybuffer.buf, __pyx_t_6, __pyx_pybuffernd_idx0.diminfo[0].strides)); /* "pandas/src/generated.pyx":4433 * for i from 0 <= i < n: * idx = idx0[i] * if idx == -1: # <<<<<<<<<<<<<< * for j from 0 <= j < k: * out[i, j] = fv */ __pyx_t_7 = ((__pyx_v_idx == -1) != 0); if (__pyx_t_7) { /* "pandas/src/generated.pyx":4434 * idx = idx0[i] * if idx == -1: * for j from 0 <= j < k: # <<<<<<<<<<<<<< * out[i, j] = fv * else: */ __pyx_t_8 = __pyx_v_k; for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_8; __pyx_v_j++) { /* "pandas/src/generated.pyx":4435 * if idx == -1: * for j from 0 <= j < k: * out[i, j] = fv # <<<<<<<<<<<<<< * else: * for j from 0 <= j < k: */ __pyx_t_9 = __pyx_v_i; __pyx_t_10 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_9, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_10, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_fv; } goto __pyx_L5; } /*else*/ { /* "pandas/src/generated.pyx":4437 * out[i, j] = fv * else: * for j from 0 <= j < k: # <<<<<<<<<<<<<< * if idx1[j] == -1: * out[i, j] = fv */ __pyx_t_8 = __pyx_v_k; for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_8; __pyx_v_j++) { /* "pandas/src/generated.pyx":4438 * else: * for j from 0 <= j < k: * if idx1[j] == -1: # <<<<<<<<<<<<<< * out[i, j] = fv * else: */ __pyx_t_11 = __pyx_v_j; __pyx_t_7 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_idx1.rcbuffer->pybuffer.buf, __pyx_t_11, __pyx_pybuffernd_idx1.diminfo[0].strides)) == -1) != 0); if (__pyx_t_7) { /* "pandas/src/generated.pyx":4439 * for j from 0 <= j < k: * if idx1[j] == -1: * out[i, j] = fv # <<<<<<<<<<<<<< * else: * out[i, j] = values[idx, idx1[j]] */ __pyx_t_12 = __pyx_v_i; __pyx_t_13 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_12, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_13, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_fv; goto __pyx_L10; } /*else*/ { /* "pandas/src/generated.pyx":4441 * out[i, j] = fv * else: * out[i, j] = values[idx, idx1[j]] # <<<<<<<<<<<<<< * * @cython.wraparound(False) */ __pyx_t_14 = __pyx_v_j; __pyx_t_15 = __pyx_v_idx; __pyx_t_16 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_idx1.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_idx1.diminfo[0].strides)); __pyx_t_17 = __pyx_v_i; __pyx_t_18 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_18, __pyx_pybuffernd_out.diminfo[1].strides) = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int8_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_16, __pyx_pybuffernd_values.diminfo[1].strides)); } __pyx_L10:; } } __pyx_L5:; } /* "pandas/src/generated.pyx":4417 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_multi_int8_float64(ndarray[int8_t, ndim=2] values, # <<<<<<<<<<<<<< * indexer, * ndarray[float64_t, ndim=2] out, */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_idx0.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_idx1.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.take_2d_multi_int8_float64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_idx0.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_idx1.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_idx0); __Pyx_XDECREF((PyObject *)__pyx_v_idx1); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":4445 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_multi_int16_int16(ndarray[int16_t, ndim=2] values, # <<<<<<<<<<<<<< * indexer, * ndarray[int16_t, ndim=2] out, */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_349take_2d_multi_int16_int16(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_349take_2d_multi_int16_int16 = {__Pyx_NAMESTR("take_2d_multi_int16_int16"), (PyCFunction)__pyx_pw_6pandas_5algos_349take_2d_multi_int16_int16, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_349take_2d_multi_int16_int16(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_values = 0; PyObject *__pyx_v_indexer = 0; PyArrayObject *__pyx_v_out = 0; PyObject *__pyx_v_fill_value = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("take_2d_multi_int16_int16 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_values,&__pyx_n_s_indexer,&__pyx_n_s_out,&__pyx_n_s_fill_value,0}; PyObject* values[4] = {0,0,0,0}; values[3] = __pyx_k__164; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_values)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_indexer)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_2d_multi_int16_int16", 0, 3, 4, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4445; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_out)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_2d_multi_int16_int16", 0, 3, 4, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4445; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_fill_value); if (value) { values[3] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "take_2d_multi_int16_int16") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4445; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_values = ((PyArrayObject *)values[0]); __pyx_v_indexer = values[1]; __pyx_v_out = ((PyArrayObject *)values[2]); __pyx_v_fill_value = values[3]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("take_2d_multi_int16_int16", 0, 3, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4445; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.take_2d_multi_int16_int16", __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_filename = __pyx_f[2]; __pyx_lineno = 4445; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_5numpy_ndarray, 1, "out", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4447; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_348take_2d_multi_int16_int16(__pyx_self, __pyx_v_values, __pyx_v_indexer, __pyx_v_out, __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_5algos_348take_2d_multi_int16_int16(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_k; Py_ssize_t __pyx_v_n; Py_ssize_t __pyx_v_idx; PyArrayObject *__pyx_v_idx0 = 0; PyArrayObject *__pyx_v_idx1 = 0; __pyx_t_5numpy_int16_t __pyx_v_fv; __Pyx_LocalBuf_ND __pyx_pybuffernd_idx0; __Pyx_Buffer __pyx_pybuffer_idx0; __Pyx_LocalBuf_ND __pyx_pybuffernd_idx1; __Pyx_Buffer __pyx_pybuffer_idx1; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_values; __Pyx_Buffer __pyx_pybuffer_values; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyArrayObject *__pyx_t_2 = NULL; PyArrayObject *__pyx_t_3 = NULL; Py_ssize_t __pyx_t_4; __pyx_t_5numpy_int16_t __pyx_t_5; Py_ssize_t __pyx_t_6; int __pyx_t_7; Py_ssize_t __pyx_t_8; Py_ssize_t __pyx_t_9; Py_ssize_t __pyx_t_10; Py_ssize_t __pyx_t_11; Py_ssize_t __pyx_t_12; Py_ssize_t __pyx_t_13; Py_ssize_t __pyx_t_14; Py_ssize_t __pyx_t_15; __pyx_t_5numpy_int64_t __pyx_t_16; Py_ssize_t __pyx_t_17; Py_ssize_t __pyx_t_18; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("take_2d_multi_int16_int16", 0); __pyx_pybuffer_idx0.pybuffer.buf = NULL; __pyx_pybuffer_idx0.refcount = 0; __pyx_pybuffernd_idx0.data = NULL; __pyx_pybuffernd_idx0.rcbuffer = &__pyx_pybuffer_idx0; __pyx_pybuffer_idx1.pybuffer.buf = NULL; __pyx_pybuffer_idx1.refcount = 0; __pyx_pybuffernd_idx1.data = NULL; __pyx_pybuffernd_idx1.rcbuffer = &__pyx_pybuffer_idx1; __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_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; { __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_int16_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4445; __pyx_clineno = __LINE__; goto __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_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_v_out, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int16_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4445; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; __pyx_pybuffernd_out.diminfo[1].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_out.diminfo[1].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[1]; /* "pandas/src/generated.pyx":4451 * cdef: * Py_ssize_t i, j, k, n, idx * ndarray[int64_t] idx0 = indexer[0] # <<<<<<<<<<<<<< * ndarray[int64_t] idx1 = indexer[1] * int16_t fv */ __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_indexer, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4451; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 4451; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_2 = ((PyArrayObject *)__pyx_t_1); { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_idx0.rcbuffer->pybuffer, (PyObject*)__pyx_t_2, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { __pyx_v_idx0 = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_idx0.rcbuffer->pybuffer.buf = NULL; {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4451; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } else {__pyx_pybuffernd_idx0.diminfo[0].strides = __pyx_pybuffernd_idx0.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_idx0.diminfo[0].shape = __pyx_pybuffernd_idx0.rcbuffer->pybuffer.shape[0]; } } __pyx_t_2 = 0; __pyx_v_idx0 = ((PyArrayObject *)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/generated.pyx":4452 * Py_ssize_t i, j, k, n, idx * ndarray[int64_t] idx0 = indexer[0] * ndarray[int64_t] idx1 = indexer[1] # <<<<<<<<<<<<<< * int16_t fv * */ __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_indexer, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4452; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 4452; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_3 = ((PyArrayObject *)__pyx_t_1); { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_idx1.rcbuffer->pybuffer, (PyObject*)__pyx_t_3, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { __pyx_v_idx1 = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_idx1.rcbuffer->pybuffer.buf = NULL; {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4452; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } else {__pyx_pybuffernd_idx1.diminfo[0].strides = __pyx_pybuffernd_idx1.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_idx1.diminfo[0].shape = __pyx_pybuffernd_idx1.rcbuffer->pybuffer.shape[0]; } } __pyx_t_3 = 0; __pyx_v_idx1 = ((PyArrayObject *)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/generated.pyx":4455 * int16_t fv * * n = len(idx0) # <<<<<<<<<<<<<< * k = len(idx1) * */ __pyx_t_4 = PyObject_Length(((PyObject *)__pyx_v_idx0)); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4455; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_4; /* "pandas/src/generated.pyx":4456 * * n = len(idx0) * k = len(idx1) # <<<<<<<<<<<<<< * * fv = fill_value */ __pyx_t_4 = PyObject_Length(((PyObject *)__pyx_v_idx1)); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4456; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_k = __pyx_t_4; /* "pandas/src/generated.pyx":4458 * k = len(idx1) * * fv = fill_value # <<<<<<<<<<<<<< * for i from 0 <= i < n: * idx = idx0[i] */ __pyx_t_5 = __Pyx_PyInt_As_npy_int16(__pyx_v_fill_value); if (unlikely((__pyx_t_5 == (npy_int16)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4458; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_fv = __pyx_t_5; /* "pandas/src/generated.pyx":4459 * * fv = fill_value * for i from 0 <= i < n: # <<<<<<<<<<<<<< * idx = idx0[i] * if idx == -1: */ __pyx_t_4 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_4; __pyx_v_i++) { /* "pandas/src/generated.pyx":4460 * fv = fill_value * for i from 0 <= i < n: * idx = idx0[i] # <<<<<<<<<<<<<< * if idx == -1: * for j from 0 <= j < k: */ __pyx_t_6 = __pyx_v_i; __pyx_v_idx = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_idx0.rcbuffer->pybuffer.buf, __pyx_t_6, __pyx_pybuffernd_idx0.diminfo[0].strides)); /* "pandas/src/generated.pyx":4461 * for i from 0 <= i < n: * idx = idx0[i] * if idx == -1: # <<<<<<<<<<<<<< * for j from 0 <= j < k: * out[i, j] = fv */ __pyx_t_7 = ((__pyx_v_idx == -1) != 0); if (__pyx_t_7) { /* "pandas/src/generated.pyx":4462 * idx = idx0[i] * if idx == -1: * for j from 0 <= j < k: # <<<<<<<<<<<<<< * out[i, j] = fv * else: */ __pyx_t_8 = __pyx_v_k; for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_8; __pyx_v_j++) { /* "pandas/src/generated.pyx":4463 * if idx == -1: * for j from 0 <= j < k: * out[i, j] = fv # <<<<<<<<<<<<<< * else: * for j from 0 <= j < k: */ __pyx_t_9 = __pyx_v_i; __pyx_t_10 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int16_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_9, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_10, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_fv; } goto __pyx_L5; } /*else*/ { /* "pandas/src/generated.pyx":4465 * out[i, j] = fv * else: * for j from 0 <= j < k: # <<<<<<<<<<<<<< * if idx1[j] == -1: * out[i, j] = fv */ __pyx_t_8 = __pyx_v_k; for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_8; __pyx_v_j++) { /* "pandas/src/generated.pyx":4466 * else: * for j from 0 <= j < k: * if idx1[j] == -1: # <<<<<<<<<<<<<< * out[i, j] = fv * else: */ __pyx_t_11 = __pyx_v_j; __pyx_t_7 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_idx1.rcbuffer->pybuffer.buf, __pyx_t_11, __pyx_pybuffernd_idx1.diminfo[0].strides)) == -1) != 0); if (__pyx_t_7) { /* "pandas/src/generated.pyx":4467 * for j from 0 <= j < k: * if idx1[j] == -1: * out[i, j] = fv # <<<<<<<<<<<<<< * else: * out[i, j] = values[idx, idx1[j]] */ __pyx_t_12 = __pyx_v_i; __pyx_t_13 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int16_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_12, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_13, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_fv; goto __pyx_L10; } /*else*/ { /* "pandas/src/generated.pyx":4469 * out[i, j] = fv * else: * out[i, j] = values[idx, idx1[j]] # <<<<<<<<<<<<<< * * @cython.wraparound(False) */ __pyx_t_14 = __pyx_v_j; __pyx_t_15 = __pyx_v_idx; __pyx_t_16 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_idx1.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_idx1.diminfo[0].strides)); __pyx_t_17 = __pyx_v_i; __pyx_t_18 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int16_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_18, __pyx_pybuffernd_out.diminfo[1].strides) = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int16_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_16, __pyx_pybuffernd_values.diminfo[1].strides)); } __pyx_L10:; } } __pyx_L5:; } /* "pandas/src/generated.pyx":4445 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_multi_int16_int16(ndarray[int16_t, ndim=2] values, # <<<<<<<<<<<<<< * indexer, * ndarray[int16_t, ndim=2] out, */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_idx0.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_idx1.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.take_2d_multi_int16_int16", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_idx0.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_idx1.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_idx0); __Pyx_XDECREF((PyObject *)__pyx_v_idx1); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":4473 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_multi_int16_int32(ndarray[int16_t, ndim=2] values, # <<<<<<<<<<<<<< * indexer, * ndarray[int32_t, ndim=2] out, */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_351take_2d_multi_int16_int32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_351take_2d_multi_int16_int32 = {__Pyx_NAMESTR("take_2d_multi_int16_int32"), (PyCFunction)__pyx_pw_6pandas_5algos_351take_2d_multi_int16_int32, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_351take_2d_multi_int16_int32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_values = 0; PyObject *__pyx_v_indexer = 0; PyArrayObject *__pyx_v_out = 0; PyObject *__pyx_v_fill_value = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("take_2d_multi_int16_int32 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_values,&__pyx_n_s_indexer,&__pyx_n_s_out,&__pyx_n_s_fill_value,0}; PyObject* values[4] = {0,0,0,0}; values[3] = __pyx_k__165; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_values)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_indexer)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_2d_multi_int16_int32", 0, 3, 4, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4473; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_out)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_2d_multi_int16_int32", 0, 3, 4, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4473; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_fill_value); if (value) { values[3] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "take_2d_multi_int16_int32") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4473; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_values = ((PyArrayObject *)values[0]); __pyx_v_indexer = values[1]; __pyx_v_out = ((PyArrayObject *)values[2]); __pyx_v_fill_value = values[3]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("take_2d_multi_int16_int32", 0, 3, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4473; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.take_2d_multi_int16_int32", __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_filename = __pyx_f[2]; __pyx_lineno = 4473; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_5numpy_ndarray, 1, "out", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4475; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_350take_2d_multi_int16_int32(__pyx_self, __pyx_v_values, __pyx_v_indexer, __pyx_v_out, __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_5algos_350take_2d_multi_int16_int32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_k; Py_ssize_t __pyx_v_n; Py_ssize_t __pyx_v_idx; PyArrayObject *__pyx_v_idx0 = 0; PyArrayObject *__pyx_v_idx1 = 0; __pyx_t_5numpy_int32_t __pyx_v_fv; __Pyx_LocalBuf_ND __pyx_pybuffernd_idx0; __Pyx_Buffer __pyx_pybuffer_idx0; __Pyx_LocalBuf_ND __pyx_pybuffernd_idx1; __Pyx_Buffer __pyx_pybuffer_idx1; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_values; __Pyx_Buffer __pyx_pybuffer_values; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyArrayObject *__pyx_t_2 = NULL; PyArrayObject *__pyx_t_3 = NULL; Py_ssize_t __pyx_t_4; __pyx_t_5numpy_int32_t __pyx_t_5; Py_ssize_t __pyx_t_6; int __pyx_t_7; Py_ssize_t __pyx_t_8; Py_ssize_t __pyx_t_9; Py_ssize_t __pyx_t_10; Py_ssize_t __pyx_t_11; Py_ssize_t __pyx_t_12; Py_ssize_t __pyx_t_13; Py_ssize_t __pyx_t_14; Py_ssize_t __pyx_t_15; __pyx_t_5numpy_int64_t __pyx_t_16; Py_ssize_t __pyx_t_17; Py_ssize_t __pyx_t_18; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("take_2d_multi_int16_int32", 0); __pyx_pybuffer_idx0.pybuffer.buf = NULL; __pyx_pybuffer_idx0.refcount = 0; __pyx_pybuffernd_idx0.data = NULL; __pyx_pybuffernd_idx0.rcbuffer = &__pyx_pybuffer_idx0; __pyx_pybuffer_idx1.pybuffer.buf = NULL; __pyx_pybuffer_idx1.refcount = 0; __pyx_pybuffernd_idx1.data = NULL; __pyx_pybuffernd_idx1.rcbuffer = &__pyx_pybuffer_idx1; __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_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; { __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_int16_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4473; __pyx_clineno = __LINE__; goto __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_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_v_out, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4473; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; __pyx_pybuffernd_out.diminfo[1].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_out.diminfo[1].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[1]; /* "pandas/src/generated.pyx":4479 * cdef: * Py_ssize_t i, j, k, n, idx * ndarray[int64_t] idx0 = indexer[0] # <<<<<<<<<<<<<< * ndarray[int64_t] idx1 = indexer[1] * int32_t fv */ __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_indexer, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4479; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 4479; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_2 = ((PyArrayObject *)__pyx_t_1); { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_idx0.rcbuffer->pybuffer, (PyObject*)__pyx_t_2, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { __pyx_v_idx0 = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_idx0.rcbuffer->pybuffer.buf = NULL; {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4479; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } else {__pyx_pybuffernd_idx0.diminfo[0].strides = __pyx_pybuffernd_idx0.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_idx0.diminfo[0].shape = __pyx_pybuffernd_idx0.rcbuffer->pybuffer.shape[0]; } } __pyx_t_2 = 0; __pyx_v_idx0 = ((PyArrayObject *)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/generated.pyx":4480 * Py_ssize_t i, j, k, n, idx * ndarray[int64_t] idx0 = indexer[0] * ndarray[int64_t] idx1 = indexer[1] # <<<<<<<<<<<<<< * int32_t fv * */ __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_indexer, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4480; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 4480; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_3 = ((PyArrayObject *)__pyx_t_1); { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_idx1.rcbuffer->pybuffer, (PyObject*)__pyx_t_3, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { __pyx_v_idx1 = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_idx1.rcbuffer->pybuffer.buf = NULL; {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4480; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } else {__pyx_pybuffernd_idx1.diminfo[0].strides = __pyx_pybuffernd_idx1.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_idx1.diminfo[0].shape = __pyx_pybuffernd_idx1.rcbuffer->pybuffer.shape[0]; } } __pyx_t_3 = 0; __pyx_v_idx1 = ((PyArrayObject *)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/generated.pyx":4483 * int32_t fv * * n = len(idx0) # <<<<<<<<<<<<<< * k = len(idx1) * */ __pyx_t_4 = PyObject_Length(((PyObject *)__pyx_v_idx0)); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4483; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_4; /* "pandas/src/generated.pyx":4484 * * n = len(idx0) * k = len(idx1) # <<<<<<<<<<<<<< * * fv = fill_value */ __pyx_t_4 = PyObject_Length(((PyObject *)__pyx_v_idx1)); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4484; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_k = __pyx_t_4; /* "pandas/src/generated.pyx":4486 * k = len(idx1) * * fv = fill_value # <<<<<<<<<<<<<< * for i from 0 <= i < n: * idx = idx0[i] */ __pyx_t_5 = __Pyx_PyInt_As_npy_int32(__pyx_v_fill_value); if (unlikely((__pyx_t_5 == (npy_int32)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4486; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_fv = __pyx_t_5; /* "pandas/src/generated.pyx":4487 * * fv = fill_value * for i from 0 <= i < n: # <<<<<<<<<<<<<< * idx = idx0[i] * if idx == -1: */ __pyx_t_4 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_4; __pyx_v_i++) { /* "pandas/src/generated.pyx":4488 * fv = fill_value * for i from 0 <= i < n: * idx = idx0[i] # <<<<<<<<<<<<<< * if idx == -1: * for j from 0 <= j < k: */ __pyx_t_6 = __pyx_v_i; __pyx_v_idx = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_idx0.rcbuffer->pybuffer.buf, __pyx_t_6, __pyx_pybuffernd_idx0.diminfo[0].strides)); /* "pandas/src/generated.pyx":4489 * for i from 0 <= i < n: * idx = idx0[i] * if idx == -1: # <<<<<<<<<<<<<< * for j from 0 <= j < k: * out[i, j] = fv */ __pyx_t_7 = ((__pyx_v_idx == -1) != 0); if (__pyx_t_7) { /* "pandas/src/generated.pyx":4490 * idx = idx0[i] * if idx == -1: * for j from 0 <= j < k: # <<<<<<<<<<<<<< * out[i, j] = fv * else: */ __pyx_t_8 = __pyx_v_k; for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_8; __pyx_v_j++) { /* "pandas/src/generated.pyx":4491 * if idx == -1: * for j from 0 <= j < k: * out[i, j] = fv # <<<<<<<<<<<<<< * else: * for j from 0 <= j < k: */ __pyx_t_9 = __pyx_v_i; __pyx_t_10 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_9, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_10, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_fv; } goto __pyx_L5; } /*else*/ { /* "pandas/src/generated.pyx":4493 * out[i, j] = fv * else: * for j from 0 <= j < k: # <<<<<<<<<<<<<< * if idx1[j] == -1: * out[i, j] = fv */ __pyx_t_8 = __pyx_v_k; for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_8; __pyx_v_j++) { /* "pandas/src/generated.pyx":4494 * else: * for j from 0 <= j < k: * if idx1[j] == -1: # <<<<<<<<<<<<<< * out[i, j] = fv * else: */ __pyx_t_11 = __pyx_v_j; __pyx_t_7 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_idx1.rcbuffer->pybuffer.buf, __pyx_t_11, __pyx_pybuffernd_idx1.diminfo[0].strides)) == -1) != 0); if (__pyx_t_7) { /* "pandas/src/generated.pyx":4495 * for j from 0 <= j < k: * if idx1[j] == -1: * out[i, j] = fv # <<<<<<<<<<<<<< * else: * out[i, j] = values[idx, idx1[j]] */ __pyx_t_12 = __pyx_v_i; __pyx_t_13 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_12, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_13, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_fv; goto __pyx_L10; } /*else*/ { /* "pandas/src/generated.pyx":4497 * out[i, j] = fv * else: * out[i, j] = values[idx, idx1[j]] # <<<<<<<<<<<<<< * * @cython.wraparound(False) */ __pyx_t_14 = __pyx_v_j; __pyx_t_15 = __pyx_v_idx; __pyx_t_16 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_idx1.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_idx1.diminfo[0].strides)); __pyx_t_17 = __pyx_v_i; __pyx_t_18 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_18, __pyx_pybuffernd_out.diminfo[1].strides) = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int16_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_16, __pyx_pybuffernd_values.diminfo[1].strides)); } __pyx_L10:; } } __pyx_L5:; } /* "pandas/src/generated.pyx":4473 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_multi_int16_int32(ndarray[int16_t, ndim=2] values, # <<<<<<<<<<<<<< * indexer, * ndarray[int32_t, ndim=2] out, */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_idx0.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_idx1.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.take_2d_multi_int16_int32", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_idx0.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_idx1.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_idx0); __Pyx_XDECREF((PyObject *)__pyx_v_idx1); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":4501 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_multi_int16_int64(ndarray[int16_t, ndim=2] values, # <<<<<<<<<<<<<< * indexer, * ndarray[int64_t, ndim=2] out, */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_353take_2d_multi_int16_int64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_353take_2d_multi_int16_int64 = {__Pyx_NAMESTR("take_2d_multi_int16_int64"), (PyCFunction)__pyx_pw_6pandas_5algos_353take_2d_multi_int16_int64, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_353take_2d_multi_int16_int64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_values = 0; PyObject *__pyx_v_indexer = 0; PyArrayObject *__pyx_v_out = 0; PyObject *__pyx_v_fill_value = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("take_2d_multi_int16_int64 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_values,&__pyx_n_s_indexer,&__pyx_n_s_out,&__pyx_n_s_fill_value,0}; PyObject* values[4] = {0,0,0,0}; values[3] = __pyx_k__166; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_values)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_indexer)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_2d_multi_int16_int64", 0, 3, 4, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4501; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_out)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_2d_multi_int16_int64", 0, 3, 4, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4501; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_fill_value); if (value) { values[3] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "take_2d_multi_int16_int64") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4501; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_values = ((PyArrayObject *)values[0]); __pyx_v_indexer = values[1]; __pyx_v_out = ((PyArrayObject *)values[2]); __pyx_v_fill_value = values[3]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("take_2d_multi_int16_int64", 0, 3, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4501; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.take_2d_multi_int16_int64", __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_filename = __pyx_f[2]; __pyx_lineno = 4501; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_5numpy_ndarray, 1, "out", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4503; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_352take_2d_multi_int16_int64(__pyx_self, __pyx_v_values, __pyx_v_indexer, __pyx_v_out, __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_5algos_352take_2d_multi_int16_int64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_k; Py_ssize_t __pyx_v_n; Py_ssize_t __pyx_v_idx; PyArrayObject *__pyx_v_idx0 = 0; PyArrayObject *__pyx_v_idx1 = 0; __pyx_t_5numpy_int64_t __pyx_v_fv; __Pyx_LocalBuf_ND __pyx_pybuffernd_idx0; __Pyx_Buffer __pyx_pybuffer_idx0; __Pyx_LocalBuf_ND __pyx_pybuffernd_idx1; __Pyx_Buffer __pyx_pybuffer_idx1; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_values; __Pyx_Buffer __pyx_pybuffer_values; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyArrayObject *__pyx_t_2 = NULL; PyArrayObject *__pyx_t_3 = NULL; Py_ssize_t __pyx_t_4; __pyx_t_5numpy_int64_t __pyx_t_5; Py_ssize_t __pyx_t_6; int __pyx_t_7; Py_ssize_t __pyx_t_8; Py_ssize_t __pyx_t_9; Py_ssize_t __pyx_t_10; Py_ssize_t __pyx_t_11; Py_ssize_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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("take_2d_multi_int16_int64", 0); __pyx_pybuffer_idx0.pybuffer.buf = NULL; __pyx_pybuffer_idx0.refcount = 0; __pyx_pybuffernd_idx0.data = NULL; __pyx_pybuffernd_idx0.rcbuffer = &__pyx_pybuffer_idx0; __pyx_pybuffer_idx1.pybuffer.buf = NULL; __pyx_pybuffer_idx1.refcount = 0; __pyx_pybuffernd_idx1.data = NULL; __pyx_pybuffernd_idx1.rcbuffer = &__pyx_pybuffer_idx1; __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_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; { __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_int16_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4501; __pyx_clineno = __LINE__; goto __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_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; 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, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4501; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; __pyx_pybuffernd_out.diminfo[1].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_out.diminfo[1].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[1]; /* "pandas/src/generated.pyx":4507 * cdef: * Py_ssize_t i, j, k, n, idx * ndarray[int64_t] idx0 = indexer[0] # <<<<<<<<<<<<<< * ndarray[int64_t] idx1 = indexer[1] * int64_t fv */ __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_indexer, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4507; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 4507; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_2 = ((PyArrayObject *)__pyx_t_1); { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_idx0.rcbuffer->pybuffer, (PyObject*)__pyx_t_2, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { __pyx_v_idx0 = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_idx0.rcbuffer->pybuffer.buf = NULL; {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4507; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } else {__pyx_pybuffernd_idx0.diminfo[0].strides = __pyx_pybuffernd_idx0.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_idx0.diminfo[0].shape = __pyx_pybuffernd_idx0.rcbuffer->pybuffer.shape[0]; } } __pyx_t_2 = 0; __pyx_v_idx0 = ((PyArrayObject *)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/generated.pyx":4508 * Py_ssize_t i, j, k, n, idx * ndarray[int64_t] idx0 = indexer[0] * ndarray[int64_t] idx1 = indexer[1] # <<<<<<<<<<<<<< * int64_t fv * */ __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_indexer, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4508; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 4508; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_3 = ((PyArrayObject *)__pyx_t_1); { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_idx1.rcbuffer->pybuffer, (PyObject*)__pyx_t_3, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { __pyx_v_idx1 = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_idx1.rcbuffer->pybuffer.buf = NULL; {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4508; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } else {__pyx_pybuffernd_idx1.diminfo[0].strides = __pyx_pybuffernd_idx1.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_idx1.diminfo[0].shape = __pyx_pybuffernd_idx1.rcbuffer->pybuffer.shape[0]; } } __pyx_t_3 = 0; __pyx_v_idx1 = ((PyArrayObject *)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/generated.pyx":4511 * int64_t fv * * n = len(idx0) # <<<<<<<<<<<<<< * k = len(idx1) * */ __pyx_t_4 = PyObject_Length(((PyObject *)__pyx_v_idx0)); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4511; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_4; /* "pandas/src/generated.pyx":4512 * * n = len(idx0) * k = len(idx1) # <<<<<<<<<<<<<< * * fv = fill_value */ __pyx_t_4 = PyObject_Length(((PyObject *)__pyx_v_idx1)); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4512; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_k = __pyx_t_4; /* "pandas/src/generated.pyx":4514 * k = len(idx1) * * fv = fill_value # <<<<<<<<<<<<<< * for i from 0 <= i < n: * idx = idx0[i] */ __pyx_t_5 = __Pyx_PyInt_As_npy_int64(__pyx_v_fill_value); if (unlikely((__pyx_t_5 == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4514; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_fv = __pyx_t_5; /* "pandas/src/generated.pyx":4515 * * fv = fill_value * for i from 0 <= i < n: # <<<<<<<<<<<<<< * idx = idx0[i] * if idx == -1: */ __pyx_t_4 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_4; __pyx_v_i++) { /* "pandas/src/generated.pyx":4516 * fv = fill_value * for i from 0 <= i < n: * idx = idx0[i] # <<<<<<<<<<<<<< * if idx == -1: * for j from 0 <= j < k: */ __pyx_t_6 = __pyx_v_i; __pyx_v_idx = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_idx0.rcbuffer->pybuffer.buf, __pyx_t_6, __pyx_pybuffernd_idx0.diminfo[0].strides)); /* "pandas/src/generated.pyx":4517 * for i from 0 <= i < n: * idx = idx0[i] * if idx == -1: # <<<<<<<<<<<<<< * for j from 0 <= j < k: * out[i, j] = fv */ __pyx_t_7 = ((__pyx_v_idx == -1) != 0); if (__pyx_t_7) { /* "pandas/src/generated.pyx":4518 * idx = idx0[i] * if idx == -1: * for j from 0 <= j < k: # <<<<<<<<<<<<<< * out[i, j] = fv * else: */ __pyx_t_8 = __pyx_v_k; for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_8; __pyx_v_j++) { /* "pandas/src/generated.pyx":4519 * if idx == -1: * for j from 0 <= j < k: * out[i, j] = fv # <<<<<<<<<<<<<< * else: * for j from 0 <= j < k: */ __pyx_t_9 = __pyx_v_i; __pyx_t_10 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_9, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_10, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_fv; } goto __pyx_L5; } /*else*/ { /* "pandas/src/generated.pyx":4521 * out[i, j] = fv * else: * for j from 0 <= j < k: # <<<<<<<<<<<<<< * if idx1[j] == -1: * out[i, j] = fv */ __pyx_t_8 = __pyx_v_k; for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_8; __pyx_v_j++) { /* "pandas/src/generated.pyx":4522 * else: * for j from 0 <= j < k: * if idx1[j] == -1: # <<<<<<<<<<<<<< * out[i, j] = fv * else: */ __pyx_t_11 = __pyx_v_j; __pyx_t_7 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_idx1.rcbuffer->pybuffer.buf, __pyx_t_11, __pyx_pybuffernd_idx1.diminfo[0].strides)) == -1) != 0); if (__pyx_t_7) { /* "pandas/src/generated.pyx":4523 * for j from 0 <= j < k: * if idx1[j] == -1: * out[i, j] = fv # <<<<<<<<<<<<<< * else: * out[i, j] = values[idx, idx1[j]] */ __pyx_t_12 = __pyx_v_i; __pyx_t_13 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_12, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_13, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_fv; goto __pyx_L10; } /*else*/ { /* "pandas/src/generated.pyx":4525 * out[i, j] = fv * else: * out[i, j] = values[idx, idx1[j]] # <<<<<<<<<<<<<< * * @cython.wraparound(False) */ __pyx_t_14 = __pyx_v_j; __pyx_t_15 = __pyx_v_idx; __pyx_t_5 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_idx1.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_idx1.diminfo[0].strides)); __pyx_t_16 = __pyx_v_i; __pyx_t_17 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_17, __pyx_pybuffernd_out.diminfo[1].strides) = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int16_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_5, __pyx_pybuffernd_values.diminfo[1].strides)); } __pyx_L10:; } } __pyx_L5:; } /* "pandas/src/generated.pyx":4501 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_multi_int16_int64(ndarray[int16_t, ndim=2] values, # <<<<<<<<<<<<<< * indexer, * ndarray[int64_t, ndim=2] out, */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_idx0.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_idx1.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.take_2d_multi_int16_int64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_idx0.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_idx1.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_idx0); __Pyx_XDECREF((PyObject *)__pyx_v_idx1); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":4529 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_multi_int16_float64(ndarray[int16_t, ndim=2] values, # <<<<<<<<<<<<<< * indexer, * ndarray[float64_t, ndim=2] out, */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_355take_2d_multi_int16_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_355take_2d_multi_int16_float64 = {__Pyx_NAMESTR("take_2d_multi_int16_float64"), (PyCFunction)__pyx_pw_6pandas_5algos_355take_2d_multi_int16_float64, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_355take_2d_multi_int16_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_values = 0; PyObject *__pyx_v_indexer = 0; PyArrayObject *__pyx_v_out = 0; PyObject *__pyx_v_fill_value = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("take_2d_multi_int16_float64 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_values,&__pyx_n_s_indexer,&__pyx_n_s_out,&__pyx_n_s_fill_value,0}; PyObject* values[4] = {0,0,0,0}; values[3] = __pyx_k__167; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_values)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_indexer)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_2d_multi_int16_float64", 0, 3, 4, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4529; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_out)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_2d_multi_int16_float64", 0, 3, 4, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4529; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_fill_value); if (value) { values[3] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "take_2d_multi_int16_float64") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4529; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_values = ((PyArrayObject *)values[0]); __pyx_v_indexer = values[1]; __pyx_v_out = ((PyArrayObject *)values[2]); __pyx_v_fill_value = values[3]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("take_2d_multi_int16_float64", 0, 3, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4529; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.take_2d_multi_int16_float64", __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_filename = __pyx_f[2]; __pyx_lineno = 4529; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_5numpy_ndarray, 1, "out", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4531; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_354take_2d_multi_int16_float64(__pyx_self, __pyx_v_values, __pyx_v_indexer, __pyx_v_out, __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_5algos_354take_2d_multi_int16_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_k; Py_ssize_t __pyx_v_n; Py_ssize_t __pyx_v_idx; PyArrayObject *__pyx_v_idx0 = 0; PyArrayObject *__pyx_v_idx1 = 0; __pyx_t_5numpy_float64_t __pyx_v_fv; __Pyx_LocalBuf_ND __pyx_pybuffernd_idx0; __Pyx_Buffer __pyx_pybuffer_idx0; __Pyx_LocalBuf_ND __pyx_pybuffernd_idx1; __Pyx_Buffer __pyx_pybuffer_idx1; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_values; __Pyx_Buffer __pyx_pybuffer_values; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyArrayObject *__pyx_t_2 = NULL; PyArrayObject *__pyx_t_3 = NULL; Py_ssize_t __pyx_t_4; __pyx_t_5numpy_float64_t __pyx_t_5; Py_ssize_t __pyx_t_6; int __pyx_t_7; Py_ssize_t __pyx_t_8; Py_ssize_t __pyx_t_9; Py_ssize_t __pyx_t_10; Py_ssize_t __pyx_t_11; Py_ssize_t __pyx_t_12; Py_ssize_t __pyx_t_13; Py_ssize_t __pyx_t_14; Py_ssize_t __pyx_t_15; __pyx_t_5numpy_int64_t __pyx_t_16; Py_ssize_t __pyx_t_17; Py_ssize_t __pyx_t_18; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("take_2d_multi_int16_float64", 0); __pyx_pybuffer_idx0.pybuffer.buf = NULL; __pyx_pybuffer_idx0.refcount = 0; __pyx_pybuffernd_idx0.data = NULL; __pyx_pybuffernd_idx0.rcbuffer = &__pyx_pybuffer_idx0; __pyx_pybuffer_idx1.pybuffer.buf = NULL; __pyx_pybuffer_idx1.refcount = 0; __pyx_pybuffernd_idx1.data = NULL; __pyx_pybuffernd_idx1.rcbuffer = &__pyx_pybuffer_idx1; __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_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; { __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_int16_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4529; __pyx_clineno = __LINE__; goto __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_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; 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, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4529; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; __pyx_pybuffernd_out.diminfo[1].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_out.diminfo[1].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[1]; /* "pandas/src/generated.pyx":4535 * cdef: * Py_ssize_t i, j, k, n, idx * ndarray[int64_t] idx0 = indexer[0] # <<<<<<<<<<<<<< * ndarray[int64_t] idx1 = indexer[1] * float64_t fv */ __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_indexer, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4535; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 4535; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_2 = ((PyArrayObject *)__pyx_t_1); { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_idx0.rcbuffer->pybuffer, (PyObject*)__pyx_t_2, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { __pyx_v_idx0 = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_idx0.rcbuffer->pybuffer.buf = NULL; {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4535; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } else {__pyx_pybuffernd_idx0.diminfo[0].strides = __pyx_pybuffernd_idx0.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_idx0.diminfo[0].shape = __pyx_pybuffernd_idx0.rcbuffer->pybuffer.shape[0]; } } __pyx_t_2 = 0; __pyx_v_idx0 = ((PyArrayObject *)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/generated.pyx":4536 * Py_ssize_t i, j, k, n, idx * ndarray[int64_t] idx0 = indexer[0] * ndarray[int64_t] idx1 = indexer[1] # <<<<<<<<<<<<<< * float64_t fv * */ __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_indexer, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4536; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 4536; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_3 = ((PyArrayObject *)__pyx_t_1); { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_idx1.rcbuffer->pybuffer, (PyObject*)__pyx_t_3, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { __pyx_v_idx1 = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_idx1.rcbuffer->pybuffer.buf = NULL; {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4536; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } else {__pyx_pybuffernd_idx1.diminfo[0].strides = __pyx_pybuffernd_idx1.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_idx1.diminfo[0].shape = __pyx_pybuffernd_idx1.rcbuffer->pybuffer.shape[0]; } } __pyx_t_3 = 0; __pyx_v_idx1 = ((PyArrayObject *)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/generated.pyx":4539 * float64_t fv * * n = len(idx0) # <<<<<<<<<<<<<< * k = len(idx1) * */ __pyx_t_4 = PyObject_Length(((PyObject *)__pyx_v_idx0)); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4539; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_4; /* "pandas/src/generated.pyx":4540 * * n = len(idx0) * k = len(idx1) # <<<<<<<<<<<<<< * * fv = fill_value */ __pyx_t_4 = PyObject_Length(((PyObject *)__pyx_v_idx1)); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4540; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_k = __pyx_t_4; /* "pandas/src/generated.pyx":4542 * k = len(idx1) * * fv = fill_value # <<<<<<<<<<<<<< * for i from 0 <= i < n: * idx = idx0[i] */ __pyx_t_5 = __pyx_PyFloat_AsDouble(__pyx_v_fill_value); if (unlikely((__pyx_t_5 == (npy_float64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4542; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_fv = __pyx_t_5; /* "pandas/src/generated.pyx":4543 * * fv = fill_value * for i from 0 <= i < n: # <<<<<<<<<<<<<< * idx = idx0[i] * if idx == -1: */ __pyx_t_4 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_4; __pyx_v_i++) { /* "pandas/src/generated.pyx":4544 * fv = fill_value * for i from 0 <= i < n: * idx = idx0[i] # <<<<<<<<<<<<<< * if idx == -1: * for j from 0 <= j < k: */ __pyx_t_6 = __pyx_v_i; __pyx_v_idx = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_idx0.rcbuffer->pybuffer.buf, __pyx_t_6, __pyx_pybuffernd_idx0.diminfo[0].strides)); /* "pandas/src/generated.pyx":4545 * for i from 0 <= i < n: * idx = idx0[i] * if idx == -1: # <<<<<<<<<<<<<< * for j from 0 <= j < k: * out[i, j] = fv */ __pyx_t_7 = ((__pyx_v_idx == -1) != 0); if (__pyx_t_7) { /* "pandas/src/generated.pyx":4546 * idx = idx0[i] * if idx == -1: * for j from 0 <= j < k: # <<<<<<<<<<<<<< * out[i, j] = fv * else: */ __pyx_t_8 = __pyx_v_k; for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_8; __pyx_v_j++) { /* "pandas/src/generated.pyx":4547 * if idx == -1: * for j from 0 <= j < k: * out[i, j] = fv # <<<<<<<<<<<<<< * else: * for j from 0 <= j < k: */ __pyx_t_9 = __pyx_v_i; __pyx_t_10 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_9, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_10, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_fv; } goto __pyx_L5; } /*else*/ { /* "pandas/src/generated.pyx":4549 * out[i, j] = fv * else: * for j from 0 <= j < k: # <<<<<<<<<<<<<< * if idx1[j] == -1: * out[i, j] = fv */ __pyx_t_8 = __pyx_v_k; for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_8; __pyx_v_j++) { /* "pandas/src/generated.pyx":4550 * else: * for j from 0 <= j < k: * if idx1[j] == -1: # <<<<<<<<<<<<<< * out[i, j] = fv * else: */ __pyx_t_11 = __pyx_v_j; __pyx_t_7 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_idx1.rcbuffer->pybuffer.buf, __pyx_t_11, __pyx_pybuffernd_idx1.diminfo[0].strides)) == -1) != 0); if (__pyx_t_7) { /* "pandas/src/generated.pyx":4551 * for j from 0 <= j < k: * if idx1[j] == -1: * out[i, j] = fv # <<<<<<<<<<<<<< * else: * out[i, j] = values[idx, idx1[j]] */ __pyx_t_12 = __pyx_v_i; __pyx_t_13 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_12, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_13, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_fv; goto __pyx_L10; } /*else*/ { /* "pandas/src/generated.pyx":4553 * out[i, j] = fv * else: * out[i, j] = values[idx, idx1[j]] # <<<<<<<<<<<<<< * * @cython.wraparound(False) */ __pyx_t_14 = __pyx_v_j; __pyx_t_15 = __pyx_v_idx; __pyx_t_16 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_idx1.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_idx1.diminfo[0].strides)); __pyx_t_17 = __pyx_v_i; __pyx_t_18 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_18, __pyx_pybuffernd_out.diminfo[1].strides) = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int16_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_16, __pyx_pybuffernd_values.diminfo[1].strides)); } __pyx_L10:; } } __pyx_L5:; } /* "pandas/src/generated.pyx":4529 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_multi_int16_float64(ndarray[int16_t, ndim=2] values, # <<<<<<<<<<<<<< * indexer, * ndarray[float64_t, ndim=2] out, */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_idx0.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_idx1.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.take_2d_multi_int16_float64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_idx0.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_idx1.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_idx0); __Pyx_XDECREF((PyObject *)__pyx_v_idx1); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":4557 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_multi_int32_int32(ndarray[int32_t, ndim=2] values, # <<<<<<<<<<<<<< * indexer, * ndarray[int32_t, ndim=2] out, */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_357take_2d_multi_int32_int32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_357take_2d_multi_int32_int32 = {__Pyx_NAMESTR("take_2d_multi_int32_int32"), (PyCFunction)__pyx_pw_6pandas_5algos_357take_2d_multi_int32_int32, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_357take_2d_multi_int32_int32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_values = 0; PyObject *__pyx_v_indexer = 0; PyArrayObject *__pyx_v_out = 0; PyObject *__pyx_v_fill_value = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("take_2d_multi_int32_int32 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_values,&__pyx_n_s_indexer,&__pyx_n_s_out,&__pyx_n_s_fill_value,0}; PyObject* values[4] = {0,0,0,0}; values[3] = __pyx_k__168; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_values)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_indexer)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_2d_multi_int32_int32", 0, 3, 4, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4557; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_out)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_2d_multi_int32_int32", 0, 3, 4, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4557; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_fill_value); if (value) { values[3] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "take_2d_multi_int32_int32") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4557; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_values = ((PyArrayObject *)values[0]); __pyx_v_indexer = values[1]; __pyx_v_out = ((PyArrayObject *)values[2]); __pyx_v_fill_value = values[3]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("take_2d_multi_int32_int32", 0, 3, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4557; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.take_2d_multi_int32_int32", __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_filename = __pyx_f[2]; __pyx_lineno = 4557; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_5numpy_ndarray, 1, "out", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4559; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_356take_2d_multi_int32_int32(__pyx_self, __pyx_v_values, __pyx_v_indexer, __pyx_v_out, __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_5algos_356take_2d_multi_int32_int32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_k; Py_ssize_t __pyx_v_n; Py_ssize_t __pyx_v_idx; PyArrayObject *__pyx_v_idx0 = 0; PyArrayObject *__pyx_v_idx1 = 0; __pyx_t_5numpy_int32_t __pyx_v_fv; __Pyx_LocalBuf_ND __pyx_pybuffernd_idx0; __Pyx_Buffer __pyx_pybuffer_idx0; __Pyx_LocalBuf_ND __pyx_pybuffernd_idx1; __Pyx_Buffer __pyx_pybuffer_idx1; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_values; __Pyx_Buffer __pyx_pybuffer_values; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyArrayObject *__pyx_t_2 = NULL; PyArrayObject *__pyx_t_3 = NULL; Py_ssize_t __pyx_t_4; __pyx_t_5numpy_int32_t __pyx_t_5; Py_ssize_t __pyx_t_6; int __pyx_t_7; Py_ssize_t __pyx_t_8; Py_ssize_t __pyx_t_9; Py_ssize_t __pyx_t_10; Py_ssize_t __pyx_t_11; Py_ssize_t __pyx_t_12; Py_ssize_t __pyx_t_13; Py_ssize_t __pyx_t_14; Py_ssize_t __pyx_t_15; __pyx_t_5numpy_int64_t __pyx_t_16; Py_ssize_t __pyx_t_17; Py_ssize_t __pyx_t_18; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("take_2d_multi_int32_int32", 0); __pyx_pybuffer_idx0.pybuffer.buf = NULL; __pyx_pybuffer_idx0.refcount = 0; __pyx_pybuffernd_idx0.data = NULL; __pyx_pybuffernd_idx0.rcbuffer = &__pyx_pybuffer_idx0; __pyx_pybuffer_idx1.pybuffer.buf = NULL; __pyx_pybuffer_idx1.refcount = 0; __pyx_pybuffernd_idx1.data = NULL; __pyx_pybuffernd_idx1.rcbuffer = &__pyx_pybuffer_idx1; __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_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; { __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_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4557; __pyx_clineno = __LINE__; goto __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_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_v_out, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4557; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; __pyx_pybuffernd_out.diminfo[1].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_out.diminfo[1].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[1]; /* "pandas/src/generated.pyx":4563 * cdef: * Py_ssize_t i, j, k, n, idx * ndarray[int64_t] idx0 = indexer[0] # <<<<<<<<<<<<<< * ndarray[int64_t] idx1 = indexer[1] * int32_t fv */ __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_indexer, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4563; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 4563; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_2 = ((PyArrayObject *)__pyx_t_1); { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_idx0.rcbuffer->pybuffer, (PyObject*)__pyx_t_2, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { __pyx_v_idx0 = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_idx0.rcbuffer->pybuffer.buf = NULL; {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4563; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } else {__pyx_pybuffernd_idx0.diminfo[0].strides = __pyx_pybuffernd_idx0.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_idx0.diminfo[0].shape = __pyx_pybuffernd_idx0.rcbuffer->pybuffer.shape[0]; } } __pyx_t_2 = 0; __pyx_v_idx0 = ((PyArrayObject *)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/generated.pyx":4564 * Py_ssize_t i, j, k, n, idx * ndarray[int64_t] idx0 = indexer[0] * ndarray[int64_t] idx1 = indexer[1] # <<<<<<<<<<<<<< * int32_t fv * */ __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_indexer, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4564; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 4564; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_3 = ((PyArrayObject *)__pyx_t_1); { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_idx1.rcbuffer->pybuffer, (PyObject*)__pyx_t_3, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { __pyx_v_idx1 = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_idx1.rcbuffer->pybuffer.buf = NULL; {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4564; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } else {__pyx_pybuffernd_idx1.diminfo[0].strides = __pyx_pybuffernd_idx1.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_idx1.diminfo[0].shape = __pyx_pybuffernd_idx1.rcbuffer->pybuffer.shape[0]; } } __pyx_t_3 = 0; __pyx_v_idx1 = ((PyArrayObject *)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/generated.pyx":4567 * int32_t fv * * n = len(idx0) # <<<<<<<<<<<<<< * k = len(idx1) * */ __pyx_t_4 = PyObject_Length(((PyObject *)__pyx_v_idx0)); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4567; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_4; /* "pandas/src/generated.pyx":4568 * * n = len(idx0) * k = len(idx1) # <<<<<<<<<<<<<< * * fv = fill_value */ __pyx_t_4 = PyObject_Length(((PyObject *)__pyx_v_idx1)); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4568; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_k = __pyx_t_4; /* "pandas/src/generated.pyx":4570 * k = len(idx1) * * fv = fill_value # <<<<<<<<<<<<<< * for i from 0 <= i < n: * idx = idx0[i] */ __pyx_t_5 = __Pyx_PyInt_As_npy_int32(__pyx_v_fill_value); if (unlikely((__pyx_t_5 == (npy_int32)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4570; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_fv = __pyx_t_5; /* "pandas/src/generated.pyx":4571 * * fv = fill_value * for i from 0 <= i < n: # <<<<<<<<<<<<<< * idx = idx0[i] * if idx == -1: */ __pyx_t_4 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_4; __pyx_v_i++) { /* "pandas/src/generated.pyx":4572 * fv = fill_value * for i from 0 <= i < n: * idx = idx0[i] # <<<<<<<<<<<<<< * if idx == -1: * for j from 0 <= j < k: */ __pyx_t_6 = __pyx_v_i; __pyx_v_idx = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_idx0.rcbuffer->pybuffer.buf, __pyx_t_6, __pyx_pybuffernd_idx0.diminfo[0].strides)); /* "pandas/src/generated.pyx":4573 * for i from 0 <= i < n: * idx = idx0[i] * if idx == -1: # <<<<<<<<<<<<<< * for j from 0 <= j < k: * out[i, j] = fv */ __pyx_t_7 = ((__pyx_v_idx == -1) != 0); if (__pyx_t_7) { /* "pandas/src/generated.pyx":4574 * idx = idx0[i] * if idx == -1: * for j from 0 <= j < k: # <<<<<<<<<<<<<< * out[i, j] = fv * else: */ __pyx_t_8 = __pyx_v_k; for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_8; __pyx_v_j++) { /* "pandas/src/generated.pyx":4575 * if idx == -1: * for j from 0 <= j < k: * out[i, j] = fv # <<<<<<<<<<<<<< * else: * for j from 0 <= j < k: */ __pyx_t_9 = __pyx_v_i; __pyx_t_10 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_9, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_10, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_fv; } goto __pyx_L5; } /*else*/ { /* "pandas/src/generated.pyx":4577 * out[i, j] = fv * else: * for j from 0 <= j < k: # <<<<<<<<<<<<<< * if idx1[j] == -1: * out[i, j] = fv */ __pyx_t_8 = __pyx_v_k; for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_8; __pyx_v_j++) { /* "pandas/src/generated.pyx":4578 * else: * for j from 0 <= j < k: * if idx1[j] == -1: # <<<<<<<<<<<<<< * out[i, j] = fv * else: */ __pyx_t_11 = __pyx_v_j; __pyx_t_7 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_idx1.rcbuffer->pybuffer.buf, __pyx_t_11, __pyx_pybuffernd_idx1.diminfo[0].strides)) == -1) != 0); if (__pyx_t_7) { /* "pandas/src/generated.pyx":4579 * for j from 0 <= j < k: * if idx1[j] == -1: * out[i, j] = fv # <<<<<<<<<<<<<< * else: * out[i, j] = values[idx, idx1[j]] */ __pyx_t_12 = __pyx_v_i; __pyx_t_13 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_12, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_13, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_fv; goto __pyx_L10; } /*else*/ { /* "pandas/src/generated.pyx":4581 * out[i, j] = fv * else: * out[i, j] = values[idx, idx1[j]] # <<<<<<<<<<<<<< * * @cython.wraparound(False) */ __pyx_t_14 = __pyx_v_j; __pyx_t_15 = __pyx_v_idx; __pyx_t_16 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_idx1.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_idx1.diminfo[0].strides)); __pyx_t_17 = __pyx_v_i; __pyx_t_18 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_18, __pyx_pybuffernd_out.diminfo[1].strides) = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_16, __pyx_pybuffernd_values.diminfo[1].strides)); } __pyx_L10:; } } __pyx_L5:; } /* "pandas/src/generated.pyx":4557 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_multi_int32_int32(ndarray[int32_t, ndim=2] values, # <<<<<<<<<<<<<< * indexer, * ndarray[int32_t, ndim=2] out, */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_idx0.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_idx1.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.take_2d_multi_int32_int32", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_idx0.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_idx1.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_idx0); __Pyx_XDECREF((PyObject *)__pyx_v_idx1); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":4585 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_multi_int32_int64(ndarray[int32_t, ndim=2] values, # <<<<<<<<<<<<<< * indexer, * ndarray[int64_t, ndim=2] out, */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_359take_2d_multi_int32_int64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_359take_2d_multi_int32_int64 = {__Pyx_NAMESTR("take_2d_multi_int32_int64"), (PyCFunction)__pyx_pw_6pandas_5algos_359take_2d_multi_int32_int64, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_359take_2d_multi_int32_int64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_values = 0; PyObject *__pyx_v_indexer = 0; PyArrayObject *__pyx_v_out = 0; PyObject *__pyx_v_fill_value = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("take_2d_multi_int32_int64 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_values,&__pyx_n_s_indexer,&__pyx_n_s_out,&__pyx_n_s_fill_value,0}; PyObject* values[4] = {0,0,0,0}; values[3] = __pyx_k__169; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_values)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_indexer)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_2d_multi_int32_int64", 0, 3, 4, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4585; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_out)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_2d_multi_int32_int64", 0, 3, 4, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4585; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_fill_value); if (value) { values[3] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "take_2d_multi_int32_int64") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4585; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_values = ((PyArrayObject *)values[0]); __pyx_v_indexer = values[1]; __pyx_v_out = ((PyArrayObject *)values[2]); __pyx_v_fill_value = values[3]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("take_2d_multi_int32_int64", 0, 3, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4585; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.take_2d_multi_int32_int64", __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_filename = __pyx_f[2]; __pyx_lineno = 4585; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_5numpy_ndarray, 1, "out", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4587; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_358take_2d_multi_int32_int64(__pyx_self, __pyx_v_values, __pyx_v_indexer, __pyx_v_out, __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_5algos_358take_2d_multi_int32_int64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_k; Py_ssize_t __pyx_v_n; Py_ssize_t __pyx_v_idx; PyArrayObject *__pyx_v_idx0 = 0; PyArrayObject *__pyx_v_idx1 = 0; __pyx_t_5numpy_int64_t __pyx_v_fv; __Pyx_LocalBuf_ND __pyx_pybuffernd_idx0; __Pyx_Buffer __pyx_pybuffer_idx0; __Pyx_LocalBuf_ND __pyx_pybuffernd_idx1; __Pyx_Buffer __pyx_pybuffer_idx1; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_values; __Pyx_Buffer __pyx_pybuffer_values; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyArrayObject *__pyx_t_2 = NULL; PyArrayObject *__pyx_t_3 = NULL; Py_ssize_t __pyx_t_4; __pyx_t_5numpy_int64_t __pyx_t_5; Py_ssize_t __pyx_t_6; int __pyx_t_7; Py_ssize_t __pyx_t_8; Py_ssize_t __pyx_t_9; Py_ssize_t __pyx_t_10; Py_ssize_t __pyx_t_11; Py_ssize_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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("take_2d_multi_int32_int64", 0); __pyx_pybuffer_idx0.pybuffer.buf = NULL; __pyx_pybuffer_idx0.refcount = 0; __pyx_pybuffernd_idx0.data = NULL; __pyx_pybuffernd_idx0.rcbuffer = &__pyx_pybuffer_idx0; __pyx_pybuffer_idx1.pybuffer.buf = NULL; __pyx_pybuffer_idx1.refcount = 0; __pyx_pybuffernd_idx1.data = NULL; __pyx_pybuffernd_idx1.rcbuffer = &__pyx_pybuffer_idx1; __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_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; { __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_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4585; __pyx_clineno = __LINE__; goto __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_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; 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, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4585; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; __pyx_pybuffernd_out.diminfo[1].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_out.diminfo[1].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[1]; /* "pandas/src/generated.pyx":4591 * cdef: * Py_ssize_t i, j, k, n, idx * ndarray[int64_t] idx0 = indexer[0] # <<<<<<<<<<<<<< * ndarray[int64_t] idx1 = indexer[1] * int64_t fv */ __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_indexer, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4591; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 4591; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_2 = ((PyArrayObject *)__pyx_t_1); { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_idx0.rcbuffer->pybuffer, (PyObject*)__pyx_t_2, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { __pyx_v_idx0 = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_idx0.rcbuffer->pybuffer.buf = NULL; {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4591; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } else {__pyx_pybuffernd_idx0.diminfo[0].strides = __pyx_pybuffernd_idx0.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_idx0.diminfo[0].shape = __pyx_pybuffernd_idx0.rcbuffer->pybuffer.shape[0]; } } __pyx_t_2 = 0; __pyx_v_idx0 = ((PyArrayObject *)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/generated.pyx":4592 * Py_ssize_t i, j, k, n, idx * ndarray[int64_t] idx0 = indexer[0] * ndarray[int64_t] idx1 = indexer[1] # <<<<<<<<<<<<<< * int64_t fv * */ __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_indexer, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4592; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 4592; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_3 = ((PyArrayObject *)__pyx_t_1); { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_idx1.rcbuffer->pybuffer, (PyObject*)__pyx_t_3, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { __pyx_v_idx1 = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_idx1.rcbuffer->pybuffer.buf = NULL; {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4592; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } else {__pyx_pybuffernd_idx1.diminfo[0].strides = __pyx_pybuffernd_idx1.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_idx1.diminfo[0].shape = __pyx_pybuffernd_idx1.rcbuffer->pybuffer.shape[0]; } } __pyx_t_3 = 0; __pyx_v_idx1 = ((PyArrayObject *)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/generated.pyx":4595 * int64_t fv * * n = len(idx0) # <<<<<<<<<<<<<< * k = len(idx1) * */ __pyx_t_4 = PyObject_Length(((PyObject *)__pyx_v_idx0)); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4595; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_4; /* "pandas/src/generated.pyx":4596 * * n = len(idx0) * k = len(idx1) # <<<<<<<<<<<<<< * * fv = fill_value */ __pyx_t_4 = PyObject_Length(((PyObject *)__pyx_v_idx1)); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4596; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_k = __pyx_t_4; /* "pandas/src/generated.pyx":4598 * k = len(idx1) * * fv = fill_value # <<<<<<<<<<<<<< * for i from 0 <= i < n: * idx = idx0[i] */ __pyx_t_5 = __Pyx_PyInt_As_npy_int64(__pyx_v_fill_value); if (unlikely((__pyx_t_5 == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4598; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_fv = __pyx_t_5; /* "pandas/src/generated.pyx":4599 * * fv = fill_value * for i from 0 <= i < n: # <<<<<<<<<<<<<< * idx = idx0[i] * if idx == -1: */ __pyx_t_4 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_4; __pyx_v_i++) { /* "pandas/src/generated.pyx":4600 * fv = fill_value * for i from 0 <= i < n: * idx = idx0[i] # <<<<<<<<<<<<<< * if idx == -1: * for j from 0 <= j < k: */ __pyx_t_6 = __pyx_v_i; __pyx_v_idx = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_idx0.rcbuffer->pybuffer.buf, __pyx_t_6, __pyx_pybuffernd_idx0.diminfo[0].strides)); /* "pandas/src/generated.pyx":4601 * for i from 0 <= i < n: * idx = idx0[i] * if idx == -1: # <<<<<<<<<<<<<< * for j from 0 <= j < k: * out[i, j] = fv */ __pyx_t_7 = ((__pyx_v_idx == -1) != 0); if (__pyx_t_7) { /* "pandas/src/generated.pyx":4602 * idx = idx0[i] * if idx == -1: * for j from 0 <= j < k: # <<<<<<<<<<<<<< * out[i, j] = fv * else: */ __pyx_t_8 = __pyx_v_k; for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_8; __pyx_v_j++) { /* "pandas/src/generated.pyx":4603 * if idx == -1: * for j from 0 <= j < k: * out[i, j] = fv # <<<<<<<<<<<<<< * else: * for j from 0 <= j < k: */ __pyx_t_9 = __pyx_v_i; __pyx_t_10 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_9, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_10, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_fv; } goto __pyx_L5; } /*else*/ { /* "pandas/src/generated.pyx":4605 * out[i, j] = fv * else: * for j from 0 <= j < k: # <<<<<<<<<<<<<< * if idx1[j] == -1: * out[i, j] = fv */ __pyx_t_8 = __pyx_v_k; for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_8; __pyx_v_j++) { /* "pandas/src/generated.pyx":4606 * else: * for j from 0 <= j < k: * if idx1[j] == -1: # <<<<<<<<<<<<<< * out[i, j] = fv * else: */ __pyx_t_11 = __pyx_v_j; __pyx_t_7 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_idx1.rcbuffer->pybuffer.buf, __pyx_t_11, __pyx_pybuffernd_idx1.diminfo[0].strides)) == -1) != 0); if (__pyx_t_7) { /* "pandas/src/generated.pyx":4607 * for j from 0 <= j < k: * if idx1[j] == -1: * out[i, j] = fv # <<<<<<<<<<<<<< * else: * out[i, j] = values[idx, idx1[j]] */ __pyx_t_12 = __pyx_v_i; __pyx_t_13 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_12, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_13, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_fv; goto __pyx_L10; } /*else*/ { /* "pandas/src/generated.pyx":4609 * out[i, j] = fv * else: * out[i, j] = values[idx, idx1[j]] # <<<<<<<<<<<<<< * * @cython.wraparound(False) */ __pyx_t_14 = __pyx_v_j; __pyx_t_15 = __pyx_v_idx; __pyx_t_5 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_idx1.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_idx1.diminfo[0].strides)); __pyx_t_16 = __pyx_v_i; __pyx_t_17 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_17, __pyx_pybuffernd_out.diminfo[1].strides) = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_5, __pyx_pybuffernd_values.diminfo[1].strides)); } __pyx_L10:; } } __pyx_L5:; } /* "pandas/src/generated.pyx":4585 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_multi_int32_int64(ndarray[int32_t, ndim=2] values, # <<<<<<<<<<<<<< * indexer, * ndarray[int64_t, ndim=2] out, */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_idx0.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_idx1.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.take_2d_multi_int32_int64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_idx0.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_idx1.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_idx0); __Pyx_XDECREF((PyObject *)__pyx_v_idx1); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":4613 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_multi_int32_float64(ndarray[int32_t, ndim=2] values, # <<<<<<<<<<<<<< * indexer, * ndarray[float64_t, ndim=2] out, */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_361take_2d_multi_int32_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_361take_2d_multi_int32_float64 = {__Pyx_NAMESTR("take_2d_multi_int32_float64"), (PyCFunction)__pyx_pw_6pandas_5algos_361take_2d_multi_int32_float64, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_361take_2d_multi_int32_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_values = 0; PyObject *__pyx_v_indexer = 0; PyArrayObject *__pyx_v_out = 0; PyObject *__pyx_v_fill_value = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("take_2d_multi_int32_float64 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_values,&__pyx_n_s_indexer,&__pyx_n_s_out,&__pyx_n_s_fill_value,0}; PyObject* values[4] = {0,0,0,0}; values[3] = __pyx_k__170; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_values)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_indexer)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_2d_multi_int32_float64", 0, 3, 4, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4613; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_out)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_2d_multi_int32_float64", 0, 3, 4, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4613; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_fill_value); if (value) { values[3] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "take_2d_multi_int32_float64") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4613; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_values = ((PyArrayObject *)values[0]); __pyx_v_indexer = values[1]; __pyx_v_out = ((PyArrayObject *)values[2]); __pyx_v_fill_value = values[3]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("take_2d_multi_int32_float64", 0, 3, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4613; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.take_2d_multi_int32_float64", __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_filename = __pyx_f[2]; __pyx_lineno = 4613; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_5numpy_ndarray, 1, "out", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4615; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_360take_2d_multi_int32_float64(__pyx_self, __pyx_v_values, __pyx_v_indexer, __pyx_v_out, __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_5algos_360take_2d_multi_int32_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_k; Py_ssize_t __pyx_v_n; Py_ssize_t __pyx_v_idx; PyArrayObject *__pyx_v_idx0 = 0; PyArrayObject *__pyx_v_idx1 = 0; __pyx_t_5numpy_float64_t __pyx_v_fv; __Pyx_LocalBuf_ND __pyx_pybuffernd_idx0; __Pyx_Buffer __pyx_pybuffer_idx0; __Pyx_LocalBuf_ND __pyx_pybuffernd_idx1; __Pyx_Buffer __pyx_pybuffer_idx1; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_values; __Pyx_Buffer __pyx_pybuffer_values; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyArrayObject *__pyx_t_2 = NULL; PyArrayObject *__pyx_t_3 = NULL; Py_ssize_t __pyx_t_4; __pyx_t_5numpy_float64_t __pyx_t_5; Py_ssize_t __pyx_t_6; int __pyx_t_7; Py_ssize_t __pyx_t_8; Py_ssize_t __pyx_t_9; Py_ssize_t __pyx_t_10; Py_ssize_t __pyx_t_11; Py_ssize_t __pyx_t_12; Py_ssize_t __pyx_t_13; Py_ssize_t __pyx_t_14; Py_ssize_t __pyx_t_15; __pyx_t_5numpy_int64_t __pyx_t_16; Py_ssize_t __pyx_t_17; Py_ssize_t __pyx_t_18; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("take_2d_multi_int32_float64", 0); __pyx_pybuffer_idx0.pybuffer.buf = NULL; __pyx_pybuffer_idx0.refcount = 0; __pyx_pybuffernd_idx0.data = NULL; __pyx_pybuffernd_idx0.rcbuffer = &__pyx_pybuffer_idx0; __pyx_pybuffer_idx1.pybuffer.buf = NULL; __pyx_pybuffer_idx1.refcount = 0; __pyx_pybuffernd_idx1.data = NULL; __pyx_pybuffernd_idx1.rcbuffer = &__pyx_pybuffer_idx1; __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_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; { __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_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4613; __pyx_clineno = __LINE__; goto __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_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; 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, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4613; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; __pyx_pybuffernd_out.diminfo[1].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_out.diminfo[1].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[1]; /* "pandas/src/generated.pyx":4619 * cdef: * Py_ssize_t i, j, k, n, idx * ndarray[int64_t] idx0 = indexer[0] # <<<<<<<<<<<<<< * ndarray[int64_t] idx1 = indexer[1] * float64_t fv */ __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_indexer, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4619; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 4619; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_2 = ((PyArrayObject *)__pyx_t_1); { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_idx0.rcbuffer->pybuffer, (PyObject*)__pyx_t_2, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { __pyx_v_idx0 = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_idx0.rcbuffer->pybuffer.buf = NULL; {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4619; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } else {__pyx_pybuffernd_idx0.diminfo[0].strides = __pyx_pybuffernd_idx0.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_idx0.diminfo[0].shape = __pyx_pybuffernd_idx0.rcbuffer->pybuffer.shape[0]; } } __pyx_t_2 = 0; __pyx_v_idx0 = ((PyArrayObject *)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/generated.pyx":4620 * Py_ssize_t i, j, k, n, idx * ndarray[int64_t] idx0 = indexer[0] * ndarray[int64_t] idx1 = indexer[1] # <<<<<<<<<<<<<< * float64_t fv * */ __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_indexer, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4620; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 4620; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_3 = ((PyArrayObject *)__pyx_t_1); { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_idx1.rcbuffer->pybuffer, (PyObject*)__pyx_t_3, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { __pyx_v_idx1 = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_idx1.rcbuffer->pybuffer.buf = NULL; {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4620; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } else {__pyx_pybuffernd_idx1.diminfo[0].strides = __pyx_pybuffernd_idx1.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_idx1.diminfo[0].shape = __pyx_pybuffernd_idx1.rcbuffer->pybuffer.shape[0]; } } __pyx_t_3 = 0; __pyx_v_idx1 = ((PyArrayObject *)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/generated.pyx":4623 * float64_t fv * * n = len(idx0) # <<<<<<<<<<<<<< * k = len(idx1) * */ __pyx_t_4 = PyObject_Length(((PyObject *)__pyx_v_idx0)); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4623; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_4; /* "pandas/src/generated.pyx":4624 * * n = len(idx0) * k = len(idx1) # <<<<<<<<<<<<<< * * fv = fill_value */ __pyx_t_4 = PyObject_Length(((PyObject *)__pyx_v_idx1)); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4624; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_k = __pyx_t_4; /* "pandas/src/generated.pyx":4626 * k = len(idx1) * * fv = fill_value # <<<<<<<<<<<<<< * for i from 0 <= i < n: * idx = idx0[i] */ __pyx_t_5 = __pyx_PyFloat_AsDouble(__pyx_v_fill_value); if (unlikely((__pyx_t_5 == (npy_float64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4626; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_fv = __pyx_t_5; /* "pandas/src/generated.pyx":4627 * * fv = fill_value * for i from 0 <= i < n: # <<<<<<<<<<<<<< * idx = idx0[i] * if idx == -1: */ __pyx_t_4 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_4; __pyx_v_i++) { /* "pandas/src/generated.pyx":4628 * fv = fill_value * for i from 0 <= i < n: * idx = idx0[i] # <<<<<<<<<<<<<< * if idx == -1: * for j from 0 <= j < k: */ __pyx_t_6 = __pyx_v_i; __pyx_v_idx = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_idx0.rcbuffer->pybuffer.buf, __pyx_t_6, __pyx_pybuffernd_idx0.diminfo[0].strides)); /* "pandas/src/generated.pyx":4629 * for i from 0 <= i < n: * idx = idx0[i] * if idx == -1: # <<<<<<<<<<<<<< * for j from 0 <= j < k: * out[i, j] = fv */ __pyx_t_7 = ((__pyx_v_idx == -1) != 0); if (__pyx_t_7) { /* "pandas/src/generated.pyx":4630 * idx = idx0[i] * if idx == -1: * for j from 0 <= j < k: # <<<<<<<<<<<<<< * out[i, j] = fv * else: */ __pyx_t_8 = __pyx_v_k; for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_8; __pyx_v_j++) { /* "pandas/src/generated.pyx":4631 * if idx == -1: * for j from 0 <= j < k: * out[i, j] = fv # <<<<<<<<<<<<<< * else: * for j from 0 <= j < k: */ __pyx_t_9 = __pyx_v_i; __pyx_t_10 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_9, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_10, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_fv; } goto __pyx_L5; } /*else*/ { /* "pandas/src/generated.pyx":4633 * out[i, j] = fv * else: * for j from 0 <= j < k: # <<<<<<<<<<<<<< * if idx1[j] == -1: * out[i, j] = fv */ __pyx_t_8 = __pyx_v_k; for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_8; __pyx_v_j++) { /* "pandas/src/generated.pyx":4634 * else: * for j from 0 <= j < k: * if idx1[j] == -1: # <<<<<<<<<<<<<< * out[i, j] = fv * else: */ __pyx_t_11 = __pyx_v_j; __pyx_t_7 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_idx1.rcbuffer->pybuffer.buf, __pyx_t_11, __pyx_pybuffernd_idx1.diminfo[0].strides)) == -1) != 0); if (__pyx_t_7) { /* "pandas/src/generated.pyx":4635 * for j from 0 <= j < k: * if idx1[j] == -1: * out[i, j] = fv # <<<<<<<<<<<<<< * else: * out[i, j] = values[idx, idx1[j]] */ __pyx_t_12 = __pyx_v_i; __pyx_t_13 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_12, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_13, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_fv; goto __pyx_L10; } /*else*/ { /* "pandas/src/generated.pyx":4637 * out[i, j] = fv * else: * out[i, j] = values[idx, idx1[j]] # <<<<<<<<<<<<<< * * @cython.wraparound(False) */ __pyx_t_14 = __pyx_v_j; __pyx_t_15 = __pyx_v_idx; __pyx_t_16 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_idx1.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_idx1.diminfo[0].strides)); __pyx_t_17 = __pyx_v_i; __pyx_t_18 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_18, __pyx_pybuffernd_out.diminfo[1].strides) = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_16, __pyx_pybuffernd_values.diminfo[1].strides)); } __pyx_L10:; } } __pyx_L5:; } /* "pandas/src/generated.pyx":4613 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_multi_int32_float64(ndarray[int32_t, ndim=2] values, # <<<<<<<<<<<<<< * indexer, * ndarray[float64_t, ndim=2] out, */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_idx0.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_idx1.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.take_2d_multi_int32_float64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_idx0.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_idx1.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_idx0); __Pyx_XDECREF((PyObject *)__pyx_v_idx1); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":4641 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_multi_int64_int64(ndarray[int64_t, ndim=2] values, # <<<<<<<<<<<<<< * indexer, * ndarray[int64_t, ndim=2] out, */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_363take_2d_multi_int64_int64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_363take_2d_multi_int64_int64 = {__Pyx_NAMESTR("take_2d_multi_int64_int64"), (PyCFunction)__pyx_pw_6pandas_5algos_363take_2d_multi_int64_int64, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_363take_2d_multi_int64_int64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_values = 0; PyObject *__pyx_v_indexer = 0; PyArrayObject *__pyx_v_out = 0; PyObject *__pyx_v_fill_value = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("take_2d_multi_int64_int64 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_values,&__pyx_n_s_indexer,&__pyx_n_s_out,&__pyx_n_s_fill_value,0}; PyObject* values[4] = {0,0,0,0}; values[3] = __pyx_k__171; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_values)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_indexer)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_2d_multi_int64_int64", 0, 3, 4, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4641; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_out)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_2d_multi_int64_int64", 0, 3, 4, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4641; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_fill_value); if (value) { values[3] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "take_2d_multi_int64_int64") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4641; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_values = ((PyArrayObject *)values[0]); __pyx_v_indexer = values[1]; __pyx_v_out = ((PyArrayObject *)values[2]); __pyx_v_fill_value = values[3]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("take_2d_multi_int64_int64", 0, 3, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4641; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.take_2d_multi_int64_int64", __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_filename = __pyx_f[2]; __pyx_lineno = 4641; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_5numpy_ndarray, 1, "out", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4643; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_362take_2d_multi_int64_int64(__pyx_self, __pyx_v_values, __pyx_v_indexer, __pyx_v_out, __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_5algos_362take_2d_multi_int64_int64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_k; Py_ssize_t __pyx_v_n; Py_ssize_t __pyx_v_idx; PyArrayObject *__pyx_v_idx0 = 0; PyArrayObject *__pyx_v_idx1 = 0; __pyx_t_5numpy_int64_t __pyx_v_fv; __Pyx_LocalBuf_ND __pyx_pybuffernd_idx0; __Pyx_Buffer __pyx_pybuffer_idx0; __Pyx_LocalBuf_ND __pyx_pybuffernd_idx1; __Pyx_Buffer __pyx_pybuffer_idx1; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_values; __Pyx_Buffer __pyx_pybuffer_values; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyArrayObject *__pyx_t_2 = NULL; PyArrayObject *__pyx_t_3 = NULL; Py_ssize_t __pyx_t_4; __pyx_t_5numpy_int64_t __pyx_t_5; Py_ssize_t __pyx_t_6; int __pyx_t_7; Py_ssize_t __pyx_t_8; Py_ssize_t __pyx_t_9; Py_ssize_t __pyx_t_10; Py_ssize_t __pyx_t_11; Py_ssize_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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("take_2d_multi_int64_int64", 0); __pyx_pybuffer_idx0.pybuffer.buf = NULL; __pyx_pybuffer_idx0.refcount = 0; __pyx_pybuffernd_idx0.data = NULL; __pyx_pybuffernd_idx0.rcbuffer = &__pyx_pybuffer_idx0; __pyx_pybuffer_idx1.pybuffer.buf = NULL; __pyx_pybuffer_idx1.refcount = 0; __pyx_pybuffernd_idx1.data = NULL; __pyx_pybuffernd_idx1.rcbuffer = &__pyx_pybuffer_idx1; __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_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; { __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_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4641; __pyx_clineno = __LINE__; goto __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_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; 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, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4641; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; __pyx_pybuffernd_out.diminfo[1].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_out.diminfo[1].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[1]; /* "pandas/src/generated.pyx":4647 * cdef: * Py_ssize_t i, j, k, n, idx * ndarray[int64_t] idx0 = indexer[0] # <<<<<<<<<<<<<< * ndarray[int64_t] idx1 = indexer[1] * int64_t fv */ __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_indexer, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4647; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 4647; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_2 = ((PyArrayObject *)__pyx_t_1); { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_idx0.rcbuffer->pybuffer, (PyObject*)__pyx_t_2, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { __pyx_v_idx0 = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_idx0.rcbuffer->pybuffer.buf = NULL; {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4647; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } else {__pyx_pybuffernd_idx0.diminfo[0].strides = __pyx_pybuffernd_idx0.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_idx0.diminfo[0].shape = __pyx_pybuffernd_idx0.rcbuffer->pybuffer.shape[0]; } } __pyx_t_2 = 0; __pyx_v_idx0 = ((PyArrayObject *)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/generated.pyx":4648 * Py_ssize_t i, j, k, n, idx * ndarray[int64_t] idx0 = indexer[0] * ndarray[int64_t] idx1 = indexer[1] # <<<<<<<<<<<<<< * int64_t fv * */ __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_indexer, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4648; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 4648; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_3 = ((PyArrayObject *)__pyx_t_1); { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_idx1.rcbuffer->pybuffer, (PyObject*)__pyx_t_3, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { __pyx_v_idx1 = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_idx1.rcbuffer->pybuffer.buf = NULL; {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4648; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } else {__pyx_pybuffernd_idx1.diminfo[0].strides = __pyx_pybuffernd_idx1.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_idx1.diminfo[0].shape = __pyx_pybuffernd_idx1.rcbuffer->pybuffer.shape[0]; } } __pyx_t_3 = 0; __pyx_v_idx1 = ((PyArrayObject *)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/generated.pyx":4651 * int64_t fv * * n = len(idx0) # <<<<<<<<<<<<<< * k = len(idx1) * */ __pyx_t_4 = PyObject_Length(((PyObject *)__pyx_v_idx0)); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4651; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_4; /* "pandas/src/generated.pyx":4652 * * n = len(idx0) * k = len(idx1) # <<<<<<<<<<<<<< * * fv = fill_value */ __pyx_t_4 = PyObject_Length(((PyObject *)__pyx_v_idx1)); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4652; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_k = __pyx_t_4; /* "pandas/src/generated.pyx":4654 * k = len(idx1) * * fv = fill_value # <<<<<<<<<<<<<< * for i from 0 <= i < n: * idx = idx0[i] */ __pyx_t_5 = __Pyx_PyInt_As_npy_int64(__pyx_v_fill_value); if (unlikely((__pyx_t_5 == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4654; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_fv = __pyx_t_5; /* "pandas/src/generated.pyx":4655 * * fv = fill_value * for i from 0 <= i < n: # <<<<<<<<<<<<<< * idx = idx0[i] * if idx == -1: */ __pyx_t_4 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_4; __pyx_v_i++) { /* "pandas/src/generated.pyx":4656 * fv = fill_value * for i from 0 <= i < n: * idx = idx0[i] # <<<<<<<<<<<<<< * if idx == -1: * for j from 0 <= j < k: */ __pyx_t_6 = __pyx_v_i; __pyx_v_idx = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_idx0.rcbuffer->pybuffer.buf, __pyx_t_6, __pyx_pybuffernd_idx0.diminfo[0].strides)); /* "pandas/src/generated.pyx":4657 * for i from 0 <= i < n: * idx = idx0[i] * if idx == -1: # <<<<<<<<<<<<<< * for j from 0 <= j < k: * out[i, j] = fv */ __pyx_t_7 = ((__pyx_v_idx == -1) != 0); if (__pyx_t_7) { /* "pandas/src/generated.pyx":4658 * idx = idx0[i] * if idx == -1: * for j from 0 <= j < k: # <<<<<<<<<<<<<< * out[i, j] = fv * else: */ __pyx_t_8 = __pyx_v_k; for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_8; __pyx_v_j++) { /* "pandas/src/generated.pyx":4659 * if idx == -1: * for j from 0 <= j < k: * out[i, j] = fv # <<<<<<<<<<<<<< * else: * for j from 0 <= j < k: */ __pyx_t_9 = __pyx_v_i; __pyx_t_10 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_9, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_10, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_fv; } goto __pyx_L5; } /*else*/ { /* "pandas/src/generated.pyx":4661 * out[i, j] = fv * else: * for j from 0 <= j < k: # <<<<<<<<<<<<<< * if idx1[j] == -1: * out[i, j] = fv */ __pyx_t_8 = __pyx_v_k; for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_8; __pyx_v_j++) { /* "pandas/src/generated.pyx":4662 * else: * for j from 0 <= j < k: * if idx1[j] == -1: # <<<<<<<<<<<<<< * out[i, j] = fv * else: */ __pyx_t_11 = __pyx_v_j; __pyx_t_7 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_idx1.rcbuffer->pybuffer.buf, __pyx_t_11, __pyx_pybuffernd_idx1.diminfo[0].strides)) == -1) != 0); if (__pyx_t_7) { /* "pandas/src/generated.pyx":4663 * for j from 0 <= j < k: * if idx1[j] == -1: * out[i, j] = fv # <<<<<<<<<<<<<< * else: * out[i, j] = values[idx, idx1[j]] */ __pyx_t_12 = __pyx_v_i; __pyx_t_13 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_12, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_13, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_fv; goto __pyx_L10; } /*else*/ { /* "pandas/src/generated.pyx":4665 * out[i, j] = fv * else: * out[i, j] = values[idx, idx1[j]] # <<<<<<<<<<<<<< * * @cython.wraparound(False) */ __pyx_t_14 = __pyx_v_j; __pyx_t_15 = __pyx_v_idx; __pyx_t_5 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_idx1.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_idx1.diminfo[0].strides)); __pyx_t_16 = __pyx_v_i; __pyx_t_17 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_17, __pyx_pybuffernd_out.diminfo[1].strides) = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_5, __pyx_pybuffernd_values.diminfo[1].strides)); } __pyx_L10:; } } __pyx_L5:; } /* "pandas/src/generated.pyx":4641 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_multi_int64_int64(ndarray[int64_t, ndim=2] values, # <<<<<<<<<<<<<< * indexer, * ndarray[int64_t, ndim=2] out, */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_idx0.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_idx1.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.take_2d_multi_int64_int64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_idx0.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_idx1.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_idx0); __Pyx_XDECREF((PyObject *)__pyx_v_idx1); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":4669 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_multi_int64_float64(ndarray[int64_t, ndim=2] values, # <<<<<<<<<<<<<< * indexer, * ndarray[float64_t, ndim=2] out, */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_365take_2d_multi_int64_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_365take_2d_multi_int64_float64 = {__Pyx_NAMESTR("take_2d_multi_int64_float64"), (PyCFunction)__pyx_pw_6pandas_5algos_365take_2d_multi_int64_float64, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_365take_2d_multi_int64_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_values = 0; PyObject *__pyx_v_indexer = 0; PyArrayObject *__pyx_v_out = 0; PyObject *__pyx_v_fill_value = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("take_2d_multi_int64_float64 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_values,&__pyx_n_s_indexer,&__pyx_n_s_out,&__pyx_n_s_fill_value,0}; PyObject* values[4] = {0,0,0,0}; values[3] = __pyx_k__172; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_values)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_indexer)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_2d_multi_int64_float64", 0, 3, 4, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4669; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_out)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_2d_multi_int64_float64", 0, 3, 4, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4669; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_fill_value); if (value) { values[3] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "take_2d_multi_int64_float64") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4669; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_values = ((PyArrayObject *)values[0]); __pyx_v_indexer = values[1]; __pyx_v_out = ((PyArrayObject *)values[2]); __pyx_v_fill_value = values[3]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("take_2d_multi_int64_float64", 0, 3, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4669; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.take_2d_multi_int64_float64", __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_filename = __pyx_f[2]; __pyx_lineno = 4669; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_5numpy_ndarray, 1, "out", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4671; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_364take_2d_multi_int64_float64(__pyx_self, __pyx_v_values, __pyx_v_indexer, __pyx_v_out, __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_5algos_364take_2d_multi_int64_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_k; Py_ssize_t __pyx_v_n; Py_ssize_t __pyx_v_idx; PyArrayObject *__pyx_v_idx0 = 0; PyArrayObject *__pyx_v_idx1 = 0; __pyx_t_5numpy_float64_t __pyx_v_fv; __Pyx_LocalBuf_ND __pyx_pybuffernd_idx0; __Pyx_Buffer __pyx_pybuffer_idx0; __Pyx_LocalBuf_ND __pyx_pybuffernd_idx1; __Pyx_Buffer __pyx_pybuffer_idx1; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_values; __Pyx_Buffer __pyx_pybuffer_values; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyArrayObject *__pyx_t_2 = NULL; PyArrayObject *__pyx_t_3 = NULL; Py_ssize_t __pyx_t_4; __pyx_t_5numpy_float64_t __pyx_t_5; Py_ssize_t __pyx_t_6; int __pyx_t_7; Py_ssize_t __pyx_t_8; Py_ssize_t __pyx_t_9; Py_ssize_t __pyx_t_10; Py_ssize_t __pyx_t_11; Py_ssize_t __pyx_t_12; Py_ssize_t __pyx_t_13; Py_ssize_t __pyx_t_14; Py_ssize_t __pyx_t_15; __pyx_t_5numpy_int64_t __pyx_t_16; Py_ssize_t __pyx_t_17; Py_ssize_t __pyx_t_18; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("take_2d_multi_int64_float64", 0); __pyx_pybuffer_idx0.pybuffer.buf = NULL; __pyx_pybuffer_idx0.refcount = 0; __pyx_pybuffernd_idx0.data = NULL; __pyx_pybuffernd_idx0.rcbuffer = &__pyx_pybuffer_idx0; __pyx_pybuffer_idx1.pybuffer.buf = NULL; __pyx_pybuffer_idx1.refcount = 0; __pyx_pybuffernd_idx1.data = NULL; __pyx_pybuffernd_idx1.rcbuffer = &__pyx_pybuffer_idx1; __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_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; { __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_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4669; __pyx_clineno = __LINE__; goto __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_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; 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, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4669; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; __pyx_pybuffernd_out.diminfo[1].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_out.diminfo[1].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[1]; /* "pandas/src/generated.pyx":4675 * cdef: * Py_ssize_t i, j, k, n, idx * ndarray[int64_t] idx0 = indexer[0] # <<<<<<<<<<<<<< * ndarray[int64_t] idx1 = indexer[1] * float64_t fv */ __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_indexer, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4675; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 4675; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_2 = ((PyArrayObject *)__pyx_t_1); { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_idx0.rcbuffer->pybuffer, (PyObject*)__pyx_t_2, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { __pyx_v_idx0 = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_idx0.rcbuffer->pybuffer.buf = NULL; {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4675; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } else {__pyx_pybuffernd_idx0.diminfo[0].strides = __pyx_pybuffernd_idx0.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_idx0.diminfo[0].shape = __pyx_pybuffernd_idx0.rcbuffer->pybuffer.shape[0]; } } __pyx_t_2 = 0; __pyx_v_idx0 = ((PyArrayObject *)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/generated.pyx":4676 * Py_ssize_t i, j, k, n, idx * ndarray[int64_t] idx0 = indexer[0] * ndarray[int64_t] idx1 = indexer[1] # <<<<<<<<<<<<<< * float64_t fv * */ __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_indexer, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4676; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 4676; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_3 = ((PyArrayObject *)__pyx_t_1); { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_idx1.rcbuffer->pybuffer, (PyObject*)__pyx_t_3, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { __pyx_v_idx1 = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_idx1.rcbuffer->pybuffer.buf = NULL; {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4676; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } else {__pyx_pybuffernd_idx1.diminfo[0].strides = __pyx_pybuffernd_idx1.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_idx1.diminfo[0].shape = __pyx_pybuffernd_idx1.rcbuffer->pybuffer.shape[0]; } } __pyx_t_3 = 0; __pyx_v_idx1 = ((PyArrayObject *)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/generated.pyx":4679 * float64_t fv * * n = len(idx0) # <<<<<<<<<<<<<< * k = len(idx1) * */ __pyx_t_4 = PyObject_Length(((PyObject *)__pyx_v_idx0)); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4679; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_4; /* "pandas/src/generated.pyx":4680 * * n = len(idx0) * k = len(idx1) # <<<<<<<<<<<<<< * * fv = fill_value */ __pyx_t_4 = PyObject_Length(((PyObject *)__pyx_v_idx1)); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4680; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_k = __pyx_t_4; /* "pandas/src/generated.pyx":4682 * k = len(idx1) * * fv = fill_value # <<<<<<<<<<<<<< * for i from 0 <= i < n: * idx = idx0[i] */ __pyx_t_5 = __pyx_PyFloat_AsDouble(__pyx_v_fill_value); if (unlikely((__pyx_t_5 == (npy_float64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4682; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_fv = __pyx_t_5; /* "pandas/src/generated.pyx":4683 * * fv = fill_value * for i from 0 <= i < n: # <<<<<<<<<<<<<< * idx = idx0[i] * if idx == -1: */ __pyx_t_4 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_4; __pyx_v_i++) { /* "pandas/src/generated.pyx":4684 * fv = fill_value * for i from 0 <= i < n: * idx = idx0[i] # <<<<<<<<<<<<<< * if idx == -1: * for j from 0 <= j < k: */ __pyx_t_6 = __pyx_v_i; __pyx_v_idx = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_idx0.rcbuffer->pybuffer.buf, __pyx_t_6, __pyx_pybuffernd_idx0.diminfo[0].strides)); /* "pandas/src/generated.pyx":4685 * for i from 0 <= i < n: * idx = idx0[i] * if idx == -1: # <<<<<<<<<<<<<< * for j from 0 <= j < k: * out[i, j] = fv */ __pyx_t_7 = ((__pyx_v_idx == -1) != 0); if (__pyx_t_7) { /* "pandas/src/generated.pyx":4686 * idx = idx0[i] * if idx == -1: * for j from 0 <= j < k: # <<<<<<<<<<<<<< * out[i, j] = fv * else: */ __pyx_t_8 = __pyx_v_k; for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_8; __pyx_v_j++) { /* "pandas/src/generated.pyx":4687 * if idx == -1: * for j from 0 <= j < k: * out[i, j] = fv # <<<<<<<<<<<<<< * else: * for j from 0 <= j < k: */ __pyx_t_9 = __pyx_v_i; __pyx_t_10 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_9, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_10, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_fv; } goto __pyx_L5; } /*else*/ { /* "pandas/src/generated.pyx":4689 * out[i, j] = fv * else: * for j from 0 <= j < k: # <<<<<<<<<<<<<< * if idx1[j] == -1: * out[i, j] = fv */ __pyx_t_8 = __pyx_v_k; for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_8; __pyx_v_j++) { /* "pandas/src/generated.pyx":4690 * else: * for j from 0 <= j < k: * if idx1[j] == -1: # <<<<<<<<<<<<<< * out[i, j] = fv * else: */ __pyx_t_11 = __pyx_v_j; __pyx_t_7 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_idx1.rcbuffer->pybuffer.buf, __pyx_t_11, __pyx_pybuffernd_idx1.diminfo[0].strides)) == -1) != 0); if (__pyx_t_7) { /* "pandas/src/generated.pyx":4691 * for j from 0 <= j < k: * if idx1[j] == -1: * out[i, j] = fv # <<<<<<<<<<<<<< * else: * out[i, j] = values[idx, idx1[j]] */ __pyx_t_12 = __pyx_v_i; __pyx_t_13 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_12, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_13, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_fv; goto __pyx_L10; } /*else*/ { /* "pandas/src/generated.pyx":4693 * out[i, j] = fv * else: * out[i, j] = values[idx, idx1[j]] # <<<<<<<<<<<<<< * * @cython.wraparound(False) */ __pyx_t_14 = __pyx_v_j; __pyx_t_15 = __pyx_v_idx; __pyx_t_16 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_idx1.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_idx1.diminfo[0].strides)); __pyx_t_17 = __pyx_v_i; __pyx_t_18 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_18, __pyx_pybuffernd_out.diminfo[1].strides) = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_16, __pyx_pybuffernd_values.diminfo[1].strides)); } __pyx_L10:; } } __pyx_L5:; } /* "pandas/src/generated.pyx":4669 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_multi_int64_float64(ndarray[int64_t, ndim=2] values, # <<<<<<<<<<<<<< * indexer, * ndarray[float64_t, ndim=2] out, */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_idx0.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_idx1.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.take_2d_multi_int64_float64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_idx0.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_idx1.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_idx0); __Pyx_XDECREF((PyObject *)__pyx_v_idx1); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":4697 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_multi_float32_float32(ndarray[float32_t, ndim=2] values, # <<<<<<<<<<<<<< * indexer, * ndarray[float32_t, ndim=2] out, */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_367take_2d_multi_float32_float32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_367take_2d_multi_float32_float32 = {__Pyx_NAMESTR("take_2d_multi_float32_float32"), (PyCFunction)__pyx_pw_6pandas_5algos_367take_2d_multi_float32_float32, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_367take_2d_multi_float32_float32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_values = 0; PyObject *__pyx_v_indexer = 0; PyArrayObject *__pyx_v_out = 0; PyObject *__pyx_v_fill_value = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("take_2d_multi_float32_float32 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_values,&__pyx_n_s_indexer,&__pyx_n_s_out,&__pyx_n_s_fill_value,0}; PyObject* values[4] = {0,0,0,0}; values[3] = __pyx_k__173; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_values)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_indexer)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_2d_multi_float32_float32", 0, 3, 4, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4697; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_out)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_2d_multi_float32_float32", 0, 3, 4, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4697; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_fill_value); if (value) { values[3] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "take_2d_multi_float32_float32") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4697; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_values = ((PyArrayObject *)values[0]); __pyx_v_indexer = values[1]; __pyx_v_out = ((PyArrayObject *)values[2]); __pyx_v_fill_value = values[3]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("take_2d_multi_float32_float32", 0, 3, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4697; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.take_2d_multi_float32_float32", __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_filename = __pyx_f[2]; __pyx_lineno = 4697; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_5numpy_ndarray, 1, "out", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4699; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_366take_2d_multi_float32_float32(__pyx_self, __pyx_v_values, __pyx_v_indexer, __pyx_v_out, __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_5algos_366take_2d_multi_float32_float32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_k; Py_ssize_t __pyx_v_n; Py_ssize_t __pyx_v_idx; PyArrayObject *__pyx_v_idx0 = 0; PyArrayObject *__pyx_v_idx1 = 0; __pyx_t_5numpy_float32_t __pyx_v_fv; __Pyx_LocalBuf_ND __pyx_pybuffernd_idx0; __Pyx_Buffer __pyx_pybuffer_idx0; __Pyx_LocalBuf_ND __pyx_pybuffernd_idx1; __Pyx_Buffer __pyx_pybuffer_idx1; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_values; __Pyx_Buffer __pyx_pybuffer_values; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyArrayObject *__pyx_t_2 = NULL; PyArrayObject *__pyx_t_3 = NULL; Py_ssize_t __pyx_t_4; __pyx_t_5numpy_float32_t __pyx_t_5; Py_ssize_t __pyx_t_6; int __pyx_t_7; Py_ssize_t __pyx_t_8; Py_ssize_t __pyx_t_9; Py_ssize_t __pyx_t_10; Py_ssize_t __pyx_t_11; Py_ssize_t __pyx_t_12; Py_ssize_t __pyx_t_13; Py_ssize_t __pyx_t_14; Py_ssize_t __pyx_t_15; __pyx_t_5numpy_int64_t __pyx_t_16; Py_ssize_t __pyx_t_17; Py_ssize_t __pyx_t_18; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("take_2d_multi_float32_float32", 0); __pyx_pybuffer_idx0.pybuffer.buf = NULL; __pyx_pybuffer_idx0.refcount = 0; __pyx_pybuffernd_idx0.data = NULL; __pyx_pybuffernd_idx0.rcbuffer = &__pyx_pybuffer_idx0; __pyx_pybuffer_idx1.pybuffer.buf = NULL; __pyx_pybuffer_idx1.refcount = 0; __pyx_pybuffernd_idx1.data = NULL; __pyx_pybuffernd_idx1.rcbuffer = &__pyx_pybuffer_idx1; __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_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; { __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_float32_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4697; __pyx_clineno = __LINE__; goto __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_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_v_out, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4697; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; __pyx_pybuffernd_out.diminfo[1].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_out.diminfo[1].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[1]; /* "pandas/src/generated.pyx":4703 * cdef: * Py_ssize_t i, j, k, n, idx * ndarray[int64_t] idx0 = indexer[0] # <<<<<<<<<<<<<< * ndarray[int64_t] idx1 = indexer[1] * float32_t fv */ __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_indexer, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4703; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 4703; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_2 = ((PyArrayObject *)__pyx_t_1); { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_idx0.rcbuffer->pybuffer, (PyObject*)__pyx_t_2, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { __pyx_v_idx0 = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_idx0.rcbuffer->pybuffer.buf = NULL; {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4703; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } else {__pyx_pybuffernd_idx0.diminfo[0].strides = __pyx_pybuffernd_idx0.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_idx0.diminfo[0].shape = __pyx_pybuffernd_idx0.rcbuffer->pybuffer.shape[0]; } } __pyx_t_2 = 0; __pyx_v_idx0 = ((PyArrayObject *)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/generated.pyx":4704 * Py_ssize_t i, j, k, n, idx * ndarray[int64_t] idx0 = indexer[0] * ndarray[int64_t] idx1 = indexer[1] # <<<<<<<<<<<<<< * float32_t fv * */ __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_indexer, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4704; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 4704; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_3 = ((PyArrayObject *)__pyx_t_1); { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_idx1.rcbuffer->pybuffer, (PyObject*)__pyx_t_3, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { __pyx_v_idx1 = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_idx1.rcbuffer->pybuffer.buf = NULL; {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4704; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } else {__pyx_pybuffernd_idx1.diminfo[0].strides = __pyx_pybuffernd_idx1.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_idx1.diminfo[0].shape = __pyx_pybuffernd_idx1.rcbuffer->pybuffer.shape[0]; } } __pyx_t_3 = 0; __pyx_v_idx1 = ((PyArrayObject *)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/generated.pyx":4707 * float32_t fv * * n = len(idx0) # <<<<<<<<<<<<<< * k = len(idx1) * */ __pyx_t_4 = PyObject_Length(((PyObject *)__pyx_v_idx0)); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4707; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_4; /* "pandas/src/generated.pyx":4708 * * n = len(idx0) * k = len(idx1) # <<<<<<<<<<<<<< * * fv = fill_value */ __pyx_t_4 = PyObject_Length(((PyObject *)__pyx_v_idx1)); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4708; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_k = __pyx_t_4; /* "pandas/src/generated.pyx":4710 * k = len(idx1) * * fv = fill_value # <<<<<<<<<<<<<< * for i from 0 <= i < n: * idx = idx0[i] */ __pyx_t_5 = __pyx_PyFloat_AsFloat(__pyx_v_fill_value); if (unlikely((__pyx_t_5 == (npy_float32)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4710; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_fv = __pyx_t_5; /* "pandas/src/generated.pyx":4711 * * fv = fill_value * for i from 0 <= i < n: # <<<<<<<<<<<<<< * idx = idx0[i] * if idx == -1: */ __pyx_t_4 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_4; __pyx_v_i++) { /* "pandas/src/generated.pyx":4712 * fv = fill_value * for i from 0 <= i < n: * idx = idx0[i] # <<<<<<<<<<<<<< * if idx == -1: * for j from 0 <= j < k: */ __pyx_t_6 = __pyx_v_i; __pyx_v_idx = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_idx0.rcbuffer->pybuffer.buf, __pyx_t_6, __pyx_pybuffernd_idx0.diminfo[0].strides)); /* "pandas/src/generated.pyx":4713 * for i from 0 <= i < n: * idx = idx0[i] * if idx == -1: # <<<<<<<<<<<<<< * for j from 0 <= j < k: * out[i, j] = fv */ __pyx_t_7 = ((__pyx_v_idx == -1) != 0); if (__pyx_t_7) { /* "pandas/src/generated.pyx":4714 * idx = idx0[i] * if idx == -1: * for j from 0 <= j < k: # <<<<<<<<<<<<<< * out[i, j] = fv * else: */ __pyx_t_8 = __pyx_v_k; for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_8; __pyx_v_j++) { /* "pandas/src/generated.pyx":4715 * if idx == -1: * for j from 0 <= j < k: * out[i, j] = fv # <<<<<<<<<<<<<< * else: * for j from 0 <= j < k: */ __pyx_t_9 = __pyx_v_i; __pyx_t_10 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_9, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_10, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_fv; } goto __pyx_L5; } /*else*/ { /* "pandas/src/generated.pyx":4717 * out[i, j] = fv * else: * for j from 0 <= j < k: # <<<<<<<<<<<<<< * if idx1[j] == -1: * out[i, j] = fv */ __pyx_t_8 = __pyx_v_k; for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_8; __pyx_v_j++) { /* "pandas/src/generated.pyx":4718 * else: * for j from 0 <= j < k: * if idx1[j] == -1: # <<<<<<<<<<<<<< * out[i, j] = fv * else: */ __pyx_t_11 = __pyx_v_j; __pyx_t_7 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_idx1.rcbuffer->pybuffer.buf, __pyx_t_11, __pyx_pybuffernd_idx1.diminfo[0].strides)) == -1) != 0); if (__pyx_t_7) { /* "pandas/src/generated.pyx":4719 * for j from 0 <= j < k: * if idx1[j] == -1: * out[i, j] = fv # <<<<<<<<<<<<<< * else: * out[i, j] = values[idx, idx1[j]] */ __pyx_t_12 = __pyx_v_i; __pyx_t_13 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_12, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_13, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_fv; goto __pyx_L10; } /*else*/ { /* "pandas/src/generated.pyx":4721 * out[i, j] = fv * else: * out[i, j] = values[idx, idx1[j]] # <<<<<<<<<<<<<< * * @cython.wraparound(False) */ __pyx_t_14 = __pyx_v_j; __pyx_t_15 = __pyx_v_idx; __pyx_t_16 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_idx1.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_idx1.diminfo[0].strides)); __pyx_t_17 = __pyx_v_i; __pyx_t_18 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_18, __pyx_pybuffernd_out.diminfo[1].strides) = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_16, __pyx_pybuffernd_values.diminfo[1].strides)); } __pyx_L10:; } } __pyx_L5:; } /* "pandas/src/generated.pyx":4697 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_multi_float32_float32(ndarray[float32_t, ndim=2] values, # <<<<<<<<<<<<<< * indexer, * ndarray[float32_t, ndim=2] out, */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_idx0.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_idx1.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.take_2d_multi_float32_float32", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_idx0.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_idx1.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_idx0); __Pyx_XDECREF((PyObject *)__pyx_v_idx1); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":4725 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_multi_float32_float64(ndarray[float32_t, ndim=2] values, # <<<<<<<<<<<<<< * indexer, * ndarray[float64_t, ndim=2] out, */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_369take_2d_multi_float32_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_369take_2d_multi_float32_float64 = {__Pyx_NAMESTR("take_2d_multi_float32_float64"), (PyCFunction)__pyx_pw_6pandas_5algos_369take_2d_multi_float32_float64, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_369take_2d_multi_float32_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_values = 0; PyObject *__pyx_v_indexer = 0; PyArrayObject *__pyx_v_out = 0; PyObject *__pyx_v_fill_value = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("take_2d_multi_float32_float64 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_values,&__pyx_n_s_indexer,&__pyx_n_s_out,&__pyx_n_s_fill_value,0}; PyObject* values[4] = {0,0,0,0}; values[3] = __pyx_k__174; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_values)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_indexer)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_2d_multi_float32_float64", 0, 3, 4, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4725; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_out)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_2d_multi_float32_float64", 0, 3, 4, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4725; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_fill_value); if (value) { values[3] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "take_2d_multi_float32_float64") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4725; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_values = ((PyArrayObject *)values[0]); __pyx_v_indexer = values[1]; __pyx_v_out = ((PyArrayObject *)values[2]); __pyx_v_fill_value = values[3]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("take_2d_multi_float32_float64", 0, 3, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4725; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.take_2d_multi_float32_float64", __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_filename = __pyx_f[2]; __pyx_lineno = 4725; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_5numpy_ndarray, 1, "out", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4727; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_368take_2d_multi_float32_float64(__pyx_self, __pyx_v_values, __pyx_v_indexer, __pyx_v_out, __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_5algos_368take_2d_multi_float32_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_k; Py_ssize_t __pyx_v_n; Py_ssize_t __pyx_v_idx; PyArrayObject *__pyx_v_idx0 = 0; PyArrayObject *__pyx_v_idx1 = 0; __pyx_t_5numpy_float64_t __pyx_v_fv; __Pyx_LocalBuf_ND __pyx_pybuffernd_idx0; __Pyx_Buffer __pyx_pybuffer_idx0; __Pyx_LocalBuf_ND __pyx_pybuffernd_idx1; __Pyx_Buffer __pyx_pybuffer_idx1; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_values; __Pyx_Buffer __pyx_pybuffer_values; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyArrayObject *__pyx_t_2 = NULL; PyArrayObject *__pyx_t_3 = NULL; Py_ssize_t __pyx_t_4; __pyx_t_5numpy_float64_t __pyx_t_5; Py_ssize_t __pyx_t_6; int __pyx_t_7; Py_ssize_t __pyx_t_8; Py_ssize_t __pyx_t_9; Py_ssize_t __pyx_t_10; Py_ssize_t __pyx_t_11; Py_ssize_t __pyx_t_12; Py_ssize_t __pyx_t_13; Py_ssize_t __pyx_t_14; Py_ssize_t __pyx_t_15; __pyx_t_5numpy_int64_t __pyx_t_16; Py_ssize_t __pyx_t_17; Py_ssize_t __pyx_t_18; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("take_2d_multi_float32_float64", 0); __pyx_pybuffer_idx0.pybuffer.buf = NULL; __pyx_pybuffer_idx0.refcount = 0; __pyx_pybuffernd_idx0.data = NULL; __pyx_pybuffernd_idx0.rcbuffer = &__pyx_pybuffer_idx0; __pyx_pybuffer_idx1.pybuffer.buf = NULL; __pyx_pybuffer_idx1.refcount = 0; __pyx_pybuffernd_idx1.data = NULL; __pyx_pybuffernd_idx1.rcbuffer = &__pyx_pybuffer_idx1; __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_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; { __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_float32_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4725; __pyx_clineno = __LINE__; goto __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_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; 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, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4725; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; __pyx_pybuffernd_out.diminfo[1].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_out.diminfo[1].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[1]; /* "pandas/src/generated.pyx":4731 * cdef: * Py_ssize_t i, j, k, n, idx * ndarray[int64_t] idx0 = indexer[0] # <<<<<<<<<<<<<< * ndarray[int64_t] idx1 = indexer[1] * float64_t fv */ __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_indexer, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4731; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 4731; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_2 = ((PyArrayObject *)__pyx_t_1); { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_idx0.rcbuffer->pybuffer, (PyObject*)__pyx_t_2, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { __pyx_v_idx0 = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_idx0.rcbuffer->pybuffer.buf = NULL; {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4731; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } else {__pyx_pybuffernd_idx0.diminfo[0].strides = __pyx_pybuffernd_idx0.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_idx0.diminfo[0].shape = __pyx_pybuffernd_idx0.rcbuffer->pybuffer.shape[0]; } } __pyx_t_2 = 0; __pyx_v_idx0 = ((PyArrayObject *)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/generated.pyx":4732 * Py_ssize_t i, j, k, n, idx * ndarray[int64_t] idx0 = indexer[0] * ndarray[int64_t] idx1 = indexer[1] # <<<<<<<<<<<<<< * float64_t fv * */ __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_indexer, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4732; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 4732; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_3 = ((PyArrayObject *)__pyx_t_1); { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_idx1.rcbuffer->pybuffer, (PyObject*)__pyx_t_3, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { __pyx_v_idx1 = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_idx1.rcbuffer->pybuffer.buf = NULL; {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4732; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } else {__pyx_pybuffernd_idx1.diminfo[0].strides = __pyx_pybuffernd_idx1.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_idx1.diminfo[0].shape = __pyx_pybuffernd_idx1.rcbuffer->pybuffer.shape[0]; } } __pyx_t_3 = 0; __pyx_v_idx1 = ((PyArrayObject *)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/generated.pyx":4735 * float64_t fv * * n = len(idx0) # <<<<<<<<<<<<<< * k = len(idx1) * */ __pyx_t_4 = PyObject_Length(((PyObject *)__pyx_v_idx0)); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4735; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_4; /* "pandas/src/generated.pyx":4736 * * n = len(idx0) * k = len(idx1) # <<<<<<<<<<<<<< * * fv = fill_value */ __pyx_t_4 = PyObject_Length(((PyObject *)__pyx_v_idx1)); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4736; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_k = __pyx_t_4; /* "pandas/src/generated.pyx":4738 * k = len(idx1) * * fv = fill_value # <<<<<<<<<<<<<< * for i from 0 <= i < n: * idx = idx0[i] */ __pyx_t_5 = __pyx_PyFloat_AsDouble(__pyx_v_fill_value); if (unlikely((__pyx_t_5 == (npy_float64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4738; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_fv = __pyx_t_5; /* "pandas/src/generated.pyx":4739 * * fv = fill_value * for i from 0 <= i < n: # <<<<<<<<<<<<<< * idx = idx0[i] * if idx == -1: */ __pyx_t_4 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_4; __pyx_v_i++) { /* "pandas/src/generated.pyx":4740 * fv = fill_value * for i from 0 <= i < n: * idx = idx0[i] # <<<<<<<<<<<<<< * if idx == -1: * for j from 0 <= j < k: */ __pyx_t_6 = __pyx_v_i; __pyx_v_idx = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_idx0.rcbuffer->pybuffer.buf, __pyx_t_6, __pyx_pybuffernd_idx0.diminfo[0].strides)); /* "pandas/src/generated.pyx":4741 * for i from 0 <= i < n: * idx = idx0[i] * if idx == -1: # <<<<<<<<<<<<<< * for j from 0 <= j < k: * out[i, j] = fv */ __pyx_t_7 = ((__pyx_v_idx == -1) != 0); if (__pyx_t_7) { /* "pandas/src/generated.pyx":4742 * idx = idx0[i] * if idx == -1: * for j from 0 <= j < k: # <<<<<<<<<<<<<< * out[i, j] = fv * else: */ __pyx_t_8 = __pyx_v_k; for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_8; __pyx_v_j++) { /* "pandas/src/generated.pyx":4743 * if idx == -1: * for j from 0 <= j < k: * out[i, j] = fv # <<<<<<<<<<<<<< * else: * for j from 0 <= j < k: */ __pyx_t_9 = __pyx_v_i; __pyx_t_10 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_9, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_10, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_fv; } goto __pyx_L5; } /*else*/ { /* "pandas/src/generated.pyx":4745 * out[i, j] = fv * else: * for j from 0 <= j < k: # <<<<<<<<<<<<<< * if idx1[j] == -1: * out[i, j] = fv */ __pyx_t_8 = __pyx_v_k; for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_8; __pyx_v_j++) { /* "pandas/src/generated.pyx":4746 * else: * for j from 0 <= j < k: * if idx1[j] == -1: # <<<<<<<<<<<<<< * out[i, j] = fv * else: */ __pyx_t_11 = __pyx_v_j; __pyx_t_7 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_idx1.rcbuffer->pybuffer.buf, __pyx_t_11, __pyx_pybuffernd_idx1.diminfo[0].strides)) == -1) != 0); if (__pyx_t_7) { /* "pandas/src/generated.pyx":4747 * for j from 0 <= j < k: * if idx1[j] == -1: * out[i, j] = fv # <<<<<<<<<<<<<< * else: * out[i, j] = values[idx, idx1[j]] */ __pyx_t_12 = __pyx_v_i; __pyx_t_13 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_12, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_13, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_fv; goto __pyx_L10; } /*else*/ { /* "pandas/src/generated.pyx":4749 * out[i, j] = fv * else: * out[i, j] = values[idx, idx1[j]] # <<<<<<<<<<<<<< * * @cython.wraparound(False) */ __pyx_t_14 = __pyx_v_j; __pyx_t_15 = __pyx_v_idx; __pyx_t_16 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_idx1.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_idx1.diminfo[0].strides)); __pyx_t_17 = __pyx_v_i; __pyx_t_18 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_18, __pyx_pybuffernd_out.diminfo[1].strides) = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_16, __pyx_pybuffernd_values.diminfo[1].strides)); } __pyx_L10:; } } __pyx_L5:; } /* "pandas/src/generated.pyx":4725 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_multi_float32_float64(ndarray[float32_t, ndim=2] values, # <<<<<<<<<<<<<< * indexer, * ndarray[float64_t, ndim=2] out, */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_idx0.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_idx1.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.take_2d_multi_float32_float64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_idx0.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_idx1.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_idx0); __Pyx_XDECREF((PyObject *)__pyx_v_idx1); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":4753 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_multi_float64_float64(ndarray[float64_t, ndim=2] values, # <<<<<<<<<<<<<< * indexer, * ndarray[float64_t, ndim=2] out, */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_371take_2d_multi_float64_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_371take_2d_multi_float64_float64 = {__Pyx_NAMESTR("take_2d_multi_float64_float64"), (PyCFunction)__pyx_pw_6pandas_5algos_371take_2d_multi_float64_float64, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_371take_2d_multi_float64_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_values = 0; PyObject *__pyx_v_indexer = 0; PyArrayObject *__pyx_v_out = 0; PyObject *__pyx_v_fill_value = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("take_2d_multi_float64_float64 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_values,&__pyx_n_s_indexer,&__pyx_n_s_out,&__pyx_n_s_fill_value,0}; PyObject* values[4] = {0,0,0,0}; values[3] = __pyx_k__175; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_values)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_indexer)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_2d_multi_float64_float64", 0, 3, 4, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4753; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_out)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_2d_multi_float64_float64", 0, 3, 4, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4753; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_fill_value); if (value) { values[3] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "take_2d_multi_float64_float64") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4753; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_values = ((PyArrayObject *)values[0]); __pyx_v_indexer = values[1]; __pyx_v_out = ((PyArrayObject *)values[2]); __pyx_v_fill_value = values[3]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("take_2d_multi_float64_float64", 0, 3, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4753; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.take_2d_multi_float64_float64", __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_filename = __pyx_f[2]; __pyx_lineno = 4753; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_5numpy_ndarray, 1, "out", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4755; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_370take_2d_multi_float64_float64(__pyx_self, __pyx_v_values, __pyx_v_indexer, __pyx_v_out, __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_5algos_370take_2d_multi_float64_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_k; Py_ssize_t __pyx_v_n; Py_ssize_t __pyx_v_idx; PyArrayObject *__pyx_v_idx0 = 0; PyArrayObject *__pyx_v_idx1 = 0; __pyx_t_5numpy_float64_t __pyx_v_fv; __Pyx_LocalBuf_ND __pyx_pybuffernd_idx0; __Pyx_Buffer __pyx_pybuffer_idx0; __Pyx_LocalBuf_ND __pyx_pybuffernd_idx1; __Pyx_Buffer __pyx_pybuffer_idx1; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_values; __Pyx_Buffer __pyx_pybuffer_values; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyArrayObject *__pyx_t_2 = NULL; PyArrayObject *__pyx_t_3 = NULL; Py_ssize_t __pyx_t_4; __pyx_t_5numpy_float64_t __pyx_t_5; Py_ssize_t __pyx_t_6; int __pyx_t_7; Py_ssize_t __pyx_t_8; Py_ssize_t __pyx_t_9; Py_ssize_t __pyx_t_10; Py_ssize_t __pyx_t_11; Py_ssize_t __pyx_t_12; Py_ssize_t __pyx_t_13; Py_ssize_t __pyx_t_14; Py_ssize_t __pyx_t_15; __pyx_t_5numpy_int64_t __pyx_t_16; Py_ssize_t __pyx_t_17; Py_ssize_t __pyx_t_18; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("take_2d_multi_float64_float64", 0); __pyx_pybuffer_idx0.pybuffer.buf = NULL; __pyx_pybuffer_idx0.refcount = 0; __pyx_pybuffernd_idx0.data = NULL; __pyx_pybuffernd_idx0.rcbuffer = &__pyx_pybuffer_idx0; __pyx_pybuffer_idx1.pybuffer.buf = NULL; __pyx_pybuffer_idx1.refcount = 0; __pyx_pybuffernd_idx1.data = NULL; __pyx_pybuffernd_idx1.rcbuffer = &__pyx_pybuffer_idx1; __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_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; { __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, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4753; __pyx_clineno = __LINE__; goto __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_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; 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, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4753; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; __pyx_pybuffernd_out.diminfo[1].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_out.diminfo[1].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[1]; /* "pandas/src/generated.pyx":4759 * cdef: * Py_ssize_t i, j, k, n, idx * ndarray[int64_t] idx0 = indexer[0] # <<<<<<<<<<<<<< * ndarray[int64_t] idx1 = indexer[1] * float64_t fv */ __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_indexer, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4759; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 4759; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_2 = ((PyArrayObject *)__pyx_t_1); { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_idx0.rcbuffer->pybuffer, (PyObject*)__pyx_t_2, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { __pyx_v_idx0 = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_idx0.rcbuffer->pybuffer.buf = NULL; {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4759; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } else {__pyx_pybuffernd_idx0.diminfo[0].strides = __pyx_pybuffernd_idx0.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_idx0.diminfo[0].shape = __pyx_pybuffernd_idx0.rcbuffer->pybuffer.shape[0]; } } __pyx_t_2 = 0; __pyx_v_idx0 = ((PyArrayObject *)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/generated.pyx":4760 * Py_ssize_t i, j, k, n, idx * ndarray[int64_t] idx0 = indexer[0] * ndarray[int64_t] idx1 = indexer[1] # <<<<<<<<<<<<<< * float64_t fv * */ __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_indexer, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4760; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 4760; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_3 = ((PyArrayObject *)__pyx_t_1); { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_idx1.rcbuffer->pybuffer, (PyObject*)__pyx_t_3, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { __pyx_v_idx1 = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_idx1.rcbuffer->pybuffer.buf = NULL; {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4760; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } else {__pyx_pybuffernd_idx1.diminfo[0].strides = __pyx_pybuffernd_idx1.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_idx1.diminfo[0].shape = __pyx_pybuffernd_idx1.rcbuffer->pybuffer.shape[0]; } } __pyx_t_3 = 0; __pyx_v_idx1 = ((PyArrayObject *)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/generated.pyx":4763 * float64_t fv * * n = len(idx0) # <<<<<<<<<<<<<< * k = len(idx1) * */ __pyx_t_4 = PyObject_Length(((PyObject *)__pyx_v_idx0)); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4763; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_4; /* "pandas/src/generated.pyx":4764 * * n = len(idx0) * k = len(idx1) # <<<<<<<<<<<<<< * * fv = fill_value */ __pyx_t_4 = PyObject_Length(((PyObject *)__pyx_v_idx1)); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4764; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_k = __pyx_t_4; /* "pandas/src/generated.pyx":4766 * k = len(idx1) * * fv = fill_value # <<<<<<<<<<<<<< * for i from 0 <= i < n: * idx = idx0[i] */ __pyx_t_5 = __pyx_PyFloat_AsDouble(__pyx_v_fill_value); if (unlikely((__pyx_t_5 == (npy_float64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4766; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_fv = __pyx_t_5; /* "pandas/src/generated.pyx":4767 * * fv = fill_value * for i from 0 <= i < n: # <<<<<<<<<<<<<< * idx = idx0[i] * if idx == -1: */ __pyx_t_4 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_4; __pyx_v_i++) { /* "pandas/src/generated.pyx":4768 * fv = fill_value * for i from 0 <= i < n: * idx = idx0[i] # <<<<<<<<<<<<<< * if idx == -1: * for j from 0 <= j < k: */ __pyx_t_6 = __pyx_v_i; __pyx_v_idx = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_idx0.rcbuffer->pybuffer.buf, __pyx_t_6, __pyx_pybuffernd_idx0.diminfo[0].strides)); /* "pandas/src/generated.pyx":4769 * for i from 0 <= i < n: * idx = idx0[i] * if idx == -1: # <<<<<<<<<<<<<< * for j from 0 <= j < k: * out[i, j] = fv */ __pyx_t_7 = ((__pyx_v_idx == -1) != 0); if (__pyx_t_7) { /* "pandas/src/generated.pyx":4770 * idx = idx0[i] * if idx == -1: * for j from 0 <= j < k: # <<<<<<<<<<<<<< * out[i, j] = fv * else: */ __pyx_t_8 = __pyx_v_k; for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_8; __pyx_v_j++) { /* "pandas/src/generated.pyx":4771 * if idx == -1: * for j from 0 <= j < k: * out[i, j] = fv # <<<<<<<<<<<<<< * else: * for j from 0 <= j < k: */ __pyx_t_9 = __pyx_v_i; __pyx_t_10 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_9, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_10, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_fv; } goto __pyx_L5; } /*else*/ { /* "pandas/src/generated.pyx":4773 * out[i, j] = fv * else: * for j from 0 <= j < k: # <<<<<<<<<<<<<< * if idx1[j] == -1: * out[i, j] = fv */ __pyx_t_8 = __pyx_v_k; for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_8; __pyx_v_j++) { /* "pandas/src/generated.pyx":4774 * else: * for j from 0 <= j < k: * if idx1[j] == -1: # <<<<<<<<<<<<<< * out[i, j] = fv * else: */ __pyx_t_11 = __pyx_v_j; __pyx_t_7 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_idx1.rcbuffer->pybuffer.buf, __pyx_t_11, __pyx_pybuffernd_idx1.diminfo[0].strides)) == -1) != 0); if (__pyx_t_7) { /* "pandas/src/generated.pyx":4775 * for j from 0 <= j < k: * if idx1[j] == -1: * out[i, j] = fv # <<<<<<<<<<<<<< * else: * out[i, j] = values[idx, idx1[j]] */ __pyx_t_12 = __pyx_v_i; __pyx_t_13 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_12, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_13, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_fv; goto __pyx_L10; } /*else*/ { /* "pandas/src/generated.pyx":4777 * out[i, j] = fv * else: * out[i, j] = values[idx, idx1[j]] # <<<<<<<<<<<<<< * * @cython.wraparound(False) */ __pyx_t_14 = __pyx_v_j; __pyx_t_15 = __pyx_v_idx; __pyx_t_16 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_idx1.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_idx1.diminfo[0].strides)); __pyx_t_17 = __pyx_v_i; __pyx_t_18 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_18, __pyx_pybuffernd_out.diminfo[1].strides) = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_16, __pyx_pybuffernd_values.diminfo[1].strides)); } __pyx_L10:; } } __pyx_L5:; } /* "pandas/src/generated.pyx":4753 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_multi_float64_float64(ndarray[float64_t, ndim=2] values, # <<<<<<<<<<<<<< * indexer, * ndarray[float64_t, ndim=2] out, */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_idx0.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_idx1.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.take_2d_multi_float64_float64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_idx0.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_idx1.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_idx0); __Pyx_XDECREF((PyObject *)__pyx_v_idx1); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":4781 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_multi_object_object(ndarray[object, ndim=2] values, # <<<<<<<<<<<<<< * indexer, * ndarray[object, ndim=2] out, */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_373take_2d_multi_object_object(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_373take_2d_multi_object_object = {__Pyx_NAMESTR("take_2d_multi_object_object"), (PyCFunction)__pyx_pw_6pandas_5algos_373take_2d_multi_object_object, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_373take_2d_multi_object_object(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_values = 0; PyObject *__pyx_v_indexer = 0; PyArrayObject *__pyx_v_out = 0; PyObject *__pyx_v_fill_value = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("take_2d_multi_object_object (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_values,&__pyx_n_s_indexer,&__pyx_n_s_out,&__pyx_n_s_fill_value,0}; PyObject* values[4] = {0,0,0,0}; values[3] = __pyx_k__176; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_values)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_indexer)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_2d_multi_object_object", 0, 3, 4, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4781; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_out)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_2d_multi_object_object", 0, 3, 4, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4781; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_fill_value); if (value) { values[3] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "take_2d_multi_object_object") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4781; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_values = ((PyArrayObject *)values[0]); __pyx_v_indexer = values[1]; __pyx_v_out = ((PyArrayObject *)values[2]); __pyx_v_fill_value = values[3]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("take_2d_multi_object_object", 0, 3, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4781; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.take_2d_multi_object_object", __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_filename = __pyx_f[2]; __pyx_lineno = 4781; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_5numpy_ndarray, 1, "out", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4783; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_372take_2d_multi_object_object(__pyx_self, __pyx_v_values, __pyx_v_indexer, __pyx_v_out, __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_5algos_372take_2d_multi_object_object(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_k; Py_ssize_t __pyx_v_n; Py_ssize_t __pyx_v_idx; PyArrayObject *__pyx_v_idx0 = 0; PyArrayObject *__pyx_v_idx1 = 0; PyObject *__pyx_v_fv = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_idx0; __Pyx_Buffer __pyx_pybuffer_idx0; __Pyx_LocalBuf_ND __pyx_pybuffernd_idx1; __Pyx_Buffer __pyx_pybuffer_idx1; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_values; __Pyx_Buffer __pyx_pybuffer_values; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyArrayObject *__pyx_t_2 = NULL; PyArrayObject *__pyx_t_3 = NULL; Py_ssize_t __pyx_t_4; Py_ssize_t __pyx_t_5; int __pyx_t_6; Py_ssize_t __pyx_t_7; Py_ssize_t __pyx_t_8; Py_ssize_t __pyx_t_9; PyObject **__pyx_t_10; Py_ssize_t __pyx_t_11; Py_ssize_t __pyx_t_12; Py_ssize_t __pyx_t_13; Py_ssize_t __pyx_t_14; Py_ssize_t __pyx_t_15; __pyx_t_5numpy_int64_t __pyx_t_16; Py_ssize_t __pyx_t_17; Py_ssize_t __pyx_t_18; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("take_2d_multi_object_object", 0); __pyx_pybuffer_idx0.pybuffer.buf = NULL; __pyx_pybuffer_idx0.refcount = 0; __pyx_pybuffernd_idx0.data = NULL; __pyx_pybuffernd_idx0.rcbuffer = &__pyx_pybuffer_idx0; __pyx_pybuffer_idx1.pybuffer.buf = NULL; __pyx_pybuffer_idx1.refcount = 0; __pyx_pybuffernd_idx1.data = NULL; __pyx_pybuffernd_idx1.rcbuffer = &__pyx_pybuffer_idx1; __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_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; { __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, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4781; __pyx_clineno = __LINE__; goto __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_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_v_out, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4781; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; __pyx_pybuffernd_out.diminfo[1].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_out.diminfo[1].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[1]; /* "pandas/src/generated.pyx":4787 * cdef: * Py_ssize_t i, j, k, n, idx * ndarray[int64_t] idx0 = indexer[0] # <<<<<<<<<<<<<< * ndarray[int64_t] idx1 = indexer[1] * object fv */ __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_indexer, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4787; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 4787; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_2 = ((PyArrayObject *)__pyx_t_1); { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_idx0.rcbuffer->pybuffer, (PyObject*)__pyx_t_2, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { __pyx_v_idx0 = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_idx0.rcbuffer->pybuffer.buf = NULL; {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4787; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } else {__pyx_pybuffernd_idx0.diminfo[0].strides = __pyx_pybuffernd_idx0.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_idx0.diminfo[0].shape = __pyx_pybuffernd_idx0.rcbuffer->pybuffer.shape[0]; } } __pyx_t_2 = 0; __pyx_v_idx0 = ((PyArrayObject *)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/generated.pyx":4788 * Py_ssize_t i, j, k, n, idx * ndarray[int64_t] idx0 = indexer[0] * ndarray[int64_t] idx1 = indexer[1] # <<<<<<<<<<<<<< * object fv * */ __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_indexer, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4788; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 4788; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_3 = ((PyArrayObject *)__pyx_t_1); { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_idx1.rcbuffer->pybuffer, (PyObject*)__pyx_t_3, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { __pyx_v_idx1 = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_idx1.rcbuffer->pybuffer.buf = NULL; {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4788; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } else {__pyx_pybuffernd_idx1.diminfo[0].strides = __pyx_pybuffernd_idx1.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_idx1.diminfo[0].shape = __pyx_pybuffernd_idx1.rcbuffer->pybuffer.shape[0]; } } __pyx_t_3 = 0; __pyx_v_idx1 = ((PyArrayObject *)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/generated.pyx":4791 * object fv * * n = len(idx0) # <<<<<<<<<<<<<< * k = len(idx1) * */ __pyx_t_4 = PyObject_Length(((PyObject *)__pyx_v_idx0)); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4791; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_4; /* "pandas/src/generated.pyx":4792 * * n = len(idx0) * k = len(idx1) # <<<<<<<<<<<<<< * * fv = fill_value */ __pyx_t_4 = PyObject_Length(((PyObject *)__pyx_v_idx1)); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4792; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_k = __pyx_t_4; /* "pandas/src/generated.pyx":4794 * k = len(idx1) * * fv = fill_value # <<<<<<<<<<<<<< * for i from 0 <= i < n: * idx = idx0[i] */ __Pyx_INCREF(__pyx_v_fill_value); __pyx_v_fv = __pyx_v_fill_value; /* "pandas/src/generated.pyx":4795 * * fv = fill_value * for i from 0 <= i < n: # <<<<<<<<<<<<<< * idx = idx0[i] * if idx == -1: */ __pyx_t_4 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_4; __pyx_v_i++) { /* "pandas/src/generated.pyx":4796 * fv = fill_value * for i from 0 <= i < n: * idx = idx0[i] # <<<<<<<<<<<<<< * if idx == -1: * for j from 0 <= j < k: */ __pyx_t_5 = __pyx_v_i; __pyx_v_idx = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_idx0.rcbuffer->pybuffer.buf, __pyx_t_5, __pyx_pybuffernd_idx0.diminfo[0].strides)); /* "pandas/src/generated.pyx":4797 * for i from 0 <= i < n: * idx = idx0[i] * if idx == -1: # <<<<<<<<<<<<<< * for j from 0 <= j < k: * out[i, j] = fv */ __pyx_t_6 = ((__pyx_v_idx == -1) != 0); if (__pyx_t_6) { /* "pandas/src/generated.pyx":4798 * idx = idx0[i] * if idx == -1: * for j from 0 <= j < k: # <<<<<<<<<<<<<< * out[i, j] = fv * else: */ __pyx_t_7 = __pyx_v_k; for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_7; __pyx_v_j++) { /* "pandas/src/generated.pyx":4799 * if idx == -1: * for j from 0 <= j < k: * out[i, j] = fv # <<<<<<<<<<<<<< * else: * for j from 0 <= j < k: */ __pyx_t_8 = __pyx_v_i; __pyx_t_9 = __pyx_v_j; __pyx_t_10 = __Pyx_BufPtrStrided2d(PyObject **, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_8, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_9, __pyx_pybuffernd_out.diminfo[1].strides); __Pyx_GOTREF(*__pyx_t_10); __Pyx_INCREF(__pyx_v_fv); __Pyx_DECREF(*__pyx_t_10); *__pyx_t_10 = __pyx_v_fv; __Pyx_GIVEREF(*__pyx_t_10); } goto __pyx_L5; } /*else*/ { /* "pandas/src/generated.pyx":4801 * out[i, j] = fv * else: * for j from 0 <= j < k: # <<<<<<<<<<<<<< * if idx1[j] == -1: * out[i, j] = fv */ __pyx_t_7 = __pyx_v_k; for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_7; __pyx_v_j++) { /* "pandas/src/generated.pyx":4802 * else: * for j from 0 <= j < k: * if idx1[j] == -1: # <<<<<<<<<<<<<< * out[i, j] = fv * else: */ __pyx_t_11 = __pyx_v_j; __pyx_t_6 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_idx1.rcbuffer->pybuffer.buf, __pyx_t_11, __pyx_pybuffernd_idx1.diminfo[0].strides)) == -1) != 0); if (__pyx_t_6) { /* "pandas/src/generated.pyx":4803 * for j from 0 <= j < k: * if idx1[j] == -1: * out[i, j] = fv # <<<<<<<<<<<<<< * else: * out[i, j] = values[idx, idx1[j]] */ __pyx_t_12 = __pyx_v_i; __pyx_t_13 = __pyx_v_j; __pyx_t_10 = __Pyx_BufPtrStrided2d(PyObject **, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_12, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_13, __pyx_pybuffernd_out.diminfo[1].strides); __Pyx_GOTREF(*__pyx_t_10); __Pyx_INCREF(__pyx_v_fv); __Pyx_DECREF(*__pyx_t_10); *__pyx_t_10 = __pyx_v_fv; __Pyx_GIVEREF(*__pyx_t_10); goto __pyx_L10; } /*else*/ { /* "pandas/src/generated.pyx":4805 * out[i, j] = fv * else: * out[i, j] = values[idx, idx1[j]] # <<<<<<<<<<<<<< * * */ __pyx_t_14 = __pyx_v_j; __pyx_t_15 = __pyx_v_idx; __pyx_t_16 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_idx1.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_idx1.diminfo[0].strides)); __pyx_t_1 = (PyObject *) *__Pyx_BufPtrStrided2d(PyObject **, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_16, __pyx_pybuffernd_values.diminfo[1].strides); __Pyx_INCREF((PyObject*)__pyx_t_1); __pyx_t_17 = __pyx_v_i; __pyx_t_18 = __pyx_v_j; __pyx_t_10 = __Pyx_BufPtrStrided2d(PyObject **, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_18, __pyx_pybuffernd_out.diminfo[1].strides); __Pyx_GOTREF(*__pyx_t_10); __Pyx_INCREF(__pyx_t_1); __Pyx_DECREF(*__pyx_t_10); *__pyx_t_10 = __pyx_t_1; __Pyx_GIVEREF(*__pyx_t_10); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } __pyx_L10:; } } __pyx_L5:; } /* "pandas/src/generated.pyx":4781 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_multi_object_object(ndarray[object, ndim=2] values, # <<<<<<<<<<<<<< * indexer, * ndarray[object, ndim=2] out, */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_idx0.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_idx1.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.take_2d_multi_object_object", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_idx0.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_idx1.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_idx0); __Pyx_XDECREF((PyObject *)__pyx_v_idx1); __Pyx_XDECREF(__pyx_v_fv); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":4810 * @cython.boundscheck(False) * @cython.wraparound(False) * def diff_2d_float64(ndarray[float64_t, ndim=2] arr, # <<<<<<<<<<<<<< * ndarray[float64_t, ndim=2] out, * Py_ssize_t periods, int axis): */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_375diff_2d_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_375diff_2d_float64 = {__Pyx_NAMESTR("diff_2d_float64"), (PyCFunction)__pyx_pw_6pandas_5algos_375diff_2d_float64, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_375diff_2d_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_arr = 0; PyArrayObject *__pyx_v_out = 0; Py_ssize_t __pyx_v_periods; int __pyx_v_axis; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("diff_2d_float64 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_arr,&__pyx_n_s_out,&__pyx_n_s_periods,&__pyx_n_s_axis,0}; PyObject* values[4] = {0,0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_arr)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_out)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("diff_2d_float64", 1, 4, 4, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4810; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_periods)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("diff_2d_float64", 1, 4, 4, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4810; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_axis)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("diff_2d_float64", 1, 4, 4, 3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4810; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "diff_2d_float64") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4810; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 4) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[3] = PyTuple_GET_ITEM(__pyx_args, 3); } __pyx_v_arr = ((PyArrayObject *)values[0]); __pyx_v_out = ((PyArrayObject *)values[1]); __pyx_v_periods = __Pyx_PyIndex_AsSsize_t(values[2]); if (unlikely((__pyx_v_periods == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4812; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_axis = __Pyx_PyInt_As_int(values[3]); if (unlikely((__pyx_v_axis == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4812; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("diff_2d_float64", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4810; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.diff_2d_float64", __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_filename = __pyx_f[2]; __pyx_lineno = 4810; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_5numpy_ndarray, 1, "out", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4811; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_374diff_2d_float64(__pyx_self, __pyx_v_arr, __pyx_v_out, __pyx_v_periods, __pyx_v_axis); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5algos_374diff_2d_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_arr, PyArrayObject *__pyx_v_out, Py_ssize_t __pyx_v_periods, int __pyx_v_axis) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_sx; Py_ssize_t __pyx_v_sy; Py_ssize_t __pyx_v_start; Py_ssize_t __pyx_v_stop; __Pyx_LocalBuf_ND __pyx_pybuffernd_arr; __Pyx_Buffer __pyx_pybuffer_arr; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; 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 *); Py_ssize_t __pyx_t_6; Py_ssize_t __pyx_t_7; int __pyx_t_8; Py_ssize_t __pyx_t_9; Py_ssize_t __pyx_t_10; Py_ssize_t __pyx_t_11; Py_ssize_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; 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("diff_2d_float64", 0); __pyx_pybuffer_arr.pybuffer.buf = NULL; __pyx_pybuffer_arr.refcount = 0; __pyx_pybuffernd_arr.data = NULL; __pyx_pybuffernd_arr.rcbuffer = &__pyx_pybuffer_arr; __pyx_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_arr.rcbuffer->pybuffer, (PyObject*)__pyx_v_arr, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4810; __pyx_clineno = __LINE__; goto __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]; __pyx_pybuffernd_arr.diminfo[1].strides = __pyx_pybuffernd_arr.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_arr.diminfo[1].shape = __pyx_pybuffernd_arr.rcbuffer->pybuffer.shape[1]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; 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, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4810; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; __pyx_pybuffernd_out.diminfo[1].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_out.diminfo[1].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[1]; /* "pandas/src/generated.pyx":4816 * Py_ssize_t i, j, sx, sy * * sx, sy = ( arr).shape # <<<<<<<<<<<<<< * if arr.flags.f_contiguous: * if axis == 0: */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_arr), __pyx_n_s_shape); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4816; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) { PyObject* sequence = __pyx_t_1; #if CYTHON_COMPILING_IN_CPYTHON Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4816; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1); } else { __pyx_t_2 = PyList_GET_ITEM(sequence, 0); __pyx_t_3 = PyList_GET_ITEM(sequence, 1); } __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); #else __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4816; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4816; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } else { Py_ssize_t index = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4816; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_5 = Py_TYPE(__pyx_t_4)->tp_iternext; index = 0; __pyx_t_2 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_2)) goto __pyx_L3_unpacking_failed; __Pyx_GOTREF(__pyx_t_2); index = 1; __pyx_t_3 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_3)) goto __pyx_L3_unpacking_failed; __Pyx_GOTREF(__pyx_t_3); if (__Pyx_IternextUnpackEndCheck(__pyx_t_5(__pyx_t_4), 2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4816; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 4816; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_L4_unpacking_done:; } __pyx_t_6 = __Pyx_PyIndex_AsSsize_t(__pyx_t_2); if (unlikely((__pyx_t_6 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4816; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_7 = __Pyx_PyIndex_AsSsize_t(__pyx_t_3); if (unlikely((__pyx_t_7 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4816; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_sx = __pyx_t_6; __pyx_v_sy = __pyx_t_7; /* "pandas/src/generated.pyx":4817 * * sx, sy = ( arr).shape * if arr.flags.f_contiguous: # <<<<<<<<<<<<<< * if axis == 0: * if periods >= 0: */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_arr), __pyx_n_s_flags); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4817; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_f_contiguous); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4817; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4817; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_8) { /* "pandas/src/generated.pyx":4818 * sx, sy = ( arr).shape * if arr.flags.f_contiguous: * if axis == 0: # <<<<<<<<<<<<<< * if periods >= 0: * start, stop = periods, sx */ __pyx_t_8 = ((__pyx_v_axis == 0) != 0); if (__pyx_t_8) { /* "pandas/src/generated.pyx":4819 * if arr.flags.f_contiguous: * if axis == 0: * if periods >= 0: # <<<<<<<<<<<<<< * start, stop = periods, sx * else: */ __pyx_t_8 = ((__pyx_v_periods >= 0) != 0); if (__pyx_t_8) { /* "pandas/src/generated.pyx":4820 * if axis == 0: * if periods >= 0: * start, stop = periods, sx # <<<<<<<<<<<<<< * else: * start, stop = 0, sx + periods */ __pyx_t_7 = __pyx_v_periods; __pyx_t_6 = __pyx_v_sx; __pyx_v_start = __pyx_t_7; __pyx_v_stop = __pyx_t_6; goto __pyx_L7; } /*else*/ { /* "pandas/src/generated.pyx":4822 * start, stop = periods, sx * else: * start, stop = 0, sx + periods # <<<<<<<<<<<<<< * for j in range(sy): * for i in range(start, stop): */ __pyx_t_6 = 0; __pyx_t_7 = (__pyx_v_sx + __pyx_v_periods); __pyx_v_start = __pyx_t_6; __pyx_v_stop = __pyx_t_7; } __pyx_L7:; /* "pandas/src/generated.pyx":4823 * else: * start, stop = 0, sx + periods * for j in range(sy): # <<<<<<<<<<<<<< * for i in range(start, stop): * out[i, j] = arr[i, j] - arr[i - periods, j] */ __pyx_t_7 = __pyx_v_sy; for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_7; __pyx_t_6+=1) { __pyx_v_j = __pyx_t_6; /* "pandas/src/generated.pyx":4824 * start, stop = 0, sx + periods * for j in range(sy): * for i in range(start, stop): # <<<<<<<<<<<<<< * out[i, j] = arr[i, j] - arr[i - periods, j] * else: */ __pyx_t_9 = __pyx_v_stop; for (__pyx_t_10 = __pyx_v_start; __pyx_t_10 < __pyx_t_9; __pyx_t_10+=1) { __pyx_v_i = __pyx_t_10; /* "pandas/src/generated.pyx":4825 * for j in range(sy): * for i in range(start, stop): * out[i, j] = arr[i, j] - arr[i - periods, j] # <<<<<<<<<<<<<< * else: * if periods >= 0: */ __pyx_t_11 = __pyx_v_i; __pyx_t_12 = __pyx_v_j; __pyx_t_13 = (__pyx_v_i - __pyx_v_periods); __pyx_t_14 = __pyx_v_j; __pyx_t_15 = __pyx_v_i; __pyx_t_16 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_16, __pyx_pybuffernd_out.diminfo[1].strides) = ((*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_arr.rcbuffer->pybuffer.buf, __pyx_t_11, __pyx_pybuffernd_arr.diminfo[0].strides, __pyx_t_12, __pyx_pybuffernd_arr.diminfo[1].strides)) - (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_arr.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_arr.diminfo[0].strides, __pyx_t_14, __pyx_pybuffernd_arr.diminfo[1].strides))); } } goto __pyx_L6; } /*else*/ { /* "pandas/src/generated.pyx":4827 * out[i, j] = arr[i, j] - arr[i - periods, j] * else: * if periods >= 0: # <<<<<<<<<<<<<< * start, stop = periods, sy * else: */ __pyx_t_8 = ((__pyx_v_periods >= 0) != 0); if (__pyx_t_8) { /* "pandas/src/generated.pyx":4828 * else: * if periods >= 0: * start, stop = periods, sy # <<<<<<<<<<<<<< * else: * start, stop = 0, sy + periods */ __pyx_t_7 = __pyx_v_periods; __pyx_t_6 = __pyx_v_sy; __pyx_v_start = __pyx_t_7; __pyx_v_stop = __pyx_t_6; goto __pyx_L12; } /*else*/ { /* "pandas/src/generated.pyx":4830 * start, stop = periods, sy * else: * start, stop = 0, sy + periods # <<<<<<<<<<<<<< * for j in range(start, stop): * for i in range(sx): */ __pyx_t_6 = 0; __pyx_t_7 = (__pyx_v_sy + __pyx_v_periods); __pyx_v_start = __pyx_t_6; __pyx_v_stop = __pyx_t_7; } __pyx_L12:; /* "pandas/src/generated.pyx":4831 * else: * start, stop = 0, sy + periods * for j in range(start, stop): # <<<<<<<<<<<<<< * for i in range(sx): * out[i, j] = arr[i, j] - arr[i, j - periods] */ __pyx_t_7 = __pyx_v_stop; for (__pyx_t_6 = __pyx_v_start; __pyx_t_6 < __pyx_t_7; __pyx_t_6+=1) { __pyx_v_j = __pyx_t_6; /* "pandas/src/generated.pyx":4832 * start, stop = 0, sy + periods * for j in range(start, stop): * for i in range(sx): # <<<<<<<<<<<<<< * out[i, j] = arr[i, j] - arr[i, j - periods] * else: */ __pyx_t_9 = __pyx_v_sx; for (__pyx_t_10 = 0; __pyx_t_10 < __pyx_t_9; __pyx_t_10+=1) { __pyx_v_i = __pyx_t_10; /* "pandas/src/generated.pyx":4833 * for j in range(start, stop): * for i in range(sx): * out[i, j] = arr[i, j] - arr[i, j - periods] # <<<<<<<<<<<<<< * else: * if axis == 0: */ __pyx_t_17 = __pyx_v_i; __pyx_t_18 = __pyx_v_j; __pyx_t_19 = __pyx_v_i; __pyx_t_20 = (__pyx_v_j - __pyx_v_periods); __pyx_t_21 = __pyx_v_i; __pyx_t_22 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_22, __pyx_pybuffernd_out.diminfo[1].strides) = ((*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_arr.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_arr.diminfo[0].strides, __pyx_t_18, __pyx_pybuffernd_arr.diminfo[1].strides)) - (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_arr.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_arr.diminfo[0].strides, __pyx_t_20, __pyx_pybuffernd_arr.diminfo[1].strides))); } } } __pyx_L6:; goto __pyx_L5; } /*else*/ { /* "pandas/src/generated.pyx":4835 * out[i, j] = arr[i, j] - arr[i, j - periods] * else: * if axis == 0: # <<<<<<<<<<<<<< * if periods >= 0: * start, stop = periods, sx */ __pyx_t_8 = ((__pyx_v_axis == 0) != 0); if (__pyx_t_8) { /* "pandas/src/generated.pyx":4836 * else: * if axis == 0: * if periods >= 0: # <<<<<<<<<<<<<< * start, stop = periods, sx * else: */ __pyx_t_8 = ((__pyx_v_periods >= 0) != 0); if (__pyx_t_8) { /* "pandas/src/generated.pyx":4837 * if axis == 0: * if periods >= 0: * start, stop = periods, sx # <<<<<<<<<<<<<< * else: * start, stop = 0, sx + periods */ __pyx_t_7 = __pyx_v_periods; __pyx_t_6 = __pyx_v_sx; __pyx_v_start = __pyx_t_7; __pyx_v_stop = __pyx_t_6; goto __pyx_L18; } /*else*/ { /* "pandas/src/generated.pyx":4839 * start, stop = periods, sx * else: * start, stop = 0, sx + periods # <<<<<<<<<<<<<< * for i in range(start, stop): * for j in range(sy): */ __pyx_t_6 = 0; __pyx_t_7 = (__pyx_v_sx + __pyx_v_periods); __pyx_v_start = __pyx_t_6; __pyx_v_stop = __pyx_t_7; } __pyx_L18:; /* "pandas/src/generated.pyx":4840 * else: * start, stop = 0, sx + periods * for i in range(start, stop): # <<<<<<<<<<<<<< * for j in range(sy): * out[i, j] = arr[i, j] - arr[i - periods, j] */ __pyx_t_7 = __pyx_v_stop; for (__pyx_t_6 = __pyx_v_start; __pyx_t_6 < __pyx_t_7; __pyx_t_6+=1) { __pyx_v_i = __pyx_t_6; /* "pandas/src/generated.pyx":4841 * start, stop = 0, sx + periods * for i in range(start, stop): * for j in range(sy): # <<<<<<<<<<<<<< * out[i, j] = arr[i, j] - arr[i - periods, j] * else: */ __pyx_t_9 = __pyx_v_sy; for (__pyx_t_10 = 0; __pyx_t_10 < __pyx_t_9; __pyx_t_10+=1) { __pyx_v_j = __pyx_t_10; /* "pandas/src/generated.pyx":4842 * for i in range(start, stop): * for j in range(sy): * out[i, j] = arr[i, j] - arr[i - periods, j] # <<<<<<<<<<<<<< * else: * if periods >= 0: */ __pyx_t_23 = __pyx_v_i; __pyx_t_24 = __pyx_v_j; __pyx_t_25 = (__pyx_v_i - __pyx_v_periods); __pyx_t_26 = __pyx_v_j; __pyx_t_27 = __pyx_v_i; __pyx_t_28 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_27, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_28, __pyx_pybuffernd_out.diminfo[1].strides) = ((*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_arr.rcbuffer->pybuffer.buf, __pyx_t_23, __pyx_pybuffernd_arr.diminfo[0].strides, __pyx_t_24, __pyx_pybuffernd_arr.diminfo[1].strides)) - (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_arr.rcbuffer->pybuffer.buf, __pyx_t_25, __pyx_pybuffernd_arr.diminfo[0].strides, __pyx_t_26, __pyx_pybuffernd_arr.diminfo[1].strides))); } } goto __pyx_L17; } /*else*/ { /* "pandas/src/generated.pyx":4844 * out[i, j] = arr[i, j] - arr[i - periods, j] * else: * if periods >= 0: # <<<<<<<<<<<<<< * start, stop = periods, sy * else: */ __pyx_t_8 = ((__pyx_v_periods >= 0) != 0); if (__pyx_t_8) { /* "pandas/src/generated.pyx":4845 * else: * if periods >= 0: * start, stop = periods, sy # <<<<<<<<<<<<<< * else: * start, stop = 0, sy + periods */ __pyx_t_7 = __pyx_v_periods; __pyx_t_6 = __pyx_v_sy; __pyx_v_start = __pyx_t_7; __pyx_v_stop = __pyx_t_6; goto __pyx_L23; } /*else*/ { /* "pandas/src/generated.pyx":4847 * start, stop = periods, sy * else: * start, stop = 0, sy + periods # <<<<<<<<<<<<<< * for i in range(sx): * for j in range(start, stop): */ __pyx_t_6 = 0; __pyx_t_7 = (__pyx_v_sy + __pyx_v_periods); __pyx_v_start = __pyx_t_6; __pyx_v_stop = __pyx_t_7; } __pyx_L23:; /* "pandas/src/generated.pyx":4848 * else: * start, stop = 0, sy + periods * for i in range(sx): # <<<<<<<<<<<<<< * for j in range(start, stop): * out[i, j] = arr[i, j] - arr[i, j - periods] */ __pyx_t_7 = __pyx_v_sx; for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_7; __pyx_t_6+=1) { __pyx_v_i = __pyx_t_6; /* "pandas/src/generated.pyx":4849 * start, stop = 0, sy + periods * for i in range(sx): * for j in range(start, stop): # <<<<<<<<<<<<<< * out[i, j] = arr[i, j] - arr[i, j - periods] * @cython.boundscheck(False) */ __pyx_t_9 = __pyx_v_stop; for (__pyx_t_10 = __pyx_v_start; __pyx_t_10 < __pyx_t_9; __pyx_t_10+=1) { __pyx_v_j = __pyx_t_10; /* "pandas/src/generated.pyx":4850 * for i in range(sx): * for j in range(start, stop): * out[i, j] = arr[i, j] - arr[i, j - periods] # <<<<<<<<<<<<<< * @cython.boundscheck(False) * @cython.wraparound(False) */ __pyx_t_29 = __pyx_v_i; __pyx_t_30 = __pyx_v_j; __pyx_t_31 = __pyx_v_i; __pyx_t_32 = (__pyx_v_j - __pyx_v_periods); __pyx_t_33 = __pyx_v_i; __pyx_t_34 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_33, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_34, __pyx_pybuffernd_out.diminfo[1].strides) = ((*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_arr.rcbuffer->pybuffer.buf, __pyx_t_29, __pyx_pybuffernd_arr.diminfo[0].strides, __pyx_t_30, __pyx_pybuffernd_arr.diminfo[1].strides)) - (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_arr.rcbuffer->pybuffer.buf, __pyx_t_31, __pyx_pybuffernd_arr.diminfo[0].strides, __pyx_t_32, __pyx_pybuffernd_arr.diminfo[1].strides))); } } } __pyx_L17:; } __pyx_L5:; /* "pandas/src/generated.pyx":4810 * @cython.boundscheck(False) * @cython.wraparound(False) * def diff_2d_float64(ndarray[float64_t, ndim=2] arr, # <<<<<<<<<<<<<< * ndarray[float64_t, ndim=2] out, * Py_ssize_t periods, int axis): */ /* 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_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_arr.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.diff_2d_float64", __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_out.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":4853 * @cython.boundscheck(False) * @cython.wraparound(False) * def diff_2d_float32(ndarray[float32_t, ndim=2] arr, # <<<<<<<<<<<<<< * ndarray[float32_t, ndim=2] out, * Py_ssize_t periods, int axis): */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_377diff_2d_float32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_377diff_2d_float32 = {__Pyx_NAMESTR("diff_2d_float32"), (PyCFunction)__pyx_pw_6pandas_5algos_377diff_2d_float32, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_377diff_2d_float32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_arr = 0; PyArrayObject *__pyx_v_out = 0; Py_ssize_t __pyx_v_periods; int __pyx_v_axis; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("diff_2d_float32 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_arr,&__pyx_n_s_out,&__pyx_n_s_periods,&__pyx_n_s_axis,0}; PyObject* values[4] = {0,0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_arr)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_out)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("diff_2d_float32", 1, 4, 4, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4853; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_periods)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("diff_2d_float32", 1, 4, 4, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4853; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_axis)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("diff_2d_float32", 1, 4, 4, 3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4853; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "diff_2d_float32") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4853; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 4) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[3] = PyTuple_GET_ITEM(__pyx_args, 3); } __pyx_v_arr = ((PyArrayObject *)values[0]); __pyx_v_out = ((PyArrayObject *)values[1]); __pyx_v_periods = __Pyx_PyIndex_AsSsize_t(values[2]); if (unlikely((__pyx_v_periods == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4855; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_axis = __Pyx_PyInt_As_int(values[3]); if (unlikely((__pyx_v_axis == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4855; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("diff_2d_float32", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4853; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.diff_2d_float32", __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_filename = __pyx_f[2]; __pyx_lineno = 4853; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_5numpy_ndarray, 1, "out", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4854; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_376diff_2d_float32(__pyx_self, __pyx_v_arr, __pyx_v_out, __pyx_v_periods, __pyx_v_axis); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5algos_376diff_2d_float32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_arr, PyArrayObject *__pyx_v_out, Py_ssize_t __pyx_v_periods, int __pyx_v_axis) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_sx; Py_ssize_t __pyx_v_sy; Py_ssize_t __pyx_v_start; Py_ssize_t __pyx_v_stop; __Pyx_LocalBuf_ND __pyx_pybuffernd_arr; __Pyx_Buffer __pyx_pybuffer_arr; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; 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 *); Py_ssize_t __pyx_t_6; Py_ssize_t __pyx_t_7; int __pyx_t_8; Py_ssize_t __pyx_t_9; Py_ssize_t __pyx_t_10; Py_ssize_t __pyx_t_11; Py_ssize_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; 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("diff_2d_float32", 0); __pyx_pybuffer_arr.pybuffer.buf = NULL; __pyx_pybuffer_arr.refcount = 0; __pyx_pybuffernd_arr.data = NULL; __pyx_pybuffernd_arr.rcbuffer = &__pyx_pybuffer_arr; __pyx_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_arr.rcbuffer->pybuffer, (PyObject*)__pyx_v_arr, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4853; __pyx_clineno = __LINE__; goto __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]; __pyx_pybuffernd_arr.diminfo[1].strides = __pyx_pybuffernd_arr.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_arr.diminfo[1].shape = __pyx_pybuffernd_arr.rcbuffer->pybuffer.shape[1]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_v_out, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4853; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; __pyx_pybuffernd_out.diminfo[1].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_out.diminfo[1].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[1]; /* "pandas/src/generated.pyx":4859 * Py_ssize_t i, j, sx, sy * * sx, sy = ( arr).shape # <<<<<<<<<<<<<< * if arr.flags.f_contiguous: * if axis == 0: */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_arr), __pyx_n_s_shape); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4859; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) { PyObject* sequence = __pyx_t_1; #if CYTHON_COMPILING_IN_CPYTHON Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4859; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1); } else { __pyx_t_2 = PyList_GET_ITEM(sequence, 0); __pyx_t_3 = PyList_GET_ITEM(sequence, 1); } __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); #else __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4859; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4859; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } else { Py_ssize_t index = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4859; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_5 = Py_TYPE(__pyx_t_4)->tp_iternext; index = 0; __pyx_t_2 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_2)) goto __pyx_L3_unpacking_failed; __Pyx_GOTREF(__pyx_t_2); index = 1; __pyx_t_3 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_3)) goto __pyx_L3_unpacking_failed; __Pyx_GOTREF(__pyx_t_3); if (__Pyx_IternextUnpackEndCheck(__pyx_t_5(__pyx_t_4), 2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4859; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 4859; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_L4_unpacking_done:; } __pyx_t_6 = __Pyx_PyIndex_AsSsize_t(__pyx_t_2); if (unlikely((__pyx_t_6 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4859; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_7 = __Pyx_PyIndex_AsSsize_t(__pyx_t_3); if (unlikely((__pyx_t_7 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4859; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_sx = __pyx_t_6; __pyx_v_sy = __pyx_t_7; /* "pandas/src/generated.pyx":4860 * * sx, sy = ( arr).shape * if arr.flags.f_contiguous: # <<<<<<<<<<<<<< * if axis == 0: * if periods >= 0: */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_arr), __pyx_n_s_flags); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4860; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_f_contiguous); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4860; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4860; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_8) { /* "pandas/src/generated.pyx":4861 * sx, sy = ( arr).shape * if arr.flags.f_contiguous: * if axis == 0: # <<<<<<<<<<<<<< * if periods >= 0: * start, stop = periods, sx */ __pyx_t_8 = ((__pyx_v_axis == 0) != 0); if (__pyx_t_8) { /* "pandas/src/generated.pyx":4862 * if arr.flags.f_contiguous: * if axis == 0: * if periods >= 0: # <<<<<<<<<<<<<< * start, stop = periods, sx * else: */ __pyx_t_8 = ((__pyx_v_periods >= 0) != 0); if (__pyx_t_8) { /* "pandas/src/generated.pyx":4863 * if axis == 0: * if periods >= 0: * start, stop = periods, sx # <<<<<<<<<<<<<< * else: * start, stop = 0, sx + periods */ __pyx_t_7 = __pyx_v_periods; __pyx_t_6 = __pyx_v_sx; __pyx_v_start = __pyx_t_7; __pyx_v_stop = __pyx_t_6; goto __pyx_L7; } /*else*/ { /* "pandas/src/generated.pyx":4865 * start, stop = periods, sx * else: * start, stop = 0, sx + periods # <<<<<<<<<<<<<< * for j in range(sy): * for i in range(start, stop): */ __pyx_t_6 = 0; __pyx_t_7 = (__pyx_v_sx + __pyx_v_periods); __pyx_v_start = __pyx_t_6; __pyx_v_stop = __pyx_t_7; } __pyx_L7:; /* "pandas/src/generated.pyx":4866 * else: * start, stop = 0, sx + periods * for j in range(sy): # <<<<<<<<<<<<<< * for i in range(start, stop): * out[i, j] = arr[i, j] - arr[i - periods, j] */ __pyx_t_7 = __pyx_v_sy; for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_7; __pyx_t_6+=1) { __pyx_v_j = __pyx_t_6; /* "pandas/src/generated.pyx":4867 * start, stop = 0, sx + periods * for j in range(sy): * for i in range(start, stop): # <<<<<<<<<<<<<< * out[i, j] = arr[i, j] - arr[i - periods, j] * else: */ __pyx_t_9 = __pyx_v_stop; for (__pyx_t_10 = __pyx_v_start; __pyx_t_10 < __pyx_t_9; __pyx_t_10+=1) { __pyx_v_i = __pyx_t_10; /* "pandas/src/generated.pyx":4868 * for j in range(sy): * for i in range(start, stop): * out[i, j] = arr[i, j] - arr[i - periods, j] # <<<<<<<<<<<<<< * else: * if periods >= 0: */ __pyx_t_11 = __pyx_v_i; __pyx_t_12 = __pyx_v_j; __pyx_t_13 = (__pyx_v_i - __pyx_v_periods); __pyx_t_14 = __pyx_v_j; __pyx_t_15 = __pyx_v_i; __pyx_t_16 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_16, __pyx_pybuffernd_out.diminfo[1].strides) = ((*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_arr.rcbuffer->pybuffer.buf, __pyx_t_11, __pyx_pybuffernd_arr.diminfo[0].strides, __pyx_t_12, __pyx_pybuffernd_arr.diminfo[1].strides)) - (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_arr.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_arr.diminfo[0].strides, __pyx_t_14, __pyx_pybuffernd_arr.diminfo[1].strides))); } } goto __pyx_L6; } /*else*/ { /* "pandas/src/generated.pyx":4870 * out[i, j] = arr[i, j] - arr[i - periods, j] * else: * if periods >= 0: # <<<<<<<<<<<<<< * start, stop = periods, sy * else: */ __pyx_t_8 = ((__pyx_v_periods >= 0) != 0); if (__pyx_t_8) { /* "pandas/src/generated.pyx":4871 * else: * if periods >= 0: * start, stop = periods, sy # <<<<<<<<<<<<<< * else: * start, stop = 0, sy + periods */ __pyx_t_7 = __pyx_v_periods; __pyx_t_6 = __pyx_v_sy; __pyx_v_start = __pyx_t_7; __pyx_v_stop = __pyx_t_6; goto __pyx_L12; } /*else*/ { /* "pandas/src/generated.pyx":4873 * start, stop = periods, sy * else: * start, stop = 0, sy + periods # <<<<<<<<<<<<<< * for j in range(start, stop): * for i in range(sx): */ __pyx_t_6 = 0; __pyx_t_7 = (__pyx_v_sy + __pyx_v_periods); __pyx_v_start = __pyx_t_6; __pyx_v_stop = __pyx_t_7; } __pyx_L12:; /* "pandas/src/generated.pyx":4874 * else: * start, stop = 0, sy + periods * for j in range(start, stop): # <<<<<<<<<<<<<< * for i in range(sx): * out[i, j] = arr[i, j] - arr[i, j - periods] */ __pyx_t_7 = __pyx_v_stop; for (__pyx_t_6 = __pyx_v_start; __pyx_t_6 < __pyx_t_7; __pyx_t_6+=1) { __pyx_v_j = __pyx_t_6; /* "pandas/src/generated.pyx":4875 * start, stop = 0, sy + periods * for j in range(start, stop): * for i in range(sx): # <<<<<<<<<<<<<< * out[i, j] = arr[i, j] - arr[i, j - periods] * else: */ __pyx_t_9 = __pyx_v_sx; for (__pyx_t_10 = 0; __pyx_t_10 < __pyx_t_9; __pyx_t_10+=1) { __pyx_v_i = __pyx_t_10; /* "pandas/src/generated.pyx":4876 * for j in range(start, stop): * for i in range(sx): * out[i, j] = arr[i, j] - arr[i, j - periods] # <<<<<<<<<<<<<< * else: * if axis == 0: */ __pyx_t_17 = __pyx_v_i; __pyx_t_18 = __pyx_v_j; __pyx_t_19 = __pyx_v_i; __pyx_t_20 = (__pyx_v_j - __pyx_v_periods); __pyx_t_21 = __pyx_v_i; __pyx_t_22 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_22, __pyx_pybuffernd_out.diminfo[1].strides) = ((*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_arr.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_arr.diminfo[0].strides, __pyx_t_18, __pyx_pybuffernd_arr.diminfo[1].strides)) - (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_arr.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_arr.diminfo[0].strides, __pyx_t_20, __pyx_pybuffernd_arr.diminfo[1].strides))); } } } __pyx_L6:; goto __pyx_L5; } /*else*/ { /* "pandas/src/generated.pyx":4878 * out[i, j] = arr[i, j] - arr[i, j - periods] * else: * if axis == 0: # <<<<<<<<<<<<<< * if periods >= 0: * start, stop = periods, sx */ __pyx_t_8 = ((__pyx_v_axis == 0) != 0); if (__pyx_t_8) { /* "pandas/src/generated.pyx":4879 * else: * if axis == 0: * if periods >= 0: # <<<<<<<<<<<<<< * start, stop = periods, sx * else: */ __pyx_t_8 = ((__pyx_v_periods >= 0) != 0); if (__pyx_t_8) { /* "pandas/src/generated.pyx":4880 * if axis == 0: * if periods >= 0: * start, stop = periods, sx # <<<<<<<<<<<<<< * else: * start, stop = 0, sx + periods */ __pyx_t_7 = __pyx_v_periods; __pyx_t_6 = __pyx_v_sx; __pyx_v_start = __pyx_t_7; __pyx_v_stop = __pyx_t_6; goto __pyx_L18; } /*else*/ { /* "pandas/src/generated.pyx":4882 * start, stop = periods, sx * else: * start, stop = 0, sx + periods # <<<<<<<<<<<<<< * for i in range(start, stop): * for j in range(sy): */ __pyx_t_6 = 0; __pyx_t_7 = (__pyx_v_sx + __pyx_v_periods); __pyx_v_start = __pyx_t_6; __pyx_v_stop = __pyx_t_7; } __pyx_L18:; /* "pandas/src/generated.pyx":4883 * else: * start, stop = 0, sx + periods * for i in range(start, stop): # <<<<<<<<<<<<<< * for j in range(sy): * out[i, j] = arr[i, j] - arr[i - periods, j] */ __pyx_t_7 = __pyx_v_stop; for (__pyx_t_6 = __pyx_v_start; __pyx_t_6 < __pyx_t_7; __pyx_t_6+=1) { __pyx_v_i = __pyx_t_6; /* "pandas/src/generated.pyx":4884 * start, stop = 0, sx + periods * for i in range(start, stop): * for j in range(sy): # <<<<<<<<<<<<<< * out[i, j] = arr[i, j] - arr[i - periods, j] * else: */ __pyx_t_9 = __pyx_v_sy; for (__pyx_t_10 = 0; __pyx_t_10 < __pyx_t_9; __pyx_t_10+=1) { __pyx_v_j = __pyx_t_10; /* "pandas/src/generated.pyx":4885 * for i in range(start, stop): * for j in range(sy): * out[i, j] = arr[i, j] - arr[i - periods, j] # <<<<<<<<<<<<<< * else: * if periods >= 0: */ __pyx_t_23 = __pyx_v_i; __pyx_t_24 = __pyx_v_j; __pyx_t_25 = (__pyx_v_i - __pyx_v_periods); __pyx_t_26 = __pyx_v_j; __pyx_t_27 = __pyx_v_i; __pyx_t_28 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_27, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_28, __pyx_pybuffernd_out.diminfo[1].strides) = ((*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_arr.rcbuffer->pybuffer.buf, __pyx_t_23, __pyx_pybuffernd_arr.diminfo[0].strides, __pyx_t_24, __pyx_pybuffernd_arr.diminfo[1].strides)) - (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_arr.rcbuffer->pybuffer.buf, __pyx_t_25, __pyx_pybuffernd_arr.diminfo[0].strides, __pyx_t_26, __pyx_pybuffernd_arr.diminfo[1].strides))); } } goto __pyx_L17; } /*else*/ { /* "pandas/src/generated.pyx":4887 * out[i, j] = arr[i, j] - arr[i - periods, j] * else: * if periods >= 0: # <<<<<<<<<<<<<< * start, stop = periods, sy * else: */ __pyx_t_8 = ((__pyx_v_periods >= 0) != 0); if (__pyx_t_8) { /* "pandas/src/generated.pyx":4888 * else: * if periods >= 0: * start, stop = periods, sy # <<<<<<<<<<<<<< * else: * start, stop = 0, sy + periods */ __pyx_t_7 = __pyx_v_periods; __pyx_t_6 = __pyx_v_sy; __pyx_v_start = __pyx_t_7; __pyx_v_stop = __pyx_t_6; goto __pyx_L23; } /*else*/ { /* "pandas/src/generated.pyx":4890 * start, stop = periods, sy * else: * start, stop = 0, sy + periods # <<<<<<<<<<<<<< * for i in range(sx): * for j in range(start, stop): */ __pyx_t_6 = 0; __pyx_t_7 = (__pyx_v_sy + __pyx_v_periods); __pyx_v_start = __pyx_t_6; __pyx_v_stop = __pyx_t_7; } __pyx_L23:; /* "pandas/src/generated.pyx":4891 * else: * start, stop = 0, sy + periods * for i in range(sx): # <<<<<<<<<<<<<< * for j in range(start, stop): * out[i, j] = arr[i, j] - arr[i, j - periods] */ __pyx_t_7 = __pyx_v_sx; for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_7; __pyx_t_6+=1) { __pyx_v_i = __pyx_t_6; /* "pandas/src/generated.pyx":4892 * start, stop = 0, sy + periods * for i in range(sx): * for j in range(start, stop): # <<<<<<<<<<<<<< * out[i, j] = arr[i, j] - arr[i, j - periods] * @cython.boundscheck(False) */ __pyx_t_9 = __pyx_v_stop; for (__pyx_t_10 = __pyx_v_start; __pyx_t_10 < __pyx_t_9; __pyx_t_10+=1) { __pyx_v_j = __pyx_t_10; /* "pandas/src/generated.pyx":4893 * for i in range(sx): * for j in range(start, stop): * out[i, j] = arr[i, j] - arr[i, j - periods] # <<<<<<<<<<<<<< * @cython.boundscheck(False) * @cython.wraparound(False) */ __pyx_t_29 = __pyx_v_i; __pyx_t_30 = __pyx_v_j; __pyx_t_31 = __pyx_v_i; __pyx_t_32 = (__pyx_v_j - __pyx_v_periods); __pyx_t_33 = __pyx_v_i; __pyx_t_34 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_33, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_34, __pyx_pybuffernd_out.diminfo[1].strides) = ((*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_arr.rcbuffer->pybuffer.buf, __pyx_t_29, __pyx_pybuffernd_arr.diminfo[0].strides, __pyx_t_30, __pyx_pybuffernd_arr.diminfo[1].strides)) - (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_arr.rcbuffer->pybuffer.buf, __pyx_t_31, __pyx_pybuffernd_arr.diminfo[0].strides, __pyx_t_32, __pyx_pybuffernd_arr.diminfo[1].strides))); } } } __pyx_L17:; } __pyx_L5:; /* "pandas/src/generated.pyx":4853 * @cython.boundscheck(False) * @cython.wraparound(False) * def diff_2d_float32(ndarray[float32_t, ndim=2] arr, # <<<<<<<<<<<<<< * ndarray[float32_t, ndim=2] out, * Py_ssize_t periods, int axis): */ /* 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_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_arr.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.diff_2d_float32", __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_out.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":4896 * @cython.boundscheck(False) * @cython.wraparound(False) * def diff_2d_int8(ndarray[int8_t, ndim=2] arr, # <<<<<<<<<<<<<< * ndarray[float32_t, ndim=2] out, * Py_ssize_t periods, int axis): */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_379diff_2d_int8(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_379diff_2d_int8 = {__Pyx_NAMESTR("diff_2d_int8"), (PyCFunction)__pyx_pw_6pandas_5algos_379diff_2d_int8, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_379diff_2d_int8(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_arr = 0; PyArrayObject *__pyx_v_out = 0; Py_ssize_t __pyx_v_periods; int __pyx_v_axis; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("diff_2d_int8 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_arr,&__pyx_n_s_out,&__pyx_n_s_periods,&__pyx_n_s_axis,0}; PyObject* values[4] = {0,0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_arr)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_out)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("diff_2d_int8", 1, 4, 4, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4896; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_periods)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("diff_2d_int8", 1, 4, 4, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4896; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_axis)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("diff_2d_int8", 1, 4, 4, 3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4896; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "diff_2d_int8") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4896; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 4) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[3] = PyTuple_GET_ITEM(__pyx_args, 3); } __pyx_v_arr = ((PyArrayObject *)values[0]); __pyx_v_out = ((PyArrayObject *)values[1]); __pyx_v_periods = __Pyx_PyIndex_AsSsize_t(values[2]); if (unlikely((__pyx_v_periods == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4898; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_axis = __Pyx_PyInt_As_int(values[3]); if (unlikely((__pyx_v_axis == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4898; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("diff_2d_int8", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4896; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.diff_2d_int8", __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_filename = __pyx_f[2]; __pyx_lineno = 4896; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_5numpy_ndarray, 1, "out", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4897; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_378diff_2d_int8(__pyx_self, __pyx_v_arr, __pyx_v_out, __pyx_v_periods, __pyx_v_axis); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5algos_378diff_2d_int8(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_arr, PyArrayObject *__pyx_v_out, Py_ssize_t __pyx_v_periods, int __pyx_v_axis) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_sx; Py_ssize_t __pyx_v_sy; Py_ssize_t __pyx_v_start; Py_ssize_t __pyx_v_stop; __Pyx_LocalBuf_ND __pyx_pybuffernd_arr; __Pyx_Buffer __pyx_pybuffer_arr; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; 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 *); Py_ssize_t __pyx_t_6; Py_ssize_t __pyx_t_7; int __pyx_t_8; Py_ssize_t __pyx_t_9; Py_ssize_t __pyx_t_10; Py_ssize_t __pyx_t_11; Py_ssize_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; 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("diff_2d_int8", 0); __pyx_pybuffer_arr.pybuffer.buf = NULL; __pyx_pybuffer_arr.refcount = 0; __pyx_pybuffernd_arr.data = NULL; __pyx_pybuffernd_arr.rcbuffer = &__pyx_pybuffer_arr; __pyx_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_arr.rcbuffer->pybuffer, (PyObject*)__pyx_v_arr, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int8_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4896; __pyx_clineno = __LINE__; goto __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]; __pyx_pybuffernd_arr.diminfo[1].strides = __pyx_pybuffernd_arr.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_arr.diminfo[1].shape = __pyx_pybuffernd_arr.rcbuffer->pybuffer.shape[1]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_v_out, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4896; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; __pyx_pybuffernd_out.diminfo[1].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_out.diminfo[1].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[1]; /* "pandas/src/generated.pyx":4902 * Py_ssize_t i, j, sx, sy * * sx, sy = ( arr).shape # <<<<<<<<<<<<<< * if arr.flags.f_contiguous: * if axis == 0: */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_arr), __pyx_n_s_shape); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4902; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) { PyObject* sequence = __pyx_t_1; #if CYTHON_COMPILING_IN_CPYTHON Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4902; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1); } else { __pyx_t_2 = PyList_GET_ITEM(sequence, 0); __pyx_t_3 = PyList_GET_ITEM(sequence, 1); } __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); #else __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4902; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4902; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } else { Py_ssize_t index = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4902; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_5 = Py_TYPE(__pyx_t_4)->tp_iternext; index = 0; __pyx_t_2 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_2)) goto __pyx_L3_unpacking_failed; __Pyx_GOTREF(__pyx_t_2); index = 1; __pyx_t_3 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_3)) goto __pyx_L3_unpacking_failed; __Pyx_GOTREF(__pyx_t_3); if (__Pyx_IternextUnpackEndCheck(__pyx_t_5(__pyx_t_4), 2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4902; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 4902; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_L4_unpacking_done:; } __pyx_t_6 = __Pyx_PyIndex_AsSsize_t(__pyx_t_2); if (unlikely((__pyx_t_6 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4902; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_7 = __Pyx_PyIndex_AsSsize_t(__pyx_t_3); if (unlikely((__pyx_t_7 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4902; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_sx = __pyx_t_6; __pyx_v_sy = __pyx_t_7; /* "pandas/src/generated.pyx":4903 * * sx, sy = ( arr).shape * if arr.flags.f_contiguous: # <<<<<<<<<<<<<< * if axis == 0: * if periods >= 0: */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_arr), __pyx_n_s_flags); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4903; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_f_contiguous); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4903; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4903; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_8) { /* "pandas/src/generated.pyx":4904 * sx, sy = ( arr).shape * if arr.flags.f_contiguous: * if axis == 0: # <<<<<<<<<<<<<< * if periods >= 0: * start, stop = periods, sx */ __pyx_t_8 = ((__pyx_v_axis == 0) != 0); if (__pyx_t_8) { /* "pandas/src/generated.pyx":4905 * if arr.flags.f_contiguous: * if axis == 0: * if periods >= 0: # <<<<<<<<<<<<<< * start, stop = periods, sx * else: */ __pyx_t_8 = ((__pyx_v_periods >= 0) != 0); if (__pyx_t_8) { /* "pandas/src/generated.pyx":4906 * if axis == 0: * if periods >= 0: * start, stop = periods, sx # <<<<<<<<<<<<<< * else: * start, stop = 0, sx + periods */ __pyx_t_7 = __pyx_v_periods; __pyx_t_6 = __pyx_v_sx; __pyx_v_start = __pyx_t_7; __pyx_v_stop = __pyx_t_6; goto __pyx_L7; } /*else*/ { /* "pandas/src/generated.pyx":4908 * start, stop = periods, sx * else: * start, stop = 0, sx + periods # <<<<<<<<<<<<<< * for j in range(sy): * for i in range(start, stop): */ __pyx_t_6 = 0; __pyx_t_7 = (__pyx_v_sx + __pyx_v_periods); __pyx_v_start = __pyx_t_6; __pyx_v_stop = __pyx_t_7; } __pyx_L7:; /* "pandas/src/generated.pyx":4909 * else: * start, stop = 0, sx + periods * for j in range(sy): # <<<<<<<<<<<<<< * for i in range(start, stop): * out[i, j] = arr[i, j] - arr[i - periods, j] */ __pyx_t_7 = __pyx_v_sy; for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_7; __pyx_t_6+=1) { __pyx_v_j = __pyx_t_6; /* "pandas/src/generated.pyx":4910 * start, stop = 0, sx + periods * for j in range(sy): * for i in range(start, stop): # <<<<<<<<<<<<<< * out[i, j] = arr[i, j] - arr[i - periods, j] * else: */ __pyx_t_9 = __pyx_v_stop; for (__pyx_t_10 = __pyx_v_start; __pyx_t_10 < __pyx_t_9; __pyx_t_10+=1) { __pyx_v_i = __pyx_t_10; /* "pandas/src/generated.pyx":4911 * for j in range(sy): * for i in range(start, stop): * out[i, j] = arr[i, j] - arr[i - periods, j] # <<<<<<<<<<<<<< * else: * if periods >= 0: */ __pyx_t_11 = __pyx_v_i; __pyx_t_12 = __pyx_v_j; __pyx_t_13 = (__pyx_v_i - __pyx_v_periods); __pyx_t_14 = __pyx_v_j; __pyx_t_15 = __pyx_v_i; __pyx_t_16 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_16, __pyx_pybuffernd_out.diminfo[1].strides) = ((*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int8_t *, __pyx_pybuffernd_arr.rcbuffer->pybuffer.buf, __pyx_t_11, __pyx_pybuffernd_arr.diminfo[0].strides, __pyx_t_12, __pyx_pybuffernd_arr.diminfo[1].strides)) - (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int8_t *, __pyx_pybuffernd_arr.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_arr.diminfo[0].strides, __pyx_t_14, __pyx_pybuffernd_arr.diminfo[1].strides))); } } goto __pyx_L6; } /*else*/ { /* "pandas/src/generated.pyx":4913 * out[i, j] = arr[i, j] - arr[i - periods, j] * else: * if periods >= 0: # <<<<<<<<<<<<<< * start, stop = periods, sy * else: */ __pyx_t_8 = ((__pyx_v_periods >= 0) != 0); if (__pyx_t_8) { /* "pandas/src/generated.pyx":4914 * else: * if periods >= 0: * start, stop = periods, sy # <<<<<<<<<<<<<< * else: * start, stop = 0, sy + periods */ __pyx_t_7 = __pyx_v_periods; __pyx_t_6 = __pyx_v_sy; __pyx_v_start = __pyx_t_7; __pyx_v_stop = __pyx_t_6; goto __pyx_L12; } /*else*/ { /* "pandas/src/generated.pyx":4916 * start, stop = periods, sy * else: * start, stop = 0, sy + periods # <<<<<<<<<<<<<< * for j in range(start, stop): * for i in range(sx): */ __pyx_t_6 = 0; __pyx_t_7 = (__pyx_v_sy + __pyx_v_periods); __pyx_v_start = __pyx_t_6; __pyx_v_stop = __pyx_t_7; } __pyx_L12:; /* "pandas/src/generated.pyx":4917 * else: * start, stop = 0, sy + periods * for j in range(start, stop): # <<<<<<<<<<<<<< * for i in range(sx): * out[i, j] = arr[i, j] - arr[i, j - periods] */ __pyx_t_7 = __pyx_v_stop; for (__pyx_t_6 = __pyx_v_start; __pyx_t_6 < __pyx_t_7; __pyx_t_6+=1) { __pyx_v_j = __pyx_t_6; /* "pandas/src/generated.pyx":4918 * start, stop = 0, sy + periods * for j in range(start, stop): * for i in range(sx): # <<<<<<<<<<<<<< * out[i, j] = arr[i, j] - arr[i, j - periods] * else: */ __pyx_t_9 = __pyx_v_sx; for (__pyx_t_10 = 0; __pyx_t_10 < __pyx_t_9; __pyx_t_10+=1) { __pyx_v_i = __pyx_t_10; /* "pandas/src/generated.pyx":4919 * for j in range(start, stop): * for i in range(sx): * out[i, j] = arr[i, j] - arr[i, j - periods] # <<<<<<<<<<<<<< * else: * if axis == 0: */ __pyx_t_17 = __pyx_v_i; __pyx_t_18 = __pyx_v_j; __pyx_t_19 = __pyx_v_i; __pyx_t_20 = (__pyx_v_j - __pyx_v_periods); __pyx_t_21 = __pyx_v_i; __pyx_t_22 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_22, __pyx_pybuffernd_out.diminfo[1].strides) = ((*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int8_t *, __pyx_pybuffernd_arr.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_arr.diminfo[0].strides, __pyx_t_18, __pyx_pybuffernd_arr.diminfo[1].strides)) - (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int8_t *, __pyx_pybuffernd_arr.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_arr.diminfo[0].strides, __pyx_t_20, __pyx_pybuffernd_arr.diminfo[1].strides))); } } } __pyx_L6:; goto __pyx_L5; } /*else*/ { /* "pandas/src/generated.pyx":4921 * out[i, j] = arr[i, j] - arr[i, j - periods] * else: * if axis == 0: # <<<<<<<<<<<<<< * if periods >= 0: * start, stop = periods, sx */ __pyx_t_8 = ((__pyx_v_axis == 0) != 0); if (__pyx_t_8) { /* "pandas/src/generated.pyx":4922 * else: * if axis == 0: * if periods >= 0: # <<<<<<<<<<<<<< * start, stop = periods, sx * else: */ __pyx_t_8 = ((__pyx_v_periods >= 0) != 0); if (__pyx_t_8) { /* "pandas/src/generated.pyx":4923 * if axis == 0: * if periods >= 0: * start, stop = periods, sx # <<<<<<<<<<<<<< * else: * start, stop = 0, sx + periods */ __pyx_t_7 = __pyx_v_periods; __pyx_t_6 = __pyx_v_sx; __pyx_v_start = __pyx_t_7; __pyx_v_stop = __pyx_t_6; goto __pyx_L18; } /*else*/ { /* "pandas/src/generated.pyx":4925 * start, stop = periods, sx * else: * start, stop = 0, sx + periods # <<<<<<<<<<<<<< * for i in range(start, stop): * for j in range(sy): */ __pyx_t_6 = 0; __pyx_t_7 = (__pyx_v_sx + __pyx_v_periods); __pyx_v_start = __pyx_t_6; __pyx_v_stop = __pyx_t_7; } __pyx_L18:; /* "pandas/src/generated.pyx":4926 * else: * start, stop = 0, sx + periods * for i in range(start, stop): # <<<<<<<<<<<<<< * for j in range(sy): * out[i, j] = arr[i, j] - arr[i - periods, j] */ __pyx_t_7 = __pyx_v_stop; for (__pyx_t_6 = __pyx_v_start; __pyx_t_6 < __pyx_t_7; __pyx_t_6+=1) { __pyx_v_i = __pyx_t_6; /* "pandas/src/generated.pyx":4927 * start, stop = 0, sx + periods * for i in range(start, stop): * for j in range(sy): # <<<<<<<<<<<<<< * out[i, j] = arr[i, j] - arr[i - periods, j] * else: */ __pyx_t_9 = __pyx_v_sy; for (__pyx_t_10 = 0; __pyx_t_10 < __pyx_t_9; __pyx_t_10+=1) { __pyx_v_j = __pyx_t_10; /* "pandas/src/generated.pyx":4928 * for i in range(start, stop): * for j in range(sy): * out[i, j] = arr[i, j] - arr[i - periods, j] # <<<<<<<<<<<<<< * else: * if periods >= 0: */ __pyx_t_23 = __pyx_v_i; __pyx_t_24 = __pyx_v_j; __pyx_t_25 = (__pyx_v_i - __pyx_v_periods); __pyx_t_26 = __pyx_v_j; __pyx_t_27 = __pyx_v_i; __pyx_t_28 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_27, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_28, __pyx_pybuffernd_out.diminfo[1].strides) = ((*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int8_t *, __pyx_pybuffernd_arr.rcbuffer->pybuffer.buf, __pyx_t_23, __pyx_pybuffernd_arr.diminfo[0].strides, __pyx_t_24, __pyx_pybuffernd_arr.diminfo[1].strides)) - (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int8_t *, __pyx_pybuffernd_arr.rcbuffer->pybuffer.buf, __pyx_t_25, __pyx_pybuffernd_arr.diminfo[0].strides, __pyx_t_26, __pyx_pybuffernd_arr.diminfo[1].strides))); } } goto __pyx_L17; } /*else*/ { /* "pandas/src/generated.pyx":4930 * out[i, j] = arr[i, j] - arr[i - periods, j] * else: * if periods >= 0: # <<<<<<<<<<<<<< * start, stop = periods, sy * else: */ __pyx_t_8 = ((__pyx_v_periods >= 0) != 0); if (__pyx_t_8) { /* "pandas/src/generated.pyx":4931 * else: * if periods >= 0: * start, stop = periods, sy # <<<<<<<<<<<<<< * else: * start, stop = 0, sy + periods */ __pyx_t_7 = __pyx_v_periods; __pyx_t_6 = __pyx_v_sy; __pyx_v_start = __pyx_t_7; __pyx_v_stop = __pyx_t_6; goto __pyx_L23; } /*else*/ { /* "pandas/src/generated.pyx":4933 * start, stop = periods, sy * else: * start, stop = 0, sy + periods # <<<<<<<<<<<<<< * for i in range(sx): * for j in range(start, stop): */ __pyx_t_6 = 0; __pyx_t_7 = (__pyx_v_sy + __pyx_v_periods); __pyx_v_start = __pyx_t_6; __pyx_v_stop = __pyx_t_7; } __pyx_L23:; /* "pandas/src/generated.pyx":4934 * else: * start, stop = 0, sy + periods * for i in range(sx): # <<<<<<<<<<<<<< * for j in range(start, stop): * out[i, j] = arr[i, j] - arr[i, j - periods] */ __pyx_t_7 = __pyx_v_sx; for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_7; __pyx_t_6+=1) { __pyx_v_i = __pyx_t_6; /* "pandas/src/generated.pyx":4935 * start, stop = 0, sy + periods * for i in range(sx): * for j in range(start, stop): # <<<<<<<<<<<<<< * out[i, j] = arr[i, j] - arr[i, j - periods] * @cython.boundscheck(False) */ __pyx_t_9 = __pyx_v_stop; for (__pyx_t_10 = __pyx_v_start; __pyx_t_10 < __pyx_t_9; __pyx_t_10+=1) { __pyx_v_j = __pyx_t_10; /* "pandas/src/generated.pyx":4936 * for i in range(sx): * for j in range(start, stop): * out[i, j] = arr[i, j] - arr[i, j - periods] # <<<<<<<<<<<<<< * @cython.boundscheck(False) * @cython.wraparound(False) */ __pyx_t_29 = __pyx_v_i; __pyx_t_30 = __pyx_v_j; __pyx_t_31 = __pyx_v_i; __pyx_t_32 = (__pyx_v_j - __pyx_v_periods); __pyx_t_33 = __pyx_v_i; __pyx_t_34 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_33, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_34, __pyx_pybuffernd_out.diminfo[1].strides) = ((*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int8_t *, __pyx_pybuffernd_arr.rcbuffer->pybuffer.buf, __pyx_t_29, __pyx_pybuffernd_arr.diminfo[0].strides, __pyx_t_30, __pyx_pybuffernd_arr.diminfo[1].strides)) - (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int8_t *, __pyx_pybuffernd_arr.rcbuffer->pybuffer.buf, __pyx_t_31, __pyx_pybuffernd_arr.diminfo[0].strides, __pyx_t_32, __pyx_pybuffernd_arr.diminfo[1].strides))); } } } __pyx_L17:; } __pyx_L5:; /* "pandas/src/generated.pyx":4896 * @cython.boundscheck(False) * @cython.wraparound(False) * def diff_2d_int8(ndarray[int8_t, ndim=2] arr, # <<<<<<<<<<<<<< * ndarray[float32_t, ndim=2] out, * Py_ssize_t periods, int axis): */ /* 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_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_arr.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.diff_2d_int8", __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_out.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":4939 * @cython.boundscheck(False) * @cython.wraparound(False) * def diff_2d_int16(ndarray[int16_t, ndim=2] arr, # <<<<<<<<<<<<<< * ndarray[float32_t, ndim=2] out, * Py_ssize_t periods, int axis): */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_381diff_2d_int16(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_381diff_2d_int16 = {__Pyx_NAMESTR("diff_2d_int16"), (PyCFunction)__pyx_pw_6pandas_5algos_381diff_2d_int16, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_381diff_2d_int16(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_arr = 0; PyArrayObject *__pyx_v_out = 0; Py_ssize_t __pyx_v_periods; int __pyx_v_axis; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("diff_2d_int16 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_arr,&__pyx_n_s_out,&__pyx_n_s_periods,&__pyx_n_s_axis,0}; PyObject* values[4] = {0,0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_arr)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_out)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("diff_2d_int16", 1, 4, 4, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4939; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_periods)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("diff_2d_int16", 1, 4, 4, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4939; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_axis)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("diff_2d_int16", 1, 4, 4, 3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4939; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "diff_2d_int16") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4939; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 4) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[3] = PyTuple_GET_ITEM(__pyx_args, 3); } __pyx_v_arr = ((PyArrayObject *)values[0]); __pyx_v_out = ((PyArrayObject *)values[1]); __pyx_v_periods = __Pyx_PyIndex_AsSsize_t(values[2]); if (unlikely((__pyx_v_periods == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4941; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_axis = __Pyx_PyInt_As_int(values[3]); if (unlikely((__pyx_v_axis == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4941; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("diff_2d_int16", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4939; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.diff_2d_int16", __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_filename = __pyx_f[2]; __pyx_lineno = 4939; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_5numpy_ndarray, 1, "out", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4940; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_380diff_2d_int16(__pyx_self, __pyx_v_arr, __pyx_v_out, __pyx_v_periods, __pyx_v_axis); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5algos_380diff_2d_int16(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_arr, PyArrayObject *__pyx_v_out, Py_ssize_t __pyx_v_periods, int __pyx_v_axis) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_sx; Py_ssize_t __pyx_v_sy; Py_ssize_t __pyx_v_start; Py_ssize_t __pyx_v_stop; __Pyx_LocalBuf_ND __pyx_pybuffernd_arr; __Pyx_Buffer __pyx_pybuffer_arr; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; 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 *); Py_ssize_t __pyx_t_6; Py_ssize_t __pyx_t_7; int __pyx_t_8; Py_ssize_t __pyx_t_9; Py_ssize_t __pyx_t_10; Py_ssize_t __pyx_t_11; Py_ssize_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; 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("diff_2d_int16", 0); __pyx_pybuffer_arr.pybuffer.buf = NULL; __pyx_pybuffer_arr.refcount = 0; __pyx_pybuffernd_arr.data = NULL; __pyx_pybuffernd_arr.rcbuffer = &__pyx_pybuffer_arr; __pyx_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_arr.rcbuffer->pybuffer, (PyObject*)__pyx_v_arr, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int16_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4939; __pyx_clineno = __LINE__; goto __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]; __pyx_pybuffernd_arr.diminfo[1].strides = __pyx_pybuffernd_arr.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_arr.diminfo[1].shape = __pyx_pybuffernd_arr.rcbuffer->pybuffer.shape[1]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_v_out, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4939; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; __pyx_pybuffernd_out.diminfo[1].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_out.diminfo[1].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[1]; /* "pandas/src/generated.pyx":4945 * Py_ssize_t i, j, sx, sy * * sx, sy = ( arr).shape # <<<<<<<<<<<<<< * if arr.flags.f_contiguous: * if axis == 0: */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_arr), __pyx_n_s_shape); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4945; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) { PyObject* sequence = __pyx_t_1; #if CYTHON_COMPILING_IN_CPYTHON Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4945; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1); } else { __pyx_t_2 = PyList_GET_ITEM(sequence, 0); __pyx_t_3 = PyList_GET_ITEM(sequence, 1); } __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); #else __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4945; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4945; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } else { Py_ssize_t index = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4945; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_5 = Py_TYPE(__pyx_t_4)->tp_iternext; index = 0; __pyx_t_2 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_2)) goto __pyx_L3_unpacking_failed; __Pyx_GOTREF(__pyx_t_2); index = 1; __pyx_t_3 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_3)) goto __pyx_L3_unpacking_failed; __Pyx_GOTREF(__pyx_t_3); if (__Pyx_IternextUnpackEndCheck(__pyx_t_5(__pyx_t_4), 2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4945; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 4945; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_L4_unpacking_done:; } __pyx_t_6 = __Pyx_PyIndex_AsSsize_t(__pyx_t_2); if (unlikely((__pyx_t_6 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4945; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_7 = __Pyx_PyIndex_AsSsize_t(__pyx_t_3); if (unlikely((__pyx_t_7 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4945; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_sx = __pyx_t_6; __pyx_v_sy = __pyx_t_7; /* "pandas/src/generated.pyx":4946 * * sx, sy = ( arr).shape * if arr.flags.f_contiguous: # <<<<<<<<<<<<<< * if axis == 0: * if periods >= 0: */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_arr), __pyx_n_s_flags); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4946; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_f_contiguous); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4946; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4946; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_8) { /* "pandas/src/generated.pyx":4947 * sx, sy = ( arr).shape * if arr.flags.f_contiguous: * if axis == 0: # <<<<<<<<<<<<<< * if periods >= 0: * start, stop = periods, sx */ __pyx_t_8 = ((__pyx_v_axis == 0) != 0); if (__pyx_t_8) { /* "pandas/src/generated.pyx":4948 * if arr.flags.f_contiguous: * if axis == 0: * if periods >= 0: # <<<<<<<<<<<<<< * start, stop = periods, sx * else: */ __pyx_t_8 = ((__pyx_v_periods >= 0) != 0); if (__pyx_t_8) { /* "pandas/src/generated.pyx":4949 * if axis == 0: * if periods >= 0: * start, stop = periods, sx # <<<<<<<<<<<<<< * else: * start, stop = 0, sx + periods */ __pyx_t_7 = __pyx_v_periods; __pyx_t_6 = __pyx_v_sx; __pyx_v_start = __pyx_t_7; __pyx_v_stop = __pyx_t_6; goto __pyx_L7; } /*else*/ { /* "pandas/src/generated.pyx":4951 * start, stop = periods, sx * else: * start, stop = 0, sx + periods # <<<<<<<<<<<<<< * for j in range(sy): * for i in range(start, stop): */ __pyx_t_6 = 0; __pyx_t_7 = (__pyx_v_sx + __pyx_v_periods); __pyx_v_start = __pyx_t_6; __pyx_v_stop = __pyx_t_7; } __pyx_L7:; /* "pandas/src/generated.pyx":4952 * else: * start, stop = 0, sx + periods * for j in range(sy): # <<<<<<<<<<<<<< * for i in range(start, stop): * out[i, j] = arr[i, j] - arr[i - periods, j] */ __pyx_t_7 = __pyx_v_sy; for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_7; __pyx_t_6+=1) { __pyx_v_j = __pyx_t_6; /* "pandas/src/generated.pyx":4953 * start, stop = 0, sx + periods * for j in range(sy): * for i in range(start, stop): # <<<<<<<<<<<<<< * out[i, j] = arr[i, j] - arr[i - periods, j] * else: */ __pyx_t_9 = __pyx_v_stop; for (__pyx_t_10 = __pyx_v_start; __pyx_t_10 < __pyx_t_9; __pyx_t_10+=1) { __pyx_v_i = __pyx_t_10; /* "pandas/src/generated.pyx":4954 * for j in range(sy): * for i in range(start, stop): * out[i, j] = arr[i, j] - arr[i - periods, j] # <<<<<<<<<<<<<< * else: * if periods >= 0: */ __pyx_t_11 = __pyx_v_i; __pyx_t_12 = __pyx_v_j; __pyx_t_13 = (__pyx_v_i - __pyx_v_periods); __pyx_t_14 = __pyx_v_j; __pyx_t_15 = __pyx_v_i; __pyx_t_16 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_16, __pyx_pybuffernd_out.diminfo[1].strides) = ((*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int16_t *, __pyx_pybuffernd_arr.rcbuffer->pybuffer.buf, __pyx_t_11, __pyx_pybuffernd_arr.diminfo[0].strides, __pyx_t_12, __pyx_pybuffernd_arr.diminfo[1].strides)) - (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int16_t *, __pyx_pybuffernd_arr.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_arr.diminfo[0].strides, __pyx_t_14, __pyx_pybuffernd_arr.diminfo[1].strides))); } } goto __pyx_L6; } /*else*/ { /* "pandas/src/generated.pyx":4956 * out[i, j] = arr[i, j] - arr[i - periods, j] * else: * if periods >= 0: # <<<<<<<<<<<<<< * start, stop = periods, sy * else: */ __pyx_t_8 = ((__pyx_v_periods >= 0) != 0); if (__pyx_t_8) { /* "pandas/src/generated.pyx":4957 * else: * if periods >= 0: * start, stop = periods, sy # <<<<<<<<<<<<<< * else: * start, stop = 0, sy + periods */ __pyx_t_7 = __pyx_v_periods; __pyx_t_6 = __pyx_v_sy; __pyx_v_start = __pyx_t_7; __pyx_v_stop = __pyx_t_6; goto __pyx_L12; } /*else*/ { /* "pandas/src/generated.pyx":4959 * start, stop = periods, sy * else: * start, stop = 0, sy + periods # <<<<<<<<<<<<<< * for j in range(start, stop): * for i in range(sx): */ __pyx_t_6 = 0; __pyx_t_7 = (__pyx_v_sy + __pyx_v_periods); __pyx_v_start = __pyx_t_6; __pyx_v_stop = __pyx_t_7; } __pyx_L12:; /* "pandas/src/generated.pyx":4960 * else: * start, stop = 0, sy + periods * for j in range(start, stop): # <<<<<<<<<<<<<< * for i in range(sx): * out[i, j] = arr[i, j] - arr[i, j - periods] */ __pyx_t_7 = __pyx_v_stop; for (__pyx_t_6 = __pyx_v_start; __pyx_t_6 < __pyx_t_7; __pyx_t_6+=1) { __pyx_v_j = __pyx_t_6; /* "pandas/src/generated.pyx":4961 * start, stop = 0, sy + periods * for j in range(start, stop): * for i in range(sx): # <<<<<<<<<<<<<< * out[i, j] = arr[i, j] - arr[i, j - periods] * else: */ __pyx_t_9 = __pyx_v_sx; for (__pyx_t_10 = 0; __pyx_t_10 < __pyx_t_9; __pyx_t_10+=1) { __pyx_v_i = __pyx_t_10; /* "pandas/src/generated.pyx":4962 * for j in range(start, stop): * for i in range(sx): * out[i, j] = arr[i, j] - arr[i, j - periods] # <<<<<<<<<<<<<< * else: * if axis == 0: */ __pyx_t_17 = __pyx_v_i; __pyx_t_18 = __pyx_v_j; __pyx_t_19 = __pyx_v_i; __pyx_t_20 = (__pyx_v_j - __pyx_v_periods); __pyx_t_21 = __pyx_v_i; __pyx_t_22 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_22, __pyx_pybuffernd_out.diminfo[1].strides) = ((*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int16_t *, __pyx_pybuffernd_arr.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_arr.diminfo[0].strides, __pyx_t_18, __pyx_pybuffernd_arr.diminfo[1].strides)) - (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int16_t *, __pyx_pybuffernd_arr.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_arr.diminfo[0].strides, __pyx_t_20, __pyx_pybuffernd_arr.diminfo[1].strides))); } } } __pyx_L6:; goto __pyx_L5; } /*else*/ { /* "pandas/src/generated.pyx":4964 * out[i, j] = arr[i, j] - arr[i, j - periods] * else: * if axis == 0: # <<<<<<<<<<<<<< * if periods >= 0: * start, stop = periods, sx */ __pyx_t_8 = ((__pyx_v_axis == 0) != 0); if (__pyx_t_8) { /* "pandas/src/generated.pyx":4965 * else: * if axis == 0: * if periods >= 0: # <<<<<<<<<<<<<< * start, stop = periods, sx * else: */ __pyx_t_8 = ((__pyx_v_periods >= 0) != 0); if (__pyx_t_8) { /* "pandas/src/generated.pyx":4966 * if axis == 0: * if periods >= 0: * start, stop = periods, sx # <<<<<<<<<<<<<< * else: * start, stop = 0, sx + periods */ __pyx_t_7 = __pyx_v_periods; __pyx_t_6 = __pyx_v_sx; __pyx_v_start = __pyx_t_7; __pyx_v_stop = __pyx_t_6; goto __pyx_L18; } /*else*/ { /* "pandas/src/generated.pyx":4968 * start, stop = periods, sx * else: * start, stop = 0, sx + periods # <<<<<<<<<<<<<< * for i in range(start, stop): * for j in range(sy): */ __pyx_t_6 = 0; __pyx_t_7 = (__pyx_v_sx + __pyx_v_periods); __pyx_v_start = __pyx_t_6; __pyx_v_stop = __pyx_t_7; } __pyx_L18:; /* "pandas/src/generated.pyx":4969 * else: * start, stop = 0, sx + periods * for i in range(start, stop): # <<<<<<<<<<<<<< * for j in range(sy): * out[i, j] = arr[i, j] - arr[i - periods, j] */ __pyx_t_7 = __pyx_v_stop; for (__pyx_t_6 = __pyx_v_start; __pyx_t_6 < __pyx_t_7; __pyx_t_6+=1) { __pyx_v_i = __pyx_t_6; /* "pandas/src/generated.pyx":4970 * start, stop = 0, sx + periods * for i in range(start, stop): * for j in range(sy): # <<<<<<<<<<<<<< * out[i, j] = arr[i, j] - arr[i - periods, j] * else: */ __pyx_t_9 = __pyx_v_sy; for (__pyx_t_10 = 0; __pyx_t_10 < __pyx_t_9; __pyx_t_10+=1) { __pyx_v_j = __pyx_t_10; /* "pandas/src/generated.pyx":4971 * for i in range(start, stop): * for j in range(sy): * out[i, j] = arr[i, j] - arr[i - periods, j] # <<<<<<<<<<<<<< * else: * if periods >= 0: */ __pyx_t_23 = __pyx_v_i; __pyx_t_24 = __pyx_v_j; __pyx_t_25 = (__pyx_v_i - __pyx_v_periods); __pyx_t_26 = __pyx_v_j; __pyx_t_27 = __pyx_v_i; __pyx_t_28 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_27, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_28, __pyx_pybuffernd_out.diminfo[1].strides) = ((*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int16_t *, __pyx_pybuffernd_arr.rcbuffer->pybuffer.buf, __pyx_t_23, __pyx_pybuffernd_arr.diminfo[0].strides, __pyx_t_24, __pyx_pybuffernd_arr.diminfo[1].strides)) - (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int16_t *, __pyx_pybuffernd_arr.rcbuffer->pybuffer.buf, __pyx_t_25, __pyx_pybuffernd_arr.diminfo[0].strides, __pyx_t_26, __pyx_pybuffernd_arr.diminfo[1].strides))); } } goto __pyx_L17; } /*else*/ { /* "pandas/src/generated.pyx":4973 * out[i, j] = arr[i, j] - arr[i - periods, j] * else: * if periods >= 0: # <<<<<<<<<<<<<< * start, stop = periods, sy * else: */ __pyx_t_8 = ((__pyx_v_periods >= 0) != 0); if (__pyx_t_8) { /* "pandas/src/generated.pyx":4974 * else: * if periods >= 0: * start, stop = periods, sy # <<<<<<<<<<<<<< * else: * start, stop = 0, sy + periods */ __pyx_t_7 = __pyx_v_periods; __pyx_t_6 = __pyx_v_sy; __pyx_v_start = __pyx_t_7; __pyx_v_stop = __pyx_t_6; goto __pyx_L23; } /*else*/ { /* "pandas/src/generated.pyx":4976 * start, stop = periods, sy * else: * start, stop = 0, sy + periods # <<<<<<<<<<<<<< * for i in range(sx): * for j in range(start, stop): */ __pyx_t_6 = 0; __pyx_t_7 = (__pyx_v_sy + __pyx_v_periods); __pyx_v_start = __pyx_t_6; __pyx_v_stop = __pyx_t_7; } __pyx_L23:; /* "pandas/src/generated.pyx":4977 * else: * start, stop = 0, sy + periods * for i in range(sx): # <<<<<<<<<<<<<< * for j in range(start, stop): * out[i, j] = arr[i, j] - arr[i, j - periods] */ __pyx_t_7 = __pyx_v_sx; for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_7; __pyx_t_6+=1) { __pyx_v_i = __pyx_t_6; /* "pandas/src/generated.pyx":4978 * start, stop = 0, sy + periods * for i in range(sx): * for j in range(start, stop): # <<<<<<<<<<<<<< * out[i, j] = arr[i, j] - arr[i, j - periods] * @cython.boundscheck(False) */ __pyx_t_9 = __pyx_v_stop; for (__pyx_t_10 = __pyx_v_start; __pyx_t_10 < __pyx_t_9; __pyx_t_10+=1) { __pyx_v_j = __pyx_t_10; /* "pandas/src/generated.pyx":4979 * for i in range(sx): * for j in range(start, stop): * out[i, j] = arr[i, j] - arr[i, j - periods] # <<<<<<<<<<<<<< * @cython.boundscheck(False) * @cython.wraparound(False) */ __pyx_t_29 = __pyx_v_i; __pyx_t_30 = __pyx_v_j; __pyx_t_31 = __pyx_v_i; __pyx_t_32 = (__pyx_v_j - __pyx_v_periods); __pyx_t_33 = __pyx_v_i; __pyx_t_34 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_33, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_34, __pyx_pybuffernd_out.diminfo[1].strides) = ((*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int16_t *, __pyx_pybuffernd_arr.rcbuffer->pybuffer.buf, __pyx_t_29, __pyx_pybuffernd_arr.diminfo[0].strides, __pyx_t_30, __pyx_pybuffernd_arr.diminfo[1].strides)) - (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int16_t *, __pyx_pybuffernd_arr.rcbuffer->pybuffer.buf, __pyx_t_31, __pyx_pybuffernd_arr.diminfo[0].strides, __pyx_t_32, __pyx_pybuffernd_arr.diminfo[1].strides))); } } } __pyx_L17:; } __pyx_L5:; /* "pandas/src/generated.pyx":4939 * @cython.boundscheck(False) * @cython.wraparound(False) * def diff_2d_int16(ndarray[int16_t, ndim=2] arr, # <<<<<<<<<<<<<< * ndarray[float32_t, ndim=2] out, * Py_ssize_t periods, int axis): */ /* 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_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_arr.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.diff_2d_int16", __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_out.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":4982 * @cython.boundscheck(False) * @cython.wraparound(False) * def diff_2d_int32(ndarray[int32_t, ndim=2] arr, # <<<<<<<<<<<<<< * ndarray[float64_t, ndim=2] out, * Py_ssize_t periods, int axis): */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_383diff_2d_int32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_383diff_2d_int32 = {__Pyx_NAMESTR("diff_2d_int32"), (PyCFunction)__pyx_pw_6pandas_5algos_383diff_2d_int32, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_383diff_2d_int32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_arr = 0; PyArrayObject *__pyx_v_out = 0; Py_ssize_t __pyx_v_periods; int __pyx_v_axis; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("diff_2d_int32 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_arr,&__pyx_n_s_out,&__pyx_n_s_periods,&__pyx_n_s_axis,0}; PyObject* values[4] = {0,0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_arr)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_out)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("diff_2d_int32", 1, 4, 4, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4982; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_periods)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("diff_2d_int32", 1, 4, 4, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4982; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_axis)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("diff_2d_int32", 1, 4, 4, 3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4982; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "diff_2d_int32") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4982; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 4) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[3] = PyTuple_GET_ITEM(__pyx_args, 3); } __pyx_v_arr = ((PyArrayObject *)values[0]); __pyx_v_out = ((PyArrayObject *)values[1]); __pyx_v_periods = __Pyx_PyIndex_AsSsize_t(values[2]); if (unlikely((__pyx_v_periods == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4984; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_axis = __Pyx_PyInt_As_int(values[3]); if (unlikely((__pyx_v_axis == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4984; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("diff_2d_int32", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4982; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.diff_2d_int32", __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_filename = __pyx_f[2]; __pyx_lineno = 4982; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_5numpy_ndarray, 1, "out", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4983; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_382diff_2d_int32(__pyx_self, __pyx_v_arr, __pyx_v_out, __pyx_v_periods, __pyx_v_axis); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5algos_382diff_2d_int32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_arr, PyArrayObject *__pyx_v_out, Py_ssize_t __pyx_v_periods, int __pyx_v_axis) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_sx; Py_ssize_t __pyx_v_sy; Py_ssize_t __pyx_v_start; Py_ssize_t __pyx_v_stop; __Pyx_LocalBuf_ND __pyx_pybuffernd_arr; __Pyx_Buffer __pyx_pybuffer_arr; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; 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 *); Py_ssize_t __pyx_t_6; Py_ssize_t __pyx_t_7; int __pyx_t_8; Py_ssize_t __pyx_t_9; Py_ssize_t __pyx_t_10; Py_ssize_t __pyx_t_11; Py_ssize_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; 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("diff_2d_int32", 0); __pyx_pybuffer_arr.pybuffer.buf = NULL; __pyx_pybuffer_arr.refcount = 0; __pyx_pybuffernd_arr.data = NULL; __pyx_pybuffernd_arr.rcbuffer = &__pyx_pybuffer_arr; __pyx_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_arr.rcbuffer->pybuffer, (PyObject*)__pyx_v_arr, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4982; __pyx_clineno = __LINE__; goto __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]; __pyx_pybuffernd_arr.diminfo[1].strides = __pyx_pybuffernd_arr.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_arr.diminfo[1].shape = __pyx_pybuffernd_arr.rcbuffer->pybuffer.shape[1]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; 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, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4982; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; __pyx_pybuffernd_out.diminfo[1].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_out.diminfo[1].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[1]; /* "pandas/src/generated.pyx":4988 * Py_ssize_t i, j, sx, sy * * sx, sy = ( arr).shape # <<<<<<<<<<<<<< * if arr.flags.f_contiguous: * if axis == 0: */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_arr), __pyx_n_s_shape); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4988; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) { PyObject* sequence = __pyx_t_1; #if CYTHON_COMPILING_IN_CPYTHON Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4988; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1); } else { __pyx_t_2 = PyList_GET_ITEM(sequence, 0); __pyx_t_3 = PyList_GET_ITEM(sequence, 1); } __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); #else __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4988; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4988; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } else { Py_ssize_t index = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4988; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_5 = Py_TYPE(__pyx_t_4)->tp_iternext; index = 0; __pyx_t_2 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_2)) goto __pyx_L3_unpacking_failed; __Pyx_GOTREF(__pyx_t_2); index = 1; __pyx_t_3 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_3)) goto __pyx_L3_unpacking_failed; __Pyx_GOTREF(__pyx_t_3); if (__Pyx_IternextUnpackEndCheck(__pyx_t_5(__pyx_t_4), 2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4988; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 4988; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_L4_unpacking_done:; } __pyx_t_6 = __Pyx_PyIndex_AsSsize_t(__pyx_t_2); if (unlikely((__pyx_t_6 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4988; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_7 = __Pyx_PyIndex_AsSsize_t(__pyx_t_3); if (unlikely((__pyx_t_7 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4988; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_sx = __pyx_t_6; __pyx_v_sy = __pyx_t_7; /* "pandas/src/generated.pyx":4989 * * sx, sy = ( arr).shape * if arr.flags.f_contiguous: # <<<<<<<<<<<<<< * if axis == 0: * if periods >= 0: */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_arr), __pyx_n_s_flags); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4989; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_f_contiguous); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4989; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4989; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_8) { /* "pandas/src/generated.pyx":4990 * sx, sy = ( arr).shape * if arr.flags.f_contiguous: * if axis == 0: # <<<<<<<<<<<<<< * if periods >= 0: * start, stop = periods, sx */ __pyx_t_8 = ((__pyx_v_axis == 0) != 0); if (__pyx_t_8) { /* "pandas/src/generated.pyx":4991 * if arr.flags.f_contiguous: * if axis == 0: * if periods >= 0: # <<<<<<<<<<<<<< * start, stop = periods, sx * else: */ __pyx_t_8 = ((__pyx_v_periods >= 0) != 0); if (__pyx_t_8) { /* "pandas/src/generated.pyx":4992 * if axis == 0: * if periods >= 0: * start, stop = periods, sx # <<<<<<<<<<<<<< * else: * start, stop = 0, sx + periods */ __pyx_t_7 = __pyx_v_periods; __pyx_t_6 = __pyx_v_sx; __pyx_v_start = __pyx_t_7; __pyx_v_stop = __pyx_t_6; goto __pyx_L7; } /*else*/ { /* "pandas/src/generated.pyx":4994 * start, stop = periods, sx * else: * start, stop = 0, sx + periods # <<<<<<<<<<<<<< * for j in range(sy): * for i in range(start, stop): */ __pyx_t_6 = 0; __pyx_t_7 = (__pyx_v_sx + __pyx_v_periods); __pyx_v_start = __pyx_t_6; __pyx_v_stop = __pyx_t_7; } __pyx_L7:; /* "pandas/src/generated.pyx":4995 * else: * start, stop = 0, sx + periods * for j in range(sy): # <<<<<<<<<<<<<< * for i in range(start, stop): * out[i, j] = arr[i, j] - arr[i - periods, j] */ __pyx_t_7 = __pyx_v_sy; for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_7; __pyx_t_6+=1) { __pyx_v_j = __pyx_t_6; /* "pandas/src/generated.pyx":4996 * start, stop = 0, sx + periods * for j in range(sy): * for i in range(start, stop): # <<<<<<<<<<<<<< * out[i, j] = arr[i, j] - arr[i - periods, j] * else: */ __pyx_t_9 = __pyx_v_stop; for (__pyx_t_10 = __pyx_v_start; __pyx_t_10 < __pyx_t_9; __pyx_t_10+=1) { __pyx_v_i = __pyx_t_10; /* "pandas/src/generated.pyx":4997 * for j in range(sy): * for i in range(start, stop): * out[i, j] = arr[i, j] - arr[i - periods, j] # <<<<<<<<<<<<<< * else: * if periods >= 0: */ __pyx_t_11 = __pyx_v_i; __pyx_t_12 = __pyx_v_j; __pyx_t_13 = (__pyx_v_i - __pyx_v_periods); __pyx_t_14 = __pyx_v_j; __pyx_t_15 = __pyx_v_i; __pyx_t_16 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_16, __pyx_pybuffernd_out.diminfo[1].strides) = ((*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_arr.rcbuffer->pybuffer.buf, __pyx_t_11, __pyx_pybuffernd_arr.diminfo[0].strides, __pyx_t_12, __pyx_pybuffernd_arr.diminfo[1].strides)) - (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_arr.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_arr.diminfo[0].strides, __pyx_t_14, __pyx_pybuffernd_arr.diminfo[1].strides))); } } goto __pyx_L6; } /*else*/ { /* "pandas/src/generated.pyx":4999 * out[i, j] = arr[i, j] - arr[i - periods, j] * else: * if periods >= 0: # <<<<<<<<<<<<<< * start, stop = periods, sy * else: */ __pyx_t_8 = ((__pyx_v_periods >= 0) != 0); if (__pyx_t_8) { /* "pandas/src/generated.pyx":5000 * else: * if periods >= 0: * start, stop = periods, sy # <<<<<<<<<<<<<< * else: * start, stop = 0, sy + periods */ __pyx_t_7 = __pyx_v_periods; __pyx_t_6 = __pyx_v_sy; __pyx_v_start = __pyx_t_7; __pyx_v_stop = __pyx_t_6; goto __pyx_L12; } /*else*/ { /* "pandas/src/generated.pyx":5002 * start, stop = periods, sy * else: * start, stop = 0, sy + periods # <<<<<<<<<<<<<< * for j in range(start, stop): * for i in range(sx): */ __pyx_t_6 = 0; __pyx_t_7 = (__pyx_v_sy + __pyx_v_periods); __pyx_v_start = __pyx_t_6; __pyx_v_stop = __pyx_t_7; } __pyx_L12:; /* "pandas/src/generated.pyx":5003 * else: * start, stop = 0, sy + periods * for j in range(start, stop): # <<<<<<<<<<<<<< * for i in range(sx): * out[i, j] = arr[i, j] - arr[i, j - periods] */ __pyx_t_7 = __pyx_v_stop; for (__pyx_t_6 = __pyx_v_start; __pyx_t_6 < __pyx_t_7; __pyx_t_6+=1) { __pyx_v_j = __pyx_t_6; /* "pandas/src/generated.pyx":5004 * start, stop = 0, sy + periods * for j in range(start, stop): * for i in range(sx): # <<<<<<<<<<<<<< * out[i, j] = arr[i, j] - arr[i, j - periods] * else: */ __pyx_t_9 = __pyx_v_sx; for (__pyx_t_10 = 0; __pyx_t_10 < __pyx_t_9; __pyx_t_10+=1) { __pyx_v_i = __pyx_t_10; /* "pandas/src/generated.pyx":5005 * for j in range(start, stop): * for i in range(sx): * out[i, j] = arr[i, j] - arr[i, j - periods] # <<<<<<<<<<<<<< * else: * if axis == 0: */ __pyx_t_17 = __pyx_v_i; __pyx_t_18 = __pyx_v_j; __pyx_t_19 = __pyx_v_i; __pyx_t_20 = (__pyx_v_j - __pyx_v_periods); __pyx_t_21 = __pyx_v_i; __pyx_t_22 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_22, __pyx_pybuffernd_out.diminfo[1].strides) = ((*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_arr.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_arr.diminfo[0].strides, __pyx_t_18, __pyx_pybuffernd_arr.diminfo[1].strides)) - (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_arr.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_arr.diminfo[0].strides, __pyx_t_20, __pyx_pybuffernd_arr.diminfo[1].strides))); } } } __pyx_L6:; goto __pyx_L5; } /*else*/ { /* "pandas/src/generated.pyx":5007 * out[i, j] = arr[i, j] - arr[i, j - periods] * else: * if axis == 0: # <<<<<<<<<<<<<< * if periods >= 0: * start, stop = periods, sx */ __pyx_t_8 = ((__pyx_v_axis == 0) != 0); if (__pyx_t_8) { /* "pandas/src/generated.pyx":5008 * else: * if axis == 0: * if periods >= 0: # <<<<<<<<<<<<<< * start, stop = periods, sx * else: */ __pyx_t_8 = ((__pyx_v_periods >= 0) != 0); if (__pyx_t_8) { /* "pandas/src/generated.pyx":5009 * if axis == 0: * if periods >= 0: * start, stop = periods, sx # <<<<<<<<<<<<<< * else: * start, stop = 0, sx + periods */ __pyx_t_7 = __pyx_v_periods; __pyx_t_6 = __pyx_v_sx; __pyx_v_start = __pyx_t_7; __pyx_v_stop = __pyx_t_6; goto __pyx_L18; } /*else*/ { /* "pandas/src/generated.pyx":5011 * start, stop = periods, sx * else: * start, stop = 0, sx + periods # <<<<<<<<<<<<<< * for i in range(start, stop): * for j in range(sy): */ __pyx_t_6 = 0; __pyx_t_7 = (__pyx_v_sx + __pyx_v_periods); __pyx_v_start = __pyx_t_6; __pyx_v_stop = __pyx_t_7; } __pyx_L18:; /* "pandas/src/generated.pyx":5012 * else: * start, stop = 0, sx + periods * for i in range(start, stop): # <<<<<<<<<<<<<< * for j in range(sy): * out[i, j] = arr[i, j] - arr[i - periods, j] */ __pyx_t_7 = __pyx_v_stop; for (__pyx_t_6 = __pyx_v_start; __pyx_t_6 < __pyx_t_7; __pyx_t_6+=1) { __pyx_v_i = __pyx_t_6; /* "pandas/src/generated.pyx":5013 * start, stop = 0, sx + periods * for i in range(start, stop): * for j in range(sy): # <<<<<<<<<<<<<< * out[i, j] = arr[i, j] - arr[i - periods, j] * else: */ __pyx_t_9 = __pyx_v_sy; for (__pyx_t_10 = 0; __pyx_t_10 < __pyx_t_9; __pyx_t_10+=1) { __pyx_v_j = __pyx_t_10; /* "pandas/src/generated.pyx":5014 * for i in range(start, stop): * for j in range(sy): * out[i, j] = arr[i, j] - arr[i - periods, j] # <<<<<<<<<<<<<< * else: * if periods >= 0: */ __pyx_t_23 = __pyx_v_i; __pyx_t_24 = __pyx_v_j; __pyx_t_25 = (__pyx_v_i - __pyx_v_periods); __pyx_t_26 = __pyx_v_j; __pyx_t_27 = __pyx_v_i; __pyx_t_28 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_27, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_28, __pyx_pybuffernd_out.diminfo[1].strides) = ((*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_arr.rcbuffer->pybuffer.buf, __pyx_t_23, __pyx_pybuffernd_arr.diminfo[0].strides, __pyx_t_24, __pyx_pybuffernd_arr.diminfo[1].strides)) - (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_arr.rcbuffer->pybuffer.buf, __pyx_t_25, __pyx_pybuffernd_arr.diminfo[0].strides, __pyx_t_26, __pyx_pybuffernd_arr.diminfo[1].strides))); } } goto __pyx_L17; } /*else*/ { /* "pandas/src/generated.pyx":5016 * out[i, j] = arr[i, j] - arr[i - periods, j] * else: * if periods >= 0: # <<<<<<<<<<<<<< * start, stop = periods, sy * else: */ __pyx_t_8 = ((__pyx_v_periods >= 0) != 0); if (__pyx_t_8) { /* "pandas/src/generated.pyx":5017 * else: * if periods >= 0: * start, stop = periods, sy # <<<<<<<<<<<<<< * else: * start, stop = 0, sy + periods */ __pyx_t_7 = __pyx_v_periods; __pyx_t_6 = __pyx_v_sy; __pyx_v_start = __pyx_t_7; __pyx_v_stop = __pyx_t_6; goto __pyx_L23; } /*else*/ { /* "pandas/src/generated.pyx":5019 * start, stop = periods, sy * else: * start, stop = 0, sy + periods # <<<<<<<<<<<<<< * for i in range(sx): * for j in range(start, stop): */ __pyx_t_6 = 0; __pyx_t_7 = (__pyx_v_sy + __pyx_v_periods); __pyx_v_start = __pyx_t_6; __pyx_v_stop = __pyx_t_7; } __pyx_L23:; /* "pandas/src/generated.pyx":5020 * else: * start, stop = 0, sy + periods * for i in range(sx): # <<<<<<<<<<<<<< * for j in range(start, stop): * out[i, j] = arr[i, j] - arr[i, j - periods] */ __pyx_t_7 = __pyx_v_sx; for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_7; __pyx_t_6+=1) { __pyx_v_i = __pyx_t_6; /* "pandas/src/generated.pyx":5021 * start, stop = 0, sy + periods * for i in range(sx): * for j in range(start, stop): # <<<<<<<<<<<<<< * out[i, j] = arr[i, j] - arr[i, j - periods] * @cython.boundscheck(False) */ __pyx_t_9 = __pyx_v_stop; for (__pyx_t_10 = __pyx_v_start; __pyx_t_10 < __pyx_t_9; __pyx_t_10+=1) { __pyx_v_j = __pyx_t_10; /* "pandas/src/generated.pyx":5022 * for i in range(sx): * for j in range(start, stop): * out[i, j] = arr[i, j] - arr[i, j - periods] # <<<<<<<<<<<<<< * @cython.boundscheck(False) * @cython.wraparound(False) */ __pyx_t_29 = __pyx_v_i; __pyx_t_30 = __pyx_v_j; __pyx_t_31 = __pyx_v_i; __pyx_t_32 = (__pyx_v_j - __pyx_v_periods); __pyx_t_33 = __pyx_v_i; __pyx_t_34 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_33, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_34, __pyx_pybuffernd_out.diminfo[1].strides) = ((*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_arr.rcbuffer->pybuffer.buf, __pyx_t_29, __pyx_pybuffernd_arr.diminfo[0].strides, __pyx_t_30, __pyx_pybuffernd_arr.diminfo[1].strides)) - (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_arr.rcbuffer->pybuffer.buf, __pyx_t_31, __pyx_pybuffernd_arr.diminfo[0].strides, __pyx_t_32, __pyx_pybuffernd_arr.diminfo[1].strides))); } } } __pyx_L17:; } __pyx_L5:; /* "pandas/src/generated.pyx":4982 * @cython.boundscheck(False) * @cython.wraparound(False) * def diff_2d_int32(ndarray[int32_t, ndim=2] arr, # <<<<<<<<<<<<<< * ndarray[float64_t, ndim=2] out, * Py_ssize_t periods, int axis): */ /* 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_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_arr.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.diff_2d_int32", __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_out.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":5025 * @cython.boundscheck(False) * @cython.wraparound(False) * def diff_2d_int64(ndarray[int64_t, ndim=2] arr, # <<<<<<<<<<<<<< * ndarray[float64_t, ndim=2] out, * Py_ssize_t periods, int axis): */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_385diff_2d_int64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_385diff_2d_int64 = {__Pyx_NAMESTR("diff_2d_int64"), (PyCFunction)__pyx_pw_6pandas_5algos_385diff_2d_int64, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_385diff_2d_int64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_arr = 0; PyArrayObject *__pyx_v_out = 0; Py_ssize_t __pyx_v_periods; int __pyx_v_axis; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("diff_2d_int64 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_arr,&__pyx_n_s_out,&__pyx_n_s_periods,&__pyx_n_s_axis,0}; PyObject* values[4] = {0,0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_arr)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_out)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("diff_2d_int64", 1, 4, 4, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5025; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_periods)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("diff_2d_int64", 1, 4, 4, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5025; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_axis)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("diff_2d_int64", 1, 4, 4, 3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5025; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "diff_2d_int64") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5025; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 4) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[3] = PyTuple_GET_ITEM(__pyx_args, 3); } __pyx_v_arr = ((PyArrayObject *)values[0]); __pyx_v_out = ((PyArrayObject *)values[1]); __pyx_v_periods = __Pyx_PyIndex_AsSsize_t(values[2]); if (unlikely((__pyx_v_periods == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5027; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_axis = __Pyx_PyInt_As_int(values[3]); if (unlikely((__pyx_v_axis == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5027; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("diff_2d_int64", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5025; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.diff_2d_int64", __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_filename = __pyx_f[2]; __pyx_lineno = 5025; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_5numpy_ndarray, 1, "out", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5026; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_384diff_2d_int64(__pyx_self, __pyx_v_arr, __pyx_v_out, __pyx_v_periods, __pyx_v_axis); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5algos_384diff_2d_int64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_arr, PyArrayObject *__pyx_v_out, Py_ssize_t __pyx_v_periods, int __pyx_v_axis) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_sx; Py_ssize_t __pyx_v_sy; Py_ssize_t __pyx_v_start; Py_ssize_t __pyx_v_stop; __Pyx_LocalBuf_ND __pyx_pybuffernd_arr; __Pyx_Buffer __pyx_pybuffer_arr; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; 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 *); Py_ssize_t __pyx_t_6; Py_ssize_t __pyx_t_7; int __pyx_t_8; Py_ssize_t __pyx_t_9; Py_ssize_t __pyx_t_10; Py_ssize_t __pyx_t_11; Py_ssize_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; 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("diff_2d_int64", 0); __pyx_pybuffer_arr.pybuffer.buf = NULL; __pyx_pybuffer_arr.refcount = 0; __pyx_pybuffernd_arr.data = NULL; __pyx_pybuffernd_arr.rcbuffer = &__pyx_pybuffer_arr; __pyx_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_arr.rcbuffer->pybuffer, (PyObject*)__pyx_v_arr, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5025; __pyx_clineno = __LINE__; goto __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]; __pyx_pybuffernd_arr.diminfo[1].strides = __pyx_pybuffernd_arr.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_arr.diminfo[1].shape = __pyx_pybuffernd_arr.rcbuffer->pybuffer.shape[1]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; 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, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5025; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; __pyx_pybuffernd_out.diminfo[1].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_out.diminfo[1].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[1]; /* "pandas/src/generated.pyx":5031 * Py_ssize_t i, j, sx, sy * * sx, sy = ( arr).shape # <<<<<<<<<<<<<< * if arr.flags.f_contiguous: * if axis == 0: */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_arr), __pyx_n_s_shape); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5031; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) { PyObject* sequence = __pyx_t_1; #if CYTHON_COMPILING_IN_CPYTHON Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5031; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1); } else { __pyx_t_2 = PyList_GET_ITEM(sequence, 0); __pyx_t_3 = PyList_GET_ITEM(sequence, 1); } __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); #else __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5031; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5031; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } else { Py_ssize_t index = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5031; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_5 = Py_TYPE(__pyx_t_4)->tp_iternext; index = 0; __pyx_t_2 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_2)) goto __pyx_L3_unpacking_failed; __Pyx_GOTREF(__pyx_t_2); index = 1; __pyx_t_3 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_3)) goto __pyx_L3_unpacking_failed; __Pyx_GOTREF(__pyx_t_3); if (__Pyx_IternextUnpackEndCheck(__pyx_t_5(__pyx_t_4), 2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5031; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 5031; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_L4_unpacking_done:; } __pyx_t_6 = __Pyx_PyIndex_AsSsize_t(__pyx_t_2); if (unlikely((__pyx_t_6 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5031; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_7 = __Pyx_PyIndex_AsSsize_t(__pyx_t_3); if (unlikely((__pyx_t_7 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5031; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_sx = __pyx_t_6; __pyx_v_sy = __pyx_t_7; /* "pandas/src/generated.pyx":5032 * * sx, sy = ( arr).shape * if arr.flags.f_contiguous: # <<<<<<<<<<<<<< * if axis == 0: * if periods >= 0: */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_arr), __pyx_n_s_flags); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5032; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_f_contiguous); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5032; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5032; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_8) { /* "pandas/src/generated.pyx":5033 * sx, sy = ( arr).shape * if arr.flags.f_contiguous: * if axis == 0: # <<<<<<<<<<<<<< * if periods >= 0: * start, stop = periods, sx */ __pyx_t_8 = ((__pyx_v_axis == 0) != 0); if (__pyx_t_8) { /* "pandas/src/generated.pyx":5034 * if arr.flags.f_contiguous: * if axis == 0: * if periods >= 0: # <<<<<<<<<<<<<< * start, stop = periods, sx * else: */ __pyx_t_8 = ((__pyx_v_periods >= 0) != 0); if (__pyx_t_8) { /* "pandas/src/generated.pyx":5035 * if axis == 0: * if periods >= 0: * start, stop = periods, sx # <<<<<<<<<<<<<< * else: * start, stop = 0, sx + periods */ __pyx_t_7 = __pyx_v_periods; __pyx_t_6 = __pyx_v_sx; __pyx_v_start = __pyx_t_7; __pyx_v_stop = __pyx_t_6; goto __pyx_L7; } /*else*/ { /* "pandas/src/generated.pyx":5037 * start, stop = periods, sx * else: * start, stop = 0, sx + periods # <<<<<<<<<<<<<< * for j in range(sy): * for i in range(start, stop): */ __pyx_t_6 = 0; __pyx_t_7 = (__pyx_v_sx + __pyx_v_periods); __pyx_v_start = __pyx_t_6; __pyx_v_stop = __pyx_t_7; } __pyx_L7:; /* "pandas/src/generated.pyx":5038 * else: * start, stop = 0, sx + periods * for j in range(sy): # <<<<<<<<<<<<<< * for i in range(start, stop): * out[i, j] = arr[i, j] - arr[i - periods, j] */ __pyx_t_7 = __pyx_v_sy; for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_7; __pyx_t_6+=1) { __pyx_v_j = __pyx_t_6; /* "pandas/src/generated.pyx":5039 * start, stop = 0, sx + periods * for j in range(sy): * for i in range(start, stop): # <<<<<<<<<<<<<< * out[i, j] = arr[i, j] - arr[i - periods, j] * else: */ __pyx_t_9 = __pyx_v_stop; for (__pyx_t_10 = __pyx_v_start; __pyx_t_10 < __pyx_t_9; __pyx_t_10+=1) { __pyx_v_i = __pyx_t_10; /* "pandas/src/generated.pyx":5040 * for j in range(sy): * for i in range(start, stop): * out[i, j] = arr[i, j] - arr[i - periods, j] # <<<<<<<<<<<<<< * else: * if periods >= 0: */ __pyx_t_11 = __pyx_v_i; __pyx_t_12 = __pyx_v_j; __pyx_t_13 = (__pyx_v_i - __pyx_v_periods); __pyx_t_14 = __pyx_v_j; __pyx_t_15 = __pyx_v_i; __pyx_t_16 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_16, __pyx_pybuffernd_out.diminfo[1].strides) = ((*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_arr.rcbuffer->pybuffer.buf, __pyx_t_11, __pyx_pybuffernd_arr.diminfo[0].strides, __pyx_t_12, __pyx_pybuffernd_arr.diminfo[1].strides)) - (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_arr.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_arr.diminfo[0].strides, __pyx_t_14, __pyx_pybuffernd_arr.diminfo[1].strides))); } } goto __pyx_L6; } /*else*/ { /* "pandas/src/generated.pyx":5042 * out[i, j] = arr[i, j] - arr[i - periods, j] * else: * if periods >= 0: # <<<<<<<<<<<<<< * start, stop = periods, sy * else: */ __pyx_t_8 = ((__pyx_v_periods >= 0) != 0); if (__pyx_t_8) { /* "pandas/src/generated.pyx":5043 * else: * if periods >= 0: * start, stop = periods, sy # <<<<<<<<<<<<<< * else: * start, stop = 0, sy + periods */ __pyx_t_7 = __pyx_v_periods; __pyx_t_6 = __pyx_v_sy; __pyx_v_start = __pyx_t_7; __pyx_v_stop = __pyx_t_6; goto __pyx_L12; } /*else*/ { /* "pandas/src/generated.pyx":5045 * start, stop = periods, sy * else: * start, stop = 0, sy + periods # <<<<<<<<<<<<<< * for j in range(start, stop): * for i in range(sx): */ __pyx_t_6 = 0; __pyx_t_7 = (__pyx_v_sy + __pyx_v_periods); __pyx_v_start = __pyx_t_6; __pyx_v_stop = __pyx_t_7; } __pyx_L12:; /* "pandas/src/generated.pyx":5046 * else: * start, stop = 0, sy + periods * for j in range(start, stop): # <<<<<<<<<<<<<< * for i in range(sx): * out[i, j] = arr[i, j] - arr[i, j - periods] */ __pyx_t_7 = __pyx_v_stop; for (__pyx_t_6 = __pyx_v_start; __pyx_t_6 < __pyx_t_7; __pyx_t_6+=1) { __pyx_v_j = __pyx_t_6; /* "pandas/src/generated.pyx":5047 * start, stop = 0, sy + periods * for j in range(start, stop): * for i in range(sx): # <<<<<<<<<<<<<< * out[i, j] = arr[i, j] - arr[i, j - periods] * else: */ __pyx_t_9 = __pyx_v_sx; for (__pyx_t_10 = 0; __pyx_t_10 < __pyx_t_9; __pyx_t_10+=1) { __pyx_v_i = __pyx_t_10; /* "pandas/src/generated.pyx":5048 * for j in range(start, stop): * for i in range(sx): * out[i, j] = arr[i, j] - arr[i, j - periods] # <<<<<<<<<<<<<< * else: * if axis == 0: */ __pyx_t_17 = __pyx_v_i; __pyx_t_18 = __pyx_v_j; __pyx_t_19 = __pyx_v_i; __pyx_t_20 = (__pyx_v_j - __pyx_v_periods); __pyx_t_21 = __pyx_v_i; __pyx_t_22 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_22, __pyx_pybuffernd_out.diminfo[1].strides) = ((*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_arr.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_arr.diminfo[0].strides, __pyx_t_18, __pyx_pybuffernd_arr.diminfo[1].strides)) - (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_arr.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_arr.diminfo[0].strides, __pyx_t_20, __pyx_pybuffernd_arr.diminfo[1].strides))); } } } __pyx_L6:; goto __pyx_L5; } /*else*/ { /* "pandas/src/generated.pyx":5050 * out[i, j] = arr[i, j] - arr[i, j - periods] * else: * if axis == 0: # <<<<<<<<<<<<<< * if periods >= 0: * start, stop = periods, sx */ __pyx_t_8 = ((__pyx_v_axis == 0) != 0); if (__pyx_t_8) { /* "pandas/src/generated.pyx":5051 * else: * if axis == 0: * if periods >= 0: # <<<<<<<<<<<<<< * start, stop = periods, sx * else: */ __pyx_t_8 = ((__pyx_v_periods >= 0) != 0); if (__pyx_t_8) { /* "pandas/src/generated.pyx":5052 * if axis == 0: * if periods >= 0: * start, stop = periods, sx # <<<<<<<<<<<<<< * else: * start, stop = 0, sx + periods */ __pyx_t_7 = __pyx_v_periods; __pyx_t_6 = __pyx_v_sx; __pyx_v_start = __pyx_t_7; __pyx_v_stop = __pyx_t_6; goto __pyx_L18; } /*else*/ { /* "pandas/src/generated.pyx":5054 * start, stop = periods, sx * else: * start, stop = 0, sx + periods # <<<<<<<<<<<<<< * for i in range(start, stop): * for j in range(sy): */ __pyx_t_6 = 0; __pyx_t_7 = (__pyx_v_sx + __pyx_v_periods); __pyx_v_start = __pyx_t_6; __pyx_v_stop = __pyx_t_7; } __pyx_L18:; /* "pandas/src/generated.pyx":5055 * else: * start, stop = 0, sx + periods * for i in range(start, stop): # <<<<<<<<<<<<<< * for j in range(sy): * out[i, j] = arr[i, j] - arr[i - periods, j] */ __pyx_t_7 = __pyx_v_stop; for (__pyx_t_6 = __pyx_v_start; __pyx_t_6 < __pyx_t_7; __pyx_t_6+=1) { __pyx_v_i = __pyx_t_6; /* "pandas/src/generated.pyx":5056 * start, stop = 0, sx + periods * for i in range(start, stop): * for j in range(sy): # <<<<<<<<<<<<<< * out[i, j] = arr[i, j] - arr[i - periods, j] * else: */ __pyx_t_9 = __pyx_v_sy; for (__pyx_t_10 = 0; __pyx_t_10 < __pyx_t_9; __pyx_t_10+=1) { __pyx_v_j = __pyx_t_10; /* "pandas/src/generated.pyx":5057 * for i in range(start, stop): * for j in range(sy): * out[i, j] = arr[i, j] - arr[i - periods, j] # <<<<<<<<<<<<<< * else: * if periods >= 0: */ __pyx_t_23 = __pyx_v_i; __pyx_t_24 = __pyx_v_j; __pyx_t_25 = (__pyx_v_i - __pyx_v_periods); __pyx_t_26 = __pyx_v_j; __pyx_t_27 = __pyx_v_i; __pyx_t_28 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_27, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_28, __pyx_pybuffernd_out.diminfo[1].strides) = ((*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_arr.rcbuffer->pybuffer.buf, __pyx_t_23, __pyx_pybuffernd_arr.diminfo[0].strides, __pyx_t_24, __pyx_pybuffernd_arr.diminfo[1].strides)) - (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_arr.rcbuffer->pybuffer.buf, __pyx_t_25, __pyx_pybuffernd_arr.diminfo[0].strides, __pyx_t_26, __pyx_pybuffernd_arr.diminfo[1].strides))); } } goto __pyx_L17; } /*else*/ { /* "pandas/src/generated.pyx":5059 * out[i, j] = arr[i, j] - arr[i - periods, j] * else: * if periods >= 0: # <<<<<<<<<<<<<< * start, stop = periods, sy * else: */ __pyx_t_8 = ((__pyx_v_periods >= 0) != 0); if (__pyx_t_8) { /* "pandas/src/generated.pyx":5060 * else: * if periods >= 0: * start, stop = periods, sy # <<<<<<<<<<<<<< * else: * start, stop = 0, sy + periods */ __pyx_t_7 = __pyx_v_periods; __pyx_t_6 = __pyx_v_sy; __pyx_v_start = __pyx_t_7; __pyx_v_stop = __pyx_t_6; goto __pyx_L23; } /*else*/ { /* "pandas/src/generated.pyx":5062 * start, stop = periods, sy * else: * start, stop = 0, sy + periods # <<<<<<<<<<<<<< * for i in range(sx): * for j in range(start, stop): */ __pyx_t_6 = 0; __pyx_t_7 = (__pyx_v_sy + __pyx_v_periods); __pyx_v_start = __pyx_t_6; __pyx_v_stop = __pyx_t_7; } __pyx_L23:; /* "pandas/src/generated.pyx":5063 * else: * start, stop = 0, sy + periods * for i in range(sx): # <<<<<<<<<<<<<< * for j in range(start, stop): * out[i, j] = arr[i, j] - arr[i, j - periods] */ __pyx_t_7 = __pyx_v_sx; for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_7; __pyx_t_6+=1) { __pyx_v_i = __pyx_t_6; /* "pandas/src/generated.pyx":5064 * start, stop = 0, sy + periods * for i in range(sx): * for j in range(start, stop): # <<<<<<<<<<<<<< * out[i, j] = arr[i, j] - arr[i, j - periods] * */ __pyx_t_9 = __pyx_v_stop; for (__pyx_t_10 = __pyx_v_start; __pyx_t_10 < __pyx_t_9; __pyx_t_10+=1) { __pyx_v_j = __pyx_t_10; /* "pandas/src/generated.pyx":5065 * for i in range(sx): * for j in range(start, stop): * out[i, j] = arr[i, j] - arr[i, j - periods] # <<<<<<<<<<<<<< * * @cython.wraparound(False) */ __pyx_t_29 = __pyx_v_i; __pyx_t_30 = __pyx_v_j; __pyx_t_31 = __pyx_v_i; __pyx_t_32 = (__pyx_v_j - __pyx_v_periods); __pyx_t_33 = __pyx_v_i; __pyx_t_34 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_33, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_34, __pyx_pybuffernd_out.diminfo[1].strides) = ((*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_arr.rcbuffer->pybuffer.buf, __pyx_t_29, __pyx_pybuffernd_arr.diminfo[0].strides, __pyx_t_30, __pyx_pybuffernd_arr.diminfo[1].strides)) - (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_arr.rcbuffer->pybuffer.buf, __pyx_t_31, __pyx_pybuffernd_arr.diminfo[0].strides, __pyx_t_32, __pyx_pybuffernd_arr.diminfo[1].strides))); } } } __pyx_L17:; } __pyx_L5:; /* "pandas/src/generated.pyx":5025 * @cython.boundscheck(False) * @cython.wraparound(False) * def diff_2d_int64(ndarray[int64_t, ndim=2] arr, # <<<<<<<<<<<<<< * ndarray[float64_t, ndim=2] out, * Py_ssize_t periods, int axis): */ /* 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_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_arr.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.diff_2d_int64", __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_out.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":5069 * @cython.wraparound(False) * @cython.wraparound(False) * def group_last_float64(ndarray[float64_t, ndim=2] out, # <<<<<<<<<<<<<< * ndarray[int64_t] counts, * ndarray[float64_t, ndim=2] values, */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_387group_last_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6pandas_5algos_386group_last_float64[] = "\n Only aggregates on axis=0\n "; static PyMethodDef __pyx_mdef_6pandas_5algos_387group_last_float64 = {__Pyx_NAMESTR("group_last_float64"), (PyCFunction)__pyx_pw_6pandas_5algos_387group_last_float64, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_5algos_386group_last_float64)}; static PyObject *__pyx_pw_6pandas_5algos_387group_last_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_out = 0; PyArrayObject *__pyx_v_counts = 0; PyArrayObject *__pyx_v_values = 0; PyArrayObject *__pyx_v_labels = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("group_last_float64 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_out,&__pyx_n_s_counts,&__pyx_n_s_values,&__pyx_n_s_labels,0}; PyObject* values[4] = {0,0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_out)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_counts)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("group_last_float64", 1, 4, 4, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5069; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_values)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("group_last_float64", 1, 4, 4, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5069; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_labels)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("group_last_float64", 1, 4, 4, 3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5069; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "group_last_float64") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5069; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 4) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[3] = PyTuple_GET_ITEM(__pyx_args, 3); } __pyx_v_out = ((PyArrayObject *)values[0]); __pyx_v_counts = ((PyArrayObject *)values[1]); __pyx_v_values = ((PyArrayObject *)values[2]); __pyx_v_labels = ((PyArrayObject *)values[3]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("group_last_float64", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5069; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.group_last_float64", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_5numpy_ndarray, 1, "out", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5069; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_counts), __pyx_ptype_5numpy_ndarray, 1, "counts", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5070; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5071; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_labels), __pyx_ptype_5numpy_ndarray, 1, "labels", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5072; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_386group_last_float64(__pyx_self, __pyx_v_out, __pyx_v_counts, __pyx_v_values, __pyx_v_labels); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5algos_386group_last_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_out, PyArrayObject *__pyx_v_counts, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_labels) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_N; Py_ssize_t __pyx_v_K; Py_ssize_t __pyx_v_lab; __pyx_t_5numpy_float64_t __pyx_v_val; PyArrayObject *__pyx_v_resx = 0; PyArrayObject *__pyx_v_nobs = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_counts; __Pyx_Buffer __pyx_pybuffer_counts; __Pyx_LocalBuf_ND __pyx_pybuffernd_labels; __Pyx_Buffer __pyx_pybuffer_labels; __Pyx_LocalBuf_ND __pyx_pybuffernd_nobs; __Pyx_Buffer __pyx_pybuffer_nobs; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_resx; __Pyx_Buffer __pyx_pybuffer_resx; __Pyx_LocalBuf_ND __pyx_pybuffernd_values; __Pyx_Buffer __pyx_pybuffer_values; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; Py_ssize_t __pyx_t_2; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; 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; PyArrayObject *__pyx_t_14 = NULL; PyObject *(*__pyx_t_15)(PyObject *); 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; 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("group_last_float64", 0); __pyx_pybuffer_resx.pybuffer.buf = NULL; __pyx_pybuffer_resx.refcount = 0; __pyx_pybuffernd_resx.data = NULL; __pyx_pybuffernd_resx.rcbuffer = &__pyx_pybuffer_resx; __pyx_pybuffer_nobs.pybuffer.buf = NULL; __pyx_pybuffer_nobs.refcount = 0; __pyx_pybuffernd_nobs.data = NULL; __pyx_pybuffernd_nobs.rcbuffer = &__pyx_pybuffer_nobs; __pyx_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; __pyx_pybuffer_counts.pybuffer.buf = NULL; __pyx_pybuffer_counts.refcount = 0; __pyx_pybuffernd_counts.data = NULL; __pyx_pybuffernd_counts.rcbuffer = &__pyx_pybuffer_counts; __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_labels.pybuffer.buf = NULL; __pyx_pybuffer_labels.refcount = 0; __pyx_pybuffernd_labels.data = NULL; __pyx_pybuffernd_labels.rcbuffer = &__pyx_pybuffer_labels; { __Pyx_BufFmt_StackElem __pyx_stack[1]; 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, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5069; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; __pyx_pybuffernd_out.diminfo[1].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_out.diminfo[1].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[1]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_counts.rcbuffer->pybuffer, (PyObject*)__pyx_v_counts, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5069; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_counts.diminfo[0].strides = __pyx_pybuffernd_counts.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_counts.diminfo[0].shape = __pyx_pybuffernd_counts.rcbuffer->pybuffer.shape[0]; { __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, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5069; __pyx_clineno = __LINE__; goto __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_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_labels.rcbuffer->pybuffer, (PyObject*)__pyx_v_labels, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5069; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_labels.diminfo[0].strides = __pyx_pybuffernd_labels.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_labels.diminfo[0].shape = __pyx_pybuffernd_labels.rcbuffer->pybuffer.shape[0]; /* "pandas/src/generated.pyx":5082 * ndarray[int64_t, ndim=2] nobs * * if not len(values) == len(labels): # <<<<<<<<<<<<<< * raise AssertionError("len(index) != len(labels)") * */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5082; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_2 = PyObject_Length(((PyObject *)__pyx_v_labels)); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5082; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_3 = ((!((__pyx_t_1 == __pyx_t_2) != 0)) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":5083 * * if not len(values) == len(labels): * raise AssertionError("len(index) != len(labels)") # <<<<<<<<<<<<<< * * nobs = np.zeros(( out).shape, dtype=np.int64) */ __pyx_t_4 = PyObject_Call(__pyx_builtin_AssertionError, __pyx_tuple__177, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5083; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 5083; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } /* "pandas/src/generated.pyx":5085 * raise AssertionError("len(index) != len(labels)") * * nobs = np.zeros(( out).shape, dtype=np.int64) # <<<<<<<<<<<<<< * resx = np.empty_like(out) * */ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5085; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_zeros); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5085; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_out), __pyx_n_s_shape); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5085; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5085; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyDict_New(); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5085; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5085; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_int64); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5085; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_dtype, __pyx_t_8) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5085; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_8 = PyObject_Call(__pyx_t_5, __pyx_t_6, __pyx_t_4); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5085; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (!(likely(((__pyx_t_8) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_8, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5085; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_9 = ((PyArrayObject *)__pyx_t_8); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer); __pyx_t_10 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer, (PyObject*)__pyx_t_9, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_nobs.rcbuffer->pybuffer, (PyObject*)__pyx_v_nobs, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_pybuffernd_nobs.diminfo[0].strides = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_nobs.diminfo[0].shape = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_nobs.diminfo[1].strides = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_nobs.diminfo[1].shape = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.shape[1]; if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5085; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_9 = 0; __pyx_v_nobs = ((PyArrayObject *)__pyx_t_8); __pyx_t_8 = 0; /* "pandas/src/generated.pyx":5086 * * nobs = np.zeros(( out).shape, dtype=np.int64) * resx = np.empty_like(out) # <<<<<<<<<<<<<< * * N, K = ( values).shape */ __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5086; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_empty_like); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5086; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5086; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_INCREF(((PyObject *)__pyx_v_out)); PyTuple_SET_ITEM(__pyx_t_8, 0, ((PyObject *)__pyx_v_out)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out)); __pyx_t_6 = PyObject_Call(__pyx_t_4, __pyx_t_8, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5086; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5086; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_14 = ((PyArrayObject *)__pyx_t_6); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_resx.rcbuffer->pybuffer); __pyx_t_10 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_resx.rcbuffer->pybuffer, (PyObject*)__pyx_t_14, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_resx.rcbuffer->pybuffer, (PyObject*)__pyx_v_resx, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_pybuffernd_resx.diminfo[0].strides = __pyx_pybuffernd_resx.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_resx.diminfo[0].shape = __pyx_pybuffernd_resx.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_resx.diminfo[1].strides = __pyx_pybuffernd_resx.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_resx.diminfo[1].shape = __pyx_pybuffernd_resx.rcbuffer->pybuffer.shape[1]; if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5086; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_14 = 0; __pyx_v_resx = ((PyArrayObject *)__pyx_t_6); __pyx_t_6 = 0; /* "pandas/src/generated.pyx":5088 * resx = np.empty_like(out) * * N, K = ( values).shape # <<<<<<<<<<<<<< * * for i in range(N): */ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_values), __pyx_n_s_shape); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5088; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); if ((likely(PyTuple_CheckExact(__pyx_t_6))) || (PyList_CheckExact(__pyx_t_6))) { PyObject* sequence = __pyx_t_6; #if CYTHON_COMPILING_IN_CPYTHON Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5088; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_8 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_4 = PyTuple_GET_ITEM(sequence, 1); } else { __pyx_t_8 = PyList_GET_ITEM(sequence, 0); __pyx_t_4 = PyList_GET_ITEM(sequence, 1); } __Pyx_INCREF(__pyx_t_8); __Pyx_INCREF(__pyx_t_4); #else __pyx_t_8 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5088; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5088; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); #endif __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } else { Py_ssize_t index = -1; __pyx_t_5 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5088; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_15 = Py_TYPE(__pyx_t_5)->tp_iternext; index = 0; __pyx_t_8 = __pyx_t_15(__pyx_t_5); if (unlikely(!__pyx_t_8)) goto __pyx_L4_unpacking_failed; __Pyx_GOTREF(__pyx_t_8); index = 1; __pyx_t_4 = __pyx_t_15(__pyx_t_5); if (unlikely(!__pyx_t_4)) goto __pyx_L4_unpacking_failed; __Pyx_GOTREF(__pyx_t_4); if (__Pyx_IternextUnpackEndCheck(__pyx_t_15(__pyx_t_5), 2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5088; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_15 = NULL; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; goto __pyx_L5_unpacking_done; __pyx_L4_unpacking_failed:; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_15 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5088; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_L5_unpacking_done:; } __pyx_t_2 = __Pyx_PyIndex_AsSsize_t(__pyx_t_8); if (unlikely((__pyx_t_2 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5088; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_1 = __Pyx_PyIndex_AsSsize_t(__pyx_t_4); if (unlikely((__pyx_t_1 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5088; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_N = __pyx_t_2; __pyx_v_K = __pyx_t_1; /* "pandas/src/generated.pyx":5090 * N, K = ( values).shape * * for i in range(N): # <<<<<<<<<<<<<< * lab = labels[i] * if lab < 0: */ __pyx_t_1 = __pyx_v_N; for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) { __pyx_v_i = __pyx_t_2; /* "pandas/src/generated.pyx":5091 * * for i in range(N): * lab = labels[i] # <<<<<<<<<<<<<< * if lab < 0: * continue */ __pyx_t_16 = __pyx_v_i; __pyx_t_10 = -1; if (__pyx_t_16 < 0) { __pyx_t_10 = 0; } else if (unlikely(__pyx_t_16 >= __pyx_pybuffernd_labels.diminfo[0].shape)) __pyx_t_10 = 0; if (unlikely(__pyx_t_10 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_10); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5091; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_lab = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_labels.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_labels.diminfo[0].strides)); /* "pandas/src/generated.pyx":5092 * for i in range(N): * lab = labels[i] * if lab < 0: # <<<<<<<<<<<<<< * continue * */ __pyx_t_3 = ((__pyx_v_lab < 0) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":5093 * lab = labels[i] * if lab < 0: * continue # <<<<<<<<<<<<<< * * counts[lab] += 1 */ goto __pyx_L6_continue; } /* "pandas/src/generated.pyx":5095 * continue * * counts[lab] += 1 # <<<<<<<<<<<<<< * for j in range(K): * val = values[i, j] */ __pyx_t_17 = __pyx_v_lab; __pyx_t_10 = -1; if (__pyx_t_17 < 0) { __pyx_t_10 = 0; } else if (unlikely(__pyx_t_17 >= __pyx_pybuffernd_counts.diminfo[0].shape)) __pyx_t_10 = 0; if (unlikely(__pyx_t_10 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_10); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5095; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_counts.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_counts.diminfo[0].strides) += 1; /* "pandas/src/generated.pyx":5096 * * counts[lab] += 1 * for j in range(K): # <<<<<<<<<<<<<< * val = values[i, j] * */ __pyx_t_18 = __pyx_v_K; for (__pyx_t_19 = 0; __pyx_t_19 < __pyx_t_18; __pyx_t_19+=1) { __pyx_v_j = __pyx_t_19; /* "pandas/src/generated.pyx":5097 * counts[lab] += 1 * for j in range(K): * val = values[i, j] # <<<<<<<<<<<<<< * * # not nan */ __pyx_t_20 = __pyx_v_i; __pyx_t_21 = __pyx_v_j; __pyx_t_10 = -1; if (__pyx_t_20 < 0) { __pyx_t_10 = 0; } else if (unlikely(__pyx_t_20 >= __pyx_pybuffernd_values.diminfo[0].shape)) __pyx_t_10 = 0; if (__pyx_t_21 < 0) { __pyx_t_10 = 1; } else if (unlikely(__pyx_t_21 >= __pyx_pybuffernd_values.diminfo[1].shape)) __pyx_t_10 = 1; if (unlikely(__pyx_t_10 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_10); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5097; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_val = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_21, __pyx_pybuffernd_values.diminfo[1].strides)); /* "pandas/src/generated.pyx":5100 * * # not nan * if val == val: # <<<<<<<<<<<<<< * nobs[lab, j] += 1 * resx[lab, j] = val */ __pyx_t_3 = ((__pyx_v_val == __pyx_v_val) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":5101 * # not nan * if val == val: * nobs[lab, j] += 1 # <<<<<<<<<<<<<< * resx[lab, j] = val * */ __pyx_t_22 = __pyx_v_lab; __pyx_t_23 = __pyx_v_j; __pyx_t_10 = -1; if (__pyx_t_22 < 0) { __pyx_t_10 = 0; } else if (unlikely(__pyx_t_22 >= __pyx_pybuffernd_nobs.diminfo[0].shape)) __pyx_t_10 = 0; if (__pyx_t_23 < 0) { __pyx_t_10 = 1; } else if (unlikely(__pyx_t_23 >= __pyx_pybuffernd_nobs.diminfo[1].shape)) __pyx_t_10 = 1; if (unlikely(__pyx_t_10 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_10); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5101; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_nobs.rcbuffer->pybuffer.buf, __pyx_t_22, __pyx_pybuffernd_nobs.diminfo[0].strides, __pyx_t_23, __pyx_pybuffernd_nobs.diminfo[1].strides) += 1; /* "pandas/src/generated.pyx":5102 * if val == val: * nobs[lab, j] += 1 * resx[lab, j] = val # <<<<<<<<<<<<<< * * for i in range(len(counts)): */ __pyx_t_24 = __pyx_v_lab; __pyx_t_25 = __pyx_v_j; __pyx_t_10 = -1; if (__pyx_t_24 < 0) { __pyx_t_10 = 0; } else if (unlikely(__pyx_t_24 >= __pyx_pybuffernd_resx.diminfo[0].shape)) __pyx_t_10 = 0; if (__pyx_t_25 < 0) { __pyx_t_10 = 1; } else if (unlikely(__pyx_t_25 >= __pyx_pybuffernd_resx.diminfo[1].shape)) __pyx_t_10 = 1; if (unlikely(__pyx_t_10 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_10); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5102; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_resx.rcbuffer->pybuffer.buf, __pyx_t_24, __pyx_pybuffernd_resx.diminfo[0].strides, __pyx_t_25, __pyx_pybuffernd_resx.diminfo[1].strides) = __pyx_v_val; goto __pyx_L11; } __pyx_L11:; } __pyx_L6_continue:; } /* "pandas/src/generated.pyx":5104 * resx[lab, j] = val * * for i in range(len(counts)): # <<<<<<<<<<<<<< * for j in range(K): * if nobs[i, j] == 0: */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_counts)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5104; __pyx_clineno = __LINE__; goto __pyx_L1_error;} for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) { __pyx_v_i = __pyx_t_2; /* "pandas/src/generated.pyx":5105 * * for i in range(len(counts)): * for j in range(K): # <<<<<<<<<<<<<< * if nobs[i, j] == 0: * out[i, j] = nan */ __pyx_t_18 = __pyx_v_K; for (__pyx_t_19 = 0; __pyx_t_19 < __pyx_t_18; __pyx_t_19+=1) { __pyx_v_j = __pyx_t_19; /* "pandas/src/generated.pyx":5106 * for i in range(len(counts)): * for j in range(K): * if nobs[i, j] == 0: # <<<<<<<<<<<<<< * out[i, j] = nan * else: */ __pyx_t_26 = __pyx_v_i; __pyx_t_27 = __pyx_v_j; __pyx_t_10 = -1; if (__pyx_t_26 < 0) { __pyx_t_10 = 0; } else if (unlikely(__pyx_t_26 >= __pyx_pybuffernd_nobs.diminfo[0].shape)) __pyx_t_10 = 0; if (__pyx_t_27 < 0) { __pyx_t_10 = 1; } else if (unlikely(__pyx_t_27 >= __pyx_pybuffernd_nobs.diminfo[1].shape)) __pyx_t_10 = 1; if (unlikely(__pyx_t_10 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_10); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5106; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_3 = (((*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_nobs.rcbuffer->pybuffer.buf, __pyx_t_26, __pyx_pybuffernd_nobs.diminfo[0].strides, __pyx_t_27, __pyx_pybuffernd_nobs.diminfo[1].strides)) == 0) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":5107 * for j in range(K): * if nobs[i, j] == 0: * out[i, j] = nan # <<<<<<<<<<<<<< * else: * out[i, j] = resx[i, j] */ __pyx_t_28 = __pyx_v_i; __pyx_t_29 = __pyx_v_j; __pyx_t_10 = -1; if (__pyx_t_28 < 0) { __pyx_t_10 = 0; } else if (unlikely(__pyx_t_28 >= __pyx_pybuffernd_out.diminfo[0].shape)) __pyx_t_10 = 0; if (__pyx_t_29 < 0) { __pyx_t_10 = 1; } else if (unlikely(__pyx_t_29 >= __pyx_pybuffernd_out.diminfo[1].shape)) __pyx_t_10 = 1; if (unlikely(__pyx_t_10 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_10); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5107; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_28, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_29, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_6pandas_5algos_nan; goto __pyx_L16; } /*else*/ { /* "pandas/src/generated.pyx":5109 * out[i, j] = nan * else: * out[i, j] = resx[i, j] # <<<<<<<<<<<<<< * @cython.wraparound(False) * @cython.wraparound(False) */ __pyx_t_30 = __pyx_v_i; __pyx_t_31 = __pyx_v_j; __pyx_t_10 = -1; if (__pyx_t_30 < 0) { __pyx_t_10 = 0; } else if (unlikely(__pyx_t_30 >= __pyx_pybuffernd_resx.diminfo[0].shape)) __pyx_t_10 = 0; if (__pyx_t_31 < 0) { __pyx_t_10 = 1; } else if (unlikely(__pyx_t_31 >= __pyx_pybuffernd_resx.diminfo[1].shape)) __pyx_t_10 = 1; if (unlikely(__pyx_t_10 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_10); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5109; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_32 = __pyx_v_i; __pyx_t_33 = __pyx_v_j; __pyx_t_10 = -1; if (__pyx_t_32 < 0) { __pyx_t_10 = 0; } else if (unlikely(__pyx_t_32 >= __pyx_pybuffernd_out.diminfo[0].shape)) __pyx_t_10 = 0; if (__pyx_t_33 < 0) { __pyx_t_10 = 1; } else if (unlikely(__pyx_t_33 >= __pyx_pybuffernd_out.diminfo[1].shape)) __pyx_t_10 = 1; if (unlikely(__pyx_t_10 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_10); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5109; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_32, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_33, __pyx_pybuffernd_out.diminfo[1].strides) = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_resx.rcbuffer->pybuffer.buf, __pyx_t_30, __pyx_pybuffernd_resx.diminfo[0].strides, __pyx_t_31, __pyx_pybuffernd_resx.diminfo[1].strides)); } __pyx_L16:; } } /* "pandas/src/generated.pyx":5069 * @cython.wraparound(False) * @cython.wraparound(False) * def group_last_float64(ndarray[float64_t, ndim=2] out, # <<<<<<<<<<<<<< * ndarray[int64_t] counts, * ndarray[float64_t, ndim=2] values, */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_counts.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_labels.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_resx.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.group_last_float64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_counts.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_labels.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_resx.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_resx); __Pyx_XDECREF((PyObject *)__pyx_v_nobs); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":5112 * @cython.wraparound(False) * @cython.wraparound(False) * def group_last_float32(ndarray[float32_t, ndim=2] out, # <<<<<<<<<<<<<< * ndarray[int64_t] counts, * ndarray[float32_t, ndim=2] values, */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_389group_last_float32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6pandas_5algos_388group_last_float32[] = "\n Only aggregates on axis=0\n "; static PyMethodDef __pyx_mdef_6pandas_5algos_389group_last_float32 = {__Pyx_NAMESTR("group_last_float32"), (PyCFunction)__pyx_pw_6pandas_5algos_389group_last_float32, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_5algos_388group_last_float32)}; static PyObject *__pyx_pw_6pandas_5algos_389group_last_float32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_out = 0; PyArrayObject *__pyx_v_counts = 0; PyArrayObject *__pyx_v_values = 0; PyArrayObject *__pyx_v_labels = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("group_last_float32 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_out,&__pyx_n_s_counts,&__pyx_n_s_values,&__pyx_n_s_labels,0}; PyObject* values[4] = {0,0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_out)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_counts)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("group_last_float32", 1, 4, 4, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5112; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_values)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("group_last_float32", 1, 4, 4, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5112; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_labels)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("group_last_float32", 1, 4, 4, 3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5112; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "group_last_float32") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5112; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 4) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[3] = PyTuple_GET_ITEM(__pyx_args, 3); } __pyx_v_out = ((PyArrayObject *)values[0]); __pyx_v_counts = ((PyArrayObject *)values[1]); __pyx_v_values = ((PyArrayObject *)values[2]); __pyx_v_labels = ((PyArrayObject *)values[3]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("group_last_float32", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5112; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.group_last_float32", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_5numpy_ndarray, 1, "out", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5112; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_counts), __pyx_ptype_5numpy_ndarray, 1, "counts", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5113; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5114; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_labels), __pyx_ptype_5numpy_ndarray, 1, "labels", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5115; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_388group_last_float32(__pyx_self, __pyx_v_out, __pyx_v_counts, __pyx_v_values, __pyx_v_labels); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5algos_388group_last_float32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_out, PyArrayObject *__pyx_v_counts, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_labels) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_N; Py_ssize_t __pyx_v_K; Py_ssize_t __pyx_v_lab; __pyx_t_5numpy_float32_t __pyx_v_val; PyArrayObject *__pyx_v_resx = 0; PyArrayObject *__pyx_v_nobs = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_counts; __Pyx_Buffer __pyx_pybuffer_counts; __Pyx_LocalBuf_ND __pyx_pybuffernd_labels; __Pyx_Buffer __pyx_pybuffer_labels; __Pyx_LocalBuf_ND __pyx_pybuffernd_nobs; __Pyx_Buffer __pyx_pybuffer_nobs; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_resx; __Pyx_Buffer __pyx_pybuffer_resx; __Pyx_LocalBuf_ND __pyx_pybuffernd_values; __Pyx_Buffer __pyx_pybuffer_values; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; Py_ssize_t __pyx_t_2; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; 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; PyArrayObject *__pyx_t_14 = NULL; PyObject *(*__pyx_t_15)(PyObject *); 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; 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("group_last_float32", 0); __pyx_pybuffer_resx.pybuffer.buf = NULL; __pyx_pybuffer_resx.refcount = 0; __pyx_pybuffernd_resx.data = NULL; __pyx_pybuffernd_resx.rcbuffer = &__pyx_pybuffer_resx; __pyx_pybuffer_nobs.pybuffer.buf = NULL; __pyx_pybuffer_nobs.refcount = 0; __pyx_pybuffernd_nobs.data = NULL; __pyx_pybuffernd_nobs.rcbuffer = &__pyx_pybuffer_nobs; __pyx_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; __pyx_pybuffer_counts.pybuffer.buf = NULL; __pyx_pybuffer_counts.refcount = 0; __pyx_pybuffernd_counts.data = NULL; __pyx_pybuffernd_counts.rcbuffer = &__pyx_pybuffer_counts; __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_labels.pybuffer.buf = NULL; __pyx_pybuffer_labels.refcount = 0; __pyx_pybuffernd_labels.data = NULL; __pyx_pybuffernd_labels.rcbuffer = &__pyx_pybuffer_labels; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_v_out, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5112; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; __pyx_pybuffernd_out.diminfo[1].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_out.diminfo[1].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[1]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_counts.rcbuffer->pybuffer, (PyObject*)__pyx_v_counts, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5112; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_counts.diminfo[0].strides = __pyx_pybuffernd_counts.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_counts.diminfo[0].shape = __pyx_pybuffernd_counts.rcbuffer->pybuffer.shape[0]; { __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_float32_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5112; __pyx_clineno = __LINE__; goto __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_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_labels.rcbuffer->pybuffer, (PyObject*)__pyx_v_labels, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5112; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_labels.diminfo[0].strides = __pyx_pybuffernd_labels.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_labels.diminfo[0].shape = __pyx_pybuffernd_labels.rcbuffer->pybuffer.shape[0]; /* "pandas/src/generated.pyx":5125 * ndarray[int64_t, ndim=2] nobs * * if not len(values) == len(labels): # <<<<<<<<<<<<<< * raise AssertionError("len(index) != len(labels)") * */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5125; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_2 = PyObject_Length(((PyObject *)__pyx_v_labels)); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5125; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_3 = ((!((__pyx_t_1 == __pyx_t_2) != 0)) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":5126 * * if not len(values) == len(labels): * raise AssertionError("len(index) != len(labels)") # <<<<<<<<<<<<<< * * nobs = np.zeros(( out).shape, dtype=np.int64) */ __pyx_t_4 = PyObject_Call(__pyx_builtin_AssertionError, __pyx_tuple__178, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5126; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 5126; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } /* "pandas/src/generated.pyx":5128 * raise AssertionError("len(index) != len(labels)") * * nobs = np.zeros(( out).shape, dtype=np.int64) # <<<<<<<<<<<<<< * resx = np.empty_like(out) * */ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5128; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_zeros); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5128; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_out), __pyx_n_s_shape); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5128; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5128; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyDict_New(); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5128; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5128; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_int64); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5128; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_dtype, __pyx_t_8) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5128; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_8 = PyObject_Call(__pyx_t_5, __pyx_t_6, __pyx_t_4); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5128; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (!(likely(((__pyx_t_8) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_8, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5128; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_9 = ((PyArrayObject *)__pyx_t_8); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer); __pyx_t_10 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer, (PyObject*)__pyx_t_9, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_nobs.rcbuffer->pybuffer, (PyObject*)__pyx_v_nobs, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_pybuffernd_nobs.diminfo[0].strides = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_nobs.diminfo[0].shape = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_nobs.diminfo[1].strides = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_nobs.diminfo[1].shape = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.shape[1]; if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5128; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_9 = 0; __pyx_v_nobs = ((PyArrayObject *)__pyx_t_8); __pyx_t_8 = 0; /* "pandas/src/generated.pyx":5129 * * nobs = np.zeros(( out).shape, dtype=np.int64) * resx = np.empty_like(out) # <<<<<<<<<<<<<< * * N, K = ( values).shape */ __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5129; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_empty_like); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5129; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5129; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_INCREF(((PyObject *)__pyx_v_out)); PyTuple_SET_ITEM(__pyx_t_8, 0, ((PyObject *)__pyx_v_out)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out)); __pyx_t_6 = PyObject_Call(__pyx_t_4, __pyx_t_8, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5129; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5129; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_14 = ((PyArrayObject *)__pyx_t_6); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_resx.rcbuffer->pybuffer); __pyx_t_10 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_resx.rcbuffer->pybuffer, (PyObject*)__pyx_t_14, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_resx.rcbuffer->pybuffer, (PyObject*)__pyx_v_resx, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_pybuffernd_resx.diminfo[0].strides = __pyx_pybuffernd_resx.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_resx.diminfo[0].shape = __pyx_pybuffernd_resx.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_resx.diminfo[1].strides = __pyx_pybuffernd_resx.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_resx.diminfo[1].shape = __pyx_pybuffernd_resx.rcbuffer->pybuffer.shape[1]; if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5129; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_14 = 0; __pyx_v_resx = ((PyArrayObject *)__pyx_t_6); __pyx_t_6 = 0; /* "pandas/src/generated.pyx":5131 * resx = np.empty_like(out) * * N, K = ( values).shape # <<<<<<<<<<<<<< * * for i in range(N): */ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_values), __pyx_n_s_shape); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5131; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); if ((likely(PyTuple_CheckExact(__pyx_t_6))) || (PyList_CheckExact(__pyx_t_6))) { PyObject* sequence = __pyx_t_6; #if CYTHON_COMPILING_IN_CPYTHON Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5131; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_8 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_4 = PyTuple_GET_ITEM(sequence, 1); } else { __pyx_t_8 = PyList_GET_ITEM(sequence, 0); __pyx_t_4 = PyList_GET_ITEM(sequence, 1); } __Pyx_INCREF(__pyx_t_8); __Pyx_INCREF(__pyx_t_4); #else __pyx_t_8 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5131; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5131; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); #endif __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } else { Py_ssize_t index = -1; __pyx_t_5 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5131; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_15 = Py_TYPE(__pyx_t_5)->tp_iternext; index = 0; __pyx_t_8 = __pyx_t_15(__pyx_t_5); if (unlikely(!__pyx_t_8)) goto __pyx_L4_unpacking_failed; __Pyx_GOTREF(__pyx_t_8); index = 1; __pyx_t_4 = __pyx_t_15(__pyx_t_5); if (unlikely(!__pyx_t_4)) goto __pyx_L4_unpacking_failed; __Pyx_GOTREF(__pyx_t_4); if (__Pyx_IternextUnpackEndCheck(__pyx_t_15(__pyx_t_5), 2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5131; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_15 = NULL; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; goto __pyx_L5_unpacking_done; __pyx_L4_unpacking_failed:; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_15 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5131; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_L5_unpacking_done:; } __pyx_t_2 = __Pyx_PyIndex_AsSsize_t(__pyx_t_8); if (unlikely((__pyx_t_2 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5131; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_1 = __Pyx_PyIndex_AsSsize_t(__pyx_t_4); if (unlikely((__pyx_t_1 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5131; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_N = __pyx_t_2; __pyx_v_K = __pyx_t_1; /* "pandas/src/generated.pyx":5133 * N, K = ( values).shape * * for i in range(N): # <<<<<<<<<<<<<< * lab = labels[i] * if lab < 0: */ __pyx_t_1 = __pyx_v_N; for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) { __pyx_v_i = __pyx_t_2; /* "pandas/src/generated.pyx":5134 * * for i in range(N): * lab = labels[i] # <<<<<<<<<<<<<< * if lab < 0: * continue */ __pyx_t_16 = __pyx_v_i; __pyx_t_10 = -1; if (__pyx_t_16 < 0) { __pyx_t_10 = 0; } else if (unlikely(__pyx_t_16 >= __pyx_pybuffernd_labels.diminfo[0].shape)) __pyx_t_10 = 0; if (unlikely(__pyx_t_10 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_10); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5134; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_lab = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_labels.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_labels.diminfo[0].strides)); /* "pandas/src/generated.pyx":5135 * for i in range(N): * lab = labels[i] * if lab < 0: # <<<<<<<<<<<<<< * continue * */ __pyx_t_3 = ((__pyx_v_lab < 0) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":5136 * lab = labels[i] * if lab < 0: * continue # <<<<<<<<<<<<<< * * counts[lab] += 1 */ goto __pyx_L6_continue; } /* "pandas/src/generated.pyx":5138 * continue * * counts[lab] += 1 # <<<<<<<<<<<<<< * for j in range(K): * val = values[i, j] */ __pyx_t_17 = __pyx_v_lab; __pyx_t_10 = -1; if (__pyx_t_17 < 0) { __pyx_t_10 = 0; } else if (unlikely(__pyx_t_17 >= __pyx_pybuffernd_counts.diminfo[0].shape)) __pyx_t_10 = 0; if (unlikely(__pyx_t_10 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_10); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5138; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_counts.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_counts.diminfo[0].strides) += 1; /* "pandas/src/generated.pyx":5139 * * counts[lab] += 1 * for j in range(K): # <<<<<<<<<<<<<< * val = values[i, j] * */ __pyx_t_18 = __pyx_v_K; for (__pyx_t_19 = 0; __pyx_t_19 < __pyx_t_18; __pyx_t_19+=1) { __pyx_v_j = __pyx_t_19; /* "pandas/src/generated.pyx":5140 * counts[lab] += 1 * for j in range(K): * val = values[i, j] # <<<<<<<<<<<<<< * * # not nan */ __pyx_t_20 = __pyx_v_i; __pyx_t_21 = __pyx_v_j; __pyx_t_10 = -1; if (__pyx_t_20 < 0) { __pyx_t_10 = 0; } else if (unlikely(__pyx_t_20 >= __pyx_pybuffernd_values.diminfo[0].shape)) __pyx_t_10 = 0; if (__pyx_t_21 < 0) { __pyx_t_10 = 1; } else if (unlikely(__pyx_t_21 >= __pyx_pybuffernd_values.diminfo[1].shape)) __pyx_t_10 = 1; if (unlikely(__pyx_t_10 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_10); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5140; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_val = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_21, __pyx_pybuffernd_values.diminfo[1].strides)); /* "pandas/src/generated.pyx":5143 * * # not nan * if val == val: # <<<<<<<<<<<<<< * nobs[lab, j] += 1 * resx[lab, j] = val */ __pyx_t_3 = ((__pyx_v_val == __pyx_v_val) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":5144 * # not nan * if val == val: * nobs[lab, j] += 1 # <<<<<<<<<<<<<< * resx[lab, j] = val * */ __pyx_t_22 = __pyx_v_lab; __pyx_t_23 = __pyx_v_j; __pyx_t_10 = -1; if (__pyx_t_22 < 0) { __pyx_t_10 = 0; } else if (unlikely(__pyx_t_22 >= __pyx_pybuffernd_nobs.diminfo[0].shape)) __pyx_t_10 = 0; if (__pyx_t_23 < 0) { __pyx_t_10 = 1; } else if (unlikely(__pyx_t_23 >= __pyx_pybuffernd_nobs.diminfo[1].shape)) __pyx_t_10 = 1; if (unlikely(__pyx_t_10 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_10); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5144; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_nobs.rcbuffer->pybuffer.buf, __pyx_t_22, __pyx_pybuffernd_nobs.diminfo[0].strides, __pyx_t_23, __pyx_pybuffernd_nobs.diminfo[1].strides) += 1; /* "pandas/src/generated.pyx":5145 * if val == val: * nobs[lab, j] += 1 * resx[lab, j] = val # <<<<<<<<<<<<<< * * for i in range(len(counts)): */ __pyx_t_24 = __pyx_v_lab; __pyx_t_25 = __pyx_v_j; __pyx_t_10 = -1; if (__pyx_t_24 < 0) { __pyx_t_10 = 0; } else if (unlikely(__pyx_t_24 >= __pyx_pybuffernd_resx.diminfo[0].shape)) __pyx_t_10 = 0; if (__pyx_t_25 < 0) { __pyx_t_10 = 1; } else if (unlikely(__pyx_t_25 >= __pyx_pybuffernd_resx.diminfo[1].shape)) __pyx_t_10 = 1; if (unlikely(__pyx_t_10 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_10); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5145; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_resx.rcbuffer->pybuffer.buf, __pyx_t_24, __pyx_pybuffernd_resx.diminfo[0].strides, __pyx_t_25, __pyx_pybuffernd_resx.diminfo[1].strides) = __pyx_v_val; goto __pyx_L11; } __pyx_L11:; } __pyx_L6_continue:; } /* "pandas/src/generated.pyx":5147 * resx[lab, j] = val * * for i in range(len(counts)): # <<<<<<<<<<<<<< * for j in range(K): * if nobs[i, j] == 0: */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_counts)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5147; __pyx_clineno = __LINE__; goto __pyx_L1_error;} for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) { __pyx_v_i = __pyx_t_2; /* "pandas/src/generated.pyx":5148 * * for i in range(len(counts)): * for j in range(K): # <<<<<<<<<<<<<< * if nobs[i, j] == 0: * out[i, j] = nan */ __pyx_t_18 = __pyx_v_K; for (__pyx_t_19 = 0; __pyx_t_19 < __pyx_t_18; __pyx_t_19+=1) { __pyx_v_j = __pyx_t_19; /* "pandas/src/generated.pyx":5149 * for i in range(len(counts)): * for j in range(K): * if nobs[i, j] == 0: # <<<<<<<<<<<<<< * out[i, j] = nan * else: */ __pyx_t_26 = __pyx_v_i; __pyx_t_27 = __pyx_v_j; __pyx_t_10 = -1; if (__pyx_t_26 < 0) { __pyx_t_10 = 0; } else if (unlikely(__pyx_t_26 >= __pyx_pybuffernd_nobs.diminfo[0].shape)) __pyx_t_10 = 0; if (__pyx_t_27 < 0) { __pyx_t_10 = 1; } else if (unlikely(__pyx_t_27 >= __pyx_pybuffernd_nobs.diminfo[1].shape)) __pyx_t_10 = 1; if (unlikely(__pyx_t_10 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_10); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5149; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_3 = (((*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_nobs.rcbuffer->pybuffer.buf, __pyx_t_26, __pyx_pybuffernd_nobs.diminfo[0].strides, __pyx_t_27, __pyx_pybuffernd_nobs.diminfo[1].strides)) == 0) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":5150 * for j in range(K): * if nobs[i, j] == 0: * out[i, j] = nan # <<<<<<<<<<<<<< * else: * out[i, j] = resx[i, j] */ __pyx_t_28 = __pyx_v_i; __pyx_t_29 = __pyx_v_j; __pyx_t_10 = -1; if (__pyx_t_28 < 0) { __pyx_t_10 = 0; } else if (unlikely(__pyx_t_28 >= __pyx_pybuffernd_out.diminfo[0].shape)) __pyx_t_10 = 0; if (__pyx_t_29 < 0) { __pyx_t_10 = 1; } else if (unlikely(__pyx_t_29 >= __pyx_pybuffernd_out.diminfo[1].shape)) __pyx_t_10 = 1; if (unlikely(__pyx_t_10 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_10); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5150; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_28, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_29, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_6pandas_5algos_nan; goto __pyx_L16; } /*else*/ { /* "pandas/src/generated.pyx":5152 * out[i, j] = nan * else: * out[i, j] = resx[i, j] # <<<<<<<<<<<<<< * * @cython.wraparound(False) */ __pyx_t_30 = __pyx_v_i; __pyx_t_31 = __pyx_v_j; __pyx_t_10 = -1; if (__pyx_t_30 < 0) { __pyx_t_10 = 0; } else if (unlikely(__pyx_t_30 >= __pyx_pybuffernd_resx.diminfo[0].shape)) __pyx_t_10 = 0; if (__pyx_t_31 < 0) { __pyx_t_10 = 1; } else if (unlikely(__pyx_t_31 >= __pyx_pybuffernd_resx.diminfo[1].shape)) __pyx_t_10 = 1; if (unlikely(__pyx_t_10 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_10); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5152; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_32 = __pyx_v_i; __pyx_t_33 = __pyx_v_j; __pyx_t_10 = -1; if (__pyx_t_32 < 0) { __pyx_t_10 = 0; } else if (unlikely(__pyx_t_32 >= __pyx_pybuffernd_out.diminfo[0].shape)) __pyx_t_10 = 0; if (__pyx_t_33 < 0) { __pyx_t_10 = 1; } else if (unlikely(__pyx_t_33 >= __pyx_pybuffernd_out.diminfo[1].shape)) __pyx_t_10 = 1; if (unlikely(__pyx_t_10 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_10); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5152; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_32, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_33, __pyx_pybuffernd_out.diminfo[1].strides) = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_resx.rcbuffer->pybuffer.buf, __pyx_t_30, __pyx_pybuffernd_resx.diminfo[0].strides, __pyx_t_31, __pyx_pybuffernd_resx.diminfo[1].strides)); } __pyx_L16:; } } /* "pandas/src/generated.pyx":5112 * @cython.wraparound(False) * @cython.wraparound(False) * def group_last_float32(ndarray[float32_t, ndim=2] out, # <<<<<<<<<<<<<< * ndarray[int64_t] counts, * ndarray[float32_t, ndim=2] values, */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_counts.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_labels.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_resx.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.group_last_float32", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_counts.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_labels.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_resx.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_resx); __Pyx_XDECREF((PyObject *)__pyx_v_nobs); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":5156 * @cython.wraparound(False) * @cython.wraparound(False) * def group_last_bin_float64(ndarray[float64_t, ndim=2] out, # <<<<<<<<<<<<<< * ndarray[int64_t] counts, * ndarray[float64_t, ndim=2] values, */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_391group_last_bin_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6pandas_5algos_390group_last_bin_float64[] = "\n Only aggregates on axis=0\n "; static PyMethodDef __pyx_mdef_6pandas_5algos_391group_last_bin_float64 = {__Pyx_NAMESTR("group_last_bin_float64"), (PyCFunction)__pyx_pw_6pandas_5algos_391group_last_bin_float64, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_5algos_390group_last_bin_float64)}; static PyObject *__pyx_pw_6pandas_5algos_391group_last_bin_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_out = 0; PyArrayObject *__pyx_v_counts = 0; PyArrayObject *__pyx_v_values = 0; PyArrayObject *__pyx_v_bins = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("group_last_bin_float64 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_out,&__pyx_n_s_counts,&__pyx_n_s_values,&__pyx_n_s_bins,0}; PyObject* values[4] = {0,0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_out)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_counts)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("group_last_bin_float64", 1, 4, 4, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5156; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_values)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("group_last_bin_float64", 1, 4, 4, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5156; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_bins)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("group_last_bin_float64", 1, 4, 4, 3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5156; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "group_last_bin_float64") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5156; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 4) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[3] = PyTuple_GET_ITEM(__pyx_args, 3); } __pyx_v_out = ((PyArrayObject *)values[0]); __pyx_v_counts = ((PyArrayObject *)values[1]); __pyx_v_values = ((PyArrayObject *)values[2]); __pyx_v_bins = ((PyArrayObject *)values[3]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("group_last_bin_float64", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5156; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.group_last_bin_float64", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_5numpy_ndarray, 1, "out", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5156; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_counts), __pyx_ptype_5numpy_ndarray, 1, "counts", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5157; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5158; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_bins), __pyx_ptype_5numpy_ndarray, 1, "bins", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5159; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_390group_last_bin_float64(__pyx_self, __pyx_v_out, __pyx_v_counts, __pyx_v_values, __pyx_v_bins); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5algos_390group_last_bin_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_out, PyArrayObject *__pyx_v_counts, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_bins) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_N; Py_ssize_t __pyx_v_K; Py_ssize_t __pyx_v_ngroups; Py_ssize_t __pyx_v_b; __pyx_t_5numpy_float64_t __pyx_v_val; PyArrayObject *__pyx_v_resx = 0; PyArrayObject *__pyx_v_nobs = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_bins; __Pyx_Buffer __pyx_pybuffer_bins; __Pyx_LocalBuf_ND __pyx_pybuffernd_counts; __Pyx_Buffer __pyx_pybuffer_counts; __Pyx_LocalBuf_ND __pyx_pybuffernd_nobs; __Pyx_Buffer __pyx_pybuffer_nobs; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_resx; __Pyx_Buffer __pyx_pybuffer_resx; __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; PyArrayObject *__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; Py_ssize_t __pyx_t_11; int __pyx_t_12; PyObject *__pyx_t_13 = NULL; PyObject *(*__pyx_t_14)(PyObject *); Py_ssize_t __pyx_t_15; int __pyx_t_16; int __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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("group_last_bin_float64", 0); __pyx_pybuffer_resx.pybuffer.buf = NULL; __pyx_pybuffer_resx.refcount = 0; __pyx_pybuffernd_resx.data = NULL; __pyx_pybuffernd_resx.rcbuffer = &__pyx_pybuffer_resx; __pyx_pybuffer_nobs.pybuffer.buf = NULL; __pyx_pybuffer_nobs.refcount = 0; __pyx_pybuffernd_nobs.data = NULL; __pyx_pybuffernd_nobs.rcbuffer = &__pyx_pybuffer_nobs; __pyx_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; __pyx_pybuffer_counts.pybuffer.buf = NULL; __pyx_pybuffer_counts.refcount = 0; __pyx_pybuffernd_counts.data = NULL; __pyx_pybuffernd_counts.rcbuffer = &__pyx_pybuffer_counts; __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_bins.pybuffer.buf = NULL; __pyx_pybuffer_bins.refcount = 0; __pyx_pybuffernd_bins.data = NULL; __pyx_pybuffernd_bins.rcbuffer = &__pyx_pybuffer_bins; { __Pyx_BufFmt_StackElem __pyx_stack[1]; 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, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5156; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; __pyx_pybuffernd_out.diminfo[1].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_out.diminfo[1].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[1]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_counts.rcbuffer->pybuffer, (PyObject*)__pyx_v_counts, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5156; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_counts.diminfo[0].strides = __pyx_pybuffernd_counts.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_counts.diminfo[0].shape = __pyx_pybuffernd_counts.rcbuffer->pybuffer.shape[0]; { __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, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5156; __pyx_clineno = __LINE__; goto __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_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_bins.rcbuffer->pybuffer, (PyObject*)__pyx_v_bins, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5156; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_bins.diminfo[0].strides = __pyx_pybuffernd_bins.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_bins.diminfo[0].shape = __pyx_pybuffernd_bins.rcbuffer->pybuffer.shape[0]; /* "pandas/src/generated.pyx":5168 * ndarray[float64_t, ndim=2] resx, nobs * * nobs = np.zeros_like(out) # <<<<<<<<<<<<<< * resx = np.empty_like(out) * */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5168; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_zeros_like); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5168; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 5168; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)__pyx_v_out)); PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_out)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out)); __pyx_t_3 = PyObject_Call(__pyx_t_2, __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5168; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5168; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_4 = ((PyArrayObject *)__pyx_t_3); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer); __pyx_t_5 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer, (PyObject*)__pyx_t_4, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_nobs.rcbuffer->pybuffer, (PyObject*)__pyx_v_nobs, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_pybuffernd_nobs.diminfo[0].strides = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_nobs.diminfo[0].shape = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_nobs.diminfo[1].strides = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_nobs.diminfo[1].shape = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.shape[1]; if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5168; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_4 = 0; __pyx_v_nobs = ((PyArrayObject *)__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/generated.pyx":5169 * * nobs = np.zeros_like(out) * resx = np.empty_like(out) # <<<<<<<<<<<<<< * * if bins[len(bins) - 1] == len(values): */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5169; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_empty_like); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5169; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5169; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(((PyObject *)__pyx_v_out)); PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_v_out)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out)); __pyx_t_2 = PyObject_Call(__pyx_t_1, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5169; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5169; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_4 = ((PyArrayObject *)__pyx_t_2); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_resx.rcbuffer->pybuffer); __pyx_t_5 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_resx.rcbuffer->pybuffer, (PyObject*)__pyx_t_4, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_resx.rcbuffer->pybuffer, (PyObject*)__pyx_v_resx, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_pybuffernd_resx.diminfo[0].strides = __pyx_pybuffernd_resx.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_resx.diminfo[0].shape = __pyx_pybuffernd_resx.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_resx.diminfo[1].strides = __pyx_pybuffernd_resx.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_resx.diminfo[1].shape = __pyx_pybuffernd_resx.rcbuffer->pybuffer.shape[1]; if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5169; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_4 = 0; __pyx_v_resx = ((PyArrayObject *)__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":5171 * resx = np.empty_like(out) * * if bins[len(bins) - 1] == len(values): # <<<<<<<<<<<<<< * ngroups = len(bins) * else: */ __pyx_t_9 = PyObject_Length(((PyObject *)__pyx_v_bins)); if (unlikely(__pyx_t_9 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5171; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_10 = (__pyx_t_9 - 1); __pyx_t_5 = -1; if (__pyx_t_10 < 0) { __pyx_t_5 = 0; } else if (unlikely(__pyx_t_10 >= __pyx_pybuffernd_bins.diminfo[0].shape)) __pyx_t_5 = 0; if (unlikely(__pyx_t_5 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_5); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5171; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_11 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5171; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_12 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_bins.rcbuffer->pybuffer.buf, __pyx_t_10, __pyx_pybuffernd_bins.diminfo[0].strides)) == __pyx_t_11) != 0); if (__pyx_t_12) { /* "pandas/src/generated.pyx":5172 * * if bins[len(bins) - 1] == len(values): * ngroups = len(bins) # <<<<<<<<<<<<<< * else: * ngroups = len(bins) + 1 */ __pyx_t_11 = PyObject_Length(((PyObject *)__pyx_v_bins)); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5172; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_ngroups = __pyx_t_11; goto __pyx_L3; } /*else*/ { /* "pandas/src/generated.pyx":5174 * ngroups = len(bins) * else: * ngroups = len(bins) + 1 # <<<<<<<<<<<<<< * * N, K = ( values).shape */ __pyx_t_11 = PyObject_Length(((PyObject *)__pyx_v_bins)); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5174; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_ngroups = (__pyx_t_11 + 1); } __pyx_L3:; /* "pandas/src/generated.pyx":5176 * ngroups = len(bins) + 1 * * N, K = ( values).shape # <<<<<<<<<<<<<< * * b = 0 */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_values), __pyx_n_s_shape); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5176; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if ((likely(PyTuple_CheckExact(__pyx_t_2))) || (PyList_CheckExact(__pyx_t_2))) { PyObject* sequence = __pyx_t_2; #if CYTHON_COMPILING_IN_CPYTHON Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5176; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_1 = PyTuple_GET_ITEM(sequence, 1); } else { __pyx_t_3 = PyList_GET_ITEM(sequence, 0); __pyx_t_1 = PyList_GET_ITEM(sequence, 1); } __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(__pyx_t_1); #else __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5176; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5176; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); #endif __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } else { Py_ssize_t index = -1; __pyx_t_13 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5176; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_14 = Py_TYPE(__pyx_t_13)->tp_iternext; index = 0; __pyx_t_3 = __pyx_t_14(__pyx_t_13); if (unlikely(!__pyx_t_3)) goto __pyx_L4_unpacking_failed; __Pyx_GOTREF(__pyx_t_3); index = 1; __pyx_t_1 = __pyx_t_14(__pyx_t_13); if (unlikely(!__pyx_t_1)) goto __pyx_L4_unpacking_failed; __Pyx_GOTREF(__pyx_t_1); if (__Pyx_IternextUnpackEndCheck(__pyx_t_14(__pyx_t_13), 2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5176; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_14 = NULL; __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; goto __pyx_L5_unpacking_done; __pyx_L4_unpacking_failed:; __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_14 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5176; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_L5_unpacking_done:; } __pyx_t_11 = __Pyx_PyIndex_AsSsize_t(__pyx_t_3); if (unlikely((__pyx_t_11 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5176; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_9 = __Pyx_PyIndex_AsSsize_t(__pyx_t_1); if (unlikely((__pyx_t_9 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5176; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_N = __pyx_t_11; __pyx_v_K = __pyx_t_9; /* "pandas/src/generated.pyx":5178 * N, K = ( values).shape * * b = 0 # <<<<<<<<<<<<<< * for i in range(N): * while b < ngroups - 1 and i >= bins[b]: */ __pyx_v_b = 0; /* "pandas/src/generated.pyx":5179 * * b = 0 * for i in range(N): # <<<<<<<<<<<<<< * while b < ngroups - 1 and i >= bins[b]: * b += 1 */ __pyx_t_9 = __pyx_v_N; for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_9; __pyx_t_11+=1) { __pyx_v_i = __pyx_t_11; /* "pandas/src/generated.pyx":5180 * b = 0 * for i in range(N): * while b < ngroups - 1 and i >= bins[b]: # <<<<<<<<<<<<<< * b += 1 * */ while (1) { __pyx_t_12 = ((__pyx_v_b < (__pyx_v_ngroups - 1)) != 0); if (__pyx_t_12) { __pyx_t_15 = __pyx_v_b; __pyx_t_5 = -1; if (__pyx_t_15 < 0) { __pyx_t_5 = 0; } else if (unlikely(__pyx_t_15 >= __pyx_pybuffernd_bins.diminfo[0].shape)) __pyx_t_5 = 0; if (unlikely(__pyx_t_5 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_5); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5180; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_16 = ((__pyx_v_i >= (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_bins.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_bins.diminfo[0].strides))) != 0); __pyx_t_17 = __pyx_t_16; } else { __pyx_t_17 = __pyx_t_12; } if (!__pyx_t_17) break; /* "pandas/src/generated.pyx":5181 * for i in range(N): * while b < ngroups - 1 and i >= bins[b]: * b += 1 # <<<<<<<<<<<<<< * * counts[b] += 1 */ __pyx_v_b = (__pyx_v_b + 1); } /* "pandas/src/generated.pyx":5183 * b += 1 * * counts[b] += 1 # <<<<<<<<<<<<<< * for j in range(K): * val = values[i, j] */ __pyx_t_18 = __pyx_v_b; __pyx_t_5 = -1; if (__pyx_t_18 < 0) { __pyx_t_5 = 0; } else if (unlikely(__pyx_t_18 >= __pyx_pybuffernd_counts.diminfo[0].shape)) __pyx_t_5 = 0; if (unlikely(__pyx_t_5 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_5); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5183; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_counts.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_counts.diminfo[0].strides) += 1; /* "pandas/src/generated.pyx":5184 * * counts[b] += 1 * for j in range(K): # <<<<<<<<<<<<<< * val = values[i, j] * */ __pyx_t_19 = __pyx_v_K; for (__pyx_t_20 = 0; __pyx_t_20 < __pyx_t_19; __pyx_t_20+=1) { __pyx_v_j = __pyx_t_20; /* "pandas/src/generated.pyx":5185 * counts[b] += 1 * for j in range(K): * val = values[i, j] # <<<<<<<<<<<<<< * * # not nan */ __pyx_t_21 = __pyx_v_i; __pyx_t_22 = __pyx_v_j; __pyx_t_5 = -1; if (__pyx_t_21 < 0) { __pyx_t_5 = 0; } else if (unlikely(__pyx_t_21 >= __pyx_pybuffernd_values.diminfo[0].shape)) __pyx_t_5 = 0; if (__pyx_t_22 < 0) { __pyx_t_5 = 1; } else if (unlikely(__pyx_t_22 >= __pyx_pybuffernd_values.diminfo[1].shape)) __pyx_t_5 = 1; if (unlikely(__pyx_t_5 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_5); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5185; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_val = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_22, __pyx_pybuffernd_values.diminfo[1].strides)); /* "pandas/src/generated.pyx":5188 * * # not nan * if val == val: # <<<<<<<<<<<<<< * nobs[b, j] += 1 * resx[b, j] = val */ __pyx_t_17 = ((__pyx_v_val == __pyx_v_val) != 0); if (__pyx_t_17) { /* "pandas/src/generated.pyx":5189 * # not nan * if val == val: * nobs[b, j] += 1 # <<<<<<<<<<<<<< * resx[b, j] = val * */ __pyx_t_23 = __pyx_v_b; __pyx_t_24 = __pyx_v_j; __pyx_t_5 = -1; if (__pyx_t_23 < 0) { __pyx_t_5 = 0; } else if (unlikely(__pyx_t_23 >= __pyx_pybuffernd_nobs.diminfo[0].shape)) __pyx_t_5 = 0; if (__pyx_t_24 < 0) { __pyx_t_5 = 1; } else if (unlikely(__pyx_t_24 >= __pyx_pybuffernd_nobs.diminfo[1].shape)) __pyx_t_5 = 1; if (unlikely(__pyx_t_5 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_5); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5189; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_nobs.rcbuffer->pybuffer.buf, __pyx_t_23, __pyx_pybuffernd_nobs.diminfo[0].strides, __pyx_t_24, __pyx_pybuffernd_nobs.diminfo[1].strides) += 1.0; /* "pandas/src/generated.pyx":5190 * if val == val: * nobs[b, j] += 1 * resx[b, j] = val # <<<<<<<<<<<<<< * * for i in range(ngroups): */ __pyx_t_25 = __pyx_v_b; __pyx_t_26 = __pyx_v_j; __pyx_t_5 = -1; if (__pyx_t_25 < 0) { __pyx_t_5 = 0; } else if (unlikely(__pyx_t_25 >= __pyx_pybuffernd_resx.diminfo[0].shape)) __pyx_t_5 = 0; if (__pyx_t_26 < 0) { __pyx_t_5 = 1; } else if (unlikely(__pyx_t_26 >= __pyx_pybuffernd_resx.diminfo[1].shape)) __pyx_t_5 = 1; if (unlikely(__pyx_t_5 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_5); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5190; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_resx.rcbuffer->pybuffer.buf, __pyx_t_25, __pyx_pybuffernd_resx.diminfo[0].strides, __pyx_t_26, __pyx_pybuffernd_resx.diminfo[1].strides) = __pyx_v_val; goto __pyx_L12; } __pyx_L12:; } } /* "pandas/src/generated.pyx":5192 * resx[b, j] = val * * for i in range(ngroups): # <<<<<<<<<<<<<< * for j in range(K): * if nobs[i, j] == 0: */ __pyx_t_9 = __pyx_v_ngroups; for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_9; __pyx_t_11+=1) { __pyx_v_i = __pyx_t_11; /* "pandas/src/generated.pyx":5193 * * for i in range(ngroups): * for j in range(K): # <<<<<<<<<<<<<< * if nobs[i, j] == 0: * out[i, j] = nan */ __pyx_t_19 = __pyx_v_K; for (__pyx_t_20 = 0; __pyx_t_20 < __pyx_t_19; __pyx_t_20+=1) { __pyx_v_j = __pyx_t_20; /* "pandas/src/generated.pyx":5194 * for i in range(ngroups): * for j in range(K): * if nobs[i, j] == 0: # <<<<<<<<<<<<<< * out[i, j] = nan * else: */ __pyx_t_27 = __pyx_v_i; __pyx_t_28 = __pyx_v_j; __pyx_t_5 = -1; if (__pyx_t_27 < 0) { __pyx_t_5 = 0; } else if (unlikely(__pyx_t_27 >= __pyx_pybuffernd_nobs.diminfo[0].shape)) __pyx_t_5 = 0; if (__pyx_t_28 < 0) { __pyx_t_5 = 1; } else if (unlikely(__pyx_t_28 >= __pyx_pybuffernd_nobs.diminfo[1].shape)) __pyx_t_5 = 1; if (unlikely(__pyx_t_5 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_5); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5194; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_17 = (((*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_nobs.rcbuffer->pybuffer.buf, __pyx_t_27, __pyx_pybuffernd_nobs.diminfo[0].strides, __pyx_t_28, __pyx_pybuffernd_nobs.diminfo[1].strides)) == 0.0) != 0); if (__pyx_t_17) { /* "pandas/src/generated.pyx":5195 * for j in range(K): * if nobs[i, j] == 0: * out[i, j] = nan # <<<<<<<<<<<<<< * else: * out[i, j] = resx[i, j] */ __pyx_t_29 = __pyx_v_i; __pyx_t_30 = __pyx_v_j; __pyx_t_5 = -1; if (__pyx_t_29 < 0) { __pyx_t_5 = 0; } else if (unlikely(__pyx_t_29 >= __pyx_pybuffernd_out.diminfo[0].shape)) __pyx_t_5 = 0; if (__pyx_t_30 < 0) { __pyx_t_5 = 1; } else if (unlikely(__pyx_t_30 >= __pyx_pybuffernd_out.diminfo[1].shape)) __pyx_t_5 = 1; if (unlikely(__pyx_t_5 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_5); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5195; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_29, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_30, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_6pandas_5algos_nan; goto __pyx_L17; } /*else*/ { /* "pandas/src/generated.pyx":5197 * out[i, j] = nan * else: * out[i, j] = resx[i, j] # <<<<<<<<<<<<<< * @cython.wraparound(False) * @cython.wraparound(False) */ __pyx_t_31 = __pyx_v_i; __pyx_t_32 = __pyx_v_j; __pyx_t_5 = -1; if (__pyx_t_31 < 0) { __pyx_t_5 = 0; } else if (unlikely(__pyx_t_31 >= __pyx_pybuffernd_resx.diminfo[0].shape)) __pyx_t_5 = 0; if (__pyx_t_32 < 0) { __pyx_t_5 = 1; } else if (unlikely(__pyx_t_32 >= __pyx_pybuffernd_resx.diminfo[1].shape)) __pyx_t_5 = 1; if (unlikely(__pyx_t_5 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_5); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5197; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_33 = __pyx_v_i; __pyx_t_34 = __pyx_v_j; __pyx_t_5 = -1; if (__pyx_t_33 < 0) { __pyx_t_5 = 0; } else if (unlikely(__pyx_t_33 >= __pyx_pybuffernd_out.diminfo[0].shape)) __pyx_t_5 = 0; if (__pyx_t_34 < 0) { __pyx_t_5 = 1; } else if (unlikely(__pyx_t_34 >= __pyx_pybuffernd_out.diminfo[1].shape)) __pyx_t_5 = 1; if (unlikely(__pyx_t_5 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_5); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5197; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_33, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_34, __pyx_pybuffernd_out.diminfo[1].strides) = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_resx.rcbuffer->pybuffer.buf, __pyx_t_31, __pyx_pybuffernd_resx.diminfo[0].strides, __pyx_t_32, __pyx_pybuffernd_resx.diminfo[1].strides)); } __pyx_L17:; } } /* "pandas/src/generated.pyx":5156 * @cython.wraparound(False) * @cython.wraparound(False) * def group_last_bin_float64(ndarray[float64_t, ndim=2] out, # <<<<<<<<<<<<<< * ndarray[int64_t] counts, * ndarray[float64_t, ndim=2] 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_13); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_bins.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_counts.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_resx.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.group_last_bin_float64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_bins.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_counts.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_resx.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_resx); __Pyx_XDECREF((PyObject *)__pyx_v_nobs); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":5200 * @cython.wraparound(False) * @cython.wraparound(False) * def group_last_bin_float32(ndarray[float32_t, ndim=2] out, # <<<<<<<<<<<<<< * ndarray[int64_t] counts, * ndarray[float32_t, ndim=2] values, */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_393group_last_bin_float32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6pandas_5algos_392group_last_bin_float32[] = "\n Only aggregates on axis=0\n "; static PyMethodDef __pyx_mdef_6pandas_5algos_393group_last_bin_float32 = {__Pyx_NAMESTR("group_last_bin_float32"), (PyCFunction)__pyx_pw_6pandas_5algos_393group_last_bin_float32, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_5algos_392group_last_bin_float32)}; static PyObject *__pyx_pw_6pandas_5algos_393group_last_bin_float32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_out = 0; PyArrayObject *__pyx_v_counts = 0; PyArrayObject *__pyx_v_values = 0; PyArrayObject *__pyx_v_bins = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("group_last_bin_float32 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_out,&__pyx_n_s_counts,&__pyx_n_s_values,&__pyx_n_s_bins,0}; PyObject* values[4] = {0,0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_out)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_counts)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("group_last_bin_float32", 1, 4, 4, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5200; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_values)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("group_last_bin_float32", 1, 4, 4, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5200; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_bins)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("group_last_bin_float32", 1, 4, 4, 3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5200; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "group_last_bin_float32") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5200; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 4) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[3] = PyTuple_GET_ITEM(__pyx_args, 3); } __pyx_v_out = ((PyArrayObject *)values[0]); __pyx_v_counts = ((PyArrayObject *)values[1]); __pyx_v_values = ((PyArrayObject *)values[2]); __pyx_v_bins = ((PyArrayObject *)values[3]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("group_last_bin_float32", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5200; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.group_last_bin_float32", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_5numpy_ndarray, 1, "out", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5200; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_counts), __pyx_ptype_5numpy_ndarray, 1, "counts", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5201; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5202; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_bins), __pyx_ptype_5numpy_ndarray, 1, "bins", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5203; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_392group_last_bin_float32(__pyx_self, __pyx_v_out, __pyx_v_counts, __pyx_v_values, __pyx_v_bins); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5algos_392group_last_bin_float32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_out, PyArrayObject *__pyx_v_counts, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_bins) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_N; Py_ssize_t __pyx_v_K; Py_ssize_t __pyx_v_ngroups; Py_ssize_t __pyx_v_b; __pyx_t_5numpy_float32_t __pyx_v_val; PyArrayObject *__pyx_v_resx = 0; PyArrayObject *__pyx_v_nobs = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_bins; __Pyx_Buffer __pyx_pybuffer_bins; __Pyx_LocalBuf_ND __pyx_pybuffernd_counts; __Pyx_Buffer __pyx_pybuffer_counts; __Pyx_LocalBuf_ND __pyx_pybuffernd_nobs; __Pyx_Buffer __pyx_pybuffer_nobs; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_resx; __Pyx_Buffer __pyx_pybuffer_resx; __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; PyArrayObject *__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; Py_ssize_t __pyx_t_11; int __pyx_t_12; PyObject *__pyx_t_13 = NULL; PyObject *(*__pyx_t_14)(PyObject *); Py_ssize_t __pyx_t_15; int __pyx_t_16; int __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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("group_last_bin_float32", 0); __pyx_pybuffer_resx.pybuffer.buf = NULL; __pyx_pybuffer_resx.refcount = 0; __pyx_pybuffernd_resx.data = NULL; __pyx_pybuffernd_resx.rcbuffer = &__pyx_pybuffer_resx; __pyx_pybuffer_nobs.pybuffer.buf = NULL; __pyx_pybuffer_nobs.refcount = 0; __pyx_pybuffernd_nobs.data = NULL; __pyx_pybuffernd_nobs.rcbuffer = &__pyx_pybuffer_nobs; __pyx_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; __pyx_pybuffer_counts.pybuffer.buf = NULL; __pyx_pybuffer_counts.refcount = 0; __pyx_pybuffernd_counts.data = NULL; __pyx_pybuffernd_counts.rcbuffer = &__pyx_pybuffer_counts; __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_bins.pybuffer.buf = NULL; __pyx_pybuffer_bins.refcount = 0; __pyx_pybuffernd_bins.data = NULL; __pyx_pybuffernd_bins.rcbuffer = &__pyx_pybuffer_bins; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_v_out, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5200; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; __pyx_pybuffernd_out.diminfo[1].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_out.diminfo[1].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[1]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_counts.rcbuffer->pybuffer, (PyObject*)__pyx_v_counts, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5200; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_counts.diminfo[0].strides = __pyx_pybuffernd_counts.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_counts.diminfo[0].shape = __pyx_pybuffernd_counts.rcbuffer->pybuffer.shape[0]; { __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_float32_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5200; __pyx_clineno = __LINE__; goto __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_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_bins.rcbuffer->pybuffer, (PyObject*)__pyx_v_bins, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5200; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_bins.diminfo[0].strides = __pyx_pybuffernd_bins.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_bins.diminfo[0].shape = __pyx_pybuffernd_bins.rcbuffer->pybuffer.shape[0]; /* "pandas/src/generated.pyx":5212 * ndarray[float32_t, ndim=2] resx, nobs * * nobs = np.zeros_like(out) # <<<<<<<<<<<<<< * resx = np.empty_like(out) * */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5212; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_zeros_like); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5212; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 5212; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)__pyx_v_out)); PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_out)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out)); __pyx_t_3 = PyObject_Call(__pyx_t_2, __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5212; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5212; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_4 = ((PyArrayObject *)__pyx_t_3); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer); __pyx_t_5 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer, (PyObject*)__pyx_t_4, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_nobs.rcbuffer->pybuffer, (PyObject*)__pyx_v_nobs, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_pybuffernd_nobs.diminfo[0].strides = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_nobs.diminfo[0].shape = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_nobs.diminfo[1].strides = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_nobs.diminfo[1].shape = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.shape[1]; if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5212; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_4 = 0; __pyx_v_nobs = ((PyArrayObject *)__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/generated.pyx":5213 * * nobs = np.zeros_like(out) * resx = np.empty_like(out) # <<<<<<<<<<<<<< * * if bins[len(bins) - 1] == len(values): */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5213; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_empty_like); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5213; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5213; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(((PyObject *)__pyx_v_out)); PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_v_out)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out)); __pyx_t_2 = PyObject_Call(__pyx_t_1, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5213; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5213; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_4 = ((PyArrayObject *)__pyx_t_2); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_resx.rcbuffer->pybuffer); __pyx_t_5 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_resx.rcbuffer->pybuffer, (PyObject*)__pyx_t_4, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_resx.rcbuffer->pybuffer, (PyObject*)__pyx_v_resx, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_pybuffernd_resx.diminfo[0].strides = __pyx_pybuffernd_resx.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_resx.diminfo[0].shape = __pyx_pybuffernd_resx.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_resx.diminfo[1].strides = __pyx_pybuffernd_resx.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_resx.diminfo[1].shape = __pyx_pybuffernd_resx.rcbuffer->pybuffer.shape[1]; if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5213; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_4 = 0; __pyx_v_resx = ((PyArrayObject *)__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":5215 * resx = np.empty_like(out) * * if bins[len(bins) - 1] == len(values): # <<<<<<<<<<<<<< * ngroups = len(bins) * else: */ __pyx_t_9 = PyObject_Length(((PyObject *)__pyx_v_bins)); if (unlikely(__pyx_t_9 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5215; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_10 = (__pyx_t_9 - 1); __pyx_t_5 = -1; if (__pyx_t_10 < 0) { __pyx_t_5 = 0; } else if (unlikely(__pyx_t_10 >= __pyx_pybuffernd_bins.diminfo[0].shape)) __pyx_t_5 = 0; if (unlikely(__pyx_t_5 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_5); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5215; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_11 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5215; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_12 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_bins.rcbuffer->pybuffer.buf, __pyx_t_10, __pyx_pybuffernd_bins.diminfo[0].strides)) == __pyx_t_11) != 0); if (__pyx_t_12) { /* "pandas/src/generated.pyx":5216 * * if bins[len(bins) - 1] == len(values): * ngroups = len(bins) # <<<<<<<<<<<<<< * else: * ngroups = len(bins) + 1 */ __pyx_t_11 = PyObject_Length(((PyObject *)__pyx_v_bins)); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5216; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_ngroups = __pyx_t_11; goto __pyx_L3; } /*else*/ { /* "pandas/src/generated.pyx":5218 * ngroups = len(bins) * else: * ngroups = len(bins) + 1 # <<<<<<<<<<<<<< * * N, K = ( values).shape */ __pyx_t_11 = PyObject_Length(((PyObject *)__pyx_v_bins)); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5218; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_ngroups = (__pyx_t_11 + 1); } __pyx_L3:; /* "pandas/src/generated.pyx":5220 * ngroups = len(bins) + 1 * * N, K = ( values).shape # <<<<<<<<<<<<<< * * b = 0 */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_values), __pyx_n_s_shape); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5220; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if ((likely(PyTuple_CheckExact(__pyx_t_2))) || (PyList_CheckExact(__pyx_t_2))) { PyObject* sequence = __pyx_t_2; #if CYTHON_COMPILING_IN_CPYTHON Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5220; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_1 = PyTuple_GET_ITEM(sequence, 1); } else { __pyx_t_3 = PyList_GET_ITEM(sequence, 0); __pyx_t_1 = PyList_GET_ITEM(sequence, 1); } __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(__pyx_t_1); #else __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5220; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5220; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); #endif __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } else { Py_ssize_t index = -1; __pyx_t_13 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5220; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_14 = Py_TYPE(__pyx_t_13)->tp_iternext; index = 0; __pyx_t_3 = __pyx_t_14(__pyx_t_13); if (unlikely(!__pyx_t_3)) goto __pyx_L4_unpacking_failed; __Pyx_GOTREF(__pyx_t_3); index = 1; __pyx_t_1 = __pyx_t_14(__pyx_t_13); if (unlikely(!__pyx_t_1)) goto __pyx_L4_unpacking_failed; __Pyx_GOTREF(__pyx_t_1); if (__Pyx_IternextUnpackEndCheck(__pyx_t_14(__pyx_t_13), 2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5220; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_14 = NULL; __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; goto __pyx_L5_unpacking_done; __pyx_L4_unpacking_failed:; __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_14 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5220; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_L5_unpacking_done:; } __pyx_t_11 = __Pyx_PyIndex_AsSsize_t(__pyx_t_3); if (unlikely((__pyx_t_11 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5220; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_9 = __Pyx_PyIndex_AsSsize_t(__pyx_t_1); if (unlikely((__pyx_t_9 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5220; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_N = __pyx_t_11; __pyx_v_K = __pyx_t_9; /* "pandas/src/generated.pyx":5222 * N, K = ( values).shape * * b = 0 # <<<<<<<<<<<<<< * for i in range(N): * while b < ngroups - 1 and i >= bins[b]: */ __pyx_v_b = 0; /* "pandas/src/generated.pyx":5223 * * b = 0 * for i in range(N): # <<<<<<<<<<<<<< * while b < ngroups - 1 and i >= bins[b]: * b += 1 */ __pyx_t_9 = __pyx_v_N; for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_9; __pyx_t_11+=1) { __pyx_v_i = __pyx_t_11; /* "pandas/src/generated.pyx":5224 * b = 0 * for i in range(N): * while b < ngroups - 1 and i >= bins[b]: # <<<<<<<<<<<<<< * b += 1 * */ while (1) { __pyx_t_12 = ((__pyx_v_b < (__pyx_v_ngroups - 1)) != 0); if (__pyx_t_12) { __pyx_t_15 = __pyx_v_b; __pyx_t_5 = -1; if (__pyx_t_15 < 0) { __pyx_t_5 = 0; } else if (unlikely(__pyx_t_15 >= __pyx_pybuffernd_bins.diminfo[0].shape)) __pyx_t_5 = 0; if (unlikely(__pyx_t_5 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_5); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5224; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_16 = ((__pyx_v_i >= (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_bins.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_bins.diminfo[0].strides))) != 0); __pyx_t_17 = __pyx_t_16; } else { __pyx_t_17 = __pyx_t_12; } if (!__pyx_t_17) break; /* "pandas/src/generated.pyx":5225 * for i in range(N): * while b < ngroups - 1 and i >= bins[b]: * b += 1 # <<<<<<<<<<<<<< * * counts[b] += 1 */ __pyx_v_b = (__pyx_v_b + 1); } /* "pandas/src/generated.pyx":5227 * b += 1 * * counts[b] += 1 # <<<<<<<<<<<<<< * for j in range(K): * val = values[i, j] */ __pyx_t_18 = __pyx_v_b; __pyx_t_5 = -1; if (__pyx_t_18 < 0) { __pyx_t_5 = 0; } else if (unlikely(__pyx_t_18 >= __pyx_pybuffernd_counts.diminfo[0].shape)) __pyx_t_5 = 0; if (unlikely(__pyx_t_5 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_5); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5227; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_counts.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_counts.diminfo[0].strides) += 1; /* "pandas/src/generated.pyx":5228 * * counts[b] += 1 * for j in range(K): # <<<<<<<<<<<<<< * val = values[i, j] * */ __pyx_t_19 = __pyx_v_K; for (__pyx_t_20 = 0; __pyx_t_20 < __pyx_t_19; __pyx_t_20+=1) { __pyx_v_j = __pyx_t_20; /* "pandas/src/generated.pyx":5229 * counts[b] += 1 * for j in range(K): * val = values[i, j] # <<<<<<<<<<<<<< * * # not nan */ __pyx_t_21 = __pyx_v_i; __pyx_t_22 = __pyx_v_j; __pyx_t_5 = -1; if (__pyx_t_21 < 0) { __pyx_t_5 = 0; } else if (unlikely(__pyx_t_21 >= __pyx_pybuffernd_values.diminfo[0].shape)) __pyx_t_5 = 0; if (__pyx_t_22 < 0) { __pyx_t_5 = 1; } else if (unlikely(__pyx_t_22 >= __pyx_pybuffernd_values.diminfo[1].shape)) __pyx_t_5 = 1; if (unlikely(__pyx_t_5 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_5); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5229; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_val = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_22, __pyx_pybuffernd_values.diminfo[1].strides)); /* "pandas/src/generated.pyx":5232 * * # not nan * if val == val: # <<<<<<<<<<<<<< * nobs[b, j] += 1 * resx[b, j] = val */ __pyx_t_17 = ((__pyx_v_val == __pyx_v_val) != 0); if (__pyx_t_17) { /* "pandas/src/generated.pyx":5233 * # not nan * if val == val: * nobs[b, j] += 1 # <<<<<<<<<<<<<< * resx[b, j] = val * */ __pyx_t_23 = __pyx_v_b; __pyx_t_24 = __pyx_v_j; __pyx_t_5 = -1; if (__pyx_t_23 < 0) { __pyx_t_5 = 0; } else if (unlikely(__pyx_t_23 >= __pyx_pybuffernd_nobs.diminfo[0].shape)) __pyx_t_5 = 0; if (__pyx_t_24 < 0) { __pyx_t_5 = 1; } else if (unlikely(__pyx_t_24 >= __pyx_pybuffernd_nobs.diminfo[1].shape)) __pyx_t_5 = 1; if (unlikely(__pyx_t_5 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_5); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5233; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_nobs.rcbuffer->pybuffer.buf, __pyx_t_23, __pyx_pybuffernd_nobs.diminfo[0].strides, __pyx_t_24, __pyx_pybuffernd_nobs.diminfo[1].strides) += 1.0; /* "pandas/src/generated.pyx":5234 * if val == val: * nobs[b, j] += 1 * resx[b, j] = val # <<<<<<<<<<<<<< * * for i in range(ngroups): */ __pyx_t_25 = __pyx_v_b; __pyx_t_26 = __pyx_v_j; __pyx_t_5 = -1; if (__pyx_t_25 < 0) { __pyx_t_5 = 0; } else if (unlikely(__pyx_t_25 >= __pyx_pybuffernd_resx.diminfo[0].shape)) __pyx_t_5 = 0; if (__pyx_t_26 < 0) { __pyx_t_5 = 1; } else if (unlikely(__pyx_t_26 >= __pyx_pybuffernd_resx.diminfo[1].shape)) __pyx_t_5 = 1; if (unlikely(__pyx_t_5 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_5); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5234; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_resx.rcbuffer->pybuffer.buf, __pyx_t_25, __pyx_pybuffernd_resx.diminfo[0].strides, __pyx_t_26, __pyx_pybuffernd_resx.diminfo[1].strides) = __pyx_v_val; goto __pyx_L12; } __pyx_L12:; } } /* "pandas/src/generated.pyx":5236 * resx[b, j] = val * * for i in range(ngroups): # <<<<<<<<<<<<<< * for j in range(K): * if nobs[i, j] == 0: */ __pyx_t_9 = __pyx_v_ngroups; for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_9; __pyx_t_11+=1) { __pyx_v_i = __pyx_t_11; /* "pandas/src/generated.pyx":5237 * * for i in range(ngroups): * for j in range(K): # <<<<<<<<<<<<<< * if nobs[i, j] == 0: * out[i, j] = nan */ __pyx_t_19 = __pyx_v_K; for (__pyx_t_20 = 0; __pyx_t_20 < __pyx_t_19; __pyx_t_20+=1) { __pyx_v_j = __pyx_t_20; /* "pandas/src/generated.pyx":5238 * for i in range(ngroups): * for j in range(K): * if nobs[i, j] == 0: # <<<<<<<<<<<<<< * out[i, j] = nan * else: */ __pyx_t_27 = __pyx_v_i; __pyx_t_28 = __pyx_v_j; __pyx_t_5 = -1; if (__pyx_t_27 < 0) { __pyx_t_5 = 0; } else if (unlikely(__pyx_t_27 >= __pyx_pybuffernd_nobs.diminfo[0].shape)) __pyx_t_5 = 0; if (__pyx_t_28 < 0) { __pyx_t_5 = 1; } else if (unlikely(__pyx_t_28 >= __pyx_pybuffernd_nobs.diminfo[1].shape)) __pyx_t_5 = 1; if (unlikely(__pyx_t_5 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_5); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5238; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_17 = (((*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_nobs.rcbuffer->pybuffer.buf, __pyx_t_27, __pyx_pybuffernd_nobs.diminfo[0].strides, __pyx_t_28, __pyx_pybuffernd_nobs.diminfo[1].strides)) == 0.0) != 0); if (__pyx_t_17) { /* "pandas/src/generated.pyx":5239 * for j in range(K): * if nobs[i, j] == 0: * out[i, j] = nan # <<<<<<<<<<<<<< * else: * out[i, j] = resx[i, j] */ __pyx_t_29 = __pyx_v_i; __pyx_t_30 = __pyx_v_j; __pyx_t_5 = -1; if (__pyx_t_29 < 0) { __pyx_t_5 = 0; } else if (unlikely(__pyx_t_29 >= __pyx_pybuffernd_out.diminfo[0].shape)) __pyx_t_5 = 0; if (__pyx_t_30 < 0) { __pyx_t_5 = 1; } else if (unlikely(__pyx_t_30 >= __pyx_pybuffernd_out.diminfo[1].shape)) __pyx_t_5 = 1; if (unlikely(__pyx_t_5 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_5); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5239; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_29, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_30, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_6pandas_5algos_nan; goto __pyx_L17; } /*else*/ { /* "pandas/src/generated.pyx":5241 * out[i, j] = nan * else: * out[i, j] = resx[i, j] # <<<<<<<<<<<<<< * * @cython.boundscheck(False) */ __pyx_t_31 = __pyx_v_i; __pyx_t_32 = __pyx_v_j; __pyx_t_5 = -1; if (__pyx_t_31 < 0) { __pyx_t_5 = 0; } else if (unlikely(__pyx_t_31 >= __pyx_pybuffernd_resx.diminfo[0].shape)) __pyx_t_5 = 0; if (__pyx_t_32 < 0) { __pyx_t_5 = 1; } else if (unlikely(__pyx_t_32 >= __pyx_pybuffernd_resx.diminfo[1].shape)) __pyx_t_5 = 1; if (unlikely(__pyx_t_5 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_5); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5241; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_33 = __pyx_v_i; __pyx_t_34 = __pyx_v_j; __pyx_t_5 = -1; if (__pyx_t_33 < 0) { __pyx_t_5 = 0; } else if (unlikely(__pyx_t_33 >= __pyx_pybuffernd_out.diminfo[0].shape)) __pyx_t_5 = 0; if (__pyx_t_34 < 0) { __pyx_t_5 = 1; } else if (unlikely(__pyx_t_34 >= __pyx_pybuffernd_out.diminfo[1].shape)) __pyx_t_5 = 1; if (unlikely(__pyx_t_5 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_5); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5241; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_33, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_34, __pyx_pybuffernd_out.diminfo[1].strides) = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_resx.rcbuffer->pybuffer.buf, __pyx_t_31, __pyx_pybuffernd_resx.diminfo[0].strides, __pyx_t_32, __pyx_pybuffernd_resx.diminfo[1].strides)); } __pyx_L17:; } } /* "pandas/src/generated.pyx":5200 * @cython.wraparound(False) * @cython.wraparound(False) * def group_last_bin_float32(ndarray[float32_t, ndim=2] out, # <<<<<<<<<<<<<< * ndarray[int64_t] counts, * ndarray[float32_t, ndim=2] 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_13); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_bins.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_counts.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_resx.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.group_last_bin_float32", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_bins.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_counts.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_resx.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_resx); __Pyx_XDECREF((PyObject *)__pyx_v_nobs); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":5245 * @cython.boundscheck(False) * @cython.wraparound(False) * def group_nth_float64(ndarray[float64_t, ndim=2] out, # <<<<<<<<<<<<<< * ndarray[int64_t] counts, * ndarray[float64_t, ndim=2] values, */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_395group_nth_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6pandas_5algos_394group_nth_float64[] = "\n Only aggregates on axis=0\n "; static PyMethodDef __pyx_mdef_6pandas_5algos_395group_nth_float64 = {__Pyx_NAMESTR("group_nth_float64"), (PyCFunction)__pyx_pw_6pandas_5algos_395group_nth_float64, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_5algos_394group_nth_float64)}; static PyObject *__pyx_pw_6pandas_5algos_395group_nth_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_out = 0; PyArrayObject *__pyx_v_counts = 0; PyArrayObject *__pyx_v_values = 0; PyArrayObject *__pyx_v_labels = 0; __pyx_t_5numpy_int64_t __pyx_v_rank; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("group_nth_float64 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_out,&__pyx_n_s_counts,&__pyx_n_s_values,&__pyx_n_s_labels,&__pyx_n_s_rank,0}; PyObject* values[5] = {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 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_out)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_counts)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("group_nth_float64", 1, 5, 5, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5245; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_values)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("group_nth_float64", 1, 5, 5, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5245; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_labels)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("group_nth_float64", 1, 5, 5, 3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5245; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 4: if (likely((values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_rank)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("group_nth_float64", 1, 5, 5, 4); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5245; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "group_nth_float64") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5245; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 5) { 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); } __pyx_v_out = ((PyArrayObject *)values[0]); __pyx_v_counts = ((PyArrayObject *)values[1]); __pyx_v_values = ((PyArrayObject *)values[2]); __pyx_v_labels = ((PyArrayObject *)values[3]); __pyx_v_rank = __Pyx_PyInt_As_npy_int64(values[4]); if (unlikely((__pyx_v_rank == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5248; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("group_nth_float64", 1, 5, 5, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5245; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.group_nth_float64", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_5numpy_ndarray, 1, "out", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5245; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_counts), __pyx_ptype_5numpy_ndarray, 1, "counts", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5246; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5247; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_labels), __pyx_ptype_5numpy_ndarray, 1, "labels", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5248; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_394group_nth_float64(__pyx_self, __pyx_v_out, __pyx_v_counts, __pyx_v_values, __pyx_v_labels, __pyx_v_rank); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5algos_394group_nth_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_out, PyArrayObject *__pyx_v_counts, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_labels, __pyx_t_5numpy_int64_t __pyx_v_rank) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_N; Py_ssize_t __pyx_v_K; Py_ssize_t __pyx_v_lab; __pyx_t_5numpy_float64_t __pyx_v_val; PyArrayObject *__pyx_v_resx = 0; PyArrayObject *__pyx_v_nobs = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_counts; __Pyx_Buffer __pyx_pybuffer_counts; __Pyx_LocalBuf_ND __pyx_pybuffernd_labels; __Pyx_Buffer __pyx_pybuffer_labels; __Pyx_LocalBuf_ND __pyx_pybuffernd_nobs; __Pyx_Buffer __pyx_pybuffer_nobs; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_resx; __Pyx_Buffer __pyx_pybuffer_resx; __Pyx_LocalBuf_ND __pyx_pybuffernd_values; __Pyx_Buffer __pyx_pybuffer_values; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; Py_ssize_t __pyx_t_2; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; 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; PyArrayObject *__pyx_t_14 = NULL; PyObject *(*__pyx_t_15)(PyObject *); 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; 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("group_nth_float64", 0); __pyx_pybuffer_resx.pybuffer.buf = NULL; __pyx_pybuffer_resx.refcount = 0; __pyx_pybuffernd_resx.data = NULL; __pyx_pybuffernd_resx.rcbuffer = &__pyx_pybuffer_resx; __pyx_pybuffer_nobs.pybuffer.buf = NULL; __pyx_pybuffer_nobs.refcount = 0; __pyx_pybuffernd_nobs.data = NULL; __pyx_pybuffernd_nobs.rcbuffer = &__pyx_pybuffer_nobs; __pyx_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; __pyx_pybuffer_counts.pybuffer.buf = NULL; __pyx_pybuffer_counts.refcount = 0; __pyx_pybuffernd_counts.data = NULL; __pyx_pybuffernd_counts.rcbuffer = &__pyx_pybuffer_counts; __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_labels.pybuffer.buf = NULL; __pyx_pybuffer_labels.refcount = 0; __pyx_pybuffernd_labels.data = NULL; __pyx_pybuffernd_labels.rcbuffer = &__pyx_pybuffer_labels; { __Pyx_BufFmt_StackElem __pyx_stack[1]; 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, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5245; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; __pyx_pybuffernd_out.diminfo[1].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_out.diminfo[1].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[1]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_counts.rcbuffer->pybuffer, (PyObject*)__pyx_v_counts, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5245; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_counts.diminfo[0].strides = __pyx_pybuffernd_counts.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_counts.diminfo[0].shape = __pyx_pybuffernd_counts.rcbuffer->pybuffer.shape[0]; { __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, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5245; __pyx_clineno = __LINE__; goto __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_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_labels.rcbuffer->pybuffer, (PyObject*)__pyx_v_labels, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5245; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_labels.diminfo[0].strides = __pyx_pybuffernd_labels.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_labels.diminfo[0].shape = __pyx_pybuffernd_labels.rcbuffer->pybuffer.shape[0]; /* "pandas/src/generated.pyx":5258 * ndarray[int64_t, ndim=2] nobs * * if not len(values) == len(labels): # <<<<<<<<<<<<<< * raise AssertionError("len(index) != len(labels)") * */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5258; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_2 = PyObject_Length(((PyObject *)__pyx_v_labels)); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5258; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_3 = ((!((__pyx_t_1 == __pyx_t_2) != 0)) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":5259 * * if not len(values) == len(labels): * raise AssertionError("len(index) != len(labels)") # <<<<<<<<<<<<<< * * nobs = np.zeros(( out).shape, dtype=np.int64) */ __pyx_t_4 = PyObject_Call(__pyx_builtin_AssertionError, __pyx_tuple__179, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5259; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 5259; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } /* "pandas/src/generated.pyx":5261 * raise AssertionError("len(index) != len(labels)") * * nobs = np.zeros(( out).shape, dtype=np.int64) # <<<<<<<<<<<<<< * resx = np.empty_like(out) * */ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5261; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_zeros); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5261; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_out), __pyx_n_s_shape); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5261; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5261; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyDict_New(); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5261; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5261; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_int64); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5261; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_dtype, __pyx_t_8) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5261; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_8 = PyObject_Call(__pyx_t_5, __pyx_t_6, __pyx_t_4); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5261; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (!(likely(((__pyx_t_8) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_8, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5261; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_9 = ((PyArrayObject *)__pyx_t_8); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer); __pyx_t_10 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer, (PyObject*)__pyx_t_9, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_nobs.rcbuffer->pybuffer, (PyObject*)__pyx_v_nobs, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_pybuffernd_nobs.diminfo[0].strides = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_nobs.diminfo[0].shape = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_nobs.diminfo[1].strides = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_nobs.diminfo[1].shape = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.shape[1]; if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5261; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_9 = 0; __pyx_v_nobs = ((PyArrayObject *)__pyx_t_8); __pyx_t_8 = 0; /* "pandas/src/generated.pyx":5262 * * nobs = np.zeros(( out).shape, dtype=np.int64) * resx = np.empty_like(out) # <<<<<<<<<<<<<< * * N, K = ( values).shape */ __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5262; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_empty_like); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5262; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5262; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_INCREF(((PyObject *)__pyx_v_out)); PyTuple_SET_ITEM(__pyx_t_8, 0, ((PyObject *)__pyx_v_out)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out)); __pyx_t_6 = PyObject_Call(__pyx_t_4, __pyx_t_8, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5262; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5262; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_14 = ((PyArrayObject *)__pyx_t_6); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_resx.rcbuffer->pybuffer); __pyx_t_10 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_resx.rcbuffer->pybuffer, (PyObject*)__pyx_t_14, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_resx.rcbuffer->pybuffer, (PyObject*)__pyx_v_resx, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_pybuffernd_resx.diminfo[0].strides = __pyx_pybuffernd_resx.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_resx.diminfo[0].shape = __pyx_pybuffernd_resx.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_resx.diminfo[1].strides = __pyx_pybuffernd_resx.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_resx.diminfo[1].shape = __pyx_pybuffernd_resx.rcbuffer->pybuffer.shape[1]; if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5262; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_14 = 0; __pyx_v_resx = ((PyArrayObject *)__pyx_t_6); __pyx_t_6 = 0; /* "pandas/src/generated.pyx":5264 * resx = np.empty_like(out) * * N, K = ( values).shape # <<<<<<<<<<<<<< * * for i in range(N): */ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_values), __pyx_n_s_shape); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5264; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); if ((likely(PyTuple_CheckExact(__pyx_t_6))) || (PyList_CheckExact(__pyx_t_6))) { PyObject* sequence = __pyx_t_6; #if CYTHON_COMPILING_IN_CPYTHON Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5264; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_8 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_4 = PyTuple_GET_ITEM(sequence, 1); } else { __pyx_t_8 = PyList_GET_ITEM(sequence, 0); __pyx_t_4 = PyList_GET_ITEM(sequence, 1); } __Pyx_INCREF(__pyx_t_8); __Pyx_INCREF(__pyx_t_4); #else __pyx_t_8 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5264; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5264; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); #endif __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } else { Py_ssize_t index = -1; __pyx_t_5 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5264; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_15 = Py_TYPE(__pyx_t_5)->tp_iternext; index = 0; __pyx_t_8 = __pyx_t_15(__pyx_t_5); if (unlikely(!__pyx_t_8)) goto __pyx_L4_unpacking_failed; __Pyx_GOTREF(__pyx_t_8); index = 1; __pyx_t_4 = __pyx_t_15(__pyx_t_5); if (unlikely(!__pyx_t_4)) goto __pyx_L4_unpacking_failed; __Pyx_GOTREF(__pyx_t_4); if (__Pyx_IternextUnpackEndCheck(__pyx_t_15(__pyx_t_5), 2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5264; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_15 = NULL; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; goto __pyx_L5_unpacking_done; __pyx_L4_unpacking_failed:; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_15 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5264; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_L5_unpacking_done:; } __pyx_t_2 = __Pyx_PyIndex_AsSsize_t(__pyx_t_8); if (unlikely((__pyx_t_2 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5264; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_1 = __Pyx_PyIndex_AsSsize_t(__pyx_t_4); if (unlikely((__pyx_t_1 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5264; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_N = __pyx_t_2; __pyx_v_K = __pyx_t_1; /* "pandas/src/generated.pyx":5266 * N, K = ( values).shape * * for i in range(N): # <<<<<<<<<<<<<< * lab = labels[i] * if lab < 0: */ __pyx_t_1 = __pyx_v_N; for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) { __pyx_v_i = __pyx_t_2; /* "pandas/src/generated.pyx":5267 * * for i in range(N): * lab = labels[i] # <<<<<<<<<<<<<< * if lab < 0: * continue */ __pyx_t_16 = __pyx_v_i; __pyx_v_lab = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_labels.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_labels.diminfo[0].strides)); /* "pandas/src/generated.pyx":5268 * for i in range(N): * lab = labels[i] * if lab < 0: # <<<<<<<<<<<<<< * continue * */ __pyx_t_3 = ((__pyx_v_lab < 0) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":5269 * lab = labels[i] * if lab < 0: * continue # <<<<<<<<<<<<<< * * counts[lab] += 1 */ goto __pyx_L6_continue; } /* "pandas/src/generated.pyx":5271 * continue * * counts[lab] += 1 # <<<<<<<<<<<<<< * for j in range(K): * val = values[i, j] */ __pyx_t_17 = __pyx_v_lab; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_counts.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_counts.diminfo[0].strides) += 1; /* "pandas/src/generated.pyx":5272 * * counts[lab] += 1 * for j in range(K): # <<<<<<<<<<<<<< * val = values[i, j] * */ __pyx_t_18 = __pyx_v_K; for (__pyx_t_19 = 0; __pyx_t_19 < __pyx_t_18; __pyx_t_19+=1) { __pyx_v_j = __pyx_t_19; /* "pandas/src/generated.pyx":5273 * counts[lab] += 1 * for j in range(K): * val = values[i, j] # <<<<<<<<<<<<<< * * # not nan */ __pyx_t_20 = __pyx_v_i; __pyx_t_21 = __pyx_v_j; __pyx_v_val = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_21, __pyx_pybuffernd_values.diminfo[1].strides)); /* "pandas/src/generated.pyx":5276 * * # not nan * if val == val: # <<<<<<<<<<<<<< * nobs[lab, j] += 1 * if nobs[lab, j] == rank: */ __pyx_t_3 = ((__pyx_v_val == __pyx_v_val) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":5277 * # not nan * if val == val: * nobs[lab, j] += 1 # <<<<<<<<<<<<<< * if nobs[lab, j] == rank: * resx[lab, j] = val */ __pyx_t_22 = __pyx_v_lab; __pyx_t_23 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_nobs.rcbuffer->pybuffer.buf, __pyx_t_22, __pyx_pybuffernd_nobs.diminfo[0].strides, __pyx_t_23, __pyx_pybuffernd_nobs.diminfo[1].strides) += 1; /* "pandas/src/generated.pyx":5278 * if val == val: * nobs[lab, j] += 1 * if nobs[lab, j] == rank: # <<<<<<<<<<<<<< * resx[lab, j] = val * */ __pyx_t_24 = __pyx_v_lab; __pyx_t_25 = __pyx_v_j; __pyx_t_3 = (((*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_nobs.rcbuffer->pybuffer.buf, __pyx_t_24, __pyx_pybuffernd_nobs.diminfo[0].strides, __pyx_t_25, __pyx_pybuffernd_nobs.diminfo[1].strides)) == __pyx_v_rank) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":5279 * nobs[lab, j] += 1 * if nobs[lab, j] == rank: * resx[lab, j] = val # <<<<<<<<<<<<<< * * for i in range(len(counts)): */ __pyx_t_26 = __pyx_v_lab; __pyx_t_27 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_resx.rcbuffer->pybuffer.buf, __pyx_t_26, __pyx_pybuffernd_resx.diminfo[0].strides, __pyx_t_27, __pyx_pybuffernd_resx.diminfo[1].strides) = __pyx_v_val; goto __pyx_L12; } __pyx_L12:; goto __pyx_L11; } __pyx_L11:; } __pyx_L6_continue:; } /* "pandas/src/generated.pyx":5281 * resx[lab, j] = val * * for i in range(len(counts)): # <<<<<<<<<<<<<< * for j in range(K): * if nobs[i, j] == 0: */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_counts)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5281; __pyx_clineno = __LINE__; goto __pyx_L1_error;} for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) { __pyx_v_i = __pyx_t_2; /* "pandas/src/generated.pyx":5282 * * for i in range(len(counts)): * for j in range(K): # <<<<<<<<<<<<<< * if nobs[i, j] == 0: * out[i, j] = nan */ __pyx_t_18 = __pyx_v_K; for (__pyx_t_19 = 0; __pyx_t_19 < __pyx_t_18; __pyx_t_19+=1) { __pyx_v_j = __pyx_t_19; /* "pandas/src/generated.pyx":5283 * for i in range(len(counts)): * for j in range(K): * if nobs[i, j] == 0: # <<<<<<<<<<<<<< * out[i, j] = nan * else: */ __pyx_t_28 = __pyx_v_i; __pyx_t_29 = __pyx_v_j; __pyx_t_3 = (((*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_nobs.rcbuffer->pybuffer.buf, __pyx_t_28, __pyx_pybuffernd_nobs.diminfo[0].strides, __pyx_t_29, __pyx_pybuffernd_nobs.diminfo[1].strides)) == 0) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":5284 * for j in range(K): * if nobs[i, j] == 0: * out[i, j] = nan # <<<<<<<<<<<<<< * else: * out[i, j] = resx[i, j] */ __pyx_t_30 = __pyx_v_i; __pyx_t_31 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_30, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_31, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_6pandas_5algos_nan; goto __pyx_L17; } /*else*/ { /* "pandas/src/generated.pyx":5286 * out[i, j] = nan * else: * out[i, j] = resx[i, j] # <<<<<<<<<<<<<< * @cython.boundscheck(False) * @cython.wraparound(False) */ __pyx_t_32 = __pyx_v_i; __pyx_t_33 = __pyx_v_j; __pyx_t_34 = __pyx_v_i; __pyx_t_35 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_34, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_35, __pyx_pybuffernd_out.diminfo[1].strides) = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_resx.rcbuffer->pybuffer.buf, __pyx_t_32, __pyx_pybuffernd_resx.diminfo[0].strides, __pyx_t_33, __pyx_pybuffernd_resx.diminfo[1].strides)); } __pyx_L17:; } } /* "pandas/src/generated.pyx":5245 * @cython.boundscheck(False) * @cython.wraparound(False) * def group_nth_float64(ndarray[float64_t, ndim=2] out, # <<<<<<<<<<<<<< * ndarray[int64_t] counts, * ndarray[float64_t, ndim=2] values, */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_counts.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_labels.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_resx.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.group_nth_float64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_counts.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_labels.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_resx.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_resx); __Pyx_XDECREF((PyObject *)__pyx_v_nobs); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":5289 * @cython.boundscheck(False) * @cython.wraparound(False) * def group_nth_float32(ndarray[float32_t, ndim=2] out, # <<<<<<<<<<<<<< * ndarray[int64_t] counts, * ndarray[float32_t, ndim=2] values, */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_397group_nth_float32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6pandas_5algos_396group_nth_float32[] = "\n Only aggregates on axis=0\n "; static PyMethodDef __pyx_mdef_6pandas_5algos_397group_nth_float32 = {__Pyx_NAMESTR("group_nth_float32"), (PyCFunction)__pyx_pw_6pandas_5algos_397group_nth_float32, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_5algos_396group_nth_float32)}; static PyObject *__pyx_pw_6pandas_5algos_397group_nth_float32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_out = 0; PyArrayObject *__pyx_v_counts = 0; PyArrayObject *__pyx_v_values = 0; PyArrayObject *__pyx_v_labels = 0; __pyx_t_5numpy_int64_t __pyx_v_rank; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("group_nth_float32 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_out,&__pyx_n_s_counts,&__pyx_n_s_values,&__pyx_n_s_labels,&__pyx_n_s_rank,0}; PyObject* values[5] = {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 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_out)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_counts)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("group_nth_float32", 1, 5, 5, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5289; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_values)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("group_nth_float32", 1, 5, 5, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5289; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_labels)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("group_nth_float32", 1, 5, 5, 3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5289; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 4: if (likely((values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_rank)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("group_nth_float32", 1, 5, 5, 4); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5289; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "group_nth_float32") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5289; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 5) { 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); } __pyx_v_out = ((PyArrayObject *)values[0]); __pyx_v_counts = ((PyArrayObject *)values[1]); __pyx_v_values = ((PyArrayObject *)values[2]); __pyx_v_labels = ((PyArrayObject *)values[3]); __pyx_v_rank = __Pyx_PyInt_As_npy_int64(values[4]); if (unlikely((__pyx_v_rank == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5292; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("group_nth_float32", 1, 5, 5, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5289; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.group_nth_float32", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_5numpy_ndarray, 1, "out", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5289; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_counts), __pyx_ptype_5numpy_ndarray, 1, "counts", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5290; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5291; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_labels), __pyx_ptype_5numpy_ndarray, 1, "labels", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5292; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_396group_nth_float32(__pyx_self, __pyx_v_out, __pyx_v_counts, __pyx_v_values, __pyx_v_labels, __pyx_v_rank); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5algos_396group_nth_float32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_out, PyArrayObject *__pyx_v_counts, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_labels, __pyx_t_5numpy_int64_t __pyx_v_rank) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_N; Py_ssize_t __pyx_v_K; Py_ssize_t __pyx_v_lab; __pyx_t_5numpy_float32_t __pyx_v_val; PyArrayObject *__pyx_v_resx = 0; PyArrayObject *__pyx_v_nobs = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_counts; __Pyx_Buffer __pyx_pybuffer_counts; __Pyx_LocalBuf_ND __pyx_pybuffernd_labels; __Pyx_Buffer __pyx_pybuffer_labels; __Pyx_LocalBuf_ND __pyx_pybuffernd_nobs; __Pyx_Buffer __pyx_pybuffer_nobs; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_resx; __Pyx_Buffer __pyx_pybuffer_resx; __Pyx_LocalBuf_ND __pyx_pybuffernd_values; __Pyx_Buffer __pyx_pybuffer_values; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; Py_ssize_t __pyx_t_2; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; 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; PyArrayObject *__pyx_t_14 = NULL; PyObject *(*__pyx_t_15)(PyObject *); 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; 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("group_nth_float32", 0); __pyx_pybuffer_resx.pybuffer.buf = NULL; __pyx_pybuffer_resx.refcount = 0; __pyx_pybuffernd_resx.data = NULL; __pyx_pybuffernd_resx.rcbuffer = &__pyx_pybuffer_resx; __pyx_pybuffer_nobs.pybuffer.buf = NULL; __pyx_pybuffer_nobs.refcount = 0; __pyx_pybuffernd_nobs.data = NULL; __pyx_pybuffernd_nobs.rcbuffer = &__pyx_pybuffer_nobs; __pyx_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; __pyx_pybuffer_counts.pybuffer.buf = NULL; __pyx_pybuffer_counts.refcount = 0; __pyx_pybuffernd_counts.data = NULL; __pyx_pybuffernd_counts.rcbuffer = &__pyx_pybuffer_counts; __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_labels.pybuffer.buf = NULL; __pyx_pybuffer_labels.refcount = 0; __pyx_pybuffernd_labels.data = NULL; __pyx_pybuffernd_labels.rcbuffer = &__pyx_pybuffer_labels; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_v_out, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5289; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; __pyx_pybuffernd_out.diminfo[1].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_out.diminfo[1].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[1]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_counts.rcbuffer->pybuffer, (PyObject*)__pyx_v_counts, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5289; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_counts.diminfo[0].strides = __pyx_pybuffernd_counts.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_counts.diminfo[0].shape = __pyx_pybuffernd_counts.rcbuffer->pybuffer.shape[0]; { __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_float32_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5289; __pyx_clineno = __LINE__; goto __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_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_labels.rcbuffer->pybuffer, (PyObject*)__pyx_v_labels, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5289; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_labels.diminfo[0].strides = __pyx_pybuffernd_labels.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_labels.diminfo[0].shape = __pyx_pybuffernd_labels.rcbuffer->pybuffer.shape[0]; /* "pandas/src/generated.pyx":5302 * ndarray[int64_t, ndim=2] nobs * * if not len(values) == len(labels): # <<<<<<<<<<<<<< * raise AssertionError("len(index) != len(labels)") * */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5302; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_2 = PyObject_Length(((PyObject *)__pyx_v_labels)); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5302; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_3 = ((!((__pyx_t_1 == __pyx_t_2) != 0)) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":5303 * * if not len(values) == len(labels): * raise AssertionError("len(index) != len(labels)") # <<<<<<<<<<<<<< * * nobs = np.zeros(( out).shape, dtype=np.int64) */ __pyx_t_4 = PyObject_Call(__pyx_builtin_AssertionError, __pyx_tuple__180, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5303; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 5303; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } /* "pandas/src/generated.pyx":5305 * raise AssertionError("len(index) != len(labels)") * * nobs = np.zeros(( out).shape, dtype=np.int64) # <<<<<<<<<<<<<< * resx = np.empty_like(out) * */ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5305; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_zeros); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5305; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_out), __pyx_n_s_shape); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5305; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5305; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyDict_New(); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5305; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5305; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_int64); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5305; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_dtype, __pyx_t_8) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5305; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_8 = PyObject_Call(__pyx_t_5, __pyx_t_6, __pyx_t_4); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5305; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (!(likely(((__pyx_t_8) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_8, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5305; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_9 = ((PyArrayObject *)__pyx_t_8); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer); __pyx_t_10 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer, (PyObject*)__pyx_t_9, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_nobs.rcbuffer->pybuffer, (PyObject*)__pyx_v_nobs, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_pybuffernd_nobs.diminfo[0].strides = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_nobs.diminfo[0].shape = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_nobs.diminfo[1].strides = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_nobs.diminfo[1].shape = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.shape[1]; if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5305; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_9 = 0; __pyx_v_nobs = ((PyArrayObject *)__pyx_t_8); __pyx_t_8 = 0; /* "pandas/src/generated.pyx":5306 * * nobs = np.zeros(( out).shape, dtype=np.int64) * resx = np.empty_like(out) # <<<<<<<<<<<<<< * * N, K = ( values).shape */ __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5306; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_empty_like); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5306; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5306; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_INCREF(((PyObject *)__pyx_v_out)); PyTuple_SET_ITEM(__pyx_t_8, 0, ((PyObject *)__pyx_v_out)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out)); __pyx_t_6 = PyObject_Call(__pyx_t_4, __pyx_t_8, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5306; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5306; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_14 = ((PyArrayObject *)__pyx_t_6); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_resx.rcbuffer->pybuffer); __pyx_t_10 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_resx.rcbuffer->pybuffer, (PyObject*)__pyx_t_14, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_resx.rcbuffer->pybuffer, (PyObject*)__pyx_v_resx, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_pybuffernd_resx.diminfo[0].strides = __pyx_pybuffernd_resx.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_resx.diminfo[0].shape = __pyx_pybuffernd_resx.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_resx.diminfo[1].strides = __pyx_pybuffernd_resx.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_resx.diminfo[1].shape = __pyx_pybuffernd_resx.rcbuffer->pybuffer.shape[1]; if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5306; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_14 = 0; __pyx_v_resx = ((PyArrayObject *)__pyx_t_6); __pyx_t_6 = 0; /* "pandas/src/generated.pyx":5308 * resx = np.empty_like(out) * * N, K = ( values).shape # <<<<<<<<<<<<<< * * for i in range(N): */ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_values), __pyx_n_s_shape); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5308; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); if ((likely(PyTuple_CheckExact(__pyx_t_6))) || (PyList_CheckExact(__pyx_t_6))) { PyObject* sequence = __pyx_t_6; #if CYTHON_COMPILING_IN_CPYTHON Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5308; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_8 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_4 = PyTuple_GET_ITEM(sequence, 1); } else { __pyx_t_8 = PyList_GET_ITEM(sequence, 0); __pyx_t_4 = PyList_GET_ITEM(sequence, 1); } __Pyx_INCREF(__pyx_t_8); __Pyx_INCREF(__pyx_t_4); #else __pyx_t_8 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5308; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5308; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); #endif __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } else { Py_ssize_t index = -1; __pyx_t_5 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5308; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_15 = Py_TYPE(__pyx_t_5)->tp_iternext; index = 0; __pyx_t_8 = __pyx_t_15(__pyx_t_5); if (unlikely(!__pyx_t_8)) goto __pyx_L4_unpacking_failed; __Pyx_GOTREF(__pyx_t_8); index = 1; __pyx_t_4 = __pyx_t_15(__pyx_t_5); if (unlikely(!__pyx_t_4)) goto __pyx_L4_unpacking_failed; __Pyx_GOTREF(__pyx_t_4); if (__Pyx_IternextUnpackEndCheck(__pyx_t_15(__pyx_t_5), 2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5308; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_15 = NULL; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; goto __pyx_L5_unpacking_done; __pyx_L4_unpacking_failed:; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_15 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5308; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_L5_unpacking_done:; } __pyx_t_2 = __Pyx_PyIndex_AsSsize_t(__pyx_t_8); if (unlikely((__pyx_t_2 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5308; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_1 = __Pyx_PyIndex_AsSsize_t(__pyx_t_4); if (unlikely((__pyx_t_1 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5308; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_N = __pyx_t_2; __pyx_v_K = __pyx_t_1; /* "pandas/src/generated.pyx":5310 * N, K = ( values).shape * * for i in range(N): # <<<<<<<<<<<<<< * lab = labels[i] * if lab < 0: */ __pyx_t_1 = __pyx_v_N; for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) { __pyx_v_i = __pyx_t_2; /* "pandas/src/generated.pyx":5311 * * for i in range(N): * lab = labels[i] # <<<<<<<<<<<<<< * if lab < 0: * continue */ __pyx_t_16 = __pyx_v_i; __pyx_v_lab = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_labels.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_labels.diminfo[0].strides)); /* "pandas/src/generated.pyx":5312 * for i in range(N): * lab = labels[i] * if lab < 0: # <<<<<<<<<<<<<< * continue * */ __pyx_t_3 = ((__pyx_v_lab < 0) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":5313 * lab = labels[i] * if lab < 0: * continue # <<<<<<<<<<<<<< * * counts[lab] += 1 */ goto __pyx_L6_continue; } /* "pandas/src/generated.pyx":5315 * continue * * counts[lab] += 1 # <<<<<<<<<<<<<< * for j in range(K): * val = values[i, j] */ __pyx_t_17 = __pyx_v_lab; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_counts.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_counts.diminfo[0].strides) += 1; /* "pandas/src/generated.pyx":5316 * * counts[lab] += 1 * for j in range(K): # <<<<<<<<<<<<<< * val = values[i, j] * */ __pyx_t_18 = __pyx_v_K; for (__pyx_t_19 = 0; __pyx_t_19 < __pyx_t_18; __pyx_t_19+=1) { __pyx_v_j = __pyx_t_19; /* "pandas/src/generated.pyx":5317 * counts[lab] += 1 * for j in range(K): * val = values[i, j] # <<<<<<<<<<<<<< * * # not nan */ __pyx_t_20 = __pyx_v_i; __pyx_t_21 = __pyx_v_j; __pyx_v_val = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_21, __pyx_pybuffernd_values.diminfo[1].strides)); /* "pandas/src/generated.pyx":5320 * * # not nan * if val == val: # <<<<<<<<<<<<<< * nobs[lab, j] += 1 * if nobs[lab, j] == rank: */ __pyx_t_3 = ((__pyx_v_val == __pyx_v_val) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":5321 * # not nan * if val == val: * nobs[lab, j] += 1 # <<<<<<<<<<<<<< * if nobs[lab, j] == rank: * resx[lab, j] = val */ __pyx_t_22 = __pyx_v_lab; __pyx_t_23 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_nobs.rcbuffer->pybuffer.buf, __pyx_t_22, __pyx_pybuffernd_nobs.diminfo[0].strides, __pyx_t_23, __pyx_pybuffernd_nobs.diminfo[1].strides) += 1; /* "pandas/src/generated.pyx":5322 * if val == val: * nobs[lab, j] += 1 * if nobs[lab, j] == rank: # <<<<<<<<<<<<<< * resx[lab, j] = val * */ __pyx_t_24 = __pyx_v_lab; __pyx_t_25 = __pyx_v_j; __pyx_t_3 = (((*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_nobs.rcbuffer->pybuffer.buf, __pyx_t_24, __pyx_pybuffernd_nobs.diminfo[0].strides, __pyx_t_25, __pyx_pybuffernd_nobs.diminfo[1].strides)) == __pyx_v_rank) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":5323 * nobs[lab, j] += 1 * if nobs[lab, j] == rank: * resx[lab, j] = val # <<<<<<<<<<<<<< * * for i in range(len(counts)): */ __pyx_t_26 = __pyx_v_lab; __pyx_t_27 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_resx.rcbuffer->pybuffer.buf, __pyx_t_26, __pyx_pybuffernd_resx.diminfo[0].strides, __pyx_t_27, __pyx_pybuffernd_resx.diminfo[1].strides) = __pyx_v_val; goto __pyx_L12; } __pyx_L12:; goto __pyx_L11; } __pyx_L11:; } __pyx_L6_continue:; } /* "pandas/src/generated.pyx":5325 * resx[lab, j] = val * * for i in range(len(counts)): # <<<<<<<<<<<<<< * for j in range(K): * if nobs[i, j] == 0: */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_counts)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5325; __pyx_clineno = __LINE__; goto __pyx_L1_error;} for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) { __pyx_v_i = __pyx_t_2; /* "pandas/src/generated.pyx":5326 * * for i in range(len(counts)): * for j in range(K): # <<<<<<<<<<<<<< * if nobs[i, j] == 0: * out[i, j] = nan */ __pyx_t_18 = __pyx_v_K; for (__pyx_t_19 = 0; __pyx_t_19 < __pyx_t_18; __pyx_t_19+=1) { __pyx_v_j = __pyx_t_19; /* "pandas/src/generated.pyx":5327 * for i in range(len(counts)): * for j in range(K): * if nobs[i, j] == 0: # <<<<<<<<<<<<<< * out[i, j] = nan * else: */ __pyx_t_28 = __pyx_v_i; __pyx_t_29 = __pyx_v_j; __pyx_t_3 = (((*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_nobs.rcbuffer->pybuffer.buf, __pyx_t_28, __pyx_pybuffernd_nobs.diminfo[0].strides, __pyx_t_29, __pyx_pybuffernd_nobs.diminfo[1].strides)) == 0) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":5328 * for j in range(K): * if nobs[i, j] == 0: * out[i, j] = nan # <<<<<<<<<<<<<< * else: * out[i, j] = resx[i, j] */ __pyx_t_30 = __pyx_v_i; __pyx_t_31 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_30, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_31, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_6pandas_5algos_nan; goto __pyx_L17; } /*else*/ { /* "pandas/src/generated.pyx":5330 * out[i, j] = nan * else: * out[i, j] = resx[i, j] # <<<<<<<<<<<<<< * * @cython.boundscheck(False) */ __pyx_t_32 = __pyx_v_i; __pyx_t_33 = __pyx_v_j; __pyx_t_34 = __pyx_v_i; __pyx_t_35 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_34, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_35, __pyx_pybuffernd_out.diminfo[1].strides) = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_resx.rcbuffer->pybuffer.buf, __pyx_t_32, __pyx_pybuffernd_resx.diminfo[0].strides, __pyx_t_33, __pyx_pybuffernd_resx.diminfo[1].strides)); } __pyx_L17:; } } /* "pandas/src/generated.pyx":5289 * @cython.boundscheck(False) * @cython.wraparound(False) * def group_nth_float32(ndarray[float32_t, ndim=2] out, # <<<<<<<<<<<<<< * ndarray[int64_t] counts, * ndarray[float32_t, ndim=2] values, */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_counts.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_labels.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_resx.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.group_nth_float32", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_counts.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_labels.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_resx.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_resx); __Pyx_XDECREF((PyObject *)__pyx_v_nobs); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":5334 * @cython.boundscheck(False) * @cython.wraparound(False) * def group_nth_bin_float64(ndarray[float64_t, ndim=2] out, # <<<<<<<<<<<<<< * ndarray[int64_t] counts, * ndarray[float64_t, ndim=2] values, */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_399group_nth_bin_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6pandas_5algos_398group_nth_bin_float64[] = "\n Only aggregates on axis=0\n "; static PyMethodDef __pyx_mdef_6pandas_5algos_399group_nth_bin_float64 = {__Pyx_NAMESTR("group_nth_bin_float64"), (PyCFunction)__pyx_pw_6pandas_5algos_399group_nth_bin_float64, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_5algos_398group_nth_bin_float64)}; static PyObject *__pyx_pw_6pandas_5algos_399group_nth_bin_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_out = 0; PyArrayObject *__pyx_v_counts = 0; PyArrayObject *__pyx_v_values = 0; PyArrayObject *__pyx_v_bins = 0; __pyx_t_5numpy_int64_t __pyx_v_rank; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("group_nth_bin_float64 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_out,&__pyx_n_s_counts,&__pyx_n_s_values,&__pyx_n_s_bins,&__pyx_n_s_rank,0}; PyObject* values[5] = {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 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_out)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_counts)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("group_nth_bin_float64", 1, 5, 5, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5334; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_values)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("group_nth_bin_float64", 1, 5, 5, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5334; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_bins)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("group_nth_bin_float64", 1, 5, 5, 3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5334; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 4: if (likely((values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_rank)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("group_nth_bin_float64", 1, 5, 5, 4); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5334; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "group_nth_bin_float64") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5334; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 5) { 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); } __pyx_v_out = ((PyArrayObject *)values[0]); __pyx_v_counts = ((PyArrayObject *)values[1]); __pyx_v_values = ((PyArrayObject *)values[2]); __pyx_v_bins = ((PyArrayObject *)values[3]); __pyx_v_rank = __Pyx_PyInt_As_npy_int64(values[4]); if (unlikely((__pyx_v_rank == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5337; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("group_nth_bin_float64", 1, 5, 5, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5334; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.group_nth_bin_float64", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_5numpy_ndarray, 1, "out", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5334; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_counts), __pyx_ptype_5numpy_ndarray, 1, "counts", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5335; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5336; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_bins), __pyx_ptype_5numpy_ndarray, 1, "bins", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5337; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_398group_nth_bin_float64(__pyx_self, __pyx_v_out, __pyx_v_counts, __pyx_v_values, __pyx_v_bins, __pyx_v_rank); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5algos_398group_nth_bin_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_out, PyArrayObject *__pyx_v_counts, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_bins, __pyx_t_5numpy_int64_t __pyx_v_rank) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_N; Py_ssize_t __pyx_v_K; Py_ssize_t __pyx_v_ngroups; Py_ssize_t __pyx_v_b; __pyx_t_5numpy_float64_t __pyx_v_val; PyArrayObject *__pyx_v_resx = 0; PyArrayObject *__pyx_v_nobs = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_bins; __Pyx_Buffer __pyx_pybuffer_bins; __Pyx_LocalBuf_ND __pyx_pybuffernd_counts; __Pyx_Buffer __pyx_pybuffer_counts; __Pyx_LocalBuf_ND __pyx_pybuffernd_nobs; __Pyx_Buffer __pyx_pybuffer_nobs; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_resx; __Pyx_Buffer __pyx_pybuffer_resx; __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; PyArrayObject *__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; Py_ssize_t __pyx_t_11; int __pyx_t_12; PyObject *__pyx_t_13 = NULL; PyObject *(*__pyx_t_14)(PyObject *); Py_ssize_t __pyx_t_15; int __pyx_t_16; int __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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("group_nth_bin_float64", 0); __pyx_pybuffer_resx.pybuffer.buf = NULL; __pyx_pybuffer_resx.refcount = 0; __pyx_pybuffernd_resx.data = NULL; __pyx_pybuffernd_resx.rcbuffer = &__pyx_pybuffer_resx; __pyx_pybuffer_nobs.pybuffer.buf = NULL; __pyx_pybuffer_nobs.refcount = 0; __pyx_pybuffernd_nobs.data = NULL; __pyx_pybuffernd_nobs.rcbuffer = &__pyx_pybuffer_nobs; __pyx_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; __pyx_pybuffer_counts.pybuffer.buf = NULL; __pyx_pybuffer_counts.refcount = 0; __pyx_pybuffernd_counts.data = NULL; __pyx_pybuffernd_counts.rcbuffer = &__pyx_pybuffer_counts; __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_bins.pybuffer.buf = NULL; __pyx_pybuffer_bins.refcount = 0; __pyx_pybuffernd_bins.data = NULL; __pyx_pybuffernd_bins.rcbuffer = &__pyx_pybuffer_bins; { __Pyx_BufFmt_StackElem __pyx_stack[1]; 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, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5334; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; __pyx_pybuffernd_out.diminfo[1].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_out.diminfo[1].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[1]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_counts.rcbuffer->pybuffer, (PyObject*)__pyx_v_counts, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5334; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_counts.diminfo[0].strides = __pyx_pybuffernd_counts.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_counts.diminfo[0].shape = __pyx_pybuffernd_counts.rcbuffer->pybuffer.shape[0]; { __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, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5334; __pyx_clineno = __LINE__; goto __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_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_bins.rcbuffer->pybuffer, (PyObject*)__pyx_v_bins, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5334; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_bins.diminfo[0].strides = __pyx_pybuffernd_bins.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_bins.diminfo[0].shape = __pyx_pybuffernd_bins.rcbuffer->pybuffer.shape[0]; /* "pandas/src/generated.pyx":5346 * ndarray[float64_t, ndim=2] resx, nobs * * nobs = np.zeros_like(out) # <<<<<<<<<<<<<< * resx = np.empty_like(out) * */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5346; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_zeros_like); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5346; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 5346; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)__pyx_v_out)); PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_out)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out)); __pyx_t_3 = PyObject_Call(__pyx_t_2, __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5346; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5346; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_4 = ((PyArrayObject *)__pyx_t_3); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer); __pyx_t_5 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer, (PyObject*)__pyx_t_4, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_nobs.rcbuffer->pybuffer, (PyObject*)__pyx_v_nobs, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_pybuffernd_nobs.diminfo[0].strides = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_nobs.diminfo[0].shape = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_nobs.diminfo[1].strides = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_nobs.diminfo[1].shape = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.shape[1]; if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5346; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_4 = 0; __pyx_v_nobs = ((PyArrayObject *)__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/generated.pyx":5347 * * nobs = np.zeros_like(out) * resx = np.empty_like(out) # <<<<<<<<<<<<<< * * if bins[len(bins) - 1] == len(values): */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5347; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_empty_like); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5347; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5347; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(((PyObject *)__pyx_v_out)); PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_v_out)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out)); __pyx_t_2 = PyObject_Call(__pyx_t_1, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5347; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5347; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_4 = ((PyArrayObject *)__pyx_t_2); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_resx.rcbuffer->pybuffer); __pyx_t_5 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_resx.rcbuffer->pybuffer, (PyObject*)__pyx_t_4, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_resx.rcbuffer->pybuffer, (PyObject*)__pyx_v_resx, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_pybuffernd_resx.diminfo[0].strides = __pyx_pybuffernd_resx.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_resx.diminfo[0].shape = __pyx_pybuffernd_resx.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_resx.diminfo[1].strides = __pyx_pybuffernd_resx.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_resx.diminfo[1].shape = __pyx_pybuffernd_resx.rcbuffer->pybuffer.shape[1]; if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5347; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_4 = 0; __pyx_v_resx = ((PyArrayObject *)__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":5349 * resx = np.empty_like(out) * * if bins[len(bins) - 1] == len(values): # <<<<<<<<<<<<<< * ngroups = len(bins) * else: */ __pyx_t_9 = PyObject_Length(((PyObject *)__pyx_v_bins)); if (unlikely(__pyx_t_9 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5349; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_10 = (__pyx_t_9 - 1); __pyx_t_11 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5349; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_12 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_bins.rcbuffer->pybuffer.buf, __pyx_t_10, __pyx_pybuffernd_bins.diminfo[0].strides)) == __pyx_t_11) != 0); if (__pyx_t_12) { /* "pandas/src/generated.pyx":5350 * * if bins[len(bins) - 1] == len(values): * ngroups = len(bins) # <<<<<<<<<<<<<< * else: * ngroups = len(bins) + 1 */ __pyx_t_11 = PyObject_Length(((PyObject *)__pyx_v_bins)); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5350; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_ngroups = __pyx_t_11; goto __pyx_L3; } /*else*/ { /* "pandas/src/generated.pyx":5352 * ngroups = len(bins) * else: * ngroups = len(bins) + 1 # <<<<<<<<<<<<<< * * N, K = ( values).shape */ __pyx_t_11 = PyObject_Length(((PyObject *)__pyx_v_bins)); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5352; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_ngroups = (__pyx_t_11 + 1); } __pyx_L3:; /* "pandas/src/generated.pyx":5354 * ngroups = len(bins) + 1 * * N, K = ( values).shape # <<<<<<<<<<<<<< * * b = 0 */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_values), __pyx_n_s_shape); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5354; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if ((likely(PyTuple_CheckExact(__pyx_t_2))) || (PyList_CheckExact(__pyx_t_2))) { PyObject* sequence = __pyx_t_2; #if CYTHON_COMPILING_IN_CPYTHON Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5354; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_1 = PyTuple_GET_ITEM(sequence, 1); } else { __pyx_t_3 = PyList_GET_ITEM(sequence, 0); __pyx_t_1 = PyList_GET_ITEM(sequence, 1); } __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(__pyx_t_1); #else __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5354; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5354; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); #endif __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } else { Py_ssize_t index = -1; __pyx_t_13 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5354; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_14 = Py_TYPE(__pyx_t_13)->tp_iternext; index = 0; __pyx_t_3 = __pyx_t_14(__pyx_t_13); if (unlikely(!__pyx_t_3)) goto __pyx_L4_unpacking_failed; __Pyx_GOTREF(__pyx_t_3); index = 1; __pyx_t_1 = __pyx_t_14(__pyx_t_13); if (unlikely(!__pyx_t_1)) goto __pyx_L4_unpacking_failed; __Pyx_GOTREF(__pyx_t_1); if (__Pyx_IternextUnpackEndCheck(__pyx_t_14(__pyx_t_13), 2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5354; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_14 = NULL; __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; goto __pyx_L5_unpacking_done; __pyx_L4_unpacking_failed:; __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_14 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5354; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_L5_unpacking_done:; } __pyx_t_11 = __Pyx_PyIndex_AsSsize_t(__pyx_t_3); if (unlikely((__pyx_t_11 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5354; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_9 = __Pyx_PyIndex_AsSsize_t(__pyx_t_1); if (unlikely((__pyx_t_9 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5354; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_N = __pyx_t_11; __pyx_v_K = __pyx_t_9; /* "pandas/src/generated.pyx":5356 * N, K = ( values).shape * * b = 0 # <<<<<<<<<<<<<< * for i in range(N): * while b < ngroups - 1 and i >= bins[b]: */ __pyx_v_b = 0; /* "pandas/src/generated.pyx":5357 * * b = 0 * for i in range(N): # <<<<<<<<<<<<<< * while b < ngroups - 1 and i >= bins[b]: * b += 1 */ __pyx_t_9 = __pyx_v_N; for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_9; __pyx_t_11+=1) { __pyx_v_i = __pyx_t_11; /* "pandas/src/generated.pyx":5358 * b = 0 * for i in range(N): * while b < ngroups - 1 and i >= bins[b]: # <<<<<<<<<<<<<< * b += 1 * */ while (1) { __pyx_t_12 = ((__pyx_v_b < (__pyx_v_ngroups - 1)) != 0); if (__pyx_t_12) { __pyx_t_15 = __pyx_v_b; __pyx_t_16 = ((__pyx_v_i >= (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_bins.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_bins.diminfo[0].strides))) != 0); __pyx_t_17 = __pyx_t_16; } else { __pyx_t_17 = __pyx_t_12; } if (!__pyx_t_17) break; /* "pandas/src/generated.pyx":5359 * for i in range(N): * while b < ngroups - 1 and i >= bins[b]: * b += 1 # <<<<<<<<<<<<<< * * counts[b] += 1 */ __pyx_v_b = (__pyx_v_b + 1); } /* "pandas/src/generated.pyx":5361 * b += 1 * * counts[b] += 1 # <<<<<<<<<<<<<< * for j in range(K): * val = values[i, j] */ __pyx_t_18 = __pyx_v_b; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_counts.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_counts.diminfo[0].strides) += 1; /* "pandas/src/generated.pyx":5362 * * counts[b] += 1 * for j in range(K): # <<<<<<<<<<<<<< * val = values[i, j] * */ __pyx_t_19 = __pyx_v_K; for (__pyx_t_20 = 0; __pyx_t_20 < __pyx_t_19; __pyx_t_20+=1) { __pyx_v_j = __pyx_t_20; /* "pandas/src/generated.pyx":5363 * counts[b] += 1 * for j in range(K): * val = values[i, j] # <<<<<<<<<<<<<< * * # not nan */ __pyx_t_21 = __pyx_v_i; __pyx_t_22 = __pyx_v_j; __pyx_v_val = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_22, __pyx_pybuffernd_values.diminfo[1].strides)); /* "pandas/src/generated.pyx":5366 * * # not nan * if val == val: # <<<<<<<<<<<<<< * nobs[b, j] += 1 * if nobs[b, j] == rank: */ __pyx_t_17 = ((__pyx_v_val == __pyx_v_val) != 0); if (__pyx_t_17) { /* "pandas/src/generated.pyx":5367 * # not nan * if val == val: * nobs[b, j] += 1 # <<<<<<<<<<<<<< * if nobs[b, j] == rank: * resx[b, j] = val */ __pyx_t_23 = __pyx_v_b; __pyx_t_24 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_nobs.rcbuffer->pybuffer.buf, __pyx_t_23, __pyx_pybuffernd_nobs.diminfo[0].strides, __pyx_t_24, __pyx_pybuffernd_nobs.diminfo[1].strides) += 1.0; /* "pandas/src/generated.pyx":5368 * if val == val: * nobs[b, j] += 1 * if nobs[b, j] == rank: # <<<<<<<<<<<<<< * resx[b, j] = val * */ __pyx_t_25 = __pyx_v_b; __pyx_t_26 = __pyx_v_j; __pyx_t_17 = (((*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_nobs.rcbuffer->pybuffer.buf, __pyx_t_25, __pyx_pybuffernd_nobs.diminfo[0].strides, __pyx_t_26, __pyx_pybuffernd_nobs.diminfo[1].strides)) == __pyx_v_rank) != 0); if (__pyx_t_17) { /* "pandas/src/generated.pyx":5369 * nobs[b, j] += 1 * if nobs[b, j] == rank: * resx[b, j] = val # <<<<<<<<<<<<<< * * for i in range(ngroups): */ __pyx_t_27 = __pyx_v_b; __pyx_t_28 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_resx.rcbuffer->pybuffer.buf, __pyx_t_27, __pyx_pybuffernd_resx.diminfo[0].strides, __pyx_t_28, __pyx_pybuffernd_resx.diminfo[1].strides) = __pyx_v_val; goto __pyx_L13; } __pyx_L13:; goto __pyx_L12; } __pyx_L12:; } } /* "pandas/src/generated.pyx":5371 * resx[b, j] = val * * for i in range(ngroups): # <<<<<<<<<<<<<< * for j in range(K): * if nobs[i, j] == 0: */ __pyx_t_9 = __pyx_v_ngroups; for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_9; __pyx_t_11+=1) { __pyx_v_i = __pyx_t_11; /* "pandas/src/generated.pyx":5372 * * for i in range(ngroups): * for j in range(K): # <<<<<<<<<<<<<< * if nobs[i, j] == 0: * out[i, j] = nan */ __pyx_t_19 = __pyx_v_K; for (__pyx_t_20 = 0; __pyx_t_20 < __pyx_t_19; __pyx_t_20+=1) { __pyx_v_j = __pyx_t_20; /* "pandas/src/generated.pyx":5373 * for i in range(ngroups): * for j in range(K): * if nobs[i, j] == 0: # <<<<<<<<<<<<<< * out[i, j] = nan * else: */ __pyx_t_29 = __pyx_v_i; __pyx_t_30 = __pyx_v_j; __pyx_t_17 = (((*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_nobs.rcbuffer->pybuffer.buf, __pyx_t_29, __pyx_pybuffernd_nobs.diminfo[0].strides, __pyx_t_30, __pyx_pybuffernd_nobs.diminfo[1].strides)) == 0.0) != 0); if (__pyx_t_17) { /* "pandas/src/generated.pyx":5374 * for j in range(K): * if nobs[i, j] == 0: * out[i, j] = nan # <<<<<<<<<<<<<< * else: * out[i, j] = resx[i, j] */ __pyx_t_31 = __pyx_v_i; __pyx_t_32 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_31, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_32, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_6pandas_5algos_nan; goto __pyx_L18; } /*else*/ { /* "pandas/src/generated.pyx":5376 * out[i, j] = nan * else: * out[i, j] = resx[i, j] # <<<<<<<<<<<<<< * @cython.boundscheck(False) * @cython.wraparound(False) */ __pyx_t_33 = __pyx_v_i; __pyx_t_34 = __pyx_v_j; __pyx_t_35 = __pyx_v_i; __pyx_t_36 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_35, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_36, __pyx_pybuffernd_out.diminfo[1].strides) = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_resx.rcbuffer->pybuffer.buf, __pyx_t_33, __pyx_pybuffernd_resx.diminfo[0].strides, __pyx_t_34, __pyx_pybuffernd_resx.diminfo[1].strides)); } __pyx_L18:; } } /* "pandas/src/generated.pyx":5334 * @cython.boundscheck(False) * @cython.wraparound(False) * def group_nth_bin_float64(ndarray[float64_t, ndim=2] out, # <<<<<<<<<<<<<< * ndarray[int64_t] counts, * ndarray[float64_t, ndim=2] 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_13); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_bins.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_counts.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_resx.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.group_nth_bin_float64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_bins.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_counts.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_resx.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_resx); __Pyx_XDECREF((PyObject *)__pyx_v_nobs); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":5379 * @cython.boundscheck(False) * @cython.wraparound(False) * def group_nth_bin_float32(ndarray[float32_t, ndim=2] out, # <<<<<<<<<<<<<< * ndarray[int64_t] counts, * ndarray[float32_t, ndim=2] values, */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_401group_nth_bin_float32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6pandas_5algos_400group_nth_bin_float32[] = "\n Only aggregates on axis=0\n "; static PyMethodDef __pyx_mdef_6pandas_5algos_401group_nth_bin_float32 = {__Pyx_NAMESTR("group_nth_bin_float32"), (PyCFunction)__pyx_pw_6pandas_5algos_401group_nth_bin_float32, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_5algos_400group_nth_bin_float32)}; static PyObject *__pyx_pw_6pandas_5algos_401group_nth_bin_float32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_out = 0; PyArrayObject *__pyx_v_counts = 0; PyArrayObject *__pyx_v_values = 0; PyArrayObject *__pyx_v_bins = 0; __pyx_t_5numpy_int64_t __pyx_v_rank; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("group_nth_bin_float32 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_out,&__pyx_n_s_counts,&__pyx_n_s_values,&__pyx_n_s_bins,&__pyx_n_s_rank,0}; PyObject* values[5] = {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 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_out)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_counts)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("group_nth_bin_float32", 1, 5, 5, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5379; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_values)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("group_nth_bin_float32", 1, 5, 5, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5379; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_bins)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("group_nth_bin_float32", 1, 5, 5, 3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5379; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 4: if (likely((values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_rank)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("group_nth_bin_float32", 1, 5, 5, 4); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5379; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "group_nth_bin_float32") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5379; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 5) { 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); } __pyx_v_out = ((PyArrayObject *)values[0]); __pyx_v_counts = ((PyArrayObject *)values[1]); __pyx_v_values = ((PyArrayObject *)values[2]); __pyx_v_bins = ((PyArrayObject *)values[3]); __pyx_v_rank = __Pyx_PyInt_As_npy_int64(values[4]); if (unlikely((__pyx_v_rank == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5382; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("group_nth_bin_float32", 1, 5, 5, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5379; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.group_nth_bin_float32", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_5numpy_ndarray, 1, "out", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5379; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_counts), __pyx_ptype_5numpy_ndarray, 1, "counts", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5380; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5381; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_bins), __pyx_ptype_5numpy_ndarray, 1, "bins", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5382; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_400group_nth_bin_float32(__pyx_self, __pyx_v_out, __pyx_v_counts, __pyx_v_values, __pyx_v_bins, __pyx_v_rank); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5algos_400group_nth_bin_float32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_out, PyArrayObject *__pyx_v_counts, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_bins, __pyx_t_5numpy_int64_t __pyx_v_rank) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_N; Py_ssize_t __pyx_v_K; Py_ssize_t __pyx_v_ngroups; Py_ssize_t __pyx_v_b; __pyx_t_5numpy_float32_t __pyx_v_val; PyArrayObject *__pyx_v_resx = 0; PyArrayObject *__pyx_v_nobs = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_bins; __Pyx_Buffer __pyx_pybuffer_bins; __Pyx_LocalBuf_ND __pyx_pybuffernd_counts; __Pyx_Buffer __pyx_pybuffer_counts; __Pyx_LocalBuf_ND __pyx_pybuffernd_nobs; __Pyx_Buffer __pyx_pybuffer_nobs; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_resx; __Pyx_Buffer __pyx_pybuffer_resx; __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; PyArrayObject *__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; Py_ssize_t __pyx_t_11; int __pyx_t_12; PyObject *__pyx_t_13 = NULL; PyObject *(*__pyx_t_14)(PyObject *); Py_ssize_t __pyx_t_15; int __pyx_t_16; int __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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("group_nth_bin_float32", 0); __pyx_pybuffer_resx.pybuffer.buf = NULL; __pyx_pybuffer_resx.refcount = 0; __pyx_pybuffernd_resx.data = NULL; __pyx_pybuffernd_resx.rcbuffer = &__pyx_pybuffer_resx; __pyx_pybuffer_nobs.pybuffer.buf = NULL; __pyx_pybuffer_nobs.refcount = 0; __pyx_pybuffernd_nobs.data = NULL; __pyx_pybuffernd_nobs.rcbuffer = &__pyx_pybuffer_nobs; __pyx_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; __pyx_pybuffer_counts.pybuffer.buf = NULL; __pyx_pybuffer_counts.refcount = 0; __pyx_pybuffernd_counts.data = NULL; __pyx_pybuffernd_counts.rcbuffer = &__pyx_pybuffer_counts; __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_bins.pybuffer.buf = NULL; __pyx_pybuffer_bins.refcount = 0; __pyx_pybuffernd_bins.data = NULL; __pyx_pybuffernd_bins.rcbuffer = &__pyx_pybuffer_bins; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_v_out, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5379; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; __pyx_pybuffernd_out.diminfo[1].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_out.diminfo[1].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[1]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_counts.rcbuffer->pybuffer, (PyObject*)__pyx_v_counts, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5379; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_counts.diminfo[0].strides = __pyx_pybuffernd_counts.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_counts.diminfo[0].shape = __pyx_pybuffernd_counts.rcbuffer->pybuffer.shape[0]; { __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_float32_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5379; __pyx_clineno = __LINE__; goto __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_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_bins.rcbuffer->pybuffer, (PyObject*)__pyx_v_bins, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5379; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_bins.diminfo[0].strides = __pyx_pybuffernd_bins.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_bins.diminfo[0].shape = __pyx_pybuffernd_bins.rcbuffer->pybuffer.shape[0]; /* "pandas/src/generated.pyx":5391 * ndarray[float32_t, ndim=2] resx, nobs * * nobs = np.zeros_like(out) # <<<<<<<<<<<<<< * resx = np.empty_like(out) * */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5391; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_zeros_like); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5391; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 5391; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)__pyx_v_out)); PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_out)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out)); __pyx_t_3 = PyObject_Call(__pyx_t_2, __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5391; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5391; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_4 = ((PyArrayObject *)__pyx_t_3); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer); __pyx_t_5 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer, (PyObject*)__pyx_t_4, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_nobs.rcbuffer->pybuffer, (PyObject*)__pyx_v_nobs, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_pybuffernd_nobs.diminfo[0].strides = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_nobs.diminfo[0].shape = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_nobs.diminfo[1].strides = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_nobs.diminfo[1].shape = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.shape[1]; if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5391; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_4 = 0; __pyx_v_nobs = ((PyArrayObject *)__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/generated.pyx":5392 * * nobs = np.zeros_like(out) * resx = np.empty_like(out) # <<<<<<<<<<<<<< * * if bins[len(bins) - 1] == len(values): */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5392; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_empty_like); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5392; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5392; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(((PyObject *)__pyx_v_out)); PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_v_out)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out)); __pyx_t_2 = PyObject_Call(__pyx_t_1, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5392; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5392; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_4 = ((PyArrayObject *)__pyx_t_2); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_resx.rcbuffer->pybuffer); __pyx_t_5 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_resx.rcbuffer->pybuffer, (PyObject*)__pyx_t_4, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_resx.rcbuffer->pybuffer, (PyObject*)__pyx_v_resx, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_pybuffernd_resx.diminfo[0].strides = __pyx_pybuffernd_resx.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_resx.diminfo[0].shape = __pyx_pybuffernd_resx.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_resx.diminfo[1].strides = __pyx_pybuffernd_resx.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_resx.diminfo[1].shape = __pyx_pybuffernd_resx.rcbuffer->pybuffer.shape[1]; if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5392; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_4 = 0; __pyx_v_resx = ((PyArrayObject *)__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":5394 * resx = np.empty_like(out) * * if bins[len(bins) - 1] == len(values): # <<<<<<<<<<<<<< * ngroups = len(bins) * else: */ __pyx_t_9 = PyObject_Length(((PyObject *)__pyx_v_bins)); if (unlikely(__pyx_t_9 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5394; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_10 = (__pyx_t_9 - 1); __pyx_t_11 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5394; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_12 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_bins.rcbuffer->pybuffer.buf, __pyx_t_10, __pyx_pybuffernd_bins.diminfo[0].strides)) == __pyx_t_11) != 0); if (__pyx_t_12) { /* "pandas/src/generated.pyx":5395 * * if bins[len(bins) - 1] == len(values): * ngroups = len(bins) # <<<<<<<<<<<<<< * else: * ngroups = len(bins) + 1 */ __pyx_t_11 = PyObject_Length(((PyObject *)__pyx_v_bins)); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5395; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_ngroups = __pyx_t_11; goto __pyx_L3; } /*else*/ { /* "pandas/src/generated.pyx":5397 * ngroups = len(bins) * else: * ngroups = len(bins) + 1 # <<<<<<<<<<<<<< * * N, K = ( values).shape */ __pyx_t_11 = PyObject_Length(((PyObject *)__pyx_v_bins)); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5397; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_ngroups = (__pyx_t_11 + 1); } __pyx_L3:; /* "pandas/src/generated.pyx":5399 * ngroups = len(bins) + 1 * * N, K = ( values).shape # <<<<<<<<<<<<<< * * b = 0 */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_values), __pyx_n_s_shape); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5399; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if ((likely(PyTuple_CheckExact(__pyx_t_2))) || (PyList_CheckExact(__pyx_t_2))) { PyObject* sequence = __pyx_t_2; #if CYTHON_COMPILING_IN_CPYTHON Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5399; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_1 = PyTuple_GET_ITEM(sequence, 1); } else { __pyx_t_3 = PyList_GET_ITEM(sequence, 0); __pyx_t_1 = PyList_GET_ITEM(sequence, 1); } __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(__pyx_t_1); #else __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5399; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5399; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); #endif __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } else { Py_ssize_t index = -1; __pyx_t_13 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5399; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_14 = Py_TYPE(__pyx_t_13)->tp_iternext; index = 0; __pyx_t_3 = __pyx_t_14(__pyx_t_13); if (unlikely(!__pyx_t_3)) goto __pyx_L4_unpacking_failed; __Pyx_GOTREF(__pyx_t_3); index = 1; __pyx_t_1 = __pyx_t_14(__pyx_t_13); if (unlikely(!__pyx_t_1)) goto __pyx_L4_unpacking_failed; __Pyx_GOTREF(__pyx_t_1); if (__Pyx_IternextUnpackEndCheck(__pyx_t_14(__pyx_t_13), 2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5399; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_14 = NULL; __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; goto __pyx_L5_unpacking_done; __pyx_L4_unpacking_failed:; __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_14 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5399; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_L5_unpacking_done:; } __pyx_t_11 = __Pyx_PyIndex_AsSsize_t(__pyx_t_3); if (unlikely((__pyx_t_11 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5399; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_9 = __Pyx_PyIndex_AsSsize_t(__pyx_t_1); if (unlikely((__pyx_t_9 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5399; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_N = __pyx_t_11; __pyx_v_K = __pyx_t_9; /* "pandas/src/generated.pyx":5401 * N, K = ( values).shape * * b = 0 # <<<<<<<<<<<<<< * for i in range(N): * while b < ngroups - 1 and i >= bins[b]: */ __pyx_v_b = 0; /* "pandas/src/generated.pyx":5402 * * b = 0 * for i in range(N): # <<<<<<<<<<<<<< * while b < ngroups - 1 and i >= bins[b]: * b += 1 */ __pyx_t_9 = __pyx_v_N; for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_9; __pyx_t_11+=1) { __pyx_v_i = __pyx_t_11; /* "pandas/src/generated.pyx":5403 * b = 0 * for i in range(N): * while b < ngroups - 1 and i >= bins[b]: # <<<<<<<<<<<<<< * b += 1 * */ while (1) { __pyx_t_12 = ((__pyx_v_b < (__pyx_v_ngroups - 1)) != 0); if (__pyx_t_12) { __pyx_t_15 = __pyx_v_b; __pyx_t_16 = ((__pyx_v_i >= (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_bins.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_bins.diminfo[0].strides))) != 0); __pyx_t_17 = __pyx_t_16; } else { __pyx_t_17 = __pyx_t_12; } if (!__pyx_t_17) break; /* "pandas/src/generated.pyx":5404 * for i in range(N): * while b < ngroups - 1 and i >= bins[b]: * b += 1 # <<<<<<<<<<<<<< * * counts[b] += 1 */ __pyx_v_b = (__pyx_v_b + 1); } /* "pandas/src/generated.pyx":5406 * b += 1 * * counts[b] += 1 # <<<<<<<<<<<<<< * for j in range(K): * val = values[i, j] */ __pyx_t_18 = __pyx_v_b; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_counts.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_counts.diminfo[0].strides) += 1; /* "pandas/src/generated.pyx":5407 * * counts[b] += 1 * for j in range(K): # <<<<<<<<<<<<<< * val = values[i, j] * */ __pyx_t_19 = __pyx_v_K; for (__pyx_t_20 = 0; __pyx_t_20 < __pyx_t_19; __pyx_t_20+=1) { __pyx_v_j = __pyx_t_20; /* "pandas/src/generated.pyx":5408 * counts[b] += 1 * for j in range(K): * val = values[i, j] # <<<<<<<<<<<<<< * * # not nan */ __pyx_t_21 = __pyx_v_i; __pyx_t_22 = __pyx_v_j; __pyx_v_val = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_22, __pyx_pybuffernd_values.diminfo[1].strides)); /* "pandas/src/generated.pyx":5411 * * # not nan * if val == val: # <<<<<<<<<<<<<< * nobs[b, j] += 1 * if nobs[b, j] == rank: */ __pyx_t_17 = ((__pyx_v_val == __pyx_v_val) != 0); if (__pyx_t_17) { /* "pandas/src/generated.pyx":5412 * # not nan * if val == val: * nobs[b, j] += 1 # <<<<<<<<<<<<<< * if nobs[b, j] == rank: * resx[b, j] = val */ __pyx_t_23 = __pyx_v_b; __pyx_t_24 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_nobs.rcbuffer->pybuffer.buf, __pyx_t_23, __pyx_pybuffernd_nobs.diminfo[0].strides, __pyx_t_24, __pyx_pybuffernd_nobs.diminfo[1].strides) += 1.0; /* "pandas/src/generated.pyx":5413 * if val == val: * nobs[b, j] += 1 * if nobs[b, j] == rank: # <<<<<<<<<<<<<< * resx[b, j] = val * */ __pyx_t_25 = __pyx_v_b; __pyx_t_26 = __pyx_v_j; __pyx_t_17 = (((*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_nobs.rcbuffer->pybuffer.buf, __pyx_t_25, __pyx_pybuffernd_nobs.diminfo[0].strides, __pyx_t_26, __pyx_pybuffernd_nobs.diminfo[1].strides)) == __pyx_v_rank) != 0); if (__pyx_t_17) { /* "pandas/src/generated.pyx":5414 * nobs[b, j] += 1 * if nobs[b, j] == rank: * resx[b, j] = val # <<<<<<<<<<<<<< * * for i in range(ngroups): */ __pyx_t_27 = __pyx_v_b; __pyx_t_28 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_resx.rcbuffer->pybuffer.buf, __pyx_t_27, __pyx_pybuffernd_resx.diminfo[0].strides, __pyx_t_28, __pyx_pybuffernd_resx.diminfo[1].strides) = __pyx_v_val; goto __pyx_L13; } __pyx_L13:; goto __pyx_L12; } __pyx_L12:; } } /* "pandas/src/generated.pyx":5416 * resx[b, j] = val * * for i in range(ngroups): # <<<<<<<<<<<<<< * for j in range(K): * if nobs[i, j] == 0: */ __pyx_t_9 = __pyx_v_ngroups; for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_9; __pyx_t_11+=1) { __pyx_v_i = __pyx_t_11; /* "pandas/src/generated.pyx":5417 * * for i in range(ngroups): * for j in range(K): # <<<<<<<<<<<<<< * if nobs[i, j] == 0: * out[i, j] = nan */ __pyx_t_19 = __pyx_v_K; for (__pyx_t_20 = 0; __pyx_t_20 < __pyx_t_19; __pyx_t_20+=1) { __pyx_v_j = __pyx_t_20; /* "pandas/src/generated.pyx":5418 * for i in range(ngroups): * for j in range(K): * if nobs[i, j] == 0: # <<<<<<<<<<<<<< * out[i, j] = nan * else: */ __pyx_t_29 = __pyx_v_i; __pyx_t_30 = __pyx_v_j; __pyx_t_17 = (((*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_nobs.rcbuffer->pybuffer.buf, __pyx_t_29, __pyx_pybuffernd_nobs.diminfo[0].strides, __pyx_t_30, __pyx_pybuffernd_nobs.diminfo[1].strides)) == 0.0) != 0); if (__pyx_t_17) { /* "pandas/src/generated.pyx":5419 * for j in range(K): * if nobs[i, j] == 0: * out[i, j] = nan # <<<<<<<<<<<<<< * else: * out[i, j] = resx[i, j] */ __pyx_t_31 = __pyx_v_i; __pyx_t_32 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_31, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_32, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_6pandas_5algos_nan; goto __pyx_L18; } /*else*/ { /* "pandas/src/generated.pyx":5421 * out[i, j] = nan * else: * out[i, j] = resx[i, j] # <<<<<<<<<<<<<< * * @cython.boundscheck(False) */ __pyx_t_33 = __pyx_v_i; __pyx_t_34 = __pyx_v_j; __pyx_t_35 = __pyx_v_i; __pyx_t_36 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_35, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_36, __pyx_pybuffernd_out.diminfo[1].strides) = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_resx.rcbuffer->pybuffer.buf, __pyx_t_33, __pyx_pybuffernd_resx.diminfo[0].strides, __pyx_t_34, __pyx_pybuffernd_resx.diminfo[1].strides)); } __pyx_L18:; } } /* "pandas/src/generated.pyx":5379 * @cython.boundscheck(False) * @cython.wraparound(False) * def group_nth_bin_float32(ndarray[float32_t, ndim=2] out, # <<<<<<<<<<<<<< * ndarray[int64_t] counts, * ndarray[float32_t, ndim=2] 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_13); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_bins.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_counts.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_resx.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.group_nth_bin_float32", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_bins.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_counts.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_resx.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_resx); __Pyx_XDECREF((PyObject *)__pyx_v_nobs); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":5425 * @cython.boundscheck(False) * @cython.wraparound(False) * def group_add_float64(ndarray[float64_t, ndim=2] out, # <<<<<<<<<<<<<< * ndarray[int64_t] counts, * ndarray[float64_t, ndim=2] values, */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_403group_add_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6pandas_5algos_402group_add_float64[] = "\n Only aggregates on axis=0\n "; static PyMethodDef __pyx_mdef_6pandas_5algos_403group_add_float64 = {__Pyx_NAMESTR("group_add_float64"), (PyCFunction)__pyx_pw_6pandas_5algos_403group_add_float64, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_5algos_402group_add_float64)}; static PyObject *__pyx_pw_6pandas_5algos_403group_add_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_out = 0; PyArrayObject *__pyx_v_counts = 0; PyArrayObject *__pyx_v_values = 0; PyArrayObject *__pyx_v_labels = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("group_add_float64 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_out,&__pyx_n_s_counts,&__pyx_n_s_values,&__pyx_n_s_labels,0}; PyObject* values[4] = {0,0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_out)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_counts)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("group_add_float64", 1, 4, 4, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5425; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_values)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("group_add_float64", 1, 4, 4, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5425; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_labels)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("group_add_float64", 1, 4, 4, 3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5425; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "group_add_float64") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5425; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 4) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[3] = PyTuple_GET_ITEM(__pyx_args, 3); } __pyx_v_out = ((PyArrayObject *)values[0]); __pyx_v_counts = ((PyArrayObject *)values[1]); __pyx_v_values = ((PyArrayObject *)values[2]); __pyx_v_labels = ((PyArrayObject *)values[3]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("group_add_float64", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5425; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.group_add_float64", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_5numpy_ndarray, 1, "out", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5425; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_counts), __pyx_ptype_5numpy_ndarray, 1, "counts", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5426; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5427; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_labels), __pyx_ptype_5numpy_ndarray, 1, "labels", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5428; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_402group_add_float64(__pyx_self, __pyx_v_out, __pyx_v_counts, __pyx_v_values, __pyx_v_labels); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5algos_402group_add_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_out, PyArrayObject *__pyx_v_counts, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_labels) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_N; Py_ssize_t __pyx_v_K; Py_ssize_t __pyx_v_lab; __pyx_t_5numpy_float64_t __pyx_v_val; PyArrayObject *__pyx_v_sumx = 0; PyArrayObject *__pyx_v_nobs = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_counts; __Pyx_Buffer __pyx_pybuffer_counts; __Pyx_LocalBuf_ND __pyx_pybuffernd_labels; __Pyx_Buffer __pyx_pybuffer_labels; __Pyx_LocalBuf_ND __pyx_pybuffernd_nobs; __Pyx_Buffer __pyx_pybuffer_nobs; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_sumx; __Pyx_Buffer __pyx_pybuffer_sumx; __Pyx_LocalBuf_ND __pyx_pybuffernd_values; __Pyx_Buffer __pyx_pybuffer_values; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; Py_ssize_t __pyx_t_2; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyArrayObject *__pyx_t_7 = NULL; int __pyx_t_8; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; PyObject *__pyx_t_11 = NULL; PyObject *__pyx_t_12 = NULL; PyObject *(*__pyx_t_13)(PyObject *); 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; long __pyx_t_25; Py_ssize_t __pyx_t_26; long __pyx_t_27; Py_ssize_t __pyx_t_28; long __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; Py_ssize_t __pyx_t_37; Py_ssize_t __pyx_t_38; Py_ssize_t __pyx_t_39; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("group_add_float64", 0); __pyx_pybuffer_sumx.pybuffer.buf = NULL; __pyx_pybuffer_sumx.refcount = 0; __pyx_pybuffernd_sumx.data = NULL; __pyx_pybuffernd_sumx.rcbuffer = &__pyx_pybuffer_sumx; __pyx_pybuffer_nobs.pybuffer.buf = NULL; __pyx_pybuffer_nobs.refcount = 0; __pyx_pybuffernd_nobs.data = NULL; __pyx_pybuffernd_nobs.rcbuffer = &__pyx_pybuffer_nobs; __pyx_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; __pyx_pybuffer_counts.pybuffer.buf = NULL; __pyx_pybuffer_counts.refcount = 0; __pyx_pybuffernd_counts.data = NULL; __pyx_pybuffernd_counts.rcbuffer = &__pyx_pybuffer_counts; __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_labels.pybuffer.buf = NULL; __pyx_pybuffer_labels.refcount = 0; __pyx_pybuffernd_labels.data = NULL; __pyx_pybuffernd_labels.rcbuffer = &__pyx_pybuffer_labels; { __Pyx_BufFmt_StackElem __pyx_stack[1]; 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, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5425; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; __pyx_pybuffernd_out.diminfo[1].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_out.diminfo[1].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[1]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_counts.rcbuffer->pybuffer, (PyObject*)__pyx_v_counts, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5425; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_counts.diminfo[0].strides = __pyx_pybuffernd_counts.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_counts.diminfo[0].shape = __pyx_pybuffernd_counts.rcbuffer->pybuffer.shape[0]; { __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, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5425; __pyx_clineno = __LINE__; goto __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_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_labels.rcbuffer->pybuffer, (PyObject*)__pyx_v_labels, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5425; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_labels.diminfo[0].strides = __pyx_pybuffernd_labels.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_labels.diminfo[0].shape = __pyx_pybuffernd_labels.rcbuffer->pybuffer.shape[0]; /* "pandas/src/generated.pyx":5437 * ndarray[float64_t, ndim=2] sumx, nobs * * if not len(values) == len(labels): # <<<<<<<<<<<<<< * raise AssertionError("len(index) != len(labels)") * */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5437; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_2 = PyObject_Length(((PyObject *)__pyx_v_labels)); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5437; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_3 = ((!((__pyx_t_1 == __pyx_t_2) != 0)) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":5438 * * if not len(values) == len(labels): * raise AssertionError("len(index) != len(labels)") # <<<<<<<<<<<<<< * * nobs = np.zeros_like(out) */ __pyx_t_4 = PyObject_Call(__pyx_builtin_AssertionError, __pyx_tuple__181, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5438; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 5438; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } /* "pandas/src/generated.pyx":5440 * raise AssertionError("len(index) != len(labels)") * * nobs = np.zeros_like(out) # <<<<<<<<<<<<<< * sumx = np.zeros_like(out) * */ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5440; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_zeros_like); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5440; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5440; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(((PyObject *)__pyx_v_out)); PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_v_out)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out)); __pyx_t_6 = PyObject_Call(__pyx_t_5, __pyx_t_4, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5440; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5440; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_7 = ((PyArrayObject *)__pyx_t_6); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer); __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_nobs.rcbuffer->pybuffer, (PyObject*)__pyx_v_nobs, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_pybuffernd_nobs.diminfo[0].strides = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_nobs.diminfo[0].shape = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_nobs.diminfo[1].strides = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_nobs.diminfo[1].shape = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.shape[1]; if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5440; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_7 = 0; __pyx_v_nobs = ((PyArrayObject *)__pyx_t_6); __pyx_t_6 = 0; /* "pandas/src/generated.pyx":5441 * * nobs = np.zeros_like(out) * sumx = np.zeros_like(out) # <<<<<<<<<<<<<< * * N, K = ( values).shape */ __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5441; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_zeros_like); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5441; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5441; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(((PyObject *)__pyx_v_out)); PyTuple_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_v_out)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out)); __pyx_t_5 = PyObject_Call(__pyx_t_4, __pyx_t_6, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5441; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5441; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_7 = ((PyArrayObject *)__pyx_t_5); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_sumx.rcbuffer->pybuffer); __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_sumx.rcbuffer->pybuffer, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_sumx.rcbuffer->pybuffer, (PyObject*)__pyx_v_sumx, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_pybuffernd_sumx.diminfo[0].strides = __pyx_pybuffernd_sumx.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_sumx.diminfo[0].shape = __pyx_pybuffernd_sumx.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_sumx.diminfo[1].strides = __pyx_pybuffernd_sumx.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_sumx.diminfo[1].shape = __pyx_pybuffernd_sumx.rcbuffer->pybuffer.shape[1]; if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5441; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_7 = 0; __pyx_v_sumx = ((PyArrayObject *)__pyx_t_5); __pyx_t_5 = 0; /* "pandas/src/generated.pyx":5443 * sumx = np.zeros_like(out) * * N, K = ( values).shape # <<<<<<<<<<<<<< * * if K > 1: */ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_values), __pyx_n_s_shape); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5443; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); if ((likely(PyTuple_CheckExact(__pyx_t_5))) || (PyList_CheckExact(__pyx_t_5))) { PyObject* sequence = __pyx_t_5; #if CYTHON_COMPILING_IN_CPYTHON Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5443; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_6 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_4 = PyTuple_GET_ITEM(sequence, 1); } else { __pyx_t_6 = PyList_GET_ITEM(sequence, 0); __pyx_t_4 = PyList_GET_ITEM(sequence, 1); } __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(__pyx_t_4); #else __pyx_t_6 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5443; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5443; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); #endif __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } else { Py_ssize_t index = -1; __pyx_t_12 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5443; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_13 = Py_TYPE(__pyx_t_12)->tp_iternext; index = 0; __pyx_t_6 = __pyx_t_13(__pyx_t_12); if (unlikely(!__pyx_t_6)) goto __pyx_L4_unpacking_failed; __Pyx_GOTREF(__pyx_t_6); index = 1; __pyx_t_4 = __pyx_t_13(__pyx_t_12); if (unlikely(!__pyx_t_4)) goto __pyx_L4_unpacking_failed; __Pyx_GOTREF(__pyx_t_4); if (__Pyx_IternextUnpackEndCheck(__pyx_t_13(__pyx_t_12), 2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5443; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_13 = NULL; __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; goto __pyx_L5_unpacking_done; __pyx_L4_unpacking_failed:; __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __pyx_t_13 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5443; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_L5_unpacking_done:; } __pyx_t_2 = __Pyx_PyIndex_AsSsize_t(__pyx_t_6); if (unlikely((__pyx_t_2 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5443; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_1 = __Pyx_PyIndex_AsSsize_t(__pyx_t_4); if (unlikely((__pyx_t_1 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5443; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_N = __pyx_t_2; __pyx_v_K = __pyx_t_1; /* "pandas/src/generated.pyx":5445 * N, K = ( values).shape * * if K > 1: # <<<<<<<<<<<<<< * for i in range(N): * lab = labels[i] */ __pyx_t_3 = ((__pyx_v_K > 1) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":5446 * * if K > 1: * for i in range(N): # <<<<<<<<<<<<<< * lab = labels[i] * if lab < 0: */ __pyx_t_1 = __pyx_v_N; for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) { __pyx_v_i = __pyx_t_2; /* "pandas/src/generated.pyx":5447 * if K > 1: * for i in range(N): * lab = labels[i] # <<<<<<<<<<<<<< * if lab < 0: * continue */ __pyx_t_14 = __pyx_v_i; __pyx_v_lab = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_labels.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_labels.diminfo[0].strides)); /* "pandas/src/generated.pyx":5448 * for i in range(N): * lab = labels[i] * if lab < 0: # <<<<<<<<<<<<<< * continue * */ __pyx_t_3 = ((__pyx_v_lab < 0) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":5449 * lab = labels[i] * if lab < 0: * continue # <<<<<<<<<<<<<< * * counts[lab] += 1 */ goto __pyx_L7_continue; } /* "pandas/src/generated.pyx":5451 * continue * * counts[lab] += 1 # <<<<<<<<<<<<<< * for j in range(K): * val = values[i, j] */ __pyx_t_15 = __pyx_v_lab; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_counts.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_counts.diminfo[0].strides) += 1; /* "pandas/src/generated.pyx":5452 * * counts[lab] += 1 * for j in range(K): # <<<<<<<<<<<<<< * val = values[i, j] * */ __pyx_t_16 = __pyx_v_K; for (__pyx_t_17 = 0; __pyx_t_17 < __pyx_t_16; __pyx_t_17+=1) { __pyx_v_j = __pyx_t_17; /* "pandas/src/generated.pyx":5453 * counts[lab] += 1 * for j in range(K): * val = values[i, j] # <<<<<<<<<<<<<< * * # not nan */ __pyx_t_18 = __pyx_v_i; __pyx_t_19 = __pyx_v_j; __pyx_v_val = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_19, __pyx_pybuffernd_values.diminfo[1].strides)); /* "pandas/src/generated.pyx":5456 * * # not nan * if val == val: # <<<<<<<<<<<<<< * nobs[lab, j] += 1 * sumx[lab, j] += val */ __pyx_t_3 = ((__pyx_v_val == __pyx_v_val) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":5457 * # not nan * if val == val: * nobs[lab, j] += 1 # <<<<<<<<<<<<<< * sumx[lab, j] += val * else: */ __pyx_t_20 = __pyx_v_lab; __pyx_t_21 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_nobs.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_nobs.diminfo[0].strides, __pyx_t_21, __pyx_pybuffernd_nobs.diminfo[1].strides) += 1.0; /* "pandas/src/generated.pyx":5458 * if val == val: * nobs[lab, j] += 1 * sumx[lab, j] += val # <<<<<<<<<<<<<< * else: * for i in range(N): */ __pyx_t_22 = __pyx_v_lab; __pyx_t_23 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_sumx.rcbuffer->pybuffer.buf, __pyx_t_22, __pyx_pybuffernd_sumx.diminfo[0].strides, __pyx_t_23, __pyx_pybuffernd_sumx.diminfo[1].strides) += __pyx_v_val; goto __pyx_L12; } __pyx_L12:; } __pyx_L7_continue:; } goto __pyx_L6; } /*else*/ { /* "pandas/src/generated.pyx":5460 * sumx[lab, j] += val * else: * for i in range(N): # <<<<<<<<<<<<<< * lab = labels[i] * if lab < 0: */ __pyx_t_1 = __pyx_v_N; for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) { __pyx_v_i = __pyx_t_2; /* "pandas/src/generated.pyx":5461 * else: * for i in range(N): * lab = labels[i] # <<<<<<<<<<<<<< * if lab < 0: * continue */ __pyx_t_16 = __pyx_v_i; __pyx_v_lab = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_labels.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_labels.diminfo[0].strides)); /* "pandas/src/generated.pyx":5462 * for i in range(N): * lab = labels[i] * if lab < 0: # <<<<<<<<<<<<<< * continue * */ __pyx_t_3 = ((__pyx_v_lab < 0) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":5463 * lab = labels[i] * if lab < 0: * continue # <<<<<<<<<<<<<< * * counts[lab] += 1 */ goto __pyx_L13_continue; } /* "pandas/src/generated.pyx":5465 * continue * * counts[lab] += 1 # <<<<<<<<<<<<<< * val = values[i, 0] * */ __pyx_t_17 = __pyx_v_lab; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_counts.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_counts.diminfo[0].strides) += 1; /* "pandas/src/generated.pyx":5466 * * counts[lab] += 1 * val = values[i, 0] # <<<<<<<<<<<<<< * * # not nan */ __pyx_t_24 = __pyx_v_i; __pyx_t_25 = 0; __pyx_v_val = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_24, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_25, __pyx_pybuffernd_values.diminfo[1].strides)); /* "pandas/src/generated.pyx":5469 * * # not nan * if val == val: # <<<<<<<<<<<<<< * nobs[lab, 0] += 1 * sumx[lab, 0] += val */ __pyx_t_3 = ((__pyx_v_val == __pyx_v_val) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":5470 * # not nan * if val == val: * nobs[lab, 0] += 1 # <<<<<<<<<<<<<< * sumx[lab, 0] += val * */ __pyx_t_26 = __pyx_v_lab; __pyx_t_27 = 0; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_nobs.rcbuffer->pybuffer.buf, __pyx_t_26, __pyx_pybuffernd_nobs.diminfo[0].strides, __pyx_t_27, __pyx_pybuffernd_nobs.diminfo[1].strides) += 1.0; /* "pandas/src/generated.pyx":5471 * if val == val: * nobs[lab, 0] += 1 * sumx[lab, 0] += val # <<<<<<<<<<<<<< * * for i in range(len(counts)): */ __pyx_t_28 = __pyx_v_lab; __pyx_t_29 = 0; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_sumx.rcbuffer->pybuffer.buf, __pyx_t_28, __pyx_pybuffernd_sumx.diminfo[0].strides, __pyx_t_29, __pyx_pybuffernd_sumx.diminfo[1].strides) += __pyx_v_val; goto __pyx_L16; } __pyx_L16:; __pyx_L13_continue:; } } __pyx_L6:; /* "pandas/src/generated.pyx":5473 * sumx[lab, 0] += val * * for i in range(len(counts)): # <<<<<<<<<<<<<< * for j in range(K): * if nobs[i, j] == 0: */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_counts)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5473; __pyx_clineno = __LINE__; goto __pyx_L1_error;} for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) { __pyx_v_i = __pyx_t_2; /* "pandas/src/generated.pyx":5474 * * for i in range(len(counts)): * for j in range(K): # <<<<<<<<<<<<<< * if nobs[i, j] == 0: * out[i, j] = nan */ __pyx_t_30 = __pyx_v_K; for (__pyx_t_31 = 0; __pyx_t_31 < __pyx_t_30; __pyx_t_31+=1) { __pyx_v_j = __pyx_t_31; /* "pandas/src/generated.pyx":5475 * for i in range(len(counts)): * for j in range(K): * if nobs[i, j] == 0: # <<<<<<<<<<<<<< * out[i, j] = nan * else: */ __pyx_t_32 = __pyx_v_i; __pyx_t_33 = __pyx_v_j; __pyx_t_3 = (((*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_nobs.rcbuffer->pybuffer.buf, __pyx_t_32, __pyx_pybuffernd_nobs.diminfo[0].strides, __pyx_t_33, __pyx_pybuffernd_nobs.diminfo[1].strides)) == 0.0) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":5476 * for j in range(K): * if nobs[i, j] == 0: * out[i, j] = nan # <<<<<<<<<<<<<< * else: * out[i, j] = sumx[i, j] */ __pyx_t_34 = __pyx_v_i; __pyx_t_35 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_34, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_35, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_6pandas_5algos_nan; goto __pyx_L21; } /*else*/ { /* "pandas/src/generated.pyx":5478 * out[i, j] = nan * else: * out[i, j] = sumx[i, j] # <<<<<<<<<<<<<< * @cython.boundscheck(False) * @cython.wraparound(False) */ __pyx_t_36 = __pyx_v_i; __pyx_t_37 = __pyx_v_j; __pyx_t_38 = __pyx_v_i; __pyx_t_39 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_38, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_39, __pyx_pybuffernd_out.diminfo[1].strides) = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_sumx.rcbuffer->pybuffer.buf, __pyx_t_36, __pyx_pybuffernd_sumx.diminfo[0].strides, __pyx_t_37, __pyx_pybuffernd_sumx.diminfo[1].strides)); } __pyx_L21:; } } /* "pandas/src/generated.pyx":5425 * @cython.boundscheck(False) * @cython.wraparound(False) * def group_add_float64(ndarray[float64_t, ndim=2] out, # <<<<<<<<<<<<<< * ndarray[int64_t] counts, * ndarray[float64_t, ndim=2] values, */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_12); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_counts.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_labels.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_sumx.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.group_add_float64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_counts.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_labels.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_sumx.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_sumx); __Pyx_XDECREF((PyObject *)__pyx_v_nobs); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":5481 * @cython.boundscheck(False) * @cython.wraparound(False) * def group_add_float32(ndarray[float32_t, ndim=2] out, # <<<<<<<<<<<<<< * ndarray[int64_t] counts, * ndarray[float32_t, ndim=2] values, */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_405group_add_float32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6pandas_5algos_404group_add_float32[] = "\n Only aggregates on axis=0\n "; static PyMethodDef __pyx_mdef_6pandas_5algos_405group_add_float32 = {__Pyx_NAMESTR("group_add_float32"), (PyCFunction)__pyx_pw_6pandas_5algos_405group_add_float32, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_5algos_404group_add_float32)}; static PyObject *__pyx_pw_6pandas_5algos_405group_add_float32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_out = 0; PyArrayObject *__pyx_v_counts = 0; PyArrayObject *__pyx_v_values = 0; PyArrayObject *__pyx_v_labels = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("group_add_float32 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_out,&__pyx_n_s_counts,&__pyx_n_s_values,&__pyx_n_s_labels,0}; PyObject* values[4] = {0,0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_out)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_counts)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("group_add_float32", 1, 4, 4, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5481; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_values)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("group_add_float32", 1, 4, 4, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5481; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_labels)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("group_add_float32", 1, 4, 4, 3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5481; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "group_add_float32") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5481; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 4) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[3] = PyTuple_GET_ITEM(__pyx_args, 3); } __pyx_v_out = ((PyArrayObject *)values[0]); __pyx_v_counts = ((PyArrayObject *)values[1]); __pyx_v_values = ((PyArrayObject *)values[2]); __pyx_v_labels = ((PyArrayObject *)values[3]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("group_add_float32", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5481; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.group_add_float32", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_5numpy_ndarray, 1, "out", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5481; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_counts), __pyx_ptype_5numpy_ndarray, 1, "counts", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5482; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5483; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_labels), __pyx_ptype_5numpy_ndarray, 1, "labels", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5484; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_404group_add_float32(__pyx_self, __pyx_v_out, __pyx_v_counts, __pyx_v_values, __pyx_v_labels); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5algos_404group_add_float32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_out, PyArrayObject *__pyx_v_counts, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_labels) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_N; Py_ssize_t __pyx_v_K; Py_ssize_t __pyx_v_lab; __pyx_t_5numpy_float32_t __pyx_v_val; PyArrayObject *__pyx_v_sumx = 0; PyArrayObject *__pyx_v_nobs = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_counts; __Pyx_Buffer __pyx_pybuffer_counts; __Pyx_LocalBuf_ND __pyx_pybuffernd_labels; __Pyx_Buffer __pyx_pybuffer_labels; __Pyx_LocalBuf_ND __pyx_pybuffernd_nobs; __Pyx_Buffer __pyx_pybuffer_nobs; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_sumx; __Pyx_Buffer __pyx_pybuffer_sumx; __Pyx_LocalBuf_ND __pyx_pybuffernd_values; __Pyx_Buffer __pyx_pybuffer_values; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; Py_ssize_t __pyx_t_2; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyArrayObject *__pyx_t_7 = NULL; int __pyx_t_8; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; PyObject *__pyx_t_11 = NULL; PyObject *__pyx_t_12 = NULL; PyObject *(*__pyx_t_13)(PyObject *); 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; long __pyx_t_25; Py_ssize_t __pyx_t_26; long __pyx_t_27; Py_ssize_t __pyx_t_28; long __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; Py_ssize_t __pyx_t_37; Py_ssize_t __pyx_t_38; Py_ssize_t __pyx_t_39; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("group_add_float32", 0); __pyx_pybuffer_sumx.pybuffer.buf = NULL; __pyx_pybuffer_sumx.refcount = 0; __pyx_pybuffernd_sumx.data = NULL; __pyx_pybuffernd_sumx.rcbuffer = &__pyx_pybuffer_sumx; __pyx_pybuffer_nobs.pybuffer.buf = NULL; __pyx_pybuffer_nobs.refcount = 0; __pyx_pybuffernd_nobs.data = NULL; __pyx_pybuffernd_nobs.rcbuffer = &__pyx_pybuffer_nobs; __pyx_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; __pyx_pybuffer_counts.pybuffer.buf = NULL; __pyx_pybuffer_counts.refcount = 0; __pyx_pybuffernd_counts.data = NULL; __pyx_pybuffernd_counts.rcbuffer = &__pyx_pybuffer_counts; __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_labels.pybuffer.buf = NULL; __pyx_pybuffer_labels.refcount = 0; __pyx_pybuffernd_labels.data = NULL; __pyx_pybuffernd_labels.rcbuffer = &__pyx_pybuffer_labels; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_v_out, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5481; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; __pyx_pybuffernd_out.diminfo[1].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_out.diminfo[1].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[1]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_counts.rcbuffer->pybuffer, (PyObject*)__pyx_v_counts, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5481; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_counts.diminfo[0].strides = __pyx_pybuffernd_counts.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_counts.diminfo[0].shape = __pyx_pybuffernd_counts.rcbuffer->pybuffer.shape[0]; { __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_float32_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5481; __pyx_clineno = __LINE__; goto __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_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_labels.rcbuffer->pybuffer, (PyObject*)__pyx_v_labels, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5481; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_labels.diminfo[0].strides = __pyx_pybuffernd_labels.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_labels.diminfo[0].shape = __pyx_pybuffernd_labels.rcbuffer->pybuffer.shape[0]; /* "pandas/src/generated.pyx":5493 * ndarray[float32_t, ndim=2] sumx, nobs * * if not len(values) == len(labels): # <<<<<<<<<<<<<< * raise AssertionError("len(index) != len(labels)") * */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5493; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_2 = PyObject_Length(((PyObject *)__pyx_v_labels)); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5493; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_3 = ((!((__pyx_t_1 == __pyx_t_2) != 0)) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":5494 * * if not len(values) == len(labels): * raise AssertionError("len(index) != len(labels)") # <<<<<<<<<<<<<< * * nobs = np.zeros_like(out) */ __pyx_t_4 = PyObject_Call(__pyx_builtin_AssertionError, __pyx_tuple__182, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5494; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 5494; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } /* "pandas/src/generated.pyx":5496 * raise AssertionError("len(index) != len(labels)") * * nobs = np.zeros_like(out) # <<<<<<<<<<<<<< * sumx = np.zeros_like(out) * */ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5496; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_zeros_like); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5496; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5496; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(((PyObject *)__pyx_v_out)); PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_v_out)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out)); __pyx_t_6 = PyObject_Call(__pyx_t_5, __pyx_t_4, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5496; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5496; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_7 = ((PyArrayObject *)__pyx_t_6); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer); __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_nobs.rcbuffer->pybuffer, (PyObject*)__pyx_v_nobs, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_pybuffernd_nobs.diminfo[0].strides = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_nobs.diminfo[0].shape = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_nobs.diminfo[1].strides = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_nobs.diminfo[1].shape = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.shape[1]; if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5496; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_7 = 0; __pyx_v_nobs = ((PyArrayObject *)__pyx_t_6); __pyx_t_6 = 0; /* "pandas/src/generated.pyx":5497 * * nobs = np.zeros_like(out) * sumx = np.zeros_like(out) # <<<<<<<<<<<<<< * * N, K = ( values).shape */ __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5497; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_zeros_like); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5497; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5497; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(((PyObject *)__pyx_v_out)); PyTuple_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_v_out)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out)); __pyx_t_5 = PyObject_Call(__pyx_t_4, __pyx_t_6, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5497; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5497; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_7 = ((PyArrayObject *)__pyx_t_5); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_sumx.rcbuffer->pybuffer); __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_sumx.rcbuffer->pybuffer, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_sumx.rcbuffer->pybuffer, (PyObject*)__pyx_v_sumx, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_pybuffernd_sumx.diminfo[0].strides = __pyx_pybuffernd_sumx.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_sumx.diminfo[0].shape = __pyx_pybuffernd_sumx.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_sumx.diminfo[1].strides = __pyx_pybuffernd_sumx.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_sumx.diminfo[1].shape = __pyx_pybuffernd_sumx.rcbuffer->pybuffer.shape[1]; if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5497; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_7 = 0; __pyx_v_sumx = ((PyArrayObject *)__pyx_t_5); __pyx_t_5 = 0; /* "pandas/src/generated.pyx":5499 * sumx = np.zeros_like(out) * * N, K = ( values).shape # <<<<<<<<<<<<<< * * if K > 1: */ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_values), __pyx_n_s_shape); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5499; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); if ((likely(PyTuple_CheckExact(__pyx_t_5))) || (PyList_CheckExact(__pyx_t_5))) { PyObject* sequence = __pyx_t_5; #if CYTHON_COMPILING_IN_CPYTHON Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5499; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_6 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_4 = PyTuple_GET_ITEM(sequence, 1); } else { __pyx_t_6 = PyList_GET_ITEM(sequence, 0); __pyx_t_4 = PyList_GET_ITEM(sequence, 1); } __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(__pyx_t_4); #else __pyx_t_6 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5499; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5499; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); #endif __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } else { Py_ssize_t index = -1; __pyx_t_12 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5499; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_13 = Py_TYPE(__pyx_t_12)->tp_iternext; index = 0; __pyx_t_6 = __pyx_t_13(__pyx_t_12); if (unlikely(!__pyx_t_6)) goto __pyx_L4_unpacking_failed; __Pyx_GOTREF(__pyx_t_6); index = 1; __pyx_t_4 = __pyx_t_13(__pyx_t_12); if (unlikely(!__pyx_t_4)) goto __pyx_L4_unpacking_failed; __Pyx_GOTREF(__pyx_t_4); if (__Pyx_IternextUnpackEndCheck(__pyx_t_13(__pyx_t_12), 2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5499; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_13 = NULL; __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; goto __pyx_L5_unpacking_done; __pyx_L4_unpacking_failed:; __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __pyx_t_13 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5499; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_L5_unpacking_done:; } __pyx_t_2 = __Pyx_PyIndex_AsSsize_t(__pyx_t_6); if (unlikely((__pyx_t_2 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5499; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_1 = __Pyx_PyIndex_AsSsize_t(__pyx_t_4); if (unlikely((__pyx_t_1 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5499; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_N = __pyx_t_2; __pyx_v_K = __pyx_t_1; /* "pandas/src/generated.pyx":5501 * N, K = ( values).shape * * if K > 1: # <<<<<<<<<<<<<< * for i in range(N): * lab = labels[i] */ __pyx_t_3 = ((__pyx_v_K > 1) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":5502 * * if K > 1: * for i in range(N): # <<<<<<<<<<<<<< * lab = labels[i] * if lab < 0: */ __pyx_t_1 = __pyx_v_N; for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) { __pyx_v_i = __pyx_t_2; /* "pandas/src/generated.pyx":5503 * if K > 1: * for i in range(N): * lab = labels[i] # <<<<<<<<<<<<<< * if lab < 0: * continue */ __pyx_t_14 = __pyx_v_i; __pyx_v_lab = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_labels.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_labels.diminfo[0].strides)); /* "pandas/src/generated.pyx":5504 * for i in range(N): * lab = labels[i] * if lab < 0: # <<<<<<<<<<<<<< * continue * */ __pyx_t_3 = ((__pyx_v_lab < 0) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":5505 * lab = labels[i] * if lab < 0: * continue # <<<<<<<<<<<<<< * * counts[lab] += 1 */ goto __pyx_L7_continue; } /* "pandas/src/generated.pyx":5507 * continue * * counts[lab] += 1 # <<<<<<<<<<<<<< * for j in range(K): * val = values[i, j] */ __pyx_t_15 = __pyx_v_lab; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_counts.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_counts.diminfo[0].strides) += 1; /* "pandas/src/generated.pyx":5508 * * counts[lab] += 1 * for j in range(K): # <<<<<<<<<<<<<< * val = values[i, j] * */ __pyx_t_16 = __pyx_v_K; for (__pyx_t_17 = 0; __pyx_t_17 < __pyx_t_16; __pyx_t_17+=1) { __pyx_v_j = __pyx_t_17; /* "pandas/src/generated.pyx":5509 * counts[lab] += 1 * for j in range(K): * val = values[i, j] # <<<<<<<<<<<<<< * * # not nan */ __pyx_t_18 = __pyx_v_i; __pyx_t_19 = __pyx_v_j; __pyx_v_val = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_19, __pyx_pybuffernd_values.diminfo[1].strides)); /* "pandas/src/generated.pyx":5512 * * # not nan * if val == val: # <<<<<<<<<<<<<< * nobs[lab, j] += 1 * sumx[lab, j] += val */ __pyx_t_3 = ((__pyx_v_val == __pyx_v_val) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":5513 * # not nan * if val == val: * nobs[lab, j] += 1 # <<<<<<<<<<<<<< * sumx[lab, j] += val * else: */ __pyx_t_20 = __pyx_v_lab; __pyx_t_21 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_nobs.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_nobs.diminfo[0].strides, __pyx_t_21, __pyx_pybuffernd_nobs.diminfo[1].strides) += 1.0; /* "pandas/src/generated.pyx":5514 * if val == val: * nobs[lab, j] += 1 * sumx[lab, j] += val # <<<<<<<<<<<<<< * else: * for i in range(N): */ __pyx_t_22 = __pyx_v_lab; __pyx_t_23 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_sumx.rcbuffer->pybuffer.buf, __pyx_t_22, __pyx_pybuffernd_sumx.diminfo[0].strides, __pyx_t_23, __pyx_pybuffernd_sumx.diminfo[1].strides) += __pyx_v_val; goto __pyx_L12; } __pyx_L12:; } __pyx_L7_continue:; } goto __pyx_L6; } /*else*/ { /* "pandas/src/generated.pyx":5516 * sumx[lab, j] += val * else: * for i in range(N): # <<<<<<<<<<<<<< * lab = labels[i] * if lab < 0: */ __pyx_t_1 = __pyx_v_N; for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) { __pyx_v_i = __pyx_t_2; /* "pandas/src/generated.pyx":5517 * else: * for i in range(N): * lab = labels[i] # <<<<<<<<<<<<<< * if lab < 0: * continue */ __pyx_t_16 = __pyx_v_i; __pyx_v_lab = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_labels.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_labels.diminfo[0].strides)); /* "pandas/src/generated.pyx":5518 * for i in range(N): * lab = labels[i] * if lab < 0: # <<<<<<<<<<<<<< * continue * */ __pyx_t_3 = ((__pyx_v_lab < 0) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":5519 * lab = labels[i] * if lab < 0: * continue # <<<<<<<<<<<<<< * * counts[lab] += 1 */ goto __pyx_L13_continue; } /* "pandas/src/generated.pyx":5521 * continue * * counts[lab] += 1 # <<<<<<<<<<<<<< * val = values[i, 0] * */ __pyx_t_17 = __pyx_v_lab; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_counts.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_counts.diminfo[0].strides) += 1; /* "pandas/src/generated.pyx":5522 * * counts[lab] += 1 * val = values[i, 0] # <<<<<<<<<<<<<< * * # not nan */ __pyx_t_24 = __pyx_v_i; __pyx_t_25 = 0; __pyx_v_val = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_24, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_25, __pyx_pybuffernd_values.diminfo[1].strides)); /* "pandas/src/generated.pyx":5525 * * # not nan * if val == val: # <<<<<<<<<<<<<< * nobs[lab, 0] += 1 * sumx[lab, 0] += val */ __pyx_t_3 = ((__pyx_v_val == __pyx_v_val) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":5526 * # not nan * if val == val: * nobs[lab, 0] += 1 # <<<<<<<<<<<<<< * sumx[lab, 0] += val * */ __pyx_t_26 = __pyx_v_lab; __pyx_t_27 = 0; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_nobs.rcbuffer->pybuffer.buf, __pyx_t_26, __pyx_pybuffernd_nobs.diminfo[0].strides, __pyx_t_27, __pyx_pybuffernd_nobs.diminfo[1].strides) += 1.0; /* "pandas/src/generated.pyx":5527 * if val == val: * nobs[lab, 0] += 1 * sumx[lab, 0] += val # <<<<<<<<<<<<<< * * for i in range(len(counts)): */ __pyx_t_28 = __pyx_v_lab; __pyx_t_29 = 0; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_sumx.rcbuffer->pybuffer.buf, __pyx_t_28, __pyx_pybuffernd_sumx.diminfo[0].strides, __pyx_t_29, __pyx_pybuffernd_sumx.diminfo[1].strides) += __pyx_v_val; goto __pyx_L16; } __pyx_L16:; __pyx_L13_continue:; } } __pyx_L6:; /* "pandas/src/generated.pyx":5529 * sumx[lab, 0] += val * * for i in range(len(counts)): # <<<<<<<<<<<<<< * for j in range(K): * if nobs[i, j] == 0: */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_counts)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5529; __pyx_clineno = __LINE__; goto __pyx_L1_error;} for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) { __pyx_v_i = __pyx_t_2; /* "pandas/src/generated.pyx":5530 * * for i in range(len(counts)): * for j in range(K): # <<<<<<<<<<<<<< * if nobs[i, j] == 0: * out[i, j] = nan */ __pyx_t_30 = __pyx_v_K; for (__pyx_t_31 = 0; __pyx_t_31 < __pyx_t_30; __pyx_t_31+=1) { __pyx_v_j = __pyx_t_31; /* "pandas/src/generated.pyx":5531 * for i in range(len(counts)): * for j in range(K): * if nobs[i, j] == 0: # <<<<<<<<<<<<<< * out[i, j] = nan * else: */ __pyx_t_32 = __pyx_v_i; __pyx_t_33 = __pyx_v_j; __pyx_t_3 = (((*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_nobs.rcbuffer->pybuffer.buf, __pyx_t_32, __pyx_pybuffernd_nobs.diminfo[0].strides, __pyx_t_33, __pyx_pybuffernd_nobs.diminfo[1].strides)) == 0.0) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":5532 * for j in range(K): * if nobs[i, j] == 0: * out[i, j] = nan # <<<<<<<<<<<<<< * else: * out[i, j] = sumx[i, j] */ __pyx_t_34 = __pyx_v_i; __pyx_t_35 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_34, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_35, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_6pandas_5algos_nan; goto __pyx_L21; } /*else*/ { /* "pandas/src/generated.pyx":5534 * out[i, j] = nan * else: * out[i, j] = sumx[i, j] # <<<<<<<<<<<<<< * * @cython.boundscheck(False) */ __pyx_t_36 = __pyx_v_i; __pyx_t_37 = __pyx_v_j; __pyx_t_38 = __pyx_v_i; __pyx_t_39 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_38, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_39, __pyx_pybuffernd_out.diminfo[1].strides) = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_sumx.rcbuffer->pybuffer.buf, __pyx_t_36, __pyx_pybuffernd_sumx.diminfo[0].strides, __pyx_t_37, __pyx_pybuffernd_sumx.diminfo[1].strides)); } __pyx_L21:; } } /* "pandas/src/generated.pyx":5481 * @cython.boundscheck(False) * @cython.wraparound(False) * def group_add_float32(ndarray[float32_t, ndim=2] out, # <<<<<<<<<<<<<< * ndarray[int64_t] counts, * ndarray[float32_t, ndim=2] values, */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_12); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_counts.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_labels.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_sumx.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.group_add_float32", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_counts.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_labels.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_sumx.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_sumx); __Pyx_XDECREF((PyObject *)__pyx_v_nobs); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":5538 * @cython.boundscheck(False) * @cython.wraparound(False) * def group_add_bin_float64(ndarray[float64_t, ndim=2] out, # <<<<<<<<<<<<<< * ndarray[int64_t] counts, * ndarray[float64_t, ndim=2] values, */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_407group_add_bin_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6pandas_5algos_406group_add_bin_float64[] = "\n Only aggregates on axis=0\n "; static PyMethodDef __pyx_mdef_6pandas_5algos_407group_add_bin_float64 = {__Pyx_NAMESTR("group_add_bin_float64"), (PyCFunction)__pyx_pw_6pandas_5algos_407group_add_bin_float64, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_5algos_406group_add_bin_float64)}; static PyObject *__pyx_pw_6pandas_5algos_407group_add_bin_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_out = 0; PyArrayObject *__pyx_v_counts = 0; PyArrayObject *__pyx_v_values = 0; PyArrayObject *__pyx_v_bins = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("group_add_bin_float64 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_out,&__pyx_n_s_counts,&__pyx_n_s_values,&__pyx_n_s_bins,0}; PyObject* values[4] = {0,0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_out)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_counts)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("group_add_bin_float64", 1, 4, 4, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5538; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_values)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("group_add_bin_float64", 1, 4, 4, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5538; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_bins)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("group_add_bin_float64", 1, 4, 4, 3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5538; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "group_add_bin_float64") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5538; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 4) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[3] = PyTuple_GET_ITEM(__pyx_args, 3); } __pyx_v_out = ((PyArrayObject *)values[0]); __pyx_v_counts = ((PyArrayObject *)values[1]); __pyx_v_values = ((PyArrayObject *)values[2]); __pyx_v_bins = ((PyArrayObject *)values[3]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("group_add_bin_float64", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5538; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.group_add_bin_float64", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_5numpy_ndarray, 1, "out", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5538; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_counts), __pyx_ptype_5numpy_ndarray, 1, "counts", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5539; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5540; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_bins), __pyx_ptype_5numpy_ndarray, 1, "bins", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5541; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_406group_add_bin_float64(__pyx_self, __pyx_v_out, __pyx_v_counts, __pyx_v_values, __pyx_v_bins); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5algos_406group_add_bin_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_out, PyArrayObject *__pyx_v_counts, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_bins) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_N; Py_ssize_t __pyx_v_K; Py_ssize_t __pyx_v_ngroups; Py_ssize_t __pyx_v_b; __pyx_t_5numpy_float64_t __pyx_v_val; PyArrayObject *__pyx_v_sumx = 0; PyArrayObject *__pyx_v_nobs = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_bins; __Pyx_Buffer __pyx_pybuffer_bins; __Pyx_LocalBuf_ND __pyx_pybuffernd_counts; __Pyx_Buffer __pyx_pybuffer_counts; __Pyx_LocalBuf_ND __pyx_pybuffernd_nobs; __Pyx_Buffer __pyx_pybuffer_nobs; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_sumx; __Pyx_Buffer __pyx_pybuffer_sumx; __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; PyArrayObject *__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; Py_ssize_t __pyx_t_11; int __pyx_t_12; PyObject *__pyx_t_13 = NULL; PyObject *(*__pyx_t_14)(PyObject *); Py_ssize_t __pyx_t_15; int __pyx_t_16; int __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; long __pyx_t_28; Py_ssize_t __pyx_t_29; long __pyx_t_30; Py_ssize_t __pyx_t_31; long __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; Py_ssize_t __pyx_t_37; Py_ssize_t __pyx_t_38; Py_ssize_t __pyx_t_39; Py_ssize_t __pyx_t_40; Py_ssize_t __pyx_t_41; Py_ssize_t __pyx_t_42; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("group_add_bin_float64", 0); __pyx_pybuffer_sumx.pybuffer.buf = NULL; __pyx_pybuffer_sumx.refcount = 0; __pyx_pybuffernd_sumx.data = NULL; __pyx_pybuffernd_sumx.rcbuffer = &__pyx_pybuffer_sumx; __pyx_pybuffer_nobs.pybuffer.buf = NULL; __pyx_pybuffer_nobs.refcount = 0; __pyx_pybuffernd_nobs.data = NULL; __pyx_pybuffernd_nobs.rcbuffer = &__pyx_pybuffer_nobs; __pyx_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; __pyx_pybuffer_counts.pybuffer.buf = NULL; __pyx_pybuffer_counts.refcount = 0; __pyx_pybuffernd_counts.data = NULL; __pyx_pybuffernd_counts.rcbuffer = &__pyx_pybuffer_counts; __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_bins.pybuffer.buf = NULL; __pyx_pybuffer_bins.refcount = 0; __pyx_pybuffernd_bins.data = NULL; __pyx_pybuffernd_bins.rcbuffer = &__pyx_pybuffer_bins; { __Pyx_BufFmt_StackElem __pyx_stack[1]; 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, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5538; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; __pyx_pybuffernd_out.diminfo[1].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_out.diminfo[1].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[1]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_counts.rcbuffer->pybuffer, (PyObject*)__pyx_v_counts, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5538; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_counts.diminfo[0].strides = __pyx_pybuffernd_counts.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_counts.diminfo[0].shape = __pyx_pybuffernd_counts.rcbuffer->pybuffer.shape[0]; { __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, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5538; __pyx_clineno = __LINE__; goto __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_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_bins.rcbuffer->pybuffer, (PyObject*)__pyx_v_bins, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5538; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_bins.diminfo[0].strides = __pyx_pybuffernd_bins.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_bins.diminfo[0].shape = __pyx_pybuffernd_bins.rcbuffer->pybuffer.shape[0]; /* "pandas/src/generated.pyx":5550 * ndarray[float64_t, ndim=2] sumx, nobs * * nobs = np.zeros_like(out) # <<<<<<<<<<<<<< * sumx = np.zeros_like(out) * */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5550; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_zeros_like); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5550; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 5550; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)__pyx_v_out)); PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_out)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out)); __pyx_t_3 = PyObject_Call(__pyx_t_2, __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5550; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5550; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_4 = ((PyArrayObject *)__pyx_t_3); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer); __pyx_t_5 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer, (PyObject*)__pyx_t_4, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_nobs.rcbuffer->pybuffer, (PyObject*)__pyx_v_nobs, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_pybuffernd_nobs.diminfo[0].strides = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_nobs.diminfo[0].shape = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_nobs.diminfo[1].strides = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_nobs.diminfo[1].shape = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.shape[1]; if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5550; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_4 = 0; __pyx_v_nobs = ((PyArrayObject *)__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/generated.pyx":5551 * * nobs = np.zeros_like(out) * sumx = np.zeros_like(out) # <<<<<<<<<<<<<< * * if bins[len(bins) - 1] == len(values): */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5551; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_zeros_like); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5551; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5551; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(((PyObject *)__pyx_v_out)); PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_v_out)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out)); __pyx_t_2 = PyObject_Call(__pyx_t_1, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5551; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5551; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_4 = ((PyArrayObject *)__pyx_t_2); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_sumx.rcbuffer->pybuffer); __pyx_t_5 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_sumx.rcbuffer->pybuffer, (PyObject*)__pyx_t_4, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_sumx.rcbuffer->pybuffer, (PyObject*)__pyx_v_sumx, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_pybuffernd_sumx.diminfo[0].strides = __pyx_pybuffernd_sumx.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_sumx.diminfo[0].shape = __pyx_pybuffernd_sumx.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_sumx.diminfo[1].strides = __pyx_pybuffernd_sumx.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_sumx.diminfo[1].shape = __pyx_pybuffernd_sumx.rcbuffer->pybuffer.shape[1]; if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5551; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_4 = 0; __pyx_v_sumx = ((PyArrayObject *)__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":5553 * sumx = np.zeros_like(out) * * if bins[len(bins) - 1] == len(values): # <<<<<<<<<<<<<< * ngroups = len(bins) * else: */ __pyx_t_9 = PyObject_Length(((PyObject *)__pyx_v_bins)); if (unlikely(__pyx_t_9 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5553; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_10 = (__pyx_t_9 - 1); __pyx_t_11 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5553; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_12 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_bins.rcbuffer->pybuffer.buf, __pyx_t_10, __pyx_pybuffernd_bins.diminfo[0].strides)) == __pyx_t_11) != 0); if (__pyx_t_12) { /* "pandas/src/generated.pyx":5554 * * if bins[len(bins) - 1] == len(values): * ngroups = len(bins) # <<<<<<<<<<<<<< * else: * ngroups = len(bins) + 1 */ __pyx_t_11 = PyObject_Length(((PyObject *)__pyx_v_bins)); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5554; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_ngroups = __pyx_t_11; goto __pyx_L3; } /*else*/ { /* "pandas/src/generated.pyx":5556 * ngroups = len(bins) * else: * ngroups = len(bins) + 1 # <<<<<<<<<<<<<< * N, K = ( values).shape * */ __pyx_t_11 = PyObject_Length(((PyObject *)__pyx_v_bins)); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5556; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_ngroups = (__pyx_t_11 + 1); } __pyx_L3:; /* "pandas/src/generated.pyx":5557 * else: * ngroups = len(bins) + 1 * N, K = ( values).shape # <<<<<<<<<<<<<< * * b = 0 */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_values), __pyx_n_s_shape); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5557; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if ((likely(PyTuple_CheckExact(__pyx_t_2))) || (PyList_CheckExact(__pyx_t_2))) { PyObject* sequence = __pyx_t_2; #if CYTHON_COMPILING_IN_CPYTHON Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5557; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_1 = PyTuple_GET_ITEM(sequence, 1); } else { __pyx_t_3 = PyList_GET_ITEM(sequence, 0); __pyx_t_1 = PyList_GET_ITEM(sequence, 1); } __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(__pyx_t_1); #else __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5557; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5557; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); #endif __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } else { Py_ssize_t index = -1; __pyx_t_13 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5557; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_14 = Py_TYPE(__pyx_t_13)->tp_iternext; index = 0; __pyx_t_3 = __pyx_t_14(__pyx_t_13); if (unlikely(!__pyx_t_3)) goto __pyx_L4_unpacking_failed; __Pyx_GOTREF(__pyx_t_3); index = 1; __pyx_t_1 = __pyx_t_14(__pyx_t_13); if (unlikely(!__pyx_t_1)) goto __pyx_L4_unpacking_failed; __Pyx_GOTREF(__pyx_t_1); if (__Pyx_IternextUnpackEndCheck(__pyx_t_14(__pyx_t_13), 2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5557; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_14 = NULL; __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; goto __pyx_L5_unpacking_done; __pyx_L4_unpacking_failed:; __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_14 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5557; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_L5_unpacking_done:; } __pyx_t_11 = __Pyx_PyIndex_AsSsize_t(__pyx_t_3); if (unlikely((__pyx_t_11 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5557; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_9 = __Pyx_PyIndex_AsSsize_t(__pyx_t_1); if (unlikely((__pyx_t_9 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5557; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_N = __pyx_t_11; __pyx_v_K = __pyx_t_9; /* "pandas/src/generated.pyx":5559 * N, K = ( values).shape * * b = 0 # <<<<<<<<<<<<<< * if K > 1: * for i in range(N): */ __pyx_v_b = 0; /* "pandas/src/generated.pyx":5560 * * b = 0 * if K > 1: # <<<<<<<<<<<<<< * for i in range(N): * while b < ngroups - 1 and i >= bins[b]: */ __pyx_t_12 = ((__pyx_v_K > 1) != 0); if (__pyx_t_12) { /* "pandas/src/generated.pyx":5561 * b = 0 * if K > 1: * for i in range(N): # <<<<<<<<<<<<<< * while b < ngroups - 1 and i >= bins[b]: * b += 1 */ __pyx_t_9 = __pyx_v_N; for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_9; __pyx_t_11+=1) { __pyx_v_i = __pyx_t_11; /* "pandas/src/generated.pyx":5562 * if K > 1: * for i in range(N): * while b < ngroups - 1 and i >= bins[b]: # <<<<<<<<<<<<<< * b += 1 * */ while (1) { __pyx_t_12 = ((__pyx_v_b < (__pyx_v_ngroups - 1)) != 0); if (__pyx_t_12) { __pyx_t_15 = __pyx_v_b; __pyx_t_16 = ((__pyx_v_i >= (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_bins.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_bins.diminfo[0].strides))) != 0); __pyx_t_17 = __pyx_t_16; } else { __pyx_t_17 = __pyx_t_12; } if (!__pyx_t_17) break; /* "pandas/src/generated.pyx":5563 * for i in range(N): * while b < ngroups - 1 and i >= bins[b]: * b += 1 # <<<<<<<<<<<<<< * * counts[b] += 1 */ __pyx_v_b = (__pyx_v_b + 1); } /* "pandas/src/generated.pyx":5565 * b += 1 * * counts[b] += 1 # <<<<<<<<<<<<<< * for j in range(K): * val = values[i, j] */ __pyx_t_18 = __pyx_v_b; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_counts.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_counts.diminfo[0].strides) += 1; /* "pandas/src/generated.pyx":5566 * * counts[b] += 1 * for j in range(K): # <<<<<<<<<<<<<< * val = values[i, j] * */ __pyx_t_19 = __pyx_v_K; for (__pyx_t_20 = 0; __pyx_t_20 < __pyx_t_19; __pyx_t_20+=1) { __pyx_v_j = __pyx_t_20; /* "pandas/src/generated.pyx":5567 * counts[b] += 1 * for j in range(K): * val = values[i, j] # <<<<<<<<<<<<<< * * # not nan */ __pyx_t_21 = __pyx_v_i; __pyx_t_22 = __pyx_v_j; __pyx_v_val = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_22, __pyx_pybuffernd_values.diminfo[1].strides)); /* "pandas/src/generated.pyx":5570 * * # not nan * if val == val: # <<<<<<<<<<<<<< * nobs[b, j] += 1 * sumx[b, j] += val */ __pyx_t_17 = ((__pyx_v_val == __pyx_v_val) != 0); if (__pyx_t_17) { /* "pandas/src/generated.pyx":5571 * # not nan * if val == val: * nobs[b, j] += 1 # <<<<<<<<<<<<<< * sumx[b, j] += val * else: */ __pyx_t_23 = __pyx_v_b; __pyx_t_24 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_nobs.rcbuffer->pybuffer.buf, __pyx_t_23, __pyx_pybuffernd_nobs.diminfo[0].strides, __pyx_t_24, __pyx_pybuffernd_nobs.diminfo[1].strides) += 1.0; /* "pandas/src/generated.pyx":5572 * if val == val: * nobs[b, j] += 1 * sumx[b, j] += val # <<<<<<<<<<<<<< * else: * for i in range(N): */ __pyx_t_25 = __pyx_v_b; __pyx_t_26 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_sumx.rcbuffer->pybuffer.buf, __pyx_t_25, __pyx_pybuffernd_sumx.diminfo[0].strides, __pyx_t_26, __pyx_pybuffernd_sumx.diminfo[1].strides) += __pyx_v_val; goto __pyx_L13; } __pyx_L13:; } } goto __pyx_L6; } /*else*/ { /* "pandas/src/generated.pyx":5574 * sumx[b, j] += val * else: * for i in range(N): # <<<<<<<<<<<<<< * while b < ngroups - 1 and i >= bins[b]: * b += 1 */ __pyx_t_9 = __pyx_v_N; for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_9; __pyx_t_11+=1) { __pyx_v_i = __pyx_t_11; /* "pandas/src/generated.pyx":5575 * else: * for i in range(N): * while b < ngroups - 1 and i >= bins[b]: # <<<<<<<<<<<<<< * b += 1 * */ while (1) { __pyx_t_17 = ((__pyx_v_b < (__pyx_v_ngroups - 1)) != 0); if (__pyx_t_17) { __pyx_t_19 = __pyx_v_b; __pyx_t_12 = ((__pyx_v_i >= (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_bins.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_bins.diminfo[0].strides))) != 0); __pyx_t_16 = __pyx_t_12; } else { __pyx_t_16 = __pyx_t_17; } if (!__pyx_t_16) break; /* "pandas/src/generated.pyx":5576 * for i in range(N): * while b < ngroups - 1 and i >= bins[b]: * b += 1 # <<<<<<<<<<<<<< * * counts[b] += 1 */ __pyx_v_b = (__pyx_v_b + 1); } /* "pandas/src/generated.pyx":5578 * b += 1 * * counts[b] += 1 # <<<<<<<<<<<<<< * val = values[i, 0] * */ __pyx_t_20 = __pyx_v_b; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_counts.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_counts.diminfo[0].strides) += 1; /* "pandas/src/generated.pyx":5579 * * counts[b] += 1 * val = values[i, 0] # <<<<<<<<<<<<<< * * # not nan */ __pyx_t_27 = __pyx_v_i; __pyx_t_28 = 0; __pyx_v_val = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_27, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_28, __pyx_pybuffernd_values.diminfo[1].strides)); /* "pandas/src/generated.pyx":5582 * * # not nan * if val == val: # <<<<<<<<<<<<<< * nobs[b, 0] += 1 * sumx[b, 0] += val */ __pyx_t_16 = ((__pyx_v_val == __pyx_v_val) != 0); if (__pyx_t_16) { /* "pandas/src/generated.pyx":5583 * # not nan * if val == val: * nobs[b, 0] += 1 # <<<<<<<<<<<<<< * sumx[b, 0] += val * */ __pyx_t_29 = __pyx_v_b; __pyx_t_30 = 0; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_nobs.rcbuffer->pybuffer.buf, __pyx_t_29, __pyx_pybuffernd_nobs.diminfo[0].strides, __pyx_t_30, __pyx_pybuffernd_nobs.diminfo[1].strides) += 1.0; /* "pandas/src/generated.pyx":5584 * if val == val: * nobs[b, 0] += 1 * sumx[b, 0] += val # <<<<<<<<<<<<<< * * for i in range(ngroups): */ __pyx_t_31 = __pyx_v_b; __pyx_t_32 = 0; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_sumx.rcbuffer->pybuffer.buf, __pyx_t_31, __pyx_pybuffernd_sumx.diminfo[0].strides, __pyx_t_32, __pyx_pybuffernd_sumx.diminfo[1].strides) += __pyx_v_val; goto __pyx_L18; } __pyx_L18:; } } __pyx_L6:; /* "pandas/src/generated.pyx":5586 * sumx[b, 0] += val * * for i in range(ngroups): # <<<<<<<<<<<<<< * for j in range(K): * if nobs[i, j] == 0: */ __pyx_t_9 = __pyx_v_ngroups; for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_9; __pyx_t_11+=1) { __pyx_v_i = __pyx_t_11; /* "pandas/src/generated.pyx":5587 * * for i in range(ngroups): * for j in range(K): # <<<<<<<<<<<<<< * if nobs[i, j] == 0: * out[i, j] = nan */ __pyx_t_33 = __pyx_v_K; for (__pyx_t_34 = 0; __pyx_t_34 < __pyx_t_33; __pyx_t_34+=1) { __pyx_v_j = __pyx_t_34; /* "pandas/src/generated.pyx":5588 * for i in range(ngroups): * for j in range(K): * if nobs[i, j] == 0: # <<<<<<<<<<<<<< * out[i, j] = nan * else: */ __pyx_t_35 = __pyx_v_i; __pyx_t_36 = __pyx_v_j; __pyx_t_16 = (((*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_nobs.rcbuffer->pybuffer.buf, __pyx_t_35, __pyx_pybuffernd_nobs.diminfo[0].strides, __pyx_t_36, __pyx_pybuffernd_nobs.diminfo[1].strides)) == 0.0) != 0); if (__pyx_t_16) { /* "pandas/src/generated.pyx":5589 * for j in range(K): * if nobs[i, j] == 0: * out[i, j] = nan # <<<<<<<<<<<<<< * else: * out[i, j] = sumx[i, j] */ __pyx_t_37 = __pyx_v_i; __pyx_t_38 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_37, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_38, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_6pandas_5algos_nan; goto __pyx_L23; } /*else*/ { /* "pandas/src/generated.pyx":5591 * out[i, j] = nan * else: * out[i, j] = sumx[i, j] # <<<<<<<<<<<<<< * @cython.boundscheck(False) * @cython.wraparound(False) */ __pyx_t_39 = __pyx_v_i; __pyx_t_40 = __pyx_v_j; __pyx_t_41 = __pyx_v_i; __pyx_t_42 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_41, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_42, __pyx_pybuffernd_out.diminfo[1].strides) = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_sumx.rcbuffer->pybuffer.buf, __pyx_t_39, __pyx_pybuffernd_sumx.diminfo[0].strides, __pyx_t_40, __pyx_pybuffernd_sumx.diminfo[1].strides)); } __pyx_L23:; } } /* "pandas/src/generated.pyx":5538 * @cython.boundscheck(False) * @cython.wraparound(False) * def group_add_bin_float64(ndarray[float64_t, ndim=2] out, # <<<<<<<<<<<<<< * ndarray[int64_t] counts, * ndarray[float64_t, ndim=2] 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_13); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_bins.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_counts.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_sumx.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.group_add_bin_float64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_bins.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_counts.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_sumx.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_sumx); __Pyx_XDECREF((PyObject *)__pyx_v_nobs); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":5594 * @cython.boundscheck(False) * @cython.wraparound(False) * def group_add_bin_float32(ndarray[float32_t, ndim=2] out, # <<<<<<<<<<<<<< * ndarray[int64_t] counts, * ndarray[float32_t, ndim=2] values, */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_409group_add_bin_float32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6pandas_5algos_408group_add_bin_float32[] = "\n Only aggregates on axis=0\n "; static PyMethodDef __pyx_mdef_6pandas_5algos_409group_add_bin_float32 = {__Pyx_NAMESTR("group_add_bin_float32"), (PyCFunction)__pyx_pw_6pandas_5algos_409group_add_bin_float32, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_5algos_408group_add_bin_float32)}; static PyObject *__pyx_pw_6pandas_5algos_409group_add_bin_float32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_out = 0; PyArrayObject *__pyx_v_counts = 0; PyArrayObject *__pyx_v_values = 0; PyArrayObject *__pyx_v_bins = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("group_add_bin_float32 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_out,&__pyx_n_s_counts,&__pyx_n_s_values,&__pyx_n_s_bins,0}; PyObject* values[4] = {0,0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_out)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_counts)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("group_add_bin_float32", 1, 4, 4, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5594; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_values)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("group_add_bin_float32", 1, 4, 4, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5594; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_bins)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("group_add_bin_float32", 1, 4, 4, 3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5594; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "group_add_bin_float32") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5594; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 4) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[3] = PyTuple_GET_ITEM(__pyx_args, 3); } __pyx_v_out = ((PyArrayObject *)values[0]); __pyx_v_counts = ((PyArrayObject *)values[1]); __pyx_v_values = ((PyArrayObject *)values[2]); __pyx_v_bins = ((PyArrayObject *)values[3]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("group_add_bin_float32", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5594; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.group_add_bin_float32", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_5numpy_ndarray, 1, "out", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5594; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_counts), __pyx_ptype_5numpy_ndarray, 1, "counts", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5595; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5596; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_bins), __pyx_ptype_5numpy_ndarray, 1, "bins", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5597; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_408group_add_bin_float32(__pyx_self, __pyx_v_out, __pyx_v_counts, __pyx_v_values, __pyx_v_bins); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5algos_408group_add_bin_float32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_out, PyArrayObject *__pyx_v_counts, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_bins) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_N; Py_ssize_t __pyx_v_K; Py_ssize_t __pyx_v_ngroups; Py_ssize_t __pyx_v_b; __pyx_t_5numpy_float32_t __pyx_v_val; PyArrayObject *__pyx_v_sumx = 0; PyArrayObject *__pyx_v_nobs = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_bins; __Pyx_Buffer __pyx_pybuffer_bins; __Pyx_LocalBuf_ND __pyx_pybuffernd_counts; __Pyx_Buffer __pyx_pybuffer_counts; __Pyx_LocalBuf_ND __pyx_pybuffernd_nobs; __Pyx_Buffer __pyx_pybuffer_nobs; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_sumx; __Pyx_Buffer __pyx_pybuffer_sumx; __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; PyArrayObject *__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; Py_ssize_t __pyx_t_11; int __pyx_t_12; PyObject *__pyx_t_13 = NULL; PyObject *(*__pyx_t_14)(PyObject *); Py_ssize_t __pyx_t_15; int __pyx_t_16; int __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; long __pyx_t_28; Py_ssize_t __pyx_t_29; long __pyx_t_30; Py_ssize_t __pyx_t_31; long __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; Py_ssize_t __pyx_t_37; Py_ssize_t __pyx_t_38; Py_ssize_t __pyx_t_39; Py_ssize_t __pyx_t_40; Py_ssize_t __pyx_t_41; Py_ssize_t __pyx_t_42; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("group_add_bin_float32", 0); __pyx_pybuffer_sumx.pybuffer.buf = NULL; __pyx_pybuffer_sumx.refcount = 0; __pyx_pybuffernd_sumx.data = NULL; __pyx_pybuffernd_sumx.rcbuffer = &__pyx_pybuffer_sumx; __pyx_pybuffer_nobs.pybuffer.buf = NULL; __pyx_pybuffer_nobs.refcount = 0; __pyx_pybuffernd_nobs.data = NULL; __pyx_pybuffernd_nobs.rcbuffer = &__pyx_pybuffer_nobs; __pyx_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; __pyx_pybuffer_counts.pybuffer.buf = NULL; __pyx_pybuffer_counts.refcount = 0; __pyx_pybuffernd_counts.data = NULL; __pyx_pybuffernd_counts.rcbuffer = &__pyx_pybuffer_counts; __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_bins.pybuffer.buf = NULL; __pyx_pybuffer_bins.refcount = 0; __pyx_pybuffernd_bins.data = NULL; __pyx_pybuffernd_bins.rcbuffer = &__pyx_pybuffer_bins; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_v_out, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5594; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; __pyx_pybuffernd_out.diminfo[1].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_out.diminfo[1].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[1]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_counts.rcbuffer->pybuffer, (PyObject*)__pyx_v_counts, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5594; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_counts.diminfo[0].strides = __pyx_pybuffernd_counts.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_counts.diminfo[0].shape = __pyx_pybuffernd_counts.rcbuffer->pybuffer.shape[0]; { __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_float32_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5594; __pyx_clineno = __LINE__; goto __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_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_bins.rcbuffer->pybuffer, (PyObject*)__pyx_v_bins, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5594; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_bins.diminfo[0].strides = __pyx_pybuffernd_bins.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_bins.diminfo[0].shape = __pyx_pybuffernd_bins.rcbuffer->pybuffer.shape[0]; /* "pandas/src/generated.pyx":5606 * ndarray[float32_t, ndim=2] sumx, nobs * * nobs = np.zeros_like(out) # <<<<<<<<<<<<<< * sumx = np.zeros_like(out) * */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5606; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_zeros_like); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5606; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 5606; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)__pyx_v_out)); PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_out)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out)); __pyx_t_3 = PyObject_Call(__pyx_t_2, __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5606; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5606; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_4 = ((PyArrayObject *)__pyx_t_3); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer); __pyx_t_5 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer, (PyObject*)__pyx_t_4, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_nobs.rcbuffer->pybuffer, (PyObject*)__pyx_v_nobs, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_pybuffernd_nobs.diminfo[0].strides = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_nobs.diminfo[0].shape = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_nobs.diminfo[1].strides = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_nobs.diminfo[1].shape = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.shape[1]; if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5606; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_4 = 0; __pyx_v_nobs = ((PyArrayObject *)__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/generated.pyx":5607 * * nobs = np.zeros_like(out) * sumx = np.zeros_like(out) # <<<<<<<<<<<<<< * * if bins[len(bins) - 1] == len(values): */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5607; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_zeros_like); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5607; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5607; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(((PyObject *)__pyx_v_out)); PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_v_out)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out)); __pyx_t_2 = PyObject_Call(__pyx_t_1, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5607; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5607; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_4 = ((PyArrayObject *)__pyx_t_2); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_sumx.rcbuffer->pybuffer); __pyx_t_5 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_sumx.rcbuffer->pybuffer, (PyObject*)__pyx_t_4, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_sumx.rcbuffer->pybuffer, (PyObject*)__pyx_v_sumx, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_pybuffernd_sumx.diminfo[0].strides = __pyx_pybuffernd_sumx.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_sumx.diminfo[0].shape = __pyx_pybuffernd_sumx.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_sumx.diminfo[1].strides = __pyx_pybuffernd_sumx.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_sumx.diminfo[1].shape = __pyx_pybuffernd_sumx.rcbuffer->pybuffer.shape[1]; if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5607; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_4 = 0; __pyx_v_sumx = ((PyArrayObject *)__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":5609 * sumx = np.zeros_like(out) * * if bins[len(bins) - 1] == len(values): # <<<<<<<<<<<<<< * ngroups = len(bins) * else: */ __pyx_t_9 = PyObject_Length(((PyObject *)__pyx_v_bins)); if (unlikely(__pyx_t_9 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5609; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_10 = (__pyx_t_9 - 1); __pyx_t_11 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5609; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_12 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_bins.rcbuffer->pybuffer.buf, __pyx_t_10, __pyx_pybuffernd_bins.diminfo[0].strides)) == __pyx_t_11) != 0); if (__pyx_t_12) { /* "pandas/src/generated.pyx":5610 * * if bins[len(bins) - 1] == len(values): * ngroups = len(bins) # <<<<<<<<<<<<<< * else: * ngroups = len(bins) + 1 */ __pyx_t_11 = PyObject_Length(((PyObject *)__pyx_v_bins)); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5610; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_ngroups = __pyx_t_11; goto __pyx_L3; } /*else*/ { /* "pandas/src/generated.pyx":5612 * ngroups = len(bins) * else: * ngroups = len(bins) + 1 # <<<<<<<<<<<<<< * N, K = ( values).shape * */ __pyx_t_11 = PyObject_Length(((PyObject *)__pyx_v_bins)); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5612; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_ngroups = (__pyx_t_11 + 1); } __pyx_L3:; /* "pandas/src/generated.pyx":5613 * else: * ngroups = len(bins) + 1 * N, K = ( values).shape # <<<<<<<<<<<<<< * * b = 0 */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_values), __pyx_n_s_shape); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5613; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if ((likely(PyTuple_CheckExact(__pyx_t_2))) || (PyList_CheckExact(__pyx_t_2))) { PyObject* sequence = __pyx_t_2; #if CYTHON_COMPILING_IN_CPYTHON Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5613; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_1 = PyTuple_GET_ITEM(sequence, 1); } else { __pyx_t_3 = PyList_GET_ITEM(sequence, 0); __pyx_t_1 = PyList_GET_ITEM(sequence, 1); } __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(__pyx_t_1); #else __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5613; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5613; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); #endif __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } else { Py_ssize_t index = -1; __pyx_t_13 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5613; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_14 = Py_TYPE(__pyx_t_13)->tp_iternext; index = 0; __pyx_t_3 = __pyx_t_14(__pyx_t_13); if (unlikely(!__pyx_t_3)) goto __pyx_L4_unpacking_failed; __Pyx_GOTREF(__pyx_t_3); index = 1; __pyx_t_1 = __pyx_t_14(__pyx_t_13); if (unlikely(!__pyx_t_1)) goto __pyx_L4_unpacking_failed; __Pyx_GOTREF(__pyx_t_1); if (__Pyx_IternextUnpackEndCheck(__pyx_t_14(__pyx_t_13), 2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5613; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_14 = NULL; __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; goto __pyx_L5_unpacking_done; __pyx_L4_unpacking_failed:; __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_14 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5613; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_L5_unpacking_done:; } __pyx_t_11 = __Pyx_PyIndex_AsSsize_t(__pyx_t_3); if (unlikely((__pyx_t_11 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5613; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_9 = __Pyx_PyIndex_AsSsize_t(__pyx_t_1); if (unlikely((__pyx_t_9 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5613; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_N = __pyx_t_11; __pyx_v_K = __pyx_t_9; /* "pandas/src/generated.pyx":5615 * N, K = ( values).shape * * b = 0 # <<<<<<<<<<<<<< * if K > 1: * for i in range(N): */ __pyx_v_b = 0; /* "pandas/src/generated.pyx":5616 * * b = 0 * if K > 1: # <<<<<<<<<<<<<< * for i in range(N): * while b < ngroups - 1 and i >= bins[b]: */ __pyx_t_12 = ((__pyx_v_K > 1) != 0); if (__pyx_t_12) { /* "pandas/src/generated.pyx":5617 * b = 0 * if K > 1: * for i in range(N): # <<<<<<<<<<<<<< * while b < ngroups - 1 and i >= bins[b]: * b += 1 */ __pyx_t_9 = __pyx_v_N; for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_9; __pyx_t_11+=1) { __pyx_v_i = __pyx_t_11; /* "pandas/src/generated.pyx":5618 * if K > 1: * for i in range(N): * while b < ngroups - 1 and i >= bins[b]: # <<<<<<<<<<<<<< * b += 1 * */ while (1) { __pyx_t_12 = ((__pyx_v_b < (__pyx_v_ngroups - 1)) != 0); if (__pyx_t_12) { __pyx_t_15 = __pyx_v_b; __pyx_t_16 = ((__pyx_v_i >= (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_bins.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_bins.diminfo[0].strides))) != 0); __pyx_t_17 = __pyx_t_16; } else { __pyx_t_17 = __pyx_t_12; } if (!__pyx_t_17) break; /* "pandas/src/generated.pyx":5619 * for i in range(N): * while b < ngroups - 1 and i >= bins[b]: * b += 1 # <<<<<<<<<<<<<< * * counts[b] += 1 */ __pyx_v_b = (__pyx_v_b + 1); } /* "pandas/src/generated.pyx":5621 * b += 1 * * counts[b] += 1 # <<<<<<<<<<<<<< * for j in range(K): * val = values[i, j] */ __pyx_t_18 = __pyx_v_b; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_counts.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_counts.diminfo[0].strides) += 1; /* "pandas/src/generated.pyx":5622 * * counts[b] += 1 * for j in range(K): # <<<<<<<<<<<<<< * val = values[i, j] * */ __pyx_t_19 = __pyx_v_K; for (__pyx_t_20 = 0; __pyx_t_20 < __pyx_t_19; __pyx_t_20+=1) { __pyx_v_j = __pyx_t_20; /* "pandas/src/generated.pyx":5623 * counts[b] += 1 * for j in range(K): * val = values[i, j] # <<<<<<<<<<<<<< * * # not nan */ __pyx_t_21 = __pyx_v_i; __pyx_t_22 = __pyx_v_j; __pyx_v_val = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_22, __pyx_pybuffernd_values.diminfo[1].strides)); /* "pandas/src/generated.pyx":5626 * * # not nan * if val == val: # <<<<<<<<<<<<<< * nobs[b, j] += 1 * sumx[b, j] += val */ __pyx_t_17 = ((__pyx_v_val == __pyx_v_val) != 0); if (__pyx_t_17) { /* "pandas/src/generated.pyx":5627 * # not nan * if val == val: * nobs[b, j] += 1 # <<<<<<<<<<<<<< * sumx[b, j] += val * else: */ __pyx_t_23 = __pyx_v_b; __pyx_t_24 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_nobs.rcbuffer->pybuffer.buf, __pyx_t_23, __pyx_pybuffernd_nobs.diminfo[0].strides, __pyx_t_24, __pyx_pybuffernd_nobs.diminfo[1].strides) += 1.0; /* "pandas/src/generated.pyx":5628 * if val == val: * nobs[b, j] += 1 * sumx[b, j] += val # <<<<<<<<<<<<<< * else: * for i in range(N): */ __pyx_t_25 = __pyx_v_b; __pyx_t_26 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_sumx.rcbuffer->pybuffer.buf, __pyx_t_25, __pyx_pybuffernd_sumx.diminfo[0].strides, __pyx_t_26, __pyx_pybuffernd_sumx.diminfo[1].strides) += __pyx_v_val; goto __pyx_L13; } __pyx_L13:; } } goto __pyx_L6; } /*else*/ { /* "pandas/src/generated.pyx":5630 * sumx[b, j] += val * else: * for i in range(N): # <<<<<<<<<<<<<< * while b < ngroups - 1 and i >= bins[b]: * b += 1 */ __pyx_t_9 = __pyx_v_N; for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_9; __pyx_t_11+=1) { __pyx_v_i = __pyx_t_11; /* "pandas/src/generated.pyx":5631 * else: * for i in range(N): * while b < ngroups - 1 and i >= bins[b]: # <<<<<<<<<<<<<< * b += 1 * */ while (1) { __pyx_t_17 = ((__pyx_v_b < (__pyx_v_ngroups - 1)) != 0); if (__pyx_t_17) { __pyx_t_19 = __pyx_v_b; __pyx_t_12 = ((__pyx_v_i >= (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_bins.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_bins.diminfo[0].strides))) != 0); __pyx_t_16 = __pyx_t_12; } else { __pyx_t_16 = __pyx_t_17; } if (!__pyx_t_16) break; /* "pandas/src/generated.pyx":5632 * for i in range(N): * while b < ngroups - 1 and i >= bins[b]: * b += 1 # <<<<<<<<<<<<<< * * counts[b] += 1 */ __pyx_v_b = (__pyx_v_b + 1); } /* "pandas/src/generated.pyx":5634 * b += 1 * * counts[b] += 1 # <<<<<<<<<<<<<< * val = values[i, 0] * */ __pyx_t_20 = __pyx_v_b; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_counts.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_counts.diminfo[0].strides) += 1; /* "pandas/src/generated.pyx":5635 * * counts[b] += 1 * val = values[i, 0] # <<<<<<<<<<<<<< * * # not nan */ __pyx_t_27 = __pyx_v_i; __pyx_t_28 = 0; __pyx_v_val = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_27, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_28, __pyx_pybuffernd_values.diminfo[1].strides)); /* "pandas/src/generated.pyx":5638 * * # not nan * if val == val: # <<<<<<<<<<<<<< * nobs[b, 0] += 1 * sumx[b, 0] += val */ __pyx_t_16 = ((__pyx_v_val == __pyx_v_val) != 0); if (__pyx_t_16) { /* "pandas/src/generated.pyx":5639 * # not nan * if val == val: * nobs[b, 0] += 1 # <<<<<<<<<<<<<< * sumx[b, 0] += val * */ __pyx_t_29 = __pyx_v_b; __pyx_t_30 = 0; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_nobs.rcbuffer->pybuffer.buf, __pyx_t_29, __pyx_pybuffernd_nobs.diminfo[0].strides, __pyx_t_30, __pyx_pybuffernd_nobs.diminfo[1].strides) += 1.0; /* "pandas/src/generated.pyx":5640 * if val == val: * nobs[b, 0] += 1 * sumx[b, 0] += val # <<<<<<<<<<<<<< * * for i in range(ngroups): */ __pyx_t_31 = __pyx_v_b; __pyx_t_32 = 0; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_sumx.rcbuffer->pybuffer.buf, __pyx_t_31, __pyx_pybuffernd_sumx.diminfo[0].strides, __pyx_t_32, __pyx_pybuffernd_sumx.diminfo[1].strides) += __pyx_v_val; goto __pyx_L18; } __pyx_L18:; } } __pyx_L6:; /* "pandas/src/generated.pyx":5642 * sumx[b, 0] += val * * for i in range(ngroups): # <<<<<<<<<<<<<< * for j in range(K): * if nobs[i, j] == 0: */ __pyx_t_9 = __pyx_v_ngroups; for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_9; __pyx_t_11+=1) { __pyx_v_i = __pyx_t_11; /* "pandas/src/generated.pyx":5643 * * for i in range(ngroups): * for j in range(K): # <<<<<<<<<<<<<< * if nobs[i, j] == 0: * out[i, j] = nan */ __pyx_t_33 = __pyx_v_K; for (__pyx_t_34 = 0; __pyx_t_34 < __pyx_t_33; __pyx_t_34+=1) { __pyx_v_j = __pyx_t_34; /* "pandas/src/generated.pyx":5644 * for i in range(ngroups): * for j in range(K): * if nobs[i, j] == 0: # <<<<<<<<<<<<<< * out[i, j] = nan * else: */ __pyx_t_35 = __pyx_v_i; __pyx_t_36 = __pyx_v_j; __pyx_t_16 = (((*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_nobs.rcbuffer->pybuffer.buf, __pyx_t_35, __pyx_pybuffernd_nobs.diminfo[0].strides, __pyx_t_36, __pyx_pybuffernd_nobs.diminfo[1].strides)) == 0.0) != 0); if (__pyx_t_16) { /* "pandas/src/generated.pyx":5645 * for j in range(K): * if nobs[i, j] == 0: * out[i, j] = nan # <<<<<<<<<<<<<< * else: * out[i, j] = sumx[i, j] */ __pyx_t_37 = __pyx_v_i; __pyx_t_38 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_37, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_38, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_6pandas_5algos_nan; goto __pyx_L23; } /*else*/ { /* "pandas/src/generated.pyx":5647 * out[i, j] = nan * else: * out[i, j] = sumx[i, j] # <<<<<<<<<<<<<< * * @cython.boundscheck(False) */ __pyx_t_39 = __pyx_v_i; __pyx_t_40 = __pyx_v_j; __pyx_t_41 = __pyx_v_i; __pyx_t_42 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_41, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_42, __pyx_pybuffernd_out.diminfo[1].strides) = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_sumx.rcbuffer->pybuffer.buf, __pyx_t_39, __pyx_pybuffernd_sumx.diminfo[0].strides, __pyx_t_40, __pyx_pybuffernd_sumx.diminfo[1].strides)); } __pyx_L23:; } } /* "pandas/src/generated.pyx":5594 * @cython.boundscheck(False) * @cython.wraparound(False) * def group_add_bin_float32(ndarray[float32_t, ndim=2] out, # <<<<<<<<<<<<<< * ndarray[int64_t] counts, * ndarray[float32_t, ndim=2] 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_13); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_bins.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_counts.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_sumx.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.group_add_bin_float32", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_bins.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_counts.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_sumx.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_sumx); __Pyx_XDECREF((PyObject *)__pyx_v_nobs); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":5651 * @cython.boundscheck(False) * @cython.wraparound(False) * def group_prod_float64(ndarray[float64_t, ndim=2] out, # <<<<<<<<<<<<<< * ndarray[int64_t] counts, * ndarray[float64_t, ndim=2] values, */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_411group_prod_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6pandas_5algos_410group_prod_float64[] = "\n Only aggregates on axis=0\n "; static PyMethodDef __pyx_mdef_6pandas_5algos_411group_prod_float64 = {__Pyx_NAMESTR("group_prod_float64"), (PyCFunction)__pyx_pw_6pandas_5algos_411group_prod_float64, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_5algos_410group_prod_float64)}; static PyObject *__pyx_pw_6pandas_5algos_411group_prod_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_out = 0; PyArrayObject *__pyx_v_counts = 0; PyArrayObject *__pyx_v_values = 0; PyArrayObject *__pyx_v_labels = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("group_prod_float64 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_out,&__pyx_n_s_counts,&__pyx_n_s_values,&__pyx_n_s_labels,0}; PyObject* values[4] = {0,0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_out)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_counts)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("group_prod_float64", 1, 4, 4, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5651; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_values)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("group_prod_float64", 1, 4, 4, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5651; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_labels)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("group_prod_float64", 1, 4, 4, 3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5651; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "group_prod_float64") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5651; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 4) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[3] = PyTuple_GET_ITEM(__pyx_args, 3); } __pyx_v_out = ((PyArrayObject *)values[0]); __pyx_v_counts = ((PyArrayObject *)values[1]); __pyx_v_values = ((PyArrayObject *)values[2]); __pyx_v_labels = ((PyArrayObject *)values[3]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("group_prod_float64", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5651; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.group_prod_float64", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_5numpy_ndarray, 1, "out", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5651; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_counts), __pyx_ptype_5numpy_ndarray, 1, "counts", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5652; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5653; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_labels), __pyx_ptype_5numpy_ndarray, 1, "labels", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5654; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_410group_prod_float64(__pyx_self, __pyx_v_out, __pyx_v_counts, __pyx_v_values, __pyx_v_labels); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5algos_410group_prod_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_out, PyArrayObject *__pyx_v_counts, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_labels) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_N; Py_ssize_t __pyx_v_K; Py_ssize_t __pyx_v_lab; __pyx_t_5numpy_float64_t __pyx_v_val; PyArrayObject *__pyx_v_prodx = 0; PyArrayObject *__pyx_v_nobs = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_counts; __Pyx_Buffer __pyx_pybuffer_counts; __Pyx_LocalBuf_ND __pyx_pybuffernd_labels; __Pyx_Buffer __pyx_pybuffer_labels; __Pyx_LocalBuf_ND __pyx_pybuffernd_nobs; __Pyx_Buffer __pyx_pybuffer_nobs; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_prodx; __Pyx_Buffer __pyx_pybuffer_prodx; __Pyx_LocalBuf_ND __pyx_pybuffernd_values; __Pyx_Buffer __pyx_pybuffer_values; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; Py_ssize_t __pyx_t_2; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyArrayObject *__pyx_t_7 = NULL; int __pyx_t_8; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; PyObject *__pyx_t_11 = NULL; PyObject *__pyx_t_12 = NULL; PyObject *(*__pyx_t_13)(PyObject *); 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; long __pyx_t_25; Py_ssize_t __pyx_t_26; long __pyx_t_27; Py_ssize_t __pyx_t_28; long __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; Py_ssize_t __pyx_t_37; Py_ssize_t __pyx_t_38; Py_ssize_t __pyx_t_39; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("group_prod_float64", 0); __pyx_pybuffer_prodx.pybuffer.buf = NULL; __pyx_pybuffer_prodx.refcount = 0; __pyx_pybuffernd_prodx.data = NULL; __pyx_pybuffernd_prodx.rcbuffer = &__pyx_pybuffer_prodx; __pyx_pybuffer_nobs.pybuffer.buf = NULL; __pyx_pybuffer_nobs.refcount = 0; __pyx_pybuffernd_nobs.data = NULL; __pyx_pybuffernd_nobs.rcbuffer = &__pyx_pybuffer_nobs; __pyx_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; __pyx_pybuffer_counts.pybuffer.buf = NULL; __pyx_pybuffer_counts.refcount = 0; __pyx_pybuffernd_counts.data = NULL; __pyx_pybuffernd_counts.rcbuffer = &__pyx_pybuffer_counts; __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_labels.pybuffer.buf = NULL; __pyx_pybuffer_labels.refcount = 0; __pyx_pybuffernd_labels.data = NULL; __pyx_pybuffernd_labels.rcbuffer = &__pyx_pybuffer_labels; { __Pyx_BufFmt_StackElem __pyx_stack[1]; 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, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5651; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; __pyx_pybuffernd_out.diminfo[1].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_out.diminfo[1].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[1]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_counts.rcbuffer->pybuffer, (PyObject*)__pyx_v_counts, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5651; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_counts.diminfo[0].strides = __pyx_pybuffernd_counts.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_counts.diminfo[0].shape = __pyx_pybuffernd_counts.rcbuffer->pybuffer.shape[0]; { __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, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5651; __pyx_clineno = __LINE__; goto __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_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_labels.rcbuffer->pybuffer, (PyObject*)__pyx_v_labels, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5651; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_labels.diminfo[0].strides = __pyx_pybuffernd_labels.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_labels.diminfo[0].shape = __pyx_pybuffernd_labels.rcbuffer->pybuffer.shape[0]; /* "pandas/src/generated.pyx":5663 * ndarray[float64_t, ndim=2] prodx, nobs * * if not len(values) == len(labels): # <<<<<<<<<<<<<< * raise AssertionError("len(index) != len(labels)") * */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5663; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_2 = PyObject_Length(((PyObject *)__pyx_v_labels)); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5663; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_3 = ((!((__pyx_t_1 == __pyx_t_2) != 0)) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":5664 * * if not len(values) == len(labels): * raise AssertionError("len(index) != len(labels)") # <<<<<<<<<<<<<< * * nobs = np.zeros_like(out) */ __pyx_t_4 = PyObject_Call(__pyx_builtin_AssertionError, __pyx_tuple__183, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5664; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 5664; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } /* "pandas/src/generated.pyx":5666 * raise AssertionError("len(index) != len(labels)") * * nobs = np.zeros_like(out) # <<<<<<<<<<<<<< * prodx = np.ones_like(out) * */ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5666; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_zeros_like); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5666; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5666; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(((PyObject *)__pyx_v_out)); PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_v_out)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out)); __pyx_t_6 = PyObject_Call(__pyx_t_5, __pyx_t_4, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5666; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5666; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_7 = ((PyArrayObject *)__pyx_t_6); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer); __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_nobs.rcbuffer->pybuffer, (PyObject*)__pyx_v_nobs, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_pybuffernd_nobs.diminfo[0].strides = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_nobs.diminfo[0].shape = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_nobs.diminfo[1].strides = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_nobs.diminfo[1].shape = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.shape[1]; if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5666; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_7 = 0; __pyx_v_nobs = ((PyArrayObject *)__pyx_t_6); __pyx_t_6 = 0; /* "pandas/src/generated.pyx":5667 * * nobs = np.zeros_like(out) * prodx = np.ones_like(out) # <<<<<<<<<<<<<< * * N, K = ( values).shape */ __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5667; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_ones_like); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5667; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5667; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(((PyObject *)__pyx_v_out)); PyTuple_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_v_out)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out)); __pyx_t_5 = PyObject_Call(__pyx_t_4, __pyx_t_6, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5667; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5667; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_7 = ((PyArrayObject *)__pyx_t_5); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_prodx.rcbuffer->pybuffer); __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_prodx.rcbuffer->pybuffer, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_prodx.rcbuffer->pybuffer, (PyObject*)__pyx_v_prodx, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_pybuffernd_prodx.diminfo[0].strides = __pyx_pybuffernd_prodx.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_prodx.diminfo[0].shape = __pyx_pybuffernd_prodx.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_prodx.diminfo[1].strides = __pyx_pybuffernd_prodx.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_prodx.diminfo[1].shape = __pyx_pybuffernd_prodx.rcbuffer->pybuffer.shape[1]; if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5667; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_7 = 0; __pyx_v_prodx = ((PyArrayObject *)__pyx_t_5); __pyx_t_5 = 0; /* "pandas/src/generated.pyx":5669 * prodx = np.ones_like(out) * * N, K = ( values).shape # <<<<<<<<<<<<<< * * if K > 1: */ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_values), __pyx_n_s_shape); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5669; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); if ((likely(PyTuple_CheckExact(__pyx_t_5))) || (PyList_CheckExact(__pyx_t_5))) { PyObject* sequence = __pyx_t_5; #if CYTHON_COMPILING_IN_CPYTHON Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5669; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_6 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_4 = PyTuple_GET_ITEM(sequence, 1); } else { __pyx_t_6 = PyList_GET_ITEM(sequence, 0); __pyx_t_4 = PyList_GET_ITEM(sequence, 1); } __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(__pyx_t_4); #else __pyx_t_6 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5669; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5669; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); #endif __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } else { Py_ssize_t index = -1; __pyx_t_12 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5669; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_13 = Py_TYPE(__pyx_t_12)->tp_iternext; index = 0; __pyx_t_6 = __pyx_t_13(__pyx_t_12); if (unlikely(!__pyx_t_6)) goto __pyx_L4_unpacking_failed; __Pyx_GOTREF(__pyx_t_6); index = 1; __pyx_t_4 = __pyx_t_13(__pyx_t_12); if (unlikely(!__pyx_t_4)) goto __pyx_L4_unpacking_failed; __Pyx_GOTREF(__pyx_t_4); if (__Pyx_IternextUnpackEndCheck(__pyx_t_13(__pyx_t_12), 2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5669; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_13 = NULL; __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; goto __pyx_L5_unpacking_done; __pyx_L4_unpacking_failed:; __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __pyx_t_13 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5669; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_L5_unpacking_done:; } __pyx_t_2 = __Pyx_PyIndex_AsSsize_t(__pyx_t_6); if (unlikely((__pyx_t_2 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5669; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_1 = __Pyx_PyIndex_AsSsize_t(__pyx_t_4); if (unlikely((__pyx_t_1 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5669; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_N = __pyx_t_2; __pyx_v_K = __pyx_t_1; /* "pandas/src/generated.pyx":5671 * N, K = ( values).shape * * if K > 1: # <<<<<<<<<<<<<< * for i in range(N): * lab = labels[i] */ __pyx_t_3 = ((__pyx_v_K > 1) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":5672 * * if K > 1: * for i in range(N): # <<<<<<<<<<<<<< * lab = labels[i] * if lab < 0: */ __pyx_t_1 = __pyx_v_N; for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) { __pyx_v_i = __pyx_t_2; /* "pandas/src/generated.pyx":5673 * if K > 1: * for i in range(N): * lab = labels[i] # <<<<<<<<<<<<<< * if lab < 0: * continue */ __pyx_t_14 = __pyx_v_i; __pyx_v_lab = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_labels.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_labels.diminfo[0].strides)); /* "pandas/src/generated.pyx":5674 * for i in range(N): * lab = labels[i] * if lab < 0: # <<<<<<<<<<<<<< * continue * */ __pyx_t_3 = ((__pyx_v_lab < 0) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":5675 * lab = labels[i] * if lab < 0: * continue # <<<<<<<<<<<<<< * * counts[lab] += 1 */ goto __pyx_L7_continue; } /* "pandas/src/generated.pyx":5677 * continue * * counts[lab] += 1 # <<<<<<<<<<<<<< * for j in range(K): * val = values[i, j] */ __pyx_t_15 = __pyx_v_lab; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_counts.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_counts.diminfo[0].strides) += 1; /* "pandas/src/generated.pyx":5678 * * counts[lab] += 1 * for j in range(K): # <<<<<<<<<<<<<< * val = values[i, j] * */ __pyx_t_16 = __pyx_v_K; for (__pyx_t_17 = 0; __pyx_t_17 < __pyx_t_16; __pyx_t_17+=1) { __pyx_v_j = __pyx_t_17; /* "pandas/src/generated.pyx":5679 * counts[lab] += 1 * for j in range(K): * val = values[i, j] # <<<<<<<<<<<<<< * * # not nan */ __pyx_t_18 = __pyx_v_i; __pyx_t_19 = __pyx_v_j; __pyx_v_val = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_19, __pyx_pybuffernd_values.diminfo[1].strides)); /* "pandas/src/generated.pyx":5682 * * # not nan * if val == val: # <<<<<<<<<<<<<< * nobs[lab, j] += 1 * prodx[lab, j] *= val */ __pyx_t_3 = ((__pyx_v_val == __pyx_v_val) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":5683 * # not nan * if val == val: * nobs[lab, j] += 1 # <<<<<<<<<<<<<< * prodx[lab, j] *= val * else: */ __pyx_t_20 = __pyx_v_lab; __pyx_t_21 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_nobs.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_nobs.diminfo[0].strides, __pyx_t_21, __pyx_pybuffernd_nobs.diminfo[1].strides) += 1.0; /* "pandas/src/generated.pyx":5684 * if val == val: * nobs[lab, j] += 1 * prodx[lab, j] *= val # <<<<<<<<<<<<<< * else: * for i in range(N): */ __pyx_t_22 = __pyx_v_lab; __pyx_t_23 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_prodx.rcbuffer->pybuffer.buf, __pyx_t_22, __pyx_pybuffernd_prodx.diminfo[0].strides, __pyx_t_23, __pyx_pybuffernd_prodx.diminfo[1].strides) *= __pyx_v_val; goto __pyx_L12; } __pyx_L12:; } __pyx_L7_continue:; } goto __pyx_L6; } /*else*/ { /* "pandas/src/generated.pyx":5686 * prodx[lab, j] *= val * else: * for i in range(N): # <<<<<<<<<<<<<< * lab = labels[i] * if lab < 0: */ __pyx_t_1 = __pyx_v_N; for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) { __pyx_v_i = __pyx_t_2; /* "pandas/src/generated.pyx":5687 * else: * for i in range(N): * lab = labels[i] # <<<<<<<<<<<<<< * if lab < 0: * continue */ __pyx_t_16 = __pyx_v_i; __pyx_v_lab = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_labels.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_labels.diminfo[0].strides)); /* "pandas/src/generated.pyx":5688 * for i in range(N): * lab = labels[i] * if lab < 0: # <<<<<<<<<<<<<< * continue * */ __pyx_t_3 = ((__pyx_v_lab < 0) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":5689 * lab = labels[i] * if lab < 0: * continue # <<<<<<<<<<<<<< * * counts[lab] += 1 */ goto __pyx_L13_continue; } /* "pandas/src/generated.pyx":5691 * continue * * counts[lab] += 1 # <<<<<<<<<<<<<< * val = values[i, 0] * */ __pyx_t_17 = __pyx_v_lab; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_counts.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_counts.diminfo[0].strides) += 1; /* "pandas/src/generated.pyx":5692 * * counts[lab] += 1 * val = values[i, 0] # <<<<<<<<<<<<<< * * # not nan */ __pyx_t_24 = __pyx_v_i; __pyx_t_25 = 0; __pyx_v_val = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_24, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_25, __pyx_pybuffernd_values.diminfo[1].strides)); /* "pandas/src/generated.pyx":5695 * * # not nan * if val == val: # <<<<<<<<<<<<<< * nobs[lab, 0] += 1 * prodx[lab, 0] *= val */ __pyx_t_3 = ((__pyx_v_val == __pyx_v_val) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":5696 * # not nan * if val == val: * nobs[lab, 0] += 1 # <<<<<<<<<<<<<< * prodx[lab, 0] *= val * */ __pyx_t_26 = __pyx_v_lab; __pyx_t_27 = 0; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_nobs.rcbuffer->pybuffer.buf, __pyx_t_26, __pyx_pybuffernd_nobs.diminfo[0].strides, __pyx_t_27, __pyx_pybuffernd_nobs.diminfo[1].strides) += 1.0; /* "pandas/src/generated.pyx":5697 * if val == val: * nobs[lab, 0] += 1 * prodx[lab, 0] *= val # <<<<<<<<<<<<<< * * for i in range(len(counts)): */ __pyx_t_28 = __pyx_v_lab; __pyx_t_29 = 0; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_prodx.rcbuffer->pybuffer.buf, __pyx_t_28, __pyx_pybuffernd_prodx.diminfo[0].strides, __pyx_t_29, __pyx_pybuffernd_prodx.diminfo[1].strides) *= __pyx_v_val; goto __pyx_L16; } __pyx_L16:; __pyx_L13_continue:; } } __pyx_L6:; /* "pandas/src/generated.pyx":5699 * prodx[lab, 0] *= val * * for i in range(len(counts)): # <<<<<<<<<<<<<< * for j in range(K): * if nobs[i, j] == 0: */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_counts)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5699; __pyx_clineno = __LINE__; goto __pyx_L1_error;} for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) { __pyx_v_i = __pyx_t_2; /* "pandas/src/generated.pyx":5700 * * for i in range(len(counts)): * for j in range(K): # <<<<<<<<<<<<<< * if nobs[i, j] == 0: * out[i, j] = nan */ __pyx_t_30 = __pyx_v_K; for (__pyx_t_31 = 0; __pyx_t_31 < __pyx_t_30; __pyx_t_31+=1) { __pyx_v_j = __pyx_t_31; /* "pandas/src/generated.pyx":5701 * for i in range(len(counts)): * for j in range(K): * if nobs[i, j] == 0: # <<<<<<<<<<<<<< * out[i, j] = nan * else: */ __pyx_t_32 = __pyx_v_i; __pyx_t_33 = __pyx_v_j; __pyx_t_3 = (((*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_nobs.rcbuffer->pybuffer.buf, __pyx_t_32, __pyx_pybuffernd_nobs.diminfo[0].strides, __pyx_t_33, __pyx_pybuffernd_nobs.diminfo[1].strides)) == 0.0) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":5702 * for j in range(K): * if nobs[i, j] == 0: * out[i, j] = nan # <<<<<<<<<<<<<< * else: * out[i, j] = prodx[i, j] */ __pyx_t_34 = __pyx_v_i; __pyx_t_35 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_34, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_35, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_6pandas_5algos_nan; goto __pyx_L21; } /*else*/ { /* "pandas/src/generated.pyx":5704 * out[i, j] = nan * else: * out[i, j] = prodx[i, j] # <<<<<<<<<<<<<< * @cython.boundscheck(False) * @cython.wraparound(False) */ __pyx_t_36 = __pyx_v_i; __pyx_t_37 = __pyx_v_j; __pyx_t_38 = __pyx_v_i; __pyx_t_39 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_38, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_39, __pyx_pybuffernd_out.diminfo[1].strides) = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_prodx.rcbuffer->pybuffer.buf, __pyx_t_36, __pyx_pybuffernd_prodx.diminfo[0].strides, __pyx_t_37, __pyx_pybuffernd_prodx.diminfo[1].strides)); } __pyx_L21:; } } /* "pandas/src/generated.pyx":5651 * @cython.boundscheck(False) * @cython.wraparound(False) * def group_prod_float64(ndarray[float64_t, ndim=2] out, # <<<<<<<<<<<<<< * ndarray[int64_t] counts, * ndarray[float64_t, ndim=2] values, */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_12); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_counts.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_labels.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_prodx.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.group_prod_float64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_counts.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_labels.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_prodx.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_prodx); __Pyx_XDECREF((PyObject *)__pyx_v_nobs); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":5707 * @cython.boundscheck(False) * @cython.wraparound(False) * def group_prod_float32(ndarray[float32_t, ndim=2] out, # <<<<<<<<<<<<<< * ndarray[int64_t] counts, * ndarray[float32_t, ndim=2] values, */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_413group_prod_float32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6pandas_5algos_412group_prod_float32[] = "\n Only aggregates on axis=0\n "; static PyMethodDef __pyx_mdef_6pandas_5algos_413group_prod_float32 = {__Pyx_NAMESTR("group_prod_float32"), (PyCFunction)__pyx_pw_6pandas_5algos_413group_prod_float32, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_5algos_412group_prod_float32)}; static PyObject *__pyx_pw_6pandas_5algos_413group_prod_float32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_out = 0; PyArrayObject *__pyx_v_counts = 0; PyArrayObject *__pyx_v_values = 0; PyArrayObject *__pyx_v_labels = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("group_prod_float32 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_out,&__pyx_n_s_counts,&__pyx_n_s_values,&__pyx_n_s_labels,0}; PyObject* values[4] = {0,0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_out)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_counts)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("group_prod_float32", 1, 4, 4, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5707; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_values)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("group_prod_float32", 1, 4, 4, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5707; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_labels)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("group_prod_float32", 1, 4, 4, 3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5707; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "group_prod_float32") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5707; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 4) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[3] = PyTuple_GET_ITEM(__pyx_args, 3); } __pyx_v_out = ((PyArrayObject *)values[0]); __pyx_v_counts = ((PyArrayObject *)values[1]); __pyx_v_values = ((PyArrayObject *)values[2]); __pyx_v_labels = ((PyArrayObject *)values[3]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("group_prod_float32", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5707; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.group_prod_float32", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_5numpy_ndarray, 1, "out", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5707; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_counts), __pyx_ptype_5numpy_ndarray, 1, "counts", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5708; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5709; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_labels), __pyx_ptype_5numpy_ndarray, 1, "labels", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5710; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_412group_prod_float32(__pyx_self, __pyx_v_out, __pyx_v_counts, __pyx_v_values, __pyx_v_labels); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5algos_412group_prod_float32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_out, PyArrayObject *__pyx_v_counts, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_labels) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_N; Py_ssize_t __pyx_v_K; Py_ssize_t __pyx_v_lab; __pyx_t_5numpy_float32_t __pyx_v_val; PyArrayObject *__pyx_v_prodx = 0; PyArrayObject *__pyx_v_nobs = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_counts; __Pyx_Buffer __pyx_pybuffer_counts; __Pyx_LocalBuf_ND __pyx_pybuffernd_labels; __Pyx_Buffer __pyx_pybuffer_labels; __Pyx_LocalBuf_ND __pyx_pybuffernd_nobs; __Pyx_Buffer __pyx_pybuffer_nobs; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_prodx; __Pyx_Buffer __pyx_pybuffer_prodx; __Pyx_LocalBuf_ND __pyx_pybuffernd_values; __Pyx_Buffer __pyx_pybuffer_values; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; Py_ssize_t __pyx_t_2; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyArrayObject *__pyx_t_7 = NULL; int __pyx_t_8; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; PyObject *__pyx_t_11 = NULL; PyObject *__pyx_t_12 = NULL; PyObject *(*__pyx_t_13)(PyObject *); 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; long __pyx_t_25; Py_ssize_t __pyx_t_26; long __pyx_t_27; Py_ssize_t __pyx_t_28; long __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; Py_ssize_t __pyx_t_37; Py_ssize_t __pyx_t_38; Py_ssize_t __pyx_t_39; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("group_prod_float32", 0); __pyx_pybuffer_prodx.pybuffer.buf = NULL; __pyx_pybuffer_prodx.refcount = 0; __pyx_pybuffernd_prodx.data = NULL; __pyx_pybuffernd_prodx.rcbuffer = &__pyx_pybuffer_prodx; __pyx_pybuffer_nobs.pybuffer.buf = NULL; __pyx_pybuffer_nobs.refcount = 0; __pyx_pybuffernd_nobs.data = NULL; __pyx_pybuffernd_nobs.rcbuffer = &__pyx_pybuffer_nobs; __pyx_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; __pyx_pybuffer_counts.pybuffer.buf = NULL; __pyx_pybuffer_counts.refcount = 0; __pyx_pybuffernd_counts.data = NULL; __pyx_pybuffernd_counts.rcbuffer = &__pyx_pybuffer_counts; __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_labels.pybuffer.buf = NULL; __pyx_pybuffer_labels.refcount = 0; __pyx_pybuffernd_labels.data = NULL; __pyx_pybuffernd_labels.rcbuffer = &__pyx_pybuffer_labels; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_v_out, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5707; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; __pyx_pybuffernd_out.diminfo[1].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_out.diminfo[1].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[1]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_counts.rcbuffer->pybuffer, (PyObject*)__pyx_v_counts, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5707; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_counts.diminfo[0].strides = __pyx_pybuffernd_counts.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_counts.diminfo[0].shape = __pyx_pybuffernd_counts.rcbuffer->pybuffer.shape[0]; { __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_float32_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5707; __pyx_clineno = __LINE__; goto __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_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_labels.rcbuffer->pybuffer, (PyObject*)__pyx_v_labels, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5707; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_labels.diminfo[0].strides = __pyx_pybuffernd_labels.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_labels.diminfo[0].shape = __pyx_pybuffernd_labels.rcbuffer->pybuffer.shape[0]; /* "pandas/src/generated.pyx":5719 * ndarray[float32_t, ndim=2] prodx, nobs * * if not len(values) == len(labels): # <<<<<<<<<<<<<< * raise AssertionError("len(index) != len(labels)") * */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5719; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_2 = PyObject_Length(((PyObject *)__pyx_v_labels)); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5719; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_3 = ((!((__pyx_t_1 == __pyx_t_2) != 0)) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":5720 * * if not len(values) == len(labels): * raise AssertionError("len(index) != len(labels)") # <<<<<<<<<<<<<< * * nobs = np.zeros_like(out) */ __pyx_t_4 = PyObject_Call(__pyx_builtin_AssertionError, __pyx_tuple__184, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5720; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 5720; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } /* "pandas/src/generated.pyx":5722 * raise AssertionError("len(index) != len(labels)") * * nobs = np.zeros_like(out) # <<<<<<<<<<<<<< * prodx = np.ones_like(out) * */ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5722; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_zeros_like); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5722; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5722; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(((PyObject *)__pyx_v_out)); PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_v_out)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out)); __pyx_t_6 = PyObject_Call(__pyx_t_5, __pyx_t_4, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5722; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5722; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_7 = ((PyArrayObject *)__pyx_t_6); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer); __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_nobs.rcbuffer->pybuffer, (PyObject*)__pyx_v_nobs, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_pybuffernd_nobs.diminfo[0].strides = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_nobs.diminfo[0].shape = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_nobs.diminfo[1].strides = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_nobs.diminfo[1].shape = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.shape[1]; if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5722; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_7 = 0; __pyx_v_nobs = ((PyArrayObject *)__pyx_t_6); __pyx_t_6 = 0; /* "pandas/src/generated.pyx":5723 * * nobs = np.zeros_like(out) * prodx = np.ones_like(out) # <<<<<<<<<<<<<< * * N, K = ( values).shape */ __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5723; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_ones_like); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5723; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5723; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(((PyObject *)__pyx_v_out)); PyTuple_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_v_out)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out)); __pyx_t_5 = PyObject_Call(__pyx_t_4, __pyx_t_6, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5723; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5723; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_7 = ((PyArrayObject *)__pyx_t_5); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_prodx.rcbuffer->pybuffer); __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_prodx.rcbuffer->pybuffer, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_prodx.rcbuffer->pybuffer, (PyObject*)__pyx_v_prodx, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_pybuffernd_prodx.diminfo[0].strides = __pyx_pybuffernd_prodx.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_prodx.diminfo[0].shape = __pyx_pybuffernd_prodx.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_prodx.diminfo[1].strides = __pyx_pybuffernd_prodx.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_prodx.diminfo[1].shape = __pyx_pybuffernd_prodx.rcbuffer->pybuffer.shape[1]; if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5723; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_7 = 0; __pyx_v_prodx = ((PyArrayObject *)__pyx_t_5); __pyx_t_5 = 0; /* "pandas/src/generated.pyx":5725 * prodx = np.ones_like(out) * * N, K = ( values).shape # <<<<<<<<<<<<<< * * if K > 1: */ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_values), __pyx_n_s_shape); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5725; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); if ((likely(PyTuple_CheckExact(__pyx_t_5))) || (PyList_CheckExact(__pyx_t_5))) { PyObject* sequence = __pyx_t_5; #if CYTHON_COMPILING_IN_CPYTHON Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5725; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_6 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_4 = PyTuple_GET_ITEM(sequence, 1); } else { __pyx_t_6 = PyList_GET_ITEM(sequence, 0); __pyx_t_4 = PyList_GET_ITEM(sequence, 1); } __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(__pyx_t_4); #else __pyx_t_6 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5725; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5725; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); #endif __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } else { Py_ssize_t index = -1; __pyx_t_12 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5725; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_13 = Py_TYPE(__pyx_t_12)->tp_iternext; index = 0; __pyx_t_6 = __pyx_t_13(__pyx_t_12); if (unlikely(!__pyx_t_6)) goto __pyx_L4_unpacking_failed; __Pyx_GOTREF(__pyx_t_6); index = 1; __pyx_t_4 = __pyx_t_13(__pyx_t_12); if (unlikely(!__pyx_t_4)) goto __pyx_L4_unpacking_failed; __Pyx_GOTREF(__pyx_t_4); if (__Pyx_IternextUnpackEndCheck(__pyx_t_13(__pyx_t_12), 2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5725; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_13 = NULL; __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; goto __pyx_L5_unpacking_done; __pyx_L4_unpacking_failed:; __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __pyx_t_13 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5725; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_L5_unpacking_done:; } __pyx_t_2 = __Pyx_PyIndex_AsSsize_t(__pyx_t_6); if (unlikely((__pyx_t_2 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5725; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_1 = __Pyx_PyIndex_AsSsize_t(__pyx_t_4); if (unlikely((__pyx_t_1 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5725; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_N = __pyx_t_2; __pyx_v_K = __pyx_t_1; /* "pandas/src/generated.pyx":5727 * N, K = ( values).shape * * if K > 1: # <<<<<<<<<<<<<< * for i in range(N): * lab = labels[i] */ __pyx_t_3 = ((__pyx_v_K > 1) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":5728 * * if K > 1: * for i in range(N): # <<<<<<<<<<<<<< * lab = labels[i] * if lab < 0: */ __pyx_t_1 = __pyx_v_N; for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) { __pyx_v_i = __pyx_t_2; /* "pandas/src/generated.pyx":5729 * if K > 1: * for i in range(N): * lab = labels[i] # <<<<<<<<<<<<<< * if lab < 0: * continue */ __pyx_t_14 = __pyx_v_i; __pyx_v_lab = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_labels.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_labels.diminfo[0].strides)); /* "pandas/src/generated.pyx":5730 * for i in range(N): * lab = labels[i] * if lab < 0: # <<<<<<<<<<<<<< * continue * */ __pyx_t_3 = ((__pyx_v_lab < 0) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":5731 * lab = labels[i] * if lab < 0: * continue # <<<<<<<<<<<<<< * * counts[lab] += 1 */ goto __pyx_L7_continue; } /* "pandas/src/generated.pyx":5733 * continue * * counts[lab] += 1 # <<<<<<<<<<<<<< * for j in range(K): * val = values[i, j] */ __pyx_t_15 = __pyx_v_lab; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_counts.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_counts.diminfo[0].strides) += 1; /* "pandas/src/generated.pyx":5734 * * counts[lab] += 1 * for j in range(K): # <<<<<<<<<<<<<< * val = values[i, j] * */ __pyx_t_16 = __pyx_v_K; for (__pyx_t_17 = 0; __pyx_t_17 < __pyx_t_16; __pyx_t_17+=1) { __pyx_v_j = __pyx_t_17; /* "pandas/src/generated.pyx":5735 * counts[lab] += 1 * for j in range(K): * val = values[i, j] # <<<<<<<<<<<<<< * * # not nan */ __pyx_t_18 = __pyx_v_i; __pyx_t_19 = __pyx_v_j; __pyx_v_val = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_19, __pyx_pybuffernd_values.diminfo[1].strides)); /* "pandas/src/generated.pyx":5738 * * # not nan * if val == val: # <<<<<<<<<<<<<< * nobs[lab, j] += 1 * prodx[lab, j] *= val */ __pyx_t_3 = ((__pyx_v_val == __pyx_v_val) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":5739 * # not nan * if val == val: * nobs[lab, j] += 1 # <<<<<<<<<<<<<< * prodx[lab, j] *= val * else: */ __pyx_t_20 = __pyx_v_lab; __pyx_t_21 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_nobs.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_nobs.diminfo[0].strides, __pyx_t_21, __pyx_pybuffernd_nobs.diminfo[1].strides) += 1.0; /* "pandas/src/generated.pyx":5740 * if val == val: * nobs[lab, j] += 1 * prodx[lab, j] *= val # <<<<<<<<<<<<<< * else: * for i in range(N): */ __pyx_t_22 = __pyx_v_lab; __pyx_t_23 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_prodx.rcbuffer->pybuffer.buf, __pyx_t_22, __pyx_pybuffernd_prodx.diminfo[0].strides, __pyx_t_23, __pyx_pybuffernd_prodx.diminfo[1].strides) *= __pyx_v_val; goto __pyx_L12; } __pyx_L12:; } __pyx_L7_continue:; } goto __pyx_L6; } /*else*/ { /* "pandas/src/generated.pyx":5742 * prodx[lab, j] *= val * else: * for i in range(N): # <<<<<<<<<<<<<< * lab = labels[i] * if lab < 0: */ __pyx_t_1 = __pyx_v_N; for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) { __pyx_v_i = __pyx_t_2; /* "pandas/src/generated.pyx":5743 * else: * for i in range(N): * lab = labels[i] # <<<<<<<<<<<<<< * if lab < 0: * continue */ __pyx_t_16 = __pyx_v_i; __pyx_v_lab = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_labels.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_labels.diminfo[0].strides)); /* "pandas/src/generated.pyx":5744 * for i in range(N): * lab = labels[i] * if lab < 0: # <<<<<<<<<<<<<< * continue * */ __pyx_t_3 = ((__pyx_v_lab < 0) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":5745 * lab = labels[i] * if lab < 0: * continue # <<<<<<<<<<<<<< * * counts[lab] += 1 */ goto __pyx_L13_continue; } /* "pandas/src/generated.pyx":5747 * continue * * counts[lab] += 1 # <<<<<<<<<<<<<< * val = values[i, 0] * */ __pyx_t_17 = __pyx_v_lab; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_counts.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_counts.diminfo[0].strides) += 1; /* "pandas/src/generated.pyx":5748 * * counts[lab] += 1 * val = values[i, 0] # <<<<<<<<<<<<<< * * # not nan */ __pyx_t_24 = __pyx_v_i; __pyx_t_25 = 0; __pyx_v_val = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_24, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_25, __pyx_pybuffernd_values.diminfo[1].strides)); /* "pandas/src/generated.pyx":5751 * * # not nan * if val == val: # <<<<<<<<<<<<<< * nobs[lab, 0] += 1 * prodx[lab, 0] *= val */ __pyx_t_3 = ((__pyx_v_val == __pyx_v_val) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":5752 * # not nan * if val == val: * nobs[lab, 0] += 1 # <<<<<<<<<<<<<< * prodx[lab, 0] *= val * */ __pyx_t_26 = __pyx_v_lab; __pyx_t_27 = 0; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_nobs.rcbuffer->pybuffer.buf, __pyx_t_26, __pyx_pybuffernd_nobs.diminfo[0].strides, __pyx_t_27, __pyx_pybuffernd_nobs.diminfo[1].strides) += 1.0; /* "pandas/src/generated.pyx":5753 * if val == val: * nobs[lab, 0] += 1 * prodx[lab, 0] *= val # <<<<<<<<<<<<<< * * for i in range(len(counts)): */ __pyx_t_28 = __pyx_v_lab; __pyx_t_29 = 0; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_prodx.rcbuffer->pybuffer.buf, __pyx_t_28, __pyx_pybuffernd_prodx.diminfo[0].strides, __pyx_t_29, __pyx_pybuffernd_prodx.diminfo[1].strides) *= __pyx_v_val; goto __pyx_L16; } __pyx_L16:; __pyx_L13_continue:; } } __pyx_L6:; /* "pandas/src/generated.pyx":5755 * prodx[lab, 0] *= val * * for i in range(len(counts)): # <<<<<<<<<<<<<< * for j in range(K): * if nobs[i, j] == 0: */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_counts)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5755; __pyx_clineno = __LINE__; goto __pyx_L1_error;} for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) { __pyx_v_i = __pyx_t_2; /* "pandas/src/generated.pyx":5756 * * for i in range(len(counts)): * for j in range(K): # <<<<<<<<<<<<<< * if nobs[i, j] == 0: * out[i, j] = nan */ __pyx_t_30 = __pyx_v_K; for (__pyx_t_31 = 0; __pyx_t_31 < __pyx_t_30; __pyx_t_31+=1) { __pyx_v_j = __pyx_t_31; /* "pandas/src/generated.pyx":5757 * for i in range(len(counts)): * for j in range(K): * if nobs[i, j] == 0: # <<<<<<<<<<<<<< * out[i, j] = nan * else: */ __pyx_t_32 = __pyx_v_i; __pyx_t_33 = __pyx_v_j; __pyx_t_3 = (((*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_nobs.rcbuffer->pybuffer.buf, __pyx_t_32, __pyx_pybuffernd_nobs.diminfo[0].strides, __pyx_t_33, __pyx_pybuffernd_nobs.diminfo[1].strides)) == 0.0) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":5758 * for j in range(K): * if nobs[i, j] == 0: * out[i, j] = nan # <<<<<<<<<<<<<< * else: * out[i, j] = prodx[i, j] */ __pyx_t_34 = __pyx_v_i; __pyx_t_35 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_34, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_35, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_6pandas_5algos_nan; goto __pyx_L21; } /*else*/ { /* "pandas/src/generated.pyx":5760 * out[i, j] = nan * else: * out[i, j] = prodx[i, j] # <<<<<<<<<<<<<< * * @cython.boundscheck(False) */ __pyx_t_36 = __pyx_v_i; __pyx_t_37 = __pyx_v_j; __pyx_t_38 = __pyx_v_i; __pyx_t_39 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_38, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_39, __pyx_pybuffernd_out.diminfo[1].strides) = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_prodx.rcbuffer->pybuffer.buf, __pyx_t_36, __pyx_pybuffernd_prodx.diminfo[0].strides, __pyx_t_37, __pyx_pybuffernd_prodx.diminfo[1].strides)); } __pyx_L21:; } } /* "pandas/src/generated.pyx":5707 * @cython.boundscheck(False) * @cython.wraparound(False) * def group_prod_float32(ndarray[float32_t, ndim=2] out, # <<<<<<<<<<<<<< * ndarray[int64_t] counts, * ndarray[float32_t, ndim=2] values, */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_12); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_counts.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_labels.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_prodx.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.group_prod_float32", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_counts.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_labels.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_prodx.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_prodx); __Pyx_XDECREF((PyObject *)__pyx_v_nobs); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":5764 * @cython.boundscheck(False) * @cython.wraparound(False) * def group_prod_bin_float64(ndarray[float64_t, ndim=2] out, # <<<<<<<<<<<<<< * ndarray[int64_t] counts, * ndarray[float64_t, ndim=2] values, */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_415group_prod_bin_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6pandas_5algos_414group_prod_bin_float64[] = "\n Only aggregates on axis=0\n "; static PyMethodDef __pyx_mdef_6pandas_5algos_415group_prod_bin_float64 = {__Pyx_NAMESTR("group_prod_bin_float64"), (PyCFunction)__pyx_pw_6pandas_5algos_415group_prod_bin_float64, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_5algos_414group_prod_bin_float64)}; static PyObject *__pyx_pw_6pandas_5algos_415group_prod_bin_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_out = 0; PyArrayObject *__pyx_v_counts = 0; PyArrayObject *__pyx_v_values = 0; PyArrayObject *__pyx_v_bins = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("group_prod_bin_float64 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_out,&__pyx_n_s_counts,&__pyx_n_s_values,&__pyx_n_s_bins,0}; PyObject* values[4] = {0,0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_out)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_counts)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("group_prod_bin_float64", 1, 4, 4, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5764; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_values)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("group_prod_bin_float64", 1, 4, 4, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5764; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_bins)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("group_prod_bin_float64", 1, 4, 4, 3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5764; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "group_prod_bin_float64") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5764; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 4) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[3] = PyTuple_GET_ITEM(__pyx_args, 3); } __pyx_v_out = ((PyArrayObject *)values[0]); __pyx_v_counts = ((PyArrayObject *)values[1]); __pyx_v_values = ((PyArrayObject *)values[2]); __pyx_v_bins = ((PyArrayObject *)values[3]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("group_prod_bin_float64", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5764; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.group_prod_bin_float64", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_5numpy_ndarray, 1, "out", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5764; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_counts), __pyx_ptype_5numpy_ndarray, 1, "counts", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5765; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5766; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_bins), __pyx_ptype_5numpy_ndarray, 1, "bins", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5767; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_414group_prod_bin_float64(__pyx_self, __pyx_v_out, __pyx_v_counts, __pyx_v_values, __pyx_v_bins); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5algos_414group_prod_bin_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_out, PyArrayObject *__pyx_v_counts, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_bins) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_N; Py_ssize_t __pyx_v_K; Py_ssize_t __pyx_v_ngroups; Py_ssize_t __pyx_v_b; __pyx_t_5numpy_float64_t __pyx_v_val; PyArrayObject *__pyx_v_prodx = 0; PyArrayObject *__pyx_v_nobs = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_bins; __Pyx_Buffer __pyx_pybuffer_bins; __Pyx_LocalBuf_ND __pyx_pybuffernd_counts; __Pyx_Buffer __pyx_pybuffer_counts; __Pyx_LocalBuf_ND __pyx_pybuffernd_nobs; __Pyx_Buffer __pyx_pybuffer_nobs; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_prodx; __Pyx_Buffer __pyx_pybuffer_prodx; __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; PyArrayObject *__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; Py_ssize_t __pyx_t_11; int __pyx_t_12; PyObject *__pyx_t_13 = NULL; PyObject *(*__pyx_t_14)(PyObject *); Py_ssize_t __pyx_t_15; int __pyx_t_16; int __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; long __pyx_t_28; Py_ssize_t __pyx_t_29; long __pyx_t_30; Py_ssize_t __pyx_t_31; long __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; Py_ssize_t __pyx_t_37; Py_ssize_t __pyx_t_38; Py_ssize_t __pyx_t_39; Py_ssize_t __pyx_t_40; Py_ssize_t __pyx_t_41; Py_ssize_t __pyx_t_42; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("group_prod_bin_float64", 0); __pyx_pybuffer_prodx.pybuffer.buf = NULL; __pyx_pybuffer_prodx.refcount = 0; __pyx_pybuffernd_prodx.data = NULL; __pyx_pybuffernd_prodx.rcbuffer = &__pyx_pybuffer_prodx; __pyx_pybuffer_nobs.pybuffer.buf = NULL; __pyx_pybuffer_nobs.refcount = 0; __pyx_pybuffernd_nobs.data = NULL; __pyx_pybuffernd_nobs.rcbuffer = &__pyx_pybuffer_nobs; __pyx_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; __pyx_pybuffer_counts.pybuffer.buf = NULL; __pyx_pybuffer_counts.refcount = 0; __pyx_pybuffernd_counts.data = NULL; __pyx_pybuffernd_counts.rcbuffer = &__pyx_pybuffer_counts; __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_bins.pybuffer.buf = NULL; __pyx_pybuffer_bins.refcount = 0; __pyx_pybuffernd_bins.data = NULL; __pyx_pybuffernd_bins.rcbuffer = &__pyx_pybuffer_bins; { __Pyx_BufFmt_StackElem __pyx_stack[1]; 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, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5764; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; __pyx_pybuffernd_out.diminfo[1].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_out.diminfo[1].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[1]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_counts.rcbuffer->pybuffer, (PyObject*)__pyx_v_counts, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5764; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_counts.diminfo[0].strides = __pyx_pybuffernd_counts.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_counts.diminfo[0].shape = __pyx_pybuffernd_counts.rcbuffer->pybuffer.shape[0]; { __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, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5764; __pyx_clineno = __LINE__; goto __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_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_bins.rcbuffer->pybuffer, (PyObject*)__pyx_v_bins, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5764; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_bins.diminfo[0].strides = __pyx_pybuffernd_bins.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_bins.diminfo[0].shape = __pyx_pybuffernd_bins.rcbuffer->pybuffer.shape[0]; /* "pandas/src/generated.pyx":5776 * ndarray[float64_t, ndim=2] prodx, nobs * * nobs = np.zeros_like(out) # <<<<<<<<<<<<<< * prodx = np.ones_like(out) * */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5776; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_zeros_like); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5776; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 5776; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)__pyx_v_out)); PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_out)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out)); __pyx_t_3 = PyObject_Call(__pyx_t_2, __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5776; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5776; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_4 = ((PyArrayObject *)__pyx_t_3); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer); __pyx_t_5 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer, (PyObject*)__pyx_t_4, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_nobs.rcbuffer->pybuffer, (PyObject*)__pyx_v_nobs, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_pybuffernd_nobs.diminfo[0].strides = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_nobs.diminfo[0].shape = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_nobs.diminfo[1].strides = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_nobs.diminfo[1].shape = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.shape[1]; if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5776; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_4 = 0; __pyx_v_nobs = ((PyArrayObject *)__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/generated.pyx":5777 * * nobs = np.zeros_like(out) * prodx = np.ones_like(out) # <<<<<<<<<<<<<< * * if bins[len(bins) - 1] == len(values): */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5777; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_ones_like); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5777; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5777; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(((PyObject *)__pyx_v_out)); PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_v_out)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out)); __pyx_t_2 = PyObject_Call(__pyx_t_1, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5777; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5777; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_4 = ((PyArrayObject *)__pyx_t_2); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_prodx.rcbuffer->pybuffer); __pyx_t_5 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_prodx.rcbuffer->pybuffer, (PyObject*)__pyx_t_4, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_prodx.rcbuffer->pybuffer, (PyObject*)__pyx_v_prodx, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_pybuffernd_prodx.diminfo[0].strides = __pyx_pybuffernd_prodx.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_prodx.diminfo[0].shape = __pyx_pybuffernd_prodx.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_prodx.diminfo[1].strides = __pyx_pybuffernd_prodx.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_prodx.diminfo[1].shape = __pyx_pybuffernd_prodx.rcbuffer->pybuffer.shape[1]; if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5777; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_4 = 0; __pyx_v_prodx = ((PyArrayObject *)__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":5779 * prodx = np.ones_like(out) * * if bins[len(bins) - 1] == len(values): # <<<<<<<<<<<<<< * ngroups = len(bins) * else: */ __pyx_t_9 = PyObject_Length(((PyObject *)__pyx_v_bins)); if (unlikely(__pyx_t_9 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5779; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_10 = (__pyx_t_9 - 1); __pyx_t_11 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5779; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_12 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_bins.rcbuffer->pybuffer.buf, __pyx_t_10, __pyx_pybuffernd_bins.diminfo[0].strides)) == __pyx_t_11) != 0); if (__pyx_t_12) { /* "pandas/src/generated.pyx":5780 * * if bins[len(bins) - 1] == len(values): * ngroups = len(bins) # <<<<<<<<<<<<<< * else: * ngroups = len(bins) + 1 */ __pyx_t_11 = PyObject_Length(((PyObject *)__pyx_v_bins)); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5780; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_ngroups = __pyx_t_11; goto __pyx_L3; } /*else*/ { /* "pandas/src/generated.pyx":5782 * ngroups = len(bins) * else: * ngroups = len(bins) + 1 # <<<<<<<<<<<<<< * N, K = ( values).shape * */ __pyx_t_11 = PyObject_Length(((PyObject *)__pyx_v_bins)); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5782; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_ngroups = (__pyx_t_11 + 1); } __pyx_L3:; /* "pandas/src/generated.pyx":5783 * else: * ngroups = len(bins) + 1 * N, K = ( values).shape # <<<<<<<<<<<<<< * * b = 0 */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_values), __pyx_n_s_shape); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5783; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if ((likely(PyTuple_CheckExact(__pyx_t_2))) || (PyList_CheckExact(__pyx_t_2))) { PyObject* sequence = __pyx_t_2; #if CYTHON_COMPILING_IN_CPYTHON Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5783; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_1 = PyTuple_GET_ITEM(sequence, 1); } else { __pyx_t_3 = PyList_GET_ITEM(sequence, 0); __pyx_t_1 = PyList_GET_ITEM(sequence, 1); } __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(__pyx_t_1); #else __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5783; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5783; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); #endif __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } else { Py_ssize_t index = -1; __pyx_t_13 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5783; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_14 = Py_TYPE(__pyx_t_13)->tp_iternext; index = 0; __pyx_t_3 = __pyx_t_14(__pyx_t_13); if (unlikely(!__pyx_t_3)) goto __pyx_L4_unpacking_failed; __Pyx_GOTREF(__pyx_t_3); index = 1; __pyx_t_1 = __pyx_t_14(__pyx_t_13); if (unlikely(!__pyx_t_1)) goto __pyx_L4_unpacking_failed; __Pyx_GOTREF(__pyx_t_1); if (__Pyx_IternextUnpackEndCheck(__pyx_t_14(__pyx_t_13), 2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5783; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_14 = NULL; __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; goto __pyx_L5_unpacking_done; __pyx_L4_unpacking_failed:; __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_14 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5783; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_L5_unpacking_done:; } __pyx_t_11 = __Pyx_PyIndex_AsSsize_t(__pyx_t_3); if (unlikely((__pyx_t_11 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5783; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_9 = __Pyx_PyIndex_AsSsize_t(__pyx_t_1); if (unlikely((__pyx_t_9 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5783; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_N = __pyx_t_11; __pyx_v_K = __pyx_t_9; /* "pandas/src/generated.pyx":5785 * N, K = ( values).shape * * b = 0 # <<<<<<<<<<<<<< * if K > 1: * for i in range(N): */ __pyx_v_b = 0; /* "pandas/src/generated.pyx":5786 * * b = 0 * if K > 1: # <<<<<<<<<<<<<< * for i in range(N): * while b < ngroups - 1 and i >= bins[b]: */ __pyx_t_12 = ((__pyx_v_K > 1) != 0); if (__pyx_t_12) { /* "pandas/src/generated.pyx":5787 * b = 0 * if K > 1: * for i in range(N): # <<<<<<<<<<<<<< * while b < ngroups - 1 and i >= bins[b]: * b += 1 */ __pyx_t_9 = __pyx_v_N; for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_9; __pyx_t_11+=1) { __pyx_v_i = __pyx_t_11; /* "pandas/src/generated.pyx":5788 * if K > 1: * for i in range(N): * while b < ngroups - 1 and i >= bins[b]: # <<<<<<<<<<<<<< * b += 1 * */ while (1) { __pyx_t_12 = ((__pyx_v_b < (__pyx_v_ngroups - 1)) != 0); if (__pyx_t_12) { __pyx_t_15 = __pyx_v_b; __pyx_t_16 = ((__pyx_v_i >= (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_bins.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_bins.diminfo[0].strides))) != 0); __pyx_t_17 = __pyx_t_16; } else { __pyx_t_17 = __pyx_t_12; } if (!__pyx_t_17) break; /* "pandas/src/generated.pyx":5789 * for i in range(N): * while b < ngroups - 1 and i >= bins[b]: * b += 1 # <<<<<<<<<<<<<< * * counts[b] += 1 */ __pyx_v_b = (__pyx_v_b + 1); } /* "pandas/src/generated.pyx":5791 * b += 1 * * counts[b] += 1 # <<<<<<<<<<<<<< * for j in range(K): * val = values[i, j] */ __pyx_t_18 = __pyx_v_b; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_counts.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_counts.diminfo[0].strides) += 1; /* "pandas/src/generated.pyx":5792 * * counts[b] += 1 * for j in range(K): # <<<<<<<<<<<<<< * val = values[i, j] * */ __pyx_t_19 = __pyx_v_K; for (__pyx_t_20 = 0; __pyx_t_20 < __pyx_t_19; __pyx_t_20+=1) { __pyx_v_j = __pyx_t_20; /* "pandas/src/generated.pyx":5793 * counts[b] += 1 * for j in range(K): * val = values[i, j] # <<<<<<<<<<<<<< * * # not nan */ __pyx_t_21 = __pyx_v_i; __pyx_t_22 = __pyx_v_j; __pyx_v_val = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_22, __pyx_pybuffernd_values.diminfo[1].strides)); /* "pandas/src/generated.pyx":5796 * * # not nan * if val == val: # <<<<<<<<<<<<<< * nobs[b, j] += 1 * prodx[b, j] *= val */ __pyx_t_17 = ((__pyx_v_val == __pyx_v_val) != 0); if (__pyx_t_17) { /* "pandas/src/generated.pyx":5797 * # not nan * if val == val: * nobs[b, j] += 1 # <<<<<<<<<<<<<< * prodx[b, j] *= val * else: */ __pyx_t_23 = __pyx_v_b; __pyx_t_24 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_nobs.rcbuffer->pybuffer.buf, __pyx_t_23, __pyx_pybuffernd_nobs.diminfo[0].strides, __pyx_t_24, __pyx_pybuffernd_nobs.diminfo[1].strides) += 1.0; /* "pandas/src/generated.pyx":5798 * if val == val: * nobs[b, j] += 1 * prodx[b, j] *= val # <<<<<<<<<<<<<< * else: * for i in range(N): */ __pyx_t_25 = __pyx_v_b; __pyx_t_26 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_prodx.rcbuffer->pybuffer.buf, __pyx_t_25, __pyx_pybuffernd_prodx.diminfo[0].strides, __pyx_t_26, __pyx_pybuffernd_prodx.diminfo[1].strides) *= __pyx_v_val; goto __pyx_L13; } __pyx_L13:; } } goto __pyx_L6; } /*else*/ { /* "pandas/src/generated.pyx":5800 * prodx[b, j] *= val * else: * for i in range(N): # <<<<<<<<<<<<<< * while b < ngroups - 1 and i >= bins[b]: * b += 1 */ __pyx_t_9 = __pyx_v_N; for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_9; __pyx_t_11+=1) { __pyx_v_i = __pyx_t_11; /* "pandas/src/generated.pyx":5801 * else: * for i in range(N): * while b < ngroups - 1 and i >= bins[b]: # <<<<<<<<<<<<<< * b += 1 * */ while (1) { __pyx_t_17 = ((__pyx_v_b < (__pyx_v_ngroups - 1)) != 0); if (__pyx_t_17) { __pyx_t_19 = __pyx_v_b; __pyx_t_12 = ((__pyx_v_i >= (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_bins.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_bins.diminfo[0].strides))) != 0); __pyx_t_16 = __pyx_t_12; } else { __pyx_t_16 = __pyx_t_17; } if (!__pyx_t_16) break; /* "pandas/src/generated.pyx":5802 * for i in range(N): * while b < ngroups - 1 and i >= bins[b]: * b += 1 # <<<<<<<<<<<<<< * * counts[b] += 1 */ __pyx_v_b = (__pyx_v_b + 1); } /* "pandas/src/generated.pyx":5804 * b += 1 * * counts[b] += 1 # <<<<<<<<<<<<<< * val = values[i, 0] * */ __pyx_t_20 = __pyx_v_b; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_counts.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_counts.diminfo[0].strides) += 1; /* "pandas/src/generated.pyx":5805 * * counts[b] += 1 * val = values[i, 0] # <<<<<<<<<<<<<< * * # not nan */ __pyx_t_27 = __pyx_v_i; __pyx_t_28 = 0; __pyx_v_val = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_27, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_28, __pyx_pybuffernd_values.diminfo[1].strides)); /* "pandas/src/generated.pyx":5808 * * # not nan * if val == val: # <<<<<<<<<<<<<< * nobs[b, 0] += 1 * prodx[b, 0] *= val */ __pyx_t_16 = ((__pyx_v_val == __pyx_v_val) != 0); if (__pyx_t_16) { /* "pandas/src/generated.pyx":5809 * # not nan * if val == val: * nobs[b, 0] += 1 # <<<<<<<<<<<<<< * prodx[b, 0] *= val * */ __pyx_t_29 = __pyx_v_b; __pyx_t_30 = 0; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_nobs.rcbuffer->pybuffer.buf, __pyx_t_29, __pyx_pybuffernd_nobs.diminfo[0].strides, __pyx_t_30, __pyx_pybuffernd_nobs.diminfo[1].strides) += 1.0; /* "pandas/src/generated.pyx":5810 * if val == val: * nobs[b, 0] += 1 * prodx[b, 0] *= val # <<<<<<<<<<<<<< * * for i in range(ngroups): */ __pyx_t_31 = __pyx_v_b; __pyx_t_32 = 0; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_prodx.rcbuffer->pybuffer.buf, __pyx_t_31, __pyx_pybuffernd_prodx.diminfo[0].strides, __pyx_t_32, __pyx_pybuffernd_prodx.diminfo[1].strides) *= __pyx_v_val; goto __pyx_L18; } __pyx_L18:; } } __pyx_L6:; /* "pandas/src/generated.pyx":5812 * prodx[b, 0] *= val * * for i in range(ngroups): # <<<<<<<<<<<<<< * for j in range(K): * if nobs[i, j] == 0: */ __pyx_t_9 = __pyx_v_ngroups; for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_9; __pyx_t_11+=1) { __pyx_v_i = __pyx_t_11; /* "pandas/src/generated.pyx":5813 * * for i in range(ngroups): * for j in range(K): # <<<<<<<<<<<<<< * if nobs[i, j] == 0: * out[i, j] = nan */ __pyx_t_33 = __pyx_v_K; for (__pyx_t_34 = 0; __pyx_t_34 < __pyx_t_33; __pyx_t_34+=1) { __pyx_v_j = __pyx_t_34; /* "pandas/src/generated.pyx":5814 * for i in range(ngroups): * for j in range(K): * if nobs[i, j] == 0: # <<<<<<<<<<<<<< * out[i, j] = nan * else: */ __pyx_t_35 = __pyx_v_i; __pyx_t_36 = __pyx_v_j; __pyx_t_16 = (((*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_nobs.rcbuffer->pybuffer.buf, __pyx_t_35, __pyx_pybuffernd_nobs.diminfo[0].strides, __pyx_t_36, __pyx_pybuffernd_nobs.diminfo[1].strides)) == 0.0) != 0); if (__pyx_t_16) { /* "pandas/src/generated.pyx":5815 * for j in range(K): * if nobs[i, j] == 0: * out[i, j] = nan # <<<<<<<<<<<<<< * else: * out[i, j] = prodx[i, j] */ __pyx_t_37 = __pyx_v_i; __pyx_t_38 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_37, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_38, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_6pandas_5algos_nan; goto __pyx_L23; } /*else*/ { /* "pandas/src/generated.pyx":5817 * out[i, j] = nan * else: * out[i, j] = prodx[i, j] # <<<<<<<<<<<<<< * @cython.boundscheck(False) * @cython.wraparound(False) */ __pyx_t_39 = __pyx_v_i; __pyx_t_40 = __pyx_v_j; __pyx_t_41 = __pyx_v_i; __pyx_t_42 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_41, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_42, __pyx_pybuffernd_out.diminfo[1].strides) = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_prodx.rcbuffer->pybuffer.buf, __pyx_t_39, __pyx_pybuffernd_prodx.diminfo[0].strides, __pyx_t_40, __pyx_pybuffernd_prodx.diminfo[1].strides)); } __pyx_L23:; } } /* "pandas/src/generated.pyx":5764 * @cython.boundscheck(False) * @cython.wraparound(False) * def group_prod_bin_float64(ndarray[float64_t, ndim=2] out, # <<<<<<<<<<<<<< * ndarray[int64_t] counts, * ndarray[float64_t, ndim=2] 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_13); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_bins.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_counts.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_prodx.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.group_prod_bin_float64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_bins.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_counts.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_prodx.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_prodx); __Pyx_XDECREF((PyObject *)__pyx_v_nobs); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":5820 * @cython.boundscheck(False) * @cython.wraparound(False) * def group_prod_bin_float32(ndarray[float32_t, ndim=2] out, # <<<<<<<<<<<<<< * ndarray[int64_t] counts, * ndarray[float32_t, ndim=2] values, */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_417group_prod_bin_float32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6pandas_5algos_416group_prod_bin_float32[] = "\n Only aggregates on axis=0\n "; static PyMethodDef __pyx_mdef_6pandas_5algos_417group_prod_bin_float32 = {__Pyx_NAMESTR("group_prod_bin_float32"), (PyCFunction)__pyx_pw_6pandas_5algos_417group_prod_bin_float32, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_5algos_416group_prod_bin_float32)}; static PyObject *__pyx_pw_6pandas_5algos_417group_prod_bin_float32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_out = 0; PyArrayObject *__pyx_v_counts = 0; PyArrayObject *__pyx_v_values = 0; PyArrayObject *__pyx_v_bins = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("group_prod_bin_float32 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_out,&__pyx_n_s_counts,&__pyx_n_s_values,&__pyx_n_s_bins,0}; PyObject* values[4] = {0,0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_out)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_counts)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("group_prod_bin_float32", 1, 4, 4, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5820; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_values)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("group_prod_bin_float32", 1, 4, 4, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5820; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_bins)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("group_prod_bin_float32", 1, 4, 4, 3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5820; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "group_prod_bin_float32") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5820; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 4) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[3] = PyTuple_GET_ITEM(__pyx_args, 3); } __pyx_v_out = ((PyArrayObject *)values[0]); __pyx_v_counts = ((PyArrayObject *)values[1]); __pyx_v_values = ((PyArrayObject *)values[2]); __pyx_v_bins = ((PyArrayObject *)values[3]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("group_prod_bin_float32", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5820; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.group_prod_bin_float32", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_5numpy_ndarray, 1, "out", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5820; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_counts), __pyx_ptype_5numpy_ndarray, 1, "counts", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5821; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5822; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_bins), __pyx_ptype_5numpy_ndarray, 1, "bins", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5823; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_416group_prod_bin_float32(__pyx_self, __pyx_v_out, __pyx_v_counts, __pyx_v_values, __pyx_v_bins); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5algos_416group_prod_bin_float32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_out, PyArrayObject *__pyx_v_counts, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_bins) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_N; Py_ssize_t __pyx_v_K; Py_ssize_t __pyx_v_ngroups; Py_ssize_t __pyx_v_b; __pyx_t_5numpy_float32_t __pyx_v_val; PyArrayObject *__pyx_v_prodx = 0; PyArrayObject *__pyx_v_nobs = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_bins; __Pyx_Buffer __pyx_pybuffer_bins; __Pyx_LocalBuf_ND __pyx_pybuffernd_counts; __Pyx_Buffer __pyx_pybuffer_counts; __Pyx_LocalBuf_ND __pyx_pybuffernd_nobs; __Pyx_Buffer __pyx_pybuffer_nobs; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_prodx; __Pyx_Buffer __pyx_pybuffer_prodx; __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; PyArrayObject *__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; Py_ssize_t __pyx_t_11; int __pyx_t_12; PyObject *__pyx_t_13 = NULL; PyObject *(*__pyx_t_14)(PyObject *); Py_ssize_t __pyx_t_15; int __pyx_t_16; int __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; long __pyx_t_28; Py_ssize_t __pyx_t_29; long __pyx_t_30; Py_ssize_t __pyx_t_31; long __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; Py_ssize_t __pyx_t_37; Py_ssize_t __pyx_t_38; Py_ssize_t __pyx_t_39; Py_ssize_t __pyx_t_40; Py_ssize_t __pyx_t_41; Py_ssize_t __pyx_t_42; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("group_prod_bin_float32", 0); __pyx_pybuffer_prodx.pybuffer.buf = NULL; __pyx_pybuffer_prodx.refcount = 0; __pyx_pybuffernd_prodx.data = NULL; __pyx_pybuffernd_prodx.rcbuffer = &__pyx_pybuffer_prodx; __pyx_pybuffer_nobs.pybuffer.buf = NULL; __pyx_pybuffer_nobs.refcount = 0; __pyx_pybuffernd_nobs.data = NULL; __pyx_pybuffernd_nobs.rcbuffer = &__pyx_pybuffer_nobs; __pyx_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; __pyx_pybuffer_counts.pybuffer.buf = NULL; __pyx_pybuffer_counts.refcount = 0; __pyx_pybuffernd_counts.data = NULL; __pyx_pybuffernd_counts.rcbuffer = &__pyx_pybuffer_counts; __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_bins.pybuffer.buf = NULL; __pyx_pybuffer_bins.refcount = 0; __pyx_pybuffernd_bins.data = NULL; __pyx_pybuffernd_bins.rcbuffer = &__pyx_pybuffer_bins; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_v_out, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5820; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; __pyx_pybuffernd_out.diminfo[1].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_out.diminfo[1].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[1]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_counts.rcbuffer->pybuffer, (PyObject*)__pyx_v_counts, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5820; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_counts.diminfo[0].strides = __pyx_pybuffernd_counts.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_counts.diminfo[0].shape = __pyx_pybuffernd_counts.rcbuffer->pybuffer.shape[0]; { __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_float32_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5820; __pyx_clineno = __LINE__; goto __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_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_bins.rcbuffer->pybuffer, (PyObject*)__pyx_v_bins, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5820; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_bins.diminfo[0].strides = __pyx_pybuffernd_bins.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_bins.diminfo[0].shape = __pyx_pybuffernd_bins.rcbuffer->pybuffer.shape[0]; /* "pandas/src/generated.pyx":5832 * ndarray[float32_t, ndim=2] prodx, nobs * * nobs = np.zeros_like(out) # <<<<<<<<<<<<<< * prodx = np.ones_like(out) * */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5832; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_zeros_like); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5832; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 5832; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)__pyx_v_out)); PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_out)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out)); __pyx_t_3 = PyObject_Call(__pyx_t_2, __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5832; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5832; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_4 = ((PyArrayObject *)__pyx_t_3); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer); __pyx_t_5 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer, (PyObject*)__pyx_t_4, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_nobs.rcbuffer->pybuffer, (PyObject*)__pyx_v_nobs, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_pybuffernd_nobs.diminfo[0].strides = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_nobs.diminfo[0].shape = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_nobs.diminfo[1].strides = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_nobs.diminfo[1].shape = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.shape[1]; if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5832; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_4 = 0; __pyx_v_nobs = ((PyArrayObject *)__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/generated.pyx":5833 * * nobs = np.zeros_like(out) * prodx = np.ones_like(out) # <<<<<<<<<<<<<< * * if bins[len(bins) - 1] == len(values): */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5833; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_ones_like); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5833; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5833; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(((PyObject *)__pyx_v_out)); PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_v_out)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out)); __pyx_t_2 = PyObject_Call(__pyx_t_1, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5833; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5833; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_4 = ((PyArrayObject *)__pyx_t_2); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_prodx.rcbuffer->pybuffer); __pyx_t_5 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_prodx.rcbuffer->pybuffer, (PyObject*)__pyx_t_4, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_prodx.rcbuffer->pybuffer, (PyObject*)__pyx_v_prodx, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_pybuffernd_prodx.diminfo[0].strides = __pyx_pybuffernd_prodx.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_prodx.diminfo[0].shape = __pyx_pybuffernd_prodx.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_prodx.diminfo[1].strides = __pyx_pybuffernd_prodx.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_prodx.diminfo[1].shape = __pyx_pybuffernd_prodx.rcbuffer->pybuffer.shape[1]; if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5833; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_4 = 0; __pyx_v_prodx = ((PyArrayObject *)__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":5835 * prodx = np.ones_like(out) * * if bins[len(bins) - 1] == len(values): # <<<<<<<<<<<<<< * ngroups = len(bins) * else: */ __pyx_t_9 = PyObject_Length(((PyObject *)__pyx_v_bins)); if (unlikely(__pyx_t_9 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5835; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_10 = (__pyx_t_9 - 1); __pyx_t_11 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5835; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_12 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_bins.rcbuffer->pybuffer.buf, __pyx_t_10, __pyx_pybuffernd_bins.diminfo[0].strides)) == __pyx_t_11) != 0); if (__pyx_t_12) { /* "pandas/src/generated.pyx":5836 * * if bins[len(bins) - 1] == len(values): * ngroups = len(bins) # <<<<<<<<<<<<<< * else: * ngroups = len(bins) + 1 */ __pyx_t_11 = PyObject_Length(((PyObject *)__pyx_v_bins)); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5836; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_ngroups = __pyx_t_11; goto __pyx_L3; } /*else*/ { /* "pandas/src/generated.pyx":5838 * ngroups = len(bins) * else: * ngroups = len(bins) + 1 # <<<<<<<<<<<<<< * N, K = ( values).shape * */ __pyx_t_11 = PyObject_Length(((PyObject *)__pyx_v_bins)); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5838; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_ngroups = (__pyx_t_11 + 1); } __pyx_L3:; /* "pandas/src/generated.pyx":5839 * else: * ngroups = len(bins) + 1 * N, K = ( values).shape # <<<<<<<<<<<<<< * * b = 0 */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_values), __pyx_n_s_shape); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5839; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if ((likely(PyTuple_CheckExact(__pyx_t_2))) || (PyList_CheckExact(__pyx_t_2))) { PyObject* sequence = __pyx_t_2; #if CYTHON_COMPILING_IN_CPYTHON Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5839; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_1 = PyTuple_GET_ITEM(sequence, 1); } else { __pyx_t_3 = PyList_GET_ITEM(sequence, 0); __pyx_t_1 = PyList_GET_ITEM(sequence, 1); } __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(__pyx_t_1); #else __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5839; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5839; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); #endif __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } else { Py_ssize_t index = -1; __pyx_t_13 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5839; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_14 = Py_TYPE(__pyx_t_13)->tp_iternext; index = 0; __pyx_t_3 = __pyx_t_14(__pyx_t_13); if (unlikely(!__pyx_t_3)) goto __pyx_L4_unpacking_failed; __Pyx_GOTREF(__pyx_t_3); index = 1; __pyx_t_1 = __pyx_t_14(__pyx_t_13); if (unlikely(!__pyx_t_1)) goto __pyx_L4_unpacking_failed; __Pyx_GOTREF(__pyx_t_1); if (__Pyx_IternextUnpackEndCheck(__pyx_t_14(__pyx_t_13), 2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5839; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_14 = NULL; __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; goto __pyx_L5_unpacking_done; __pyx_L4_unpacking_failed:; __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_14 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5839; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_L5_unpacking_done:; } __pyx_t_11 = __Pyx_PyIndex_AsSsize_t(__pyx_t_3); if (unlikely((__pyx_t_11 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5839; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_9 = __Pyx_PyIndex_AsSsize_t(__pyx_t_1); if (unlikely((__pyx_t_9 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5839; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_N = __pyx_t_11; __pyx_v_K = __pyx_t_9; /* "pandas/src/generated.pyx":5841 * N, K = ( values).shape * * b = 0 # <<<<<<<<<<<<<< * if K > 1: * for i in range(N): */ __pyx_v_b = 0; /* "pandas/src/generated.pyx":5842 * * b = 0 * if K > 1: # <<<<<<<<<<<<<< * for i in range(N): * while b < ngroups - 1 and i >= bins[b]: */ __pyx_t_12 = ((__pyx_v_K > 1) != 0); if (__pyx_t_12) { /* "pandas/src/generated.pyx":5843 * b = 0 * if K > 1: * for i in range(N): # <<<<<<<<<<<<<< * while b < ngroups - 1 and i >= bins[b]: * b += 1 */ __pyx_t_9 = __pyx_v_N; for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_9; __pyx_t_11+=1) { __pyx_v_i = __pyx_t_11; /* "pandas/src/generated.pyx":5844 * if K > 1: * for i in range(N): * while b < ngroups - 1 and i >= bins[b]: # <<<<<<<<<<<<<< * b += 1 * */ while (1) { __pyx_t_12 = ((__pyx_v_b < (__pyx_v_ngroups - 1)) != 0); if (__pyx_t_12) { __pyx_t_15 = __pyx_v_b; __pyx_t_16 = ((__pyx_v_i >= (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_bins.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_bins.diminfo[0].strides))) != 0); __pyx_t_17 = __pyx_t_16; } else { __pyx_t_17 = __pyx_t_12; } if (!__pyx_t_17) break; /* "pandas/src/generated.pyx":5845 * for i in range(N): * while b < ngroups - 1 and i >= bins[b]: * b += 1 # <<<<<<<<<<<<<< * * counts[b] += 1 */ __pyx_v_b = (__pyx_v_b + 1); } /* "pandas/src/generated.pyx":5847 * b += 1 * * counts[b] += 1 # <<<<<<<<<<<<<< * for j in range(K): * val = values[i, j] */ __pyx_t_18 = __pyx_v_b; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_counts.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_counts.diminfo[0].strides) += 1; /* "pandas/src/generated.pyx":5848 * * counts[b] += 1 * for j in range(K): # <<<<<<<<<<<<<< * val = values[i, j] * */ __pyx_t_19 = __pyx_v_K; for (__pyx_t_20 = 0; __pyx_t_20 < __pyx_t_19; __pyx_t_20+=1) { __pyx_v_j = __pyx_t_20; /* "pandas/src/generated.pyx":5849 * counts[b] += 1 * for j in range(K): * val = values[i, j] # <<<<<<<<<<<<<< * * # not nan */ __pyx_t_21 = __pyx_v_i; __pyx_t_22 = __pyx_v_j; __pyx_v_val = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_22, __pyx_pybuffernd_values.diminfo[1].strides)); /* "pandas/src/generated.pyx":5852 * * # not nan * if val == val: # <<<<<<<<<<<<<< * nobs[b, j] += 1 * prodx[b, j] *= val */ __pyx_t_17 = ((__pyx_v_val == __pyx_v_val) != 0); if (__pyx_t_17) { /* "pandas/src/generated.pyx":5853 * # not nan * if val == val: * nobs[b, j] += 1 # <<<<<<<<<<<<<< * prodx[b, j] *= val * else: */ __pyx_t_23 = __pyx_v_b; __pyx_t_24 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_nobs.rcbuffer->pybuffer.buf, __pyx_t_23, __pyx_pybuffernd_nobs.diminfo[0].strides, __pyx_t_24, __pyx_pybuffernd_nobs.diminfo[1].strides) += 1.0; /* "pandas/src/generated.pyx":5854 * if val == val: * nobs[b, j] += 1 * prodx[b, j] *= val # <<<<<<<<<<<<<< * else: * for i in range(N): */ __pyx_t_25 = __pyx_v_b; __pyx_t_26 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_prodx.rcbuffer->pybuffer.buf, __pyx_t_25, __pyx_pybuffernd_prodx.diminfo[0].strides, __pyx_t_26, __pyx_pybuffernd_prodx.diminfo[1].strides) *= __pyx_v_val; goto __pyx_L13; } __pyx_L13:; } } goto __pyx_L6; } /*else*/ { /* "pandas/src/generated.pyx":5856 * prodx[b, j] *= val * else: * for i in range(N): # <<<<<<<<<<<<<< * while b < ngroups - 1 and i >= bins[b]: * b += 1 */ __pyx_t_9 = __pyx_v_N; for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_9; __pyx_t_11+=1) { __pyx_v_i = __pyx_t_11; /* "pandas/src/generated.pyx":5857 * else: * for i in range(N): * while b < ngroups - 1 and i >= bins[b]: # <<<<<<<<<<<<<< * b += 1 * */ while (1) { __pyx_t_17 = ((__pyx_v_b < (__pyx_v_ngroups - 1)) != 0); if (__pyx_t_17) { __pyx_t_19 = __pyx_v_b; __pyx_t_12 = ((__pyx_v_i >= (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_bins.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_bins.diminfo[0].strides))) != 0); __pyx_t_16 = __pyx_t_12; } else { __pyx_t_16 = __pyx_t_17; } if (!__pyx_t_16) break; /* "pandas/src/generated.pyx":5858 * for i in range(N): * while b < ngroups - 1 and i >= bins[b]: * b += 1 # <<<<<<<<<<<<<< * * counts[b] += 1 */ __pyx_v_b = (__pyx_v_b + 1); } /* "pandas/src/generated.pyx":5860 * b += 1 * * counts[b] += 1 # <<<<<<<<<<<<<< * val = values[i, 0] * */ __pyx_t_20 = __pyx_v_b; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_counts.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_counts.diminfo[0].strides) += 1; /* "pandas/src/generated.pyx":5861 * * counts[b] += 1 * val = values[i, 0] # <<<<<<<<<<<<<< * * # not nan */ __pyx_t_27 = __pyx_v_i; __pyx_t_28 = 0; __pyx_v_val = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_27, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_28, __pyx_pybuffernd_values.diminfo[1].strides)); /* "pandas/src/generated.pyx":5864 * * # not nan * if val == val: # <<<<<<<<<<<<<< * nobs[b, 0] += 1 * prodx[b, 0] *= val */ __pyx_t_16 = ((__pyx_v_val == __pyx_v_val) != 0); if (__pyx_t_16) { /* "pandas/src/generated.pyx":5865 * # not nan * if val == val: * nobs[b, 0] += 1 # <<<<<<<<<<<<<< * prodx[b, 0] *= val * */ __pyx_t_29 = __pyx_v_b; __pyx_t_30 = 0; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_nobs.rcbuffer->pybuffer.buf, __pyx_t_29, __pyx_pybuffernd_nobs.diminfo[0].strides, __pyx_t_30, __pyx_pybuffernd_nobs.diminfo[1].strides) += 1.0; /* "pandas/src/generated.pyx":5866 * if val == val: * nobs[b, 0] += 1 * prodx[b, 0] *= val # <<<<<<<<<<<<<< * * for i in range(ngroups): */ __pyx_t_31 = __pyx_v_b; __pyx_t_32 = 0; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_prodx.rcbuffer->pybuffer.buf, __pyx_t_31, __pyx_pybuffernd_prodx.diminfo[0].strides, __pyx_t_32, __pyx_pybuffernd_prodx.diminfo[1].strides) *= __pyx_v_val; goto __pyx_L18; } __pyx_L18:; } } __pyx_L6:; /* "pandas/src/generated.pyx":5868 * prodx[b, 0] *= val * * for i in range(ngroups): # <<<<<<<<<<<<<< * for j in range(K): * if nobs[i, j] == 0: */ __pyx_t_9 = __pyx_v_ngroups; for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_9; __pyx_t_11+=1) { __pyx_v_i = __pyx_t_11; /* "pandas/src/generated.pyx":5869 * * for i in range(ngroups): * for j in range(K): # <<<<<<<<<<<<<< * if nobs[i, j] == 0: * out[i, j] = nan */ __pyx_t_33 = __pyx_v_K; for (__pyx_t_34 = 0; __pyx_t_34 < __pyx_t_33; __pyx_t_34+=1) { __pyx_v_j = __pyx_t_34; /* "pandas/src/generated.pyx":5870 * for i in range(ngroups): * for j in range(K): * if nobs[i, j] == 0: # <<<<<<<<<<<<<< * out[i, j] = nan * else: */ __pyx_t_35 = __pyx_v_i; __pyx_t_36 = __pyx_v_j; __pyx_t_16 = (((*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_nobs.rcbuffer->pybuffer.buf, __pyx_t_35, __pyx_pybuffernd_nobs.diminfo[0].strides, __pyx_t_36, __pyx_pybuffernd_nobs.diminfo[1].strides)) == 0.0) != 0); if (__pyx_t_16) { /* "pandas/src/generated.pyx":5871 * for j in range(K): * if nobs[i, j] == 0: * out[i, j] = nan # <<<<<<<<<<<<<< * else: * out[i, j] = prodx[i, j] */ __pyx_t_37 = __pyx_v_i; __pyx_t_38 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_37, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_38, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_6pandas_5algos_nan; goto __pyx_L23; } /*else*/ { /* "pandas/src/generated.pyx":5873 * out[i, j] = nan * else: * out[i, j] = prodx[i, j] # <<<<<<<<<<<<<< * * @cython.wraparound(False) */ __pyx_t_39 = __pyx_v_i; __pyx_t_40 = __pyx_v_j; __pyx_t_41 = __pyx_v_i; __pyx_t_42 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_41, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_42, __pyx_pybuffernd_out.diminfo[1].strides) = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_prodx.rcbuffer->pybuffer.buf, __pyx_t_39, __pyx_pybuffernd_prodx.diminfo[0].strides, __pyx_t_40, __pyx_pybuffernd_prodx.diminfo[1].strides)); } __pyx_L23:; } } /* "pandas/src/generated.pyx":5820 * @cython.boundscheck(False) * @cython.wraparound(False) * def group_prod_bin_float32(ndarray[float32_t, ndim=2] out, # <<<<<<<<<<<<<< * ndarray[int64_t] counts, * ndarray[float32_t, ndim=2] 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_13); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_bins.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_counts.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_prodx.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.group_prod_bin_float32", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_bins.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_counts.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_prodx.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_prodx); __Pyx_XDECREF((PyObject *)__pyx_v_nobs); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":5877 * @cython.wraparound(False) * @cython.boundscheck(False) * def group_var_float64(ndarray[float64_t, ndim=2] out, # <<<<<<<<<<<<<< * ndarray[int64_t] counts, * ndarray[float64_t, ndim=2] values, */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_419group_var_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_419group_var_float64 = {__Pyx_NAMESTR("group_var_float64"), (PyCFunction)__pyx_pw_6pandas_5algos_419group_var_float64, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_419group_var_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_out = 0; PyArrayObject *__pyx_v_counts = 0; PyArrayObject *__pyx_v_values = 0; PyArrayObject *__pyx_v_labels = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("group_var_float64 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_out,&__pyx_n_s_counts,&__pyx_n_s_values,&__pyx_n_s_labels,0}; PyObject* values[4] = {0,0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_out)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_counts)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("group_var_float64", 1, 4, 4, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5877; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_values)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("group_var_float64", 1, 4, 4, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5877; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_labels)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("group_var_float64", 1, 4, 4, 3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5877; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "group_var_float64") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5877; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 4) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[3] = PyTuple_GET_ITEM(__pyx_args, 3); } __pyx_v_out = ((PyArrayObject *)values[0]); __pyx_v_counts = ((PyArrayObject *)values[1]); __pyx_v_values = ((PyArrayObject *)values[2]); __pyx_v_labels = ((PyArrayObject *)values[3]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("group_var_float64", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5877; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.group_var_float64", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_5numpy_ndarray, 1, "out", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5877; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_counts), __pyx_ptype_5numpy_ndarray, 1, "counts", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5878; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5879; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_labels), __pyx_ptype_5numpy_ndarray, 1, "labels", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5880; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_418group_var_float64(__pyx_self, __pyx_v_out, __pyx_v_counts, __pyx_v_values, __pyx_v_labels); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5algos_418group_var_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_out, PyArrayObject *__pyx_v_counts, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_labels) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_N; Py_ssize_t __pyx_v_K; Py_ssize_t __pyx_v_lab; __pyx_t_5numpy_float64_t __pyx_v_val; __pyx_t_5numpy_float64_t __pyx_v_ct; PyArrayObject *__pyx_v_nobs = 0; PyArrayObject *__pyx_v_sumx = 0; PyArrayObject *__pyx_v_sumxx = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_counts; __Pyx_Buffer __pyx_pybuffer_counts; __Pyx_LocalBuf_ND __pyx_pybuffernd_labels; __Pyx_Buffer __pyx_pybuffer_labels; __Pyx_LocalBuf_ND __pyx_pybuffernd_nobs; __Pyx_Buffer __pyx_pybuffer_nobs; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_sumx; __Pyx_Buffer __pyx_pybuffer_sumx; __Pyx_LocalBuf_ND __pyx_pybuffernd_sumxx; __Pyx_Buffer __pyx_pybuffer_sumxx; __Pyx_LocalBuf_ND __pyx_pybuffernd_values; __Pyx_Buffer __pyx_pybuffer_values; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; Py_ssize_t __pyx_t_2; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyArrayObject *__pyx_t_7 = NULL; int __pyx_t_8; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; PyObject *__pyx_t_11 = NULL; PyObject *__pyx_t_12 = NULL; PyObject *(*__pyx_t_13)(PyObject *); 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; Py_ssize_t __pyx_t_26; long __pyx_t_27; Py_ssize_t __pyx_t_28; long __pyx_t_29; Py_ssize_t __pyx_t_30; long __pyx_t_31; Py_ssize_t __pyx_t_32; long __pyx_t_33; Py_ssize_t __pyx_t_34; Py_ssize_t __pyx_t_35; Py_ssize_t __pyx_t_36; Py_ssize_t __pyx_t_37; Py_ssize_t __pyx_t_38; Py_ssize_t __pyx_t_39; Py_ssize_t __pyx_t_40; Py_ssize_t __pyx_t_41; Py_ssize_t __pyx_t_42; Py_ssize_t __pyx_t_43; Py_ssize_t __pyx_t_44; Py_ssize_t __pyx_t_45; __pyx_t_5numpy_float64_t __pyx_t_46; __pyx_t_5numpy_float64_t __pyx_t_47; Py_ssize_t __pyx_t_48; Py_ssize_t __pyx_t_49; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("group_var_float64", 0); __pyx_pybuffer_nobs.pybuffer.buf = NULL; __pyx_pybuffer_nobs.refcount = 0; __pyx_pybuffernd_nobs.data = NULL; __pyx_pybuffernd_nobs.rcbuffer = &__pyx_pybuffer_nobs; __pyx_pybuffer_sumx.pybuffer.buf = NULL; __pyx_pybuffer_sumx.refcount = 0; __pyx_pybuffernd_sumx.data = NULL; __pyx_pybuffernd_sumx.rcbuffer = &__pyx_pybuffer_sumx; __pyx_pybuffer_sumxx.pybuffer.buf = NULL; __pyx_pybuffer_sumxx.refcount = 0; __pyx_pybuffernd_sumxx.data = NULL; __pyx_pybuffernd_sumxx.rcbuffer = &__pyx_pybuffer_sumxx; __pyx_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; __pyx_pybuffer_counts.pybuffer.buf = NULL; __pyx_pybuffer_counts.refcount = 0; __pyx_pybuffernd_counts.data = NULL; __pyx_pybuffernd_counts.rcbuffer = &__pyx_pybuffer_counts; __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_labels.pybuffer.buf = NULL; __pyx_pybuffer_labels.refcount = 0; __pyx_pybuffernd_labels.data = NULL; __pyx_pybuffernd_labels.rcbuffer = &__pyx_pybuffer_labels; { __Pyx_BufFmt_StackElem __pyx_stack[1]; 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, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5877; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; __pyx_pybuffernd_out.diminfo[1].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_out.diminfo[1].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[1]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_counts.rcbuffer->pybuffer, (PyObject*)__pyx_v_counts, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5877; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_counts.diminfo[0].strides = __pyx_pybuffernd_counts.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_counts.diminfo[0].shape = __pyx_pybuffernd_counts.rcbuffer->pybuffer.shape[0]; { __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, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5877; __pyx_clineno = __LINE__; goto __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_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_labels.rcbuffer->pybuffer, (PyObject*)__pyx_v_labels, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5877; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_labels.diminfo[0].strides = __pyx_pybuffernd_labels.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_labels.diminfo[0].shape = __pyx_pybuffernd_labels.rcbuffer->pybuffer.shape[0]; /* "pandas/src/generated.pyx":5886 * ndarray[float64_t, ndim=2] nobs, sumx, sumxx * * if not len(values) == len(labels): # <<<<<<<<<<<<<< * raise AssertionError("len(index) != len(labels)") * */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5886; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_2 = PyObject_Length(((PyObject *)__pyx_v_labels)); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5886; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_3 = ((!((__pyx_t_1 == __pyx_t_2) != 0)) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":5887 * * if not len(values) == len(labels): * raise AssertionError("len(index) != len(labels)") # <<<<<<<<<<<<<< * * nobs = np.zeros_like(out) */ __pyx_t_4 = PyObject_Call(__pyx_builtin_AssertionError, __pyx_tuple__185, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5887; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 5887; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } /* "pandas/src/generated.pyx":5889 * raise AssertionError("len(index) != len(labels)") * * nobs = np.zeros_like(out) # <<<<<<<<<<<<<< * sumx = np.zeros_like(out) * sumxx = np.zeros_like(out) */ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5889; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_zeros_like); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5889; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5889; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(((PyObject *)__pyx_v_out)); PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_v_out)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out)); __pyx_t_6 = PyObject_Call(__pyx_t_5, __pyx_t_4, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5889; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5889; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_7 = ((PyArrayObject *)__pyx_t_6); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer); __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_nobs.rcbuffer->pybuffer, (PyObject*)__pyx_v_nobs, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_pybuffernd_nobs.diminfo[0].strides = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_nobs.diminfo[0].shape = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_nobs.diminfo[1].strides = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_nobs.diminfo[1].shape = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.shape[1]; if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5889; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_7 = 0; __pyx_v_nobs = ((PyArrayObject *)__pyx_t_6); __pyx_t_6 = 0; /* "pandas/src/generated.pyx":5890 * * nobs = np.zeros_like(out) * sumx = np.zeros_like(out) # <<<<<<<<<<<<<< * sumxx = np.zeros_like(out) * */ __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5890; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_zeros_like); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5890; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5890; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(((PyObject *)__pyx_v_out)); PyTuple_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_v_out)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out)); __pyx_t_5 = PyObject_Call(__pyx_t_4, __pyx_t_6, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5890; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5890; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_7 = ((PyArrayObject *)__pyx_t_5); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_sumx.rcbuffer->pybuffer); __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_sumx.rcbuffer->pybuffer, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_sumx.rcbuffer->pybuffer, (PyObject*)__pyx_v_sumx, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_pybuffernd_sumx.diminfo[0].strides = __pyx_pybuffernd_sumx.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_sumx.diminfo[0].shape = __pyx_pybuffernd_sumx.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_sumx.diminfo[1].strides = __pyx_pybuffernd_sumx.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_sumx.diminfo[1].shape = __pyx_pybuffernd_sumx.rcbuffer->pybuffer.shape[1]; if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5890; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_7 = 0; __pyx_v_sumx = ((PyArrayObject *)__pyx_t_5); __pyx_t_5 = 0; /* "pandas/src/generated.pyx":5891 * nobs = np.zeros_like(out) * sumx = np.zeros_like(out) * sumxx = np.zeros_like(out) # <<<<<<<<<<<<<< * * N, K = ( values).shape */ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5891; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_zeros_like); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5891; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5891; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(((PyObject *)__pyx_v_out)); PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_v_out)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out)); __pyx_t_4 = PyObject_Call(__pyx_t_6, __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5891; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5891; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_7 = ((PyArrayObject *)__pyx_t_4); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_sumxx.rcbuffer->pybuffer); __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_sumxx.rcbuffer->pybuffer, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_sumxx.rcbuffer->pybuffer, (PyObject*)__pyx_v_sumxx, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_pybuffernd_sumxx.diminfo[0].strides = __pyx_pybuffernd_sumxx.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_sumxx.diminfo[0].shape = __pyx_pybuffernd_sumxx.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_sumxx.diminfo[1].strides = __pyx_pybuffernd_sumxx.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_sumxx.diminfo[1].shape = __pyx_pybuffernd_sumxx.rcbuffer->pybuffer.shape[1]; if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5891; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_7 = 0; __pyx_v_sumxx = ((PyArrayObject *)__pyx_t_4); __pyx_t_4 = 0; /* "pandas/src/generated.pyx":5893 * sumxx = np.zeros_like(out) * * N, K = ( values).shape # <<<<<<<<<<<<<< * * if K > 1: */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_values), __pyx_n_s_shape); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5893; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); if ((likely(PyTuple_CheckExact(__pyx_t_4))) || (PyList_CheckExact(__pyx_t_4))) { PyObject* sequence = __pyx_t_4; #if CYTHON_COMPILING_IN_CPYTHON Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5893; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_5 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_6 = PyTuple_GET_ITEM(sequence, 1); } else { __pyx_t_5 = PyList_GET_ITEM(sequence, 0); __pyx_t_6 = PyList_GET_ITEM(sequence, 1); } __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(__pyx_t_6); #else __pyx_t_5 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5893; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5893; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); #endif __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else { Py_ssize_t index = -1; __pyx_t_12 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5893; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_13 = Py_TYPE(__pyx_t_12)->tp_iternext; index = 0; __pyx_t_5 = __pyx_t_13(__pyx_t_12); if (unlikely(!__pyx_t_5)) goto __pyx_L4_unpacking_failed; __Pyx_GOTREF(__pyx_t_5); index = 1; __pyx_t_6 = __pyx_t_13(__pyx_t_12); if (unlikely(!__pyx_t_6)) goto __pyx_L4_unpacking_failed; __Pyx_GOTREF(__pyx_t_6); if (__Pyx_IternextUnpackEndCheck(__pyx_t_13(__pyx_t_12), 2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5893; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_13 = NULL; __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; goto __pyx_L5_unpacking_done; __pyx_L4_unpacking_failed:; __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __pyx_t_13 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5893; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_L5_unpacking_done:; } __pyx_t_2 = __Pyx_PyIndex_AsSsize_t(__pyx_t_5); if (unlikely((__pyx_t_2 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5893; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_1 = __Pyx_PyIndex_AsSsize_t(__pyx_t_6); if (unlikely((__pyx_t_1 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5893; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_v_N = __pyx_t_2; __pyx_v_K = __pyx_t_1; /* "pandas/src/generated.pyx":5895 * N, K = ( values).shape * * if K > 1: # <<<<<<<<<<<<<< * for i in range(N): * */ __pyx_t_3 = ((__pyx_v_K > 1) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":5896 * * if K > 1: * for i in range(N): # <<<<<<<<<<<<<< * * lab = labels[i] */ __pyx_t_1 = __pyx_v_N; for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) { __pyx_v_i = __pyx_t_2; /* "pandas/src/generated.pyx":5898 * for i in range(N): * * lab = labels[i] # <<<<<<<<<<<<<< * if lab < 0: * continue */ __pyx_t_14 = __pyx_v_i; __pyx_v_lab = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_labels.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_labels.diminfo[0].strides)); /* "pandas/src/generated.pyx":5899 * * lab = labels[i] * if lab < 0: # <<<<<<<<<<<<<< * continue * */ __pyx_t_3 = ((__pyx_v_lab < 0) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":5900 * lab = labels[i] * if lab < 0: * continue # <<<<<<<<<<<<<< * * counts[lab] += 1 */ goto __pyx_L7_continue; } /* "pandas/src/generated.pyx":5902 * continue * * counts[lab] += 1 # <<<<<<<<<<<<<< * * for j in range(K): */ __pyx_t_15 = __pyx_v_lab; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_counts.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_counts.diminfo[0].strides) += 1; /* "pandas/src/generated.pyx":5904 * counts[lab] += 1 * * for j in range(K): # <<<<<<<<<<<<<< * val = values[i, j] * */ __pyx_t_16 = __pyx_v_K; for (__pyx_t_17 = 0; __pyx_t_17 < __pyx_t_16; __pyx_t_17+=1) { __pyx_v_j = __pyx_t_17; /* "pandas/src/generated.pyx":5905 * * for j in range(K): * val = values[i, j] # <<<<<<<<<<<<<< * * # not nan */ __pyx_t_18 = __pyx_v_i; __pyx_t_19 = __pyx_v_j; __pyx_v_val = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_19, __pyx_pybuffernd_values.diminfo[1].strides)); /* "pandas/src/generated.pyx":5908 * * # not nan * if val == val: # <<<<<<<<<<<<<< * nobs[lab, j] += 1 * sumx[lab, j] += val */ __pyx_t_3 = ((__pyx_v_val == __pyx_v_val) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":5909 * # not nan * if val == val: * nobs[lab, j] += 1 # <<<<<<<<<<<<<< * sumx[lab, j] += val * sumxx[lab, j] += val * val */ __pyx_t_20 = __pyx_v_lab; __pyx_t_21 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_nobs.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_nobs.diminfo[0].strides, __pyx_t_21, __pyx_pybuffernd_nobs.diminfo[1].strides) += 1.0; /* "pandas/src/generated.pyx":5910 * if val == val: * nobs[lab, j] += 1 * sumx[lab, j] += val # <<<<<<<<<<<<<< * sumxx[lab, j] += val * val * else: */ __pyx_t_22 = __pyx_v_lab; __pyx_t_23 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_sumx.rcbuffer->pybuffer.buf, __pyx_t_22, __pyx_pybuffernd_sumx.diminfo[0].strides, __pyx_t_23, __pyx_pybuffernd_sumx.diminfo[1].strides) += __pyx_v_val; /* "pandas/src/generated.pyx":5911 * nobs[lab, j] += 1 * sumx[lab, j] += val * sumxx[lab, j] += val * val # <<<<<<<<<<<<<< * else: * for i in range(N): */ __pyx_t_24 = __pyx_v_lab; __pyx_t_25 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_sumxx.rcbuffer->pybuffer.buf, __pyx_t_24, __pyx_pybuffernd_sumxx.diminfo[0].strides, __pyx_t_25, __pyx_pybuffernd_sumxx.diminfo[1].strides) += (__pyx_v_val * __pyx_v_val); goto __pyx_L12; } __pyx_L12:; } __pyx_L7_continue:; } goto __pyx_L6; } /*else*/ { /* "pandas/src/generated.pyx":5913 * sumxx[lab, j] += val * val * else: * for i in range(N): # <<<<<<<<<<<<<< * * lab = labels[i] */ __pyx_t_1 = __pyx_v_N; for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) { __pyx_v_i = __pyx_t_2; /* "pandas/src/generated.pyx":5915 * for i in range(N): * * lab = labels[i] # <<<<<<<<<<<<<< * if lab < 0: * continue */ __pyx_t_16 = __pyx_v_i; __pyx_v_lab = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_labels.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_labels.diminfo[0].strides)); /* "pandas/src/generated.pyx":5916 * * lab = labels[i] * if lab < 0: # <<<<<<<<<<<<<< * continue * */ __pyx_t_3 = ((__pyx_v_lab < 0) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":5917 * lab = labels[i] * if lab < 0: * continue # <<<<<<<<<<<<<< * * counts[lab] += 1 */ goto __pyx_L13_continue; } /* "pandas/src/generated.pyx":5919 * continue * * counts[lab] += 1 # <<<<<<<<<<<<<< * val = values[i, 0] * # not nan */ __pyx_t_17 = __pyx_v_lab; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_counts.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_counts.diminfo[0].strides) += 1; /* "pandas/src/generated.pyx":5920 * * counts[lab] += 1 * val = values[i, 0] # <<<<<<<<<<<<<< * # not nan * if val == val: */ __pyx_t_26 = __pyx_v_i; __pyx_t_27 = 0; __pyx_v_val = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_26, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_27, __pyx_pybuffernd_values.diminfo[1].strides)); /* "pandas/src/generated.pyx":5922 * val = values[i, 0] * # not nan * if val == val: # <<<<<<<<<<<<<< * nobs[lab, 0] += 1 * sumx[lab, 0] += val */ __pyx_t_3 = ((__pyx_v_val == __pyx_v_val) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":5923 * # not nan * if val == val: * nobs[lab, 0] += 1 # <<<<<<<<<<<<<< * sumx[lab, 0] += val * sumxx[lab, 0] += val * val */ __pyx_t_28 = __pyx_v_lab; __pyx_t_29 = 0; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_nobs.rcbuffer->pybuffer.buf, __pyx_t_28, __pyx_pybuffernd_nobs.diminfo[0].strides, __pyx_t_29, __pyx_pybuffernd_nobs.diminfo[1].strides) += 1.0; /* "pandas/src/generated.pyx":5924 * if val == val: * nobs[lab, 0] += 1 * sumx[lab, 0] += val # <<<<<<<<<<<<<< * sumxx[lab, 0] += val * val * */ __pyx_t_30 = __pyx_v_lab; __pyx_t_31 = 0; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_sumx.rcbuffer->pybuffer.buf, __pyx_t_30, __pyx_pybuffernd_sumx.diminfo[0].strides, __pyx_t_31, __pyx_pybuffernd_sumx.diminfo[1].strides) += __pyx_v_val; /* "pandas/src/generated.pyx":5925 * nobs[lab, 0] += 1 * sumx[lab, 0] += val * sumxx[lab, 0] += val * val # <<<<<<<<<<<<<< * * */ __pyx_t_32 = __pyx_v_lab; __pyx_t_33 = 0; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_sumxx.rcbuffer->pybuffer.buf, __pyx_t_32, __pyx_pybuffernd_sumxx.diminfo[0].strides, __pyx_t_33, __pyx_pybuffernd_sumxx.diminfo[1].strides) += (__pyx_v_val * __pyx_v_val); goto __pyx_L16; } __pyx_L16:; __pyx_L13_continue:; } } __pyx_L6:; /* "pandas/src/generated.pyx":5928 * * * for i in range(len(counts)): # <<<<<<<<<<<<<< * for j in range(K): * ct = nobs[i, j] */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_counts)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5928; __pyx_clineno = __LINE__; goto __pyx_L1_error;} for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) { __pyx_v_i = __pyx_t_2; /* "pandas/src/generated.pyx":5929 * * for i in range(len(counts)): * for j in range(K): # <<<<<<<<<<<<<< * ct = nobs[i, j] * if ct < 2: */ __pyx_t_34 = __pyx_v_K; for (__pyx_t_35 = 0; __pyx_t_35 < __pyx_t_34; __pyx_t_35+=1) { __pyx_v_j = __pyx_t_35; /* "pandas/src/generated.pyx":5930 * for i in range(len(counts)): * for j in range(K): * ct = nobs[i, j] # <<<<<<<<<<<<<< * if ct < 2: * out[i, j] = nan */ __pyx_t_36 = __pyx_v_i; __pyx_t_37 = __pyx_v_j; __pyx_v_ct = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_nobs.rcbuffer->pybuffer.buf, __pyx_t_36, __pyx_pybuffernd_nobs.diminfo[0].strides, __pyx_t_37, __pyx_pybuffernd_nobs.diminfo[1].strides)); /* "pandas/src/generated.pyx":5931 * for j in range(K): * ct = nobs[i, j] * if ct < 2: # <<<<<<<<<<<<<< * out[i, j] = nan * else: */ __pyx_t_3 = ((__pyx_v_ct < 2.0) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":5932 * ct = nobs[i, j] * if ct < 2: * out[i, j] = nan # <<<<<<<<<<<<<< * else: * out[i, j] = ((ct * sumxx[i, j] - sumx[i, j] * sumx[i, j]) / */ __pyx_t_38 = __pyx_v_i; __pyx_t_39 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_38, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_39, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_6pandas_5algos_nan; goto __pyx_L21; } /*else*/ { /* "pandas/src/generated.pyx":5934 * out[i, j] = nan * else: * out[i, j] = ((ct * sumxx[i, j] - sumx[i, j] * sumx[i, j]) / # <<<<<<<<<<<<<< * (ct * ct - ct)) * @cython.wraparound(False) */ __pyx_t_40 = __pyx_v_i; __pyx_t_41 = __pyx_v_j; __pyx_t_42 = __pyx_v_i; __pyx_t_43 = __pyx_v_j; __pyx_t_44 = __pyx_v_i; __pyx_t_45 = __pyx_v_j; __pyx_t_46 = ((__pyx_v_ct * (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_sumxx.rcbuffer->pybuffer.buf, __pyx_t_40, __pyx_pybuffernd_sumxx.diminfo[0].strides, __pyx_t_41, __pyx_pybuffernd_sumxx.diminfo[1].strides))) - ((*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_sumx.rcbuffer->pybuffer.buf, __pyx_t_42, __pyx_pybuffernd_sumx.diminfo[0].strides, __pyx_t_43, __pyx_pybuffernd_sumx.diminfo[1].strides)) * (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_sumx.rcbuffer->pybuffer.buf, __pyx_t_44, __pyx_pybuffernd_sumx.diminfo[0].strides, __pyx_t_45, __pyx_pybuffernd_sumx.diminfo[1].strides)))); /* "pandas/src/generated.pyx":5935 * else: * out[i, j] = ((ct * sumxx[i, j] - sumx[i, j] * sumx[i, j]) / * (ct * ct - ct)) # <<<<<<<<<<<<<< * @cython.wraparound(False) * @cython.boundscheck(False) */ __pyx_t_47 = ((__pyx_v_ct * __pyx_v_ct) - __pyx_v_ct); /* "pandas/src/generated.pyx":5934 * out[i, j] = nan * else: * out[i, j] = ((ct * sumxx[i, j] - sumx[i, j] * sumx[i, j]) / # <<<<<<<<<<<<<< * (ct * ct - ct)) * @cython.wraparound(False) */ if (unlikely(__pyx_t_47 == 0)) { #ifdef WITH_THREAD PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure(); #endif PyErr_SetString(PyExc_ZeroDivisionError, "float division"); #ifdef WITH_THREAD PyGILState_Release(__pyx_gilstate_save); #endif {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5934; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_48 = __pyx_v_i; __pyx_t_49 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_48, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_49, __pyx_pybuffernd_out.diminfo[1].strides) = (__pyx_t_46 / __pyx_t_47); } __pyx_L21:; } } /* "pandas/src/generated.pyx":5877 * @cython.wraparound(False) * @cython.boundscheck(False) * def group_var_float64(ndarray[float64_t, ndim=2] out, # <<<<<<<<<<<<<< * ndarray[int64_t] counts, * ndarray[float64_t, ndim=2] values, */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_12); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_counts.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_labels.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_sumx.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_sumxx.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.group_var_float64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_counts.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_labels.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_sumx.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_sumxx.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_nobs); __Pyx_XDECREF((PyObject *)__pyx_v_sumx); __Pyx_XDECREF((PyObject *)__pyx_v_sumxx); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":5938 * @cython.wraparound(False) * @cython.boundscheck(False) * def group_var_float32(ndarray[float32_t, ndim=2] out, # <<<<<<<<<<<<<< * ndarray[int64_t] counts, * ndarray[float32_t, ndim=2] values, */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_421group_var_float32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_421group_var_float32 = {__Pyx_NAMESTR("group_var_float32"), (PyCFunction)__pyx_pw_6pandas_5algos_421group_var_float32, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_421group_var_float32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_out = 0; PyArrayObject *__pyx_v_counts = 0; PyArrayObject *__pyx_v_values = 0; PyArrayObject *__pyx_v_labels = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("group_var_float32 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_out,&__pyx_n_s_counts,&__pyx_n_s_values,&__pyx_n_s_labels,0}; PyObject* values[4] = {0,0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_out)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_counts)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("group_var_float32", 1, 4, 4, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5938; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_values)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("group_var_float32", 1, 4, 4, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5938; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_labels)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("group_var_float32", 1, 4, 4, 3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5938; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "group_var_float32") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5938; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 4) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[3] = PyTuple_GET_ITEM(__pyx_args, 3); } __pyx_v_out = ((PyArrayObject *)values[0]); __pyx_v_counts = ((PyArrayObject *)values[1]); __pyx_v_values = ((PyArrayObject *)values[2]); __pyx_v_labels = ((PyArrayObject *)values[3]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("group_var_float32", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5938; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.group_var_float32", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_5numpy_ndarray, 1, "out", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5938; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_counts), __pyx_ptype_5numpy_ndarray, 1, "counts", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5939; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5940; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_labels), __pyx_ptype_5numpy_ndarray, 1, "labels", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5941; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_420group_var_float32(__pyx_self, __pyx_v_out, __pyx_v_counts, __pyx_v_values, __pyx_v_labels); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5algos_420group_var_float32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_out, PyArrayObject *__pyx_v_counts, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_labels) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_N; Py_ssize_t __pyx_v_K; Py_ssize_t __pyx_v_lab; __pyx_t_5numpy_float32_t __pyx_v_val; __pyx_t_5numpy_float32_t __pyx_v_ct; PyArrayObject *__pyx_v_nobs = 0; PyArrayObject *__pyx_v_sumx = 0; PyArrayObject *__pyx_v_sumxx = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_counts; __Pyx_Buffer __pyx_pybuffer_counts; __Pyx_LocalBuf_ND __pyx_pybuffernd_labels; __Pyx_Buffer __pyx_pybuffer_labels; __Pyx_LocalBuf_ND __pyx_pybuffernd_nobs; __Pyx_Buffer __pyx_pybuffer_nobs; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_sumx; __Pyx_Buffer __pyx_pybuffer_sumx; __Pyx_LocalBuf_ND __pyx_pybuffernd_sumxx; __Pyx_Buffer __pyx_pybuffer_sumxx; __Pyx_LocalBuf_ND __pyx_pybuffernd_values; __Pyx_Buffer __pyx_pybuffer_values; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; Py_ssize_t __pyx_t_2; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyArrayObject *__pyx_t_7 = NULL; int __pyx_t_8; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; PyObject *__pyx_t_11 = NULL; PyObject *__pyx_t_12 = NULL; PyObject *(*__pyx_t_13)(PyObject *); 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; Py_ssize_t __pyx_t_26; long __pyx_t_27; Py_ssize_t __pyx_t_28; long __pyx_t_29; Py_ssize_t __pyx_t_30; long __pyx_t_31; Py_ssize_t __pyx_t_32; long __pyx_t_33; Py_ssize_t __pyx_t_34; Py_ssize_t __pyx_t_35; Py_ssize_t __pyx_t_36; Py_ssize_t __pyx_t_37; Py_ssize_t __pyx_t_38; Py_ssize_t __pyx_t_39; Py_ssize_t __pyx_t_40; Py_ssize_t __pyx_t_41; Py_ssize_t __pyx_t_42; Py_ssize_t __pyx_t_43; Py_ssize_t __pyx_t_44; Py_ssize_t __pyx_t_45; __pyx_t_5numpy_float32_t __pyx_t_46; __pyx_t_5numpy_float32_t __pyx_t_47; Py_ssize_t __pyx_t_48; Py_ssize_t __pyx_t_49; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("group_var_float32", 0); __pyx_pybuffer_nobs.pybuffer.buf = NULL; __pyx_pybuffer_nobs.refcount = 0; __pyx_pybuffernd_nobs.data = NULL; __pyx_pybuffernd_nobs.rcbuffer = &__pyx_pybuffer_nobs; __pyx_pybuffer_sumx.pybuffer.buf = NULL; __pyx_pybuffer_sumx.refcount = 0; __pyx_pybuffernd_sumx.data = NULL; __pyx_pybuffernd_sumx.rcbuffer = &__pyx_pybuffer_sumx; __pyx_pybuffer_sumxx.pybuffer.buf = NULL; __pyx_pybuffer_sumxx.refcount = 0; __pyx_pybuffernd_sumxx.data = NULL; __pyx_pybuffernd_sumxx.rcbuffer = &__pyx_pybuffer_sumxx; __pyx_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; __pyx_pybuffer_counts.pybuffer.buf = NULL; __pyx_pybuffer_counts.refcount = 0; __pyx_pybuffernd_counts.data = NULL; __pyx_pybuffernd_counts.rcbuffer = &__pyx_pybuffer_counts; __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_labels.pybuffer.buf = NULL; __pyx_pybuffer_labels.refcount = 0; __pyx_pybuffernd_labels.data = NULL; __pyx_pybuffernd_labels.rcbuffer = &__pyx_pybuffer_labels; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_v_out, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5938; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; __pyx_pybuffernd_out.diminfo[1].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_out.diminfo[1].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[1]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_counts.rcbuffer->pybuffer, (PyObject*)__pyx_v_counts, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5938; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_counts.diminfo[0].strides = __pyx_pybuffernd_counts.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_counts.diminfo[0].shape = __pyx_pybuffernd_counts.rcbuffer->pybuffer.shape[0]; { __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_float32_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5938; __pyx_clineno = __LINE__; goto __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_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_labels.rcbuffer->pybuffer, (PyObject*)__pyx_v_labels, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5938; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_labels.diminfo[0].strides = __pyx_pybuffernd_labels.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_labels.diminfo[0].shape = __pyx_pybuffernd_labels.rcbuffer->pybuffer.shape[0]; /* "pandas/src/generated.pyx":5947 * ndarray[float32_t, ndim=2] nobs, sumx, sumxx * * if not len(values) == len(labels): # <<<<<<<<<<<<<< * raise AssertionError("len(index) != len(labels)") * */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5947; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_2 = PyObject_Length(((PyObject *)__pyx_v_labels)); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5947; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_3 = ((!((__pyx_t_1 == __pyx_t_2) != 0)) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":5948 * * if not len(values) == len(labels): * raise AssertionError("len(index) != len(labels)") # <<<<<<<<<<<<<< * * nobs = np.zeros_like(out) */ __pyx_t_4 = PyObject_Call(__pyx_builtin_AssertionError, __pyx_tuple__186, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5948; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 5948; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } /* "pandas/src/generated.pyx":5950 * raise AssertionError("len(index) != len(labels)") * * nobs = np.zeros_like(out) # <<<<<<<<<<<<<< * sumx = np.zeros_like(out) * sumxx = np.zeros_like(out) */ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5950; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_zeros_like); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5950; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5950; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(((PyObject *)__pyx_v_out)); PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_v_out)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out)); __pyx_t_6 = PyObject_Call(__pyx_t_5, __pyx_t_4, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5950; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5950; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_7 = ((PyArrayObject *)__pyx_t_6); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer); __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_nobs.rcbuffer->pybuffer, (PyObject*)__pyx_v_nobs, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_pybuffernd_nobs.diminfo[0].strides = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_nobs.diminfo[0].shape = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_nobs.diminfo[1].strides = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_nobs.diminfo[1].shape = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.shape[1]; if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5950; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_7 = 0; __pyx_v_nobs = ((PyArrayObject *)__pyx_t_6); __pyx_t_6 = 0; /* "pandas/src/generated.pyx":5951 * * nobs = np.zeros_like(out) * sumx = np.zeros_like(out) # <<<<<<<<<<<<<< * sumxx = np.zeros_like(out) * */ __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5951; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_zeros_like); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5951; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5951; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(((PyObject *)__pyx_v_out)); PyTuple_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_v_out)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out)); __pyx_t_5 = PyObject_Call(__pyx_t_4, __pyx_t_6, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5951; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5951; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_7 = ((PyArrayObject *)__pyx_t_5); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_sumx.rcbuffer->pybuffer); __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_sumx.rcbuffer->pybuffer, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_sumx.rcbuffer->pybuffer, (PyObject*)__pyx_v_sumx, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_pybuffernd_sumx.diminfo[0].strides = __pyx_pybuffernd_sumx.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_sumx.diminfo[0].shape = __pyx_pybuffernd_sumx.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_sumx.diminfo[1].strides = __pyx_pybuffernd_sumx.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_sumx.diminfo[1].shape = __pyx_pybuffernd_sumx.rcbuffer->pybuffer.shape[1]; if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5951; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_7 = 0; __pyx_v_sumx = ((PyArrayObject *)__pyx_t_5); __pyx_t_5 = 0; /* "pandas/src/generated.pyx":5952 * nobs = np.zeros_like(out) * sumx = np.zeros_like(out) * sumxx = np.zeros_like(out) # <<<<<<<<<<<<<< * * N, K = ( values).shape */ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5952; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_zeros_like); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5952; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5952; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(((PyObject *)__pyx_v_out)); PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_v_out)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out)); __pyx_t_4 = PyObject_Call(__pyx_t_6, __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5952; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5952; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_7 = ((PyArrayObject *)__pyx_t_4); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_sumxx.rcbuffer->pybuffer); __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_sumxx.rcbuffer->pybuffer, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_sumxx.rcbuffer->pybuffer, (PyObject*)__pyx_v_sumxx, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_pybuffernd_sumxx.diminfo[0].strides = __pyx_pybuffernd_sumxx.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_sumxx.diminfo[0].shape = __pyx_pybuffernd_sumxx.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_sumxx.diminfo[1].strides = __pyx_pybuffernd_sumxx.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_sumxx.diminfo[1].shape = __pyx_pybuffernd_sumxx.rcbuffer->pybuffer.shape[1]; if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5952; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_7 = 0; __pyx_v_sumxx = ((PyArrayObject *)__pyx_t_4); __pyx_t_4 = 0; /* "pandas/src/generated.pyx":5954 * sumxx = np.zeros_like(out) * * N, K = ( values).shape # <<<<<<<<<<<<<< * * if K > 1: */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_values), __pyx_n_s_shape); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5954; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); if ((likely(PyTuple_CheckExact(__pyx_t_4))) || (PyList_CheckExact(__pyx_t_4))) { PyObject* sequence = __pyx_t_4; #if CYTHON_COMPILING_IN_CPYTHON Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5954; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_5 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_6 = PyTuple_GET_ITEM(sequence, 1); } else { __pyx_t_5 = PyList_GET_ITEM(sequence, 0); __pyx_t_6 = PyList_GET_ITEM(sequence, 1); } __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(__pyx_t_6); #else __pyx_t_5 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5954; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5954; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); #endif __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else { Py_ssize_t index = -1; __pyx_t_12 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5954; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_13 = Py_TYPE(__pyx_t_12)->tp_iternext; index = 0; __pyx_t_5 = __pyx_t_13(__pyx_t_12); if (unlikely(!__pyx_t_5)) goto __pyx_L4_unpacking_failed; __Pyx_GOTREF(__pyx_t_5); index = 1; __pyx_t_6 = __pyx_t_13(__pyx_t_12); if (unlikely(!__pyx_t_6)) goto __pyx_L4_unpacking_failed; __Pyx_GOTREF(__pyx_t_6); if (__Pyx_IternextUnpackEndCheck(__pyx_t_13(__pyx_t_12), 2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5954; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_13 = NULL; __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; goto __pyx_L5_unpacking_done; __pyx_L4_unpacking_failed:; __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __pyx_t_13 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5954; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_L5_unpacking_done:; } __pyx_t_2 = __Pyx_PyIndex_AsSsize_t(__pyx_t_5); if (unlikely((__pyx_t_2 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5954; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_1 = __Pyx_PyIndex_AsSsize_t(__pyx_t_6); if (unlikely((__pyx_t_1 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5954; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_v_N = __pyx_t_2; __pyx_v_K = __pyx_t_1; /* "pandas/src/generated.pyx":5956 * N, K = ( values).shape * * if K > 1: # <<<<<<<<<<<<<< * for i in range(N): * */ __pyx_t_3 = ((__pyx_v_K > 1) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":5957 * * if K > 1: * for i in range(N): # <<<<<<<<<<<<<< * * lab = labels[i] */ __pyx_t_1 = __pyx_v_N; for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) { __pyx_v_i = __pyx_t_2; /* "pandas/src/generated.pyx":5959 * for i in range(N): * * lab = labels[i] # <<<<<<<<<<<<<< * if lab < 0: * continue */ __pyx_t_14 = __pyx_v_i; __pyx_v_lab = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_labels.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_labels.diminfo[0].strides)); /* "pandas/src/generated.pyx":5960 * * lab = labels[i] * if lab < 0: # <<<<<<<<<<<<<< * continue * */ __pyx_t_3 = ((__pyx_v_lab < 0) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":5961 * lab = labels[i] * if lab < 0: * continue # <<<<<<<<<<<<<< * * counts[lab] += 1 */ goto __pyx_L7_continue; } /* "pandas/src/generated.pyx":5963 * continue * * counts[lab] += 1 # <<<<<<<<<<<<<< * * for j in range(K): */ __pyx_t_15 = __pyx_v_lab; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_counts.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_counts.diminfo[0].strides) += 1; /* "pandas/src/generated.pyx":5965 * counts[lab] += 1 * * for j in range(K): # <<<<<<<<<<<<<< * val = values[i, j] * */ __pyx_t_16 = __pyx_v_K; for (__pyx_t_17 = 0; __pyx_t_17 < __pyx_t_16; __pyx_t_17+=1) { __pyx_v_j = __pyx_t_17; /* "pandas/src/generated.pyx":5966 * * for j in range(K): * val = values[i, j] # <<<<<<<<<<<<<< * * # not nan */ __pyx_t_18 = __pyx_v_i; __pyx_t_19 = __pyx_v_j; __pyx_v_val = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_19, __pyx_pybuffernd_values.diminfo[1].strides)); /* "pandas/src/generated.pyx":5969 * * # not nan * if val == val: # <<<<<<<<<<<<<< * nobs[lab, j] += 1 * sumx[lab, j] += val */ __pyx_t_3 = ((__pyx_v_val == __pyx_v_val) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":5970 * # not nan * if val == val: * nobs[lab, j] += 1 # <<<<<<<<<<<<<< * sumx[lab, j] += val * sumxx[lab, j] += val * val */ __pyx_t_20 = __pyx_v_lab; __pyx_t_21 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_nobs.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_nobs.diminfo[0].strides, __pyx_t_21, __pyx_pybuffernd_nobs.diminfo[1].strides) += 1.0; /* "pandas/src/generated.pyx":5971 * if val == val: * nobs[lab, j] += 1 * sumx[lab, j] += val # <<<<<<<<<<<<<< * sumxx[lab, j] += val * val * else: */ __pyx_t_22 = __pyx_v_lab; __pyx_t_23 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_sumx.rcbuffer->pybuffer.buf, __pyx_t_22, __pyx_pybuffernd_sumx.diminfo[0].strides, __pyx_t_23, __pyx_pybuffernd_sumx.diminfo[1].strides) += __pyx_v_val; /* "pandas/src/generated.pyx":5972 * nobs[lab, j] += 1 * sumx[lab, j] += val * sumxx[lab, j] += val * val # <<<<<<<<<<<<<< * else: * for i in range(N): */ __pyx_t_24 = __pyx_v_lab; __pyx_t_25 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_sumxx.rcbuffer->pybuffer.buf, __pyx_t_24, __pyx_pybuffernd_sumxx.diminfo[0].strides, __pyx_t_25, __pyx_pybuffernd_sumxx.diminfo[1].strides) += (__pyx_v_val * __pyx_v_val); goto __pyx_L12; } __pyx_L12:; } __pyx_L7_continue:; } goto __pyx_L6; } /*else*/ { /* "pandas/src/generated.pyx":5974 * sumxx[lab, j] += val * val * else: * for i in range(N): # <<<<<<<<<<<<<< * * lab = labels[i] */ __pyx_t_1 = __pyx_v_N; for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) { __pyx_v_i = __pyx_t_2; /* "pandas/src/generated.pyx":5976 * for i in range(N): * * lab = labels[i] # <<<<<<<<<<<<<< * if lab < 0: * continue */ __pyx_t_16 = __pyx_v_i; __pyx_v_lab = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_labels.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_labels.diminfo[0].strides)); /* "pandas/src/generated.pyx":5977 * * lab = labels[i] * if lab < 0: # <<<<<<<<<<<<<< * continue * */ __pyx_t_3 = ((__pyx_v_lab < 0) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":5978 * lab = labels[i] * if lab < 0: * continue # <<<<<<<<<<<<<< * * counts[lab] += 1 */ goto __pyx_L13_continue; } /* "pandas/src/generated.pyx":5980 * continue * * counts[lab] += 1 # <<<<<<<<<<<<<< * val = values[i, 0] * # not nan */ __pyx_t_17 = __pyx_v_lab; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_counts.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_counts.diminfo[0].strides) += 1; /* "pandas/src/generated.pyx":5981 * * counts[lab] += 1 * val = values[i, 0] # <<<<<<<<<<<<<< * # not nan * if val == val: */ __pyx_t_26 = __pyx_v_i; __pyx_t_27 = 0; __pyx_v_val = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_26, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_27, __pyx_pybuffernd_values.diminfo[1].strides)); /* "pandas/src/generated.pyx":5983 * val = values[i, 0] * # not nan * if val == val: # <<<<<<<<<<<<<< * nobs[lab, 0] += 1 * sumx[lab, 0] += val */ __pyx_t_3 = ((__pyx_v_val == __pyx_v_val) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":5984 * # not nan * if val == val: * nobs[lab, 0] += 1 # <<<<<<<<<<<<<< * sumx[lab, 0] += val * sumxx[lab, 0] += val * val */ __pyx_t_28 = __pyx_v_lab; __pyx_t_29 = 0; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_nobs.rcbuffer->pybuffer.buf, __pyx_t_28, __pyx_pybuffernd_nobs.diminfo[0].strides, __pyx_t_29, __pyx_pybuffernd_nobs.diminfo[1].strides) += 1.0; /* "pandas/src/generated.pyx":5985 * if val == val: * nobs[lab, 0] += 1 * sumx[lab, 0] += val # <<<<<<<<<<<<<< * sumxx[lab, 0] += val * val * */ __pyx_t_30 = __pyx_v_lab; __pyx_t_31 = 0; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_sumx.rcbuffer->pybuffer.buf, __pyx_t_30, __pyx_pybuffernd_sumx.diminfo[0].strides, __pyx_t_31, __pyx_pybuffernd_sumx.diminfo[1].strides) += __pyx_v_val; /* "pandas/src/generated.pyx":5986 * nobs[lab, 0] += 1 * sumx[lab, 0] += val * sumxx[lab, 0] += val * val # <<<<<<<<<<<<<< * * */ __pyx_t_32 = __pyx_v_lab; __pyx_t_33 = 0; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_sumxx.rcbuffer->pybuffer.buf, __pyx_t_32, __pyx_pybuffernd_sumxx.diminfo[0].strides, __pyx_t_33, __pyx_pybuffernd_sumxx.diminfo[1].strides) += (__pyx_v_val * __pyx_v_val); goto __pyx_L16; } __pyx_L16:; __pyx_L13_continue:; } } __pyx_L6:; /* "pandas/src/generated.pyx":5989 * * * for i in range(len(counts)): # <<<<<<<<<<<<<< * for j in range(K): * ct = nobs[i, j] */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_counts)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5989; __pyx_clineno = __LINE__; goto __pyx_L1_error;} for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) { __pyx_v_i = __pyx_t_2; /* "pandas/src/generated.pyx":5990 * * for i in range(len(counts)): * for j in range(K): # <<<<<<<<<<<<<< * ct = nobs[i, j] * if ct < 2: */ __pyx_t_34 = __pyx_v_K; for (__pyx_t_35 = 0; __pyx_t_35 < __pyx_t_34; __pyx_t_35+=1) { __pyx_v_j = __pyx_t_35; /* "pandas/src/generated.pyx":5991 * for i in range(len(counts)): * for j in range(K): * ct = nobs[i, j] # <<<<<<<<<<<<<< * if ct < 2: * out[i, j] = nan */ __pyx_t_36 = __pyx_v_i; __pyx_t_37 = __pyx_v_j; __pyx_v_ct = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_nobs.rcbuffer->pybuffer.buf, __pyx_t_36, __pyx_pybuffernd_nobs.diminfo[0].strides, __pyx_t_37, __pyx_pybuffernd_nobs.diminfo[1].strides)); /* "pandas/src/generated.pyx":5992 * for j in range(K): * ct = nobs[i, j] * if ct < 2: # <<<<<<<<<<<<<< * out[i, j] = nan * else: */ __pyx_t_3 = ((__pyx_v_ct < 2.0) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":5993 * ct = nobs[i, j] * if ct < 2: * out[i, j] = nan # <<<<<<<<<<<<<< * else: * out[i, j] = ((ct * sumxx[i, j] - sumx[i, j] * sumx[i, j]) / */ __pyx_t_38 = __pyx_v_i; __pyx_t_39 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_38, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_39, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_6pandas_5algos_nan; goto __pyx_L21; } /*else*/ { /* "pandas/src/generated.pyx":5995 * out[i, j] = nan * else: * out[i, j] = ((ct * sumxx[i, j] - sumx[i, j] * sumx[i, j]) / # <<<<<<<<<<<<<< * (ct * ct - ct)) * */ __pyx_t_40 = __pyx_v_i; __pyx_t_41 = __pyx_v_j; __pyx_t_42 = __pyx_v_i; __pyx_t_43 = __pyx_v_j; __pyx_t_44 = __pyx_v_i; __pyx_t_45 = __pyx_v_j; __pyx_t_46 = ((__pyx_v_ct * (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_sumxx.rcbuffer->pybuffer.buf, __pyx_t_40, __pyx_pybuffernd_sumxx.diminfo[0].strides, __pyx_t_41, __pyx_pybuffernd_sumxx.diminfo[1].strides))) - ((*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_sumx.rcbuffer->pybuffer.buf, __pyx_t_42, __pyx_pybuffernd_sumx.diminfo[0].strides, __pyx_t_43, __pyx_pybuffernd_sumx.diminfo[1].strides)) * (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_sumx.rcbuffer->pybuffer.buf, __pyx_t_44, __pyx_pybuffernd_sumx.diminfo[0].strides, __pyx_t_45, __pyx_pybuffernd_sumx.diminfo[1].strides)))); /* "pandas/src/generated.pyx":5996 * else: * out[i, j] = ((ct * sumxx[i, j] - sumx[i, j] * sumx[i, j]) / * (ct * ct - ct)) # <<<<<<<<<<<<<< * * @cython.wraparound(False) */ __pyx_t_47 = ((__pyx_v_ct * __pyx_v_ct) - __pyx_v_ct); /* "pandas/src/generated.pyx":5995 * out[i, j] = nan * else: * out[i, j] = ((ct * sumxx[i, j] - sumx[i, j] * sumx[i, j]) / # <<<<<<<<<<<<<< * (ct * ct - ct)) * */ if (unlikely(__pyx_t_47 == 0)) { #ifdef WITH_THREAD PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure(); #endif PyErr_SetString(PyExc_ZeroDivisionError, "float division"); #ifdef WITH_THREAD PyGILState_Release(__pyx_gilstate_save); #endif {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5995; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_48 = __pyx_v_i; __pyx_t_49 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_48, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_49, __pyx_pybuffernd_out.diminfo[1].strides) = (__pyx_t_46 / __pyx_t_47); } __pyx_L21:; } } /* "pandas/src/generated.pyx":5938 * @cython.wraparound(False) * @cython.boundscheck(False) * def group_var_float32(ndarray[float32_t, ndim=2] out, # <<<<<<<<<<<<<< * ndarray[int64_t] counts, * ndarray[float32_t, ndim=2] values, */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_12); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_counts.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_labels.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_sumx.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_sumxx.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.group_var_float32", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_counts.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_labels.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_sumx.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_sumxx.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_nobs); __Pyx_XDECREF((PyObject *)__pyx_v_sumx); __Pyx_XDECREF((PyObject *)__pyx_v_sumxx); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":6000 * @cython.wraparound(False) * @cython.boundscheck(False) * def group_var_bin_float64(ndarray[float64_t, ndim=2] out, # <<<<<<<<<<<<<< * ndarray[int64_t] counts, * ndarray[float64_t, ndim=2] values, */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_423group_var_bin_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_423group_var_bin_float64 = {__Pyx_NAMESTR("group_var_bin_float64"), (PyCFunction)__pyx_pw_6pandas_5algos_423group_var_bin_float64, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_423group_var_bin_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_out = 0; PyArrayObject *__pyx_v_counts = 0; PyArrayObject *__pyx_v_values = 0; PyArrayObject *__pyx_v_bins = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("group_var_bin_float64 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_out,&__pyx_n_s_counts,&__pyx_n_s_values,&__pyx_n_s_bins,0}; PyObject* values[4] = {0,0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_out)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_counts)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("group_var_bin_float64", 1, 4, 4, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6000; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_values)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("group_var_bin_float64", 1, 4, 4, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6000; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_bins)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("group_var_bin_float64", 1, 4, 4, 3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6000; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "group_var_bin_float64") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6000; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 4) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[3] = PyTuple_GET_ITEM(__pyx_args, 3); } __pyx_v_out = ((PyArrayObject *)values[0]); __pyx_v_counts = ((PyArrayObject *)values[1]); __pyx_v_values = ((PyArrayObject *)values[2]); __pyx_v_bins = ((PyArrayObject *)values[3]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("group_var_bin_float64", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6000; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.group_var_bin_float64", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_5numpy_ndarray, 1, "out", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6000; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_counts), __pyx_ptype_5numpy_ndarray, 1, "counts", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6001; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6002; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_bins), __pyx_ptype_5numpy_ndarray, 1, "bins", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6003; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_422group_var_bin_float64(__pyx_self, __pyx_v_out, __pyx_v_counts, __pyx_v_values, __pyx_v_bins); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5algos_422group_var_bin_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_out, PyArrayObject *__pyx_v_counts, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_bins) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_N; Py_ssize_t __pyx_v_K; Py_ssize_t __pyx_v_ngroups; Py_ssize_t __pyx_v_b; __pyx_t_5numpy_float64_t __pyx_v_val; __pyx_t_5numpy_float64_t __pyx_v_ct; PyArrayObject *__pyx_v_nobs = 0; PyArrayObject *__pyx_v_sumx = 0; PyArrayObject *__pyx_v_sumxx = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_bins; __Pyx_Buffer __pyx_pybuffer_bins; __Pyx_LocalBuf_ND __pyx_pybuffernd_counts; __Pyx_Buffer __pyx_pybuffer_counts; __Pyx_LocalBuf_ND __pyx_pybuffernd_nobs; __Pyx_Buffer __pyx_pybuffer_nobs; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_sumx; __Pyx_Buffer __pyx_pybuffer_sumx; __Pyx_LocalBuf_ND __pyx_pybuffernd_sumxx; __Pyx_Buffer __pyx_pybuffer_sumxx; __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; PyArrayObject *__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; Py_ssize_t __pyx_t_11; int __pyx_t_12; PyObject *__pyx_t_13 = NULL; PyObject *(*__pyx_t_14)(PyObject *); Py_ssize_t __pyx_t_15; int __pyx_t_16; int __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; long __pyx_t_30; Py_ssize_t __pyx_t_31; long __pyx_t_32; Py_ssize_t __pyx_t_33; long __pyx_t_34; Py_ssize_t __pyx_t_35; long __pyx_t_36; Py_ssize_t __pyx_t_37; Py_ssize_t __pyx_t_38; Py_ssize_t __pyx_t_39; Py_ssize_t __pyx_t_40; Py_ssize_t __pyx_t_41; Py_ssize_t __pyx_t_42; Py_ssize_t __pyx_t_43; Py_ssize_t __pyx_t_44; Py_ssize_t __pyx_t_45; Py_ssize_t __pyx_t_46; Py_ssize_t __pyx_t_47; Py_ssize_t __pyx_t_48; __pyx_t_5numpy_float64_t __pyx_t_49; __pyx_t_5numpy_float64_t __pyx_t_50; Py_ssize_t __pyx_t_51; Py_ssize_t __pyx_t_52; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("group_var_bin_float64", 0); __pyx_pybuffer_nobs.pybuffer.buf = NULL; __pyx_pybuffer_nobs.refcount = 0; __pyx_pybuffernd_nobs.data = NULL; __pyx_pybuffernd_nobs.rcbuffer = &__pyx_pybuffer_nobs; __pyx_pybuffer_sumx.pybuffer.buf = NULL; __pyx_pybuffer_sumx.refcount = 0; __pyx_pybuffernd_sumx.data = NULL; __pyx_pybuffernd_sumx.rcbuffer = &__pyx_pybuffer_sumx; __pyx_pybuffer_sumxx.pybuffer.buf = NULL; __pyx_pybuffer_sumxx.refcount = 0; __pyx_pybuffernd_sumxx.data = NULL; __pyx_pybuffernd_sumxx.rcbuffer = &__pyx_pybuffer_sumxx; __pyx_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; __pyx_pybuffer_counts.pybuffer.buf = NULL; __pyx_pybuffer_counts.refcount = 0; __pyx_pybuffernd_counts.data = NULL; __pyx_pybuffernd_counts.rcbuffer = &__pyx_pybuffer_counts; __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_bins.pybuffer.buf = NULL; __pyx_pybuffer_bins.refcount = 0; __pyx_pybuffernd_bins.data = NULL; __pyx_pybuffernd_bins.rcbuffer = &__pyx_pybuffer_bins; { __Pyx_BufFmt_StackElem __pyx_stack[1]; 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, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6000; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; __pyx_pybuffernd_out.diminfo[1].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_out.diminfo[1].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[1]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_counts.rcbuffer->pybuffer, (PyObject*)__pyx_v_counts, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6000; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_counts.diminfo[0].strides = __pyx_pybuffernd_counts.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_counts.diminfo[0].shape = __pyx_pybuffernd_counts.rcbuffer->pybuffer.shape[0]; { __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, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6000; __pyx_clineno = __LINE__; goto __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_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_bins.rcbuffer->pybuffer, (PyObject*)__pyx_v_bins, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6000; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_bins.diminfo[0].strides = __pyx_pybuffernd_bins.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_bins.diminfo[0].shape = __pyx_pybuffernd_bins.rcbuffer->pybuffer.shape[0]; /* "pandas/src/generated.pyx":6010 * ndarray[float64_t, ndim=2] nobs, sumx, sumxx * * nobs = np.zeros_like(out) # <<<<<<<<<<<<<< * sumx = np.zeros_like(out) * sumxx = np.zeros_like(out) */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6010; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_zeros_like); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6010; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 6010; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)__pyx_v_out)); PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_out)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out)); __pyx_t_3 = PyObject_Call(__pyx_t_2, __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6010; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6010; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_4 = ((PyArrayObject *)__pyx_t_3); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer); __pyx_t_5 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer, (PyObject*)__pyx_t_4, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_nobs.rcbuffer->pybuffer, (PyObject*)__pyx_v_nobs, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_pybuffernd_nobs.diminfo[0].strides = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_nobs.diminfo[0].shape = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_nobs.diminfo[1].strides = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_nobs.diminfo[1].shape = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.shape[1]; if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6010; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_4 = 0; __pyx_v_nobs = ((PyArrayObject *)__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/generated.pyx":6011 * * nobs = np.zeros_like(out) * sumx = np.zeros_like(out) # <<<<<<<<<<<<<< * sumxx = np.zeros_like(out) * */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6011; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_zeros_like); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6011; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6011; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(((PyObject *)__pyx_v_out)); PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_v_out)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out)); __pyx_t_2 = PyObject_Call(__pyx_t_1, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6011; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6011; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_4 = ((PyArrayObject *)__pyx_t_2); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_sumx.rcbuffer->pybuffer); __pyx_t_5 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_sumx.rcbuffer->pybuffer, (PyObject*)__pyx_t_4, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_sumx.rcbuffer->pybuffer, (PyObject*)__pyx_v_sumx, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_pybuffernd_sumx.diminfo[0].strides = __pyx_pybuffernd_sumx.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_sumx.diminfo[0].shape = __pyx_pybuffernd_sumx.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_sumx.diminfo[1].strides = __pyx_pybuffernd_sumx.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_sumx.diminfo[1].shape = __pyx_pybuffernd_sumx.rcbuffer->pybuffer.shape[1]; if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6011; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_4 = 0; __pyx_v_sumx = ((PyArrayObject *)__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":6012 * nobs = np.zeros_like(out) * sumx = np.zeros_like(out) * sumxx = np.zeros_like(out) # <<<<<<<<<<<<<< * * if bins[len(bins) - 1] == len(values): */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6012; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_zeros_like); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6012; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6012; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(((PyObject *)__pyx_v_out)); PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_out)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out)); __pyx_t_1 = PyObject_Call(__pyx_t_3, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6012; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6012; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_4 = ((PyArrayObject *)__pyx_t_1); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_sumxx.rcbuffer->pybuffer); __pyx_t_5 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_sumxx.rcbuffer->pybuffer, (PyObject*)__pyx_t_4, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_sumxx.rcbuffer->pybuffer, (PyObject*)__pyx_v_sumxx, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_pybuffernd_sumxx.diminfo[0].strides = __pyx_pybuffernd_sumxx.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_sumxx.diminfo[0].shape = __pyx_pybuffernd_sumxx.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_sumxx.diminfo[1].strides = __pyx_pybuffernd_sumxx.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_sumxx.diminfo[1].shape = __pyx_pybuffernd_sumxx.rcbuffer->pybuffer.shape[1]; if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6012; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_4 = 0; __pyx_v_sumxx = ((PyArrayObject *)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/generated.pyx":6014 * sumxx = np.zeros_like(out) * * if bins[len(bins) - 1] == len(values): # <<<<<<<<<<<<<< * ngroups = len(bins) * else: */ __pyx_t_9 = PyObject_Length(((PyObject *)__pyx_v_bins)); if (unlikely(__pyx_t_9 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6014; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_10 = (__pyx_t_9 - 1); __pyx_t_11 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6014; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_12 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_bins.rcbuffer->pybuffer.buf, __pyx_t_10, __pyx_pybuffernd_bins.diminfo[0].strides)) == __pyx_t_11) != 0); if (__pyx_t_12) { /* "pandas/src/generated.pyx":6015 * * if bins[len(bins) - 1] == len(values): * ngroups = len(bins) # <<<<<<<<<<<<<< * else: * ngroups = len(bins) + 1 */ __pyx_t_11 = PyObject_Length(((PyObject *)__pyx_v_bins)); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6015; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_ngroups = __pyx_t_11; goto __pyx_L3; } /*else*/ { /* "pandas/src/generated.pyx":6017 * ngroups = len(bins) * else: * ngroups = len(bins) + 1 # <<<<<<<<<<<<<< * * N, K = ( values).shape */ __pyx_t_11 = PyObject_Length(((PyObject *)__pyx_v_bins)); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6017; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_ngroups = (__pyx_t_11 + 1); } __pyx_L3:; /* "pandas/src/generated.pyx":6019 * ngroups = len(bins) + 1 * * N, K = ( values).shape # <<<<<<<<<<<<<< * * b = 0 */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_values), __pyx_n_s_shape); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6019; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) { PyObject* sequence = __pyx_t_1; #if CYTHON_COMPILING_IN_CPYTHON Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6019; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1); } else { __pyx_t_2 = PyList_GET_ITEM(sequence, 0); __pyx_t_3 = PyList_GET_ITEM(sequence, 1); } __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); #else __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6019; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6019; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } else { Py_ssize_t index = -1; __pyx_t_13 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6019; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_14 = Py_TYPE(__pyx_t_13)->tp_iternext; index = 0; __pyx_t_2 = __pyx_t_14(__pyx_t_13); if (unlikely(!__pyx_t_2)) goto __pyx_L4_unpacking_failed; __Pyx_GOTREF(__pyx_t_2); index = 1; __pyx_t_3 = __pyx_t_14(__pyx_t_13); if (unlikely(!__pyx_t_3)) goto __pyx_L4_unpacking_failed; __Pyx_GOTREF(__pyx_t_3); if (__Pyx_IternextUnpackEndCheck(__pyx_t_14(__pyx_t_13), 2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6019; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_14 = NULL; __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; goto __pyx_L5_unpacking_done; __pyx_L4_unpacking_failed:; __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_14 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6019; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_L5_unpacking_done:; } __pyx_t_11 = __Pyx_PyIndex_AsSsize_t(__pyx_t_2); if (unlikely((__pyx_t_11 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6019; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_9 = __Pyx_PyIndex_AsSsize_t(__pyx_t_3); if (unlikely((__pyx_t_9 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6019; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_N = __pyx_t_11; __pyx_v_K = __pyx_t_9; /* "pandas/src/generated.pyx":6021 * N, K = ( values).shape * * b = 0 # <<<<<<<<<<<<<< * if K > 1: * for i in range(N): */ __pyx_v_b = 0; /* "pandas/src/generated.pyx":6022 * * b = 0 * if K > 1: # <<<<<<<<<<<<<< * for i in range(N): * while b < ngroups - 1 and i >= bins[b]: */ __pyx_t_12 = ((__pyx_v_K > 1) != 0); if (__pyx_t_12) { /* "pandas/src/generated.pyx":6023 * b = 0 * if K > 1: * for i in range(N): # <<<<<<<<<<<<<< * while b < ngroups - 1 and i >= bins[b]: * b += 1 */ __pyx_t_9 = __pyx_v_N; for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_9; __pyx_t_11+=1) { __pyx_v_i = __pyx_t_11; /* "pandas/src/generated.pyx":6024 * if K > 1: * for i in range(N): * while b < ngroups - 1 and i >= bins[b]: # <<<<<<<<<<<<<< * b += 1 * */ while (1) { __pyx_t_12 = ((__pyx_v_b < (__pyx_v_ngroups - 1)) != 0); if (__pyx_t_12) { __pyx_t_15 = __pyx_v_b; __pyx_t_16 = ((__pyx_v_i >= (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_bins.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_bins.diminfo[0].strides))) != 0); __pyx_t_17 = __pyx_t_16; } else { __pyx_t_17 = __pyx_t_12; } if (!__pyx_t_17) break; /* "pandas/src/generated.pyx":6025 * for i in range(N): * while b < ngroups - 1 and i >= bins[b]: * b += 1 # <<<<<<<<<<<<<< * * counts[b] += 1 */ __pyx_v_b = (__pyx_v_b + 1); } /* "pandas/src/generated.pyx":6027 * b += 1 * * counts[b] += 1 # <<<<<<<<<<<<<< * * for j in range(K): */ __pyx_t_18 = __pyx_v_b; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_counts.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_counts.diminfo[0].strides) += 1; /* "pandas/src/generated.pyx":6029 * counts[b] += 1 * * for j in range(K): # <<<<<<<<<<<<<< * val = values[i, j] * */ __pyx_t_19 = __pyx_v_K; for (__pyx_t_20 = 0; __pyx_t_20 < __pyx_t_19; __pyx_t_20+=1) { __pyx_v_j = __pyx_t_20; /* "pandas/src/generated.pyx":6030 * * for j in range(K): * val = values[i, j] # <<<<<<<<<<<<<< * * # not nan */ __pyx_t_21 = __pyx_v_i; __pyx_t_22 = __pyx_v_j; __pyx_v_val = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_22, __pyx_pybuffernd_values.diminfo[1].strides)); /* "pandas/src/generated.pyx":6033 * * # not nan * if val == val: # <<<<<<<<<<<<<< * nobs[b, j] += 1 * sumx[b, j] += val */ __pyx_t_17 = ((__pyx_v_val == __pyx_v_val) != 0); if (__pyx_t_17) { /* "pandas/src/generated.pyx":6034 * # not nan * if val == val: * nobs[b, j] += 1 # <<<<<<<<<<<<<< * sumx[b, j] += val * sumxx[b, j] += val * val */ __pyx_t_23 = __pyx_v_b; __pyx_t_24 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_nobs.rcbuffer->pybuffer.buf, __pyx_t_23, __pyx_pybuffernd_nobs.diminfo[0].strides, __pyx_t_24, __pyx_pybuffernd_nobs.diminfo[1].strides) += 1.0; /* "pandas/src/generated.pyx":6035 * if val == val: * nobs[b, j] += 1 * sumx[b, j] += val # <<<<<<<<<<<<<< * sumxx[b, j] += val * val * else: */ __pyx_t_25 = __pyx_v_b; __pyx_t_26 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_sumx.rcbuffer->pybuffer.buf, __pyx_t_25, __pyx_pybuffernd_sumx.diminfo[0].strides, __pyx_t_26, __pyx_pybuffernd_sumx.diminfo[1].strides) += __pyx_v_val; /* "pandas/src/generated.pyx":6036 * nobs[b, j] += 1 * sumx[b, j] += val * sumxx[b, j] += val * val # <<<<<<<<<<<<<< * else: * for i in range(N): */ __pyx_t_27 = __pyx_v_b; __pyx_t_28 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_sumxx.rcbuffer->pybuffer.buf, __pyx_t_27, __pyx_pybuffernd_sumxx.diminfo[0].strides, __pyx_t_28, __pyx_pybuffernd_sumxx.diminfo[1].strides) += (__pyx_v_val * __pyx_v_val); goto __pyx_L13; } __pyx_L13:; } } goto __pyx_L6; } /*else*/ { /* "pandas/src/generated.pyx":6038 * sumxx[b, j] += val * val * else: * for i in range(N): # <<<<<<<<<<<<<< * while b < ngroups - 1 and i >= bins[b]: * b += 1 */ __pyx_t_9 = __pyx_v_N; for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_9; __pyx_t_11+=1) { __pyx_v_i = __pyx_t_11; /* "pandas/src/generated.pyx":6039 * else: * for i in range(N): * while b < ngroups - 1 and i >= bins[b]: # <<<<<<<<<<<<<< * b += 1 * */ while (1) { __pyx_t_17 = ((__pyx_v_b < (__pyx_v_ngroups - 1)) != 0); if (__pyx_t_17) { __pyx_t_19 = __pyx_v_b; __pyx_t_12 = ((__pyx_v_i >= (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_bins.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_bins.diminfo[0].strides))) != 0); __pyx_t_16 = __pyx_t_12; } else { __pyx_t_16 = __pyx_t_17; } if (!__pyx_t_16) break; /* "pandas/src/generated.pyx":6040 * for i in range(N): * while b < ngroups - 1 and i >= bins[b]: * b += 1 # <<<<<<<<<<<<<< * * counts[b] += 1 */ __pyx_v_b = (__pyx_v_b + 1); } /* "pandas/src/generated.pyx":6042 * b += 1 * * counts[b] += 1 # <<<<<<<<<<<<<< * val = values[i, 0] * */ __pyx_t_20 = __pyx_v_b; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_counts.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_counts.diminfo[0].strides) += 1; /* "pandas/src/generated.pyx":6043 * * counts[b] += 1 * val = values[i, 0] # <<<<<<<<<<<<<< * * # not nan */ __pyx_t_29 = __pyx_v_i; __pyx_t_30 = 0; __pyx_v_val = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_29, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_30, __pyx_pybuffernd_values.diminfo[1].strides)); /* "pandas/src/generated.pyx":6046 * * # not nan * if val == val: # <<<<<<<<<<<<<< * nobs[b, 0] += 1 * sumx[b, 0] += val */ __pyx_t_16 = ((__pyx_v_val == __pyx_v_val) != 0); if (__pyx_t_16) { /* "pandas/src/generated.pyx":6047 * # not nan * if val == val: * nobs[b, 0] += 1 # <<<<<<<<<<<<<< * sumx[b, 0] += val * sumxx[b, 0] += val * val */ __pyx_t_31 = __pyx_v_b; __pyx_t_32 = 0; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_nobs.rcbuffer->pybuffer.buf, __pyx_t_31, __pyx_pybuffernd_nobs.diminfo[0].strides, __pyx_t_32, __pyx_pybuffernd_nobs.diminfo[1].strides) += 1.0; /* "pandas/src/generated.pyx":6048 * if val == val: * nobs[b, 0] += 1 * sumx[b, 0] += val # <<<<<<<<<<<<<< * sumxx[b, 0] += val * val * */ __pyx_t_33 = __pyx_v_b; __pyx_t_34 = 0; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_sumx.rcbuffer->pybuffer.buf, __pyx_t_33, __pyx_pybuffernd_sumx.diminfo[0].strides, __pyx_t_34, __pyx_pybuffernd_sumx.diminfo[1].strides) += __pyx_v_val; /* "pandas/src/generated.pyx":6049 * nobs[b, 0] += 1 * sumx[b, 0] += val * sumxx[b, 0] += val * val # <<<<<<<<<<<<<< * * for i in range(ngroups): */ __pyx_t_35 = __pyx_v_b; __pyx_t_36 = 0; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_sumxx.rcbuffer->pybuffer.buf, __pyx_t_35, __pyx_pybuffernd_sumxx.diminfo[0].strides, __pyx_t_36, __pyx_pybuffernd_sumxx.diminfo[1].strides) += (__pyx_v_val * __pyx_v_val); goto __pyx_L18; } __pyx_L18:; } } __pyx_L6:; /* "pandas/src/generated.pyx":6051 * sumxx[b, 0] += val * val * * for i in range(ngroups): # <<<<<<<<<<<<<< * for j in range(K): * ct = nobs[i, j] */ __pyx_t_9 = __pyx_v_ngroups; for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_9; __pyx_t_11+=1) { __pyx_v_i = __pyx_t_11; /* "pandas/src/generated.pyx":6052 * * for i in range(ngroups): * for j in range(K): # <<<<<<<<<<<<<< * ct = nobs[i, j] * if ct < 2: */ __pyx_t_37 = __pyx_v_K; for (__pyx_t_38 = 0; __pyx_t_38 < __pyx_t_37; __pyx_t_38+=1) { __pyx_v_j = __pyx_t_38; /* "pandas/src/generated.pyx":6053 * for i in range(ngroups): * for j in range(K): * ct = nobs[i, j] # <<<<<<<<<<<<<< * if ct < 2: * out[i, j] = nan */ __pyx_t_39 = __pyx_v_i; __pyx_t_40 = __pyx_v_j; __pyx_v_ct = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_nobs.rcbuffer->pybuffer.buf, __pyx_t_39, __pyx_pybuffernd_nobs.diminfo[0].strides, __pyx_t_40, __pyx_pybuffernd_nobs.diminfo[1].strides)); /* "pandas/src/generated.pyx":6054 * for j in range(K): * ct = nobs[i, j] * if ct < 2: # <<<<<<<<<<<<<< * out[i, j] = nan * else: */ __pyx_t_16 = ((__pyx_v_ct < 2.0) != 0); if (__pyx_t_16) { /* "pandas/src/generated.pyx":6055 * ct = nobs[i, j] * if ct < 2: * out[i, j] = nan # <<<<<<<<<<<<<< * else: * out[i, j] = ((ct * sumxx[i, j] - sumx[i, j] * sumx[i, j]) / */ __pyx_t_41 = __pyx_v_i; __pyx_t_42 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_41, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_42, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_6pandas_5algos_nan; goto __pyx_L23; } /*else*/ { /* "pandas/src/generated.pyx":6057 * out[i, j] = nan * else: * out[i, j] = ((ct * sumxx[i, j] - sumx[i, j] * sumx[i, j]) / # <<<<<<<<<<<<<< * (ct * ct - ct)) * @cython.wraparound(False) */ __pyx_t_43 = __pyx_v_i; __pyx_t_44 = __pyx_v_j; __pyx_t_45 = __pyx_v_i; __pyx_t_46 = __pyx_v_j; __pyx_t_47 = __pyx_v_i; __pyx_t_48 = __pyx_v_j; __pyx_t_49 = ((__pyx_v_ct * (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_sumxx.rcbuffer->pybuffer.buf, __pyx_t_43, __pyx_pybuffernd_sumxx.diminfo[0].strides, __pyx_t_44, __pyx_pybuffernd_sumxx.diminfo[1].strides))) - ((*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_sumx.rcbuffer->pybuffer.buf, __pyx_t_45, __pyx_pybuffernd_sumx.diminfo[0].strides, __pyx_t_46, __pyx_pybuffernd_sumx.diminfo[1].strides)) * (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_sumx.rcbuffer->pybuffer.buf, __pyx_t_47, __pyx_pybuffernd_sumx.diminfo[0].strides, __pyx_t_48, __pyx_pybuffernd_sumx.diminfo[1].strides)))); /* "pandas/src/generated.pyx":6058 * else: * out[i, j] = ((ct * sumxx[i, j] - sumx[i, j] * sumx[i, j]) / * (ct * ct - ct)) # <<<<<<<<<<<<<< * @cython.wraparound(False) * @cython.boundscheck(False) */ __pyx_t_50 = ((__pyx_v_ct * __pyx_v_ct) - __pyx_v_ct); /* "pandas/src/generated.pyx":6057 * out[i, j] = nan * else: * out[i, j] = ((ct * sumxx[i, j] - sumx[i, j] * sumx[i, j]) / # <<<<<<<<<<<<<< * (ct * ct - ct)) * @cython.wraparound(False) */ if (unlikely(__pyx_t_50 == 0)) { #ifdef WITH_THREAD PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure(); #endif PyErr_SetString(PyExc_ZeroDivisionError, "float division"); #ifdef WITH_THREAD PyGILState_Release(__pyx_gilstate_save); #endif {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6057; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_51 = __pyx_v_i; __pyx_t_52 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_51, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_52, __pyx_pybuffernd_out.diminfo[1].strides) = (__pyx_t_49 / __pyx_t_50); } __pyx_L23:; } } /* "pandas/src/generated.pyx":6000 * @cython.wraparound(False) * @cython.boundscheck(False) * def group_var_bin_float64(ndarray[float64_t, ndim=2] out, # <<<<<<<<<<<<<< * ndarray[int64_t] counts, * ndarray[float64_t, ndim=2] 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_13); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_bins.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_counts.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_sumx.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_sumxx.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.group_var_bin_float64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_bins.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_counts.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_sumx.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_sumxx.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_nobs); __Pyx_XDECREF((PyObject *)__pyx_v_sumx); __Pyx_XDECREF((PyObject *)__pyx_v_sumxx); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":6061 * @cython.wraparound(False) * @cython.boundscheck(False) * def group_var_bin_float32(ndarray[float32_t, ndim=2] out, # <<<<<<<<<<<<<< * ndarray[int64_t] counts, * ndarray[float32_t, ndim=2] values, */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_425group_var_bin_float32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_425group_var_bin_float32 = {__Pyx_NAMESTR("group_var_bin_float32"), (PyCFunction)__pyx_pw_6pandas_5algos_425group_var_bin_float32, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_425group_var_bin_float32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_out = 0; PyArrayObject *__pyx_v_counts = 0; PyArrayObject *__pyx_v_values = 0; PyArrayObject *__pyx_v_bins = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("group_var_bin_float32 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_out,&__pyx_n_s_counts,&__pyx_n_s_values,&__pyx_n_s_bins,0}; PyObject* values[4] = {0,0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_out)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_counts)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("group_var_bin_float32", 1, 4, 4, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6061; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_values)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("group_var_bin_float32", 1, 4, 4, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6061; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_bins)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("group_var_bin_float32", 1, 4, 4, 3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6061; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "group_var_bin_float32") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6061; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 4) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[3] = PyTuple_GET_ITEM(__pyx_args, 3); } __pyx_v_out = ((PyArrayObject *)values[0]); __pyx_v_counts = ((PyArrayObject *)values[1]); __pyx_v_values = ((PyArrayObject *)values[2]); __pyx_v_bins = ((PyArrayObject *)values[3]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("group_var_bin_float32", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6061; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.group_var_bin_float32", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_5numpy_ndarray, 1, "out", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6061; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_counts), __pyx_ptype_5numpy_ndarray, 1, "counts", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6062; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6063; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_bins), __pyx_ptype_5numpy_ndarray, 1, "bins", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6064; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_424group_var_bin_float32(__pyx_self, __pyx_v_out, __pyx_v_counts, __pyx_v_values, __pyx_v_bins); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5algos_424group_var_bin_float32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_out, PyArrayObject *__pyx_v_counts, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_bins) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_N; Py_ssize_t __pyx_v_K; Py_ssize_t __pyx_v_ngroups; Py_ssize_t __pyx_v_b; __pyx_t_5numpy_float32_t __pyx_v_val; __pyx_t_5numpy_float32_t __pyx_v_ct; PyArrayObject *__pyx_v_nobs = 0; PyArrayObject *__pyx_v_sumx = 0; PyArrayObject *__pyx_v_sumxx = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_bins; __Pyx_Buffer __pyx_pybuffer_bins; __Pyx_LocalBuf_ND __pyx_pybuffernd_counts; __Pyx_Buffer __pyx_pybuffer_counts; __Pyx_LocalBuf_ND __pyx_pybuffernd_nobs; __Pyx_Buffer __pyx_pybuffer_nobs; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_sumx; __Pyx_Buffer __pyx_pybuffer_sumx; __Pyx_LocalBuf_ND __pyx_pybuffernd_sumxx; __Pyx_Buffer __pyx_pybuffer_sumxx; __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; PyArrayObject *__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; Py_ssize_t __pyx_t_11; int __pyx_t_12; PyObject *__pyx_t_13 = NULL; PyObject *(*__pyx_t_14)(PyObject *); Py_ssize_t __pyx_t_15; int __pyx_t_16; int __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; long __pyx_t_30; Py_ssize_t __pyx_t_31; long __pyx_t_32; Py_ssize_t __pyx_t_33; long __pyx_t_34; Py_ssize_t __pyx_t_35; long __pyx_t_36; Py_ssize_t __pyx_t_37; Py_ssize_t __pyx_t_38; Py_ssize_t __pyx_t_39; Py_ssize_t __pyx_t_40; Py_ssize_t __pyx_t_41; Py_ssize_t __pyx_t_42; Py_ssize_t __pyx_t_43; Py_ssize_t __pyx_t_44; Py_ssize_t __pyx_t_45; Py_ssize_t __pyx_t_46; Py_ssize_t __pyx_t_47; Py_ssize_t __pyx_t_48; __pyx_t_5numpy_float32_t __pyx_t_49; __pyx_t_5numpy_float32_t __pyx_t_50; Py_ssize_t __pyx_t_51; Py_ssize_t __pyx_t_52; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("group_var_bin_float32", 0); __pyx_pybuffer_nobs.pybuffer.buf = NULL; __pyx_pybuffer_nobs.refcount = 0; __pyx_pybuffernd_nobs.data = NULL; __pyx_pybuffernd_nobs.rcbuffer = &__pyx_pybuffer_nobs; __pyx_pybuffer_sumx.pybuffer.buf = NULL; __pyx_pybuffer_sumx.refcount = 0; __pyx_pybuffernd_sumx.data = NULL; __pyx_pybuffernd_sumx.rcbuffer = &__pyx_pybuffer_sumx; __pyx_pybuffer_sumxx.pybuffer.buf = NULL; __pyx_pybuffer_sumxx.refcount = 0; __pyx_pybuffernd_sumxx.data = NULL; __pyx_pybuffernd_sumxx.rcbuffer = &__pyx_pybuffer_sumxx; __pyx_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; __pyx_pybuffer_counts.pybuffer.buf = NULL; __pyx_pybuffer_counts.refcount = 0; __pyx_pybuffernd_counts.data = NULL; __pyx_pybuffernd_counts.rcbuffer = &__pyx_pybuffer_counts; __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_bins.pybuffer.buf = NULL; __pyx_pybuffer_bins.refcount = 0; __pyx_pybuffernd_bins.data = NULL; __pyx_pybuffernd_bins.rcbuffer = &__pyx_pybuffer_bins; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_v_out, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6061; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; __pyx_pybuffernd_out.diminfo[1].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_out.diminfo[1].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[1]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_counts.rcbuffer->pybuffer, (PyObject*)__pyx_v_counts, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6061; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_counts.diminfo[0].strides = __pyx_pybuffernd_counts.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_counts.diminfo[0].shape = __pyx_pybuffernd_counts.rcbuffer->pybuffer.shape[0]; { __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_float32_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6061; __pyx_clineno = __LINE__; goto __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_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_bins.rcbuffer->pybuffer, (PyObject*)__pyx_v_bins, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6061; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_bins.diminfo[0].strides = __pyx_pybuffernd_bins.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_bins.diminfo[0].shape = __pyx_pybuffernd_bins.rcbuffer->pybuffer.shape[0]; /* "pandas/src/generated.pyx":6071 * ndarray[float32_t, ndim=2] nobs, sumx, sumxx * * nobs = np.zeros_like(out) # <<<<<<<<<<<<<< * sumx = np.zeros_like(out) * sumxx = np.zeros_like(out) */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6071; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_zeros_like); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6071; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 6071; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)__pyx_v_out)); PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_out)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out)); __pyx_t_3 = PyObject_Call(__pyx_t_2, __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6071; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6071; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_4 = ((PyArrayObject *)__pyx_t_3); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer); __pyx_t_5 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer, (PyObject*)__pyx_t_4, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_nobs.rcbuffer->pybuffer, (PyObject*)__pyx_v_nobs, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_pybuffernd_nobs.diminfo[0].strides = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_nobs.diminfo[0].shape = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_nobs.diminfo[1].strides = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_nobs.diminfo[1].shape = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.shape[1]; if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6071; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_4 = 0; __pyx_v_nobs = ((PyArrayObject *)__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/generated.pyx":6072 * * nobs = np.zeros_like(out) * sumx = np.zeros_like(out) # <<<<<<<<<<<<<< * sumxx = np.zeros_like(out) * */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6072; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_zeros_like); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6072; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6072; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(((PyObject *)__pyx_v_out)); PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_v_out)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out)); __pyx_t_2 = PyObject_Call(__pyx_t_1, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6072; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6072; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_4 = ((PyArrayObject *)__pyx_t_2); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_sumx.rcbuffer->pybuffer); __pyx_t_5 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_sumx.rcbuffer->pybuffer, (PyObject*)__pyx_t_4, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_sumx.rcbuffer->pybuffer, (PyObject*)__pyx_v_sumx, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_pybuffernd_sumx.diminfo[0].strides = __pyx_pybuffernd_sumx.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_sumx.diminfo[0].shape = __pyx_pybuffernd_sumx.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_sumx.diminfo[1].strides = __pyx_pybuffernd_sumx.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_sumx.diminfo[1].shape = __pyx_pybuffernd_sumx.rcbuffer->pybuffer.shape[1]; if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6072; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_4 = 0; __pyx_v_sumx = ((PyArrayObject *)__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":6073 * nobs = np.zeros_like(out) * sumx = np.zeros_like(out) * sumxx = np.zeros_like(out) # <<<<<<<<<<<<<< * * if bins[len(bins) - 1] == len(values): */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6073; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_zeros_like); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6073; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6073; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(((PyObject *)__pyx_v_out)); PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_out)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out)); __pyx_t_1 = PyObject_Call(__pyx_t_3, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6073; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6073; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_4 = ((PyArrayObject *)__pyx_t_1); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_sumxx.rcbuffer->pybuffer); __pyx_t_5 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_sumxx.rcbuffer->pybuffer, (PyObject*)__pyx_t_4, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_sumxx.rcbuffer->pybuffer, (PyObject*)__pyx_v_sumxx, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_pybuffernd_sumxx.diminfo[0].strides = __pyx_pybuffernd_sumxx.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_sumxx.diminfo[0].shape = __pyx_pybuffernd_sumxx.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_sumxx.diminfo[1].strides = __pyx_pybuffernd_sumxx.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_sumxx.diminfo[1].shape = __pyx_pybuffernd_sumxx.rcbuffer->pybuffer.shape[1]; if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6073; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_4 = 0; __pyx_v_sumxx = ((PyArrayObject *)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/generated.pyx":6075 * sumxx = np.zeros_like(out) * * if bins[len(bins) - 1] == len(values): # <<<<<<<<<<<<<< * ngroups = len(bins) * else: */ __pyx_t_9 = PyObject_Length(((PyObject *)__pyx_v_bins)); if (unlikely(__pyx_t_9 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6075; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_10 = (__pyx_t_9 - 1); __pyx_t_11 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6075; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_12 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_bins.rcbuffer->pybuffer.buf, __pyx_t_10, __pyx_pybuffernd_bins.diminfo[0].strides)) == __pyx_t_11) != 0); if (__pyx_t_12) { /* "pandas/src/generated.pyx":6076 * * if bins[len(bins) - 1] == len(values): * ngroups = len(bins) # <<<<<<<<<<<<<< * else: * ngroups = len(bins) + 1 */ __pyx_t_11 = PyObject_Length(((PyObject *)__pyx_v_bins)); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6076; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_ngroups = __pyx_t_11; goto __pyx_L3; } /*else*/ { /* "pandas/src/generated.pyx":6078 * ngroups = len(bins) * else: * ngroups = len(bins) + 1 # <<<<<<<<<<<<<< * * N, K = ( values).shape */ __pyx_t_11 = PyObject_Length(((PyObject *)__pyx_v_bins)); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6078; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_ngroups = (__pyx_t_11 + 1); } __pyx_L3:; /* "pandas/src/generated.pyx":6080 * ngroups = len(bins) + 1 * * N, K = ( values).shape # <<<<<<<<<<<<<< * * b = 0 */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_values), __pyx_n_s_shape); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6080; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) { PyObject* sequence = __pyx_t_1; #if CYTHON_COMPILING_IN_CPYTHON Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6080; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1); } else { __pyx_t_2 = PyList_GET_ITEM(sequence, 0); __pyx_t_3 = PyList_GET_ITEM(sequence, 1); } __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); #else __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6080; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6080; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } else { Py_ssize_t index = -1; __pyx_t_13 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6080; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_14 = Py_TYPE(__pyx_t_13)->tp_iternext; index = 0; __pyx_t_2 = __pyx_t_14(__pyx_t_13); if (unlikely(!__pyx_t_2)) goto __pyx_L4_unpacking_failed; __Pyx_GOTREF(__pyx_t_2); index = 1; __pyx_t_3 = __pyx_t_14(__pyx_t_13); if (unlikely(!__pyx_t_3)) goto __pyx_L4_unpacking_failed; __Pyx_GOTREF(__pyx_t_3); if (__Pyx_IternextUnpackEndCheck(__pyx_t_14(__pyx_t_13), 2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6080; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_14 = NULL; __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; goto __pyx_L5_unpacking_done; __pyx_L4_unpacking_failed:; __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_14 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6080; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_L5_unpacking_done:; } __pyx_t_11 = __Pyx_PyIndex_AsSsize_t(__pyx_t_2); if (unlikely((__pyx_t_11 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6080; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_9 = __Pyx_PyIndex_AsSsize_t(__pyx_t_3); if (unlikely((__pyx_t_9 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6080; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_N = __pyx_t_11; __pyx_v_K = __pyx_t_9; /* "pandas/src/generated.pyx":6082 * N, K = ( values).shape * * b = 0 # <<<<<<<<<<<<<< * if K > 1: * for i in range(N): */ __pyx_v_b = 0; /* "pandas/src/generated.pyx":6083 * * b = 0 * if K > 1: # <<<<<<<<<<<<<< * for i in range(N): * while b < ngroups - 1 and i >= bins[b]: */ __pyx_t_12 = ((__pyx_v_K > 1) != 0); if (__pyx_t_12) { /* "pandas/src/generated.pyx":6084 * b = 0 * if K > 1: * for i in range(N): # <<<<<<<<<<<<<< * while b < ngroups - 1 and i >= bins[b]: * b += 1 */ __pyx_t_9 = __pyx_v_N; for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_9; __pyx_t_11+=1) { __pyx_v_i = __pyx_t_11; /* "pandas/src/generated.pyx":6085 * if K > 1: * for i in range(N): * while b < ngroups - 1 and i >= bins[b]: # <<<<<<<<<<<<<< * b += 1 * */ while (1) { __pyx_t_12 = ((__pyx_v_b < (__pyx_v_ngroups - 1)) != 0); if (__pyx_t_12) { __pyx_t_15 = __pyx_v_b; __pyx_t_16 = ((__pyx_v_i >= (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_bins.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_bins.diminfo[0].strides))) != 0); __pyx_t_17 = __pyx_t_16; } else { __pyx_t_17 = __pyx_t_12; } if (!__pyx_t_17) break; /* "pandas/src/generated.pyx":6086 * for i in range(N): * while b < ngroups - 1 and i >= bins[b]: * b += 1 # <<<<<<<<<<<<<< * * counts[b] += 1 */ __pyx_v_b = (__pyx_v_b + 1); } /* "pandas/src/generated.pyx":6088 * b += 1 * * counts[b] += 1 # <<<<<<<<<<<<<< * * for j in range(K): */ __pyx_t_18 = __pyx_v_b; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_counts.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_counts.diminfo[0].strides) += 1; /* "pandas/src/generated.pyx":6090 * counts[b] += 1 * * for j in range(K): # <<<<<<<<<<<<<< * val = values[i, j] * */ __pyx_t_19 = __pyx_v_K; for (__pyx_t_20 = 0; __pyx_t_20 < __pyx_t_19; __pyx_t_20+=1) { __pyx_v_j = __pyx_t_20; /* "pandas/src/generated.pyx":6091 * * for j in range(K): * val = values[i, j] # <<<<<<<<<<<<<< * * # not nan */ __pyx_t_21 = __pyx_v_i; __pyx_t_22 = __pyx_v_j; __pyx_v_val = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_22, __pyx_pybuffernd_values.diminfo[1].strides)); /* "pandas/src/generated.pyx":6094 * * # not nan * if val == val: # <<<<<<<<<<<<<< * nobs[b, j] += 1 * sumx[b, j] += val */ __pyx_t_17 = ((__pyx_v_val == __pyx_v_val) != 0); if (__pyx_t_17) { /* "pandas/src/generated.pyx":6095 * # not nan * if val == val: * nobs[b, j] += 1 # <<<<<<<<<<<<<< * sumx[b, j] += val * sumxx[b, j] += val * val */ __pyx_t_23 = __pyx_v_b; __pyx_t_24 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_nobs.rcbuffer->pybuffer.buf, __pyx_t_23, __pyx_pybuffernd_nobs.diminfo[0].strides, __pyx_t_24, __pyx_pybuffernd_nobs.diminfo[1].strides) += 1.0; /* "pandas/src/generated.pyx":6096 * if val == val: * nobs[b, j] += 1 * sumx[b, j] += val # <<<<<<<<<<<<<< * sumxx[b, j] += val * val * else: */ __pyx_t_25 = __pyx_v_b; __pyx_t_26 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_sumx.rcbuffer->pybuffer.buf, __pyx_t_25, __pyx_pybuffernd_sumx.diminfo[0].strides, __pyx_t_26, __pyx_pybuffernd_sumx.diminfo[1].strides) += __pyx_v_val; /* "pandas/src/generated.pyx":6097 * nobs[b, j] += 1 * sumx[b, j] += val * sumxx[b, j] += val * val # <<<<<<<<<<<<<< * else: * for i in range(N): */ __pyx_t_27 = __pyx_v_b; __pyx_t_28 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_sumxx.rcbuffer->pybuffer.buf, __pyx_t_27, __pyx_pybuffernd_sumxx.diminfo[0].strides, __pyx_t_28, __pyx_pybuffernd_sumxx.diminfo[1].strides) += (__pyx_v_val * __pyx_v_val); goto __pyx_L13; } __pyx_L13:; } } goto __pyx_L6; } /*else*/ { /* "pandas/src/generated.pyx":6099 * sumxx[b, j] += val * val * else: * for i in range(N): # <<<<<<<<<<<<<< * while b < ngroups - 1 and i >= bins[b]: * b += 1 */ __pyx_t_9 = __pyx_v_N; for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_9; __pyx_t_11+=1) { __pyx_v_i = __pyx_t_11; /* "pandas/src/generated.pyx":6100 * else: * for i in range(N): * while b < ngroups - 1 and i >= bins[b]: # <<<<<<<<<<<<<< * b += 1 * */ while (1) { __pyx_t_17 = ((__pyx_v_b < (__pyx_v_ngroups - 1)) != 0); if (__pyx_t_17) { __pyx_t_19 = __pyx_v_b; __pyx_t_12 = ((__pyx_v_i >= (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_bins.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_bins.diminfo[0].strides))) != 0); __pyx_t_16 = __pyx_t_12; } else { __pyx_t_16 = __pyx_t_17; } if (!__pyx_t_16) break; /* "pandas/src/generated.pyx":6101 * for i in range(N): * while b < ngroups - 1 and i >= bins[b]: * b += 1 # <<<<<<<<<<<<<< * * counts[b] += 1 */ __pyx_v_b = (__pyx_v_b + 1); } /* "pandas/src/generated.pyx":6103 * b += 1 * * counts[b] += 1 # <<<<<<<<<<<<<< * val = values[i, 0] * */ __pyx_t_20 = __pyx_v_b; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_counts.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_counts.diminfo[0].strides) += 1; /* "pandas/src/generated.pyx":6104 * * counts[b] += 1 * val = values[i, 0] # <<<<<<<<<<<<<< * * # not nan */ __pyx_t_29 = __pyx_v_i; __pyx_t_30 = 0; __pyx_v_val = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_29, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_30, __pyx_pybuffernd_values.diminfo[1].strides)); /* "pandas/src/generated.pyx":6107 * * # not nan * if val == val: # <<<<<<<<<<<<<< * nobs[b, 0] += 1 * sumx[b, 0] += val */ __pyx_t_16 = ((__pyx_v_val == __pyx_v_val) != 0); if (__pyx_t_16) { /* "pandas/src/generated.pyx":6108 * # not nan * if val == val: * nobs[b, 0] += 1 # <<<<<<<<<<<<<< * sumx[b, 0] += val * sumxx[b, 0] += val * val */ __pyx_t_31 = __pyx_v_b; __pyx_t_32 = 0; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_nobs.rcbuffer->pybuffer.buf, __pyx_t_31, __pyx_pybuffernd_nobs.diminfo[0].strides, __pyx_t_32, __pyx_pybuffernd_nobs.diminfo[1].strides) += 1.0; /* "pandas/src/generated.pyx":6109 * if val == val: * nobs[b, 0] += 1 * sumx[b, 0] += val # <<<<<<<<<<<<<< * sumxx[b, 0] += val * val * */ __pyx_t_33 = __pyx_v_b; __pyx_t_34 = 0; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_sumx.rcbuffer->pybuffer.buf, __pyx_t_33, __pyx_pybuffernd_sumx.diminfo[0].strides, __pyx_t_34, __pyx_pybuffernd_sumx.diminfo[1].strides) += __pyx_v_val; /* "pandas/src/generated.pyx":6110 * nobs[b, 0] += 1 * sumx[b, 0] += val * sumxx[b, 0] += val * val # <<<<<<<<<<<<<< * * for i in range(ngroups): */ __pyx_t_35 = __pyx_v_b; __pyx_t_36 = 0; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_sumxx.rcbuffer->pybuffer.buf, __pyx_t_35, __pyx_pybuffernd_sumxx.diminfo[0].strides, __pyx_t_36, __pyx_pybuffernd_sumxx.diminfo[1].strides) += (__pyx_v_val * __pyx_v_val); goto __pyx_L18; } __pyx_L18:; } } __pyx_L6:; /* "pandas/src/generated.pyx":6112 * sumxx[b, 0] += val * val * * for i in range(ngroups): # <<<<<<<<<<<<<< * for j in range(K): * ct = nobs[i, j] */ __pyx_t_9 = __pyx_v_ngroups; for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_9; __pyx_t_11+=1) { __pyx_v_i = __pyx_t_11; /* "pandas/src/generated.pyx":6113 * * for i in range(ngroups): * for j in range(K): # <<<<<<<<<<<<<< * ct = nobs[i, j] * if ct < 2: */ __pyx_t_37 = __pyx_v_K; for (__pyx_t_38 = 0; __pyx_t_38 < __pyx_t_37; __pyx_t_38+=1) { __pyx_v_j = __pyx_t_38; /* "pandas/src/generated.pyx":6114 * for i in range(ngroups): * for j in range(K): * ct = nobs[i, j] # <<<<<<<<<<<<<< * if ct < 2: * out[i, j] = nan */ __pyx_t_39 = __pyx_v_i; __pyx_t_40 = __pyx_v_j; __pyx_v_ct = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_nobs.rcbuffer->pybuffer.buf, __pyx_t_39, __pyx_pybuffernd_nobs.diminfo[0].strides, __pyx_t_40, __pyx_pybuffernd_nobs.diminfo[1].strides)); /* "pandas/src/generated.pyx":6115 * for j in range(K): * ct = nobs[i, j] * if ct < 2: # <<<<<<<<<<<<<< * out[i, j] = nan * else: */ __pyx_t_16 = ((__pyx_v_ct < 2.0) != 0); if (__pyx_t_16) { /* "pandas/src/generated.pyx":6116 * ct = nobs[i, j] * if ct < 2: * out[i, j] = nan # <<<<<<<<<<<<<< * else: * out[i, j] = ((ct * sumxx[i, j] - sumx[i, j] * sumx[i, j]) / */ __pyx_t_41 = __pyx_v_i; __pyx_t_42 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_41, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_42, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_6pandas_5algos_nan; goto __pyx_L23; } /*else*/ { /* "pandas/src/generated.pyx":6118 * out[i, j] = nan * else: * out[i, j] = ((ct * sumxx[i, j] - sumx[i, j] * sumx[i, j]) / # <<<<<<<<<<<<<< * (ct * ct - ct)) * */ __pyx_t_43 = __pyx_v_i; __pyx_t_44 = __pyx_v_j; __pyx_t_45 = __pyx_v_i; __pyx_t_46 = __pyx_v_j; __pyx_t_47 = __pyx_v_i; __pyx_t_48 = __pyx_v_j; __pyx_t_49 = ((__pyx_v_ct * (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_sumxx.rcbuffer->pybuffer.buf, __pyx_t_43, __pyx_pybuffernd_sumxx.diminfo[0].strides, __pyx_t_44, __pyx_pybuffernd_sumxx.diminfo[1].strides))) - ((*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_sumx.rcbuffer->pybuffer.buf, __pyx_t_45, __pyx_pybuffernd_sumx.diminfo[0].strides, __pyx_t_46, __pyx_pybuffernd_sumx.diminfo[1].strides)) * (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_sumx.rcbuffer->pybuffer.buf, __pyx_t_47, __pyx_pybuffernd_sumx.diminfo[0].strides, __pyx_t_48, __pyx_pybuffernd_sumx.diminfo[1].strides)))); /* "pandas/src/generated.pyx":6119 * else: * out[i, j] = ((ct * sumxx[i, j] - sumx[i, j] * sumx[i, j]) / * (ct * ct - ct)) # <<<<<<<<<<<<<< * * @cython.wraparound(False) */ __pyx_t_50 = ((__pyx_v_ct * __pyx_v_ct) - __pyx_v_ct); /* "pandas/src/generated.pyx":6118 * out[i, j] = nan * else: * out[i, j] = ((ct * sumxx[i, j] - sumx[i, j] * sumx[i, j]) / # <<<<<<<<<<<<<< * (ct * ct - ct)) * */ if (unlikely(__pyx_t_50 == 0)) { #ifdef WITH_THREAD PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure(); #endif PyErr_SetString(PyExc_ZeroDivisionError, "float division"); #ifdef WITH_THREAD PyGILState_Release(__pyx_gilstate_save); #endif {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6118; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_51 = __pyx_v_i; __pyx_t_52 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_51, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_52, __pyx_pybuffernd_out.diminfo[1].strides) = (__pyx_t_49 / __pyx_t_50); } __pyx_L23:; } } /* "pandas/src/generated.pyx":6061 * @cython.wraparound(False) * @cython.boundscheck(False) * def group_var_bin_float32(ndarray[float32_t, ndim=2] out, # <<<<<<<<<<<<<< * ndarray[int64_t] counts, * ndarray[float32_t, ndim=2] 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_13); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_bins.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_counts.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_sumx.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_sumxx.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.group_var_bin_float32", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_bins.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_counts.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_sumx.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_sumxx.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_nobs); __Pyx_XDECREF((PyObject *)__pyx_v_sumx); __Pyx_XDECREF((PyObject *)__pyx_v_sumxx); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":6123 * @cython.wraparound(False) * @cython.boundscheck(False) * def group_mean_float64(ndarray[float64_t, ndim=2] out, # <<<<<<<<<<<<<< * ndarray[int64_t] counts, * ndarray[float64_t, ndim=2] values, */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_427group_mean_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_427group_mean_float64 = {__Pyx_NAMESTR("group_mean_float64"), (PyCFunction)__pyx_pw_6pandas_5algos_427group_mean_float64, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_427group_mean_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_out = 0; PyArrayObject *__pyx_v_counts = 0; PyArrayObject *__pyx_v_values = 0; PyArrayObject *__pyx_v_labels = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("group_mean_float64 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_out,&__pyx_n_s_counts,&__pyx_n_s_values,&__pyx_n_s_labels,0}; PyObject* values[4] = {0,0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_out)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_counts)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("group_mean_float64", 1, 4, 4, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6123; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_values)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("group_mean_float64", 1, 4, 4, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6123; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_labels)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("group_mean_float64", 1, 4, 4, 3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6123; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "group_mean_float64") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6123; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 4) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[3] = PyTuple_GET_ITEM(__pyx_args, 3); } __pyx_v_out = ((PyArrayObject *)values[0]); __pyx_v_counts = ((PyArrayObject *)values[1]); __pyx_v_values = ((PyArrayObject *)values[2]); __pyx_v_labels = ((PyArrayObject *)values[3]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("group_mean_float64", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6123; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.group_mean_float64", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_5numpy_ndarray, 1, "out", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6123; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_counts), __pyx_ptype_5numpy_ndarray, 1, "counts", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6124; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6125; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_labels), __pyx_ptype_5numpy_ndarray, 1, "labels", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6126; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_426group_mean_float64(__pyx_self, __pyx_v_out, __pyx_v_counts, __pyx_v_values, __pyx_v_labels); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5algos_426group_mean_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_out, PyArrayObject *__pyx_v_counts, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_labels) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_N; Py_ssize_t __pyx_v_K; Py_ssize_t __pyx_v_lab; __pyx_t_5numpy_float64_t __pyx_v_val; __pyx_t_5numpy_float64_t __pyx_v_count; PyArrayObject *__pyx_v_sumx = 0; PyArrayObject *__pyx_v_nobs = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_counts; __Pyx_Buffer __pyx_pybuffer_counts; __Pyx_LocalBuf_ND __pyx_pybuffernd_labels; __Pyx_Buffer __pyx_pybuffer_labels; __Pyx_LocalBuf_ND __pyx_pybuffernd_nobs; __Pyx_Buffer __pyx_pybuffer_nobs; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_sumx; __Pyx_Buffer __pyx_pybuffer_sumx; __Pyx_LocalBuf_ND __pyx_pybuffernd_values; __Pyx_Buffer __pyx_pybuffer_values; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; Py_ssize_t __pyx_t_2; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyArrayObject *__pyx_t_7 = NULL; int __pyx_t_8; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; PyObject *__pyx_t_11 = NULL; PyObject *__pyx_t_12 = NULL; PyObject *(*__pyx_t_13)(PyObject *); 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; long __pyx_t_25; Py_ssize_t __pyx_t_26; long __pyx_t_27; Py_ssize_t __pyx_t_28; long __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; Py_ssize_t __pyx_t_37; Py_ssize_t __pyx_t_38; Py_ssize_t __pyx_t_39; __pyx_t_5numpy_float64_t __pyx_t_40; Py_ssize_t __pyx_t_41; Py_ssize_t __pyx_t_42; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("group_mean_float64", 0); __pyx_pybuffer_sumx.pybuffer.buf = NULL; __pyx_pybuffer_sumx.refcount = 0; __pyx_pybuffernd_sumx.data = NULL; __pyx_pybuffernd_sumx.rcbuffer = &__pyx_pybuffer_sumx; __pyx_pybuffer_nobs.pybuffer.buf = NULL; __pyx_pybuffer_nobs.refcount = 0; __pyx_pybuffernd_nobs.data = NULL; __pyx_pybuffernd_nobs.rcbuffer = &__pyx_pybuffer_nobs; __pyx_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; __pyx_pybuffer_counts.pybuffer.buf = NULL; __pyx_pybuffer_counts.refcount = 0; __pyx_pybuffernd_counts.data = NULL; __pyx_pybuffernd_counts.rcbuffer = &__pyx_pybuffer_counts; __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_labels.pybuffer.buf = NULL; __pyx_pybuffer_labels.refcount = 0; __pyx_pybuffernd_labels.data = NULL; __pyx_pybuffernd_labels.rcbuffer = &__pyx_pybuffer_labels; { __Pyx_BufFmt_StackElem __pyx_stack[1]; 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, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6123; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; __pyx_pybuffernd_out.diminfo[1].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_out.diminfo[1].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[1]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_counts.rcbuffer->pybuffer, (PyObject*)__pyx_v_counts, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6123; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_counts.diminfo[0].strides = __pyx_pybuffernd_counts.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_counts.diminfo[0].shape = __pyx_pybuffernd_counts.rcbuffer->pybuffer.shape[0]; { __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, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6123; __pyx_clineno = __LINE__; goto __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_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_labels.rcbuffer->pybuffer, (PyObject*)__pyx_v_labels, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6123; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_labels.diminfo[0].strides = __pyx_pybuffernd_labels.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_labels.diminfo[0].shape = __pyx_pybuffernd_labels.rcbuffer->pybuffer.shape[0]; /* "pandas/src/generated.pyx":6132 * ndarray[float64_t, ndim=2] sumx, nobs * * if not len(values) == len(labels): # <<<<<<<<<<<<<< * raise AssertionError("len(index) != len(labels)") * */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6132; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_2 = PyObject_Length(((PyObject *)__pyx_v_labels)); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6132; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_3 = ((!((__pyx_t_1 == __pyx_t_2) != 0)) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":6133 * * if not len(values) == len(labels): * raise AssertionError("len(index) != len(labels)") # <<<<<<<<<<<<<< * * nobs = np.zeros_like(out) */ __pyx_t_4 = PyObject_Call(__pyx_builtin_AssertionError, __pyx_tuple__187, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6133; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 6133; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } /* "pandas/src/generated.pyx":6135 * raise AssertionError("len(index) != len(labels)") * * nobs = np.zeros_like(out) # <<<<<<<<<<<<<< * sumx = np.zeros_like(out) * */ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6135; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_zeros_like); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6135; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6135; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(((PyObject *)__pyx_v_out)); PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_v_out)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out)); __pyx_t_6 = PyObject_Call(__pyx_t_5, __pyx_t_4, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6135; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6135; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_7 = ((PyArrayObject *)__pyx_t_6); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer); __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_nobs.rcbuffer->pybuffer, (PyObject*)__pyx_v_nobs, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_pybuffernd_nobs.diminfo[0].strides = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_nobs.diminfo[0].shape = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_nobs.diminfo[1].strides = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_nobs.diminfo[1].shape = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.shape[1]; if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6135; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_7 = 0; __pyx_v_nobs = ((PyArrayObject *)__pyx_t_6); __pyx_t_6 = 0; /* "pandas/src/generated.pyx":6136 * * nobs = np.zeros_like(out) * sumx = np.zeros_like(out) # <<<<<<<<<<<<<< * * N, K = ( values).shape */ __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6136; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_zeros_like); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6136; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6136; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(((PyObject *)__pyx_v_out)); PyTuple_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_v_out)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out)); __pyx_t_5 = PyObject_Call(__pyx_t_4, __pyx_t_6, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6136; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6136; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_7 = ((PyArrayObject *)__pyx_t_5); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_sumx.rcbuffer->pybuffer); __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_sumx.rcbuffer->pybuffer, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_sumx.rcbuffer->pybuffer, (PyObject*)__pyx_v_sumx, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_pybuffernd_sumx.diminfo[0].strides = __pyx_pybuffernd_sumx.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_sumx.diminfo[0].shape = __pyx_pybuffernd_sumx.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_sumx.diminfo[1].strides = __pyx_pybuffernd_sumx.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_sumx.diminfo[1].shape = __pyx_pybuffernd_sumx.rcbuffer->pybuffer.shape[1]; if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6136; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_7 = 0; __pyx_v_sumx = ((PyArrayObject *)__pyx_t_5); __pyx_t_5 = 0; /* "pandas/src/generated.pyx":6138 * sumx = np.zeros_like(out) * * N, K = ( values).shape # <<<<<<<<<<<<<< * * if K > 1: */ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_values), __pyx_n_s_shape); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6138; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); if ((likely(PyTuple_CheckExact(__pyx_t_5))) || (PyList_CheckExact(__pyx_t_5))) { PyObject* sequence = __pyx_t_5; #if CYTHON_COMPILING_IN_CPYTHON Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6138; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_6 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_4 = PyTuple_GET_ITEM(sequence, 1); } else { __pyx_t_6 = PyList_GET_ITEM(sequence, 0); __pyx_t_4 = PyList_GET_ITEM(sequence, 1); } __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(__pyx_t_4); #else __pyx_t_6 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6138; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6138; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); #endif __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } else { Py_ssize_t index = -1; __pyx_t_12 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6138; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_13 = Py_TYPE(__pyx_t_12)->tp_iternext; index = 0; __pyx_t_6 = __pyx_t_13(__pyx_t_12); if (unlikely(!__pyx_t_6)) goto __pyx_L4_unpacking_failed; __Pyx_GOTREF(__pyx_t_6); index = 1; __pyx_t_4 = __pyx_t_13(__pyx_t_12); if (unlikely(!__pyx_t_4)) goto __pyx_L4_unpacking_failed; __Pyx_GOTREF(__pyx_t_4); if (__Pyx_IternextUnpackEndCheck(__pyx_t_13(__pyx_t_12), 2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6138; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_13 = NULL; __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; goto __pyx_L5_unpacking_done; __pyx_L4_unpacking_failed:; __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __pyx_t_13 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6138; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_L5_unpacking_done:; } __pyx_t_2 = __Pyx_PyIndex_AsSsize_t(__pyx_t_6); if (unlikely((__pyx_t_2 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6138; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_1 = __Pyx_PyIndex_AsSsize_t(__pyx_t_4); if (unlikely((__pyx_t_1 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6138; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_N = __pyx_t_2; __pyx_v_K = __pyx_t_1; /* "pandas/src/generated.pyx":6140 * N, K = ( values).shape * * if K > 1: # <<<<<<<<<<<<<< * for i in range(N): * lab = labels[i] */ __pyx_t_3 = ((__pyx_v_K > 1) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":6141 * * if K > 1: * for i in range(N): # <<<<<<<<<<<<<< * lab = labels[i] * if lab < 0: */ __pyx_t_1 = __pyx_v_N; for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) { __pyx_v_i = __pyx_t_2; /* "pandas/src/generated.pyx":6142 * if K > 1: * for i in range(N): * lab = labels[i] # <<<<<<<<<<<<<< * if lab < 0: * continue */ __pyx_t_14 = __pyx_v_i; __pyx_v_lab = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_labels.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_labels.diminfo[0].strides)); /* "pandas/src/generated.pyx":6143 * for i in range(N): * lab = labels[i] * if lab < 0: # <<<<<<<<<<<<<< * continue * */ __pyx_t_3 = ((__pyx_v_lab < 0) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":6144 * lab = labels[i] * if lab < 0: * continue # <<<<<<<<<<<<<< * * counts[lab] += 1 */ goto __pyx_L7_continue; } /* "pandas/src/generated.pyx":6146 * continue * * counts[lab] += 1 # <<<<<<<<<<<<<< * for j in range(K): * val = values[i, j] */ __pyx_t_15 = __pyx_v_lab; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_counts.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_counts.diminfo[0].strides) += 1; /* "pandas/src/generated.pyx":6147 * * counts[lab] += 1 * for j in range(K): # <<<<<<<<<<<<<< * val = values[i, j] * # not nan */ __pyx_t_16 = __pyx_v_K; for (__pyx_t_17 = 0; __pyx_t_17 < __pyx_t_16; __pyx_t_17+=1) { __pyx_v_j = __pyx_t_17; /* "pandas/src/generated.pyx":6148 * counts[lab] += 1 * for j in range(K): * val = values[i, j] # <<<<<<<<<<<<<< * # not nan * if val == val: */ __pyx_t_18 = __pyx_v_i; __pyx_t_19 = __pyx_v_j; __pyx_v_val = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_19, __pyx_pybuffernd_values.diminfo[1].strides)); /* "pandas/src/generated.pyx":6150 * val = values[i, j] * # not nan * if val == val: # <<<<<<<<<<<<<< * nobs[lab, j] += 1 * sumx[lab, j] += val */ __pyx_t_3 = ((__pyx_v_val == __pyx_v_val) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":6151 * # not nan * if val == val: * nobs[lab, j] += 1 # <<<<<<<<<<<<<< * sumx[lab, j] += val * else: */ __pyx_t_20 = __pyx_v_lab; __pyx_t_21 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_nobs.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_nobs.diminfo[0].strides, __pyx_t_21, __pyx_pybuffernd_nobs.diminfo[1].strides) += 1.0; /* "pandas/src/generated.pyx":6152 * if val == val: * nobs[lab, j] += 1 * sumx[lab, j] += val # <<<<<<<<<<<<<< * else: * for i in range(N): */ __pyx_t_22 = __pyx_v_lab; __pyx_t_23 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_sumx.rcbuffer->pybuffer.buf, __pyx_t_22, __pyx_pybuffernd_sumx.diminfo[0].strides, __pyx_t_23, __pyx_pybuffernd_sumx.diminfo[1].strides) += __pyx_v_val; goto __pyx_L12; } __pyx_L12:; } __pyx_L7_continue:; } goto __pyx_L6; } /*else*/ { /* "pandas/src/generated.pyx":6154 * sumx[lab, j] += val * else: * for i in range(N): # <<<<<<<<<<<<<< * lab = labels[i] * if lab < 0: */ __pyx_t_1 = __pyx_v_N; for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) { __pyx_v_i = __pyx_t_2; /* "pandas/src/generated.pyx":6155 * else: * for i in range(N): * lab = labels[i] # <<<<<<<<<<<<<< * if lab < 0: * continue */ __pyx_t_16 = __pyx_v_i; __pyx_v_lab = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_labels.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_labels.diminfo[0].strides)); /* "pandas/src/generated.pyx":6156 * for i in range(N): * lab = labels[i] * if lab < 0: # <<<<<<<<<<<<<< * continue * */ __pyx_t_3 = ((__pyx_v_lab < 0) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":6157 * lab = labels[i] * if lab < 0: * continue # <<<<<<<<<<<<<< * * counts[lab] += 1 */ goto __pyx_L13_continue; } /* "pandas/src/generated.pyx":6159 * continue * * counts[lab] += 1 # <<<<<<<<<<<<<< * val = values[i, 0] * # not nan */ __pyx_t_17 = __pyx_v_lab; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_counts.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_counts.diminfo[0].strides) += 1; /* "pandas/src/generated.pyx":6160 * * counts[lab] += 1 * val = values[i, 0] # <<<<<<<<<<<<<< * # not nan * if val == val: */ __pyx_t_24 = __pyx_v_i; __pyx_t_25 = 0; __pyx_v_val = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_24, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_25, __pyx_pybuffernd_values.diminfo[1].strides)); /* "pandas/src/generated.pyx":6162 * val = values[i, 0] * # not nan * if val == val: # <<<<<<<<<<<<<< * nobs[lab, 0] += 1 * sumx[lab, 0] += val */ __pyx_t_3 = ((__pyx_v_val == __pyx_v_val) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":6163 * # not nan * if val == val: * nobs[lab, 0] += 1 # <<<<<<<<<<<<<< * sumx[lab, 0] += val * */ __pyx_t_26 = __pyx_v_lab; __pyx_t_27 = 0; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_nobs.rcbuffer->pybuffer.buf, __pyx_t_26, __pyx_pybuffernd_nobs.diminfo[0].strides, __pyx_t_27, __pyx_pybuffernd_nobs.diminfo[1].strides) += 1.0; /* "pandas/src/generated.pyx":6164 * if val == val: * nobs[lab, 0] += 1 * sumx[lab, 0] += val # <<<<<<<<<<<<<< * * for i in range(len(counts)): */ __pyx_t_28 = __pyx_v_lab; __pyx_t_29 = 0; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_sumx.rcbuffer->pybuffer.buf, __pyx_t_28, __pyx_pybuffernd_sumx.diminfo[0].strides, __pyx_t_29, __pyx_pybuffernd_sumx.diminfo[1].strides) += __pyx_v_val; goto __pyx_L16; } __pyx_L16:; __pyx_L13_continue:; } } __pyx_L6:; /* "pandas/src/generated.pyx":6166 * sumx[lab, 0] += val * * for i in range(len(counts)): # <<<<<<<<<<<<<< * for j in range(K): * count = nobs[i, j] */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_counts)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6166; __pyx_clineno = __LINE__; goto __pyx_L1_error;} for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) { __pyx_v_i = __pyx_t_2; /* "pandas/src/generated.pyx":6167 * * for i in range(len(counts)): * for j in range(K): # <<<<<<<<<<<<<< * count = nobs[i, j] * if nobs[i, j] == 0: */ __pyx_t_30 = __pyx_v_K; for (__pyx_t_31 = 0; __pyx_t_31 < __pyx_t_30; __pyx_t_31+=1) { __pyx_v_j = __pyx_t_31; /* "pandas/src/generated.pyx":6168 * for i in range(len(counts)): * for j in range(K): * count = nobs[i, j] # <<<<<<<<<<<<<< * if nobs[i, j] == 0: * out[i, j] = nan */ __pyx_t_32 = __pyx_v_i; __pyx_t_33 = __pyx_v_j; __pyx_v_count = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_nobs.rcbuffer->pybuffer.buf, __pyx_t_32, __pyx_pybuffernd_nobs.diminfo[0].strides, __pyx_t_33, __pyx_pybuffernd_nobs.diminfo[1].strides)); /* "pandas/src/generated.pyx":6169 * for j in range(K): * count = nobs[i, j] * if nobs[i, j] == 0: # <<<<<<<<<<<<<< * out[i, j] = nan * else: */ __pyx_t_34 = __pyx_v_i; __pyx_t_35 = __pyx_v_j; __pyx_t_3 = (((*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_nobs.rcbuffer->pybuffer.buf, __pyx_t_34, __pyx_pybuffernd_nobs.diminfo[0].strides, __pyx_t_35, __pyx_pybuffernd_nobs.diminfo[1].strides)) == 0.0) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":6170 * count = nobs[i, j] * if nobs[i, j] == 0: * out[i, j] = nan # <<<<<<<<<<<<<< * else: * out[i, j] = sumx[i, j] / count */ __pyx_t_36 = __pyx_v_i; __pyx_t_37 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_36, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_37, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_6pandas_5algos_nan; goto __pyx_L21; } /*else*/ { /* "pandas/src/generated.pyx":6172 * out[i, j] = nan * else: * out[i, j] = sumx[i, j] / count # <<<<<<<<<<<<<< * @cython.wraparound(False) * @cython.boundscheck(False) */ __pyx_t_38 = __pyx_v_i; __pyx_t_39 = __pyx_v_j; __pyx_t_40 = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_sumx.rcbuffer->pybuffer.buf, __pyx_t_38, __pyx_pybuffernd_sumx.diminfo[0].strides, __pyx_t_39, __pyx_pybuffernd_sumx.diminfo[1].strides)); if (unlikely(__pyx_v_count == 0)) { #ifdef WITH_THREAD PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure(); #endif PyErr_SetString(PyExc_ZeroDivisionError, "float division"); #ifdef WITH_THREAD PyGILState_Release(__pyx_gilstate_save); #endif {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6172; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_41 = __pyx_v_i; __pyx_t_42 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_41, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_42, __pyx_pybuffernd_out.diminfo[1].strides) = (__pyx_t_40 / __pyx_v_count); } __pyx_L21:; } } /* "pandas/src/generated.pyx":6123 * @cython.wraparound(False) * @cython.boundscheck(False) * def group_mean_float64(ndarray[float64_t, ndim=2] out, # <<<<<<<<<<<<<< * ndarray[int64_t] counts, * ndarray[float64_t, ndim=2] values, */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_12); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_counts.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_labels.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_sumx.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.group_mean_float64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_counts.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_labels.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_sumx.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_sumx); __Pyx_XDECREF((PyObject *)__pyx_v_nobs); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":6175 * @cython.wraparound(False) * @cython.boundscheck(False) * def group_mean_float32(ndarray[float32_t, ndim=2] out, # <<<<<<<<<<<<<< * ndarray[int64_t] counts, * ndarray[float32_t, ndim=2] values, */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_429group_mean_float32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_429group_mean_float32 = {__Pyx_NAMESTR("group_mean_float32"), (PyCFunction)__pyx_pw_6pandas_5algos_429group_mean_float32, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_429group_mean_float32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_out = 0; PyArrayObject *__pyx_v_counts = 0; PyArrayObject *__pyx_v_values = 0; PyArrayObject *__pyx_v_labels = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("group_mean_float32 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_out,&__pyx_n_s_counts,&__pyx_n_s_values,&__pyx_n_s_labels,0}; PyObject* values[4] = {0,0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_out)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_counts)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("group_mean_float32", 1, 4, 4, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6175; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_values)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("group_mean_float32", 1, 4, 4, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6175; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_labels)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("group_mean_float32", 1, 4, 4, 3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6175; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "group_mean_float32") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6175; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 4) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[3] = PyTuple_GET_ITEM(__pyx_args, 3); } __pyx_v_out = ((PyArrayObject *)values[0]); __pyx_v_counts = ((PyArrayObject *)values[1]); __pyx_v_values = ((PyArrayObject *)values[2]); __pyx_v_labels = ((PyArrayObject *)values[3]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("group_mean_float32", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6175; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.group_mean_float32", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_5numpy_ndarray, 1, "out", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6175; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_counts), __pyx_ptype_5numpy_ndarray, 1, "counts", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6176; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6177; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_labels), __pyx_ptype_5numpy_ndarray, 1, "labels", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6178; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_428group_mean_float32(__pyx_self, __pyx_v_out, __pyx_v_counts, __pyx_v_values, __pyx_v_labels); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5algos_428group_mean_float32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_out, PyArrayObject *__pyx_v_counts, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_labels) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_N; Py_ssize_t __pyx_v_K; Py_ssize_t __pyx_v_lab; __pyx_t_5numpy_float32_t __pyx_v_val; __pyx_t_5numpy_float32_t __pyx_v_count; PyArrayObject *__pyx_v_sumx = 0; PyArrayObject *__pyx_v_nobs = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_counts; __Pyx_Buffer __pyx_pybuffer_counts; __Pyx_LocalBuf_ND __pyx_pybuffernd_labels; __Pyx_Buffer __pyx_pybuffer_labels; __Pyx_LocalBuf_ND __pyx_pybuffernd_nobs; __Pyx_Buffer __pyx_pybuffer_nobs; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_sumx; __Pyx_Buffer __pyx_pybuffer_sumx; __Pyx_LocalBuf_ND __pyx_pybuffernd_values; __Pyx_Buffer __pyx_pybuffer_values; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; Py_ssize_t __pyx_t_2; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyArrayObject *__pyx_t_7 = NULL; int __pyx_t_8; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; PyObject *__pyx_t_11 = NULL; PyObject *__pyx_t_12 = NULL; PyObject *(*__pyx_t_13)(PyObject *); 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; long __pyx_t_25; Py_ssize_t __pyx_t_26; long __pyx_t_27; Py_ssize_t __pyx_t_28; long __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; Py_ssize_t __pyx_t_37; Py_ssize_t __pyx_t_38; Py_ssize_t __pyx_t_39; __pyx_t_5numpy_float32_t __pyx_t_40; Py_ssize_t __pyx_t_41; Py_ssize_t __pyx_t_42; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("group_mean_float32", 0); __pyx_pybuffer_sumx.pybuffer.buf = NULL; __pyx_pybuffer_sumx.refcount = 0; __pyx_pybuffernd_sumx.data = NULL; __pyx_pybuffernd_sumx.rcbuffer = &__pyx_pybuffer_sumx; __pyx_pybuffer_nobs.pybuffer.buf = NULL; __pyx_pybuffer_nobs.refcount = 0; __pyx_pybuffernd_nobs.data = NULL; __pyx_pybuffernd_nobs.rcbuffer = &__pyx_pybuffer_nobs; __pyx_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; __pyx_pybuffer_counts.pybuffer.buf = NULL; __pyx_pybuffer_counts.refcount = 0; __pyx_pybuffernd_counts.data = NULL; __pyx_pybuffernd_counts.rcbuffer = &__pyx_pybuffer_counts; __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_labels.pybuffer.buf = NULL; __pyx_pybuffer_labels.refcount = 0; __pyx_pybuffernd_labels.data = NULL; __pyx_pybuffernd_labels.rcbuffer = &__pyx_pybuffer_labels; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_v_out, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6175; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; __pyx_pybuffernd_out.diminfo[1].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_out.diminfo[1].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[1]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_counts.rcbuffer->pybuffer, (PyObject*)__pyx_v_counts, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6175; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_counts.diminfo[0].strides = __pyx_pybuffernd_counts.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_counts.diminfo[0].shape = __pyx_pybuffernd_counts.rcbuffer->pybuffer.shape[0]; { __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_float32_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6175; __pyx_clineno = __LINE__; goto __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_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_labels.rcbuffer->pybuffer, (PyObject*)__pyx_v_labels, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6175; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_labels.diminfo[0].strides = __pyx_pybuffernd_labels.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_labels.diminfo[0].shape = __pyx_pybuffernd_labels.rcbuffer->pybuffer.shape[0]; /* "pandas/src/generated.pyx":6184 * ndarray[float32_t, ndim=2] sumx, nobs * * if not len(values) == len(labels): # <<<<<<<<<<<<<< * raise AssertionError("len(index) != len(labels)") * */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6184; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_2 = PyObject_Length(((PyObject *)__pyx_v_labels)); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6184; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_3 = ((!((__pyx_t_1 == __pyx_t_2) != 0)) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":6185 * * if not len(values) == len(labels): * raise AssertionError("len(index) != len(labels)") # <<<<<<<<<<<<<< * * nobs = np.zeros_like(out) */ __pyx_t_4 = PyObject_Call(__pyx_builtin_AssertionError, __pyx_tuple__188, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6185; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 6185; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } /* "pandas/src/generated.pyx":6187 * raise AssertionError("len(index) != len(labels)") * * nobs = np.zeros_like(out) # <<<<<<<<<<<<<< * sumx = np.zeros_like(out) * */ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6187; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_zeros_like); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6187; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6187; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(((PyObject *)__pyx_v_out)); PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_v_out)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out)); __pyx_t_6 = PyObject_Call(__pyx_t_5, __pyx_t_4, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6187; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6187; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_7 = ((PyArrayObject *)__pyx_t_6); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer); __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_nobs.rcbuffer->pybuffer, (PyObject*)__pyx_v_nobs, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_pybuffernd_nobs.diminfo[0].strides = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_nobs.diminfo[0].shape = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_nobs.diminfo[1].strides = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_nobs.diminfo[1].shape = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.shape[1]; if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6187; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_7 = 0; __pyx_v_nobs = ((PyArrayObject *)__pyx_t_6); __pyx_t_6 = 0; /* "pandas/src/generated.pyx":6188 * * nobs = np.zeros_like(out) * sumx = np.zeros_like(out) # <<<<<<<<<<<<<< * * N, K = ( values).shape */ __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6188; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_zeros_like); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6188; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6188; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(((PyObject *)__pyx_v_out)); PyTuple_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_v_out)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out)); __pyx_t_5 = PyObject_Call(__pyx_t_4, __pyx_t_6, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6188; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6188; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_7 = ((PyArrayObject *)__pyx_t_5); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_sumx.rcbuffer->pybuffer); __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_sumx.rcbuffer->pybuffer, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_sumx.rcbuffer->pybuffer, (PyObject*)__pyx_v_sumx, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_pybuffernd_sumx.diminfo[0].strides = __pyx_pybuffernd_sumx.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_sumx.diminfo[0].shape = __pyx_pybuffernd_sumx.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_sumx.diminfo[1].strides = __pyx_pybuffernd_sumx.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_sumx.diminfo[1].shape = __pyx_pybuffernd_sumx.rcbuffer->pybuffer.shape[1]; if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6188; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_7 = 0; __pyx_v_sumx = ((PyArrayObject *)__pyx_t_5); __pyx_t_5 = 0; /* "pandas/src/generated.pyx":6190 * sumx = np.zeros_like(out) * * N, K = ( values).shape # <<<<<<<<<<<<<< * * if K > 1: */ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_values), __pyx_n_s_shape); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6190; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); if ((likely(PyTuple_CheckExact(__pyx_t_5))) || (PyList_CheckExact(__pyx_t_5))) { PyObject* sequence = __pyx_t_5; #if CYTHON_COMPILING_IN_CPYTHON Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6190; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_6 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_4 = PyTuple_GET_ITEM(sequence, 1); } else { __pyx_t_6 = PyList_GET_ITEM(sequence, 0); __pyx_t_4 = PyList_GET_ITEM(sequence, 1); } __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(__pyx_t_4); #else __pyx_t_6 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6190; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6190; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); #endif __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } else { Py_ssize_t index = -1; __pyx_t_12 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6190; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_13 = Py_TYPE(__pyx_t_12)->tp_iternext; index = 0; __pyx_t_6 = __pyx_t_13(__pyx_t_12); if (unlikely(!__pyx_t_6)) goto __pyx_L4_unpacking_failed; __Pyx_GOTREF(__pyx_t_6); index = 1; __pyx_t_4 = __pyx_t_13(__pyx_t_12); if (unlikely(!__pyx_t_4)) goto __pyx_L4_unpacking_failed; __Pyx_GOTREF(__pyx_t_4); if (__Pyx_IternextUnpackEndCheck(__pyx_t_13(__pyx_t_12), 2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6190; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_13 = NULL; __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; goto __pyx_L5_unpacking_done; __pyx_L4_unpacking_failed:; __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __pyx_t_13 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6190; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_L5_unpacking_done:; } __pyx_t_2 = __Pyx_PyIndex_AsSsize_t(__pyx_t_6); if (unlikely((__pyx_t_2 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6190; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_1 = __Pyx_PyIndex_AsSsize_t(__pyx_t_4); if (unlikely((__pyx_t_1 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6190; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_N = __pyx_t_2; __pyx_v_K = __pyx_t_1; /* "pandas/src/generated.pyx":6192 * N, K = ( values).shape * * if K > 1: # <<<<<<<<<<<<<< * for i in range(N): * lab = labels[i] */ __pyx_t_3 = ((__pyx_v_K > 1) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":6193 * * if K > 1: * for i in range(N): # <<<<<<<<<<<<<< * lab = labels[i] * if lab < 0: */ __pyx_t_1 = __pyx_v_N; for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) { __pyx_v_i = __pyx_t_2; /* "pandas/src/generated.pyx":6194 * if K > 1: * for i in range(N): * lab = labels[i] # <<<<<<<<<<<<<< * if lab < 0: * continue */ __pyx_t_14 = __pyx_v_i; __pyx_v_lab = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_labels.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_labels.diminfo[0].strides)); /* "pandas/src/generated.pyx":6195 * for i in range(N): * lab = labels[i] * if lab < 0: # <<<<<<<<<<<<<< * continue * */ __pyx_t_3 = ((__pyx_v_lab < 0) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":6196 * lab = labels[i] * if lab < 0: * continue # <<<<<<<<<<<<<< * * counts[lab] += 1 */ goto __pyx_L7_continue; } /* "pandas/src/generated.pyx":6198 * continue * * counts[lab] += 1 # <<<<<<<<<<<<<< * for j in range(K): * val = values[i, j] */ __pyx_t_15 = __pyx_v_lab; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_counts.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_counts.diminfo[0].strides) += 1; /* "pandas/src/generated.pyx":6199 * * counts[lab] += 1 * for j in range(K): # <<<<<<<<<<<<<< * val = values[i, j] * # not nan */ __pyx_t_16 = __pyx_v_K; for (__pyx_t_17 = 0; __pyx_t_17 < __pyx_t_16; __pyx_t_17+=1) { __pyx_v_j = __pyx_t_17; /* "pandas/src/generated.pyx":6200 * counts[lab] += 1 * for j in range(K): * val = values[i, j] # <<<<<<<<<<<<<< * # not nan * if val == val: */ __pyx_t_18 = __pyx_v_i; __pyx_t_19 = __pyx_v_j; __pyx_v_val = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_19, __pyx_pybuffernd_values.diminfo[1].strides)); /* "pandas/src/generated.pyx":6202 * val = values[i, j] * # not nan * if val == val: # <<<<<<<<<<<<<< * nobs[lab, j] += 1 * sumx[lab, j] += val */ __pyx_t_3 = ((__pyx_v_val == __pyx_v_val) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":6203 * # not nan * if val == val: * nobs[lab, j] += 1 # <<<<<<<<<<<<<< * sumx[lab, j] += val * else: */ __pyx_t_20 = __pyx_v_lab; __pyx_t_21 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_nobs.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_nobs.diminfo[0].strides, __pyx_t_21, __pyx_pybuffernd_nobs.diminfo[1].strides) += 1.0; /* "pandas/src/generated.pyx":6204 * if val == val: * nobs[lab, j] += 1 * sumx[lab, j] += val # <<<<<<<<<<<<<< * else: * for i in range(N): */ __pyx_t_22 = __pyx_v_lab; __pyx_t_23 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_sumx.rcbuffer->pybuffer.buf, __pyx_t_22, __pyx_pybuffernd_sumx.diminfo[0].strides, __pyx_t_23, __pyx_pybuffernd_sumx.diminfo[1].strides) += __pyx_v_val; goto __pyx_L12; } __pyx_L12:; } __pyx_L7_continue:; } goto __pyx_L6; } /*else*/ { /* "pandas/src/generated.pyx":6206 * sumx[lab, j] += val * else: * for i in range(N): # <<<<<<<<<<<<<< * lab = labels[i] * if lab < 0: */ __pyx_t_1 = __pyx_v_N; for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) { __pyx_v_i = __pyx_t_2; /* "pandas/src/generated.pyx":6207 * else: * for i in range(N): * lab = labels[i] # <<<<<<<<<<<<<< * if lab < 0: * continue */ __pyx_t_16 = __pyx_v_i; __pyx_v_lab = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_labels.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_labels.diminfo[0].strides)); /* "pandas/src/generated.pyx":6208 * for i in range(N): * lab = labels[i] * if lab < 0: # <<<<<<<<<<<<<< * continue * */ __pyx_t_3 = ((__pyx_v_lab < 0) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":6209 * lab = labels[i] * if lab < 0: * continue # <<<<<<<<<<<<<< * * counts[lab] += 1 */ goto __pyx_L13_continue; } /* "pandas/src/generated.pyx":6211 * continue * * counts[lab] += 1 # <<<<<<<<<<<<<< * val = values[i, 0] * # not nan */ __pyx_t_17 = __pyx_v_lab; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_counts.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_counts.diminfo[0].strides) += 1; /* "pandas/src/generated.pyx":6212 * * counts[lab] += 1 * val = values[i, 0] # <<<<<<<<<<<<<< * # not nan * if val == val: */ __pyx_t_24 = __pyx_v_i; __pyx_t_25 = 0; __pyx_v_val = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_24, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_25, __pyx_pybuffernd_values.diminfo[1].strides)); /* "pandas/src/generated.pyx":6214 * val = values[i, 0] * # not nan * if val == val: # <<<<<<<<<<<<<< * nobs[lab, 0] += 1 * sumx[lab, 0] += val */ __pyx_t_3 = ((__pyx_v_val == __pyx_v_val) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":6215 * # not nan * if val == val: * nobs[lab, 0] += 1 # <<<<<<<<<<<<<< * sumx[lab, 0] += val * */ __pyx_t_26 = __pyx_v_lab; __pyx_t_27 = 0; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_nobs.rcbuffer->pybuffer.buf, __pyx_t_26, __pyx_pybuffernd_nobs.diminfo[0].strides, __pyx_t_27, __pyx_pybuffernd_nobs.diminfo[1].strides) += 1.0; /* "pandas/src/generated.pyx":6216 * if val == val: * nobs[lab, 0] += 1 * sumx[lab, 0] += val # <<<<<<<<<<<<<< * * for i in range(len(counts)): */ __pyx_t_28 = __pyx_v_lab; __pyx_t_29 = 0; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_sumx.rcbuffer->pybuffer.buf, __pyx_t_28, __pyx_pybuffernd_sumx.diminfo[0].strides, __pyx_t_29, __pyx_pybuffernd_sumx.diminfo[1].strides) += __pyx_v_val; goto __pyx_L16; } __pyx_L16:; __pyx_L13_continue:; } } __pyx_L6:; /* "pandas/src/generated.pyx":6218 * sumx[lab, 0] += val * * for i in range(len(counts)): # <<<<<<<<<<<<<< * for j in range(K): * count = nobs[i, j] */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_counts)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6218; __pyx_clineno = __LINE__; goto __pyx_L1_error;} for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) { __pyx_v_i = __pyx_t_2; /* "pandas/src/generated.pyx":6219 * * for i in range(len(counts)): * for j in range(K): # <<<<<<<<<<<<<< * count = nobs[i, j] * if nobs[i, j] == 0: */ __pyx_t_30 = __pyx_v_K; for (__pyx_t_31 = 0; __pyx_t_31 < __pyx_t_30; __pyx_t_31+=1) { __pyx_v_j = __pyx_t_31; /* "pandas/src/generated.pyx":6220 * for i in range(len(counts)): * for j in range(K): * count = nobs[i, j] # <<<<<<<<<<<<<< * if nobs[i, j] == 0: * out[i, j] = nan */ __pyx_t_32 = __pyx_v_i; __pyx_t_33 = __pyx_v_j; __pyx_v_count = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_nobs.rcbuffer->pybuffer.buf, __pyx_t_32, __pyx_pybuffernd_nobs.diminfo[0].strides, __pyx_t_33, __pyx_pybuffernd_nobs.diminfo[1].strides)); /* "pandas/src/generated.pyx":6221 * for j in range(K): * count = nobs[i, j] * if nobs[i, j] == 0: # <<<<<<<<<<<<<< * out[i, j] = nan * else: */ __pyx_t_34 = __pyx_v_i; __pyx_t_35 = __pyx_v_j; __pyx_t_3 = (((*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_nobs.rcbuffer->pybuffer.buf, __pyx_t_34, __pyx_pybuffernd_nobs.diminfo[0].strides, __pyx_t_35, __pyx_pybuffernd_nobs.diminfo[1].strides)) == 0.0) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":6222 * count = nobs[i, j] * if nobs[i, j] == 0: * out[i, j] = nan # <<<<<<<<<<<<<< * else: * out[i, j] = sumx[i, j] / count */ __pyx_t_36 = __pyx_v_i; __pyx_t_37 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_36, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_37, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_6pandas_5algos_nan; goto __pyx_L21; } /*else*/ { /* "pandas/src/generated.pyx":6224 * out[i, j] = nan * else: * out[i, j] = sumx[i, j] / count # <<<<<<<<<<<<<< * * */ __pyx_t_38 = __pyx_v_i; __pyx_t_39 = __pyx_v_j; __pyx_t_40 = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_sumx.rcbuffer->pybuffer.buf, __pyx_t_38, __pyx_pybuffernd_sumx.diminfo[0].strides, __pyx_t_39, __pyx_pybuffernd_sumx.diminfo[1].strides)); if (unlikely(__pyx_v_count == 0)) { #ifdef WITH_THREAD PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure(); #endif PyErr_SetString(PyExc_ZeroDivisionError, "float division"); #ifdef WITH_THREAD PyGILState_Release(__pyx_gilstate_save); #endif {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6224; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_41 = __pyx_v_i; __pyx_t_42 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_41, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_42, __pyx_pybuffernd_out.diminfo[1].strides) = (__pyx_t_40 / __pyx_v_count); } __pyx_L21:; } } /* "pandas/src/generated.pyx":6175 * @cython.wraparound(False) * @cython.boundscheck(False) * def group_mean_float32(ndarray[float32_t, ndim=2] out, # <<<<<<<<<<<<<< * ndarray[int64_t] counts, * ndarray[float32_t, ndim=2] values, */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_12); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_counts.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_labels.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_sumx.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.group_mean_float32", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_counts.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_labels.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_sumx.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_sumx); __Pyx_XDECREF((PyObject *)__pyx_v_nobs); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":6227 * * * def group_mean_bin_float64(ndarray[float64_t, ndim=2] out, # <<<<<<<<<<<<<< * ndarray[int64_t] counts, * ndarray[float64_t, ndim=2] values, */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_431group_mean_bin_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_431group_mean_bin_float64 = {__Pyx_NAMESTR("group_mean_bin_float64"), (PyCFunction)__pyx_pw_6pandas_5algos_431group_mean_bin_float64, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_431group_mean_bin_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_out = 0; PyArrayObject *__pyx_v_counts = 0; PyArrayObject *__pyx_v_values = 0; PyArrayObject *__pyx_v_bins = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("group_mean_bin_float64 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_out,&__pyx_n_s_counts,&__pyx_n_s_values,&__pyx_n_s_bins,0}; PyObject* values[4] = {0,0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_out)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_counts)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("group_mean_bin_float64", 1, 4, 4, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6227; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_values)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("group_mean_bin_float64", 1, 4, 4, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6227; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_bins)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("group_mean_bin_float64", 1, 4, 4, 3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6227; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "group_mean_bin_float64") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6227; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 4) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[3] = PyTuple_GET_ITEM(__pyx_args, 3); } __pyx_v_out = ((PyArrayObject *)values[0]); __pyx_v_counts = ((PyArrayObject *)values[1]); __pyx_v_values = ((PyArrayObject *)values[2]); __pyx_v_bins = ((PyArrayObject *)values[3]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("group_mean_bin_float64", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6227; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.group_mean_bin_float64", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_5numpy_ndarray, 1, "out", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6227; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_counts), __pyx_ptype_5numpy_ndarray, 1, "counts", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6228; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6229; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_bins), __pyx_ptype_5numpy_ndarray, 1, "bins", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6230; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_430group_mean_bin_float64(__pyx_self, __pyx_v_out, __pyx_v_counts, __pyx_v_values, __pyx_v_bins); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5algos_430group_mean_bin_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_out, PyArrayObject *__pyx_v_counts, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_bins) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_N; Py_ssize_t __pyx_v_K; Py_ssize_t __pyx_v_ngroups; Py_ssize_t __pyx_v_b; __pyx_t_5numpy_float64_t __pyx_v_val; __pyx_t_5numpy_float64_t __pyx_v_count; PyArrayObject *__pyx_v_sumx = 0; PyArrayObject *__pyx_v_nobs = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_bins; __Pyx_Buffer __pyx_pybuffer_bins; __Pyx_LocalBuf_ND __pyx_pybuffernd_counts; __Pyx_Buffer __pyx_pybuffer_counts; __Pyx_LocalBuf_ND __pyx_pybuffernd_nobs; __Pyx_Buffer __pyx_pybuffer_nobs; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_sumx; __Pyx_Buffer __pyx_pybuffer_sumx; __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; PyArrayObject *__pyx_t_4 = NULL; int __pyx_t_5; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; PyObject *(*__pyx_t_10)(PyObject *); Py_ssize_t __pyx_t_11; Py_ssize_t __pyx_t_12; Py_ssize_t __pyx_t_13; int __pyx_t_14; Py_ssize_t __pyx_t_15; int __pyx_t_16; int __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; long __pyx_t_28; Py_ssize_t __pyx_t_29; long __pyx_t_30; Py_ssize_t __pyx_t_31; long __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; Py_ssize_t __pyx_t_37; Py_ssize_t __pyx_t_38; Py_ssize_t __pyx_t_39; Py_ssize_t __pyx_t_40; Py_ssize_t __pyx_t_41; Py_ssize_t __pyx_t_42; __pyx_t_5numpy_float64_t __pyx_t_43; Py_ssize_t __pyx_t_44; Py_ssize_t __pyx_t_45; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("group_mean_bin_float64", 0); __pyx_pybuffer_sumx.pybuffer.buf = NULL; __pyx_pybuffer_sumx.refcount = 0; __pyx_pybuffernd_sumx.data = NULL; __pyx_pybuffernd_sumx.rcbuffer = &__pyx_pybuffer_sumx; __pyx_pybuffer_nobs.pybuffer.buf = NULL; __pyx_pybuffer_nobs.refcount = 0; __pyx_pybuffernd_nobs.data = NULL; __pyx_pybuffernd_nobs.rcbuffer = &__pyx_pybuffer_nobs; __pyx_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; __pyx_pybuffer_counts.pybuffer.buf = NULL; __pyx_pybuffer_counts.refcount = 0; __pyx_pybuffernd_counts.data = NULL; __pyx_pybuffernd_counts.rcbuffer = &__pyx_pybuffer_counts; __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_bins.pybuffer.buf = NULL; __pyx_pybuffer_bins.refcount = 0; __pyx_pybuffernd_bins.data = NULL; __pyx_pybuffernd_bins.rcbuffer = &__pyx_pybuffer_bins; { __Pyx_BufFmt_StackElem __pyx_stack[1]; 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, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6227; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; __pyx_pybuffernd_out.diminfo[1].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_out.diminfo[1].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[1]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_counts.rcbuffer->pybuffer, (PyObject*)__pyx_v_counts, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6227; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_counts.diminfo[0].strides = __pyx_pybuffernd_counts.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_counts.diminfo[0].shape = __pyx_pybuffernd_counts.rcbuffer->pybuffer.shape[0]; { __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, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6227; __pyx_clineno = __LINE__; goto __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_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_bins.rcbuffer->pybuffer, (PyObject*)__pyx_v_bins, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6227; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_bins.diminfo[0].strides = __pyx_pybuffernd_bins.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_bins.diminfo[0].shape = __pyx_pybuffernd_bins.rcbuffer->pybuffer.shape[0]; /* "pandas/src/generated.pyx":6236 * ndarray[float64_t, ndim=2] sumx, nobs * * nobs = np.zeros_like(out) # <<<<<<<<<<<<<< * sumx = np.zeros_like(out) * */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6236; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_zeros_like); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6236; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 6236; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)__pyx_v_out)); PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_out)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out)); __pyx_t_3 = PyObject_Call(__pyx_t_2, __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6236; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6236; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_4 = ((PyArrayObject *)__pyx_t_3); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer); __pyx_t_5 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer, (PyObject*)__pyx_t_4, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_nobs.rcbuffer->pybuffer, (PyObject*)__pyx_v_nobs, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_pybuffernd_nobs.diminfo[0].strides = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_nobs.diminfo[0].shape = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_nobs.diminfo[1].strides = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_nobs.diminfo[1].shape = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.shape[1]; if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6236; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_4 = 0; __pyx_v_nobs = ((PyArrayObject *)__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/generated.pyx":6237 * * nobs = np.zeros_like(out) * sumx = np.zeros_like(out) # <<<<<<<<<<<<<< * * N, K = ( values).shape */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6237; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_zeros_like); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6237; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6237; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(((PyObject *)__pyx_v_out)); PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_v_out)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out)); __pyx_t_2 = PyObject_Call(__pyx_t_1, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6237; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6237; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_4 = ((PyArrayObject *)__pyx_t_2); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_sumx.rcbuffer->pybuffer); __pyx_t_5 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_sumx.rcbuffer->pybuffer, (PyObject*)__pyx_t_4, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_sumx.rcbuffer->pybuffer, (PyObject*)__pyx_v_sumx, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_pybuffernd_sumx.diminfo[0].strides = __pyx_pybuffernd_sumx.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_sumx.diminfo[0].shape = __pyx_pybuffernd_sumx.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_sumx.diminfo[1].strides = __pyx_pybuffernd_sumx.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_sumx.diminfo[1].shape = __pyx_pybuffernd_sumx.rcbuffer->pybuffer.shape[1]; if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6237; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_4 = 0; __pyx_v_sumx = ((PyArrayObject *)__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":6239 * sumx = np.zeros_like(out) * * N, K = ( values).shape # <<<<<<<<<<<<<< * if bins[len(bins) - 1] == len(values): * ngroups = len(bins) */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_values), __pyx_n_s_shape); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6239; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if ((likely(PyTuple_CheckExact(__pyx_t_2))) || (PyList_CheckExact(__pyx_t_2))) { PyObject* sequence = __pyx_t_2; #if CYTHON_COMPILING_IN_CPYTHON Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6239; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_1 = PyTuple_GET_ITEM(sequence, 1); } else { __pyx_t_3 = PyList_GET_ITEM(sequence, 0); __pyx_t_1 = PyList_GET_ITEM(sequence, 1); } __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(__pyx_t_1); #else __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6239; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6239; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); #endif __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } else { Py_ssize_t index = -1; __pyx_t_9 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6239; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_10 = Py_TYPE(__pyx_t_9)->tp_iternext; index = 0; __pyx_t_3 = __pyx_t_10(__pyx_t_9); if (unlikely(!__pyx_t_3)) goto __pyx_L3_unpacking_failed; __Pyx_GOTREF(__pyx_t_3); index = 1; __pyx_t_1 = __pyx_t_10(__pyx_t_9); if (unlikely(!__pyx_t_1)) goto __pyx_L3_unpacking_failed; __Pyx_GOTREF(__pyx_t_1); if (__Pyx_IternextUnpackEndCheck(__pyx_t_10(__pyx_t_9), 2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6239; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_10 = NULL; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; goto __pyx_L4_unpacking_done; __pyx_L3_unpacking_failed:; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_10 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6239; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_L4_unpacking_done:; } __pyx_t_11 = __Pyx_PyIndex_AsSsize_t(__pyx_t_3); if (unlikely((__pyx_t_11 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6239; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_12 = __Pyx_PyIndex_AsSsize_t(__pyx_t_1); if (unlikely((__pyx_t_12 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6239; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_N = __pyx_t_11; __pyx_v_K = __pyx_t_12; /* "pandas/src/generated.pyx":6240 * * N, K = ( values).shape * if bins[len(bins) - 1] == len(values): # <<<<<<<<<<<<<< * ngroups = len(bins) * else: */ __pyx_t_12 = PyObject_Length(((PyObject *)__pyx_v_bins)); if (unlikely(__pyx_t_12 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6240; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_11 = (__pyx_t_12 - 1); __pyx_t_5 = -1; if (__pyx_t_11 < 0) { __pyx_t_11 += __pyx_pybuffernd_bins.diminfo[0].shape; if (unlikely(__pyx_t_11 < 0)) __pyx_t_5 = 0; } else if (unlikely(__pyx_t_11 >= __pyx_pybuffernd_bins.diminfo[0].shape)) __pyx_t_5 = 0; if (unlikely(__pyx_t_5 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_5); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6240; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_13 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_13 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6240; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_14 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_bins.rcbuffer->pybuffer.buf, __pyx_t_11, __pyx_pybuffernd_bins.diminfo[0].strides)) == __pyx_t_13) != 0); if (__pyx_t_14) { /* "pandas/src/generated.pyx":6241 * N, K = ( values).shape * if bins[len(bins) - 1] == len(values): * ngroups = len(bins) # <<<<<<<<<<<<<< * else: * ngroups = len(bins) + 1 */ __pyx_t_13 = PyObject_Length(((PyObject *)__pyx_v_bins)); if (unlikely(__pyx_t_13 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6241; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_ngroups = __pyx_t_13; goto __pyx_L5; } /*else*/ { /* "pandas/src/generated.pyx":6243 * ngroups = len(bins) * else: * ngroups = len(bins) + 1 # <<<<<<<<<<<<<< * * b = 0 */ __pyx_t_13 = PyObject_Length(((PyObject *)__pyx_v_bins)); if (unlikely(__pyx_t_13 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6243; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_ngroups = (__pyx_t_13 + 1); } __pyx_L5:; /* "pandas/src/generated.pyx":6245 * ngroups = len(bins) + 1 * * b = 0 # <<<<<<<<<<<<<< * if K > 1: * for i in range(N): */ __pyx_v_b = 0; /* "pandas/src/generated.pyx":6246 * * b = 0 * if K > 1: # <<<<<<<<<<<<<< * for i in range(N): * while b < ngroups - 1 and i >= bins[b]: */ __pyx_t_14 = ((__pyx_v_K > 1) != 0); if (__pyx_t_14) { /* "pandas/src/generated.pyx":6247 * b = 0 * if K > 1: * for i in range(N): # <<<<<<<<<<<<<< * while b < ngroups - 1 and i >= bins[b]: * b += 1 */ __pyx_t_13 = __pyx_v_N; for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_13; __pyx_t_12+=1) { __pyx_v_i = __pyx_t_12; /* "pandas/src/generated.pyx":6248 * if K > 1: * for i in range(N): * while b < ngroups - 1 and i >= bins[b]: # <<<<<<<<<<<<<< * b += 1 * */ while (1) { __pyx_t_14 = ((__pyx_v_b < (__pyx_v_ngroups - 1)) != 0); if (__pyx_t_14) { __pyx_t_15 = __pyx_v_b; __pyx_t_5 = -1; if (__pyx_t_15 < 0) { __pyx_t_15 += __pyx_pybuffernd_bins.diminfo[0].shape; if (unlikely(__pyx_t_15 < 0)) __pyx_t_5 = 0; } else if (unlikely(__pyx_t_15 >= __pyx_pybuffernd_bins.diminfo[0].shape)) __pyx_t_5 = 0; if (unlikely(__pyx_t_5 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_5); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6248; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_16 = ((__pyx_v_i >= (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_bins.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_bins.diminfo[0].strides))) != 0); __pyx_t_17 = __pyx_t_16; } else { __pyx_t_17 = __pyx_t_14; } if (!__pyx_t_17) break; /* "pandas/src/generated.pyx":6249 * for i in range(N): * while b < ngroups - 1 and i >= bins[b]: * b += 1 # <<<<<<<<<<<<<< * * counts[b] += 1 */ __pyx_v_b = (__pyx_v_b + 1); } /* "pandas/src/generated.pyx":6251 * b += 1 * * counts[b] += 1 # <<<<<<<<<<<<<< * for j in range(K): * val = values[i, j] */ __pyx_t_18 = __pyx_v_b; __pyx_t_5 = -1; if (__pyx_t_18 < 0) { __pyx_t_18 += __pyx_pybuffernd_counts.diminfo[0].shape; if (unlikely(__pyx_t_18 < 0)) __pyx_t_5 = 0; } else if (unlikely(__pyx_t_18 >= __pyx_pybuffernd_counts.diminfo[0].shape)) __pyx_t_5 = 0; if (unlikely(__pyx_t_5 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_5); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6251; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_counts.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_counts.diminfo[0].strides) += 1; /* "pandas/src/generated.pyx":6252 * * counts[b] += 1 * for j in range(K): # <<<<<<<<<<<<<< * val = values[i, j] * */ __pyx_t_19 = __pyx_v_K; for (__pyx_t_20 = 0; __pyx_t_20 < __pyx_t_19; __pyx_t_20+=1) { __pyx_v_j = __pyx_t_20; /* "pandas/src/generated.pyx":6253 * counts[b] += 1 * for j in range(K): * val = values[i, j] # <<<<<<<<<<<<<< * * # not nan */ __pyx_t_21 = __pyx_v_i; __pyx_t_22 = __pyx_v_j; __pyx_t_5 = -1; if (__pyx_t_21 < 0) { __pyx_t_21 += __pyx_pybuffernd_values.diminfo[0].shape; if (unlikely(__pyx_t_21 < 0)) __pyx_t_5 = 0; } else if (unlikely(__pyx_t_21 >= __pyx_pybuffernd_values.diminfo[0].shape)) __pyx_t_5 = 0; if (__pyx_t_22 < 0) { __pyx_t_22 += __pyx_pybuffernd_values.diminfo[1].shape; if (unlikely(__pyx_t_22 < 0)) __pyx_t_5 = 1; } else if (unlikely(__pyx_t_22 >= __pyx_pybuffernd_values.diminfo[1].shape)) __pyx_t_5 = 1; if (unlikely(__pyx_t_5 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_5); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6253; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_val = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_22, __pyx_pybuffernd_values.diminfo[1].strides)); /* "pandas/src/generated.pyx":6256 * * # not nan * if val == val: # <<<<<<<<<<<<<< * nobs[b, j] += 1 * sumx[b, j] += val */ __pyx_t_17 = ((__pyx_v_val == __pyx_v_val) != 0); if (__pyx_t_17) { /* "pandas/src/generated.pyx":6257 * # not nan * if val == val: * nobs[b, j] += 1 # <<<<<<<<<<<<<< * sumx[b, j] += val * else: */ __pyx_t_23 = __pyx_v_b; __pyx_t_24 = __pyx_v_j; __pyx_t_5 = -1; if (__pyx_t_23 < 0) { __pyx_t_23 += __pyx_pybuffernd_nobs.diminfo[0].shape; if (unlikely(__pyx_t_23 < 0)) __pyx_t_5 = 0; } else if (unlikely(__pyx_t_23 >= __pyx_pybuffernd_nobs.diminfo[0].shape)) __pyx_t_5 = 0; if (__pyx_t_24 < 0) { __pyx_t_24 += __pyx_pybuffernd_nobs.diminfo[1].shape; if (unlikely(__pyx_t_24 < 0)) __pyx_t_5 = 1; } else if (unlikely(__pyx_t_24 >= __pyx_pybuffernd_nobs.diminfo[1].shape)) __pyx_t_5 = 1; if (unlikely(__pyx_t_5 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_5); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6257; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_nobs.rcbuffer->pybuffer.buf, __pyx_t_23, __pyx_pybuffernd_nobs.diminfo[0].strides, __pyx_t_24, __pyx_pybuffernd_nobs.diminfo[1].strides) += 1.0; /* "pandas/src/generated.pyx":6258 * if val == val: * nobs[b, j] += 1 * sumx[b, j] += val # <<<<<<<<<<<<<< * else: * for i in range(N): */ __pyx_t_25 = __pyx_v_b; __pyx_t_26 = __pyx_v_j; __pyx_t_5 = -1; if (__pyx_t_25 < 0) { __pyx_t_25 += __pyx_pybuffernd_sumx.diminfo[0].shape; if (unlikely(__pyx_t_25 < 0)) __pyx_t_5 = 0; } else if (unlikely(__pyx_t_25 >= __pyx_pybuffernd_sumx.diminfo[0].shape)) __pyx_t_5 = 0; if (__pyx_t_26 < 0) { __pyx_t_26 += __pyx_pybuffernd_sumx.diminfo[1].shape; if (unlikely(__pyx_t_26 < 0)) __pyx_t_5 = 1; } else if (unlikely(__pyx_t_26 >= __pyx_pybuffernd_sumx.diminfo[1].shape)) __pyx_t_5 = 1; if (unlikely(__pyx_t_5 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_5); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6258; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_sumx.rcbuffer->pybuffer.buf, __pyx_t_25, __pyx_pybuffernd_sumx.diminfo[0].strides, __pyx_t_26, __pyx_pybuffernd_sumx.diminfo[1].strides) += __pyx_v_val; goto __pyx_L13; } __pyx_L13:; } } goto __pyx_L6; } /*else*/ { /* "pandas/src/generated.pyx":6260 * sumx[b, j] += val * else: * for i in range(N): # <<<<<<<<<<<<<< * while b < ngroups - 1 and i >= bins[b]: * b += 1 */ __pyx_t_13 = __pyx_v_N; for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_13; __pyx_t_12+=1) { __pyx_v_i = __pyx_t_12; /* "pandas/src/generated.pyx":6261 * else: * for i in range(N): * while b < ngroups - 1 and i >= bins[b]: # <<<<<<<<<<<<<< * b += 1 * */ while (1) { __pyx_t_17 = ((__pyx_v_b < (__pyx_v_ngroups - 1)) != 0); if (__pyx_t_17) { __pyx_t_19 = __pyx_v_b; __pyx_t_5 = -1; if (__pyx_t_19 < 0) { __pyx_t_19 += __pyx_pybuffernd_bins.diminfo[0].shape; if (unlikely(__pyx_t_19 < 0)) __pyx_t_5 = 0; } else if (unlikely(__pyx_t_19 >= __pyx_pybuffernd_bins.diminfo[0].shape)) __pyx_t_5 = 0; if (unlikely(__pyx_t_5 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_5); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6261; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_14 = ((__pyx_v_i >= (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_bins.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_bins.diminfo[0].strides))) != 0); __pyx_t_16 = __pyx_t_14; } else { __pyx_t_16 = __pyx_t_17; } if (!__pyx_t_16) break; /* "pandas/src/generated.pyx":6262 * for i in range(N): * while b < ngroups - 1 and i >= bins[b]: * b += 1 # <<<<<<<<<<<<<< * * counts[b] += 1 */ __pyx_v_b = (__pyx_v_b + 1); } /* "pandas/src/generated.pyx":6264 * b += 1 * * counts[b] += 1 # <<<<<<<<<<<<<< * val = values[i, 0] * */ __pyx_t_20 = __pyx_v_b; __pyx_t_5 = -1; if (__pyx_t_20 < 0) { __pyx_t_20 += __pyx_pybuffernd_counts.diminfo[0].shape; if (unlikely(__pyx_t_20 < 0)) __pyx_t_5 = 0; } else if (unlikely(__pyx_t_20 >= __pyx_pybuffernd_counts.diminfo[0].shape)) __pyx_t_5 = 0; if (unlikely(__pyx_t_5 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_5); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6264; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_counts.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_counts.diminfo[0].strides) += 1; /* "pandas/src/generated.pyx":6265 * * counts[b] += 1 * val = values[i, 0] # <<<<<<<<<<<<<< * * # not nan */ __pyx_t_27 = __pyx_v_i; __pyx_t_28 = 0; __pyx_t_5 = -1; if (__pyx_t_27 < 0) { __pyx_t_27 += __pyx_pybuffernd_values.diminfo[0].shape; if (unlikely(__pyx_t_27 < 0)) __pyx_t_5 = 0; } else if (unlikely(__pyx_t_27 >= __pyx_pybuffernd_values.diminfo[0].shape)) __pyx_t_5 = 0; if (__pyx_t_28 < 0) { __pyx_t_28 += __pyx_pybuffernd_values.diminfo[1].shape; if (unlikely(__pyx_t_28 < 0)) __pyx_t_5 = 1; } else if (unlikely(__pyx_t_28 >= __pyx_pybuffernd_values.diminfo[1].shape)) __pyx_t_5 = 1; if (unlikely(__pyx_t_5 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_5); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6265; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_val = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_27, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_28, __pyx_pybuffernd_values.diminfo[1].strides)); /* "pandas/src/generated.pyx":6268 * * # not nan * if val == val: # <<<<<<<<<<<<<< * nobs[b, 0] += 1 * sumx[b, 0] += val */ __pyx_t_16 = ((__pyx_v_val == __pyx_v_val) != 0); if (__pyx_t_16) { /* "pandas/src/generated.pyx":6269 * # not nan * if val == val: * nobs[b, 0] += 1 # <<<<<<<<<<<<<< * sumx[b, 0] += val * */ __pyx_t_29 = __pyx_v_b; __pyx_t_30 = 0; __pyx_t_5 = -1; if (__pyx_t_29 < 0) { __pyx_t_29 += __pyx_pybuffernd_nobs.diminfo[0].shape; if (unlikely(__pyx_t_29 < 0)) __pyx_t_5 = 0; } else if (unlikely(__pyx_t_29 >= __pyx_pybuffernd_nobs.diminfo[0].shape)) __pyx_t_5 = 0; if (__pyx_t_30 < 0) { __pyx_t_30 += __pyx_pybuffernd_nobs.diminfo[1].shape; if (unlikely(__pyx_t_30 < 0)) __pyx_t_5 = 1; } else if (unlikely(__pyx_t_30 >= __pyx_pybuffernd_nobs.diminfo[1].shape)) __pyx_t_5 = 1; if (unlikely(__pyx_t_5 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_5); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6269; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_nobs.rcbuffer->pybuffer.buf, __pyx_t_29, __pyx_pybuffernd_nobs.diminfo[0].strides, __pyx_t_30, __pyx_pybuffernd_nobs.diminfo[1].strides) += 1.0; /* "pandas/src/generated.pyx":6270 * if val == val: * nobs[b, 0] += 1 * sumx[b, 0] += val # <<<<<<<<<<<<<< * * for i in range(ngroups): */ __pyx_t_31 = __pyx_v_b; __pyx_t_32 = 0; __pyx_t_5 = -1; if (__pyx_t_31 < 0) { __pyx_t_31 += __pyx_pybuffernd_sumx.diminfo[0].shape; if (unlikely(__pyx_t_31 < 0)) __pyx_t_5 = 0; } else if (unlikely(__pyx_t_31 >= __pyx_pybuffernd_sumx.diminfo[0].shape)) __pyx_t_5 = 0; if (__pyx_t_32 < 0) { __pyx_t_32 += __pyx_pybuffernd_sumx.diminfo[1].shape; if (unlikely(__pyx_t_32 < 0)) __pyx_t_5 = 1; } else if (unlikely(__pyx_t_32 >= __pyx_pybuffernd_sumx.diminfo[1].shape)) __pyx_t_5 = 1; if (unlikely(__pyx_t_5 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_5); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6270; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_sumx.rcbuffer->pybuffer.buf, __pyx_t_31, __pyx_pybuffernd_sumx.diminfo[0].strides, __pyx_t_32, __pyx_pybuffernd_sumx.diminfo[1].strides) += __pyx_v_val; goto __pyx_L18; } __pyx_L18:; } } __pyx_L6:; /* "pandas/src/generated.pyx":6272 * sumx[b, 0] += val * * for i in range(ngroups): # <<<<<<<<<<<<<< * for j in range(K): * count = nobs[i, j] */ __pyx_t_13 = __pyx_v_ngroups; for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_13; __pyx_t_12+=1) { __pyx_v_i = __pyx_t_12; /* "pandas/src/generated.pyx":6273 * * for i in range(ngroups): * for j in range(K): # <<<<<<<<<<<<<< * count = nobs[i, j] * if nobs[i, j] == 0: */ __pyx_t_33 = __pyx_v_K; for (__pyx_t_34 = 0; __pyx_t_34 < __pyx_t_33; __pyx_t_34+=1) { __pyx_v_j = __pyx_t_34; /* "pandas/src/generated.pyx":6274 * for i in range(ngroups): * for j in range(K): * count = nobs[i, j] # <<<<<<<<<<<<<< * if nobs[i, j] == 0: * out[i, j] = nan */ __pyx_t_35 = __pyx_v_i; __pyx_t_36 = __pyx_v_j; __pyx_t_5 = -1; if (__pyx_t_35 < 0) { __pyx_t_35 += __pyx_pybuffernd_nobs.diminfo[0].shape; if (unlikely(__pyx_t_35 < 0)) __pyx_t_5 = 0; } else if (unlikely(__pyx_t_35 >= __pyx_pybuffernd_nobs.diminfo[0].shape)) __pyx_t_5 = 0; if (__pyx_t_36 < 0) { __pyx_t_36 += __pyx_pybuffernd_nobs.diminfo[1].shape; if (unlikely(__pyx_t_36 < 0)) __pyx_t_5 = 1; } else if (unlikely(__pyx_t_36 >= __pyx_pybuffernd_nobs.diminfo[1].shape)) __pyx_t_5 = 1; if (unlikely(__pyx_t_5 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_5); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6274; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_count = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_nobs.rcbuffer->pybuffer.buf, __pyx_t_35, __pyx_pybuffernd_nobs.diminfo[0].strides, __pyx_t_36, __pyx_pybuffernd_nobs.diminfo[1].strides)); /* "pandas/src/generated.pyx":6275 * for j in range(K): * count = nobs[i, j] * if nobs[i, j] == 0: # <<<<<<<<<<<<<< * out[i, j] = nan * else: */ __pyx_t_37 = __pyx_v_i; __pyx_t_38 = __pyx_v_j; __pyx_t_5 = -1; if (__pyx_t_37 < 0) { __pyx_t_37 += __pyx_pybuffernd_nobs.diminfo[0].shape; if (unlikely(__pyx_t_37 < 0)) __pyx_t_5 = 0; } else if (unlikely(__pyx_t_37 >= __pyx_pybuffernd_nobs.diminfo[0].shape)) __pyx_t_5 = 0; if (__pyx_t_38 < 0) { __pyx_t_38 += __pyx_pybuffernd_nobs.diminfo[1].shape; if (unlikely(__pyx_t_38 < 0)) __pyx_t_5 = 1; } else if (unlikely(__pyx_t_38 >= __pyx_pybuffernd_nobs.diminfo[1].shape)) __pyx_t_5 = 1; if (unlikely(__pyx_t_5 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_5); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6275; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_16 = (((*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_nobs.rcbuffer->pybuffer.buf, __pyx_t_37, __pyx_pybuffernd_nobs.diminfo[0].strides, __pyx_t_38, __pyx_pybuffernd_nobs.diminfo[1].strides)) == 0.0) != 0); if (__pyx_t_16) { /* "pandas/src/generated.pyx":6276 * count = nobs[i, j] * if nobs[i, j] == 0: * out[i, j] = nan # <<<<<<<<<<<<<< * else: * out[i, j] = sumx[i, j] / count */ __pyx_t_39 = __pyx_v_i; __pyx_t_40 = __pyx_v_j; __pyx_t_5 = -1; if (__pyx_t_39 < 0) { __pyx_t_39 += __pyx_pybuffernd_out.diminfo[0].shape; if (unlikely(__pyx_t_39 < 0)) __pyx_t_5 = 0; } else if (unlikely(__pyx_t_39 >= __pyx_pybuffernd_out.diminfo[0].shape)) __pyx_t_5 = 0; if (__pyx_t_40 < 0) { __pyx_t_40 += __pyx_pybuffernd_out.diminfo[1].shape; if (unlikely(__pyx_t_40 < 0)) __pyx_t_5 = 1; } else if (unlikely(__pyx_t_40 >= __pyx_pybuffernd_out.diminfo[1].shape)) __pyx_t_5 = 1; if (unlikely(__pyx_t_5 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_5); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6276; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_39, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_40, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_6pandas_5algos_nan; goto __pyx_L23; } /*else*/ { /* "pandas/src/generated.pyx":6278 * out[i, j] = nan * else: * out[i, j] = sumx[i, j] / count # <<<<<<<<<<<<<< * * def group_mean_bin_float32(ndarray[float32_t, ndim=2] out, */ __pyx_t_41 = __pyx_v_i; __pyx_t_42 = __pyx_v_j; __pyx_t_5 = -1; if (__pyx_t_41 < 0) { __pyx_t_41 += __pyx_pybuffernd_sumx.diminfo[0].shape; if (unlikely(__pyx_t_41 < 0)) __pyx_t_5 = 0; } else if (unlikely(__pyx_t_41 >= __pyx_pybuffernd_sumx.diminfo[0].shape)) __pyx_t_5 = 0; if (__pyx_t_42 < 0) { __pyx_t_42 += __pyx_pybuffernd_sumx.diminfo[1].shape; if (unlikely(__pyx_t_42 < 0)) __pyx_t_5 = 1; } else if (unlikely(__pyx_t_42 >= __pyx_pybuffernd_sumx.diminfo[1].shape)) __pyx_t_5 = 1; if (unlikely(__pyx_t_5 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_5); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6278; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_43 = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_sumx.rcbuffer->pybuffer.buf, __pyx_t_41, __pyx_pybuffernd_sumx.diminfo[0].strides, __pyx_t_42, __pyx_pybuffernd_sumx.diminfo[1].strides)); if (unlikely(__pyx_v_count == 0)) { #ifdef WITH_THREAD PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure(); #endif PyErr_SetString(PyExc_ZeroDivisionError, "float division"); #ifdef WITH_THREAD PyGILState_Release(__pyx_gilstate_save); #endif {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6278; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_44 = __pyx_v_i; __pyx_t_45 = __pyx_v_j; __pyx_t_5 = -1; if (__pyx_t_44 < 0) { __pyx_t_44 += __pyx_pybuffernd_out.diminfo[0].shape; if (unlikely(__pyx_t_44 < 0)) __pyx_t_5 = 0; } else if (unlikely(__pyx_t_44 >= __pyx_pybuffernd_out.diminfo[0].shape)) __pyx_t_5 = 0; if (__pyx_t_45 < 0) { __pyx_t_45 += __pyx_pybuffernd_out.diminfo[1].shape; if (unlikely(__pyx_t_45 < 0)) __pyx_t_5 = 1; } else if (unlikely(__pyx_t_45 >= __pyx_pybuffernd_out.diminfo[1].shape)) __pyx_t_5 = 1; if (unlikely(__pyx_t_5 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_5); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6278; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_44, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_45, __pyx_pybuffernd_out.diminfo[1].strides) = (__pyx_t_43 / __pyx_v_count); } __pyx_L23:; } } /* "pandas/src/generated.pyx":6227 * * * def group_mean_bin_float64(ndarray[float64_t, ndim=2] out, # <<<<<<<<<<<<<< * ndarray[int64_t] counts, * ndarray[float64_t, ndim=2] 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_9); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_bins.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_counts.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_sumx.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.group_mean_bin_float64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_bins.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_counts.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_sumx.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_sumx); __Pyx_XDECREF((PyObject *)__pyx_v_nobs); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":6280 * out[i, j] = sumx[i, j] / count * * def group_mean_bin_float32(ndarray[float32_t, ndim=2] out, # <<<<<<<<<<<<<< * ndarray[int64_t] counts, * ndarray[float32_t, ndim=2] values, */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_433group_mean_bin_float32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_433group_mean_bin_float32 = {__Pyx_NAMESTR("group_mean_bin_float32"), (PyCFunction)__pyx_pw_6pandas_5algos_433group_mean_bin_float32, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_433group_mean_bin_float32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_out = 0; PyArrayObject *__pyx_v_counts = 0; PyArrayObject *__pyx_v_values = 0; PyArrayObject *__pyx_v_bins = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("group_mean_bin_float32 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_out,&__pyx_n_s_counts,&__pyx_n_s_values,&__pyx_n_s_bins,0}; PyObject* values[4] = {0,0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_out)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_counts)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("group_mean_bin_float32", 1, 4, 4, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6280; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_values)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("group_mean_bin_float32", 1, 4, 4, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6280; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_bins)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("group_mean_bin_float32", 1, 4, 4, 3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6280; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "group_mean_bin_float32") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6280; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 4) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[3] = PyTuple_GET_ITEM(__pyx_args, 3); } __pyx_v_out = ((PyArrayObject *)values[0]); __pyx_v_counts = ((PyArrayObject *)values[1]); __pyx_v_values = ((PyArrayObject *)values[2]); __pyx_v_bins = ((PyArrayObject *)values[3]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("group_mean_bin_float32", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6280; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.group_mean_bin_float32", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_5numpy_ndarray, 1, "out", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6280; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_counts), __pyx_ptype_5numpy_ndarray, 1, "counts", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6281; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6282; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_bins), __pyx_ptype_5numpy_ndarray, 1, "bins", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6283; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_432group_mean_bin_float32(__pyx_self, __pyx_v_out, __pyx_v_counts, __pyx_v_values, __pyx_v_bins); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5algos_432group_mean_bin_float32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_out, PyArrayObject *__pyx_v_counts, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_bins) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_N; Py_ssize_t __pyx_v_K; Py_ssize_t __pyx_v_ngroups; Py_ssize_t __pyx_v_b; __pyx_t_5numpy_float32_t __pyx_v_val; __pyx_t_5numpy_float32_t __pyx_v_count; PyArrayObject *__pyx_v_sumx = 0; PyArrayObject *__pyx_v_nobs = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_bins; __Pyx_Buffer __pyx_pybuffer_bins; __Pyx_LocalBuf_ND __pyx_pybuffernd_counts; __Pyx_Buffer __pyx_pybuffer_counts; __Pyx_LocalBuf_ND __pyx_pybuffernd_nobs; __Pyx_Buffer __pyx_pybuffer_nobs; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_sumx; __Pyx_Buffer __pyx_pybuffer_sumx; __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; PyArrayObject *__pyx_t_4 = NULL; int __pyx_t_5; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; PyObject *(*__pyx_t_10)(PyObject *); Py_ssize_t __pyx_t_11; Py_ssize_t __pyx_t_12; Py_ssize_t __pyx_t_13; int __pyx_t_14; Py_ssize_t __pyx_t_15; int __pyx_t_16; int __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; long __pyx_t_28; Py_ssize_t __pyx_t_29; long __pyx_t_30; Py_ssize_t __pyx_t_31; long __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; Py_ssize_t __pyx_t_37; Py_ssize_t __pyx_t_38; Py_ssize_t __pyx_t_39; Py_ssize_t __pyx_t_40; Py_ssize_t __pyx_t_41; Py_ssize_t __pyx_t_42; __pyx_t_5numpy_float32_t __pyx_t_43; Py_ssize_t __pyx_t_44; Py_ssize_t __pyx_t_45; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("group_mean_bin_float32", 0); __pyx_pybuffer_sumx.pybuffer.buf = NULL; __pyx_pybuffer_sumx.refcount = 0; __pyx_pybuffernd_sumx.data = NULL; __pyx_pybuffernd_sumx.rcbuffer = &__pyx_pybuffer_sumx; __pyx_pybuffer_nobs.pybuffer.buf = NULL; __pyx_pybuffer_nobs.refcount = 0; __pyx_pybuffernd_nobs.data = NULL; __pyx_pybuffernd_nobs.rcbuffer = &__pyx_pybuffer_nobs; __pyx_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; __pyx_pybuffer_counts.pybuffer.buf = NULL; __pyx_pybuffer_counts.refcount = 0; __pyx_pybuffernd_counts.data = NULL; __pyx_pybuffernd_counts.rcbuffer = &__pyx_pybuffer_counts; __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_bins.pybuffer.buf = NULL; __pyx_pybuffer_bins.refcount = 0; __pyx_pybuffernd_bins.data = NULL; __pyx_pybuffernd_bins.rcbuffer = &__pyx_pybuffer_bins; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_v_out, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6280; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; __pyx_pybuffernd_out.diminfo[1].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_out.diminfo[1].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[1]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_counts.rcbuffer->pybuffer, (PyObject*)__pyx_v_counts, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6280; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_counts.diminfo[0].strides = __pyx_pybuffernd_counts.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_counts.diminfo[0].shape = __pyx_pybuffernd_counts.rcbuffer->pybuffer.shape[0]; { __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_float32_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6280; __pyx_clineno = __LINE__; goto __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_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_bins.rcbuffer->pybuffer, (PyObject*)__pyx_v_bins, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6280; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_bins.diminfo[0].strides = __pyx_pybuffernd_bins.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_bins.diminfo[0].shape = __pyx_pybuffernd_bins.rcbuffer->pybuffer.shape[0]; /* "pandas/src/generated.pyx":6289 * ndarray[float32_t, ndim=2] sumx, nobs * * nobs = np.zeros_like(out) # <<<<<<<<<<<<<< * sumx = np.zeros_like(out) * */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6289; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_zeros_like); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6289; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 6289; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)__pyx_v_out)); PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_out)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out)); __pyx_t_3 = PyObject_Call(__pyx_t_2, __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6289; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6289; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_4 = ((PyArrayObject *)__pyx_t_3); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer); __pyx_t_5 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer, (PyObject*)__pyx_t_4, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_nobs.rcbuffer->pybuffer, (PyObject*)__pyx_v_nobs, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_pybuffernd_nobs.diminfo[0].strides = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_nobs.diminfo[0].shape = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_nobs.diminfo[1].strides = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_nobs.diminfo[1].shape = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.shape[1]; if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6289; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_4 = 0; __pyx_v_nobs = ((PyArrayObject *)__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/generated.pyx":6290 * * nobs = np.zeros_like(out) * sumx = np.zeros_like(out) # <<<<<<<<<<<<<< * * N, K = ( values).shape */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6290; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_zeros_like); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6290; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6290; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(((PyObject *)__pyx_v_out)); PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_v_out)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out)); __pyx_t_2 = PyObject_Call(__pyx_t_1, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6290; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6290; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_4 = ((PyArrayObject *)__pyx_t_2); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_sumx.rcbuffer->pybuffer); __pyx_t_5 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_sumx.rcbuffer->pybuffer, (PyObject*)__pyx_t_4, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_sumx.rcbuffer->pybuffer, (PyObject*)__pyx_v_sumx, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_pybuffernd_sumx.diminfo[0].strides = __pyx_pybuffernd_sumx.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_sumx.diminfo[0].shape = __pyx_pybuffernd_sumx.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_sumx.diminfo[1].strides = __pyx_pybuffernd_sumx.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_sumx.diminfo[1].shape = __pyx_pybuffernd_sumx.rcbuffer->pybuffer.shape[1]; if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6290; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_4 = 0; __pyx_v_sumx = ((PyArrayObject *)__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":6292 * sumx = np.zeros_like(out) * * N, K = ( values).shape # <<<<<<<<<<<<<< * if bins[len(bins) - 1] == len(values): * ngroups = len(bins) */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_values), __pyx_n_s_shape); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6292; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if ((likely(PyTuple_CheckExact(__pyx_t_2))) || (PyList_CheckExact(__pyx_t_2))) { PyObject* sequence = __pyx_t_2; #if CYTHON_COMPILING_IN_CPYTHON Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6292; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_1 = PyTuple_GET_ITEM(sequence, 1); } else { __pyx_t_3 = PyList_GET_ITEM(sequence, 0); __pyx_t_1 = PyList_GET_ITEM(sequence, 1); } __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(__pyx_t_1); #else __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6292; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6292; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); #endif __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } else { Py_ssize_t index = -1; __pyx_t_9 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6292; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_10 = Py_TYPE(__pyx_t_9)->tp_iternext; index = 0; __pyx_t_3 = __pyx_t_10(__pyx_t_9); if (unlikely(!__pyx_t_3)) goto __pyx_L3_unpacking_failed; __Pyx_GOTREF(__pyx_t_3); index = 1; __pyx_t_1 = __pyx_t_10(__pyx_t_9); if (unlikely(!__pyx_t_1)) goto __pyx_L3_unpacking_failed; __Pyx_GOTREF(__pyx_t_1); if (__Pyx_IternextUnpackEndCheck(__pyx_t_10(__pyx_t_9), 2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6292; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_10 = NULL; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; goto __pyx_L4_unpacking_done; __pyx_L3_unpacking_failed:; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_10 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6292; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_L4_unpacking_done:; } __pyx_t_11 = __Pyx_PyIndex_AsSsize_t(__pyx_t_3); if (unlikely((__pyx_t_11 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6292; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_12 = __Pyx_PyIndex_AsSsize_t(__pyx_t_1); if (unlikely((__pyx_t_12 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6292; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_N = __pyx_t_11; __pyx_v_K = __pyx_t_12; /* "pandas/src/generated.pyx":6293 * * N, K = ( values).shape * if bins[len(bins) - 1] == len(values): # <<<<<<<<<<<<<< * ngroups = len(bins) * else: */ __pyx_t_12 = PyObject_Length(((PyObject *)__pyx_v_bins)); if (unlikely(__pyx_t_12 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6293; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_11 = (__pyx_t_12 - 1); __pyx_t_5 = -1; if (__pyx_t_11 < 0) { __pyx_t_11 += __pyx_pybuffernd_bins.diminfo[0].shape; if (unlikely(__pyx_t_11 < 0)) __pyx_t_5 = 0; } else if (unlikely(__pyx_t_11 >= __pyx_pybuffernd_bins.diminfo[0].shape)) __pyx_t_5 = 0; if (unlikely(__pyx_t_5 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_5); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6293; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_13 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_13 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6293; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_14 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_bins.rcbuffer->pybuffer.buf, __pyx_t_11, __pyx_pybuffernd_bins.diminfo[0].strides)) == __pyx_t_13) != 0); if (__pyx_t_14) { /* "pandas/src/generated.pyx":6294 * N, K = ( values).shape * if bins[len(bins) - 1] == len(values): * ngroups = len(bins) # <<<<<<<<<<<<<< * else: * ngroups = len(bins) + 1 */ __pyx_t_13 = PyObject_Length(((PyObject *)__pyx_v_bins)); if (unlikely(__pyx_t_13 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6294; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_ngroups = __pyx_t_13; goto __pyx_L5; } /*else*/ { /* "pandas/src/generated.pyx":6296 * ngroups = len(bins) * else: * ngroups = len(bins) + 1 # <<<<<<<<<<<<<< * * b = 0 */ __pyx_t_13 = PyObject_Length(((PyObject *)__pyx_v_bins)); if (unlikely(__pyx_t_13 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6296; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_ngroups = (__pyx_t_13 + 1); } __pyx_L5:; /* "pandas/src/generated.pyx":6298 * ngroups = len(bins) + 1 * * b = 0 # <<<<<<<<<<<<<< * if K > 1: * for i in range(N): */ __pyx_v_b = 0; /* "pandas/src/generated.pyx":6299 * * b = 0 * if K > 1: # <<<<<<<<<<<<<< * for i in range(N): * while b < ngroups - 1 and i >= bins[b]: */ __pyx_t_14 = ((__pyx_v_K > 1) != 0); if (__pyx_t_14) { /* "pandas/src/generated.pyx":6300 * b = 0 * if K > 1: * for i in range(N): # <<<<<<<<<<<<<< * while b < ngroups - 1 and i >= bins[b]: * b += 1 */ __pyx_t_13 = __pyx_v_N; for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_13; __pyx_t_12+=1) { __pyx_v_i = __pyx_t_12; /* "pandas/src/generated.pyx":6301 * if K > 1: * for i in range(N): * while b < ngroups - 1 and i >= bins[b]: # <<<<<<<<<<<<<< * b += 1 * */ while (1) { __pyx_t_14 = ((__pyx_v_b < (__pyx_v_ngroups - 1)) != 0); if (__pyx_t_14) { __pyx_t_15 = __pyx_v_b; __pyx_t_5 = -1; if (__pyx_t_15 < 0) { __pyx_t_15 += __pyx_pybuffernd_bins.diminfo[0].shape; if (unlikely(__pyx_t_15 < 0)) __pyx_t_5 = 0; } else if (unlikely(__pyx_t_15 >= __pyx_pybuffernd_bins.diminfo[0].shape)) __pyx_t_5 = 0; if (unlikely(__pyx_t_5 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_5); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6301; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_16 = ((__pyx_v_i >= (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_bins.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_bins.diminfo[0].strides))) != 0); __pyx_t_17 = __pyx_t_16; } else { __pyx_t_17 = __pyx_t_14; } if (!__pyx_t_17) break; /* "pandas/src/generated.pyx":6302 * for i in range(N): * while b < ngroups - 1 and i >= bins[b]: * b += 1 # <<<<<<<<<<<<<< * * counts[b] += 1 */ __pyx_v_b = (__pyx_v_b + 1); } /* "pandas/src/generated.pyx":6304 * b += 1 * * counts[b] += 1 # <<<<<<<<<<<<<< * for j in range(K): * val = values[i, j] */ __pyx_t_18 = __pyx_v_b; __pyx_t_5 = -1; if (__pyx_t_18 < 0) { __pyx_t_18 += __pyx_pybuffernd_counts.diminfo[0].shape; if (unlikely(__pyx_t_18 < 0)) __pyx_t_5 = 0; } else if (unlikely(__pyx_t_18 >= __pyx_pybuffernd_counts.diminfo[0].shape)) __pyx_t_5 = 0; if (unlikely(__pyx_t_5 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_5); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6304; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_counts.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_counts.diminfo[0].strides) += 1; /* "pandas/src/generated.pyx":6305 * * counts[b] += 1 * for j in range(K): # <<<<<<<<<<<<<< * val = values[i, j] * */ __pyx_t_19 = __pyx_v_K; for (__pyx_t_20 = 0; __pyx_t_20 < __pyx_t_19; __pyx_t_20+=1) { __pyx_v_j = __pyx_t_20; /* "pandas/src/generated.pyx":6306 * counts[b] += 1 * for j in range(K): * val = values[i, j] # <<<<<<<<<<<<<< * * # not nan */ __pyx_t_21 = __pyx_v_i; __pyx_t_22 = __pyx_v_j; __pyx_t_5 = -1; if (__pyx_t_21 < 0) { __pyx_t_21 += __pyx_pybuffernd_values.diminfo[0].shape; if (unlikely(__pyx_t_21 < 0)) __pyx_t_5 = 0; } else if (unlikely(__pyx_t_21 >= __pyx_pybuffernd_values.diminfo[0].shape)) __pyx_t_5 = 0; if (__pyx_t_22 < 0) { __pyx_t_22 += __pyx_pybuffernd_values.diminfo[1].shape; if (unlikely(__pyx_t_22 < 0)) __pyx_t_5 = 1; } else if (unlikely(__pyx_t_22 >= __pyx_pybuffernd_values.diminfo[1].shape)) __pyx_t_5 = 1; if (unlikely(__pyx_t_5 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_5); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6306; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_val = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_22, __pyx_pybuffernd_values.diminfo[1].strides)); /* "pandas/src/generated.pyx":6309 * * # not nan * if val == val: # <<<<<<<<<<<<<< * nobs[b, j] += 1 * sumx[b, j] += val */ __pyx_t_17 = ((__pyx_v_val == __pyx_v_val) != 0); if (__pyx_t_17) { /* "pandas/src/generated.pyx":6310 * # not nan * if val == val: * nobs[b, j] += 1 # <<<<<<<<<<<<<< * sumx[b, j] += val * else: */ __pyx_t_23 = __pyx_v_b; __pyx_t_24 = __pyx_v_j; __pyx_t_5 = -1; if (__pyx_t_23 < 0) { __pyx_t_23 += __pyx_pybuffernd_nobs.diminfo[0].shape; if (unlikely(__pyx_t_23 < 0)) __pyx_t_5 = 0; } else if (unlikely(__pyx_t_23 >= __pyx_pybuffernd_nobs.diminfo[0].shape)) __pyx_t_5 = 0; if (__pyx_t_24 < 0) { __pyx_t_24 += __pyx_pybuffernd_nobs.diminfo[1].shape; if (unlikely(__pyx_t_24 < 0)) __pyx_t_5 = 1; } else if (unlikely(__pyx_t_24 >= __pyx_pybuffernd_nobs.diminfo[1].shape)) __pyx_t_5 = 1; if (unlikely(__pyx_t_5 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_5); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6310; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_nobs.rcbuffer->pybuffer.buf, __pyx_t_23, __pyx_pybuffernd_nobs.diminfo[0].strides, __pyx_t_24, __pyx_pybuffernd_nobs.diminfo[1].strides) += 1.0; /* "pandas/src/generated.pyx":6311 * if val == val: * nobs[b, j] += 1 * sumx[b, j] += val # <<<<<<<<<<<<<< * else: * for i in range(N): */ __pyx_t_25 = __pyx_v_b; __pyx_t_26 = __pyx_v_j; __pyx_t_5 = -1; if (__pyx_t_25 < 0) { __pyx_t_25 += __pyx_pybuffernd_sumx.diminfo[0].shape; if (unlikely(__pyx_t_25 < 0)) __pyx_t_5 = 0; } else if (unlikely(__pyx_t_25 >= __pyx_pybuffernd_sumx.diminfo[0].shape)) __pyx_t_5 = 0; if (__pyx_t_26 < 0) { __pyx_t_26 += __pyx_pybuffernd_sumx.diminfo[1].shape; if (unlikely(__pyx_t_26 < 0)) __pyx_t_5 = 1; } else if (unlikely(__pyx_t_26 >= __pyx_pybuffernd_sumx.diminfo[1].shape)) __pyx_t_5 = 1; if (unlikely(__pyx_t_5 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_5); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6311; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_sumx.rcbuffer->pybuffer.buf, __pyx_t_25, __pyx_pybuffernd_sumx.diminfo[0].strides, __pyx_t_26, __pyx_pybuffernd_sumx.diminfo[1].strides) += __pyx_v_val; goto __pyx_L13; } __pyx_L13:; } } goto __pyx_L6; } /*else*/ { /* "pandas/src/generated.pyx":6313 * sumx[b, j] += val * else: * for i in range(N): # <<<<<<<<<<<<<< * while b < ngroups - 1 and i >= bins[b]: * b += 1 */ __pyx_t_13 = __pyx_v_N; for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_13; __pyx_t_12+=1) { __pyx_v_i = __pyx_t_12; /* "pandas/src/generated.pyx":6314 * else: * for i in range(N): * while b < ngroups - 1 and i >= bins[b]: # <<<<<<<<<<<<<< * b += 1 * */ while (1) { __pyx_t_17 = ((__pyx_v_b < (__pyx_v_ngroups - 1)) != 0); if (__pyx_t_17) { __pyx_t_19 = __pyx_v_b; __pyx_t_5 = -1; if (__pyx_t_19 < 0) { __pyx_t_19 += __pyx_pybuffernd_bins.diminfo[0].shape; if (unlikely(__pyx_t_19 < 0)) __pyx_t_5 = 0; } else if (unlikely(__pyx_t_19 >= __pyx_pybuffernd_bins.diminfo[0].shape)) __pyx_t_5 = 0; if (unlikely(__pyx_t_5 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_5); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6314; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_14 = ((__pyx_v_i >= (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_bins.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_bins.diminfo[0].strides))) != 0); __pyx_t_16 = __pyx_t_14; } else { __pyx_t_16 = __pyx_t_17; } if (!__pyx_t_16) break; /* "pandas/src/generated.pyx":6315 * for i in range(N): * while b < ngroups - 1 and i >= bins[b]: * b += 1 # <<<<<<<<<<<<<< * * counts[b] += 1 */ __pyx_v_b = (__pyx_v_b + 1); } /* "pandas/src/generated.pyx":6317 * b += 1 * * counts[b] += 1 # <<<<<<<<<<<<<< * val = values[i, 0] * */ __pyx_t_20 = __pyx_v_b; __pyx_t_5 = -1; if (__pyx_t_20 < 0) { __pyx_t_20 += __pyx_pybuffernd_counts.diminfo[0].shape; if (unlikely(__pyx_t_20 < 0)) __pyx_t_5 = 0; } else if (unlikely(__pyx_t_20 >= __pyx_pybuffernd_counts.diminfo[0].shape)) __pyx_t_5 = 0; if (unlikely(__pyx_t_5 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_5); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6317; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_counts.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_counts.diminfo[0].strides) += 1; /* "pandas/src/generated.pyx":6318 * * counts[b] += 1 * val = values[i, 0] # <<<<<<<<<<<<<< * * # not nan */ __pyx_t_27 = __pyx_v_i; __pyx_t_28 = 0; __pyx_t_5 = -1; if (__pyx_t_27 < 0) { __pyx_t_27 += __pyx_pybuffernd_values.diminfo[0].shape; if (unlikely(__pyx_t_27 < 0)) __pyx_t_5 = 0; } else if (unlikely(__pyx_t_27 >= __pyx_pybuffernd_values.diminfo[0].shape)) __pyx_t_5 = 0; if (__pyx_t_28 < 0) { __pyx_t_28 += __pyx_pybuffernd_values.diminfo[1].shape; if (unlikely(__pyx_t_28 < 0)) __pyx_t_5 = 1; } else if (unlikely(__pyx_t_28 >= __pyx_pybuffernd_values.diminfo[1].shape)) __pyx_t_5 = 1; if (unlikely(__pyx_t_5 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_5); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6318; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_val = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_27, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_28, __pyx_pybuffernd_values.diminfo[1].strides)); /* "pandas/src/generated.pyx":6321 * * # not nan * if val == val: # <<<<<<<<<<<<<< * nobs[b, 0] += 1 * sumx[b, 0] += val */ __pyx_t_16 = ((__pyx_v_val == __pyx_v_val) != 0); if (__pyx_t_16) { /* "pandas/src/generated.pyx":6322 * # not nan * if val == val: * nobs[b, 0] += 1 # <<<<<<<<<<<<<< * sumx[b, 0] += val * */ __pyx_t_29 = __pyx_v_b; __pyx_t_30 = 0; __pyx_t_5 = -1; if (__pyx_t_29 < 0) { __pyx_t_29 += __pyx_pybuffernd_nobs.diminfo[0].shape; if (unlikely(__pyx_t_29 < 0)) __pyx_t_5 = 0; } else if (unlikely(__pyx_t_29 >= __pyx_pybuffernd_nobs.diminfo[0].shape)) __pyx_t_5 = 0; if (__pyx_t_30 < 0) { __pyx_t_30 += __pyx_pybuffernd_nobs.diminfo[1].shape; if (unlikely(__pyx_t_30 < 0)) __pyx_t_5 = 1; } else if (unlikely(__pyx_t_30 >= __pyx_pybuffernd_nobs.diminfo[1].shape)) __pyx_t_5 = 1; if (unlikely(__pyx_t_5 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_5); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6322; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_nobs.rcbuffer->pybuffer.buf, __pyx_t_29, __pyx_pybuffernd_nobs.diminfo[0].strides, __pyx_t_30, __pyx_pybuffernd_nobs.diminfo[1].strides) += 1.0; /* "pandas/src/generated.pyx":6323 * if val == val: * nobs[b, 0] += 1 * sumx[b, 0] += val # <<<<<<<<<<<<<< * * for i in range(ngroups): */ __pyx_t_31 = __pyx_v_b; __pyx_t_32 = 0; __pyx_t_5 = -1; if (__pyx_t_31 < 0) { __pyx_t_31 += __pyx_pybuffernd_sumx.diminfo[0].shape; if (unlikely(__pyx_t_31 < 0)) __pyx_t_5 = 0; } else if (unlikely(__pyx_t_31 >= __pyx_pybuffernd_sumx.diminfo[0].shape)) __pyx_t_5 = 0; if (__pyx_t_32 < 0) { __pyx_t_32 += __pyx_pybuffernd_sumx.diminfo[1].shape; if (unlikely(__pyx_t_32 < 0)) __pyx_t_5 = 1; } else if (unlikely(__pyx_t_32 >= __pyx_pybuffernd_sumx.diminfo[1].shape)) __pyx_t_5 = 1; if (unlikely(__pyx_t_5 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_5); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6323; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_sumx.rcbuffer->pybuffer.buf, __pyx_t_31, __pyx_pybuffernd_sumx.diminfo[0].strides, __pyx_t_32, __pyx_pybuffernd_sumx.diminfo[1].strides) += __pyx_v_val; goto __pyx_L18; } __pyx_L18:; } } __pyx_L6:; /* "pandas/src/generated.pyx":6325 * sumx[b, 0] += val * * for i in range(ngroups): # <<<<<<<<<<<<<< * for j in range(K): * count = nobs[i, j] */ __pyx_t_13 = __pyx_v_ngroups; for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_13; __pyx_t_12+=1) { __pyx_v_i = __pyx_t_12; /* "pandas/src/generated.pyx":6326 * * for i in range(ngroups): * for j in range(K): # <<<<<<<<<<<<<< * count = nobs[i, j] * if nobs[i, j] == 0: */ __pyx_t_33 = __pyx_v_K; for (__pyx_t_34 = 0; __pyx_t_34 < __pyx_t_33; __pyx_t_34+=1) { __pyx_v_j = __pyx_t_34; /* "pandas/src/generated.pyx":6327 * for i in range(ngroups): * for j in range(K): * count = nobs[i, j] # <<<<<<<<<<<<<< * if nobs[i, j] == 0: * out[i, j] = nan */ __pyx_t_35 = __pyx_v_i; __pyx_t_36 = __pyx_v_j; __pyx_t_5 = -1; if (__pyx_t_35 < 0) { __pyx_t_35 += __pyx_pybuffernd_nobs.diminfo[0].shape; if (unlikely(__pyx_t_35 < 0)) __pyx_t_5 = 0; } else if (unlikely(__pyx_t_35 >= __pyx_pybuffernd_nobs.diminfo[0].shape)) __pyx_t_5 = 0; if (__pyx_t_36 < 0) { __pyx_t_36 += __pyx_pybuffernd_nobs.diminfo[1].shape; if (unlikely(__pyx_t_36 < 0)) __pyx_t_5 = 1; } else if (unlikely(__pyx_t_36 >= __pyx_pybuffernd_nobs.diminfo[1].shape)) __pyx_t_5 = 1; if (unlikely(__pyx_t_5 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_5); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6327; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_count = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_nobs.rcbuffer->pybuffer.buf, __pyx_t_35, __pyx_pybuffernd_nobs.diminfo[0].strides, __pyx_t_36, __pyx_pybuffernd_nobs.diminfo[1].strides)); /* "pandas/src/generated.pyx":6328 * for j in range(K): * count = nobs[i, j] * if nobs[i, j] == 0: # <<<<<<<<<<<<<< * out[i, j] = nan * else: */ __pyx_t_37 = __pyx_v_i; __pyx_t_38 = __pyx_v_j; __pyx_t_5 = -1; if (__pyx_t_37 < 0) { __pyx_t_37 += __pyx_pybuffernd_nobs.diminfo[0].shape; if (unlikely(__pyx_t_37 < 0)) __pyx_t_5 = 0; } else if (unlikely(__pyx_t_37 >= __pyx_pybuffernd_nobs.diminfo[0].shape)) __pyx_t_5 = 0; if (__pyx_t_38 < 0) { __pyx_t_38 += __pyx_pybuffernd_nobs.diminfo[1].shape; if (unlikely(__pyx_t_38 < 0)) __pyx_t_5 = 1; } else if (unlikely(__pyx_t_38 >= __pyx_pybuffernd_nobs.diminfo[1].shape)) __pyx_t_5 = 1; if (unlikely(__pyx_t_5 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_5); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6328; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_16 = (((*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_nobs.rcbuffer->pybuffer.buf, __pyx_t_37, __pyx_pybuffernd_nobs.diminfo[0].strides, __pyx_t_38, __pyx_pybuffernd_nobs.diminfo[1].strides)) == 0.0) != 0); if (__pyx_t_16) { /* "pandas/src/generated.pyx":6329 * count = nobs[i, j] * if nobs[i, j] == 0: * out[i, j] = nan # <<<<<<<<<<<<<< * else: * out[i, j] = sumx[i, j] / count */ __pyx_t_39 = __pyx_v_i; __pyx_t_40 = __pyx_v_j; __pyx_t_5 = -1; if (__pyx_t_39 < 0) { __pyx_t_39 += __pyx_pybuffernd_out.diminfo[0].shape; if (unlikely(__pyx_t_39 < 0)) __pyx_t_5 = 0; } else if (unlikely(__pyx_t_39 >= __pyx_pybuffernd_out.diminfo[0].shape)) __pyx_t_5 = 0; if (__pyx_t_40 < 0) { __pyx_t_40 += __pyx_pybuffernd_out.diminfo[1].shape; if (unlikely(__pyx_t_40 < 0)) __pyx_t_5 = 1; } else if (unlikely(__pyx_t_40 >= __pyx_pybuffernd_out.diminfo[1].shape)) __pyx_t_5 = 1; if (unlikely(__pyx_t_5 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_5); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6329; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_39, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_40, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_6pandas_5algos_nan; goto __pyx_L23; } /*else*/ { /* "pandas/src/generated.pyx":6331 * out[i, j] = nan * else: * out[i, j] = sumx[i, j] / count # <<<<<<<<<<<<<< * * @cython.wraparound(False) */ __pyx_t_41 = __pyx_v_i; __pyx_t_42 = __pyx_v_j; __pyx_t_5 = -1; if (__pyx_t_41 < 0) { __pyx_t_41 += __pyx_pybuffernd_sumx.diminfo[0].shape; if (unlikely(__pyx_t_41 < 0)) __pyx_t_5 = 0; } else if (unlikely(__pyx_t_41 >= __pyx_pybuffernd_sumx.diminfo[0].shape)) __pyx_t_5 = 0; if (__pyx_t_42 < 0) { __pyx_t_42 += __pyx_pybuffernd_sumx.diminfo[1].shape; if (unlikely(__pyx_t_42 < 0)) __pyx_t_5 = 1; } else if (unlikely(__pyx_t_42 >= __pyx_pybuffernd_sumx.diminfo[1].shape)) __pyx_t_5 = 1; if (unlikely(__pyx_t_5 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_5); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6331; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_43 = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_sumx.rcbuffer->pybuffer.buf, __pyx_t_41, __pyx_pybuffernd_sumx.diminfo[0].strides, __pyx_t_42, __pyx_pybuffernd_sumx.diminfo[1].strides)); if (unlikely(__pyx_v_count == 0)) { #ifdef WITH_THREAD PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure(); #endif PyErr_SetString(PyExc_ZeroDivisionError, "float division"); #ifdef WITH_THREAD PyGILState_Release(__pyx_gilstate_save); #endif {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6331; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_44 = __pyx_v_i; __pyx_t_45 = __pyx_v_j; __pyx_t_5 = -1; if (__pyx_t_44 < 0) { __pyx_t_44 += __pyx_pybuffernd_out.diminfo[0].shape; if (unlikely(__pyx_t_44 < 0)) __pyx_t_5 = 0; } else if (unlikely(__pyx_t_44 >= __pyx_pybuffernd_out.diminfo[0].shape)) __pyx_t_5 = 0; if (__pyx_t_45 < 0) { __pyx_t_45 += __pyx_pybuffernd_out.diminfo[1].shape; if (unlikely(__pyx_t_45 < 0)) __pyx_t_5 = 1; } else if (unlikely(__pyx_t_45 >= __pyx_pybuffernd_out.diminfo[1].shape)) __pyx_t_5 = 1; if (unlikely(__pyx_t_5 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_5); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6331; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_44, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_45, __pyx_pybuffernd_out.diminfo[1].strides) = (__pyx_t_43 / __pyx_v_count); } __pyx_L23:; } } /* "pandas/src/generated.pyx":6280 * out[i, j] = sumx[i, j] / count * * def group_mean_bin_float32(ndarray[float32_t, ndim=2] out, # <<<<<<<<<<<<<< * ndarray[int64_t] counts, * ndarray[float32_t, ndim=2] 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_9); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_bins.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_counts.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_sumx.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.group_mean_bin_float32", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_bins.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_counts.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_sumx.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_sumx); __Pyx_XDECREF((PyObject *)__pyx_v_nobs); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":6335 * @cython.wraparound(False) * @cython.boundscheck(False) * def group_min_float64(ndarray[float64_t, ndim=2] out, # <<<<<<<<<<<<<< * ndarray[int64_t] counts, * ndarray[float64_t, ndim=2] values, */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_435group_min_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6pandas_5algos_434group_min_float64[] = "\n Only aggregates on axis=0\n "; static PyMethodDef __pyx_mdef_6pandas_5algos_435group_min_float64 = {__Pyx_NAMESTR("group_min_float64"), (PyCFunction)__pyx_pw_6pandas_5algos_435group_min_float64, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_5algos_434group_min_float64)}; static PyObject *__pyx_pw_6pandas_5algos_435group_min_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_out = 0; PyArrayObject *__pyx_v_counts = 0; PyArrayObject *__pyx_v_values = 0; PyArrayObject *__pyx_v_labels = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("group_min_float64 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_out,&__pyx_n_s_counts,&__pyx_n_s_values,&__pyx_n_s_labels,0}; PyObject* values[4] = {0,0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_out)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_counts)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("group_min_float64", 1, 4, 4, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6335; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_values)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("group_min_float64", 1, 4, 4, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6335; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_labels)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("group_min_float64", 1, 4, 4, 3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6335; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "group_min_float64") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6335; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 4) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[3] = PyTuple_GET_ITEM(__pyx_args, 3); } __pyx_v_out = ((PyArrayObject *)values[0]); __pyx_v_counts = ((PyArrayObject *)values[1]); __pyx_v_values = ((PyArrayObject *)values[2]); __pyx_v_labels = ((PyArrayObject *)values[3]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("group_min_float64", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6335; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.group_min_float64", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_5numpy_ndarray, 1, "out", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6335; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_counts), __pyx_ptype_5numpy_ndarray, 1, "counts", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6336; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6337; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_labels), __pyx_ptype_5numpy_ndarray, 1, "labels", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6338; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_434group_min_float64(__pyx_self, __pyx_v_out, __pyx_v_counts, __pyx_v_values, __pyx_v_labels); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5algos_434group_min_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_out, PyArrayObject *__pyx_v_counts, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_labels) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_N; Py_ssize_t __pyx_v_K; Py_ssize_t __pyx_v_lab; __pyx_t_5numpy_float64_t __pyx_v_val; PyArrayObject *__pyx_v_minx = 0; PyArrayObject *__pyx_v_nobs = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_counts; __Pyx_Buffer __pyx_pybuffer_counts; __Pyx_LocalBuf_ND __pyx_pybuffernd_labels; __Pyx_Buffer __pyx_pybuffer_labels; __Pyx_LocalBuf_ND __pyx_pybuffernd_minx; __Pyx_Buffer __pyx_pybuffer_minx; __Pyx_LocalBuf_ND __pyx_pybuffernd_nobs; __Pyx_Buffer __pyx_pybuffer_nobs; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_values; __Pyx_Buffer __pyx_pybuffer_values; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; Py_ssize_t __pyx_t_2; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyArrayObject *__pyx_t_7 = NULL; int __pyx_t_8; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; PyObject *__pyx_t_11 = NULL; PyObject *__pyx_t_12 = NULL; PyObject *(*__pyx_t_13)(PyObject *); 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; Py_ssize_t __pyx_t_26; long __pyx_t_27; Py_ssize_t __pyx_t_28; long __pyx_t_29; Py_ssize_t __pyx_t_30; long __pyx_t_31; Py_ssize_t __pyx_t_32; long __pyx_t_33; Py_ssize_t __pyx_t_34; Py_ssize_t __pyx_t_35; Py_ssize_t __pyx_t_36; Py_ssize_t __pyx_t_37; Py_ssize_t __pyx_t_38; Py_ssize_t __pyx_t_39; Py_ssize_t __pyx_t_40; Py_ssize_t __pyx_t_41; Py_ssize_t __pyx_t_42; Py_ssize_t __pyx_t_43; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("group_min_float64", 0); __pyx_pybuffer_minx.pybuffer.buf = NULL; __pyx_pybuffer_minx.refcount = 0; __pyx_pybuffernd_minx.data = NULL; __pyx_pybuffernd_minx.rcbuffer = &__pyx_pybuffer_minx; __pyx_pybuffer_nobs.pybuffer.buf = NULL; __pyx_pybuffer_nobs.refcount = 0; __pyx_pybuffernd_nobs.data = NULL; __pyx_pybuffernd_nobs.rcbuffer = &__pyx_pybuffer_nobs; __pyx_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; __pyx_pybuffer_counts.pybuffer.buf = NULL; __pyx_pybuffer_counts.refcount = 0; __pyx_pybuffernd_counts.data = NULL; __pyx_pybuffernd_counts.rcbuffer = &__pyx_pybuffer_counts; __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_labels.pybuffer.buf = NULL; __pyx_pybuffer_labels.refcount = 0; __pyx_pybuffernd_labels.data = NULL; __pyx_pybuffernd_labels.rcbuffer = &__pyx_pybuffer_labels; { __Pyx_BufFmt_StackElem __pyx_stack[1]; 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, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6335; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; __pyx_pybuffernd_out.diminfo[1].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_out.diminfo[1].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[1]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_counts.rcbuffer->pybuffer, (PyObject*)__pyx_v_counts, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6335; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_counts.diminfo[0].strides = __pyx_pybuffernd_counts.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_counts.diminfo[0].shape = __pyx_pybuffernd_counts.rcbuffer->pybuffer.shape[0]; { __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, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6335; __pyx_clineno = __LINE__; goto __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_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_labels.rcbuffer->pybuffer, (PyObject*)__pyx_v_labels, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6335; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_labels.diminfo[0].strides = __pyx_pybuffernd_labels.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_labels.diminfo[0].shape = __pyx_pybuffernd_labels.rcbuffer->pybuffer.shape[0]; /* "pandas/src/generated.pyx":6347 * ndarray[float64_t, ndim=2] minx, nobs * * if not len(values) == len(labels): # <<<<<<<<<<<<<< * raise AssertionError("len(index) != len(labels)") * */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6347; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_2 = PyObject_Length(((PyObject *)__pyx_v_labels)); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6347; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_3 = ((!((__pyx_t_1 == __pyx_t_2) != 0)) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":6348 * * if not len(values) == len(labels): * raise AssertionError("len(index) != len(labels)") # <<<<<<<<<<<<<< * * nobs = np.zeros_like(out) */ __pyx_t_4 = PyObject_Call(__pyx_builtin_AssertionError, __pyx_tuple__189, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6348; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 6348; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } /* "pandas/src/generated.pyx":6350 * raise AssertionError("len(index) != len(labels)") * * nobs = np.zeros_like(out) # <<<<<<<<<<<<<< * * minx = np.empty_like(out) */ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6350; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_zeros_like); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6350; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6350; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(((PyObject *)__pyx_v_out)); PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_v_out)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out)); __pyx_t_6 = PyObject_Call(__pyx_t_5, __pyx_t_4, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6350; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6350; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_7 = ((PyArrayObject *)__pyx_t_6); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer); __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_nobs.rcbuffer->pybuffer, (PyObject*)__pyx_v_nobs, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_pybuffernd_nobs.diminfo[0].strides = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_nobs.diminfo[0].shape = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_nobs.diminfo[1].strides = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_nobs.diminfo[1].shape = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.shape[1]; if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6350; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_7 = 0; __pyx_v_nobs = ((PyArrayObject *)__pyx_t_6); __pyx_t_6 = 0; /* "pandas/src/generated.pyx":6352 * nobs = np.zeros_like(out) * * minx = np.empty_like(out) # <<<<<<<<<<<<<< * minx.fill(np.inf) * */ __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6352; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_empty_like); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6352; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6352; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(((PyObject *)__pyx_v_out)); PyTuple_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_v_out)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out)); __pyx_t_5 = PyObject_Call(__pyx_t_4, __pyx_t_6, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6352; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6352; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_7 = ((PyArrayObject *)__pyx_t_5); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_minx.rcbuffer->pybuffer); __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_minx.rcbuffer->pybuffer, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_minx.rcbuffer->pybuffer, (PyObject*)__pyx_v_minx, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_pybuffernd_minx.diminfo[0].strides = __pyx_pybuffernd_minx.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_minx.diminfo[0].shape = __pyx_pybuffernd_minx.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_minx.diminfo[1].strides = __pyx_pybuffernd_minx.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_minx.diminfo[1].shape = __pyx_pybuffernd_minx.rcbuffer->pybuffer.shape[1]; if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6352; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_7 = 0; __pyx_v_minx = ((PyArrayObject *)__pyx_t_5); __pyx_t_5 = 0; /* "pandas/src/generated.pyx":6353 * * minx = np.empty_like(out) * minx.fill(np.inf) # <<<<<<<<<<<<<< * * N, K = ( values).shape */ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_minx), __pyx_n_s_fill); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6353; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6353; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_inf); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6353; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6353; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyObject_Call(__pyx_t_5, __pyx_t_6, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6353; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "pandas/src/generated.pyx":6355 * minx.fill(np.inf) * * N, K = ( values).shape # <<<<<<<<<<<<<< * * if K > 1: */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_values), __pyx_n_s_shape); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6355; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); if ((likely(PyTuple_CheckExact(__pyx_t_4))) || (PyList_CheckExact(__pyx_t_4))) { PyObject* sequence = __pyx_t_4; #if CYTHON_COMPILING_IN_CPYTHON Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6355; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_6 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_5 = PyTuple_GET_ITEM(sequence, 1); } else { __pyx_t_6 = PyList_GET_ITEM(sequence, 0); __pyx_t_5 = PyList_GET_ITEM(sequence, 1); } __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(__pyx_t_5); #else __pyx_t_6 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6355; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_5 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6355; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); #endif __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else { Py_ssize_t index = -1; __pyx_t_12 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6355; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_13 = Py_TYPE(__pyx_t_12)->tp_iternext; index = 0; __pyx_t_6 = __pyx_t_13(__pyx_t_12); if (unlikely(!__pyx_t_6)) goto __pyx_L4_unpacking_failed; __Pyx_GOTREF(__pyx_t_6); index = 1; __pyx_t_5 = __pyx_t_13(__pyx_t_12); if (unlikely(!__pyx_t_5)) goto __pyx_L4_unpacking_failed; __Pyx_GOTREF(__pyx_t_5); if (__Pyx_IternextUnpackEndCheck(__pyx_t_13(__pyx_t_12), 2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6355; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_13 = NULL; __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; goto __pyx_L5_unpacking_done; __pyx_L4_unpacking_failed:; __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __pyx_t_13 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6355; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_L5_unpacking_done:; } __pyx_t_2 = __Pyx_PyIndex_AsSsize_t(__pyx_t_6); if (unlikely((__pyx_t_2 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6355; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_1 = __Pyx_PyIndex_AsSsize_t(__pyx_t_5); if (unlikely((__pyx_t_1 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6355; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_v_N = __pyx_t_2; __pyx_v_K = __pyx_t_1; /* "pandas/src/generated.pyx":6357 * N, K = ( values).shape * * if K > 1: # <<<<<<<<<<<<<< * for i in range(N): * lab = labels[i] */ __pyx_t_3 = ((__pyx_v_K > 1) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":6358 * * if K > 1: * for i in range(N): # <<<<<<<<<<<<<< * lab = labels[i] * if lab < 0: */ __pyx_t_1 = __pyx_v_N; for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) { __pyx_v_i = __pyx_t_2; /* "pandas/src/generated.pyx":6359 * if K > 1: * for i in range(N): * lab = labels[i] # <<<<<<<<<<<<<< * if lab < 0: * continue */ __pyx_t_14 = __pyx_v_i; __pyx_v_lab = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_labels.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_labels.diminfo[0].strides)); /* "pandas/src/generated.pyx":6360 * for i in range(N): * lab = labels[i] * if lab < 0: # <<<<<<<<<<<<<< * continue * */ __pyx_t_3 = ((__pyx_v_lab < 0) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":6361 * lab = labels[i] * if lab < 0: * continue # <<<<<<<<<<<<<< * * counts[lab] += 1 */ goto __pyx_L7_continue; } /* "pandas/src/generated.pyx":6363 * continue * * counts[lab] += 1 # <<<<<<<<<<<<<< * for j in range(K): * val = values[i, j] */ __pyx_t_15 = __pyx_v_lab; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_counts.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_counts.diminfo[0].strides) += 1; /* "pandas/src/generated.pyx":6364 * * counts[lab] += 1 * for j in range(K): # <<<<<<<<<<<<<< * val = values[i, j] * */ __pyx_t_16 = __pyx_v_K; for (__pyx_t_17 = 0; __pyx_t_17 < __pyx_t_16; __pyx_t_17+=1) { __pyx_v_j = __pyx_t_17; /* "pandas/src/generated.pyx":6365 * counts[lab] += 1 * for j in range(K): * val = values[i, j] # <<<<<<<<<<<<<< * * # not nan */ __pyx_t_18 = __pyx_v_i; __pyx_t_19 = __pyx_v_j; __pyx_v_val = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_19, __pyx_pybuffernd_values.diminfo[1].strides)); /* "pandas/src/generated.pyx":6368 * * # not nan * if val == val: # <<<<<<<<<<<<<< * nobs[lab, j] += 1 * if val < minx[lab, j]: */ __pyx_t_3 = ((__pyx_v_val == __pyx_v_val) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":6369 * # not nan * if val == val: * nobs[lab, j] += 1 # <<<<<<<<<<<<<< * if val < minx[lab, j]: * minx[lab, j] = val */ __pyx_t_20 = __pyx_v_lab; __pyx_t_21 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_nobs.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_nobs.diminfo[0].strides, __pyx_t_21, __pyx_pybuffernd_nobs.diminfo[1].strides) += 1.0; /* "pandas/src/generated.pyx":6370 * if val == val: * nobs[lab, j] += 1 * if val < minx[lab, j]: # <<<<<<<<<<<<<< * minx[lab, j] = val * else: */ __pyx_t_22 = __pyx_v_lab; __pyx_t_23 = __pyx_v_j; __pyx_t_3 = ((__pyx_v_val < (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_minx.rcbuffer->pybuffer.buf, __pyx_t_22, __pyx_pybuffernd_minx.diminfo[0].strides, __pyx_t_23, __pyx_pybuffernd_minx.diminfo[1].strides))) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":6371 * nobs[lab, j] += 1 * if val < minx[lab, j]: * minx[lab, j] = val # <<<<<<<<<<<<<< * else: * for i in range(N): */ __pyx_t_24 = __pyx_v_lab; __pyx_t_25 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_minx.rcbuffer->pybuffer.buf, __pyx_t_24, __pyx_pybuffernd_minx.diminfo[0].strides, __pyx_t_25, __pyx_pybuffernd_minx.diminfo[1].strides) = __pyx_v_val; goto __pyx_L13; } __pyx_L13:; goto __pyx_L12; } __pyx_L12:; } __pyx_L7_continue:; } goto __pyx_L6; } /*else*/ { /* "pandas/src/generated.pyx":6373 * minx[lab, j] = val * else: * for i in range(N): # <<<<<<<<<<<<<< * lab = labels[i] * if lab < 0: */ __pyx_t_1 = __pyx_v_N; for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) { __pyx_v_i = __pyx_t_2; /* "pandas/src/generated.pyx":6374 * else: * for i in range(N): * lab = labels[i] # <<<<<<<<<<<<<< * if lab < 0: * continue */ __pyx_t_16 = __pyx_v_i; __pyx_v_lab = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_labels.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_labels.diminfo[0].strides)); /* "pandas/src/generated.pyx":6375 * for i in range(N): * lab = labels[i] * if lab < 0: # <<<<<<<<<<<<<< * continue * */ __pyx_t_3 = ((__pyx_v_lab < 0) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":6376 * lab = labels[i] * if lab < 0: * continue # <<<<<<<<<<<<<< * * counts[lab] += 1 */ goto __pyx_L14_continue; } /* "pandas/src/generated.pyx":6378 * continue * * counts[lab] += 1 # <<<<<<<<<<<<<< * val = values[i, 0] * */ __pyx_t_17 = __pyx_v_lab; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_counts.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_counts.diminfo[0].strides) += 1; /* "pandas/src/generated.pyx":6379 * * counts[lab] += 1 * val = values[i, 0] # <<<<<<<<<<<<<< * * # not nan */ __pyx_t_26 = __pyx_v_i; __pyx_t_27 = 0; __pyx_v_val = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_26, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_27, __pyx_pybuffernd_values.diminfo[1].strides)); /* "pandas/src/generated.pyx":6382 * * # not nan * if val == val: # <<<<<<<<<<<<<< * nobs[lab, 0] += 1 * if val < minx[lab, 0]: */ __pyx_t_3 = ((__pyx_v_val == __pyx_v_val) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":6383 * # not nan * if val == val: * nobs[lab, 0] += 1 # <<<<<<<<<<<<<< * if val < minx[lab, 0]: * minx[lab, 0] = val */ __pyx_t_28 = __pyx_v_lab; __pyx_t_29 = 0; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_nobs.rcbuffer->pybuffer.buf, __pyx_t_28, __pyx_pybuffernd_nobs.diminfo[0].strides, __pyx_t_29, __pyx_pybuffernd_nobs.diminfo[1].strides) += 1.0; /* "pandas/src/generated.pyx":6384 * if val == val: * nobs[lab, 0] += 1 * if val < minx[lab, 0]: # <<<<<<<<<<<<<< * minx[lab, 0] = val * */ __pyx_t_30 = __pyx_v_lab; __pyx_t_31 = 0; __pyx_t_3 = ((__pyx_v_val < (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_minx.rcbuffer->pybuffer.buf, __pyx_t_30, __pyx_pybuffernd_minx.diminfo[0].strides, __pyx_t_31, __pyx_pybuffernd_minx.diminfo[1].strides))) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":6385 * nobs[lab, 0] += 1 * if val < minx[lab, 0]: * minx[lab, 0] = val # <<<<<<<<<<<<<< * * for i in range(len(counts)): */ __pyx_t_32 = __pyx_v_lab; __pyx_t_33 = 0; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_minx.rcbuffer->pybuffer.buf, __pyx_t_32, __pyx_pybuffernd_minx.diminfo[0].strides, __pyx_t_33, __pyx_pybuffernd_minx.diminfo[1].strides) = __pyx_v_val; goto __pyx_L18; } __pyx_L18:; goto __pyx_L17; } __pyx_L17:; __pyx_L14_continue:; } } __pyx_L6:; /* "pandas/src/generated.pyx":6387 * minx[lab, 0] = val * * for i in range(len(counts)): # <<<<<<<<<<<<<< * for j in range(K): * if nobs[i, j] == 0: */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_counts)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6387; __pyx_clineno = __LINE__; goto __pyx_L1_error;} for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) { __pyx_v_i = __pyx_t_2; /* "pandas/src/generated.pyx":6388 * * for i in range(len(counts)): * for j in range(K): # <<<<<<<<<<<<<< * if nobs[i, j] == 0: * out[i, j] = nan */ __pyx_t_34 = __pyx_v_K; for (__pyx_t_35 = 0; __pyx_t_35 < __pyx_t_34; __pyx_t_35+=1) { __pyx_v_j = __pyx_t_35; /* "pandas/src/generated.pyx":6389 * for i in range(len(counts)): * for j in range(K): * if nobs[i, j] == 0: # <<<<<<<<<<<<<< * out[i, j] = nan * else: */ __pyx_t_36 = __pyx_v_i; __pyx_t_37 = __pyx_v_j; __pyx_t_3 = (((*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_nobs.rcbuffer->pybuffer.buf, __pyx_t_36, __pyx_pybuffernd_nobs.diminfo[0].strides, __pyx_t_37, __pyx_pybuffernd_nobs.diminfo[1].strides)) == 0.0) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":6390 * for j in range(K): * if nobs[i, j] == 0: * out[i, j] = nan # <<<<<<<<<<<<<< * else: * out[i, j] = minx[i, j] */ __pyx_t_38 = __pyx_v_i; __pyx_t_39 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_38, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_39, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_6pandas_5algos_nan; goto __pyx_L23; } /*else*/ { /* "pandas/src/generated.pyx":6392 * out[i, j] = nan * else: * out[i, j] = minx[i, j] # <<<<<<<<<<<<<< * @cython.wraparound(False) * @cython.boundscheck(False) */ __pyx_t_40 = __pyx_v_i; __pyx_t_41 = __pyx_v_j; __pyx_t_42 = __pyx_v_i; __pyx_t_43 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_42, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_43, __pyx_pybuffernd_out.diminfo[1].strides) = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_minx.rcbuffer->pybuffer.buf, __pyx_t_40, __pyx_pybuffernd_minx.diminfo[0].strides, __pyx_t_41, __pyx_pybuffernd_minx.diminfo[1].strides)); } __pyx_L23:; } } /* "pandas/src/generated.pyx":6335 * @cython.wraparound(False) * @cython.boundscheck(False) * def group_min_float64(ndarray[float64_t, ndim=2] out, # <<<<<<<<<<<<<< * ndarray[int64_t] counts, * ndarray[float64_t, ndim=2] values, */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_12); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_counts.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_labels.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_minx.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.group_min_float64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_counts.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_labels.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_minx.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_minx); __Pyx_XDECREF((PyObject *)__pyx_v_nobs); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":6395 * @cython.wraparound(False) * @cython.boundscheck(False) * def group_min_float32(ndarray[float32_t, ndim=2] out, # <<<<<<<<<<<<<< * ndarray[int64_t] counts, * ndarray[float32_t, ndim=2] values, */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_437group_min_float32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6pandas_5algos_436group_min_float32[] = "\n Only aggregates on axis=0\n "; static PyMethodDef __pyx_mdef_6pandas_5algos_437group_min_float32 = {__Pyx_NAMESTR("group_min_float32"), (PyCFunction)__pyx_pw_6pandas_5algos_437group_min_float32, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_5algos_436group_min_float32)}; static PyObject *__pyx_pw_6pandas_5algos_437group_min_float32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_out = 0; PyArrayObject *__pyx_v_counts = 0; PyArrayObject *__pyx_v_values = 0; PyArrayObject *__pyx_v_labels = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("group_min_float32 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_out,&__pyx_n_s_counts,&__pyx_n_s_values,&__pyx_n_s_labels,0}; PyObject* values[4] = {0,0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_out)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_counts)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("group_min_float32", 1, 4, 4, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6395; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_values)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("group_min_float32", 1, 4, 4, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6395; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_labels)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("group_min_float32", 1, 4, 4, 3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6395; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "group_min_float32") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6395; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 4) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[3] = PyTuple_GET_ITEM(__pyx_args, 3); } __pyx_v_out = ((PyArrayObject *)values[0]); __pyx_v_counts = ((PyArrayObject *)values[1]); __pyx_v_values = ((PyArrayObject *)values[2]); __pyx_v_labels = ((PyArrayObject *)values[3]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("group_min_float32", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6395; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.group_min_float32", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_5numpy_ndarray, 1, "out", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6395; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_counts), __pyx_ptype_5numpy_ndarray, 1, "counts", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6396; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6397; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_labels), __pyx_ptype_5numpy_ndarray, 1, "labels", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6398; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_436group_min_float32(__pyx_self, __pyx_v_out, __pyx_v_counts, __pyx_v_values, __pyx_v_labels); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5algos_436group_min_float32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_out, PyArrayObject *__pyx_v_counts, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_labels) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_N; Py_ssize_t __pyx_v_K; Py_ssize_t __pyx_v_lab; __pyx_t_5numpy_float32_t __pyx_v_val; PyArrayObject *__pyx_v_minx = 0; PyArrayObject *__pyx_v_nobs = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_counts; __Pyx_Buffer __pyx_pybuffer_counts; __Pyx_LocalBuf_ND __pyx_pybuffernd_labels; __Pyx_Buffer __pyx_pybuffer_labels; __Pyx_LocalBuf_ND __pyx_pybuffernd_minx; __Pyx_Buffer __pyx_pybuffer_minx; __Pyx_LocalBuf_ND __pyx_pybuffernd_nobs; __Pyx_Buffer __pyx_pybuffer_nobs; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_values; __Pyx_Buffer __pyx_pybuffer_values; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; Py_ssize_t __pyx_t_2; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyArrayObject *__pyx_t_7 = NULL; int __pyx_t_8; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; PyObject *__pyx_t_11 = NULL; PyObject *__pyx_t_12 = NULL; PyObject *(*__pyx_t_13)(PyObject *); 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; Py_ssize_t __pyx_t_26; long __pyx_t_27; Py_ssize_t __pyx_t_28; long __pyx_t_29; Py_ssize_t __pyx_t_30; long __pyx_t_31; Py_ssize_t __pyx_t_32; long __pyx_t_33; Py_ssize_t __pyx_t_34; Py_ssize_t __pyx_t_35; Py_ssize_t __pyx_t_36; Py_ssize_t __pyx_t_37; Py_ssize_t __pyx_t_38; Py_ssize_t __pyx_t_39; Py_ssize_t __pyx_t_40; Py_ssize_t __pyx_t_41; Py_ssize_t __pyx_t_42; Py_ssize_t __pyx_t_43; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("group_min_float32", 0); __pyx_pybuffer_minx.pybuffer.buf = NULL; __pyx_pybuffer_minx.refcount = 0; __pyx_pybuffernd_minx.data = NULL; __pyx_pybuffernd_minx.rcbuffer = &__pyx_pybuffer_minx; __pyx_pybuffer_nobs.pybuffer.buf = NULL; __pyx_pybuffer_nobs.refcount = 0; __pyx_pybuffernd_nobs.data = NULL; __pyx_pybuffernd_nobs.rcbuffer = &__pyx_pybuffer_nobs; __pyx_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; __pyx_pybuffer_counts.pybuffer.buf = NULL; __pyx_pybuffer_counts.refcount = 0; __pyx_pybuffernd_counts.data = NULL; __pyx_pybuffernd_counts.rcbuffer = &__pyx_pybuffer_counts; __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_labels.pybuffer.buf = NULL; __pyx_pybuffer_labels.refcount = 0; __pyx_pybuffernd_labels.data = NULL; __pyx_pybuffernd_labels.rcbuffer = &__pyx_pybuffer_labels; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_v_out, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6395; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; __pyx_pybuffernd_out.diminfo[1].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_out.diminfo[1].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[1]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_counts.rcbuffer->pybuffer, (PyObject*)__pyx_v_counts, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6395; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_counts.diminfo[0].strides = __pyx_pybuffernd_counts.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_counts.diminfo[0].shape = __pyx_pybuffernd_counts.rcbuffer->pybuffer.shape[0]; { __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_float32_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6395; __pyx_clineno = __LINE__; goto __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_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_labels.rcbuffer->pybuffer, (PyObject*)__pyx_v_labels, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6395; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_labels.diminfo[0].strides = __pyx_pybuffernd_labels.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_labels.diminfo[0].shape = __pyx_pybuffernd_labels.rcbuffer->pybuffer.shape[0]; /* "pandas/src/generated.pyx":6407 * ndarray[float32_t, ndim=2] minx, nobs * * if not len(values) == len(labels): # <<<<<<<<<<<<<< * raise AssertionError("len(index) != len(labels)") * */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6407; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_2 = PyObject_Length(((PyObject *)__pyx_v_labels)); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6407; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_3 = ((!((__pyx_t_1 == __pyx_t_2) != 0)) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":6408 * * if not len(values) == len(labels): * raise AssertionError("len(index) != len(labels)") # <<<<<<<<<<<<<< * * nobs = np.zeros_like(out) */ __pyx_t_4 = PyObject_Call(__pyx_builtin_AssertionError, __pyx_tuple__190, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6408; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 6408; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } /* "pandas/src/generated.pyx":6410 * raise AssertionError("len(index) != len(labels)") * * nobs = np.zeros_like(out) # <<<<<<<<<<<<<< * * minx = np.empty_like(out) */ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6410; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_zeros_like); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6410; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6410; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(((PyObject *)__pyx_v_out)); PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_v_out)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out)); __pyx_t_6 = PyObject_Call(__pyx_t_5, __pyx_t_4, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6410; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6410; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_7 = ((PyArrayObject *)__pyx_t_6); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer); __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_nobs.rcbuffer->pybuffer, (PyObject*)__pyx_v_nobs, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_pybuffernd_nobs.diminfo[0].strides = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_nobs.diminfo[0].shape = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_nobs.diminfo[1].strides = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_nobs.diminfo[1].shape = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.shape[1]; if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6410; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_7 = 0; __pyx_v_nobs = ((PyArrayObject *)__pyx_t_6); __pyx_t_6 = 0; /* "pandas/src/generated.pyx":6412 * nobs = np.zeros_like(out) * * minx = np.empty_like(out) # <<<<<<<<<<<<<< * minx.fill(np.inf) * */ __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6412; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_empty_like); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6412; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6412; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(((PyObject *)__pyx_v_out)); PyTuple_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_v_out)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out)); __pyx_t_5 = PyObject_Call(__pyx_t_4, __pyx_t_6, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6412; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6412; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_7 = ((PyArrayObject *)__pyx_t_5); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_minx.rcbuffer->pybuffer); __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_minx.rcbuffer->pybuffer, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_minx.rcbuffer->pybuffer, (PyObject*)__pyx_v_minx, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_pybuffernd_minx.diminfo[0].strides = __pyx_pybuffernd_minx.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_minx.diminfo[0].shape = __pyx_pybuffernd_minx.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_minx.diminfo[1].strides = __pyx_pybuffernd_minx.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_minx.diminfo[1].shape = __pyx_pybuffernd_minx.rcbuffer->pybuffer.shape[1]; if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6412; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_7 = 0; __pyx_v_minx = ((PyArrayObject *)__pyx_t_5); __pyx_t_5 = 0; /* "pandas/src/generated.pyx":6413 * * minx = np.empty_like(out) * minx.fill(np.inf) # <<<<<<<<<<<<<< * * N, K = ( values).shape */ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_minx), __pyx_n_s_fill); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6413; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6413; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_inf); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6413; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6413; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyObject_Call(__pyx_t_5, __pyx_t_6, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6413; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "pandas/src/generated.pyx":6415 * minx.fill(np.inf) * * N, K = ( values).shape # <<<<<<<<<<<<<< * * if K > 1: */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_values), __pyx_n_s_shape); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6415; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); if ((likely(PyTuple_CheckExact(__pyx_t_4))) || (PyList_CheckExact(__pyx_t_4))) { PyObject* sequence = __pyx_t_4; #if CYTHON_COMPILING_IN_CPYTHON Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6415; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_6 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_5 = PyTuple_GET_ITEM(sequence, 1); } else { __pyx_t_6 = PyList_GET_ITEM(sequence, 0); __pyx_t_5 = PyList_GET_ITEM(sequence, 1); } __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(__pyx_t_5); #else __pyx_t_6 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6415; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_5 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6415; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); #endif __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else { Py_ssize_t index = -1; __pyx_t_12 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6415; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_13 = Py_TYPE(__pyx_t_12)->tp_iternext; index = 0; __pyx_t_6 = __pyx_t_13(__pyx_t_12); if (unlikely(!__pyx_t_6)) goto __pyx_L4_unpacking_failed; __Pyx_GOTREF(__pyx_t_6); index = 1; __pyx_t_5 = __pyx_t_13(__pyx_t_12); if (unlikely(!__pyx_t_5)) goto __pyx_L4_unpacking_failed; __Pyx_GOTREF(__pyx_t_5); if (__Pyx_IternextUnpackEndCheck(__pyx_t_13(__pyx_t_12), 2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6415; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_13 = NULL; __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; goto __pyx_L5_unpacking_done; __pyx_L4_unpacking_failed:; __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __pyx_t_13 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6415; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_L5_unpacking_done:; } __pyx_t_2 = __Pyx_PyIndex_AsSsize_t(__pyx_t_6); if (unlikely((__pyx_t_2 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6415; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_1 = __Pyx_PyIndex_AsSsize_t(__pyx_t_5); if (unlikely((__pyx_t_1 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6415; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_v_N = __pyx_t_2; __pyx_v_K = __pyx_t_1; /* "pandas/src/generated.pyx":6417 * N, K = ( values).shape * * if K > 1: # <<<<<<<<<<<<<< * for i in range(N): * lab = labels[i] */ __pyx_t_3 = ((__pyx_v_K > 1) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":6418 * * if K > 1: * for i in range(N): # <<<<<<<<<<<<<< * lab = labels[i] * if lab < 0: */ __pyx_t_1 = __pyx_v_N; for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) { __pyx_v_i = __pyx_t_2; /* "pandas/src/generated.pyx":6419 * if K > 1: * for i in range(N): * lab = labels[i] # <<<<<<<<<<<<<< * if lab < 0: * continue */ __pyx_t_14 = __pyx_v_i; __pyx_v_lab = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_labels.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_labels.diminfo[0].strides)); /* "pandas/src/generated.pyx":6420 * for i in range(N): * lab = labels[i] * if lab < 0: # <<<<<<<<<<<<<< * continue * */ __pyx_t_3 = ((__pyx_v_lab < 0) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":6421 * lab = labels[i] * if lab < 0: * continue # <<<<<<<<<<<<<< * * counts[lab] += 1 */ goto __pyx_L7_continue; } /* "pandas/src/generated.pyx":6423 * continue * * counts[lab] += 1 # <<<<<<<<<<<<<< * for j in range(K): * val = values[i, j] */ __pyx_t_15 = __pyx_v_lab; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_counts.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_counts.diminfo[0].strides) += 1; /* "pandas/src/generated.pyx":6424 * * counts[lab] += 1 * for j in range(K): # <<<<<<<<<<<<<< * val = values[i, j] * */ __pyx_t_16 = __pyx_v_K; for (__pyx_t_17 = 0; __pyx_t_17 < __pyx_t_16; __pyx_t_17+=1) { __pyx_v_j = __pyx_t_17; /* "pandas/src/generated.pyx":6425 * counts[lab] += 1 * for j in range(K): * val = values[i, j] # <<<<<<<<<<<<<< * * # not nan */ __pyx_t_18 = __pyx_v_i; __pyx_t_19 = __pyx_v_j; __pyx_v_val = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_19, __pyx_pybuffernd_values.diminfo[1].strides)); /* "pandas/src/generated.pyx":6428 * * # not nan * if val == val: # <<<<<<<<<<<<<< * nobs[lab, j] += 1 * if val < minx[lab, j]: */ __pyx_t_3 = ((__pyx_v_val == __pyx_v_val) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":6429 * # not nan * if val == val: * nobs[lab, j] += 1 # <<<<<<<<<<<<<< * if val < minx[lab, j]: * minx[lab, j] = val */ __pyx_t_20 = __pyx_v_lab; __pyx_t_21 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_nobs.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_nobs.diminfo[0].strides, __pyx_t_21, __pyx_pybuffernd_nobs.diminfo[1].strides) += 1.0; /* "pandas/src/generated.pyx":6430 * if val == val: * nobs[lab, j] += 1 * if val < minx[lab, j]: # <<<<<<<<<<<<<< * minx[lab, j] = val * else: */ __pyx_t_22 = __pyx_v_lab; __pyx_t_23 = __pyx_v_j; __pyx_t_3 = ((__pyx_v_val < (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_minx.rcbuffer->pybuffer.buf, __pyx_t_22, __pyx_pybuffernd_minx.diminfo[0].strides, __pyx_t_23, __pyx_pybuffernd_minx.diminfo[1].strides))) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":6431 * nobs[lab, j] += 1 * if val < minx[lab, j]: * minx[lab, j] = val # <<<<<<<<<<<<<< * else: * for i in range(N): */ __pyx_t_24 = __pyx_v_lab; __pyx_t_25 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_minx.rcbuffer->pybuffer.buf, __pyx_t_24, __pyx_pybuffernd_minx.diminfo[0].strides, __pyx_t_25, __pyx_pybuffernd_minx.diminfo[1].strides) = __pyx_v_val; goto __pyx_L13; } __pyx_L13:; goto __pyx_L12; } __pyx_L12:; } __pyx_L7_continue:; } goto __pyx_L6; } /*else*/ { /* "pandas/src/generated.pyx":6433 * minx[lab, j] = val * else: * for i in range(N): # <<<<<<<<<<<<<< * lab = labels[i] * if lab < 0: */ __pyx_t_1 = __pyx_v_N; for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) { __pyx_v_i = __pyx_t_2; /* "pandas/src/generated.pyx":6434 * else: * for i in range(N): * lab = labels[i] # <<<<<<<<<<<<<< * if lab < 0: * continue */ __pyx_t_16 = __pyx_v_i; __pyx_v_lab = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_labels.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_labels.diminfo[0].strides)); /* "pandas/src/generated.pyx":6435 * for i in range(N): * lab = labels[i] * if lab < 0: # <<<<<<<<<<<<<< * continue * */ __pyx_t_3 = ((__pyx_v_lab < 0) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":6436 * lab = labels[i] * if lab < 0: * continue # <<<<<<<<<<<<<< * * counts[lab] += 1 */ goto __pyx_L14_continue; } /* "pandas/src/generated.pyx":6438 * continue * * counts[lab] += 1 # <<<<<<<<<<<<<< * val = values[i, 0] * */ __pyx_t_17 = __pyx_v_lab; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_counts.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_counts.diminfo[0].strides) += 1; /* "pandas/src/generated.pyx":6439 * * counts[lab] += 1 * val = values[i, 0] # <<<<<<<<<<<<<< * * # not nan */ __pyx_t_26 = __pyx_v_i; __pyx_t_27 = 0; __pyx_v_val = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_26, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_27, __pyx_pybuffernd_values.diminfo[1].strides)); /* "pandas/src/generated.pyx":6442 * * # not nan * if val == val: # <<<<<<<<<<<<<< * nobs[lab, 0] += 1 * if val < minx[lab, 0]: */ __pyx_t_3 = ((__pyx_v_val == __pyx_v_val) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":6443 * # not nan * if val == val: * nobs[lab, 0] += 1 # <<<<<<<<<<<<<< * if val < minx[lab, 0]: * minx[lab, 0] = val */ __pyx_t_28 = __pyx_v_lab; __pyx_t_29 = 0; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_nobs.rcbuffer->pybuffer.buf, __pyx_t_28, __pyx_pybuffernd_nobs.diminfo[0].strides, __pyx_t_29, __pyx_pybuffernd_nobs.diminfo[1].strides) += 1.0; /* "pandas/src/generated.pyx":6444 * if val == val: * nobs[lab, 0] += 1 * if val < minx[lab, 0]: # <<<<<<<<<<<<<< * minx[lab, 0] = val * */ __pyx_t_30 = __pyx_v_lab; __pyx_t_31 = 0; __pyx_t_3 = ((__pyx_v_val < (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_minx.rcbuffer->pybuffer.buf, __pyx_t_30, __pyx_pybuffernd_minx.diminfo[0].strides, __pyx_t_31, __pyx_pybuffernd_minx.diminfo[1].strides))) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":6445 * nobs[lab, 0] += 1 * if val < minx[lab, 0]: * minx[lab, 0] = val # <<<<<<<<<<<<<< * * for i in range(len(counts)): */ __pyx_t_32 = __pyx_v_lab; __pyx_t_33 = 0; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_minx.rcbuffer->pybuffer.buf, __pyx_t_32, __pyx_pybuffernd_minx.diminfo[0].strides, __pyx_t_33, __pyx_pybuffernd_minx.diminfo[1].strides) = __pyx_v_val; goto __pyx_L18; } __pyx_L18:; goto __pyx_L17; } __pyx_L17:; __pyx_L14_continue:; } } __pyx_L6:; /* "pandas/src/generated.pyx":6447 * minx[lab, 0] = val * * for i in range(len(counts)): # <<<<<<<<<<<<<< * for j in range(K): * if nobs[i, j] == 0: */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_counts)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6447; __pyx_clineno = __LINE__; goto __pyx_L1_error;} for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) { __pyx_v_i = __pyx_t_2; /* "pandas/src/generated.pyx":6448 * * for i in range(len(counts)): * for j in range(K): # <<<<<<<<<<<<<< * if nobs[i, j] == 0: * out[i, j] = nan */ __pyx_t_34 = __pyx_v_K; for (__pyx_t_35 = 0; __pyx_t_35 < __pyx_t_34; __pyx_t_35+=1) { __pyx_v_j = __pyx_t_35; /* "pandas/src/generated.pyx":6449 * for i in range(len(counts)): * for j in range(K): * if nobs[i, j] == 0: # <<<<<<<<<<<<<< * out[i, j] = nan * else: */ __pyx_t_36 = __pyx_v_i; __pyx_t_37 = __pyx_v_j; __pyx_t_3 = (((*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_nobs.rcbuffer->pybuffer.buf, __pyx_t_36, __pyx_pybuffernd_nobs.diminfo[0].strides, __pyx_t_37, __pyx_pybuffernd_nobs.diminfo[1].strides)) == 0.0) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":6450 * for j in range(K): * if nobs[i, j] == 0: * out[i, j] = nan # <<<<<<<<<<<<<< * else: * out[i, j] = minx[i, j] */ __pyx_t_38 = __pyx_v_i; __pyx_t_39 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_38, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_39, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_6pandas_5algos_nan; goto __pyx_L23; } /*else*/ { /* "pandas/src/generated.pyx":6452 * out[i, j] = nan * else: * out[i, j] = minx[i, j] # <<<<<<<<<<<<<< * * @cython.wraparound(False) */ __pyx_t_40 = __pyx_v_i; __pyx_t_41 = __pyx_v_j; __pyx_t_42 = __pyx_v_i; __pyx_t_43 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_42, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_43, __pyx_pybuffernd_out.diminfo[1].strides) = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_minx.rcbuffer->pybuffer.buf, __pyx_t_40, __pyx_pybuffernd_minx.diminfo[0].strides, __pyx_t_41, __pyx_pybuffernd_minx.diminfo[1].strides)); } __pyx_L23:; } } /* "pandas/src/generated.pyx":6395 * @cython.wraparound(False) * @cython.boundscheck(False) * def group_min_float32(ndarray[float32_t, ndim=2] out, # <<<<<<<<<<<<<< * ndarray[int64_t] counts, * ndarray[float32_t, ndim=2] values, */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_12); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_counts.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_labels.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_minx.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.group_min_float32", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_counts.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_labels.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_minx.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_minx); __Pyx_XDECREF((PyObject *)__pyx_v_nobs); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":6456 * @cython.wraparound(False) * @cython.boundscheck(False) * def group_min_bin_float64(ndarray[float64_t, ndim=2] out, # <<<<<<<<<<<<<< * ndarray[int64_t] counts, * ndarray[float64_t, ndim=2] values, */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_439group_min_bin_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6pandas_5algos_438group_min_bin_float64[] = "\n Only aggregates on axis=0\n "; static PyMethodDef __pyx_mdef_6pandas_5algos_439group_min_bin_float64 = {__Pyx_NAMESTR("group_min_bin_float64"), (PyCFunction)__pyx_pw_6pandas_5algos_439group_min_bin_float64, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_5algos_438group_min_bin_float64)}; static PyObject *__pyx_pw_6pandas_5algos_439group_min_bin_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_out = 0; PyArrayObject *__pyx_v_counts = 0; PyArrayObject *__pyx_v_values = 0; PyArrayObject *__pyx_v_bins = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("group_min_bin_float64 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_out,&__pyx_n_s_counts,&__pyx_n_s_values,&__pyx_n_s_bins,0}; PyObject* values[4] = {0,0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_out)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_counts)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("group_min_bin_float64", 1, 4, 4, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6456; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_values)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("group_min_bin_float64", 1, 4, 4, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6456; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_bins)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("group_min_bin_float64", 1, 4, 4, 3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6456; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "group_min_bin_float64") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6456; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 4) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[3] = PyTuple_GET_ITEM(__pyx_args, 3); } __pyx_v_out = ((PyArrayObject *)values[0]); __pyx_v_counts = ((PyArrayObject *)values[1]); __pyx_v_values = ((PyArrayObject *)values[2]); __pyx_v_bins = ((PyArrayObject *)values[3]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("group_min_bin_float64", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6456; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.group_min_bin_float64", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_5numpy_ndarray, 1, "out", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6456; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_counts), __pyx_ptype_5numpy_ndarray, 1, "counts", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6457; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6458; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_bins), __pyx_ptype_5numpy_ndarray, 1, "bins", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6459; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_438group_min_bin_float64(__pyx_self, __pyx_v_out, __pyx_v_counts, __pyx_v_values, __pyx_v_bins); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5algos_438group_min_bin_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_out, PyArrayObject *__pyx_v_counts, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_bins) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_N; Py_ssize_t __pyx_v_K; Py_ssize_t __pyx_v_ngroups; Py_ssize_t __pyx_v_b; __pyx_t_5numpy_float64_t __pyx_v_val; PyArrayObject *__pyx_v_minx = 0; PyArrayObject *__pyx_v_nobs = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_bins; __Pyx_Buffer __pyx_pybuffer_bins; __Pyx_LocalBuf_ND __pyx_pybuffernd_counts; __Pyx_Buffer __pyx_pybuffer_counts; __Pyx_LocalBuf_ND __pyx_pybuffernd_minx; __Pyx_Buffer __pyx_pybuffer_minx; __Pyx_LocalBuf_ND __pyx_pybuffernd_nobs; __Pyx_Buffer __pyx_pybuffer_nobs; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __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; PyArrayObject *__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; Py_ssize_t __pyx_t_11; int __pyx_t_12; PyObject *__pyx_t_13 = NULL; PyObject *(*__pyx_t_14)(PyObject *); Py_ssize_t __pyx_t_15; int __pyx_t_16; int __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; long __pyx_t_30; Py_ssize_t __pyx_t_31; long __pyx_t_32; Py_ssize_t __pyx_t_33; long __pyx_t_34; Py_ssize_t __pyx_t_35; long __pyx_t_36; Py_ssize_t __pyx_t_37; Py_ssize_t __pyx_t_38; Py_ssize_t __pyx_t_39; Py_ssize_t __pyx_t_40; Py_ssize_t __pyx_t_41; Py_ssize_t __pyx_t_42; Py_ssize_t __pyx_t_43; Py_ssize_t __pyx_t_44; Py_ssize_t __pyx_t_45; Py_ssize_t __pyx_t_46; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("group_min_bin_float64", 0); __pyx_pybuffer_minx.pybuffer.buf = NULL; __pyx_pybuffer_minx.refcount = 0; __pyx_pybuffernd_minx.data = NULL; __pyx_pybuffernd_minx.rcbuffer = &__pyx_pybuffer_minx; __pyx_pybuffer_nobs.pybuffer.buf = NULL; __pyx_pybuffer_nobs.refcount = 0; __pyx_pybuffernd_nobs.data = NULL; __pyx_pybuffernd_nobs.rcbuffer = &__pyx_pybuffer_nobs; __pyx_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; __pyx_pybuffer_counts.pybuffer.buf = NULL; __pyx_pybuffer_counts.refcount = 0; __pyx_pybuffernd_counts.data = NULL; __pyx_pybuffernd_counts.rcbuffer = &__pyx_pybuffer_counts; __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_bins.pybuffer.buf = NULL; __pyx_pybuffer_bins.refcount = 0; __pyx_pybuffernd_bins.data = NULL; __pyx_pybuffernd_bins.rcbuffer = &__pyx_pybuffer_bins; { __Pyx_BufFmt_StackElem __pyx_stack[1]; 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, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6456; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; __pyx_pybuffernd_out.diminfo[1].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_out.diminfo[1].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[1]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_counts.rcbuffer->pybuffer, (PyObject*)__pyx_v_counts, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6456; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_counts.diminfo[0].strides = __pyx_pybuffernd_counts.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_counts.diminfo[0].shape = __pyx_pybuffernd_counts.rcbuffer->pybuffer.shape[0]; { __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, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6456; __pyx_clineno = __LINE__; goto __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_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_bins.rcbuffer->pybuffer, (PyObject*)__pyx_v_bins, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6456; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_bins.diminfo[0].strides = __pyx_pybuffernd_bins.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_bins.diminfo[0].shape = __pyx_pybuffernd_bins.rcbuffer->pybuffer.shape[0]; /* "pandas/src/generated.pyx":6468 * ndarray[float64_t, ndim=2] minx, nobs * * nobs = np.zeros_like(out) # <<<<<<<<<<<<<< * * minx = np.empty_like(out) */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6468; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_zeros_like); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6468; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 6468; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)__pyx_v_out)); PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_out)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out)); __pyx_t_3 = PyObject_Call(__pyx_t_2, __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6468; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6468; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_4 = ((PyArrayObject *)__pyx_t_3); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer); __pyx_t_5 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer, (PyObject*)__pyx_t_4, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_nobs.rcbuffer->pybuffer, (PyObject*)__pyx_v_nobs, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_pybuffernd_nobs.diminfo[0].strides = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_nobs.diminfo[0].shape = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_nobs.diminfo[1].strides = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_nobs.diminfo[1].shape = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.shape[1]; if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6468; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_4 = 0; __pyx_v_nobs = ((PyArrayObject *)__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/generated.pyx":6470 * nobs = np.zeros_like(out) * * minx = np.empty_like(out) # <<<<<<<<<<<<<< * minx.fill(np.inf) * */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6470; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_empty_like); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6470; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6470; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(((PyObject *)__pyx_v_out)); PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_v_out)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out)); __pyx_t_2 = PyObject_Call(__pyx_t_1, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6470; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6470; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_4 = ((PyArrayObject *)__pyx_t_2); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_minx.rcbuffer->pybuffer); __pyx_t_5 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_minx.rcbuffer->pybuffer, (PyObject*)__pyx_t_4, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_minx.rcbuffer->pybuffer, (PyObject*)__pyx_v_minx, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_pybuffernd_minx.diminfo[0].strides = __pyx_pybuffernd_minx.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_minx.diminfo[0].shape = __pyx_pybuffernd_minx.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_minx.diminfo[1].strides = __pyx_pybuffernd_minx.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_minx.diminfo[1].shape = __pyx_pybuffernd_minx.rcbuffer->pybuffer.shape[1]; if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6470; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_4 = 0; __pyx_v_minx = ((PyArrayObject *)__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":6471 * * minx = np.empty_like(out) * minx.fill(np.inf) # <<<<<<<<<<<<<< * * if bins[len(bins) - 1] == len(values): */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_minx), __pyx_n_s_fill); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6471; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6471; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_inf); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6471; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6471; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyObject_Call(__pyx_t_2, __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6471; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/generated.pyx":6473 * minx.fill(np.inf) * * if bins[len(bins) - 1] == len(values): # <<<<<<<<<<<<<< * ngroups = len(bins) * else: */ __pyx_t_9 = PyObject_Length(((PyObject *)__pyx_v_bins)); if (unlikely(__pyx_t_9 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6473; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_10 = (__pyx_t_9 - 1); __pyx_t_11 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6473; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_12 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_bins.rcbuffer->pybuffer.buf, __pyx_t_10, __pyx_pybuffernd_bins.diminfo[0].strides)) == __pyx_t_11) != 0); if (__pyx_t_12) { /* "pandas/src/generated.pyx":6474 * * if bins[len(bins) - 1] == len(values): * ngroups = len(bins) # <<<<<<<<<<<<<< * else: * ngroups = len(bins) + 1 */ __pyx_t_11 = PyObject_Length(((PyObject *)__pyx_v_bins)); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6474; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_ngroups = __pyx_t_11; goto __pyx_L3; } /*else*/ { /* "pandas/src/generated.pyx":6476 * ngroups = len(bins) * else: * ngroups = len(bins) + 1 # <<<<<<<<<<<<<< * * N, K = ( values).shape */ __pyx_t_11 = PyObject_Length(((PyObject *)__pyx_v_bins)); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6476; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_ngroups = (__pyx_t_11 + 1); } __pyx_L3:; /* "pandas/src/generated.pyx":6478 * ngroups = len(bins) + 1 * * N, K = ( values).shape # <<<<<<<<<<<<<< * * b = 0 */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_values), __pyx_n_s_shape); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6478; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) { PyObject* sequence = __pyx_t_1; #if CYTHON_COMPILING_IN_CPYTHON Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6478; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_2 = PyTuple_GET_ITEM(sequence, 1); } else { __pyx_t_3 = PyList_GET_ITEM(sequence, 0); __pyx_t_2 = PyList_GET_ITEM(sequence, 1); } __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(__pyx_t_2); #else __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6478; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6478; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } else { Py_ssize_t index = -1; __pyx_t_13 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6478; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_14 = Py_TYPE(__pyx_t_13)->tp_iternext; index = 0; __pyx_t_3 = __pyx_t_14(__pyx_t_13); if (unlikely(!__pyx_t_3)) goto __pyx_L4_unpacking_failed; __Pyx_GOTREF(__pyx_t_3); index = 1; __pyx_t_2 = __pyx_t_14(__pyx_t_13); if (unlikely(!__pyx_t_2)) goto __pyx_L4_unpacking_failed; __Pyx_GOTREF(__pyx_t_2); if (__Pyx_IternextUnpackEndCheck(__pyx_t_14(__pyx_t_13), 2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6478; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_14 = NULL; __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; goto __pyx_L5_unpacking_done; __pyx_L4_unpacking_failed:; __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_14 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6478; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_L5_unpacking_done:; } __pyx_t_11 = __Pyx_PyIndex_AsSsize_t(__pyx_t_3); if (unlikely((__pyx_t_11 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6478; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_9 = __Pyx_PyIndex_AsSsize_t(__pyx_t_2); if (unlikely((__pyx_t_9 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6478; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_N = __pyx_t_11; __pyx_v_K = __pyx_t_9; /* "pandas/src/generated.pyx":6480 * N, K = ( values).shape * * b = 0 # <<<<<<<<<<<<<< * if K > 1: * for i in range(N): */ __pyx_v_b = 0; /* "pandas/src/generated.pyx":6481 * * b = 0 * if K > 1: # <<<<<<<<<<<<<< * for i in range(N): * while b < ngroups - 1 and i >= bins[b]: */ __pyx_t_12 = ((__pyx_v_K > 1) != 0); if (__pyx_t_12) { /* "pandas/src/generated.pyx":6482 * b = 0 * if K > 1: * for i in range(N): # <<<<<<<<<<<<<< * while b < ngroups - 1 and i >= bins[b]: * b += 1 */ __pyx_t_9 = __pyx_v_N; for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_9; __pyx_t_11+=1) { __pyx_v_i = __pyx_t_11; /* "pandas/src/generated.pyx":6483 * if K > 1: * for i in range(N): * while b < ngroups - 1 and i >= bins[b]: # <<<<<<<<<<<<<< * b += 1 * */ while (1) { __pyx_t_12 = ((__pyx_v_b < (__pyx_v_ngroups - 1)) != 0); if (__pyx_t_12) { __pyx_t_15 = __pyx_v_b; __pyx_t_16 = ((__pyx_v_i >= (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_bins.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_bins.diminfo[0].strides))) != 0); __pyx_t_17 = __pyx_t_16; } else { __pyx_t_17 = __pyx_t_12; } if (!__pyx_t_17) break; /* "pandas/src/generated.pyx":6484 * for i in range(N): * while b < ngroups - 1 and i >= bins[b]: * b += 1 # <<<<<<<<<<<<<< * * counts[b] += 1 */ __pyx_v_b = (__pyx_v_b + 1); } /* "pandas/src/generated.pyx":6486 * b += 1 * * counts[b] += 1 # <<<<<<<<<<<<<< * for j in range(K): * val = values[i, j] */ __pyx_t_18 = __pyx_v_b; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_counts.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_counts.diminfo[0].strides) += 1; /* "pandas/src/generated.pyx":6487 * * counts[b] += 1 * for j in range(K): # <<<<<<<<<<<<<< * val = values[i, j] * */ __pyx_t_19 = __pyx_v_K; for (__pyx_t_20 = 0; __pyx_t_20 < __pyx_t_19; __pyx_t_20+=1) { __pyx_v_j = __pyx_t_20; /* "pandas/src/generated.pyx":6488 * counts[b] += 1 * for j in range(K): * val = values[i, j] # <<<<<<<<<<<<<< * * # not nan */ __pyx_t_21 = __pyx_v_i; __pyx_t_22 = __pyx_v_j; __pyx_v_val = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_22, __pyx_pybuffernd_values.diminfo[1].strides)); /* "pandas/src/generated.pyx":6491 * * # not nan * if val == val: # <<<<<<<<<<<<<< * nobs[b, j] += 1 * if val < minx[b, j]: */ __pyx_t_17 = ((__pyx_v_val == __pyx_v_val) != 0); if (__pyx_t_17) { /* "pandas/src/generated.pyx":6492 * # not nan * if val == val: * nobs[b, j] += 1 # <<<<<<<<<<<<<< * if val < minx[b, j]: * minx[b, j] = val */ __pyx_t_23 = __pyx_v_b; __pyx_t_24 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_nobs.rcbuffer->pybuffer.buf, __pyx_t_23, __pyx_pybuffernd_nobs.diminfo[0].strides, __pyx_t_24, __pyx_pybuffernd_nobs.diminfo[1].strides) += 1.0; /* "pandas/src/generated.pyx":6493 * if val == val: * nobs[b, j] += 1 * if val < minx[b, j]: # <<<<<<<<<<<<<< * minx[b, j] = val * else: */ __pyx_t_25 = __pyx_v_b; __pyx_t_26 = __pyx_v_j; __pyx_t_17 = ((__pyx_v_val < (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_minx.rcbuffer->pybuffer.buf, __pyx_t_25, __pyx_pybuffernd_minx.diminfo[0].strides, __pyx_t_26, __pyx_pybuffernd_minx.diminfo[1].strides))) != 0); if (__pyx_t_17) { /* "pandas/src/generated.pyx":6494 * nobs[b, j] += 1 * if val < minx[b, j]: * minx[b, j] = val # <<<<<<<<<<<<<< * else: * for i in range(N): */ __pyx_t_27 = __pyx_v_b; __pyx_t_28 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_minx.rcbuffer->pybuffer.buf, __pyx_t_27, __pyx_pybuffernd_minx.diminfo[0].strides, __pyx_t_28, __pyx_pybuffernd_minx.diminfo[1].strides) = __pyx_v_val; goto __pyx_L14; } __pyx_L14:; goto __pyx_L13; } __pyx_L13:; } } goto __pyx_L6; } /*else*/ { /* "pandas/src/generated.pyx":6496 * minx[b, j] = val * else: * for i in range(N): # <<<<<<<<<<<<<< * while b < ngroups - 1 and i >= bins[b]: * b += 1 */ __pyx_t_9 = __pyx_v_N; for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_9; __pyx_t_11+=1) { __pyx_v_i = __pyx_t_11; /* "pandas/src/generated.pyx":6497 * else: * for i in range(N): * while b < ngroups - 1 and i >= bins[b]: # <<<<<<<<<<<<<< * b += 1 * */ while (1) { __pyx_t_17 = ((__pyx_v_b < (__pyx_v_ngroups - 1)) != 0); if (__pyx_t_17) { __pyx_t_19 = __pyx_v_b; __pyx_t_12 = ((__pyx_v_i >= (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_bins.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_bins.diminfo[0].strides))) != 0); __pyx_t_16 = __pyx_t_12; } else { __pyx_t_16 = __pyx_t_17; } if (!__pyx_t_16) break; /* "pandas/src/generated.pyx":6498 * for i in range(N): * while b < ngroups - 1 and i >= bins[b]: * b += 1 # <<<<<<<<<<<<<< * * counts[b] += 1 */ __pyx_v_b = (__pyx_v_b + 1); } /* "pandas/src/generated.pyx":6500 * b += 1 * * counts[b] += 1 # <<<<<<<<<<<<<< * val = values[i, 0] * */ __pyx_t_20 = __pyx_v_b; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_counts.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_counts.diminfo[0].strides) += 1; /* "pandas/src/generated.pyx":6501 * * counts[b] += 1 * val = values[i, 0] # <<<<<<<<<<<<<< * * # not nan */ __pyx_t_29 = __pyx_v_i; __pyx_t_30 = 0; __pyx_v_val = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_29, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_30, __pyx_pybuffernd_values.diminfo[1].strides)); /* "pandas/src/generated.pyx":6504 * * # not nan * if val == val: # <<<<<<<<<<<<<< * nobs[b, 0] += 1 * if val < minx[b, 0]: */ __pyx_t_16 = ((__pyx_v_val == __pyx_v_val) != 0); if (__pyx_t_16) { /* "pandas/src/generated.pyx":6505 * # not nan * if val == val: * nobs[b, 0] += 1 # <<<<<<<<<<<<<< * if val < minx[b, 0]: * minx[b, 0] = val */ __pyx_t_31 = __pyx_v_b; __pyx_t_32 = 0; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_nobs.rcbuffer->pybuffer.buf, __pyx_t_31, __pyx_pybuffernd_nobs.diminfo[0].strides, __pyx_t_32, __pyx_pybuffernd_nobs.diminfo[1].strides) += 1.0; /* "pandas/src/generated.pyx":6506 * if val == val: * nobs[b, 0] += 1 * if val < minx[b, 0]: # <<<<<<<<<<<<<< * minx[b, 0] = val * */ __pyx_t_33 = __pyx_v_b; __pyx_t_34 = 0; __pyx_t_16 = ((__pyx_v_val < (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_minx.rcbuffer->pybuffer.buf, __pyx_t_33, __pyx_pybuffernd_minx.diminfo[0].strides, __pyx_t_34, __pyx_pybuffernd_minx.diminfo[1].strides))) != 0); if (__pyx_t_16) { /* "pandas/src/generated.pyx":6507 * nobs[b, 0] += 1 * if val < minx[b, 0]: * minx[b, 0] = val # <<<<<<<<<<<<<< * * for i in range(ngroups): */ __pyx_t_35 = __pyx_v_b; __pyx_t_36 = 0; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_minx.rcbuffer->pybuffer.buf, __pyx_t_35, __pyx_pybuffernd_minx.diminfo[0].strides, __pyx_t_36, __pyx_pybuffernd_minx.diminfo[1].strides) = __pyx_v_val; goto __pyx_L20; } __pyx_L20:; goto __pyx_L19; } __pyx_L19:; } } __pyx_L6:; /* "pandas/src/generated.pyx":6509 * minx[b, 0] = val * * for i in range(ngroups): # <<<<<<<<<<<<<< * for j in range(K): * if nobs[i, j] == 0: */ __pyx_t_9 = __pyx_v_ngroups; for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_9; __pyx_t_11+=1) { __pyx_v_i = __pyx_t_11; /* "pandas/src/generated.pyx":6510 * * for i in range(ngroups): * for j in range(K): # <<<<<<<<<<<<<< * if nobs[i, j] == 0: * out[i, j] = nan */ __pyx_t_37 = __pyx_v_K; for (__pyx_t_38 = 0; __pyx_t_38 < __pyx_t_37; __pyx_t_38+=1) { __pyx_v_j = __pyx_t_38; /* "pandas/src/generated.pyx":6511 * for i in range(ngroups): * for j in range(K): * if nobs[i, j] == 0: # <<<<<<<<<<<<<< * out[i, j] = nan * else: */ __pyx_t_39 = __pyx_v_i; __pyx_t_40 = __pyx_v_j; __pyx_t_16 = (((*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_nobs.rcbuffer->pybuffer.buf, __pyx_t_39, __pyx_pybuffernd_nobs.diminfo[0].strides, __pyx_t_40, __pyx_pybuffernd_nobs.diminfo[1].strides)) == 0.0) != 0); if (__pyx_t_16) { /* "pandas/src/generated.pyx":6512 * for j in range(K): * if nobs[i, j] == 0: * out[i, j] = nan # <<<<<<<<<<<<<< * else: * out[i, j] = minx[i, j] */ __pyx_t_41 = __pyx_v_i; __pyx_t_42 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_41, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_42, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_6pandas_5algos_nan; goto __pyx_L25; } /*else*/ { /* "pandas/src/generated.pyx":6514 * out[i, j] = nan * else: * out[i, j] = minx[i, j] # <<<<<<<<<<<<<< * @cython.wraparound(False) * @cython.boundscheck(False) */ __pyx_t_43 = __pyx_v_i; __pyx_t_44 = __pyx_v_j; __pyx_t_45 = __pyx_v_i; __pyx_t_46 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_45, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_46, __pyx_pybuffernd_out.diminfo[1].strides) = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_minx.rcbuffer->pybuffer.buf, __pyx_t_43, __pyx_pybuffernd_minx.diminfo[0].strides, __pyx_t_44, __pyx_pybuffernd_minx.diminfo[1].strides)); } __pyx_L25:; } } /* "pandas/src/generated.pyx":6456 * @cython.wraparound(False) * @cython.boundscheck(False) * def group_min_bin_float64(ndarray[float64_t, ndim=2] out, # <<<<<<<<<<<<<< * ndarray[int64_t] counts, * ndarray[float64_t, ndim=2] 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_13); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_bins.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_counts.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_minx.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.group_min_bin_float64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_bins.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_counts.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_minx.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_minx); __Pyx_XDECREF((PyObject *)__pyx_v_nobs); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":6517 * @cython.wraparound(False) * @cython.boundscheck(False) * def group_min_bin_float32(ndarray[float32_t, ndim=2] out, # <<<<<<<<<<<<<< * ndarray[int64_t] counts, * ndarray[float32_t, ndim=2] values, */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_441group_min_bin_float32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6pandas_5algos_440group_min_bin_float32[] = "\n Only aggregates on axis=0\n "; static PyMethodDef __pyx_mdef_6pandas_5algos_441group_min_bin_float32 = {__Pyx_NAMESTR("group_min_bin_float32"), (PyCFunction)__pyx_pw_6pandas_5algos_441group_min_bin_float32, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_5algos_440group_min_bin_float32)}; static PyObject *__pyx_pw_6pandas_5algos_441group_min_bin_float32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_out = 0; PyArrayObject *__pyx_v_counts = 0; PyArrayObject *__pyx_v_values = 0; PyArrayObject *__pyx_v_bins = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("group_min_bin_float32 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_out,&__pyx_n_s_counts,&__pyx_n_s_values,&__pyx_n_s_bins,0}; PyObject* values[4] = {0,0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_out)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_counts)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("group_min_bin_float32", 1, 4, 4, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6517; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_values)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("group_min_bin_float32", 1, 4, 4, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6517; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_bins)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("group_min_bin_float32", 1, 4, 4, 3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6517; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "group_min_bin_float32") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6517; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 4) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[3] = PyTuple_GET_ITEM(__pyx_args, 3); } __pyx_v_out = ((PyArrayObject *)values[0]); __pyx_v_counts = ((PyArrayObject *)values[1]); __pyx_v_values = ((PyArrayObject *)values[2]); __pyx_v_bins = ((PyArrayObject *)values[3]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("group_min_bin_float32", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6517; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.group_min_bin_float32", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_5numpy_ndarray, 1, "out", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6517; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_counts), __pyx_ptype_5numpy_ndarray, 1, "counts", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6518; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6519; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_bins), __pyx_ptype_5numpy_ndarray, 1, "bins", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6520; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_440group_min_bin_float32(__pyx_self, __pyx_v_out, __pyx_v_counts, __pyx_v_values, __pyx_v_bins); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5algos_440group_min_bin_float32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_out, PyArrayObject *__pyx_v_counts, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_bins) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_N; Py_ssize_t __pyx_v_K; Py_ssize_t __pyx_v_ngroups; Py_ssize_t __pyx_v_b; __pyx_t_5numpy_float32_t __pyx_v_val; PyArrayObject *__pyx_v_minx = 0; PyArrayObject *__pyx_v_nobs = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_bins; __Pyx_Buffer __pyx_pybuffer_bins; __Pyx_LocalBuf_ND __pyx_pybuffernd_counts; __Pyx_Buffer __pyx_pybuffer_counts; __Pyx_LocalBuf_ND __pyx_pybuffernd_minx; __Pyx_Buffer __pyx_pybuffer_minx; __Pyx_LocalBuf_ND __pyx_pybuffernd_nobs; __Pyx_Buffer __pyx_pybuffer_nobs; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __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; PyArrayObject *__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; Py_ssize_t __pyx_t_11; int __pyx_t_12; PyObject *__pyx_t_13 = NULL; PyObject *(*__pyx_t_14)(PyObject *); Py_ssize_t __pyx_t_15; int __pyx_t_16; int __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; long __pyx_t_30; Py_ssize_t __pyx_t_31; long __pyx_t_32; Py_ssize_t __pyx_t_33; long __pyx_t_34; Py_ssize_t __pyx_t_35; long __pyx_t_36; Py_ssize_t __pyx_t_37; Py_ssize_t __pyx_t_38; Py_ssize_t __pyx_t_39; Py_ssize_t __pyx_t_40; Py_ssize_t __pyx_t_41; Py_ssize_t __pyx_t_42; Py_ssize_t __pyx_t_43; Py_ssize_t __pyx_t_44; Py_ssize_t __pyx_t_45; Py_ssize_t __pyx_t_46; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("group_min_bin_float32", 0); __pyx_pybuffer_minx.pybuffer.buf = NULL; __pyx_pybuffer_minx.refcount = 0; __pyx_pybuffernd_minx.data = NULL; __pyx_pybuffernd_minx.rcbuffer = &__pyx_pybuffer_minx; __pyx_pybuffer_nobs.pybuffer.buf = NULL; __pyx_pybuffer_nobs.refcount = 0; __pyx_pybuffernd_nobs.data = NULL; __pyx_pybuffernd_nobs.rcbuffer = &__pyx_pybuffer_nobs; __pyx_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; __pyx_pybuffer_counts.pybuffer.buf = NULL; __pyx_pybuffer_counts.refcount = 0; __pyx_pybuffernd_counts.data = NULL; __pyx_pybuffernd_counts.rcbuffer = &__pyx_pybuffer_counts; __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_bins.pybuffer.buf = NULL; __pyx_pybuffer_bins.refcount = 0; __pyx_pybuffernd_bins.data = NULL; __pyx_pybuffernd_bins.rcbuffer = &__pyx_pybuffer_bins; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_v_out, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6517; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; __pyx_pybuffernd_out.diminfo[1].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_out.diminfo[1].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[1]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_counts.rcbuffer->pybuffer, (PyObject*)__pyx_v_counts, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6517; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_counts.diminfo[0].strides = __pyx_pybuffernd_counts.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_counts.diminfo[0].shape = __pyx_pybuffernd_counts.rcbuffer->pybuffer.shape[0]; { __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_float32_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6517; __pyx_clineno = __LINE__; goto __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_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_bins.rcbuffer->pybuffer, (PyObject*)__pyx_v_bins, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6517; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_bins.diminfo[0].strides = __pyx_pybuffernd_bins.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_bins.diminfo[0].shape = __pyx_pybuffernd_bins.rcbuffer->pybuffer.shape[0]; /* "pandas/src/generated.pyx":6529 * ndarray[float32_t, ndim=2] minx, nobs * * nobs = np.zeros_like(out) # <<<<<<<<<<<<<< * * minx = np.empty_like(out) */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6529; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_zeros_like); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6529; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 6529; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)__pyx_v_out)); PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_out)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out)); __pyx_t_3 = PyObject_Call(__pyx_t_2, __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6529; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6529; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_4 = ((PyArrayObject *)__pyx_t_3); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer); __pyx_t_5 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer, (PyObject*)__pyx_t_4, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_nobs.rcbuffer->pybuffer, (PyObject*)__pyx_v_nobs, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_pybuffernd_nobs.diminfo[0].strides = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_nobs.diminfo[0].shape = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_nobs.diminfo[1].strides = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_nobs.diminfo[1].shape = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.shape[1]; if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6529; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_4 = 0; __pyx_v_nobs = ((PyArrayObject *)__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/generated.pyx":6531 * nobs = np.zeros_like(out) * * minx = np.empty_like(out) # <<<<<<<<<<<<<< * minx.fill(np.inf) * */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6531; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_empty_like); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6531; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6531; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(((PyObject *)__pyx_v_out)); PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_v_out)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out)); __pyx_t_2 = PyObject_Call(__pyx_t_1, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6531; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6531; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_4 = ((PyArrayObject *)__pyx_t_2); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_minx.rcbuffer->pybuffer); __pyx_t_5 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_minx.rcbuffer->pybuffer, (PyObject*)__pyx_t_4, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_minx.rcbuffer->pybuffer, (PyObject*)__pyx_v_minx, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_pybuffernd_minx.diminfo[0].strides = __pyx_pybuffernd_minx.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_minx.diminfo[0].shape = __pyx_pybuffernd_minx.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_minx.diminfo[1].strides = __pyx_pybuffernd_minx.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_minx.diminfo[1].shape = __pyx_pybuffernd_minx.rcbuffer->pybuffer.shape[1]; if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6531; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_4 = 0; __pyx_v_minx = ((PyArrayObject *)__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":6532 * * minx = np.empty_like(out) * minx.fill(np.inf) # <<<<<<<<<<<<<< * * if bins[len(bins) - 1] == len(values): */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_minx), __pyx_n_s_fill); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6532; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6532; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_inf); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6532; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6532; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyObject_Call(__pyx_t_2, __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6532; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/generated.pyx":6534 * minx.fill(np.inf) * * if bins[len(bins) - 1] == len(values): # <<<<<<<<<<<<<< * ngroups = len(bins) * else: */ __pyx_t_9 = PyObject_Length(((PyObject *)__pyx_v_bins)); if (unlikely(__pyx_t_9 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6534; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_10 = (__pyx_t_9 - 1); __pyx_t_11 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6534; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_12 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_bins.rcbuffer->pybuffer.buf, __pyx_t_10, __pyx_pybuffernd_bins.diminfo[0].strides)) == __pyx_t_11) != 0); if (__pyx_t_12) { /* "pandas/src/generated.pyx":6535 * * if bins[len(bins) - 1] == len(values): * ngroups = len(bins) # <<<<<<<<<<<<<< * else: * ngroups = len(bins) + 1 */ __pyx_t_11 = PyObject_Length(((PyObject *)__pyx_v_bins)); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6535; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_ngroups = __pyx_t_11; goto __pyx_L3; } /*else*/ { /* "pandas/src/generated.pyx":6537 * ngroups = len(bins) * else: * ngroups = len(bins) + 1 # <<<<<<<<<<<<<< * * N, K = ( values).shape */ __pyx_t_11 = PyObject_Length(((PyObject *)__pyx_v_bins)); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6537; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_ngroups = (__pyx_t_11 + 1); } __pyx_L3:; /* "pandas/src/generated.pyx":6539 * ngroups = len(bins) + 1 * * N, K = ( values).shape # <<<<<<<<<<<<<< * * b = 0 */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_values), __pyx_n_s_shape); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6539; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) { PyObject* sequence = __pyx_t_1; #if CYTHON_COMPILING_IN_CPYTHON Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6539; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_2 = PyTuple_GET_ITEM(sequence, 1); } else { __pyx_t_3 = PyList_GET_ITEM(sequence, 0); __pyx_t_2 = PyList_GET_ITEM(sequence, 1); } __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(__pyx_t_2); #else __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6539; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6539; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } else { Py_ssize_t index = -1; __pyx_t_13 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6539; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_14 = Py_TYPE(__pyx_t_13)->tp_iternext; index = 0; __pyx_t_3 = __pyx_t_14(__pyx_t_13); if (unlikely(!__pyx_t_3)) goto __pyx_L4_unpacking_failed; __Pyx_GOTREF(__pyx_t_3); index = 1; __pyx_t_2 = __pyx_t_14(__pyx_t_13); if (unlikely(!__pyx_t_2)) goto __pyx_L4_unpacking_failed; __Pyx_GOTREF(__pyx_t_2); if (__Pyx_IternextUnpackEndCheck(__pyx_t_14(__pyx_t_13), 2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6539; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_14 = NULL; __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; goto __pyx_L5_unpacking_done; __pyx_L4_unpacking_failed:; __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_14 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6539; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_L5_unpacking_done:; } __pyx_t_11 = __Pyx_PyIndex_AsSsize_t(__pyx_t_3); if (unlikely((__pyx_t_11 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6539; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_9 = __Pyx_PyIndex_AsSsize_t(__pyx_t_2); if (unlikely((__pyx_t_9 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6539; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_N = __pyx_t_11; __pyx_v_K = __pyx_t_9; /* "pandas/src/generated.pyx":6541 * N, K = ( values).shape * * b = 0 # <<<<<<<<<<<<<< * if K > 1: * for i in range(N): */ __pyx_v_b = 0; /* "pandas/src/generated.pyx":6542 * * b = 0 * if K > 1: # <<<<<<<<<<<<<< * for i in range(N): * while b < ngroups - 1 and i >= bins[b]: */ __pyx_t_12 = ((__pyx_v_K > 1) != 0); if (__pyx_t_12) { /* "pandas/src/generated.pyx":6543 * b = 0 * if K > 1: * for i in range(N): # <<<<<<<<<<<<<< * while b < ngroups - 1 and i >= bins[b]: * b += 1 */ __pyx_t_9 = __pyx_v_N; for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_9; __pyx_t_11+=1) { __pyx_v_i = __pyx_t_11; /* "pandas/src/generated.pyx":6544 * if K > 1: * for i in range(N): * while b < ngroups - 1 and i >= bins[b]: # <<<<<<<<<<<<<< * b += 1 * */ while (1) { __pyx_t_12 = ((__pyx_v_b < (__pyx_v_ngroups - 1)) != 0); if (__pyx_t_12) { __pyx_t_15 = __pyx_v_b; __pyx_t_16 = ((__pyx_v_i >= (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_bins.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_bins.diminfo[0].strides))) != 0); __pyx_t_17 = __pyx_t_16; } else { __pyx_t_17 = __pyx_t_12; } if (!__pyx_t_17) break; /* "pandas/src/generated.pyx":6545 * for i in range(N): * while b < ngroups - 1 and i >= bins[b]: * b += 1 # <<<<<<<<<<<<<< * * counts[b] += 1 */ __pyx_v_b = (__pyx_v_b + 1); } /* "pandas/src/generated.pyx":6547 * b += 1 * * counts[b] += 1 # <<<<<<<<<<<<<< * for j in range(K): * val = values[i, j] */ __pyx_t_18 = __pyx_v_b; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_counts.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_counts.diminfo[0].strides) += 1; /* "pandas/src/generated.pyx":6548 * * counts[b] += 1 * for j in range(K): # <<<<<<<<<<<<<< * val = values[i, j] * */ __pyx_t_19 = __pyx_v_K; for (__pyx_t_20 = 0; __pyx_t_20 < __pyx_t_19; __pyx_t_20+=1) { __pyx_v_j = __pyx_t_20; /* "pandas/src/generated.pyx":6549 * counts[b] += 1 * for j in range(K): * val = values[i, j] # <<<<<<<<<<<<<< * * # not nan */ __pyx_t_21 = __pyx_v_i; __pyx_t_22 = __pyx_v_j; __pyx_v_val = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_22, __pyx_pybuffernd_values.diminfo[1].strides)); /* "pandas/src/generated.pyx":6552 * * # not nan * if val == val: # <<<<<<<<<<<<<< * nobs[b, j] += 1 * if val < minx[b, j]: */ __pyx_t_17 = ((__pyx_v_val == __pyx_v_val) != 0); if (__pyx_t_17) { /* "pandas/src/generated.pyx":6553 * # not nan * if val == val: * nobs[b, j] += 1 # <<<<<<<<<<<<<< * if val < minx[b, j]: * minx[b, j] = val */ __pyx_t_23 = __pyx_v_b; __pyx_t_24 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_nobs.rcbuffer->pybuffer.buf, __pyx_t_23, __pyx_pybuffernd_nobs.diminfo[0].strides, __pyx_t_24, __pyx_pybuffernd_nobs.diminfo[1].strides) += 1.0; /* "pandas/src/generated.pyx":6554 * if val == val: * nobs[b, j] += 1 * if val < minx[b, j]: # <<<<<<<<<<<<<< * minx[b, j] = val * else: */ __pyx_t_25 = __pyx_v_b; __pyx_t_26 = __pyx_v_j; __pyx_t_17 = ((__pyx_v_val < (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_minx.rcbuffer->pybuffer.buf, __pyx_t_25, __pyx_pybuffernd_minx.diminfo[0].strides, __pyx_t_26, __pyx_pybuffernd_minx.diminfo[1].strides))) != 0); if (__pyx_t_17) { /* "pandas/src/generated.pyx":6555 * nobs[b, j] += 1 * if val < minx[b, j]: * minx[b, j] = val # <<<<<<<<<<<<<< * else: * for i in range(N): */ __pyx_t_27 = __pyx_v_b; __pyx_t_28 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_minx.rcbuffer->pybuffer.buf, __pyx_t_27, __pyx_pybuffernd_minx.diminfo[0].strides, __pyx_t_28, __pyx_pybuffernd_minx.diminfo[1].strides) = __pyx_v_val; goto __pyx_L14; } __pyx_L14:; goto __pyx_L13; } __pyx_L13:; } } goto __pyx_L6; } /*else*/ { /* "pandas/src/generated.pyx":6557 * minx[b, j] = val * else: * for i in range(N): # <<<<<<<<<<<<<< * while b < ngroups - 1 and i >= bins[b]: * b += 1 */ __pyx_t_9 = __pyx_v_N; for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_9; __pyx_t_11+=1) { __pyx_v_i = __pyx_t_11; /* "pandas/src/generated.pyx":6558 * else: * for i in range(N): * while b < ngroups - 1 and i >= bins[b]: # <<<<<<<<<<<<<< * b += 1 * */ while (1) { __pyx_t_17 = ((__pyx_v_b < (__pyx_v_ngroups - 1)) != 0); if (__pyx_t_17) { __pyx_t_19 = __pyx_v_b; __pyx_t_12 = ((__pyx_v_i >= (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_bins.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_bins.diminfo[0].strides))) != 0); __pyx_t_16 = __pyx_t_12; } else { __pyx_t_16 = __pyx_t_17; } if (!__pyx_t_16) break; /* "pandas/src/generated.pyx":6559 * for i in range(N): * while b < ngroups - 1 and i >= bins[b]: * b += 1 # <<<<<<<<<<<<<< * * counts[b] += 1 */ __pyx_v_b = (__pyx_v_b + 1); } /* "pandas/src/generated.pyx":6561 * b += 1 * * counts[b] += 1 # <<<<<<<<<<<<<< * val = values[i, 0] * */ __pyx_t_20 = __pyx_v_b; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_counts.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_counts.diminfo[0].strides) += 1; /* "pandas/src/generated.pyx":6562 * * counts[b] += 1 * val = values[i, 0] # <<<<<<<<<<<<<< * * # not nan */ __pyx_t_29 = __pyx_v_i; __pyx_t_30 = 0; __pyx_v_val = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_29, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_30, __pyx_pybuffernd_values.diminfo[1].strides)); /* "pandas/src/generated.pyx":6565 * * # not nan * if val == val: # <<<<<<<<<<<<<< * nobs[b, 0] += 1 * if val < minx[b, 0]: */ __pyx_t_16 = ((__pyx_v_val == __pyx_v_val) != 0); if (__pyx_t_16) { /* "pandas/src/generated.pyx":6566 * # not nan * if val == val: * nobs[b, 0] += 1 # <<<<<<<<<<<<<< * if val < minx[b, 0]: * minx[b, 0] = val */ __pyx_t_31 = __pyx_v_b; __pyx_t_32 = 0; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_nobs.rcbuffer->pybuffer.buf, __pyx_t_31, __pyx_pybuffernd_nobs.diminfo[0].strides, __pyx_t_32, __pyx_pybuffernd_nobs.diminfo[1].strides) += 1.0; /* "pandas/src/generated.pyx":6567 * if val == val: * nobs[b, 0] += 1 * if val < minx[b, 0]: # <<<<<<<<<<<<<< * minx[b, 0] = val * */ __pyx_t_33 = __pyx_v_b; __pyx_t_34 = 0; __pyx_t_16 = ((__pyx_v_val < (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_minx.rcbuffer->pybuffer.buf, __pyx_t_33, __pyx_pybuffernd_minx.diminfo[0].strides, __pyx_t_34, __pyx_pybuffernd_minx.diminfo[1].strides))) != 0); if (__pyx_t_16) { /* "pandas/src/generated.pyx":6568 * nobs[b, 0] += 1 * if val < minx[b, 0]: * minx[b, 0] = val # <<<<<<<<<<<<<< * * for i in range(ngroups): */ __pyx_t_35 = __pyx_v_b; __pyx_t_36 = 0; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_minx.rcbuffer->pybuffer.buf, __pyx_t_35, __pyx_pybuffernd_minx.diminfo[0].strides, __pyx_t_36, __pyx_pybuffernd_minx.diminfo[1].strides) = __pyx_v_val; goto __pyx_L20; } __pyx_L20:; goto __pyx_L19; } __pyx_L19:; } } __pyx_L6:; /* "pandas/src/generated.pyx":6570 * minx[b, 0] = val * * for i in range(ngroups): # <<<<<<<<<<<<<< * for j in range(K): * if nobs[i, j] == 0: */ __pyx_t_9 = __pyx_v_ngroups; for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_9; __pyx_t_11+=1) { __pyx_v_i = __pyx_t_11; /* "pandas/src/generated.pyx":6571 * * for i in range(ngroups): * for j in range(K): # <<<<<<<<<<<<<< * if nobs[i, j] == 0: * out[i, j] = nan */ __pyx_t_37 = __pyx_v_K; for (__pyx_t_38 = 0; __pyx_t_38 < __pyx_t_37; __pyx_t_38+=1) { __pyx_v_j = __pyx_t_38; /* "pandas/src/generated.pyx":6572 * for i in range(ngroups): * for j in range(K): * if nobs[i, j] == 0: # <<<<<<<<<<<<<< * out[i, j] = nan * else: */ __pyx_t_39 = __pyx_v_i; __pyx_t_40 = __pyx_v_j; __pyx_t_16 = (((*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_nobs.rcbuffer->pybuffer.buf, __pyx_t_39, __pyx_pybuffernd_nobs.diminfo[0].strides, __pyx_t_40, __pyx_pybuffernd_nobs.diminfo[1].strides)) == 0.0) != 0); if (__pyx_t_16) { /* "pandas/src/generated.pyx":6573 * for j in range(K): * if nobs[i, j] == 0: * out[i, j] = nan # <<<<<<<<<<<<<< * else: * out[i, j] = minx[i, j] */ __pyx_t_41 = __pyx_v_i; __pyx_t_42 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_41, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_42, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_6pandas_5algos_nan; goto __pyx_L25; } /*else*/ { /* "pandas/src/generated.pyx":6575 * out[i, j] = nan * else: * out[i, j] = minx[i, j] # <<<<<<<<<<<<<< * * @cython.wraparound(False) */ __pyx_t_43 = __pyx_v_i; __pyx_t_44 = __pyx_v_j; __pyx_t_45 = __pyx_v_i; __pyx_t_46 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_45, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_46, __pyx_pybuffernd_out.diminfo[1].strides) = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_minx.rcbuffer->pybuffer.buf, __pyx_t_43, __pyx_pybuffernd_minx.diminfo[0].strides, __pyx_t_44, __pyx_pybuffernd_minx.diminfo[1].strides)); } __pyx_L25:; } } /* "pandas/src/generated.pyx":6517 * @cython.wraparound(False) * @cython.boundscheck(False) * def group_min_bin_float32(ndarray[float32_t, ndim=2] out, # <<<<<<<<<<<<<< * ndarray[int64_t] counts, * ndarray[float32_t, ndim=2] 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_13); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_bins.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_counts.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_minx.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.group_min_bin_float32", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_bins.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_counts.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_minx.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_minx); __Pyx_XDECREF((PyObject *)__pyx_v_nobs); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":6579 * @cython.wraparound(False) * @cython.boundscheck(False) * def group_max_float64(ndarray[float64_t, ndim=2] out, # <<<<<<<<<<<<<< * ndarray[int64_t] counts, * ndarray[float64_t, ndim=2] values, */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_443group_max_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6pandas_5algos_442group_max_float64[] = "\n Only aggregates on axis=0\n "; static PyMethodDef __pyx_mdef_6pandas_5algos_443group_max_float64 = {__Pyx_NAMESTR("group_max_float64"), (PyCFunction)__pyx_pw_6pandas_5algos_443group_max_float64, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_5algos_442group_max_float64)}; static PyObject *__pyx_pw_6pandas_5algos_443group_max_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_out = 0; PyArrayObject *__pyx_v_counts = 0; PyArrayObject *__pyx_v_values = 0; PyArrayObject *__pyx_v_labels = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("group_max_float64 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_out,&__pyx_n_s_counts,&__pyx_n_s_values,&__pyx_n_s_labels,0}; PyObject* values[4] = {0,0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_out)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_counts)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("group_max_float64", 1, 4, 4, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6579; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_values)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("group_max_float64", 1, 4, 4, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6579; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_labels)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("group_max_float64", 1, 4, 4, 3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6579; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "group_max_float64") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6579; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 4) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[3] = PyTuple_GET_ITEM(__pyx_args, 3); } __pyx_v_out = ((PyArrayObject *)values[0]); __pyx_v_counts = ((PyArrayObject *)values[1]); __pyx_v_values = ((PyArrayObject *)values[2]); __pyx_v_labels = ((PyArrayObject *)values[3]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("group_max_float64", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6579; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.group_max_float64", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_5numpy_ndarray, 1, "out", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6579; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_counts), __pyx_ptype_5numpy_ndarray, 1, "counts", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6580; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6581; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_labels), __pyx_ptype_5numpy_ndarray, 1, "labels", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6582; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_442group_max_float64(__pyx_self, __pyx_v_out, __pyx_v_counts, __pyx_v_values, __pyx_v_labels); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5algos_442group_max_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_out, PyArrayObject *__pyx_v_counts, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_labels) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_N; Py_ssize_t __pyx_v_K; Py_ssize_t __pyx_v_lab; __pyx_t_5numpy_float64_t __pyx_v_val; PyArrayObject *__pyx_v_maxx = 0; PyArrayObject *__pyx_v_nobs = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_counts; __Pyx_Buffer __pyx_pybuffer_counts; __Pyx_LocalBuf_ND __pyx_pybuffernd_labels; __Pyx_Buffer __pyx_pybuffer_labels; __Pyx_LocalBuf_ND __pyx_pybuffernd_maxx; __Pyx_Buffer __pyx_pybuffer_maxx; __Pyx_LocalBuf_ND __pyx_pybuffernd_nobs; __Pyx_Buffer __pyx_pybuffer_nobs; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_values; __Pyx_Buffer __pyx_pybuffer_values; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; Py_ssize_t __pyx_t_2; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyArrayObject *__pyx_t_7 = NULL; int __pyx_t_8; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; PyObject *__pyx_t_11 = NULL; PyObject *__pyx_t_12 = NULL; PyObject *(*__pyx_t_13)(PyObject *); 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; Py_ssize_t __pyx_t_26; long __pyx_t_27; Py_ssize_t __pyx_t_28; long __pyx_t_29; Py_ssize_t __pyx_t_30; long __pyx_t_31; Py_ssize_t __pyx_t_32; long __pyx_t_33; Py_ssize_t __pyx_t_34; Py_ssize_t __pyx_t_35; Py_ssize_t __pyx_t_36; Py_ssize_t __pyx_t_37; Py_ssize_t __pyx_t_38; Py_ssize_t __pyx_t_39; Py_ssize_t __pyx_t_40; Py_ssize_t __pyx_t_41; Py_ssize_t __pyx_t_42; Py_ssize_t __pyx_t_43; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("group_max_float64", 0); __pyx_pybuffer_maxx.pybuffer.buf = NULL; __pyx_pybuffer_maxx.refcount = 0; __pyx_pybuffernd_maxx.data = NULL; __pyx_pybuffernd_maxx.rcbuffer = &__pyx_pybuffer_maxx; __pyx_pybuffer_nobs.pybuffer.buf = NULL; __pyx_pybuffer_nobs.refcount = 0; __pyx_pybuffernd_nobs.data = NULL; __pyx_pybuffernd_nobs.rcbuffer = &__pyx_pybuffer_nobs; __pyx_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; __pyx_pybuffer_counts.pybuffer.buf = NULL; __pyx_pybuffer_counts.refcount = 0; __pyx_pybuffernd_counts.data = NULL; __pyx_pybuffernd_counts.rcbuffer = &__pyx_pybuffer_counts; __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_labels.pybuffer.buf = NULL; __pyx_pybuffer_labels.refcount = 0; __pyx_pybuffernd_labels.data = NULL; __pyx_pybuffernd_labels.rcbuffer = &__pyx_pybuffer_labels; { __Pyx_BufFmt_StackElem __pyx_stack[1]; 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, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6579; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; __pyx_pybuffernd_out.diminfo[1].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_out.diminfo[1].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[1]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_counts.rcbuffer->pybuffer, (PyObject*)__pyx_v_counts, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6579; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_counts.diminfo[0].strides = __pyx_pybuffernd_counts.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_counts.diminfo[0].shape = __pyx_pybuffernd_counts.rcbuffer->pybuffer.shape[0]; { __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, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6579; __pyx_clineno = __LINE__; goto __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_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_labels.rcbuffer->pybuffer, (PyObject*)__pyx_v_labels, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6579; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_labels.diminfo[0].strides = __pyx_pybuffernd_labels.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_labels.diminfo[0].shape = __pyx_pybuffernd_labels.rcbuffer->pybuffer.shape[0]; /* "pandas/src/generated.pyx":6591 * ndarray[float64_t, ndim=2] maxx, nobs * * if not len(values) == len(labels): # <<<<<<<<<<<<<< * raise AssertionError("len(index) != len(labels)") * */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6591; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_2 = PyObject_Length(((PyObject *)__pyx_v_labels)); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6591; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_3 = ((!((__pyx_t_1 == __pyx_t_2) != 0)) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":6592 * * if not len(values) == len(labels): * raise AssertionError("len(index) != len(labels)") # <<<<<<<<<<<<<< * * nobs = np.zeros_like(out) */ __pyx_t_4 = PyObject_Call(__pyx_builtin_AssertionError, __pyx_tuple__191, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6592; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 6592; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } /* "pandas/src/generated.pyx":6594 * raise AssertionError("len(index) != len(labels)") * * nobs = np.zeros_like(out) # <<<<<<<<<<<<<< * * maxx = np.empty_like(out) */ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6594; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_zeros_like); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6594; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6594; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(((PyObject *)__pyx_v_out)); PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_v_out)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out)); __pyx_t_6 = PyObject_Call(__pyx_t_5, __pyx_t_4, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6594; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6594; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_7 = ((PyArrayObject *)__pyx_t_6); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer); __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_nobs.rcbuffer->pybuffer, (PyObject*)__pyx_v_nobs, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_pybuffernd_nobs.diminfo[0].strides = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_nobs.diminfo[0].shape = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_nobs.diminfo[1].strides = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_nobs.diminfo[1].shape = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.shape[1]; if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6594; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_7 = 0; __pyx_v_nobs = ((PyArrayObject *)__pyx_t_6); __pyx_t_6 = 0; /* "pandas/src/generated.pyx":6596 * nobs = np.zeros_like(out) * * maxx = np.empty_like(out) # <<<<<<<<<<<<<< * maxx.fill(-np.inf) * */ __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6596; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_empty_like); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6596; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6596; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(((PyObject *)__pyx_v_out)); PyTuple_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_v_out)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out)); __pyx_t_5 = PyObject_Call(__pyx_t_4, __pyx_t_6, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6596; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6596; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_7 = ((PyArrayObject *)__pyx_t_5); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_maxx.rcbuffer->pybuffer); __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_maxx.rcbuffer->pybuffer, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_maxx.rcbuffer->pybuffer, (PyObject*)__pyx_v_maxx, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_pybuffernd_maxx.diminfo[0].strides = __pyx_pybuffernd_maxx.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_maxx.diminfo[0].shape = __pyx_pybuffernd_maxx.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_maxx.diminfo[1].strides = __pyx_pybuffernd_maxx.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_maxx.diminfo[1].shape = __pyx_pybuffernd_maxx.rcbuffer->pybuffer.shape[1]; if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6596; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_7 = 0; __pyx_v_maxx = ((PyArrayObject *)__pyx_t_5); __pyx_t_5 = 0; /* "pandas/src/generated.pyx":6597 * * maxx = np.empty_like(out) * maxx.fill(-np.inf) # <<<<<<<<<<<<<< * * N, K = ( values).shape */ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_maxx), __pyx_n_s_fill); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6597; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6597; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_inf); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6597; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyNumber_Negative(__pyx_t_4); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6597; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6597; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyObject_Call(__pyx_t_5, __pyx_t_4, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6597; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; /* "pandas/src/generated.pyx":6599 * maxx.fill(-np.inf) * * N, K = ( values).shape # <<<<<<<<<<<<<< * * if K > 1: */ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_values), __pyx_n_s_shape); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6599; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); if ((likely(PyTuple_CheckExact(__pyx_t_6))) || (PyList_CheckExact(__pyx_t_6))) { PyObject* sequence = __pyx_t_6; #if CYTHON_COMPILING_IN_CPYTHON Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6599; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_4 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_5 = PyTuple_GET_ITEM(sequence, 1); } else { __pyx_t_4 = PyList_GET_ITEM(sequence, 0); __pyx_t_5 = PyList_GET_ITEM(sequence, 1); } __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(__pyx_t_5); #else __pyx_t_4 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6599; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6599; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); #endif __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } else { Py_ssize_t index = -1; __pyx_t_12 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6599; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_13 = Py_TYPE(__pyx_t_12)->tp_iternext; index = 0; __pyx_t_4 = __pyx_t_13(__pyx_t_12); if (unlikely(!__pyx_t_4)) goto __pyx_L4_unpacking_failed; __Pyx_GOTREF(__pyx_t_4); index = 1; __pyx_t_5 = __pyx_t_13(__pyx_t_12); if (unlikely(!__pyx_t_5)) goto __pyx_L4_unpacking_failed; __Pyx_GOTREF(__pyx_t_5); if (__Pyx_IternextUnpackEndCheck(__pyx_t_13(__pyx_t_12), 2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6599; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_13 = NULL; __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; goto __pyx_L5_unpacking_done; __pyx_L4_unpacking_failed:; __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __pyx_t_13 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6599; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_L5_unpacking_done:; } __pyx_t_2 = __Pyx_PyIndex_AsSsize_t(__pyx_t_4); if (unlikely((__pyx_t_2 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6599; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_1 = __Pyx_PyIndex_AsSsize_t(__pyx_t_5); if (unlikely((__pyx_t_1 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6599; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_v_N = __pyx_t_2; __pyx_v_K = __pyx_t_1; /* "pandas/src/generated.pyx":6601 * N, K = ( values).shape * * if K > 1: # <<<<<<<<<<<<<< * for i in range(N): * lab = labels[i] */ __pyx_t_3 = ((__pyx_v_K > 1) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":6602 * * if K > 1: * for i in range(N): # <<<<<<<<<<<<<< * lab = labels[i] * if lab < 0: */ __pyx_t_1 = __pyx_v_N; for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) { __pyx_v_i = __pyx_t_2; /* "pandas/src/generated.pyx":6603 * if K > 1: * for i in range(N): * lab = labels[i] # <<<<<<<<<<<<<< * if lab < 0: * continue */ __pyx_t_14 = __pyx_v_i; __pyx_v_lab = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_labels.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_labels.diminfo[0].strides)); /* "pandas/src/generated.pyx":6604 * for i in range(N): * lab = labels[i] * if lab < 0: # <<<<<<<<<<<<<< * continue * */ __pyx_t_3 = ((__pyx_v_lab < 0) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":6605 * lab = labels[i] * if lab < 0: * continue # <<<<<<<<<<<<<< * * counts[lab] += 1 */ goto __pyx_L7_continue; } /* "pandas/src/generated.pyx":6607 * continue * * counts[lab] += 1 # <<<<<<<<<<<<<< * for j in range(K): * val = values[i, j] */ __pyx_t_15 = __pyx_v_lab; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_counts.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_counts.diminfo[0].strides) += 1; /* "pandas/src/generated.pyx":6608 * * counts[lab] += 1 * for j in range(K): # <<<<<<<<<<<<<< * val = values[i, j] * */ __pyx_t_16 = __pyx_v_K; for (__pyx_t_17 = 0; __pyx_t_17 < __pyx_t_16; __pyx_t_17+=1) { __pyx_v_j = __pyx_t_17; /* "pandas/src/generated.pyx":6609 * counts[lab] += 1 * for j in range(K): * val = values[i, j] # <<<<<<<<<<<<<< * * # not nan */ __pyx_t_18 = __pyx_v_i; __pyx_t_19 = __pyx_v_j; __pyx_v_val = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_19, __pyx_pybuffernd_values.diminfo[1].strides)); /* "pandas/src/generated.pyx":6612 * * # not nan * if val == val: # <<<<<<<<<<<<<< * nobs[lab, j] += 1 * if val > maxx[lab, j]: */ __pyx_t_3 = ((__pyx_v_val == __pyx_v_val) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":6613 * # not nan * if val == val: * nobs[lab, j] += 1 # <<<<<<<<<<<<<< * if val > maxx[lab, j]: * maxx[lab, j] = val */ __pyx_t_20 = __pyx_v_lab; __pyx_t_21 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_nobs.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_nobs.diminfo[0].strides, __pyx_t_21, __pyx_pybuffernd_nobs.diminfo[1].strides) += 1.0; /* "pandas/src/generated.pyx":6614 * if val == val: * nobs[lab, j] += 1 * if val > maxx[lab, j]: # <<<<<<<<<<<<<< * maxx[lab, j] = val * else: */ __pyx_t_22 = __pyx_v_lab; __pyx_t_23 = __pyx_v_j; __pyx_t_3 = ((__pyx_v_val > (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_maxx.rcbuffer->pybuffer.buf, __pyx_t_22, __pyx_pybuffernd_maxx.diminfo[0].strides, __pyx_t_23, __pyx_pybuffernd_maxx.diminfo[1].strides))) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":6615 * nobs[lab, j] += 1 * if val > maxx[lab, j]: * maxx[lab, j] = val # <<<<<<<<<<<<<< * else: * for i in range(N): */ __pyx_t_24 = __pyx_v_lab; __pyx_t_25 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_maxx.rcbuffer->pybuffer.buf, __pyx_t_24, __pyx_pybuffernd_maxx.diminfo[0].strides, __pyx_t_25, __pyx_pybuffernd_maxx.diminfo[1].strides) = __pyx_v_val; goto __pyx_L13; } __pyx_L13:; goto __pyx_L12; } __pyx_L12:; } __pyx_L7_continue:; } goto __pyx_L6; } /*else*/ { /* "pandas/src/generated.pyx":6617 * maxx[lab, j] = val * else: * for i in range(N): # <<<<<<<<<<<<<< * lab = labels[i] * if lab < 0: */ __pyx_t_1 = __pyx_v_N; for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) { __pyx_v_i = __pyx_t_2; /* "pandas/src/generated.pyx":6618 * else: * for i in range(N): * lab = labels[i] # <<<<<<<<<<<<<< * if lab < 0: * continue */ __pyx_t_16 = __pyx_v_i; __pyx_v_lab = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_labels.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_labels.diminfo[0].strides)); /* "pandas/src/generated.pyx":6619 * for i in range(N): * lab = labels[i] * if lab < 0: # <<<<<<<<<<<<<< * continue * */ __pyx_t_3 = ((__pyx_v_lab < 0) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":6620 * lab = labels[i] * if lab < 0: * continue # <<<<<<<<<<<<<< * * counts[lab] += 1 */ goto __pyx_L14_continue; } /* "pandas/src/generated.pyx":6622 * continue * * counts[lab] += 1 # <<<<<<<<<<<<<< * val = values[i, 0] * */ __pyx_t_17 = __pyx_v_lab; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_counts.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_counts.diminfo[0].strides) += 1; /* "pandas/src/generated.pyx":6623 * * counts[lab] += 1 * val = values[i, 0] # <<<<<<<<<<<<<< * * # not nan */ __pyx_t_26 = __pyx_v_i; __pyx_t_27 = 0; __pyx_v_val = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_26, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_27, __pyx_pybuffernd_values.diminfo[1].strides)); /* "pandas/src/generated.pyx":6626 * * # not nan * if val == val: # <<<<<<<<<<<<<< * nobs[lab, 0] += 1 * if val > maxx[lab, 0]: */ __pyx_t_3 = ((__pyx_v_val == __pyx_v_val) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":6627 * # not nan * if val == val: * nobs[lab, 0] += 1 # <<<<<<<<<<<<<< * if val > maxx[lab, 0]: * maxx[lab, 0] = val */ __pyx_t_28 = __pyx_v_lab; __pyx_t_29 = 0; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_nobs.rcbuffer->pybuffer.buf, __pyx_t_28, __pyx_pybuffernd_nobs.diminfo[0].strides, __pyx_t_29, __pyx_pybuffernd_nobs.diminfo[1].strides) += 1.0; /* "pandas/src/generated.pyx":6628 * if val == val: * nobs[lab, 0] += 1 * if val > maxx[lab, 0]: # <<<<<<<<<<<<<< * maxx[lab, 0] = val * */ __pyx_t_30 = __pyx_v_lab; __pyx_t_31 = 0; __pyx_t_3 = ((__pyx_v_val > (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_maxx.rcbuffer->pybuffer.buf, __pyx_t_30, __pyx_pybuffernd_maxx.diminfo[0].strides, __pyx_t_31, __pyx_pybuffernd_maxx.diminfo[1].strides))) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":6629 * nobs[lab, 0] += 1 * if val > maxx[lab, 0]: * maxx[lab, 0] = val # <<<<<<<<<<<<<< * * for i in range(len(counts)): */ __pyx_t_32 = __pyx_v_lab; __pyx_t_33 = 0; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_maxx.rcbuffer->pybuffer.buf, __pyx_t_32, __pyx_pybuffernd_maxx.diminfo[0].strides, __pyx_t_33, __pyx_pybuffernd_maxx.diminfo[1].strides) = __pyx_v_val; goto __pyx_L18; } __pyx_L18:; goto __pyx_L17; } __pyx_L17:; __pyx_L14_continue:; } } __pyx_L6:; /* "pandas/src/generated.pyx":6631 * maxx[lab, 0] = val * * for i in range(len(counts)): # <<<<<<<<<<<<<< * for j in range(K): * if nobs[i, j] == 0: */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_counts)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6631; __pyx_clineno = __LINE__; goto __pyx_L1_error;} for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) { __pyx_v_i = __pyx_t_2; /* "pandas/src/generated.pyx":6632 * * for i in range(len(counts)): * for j in range(K): # <<<<<<<<<<<<<< * if nobs[i, j] == 0: * out[i, j] = nan */ __pyx_t_34 = __pyx_v_K; for (__pyx_t_35 = 0; __pyx_t_35 < __pyx_t_34; __pyx_t_35+=1) { __pyx_v_j = __pyx_t_35; /* "pandas/src/generated.pyx":6633 * for i in range(len(counts)): * for j in range(K): * if nobs[i, j] == 0: # <<<<<<<<<<<<<< * out[i, j] = nan * else: */ __pyx_t_36 = __pyx_v_i; __pyx_t_37 = __pyx_v_j; __pyx_t_3 = (((*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_nobs.rcbuffer->pybuffer.buf, __pyx_t_36, __pyx_pybuffernd_nobs.diminfo[0].strides, __pyx_t_37, __pyx_pybuffernd_nobs.diminfo[1].strides)) == 0.0) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":6634 * for j in range(K): * if nobs[i, j] == 0: * out[i, j] = nan # <<<<<<<<<<<<<< * else: * out[i, j] = maxx[i, j] */ __pyx_t_38 = __pyx_v_i; __pyx_t_39 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_38, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_39, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_6pandas_5algos_nan; goto __pyx_L23; } /*else*/ { /* "pandas/src/generated.pyx":6636 * out[i, j] = nan * else: * out[i, j] = maxx[i, j] # <<<<<<<<<<<<<< * @cython.wraparound(False) * @cython.boundscheck(False) */ __pyx_t_40 = __pyx_v_i; __pyx_t_41 = __pyx_v_j; __pyx_t_42 = __pyx_v_i; __pyx_t_43 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_42, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_43, __pyx_pybuffernd_out.diminfo[1].strides) = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_maxx.rcbuffer->pybuffer.buf, __pyx_t_40, __pyx_pybuffernd_maxx.diminfo[0].strides, __pyx_t_41, __pyx_pybuffernd_maxx.diminfo[1].strides)); } __pyx_L23:; } } /* "pandas/src/generated.pyx":6579 * @cython.wraparound(False) * @cython.boundscheck(False) * def group_max_float64(ndarray[float64_t, ndim=2] out, # <<<<<<<<<<<<<< * ndarray[int64_t] counts, * ndarray[float64_t, ndim=2] values, */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_12); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_counts.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_labels.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_maxx.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.group_max_float64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_counts.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_labels.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_maxx.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_maxx); __Pyx_XDECREF((PyObject *)__pyx_v_nobs); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":6639 * @cython.wraparound(False) * @cython.boundscheck(False) * def group_max_float32(ndarray[float32_t, ndim=2] out, # <<<<<<<<<<<<<< * ndarray[int64_t] counts, * ndarray[float32_t, ndim=2] values, */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_445group_max_float32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6pandas_5algos_444group_max_float32[] = "\n Only aggregates on axis=0\n "; static PyMethodDef __pyx_mdef_6pandas_5algos_445group_max_float32 = {__Pyx_NAMESTR("group_max_float32"), (PyCFunction)__pyx_pw_6pandas_5algos_445group_max_float32, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_5algos_444group_max_float32)}; static PyObject *__pyx_pw_6pandas_5algos_445group_max_float32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_out = 0; PyArrayObject *__pyx_v_counts = 0; PyArrayObject *__pyx_v_values = 0; PyArrayObject *__pyx_v_labels = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("group_max_float32 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_out,&__pyx_n_s_counts,&__pyx_n_s_values,&__pyx_n_s_labels,0}; PyObject* values[4] = {0,0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_out)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_counts)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("group_max_float32", 1, 4, 4, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6639; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_values)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("group_max_float32", 1, 4, 4, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6639; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_labels)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("group_max_float32", 1, 4, 4, 3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6639; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "group_max_float32") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6639; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 4) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[3] = PyTuple_GET_ITEM(__pyx_args, 3); } __pyx_v_out = ((PyArrayObject *)values[0]); __pyx_v_counts = ((PyArrayObject *)values[1]); __pyx_v_values = ((PyArrayObject *)values[2]); __pyx_v_labels = ((PyArrayObject *)values[3]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("group_max_float32", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6639; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.group_max_float32", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_5numpy_ndarray, 1, "out", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6639; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_counts), __pyx_ptype_5numpy_ndarray, 1, "counts", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6640; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6641; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_labels), __pyx_ptype_5numpy_ndarray, 1, "labels", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6642; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_444group_max_float32(__pyx_self, __pyx_v_out, __pyx_v_counts, __pyx_v_values, __pyx_v_labels); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5algos_444group_max_float32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_out, PyArrayObject *__pyx_v_counts, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_labels) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_N; Py_ssize_t __pyx_v_K; Py_ssize_t __pyx_v_lab; __pyx_t_5numpy_float32_t __pyx_v_val; PyArrayObject *__pyx_v_maxx = 0; PyArrayObject *__pyx_v_nobs = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_counts; __Pyx_Buffer __pyx_pybuffer_counts; __Pyx_LocalBuf_ND __pyx_pybuffernd_labels; __Pyx_Buffer __pyx_pybuffer_labels; __Pyx_LocalBuf_ND __pyx_pybuffernd_maxx; __Pyx_Buffer __pyx_pybuffer_maxx; __Pyx_LocalBuf_ND __pyx_pybuffernd_nobs; __Pyx_Buffer __pyx_pybuffer_nobs; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_values; __Pyx_Buffer __pyx_pybuffer_values; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; Py_ssize_t __pyx_t_2; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyArrayObject *__pyx_t_7 = NULL; int __pyx_t_8; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; PyObject *__pyx_t_11 = NULL; PyObject *__pyx_t_12 = NULL; PyObject *(*__pyx_t_13)(PyObject *); 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; Py_ssize_t __pyx_t_26; long __pyx_t_27; Py_ssize_t __pyx_t_28; long __pyx_t_29; Py_ssize_t __pyx_t_30; long __pyx_t_31; Py_ssize_t __pyx_t_32; long __pyx_t_33; Py_ssize_t __pyx_t_34; Py_ssize_t __pyx_t_35; Py_ssize_t __pyx_t_36; Py_ssize_t __pyx_t_37; Py_ssize_t __pyx_t_38; Py_ssize_t __pyx_t_39; Py_ssize_t __pyx_t_40; Py_ssize_t __pyx_t_41; Py_ssize_t __pyx_t_42; Py_ssize_t __pyx_t_43; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("group_max_float32", 0); __pyx_pybuffer_maxx.pybuffer.buf = NULL; __pyx_pybuffer_maxx.refcount = 0; __pyx_pybuffernd_maxx.data = NULL; __pyx_pybuffernd_maxx.rcbuffer = &__pyx_pybuffer_maxx; __pyx_pybuffer_nobs.pybuffer.buf = NULL; __pyx_pybuffer_nobs.refcount = 0; __pyx_pybuffernd_nobs.data = NULL; __pyx_pybuffernd_nobs.rcbuffer = &__pyx_pybuffer_nobs; __pyx_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; __pyx_pybuffer_counts.pybuffer.buf = NULL; __pyx_pybuffer_counts.refcount = 0; __pyx_pybuffernd_counts.data = NULL; __pyx_pybuffernd_counts.rcbuffer = &__pyx_pybuffer_counts; __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_labels.pybuffer.buf = NULL; __pyx_pybuffer_labels.refcount = 0; __pyx_pybuffernd_labels.data = NULL; __pyx_pybuffernd_labels.rcbuffer = &__pyx_pybuffer_labels; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_v_out, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6639; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; __pyx_pybuffernd_out.diminfo[1].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_out.diminfo[1].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[1]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_counts.rcbuffer->pybuffer, (PyObject*)__pyx_v_counts, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6639; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_counts.diminfo[0].strides = __pyx_pybuffernd_counts.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_counts.diminfo[0].shape = __pyx_pybuffernd_counts.rcbuffer->pybuffer.shape[0]; { __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_float32_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6639; __pyx_clineno = __LINE__; goto __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_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_labels.rcbuffer->pybuffer, (PyObject*)__pyx_v_labels, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6639; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_labels.diminfo[0].strides = __pyx_pybuffernd_labels.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_labels.diminfo[0].shape = __pyx_pybuffernd_labels.rcbuffer->pybuffer.shape[0]; /* "pandas/src/generated.pyx":6651 * ndarray[float32_t, ndim=2] maxx, nobs * * if not len(values) == len(labels): # <<<<<<<<<<<<<< * raise AssertionError("len(index) != len(labels)") * */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6651; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_2 = PyObject_Length(((PyObject *)__pyx_v_labels)); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6651; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_3 = ((!((__pyx_t_1 == __pyx_t_2) != 0)) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":6652 * * if not len(values) == len(labels): * raise AssertionError("len(index) != len(labels)") # <<<<<<<<<<<<<< * * nobs = np.zeros_like(out) */ __pyx_t_4 = PyObject_Call(__pyx_builtin_AssertionError, __pyx_tuple__192, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6652; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 6652; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } /* "pandas/src/generated.pyx":6654 * raise AssertionError("len(index) != len(labels)") * * nobs = np.zeros_like(out) # <<<<<<<<<<<<<< * * maxx = np.empty_like(out) */ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6654; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_zeros_like); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6654; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6654; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(((PyObject *)__pyx_v_out)); PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_v_out)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out)); __pyx_t_6 = PyObject_Call(__pyx_t_5, __pyx_t_4, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6654; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6654; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_7 = ((PyArrayObject *)__pyx_t_6); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer); __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_nobs.rcbuffer->pybuffer, (PyObject*)__pyx_v_nobs, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_pybuffernd_nobs.diminfo[0].strides = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_nobs.diminfo[0].shape = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_nobs.diminfo[1].strides = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_nobs.diminfo[1].shape = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.shape[1]; if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6654; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_7 = 0; __pyx_v_nobs = ((PyArrayObject *)__pyx_t_6); __pyx_t_6 = 0; /* "pandas/src/generated.pyx":6656 * nobs = np.zeros_like(out) * * maxx = np.empty_like(out) # <<<<<<<<<<<<<< * maxx.fill(-np.inf) * */ __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6656; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_empty_like); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6656; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6656; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(((PyObject *)__pyx_v_out)); PyTuple_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_v_out)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out)); __pyx_t_5 = PyObject_Call(__pyx_t_4, __pyx_t_6, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6656; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6656; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_7 = ((PyArrayObject *)__pyx_t_5); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_maxx.rcbuffer->pybuffer); __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_maxx.rcbuffer->pybuffer, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_maxx.rcbuffer->pybuffer, (PyObject*)__pyx_v_maxx, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_pybuffernd_maxx.diminfo[0].strides = __pyx_pybuffernd_maxx.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_maxx.diminfo[0].shape = __pyx_pybuffernd_maxx.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_maxx.diminfo[1].strides = __pyx_pybuffernd_maxx.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_maxx.diminfo[1].shape = __pyx_pybuffernd_maxx.rcbuffer->pybuffer.shape[1]; if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6656; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_7 = 0; __pyx_v_maxx = ((PyArrayObject *)__pyx_t_5); __pyx_t_5 = 0; /* "pandas/src/generated.pyx":6657 * * maxx = np.empty_like(out) * maxx.fill(-np.inf) # <<<<<<<<<<<<<< * * N, K = ( values).shape */ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_maxx), __pyx_n_s_fill); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6657; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6657; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_inf); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6657; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyNumber_Negative(__pyx_t_4); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6657; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6657; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyObject_Call(__pyx_t_5, __pyx_t_4, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6657; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; /* "pandas/src/generated.pyx":6659 * maxx.fill(-np.inf) * * N, K = ( values).shape # <<<<<<<<<<<<<< * * if K > 1: */ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_values), __pyx_n_s_shape); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6659; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); if ((likely(PyTuple_CheckExact(__pyx_t_6))) || (PyList_CheckExact(__pyx_t_6))) { PyObject* sequence = __pyx_t_6; #if CYTHON_COMPILING_IN_CPYTHON Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6659; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_4 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_5 = PyTuple_GET_ITEM(sequence, 1); } else { __pyx_t_4 = PyList_GET_ITEM(sequence, 0); __pyx_t_5 = PyList_GET_ITEM(sequence, 1); } __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(__pyx_t_5); #else __pyx_t_4 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6659; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6659; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); #endif __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } else { Py_ssize_t index = -1; __pyx_t_12 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6659; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_13 = Py_TYPE(__pyx_t_12)->tp_iternext; index = 0; __pyx_t_4 = __pyx_t_13(__pyx_t_12); if (unlikely(!__pyx_t_4)) goto __pyx_L4_unpacking_failed; __Pyx_GOTREF(__pyx_t_4); index = 1; __pyx_t_5 = __pyx_t_13(__pyx_t_12); if (unlikely(!__pyx_t_5)) goto __pyx_L4_unpacking_failed; __Pyx_GOTREF(__pyx_t_5); if (__Pyx_IternextUnpackEndCheck(__pyx_t_13(__pyx_t_12), 2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6659; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_13 = NULL; __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; goto __pyx_L5_unpacking_done; __pyx_L4_unpacking_failed:; __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __pyx_t_13 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6659; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_L5_unpacking_done:; } __pyx_t_2 = __Pyx_PyIndex_AsSsize_t(__pyx_t_4); if (unlikely((__pyx_t_2 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6659; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_1 = __Pyx_PyIndex_AsSsize_t(__pyx_t_5); if (unlikely((__pyx_t_1 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6659; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_v_N = __pyx_t_2; __pyx_v_K = __pyx_t_1; /* "pandas/src/generated.pyx":6661 * N, K = ( values).shape * * if K > 1: # <<<<<<<<<<<<<< * for i in range(N): * lab = labels[i] */ __pyx_t_3 = ((__pyx_v_K > 1) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":6662 * * if K > 1: * for i in range(N): # <<<<<<<<<<<<<< * lab = labels[i] * if lab < 0: */ __pyx_t_1 = __pyx_v_N; for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) { __pyx_v_i = __pyx_t_2; /* "pandas/src/generated.pyx":6663 * if K > 1: * for i in range(N): * lab = labels[i] # <<<<<<<<<<<<<< * if lab < 0: * continue */ __pyx_t_14 = __pyx_v_i; __pyx_v_lab = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_labels.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_labels.diminfo[0].strides)); /* "pandas/src/generated.pyx":6664 * for i in range(N): * lab = labels[i] * if lab < 0: # <<<<<<<<<<<<<< * continue * */ __pyx_t_3 = ((__pyx_v_lab < 0) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":6665 * lab = labels[i] * if lab < 0: * continue # <<<<<<<<<<<<<< * * counts[lab] += 1 */ goto __pyx_L7_continue; } /* "pandas/src/generated.pyx":6667 * continue * * counts[lab] += 1 # <<<<<<<<<<<<<< * for j in range(K): * val = values[i, j] */ __pyx_t_15 = __pyx_v_lab; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_counts.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_counts.diminfo[0].strides) += 1; /* "pandas/src/generated.pyx":6668 * * counts[lab] += 1 * for j in range(K): # <<<<<<<<<<<<<< * val = values[i, j] * */ __pyx_t_16 = __pyx_v_K; for (__pyx_t_17 = 0; __pyx_t_17 < __pyx_t_16; __pyx_t_17+=1) { __pyx_v_j = __pyx_t_17; /* "pandas/src/generated.pyx":6669 * counts[lab] += 1 * for j in range(K): * val = values[i, j] # <<<<<<<<<<<<<< * * # not nan */ __pyx_t_18 = __pyx_v_i; __pyx_t_19 = __pyx_v_j; __pyx_v_val = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_19, __pyx_pybuffernd_values.diminfo[1].strides)); /* "pandas/src/generated.pyx":6672 * * # not nan * if val == val: # <<<<<<<<<<<<<< * nobs[lab, j] += 1 * if val > maxx[lab, j]: */ __pyx_t_3 = ((__pyx_v_val == __pyx_v_val) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":6673 * # not nan * if val == val: * nobs[lab, j] += 1 # <<<<<<<<<<<<<< * if val > maxx[lab, j]: * maxx[lab, j] = val */ __pyx_t_20 = __pyx_v_lab; __pyx_t_21 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_nobs.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_nobs.diminfo[0].strides, __pyx_t_21, __pyx_pybuffernd_nobs.diminfo[1].strides) += 1.0; /* "pandas/src/generated.pyx":6674 * if val == val: * nobs[lab, j] += 1 * if val > maxx[lab, j]: # <<<<<<<<<<<<<< * maxx[lab, j] = val * else: */ __pyx_t_22 = __pyx_v_lab; __pyx_t_23 = __pyx_v_j; __pyx_t_3 = ((__pyx_v_val > (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_maxx.rcbuffer->pybuffer.buf, __pyx_t_22, __pyx_pybuffernd_maxx.diminfo[0].strides, __pyx_t_23, __pyx_pybuffernd_maxx.diminfo[1].strides))) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":6675 * nobs[lab, j] += 1 * if val > maxx[lab, j]: * maxx[lab, j] = val # <<<<<<<<<<<<<< * else: * for i in range(N): */ __pyx_t_24 = __pyx_v_lab; __pyx_t_25 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_maxx.rcbuffer->pybuffer.buf, __pyx_t_24, __pyx_pybuffernd_maxx.diminfo[0].strides, __pyx_t_25, __pyx_pybuffernd_maxx.diminfo[1].strides) = __pyx_v_val; goto __pyx_L13; } __pyx_L13:; goto __pyx_L12; } __pyx_L12:; } __pyx_L7_continue:; } goto __pyx_L6; } /*else*/ { /* "pandas/src/generated.pyx":6677 * maxx[lab, j] = val * else: * for i in range(N): # <<<<<<<<<<<<<< * lab = labels[i] * if lab < 0: */ __pyx_t_1 = __pyx_v_N; for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) { __pyx_v_i = __pyx_t_2; /* "pandas/src/generated.pyx":6678 * else: * for i in range(N): * lab = labels[i] # <<<<<<<<<<<<<< * if lab < 0: * continue */ __pyx_t_16 = __pyx_v_i; __pyx_v_lab = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_labels.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_labels.diminfo[0].strides)); /* "pandas/src/generated.pyx":6679 * for i in range(N): * lab = labels[i] * if lab < 0: # <<<<<<<<<<<<<< * continue * */ __pyx_t_3 = ((__pyx_v_lab < 0) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":6680 * lab = labels[i] * if lab < 0: * continue # <<<<<<<<<<<<<< * * counts[lab] += 1 */ goto __pyx_L14_continue; } /* "pandas/src/generated.pyx":6682 * continue * * counts[lab] += 1 # <<<<<<<<<<<<<< * val = values[i, 0] * */ __pyx_t_17 = __pyx_v_lab; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_counts.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_counts.diminfo[0].strides) += 1; /* "pandas/src/generated.pyx":6683 * * counts[lab] += 1 * val = values[i, 0] # <<<<<<<<<<<<<< * * # not nan */ __pyx_t_26 = __pyx_v_i; __pyx_t_27 = 0; __pyx_v_val = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_26, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_27, __pyx_pybuffernd_values.diminfo[1].strides)); /* "pandas/src/generated.pyx":6686 * * # not nan * if val == val: # <<<<<<<<<<<<<< * nobs[lab, 0] += 1 * if val > maxx[lab, 0]: */ __pyx_t_3 = ((__pyx_v_val == __pyx_v_val) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":6687 * # not nan * if val == val: * nobs[lab, 0] += 1 # <<<<<<<<<<<<<< * if val > maxx[lab, 0]: * maxx[lab, 0] = val */ __pyx_t_28 = __pyx_v_lab; __pyx_t_29 = 0; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_nobs.rcbuffer->pybuffer.buf, __pyx_t_28, __pyx_pybuffernd_nobs.diminfo[0].strides, __pyx_t_29, __pyx_pybuffernd_nobs.diminfo[1].strides) += 1.0; /* "pandas/src/generated.pyx":6688 * if val == val: * nobs[lab, 0] += 1 * if val > maxx[lab, 0]: # <<<<<<<<<<<<<< * maxx[lab, 0] = val * */ __pyx_t_30 = __pyx_v_lab; __pyx_t_31 = 0; __pyx_t_3 = ((__pyx_v_val > (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_maxx.rcbuffer->pybuffer.buf, __pyx_t_30, __pyx_pybuffernd_maxx.diminfo[0].strides, __pyx_t_31, __pyx_pybuffernd_maxx.diminfo[1].strides))) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":6689 * nobs[lab, 0] += 1 * if val > maxx[lab, 0]: * maxx[lab, 0] = val # <<<<<<<<<<<<<< * * for i in range(len(counts)): */ __pyx_t_32 = __pyx_v_lab; __pyx_t_33 = 0; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_maxx.rcbuffer->pybuffer.buf, __pyx_t_32, __pyx_pybuffernd_maxx.diminfo[0].strides, __pyx_t_33, __pyx_pybuffernd_maxx.diminfo[1].strides) = __pyx_v_val; goto __pyx_L18; } __pyx_L18:; goto __pyx_L17; } __pyx_L17:; __pyx_L14_continue:; } } __pyx_L6:; /* "pandas/src/generated.pyx":6691 * maxx[lab, 0] = val * * for i in range(len(counts)): # <<<<<<<<<<<<<< * for j in range(K): * if nobs[i, j] == 0: */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_counts)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6691; __pyx_clineno = __LINE__; goto __pyx_L1_error;} for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) { __pyx_v_i = __pyx_t_2; /* "pandas/src/generated.pyx":6692 * * for i in range(len(counts)): * for j in range(K): # <<<<<<<<<<<<<< * if nobs[i, j] == 0: * out[i, j] = nan */ __pyx_t_34 = __pyx_v_K; for (__pyx_t_35 = 0; __pyx_t_35 < __pyx_t_34; __pyx_t_35+=1) { __pyx_v_j = __pyx_t_35; /* "pandas/src/generated.pyx":6693 * for i in range(len(counts)): * for j in range(K): * if nobs[i, j] == 0: # <<<<<<<<<<<<<< * out[i, j] = nan * else: */ __pyx_t_36 = __pyx_v_i; __pyx_t_37 = __pyx_v_j; __pyx_t_3 = (((*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_nobs.rcbuffer->pybuffer.buf, __pyx_t_36, __pyx_pybuffernd_nobs.diminfo[0].strides, __pyx_t_37, __pyx_pybuffernd_nobs.diminfo[1].strides)) == 0.0) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":6694 * for j in range(K): * if nobs[i, j] == 0: * out[i, j] = nan # <<<<<<<<<<<<<< * else: * out[i, j] = maxx[i, j] */ __pyx_t_38 = __pyx_v_i; __pyx_t_39 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_38, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_39, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_6pandas_5algos_nan; goto __pyx_L23; } /*else*/ { /* "pandas/src/generated.pyx":6696 * out[i, j] = nan * else: * out[i, j] = maxx[i, j] # <<<<<<<<<<<<<< * * @cython.wraparound(False) */ __pyx_t_40 = __pyx_v_i; __pyx_t_41 = __pyx_v_j; __pyx_t_42 = __pyx_v_i; __pyx_t_43 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_42, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_43, __pyx_pybuffernd_out.diminfo[1].strides) = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_maxx.rcbuffer->pybuffer.buf, __pyx_t_40, __pyx_pybuffernd_maxx.diminfo[0].strides, __pyx_t_41, __pyx_pybuffernd_maxx.diminfo[1].strides)); } __pyx_L23:; } } /* "pandas/src/generated.pyx":6639 * @cython.wraparound(False) * @cython.boundscheck(False) * def group_max_float32(ndarray[float32_t, ndim=2] out, # <<<<<<<<<<<<<< * ndarray[int64_t] counts, * ndarray[float32_t, ndim=2] values, */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_12); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_counts.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_labels.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_maxx.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.group_max_float32", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_counts.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_labels.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_maxx.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_maxx); __Pyx_XDECREF((PyObject *)__pyx_v_nobs); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":6700 * @cython.wraparound(False) * @cython.boundscheck(False) * def group_max_bin_float64(ndarray[float64_t, ndim=2] out, # <<<<<<<<<<<<<< * ndarray[int64_t] counts, * ndarray[float64_t, ndim=2] values, */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_447group_max_bin_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6pandas_5algos_446group_max_bin_float64[] = "\n Only aggregates on axis=0\n "; static PyMethodDef __pyx_mdef_6pandas_5algos_447group_max_bin_float64 = {__Pyx_NAMESTR("group_max_bin_float64"), (PyCFunction)__pyx_pw_6pandas_5algos_447group_max_bin_float64, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_5algos_446group_max_bin_float64)}; static PyObject *__pyx_pw_6pandas_5algos_447group_max_bin_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_out = 0; PyArrayObject *__pyx_v_counts = 0; PyArrayObject *__pyx_v_values = 0; PyArrayObject *__pyx_v_bins = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("group_max_bin_float64 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_out,&__pyx_n_s_counts,&__pyx_n_s_values,&__pyx_n_s_bins,0}; PyObject* values[4] = {0,0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_out)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_counts)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("group_max_bin_float64", 1, 4, 4, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6700; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_values)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("group_max_bin_float64", 1, 4, 4, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6700; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_bins)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("group_max_bin_float64", 1, 4, 4, 3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6700; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "group_max_bin_float64") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6700; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 4) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[3] = PyTuple_GET_ITEM(__pyx_args, 3); } __pyx_v_out = ((PyArrayObject *)values[0]); __pyx_v_counts = ((PyArrayObject *)values[1]); __pyx_v_values = ((PyArrayObject *)values[2]); __pyx_v_bins = ((PyArrayObject *)values[3]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("group_max_bin_float64", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6700; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.group_max_bin_float64", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_5numpy_ndarray, 1, "out", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6700; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_counts), __pyx_ptype_5numpy_ndarray, 1, "counts", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6701; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6702; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_bins), __pyx_ptype_5numpy_ndarray, 1, "bins", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6703; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_446group_max_bin_float64(__pyx_self, __pyx_v_out, __pyx_v_counts, __pyx_v_values, __pyx_v_bins); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5algos_446group_max_bin_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_out, PyArrayObject *__pyx_v_counts, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_bins) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_N; Py_ssize_t __pyx_v_K; Py_ssize_t __pyx_v_ngroups; Py_ssize_t __pyx_v_b; __pyx_t_5numpy_float64_t __pyx_v_val; PyArrayObject *__pyx_v_maxx = 0; PyArrayObject *__pyx_v_nobs = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_bins; __Pyx_Buffer __pyx_pybuffer_bins; __Pyx_LocalBuf_ND __pyx_pybuffernd_counts; __Pyx_Buffer __pyx_pybuffer_counts; __Pyx_LocalBuf_ND __pyx_pybuffernd_maxx; __Pyx_Buffer __pyx_pybuffer_maxx; __Pyx_LocalBuf_ND __pyx_pybuffernd_nobs; __Pyx_Buffer __pyx_pybuffer_nobs; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __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; PyArrayObject *__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; Py_ssize_t __pyx_t_11; int __pyx_t_12; PyObject *__pyx_t_13 = NULL; PyObject *(*__pyx_t_14)(PyObject *); Py_ssize_t __pyx_t_15; int __pyx_t_16; int __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; long __pyx_t_30; Py_ssize_t __pyx_t_31; long __pyx_t_32; Py_ssize_t __pyx_t_33; long __pyx_t_34; Py_ssize_t __pyx_t_35; long __pyx_t_36; Py_ssize_t __pyx_t_37; Py_ssize_t __pyx_t_38; Py_ssize_t __pyx_t_39; Py_ssize_t __pyx_t_40; Py_ssize_t __pyx_t_41; Py_ssize_t __pyx_t_42; Py_ssize_t __pyx_t_43; Py_ssize_t __pyx_t_44; Py_ssize_t __pyx_t_45; Py_ssize_t __pyx_t_46; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("group_max_bin_float64", 0); __pyx_pybuffer_maxx.pybuffer.buf = NULL; __pyx_pybuffer_maxx.refcount = 0; __pyx_pybuffernd_maxx.data = NULL; __pyx_pybuffernd_maxx.rcbuffer = &__pyx_pybuffer_maxx; __pyx_pybuffer_nobs.pybuffer.buf = NULL; __pyx_pybuffer_nobs.refcount = 0; __pyx_pybuffernd_nobs.data = NULL; __pyx_pybuffernd_nobs.rcbuffer = &__pyx_pybuffer_nobs; __pyx_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; __pyx_pybuffer_counts.pybuffer.buf = NULL; __pyx_pybuffer_counts.refcount = 0; __pyx_pybuffernd_counts.data = NULL; __pyx_pybuffernd_counts.rcbuffer = &__pyx_pybuffer_counts; __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_bins.pybuffer.buf = NULL; __pyx_pybuffer_bins.refcount = 0; __pyx_pybuffernd_bins.data = NULL; __pyx_pybuffernd_bins.rcbuffer = &__pyx_pybuffer_bins; { __Pyx_BufFmt_StackElem __pyx_stack[1]; 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, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6700; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; __pyx_pybuffernd_out.diminfo[1].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_out.diminfo[1].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[1]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_counts.rcbuffer->pybuffer, (PyObject*)__pyx_v_counts, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6700; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_counts.diminfo[0].strides = __pyx_pybuffernd_counts.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_counts.diminfo[0].shape = __pyx_pybuffernd_counts.rcbuffer->pybuffer.shape[0]; { __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, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6700; __pyx_clineno = __LINE__; goto __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_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_bins.rcbuffer->pybuffer, (PyObject*)__pyx_v_bins, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6700; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_bins.diminfo[0].strides = __pyx_pybuffernd_bins.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_bins.diminfo[0].shape = __pyx_pybuffernd_bins.rcbuffer->pybuffer.shape[0]; /* "pandas/src/generated.pyx":6712 * ndarray[float64_t, ndim=2] maxx, nobs * * nobs = np.zeros_like(out) # <<<<<<<<<<<<<< * maxx = np.empty_like(out) * maxx.fill(-np.inf) */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6712; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_zeros_like); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6712; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 6712; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)__pyx_v_out)); PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_out)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out)); __pyx_t_3 = PyObject_Call(__pyx_t_2, __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6712; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6712; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_4 = ((PyArrayObject *)__pyx_t_3); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer); __pyx_t_5 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer, (PyObject*)__pyx_t_4, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_nobs.rcbuffer->pybuffer, (PyObject*)__pyx_v_nobs, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_pybuffernd_nobs.diminfo[0].strides = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_nobs.diminfo[0].shape = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_nobs.diminfo[1].strides = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_nobs.diminfo[1].shape = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.shape[1]; if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6712; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_4 = 0; __pyx_v_nobs = ((PyArrayObject *)__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/generated.pyx":6713 * * nobs = np.zeros_like(out) * maxx = np.empty_like(out) # <<<<<<<<<<<<<< * maxx.fill(-np.inf) * */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6713; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_empty_like); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6713; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6713; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(((PyObject *)__pyx_v_out)); PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_v_out)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out)); __pyx_t_2 = PyObject_Call(__pyx_t_1, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6713; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6713; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_4 = ((PyArrayObject *)__pyx_t_2); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_maxx.rcbuffer->pybuffer); __pyx_t_5 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_maxx.rcbuffer->pybuffer, (PyObject*)__pyx_t_4, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_maxx.rcbuffer->pybuffer, (PyObject*)__pyx_v_maxx, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_pybuffernd_maxx.diminfo[0].strides = __pyx_pybuffernd_maxx.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_maxx.diminfo[0].shape = __pyx_pybuffernd_maxx.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_maxx.diminfo[1].strides = __pyx_pybuffernd_maxx.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_maxx.diminfo[1].shape = __pyx_pybuffernd_maxx.rcbuffer->pybuffer.shape[1]; if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6713; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_4 = 0; __pyx_v_maxx = ((PyArrayObject *)__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":6714 * nobs = np.zeros_like(out) * maxx = np.empty_like(out) * maxx.fill(-np.inf) # <<<<<<<<<<<<<< * * if bins[len(bins) - 1] == len(values): */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_maxx), __pyx_n_s_fill); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6714; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6714; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_inf); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6714; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyNumber_Negative(__pyx_t_1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6714; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6714; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyObject_Call(__pyx_t_2, __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6714; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/generated.pyx":6716 * maxx.fill(-np.inf) * * if bins[len(bins) - 1] == len(values): # <<<<<<<<<<<<<< * ngroups = len(bins) * else: */ __pyx_t_9 = PyObject_Length(((PyObject *)__pyx_v_bins)); if (unlikely(__pyx_t_9 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6716; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_10 = (__pyx_t_9 - 1); __pyx_t_11 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6716; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_12 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_bins.rcbuffer->pybuffer.buf, __pyx_t_10, __pyx_pybuffernd_bins.diminfo[0].strides)) == __pyx_t_11) != 0); if (__pyx_t_12) { /* "pandas/src/generated.pyx":6717 * * if bins[len(bins) - 1] == len(values): * ngroups = len(bins) # <<<<<<<<<<<<<< * else: * ngroups = len(bins) + 1 */ __pyx_t_11 = PyObject_Length(((PyObject *)__pyx_v_bins)); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6717; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_ngroups = __pyx_t_11; goto __pyx_L3; } /*else*/ { /* "pandas/src/generated.pyx":6719 * ngroups = len(bins) * else: * ngroups = len(bins) + 1 # <<<<<<<<<<<<<< * * N, K = ( values).shape */ __pyx_t_11 = PyObject_Length(((PyObject *)__pyx_v_bins)); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6719; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_ngroups = (__pyx_t_11 + 1); } __pyx_L3:; /* "pandas/src/generated.pyx":6721 * ngroups = len(bins) + 1 * * N, K = ( values).shape # <<<<<<<<<<<<<< * * b = 0 */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_values), __pyx_n_s_shape); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6721; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if ((likely(PyTuple_CheckExact(__pyx_t_3))) || (PyList_CheckExact(__pyx_t_3))) { PyObject* sequence = __pyx_t_3; #if CYTHON_COMPILING_IN_CPYTHON Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6721; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_1 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_2 = PyTuple_GET_ITEM(sequence, 1); } else { __pyx_t_1 = PyList_GET_ITEM(sequence, 0); __pyx_t_2 = PyList_GET_ITEM(sequence, 1); } __Pyx_INCREF(__pyx_t_1); __Pyx_INCREF(__pyx_t_2); #else __pyx_t_1 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6721; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6721; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); #endif __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else { Py_ssize_t index = -1; __pyx_t_13 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6721; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_14 = Py_TYPE(__pyx_t_13)->tp_iternext; index = 0; __pyx_t_1 = __pyx_t_14(__pyx_t_13); if (unlikely(!__pyx_t_1)) goto __pyx_L4_unpacking_failed; __Pyx_GOTREF(__pyx_t_1); index = 1; __pyx_t_2 = __pyx_t_14(__pyx_t_13); if (unlikely(!__pyx_t_2)) goto __pyx_L4_unpacking_failed; __Pyx_GOTREF(__pyx_t_2); if (__Pyx_IternextUnpackEndCheck(__pyx_t_14(__pyx_t_13), 2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6721; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_14 = NULL; __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; goto __pyx_L5_unpacking_done; __pyx_L4_unpacking_failed:; __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_14 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6721; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_L5_unpacking_done:; } __pyx_t_11 = __Pyx_PyIndex_AsSsize_t(__pyx_t_1); if (unlikely((__pyx_t_11 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6721; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_9 = __Pyx_PyIndex_AsSsize_t(__pyx_t_2); if (unlikely((__pyx_t_9 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6721; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_N = __pyx_t_11; __pyx_v_K = __pyx_t_9; /* "pandas/src/generated.pyx":6723 * N, K = ( values).shape * * b = 0 # <<<<<<<<<<<<<< * if K > 1: * for i in range(N): */ __pyx_v_b = 0; /* "pandas/src/generated.pyx":6724 * * b = 0 * if K > 1: # <<<<<<<<<<<<<< * for i in range(N): * while b < ngroups - 1 and i >= bins[b]: */ __pyx_t_12 = ((__pyx_v_K > 1) != 0); if (__pyx_t_12) { /* "pandas/src/generated.pyx":6725 * b = 0 * if K > 1: * for i in range(N): # <<<<<<<<<<<<<< * while b < ngroups - 1 and i >= bins[b]: * b += 1 */ __pyx_t_9 = __pyx_v_N; for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_9; __pyx_t_11+=1) { __pyx_v_i = __pyx_t_11; /* "pandas/src/generated.pyx":6726 * if K > 1: * for i in range(N): * while b < ngroups - 1 and i >= bins[b]: # <<<<<<<<<<<<<< * b += 1 * */ while (1) { __pyx_t_12 = ((__pyx_v_b < (__pyx_v_ngroups - 1)) != 0); if (__pyx_t_12) { __pyx_t_15 = __pyx_v_b; __pyx_t_16 = ((__pyx_v_i >= (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_bins.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_bins.diminfo[0].strides))) != 0); __pyx_t_17 = __pyx_t_16; } else { __pyx_t_17 = __pyx_t_12; } if (!__pyx_t_17) break; /* "pandas/src/generated.pyx":6727 * for i in range(N): * while b < ngroups - 1 and i >= bins[b]: * b += 1 # <<<<<<<<<<<<<< * * counts[b] += 1 */ __pyx_v_b = (__pyx_v_b + 1); } /* "pandas/src/generated.pyx":6729 * b += 1 * * counts[b] += 1 # <<<<<<<<<<<<<< * for j in range(K): * val = values[i, j] */ __pyx_t_18 = __pyx_v_b; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_counts.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_counts.diminfo[0].strides) += 1; /* "pandas/src/generated.pyx":6730 * * counts[b] += 1 * for j in range(K): # <<<<<<<<<<<<<< * val = values[i, j] * */ __pyx_t_19 = __pyx_v_K; for (__pyx_t_20 = 0; __pyx_t_20 < __pyx_t_19; __pyx_t_20+=1) { __pyx_v_j = __pyx_t_20; /* "pandas/src/generated.pyx":6731 * counts[b] += 1 * for j in range(K): * val = values[i, j] # <<<<<<<<<<<<<< * * # not nan */ __pyx_t_21 = __pyx_v_i; __pyx_t_22 = __pyx_v_j; __pyx_v_val = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_22, __pyx_pybuffernd_values.diminfo[1].strides)); /* "pandas/src/generated.pyx":6734 * * # not nan * if val == val: # <<<<<<<<<<<<<< * nobs[b, j] += 1 * if val > maxx[b, j]: */ __pyx_t_17 = ((__pyx_v_val == __pyx_v_val) != 0); if (__pyx_t_17) { /* "pandas/src/generated.pyx":6735 * # not nan * if val == val: * nobs[b, j] += 1 # <<<<<<<<<<<<<< * if val > maxx[b, j]: * maxx[b, j] = val */ __pyx_t_23 = __pyx_v_b; __pyx_t_24 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_nobs.rcbuffer->pybuffer.buf, __pyx_t_23, __pyx_pybuffernd_nobs.diminfo[0].strides, __pyx_t_24, __pyx_pybuffernd_nobs.diminfo[1].strides) += 1.0; /* "pandas/src/generated.pyx":6736 * if val == val: * nobs[b, j] += 1 * if val > maxx[b, j]: # <<<<<<<<<<<<<< * maxx[b, j] = val * else: */ __pyx_t_25 = __pyx_v_b; __pyx_t_26 = __pyx_v_j; __pyx_t_17 = ((__pyx_v_val > (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_maxx.rcbuffer->pybuffer.buf, __pyx_t_25, __pyx_pybuffernd_maxx.diminfo[0].strides, __pyx_t_26, __pyx_pybuffernd_maxx.diminfo[1].strides))) != 0); if (__pyx_t_17) { /* "pandas/src/generated.pyx":6737 * nobs[b, j] += 1 * if val > maxx[b, j]: * maxx[b, j] = val # <<<<<<<<<<<<<< * else: * for i in range(N): */ __pyx_t_27 = __pyx_v_b; __pyx_t_28 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_maxx.rcbuffer->pybuffer.buf, __pyx_t_27, __pyx_pybuffernd_maxx.diminfo[0].strides, __pyx_t_28, __pyx_pybuffernd_maxx.diminfo[1].strides) = __pyx_v_val; goto __pyx_L14; } __pyx_L14:; goto __pyx_L13; } __pyx_L13:; } } goto __pyx_L6; } /*else*/ { /* "pandas/src/generated.pyx":6739 * maxx[b, j] = val * else: * for i in range(N): # <<<<<<<<<<<<<< * while b < ngroups - 1 and i >= bins[b]: * b += 1 */ __pyx_t_9 = __pyx_v_N; for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_9; __pyx_t_11+=1) { __pyx_v_i = __pyx_t_11; /* "pandas/src/generated.pyx":6740 * else: * for i in range(N): * while b < ngroups - 1 and i >= bins[b]: # <<<<<<<<<<<<<< * b += 1 * */ while (1) { __pyx_t_17 = ((__pyx_v_b < (__pyx_v_ngroups - 1)) != 0); if (__pyx_t_17) { __pyx_t_19 = __pyx_v_b; __pyx_t_12 = ((__pyx_v_i >= (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_bins.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_bins.diminfo[0].strides))) != 0); __pyx_t_16 = __pyx_t_12; } else { __pyx_t_16 = __pyx_t_17; } if (!__pyx_t_16) break; /* "pandas/src/generated.pyx":6741 * for i in range(N): * while b < ngroups - 1 and i >= bins[b]: * b += 1 # <<<<<<<<<<<<<< * * counts[b] += 1 */ __pyx_v_b = (__pyx_v_b + 1); } /* "pandas/src/generated.pyx":6743 * b += 1 * * counts[b] += 1 # <<<<<<<<<<<<<< * val = values[i, 0] * */ __pyx_t_20 = __pyx_v_b; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_counts.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_counts.diminfo[0].strides) += 1; /* "pandas/src/generated.pyx":6744 * * counts[b] += 1 * val = values[i, 0] # <<<<<<<<<<<<<< * * # not nan */ __pyx_t_29 = __pyx_v_i; __pyx_t_30 = 0; __pyx_v_val = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_29, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_30, __pyx_pybuffernd_values.diminfo[1].strides)); /* "pandas/src/generated.pyx":6747 * * # not nan * if val == val: # <<<<<<<<<<<<<< * nobs[b, 0] += 1 * if val > maxx[b, 0]: */ __pyx_t_16 = ((__pyx_v_val == __pyx_v_val) != 0); if (__pyx_t_16) { /* "pandas/src/generated.pyx":6748 * # not nan * if val == val: * nobs[b, 0] += 1 # <<<<<<<<<<<<<< * if val > maxx[b, 0]: * maxx[b, 0] = val */ __pyx_t_31 = __pyx_v_b; __pyx_t_32 = 0; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_nobs.rcbuffer->pybuffer.buf, __pyx_t_31, __pyx_pybuffernd_nobs.diminfo[0].strides, __pyx_t_32, __pyx_pybuffernd_nobs.diminfo[1].strides) += 1.0; /* "pandas/src/generated.pyx":6749 * if val == val: * nobs[b, 0] += 1 * if val > maxx[b, 0]: # <<<<<<<<<<<<<< * maxx[b, 0] = val * */ __pyx_t_33 = __pyx_v_b; __pyx_t_34 = 0; __pyx_t_16 = ((__pyx_v_val > (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_maxx.rcbuffer->pybuffer.buf, __pyx_t_33, __pyx_pybuffernd_maxx.diminfo[0].strides, __pyx_t_34, __pyx_pybuffernd_maxx.diminfo[1].strides))) != 0); if (__pyx_t_16) { /* "pandas/src/generated.pyx":6750 * nobs[b, 0] += 1 * if val > maxx[b, 0]: * maxx[b, 0] = val # <<<<<<<<<<<<<< * * for i in range(ngroups): */ __pyx_t_35 = __pyx_v_b; __pyx_t_36 = 0; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_maxx.rcbuffer->pybuffer.buf, __pyx_t_35, __pyx_pybuffernd_maxx.diminfo[0].strides, __pyx_t_36, __pyx_pybuffernd_maxx.diminfo[1].strides) = __pyx_v_val; goto __pyx_L20; } __pyx_L20:; goto __pyx_L19; } __pyx_L19:; } } __pyx_L6:; /* "pandas/src/generated.pyx":6752 * maxx[b, 0] = val * * for i in range(ngroups): # <<<<<<<<<<<<<< * for j in range(K): * if nobs[i, j] == 0: */ __pyx_t_9 = __pyx_v_ngroups; for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_9; __pyx_t_11+=1) { __pyx_v_i = __pyx_t_11; /* "pandas/src/generated.pyx":6753 * * for i in range(ngroups): * for j in range(K): # <<<<<<<<<<<<<< * if nobs[i, j] == 0: * out[i, j] = nan */ __pyx_t_37 = __pyx_v_K; for (__pyx_t_38 = 0; __pyx_t_38 < __pyx_t_37; __pyx_t_38+=1) { __pyx_v_j = __pyx_t_38; /* "pandas/src/generated.pyx":6754 * for i in range(ngroups): * for j in range(K): * if nobs[i, j] == 0: # <<<<<<<<<<<<<< * out[i, j] = nan * else: */ __pyx_t_39 = __pyx_v_i; __pyx_t_40 = __pyx_v_j; __pyx_t_16 = (((*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_nobs.rcbuffer->pybuffer.buf, __pyx_t_39, __pyx_pybuffernd_nobs.diminfo[0].strides, __pyx_t_40, __pyx_pybuffernd_nobs.diminfo[1].strides)) == 0.0) != 0); if (__pyx_t_16) { /* "pandas/src/generated.pyx":6755 * for j in range(K): * if nobs[i, j] == 0: * out[i, j] = nan # <<<<<<<<<<<<<< * else: * out[i, j] = maxx[i, j] */ __pyx_t_41 = __pyx_v_i; __pyx_t_42 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_41, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_42, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_6pandas_5algos_nan; goto __pyx_L25; } /*else*/ { /* "pandas/src/generated.pyx":6757 * out[i, j] = nan * else: * out[i, j] = maxx[i, j] # <<<<<<<<<<<<<< * @cython.wraparound(False) * @cython.boundscheck(False) */ __pyx_t_43 = __pyx_v_i; __pyx_t_44 = __pyx_v_j; __pyx_t_45 = __pyx_v_i; __pyx_t_46 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_45, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_46, __pyx_pybuffernd_out.diminfo[1].strides) = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_maxx.rcbuffer->pybuffer.buf, __pyx_t_43, __pyx_pybuffernd_maxx.diminfo[0].strides, __pyx_t_44, __pyx_pybuffernd_maxx.diminfo[1].strides)); } __pyx_L25:; } } /* "pandas/src/generated.pyx":6700 * @cython.wraparound(False) * @cython.boundscheck(False) * def group_max_bin_float64(ndarray[float64_t, ndim=2] out, # <<<<<<<<<<<<<< * ndarray[int64_t] counts, * ndarray[float64_t, ndim=2] 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_13); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_bins.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_counts.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_maxx.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.group_max_bin_float64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_bins.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_counts.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_maxx.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_maxx); __Pyx_XDECREF((PyObject *)__pyx_v_nobs); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":6760 * @cython.wraparound(False) * @cython.boundscheck(False) * def group_max_bin_float32(ndarray[float32_t, ndim=2] out, # <<<<<<<<<<<<<< * ndarray[int64_t] counts, * ndarray[float32_t, ndim=2] values, */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_449group_max_bin_float32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6pandas_5algos_448group_max_bin_float32[] = "\n Only aggregates on axis=0\n "; static PyMethodDef __pyx_mdef_6pandas_5algos_449group_max_bin_float32 = {__Pyx_NAMESTR("group_max_bin_float32"), (PyCFunction)__pyx_pw_6pandas_5algos_449group_max_bin_float32, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_5algos_448group_max_bin_float32)}; static PyObject *__pyx_pw_6pandas_5algos_449group_max_bin_float32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_out = 0; PyArrayObject *__pyx_v_counts = 0; PyArrayObject *__pyx_v_values = 0; PyArrayObject *__pyx_v_bins = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("group_max_bin_float32 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_out,&__pyx_n_s_counts,&__pyx_n_s_values,&__pyx_n_s_bins,0}; PyObject* values[4] = {0,0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_out)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_counts)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("group_max_bin_float32", 1, 4, 4, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6760; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_values)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("group_max_bin_float32", 1, 4, 4, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6760; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_bins)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("group_max_bin_float32", 1, 4, 4, 3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6760; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "group_max_bin_float32") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6760; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 4) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[3] = PyTuple_GET_ITEM(__pyx_args, 3); } __pyx_v_out = ((PyArrayObject *)values[0]); __pyx_v_counts = ((PyArrayObject *)values[1]); __pyx_v_values = ((PyArrayObject *)values[2]); __pyx_v_bins = ((PyArrayObject *)values[3]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("group_max_bin_float32", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6760; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.group_max_bin_float32", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_5numpy_ndarray, 1, "out", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6760; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_counts), __pyx_ptype_5numpy_ndarray, 1, "counts", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6761; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6762; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_bins), __pyx_ptype_5numpy_ndarray, 1, "bins", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6763; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_448group_max_bin_float32(__pyx_self, __pyx_v_out, __pyx_v_counts, __pyx_v_values, __pyx_v_bins); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5algos_448group_max_bin_float32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_out, PyArrayObject *__pyx_v_counts, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_bins) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_N; Py_ssize_t __pyx_v_K; Py_ssize_t __pyx_v_ngroups; Py_ssize_t __pyx_v_b; __pyx_t_5numpy_float32_t __pyx_v_val; PyArrayObject *__pyx_v_maxx = 0; PyArrayObject *__pyx_v_nobs = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_bins; __Pyx_Buffer __pyx_pybuffer_bins; __Pyx_LocalBuf_ND __pyx_pybuffernd_counts; __Pyx_Buffer __pyx_pybuffer_counts; __Pyx_LocalBuf_ND __pyx_pybuffernd_maxx; __Pyx_Buffer __pyx_pybuffer_maxx; __Pyx_LocalBuf_ND __pyx_pybuffernd_nobs; __Pyx_Buffer __pyx_pybuffer_nobs; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __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; PyArrayObject *__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; Py_ssize_t __pyx_t_11; int __pyx_t_12; PyObject *__pyx_t_13 = NULL; PyObject *(*__pyx_t_14)(PyObject *); Py_ssize_t __pyx_t_15; int __pyx_t_16; int __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; long __pyx_t_30; Py_ssize_t __pyx_t_31; long __pyx_t_32; Py_ssize_t __pyx_t_33; long __pyx_t_34; Py_ssize_t __pyx_t_35; long __pyx_t_36; Py_ssize_t __pyx_t_37; Py_ssize_t __pyx_t_38; Py_ssize_t __pyx_t_39; Py_ssize_t __pyx_t_40; Py_ssize_t __pyx_t_41; Py_ssize_t __pyx_t_42; Py_ssize_t __pyx_t_43; Py_ssize_t __pyx_t_44; Py_ssize_t __pyx_t_45; Py_ssize_t __pyx_t_46; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("group_max_bin_float32", 0); __pyx_pybuffer_maxx.pybuffer.buf = NULL; __pyx_pybuffer_maxx.refcount = 0; __pyx_pybuffernd_maxx.data = NULL; __pyx_pybuffernd_maxx.rcbuffer = &__pyx_pybuffer_maxx; __pyx_pybuffer_nobs.pybuffer.buf = NULL; __pyx_pybuffer_nobs.refcount = 0; __pyx_pybuffernd_nobs.data = NULL; __pyx_pybuffernd_nobs.rcbuffer = &__pyx_pybuffer_nobs; __pyx_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; __pyx_pybuffer_counts.pybuffer.buf = NULL; __pyx_pybuffer_counts.refcount = 0; __pyx_pybuffernd_counts.data = NULL; __pyx_pybuffernd_counts.rcbuffer = &__pyx_pybuffer_counts; __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_bins.pybuffer.buf = NULL; __pyx_pybuffer_bins.refcount = 0; __pyx_pybuffernd_bins.data = NULL; __pyx_pybuffernd_bins.rcbuffer = &__pyx_pybuffer_bins; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_v_out, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6760; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; __pyx_pybuffernd_out.diminfo[1].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_out.diminfo[1].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[1]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_counts.rcbuffer->pybuffer, (PyObject*)__pyx_v_counts, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6760; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_counts.diminfo[0].strides = __pyx_pybuffernd_counts.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_counts.diminfo[0].shape = __pyx_pybuffernd_counts.rcbuffer->pybuffer.shape[0]; { __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_float32_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6760; __pyx_clineno = __LINE__; goto __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_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_bins.rcbuffer->pybuffer, (PyObject*)__pyx_v_bins, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6760; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_bins.diminfo[0].strides = __pyx_pybuffernd_bins.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_bins.diminfo[0].shape = __pyx_pybuffernd_bins.rcbuffer->pybuffer.shape[0]; /* "pandas/src/generated.pyx":6772 * ndarray[float32_t, ndim=2] maxx, nobs * * nobs = np.zeros_like(out) # <<<<<<<<<<<<<< * maxx = np.empty_like(out) * maxx.fill(-np.inf) */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6772; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_zeros_like); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6772; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 6772; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)__pyx_v_out)); PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_out)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out)); __pyx_t_3 = PyObject_Call(__pyx_t_2, __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6772; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6772; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_4 = ((PyArrayObject *)__pyx_t_3); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer); __pyx_t_5 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer, (PyObject*)__pyx_t_4, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_nobs.rcbuffer->pybuffer, (PyObject*)__pyx_v_nobs, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_pybuffernd_nobs.diminfo[0].strides = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_nobs.diminfo[0].shape = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_nobs.diminfo[1].strides = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_nobs.diminfo[1].shape = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.shape[1]; if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6772; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_4 = 0; __pyx_v_nobs = ((PyArrayObject *)__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/generated.pyx":6773 * * nobs = np.zeros_like(out) * maxx = np.empty_like(out) # <<<<<<<<<<<<<< * maxx.fill(-np.inf) * */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6773; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_empty_like); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6773; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6773; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(((PyObject *)__pyx_v_out)); PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_v_out)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out)); __pyx_t_2 = PyObject_Call(__pyx_t_1, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6773; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6773; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_4 = ((PyArrayObject *)__pyx_t_2); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_maxx.rcbuffer->pybuffer); __pyx_t_5 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_maxx.rcbuffer->pybuffer, (PyObject*)__pyx_t_4, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_maxx.rcbuffer->pybuffer, (PyObject*)__pyx_v_maxx, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_pybuffernd_maxx.diminfo[0].strides = __pyx_pybuffernd_maxx.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_maxx.diminfo[0].shape = __pyx_pybuffernd_maxx.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_maxx.diminfo[1].strides = __pyx_pybuffernd_maxx.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_maxx.diminfo[1].shape = __pyx_pybuffernd_maxx.rcbuffer->pybuffer.shape[1]; if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6773; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_4 = 0; __pyx_v_maxx = ((PyArrayObject *)__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":6774 * nobs = np.zeros_like(out) * maxx = np.empty_like(out) * maxx.fill(-np.inf) # <<<<<<<<<<<<<< * * if bins[len(bins) - 1] == len(values): */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_maxx), __pyx_n_s_fill); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6774; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6774; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_inf); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6774; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyNumber_Negative(__pyx_t_1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6774; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6774; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyObject_Call(__pyx_t_2, __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6774; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/generated.pyx":6776 * maxx.fill(-np.inf) * * if bins[len(bins) - 1] == len(values): # <<<<<<<<<<<<<< * ngroups = len(bins) * else: */ __pyx_t_9 = PyObject_Length(((PyObject *)__pyx_v_bins)); if (unlikely(__pyx_t_9 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6776; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_10 = (__pyx_t_9 - 1); __pyx_t_11 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6776; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_12 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_bins.rcbuffer->pybuffer.buf, __pyx_t_10, __pyx_pybuffernd_bins.diminfo[0].strides)) == __pyx_t_11) != 0); if (__pyx_t_12) { /* "pandas/src/generated.pyx":6777 * * if bins[len(bins) - 1] == len(values): * ngroups = len(bins) # <<<<<<<<<<<<<< * else: * ngroups = len(bins) + 1 */ __pyx_t_11 = PyObject_Length(((PyObject *)__pyx_v_bins)); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6777; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_ngroups = __pyx_t_11; goto __pyx_L3; } /*else*/ { /* "pandas/src/generated.pyx":6779 * ngroups = len(bins) * else: * ngroups = len(bins) + 1 # <<<<<<<<<<<<<< * * N, K = ( values).shape */ __pyx_t_11 = PyObject_Length(((PyObject *)__pyx_v_bins)); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6779; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_ngroups = (__pyx_t_11 + 1); } __pyx_L3:; /* "pandas/src/generated.pyx":6781 * ngroups = len(bins) + 1 * * N, K = ( values).shape # <<<<<<<<<<<<<< * * b = 0 */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_values), __pyx_n_s_shape); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6781; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if ((likely(PyTuple_CheckExact(__pyx_t_3))) || (PyList_CheckExact(__pyx_t_3))) { PyObject* sequence = __pyx_t_3; #if CYTHON_COMPILING_IN_CPYTHON Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6781; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_1 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_2 = PyTuple_GET_ITEM(sequence, 1); } else { __pyx_t_1 = PyList_GET_ITEM(sequence, 0); __pyx_t_2 = PyList_GET_ITEM(sequence, 1); } __Pyx_INCREF(__pyx_t_1); __Pyx_INCREF(__pyx_t_2); #else __pyx_t_1 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6781; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6781; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); #endif __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else { Py_ssize_t index = -1; __pyx_t_13 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6781; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_14 = Py_TYPE(__pyx_t_13)->tp_iternext; index = 0; __pyx_t_1 = __pyx_t_14(__pyx_t_13); if (unlikely(!__pyx_t_1)) goto __pyx_L4_unpacking_failed; __Pyx_GOTREF(__pyx_t_1); index = 1; __pyx_t_2 = __pyx_t_14(__pyx_t_13); if (unlikely(!__pyx_t_2)) goto __pyx_L4_unpacking_failed; __Pyx_GOTREF(__pyx_t_2); if (__Pyx_IternextUnpackEndCheck(__pyx_t_14(__pyx_t_13), 2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6781; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_14 = NULL; __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; goto __pyx_L5_unpacking_done; __pyx_L4_unpacking_failed:; __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_14 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6781; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_L5_unpacking_done:; } __pyx_t_11 = __Pyx_PyIndex_AsSsize_t(__pyx_t_1); if (unlikely((__pyx_t_11 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6781; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_9 = __Pyx_PyIndex_AsSsize_t(__pyx_t_2); if (unlikely((__pyx_t_9 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6781; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_N = __pyx_t_11; __pyx_v_K = __pyx_t_9; /* "pandas/src/generated.pyx":6783 * N, K = ( values).shape * * b = 0 # <<<<<<<<<<<<<< * if K > 1: * for i in range(N): */ __pyx_v_b = 0; /* "pandas/src/generated.pyx":6784 * * b = 0 * if K > 1: # <<<<<<<<<<<<<< * for i in range(N): * while b < ngroups - 1 and i >= bins[b]: */ __pyx_t_12 = ((__pyx_v_K > 1) != 0); if (__pyx_t_12) { /* "pandas/src/generated.pyx":6785 * b = 0 * if K > 1: * for i in range(N): # <<<<<<<<<<<<<< * while b < ngroups - 1 and i >= bins[b]: * b += 1 */ __pyx_t_9 = __pyx_v_N; for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_9; __pyx_t_11+=1) { __pyx_v_i = __pyx_t_11; /* "pandas/src/generated.pyx":6786 * if K > 1: * for i in range(N): * while b < ngroups - 1 and i >= bins[b]: # <<<<<<<<<<<<<< * b += 1 * */ while (1) { __pyx_t_12 = ((__pyx_v_b < (__pyx_v_ngroups - 1)) != 0); if (__pyx_t_12) { __pyx_t_15 = __pyx_v_b; __pyx_t_16 = ((__pyx_v_i >= (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_bins.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_bins.diminfo[0].strides))) != 0); __pyx_t_17 = __pyx_t_16; } else { __pyx_t_17 = __pyx_t_12; } if (!__pyx_t_17) break; /* "pandas/src/generated.pyx":6787 * for i in range(N): * while b < ngroups - 1 and i >= bins[b]: * b += 1 # <<<<<<<<<<<<<< * * counts[b] += 1 */ __pyx_v_b = (__pyx_v_b + 1); } /* "pandas/src/generated.pyx":6789 * b += 1 * * counts[b] += 1 # <<<<<<<<<<<<<< * for j in range(K): * val = values[i, j] */ __pyx_t_18 = __pyx_v_b; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_counts.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_counts.diminfo[0].strides) += 1; /* "pandas/src/generated.pyx":6790 * * counts[b] += 1 * for j in range(K): # <<<<<<<<<<<<<< * val = values[i, j] * */ __pyx_t_19 = __pyx_v_K; for (__pyx_t_20 = 0; __pyx_t_20 < __pyx_t_19; __pyx_t_20+=1) { __pyx_v_j = __pyx_t_20; /* "pandas/src/generated.pyx":6791 * counts[b] += 1 * for j in range(K): * val = values[i, j] # <<<<<<<<<<<<<< * * # not nan */ __pyx_t_21 = __pyx_v_i; __pyx_t_22 = __pyx_v_j; __pyx_v_val = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_22, __pyx_pybuffernd_values.diminfo[1].strides)); /* "pandas/src/generated.pyx":6794 * * # not nan * if val == val: # <<<<<<<<<<<<<< * nobs[b, j] += 1 * if val > maxx[b, j]: */ __pyx_t_17 = ((__pyx_v_val == __pyx_v_val) != 0); if (__pyx_t_17) { /* "pandas/src/generated.pyx":6795 * # not nan * if val == val: * nobs[b, j] += 1 # <<<<<<<<<<<<<< * if val > maxx[b, j]: * maxx[b, j] = val */ __pyx_t_23 = __pyx_v_b; __pyx_t_24 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_nobs.rcbuffer->pybuffer.buf, __pyx_t_23, __pyx_pybuffernd_nobs.diminfo[0].strides, __pyx_t_24, __pyx_pybuffernd_nobs.diminfo[1].strides) += 1.0; /* "pandas/src/generated.pyx":6796 * if val == val: * nobs[b, j] += 1 * if val > maxx[b, j]: # <<<<<<<<<<<<<< * maxx[b, j] = val * else: */ __pyx_t_25 = __pyx_v_b; __pyx_t_26 = __pyx_v_j; __pyx_t_17 = ((__pyx_v_val > (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_maxx.rcbuffer->pybuffer.buf, __pyx_t_25, __pyx_pybuffernd_maxx.diminfo[0].strides, __pyx_t_26, __pyx_pybuffernd_maxx.diminfo[1].strides))) != 0); if (__pyx_t_17) { /* "pandas/src/generated.pyx":6797 * nobs[b, j] += 1 * if val > maxx[b, j]: * maxx[b, j] = val # <<<<<<<<<<<<<< * else: * for i in range(N): */ __pyx_t_27 = __pyx_v_b; __pyx_t_28 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_maxx.rcbuffer->pybuffer.buf, __pyx_t_27, __pyx_pybuffernd_maxx.diminfo[0].strides, __pyx_t_28, __pyx_pybuffernd_maxx.diminfo[1].strides) = __pyx_v_val; goto __pyx_L14; } __pyx_L14:; goto __pyx_L13; } __pyx_L13:; } } goto __pyx_L6; } /*else*/ { /* "pandas/src/generated.pyx":6799 * maxx[b, j] = val * else: * for i in range(N): # <<<<<<<<<<<<<< * while b < ngroups - 1 and i >= bins[b]: * b += 1 */ __pyx_t_9 = __pyx_v_N; for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_9; __pyx_t_11+=1) { __pyx_v_i = __pyx_t_11; /* "pandas/src/generated.pyx":6800 * else: * for i in range(N): * while b < ngroups - 1 and i >= bins[b]: # <<<<<<<<<<<<<< * b += 1 * */ while (1) { __pyx_t_17 = ((__pyx_v_b < (__pyx_v_ngroups - 1)) != 0); if (__pyx_t_17) { __pyx_t_19 = __pyx_v_b; __pyx_t_12 = ((__pyx_v_i >= (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_bins.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_bins.diminfo[0].strides))) != 0); __pyx_t_16 = __pyx_t_12; } else { __pyx_t_16 = __pyx_t_17; } if (!__pyx_t_16) break; /* "pandas/src/generated.pyx":6801 * for i in range(N): * while b < ngroups - 1 and i >= bins[b]: * b += 1 # <<<<<<<<<<<<<< * * counts[b] += 1 */ __pyx_v_b = (__pyx_v_b + 1); } /* "pandas/src/generated.pyx":6803 * b += 1 * * counts[b] += 1 # <<<<<<<<<<<<<< * val = values[i, 0] * */ __pyx_t_20 = __pyx_v_b; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_counts.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_counts.diminfo[0].strides) += 1; /* "pandas/src/generated.pyx":6804 * * counts[b] += 1 * val = values[i, 0] # <<<<<<<<<<<<<< * * # not nan */ __pyx_t_29 = __pyx_v_i; __pyx_t_30 = 0; __pyx_v_val = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_29, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_30, __pyx_pybuffernd_values.diminfo[1].strides)); /* "pandas/src/generated.pyx":6807 * * # not nan * if val == val: # <<<<<<<<<<<<<< * nobs[b, 0] += 1 * if val > maxx[b, 0]: */ __pyx_t_16 = ((__pyx_v_val == __pyx_v_val) != 0); if (__pyx_t_16) { /* "pandas/src/generated.pyx":6808 * # not nan * if val == val: * nobs[b, 0] += 1 # <<<<<<<<<<<<<< * if val > maxx[b, 0]: * maxx[b, 0] = val */ __pyx_t_31 = __pyx_v_b; __pyx_t_32 = 0; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_nobs.rcbuffer->pybuffer.buf, __pyx_t_31, __pyx_pybuffernd_nobs.diminfo[0].strides, __pyx_t_32, __pyx_pybuffernd_nobs.diminfo[1].strides) += 1.0; /* "pandas/src/generated.pyx":6809 * if val == val: * nobs[b, 0] += 1 * if val > maxx[b, 0]: # <<<<<<<<<<<<<< * maxx[b, 0] = val * */ __pyx_t_33 = __pyx_v_b; __pyx_t_34 = 0; __pyx_t_16 = ((__pyx_v_val > (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_maxx.rcbuffer->pybuffer.buf, __pyx_t_33, __pyx_pybuffernd_maxx.diminfo[0].strides, __pyx_t_34, __pyx_pybuffernd_maxx.diminfo[1].strides))) != 0); if (__pyx_t_16) { /* "pandas/src/generated.pyx":6810 * nobs[b, 0] += 1 * if val > maxx[b, 0]: * maxx[b, 0] = val # <<<<<<<<<<<<<< * * for i in range(ngroups): */ __pyx_t_35 = __pyx_v_b; __pyx_t_36 = 0; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_maxx.rcbuffer->pybuffer.buf, __pyx_t_35, __pyx_pybuffernd_maxx.diminfo[0].strides, __pyx_t_36, __pyx_pybuffernd_maxx.diminfo[1].strides) = __pyx_v_val; goto __pyx_L20; } __pyx_L20:; goto __pyx_L19; } __pyx_L19:; } } __pyx_L6:; /* "pandas/src/generated.pyx":6812 * maxx[b, 0] = val * * for i in range(ngroups): # <<<<<<<<<<<<<< * for j in range(K): * if nobs[i, j] == 0: */ __pyx_t_9 = __pyx_v_ngroups; for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_9; __pyx_t_11+=1) { __pyx_v_i = __pyx_t_11; /* "pandas/src/generated.pyx":6813 * * for i in range(ngroups): * for j in range(K): # <<<<<<<<<<<<<< * if nobs[i, j] == 0: * out[i, j] = nan */ __pyx_t_37 = __pyx_v_K; for (__pyx_t_38 = 0; __pyx_t_38 < __pyx_t_37; __pyx_t_38+=1) { __pyx_v_j = __pyx_t_38; /* "pandas/src/generated.pyx":6814 * for i in range(ngroups): * for j in range(K): * if nobs[i, j] == 0: # <<<<<<<<<<<<<< * out[i, j] = nan * else: */ __pyx_t_39 = __pyx_v_i; __pyx_t_40 = __pyx_v_j; __pyx_t_16 = (((*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_nobs.rcbuffer->pybuffer.buf, __pyx_t_39, __pyx_pybuffernd_nobs.diminfo[0].strides, __pyx_t_40, __pyx_pybuffernd_nobs.diminfo[1].strides)) == 0.0) != 0); if (__pyx_t_16) { /* "pandas/src/generated.pyx":6815 * for j in range(K): * if nobs[i, j] == 0: * out[i, j] = nan # <<<<<<<<<<<<<< * else: * out[i, j] = maxx[i, j] */ __pyx_t_41 = __pyx_v_i; __pyx_t_42 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_41, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_42, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_6pandas_5algos_nan; goto __pyx_L25; } /*else*/ { /* "pandas/src/generated.pyx":6817 * out[i, j] = nan * else: * out[i, j] = maxx[i, j] # <<<<<<<<<<<<<< * * @cython.wraparound(False) */ __pyx_t_43 = __pyx_v_i; __pyx_t_44 = __pyx_v_j; __pyx_t_45 = __pyx_v_i; __pyx_t_46 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_45, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_46, __pyx_pybuffernd_out.diminfo[1].strides) = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_maxx.rcbuffer->pybuffer.buf, __pyx_t_43, __pyx_pybuffernd_maxx.diminfo[0].strides, __pyx_t_44, __pyx_pybuffernd_maxx.diminfo[1].strides)); } __pyx_L25:; } } /* "pandas/src/generated.pyx":6760 * @cython.wraparound(False) * @cython.boundscheck(False) * def group_max_bin_float32(ndarray[float32_t, ndim=2] out, # <<<<<<<<<<<<<< * ndarray[int64_t] counts, * ndarray[float32_t, ndim=2] 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_13); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_bins.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_counts.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_maxx.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.group_max_bin_float32", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_bins.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_counts.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_maxx.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_maxx); __Pyx_XDECREF((PyObject *)__pyx_v_nobs); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":6821 * @cython.wraparound(False) * @cython.boundscheck(False) * def group_ohlc_float64(ndarray[float64_t, ndim=2] out, # <<<<<<<<<<<<<< * ndarray[int64_t] counts, * ndarray[float64_t, ndim=2] values, */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_451group_ohlc_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6pandas_5algos_450group_ohlc_float64[] = "\n Only aggregates on axis=0\n "; static PyMethodDef __pyx_mdef_6pandas_5algos_451group_ohlc_float64 = {__Pyx_NAMESTR("group_ohlc_float64"), (PyCFunction)__pyx_pw_6pandas_5algos_451group_ohlc_float64, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_5algos_450group_ohlc_float64)}; static PyObject *__pyx_pw_6pandas_5algos_451group_ohlc_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_out = 0; PyArrayObject *__pyx_v_counts = 0; PyArrayObject *__pyx_v_values = 0; PyArrayObject *__pyx_v_bins = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("group_ohlc_float64 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_out,&__pyx_n_s_counts,&__pyx_n_s_values,&__pyx_n_s_bins,0}; PyObject* values[4] = {0,0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_out)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_counts)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("group_ohlc_float64", 1, 4, 4, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6821; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_values)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("group_ohlc_float64", 1, 4, 4, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6821; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_bins)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("group_ohlc_float64", 1, 4, 4, 3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6821; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "group_ohlc_float64") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6821; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 4) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[3] = PyTuple_GET_ITEM(__pyx_args, 3); } __pyx_v_out = ((PyArrayObject *)values[0]); __pyx_v_counts = ((PyArrayObject *)values[1]); __pyx_v_values = ((PyArrayObject *)values[2]); __pyx_v_bins = ((PyArrayObject *)values[3]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("group_ohlc_float64", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6821; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.group_ohlc_float64", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_5numpy_ndarray, 1, "out", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6821; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_counts), __pyx_ptype_5numpy_ndarray, 1, "counts", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6822; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6823; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_bins), __pyx_ptype_5numpy_ndarray, 1, "bins", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6824; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_450group_ohlc_float64(__pyx_self, __pyx_v_out, __pyx_v_counts, __pyx_v_values, __pyx_v_bins); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5algos_450group_ohlc_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_out, PyArrayObject *__pyx_v_counts, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_bins) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_N; Py_ssize_t __pyx_v_K; Py_ssize_t __pyx_v_ngroups; Py_ssize_t __pyx_v_b; __pyx_t_5numpy_float64_t __pyx_v_val; __pyx_t_5numpy_float64_t __pyx_v_vopen; __pyx_t_5numpy_float64_t __pyx_v_vhigh; __pyx_t_5numpy_float64_t __pyx_v_vlow; __pyx_t_5numpy_float64_t __pyx_v_vclose; __pyx_t_5numpy_float64_t __pyx_v_NA; int __pyx_v_got_first; __Pyx_LocalBuf_ND __pyx_pybuffernd_bins; __Pyx_Buffer __pyx_pybuffer_bins; __Pyx_LocalBuf_ND __pyx_pybuffernd_counts; __Pyx_Buffer __pyx_pybuffer_counts; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_values; __Pyx_Buffer __pyx_pybuffer_values; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; Py_ssize_t __pyx_t_2; Py_ssize_t __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)(PyObject *); __pyx_t_5numpy_float64_t __pyx_t_10; Py_ssize_t __pyx_t_11; int __pyx_t_12; int __pyx_t_13; Py_ssize_t __pyx_t_14; long __pyx_t_15; Py_ssize_t __pyx_t_16; long __pyx_t_17; Py_ssize_t __pyx_t_18; long __pyx_t_19; Py_ssize_t __pyx_t_20; long __pyx_t_21; Py_ssize_t __pyx_t_22; long __pyx_t_23; Py_ssize_t __pyx_t_24; long __pyx_t_25; Py_ssize_t __pyx_t_26; long __pyx_t_27; Py_ssize_t __pyx_t_28; long __pyx_t_29; Py_ssize_t __pyx_t_30; Py_ssize_t __pyx_t_31; long __pyx_t_32; long __pyx_t_33; long __pyx_t_34; Py_ssize_t __pyx_t_35; long __pyx_t_36; Py_ssize_t __pyx_t_37; long __pyx_t_38; Py_ssize_t __pyx_t_39; long __pyx_t_40; Py_ssize_t __pyx_t_41; long __pyx_t_42; Py_ssize_t __pyx_t_43; long __pyx_t_44; Py_ssize_t __pyx_t_45; long __pyx_t_46; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("group_ohlc_float64", 0); __pyx_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; __pyx_pybuffer_counts.pybuffer.buf = NULL; __pyx_pybuffer_counts.refcount = 0; __pyx_pybuffernd_counts.data = NULL; __pyx_pybuffernd_counts.rcbuffer = &__pyx_pybuffer_counts; __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_bins.pybuffer.buf = NULL; __pyx_pybuffer_bins.refcount = 0; __pyx_pybuffernd_bins.data = NULL; __pyx_pybuffernd_bins.rcbuffer = &__pyx_pybuffer_bins; { __Pyx_BufFmt_StackElem __pyx_stack[1]; 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, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6821; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; __pyx_pybuffernd_out.diminfo[1].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_out.diminfo[1].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[1]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_counts.rcbuffer->pybuffer, (PyObject*)__pyx_v_counts, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6821; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_counts.diminfo[0].strides = __pyx_pybuffernd_counts.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_counts.diminfo[0].shape = __pyx_pybuffernd_counts.rcbuffer->pybuffer.shape[0]; { __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, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6821; __pyx_clineno = __LINE__; goto __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_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_bins.rcbuffer->pybuffer, (PyObject*)__pyx_v_bins, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6821; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_bins.diminfo[0].strides = __pyx_pybuffernd_bins.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_bins.diminfo[0].shape = __pyx_pybuffernd_bins.rcbuffer->pybuffer.shape[0]; /* "pandas/src/generated.pyx":6832 * float64_t val, count * float64_t vopen, vhigh, vlow, vclose, NA * bint got_first = 0 # <<<<<<<<<<<<<< * * if bins[len(bins) - 1] == len(values): */ __pyx_v_got_first = 0; /* "pandas/src/generated.pyx":6834 * bint got_first = 0 * * if bins[len(bins) - 1] == len(values): # <<<<<<<<<<<<<< * ngroups = len(bins) * else: */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_bins)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6834; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_2 = (__pyx_t_1 - 1); __pyx_t_3 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6834; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_4 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_bins.rcbuffer->pybuffer.buf, __pyx_t_2, __pyx_pybuffernd_bins.diminfo[0].strides)) == __pyx_t_3) != 0); if (__pyx_t_4) { /* "pandas/src/generated.pyx":6835 * * if bins[len(bins) - 1] == len(values): * ngroups = len(bins) # <<<<<<<<<<<<<< * else: * ngroups = len(bins) + 1 */ __pyx_t_3 = PyObject_Length(((PyObject *)__pyx_v_bins)); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6835; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_ngroups = __pyx_t_3; goto __pyx_L3; } /*else*/ { /* "pandas/src/generated.pyx":6837 * ngroups = len(bins) * else: * ngroups = len(bins) + 1 # <<<<<<<<<<<<<< * * N, K = ( values).shape */ __pyx_t_3 = PyObject_Length(((PyObject *)__pyx_v_bins)); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6837; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_ngroups = (__pyx_t_3 + 1); } __pyx_L3:; /* "pandas/src/generated.pyx":6839 * ngroups = len(bins) + 1 * * N, K = ( values).shape # <<<<<<<<<<<<<< * * if out.shape[1] != 4: */ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_values), __pyx_n_s_shape); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6839; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); if ((likely(PyTuple_CheckExact(__pyx_t_5))) || (PyList_CheckExact(__pyx_t_5))) { PyObject* sequence = __pyx_t_5; #if CYTHON_COMPILING_IN_CPYTHON Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6839; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_6 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_7 = PyTuple_GET_ITEM(sequence, 1); } else { __pyx_t_6 = PyList_GET_ITEM(sequence, 0); __pyx_t_7 = PyList_GET_ITEM(sequence, 1); } __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(__pyx_t_7); #else __pyx_t_6 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6839; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6839; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); #endif __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } else { Py_ssize_t index = -1; __pyx_t_8 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6839; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_9 = Py_TYPE(__pyx_t_8)->tp_iternext; index = 0; __pyx_t_6 = __pyx_t_9(__pyx_t_8); if (unlikely(!__pyx_t_6)) goto __pyx_L4_unpacking_failed; __Pyx_GOTREF(__pyx_t_6); index = 1; __pyx_t_7 = __pyx_t_9(__pyx_t_8); if (unlikely(!__pyx_t_7)) goto __pyx_L4_unpacking_failed; __Pyx_GOTREF(__pyx_t_7); if (__Pyx_IternextUnpackEndCheck(__pyx_t_9(__pyx_t_8), 2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6839; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_9 = NULL; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; goto __pyx_L5_unpacking_done; __pyx_L4_unpacking_failed:; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_9 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6839; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_L5_unpacking_done:; } __pyx_t_3 = __Pyx_PyIndex_AsSsize_t(__pyx_t_6); if (unlikely((__pyx_t_3 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6839; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_1 = __Pyx_PyIndex_AsSsize_t(__pyx_t_7); if (unlikely((__pyx_t_1 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6839; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_v_N = __pyx_t_3; __pyx_v_K = __pyx_t_1; /* "pandas/src/generated.pyx":6841 * N, K = ( values).shape * * if out.shape[1] != 4: # <<<<<<<<<<<<<< * raise ValueError('Output array must have 4 columns') * */ __pyx_t_4 = (((__pyx_v_out->dimensions[1]) != 4) != 0); if (__pyx_t_4) { /* "pandas/src/generated.pyx":6842 * * if out.shape[1] != 4: * raise ValueError('Output array must have 4 columns') # <<<<<<<<<<<<<< * * NA = np.nan */ __pyx_t_5 = PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__193, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6842; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_Raise(__pyx_t_5, 0, 0, 0); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6842; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } /* "pandas/src/generated.pyx":6844 * raise ValueError('Output array must have 4 columns') * * NA = np.nan # <<<<<<<<<<<<<< * * b = 0 */ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6844; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_nan); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6844; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_10 = __pyx_PyFloat_AsDouble(__pyx_t_7); if (unlikely((__pyx_t_10 == (npy_float64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6844; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_v_NA = __pyx_t_10; /* "pandas/src/generated.pyx":6846 * NA = np.nan * * b = 0 # <<<<<<<<<<<<<< * if K > 1: * raise NotImplementedError */ __pyx_v_b = 0; /* "pandas/src/generated.pyx":6847 * * b = 0 * if K > 1: # <<<<<<<<<<<<<< * raise NotImplementedError * else: */ __pyx_t_4 = ((__pyx_v_K > 1) != 0); if (__pyx_t_4) { /* "pandas/src/generated.pyx":6848 * b = 0 * if K > 1: * raise NotImplementedError # <<<<<<<<<<<<<< * else: * for i in range(N): */ __Pyx_Raise(__pyx_builtin_NotImplementedError, 0, 0, 0); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6848; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } /*else*/ { /* "pandas/src/generated.pyx":6850 * raise NotImplementedError * else: * for i in range(N): # <<<<<<<<<<<<<< * while b < ngroups - 1 and i >= bins[b]: * if not got_first: */ __pyx_t_1 = __pyx_v_N; for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_1; __pyx_t_3+=1) { __pyx_v_i = __pyx_t_3; /* "pandas/src/generated.pyx":6851 * else: * for i in range(N): * while b < ngroups - 1 and i >= bins[b]: # <<<<<<<<<<<<<< * if not got_first: * out[b, 0] = NA */ while (1) { __pyx_t_4 = ((__pyx_v_b < (__pyx_v_ngroups - 1)) != 0); if (__pyx_t_4) { __pyx_t_11 = __pyx_v_b; __pyx_t_12 = ((__pyx_v_i >= (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_bins.rcbuffer->pybuffer.buf, __pyx_t_11, __pyx_pybuffernd_bins.diminfo[0].strides))) != 0); __pyx_t_13 = __pyx_t_12; } else { __pyx_t_13 = __pyx_t_4; } if (!__pyx_t_13) break; /* "pandas/src/generated.pyx":6852 * for i in range(N): * while b < ngroups - 1 and i >= bins[b]: * if not got_first: # <<<<<<<<<<<<<< * out[b, 0] = NA * out[b, 1] = NA */ __pyx_t_13 = ((!(__pyx_v_got_first != 0)) != 0); if (__pyx_t_13) { /* "pandas/src/generated.pyx":6853 * while b < ngroups - 1 and i >= bins[b]: * if not got_first: * out[b, 0] = NA # <<<<<<<<<<<<<< * out[b, 1] = NA * out[b, 2] = NA */ __pyx_t_14 = __pyx_v_b; __pyx_t_15 = 0; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_15, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_NA; /* "pandas/src/generated.pyx":6854 * if not got_first: * out[b, 0] = NA * out[b, 1] = NA # <<<<<<<<<<<<<< * out[b, 2] = NA * out[b, 3] = NA */ __pyx_t_16 = __pyx_v_b; __pyx_t_17 = 1; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_17, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_NA; /* "pandas/src/generated.pyx":6855 * out[b, 0] = NA * out[b, 1] = NA * out[b, 2] = NA # <<<<<<<<<<<<<< * out[b, 3] = NA * else: */ __pyx_t_18 = __pyx_v_b; __pyx_t_19 = 2; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_19, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_NA; /* "pandas/src/generated.pyx":6856 * out[b, 1] = NA * out[b, 2] = NA * out[b, 3] = NA # <<<<<<<<<<<<<< * else: * out[b, 0] = vopen */ __pyx_t_20 = __pyx_v_b; __pyx_t_21 = 3; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_21, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_NA; goto __pyx_L12; } /*else*/ { /* "pandas/src/generated.pyx":6858 * out[b, 3] = NA * else: * out[b, 0] = vopen # <<<<<<<<<<<<<< * out[b, 1] = vhigh * out[b, 2] = vlow */ __pyx_t_22 = __pyx_v_b; __pyx_t_23 = 0; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_22, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_23, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_vopen; /* "pandas/src/generated.pyx":6859 * else: * out[b, 0] = vopen * out[b, 1] = vhigh # <<<<<<<<<<<<<< * out[b, 2] = vlow * out[b, 3] = vclose */ __pyx_t_24 = __pyx_v_b; __pyx_t_25 = 1; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_24, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_25, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_vhigh; /* "pandas/src/generated.pyx":6860 * out[b, 0] = vopen * out[b, 1] = vhigh * out[b, 2] = vlow # <<<<<<<<<<<<<< * out[b, 3] = vclose * b += 1 */ __pyx_t_26 = __pyx_v_b; __pyx_t_27 = 2; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_26, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_27, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_vlow; /* "pandas/src/generated.pyx":6861 * out[b, 1] = vhigh * out[b, 2] = vlow * out[b, 3] = vclose # <<<<<<<<<<<<<< * b += 1 * got_first = 0 */ __pyx_t_28 = __pyx_v_b; __pyx_t_29 = 3; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_28, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_29, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_vclose; } __pyx_L12:; /* "pandas/src/generated.pyx":6862 * out[b, 2] = vlow * out[b, 3] = vclose * b += 1 # <<<<<<<<<<<<<< * got_first = 0 * */ __pyx_v_b = (__pyx_v_b + 1); /* "pandas/src/generated.pyx":6863 * out[b, 3] = vclose * b += 1 * got_first = 0 # <<<<<<<<<<<<<< * * counts[b] += 1 */ __pyx_v_got_first = 0; } /* "pandas/src/generated.pyx":6865 * got_first = 0 * * counts[b] += 1 # <<<<<<<<<<<<<< * val = values[i, 0] * */ __pyx_t_30 = __pyx_v_b; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_counts.rcbuffer->pybuffer.buf, __pyx_t_30, __pyx_pybuffernd_counts.diminfo[0].strides) += 1; /* "pandas/src/generated.pyx":6866 * * counts[b] += 1 * val = values[i, 0] # <<<<<<<<<<<<<< * * # not nan */ __pyx_t_31 = __pyx_v_i; __pyx_t_32 = 0; __pyx_v_val = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_31, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_32, __pyx_pybuffernd_values.diminfo[1].strides)); /* "pandas/src/generated.pyx":6869 * * # not nan * if val == val: # <<<<<<<<<<<<<< * if not got_first: * got_first = 1 */ __pyx_t_13 = ((__pyx_v_val == __pyx_v_val) != 0); if (__pyx_t_13) { /* "pandas/src/generated.pyx":6870 * # not nan * if val == val: * if not got_first: # <<<<<<<<<<<<<< * got_first = 1 * vopen = val */ __pyx_t_13 = ((!(__pyx_v_got_first != 0)) != 0); if (__pyx_t_13) { /* "pandas/src/generated.pyx":6871 * if val == val: * if not got_first: * got_first = 1 # <<<<<<<<<<<<<< * vopen = val * vlow = val */ __pyx_v_got_first = 1; /* "pandas/src/generated.pyx":6872 * if not got_first: * got_first = 1 * vopen = val # <<<<<<<<<<<<<< * vlow = val * vhigh = val */ __pyx_v_vopen = __pyx_v_val; /* "pandas/src/generated.pyx":6873 * got_first = 1 * vopen = val * vlow = val # <<<<<<<<<<<<<< * vhigh = val * else: */ __pyx_v_vlow = __pyx_v_val; /* "pandas/src/generated.pyx":6874 * vopen = val * vlow = val * vhigh = val # <<<<<<<<<<<<<< * else: * if val < vlow: */ __pyx_v_vhigh = __pyx_v_val; goto __pyx_L14; } /*else*/ { /* "pandas/src/generated.pyx":6876 * vhigh = val * else: * if val < vlow: # <<<<<<<<<<<<<< * vlow = val * if val > vhigh: */ __pyx_t_13 = ((__pyx_v_val < __pyx_v_vlow) != 0); if (__pyx_t_13) { /* "pandas/src/generated.pyx":6877 * else: * if val < vlow: * vlow = val # <<<<<<<<<<<<<< * if val > vhigh: * vhigh = val */ __pyx_v_vlow = __pyx_v_val; goto __pyx_L15; } __pyx_L15:; /* "pandas/src/generated.pyx":6878 * if val < vlow: * vlow = val * if val > vhigh: # <<<<<<<<<<<<<< * vhigh = val * vclose = val */ __pyx_t_13 = ((__pyx_v_val > __pyx_v_vhigh) != 0); if (__pyx_t_13) { /* "pandas/src/generated.pyx":6879 * vlow = val * if val > vhigh: * vhigh = val # <<<<<<<<<<<<<< * vclose = val * */ __pyx_v_vhigh = __pyx_v_val; goto __pyx_L16; } __pyx_L16:; } __pyx_L14:; /* "pandas/src/generated.pyx":6880 * if val > vhigh: * vhigh = val * vclose = val # <<<<<<<<<<<<<< * * if not got_first: */ __pyx_v_vclose = __pyx_v_val; goto __pyx_L13; } __pyx_L13:; } /* "pandas/src/generated.pyx":6882 * vclose = val * * if not got_first: # <<<<<<<<<<<<<< * out[b, 0] = NA * out[b, 1] = NA */ __pyx_t_13 = ((!(__pyx_v_got_first != 0)) != 0); if (__pyx_t_13) { /* "pandas/src/generated.pyx":6883 * * if not got_first: * out[b, 0] = NA # <<<<<<<<<<<<<< * out[b, 1] = NA * out[b, 2] = NA */ __pyx_t_1 = __pyx_v_b; __pyx_t_33 = 0; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_1, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_33, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_NA; /* "pandas/src/generated.pyx":6884 * if not got_first: * out[b, 0] = NA * out[b, 1] = NA # <<<<<<<<<<<<<< * out[b, 2] = NA * out[b, 3] = NA */ __pyx_t_3 = __pyx_v_b; __pyx_t_34 = 1; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_3, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_34, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_NA; /* "pandas/src/generated.pyx":6885 * out[b, 0] = NA * out[b, 1] = NA * out[b, 2] = NA # <<<<<<<<<<<<<< * out[b, 3] = NA * else: */ __pyx_t_35 = __pyx_v_b; __pyx_t_36 = 2; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_35, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_36, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_NA; /* "pandas/src/generated.pyx":6886 * out[b, 1] = NA * out[b, 2] = NA * out[b, 3] = NA # <<<<<<<<<<<<<< * else: * out[b, 0] = vopen */ __pyx_t_37 = __pyx_v_b; __pyx_t_38 = 3; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_37, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_38, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_NA; goto __pyx_L17; } /*else*/ { /* "pandas/src/generated.pyx":6888 * out[b, 3] = NA * else: * out[b, 0] = vopen # <<<<<<<<<<<<<< * out[b, 1] = vhigh * out[b, 2] = vlow */ __pyx_t_39 = __pyx_v_b; __pyx_t_40 = 0; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_39, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_40, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_vopen; /* "pandas/src/generated.pyx":6889 * else: * out[b, 0] = vopen * out[b, 1] = vhigh # <<<<<<<<<<<<<< * out[b, 2] = vlow * out[b, 3] = vclose */ __pyx_t_41 = __pyx_v_b; __pyx_t_42 = 1; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_41, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_42, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_vhigh; /* "pandas/src/generated.pyx":6890 * out[b, 0] = vopen * out[b, 1] = vhigh * out[b, 2] = vlow # <<<<<<<<<<<<<< * out[b, 3] = vclose * @cython.wraparound(False) */ __pyx_t_43 = __pyx_v_b; __pyx_t_44 = 2; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_43, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_44, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_vlow; /* "pandas/src/generated.pyx":6891 * out[b, 1] = vhigh * out[b, 2] = vlow * out[b, 3] = vclose # <<<<<<<<<<<<<< * @cython.wraparound(False) * @cython.boundscheck(False) */ __pyx_t_45 = __pyx_v_b; __pyx_t_46 = 3; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_45, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_46, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_vclose; } __pyx_L17:; } /* "pandas/src/generated.pyx":6821 * @cython.wraparound(False) * @cython.boundscheck(False) * def group_ohlc_float64(ndarray[float64_t, ndim=2] out, # <<<<<<<<<<<<<< * ndarray[int64_t] counts, * ndarray[float64_t, ndim=2] values, */ /* 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); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_bins.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_counts.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.group_ohlc_float64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_bins.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_counts.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":6894 * @cython.wraparound(False) * @cython.boundscheck(False) * def group_ohlc_float32(ndarray[float32_t, ndim=2] out, # <<<<<<<<<<<<<< * ndarray[int64_t] counts, * ndarray[float32_t, ndim=2] values, */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_453group_ohlc_float32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6pandas_5algos_452group_ohlc_float32[] = "\n Only aggregates on axis=0\n "; static PyMethodDef __pyx_mdef_6pandas_5algos_453group_ohlc_float32 = {__Pyx_NAMESTR("group_ohlc_float32"), (PyCFunction)__pyx_pw_6pandas_5algos_453group_ohlc_float32, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_5algos_452group_ohlc_float32)}; static PyObject *__pyx_pw_6pandas_5algos_453group_ohlc_float32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_out = 0; PyArrayObject *__pyx_v_counts = 0; PyArrayObject *__pyx_v_values = 0; PyArrayObject *__pyx_v_bins = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("group_ohlc_float32 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_out,&__pyx_n_s_counts,&__pyx_n_s_values,&__pyx_n_s_bins,0}; PyObject* values[4] = {0,0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_out)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_counts)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("group_ohlc_float32", 1, 4, 4, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6894; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_values)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("group_ohlc_float32", 1, 4, 4, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6894; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_bins)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("group_ohlc_float32", 1, 4, 4, 3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6894; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "group_ohlc_float32") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6894; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 4) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[3] = PyTuple_GET_ITEM(__pyx_args, 3); } __pyx_v_out = ((PyArrayObject *)values[0]); __pyx_v_counts = ((PyArrayObject *)values[1]); __pyx_v_values = ((PyArrayObject *)values[2]); __pyx_v_bins = ((PyArrayObject *)values[3]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("group_ohlc_float32", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6894; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.group_ohlc_float32", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_5numpy_ndarray, 1, "out", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6894; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_counts), __pyx_ptype_5numpy_ndarray, 1, "counts", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6895; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6896; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_bins), __pyx_ptype_5numpy_ndarray, 1, "bins", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6897; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_452group_ohlc_float32(__pyx_self, __pyx_v_out, __pyx_v_counts, __pyx_v_values, __pyx_v_bins); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5algos_452group_ohlc_float32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_out, PyArrayObject *__pyx_v_counts, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_bins) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_N; Py_ssize_t __pyx_v_K; Py_ssize_t __pyx_v_ngroups; Py_ssize_t __pyx_v_b; __pyx_t_5numpy_float32_t __pyx_v_val; __pyx_t_5numpy_float32_t __pyx_v_vopen; __pyx_t_5numpy_float32_t __pyx_v_vhigh; __pyx_t_5numpy_float32_t __pyx_v_vlow; __pyx_t_5numpy_float32_t __pyx_v_vclose; __pyx_t_5numpy_float32_t __pyx_v_NA; int __pyx_v_got_first; __Pyx_LocalBuf_ND __pyx_pybuffernd_bins; __Pyx_Buffer __pyx_pybuffer_bins; __Pyx_LocalBuf_ND __pyx_pybuffernd_counts; __Pyx_Buffer __pyx_pybuffer_counts; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_values; __Pyx_Buffer __pyx_pybuffer_values; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; Py_ssize_t __pyx_t_2; Py_ssize_t __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)(PyObject *); __pyx_t_5numpy_float32_t __pyx_t_10; Py_ssize_t __pyx_t_11; int __pyx_t_12; int __pyx_t_13; Py_ssize_t __pyx_t_14; long __pyx_t_15; Py_ssize_t __pyx_t_16; long __pyx_t_17; Py_ssize_t __pyx_t_18; long __pyx_t_19; Py_ssize_t __pyx_t_20; long __pyx_t_21; Py_ssize_t __pyx_t_22; long __pyx_t_23; Py_ssize_t __pyx_t_24; long __pyx_t_25; Py_ssize_t __pyx_t_26; long __pyx_t_27; Py_ssize_t __pyx_t_28; long __pyx_t_29; Py_ssize_t __pyx_t_30; Py_ssize_t __pyx_t_31; long __pyx_t_32; long __pyx_t_33; long __pyx_t_34; Py_ssize_t __pyx_t_35; long __pyx_t_36; Py_ssize_t __pyx_t_37; long __pyx_t_38; Py_ssize_t __pyx_t_39; long __pyx_t_40; Py_ssize_t __pyx_t_41; long __pyx_t_42; Py_ssize_t __pyx_t_43; long __pyx_t_44; Py_ssize_t __pyx_t_45; long __pyx_t_46; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("group_ohlc_float32", 0); __pyx_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; __pyx_pybuffer_counts.pybuffer.buf = NULL; __pyx_pybuffer_counts.refcount = 0; __pyx_pybuffernd_counts.data = NULL; __pyx_pybuffernd_counts.rcbuffer = &__pyx_pybuffer_counts; __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_bins.pybuffer.buf = NULL; __pyx_pybuffer_bins.refcount = 0; __pyx_pybuffernd_bins.data = NULL; __pyx_pybuffernd_bins.rcbuffer = &__pyx_pybuffer_bins; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_v_out, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6894; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; __pyx_pybuffernd_out.diminfo[1].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_out.diminfo[1].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[1]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_counts.rcbuffer->pybuffer, (PyObject*)__pyx_v_counts, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6894; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_counts.diminfo[0].strides = __pyx_pybuffernd_counts.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_counts.diminfo[0].shape = __pyx_pybuffernd_counts.rcbuffer->pybuffer.shape[0]; { __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_float32_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6894; __pyx_clineno = __LINE__; goto __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_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_bins.rcbuffer->pybuffer, (PyObject*)__pyx_v_bins, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6894; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_bins.diminfo[0].strides = __pyx_pybuffernd_bins.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_bins.diminfo[0].shape = __pyx_pybuffernd_bins.rcbuffer->pybuffer.shape[0]; /* "pandas/src/generated.pyx":6905 * float32_t val, count * float32_t vopen, vhigh, vlow, vclose, NA * bint got_first = 0 # <<<<<<<<<<<<<< * * if bins[len(bins) - 1] == len(values): */ __pyx_v_got_first = 0; /* "pandas/src/generated.pyx":6907 * bint got_first = 0 * * if bins[len(bins) - 1] == len(values): # <<<<<<<<<<<<<< * ngroups = len(bins) * else: */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_bins)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6907; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_2 = (__pyx_t_1 - 1); __pyx_t_3 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6907; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_4 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_bins.rcbuffer->pybuffer.buf, __pyx_t_2, __pyx_pybuffernd_bins.diminfo[0].strides)) == __pyx_t_3) != 0); if (__pyx_t_4) { /* "pandas/src/generated.pyx":6908 * * if bins[len(bins) - 1] == len(values): * ngroups = len(bins) # <<<<<<<<<<<<<< * else: * ngroups = len(bins) + 1 */ __pyx_t_3 = PyObject_Length(((PyObject *)__pyx_v_bins)); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6908; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_ngroups = __pyx_t_3; goto __pyx_L3; } /*else*/ { /* "pandas/src/generated.pyx":6910 * ngroups = len(bins) * else: * ngroups = len(bins) + 1 # <<<<<<<<<<<<<< * * N, K = ( values).shape */ __pyx_t_3 = PyObject_Length(((PyObject *)__pyx_v_bins)); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6910; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_ngroups = (__pyx_t_3 + 1); } __pyx_L3:; /* "pandas/src/generated.pyx":6912 * ngroups = len(bins) + 1 * * N, K = ( values).shape # <<<<<<<<<<<<<< * * if out.shape[1] != 4: */ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_values), __pyx_n_s_shape); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6912; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); if ((likely(PyTuple_CheckExact(__pyx_t_5))) || (PyList_CheckExact(__pyx_t_5))) { PyObject* sequence = __pyx_t_5; #if CYTHON_COMPILING_IN_CPYTHON Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6912; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_6 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_7 = PyTuple_GET_ITEM(sequence, 1); } else { __pyx_t_6 = PyList_GET_ITEM(sequence, 0); __pyx_t_7 = PyList_GET_ITEM(sequence, 1); } __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(__pyx_t_7); #else __pyx_t_6 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6912; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6912; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); #endif __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } else { Py_ssize_t index = -1; __pyx_t_8 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6912; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_9 = Py_TYPE(__pyx_t_8)->tp_iternext; index = 0; __pyx_t_6 = __pyx_t_9(__pyx_t_8); if (unlikely(!__pyx_t_6)) goto __pyx_L4_unpacking_failed; __Pyx_GOTREF(__pyx_t_6); index = 1; __pyx_t_7 = __pyx_t_9(__pyx_t_8); if (unlikely(!__pyx_t_7)) goto __pyx_L4_unpacking_failed; __Pyx_GOTREF(__pyx_t_7); if (__Pyx_IternextUnpackEndCheck(__pyx_t_9(__pyx_t_8), 2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6912; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_9 = NULL; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; goto __pyx_L5_unpacking_done; __pyx_L4_unpacking_failed:; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_9 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6912; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_L5_unpacking_done:; } __pyx_t_3 = __Pyx_PyIndex_AsSsize_t(__pyx_t_6); if (unlikely((__pyx_t_3 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6912; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_1 = __Pyx_PyIndex_AsSsize_t(__pyx_t_7); if (unlikely((__pyx_t_1 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6912; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_v_N = __pyx_t_3; __pyx_v_K = __pyx_t_1; /* "pandas/src/generated.pyx":6914 * N, K = ( values).shape * * if out.shape[1] != 4: # <<<<<<<<<<<<<< * raise ValueError('Output array must have 4 columns') * */ __pyx_t_4 = (((__pyx_v_out->dimensions[1]) != 4) != 0); if (__pyx_t_4) { /* "pandas/src/generated.pyx":6915 * * if out.shape[1] != 4: * raise ValueError('Output array must have 4 columns') # <<<<<<<<<<<<<< * * NA = np.nan */ __pyx_t_5 = PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__194, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6915; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_Raise(__pyx_t_5, 0, 0, 0); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6915; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } /* "pandas/src/generated.pyx":6917 * raise ValueError('Output array must have 4 columns') * * NA = np.nan # <<<<<<<<<<<<<< * * b = 0 */ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6917; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_nan); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6917; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_10 = __pyx_PyFloat_AsFloat(__pyx_t_7); if (unlikely((__pyx_t_10 == (npy_float32)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6917; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_v_NA = __pyx_t_10; /* "pandas/src/generated.pyx":6919 * NA = np.nan * * b = 0 # <<<<<<<<<<<<<< * if K > 1: * raise NotImplementedError */ __pyx_v_b = 0; /* "pandas/src/generated.pyx":6920 * * b = 0 * if K > 1: # <<<<<<<<<<<<<< * raise NotImplementedError * else: */ __pyx_t_4 = ((__pyx_v_K > 1) != 0); if (__pyx_t_4) { /* "pandas/src/generated.pyx":6921 * b = 0 * if K > 1: * raise NotImplementedError # <<<<<<<<<<<<<< * else: * for i in range(N): */ __Pyx_Raise(__pyx_builtin_NotImplementedError, 0, 0, 0); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6921; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } /*else*/ { /* "pandas/src/generated.pyx":6923 * raise NotImplementedError * else: * for i in range(N): # <<<<<<<<<<<<<< * while b < ngroups - 1 and i >= bins[b]: * if not got_first: */ __pyx_t_1 = __pyx_v_N; for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_1; __pyx_t_3+=1) { __pyx_v_i = __pyx_t_3; /* "pandas/src/generated.pyx":6924 * else: * for i in range(N): * while b < ngroups - 1 and i >= bins[b]: # <<<<<<<<<<<<<< * if not got_first: * out[b, 0] = NA */ while (1) { __pyx_t_4 = ((__pyx_v_b < (__pyx_v_ngroups - 1)) != 0); if (__pyx_t_4) { __pyx_t_11 = __pyx_v_b; __pyx_t_12 = ((__pyx_v_i >= (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_bins.rcbuffer->pybuffer.buf, __pyx_t_11, __pyx_pybuffernd_bins.diminfo[0].strides))) != 0); __pyx_t_13 = __pyx_t_12; } else { __pyx_t_13 = __pyx_t_4; } if (!__pyx_t_13) break; /* "pandas/src/generated.pyx":6925 * for i in range(N): * while b < ngroups - 1 and i >= bins[b]: * if not got_first: # <<<<<<<<<<<<<< * out[b, 0] = NA * out[b, 1] = NA */ __pyx_t_13 = ((!(__pyx_v_got_first != 0)) != 0); if (__pyx_t_13) { /* "pandas/src/generated.pyx":6926 * while b < ngroups - 1 and i >= bins[b]: * if not got_first: * out[b, 0] = NA # <<<<<<<<<<<<<< * out[b, 1] = NA * out[b, 2] = NA */ __pyx_t_14 = __pyx_v_b; __pyx_t_15 = 0; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_15, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_NA; /* "pandas/src/generated.pyx":6927 * if not got_first: * out[b, 0] = NA * out[b, 1] = NA # <<<<<<<<<<<<<< * out[b, 2] = NA * out[b, 3] = NA */ __pyx_t_16 = __pyx_v_b; __pyx_t_17 = 1; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_17, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_NA; /* "pandas/src/generated.pyx":6928 * out[b, 0] = NA * out[b, 1] = NA * out[b, 2] = NA # <<<<<<<<<<<<<< * out[b, 3] = NA * else: */ __pyx_t_18 = __pyx_v_b; __pyx_t_19 = 2; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_19, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_NA; /* "pandas/src/generated.pyx":6929 * out[b, 1] = NA * out[b, 2] = NA * out[b, 3] = NA # <<<<<<<<<<<<<< * else: * out[b, 0] = vopen */ __pyx_t_20 = __pyx_v_b; __pyx_t_21 = 3; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_21, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_NA; goto __pyx_L12; } /*else*/ { /* "pandas/src/generated.pyx":6931 * out[b, 3] = NA * else: * out[b, 0] = vopen # <<<<<<<<<<<<<< * out[b, 1] = vhigh * out[b, 2] = vlow */ __pyx_t_22 = __pyx_v_b; __pyx_t_23 = 0; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_22, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_23, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_vopen; /* "pandas/src/generated.pyx":6932 * else: * out[b, 0] = vopen * out[b, 1] = vhigh # <<<<<<<<<<<<<< * out[b, 2] = vlow * out[b, 3] = vclose */ __pyx_t_24 = __pyx_v_b; __pyx_t_25 = 1; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_24, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_25, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_vhigh; /* "pandas/src/generated.pyx":6933 * out[b, 0] = vopen * out[b, 1] = vhigh * out[b, 2] = vlow # <<<<<<<<<<<<<< * out[b, 3] = vclose * b += 1 */ __pyx_t_26 = __pyx_v_b; __pyx_t_27 = 2; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_26, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_27, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_vlow; /* "pandas/src/generated.pyx":6934 * out[b, 1] = vhigh * out[b, 2] = vlow * out[b, 3] = vclose # <<<<<<<<<<<<<< * b += 1 * got_first = 0 */ __pyx_t_28 = __pyx_v_b; __pyx_t_29 = 3; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_28, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_29, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_vclose; } __pyx_L12:; /* "pandas/src/generated.pyx":6935 * out[b, 2] = vlow * out[b, 3] = vclose * b += 1 # <<<<<<<<<<<<<< * got_first = 0 * */ __pyx_v_b = (__pyx_v_b + 1); /* "pandas/src/generated.pyx":6936 * out[b, 3] = vclose * b += 1 * got_first = 0 # <<<<<<<<<<<<<< * * counts[b] += 1 */ __pyx_v_got_first = 0; } /* "pandas/src/generated.pyx":6938 * got_first = 0 * * counts[b] += 1 # <<<<<<<<<<<<<< * val = values[i, 0] * */ __pyx_t_30 = __pyx_v_b; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_counts.rcbuffer->pybuffer.buf, __pyx_t_30, __pyx_pybuffernd_counts.diminfo[0].strides) += 1; /* "pandas/src/generated.pyx":6939 * * counts[b] += 1 * val = values[i, 0] # <<<<<<<<<<<<<< * * # not nan */ __pyx_t_31 = __pyx_v_i; __pyx_t_32 = 0; __pyx_v_val = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_31, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_32, __pyx_pybuffernd_values.diminfo[1].strides)); /* "pandas/src/generated.pyx":6942 * * # not nan * if val == val: # <<<<<<<<<<<<<< * if not got_first: * got_first = 1 */ __pyx_t_13 = ((__pyx_v_val == __pyx_v_val) != 0); if (__pyx_t_13) { /* "pandas/src/generated.pyx":6943 * # not nan * if val == val: * if not got_first: # <<<<<<<<<<<<<< * got_first = 1 * vopen = val */ __pyx_t_13 = ((!(__pyx_v_got_first != 0)) != 0); if (__pyx_t_13) { /* "pandas/src/generated.pyx":6944 * if val == val: * if not got_first: * got_first = 1 # <<<<<<<<<<<<<< * vopen = val * vlow = val */ __pyx_v_got_first = 1; /* "pandas/src/generated.pyx":6945 * if not got_first: * got_first = 1 * vopen = val # <<<<<<<<<<<<<< * vlow = val * vhigh = val */ __pyx_v_vopen = __pyx_v_val; /* "pandas/src/generated.pyx":6946 * got_first = 1 * vopen = val * vlow = val # <<<<<<<<<<<<<< * vhigh = val * else: */ __pyx_v_vlow = __pyx_v_val; /* "pandas/src/generated.pyx":6947 * vopen = val * vlow = val * vhigh = val # <<<<<<<<<<<<<< * else: * if val < vlow: */ __pyx_v_vhigh = __pyx_v_val; goto __pyx_L14; } /*else*/ { /* "pandas/src/generated.pyx":6949 * vhigh = val * else: * if val < vlow: # <<<<<<<<<<<<<< * vlow = val * if val > vhigh: */ __pyx_t_13 = ((__pyx_v_val < __pyx_v_vlow) != 0); if (__pyx_t_13) { /* "pandas/src/generated.pyx":6950 * else: * if val < vlow: * vlow = val # <<<<<<<<<<<<<< * if val > vhigh: * vhigh = val */ __pyx_v_vlow = __pyx_v_val; goto __pyx_L15; } __pyx_L15:; /* "pandas/src/generated.pyx":6951 * if val < vlow: * vlow = val * if val > vhigh: # <<<<<<<<<<<<<< * vhigh = val * vclose = val */ __pyx_t_13 = ((__pyx_v_val > __pyx_v_vhigh) != 0); if (__pyx_t_13) { /* "pandas/src/generated.pyx":6952 * vlow = val * if val > vhigh: * vhigh = val # <<<<<<<<<<<<<< * vclose = val * */ __pyx_v_vhigh = __pyx_v_val; goto __pyx_L16; } __pyx_L16:; } __pyx_L14:; /* "pandas/src/generated.pyx":6953 * if val > vhigh: * vhigh = val * vclose = val # <<<<<<<<<<<<<< * * if not got_first: */ __pyx_v_vclose = __pyx_v_val; goto __pyx_L13; } __pyx_L13:; } /* "pandas/src/generated.pyx":6955 * vclose = val * * if not got_first: # <<<<<<<<<<<<<< * out[b, 0] = NA * out[b, 1] = NA */ __pyx_t_13 = ((!(__pyx_v_got_first != 0)) != 0); if (__pyx_t_13) { /* "pandas/src/generated.pyx":6956 * * if not got_first: * out[b, 0] = NA # <<<<<<<<<<<<<< * out[b, 1] = NA * out[b, 2] = NA */ __pyx_t_1 = __pyx_v_b; __pyx_t_33 = 0; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_1, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_33, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_NA; /* "pandas/src/generated.pyx":6957 * if not got_first: * out[b, 0] = NA * out[b, 1] = NA # <<<<<<<<<<<<<< * out[b, 2] = NA * out[b, 3] = NA */ __pyx_t_3 = __pyx_v_b; __pyx_t_34 = 1; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_3, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_34, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_NA; /* "pandas/src/generated.pyx":6958 * out[b, 0] = NA * out[b, 1] = NA * out[b, 2] = NA # <<<<<<<<<<<<<< * out[b, 3] = NA * else: */ __pyx_t_35 = __pyx_v_b; __pyx_t_36 = 2; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_35, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_36, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_NA; /* "pandas/src/generated.pyx":6959 * out[b, 1] = NA * out[b, 2] = NA * out[b, 3] = NA # <<<<<<<<<<<<<< * else: * out[b, 0] = vopen */ __pyx_t_37 = __pyx_v_b; __pyx_t_38 = 3; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_37, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_38, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_NA; goto __pyx_L17; } /*else*/ { /* "pandas/src/generated.pyx":6961 * out[b, 3] = NA * else: * out[b, 0] = vopen # <<<<<<<<<<<<<< * out[b, 1] = vhigh * out[b, 2] = vlow */ __pyx_t_39 = __pyx_v_b; __pyx_t_40 = 0; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_39, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_40, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_vopen; /* "pandas/src/generated.pyx":6962 * else: * out[b, 0] = vopen * out[b, 1] = vhigh # <<<<<<<<<<<<<< * out[b, 2] = vlow * out[b, 3] = vclose */ __pyx_t_41 = __pyx_v_b; __pyx_t_42 = 1; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_41, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_42, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_vhigh; /* "pandas/src/generated.pyx":6963 * out[b, 0] = vopen * out[b, 1] = vhigh * out[b, 2] = vlow # <<<<<<<<<<<<<< * out[b, 3] = vclose * */ __pyx_t_43 = __pyx_v_b; __pyx_t_44 = 2; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_43, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_44, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_vlow; /* "pandas/src/generated.pyx":6964 * out[b, 1] = vhigh * out[b, 2] = vlow * out[b, 3] = vclose # <<<<<<<<<<<<<< * * @cython.wraparound(False) */ __pyx_t_45 = __pyx_v_b; __pyx_t_46 = 3; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_45, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_46, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_vclose; } __pyx_L17:; } /* "pandas/src/generated.pyx":6894 * @cython.wraparound(False) * @cython.boundscheck(False) * def group_ohlc_float32(ndarray[float32_t, ndim=2] out, # <<<<<<<<<<<<<< * ndarray[int64_t] counts, * ndarray[float32_t, ndim=2] values, */ /* 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); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_bins.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_counts.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.group_ohlc_float32", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_bins.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_counts.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":6968 * @cython.wraparound(False) * @cython.boundscheck(False) * def left_join_indexer_unique_float64(ndarray[float64_t] left, # <<<<<<<<<<<<<< * ndarray[float64_t] right): * cdef: */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_455left_join_indexer_unique_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_455left_join_indexer_unique_float64 = {__Pyx_NAMESTR("left_join_indexer_unique_float64"), (PyCFunction)__pyx_pw_6pandas_5algos_455left_join_indexer_unique_float64, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_455left_join_indexer_unique_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_left = 0; PyArrayObject *__pyx_v_right = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("left_join_indexer_unique_float64 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_left,&__pyx_n_s_right,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_left)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_right)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("left_join_indexer_unique_float64", 1, 2, 2, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6968; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "left_join_indexer_unique_float64") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6968; __pyx_clineno = __LINE__; goto __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_left = ((PyArrayObject *)values[0]); __pyx_v_right = ((PyArrayObject *)values[1]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("left_join_indexer_unique_float64", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6968; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.left_join_indexer_unique_float64", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_left), __pyx_ptype_5numpy_ndarray, 1, "left", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6968; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_right), __pyx_ptype_5numpy_ndarray, 1, "right", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6969; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_454left_join_indexer_unique_float64(__pyx_self, __pyx_v_left, __pyx_v_right); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5algos_454left_join_indexer_unique_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_left, PyArrayObject *__pyx_v_right) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_nleft; Py_ssize_t __pyx_v_nright; PyArrayObject *__pyx_v_indexer = 0; __pyx_t_5numpy_float64_t __pyx_v_rval; __Pyx_LocalBuf_ND __pyx_pybuffernd_indexer; __Pyx_Buffer __pyx_pybuffer_indexer; __Pyx_LocalBuf_ND __pyx_pybuffernd_left; __Pyx_Buffer __pyx_pybuffer_left; __Pyx_LocalBuf_ND __pyx_pybuffernd_right; __Pyx_Buffer __pyx_pybuffer_right; 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; int __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; 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("left_join_indexer_unique_float64", 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_left.pybuffer.buf = NULL; __pyx_pybuffer_left.refcount = 0; __pyx_pybuffernd_left.data = NULL; __pyx_pybuffernd_left.rcbuffer = &__pyx_pybuffer_left; __pyx_pybuffer_right.pybuffer.buf = NULL; __pyx_pybuffer_right.refcount = 0; __pyx_pybuffernd_right.data = NULL; __pyx_pybuffernd_right.rcbuffer = &__pyx_pybuffer_right; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_left.rcbuffer->pybuffer, (PyObject*)__pyx_v_left, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6968; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_left.diminfo[0].strides = __pyx_pybuffernd_left.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_left.diminfo[0].shape = __pyx_pybuffernd_left.rcbuffer->pybuffer.shape[0]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_right.rcbuffer->pybuffer, (PyObject*)__pyx_v_right, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6968; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_right.diminfo[0].strides = __pyx_pybuffernd_right.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_right.diminfo[0].shape = __pyx_pybuffernd_right.rcbuffer->pybuffer.shape[0]; /* "pandas/src/generated.pyx":6975 * float64_t lval, rval * * i = 0 # <<<<<<<<<<<<<< * j = 0 * nleft = len(left) */ __pyx_v_i = 0; /* "pandas/src/generated.pyx":6976 * * i = 0 * j = 0 # <<<<<<<<<<<<<< * nleft = len(left) * nright = len(right) */ __pyx_v_j = 0; /* "pandas/src/generated.pyx":6977 * i = 0 * j = 0 * nleft = len(left) # <<<<<<<<<<<<<< * nright = len(right) * */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_left)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6977; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_nleft = __pyx_t_1; /* "pandas/src/generated.pyx":6978 * j = 0 * nleft = len(left) * nright = len(right) # <<<<<<<<<<<<<< * * indexer = np.empty(nleft, dtype=np.int64) */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_right)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6978; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_nright = __pyx_t_1; /* "pandas/src/generated.pyx":6980 * nright = len(right) * * indexer = np.empty(nleft, dtype=np.int64) # <<<<<<<<<<<<<< * while True: * if i == nleft: */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6980; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 6980; __pyx_clineno = __LINE__; goto __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_nleft); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6980; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6980; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6980; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6980; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_int64); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6980; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 6980; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyObject_Call(__pyx_t_3, __pyx_t_4, __pyx_t_2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6980; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 6980; __pyx_clineno = __LINE__; goto __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_int64_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_int64_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_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_filename = __pyx_f[2]; __pyx_lineno = 6980; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_7 = 0; __pyx_v_indexer = ((PyArrayObject *)__pyx_t_6); __pyx_t_6 = 0; /* "pandas/src/generated.pyx":6981 * * indexer = np.empty(nleft, dtype=np.int64) * while True: # <<<<<<<<<<<<<< * if i == nleft: * break */ while (1) { /* "pandas/src/generated.pyx":6982 * indexer = np.empty(nleft, dtype=np.int64) * while True: * if i == nleft: # <<<<<<<<<<<<<< * break * */ __pyx_t_12 = ((__pyx_v_i == __pyx_v_nleft) != 0); if (__pyx_t_12) { /* "pandas/src/generated.pyx":6983 * while True: * if i == nleft: * break # <<<<<<<<<<<<<< * * if j == nright: */ goto __pyx_L4_break; } /* "pandas/src/generated.pyx":6985 * break * * if j == nright: # <<<<<<<<<<<<<< * indexer[i] = -1 * i += 1 */ __pyx_t_12 = ((__pyx_v_j == __pyx_v_nright) != 0); if (__pyx_t_12) { /* "pandas/src/generated.pyx":6986 * * if j == nright: * indexer[i] = -1 # <<<<<<<<<<<<<< * i += 1 * continue */ __pyx_t_1 = __pyx_v_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_1, __pyx_pybuffernd_indexer.diminfo[0].strides) = -1; /* "pandas/src/generated.pyx":6987 * if j == nright: * indexer[i] = -1 * i += 1 # <<<<<<<<<<<<<< * continue * */ __pyx_v_i = (__pyx_v_i + 1); /* "pandas/src/generated.pyx":6988 * indexer[i] = -1 * i += 1 * continue # <<<<<<<<<<<<<< * * rval = right[j] */ goto __pyx_L3_continue; } /* "pandas/src/generated.pyx":6990 * continue * * rval = right[j] # <<<<<<<<<<<<<< * * while i < nleft - 1 and left[i] == rval: */ __pyx_t_13 = __pyx_v_j; __pyx_v_rval = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_right.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_right.diminfo[0].strides)); /* "pandas/src/generated.pyx":6992 * rval = right[j] * * while i < nleft - 1 and left[i] == rval: # <<<<<<<<<<<<<< * indexer[i] = j * i += 1 */ while (1) { __pyx_t_12 = ((__pyx_v_i < (__pyx_v_nleft - 1)) != 0); if (__pyx_t_12) { __pyx_t_14 = __pyx_v_i; __pyx_t_15 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_left.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_left.diminfo[0].strides)) == __pyx_v_rval) != 0); __pyx_t_16 = __pyx_t_15; } else { __pyx_t_16 = __pyx_t_12; } if (!__pyx_t_16) break; /* "pandas/src/generated.pyx":6993 * * while i < nleft - 1 and left[i] == rval: * indexer[i] = j # <<<<<<<<<<<<<< * i += 1 * */ __pyx_t_17 = __pyx_v_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_indexer.diminfo[0].strides) = __pyx_v_j; /* "pandas/src/generated.pyx":6994 * while i < nleft - 1 and left[i] == rval: * indexer[i] = j * i += 1 # <<<<<<<<<<<<<< * * if left[i] == right[j]: */ __pyx_v_i = (__pyx_v_i + 1); } /* "pandas/src/generated.pyx":6996 * i += 1 * * if left[i] == right[j]: # <<<<<<<<<<<<<< * indexer[i] = j * i += 1 */ __pyx_t_18 = __pyx_v_i; __pyx_t_19 = __pyx_v_j; __pyx_t_16 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_left.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_left.diminfo[0].strides)) == (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_right.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_right.diminfo[0].strides))) != 0); if (__pyx_t_16) { /* "pandas/src/generated.pyx":6997 * * if left[i] == right[j]: * indexer[i] = j # <<<<<<<<<<<<<< * i += 1 * while i < nleft - 1 and left[i] == rval: */ __pyx_t_20 = __pyx_v_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_indexer.diminfo[0].strides) = __pyx_v_j; /* "pandas/src/generated.pyx":6998 * if left[i] == right[j]: * indexer[i] = j * i += 1 # <<<<<<<<<<<<<< * while i < nleft - 1 and left[i] == rval: * indexer[i] = j */ __pyx_v_i = (__pyx_v_i + 1); /* "pandas/src/generated.pyx":6999 * indexer[i] = j * i += 1 * while i < nleft - 1 and left[i] == rval: # <<<<<<<<<<<<<< * indexer[i] = j * i += 1 */ while (1) { __pyx_t_16 = ((__pyx_v_i < (__pyx_v_nleft - 1)) != 0); if (__pyx_t_16) { __pyx_t_21 = __pyx_v_i; __pyx_t_12 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_left.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_left.diminfo[0].strides)) == __pyx_v_rval) != 0); __pyx_t_15 = __pyx_t_12; } else { __pyx_t_15 = __pyx_t_16; } if (!__pyx_t_15) break; /* "pandas/src/generated.pyx":7000 * i += 1 * while i < nleft - 1 and left[i] == rval: * indexer[i] = j # <<<<<<<<<<<<<< * i += 1 * j += 1 */ __pyx_t_22 = __pyx_v_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_22, __pyx_pybuffernd_indexer.diminfo[0].strides) = __pyx_v_j; /* "pandas/src/generated.pyx":7001 * while i < nleft - 1 and left[i] == rval: * indexer[i] = j * i += 1 # <<<<<<<<<<<<<< * j += 1 * elif left[i] > rval: */ __pyx_v_i = (__pyx_v_i + 1); } /* "pandas/src/generated.pyx":7002 * indexer[i] = j * i += 1 * j += 1 # <<<<<<<<<<<<<< * elif left[i] > rval: * indexer[i] = -1 */ __pyx_v_j = (__pyx_v_j + 1); goto __pyx_L9; } /* "pandas/src/generated.pyx":7003 * i += 1 * j += 1 * elif left[i] > rval: # <<<<<<<<<<<<<< * indexer[i] = -1 * j += 1 */ __pyx_t_23 = __pyx_v_i; __pyx_t_15 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_left.rcbuffer->pybuffer.buf, __pyx_t_23, __pyx_pybuffernd_left.diminfo[0].strides)) > __pyx_v_rval) != 0); if (__pyx_t_15) { /* "pandas/src/generated.pyx":7004 * j += 1 * elif left[i] > rval: * indexer[i] = -1 # <<<<<<<<<<<<<< * j += 1 * else: */ __pyx_t_24 = __pyx_v_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_24, __pyx_pybuffernd_indexer.diminfo[0].strides) = -1; /* "pandas/src/generated.pyx":7005 * elif left[i] > rval: * indexer[i] = -1 * j += 1 # <<<<<<<<<<<<<< * else: * indexer[i] = -1 */ __pyx_v_j = (__pyx_v_j + 1); goto __pyx_L9; } /*else*/ { /* "pandas/src/generated.pyx":7007 * j += 1 * else: * indexer[i] = -1 # <<<<<<<<<<<<<< * i += 1 * return indexer */ __pyx_t_25 = __pyx_v_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_25, __pyx_pybuffernd_indexer.diminfo[0].strides) = -1; /* "pandas/src/generated.pyx":7008 * else: * indexer[i] = -1 * i += 1 # <<<<<<<<<<<<<< * return indexer * */ __pyx_v_i = (__pyx_v_i + 1); } __pyx_L9:; __pyx_L3_continue:; } __pyx_L4_break:; /* "pandas/src/generated.pyx":7009 * indexer[i] = -1 * i += 1 * return indexer # <<<<<<<<<<<<<< * * @cython.wraparound(False) */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_indexer)); __pyx_r = ((PyObject *)__pyx_v_indexer); goto __pyx_L0; /* "pandas/src/generated.pyx":6968 * @cython.wraparound(False) * @cython.boundscheck(False) * def left_join_indexer_unique_float64(ndarray[float64_t] left, # <<<<<<<<<<<<<< * ndarray[float64_t] right): * cdef: */ /* 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_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_left.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_right.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.left_join_indexer_unique_float64", __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_left.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_right.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_indexer); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":7013 * @cython.wraparound(False) * @cython.boundscheck(False) * def left_join_indexer_unique_float32(ndarray[float32_t] left, # <<<<<<<<<<<<<< * ndarray[float32_t] right): * cdef: */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_457left_join_indexer_unique_float32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_457left_join_indexer_unique_float32 = {__Pyx_NAMESTR("left_join_indexer_unique_float32"), (PyCFunction)__pyx_pw_6pandas_5algos_457left_join_indexer_unique_float32, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_457left_join_indexer_unique_float32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_left = 0; PyArrayObject *__pyx_v_right = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("left_join_indexer_unique_float32 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_left,&__pyx_n_s_right,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_left)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_right)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("left_join_indexer_unique_float32", 1, 2, 2, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7013; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "left_join_indexer_unique_float32") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7013; __pyx_clineno = __LINE__; goto __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_left = ((PyArrayObject *)values[0]); __pyx_v_right = ((PyArrayObject *)values[1]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("left_join_indexer_unique_float32", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7013; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.left_join_indexer_unique_float32", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_left), __pyx_ptype_5numpy_ndarray, 1, "left", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7013; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_right), __pyx_ptype_5numpy_ndarray, 1, "right", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7014; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_456left_join_indexer_unique_float32(__pyx_self, __pyx_v_left, __pyx_v_right); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5algos_456left_join_indexer_unique_float32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_left, PyArrayObject *__pyx_v_right) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_nleft; Py_ssize_t __pyx_v_nright; PyArrayObject *__pyx_v_indexer = 0; __pyx_t_5numpy_float32_t __pyx_v_rval; __Pyx_LocalBuf_ND __pyx_pybuffernd_indexer; __Pyx_Buffer __pyx_pybuffer_indexer; __Pyx_LocalBuf_ND __pyx_pybuffernd_left; __Pyx_Buffer __pyx_pybuffer_left; __Pyx_LocalBuf_ND __pyx_pybuffernd_right; __Pyx_Buffer __pyx_pybuffer_right; 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; int __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; 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("left_join_indexer_unique_float32", 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_left.pybuffer.buf = NULL; __pyx_pybuffer_left.refcount = 0; __pyx_pybuffernd_left.data = NULL; __pyx_pybuffernd_left.rcbuffer = &__pyx_pybuffer_left; __pyx_pybuffer_right.pybuffer.buf = NULL; __pyx_pybuffer_right.refcount = 0; __pyx_pybuffernd_right.data = NULL; __pyx_pybuffernd_right.rcbuffer = &__pyx_pybuffer_right; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_left.rcbuffer->pybuffer, (PyObject*)__pyx_v_left, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7013; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_left.diminfo[0].strides = __pyx_pybuffernd_left.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_left.diminfo[0].shape = __pyx_pybuffernd_left.rcbuffer->pybuffer.shape[0]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_right.rcbuffer->pybuffer, (PyObject*)__pyx_v_right, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7013; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_right.diminfo[0].strides = __pyx_pybuffernd_right.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_right.diminfo[0].shape = __pyx_pybuffernd_right.rcbuffer->pybuffer.shape[0]; /* "pandas/src/generated.pyx":7020 * float32_t lval, rval * * i = 0 # <<<<<<<<<<<<<< * j = 0 * nleft = len(left) */ __pyx_v_i = 0; /* "pandas/src/generated.pyx":7021 * * i = 0 * j = 0 # <<<<<<<<<<<<<< * nleft = len(left) * nright = len(right) */ __pyx_v_j = 0; /* "pandas/src/generated.pyx":7022 * i = 0 * j = 0 * nleft = len(left) # <<<<<<<<<<<<<< * nright = len(right) * */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_left)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7022; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_nleft = __pyx_t_1; /* "pandas/src/generated.pyx":7023 * j = 0 * nleft = len(left) * nright = len(right) # <<<<<<<<<<<<<< * * indexer = np.empty(nleft, dtype=np.int64) */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_right)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7023; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_nright = __pyx_t_1; /* "pandas/src/generated.pyx":7025 * nright = len(right) * * indexer = np.empty(nleft, dtype=np.int64) # <<<<<<<<<<<<<< * while True: * if i == nleft: */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7025; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 7025; __pyx_clineno = __LINE__; goto __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_nleft); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7025; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7025; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7025; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7025; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_int64); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7025; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 7025; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyObject_Call(__pyx_t_3, __pyx_t_4, __pyx_t_2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7025; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 7025; __pyx_clineno = __LINE__; goto __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_int64_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_int64_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_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_filename = __pyx_f[2]; __pyx_lineno = 7025; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_7 = 0; __pyx_v_indexer = ((PyArrayObject *)__pyx_t_6); __pyx_t_6 = 0; /* "pandas/src/generated.pyx":7026 * * indexer = np.empty(nleft, dtype=np.int64) * while True: # <<<<<<<<<<<<<< * if i == nleft: * break */ while (1) { /* "pandas/src/generated.pyx":7027 * indexer = np.empty(nleft, dtype=np.int64) * while True: * if i == nleft: # <<<<<<<<<<<<<< * break * */ __pyx_t_12 = ((__pyx_v_i == __pyx_v_nleft) != 0); if (__pyx_t_12) { /* "pandas/src/generated.pyx":7028 * while True: * if i == nleft: * break # <<<<<<<<<<<<<< * * if j == nright: */ goto __pyx_L4_break; } /* "pandas/src/generated.pyx":7030 * break * * if j == nright: # <<<<<<<<<<<<<< * indexer[i] = -1 * i += 1 */ __pyx_t_12 = ((__pyx_v_j == __pyx_v_nright) != 0); if (__pyx_t_12) { /* "pandas/src/generated.pyx":7031 * * if j == nright: * indexer[i] = -1 # <<<<<<<<<<<<<< * i += 1 * continue */ __pyx_t_1 = __pyx_v_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_1, __pyx_pybuffernd_indexer.diminfo[0].strides) = -1; /* "pandas/src/generated.pyx":7032 * if j == nright: * indexer[i] = -1 * i += 1 # <<<<<<<<<<<<<< * continue * */ __pyx_v_i = (__pyx_v_i + 1); /* "pandas/src/generated.pyx":7033 * indexer[i] = -1 * i += 1 * continue # <<<<<<<<<<<<<< * * rval = right[j] */ goto __pyx_L3_continue; } /* "pandas/src/generated.pyx":7035 * continue * * rval = right[j] # <<<<<<<<<<<<<< * * while i < nleft - 1 and left[i] == rval: */ __pyx_t_13 = __pyx_v_j; __pyx_v_rval = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_right.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_right.diminfo[0].strides)); /* "pandas/src/generated.pyx":7037 * rval = right[j] * * while i < nleft - 1 and left[i] == rval: # <<<<<<<<<<<<<< * indexer[i] = j * i += 1 */ while (1) { __pyx_t_12 = ((__pyx_v_i < (__pyx_v_nleft - 1)) != 0); if (__pyx_t_12) { __pyx_t_14 = __pyx_v_i; __pyx_t_15 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_left.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_left.diminfo[0].strides)) == __pyx_v_rval) != 0); __pyx_t_16 = __pyx_t_15; } else { __pyx_t_16 = __pyx_t_12; } if (!__pyx_t_16) break; /* "pandas/src/generated.pyx":7038 * * while i < nleft - 1 and left[i] == rval: * indexer[i] = j # <<<<<<<<<<<<<< * i += 1 * */ __pyx_t_17 = __pyx_v_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_indexer.diminfo[0].strides) = __pyx_v_j; /* "pandas/src/generated.pyx":7039 * while i < nleft - 1 and left[i] == rval: * indexer[i] = j * i += 1 # <<<<<<<<<<<<<< * * if left[i] == right[j]: */ __pyx_v_i = (__pyx_v_i + 1); } /* "pandas/src/generated.pyx":7041 * i += 1 * * if left[i] == right[j]: # <<<<<<<<<<<<<< * indexer[i] = j * i += 1 */ __pyx_t_18 = __pyx_v_i; __pyx_t_19 = __pyx_v_j; __pyx_t_16 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_left.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_left.diminfo[0].strides)) == (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_right.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_right.diminfo[0].strides))) != 0); if (__pyx_t_16) { /* "pandas/src/generated.pyx":7042 * * if left[i] == right[j]: * indexer[i] = j # <<<<<<<<<<<<<< * i += 1 * while i < nleft - 1 and left[i] == rval: */ __pyx_t_20 = __pyx_v_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_indexer.diminfo[0].strides) = __pyx_v_j; /* "pandas/src/generated.pyx":7043 * if left[i] == right[j]: * indexer[i] = j * i += 1 # <<<<<<<<<<<<<< * while i < nleft - 1 and left[i] == rval: * indexer[i] = j */ __pyx_v_i = (__pyx_v_i + 1); /* "pandas/src/generated.pyx":7044 * indexer[i] = j * i += 1 * while i < nleft - 1 and left[i] == rval: # <<<<<<<<<<<<<< * indexer[i] = j * i += 1 */ while (1) { __pyx_t_16 = ((__pyx_v_i < (__pyx_v_nleft - 1)) != 0); if (__pyx_t_16) { __pyx_t_21 = __pyx_v_i; __pyx_t_12 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_left.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_left.diminfo[0].strides)) == __pyx_v_rval) != 0); __pyx_t_15 = __pyx_t_12; } else { __pyx_t_15 = __pyx_t_16; } if (!__pyx_t_15) break; /* "pandas/src/generated.pyx":7045 * i += 1 * while i < nleft - 1 and left[i] == rval: * indexer[i] = j # <<<<<<<<<<<<<< * i += 1 * j += 1 */ __pyx_t_22 = __pyx_v_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_22, __pyx_pybuffernd_indexer.diminfo[0].strides) = __pyx_v_j; /* "pandas/src/generated.pyx":7046 * while i < nleft - 1 and left[i] == rval: * indexer[i] = j * i += 1 # <<<<<<<<<<<<<< * j += 1 * elif left[i] > rval: */ __pyx_v_i = (__pyx_v_i + 1); } /* "pandas/src/generated.pyx":7047 * indexer[i] = j * i += 1 * j += 1 # <<<<<<<<<<<<<< * elif left[i] > rval: * indexer[i] = -1 */ __pyx_v_j = (__pyx_v_j + 1); goto __pyx_L9; } /* "pandas/src/generated.pyx":7048 * i += 1 * j += 1 * elif left[i] > rval: # <<<<<<<<<<<<<< * indexer[i] = -1 * j += 1 */ __pyx_t_23 = __pyx_v_i; __pyx_t_15 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_left.rcbuffer->pybuffer.buf, __pyx_t_23, __pyx_pybuffernd_left.diminfo[0].strides)) > __pyx_v_rval) != 0); if (__pyx_t_15) { /* "pandas/src/generated.pyx":7049 * j += 1 * elif left[i] > rval: * indexer[i] = -1 # <<<<<<<<<<<<<< * j += 1 * else: */ __pyx_t_24 = __pyx_v_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_24, __pyx_pybuffernd_indexer.diminfo[0].strides) = -1; /* "pandas/src/generated.pyx":7050 * elif left[i] > rval: * indexer[i] = -1 * j += 1 # <<<<<<<<<<<<<< * else: * indexer[i] = -1 */ __pyx_v_j = (__pyx_v_j + 1); goto __pyx_L9; } /*else*/ { /* "pandas/src/generated.pyx":7052 * j += 1 * else: * indexer[i] = -1 # <<<<<<<<<<<<<< * i += 1 * return indexer */ __pyx_t_25 = __pyx_v_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_25, __pyx_pybuffernd_indexer.diminfo[0].strides) = -1; /* "pandas/src/generated.pyx":7053 * else: * indexer[i] = -1 * i += 1 # <<<<<<<<<<<<<< * return indexer * */ __pyx_v_i = (__pyx_v_i + 1); } __pyx_L9:; __pyx_L3_continue:; } __pyx_L4_break:; /* "pandas/src/generated.pyx":7054 * indexer[i] = -1 * i += 1 * return indexer # <<<<<<<<<<<<<< * * @cython.wraparound(False) */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_indexer)); __pyx_r = ((PyObject *)__pyx_v_indexer); goto __pyx_L0; /* "pandas/src/generated.pyx":7013 * @cython.wraparound(False) * @cython.boundscheck(False) * def left_join_indexer_unique_float32(ndarray[float32_t] left, # <<<<<<<<<<<<<< * ndarray[float32_t] right): * cdef: */ /* 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_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_left.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_right.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.left_join_indexer_unique_float32", __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_left.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_right.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_indexer); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":7058 * @cython.wraparound(False) * @cython.boundscheck(False) * def left_join_indexer_unique_object(ndarray[object] left, # <<<<<<<<<<<<<< * ndarray[object] right): * cdef: */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_459left_join_indexer_unique_object(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_459left_join_indexer_unique_object = {__Pyx_NAMESTR("left_join_indexer_unique_object"), (PyCFunction)__pyx_pw_6pandas_5algos_459left_join_indexer_unique_object, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_459left_join_indexer_unique_object(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_left = 0; PyArrayObject *__pyx_v_right = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("left_join_indexer_unique_object (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_left,&__pyx_n_s_right,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_left)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_right)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("left_join_indexer_unique_object", 1, 2, 2, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7058; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "left_join_indexer_unique_object") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7058; __pyx_clineno = __LINE__; goto __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_left = ((PyArrayObject *)values[0]); __pyx_v_right = ((PyArrayObject *)values[1]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("left_join_indexer_unique_object", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7058; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.left_join_indexer_unique_object", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_left), __pyx_ptype_5numpy_ndarray, 1, "left", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7058; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_right), __pyx_ptype_5numpy_ndarray, 1, "right", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7059; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_458left_join_indexer_unique_object(__pyx_self, __pyx_v_left, __pyx_v_right); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5algos_458left_join_indexer_unique_object(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_left, PyArrayObject *__pyx_v_right) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_nleft; Py_ssize_t __pyx_v_nright; PyArrayObject *__pyx_v_indexer = 0; PyObject *__pyx_v_rval = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_indexer; __Pyx_Buffer __pyx_pybuffer_indexer; __Pyx_LocalBuf_ND __pyx_pybuffernd_left; __Pyx_Buffer __pyx_pybuffer_left; __Pyx_LocalBuf_ND __pyx_pybuffernd_right; __Pyx_Buffer __pyx_pybuffer_right; 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; int __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; 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("left_join_indexer_unique_object", 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_left.pybuffer.buf = NULL; __pyx_pybuffer_left.refcount = 0; __pyx_pybuffernd_left.data = NULL; __pyx_pybuffernd_left.rcbuffer = &__pyx_pybuffer_left; __pyx_pybuffer_right.pybuffer.buf = NULL; __pyx_pybuffer_right.refcount = 0; __pyx_pybuffernd_right.data = NULL; __pyx_pybuffernd_right.rcbuffer = &__pyx_pybuffer_right; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_left.rcbuffer->pybuffer, (PyObject*)__pyx_v_left, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7058; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_left.diminfo[0].strides = __pyx_pybuffernd_left.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_left.diminfo[0].shape = __pyx_pybuffernd_left.rcbuffer->pybuffer.shape[0]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_right.rcbuffer->pybuffer, (PyObject*)__pyx_v_right, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7058; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_right.diminfo[0].strides = __pyx_pybuffernd_right.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_right.diminfo[0].shape = __pyx_pybuffernd_right.rcbuffer->pybuffer.shape[0]; /* "pandas/src/generated.pyx":7065 * object lval, rval * * i = 0 # <<<<<<<<<<<<<< * j = 0 * nleft = len(left) */ __pyx_v_i = 0; /* "pandas/src/generated.pyx":7066 * * i = 0 * j = 0 # <<<<<<<<<<<<<< * nleft = len(left) * nright = len(right) */ __pyx_v_j = 0; /* "pandas/src/generated.pyx":7067 * i = 0 * j = 0 * nleft = len(left) # <<<<<<<<<<<<<< * nright = len(right) * */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_left)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7067; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_nleft = __pyx_t_1; /* "pandas/src/generated.pyx":7068 * j = 0 * nleft = len(left) * nright = len(right) # <<<<<<<<<<<<<< * * indexer = np.empty(nleft, dtype=np.int64) */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_right)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7068; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_nright = __pyx_t_1; /* "pandas/src/generated.pyx":7070 * nright = len(right) * * indexer = np.empty(nleft, dtype=np.int64) # <<<<<<<<<<<<<< * while True: * if i == nleft: */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7070; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 7070; __pyx_clineno = __LINE__; goto __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_nleft); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7070; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7070; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7070; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7070; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_int64); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7070; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 7070; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyObject_Call(__pyx_t_3, __pyx_t_4, __pyx_t_2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7070; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 7070; __pyx_clineno = __LINE__; goto __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_int64_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_int64_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_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_filename = __pyx_f[2]; __pyx_lineno = 7070; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_7 = 0; __pyx_v_indexer = ((PyArrayObject *)__pyx_t_6); __pyx_t_6 = 0; /* "pandas/src/generated.pyx":7071 * * indexer = np.empty(nleft, dtype=np.int64) * while True: # <<<<<<<<<<<<<< * if i == nleft: * break */ while (1) { /* "pandas/src/generated.pyx":7072 * indexer = np.empty(nleft, dtype=np.int64) * while True: * if i == nleft: # <<<<<<<<<<<<<< * break * */ __pyx_t_12 = ((__pyx_v_i == __pyx_v_nleft) != 0); if (__pyx_t_12) { /* "pandas/src/generated.pyx":7073 * while True: * if i == nleft: * break # <<<<<<<<<<<<<< * * if j == nright: */ goto __pyx_L4_break; } /* "pandas/src/generated.pyx":7075 * break * * if j == nright: # <<<<<<<<<<<<<< * indexer[i] = -1 * i += 1 */ __pyx_t_12 = ((__pyx_v_j == __pyx_v_nright) != 0); if (__pyx_t_12) { /* "pandas/src/generated.pyx":7076 * * if j == nright: * indexer[i] = -1 # <<<<<<<<<<<<<< * i += 1 * continue */ __pyx_t_1 = __pyx_v_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_1, __pyx_pybuffernd_indexer.diminfo[0].strides) = -1; /* "pandas/src/generated.pyx":7077 * if j == nright: * indexer[i] = -1 * i += 1 # <<<<<<<<<<<<<< * continue * */ __pyx_v_i = (__pyx_v_i + 1); /* "pandas/src/generated.pyx":7078 * indexer[i] = -1 * i += 1 * continue # <<<<<<<<<<<<<< * * rval = right[j] */ goto __pyx_L3_continue; } /* "pandas/src/generated.pyx":7080 * continue * * rval = right[j] # <<<<<<<<<<<<<< * * while i < nleft - 1 and left[i] == rval: */ __pyx_t_13 = __pyx_v_j; __pyx_t_6 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_right.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_right.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_6); __Pyx_XDECREF_SET(__pyx_v_rval, __pyx_t_6); __pyx_t_6 = 0; /* "pandas/src/generated.pyx":7082 * rval = right[j] * * while i < nleft - 1 and left[i] == rval: # <<<<<<<<<<<<<< * indexer[i] = j * i += 1 */ while (1) { __pyx_t_12 = (__pyx_v_i < (__pyx_v_nleft - 1)); if (__pyx_t_12) { __pyx_t_14 = __pyx_v_i; __pyx_t_6 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_left.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_left.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_6); __pyx_t_2 = PyObject_RichCompare(__pyx_t_6, __pyx_v_rval, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7082; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_15 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_15 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7082; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_16 = __pyx_t_15; } else { __pyx_t_16 = __pyx_t_12; } if (!__pyx_t_16) break; /* "pandas/src/generated.pyx":7083 * * while i < nleft - 1 and left[i] == rval: * indexer[i] = j # <<<<<<<<<<<<<< * i += 1 * */ __pyx_t_17 = __pyx_v_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_indexer.diminfo[0].strides) = __pyx_v_j; /* "pandas/src/generated.pyx":7084 * while i < nleft - 1 and left[i] == rval: * indexer[i] = j * i += 1 # <<<<<<<<<<<<<< * * if left[i] == right[j]: */ __pyx_v_i = (__pyx_v_i + 1); } /* "pandas/src/generated.pyx":7086 * i += 1 * * if left[i] == right[j]: # <<<<<<<<<<<<<< * indexer[i] = j * i += 1 */ __pyx_t_18 = __pyx_v_i; __pyx_t_2 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_left.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_left.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_2); __pyx_t_19 = __pyx_v_j; __pyx_t_6 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_right.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_right.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_6); __pyx_t_4 = PyObject_RichCompare(__pyx_t_2, __pyx_t_6, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7086; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_16 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_16 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7086; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_16) { /* "pandas/src/generated.pyx":7087 * * if left[i] == right[j]: * indexer[i] = j # <<<<<<<<<<<<<< * i += 1 * while i < nleft - 1 and left[i] == rval: */ __pyx_t_20 = __pyx_v_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_indexer.diminfo[0].strides) = __pyx_v_j; /* "pandas/src/generated.pyx":7088 * if left[i] == right[j]: * indexer[i] = j * i += 1 # <<<<<<<<<<<<<< * while i < nleft - 1 and left[i] == rval: * indexer[i] = j */ __pyx_v_i = (__pyx_v_i + 1); /* "pandas/src/generated.pyx":7089 * indexer[i] = j * i += 1 * while i < nleft - 1 and left[i] == rval: # <<<<<<<<<<<<<< * indexer[i] = j * i += 1 */ while (1) { __pyx_t_16 = (__pyx_v_i < (__pyx_v_nleft - 1)); if (__pyx_t_16) { __pyx_t_21 = __pyx_v_i; __pyx_t_4 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_left.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_left.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_4); __pyx_t_6 = PyObject_RichCompare(__pyx_t_4, __pyx_v_rval, Py_EQ); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7089; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_12 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7089; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_15 = __pyx_t_12; } else { __pyx_t_15 = __pyx_t_16; } if (!__pyx_t_15) break; /* "pandas/src/generated.pyx":7090 * i += 1 * while i < nleft - 1 and left[i] == rval: * indexer[i] = j # <<<<<<<<<<<<<< * i += 1 * j += 1 */ __pyx_t_22 = __pyx_v_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_22, __pyx_pybuffernd_indexer.diminfo[0].strides) = __pyx_v_j; /* "pandas/src/generated.pyx":7091 * while i < nleft - 1 and left[i] == rval: * indexer[i] = j * i += 1 # <<<<<<<<<<<<<< * j += 1 * elif left[i] > rval: */ __pyx_v_i = (__pyx_v_i + 1); } /* "pandas/src/generated.pyx":7092 * indexer[i] = j * i += 1 * j += 1 # <<<<<<<<<<<<<< * elif left[i] > rval: * indexer[i] = -1 */ __pyx_v_j = (__pyx_v_j + 1); goto __pyx_L9; } /* "pandas/src/generated.pyx":7093 * i += 1 * j += 1 * elif left[i] > rval: # <<<<<<<<<<<<<< * indexer[i] = -1 * j += 1 */ __pyx_t_23 = __pyx_v_i; __pyx_t_6 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_left.rcbuffer->pybuffer.buf, __pyx_t_23, __pyx_pybuffernd_left.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_6); __pyx_t_4 = PyObject_RichCompare(__pyx_t_6, __pyx_v_rval, Py_GT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7093; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_15 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_15 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7093; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_15) { /* "pandas/src/generated.pyx":7094 * j += 1 * elif left[i] > rval: * indexer[i] = -1 # <<<<<<<<<<<<<< * j += 1 * else: */ __pyx_t_24 = __pyx_v_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_24, __pyx_pybuffernd_indexer.diminfo[0].strides) = -1; /* "pandas/src/generated.pyx":7095 * elif left[i] > rval: * indexer[i] = -1 * j += 1 # <<<<<<<<<<<<<< * else: * indexer[i] = -1 */ __pyx_v_j = (__pyx_v_j + 1); goto __pyx_L9; } /*else*/ { /* "pandas/src/generated.pyx":7097 * j += 1 * else: * indexer[i] = -1 # <<<<<<<<<<<<<< * i += 1 * return indexer */ __pyx_t_25 = __pyx_v_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_25, __pyx_pybuffernd_indexer.diminfo[0].strides) = -1; /* "pandas/src/generated.pyx":7098 * else: * indexer[i] = -1 * i += 1 # <<<<<<<<<<<<<< * return indexer * */ __pyx_v_i = (__pyx_v_i + 1); } __pyx_L9:; __pyx_L3_continue:; } __pyx_L4_break:; /* "pandas/src/generated.pyx":7099 * indexer[i] = -1 * i += 1 * return indexer # <<<<<<<<<<<<<< * * @cython.wraparound(False) */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_indexer)); __pyx_r = ((PyObject *)__pyx_v_indexer); goto __pyx_L0; /* "pandas/src/generated.pyx":7058 * @cython.wraparound(False) * @cython.boundscheck(False) * def left_join_indexer_unique_object(ndarray[object] left, # <<<<<<<<<<<<<< * ndarray[object] right): * cdef: */ /* 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_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_left.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_right.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.left_join_indexer_unique_object", __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_left.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_right.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_indexer); __Pyx_XDECREF(__pyx_v_rval); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":7103 * @cython.wraparound(False) * @cython.boundscheck(False) * def left_join_indexer_unique_int32(ndarray[int32_t] left, # <<<<<<<<<<<<<< * ndarray[int32_t] right): * cdef: */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_461left_join_indexer_unique_int32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_461left_join_indexer_unique_int32 = {__Pyx_NAMESTR("left_join_indexer_unique_int32"), (PyCFunction)__pyx_pw_6pandas_5algos_461left_join_indexer_unique_int32, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_461left_join_indexer_unique_int32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_left = 0; PyArrayObject *__pyx_v_right = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("left_join_indexer_unique_int32 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_left,&__pyx_n_s_right,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_left)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_right)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("left_join_indexer_unique_int32", 1, 2, 2, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7103; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "left_join_indexer_unique_int32") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7103; __pyx_clineno = __LINE__; goto __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_left = ((PyArrayObject *)values[0]); __pyx_v_right = ((PyArrayObject *)values[1]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("left_join_indexer_unique_int32", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7103; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.left_join_indexer_unique_int32", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_left), __pyx_ptype_5numpy_ndarray, 1, "left", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7103; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_right), __pyx_ptype_5numpy_ndarray, 1, "right", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7104; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_460left_join_indexer_unique_int32(__pyx_self, __pyx_v_left, __pyx_v_right); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5algos_460left_join_indexer_unique_int32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_left, PyArrayObject *__pyx_v_right) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_nleft; Py_ssize_t __pyx_v_nright; PyArrayObject *__pyx_v_indexer = 0; __pyx_t_5numpy_int32_t __pyx_v_rval; __Pyx_LocalBuf_ND __pyx_pybuffernd_indexer; __Pyx_Buffer __pyx_pybuffer_indexer; __Pyx_LocalBuf_ND __pyx_pybuffernd_left; __Pyx_Buffer __pyx_pybuffer_left; __Pyx_LocalBuf_ND __pyx_pybuffernd_right; __Pyx_Buffer __pyx_pybuffer_right; 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; int __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; 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("left_join_indexer_unique_int32", 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_left.pybuffer.buf = NULL; __pyx_pybuffer_left.refcount = 0; __pyx_pybuffernd_left.data = NULL; __pyx_pybuffernd_left.rcbuffer = &__pyx_pybuffer_left; __pyx_pybuffer_right.pybuffer.buf = NULL; __pyx_pybuffer_right.refcount = 0; __pyx_pybuffernd_right.data = NULL; __pyx_pybuffernd_right.rcbuffer = &__pyx_pybuffer_right; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_left.rcbuffer->pybuffer, (PyObject*)__pyx_v_left, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7103; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_left.diminfo[0].strides = __pyx_pybuffernd_left.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_left.diminfo[0].shape = __pyx_pybuffernd_left.rcbuffer->pybuffer.shape[0]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_right.rcbuffer->pybuffer, (PyObject*)__pyx_v_right, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7103; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_right.diminfo[0].strides = __pyx_pybuffernd_right.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_right.diminfo[0].shape = __pyx_pybuffernd_right.rcbuffer->pybuffer.shape[0]; /* "pandas/src/generated.pyx":7110 * int32_t lval, rval * * i = 0 # <<<<<<<<<<<<<< * j = 0 * nleft = len(left) */ __pyx_v_i = 0; /* "pandas/src/generated.pyx":7111 * * i = 0 * j = 0 # <<<<<<<<<<<<<< * nleft = len(left) * nright = len(right) */ __pyx_v_j = 0; /* "pandas/src/generated.pyx":7112 * i = 0 * j = 0 * nleft = len(left) # <<<<<<<<<<<<<< * nright = len(right) * */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_left)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7112; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_nleft = __pyx_t_1; /* "pandas/src/generated.pyx":7113 * j = 0 * nleft = len(left) * nright = len(right) # <<<<<<<<<<<<<< * * indexer = np.empty(nleft, dtype=np.int64) */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_right)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7113; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_nright = __pyx_t_1; /* "pandas/src/generated.pyx":7115 * nright = len(right) * * indexer = np.empty(nleft, dtype=np.int64) # <<<<<<<<<<<<<< * while True: * if i == nleft: */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7115; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 7115; __pyx_clineno = __LINE__; goto __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_nleft); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7115; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7115; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7115; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7115; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_int64); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7115; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 7115; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyObject_Call(__pyx_t_3, __pyx_t_4, __pyx_t_2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7115; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 7115; __pyx_clineno = __LINE__; goto __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_int64_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_int64_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_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_filename = __pyx_f[2]; __pyx_lineno = 7115; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_7 = 0; __pyx_v_indexer = ((PyArrayObject *)__pyx_t_6); __pyx_t_6 = 0; /* "pandas/src/generated.pyx":7116 * * indexer = np.empty(nleft, dtype=np.int64) * while True: # <<<<<<<<<<<<<< * if i == nleft: * break */ while (1) { /* "pandas/src/generated.pyx":7117 * indexer = np.empty(nleft, dtype=np.int64) * while True: * if i == nleft: # <<<<<<<<<<<<<< * break * */ __pyx_t_12 = ((__pyx_v_i == __pyx_v_nleft) != 0); if (__pyx_t_12) { /* "pandas/src/generated.pyx":7118 * while True: * if i == nleft: * break # <<<<<<<<<<<<<< * * if j == nright: */ goto __pyx_L4_break; } /* "pandas/src/generated.pyx":7120 * break * * if j == nright: # <<<<<<<<<<<<<< * indexer[i] = -1 * i += 1 */ __pyx_t_12 = ((__pyx_v_j == __pyx_v_nright) != 0); if (__pyx_t_12) { /* "pandas/src/generated.pyx":7121 * * if j == nright: * indexer[i] = -1 # <<<<<<<<<<<<<< * i += 1 * continue */ __pyx_t_1 = __pyx_v_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_1, __pyx_pybuffernd_indexer.diminfo[0].strides) = -1; /* "pandas/src/generated.pyx":7122 * if j == nright: * indexer[i] = -1 * i += 1 # <<<<<<<<<<<<<< * continue * */ __pyx_v_i = (__pyx_v_i + 1); /* "pandas/src/generated.pyx":7123 * indexer[i] = -1 * i += 1 * continue # <<<<<<<<<<<<<< * * rval = right[j] */ goto __pyx_L3_continue; } /* "pandas/src/generated.pyx":7125 * continue * * rval = right[j] # <<<<<<<<<<<<<< * * while i < nleft - 1 and left[i] == rval: */ __pyx_t_13 = __pyx_v_j; __pyx_v_rval = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_right.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_right.diminfo[0].strides)); /* "pandas/src/generated.pyx":7127 * rval = right[j] * * while i < nleft - 1 and left[i] == rval: # <<<<<<<<<<<<<< * indexer[i] = j * i += 1 */ while (1) { __pyx_t_12 = ((__pyx_v_i < (__pyx_v_nleft - 1)) != 0); if (__pyx_t_12) { __pyx_t_14 = __pyx_v_i; __pyx_t_15 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_left.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_left.diminfo[0].strides)) == __pyx_v_rval) != 0); __pyx_t_16 = __pyx_t_15; } else { __pyx_t_16 = __pyx_t_12; } if (!__pyx_t_16) break; /* "pandas/src/generated.pyx":7128 * * while i < nleft - 1 and left[i] == rval: * indexer[i] = j # <<<<<<<<<<<<<< * i += 1 * */ __pyx_t_17 = __pyx_v_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_indexer.diminfo[0].strides) = __pyx_v_j; /* "pandas/src/generated.pyx":7129 * while i < nleft - 1 and left[i] == rval: * indexer[i] = j * i += 1 # <<<<<<<<<<<<<< * * if left[i] == right[j]: */ __pyx_v_i = (__pyx_v_i + 1); } /* "pandas/src/generated.pyx":7131 * i += 1 * * if left[i] == right[j]: # <<<<<<<<<<<<<< * indexer[i] = j * i += 1 */ __pyx_t_18 = __pyx_v_i; __pyx_t_19 = __pyx_v_j; __pyx_t_16 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_left.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_left.diminfo[0].strides)) == (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_right.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_right.diminfo[0].strides))) != 0); if (__pyx_t_16) { /* "pandas/src/generated.pyx":7132 * * if left[i] == right[j]: * indexer[i] = j # <<<<<<<<<<<<<< * i += 1 * while i < nleft - 1 and left[i] == rval: */ __pyx_t_20 = __pyx_v_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_indexer.diminfo[0].strides) = __pyx_v_j; /* "pandas/src/generated.pyx":7133 * if left[i] == right[j]: * indexer[i] = j * i += 1 # <<<<<<<<<<<<<< * while i < nleft - 1 and left[i] == rval: * indexer[i] = j */ __pyx_v_i = (__pyx_v_i + 1); /* "pandas/src/generated.pyx":7134 * indexer[i] = j * i += 1 * while i < nleft - 1 and left[i] == rval: # <<<<<<<<<<<<<< * indexer[i] = j * i += 1 */ while (1) { __pyx_t_16 = ((__pyx_v_i < (__pyx_v_nleft - 1)) != 0); if (__pyx_t_16) { __pyx_t_21 = __pyx_v_i; __pyx_t_12 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_left.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_left.diminfo[0].strides)) == __pyx_v_rval) != 0); __pyx_t_15 = __pyx_t_12; } else { __pyx_t_15 = __pyx_t_16; } if (!__pyx_t_15) break; /* "pandas/src/generated.pyx":7135 * i += 1 * while i < nleft - 1 and left[i] == rval: * indexer[i] = j # <<<<<<<<<<<<<< * i += 1 * j += 1 */ __pyx_t_22 = __pyx_v_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_22, __pyx_pybuffernd_indexer.diminfo[0].strides) = __pyx_v_j; /* "pandas/src/generated.pyx":7136 * while i < nleft - 1 and left[i] == rval: * indexer[i] = j * i += 1 # <<<<<<<<<<<<<< * j += 1 * elif left[i] > rval: */ __pyx_v_i = (__pyx_v_i + 1); } /* "pandas/src/generated.pyx":7137 * indexer[i] = j * i += 1 * j += 1 # <<<<<<<<<<<<<< * elif left[i] > rval: * indexer[i] = -1 */ __pyx_v_j = (__pyx_v_j + 1); goto __pyx_L9; } /* "pandas/src/generated.pyx":7138 * i += 1 * j += 1 * elif left[i] > rval: # <<<<<<<<<<<<<< * indexer[i] = -1 * j += 1 */ __pyx_t_23 = __pyx_v_i; __pyx_t_15 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_left.rcbuffer->pybuffer.buf, __pyx_t_23, __pyx_pybuffernd_left.diminfo[0].strides)) > __pyx_v_rval) != 0); if (__pyx_t_15) { /* "pandas/src/generated.pyx":7139 * j += 1 * elif left[i] > rval: * indexer[i] = -1 # <<<<<<<<<<<<<< * j += 1 * else: */ __pyx_t_24 = __pyx_v_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_24, __pyx_pybuffernd_indexer.diminfo[0].strides) = -1; /* "pandas/src/generated.pyx":7140 * elif left[i] > rval: * indexer[i] = -1 * j += 1 # <<<<<<<<<<<<<< * else: * indexer[i] = -1 */ __pyx_v_j = (__pyx_v_j + 1); goto __pyx_L9; } /*else*/ { /* "pandas/src/generated.pyx":7142 * j += 1 * else: * indexer[i] = -1 # <<<<<<<<<<<<<< * i += 1 * return indexer */ __pyx_t_25 = __pyx_v_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_25, __pyx_pybuffernd_indexer.diminfo[0].strides) = -1; /* "pandas/src/generated.pyx":7143 * else: * indexer[i] = -1 * i += 1 # <<<<<<<<<<<<<< * return indexer * */ __pyx_v_i = (__pyx_v_i + 1); } __pyx_L9:; __pyx_L3_continue:; } __pyx_L4_break:; /* "pandas/src/generated.pyx":7144 * indexer[i] = -1 * i += 1 * return indexer # <<<<<<<<<<<<<< * * @cython.wraparound(False) */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_indexer)); __pyx_r = ((PyObject *)__pyx_v_indexer); goto __pyx_L0; /* "pandas/src/generated.pyx":7103 * @cython.wraparound(False) * @cython.boundscheck(False) * def left_join_indexer_unique_int32(ndarray[int32_t] left, # <<<<<<<<<<<<<< * ndarray[int32_t] right): * cdef: */ /* 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_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_left.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_right.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.left_join_indexer_unique_int32", __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_left.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_right.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_indexer); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":7148 * @cython.wraparound(False) * @cython.boundscheck(False) * def left_join_indexer_unique_int64(ndarray[int64_t] left, # <<<<<<<<<<<<<< * ndarray[int64_t] right): * cdef: */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_463left_join_indexer_unique_int64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_463left_join_indexer_unique_int64 = {__Pyx_NAMESTR("left_join_indexer_unique_int64"), (PyCFunction)__pyx_pw_6pandas_5algos_463left_join_indexer_unique_int64, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_463left_join_indexer_unique_int64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_left = 0; PyArrayObject *__pyx_v_right = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("left_join_indexer_unique_int64 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_left,&__pyx_n_s_right,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_left)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_right)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("left_join_indexer_unique_int64", 1, 2, 2, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7148; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "left_join_indexer_unique_int64") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7148; __pyx_clineno = __LINE__; goto __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_left = ((PyArrayObject *)values[0]); __pyx_v_right = ((PyArrayObject *)values[1]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("left_join_indexer_unique_int64", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7148; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.left_join_indexer_unique_int64", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_left), __pyx_ptype_5numpy_ndarray, 1, "left", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7148; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_right), __pyx_ptype_5numpy_ndarray, 1, "right", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7149; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_462left_join_indexer_unique_int64(__pyx_self, __pyx_v_left, __pyx_v_right); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5algos_462left_join_indexer_unique_int64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_left, PyArrayObject *__pyx_v_right) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_nleft; Py_ssize_t __pyx_v_nright; PyArrayObject *__pyx_v_indexer = 0; __pyx_t_5numpy_int64_t __pyx_v_rval; __Pyx_LocalBuf_ND __pyx_pybuffernd_indexer; __Pyx_Buffer __pyx_pybuffer_indexer; __Pyx_LocalBuf_ND __pyx_pybuffernd_left; __Pyx_Buffer __pyx_pybuffer_left; __Pyx_LocalBuf_ND __pyx_pybuffernd_right; __Pyx_Buffer __pyx_pybuffer_right; 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; int __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; 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("left_join_indexer_unique_int64", 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_left.pybuffer.buf = NULL; __pyx_pybuffer_left.refcount = 0; __pyx_pybuffernd_left.data = NULL; __pyx_pybuffernd_left.rcbuffer = &__pyx_pybuffer_left; __pyx_pybuffer_right.pybuffer.buf = NULL; __pyx_pybuffer_right.refcount = 0; __pyx_pybuffernd_right.data = NULL; __pyx_pybuffernd_right.rcbuffer = &__pyx_pybuffer_right; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_left.rcbuffer->pybuffer, (PyObject*)__pyx_v_left, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7148; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_left.diminfo[0].strides = __pyx_pybuffernd_left.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_left.diminfo[0].shape = __pyx_pybuffernd_left.rcbuffer->pybuffer.shape[0]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_right.rcbuffer->pybuffer, (PyObject*)__pyx_v_right, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7148; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_right.diminfo[0].strides = __pyx_pybuffernd_right.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_right.diminfo[0].shape = __pyx_pybuffernd_right.rcbuffer->pybuffer.shape[0]; /* "pandas/src/generated.pyx":7155 * int64_t lval, rval * * i = 0 # <<<<<<<<<<<<<< * j = 0 * nleft = len(left) */ __pyx_v_i = 0; /* "pandas/src/generated.pyx":7156 * * i = 0 * j = 0 # <<<<<<<<<<<<<< * nleft = len(left) * nright = len(right) */ __pyx_v_j = 0; /* "pandas/src/generated.pyx":7157 * i = 0 * j = 0 * nleft = len(left) # <<<<<<<<<<<<<< * nright = len(right) * */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_left)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7157; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_nleft = __pyx_t_1; /* "pandas/src/generated.pyx":7158 * j = 0 * nleft = len(left) * nright = len(right) # <<<<<<<<<<<<<< * * indexer = np.empty(nleft, dtype=np.int64) */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_right)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7158; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_nright = __pyx_t_1; /* "pandas/src/generated.pyx":7160 * nright = len(right) * * indexer = np.empty(nleft, dtype=np.int64) # <<<<<<<<<<<<<< * while True: * if i == nleft: */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7160; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 7160; __pyx_clineno = __LINE__; goto __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_nleft); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7160; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7160; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7160; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7160; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_int64); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7160; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 7160; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyObject_Call(__pyx_t_3, __pyx_t_4, __pyx_t_2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7160; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 7160; __pyx_clineno = __LINE__; goto __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_int64_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_int64_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_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_filename = __pyx_f[2]; __pyx_lineno = 7160; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_7 = 0; __pyx_v_indexer = ((PyArrayObject *)__pyx_t_6); __pyx_t_6 = 0; /* "pandas/src/generated.pyx":7161 * * indexer = np.empty(nleft, dtype=np.int64) * while True: # <<<<<<<<<<<<<< * if i == nleft: * break */ while (1) { /* "pandas/src/generated.pyx":7162 * indexer = np.empty(nleft, dtype=np.int64) * while True: * if i == nleft: # <<<<<<<<<<<<<< * break * */ __pyx_t_12 = ((__pyx_v_i == __pyx_v_nleft) != 0); if (__pyx_t_12) { /* "pandas/src/generated.pyx":7163 * while True: * if i == nleft: * break # <<<<<<<<<<<<<< * * if j == nright: */ goto __pyx_L4_break; } /* "pandas/src/generated.pyx":7165 * break * * if j == nright: # <<<<<<<<<<<<<< * indexer[i] = -1 * i += 1 */ __pyx_t_12 = ((__pyx_v_j == __pyx_v_nright) != 0); if (__pyx_t_12) { /* "pandas/src/generated.pyx":7166 * * if j == nright: * indexer[i] = -1 # <<<<<<<<<<<<<< * i += 1 * continue */ __pyx_t_1 = __pyx_v_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_1, __pyx_pybuffernd_indexer.diminfo[0].strides) = -1; /* "pandas/src/generated.pyx":7167 * if j == nright: * indexer[i] = -1 * i += 1 # <<<<<<<<<<<<<< * continue * */ __pyx_v_i = (__pyx_v_i + 1); /* "pandas/src/generated.pyx":7168 * indexer[i] = -1 * i += 1 * continue # <<<<<<<<<<<<<< * * rval = right[j] */ goto __pyx_L3_continue; } /* "pandas/src/generated.pyx":7170 * continue * * rval = right[j] # <<<<<<<<<<<<<< * * while i < nleft - 1 and left[i] == rval: */ __pyx_t_13 = __pyx_v_j; __pyx_v_rval = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_right.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_right.diminfo[0].strides)); /* "pandas/src/generated.pyx":7172 * rval = right[j] * * while i < nleft - 1 and left[i] == rval: # <<<<<<<<<<<<<< * indexer[i] = j * i += 1 */ while (1) { __pyx_t_12 = ((__pyx_v_i < (__pyx_v_nleft - 1)) != 0); if (__pyx_t_12) { __pyx_t_14 = __pyx_v_i; __pyx_t_15 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_left.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_left.diminfo[0].strides)) == __pyx_v_rval) != 0); __pyx_t_16 = __pyx_t_15; } else { __pyx_t_16 = __pyx_t_12; } if (!__pyx_t_16) break; /* "pandas/src/generated.pyx":7173 * * while i < nleft - 1 and left[i] == rval: * indexer[i] = j # <<<<<<<<<<<<<< * i += 1 * */ __pyx_t_17 = __pyx_v_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_indexer.diminfo[0].strides) = __pyx_v_j; /* "pandas/src/generated.pyx":7174 * while i < nleft - 1 and left[i] == rval: * indexer[i] = j * i += 1 # <<<<<<<<<<<<<< * * if left[i] == right[j]: */ __pyx_v_i = (__pyx_v_i + 1); } /* "pandas/src/generated.pyx":7176 * i += 1 * * if left[i] == right[j]: # <<<<<<<<<<<<<< * indexer[i] = j * i += 1 */ __pyx_t_18 = __pyx_v_i; __pyx_t_19 = __pyx_v_j; __pyx_t_16 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_left.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_left.diminfo[0].strides)) == (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_right.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_right.diminfo[0].strides))) != 0); if (__pyx_t_16) { /* "pandas/src/generated.pyx":7177 * * if left[i] == right[j]: * indexer[i] = j # <<<<<<<<<<<<<< * i += 1 * while i < nleft - 1 and left[i] == rval: */ __pyx_t_20 = __pyx_v_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_indexer.diminfo[0].strides) = __pyx_v_j; /* "pandas/src/generated.pyx":7178 * if left[i] == right[j]: * indexer[i] = j * i += 1 # <<<<<<<<<<<<<< * while i < nleft - 1 and left[i] == rval: * indexer[i] = j */ __pyx_v_i = (__pyx_v_i + 1); /* "pandas/src/generated.pyx":7179 * indexer[i] = j * i += 1 * while i < nleft - 1 and left[i] == rval: # <<<<<<<<<<<<<< * indexer[i] = j * i += 1 */ while (1) { __pyx_t_16 = ((__pyx_v_i < (__pyx_v_nleft - 1)) != 0); if (__pyx_t_16) { __pyx_t_21 = __pyx_v_i; __pyx_t_12 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_left.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_left.diminfo[0].strides)) == __pyx_v_rval) != 0); __pyx_t_15 = __pyx_t_12; } else { __pyx_t_15 = __pyx_t_16; } if (!__pyx_t_15) break; /* "pandas/src/generated.pyx":7180 * i += 1 * while i < nleft - 1 and left[i] == rval: * indexer[i] = j # <<<<<<<<<<<<<< * i += 1 * j += 1 */ __pyx_t_22 = __pyx_v_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_22, __pyx_pybuffernd_indexer.diminfo[0].strides) = __pyx_v_j; /* "pandas/src/generated.pyx":7181 * while i < nleft - 1 and left[i] == rval: * indexer[i] = j * i += 1 # <<<<<<<<<<<<<< * j += 1 * elif left[i] > rval: */ __pyx_v_i = (__pyx_v_i + 1); } /* "pandas/src/generated.pyx":7182 * indexer[i] = j * i += 1 * j += 1 # <<<<<<<<<<<<<< * elif left[i] > rval: * indexer[i] = -1 */ __pyx_v_j = (__pyx_v_j + 1); goto __pyx_L9; } /* "pandas/src/generated.pyx":7183 * i += 1 * j += 1 * elif left[i] > rval: # <<<<<<<<<<<<<< * indexer[i] = -1 * j += 1 */ __pyx_t_23 = __pyx_v_i; __pyx_t_15 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_left.rcbuffer->pybuffer.buf, __pyx_t_23, __pyx_pybuffernd_left.diminfo[0].strides)) > __pyx_v_rval) != 0); if (__pyx_t_15) { /* "pandas/src/generated.pyx":7184 * j += 1 * elif left[i] > rval: * indexer[i] = -1 # <<<<<<<<<<<<<< * j += 1 * else: */ __pyx_t_24 = __pyx_v_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_24, __pyx_pybuffernd_indexer.diminfo[0].strides) = -1; /* "pandas/src/generated.pyx":7185 * elif left[i] > rval: * indexer[i] = -1 * j += 1 # <<<<<<<<<<<<<< * else: * indexer[i] = -1 */ __pyx_v_j = (__pyx_v_j + 1); goto __pyx_L9; } /*else*/ { /* "pandas/src/generated.pyx":7187 * j += 1 * else: * indexer[i] = -1 # <<<<<<<<<<<<<< * i += 1 * return indexer */ __pyx_t_25 = __pyx_v_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_25, __pyx_pybuffernd_indexer.diminfo[0].strides) = -1; /* "pandas/src/generated.pyx":7188 * else: * indexer[i] = -1 * i += 1 # <<<<<<<<<<<<<< * return indexer * */ __pyx_v_i = (__pyx_v_i + 1); } __pyx_L9:; __pyx_L3_continue:; } __pyx_L4_break:; /* "pandas/src/generated.pyx":7189 * indexer[i] = -1 * i += 1 * return indexer # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_indexer)); __pyx_r = ((PyObject *)__pyx_v_indexer); goto __pyx_L0; /* "pandas/src/generated.pyx":7148 * @cython.wraparound(False) * @cython.boundscheck(False) * def left_join_indexer_unique_int64(ndarray[int64_t] left, # <<<<<<<<<<<<<< * ndarray[int64_t] right): * cdef: */ /* 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_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_left.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_right.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.left_join_indexer_unique_int64", __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_left.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_right.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_indexer); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":7193 * * * def left_join_indexer_float64(ndarray[float64_t] left, # <<<<<<<<<<<<<< * ndarray[float64_t] right): * ''' */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_465left_join_indexer_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6pandas_5algos_464left_join_indexer_float64[] = "\n Two-pass algorithm for monotonic indexes. Handles many-to-one merges\n "; static PyMethodDef __pyx_mdef_6pandas_5algos_465left_join_indexer_float64 = {__Pyx_NAMESTR("left_join_indexer_float64"), (PyCFunction)__pyx_pw_6pandas_5algos_465left_join_indexer_float64, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_5algos_464left_join_indexer_float64)}; static PyObject *__pyx_pw_6pandas_5algos_465left_join_indexer_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_left = 0; PyArrayObject *__pyx_v_right = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("left_join_indexer_float64 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_left,&__pyx_n_s_right,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_left)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_right)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("left_join_indexer_float64", 1, 2, 2, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7193; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "left_join_indexer_float64") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7193; __pyx_clineno = __LINE__; goto __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_left = ((PyArrayObject *)values[0]); __pyx_v_right = ((PyArrayObject *)values[1]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("left_join_indexer_float64", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7193; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.left_join_indexer_float64", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_left), __pyx_ptype_5numpy_ndarray, 1, "left", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7193; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_right), __pyx_ptype_5numpy_ndarray, 1, "right", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7194; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_464left_join_indexer_float64(__pyx_self, __pyx_v_left, __pyx_v_right); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5algos_464left_join_indexer_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_left, PyArrayObject *__pyx_v_right) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_nright; Py_ssize_t __pyx_v_nleft; Py_ssize_t __pyx_v_count; __pyx_t_5numpy_float64_t __pyx_v_lval; __pyx_t_5numpy_float64_t __pyx_v_rval; PyArrayObject *__pyx_v_lindexer = 0; PyArrayObject *__pyx_v_rindexer = 0; PyArrayObject *__pyx_v_result = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_left; __Pyx_Buffer __pyx_pybuffer_left; __Pyx_LocalBuf_ND __pyx_pybuffernd_lindexer; __Pyx_Buffer __pyx_pybuffer_lindexer; __Pyx_LocalBuf_ND __pyx_pybuffernd_result; __Pyx_Buffer __pyx_pybuffer_result; __Pyx_LocalBuf_ND __pyx_pybuffernd_right; __Pyx_Buffer __pyx_pybuffer_right; __Pyx_LocalBuf_ND __pyx_pybuffernd_rindexer; __Pyx_Buffer __pyx_pybuffer_rindexer; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; int __pyx_t_2; int __pyx_t_3; Py_ssize_t __pyx_t_4; Py_ssize_t __pyx_t_5; int __pyx_t_6; int __pyx_t_7; Py_ssize_t __pyx_t_8; Py_ssize_t __pyx_t_9; PyObject *__pyx_t_10 = NULL; PyObject *__pyx_t_11 = NULL; PyObject *__pyx_t_12 = NULL; PyObject *__pyx_t_13 = NULL; PyObject *__pyx_t_14 = NULL; PyArrayObject *__pyx_t_15 = NULL; PyObject *__pyx_t_16 = NULL; PyObject *__pyx_t_17 = NULL; PyObject *__pyx_t_18 = NULL; PyArrayObject *__pyx_t_19 = NULL; 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("left_join_indexer_float64", 0); __pyx_pybuffer_lindexer.pybuffer.buf = NULL; __pyx_pybuffer_lindexer.refcount = 0; __pyx_pybuffernd_lindexer.data = NULL; __pyx_pybuffernd_lindexer.rcbuffer = &__pyx_pybuffer_lindexer; __pyx_pybuffer_rindexer.pybuffer.buf = NULL; __pyx_pybuffer_rindexer.refcount = 0; __pyx_pybuffernd_rindexer.data = NULL; __pyx_pybuffernd_rindexer.rcbuffer = &__pyx_pybuffer_rindexer; __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_left.pybuffer.buf = NULL; __pyx_pybuffer_left.refcount = 0; __pyx_pybuffernd_left.data = NULL; __pyx_pybuffernd_left.rcbuffer = &__pyx_pybuffer_left; __pyx_pybuffer_right.pybuffer.buf = NULL; __pyx_pybuffer_right.refcount = 0; __pyx_pybuffernd_right.data = NULL; __pyx_pybuffernd_right.rcbuffer = &__pyx_pybuffer_right; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_left.rcbuffer->pybuffer, (PyObject*)__pyx_v_left, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7193; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_left.diminfo[0].strides = __pyx_pybuffernd_left.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_left.diminfo[0].shape = __pyx_pybuffernd_left.rcbuffer->pybuffer.shape[0]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_right.rcbuffer->pybuffer, (PyObject*)__pyx_v_right, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7193; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_right.diminfo[0].strides = __pyx_pybuffernd_right.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_right.diminfo[0].shape = __pyx_pybuffernd_right.rcbuffer->pybuffer.shape[0]; /* "pandas/src/generated.pyx":7204 * ndarray[float64_t] result * * nleft = len(left) # <<<<<<<<<<<<<< * nright = len(right) * */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_left)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7204; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_nleft = __pyx_t_1; /* "pandas/src/generated.pyx":7205 * * nleft = len(left) * nright = len(right) # <<<<<<<<<<<<<< * * i = 0 */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_right)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7205; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_nright = __pyx_t_1; /* "pandas/src/generated.pyx":7207 * nright = len(right) * * i = 0 # <<<<<<<<<<<<<< * j = 0 * count = 0 */ __pyx_v_i = 0; /* "pandas/src/generated.pyx":7208 * * i = 0 * j = 0 # <<<<<<<<<<<<<< * count = 0 * if nleft > 0: */ __pyx_v_j = 0; /* "pandas/src/generated.pyx":7209 * i = 0 * j = 0 * count = 0 # <<<<<<<<<<<<<< * if nleft > 0: * while i < nleft: */ __pyx_v_count = 0; /* "pandas/src/generated.pyx":7210 * j = 0 * count = 0 * if nleft > 0: # <<<<<<<<<<<<<< * while i < nleft: * if j == nright: */ __pyx_t_2 = ((__pyx_v_nleft > 0) != 0); if (__pyx_t_2) { /* "pandas/src/generated.pyx":7211 * count = 0 * if nleft > 0: * while i < nleft: # <<<<<<<<<<<<<< * if j == nright: * count += nleft - i */ while (1) { __pyx_t_2 = ((__pyx_v_i < __pyx_v_nleft) != 0); if (!__pyx_t_2) break; /* "pandas/src/generated.pyx":7212 * if nleft > 0: * while i < nleft: * if j == nright: # <<<<<<<<<<<<<< * count += nleft - i * break */ __pyx_t_2 = ((__pyx_v_j == __pyx_v_nright) != 0); if (__pyx_t_2) { /* "pandas/src/generated.pyx":7213 * while i < nleft: * if j == nright: * count += nleft - i # <<<<<<<<<<<<<< * break * */ __pyx_v_count = (__pyx_v_count + (__pyx_v_nleft - __pyx_v_i)); /* "pandas/src/generated.pyx":7214 * if j == nright: * count += nleft - i * break # <<<<<<<<<<<<<< * * lval = left[i] */ goto __pyx_L5_break; } /* "pandas/src/generated.pyx":7216 * break * * lval = left[i] # <<<<<<<<<<<<<< * rval = right[j] * */ __pyx_t_1 = __pyx_v_i; __pyx_t_3 = -1; if (__pyx_t_1 < 0) { __pyx_t_1 += __pyx_pybuffernd_left.diminfo[0].shape; if (unlikely(__pyx_t_1 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_1 >= __pyx_pybuffernd_left.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7216; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_lval = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_left.rcbuffer->pybuffer.buf, __pyx_t_1, __pyx_pybuffernd_left.diminfo[0].strides)); /* "pandas/src/generated.pyx":7217 * * lval = left[i] * rval = right[j] # <<<<<<<<<<<<<< * * if lval == rval: */ __pyx_t_4 = __pyx_v_j; __pyx_t_3 = -1; if (__pyx_t_4 < 0) { __pyx_t_4 += __pyx_pybuffernd_right.diminfo[0].shape; if (unlikely(__pyx_t_4 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_4 >= __pyx_pybuffernd_right.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7217; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_rval = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_right.rcbuffer->pybuffer.buf, __pyx_t_4, __pyx_pybuffernd_right.diminfo[0].strides)); /* "pandas/src/generated.pyx":7219 * rval = right[j] * * if lval == rval: # <<<<<<<<<<<<<< * count += 1 * if i < nleft - 1: */ __pyx_t_2 = ((__pyx_v_lval == __pyx_v_rval) != 0); if (__pyx_t_2) { /* "pandas/src/generated.pyx":7220 * * if lval == rval: * count += 1 # <<<<<<<<<<<<<< * if i < nleft - 1: * if j < nright - 1 and right[j + 1] == rval: */ __pyx_v_count = (__pyx_v_count + 1); /* "pandas/src/generated.pyx":7221 * if lval == rval: * count += 1 * if i < nleft - 1: # <<<<<<<<<<<<<< * if j < nright - 1 and right[j + 1] == rval: * j += 1 */ __pyx_t_2 = ((__pyx_v_i < (__pyx_v_nleft - 1)) != 0); if (__pyx_t_2) { /* "pandas/src/generated.pyx":7222 * count += 1 * if i < nleft - 1: * if j < nright - 1 and right[j + 1] == rval: # <<<<<<<<<<<<<< * j += 1 * else: */ __pyx_t_2 = ((__pyx_v_j < (__pyx_v_nright - 1)) != 0); if (__pyx_t_2) { __pyx_t_5 = (__pyx_v_j + 1); __pyx_t_3 = -1; if (__pyx_t_5 < 0) { __pyx_t_5 += __pyx_pybuffernd_right.diminfo[0].shape; if (unlikely(__pyx_t_5 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_5 >= __pyx_pybuffernd_right.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7222; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_6 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_right.rcbuffer->pybuffer.buf, __pyx_t_5, __pyx_pybuffernd_right.diminfo[0].strides)) == __pyx_v_rval) != 0); __pyx_t_7 = __pyx_t_6; } else { __pyx_t_7 = __pyx_t_2; } if (__pyx_t_7) { /* "pandas/src/generated.pyx":7223 * if i < nleft - 1: * if j < nright - 1 and right[j + 1] == rval: * j += 1 # <<<<<<<<<<<<<< * else: * i += 1 */ __pyx_v_j = (__pyx_v_j + 1); goto __pyx_L9; } /*else*/ { /* "pandas/src/generated.pyx":7225 * j += 1 * else: * i += 1 # <<<<<<<<<<<<<< * if left[i] != rval: * j += 1 */ __pyx_v_i = (__pyx_v_i + 1); /* "pandas/src/generated.pyx":7226 * else: * i += 1 * if left[i] != rval: # <<<<<<<<<<<<<< * j += 1 * elif j < nright - 1: */ __pyx_t_8 = __pyx_v_i; __pyx_t_3 = -1; if (__pyx_t_8 < 0) { __pyx_t_8 += __pyx_pybuffernd_left.diminfo[0].shape; if (unlikely(__pyx_t_8 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_8 >= __pyx_pybuffernd_left.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7226; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_7 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_left.rcbuffer->pybuffer.buf, __pyx_t_8, __pyx_pybuffernd_left.diminfo[0].strides)) != __pyx_v_rval) != 0); if (__pyx_t_7) { /* "pandas/src/generated.pyx":7227 * i += 1 * if left[i] != rval: * j += 1 # <<<<<<<<<<<<<< * elif j < nright - 1: * j += 1 */ __pyx_v_j = (__pyx_v_j + 1); goto __pyx_L10; } __pyx_L10:; } __pyx_L9:; goto __pyx_L8; } /* "pandas/src/generated.pyx":7228 * if left[i] != rval: * j += 1 * elif j < nright - 1: # <<<<<<<<<<<<<< * j += 1 * if lval != right[j]: */ __pyx_t_7 = ((__pyx_v_j < (__pyx_v_nright - 1)) != 0); if (__pyx_t_7) { /* "pandas/src/generated.pyx":7229 * j += 1 * elif j < nright - 1: * j += 1 # <<<<<<<<<<<<<< * if lval != right[j]: * i += 1 */ __pyx_v_j = (__pyx_v_j + 1); /* "pandas/src/generated.pyx":7230 * elif j < nright - 1: * j += 1 * if lval != right[j]: # <<<<<<<<<<<<<< * i += 1 * else: */ __pyx_t_9 = __pyx_v_j; __pyx_t_3 = -1; if (__pyx_t_9 < 0) { __pyx_t_9 += __pyx_pybuffernd_right.diminfo[0].shape; if (unlikely(__pyx_t_9 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_9 >= __pyx_pybuffernd_right.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7230; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_7 = ((__pyx_v_lval != (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_right.rcbuffer->pybuffer.buf, __pyx_t_9, __pyx_pybuffernd_right.diminfo[0].strides))) != 0); if (__pyx_t_7) { /* "pandas/src/generated.pyx":7231 * j += 1 * if lval != right[j]: * i += 1 # <<<<<<<<<<<<<< * else: * # end of the road */ __pyx_v_i = (__pyx_v_i + 1); goto __pyx_L11; } __pyx_L11:; goto __pyx_L8; } /*else*/ { /* "pandas/src/generated.pyx":7234 * else: * # end of the road * break # <<<<<<<<<<<<<< * elif lval < rval: * count += 1 */ goto __pyx_L5_break; } __pyx_L8:; goto __pyx_L7; } /* "pandas/src/generated.pyx":7235 * # end of the road * break * elif lval < rval: # <<<<<<<<<<<<<< * count += 1 * i += 1 */ __pyx_t_7 = ((__pyx_v_lval < __pyx_v_rval) != 0); if (__pyx_t_7) { /* "pandas/src/generated.pyx":7236 * break * elif lval < rval: * count += 1 # <<<<<<<<<<<<<< * i += 1 * else: */ __pyx_v_count = (__pyx_v_count + 1); /* "pandas/src/generated.pyx":7237 * elif lval < rval: * count += 1 * i += 1 # <<<<<<<<<<<<<< * else: * j += 1 */ __pyx_v_i = (__pyx_v_i + 1); goto __pyx_L7; } /*else*/ { /* "pandas/src/generated.pyx":7239 * i += 1 * else: * j += 1 # <<<<<<<<<<<<<< * * # do it again now that result size is known */ __pyx_v_j = (__pyx_v_j + 1); } __pyx_L7:; } __pyx_L5_break:; goto __pyx_L3; } __pyx_L3:; /* "pandas/src/generated.pyx":7243 * # do it again now that result size is known * * lindexer = np.empty(count, dtype=np.int64) # <<<<<<<<<<<<<< * rindexer = np.empty(count, dtype=np.int64) * result = np.empty(count, dtype=np.float64) */ __pyx_t_10 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7243; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_empty); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7243; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_t_10 = PyInt_FromSsize_t(__pyx_v_count); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7243; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __pyx_t_12 = PyTuple_New(1); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7243; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_10); __Pyx_GIVEREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_t_10 = PyDict_New(); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7243; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __pyx_t_13 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7243; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_t_13, __pyx_n_s_int64); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7243; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_14); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; if (PyDict_SetItem(__pyx_t_10, __pyx_n_s_dtype, __pyx_t_14) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7243; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; __pyx_t_14 = PyObject_Call(__pyx_t_11, __pyx_t_12, __pyx_t_10); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7243; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_14); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; if (!(likely(((__pyx_t_14) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_14, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7243; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_15 = ((PyArrayObject *)__pyx_t_14); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_lindexer.rcbuffer->pybuffer); __pyx_t_3 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_lindexer.rcbuffer->pybuffer, (PyObject*)__pyx_t_15, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_3 < 0)) { PyErr_Fetch(&__pyx_t_16, &__pyx_t_17, &__pyx_t_18); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_lindexer.rcbuffer->pybuffer, (PyObject*)__pyx_v_lindexer, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_16); Py_XDECREF(__pyx_t_17); Py_XDECREF(__pyx_t_18); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_16, __pyx_t_17, __pyx_t_18); } } __pyx_pybuffernd_lindexer.diminfo[0].strides = __pyx_pybuffernd_lindexer.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_lindexer.diminfo[0].shape = __pyx_pybuffernd_lindexer.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7243; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_15 = 0; __pyx_v_lindexer = ((PyArrayObject *)__pyx_t_14); __pyx_t_14 = 0; /* "pandas/src/generated.pyx":7244 * * lindexer = np.empty(count, dtype=np.int64) * rindexer = np.empty(count, dtype=np.int64) # <<<<<<<<<<<<<< * result = np.empty(count, dtype=np.float64) * */ __pyx_t_14 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7244; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_14); __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_14, __pyx_n_s_empty); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7244; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; __pyx_t_14 = PyInt_FromSsize_t(__pyx_v_count); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7244; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_14); __pyx_t_12 = PyTuple_New(1); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7244; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_14); __Pyx_GIVEREF(__pyx_t_14); __pyx_t_14 = 0; __pyx_t_14 = PyDict_New(); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7244; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_14); __pyx_t_11 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7244; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_int64); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7244; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; if (PyDict_SetItem(__pyx_t_14, __pyx_n_s_dtype, __pyx_t_13) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7244; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_13 = PyObject_Call(__pyx_t_10, __pyx_t_12, __pyx_t_14); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7244; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; if (!(likely(((__pyx_t_13) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_13, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7244; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_15 = ((PyArrayObject *)__pyx_t_13); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_rindexer.rcbuffer->pybuffer); __pyx_t_3 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_rindexer.rcbuffer->pybuffer, (PyObject*)__pyx_t_15, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_3 < 0)) { PyErr_Fetch(&__pyx_t_18, &__pyx_t_17, &__pyx_t_16); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_rindexer.rcbuffer->pybuffer, (PyObject*)__pyx_v_rindexer, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_18); Py_XDECREF(__pyx_t_17); Py_XDECREF(__pyx_t_16); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_18, __pyx_t_17, __pyx_t_16); } } __pyx_pybuffernd_rindexer.diminfo[0].strides = __pyx_pybuffernd_rindexer.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_rindexer.diminfo[0].shape = __pyx_pybuffernd_rindexer.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7244; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_15 = 0; __pyx_v_rindexer = ((PyArrayObject *)__pyx_t_13); __pyx_t_13 = 0; /* "pandas/src/generated.pyx":7245 * lindexer = np.empty(count, dtype=np.int64) * rindexer = np.empty(count, dtype=np.int64) * result = np.empty(count, dtype=np.float64) # <<<<<<<<<<<<<< * * i = 0 */ __pyx_t_13 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7245; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_t_13, __pyx_n_s_empty); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7245; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_14); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_13 = PyInt_FromSsize_t(__pyx_v_count); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7245; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __pyx_t_12 = PyTuple_New(1); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7245; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_13); __Pyx_GIVEREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_13 = PyDict_New(); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7245; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __pyx_t_10 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7245; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_float64); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7245; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; if (PyDict_SetItem(__pyx_t_13, __pyx_n_s_dtype, __pyx_t_11) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7245; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __pyx_t_11 = PyObject_Call(__pyx_t_14, __pyx_t_12, __pyx_t_13); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7245; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; if (!(likely(((__pyx_t_11) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_11, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7245; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_19 = ((PyArrayObject *)__pyx_t_11); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __pyx_t_3 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_t_19, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_3 < 0)) { PyErr_Fetch(&__pyx_t_16, &__pyx_t_17, &__pyx_t_18); 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_16); Py_XDECREF(__pyx_t_17); Py_XDECREF(__pyx_t_18); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_16, __pyx_t_17, __pyx_t_18); } } __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_3 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7245; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_19 = 0; __pyx_v_result = ((PyArrayObject *)__pyx_t_11); __pyx_t_11 = 0; /* "pandas/src/generated.pyx":7247 * result = np.empty(count, dtype=np.float64) * * i = 0 # <<<<<<<<<<<<<< * j = 0 * count = 0 */ __pyx_v_i = 0; /* "pandas/src/generated.pyx":7248 * * i = 0 * j = 0 # <<<<<<<<<<<<<< * count = 0 * if nleft > 0: */ __pyx_v_j = 0; /* "pandas/src/generated.pyx":7249 * i = 0 * j = 0 * count = 0 # <<<<<<<<<<<<<< * if nleft > 0: * while i < nleft: */ __pyx_v_count = 0; /* "pandas/src/generated.pyx":7250 * j = 0 * count = 0 * if nleft > 0: # <<<<<<<<<<<<<< * while i < nleft: * if j == nright: */ __pyx_t_7 = ((__pyx_v_nleft > 0) != 0); if (__pyx_t_7) { /* "pandas/src/generated.pyx":7251 * count = 0 * if nleft > 0: * while i < nleft: # <<<<<<<<<<<<<< * if j == nright: * while i < nleft: */ while (1) { __pyx_t_7 = ((__pyx_v_i < __pyx_v_nleft) != 0); if (!__pyx_t_7) break; /* "pandas/src/generated.pyx":7252 * if nleft > 0: * while i < nleft: * if j == nright: # <<<<<<<<<<<<<< * while i < nleft: * lindexer[count] = i */ __pyx_t_7 = ((__pyx_v_j == __pyx_v_nright) != 0); if (__pyx_t_7) { /* "pandas/src/generated.pyx":7253 * while i < nleft: * if j == nright: * while i < nleft: # <<<<<<<<<<<<<< * lindexer[count] = i * rindexer[count] = -1 */ while (1) { __pyx_t_7 = ((__pyx_v_i < __pyx_v_nleft) != 0); if (!__pyx_t_7) break; /* "pandas/src/generated.pyx":7254 * if j == nright: * while i < nleft: * lindexer[count] = i # <<<<<<<<<<<<<< * rindexer[count] = -1 * result[count] = left[i] */ __pyx_t_20 = __pyx_v_count; __pyx_t_3 = -1; if (__pyx_t_20 < 0) { __pyx_t_20 += __pyx_pybuffernd_lindexer.diminfo[0].shape; if (unlikely(__pyx_t_20 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_20 >= __pyx_pybuffernd_lindexer.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7254; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_lindexer.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_lindexer.diminfo[0].strides) = __pyx_v_i; /* "pandas/src/generated.pyx":7255 * while i < nleft: * lindexer[count] = i * rindexer[count] = -1 # <<<<<<<<<<<<<< * result[count] = left[i] * i += 1 */ __pyx_t_21 = __pyx_v_count; __pyx_t_3 = -1; if (__pyx_t_21 < 0) { __pyx_t_21 += __pyx_pybuffernd_rindexer.diminfo[0].shape; if (unlikely(__pyx_t_21 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_21 >= __pyx_pybuffernd_rindexer.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7255; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_rindexer.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_rindexer.diminfo[0].strides) = -1; /* "pandas/src/generated.pyx":7256 * lindexer[count] = i * rindexer[count] = -1 * result[count] = left[i] # <<<<<<<<<<<<<< * i += 1 * count += 1 */ __pyx_t_22 = __pyx_v_i; __pyx_t_3 = -1; if (__pyx_t_22 < 0) { __pyx_t_22 += __pyx_pybuffernd_left.diminfo[0].shape; if (unlikely(__pyx_t_22 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_22 >= __pyx_pybuffernd_left.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7256; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_23 = __pyx_v_count; __pyx_t_3 = -1; if (__pyx_t_23 < 0) { __pyx_t_23 += __pyx_pybuffernd_result.diminfo[0].shape; if (unlikely(__pyx_t_23 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_23 >= __pyx_pybuffernd_result.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7256; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_23, __pyx_pybuffernd_result.diminfo[0].strides) = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_left.rcbuffer->pybuffer.buf, __pyx_t_22, __pyx_pybuffernd_left.diminfo[0].strides)); /* "pandas/src/generated.pyx":7257 * rindexer[count] = -1 * result[count] = left[i] * i += 1 # <<<<<<<<<<<<<< * count += 1 * break */ __pyx_v_i = (__pyx_v_i + 1); /* "pandas/src/generated.pyx":7258 * result[count] = left[i] * i += 1 * count += 1 # <<<<<<<<<<<<<< * break * */ __pyx_v_count = (__pyx_v_count + 1); } /* "pandas/src/generated.pyx":7259 * i += 1 * count += 1 * break # <<<<<<<<<<<<<< * * lval = left[i] */ goto __pyx_L14_break; } /* "pandas/src/generated.pyx":7261 * break * * lval = left[i] # <<<<<<<<<<<<<< * rval = right[j] * */ __pyx_t_24 = __pyx_v_i; __pyx_t_3 = -1; if (__pyx_t_24 < 0) { __pyx_t_24 += __pyx_pybuffernd_left.diminfo[0].shape; if (unlikely(__pyx_t_24 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_24 >= __pyx_pybuffernd_left.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7261; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_lval = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_left.rcbuffer->pybuffer.buf, __pyx_t_24, __pyx_pybuffernd_left.diminfo[0].strides)); /* "pandas/src/generated.pyx":7262 * * lval = left[i] * rval = right[j] # <<<<<<<<<<<<<< * * if lval == rval: */ __pyx_t_25 = __pyx_v_j; __pyx_t_3 = -1; if (__pyx_t_25 < 0) { __pyx_t_25 += __pyx_pybuffernd_right.diminfo[0].shape; if (unlikely(__pyx_t_25 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_25 >= __pyx_pybuffernd_right.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7262; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_rval = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_right.rcbuffer->pybuffer.buf, __pyx_t_25, __pyx_pybuffernd_right.diminfo[0].strides)); /* "pandas/src/generated.pyx":7264 * rval = right[j] * * if lval == rval: # <<<<<<<<<<<<<< * lindexer[count] = i * rindexer[count] = j */ __pyx_t_7 = ((__pyx_v_lval == __pyx_v_rval) != 0); if (__pyx_t_7) { /* "pandas/src/generated.pyx":7265 * * if lval == rval: * lindexer[count] = i # <<<<<<<<<<<<<< * rindexer[count] = j * result[count] = lval */ __pyx_t_26 = __pyx_v_count; __pyx_t_3 = -1; if (__pyx_t_26 < 0) { __pyx_t_26 += __pyx_pybuffernd_lindexer.diminfo[0].shape; if (unlikely(__pyx_t_26 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_26 >= __pyx_pybuffernd_lindexer.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7265; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_lindexer.rcbuffer->pybuffer.buf, __pyx_t_26, __pyx_pybuffernd_lindexer.diminfo[0].strides) = __pyx_v_i; /* "pandas/src/generated.pyx":7266 * if lval == rval: * lindexer[count] = i * rindexer[count] = j # <<<<<<<<<<<<<< * result[count] = lval * count += 1 */ __pyx_t_27 = __pyx_v_count; __pyx_t_3 = -1; if (__pyx_t_27 < 0) { __pyx_t_27 += __pyx_pybuffernd_rindexer.diminfo[0].shape; if (unlikely(__pyx_t_27 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_27 >= __pyx_pybuffernd_rindexer.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7266; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_rindexer.rcbuffer->pybuffer.buf, __pyx_t_27, __pyx_pybuffernd_rindexer.diminfo[0].strides) = __pyx_v_j; /* "pandas/src/generated.pyx":7267 * lindexer[count] = i * rindexer[count] = j * result[count] = lval # <<<<<<<<<<<<<< * count += 1 * if i < nleft - 1: */ __pyx_t_28 = __pyx_v_count; __pyx_t_3 = -1; if (__pyx_t_28 < 0) { __pyx_t_28 += __pyx_pybuffernd_result.diminfo[0].shape; if (unlikely(__pyx_t_28 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_28 >= __pyx_pybuffernd_result.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7267; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_28, __pyx_pybuffernd_result.diminfo[0].strides) = __pyx_v_lval; /* "pandas/src/generated.pyx":7268 * rindexer[count] = j * result[count] = lval * count += 1 # <<<<<<<<<<<<<< * if i < nleft - 1: * if j < nright - 1 and right[j + 1] == rval: */ __pyx_v_count = (__pyx_v_count + 1); /* "pandas/src/generated.pyx":7269 * result[count] = lval * count += 1 * if i < nleft - 1: # <<<<<<<<<<<<<< * if j < nright - 1 and right[j + 1] == rval: * j += 1 */ __pyx_t_7 = ((__pyx_v_i < (__pyx_v_nleft - 1)) != 0); if (__pyx_t_7) { /* "pandas/src/generated.pyx":7270 * count += 1 * if i < nleft - 1: * if j < nright - 1 and right[j + 1] == rval: # <<<<<<<<<<<<<< * j += 1 * else: */ __pyx_t_7 = ((__pyx_v_j < (__pyx_v_nright - 1)) != 0); if (__pyx_t_7) { __pyx_t_29 = (__pyx_v_j + 1); __pyx_t_3 = -1; if (__pyx_t_29 < 0) { __pyx_t_29 += __pyx_pybuffernd_right.diminfo[0].shape; if (unlikely(__pyx_t_29 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_29 >= __pyx_pybuffernd_right.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7270; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_2 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_right.rcbuffer->pybuffer.buf, __pyx_t_29, __pyx_pybuffernd_right.diminfo[0].strides)) == __pyx_v_rval) != 0); __pyx_t_6 = __pyx_t_2; } else { __pyx_t_6 = __pyx_t_7; } if (__pyx_t_6) { /* "pandas/src/generated.pyx":7271 * if i < nleft - 1: * if j < nright - 1 and right[j + 1] == rval: * j += 1 # <<<<<<<<<<<<<< * else: * i += 1 */ __pyx_v_j = (__pyx_v_j + 1); goto __pyx_L20; } /*else*/ { /* "pandas/src/generated.pyx":7273 * j += 1 * else: * i += 1 # <<<<<<<<<<<<<< * if left[i] != rval: * j += 1 */ __pyx_v_i = (__pyx_v_i + 1); /* "pandas/src/generated.pyx":7274 * else: * i += 1 * if left[i] != rval: # <<<<<<<<<<<<<< * j += 1 * elif j < nright - 1: */ __pyx_t_30 = __pyx_v_i; __pyx_t_3 = -1; if (__pyx_t_30 < 0) { __pyx_t_30 += __pyx_pybuffernd_left.diminfo[0].shape; if (unlikely(__pyx_t_30 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_30 >= __pyx_pybuffernd_left.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7274; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_6 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_left.rcbuffer->pybuffer.buf, __pyx_t_30, __pyx_pybuffernd_left.diminfo[0].strides)) != __pyx_v_rval) != 0); if (__pyx_t_6) { /* "pandas/src/generated.pyx":7275 * i += 1 * if left[i] != rval: * j += 1 # <<<<<<<<<<<<<< * elif j < nright - 1: * j += 1 */ __pyx_v_j = (__pyx_v_j + 1); goto __pyx_L21; } __pyx_L21:; } __pyx_L20:; goto __pyx_L19; } /* "pandas/src/generated.pyx":7276 * if left[i] != rval: * j += 1 * elif j < nright - 1: # <<<<<<<<<<<<<< * j += 1 * if lval != right[j]: */ __pyx_t_6 = ((__pyx_v_j < (__pyx_v_nright - 1)) != 0); if (__pyx_t_6) { /* "pandas/src/generated.pyx":7277 * j += 1 * elif j < nright - 1: * j += 1 # <<<<<<<<<<<<<< * if lval != right[j]: * i += 1 */ __pyx_v_j = (__pyx_v_j + 1); /* "pandas/src/generated.pyx":7278 * elif j < nright - 1: * j += 1 * if lval != right[j]: # <<<<<<<<<<<<<< * i += 1 * else: */ __pyx_t_31 = __pyx_v_j; __pyx_t_3 = -1; if (__pyx_t_31 < 0) { __pyx_t_31 += __pyx_pybuffernd_right.diminfo[0].shape; if (unlikely(__pyx_t_31 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_31 >= __pyx_pybuffernd_right.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7278; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_6 = ((__pyx_v_lval != (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_right.rcbuffer->pybuffer.buf, __pyx_t_31, __pyx_pybuffernd_right.diminfo[0].strides))) != 0); if (__pyx_t_6) { /* "pandas/src/generated.pyx":7279 * j += 1 * if lval != right[j]: * i += 1 # <<<<<<<<<<<<<< * else: * # end of the road */ __pyx_v_i = (__pyx_v_i + 1); goto __pyx_L22; } __pyx_L22:; goto __pyx_L19; } /*else*/ { /* "pandas/src/generated.pyx":7282 * else: * # end of the road * break # <<<<<<<<<<<<<< * elif lval < rval: * lindexer[count] = i */ goto __pyx_L14_break; } __pyx_L19:; goto __pyx_L18; } /* "pandas/src/generated.pyx":7283 * # end of the road * break * elif lval < rval: # <<<<<<<<<<<<<< * lindexer[count] = i * rindexer[count] = -1 */ __pyx_t_6 = ((__pyx_v_lval < __pyx_v_rval) != 0); if (__pyx_t_6) { /* "pandas/src/generated.pyx":7284 * break * elif lval < rval: * lindexer[count] = i # <<<<<<<<<<<<<< * rindexer[count] = -1 * result[count] = left[i] */ __pyx_t_32 = __pyx_v_count; __pyx_t_3 = -1; if (__pyx_t_32 < 0) { __pyx_t_32 += __pyx_pybuffernd_lindexer.diminfo[0].shape; if (unlikely(__pyx_t_32 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_32 >= __pyx_pybuffernd_lindexer.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7284; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_lindexer.rcbuffer->pybuffer.buf, __pyx_t_32, __pyx_pybuffernd_lindexer.diminfo[0].strides) = __pyx_v_i; /* "pandas/src/generated.pyx":7285 * elif lval < rval: * lindexer[count] = i * rindexer[count] = -1 # <<<<<<<<<<<<<< * result[count] = left[i] * count += 1 */ __pyx_t_33 = __pyx_v_count; __pyx_t_3 = -1; if (__pyx_t_33 < 0) { __pyx_t_33 += __pyx_pybuffernd_rindexer.diminfo[0].shape; if (unlikely(__pyx_t_33 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_33 >= __pyx_pybuffernd_rindexer.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7285; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_rindexer.rcbuffer->pybuffer.buf, __pyx_t_33, __pyx_pybuffernd_rindexer.diminfo[0].strides) = -1; /* "pandas/src/generated.pyx":7286 * lindexer[count] = i * rindexer[count] = -1 * result[count] = left[i] # <<<<<<<<<<<<<< * count += 1 * i += 1 */ __pyx_t_34 = __pyx_v_i; __pyx_t_3 = -1; if (__pyx_t_34 < 0) { __pyx_t_34 += __pyx_pybuffernd_left.diminfo[0].shape; if (unlikely(__pyx_t_34 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_34 >= __pyx_pybuffernd_left.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7286; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_35 = __pyx_v_count; __pyx_t_3 = -1; if (__pyx_t_35 < 0) { __pyx_t_35 += __pyx_pybuffernd_result.diminfo[0].shape; if (unlikely(__pyx_t_35 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_35 >= __pyx_pybuffernd_result.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7286; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_35, __pyx_pybuffernd_result.diminfo[0].strides) = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_left.rcbuffer->pybuffer.buf, __pyx_t_34, __pyx_pybuffernd_left.diminfo[0].strides)); /* "pandas/src/generated.pyx":7287 * rindexer[count] = -1 * result[count] = left[i] * count += 1 # <<<<<<<<<<<<<< * i += 1 * else: */ __pyx_v_count = (__pyx_v_count + 1); /* "pandas/src/generated.pyx":7288 * result[count] = left[i] * count += 1 * i += 1 # <<<<<<<<<<<<<< * else: * j += 1 */ __pyx_v_i = (__pyx_v_i + 1); goto __pyx_L18; } /*else*/ { /* "pandas/src/generated.pyx":7290 * i += 1 * else: * j += 1 # <<<<<<<<<<<<<< * * return result, lindexer, rindexer */ __pyx_v_j = (__pyx_v_j + 1); } __pyx_L18:; } __pyx_L14_break:; goto __pyx_L12; } __pyx_L12:; /* "pandas/src/generated.pyx":7292 * j += 1 * * return result, lindexer, rindexer # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_11 = PyTuple_New(3); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7292; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __Pyx_INCREF(((PyObject *)__pyx_v_result)); PyTuple_SET_ITEM(__pyx_t_11, 0, ((PyObject *)__pyx_v_result)); __Pyx_GIVEREF(((PyObject *)__pyx_v_result)); __Pyx_INCREF(((PyObject *)__pyx_v_lindexer)); PyTuple_SET_ITEM(__pyx_t_11, 1, ((PyObject *)__pyx_v_lindexer)); __Pyx_GIVEREF(((PyObject *)__pyx_v_lindexer)); __Pyx_INCREF(((PyObject *)__pyx_v_rindexer)); PyTuple_SET_ITEM(__pyx_t_11, 2, ((PyObject *)__pyx_v_rindexer)); __Pyx_GIVEREF(((PyObject *)__pyx_v_rindexer)); __pyx_r = __pyx_t_11; __pyx_t_11 = 0; goto __pyx_L0; /* "pandas/src/generated.pyx":7193 * * * def left_join_indexer_float64(ndarray[float64_t] left, # <<<<<<<<<<<<<< * ndarray[float64_t] right): * ''' */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_10); __Pyx_XDECREF(__pyx_t_11); __Pyx_XDECREF(__pyx_t_12); __Pyx_XDECREF(__pyx_t_13); __Pyx_XDECREF(__pyx_t_14); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_left.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_lindexer.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_right.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_rindexer.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.left_join_indexer_float64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_left.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_lindexer.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_right.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_rindexer.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_lindexer); __Pyx_XDECREF((PyObject *)__pyx_v_rindexer); __Pyx_XDECREF((PyObject *)__pyx_v_result); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":7295 * * * def left_join_indexer_float32(ndarray[float32_t] left, # <<<<<<<<<<<<<< * ndarray[float32_t] right): * ''' */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_467left_join_indexer_float32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6pandas_5algos_466left_join_indexer_float32[] = "\n Two-pass algorithm for monotonic indexes. Handles many-to-one merges\n "; static PyMethodDef __pyx_mdef_6pandas_5algos_467left_join_indexer_float32 = {__Pyx_NAMESTR("left_join_indexer_float32"), (PyCFunction)__pyx_pw_6pandas_5algos_467left_join_indexer_float32, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_5algos_466left_join_indexer_float32)}; static PyObject *__pyx_pw_6pandas_5algos_467left_join_indexer_float32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_left = 0; PyArrayObject *__pyx_v_right = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("left_join_indexer_float32 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_left,&__pyx_n_s_right,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_left)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_right)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("left_join_indexer_float32", 1, 2, 2, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7295; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "left_join_indexer_float32") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7295; __pyx_clineno = __LINE__; goto __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_left = ((PyArrayObject *)values[0]); __pyx_v_right = ((PyArrayObject *)values[1]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("left_join_indexer_float32", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7295; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.left_join_indexer_float32", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_left), __pyx_ptype_5numpy_ndarray, 1, "left", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7295; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_right), __pyx_ptype_5numpy_ndarray, 1, "right", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7296; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_466left_join_indexer_float32(__pyx_self, __pyx_v_left, __pyx_v_right); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5algos_466left_join_indexer_float32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_left, PyArrayObject *__pyx_v_right) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_nright; Py_ssize_t __pyx_v_nleft; Py_ssize_t __pyx_v_count; __pyx_t_5numpy_float32_t __pyx_v_lval; __pyx_t_5numpy_float32_t __pyx_v_rval; PyArrayObject *__pyx_v_lindexer = 0; PyArrayObject *__pyx_v_rindexer = 0; PyArrayObject *__pyx_v_result = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_left; __Pyx_Buffer __pyx_pybuffer_left; __Pyx_LocalBuf_ND __pyx_pybuffernd_lindexer; __Pyx_Buffer __pyx_pybuffer_lindexer; __Pyx_LocalBuf_ND __pyx_pybuffernd_result; __Pyx_Buffer __pyx_pybuffer_result; __Pyx_LocalBuf_ND __pyx_pybuffernd_right; __Pyx_Buffer __pyx_pybuffer_right; __Pyx_LocalBuf_ND __pyx_pybuffernd_rindexer; __Pyx_Buffer __pyx_pybuffer_rindexer; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; int __pyx_t_2; int __pyx_t_3; Py_ssize_t __pyx_t_4; Py_ssize_t __pyx_t_5; int __pyx_t_6; int __pyx_t_7; Py_ssize_t __pyx_t_8; Py_ssize_t __pyx_t_9; PyObject *__pyx_t_10 = NULL; PyObject *__pyx_t_11 = NULL; PyObject *__pyx_t_12 = NULL; PyObject *__pyx_t_13 = NULL; PyObject *__pyx_t_14 = NULL; PyArrayObject *__pyx_t_15 = NULL; PyObject *__pyx_t_16 = NULL; PyObject *__pyx_t_17 = NULL; PyObject *__pyx_t_18 = NULL; PyArrayObject *__pyx_t_19 = NULL; 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("left_join_indexer_float32", 0); __pyx_pybuffer_lindexer.pybuffer.buf = NULL; __pyx_pybuffer_lindexer.refcount = 0; __pyx_pybuffernd_lindexer.data = NULL; __pyx_pybuffernd_lindexer.rcbuffer = &__pyx_pybuffer_lindexer; __pyx_pybuffer_rindexer.pybuffer.buf = NULL; __pyx_pybuffer_rindexer.refcount = 0; __pyx_pybuffernd_rindexer.data = NULL; __pyx_pybuffernd_rindexer.rcbuffer = &__pyx_pybuffer_rindexer; __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_left.pybuffer.buf = NULL; __pyx_pybuffer_left.refcount = 0; __pyx_pybuffernd_left.data = NULL; __pyx_pybuffernd_left.rcbuffer = &__pyx_pybuffer_left; __pyx_pybuffer_right.pybuffer.buf = NULL; __pyx_pybuffer_right.refcount = 0; __pyx_pybuffernd_right.data = NULL; __pyx_pybuffernd_right.rcbuffer = &__pyx_pybuffer_right; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_left.rcbuffer->pybuffer, (PyObject*)__pyx_v_left, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7295; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_left.diminfo[0].strides = __pyx_pybuffernd_left.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_left.diminfo[0].shape = __pyx_pybuffernd_left.rcbuffer->pybuffer.shape[0]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_right.rcbuffer->pybuffer, (PyObject*)__pyx_v_right, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7295; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_right.diminfo[0].strides = __pyx_pybuffernd_right.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_right.diminfo[0].shape = __pyx_pybuffernd_right.rcbuffer->pybuffer.shape[0]; /* "pandas/src/generated.pyx":7306 * ndarray[float32_t] result * * nleft = len(left) # <<<<<<<<<<<<<< * nright = len(right) * */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_left)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7306; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_nleft = __pyx_t_1; /* "pandas/src/generated.pyx":7307 * * nleft = len(left) * nright = len(right) # <<<<<<<<<<<<<< * * i = 0 */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_right)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7307; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_nright = __pyx_t_1; /* "pandas/src/generated.pyx":7309 * nright = len(right) * * i = 0 # <<<<<<<<<<<<<< * j = 0 * count = 0 */ __pyx_v_i = 0; /* "pandas/src/generated.pyx":7310 * * i = 0 * j = 0 # <<<<<<<<<<<<<< * count = 0 * if nleft > 0: */ __pyx_v_j = 0; /* "pandas/src/generated.pyx":7311 * i = 0 * j = 0 * count = 0 # <<<<<<<<<<<<<< * if nleft > 0: * while i < nleft: */ __pyx_v_count = 0; /* "pandas/src/generated.pyx":7312 * j = 0 * count = 0 * if nleft > 0: # <<<<<<<<<<<<<< * while i < nleft: * if j == nright: */ __pyx_t_2 = ((__pyx_v_nleft > 0) != 0); if (__pyx_t_2) { /* "pandas/src/generated.pyx":7313 * count = 0 * if nleft > 0: * while i < nleft: # <<<<<<<<<<<<<< * if j == nright: * count += nleft - i */ while (1) { __pyx_t_2 = ((__pyx_v_i < __pyx_v_nleft) != 0); if (!__pyx_t_2) break; /* "pandas/src/generated.pyx":7314 * if nleft > 0: * while i < nleft: * if j == nright: # <<<<<<<<<<<<<< * count += nleft - i * break */ __pyx_t_2 = ((__pyx_v_j == __pyx_v_nright) != 0); if (__pyx_t_2) { /* "pandas/src/generated.pyx":7315 * while i < nleft: * if j == nright: * count += nleft - i # <<<<<<<<<<<<<< * break * */ __pyx_v_count = (__pyx_v_count + (__pyx_v_nleft - __pyx_v_i)); /* "pandas/src/generated.pyx":7316 * if j == nright: * count += nleft - i * break # <<<<<<<<<<<<<< * * lval = left[i] */ goto __pyx_L5_break; } /* "pandas/src/generated.pyx":7318 * break * * lval = left[i] # <<<<<<<<<<<<<< * rval = right[j] * */ __pyx_t_1 = __pyx_v_i; __pyx_t_3 = -1; if (__pyx_t_1 < 0) { __pyx_t_1 += __pyx_pybuffernd_left.diminfo[0].shape; if (unlikely(__pyx_t_1 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_1 >= __pyx_pybuffernd_left.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7318; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_lval = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_left.rcbuffer->pybuffer.buf, __pyx_t_1, __pyx_pybuffernd_left.diminfo[0].strides)); /* "pandas/src/generated.pyx":7319 * * lval = left[i] * rval = right[j] # <<<<<<<<<<<<<< * * if lval == rval: */ __pyx_t_4 = __pyx_v_j; __pyx_t_3 = -1; if (__pyx_t_4 < 0) { __pyx_t_4 += __pyx_pybuffernd_right.diminfo[0].shape; if (unlikely(__pyx_t_4 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_4 >= __pyx_pybuffernd_right.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7319; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_rval = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_right.rcbuffer->pybuffer.buf, __pyx_t_4, __pyx_pybuffernd_right.diminfo[0].strides)); /* "pandas/src/generated.pyx":7321 * rval = right[j] * * if lval == rval: # <<<<<<<<<<<<<< * count += 1 * if i < nleft - 1: */ __pyx_t_2 = ((__pyx_v_lval == __pyx_v_rval) != 0); if (__pyx_t_2) { /* "pandas/src/generated.pyx":7322 * * if lval == rval: * count += 1 # <<<<<<<<<<<<<< * if i < nleft - 1: * if j < nright - 1 and right[j + 1] == rval: */ __pyx_v_count = (__pyx_v_count + 1); /* "pandas/src/generated.pyx":7323 * if lval == rval: * count += 1 * if i < nleft - 1: # <<<<<<<<<<<<<< * if j < nright - 1 and right[j + 1] == rval: * j += 1 */ __pyx_t_2 = ((__pyx_v_i < (__pyx_v_nleft - 1)) != 0); if (__pyx_t_2) { /* "pandas/src/generated.pyx":7324 * count += 1 * if i < nleft - 1: * if j < nright - 1 and right[j + 1] == rval: # <<<<<<<<<<<<<< * j += 1 * else: */ __pyx_t_2 = ((__pyx_v_j < (__pyx_v_nright - 1)) != 0); if (__pyx_t_2) { __pyx_t_5 = (__pyx_v_j + 1); __pyx_t_3 = -1; if (__pyx_t_5 < 0) { __pyx_t_5 += __pyx_pybuffernd_right.diminfo[0].shape; if (unlikely(__pyx_t_5 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_5 >= __pyx_pybuffernd_right.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7324; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_6 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_right.rcbuffer->pybuffer.buf, __pyx_t_5, __pyx_pybuffernd_right.diminfo[0].strides)) == __pyx_v_rval) != 0); __pyx_t_7 = __pyx_t_6; } else { __pyx_t_7 = __pyx_t_2; } if (__pyx_t_7) { /* "pandas/src/generated.pyx":7325 * if i < nleft - 1: * if j < nright - 1 and right[j + 1] == rval: * j += 1 # <<<<<<<<<<<<<< * else: * i += 1 */ __pyx_v_j = (__pyx_v_j + 1); goto __pyx_L9; } /*else*/ { /* "pandas/src/generated.pyx":7327 * j += 1 * else: * i += 1 # <<<<<<<<<<<<<< * if left[i] != rval: * j += 1 */ __pyx_v_i = (__pyx_v_i + 1); /* "pandas/src/generated.pyx":7328 * else: * i += 1 * if left[i] != rval: # <<<<<<<<<<<<<< * j += 1 * elif j < nright - 1: */ __pyx_t_8 = __pyx_v_i; __pyx_t_3 = -1; if (__pyx_t_8 < 0) { __pyx_t_8 += __pyx_pybuffernd_left.diminfo[0].shape; if (unlikely(__pyx_t_8 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_8 >= __pyx_pybuffernd_left.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7328; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_7 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_left.rcbuffer->pybuffer.buf, __pyx_t_8, __pyx_pybuffernd_left.diminfo[0].strides)) != __pyx_v_rval) != 0); if (__pyx_t_7) { /* "pandas/src/generated.pyx":7329 * i += 1 * if left[i] != rval: * j += 1 # <<<<<<<<<<<<<< * elif j < nright - 1: * j += 1 */ __pyx_v_j = (__pyx_v_j + 1); goto __pyx_L10; } __pyx_L10:; } __pyx_L9:; goto __pyx_L8; } /* "pandas/src/generated.pyx":7330 * if left[i] != rval: * j += 1 * elif j < nright - 1: # <<<<<<<<<<<<<< * j += 1 * if lval != right[j]: */ __pyx_t_7 = ((__pyx_v_j < (__pyx_v_nright - 1)) != 0); if (__pyx_t_7) { /* "pandas/src/generated.pyx":7331 * j += 1 * elif j < nright - 1: * j += 1 # <<<<<<<<<<<<<< * if lval != right[j]: * i += 1 */ __pyx_v_j = (__pyx_v_j + 1); /* "pandas/src/generated.pyx":7332 * elif j < nright - 1: * j += 1 * if lval != right[j]: # <<<<<<<<<<<<<< * i += 1 * else: */ __pyx_t_9 = __pyx_v_j; __pyx_t_3 = -1; if (__pyx_t_9 < 0) { __pyx_t_9 += __pyx_pybuffernd_right.diminfo[0].shape; if (unlikely(__pyx_t_9 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_9 >= __pyx_pybuffernd_right.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7332; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_7 = ((__pyx_v_lval != (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_right.rcbuffer->pybuffer.buf, __pyx_t_9, __pyx_pybuffernd_right.diminfo[0].strides))) != 0); if (__pyx_t_7) { /* "pandas/src/generated.pyx":7333 * j += 1 * if lval != right[j]: * i += 1 # <<<<<<<<<<<<<< * else: * # end of the road */ __pyx_v_i = (__pyx_v_i + 1); goto __pyx_L11; } __pyx_L11:; goto __pyx_L8; } /*else*/ { /* "pandas/src/generated.pyx":7336 * else: * # end of the road * break # <<<<<<<<<<<<<< * elif lval < rval: * count += 1 */ goto __pyx_L5_break; } __pyx_L8:; goto __pyx_L7; } /* "pandas/src/generated.pyx":7337 * # end of the road * break * elif lval < rval: # <<<<<<<<<<<<<< * count += 1 * i += 1 */ __pyx_t_7 = ((__pyx_v_lval < __pyx_v_rval) != 0); if (__pyx_t_7) { /* "pandas/src/generated.pyx":7338 * break * elif lval < rval: * count += 1 # <<<<<<<<<<<<<< * i += 1 * else: */ __pyx_v_count = (__pyx_v_count + 1); /* "pandas/src/generated.pyx":7339 * elif lval < rval: * count += 1 * i += 1 # <<<<<<<<<<<<<< * else: * j += 1 */ __pyx_v_i = (__pyx_v_i + 1); goto __pyx_L7; } /*else*/ { /* "pandas/src/generated.pyx":7341 * i += 1 * else: * j += 1 # <<<<<<<<<<<<<< * * # do it again now that result size is known */ __pyx_v_j = (__pyx_v_j + 1); } __pyx_L7:; } __pyx_L5_break:; goto __pyx_L3; } __pyx_L3:; /* "pandas/src/generated.pyx":7345 * # do it again now that result size is known * * lindexer = np.empty(count, dtype=np.int64) # <<<<<<<<<<<<<< * rindexer = np.empty(count, dtype=np.int64) * result = np.empty(count, dtype=np.float32) */ __pyx_t_10 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7345; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_empty); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7345; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_t_10 = PyInt_FromSsize_t(__pyx_v_count); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7345; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __pyx_t_12 = PyTuple_New(1); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7345; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_10); __Pyx_GIVEREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_t_10 = PyDict_New(); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7345; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __pyx_t_13 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7345; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_t_13, __pyx_n_s_int64); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7345; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_14); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; if (PyDict_SetItem(__pyx_t_10, __pyx_n_s_dtype, __pyx_t_14) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7345; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; __pyx_t_14 = PyObject_Call(__pyx_t_11, __pyx_t_12, __pyx_t_10); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7345; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_14); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; if (!(likely(((__pyx_t_14) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_14, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7345; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_15 = ((PyArrayObject *)__pyx_t_14); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_lindexer.rcbuffer->pybuffer); __pyx_t_3 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_lindexer.rcbuffer->pybuffer, (PyObject*)__pyx_t_15, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_3 < 0)) { PyErr_Fetch(&__pyx_t_16, &__pyx_t_17, &__pyx_t_18); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_lindexer.rcbuffer->pybuffer, (PyObject*)__pyx_v_lindexer, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_16); Py_XDECREF(__pyx_t_17); Py_XDECREF(__pyx_t_18); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_16, __pyx_t_17, __pyx_t_18); } } __pyx_pybuffernd_lindexer.diminfo[0].strides = __pyx_pybuffernd_lindexer.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_lindexer.diminfo[0].shape = __pyx_pybuffernd_lindexer.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7345; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_15 = 0; __pyx_v_lindexer = ((PyArrayObject *)__pyx_t_14); __pyx_t_14 = 0; /* "pandas/src/generated.pyx":7346 * * lindexer = np.empty(count, dtype=np.int64) * rindexer = np.empty(count, dtype=np.int64) # <<<<<<<<<<<<<< * result = np.empty(count, dtype=np.float32) * */ __pyx_t_14 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7346; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_14); __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_14, __pyx_n_s_empty); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7346; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; __pyx_t_14 = PyInt_FromSsize_t(__pyx_v_count); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7346; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_14); __pyx_t_12 = PyTuple_New(1); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7346; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_14); __Pyx_GIVEREF(__pyx_t_14); __pyx_t_14 = 0; __pyx_t_14 = PyDict_New(); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7346; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_14); __pyx_t_11 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7346; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_int64); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7346; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; if (PyDict_SetItem(__pyx_t_14, __pyx_n_s_dtype, __pyx_t_13) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7346; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_13 = PyObject_Call(__pyx_t_10, __pyx_t_12, __pyx_t_14); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7346; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; if (!(likely(((__pyx_t_13) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_13, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7346; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_15 = ((PyArrayObject *)__pyx_t_13); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_rindexer.rcbuffer->pybuffer); __pyx_t_3 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_rindexer.rcbuffer->pybuffer, (PyObject*)__pyx_t_15, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_3 < 0)) { PyErr_Fetch(&__pyx_t_18, &__pyx_t_17, &__pyx_t_16); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_rindexer.rcbuffer->pybuffer, (PyObject*)__pyx_v_rindexer, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_18); Py_XDECREF(__pyx_t_17); Py_XDECREF(__pyx_t_16); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_18, __pyx_t_17, __pyx_t_16); } } __pyx_pybuffernd_rindexer.diminfo[0].strides = __pyx_pybuffernd_rindexer.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_rindexer.diminfo[0].shape = __pyx_pybuffernd_rindexer.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7346; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_15 = 0; __pyx_v_rindexer = ((PyArrayObject *)__pyx_t_13); __pyx_t_13 = 0; /* "pandas/src/generated.pyx":7347 * lindexer = np.empty(count, dtype=np.int64) * rindexer = np.empty(count, dtype=np.int64) * result = np.empty(count, dtype=np.float32) # <<<<<<<<<<<<<< * * i = 0 */ __pyx_t_13 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7347; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_t_13, __pyx_n_s_empty); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7347; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_14); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_13 = PyInt_FromSsize_t(__pyx_v_count); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7347; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __pyx_t_12 = PyTuple_New(1); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7347; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_13); __Pyx_GIVEREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_13 = PyDict_New(); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7347; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __pyx_t_10 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7347; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_float32); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7347; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; if (PyDict_SetItem(__pyx_t_13, __pyx_n_s_dtype, __pyx_t_11) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7347; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __pyx_t_11 = PyObject_Call(__pyx_t_14, __pyx_t_12, __pyx_t_13); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7347; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; if (!(likely(((__pyx_t_11) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_11, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7347; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_19 = ((PyArrayObject *)__pyx_t_11); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __pyx_t_3 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_t_19, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_3 < 0)) { PyErr_Fetch(&__pyx_t_16, &__pyx_t_17, &__pyx_t_18); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_v_result, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_16); Py_XDECREF(__pyx_t_17); Py_XDECREF(__pyx_t_18); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_16, __pyx_t_17, __pyx_t_18); } } __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_3 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7347; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_19 = 0; __pyx_v_result = ((PyArrayObject *)__pyx_t_11); __pyx_t_11 = 0; /* "pandas/src/generated.pyx":7349 * result = np.empty(count, dtype=np.float32) * * i = 0 # <<<<<<<<<<<<<< * j = 0 * count = 0 */ __pyx_v_i = 0; /* "pandas/src/generated.pyx":7350 * * i = 0 * j = 0 # <<<<<<<<<<<<<< * count = 0 * if nleft > 0: */ __pyx_v_j = 0; /* "pandas/src/generated.pyx":7351 * i = 0 * j = 0 * count = 0 # <<<<<<<<<<<<<< * if nleft > 0: * while i < nleft: */ __pyx_v_count = 0; /* "pandas/src/generated.pyx":7352 * j = 0 * count = 0 * if nleft > 0: # <<<<<<<<<<<<<< * while i < nleft: * if j == nright: */ __pyx_t_7 = ((__pyx_v_nleft > 0) != 0); if (__pyx_t_7) { /* "pandas/src/generated.pyx":7353 * count = 0 * if nleft > 0: * while i < nleft: # <<<<<<<<<<<<<< * if j == nright: * while i < nleft: */ while (1) { __pyx_t_7 = ((__pyx_v_i < __pyx_v_nleft) != 0); if (!__pyx_t_7) break; /* "pandas/src/generated.pyx":7354 * if nleft > 0: * while i < nleft: * if j == nright: # <<<<<<<<<<<<<< * while i < nleft: * lindexer[count] = i */ __pyx_t_7 = ((__pyx_v_j == __pyx_v_nright) != 0); if (__pyx_t_7) { /* "pandas/src/generated.pyx":7355 * while i < nleft: * if j == nright: * while i < nleft: # <<<<<<<<<<<<<< * lindexer[count] = i * rindexer[count] = -1 */ while (1) { __pyx_t_7 = ((__pyx_v_i < __pyx_v_nleft) != 0); if (!__pyx_t_7) break; /* "pandas/src/generated.pyx":7356 * if j == nright: * while i < nleft: * lindexer[count] = i # <<<<<<<<<<<<<< * rindexer[count] = -1 * result[count] = left[i] */ __pyx_t_20 = __pyx_v_count; __pyx_t_3 = -1; if (__pyx_t_20 < 0) { __pyx_t_20 += __pyx_pybuffernd_lindexer.diminfo[0].shape; if (unlikely(__pyx_t_20 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_20 >= __pyx_pybuffernd_lindexer.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7356; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_lindexer.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_lindexer.diminfo[0].strides) = __pyx_v_i; /* "pandas/src/generated.pyx":7357 * while i < nleft: * lindexer[count] = i * rindexer[count] = -1 # <<<<<<<<<<<<<< * result[count] = left[i] * i += 1 */ __pyx_t_21 = __pyx_v_count; __pyx_t_3 = -1; if (__pyx_t_21 < 0) { __pyx_t_21 += __pyx_pybuffernd_rindexer.diminfo[0].shape; if (unlikely(__pyx_t_21 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_21 >= __pyx_pybuffernd_rindexer.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7357; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_rindexer.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_rindexer.diminfo[0].strides) = -1; /* "pandas/src/generated.pyx":7358 * lindexer[count] = i * rindexer[count] = -1 * result[count] = left[i] # <<<<<<<<<<<<<< * i += 1 * count += 1 */ __pyx_t_22 = __pyx_v_i; __pyx_t_3 = -1; if (__pyx_t_22 < 0) { __pyx_t_22 += __pyx_pybuffernd_left.diminfo[0].shape; if (unlikely(__pyx_t_22 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_22 >= __pyx_pybuffernd_left.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7358; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_23 = __pyx_v_count; __pyx_t_3 = -1; if (__pyx_t_23 < 0) { __pyx_t_23 += __pyx_pybuffernd_result.diminfo[0].shape; if (unlikely(__pyx_t_23 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_23 >= __pyx_pybuffernd_result.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7358; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_23, __pyx_pybuffernd_result.diminfo[0].strides) = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_left.rcbuffer->pybuffer.buf, __pyx_t_22, __pyx_pybuffernd_left.diminfo[0].strides)); /* "pandas/src/generated.pyx":7359 * rindexer[count] = -1 * result[count] = left[i] * i += 1 # <<<<<<<<<<<<<< * count += 1 * break */ __pyx_v_i = (__pyx_v_i + 1); /* "pandas/src/generated.pyx":7360 * result[count] = left[i] * i += 1 * count += 1 # <<<<<<<<<<<<<< * break * */ __pyx_v_count = (__pyx_v_count + 1); } /* "pandas/src/generated.pyx":7361 * i += 1 * count += 1 * break # <<<<<<<<<<<<<< * * lval = left[i] */ goto __pyx_L14_break; } /* "pandas/src/generated.pyx":7363 * break * * lval = left[i] # <<<<<<<<<<<<<< * rval = right[j] * */ __pyx_t_24 = __pyx_v_i; __pyx_t_3 = -1; if (__pyx_t_24 < 0) { __pyx_t_24 += __pyx_pybuffernd_left.diminfo[0].shape; if (unlikely(__pyx_t_24 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_24 >= __pyx_pybuffernd_left.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7363; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_lval = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_left.rcbuffer->pybuffer.buf, __pyx_t_24, __pyx_pybuffernd_left.diminfo[0].strides)); /* "pandas/src/generated.pyx":7364 * * lval = left[i] * rval = right[j] # <<<<<<<<<<<<<< * * if lval == rval: */ __pyx_t_25 = __pyx_v_j; __pyx_t_3 = -1; if (__pyx_t_25 < 0) { __pyx_t_25 += __pyx_pybuffernd_right.diminfo[0].shape; if (unlikely(__pyx_t_25 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_25 >= __pyx_pybuffernd_right.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7364; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_rval = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_right.rcbuffer->pybuffer.buf, __pyx_t_25, __pyx_pybuffernd_right.diminfo[0].strides)); /* "pandas/src/generated.pyx":7366 * rval = right[j] * * if lval == rval: # <<<<<<<<<<<<<< * lindexer[count] = i * rindexer[count] = j */ __pyx_t_7 = ((__pyx_v_lval == __pyx_v_rval) != 0); if (__pyx_t_7) { /* "pandas/src/generated.pyx":7367 * * if lval == rval: * lindexer[count] = i # <<<<<<<<<<<<<< * rindexer[count] = j * result[count] = lval */ __pyx_t_26 = __pyx_v_count; __pyx_t_3 = -1; if (__pyx_t_26 < 0) { __pyx_t_26 += __pyx_pybuffernd_lindexer.diminfo[0].shape; if (unlikely(__pyx_t_26 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_26 >= __pyx_pybuffernd_lindexer.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7367; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_lindexer.rcbuffer->pybuffer.buf, __pyx_t_26, __pyx_pybuffernd_lindexer.diminfo[0].strides) = __pyx_v_i; /* "pandas/src/generated.pyx":7368 * if lval == rval: * lindexer[count] = i * rindexer[count] = j # <<<<<<<<<<<<<< * result[count] = lval * count += 1 */ __pyx_t_27 = __pyx_v_count; __pyx_t_3 = -1; if (__pyx_t_27 < 0) { __pyx_t_27 += __pyx_pybuffernd_rindexer.diminfo[0].shape; if (unlikely(__pyx_t_27 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_27 >= __pyx_pybuffernd_rindexer.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7368; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_rindexer.rcbuffer->pybuffer.buf, __pyx_t_27, __pyx_pybuffernd_rindexer.diminfo[0].strides) = __pyx_v_j; /* "pandas/src/generated.pyx":7369 * lindexer[count] = i * rindexer[count] = j * result[count] = lval # <<<<<<<<<<<<<< * count += 1 * if i < nleft - 1: */ __pyx_t_28 = __pyx_v_count; __pyx_t_3 = -1; if (__pyx_t_28 < 0) { __pyx_t_28 += __pyx_pybuffernd_result.diminfo[0].shape; if (unlikely(__pyx_t_28 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_28 >= __pyx_pybuffernd_result.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7369; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_28, __pyx_pybuffernd_result.diminfo[0].strides) = __pyx_v_lval; /* "pandas/src/generated.pyx":7370 * rindexer[count] = j * result[count] = lval * count += 1 # <<<<<<<<<<<<<< * if i < nleft - 1: * if j < nright - 1 and right[j + 1] == rval: */ __pyx_v_count = (__pyx_v_count + 1); /* "pandas/src/generated.pyx":7371 * result[count] = lval * count += 1 * if i < nleft - 1: # <<<<<<<<<<<<<< * if j < nright - 1 and right[j + 1] == rval: * j += 1 */ __pyx_t_7 = ((__pyx_v_i < (__pyx_v_nleft - 1)) != 0); if (__pyx_t_7) { /* "pandas/src/generated.pyx":7372 * count += 1 * if i < nleft - 1: * if j < nright - 1 and right[j + 1] == rval: # <<<<<<<<<<<<<< * j += 1 * else: */ __pyx_t_7 = ((__pyx_v_j < (__pyx_v_nright - 1)) != 0); if (__pyx_t_7) { __pyx_t_29 = (__pyx_v_j + 1); __pyx_t_3 = -1; if (__pyx_t_29 < 0) { __pyx_t_29 += __pyx_pybuffernd_right.diminfo[0].shape; if (unlikely(__pyx_t_29 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_29 >= __pyx_pybuffernd_right.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7372; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_2 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_right.rcbuffer->pybuffer.buf, __pyx_t_29, __pyx_pybuffernd_right.diminfo[0].strides)) == __pyx_v_rval) != 0); __pyx_t_6 = __pyx_t_2; } else { __pyx_t_6 = __pyx_t_7; } if (__pyx_t_6) { /* "pandas/src/generated.pyx":7373 * if i < nleft - 1: * if j < nright - 1 and right[j + 1] == rval: * j += 1 # <<<<<<<<<<<<<< * else: * i += 1 */ __pyx_v_j = (__pyx_v_j + 1); goto __pyx_L20; } /*else*/ { /* "pandas/src/generated.pyx":7375 * j += 1 * else: * i += 1 # <<<<<<<<<<<<<< * if left[i] != rval: * j += 1 */ __pyx_v_i = (__pyx_v_i + 1); /* "pandas/src/generated.pyx":7376 * else: * i += 1 * if left[i] != rval: # <<<<<<<<<<<<<< * j += 1 * elif j < nright - 1: */ __pyx_t_30 = __pyx_v_i; __pyx_t_3 = -1; if (__pyx_t_30 < 0) { __pyx_t_30 += __pyx_pybuffernd_left.diminfo[0].shape; if (unlikely(__pyx_t_30 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_30 >= __pyx_pybuffernd_left.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7376; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_6 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_left.rcbuffer->pybuffer.buf, __pyx_t_30, __pyx_pybuffernd_left.diminfo[0].strides)) != __pyx_v_rval) != 0); if (__pyx_t_6) { /* "pandas/src/generated.pyx":7377 * i += 1 * if left[i] != rval: * j += 1 # <<<<<<<<<<<<<< * elif j < nright - 1: * j += 1 */ __pyx_v_j = (__pyx_v_j + 1); goto __pyx_L21; } __pyx_L21:; } __pyx_L20:; goto __pyx_L19; } /* "pandas/src/generated.pyx":7378 * if left[i] != rval: * j += 1 * elif j < nright - 1: # <<<<<<<<<<<<<< * j += 1 * if lval != right[j]: */ __pyx_t_6 = ((__pyx_v_j < (__pyx_v_nright - 1)) != 0); if (__pyx_t_6) { /* "pandas/src/generated.pyx":7379 * j += 1 * elif j < nright - 1: * j += 1 # <<<<<<<<<<<<<< * if lval != right[j]: * i += 1 */ __pyx_v_j = (__pyx_v_j + 1); /* "pandas/src/generated.pyx":7380 * elif j < nright - 1: * j += 1 * if lval != right[j]: # <<<<<<<<<<<<<< * i += 1 * else: */ __pyx_t_31 = __pyx_v_j; __pyx_t_3 = -1; if (__pyx_t_31 < 0) { __pyx_t_31 += __pyx_pybuffernd_right.diminfo[0].shape; if (unlikely(__pyx_t_31 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_31 >= __pyx_pybuffernd_right.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7380; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_6 = ((__pyx_v_lval != (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_right.rcbuffer->pybuffer.buf, __pyx_t_31, __pyx_pybuffernd_right.diminfo[0].strides))) != 0); if (__pyx_t_6) { /* "pandas/src/generated.pyx":7381 * j += 1 * if lval != right[j]: * i += 1 # <<<<<<<<<<<<<< * else: * # end of the road */ __pyx_v_i = (__pyx_v_i + 1); goto __pyx_L22; } __pyx_L22:; goto __pyx_L19; } /*else*/ { /* "pandas/src/generated.pyx":7384 * else: * # end of the road * break # <<<<<<<<<<<<<< * elif lval < rval: * lindexer[count] = i */ goto __pyx_L14_break; } __pyx_L19:; goto __pyx_L18; } /* "pandas/src/generated.pyx":7385 * # end of the road * break * elif lval < rval: # <<<<<<<<<<<<<< * lindexer[count] = i * rindexer[count] = -1 */ __pyx_t_6 = ((__pyx_v_lval < __pyx_v_rval) != 0); if (__pyx_t_6) { /* "pandas/src/generated.pyx":7386 * break * elif lval < rval: * lindexer[count] = i # <<<<<<<<<<<<<< * rindexer[count] = -1 * result[count] = left[i] */ __pyx_t_32 = __pyx_v_count; __pyx_t_3 = -1; if (__pyx_t_32 < 0) { __pyx_t_32 += __pyx_pybuffernd_lindexer.diminfo[0].shape; if (unlikely(__pyx_t_32 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_32 >= __pyx_pybuffernd_lindexer.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7386; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_lindexer.rcbuffer->pybuffer.buf, __pyx_t_32, __pyx_pybuffernd_lindexer.diminfo[0].strides) = __pyx_v_i; /* "pandas/src/generated.pyx":7387 * elif lval < rval: * lindexer[count] = i * rindexer[count] = -1 # <<<<<<<<<<<<<< * result[count] = left[i] * count += 1 */ __pyx_t_33 = __pyx_v_count; __pyx_t_3 = -1; if (__pyx_t_33 < 0) { __pyx_t_33 += __pyx_pybuffernd_rindexer.diminfo[0].shape; if (unlikely(__pyx_t_33 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_33 >= __pyx_pybuffernd_rindexer.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7387; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_rindexer.rcbuffer->pybuffer.buf, __pyx_t_33, __pyx_pybuffernd_rindexer.diminfo[0].strides) = -1; /* "pandas/src/generated.pyx":7388 * lindexer[count] = i * rindexer[count] = -1 * result[count] = left[i] # <<<<<<<<<<<<<< * count += 1 * i += 1 */ __pyx_t_34 = __pyx_v_i; __pyx_t_3 = -1; if (__pyx_t_34 < 0) { __pyx_t_34 += __pyx_pybuffernd_left.diminfo[0].shape; if (unlikely(__pyx_t_34 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_34 >= __pyx_pybuffernd_left.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7388; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_35 = __pyx_v_count; __pyx_t_3 = -1; if (__pyx_t_35 < 0) { __pyx_t_35 += __pyx_pybuffernd_result.diminfo[0].shape; if (unlikely(__pyx_t_35 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_35 >= __pyx_pybuffernd_result.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7388; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_35, __pyx_pybuffernd_result.diminfo[0].strides) = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_left.rcbuffer->pybuffer.buf, __pyx_t_34, __pyx_pybuffernd_left.diminfo[0].strides)); /* "pandas/src/generated.pyx":7389 * rindexer[count] = -1 * result[count] = left[i] * count += 1 # <<<<<<<<<<<<<< * i += 1 * else: */ __pyx_v_count = (__pyx_v_count + 1); /* "pandas/src/generated.pyx":7390 * result[count] = left[i] * count += 1 * i += 1 # <<<<<<<<<<<<<< * else: * j += 1 */ __pyx_v_i = (__pyx_v_i + 1); goto __pyx_L18; } /*else*/ { /* "pandas/src/generated.pyx":7392 * i += 1 * else: * j += 1 # <<<<<<<<<<<<<< * * return result, lindexer, rindexer */ __pyx_v_j = (__pyx_v_j + 1); } __pyx_L18:; } __pyx_L14_break:; goto __pyx_L12; } __pyx_L12:; /* "pandas/src/generated.pyx":7394 * j += 1 * * return result, lindexer, rindexer # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_11 = PyTuple_New(3); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7394; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __Pyx_INCREF(((PyObject *)__pyx_v_result)); PyTuple_SET_ITEM(__pyx_t_11, 0, ((PyObject *)__pyx_v_result)); __Pyx_GIVEREF(((PyObject *)__pyx_v_result)); __Pyx_INCREF(((PyObject *)__pyx_v_lindexer)); PyTuple_SET_ITEM(__pyx_t_11, 1, ((PyObject *)__pyx_v_lindexer)); __Pyx_GIVEREF(((PyObject *)__pyx_v_lindexer)); __Pyx_INCREF(((PyObject *)__pyx_v_rindexer)); PyTuple_SET_ITEM(__pyx_t_11, 2, ((PyObject *)__pyx_v_rindexer)); __Pyx_GIVEREF(((PyObject *)__pyx_v_rindexer)); __pyx_r = __pyx_t_11; __pyx_t_11 = 0; goto __pyx_L0; /* "pandas/src/generated.pyx":7295 * * * def left_join_indexer_float32(ndarray[float32_t] left, # <<<<<<<<<<<<<< * ndarray[float32_t] right): * ''' */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_10); __Pyx_XDECREF(__pyx_t_11); __Pyx_XDECREF(__pyx_t_12); __Pyx_XDECREF(__pyx_t_13); __Pyx_XDECREF(__pyx_t_14); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_left.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_lindexer.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_right.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_rindexer.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.left_join_indexer_float32", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_left.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_lindexer.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_right.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_rindexer.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_lindexer); __Pyx_XDECREF((PyObject *)__pyx_v_rindexer); __Pyx_XDECREF((PyObject *)__pyx_v_result); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":7397 * * * def left_join_indexer_object(ndarray[object] left, # <<<<<<<<<<<<<< * ndarray[object] right): * ''' */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_469left_join_indexer_object(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6pandas_5algos_468left_join_indexer_object[] = "\n Two-pass algorithm for monotonic indexes. Handles many-to-one merges\n "; static PyMethodDef __pyx_mdef_6pandas_5algos_469left_join_indexer_object = {__Pyx_NAMESTR("left_join_indexer_object"), (PyCFunction)__pyx_pw_6pandas_5algos_469left_join_indexer_object, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_5algos_468left_join_indexer_object)}; static PyObject *__pyx_pw_6pandas_5algos_469left_join_indexer_object(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_left = 0; PyArrayObject *__pyx_v_right = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("left_join_indexer_object (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_left,&__pyx_n_s_right,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_left)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_right)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("left_join_indexer_object", 1, 2, 2, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7397; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "left_join_indexer_object") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7397; __pyx_clineno = __LINE__; goto __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_left = ((PyArrayObject *)values[0]); __pyx_v_right = ((PyArrayObject *)values[1]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("left_join_indexer_object", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7397; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.left_join_indexer_object", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_left), __pyx_ptype_5numpy_ndarray, 1, "left", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7397; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_right), __pyx_ptype_5numpy_ndarray, 1, "right", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7398; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_468left_join_indexer_object(__pyx_self, __pyx_v_left, __pyx_v_right); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5algos_468left_join_indexer_object(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_left, PyArrayObject *__pyx_v_right) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_nright; Py_ssize_t __pyx_v_nleft; Py_ssize_t __pyx_v_count; PyObject *__pyx_v_lval = 0; PyObject *__pyx_v_rval = 0; PyArrayObject *__pyx_v_lindexer = 0; PyArrayObject *__pyx_v_rindexer = 0; PyArrayObject *__pyx_v_result = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_left; __Pyx_Buffer __pyx_pybuffer_left; __Pyx_LocalBuf_ND __pyx_pybuffernd_lindexer; __Pyx_Buffer __pyx_pybuffer_lindexer; __Pyx_LocalBuf_ND __pyx_pybuffernd_result; __Pyx_Buffer __pyx_pybuffer_result; __Pyx_LocalBuf_ND __pyx_pybuffernd_right; __Pyx_Buffer __pyx_pybuffer_right; __Pyx_LocalBuf_ND __pyx_pybuffernd_rindexer; __Pyx_Buffer __pyx_pybuffer_rindexer; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; int __pyx_t_4; Py_ssize_t __pyx_t_5; Py_ssize_t __pyx_t_6; PyObject *__pyx_t_7 = NULL; int __pyx_t_8; int __pyx_t_9; Py_ssize_t __pyx_t_10; Py_ssize_t __pyx_t_11; PyObject *__pyx_t_12 = NULL; PyObject *__pyx_t_13 = NULL; PyObject *__pyx_t_14 = NULL; PyArrayObject *__pyx_t_15 = NULL; PyObject *__pyx_t_16 = NULL; PyObject *__pyx_t_17 = NULL; PyObject *__pyx_t_18 = NULL; PyArrayObject *__pyx_t_19 = NULL; Py_ssize_t __pyx_t_20; Py_ssize_t __pyx_t_21; Py_ssize_t __pyx_t_22; Py_ssize_t __pyx_t_23; PyObject **__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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("left_join_indexer_object", 0); __pyx_pybuffer_lindexer.pybuffer.buf = NULL; __pyx_pybuffer_lindexer.refcount = 0; __pyx_pybuffernd_lindexer.data = NULL; __pyx_pybuffernd_lindexer.rcbuffer = &__pyx_pybuffer_lindexer; __pyx_pybuffer_rindexer.pybuffer.buf = NULL; __pyx_pybuffer_rindexer.refcount = 0; __pyx_pybuffernd_rindexer.data = NULL; __pyx_pybuffernd_rindexer.rcbuffer = &__pyx_pybuffer_rindexer; __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_left.pybuffer.buf = NULL; __pyx_pybuffer_left.refcount = 0; __pyx_pybuffernd_left.data = NULL; __pyx_pybuffernd_left.rcbuffer = &__pyx_pybuffer_left; __pyx_pybuffer_right.pybuffer.buf = NULL; __pyx_pybuffer_right.refcount = 0; __pyx_pybuffernd_right.data = NULL; __pyx_pybuffernd_right.rcbuffer = &__pyx_pybuffer_right; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_left.rcbuffer->pybuffer, (PyObject*)__pyx_v_left, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7397; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_left.diminfo[0].strides = __pyx_pybuffernd_left.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_left.diminfo[0].shape = __pyx_pybuffernd_left.rcbuffer->pybuffer.shape[0]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_right.rcbuffer->pybuffer, (PyObject*)__pyx_v_right, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7397; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_right.diminfo[0].strides = __pyx_pybuffernd_right.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_right.diminfo[0].shape = __pyx_pybuffernd_right.rcbuffer->pybuffer.shape[0]; /* "pandas/src/generated.pyx":7408 * ndarray[object] result * * nleft = len(left) # <<<<<<<<<<<<<< * nright = len(right) * */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_left)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7408; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_nleft = __pyx_t_1; /* "pandas/src/generated.pyx":7409 * * nleft = len(left) * nright = len(right) # <<<<<<<<<<<<<< * * i = 0 */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_right)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7409; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_nright = __pyx_t_1; /* "pandas/src/generated.pyx":7411 * nright = len(right) * * i = 0 # <<<<<<<<<<<<<< * j = 0 * count = 0 */ __pyx_v_i = 0; /* "pandas/src/generated.pyx":7412 * * i = 0 * j = 0 # <<<<<<<<<<<<<< * count = 0 * if nleft > 0: */ __pyx_v_j = 0; /* "pandas/src/generated.pyx":7413 * i = 0 * j = 0 * count = 0 # <<<<<<<<<<<<<< * if nleft > 0: * while i < nleft: */ __pyx_v_count = 0; /* "pandas/src/generated.pyx":7414 * j = 0 * count = 0 * if nleft > 0: # <<<<<<<<<<<<<< * while i < nleft: * if j == nright: */ __pyx_t_2 = ((__pyx_v_nleft > 0) != 0); if (__pyx_t_2) { /* "pandas/src/generated.pyx":7415 * count = 0 * if nleft > 0: * while i < nleft: # <<<<<<<<<<<<<< * if j == nright: * count += nleft - i */ while (1) { __pyx_t_2 = ((__pyx_v_i < __pyx_v_nleft) != 0); if (!__pyx_t_2) break; /* "pandas/src/generated.pyx":7416 * if nleft > 0: * while i < nleft: * if j == nright: # <<<<<<<<<<<<<< * count += nleft - i * break */ __pyx_t_2 = ((__pyx_v_j == __pyx_v_nright) != 0); if (__pyx_t_2) { /* "pandas/src/generated.pyx":7417 * while i < nleft: * if j == nright: * count += nleft - i # <<<<<<<<<<<<<< * break * */ __pyx_v_count = (__pyx_v_count + (__pyx_v_nleft - __pyx_v_i)); /* "pandas/src/generated.pyx":7418 * if j == nright: * count += nleft - i * break # <<<<<<<<<<<<<< * * lval = left[i] */ goto __pyx_L5_break; } /* "pandas/src/generated.pyx":7420 * break * * lval = left[i] # <<<<<<<<<<<<<< * rval = right[j] * */ __pyx_t_1 = __pyx_v_i; __pyx_t_4 = -1; if (__pyx_t_1 < 0) { __pyx_t_1 += __pyx_pybuffernd_left.diminfo[0].shape; if (unlikely(__pyx_t_1 < 0)) __pyx_t_4 = 0; } else if (unlikely(__pyx_t_1 >= __pyx_pybuffernd_left.diminfo[0].shape)) __pyx_t_4 = 0; if (unlikely(__pyx_t_4 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_4); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7420; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_3 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_left.rcbuffer->pybuffer.buf, __pyx_t_1, __pyx_pybuffernd_left.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_3); __Pyx_XDECREF_SET(__pyx_v_lval, __pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/generated.pyx":7421 * * lval = left[i] * rval = right[j] # <<<<<<<<<<<<<< * * if lval == rval: */ __pyx_t_5 = __pyx_v_j; __pyx_t_4 = -1; if (__pyx_t_5 < 0) { __pyx_t_5 += __pyx_pybuffernd_right.diminfo[0].shape; if (unlikely(__pyx_t_5 < 0)) __pyx_t_4 = 0; } else if (unlikely(__pyx_t_5 >= __pyx_pybuffernd_right.diminfo[0].shape)) __pyx_t_4 = 0; if (unlikely(__pyx_t_4 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_4); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7421; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_3 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_right.rcbuffer->pybuffer.buf, __pyx_t_5, __pyx_pybuffernd_right.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_3); __Pyx_XDECREF_SET(__pyx_v_rval, __pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/generated.pyx":7423 * rval = right[j] * * if lval == rval: # <<<<<<<<<<<<<< * count += 1 * if i < nleft - 1: */ __pyx_t_3 = PyObject_RichCompare(__pyx_v_lval, __pyx_v_rval, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7423; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7423; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_2) { /* "pandas/src/generated.pyx":7424 * * if lval == rval: * count += 1 # <<<<<<<<<<<<<< * if i < nleft - 1: * if j < nright - 1 and right[j + 1] == rval: */ __pyx_v_count = (__pyx_v_count + 1); /* "pandas/src/generated.pyx":7425 * if lval == rval: * count += 1 * if i < nleft - 1: # <<<<<<<<<<<<<< * if j < nright - 1 and right[j + 1] == rval: * j += 1 */ __pyx_t_2 = ((__pyx_v_i < (__pyx_v_nleft - 1)) != 0); if (__pyx_t_2) { /* "pandas/src/generated.pyx":7426 * count += 1 * if i < nleft - 1: * if j < nright - 1 and right[j + 1] == rval: # <<<<<<<<<<<<<< * j += 1 * else: */ __pyx_t_2 = (__pyx_v_j < (__pyx_v_nright - 1)); if (__pyx_t_2) { __pyx_t_6 = (__pyx_v_j + 1); __pyx_t_4 = -1; if (__pyx_t_6 < 0) { __pyx_t_6 += __pyx_pybuffernd_right.diminfo[0].shape; if (unlikely(__pyx_t_6 < 0)) __pyx_t_4 = 0; } else if (unlikely(__pyx_t_6 >= __pyx_pybuffernd_right.diminfo[0].shape)) __pyx_t_4 = 0; if (unlikely(__pyx_t_4 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_4); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7426; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_3 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_right.rcbuffer->pybuffer.buf, __pyx_t_6, __pyx_pybuffernd_right.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_3); __pyx_t_7 = PyObject_RichCompare(__pyx_t_3, __pyx_v_rval, Py_EQ); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7426; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7426; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_9 = __pyx_t_8; } else { __pyx_t_9 = __pyx_t_2; } if (__pyx_t_9) { /* "pandas/src/generated.pyx":7427 * if i < nleft - 1: * if j < nright - 1 and right[j + 1] == rval: * j += 1 # <<<<<<<<<<<<<< * else: * i += 1 */ __pyx_v_j = (__pyx_v_j + 1); goto __pyx_L9; } /*else*/ { /* "pandas/src/generated.pyx":7429 * j += 1 * else: * i += 1 # <<<<<<<<<<<<<< * if left[i] != rval: * j += 1 */ __pyx_v_i = (__pyx_v_i + 1); /* "pandas/src/generated.pyx":7430 * else: * i += 1 * if left[i] != rval: # <<<<<<<<<<<<<< * j += 1 * elif j < nright - 1: */ __pyx_t_10 = __pyx_v_i; __pyx_t_4 = -1; if (__pyx_t_10 < 0) { __pyx_t_10 += __pyx_pybuffernd_left.diminfo[0].shape; if (unlikely(__pyx_t_10 < 0)) __pyx_t_4 = 0; } else if (unlikely(__pyx_t_10 >= __pyx_pybuffernd_left.diminfo[0].shape)) __pyx_t_4 = 0; if (unlikely(__pyx_t_4 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_4); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7430; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_7 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_left.rcbuffer->pybuffer.buf, __pyx_t_10, __pyx_pybuffernd_left.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_7); __pyx_t_3 = PyObject_RichCompare(__pyx_t_7, __pyx_v_rval, Py_NE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7430; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7430; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_9) { /* "pandas/src/generated.pyx":7431 * i += 1 * if left[i] != rval: * j += 1 # <<<<<<<<<<<<<< * elif j < nright - 1: * j += 1 */ __pyx_v_j = (__pyx_v_j + 1); goto __pyx_L10; } __pyx_L10:; } __pyx_L9:; goto __pyx_L8; } /* "pandas/src/generated.pyx":7432 * if left[i] != rval: * j += 1 * elif j < nright - 1: # <<<<<<<<<<<<<< * j += 1 * if lval != right[j]: */ __pyx_t_9 = ((__pyx_v_j < (__pyx_v_nright - 1)) != 0); if (__pyx_t_9) { /* "pandas/src/generated.pyx":7433 * j += 1 * elif j < nright - 1: * j += 1 # <<<<<<<<<<<<<< * if lval != right[j]: * i += 1 */ __pyx_v_j = (__pyx_v_j + 1); /* "pandas/src/generated.pyx":7434 * elif j < nright - 1: * j += 1 * if lval != right[j]: # <<<<<<<<<<<<<< * i += 1 * else: */ __pyx_t_11 = __pyx_v_j; __pyx_t_4 = -1; if (__pyx_t_11 < 0) { __pyx_t_11 += __pyx_pybuffernd_right.diminfo[0].shape; if (unlikely(__pyx_t_11 < 0)) __pyx_t_4 = 0; } else if (unlikely(__pyx_t_11 >= __pyx_pybuffernd_right.diminfo[0].shape)) __pyx_t_4 = 0; if (unlikely(__pyx_t_4 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_4); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7434; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_3 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_right.rcbuffer->pybuffer.buf, __pyx_t_11, __pyx_pybuffernd_right.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_3); __pyx_t_7 = PyObject_RichCompare(__pyx_v_lval, __pyx_t_3, Py_NE); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7434; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7434; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (__pyx_t_9) { /* "pandas/src/generated.pyx":7435 * j += 1 * if lval != right[j]: * i += 1 # <<<<<<<<<<<<<< * else: * # end of the road */ __pyx_v_i = (__pyx_v_i + 1); goto __pyx_L11; } __pyx_L11:; goto __pyx_L8; } /*else*/ { /* "pandas/src/generated.pyx":7438 * else: * # end of the road * break # <<<<<<<<<<<<<< * elif lval < rval: * count += 1 */ goto __pyx_L5_break; } __pyx_L8:; goto __pyx_L7; } /* "pandas/src/generated.pyx":7439 * # end of the road * break * elif lval < rval: # <<<<<<<<<<<<<< * count += 1 * i += 1 */ __pyx_t_7 = PyObject_RichCompare(__pyx_v_lval, __pyx_v_rval, Py_LT); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7439; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7439; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (__pyx_t_9) { /* "pandas/src/generated.pyx":7440 * break * elif lval < rval: * count += 1 # <<<<<<<<<<<<<< * i += 1 * else: */ __pyx_v_count = (__pyx_v_count + 1); /* "pandas/src/generated.pyx":7441 * elif lval < rval: * count += 1 * i += 1 # <<<<<<<<<<<<<< * else: * j += 1 */ __pyx_v_i = (__pyx_v_i + 1); goto __pyx_L7; } /*else*/ { /* "pandas/src/generated.pyx":7443 * i += 1 * else: * j += 1 # <<<<<<<<<<<<<< * * # do it again now that result size is known */ __pyx_v_j = (__pyx_v_j + 1); } __pyx_L7:; } __pyx_L5_break:; goto __pyx_L3; } __pyx_L3:; /* "pandas/src/generated.pyx":7447 * # do it again now that result size is known * * lindexer = np.empty(count, dtype=np.int64) # <<<<<<<<<<<<<< * rindexer = np.empty(count, dtype=np.int64) * result = np.empty(count, dtype=object) */ __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7447; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_empty); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7447; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_7 = PyInt_FromSsize_t(__pyx_v_count); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7447; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_t_12 = PyTuple_New(1); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7447; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_7); __Pyx_GIVEREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_7 = PyDict_New(); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7447; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_t_13 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7447; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_t_13, __pyx_n_s_int64); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7447; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_14); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_dtype, __pyx_t_14) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7447; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; __pyx_t_14 = PyObject_Call(__pyx_t_3, __pyx_t_12, __pyx_t_7); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7447; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_14); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (!(likely(((__pyx_t_14) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_14, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7447; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_15 = ((PyArrayObject *)__pyx_t_14); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_lindexer.rcbuffer->pybuffer); __pyx_t_4 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_lindexer.rcbuffer->pybuffer, (PyObject*)__pyx_t_15, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_4 < 0)) { PyErr_Fetch(&__pyx_t_16, &__pyx_t_17, &__pyx_t_18); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_lindexer.rcbuffer->pybuffer, (PyObject*)__pyx_v_lindexer, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_16); Py_XDECREF(__pyx_t_17); Py_XDECREF(__pyx_t_18); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_16, __pyx_t_17, __pyx_t_18); } } __pyx_pybuffernd_lindexer.diminfo[0].strides = __pyx_pybuffernd_lindexer.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_lindexer.diminfo[0].shape = __pyx_pybuffernd_lindexer.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7447; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_15 = 0; __pyx_v_lindexer = ((PyArrayObject *)__pyx_t_14); __pyx_t_14 = 0; /* "pandas/src/generated.pyx":7448 * * lindexer = np.empty(count, dtype=np.int64) * rindexer = np.empty(count, dtype=np.int64) # <<<<<<<<<<<<<< * result = np.empty(count, dtype=object) * */ __pyx_t_14 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7448; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_14); __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_14, __pyx_n_s_empty); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7448; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; __pyx_t_14 = PyInt_FromSsize_t(__pyx_v_count); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7448; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_14); __pyx_t_12 = PyTuple_New(1); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7448; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_14); __Pyx_GIVEREF(__pyx_t_14); __pyx_t_14 = 0; __pyx_t_14 = PyDict_New(); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7448; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_14); __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7448; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_int64); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7448; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (PyDict_SetItem(__pyx_t_14, __pyx_n_s_dtype, __pyx_t_13) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7448; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_13 = PyObject_Call(__pyx_t_7, __pyx_t_12, __pyx_t_14); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7448; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; if (!(likely(((__pyx_t_13) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_13, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7448; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_15 = ((PyArrayObject *)__pyx_t_13); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_rindexer.rcbuffer->pybuffer); __pyx_t_4 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_rindexer.rcbuffer->pybuffer, (PyObject*)__pyx_t_15, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_4 < 0)) { PyErr_Fetch(&__pyx_t_18, &__pyx_t_17, &__pyx_t_16); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_rindexer.rcbuffer->pybuffer, (PyObject*)__pyx_v_rindexer, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_18); Py_XDECREF(__pyx_t_17); Py_XDECREF(__pyx_t_16); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_18, __pyx_t_17, __pyx_t_16); } } __pyx_pybuffernd_rindexer.diminfo[0].strides = __pyx_pybuffernd_rindexer.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_rindexer.diminfo[0].shape = __pyx_pybuffernd_rindexer.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7448; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_15 = 0; __pyx_v_rindexer = ((PyArrayObject *)__pyx_t_13); __pyx_t_13 = 0; /* "pandas/src/generated.pyx":7449 * lindexer = np.empty(count, dtype=np.int64) * rindexer = np.empty(count, dtype=np.int64) * result = np.empty(count, dtype=object) # <<<<<<<<<<<<<< * * i = 0 */ __pyx_t_13 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7449; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_t_13, __pyx_n_s_empty); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7449; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_14); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_13 = PyInt_FromSsize_t(__pyx_v_count); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7449; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __pyx_t_12 = PyTuple_New(1); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7449; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_13); __Pyx_GIVEREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_13 = PyDict_New(); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7449; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); if (PyDict_SetItem(__pyx_t_13, __pyx_n_s_dtype, __pyx_builtin_object) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7449; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_7 = PyObject_Call(__pyx_t_14, __pyx_t_12, __pyx_t_13); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7449; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; if (!(likely(((__pyx_t_7) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_7, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7449; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_19 = ((PyArrayObject *)__pyx_t_7); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __pyx_t_4 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_t_19, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_4 < 0)) { PyErr_Fetch(&__pyx_t_16, &__pyx_t_17, &__pyx_t_18); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_v_result, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_16); Py_XDECREF(__pyx_t_17); Py_XDECREF(__pyx_t_18); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_16, __pyx_t_17, __pyx_t_18); } } __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_4 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7449; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_19 = 0; __pyx_v_result = ((PyArrayObject *)__pyx_t_7); __pyx_t_7 = 0; /* "pandas/src/generated.pyx":7451 * result = np.empty(count, dtype=object) * * i = 0 # <<<<<<<<<<<<<< * j = 0 * count = 0 */ __pyx_v_i = 0; /* "pandas/src/generated.pyx":7452 * * i = 0 * j = 0 # <<<<<<<<<<<<<< * count = 0 * if nleft > 0: */ __pyx_v_j = 0; /* "pandas/src/generated.pyx":7453 * i = 0 * j = 0 * count = 0 # <<<<<<<<<<<<<< * if nleft > 0: * while i < nleft: */ __pyx_v_count = 0; /* "pandas/src/generated.pyx":7454 * j = 0 * count = 0 * if nleft > 0: # <<<<<<<<<<<<<< * while i < nleft: * if j == nright: */ __pyx_t_9 = ((__pyx_v_nleft > 0) != 0); if (__pyx_t_9) { /* "pandas/src/generated.pyx":7455 * count = 0 * if nleft > 0: * while i < nleft: # <<<<<<<<<<<<<< * if j == nright: * while i < nleft: */ while (1) { __pyx_t_9 = ((__pyx_v_i < __pyx_v_nleft) != 0); if (!__pyx_t_9) break; /* "pandas/src/generated.pyx":7456 * if nleft > 0: * while i < nleft: * if j == nright: # <<<<<<<<<<<<<< * while i < nleft: * lindexer[count] = i */ __pyx_t_9 = ((__pyx_v_j == __pyx_v_nright) != 0); if (__pyx_t_9) { /* "pandas/src/generated.pyx":7457 * while i < nleft: * if j == nright: * while i < nleft: # <<<<<<<<<<<<<< * lindexer[count] = i * rindexer[count] = -1 */ while (1) { __pyx_t_9 = ((__pyx_v_i < __pyx_v_nleft) != 0); if (!__pyx_t_9) break; /* "pandas/src/generated.pyx":7458 * if j == nright: * while i < nleft: * lindexer[count] = i # <<<<<<<<<<<<<< * rindexer[count] = -1 * result[count] = left[i] */ __pyx_t_20 = __pyx_v_count; __pyx_t_4 = -1; if (__pyx_t_20 < 0) { __pyx_t_20 += __pyx_pybuffernd_lindexer.diminfo[0].shape; if (unlikely(__pyx_t_20 < 0)) __pyx_t_4 = 0; } else if (unlikely(__pyx_t_20 >= __pyx_pybuffernd_lindexer.diminfo[0].shape)) __pyx_t_4 = 0; if (unlikely(__pyx_t_4 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_4); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7458; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_lindexer.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_lindexer.diminfo[0].strides) = __pyx_v_i; /* "pandas/src/generated.pyx":7459 * while i < nleft: * lindexer[count] = i * rindexer[count] = -1 # <<<<<<<<<<<<<< * result[count] = left[i] * i += 1 */ __pyx_t_21 = __pyx_v_count; __pyx_t_4 = -1; if (__pyx_t_21 < 0) { __pyx_t_21 += __pyx_pybuffernd_rindexer.diminfo[0].shape; if (unlikely(__pyx_t_21 < 0)) __pyx_t_4 = 0; } else if (unlikely(__pyx_t_21 >= __pyx_pybuffernd_rindexer.diminfo[0].shape)) __pyx_t_4 = 0; if (unlikely(__pyx_t_4 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_4); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7459; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_rindexer.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_rindexer.diminfo[0].strides) = -1; /* "pandas/src/generated.pyx":7460 * lindexer[count] = i * rindexer[count] = -1 * result[count] = left[i] # <<<<<<<<<<<<<< * i += 1 * count += 1 */ __pyx_t_22 = __pyx_v_i; __pyx_t_4 = -1; if (__pyx_t_22 < 0) { __pyx_t_22 += __pyx_pybuffernd_left.diminfo[0].shape; if (unlikely(__pyx_t_22 < 0)) __pyx_t_4 = 0; } else if (unlikely(__pyx_t_22 >= __pyx_pybuffernd_left.diminfo[0].shape)) __pyx_t_4 = 0; if (unlikely(__pyx_t_4 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_4); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7460; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_7 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_left.rcbuffer->pybuffer.buf, __pyx_t_22, __pyx_pybuffernd_left.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_7); __pyx_t_23 = __pyx_v_count; __pyx_t_4 = -1; if (__pyx_t_23 < 0) { __pyx_t_23 += __pyx_pybuffernd_result.diminfo[0].shape; if (unlikely(__pyx_t_23 < 0)) __pyx_t_4 = 0; } else if (unlikely(__pyx_t_23 >= __pyx_pybuffernd_result.diminfo[0].shape)) __pyx_t_4 = 0; if (unlikely(__pyx_t_4 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_4); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7460; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_24 = __Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_23, __pyx_pybuffernd_result.diminfo[0].strides); __Pyx_GOTREF(*__pyx_t_24); __Pyx_INCREF(__pyx_t_7); __Pyx_DECREF(*__pyx_t_24); *__pyx_t_24 = __pyx_t_7; __Pyx_GIVEREF(*__pyx_t_24); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; /* "pandas/src/generated.pyx":7461 * rindexer[count] = -1 * result[count] = left[i] * i += 1 # <<<<<<<<<<<<<< * count += 1 * break */ __pyx_v_i = (__pyx_v_i + 1); /* "pandas/src/generated.pyx":7462 * result[count] = left[i] * i += 1 * count += 1 # <<<<<<<<<<<<<< * break * */ __pyx_v_count = (__pyx_v_count + 1); } /* "pandas/src/generated.pyx":7463 * i += 1 * count += 1 * break # <<<<<<<<<<<<<< * * lval = left[i] */ goto __pyx_L14_break; } /* "pandas/src/generated.pyx":7465 * break * * lval = left[i] # <<<<<<<<<<<<<< * rval = right[j] * */ __pyx_t_25 = __pyx_v_i; __pyx_t_4 = -1; if (__pyx_t_25 < 0) { __pyx_t_25 += __pyx_pybuffernd_left.diminfo[0].shape; if (unlikely(__pyx_t_25 < 0)) __pyx_t_4 = 0; } else if (unlikely(__pyx_t_25 >= __pyx_pybuffernd_left.diminfo[0].shape)) __pyx_t_4 = 0; if (unlikely(__pyx_t_4 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_4); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7465; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_7 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_left.rcbuffer->pybuffer.buf, __pyx_t_25, __pyx_pybuffernd_left.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_7); __Pyx_XDECREF_SET(__pyx_v_lval, __pyx_t_7); __pyx_t_7 = 0; /* "pandas/src/generated.pyx":7466 * * lval = left[i] * rval = right[j] # <<<<<<<<<<<<<< * * if lval == rval: */ __pyx_t_26 = __pyx_v_j; __pyx_t_4 = -1; if (__pyx_t_26 < 0) { __pyx_t_26 += __pyx_pybuffernd_right.diminfo[0].shape; if (unlikely(__pyx_t_26 < 0)) __pyx_t_4 = 0; } else if (unlikely(__pyx_t_26 >= __pyx_pybuffernd_right.diminfo[0].shape)) __pyx_t_4 = 0; if (unlikely(__pyx_t_4 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_4); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7466; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_7 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_right.rcbuffer->pybuffer.buf, __pyx_t_26, __pyx_pybuffernd_right.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_7); __Pyx_XDECREF_SET(__pyx_v_rval, __pyx_t_7); __pyx_t_7 = 0; /* "pandas/src/generated.pyx":7468 * rval = right[j] * * if lval == rval: # <<<<<<<<<<<<<< * lindexer[count] = i * rindexer[count] = j */ __pyx_t_7 = PyObject_RichCompare(__pyx_v_lval, __pyx_v_rval, Py_EQ); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7468; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7468; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (__pyx_t_9) { /* "pandas/src/generated.pyx":7469 * * if lval == rval: * lindexer[count] = i # <<<<<<<<<<<<<< * rindexer[count] = j * result[count] = lval */ __pyx_t_27 = __pyx_v_count; __pyx_t_4 = -1; if (__pyx_t_27 < 0) { __pyx_t_27 += __pyx_pybuffernd_lindexer.diminfo[0].shape; if (unlikely(__pyx_t_27 < 0)) __pyx_t_4 = 0; } else if (unlikely(__pyx_t_27 >= __pyx_pybuffernd_lindexer.diminfo[0].shape)) __pyx_t_4 = 0; if (unlikely(__pyx_t_4 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_4); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7469; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_lindexer.rcbuffer->pybuffer.buf, __pyx_t_27, __pyx_pybuffernd_lindexer.diminfo[0].strides) = __pyx_v_i; /* "pandas/src/generated.pyx":7470 * if lval == rval: * lindexer[count] = i * rindexer[count] = j # <<<<<<<<<<<<<< * result[count] = lval * count += 1 */ __pyx_t_28 = __pyx_v_count; __pyx_t_4 = -1; if (__pyx_t_28 < 0) { __pyx_t_28 += __pyx_pybuffernd_rindexer.diminfo[0].shape; if (unlikely(__pyx_t_28 < 0)) __pyx_t_4 = 0; } else if (unlikely(__pyx_t_28 >= __pyx_pybuffernd_rindexer.diminfo[0].shape)) __pyx_t_4 = 0; if (unlikely(__pyx_t_4 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_4); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7470; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_rindexer.rcbuffer->pybuffer.buf, __pyx_t_28, __pyx_pybuffernd_rindexer.diminfo[0].strides) = __pyx_v_j; /* "pandas/src/generated.pyx":7471 * lindexer[count] = i * rindexer[count] = j * result[count] = lval # <<<<<<<<<<<<<< * count += 1 * if i < nleft - 1: */ __pyx_t_29 = __pyx_v_count; __pyx_t_4 = -1; if (__pyx_t_29 < 0) { __pyx_t_29 += __pyx_pybuffernd_result.diminfo[0].shape; if (unlikely(__pyx_t_29 < 0)) __pyx_t_4 = 0; } else if (unlikely(__pyx_t_29 >= __pyx_pybuffernd_result.diminfo[0].shape)) __pyx_t_4 = 0; if (unlikely(__pyx_t_4 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_4); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7471; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_24 = __Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_29, __pyx_pybuffernd_result.diminfo[0].strides); __Pyx_GOTREF(*__pyx_t_24); __Pyx_INCREF(__pyx_v_lval); __Pyx_DECREF(*__pyx_t_24); *__pyx_t_24 = __pyx_v_lval; __Pyx_GIVEREF(*__pyx_t_24); /* "pandas/src/generated.pyx":7472 * rindexer[count] = j * result[count] = lval * count += 1 # <<<<<<<<<<<<<< * if i < nleft - 1: * if j < nright - 1 and right[j + 1] == rval: */ __pyx_v_count = (__pyx_v_count + 1); /* "pandas/src/generated.pyx":7473 * result[count] = lval * count += 1 * if i < nleft - 1: # <<<<<<<<<<<<<< * if j < nright - 1 and right[j + 1] == rval: * j += 1 */ __pyx_t_9 = ((__pyx_v_i < (__pyx_v_nleft - 1)) != 0); if (__pyx_t_9) { /* "pandas/src/generated.pyx":7474 * count += 1 * if i < nleft - 1: * if j < nright - 1 and right[j + 1] == rval: # <<<<<<<<<<<<<< * j += 1 * else: */ __pyx_t_9 = (__pyx_v_j < (__pyx_v_nright - 1)); if (__pyx_t_9) { __pyx_t_30 = (__pyx_v_j + 1); __pyx_t_4 = -1; if (__pyx_t_30 < 0) { __pyx_t_30 += __pyx_pybuffernd_right.diminfo[0].shape; if (unlikely(__pyx_t_30 < 0)) __pyx_t_4 = 0; } else if (unlikely(__pyx_t_30 >= __pyx_pybuffernd_right.diminfo[0].shape)) __pyx_t_4 = 0; if (unlikely(__pyx_t_4 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_4); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7474; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_7 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_right.rcbuffer->pybuffer.buf, __pyx_t_30, __pyx_pybuffernd_right.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_7); __pyx_t_13 = PyObject_RichCompare(__pyx_t_7, __pyx_v_rval, Py_EQ); __Pyx_XGOTREF(__pyx_t_13); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7474; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_13); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7474; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_8 = __pyx_t_2; } else { __pyx_t_8 = __pyx_t_9; } if (__pyx_t_8) { /* "pandas/src/generated.pyx":7475 * if i < nleft - 1: * if j < nright - 1 and right[j + 1] == rval: * j += 1 # <<<<<<<<<<<<<< * else: * i += 1 */ __pyx_v_j = (__pyx_v_j + 1); goto __pyx_L20; } /*else*/ { /* "pandas/src/generated.pyx":7477 * j += 1 * else: * i += 1 # <<<<<<<<<<<<<< * if left[i] != rval: * j += 1 */ __pyx_v_i = (__pyx_v_i + 1); /* "pandas/src/generated.pyx":7478 * else: * i += 1 * if left[i] != rval: # <<<<<<<<<<<<<< * j += 1 * elif j < nright - 1: */ __pyx_t_31 = __pyx_v_i; __pyx_t_4 = -1; if (__pyx_t_31 < 0) { __pyx_t_31 += __pyx_pybuffernd_left.diminfo[0].shape; if (unlikely(__pyx_t_31 < 0)) __pyx_t_4 = 0; } else if (unlikely(__pyx_t_31 >= __pyx_pybuffernd_left.diminfo[0].shape)) __pyx_t_4 = 0; if (unlikely(__pyx_t_4 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_4); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7478; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_13 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_left.rcbuffer->pybuffer.buf, __pyx_t_31, __pyx_pybuffernd_left.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_13); __pyx_t_7 = PyObject_RichCompare(__pyx_t_13, __pyx_v_rval, Py_NE); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7478; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7478; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (__pyx_t_8) { /* "pandas/src/generated.pyx":7479 * i += 1 * if left[i] != rval: * j += 1 # <<<<<<<<<<<<<< * elif j < nright - 1: * j += 1 */ __pyx_v_j = (__pyx_v_j + 1); goto __pyx_L21; } __pyx_L21:; } __pyx_L20:; goto __pyx_L19; } /* "pandas/src/generated.pyx":7480 * if left[i] != rval: * j += 1 * elif j < nright - 1: # <<<<<<<<<<<<<< * j += 1 * if lval != right[j]: */ __pyx_t_8 = ((__pyx_v_j < (__pyx_v_nright - 1)) != 0); if (__pyx_t_8) { /* "pandas/src/generated.pyx":7481 * j += 1 * elif j < nright - 1: * j += 1 # <<<<<<<<<<<<<< * if lval != right[j]: * i += 1 */ __pyx_v_j = (__pyx_v_j + 1); /* "pandas/src/generated.pyx":7482 * elif j < nright - 1: * j += 1 * if lval != right[j]: # <<<<<<<<<<<<<< * i += 1 * else: */ __pyx_t_32 = __pyx_v_j; __pyx_t_4 = -1; if (__pyx_t_32 < 0) { __pyx_t_32 += __pyx_pybuffernd_right.diminfo[0].shape; if (unlikely(__pyx_t_32 < 0)) __pyx_t_4 = 0; } else if (unlikely(__pyx_t_32 >= __pyx_pybuffernd_right.diminfo[0].shape)) __pyx_t_4 = 0; if (unlikely(__pyx_t_4 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_4); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7482; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_7 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_right.rcbuffer->pybuffer.buf, __pyx_t_32, __pyx_pybuffernd_right.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_7); __pyx_t_13 = PyObject_RichCompare(__pyx_v_lval, __pyx_t_7, Py_NE); __Pyx_XGOTREF(__pyx_t_13); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7482; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_13); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7482; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; if (__pyx_t_8) { /* "pandas/src/generated.pyx":7483 * j += 1 * if lval != right[j]: * i += 1 # <<<<<<<<<<<<<< * else: * # end of the road */ __pyx_v_i = (__pyx_v_i + 1); goto __pyx_L22; } __pyx_L22:; goto __pyx_L19; } /*else*/ { /* "pandas/src/generated.pyx":7486 * else: * # end of the road * break # <<<<<<<<<<<<<< * elif lval < rval: * lindexer[count] = i */ goto __pyx_L14_break; } __pyx_L19:; goto __pyx_L18; } /* "pandas/src/generated.pyx":7487 * # end of the road * break * elif lval < rval: # <<<<<<<<<<<<<< * lindexer[count] = i * rindexer[count] = -1 */ __pyx_t_13 = PyObject_RichCompare(__pyx_v_lval, __pyx_v_rval, Py_LT); __Pyx_XGOTREF(__pyx_t_13); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7487; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_13); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7487; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; if (__pyx_t_8) { /* "pandas/src/generated.pyx":7488 * break * elif lval < rval: * lindexer[count] = i # <<<<<<<<<<<<<< * rindexer[count] = -1 * result[count] = left[i] */ __pyx_t_33 = __pyx_v_count; __pyx_t_4 = -1; if (__pyx_t_33 < 0) { __pyx_t_33 += __pyx_pybuffernd_lindexer.diminfo[0].shape; if (unlikely(__pyx_t_33 < 0)) __pyx_t_4 = 0; } else if (unlikely(__pyx_t_33 >= __pyx_pybuffernd_lindexer.diminfo[0].shape)) __pyx_t_4 = 0; if (unlikely(__pyx_t_4 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_4); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7488; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_lindexer.rcbuffer->pybuffer.buf, __pyx_t_33, __pyx_pybuffernd_lindexer.diminfo[0].strides) = __pyx_v_i; /* "pandas/src/generated.pyx":7489 * elif lval < rval: * lindexer[count] = i * rindexer[count] = -1 # <<<<<<<<<<<<<< * result[count] = left[i] * count += 1 */ __pyx_t_34 = __pyx_v_count; __pyx_t_4 = -1; if (__pyx_t_34 < 0) { __pyx_t_34 += __pyx_pybuffernd_rindexer.diminfo[0].shape; if (unlikely(__pyx_t_34 < 0)) __pyx_t_4 = 0; } else if (unlikely(__pyx_t_34 >= __pyx_pybuffernd_rindexer.diminfo[0].shape)) __pyx_t_4 = 0; if (unlikely(__pyx_t_4 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_4); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7489; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_rindexer.rcbuffer->pybuffer.buf, __pyx_t_34, __pyx_pybuffernd_rindexer.diminfo[0].strides) = -1; /* "pandas/src/generated.pyx":7490 * lindexer[count] = i * rindexer[count] = -1 * result[count] = left[i] # <<<<<<<<<<<<<< * count += 1 * i += 1 */ __pyx_t_35 = __pyx_v_i; __pyx_t_4 = -1; if (__pyx_t_35 < 0) { __pyx_t_35 += __pyx_pybuffernd_left.diminfo[0].shape; if (unlikely(__pyx_t_35 < 0)) __pyx_t_4 = 0; } else if (unlikely(__pyx_t_35 >= __pyx_pybuffernd_left.diminfo[0].shape)) __pyx_t_4 = 0; if (unlikely(__pyx_t_4 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_4); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7490; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_13 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_left.rcbuffer->pybuffer.buf, __pyx_t_35, __pyx_pybuffernd_left.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_13); __pyx_t_36 = __pyx_v_count; __pyx_t_4 = -1; if (__pyx_t_36 < 0) { __pyx_t_36 += __pyx_pybuffernd_result.diminfo[0].shape; if (unlikely(__pyx_t_36 < 0)) __pyx_t_4 = 0; } else if (unlikely(__pyx_t_36 >= __pyx_pybuffernd_result.diminfo[0].shape)) __pyx_t_4 = 0; if (unlikely(__pyx_t_4 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_4); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7490; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_24 = __Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_36, __pyx_pybuffernd_result.diminfo[0].strides); __Pyx_GOTREF(*__pyx_t_24); __Pyx_INCREF(__pyx_t_13); __Pyx_DECREF(*__pyx_t_24); *__pyx_t_24 = __pyx_t_13; __Pyx_GIVEREF(*__pyx_t_24); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; /* "pandas/src/generated.pyx":7491 * rindexer[count] = -1 * result[count] = left[i] * count += 1 # <<<<<<<<<<<<<< * i += 1 * else: */ __pyx_v_count = (__pyx_v_count + 1); /* "pandas/src/generated.pyx":7492 * result[count] = left[i] * count += 1 * i += 1 # <<<<<<<<<<<<<< * else: * j += 1 */ __pyx_v_i = (__pyx_v_i + 1); goto __pyx_L18; } /*else*/ { /* "pandas/src/generated.pyx":7494 * i += 1 * else: * j += 1 # <<<<<<<<<<<<<< * * return result, lindexer, rindexer */ __pyx_v_j = (__pyx_v_j + 1); } __pyx_L18:; } __pyx_L14_break:; goto __pyx_L12; } __pyx_L12:; /* "pandas/src/generated.pyx":7496 * j += 1 * * return result, lindexer, rindexer # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_13 = PyTuple_New(3); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7496; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __Pyx_INCREF(((PyObject *)__pyx_v_result)); PyTuple_SET_ITEM(__pyx_t_13, 0, ((PyObject *)__pyx_v_result)); __Pyx_GIVEREF(((PyObject *)__pyx_v_result)); __Pyx_INCREF(((PyObject *)__pyx_v_lindexer)); PyTuple_SET_ITEM(__pyx_t_13, 1, ((PyObject *)__pyx_v_lindexer)); __Pyx_GIVEREF(((PyObject *)__pyx_v_lindexer)); __Pyx_INCREF(((PyObject *)__pyx_v_rindexer)); PyTuple_SET_ITEM(__pyx_t_13, 2, ((PyObject *)__pyx_v_rindexer)); __Pyx_GIVEREF(((PyObject *)__pyx_v_rindexer)); __pyx_r = __pyx_t_13; __pyx_t_13 = 0; goto __pyx_L0; /* "pandas/src/generated.pyx":7397 * * * def left_join_indexer_object(ndarray[object] left, # <<<<<<<<<<<<<< * ndarray[object] right): * ''' */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_12); __Pyx_XDECREF(__pyx_t_13); __Pyx_XDECREF(__pyx_t_14); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_left.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_lindexer.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_right.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_rindexer.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.left_join_indexer_object", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_left.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_lindexer.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_right.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_rindexer.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF(__pyx_v_lval); __Pyx_XDECREF(__pyx_v_rval); __Pyx_XDECREF((PyObject *)__pyx_v_lindexer); __Pyx_XDECREF((PyObject *)__pyx_v_rindexer); __Pyx_XDECREF((PyObject *)__pyx_v_result); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":7499 * * * def left_join_indexer_int32(ndarray[int32_t] left, # <<<<<<<<<<<<<< * ndarray[int32_t] right): * ''' */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_471left_join_indexer_int32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6pandas_5algos_470left_join_indexer_int32[] = "\n Two-pass algorithm for monotonic indexes. Handles many-to-one merges\n "; static PyMethodDef __pyx_mdef_6pandas_5algos_471left_join_indexer_int32 = {__Pyx_NAMESTR("left_join_indexer_int32"), (PyCFunction)__pyx_pw_6pandas_5algos_471left_join_indexer_int32, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_5algos_470left_join_indexer_int32)}; static PyObject *__pyx_pw_6pandas_5algos_471left_join_indexer_int32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_left = 0; PyArrayObject *__pyx_v_right = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("left_join_indexer_int32 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_left,&__pyx_n_s_right,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_left)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_right)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("left_join_indexer_int32", 1, 2, 2, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7499; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "left_join_indexer_int32") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7499; __pyx_clineno = __LINE__; goto __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_left = ((PyArrayObject *)values[0]); __pyx_v_right = ((PyArrayObject *)values[1]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("left_join_indexer_int32", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7499; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.left_join_indexer_int32", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_left), __pyx_ptype_5numpy_ndarray, 1, "left", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7499; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_right), __pyx_ptype_5numpy_ndarray, 1, "right", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7500; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_470left_join_indexer_int32(__pyx_self, __pyx_v_left, __pyx_v_right); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5algos_470left_join_indexer_int32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_left, PyArrayObject *__pyx_v_right) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_nright; Py_ssize_t __pyx_v_nleft; Py_ssize_t __pyx_v_count; __pyx_t_5numpy_int32_t __pyx_v_lval; __pyx_t_5numpy_int32_t __pyx_v_rval; PyArrayObject *__pyx_v_lindexer = 0; PyArrayObject *__pyx_v_rindexer = 0; PyArrayObject *__pyx_v_result = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_left; __Pyx_Buffer __pyx_pybuffer_left; __Pyx_LocalBuf_ND __pyx_pybuffernd_lindexer; __Pyx_Buffer __pyx_pybuffer_lindexer; __Pyx_LocalBuf_ND __pyx_pybuffernd_result; __Pyx_Buffer __pyx_pybuffer_result; __Pyx_LocalBuf_ND __pyx_pybuffernd_right; __Pyx_Buffer __pyx_pybuffer_right; __Pyx_LocalBuf_ND __pyx_pybuffernd_rindexer; __Pyx_Buffer __pyx_pybuffer_rindexer; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; int __pyx_t_2; int __pyx_t_3; Py_ssize_t __pyx_t_4; Py_ssize_t __pyx_t_5; int __pyx_t_6; int __pyx_t_7; Py_ssize_t __pyx_t_8; Py_ssize_t __pyx_t_9; PyObject *__pyx_t_10 = NULL; PyObject *__pyx_t_11 = NULL; PyObject *__pyx_t_12 = NULL; PyObject *__pyx_t_13 = NULL; PyObject *__pyx_t_14 = NULL; PyArrayObject *__pyx_t_15 = NULL; PyObject *__pyx_t_16 = NULL; PyObject *__pyx_t_17 = NULL; PyObject *__pyx_t_18 = NULL; PyArrayObject *__pyx_t_19 = NULL; 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("left_join_indexer_int32", 0); __pyx_pybuffer_lindexer.pybuffer.buf = NULL; __pyx_pybuffer_lindexer.refcount = 0; __pyx_pybuffernd_lindexer.data = NULL; __pyx_pybuffernd_lindexer.rcbuffer = &__pyx_pybuffer_lindexer; __pyx_pybuffer_rindexer.pybuffer.buf = NULL; __pyx_pybuffer_rindexer.refcount = 0; __pyx_pybuffernd_rindexer.data = NULL; __pyx_pybuffernd_rindexer.rcbuffer = &__pyx_pybuffer_rindexer; __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_left.pybuffer.buf = NULL; __pyx_pybuffer_left.refcount = 0; __pyx_pybuffernd_left.data = NULL; __pyx_pybuffernd_left.rcbuffer = &__pyx_pybuffer_left; __pyx_pybuffer_right.pybuffer.buf = NULL; __pyx_pybuffer_right.refcount = 0; __pyx_pybuffernd_right.data = NULL; __pyx_pybuffernd_right.rcbuffer = &__pyx_pybuffer_right; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_left.rcbuffer->pybuffer, (PyObject*)__pyx_v_left, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7499; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_left.diminfo[0].strides = __pyx_pybuffernd_left.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_left.diminfo[0].shape = __pyx_pybuffernd_left.rcbuffer->pybuffer.shape[0]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_right.rcbuffer->pybuffer, (PyObject*)__pyx_v_right, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7499; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_right.diminfo[0].strides = __pyx_pybuffernd_right.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_right.diminfo[0].shape = __pyx_pybuffernd_right.rcbuffer->pybuffer.shape[0]; /* "pandas/src/generated.pyx":7510 * ndarray[int32_t] result * * nleft = len(left) # <<<<<<<<<<<<<< * nright = len(right) * */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_left)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7510; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_nleft = __pyx_t_1; /* "pandas/src/generated.pyx":7511 * * nleft = len(left) * nright = len(right) # <<<<<<<<<<<<<< * * i = 0 */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_right)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7511; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_nright = __pyx_t_1; /* "pandas/src/generated.pyx":7513 * nright = len(right) * * i = 0 # <<<<<<<<<<<<<< * j = 0 * count = 0 */ __pyx_v_i = 0; /* "pandas/src/generated.pyx":7514 * * i = 0 * j = 0 # <<<<<<<<<<<<<< * count = 0 * if nleft > 0: */ __pyx_v_j = 0; /* "pandas/src/generated.pyx":7515 * i = 0 * j = 0 * count = 0 # <<<<<<<<<<<<<< * if nleft > 0: * while i < nleft: */ __pyx_v_count = 0; /* "pandas/src/generated.pyx":7516 * j = 0 * count = 0 * if nleft > 0: # <<<<<<<<<<<<<< * while i < nleft: * if j == nright: */ __pyx_t_2 = ((__pyx_v_nleft > 0) != 0); if (__pyx_t_2) { /* "pandas/src/generated.pyx":7517 * count = 0 * if nleft > 0: * while i < nleft: # <<<<<<<<<<<<<< * if j == nright: * count += nleft - i */ while (1) { __pyx_t_2 = ((__pyx_v_i < __pyx_v_nleft) != 0); if (!__pyx_t_2) break; /* "pandas/src/generated.pyx":7518 * if nleft > 0: * while i < nleft: * if j == nright: # <<<<<<<<<<<<<< * count += nleft - i * break */ __pyx_t_2 = ((__pyx_v_j == __pyx_v_nright) != 0); if (__pyx_t_2) { /* "pandas/src/generated.pyx":7519 * while i < nleft: * if j == nright: * count += nleft - i # <<<<<<<<<<<<<< * break * */ __pyx_v_count = (__pyx_v_count + (__pyx_v_nleft - __pyx_v_i)); /* "pandas/src/generated.pyx":7520 * if j == nright: * count += nleft - i * break # <<<<<<<<<<<<<< * * lval = left[i] */ goto __pyx_L5_break; } /* "pandas/src/generated.pyx":7522 * break * * lval = left[i] # <<<<<<<<<<<<<< * rval = right[j] * */ __pyx_t_1 = __pyx_v_i; __pyx_t_3 = -1; if (__pyx_t_1 < 0) { __pyx_t_1 += __pyx_pybuffernd_left.diminfo[0].shape; if (unlikely(__pyx_t_1 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_1 >= __pyx_pybuffernd_left.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7522; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_lval = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_left.rcbuffer->pybuffer.buf, __pyx_t_1, __pyx_pybuffernd_left.diminfo[0].strides)); /* "pandas/src/generated.pyx":7523 * * lval = left[i] * rval = right[j] # <<<<<<<<<<<<<< * * if lval == rval: */ __pyx_t_4 = __pyx_v_j; __pyx_t_3 = -1; if (__pyx_t_4 < 0) { __pyx_t_4 += __pyx_pybuffernd_right.diminfo[0].shape; if (unlikely(__pyx_t_4 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_4 >= __pyx_pybuffernd_right.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7523; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_rval = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_right.rcbuffer->pybuffer.buf, __pyx_t_4, __pyx_pybuffernd_right.diminfo[0].strides)); /* "pandas/src/generated.pyx":7525 * rval = right[j] * * if lval == rval: # <<<<<<<<<<<<<< * count += 1 * if i < nleft - 1: */ __pyx_t_2 = ((__pyx_v_lval == __pyx_v_rval) != 0); if (__pyx_t_2) { /* "pandas/src/generated.pyx":7526 * * if lval == rval: * count += 1 # <<<<<<<<<<<<<< * if i < nleft - 1: * if j < nright - 1 and right[j + 1] == rval: */ __pyx_v_count = (__pyx_v_count + 1); /* "pandas/src/generated.pyx":7527 * if lval == rval: * count += 1 * if i < nleft - 1: # <<<<<<<<<<<<<< * if j < nright - 1 and right[j + 1] == rval: * j += 1 */ __pyx_t_2 = ((__pyx_v_i < (__pyx_v_nleft - 1)) != 0); if (__pyx_t_2) { /* "pandas/src/generated.pyx":7528 * count += 1 * if i < nleft - 1: * if j < nright - 1 and right[j + 1] == rval: # <<<<<<<<<<<<<< * j += 1 * else: */ __pyx_t_2 = ((__pyx_v_j < (__pyx_v_nright - 1)) != 0); if (__pyx_t_2) { __pyx_t_5 = (__pyx_v_j + 1); __pyx_t_3 = -1; if (__pyx_t_5 < 0) { __pyx_t_5 += __pyx_pybuffernd_right.diminfo[0].shape; if (unlikely(__pyx_t_5 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_5 >= __pyx_pybuffernd_right.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7528; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_6 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_right.rcbuffer->pybuffer.buf, __pyx_t_5, __pyx_pybuffernd_right.diminfo[0].strides)) == __pyx_v_rval) != 0); __pyx_t_7 = __pyx_t_6; } else { __pyx_t_7 = __pyx_t_2; } if (__pyx_t_7) { /* "pandas/src/generated.pyx":7529 * if i < nleft - 1: * if j < nright - 1 and right[j + 1] == rval: * j += 1 # <<<<<<<<<<<<<< * else: * i += 1 */ __pyx_v_j = (__pyx_v_j + 1); goto __pyx_L9; } /*else*/ { /* "pandas/src/generated.pyx":7531 * j += 1 * else: * i += 1 # <<<<<<<<<<<<<< * if left[i] != rval: * j += 1 */ __pyx_v_i = (__pyx_v_i + 1); /* "pandas/src/generated.pyx":7532 * else: * i += 1 * if left[i] != rval: # <<<<<<<<<<<<<< * j += 1 * elif j < nright - 1: */ __pyx_t_8 = __pyx_v_i; __pyx_t_3 = -1; if (__pyx_t_8 < 0) { __pyx_t_8 += __pyx_pybuffernd_left.diminfo[0].shape; if (unlikely(__pyx_t_8 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_8 >= __pyx_pybuffernd_left.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7532; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_7 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_left.rcbuffer->pybuffer.buf, __pyx_t_8, __pyx_pybuffernd_left.diminfo[0].strides)) != __pyx_v_rval) != 0); if (__pyx_t_7) { /* "pandas/src/generated.pyx":7533 * i += 1 * if left[i] != rval: * j += 1 # <<<<<<<<<<<<<< * elif j < nright - 1: * j += 1 */ __pyx_v_j = (__pyx_v_j + 1); goto __pyx_L10; } __pyx_L10:; } __pyx_L9:; goto __pyx_L8; } /* "pandas/src/generated.pyx":7534 * if left[i] != rval: * j += 1 * elif j < nright - 1: # <<<<<<<<<<<<<< * j += 1 * if lval != right[j]: */ __pyx_t_7 = ((__pyx_v_j < (__pyx_v_nright - 1)) != 0); if (__pyx_t_7) { /* "pandas/src/generated.pyx":7535 * j += 1 * elif j < nright - 1: * j += 1 # <<<<<<<<<<<<<< * if lval != right[j]: * i += 1 */ __pyx_v_j = (__pyx_v_j + 1); /* "pandas/src/generated.pyx":7536 * elif j < nright - 1: * j += 1 * if lval != right[j]: # <<<<<<<<<<<<<< * i += 1 * else: */ __pyx_t_9 = __pyx_v_j; __pyx_t_3 = -1; if (__pyx_t_9 < 0) { __pyx_t_9 += __pyx_pybuffernd_right.diminfo[0].shape; if (unlikely(__pyx_t_9 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_9 >= __pyx_pybuffernd_right.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7536; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_7 = ((__pyx_v_lval != (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_right.rcbuffer->pybuffer.buf, __pyx_t_9, __pyx_pybuffernd_right.diminfo[0].strides))) != 0); if (__pyx_t_7) { /* "pandas/src/generated.pyx":7537 * j += 1 * if lval != right[j]: * i += 1 # <<<<<<<<<<<<<< * else: * # end of the road */ __pyx_v_i = (__pyx_v_i + 1); goto __pyx_L11; } __pyx_L11:; goto __pyx_L8; } /*else*/ { /* "pandas/src/generated.pyx":7540 * else: * # end of the road * break # <<<<<<<<<<<<<< * elif lval < rval: * count += 1 */ goto __pyx_L5_break; } __pyx_L8:; goto __pyx_L7; } /* "pandas/src/generated.pyx":7541 * # end of the road * break * elif lval < rval: # <<<<<<<<<<<<<< * count += 1 * i += 1 */ __pyx_t_7 = ((__pyx_v_lval < __pyx_v_rval) != 0); if (__pyx_t_7) { /* "pandas/src/generated.pyx":7542 * break * elif lval < rval: * count += 1 # <<<<<<<<<<<<<< * i += 1 * else: */ __pyx_v_count = (__pyx_v_count + 1); /* "pandas/src/generated.pyx":7543 * elif lval < rval: * count += 1 * i += 1 # <<<<<<<<<<<<<< * else: * j += 1 */ __pyx_v_i = (__pyx_v_i + 1); goto __pyx_L7; } /*else*/ { /* "pandas/src/generated.pyx":7545 * i += 1 * else: * j += 1 # <<<<<<<<<<<<<< * * # do it again now that result size is known */ __pyx_v_j = (__pyx_v_j + 1); } __pyx_L7:; } __pyx_L5_break:; goto __pyx_L3; } __pyx_L3:; /* "pandas/src/generated.pyx":7549 * # do it again now that result size is known * * lindexer = np.empty(count, dtype=np.int64) # <<<<<<<<<<<<<< * rindexer = np.empty(count, dtype=np.int64) * result = np.empty(count, dtype=np.int32) */ __pyx_t_10 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7549; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_empty); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7549; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_t_10 = PyInt_FromSsize_t(__pyx_v_count); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7549; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __pyx_t_12 = PyTuple_New(1); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7549; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_10); __Pyx_GIVEREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_t_10 = PyDict_New(); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7549; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __pyx_t_13 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7549; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_t_13, __pyx_n_s_int64); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7549; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_14); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; if (PyDict_SetItem(__pyx_t_10, __pyx_n_s_dtype, __pyx_t_14) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7549; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; __pyx_t_14 = PyObject_Call(__pyx_t_11, __pyx_t_12, __pyx_t_10); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7549; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_14); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; if (!(likely(((__pyx_t_14) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_14, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7549; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_15 = ((PyArrayObject *)__pyx_t_14); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_lindexer.rcbuffer->pybuffer); __pyx_t_3 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_lindexer.rcbuffer->pybuffer, (PyObject*)__pyx_t_15, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_3 < 0)) { PyErr_Fetch(&__pyx_t_16, &__pyx_t_17, &__pyx_t_18); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_lindexer.rcbuffer->pybuffer, (PyObject*)__pyx_v_lindexer, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_16); Py_XDECREF(__pyx_t_17); Py_XDECREF(__pyx_t_18); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_16, __pyx_t_17, __pyx_t_18); } } __pyx_pybuffernd_lindexer.diminfo[0].strides = __pyx_pybuffernd_lindexer.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_lindexer.diminfo[0].shape = __pyx_pybuffernd_lindexer.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7549; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_15 = 0; __pyx_v_lindexer = ((PyArrayObject *)__pyx_t_14); __pyx_t_14 = 0; /* "pandas/src/generated.pyx":7550 * * lindexer = np.empty(count, dtype=np.int64) * rindexer = np.empty(count, dtype=np.int64) # <<<<<<<<<<<<<< * result = np.empty(count, dtype=np.int32) * */ __pyx_t_14 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7550; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_14); __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_14, __pyx_n_s_empty); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7550; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; __pyx_t_14 = PyInt_FromSsize_t(__pyx_v_count); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7550; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_14); __pyx_t_12 = PyTuple_New(1); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7550; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_14); __Pyx_GIVEREF(__pyx_t_14); __pyx_t_14 = 0; __pyx_t_14 = PyDict_New(); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7550; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_14); __pyx_t_11 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7550; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_int64); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7550; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; if (PyDict_SetItem(__pyx_t_14, __pyx_n_s_dtype, __pyx_t_13) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7550; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_13 = PyObject_Call(__pyx_t_10, __pyx_t_12, __pyx_t_14); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7550; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; if (!(likely(((__pyx_t_13) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_13, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7550; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_15 = ((PyArrayObject *)__pyx_t_13); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_rindexer.rcbuffer->pybuffer); __pyx_t_3 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_rindexer.rcbuffer->pybuffer, (PyObject*)__pyx_t_15, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_3 < 0)) { PyErr_Fetch(&__pyx_t_18, &__pyx_t_17, &__pyx_t_16); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_rindexer.rcbuffer->pybuffer, (PyObject*)__pyx_v_rindexer, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_18); Py_XDECREF(__pyx_t_17); Py_XDECREF(__pyx_t_16); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_18, __pyx_t_17, __pyx_t_16); } } __pyx_pybuffernd_rindexer.diminfo[0].strides = __pyx_pybuffernd_rindexer.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_rindexer.diminfo[0].shape = __pyx_pybuffernd_rindexer.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7550; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_15 = 0; __pyx_v_rindexer = ((PyArrayObject *)__pyx_t_13); __pyx_t_13 = 0; /* "pandas/src/generated.pyx":7551 * lindexer = np.empty(count, dtype=np.int64) * rindexer = np.empty(count, dtype=np.int64) * result = np.empty(count, dtype=np.int32) # <<<<<<<<<<<<<< * * i = 0 */ __pyx_t_13 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7551; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_t_13, __pyx_n_s_empty); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7551; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_14); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_13 = PyInt_FromSsize_t(__pyx_v_count); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7551; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __pyx_t_12 = PyTuple_New(1); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7551; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_13); __Pyx_GIVEREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_13 = PyDict_New(); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7551; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __pyx_t_10 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7551; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_int32); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7551; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; if (PyDict_SetItem(__pyx_t_13, __pyx_n_s_dtype, __pyx_t_11) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7551; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __pyx_t_11 = PyObject_Call(__pyx_t_14, __pyx_t_12, __pyx_t_13); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7551; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; if (!(likely(((__pyx_t_11) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_11, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7551; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_19 = ((PyArrayObject *)__pyx_t_11); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __pyx_t_3 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_t_19, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_3 < 0)) { PyErr_Fetch(&__pyx_t_16, &__pyx_t_17, &__pyx_t_18); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_v_result, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_16); Py_XDECREF(__pyx_t_17); Py_XDECREF(__pyx_t_18); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_16, __pyx_t_17, __pyx_t_18); } } __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_3 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7551; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_19 = 0; __pyx_v_result = ((PyArrayObject *)__pyx_t_11); __pyx_t_11 = 0; /* "pandas/src/generated.pyx":7553 * result = np.empty(count, dtype=np.int32) * * i = 0 # <<<<<<<<<<<<<< * j = 0 * count = 0 */ __pyx_v_i = 0; /* "pandas/src/generated.pyx":7554 * * i = 0 * j = 0 # <<<<<<<<<<<<<< * count = 0 * if nleft > 0: */ __pyx_v_j = 0; /* "pandas/src/generated.pyx":7555 * i = 0 * j = 0 * count = 0 # <<<<<<<<<<<<<< * if nleft > 0: * while i < nleft: */ __pyx_v_count = 0; /* "pandas/src/generated.pyx":7556 * j = 0 * count = 0 * if nleft > 0: # <<<<<<<<<<<<<< * while i < nleft: * if j == nright: */ __pyx_t_7 = ((__pyx_v_nleft > 0) != 0); if (__pyx_t_7) { /* "pandas/src/generated.pyx":7557 * count = 0 * if nleft > 0: * while i < nleft: # <<<<<<<<<<<<<< * if j == nright: * while i < nleft: */ while (1) { __pyx_t_7 = ((__pyx_v_i < __pyx_v_nleft) != 0); if (!__pyx_t_7) break; /* "pandas/src/generated.pyx":7558 * if nleft > 0: * while i < nleft: * if j == nright: # <<<<<<<<<<<<<< * while i < nleft: * lindexer[count] = i */ __pyx_t_7 = ((__pyx_v_j == __pyx_v_nright) != 0); if (__pyx_t_7) { /* "pandas/src/generated.pyx":7559 * while i < nleft: * if j == nright: * while i < nleft: # <<<<<<<<<<<<<< * lindexer[count] = i * rindexer[count] = -1 */ while (1) { __pyx_t_7 = ((__pyx_v_i < __pyx_v_nleft) != 0); if (!__pyx_t_7) break; /* "pandas/src/generated.pyx":7560 * if j == nright: * while i < nleft: * lindexer[count] = i # <<<<<<<<<<<<<< * rindexer[count] = -1 * result[count] = left[i] */ __pyx_t_20 = __pyx_v_count; __pyx_t_3 = -1; if (__pyx_t_20 < 0) { __pyx_t_20 += __pyx_pybuffernd_lindexer.diminfo[0].shape; if (unlikely(__pyx_t_20 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_20 >= __pyx_pybuffernd_lindexer.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7560; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_lindexer.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_lindexer.diminfo[0].strides) = __pyx_v_i; /* "pandas/src/generated.pyx":7561 * while i < nleft: * lindexer[count] = i * rindexer[count] = -1 # <<<<<<<<<<<<<< * result[count] = left[i] * i += 1 */ __pyx_t_21 = __pyx_v_count; __pyx_t_3 = -1; if (__pyx_t_21 < 0) { __pyx_t_21 += __pyx_pybuffernd_rindexer.diminfo[0].shape; if (unlikely(__pyx_t_21 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_21 >= __pyx_pybuffernd_rindexer.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7561; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_rindexer.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_rindexer.diminfo[0].strides) = -1; /* "pandas/src/generated.pyx":7562 * lindexer[count] = i * rindexer[count] = -1 * result[count] = left[i] # <<<<<<<<<<<<<< * i += 1 * count += 1 */ __pyx_t_22 = __pyx_v_i; __pyx_t_3 = -1; if (__pyx_t_22 < 0) { __pyx_t_22 += __pyx_pybuffernd_left.diminfo[0].shape; if (unlikely(__pyx_t_22 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_22 >= __pyx_pybuffernd_left.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7562; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_23 = __pyx_v_count; __pyx_t_3 = -1; if (__pyx_t_23 < 0) { __pyx_t_23 += __pyx_pybuffernd_result.diminfo[0].shape; if (unlikely(__pyx_t_23 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_23 >= __pyx_pybuffernd_result.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7562; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_23, __pyx_pybuffernd_result.diminfo[0].strides) = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_left.rcbuffer->pybuffer.buf, __pyx_t_22, __pyx_pybuffernd_left.diminfo[0].strides)); /* "pandas/src/generated.pyx":7563 * rindexer[count] = -1 * result[count] = left[i] * i += 1 # <<<<<<<<<<<<<< * count += 1 * break */ __pyx_v_i = (__pyx_v_i + 1); /* "pandas/src/generated.pyx":7564 * result[count] = left[i] * i += 1 * count += 1 # <<<<<<<<<<<<<< * break * */ __pyx_v_count = (__pyx_v_count + 1); } /* "pandas/src/generated.pyx":7565 * i += 1 * count += 1 * break # <<<<<<<<<<<<<< * * lval = left[i] */ goto __pyx_L14_break; } /* "pandas/src/generated.pyx":7567 * break * * lval = left[i] # <<<<<<<<<<<<<< * rval = right[j] * */ __pyx_t_24 = __pyx_v_i; __pyx_t_3 = -1; if (__pyx_t_24 < 0) { __pyx_t_24 += __pyx_pybuffernd_left.diminfo[0].shape; if (unlikely(__pyx_t_24 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_24 >= __pyx_pybuffernd_left.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7567; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_lval = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_left.rcbuffer->pybuffer.buf, __pyx_t_24, __pyx_pybuffernd_left.diminfo[0].strides)); /* "pandas/src/generated.pyx":7568 * * lval = left[i] * rval = right[j] # <<<<<<<<<<<<<< * * if lval == rval: */ __pyx_t_25 = __pyx_v_j; __pyx_t_3 = -1; if (__pyx_t_25 < 0) { __pyx_t_25 += __pyx_pybuffernd_right.diminfo[0].shape; if (unlikely(__pyx_t_25 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_25 >= __pyx_pybuffernd_right.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7568; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_rval = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_right.rcbuffer->pybuffer.buf, __pyx_t_25, __pyx_pybuffernd_right.diminfo[0].strides)); /* "pandas/src/generated.pyx":7570 * rval = right[j] * * if lval == rval: # <<<<<<<<<<<<<< * lindexer[count] = i * rindexer[count] = j */ __pyx_t_7 = ((__pyx_v_lval == __pyx_v_rval) != 0); if (__pyx_t_7) { /* "pandas/src/generated.pyx":7571 * * if lval == rval: * lindexer[count] = i # <<<<<<<<<<<<<< * rindexer[count] = j * result[count] = lval */ __pyx_t_26 = __pyx_v_count; __pyx_t_3 = -1; if (__pyx_t_26 < 0) { __pyx_t_26 += __pyx_pybuffernd_lindexer.diminfo[0].shape; if (unlikely(__pyx_t_26 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_26 >= __pyx_pybuffernd_lindexer.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7571; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_lindexer.rcbuffer->pybuffer.buf, __pyx_t_26, __pyx_pybuffernd_lindexer.diminfo[0].strides) = __pyx_v_i; /* "pandas/src/generated.pyx":7572 * if lval == rval: * lindexer[count] = i * rindexer[count] = j # <<<<<<<<<<<<<< * result[count] = lval * count += 1 */ __pyx_t_27 = __pyx_v_count; __pyx_t_3 = -1; if (__pyx_t_27 < 0) { __pyx_t_27 += __pyx_pybuffernd_rindexer.diminfo[0].shape; if (unlikely(__pyx_t_27 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_27 >= __pyx_pybuffernd_rindexer.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7572; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_rindexer.rcbuffer->pybuffer.buf, __pyx_t_27, __pyx_pybuffernd_rindexer.diminfo[0].strides) = __pyx_v_j; /* "pandas/src/generated.pyx":7573 * lindexer[count] = i * rindexer[count] = j * result[count] = lval # <<<<<<<<<<<<<< * count += 1 * if i < nleft - 1: */ __pyx_t_28 = __pyx_v_count; __pyx_t_3 = -1; if (__pyx_t_28 < 0) { __pyx_t_28 += __pyx_pybuffernd_result.diminfo[0].shape; if (unlikely(__pyx_t_28 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_28 >= __pyx_pybuffernd_result.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7573; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_28, __pyx_pybuffernd_result.diminfo[0].strides) = __pyx_v_lval; /* "pandas/src/generated.pyx":7574 * rindexer[count] = j * result[count] = lval * count += 1 # <<<<<<<<<<<<<< * if i < nleft - 1: * if j < nright - 1 and right[j + 1] == rval: */ __pyx_v_count = (__pyx_v_count + 1); /* "pandas/src/generated.pyx":7575 * result[count] = lval * count += 1 * if i < nleft - 1: # <<<<<<<<<<<<<< * if j < nright - 1 and right[j + 1] == rval: * j += 1 */ __pyx_t_7 = ((__pyx_v_i < (__pyx_v_nleft - 1)) != 0); if (__pyx_t_7) { /* "pandas/src/generated.pyx":7576 * count += 1 * if i < nleft - 1: * if j < nright - 1 and right[j + 1] == rval: # <<<<<<<<<<<<<< * j += 1 * else: */ __pyx_t_7 = ((__pyx_v_j < (__pyx_v_nright - 1)) != 0); if (__pyx_t_7) { __pyx_t_29 = (__pyx_v_j + 1); __pyx_t_3 = -1; if (__pyx_t_29 < 0) { __pyx_t_29 += __pyx_pybuffernd_right.diminfo[0].shape; if (unlikely(__pyx_t_29 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_29 >= __pyx_pybuffernd_right.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7576; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_2 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_right.rcbuffer->pybuffer.buf, __pyx_t_29, __pyx_pybuffernd_right.diminfo[0].strides)) == __pyx_v_rval) != 0); __pyx_t_6 = __pyx_t_2; } else { __pyx_t_6 = __pyx_t_7; } if (__pyx_t_6) { /* "pandas/src/generated.pyx":7577 * if i < nleft - 1: * if j < nright - 1 and right[j + 1] == rval: * j += 1 # <<<<<<<<<<<<<< * else: * i += 1 */ __pyx_v_j = (__pyx_v_j + 1); goto __pyx_L20; } /*else*/ { /* "pandas/src/generated.pyx":7579 * j += 1 * else: * i += 1 # <<<<<<<<<<<<<< * if left[i] != rval: * j += 1 */ __pyx_v_i = (__pyx_v_i + 1); /* "pandas/src/generated.pyx":7580 * else: * i += 1 * if left[i] != rval: # <<<<<<<<<<<<<< * j += 1 * elif j < nright - 1: */ __pyx_t_30 = __pyx_v_i; __pyx_t_3 = -1; if (__pyx_t_30 < 0) { __pyx_t_30 += __pyx_pybuffernd_left.diminfo[0].shape; if (unlikely(__pyx_t_30 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_30 >= __pyx_pybuffernd_left.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7580; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_6 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_left.rcbuffer->pybuffer.buf, __pyx_t_30, __pyx_pybuffernd_left.diminfo[0].strides)) != __pyx_v_rval) != 0); if (__pyx_t_6) { /* "pandas/src/generated.pyx":7581 * i += 1 * if left[i] != rval: * j += 1 # <<<<<<<<<<<<<< * elif j < nright - 1: * j += 1 */ __pyx_v_j = (__pyx_v_j + 1); goto __pyx_L21; } __pyx_L21:; } __pyx_L20:; goto __pyx_L19; } /* "pandas/src/generated.pyx":7582 * if left[i] != rval: * j += 1 * elif j < nright - 1: # <<<<<<<<<<<<<< * j += 1 * if lval != right[j]: */ __pyx_t_6 = ((__pyx_v_j < (__pyx_v_nright - 1)) != 0); if (__pyx_t_6) { /* "pandas/src/generated.pyx":7583 * j += 1 * elif j < nright - 1: * j += 1 # <<<<<<<<<<<<<< * if lval != right[j]: * i += 1 */ __pyx_v_j = (__pyx_v_j + 1); /* "pandas/src/generated.pyx":7584 * elif j < nright - 1: * j += 1 * if lval != right[j]: # <<<<<<<<<<<<<< * i += 1 * else: */ __pyx_t_31 = __pyx_v_j; __pyx_t_3 = -1; if (__pyx_t_31 < 0) { __pyx_t_31 += __pyx_pybuffernd_right.diminfo[0].shape; if (unlikely(__pyx_t_31 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_31 >= __pyx_pybuffernd_right.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7584; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_6 = ((__pyx_v_lval != (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_right.rcbuffer->pybuffer.buf, __pyx_t_31, __pyx_pybuffernd_right.diminfo[0].strides))) != 0); if (__pyx_t_6) { /* "pandas/src/generated.pyx":7585 * j += 1 * if lval != right[j]: * i += 1 # <<<<<<<<<<<<<< * else: * # end of the road */ __pyx_v_i = (__pyx_v_i + 1); goto __pyx_L22; } __pyx_L22:; goto __pyx_L19; } /*else*/ { /* "pandas/src/generated.pyx":7588 * else: * # end of the road * break # <<<<<<<<<<<<<< * elif lval < rval: * lindexer[count] = i */ goto __pyx_L14_break; } __pyx_L19:; goto __pyx_L18; } /* "pandas/src/generated.pyx":7589 * # end of the road * break * elif lval < rval: # <<<<<<<<<<<<<< * lindexer[count] = i * rindexer[count] = -1 */ __pyx_t_6 = ((__pyx_v_lval < __pyx_v_rval) != 0); if (__pyx_t_6) { /* "pandas/src/generated.pyx":7590 * break * elif lval < rval: * lindexer[count] = i # <<<<<<<<<<<<<< * rindexer[count] = -1 * result[count] = left[i] */ __pyx_t_32 = __pyx_v_count; __pyx_t_3 = -1; if (__pyx_t_32 < 0) { __pyx_t_32 += __pyx_pybuffernd_lindexer.diminfo[0].shape; if (unlikely(__pyx_t_32 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_32 >= __pyx_pybuffernd_lindexer.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7590; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_lindexer.rcbuffer->pybuffer.buf, __pyx_t_32, __pyx_pybuffernd_lindexer.diminfo[0].strides) = __pyx_v_i; /* "pandas/src/generated.pyx":7591 * elif lval < rval: * lindexer[count] = i * rindexer[count] = -1 # <<<<<<<<<<<<<< * result[count] = left[i] * count += 1 */ __pyx_t_33 = __pyx_v_count; __pyx_t_3 = -1; if (__pyx_t_33 < 0) { __pyx_t_33 += __pyx_pybuffernd_rindexer.diminfo[0].shape; if (unlikely(__pyx_t_33 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_33 >= __pyx_pybuffernd_rindexer.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7591; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_rindexer.rcbuffer->pybuffer.buf, __pyx_t_33, __pyx_pybuffernd_rindexer.diminfo[0].strides) = -1; /* "pandas/src/generated.pyx":7592 * lindexer[count] = i * rindexer[count] = -1 * result[count] = left[i] # <<<<<<<<<<<<<< * count += 1 * i += 1 */ __pyx_t_34 = __pyx_v_i; __pyx_t_3 = -1; if (__pyx_t_34 < 0) { __pyx_t_34 += __pyx_pybuffernd_left.diminfo[0].shape; if (unlikely(__pyx_t_34 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_34 >= __pyx_pybuffernd_left.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7592; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_35 = __pyx_v_count; __pyx_t_3 = -1; if (__pyx_t_35 < 0) { __pyx_t_35 += __pyx_pybuffernd_result.diminfo[0].shape; if (unlikely(__pyx_t_35 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_35 >= __pyx_pybuffernd_result.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7592; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_35, __pyx_pybuffernd_result.diminfo[0].strides) = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_left.rcbuffer->pybuffer.buf, __pyx_t_34, __pyx_pybuffernd_left.diminfo[0].strides)); /* "pandas/src/generated.pyx":7593 * rindexer[count] = -1 * result[count] = left[i] * count += 1 # <<<<<<<<<<<<<< * i += 1 * else: */ __pyx_v_count = (__pyx_v_count + 1); /* "pandas/src/generated.pyx":7594 * result[count] = left[i] * count += 1 * i += 1 # <<<<<<<<<<<<<< * else: * j += 1 */ __pyx_v_i = (__pyx_v_i + 1); goto __pyx_L18; } /*else*/ { /* "pandas/src/generated.pyx":7596 * i += 1 * else: * j += 1 # <<<<<<<<<<<<<< * * return result, lindexer, rindexer */ __pyx_v_j = (__pyx_v_j + 1); } __pyx_L18:; } __pyx_L14_break:; goto __pyx_L12; } __pyx_L12:; /* "pandas/src/generated.pyx":7598 * j += 1 * * return result, lindexer, rindexer # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_11 = PyTuple_New(3); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7598; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __Pyx_INCREF(((PyObject *)__pyx_v_result)); PyTuple_SET_ITEM(__pyx_t_11, 0, ((PyObject *)__pyx_v_result)); __Pyx_GIVEREF(((PyObject *)__pyx_v_result)); __Pyx_INCREF(((PyObject *)__pyx_v_lindexer)); PyTuple_SET_ITEM(__pyx_t_11, 1, ((PyObject *)__pyx_v_lindexer)); __Pyx_GIVEREF(((PyObject *)__pyx_v_lindexer)); __Pyx_INCREF(((PyObject *)__pyx_v_rindexer)); PyTuple_SET_ITEM(__pyx_t_11, 2, ((PyObject *)__pyx_v_rindexer)); __Pyx_GIVEREF(((PyObject *)__pyx_v_rindexer)); __pyx_r = __pyx_t_11; __pyx_t_11 = 0; goto __pyx_L0; /* "pandas/src/generated.pyx":7499 * * * def left_join_indexer_int32(ndarray[int32_t] left, # <<<<<<<<<<<<<< * ndarray[int32_t] right): * ''' */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_10); __Pyx_XDECREF(__pyx_t_11); __Pyx_XDECREF(__pyx_t_12); __Pyx_XDECREF(__pyx_t_13); __Pyx_XDECREF(__pyx_t_14); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_left.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_lindexer.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_right.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_rindexer.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.left_join_indexer_int32", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_left.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_lindexer.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_right.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_rindexer.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_lindexer); __Pyx_XDECREF((PyObject *)__pyx_v_rindexer); __Pyx_XDECREF((PyObject *)__pyx_v_result); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":7601 * * * def left_join_indexer_int64(ndarray[int64_t] left, # <<<<<<<<<<<<<< * ndarray[int64_t] right): * ''' */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_473left_join_indexer_int64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6pandas_5algos_472left_join_indexer_int64[] = "\n Two-pass algorithm for monotonic indexes. Handles many-to-one merges\n "; static PyMethodDef __pyx_mdef_6pandas_5algos_473left_join_indexer_int64 = {__Pyx_NAMESTR("left_join_indexer_int64"), (PyCFunction)__pyx_pw_6pandas_5algos_473left_join_indexer_int64, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_5algos_472left_join_indexer_int64)}; static PyObject *__pyx_pw_6pandas_5algos_473left_join_indexer_int64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_left = 0; PyArrayObject *__pyx_v_right = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("left_join_indexer_int64 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_left,&__pyx_n_s_right,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_left)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_right)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("left_join_indexer_int64", 1, 2, 2, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7601; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "left_join_indexer_int64") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7601; __pyx_clineno = __LINE__; goto __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_left = ((PyArrayObject *)values[0]); __pyx_v_right = ((PyArrayObject *)values[1]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("left_join_indexer_int64", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7601; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.left_join_indexer_int64", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_left), __pyx_ptype_5numpy_ndarray, 1, "left", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7601; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_right), __pyx_ptype_5numpy_ndarray, 1, "right", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7602; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_472left_join_indexer_int64(__pyx_self, __pyx_v_left, __pyx_v_right); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5algos_472left_join_indexer_int64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_left, PyArrayObject *__pyx_v_right) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_nright; Py_ssize_t __pyx_v_nleft; Py_ssize_t __pyx_v_count; __pyx_t_5numpy_int64_t __pyx_v_lval; __pyx_t_5numpy_int64_t __pyx_v_rval; PyArrayObject *__pyx_v_lindexer = 0; PyArrayObject *__pyx_v_rindexer = 0; PyArrayObject *__pyx_v_result = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_left; __Pyx_Buffer __pyx_pybuffer_left; __Pyx_LocalBuf_ND __pyx_pybuffernd_lindexer; __Pyx_Buffer __pyx_pybuffer_lindexer; __Pyx_LocalBuf_ND __pyx_pybuffernd_result; __Pyx_Buffer __pyx_pybuffer_result; __Pyx_LocalBuf_ND __pyx_pybuffernd_right; __Pyx_Buffer __pyx_pybuffer_right; __Pyx_LocalBuf_ND __pyx_pybuffernd_rindexer; __Pyx_Buffer __pyx_pybuffer_rindexer; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; int __pyx_t_2; int __pyx_t_3; Py_ssize_t __pyx_t_4; Py_ssize_t __pyx_t_5; int __pyx_t_6; int __pyx_t_7; Py_ssize_t __pyx_t_8; Py_ssize_t __pyx_t_9; PyObject *__pyx_t_10 = NULL; PyObject *__pyx_t_11 = NULL; PyObject *__pyx_t_12 = NULL; PyObject *__pyx_t_13 = NULL; PyObject *__pyx_t_14 = NULL; PyArrayObject *__pyx_t_15 = NULL; PyObject *__pyx_t_16 = NULL; PyObject *__pyx_t_17 = NULL; PyObject *__pyx_t_18 = NULL; PyArrayObject *__pyx_t_19 = NULL; 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("left_join_indexer_int64", 0); __pyx_pybuffer_lindexer.pybuffer.buf = NULL; __pyx_pybuffer_lindexer.refcount = 0; __pyx_pybuffernd_lindexer.data = NULL; __pyx_pybuffernd_lindexer.rcbuffer = &__pyx_pybuffer_lindexer; __pyx_pybuffer_rindexer.pybuffer.buf = NULL; __pyx_pybuffer_rindexer.refcount = 0; __pyx_pybuffernd_rindexer.data = NULL; __pyx_pybuffernd_rindexer.rcbuffer = &__pyx_pybuffer_rindexer; __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_left.pybuffer.buf = NULL; __pyx_pybuffer_left.refcount = 0; __pyx_pybuffernd_left.data = NULL; __pyx_pybuffernd_left.rcbuffer = &__pyx_pybuffer_left; __pyx_pybuffer_right.pybuffer.buf = NULL; __pyx_pybuffer_right.refcount = 0; __pyx_pybuffernd_right.data = NULL; __pyx_pybuffernd_right.rcbuffer = &__pyx_pybuffer_right; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_left.rcbuffer->pybuffer, (PyObject*)__pyx_v_left, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7601; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_left.diminfo[0].strides = __pyx_pybuffernd_left.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_left.diminfo[0].shape = __pyx_pybuffernd_left.rcbuffer->pybuffer.shape[0]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_right.rcbuffer->pybuffer, (PyObject*)__pyx_v_right, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7601; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_right.diminfo[0].strides = __pyx_pybuffernd_right.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_right.diminfo[0].shape = __pyx_pybuffernd_right.rcbuffer->pybuffer.shape[0]; /* "pandas/src/generated.pyx":7612 * ndarray[int64_t] result * * nleft = len(left) # <<<<<<<<<<<<<< * nright = len(right) * */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_left)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7612; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_nleft = __pyx_t_1; /* "pandas/src/generated.pyx":7613 * * nleft = len(left) * nright = len(right) # <<<<<<<<<<<<<< * * i = 0 */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_right)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7613; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_nright = __pyx_t_1; /* "pandas/src/generated.pyx":7615 * nright = len(right) * * i = 0 # <<<<<<<<<<<<<< * j = 0 * count = 0 */ __pyx_v_i = 0; /* "pandas/src/generated.pyx":7616 * * i = 0 * j = 0 # <<<<<<<<<<<<<< * count = 0 * if nleft > 0: */ __pyx_v_j = 0; /* "pandas/src/generated.pyx":7617 * i = 0 * j = 0 * count = 0 # <<<<<<<<<<<<<< * if nleft > 0: * while i < nleft: */ __pyx_v_count = 0; /* "pandas/src/generated.pyx":7618 * j = 0 * count = 0 * if nleft > 0: # <<<<<<<<<<<<<< * while i < nleft: * if j == nright: */ __pyx_t_2 = ((__pyx_v_nleft > 0) != 0); if (__pyx_t_2) { /* "pandas/src/generated.pyx":7619 * count = 0 * if nleft > 0: * while i < nleft: # <<<<<<<<<<<<<< * if j == nright: * count += nleft - i */ while (1) { __pyx_t_2 = ((__pyx_v_i < __pyx_v_nleft) != 0); if (!__pyx_t_2) break; /* "pandas/src/generated.pyx":7620 * if nleft > 0: * while i < nleft: * if j == nright: # <<<<<<<<<<<<<< * count += nleft - i * break */ __pyx_t_2 = ((__pyx_v_j == __pyx_v_nright) != 0); if (__pyx_t_2) { /* "pandas/src/generated.pyx":7621 * while i < nleft: * if j == nright: * count += nleft - i # <<<<<<<<<<<<<< * break * */ __pyx_v_count = (__pyx_v_count + (__pyx_v_nleft - __pyx_v_i)); /* "pandas/src/generated.pyx":7622 * if j == nright: * count += nleft - i * break # <<<<<<<<<<<<<< * * lval = left[i] */ goto __pyx_L5_break; } /* "pandas/src/generated.pyx":7624 * break * * lval = left[i] # <<<<<<<<<<<<<< * rval = right[j] * */ __pyx_t_1 = __pyx_v_i; __pyx_t_3 = -1; if (__pyx_t_1 < 0) { __pyx_t_1 += __pyx_pybuffernd_left.diminfo[0].shape; if (unlikely(__pyx_t_1 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_1 >= __pyx_pybuffernd_left.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7624; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_lval = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_left.rcbuffer->pybuffer.buf, __pyx_t_1, __pyx_pybuffernd_left.diminfo[0].strides)); /* "pandas/src/generated.pyx":7625 * * lval = left[i] * rval = right[j] # <<<<<<<<<<<<<< * * if lval == rval: */ __pyx_t_4 = __pyx_v_j; __pyx_t_3 = -1; if (__pyx_t_4 < 0) { __pyx_t_4 += __pyx_pybuffernd_right.diminfo[0].shape; if (unlikely(__pyx_t_4 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_4 >= __pyx_pybuffernd_right.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7625; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_rval = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_right.rcbuffer->pybuffer.buf, __pyx_t_4, __pyx_pybuffernd_right.diminfo[0].strides)); /* "pandas/src/generated.pyx":7627 * rval = right[j] * * if lval == rval: # <<<<<<<<<<<<<< * count += 1 * if i < nleft - 1: */ __pyx_t_2 = ((__pyx_v_lval == __pyx_v_rval) != 0); if (__pyx_t_2) { /* "pandas/src/generated.pyx":7628 * * if lval == rval: * count += 1 # <<<<<<<<<<<<<< * if i < nleft - 1: * if j < nright - 1 and right[j + 1] == rval: */ __pyx_v_count = (__pyx_v_count + 1); /* "pandas/src/generated.pyx":7629 * if lval == rval: * count += 1 * if i < nleft - 1: # <<<<<<<<<<<<<< * if j < nright - 1 and right[j + 1] == rval: * j += 1 */ __pyx_t_2 = ((__pyx_v_i < (__pyx_v_nleft - 1)) != 0); if (__pyx_t_2) { /* "pandas/src/generated.pyx":7630 * count += 1 * if i < nleft - 1: * if j < nright - 1 and right[j + 1] == rval: # <<<<<<<<<<<<<< * j += 1 * else: */ __pyx_t_2 = ((__pyx_v_j < (__pyx_v_nright - 1)) != 0); if (__pyx_t_2) { __pyx_t_5 = (__pyx_v_j + 1); __pyx_t_3 = -1; if (__pyx_t_5 < 0) { __pyx_t_5 += __pyx_pybuffernd_right.diminfo[0].shape; if (unlikely(__pyx_t_5 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_5 >= __pyx_pybuffernd_right.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7630; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_6 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_right.rcbuffer->pybuffer.buf, __pyx_t_5, __pyx_pybuffernd_right.diminfo[0].strides)) == __pyx_v_rval) != 0); __pyx_t_7 = __pyx_t_6; } else { __pyx_t_7 = __pyx_t_2; } if (__pyx_t_7) { /* "pandas/src/generated.pyx":7631 * if i < nleft - 1: * if j < nright - 1 and right[j + 1] == rval: * j += 1 # <<<<<<<<<<<<<< * else: * i += 1 */ __pyx_v_j = (__pyx_v_j + 1); goto __pyx_L9; } /*else*/ { /* "pandas/src/generated.pyx":7633 * j += 1 * else: * i += 1 # <<<<<<<<<<<<<< * if left[i] != rval: * j += 1 */ __pyx_v_i = (__pyx_v_i + 1); /* "pandas/src/generated.pyx":7634 * else: * i += 1 * if left[i] != rval: # <<<<<<<<<<<<<< * j += 1 * elif j < nright - 1: */ __pyx_t_8 = __pyx_v_i; __pyx_t_3 = -1; if (__pyx_t_8 < 0) { __pyx_t_8 += __pyx_pybuffernd_left.diminfo[0].shape; if (unlikely(__pyx_t_8 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_8 >= __pyx_pybuffernd_left.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7634; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_7 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_left.rcbuffer->pybuffer.buf, __pyx_t_8, __pyx_pybuffernd_left.diminfo[0].strides)) != __pyx_v_rval) != 0); if (__pyx_t_7) { /* "pandas/src/generated.pyx":7635 * i += 1 * if left[i] != rval: * j += 1 # <<<<<<<<<<<<<< * elif j < nright - 1: * j += 1 */ __pyx_v_j = (__pyx_v_j + 1); goto __pyx_L10; } __pyx_L10:; } __pyx_L9:; goto __pyx_L8; } /* "pandas/src/generated.pyx":7636 * if left[i] != rval: * j += 1 * elif j < nright - 1: # <<<<<<<<<<<<<< * j += 1 * if lval != right[j]: */ __pyx_t_7 = ((__pyx_v_j < (__pyx_v_nright - 1)) != 0); if (__pyx_t_7) { /* "pandas/src/generated.pyx":7637 * j += 1 * elif j < nright - 1: * j += 1 # <<<<<<<<<<<<<< * if lval != right[j]: * i += 1 */ __pyx_v_j = (__pyx_v_j + 1); /* "pandas/src/generated.pyx":7638 * elif j < nright - 1: * j += 1 * if lval != right[j]: # <<<<<<<<<<<<<< * i += 1 * else: */ __pyx_t_9 = __pyx_v_j; __pyx_t_3 = -1; if (__pyx_t_9 < 0) { __pyx_t_9 += __pyx_pybuffernd_right.diminfo[0].shape; if (unlikely(__pyx_t_9 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_9 >= __pyx_pybuffernd_right.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7638; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_7 = ((__pyx_v_lval != (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_right.rcbuffer->pybuffer.buf, __pyx_t_9, __pyx_pybuffernd_right.diminfo[0].strides))) != 0); if (__pyx_t_7) { /* "pandas/src/generated.pyx":7639 * j += 1 * if lval != right[j]: * i += 1 # <<<<<<<<<<<<<< * else: * # end of the road */ __pyx_v_i = (__pyx_v_i + 1); goto __pyx_L11; } __pyx_L11:; goto __pyx_L8; } /*else*/ { /* "pandas/src/generated.pyx":7642 * else: * # end of the road * break # <<<<<<<<<<<<<< * elif lval < rval: * count += 1 */ goto __pyx_L5_break; } __pyx_L8:; goto __pyx_L7; } /* "pandas/src/generated.pyx":7643 * # end of the road * break * elif lval < rval: # <<<<<<<<<<<<<< * count += 1 * i += 1 */ __pyx_t_7 = ((__pyx_v_lval < __pyx_v_rval) != 0); if (__pyx_t_7) { /* "pandas/src/generated.pyx":7644 * break * elif lval < rval: * count += 1 # <<<<<<<<<<<<<< * i += 1 * else: */ __pyx_v_count = (__pyx_v_count + 1); /* "pandas/src/generated.pyx":7645 * elif lval < rval: * count += 1 * i += 1 # <<<<<<<<<<<<<< * else: * j += 1 */ __pyx_v_i = (__pyx_v_i + 1); goto __pyx_L7; } /*else*/ { /* "pandas/src/generated.pyx":7647 * i += 1 * else: * j += 1 # <<<<<<<<<<<<<< * * # do it again now that result size is known */ __pyx_v_j = (__pyx_v_j + 1); } __pyx_L7:; } __pyx_L5_break:; goto __pyx_L3; } __pyx_L3:; /* "pandas/src/generated.pyx":7651 * # do it again now that result size is known * * lindexer = np.empty(count, dtype=np.int64) # <<<<<<<<<<<<<< * rindexer = np.empty(count, dtype=np.int64) * result = np.empty(count, dtype=np.int64) */ __pyx_t_10 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7651; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_empty); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7651; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_t_10 = PyInt_FromSsize_t(__pyx_v_count); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7651; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __pyx_t_12 = PyTuple_New(1); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7651; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_10); __Pyx_GIVEREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_t_10 = PyDict_New(); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7651; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __pyx_t_13 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7651; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_t_13, __pyx_n_s_int64); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7651; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_14); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; if (PyDict_SetItem(__pyx_t_10, __pyx_n_s_dtype, __pyx_t_14) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7651; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; __pyx_t_14 = PyObject_Call(__pyx_t_11, __pyx_t_12, __pyx_t_10); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7651; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_14); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; if (!(likely(((__pyx_t_14) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_14, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7651; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_15 = ((PyArrayObject *)__pyx_t_14); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_lindexer.rcbuffer->pybuffer); __pyx_t_3 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_lindexer.rcbuffer->pybuffer, (PyObject*)__pyx_t_15, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_3 < 0)) { PyErr_Fetch(&__pyx_t_16, &__pyx_t_17, &__pyx_t_18); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_lindexer.rcbuffer->pybuffer, (PyObject*)__pyx_v_lindexer, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_16); Py_XDECREF(__pyx_t_17); Py_XDECREF(__pyx_t_18); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_16, __pyx_t_17, __pyx_t_18); } } __pyx_pybuffernd_lindexer.diminfo[0].strides = __pyx_pybuffernd_lindexer.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_lindexer.diminfo[0].shape = __pyx_pybuffernd_lindexer.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7651; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_15 = 0; __pyx_v_lindexer = ((PyArrayObject *)__pyx_t_14); __pyx_t_14 = 0; /* "pandas/src/generated.pyx":7652 * * lindexer = np.empty(count, dtype=np.int64) * rindexer = np.empty(count, dtype=np.int64) # <<<<<<<<<<<<<< * result = np.empty(count, dtype=np.int64) * */ __pyx_t_14 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7652; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_14); __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_14, __pyx_n_s_empty); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7652; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; __pyx_t_14 = PyInt_FromSsize_t(__pyx_v_count); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7652; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_14); __pyx_t_12 = PyTuple_New(1); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7652; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_14); __Pyx_GIVEREF(__pyx_t_14); __pyx_t_14 = 0; __pyx_t_14 = PyDict_New(); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7652; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_14); __pyx_t_11 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7652; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_int64); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7652; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; if (PyDict_SetItem(__pyx_t_14, __pyx_n_s_dtype, __pyx_t_13) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7652; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_13 = PyObject_Call(__pyx_t_10, __pyx_t_12, __pyx_t_14); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7652; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; if (!(likely(((__pyx_t_13) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_13, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7652; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_15 = ((PyArrayObject *)__pyx_t_13); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_rindexer.rcbuffer->pybuffer); __pyx_t_3 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_rindexer.rcbuffer->pybuffer, (PyObject*)__pyx_t_15, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_3 < 0)) { PyErr_Fetch(&__pyx_t_18, &__pyx_t_17, &__pyx_t_16); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_rindexer.rcbuffer->pybuffer, (PyObject*)__pyx_v_rindexer, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_18); Py_XDECREF(__pyx_t_17); Py_XDECREF(__pyx_t_16); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_18, __pyx_t_17, __pyx_t_16); } } __pyx_pybuffernd_rindexer.diminfo[0].strides = __pyx_pybuffernd_rindexer.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_rindexer.diminfo[0].shape = __pyx_pybuffernd_rindexer.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7652; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_15 = 0; __pyx_v_rindexer = ((PyArrayObject *)__pyx_t_13); __pyx_t_13 = 0; /* "pandas/src/generated.pyx":7653 * lindexer = np.empty(count, dtype=np.int64) * rindexer = np.empty(count, dtype=np.int64) * result = np.empty(count, dtype=np.int64) # <<<<<<<<<<<<<< * * i = 0 */ __pyx_t_13 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7653; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_t_13, __pyx_n_s_empty); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7653; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_14); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_13 = PyInt_FromSsize_t(__pyx_v_count); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7653; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __pyx_t_12 = PyTuple_New(1); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7653; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_13); __Pyx_GIVEREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_13 = PyDict_New(); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7653; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __pyx_t_10 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7653; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_int64); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7653; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; if (PyDict_SetItem(__pyx_t_13, __pyx_n_s_dtype, __pyx_t_11) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7653; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __pyx_t_11 = PyObject_Call(__pyx_t_14, __pyx_t_12, __pyx_t_13); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7653; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; if (!(likely(((__pyx_t_11) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_11, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7653; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_19 = ((PyArrayObject *)__pyx_t_11); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __pyx_t_3 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_t_19, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_3 < 0)) { PyErr_Fetch(&__pyx_t_16, &__pyx_t_17, &__pyx_t_18); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_v_result, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_16); Py_XDECREF(__pyx_t_17); Py_XDECREF(__pyx_t_18); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_16, __pyx_t_17, __pyx_t_18); } } __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_3 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7653; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_19 = 0; __pyx_v_result = ((PyArrayObject *)__pyx_t_11); __pyx_t_11 = 0; /* "pandas/src/generated.pyx":7655 * result = np.empty(count, dtype=np.int64) * * i = 0 # <<<<<<<<<<<<<< * j = 0 * count = 0 */ __pyx_v_i = 0; /* "pandas/src/generated.pyx":7656 * * i = 0 * j = 0 # <<<<<<<<<<<<<< * count = 0 * if nleft > 0: */ __pyx_v_j = 0; /* "pandas/src/generated.pyx":7657 * i = 0 * j = 0 * count = 0 # <<<<<<<<<<<<<< * if nleft > 0: * while i < nleft: */ __pyx_v_count = 0; /* "pandas/src/generated.pyx":7658 * j = 0 * count = 0 * if nleft > 0: # <<<<<<<<<<<<<< * while i < nleft: * if j == nright: */ __pyx_t_7 = ((__pyx_v_nleft > 0) != 0); if (__pyx_t_7) { /* "pandas/src/generated.pyx":7659 * count = 0 * if nleft > 0: * while i < nleft: # <<<<<<<<<<<<<< * if j == nright: * while i < nleft: */ while (1) { __pyx_t_7 = ((__pyx_v_i < __pyx_v_nleft) != 0); if (!__pyx_t_7) break; /* "pandas/src/generated.pyx":7660 * if nleft > 0: * while i < nleft: * if j == nright: # <<<<<<<<<<<<<< * while i < nleft: * lindexer[count] = i */ __pyx_t_7 = ((__pyx_v_j == __pyx_v_nright) != 0); if (__pyx_t_7) { /* "pandas/src/generated.pyx":7661 * while i < nleft: * if j == nright: * while i < nleft: # <<<<<<<<<<<<<< * lindexer[count] = i * rindexer[count] = -1 */ while (1) { __pyx_t_7 = ((__pyx_v_i < __pyx_v_nleft) != 0); if (!__pyx_t_7) break; /* "pandas/src/generated.pyx":7662 * if j == nright: * while i < nleft: * lindexer[count] = i # <<<<<<<<<<<<<< * rindexer[count] = -1 * result[count] = left[i] */ __pyx_t_20 = __pyx_v_count; __pyx_t_3 = -1; if (__pyx_t_20 < 0) { __pyx_t_20 += __pyx_pybuffernd_lindexer.diminfo[0].shape; if (unlikely(__pyx_t_20 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_20 >= __pyx_pybuffernd_lindexer.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7662; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_lindexer.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_lindexer.diminfo[0].strides) = __pyx_v_i; /* "pandas/src/generated.pyx":7663 * while i < nleft: * lindexer[count] = i * rindexer[count] = -1 # <<<<<<<<<<<<<< * result[count] = left[i] * i += 1 */ __pyx_t_21 = __pyx_v_count; __pyx_t_3 = -1; if (__pyx_t_21 < 0) { __pyx_t_21 += __pyx_pybuffernd_rindexer.diminfo[0].shape; if (unlikely(__pyx_t_21 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_21 >= __pyx_pybuffernd_rindexer.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7663; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_rindexer.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_rindexer.diminfo[0].strides) = -1; /* "pandas/src/generated.pyx":7664 * lindexer[count] = i * rindexer[count] = -1 * result[count] = left[i] # <<<<<<<<<<<<<< * i += 1 * count += 1 */ __pyx_t_22 = __pyx_v_i; __pyx_t_3 = -1; if (__pyx_t_22 < 0) { __pyx_t_22 += __pyx_pybuffernd_left.diminfo[0].shape; if (unlikely(__pyx_t_22 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_22 >= __pyx_pybuffernd_left.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7664; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_23 = __pyx_v_count; __pyx_t_3 = -1; if (__pyx_t_23 < 0) { __pyx_t_23 += __pyx_pybuffernd_result.diminfo[0].shape; if (unlikely(__pyx_t_23 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_23 >= __pyx_pybuffernd_result.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7664; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_23, __pyx_pybuffernd_result.diminfo[0].strides) = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_left.rcbuffer->pybuffer.buf, __pyx_t_22, __pyx_pybuffernd_left.diminfo[0].strides)); /* "pandas/src/generated.pyx":7665 * rindexer[count] = -1 * result[count] = left[i] * i += 1 # <<<<<<<<<<<<<< * count += 1 * break */ __pyx_v_i = (__pyx_v_i + 1); /* "pandas/src/generated.pyx":7666 * result[count] = left[i] * i += 1 * count += 1 # <<<<<<<<<<<<<< * break * */ __pyx_v_count = (__pyx_v_count + 1); } /* "pandas/src/generated.pyx":7667 * i += 1 * count += 1 * break # <<<<<<<<<<<<<< * * lval = left[i] */ goto __pyx_L14_break; } /* "pandas/src/generated.pyx":7669 * break * * lval = left[i] # <<<<<<<<<<<<<< * rval = right[j] * */ __pyx_t_24 = __pyx_v_i; __pyx_t_3 = -1; if (__pyx_t_24 < 0) { __pyx_t_24 += __pyx_pybuffernd_left.diminfo[0].shape; if (unlikely(__pyx_t_24 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_24 >= __pyx_pybuffernd_left.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7669; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_lval = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_left.rcbuffer->pybuffer.buf, __pyx_t_24, __pyx_pybuffernd_left.diminfo[0].strides)); /* "pandas/src/generated.pyx":7670 * * lval = left[i] * rval = right[j] # <<<<<<<<<<<<<< * * if lval == rval: */ __pyx_t_25 = __pyx_v_j; __pyx_t_3 = -1; if (__pyx_t_25 < 0) { __pyx_t_25 += __pyx_pybuffernd_right.diminfo[0].shape; if (unlikely(__pyx_t_25 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_25 >= __pyx_pybuffernd_right.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7670; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_rval = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_right.rcbuffer->pybuffer.buf, __pyx_t_25, __pyx_pybuffernd_right.diminfo[0].strides)); /* "pandas/src/generated.pyx":7672 * rval = right[j] * * if lval == rval: # <<<<<<<<<<<<<< * lindexer[count] = i * rindexer[count] = j */ __pyx_t_7 = ((__pyx_v_lval == __pyx_v_rval) != 0); if (__pyx_t_7) { /* "pandas/src/generated.pyx":7673 * * if lval == rval: * lindexer[count] = i # <<<<<<<<<<<<<< * rindexer[count] = j * result[count] = lval */ __pyx_t_26 = __pyx_v_count; __pyx_t_3 = -1; if (__pyx_t_26 < 0) { __pyx_t_26 += __pyx_pybuffernd_lindexer.diminfo[0].shape; if (unlikely(__pyx_t_26 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_26 >= __pyx_pybuffernd_lindexer.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7673; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_lindexer.rcbuffer->pybuffer.buf, __pyx_t_26, __pyx_pybuffernd_lindexer.diminfo[0].strides) = __pyx_v_i; /* "pandas/src/generated.pyx":7674 * if lval == rval: * lindexer[count] = i * rindexer[count] = j # <<<<<<<<<<<<<< * result[count] = lval * count += 1 */ __pyx_t_27 = __pyx_v_count; __pyx_t_3 = -1; if (__pyx_t_27 < 0) { __pyx_t_27 += __pyx_pybuffernd_rindexer.diminfo[0].shape; if (unlikely(__pyx_t_27 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_27 >= __pyx_pybuffernd_rindexer.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7674; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_rindexer.rcbuffer->pybuffer.buf, __pyx_t_27, __pyx_pybuffernd_rindexer.diminfo[0].strides) = __pyx_v_j; /* "pandas/src/generated.pyx":7675 * lindexer[count] = i * rindexer[count] = j * result[count] = lval # <<<<<<<<<<<<<< * count += 1 * if i < nleft - 1: */ __pyx_t_28 = __pyx_v_count; __pyx_t_3 = -1; if (__pyx_t_28 < 0) { __pyx_t_28 += __pyx_pybuffernd_result.diminfo[0].shape; if (unlikely(__pyx_t_28 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_28 >= __pyx_pybuffernd_result.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7675; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_28, __pyx_pybuffernd_result.diminfo[0].strides) = __pyx_v_lval; /* "pandas/src/generated.pyx":7676 * rindexer[count] = j * result[count] = lval * count += 1 # <<<<<<<<<<<<<< * if i < nleft - 1: * if j < nright - 1 and right[j + 1] == rval: */ __pyx_v_count = (__pyx_v_count + 1); /* "pandas/src/generated.pyx":7677 * result[count] = lval * count += 1 * if i < nleft - 1: # <<<<<<<<<<<<<< * if j < nright - 1 and right[j + 1] == rval: * j += 1 */ __pyx_t_7 = ((__pyx_v_i < (__pyx_v_nleft - 1)) != 0); if (__pyx_t_7) { /* "pandas/src/generated.pyx":7678 * count += 1 * if i < nleft - 1: * if j < nright - 1 and right[j + 1] == rval: # <<<<<<<<<<<<<< * j += 1 * else: */ __pyx_t_7 = ((__pyx_v_j < (__pyx_v_nright - 1)) != 0); if (__pyx_t_7) { __pyx_t_29 = (__pyx_v_j + 1); __pyx_t_3 = -1; if (__pyx_t_29 < 0) { __pyx_t_29 += __pyx_pybuffernd_right.diminfo[0].shape; if (unlikely(__pyx_t_29 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_29 >= __pyx_pybuffernd_right.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7678; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_2 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_right.rcbuffer->pybuffer.buf, __pyx_t_29, __pyx_pybuffernd_right.diminfo[0].strides)) == __pyx_v_rval) != 0); __pyx_t_6 = __pyx_t_2; } else { __pyx_t_6 = __pyx_t_7; } if (__pyx_t_6) { /* "pandas/src/generated.pyx":7679 * if i < nleft - 1: * if j < nright - 1 and right[j + 1] == rval: * j += 1 # <<<<<<<<<<<<<< * else: * i += 1 */ __pyx_v_j = (__pyx_v_j + 1); goto __pyx_L20; } /*else*/ { /* "pandas/src/generated.pyx":7681 * j += 1 * else: * i += 1 # <<<<<<<<<<<<<< * if left[i] != rval: * j += 1 */ __pyx_v_i = (__pyx_v_i + 1); /* "pandas/src/generated.pyx":7682 * else: * i += 1 * if left[i] != rval: # <<<<<<<<<<<<<< * j += 1 * elif j < nright - 1: */ __pyx_t_30 = __pyx_v_i; __pyx_t_3 = -1; if (__pyx_t_30 < 0) { __pyx_t_30 += __pyx_pybuffernd_left.diminfo[0].shape; if (unlikely(__pyx_t_30 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_30 >= __pyx_pybuffernd_left.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7682; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_6 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_left.rcbuffer->pybuffer.buf, __pyx_t_30, __pyx_pybuffernd_left.diminfo[0].strides)) != __pyx_v_rval) != 0); if (__pyx_t_6) { /* "pandas/src/generated.pyx":7683 * i += 1 * if left[i] != rval: * j += 1 # <<<<<<<<<<<<<< * elif j < nright - 1: * j += 1 */ __pyx_v_j = (__pyx_v_j + 1); goto __pyx_L21; } __pyx_L21:; } __pyx_L20:; goto __pyx_L19; } /* "pandas/src/generated.pyx":7684 * if left[i] != rval: * j += 1 * elif j < nright - 1: # <<<<<<<<<<<<<< * j += 1 * if lval != right[j]: */ __pyx_t_6 = ((__pyx_v_j < (__pyx_v_nright - 1)) != 0); if (__pyx_t_6) { /* "pandas/src/generated.pyx":7685 * j += 1 * elif j < nright - 1: * j += 1 # <<<<<<<<<<<<<< * if lval != right[j]: * i += 1 */ __pyx_v_j = (__pyx_v_j + 1); /* "pandas/src/generated.pyx":7686 * elif j < nright - 1: * j += 1 * if lval != right[j]: # <<<<<<<<<<<<<< * i += 1 * else: */ __pyx_t_31 = __pyx_v_j; __pyx_t_3 = -1; if (__pyx_t_31 < 0) { __pyx_t_31 += __pyx_pybuffernd_right.diminfo[0].shape; if (unlikely(__pyx_t_31 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_31 >= __pyx_pybuffernd_right.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7686; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_6 = ((__pyx_v_lval != (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_right.rcbuffer->pybuffer.buf, __pyx_t_31, __pyx_pybuffernd_right.diminfo[0].strides))) != 0); if (__pyx_t_6) { /* "pandas/src/generated.pyx":7687 * j += 1 * if lval != right[j]: * i += 1 # <<<<<<<<<<<<<< * else: * # end of the road */ __pyx_v_i = (__pyx_v_i + 1); goto __pyx_L22; } __pyx_L22:; goto __pyx_L19; } /*else*/ { /* "pandas/src/generated.pyx":7690 * else: * # end of the road * break # <<<<<<<<<<<<<< * elif lval < rval: * lindexer[count] = i */ goto __pyx_L14_break; } __pyx_L19:; goto __pyx_L18; } /* "pandas/src/generated.pyx":7691 * # end of the road * break * elif lval < rval: # <<<<<<<<<<<<<< * lindexer[count] = i * rindexer[count] = -1 */ __pyx_t_6 = ((__pyx_v_lval < __pyx_v_rval) != 0); if (__pyx_t_6) { /* "pandas/src/generated.pyx":7692 * break * elif lval < rval: * lindexer[count] = i # <<<<<<<<<<<<<< * rindexer[count] = -1 * result[count] = left[i] */ __pyx_t_32 = __pyx_v_count; __pyx_t_3 = -1; if (__pyx_t_32 < 0) { __pyx_t_32 += __pyx_pybuffernd_lindexer.diminfo[0].shape; if (unlikely(__pyx_t_32 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_32 >= __pyx_pybuffernd_lindexer.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7692; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_lindexer.rcbuffer->pybuffer.buf, __pyx_t_32, __pyx_pybuffernd_lindexer.diminfo[0].strides) = __pyx_v_i; /* "pandas/src/generated.pyx":7693 * elif lval < rval: * lindexer[count] = i * rindexer[count] = -1 # <<<<<<<<<<<<<< * result[count] = left[i] * count += 1 */ __pyx_t_33 = __pyx_v_count; __pyx_t_3 = -1; if (__pyx_t_33 < 0) { __pyx_t_33 += __pyx_pybuffernd_rindexer.diminfo[0].shape; if (unlikely(__pyx_t_33 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_33 >= __pyx_pybuffernd_rindexer.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7693; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_rindexer.rcbuffer->pybuffer.buf, __pyx_t_33, __pyx_pybuffernd_rindexer.diminfo[0].strides) = -1; /* "pandas/src/generated.pyx":7694 * lindexer[count] = i * rindexer[count] = -1 * result[count] = left[i] # <<<<<<<<<<<<<< * count += 1 * i += 1 */ __pyx_t_34 = __pyx_v_i; __pyx_t_3 = -1; if (__pyx_t_34 < 0) { __pyx_t_34 += __pyx_pybuffernd_left.diminfo[0].shape; if (unlikely(__pyx_t_34 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_34 >= __pyx_pybuffernd_left.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7694; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_35 = __pyx_v_count; __pyx_t_3 = -1; if (__pyx_t_35 < 0) { __pyx_t_35 += __pyx_pybuffernd_result.diminfo[0].shape; if (unlikely(__pyx_t_35 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_35 >= __pyx_pybuffernd_result.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7694; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_35, __pyx_pybuffernd_result.diminfo[0].strides) = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_left.rcbuffer->pybuffer.buf, __pyx_t_34, __pyx_pybuffernd_left.diminfo[0].strides)); /* "pandas/src/generated.pyx":7695 * rindexer[count] = -1 * result[count] = left[i] * count += 1 # <<<<<<<<<<<<<< * i += 1 * else: */ __pyx_v_count = (__pyx_v_count + 1); /* "pandas/src/generated.pyx":7696 * result[count] = left[i] * count += 1 * i += 1 # <<<<<<<<<<<<<< * else: * j += 1 */ __pyx_v_i = (__pyx_v_i + 1); goto __pyx_L18; } /*else*/ { /* "pandas/src/generated.pyx":7698 * i += 1 * else: * j += 1 # <<<<<<<<<<<<<< * * return result, lindexer, rindexer */ __pyx_v_j = (__pyx_v_j + 1); } __pyx_L18:; } __pyx_L14_break:; goto __pyx_L12; } __pyx_L12:; /* "pandas/src/generated.pyx":7700 * j += 1 * * return result, lindexer, rindexer # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_11 = PyTuple_New(3); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7700; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __Pyx_INCREF(((PyObject *)__pyx_v_result)); PyTuple_SET_ITEM(__pyx_t_11, 0, ((PyObject *)__pyx_v_result)); __Pyx_GIVEREF(((PyObject *)__pyx_v_result)); __Pyx_INCREF(((PyObject *)__pyx_v_lindexer)); PyTuple_SET_ITEM(__pyx_t_11, 1, ((PyObject *)__pyx_v_lindexer)); __Pyx_GIVEREF(((PyObject *)__pyx_v_lindexer)); __Pyx_INCREF(((PyObject *)__pyx_v_rindexer)); PyTuple_SET_ITEM(__pyx_t_11, 2, ((PyObject *)__pyx_v_rindexer)); __Pyx_GIVEREF(((PyObject *)__pyx_v_rindexer)); __pyx_r = __pyx_t_11; __pyx_t_11 = 0; goto __pyx_L0; /* "pandas/src/generated.pyx":7601 * * * def left_join_indexer_int64(ndarray[int64_t] left, # <<<<<<<<<<<<<< * ndarray[int64_t] right): * ''' */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_10); __Pyx_XDECREF(__pyx_t_11); __Pyx_XDECREF(__pyx_t_12); __Pyx_XDECREF(__pyx_t_13); __Pyx_XDECREF(__pyx_t_14); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_left.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_lindexer.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_right.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_rindexer.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.left_join_indexer_int64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_left.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_lindexer.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_right.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_rindexer.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_lindexer); __Pyx_XDECREF((PyObject *)__pyx_v_rindexer); __Pyx_XDECREF((PyObject *)__pyx_v_result); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":7705 * @cython.wraparound(False) * @cython.boundscheck(False) * def outer_join_indexer_float64(ndarray[float64_t] left, # <<<<<<<<<<<<<< * ndarray[float64_t] right): * cdef: */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_475outer_join_indexer_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_475outer_join_indexer_float64 = {__Pyx_NAMESTR("outer_join_indexer_float64"), (PyCFunction)__pyx_pw_6pandas_5algos_475outer_join_indexer_float64, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_475outer_join_indexer_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_left = 0; PyArrayObject *__pyx_v_right = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("outer_join_indexer_float64 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_left,&__pyx_n_s_right,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_left)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_right)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("outer_join_indexer_float64", 1, 2, 2, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7705; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "outer_join_indexer_float64") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7705; __pyx_clineno = __LINE__; goto __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_left = ((PyArrayObject *)values[0]); __pyx_v_right = ((PyArrayObject *)values[1]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("outer_join_indexer_float64", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7705; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.outer_join_indexer_float64", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_left), __pyx_ptype_5numpy_ndarray, 1, "left", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7705; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_right), __pyx_ptype_5numpy_ndarray, 1, "right", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7706; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_474outer_join_indexer_float64(__pyx_self, __pyx_v_left, __pyx_v_right); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5algos_474outer_join_indexer_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_left, PyArrayObject *__pyx_v_right) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_nright; Py_ssize_t __pyx_v_nleft; Py_ssize_t __pyx_v_count; __pyx_t_5numpy_float64_t __pyx_v_lval; __pyx_t_5numpy_float64_t __pyx_v_rval; PyArrayObject *__pyx_v_lindexer = 0; PyArrayObject *__pyx_v_rindexer = 0; PyArrayObject *__pyx_v_result = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_left; __Pyx_Buffer __pyx_pybuffer_left; __Pyx_LocalBuf_ND __pyx_pybuffernd_lindexer; __Pyx_Buffer __pyx_pybuffer_lindexer; __Pyx_LocalBuf_ND __pyx_pybuffernd_result; __Pyx_Buffer __pyx_pybuffer_result; __Pyx_LocalBuf_ND __pyx_pybuffernd_right; __Pyx_Buffer __pyx_pybuffer_right; __Pyx_LocalBuf_ND __pyx_pybuffernd_rindexer; __Pyx_Buffer __pyx_pybuffer_rindexer; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; int __pyx_t_2; Py_ssize_t __pyx_t_3; Py_ssize_t __pyx_t_4; int __pyx_t_5; int __pyx_t_6; Py_ssize_t __pyx_t_7; Py_ssize_t __pyx_t_8; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; PyObject *__pyx_t_11 = NULL; PyObject *__pyx_t_12 = NULL; PyObject *__pyx_t_13 = NULL; PyArrayObject *__pyx_t_14 = NULL; int __pyx_t_15; PyObject *__pyx_t_16 = NULL; PyObject *__pyx_t_17 = NULL; PyObject *__pyx_t_18 = NULL; PyArrayObject *__pyx_t_19 = NULL; 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; Py_ssize_t __pyx_t_37; Py_ssize_t __pyx_t_38; Py_ssize_t __pyx_t_39; Py_ssize_t __pyx_t_40; Py_ssize_t __pyx_t_41; Py_ssize_t __pyx_t_42; Py_ssize_t __pyx_t_43; Py_ssize_t __pyx_t_44; Py_ssize_t __pyx_t_45; Py_ssize_t __pyx_t_46; Py_ssize_t __pyx_t_47; Py_ssize_t __pyx_t_48; Py_ssize_t __pyx_t_49; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("outer_join_indexer_float64", 0); __pyx_pybuffer_lindexer.pybuffer.buf = NULL; __pyx_pybuffer_lindexer.refcount = 0; __pyx_pybuffernd_lindexer.data = NULL; __pyx_pybuffernd_lindexer.rcbuffer = &__pyx_pybuffer_lindexer; __pyx_pybuffer_rindexer.pybuffer.buf = NULL; __pyx_pybuffer_rindexer.refcount = 0; __pyx_pybuffernd_rindexer.data = NULL; __pyx_pybuffernd_rindexer.rcbuffer = &__pyx_pybuffer_rindexer; __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_left.pybuffer.buf = NULL; __pyx_pybuffer_left.refcount = 0; __pyx_pybuffernd_left.data = NULL; __pyx_pybuffernd_left.rcbuffer = &__pyx_pybuffer_left; __pyx_pybuffer_right.pybuffer.buf = NULL; __pyx_pybuffer_right.refcount = 0; __pyx_pybuffernd_right.data = NULL; __pyx_pybuffernd_right.rcbuffer = &__pyx_pybuffer_right; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_left.rcbuffer->pybuffer, (PyObject*)__pyx_v_left, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7705; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_left.diminfo[0].strides = __pyx_pybuffernd_left.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_left.diminfo[0].shape = __pyx_pybuffernd_left.rcbuffer->pybuffer.shape[0]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_right.rcbuffer->pybuffer, (PyObject*)__pyx_v_right, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7705; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_right.diminfo[0].strides = __pyx_pybuffernd_right.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_right.diminfo[0].shape = __pyx_pybuffernd_right.rcbuffer->pybuffer.shape[0]; /* "pandas/src/generated.pyx":7713 * ndarray[float64_t] result * * nleft = len(left) # <<<<<<<<<<<<<< * nright = len(right) * */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_left)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7713; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_nleft = __pyx_t_1; /* "pandas/src/generated.pyx":7714 * * nleft = len(left) * nright = len(right) # <<<<<<<<<<<<<< * * i = 0 */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_right)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7714; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_nright = __pyx_t_1; /* "pandas/src/generated.pyx":7716 * nright = len(right) * * i = 0 # <<<<<<<<<<<<<< * j = 0 * count = 0 */ __pyx_v_i = 0; /* "pandas/src/generated.pyx":7717 * * i = 0 * j = 0 # <<<<<<<<<<<<<< * count = 0 * if nleft == 0: */ __pyx_v_j = 0; /* "pandas/src/generated.pyx":7718 * i = 0 * j = 0 * count = 0 # <<<<<<<<<<<<<< * if nleft == 0: * count = nright */ __pyx_v_count = 0; /* "pandas/src/generated.pyx":7719 * j = 0 * count = 0 * if nleft == 0: # <<<<<<<<<<<<<< * count = nright * elif nright == 0: */ __pyx_t_2 = ((__pyx_v_nleft == 0) != 0); if (__pyx_t_2) { /* "pandas/src/generated.pyx":7720 * count = 0 * if nleft == 0: * count = nright # <<<<<<<<<<<<<< * elif nright == 0: * count = nleft */ __pyx_v_count = __pyx_v_nright; goto __pyx_L3; } /* "pandas/src/generated.pyx":7721 * if nleft == 0: * count = nright * elif nright == 0: # <<<<<<<<<<<<<< * count = nleft * else: */ __pyx_t_2 = ((__pyx_v_nright == 0) != 0); if (__pyx_t_2) { /* "pandas/src/generated.pyx":7722 * count = nright * elif nright == 0: * count = nleft # <<<<<<<<<<<<<< * else: * while True: */ __pyx_v_count = __pyx_v_nleft; goto __pyx_L3; } /*else*/ { /* "pandas/src/generated.pyx":7724 * count = nleft * else: * while True: # <<<<<<<<<<<<<< * if i == nleft: * count += nright - j */ while (1) { /* "pandas/src/generated.pyx":7725 * else: * while True: * if i == nleft: # <<<<<<<<<<<<<< * count += nright - j * break */ __pyx_t_2 = ((__pyx_v_i == __pyx_v_nleft) != 0); if (__pyx_t_2) { /* "pandas/src/generated.pyx":7726 * while True: * if i == nleft: * count += nright - j # <<<<<<<<<<<<<< * break * if j == nright: */ __pyx_v_count = (__pyx_v_count + (__pyx_v_nright - __pyx_v_j)); /* "pandas/src/generated.pyx":7727 * if i == nleft: * count += nright - j * break # <<<<<<<<<<<<<< * if j == nright: * count += nleft - i */ goto __pyx_L5_break; } /* "pandas/src/generated.pyx":7728 * count += nright - j * break * if j == nright: # <<<<<<<<<<<<<< * count += nleft - i * break */ __pyx_t_2 = ((__pyx_v_j == __pyx_v_nright) != 0); if (__pyx_t_2) { /* "pandas/src/generated.pyx":7729 * break * if j == nright: * count += nleft - i # <<<<<<<<<<<<<< * break * */ __pyx_v_count = (__pyx_v_count + (__pyx_v_nleft - __pyx_v_i)); /* "pandas/src/generated.pyx":7730 * if j == nright: * count += nleft - i * break # <<<<<<<<<<<<<< * * lval = left[i] */ goto __pyx_L5_break; } /* "pandas/src/generated.pyx":7732 * break * * lval = left[i] # <<<<<<<<<<<<<< * rval = right[j] * if lval == rval: */ __pyx_t_1 = __pyx_v_i; __pyx_v_lval = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_left.rcbuffer->pybuffer.buf, __pyx_t_1, __pyx_pybuffernd_left.diminfo[0].strides)); /* "pandas/src/generated.pyx":7733 * * lval = left[i] * rval = right[j] # <<<<<<<<<<<<<< * if lval == rval: * count += 1 */ __pyx_t_3 = __pyx_v_j; __pyx_v_rval = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_right.rcbuffer->pybuffer.buf, __pyx_t_3, __pyx_pybuffernd_right.diminfo[0].strides)); /* "pandas/src/generated.pyx":7734 * lval = left[i] * rval = right[j] * if lval == rval: # <<<<<<<<<<<<<< * count += 1 * if i < nleft - 1: */ __pyx_t_2 = ((__pyx_v_lval == __pyx_v_rval) != 0); if (__pyx_t_2) { /* "pandas/src/generated.pyx":7735 * rval = right[j] * if lval == rval: * count += 1 # <<<<<<<<<<<<<< * if i < nleft - 1: * if j < nright - 1 and right[j + 1] == rval: */ __pyx_v_count = (__pyx_v_count + 1); /* "pandas/src/generated.pyx":7736 * if lval == rval: * count += 1 * if i < nleft - 1: # <<<<<<<<<<<<<< * if j < nright - 1 and right[j + 1] == rval: * j += 1 */ __pyx_t_2 = ((__pyx_v_i < (__pyx_v_nleft - 1)) != 0); if (__pyx_t_2) { /* "pandas/src/generated.pyx":7737 * count += 1 * if i < nleft - 1: * if j < nright - 1 and right[j + 1] == rval: # <<<<<<<<<<<<<< * j += 1 * else: */ __pyx_t_2 = ((__pyx_v_j < (__pyx_v_nright - 1)) != 0); if (__pyx_t_2) { __pyx_t_4 = (__pyx_v_j + 1); __pyx_t_5 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_right.rcbuffer->pybuffer.buf, __pyx_t_4, __pyx_pybuffernd_right.diminfo[0].strides)) == __pyx_v_rval) != 0); __pyx_t_6 = __pyx_t_5; } else { __pyx_t_6 = __pyx_t_2; } if (__pyx_t_6) { /* "pandas/src/generated.pyx":7738 * if i < nleft - 1: * if j < nright - 1 and right[j + 1] == rval: * j += 1 # <<<<<<<<<<<<<< * else: * i += 1 */ __pyx_v_j = (__pyx_v_j + 1); goto __pyx_L10; } /*else*/ { /* "pandas/src/generated.pyx":7740 * j += 1 * else: * i += 1 # <<<<<<<<<<<<<< * if left[i] != rval: * j += 1 */ __pyx_v_i = (__pyx_v_i + 1); /* "pandas/src/generated.pyx":7741 * else: * i += 1 * if left[i] != rval: # <<<<<<<<<<<<<< * j += 1 * elif j < nright - 1: */ __pyx_t_7 = __pyx_v_i; __pyx_t_6 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_left.rcbuffer->pybuffer.buf, __pyx_t_7, __pyx_pybuffernd_left.diminfo[0].strides)) != __pyx_v_rval) != 0); if (__pyx_t_6) { /* "pandas/src/generated.pyx":7742 * i += 1 * if left[i] != rval: * j += 1 # <<<<<<<<<<<<<< * elif j < nright - 1: * j += 1 */ __pyx_v_j = (__pyx_v_j + 1); goto __pyx_L11; } __pyx_L11:; } __pyx_L10:; goto __pyx_L9; } /* "pandas/src/generated.pyx":7743 * if left[i] != rval: * j += 1 * elif j < nright - 1: # <<<<<<<<<<<<<< * j += 1 * if lval != right[j]: */ __pyx_t_6 = ((__pyx_v_j < (__pyx_v_nright - 1)) != 0); if (__pyx_t_6) { /* "pandas/src/generated.pyx":7744 * j += 1 * elif j < nright - 1: * j += 1 # <<<<<<<<<<<<<< * if lval != right[j]: * i += 1 */ __pyx_v_j = (__pyx_v_j + 1); /* "pandas/src/generated.pyx":7745 * elif j < nright - 1: * j += 1 * if lval != right[j]: # <<<<<<<<<<<<<< * i += 1 * else: */ __pyx_t_8 = __pyx_v_j; __pyx_t_6 = ((__pyx_v_lval != (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_right.rcbuffer->pybuffer.buf, __pyx_t_8, __pyx_pybuffernd_right.diminfo[0].strides))) != 0); if (__pyx_t_6) { /* "pandas/src/generated.pyx":7746 * j += 1 * if lval != right[j]: * i += 1 # <<<<<<<<<<<<<< * else: * # end of the road */ __pyx_v_i = (__pyx_v_i + 1); goto __pyx_L12; } __pyx_L12:; goto __pyx_L9; } /*else*/ { /* "pandas/src/generated.pyx":7749 * else: * # end of the road * break # <<<<<<<<<<<<<< * elif lval < rval: * count += 1 */ goto __pyx_L5_break; } __pyx_L9:; goto __pyx_L8; } /* "pandas/src/generated.pyx":7750 * # end of the road * break * elif lval < rval: # <<<<<<<<<<<<<< * count += 1 * i += 1 */ __pyx_t_6 = ((__pyx_v_lval < __pyx_v_rval) != 0); if (__pyx_t_6) { /* "pandas/src/generated.pyx":7751 * break * elif lval < rval: * count += 1 # <<<<<<<<<<<<<< * i += 1 * else: */ __pyx_v_count = (__pyx_v_count + 1); /* "pandas/src/generated.pyx":7752 * elif lval < rval: * count += 1 * i += 1 # <<<<<<<<<<<<<< * else: * count += 1 */ __pyx_v_i = (__pyx_v_i + 1); goto __pyx_L8; } /*else*/ { /* "pandas/src/generated.pyx":7754 * i += 1 * else: * count += 1 # <<<<<<<<<<<<<< * j += 1 * */ __pyx_v_count = (__pyx_v_count + 1); /* "pandas/src/generated.pyx":7755 * else: * count += 1 * j += 1 # <<<<<<<<<<<<<< * * lindexer = np.empty(count, dtype=np.int64) */ __pyx_v_j = (__pyx_v_j + 1); } __pyx_L8:; } __pyx_L5_break:; } __pyx_L3:; /* "pandas/src/generated.pyx":7757 * j += 1 * * lindexer = np.empty(count, dtype=np.int64) # <<<<<<<<<<<<<< * rindexer = np.empty(count, dtype=np.int64) * result = np.empty(count, dtype=np.float64) */ __pyx_t_9 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7757; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_empty); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7757; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_9 = PyInt_FromSsize_t(__pyx_v_count); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7757; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_t_11 = PyTuple_New(1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7757; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_9); __Pyx_GIVEREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_9 = PyDict_New(); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7757; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_t_12 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7757; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_int64); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7757; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_dtype, __pyx_t_13) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7757; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_13 = PyObject_Call(__pyx_t_10, __pyx_t_11, __pyx_t_9); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7757; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; if (!(likely(((__pyx_t_13) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_13, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7757; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_14 = ((PyArrayObject *)__pyx_t_13); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_lindexer.rcbuffer->pybuffer); __pyx_t_15 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_lindexer.rcbuffer->pybuffer, (PyObject*)__pyx_t_14, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_15 < 0)) { PyErr_Fetch(&__pyx_t_16, &__pyx_t_17, &__pyx_t_18); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_lindexer.rcbuffer->pybuffer, (PyObject*)__pyx_v_lindexer, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_16); Py_XDECREF(__pyx_t_17); Py_XDECREF(__pyx_t_18); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_16, __pyx_t_17, __pyx_t_18); } } __pyx_pybuffernd_lindexer.diminfo[0].strides = __pyx_pybuffernd_lindexer.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_lindexer.diminfo[0].shape = __pyx_pybuffernd_lindexer.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_15 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7757; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_14 = 0; __pyx_v_lindexer = ((PyArrayObject *)__pyx_t_13); __pyx_t_13 = 0; /* "pandas/src/generated.pyx":7758 * * lindexer = np.empty(count, dtype=np.int64) * rindexer = np.empty(count, dtype=np.int64) # <<<<<<<<<<<<<< * result = np.empty(count, dtype=np.float64) * */ __pyx_t_13 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7758; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_13, __pyx_n_s_empty); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7758; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_13 = PyInt_FromSsize_t(__pyx_v_count); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7758; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __pyx_t_11 = PyTuple_New(1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7758; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_13); __Pyx_GIVEREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_13 = PyDict_New(); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7758; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __pyx_t_10 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7758; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_int64); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7758; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; if (PyDict_SetItem(__pyx_t_13, __pyx_n_s_dtype, __pyx_t_12) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7758; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __pyx_t_12 = PyObject_Call(__pyx_t_9, __pyx_t_11, __pyx_t_13); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7758; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; if (!(likely(((__pyx_t_12) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_12, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7758; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_14 = ((PyArrayObject *)__pyx_t_12); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_rindexer.rcbuffer->pybuffer); __pyx_t_15 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_rindexer.rcbuffer->pybuffer, (PyObject*)__pyx_t_14, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_15 < 0)) { PyErr_Fetch(&__pyx_t_18, &__pyx_t_17, &__pyx_t_16); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_rindexer.rcbuffer->pybuffer, (PyObject*)__pyx_v_rindexer, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_18); Py_XDECREF(__pyx_t_17); Py_XDECREF(__pyx_t_16); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_18, __pyx_t_17, __pyx_t_16); } } __pyx_pybuffernd_rindexer.diminfo[0].strides = __pyx_pybuffernd_rindexer.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_rindexer.diminfo[0].shape = __pyx_pybuffernd_rindexer.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_15 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7758; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_14 = 0; __pyx_v_rindexer = ((PyArrayObject *)__pyx_t_12); __pyx_t_12 = 0; /* "pandas/src/generated.pyx":7759 * lindexer = np.empty(count, dtype=np.int64) * rindexer = np.empty(count, dtype=np.int64) * result = np.empty(count, dtype=np.float64) # <<<<<<<<<<<<<< * * # do it again, but populate the indexers / result */ __pyx_t_12 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7759; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_empty); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7759; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __pyx_t_12 = PyInt_FromSsize_t(__pyx_v_count); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7759; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __pyx_t_11 = PyTuple_New(1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7759; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_12); __Pyx_GIVEREF(__pyx_t_12); __pyx_t_12 = 0; __pyx_t_12 = PyDict_New(); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7759; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __pyx_t_9 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7759; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_float64); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7759; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; if (PyDict_SetItem(__pyx_t_12, __pyx_n_s_dtype, __pyx_t_10) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7759; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_t_10 = PyObject_Call(__pyx_t_13, __pyx_t_11, __pyx_t_12); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7759; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; if (!(likely(((__pyx_t_10) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_10, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7759; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_19 = ((PyArrayObject *)__pyx_t_10); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __pyx_t_15 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_t_19, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_15 < 0)) { PyErr_Fetch(&__pyx_t_16, &__pyx_t_17, &__pyx_t_18); 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_16); Py_XDECREF(__pyx_t_17); Py_XDECREF(__pyx_t_18); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_16, __pyx_t_17, __pyx_t_18); } } __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_15 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7759; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_19 = 0; __pyx_v_result = ((PyArrayObject *)__pyx_t_10); __pyx_t_10 = 0; /* "pandas/src/generated.pyx":7763 * # do it again, but populate the indexers / result * * i = 0 # <<<<<<<<<<<<<< * j = 0 * count = 0 */ __pyx_v_i = 0; /* "pandas/src/generated.pyx":7764 * * i = 0 * j = 0 # <<<<<<<<<<<<<< * count = 0 * if nleft == 0: */ __pyx_v_j = 0; /* "pandas/src/generated.pyx":7765 * i = 0 * j = 0 * count = 0 # <<<<<<<<<<<<<< * if nleft == 0: * for j in range(nright): */ __pyx_v_count = 0; /* "pandas/src/generated.pyx":7766 * j = 0 * count = 0 * if nleft == 0: # <<<<<<<<<<<<<< * for j in range(nright): * lindexer[j] = -1 */ __pyx_t_6 = ((__pyx_v_nleft == 0) != 0); if (__pyx_t_6) { /* "pandas/src/generated.pyx":7767 * count = 0 * if nleft == 0: * for j in range(nright): # <<<<<<<<<<<<<< * lindexer[j] = -1 * rindexer[j] = j */ __pyx_t_20 = __pyx_v_nright; for (__pyx_t_21 = 0; __pyx_t_21 < __pyx_t_20; __pyx_t_21+=1) { __pyx_v_j = __pyx_t_21; /* "pandas/src/generated.pyx":7768 * if nleft == 0: * for j in range(nright): * lindexer[j] = -1 # <<<<<<<<<<<<<< * rindexer[j] = j * result[j] = right[j] */ __pyx_t_22 = __pyx_v_j; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_lindexer.rcbuffer->pybuffer.buf, __pyx_t_22, __pyx_pybuffernd_lindexer.diminfo[0].strides) = -1; /* "pandas/src/generated.pyx":7769 * for j in range(nright): * lindexer[j] = -1 * rindexer[j] = j # <<<<<<<<<<<<<< * result[j] = right[j] * elif nright == 0: */ __pyx_t_23 = __pyx_v_j; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_rindexer.rcbuffer->pybuffer.buf, __pyx_t_23, __pyx_pybuffernd_rindexer.diminfo[0].strides) = __pyx_v_j; /* "pandas/src/generated.pyx":7770 * lindexer[j] = -1 * rindexer[j] = j * result[j] = right[j] # <<<<<<<<<<<<<< * elif nright == 0: * for i in range(nright): */ __pyx_t_24 = __pyx_v_j; __pyx_t_25 = __pyx_v_j; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_25, __pyx_pybuffernd_result.diminfo[0].strides) = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_right.rcbuffer->pybuffer.buf, __pyx_t_24, __pyx_pybuffernd_right.diminfo[0].strides)); } goto __pyx_L13; } /* "pandas/src/generated.pyx":7771 * rindexer[j] = j * result[j] = right[j] * elif nright == 0: # <<<<<<<<<<<<<< * for i in range(nright): * lindexer[i] = i */ __pyx_t_6 = ((__pyx_v_nright == 0) != 0); if (__pyx_t_6) { /* "pandas/src/generated.pyx":7772 * result[j] = right[j] * elif nright == 0: * for i in range(nright): # <<<<<<<<<<<<<< * lindexer[i] = i * rindexer[i] = -1 */ __pyx_t_20 = __pyx_v_nright; for (__pyx_t_21 = 0; __pyx_t_21 < __pyx_t_20; __pyx_t_21+=1) { __pyx_v_i = __pyx_t_21; /* "pandas/src/generated.pyx":7773 * elif nright == 0: * for i in range(nright): * lindexer[i] = i # <<<<<<<<<<<<<< * rindexer[i] = -1 * result[i] = left[i] */ __pyx_t_26 = __pyx_v_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_lindexer.rcbuffer->pybuffer.buf, __pyx_t_26, __pyx_pybuffernd_lindexer.diminfo[0].strides) = __pyx_v_i; /* "pandas/src/generated.pyx":7774 * for i in range(nright): * lindexer[i] = i * rindexer[i] = -1 # <<<<<<<<<<<<<< * result[i] = left[i] * else: */ __pyx_t_27 = __pyx_v_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_rindexer.rcbuffer->pybuffer.buf, __pyx_t_27, __pyx_pybuffernd_rindexer.diminfo[0].strides) = -1; /* "pandas/src/generated.pyx":7775 * lindexer[i] = i * rindexer[i] = -1 * result[i] = left[i] # <<<<<<<<<<<<<< * else: * while True: */ __pyx_t_28 = __pyx_v_i; __pyx_t_29 = __pyx_v_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_29, __pyx_pybuffernd_result.diminfo[0].strides) = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_left.rcbuffer->pybuffer.buf, __pyx_t_28, __pyx_pybuffernd_left.diminfo[0].strides)); } goto __pyx_L13; } /*else*/ { /* "pandas/src/generated.pyx":7777 * result[i] = left[i] * else: * while True: # <<<<<<<<<<<<<< * if i == nleft: * while j < nright: */ while (1) { /* "pandas/src/generated.pyx":7778 * else: * while True: * if i == nleft: # <<<<<<<<<<<<<< * while j < nright: * lindexer[count] = -1 */ __pyx_t_6 = ((__pyx_v_i == __pyx_v_nleft) != 0); if (__pyx_t_6) { /* "pandas/src/generated.pyx":7779 * while True: * if i == nleft: * while j < nright: # <<<<<<<<<<<<<< * lindexer[count] = -1 * rindexer[count] = j */ while (1) { __pyx_t_6 = ((__pyx_v_j < __pyx_v_nright) != 0); if (!__pyx_t_6) break; /* "pandas/src/generated.pyx":7780 * if i == nleft: * while j < nright: * lindexer[count] = -1 # <<<<<<<<<<<<<< * rindexer[count] = j * result[count] = right[j] */ __pyx_t_20 = __pyx_v_count; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_lindexer.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_lindexer.diminfo[0].strides) = -1; /* "pandas/src/generated.pyx":7781 * while j < nright: * lindexer[count] = -1 * rindexer[count] = j # <<<<<<<<<<<<<< * result[count] = right[j] * count += 1 */ __pyx_t_21 = __pyx_v_count; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_rindexer.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_rindexer.diminfo[0].strides) = __pyx_v_j; /* "pandas/src/generated.pyx":7782 * lindexer[count] = -1 * rindexer[count] = j * result[count] = right[j] # <<<<<<<<<<<<<< * count += 1 * j += 1 */ __pyx_t_30 = __pyx_v_j; __pyx_t_31 = __pyx_v_count; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_31, __pyx_pybuffernd_result.diminfo[0].strides) = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_right.rcbuffer->pybuffer.buf, __pyx_t_30, __pyx_pybuffernd_right.diminfo[0].strides)); /* "pandas/src/generated.pyx":7783 * rindexer[count] = j * result[count] = right[j] * count += 1 # <<<<<<<<<<<<<< * j += 1 * break */ __pyx_v_count = (__pyx_v_count + 1); /* "pandas/src/generated.pyx":7784 * result[count] = right[j] * count += 1 * j += 1 # <<<<<<<<<<<<<< * break * if j == nright: */ __pyx_v_j = (__pyx_v_j + 1); } /* "pandas/src/generated.pyx":7785 * count += 1 * j += 1 * break # <<<<<<<<<<<<<< * if j == nright: * while i < nleft: */ goto __pyx_L19_break; } /* "pandas/src/generated.pyx":7786 * j += 1 * break * if j == nright: # <<<<<<<<<<<<<< * while i < nleft: * lindexer[count] = i */ __pyx_t_6 = ((__pyx_v_j == __pyx_v_nright) != 0); if (__pyx_t_6) { /* "pandas/src/generated.pyx":7787 * break * if j == nright: * while i < nleft: # <<<<<<<<<<<<<< * lindexer[count] = i * rindexer[count] = -1 */ while (1) { __pyx_t_6 = ((__pyx_v_i < __pyx_v_nleft) != 0); if (!__pyx_t_6) break; /* "pandas/src/generated.pyx":7788 * if j == nright: * while i < nleft: * lindexer[count] = i # <<<<<<<<<<<<<< * rindexer[count] = -1 * result[count] = left[i] */ __pyx_t_32 = __pyx_v_count; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_lindexer.rcbuffer->pybuffer.buf, __pyx_t_32, __pyx_pybuffernd_lindexer.diminfo[0].strides) = __pyx_v_i; /* "pandas/src/generated.pyx":7789 * while i < nleft: * lindexer[count] = i * rindexer[count] = -1 # <<<<<<<<<<<<<< * result[count] = left[i] * count += 1 */ __pyx_t_33 = __pyx_v_count; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_rindexer.rcbuffer->pybuffer.buf, __pyx_t_33, __pyx_pybuffernd_rindexer.diminfo[0].strides) = -1; /* "pandas/src/generated.pyx":7790 * lindexer[count] = i * rindexer[count] = -1 * result[count] = left[i] # <<<<<<<<<<<<<< * count += 1 * i += 1 */ __pyx_t_34 = __pyx_v_i; __pyx_t_35 = __pyx_v_count; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_35, __pyx_pybuffernd_result.diminfo[0].strides) = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_left.rcbuffer->pybuffer.buf, __pyx_t_34, __pyx_pybuffernd_left.diminfo[0].strides)); /* "pandas/src/generated.pyx":7791 * rindexer[count] = -1 * result[count] = left[i] * count += 1 # <<<<<<<<<<<<<< * i += 1 * break */ __pyx_v_count = (__pyx_v_count + 1); /* "pandas/src/generated.pyx":7792 * result[count] = left[i] * count += 1 * i += 1 # <<<<<<<<<<<<<< * break * */ __pyx_v_i = (__pyx_v_i + 1); } /* "pandas/src/generated.pyx":7793 * count += 1 * i += 1 * break # <<<<<<<<<<<<<< * * lval = left[i] */ goto __pyx_L19_break; } /* "pandas/src/generated.pyx":7795 * break * * lval = left[i] # <<<<<<<<<<<<<< * rval = right[j] * */ __pyx_t_36 = __pyx_v_i; __pyx_v_lval = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_left.rcbuffer->pybuffer.buf, __pyx_t_36, __pyx_pybuffernd_left.diminfo[0].strides)); /* "pandas/src/generated.pyx":7796 * * lval = left[i] * rval = right[j] # <<<<<<<<<<<<<< * * if lval == rval: */ __pyx_t_37 = __pyx_v_j; __pyx_v_rval = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_right.rcbuffer->pybuffer.buf, __pyx_t_37, __pyx_pybuffernd_right.diminfo[0].strides)); /* "pandas/src/generated.pyx":7798 * rval = right[j] * * if lval == rval: # <<<<<<<<<<<<<< * lindexer[count] = i * rindexer[count] = j */ __pyx_t_6 = ((__pyx_v_lval == __pyx_v_rval) != 0); if (__pyx_t_6) { /* "pandas/src/generated.pyx":7799 * * if lval == rval: * lindexer[count] = i # <<<<<<<<<<<<<< * rindexer[count] = j * result[count] = lval */ __pyx_t_38 = __pyx_v_count; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_lindexer.rcbuffer->pybuffer.buf, __pyx_t_38, __pyx_pybuffernd_lindexer.diminfo[0].strides) = __pyx_v_i; /* "pandas/src/generated.pyx":7800 * if lval == rval: * lindexer[count] = i * rindexer[count] = j # <<<<<<<<<<<<<< * result[count] = lval * count += 1 */ __pyx_t_39 = __pyx_v_count; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_rindexer.rcbuffer->pybuffer.buf, __pyx_t_39, __pyx_pybuffernd_rindexer.diminfo[0].strides) = __pyx_v_j; /* "pandas/src/generated.pyx":7801 * lindexer[count] = i * rindexer[count] = j * result[count] = lval # <<<<<<<<<<<<<< * count += 1 * if i < nleft - 1: */ __pyx_t_40 = __pyx_v_count; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_40, __pyx_pybuffernd_result.diminfo[0].strides) = __pyx_v_lval; /* "pandas/src/generated.pyx":7802 * rindexer[count] = j * result[count] = lval * count += 1 # <<<<<<<<<<<<<< * if i < nleft - 1: * if j < nright - 1 and right[j + 1] == rval: */ __pyx_v_count = (__pyx_v_count + 1); /* "pandas/src/generated.pyx":7803 * result[count] = lval * count += 1 * if i < nleft - 1: # <<<<<<<<<<<<<< * if j < nright - 1 and right[j + 1] == rval: * j += 1 */ __pyx_t_6 = ((__pyx_v_i < (__pyx_v_nleft - 1)) != 0); if (__pyx_t_6) { /* "pandas/src/generated.pyx":7804 * count += 1 * if i < nleft - 1: * if j < nright - 1 and right[j + 1] == rval: # <<<<<<<<<<<<<< * j += 1 * else: */ __pyx_t_6 = ((__pyx_v_j < (__pyx_v_nright - 1)) != 0); if (__pyx_t_6) { __pyx_t_41 = (__pyx_v_j + 1); __pyx_t_2 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_right.rcbuffer->pybuffer.buf, __pyx_t_41, __pyx_pybuffernd_right.diminfo[0].strides)) == __pyx_v_rval) != 0); __pyx_t_5 = __pyx_t_2; } else { __pyx_t_5 = __pyx_t_6; } if (__pyx_t_5) { /* "pandas/src/generated.pyx":7805 * if i < nleft - 1: * if j < nright - 1 and right[j + 1] == rval: * j += 1 # <<<<<<<<<<<<<< * else: * i += 1 */ __pyx_v_j = (__pyx_v_j + 1); goto __pyx_L28; } /*else*/ { /* "pandas/src/generated.pyx":7807 * j += 1 * else: * i += 1 # <<<<<<<<<<<<<< * if left[i] != rval: * j += 1 */ __pyx_v_i = (__pyx_v_i + 1); /* "pandas/src/generated.pyx":7808 * else: * i += 1 * if left[i] != rval: # <<<<<<<<<<<<<< * j += 1 * elif j < nright - 1: */ __pyx_t_42 = __pyx_v_i; __pyx_t_5 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_left.rcbuffer->pybuffer.buf, __pyx_t_42, __pyx_pybuffernd_left.diminfo[0].strides)) != __pyx_v_rval) != 0); if (__pyx_t_5) { /* "pandas/src/generated.pyx":7809 * i += 1 * if left[i] != rval: * j += 1 # <<<<<<<<<<<<<< * elif j < nright - 1: * j += 1 */ __pyx_v_j = (__pyx_v_j + 1); goto __pyx_L29; } __pyx_L29:; } __pyx_L28:; goto __pyx_L27; } /* "pandas/src/generated.pyx":7810 * if left[i] != rval: * j += 1 * elif j < nright - 1: # <<<<<<<<<<<<<< * j += 1 * if lval != right[j]: */ __pyx_t_5 = ((__pyx_v_j < (__pyx_v_nright - 1)) != 0); if (__pyx_t_5) { /* "pandas/src/generated.pyx":7811 * j += 1 * elif j < nright - 1: * j += 1 # <<<<<<<<<<<<<< * if lval != right[j]: * i += 1 */ __pyx_v_j = (__pyx_v_j + 1); /* "pandas/src/generated.pyx":7812 * elif j < nright - 1: * j += 1 * if lval != right[j]: # <<<<<<<<<<<<<< * i += 1 * else: */ __pyx_t_43 = __pyx_v_j; __pyx_t_5 = ((__pyx_v_lval != (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_right.rcbuffer->pybuffer.buf, __pyx_t_43, __pyx_pybuffernd_right.diminfo[0].strides))) != 0); if (__pyx_t_5) { /* "pandas/src/generated.pyx":7813 * j += 1 * if lval != right[j]: * i += 1 # <<<<<<<<<<<<<< * else: * # end of the road */ __pyx_v_i = (__pyx_v_i + 1); goto __pyx_L30; } __pyx_L30:; goto __pyx_L27; } /*else*/ { /* "pandas/src/generated.pyx":7816 * else: * # end of the road * break # <<<<<<<<<<<<<< * elif lval < rval: * lindexer[count] = i */ goto __pyx_L19_break; } __pyx_L27:; goto __pyx_L26; } /* "pandas/src/generated.pyx":7817 * # end of the road * break * elif lval < rval: # <<<<<<<<<<<<<< * lindexer[count] = i * rindexer[count] = -1 */ __pyx_t_5 = ((__pyx_v_lval < __pyx_v_rval) != 0); if (__pyx_t_5) { /* "pandas/src/generated.pyx":7818 * break * elif lval < rval: * lindexer[count] = i # <<<<<<<<<<<<<< * rindexer[count] = -1 * result[count] = lval */ __pyx_t_44 = __pyx_v_count; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_lindexer.rcbuffer->pybuffer.buf, __pyx_t_44, __pyx_pybuffernd_lindexer.diminfo[0].strides) = __pyx_v_i; /* "pandas/src/generated.pyx":7819 * elif lval < rval: * lindexer[count] = i * rindexer[count] = -1 # <<<<<<<<<<<<<< * result[count] = lval * count += 1 */ __pyx_t_45 = __pyx_v_count; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_rindexer.rcbuffer->pybuffer.buf, __pyx_t_45, __pyx_pybuffernd_rindexer.diminfo[0].strides) = -1; /* "pandas/src/generated.pyx":7820 * lindexer[count] = i * rindexer[count] = -1 * result[count] = lval # <<<<<<<<<<<<<< * count += 1 * i += 1 */ __pyx_t_46 = __pyx_v_count; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_46, __pyx_pybuffernd_result.diminfo[0].strides) = __pyx_v_lval; /* "pandas/src/generated.pyx":7821 * rindexer[count] = -1 * result[count] = lval * count += 1 # <<<<<<<<<<<<<< * i += 1 * else: */ __pyx_v_count = (__pyx_v_count + 1); /* "pandas/src/generated.pyx":7822 * result[count] = lval * count += 1 * i += 1 # <<<<<<<<<<<<<< * else: * lindexer[count] = -1 */ __pyx_v_i = (__pyx_v_i + 1); goto __pyx_L26; } /*else*/ { /* "pandas/src/generated.pyx":7824 * i += 1 * else: * lindexer[count] = -1 # <<<<<<<<<<<<<< * rindexer[count] = j * result[count] = rval */ __pyx_t_47 = __pyx_v_count; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_lindexer.rcbuffer->pybuffer.buf, __pyx_t_47, __pyx_pybuffernd_lindexer.diminfo[0].strides) = -1; /* "pandas/src/generated.pyx":7825 * else: * lindexer[count] = -1 * rindexer[count] = j # <<<<<<<<<<<<<< * result[count] = rval * count += 1 */ __pyx_t_48 = __pyx_v_count; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_rindexer.rcbuffer->pybuffer.buf, __pyx_t_48, __pyx_pybuffernd_rindexer.diminfo[0].strides) = __pyx_v_j; /* "pandas/src/generated.pyx":7826 * lindexer[count] = -1 * rindexer[count] = j * result[count] = rval # <<<<<<<<<<<<<< * count += 1 * j += 1 */ __pyx_t_49 = __pyx_v_count; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_49, __pyx_pybuffernd_result.diminfo[0].strides) = __pyx_v_rval; /* "pandas/src/generated.pyx":7827 * rindexer[count] = j * result[count] = rval * count += 1 # <<<<<<<<<<<<<< * j += 1 * */ __pyx_v_count = (__pyx_v_count + 1); /* "pandas/src/generated.pyx":7828 * result[count] = rval * count += 1 * j += 1 # <<<<<<<<<<<<<< * * return result, lindexer, rindexer */ __pyx_v_j = (__pyx_v_j + 1); } __pyx_L26:; } __pyx_L19_break:; } __pyx_L13:; /* "pandas/src/generated.pyx":7830 * j += 1 * * return result, lindexer, rindexer # <<<<<<<<<<<<<< * * @cython.wraparound(False) */ __Pyx_XDECREF(__pyx_r); __pyx_t_10 = PyTuple_New(3); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7830; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_INCREF(((PyObject *)__pyx_v_result)); PyTuple_SET_ITEM(__pyx_t_10, 0, ((PyObject *)__pyx_v_result)); __Pyx_GIVEREF(((PyObject *)__pyx_v_result)); __Pyx_INCREF(((PyObject *)__pyx_v_lindexer)); PyTuple_SET_ITEM(__pyx_t_10, 1, ((PyObject *)__pyx_v_lindexer)); __Pyx_GIVEREF(((PyObject *)__pyx_v_lindexer)); __Pyx_INCREF(((PyObject *)__pyx_v_rindexer)); PyTuple_SET_ITEM(__pyx_t_10, 2, ((PyObject *)__pyx_v_rindexer)); __Pyx_GIVEREF(((PyObject *)__pyx_v_rindexer)); __pyx_r = __pyx_t_10; __pyx_t_10 = 0; goto __pyx_L0; /* "pandas/src/generated.pyx":7705 * @cython.wraparound(False) * @cython.boundscheck(False) * def outer_join_indexer_float64(ndarray[float64_t] left, # <<<<<<<<<<<<<< * ndarray[float64_t] right): * cdef: */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_9); __Pyx_XDECREF(__pyx_t_10); __Pyx_XDECREF(__pyx_t_11); __Pyx_XDECREF(__pyx_t_12); __Pyx_XDECREF(__pyx_t_13); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_left.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_lindexer.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_right.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_rindexer.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.outer_join_indexer_float64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_left.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_lindexer.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_right.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_rindexer.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_lindexer); __Pyx_XDECREF((PyObject *)__pyx_v_rindexer); __Pyx_XDECREF((PyObject *)__pyx_v_result); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":7834 * @cython.wraparound(False) * @cython.boundscheck(False) * def outer_join_indexer_float32(ndarray[float32_t] left, # <<<<<<<<<<<<<< * ndarray[float32_t] right): * cdef: */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_477outer_join_indexer_float32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_477outer_join_indexer_float32 = {__Pyx_NAMESTR("outer_join_indexer_float32"), (PyCFunction)__pyx_pw_6pandas_5algos_477outer_join_indexer_float32, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_477outer_join_indexer_float32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_left = 0; PyArrayObject *__pyx_v_right = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("outer_join_indexer_float32 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_left,&__pyx_n_s_right,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_left)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_right)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("outer_join_indexer_float32", 1, 2, 2, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7834; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "outer_join_indexer_float32") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7834; __pyx_clineno = __LINE__; goto __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_left = ((PyArrayObject *)values[0]); __pyx_v_right = ((PyArrayObject *)values[1]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("outer_join_indexer_float32", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7834; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.outer_join_indexer_float32", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_left), __pyx_ptype_5numpy_ndarray, 1, "left", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7834; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_right), __pyx_ptype_5numpy_ndarray, 1, "right", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7835; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_476outer_join_indexer_float32(__pyx_self, __pyx_v_left, __pyx_v_right); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5algos_476outer_join_indexer_float32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_left, PyArrayObject *__pyx_v_right) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_nright; Py_ssize_t __pyx_v_nleft; Py_ssize_t __pyx_v_count; __pyx_t_5numpy_float32_t __pyx_v_lval; __pyx_t_5numpy_float32_t __pyx_v_rval; PyArrayObject *__pyx_v_lindexer = 0; PyArrayObject *__pyx_v_rindexer = 0; PyArrayObject *__pyx_v_result = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_left; __Pyx_Buffer __pyx_pybuffer_left; __Pyx_LocalBuf_ND __pyx_pybuffernd_lindexer; __Pyx_Buffer __pyx_pybuffer_lindexer; __Pyx_LocalBuf_ND __pyx_pybuffernd_result; __Pyx_Buffer __pyx_pybuffer_result; __Pyx_LocalBuf_ND __pyx_pybuffernd_right; __Pyx_Buffer __pyx_pybuffer_right; __Pyx_LocalBuf_ND __pyx_pybuffernd_rindexer; __Pyx_Buffer __pyx_pybuffer_rindexer; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; int __pyx_t_2; Py_ssize_t __pyx_t_3; Py_ssize_t __pyx_t_4; int __pyx_t_5; int __pyx_t_6; Py_ssize_t __pyx_t_7; Py_ssize_t __pyx_t_8; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; PyObject *__pyx_t_11 = NULL; PyObject *__pyx_t_12 = NULL; PyObject *__pyx_t_13 = NULL; PyArrayObject *__pyx_t_14 = NULL; int __pyx_t_15; PyObject *__pyx_t_16 = NULL; PyObject *__pyx_t_17 = NULL; PyObject *__pyx_t_18 = NULL; PyArrayObject *__pyx_t_19 = NULL; 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; Py_ssize_t __pyx_t_37; Py_ssize_t __pyx_t_38; Py_ssize_t __pyx_t_39; Py_ssize_t __pyx_t_40; Py_ssize_t __pyx_t_41; Py_ssize_t __pyx_t_42; Py_ssize_t __pyx_t_43; Py_ssize_t __pyx_t_44; Py_ssize_t __pyx_t_45; Py_ssize_t __pyx_t_46; Py_ssize_t __pyx_t_47; Py_ssize_t __pyx_t_48; Py_ssize_t __pyx_t_49; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("outer_join_indexer_float32", 0); __pyx_pybuffer_lindexer.pybuffer.buf = NULL; __pyx_pybuffer_lindexer.refcount = 0; __pyx_pybuffernd_lindexer.data = NULL; __pyx_pybuffernd_lindexer.rcbuffer = &__pyx_pybuffer_lindexer; __pyx_pybuffer_rindexer.pybuffer.buf = NULL; __pyx_pybuffer_rindexer.refcount = 0; __pyx_pybuffernd_rindexer.data = NULL; __pyx_pybuffernd_rindexer.rcbuffer = &__pyx_pybuffer_rindexer; __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_left.pybuffer.buf = NULL; __pyx_pybuffer_left.refcount = 0; __pyx_pybuffernd_left.data = NULL; __pyx_pybuffernd_left.rcbuffer = &__pyx_pybuffer_left; __pyx_pybuffer_right.pybuffer.buf = NULL; __pyx_pybuffer_right.refcount = 0; __pyx_pybuffernd_right.data = NULL; __pyx_pybuffernd_right.rcbuffer = &__pyx_pybuffer_right; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_left.rcbuffer->pybuffer, (PyObject*)__pyx_v_left, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7834; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_left.diminfo[0].strides = __pyx_pybuffernd_left.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_left.diminfo[0].shape = __pyx_pybuffernd_left.rcbuffer->pybuffer.shape[0]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_right.rcbuffer->pybuffer, (PyObject*)__pyx_v_right, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7834; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_right.diminfo[0].strides = __pyx_pybuffernd_right.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_right.diminfo[0].shape = __pyx_pybuffernd_right.rcbuffer->pybuffer.shape[0]; /* "pandas/src/generated.pyx":7842 * ndarray[float32_t] result * * nleft = len(left) # <<<<<<<<<<<<<< * nright = len(right) * */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_left)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7842; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_nleft = __pyx_t_1; /* "pandas/src/generated.pyx":7843 * * nleft = len(left) * nright = len(right) # <<<<<<<<<<<<<< * * i = 0 */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_right)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7843; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_nright = __pyx_t_1; /* "pandas/src/generated.pyx":7845 * nright = len(right) * * i = 0 # <<<<<<<<<<<<<< * j = 0 * count = 0 */ __pyx_v_i = 0; /* "pandas/src/generated.pyx":7846 * * i = 0 * j = 0 # <<<<<<<<<<<<<< * count = 0 * if nleft == 0: */ __pyx_v_j = 0; /* "pandas/src/generated.pyx":7847 * i = 0 * j = 0 * count = 0 # <<<<<<<<<<<<<< * if nleft == 0: * count = nright */ __pyx_v_count = 0; /* "pandas/src/generated.pyx":7848 * j = 0 * count = 0 * if nleft == 0: # <<<<<<<<<<<<<< * count = nright * elif nright == 0: */ __pyx_t_2 = ((__pyx_v_nleft == 0) != 0); if (__pyx_t_2) { /* "pandas/src/generated.pyx":7849 * count = 0 * if nleft == 0: * count = nright # <<<<<<<<<<<<<< * elif nright == 0: * count = nleft */ __pyx_v_count = __pyx_v_nright; goto __pyx_L3; } /* "pandas/src/generated.pyx":7850 * if nleft == 0: * count = nright * elif nright == 0: # <<<<<<<<<<<<<< * count = nleft * else: */ __pyx_t_2 = ((__pyx_v_nright == 0) != 0); if (__pyx_t_2) { /* "pandas/src/generated.pyx":7851 * count = nright * elif nright == 0: * count = nleft # <<<<<<<<<<<<<< * else: * while True: */ __pyx_v_count = __pyx_v_nleft; goto __pyx_L3; } /*else*/ { /* "pandas/src/generated.pyx":7853 * count = nleft * else: * while True: # <<<<<<<<<<<<<< * if i == nleft: * count += nright - j */ while (1) { /* "pandas/src/generated.pyx":7854 * else: * while True: * if i == nleft: # <<<<<<<<<<<<<< * count += nright - j * break */ __pyx_t_2 = ((__pyx_v_i == __pyx_v_nleft) != 0); if (__pyx_t_2) { /* "pandas/src/generated.pyx":7855 * while True: * if i == nleft: * count += nright - j # <<<<<<<<<<<<<< * break * if j == nright: */ __pyx_v_count = (__pyx_v_count + (__pyx_v_nright - __pyx_v_j)); /* "pandas/src/generated.pyx":7856 * if i == nleft: * count += nright - j * break # <<<<<<<<<<<<<< * if j == nright: * count += nleft - i */ goto __pyx_L5_break; } /* "pandas/src/generated.pyx":7857 * count += nright - j * break * if j == nright: # <<<<<<<<<<<<<< * count += nleft - i * break */ __pyx_t_2 = ((__pyx_v_j == __pyx_v_nright) != 0); if (__pyx_t_2) { /* "pandas/src/generated.pyx":7858 * break * if j == nright: * count += nleft - i # <<<<<<<<<<<<<< * break * */ __pyx_v_count = (__pyx_v_count + (__pyx_v_nleft - __pyx_v_i)); /* "pandas/src/generated.pyx":7859 * if j == nright: * count += nleft - i * break # <<<<<<<<<<<<<< * * lval = left[i] */ goto __pyx_L5_break; } /* "pandas/src/generated.pyx":7861 * break * * lval = left[i] # <<<<<<<<<<<<<< * rval = right[j] * if lval == rval: */ __pyx_t_1 = __pyx_v_i; __pyx_v_lval = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_left.rcbuffer->pybuffer.buf, __pyx_t_1, __pyx_pybuffernd_left.diminfo[0].strides)); /* "pandas/src/generated.pyx":7862 * * lval = left[i] * rval = right[j] # <<<<<<<<<<<<<< * if lval == rval: * count += 1 */ __pyx_t_3 = __pyx_v_j; __pyx_v_rval = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_right.rcbuffer->pybuffer.buf, __pyx_t_3, __pyx_pybuffernd_right.diminfo[0].strides)); /* "pandas/src/generated.pyx":7863 * lval = left[i] * rval = right[j] * if lval == rval: # <<<<<<<<<<<<<< * count += 1 * if i < nleft - 1: */ __pyx_t_2 = ((__pyx_v_lval == __pyx_v_rval) != 0); if (__pyx_t_2) { /* "pandas/src/generated.pyx":7864 * rval = right[j] * if lval == rval: * count += 1 # <<<<<<<<<<<<<< * if i < nleft - 1: * if j < nright - 1 and right[j + 1] == rval: */ __pyx_v_count = (__pyx_v_count + 1); /* "pandas/src/generated.pyx":7865 * if lval == rval: * count += 1 * if i < nleft - 1: # <<<<<<<<<<<<<< * if j < nright - 1 and right[j + 1] == rval: * j += 1 */ __pyx_t_2 = ((__pyx_v_i < (__pyx_v_nleft - 1)) != 0); if (__pyx_t_2) { /* "pandas/src/generated.pyx":7866 * count += 1 * if i < nleft - 1: * if j < nright - 1 and right[j + 1] == rval: # <<<<<<<<<<<<<< * j += 1 * else: */ __pyx_t_2 = ((__pyx_v_j < (__pyx_v_nright - 1)) != 0); if (__pyx_t_2) { __pyx_t_4 = (__pyx_v_j + 1); __pyx_t_5 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_right.rcbuffer->pybuffer.buf, __pyx_t_4, __pyx_pybuffernd_right.diminfo[0].strides)) == __pyx_v_rval) != 0); __pyx_t_6 = __pyx_t_5; } else { __pyx_t_6 = __pyx_t_2; } if (__pyx_t_6) { /* "pandas/src/generated.pyx":7867 * if i < nleft - 1: * if j < nright - 1 and right[j + 1] == rval: * j += 1 # <<<<<<<<<<<<<< * else: * i += 1 */ __pyx_v_j = (__pyx_v_j + 1); goto __pyx_L10; } /*else*/ { /* "pandas/src/generated.pyx":7869 * j += 1 * else: * i += 1 # <<<<<<<<<<<<<< * if left[i] != rval: * j += 1 */ __pyx_v_i = (__pyx_v_i + 1); /* "pandas/src/generated.pyx":7870 * else: * i += 1 * if left[i] != rval: # <<<<<<<<<<<<<< * j += 1 * elif j < nright - 1: */ __pyx_t_7 = __pyx_v_i; __pyx_t_6 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_left.rcbuffer->pybuffer.buf, __pyx_t_7, __pyx_pybuffernd_left.diminfo[0].strides)) != __pyx_v_rval) != 0); if (__pyx_t_6) { /* "pandas/src/generated.pyx":7871 * i += 1 * if left[i] != rval: * j += 1 # <<<<<<<<<<<<<< * elif j < nright - 1: * j += 1 */ __pyx_v_j = (__pyx_v_j + 1); goto __pyx_L11; } __pyx_L11:; } __pyx_L10:; goto __pyx_L9; } /* "pandas/src/generated.pyx":7872 * if left[i] != rval: * j += 1 * elif j < nright - 1: # <<<<<<<<<<<<<< * j += 1 * if lval != right[j]: */ __pyx_t_6 = ((__pyx_v_j < (__pyx_v_nright - 1)) != 0); if (__pyx_t_6) { /* "pandas/src/generated.pyx":7873 * j += 1 * elif j < nright - 1: * j += 1 # <<<<<<<<<<<<<< * if lval != right[j]: * i += 1 */ __pyx_v_j = (__pyx_v_j + 1); /* "pandas/src/generated.pyx":7874 * elif j < nright - 1: * j += 1 * if lval != right[j]: # <<<<<<<<<<<<<< * i += 1 * else: */ __pyx_t_8 = __pyx_v_j; __pyx_t_6 = ((__pyx_v_lval != (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_right.rcbuffer->pybuffer.buf, __pyx_t_8, __pyx_pybuffernd_right.diminfo[0].strides))) != 0); if (__pyx_t_6) { /* "pandas/src/generated.pyx":7875 * j += 1 * if lval != right[j]: * i += 1 # <<<<<<<<<<<<<< * else: * # end of the road */ __pyx_v_i = (__pyx_v_i + 1); goto __pyx_L12; } __pyx_L12:; goto __pyx_L9; } /*else*/ { /* "pandas/src/generated.pyx":7878 * else: * # end of the road * break # <<<<<<<<<<<<<< * elif lval < rval: * count += 1 */ goto __pyx_L5_break; } __pyx_L9:; goto __pyx_L8; } /* "pandas/src/generated.pyx":7879 * # end of the road * break * elif lval < rval: # <<<<<<<<<<<<<< * count += 1 * i += 1 */ __pyx_t_6 = ((__pyx_v_lval < __pyx_v_rval) != 0); if (__pyx_t_6) { /* "pandas/src/generated.pyx":7880 * break * elif lval < rval: * count += 1 # <<<<<<<<<<<<<< * i += 1 * else: */ __pyx_v_count = (__pyx_v_count + 1); /* "pandas/src/generated.pyx":7881 * elif lval < rval: * count += 1 * i += 1 # <<<<<<<<<<<<<< * else: * count += 1 */ __pyx_v_i = (__pyx_v_i + 1); goto __pyx_L8; } /*else*/ { /* "pandas/src/generated.pyx":7883 * i += 1 * else: * count += 1 # <<<<<<<<<<<<<< * j += 1 * */ __pyx_v_count = (__pyx_v_count + 1); /* "pandas/src/generated.pyx":7884 * else: * count += 1 * j += 1 # <<<<<<<<<<<<<< * * lindexer = np.empty(count, dtype=np.int64) */ __pyx_v_j = (__pyx_v_j + 1); } __pyx_L8:; } __pyx_L5_break:; } __pyx_L3:; /* "pandas/src/generated.pyx":7886 * j += 1 * * lindexer = np.empty(count, dtype=np.int64) # <<<<<<<<<<<<<< * rindexer = np.empty(count, dtype=np.int64) * result = np.empty(count, dtype=np.float32) */ __pyx_t_9 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7886; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_empty); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7886; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_9 = PyInt_FromSsize_t(__pyx_v_count); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7886; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_t_11 = PyTuple_New(1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7886; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_9); __Pyx_GIVEREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_9 = PyDict_New(); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7886; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_t_12 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7886; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_int64); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7886; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_dtype, __pyx_t_13) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7886; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_13 = PyObject_Call(__pyx_t_10, __pyx_t_11, __pyx_t_9); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7886; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; if (!(likely(((__pyx_t_13) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_13, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7886; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_14 = ((PyArrayObject *)__pyx_t_13); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_lindexer.rcbuffer->pybuffer); __pyx_t_15 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_lindexer.rcbuffer->pybuffer, (PyObject*)__pyx_t_14, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_15 < 0)) { PyErr_Fetch(&__pyx_t_16, &__pyx_t_17, &__pyx_t_18); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_lindexer.rcbuffer->pybuffer, (PyObject*)__pyx_v_lindexer, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_16); Py_XDECREF(__pyx_t_17); Py_XDECREF(__pyx_t_18); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_16, __pyx_t_17, __pyx_t_18); } } __pyx_pybuffernd_lindexer.diminfo[0].strides = __pyx_pybuffernd_lindexer.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_lindexer.diminfo[0].shape = __pyx_pybuffernd_lindexer.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_15 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7886; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_14 = 0; __pyx_v_lindexer = ((PyArrayObject *)__pyx_t_13); __pyx_t_13 = 0; /* "pandas/src/generated.pyx":7887 * * lindexer = np.empty(count, dtype=np.int64) * rindexer = np.empty(count, dtype=np.int64) # <<<<<<<<<<<<<< * result = np.empty(count, dtype=np.float32) * */ __pyx_t_13 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7887; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_13, __pyx_n_s_empty); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7887; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_13 = PyInt_FromSsize_t(__pyx_v_count); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7887; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __pyx_t_11 = PyTuple_New(1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7887; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_13); __Pyx_GIVEREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_13 = PyDict_New(); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7887; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __pyx_t_10 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7887; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_int64); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7887; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; if (PyDict_SetItem(__pyx_t_13, __pyx_n_s_dtype, __pyx_t_12) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7887; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __pyx_t_12 = PyObject_Call(__pyx_t_9, __pyx_t_11, __pyx_t_13); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7887; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; if (!(likely(((__pyx_t_12) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_12, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7887; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_14 = ((PyArrayObject *)__pyx_t_12); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_rindexer.rcbuffer->pybuffer); __pyx_t_15 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_rindexer.rcbuffer->pybuffer, (PyObject*)__pyx_t_14, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_15 < 0)) { PyErr_Fetch(&__pyx_t_18, &__pyx_t_17, &__pyx_t_16); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_rindexer.rcbuffer->pybuffer, (PyObject*)__pyx_v_rindexer, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_18); Py_XDECREF(__pyx_t_17); Py_XDECREF(__pyx_t_16); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_18, __pyx_t_17, __pyx_t_16); } } __pyx_pybuffernd_rindexer.diminfo[0].strides = __pyx_pybuffernd_rindexer.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_rindexer.diminfo[0].shape = __pyx_pybuffernd_rindexer.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_15 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7887; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_14 = 0; __pyx_v_rindexer = ((PyArrayObject *)__pyx_t_12); __pyx_t_12 = 0; /* "pandas/src/generated.pyx":7888 * lindexer = np.empty(count, dtype=np.int64) * rindexer = np.empty(count, dtype=np.int64) * result = np.empty(count, dtype=np.float32) # <<<<<<<<<<<<<< * * # do it again, but populate the indexers / result */ __pyx_t_12 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7888; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_empty); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7888; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __pyx_t_12 = PyInt_FromSsize_t(__pyx_v_count); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7888; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __pyx_t_11 = PyTuple_New(1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7888; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_12); __Pyx_GIVEREF(__pyx_t_12); __pyx_t_12 = 0; __pyx_t_12 = PyDict_New(); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7888; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __pyx_t_9 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7888; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_float32); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7888; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; if (PyDict_SetItem(__pyx_t_12, __pyx_n_s_dtype, __pyx_t_10) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7888; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_t_10 = PyObject_Call(__pyx_t_13, __pyx_t_11, __pyx_t_12); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7888; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; if (!(likely(((__pyx_t_10) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_10, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7888; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_19 = ((PyArrayObject *)__pyx_t_10); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __pyx_t_15 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_t_19, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_15 < 0)) { PyErr_Fetch(&__pyx_t_16, &__pyx_t_17, &__pyx_t_18); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_v_result, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_16); Py_XDECREF(__pyx_t_17); Py_XDECREF(__pyx_t_18); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_16, __pyx_t_17, __pyx_t_18); } } __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_15 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7888; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_19 = 0; __pyx_v_result = ((PyArrayObject *)__pyx_t_10); __pyx_t_10 = 0; /* "pandas/src/generated.pyx":7892 * # do it again, but populate the indexers / result * * i = 0 # <<<<<<<<<<<<<< * j = 0 * count = 0 */ __pyx_v_i = 0; /* "pandas/src/generated.pyx":7893 * * i = 0 * j = 0 # <<<<<<<<<<<<<< * count = 0 * if nleft == 0: */ __pyx_v_j = 0; /* "pandas/src/generated.pyx":7894 * i = 0 * j = 0 * count = 0 # <<<<<<<<<<<<<< * if nleft == 0: * for j in range(nright): */ __pyx_v_count = 0; /* "pandas/src/generated.pyx":7895 * j = 0 * count = 0 * if nleft == 0: # <<<<<<<<<<<<<< * for j in range(nright): * lindexer[j] = -1 */ __pyx_t_6 = ((__pyx_v_nleft == 0) != 0); if (__pyx_t_6) { /* "pandas/src/generated.pyx":7896 * count = 0 * if nleft == 0: * for j in range(nright): # <<<<<<<<<<<<<< * lindexer[j] = -1 * rindexer[j] = j */ __pyx_t_20 = __pyx_v_nright; for (__pyx_t_21 = 0; __pyx_t_21 < __pyx_t_20; __pyx_t_21+=1) { __pyx_v_j = __pyx_t_21; /* "pandas/src/generated.pyx":7897 * if nleft == 0: * for j in range(nright): * lindexer[j] = -1 # <<<<<<<<<<<<<< * rindexer[j] = j * result[j] = right[j] */ __pyx_t_22 = __pyx_v_j; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_lindexer.rcbuffer->pybuffer.buf, __pyx_t_22, __pyx_pybuffernd_lindexer.diminfo[0].strides) = -1; /* "pandas/src/generated.pyx":7898 * for j in range(nright): * lindexer[j] = -1 * rindexer[j] = j # <<<<<<<<<<<<<< * result[j] = right[j] * elif nright == 0: */ __pyx_t_23 = __pyx_v_j; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_rindexer.rcbuffer->pybuffer.buf, __pyx_t_23, __pyx_pybuffernd_rindexer.diminfo[0].strides) = __pyx_v_j; /* "pandas/src/generated.pyx":7899 * lindexer[j] = -1 * rindexer[j] = j * result[j] = right[j] # <<<<<<<<<<<<<< * elif nright == 0: * for i in range(nright): */ __pyx_t_24 = __pyx_v_j; __pyx_t_25 = __pyx_v_j; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_25, __pyx_pybuffernd_result.diminfo[0].strides) = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_right.rcbuffer->pybuffer.buf, __pyx_t_24, __pyx_pybuffernd_right.diminfo[0].strides)); } goto __pyx_L13; } /* "pandas/src/generated.pyx":7900 * rindexer[j] = j * result[j] = right[j] * elif nright == 0: # <<<<<<<<<<<<<< * for i in range(nright): * lindexer[i] = i */ __pyx_t_6 = ((__pyx_v_nright == 0) != 0); if (__pyx_t_6) { /* "pandas/src/generated.pyx":7901 * result[j] = right[j] * elif nright == 0: * for i in range(nright): # <<<<<<<<<<<<<< * lindexer[i] = i * rindexer[i] = -1 */ __pyx_t_20 = __pyx_v_nright; for (__pyx_t_21 = 0; __pyx_t_21 < __pyx_t_20; __pyx_t_21+=1) { __pyx_v_i = __pyx_t_21; /* "pandas/src/generated.pyx":7902 * elif nright == 0: * for i in range(nright): * lindexer[i] = i # <<<<<<<<<<<<<< * rindexer[i] = -1 * result[i] = left[i] */ __pyx_t_26 = __pyx_v_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_lindexer.rcbuffer->pybuffer.buf, __pyx_t_26, __pyx_pybuffernd_lindexer.diminfo[0].strides) = __pyx_v_i; /* "pandas/src/generated.pyx":7903 * for i in range(nright): * lindexer[i] = i * rindexer[i] = -1 # <<<<<<<<<<<<<< * result[i] = left[i] * else: */ __pyx_t_27 = __pyx_v_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_rindexer.rcbuffer->pybuffer.buf, __pyx_t_27, __pyx_pybuffernd_rindexer.diminfo[0].strides) = -1; /* "pandas/src/generated.pyx":7904 * lindexer[i] = i * rindexer[i] = -1 * result[i] = left[i] # <<<<<<<<<<<<<< * else: * while True: */ __pyx_t_28 = __pyx_v_i; __pyx_t_29 = __pyx_v_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_29, __pyx_pybuffernd_result.diminfo[0].strides) = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_left.rcbuffer->pybuffer.buf, __pyx_t_28, __pyx_pybuffernd_left.diminfo[0].strides)); } goto __pyx_L13; } /*else*/ { /* "pandas/src/generated.pyx":7906 * result[i] = left[i] * else: * while True: # <<<<<<<<<<<<<< * if i == nleft: * while j < nright: */ while (1) { /* "pandas/src/generated.pyx":7907 * else: * while True: * if i == nleft: # <<<<<<<<<<<<<< * while j < nright: * lindexer[count] = -1 */ __pyx_t_6 = ((__pyx_v_i == __pyx_v_nleft) != 0); if (__pyx_t_6) { /* "pandas/src/generated.pyx":7908 * while True: * if i == nleft: * while j < nright: # <<<<<<<<<<<<<< * lindexer[count] = -1 * rindexer[count] = j */ while (1) { __pyx_t_6 = ((__pyx_v_j < __pyx_v_nright) != 0); if (!__pyx_t_6) break; /* "pandas/src/generated.pyx":7909 * if i == nleft: * while j < nright: * lindexer[count] = -1 # <<<<<<<<<<<<<< * rindexer[count] = j * result[count] = right[j] */ __pyx_t_20 = __pyx_v_count; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_lindexer.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_lindexer.diminfo[0].strides) = -1; /* "pandas/src/generated.pyx":7910 * while j < nright: * lindexer[count] = -1 * rindexer[count] = j # <<<<<<<<<<<<<< * result[count] = right[j] * count += 1 */ __pyx_t_21 = __pyx_v_count; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_rindexer.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_rindexer.diminfo[0].strides) = __pyx_v_j; /* "pandas/src/generated.pyx":7911 * lindexer[count] = -1 * rindexer[count] = j * result[count] = right[j] # <<<<<<<<<<<<<< * count += 1 * j += 1 */ __pyx_t_30 = __pyx_v_j; __pyx_t_31 = __pyx_v_count; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_31, __pyx_pybuffernd_result.diminfo[0].strides) = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_right.rcbuffer->pybuffer.buf, __pyx_t_30, __pyx_pybuffernd_right.diminfo[0].strides)); /* "pandas/src/generated.pyx":7912 * rindexer[count] = j * result[count] = right[j] * count += 1 # <<<<<<<<<<<<<< * j += 1 * break */ __pyx_v_count = (__pyx_v_count + 1); /* "pandas/src/generated.pyx":7913 * result[count] = right[j] * count += 1 * j += 1 # <<<<<<<<<<<<<< * break * if j == nright: */ __pyx_v_j = (__pyx_v_j + 1); } /* "pandas/src/generated.pyx":7914 * count += 1 * j += 1 * break # <<<<<<<<<<<<<< * if j == nright: * while i < nleft: */ goto __pyx_L19_break; } /* "pandas/src/generated.pyx":7915 * j += 1 * break * if j == nright: # <<<<<<<<<<<<<< * while i < nleft: * lindexer[count] = i */ __pyx_t_6 = ((__pyx_v_j == __pyx_v_nright) != 0); if (__pyx_t_6) { /* "pandas/src/generated.pyx":7916 * break * if j == nright: * while i < nleft: # <<<<<<<<<<<<<< * lindexer[count] = i * rindexer[count] = -1 */ while (1) { __pyx_t_6 = ((__pyx_v_i < __pyx_v_nleft) != 0); if (!__pyx_t_6) break; /* "pandas/src/generated.pyx":7917 * if j == nright: * while i < nleft: * lindexer[count] = i # <<<<<<<<<<<<<< * rindexer[count] = -1 * result[count] = left[i] */ __pyx_t_32 = __pyx_v_count; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_lindexer.rcbuffer->pybuffer.buf, __pyx_t_32, __pyx_pybuffernd_lindexer.diminfo[0].strides) = __pyx_v_i; /* "pandas/src/generated.pyx":7918 * while i < nleft: * lindexer[count] = i * rindexer[count] = -1 # <<<<<<<<<<<<<< * result[count] = left[i] * count += 1 */ __pyx_t_33 = __pyx_v_count; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_rindexer.rcbuffer->pybuffer.buf, __pyx_t_33, __pyx_pybuffernd_rindexer.diminfo[0].strides) = -1; /* "pandas/src/generated.pyx":7919 * lindexer[count] = i * rindexer[count] = -1 * result[count] = left[i] # <<<<<<<<<<<<<< * count += 1 * i += 1 */ __pyx_t_34 = __pyx_v_i; __pyx_t_35 = __pyx_v_count; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_35, __pyx_pybuffernd_result.diminfo[0].strides) = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_left.rcbuffer->pybuffer.buf, __pyx_t_34, __pyx_pybuffernd_left.diminfo[0].strides)); /* "pandas/src/generated.pyx":7920 * rindexer[count] = -1 * result[count] = left[i] * count += 1 # <<<<<<<<<<<<<< * i += 1 * break */ __pyx_v_count = (__pyx_v_count + 1); /* "pandas/src/generated.pyx":7921 * result[count] = left[i] * count += 1 * i += 1 # <<<<<<<<<<<<<< * break * */ __pyx_v_i = (__pyx_v_i + 1); } /* "pandas/src/generated.pyx":7922 * count += 1 * i += 1 * break # <<<<<<<<<<<<<< * * lval = left[i] */ goto __pyx_L19_break; } /* "pandas/src/generated.pyx":7924 * break * * lval = left[i] # <<<<<<<<<<<<<< * rval = right[j] * */ __pyx_t_36 = __pyx_v_i; __pyx_v_lval = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_left.rcbuffer->pybuffer.buf, __pyx_t_36, __pyx_pybuffernd_left.diminfo[0].strides)); /* "pandas/src/generated.pyx":7925 * * lval = left[i] * rval = right[j] # <<<<<<<<<<<<<< * * if lval == rval: */ __pyx_t_37 = __pyx_v_j; __pyx_v_rval = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_right.rcbuffer->pybuffer.buf, __pyx_t_37, __pyx_pybuffernd_right.diminfo[0].strides)); /* "pandas/src/generated.pyx":7927 * rval = right[j] * * if lval == rval: # <<<<<<<<<<<<<< * lindexer[count] = i * rindexer[count] = j */ __pyx_t_6 = ((__pyx_v_lval == __pyx_v_rval) != 0); if (__pyx_t_6) { /* "pandas/src/generated.pyx":7928 * * if lval == rval: * lindexer[count] = i # <<<<<<<<<<<<<< * rindexer[count] = j * result[count] = lval */ __pyx_t_38 = __pyx_v_count; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_lindexer.rcbuffer->pybuffer.buf, __pyx_t_38, __pyx_pybuffernd_lindexer.diminfo[0].strides) = __pyx_v_i; /* "pandas/src/generated.pyx":7929 * if lval == rval: * lindexer[count] = i * rindexer[count] = j # <<<<<<<<<<<<<< * result[count] = lval * count += 1 */ __pyx_t_39 = __pyx_v_count; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_rindexer.rcbuffer->pybuffer.buf, __pyx_t_39, __pyx_pybuffernd_rindexer.diminfo[0].strides) = __pyx_v_j; /* "pandas/src/generated.pyx":7930 * lindexer[count] = i * rindexer[count] = j * result[count] = lval # <<<<<<<<<<<<<< * count += 1 * if i < nleft - 1: */ __pyx_t_40 = __pyx_v_count; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_40, __pyx_pybuffernd_result.diminfo[0].strides) = __pyx_v_lval; /* "pandas/src/generated.pyx":7931 * rindexer[count] = j * result[count] = lval * count += 1 # <<<<<<<<<<<<<< * if i < nleft - 1: * if j < nright - 1 and right[j + 1] == rval: */ __pyx_v_count = (__pyx_v_count + 1); /* "pandas/src/generated.pyx":7932 * result[count] = lval * count += 1 * if i < nleft - 1: # <<<<<<<<<<<<<< * if j < nright - 1 and right[j + 1] == rval: * j += 1 */ __pyx_t_6 = ((__pyx_v_i < (__pyx_v_nleft - 1)) != 0); if (__pyx_t_6) { /* "pandas/src/generated.pyx":7933 * count += 1 * if i < nleft - 1: * if j < nright - 1 and right[j + 1] == rval: # <<<<<<<<<<<<<< * j += 1 * else: */ __pyx_t_6 = ((__pyx_v_j < (__pyx_v_nright - 1)) != 0); if (__pyx_t_6) { __pyx_t_41 = (__pyx_v_j + 1); __pyx_t_2 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_right.rcbuffer->pybuffer.buf, __pyx_t_41, __pyx_pybuffernd_right.diminfo[0].strides)) == __pyx_v_rval) != 0); __pyx_t_5 = __pyx_t_2; } else { __pyx_t_5 = __pyx_t_6; } if (__pyx_t_5) { /* "pandas/src/generated.pyx":7934 * if i < nleft - 1: * if j < nright - 1 and right[j + 1] == rval: * j += 1 # <<<<<<<<<<<<<< * else: * i += 1 */ __pyx_v_j = (__pyx_v_j + 1); goto __pyx_L28; } /*else*/ { /* "pandas/src/generated.pyx":7936 * j += 1 * else: * i += 1 # <<<<<<<<<<<<<< * if left[i] != rval: * j += 1 */ __pyx_v_i = (__pyx_v_i + 1); /* "pandas/src/generated.pyx":7937 * else: * i += 1 * if left[i] != rval: # <<<<<<<<<<<<<< * j += 1 * elif j < nright - 1: */ __pyx_t_42 = __pyx_v_i; __pyx_t_5 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_left.rcbuffer->pybuffer.buf, __pyx_t_42, __pyx_pybuffernd_left.diminfo[0].strides)) != __pyx_v_rval) != 0); if (__pyx_t_5) { /* "pandas/src/generated.pyx":7938 * i += 1 * if left[i] != rval: * j += 1 # <<<<<<<<<<<<<< * elif j < nright - 1: * j += 1 */ __pyx_v_j = (__pyx_v_j + 1); goto __pyx_L29; } __pyx_L29:; } __pyx_L28:; goto __pyx_L27; } /* "pandas/src/generated.pyx":7939 * if left[i] != rval: * j += 1 * elif j < nright - 1: # <<<<<<<<<<<<<< * j += 1 * if lval != right[j]: */ __pyx_t_5 = ((__pyx_v_j < (__pyx_v_nright - 1)) != 0); if (__pyx_t_5) { /* "pandas/src/generated.pyx":7940 * j += 1 * elif j < nright - 1: * j += 1 # <<<<<<<<<<<<<< * if lval != right[j]: * i += 1 */ __pyx_v_j = (__pyx_v_j + 1); /* "pandas/src/generated.pyx":7941 * elif j < nright - 1: * j += 1 * if lval != right[j]: # <<<<<<<<<<<<<< * i += 1 * else: */ __pyx_t_43 = __pyx_v_j; __pyx_t_5 = ((__pyx_v_lval != (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_right.rcbuffer->pybuffer.buf, __pyx_t_43, __pyx_pybuffernd_right.diminfo[0].strides))) != 0); if (__pyx_t_5) { /* "pandas/src/generated.pyx":7942 * j += 1 * if lval != right[j]: * i += 1 # <<<<<<<<<<<<<< * else: * # end of the road */ __pyx_v_i = (__pyx_v_i + 1); goto __pyx_L30; } __pyx_L30:; goto __pyx_L27; } /*else*/ { /* "pandas/src/generated.pyx":7945 * else: * # end of the road * break # <<<<<<<<<<<<<< * elif lval < rval: * lindexer[count] = i */ goto __pyx_L19_break; } __pyx_L27:; goto __pyx_L26; } /* "pandas/src/generated.pyx":7946 * # end of the road * break * elif lval < rval: # <<<<<<<<<<<<<< * lindexer[count] = i * rindexer[count] = -1 */ __pyx_t_5 = ((__pyx_v_lval < __pyx_v_rval) != 0); if (__pyx_t_5) { /* "pandas/src/generated.pyx":7947 * break * elif lval < rval: * lindexer[count] = i # <<<<<<<<<<<<<< * rindexer[count] = -1 * result[count] = lval */ __pyx_t_44 = __pyx_v_count; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_lindexer.rcbuffer->pybuffer.buf, __pyx_t_44, __pyx_pybuffernd_lindexer.diminfo[0].strides) = __pyx_v_i; /* "pandas/src/generated.pyx":7948 * elif lval < rval: * lindexer[count] = i * rindexer[count] = -1 # <<<<<<<<<<<<<< * result[count] = lval * count += 1 */ __pyx_t_45 = __pyx_v_count; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_rindexer.rcbuffer->pybuffer.buf, __pyx_t_45, __pyx_pybuffernd_rindexer.diminfo[0].strides) = -1; /* "pandas/src/generated.pyx":7949 * lindexer[count] = i * rindexer[count] = -1 * result[count] = lval # <<<<<<<<<<<<<< * count += 1 * i += 1 */ __pyx_t_46 = __pyx_v_count; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_46, __pyx_pybuffernd_result.diminfo[0].strides) = __pyx_v_lval; /* "pandas/src/generated.pyx":7950 * rindexer[count] = -1 * result[count] = lval * count += 1 # <<<<<<<<<<<<<< * i += 1 * else: */ __pyx_v_count = (__pyx_v_count + 1); /* "pandas/src/generated.pyx":7951 * result[count] = lval * count += 1 * i += 1 # <<<<<<<<<<<<<< * else: * lindexer[count] = -1 */ __pyx_v_i = (__pyx_v_i + 1); goto __pyx_L26; } /*else*/ { /* "pandas/src/generated.pyx":7953 * i += 1 * else: * lindexer[count] = -1 # <<<<<<<<<<<<<< * rindexer[count] = j * result[count] = rval */ __pyx_t_47 = __pyx_v_count; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_lindexer.rcbuffer->pybuffer.buf, __pyx_t_47, __pyx_pybuffernd_lindexer.diminfo[0].strides) = -1; /* "pandas/src/generated.pyx":7954 * else: * lindexer[count] = -1 * rindexer[count] = j # <<<<<<<<<<<<<< * result[count] = rval * count += 1 */ __pyx_t_48 = __pyx_v_count; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_rindexer.rcbuffer->pybuffer.buf, __pyx_t_48, __pyx_pybuffernd_rindexer.diminfo[0].strides) = __pyx_v_j; /* "pandas/src/generated.pyx":7955 * lindexer[count] = -1 * rindexer[count] = j * result[count] = rval # <<<<<<<<<<<<<< * count += 1 * j += 1 */ __pyx_t_49 = __pyx_v_count; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_49, __pyx_pybuffernd_result.diminfo[0].strides) = __pyx_v_rval; /* "pandas/src/generated.pyx":7956 * rindexer[count] = j * result[count] = rval * count += 1 # <<<<<<<<<<<<<< * j += 1 * */ __pyx_v_count = (__pyx_v_count + 1); /* "pandas/src/generated.pyx":7957 * result[count] = rval * count += 1 * j += 1 # <<<<<<<<<<<<<< * * return result, lindexer, rindexer */ __pyx_v_j = (__pyx_v_j + 1); } __pyx_L26:; } __pyx_L19_break:; } __pyx_L13:; /* "pandas/src/generated.pyx":7959 * j += 1 * * return result, lindexer, rindexer # <<<<<<<<<<<<<< * * @cython.wraparound(False) */ __Pyx_XDECREF(__pyx_r); __pyx_t_10 = PyTuple_New(3); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7959; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_INCREF(((PyObject *)__pyx_v_result)); PyTuple_SET_ITEM(__pyx_t_10, 0, ((PyObject *)__pyx_v_result)); __Pyx_GIVEREF(((PyObject *)__pyx_v_result)); __Pyx_INCREF(((PyObject *)__pyx_v_lindexer)); PyTuple_SET_ITEM(__pyx_t_10, 1, ((PyObject *)__pyx_v_lindexer)); __Pyx_GIVEREF(((PyObject *)__pyx_v_lindexer)); __Pyx_INCREF(((PyObject *)__pyx_v_rindexer)); PyTuple_SET_ITEM(__pyx_t_10, 2, ((PyObject *)__pyx_v_rindexer)); __Pyx_GIVEREF(((PyObject *)__pyx_v_rindexer)); __pyx_r = __pyx_t_10; __pyx_t_10 = 0; goto __pyx_L0; /* "pandas/src/generated.pyx":7834 * @cython.wraparound(False) * @cython.boundscheck(False) * def outer_join_indexer_float32(ndarray[float32_t] left, # <<<<<<<<<<<<<< * ndarray[float32_t] right): * cdef: */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_9); __Pyx_XDECREF(__pyx_t_10); __Pyx_XDECREF(__pyx_t_11); __Pyx_XDECREF(__pyx_t_12); __Pyx_XDECREF(__pyx_t_13); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_left.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_lindexer.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_right.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_rindexer.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.outer_join_indexer_float32", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_left.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_lindexer.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_right.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_rindexer.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_lindexer); __Pyx_XDECREF((PyObject *)__pyx_v_rindexer); __Pyx_XDECREF((PyObject *)__pyx_v_result); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":7963 * @cython.wraparound(False) * @cython.boundscheck(False) * def outer_join_indexer_object(ndarray[object] left, # <<<<<<<<<<<<<< * ndarray[object] right): * cdef: */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_479outer_join_indexer_object(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_479outer_join_indexer_object = {__Pyx_NAMESTR("outer_join_indexer_object"), (PyCFunction)__pyx_pw_6pandas_5algos_479outer_join_indexer_object, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_479outer_join_indexer_object(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_left = 0; PyArrayObject *__pyx_v_right = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("outer_join_indexer_object (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_left,&__pyx_n_s_right,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_left)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_right)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("outer_join_indexer_object", 1, 2, 2, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7963; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "outer_join_indexer_object") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7963; __pyx_clineno = __LINE__; goto __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_left = ((PyArrayObject *)values[0]); __pyx_v_right = ((PyArrayObject *)values[1]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("outer_join_indexer_object", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7963; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.outer_join_indexer_object", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_left), __pyx_ptype_5numpy_ndarray, 1, "left", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7963; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_right), __pyx_ptype_5numpy_ndarray, 1, "right", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7964; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_478outer_join_indexer_object(__pyx_self, __pyx_v_left, __pyx_v_right); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5algos_478outer_join_indexer_object(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_left, PyArrayObject *__pyx_v_right) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_nright; Py_ssize_t __pyx_v_nleft; Py_ssize_t __pyx_v_count; PyObject *__pyx_v_lval = 0; PyObject *__pyx_v_rval = 0; PyArrayObject *__pyx_v_lindexer = 0; PyArrayObject *__pyx_v_rindexer = 0; PyArrayObject *__pyx_v_result = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_left; __Pyx_Buffer __pyx_pybuffer_left; __Pyx_LocalBuf_ND __pyx_pybuffernd_lindexer; __Pyx_Buffer __pyx_pybuffer_lindexer; __Pyx_LocalBuf_ND __pyx_pybuffernd_result; __Pyx_Buffer __pyx_pybuffer_result; __Pyx_LocalBuf_ND __pyx_pybuffernd_right; __Pyx_Buffer __pyx_pybuffer_right; __Pyx_LocalBuf_ND __pyx_pybuffernd_rindexer; __Pyx_Buffer __pyx_pybuffer_rindexer; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; Py_ssize_t __pyx_t_4; Py_ssize_t __pyx_t_5; PyObject *__pyx_t_6 = NULL; int __pyx_t_7; int __pyx_t_8; Py_ssize_t __pyx_t_9; 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; PyObject *__pyx_t_16 = NULL; PyObject *__pyx_t_17 = NULL; PyObject *__pyx_t_18 = NULL; PyArrayObject *__pyx_t_19 = NULL; 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; PyObject **__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; Py_ssize_t __pyx_t_37; Py_ssize_t __pyx_t_38; Py_ssize_t __pyx_t_39; Py_ssize_t __pyx_t_40; Py_ssize_t __pyx_t_41; Py_ssize_t __pyx_t_42; Py_ssize_t __pyx_t_43; Py_ssize_t __pyx_t_44; Py_ssize_t __pyx_t_45; Py_ssize_t __pyx_t_46; Py_ssize_t __pyx_t_47; Py_ssize_t __pyx_t_48; Py_ssize_t __pyx_t_49; Py_ssize_t __pyx_t_50; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("outer_join_indexer_object", 0); __pyx_pybuffer_lindexer.pybuffer.buf = NULL; __pyx_pybuffer_lindexer.refcount = 0; __pyx_pybuffernd_lindexer.data = NULL; __pyx_pybuffernd_lindexer.rcbuffer = &__pyx_pybuffer_lindexer; __pyx_pybuffer_rindexer.pybuffer.buf = NULL; __pyx_pybuffer_rindexer.refcount = 0; __pyx_pybuffernd_rindexer.data = NULL; __pyx_pybuffernd_rindexer.rcbuffer = &__pyx_pybuffer_rindexer; __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_left.pybuffer.buf = NULL; __pyx_pybuffer_left.refcount = 0; __pyx_pybuffernd_left.data = NULL; __pyx_pybuffernd_left.rcbuffer = &__pyx_pybuffer_left; __pyx_pybuffer_right.pybuffer.buf = NULL; __pyx_pybuffer_right.refcount = 0; __pyx_pybuffernd_right.data = NULL; __pyx_pybuffernd_right.rcbuffer = &__pyx_pybuffer_right; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_left.rcbuffer->pybuffer, (PyObject*)__pyx_v_left, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7963; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_left.diminfo[0].strides = __pyx_pybuffernd_left.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_left.diminfo[0].shape = __pyx_pybuffernd_left.rcbuffer->pybuffer.shape[0]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_right.rcbuffer->pybuffer, (PyObject*)__pyx_v_right, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7963; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_right.diminfo[0].strides = __pyx_pybuffernd_right.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_right.diminfo[0].shape = __pyx_pybuffernd_right.rcbuffer->pybuffer.shape[0]; /* "pandas/src/generated.pyx":7971 * ndarray[object] result * * nleft = len(left) # <<<<<<<<<<<<<< * nright = len(right) * */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_left)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7971; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_nleft = __pyx_t_1; /* "pandas/src/generated.pyx":7972 * * nleft = len(left) * nright = len(right) # <<<<<<<<<<<<<< * * i = 0 */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_right)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7972; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_nright = __pyx_t_1; /* "pandas/src/generated.pyx":7974 * nright = len(right) * * i = 0 # <<<<<<<<<<<<<< * j = 0 * count = 0 */ __pyx_v_i = 0; /* "pandas/src/generated.pyx":7975 * * i = 0 * j = 0 # <<<<<<<<<<<<<< * count = 0 * if nleft == 0: */ __pyx_v_j = 0; /* "pandas/src/generated.pyx":7976 * i = 0 * j = 0 * count = 0 # <<<<<<<<<<<<<< * if nleft == 0: * count = nright */ __pyx_v_count = 0; /* "pandas/src/generated.pyx":7977 * j = 0 * count = 0 * if nleft == 0: # <<<<<<<<<<<<<< * count = nright * elif nright == 0: */ __pyx_t_2 = ((__pyx_v_nleft == 0) != 0); if (__pyx_t_2) { /* "pandas/src/generated.pyx":7978 * count = 0 * if nleft == 0: * count = nright # <<<<<<<<<<<<<< * elif nright == 0: * count = nleft */ __pyx_v_count = __pyx_v_nright; goto __pyx_L3; } /* "pandas/src/generated.pyx":7979 * if nleft == 0: * count = nright * elif nright == 0: # <<<<<<<<<<<<<< * count = nleft * else: */ __pyx_t_2 = ((__pyx_v_nright == 0) != 0); if (__pyx_t_2) { /* "pandas/src/generated.pyx":7980 * count = nright * elif nright == 0: * count = nleft # <<<<<<<<<<<<<< * else: * while True: */ __pyx_v_count = __pyx_v_nleft; goto __pyx_L3; } /*else*/ { /* "pandas/src/generated.pyx":7982 * count = nleft * else: * while True: # <<<<<<<<<<<<<< * if i == nleft: * count += nright - j */ while (1) { /* "pandas/src/generated.pyx":7983 * else: * while True: * if i == nleft: # <<<<<<<<<<<<<< * count += nright - j * break */ __pyx_t_2 = ((__pyx_v_i == __pyx_v_nleft) != 0); if (__pyx_t_2) { /* "pandas/src/generated.pyx":7984 * while True: * if i == nleft: * count += nright - j # <<<<<<<<<<<<<< * break * if j == nright: */ __pyx_v_count = (__pyx_v_count + (__pyx_v_nright - __pyx_v_j)); /* "pandas/src/generated.pyx":7985 * if i == nleft: * count += nright - j * break # <<<<<<<<<<<<<< * if j == nright: * count += nleft - i */ goto __pyx_L5_break; } /* "pandas/src/generated.pyx":7986 * count += nright - j * break * if j == nright: # <<<<<<<<<<<<<< * count += nleft - i * break */ __pyx_t_2 = ((__pyx_v_j == __pyx_v_nright) != 0); if (__pyx_t_2) { /* "pandas/src/generated.pyx":7987 * break * if j == nright: * count += nleft - i # <<<<<<<<<<<<<< * break * */ __pyx_v_count = (__pyx_v_count + (__pyx_v_nleft - __pyx_v_i)); /* "pandas/src/generated.pyx":7988 * if j == nright: * count += nleft - i * break # <<<<<<<<<<<<<< * * lval = left[i] */ goto __pyx_L5_break; } /* "pandas/src/generated.pyx":7990 * break * * lval = left[i] # <<<<<<<<<<<<<< * rval = right[j] * if lval == rval: */ __pyx_t_1 = __pyx_v_i; __pyx_t_3 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_left.rcbuffer->pybuffer.buf, __pyx_t_1, __pyx_pybuffernd_left.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_3); __Pyx_XDECREF_SET(__pyx_v_lval, __pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/generated.pyx":7991 * * lval = left[i] * rval = right[j] # <<<<<<<<<<<<<< * if lval == rval: * count += 1 */ __pyx_t_4 = __pyx_v_j; __pyx_t_3 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_right.rcbuffer->pybuffer.buf, __pyx_t_4, __pyx_pybuffernd_right.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_3); __Pyx_XDECREF_SET(__pyx_v_rval, __pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/generated.pyx":7992 * lval = left[i] * rval = right[j] * if lval == rval: # <<<<<<<<<<<<<< * count += 1 * if i < nleft - 1: */ __pyx_t_3 = PyObject_RichCompare(__pyx_v_lval, __pyx_v_rval, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7992; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7992; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_2) { /* "pandas/src/generated.pyx":7993 * rval = right[j] * if lval == rval: * count += 1 # <<<<<<<<<<<<<< * if i < nleft - 1: * if j < nright - 1 and right[j + 1] == rval: */ __pyx_v_count = (__pyx_v_count + 1); /* "pandas/src/generated.pyx":7994 * if lval == rval: * count += 1 * if i < nleft - 1: # <<<<<<<<<<<<<< * if j < nright - 1 and right[j + 1] == rval: * j += 1 */ __pyx_t_2 = ((__pyx_v_i < (__pyx_v_nleft - 1)) != 0); if (__pyx_t_2) { /* "pandas/src/generated.pyx":7995 * count += 1 * if i < nleft - 1: * if j < nright - 1 and right[j + 1] == rval: # <<<<<<<<<<<<<< * j += 1 * else: */ __pyx_t_2 = (__pyx_v_j < (__pyx_v_nright - 1)); if (__pyx_t_2) { __pyx_t_5 = (__pyx_v_j + 1); __pyx_t_3 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_right.rcbuffer->pybuffer.buf, __pyx_t_5, __pyx_pybuffernd_right.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_3); __pyx_t_6 = PyObject_RichCompare(__pyx_t_3, __pyx_v_rval, Py_EQ); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7995; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7995; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_8 = __pyx_t_7; } else { __pyx_t_8 = __pyx_t_2; } if (__pyx_t_8) { /* "pandas/src/generated.pyx":7996 * if i < nleft - 1: * if j < nright - 1 and right[j + 1] == rval: * j += 1 # <<<<<<<<<<<<<< * else: * i += 1 */ __pyx_v_j = (__pyx_v_j + 1); goto __pyx_L10; } /*else*/ { /* "pandas/src/generated.pyx":7998 * j += 1 * else: * i += 1 # <<<<<<<<<<<<<< * if left[i] != rval: * j += 1 */ __pyx_v_i = (__pyx_v_i + 1); /* "pandas/src/generated.pyx":7999 * else: * i += 1 * if left[i] != rval: # <<<<<<<<<<<<<< * j += 1 * elif j < nright - 1: */ __pyx_t_9 = __pyx_v_i; __pyx_t_6 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_left.rcbuffer->pybuffer.buf, __pyx_t_9, __pyx_pybuffernd_left.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_6); __pyx_t_3 = PyObject_RichCompare(__pyx_t_6, __pyx_v_rval, Py_NE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7999; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7999; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_8) { /* "pandas/src/generated.pyx":8000 * i += 1 * if left[i] != rval: * j += 1 # <<<<<<<<<<<<<< * elif j < nright - 1: * j += 1 */ __pyx_v_j = (__pyx_v_j + 1); goto __pyx_L11; } __pyx_L11:; } __pyx_L10:; goto __pyx_L9; } /* "pandas/src/generated.pyx":8001 * if left[i] != rval: * j += 1 * elif j < nright - 1: # <<<<<<<<<<<<<< * j += 1 * if lval != right[j]: */ __pyx_t_8 = ((__pyx_v_j < (__pyx_v_nright - 1)) != 0); if (__pyx_t_8) { /* "pandas/src/generated.pyx":8002 * j += 1 * elif j < nright - 1: * j += 1 # <<<<<<<<<<<<<< * if lval != right[j]: * i += 1 */ __pyx_v_j = (__pyx_v_j + 1); /* "pandas/src/generated.pyx":8003 * elif j < nright - 1: * j += 1 * if lval != right[j]: # <<<<<<<<<<<<<< * i += 1 * else: */ __pyx_t_10 = __pyx_v_j; __pyx_t_3 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_right.rcbuffer->pybuffer.buf, __pyx_t_10, __pyx_pybuffernd_right.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_3); __pyx_t_6 = PyObject_RichCompare(__pyx_v_lval, __pyx_t_3, Py_NE); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8003; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8003; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (__pyx_t_8) { /* "pandas/src/generated.pyx":8004 * j += 1 * if lval != right[j]: * i += 1 # <<<<<<<<<<<<<< * else: * # end of the road */ __pyx_v_i = (__pyx_v_i + 1); goto __pyx_L12; } __pyx_L12:; goto __pyx_L9; } /*else*/ { /* "pandas/src/generated.pyx":8007 * else: * # end of the road * break # <<<<<<<<<<<<<< * elif lval < rval: * count += 1 */ goto __pyx_L5_break; } __pyx_L9:; goto __pyx_L8; } /* "pandas/src/generated.pyx":8008 * # end of the road * break * elif lval < rval: # <<<<<<<<<<<<<< * count += 1 * i += 1 */ __pyx_t_6 = PyObject_RichCompare(__pyx_v_lval, __pyx_v_rval, Py_LT); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8008; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8008; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (__pyx_t_8) { /* "pandas/src/generated.pyx":8009 * break * elif lval < rval: * count += 1 # <<<<<<<<<<<<<< * i += 1 * else: */ __pyx_v_count = (__pyx_v_count + 1); /* "pandas/src/generated.pyx":8010 * elif lval < rval: * count += 1 * i += 1 # <<<<<<<<<<<<<< * else: * count += 1 */ __pyx_v_i = (__pyx_v_i + 1); goto __pyx_L8; } /*else*/ { /* "pandas/src/generated.pyx":8012 * i += 1 * else: * count += 1 # <<<<<<<<<<<<<< * j += 1 * */ __pyx_v_count = (__pyx_v_count + 1); /* "pandas/src/generated.pyx":8013 * else: * count += 1 * j += 1 # <<<<<<<<<<<<<< * * lindexer = np.empty(count, dtype=np.int64) */ __pyx_v_j = (__pyx_v_j + 1); } __pyx_L8:; } __pyx_L5_break:; } __pyx_L3:; /* "pandas/src/generated.pyx":8015 * j += 1 * * lindexer = np.empty(count, dtype=np.int64) # <<<<<<<<<<<<<< * rindexer = np.empty(count, dtype=np.int64) * result = np.empty(count, dtype=object) */ __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8015; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_empty); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8015; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyInt_FromSsize_t(__pyx_v_count); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8015; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_11 = PyTuple_New(1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8015; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyDict_New(); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8015; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_12 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8015; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_int64); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8015; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_dtype, __pyx_t_13) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8015; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_13 = PyObject_Call(__pyx_t_3, __pyx_t_11, __pyx_t_6); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8015; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (!(likely(((__pyx_t_13) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_13, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8015; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_14 = ((PyArrayObject *)__pyx_t_13); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_lindexer.rcbuffer->pybuffer); __pyx_t_15 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_lindexer.rcbuffer->pybuffer, (PyObject*)__pyx_t_14, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_15 < 0)) { PyErr_Fetch(&__pyx_t_16, &__pyx_t_17, &__pyx_t_18); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_lindexer.rcbuffer->pybuffer, (PyObject*)__pyx_v_lindexer, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_16); Py_XDECREF(__pyx_t_17); Py_XDECREF(__pyx_t_18); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_16, __pyx_t_17, __pyx_t_18); } } __pyx_pybuffernd_lindexer.diminfo[0].strides = __pyx_pybuffernd_lindexer.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_lindexer.diminfo[0].shape = __pyx_pybuffernd_lindexer.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_15 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8015; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_14 = 0; __pyx_v_lindexer = ((PyArrayObject *)__pyx_t_13); __pyx_t_13 = 0; /* "pandas/src/generated.pyx":8016 * * lindexer = np.empty(count, dtype=np.int64) * rindexer = np.empty(count, dtype=np.int64) # <<<<<<<<<<<<<< * result = np.empty(count, dtype=object) * */ __pyx_t_13 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8016; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_13, __pyx_n_s_empty); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8016; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_13 = PyInt_FromSsize_t(__pyx_v_count); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8016; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __pyx_t_11 = PyTuple_New(1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8016; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_13); __Pyx_GIVEREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_13 = PyDict_New(); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8016; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8016; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_int64); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8016; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (PyDict_SetItem(__pyx_t_13, __pyx_n_s_dtype, __pyx_t_12) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8016; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __pyx_t_12 = PyObject_Call(__pyx_t_6, __pyx_t_11, __pyx_t_13); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8016; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 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_filename = __pyx_f[2]; __pyx_lineno = 8016; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_14 = ((PyArrayObject *)__pyx_t_12); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_rindexer.rcbuffer->pybuffer); __pyx_t_15 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_rindexer.rcbuffer->pybuffer, (PyObject*)__pyx_t_14, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_15 < 0)) { PyErr_Fetch(&__pyx_t_18, &__pyx_t_17, &__pyx_t_16); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_rindexer.rcbuffer->pybuffer, (PyObject*)__pyx_v_rindexer, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_18); Py_XDECREF(__pyx_t_17); Py_XDECREF(__pyx_t_16); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_18, __pyx_t_17, __pyx_t_16); } } __pyx_pybuffernd_rindexer.diminfo[0].strides = __pyx_pybuffernd_rindexer.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_rindexer.diminfo[0].shape = __pyx_pybuffernd_rindexer.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_15 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8016; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_14 = 0; __pyx_v_rindexer = ((PyArrayObject *)__pyx_t_12); __pyx_t_12 = 0; /* "pandas/src/generated.pyx":8017 * lindexer = np.empty(count, dtype=np.int64) * rindexer = np.empty(count, dtype=np.int64) * result = np.empty(count, dtype=object) # <<<<<<<<<<<<<< * * # do it again, but populate the indexers / result */ __pyx_t_12 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8017; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_empty); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8017; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __pyx_t_12 = PyInt_FromSsize_t(__pyx_v_count); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8017; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __pyx_t_11 = PyTuple_New(1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8017; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_12); __Pyx_GIVEREF(__pyx_t_12); __pyx_t_12 = 0; __pyx_t_12 = PyDict_New(); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8017; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); if (PyDict_SetItem(__pyx_t_12, __pyx_n_s_dtype, __pyx_builtin_object) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8017; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_6 = PyObject_Call(__pyx_t_13, __pyx_t_11, __pyx_t_12); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8017; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8017; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_19 = ((PyArrayObject *)__pyx_t_6); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __pyx_t_15 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_t_19, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_15 < 0)) { PyErr_Fetch(&__pyx_t_16, &__pyx_t_17, &__pyx_t_18); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_v_result, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_16); Py_XDECREF(__pyx_t_17); Py_XDECREF(__pyx_t_18); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_16, __pyx_t_17, __pyx_t_18); } } __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_15 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8017; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_19 = 0; __pyx_v_result = ((PyArrayObject *)__pyx_t_6); __pyx_t_6 = 0; /* "pandas/src/generated.pyx":8021 * # do it again, but populate the indexers / result * * i = 0 # <<<<<<<<<<<<<< * j = 0 * count = 0 */ __pyx_v_i = 0; /* "pandas/src/generated.pyx":8022 * * i = 0 * j = 0 # <<<<<<<<<<<<<< * count = 0 * if nleft == 0: */ __pyx_v_j = 0; /* "pandas/src/generated.pyx":8023 * i = 0 * j = 0 * count = 0 # <<<<<<<<<<<<<< * if nleft == 0: * for j in range(nright): */ __pyx_v_count = 0; /* "pandas/src/generated.pyx":8024 * j = 0 * count = 0 * if nleft == 0: # <<<<<<<<<<<<<< * for j in range(nright): * lindexer[j] = -1 */ __pyx_t_8 = ((__pyx_v_nleft == 0) != 0); if (__pyx_t_8) { /* "pandas/src/generated.pyx":8025 * count = 0 * if nleft == 0: * for j in range(nright): # <<<<<<<<<<<<<< * lindexer[j] = -1 * rindexer[j] = j */ __pyx_t_20 = __pyx_v_nright; for (__pyx_t_21 = 0; __pyx_t_21 < __pyx_t_20; __pyx_t_21+=1) { __pyx_v_j = __pyx_t_21; /* "pandas/src/generated.pyx":8026 * if nleft == 0: * for j in range(nright): * lindexer[j] = -1 # <<<<<<<<<<<<<< * rindexer[j] = j * result[j] = right[j] */ __pyx_t_22 = __pyx_v_j; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_lindexer.rcbuffer->pybuffer.buf, __pyx_t_22, __pyx_pybuffernd_lindexer.diminfo[0].strides) = -1; /* "pandas/src/generated.pyx":8027 * for j in range(nright): * lindexer[j] = -1 * rindexer[j] = j # <<<<<<<<<<<<<< * result[j] = right[j] * elif nright == 0: */ __pyx_t_23 = __pyx_v_j; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_rindexer.rcbuffer->pybuffer.buf, __pyx_t_23, __pyx_pybuffernd_rindexer.diminfo[0].strides) = __pyx_v_j; /* "pandas/src/generated.pyx":8028 * lindexer[j] = -1 * rindexer[j] = j * result[j] = right[j] # <<<<<<<<<<<<<< * elif nright == 0: * for i in range(nright): */ __pyx_t_24 = __pyx_v_j; __pyx_t_6 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_right.rcbuffer->pybuffer.buf, __pyx_t_24, __pyx_pybuffernd_right.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_6); __pyx_t_25 = __pyx_v_j; __pyx_t_26 = __Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_25, __pyx_pybuffernd_result.diminfo[0].strides); __Pyx_GOTREF(*__pyx_t_26); __Pyx_INCREF(__pyx_t_6); __Pyx_DECREF(*__pyx_t_26); *__pyx_t_26 = __pyx_t_6; __Pyx_GIVEREF(*__pyx_t_26); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } goto __pyx_L13; } /* "pandas/src/generated.pyx":8029 * rindexer[j] = j * result[j] = right[j] * elif nright == 0: # <<<<<<<<<<<<<< * for i in range(nright): * lindexer[i] = i */ __pyx_t_8 = ((__pyx_v_nright == 0) != 0); if (__pyx_t_8) { /* "pandas/src/generated.pyx":8030 * result[j] = right[j] * elif nright == 0: * for i in range(nright): # <<<<<<<<<<<<<< * lindexer[i] = i * rindexer[i] = -1 */ __pyx_t_20 = __pyx_v_nright; for (__pyx_t_21 = 0; __pyx_t_21 < __pyx_t_20; __pyx_t_21+=1) { __pyx_v_i = __pyx_t_21; /* "pandas/src/generated.pyx":8031 * elif nright == 0: * for i in range(nright): * lindexer[i] = i # <<<<<<<<<<<<<< * rindexer[i] = -1 * result[i] = left[i] */ __pyx_t_27 = __pyx_v_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_lindexer.rcbuffer->pybuffer.buf, __pyx_t_27, __pyx_pybuffernd_lindexer.diminfo[0].strides) = __pyx_v_i; /* "pandas/src/generated.pyx":8032 * for i in range(nright): * lindexer[i] = i * rindexer[i] = -1 # <<<<<<<<<<<<<< * result[i] = left[i] * else: */ __pyx_t_28 = __pyx_v_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_rindexer.rcbuffer->pybuffer.buf, __pyx_t_28, __pyx_pybuffernd_rindexer.diminfo[0].strides) = -1; /* "pandas/src/generated.pyx":8033 * lindexer[i] = i * rindexer[i] = -1 * result[i] = left[i] # <<<<<<<<<<<<<< * else: * while True: */ __pyx_t_29 = __pyx_v_i; __pyx_t_6 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_left.rcbuffer->pybuffer.buf, __pyx_t_29, __pyx_pybuffernd_left.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_6); __pyx_t_30 = __pyx_v_i; __pyx_t_26 = __Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_30, __pyx_pybuffernd_result.diminfo[0].strides); __Pyx_GOTREF(*__pyx_t_26); __Pyx_INCREF(__pyx_t_6); __Pyx_DECREF(*__pyx_t_26); *__pyx_t_26 = __pyx_t_6; __Pyx_GIVEREF(*__pyx_t_26); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } goto __pyx_L13; } /*else*/ { /* "pandas/src/generated.pyx":8035 * result[i] = left[i] * else: * while True: # <<<<<<<<<<<<<< * if i == nleft: * while j < nright: */ while (1) { /* "pandas/src/generated.pyx":8036 * else: * while True: * if i == nleft: # <<<<<<<<<<<<<< * while j < nright: * lindexer[count] = -1 */ __pyx_t_8 = ((__pyx_v_i == __pyx_v_nleft) != 0); if (__pyx_t_8) { /* "pandas/src/generated.pyx":8037 * while True: * if i == nleft: * while j < nright: # <<<<<<<<<<<<<< * lindexer[count] = -1 * rindexer[count] = j */ while (1) { __pyx_t_8 = ((__pyx_v_j < __pyx_v_nright) != 0); if (!__pyx_t_8) break; /* "pandas/src/generated.pyx":8038 * if i == nleft: * while j < nright: * lindexer[count] = -1 # <<<<<<<<<<<<<< * rindexer[count] = j * result[count] = right[j] */ __pyx_t_20 = __pyx_v_count; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_lindexer.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_lindexer.diminfo[0].strides) = -1; /* "pandas/src/generated.pyx":8039 * while j < nright: * lindexer[count] = -1 * rindexer[count] = j # <<<<<<<<<<<<<< * result[count] = right[j] * count += 1 */ __pyx_t_21 = __pyx_v_count; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_rindexer.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_rindexer.diminfo[0].strides) = __pyx_v_j; /* "pandas/src/generated.pyx":8040 * lindexer[count] = -1 * rindexer[count] = j * result[count] = right[j] # <<<<<<<<<<<<<< * count += 1 * j += 1 */ __pyx_t_31 = __pyx_v_j; __pyx_t_6 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_right.rcbuffer->pybuffer.buf, __pyx_t_31, __pyx_pybuffernd_right.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_6); __pyx_t_32 = __pyx_v_count; __pyx_t_26 = __Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_32, __pyx_pybuffernd_result.diminfo[0].strides); __Pyx_GOTREF(*__pyx_t_26); __Pyx_INCREF(__pyx_t_6); __Pyx_DECREF(*__pyx_t_26); *__pyx_t_26 = __pyx_t_6; __Pyx_GIVEREF(*__pyx_t_26); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; /* "pandas/src/generated.pyx":8041 * rindexer[count] = j * result[count] = right[j] * count += 1 # <<<<<<<<<<<<<< * j += 1 * break */ __pyx_v_count = (__pyx_v_count + 1); /* "pandas/src/generated.pyx":8042 * result[count] = right[j] * count += 1 * j += 1 # <<<<<<<<<<<<<< * break * if j == nright: */ __pyx_v_j = (__pyx_v_j + 1); } /* "pandas/src/generated.pyx":8043 * count += 1 * j += 1 * break # <<<<<<<<<<<<<< * if j == nright: * while i < nleft: */ goto __pyx_L19_break; } /* "pandas/src/generated.pyx":8044 * j += 1 * break * if j == nright: # <<<<<<<<<<<<<< * while i < nleft: * lindexer[count] = i */ __pyx_t_8 = ((__pyx_v_j == __pyx_v_nright) != 0); if (__pyx_t_8) { /* "pandas/src/generated.pyx":8045 * break * if j == nright: * while i < nleft: # <<<<<<<<<<<<<< * lindexer[count] = i * rindexer[count] = -1 */ while (1) { __pyx_t_8 = ((__pyx_v_i < __pyx_v_nleft) != 0); if (!__pyx_t_8) break; /* "pandas/src/generated.pyx":8046 * if j == nright: * while i < nleft: * lindexer[count] = i # <<<<<<<<<<<<<< * rindexer[count] = -1 * result[count] = left[i] */ __pyx_t_33 = __pyx_v_count; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_lindexer.rcbuffer->pybuffer.buf, __pyx_t_33, __pyx_pybuffernd_lindexer.diminfo[0].strides) = __pyx_v_i; /* "pandas/src/generated.pyx":8047 * while i < nleft: * lindexer[count] = i * rindexer[count] = -1 # <<<<<<<<<<<<<< * result[count] = left[i] * count += 1 */ __pyx_t_34 = __pyx_v_count; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_rindexer.rcbuffer->pybuffer.buf, __pyx_t_34, __pyx_pybuffernd_rindexer.diminfo[0].strides) = -1; /* "pandas/src/generated.pyx":8048 * lindexer[count] = i * rindexer[count] = -1 * result[count] = left[i] # <<<<<<<<<<<<<< * count += 1 * i += 1 */ __pyx_t_35 = __pyx_v_i; __pyx_t_6 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_left.rcbuffer->pybuffer.buf, __pyx_t_35, __pyx_pybuffernd_left.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_6); __pyx_t_36 = __pyx_v_count; __pyx_t_26 = __Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_36, __pyx_pybuffernd_result.diminfo[0].strides); __Pyx_GOTREF(*__pyx_t_26); __Pyx_INCREF(__pyx_t_6); __Pyx_DECREF(*__pyx_t_26); *__pyx_t_26 = __pyx_t_6; __Pyx_GIVEREF(*__pyx_t_26); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; /* "pandas/src/generated.pyx":8049 * rindexer[count] = -1 * result[count] = left[i] * count += 1 # <<<<<<<<<<<<<< * i += 1 * break */ __pyx_v_count = (__pyx_v_count + 1); /* "pandas/src/generated.pyx":8050 * result[count] = left[i] * count += 1 * i += 1 # <<<<<<<<<<<<<< * break * */ __pyx_v_i = (__pyx_v_i + 1); } /* "pandas/src/generated.pyx":8051 * count += 1 * i += 1 * break # <<<<<<<<<<<<<< * * lval = left[i] */ goto __pyx_L19_break; } /* "pandas/src/generated.pyx":8053 * break * * lval = left[i] # <<<<<<<<<<<<<< * rval = right[j] * */ __pyx_t_37 = __pyx_v_i; __pyx_t_6 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_left.rcbuffer->pybuffer.buf, __pyx_t_37, __pyx_pybuffernd_left.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_6); __Pyx_XDECREF_SET(__pyx_v_lval, __pyx_t_6); __pyx_t_6 = 0; /* "pandas/src/generated.pyx":8054 * * lval = left[i] * rval = right[j] # <<<<<<<<<<<<<< * * if lval == rval: */ __pyx_t_38 = __pyx_v_j; __pyx_t_6 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_right.rcbuffer->pybuffer.buf, __pyx_t_38, __pyx_pybuffernd_right.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_6); __Pyx_XDECREF_SET(__pyx_v_rval, __pyx_t_6); __pyx_t_6 = 0; /* "pandas/src/generated.pyx":8056 * rval = right[j] * * if lval == rval: # <<<<<<<<<<<<<< * lindexer[count] = i * rindexer[count] = j */ __pyx_t_6 = PyObject_RichCompare(__pyx_v_lval, __pyx_v_rval, Py_EQ); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8056; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8056; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (__pyx_t_8) { /* "pandas/src/generated.pyx":8057 * * if lval == rval: * lindexer[count] = i # <<<<<<<<<<<<<< * rindexer[count] = j * result[count] = lval */ __pyx_t_39 = __pyx_v_count; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_lindexer.rcbuffer->pybuffer.buf, __pyx_t_39, __pyx_pybuffernd_lindexer.diminfo[0].strides) = __pyx_v_i; /* "pandas/src/generated.pyx":8058 * if lval == rval: * lindexer[count] = i * rindexer[count] = j # <<<<<<<<<<<<<< * result[count] = lval * count += 1 */ __pyx_t_40 = __pyx_v_count; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_rindexer.rcbuffer->pybuffer.buf, __pyx_t_40, __pyx_pybuffernd_rindexer.diminfo[0].strides) = __pyx_v_j; /* "pandas/src/generated.pyx":8059 * lindexer[count] = i * rindexer[count] = j * result[count] = lval # <<<<<<<<<<<<<< * count += 1 * if i < nleft - 1: */ __pyx_t_41 = __pyx_v_count; __pyx_t_26 = __Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_41, __pyx_pybuffernd_result.diminfo[0].strides); __Pyx_GOTREF(*__pyx_t_26); __Pyx_INCREF(__pyx_v_lval); __Pyx_DECREF(*__pyx_t_26); *__pyx_t_26 = __pyx_v_lval; __Pyx_GIVEREF(*__pyx_t_26); /* "pandas/src/generated.pyx":8060 * rindexer[count] = j * result[count] = lval * count += 1 # <<<<<<<<<<<<<< * if i < nleft - 1: * if j < nright - 1 and right[j + 1] == rval: */ __pyx_v_count = (__pyx_v_count + 1); /* "pandas/src/generated.pyx":8061 * result[count] = lval * count += 1 * if i < nleft - 1: # <<<<<<<<<<<<<< * if j < nright - 1 and right[j + 1] == rval: * j += 1 */ __pyx_t_8 = ((__pyx_v_i < (__pyx_v_nleft - 1)) != 0); if (__pyx_t_8) { /* "pandas/src/generated.pyx":8062 * count += 1 * if i < nleft - 1: * if j < nright - 1 and right[j + 1] == rval: # <<<<<<<<<<<<<< * j += 1 * else: */ __pyx_t_8 = (__pyx_v_j < (__pyx_v_nright - 1)); if (__pyx_t_8) { __pyx_t_42 = (__pyx_v_j + 1); __pyx_t_6 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_right.rcbuffer->pybuffer.buf, __pyx_t_42, __pyx_pybuffernd_right.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_6); __pyx_t_12 = PyObject_RichCompare(__pyx_t_6, __pyx_v_rval, Py_EQ); __Pyx_XGOTREF(__pyx_t_12); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8062; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_12); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8062; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __pyx_t_7 = __pyx_t_2; } else { __pyx_t_7 = __pyx_t_8; } if (__pyx_t_7) { /* "pandas/src/generated.pyx":8063 * if i < nleft - 1: * if j < nright - 1 and right[j + 1] == rval: * j += 1 # <<<<<<<<<<<<<< * else: * i += 1 */ __pyx_v_j = (__pyx_v_j + 1); goto __pyx_L28; } /*else*/ { /* "pandas/src/generated.pyx":8065 * j += 1 * else: * i += 1 # <<<<<<<<<<<<<< * if left[i] != rval: * j += 1 */ __pyx_v_i = (__pyx_v_i + 1); /* "pandas/src/generated.pyx":8066 * else: * i += 1 * if left[i] != rval: # <<<<<<<<<<<<<< * j += 1 * elif j < nright - 1: */ __pyx_t_43 = __pyx_v_i; __pyx_t_12 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_left.rcbuffer->pybuffer.buf, __pyx_t_43, __pyx_pybuffernd_left.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_12); __pyx_t_6 = PyObject_RichCompare(__pyx_t_12, __pyx_v_rval, Py_NE); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8066; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8066; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (__pyx_t_7) { /* "pandas/src/generated.pyx":8067 * i += 1 * if left[i] != rval: * j += 1 # <<<<<<<<<<<<<< * elif j < nright - 1: * j += 1 */ __pyx_v_j = (__pyx_v_j + 1); goto __pyx_L29; } __pyx_L29:; } __pyx_L28:; goto __pyx_L27; } /* "pandas/src/generated.pyx":8068 * if left[i] != rval: * j += 1 * elif j < nright - 1: # <<<<<<<<<<<<<< * j += 1 * if lval != right[j]: */ __pyx_t_7 = ((__pyx_v_j < (__pyx_v_nright - 1)) != 0); if (__pyx_t_7) { /* "pandas/src/generated.pyx":8069 * j += 1 * elif j < nright - 1: * j += 1 # <<<<<<<<<<<<<< * if lval != right[j]: * i += 1 */ __pyx_v_j = (__pyx_v_j + 1); /* "pandas/src/generated.pyx":8070 * elif j < nright - 1: * j += 1 * if lval != right[j]: # <<<<<<<<<<<<<< * i += 1 * else: */ __pyx_t_44 = __pyx_v_j; __pyx_t_6 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_right.rcbuffer->pybuffer.buf, __pyx_t_44, __pyx_pybuffernd_right.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_6); __pyx_t_12 = PyObject_RichCompare(__pyx_v_lval, __pyx_t_6, Py_NE); __Pyx_XGOTREF(__pyx_t_12); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8070; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_12); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8070; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; if (__pyx_t_7) { /* "pandas/src/generated.pyx":8071 * j += 1 * if lval != right[j]: * i += 1 # <<<<<<<<<<<<<< * else: * # end of the road */ __pyx_v_i = (__pyx_v_i + 1); goto __pyx_L30; } __pyx_L30:; goto __pyx_L27; } /*else*/ { /* "pandas/src/generated.pyx":8074 * else: * # end of the road * break # <<<<<<<<<<<<<< * elif lval < rval: * lindexer[count] = i */ goto __pyx_L19_break; } __pyx_L27:; goto __pyx_L26; } /* "pandas/src/generated.pyx":8075 * # end of the road * break * elif lval < rval: # <<<<<<<<<<<<<< * lindexer[count] = i * rindexer[count] = -1 */ __pyx_t_12 = PyObject_RichCompare(__pyx_v_lval, __pyx_v_rval, Py_LT); __Pyx_XGOTREF(__pyx_t_12); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8075; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_12); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8075; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; if (__pyx_t_7) { /* "pandas/src/generated.pyx":8076 * break * elif lval < rval: * lindexer[count] = i # <<<<<<<<<<<<<< * rindexer[count] = -1 * result[count] = lval */ __pyx_t_45 = __pyx_v_count; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_lindexer.rcbuffer->pybuffer.buf, __pyx_t_45, __pyx_pybuffernd_lindexer.diminfo[0].strides) = __pyx_v_i; /* "pandas/src/generated.pyx":8077 * elif lval < rval: * lindexer[count] = i * rindexer[count] = -1 # <<<<<<<<<<<<<< * result[count] = lval * count += 1 */ __pyx_t_46 = __pyx_v_count; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_rindexer.rcbuffer->pybuffer.buf, __pyx_t_46, __pyx_pybuffernd_rindexer.diminfo[0].strides) = -1; /* "pandas/src/generated.pyx":8078 * lindexer[count] = i * rindexer[count] = -1 * result[count] = lval # <<<<<<<<<<<<<< * count += 1 * i += 1 */ __pyx_t_47 = __pyx_v_count; __pyx_t_26 = __Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_47, __pyx_pybuffernd_result.diminfo[0].strides); __Pyx_GOTREF(*__pyx_t_26); __Pyx_INCREF(__pyx_v_lval); __Pyx_DECREF(*__pyx_t_26); *__pyx_t_26 = __pyx_v_lval; __Pyx_GIVEREF(*__pyx_t_26); /* "pandas/src/generated.pyx":8079 * rindexer[count] = -1 * result[count] = lval * count += 1 # <<<<<<<<<<<<<< * i += 1 * else: */ __pyx_v_count = (__pyx_v_count + 1); /* "pandas/src/generated.pyx":8080 * result[count] = lval * count += 1 * i += 1 # <<<<<<<<<<<<<< * else: * lindexer[count] = -1 */ __pyx_v_i = (__pyx_v_i + 1); goto __pyx_L26; } /*else*/ { /* "pandas/src/generated.pyx":8082 * i += 1 * else: * lindexer[count] = -1 # <<<<<<<<<<<<<< * rindexer[count] = j * result[count] = rval */ __pyx_t_48 = __pyx_v_count; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_lindexer.rcbuffer->pybuffer.buf, __pyx_t_48, __pyx_pybuffernd_lindexer.diminfo[0].strides) = -1; /* "pandas/src/generated.pyx":8083 * else: * lindexer[count] = -1 * rindexer[count] = j # <<<<<<<<<<<<<< * result[count] = rval * count += 1 */ __pyx_t_49 = __pyx_v_count; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_rindexer.rcbuffer->pybuffer.buf, __pyx_t_49, __pyx_pybuffernd_rindexer.diminfo[0].strides) = __pyx_v_j; /* "pandas/src/generated.pyx":8084 * lindexer[count] = -1 * rindexer[count] = j * result[count] = rval # <<<<<<<<<<<<<< * count += 1 * j += 1 */ __pyx_t_50 = __pyx_v_count; __pyx_t_26 = __Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_50, __pyx_pybuffernd_result.diminfo[0].strides); __Pyx_GOTREF(*__pyx_t_26); __Pyx_INCREF(__pyx_v_rval); __Pyx_DECREF(*__pyx_t_26); *__pyx_t_26 = __pyx_v_rval; __Pyx_GIVEREF(*__pyx_t_26); /* "pandas/src/generated.pyx":8085 * rindexer[count] = j * result[count] = rval * count += 1 # <<<<<<<<<<<<<< * j += 1 * */ __pyx_v_count = (__pyx_v_count + 1); /* "pandas/src/generated.pyx":8086 * result[count] = rval * count += 1 * j += 1 # <<<<<<<<<<<<<< * * return result, lindexer, rindexer */ __pyx_v_j = (__pyx_v_j + 1); } __pyx_L26:; } __pyx_L19_break:; } __pyx_L13:; /* "pandas/src/generated.pyx":8088 * j += 1 * * return result, lindexer, rindexer # <<<<<<<<<<<<<< * * @cython.wraparound(False) */ __Pyx_XDECREF(__pyx_r); __pyx_t_12 = PyTuple_New(3); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8088; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __Pyx_INCREF(((PyObject *)__pyx_v_result)); PyTuple_SET_ITEM(__pyx_t_12, 0, ((PyObject *)__pyx_v_result)); __Pyx_GIVEREF(((PyObject *)__pyx_v_result)); __Pyx_INCREF(((PyObject *)__pyx_v_lindexer)); PyTuple_SET_ITEM(__pyx_t_12, 1, ((PyObject *)__pyx_v_lindexer)); __Pyx_GIVEREF(((PyObject *)__pyx_v_lindexer)); __Pyx_INCREF(((PyObject *)__pyx_v_rindexer)); PyTuple_SET_ITEM(__pyx_t_12, 2, ((PyObject *)__pyx_v_rindexer)); __Pyx_GIVEREF(((PyObject *)__pyx_v_rindexer)); __pyx_r = __pyx_t_12; __pyx_t_12 = 0; goto __pyx_L0; /* "pandas/src/generated.pyx":7963 * @cython.wraparound(False) * @cython.boundscheck(False) * def outer_join_indexer_object(ndarray[object] left, # <<<<<<<<<<<<<< * ndarray[object] right): * cdef: */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_11); __Pyx_XDECREF(__pyx_t_12); __Pyx_XDECREF(__pyx_t_13); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_left.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_lindexer.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_right.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_rindexer.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.outer_join_indexer_object", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_left.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_lindexer.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_right.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_rindexer.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF(__pyx_v_lval); __Pyx_XDECREF(__pyx_v_rval); __Pyx_XDECREF((PyObject *)__pyx_v_lindexer); __Pyx_XDECREF((PyObject *)__pyx_v_rindexer); __Pyx_XDECREF((PyObject *)__pyx_v_result); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":8092 * @cython.wraparound(False) * @cython.boundscheck(False) * def outer_join_indexer_int32(ndarray[int32_t] left, # <<<<<<<<<<<<<< * ndarray[int32_t] right): * cdef: */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_481outer_join_indexer_int32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_481outer_join_indexer_int32 = {__Pyx_NAMESTR("outer_join_indexer_int32"), (PyCFunction)__pyx_pw_6pandas_5algos_481outer_join_indexer_int32, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_481outer_join_indexer_int32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_left = 0; PyArrayObject *__pyx_v_right = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("outer_join_indexer_int32 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_left,&__pyx_n_s_right,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_left)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_right)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("outer_join_indexer_int32", 1, 2, 2, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8092; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "outer_join_indexer_int32") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8092; __pyx_clineno = __LINE__; goto __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_left = ((PyArrayObject *)values[0]); __pyx_v_right = ((PyArrayObject *)values[1]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("outer_join_indexer_int32", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8092; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.outer_join_indexer_int32", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_left), __pyx_ptype_5numpy_ndarray, 1, "left", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8092; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_right), __pyx_ptype_5numpy_ndarray, 1, "right", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8093; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_480outer_join_indexer_int32(__pyx_self, __pyx_v_left, __pyx_v_right); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5algos_480outer_join_indexer_int32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_left, PyArrayObject *__pyx_v_right) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_nright; Py_ssize_t __pyx_v_nleft; Py_ssize_t __pyx_v_count; __pyx_t_5numpy_int32_t __pyx_v_lval; __pyx_t_5numpy_int32_t __pyx_v_rval; PyArrayObject *__pyx_v_lindexer = 0; PyArrayObject *__pyx_v_rindexer = 0; PyArrayObject *__pyx_v_result = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_left; __Pyx_Buffer __pyx_pybuffer_left; __Pyx_LocalBuf_ND __pyx_pybuffernd_lindexer; __Pyx_Buffer __pyx_pybuffer_lindexer; __Pyx_LocalBuf_ND __pyx_pybuffernd_result; __Pyx_Buffer __pyx_pybuffer_result; __Pyx_LocalBuf_ND __pyx_pybuffernd_right; __Pyx_Buffer __pyx_pybuffer_right; __Pyx_LocalBuf_ND __pyx_pybuffernd_rindexer; __Pyx_Buffer __pyx_pybuffer_rindexer; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; int __pyx_t_2; Py_ssize_t __pyx_t_3; Py_ssize_t __pyx_t_4; int __pyx_t_5; int __pyx_t_6; Py_ssize_t __pyx_t_7; Py_ssize_t __pyx_t_8; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; PyObject *__pyx_t_11 = NULL; PyObject *__pyx_t_12 = NULL; PyObject *__pyx_t_13 = NULL; PyArrayObject *__pyx_t_14 = NULL; int __pyx_t_15; PyObject *__pyx_t_16 = NULL; PyObject *__pyx_t_17 = NULL; PyObject *__pyx_t_18 = NULL; PyArrayObject *__pyx_t_19 = NULL; 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; Py_ssize_t __pyx_t_37; Py_ssize_t __pyx_t_38; Py_ssize_t __pyx_t_39; Py_ssize_t __pyx_t_40; Py_ssize_t __pyx_t_41; Py_ssize_t __pyx_t_42; Py_ssize_t __pyx_t_43; Py_ssize_t __pyx_t_44; Py_ssize_t __pyx_t_45; Py_ssize_t __pyx_t_46; Py_ssize_t __pyx_t_47; Py_ssize_t __pyx_t_48; Py_ssize_t __pyx_t_49; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("outer_join_indexer_int32", 0); __pyx_pybuffer_lindexer.pybuffer.buf = NULL; __pyx_pybuffer_lindexer.refcount = 0; __pyx_pybuffernd_lindexer.data = NULL; __pyx_pybuffernd_lindexer.rcbuffer = &__pyx_pybuffer_lindexer; __pyx_pybuffer_rindexer.pybuffer.buf = NULL; __pyx_pybuffer_rindexer.refcount = 0; __pyx_pybuffernd_rindexer.data = NULL; __pyx_pybuffernd_rindexer.rcbuffer = &__pyx_pybuffer_rindexer; __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_left.pybuffer.buf = NULL; __pyx_pybuffer_left.refcount = 0; __pyx_pybuffernd_left.data = NULL; __pyx_pybuffernd_left.rcbuffer = &__pyx_pybuffer_left; __pyx_pybuffer_right.pybuffer.buf = NULL; __pyx_pybuffer_right.refcount = 0; __pyx_pybuffernd_right.data = NULL; __pyx_pybuffernd_right.rcbuffer = &__pyx_pybuffer_right; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_left.rcbuffer->pybuffer, (PyObject*)__pyx_v_left, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8092; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_left.diminfo[0].strides = __pyx_pybuffernd_left.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_left.diminfo[0].shape = __pyx_pybuffernd_left.rcbuffer->pybuffer.shape[0]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_right.rcbuffer->pybuffer, (PyObject*)__pyx_v_right, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8092; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_right.diminfo[0].strides = __pyx_pybuffernd_right.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_right.diminfo[0].shape = __pyx_pybuffernd_right.rcbuffer->pybuffer.shape[0]; /* "pandas/src/generated.pyx":8100 * ndarray[int32_t] result * * nleft = len(left) # <<<<<<<<<<<<<< * nright = len(right) * */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_left)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8100; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_nleft = __pyx_t_1; /* "pandas/src/generated.pyx":8101 * * nleft = len(left) * nright = len(right) # <<<<<<<<<<<<<< * * i = 0 */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_right)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8101; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_nright = __pyx_t_1; /* "pandas/src/generated.pyx":8103 * nright = len(right) * * i = 0 # <<<<<<<<<<<<<< * j = 0 * count = 0 */ __pyx_v_i = 0; /* "pandas/src/generated.pyx":8104 * * i = 0 * j = 0 # <<<<<<<<<<<<<< * count = 0 * if nleft == 0: */ __pyx_v_j = 0; /* "pandas/src/generated.pyx":8105 * i = 0 * j = 0 * count = 0 # <<<<<<<<<<<<<< * if nleft == 0: * count = nright */ __pyx_v_count = 0; /* "pandas/src/generated.pyx":8106 * j = 0 * count = 0 * if nleft == 0: # <<<<<<<<<<<<<< * count = nright * elif nright == 0: */ __pyx_t_2 = ((__pyx_v_nleft == 0) != 0); if (__pyx_t_2) { /* "pandas/src/generated.pyx":8107 * count = 0 * if nleft == 0: * count = nright # <<<<<<<<<<<<<< * elif nright == 0: * count = nleft */ __pyx_v_count = __pyx_v_nright; goto __pyx_L3; } /* "pandas/src/generated.pyx":8108 * if nleft == 0: * count = nright * elif nright == 0: # <<<<<<<<<<<<<< * count = nleft * else: */ __pyx_t_2 = ((__pyx_v_nright == 0) != 0); if (__pyx_t_2) { /* "pandas/src/generated.pyx":8109 * count = nright * elif nright == 0: * count = nleft # <<<<<<<<<<<<<< * else: * while True: */ __pyx_v_count = __pyx_v_nleft; goto __pyx_L3; } /*else*/ { /* "pandas/src/generated.pyx":8111 * count = nleft * else: * while True: # <<<<<<<<<<<<<< * if i == nleft: * count += nright - j */ while (1) { /* "pandas/src/generated.pyx":8112 * else: * while True: * if i == nleft: # <<<<<<<<<<<<<< * count += nright - j * break */ __pyx_t_2 = ((__pyx_v_i == __pyx_v_nleft) != 0); if (__pyx_t_2) { /* "pandas/src/generated.pyx":8113 * while True: * if i == nleft: * count += nright - j # <<<<<<<<<<<<<< * break * if j == nright: */ __pyx_v_count = (__pyx_v_count + (__pyx_v_nright - __pyx_v_j)); /* "pandas/src/generated.pyx":8114 * if i == nleft: * count += nright - j * break # <<<<<<<<<<<<<< * if j == nright: * count += nleft - i */ goto __pyx_L5_break; } /* "pandas/src/generated.pyx":8115 * count += nright - j * break * if j == nright: # <<<<<<<<<<<<<< * count += nleft - i * break */ __pyx_t_2 = ((__pyx_v_j == __pyx_v_nright) != 0); if (__pyx_t_2) { /* "pandas/src/generated.pyx":8116 * break * if j == nright: * count += nleft - i # <<<<<<<<<<<<<< * break * */ __pyx_v_count = (__pyx_v_count + (__pyx_v_nleft - __pyx_v_i)); /* "pandas/src/generated.pyx":8117 * if j == nright: * count += nleft - i * break # <<<<<<<<<<<<<< * * lval = left[i] */ goto __pyx_L5_break; } /* "pandas/src/generated.pyx":8119 * break * * lval = left[i] # <<<<<<<<<<<<<< * rval = right[j] * if lval == rval: */ __pyx_t_1 = __pyx_v_i; __pyx_v_lval = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_left.rcbuffer->pybuffer.buf, __pyx_t_1, __pyx_pybuffernd_left.diminfo[0].strides)); /* "pandas/src/generated.pyx":8120 * * lval = left[i] * rval = right[j] # <<<<<<<<<<<<<< * if lval == rval: * count += 1 */ __pyx_t_3 = __pyx_v_j; __pyx_v_rval = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_right.rcbuffer->pybuffer.buf, __pyx_t_3, __pyx_pybuffernd_right.diminfo[0].strides)); /* "pandas/src/generated.pyx":8121 * lval = left[i] * rval = right[j] * if lval == rval: # <<<<<<<<<<<<<< * count += 1 * if i < nleft - 1: */ __pyx_t_2 = ((__pyx_v_lval == __pyx_v_rval) != 0); if (__pyx_t_2) { /* "pandas/src/generated.pyx":8122 * rval = right[j] * if lval == rval: * count += 1 # <<<<<<<<<<<<<< * if i < nleft - 1: * if j < nright - 1 and right[j + 1] == rval: */ __pyx_v_count = (__pyx_v_count + 1); /* "pandas/src/generated.pyx":8123 * if lval == rval: * count += 1 * if i < nleft - 1: # <<<<<<<<<<<<<< * if j < nright - 1 and right[j + 1] == rval: * j += 1 */ __pyx_t_2 = ((__pyx_v_i < (__pyx_v_nleft - 1)) != 0); if (__pyx_t_2) { /* "pandas/src/generated.pyx":8124 * count += 1 * if i < nleft - 1: * if j < nright - 1 and right[j + 1] == rval: # <<<<<<<<<<<<<< * j += 1 * else: */ __pyx_t_2 = ((__pyx_v_j < (__pyx_v_nright - 1)) != 0); if (__pyx_t_2) { __pyx_t_4 = (__pyx_v_j + 1); __pyx_t_5 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_right.rcbuffer->pybuffer.buf, __pyx_t_4, __pyx_pybuffernd_right.diminfo[0].strides)) == __pyx_v_rval) != 0); __pyx_t_6 = __pyx_t_5; } else { __pyx_t_6 = __pyx_t_2; } if (__pyx_t_6) { /* "pandas/src/generated.pyx":8125 * if i < nleft - 1: * if j < nright - 1 and right[j + 1] == rval: * j += 1 # <<<<<<<<<<<<<< * else: * i += 1 */ __pyx_v_j = (__pyx_v_j + 1); goto __pyx_L10; } /*else*/ { /* "pandas/src/generated.pyx":8127 * j += 1 * else: * i += 1 # <<<<<<<<<<<<<< * if left[i] != rval: * j += 1 */ __pyx_v_i = (__pyx_v_i + 1); /* "pandas/src/generated.pyx":8128 * else: * i += 1 * if left[i] != rval: # <<<<<<<<<<<<<< * j += 1 * elif j < nright - 1: */ __pyx_t_7 = __pyx_v_i; __pyx_t_6 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_left.rcbuffer->pybuffer.buf, __pyx_t_7, __pyx_pybuffernd_left.diminfo[0].strides)) != __pyx_v_rval) != 0); if (__pyx_t_6) { /* "pandas/src/generated.pyx":8129 * i += 1 * if left[i] != rval: * j += 1 # <<<<<<<<<<<<<< * elif j < nright - 1: * j += 1 */ __pyx_v_j = (__pyx_v_j + 1); goto __pyx_L11; } __pyx_L11:; } __pyx_L10:; goto __pyx_L9; } /* "pandas/src/generated.pyx":8130 * if left[i] != rval: * j += 1 * elif j < nright - 1: # <<<<<<<<<<<<<< * j += 1 * if lval != right[j]: */ __pyx_t_6 = ((__pyx_v_j < (__pyx_v_nright - 1)) != 0); if (__pyx_t_6) { /* "pandas/src/generated.pyx":8131 * j += 1 * elif j < nright - 1: * j += 1 # <<<<<<<<<<<<<< * if lval != right[j]: * i += 1 */ __pyx_v_j = (__pyx_v_j + 1); /* "pandas/src/generated.pyx":8132 * elif j < nright - 1: * j += 1 * if lval != right[j]: # <<<<<<<<<<<<<< * i += 1 * else: */ __pyx_t_8 = __pyx_v_j; __pyx_t_6 = ((__pyx_v_lval != (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_right.rcbuffer->pybuffer.buf, __pyx_t_8, __pyx_pybuffernd_right.diminfo[0].strides))) != 0); if (__pyx_t_6) { /* "pandas/src/generated.pyx":8133 * j += 1 * if lval != right[j]: * i += 1 # <<<<<<<<<<<<<< * else: * # end of the road */ __pyx_v_i = (__pyx_v_i + 1); goto __pyx_L12; } __pyx_L12:; goto __pyx_L9; } /*else*/ { /* "pandas/src/generated.pyx":8136 * else: * # end of the road * break # <<<<<<<<<<<<<< * elif lval < rval: * count += 1 */ goto __pyx_L5_break; } __pyx_L9:; goto __pyx_L8; } /* "pandas/src/generated.pyx":8137 * # end of the road * break * elif lval < rval: # <<<<<<<<<<<<<< * count += 1 * i += 1 */ __pyx_t_6 = ((__pyx_v_lval < __pyx_v_rval) != 0); if (__pyx_t_6) { /* "pandas/src/generated.pyx":8138 * break * elif lval < rval: * count += 1 # <<<<<<<<<<<<<< * i += 1 * else: */ __pyx_v_count = (__pyx_v_count + 1); /* "pandas/src/generated.pyx":8139 * elif lval < rval: * count += 1 * i += 1 # <<<<<<<<<<<<<< * else: * count += 1 */ __pyx_v_i = (__pyx_v_i + 1); goto __pyx_L8; } /*else*/ { /* "pandas/src/generated.pyx":8141 * i += 1 * else: * count += 1 # <<<<<<<<<<<<<< * j += 1 * */ __pyx_v_count = (__pyx_v_count + 1); /* "pandas/src/generated.pyx":8142 * else: * count += 1 * j += 1 # <<<<<<<<<<<<<< * * lindexer = np.empty(count, dtype=np.int64) */ __pyx_v_j = (__pyx_v_j + 1); } __pyx_L8:; } __pyx_L5_break:; } __pyx_L3:; /* "pandas/src/generated.pyx":8144 * j += 1 * * lindexer = np.empty(count, dtype=np.int64) # <<<<<<<<<<<<<< * rindexer = np.empty(count, dtype=np.int64) * result = np.empty(count, dtype=np.int32) */ __pyx_t_9 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8144; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_empty); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8144; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_9 = PyInt_FromSsize_t(__pyx_v_count); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8144; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_t_11 = PyTuple_New(1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8144; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_9); __Pyx_GIVEREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_9 = PyDict_New(); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8144; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_t_12 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8144; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_int64); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8144; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_dtype, __pyx_t_13) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8144; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_13 = PyObject_Call(__pyx_t_10, __pyx_t_11, __pyx_t_9); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8144; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; if (!(likely(((__pyx_t_13) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_13, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8144; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_14 = ((PyArrayObject *)__pyx_t_13); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_lindexer.rcbuffer->pybuffer); __pyx_t_15 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_lindexer.rcbuffer->pybuffer, (PyObject*)__pyx_t_14, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_15 < 0)) { PyErr_Fetch(&__pyx_t_16, &__pyx_t_17, &__pyx_t_18); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_lindexer.rcbuffer->pybuffer, (PyObject*)__pyx_v_lindexer, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_16); Py_XDECREF(__pyx_t_17); Py_XDECREF(__pyx_t_18); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_16, __pyx_t_17, __pyx_t_18); } } __pyx_pybuffernd_lindexer.diminfo[0].strides = __pyx_pybuffernd_lindexer.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_lindexer.diminfo[0].shape = __pyx_pybuffernd_lindexer.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_15 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8144; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_14 = 0; __pyx_v_lindexer = ((PyArrayObject *)__pyx_t_13); __pyx_t_13 = 0; /* "pandas/src/generated.pyx":8145 * * lindexer = np.empty(count, dtype=np.int64) * rindexer = np.empty(count, dtype=np.int64) # <<<<<<<<<<<<<< * result = np.empty(count, dtype=np.int32) * */ __pyx_t_13 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8145; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_13, __pyx_n_s_empty); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8145; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_13 = PyInt_FromSsize_t(__pyx_v_count); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8145; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __pyx_t_11 = PyTuple_New(1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8145; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_13); __Pyx_GIVEREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_13 = PyDict_New(); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8145; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __pyx_t_10 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8145; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_int64); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8145; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; if (PyDict_SetItem(__pyx_t_13, __pyx_n_s_dtype, __pyx_t_12) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8145; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __pyx_t_12 = PyObject_Call(__pyx_t_9, __pyx_t_11, __pyx_t_13); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8145; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; if (!(likely(((__pyx_t_12) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_12, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8145; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_14 = ((PyArrayObject *)__pyx_t_12); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_rindexer.rcbuffer->pybuffer); __pyx_t_15 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_rindexer.rcbuffer->pybuffer, (PyObject*)__pyx_t_14, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_15 < 0)) { PyErr_Fetch(&__pyx_t_18, &__pyx_t_17, &__pyx_t_16); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_rindexer.rcbuffer->pybuffer, (PyObject*)__pyx_v_rindexer, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_18); Py_XDECREF(__pyx_t_17); Py_XDECREF(__pyx_t_16); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_18, __pyx_t_17, __pyx_t_16); } } __pyx_pybuffernd_rindexer.diminfo[0].strides = __pyx_pybuffernd_rindexer.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_rindexer.diminfo[0].shape = __pyx_pybuffernd_rindexer.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_15 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8145; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_14 = 0; __pyx_v_rindexer = ((PyArrayObject *)__pyx_t_12); __pyx_t_12 = 0; /* "pandas/src/generated.pyx":8146 * lindexer = np.empty(count, dtype=np.int64) * rindexer = np.empty(count, dtype=np.int64) * result = np.empty(count, dtype=np.int32) # <<<<<<<<<<<<<< * * # do it again, but populate the indexers / result */ __pyx_t_12 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8146; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_empty); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8146; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __pyx_t_12 = PyInt_FromSsize_t(__pyx_v_count); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8146; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __pyx_t_11 = PyTuple_New(1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8146; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_12); __Pyx_GIVEREF(__pyx_t_12); __pyx_t_12 = 0; __pyx_t_12 = PyDict_New(); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8146; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __pyx_t_9 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8146; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_int32); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8146; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; if (PyDict_SetItem(__pyx_t_12, __pyx_n_s_dtype, __pyx_t_10) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8146; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_t_10 = PyObject_Call(__pyx_t_13, __pyx_t_11, __pyx_t_12); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8146; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; if (!(likely(((__pyx_t_10) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_10, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8146; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_19 = ((PyArrayObject *)__pyx_t_10); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __pyx_t_15 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_t_19, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_15 < 0)) { PyErr_Fetch(&__pyx_t_16, &__pyx_t_17, &__pyx_t_18); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_v_result, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_16); Py_XDECREF(__pyx_t_17); Py_XDECREF(__pyx_t_18); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_16, __pyx_t_17, __pyx_t_18); } } __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_15 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8146; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_19 = 0; __pyx_v_result = ((PyArrayObject *)__pyx_t_10); __pyx_t_10 = 0; /* "pandas/src/generated.pyx":8150 * # do it again, but populate the indexers / result * * i = 0 # <<<<<<<<<<<<<< * j = 0 * count = 0 */ __pyx_v_i = 0; /* "pandas/src/generated.pyx":8151 * * i = 0 * j = 0 # <<<<<<<<<<<<<< * count = 0 * if nleft == 0: */ __pyx_v_j = 0; /* "pandas/src/generated.pyx":8152 * i = 0 * j = 0 * count = 0 # <<<<<<<<<<<<<< * if nleft == 0: * for j in range(nright): */ __pyx_v_count = 0; /* "pandas/src/generated.pyx":8153 * j = 0 * count = 0 * if nleft == 0: # <<<<<<<<<<<<<< * for j in range(nright): * lindexer[j] = -1 */ __pyx_t_6 = ((__pyx_v_nleft == 0) != 0); if (__pyx_t_6) { /* "pandas/src/generated.pyx":8154 * count = 0 * if nleft == 0: * for j in range(nright): # <<<<<<<<<<<<<< * lindexer[j] = -1 * rindexer[j] = j */ __pyx_t_20 = __pyx_v_nright; for (__pyx_t_21 = 0; __pyx_t_21 < __pyx_t_20; __pyx_t_21+=1) { __pyx_v_j = __pyx_t_21; /* "pandas/src/generated.pyx":8155 * if nleft == 0: * for j in range(nright): * lindexer[j] = -1 # <<<<<<<<<<<<<< * rindexer[j] = j * result[j] = right[j] */ __pyx_t_22 = __pyx_v_j; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_lindexer.rcbuffer->pybuffer.buf, __pyx_t_22, __pyx_pybuffernd_lindexer.diminfo[0].strides) = -1; /* "pandas/src/generated.pyx":8156 * for j in range(nright): * lindexer[j] = -1 * rindexer[j] = j # <<<<<<<<<<<<<< * result[j] = right[j] * elif nright == 0: */ __pyx_t_23 = __pyx_v_j; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_rindexer.rcbuffer->pybuffer.buf, __pyx_t_23, __pyx_pybuffernd_rindexer.diminfo[0].strides) = __pyx_v_j; /* "pandas/src/generated.pyx":8157 * lindexer[j] = -1 * rindexer[j] = j * result[j] = right[j] # <<<<<<<<<<<<<< * elif nright == 0: * for i in range(nright): */ __pyx_t_24 = __pyx_v_j; __pyx_t_25 = __pyx_v_j; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_25, __pyx_pybuffernd_result.diminfo[0].strides) = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_right.rcbuffer->pybuffer.buf, __pyx_t_24, __pyx_pybuffernd_right.diminfo[0].strides)); } goto __pyx_L13; } /* "pandas/src/generated.pyx":8158 * rindexer[j] = j * result[j] = right[j] * elif nright == 0: # <<<<<<<<<<<<<< * for i in range(nright): * lindexer[i] = i */ __pyx_t_6 = ((__pyx_v_nright == 0) != 0); if (__pyx_t_6) { /* "pandas/src/generated.pyx":8159 * result[j] = right[j] * elif nright == 0: * for i in range(nright): # <<<<<<<<<<<<<< * lindexer[i] = i * rindexer[i] = -1 */ __pyx_t_20 = __pyx_v_nright; for (__pyx_t_21 = 0; __pyx_t_21 < __pyx_t_20; __pyx_t_21+=1) { __pyx_v_i = __pyx_t_21; /* "pandas/src/generated.pyx":8160 * elif nright == 0: * for i in range(nright): * lindexer[i] = i # <<<<<<<<<<<<<< * rindexer[i] = -1 * result[i] = left[i] */ __pyx_t_26 = __pyx_v_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_lindexer.rcbuffer->pybuffer.buf, __pyx_t_26, __pyx_pybuffernd_lindexer.diminfo[0].strides) = __pyx_v_i; /* "pandas/src/generated.pyx":8161 * for i in range(nright): * lindexer[i] = i * rindexer[i] = -1 # <<<<<<<<<<<<<< * result[i] = left[i] * else: */ __pyx_t_27 = __pyx_v_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_rindexer.rcbuffer->pybuffer.buf, __pyx_t_27, __pyx_pybuffernd_rindexer.diminfo[0].strides) = -1; /* "pandas/src/generated.pyx":8162 * lindexer[i] = i * rindexer[i] = -1 * result[i] = left[i] # <<<<<<<<<<<<<< * else: * while True: */ __pyx_t_28 = __pyx_v_i; __pyx_t_29 = __pyx_v_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_29, __pyx_pybuffernd_result.diminfo[0].strides) = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_left.rcbuffer->pybuffer.buf, __pyx_t_28, __pyx_pybuffernd_left.diminfo[0].strides)); } goto __pyx_L13; } /*else*/ { /* "pandas/src/generated.pyx":8164 * result[i] = left[i] * else: * while True: # <<<<<<<<<<<<<< * if i == nleft: * while j < nright: */ while (1) { /* "pandas/src/generated.pyx":8165 * else: * while True: * if i == nleft: # <<<<<<<<<<<<<< * while j < nright: * lindexer[count] = -1 */ __pyx_t_6 = ((__pyx_v_i == __pyx_v_nleft) != 0); if (__pyx_t_6) { /* "pandas/src/generated.pyx":8166 * while True: * if i == nleft: * while j < nright: # <<<<<<<<<<<<<< * lindexer[count] = -1 * rindexer[count] = j */ while (1) { __pyx_t_6 = ((__pyx_v_j < __pyx_v_nright) != 0); if (!__pyx_t_6) break; /* "pandas/src/generated.pyx":8167 * if i == nleft: * while j < nright: * lindexer[count] = -1 # <<<<<<<<<<<<<< * rindexer[count] = j * result[count] = right[j] */ __pyx_t_20 = __pyx_v_count; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_lindexer.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_lindexer.diminfo[0].strides) = -1; /* "pandas/src/generated.pyx":8168 * while j < nright: * lindexer[count] = -1 * rindexer[count] = j # <<<<<<<<<<<<<< * result[count] = right[j] * count += 1 */ __pyx_t_21 = __pyx_v_count; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_rindexer.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_rindexer.diminfo[0].strides) = __pyx_v_j; /* "pandas/src/generated.pyx":8169 * lindexer[count] = -1 * rindexer[count] = j * result[count] = right[j] # <<<<<<<<<<<<<< * count += 1 * j += 1 */ __pyx_t_30 = __pyx_v_j; __pyx_t_31 = __pyx_v_count; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_31, __pyx_pybuffernd_result.diminfo[0].strides) = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_right.rcbuffer->pybuffer.buf, __pyx_t_30, __pyx_pybuffernd_right.diminfo[0].strides)); /* "pandas/src/generated.pyx":8170 * rindexer[count] = j * result[count] = right[j] * count += 1 # <<<<<<<<<<<<<< * j += 1 * break */ __pyx_v_count = (__pyx_v_count + 1); /* "pandas/src/generated.pyx":8171 * result[count] = right[j] * count += 1 * j += 1 # <<<<<<<<<<<<<< * break * if j == nright: */ __pyx_v_j = (__pyx_v_j + 1); } /* "pandas/src/generated.pyx":8172 * count += 1 * j += 1 * break # <<<<<<<<<<<<<< * if j == nright: * while i < nleft: */ goto __pyx_L19_break; } /* "pandas/src/generated.pyx":8173 * j += 1 * break * if j == nright: # <<<<<<<<<<<<<< * while i < nleft: * lindexer[count] = i */ __pyx_t_6 = ((__pyx_v_j == __pyx_v_nright) != 0); if (__pyx_t_6) { /* "pandas/src/generated.pyx":8174 * break * if j == nright: * while i < nleft: # <<<<<<<<<<<<<< * lindexer[count] = i * rindexer[count] = -1 */ while (1) { __pyx_t_6 = ((__pyx_v_i < __pyx_v_nleft) != 0); if (!__pyx_t_6) break; /* "pandas/src/generated.pyx":8175 * if j == nright: * while i < nleft: * lindexer[count] = i # <<<<<<<<<<<<<< * rindexer[count] = -1 * result[count] = left[i] */ __pyx_t_32 = __pyx_v_count; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_lindexer.rcbuffer->pybuffer.buf, __pyx_t_32, __pyx_pybuffernd_lindexer.diminfo[0].strides) = __pyx_v_i; /* "pandas/src/generated.pyx":8176 * while i < nleft: * lindexer[count] = i * rindexer[count] = -1 # <<<<<<<<<<<<<< * result[count] = left[i] * count += 1 */ __pyx_t_33 = __pyx_v_count; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_rindexer.rcbuffer->pybuffer.buf, __pyx_t_33, __pyx_pybuffernd_rindexer.diminfo[0].strides) = -1; /* "pandas/src/generated.pyx":8177 * lindexer[count] = i * rindexer[count] = -1 * result[count] = left[i] # <<<<<<<<<<<<<< * count += 1 * i += 1 */ __pyx_t_34 = __pyx_v_i; __pyx_t_35 = __pyx_v_count; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_35, __pyx_pybuffernd_result.diminfo[0].strides) = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_left.rcbuffer->pybuffer.buf, __pyx_t_34, __pyx_pybuffernd_left.diminfo[0].strides)); /* "pandas/src/generated.pyx":8178 * rindexer[count] = -1 * result[count] = left[i] * count += 1 # <<<<<<<<<<<<<< * i += 1 * break */ __pyx_v_count = (__pyx_v_count + 1); /* "pandas/src/generated.pyx":8179 * result[count] = left[i] * count += 1 * i += 1 # <<<<<<<<<<<<<< * break * */ __pyx_v_i = (__pyx_v_i + 1); } /* "pandas/src/generated.pyx":8180 * count += 1 * i += 1 * break # <<<<<<<<<<<<<< * * lval = left[i] */ goto __pyx_L19_break; } /* "pandas/src/generated.pyx":8182 * break * * lval = left[i] # <<<<<<<<<<<<<< * rval = right[j] * */ __pyx_t_36 = __pyx_v_i; __pyx_v_lval = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_left.rcbuffer->pybuffer.buf, __pyx_t_36, __pyx_pybuffernd_left.diminfo[0].strides)); /* "pandas/src/generated.pyx":8183 * * lval = left[i] * rval = right[j] # <<<<<<<<<<<<<< * * if lval == rval: */ __pyx_t_37 = __pyx_v_j; __pyx_v_rval = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_right.rcbuffer->pybuffer.buf, __pyx_t_37, __pyx_pybuffernd_right.diminfo[0].strides)); /* "pandas/src/generated.pyx":8185 * rval = right[j] * * if lval == rval: # <<<<<<<<<<<<<< * lindexer[count] = i * rindexer[count] = j */ __pyx_t_6 = ((__pyx_v_lval == __pyx_v_rval) != 0); if (__pyx_t_6) { /* "pandas/src/generated.pyx":8186 * * if lval == rval: * lindexer[count] = i # <<<<<<<<<<<<<< * rindexer[count] = j * result[count] = lval */ __pyx_t_38 = __pyx_v_count; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_lindexer.rcbuffer->pybuffer.buf, __pyx_t_38, __pyx_pybuffernd_lindexer.diminfo[0].strides) = __pyx_v_i; /* "pandas/src/generated.pyx":8187 * if lval == rval: * lindexer[count] = i * rindexer[count] = j # <<<<<<<<<<<<<< * result[count] = lval * count += 1 */ __pyx_t_39 = __pyx_v_count; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_rindexer.rcbuffer->pybuffer.buf, __pyx_t_39, __pyx_pybuffernd_rindexer.diminfo[0].strides) = __pyx_v_j; /* "pandas/src/generated.pyx":8188 * lindexer[count] = i * rindexer[count] = j * result[count] = lval # <<<<<<<<<<<<<< * count += 1 * if i < nleft - 1: */ __pyx_t_40 = __pyx_v_count; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_40, __pyx_pybuffernd_result.diminfo[0].strides) = __pyx_v_lval; /* "pandas/src/generated.pyx":8189 * rindexer[count] = j * result[count] = lval * count += 1 # <<<<<<<<<<<<<< * if i < nleft - 1: * if j < nright - 1 and right[j + 1] == rval: */ __pyx_v_count = (__pyx_v_count + 1); /* "pandas/src/generated.pyx":8190 * result[count] = lval * count += 1 * if i < nleft - 1: # <<<<<<<<<<<<<< * if j < nright - 1 and right[j + 1] == rval: * j += 1 */ __pyx_t_6 = ((__pyx_v_i < (__pyx_v_nleft - 1)) != 0); if (__pyx_t_6) { /* "pandas/src/generated.pyx":8191 * count += 1 * if i < nleft - 1: * if j < nright - 1 and right[j + 1] == rval: # <<<<<<<<<<<<<< * j += 1 * else: */ __pyx_t_6 = ((__pyx_v_j < (__pyx_v_nright - 1)) != 0); if (__pyx_t_6) { __pyx_t_41 = (__pyx_v_j + 1); __pyx_t_2 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_right.rcbuffer->pybuffer.buf, __pyx_t_41, __pyx_pybuffernd_right.diminfo[0].strides)) == __pyx_v_rval) != 0); __pyx_t_5 = __pyx_t_2; } else { __pyx_t_5 = __pyx_t_6; } if (__pyx_t_5) { /* "pandas/src/generated.pyx":8192 * if i < nleft - 1: * if j < nright - 1 and right[j + 1] == rval: * j += 1 # <<<<<<<<<<<<<< * else: * i += 1 */ __pyx_v_j = (__pyx_v_j + 1); goto __pyx_L28; } /*else*/ { /* "pandas/src/generated.pyx":8194 * j += 1 * else: * i += 1 # <<<<<<<<<<<<<< * if left[i] != rval: * j += 1 */ __pyx_v_i = (__pyx_v_i + 1); /* "pandas/src/generated.pyx":8195 * else: * i += 1 * if left[i] != rval: # <<<<<<<<<<<<<< * j += 1 * elif j < nright - 1: */ __pyx_t_42 = __pyx_v_i; __pyx_t_5 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_left.rcbuffer->pybuffer.buf, __pyx_t_42, __pyx_pybuffernd_left.diminfo[0].strides)) != __pyx_v_rval) != 0); if (__pyx_t_5) { /* "pandas/src/generated.pyx":8196 * i += 1 * if left[i] != rval: * j += 1 # <<<<<<<<<<<<<< * elif j < nright - 1: * j += 1 */ __pyx_v_j = (__pyx_v_j + 1); goto __pyx_L29; } __pyx_L29:; } __pyx_L28:; goto __pyx_L27; } /* "pandas/src/generated.pyx":8197 * if left[i] != rval: * j += 1 * elif j < nright - 1: # <<<<<<<<<<<<<< * j += 1 * if lval != right[j]: */ __pyx_t_5 = ((__pyx_v_j < (__pyx_v_nright - 1)) != 0); if (__pyx_t_5) { /* "pandas/src/generated.pyx":8198 * j += 1 * elif j < nright - 1: * j += 1 # <<<<<<<<<<<<<< * if lval != right[j]: * i += 1 */ __pyx_v_j = (__pyx_v_j + 1); /* "pandas/src/generated.pyx":8199 * elif j < nright - 1: * j += 1 * if lval != right[j]: # <<<<<<<<<<<<<< * i += 1 * else: */ __pyx_t_43 = __pyx_v_j; __pyx_t_5 = ((__pyx_v_lval != (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_right.rcbuffer->pybuffer.buf, __pyx_t_43, __pyx_pybuffernd_right.diminfo[0].strides))) != 0); if (__pyx_t_5) { /* "pandas/src/generated.pyx":8200 * j += 1 * if lval != right[j]: * i += 1 # <<<<<<<<<<<<<< * else: * # end of the road */ __pyx_v_i = (__pyx_v_i + 1); goto __pyx_L30; } __pyx_L30:; goto __pyx_L27; } /*else*/ { /* "pandas/src/generated.pyx":8203 * else: * # end of the road * break # <<<<<<<<<<<<<< * elif lval < rval: * lindexer[count] = i */ goto __pyx_L19_break; } __pyx_L27:; goto __pyx_L26; } /* "pandas/src/generated.pyx":8204 * # end of the road * break * elif lval < rval: # <<<<<<<<<<<<<< * lindexer[count] = i * rindexer[count] = -1 */ __pyx_t_5 = ((__pyx_v_lval < __pyx_v_rval) != 0); if (__pyx_t_5) { /* "pandas/src/generated.pyx":8205 * break * elif lval < rval: * lindexer[count] = i # <<<<<<<<<<<<<< * rindexer[count] = -1 * result[count] = lval */ __pyx_t_44 = __pyx_v_count; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_lindexer.rcbuffer->pybuffer.buf, __pyx_t_44, __pyx_pybuffernd_lindexer.diminfo[0].strides) = __pyx_v_i; /* "pandas/src/generated.pyx":8206 * elif lval < rval: * lindexer[count] = i * rindexer[count] = -1 # <<<<<<<<<<<<<< * result[count] = lval * count += 1 */ __pyx_t_45 = __pyx_v_count; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_rindexer.rcbuffer->pybuffer.buf, __pyx_t_45, __pyx_pybuffernd_rindexer.diminfo[0].strides) = -1; /* "pandas/src/generated.pyx":8207 * lindexer[count] = i * rindexer[count] = -1 * result[count] = lval # <<<<<<<<<<<<<< * count += 1 * i += 1 */ __pyx_t_46 = __pyx_v_count; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_46, __pyx_pybuffernd_result.diminfo[0].strides) = __pyx_v_lval; /* "pandas/src/generated.pyx":8208 * rindexer[count] = -1 * result[count] = lval * count += 1 # <<<<<<<<<<<<<< * i += 1 * else: */ __pyx_v_count = (__pyx_v_count + 1); /* "pandas/src/generated.pyx":8209 * result[count] = lval * count += 1 * i += 1 # <<<<<<<<<<<<<< * else: * lindexer[count] = -1 */ __pyx_v_i = (__pyx_v_i + 1); goto __pyx_L26; } /*else*/ { /* "pandas/src/generated.pyx":8211 * i += 1 * else: * lindexer[count] = -1 # <<<<<<<<<<<<<< * rindexer[count] = j * result[count] = rval */ __pyx_t_47 = __pyx_v_count; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_lindexer.rcbuffer->pybuffer.buf, __pyx_t_47, __pyx_pybuffernd_lindexer.diminfo[0].strides) = -1; /* "pandas/src/generated.pyx":8212 * else: * lindexer[count] = -1 * rindexer[count] = j # <<<<<<<<<<<<<< * result[count] = rval * count += 1 */ __pyx_t_48 = __pyx_v_count; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_rindexer.rcbuffer->pybuffer.buf, __pyx_t_48, __pyx_pybuffernd_rindexer.diminfo[0].strides) = __pyx_v_j; /* "pandas/src/generated.pyx":8213 * lindexer[count] = -1 * rindexer[count] = j * result[count] = rval # <<<<<<<<<<<<<< * count += 1 * j += 1 */ __pyx_t_49 = __pyx_v_count; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_49, __pyx_pybuffernd_result.diminfo[0].strides) = __pyx_v_rval; /* "pandas/src/generated.pyx":8214 * rindexer[count] = j * result[count] = rval * count += 1 # <<<<<<<<<<<<<< * j += 1 * */ __pyx_v_count = (__pyx_v_count + 1); /* "pandas/src/generated.pyx":8215 * result[count] = rval * count += 1 * j += 1 # <<<<<<<<<<<<<< * * return result, lindexer, rindexer */ __pyx_v_j = (__pyx_v_j + 1); } __pyx_L26:; } __pyx_L19_break:; } __pyx_L13:; /* "pandas/src/generated.pyx":8217 * j += 1 * * return result, lindexer, rindexer # <<<<<<<<<<<<<< * * @cython.wraparound(False) */ __Pyx_XDECREF(__pyx_r); __pyx_t_10 = PyTuple_New(3); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8217; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_INCREF(((PyObject *)__pyx_v_result)); PyTuple_SET_ITEM(__pyx_t_10, 0, ((PyObject *)__pyx_v_result)); __Pyx_GIVEREF(((PyObject *)__pyx_v_result)); __Pyx_INCREF(((PyObject *)__pyx_v_lindexer)); PyTuple_SET_ITEM(__pyx_t_10, 1, ((PyObject *)__pyx_v_lindexer)); __Pyx_GIVEREF(((PyObject *)__pyx_v_lindexer)); __Pyx_INCREF(((PyObject *)__pyx_v_rindexer)); PyTuple_SET_ITEM(__pyx_t_10, 2, ((PyObject *)__pyx_v_rindexer)); __Pyx_GIVEREF(((PyObject *)__pyx_v_rindexer)); __pyx_r = __pyx_t_10; __pyx_t_10 = 0; goto __pyx_L0; /* "pandas/src/generated.pyx":8092 * @cython.wraparound(False) * @cython.boundscheck(False) * def outer_join_indexer_int32(ndarray[int32_t] left, # <<<<<<<<<<<<<< * ndarray[int32_t] right): * cdef: */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_9); __Pyx_XDECREF(__pyx_t_10); __Pyx_XDECREF(__pyx_t_11); __Pyx_XDECREF(__pyx_t_12); __Pyx_XDECREF(__pyx_t_13); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_left.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_lindexer.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_right.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_rindexer.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.outer_join_indexer_int32", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_left.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_lindexer.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_right.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_rindexer.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_lindexer); __Pyx_XDECREF((PyObject *)__pyx_v_rindexer); __Pyx_XDECREF((PyObject *)__pyx_v_result); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":8221 * @cython.wraparound(False) * @cython.boundscheck(False) * def outer_join_indexer_int64(ndarray[int64_t] left, # <<<<<<<<<<<<<< * ndarray[int64_t] right): * cdef: */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_483outer_join_indexer_int64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_483outer_join_indexer_int64 = {__Pyx_NAMESTR("outer_join_indexer_int64"), (PyCFunction)__pyx_pw_6pandas_5algos_483outer_join_indexer_int64, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_483outer_join_indexer_int64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_left = 0; PyArrayObject *__pyx_v_right = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("outer_join_indexer_int64 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_left,&__pyx_n_s_right,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_left)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_right)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("outer_join_indexer_int64", 1, 2, 2, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8221; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "outer_join_indexer_int64") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8221; __pyx_clineno = __LINE__; goto __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_left = ((PyArrayObject *)values[0]); __pyx_v_right = ((PyArrayObject *)values[1]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("outer_join_indexer_int64", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8221; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.outer_join_indexer_int64", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_left), __pyx_ptype_5numpy_ndarray, 1, "left", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8221; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_right), __pyx_ptype_5numpy_ndarray, 1, "right", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8222; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_482outer_join_indexer_int64(__pyx_self, __pyx_v_left, __pyx_v_right); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5algos_482outer_join_indexer_int64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_left, PyArrayObject *__pyx_v_right) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_nright; Py_ssize_t __pyx_v_nleft; Py_ssize_t __pyx_v_count; __pyx_t_5numpy_int64_t __pyx_v_lval; __pyx_t_5numpy_int64_t __pyx_v_rval; PyArrayObject *__pyx_v_lindexer = 0; PyArrayObject *__pyx_v_rindexer = 0; PyArrayObject *__pyx_v_result = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_left; __Pyx_Buffer __pyx_pybuffer_left; __Pyx_LocalBuf_ND __pyx_pybuffernd_lindexer; __Pyx_Buffer __pyx_pybuffer_lindexer; __Pyx_LocalBuf_ND __pyx_pybuffernd_result; __Pyx_Buffer __pyx_pybuffer_result; __Pyx_LocalBuf_ND __pyx_pybuffernd_right; __Pyx_Buffer __pyx_pybuffer_right; __Pyx_LocalBuf_ND __pyx_pybuffernd_rindexer; __Pyx_Buffer __pyx_pybuffer_rindexer; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; int __pyx_t_2; Py_ssize_t __pyx_t_3; Py_ssize_t __pyx_t_4; int __pyx_t_5; int __pyx_t_6; Py_ssize_t __pyx_t_7; Py_ssize_t __pyx_t_8; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; PyObject *__pyx_t_11 = NULL; PyObject *__pyx_t_12 = NULL; PyObject *__pyx_t_13 = NULL; PyArrayObject *__pyx_t_14 = NULL; int __pyx_t_15; PyObject *__pyx_t_16 = NULL; PyObject *__pyx_t_17 = NULL; PyObject *__pyx_t_18 = NULL; PyArrayObject *__pyx_t_19 = NULL; 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; Py_ssize_t __pyx_t_37; Py_ssize_t __pyx_t_38; Py_ssize_t __pyx_t_39; Py_ssize_t __pyx_t_40; Py_ssize_t __pyx_t_41; Py_ssize_t __pyx_t_42; Py_ssize_t __pyx_t_43; Py_ssize_t __pyx_t_44; Py_ssize_t __pyx_t_45; Py_ssize_t __pyx_t_46; Py_ssize_t __pyx_t_47; Py_ssize_t __pyx_t_48; Py_ssize_t __pyx_t_49; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("outer_join_indexer_int64", 0); __pyx_pybuffer_lindexer.pybuffer.buf = NULL; __pyx_pybuffer_lindexer.refcount = 0; __pyx_pybuffernd_lindexer.data = NULL; __pyx_pybuffernd_lindexer.rcbuffer = &__pyx_pybuffer_lindexer; __pyx_pybuffer_rindexer.pybuffer.buf = NULL; __pyx_pybuffer_rindexer.refcount = 0; __pyx_pybuffernd_rindexer.data = NULL; __pyx_pybuffernd_rindexer.rcbuffer = &__pyx_pybuffer_rindexer; __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_left.pybuffer.buf = NULL; __pyx_pybuffer_left.refcount = 0; __pyx_pybuffernd_left.data = NULL; __pyx_pybuffernd_left.rcbuffer = &__pyx_pybuffer_left; __pyx_pybuffer_right.pybuffer.buf = NULL; __pyx_pybuffer_right.refcount = 0; __pyx_pybuffernd_right.data = NULL; __pyx_pybuffernd_right.rcbuffer = &__pyx_pybuffer_right; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_left.rcbuffer->pybuffer, (PyObject*)__pyx_v_left, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8221; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_left.diminfo[0].strides = __pyx_pybuffernd_left.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_left.diminfo[0].shape = __pyx_pybuffernd_left.rcbuffer->pybuffer.shape[0]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_right.rcbuffer->pybuffer, (PyObject*)__pyx_v_right, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8221; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_right.diminfo[0].strides = __pyx_pybuffernd_right.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_right.diminfo[0].shape = __pyx_pybuffernd_right.rcbuffer->pybuffer.shape[0]; /* "pandas/src/generated.pyx":8229 * ndarray[int64_t] result * * nleft = len(left) # <<<<<<<<<<<<<< * nright = len(right) * */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_left)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8229; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_nleft = __pyx_t_1; /* "pandas/src/generated.pyx":8230 * * nleft = len(left) * nright = len(right) # <<<<<<<<<<<<<< * * i = 0 */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_right)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8230; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_nright = __pyx_t_1; /* "pandas/src/generated.pyx":8232 * nright = len(right) * * i = 0 # <<<<<<<<<<<<<< * j = 0 * count = 0 */ __pyx_v_i = 0; /* "pandas/src/generated.pyx":8233 * * i = 0 * j = 0 # <<<<<<<<<<<<<< * count = 0 * if nleft == 0: */ __pyx_v_j = 0; /* "pandas/src/generated.pyx":8234 * i = 0 * j = 0 * count = 0 # <<<<<<<<<<<<<< * if nleft == 0: * count = nright */ __pyx_v_count = 0; /* "pandas/src/generated.pyx":8235 * j = 0 * count = 0 * if nleft == 0: # <<<<<<<<<<<<<< * count = nright * elif nright == 0: */ __pyx_t_2 = ((__pyx_v_nleft == 0) != 0); if (__pyx_t_2) { /* "pandas/src/generated.pyx":8236 * count = 0 * if nleft == 0: * count = nright # <<<<<<<<<<<<<< * elif nright == 0: * count = nleft */ __pyx_v_count = __pyx_v_nright; goto __pyx_L3; } /* "pandas/src/generated.pyx":8237 * if nleft == 0: * count = nright * elif nright == 0: # <<<<<<<<<<<<<< * count = nleft * else: */ __pyx_t_2 = ((__pyx_v_nright == 0) != 0); if (__pyx_t_2) { /* "pandas/src/generated.pyx":8238 * count = nright * elif nright == 0: * count = nleft # <<<<<<<<<<<<<< * else: * while True: */ __pyx_v_count = __pyx_v_nleft; goto __pyx_L3; } /*else*/ { /* "pandas/src/generated.pyx":8240 * count = nleft * else: * while True: # <<<<<<<<<<<<<< * if i == nleft: * count += nright - j */ while (1) { /* "pandas/src/generated.pyx":8241 * else: * while True: * if i == nleft: # <<<<<<<<<<<<<< * count += nright - j * break */ __pyx_t_2 = ((__pyx_v_i == __pyx_v_nleft) != 0); if (__pyx_t_2) { /* "pandas/src/generated.pyx":8242 * while True: * if i == nleft: * count += nright - j # <<<<<<<<<<<<<< * break * if j == nright: */ __pyx_v_count = (__pyx_v_count + (__pyx_v_nright - __pyx_v_j)); /* "pandas/src/generated.pyx":8243 * if i == nleft: * count += nright - j * break # <<<<<<<<<<<<<< * if j == nright: * count += nleft - i */ goto __pyx_L5_break; } /* "pandas/src/generated.pyx":8244 * count += nright - j * break * if j == nright: # <<<<<<<<<<<<<< * count += nleft - i * break */ __pyx_t_2 = ((__pyx_v_j == __pyx_v_nright) != 0); if (__pyx_t_2) { /* "pandas/src/generated.pyx":8245 * break * if j == nright: * count += nleft - i # <<<<<<<<<<<<<< * break * */ __pyx_v_count = (__pyx_v_count + (__pyx_v_nleft - __pyx_v_i)); /* "pandas/src/generated.pyx":8246 * if j == nright: * count += nleft - i * break # <<<<<<<<<<<<<< * * lval = left[i] */ goto __pyx_L5_break; } /* "pandas/src/generated.pyx":8248 * break * * lval = left[i] # <<<<<<<<<<<<<< * rval = right[j] * if lval == rval: */ __pyx_t_1 = __pyx_v_i; __pyx_v_lval = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_left.rcbuffer->pybuffer.buf, __pyx_t_1, __pyx_pybuffernd_left.diminfo[0].strides)); /* "pandas/src/generated.pyx":8249 * * lval = left[i] * rval = right[j] # <<<<<<<<<<<<<< * if lval == rval: * count += 1 */ __pyx_t_3 = __pyx_v_j; __pyx_v_rval = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_right.rcbuffer->pybuffer.buf, __pyx_t_3, __pyx_pybuffernd_right.diminfo[0].strides)); /* "pandas/src/generated.pyx":8250 * lval = left[i] * rval = right[j] * if lval == rval: # <<<<<<<<<<<<<< * count += 1 * if i < nleft - 1: */ __pyx_t_2 = ((__pyx_v_lval == __pyx_v_rval) != 0); if (__pyx_t_2) { /* "pandas/src/generated.pyx":8251 * rval = right[j] * if lval == rval: * count += 1 # <<<<<<<<<<<<<< * if i < nleft - 1: * if j < nright - 1 and right[j + 1] == rval: */ __pyx_v_count = (__pyx_v_count + 1); /* "pandas/src/generated.pyx":8252 * if lval == rval: * count += 1 * if i < nleft - 1: # <<<<<<<<<<<<<< * if j < nright - 1 and right[j + 1] == rval: * j += 1 */ __pyx_t_2 = ((__pyx_v_i < (__pyx_v_nleft - 1)) != 0); if (__pyx_t_2) { /* "pandas/src/generated.pyx":8253 * count += 1 * if i < nleft - 1: * if j < nright - 1 and right[j + 1] == rval: # <<<<<<<<<<<<<< * j += 1 * else: */ __pyx_t_2 = ((__pyx_v_j < (__pyx_v_nright - 1)) != 0); if (__pyx_t_2) { __pyx_t_4 = (__pyx_v_j + 1); __pyx_t_5 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_right.rcbuffer->pybuffer.buf, __pyx_t_4, __pyx_pybuffernd_right.diminfo[0].strides)) == __pyx_v_rval) != 0); __pyx_t_6 = __pyx_t_5; } else { __pyx_t_6 = __pyx_t_2; } if (__pyx_t_6) { /* "pandas/src/generated.pyx":8254 * if i < nleft - 1: * if j < nright - 1 and right[j + 1] == rval: * j += 1 # <<<<<<<<<<<<<< * else: * i += 1 */ __pyx_v_j = (__pyx_v_j + 1); goto __pyx_L10; } /*else*/ { /* "pandas/src/generated.pyx":8256 * j += 1 * else: * i += 1 # <<<<<<<<<<<<<< * if left[i] != rval: * j += 1 */ __pyx_v_i = (__pyx_v_i + 1); /* "pandas/src/generated.pyx":8257 * else: * i += 1 * if left[i] != rval: # <<<<<<<<<<<<<< * j += 1 * elif j < nright - 1: */ __pyx_t_7 = __pyx_v_i; __pyx_t_6 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_left.rcbuffer->pybuffer.buf, __pyx_t_7, __pyx_pybuffernd_left.diminfo[0].strides)) != __pyx_v_rval) != 0); if (__pyx_t_6) { /* "pandas/src/generated.pyx":8258 * i += 1 * if left[i] != rval: * j += 1 # <<<<<<<<<<<<<< * elif j < nright - 1: * j += 1 */ __pyx_v_j = (__pyx_v_j + 1); goto __pyx_L11; } __pyx_L11:; } __pyx_L10:; goto __pyx_L9; } /* "pandas/src/generated.pyx":8259 * if left[i] != rval: * j += 1 * elif j < nright - 1: # <<<<<<<<<<<<<< * j += 1 * if lval != right[j]: */ __pyx_t_6 = ((__pyx_v_j < (__pyx_v_nright - 1)) != 0); if (__pyx_t_6) { /* "pandas/src/generated.pyx":8260 * j += 1 * elif j < nright - 1: * j += 1 # <<<<<<<<<<<<<< * if lval != right[j]: * i += 1 */ __pyx_v_j = (__pyx_v_j + 1); /* "pandas/src/generated.pyx":8261 * elif j < nright - 1: * j += 1 * if lval != right[j]: # <<<<<<<<<<<<<< * i += 1 * else: */ __pyx_t_8 = __pyx_v_j; __pyx_t_6 = ((__pyx_v_lval != (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_right.rcbuffer->pybuffer.buf, __pyx_t_8, __pyx_pybuffernd_right.diminfo[0].strides))) != 0); if (__pyx_t_6) { /* "pandas/src/generated.pyx":8262 * j += 1 * if lval != right[j]: * i += 1 # <<<<<<<<<<<<<< * else: * # end of the road */ __pyx_v_i = (__pyx_v_i + 1); goto __pyx_L12; } __pyx_L12:; goto __pyx_L9; } /*else*/ { /* "pandas/src/generated.pyx":8265 * else: * # end of the road * break # <<<<<<<<<<<<<< * elif lval < rval: * count += 1 */ goto __pyx_L5_break; } __pyx_L9:; goto __pyx_L8; } /* "pandas/src/generated.pyx":8266 * # end of the road * break * elif lval < rval: # <<<<<<<<<<<<<< * count += 1 * i += 1 */ __pyx_t_6 = ((__pyx_v_lval < __pyx_v_rval) != 0); if (__pyx_t_6) { /* "pandas/src/generated.pyx":8267 * break * elif lval < rval: * count += 1 # <<<<<<<<<<<<<< * i += 1 * else: */ __pyx_v_count = (__pyx_v_count + 1); /* "pandas/src/generated.pyx":8268 * elif lval < rval: * count += 1 * i += 1 # <<<<<<<<<<<<<< * else: * count += 1 */ __pyx_v_i = (__pyx_v_i + 1); goto __pyx_L8; } /*else*/ { /* "pandas/src/generated.pyx":8270 * i += 1 * else: * count += 1 # <<<<<<<<<<<<<< * j += 1 * */ __pyx_v_count = (__pyx_v_count + 1); /* "pandas/src/generated.pyx":8271 * else: * count += 1 * j += 1 # <<<<<<<<<<<<<< * * lindexer = np.empty(count, dtype=np.int64) */ __pyx_v_j = (__pyx_v_j + 1); } __pyx_L8:; } __pyx_L5_break:; } __pyx_L3:; /* "pandas/src/generated.pyx":8273 * j += 1 * * lindexer = np.empty(count, dtype=np.int64) # <<<<<<<<<<<<<< * rindexer = np.empty(count, dtype=np.int64) * result = np.empty(count, dtype=np.int64) */ __pyx_t_9 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8273; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_empty); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8273; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_9 = PyInt_FromSsize_t(__pyx_v_count); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8273; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_t_11 = PyTuple_New(1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8273; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_9); __Pyx_GIVEREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_9 = PyDict_New(); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8273; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_t_12 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8273; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_int64); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8273; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_dtype, __pyx_t_13) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8273; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_13 = PyObject_Call(__pyx_t_10, __pyx_t_11, __pyx_t_9); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8273; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; if (!(likely(((__pyx_t_13) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_13, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8273; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_14 = ((PyArrayObject *)__pyx_t_13); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_lindexer.rcbuffer->pybuffer); __pyx_t_15 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_lindexer.rcbuffer->pybuffer, (PyObject*)__pyx_t_14, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_15 < 0)) { PyErr_Fetch(&__pyx_t_16, &__pyx_t_17, &__pyx_t_18); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_lindexer.rcbuffer->pybuffer, (PyObject*)__pyx_v_lindexer, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_16); Py_XDECREF(__pyx_t_17); Py_XDECREF(__pyx_t_18); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_16, __pyx_t_17, __pyx_t_18); } } __pyx_pybuffernd_lindexer.diminfo[0].strides = __pyx_pybuffernd_lindexer.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_lindexer.diminfo[0].shape = __pyx_pybuffernd_lindexer.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_15 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8273; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_14 = 0; __pyx_v_lindexer = ((PyArrayObject *)__pyx_t_13); __pyx_t_13 = 0; /* "pandas/src/generated.pyx":8274 * * lindexer = np.empty(count, dtype=np.int64) * rindexer = np.empty(count, dtype=np.int64) # <<<<<<<<<<<<<< * result = np.empty(count, dtype=np.int64) * */ __pyx_t_13 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8274; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_13, __pyx_n_s_empty); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8274; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_13 = PyInt_FromSsize_t(__pyx_v_count); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8274; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __pyx_t_11 = PyTuple_New(1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8274; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_13); __Pyx_GIVEREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_13 = PyDict_New(); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8274; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __pyx_t_10 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8274; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_int64); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8274; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; if (PyDict_SetItem(__pyx_t_13, __pyx_n_s_dtype, __pyx_t_12) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8274; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __pyx_t_12 = PyObject_Call(__pyx_t_9, __pyx_t_11, __pyx_t_13); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8274; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; if (!(likely(((__pyx_t_12) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_12, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8274; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_14 = ((PyArrayObject *)__pyx_t_12); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_rindexer.rcbuffer->pybuffer); __pyx_t_15 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_rindexer.rcbuffer->pybuffer, (PyObject*)__pyx_t_14, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_15 < 0)) { PyErr_Fetch(&__pyx_t_18, &__pyx_t_17, &__pyx_t_16); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_rindexer.rcbuffer->pybuffer, (PyObject*)__pyx_v_rindexer, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_18); Py_XDECREF(__pyx_t_17); Py_XDECREF(__pyx_t_16); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_18, __pyx_t_17, __pyx_t_16); } } __pyx_pybuffernd_rindexer.diminfo[0].strides = __pyx_pybuffernd_rindexer.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_rindexer.diminfo[0].shape = __pyx_pybuffernd_rindexer.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_15 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8274; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_14 = 0; __pyx_v_rindexer = ((PyArrayObject *)__pyx_t_12); __pyx_t_12 = 0; /* "pandas/src/generated.pyx":8275 * lindexer = np.empty(count, dtype=np.int64) * rindexer = np.empty(count, dtype=np.int64) * result = np.empty(count, dtype=np.int64) # <<<<<<<<<<<<<< * * # do it again, but populate the indexers / result */ __pyx_t_12 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8275; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_empty); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8275; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __pyx_t_12 = PyInt_FromSsize_t(__pyx_v_count); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8275; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __pyx_t_11 = PyTuple_New(1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8275; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_12); __Pyx_GIVEREF(__pyx_t_12); __pyx_t_12 = 0; __pyx_t_12 = PyDict_New(); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8275; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __pyx_t_9 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8275; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_int64); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8275; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; if (PyDict_SetItem(__pyx_t_12, __pyx_n_s_dtype, __pyx_t_10) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8275; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_t_10 = PyObject_Call(__pyx_t_13, __pyx_t_11, __pyx_t_12); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8275; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; if (!(likely(((__pyx_t_10) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_10, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8275; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_19 = ((PyArrayObject *)__pyx_t_10); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __pyx_t_15 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_t_19, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_15 < 0)) { PyErr_Fetch(&__pyx_t_16, &__pyx_t_17, &__pyx_t_18); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_v_result, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_16); Py_XDECREF(__pyx_t_17); Py_XDECREF(__pyx_t_18); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_16, __pyx_t_17, __pyx_t_18); } } __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_15 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8275; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_19 = 0; __pyx_v_result = ((PyArrayObject *)__pyx_t_10); __pyx_t_10 = 0; /* "pandas/src/generated.pyx":8279 * # do it again, but populate the indexers / result * * i = 0 # <<<<<<<<<<<<<< * j = 0 * count = 0 */ __pyx_v_i = 0; /* "pandas/src/generated.pyx":8280 * * i = 0 * j = 0 # <<<<<<<<<<<<<< * count = 0 * if nleft == 0: */ __pyx_v_j = 0; /* "pandas/src/generated.pyx":8281 * i = 0 * j = 0 * count = 0 # <<<<<<<<<<<<<< * if nleft == 0: * for j in range(nright): */ __pyx_v_count = 0; /* "pandas/src/generated.pyx":8282 * j = 0 * count = 0 * if nleft == 0: # <<<<<<<<<<<<<< * for j in range(nright): * lindexer[j] = -1 */ __pyx_t_6 = ((__pyx_v_nleft == 0) != 0); if (__pyx_t_6) { /* "pandas/src/generated.pyx":8283 * count = 0 * if nleft == 0: * for j in range(nright): # <<<<<<<<<<<<<< * lindexer[j] = -1 * rindexer[j] = j */ __pyx_t_20 = __pyx_v_nright; for (__pyx_t_21 = 0; __pyx_t_21 < __pyx_t_20; __pyx_t_21+=1) { __pyx_v_j = __pyx_t_21; /* "pandas/src/generated.pyx":8284 * if nleft == 0: * for j in range(nright): * lindexer[j] = -1 # <<<<<<<<<<<<<< * rindexer[j] = j * result[j] = right[j] */ __pyx_t_22 = __pyx_v_j; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_lindexer.rcbuffer->pybuffer.buf, __pyx_t_22, __pyx_pybuffernd_lindexer.diminfo[0].strides) = -1; /* "pandas/src/generated.pyx":8285 * for j in range(nright): * lindexer[j] = -1 * rindexer[j] = j # <<<<<<<<<<<<<< * result[j] = right[j] * elif nright == 0: */ __pyx_t_23 = __pyx_v_j; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_rindexer.rcbuffer->pybuffer.buf, __pyx_t_23, __pyx_pybuffernd_rindexer.diminfo[0].strides) = __pyx_v_j; /* "pandas/src/generated.pyx":8286 * lindexer[j] = -1 * rindexer[j] = j * result[j] = right[j] # <<<<<<<<<<<<<< * elif nright == 0: * for i in range(nright): */ __pyx_t_24 = __pyx_v_j; __pyx_t_25 = __pyx_v_j; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_25, __pyx_pybuffernd_result.diminfo[0].strides) = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_right.rcbuffer->pybuffer.buf, __pyx_t_24, __pyx_pybuffernd_right.diminfo[0].strides)); } goto __pyx_L13; } /* "pandas/src/generated.pyx":8287 * rindexer[j] = j * result[j] = right[j] * elif nright == 0: # <<<<<<<<<<<<<< * for i in range(nright): * lindexer[i] = i */ __pyx_t_6 = ((__pyx_v_nright == 0) != 0); if (__pyx_t_6) { /* "pandas/src/generated.pyx":8288 * result[j] = right[j] * elif nright == 0: * for i in range(nright): # <<<<<<<<<<<<<< * lindexer[i] = i * rindexer[i] = -1 */ __pyx_t_20 = __pyx_v_nright; for (__pyx_t_21 = 0; __pyx_t_21 < __pyx_t_20; __pyx_t_21+=1) { __pyx_v_i = __pyx_t_21; /* "pandas/src/generated.pyx":8289 * elif nright == 0: * for i in range(nright): * lindexer[i] = i # <<<<<<<<<<<<<< * rindexer[i] = -1 * result[i] = left[i] */ __pyx_t_26 = __pyx_v_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_lindexer.rcbuffer->pybuffer.buf, __pyx_t_26, __pyx_pybuffernd_lindexer.diminfo[0].strides) = __pyx_v_i; /* "pandas/src/generated.pyx":8290 * for i in range(nright): * lindexer[i] = i * rindexer[i] = -1 # <<<<<<<<<<<<<< * result[i] = left[i] * else: */ __pyx_t_27 = __pyx_v_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_rindexer.rcbuffer->pybuffer.buf, __pyx_t_27, __pyx_pybuffernd_rindexer.diminfo[0].strides) = -1; /* "pandas/src/generated.pyx":8291 * lindexer[i] = i * rindexer[i] = -1 * result[i] = left[i] # <<<<<<<<<<<<<< * else: * while True: */ __pyx_t_28 = __pyx_v_i; __pyx_t_29 = __pyx_v_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_29, __pyx_pybuffernd_result.diminfo[0].strides) = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_left.rcbuffer->pybuffer.buf, __pyx_t_28, __pyx_pybuffernd_left.diminfo[0].strides)); } goto __pyx_L13; } /*else*/ { /* "pandas/src/generated.pyx":8293 * result[i] = left[i] * else: * while True: # <<<<<<<<<<<<<< * if i == nleft: * while j < nright: */ while (1) { /* "pandas/src/generated.pyx":8294 * else: * while True: * if i == nleft: # <<<<<<<<<<<<<< * while j < nright: * lindexer[count] = -1 */ __pyx_t_6 = ((__pyx_v_i == __pyx_v_nleft) != 0); if (__pyx_t_6) { /* "pandas/src/generated.pyx":8295 * while True: * if i == nleft: * while j < nright: # <<<<<<<<<<<<<< * lindexer[count] = -1 * rindexer[count] = j */ while (1) { __pyx_t_6 = ((__pyx_v_j < __pyx_v_nright) != 0); if (!__pyx_t_6) break; /* "pandas/src/generated.pyx":8296 * if i == nleft: * while j < nright: * lindexer[count] = -1 # <<<<<<<<<<<<<< * rindexer[count] = j * result[count] = right[j] */ __pyx_t_20 = __pyx_v_count; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_lindexer.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_lindexer.diminfo[0].strides) = -1; /* "pandas/src/generated.pyx":8297 * while j < nright: * lindexer[count] = -1 * rindexer[count] = j # <<<<<<<<<<<<<< * result[count] = right[j] * count += 1 */ __pyx_t_21 = __pyx_v_count; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_rindexer.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_rindexer.diminfo[0].strides) = __pyx_v_j; /* "pandas/src/generated.pyx":8298 * lindexer[count] = -1 * rindexer[count] = j * result[count] = right[j] # <<<<<<<<<<<<<< * count += 1 * j += 1 */ __pyx_t_30 = __pyx_v_j; __pyx_t_31 = __pyx_v_count; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_31, __pyx_pybuffernd_result.diminfo[0].strides) = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_right.rcbuffer->pybuffer.buf, __pyx_t_30, __pyx_pybuffernd_right.diminfo[0].strides)); /* "pandas/src/generated.pyx":8299 * rindexer[count] = j * result[count] = right[j] * count += 1 # <<<<<<<<<<<<<< * j += 1 * break */ __pyx_v_count = (__pyx_v_count + 1); /* "pandas/src/generated.pyx":8300 * result[count] = right[j] * count += 1 * j += 1 # <<<<<<<<<<<<<< * break * if j == nright: */ __pyx_v_j = (__pyx_v_j + 1); } /* "pandas/src/generated.pyx":8301 * count += 1 * j += 1 * break # <<<<<<<<<<<<<< * if j == nright: * while i < nleft: */ goto __pyx_L19_break; } /* "pandas/src/generated.pyx":8302 * j += 1 * break * if j == nright: # <<<<<<<<<<<<<< * while i < nleft: * lindexer[count] = i */ __pyx_t_6 = ((__pyx_v_j == __pyx_v_nright) != 0); if (__pyx_t_6) { /* "pandas/src/generated.pyx":8303 * break * if j == nright: * while i < nleft: # <<<<<<<<<<<<<< * lindexer[count] = i * rindexer[count] = -1 */ while (1) { __pyx_t_6 = ((__pyx_v_i < __pyx_v_nleft) != 0); if (!__pyx_t_6) break; /* "pandas/src/generated.pyx":8304 * if j == nright: * while i < nleft: * lindexer[count] = i # <<<<<<<<<<<<<< * rindexer[count] = -1 * result[count] = left[i] */ __pyx_t_32 = __pyx_v_count; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_lindexer.rcbuffer->pybuffer.buf, __pyx_t_32, __pyx_pybuffernd_lindexer.diminfo[0].strides) = __pyx_v_i; /* "pandas/src/generated.pyx":8305 * while i < nleft: * lindexer[count] = i * rindexer[count] = -1 # <<<<<<<<<<<<<< * result[count] = left[i] * count += 1 */ __pyx_t_33 = __pyx_v_count; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_rindexer.rcbuffer->pybuffer.buf, __pyx_t_33, __pyx_pybuffernd_rindexer.diminfo[0].strides) = -1; /* "pandas/src/generated.pyx":8306 * lindexer[count] = i * rindexer[count] = -1 * result[count] = left[i] # <<<<<<<<<<<<<< * count += 1 * i += 1 */ __pyx_t_34 = __pyx_v_i; __pyx_t_35 = __pyx_v_count; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_35, __pyx_pybuffernd_result.diminfo[0].strides) = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_left.rcbuffer->pybuffer.buf, __pyx_t_34, __pyx_pybuffernd_left.diminfo[0].strides)); /* "pandas/src/generated.pyx":8307 * rindexer[count] = -1 * result[count] = left[i] * count += 1 # <<<<<<<<<<<<<< * i += 1 * break */ __pyx_v_count = (__pyx_v_count + 1); /* "pandas/src/generated.pyx":8308 * result[count] = left[i] * count += 1 * i += 1 # <<<<<<<<<<<<<< * break * */ __pyx_v_i = (__pyx_v_i + 1); } /* "pandas/src/generated.pyx":8309 * count += 1 * i += 1 * break # <<<<<<<<<<<<<< * * lval = left[i] */ goto __pyx_L19_break; } /* "pandas/src/generated.pyx":8311 * break * * lval = left[i] # <<<<<<<<<<<<<< * rval = right[j] * */ __pyx_t_36 = __pyx_v_i; __pyx_v_lval = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_left.rcbuffer->pybuffer.buf, __pyx_t_36, __pyx_pybuffernd_left.diminfo[0].strides)); /* "pandas/src/generated.pyx":8312 * * lval = left[i] * rval = right[j] # <<<<<<<<<<<<<< * * if lval == rval: */ __pyx_t_37 = __pyx_v_j; __pyx_v_rval = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_right.rcbuffer->pybuffer.buf, __pyx_t_37, __pyx_pybuffernd_right.diminfo[0].strides)); /* "pandas/src/generated.pyx":8314 * rval = right[j] * * if lval == rval: # <<<<<<<<<<<<<< * lindexer[count] = i * rindexer[count] = j */ __pyx_t_6 = ((__pyx_v_lval == __pyx_v_rval) != 0); if (__pyx_t_6) { /* "pandas/src/generated.pyx":8315 * * if lval == rval: * lindexer[count] = i # <<<<<<<<<<<<<< * rindexer[count] = j * result[count] = lval */ __pyx_t_38 = __pyx_v_count; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_lindexer.rcbuffer->pybuffer.buf, __pyx_t_38, __pyx_pybuffernd_lindexer.diminfo[0].strides) = __pyx_v_i; /* "pandas/src/generated.pyx":8316 * if lval == rval: * lindexer[count] = i * rindexer[count] = j # <<<<<<<<<<<<<< * result[count] = lval * count += 1 */ __pyx_t_39 = __pyx_v_count; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_rindexer.rcbuffer->pybuffer.buf, __pyx_t_39, __pyx_pybuffernd_rindexer.diminfo[0].strides) = __pyx_v_j; /* "pandas/src/generated.pyx":8317 * lindexer[count] = i * rindexer[count] = j * result[count] = lval # <<<<<<<<<<<<<< * count += 1 * if i < nleft - 1: */ __pyx_t_40 = __pyx_v_count; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_40, __pyx_pybuffernd_result.diminfo[0].strides) = __pyx_v_lval; /* "pandas/src/generated.pyx":8318 * rindexer[count] = j * result[count] = lval * count += 1 # <<<<<<<<<<<<<< * if i < nleft - 1: * if j < nright - 1 and right[j + 1] == rval: */ __pyx_v_count = (__pyx_v_count + 1); /* "pandas/src/generated.pyx":8319 * result[count] = lval * count += 1 * if i < nleft - 1: # <<<<<<<<<<<<<< * if j < nright - 1 and right[j + 1] == rval: * j += 1 */ __pyx_t_6 = ((__pyx_v_i < (__pyx_v_nleft - 1)) != 0); if (__pyx_t_6) { /* "pandas/src/generated.pyx":8320 * count += 1 * if i < nleft - 1: * if j < nright - 1 and right[j + 1] == rval: # <<<<<<<<<<<<<< * j += 1 * else: */ __pyx_t_6 = ((__pyx_v_j < (__pyx_v_nright - 1)) != 0); if (__pyx_t_6) { __pyx_t_41 = (__pyx_v_j + 1); __pyx_t_2 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_right.rcbuffer->pybuffer.buf, __pyx_t_41, __pyx_pybuffernd_right.diminfo[0].strides)) == __pyx_v_rval) != 0); __pyx_t_5 = __pyx_t_2; } else { __pyx_t_5 = __pyx_t_6; } if (__pyx_t_5) { /* "pandas/src/generated.pyx":8321 * if i < nleft - 1: * if j < nright - 1 and right[j + 1] == rval: * j += 1 # <<<<<<<<<<<<<< * else: * i += 1 */ __pyx_v_j = (__pyx_v_j + 1); goto __pyx_L28; } /*else*/ { /* "pandas/src/generated.pyx":8323 * j += 1 * else: * i += 1 # <<<<<<<<<<<<<< * if left[i] != rval: * j += 1 */ __pyx_v_i = (__pyx_v_i + 1); /* "pandas/src/generated.pyx":8324 * else: * i += 1 * if left[i] != rval: # <<<<<<<<<<<<<< * j += 1 * elif j < nright - 1: */ __pyx_t_42 = __pyx_v_i; __pyx_t_5 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_left.rcbuffer->pybuffer.buf, __pyx_t_42, __pyx_pybuffernd_left.diminfo[0].strides)) != __pyx_v_rval) != 0); if (__pyx_t_5) { /* "pandas/src/generated.pyx":8325 * i += 1 * if left[i] != rval: * j += 1 # <<<<<<<<<<<<<< * elif j < nright - 1: * j += 1 */ __pyx_v_j = (__pyx_v_j + 1); goto __pyx_L29; } __pyx_L29:; } __pyx_L28:; goto __pyx_L27; } /* "pandas/src/generated.pyx":8326 * if left[i] != rval: * j += 1 * elif j < nright - 1: # <<<<<<<<<<<<<< * j += 1 * if lval != right[j]: */ __pyx_t_5 = ((__pyx_v_j < (__pyx_v_nright - 1)) != 0); if (__pyx_t_5) { /* "pandas/src/generated.pyx":8327 * j += 1 * elif j < nright - 1: * j += 1 # <<<<<<<<<<<<<< * if lval != right[j]: * i += 1 */ __pyx_v_j = (__pyx_v_j + 1); /* "pandas/src/generated.pyx":8328 * elif j < nright - 1: * j += 1 * if lval != right[j]: # <<<<<<<<<<<<<< * i += 1 * else: */ __pyx_t_43 = __pyx_v_j; __pyx_t_5 = ((__pyx_v_lval != (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_right.rcbuffer->pybuffer.buf, __pyx_t_43, __pyx_pybuffernd_right.diminfo[0].strides))) != 0); if (__pyx_t_5) { /* "pandas/src/generated.pyx":8329 * j += 1 * if lval != right[j]: * i += 1 # <<<<<<<<<<<<<< * else: * # end of the road */ __pyx_v_i = (__pyx_v_i + 1); goto __pyx_L30; } __pyx_L30:; goto __pyx_L27; } /*else*/ { /* "pandas/src/generated.pyx":8332 * else: * # end of the road * break # <<<<<<<<<<<<<< * elif lval < rval: * lindexer[count] = i */ goto __pyx_L19_break; } __pyx_L27:; goto __pyx_L26; } /* "pandas/src/generated.pyx":8333 * # end of the road * break * elif lval < rval: # <<<<<<<<<<<<<< * lindexer[count] = i * rindexer[count] = -1 */ __pyx_t_5 = ((__pyx_v_lval < __pyx_v_rval) != 0); if (__pyx_t_5) { /* "pandas/src/generated.pyx":8334 * break * elif lval < rval: * lindexer[count] = i # <<<<<<<<<<<<<< * rindexer[count] = -1 * result[count] = lval */ __pyx_t_44 = __pyx_v_count; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_lindexer.rcbuffer->pybuffer.buf, __pyx_t_44, __pyx_pybuffernd_lindexer.diminfo[0].strides) = __pyx_v_i; /* "pandas/src/generated.pyx":8335 * elif lval < rval: * lindexer[count] = i * rindexer[count] = -1 # <<<<<<<<<<<<<< * result[count] = lval * count += 1 */ __pyx_t_45 = __pyx_v_count; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_rindexer.rcbuffer->pybuffer.buf, __pyx_t_45, __pyx_pybuffernd_rindexer.diminfo[0].strides) = -1; /* "pandas/src/generated.pyx":8336 * lindexer[count] = i * rindexer[count] = -1 * result[count] = lval # <<<<<<<<<<<<<< * count += 1 * i += 1 */ __pyx_t_46 = __pyx_v_count; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_46, __pyx_pybuffernd_result.diminfo[0].strides) = __pyx_v_lval; /* "pandas/src/generated.pyx":8337 * rindexer[count] = -1 * result[count] = lval * count += 1 # <<<<<<<<<<<<<< * i += 1 * else: */ __pyx_v_count = (__pyx_v_count + 1); /* "pandas/src/generated.pyx":8338 * result[count] = lval * count += 1 * i += 1 # <<<<<<<<<<<<<< * else: * lindexer[count] = -1 */ __pyx_v_i = (__pyx_v_i + 1); goto __pyx_L26; } /*else*/ { /* "pandas/src/generated.pyx":8340 * i += 1 * else: * lindexer[count] = -1 # <<<<<<<<<<<<<< * rindexer[count] = j * result[count] = rval */ __pyx_t_47 = __pyx_v_count; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_lindexer.rcbuffer->pybuffer.buf, __pyx_t_47, __pyx_pybuffernd_lindexer.diminfo[0].strides) = -1; /* "pandas/src/generated.pyx":8341 * else: * lindexer[count] = -1 * rindexer[count] = j # <<<<<<<<<<<<<< * result[count] = rval * count += 1 */ __pyx_t_48 = __pyx_v_count; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_rindexer.rcbuffer->pybuffer.buf, __pyx_t_48, __pyx_pybuffernd_rindexer.diminfo[0].strides) = __pyx_v_j; /* "pandas/src/generated.pyx":8342 * lindexer[count] = -1 * rindexer[count] = j * result[count] = rval # <<<<<<<<<<<<<< * count += 1 * j += 1 */ __pyx_t_49 = __pyx_v_count; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_49, __pyx_pybuffernd_result.diminfo[0].strides) = __pyx_v_rval; /* "pandas/src/generated.pyx":8343 * rindexer[count] = j * result[count] = rval * count += 1 # <<<<<<<<<<<<<< * j += 1 * */ __pyx_v_count = (__pyx_v_count + 1); /* "pandas/src/generated.pyx":8344 * result[count] = rval * count += 1 * j += 1 # <<<<<<<<<<<<<< * * return result, lindexer, rindexer */ __pyx_v_j = (__pyx_v_j + 1); } __pyx_L26:; } __pyx_L19_break:; } __pyx_L13:; /* "pandas/src/generated.pyx":8346 * j += 1 * * return result, lindexer, rindexer # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_10 = PyTuple_New(3); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8346; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_INCREF(((PyObject *)__pyx_v_result)); PyTuple_SET_ITEM(__pyx_t_10, 0, ((PyObject *)__pyx_v_result)); __Pyx_GIVEREF(((PyObject *)__pyx_v_result)); __Pyx_INCREF(((PyObject *)__pyx_v_lindexer)); PyTuple_SET_ITEM(__pyx_t_10, 1, ((PyObject *)__pyx_v_lindexer)); __Pyx_GIVEREF(((PyObject *)__pyx_v_lindexer)); __Pyx_INCREF(((PyObject *)__pyx_v_rindexer)); PyTuple_SET_ITEM(__pyx_t_10, 2, ((PyObject *)__pyx_v_rindexer)); __Pyx_GIVEREF(((PyObject *)__pyx_v_rindexer)); __pyx_r = __pyx_t_10; __pyx_t_10 = 0; goto __pyx_L0; /* "pandas/src/generated.pyx":8221 * @cython.wraparound(False) * @cython.boundscheck(False) * def outer_join_indexer_int64(ndarray[int64_t] left, # <<<<<<<<<<<<<< * ndarray[int64_t] right): * cdef: */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_9); __Pyx_XDECREF(__pyx_t_10); __Pyx_XDECREF(__pyx_t_11); __Pyx_XDECREF(__pyx_t_12); __Pyx_XDECREF(__pyx_t_13); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_left.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_lindexer.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_right.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_rindexer.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.outer_join_indexer_int64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_left.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_lindexer.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_right.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_rindexer.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_lindexer); __Pyx_XDECREF((PyObject *)__pyx_v_rindexer); __Pyx_XDECREF((PyObject *)__pyx_v_result); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":8351 * @cython.wraparound(False) * @cython.boundscheck(False) * def inner_join_indexer_float64(ndarray[float64_t] left, # <<<<<<<<<<<<<< * ndarray[float64_t] right): * ''' */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_485inner_join_indexer_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6pandas_5algos_484inner_join_indexer_float64[] = "\n Two-pass algorithm for monotonic indexes. Handles many-to-one merges\n "; static PyMethodDef __pyx_mdef_6pandas_5algos_485inner_join_indexer_float64 = {__Pyx_NAMESTR("inner_join_indexer_float64"), (PyCFunction)__pyx_pw_6pandas_5algos_485inner_join_indexer_float64, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_5algos_484inner_join_indexer_float64)}; static PyObject *__pyx_pw_6pandas_5algos_485inner_join_indexer_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_left = 0; PyArrayObject *__pyx_v_right = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("inner_join_indexer_float64 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_left,&__pyx_n_s_right,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_left)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_right)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("inner_join_indexer_float64", 1, 2, 2, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8351; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "inner_join_indexer_float64") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8351; __pyx_clineno = __LINE__; goto __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_left = ((PyArrayObject *)values[0]); __pyx_v_right = ((PyArrayObject *)values[1]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("inner_join_indexer_float64", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8351; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.inner_join_indexer_float64", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_left), __pyx_ptype_5numpy_ndarray, 1, "left", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8351; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_right), __pyx_ptype_5numpy_ndarray, 1, "right", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8352; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_484inner_join_indexer_float64(__pyx_self, __pyx_v_left, __pyx_v_right); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5algos_484inner_join_indexer_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_left, PyArrayObject *__pyx_v_right) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_nright; Py_ssize_t __pyx_v_nleft; Py_ssize_t __pyx_v_count; __pyx_t_5numpy_float64_t __pyx_v_lval; __pyx_t_5numpy_float64_t __pyx_v_rval; PyArrayObject *__pyx_v_lindexer = 0; PyArrayObject *__pyx_v_rindexer = 0; PyArrayObject *__pyx_v_result = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_left; __Pyx_Buffer __pyx_pybuffer_left; __Pyx_LocalBuf_ND __pyx_pybuffernd_lindexer; __Pyx_Buffer __pyx_pybuffer_lindexer; __Pyx_LocalBuf_ND __pyx_pybuffernd_result; __Pyx_Buffer __pyx_pybuffer_result; __Pyx_LocalBuf_ND __pyx_pybuffernd_right; __Pyx_Buffer __pyx_pybuffer_right; __Pyx_LocalBuf_ND __pyx_pybuffernd_rindexer; __Pyx_Buffer __pyx_pybuffer_rindexer; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; int __pyx_t_2; int __pyx_t_3; int __pyx_t_4; Py_ssize_t __pyx_t_5; Py_ssize_t __pyx_t_6; Py_ssize_t __pyx_t_7; Py_ssize_t __pyx_t_8; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; PyObject *__pyx_t_11 = NULL; PyObject *__pyx_t_12 = NULL; PyObject *__pyx_t_13 = NULL; PyArrayObject *__pyx_t_14 = NULL; int __pyx_t_15; PyObject *__pyx_t_16 = NULL; PyObject *__pyx_t_17 = NULL; PyObject *__pyx_t_18 = NULL; PyArrayObject *__pyx_t_19 = NULL; 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("inner_join_indexer_float64", 0); __pyx_pybuffer_lindexer.pybuffer.buf = NULL; __pyx_pybuffer_lindexer.refcount = 0; __pyx_pybuffernd_lindexer.data = NULL; __pyx_pybuffernd_lindexer.rcbuffer = &__pyx_pybuffer_lindexer; __pyx_pybuffer_rindexer.pybuffer.buf = NULL; __pyx_pybuffer_rindexer.refcount = 0; __pyx_pybuffernd_rindexer.data = NULL; __pyx_pybuffernd_rindexer.rcbuffer = &__pyx_pybuffer_rindexer; __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_left.pybuffer.buf = NULL; __pyx_pybuffer_left.refcount = 0; __pyx_pybuffernd_left.data = NULL; __pyx_pybuffernd_left.rcbuffer = &__pyx_pybuffer_left; __pyx_pybuffer_right.pybuffer.buf = NULL; __pyx_pybuffer_right.refcount = 0; __pyx_pybuffernd_right.data = NULL; __pyx_pybuffernd_right.rcbuffer = &__pyx_pybuffer_right; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_left.rcbuffer->pybuffer, (PyObject*)__pyx_v_left, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8351; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_left.diminfo[0].strides = __pyx_pybuffernd_left.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_left.diminfo[0].shape = __pyx_pybuffernd_left.rcbuffer->pybuffer.shape[0]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_right.rcbuffer->pybuffer, (PyObject*)__pyx_v_right, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8351; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_right.diminfo[0].strides = __pyx_pybuffernd_right.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_right.diminfo[0].shape = __pyx_pybuffernd_right.rcbuffer->pybuffer.shape[0]; /* "pandas/src/generated.pyx":8362 * ndarray[float64_t] result * * nleft = len(left) # <<<<<<<<<<<<<< * nright = len(right) * */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_left)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8362; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_nleft = __pyx_t_1; /* "pandas/src/generated.pyx":8363 * * nleft = len(left) * nright = len(right) # <<<<<<<<<<<<<< * * i = 0 */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_right)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8363; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_nright = __pyx_t_1; /* "pandas/src/generated.pyx":8365 * nright = len(right) * * i = 0 # <<<<<<<<<<<<<< * j = 0 * count = 0 */ __pyx_v_i = 0; /* "pandas/src/generated.pyx":8366 * * i = 0 * j = 0 # <<<<<<<<<<<<<< * count = 0 * if nleft > 0 and nright > 0: */ __pyx_v_j = 0; /* "pandas/src/generated.pyx":8367 * i = 0 * j = 0 * count = 0 # <<<<<<<<<<<<<< * if nleft > 0 and nright > 0: * while True: */ __pyx_v_count = 0; /* "pandas/src/generated.pyx":8368 * j = 0 * count = 0 * if nleft > 0 and nright > 0: # <<<<<<<<<<<<<< * while True: * if i == nleft: */ __pyx_t_2 = ((__pyx_v_nleft > 0) != 0); if (__pyx_t_2) { __pyx_t_3 = ((__pyx_v_nright > 0) != 0); __pyx_t_4 = __pyx_t_3; } else { __pyx_t_4 = __pyx_t_2; } if (__pyx_t_4) { /* "pandas/src/generated.pyx":8369 * count = 0 * if nleft > 0 and nright > 0: * while True: # <<<<<<<<<<<<<< * if i == nleft: * break */ while (1) { /* "pandas/src/generated.pyx":8370 * if nleft > 0 and nright > 0: * while True: * if i == nleft: # <<<<<<<<<<<<<< * break * if j == nright: */ __pyx_t_4 = ((__pyx_v_i == __pyx_v_nleft) != 0); if (__pyx_t_4) { /* "pandas/src/generated.pyx":8371 * while True: * if i == nleft: * break # <<<<<<<<<<<<<< * if j == nright: * break */ goto __pyx_L5_break; } /* "pandas/src/generated.pyx":8372 * if i == nleft: * break * if j == nright: # <<<<<<<<<<<<<< * break * */ __pyx_t_4 = ((__pyx_v_j == __pyx_v_nright) != 0); if (__pyx_t_4) { /* "pandas/src/generated.pyx":8373 * break * if j == nright: * break # <<<<<<<<<<<<<< * * lval = left[i] */ goto __pyx_L5_break; } /* "pandas/src/generated.pyx":8375 * break * * lval = left[i] # <<<<<<<<<<<<<< * rval = right[j] * if lval == rval: */ __pyx_t_1 = __pyx_v_i; __pyx_v_lval = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_left.rcbuffer->pybuffer.buf, __pyx_t_1, __pyx_pybuffernd_left.diminfo[0].strides)); /* "pandas/src/generated.pyx":8376 * * lval = left[i] * rval = right[j] # <<<<<<<<<<<<<< * if lval == rval: * count += 1 */ __pyx_t_5 = __pyx_v_j; __pyx_v_rval = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_right.rcbuffer->pybuffer.buf, __pyx_t_5, __pyx_pybuffernd_right.diminfo[0].strides)); /* "pandas/src/generated.pyx":8377 * lval = left[i] * rval = right[j] * if lval == rval: # <<<<<<<<<<<<<< * count += 1 * if i < nleft - 1: */ __pyx_t_4 = ((__pyx_v_lval == __pyx_v_rval) != 0); if (__pyx_t_4) { /* "pandas/src/generated.pyx":8378 * rval = right[j] * if lval == rval: * count += 1 # <<<<<<<<<<<<<< * if i < nleft - 1: * if j < nright - 1 and right[j + 1] == rval: */ __pyx_v_count = (__pyx_v_count + 1); /* "pandas/src/generated.pyx":8379 * if lval == rval: * count += 1 * if i < nleft - 1: # <<<<<<<<<<<<<< * if j < nright - 1 and right[j + 1] == rval: * j += 1 */ __pyx_t_4 = ((__pyx_v_i < (__pyx_v_nleft - 1)) != 0); if (__pyx_t_4) { /* "pandas/src/generated.pyx":8380 * count += 1 * if i < nleft - 1: * if j < nright - 1 and right[j + 1] == rval: # <<<<<<<<<<<<<< * j += 1 * else: */ __pyx_t_4 = ((__pyx_v_j < (__pyx_v_nright - 1)) != 0); if (__pyx_t_4) { __pyx_t_6 = (__pyx_v_j + 1); __pyx_t_2 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_right.rcbuffer->pybuffer.buf, __pyx_t_6, __pyx_pybuffernd_right.diminfo[0].strides)) == __pyx_v_rval) != 0); __pyx_t_3 = __pyx_t_2; } else { __pyx_t_3 = __pyx_t_4; } if (__pyx_t_3) { /* "pandas/src/generated.pyx":8381 * if i < nleft - 1: * if j < nright - 1 and right[j + 1] == rval: * j += 1 # <<<<<<<<<<<<<< * else: * i += 1 */ __pyx_v_j = (__pyx_v_j + 1); goto __pyx_L10; } /*else*/ { /* "pandas/src/generated.pyx":8383 * j += 1 * else: * i += 1 # <<<<<<<<<<<<<< * if left[i] != rval: * j += 1 */ __pyx_v_i = (__pyx_v_i + 1); /* "pandas/src/generated.pyx":8384 * else: * i += 1 * if left[i] != rval: # <<<<<<<<<<<<<< * j += 1 * elif j < nright - 1: */ __pyx_t_7 = __pyx_v_i; __pyx_t_3 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_left.rcbuffer->pybuffer.buf, __pyx_t_7, __pyx_pybuffernd_left.diminfo[0].strides)) != __pyx_v_rval) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":8385 * i += 1 * if left[i] != rval: * j += 1 # <<<<<<<<<<<<<< * elif j < nright - 1: * j += 1 */ __pyx_v_j = (__pyx_v_j + 1); goto __pyx_L11; } __pyx_L11:; } __pyx_L10:; goto __pyx_L9; } /* "pandas/src/generated.pyx":8386 * if left[i] != rval: * j += 1 * elif j < nright - 1: # <<<<<<<<<<<<<< * j += 1 * if lval != right[j]: */ __pyx_t_3 = ((__pyx_v_j < (__pyx_v_nright - 1)) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":8387 * j += 1 * elif j < nright - 1: * j += 1 # <<<<<<<<<<<<<< * if lval != right[j]: * i += 1 */ __pyx_v_j = (__pyx_v_j + 1); /* "pandas/src/generated.pyx":8388 * elif j < nright - 1: * j += 1 * if lval != right[j]: # <<<<<<<<<<<<<< * i += 1 * else: */ __pyx_t_8 = __pyx_v_j; __pyx_t_3 = ((__pyx_v_lval != (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_right.rcbuffer->pybuffer.buf, __pyx_t_8, __pyx_pybuffernd_right.diminfo[0].strides))) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":8389 * j += 1 * if lval != right[j]: * i += 1 # <<<<<<<<<<<<<< * else: * # end of the road */ __pyx_v_i = (__pyx_v_i + 1); goto __pyx_L12; } __pyx_L12:; goto __pyx_L9; } /*else*/ { /* "pandas/src/generated.pyx":8392 * else: * # end of the road * break # <<<<<<<<<<<<<< * elif lval < rval: * i += 1 */ goto __pyx_L5_break; } __pyx_L9:; goto __pyx_L8; } /* "pandas/src/generated.pyx":8393 * # end of the road * break * elif lval < rval: # <<<<<<<<<<<<<< * i += 1 * else: */ __pyx_t_3 = ((__pyx_v_lval < __pyx_v_rval) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":8394 * break * elif lval < rval: * i += 1 # <<<<<<<<<<<<<< * else: * j += 1 */ __pyx_v_i = (__pyx_v_i + 1); goto __pyx_L8; } /*else*/ { /* "pandas/src/generated.pyx":8396 * i += 1 * else: * j += 1 # <<<<<<<<<<<<<< * * # do it again now that result size is known */ __pyx_v_j = (__pyx_v_j + 1); } __pyx_L8:; } __pyx_L5_break:; goto __pyx_L3; } __pyx_L3:; /* "pandas/src/generated.pyx":8400 * # do it again now that result size is known * * lindexer = np.empty(count, dtype=np.int64) # <<<<<<<<<<<<<< * rindexer = np.empty(count, dtype=np.int64) * result = np.empty(count, dtype=np.float64) */ __pyx_t_9 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8400; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_empty); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8400; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_9 = PyInt_FromSsize_t(__pyx_v_count); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8400; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_t_11 = PyTuple_New(1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8400; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_9); __Pyx_GIVEREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_9 = PyDict_New(); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8400; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_t_12 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8400; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_int64); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8400; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_dtype, __pyx_t_13) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8400; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_13 = PyObject_Call(__pyx_t_10, __pyx_t_11, __pyx_t_9); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8400; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; if (!(likely(((__pyx_t_13) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_13, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8400; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_14 = ((PyArrayObject *)__pyx_t_13); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_lindexer.rcbuffer->pybuffer); __pyx_t_15 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_lindexer.rcbuffer->pybuffer, (PyObject*)__pyx_t_14, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_15 < 0)) { PyErr_Fetch(&__pyx_t_16, &__pyx_t_17, &__pyx_t_18); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_lindexer.rcbuffer->pybuffer, (PyObject*)__pyx_v_lindexer, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_16); Py_XDECREF(__pyx_t_17); Py_XDECREF(__pyx_t_18); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_16, __pyx_t_17, __pyx_t_18); } } __pyx_pybuffernd_lindexer.diminfo[0].strides = __pyx_pybuffernd_lindexer.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_lindexer.diminfo[0].shape = __pyx_pybuffernd_lindexer.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_15 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8400; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_14 = 0; __pyx_v_lindexer = ((PyArrayObject *)__pyx_t_13); __pyx_t_13 = 0; /* "pandas/src/generated.pyx":8401 * * lindexer = np.empty(count, dtype=np.int64) * rindexer = np.empty(count, dtype=np.int64) # <<<<<<<<<<<<<< * result = np.empty(count, dtype=np.float64) * */ __pyx_t_13 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8401; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_13, __pyx_n_s_empty); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8401; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_13 = PyInt_FromSsize_t(__pyx_v_count); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8401; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __pyx_t_11 = PyTuple_New(1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8401; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_13); __Pyx_GIVEREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_13 = PyDict_New(); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8401; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __pyx_t_10 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8401; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_int64); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8401; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; if (PyDict_SetItem(__pyx_t_13, __pyx_n_s_dtype, __pyx_t_12) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8401; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __pyx_t_12 = PyObject_Call(__pyx_t_9, __pyx_t_11, __pyx_t_13); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8401; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; if (!(likely(((__pyx_t_12) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_12, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8401; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_14 = ((PyArrayObject *)__pyx_t_12); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_rindexer.rcbuffer->pybuffer); __pyx_t_15 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_rindexer.rcbuffer->pybuffer, (PyObject*)__pyx_t_14, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_15 < 0)) { PyErr_Fetch(&__pyx_t_18, &__pyx_t_17, &__pyx_t_16); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_rindexer.rcbuffer->pybuffer, (PyObject*)__pyx_v_rindexer, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_18); Py_XDECREF(__pyx_t_17); Py_XDECREF(__pyx_t_16); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_18, __pyx_t_17, __pyx_t_16); } } __pyx_pybuffernd_rindexer.diminfo[0].strides = __pyx_pybuffernd_rindexer.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_rindexer.diminfo[0].shape = __pyx_pybuffernd_rindexer.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_15 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8401; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_14 = 0; __pyx_v_rindexer = ((PyArrayObject *)__pyx_t_12); __pyx_t_12 = 0; /* "pandas/src/generated.pyx":8402 * lindexer = np.empty(count, dtype=np.int64) * rindexer = np.empty(count, dtype=np.int64) * result = np.empty(count, dtype=np.float64) # <<<<<<<<<<<<<< * * i = 0 */ __pyx_t_12 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8402; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_empty); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8402; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __pyx_t_12 = PyInt_FromSsize_t(__pyx_v_count); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8402; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __pyx_t_11 = PyTuple_New(1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8402; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_12); __Pyx_GIVEREF(__pyx_t_12); __pyx_t_12 = 0; __pyx_t_12 = PyDict_New(); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8402; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __pyx_t_9 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8402; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_float64); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8402; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; if (PyDict_SetItem(__pyx_t_12, __pyx_n_s_dtype, __pyx_t_10) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8402; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_t_10 = PyObject_Call(__pyx_t_13, __pyx_t_11, __pyx_t_12); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8402; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; if (!(likely(((__pyx_t_10) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_10, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8402; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_19 = ((PyArrayObject *)__pyx_t_10); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __pyx_t_15 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_t_19, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_15 < 0)) { PyErr_Fetch(&__pyx_t_16, &__pyx_t_17, &__pyx_t_18); 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_16); Py_XDECREF(__pyx_t_17); Py_XDECREF(__pyx_t_18); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_16, __pyx_t_17, __pyx_t_18); } } __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_15 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8402; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_19 = 0; __pyx_v_result = ((PyArrayObject *)__pyx_t_10); __pyx_t_10 = 0; /* "pandas/src/generated.pyx":8404 * result = np.empty(count, dtype=np.float64) * * i = 0 # <<<<<<<<<<<<<< * j = 0 * count = 0 */ __pyx_v_i = 0; /* "pandas/src/generated.pyx":8405 * * i = 0 * j = 0 # <<<<<<<<<<<<<< * count = 0 * if nleft > 0 and nright > 0: */ __pyx_v_j = 0; /* "pandas/src/generated.pyx":8406 * i = 0 * j = 0 * count = 0 # <<<<<<<<<<<<<< * if nleft > 0 and nright > 0: * while True: */ __pyx_v_count = 0; /* "pandas/src/generated.pyx":8407 * j = 0 * count = 0 * if nleft > 0 and nright > 0: # <<<<<<<<<<<<<< * while True: * if i == nleft: */ __pyx_t_3 = ((__pyx_v_nleft > 0) != 0); if (__pyx_t_3) { __pyx_t_4 = ((__pyx_v_nright > 0) != 0); __pyx_t_2 = __pyx_t_4; } else { __pyx_t_2 = __pyx_t_3; } if (__pyx_t_2) { /* "pandas/src/generated.pyx":8408 * count = 0 * if nleft > 0 and nright > 0: * while True: # <<<<<<<<<<<<<< * if i == nleft: * break */ while (1) { /* "pandas/src/generated.pyx":8409 * if nleft > 0 and nright > 0: * while True: * if i == nleft: # <<<<<<<<<<<<<< * break * if j == nright: */ __pyx_t_2 = ((__pyx_v_i == __pyx_v_nleft) != 0); if (__pyx_t_2) { /* "pandas/src/generated.pyx":8410 * while True: * if i == nleft: * break # <<<<<<<<<<<<<< * if j == nright: * break */ goto __pyx_L15_break; } /* "pandas/src/generated.pyx":8411 * if i == nleft: * break * if j == nright: # <<<<<<<<<<<<<< * break * */ __pyx_t_2 = ((__pyx_v_j == __pyx_v_nright) != 0); if (__pyx_t_2) { /* "pandas/src/generated.pyx":8412 * break * if j == nright: * break # <<<<<<<<<<<<<< * * lval = left[i] */ goto __pyx_L15_break; } /* "pandas/src/generated.pyx":8414 * break * * lval = left[i] # <<<<<<<<<<<<<< * rval = right[j] * if lval == rval: */ __pyx_t_20 = __pyx_v_i; __pyx_v_lval = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_left.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_left.diminfo[0].strides)); /* "pandas/src/generated.pyx":8415 * * lval = left[i] * rval = right[j] # <<<<<<<<<<<<<< * if lval == rval: * lindexer[count] = i */ __pyx_t_21 = __pyx_v_j; __pyx_v_rval = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_right.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_right.diminfo[0].strides)); /* "pandas/src/generated.pyx":8416 * lval = left[i] * rval = right[j] * if lval == rval: # <<<<<<<<<<<<<< * lindexer[count] = i * rindexer[count] = j */ __pyx_t_2 = ((__pyx_v_lval == __pyx_v_rval) != 0); if (__pyx_t_2) { /* "pandas/src/generated.pyx":8417 * rval = right[j] * if lval == rval: * lindexer[count] = i # <<<<<<<<<<<<<< * rindexer[count] = j * result[count] = rval */ __pyx_t_22 = __pyx_v_count; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_lindexer.rcbuffer->pybuffer.buf, __pyx_t_22, __pyx_pybuffernd_lindexer.diminfo[0].strides) = __pyx_v_i; /* "pandas/src/generated.pyx":8418 * if lval == rval: * lindexer[count] = i * rindexer[count] = j # <<<<<<<<<<<<<< * result[count] = rval * count += 1 */ __pyx_t_23 = __pyx_v_count; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_rindexer.rcbuffer->pybuffer.buf, __pyx_t_23, __pyx_pybuffernd_rindexer.diminfo[0].strides) = __pyx_v_j; /* "pandas/src/generated.pyx":8419 * lindexer[count] = i * rindexer[count] = j * result[count] = rval # <<<<<<<<<<<<<< * count += 1 * if i < nleft - 1: */ __pyx_t_24 = __pyx_v_count; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_24, __pyx_pybuffernd_result.diminfo[0].strides) = __pyx_v_rval; /* "pandas/src/generated.pyx":8420 * rindexer[count] = j * result[count] = rval * count += 1 # <<<<<<<<<<<<<< * if i < nleft - 1: * if j < nright - 1 and right[j + 1] == rval: */ __pyx_v_count = (__pyx_v_count + 1); /* "pandas/src/generated.pyx":8421 * result[count] = rval * count += 1 * if i < nleft - 1: # <<<<<<<<<<<<<< * if j < nright - 1 and right[j + 1] == rval: * j += 1 */ __pyx_t_2 = ((__pyx_v_i < (__pyx_v_nleft - 1)) != 0); if (__pyx_t_2) { /* "pandas/src/generated.pyx":8422 * count += 1 * if i < nleft - 1: * if j < nright - 1 and right[j + 1] == rval: # <<<<<<<<<<<<<< * j += 1 * else: */ __pyx_t_2 = ((__pyx_v_j < (__pyx_v_nright - 1)) != 0); if (__pyx_t_2) { __pyx_t_25 = (__pyx_v_j + 1); __pyx_t_3 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_right.rcbuffer->pybuffer.buf, __pyx_t_25, __pyx_pybuffernd_right.diminfo[0].strides)) == __pyx_v_rval) != 0); __pyx_t_4 = __pyx_t_3; } else { __pyx_t_4 = __pyx_t_2; } if (__pyx_t_4) { /* "pandas/src/generated.pyx":8423 * if i < nleft - 1: * if j < nright - 1 and right[j + 1] == rval: * j += 1 # <<<<<<<<<<<<<< * else: * i += 1 */ __pyx_v_j = (__pyx_v_j + 1); goto __pyx_L20; } /*else*/ { /* "pandas/src/generated.pyx":8425 * j += 1 * else: * i += 1 # <<<<<<<<<<<<<< * if left[i] != rval: * j += 1 */ __pyx_v_i = (__pyx_v_i + 1); /* "pandas/src/generated.pyx":8426 * else: * i += 1 * if left[i] != rval: # <<<<<<<<<<<<<< * j += 1 * elif j < nright - 1: */ __pyx_t_26 = __pyx_v_i; __pyx_t_4 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_left.rcbuffer->pybuffer.buf, __pyx_t_26, __pyx_pybuffernd_left.diminfo[0].strides)) != __pyx_v_rval) != 0); if (__pyx_t_4) { /* "pandas/src/generated.pyx":8427 * i += 1 * if left[i] != rval: * j += 1 # <<<<<<<<<<<<<< * elif j < nright - 1: * j += 1 */ __pyx_v_j = (__pyx_v_j + 1); goto __pyx_L21; } __pyx_L21:; } __pyx_L20:; goto __pyx_L19; } /* "pandas/src/generated.pyx":8428 * if left[i] != rval: * j += 1 * elif j < nright - 1: # <<<<<<<<<<<<<< * j += 1 * if lval != right[j]: */ __pyx_t_4 = ((__pyx_v_j < (__pyx_v_nright - 1)) != 0); if (__pyx_t_4) { /* "pandas/src/generated.pyx":8429 * j += 1 * elif j < nright - 1: * j += 1 # <<<<<<<<<<<<<< * if lval != right[j]: * i += 1 */ __pyx_v_j = (__pyx_v_j + 1); /* "pandas/src/generated.pyx":8430 * elif j < nright - 1: * j += 1 * if lval != right[j]: # <<<<<<<<<<<<<< * i += 1 * else: */ __pyx_t_27 = __pyx_v_j; __pyx_t_4 = ((__pyx_v_lval != (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_right.rcbuffer->pybuffer.buf, __pyx_t_27, __pyx_pybuffernd_right.diminfo[0].strides))) != 0); if (__pyx_t_4) { /* "pandas/src/generated.pyx":8431 * j += 1 * if lval != right[j]: * i += 1 # <<<<<<<<<<<<<< * else: * # end of the road */ __pyx_v_i = (__pyx_v_i + 1); goto __pyx_L22; } __pyx_L22:; goto __pyx_L19; } /*else*/ { /* "pandas/src/generated.pyx":8434 * else: * # end of the road * break # <<<<<<<<<<<<<< * elif lval < rval: * i += 1 */ goto __pyx_L15_break; } __pyx_L19:; goto __pyx_L18; } /* "pandas/src/generated.pyx":8435 * # end of the road * break * elif lval < rval: # <<<<<<<<<<<<<< * i += 1 * else: */ __pyx_t_4 = ((__pyx_v_lval < __pyx_v_rval) != 0); if (__pyx_t_4) { /* "pandas/src/generated.pyx":8436 * break * elif lval < rval: * i += 1 # <<<<<<<<<<<<<< * else: * j += 1 */ __pyx_v_i = (__pyx_v_i + 1); goto __pyx_L18; } /*else*/ { /* "pandas/src/generated.pyx":8438 * i += 1 * else: * j += 1 # <<<<<<<<<<<<<< * * return result, lindexer, rindexer */ __pyx_v_j = (__pyx_v_j + 1); } __pyx_L18:; } __pyx_L15_break:; goto __pyx_L13; } __pyx_L13:; /* "pandas/src/generated.pyx":8440 * j += 1 * * return result, lindexer, rindexer # <<<<<<<<<<<<<< * * @cython.wraparound(False) */ __Pyx_XDECREF(__pyx_r); __pyx_t_10 = PyTuple_New(3); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8440; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_INCREF(((PyObject *)__pyx_v_result)); PyTuple_SET_ITEM(__pyx_t_10, 0, ((PyObject *)__pyx_v_result)); __Pyx_GIVEREF(((PyObject *)__pyx_v_result)); __Pyx_INCREF(((PyObject *)__pyx_v_lindexer)); PyTuple_SET_ITEM(__pyx_t_10, 1, ((PyObject *)__pyx_v_lindexer)); __Pyx_GIVEREF(((PyObject *)__pyx_v_lindexer)); __Pyx_INCREF(((PyObject *)__pyx_v_rindexer)); PyTuple_SET_ITEM(__pyx_t_10, 2, ((PyObject *)__pyx_v_rindexer)); __Pyx_GIVEREF(((PyObject *)__pyx_v_rindexer)); __pyx_r = __pyx_t_10; __pyx_t_10 = 0; goto __pyx_L0; /* "pandas/src/generated.pyx":8351 * @cython.wraparound(False) * @cython.boundscheck(False) * def inner_join_indexer_float64(ndarray[float64_t] left, # <<<<<<<<<<<<<< * ndarray[float64_t] right): * ''' */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_9); __Pyx_XDECREF(__pyx_t_10); __Pyx_XDECREF(__pyx_t_11); __Pyx_XDECREF(__pyx_t_12); __Pyx_XDECREF(__pyx_t_13); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_left.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_lindexer.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_right.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_rindexer.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.inner_join_indexer_float64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_left.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_lindexer.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_right.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_rindexer.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_lindexer); __Pyx_XDECREF((PyObject *)__pyx_v_rindexer); __Pyx_XDECREF((PyObject *)__pyx_v_result); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":8444 * @cython.wraparound(False) * @cython.boundscheck(False) * def inner_join_indexer_float32(ndarray[float32_t] left, # <<<<<<<<<<<<<< * ndarray[float32_t] right): * ''' */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_487inner_join_indexer_float32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6pandas_5algos_486inner_join_indexer_float32[] = "\n Two-pass algorithm for monotonic indexes. Handles many-to-one merges\n "; static PyMethodDef __pyx_mdef_6pandas_5algos_487inner_join_indexer_float32 = {__Pyx_NAMESTR("inner_join_indexer_float32"), (PyCFunction)__pyx_pw_6pandas_5algos_487inner_join_indexer_float32, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_5algos_486inner_join_indexer_float32)}; static PyObject *__pyx_pw_6pandas_5algos_487inner_join_indexer_float32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_left = 0; PyArrayObject *__pyx_v_right = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("inner_join_indexer_float32 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_left,&__pyx_n_s_right,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_left)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_right)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("inner_join_indexer_float32", 1, 2, 2, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8444; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "inner_join_indexer_float32") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8444; __pyx_clineno = __LINE__; goto __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_left = ((PyArrayObject *)values[0]); __pyx_v_right = ((PyArrayObject *)values[1]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("inner_join_indexer_float32", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8444; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.inner_join_indexer_float32", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_left), __pyx_ptype_5numpy_ndarray, 1, "left", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8444; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_right), __pyx_ptype_5numpy_ndarray, 1, "right", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8445; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_486inner_join_indexer_float32(__pyx_self, __pyx_v_left, __pyx_v_right); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5algos_486inner_join_indexer_float32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_left, PyArrayObject *__pyx_v_right) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_nright; Py_ssize_t __pyx_v_nleft; Py_ssize_t __pyx_v_count; __pyx_t_5numpy_float32_t __pyx_v_lval; __pyx_t_5numpy_float32_t __pyx_v_rval; PyArrayObject *__pyx_v_lindexer = 0; PyArrayObject *__pyx_v_rindexer = 0; PyArrayObject *__pyx_v_result = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_left; __Pyx_Buffer __pyx_pybuffer_left; __Pyx_LocalBuf_ND __pyx_pybuffernd_lindexer; __Pyx_Buffer __pyx_pybuffer_lindexer; __Pyx_LocalBuf_ND __pyx_pybuffernd_result; __Pyx_Buffer __pyx_pybuffer_result; __Pyx_LocalBuf_ND __pyx_pybuffernd_right; __Pyx_Buffer __pyx_pybuffer_right; __Pyx_LocalBuf_ND __pyx_pybuffernd_rindexer; __Pyx_Buffer __pyx_pybuffer_rindexer; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; int __pyx_t_2; int __pyx_t_3; int __pyx_t_4; Py_ssize_t __pyx_t_5; Py_ssize_t __pyx_t_6; Py_ssize_t __pyx_t_7; Py_ssize_t __pyx_t_8; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; PyObject *__pyx_t_11 = NULL; PyObject *__pyx_t_12 = NULL; PyObject *__pyx_t_13 = NULL; PyArrayObject *__pyx_t_14 = NULL; int __pyx_t_15; PyObject *__pyx_t_16 = NULL; PyObject *__pyx_t_17 = NULL; PyObject *__pyx_t_18 = NULL; PyArrayObject *__pyx_t_19 = NULL; 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("inner_join_indexer_float32", 0); __pyx_pybuffer_lindexer.pybuffer.buf = NULL; __pyx_pybuffer_lindexer.refcount = 0; __pyx_pybuffernd_lindexer.data = NULL; __pyx_pybuffernd_lindexer.rcbuffer = &__pyx_pybuffer_lindexer; __pyx_pybuffer_rindexer.pybuffer.buf = NULL; __pyx_pybuffer_rindexer.refcount = 0; __pyx_pybuffernd_rindexer.data = NULL; __pyx_pybuffernd_rindexer.rcbuffer = &__pyx_pybuffer_rindexer; __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_left.pybuffer.buf = NULL; __pyx_pybuffer_left.refcount = 0; __pyx_pybuffernd_left.data = NULL; __pyx_pybuffernd_left.rcbuffer = &__pyx_pybuffer_left; __pyx_pybuffer_right.pybuffer.buf = NULL; __pyx_pybuffer_right.refcount = 0; __pyx_pybuffernd_right.data = NULL; __pyx_pybuffernd_right.rcbuffer = &__pyx_pybuffer_right; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_left.rcbuffer->pybuffer, (PyObject*)__pyx_v_left, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8444; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_left.diminfo[0].strides = __pyx_pybuffernd_left.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_left.diminfo[0].shape = __pyx_pybuffernd_left.rcbuffer->pybuffer.shape[0]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_right.rcbuffer->pybuffer, (PyObject*)__pyx_v_right, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8444; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_right.diminfo[0].strides = __pyx_pybuffernd_right.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_right.diminfo[0].shape = __pyx_pybuffernd_right.rcbuffer->pybuffer.shape[0]; /* "pandas/src/generated.pyx":8455 * ndarray[float32_t] result * * nleft = len(left) # <<<<<<<<<<<<<< * nright = len(right) * */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_left)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8455; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_nleft = __pyx_t_1; /* "pandas/src/generated.pyx":8456 * * nleft = len(left) * nright = len(right) # <<<<<<<<<<<<<< * * i = 0 */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_right)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8456; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_nright = __pyx_t_1; /* "pandas/src/generated.pyx":8458 * nright = len(right) * * i = 0 # <<<<<<<<<<<<<< * j = 0 * count = 0 */ __pyx_v_i = 0; /* "pandas/src/generated.pyx":8459 * * i = 0 * j = 0 # <<<<<<<<<<<<<< * count = 0 * if nleft > 0 and nright > 0: */ __pyx_v_j = 0; /* "pandas/src/generated.pyx":8460 * i = 0 * j = 0 * count = 0 # <<<<<<<<<<<<<< * if nleft > 0 and nright > 0: * while True: */ __pyx_v_count = 0; /* "pandas/src/generated.pyx":8461 * j = 0 * count = 0 * if nleft > 0 and nright > 0: # <<<<<<<<<<<<<< * while True: * if i == nleft: */ __pyx_t_2 = ((__pyx_v_nleft > 0) != 0); if (__pyx_t_2) { __pyx_t_3 = ((__pyx_v_nright > 0) != 0); __pyx_t_4 = __pyx_t_3; } else { __pyx_t_4 = __pyx_t_2; } if (__pyx_t_4) { /* "pandas/src/generated.pyx":8462 * count = 0 * if nleft > 0 and nright > 0: * while True: # <<<<<<<<<<<<<< * if i == nleft: * break */ while (1) { /* "pandas/src/generated.pyx":8463 * if nleft > 0 and nright > 0: * while True: * if i == nleft: # <<<<<<<<<<<<<< * break * if j == nright: */ __pyx_t_4 = ((__pyx_v_i == __pyx_v_nleft) != 0); if (__pyx_t_4) { /* "pandas/src/generated.pyx":8464 * while True: * if i == nleft: * break # <<<<<<<<<<<<<< * if j == nright: * break */ goto __pyx_L5_break; } /* "pandas/src/generated.pyx":8465 * if i == nleft: * break * if j == nright: # <<<<<<<<<<<<<< * break * */ __pyx_t_4 = ((__pyx_v_j == __pyx_v_nright) != 0); if (__pyx_t_4) { /* "pandas/src/generated.pyx":8466 * break * if j == nright: * break # <<<<<<<<<<<<<< * * lval = left[i] */ goto __pyx_L5_break; } /* "pandas/src/generated.pyx":8468 * break * * lval = left[i] # <<<<<<<<<<<<<< * rval = right[j] * if lval == rval: */ __pyx_t_1 = __pyx_v_i; __pyx_v_lval = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_left.rcbuffer->pybuffer.buf, __pyx_t_1, __pyx_pybuffernd_left.diminfo[0].strides)); /* "pandas/src/generated.pyx":8469 * * lval = left[i] * rval = right[j] # <<<<<<<<<<<<<< * if lval == rval: * count += 1 */ __pyx_t_5 = __pyx_v_j; __pyx_v_rval = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_right.rcbuffer->pybuffer.buf, __pyx_t_5, __pyx_pybuffernd_right.diminfo[0].strides)); /* "pandas/src/generated.pyx":8470 * lval = left[i] * rval = right[j] * if lval == rval: # <<<<<<<<<<<<<< * count += 1 * if i < nleft - 1: */ __pyx_t_4 = ((__pyx_v_lval == __pyx_v_rval) != 0); if (__pyx_t_4) { /* "pandas/src/generated.pyx":8471 * rval = right[j] * if lval == rval: * count += 1 # <<<<<<<<<<<<<< * if i < nleft - 1: * if j < nright - 1 and right[j + 1] == rval: */ __pyx_v_count = (__pyx_v_count + 1); /* "pandas/src/generated.pyx":8472 * if lval == rval: * count += 1 * if i < nleft - 1: # <<<<<<<<<<<<<< * if j < nright - 1 and right[j + 1] == rval: * j += 1 */ __pyx_t_4 = ((__pyx_v_i < (__pyx_v_nleft - 1)) != 0); if (__pyx_t_4) { /* "pandas/src/generated.pyx":8473 * count += 1 * if i < nleft - 1: * if j < nright - 1 and right[j + 1] == rval: # <<<<<<<<<<<<<< * j += 1 * else: */ __pyx_t_4 = ((__pyx_v_j < (__pyx_v_nright - 1)) != 0); if (__pyx_t_4) { __pyx_t_6 = (__pyx_v_j + 1); __pyx_t_2 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_right.rcbuffer->pybuffer.buf, __pyx_t_6, __pyx_pybuffernd_right.diminfo[0].strides)) == __pyx_v_rval) != 0); __pyx_t_3 = __pyx_t_2; } else { __pyx_t_3 = __pyx_t_4; } if (__pyx_t_3) { /* "pandas/src/generated.pyx":8474 * if i < nleft - 1: * if j < nright - 1 and right[j + 1] == rval: * j += 1 # <<<<<<<<<<<<<< * else: * i += 1 */ __pyx_v_j = (__pyx_v_j + 1); goto __pyx_L10; } /*else*/ { /* "pandas/src/generated.pyx":8476 * j += 1 * else: * i += 1 # <<<<<<<<<<<<<< * if left[i] != rval: * j += 1 */ __pyx_v_i = (__pyx_v_i + 1); /* "pandas/src/generated.pyx":8477 * else: * i += 1 * if left[i] != rval: # <<<<<<<<<<<<<< * j += 1 * elif j < nright - 1: */ __pyx_t_7 = __pyx_v_i; __pyx_t_3 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_left.rcbuffer->pybuffer.buf, __pyx_t_7, __pyx_pybuffernd_left.diminfo[0].strides)) != __pyx_v_rval) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":8478 * i += 1 * if left[i] != rval: * j += 1 # <<<<<<<<<<<<<< * elif j < nright - 1: * j += 1 */ __pyx_v_j = (__pyx_v_j + 1); goto __pyx_L11; } __pyx_L11:; } __pyx_L10:; goto __pyx_L9; } /* "pandas/src/generated.pyx":8479 * if left[i] != rval: * j += 1 * elif j < nright - 1: # <<<<<<<<<<<<<< * j += 1 * if lval != right[j]: */ __pyx_t_3 = ((__pyx_v_j < (__pyx_v_nright - 1)) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":8480 * j += 1 * elif j < nright - 1: * j += 1 # <<<<<<<<<<<<<< * if lval != right[j]: * i += 1 */ __pyx_v_j = (__pyx_v_j + 1); /* "pandas/src/generated.pyx":8481 * elif j < nright - 1: * j += 1 * if lval != right[j]: # <<<<<<<<<<<<<< * i += 1 * else: */ __pyx_t_8 = __pyx_v_j; __pyx_t_3 = ((__pyx_v_lval != (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_right.rcbuffer->pybuffer.buf, __pyx_t_8, __pyx_pybuffernd_right.diminfo[0].strides))) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":8482 * j += 1 * if lval != right[j]: * i += 1 # <<<<<<<<<<<<<< * else: * # end of the road */ __pyx_v_i = (__pyx_v_i + 1); goto __pyx_L12; } __pyx_L12:; goto __pyx_L9; } /*else*/ { /* "pandas/src/generated.pyx":8485 * else: * # end of the road * break # <<<<<<<<<<<<<< * elif lval < rval: * i += 1 */ goto __pyx_L5_break; } __pyx_L9:; goto __pyx_L8; } /* "pandas/src/generated.pyx":8486 * # end of the road * break * elif lval < rval: # <<<<<<<<<<<<<< * i += 1 * else: */ __pyx_t_3 = ((__pyx_v_lval < __pyx_v_rval) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":8487 * break * elif lval < rval: * i += 1 # <<<<<<<<<<<<<< * else: * j += 1 */ __pyx_v_i = (__pyx_v_i + 1); goto __pyx_L8; } /*else*/ { /* "pandas/src/generated.pyx":8489 * i += 1 * else: * j += 1 # <<<<<<<<<<<<<< * * # do it again now that result size is known */ __pyx_v_j = (__pyx_v_j + 1); } __pyx_L8:; } __pyx_L5_break:; goto __pyx_L3; } __pyx_L3:; /* "pandas/src/generated.pyx":8493 * # do it again now that result size is known * * lindexer = np.empty(count, dtype=np.int64) # <<<<<<<<<<<<<< * rindexer = np.empty(count, dtype=np.int64) * result = np.empty(count, dtype=np.float32) */ __pyx_t_9 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8493; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_empty); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8493; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_9 = PyInt_FromSsize_t(__pyx_v_count); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8493; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_t_11 = PyTuple_New(1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8493; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_9); __Pyx_GIVEREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_9 = PyDict_New(); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8493; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_t_12 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8493; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_int64); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8493; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_dtype, __pyx_t_13) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8493; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_13 = PyObject_Call(__pyx_t_10, __pyx_t_11, __pyx_t_9); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8493; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; if (!(likely(((__pyx_t_13) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_13, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8493; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_14 = ((PyArrayObject *)__pyx_t_13); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_lindexer.rcbuffer->pybuffer); __pyx_t_15 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_lindexer.rcbuffer->pybuffer, (PyObject*)__pyx_t_14, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_15 < 0)) { PyErr_Fetch(&__pyx_t_16, &__pyx_t_17, &__pyx_t_18); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_lindexer.rcbuffer->pybuffer, (PyObject*)__pyx_v_lindexer, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_16); Py_XDECREF(__pyx_t_17); Py_XDECREF(__pyx_t_18); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_16, __pyx_t_17, __pyx_t_18); } } __pyx_pybuffernd_lindexer.diminfo[0].strides = __pyx_pybuffernd_lindexer.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_lindexer.diminfo[0].shape = __pyx_pybuffernd_lindexer.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_15 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8493; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_14 = 0; __pyx_v_lindexer = ((PyArrayObject *)__pyx_t_13); __pyx_t_13 = 0; /* "pandas/src/generated.pyx":8494 * * lindexer = np.empty(count, dtype=np.int64) * rindexer = np.empty(count, dtype=np.int64) # <<<<<<<<<<<<<< * result = np.empty(count, dtype=np.float32) * */ __pyx_t_13 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8494; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_13, __pyx_n_s_empty); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8494; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_13 = PyInt_FromSsize_t(__pyx_v_count); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8494; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __pyx_t_11 = PyTuple_New(1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8494; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_13); __Pyx_GIVEREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_13 = PyDict_New(); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8494; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __pyx_t_10 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8494; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_int64); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8494; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; if (PyDict_SetItem(__pyx_t_13, __pyx_n_s_dtype, __pyx_t_12) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8494; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __pyx_t_12 = PyObject_Call(__pyx_t_9, __pyx_t_11, __pyx_t_13); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8494; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; if (!(likely(((__pyx_t_12) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_12, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8494; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_14 = ((PyArrayObject *)__pyx_t_12); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_rindexer.rcbuffer->pybuffer); __pyx_t_15 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_rindexer.rcbuffer->pybuffer, (PyObject*)__pyx_t_14, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_15 < 0)) { PyErr_Fetch(&__pyx_t_18, &__pyx_t_17, &__pyx_t_16); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_rindexer.rcbuffer->pybuffer, (PyObject*)__pyx_v_rindexer, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_18); Py_XDECREF(__pyx_t_17); Py_XDECREF(__pyx_t_16); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_18, __pyx_t_17, __pyx_t_16); } } __pyx_pybuffernd_rindexer.diminfo[0].strides = __pyx_pybuffernd_rindexer.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_rindexer.diminfo[0].shape = __pyx_pybuffernd_rindexer.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_15 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8494; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_14 = 0; __pyx_v_rindexer = ((PyArrayObject *)__pyx_t_12); __pyx_t_12 = 0; /* "pandas/src/generated.pyx":8495 * lindexer = np.empty(count, dtype=np.int64) * rindexer = np.empty(count, dtype=np.int64) * result = np.empty(count, dtype=np.float32) # <<<<<<<<<<<<<< * * i = 0 */ __pyx_t_12 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8495; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_empty); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8495; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __pyx_t_12 = PyInt_FromSsize_t(__pyx_v_count); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8495; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __pyx_t_11 = PyTuple_New(1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8495; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_12); __Pyx_GIVEREF(__pyx_t_12); __pyx_t_12 = 0; __pyx_t_12 = PyDict_New(); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8495; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __pyx_t_9 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8495; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_float32); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8495; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; if (PyDict_SetItem(__pyx_t_12, __pyx_n_s_dtype, __pyx_t_10) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8495; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_t_10 = PyObject_Call(__pyx_t_13, __pyx_t_11, __pyx_t_12); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8495; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; if (!(likely(((__pyx_t_10) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_10, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8495; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_19 = ((PyArrayObject *)__pyx_t_10); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __pyx_t_15 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_t_19, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_15 < 0)) { PyErr_Fetch(&__pyx_t_16, &__pyx_t_17, &__pyx_t_18); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_v_result, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_16); Py_XDECREF(__pyx_t_17); Py_XDECREF(__pyx_t_18); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_16, __pyx_t_17, __pyx_t_18); } } __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_15 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8495; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_19 = 0; __pyx_v_result = ((PyArrayObject *)__pyx_t_10); __pyx_t_10 = 0; /* "pandas/src/generated.pyx":8497 * result = np.empty(count, dtype=np.float32) * * i = 0 # <<<<<<<<<<<<<< * j = 0 * count = 0 */ __pyx_v_i = 0; /* "pandas/src/generated.pyx":8498 * * i = 0 * j = 0 # <<<<<<<<<<<<<< * count = 0 * if nleft > 0 and nright > 0: */ __pyx_v_j = 0; /* "pandas/src/generated.pyx":8499 * i = 0 * j = 0 * count = 0 # <<<<<<<<<<<<<< * if nleft > 0 and nright > 0: * while True: */ __pyx_v_count = 0; /* "pandas/src/generated.pyx":8500 * j = 0 * count = 0 * if nleft > 0 and nright > 0: # <<<<<<<<<<<<<< * while True: * if i == nleft: */ __pyx_t_3 = ((__pyx_v_nleft > 0) != 0); if (__pyx_t_3) { __pyx_t_4 = ((__pyx_v_nright > 0) != 0); __pyx_t_2 = __pyx_t_4; } else { __pyx_t_2 = __pyx_t_3; } if (__pyx_t_2) { /* "pandas/src/generated.pyx":8501 * count = 0 * if nleft > 0 and nright > 0: * while True: # <<<<<<<<<<<<<< * if i == nleft: * break */ while (1) { /* "pandas/src/generated.pyx":8502 * if nleft > 0 and nright > 0: * while True: * if i == nleft: # <<<<<<<<<<<<<< * break * if j == nright: */ __pyx_t_2 = ((__pyx_v_i == __pyx_v_nleft) != 0); if (__pyx_t_2) { /* "pandas/src/generated.pyx":8503 * while True: * if i == nleft: * break # <<<<<<<<<<<<<< * if j == nright: * break */ goto __pyx_L15_break; } /* "pandas/src/generated.pyx":8504 * if i == nleft: * break * if j == nright: # <<<<<<<<<<<<<< * break * */ __pyx_t_2 = ((__pyx_v_j == __pyx_v_nright) != 0); if (__pyx_t_2) { /* "pandas/src/generated.pyx":8505 * break * if j == nright: * break # <<<<<<<<<<<<<< * * lval = left[i] */ goto __pyx_L15_break; } /* "pandas/src/generated.pyx":8507 * break * * lval = left[i] # <<<<<<<<<<<<<< * rval = right[j] * if lval == rval: */ __pyx_t_20 = __pyx_v_i; __pyx_v_lval = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_left.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_left.diminfo[0].strides)); /* "pandas/src/generated.pyx":8508 * * lval = left[i] * rval = right[j] # <<<<<<<<<<<<<< * if lval == rval: * lindexer[count] = i */ __pyx_t_21 = __pyx_v_j; __pyx_v_rval = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_right.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_right.diminfo[0].strides)); /* "pandas/src/generated.pyx":8509 * lval = left[i] * rval = right[j] * if lval == rval: # <<<<<<<<<<<<<< * lindexer[count] = i * rindexer[count] = j */ __pyx_t_2 = ((__pyx_v_lval == __pyx_v_rval) != 0); if (__pyx_t_2) { /* "pandas/src/generated.pyx":8510 * rval = right[j] * if lval == rval: * lindexer[count] = i # <<<<<<<<<<<<<< * rindexer[count] = j * result[count] = rval */ __pyx_t_22 = __pyx_v_count; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_lindexer.rcbuffer->pybuffer.buf, __pyx_t_22, __pyx_pybuffernd_lindexer.diminfo[0].strides) = __pyx_v_i; /* "pandas/src/generated.pyx":8511 * if lval == rval: * lindexer[count] = i * rindexer[count] = j # <<<<<<<<<<<<<< * result[count] = rval * count += 1 */ __pyx_t_23 = __pyx_v_count; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_rindexer.rcbuffer->pybuffer.buf, __pyx_t_23, __pyx_pybuffernd_rindexer.diminfo[0].strides) = __pyx_v_j; /* "pandas/src/generated.pyx":8512 * lindexer[count] = i * rindexer[count] = j * result[count] = rval # <<<<<<<<<<<<<< * count += 1 * if i < nleft - 1: */ __pyx_t_24 = __pyx_v_count; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_24, __pyx_pybuffernd_result.diminfo[0].strides) = __pyx_v_rval; /* "pandas/src/generated.pyx":8513 * rindexer[count] = j * result[count] = rval * count += 1 # <<<<<<<<<<<<<< * if i < nleft - 1: * if j < nright - 1 and right[j + 1] == rval: */ __pyx_v_count = (__pyx_v_count + 1); /* "pandas/src/generated.pyx":8514 * result[count] = rval * count += 1 * if i < nleft - 1: # <<<<<<<<<<<<<< * if j < nright - 1 and right[j + 1] == rval: * j += 1 */ __pyx_t_2 = ((__pyx_v_i < (__pyx_v_nleft - 1)) != 0); if (__pyx_t_2) { /* "pandas/src/generated.pyx":8515 * count += 1 * if i < nleft - 1: * if j < nright - 1 and right[j + 1] == rval: # <<<<<<<<<<<<<< * j += 1 * else: */ __pyx_t_2 = ((__pyx_v_j < (__pyx_v_nright - 1)) != 0); if (__pyx_t_2) { __pyx_t_25 = (__pyx_v_j + 1); __pyx_t_3 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_right.rcbuffer->pybuffer.buf, __pyx_t_25, __pyx_pybuffernd_right.diminfo[0].strides)) == __pyx_v_rval) != 0); __pyx_t_4 = __pyx_t_3; } else { __pyx_t_4 = __pyx_t_2; } if (__pyx_t_4) { /* "pandas/src/generated.pyx":8516 * if i < nleft - 1: * if j < nright - 1 and right[j + 1] == rval: * j += 1 # <<<<<<<<<<<<<< * else: * i += 1 */ __pyx_v_j = (__pyx_v_j + 1); goto __pyx_L20; } /*else*/ { /* "pandas/src/generated.pyx":8518 * j += 1 * else: * i += 1 # <<<<<<<<<<<<<< * if left[i] != rval: * j += 1 */ __pyx_v_i = (__pyx_v_i + 1); /* "pandas/src/generated.pyx":8519 * else: * i += 1 * if left[i] != rval: # <<<<<<<<<<<<<< * j += 1 * elif j < nright - 1: */ __pyx_t_26 = __pyx_v_i; __pyx_t_4 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_left.rcbuffer->pybuffer.buf, __pyx_t_26, __pyx_pybuffernd_left.diminfo[0].strides)) != __pyx_v_rval) != 0); if (__pyx_t_4) { /* "pandas/src/generated.pyx":8520 * i += 1 * if left[i] != rval: * j += 1 # <<<<<<<<<<<<<< * elif j < nright - 1: * j += 1 */ __pyx_v_j = (__pyx_v_j + 1); goto __pyx_L21; } __pyx_L21:; } __pyx_L20:; goto __pyx_L19; } /* "pandas/src/generated.pyx":8521 * if left[i] != rval: * j += 1 * elif j < nright - 1: # <<<<<<<<<<<<<< * j += 1 * if lval != right[j]: */ __pyx_t_4 = ((__pyx_v_j < (__pyx_v_nright - 1)) != 0); if (__pyx_t_4) { /* "pandas/src/generated.pyx":8522 * j += 1 * elif j < nright - 1: * j += 1 # <<<<<<<<<<<<<< * if lval != right[j]: * i += 1 */ __pyx_v_j = (__pyx_v_j + 1); /* "pandas/src/generated.pyx":8523 * elif j < nright - 1: * j += 1 * if lval != right[j]: # <<<<<<<<<<<<<< * i += 1 * else: */ __pyx_t_27 = __pyx_v_j; __pyx_t_4 = ((__pyx_v_lval != (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_right.rcbuffer->pybuffer.buf, __pyx_t_27, __pyx_pybuffernd_right.diminfo[0].strides))) != 0); if (__pyx_t_4) { /* "pandas/src/generated.pyx":8524 * j += 1 * if lval != right[j]: * i += 1 # <<<<<<<<<<<<<< * else: * # end of the road */ __pyx_v_i = (__pyx_v_i + 1); goto __pyx_L22; } __pyx_L22:; goto __pyx_L19; } /*else*/ { /* "pandas/src/generated.pyx":8527 * else: * # end of the road * break # <<<<<<<<<<<<<< * elif lval < rval: * i += 1 */ goto __pyx_L15_break; } __pyx_L19:; goto __pyx_L18; } /* "pandas/src/generated.pyx":8528 * # end of the road * break * elif lval < rval: # <<<<<<<<<<<<<< * i += 1 * else: */ __pyx_t_4 = ((__pyx_v_lval < __pyx_v_rval) != 0); if (__pyx_t_4) { /* "pandas/src/generated.pyx":8529 * break * elif lval < rval: * i += 1 # <<<<<<<<<<<<<< * else: * j += 1 */ __pyx_v_i = (__pyx_v_i + 1); goto __pyx_L18; } /*else*/ { /* "pandas/src/generated.pyx":8531 * i += 1 * else: * j += 1 # <<<<<<<<<<<<<< * * return result, lindexer, rindexer */ __pyx_v_j = (__pyx_v_j + 1); } __pyx_L18:; } __pyx_L15_break:; goto __pyx_L13; } __pyx_L13:; /* "pandas/src/generated.pyx":8533 * j += 1 * * return result, lindexer, rindexer # <<<<<<<<<<<<<< * * @cython.wraparound(False) */ __Pyx_XDECREF(__pyx_r); __pyx_t_10 = PyTuple_New(3); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8533; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_INCREF(((PyObject *)__pyx_v_result)); PyTuple_SET_ITEM(__pyx_t_10, 0, ((PyObject *)__pyx_v_result)); __Pyx_GIVEREF(((PyObject *)__pyx_v_result)); __Pyx_INCREF(((PyObject *)__pyx_v_lindexer)); PyTuple_SET_ITEM(__pyx_t_10, 1, ((PyObject *)__pyx_v_lindexer)); __Pyx_GIVEREF(((PyObject *)__pyx_v_lindexer)); __Pyx_INCREF(((PyObject *)__pyx_v_rindexer)); PyTuple_SET_ITEM(__pyx_t_10, 2, ((PyObject *)__pyx_v_rindexer)); __Pyx_GIVEREF(((PyObject *)__pyx_v_rindexer)); __pyx_r = __pyx_t_10; __pyx_t_10 = 0; goto __pyx_L0; /* "pandas/src/generated.pyx":8444 * @cython.wraparound(False) * @cython.boundscheck(False) * def inner_join_indexer_float32(ndarray[float32_t] left, # <<<<<<<<<<<<<< * ndarray[float32_t] right): * ''' */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_9); __Pyx_XDECREF(__pyx_t_10); __Pyx_XDECREF(__pyx_t_11); __Pyx_XDECREF(__pyx_t_12); __Pyx_XDECREF(__pyx_t_13); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_left.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_lindexer.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_right.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_rindexer.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.inner_join_indexer_float32", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_left.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_lindexer.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_right.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_rindexer.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_lindexer); __Pyx_XDECREF((PyObject *)__pyx_v_rindexer); __Pyx_XDECREF((PyObject *)__pyx_v_result); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":8537 * @cython.wraparound(False) * @cython.boundscheck(False) * def inner_join_indexer_object(ndarray[object] left, # <<<<<<<<<<<<<< * ndarray[object] right): * ''' */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_489inner_join_indexer_object(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6pandas_5algos_488inner_join_indexer_object[] = "\n Two-pass algorithm for monotonic indexes. Handles many-to-one merges\n "; static PyMethodDef __pyx_mdef_6pandas_5algos_489inner_join_indexer_object = {__Pyx_NAMESTR("inner_join_indexer_object"), (PyCFunction)__pyx_pw_6pandas_5algos_489inner_join_indexer_object, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_5algos_488inner_join_indexer_object)}; static PyObject *__pyx_pw_6pandas_5algos_489inner_join_indexer_object(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_left = 0; PyArrayObject *__pyx_v_right = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("inner_join_indexer_object (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_left,&__pyx_n_s_right,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_left)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_right)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("inner_join_indexer_object", 1, 2, 2, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8537; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "inner_join_indexer_object") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8537; __pyx_clineno = __LINE__; goto __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_left = ((PyArrayObject *)values[0]); __pyx_v_right = ((PyArrayObject *)values[1]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("inner_join_indexer_object", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8537; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.inner_join_indexer_object", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_left), __pyx_ptype_5numpy_ndarray, 1, "left", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8537; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_right), __pyx_ptype_5numpy_ndarray, 1, "right", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8538; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_488inner_join_indexer_object(__pyx_self, __pyx_v_left, __pyx_v_right); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5algos_488inner_join_indexer_object(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_left, PyArrayObject *__pyx_v_right) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_nright; Py_ssize_t __pyx_v_nleft; Py_ssize_t __pyx_v_count; PyObject *__pyx_v_lval = 0; PyObject *__pyx_v_rval = 0; PyArrayObject *__pyx_v_lindexer = 0; PyArrayObject *__pyx_v_rindexer = 0; PyArrayObject *__pyx_v_result = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_left; __Pyx_Buffer __pyx_pybuffer_left; __Pyx_LocalBuf_ND __pyx_pybuffernd_lindexer; __Pyx_Buffer __pyx_pybuffer_lindexer; __Pyx_LocalBuf_ND __pyx_pybuffernd_result; __Pyx_Buffer __pyx_pybuffer_result; __Pyx_LocalBuf_ND __pyx_pybuffernd_right; __Pyx_Buffer __pyx_pybuffer_right; __Pyx_LocalBuf_ND __pyx_pybuffernd_rindexer; __Pyx_Buffer __pyx_pybuffer_rindexer; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; int __pyx_t_2; int __pyx_t_3; int __pyx_t_4; PyObject *__pyx_t_5 = NULL; Py_ssize_t __pyx_t_6; Py_ssize_t __pyx_t_7; PyObject *__pyx_t_8 = NULL; Py_ssize_t __pyx_t_9; 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; PyObject *__pyx_t_16 = NULL; PyObject *__pyx_t_17 = NULL; PyObject *__pyx_t_18 = NULL; PyArrayObject *__pyx_t_19 = NULL; 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; PyObject **__pyx_t_25; Py_ssize_t __pyx_t_26; Py_ssize_t __pyx_t_27; Py_ssize_t __pyx_t_28; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("inner_join_indexer_object", 0); __pyx_pybuffer_lindexer.pybuffer.buf = NULL; __pyx_pybuffer_lindexer.refcount = 0; __pyx_pybuffernd_lindexer.data = NULL; __pyx_pybuffernd_lindexer.rcbuffer = &__pyx_pybuffer_lindexer; __pyx_pybuffer_rindexer.pybuffer.buf = NULL; __pyx_pybuffer_rindexer.refcount = 0; __pyx_pybuffernd_rindexer.data = NULL; __pyx_pybuffernd_rindexer.rcbuffer = &__pyx_pybuffer_rindexer; __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_left.pybuffer.buf = NULL; __pyx_pybuffer_left.refcount = 0; __pyx_pybuffernd_left.data = NULL; __pyx_pybuffernd_left.rcbuffer = &__pyx_pybuffer_left; __pyx_pybuffer_right.pybuffer.buf = NULL; __pyx_pybuffer_right.refcount = 0; __pyx_pybuffernd_right.data = NULL; __pyx_pybuffernd_right.rcbuffer = &__pyx_pybuffer_right; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_left.rcbuffer->pybuffer, (PyObject*)__pyx_v_left, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8537; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_left.diminfo[0].strides = __pyx_pybuffernd_left.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_left.diminfo[0].shape = __pyx_pybuffernd_left.rcbuffer->pybuffer.shape[0]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_right.rcbuffer->pybuffer, (PyObject*)__pyx_v_right, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8537; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_right.diminfo[0].strides = __pyx_pybuffernd_right.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_right.diminfo[0].shape = __pyx_pybuffernd_right.rcbuffer->pybuffer.shape[0]; /* "pandas/src/generated.pyx":8548 * ndarray[object] result * * nleft = len(left) # <<<<<<<<<<<<<< * nright = len(right) * */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_left)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8548; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_nleft = __pyx_t_1; /* "pandas/src/generated.pyx":8549 * * nleft = len(left) * nright = len(right) # <<<<<<<<<<<<<< * * i = 0 */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_right)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8549; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_nright = __pyx_t_1; /* "pandas/src/generated.pyx":8551 * nright = len(right) * * i = 0 # <<<<<<<<<<<<<< * j = 0 * count = 0 */ __pyx_v_i = 0; /* "pandas/src/generated.pyx":8552 * * i = 0 * j = 0 # <<<<<<<<<<<<<< * count = 0 * if nleft > 0 and nright > 0: */ __pyx_v_j = 0; /* "pandas/src/generated.pyx":8553 * i = 0 * j = 0 * count = 0 # <<<<<<<<<<<<<< * if nleft > 0 and nright > 0: * while True: */ __pyx_v_count = 0; /* "pandas/src/generated.pyx":8554 * j = 0 * count = 0 * if nleft > 0 and nright > 0: # <<<<<<<<<<<<<< * while True: * if i == nleft: */ __pyx_t_2 = ((__pyx_v_nleft > 0) != 0); if (__pyx_t_2) { __pyx_t_3 = ((__pyx_v_nright > 0) != 0); __pyx_t_4 = __pyx_t_3; } else { __pyx_t_4 = __pyx_t_2; } if (__pyx_t_4) { /* "pandas/src/generated.pyx":8555 * count = 0 * if nleft > 0 and nright > 0: * while True: # <<<<<<<<<<<<<< * if i == nleft: * break */ while (1) { /* "pandas/src/generated.pyx":8556 * if nleft > 0 and nright > 0: * while True: * if i == nleft: # <<<<<<<<<<<<<< * break * if j == nright: */ __pyx_t_4 = ((__pyx_v_i == __pyx_v_nleft) != 0); if (__pyx_t_4) { /* "pandas/src/generated.pyx":8557 * while True: * if i == nleft: * break # <<<<<<<<<<<<<< * if j == nright: * break */ goto __pyx_L5_break; } /* "pandas/src/generated.pyx":8558 * if i == nleft: * break * if j == nright: # <<<<<<<<<<<<<< * break * */ __pyx_t_4 = ((__pyx_v_j == __pyx_v_nright) != 0); if (__pyx_t_4) { /* "pandas/src/generated.pyx":8559 * break * if j == nright: * break # <<<<<<<<<<<<<< * * lval = left[i] */ goto __pyx_L5_break; } /* "pandas/src/generated.pyx":8561 * break * * lval = left[i] # <<<<<<<<<<<<<< * rval = right[j] * if lval == rval: */ __pyx_t_1 = __pyx_v_i; __pyx_t_5 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_left.rcbuffer->pybuffer.buf, __pyx_t_1, __pyx_pybuffernd_left.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_5); __Pyx_XDECREF_SET(__pyx_v_lval, __pyx_t_5); __pyx_t_5 = 0; /* "pandas/src/generated.pyx":8562 * * lval = left[i] * rval = right[j] # <<<<<<<<<<<<<< * if lval == rval: * count += 1 */ __pyx_t_6 = __pyx_v_j; __pyx_t_5 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_right.rcbuffer->pybuffer.buf, __pyx_t_6, __pyx_pybuffernd_right.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_5); __Pyx_XDECREF_SET(__pyx_v_rval, __pyx_t_5); __pyx_t_5 = 0; /* "pandas/src/generated.pyx":8563 * lval = left[i] * rval = right[j] * if lval == rval: # <<<<<<<<<<<<<< * count += 1 * if i < nleft - 1: */ __pyx_t_5 = PyObject_RichCompare(__pyx_v_lval, __pyx_v_rval, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8563; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8563; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_4) { /* "pandas/src/generated.pyx":8564 * rval = right[j] * if lval == rval: * count += 1 # <<<<<<<<<<<<<< * if i < nleft - 1: * if j < nright - 1 and right[j + 1] == rval: */ __pyx_v_count = (__pyx_v_count + 1); /* "pandas/src/generated.pyx":8565 * if lval == rval: * count += 1 * if i < nleft - 1: # <<<<<<<<<<<<<< * if j < nright - 1 and right[j + 1] == rval: * j += 1 */ __pyx_t_4 = ((__pyx_v_i < (__pyx_v_nleft - 1)) != 0); if (__pyx_t_4) { /* "pandas/src/generated.pyx":8566 * count += 1 * if i < nleft - 1: * if j < nright - 1 and right[j + 1] == rval: # <<<<<<<<<<<<<< * j += 1 * else: */ __pyx_t_4 = (__pyx_v_j < (__pyx_v_nright - 1)); if (__pyx_t_4) { __pyx_t_7 = (__pyx_v_j + 1); __pyx_t_5 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_right.rcbuffer->pybuffer.buf, __pyx_t_7, __pyx_pybuffernd_right.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_5); __pyx_t_8 = PyObject_RichCompare(__pyx_t_5, __pyx_v_rval, Py_EQ); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8566; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8566; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_3 = __pyx_t_2; } else { __pyx_t_3 = __pyx_t_4; } if (__pyx_t_3) { /* "pandas/src/generated.pyx":8567 * if i < nleft - 1: * if j < nright - 1 and right[j + 1] == rval: * j += 1 # <<<<<<<<<<<<<< * else: * i += 1 */ __pyx_v_j = (__pyx_v_j + 1); goto __pyx_L10; } /*else*/ { /* "pandas/src/generated.pyx":8569 * j += 1 * else: * i += 1 # <<<<<<<<<<<<<< * if left[i] != rval: * j += 1 */ __pyx_v_i = (__pyx_v_i + 1); /* "pandas/src/generated.pyx":8570 * else: * i += 1 * if left[i] != rval: # <<<<<<<<<<<<<< * j += 1 * elif j < nright - 1: */ __pyx_t_9 = __pyx_v_i; __pyx_t_8 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_left.rcbuffer->pybuffer.buf, __pyx_t_9, __pyx_pybuffernd_left.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_8); __pyx_t_5 = PyObject_RichCompare(__pyx_t_8, __pyx_v_rval, Py_NE); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8570; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8570; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_3) { /* "pandas/src/generated.pyx":8571 * i += 1 * if left[i] != rval: * j += 1 # <<<<<<<<<<<<<< * elif j < nright - 1: * j += 1 */ __pyx_v_j = (__pyx_v_j + 1); goto __pyx_L11; } __pyx_L11:; } __pyx_L10:; goto __pyx_L9; } /* "pandas/src/generated.pyx":8572 * if left[i] != rval: * j += 1 * elif j < nright - 1: # <<<<<<<<<<<<<< * j += 1 * if lval != right[j]: */ __pyx_t_3 = ((__pyx_v_j < (__pyx_v_nright - 1)) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":8573 * j += 1 * elif j < nright - 1: * j += 1 # <<<<<<<<<<<<<< * if lval != right[j]: * i += 1 */ __pyx_v_j = (__pyx_v_j + 1); /* "pandas/src/generated.pyx":8574 * elif j < nright - 1: * j += 1 * if lval != right[j]: # <<<<<<<<<<<<<< * i += 1 * else: */ __pyx_t_10 = __pyx_v_j; __pyx_t_5 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_right.rcbuffer->pybuffer.buf, __pyx_t_10, __pyx_pybuffernd_right.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_5); __pyx_t_8 = PyObject_RichCompare(__pyx_v_lval, __pyx_t_5, Py_NE); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8574; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8574; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (__pyx_t_3) { /* "pandas/src/generated.pyx":8575 * j += 1 * if lval != right[j]: * i += 1 # <<<<<<<<<<<<<< * else: * # end of the road */ __pyx_v_i = (__pyx_v_i + 1); goto __pyx_L12; } __pyx_L12:; goto __pyx_L9; } /*else*/ { /* "pandas/src/generated.pyx":8578 * else: * # end of the road * break # <<<<<<<<<<<<<< * elif lval < rval: * i += 1 */ goto __pyx_L5_break; } __pyx_L9:; goto __pyx_L8; } /* "pandas/src/generated.pyx":8579 * # end of the road * break * elif lval < rval: # <<<<<<<<<<<<<< * i += 1 * else: */ __pyx_t_8 = PyObject_RichCompare(__pyx_v_lval, __pyx_v_rval, Py_LT); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8579; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8579; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (__pyx_t_3) { /* "pandas/src/generated.pyx":8580 * break * elif lval < rval: * i += 1 # <<<<<<<<<<<<<< * else: * j += 1 */ __pyx_v_i = (__pyx_v_i + 1); goto __pyx_L8; } /*else*/ { /* "pandas/src/generated.pyx":8582 * i += 1 * else: * j += 1 # <<<<<<<<<<<<<< * * # do it again now that result size is known */ __pyx_v_j = (__pyx_v_j + 1); } __pyx_L8:; } __pyx_L5_break:; goto __pyx_L3; } __pyx_L3:; /* "pandas/src/generated.pyx":8586 * # do it again now that result size is known * * lindexer = np.empty(count, dtype=np.int64) # <<<<<<<<<<<<<< * rindexer = np.empty(count, dtype=np.int64) * result = np.empty(count, dtype=object) */ __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8586; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_empty); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8586; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_8 = PyInt_FromSsize_t(__pyx_v_count); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8586; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_11 = PyTuple_New(1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8586; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_8); __Pyx_GIVEREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_8 = PyDict_New(); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8586; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_12 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8586; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_int64); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8586; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_dtype, __pyx_t_13) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8586; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_13 = PyObject_Call(__pyx_t_5, __pyx_t_11, __pyx_t_8); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8586; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (!(likely(((__pyx_t_13) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_13, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8586; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_14 = ((PyArrayObject *)__pyx_t_13); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_lindexer.rcbuffer->pybuffer); __pyx_t_15 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_lindexer.rcbuffer->pybuffer, (PyObject*)__pyx_t_14, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_15 < 0)) { PyErr_Fetch(&__pyx_t_16, &__pyx_t_17, &__pyx_t_18); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_lindexer.rcbuffer->pybuffer, (PyObject*)__pyx_v_lindexer, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_16); Py_XDECREF(__pyx_t_17); Py_XDECREF(__pyx_t_18); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_16, __pyx_t_17, __pyx_t_18); } } __pyx_pybuffernd_lindexer.diminfo[0].strides = __pyx_pybuffernd_lindexer.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_lindexer.diminfo[0].shape = __pyx_pybuffernd_lindexer.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_15 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8586; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_14 = 0; __pyx_v_lindexer = ((PyArrayObject *)__pyx_t_13); __pyx_t_13 = 0; /* "pandas/src/generated.pyx":8587 * * lindexer = np.empty(count, dtype=np.int64) * rindexer = np.empty(count, dtype=np.int64) # <<<<<<<<<<<<<< * result = np.empty(count, dtype=object) * */ __pyx_t_13 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8587; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_13, __pyx_n_s_empty); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8587; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_13 = PyInt_FromSsize_t(__pyx_v_count); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8587; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __pyx_t_11 = PyTuple_New(1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8587; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_13); __Pyx_GIVEREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_13 = PyDict_New(); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8587; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8587; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_int64); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8587; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_13, __pyx_n_s_dtype, __pyx_t_12) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8587; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __pyx_t_12 = PyObject_Call(__pyx_t_8, __pyx_t_11, __pyx_t_13); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8587; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 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_filename = __pyx_f[2]; __pyx_lineno = 8587; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_14 = ((PyArrayObject *)__pyx_t_12); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_rindexer.rcbuffer->pybuffer); __pyx_t_15 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_rindexer.rcbuffer->pybuffer, (PyObject*)__pyx_t_14, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_15 < 0)) { PyErr_Fetch(&__pyx_t_18, &__pyx_t_17, &__pyx_t_16); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_rindexer.rcbuffer->pybuffer, (PyObject*)__pyx_v_rindexer, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_18); Py_XDECREF(__pyx_t_17); Py_XDECREF(__pyx_t_16); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_18, __pyx_t_17, __pyx_t_16); } } __pyx_pybuffernd_rindexer.diminfo[0].strides = __pyx_pybuffernd_rindexer.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_rindexer.diminfo[0].shape = __pyx_pybuffernd_rindexer.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_15 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8587; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_14 = 0; __pyx_v_rindexer = ((PyArrayObject *)__pyx_t_12); __pyx_t_12 = 0; /* "pandas/src/generated.pyx":8588 * lindexer = np.empty(count, dtype=np.int64) * rindexer = np.empty(count, dtype=np.int64) * result = np.empty(count, dtype=object) # <<<<<<<<<<<<<< * * i = 0 */ __pyx_t_12 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8588; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_empty); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8588; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __pyx_t_12 = PyInt_FromSsize_t(__pyx_v_count); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8588; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __pyx_t_11 = PyTuple_New(1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8588; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_12); __Pyx_GIVEREF(__pyx_t_12); __pyx_t_12 = 0; __pyx_t_12 = PyDict_New(); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8588; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); if (PyDict_SetItem(__pyx_t_12, __pyx_n_s_dtype, __pyx_builtin_object) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8588; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_8 = PyObject_Call(__pyx_t_13, __pyx_t_11, __pyx_t_12); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8588; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; if (!(likely(((__pyx_t_8) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_8, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8588; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_19 = ((PyArrayObject *)__pyx_t_8); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __pyx_t_15 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_t_19, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_15 < 0)) { PyErr_Fetch(&__pyx_t_16, &__pyx_t_17, &__pyx_t_18); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_v_result, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_16); Py_XDECREF(__pyx_t_17); Py_XDECREF(__pyx_t_18); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_16, __pyx_t_17, __pyx_t_18); } } __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_15 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8588; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_19 = 0; __pyx_v_result = ((PyArrayObject *)__pyx_t_8); __pyx_t_8 = 0; /* "pandas/src/generated.pyx":8590 * result = np.empty(count, dtype=object) * * i = 0 # <<<<<<<<<<<<<< * j = 0 * count = 0 */ __pyx_v_i = 0; /* "pandas/src/generated.pyx":8591 * * i = 0 * j = 0 # <<<<<<<<<<<<<< * count = 0 * if nleft > 0 and nright > 0: */ __pyx_v_j = 0; /* "pandas/src/generated.pyx":8592 * i = 0 * j = 0 * count = 0 # <<<<<<<<<<<<<< * if nleft > 0 and nright > 0: * while True: */ __pyx_v_count = 0; /* "pandas/src/generated.pyx":8593 * j = 0 * count = 0 * if nleft > 0 and nright > 0: # <<<<<<<<<<<<<< * while True: * if i == nleft: */ __pyx_t_3 = ((__pyx_v_nleft > 0) != 0); if (__pyx_t_3) { __pyx_t_4 = ((__pyx_v_nright > 0) != 0); __pyx_t_2 = __pyx_t_4; } else { __pyx_t_2 = __pyx_t_3; } if (__pyx_t_2) { /* "pandas/src/generated.pyx":8594 * count = 0 * if nleft > 0 and nright > 0: * while True: # <<<<<<<<<<<<<< * if i == nleft: * break */ while (1) { /* "pandas/src/generated.pyx":8595 * if nleft > 0 and nright > 0: * while True: * if i == nleft: # <<<<<<<<<<<<<< * break * if j == nright: */ __pyx_t_2 = ((__pyx_v_i == __pyx_v_nleft) != 0); if (__pyx_t_2) { /* "pandas/src/generated.pyx":8596 * while True: * if i == nleft: * break # <<<<<<<<<<<<<< * if j == nright: * break */ goto __pyx_L15_break; } /* "pandas/src/generated.pyx":8597 * if i == nleft: * break * if j == nright: # <<<<<<<<<<<<<< * break * */ __pyx_t_2 = ((__pyx_v_j == __pyx_v_nright) != 0); if (__pyx_t_2) { /* "pandas/src/generated.pyx":8598 * break * if j == nright: * break # <<<<<<<<<<<<<< * * lval = left[i] */ goto __pyx_L15_break; } /* "pandas/src/generated.pyx":8600 * break * * lval = left[i] # <<<<<<<<<<<<<< * rval = right[j] * if lval == rval: */ __pyx_t_20 = __pyx_v_i; __pyx_t_8 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_left.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_left.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_8); __Pyx_XDECREF_SET(__pyx_v_lval, __pyx_t_8); __pyx_t_8 = 0; /* "pandas/src/generated.pyx":8601 * * lval = left[i] * rval = right[j] # <<<<<<<<<<<<<< * if lval == rval: * lindexer[count] = i */ __pyx_t_21 = __pyx_v_j; __pyx_t_8 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_right.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_right.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_8); __Pyx_XDECREF_SET(__pyx_v_rval, __pyx_t_8); __pyx_t_8 = 0; /* "pandas/src/generated.pyx":8602 * lval = left[i] * rval = right[j] * if lval == rval: # <<<<<<<<<<<<<< * lindexer[count] = i * rindexer[count] = j */ __pyx_t_8 = PyObject_RichCompare(__pyx_v_lval, __pyx_v_rval, Py_EQ); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8602; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8602; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (__pyx_t_2) { /* "pandas/src/generated.pyx":8603 * rval = right[j] * if lval == rval: * lindexer[count] = i # <<<<<<<<<<<<<< * rindexer[count] = j * result[count] = rval */ __pyx_t_22 = __pyx_v_count; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_lindexer.rcbuffer->pybuffer.buf, __pyx_t_22, __pyx_pybuffernd_lindexer.diminfo[0].strides) = __pyx_v_i; /* "pandas/src/generated.pyx":8604 * if lval == rval: * lindexer[count] = i * rindexer[count] = j # <<<<<<<<<<<<<< * result[count] = rval * count += 1 */ __pyx_t_23 = __pyx_v_count; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_rindexer.rcbuffer->pybuffer.buf, __pyx_t_23, __pyx_pybuffernd_rindexer.diminfo[0].strides) = __pyx_v_j; /* "pandas/src/generated.pyx":8605 * lindexer[count] = i * rindexer[count] = j * result[count] = rval # <<<<<<<<<<<<<< * count += 1 * if i < nleft - 1: */ __pyx_t_24 = __pyx_v_count; __pyx_t_25 = __Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_24, __pyx_pybuffernd_result.diminfo[0].strides); __Pyx_GOTREF(*__pyx_t_25); __Pyx_INCREF(__pyx_v_rval); __Pyx_DECREF(*__pyx_t_25); *__pyx_t_25 = __pyx_v_rval; __Pyx_GIVEREF(*__pyx_t_25); /* "pandas/src/generated.pyx":8606 * rindexer[count] = j * result[count] = rval * count += 1 # <<<<<<<<<<<<<< * if i < nleft - 1: * if j < nright - 1 and right[j + 1] == rval: */ __pyx_v_count = (__pyx_v_count + 1); /* "pandas/src/generated.pyx":8607 * result[count] = rval * count += 1 * if i < nleft - 1: # <<<<<<<<<<<<<< * if j < nright - 1 and right[j + 1] == rval: * j += 1 */ __pyx_t_2 = ((__pyx_v_i < (__pyx_v_nleft - 1)) != 0); if (__pyx_t_2) { /* "pandas/src/generated.pyx":8608 * count += 1 * if i < nleft - 1: * if j < nright - 1 and right[j + 1] == rval: # <<<<<<<<<<<<<< * j += 1 * else: */ __pyx_t_2 = (__pyx_v_j < (__pyx_v_nright - 1)); if (__pyx_t_2) { __pyx_t_26 = (__pyx_v_j + 1); __pyx_t_8 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_right.rcbuffer->pybuffer.buf, __pyx_t_26, __pyx_pybuffernd_right.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_8); __pyx_t_12 = PyObject_RichCompare(__pyx_t_8, __pyx_v_rval, Py_EQ); __Pyx_XGOTREF(__pyx_t_12); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8608; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_12); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8608; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __pyx_t_4 = __pyx_t_3; } else { __pyx_t_4 = __pyx_t_2; } if (__pyx_t_4) { /* "pandas/src/generated.pyx":8609 * if i < nleft - 1: * if j < nright - 1 and right[j + 1] == rval: * j += 1 # <<<<<<<<<<<<<< * else: * i += 1 */ __pyx_v_j = (__pyx_v_j + 1); goto __pyx_L20; } /*else*/ { /* "pandas/src/generated.pyx":8611 * j += 1 * else: * i += 1 # <<<<<<<<<<<<<< * if left[i] != rval: * j += 1 */ __pyx_v_i = (__pyx_v_i + 1); /* "pandas/src/generated.pyx":8612 * else: * i += 1 * if left[i] != rval: # <<<<<<<<<<<<<< * j += 1 * elif j < nright - 1: */ __pyx_t_27 = __pyx_v_i; __pyx_t_12 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_left.rcbuffer->pybuffer.buf, __pyx_t_27, __pyx_pybuffernd_left.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_12); __pyx_t_8 = PyObject_RichCompare(__pyx_t_12, __pyx_v_rval, Py_NE); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8612; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8612; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (__pyx_t_4) { /* "pandas/src/generated.pyx":8613 * i += 1 * if left[i] != rval: * j += 1 # <<<<<<<<<<<<<< * elif j < nright - 1: * j += 1 */ __pyx_v_j = (__pyx_v_j + 1); goto __pyx_L21; } __pyx_L21:; } __pyx_L20:; goto __pyx_L19; } /* "pandas/src/generated.pyx":8614 * if left[i] != rval: * j += 1 * elif j < nright - 1: # <<<<<<<<<<<<<< * j += 1 * if lval != right[j]: */ __pyx_t_4 = ((__pyx_v_j < (__pyx_v_nright - 1)) != 0); if (__pyx_t_4) { /* "pandas/src/generated.pyx":8615 * j += 1 * elif j < nright - 1: * j += 1 # <<<<<<<<<<<<<< * if lval != right[j]: * i += 1 */ __pyx_v_j = (__pyx_v_j + 1); /* "pandas/src/generated.pyx":8616 * elif j < nright - 1: * j += 1 * if lval != right[j]: # <<<<<<<<<<<<<< * i += 1 * else: */ __pyx_t_28 = __pyx_v_j; __pyx_t_8 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_right.rcbuffer->pybuffer.buf, __pyx_t_28, __pyx_pybuffernd_right.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_8); __pyx_t_12 = PyObject_RichCompare(__pyx_v_lval, __pyx_t_8, Py_NE); __Pyx_XGOTREF(__pyx_t_12); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8616; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_12); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8616; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; if (__pyx_t_4) { /* "pandas/src/generated.pyx":8617 * j += 1 * if lval != right[j]: * i += 1 # <<<<<<<<<<<<<< * else: * # end of the road */ __pyx_v_i = (__pyx_v_i + 1); goto __pyx_L22; } __pyx_L22:; goto __pyx_L19; } /*else*/ { /* "pandas/src/generated.pyx":8620 * else: * # end of the road * break # <<<<<<<<<<<<<< * elif lval < rval: * i += 1 */ goto __pyx_L15_break; } __pyx_L19:; goto __pyx_L18; } /* "pandas/src/generated.pyx":8621 * # end of the road * break * elif lval < rval: # <<<<<<<<<<<<<< * i += 1 * else: */ __pyx_t_12 = PyObject_RichCompare(__pyx_v_lval, __pyx_v_rval, Py_LT); __Pyx_XGOTREF(__pyx_t_12); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8621; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_12); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8621; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; if (__pyx_t_4) { /* "pandas/src/generated.pyx":8622 * break * elif lval < rval: * i += 1 # <<<<<<<<<<<<<< * else: * j += 1 */ __pyx_v_i = (__pyx_v_i + 1); goto __pyx_L18; } /*else*/ { /* "pandas/src/generated.pyx":8624 * i += 1 * else: * j += 1 # <<<<<<<<<<<<<< * * return result, lindexer, rindexer */ __pyx_v_j = (__pyx_v_j + 1); } __pyx_L18:; } __pyx_L15_break:; goto __pyx_L13; } __pyx_L13:; /* "pandas/src/generated.pyx":8626 * j += 1 * * return result, lindexer, rindexer # <<<<<<<<<<<<<< * * @cython.wraparound(False) */ __Pyx_XDECREF(__pyx_r); __pyx_t_12 = PyTuple_New(3); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8626; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __Pyx_INCREF(((PyObject *)__pyx_v_result)); PyTuple_SET_ITEM(__pyx_t_12, 0, ((PyObject *)__pyx_v_result)); __Pyx_GIVEREF(((PyObject *)__pyx_v_result)); __Pyx_INCREF(((PyObject *)__pyx_v_lindexer)); PyTuple_SET_ITEM(__pyx_t_12, 1, ((PyObject *)__pyx_v_lindexer)); __Pyx_GIVEREF(((PyObject *)__pyx_v_lindexer)); __Pyx_INCREF(((PyObject *)__pyx_v_rindexer)); PyTuple_SET_ITEM(__pyx_t_12, 2, ((PyObject *)__pyx_v_rindexer)); __Pyx_GIVEREF(((PyObject *)__pyx_v_rindexer)); __pyx_r = __pyx_t_12; __pyx_t_12 = 0; goto __pyx_L0; /* "pandas/src/generated.pyx":8537 * @cython.wraparound(False) * @cython.boundscheck(False) * def inner_join_indexer_object(ndarray[object] left, # <<<<<<<<<<<<<< * ndarray[object] right): * ''' */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_11); __Pyx_XDECREF(__pyx_t_12); __Pyx_XDECREF(__pyx_t_13); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_left.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_lindexer.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_right.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_rindexer.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.inner_join_indexer_object", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_left.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_lindexer.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_right.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_rindexer.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF(__pyx_v_lval); __Pyx_XDECREF(__pyx_v_rval); __Pyx_XDECREF((PyObject *)__pyx_v_lindexer); __Pyx_XDECREF((PyObject *)__pyx_v_rindexer); __Pyx_XDECREF((PyObject *)__pyx_v_result); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":8630 * @cython.wraparound(False) * @cython.boundscheck(False) * def inner_join_indexer_int32(ndarray[int32_t] left, # <<<<<<<<<<<<<< * ndarray[int32_t] right): * ''' */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_491inner_join_indexer_int32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6pandas_5algos_490inner_join_indexer_int32[] = "\n Two-pass algorithm for monotonic indexes. Handles many-to-one merges\n "; static PyMethodDef __pyx_mdef_6pandas_5algos_491inner_join_indexer_int32 = {__Pyx_NAMESTR("inner_join_indexer_int32"), (PyCFunction)__pyx_pw_6pandas_5algos_491inner_join_indexer_int32, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_5algos_490inner_join_indexer_int32)}; static PyObject *__pyx_pw_6pandas_5algos_491inner_join_indexer_int32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_left = 0; PyArrayObject *__pyx_v_right = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("inner_join_indexer_int32 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_left,&__pyx_n_s_right,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_left)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_right)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("inner_join_indexer_int32", 1, 2, 2, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8630; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "inner_join_indexer_int32") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8630; __pyx_clineno = __LINE__; goto __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_left = ((PyArrayObject *)values[0]); __pyx_v_right = ((PyArrayObject *)values[1]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("inner_join_indexer_int32", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8630; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.inner_join_indexer_int32", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_left), __pyx_ptype_5numpy_ndarray, 1, "left", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8630; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_right), __pyx_ptype_5numpy_ndarray, 1, "right", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8631; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_490inner_join_indexer_int32(__pyx_self, __pyx_v_left, __pyx_v_right); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5algos_490inner_join_indexer_int32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_left, PyArrayObject *__pyx_v_right) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_nright; Py_ssize_t __pyx_v_nleft; Py_ssize_t __pyx_v_count; __pyx_t_5numpy_int32_t __pyx_v_lval; __pyx_t_5numpy_int32_t __pyx_v_rval; PyArrayObject *__pyx_v_lindexer = 0; PyArrayObject *__pyx_v_rindexer = 0; PyArrayObject *__pyx_v_result = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_left; __Pyx_Buffer __pyx_pybuffer_left; __Pyx_LocalBuf_ND __pyx_pybuffernd_lindexer; __Pyx_Buffer __pyx_pybuffer_lindexer; __Pyx_LocalBuf_ND __pyx_pybuffernd_result; __Pyx_Buffer __pyx_pybuffer_result; __Pyx_LocalBuf_ND __pyx_pybuffernd_right; __Pyx_Buffer __pyx_pybuffer_right; __Pyx_LocalBuf_ND __pyx_pybuffernd_rindexer; __Pyx_Buffer __pyx_pybuffer_rindexer; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; int __pyx_t_2; int __pyx_t_3; int __pyx_t_4; Py_ssize_t __pyx_t_5; Py_ssize_t __pyx_t_6; Py_ssize_t __pyx_t_7; Py_ssize_t __pyx_t_8; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; PyObject *__pyx_t_11 = NULL; PyObject *__pyx_t_12 = NULL; PyObject *__pyx_t_13 = NULL; PyArrayObject *__pyx_t_14 = NULL; int __pyx_t_15; PyObject *__pyx_t_16 = NULL; PyObject *__pyx_t_17 = NULL; PyObject *__pyx_t_18 = NULL; PyArrayObject *__pyx_t_19 = NULL; 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("inner_join_indexer_int32", 0); __pyx_pybuffer_lindexer.pybuffer.buf = NULL; __pyx_pybuffer_lindexer.refcount = 0; __pyx_pybuffernd_lindexer.data = NULL; __pyx_pybuffernd_lindexer.rcbuffer = &__pyx_pybuffer_lindexer; __pyx_pybuffer_rindexer.pybuffer.buf = NULL; __pyx_pybuffer_rindexer.refcount = 0; __pyx_pybuffernd_rindexer.data = NULL; __pyx_pybuffernd_rindexer.rcbuffer = &__pyx_pybuffer_rindexer; __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_left.pybuffer.buf = NULL; __pyx_pybuffer_left.refcount = 0; __pyx_pybuffernd_left.data = NULL; __pyx_pybuffernd_left.rcbuffer = &__pyx_pybuffer_left; __pyx_pybuffer_right.pybuffer.buf = NULL; __pyx_pybuffer_right.refcount = 0; __pyx_pybuffernd_right.data = NULL; __pyx_pybuffernd_right.rcbuffer = &__pyx_pybuffer_right; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_left.rcbuffer->pybuffer, (PyObject*)__pyx_v_left, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8630; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_left.diminfo[0].strides = __pyx_pybuffernd_left.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_left.diminfo[0].shape = __pyx_pybuffernd_left.rcbuffer->pybuffer.shape[0]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_right.rcbuffer->pybuffer, (PyObject*)__pyx_v_right, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8630; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_right.diminfo[0].strides = __pyx_pybuffernd_right.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_right.diminfo[0].shape = __pyx_pybuffernd_right.rcbuffer->pybuffer.shape[0]; /* "pandas/src/generated.pyx":8641 * ndarray[int32_t] result * * nleft = len(left) # <<<<<<<<<<<<<< * nright = len(right) * */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_left)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8641; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_nleft = __pyx_t_1; /* "pandas/src/generated.pyx":8642 * * nleft = len(left) * nright = len(right) # <<<<<<<<<<<<<< * * i = 0 */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_right)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8642; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_nright = __pyx_t_1; /* "pandas/src/generated.pyx":8644 * nright = len(right) * * i = 0 # <<<<<<<<<<<<<< * j = 0 * count = 0 */ __pyx_v_i = 0; /* "pandas/src/generated.pyx":8645 * * i = 0 * j = 0 # <<<<<<<<<<<<<< * count = 0 * if nleft > 0 and nright > 0: */ __pyx_v_j = 0; /* "pandas/src/generated.pyx":8646 * i = 0 * j = 0 * count = 0 # <<<<<<<<<<<<<< * if nleft > 0 and nright > 0: * while True: */ __pyx_v_count = 0; /* "pandas/src/generated.pyx":8647 * j = 0 * count = 0 * if nleft > 0 and nright > 0: # <<<<<<<<<<<<<< * while True: * if i == nleft: */ __pyx_t_2 = ((__pyx_v_nleft > 0) != 0); if (__pyx_t_2) { __pyx_t_3 = ((__pyx_v_nright > 0) != 0); __pyx_t_4 = __pyx_t_3; } else { __pyx_t_4 = __pyx_t_2; } if (__pyx_t_4) { /* "pandas/src/generated.pyx":8648 * count = 0 * if nleft > 0 and nright > 0: * while True: # <<<<<<<<<<<<<< * if i == nleft: * break */ while (1) { /* "pandas/src/generated.pyx":8649 * if nleft > 0 and nright > 0: * while True: * if i == nleft: # <<<<<<<<<<<<<< * break * if j == nright: */ __pyx_t_4 = ((__pyx_v_i == __pyx_v_nleft) != 0); if (__pyx_t_4) { /* "pandas/src/generated.pyx":8650 * while True: * if i == nleft: * break # <<<<<<<<<<<<<< * if j == nright: * break */ goto __pyx_L5_break; } /* "pandas/src/generated.pyx":8651 * if i == nleft: * break * if j == nright: # <<<<<<<<<<<<<< * break * */ __pyx_t_4 = ((__pyx_v_j == __pyx_v_nright) != 0); if (__pyx_t_4) { /* "pandas/src/generated.pyx":8652 * break * if j == nright: * break # <<<<<<<<<<<<<< * * lval = left[i] */ goto __pyx_L5_break; } /* "pandas/src/generated.pyx":8654 * break * * lval = left[i] # <<<<<<<<<<<<<< * rval = right[j] * if lval == rval: */ __pyx_t_1 = __pyx_v_i; __pyx_v_lval = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_left.rcbuffer->pybuffer.buf, __pyx_t_1, __pyx_pybuffernd_left.diminfo[0].strides)); /* "pandas/src/generated.pyx":8655 * * lval = left[i] * rval = right[j] # <<<<<<<<<<<<<< * if lval == rval: * count += 1 */ __pyx_t_5 = __pyx_v_j; __pyx_v_rval = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_right.rcbuffer->pybuffer.buf, __pyx_t_5, __pyx_pybuffernd_right.diminfo[0].strides)); /* "pandas/src/generated.pyx":8656 * lval = left[i] * rval = right[j] * if lval == rval: # <<<<<<<<<<<<<< * count += 1 * if i < nleft - 1: */ __pyx_t_4 = ((__pyx_v_lval == __pyx_v_rval) != 0); if (__pyx_t_4) { /* "pandas/src/generated.pyx":8657 * rval = right[j] * if lval == rval: * count += 1 # <<<<<<<<<<<<<< * if i < nleft - 1: * if j < nright - 1 and right[j + 1] == rval: */ __pyx_v_count = (__pyx_v_count + 1); /* "pandas/src/generated.pyx":8658 * if lval == rval: * count += 1 * if i < nleft - 1: # <<<<<<<<<<<<<< * if j < nright - 1 and right[j + 1] == rval: * j += 1 */ __pyx_t_4 = ((__pyx_v_i < (__pyx_v_nleft - 1)) != 0); if (__pyx_t_4) { /* "pandas/src/generated.pyx":8659 * count += 1 * if i < nleft - 1: * if j < nright - 1 and right[j + 1] == rval: # <<<<<<<<<<<<<< * j += 1 * else: */ __pyx_t_4 = ((__pyx_v_j < (__pyx_v_nright - 1)) != 0); if (__pyx_t_4) { __pyx_t_6 = (__pyx_v_j + 1); __pyx_t_2 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_right.rcbuffer->pybuffer.buf, __pyx_t_6, __pyx_pybuffernd_right.diminfo[0].strides)) == __pyx_v_rval) != 0); __pyx_t_3 = __pyx_t_2; } else { __pyx_t_3 = __pyx_t_4; } if (__pyx_t_3) { /* "pandas/src/generated.pyx":8660 * if i < nleft - 1: * if j < nright - 1 and right[j + 1] == rval: * j += 1 # <<<<<<<<<<<<<< * else: * i += 1 */ __pyx_v_j = (__pyx_v_j + 1); goto __pyx_L10; } /*else*/ { /* "pandas/src/generated.pyx":8662 * j += 1 * else: * i += 1 # <<<<<<<<<<<<<< * if left[i] != rval: * j += 1 */ __pyx_v_i = (__pyx_v_i + 1); /* "pandas/src/generated.pyx":8663 * else: * i += 1 * if left[i] != rval: # <<<<<<<<<<<<<< * j += 1 * elif j < nright - 1: */ __pyx_t_7 = __pyx_v_i; __pyx_t_3 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_left.rcbuffer->pybuffer.buf, __pyx_t_7, __pyx_pybuffernd_left.diminfo[0].strides)) != __pyx_v_rval) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":8664 * i += 1 * if left[i] != rval: * j += 1 # <<<<<<<<<<<<<< * elif j < nright - 1: * j += 1 */ __pyx_v_j = (__pyx_v_j + 1); goto __pyx_L11; } __pyx_L11:; } __pyx_L10:; goto __pyx_L9; } /* "pandas/src/generated.pyx":8665 * if left[i] != rval: * j += 1 * elif j < nright - 1: # <<<<<<<<<<<<<< * j += 1 * if lval != right[j]: */ __pyx_t_3 = ((__pyx_v_j < (__pyx_v_nright - 1)) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":8666 * j += 1 * elif j < nright - 1: * j += 1 # <<<<<<<<<<<<<< * if lval != right[j]: * i += 1 */ __pyx_v_j = (__pyx_v_j + 1); /* "pandas/src/generated.pyx":8667 * elif j < nright - 1: * j += 1 * if lval != right[j]: # <<<<<<<<<<<<<< * i += 1 * else: */ __pyx_t_8 = __pyx_v_j; __pyx_t_3 = ((__pyx_v_lval != (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_right.rcbuffer->pybuffer.buf, __pyx_t_8, __pyx_pybuffernd_right.diminfo[0].strides))) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":8668 * j += 1 * if lval != right[j]: * i += 1 # <<<<<<<<<<<<<< * else: * # end of the road */ __pyx_v_i = (__pyx_v_i + 1); goto __pyx_L12; } __pyx_L12:; goto __pyx_L9; } /*else*/ { /* "pandas/src/generated.pyx":8671 * else: * # end of the road * break # <<<<<<<<<<<<<< * elif lval < rval: * i += 1 */ goto __pyx_L5_break; } __pyx_L9:; goto __pyx_L8; } /* "pandas/src/generated.pyx":8672 * # end of the road * break * elif lval < rval: # <<<<<<<<<<<<<< * i += 1 * else: */ __pyx_t_3 = ((__pyx_v_lval < __pyx_v_rval) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":8673 * break * elif lval < rval: * i += 1 # <<<<<<<<<<<<<< * else: * j += 1 */ __pyx_v_i = (__pyx_v_i + 1); goto __pyx_L8; } /*else*/ { /* "pandas/src/generated.pyx":8675 * i += 1 * else: * j += 1 # <<<<<<<<<<<<<< * * # do it again now that result size is known */ __pyx_v_j = (__pyx_v_j + 1); } __pyx_L8:; } __pyx_L5_break:; goto __pyx_L3; } __pyx_L3:; /* "pandas/src/generated.pyx":8679 * # do it again now that result size is known * * lindexer = np.empty(count, dtype=np.int64) # <<<<<<<<<<<<<< * rindexer = np.empty(count, dtype=np.int64) * result = np.empty(count, dtype=np.int32) */ __pyx_t_9 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8679; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_empty); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8679; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_9 = PyInt_FromSsize_t(__pyx_v_count); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8679; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_t_11 = PyTuple_New(1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8679; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_9); __Pyx_GIVEREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_9 = PyDict_New(); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8679; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_t_12 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8679; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_int64); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8679; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_dtype, __pyx_t_13) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8679; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_13 = PyObject_Call(__pyx_t_10, __pyx_t_11, __pyx_t_9); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8679; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; if (!(likely(((__pyx_t_13) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_13, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8679; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_14 = ((PyArrayObject *)__pyx_t_13); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_lindexer.rcbuffer->pybuffer); __pyx_t_15 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_lindexer.rcbuffer->pybuffer, (PyObject*)__pyx_t_14, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_15 < 0)) { PyErr_Fetch(&__pyx_t_16, &__pyx_t_17, &__pyx_t_18); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_lindexer.rcbuffer->pybuffer, (PyObject*)__pyx_v_lindexer, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_16); Py_XDECREF(__pyx_t_17); Py_XDECREF(__pyx_t_18); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_16, __pyx_t_17, __pyx_t_18); } } __pyx_pybuffernd_lindexer.diminfo[0].strides = __pyx_pybuffernd_lindexer.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_lindexer.diminfo[0].shape = __pyx_pybuffernd_lindexer.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_15 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8679; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_14 = 0; __pyx_v_lindexer = ((PyArrayObject *)__pyx_t_13); __pyx_t_13 = 0; /* "pandas/src/generated.pyx":8680 * * lindexer = np.empty(count, dtype=np.int64) * rindexer = np.empty(count, dtype=np.int64) # <<<<<<<<<<<<<< * result = np.empty(count, dtype=np.int32) * */ __pyx_t_13 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8680; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_13, __pyx_n_s_empty); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8680; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_13 = PyInt_FromSsize_t(__pyx_v_count); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8680; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __pyx_t_11 = PyTuple_New(1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8680; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_13); __Pyx_GIVEREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_13 = PyDict_New(); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8680; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __pyx_t_10 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8680; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_int64); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8680; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; if (PyDict_SetItem(__pyx_t_13, __pyx_n_s_dtype, __pyx_t_12) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8680; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __pyx_t_12 = PyObject_Call(__pyx_t_9, __pyx_t_11, __pyx_t_13); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8680; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; if (!(likely(((__pyx_t_12) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_12, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8680; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_14 = ((PyArrayObject *)__pyx_t_12); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_rindexer.rcbuffer->pybuffer); __pyx_t_15 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_rindexer.rcbuffer->pybuffer, (PyObject*)__pyx_t_14, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_15 < 0)) { PyErr_Fetch(&__pyx_t_18, &__pyx_t_17, &__pyx_t_16); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_rindexer.rcbuffer->pybuffer, (PyObject*)__pyx_v_rindexer, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_18); Py_XDECREF(__pyx_t_17); Py_XDECREF(__pyx_t_16); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_18, __pyx_t_17, __pyx_t_16); } } __pyx_pybuffernd_rindexer.diminfo[0].strides = __pyx_pybuffernd_rindexer.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_rindexer.diminfo[0].shape = __pyx_pybuffernd_rindexer.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_15 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8680; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_14 = 0; __pyx_v_rindexer = ((PyArrayObject *)__pyx_t_12); __pyx_t_12 = 0; /* "pandas/src/generated.pyx":8681 * lindexer = np.empty(count, dtype=np.int64) * rindexer = np.empty(count, dtype=np.int64) * result = np.empty(count, dtype=np.int32) # <<<<<<<<<<<<<< * * i = 0 */ __pyx_t_12 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8681; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_empty); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8681; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __pyx_t_12 = PyInt_FromSsize_t(__pyx_v_count); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8681; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __pyx_t_11 = PyTuple_New(1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8681; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_12); __Pyx_GIVEREF(__pyx_t_12); __pyx_t_12 = 0; __pyx_t_12 = PyDict_New(); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8681; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __pyx_t_9 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8681; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_int32); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8681; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; if (PyDict_SetItem(__pyx_t_12, __pyx_n_s_dtype, __pyx_t_10) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8681; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_t_10 = PyObject_Call(__pyx_t_13, __pyx_t_11, __pyx_t_12); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8681; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; if (!(likely(((__pyx_t_10) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_10, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8681; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_19 = ((PyArrayObject *)__pyx_t_10); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __pyx_t_15 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_t_19, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_15 < 0)) { PyErr_Fetch(&__pyx_t_16, &__pyx_t_17, &__pyx_t_18); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_v_result, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_16); Py_XDECREF(__pyx_t_17); Py_XDECREF(__pyx_t_18); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_16, __pyx_t_17, __pyx_t_18); } } __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_15 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8681; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_19 = 0; __pyx_v_result = ((PyArrayObject *)__pyx_t_10); __pyx_t_10 = 0; /* "pandas/src/generated.pyx":8683 * result = np.empty(count, dtype=np.int32) * * i = 0 # <<<<<<<<<<<<<< * j = 0 * count = 0 */ __pyx_v_i = 0; /* "pandas/src/generated.pyx":8684 * * i = 0 * j = 0 # <<<<<<<<<<<<<< * count = 0 * if nleft > 0 and nright > 0: */ __pyx_v_j = 0; /* "pandas/src/generated.pyx":8685 * i = 0 * j = 0 * count = 0 # <<<<<<<<<<<<<< * if nleft > 0 and nright > 0: * while True: */ __pyx_v_count = 0; /* "pandas/src/generated.pyx":8686 * j = 0 * count = 0 * if nleft > 0 and nright > 0: # <<<<<<<<<<<<<< * while True: * if i == nleft: */ __pyx_t_3 = ((__pyx_v_nleft > 0) != 0); if (__pyx_t_3) { __pyx_t_4 = ((__pyx_v_nright > 0) != 0); __pyx_t_2 = __pyx_t_4; } else { __pyx_t_2 = __pyx_t_3; } if (__pyx_t_2) { /* "pandas/src/generated.pyx":8687 * count = 0 * if nleft > 0 and nright > 0: * while True: # <<<<<<<<<<<<<< * if i == nleft: * break */ while (1) { /* "pandas/src/generated.pyx":8688 * if nleft > 0 and nright > 0: * while True: * if i == nleft: # <<<<<<<<<<<<<< * break * if j == nright: */ __pyx_t_2 = ((__pyx_v_i == __pyx_v_nleft) != 0); if (__pyx_t_2) { /* "pandas/src/generated.pyx":8689 * while True: * if i == nleft: * break # <<<<<<<<<<<<<< * if j == nright: * break */ goto __pyx_L15_break; } /* "pandas/src/generated.pyx":8690 * if i == nleft: * break * if j == nright: # <<<<<<<<<<<<<< * break * */ __pyx_t_2 = ((__pyx_v_j == __pyx_v_nright) != 0); if (__pyx_t_2) { /* "pandas/src/generated.pyx":8691 * break * if j == nright: * break # <<<<<<<<<<<<<< * * lval = left[i] */ goto __pyx_L15_break; } /* "pandas/src/generated.pyx":8693 * break * * lval = left[i] # <<<<<<<<<<<<<< * rval = right[j] * if lval == rval: */ __pyx_t_20 = __pyx_v_i; __pyx_v_lval = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_left.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_left.diminfo[0].strides)); /* "pandas/src/generated.pyx":8694 * * lval = left[i] * rval = right[j] # <<<<<<<<<<<<<< * if lval == rval: * lindexer[count] = i */ __pyx_t_21 = __pyx_v_j; __pyx_v_rval = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_right.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_right.diminfo[0].strides)); /* "pandas/src/generated.pyx":8695 * lval = left[i] * rval = right[j] * if lval == rval: # <<<<<<<<<<<<<< * lindexer[count] = i * rindexer[count] = j */ __pyx_t_2 = ((__pyx_v_lval == __pyx_v_rval) != 0); if (__pyx_t_2) { /* "pandas/src/generated.pyx":8696 * rval = right[j] * if lval == rval: * lindexer[count] = i # <<<<<<<<<<<<<< * rindexer[count] = j * result[count] = rval */ __pyx_t_22 = __pyx_v_count; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_lindexer.rcbuffer->pybuffer.buf, __pyx_t_22, __pyx_pybuffernd_lindexer.diminfo[0].strides) = __pyx_v_i; /* "pandas/src/generated.pyx":8697 * if lval == rval: * lindexer[count] = i * rindexer[count] = j # <<<<<<<<<<<<<< * result[count] = rval * count += 1 */ __pyx_t_23 = __pyx_v_count; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_rindexer.rcbuffer->pybuffer.buf, __pyx_t_23, __pyx_pybuffernd_rindexer.diminfo[0].strides) = __pyx_v_j; /* "pandas/src/generated.pyx":8698 * lindexer[count] = i * rindexer[count] = j * result[count] = rval # <<<<<<<<<<<<<< * count += 1 * if i < nleft - 1: */ __pyx_t_24 = __pyx_v_count; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_24, __pyx_pybuffernd_result.diminfo[0].strides) = __pyx_v_rval; /* "pandas/src/generated.pyx":8699 * rindexer[count] = j * result[count] = rval * count += 1 # <<<<<<<<<<<<<< * if i < nleft - 1: * if j < nright - 1 and right[j + 1] == rval: */ __pyx_v_count = (__pyx_v_count + 1); /* "pandas/src/generated.pyx":8700 * result[count] = rval * count += 1 * if i < nleft - 1: # <<<<<<<<<<<<<< * if j < nright - 1 and right[j + 1] == rval: * j += 1 */ __pyx_t_2 = ((__pyx_v_i < (__pyx_v_nleft - 1)) != 0); if (__pyx_t_2) { /* "pandas/src/generated.pyx":8701 * count += 1 * if i < nleft - 1: * if j < nright - 1 and right[j + 1] == rval: # <<<<<<<<<<<<<< * j += 1 * else: */ __pyx_t_2 = ((__pyx_v_j < (__pyx_v_nright - 1)) != 0); if (__pyx_t_2) { __pyx_t_25 = (__pyx_v_j + 1); __pyx_t_3 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_right.rcbuffer->pybuffer.buf, __pyx_t_25, __pyx_pybuffernd_right.diminfo[0].strides)) == __pyx_v_rval) != 0); __pyx_t_4 = __pyx_t_3; } else { __pyx_t_4 = __pyx_t_2; } if (__pyx_t_4) { /* "pandas/src/generated.pyx":8702 * if i < nleft - 1: * if j < nright - 1 and right[j + 1] == rval: * j += 1 # <<<<<<<<<<<<<< * else: * i += 1 */ __pyx_v_j = (__pyx_v_j + 1); goto __pyx_L20; } /*else*/ { /* "pandas/src/generated.pyx":8704 * j += 1 * else: * i += 1 # <<<<<<<<<<<<<< * if left[i] != rval: * j += 1 */ __pyx_v_i = (__pyx_v_i + 1); /* "pandas/src/generated.pyx":8705 * else: * i += 1 * if left[i] != rval: # <<<<<<<<<<<<<< * j += 1 * elif j < nright - 1: */ __pyx_t_26 = __pyx_v_i; __pyx_t_4 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_left.rcbuffer->pybuffer.buf, __pyx_t_26, __pyx_pybuffernd_left.diminfo[0].strides)) != __pyx_v_rval) != 0); if (__pyx_t_4) { /* "pandas/src/generated.pyx":8706 * i += 1 * if left[i] != rval: * j += 1 # <<<<<<<<<<<<<< * elif j < nright - 1: * j += 1 */ __pyx_v_j = (__pyx_v_j + 1); goto __pyx_L21; } __pyx_L21:; } __pyx_L20:; goto __pyx_L19; } /* "pandas/src/generated.pyx":8707 * if left[i] != rval: * j += 1 * elif j < nright - 1: # <<<<<<<<<<<<<< * j += 1 * if lval != right[j]: */ __pyx_t_4 = ((__pyx_v_j < (__pyx_v_nright - 1)) != 0); if (__pyx_t_4) { /* "pandas/src/generated.pyx":8708 * j += 1 * elif j < nright - 1: * j += 1 # <<<<<<<<<<<<<< * if lval != right[j]: * i += 1 */ __pyx_v_j = (__pyx_v_j + 1); /* "pandas/src/generated.pyx":8709 * elif j < nright - 1: * j += 1 * if lval != right[j]: # <<<<<<<<<<<<<< * i += 1 * else: */ __pyx_t_27 = __pyx_v_j; __pyx_t_4 = ((__pyx_v_lval != (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_right.rcbuffer->pybuffer.buf, __pyx_t_27, __pyx_pybuffernd_right.diminfo[0].strides))) != 0); if (__pyx_t_4) { /* "pandas/src/generated.pyx":8710 * j += 1 * if lval != right[j]: * i += 1 # <<<<<<<<<<<<<< * else: * # end of the road */ __pyx_v_i = (__pyx_v_i + 1); goto __pyx_L22; } __pyx_L22:; goto __pyx_L19; } /*else*/ { /* "pandas/src/generated.pyx":8713 * else: * # end of the road * break # <<<<<<<<<<<<<< * elif lval < rval: * i += 1 */ goto __pyx_L15_break; } __pyx_L19:; goto __pyx_L18; } /* "pandas/src/generated.pyx":8714 * # end of the road * break * elif lval < rval: # <<<<<<<<<<<<<< * i += 1 * else: */ __pyx_t_4 = ((__pyx_v_lval < __pyx_v_rval) != 0); if (__pyx_t_4) { /* "pandas/src/generated.pyx":8715 * break * elif lval < rval: * i += 1 # <<<<<<<<<<<<<< * else: * j += 1 */ __pyx_v_i = (__pyx_v_i + 1); goto __pyx_L18; } /*else*/ { /* "pandas/src/generated.pyx":8717 * i += 1 * else: * j += 1 # <<<<<<<<<<<<<< * * return result, lindexer, rindexer */ __pyx_v_j = (__pyx_v_j + 1); } __pyx_L18:; } __pyx_L15_break:; goto __pyx_L13; } __pyx_L13:; /* "pandas/src/generated.pyx":8719 * j += 1 * * return result, lindexer, rindexer # <<<<<<<<<<<<<< * * @cython.wraparound(False) */ __Pyx_XDECREF(__pyx_r); __pyx_t_10 = PyTuple_New(3); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8719; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_INCREF(((PyObject *)__pyx_v_result)); PyTuple_SET_ITEM(__pyx_t_10, 0, ((PyObject *)__pyx_v_result)); __Pyx_GIVEREF(((PyObject *)__pyx_v_result)); __Pyx_INCREF(((PyObject *)__pyx_v_lindexer)); PyTuple_SET_ITEM(__pyx_t_10, 1, ((PyObject *)__pyx_v_lindexer)); __Pyx_GIVEREF(((PyObject *)__pyx_v_lindexer)); __Pyx_INCREF(((PyObject *)__pyx_v_rindexer)); PyTuple_SET_ITEM(__pyx_t_10, 2, ((PyObject *)__pyx_v_rindexer)); __Pyx_GIVEREF(((PyObject *)__pyx_v_rindexer)); __pyx_r = __pyx_t_10; __pyx_t_10 = 0; goto __pyx_L0; /* "pandas/src/generated.pyx":8630 * @cython.wraparound(False) * @cython.boundscheck(False) * def inner_join_indexer_int32(ndarray[int32_t] left, # <<<<<<<<<<<<<< * ndarray[int32_t] right): * ''' */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_9); __Pyx_XDECREF(__pyx_t_10); __Pyx_XDECREF(__pyx_t_11); __Pyx_XDECREF(__pyx_t_12); __Pyx_XDECREF(__pyx_t_13); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_left.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_lindexer.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_right.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_rindexer.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.inner_join_indexer_int32", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_left.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_lindexer.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_right.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_rindexer.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_lindexer); __Pyx_XDECREF((PyObject *)__pyx_v_rindexer); __Pyx_XDECREF((PyObject *)__pyx_v_result); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":8723 * @cython.wraparound(False) * @cython.boundscheck(False) * def inner_join_indexer_int64(ndarray[int64_t] left, # <<<<<<<<<<<<<< * ndarray[int64_t] right): * ''' */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_493inner_join_indexer_int64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6pandas_5algos_492inner_join_indexer_int64[] = "\n Two-pass algorithm for monotonic indexes. Handles many-to-one merges\n "; static PyMethodDef __pyx_mdef_6pandas_5algos_493inner_join_indexer_int64 = {__Pyx_NAMESTR("inner_join_indexer_int64"), (PyCFunction)__pyx_pw_6pandas_5algos_493inner_join_indexer_int64, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_5algos_492inner_join_indexer_int64)}; static PyObject *__pyx_pw_6pandas_5algos_493inner_join_indexer_int64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_left = 0; PyArrayObject *__pyx_v_right = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("inner_join_indexer_int64 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_left,&__pyx_n_s_right,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_left)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_right)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("inner_join_indexer_int64", 1, 2, 2, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8723; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "inner_join_indexer_int64") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8723; __pyx_clineno = __LINE__; goto __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_left = ((PyArrayObject *)values[0]); __pyx_v_right = ((PyArrayObject *)values[1]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("inner_join_indexer_int64", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8723; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.inner_join_indexer_int64", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_left), __pyx_ptype_5numpy_ndarray, 1, "left", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8723; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_right), __pyx_ptype_5numpy_ndarray, 1, "right", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8724; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_492inner_join_indexer_int64(__pyx_self, __pyx_v_left, __pyx_v_right); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5algos_492inner_join_indexer_int64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_left, PyArrayObject *__pyx_v_right) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_nright; Py_ssize_t __pyx_v_nleft; Py_ssize_t __pyx_v_count; __pyx_t_5numpy_int64_t __pyx_v_lval; __pyx_t_5numpy_int64_t __pyx_v_rval; PyArrayObject *__pyx_v_lindexer = 0; PyArrayObject *__pyx_v_rindexer = 0; PyArrayObject *__pyx_v_result = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_left; __Pyx_Buffer __pyx_pybuffer_left; __Pyx_LocalBuf_ND __pyx_pybuffernd_lindexer; __Pyx_Buffer __pyx_pybuffer_lindexer; __Pyx_LocalBuf_ND __pyx_pybuffernd_result; __Pyx_Buffer __pyx_pybuffer_result; __Pyx_LocalBuf_ND __pyx_pybuffernd_right; __Pyx_Buffer __pyx_pybuffer_right; __Pyx_LocalBuf_ND __pyx_pybuffernd_rindexer; __Pyx_Buffer __pyx_pybuffer_rindexer; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; int __pyx_t_2; int __pyx_t_3; int __pyx_t_4; Py_ssize_t __pyx_t_5; Py_ssize_t __pyx_t_6; Py_ssize_t __pyx_t_7; Py_ssize_t __pyx_t_8; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; PyObject *__pyx_t_11 = NULL; PyObject *__pyx_t_12 = NULL; PyObject *__pyx_t_13 = NULL; PyArrayObject *__pyx_t_14 = NULL; int __pyx_t_15; PyObject *__pyx_t_16 = NULL; PyObject *__pyx_t_17 = NULL; PyObject *__pyx_t_18 = NULL; PyArrayObject *__pyx_t_19 = NULL; 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("inner_join_indexer_int64", 0); __pyx_pybuffer_lindexer.pybuffer.buf = NULL; __pyx_pybuffer_lindexer.refcount = 0; __pyx_pybuffernd_lindexer.data = NULL; __pyx_pybuffernd_lindexer.rcbuffer = &__pyx_pybuffer_lindexer; __pyx_pybuffer_rindexer.pybuffer.buf = NULL; __pyx_pybuffer_rindexer.refcount = 0; __pyx_pybuffernd_rindexer.data = NULL; __pyx_pybuffernd_rindexer.rcbuffer = &__pyx_pybuffer_rindexer; __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_left.pybuffer.buf = NULL; __pyx_pybuffer_left.refcount = 0; __pyx_pybuffernd_left.data = NULL; __pyx_pybuffernd_left.rcbuffer = &__pyx_pybuffer_left; __pyx_pybuffer_right.pybuffer.buf = NULL; __pyx_pybuffer_right.refcount = 0; __pyx_pybuffernd_right.data = NULL; __pyx_pybuffernd_right.rcbuffer = &__pyx_pybuffer_right; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_left.rcbuffer->pybuffer, (PyObject*)__pyx_v_left, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8723; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_left.diminfo[0].strides = __pyx_pybuffernd_left.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_left.diminfo[0].shape = __pyx_pybuffernd_left.rcbuffer->pybuffer.shape[0]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_right.rcbuffer->pybuffer, (PyObject*)__pyx_v_right, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8723; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_right.diminfo[0].strides = __pyx_pybuffernd_right.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_right.diminfo[0].shape = __pyx_pybuffernd_right.rcbuffer->pybuffer.shape[0]; /* "pandas/src/generated.pyx":8734 * ndarray[int64_t] result * * nleft = len(left) # <<<<<<<<<<<<<< * nright = len(right) * */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_left)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8734; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_nleft = __pyx_t_1; /* "pandas/src/generated.pyx":8735 * * nleft = len(left) * nright = len(right) # <<<<<<<<<<<<<< * * i = 0 */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_right)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8735; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_nright = __pyx_t_1; /* "pandas/src/generated.pyx":8737 * nright = len(right) * * i = 0 # <<<<<<<<<<<<<< * j = 0 * count = 0 */ __pyx_v_i = 0; /* "pandas/src/generated.pyx":8738 * * i = 0 * j = 0 # <<<<<<<<<<<<<< * count = 0 * if nleft > 0 and nright > 0: */ __pyx_v_j = 0; /* "pandas/src/generated.pyx":8739 * i = 0 * j = 0 * count = 0 # <<<<<<<<<<<<<< * if nleft > 0 and nright > 0: * while True: */ __pyx_v_count = 0; /* "pandas/src/generated.pyx":8740 * j = 0 * count = 0 * if nleft > 0 and nright > 0: # <<<<<<<<<<<<<< * while True: * if i == nleft: */ __pyx_t_2 = ((__pyx_v_nleft > 0) != 0); if (__pyx_t_2) { __pyx_t_3 = ((__pyx_v_nright > 0) != 0); __pyx_t_4 = __pyx_t_3; } else { __pyx_t_4 = __pyx_t_2; } if (__pyx_t_4) { /* "pandas/src/generated.pyx":8741 * count = 0 * if nleft > 0 and nright > 0: * while True: # <<<<<<<<<<<<<< * if i == nleft: * break */ while (1) { /* "pandas/src/generated.pyx":8742 * if nleft > 0 and nright > 0: * while True: * if i == nleft: # <<<<<<<<<<<<<< * break * if j == nright: */ __pyx_t_4 = ((__pyx_v_i == __pyx_v_nleft) != 0); if (__pyx_t_4) { /* "pandas/src/generated.pyx":8743 * while True: * if i == nleft: * break # <<<<<<<<<<<<<< * if j == nright: * break */ goto __pyx_L5_break; } /* "pandas/src/generated.pyx":8744 * if i == nleft: * break * if j == nright: # <<<<<<<<<<<<<< * break * */ __pyx_t_4 = ((__pyx_v_j == __pyx_v_nright) != 0); if (__pyx_t_4) { /* "pandas/src/generated.pyx":8745 * break * if j == nright: * break # <<<<<<<<<<<<<< * * lval = left[i] */ goto __pyx_L5_break; } /* "pandas/src/generated.pyx":8747 * break * * lval = left[i] # <<<<<<<<<<<<<< * rval = right[j] * if lval == rval: */ __pyx_t_1 = __pyx_v_i; __pyx_v_lval = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_left.rcbuffer->pybuffer.buf, __pyx_t_1, __pyx_pybuffernd_left.diminfo[0].strides)); /* "pandas/src/generated.pyx":8748 * * lval = left[i] * rval = right[j] # <<<<<<<<<<<<<< * if lval == rval: * count += 1 */ __pyx_t_5 = __pyx_v_j; __pyx_v_rval = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_right.rcbuffer->pybuffer.buf, __pyx_t_5, __pyx_pybuffernd_right.diminfo[0].strides)); /* "pandas/src/generated.pyx":8749 * lval = left[i] * rval = right[j] * if lval == rval: # <<<<<<<<<<<<<< * count += 1 * if i < nleft - 1: */ __pyx_t_4 = ((__pyx_v_lval == __pyx_v_rval) != 0); if (__pyx_t_4) { /* "pandas/src/generated.pyx":8750 * rval = right[j] * if lval == rval: * count += 1 # <<<<<<<<<<<<<< * if i < nleft - 1: * if j < nright - 1 and right[j + 1] == rval: */ __pyx_v_count = (__pyx_v_count + 1); /* "pandas/src/generated.pyx":8751 * if lval == rval: * count += 1 * if i < nleft - 1: # <<<<<<<<<<<<<< * if j < nright - 1 and right[j + 1] == rval: * j += 1 */ __pyx_t_4 = ((__pyx_v_i < (__pyx_v_nleft - 1)) != 0); if (__pyx_t_4) { /* "pandas/src/generated.pyx":8752 * count += 1 * if i < nleft - 1: * if j < nright - 1 and right[j + 1] == rval: # <<<<<<<<<<<<<< * j += 1 * else: */ __pyx_t_4 = ((__pyx_v_j < (__pyx_v_nright - 1)) != 0); if (__pyx_t_4) { __pyx_t_6 = (__pyx_v_j + 1); __pyx_t_2 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_right.rcbuffer->pybuffer.buf, __pyx_t_6, __pyx_pybuffernd_right.diminfo[0].strides)) == __pyx_v_rval) != 0); __pyx_t_3 = __pyx_t_2; } else { __pyx_t_3 = __pyx_t_4; } if (__pyx_t_3) { /* "pandas/src/generated.pyx":8753 * if i < nleft - 1: * if j < nright - 1 and right[j + 1] == rval: * j += 1 # <<<<<<<<<<<<<< * else: * i += 1 */ __pyx_v_j = (__pyx_v_j + 1); goto __pyx_L10; } /*else*/ { /* "pandas/src/generated.pyx":8755 * j += 1 * else: * i += 1 # <<<<<<<<<<<<<< * if left[i] != rval: * j += 1 */ __pyx_v_i = (__pyx_v_i + 1); /* "pandas/src/generated.pyx":8756 * else: * i += 1 * if left[i] != rval: # <<<<<<<<<<<<<< * j += 1 * elif j < nright - 1: */ __pyx_t_7 = __pyx_v_i; __pyx_t_3 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_left.rcbuffer->pybuffer.buf, __pyx_t_7, __pyx_pybuffernd_left.diminfo[0].strides)) != __pyx_v_rval) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":8757 * i += 1 * if left[i] != rval: * j += 1 # <<<<<<<<<<<<<< * elif j < nright - 1: * j += 1 */ __pyx_v_j = (__pyx_v_j + 1); goto __pyx_L11; } __pyx_L11:; } __pyx_L10:; goto __pyx_L9; } /* "pandas/src/generated.pyx":8758 * if left[i] != rval: * j += 1 * elif j < nright - 1: # <<<<<<<<<<<<<< * j += 1 * if lval != right[j]: */ __pyx_t_3 = ((__pyx_v_j < (__pyx_v_nright - 1)) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":8759 * j += 1 * elif j < nright - 1: * j += 1 # <<<<<<<<<<<<<< * if lval != right[j]: * i += 1 */ __pyx_v_j = (__pyx_v_j + 1); /* "pandas/src/generated.pyx":8760 * elif j < nright - 1: * j += 1 * if lval != right[j]: # <<<<<<<<<<<<<< * i += 1 * else: */ __pyx_t_8 = __pyx_v_j; __pyx_t_3 = ((__pyx_v_lval != (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_right.rcbuffer->pybuffer.buf, __pyx_t_8, __pyx_pybuffernd_right.diminfo[0].strides))) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":8761 * j += 1 * if lval != right[j]: * i += 1 # <<<<<<<<<<<<<< * else: * # end of the road */ __pyx_v_i = (__pyx_v_i + 1); goto __pyx_L12; } __pyx_L12:; goto __pyx_L9; } /*else*/ { /* "pandas/src/generated.pyx":8764 * else: * # end of the road * break # <<<<<<<<<<<<<< * elif lval < rval: * i += 1 */ goto __pyx_L5_break; } __pyx_L9:; goto __pyx_L8; } /* "pandas/src/generated.pyx":8765 * # end of the road * break * elif lval < rval: # <<<<<<<<<<<<<< * i += 1 * else: */ __pyx_t_3 = ((__pyx_v_lval < __pyx_v_rval) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":8766 * break * elif lval < rval: * i += 1 # <<<<<<<<<<<<<< * else: * j += 1 */ __pyx_v_i = (__pyx_v_i + 1); goto __pyx_L8; } /*else*/ { /* "pandas/src/generated.pyx":8768 * i += 1 * else: * j += 1 # <<<<<<<<<<<<<< * * # do it again now that result size is known */ __pyx_v_j = (__pyx_v_j + 1); } __pyx_L8:; } __pyx_L5_break:; goto __pyx_L3; } __pyx_L3:; /* "pandas/src/generated.pyx":8772 * # do it again now that result size is known * * lindexer = np.empty(count, dtype=np.int64) # <<<<<<<<<<<<<< * rindexer = np.empty(count, dtype=np.int64) * result = np.empty(count, dtype=np.int64) */ __pyx_t_9 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8772; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_empty); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8772; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_9 = PyInt_FromSsize_t(__pyx_v_count); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8772; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_t_11 = PyTuple_New(1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8772; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_9); __Pyx_GIVEREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_9 = PyDict_New(); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8772; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_t_12 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8772; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_int64); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8772; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_dtype, __pyx_t_13) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8772; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_13 = PyObject_Call(__pyx_t_10, __pyx_t_11, __pyx_t_9); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8772; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; if (!(likely(((__pyx_t_13) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_13, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8772; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_14 = ((PyArrayObject *)__pyx_t_13); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_lindexer.rcbuffer->pybuffer); __pyx_t_15 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_lindexer.rcbuffer->pybuffer, (PyObject*)__pyx_t_14, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_15 < 0)) { PyErr_Fetch(&__pyx_t_16, &__pyx_t_17, &__pyx_t_18); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_lindexer.rcbuffer->pybuffer, (PyObject*)__pyx_v_lindexer, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_16); Py_XDECREF(__pyx_t_17); Py_XDECREF(__pyx_t_18); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_16, __pyx_t_17, __pyx_t_18); } } __pyx_pybuffernd_lindexer.diminfo[0].strides = __pyx_pybuffernd_lindexer.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_lindexer.diminfo[0].shape = __pyx_pybuffernd_lindexer.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_15 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8772; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_14 = 0; __pyx_v_lindexer = ((PyArrayObject *)__pyx_t_13); __pyx_t_13 = 0; /* "pandas/src/generated.pyx":8773 * * lindexer = np.empty(count, dtype=np.int64) * rindexer = np.empty(count, dtype=np.int64) # <<<<<<<<<<<<<< * result = np.empty(count, dtype=np.int64) * */ __pyx_t_13 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8773; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_13, __pyx_n_s_empty); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8773; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_13 = PyInt_FromSsize_t(__pyx_v_count); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8773; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __pyx_t_11 = PyTuple_New(1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8773; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_13); __Pyx_GIVEREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_13 = PyDict_New(); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8773; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __pyx_t_10 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8773; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_int64); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8773; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; if (PyDict_SetItem(__pyx_t_13, __pyx_n_s_dtype, __pyx_t_12) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8773; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __pyx_t_12 = PyObject_Call(__pyx_t_9, __pyx_t_11, __pyx_t_13); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8773; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; if (!(likely(((__pyx_t_12) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_12, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8773; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_14 = ((PyArrayObject *)__pyx_t_12); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_rindexer.rcbuffer->pybuffer); __pyx_t_15 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_rindexer.rcbuffer->pybuffer, (PyObject*)__pyx_t_14, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_15 < 0)) { PyErr_Fetch(&__pyx_t_18, &__pyx_t_17, &__pyx_t_16); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_rindexer.rcbuffer->pybuffer, (PyObject*)__pyx_v_rindexer, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_18); Py_XDECREF(__pyx_t_17); Py_XDECREF(__pyx_t_16); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_18, __pyx_t_17, __pyx_t_16); } } __pyx_pybuffernd_rindexer.diminfo[0].strides = __pyx_pybuffernd_rindexer.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_rindexer.diminfo[0].shape = __pyx_pybuffernd_rindexer.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_15 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8773; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_14 = 0; __pyx_v_rindexer = ((PyArrayObject *)__pyx_t_12); __pyx_t_12 = 0; /* "pandas/src/generated.pyx":8774 * lindexer = np.empty(count, dtype=np.int64) * rindexer = np.empty(count, dtype=np.int64) * result = np.empty(count, dtype=np.int64) # <<<<<<<<<<<<<< * * i = 0 */ __pyx_t_12 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8774; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_empty); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8774; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __pyx_t_12 = PyInt_FromSsize_t(__pyx_v_count); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8774; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __pyx_t_11 = PyTuple_New(1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8774; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_12); __Pyx_GIVEREF(__pyx_t_12); __pyx_t_12 = 0; __pyx_t_12 = PyDict_New(); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8774; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __pyx_t_9 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8774; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_int64); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8774; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; if (PyDict_SetItem(__pyx_t_12, __pyx_n_s_dtype, __pyx_t_10) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8774; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_t_10 = PyObject_Call(__pyx_t_13, __pyx_t_11, __pyx_t_12); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8774; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; if (!(likely(((__pyx_t_10) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_10, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8774; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_19 = ((PyArrayObject *)__pyx_t_10); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __pyx_t_15 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_t_19, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_15 < 0)) { PyErr_Fetch(&__pyx_t_16, &__pyx_t_17, &__pyx_t_18); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_v_result, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_16); Py_XDECREF(__pyx_t_17); Py_XDECREF(__pyx_t_18); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_16, __pyx_t_17, __pyx_t_18); } } __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_15 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8774; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_19 = 0; __pyx_v_result = ((PyArrayObject *)__pyx_t_10); __pyx_t_10 = 0; /* "pandas/src/generated.pyx":8776 * result = np.empty(count, dtype=np.int64) * * i = 0 # <<<<<<<<<<<<<< * j = 0 * count = 0 */ __pyx_v_i = 0; /* "pandas/src/generated.pyx":8777 * * i = 0 * j = 0 # <<<<<<<<<<<<<< * count = 0 * if nleft > 0 and nright > 0: */ __pyx_v_j = 0; /* "pandas/src/generated.pyx":8778 * i = 0 * j = 0 * count = 0 # <<<<<<<<<<<<<< * if nleft > 0 and nright > 0: * while True: */ __pyx_v_count = 0; /* "pandas/src/generated.pyx":8779 * j = 0 * count = 0 * if nleft > 0 and nright > 0: # <<<<<<<<<<<<<< * while True: * if i == nleft: */ __pyx_t_3 = ((__pyx_v_nleft > 0) != 0); if (__pyx_t_3) { __pyx_t_4 = ((__pyx_v_nright > 0) != 0); __pyx_t_2 = __pyx_t_4; } else { __pyx_t_2 = __pyx_t_3; } if (__pyx_t_2) { /* "pandas/src/generated.pyx":8780 * count = 0 * if nleft > 0 and nright > 0: * while True: # <<<<<<<<<<<<<< * if i == nleft: * break */ while (1) { /* "pandas/src/generated.pyx":8781 * if nleft > 0 and nright > 0: * while True: * if i == nleft: # <<<<<<<<<<<<<< * break * if j == nright: */ __pyx_t_2 = ((__pyx_v_i == __pyx_v_nleft) != 0); if (__pyx_t_2) { /* "pandas/src/generated.pyx":8782 * while True: * if i == nleft: * break # <<<<<<<<<<<<<< * if j == nright: * break */ goto __pyx_L15_break; } /* "pandas/src/generated.pyx":8783 * if i == nleft: * break * if j == nright: # <<<<<<<<<<<<<< * break * */ __pyx_t_2 = ((__pyx_v_j == __pyx_v_nright) != 0); if (__pyx_t_2) { /* "pandas/src/generated.pyx":8784 * break * if j == nright: * break # <<<<<<<<<<<<<< * * lval = left[i] */ goto __pyx_L15_break; } /* "pandas/src/generated.pyx":8786 * break * * lval = left[i] # <<<<<<<<<<<<<< * rval = right[j] * if lval == rval: */ __pyx_t_20 = __pyx_v_i; __pyx_v_lval = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_left.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_left.diminfo[0].strides)); /* "pandas/src/generated.pyx":8787 * * lval = left[i] * rval = right[j] # <<<<<<<<<<<<<< * if lval == rval: * lindexer[count] = i */ __pyx_t_21 = __pyx_v_j; __pyx_v_rval = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_right.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_right.diminfo[0].strides)); /* "pandas/src/generated.pyx":8788 * lval = left[i] * rval = right[j] * if lval == rval: # <<<<<<<<<<<<<< * lindexer[count] = i * rindexer[count] = j */ __pyx_t_2 = ((__pyx_v_lval == __pyx_v_rval) != 0); if (__pyx_t_2) { /* "pandas/src/generated.pyx":8789 * rval = right[j] * if lval == rval: * lindexer[count] = i # <<<<<<<<<<<<<< * rindexer[count] = j * result[count] = rval */ __pyx_t_22 = __pyx_v_count; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_lindexer.rcbuffer->pybuffer.buf, __pyx_t_22, __pyx_pybuffernd_lindexer.diminfo[0].strides) = __pyx_v_i; /* "pandas/src/generated.pyx":8790 * if lval == rval: * lindexer[count] = i * rindexer[count] = j # <<<<<<<<<<<<<< * result[count] = rval * count += 1 */ __pyx_t_23 = __pyx_v_count; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_rindexer.rcbuffer->pybuffer.buf, __pyx_t_23, __pyx_pybuffernd_rindexer.diminfo[0].strides) = __pyx_v_j; /* "pandas/src/generated.pyx":8791 * lindexer[count] = i * rindexer[count] = j * result[count] = rval # <<<<<<<<<<<<<< * count += 1 * if i < nleft - 1: */ __pyx_t_24 = __pyx_v_count; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_24, __pyx_pybuffernd_result.diminfo[0].strides) = __pyx_v_rval; /* "pandas/src/generated.pyx":8792 * rindexer[count] = j * result[count] = rval * count += 1 # <<<<<<<<<<<<<< * if i < nleft - 1: * if j < nright - 1 and right[j + 1] == rval: */ __pyx_v_count = (__pyx_v_count + 1); /* "pandas/src/generated.pyx":8793 * result[count] = rval * count += 1 * if i < nleft - 1: # <<<<<<<<<<<<<< * if j < nright - 1 and right[j + 1] == rval: * j += 1 */ __pyx_t_2 = ((__pyx_v_i < (__pyx_v_nleft - 1)) != 0); if (__pyx_t_2) { /* "pandas/src/generated.pyx":8794 * count += 1 * if i < nleft - 1: * if j < nright - 1 and right[j + 1] == rval: # <<<<<<<<<<<<<< * j += 1 * else: */ __pyx_t_2 = ((__pyx_v_j < (__pyx_v_nright - 1)) != 0); if (__pyx_t_2) { __pyx_t_25 = (__pyx_v_j + 1); __pyx_t_3 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_right.rcbuffer->pybuffer.buf, __pyx_t_25, __pyx_pybuffernd_right.diminfo[0].strides)) == __pyx_v_rval) != 0); __pyx_t_4 = __pyx_t_3; } else { __pyx_t_4 = __pyx_t_2; } if (__pyx_t_4) { /* "pandas/src/generated.pyx":8795 * if i < nleft - 1: * if j < nright - 1 and right[j + 1] == rval: * j += 1 # <<<<<<<<<<<<<< * else: * i += 1 */ __pyx_v_j = (__pyx_v_j + 1); goto __pyx_L20; } /*else*/ { /* "pandas/src/generated.pyx":8797 * j += 1 * else: * i += 1 # <<<<<<<<<<<<<< * if left[i] != rval: * j += 1 */ __pyx_v_i = (__pyx_v_i + 1); /* "pandas/src/generated.pyx":8798 * else: * i += 1 * if left[i] != rval: # <<<<<<<<<<<<<< * j += 1 * elif j < nright - 1: */ __pyx_t_26 = __pyx_v_i; __pyx_t_4 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_left.rcbuffer->pybuffer.buf, __pyx_t_26, __pyx_pybuffernd_left.diminfo[0].strides)) != __pyx_v_rval) != 0); if (__pyx_t_4) { /* "pandas/src/generated.pyx":8799 * i += 1 * if left[i] != rval: * j += 1 # <<<<<<<<<<<<<< * elif j < nright - 1: * j += 1 */ __pyx_v_j = (__pyx_v_j + 1); goto __pyx_L21; } __pyx_L21:; } __pyx_L20:; goto __pyx_L19; } /* "pandas/src/generated.pyx":8800 * if left[i] != rval: * j += 1 * elif j < nright - 1: # <<<<<<<<<<<<<< * j += 1 * if lval != right[j]: */ __pyx_t_4 = ((__pyx_v_j < (__pyx_v_nright - 1)) != 0); if (__pyx_t_4) { /* "pandas/src/generated.pyx":8801 * j += 1 * elif j < nright - 1: * j += 1 # <<<<<<<<<<<<<< * if lval != right[j]: * i += 1 */ __pyx_v_j = (__pyx_v_j + 1); /* "pandas/src/generated.pyx":8802 * elif j < nright - 1: * j += 1 * if lval != right[j]: # <<<<<<<<<<<<<< * i += 1 * else: */ __pyx_t_27 = __pyx_v_j; __pyx_t_4 = ((__pyx_v_lval != (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_right.rcbuffer->pybuffer.buf, __pyx_t_27, __pyx_pybuffernd_right.diminfo[0].strides))) != 0); if (__pyx_t_4) { /* "pandas/src/generated.pyx":8803 * j += 1 * if lval != right[j]: * i += 1 # <<<<<<<<<<<<<< * else: * # end of the road */ __pyx_v_i = (__pyx_v_i + 1); goto __pyx_L22; } __pyx_L22:; goto __pyx_L19; } /*else*/ { /* "pandas/src/generated.pyx":8806 * else: * # end of the road * break # <<<<<<<<<<<<<< * elif lval < rval: * i += 1 */ goto __pyx_L15_break; } __pyx_L19:; goto __pyx_L18; } /* "pandas/src/generated.pyx":8807 * # end of the road * break * elif lval < rval: # <<<<<<<<<<<<<< * i += 1 * else: */ __pyx_t_4 = ((__pyx_v_lval < __pyx_v_rval) != 0); if (__pyx_t_4) { /* "pandas/src/generated.pyx":8808 * break * elif lval < rval: * i += 1 # <<<<<<<<<<<<<< * else: * j += 1 */ __pyx_v_i = (__pyx_v_i + 1); goto __pyx_L18; } /*else*/ { /* "pandas/src/generated.pyx":8810 * i += 1 * else: * j += 1 # <<<<<<<<<<<<<< * * return result, lindexer, rindexer */ __pyx_v_j = (__pyx_v_j + 1); } __pyx_L18:; } __pyx_L15_break:; goto __pyx_L13; } __pyx_L13:; /* "pandas/src/generated.pyx":8812 * j += 1 * * return result, lindexer, rindexer # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_10 = PyTuple_New(3); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8812; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_INCREF(((PyObject *)__pyx_v_result)); PyTuple_SET_ITEM(__pyx_t_10, 0, ((PyObject *)__pyx_v_result)); __Pyx_GIVEREF(((PyObject *)__pyx_v_result)); __Pyx_INCREF(((PyObject *)__pyx_v_lindexer)); PyTuple_SET_ITEM(__pyx_t_10, 1, ((PyObject *)__pyx_v_lindexer)); __Pyx_GIVEREF(((PyObject *)__pyx_v_lindexer)); __Pyx_INCREF(((PyObject *)__pyx_v_rindexer)); PyTuple_SET_ITEM(__pyx_t_10, 2, ((PyObject *)__pyx_v_rindexer)); __Pyx_GIVEREF(((PyObject *)__pyx_v_rindexer)); __pyx_r = __pyx_t_10; __pyx_t_10 = 0; goto __pyx_L0; /* "pandas/src/generated.pyx":8723 * @cython.wraparound(False) * @cython.boundscheck(False) * def inner_join_indexer_int64(ndarray[int64_t] left, # <<<<<<<<<<<<<< * ndarray[int64_t] right): * ''' */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_9); __Pyx_XDECREF(__pyx_t_10); __Pyx_XDECREF(__pyx_t_11); __Pyx_XDECREF(__pyx_t_12); __Pyx_XDECREF(__pyx_t_13); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_left.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_lindexer.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_right.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_rindexer.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.inner_join_indexer_int64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_left.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_lindexer.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_right.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_rindexer.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_lindexer); __Pyx_XDECREF((PyObject *)__pyx_v_rindexer); __Pyx_XDECREF((PyObject *)__pyx_v_result); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "datetime.pxd":126 * * * cdef inline _string_to_dts(object val, pandas_datetimestruct* dts): # <<<<<<<<<<<<<< * cdef int result * cdef char *tmp */ static CYTHON_INLINE PyObject *__pyx_f_8datetime__string_to_dts(PyObject *__pyx_v_val, pandas_datetimestruct *__pyx_v_dts) { int __pyx_v_result; char *__pyx_v_tmp; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; char *__pyx_t_3; Py_ssize_t __pyx_t_4; PyObject *__pyx_t_5 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_string_to_dts", 0); __Pyx_INCREF(__pyx_v_val); /* "datetime.pxd":130 * cdef char *tmp * * if PyUnicode_Check(val): # <<<<<<<<<<<<<< * val = PyUnicode_AsASCIIString(val); * */ __pyx_t_1 = (PyUnicode_Check(__pyx_v_val) != 0); if (__pyx_t_1) { /* "datetime.pxd":131 * * if PyUnicode_Check(val): * val = PyUnicode_AsASCIIString(val); # <<<<<<<<<<<<<< * * tmp = val */ __pyx_t_2 = PyUnicode_AsASCIIString(__pyx_v_val); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 131; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF_SET(__pyx_v_val, __pyx_t_2); __pyx_t_2 = 0; goto __pyx_L3; } __pyx_L3:; /* "datetime.pxd":133 * val = PyUnicode_AsASCIIString(val); * * tmp = val # <<<<<<<<<<<<<< * result = _cstring_to_dts(tmp, len(val), dts) * */ __pyx_t_3 = __Pyx_PyObject_AsString(__pyx_v_val); if (unlikely((!__pyx_t_3) && PyErr_Occurred())) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 133; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_tmp = __pyx_t_3; /* "datetime.pxd":134 * * tmp = val * result = _cstring_to_dts(tmp, len(val), dts) # <<<<<<<<<<<<<< * * if result == -1: */ __pyx_t_4 = PyObject_Length(__pyx_v_val); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 134; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_result = __pyx_f_8datetime__cstring_to_dts(__pyx_v_tmp, __pyx_t_4, __pyx_v_dts); /* "datetime.pxd":136 * result = _cstring_to_dts(tmp, len(val), dts) * * if result == -1: # <<<<<<<<<<<<<< * raise ValueError('Unable to parse %s' % str(val)) * */ __pyx_t_1 = ((__pyx_v_result == -1) != 0); if (__pyx_t_1) { /* "datetime.pxd":137 * * if result == -1: * raise ValueError('Unable to parse %s' % str(val)) # <<<<<<<<<<<<<< * * cdef inline int _cstring_to_dts(char *val, int length, */ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 137; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_val); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_val); __Pyx_GIVEREF(__pyx_v_val); __pyx_t_5 = PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), __pyx_t_2, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 137; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_Unable_to_parse_s, __pyx_t_5); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 137; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 137; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 137; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; {__pyx_filename = __pyx_f[4]; __pyx_lineno = 137; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } /* "datetime.pxd":126 * * * cdef inline _string_to_dts(object val, pandas_datetimestruct* dts): # <<<<<<<<<<<<<< * cdef int result * cdef char *tmp */ /* 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_5); __Pyx_AddTraceback("datetime._string_to_dts", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_val); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "datetime.pxd":139 * raise ValueError('Unable to parse %s' % str(val)) * * cdef inline int _cstring_to_dts(char *val, int length, # <<<<<<<<<<<<<< * pandas_datetimestruct* dts): * cdef: */ static CYTHON_INLINE int __pyx_f_8datetime__cstring_to_dts(char *__pyx_v_val, int __pyx_v_length, pandas_datetimestruct *__pyx_v_dts) { npy_bool __pyx_v_islocal; npy_bool __pyx_v_special; PANDAS_DATETIMEUNIT __pyx_v_out_bestunit; int __pyx_v_result; int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_cstring_to_dts", 0); /* "datetime.pxd":146 * int result * * result = parse_iso_8601_datetime(val, length, PANDAS_FR_ns, # <<<<<<<<<<<<<< * NPY_UNSAFE_CASTING, * dts, &islocal, &out_bestunit, &special) */ __pyx_v_result = parse_iso_8601_datetime(__pyx_v_val, __pyx_v_length, PANDAS_FR_ns, NPY_UNSAFE_CASTING, __pyx_v_dts, (&__pyx_v_islocal), (&__pyx_v_out_bestunit), (&__pyx_v_special)); /* "datetime.pxd":149 * NPY_UNSAFE_CASTING, * dts, &islocal, &out_bestunit, &special) * return result # <<<<<<<<<<<<<< * * */ __pyx_r = __pyx_v_result; goto __pyx_L0; /* "datetime.pxd":139 * raise ValueError('Unable to parse %s' % str(val)) * * cdef inline int _cstring_to_dts(char *val, int length, # <<<<<<<<<<<<<< * pandas_datetimestruct* dts): * cdef: */ /* function exit code */ __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "datetime.pxd":152 * * * cdef inline object _datetime64_to_datetime(int64_t val): # <<<<<<<<<<<<<< * cdef pandas_datetimestruct dts * pandas_datetime_to_datetimestruct(val, PANDAS_FR_ns, &dts) */ static CYTHON_INLINE PyObject *__pyx_f_8datetime__datetime64_to_datetime(__pyx_t_5numpy_int64_t __pyx_v_val) { pandas_datetimestruct __pyx_v_dts; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_datetime64_to_datetime", 0); /* "datetime.pxd":154 * cdef inline object _datetime64_to_datetime(int64_t val): * cdef pandas_datetimestruct dts * pandas_datetime_to_datetimestruct(val, PANDAS_FR_ns, &dts) # <<<<<<<<<<<<<< * return _dts_to_pydatetime(&dts) * */ pandas_datetime_to_datetimestruct(__pyx_v_val, PANDAS_FR_ns, (&__pyx_v_dts)); /* "datetime.pxd":155 * cdef pandas_datetimestruct dts * pandas_datetime_to_datetimestruct(val, PANDAS_FR_ns, &dts) * return _dts_to_pydatetime(&dts) # <<<<<<<<<<<<<< * * cdef inline object _dts_to_pydatetime(pandas_datetimestruct *dts): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_8datetime__dts_to_pydatetime((&__pyx_v_dts)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 155; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "datetime.pxd":152 * * * cdef inline object _datetime64_to_datetime(int64_t val): # <<<<<<<<<<<<<< * cdef pandas_datetimestruct dts * pandas_datetime_to_datetimestruct(val, PANDAS_FR_ns, &dts) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("datetime._datetime64_to_datetime", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "datetime.pxd":157 * return _dts_to_pydatetime(&dts) * * cdef inline object _dts_to_pydatetime(pandas_datetimestruct *dts): # <<<<<<<<<<<<<< * return PyDateTime_FromDateAndTime(dts.year, dts.month, * dts.day, dts.hour, */ static CYTHON_INLINE PyObject *__pyx_f_8datetime__dts_to_pydatetime(pandas_datetimestruct *__pyx_v_dts) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_dts_to_pydatetime", 0); /* "datetime.pxd":158 * * cdef inline object _dts_to_pydatetime(pandas_datetimestruct *dts): * return PyDateTime_FromDateAndTime(dts.year, dts.month, # <<<<<<<<<<<<<< * dts.day, dts.hour, * dts.min, dts.sec, dts.us) */ __Pyx_XDECREF(__pyx_r); /* "datetime.pxd":160 * return PyDateTime_FromDateAndTime(dts.year, dts.month, * dts.day, dts.hour, * dts.min, dts.sec, dts.us) # <<<<<<<<<<<<<< * * cdef inline int64_t _pydatetime_to_dts(object val, pandas_datetimestruct *dts): */ __pyx_t_1 = PyDateTime_FromDateAndTime(__pyx_v_dts->year, __pyx_v_dts->month, __pyx_v_dts->day, __pyx_v_dts->hour, __pyx_v_dts->min, __pyx_v_dts->sec, __pyx_v_dts->us); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 158; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); /* "datetime.pxd":158 * * cdef inline object _dts_to_pydatetime(pandas_datetimestruct *dts): * return PyDateTime_FromDateAndTime(dts.year, dts.month, # <<<<<<<<<<<<<< * dts.day, dts.hour, * dts.min, dts.sec, dts.us) */ __Pyx_INCREF(((PyObject *)__pyx_t_1)); __pyx_r = __pyx_t_1; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; /* "datetime.pxd":157 * return _dts_to_pydatetime(&dts) * * cdef inline object _dts_to_pydatetime(pandas_datetimestruct *dts): # <<<<<<<<<<<<<< * return PyDateTime_FromDateAndTime(dts.year, dts.month, * dts.day, dts.hour, */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("datetime._dts_to_pydatetime", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "datetime.pxd":162 * dts.min, dts.sec, dts.us) * * cdef inline int64_t _pydatetime_to_dts(object val, pandas_datetimestruct *dts): # <<<<<<<<<<<<<< * dts.year = PyDateTime_GET_YEAR(val) * dts.month = PyDateTime_GET_MONTH(val) */ static CYTHON_INLINE __pyx_t_5numpy_int64_t __pyx_f_8datetime__pydatetime_to_dts(PyObject *__pyx_v_val, pandas_datetimestruct *__pyx_v_dts) { __pyx_t_5numpy_int64_t __pyx_r; __Pyx_RefNannyDeclarations int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_pydatetime_to_dts", 0); /* "datetime.pxd":163 * * cdef inline int64_t _pydatetime_to_dts(object val, pandas_datetimestruct *dts): * dts.year = PyDateTime_GET_YEAR(val) # <<<<<<<<<<<<<< * dts.month = PyDateTime_GET_MONTH(val) * dts.day = PyDateTime_GET_DAY(val) */ if (!(likely(((__pyx_v_val) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_val, __pyx_ptype_8datetime_date))))) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 163; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_dts->year = PyDateTime_GET_YEAR(((PyDateTime_Date *)__pyx_v_val)); /* "datetime.pxd":164 * cdef inline int64_t _pydatetime_to_dts(object val, pandas_datetimestruct *dts): * dts.year = PyDateTime_GET_YEAR(val) * dts.month = PyDateTime_GET_MONTH(val) # <<<<<<<<<<<<<< * dts.day = PyDateTime_GET_DAY(val) * dts.hour = PyDateTime_DATE_GET_HOUR(val) */ if (!(likely(((__pyx_v_val) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_val, __pyx_ptype_8datetime_date))))) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 164; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_dts->month = PyDateTime_GET_MONTH(((PyDateTime_Date *)__pyx_v_val)); /* "datetime.pxd":165 * dts.year = PyDateTime_GET_YEAR(val) * dts.month = PyDateTime_GET_MONTH(val) * dts.day = PyDateTime_GET_DAY(val) # <<<<<<<<<<<<<< * dts.hour = PyDateTime_DATE_GET_HOUR(val) * dts.min = PyDateTime_DATE_GET_MINUTE(val) */ if (!(likely(((__pyx_v_val) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_val, __pyx_ptype_8datetime_date))))) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 165; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_dts->day = PyDateTime_GET_DAY(((PyDateTime_Date *)__pyx_v_val)); /* "datetime.pxd":166 * dts.month = PyDateTime_GET_MONTH(val) * dts.day = PyDateTime_GET_DAY(val) * dts.hour = PyDateTime_DATE_GET_HOUR(val) # <<<<<<<<<<<<<< * dts.min = PyDateTime_DATE_GET_MINUTE(val) * dts.sec = PyDateTime_DATE_GET_SECOND(val) */ __pyx_v_dts->hour = PyDateTime_DATE_GET_HOUR(__pyx_v_val); /* "datetime.pxd":167 * dts.day = PyDateTime_GET_DAY(val) * dts.hour = PyDateTime_DATE_GET_HOUR(val) * dts.min = PyDateTime_DATE_GET_MINUTE(val) # <<<<<<<<<<<<<< * dts.sec = PyDateTime_DATE_GET_SECOND(val) * dts.us = PyDateTime_DATE_GET_MICROSECOND(val) */ __pyx_v_dts->min = PyDateTime_DATE_GET_MINUTE(__pyx_v_val); /* "datetime.pxd":168 * dts.hour = PyDateTime_DATE_GET_HOUR(val) * dts.min = PyDateTime_DATE_GET_MINUTE(val) * dts.sec = PyDateTime_DATE_GET_SECOND(val) # <<<<<<<<<<<<<< * dts.us = PyDateTime_DATE_GET_MICROSECOND(val) * dts.ps = dts.as = 0 */ __pyx_v_dts->sec = PyDateTime_DATE_GET_SECOND(__pyx_v_val); /* "datetime.pxd":169 * dts.min = PyDateTime_DATE_GET_MINUTE(val) * dts.sec = PyDateTime_DATE_GET_SECOND(val) * dts.us = PyDateTime_DATE_GET_MICROSECOND(val) # <<<<<<<<<<<<<< * dts.ps = dts.as = 0 * return pandas_datetimestruct_to_datetime(PANDAS_FR_ns, dts) */ __pyx_v_dts->us = PyDateTime_DATE_GET_MICROSECOND(__pyx_v_val); /* "datetime.pxd":170 * dts.sec = PyDateTime_DATE_GET_SECOND(val) * dts.us = PyDateTime_DATE_GET_MICROSECOND(val) * dts.ps = dts.as = 0 # <<<<<<<<<<<<<< * return pandas_datetimestruct_to_datetime(PANDAS_FR_ns, dts) * */ __pyx_v_dts->ps = 0; __pyx_v_dts->as = 0; /* "datetime.pxd":171 * dts.us = PyDateTime_DATE_GET_MICROSECOND(val) * dts.ps = dts.as = 0 * return pandas_datetimestruct_to_datetime(PANDAS_FR_ns, dts) # <<<<<<<<<<<<<< * * cdef inline int64_t _dtlike_to_datetime64(object val, */ __pyx_r = pandas_datetimestruct_to_datetime(PANDAS_FR_ns, __pyx_v_dts); goto __pyx_L0; /* "datetime.pxd":162 * dts.min, dts.sec, dts.us) * * cdef inline int64_t _pydatetime_to_dts(object val, pandas_datetimestruct *dts): # <<<<<<<<<<<<<< * dts.year = PyDateTime_GET_YEAR(val) * dts.month = PyDateTime_GET_MONTH(val) */ /* function exit code */ __pyx_L1_error:; __Pyx_WriteUnraisable("datetime._pydatetime_to_dts", __pyx_clineno, __pyx_lineno, __pyx_filename, 0); __pyx_r = 0; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "datetime.pxd":173 * return pandas_datetimestruct_to_datetime(PANDAS_FR_ns, dts) * * cdef inline int64_t _dtlike_to_datetime64(object val, # <<<<<<<<<<<<<< * pandas_datetimestruct *dts): * dts.year = val.year */ static CYTHON_INLINE __pyx_t_5numpy_int64_t __pyx_f_8datetime__dtlike_to_datetime64(PyObject *__pyx_v_val, pandas_datetimestruct *__pyx_v_dts) { __pyx_t_5numpy_int64_t __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; npy_int64 __pyx_t_2; npy_int32 __pyx_t_3; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_dtlike_to_datetime64", 0); /* "datetime.pxd":175 * cdef inline int64_t _dtlike_to_datetime64(object val, * pandas_datetimestruct *dts): * dts.year = val.year # <<<<<<<<<<<<<< * dts.month = val.month * dts.day = val.day */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_val, __pyx_n_s_year); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 175; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyInt_As_npy_int64(__pyx_t_1); if (unlikely((__pyx_t_2 == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 175; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_dts->year = __pyx_t_2; /* "datetime.pxd":176 * pandas_datetimestruct *dts): * dts.year = val.year * dts.month = val.month # <<<<<<<<<<<<<< * dts.day = val.day * dts.hour = val.hour */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_val, __pyx_n_s_month); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 176; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __Pyx_PyInt_As_npy_int32(__pyx_t_1); if (unlikely((__pyx_t_3 == (npy_int32)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 176; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_dts->month = __pyx_t_3; /* "datetime.pxd":177 * dts.year = val.year * dts.month = val.month * dts.day = val.day # <<<<<<<<<<<<<< * dts.hour = val.hour * dts.min = val.minute */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_val, __pyx_n_s_day); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 177; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __Pyx_PyInt_As_npy_int32(__pyx_t_1); if (unlikely((__pyx_t_3 == (npy_int32)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 177; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_dts->day = __pyx_t_3; /* "datetime.pxd":178 * dts.month = val.month * dts.day = val.day * dts.hour = val.hour # <<<<<<<<<<<<<< * dts.min = val.minute * dts.sec = val.second */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_val, __pyx_n_s_hour); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 178; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __Pyx_PyInt_As_npy_int32(__pyx_t_1); if (unlikely((__pyx_t_3 == (npy_int32)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 178; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_dts->hour = __pyx_t_3; /* "datetime.pxd":179 * dts.day = val.day * dts.hour = val.hour * dts.min = val.minute # <<<<<<<<<<<<<< * dts.sec = val.second * dts.us = val.microsecond */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_val, __pyx_n_s_minute); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 179; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __Pyx_PyInt_As_npy_int32(__pyx_t_1); if (unlikely((__pyx_t_3 == (npy_int32)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 179; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_dts->min = __pyx_t_3; /* "datetime.pxd":180 * dts.hour = val.hour * dts.min = val.minute * dts.sec = val.second # <<<<<<<<<<<<<< * dts.us = val.microsecond * dts.ps = dts.as = 0 */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_val, __pyx_n_s_second); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __Pyx_PyInt_As_npy_int32(__pyx_t_1); if (unlikely((__pyx_t_3 == (npy_int32)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_dts->sec = __pyx_t_3; /* "datetime.pxd":181 * dts.min = val.minute * dts.sec = val.second * dts.us = val.microsecond # <<<<<<<<<<<<<< * dts.ps = dts.as = 0 * return pandas_datetimestruct_to_datetime(PANDAS_FR_ns, dts) */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_val, __pyx_n_s_microsecond); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 181; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __Pyx_PyInt_As_npy_int32(__pyx_t_1); if (unlikely((__pyx_t_3 == (npy_int32)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 181; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_dts->us = __pyx_t_3; /* "datetime.pxd":182 * dts.sec = val.second * dts.us = val.microsecond * dts.ps = dts.as = 0 # <<<<<<<<<<<<<< * return pandas_datetimestruct_to_datetime(PANDAS_FR_ns, dts) * */ __pyx_v_dts->ps = 0; __pyx_v_dts->as = 0; /* "datetime.pxd":183 * dts.us = val.microsecond * dts.ps = dts.as = 0 * return pandas_datetimestruct_to_datetime(PANDAS_FR_ns, dts) # <<<<<<<<<<<<<< * * cdef inline int64_t _date_to_datetime64(object val, */ __pyx_r = pandas_datetimestruct_to_datetime(PANDAS_FR_ns, __pyx_v_dts); goto __pyx_L0; /* "datetime.pxd":173 * return pandas_datetimestruct_to_datetime(PANDAS_FR_ns, dts) * * cdef inline int64_t _dtlike_to_datetime64(object val, # <<<<<<<<<<<<<< * pandas_datetimestruct *dts): * dts.year = val.year */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_WriteUnraisable("datetime._dtlike_to_datetime64", __pyx_clineno, __pyx_lineno, __pyx_filename, 0); __pyx_r = 0; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "datetime.pxd":185 * return pandas_datetimestruct_to_datetime(PANDAS_FR_ns, dts) * * cdef inline int64_t _date_to_datetime64(object val, # <<<<<<<<<<<<<< * pandas_datetimestruct *dts): * dts.year = PyDateTime_GET_YEAR(val) */ static CYTHON_INLINE __pyx_t_5numpy_int64_t __pyx_f_8datetime__date_to_datetime64(PyObject *__pyx_v_val, pandas_datetimestruct *__pyx_v_dts) { __pyx_t_5numpy_int64_t __pyx_r; __Pyx_RefNannyDeclarations int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_date_to_datetime64", 0); /* "datetime.pxd":187 * cdef inline int64_t _date_to_datetime64(object val, * pandas_datetimestruct *dts): * dts.year = PyDateTime_GET_YEAR(val) # <<<<<<<<<<<<<< * dts.month = PyDateTime_GET_MONTH(val) * dts.day = PyDateTime_GET_DAY(val) */ if (!(likely(((__pyx_v_val) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_val, __pyx_ptype_8datetime_date))))) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 187; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_dts->year = PyDateTime_GET_YEAR(((PyDateTime_Date *)__pyx_v_val)); /* "datetime.pxd":188 * pandas_datetimestruct *dts): * dts.year = PyDateTime_GET_YEAR(val) * dts.month = PyDateTime_GET_MONTH(val) # <<<<<<<<<<<<<< * dts.day = PyDateTime_GET_DAY(val) * dts.hour = dts.min = dts.sec = dts.us = 0 */ if (!(likely(((__pyx_v_val) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_val, __pyx_ptype_8datetime_date))))) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 188; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_dts->month = PyDateTime_GET_MONTH(((PyDateTime_Date *)__pyx_v_val)); /* "datetime.pxd":189 * dts.year = PyDateTime_GET_YEAR(val) * dts.month = PyDateTime_GET_MONTH(val) * dts.day = PyDateTime_GET_DAY(val) # <<<<<<<<<<<<<< * dts.hour = dts.min = dts.sec = dts.us = 0 * dts.ps = dts.as = 0 */ if (!(likely(((__pyx_v_val) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_val, __pyx_ptype_8datetime_date))))) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 189; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_dts->day = PyDateTime_GET_DAY(((PyDateTime_Date *)__pyx_v_val)); /* "datetime.pxd":190 * dts.month = PyDateTime_GET_MONTH(val) * dts.day = PyDateTime_GET_DAY(val) * dts.hour = dts.min = dts.sec = dts.us = 0 # <<<<<<<<<<<<<< * dts.ps = dts.as = 0 * return pandas_datetimestruct_to_datetime(PANDAS_FR_ns, dts) */ __pyx_v_dts->hour = 0; __pyx_v_dts->min = 0; __pyx_v_dts->sec = 0; __pyx_v_dts->us = 0; /* "datetime.pxd":191 * dts.day = PyDateTime_GET_DAY(val) * dts.hour = dts.min = dts.sec = dts.us = 0 * dts.ps = dts.as = 0 # <<<<<<<<<<<<<< * return pandas_datetimestruct_to_datetime(PANDAS_FR_ns, dts) * */ __pyx_v_dts->ps = 0; __pyx_v_dts->as = 0; /* "datetime.pxd":192 * dts.hour = dts.min = dts.sec = dts.us = 0 * dts.ps = dts.as = 0 * return pandas_datetimestruct_to_datetime(PANDAS_FR_ns, dts) # <<<<<<<<<<<<<< * */ __pyx_r = pandas_datetimestruct_to_datetime(PANDAS_FR_ns, __pyx_v_dts); goto __pyx_L0; /* "datetime.pxd":185 * return pandas_datetimestruct_to_datetime(PANDAS_FR_ns, dts) * * cdef inline int64_t _date_to_datetime64(object val, # <<<<<<<<<<<<<< * pandas_datetimestruct *dts): * dts.year = PyDateTime_GET_YEAR(val) */ /* function exit code */ __pyx_L1_error:; __Pyx_WriteUnraisable("datetime._date_to_datetime64", __pyx_clineno, __pyx_lineno, __pyx_filename, 0); __pyx_r = 0; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "numpy.pxd":196 * # 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 fullfill 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_copy_shape; 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_v_hasfields; int __pyx_r; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; int __pyx_t_5; int __pyx_t_6; int __pyx_t_7; PyObject *__pyx_t_8 = NULL; char *__pyx_t_9; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__getbuffer__", 0); if (__pyx_v_info != NULL) { __pyx_v_info->obj = Py_None; __Pyx_INCREF(Py_None); __Pyx_GIVEREF(__pyx_v_info->obj); } /* "numpy.pxd":202 * # of flags * * if info == NULL: return # <<<<<<<<<<<<<< * * cdef int copy_shape, i, ndim */ __pyx_t_1 = ((__pyx_v_info == NULL) != 0); if (__pyx_t_1) { __pyx_r = 0; goto __pyx_L0; } /* "numpy.pxd":205 * * cdef int copy_shape, i, ndim * cdef int endian_detector = 1 # <<<<<<<<<<<<<< * cdef bint little_endian = ((&endian_detector)[0] != 0) * */ __pyx_v_endian_detector = 1; /* "numpy.pxd":206 * cdef int copy_shape, 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); /* "numpy.pxd":208 * cdef bint little_endian = ((&endian_detector)[0] != 0) * * ndim = PyArray_NDIM(self) # <<<<<<<<<<<<<< * * if sizeof(npy_intp) != sizeof(Py_ssize_t): */ __pyx_v_ndim = PyArray_NDIM(__pyx_v_self); /* "numpy.pxd":210 * ndim = PyArray_NDIM(self) * * if sizeof(npy_intp) != sizeof(Py_ssize_t): # <<<<<<<<<<<<<< * copy_shape = 1 * else: */ __pyx_t_1 = (((sizeof(npy_intp)) != (sizeof(Py_ssize_t))) != 0); if (__pyx_t_1) { /* "numpy.pxd":211 * * if sizeof(npy_intp) != sizeof(Py_ssize_t): * copy_shape = 1 # <<<<<<<<<<<<<< * else: * copy_shape = 0 */ __pyx_v_copy_shape = 1; goto __pyx_L4; } /*else*/ { /* "numpy.pxd":213 * copy_shape = 1 * else: * copy_shape = 0 # <<<<<<<<<<<<<< * * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) */ __pyx_v_copy_shape = 0; } __pyx_L4:; /* "numpy.pxd":215 * copy_shape = 0 * * 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_1 = (((__pyx_v_flags & PyBUF_C_CONTIGUOUS) == PyBUF_C_CONTIGUOUS) != 0); if (__pyx_t_1) { /* "numpy.pxd":216 * * 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_3 = __pyx_t_2; } else { __pyx_t_3 = __pyx_t_1; } if (__pyx_t_3) { /* "numpy.pxd":217 * 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_4 = PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__195, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 217; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[5]; __pyx_lineno = 217; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } /* "numpy.pxd":219 * 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_3 = (((__pyx_v_flags & PyBUF_F_CONTIGUOUS) == PyBUF_F_CONTIGUOUS) != 0); if (__pyx_t_3) { /* "numpy.pxd":220 * * 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_1 = ((!(PyArray_CHKFLAGS(__pyx_v_self, NPY_F_CONTIGUOUS) != 0)) != 0); __pyx_t_2 = __pyx_t_1; } else { __pyx_t_2 = __pyx_t_3; } if (__pyx_t_2) { /* "numpy.pxd":221 * 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_4 = PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__196, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 221; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[5]; __pyx_lineno = 221; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } /* "numpy.pxd":223 * raise ValueError(u"ndarray is not Fortran contiguous") * * info.buf = PyArray_DATA(self) # <<<<<<<<<<<<<< * info.ndim = ndim * if copy_shape: */ __pyx_v_info->buf = PyArray_DATA(__pyx_v_self); /* "numpy.pxd":224 * * info.buf = PyArray_DATA(self) * info.ndim = ndim # <<<<<<<<<<<<<< * if copy_shape: * # Allocate new buffer for strides and shape info. */ __pyx_v_info->ndim = __pyx_v_ndim; /* "numpy.pxd":225 * info.buf = PyArray_DATA(self) * info.ndim = ndim * if copy_shape: # <<<<<<<<<<<<<< * # Allocate new buffer for strides and shape info. * # This is allocated as one block, strides first. */ __pyx_t_2 = (__pyx_v_copy_shape != 0); if (__pyx_t_2) { /* "numpy.pxd":228 * # Allocate new buffer for strides and shape info. * # This is allocated as one block, strides first. * info.strides = stdlib.malloc(sizeof(Py_ssize_t) * ndim * 2) # <<<<<<<<<<<<<< * info.shape = info.strides + ndim * for i in range(ndim): */ __pyx_v_info->strides = ((Py_ssize_t *)malloc((((sizeof(Py_ssize_t)) * ((size_t)__pyx_v_ndim)) * 2))); /* "numpy.pxd":229 * # This is allocated as one block, strides first. * info.strides = stdlib.malloc(sizeof(Py_ssize_t) * ndim * 2) * 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); /* "numpy.pxd":230 * info.strides = stdlib.malloc(sizeof(Py_ssize_t) * ndim * 2) * 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_5 = __pyx_v_ndim; for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) { __pyx_v_i = __pyx_t_6; /* "numpy.pxd":231 * 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]); /* "numpy.pxd":232 * 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]); } goto __pyx_L7; } /*else*/ { /* "numpy.pxd":234 * info.shape[i] = PyArray_DIMS(self)[i] * else: * info.strides = PyArray_STRIDES(self) # <<<<<<<<<<<<<< * info.shape = PyArray_DIMS(self) * info.suboffsets = NULL */ __pyx_v_info->strides = ((Py_ssize_t *)PyArray_STRIDES(__pyx_v_self)); /* "numpy.pxd":235 * 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_L7:; /* "numpy.pxd":236 * 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; /* "numpy.pxd":237 * 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); /* "numpy.pxd":238 * 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)); /* "numpy.pxd":241 * * cdef int t * cdef char* f = NULL # <<<<<<<<<<<<<< * cdef dtype descr = self.descr * cdef list stack */ __pyx_v_f = NULL; /* "numpy.pxd":242 * cdef int t * cdef char* f = NULL * cdef dtype descr = self.descr # <<<<<<<<<<<<<< * cdef list stack * cdef int offset */ __pyx_t_4 = ((PyObject *)__pyx_v_self->descr); __Pyx_INCREF(__pyx_t_4); __pyx_v_descr = ((PyArray_Descr *)__pyx_t_4); __pyx_t_4 = 0; /* "numpy.pxd":246 * cdef int offset * * cdef bint hasfields = PyDataType_HASFIELDS(descr) # <<<<<<<<<<<<<< * * if not hasfields and not copy_shape: */ __pyx_v_hasfields = PyDataType_HASFIELDS(__pyx_v_descr); /* "numpy.pxd":248 * cdef bint hasfields = PyDataType_HASFIELDS(descr) * * if not hasfields and not copy_shape: # <<<<<<<<<<<<<< * # do not call releasebuffer * info.obj = None */ __pyx_t_2 = ((!(__pyx_v_hasfields != 0)) != 0); if (__pyx_t_2) { __pyx_t_3 = ((!(__pyx_v_copy_shape != 0)) != 0); __pyx_t_1 = __pyx_t_3; } else { __pyx_t_1 = __pyx_t_2; } if (__pyx_t_1) { /* "numpy.pxd":250 * if not hasfields and not copy_shape: * # do not call releasebuffer * info.obj = None # <<<<<<<<<<<<<< * else: * # need to call releasebuffer */ __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_info->obj); __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = Py_None; goto __pyx_L10; } /*else*/ { /* "numpy.pxd":253 * else: * # need to call releasebuffer * info.obj = self # <<<<<<<<<<<<<< * * if not hasfields: */ __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); } __pyx_L10:; /* "numpy.pxd":255 * info.obj = self * * if not hasfields: # <<<<<<<<<<<<<< * t = descr.type_num * if ((descr.byteorder == '>' and little_endian) or */ __pyx_t_1 = ((!(__pyx_v_hasfields != 0)) != 0); if (__pyx_t_1) { /* "numpy.pxd":256 * * if not hasfields: * t = descr.type_num # <<<<<<<<<<<<<< * if ((descr.byteorder == '>' and little_endian) or * (descr.byteorder == '<' and not little_endian)): */ __pyx_t_5 = __pyx_v_descr->type_num; __pyx_v_t = __pyx_t_5; /* "numpy.pxd":257 * if not hasfields: * t = descr.type_num * if ((descr.byteorder == '>' and little_endian) or # <<<<<<<<<<<<<< * (descr.byteorder == '<' and not little_endian)): * raise ValueError(u"Non-native byte order not supported") */ __pyx_t_1 = ((__pyx_v_descr->byteorder == '>') != 0); if (__pyx_t_1) { __pyx_t_2 = (__pyx_v_little_endian != 0); } else { __pyx_t_2 = __pyx_t_1; } if (!__pyx_t_2) { /* "numpy.pxd":258 * t = descr.type_num * if ((descr.byteorder == '>' and little_endian) or * (descr.byteorder == '<' and not little_endian)): # <<<<<<<<<<<<<< * raise ValueError(u"Non-native byte order not supported") * if t == NPY_BYTE: f = "b" */ __pyx_t_1 = ((__pyx_v_descr->byteorder == '<') != 0); if (__pyx_t_1) { __pyx_t_3 = ((!(__pyx_v_little_endian != 0)) != 0); __pyx_t_7 = __pyx_t_3; } else { __pyx_t_7 = __pyx_t_1; } __pyx_t_1 = __pyx_t_7; } else { __pyx_t_1 = __pyx_t_2; } if (__pyx_t_1) { /* "numpy.pxd":259 * if ((descr.byteorder == '>' and little_endian) or * (descr.byteorder == '<' 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_4 = PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__197, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 259; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[5]; __pyx_lineno = 259; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } /* "numpy.pxd":276 * 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) */ switch (__pyx_v_t) { /* "numpy.pxd":260 * (descr.byteorder == '<' 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" */ case NPY_BYTE: __pyx_v_f = __pyx_k_b; break; /* "numpy.pxd":261 * 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 = __pyx_k_B; break; /* "numpy.pxd":262 * 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 = __pyx_k_h; break; /* "numpy.pxd":263 * 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 = __pyx_k_H; break; /* "numpy.pxd":264 * 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 = __pyx_k_i; break; /* "numpy.pxd":265 * 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 = __pyx_k_I; break; /* "numpy.pxd":266 * 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 = __pyx_k_l; break; /* "numpy.pxd":267 * 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 = __pyx_k_L; break; /* "numpy.pxd":268 * 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 = __pyx_k_q; break; /* "numpy.pxd":269 * 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 = __pyx_k_Q; break; /* "numpy.pxd":270 * 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 = __pyx_k_f; break; /* "numpy.pxd":271 * 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 = __pyx_k_d; break; /* "numpy.pxd":272 * 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 = __pyx_k_g; break; /* "numpy.pxd":273 * 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 = __pyx_k_Zf; break; /* "numpy.pxd":274 * 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 = __pyx_k_Zd; break; /* "numpy.pxd":275 * 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 = __pyx_k_Zg; break; /* "numpy.pxd":276 * 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 = __pyx_k_O; break; default: /* "numpy.pxd":278 * elif t == NPY_OBJECT: f = "O" * else: * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) # <<<<<<<<<<<<<< * info.format = f * return */ __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_t); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 278; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_8 = PyUnicode_Format(__pyx_kp_u_unknown_dtype_code_in_numpy_pxd, __pyx_t_4); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 278; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 278; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_8); __Pyx_GIVEREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_8 = PyObject_Call(__pyx_builtin_ValueError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 278; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_Raise(__pyx_t_8, 0, 0, 0); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; {__pyx_filename = __pyx_f[5]; __pyx_lineno = 278; __pyx_clineno = __LINE__; goto __pyx_L1_error;} break; } /* "numpy.pxd":279 * else: * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) * info.format = f # <<<<<<<<<<<<<< * return * else: */ __pyx_v_info->format = __pyx_v_f; /* "numpy.pxd":280 * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) * info.format = f * return # <<<<<<<<<<<<<< * else: * info.format = stdlib.malloc(_buffer_format_string_len) */ __pyx_r = 0; goto __pyx_L0; } /*else*/ { /* "numpy.pxd":282 * return * else: * info.format = stdlib.malloc(_buffer_format_string_len) # <<<<<<<<<<<<<< * info.format[0] = '^' # Native data types, manual alignment * offset = 0 */ __pyx_v_info->format = ((char *)malloc(255)); /* "numpy.pxd":283 * else: * info.format = stdlib.malloc(_buffer_format_string_len) * info.format[0] = '^' # Native data types, manual alignment # <<<<<<<<<<<<<< * offset = 0 * f = _util_dtypestring(descr, info.format + 1, */ (__pyx_v_info->format[0]) = '^'; /* "numpy.pxd":284 * info.format = stdlib.malloc(_buffer_format_string_len) * info.format[0] = '^' # Native data types, manual alignment * offset = 0 # <<<<<<<<<<<<<< * f = _util_dtypestring(descr, info.format + 1, * info.format + _buffer_format_string_len, */ __pyx_v_offset = 0; /* "numpy.pxd":285 * info.format[0] = '^' # Native data types, manual alignment * offset = 0 * f = _util_dtypestring(descr, info.format + 1, # <<<<<<<<<<<<<< * info.format + _buffer_format_string_len, * &offset) */ __pyx_t_9 = __pyx_f_5numpy__util_dtypestring(__pyx_v_descr, (__pyx_v_info->format + 1), (__pyx_v_info->format + 255), (&__pyx_v_offset)); if (unlikely(__pyx_t_9 == NULL)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 285; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_f = __pyx_t_9; /* "numpy.pxd":288 * info.format + _buffer_format_string_len, * &offset) * f[0] = 0 # Terminate format string # <<<<<<<<<<<<<< * * def __releasebuffer__(ndarray self, Py_buffer* info): */ (__pyx_v_f[0]) = 0; } /* "numpy.pxd":196 * # 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 fullfill the PEP. */ /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_8); __Pyx_AddTraceback("numpy.ndarray.__getbuffer__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; if (__pyx_v_info != NULL && __pyx_v_info->obj != NULL) { __Pyx_GOTREF(__pyx_v_info->obj); __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = NULL; } goto __pyx_L2; __pyx_L0:; if (__pyx_v_info != NULL && __pyx_v_info->obj == Py_None) { __Pyx_GOTREF(Py_None); __Pyx_DECREF(Py_None); __pyx_v_info->obj = NULL; } __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_descr); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "numpy.pxd":290 * f[0] = 0 # Terminate format string * * def __releasebuffer__(ndarray self, Py_buffer* info): # <<<<<<<<<<<<<< * if PyArray_HASFIELDS(self): * stdlib.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); /* "numpy.pxd":291 * * def __releasebuffer__(ndarray self, Py_buffer* info): * if PyArray_HASFIELDS(self): # <<<<<<<<<<<<<< * stdlib.free(info.format) * if sizeof(npy_intp) != sizeof(Py_ssize_t): */ __pyx_t_1 = (PyArray_HASFIELDS(__pyx_v_self) != 0); if (__pyx_t_1) { /* "numpy.pxd":292 * def __releasebuffer__(ndarray self, Py_buffer* info): * if PyArray_HASFIELDS(self): * stdlib.free(info.format) # <<<<<<<<<<<<<< * if sizeof(npy_intp) != sizeof(Py_ssize_t): * stdlib.free(info.strides) */ free(__pyx_v_info->format); goto __pyx_L3; } __pyx_L3:; /* "numpy.pxd":293 * if PyArray_HASFIELDS(self): * stdlib.free(info.format) * if sizeof(npy_intp) != sizeof(Py_ssize_t): # <<<<<<<<<<<<<< * stdlib.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) { /* "numpy.pxd":294 * stdlib.free(info.format) * if sizeof(npy_intp) != sizeof(Py_ssize_t): * stdlib.free(info.strides) # <<<<<<<<<<<<<< * # info.shape was stored after info.strides in the same block * */ free(__pyx_v_info->strides); goto __pyx_L4; } __pyx_L4:; /* "numpy.pxd":290 * f[0] = 0 # Terminate format string * * def __releasebuffer__(ndarray self, Py_buffer* info): # <<<<<<<<<<<<<< * if PyArray_HASFIELDS(self): * stdlib.free(info.format) */ /* function exit code */ __Pyx_RefNannyFinishContext(); } /* "numpy.pxd":772 * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PyArray_MultiIterNew1", 0); /* "numpy.pxd":773 * * 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_filename = __pyx_f[5]; __pyx_lineno = 773; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "numpy.pxd":772 * 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; } /* "numpy.pxd":775 * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PyArray_MultiIterNew2", 0); /* "numpy.pxd":776 * * 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_filename = __pyx_f[5]; __pyx_lineno = 776; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "numpy.pxd":775 * 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; } /* "numpy.pxd":778 * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PyArray_MultiIterNew3", 0); /* "numpy.pxd":779 * * 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_filename = __pyx_f[5]; __pyx_lineno = 779; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "numpy.pxd":778 * 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; } /* "numpy.pxd":781 * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PyArray_MultiIterNew4", 0); /* "numpy.pxd":782 * * 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_filename = __pyx_f[5]; __pyx_lineno = 782; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "numpy.pxd":781 * 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; } /* "numpy.pxd":784 * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PyArray_MultiIterNew5", 0); /* "numpy.pxd":785 * * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): * return PyArray_MultiIterNew(5, a, b, c, d, e) # <<<<<<<<<<<<<< * * cdef inline char* _util_dtypestring(dtype descr, char* f, char* end, int* offset) except NULL: */ __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_filename = __pyx_f[5]; __pyx_lineno = 785; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "numpy.pxd":784 * 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; } /* "numpy.pxd":787 * return PyArray_MultiIterNew(5, a, b, c, d, e) * * 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; PyObject *__pyx_t_5 = NULL; int __pyx_t_6; int __pyx_t_7; int __pyx_t_8; int __pyx_t_9; long __pyx_t_10; char *__pyx_t_11; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_util_dtypestring", 0); /* "numpy.pxd":794 * cdef int delta_offset * cdef tuple i * cdef int endian_detector = 1 # <<<<<<<<<<<<<< * cdef bint little_endian = ((&endian_detector)[0] != 0) * cdef tuple fields */ __pyx_v_endian_detector = 1; /* "numpy.pxd":795 * cdef tuple i * 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); /* "numpy.pxd":798 * 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_filename = __pyx_f[5]; __pyx_lineno = 798; __pyx_clineno = __LINE__; goto __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_COMPILING_IN_CPYTHON __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_filename = __pyx_f[5]; __pyx_lineno = 798; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 798; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif __Pyx_XDECREF_SET(__pyx_v_childname, __pyx_t_3); __pyx_t_3 = 0; /* "numpy.pxd":799 * * for childname in descr.names: * fields = descr.fields[childname] # <<<<<<<<<<<<<< * child, new_offset = fields * */ __pyx_t_3 = PyObject_GetItem(__pyx_v_descr->fields, __pyx_v_childname); if (unlikely(__pyx_t_3 == NULL)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 799; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[5]; __pyx_lineno = 799; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_XDECREF_SET(__pyx_v_fields, ((PyObject*)__pyx_t_3)); __pyx_t_3 = 0; /* "numpy.pxd":800 * 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; #if CYTHON_COMPILING_IN_CPYTHON Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); {__pyx_filename = __pyx_f[5]; __pyx_lineno = 800; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON __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_filename = __pyx_f[5]; __pyx_lineno = 800; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 800; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); #endif } else { __Pyx_RaiseNoneNotIterableError(); {__pyx_filename = __pyx_f[5]; __pyx_lineno = 800; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_dtype))))) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 800; __pyx_clineno = __LINE__; goto __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; /* "numpy.pxd":802 * 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_ptrdiff_t((__pyx_v_end - __pyx_v_f)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 802; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = __Pyx_PyInt_From_int((__pyx_v_offset[0])); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 802; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = PyNumber_Subtract(__pyx_v_new_offset, __pyx_t_3); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 802; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyNumber_Subtract(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 802; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyObject_RichCompare(__pyx_t_3, __pyx_int_15, Py_LT); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 802; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 802; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_6) { /* "numpy.pxd":803 * * if (end - f) - (new_offset - offset[0]) < 15: * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") # <<<<<<<<<<<<<< * * if ((child.byteorder == '>' and little_endian) or */ __pyx_t_5 = PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__198, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 803; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_Raise(__pyx_t_5, 0, 0, 0); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; {__pyx_filename = __pyx_f[5]; __pyx_lineno = 803; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } /* "numpy.pxd":805 * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") * * if ((child.byteorder == '>' and little_endian) or # <<<<<<<<<<<<<< * (child.byteorder == '<' and not little_endian)): * raise ValueError(u"Non-native byte order not supported") */ __pyx_t_6 = ((__pyx_v_child->byteorder == '>') != 0); if (__pyx_t_6) { __pyx_t_7 = (__pyx_v_little_endian != 0); } else { __pyx_t_7 = __pyx_t_6; } if (!__pyx_t_7) { /* "numpy.pxd":806 * * if ((child.byteorder == '>' and little_endian) or * (child.byteorder == '<' 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_6 = ((__pyx_v_child->byteorder == '<') != 0); if (__pyx_t_6) { __pyx_t_8 = ((!(__pyx_v_little_endian != 0)) != 0); __pyx_t_9 = __pyx_t_8; } else { __pyx_t_9 = __pyx_t_6; } __pyx_t_6 = __pyx_t_9; } else { __pyx_t_6 = __pyx_t_7; } if (__pyx_t_6) { /* "numpy.pxd":807 * if ((child.byteorder == '>' and little_endian) or * (child.byteorder == '<' 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_5 = PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__199, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 807; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_Raise(__pyx_t_5, 0, 0, 0); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; {__pyx_filename = __pyx_f[5]; __pyx_lineno = 807; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } /* "numpy.pxd":817 * * # Output padding bytes * while offset[0] < new_offset: # <<<<<<<<<<<<<< * f[0] = 120 # "x"; pad byte * f += 1 */ while (1) { __pyx_t_5 = __Pyx_PyInt_From_int((__pyx_v_offset[0])); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 817; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = PyObject_RichCompare(__pyx_t_5, __pyx_v_new_offset, Py_LT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 817; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 817; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (!__pyx_t_6) break; /* "numpy.pxd":818 * # Output padding bytes * while offset[0] < new_offset: * f[0] = 120 # "x"; pad byte # <<<<<<<<<<<<<< * f += 1 * offset[0] += 1 */ (__pyx_v_f[0]) = 120; /* "numpy.pxd":819 * while offset[0] < new_offset: * f[0] = 120 # "x"; pad byte * f += 1 # <<<<<<<<<<<<<< * offset[0] += 1 * */ __pyx_v_f = (__pyx_v_f + 1); /* "numpy.pxd":820 * f[0] = 120 # "x"; pad byte * f += 1 * offset[0] += 1 # <<<<<<<<<<<<<< * * offset[0] += child.itemsize */ __pyx_t_10 = 0; (__pyx_v_offset[__pyx_t_10]) = ((__pyx_v_offset[__pyx_t_10]) + 1); } /* "numpy.pxd":822 * offset[0] += 1 * * offset[0] += child.itemsize # <<<<<<<<<<<<<< * * if not PyDataType_HASFIELDS(child): */ __pyx_t_10 = 0; (__pyx_v_offset[__pyx_t_10]) = ((__pyx_v_offset[__pyx_t_10]) + __pyx_v_child->elsize); /* "numpy.pxd":824 * 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) { /* "numpy.pxd":825 * * if not PyDataType_HASFIELDS(child): * t = child.type_num # <<<<<<<<<<<<<< * if end - f < 5: * raise RuntimeError(u"Format string allocated too short.") */ __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_child->type_num); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 825; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_XDECREF_SET(__pyx_v_t, __pyx_t_3); __pyx_t_3 = 0; /* "numpy.pxd":826 * 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 (__pyx_t_6) { /* "numpy.pxd":827 * 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_3 = PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__200, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 827; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[5]; __pyx_lineno = 827; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } /* "numpy.pxd":830 * * # 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_3 = PyInt_FromLong(NPY_BYTE); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 830; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 830; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 830; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_6) { (__pyx_v_f[0]) = 98; goto __pyx_L11; } /* "numpy.pxd":831 * # 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_5 = PyInt_FromLong(NPY_UBYTE); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 831; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 831; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 831; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_6) { (__pyx_v_f[0]) = 66; goto __pyx_L11; } /* "numpy.pxd":832 * 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_3 = PyInt_FromLong(NPY_SHORT); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 832; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 832; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 832; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_6) { (__pyx_v_f[0]) = 104; goto __pyx_L11; } /* "numpy.pxd":833 * 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_5 = PyInt_FromLong(NPY_USHORT); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 833; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 833; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 833; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_6) { (__pyx_v_f[0]) = 72; goto __pyx_L11; } /* "numpy.pxd":834 * 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_3 = PyInt_FromLong(NPY_INT); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 834; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 834; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 834; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_6) { (__pyx_v_f[0]) = 105; goto __pyx_L11; } /* "numpy.pxd":835 * 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_5 = PyInt_FromLong(NPY_UINT); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 835; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 835; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 835; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_6) { (__pyx_v_f[0]) = 73; goto __pyx_L11; } /* "numpy.pxd":836 * 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_3 = PyInt_FromLong(NPY_LONG); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 836; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 836; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 836; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_6) { (__pyx_v_f[0]) = 108; goto __pyx_L11; } /* "numpy.pxd":837 * 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_5 = PyInt_FromLong(NPY_ULONG); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 837; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 837; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 837; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_6) { (__pyx_v_f[0]) = 76; goto __pyx_L11; } /* "numpy.pxd":838 * 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_3 = PyInt_FromLong(NPY_LONGLONG); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 838; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 838; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 838; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_6) { (__pyx_v_f[0]) = 113; goto __pyx_L11; } /* "numpy.pxd":839 * 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_5 = PyInt_FromLong(NPY_ULONGLONG); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 839; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 839; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 839; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_6) { (__pyx_v_f[0]) = 81; goto __pyx_L11; } /* "numpy.pxd":840 * 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_3 = PyInt_FromLong(NPY_FLOAT); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 840; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 840; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 840; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_6) { (__pyx_v_f[0]) = 102; goto __pyx_L11; } /* "numpy.pxd":841 * 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_5 = PyInt_FromLong(NPY_DOUBLE); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 841; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 841; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 841; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_6) { (__pyx_v_f[0]) = 100; goto __pyx_L11; } /* "numpy.pxd":842 * 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_3 = PyInt_FromLong(NPY_LONGDOUBLE); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 842; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 842; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 842; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_6) { (__pyx_v_f[0]) = 103; goto __pyx_L11; } /* "numpy.pxd":843 * 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_5 = PyInt_FromLong(NPY_CFLOAT); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 843; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 843; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 843; __pyx_clineno = __LINE__; goto __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]) = 102; __pyx_v_f = (__pyx_v_f + 1); goto __pyx_L11; } /* "numpy.pxd":844 * 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_3 = PyInt_FromLong(NPY_CDOUBLE); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 844; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 844; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 844; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_6) { (__pyx_v_f[0]) = 90; (__pyx_v_f[1]) = 100; __pyx_v_f = (__pyx_v_f + 1); goto __pyx_L11; } /* "numpy.pxd":845 * 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_5 = PyInt_FromLong(NPY_CLONGDOUBLE); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 845; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 845; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 845; __pyx_clineno = __LINE__; goto __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]) = 103; __pyx_v_f = (__pyx_v_f + 1); goto __pyx_L11; } /* "numpy.pxd":846 * 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_3 = PyInt_FromLong(NPY_OBJECT); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 846; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 846; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 846; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_6) { (__pyx_v_f[0]) = 79; goto __pyx_L11; } /*else*/ { /* "numpy.pxd":848 * elif t == NPY_OBJECT: f[0] = 79 #"O" * else: * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) # <<<<<<<<<<<<<< * f += 1 * else: */ __pyx_t_5 = PyUnicode_Format(__pyx_kp_u_unknown_dtype_code_in_numpy_pxd, __pyx_v_t); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 848; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 848; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyObject_Call(__pyx_builtin_ValueError, __pyx_t_3, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 848; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_Raise(__pyx_t_5, 0, 0, 0); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; {__pyx_filename = __pyx_f[5]; __pyx_lineno = 848; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_L11:; /* "numpy.pxd":849 * 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); goto __pyx_L9; } /*else*/ { /* "numpy.pxd":853 * # Cython ignores struct boundary information ("T{...}"), * # so don't output it * f = _util_dtypestring(child, f, end, offset) # <<<<<<<<<<<<<< * return f * */ __pyx_t_11 = __pyx_f_5numpy__util_dtypestring(__pyx_v_child, __pyx_v_f, __pyx_v_end, __pyx_v_offset); if (unlikely(__pyx_t_11 == NULL)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 853; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_f = __pyx_t_11; } __pyx_L9:; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "numpy.pxd":854 * # so don't output it * f = _util_dtypestring(child, f, end, offset) * return f # <<<<<<<<<<<<<< * * */ __pyx_r = __pyx_v_f; goto __pyx_L0; /* "numpy.pxd":787 * return PyArray_MultiIterNew(5, a, b, c, d, e) * * 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_XDECREF(__pyx_t_5); __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; } /* "numpy.pxd":969 * * * 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); /* "numpy.pxd":971 * 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) { /* "numpy.pxd":972 * cdef PyObject* baseptr * if base is None: * baseptr = NULL # <<<<<<<<<<<<<< * else: * Py_INCREF(base) # important to do this before decref below! */ __pyx_v_baseptr = NULL; goto __pyx_L3; } /*else*/ { /* "numpy.pxd":974 * baseptr = NULL * else: * Py_INCREF(base) # important to do this before decref below! # <<<<<<<<<<<<<< * baseptr = base * Py_XDECREF(arr.base) */ Py_INCREF(__pyx_v_base); /* "numpy.pxd":975 * 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:; /* "numpy.pxd":976 * 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); /* "numpy.pxd":977 * baseptr = base * Py_XDECREF(arr.base) * arr.base = baseptr # <<<<<<<<<<<<<< * * cdef inline object get_array_base(ndarray arr): */ __pyx_v_arr->base = __pyx_v_baseptr; /* "numpy.pxd":969 * * * cdef inline void set_array_base(ndarray arr, object base): # <<<<<<<<<<<<<< * cdef PyObject* baseptr * if base is None: */ /* function exit code */ __Pyx_RefNannyFinishContext(); } /* "numpy.pxd":979 * 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); /* "numpy.pxd":980 * * 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) { /* "numpy.pxd":981 * cdef inline object get_array_base(ndarray arr): * if arr.base is NULL: * return None # <<<<<<<<<<<<<< * else: * return arr.base */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(Py_None); __pyx_r = Py_None; goto __pyx_L0; } /*else*/ { /* "numpy.pxd":983 * return None * else: * return arr.base # <<<<<<<<<<<<<< */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_arr->base)); __pyx_r = ((PyObject *)__pyx_v_arr->base); goto __pyx_L0; } /* "numpy.pxd":979 * 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; } /* "util.pxd":26 * object sarr_from_data(cnp.dtype, int length, void* data) * * cdef inline object get_value_at(ndarray arr, object loc): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, sz */ static CYTHON_INLINE PyObject *__pyx_f_4util_get_value_at(PyArrayObject *__pyx_v_arr, PyObject *__pyx_v_loc) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_sz; PyObject *__pyx_v_casted = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; Py_ssize_t __pyx_t_3; int __pyx_t_4; int __pyx_t_5; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_value_at", 0); __Pyx_INCREF(__pyx_v_loc); /* "util.pxd":30 * Py_ssize_t i, sz * void* data_ptr * if is_float_object(loc): # <<<<<<<<<<<<<< * casted = int(loc) * if casted == loc: */ __pyx_t_1 = (is_float_object(__pyx_v_loc) != 0); if (__pyx_t_1) { /* "util.pxd":31 * void* data_ptr * if is_float_object(loc): * casted = int(loc) # <<<<<<<<<<<<<< * if casted == loc: * loc = casted */ __pyx_t_2 = PyNumber_Int(__pyx_v_loc); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 31; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_v_casted = __pyx_t_2; __pyx_t_2 = 0; /* "util.pxd":32 * if is_float_object(loc): * casted = int(loc) * if casted == loc: # <<<<<<<<<<<<<< * loc = casted * i = loc */ __pyx_t_2 = PyObject_RichCompare(__pyx_v_casted, __pyx_v_loc, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 32; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 32; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_1) { /* "util.pxd":33 * casted = int(loc) * if casted == loc: * loc = casted # <<<<<<<<<<<<<< * i = loc * sz = cnp.PyArray_SIZE(arr) */ __Pyx_INCREF(__pyx_v_casted); __Pyx_DECREF_SET(__pyx_v_loc, __pyx_v_casted); goto __pyx_L4; } __pyx_L4:; goto __pyx_L3; } __pyx_L3:; /* "util.pxd":34 * if casted == loc: * loc = casted * i = loc # <<<<<<<<<<<<<< * sz = cnp.PyArray_SIZE(arr) * */ __pyx_t_3 = __Pyx_PyIndex_AsSsize_t(__pyx_v_loc); if (unlikely((__pyx_t_3 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 34; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_i = ((Py_ssize_t)__pyx_t_3); /* "util.pxd":35 * loc = casted * i = loc * sz = cnp.PyArray_SIZE(arr) # <<<<<<<<<<<<<< * * if i < 0 and sz > 0: */ __pyx_v_sz = PyArray_SIZE(__pyx_v_arr); /* "util.pxd":37 * sz = cnp.PyArray_SIZE(arr) * * if i < 0 and sz > 0: # <<<<<<<<<<<<<< * i += sz * elif i >= sz or sz == 0: */ __pyx_t_1 = ((__pyx_v_i < 0) != 0); if (__pyx_t_1) { __pyx_t_4 = ((__pyx_v_sz > 0) != 0); __pyx_t_5 = __pyx_t_4; } else { __pyx_t_5 = __pyx_t_1; } if (__pyx_t_5) { /* "util.pxd":38 * * if i < 0 and sz > 0: * i += sz # <<<<<<<<<<<<<< * elif i >= sz or sz == 0: * raise IndexError('index out of bounds') */ __pyx_v_i = (__pyx_v_i + __pyx_v_sz); goto __pyx_L5; } /* "util.pxd":39 * if i < 0 and sz > 0: * i += sz * elif i >= sz or sz == 0: # <<<<<<<<<<<<<< * raise IndexError('index out of bounds') * */ __pyx_t_5 = ((__pyx_v_i >= __pyx_v_sz) != 0); if (!__pyx_t_5) { __pyx_t_1 = ((__pyx_v_sz == 0) != 0); __pyx_t_4 = __pyx_t_1; } else { __pyx_t_4 = __pyx_t_5; } if (__pyx_t_4) { /* "util.pxd":40 * i += sz * elif i >= sz or sz == 0: * raise IndexError('index out of bounds') # <<<<<<<<<<<<<< * * return get_value_1d(arr, i) */ __pyx_t_2 = PyObject_Call(__pyx_builtin_IndexError, __pyx_tuple__201, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 40; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[6]; __pyx_lineno = 40; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_L5:; /* "util.pxd":42 * raise IndexError('index out of bounds') * * return get_value_1d(arr, i) # <<<<<<<<<<<<<< * * cdef inline set_value_at(ndarray arr, object loc, object value): */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = get_value_1d(__pyx_v_arr, __pyx_v_i); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 42; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "util.pxd":26 * object sarr_from_data(cnp.dtype, int length, void* data) * * cdef inline object get_value_at(ndarray arr, object loc): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, sz */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("util.get_value_at", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_casted); __Pyx_XDECREF(__pyx_v_loc); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "util.pxd":44 * return get_value_1d(arr, i) * * cdef inline set_value_at(ndarray arr, object loc, object value): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, sz */ static CYTHON_INLINE PyObject *__pyx_f_4util_set_value_at(PyArrayObject *__pyx_v_arr, PyObject *__pyx_v_loc, PyObject *__pyx_v_value) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_sz; PyObject *__pyx_v_casted = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; Py_ssize_t __pyx_t_3; int __pyx_t_4; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("set_value_at", 0); __Pyx_INCREF(__pyx_v_loc); /* "util.pxd":47 * cdef: * Py_ssize_t i, sz * if is_float_object(loc): # <<<<<<<<<<<<<< * casted = int(loc) * if casted == loc: */ __pyx_t_1 = (is_float_object(__pyx_v_loc) != 0); if (__pyx_t_1) { /* "util.pxd":48 * Py_ssize_t i, sz * if is_float_object(loc): * casted = int(loc) # <<<<<<<<<<<<<< * if casted == loc: * loc = casted */ __pyx_t_2 = PyNumber_Int(__pyx_v_loc); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_v_casted = __pyx_t_2; __pyx_t_2 = 0; /* "util.pxd":49 * if is_float_object(loc): * casted = int(loc) * if casted == loc: # <<<<<<<<<<<<<< * loc = casted * i = loc */ __pyx_t_2 = PyObject_RichCompare(__pyx_v_casted, __pyx_v_loc, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_1) { /* "util.pxd":50 * casted = int(loc) * if casted == loc: * loc = casted # <<<<<<<<<<<<<< * i = loc * sz = cnp.PyArray_SIZE(arr) */ __Pyx_INCREF(__pyx_v_casted); __Pyx_DECREF_SET(__pyx_v_loc, __pyx_v_casted); goto __pyx_L4; } __pyx_L4:; goto __pyx_L3; } __pyx_L3:; /* "util.pxd":51 * if casted == loc: * loc = casted * i = loc # <<<<<<<<<<<<<< * sz = cnp.PyArray_SIZE(arr) * */ __pyx_t_3 = __Pyx_PyIndex_AsSsize_t(__pyx_v_loc); if (unlikely((__pyx_t_3 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_i = ((Py_ssize_t)__pyx_t_3); /* "util.pxd":52 * loc = casted * i = loc * sz = cnp.PyArray_SIZE(arr) # <<<<<<<<<<<<<< * * if i < 0: */ __pyx_v_sz = PyArray_SIZE(__pyx_v_arr); /* "util.pxd":54 * sz = cnp.PyArray_SIZE(arr) * * if i < 0: # <<<<<<<<<<<<<< * i += sz * elif i >= sz: */ __pyx_t_1 = ((__pyx_v_i < 0) != 0); if (__pyx_t_1) { /* "util.pxd":55 * * if i < 0: * i += sz # <<<<<<<<<<<<<< * elif i >= sz: * raise IndexError('index out of bounds') */ __pyx_v_i = (__pyx_v_i + __pyx_v_sz); goto __pyx_L5; } /* "util.pxd":56 * if i < 0: * i += sz * elif i >= sz: # <<<<<<<<<<<<<< * raise IndexError('index out of bounds') * */ __pyx_t_1 = ((__pyx_v_i >= __pyx_v_sz) != 0); if (__pyx_t_1) { /* "util.pxd":57 * i += sz * elif i >= sz: * raise IndexError('index out of bounds') # <<<<<<<<<<<<<< * * assign_value_1d(arr, i, value) */ __pyx_t_2 = PyObject_Call(__pyx_builtin_IndexError, __pyx_tuple__202, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 57; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[6]; __pyx_lineno = 57; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_L5:; /* "util.pxd":59 * raise IndexError('index out of bounds') * * assign_value_1d(arr, i, value) # <<<<<<<<<<<<<< * * cdef inline int is_contiguous(ndarray arr): */ __pyx_t_4 = assign_value_1d(__pyx_v_arr, __pyx_v_i, __pyx_v_value); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 59; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "util.pxd":44 * return get_value_1d(arr, i) * * cdef inline set_value_at(ndarray arr, object loc, object value): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, sz */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("util.set_value_at", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_casted); __Pyx_XDECREF(__pyx_v_loc); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "util.pxd":61 * assign_value_1d(arr, i, value) * * cdef inline int is_contiguous(ndarray arr): # <<<<<<<<<<<<<< * return cnp.PyArray_CHKFLAGS(arr, cnp.NPY_C_CONTIGUOUS) * */ static CYTHON_INLINE int __pyx_f_4util_is_contiguous(PyArrayObject *__pyx_v_arr) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("is_contiguous", 0); /* "util.pxd":62 * * cdef inline int is_contiguous(ndarray arr): * return cnp.PyArray_CHKFLAGS(arr, cnp.NPY_C_CONTIGUOUS) # <<<<<<<<<<<<<< * * cdef inline is_array(object o): */ __pyx_r = PyArray_CHKFLAGS(__pyx_v_arr, NPY_C_CONTIGUOUS); goto __pyx_L0; /* "util.pxd":61 * assign_value_1d(arr, i, value) * * cdef inline int is_contiguous(ndarray arr): # <<<<<<<<<<<<<< * return cnp.PyArray_CHKFLAGS(arr, cnp.NPY_C_CONTIGUOUS) * */ /* function exit code */ __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "util.pxd":64 * return cnp.PyArray_CHKFLAGS(arr, cnp.NPY_C_CONTIGUOUS) * * cdef inline is_array(object o): # <<<<<<<<<<<<<< * return cnp.PyArray_Check(o) * */ static CYTHON_INLINE PyObject *__pyx_f_4util_is_array(PyObject *__pyx_v_o) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("is_array", 0); /* "util.pxd":65 * * cdef inline is_array(object o): * return cnp.PyArray_Check(o) # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyBool_FromLong(PyArray_Check(__pyx_v_o)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 65; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "util.pxd":64 * return cnp.PyArray_CHKFLAGS(arr, cnp.NPY_C_CONTIGUOUS) * * cdef inline is_array(object o): # <<<<<<<<<<<<<< * return cnp.PyArray_Check(o) * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("util.is_array", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "util.pxd":68 * * * cdef inline bint _checknull(object val): # <<<<<<<<<<<<<< * try: * return val is None or (cpython.PyFloat_Check(val) and val != val) */ static CYTHON_INLINE int __pyx_f_4util__checknull(PyObject *__pyx_v_val) { 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; int __pyx_t_9; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_checknull", 0); /* "util.pxd":69 * * cdef inline bint _checknull(object val): * try: # <<<<<<<<<<<<<< * return val is None or (cpython.PyFloat_Check(val) and val != val) * except ValueError: */ { __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:*/ { /* "util.pxd":70 * cdef inline bint _checknull(object val): * try: * return val is None or (cpython.PyFloat_Check(val) and val != val) # <<<<<<<<<<<<<< * except ValueError: * return False */ __pyx_t_4 = (__pyx_v_val == Py_None); __pyx_t_5 = __Pyx_PyBool_FromLong(__pyx_t_4); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L3_error;} if (!__pyx_t_4) { __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_6 = __Pyx_PyBool_FromLong(PyFloat_Check(__pyx_v_val)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L3_error;} if (__pyx_t_4) { __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_7 = PyObject_RichCompare(__pyx_v_val, __pyx_v_val, Py_NE); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_t_8 = __pyx_t_7; __pyx_t_7 = 0; } else { __pyx_t_8 = __pyx_t_6; __pyx_t_6 = 0; } __pyx_t_6 = __pyx_t_8; __pyx_t_8 = 0; } else { __pyx_t_6 = __pyx_t_5; __pyx_t_5 = 0; } __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_r = __pyx_t_4; goto __pyx_L7_try_return; } __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L10_try_end; __pyx_L3_error:; __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; /* "util.pxd":71 * try: * return val is None or (cpython.PyFloat_Check(val) and val != val) * except ValueError: # <<<<<<<<<<<<<< * return False * */ __pyx_t_9 = PyErr_ExceptionMatches(__pyx_builtin_ValueError); if (__pyx_t_9) { __Pyx_AddTraceback("util._checknull", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_5, &__pyx_t_8) < 0) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 71; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_GOTREF(__pyx_t_5); __Pyx_GOTREF(__pyx_t_8); /* "util.pxd":72 * return val is None or (cpython.PyFloat_Check(val) and val != val) * except ValueError: * return False # <<<<<<<<<<<<<< * * cdef inline bint _checknull_old(object val): */ __pyx_r = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; goto __pyx_L6_except_return; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; goto __pyx_L4_exception_handled; } goto __pyx_L5_except_error; __pyx_L5_except_error:; __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); goto __pyx_L1_error; __pyx_L7_try_return:; __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); goto __pyx_L0; __pyx_L6_except_return:; __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); goto __pyx_L0; __pyx_L4_exception_handled:; __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); __pyx_L10_try_end:; } /* "util.pxd":68 * * * cdef inline bint _checknull(object val): # <<<<<<<<<<<<<< * try: * return val is None or (cpython.PyFloat_Check(val) and val != val) */ /* 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_WriteUnraisable("util._checknull", __pyx_clineno, __pyx_lineno, __pyx_filename, 0); __pyx_r = 0; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "util.pxd":74 * return False * * cdef inline bint _checknull_old(object val): # <<<<<<<<<<<<<< * import numpy as np * cdef double INF = np.inf */ static CYTHON_INLINE int __pyx_f_4util__checknull_old(PyObject *__pyx_v_val) { PyObject *__pyx_v_np = NULL; double __pyx_v_INF; double __pyx_v_NEGINF; int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; double __pyx_t_2; 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; int __pyx_t_9; int __pyx_t_10; int __pyx_t_11; int __pyx_t_12; PyObject *__pyx_t_13 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_checknull_old", 0); /* "util.pxd":75 * * cdef inline bint _checknull_old(object val): * import numpy as np # <<<<<<<<<<<<<< * cdef double INF = np.inf * cdef double NEGINF = -INF */ __pyx_t_1 = __Pyx_Import(__pyx_n_s_numpy, 0, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 75; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_v_np = __pyx_t_1; __pyx_t_1 = 0; /* "util.pxd":76 * cdef inline bint _checknull_old(object val): * import numpy as np * cdef double INF = np.inf # <<<<<<<<<<<<<< * cdef double NEGINF = -INF * try: */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_np, __pyx_n_s_inf); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 76; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __pyx_PyFloat_AsDouble(__pyx_t_1); if (unlikely((__pyx_t_2 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 76; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_INF = ((double)__pyx_t_2); /* "util.pxd":77 * import numpy as np * cdef double INF = np.inf * cdef double NEGINF = -INF # <<<<<<<<<<<<<< * try: * return bool(val is None or val != val and val != INF */ __pyx_v_NEGINF = (-__pyx_v_INF); /* "util.pxd":78 * cdef double INF = np.inf * cdef double NEGINF = -INF * try: # <<<<<<<<<<<<<< * return bool(val is None or val != val and val != INF * and val != NEGINF) */ { __Pyx_ExceptionSave(&__pyx_t_3, &__pyx_t_4, &__pyx_t_5); __Pyx_XGOTREF(__pyx_t_3); __Pyx_XGOTREF(__pyx_t_4); __Pyx_XGOTREF(__pyx_t_5); /*try:*/ { /* "util.pxd":79 * cdef double NEGINF = -INF * try: * return bool(val is None or val != val and val != INF # <<<<<<<<<<<<<< * and val != NEGINF) * except ValueError: */ __pyx_t_6 = (__pyx_v_val == Py_None); if (!__pyx_t_6) { __pyx_t_1 = PyObject_RichCompare(__pyx_v_val, __pyx_v_val, Py_NE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_7) { /* "util.pxd":80 * try: * return bool(val is None or val != val and val != INF * and val != NEGINF) # <<<<<<<<<<<<<< * except ValueError: * return False */ __pyx_t_1 = PyFloat_FromDouble(__pyx_v_INF); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 80; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_8 = PyObject_RichCompare(__pyx_v_val, __pyx_t_1, Py_NE); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "util.pxd":79 * cdef double NEGINF = -INF * try: * return bool(val is None or val != val and val != INF # <<<<<<<<<<<<<< * and val != NEGINF) * except ValueError: */ __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (__pyx_t_9) { /* "util.pxd":80 * try: * return bool(val is None or val != val and val != INF * and val != NEGINF) # <<<<<<<<<<<<<< * except ValueError: * return False */ __pyx_t_8 = PyFloat_FromDouble(__pyx_v_NEGINF); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 80; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_1 = PyObject_RichCompare(__pyx_v_val, __pyx_t_8, Py_NE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 80; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 80; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_11 = __pyx_t_10; } else { __pyx_t_11 = __pyx_t_9; } __pyx_t_9 = __pyx_t_11; } else { __pyx_t_9 = __pyx_t_7; } __pyx_t_7 = __pyx_t_9; } else { __pyx_t_7 = __pyx_t_6; } /* "util.pxd":79 * cdef double NEGINF = -INF * try: * return bool(val is None or val != val and val != INF # <<<<<<<<<<<<<< * and val != NEGINF) * except ValueError: */ __pyx_r = (!(!__pyx_t_7)); goto __pyx_L7_try_return; } __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; goto __pyx_L10_try_end; __pyx_L3_error:; __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; /* "util.pxd":81 * return bool(val is None or val != val and val != INF * and val != NEGINF) * except ValueError: # <<<<<<<<<<<<<< * return False * */ __pyx_t_12 = PyErr_ExceptionMatches(__pyx_builtin_ValueError); if (__pyx_t_12) { __Pyx_AddTraceback("util._checknull_old", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_8, &__pyx_t_13) < 0) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_GOTREF(__pyx_t_8); __Pyx_GOTREF(__pyx_t_13); /* "util.pxd":82 * and val != NEGINF) * except ValueError: * return False # <<<<<<<<<<<<<< * * cdef inline bint _checknan(object val): */ __pyx_r = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; goto __pyx_L6_except_return; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; goto __pyx_L4_exception_handled; } goto __pyx_L5_except_error; __pyx_L5_except_error:; __Pyx_XGIVEREF(__pyx_t_3); __Pyx_XGIVEREF(__pyx_t_4); __Pyx_XGIVEREF(__pyx_t_5); __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5); goto __pyx_L1_error; __pyx_L7_try_return:; __Pyx_XGIVEREF(__pyx_t_3); __Pyx_XGIVEREF(__pyx_t_4); __Pyx_XGIVEREF(__pyx_t_5); __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5); goto __pyx_L0; __pyx_L6_except_return:; __Pyx_XGIVEREF(__pyx_t_3); __Pyx_XGIVEREF(__pyx_t_4); __Pyx_XGIVEREF(__pyx_t_5); __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5); goto __pyx_L0; __pyx_L4_exception_handled:; __Pyx_XGIVEREF(__pyx_t_3); __Pyx_XGIVEREF(__pyx_t_4); __Pyx_XGIVEREF(__pyx_t_5); __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5); __pyx_L10_try_end:; } /* "util.pxd":74 * return False * * cdef inline bint _checknull_old(object val): # <<<<<<<<<<<<<< * import numpy as np * cdef double INF = np.inf */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_13); __Pyx_WriteUnraisable("util._checknull_old", __pyx_clineno, __pyx_lineno, __pyx_filename, 0); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_np); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "util.pxd":84 * return False * * cdef inline bint _checknan(object val): # <<<<<<<<<<<<<< * return not cnp.PyArray_Check(val) and val != val */ static CYTHON_INLINE int __pyx_f_4util__checknan(PyObject *__pyx_v_val) { int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_checknan", 0); /* "util.pxd":85 * * cdef inline bint _checknan(object val): * return not cnp.PyArray_Check(val) and val != val # <<<<<<<<<<<<<< */ __pyx_t_1 = __Pyx_PyBool_FromLong((!(PyArray_Check(__pyx_v_val) != 0))); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__pyx_t_2) { __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_3 = PyObject_RichCompare(__pyx_v_val, __pyx_v_val, Py_NE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_4 = __pyx_t_3; __pyx_t_3 = 0; } else { __pyx_t_4 = __pyx_t_1; __pyx_t_1 = 0; } __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_r = __pyx_t_2; goto __pyx_L0; /* "util.pxd":84 * return False * * cdef inline bint _checknan(object val): # <<<<<<<<<<<<<< * return not cnp.PyArray_Check(val) and val != val */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_WriteUnraisable("util._checknan", __pyx_clineno, __pyx_lineno, __pyx_filename, 0); __pyx_r = 0; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_tp_new_6pandas_5algos_Node(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { struct __pyx_obj_6pandas_5algos_Node *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_5algos_Node *)o); p->next = ((PyObject*)Py_None); Py_INCREF(Py_None); p->width = ((PyObject*)Py_None); Py_INCREF(Py_None); return o; } static void __pyx_tp_dealloc_6pandas_5algos_Node(PyObject *o) { struct __pyx_obj_6pandas_5algos_Node *p = (struct __pyx_obj_6pandas_5algos_Node *)o; #if PY_VERSION_HEX >= 0x030400a1 if (unlikely(Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) { if (PyObject_CallFinalizerFromDealloc(o)) return; } #endif PyObject_GC_UnTrack(o); Py_CLEAR(p->next); Py_CLEAR(p->width); (*Py_TYPE(o)->tp_free)(o); } static int __pyx_tp_traverse_6pandas_5algos_Node(PyObject *o, visitproc v, void *a) { int e; struct __pyx_obj_6pandas_5algos_Node *p = (struct __pyx_obj_6pandas_5algos_Node *)o; if (p->next) { e = (*v)(p->next, a); if (e) return e; } if (p->width) { e = (*v)(p->width, a); if (e) return e; } return 0; } static int __pyx_tp_clear_6pandas_5algos_Node(PyObject *o) { PyObject* tmp; struct __pyx_obj_6pandas_5algos_Node *p = (struct __pyx_obj_6pandas_5algos_Node *)o; tmp = ((PyObject*)p->next); p->next = ((PyObject*)Py_None); Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->width); p->width = ((PyObject*)Py_None); Py_INCREF(Py_None); Py_XDECREF(tmp); return 0; } static PyObject *__pyx_getprop_6pandas_5algos_4Node_value(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6pandas_5algos_4Node_5value_1__get__(o); } static int __pyx_setprop_6pandas_5algos_4Node_value(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { return __pyx_pw_6pandas_5algos_4Node_5value_3__set__(o, v); } else { PyErr_SetString(PyExc_NotImplementedError, "__del__"); return -1; } } static PyObject *__pyx_getprop_6pandas_5algos_4Node_next(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6pandas_5algos_4Node_4next_1__get__(o); } static int __pyx_setprop_6pandas_5algos_4Node_next(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { return __pyx_pw_6pandas_5algos_4Node_4next_3__set__(o, v); } else { return __pyx_pw_6pandas_5algos_4Node_4next_5__del__(o); } } static PyObject *__pyx_getprop_6pandas_5algos_4Node_width(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6pandas_5algos_4Node_5width_1__get__(o); } static int __pyx_setprop_6pandas_5algos_4Node_width(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { return __pyx_pw_6pandas_5algos_4Node_5width_3__set__(o, v); } else { return __pyx_pw_6pandas_5algos_4Node_5width_5__del__(o); } } static PyMethodDef __pyx_methods_6pandas_5algos_Node[] = { {0, 0, 0, 0} }; static struct PyGetSetDef __pyx_getsets_6pandas_5algos_Node[] = { {(char *)"value", __pyx_getprop_6pandas_5algos_4Node_value, __pyx_setprop_6pandas_5algos_4Node_value, 0, 0}, {(char *)"next", __pyx_getprop_6pandas_5algos_4Node_next, __pyx_setprop_6pandas_5algos_4Node_next, 0, 0}, {(char *)"width", __pyx_getprop_6pandas_5algos_4Node_width, __pyx_setprop_6pandas_5algos_4Node_width, 0, 0}, {0, 0, 0, 0, 0} }; static PyTypeObject __pyx_type_6pandas_5algos_Node = { PyVarObject_HEAD_INIT(0, 0) __Pyx_NAMESTR("pandas.algos.Node"), /*tp_name*/ sizeof(struct __pyx_obj_6pandas_5algos_Node), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_6pandas_5algos_Node, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #else 0, /*reserved*/ #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*/ 0, /*tp_doc*/ __pyx_tp_traverse_6pandas_5algos_Node, /*tp_traverse*/ __pyx_tp_clear_6pandas_5algos_Node, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_6pandas_5algos_Node, /*tp_methods*/ 0, /*tp_members*/ __pyx_getsets_6pandas_5algos_Node, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ __pyx_pw_6pandas_5algos_4Node_1__init__, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_6pandas_5algos_Node, /*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*/ #if PY_VERSION_HEX >= 0x02060000 0, /*tp_version_tag*/ #endif #if PY_VERSION_HEX >= 0x030400a1 0, /*tp_finalize*/ #endif }; static struct __pyx_vtabstruct_6pandas_5algos_IndexableSkiplist __pyx_vtable_6pandas_5algos_IndexableSkiplist; static PyObject *__pyx_tp_new_6pandas_5algos_IndexableSkiplist(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { struct __pyx_obj_6pandas_5algos_IndexableSkiplist *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_5algos_IndexableSkiplist *)o); p->__pyx_vtab = __pyx_vtabptr_6pandas_5algos_IndexableSkiplist; p->head = ((struct __pyx_obj_6pandas_5algos_Node *)Py_None); Py_INCREF(Py_None); return o; } static void __pyx_tp_dealloc_6pandas_5algos_IndexableSkiplist(PyObject *o) { struct __pyx_obj_6pandas_5algos_IndexableSkiplist *p = (struct __pyx_obj_6pandas_5algos_IndexableSkiplist *)o; #if PY_VERSION_HEX >= 0x030400a1 if (unlikely(Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) { if (PyObject_CallFinalizerFromDealloc(o)) return; } #endif PyObject_GC_UnTrack(o); Py_CLEAR(p->head); (*Py_TYPE(o)->tp_free)(o); } static int __pyx_tp_traverse_6pandas_5algos_IndexableSkiplist(PyObject *o, visitproc v, void *a) { int e; struct __pyx_obj_6pandas_5algos_IndexableSkiplist *p = (struct __pyx_obj_6pandas_5algos_IndexableSkiplist *)o; if (p->head) { e = (*v)(((PyObject*)p->head), a); if (e) return e; } return 0; } static int __pyx_tp_clear_6pandas_5algos_IndexableSkiplist(PyObject *o) { PyObject* tmp; struct __pyx_obj_6pandas_5algos_IndexableSkiplist *p = (struct __pyx_obj_6pandas_5algos_IndexableSkiplist *)o; tmp = ((PyObject*)p->head); p->head = ((struct __pyx_obj_6pandas_5algos_Node *)Py_None); Py_INCREF(Py_None); Py_XDECREF(tmp); return 0; } static PyObject *__pyx_sq_item_6pandas_5algos_IndexableSkiplist(PyObject *o, Py_ssize_t i) { PyObject *r; PyObject *x = PyInt_FromSsize_t(i); if(!x) return 0; r = Py_TYPE(o)->tp_as_mapping->mp_subscript(o, x); Py_DECREF(x); return r; } static PyMethodDef __pyx_methods_6pandas_5algos_IndexableSkiplist[] = { {__Pyx_NAMESTR("get"), (PyCFunction)__pyx_pw_6pandas_5algos_17IndexableSkiplist_7get, METH_O, __Pyx_DOCSTR(0)}, {__Pyx_NAMESTR("insert"), (PyCFunction)__pyx_pw_6pandas_5algos_17IndexableSkiplist_9insert, METH_O, __Pyx_DOCSTR(0)}, {__Pyx_NAMESTR("remove"), (PyCFunction)__pyx_pw_6pandas_5algos_17IndexableSkiplist_11remove, METH_O, __Pyx_DOCSTR(0)}, {0, 0, 0, 0} }; static PySequenceMethods __pyx_tp_as_sequence_IndexableSkiplist = { __pyx_pw_6pandas_5algos_17IndexableSkiplist_3__len__, /*sq_length*/ 0, /*sq_concat*/ 0, /*sq_repeat*/ __pyx_sq_item_6pandas_5algos_IndexableSkiplist, /*sq_item*/ 0, /*sq_slice*/ 0, /*sq_ass_item*/ 0, /*sq_ass_slice*/ 0, /*sq_contains*/ 0, /*sq_inplace_concat*/ 0, /*sq_inplace_repeat*/ }; static PyMappingMethods __pyx_tp_as_mapping_IndexableSkiplist = { __pyx_pw_6pandas_5algos_17IndexableSkiplist_3__len__, /*mp_length*/ __pyx_pw_6pandas_5algos_17IndexableSkiplist_5__getitem__, /*mp_subscript*/ 0, /*mp_ass_subscript*/ }; static PyTypeObject __pyx_type_6pandas_5algos_IndexableSkiplist = { PyVarObject_HEAD_INIT(0, 0) __Pyx_NAMESTR("pandas.algos.IndexableSkiplist"), /*tp_name*/ sizeof(struct __pyx_obj_6pandas_5algos_IndexableSkiplist), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_6pandas_5algos_IndexableSkiplist, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #else 0, /*reserved*/ #endif 0, /*tp_repr*/ 0, /*tp_as_number*/ &__pyx_tp_as_sequence_IndexableSkiplist, /*tp_as_sequence*/ &__pyx_tp_as_mapping_IndexableSkiplist, /*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*/ __Pyx_DOCSTR("\n Sorted collection supporting O(lg n) insertion, removal, and\n lookup by rank.\n "), /*tp_doc*/ __pyx_tp_traverse_6pandas_5algos_IndexableSkiplist, /*tp_traverse*/ __pyx_tp_clear_6pandas_5algos_IndexableSkiplist, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_6pandas_5algos_IndexableSkiplist, /*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_5algos_17IndexableSkiplist_1__init__, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_6pandas_5algos_IndexableSkiplist, /*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*/ #if PY_VERSION_HEX >= 0x02060000 0, /*tp_version_tag*/ #endif #if PY_VERSION_HEX >= 0x030400a1 0, /*tp_finalize*/ #endif }; static PyMethodDef __pyx_methods[] = { {__Pyx_NAMESTR("ensure_platform_int"), (PyCFunction)__pyx_pw_6pandas_5algos_87ensure_platform_int, METH_O, __Pyx_DOCSTR(0)}, {__Pyx_NAMESTR("ensure_float64"), (PyCFunction)__pyx_pw_6pandas_5algos_89ensure_float64, METH_O, __Pyx_DOCSTR(0)}, {__Pyx_NAMESTR("ensure_float32"), (PyCFunction)__pyx_pw_6pandas_5algos_91ensure_float32, METH_O, __Pyx_DOCSTR(0)}, {__Pyx_NAMESTR("ensure_int8"), (PyCFunction)__pyx_pw_6pandas_5algos_93ensure_int8, METH_O, __Pyx_DOCSTR(0)}, {__Pyx_NAMESTR("ensure_int16"), (PyCFunction)__pyx_pw_6pandas_5algos_95ensure_int16, METH_O, __Pyx_DOCSTR(0)}, {__Pyx_NAMESTR("ensure_int32"), (PyCFunction)__pyx_pw_6pandas_5algos_97ensure_int32, METH_O, __Pyx_DOCSTR(0)}, {__Pyx_NAMESTR("ensure_int64"), (PyCFunction)__pyx_pw_6pandas_5algos_99ensure_int64, METH_O, __Pyx_DOCSTR(0)}, {__Pyx_NAMESTR("ensure_object"), (PyCFunction)__pyx_pw_6pandas_5algos_101ensure_object, METH_O, __Pyx_DOCSTR(0)}, {__Pyx_NAMESTR("map_indices_float64"), (PyCFunction)__pyx_pw_6pandas_5algos_103map_indices_float64, METH_O, __Pyx_DOCSTR(__pyx_doc_6pandas_5algos_102map_indices_float64)}, {__Pyx_NAMESTR("map_indices_float32"), (PyCFunction)__pyx_pw_6pandas_5algos_105map_indices_float32, METH_O, __Pyx_DOCSTR(__pyx_doc_6pandas_5algos_104map_indices_float32)}, {__Pyx_NAMESTR("map_indices_object"), (PyCFunction)__pyx_pw_6pandas_5algos_107map_indices_object, METH_O, __Pyx_DOCSTR(__pyx_doc_6pandas_5algos_106map_indices_object)}, {__Pyx_NAMESTR("map_indices_int32"), (PyCFunction)__pyx_pw_6pandas_5algos_109map_indices_int32, METH_O, __Pyx_DOCSTR(__pyx_doc_6pandas_5algos_108map_indices_int32)}, {__Pyx_NAMESTR("map_indices_int64"), (PyCFunction)__pyx_pw_6pandas_5algos_111map_indices_int64, METH_O, __Pyx_DOCSTR(__pyx_doc_6pandas_5algos_110map_indices_int64)}, {__Pyx_NAMESTR("map_indices_bool"), (PyCFunction)__pyx_pw_6pandas_5algos_113map_indices_bool, METH_O, __Pyx_DOCSTR(__pyx_doc_6pandas_5algos_112map_indices_bool)}, {0, 0, 0, 0} }; #if PY_MAJOR_VERSION >= 3 static struct PyModuleDef __pyx_moduledef = { #if PY_VERSION_HEX < 0x03020000 { PyObject_HEAD_INIT(NULL) NULL, 0, NULL }, #else PyModuleDef_HEAD_INIT, #endif __Pyx_NAMESTR("algos"), 0, /* m_doc */ -1, /* m_size */ __pyx_methods /* m_methods */, NULL, /* m_reload */ NULL, /* m_traverse */ NULL, /* m_clear */ NULL /* m_free */ }; #endif static __Pyx_StringTabEntry __pyx_string_tab[] = { {&__pyx_n_s_A, __pyx_k_A, sizeof(__pyx_k_A), 0, 0, 1, 1}, {&__pyx_n_s_AssertionError, __pyx_k_AssertionError, sizeof(__pyx_k_AssertionError), 0, 0, 1, 1}, {&__pyx_n_s_B, __pyx_k_B, sizeof(__pyx_k_B), 0, 0, 1, 1}, {&__pyx_n_s_C, __pyx_k_C, sizeof(__pyx_k_C), 0, 0, 1, 1}, {&__pyx_n_s_D, __pyx_k_D, sizeof(__pyx_k_D), 0, 0, 1, 1}, {&__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_IndexError, __pyx_k_IndexError, sizeof(__pyx_k_IndexError), 0, 0, 1, 1}, {&__pyx_n_s_Infinity, __pyx_k_Infinity, sizeof(__pyx_k_Infinity), 0, 0, 1, 1}, {&__pyx_kp_s_Invalid_min_periods_size_d_great, __pyx_k_Invalid_min_periods_size_d_great, sizeof(__pyx_k_Invalid_min_periods_size_d_great), 0, 0, 1, 0}, {&__pyx_kp_s_Invalid_window_size_d, __pyx_k_Invalid_window_size_d, sizeof(__pyx_k_Invalid_window_size_d), 0, 0, 1, 0}, {&__pyx_n_s_K, __pyx_k_K, sizeof(__pyx_k_K), 0, 0, 1, 1}, {&__pyx_n_s_KeyError, __pyx_k_KeyError, sizeof(__pyx_k_KeyError), 0, 0, 1, 1}, {&__pyx_kp_s_Limit_must_be_non_negative, __pyx_k_Limit_must_be_non_negative, sizeof(__pyx_k_Limit_must_be_non_negative), 0, 0, 1, 0}, {&__pyx_n_s_N, __pyx_k_N, sizeof(__pyx_k_N), 0, 0, 1, 1}, {&__pyx_n_s_NA, __pyx_k_NA, sizeof(__pyx_k_NA), 0, 0, 1, 1}, {&__pyx_n_s_NIL, __pyx_k_NIL, sizeof(__pyx_k_NIL), 0, 0, 1, 1}, {&__pyx_n_s_NINF, __pyx_k_NINF, sizeof(__pyx_k_NINF), 0, 0, 1, 1}, {&__pyx_n_s_NaN, __pyx_k_NaN, sizeof(__pyx_k_NaN), 0, 0, 1, 1}, {&__pyx_n_s_NegInfinity, __pyx_k_NegInfinity, sizeof(__pyx_k_NegInfinity), 0, 0, 1, 1}, {&__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_kp_s_Not_Found, __pyx_k_Not_Found, sizeof(__pyx_k_Not_Found), 0, 0, 1, 0}, {&__pyx_n_s_O, __pyx_k_O, sizeof(__pyx_k_O), 0, 0, 1, 1}, {&__pyx_kp_s_Output_array_must_have_4_columns, __pyx_k_Output_array_must_have_4_columns, sizeof(__pyx_k_Output_array_must_have_4_columns), 0, 0, 1, 0}, {&__pyx_n_s_R, __pyx_k_R, sizeof(__pyx_k_R), 0, 0, 1, 1}, {&__pyx_n_s_RuntimeError, __pyx_k_RuntimeError, sizeof(__pyx_k_RuntimeError), 0, 0, 1, 1}, {&__pyx_n_s_S, __pyx_k_S, sizeof(__pyx_k_S), 0, 0, 1, 1}, {&__pyx_n_s_T, __pyx_k_T, sizeof(__pyx_k_T), 0, 0, 1, 1}, {&__pyx_n_s_TypeError, __pyx_k_TypeError, sizeof(__pyx_k_TypeError), 0, 0, 1, 1}, {&__pyx_kp_s_Unable_to_parse_s, __pyx_k_Unable_to_parse_s, sizeof(__pyx_k_Unable_to_parse_s), 0, 0, 1, 0}, {&__pyx_n_s_ValueError, __pyx_k_ValueError, sizeof(__pyx_k_ValueError), 0, 0, 1, 1}, {&__pyx_n_s_a, __pyx_k_a, sizeof(__pyx_k_a), 0, 0, 1, 1}, {&__pyx_n_s_adj, __pyx_k_adj, sizeof(__pyx_k_adj), 0, 0, 1, 1}, {&__pyx_n_s_adjust, __pyx_k_adjust, sizeof(__pyx_k_adjust), 0, 0, 1, 1}, {&__pyx_n_s_ai, __pyx_k_ai, sizeof(__pyx_k_ai), 0, 0, 1, 1}, {&__pyx_n_s_aold, __pyx_k_aold, sizeof(__pyx_k_aold), 0, 0, 1, 1}, {&__pyx_n_s_arange, __pyx_k_arange, sizeof(__pyx_k_arange), 0, 0, 1, 1}, {&__pyx_n_s_arg, __pyx_k_arg, sizeof(__pyx_k_arg), 0, 0, 1, 1}, {&__pyx_n_s_argsort, __pyx_k_argsort, sizeof(__pyx_k_argsort), 0, 0, 1, 1}, {&__pyx_n_s_argsorted, __pyx_k_argsorted, sizeof(__pyx_k_argsorted), 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_arrmap_bool, __pyx_k_arrmap_bool, sizeof(__pyx_k_arrmap_bool), 0, 0, 1, 1}, {&__pyx_n_s_arrmap_float32, __pyx_k_arrmap_float32, sizeof(__pyx_k_arrmap_float32), 0, 0, 1, 1}, {&__pyx_n_s_arrmap_float64, __pyx_k_arrmap_float64, sizeof(__pyx_k_arrmap_float64), 0, 0, 1, 1}, {&__pyx_n_s_arrmap_int32, __pyx_k_arrmap_int32, sizeof(__pyx_k_arrmap_int32), 0, 0, 1, 1}, {&__pyx_n_s_arrmap_int64, __pyx_k_arrmap_int64, sizeof(__pyx_k_arrmap_int64), 0, 0, 1, 1}, {&__pyx_n_s_arrmap_object, __pyx_k_arrmap_object, sizeof(__pyx_k_arrmap_object), 0, 0, 1, 1}, {&__pyx_n_s_as, __pyx_k_as, sizeof(__pyx_k_as), 0, 0, 1, 1}, {&__pyx_n_s_asarray, __pyx_k_asarray, sizeof(__pyx_k_asarray), 0, 0, 1, 1}, {&__pyx_n_s_ascending, __pyx_k_ascending, sizeof(__pyx_k_ascending), 0, 0, 1, 1}, {&__pyx_n_s_astype, __pyx_k_astype, sizeof(__pyx_k_astype), 0, 0, 1, 1}, {&__pyx_n_s_average, __pyx_k_average, sizeof(__pyx_k_average), 0, 0, 1, 1}, {&__pyx_n_s_avg, __pyx_k_avg, sizeof(__pyx_k_avg), 0, 0, 1, 1}, {&__pyx_n_s_avg_wgt, __pyx_k_avg_wgt, sizeof(__pyx_k_avg_wgt), 0, 0, 1, 1}, {&__pyx_n_s_axis, __pyx_k_axis, sizeof(__pyx_k_axis), 0, 0, 1, 1}, {&__pyx_n_s_b, __pyx_k_b, sizeof(__pyx_k_b), 0, 0, 1, 1}, {&__pyx_n_s_backfill_2d_inplace_bool, __pyx_k_backfill_2d_inplace_bool, sizeof(__pyx_k_backfill_2d_inplace_bool), 0, 0, 1, 1}, {&__pyx_n_s_backfill_2d_inplace_float32, __pyx_k_backfill_2d_inplace_float32, sizeof(__pyx_k_backfill_2d_inplace_float32), 0, 0, 1, 1}, {&__pyx_n_s_backfill_2d_inplace_float64, __pyx_k_backfill_2d_inplace_float64, sizeof(__pyx_k_backfill_2d_inplace_float64), 0, 0, 1, 1}, {&__pyx_n_s_backfill_2d_inplace_int32, __pyx_k_backfill_2d_inplace_int32, sizeof(__pyx_k_backfill_2d_inplace_int32), 0, 0, 1, 1}, {&__pyx_n_s_backfill_2d_inplace_int64, __pyx_k_backfill_2d_inplace_int64, sizeof(__pyx_k_backfill_2d_inplace_int64), 0, 0, 1, 1}, {&__pyx_n_s_backfill_2d_inplace_object, __pyx_k_backfill_2d_inplace_object, sizeof(__pyx_k_backfill_2d_inplace_object), 0, 0, 1, 1}, {&__pyx_n_s_backfill_bool, __pyx_k_backfill_bool, sizeof(__pyx_k_backfill_bool), 0, 0, 1, 1}, {&__pyx_n_s_backfill_float32, __pyx_k_backfill_float32, sizeof(__pyx_k_backfill_float32), 0, 0, 1, 1}, {&__pyx_n_s_backfill_float64, __pyx_k_backfill_float64, sizeof(__pyx_k_backfill_float64), 0, 0, 1, 1}, {&__pyx_n_s_backfill_inplace_bool, __pyx_k_backfill_inplace_bool, sizeof(__pyx_k_backfill_inplace_bool), 0, 0, 1, 1}, {&__pyx_n_s_backfill_inplace_float32, __pyx_k_backfill_inplace_float32, sizeof(__pyx_k_backfill_inplace_float32), 0, 0, 1, 1}, {&__pyx_n_s_backfill_inplace_float64, __pyx_k_backfill_inplace_float64, sizeof(__pyx_k_backfill_inplace_float64), 0, 0, 1, 1}, {&__pyx_n_s_backfill_inplace_int32, __pyx_k_backfill_inplace_int32, sizeof(__pyx_k_backfill_inplace_int32), 0, 0, 1, 1}, {&__pyx_n_s_backfill_inplace_int64, __pyx_k_backfill_inplace_int64, sizeof(__pyx_k_backfill_inplace_int64), 0, 0, 1, 1}, {&__pyx_n_s_backfill_inplace_object, __pyx_k_backfill_inplace_object, sizeof(__pyx_k_backfill_inplace_object), 0, 0, 1, 1}, {&__pyx_n_s_backfill_int32, __pyx_k_backfill_int32, sizeof(__pyx_k_backfill_int32), 0, 0, 1, 1}, {&__pyx_n_s_backfill_int64, __pyx_k_backfill_int64, sizeof(__pyx_k_backfill_int64), 0, 0, 1, 1}, {&__pyx_n_s_backfill_object, __pyx_k_backfill_object, sizeof(__pyx_k_backfill_object), 0, 0, 1, 1}, {&__pyx_n_s_bins, __pyx_k_bins, sizeof(__pyx_k_bins), 0, 0, 1, 1}, {&__pyx_n_s_buf, __pyx_k_buf, sizeof(__pyx_k_buf), 0, 0, 1, 1}, {&__pyx_n_s_bufarr, __pyx_k_bufarr, sizeof(__pyx_k_bufarr), 0, 0, 1, 1}, {&__pyx_n_s_c, __pyx_k_c, sizeof(__pyx_k_c), 0, 0, 1, 1}, {&__pyx_n_s_c_contiguous, __pyx_k_c_contiguous, sizeof(__pyx_k_c_contiguous), 0, 0, 1, 1}, {&__pyx_n_s_check_minp, __pyx_k_check_minp, sizeof(__pyx_k_check_minp), 0, 0, 1, 1}, {&__pyx_n_s_cmp, __pyx_k_cmp, sizeof(__pyx_k_cmp), 0, 0, 1, 1}, {&__pyx_n_s_com, __pyx_k_com, sizeof(__pyx_k_com), 0, 0, 1, 1}, {&__pyx_n_s_copy, __pyx_k_copy, sizeof(__pyx_k_copy), 0, 0, 1, 1}, {&__pyx_n_s_count, __pyx_k_count, sizeof(__pyx_k_count), 0, 0, 1, 1}, {&__pyx_n_s_counts, __pyx_k_counts, sizeof(__pyx_k_counts), 0, 0, 1, 1}, {&__pyx_n_s_counts_2, __pyx_k_counts_2, sizeof(__pyx_k_counts_2), 0, 0, 1, 1}, {&__pyx_n_s_cov, __pyx_k_cov, sizeof(__pyx_k_cov), 0, 0, 1, 1}, {&__pyx_n_s_ct, __pyx_k_ct, sizeof(__pyx_k_ct), 0, 0, 1, 1}, {&__pyx_n_s_cur, __pyx_k_cur, sizeof(__pyx_k_cur), 0, 0, 1, 1}, {&__pyx_n_s_data, __pyx_k_data, sizeof(__pyx_k_data), 0, 0, 1, 1}, {&__pyx_n_s_datetime, __pyx_k_datetime, sizeof(__pyx_k_datetime), 0, 0, 1, 1}, {&__pyx_n_s_day, __pyx_k_day, sizeof(__pyx_k_day), 0, 0, 1, 1}, {&__pyx_n_s_ddof, __pyx_k_ddof, sizeof(__pyx_k_ddof), 0, 0, 1, 1}, {&__pyx_n_s_diff_2d_float32, __pyx_k_diff_2d_float32, sizeof(__pyx_k_diff_2d_float32), 0, 0, 1, 1}, {&__pyx_n_s_diff_2d_float64, __pyx_k_diff_2d_float64, sizeof(__pyx_k_diff_2d_float64), 0, 0, 1, 1}, {&__pyx_n_s_diff_2d_int16, __pyx_k_diff_2d_int16, sizeof(__pyx_k_diff_2d_int16), 0, 0, 1, 1}, {&__pyx_n_s_diff_2d_int32, __pyx_k_diff_2d_int32, sizeof(__pyx_k_diff_2d_int32), 0, 0, 1, 1}, {&__pyx_n_s_diff_2d_int64, __pyx_k_diff_2d_int64, sizeof(__pyx_k_diff_2d_int64), 0, 0, 1, 1}, {&__pyx_n_s_diff_2d_int8, __pyx_k_diff_2d_int8, sizeof(__pyx_k_diff_2d_int8), 0, 0, 1, 1}, {&__pyx_n_s_dim, __pyx_k_dim, sizeof(__pyx_k_dim), 0, 0, 1, 1}, {&__pyx_n_s_dims, __pyx_k_dims, sizeof(__pyx_k_dims), 0, 0, 1, 1}, {&__pyx_n_s_divisor, __pyx_k_divisor, sizeof(__pyx_k_divisor), 0, 0, 1, 1}, {&__pyx_n_s_doc, __pyx_k_doc, sizeof(__pyx_k_doc), 0, 0, 1, 1}, {&__pyx_n_s_dtype, __pyx_k_dtype, sizeof(__pyx_k_dtype), 0, 0, 1, 1}, {&__pyx_n_s_dups, __pyx_k_dups, sizeof(__pyx_k_dups), 0, 0, 1, 1}, {&__pyx_n_s_e, __pyx_k_e, sizeof(__pyx_k_e), 0, 0, 1, 1}, {&__pyx_n_s_empty, __pyx_k_empty, sizeof(__pyx_k_empty), 0, 0, 1, 1}, {&__pyx_n_s_empty_like, __pyx_k_empty_like, sizeof(__pyx_k_empty_like), 0, 0, 1, 1}, {&__pyx_n_s_end, __pyx_k_end, sizeof(__pyx_k_end), 0, 0, 1, 1}, {&__pyx_n_s_eq, __pyx_k_eq, sizeof(__pyx_k_eq), 0, 0, 1, 1}, {&__pyx_n_s_ewma, __pyx_k_ewma, sizeof(__pyx_k_ewma), 0, 0, 1, 1}, {&__pyx_n_s_expected_size, __pyx_k_expected_size, sizeof(__pyx_k_expected_size), 0, 0, 1, 1}, {&__pyx_n_s_f8, __pyx_k_f8, sizeof(__pyx_k_f8), 0, 0, 1, 1}, {&__pyx_n_s_f_contiguous, __pyx_k_f_contiguous, sizeof(__pyx_k_f_contiguous), 0, 0, 1, 1}, {&__pyx_n_s_ffill_by_group, __pyx_k_ffill_by_group, sizeof(__pyx_k_ffill_by_group), 0, 0, 1, 1}, {&__pyx_n_s_ffill_indexer, __pyx_k_ffill_indexer, sizeof(__pyx_k_ffill_indexer), 0, 0, 1, 1}, {&__pyx_n_s_fill, __pyx_k_fill, sizeof(__pyx_k_fill), 0, 0, 1, 1}, {&__pyx_n_s_fill_count, __pyx_k_fill_count, sizeof(__pyx_k_fill_count), 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_first, __pyx_k_first, sizeof(__pyx_k_first), 0, 0, 1, 1}, {&__pyx_kp_s_first_not_supported_for_non_nume, __pyx_k_first_not_supported_for_non_nume, sizeof(__pyx_k_first_not_supported_for_non_nume), 0, 0, 1, 0}, {&__pyx_n_s_flags, __pyx_k_flags, sizeof(__pyx_k_flags), 0, 0, 1, 1}, {&__pyx_n_s_float16, __pyx_k_float16, sizeof(__pyx_k_float16), 0, 0, 1, 1}, {&__pyx_n_s_float32, __pyx_k_float32, sizeof(__pyx_k_float32), 0, 0, 1, 1}, {&__pyx_n_s_float64, __pyx_k_float64, sizeof(__pyx_k_float64), 0, 0, 1, 1}, {&__pyx_n_s_full_outer_join, __pyx_k_full_outer_join, sizeof(__pyx_k_full_outer_join), 0, 0, 1, 1}, {&__pyx_n_s_func, __pyx_k_func, sizeof(__pyx_k_func), 0, 0, 1, 1}, {&__pyx_n_s_fv, __pyx_k_fv, sizeof(__pyx_k_fv), 0, 0, 1, 1}, {&__pyx_n_s_ge, __pyx_k_ge, sizeof(__pyx_k_ge), 0, 0, 1, 1}, {&__pyx_n_s_get, __pyx_k_get, sizeof(__pyx_k_get), 0, 0, 1, 1}, {&__pyx_n_s_get_result_indexer, __pyx_k_get_result_indexer, sizeof(__pyx_k_get_result_indexer), 0, 0, 1, 1}, {&__pyx_n_s_gid, __pyx_k_gid, sizeof(__pyx_k_gid), 0, 0, 1, 1}, {&__pyx_n_s_got_first, __pyx_k_got_first, sizeof(__pyx_k_got_first), 0, 0, 1, 1}, {&__pyx_n_s_group_add_bin_float32, __pyx_k_group_add_bin_float32, sizeof(__pyx_k_group_add_bin_float32), 0, 0, 1, 1}, {&__pyx_n_s_group_add_bin_float64, __pyx_k_group_add_bin_float64, sizeof(__pyx_k_group_add_bin_float64), 0, 0, 1, 1}, {&__pyx_n_s_group_add_float32, __pyx_k_group_add_float32, sizeof(__pyx_k_group_add_float32), 0, 0, 1, 1}, {&__pyx_n_s_group_add_float64, __pyx_k_group_add_float64, sizeof(__pyx_k_group_add_float64), 0, 0, 1, 1}, {&__pyx_n_s_group_ids, __pyx_k_group_ids, sizeof(__pyx_k_group_ids), 0, 0, 1, 1}, {&__pyx_n_s_group_labels, __pyx_k_group_labels, sizeof(__pyx_k_group_labels), 0, 0, 1, 1}, {&__pyx_n_s_group_last_bin_float32, __pyx_k_group_last_bin_float32, sizeof(__pyx_k_group_last_bin_float32), 0, 0, 1, 1}, {&__pyx_n_s_group_last_bin_float64, __pyx_k_group_last_bin_float64, sizeof(__pyx_k_group_last_bin_float64), 0, 0, 1, 1}, {&__pyx_n_s_group_last_bin_object, __pyx_k_group_last_bin_object, sizeof(__pyx_k_group_last_bin_object), 0, 0, 1, 1}, {&__pyx_n_s_group_last_float32, __pyx_k_group_last_float32, sizeof(__pyx_k_group_last_float32), 0, 0, 1, 1}, {&__pyx_n_s_group_last_float64, __pyx_k_group_last_float64, sizeof(__pyx_k_group_last_float64), 0, 0, 1, 1}, {&__pyx_n_s_group_last_object, __pyx_k_group_last_object, sizeof(__pyx_k_group_last_object), 0, 0, 1, 1}, {&__pyx_n_s_group_max_bin_float32, __pyx_k_group_max_bin_float32, sizeof(__pyx_k_group_max_bin_float32), 0, 0, 1, 1}, {&__pyx_n_s_group_max_bin_float64, __pyx_k_group_max_bin_float64, sizeof(__pyx_k_group_max_bin_float64), 0, 0, 1, 1}, {&__pyx_n_s_group_max_float32, __pyx_k_group_max_float32, sizeof(__pyx_k_group_max_float32), 0, 0, 1, 1}, {&__pyx_n_s_group_max_float64, __pyx_k_group_max_float64, sizeof(__pyx_k_group_max_float64), 0, 0, 1, 1}, {&__pyx_n_s_group_mean_bin_float32, __pyx_k_group_mean_bin_float32, sizeof(__pyx_k_group_mean_bin_float32), 0, 0, 1, 1}, {&__pyx_n_s_group_mean_bin_float64, __pyx_k_group_mean_bin_float64, sizeof(__pyx_k_group_mean_bin_float64), 0, 0, 1, 1}, {&__pyx_n_s_group_mean_float32, __pyx_k_group_mean_float32, sizeof(__pyx_k_group_mean_float32), 0, 0, 1, 1}, {&__pyx_n_s_group_mean_float64, __pyx_k_group_mean_float64, sizeof(__pyx_k_group_mean_float64), 0, 0, 1, 1}, {&__pyx_n_s_group_median, __pyx_k_group_median, sizeof(__pyx_k_group_median), 0, 0, 1, 1}, {&__pyx_n_s_group_min_bin_float32, __pyx_k_group_min_bin_float32, sizeof(__pyx_k_group_min_bin_float32), 0, 0, 1, 1}, {&__pyx_n_s_group_min_bin_float64, __pyx_k_group_min_bin_float64, sizeof(__pyx_k_group_min_bin_float64), 0, 0, 1, 1}, {&__pyx_n_s_group_min_float32, __pyx_k_group_min_float32, sizeof(__pyx_k_group_min_float32), 0, 0, 1, 1}, {&__pyx_n_s_group_min_float64, __pyx_k_group_min_float64, sizeof(__pyx_k_group_min_float64), 0, 0, 1, 1}, {&__pyx_n_s_group_nth_bin_float32, __pyx_k_group_nth_bin_float32, sizeof(__pyx_k_group_nth_bin_float32), 0, 0, 1, 1}, {&__pyx_n_s_group_nth_bin_float64, __pyx_k_group_nth_bin_float64, sizeof(__pyx_k_group_nth_bin_float64), 0, 0, 1, 1}, {&__pyx_n_s_group_nth_bin_object, __pyx_k_group_nth_bin_object, sizeof(__pyx_k_group_nth_bin_object), 0, 0, 1, 1}, {&__pyx_n_s_group_nth_float32, __pyx_k_group_nth_float32, sizeof(__pyx_k_group_nth_float32), 0, 0, 1, 1}, {&__pyx_n_s_group_nth_float64, __pyx_k_group_nth_float64, sizeof(__pyx_k_group_nth_float64), 0, 0, 1, 1}, {&__pyx_n_s_group_nth_object, __pyx_k_group_nth_object, sizeof(__pyx_k_group_nth_object), 0, 0, 1, 1}, {&__pyx_n_s_group_ohlc_float32, __pyx_k_group_ohlc_float32, sizeof(__pyx_k_group_ohlc_float32), 0, 0, 1, 1}, {&__pyx_n_s_group_ohlc_float64, __pyx_k_group_ohlc_float64, sizeof(__pyx_k_group_ohlc_float64), 0, 0, 1, 1}, {&__pyx_n_s_group_prod_bin_float32, __pyx_k_group_prod_bin_float32, sizeof(__pyx_k_group_prod_bin_float32), 0, 0, 1, 1}, {&__pyx_n_s_group_prod_bin_float64, __pyx_k_group_prod_bin_float64, sizeof(__pyx_k_group_prod_bin_float64), 0, 0, 1, 1}, {&__pyx_n_s_group_prod_float32, __pyx_k_group_prod_float32, sizeof(__pyx_k_group_prod_float32), 0, 0, 1, 1}, {&__pyx_n_s_group_prod_float64, __pyx_k_group_prod_float64, sizeof(__pyx_k_group_prod_float64), 0, 0, 1, 1}, {&__pyx_n_s_group_var_bin_float32, __pyx_k_group_var_bin_float32, sizeof(__pyx_k_group_var_bin_float32), 0, 0, 1, 1}, {&__pyx_n_s_group_var_bin_float64, __pyx_k_group_var_bin_float64, sizeof(__pyx_k_group_var_bin_float64), 0, 0, 1, 1}, {&__pyx_n_s_group_var_float32, __pyx_k_group_var_float32, sizeof(__pyx_k_group_var_float32), 0, 0, 1, 1}, {&__pyx_n_s_group_var_float64, __pyx_k_group_var_float64, sizeof(__pyx_k_group_var_float64), 0, 0, 1, 1}, {&__pyx_n_s_groupby_bool, __pyx_k_groupby_bool, sizeof(__pyx_k_groupby_bool), 0, 0, 1, 1}, {&__pyx_n_s_groupby_float32, __pyx_k_groupby_float32, sizeof(__pyx_k_groupby_float32), 0, 0, 1, 1}, {&__pyx_n_s_groupby_float64, __pyx_k_groupby_float64, sizeof(__pyx_k_groupby_float64), 0, 0, 1, 1}, {&__pyx_n_s_groupby_indices, __pyx_k_groupby_indices, sizeof(__pyx_k_groupby_indices), 0, 0, 1, 1}, {&__pyx_n_s_groupby_int32, __pyx_k_groupby_int32, sizeof(__pyx_k_groupby_int32), 0, 0, 1, 1}, {&__pyx_n_s_groupby_int64, __pyx_k_groupby_int64, sizeof(__pyx_k_groupby_int64), 0, 0, 1, 1}, {&__pyx_n_s_groupby_object, __pyx_k_groupby_object, sizeof(__pyx_k_groupby_object), 0, 0, 1, 1}, {&__pyx_n_s_groupsort_indexer, __pyx_k_groupsort_indexer, sizeof(__pyx_k_groupsort_indexer), 0, 0, 1, 1}, {&__pyx_n_s_gt, __pyx_k_gt, sizeof(__pyx_k_gt), 0, 0, 1, 1}, {&__pyx_kp_s_home_yoh_deb_gits_pkg_exppsy_pa, __pyx_k_home_yoh_deb_gits_pkg_exppsy_pa, sizeof(__pyx_k_home_yoh_deb_gits_pkg_exppsy_pa), 0, 0, 1, 0}, {&__pyx_n_s_hour, __pyx_k_hour, sizeof(__pyx_k_hour), 0, 0, 1, 1}, {&__pyx_n_s_i, __pyx_k_i, sizeof(__pyx_k_i), 0, 0, 1, 1}, {&__pyx_n_s_i0, __pyx_k_i0, sizeof(__pyx_k_i0), 0, 0, 1, 1}, {&__pyx_n_s_i8, __pyx_k_i8, sizeof(__pyx_k_i8), 0, 0, 1, 1}, {&__pyx_n_s_ids, __pyx_k_ids, sizeof(__pyx_k_ids), 0, 0, 1, 1}, {&__pyx_n_s_idx, __pyx_k_idx, sizeof(__pyx_k_idx), 0, 0, 1, 1}, {&__pyx_n_s_idx0, __pyx_k_idx0, sizeof(__pyx_k_idx0), 0, 0, 1, 1}, {&__pyx_n_s_idx1, __pyx_k_idx1, sizeof(__pyx_k_idx1), 0, 0, 1, 1}, {&__pyx_n_s_iinfo, __pyx_k_iinfo, sizeof(__pyx_k_iinfo), 0, 0, 1, 1}, {&__pyx_n_s_import, __pyx_k_import, sizeof(__pyx_k_import), 0, 0, 1, 1}, {&__pyx_n_s_in_arr, __pyx_k_in_arr, sizeof(__pyx_k_in_arr), 0, 0, 1, 1}, {&__pyx_n_s_in_i, __pyx_k_in_i, sizeof(__pyx_k_in_i), 0, 0, 1, 1}, {&__pyx_n_s_in_k, __pyx_k_in_k, sizeof(__pyx_k_in_k), 0, 0, 1, 1}, {&__pyx_n_s_in_n, __pyx_k_in_n, sizeof(__pyx_k_in_n), 0, 0, 1, 1}, {&__pyx_n_s_index, __pyx_k_index, sizeof(__pyx_k_index), 0, 0, 1, 1}, {&__pyx_kp_s_index_out_of_bounds, __pyx_k_index_out_of_bounds, sizeof(__pyx_k_index_out_of_bounds), 0, 0, 1, 0}, {&__pyx_n_s_indexer, __pyx_k_indexer, sizeof(__pyx_k_indexer), 0, 0, 1, 1}, {&__pyx_n_s_inf, __pyx_k_inf, sizeof(__pyx_k_inf), 0, 0, 1, 1}, {&__pyx_n_s_infs, __pyx_k_infs, sizeof(__pyx_k_infs), 0, 0, 1, 1}, {&__pyx_n_s_inner_join, __pyx_k_inner_join, sizeof(__pyx_k_inner_join), 0, 0, 1, 1}, {&__pyx_n_s_inner_join_indexer_float32, __pyx_k_inner_join_indexer_float32, sizeof(__pyx_k_inner_join_indexer_float32), 0, 0, 1, 1}, {&__pyx_n_s_inner_join_indexer_float64, __pyx_k_inner_join_indexer_float64, sizeof(__pyx_k_inner_join_indexer_float64), 0, 0, 1, 1}, {&__pyx_n_s_inner_join_indexer_int32, __pyx_k_inner_join_indexer_int32, sizeof(__pyx_k_inner_join_indexer_int32), 0, 0, 1, 1}, {&__pyx_n_s_inner_join_indexer_int64, __pyx_k_inner_join_indexer_int64, sizeof(__pyx_k_inner_join_indexer_int64), 0, 0, 1, 1}, {&__pyx_n_s_inner_join_indexer_object, __pyx_k_inner_join_indexer_object, sizeof(__pyx_k_inner_join_indexer_object), 0, 0, 1, 1}, {&__pyx_n_s_input, __pyx_k_input, sizeof(__pyx_k_input), 0, 0, 1, 1}, {&__pyx_n_s_insert, __pyx_k_insert, sizeof(__pyx_k_insert), 0, 0, 1, 1}, {&__pyx_n_s_int, __pyx_k_int, sizeof(__pyx_k_int), 0, 0, 1, 1}, {&__pyx_n_s_int16, __pyx_k_int16, sizeof(__pyx_k_int16), 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_is_lexsorted, __pyx_k_is_lexsorted, sizeof(__pyx_k_is_lexsorted), 0, 0, 1, 1}, {&__pyx_n_s_is_monotonic_bool, __pyx_k_is_monotonic_bool, sizeof(__pyx_k_is_monotonic_bool), 0, 0, 1, 1}, {&__pyx_n_s_is_monotonic_float32, __pyx_k_is_monotonic_float32, sizeof(__pyx_k_is_monotonic_float32), 0, 0, 1, 1}, {&__pyx_n_s_is_monotonic_float64, __pyx_k_is_monotonic_float64, sizeof(__pyx_k_is_monotonic_float64), 0, 0, 1, 1}, {&__pyx_n_s_is_monotonic_int32, __pyx_k_is_monotonic_int32, sizeof(__pyx_k_is_monotonic_int32), 0, 0, 1, 1}, {&__pyx_n_s_is_monotonic_int64, __pyx_k_is_monotonic_int64, sizeof(__pyx_k_is_monotonic_int64), 0, 0, 1, 1}, {&__pyx_n_s_is_monotonic_object, __pyx_k_is_monotonic_object, sizeof(__pyx_k_is_monotonic_object), 0, 0, 1, 1}, {&__pyx_n_s_is_unique, __pyx_k_is_unique, sizeof(__pyx_k_is_unique), 0, 0, 1, 1}, {&__pyx_n_s_isfinite, __pyx_k_isfinite, sizeof(__pyx_k_isfinite), 0, 0, 1, 1}, {&__pyx_n_s_isnan, __pyx_k_isnan, sizeof(__pyx_k_isnan), 0, 0, 1, 1}, {&__pyx_n_s_isnullobj, __pyx_k_isnullobj, sizeof(__pyx_k_isnullobj), 0, 0, 1, 1}, {&__pyx_n_s_isnullobj2d, __pyx_k_isnullobj2d, sizeof(__pyx_k_isnullobj2d), 0, 0, 1, 1}, {&__pyx_n_s_j, __pyx_k_j, sizeof(__pyx_k_j), 0, 0, 1, 1}, {&__pyx_n_s_k, __pyx_k_k, sizeof(__pyx_k_k), 0, 0, 1, 1}, {&__pyx_n_s_keep, __pyx_k_keep, sizeof(__pyx_k_keep), 0, 0, 1, 1}, {&__pyx_n_s_keep_na, __pyx_k_keep_na, sizeof(__pyx_k_keep_na), 0, 0, 1, 1}, {&__pyx_n_s_key, __pyx_k_key, sizeof(__pyx_k_key), 0, 0, 1, 1}, {&__pyx_n_s_kind, __pyx_k_kind, sizeof(__pyx_k_kind), 0, 0, 1, 1}, {&__pyx_n_s_kth_smallest, __pyx_k_kth_smallest, sizeof(__pyx_k_kth_smallest), 0, 0, 1, 1}, {&__pyx_n_s_l, __pyx_k_l, sizeof(__pyx_k_l), 0, 0, 1, 1}, {&__pyx_n_s_lab, __pyx_k_lab, sizeof(__pyx_k_lab), 0, 0, 1, 1}, {&__pyx_n_s_label, __pyx_k_label, sizeof(__pyx_k_label), 0, 0, 1, 1}, {&__pyx_n_s_labels, __pyx_k_labels, sizeof(__pyx_k_labels), 0, 0, 1, 1}, {&__pyx_n_s_lambda, __pyx_k_lambda, sizeof(__pyx_k_lambda), 0, 0, 1, 1}, {&__pyx_n_s_last, __pyx_k_last, sizeof(__pyx_k_last), 0, 0, 1, 1}, {&__pyx_n_s_last_obs, __pyx_k_last_obs, sizeof(__pyx_k_last_obs), 0, 0, 1, 1}, {&__pyx_n_s_lc, __pyx_k_lc, sizeof(__pyx_k_lc), 0, 0, 1, 1}, {&__pyx_n_s_le, __pyx_k_le, sizeof(__pyx_k_le), 0, 0, 1, 1}, {&__pyx_n_s_left, __pyx_k_left, sizeof(__pyx_k_left), 0, 0, 1, 1}, {&__pyx_n_s_left_count, __pyx_k_left_count, sizeof(__pyx_k_left_count), 0, 0, 1, 1}, {&__pyx_n_s_left_indexer, __pyx_k_left_indexer, sizeof(__pyx_k_left_indexer), 0, 0, 1, 1}, {&__pyx_n_s_left_join_indexer_float32, __pyx_k_left_join_indexer_float32, sizeof(__pyx_k_left_join_indexer_float32), 0, 0, 1, 1}, {&__pyx_n_s_left_join_indexer_float64, __pyx_k_left_join_indexer_float64, sizeof(__pyx_k_left_join_indexer_float64), 0, 0, 1, 1}, {&__pyx_n_s_left_join_indexer_int32, __pyx_k_left_join_indexer_int32, sizeof(__pyx_k_left_join_indexer_int32), 0, 0, 1, 1}, {&__pyx_n_s_left_join_indexer_int64, __pyx_k_left_join_indexer_int64, sizeof(__pyx_k_left_join_indexer_int64), 0, 0, 1, 1}, {&__pyx_n_s_left_join_indexer_object, __pyx_k_left_join_indexer_object, sizeof(__pyx_k_left_join_indexer_object), 0, 0, 1, 1}, {&__pyx_n_s_left_join_indexer_unique_float32, __pyx_k_left_join_indexer_unique_float32, sizeof(__pyx_k_left_join_indexer_unique_float32), 0, 0, 1, 1}, {&__pyx_n_s_left_join_indexer_unique_float64, __pyx_k_left_join_indexer_unique_float64, sizeof(__pyx_k_left_join_indexer_unique_float64), 0, 0, 1, 1}, {&__pyx_n_s_left_join_indexer_unique_int32, __pyx_k_left_join_indexer_unique_int32, sizeof(__pyx_k_left_join_indexer_unique_int32), 0, 0, 1, 1}, {&__pyx_n_s_left_join_indexer_unique_int64, __pyx_k_left_join_indexer_unique_int64, sizeof(__pyx_k_left_join_indexer_unique_int64), 0, 0, 1, 1}, {&__pyx_n_s_left_join_indexer_unique_object, __pyx_k_left_join_indexer_unique_object, sizeof(__pyx_k_left_join_indexer_unique_object), 0, 0, 1, 1}, {&__pyx_n_s_left_outer_join, __pyx_k_left_outer_join, sizeof(__pyx_k_left_outer_join), 0, 0, 1, 1}, {&__pyx_n_s_left_pos, __pyx_k_left_pos, sizeof(__pyx_k_left_pos), 0, 0, 1, 1}, {&__pyx_n_s_left_sorter, __pyx_k_left_sorter, sizeof(__pyx_k_left_sorter), 0, 0, 1, 1}, {&__pyx_kp_s_len_index_len_labels, __pyx_k_len_index_len_labels, sizeof(__pyx_k_len_index_len_labels), 0, 0, 1, 0}, {&__pyx_n_s_length, __pyx_k_length, sizeof(__pyx_k_length), 0, 0, 1, 1}, {&__pyx_n_s_lib, __pyx_k_lib, sizeof(__pyx_k_lib), 0, 0, 1, 1}, {&__pyx_n_s_lim, __pyx_k_lim, sizeof(__pyx_k_lim), 0, 0, 1, 1}, {&__pyx_n_s_limit, __pyx_k_limit, sizeof(__pyx_k_limit), 0, 0, 1, 1}, {&__pyx_n_s_lindexer, __pyx_k_lindexer, sizeof(__pyx_k_lindexer), 0, 0, 1, 1}, {&__pyx_n_s_list_of_arrays, __pyx_k_list_of_arrays, sizeof(__pyx_k_list_of_arrays), 0, 0, 1, 1}, {&__pyx_n_s_loc, __pyx_k_loc, sizeof(__pyx_k_loc), 0, 0, 1, 1}, {&__pyx_n_s_lt, __pyx_k_lt, sizeof(__pyx_k_lt), 0, 0, 1, 1}, {&__pyx_n_s_lval, __pyx_k_lval, sizeof(__pyx_k_lval), 0, 0, 1, 1}, {&__pyx_n_s_m, __pyx_k_m, sizeof(__pyx_k_m), 0, 0, 1, 1}, {&__pyx_n_s_main, __pyx_k_main, sizeof(__pyx_k_main), 0, 0, 1, 1}, {&__pyx_n_s_mask, __pyx_k_mask, sizeof(__pyx_k_mask), 0, 0, 1, 1}, {&__pyx_n_s_maskedx, __pyx_k_maskedx, sizeof(__pyx_k_maskedx), 0, 0, 1, 1}, {&__pyx_n_s_maskedy, __pyx_k_maskedy, sizeof(__pyx_k_maskedy), 0, 0, 1, 1}, {&__pyx_n_s_mat, __pyx_k_mat, sizeof(__pyx_k_mat), 0, 0, 1, 1}, {&__pyx_n_s_max, __pyx_k_max, sizeof(__pyx_k_max), 0, 0, 1, 1}, {&__pyx_n_s_max_group, __pyx_k_max_group, sizeof(__pyx_k_max_group), 0, 0, 1, 1}, {&__pyx_n_s_max_groups, __pyx_k_max_groups, sizeof(__pyx_k_max_groups), 0, 0, 1, 1}, {&__pyx_n_s_max_subseq, __pyx_k_max_subseq, sizeof(__pyx_k_max_subseq), 0, 0, 1, 1}, {&__pyx_n_s_maxx, __pyx_k_maxx, sizeof(__pyx_k_maxx), 0, 0, 1, 1}, {&__pyx_n_s_maybe_convert_objects, __pyx_k_maybe_convert_objects, sizeof(__pyx_k_maybe_convert_objects), 0, 0, 1, 1}, {&__pyx_n_s_mean, __pyx_k_mean, sizeof(__pyx_k_mean), 0, 0, 1, 1}, {&__pyx_n_s_meanx, __pyx_k_meanx, sizeof(__pyx_k_meanx), 0, 0, 1, 1}, {&__pyx_n_s_meany, __pyx_k_meany, sizeof(__pyx_k_meany), 0, 0, 1, 1}, {&__pyx_n_s_median, __pyx_k_median, sizeof(__pyx_k_median), 0, 0, 1, 1}, {&__pyx_n_s_members, __pyx_k_members, sizeof(__pyx_k_members), 0, 0, 1, 1}, {&__pyx_n_s_mergesort, __pyx_k_mergesort, sizeof(__pyx_k_mergesort), 0, 0, 1, 1}, {&__pyx_n_s_metaclass, __pyx_k_metaclass, sizeof(__pyx_k_metaclass), 0, 0, 1, 1}, {&__pyx_n_s_microsecond, __pyx_k_microsecond, sizeof(__pyx_k_microsecond), 0, 0, 1, 1}, {&__pyx_n_s_midpoint, __pyx_k_midpoint, sizeof(__pyx_k_midpoint), 0, 0, 1, 1}, {&__pyx_n_s_min, __pyx_k_min, sizeof(__pyx_k_min), 0, 0, 1, 1}, {&__pyx_kp_s_min_periods_d_must_be_window_d, __pyx_k_min_periods_d_must_be_window_d, sizeof(__pyx_k_min_periods_d_must_be_window_d), 0, 0, 1, 0}, {&__pyx_kp_s_min_periods_must_be_0, __pyx_k_min_periods_must_be_0, sizeof(__pyx_k_min_periods_must_be_0), 0, 0, 1, 0}, {&__pyx_n_s_min_subseq, __pyx_k_min_subseq, sizeof(__pyx_k_min_subseq), 0, 0, 1, 1}, {&__pyx_n_s_minp, __pyx_k_minp, sizeof(__pyx_k_minp), 0, 0, 1, 1}, {&__pyx_n_s_minpair, __pyx_k_minpair, sizeof(__pyx_k_minpair), 0, 0, 1, 1}, {&__pyx_n_s_minute, __pyx_k_minute, sizeof(__pyx_k_minute), 0, 0, 1, 1}, {&__pyx_n_s_minx, __pyx_k_minx, sizeof(__pyx_k_minx), 0, 0, 1, 1}, {&__pyx_n_s_module, __pyx_k_module, sizeof(__pyx_k_module), 0, 0, 1, 1}, {&__pyx_n_s_month, __pyx_k_month, sizeof(__pyx_k_month), 0, 0, 1, 1}, {&__pyx_n_s_n, __pyx_k_n, sizeof(__pyx_k_n), 0, 0, 1, 1}, {&__pyx_n_s_n0, __pyx_k_n0, sizeof(__pyx_k_n0), 0, 0, 1, 1}, {&__pyx_n_s_na_option, __pyx_k_na_option, sizeof(__pyx_k_na_option), 0, 0, 1, 1}, {&__pyx_n_s_nan, __pyx_k_nan, sizeof(__pyx_k_nan), 0, 0, 1, 1}, {&__pyx_n_s_nan_value, __pyx_k_nan_value, sizeof(__pyx_k_nan_value), 0, 0, 1, 1}, {&__pyx_n_s_nancorr, __pyx_k_nancorr, sizeof(__pyx_k_nancorr), 0, 0, 1, 1}, {&__pyx_n_s_nancorr_spearman, __pyx_k_nancorr_spearman, sizeof(__pyx_k_nancorr_spearman), 0, 0, 1, 1}, {&__pyx_n_s_nbins, __pyx_k_nbins, sizeof(__pyx_k_nbins), 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_ne, __pyx_k_ne, sizeof(__pyx_k_ne), 0, 0, 1, 1}, {&__pyx_n_s_neg_ct, __pyx_k_neg_ct, sizeof(__pyx_k_neg_ct), 0, 0, 1, 1}, {&__pyx_n_s_new, __pyx_k_new, sizeof(__pyx_k_new), 0, 0, 1, 1}, {&__pyx_n_s_neww, __pyx_k_neww, sizeof(__pyx_k_neww), 0, 0, 1, 1}, {&__pyx_n_s_next, __pyx_k_next, sizeof(__pyx_k_next), 0, 0, 1, 1}, {&__pyx_n_s_ngroups, __pyx_k_ngroups, sizeof(__pyx_k_ngroups), 0, 0, 1, 1}, {&__pyx_n_s_nleft, __pyx_k_nleft, sizeof(__pyx_k_nleft), 0, 0, 1, 1}, {&__pyx_n_s_nlevels, __pyx_k_nlevels, sizeof(__pyx_k_nlevels), 0, 0, 1, 1}, {&__pyx_n_s_nobs, __pyx_k_nobs, sizeof(__pyx_k_nobs), 0, 0, 1, 1}, {&__pyx_n_s_nonzero, __pyx_k_nonzero, sizeof(__pyx_k_nonzero), 0, 0, 1, 1}, {&__pyx_n_s_np, __pyx_k_np, sizeof(__pyx_k_np), 0, 0, 1, 1}, {&__pyx_n_s_nright, __pyx_k_nright, sizeof(__pyx_k_nright), 0, 0, 1, 1}, {&__pyx_n_s_numpy, __pyx_k_numpy, sizeof(__pyx_k_numpy), 0, 0, 1, 1}, {&__pyx_n_s_o, __pyx_k_o, sizeof(__pyx_k_o), 0, 0, 1, 1}, {&__pyx_n_s_object, __pyx_k_object, sizeof(__pyx_k_object), 0, 0, 1, 1}, {&__pyx_n_s_object_2, __pyx_k_object_2, sizeof(__pyx_k_object_2), 0, 0, 1, 1}, {&__pyx_n_s_offset, __pyx_k_offset, sizeof(__pyx_k_offset), 0, 0, 1, 1}, {&__pyx_n_s_old, __pyx_k_old, sizeof(__pyx_k_old), 0, 0, 1, 1}, {&__pyx_n_s_oldbuf, __pyx_k_oldbuf, sizeof(__pyx_k_oldbuf), 0, 0, 1, 1}, {&__pyx_n_s_oldw, __pyx_k_oldw, sizeof(__pyx_k_oldw), 0, 0, 1, 1}, {&__pyx_n_s_ones_like, __pyx_k_ones_like, sizeof(__pyx_k_ones_like), 0, 0, 1, 1}, {&__pyx_n_s_other, __pyx_k_other, sizeof(__pyx_k_other), 0, 0, 1, 1}, {&__pyx_n_s_out, __pyx_k_out, sizeof(__pyx_k_out), 0, 0, 1, 1}, {&__pyx_n_s_outer_join_indexer_float32, __pyx_k_outer_join_indexer_float32, sizeof(__pyx_k_outer_join_indexer_float32), 0, 0, 1, 1}, {&__pyx_n_s_outer_join_indexer_float64, __pyx_k_outer_join_indexer_float64, sizeof(__pyx_k_outer_join_indexer_float64), 0, 0, 1, 1}, {&__pyx_n_s_outer_join_indexer_int32, __pyx_k_outer_join_indexer_int32, sizeof(__pyx_k_outer_join_indexer_int32), 0, 0, 1, 1}, {&__pyx_n_s_outer_join_indexer_int64, __pyx_k_outer_join_indexer_int64, sizeof(__pyx_k_outer_join_indexer_int64), 0, 0, 1, 1}, {&__pyx_n_s_outer_join_indexer_object, __pyx_k_outer_join_indexer_object, sizeof(__pyx_k_outer_join_indexer_object), 0, 0, 1, 1}, {&__pyx_n_s_output, __pyx_k_output, sizeof(__pyx_k_output), 0, 0, 1, 1}, {&__pyx_n_s_pad_2d_inplace_bool, __pyx_k_pad_2d_inplace_bool, sizeof(__pyx_k_pad_2d_inplace_bool), 0, 0, 1, 1}, {&__pyx_n_s_pad_2d_inplace_float32, __pyx_k_pad_2d_inplace_float32, sizeof(__pyx_k_pad_2d_inplace_float32), 0, 0, 1, 1}, {&__pyx_n_s_pad_2d_inplace_float64, __pyx_k_pad_2d_inplace_float64, sizeof(__pyx_k_pad_2d_inplace_float64), 0, 0, 1, 1}, {&__pyx_n_s_pad_2d_inplace_int32, __pyx_k_pad_2d_inplace_int32, sizeof(__pyx_k_pad_2d_inplace_int32), 0, 0, 1, 1}, {&__pyx_n_s_pad_2d_inplace_int64, __pyx_k_pad_2d_inplace_int64, sizeof(__pyx_k_pad_2d_inplace_int64), 0, 0, 1, 1}, {&__pyx_n_s_pad_2d_inplace_object, __pyx_k_pad_2d_inplace_object, sizeof(__pyx_k_pad_2d_inplace_object), 0, 0, 1, 1}, {&__pyx_n_s_pad_bool, __pyx_k_pad_bool, sizeof(__pyx_k_pad_bool), 0, 0, 1, 1}, {&__pyx_n_s_pad_float32, __pyx_k_pad_float32, sizeof(__pyx_k_pad_float32), 0, 0, 1, 1}, {&__pyx_n_s_pad_float64, __pyx_k_pad_float64, sizeof(__pyx_k_pad_float64), 0, 0, 1, 1}, {&__pyx_n_s_pad_inplace_bool, __pyx_k_pad_inplace_bool, sizeof(__pyx_k_pad_inplace_bool), 0, 0, 1, 1}, {&__pyx_n_s_pad_inplace_float32, __pyx_k_pad_inplace_float32, sizeof(__pyx_k_pad_inplace_float32), 0, 0, 1, 1}, {&__pyx_n_s_pad_inplace_float64, __pyx_k_pad_inplace_float64, sizeof(__pyx_k_pad_inplace_float64), 0, 0, 1, 1}, {&__pyx_n_s_pad_inplace_int32, __pyx_k_pad_inplace_int32, sizeof(__pyx_k_pad_inplace_int32), 0, 0, 1, 1}, {&__pyx_n_s_pad_inplace_int64, __pyx_k_pad_inplace_int64, sizeof(__pyx_k_pad_inplace_int64), 0, 0, 1, 1}, {&__pyx_n_s_pad_inplace_object, __pyx_k_pad_inplace_object, sizeof(__pyx_k_pad_inplace_object), 0, 0, 1, 1}, {&__pyx_n_s_pad_int32, __pyx_k_pad_int32, sizeof(__pyx_k_pad_int32), 0, 0, 1, 1}, {&__pyx_n_s_pad_int64, __pyx_k_pad_int64, sizeof(__pyx_k_pad_int64), 0, 0, 1, 1}, {&__pyx_n_s_pad_object, __pyx_k_pad_object, sizeof(__pyx_k_pad_object), 0, 0, 1, 1}, {&__pyx_n_s_pandas, __pyx_k_pandas, sizeof(__pyx_k_pandas), 0, 0, 1, 1}, {&__pyx_n_s_pandas_algos, __pyx_k_pandas_algos, sizeof(__pyx_k_pandas_algos), 0, 0, 1, 1}, {&__pyx_n_s_pandas_lib, __pyx_k_pandas_lib, sizeof(__pyx_k_pandas_lib), 0, 0, 1, 1}, {&__pyx_kp_s_pandas_src_generated_pyx, __pyx_k_pandas_src_generated_pyx, sizeof(__pyx_k_pandas_src_generated_pyx), 0, 0, 1, 0}, {&__pyx_kp_s_pandas_src_join_pyx, __pyx_k_pandas_src_join_pyx, sizeof(__pyx_k_pandas_src_join_pyx), 0, 0, 1, 0}, {&__pyx_n_s_periods, __pyx_k_periods, sizeof(__pyx_k_periods), 0, 0, 1, 1}, {&__pyx_n_s_position, __pyx_k_position, sizeof(__pyx_k_position), 0, 0, 1, 1}, {&__pyx_n_s_pre, __pyx_k_pre, sizeof(__pyx_k_pre), 0, 0, 1, 1}, {&__pyx_n_s_prepare, __pyx_k_prepare, sizeof(__pyx_k_prepare), 0, 0, 1, 1}, {&__pyx_n_s_prev, __pyx_k_prev, sizeof(__pyx_k_prev), 0, 0, 1, 1}, {&__pyx_n_s_prodx, __pyx_k_prodx, sizeof(__pyx_k_prodx), 0, 0, 1, 1}, {&__pyx_n_s_ptr, __pyx_k_ptr, sizeof(__pyx_k_ptr), 0, 0, 1, 1}, {&__pyx_n_s_put, __pyx_k_put, sizeof(__pyx_k_put), 0, 0, 1, 1}, {&__pyx_n_s_putmask, __pyx_k_putmask, sizeof(__pyx_k_putmask), 0, 0, 1, 1}, {&__pyx_n_s_pydatetime, __pyx_k_pydatetime, sizeof(__pyx_k_pydatetime), 0, 0, 1, 1}, {&__pyx_n_s_pyx_getbuffer, __pyx_k_pyx_getbuffer, sizeof(__pyx_k_pyx_getbuffer), 0, 0, 1, 1}, {&__pyx_n_s_pyx_releasebuffer, __pyx_k_pyx_releasebuffer, sizeof(__pyx_k_pyx_releasebuffer), 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_qualname, __pyx_k_qualname, sizeof(__pyx_k_qualname), 0, 0, 1, 1}, {&__pyx_n_s_quantile, __pyx_k_quantile, sizeof(__pyx_k_quantile), 0, 0, 1, 1}, {&__pyx_n_s_random, __pyx_k_random, sizeof(__pyx_k_random), 0, 0, 1, 1}, {&__pyx_n_s_range, __pyx_k_range, sizeof(__pyx_k_range), 0, 0, 1, 1}, {&__pyx_n_s_rank, __pyx_k_rank, sizeof(__pyx_k_rank), 0, 0, 1, 1}, {&__pyx_n_s_rank_1d_float64, __pyx_k_rank_1d_float64, sizeof(__pyx_k_rank_1d_float64), 0, 0, 1, 1}, {&__pyx_n_s_rank_1d_generic, __pyx_k_rank_1d_generic, sizeof(__pyx_k_rank_1d_generic), 0, 0, 1, 1}, {&__pyx_n_s_rank_1d_int64, __pyx_k_rank_1d_int64, sizeof(__pyx_k_rank_1d_int64), 0, 0, 1, 1}, {&__pyx_n_s_rank_2d_float64, __pyx_k_rank_2d_float64, sizeof(__pyx_k_rank_2d_float64), 0, 0, 1, 1}, {&__pyx_n_s_rank_2d_generic, __pyx_k_rank_2d_generic, sizeof(__pyx_k_rank_2d_generic), 0, 0, 1, 1}, {&__pyx_n_s_rank_2d_int64, __pyx_k_rank_2d_int64, sizeof(__pyx_k_rank_2d_int64), 0, 0, 1, 1}, {&__pyx_n_s_ranks, __pyx_k_ranks, sizeof(__pyx_k_ranks), 0, 0, 1, 1}, {&__pyx_n_s_rc, __pyx_k_rc, sizeof(__pyx_k_rc), 0, 0, 1, 1}, {&__pyx_n_s_remove, __pyx_k_remove, sizeof(__pyx_k_remove), 0, 0, 1, 1}, {&__pyx_n_s_res, __pyx_k_res, sizeof(__pyx_k_res), 0, 0, 1, 1}, {&__pyx_n_s_result, __pyx_k_result, sizeof(__pyx_k_result), 0, 0, 1, 1}, {&__pyx_n_s_resx, __pyx_k_resx, sizeof(__pyx_k_resx), 0, 0, 1, 1}, {&__pyx_n_s_ret, __pyx_k_ret, sizeof(__pyx_k_ret), 0, 0, 1, 1}, {&__pyx_n_s_retry, __pyx_k_retry, sizeof(__pyx_k_retry), 0, 0, 1, 1}, {&__pyx_n_s_return_false, __pyx_k_return_false, sizeof(__pyx_k_return_false), 0, 0, 1, 1}, {&__pyx_n_s_return_true, __pyx_k_return_true, sizeof(__pyx_k_return_true), 0, 0, 1, 1}, {&__pyx_n_s_rev, __pyx_k_rev, sizeof(__pyx_k_rev), 0, 0, 1, 1}, {&__pyx_n_s_reverse, __pyx_k_reverse, sizeof(__pyx_k_reverse), 0, 0, 1, 1}, {&__pyx_n_s_right, __pyx_k_right, sizeof(__pyx_k_right), 0, 0, 1, 1}, {&__pyx_n_s_right_count, __pyx_k_right_count, sizeof(__pyx_k_right_count), 0, 0, 1, 1}, {&__pyx_n_s_right_indexer, __pyx_k_right_indexer, sizeof(__pyx_k_right_indexer), 0, 0, 1, 1}, {&__pyx_n_s_right_pos, __pyx_k_right_pos, sizeof(__pyx_k_right_pos), 0, 0, 1, 1}, {&__pyx_n_s_right_sorter, __pyx_k_right_sorter, sizeof(__pyx_k_right_sorter), 0, 0, 1, 1}, {&__pyx_n_s_rindexer, __pyx_k_rindexer, sizeof(__pyx_k_rindexer), 0, 0, 1, 1}, {&__pyx_n_s_ring, __pyx_k_ring, sizeof(__pyx_k_ring), 0, 0, 1, 1}, {&__pyx_n_s_roll_generic, __pyx_k_roll_generic, sizeof(__pyx_k_roll_generic), 0, 0, 1, 1}, {&__pyx_n_s_roll_kurt, __pyx_k_roll_kurt, sizeof(__pyx_k_roll_kurt), 0, 0, 1, 1}, {&__pyx_n_s_roll_max, __pyx_k_roll_max, sizeof(__pyx_k_roll_max), 0, 0, 1, 1}, {&__pyx_n_s_roll_max2, __pyx_k_roll_max2, sizeof(__pyx_k_roll_max2), 0, 0, 1, 1}, {&__pyx_n_s_roll_mean, __pyx_k_roll_mean, sizeof(__pyx_k_roll_mean), 0, 0, 1, 1}, {&__pyx_n_s_roll_median_c, __pyx_k_roll_median_c, sizeof(__pyx_k_roll_median_c), 0, 0, 1, 1}, {&__pyx_n_s_roll_median_cython, __pyx_k_roll_median_cython, sizeof(__pyx_k_roll_median_cython), 0, 0, 1, 1}, {&__pyx_n_s_roll_min, __pyx_k_roll_min, sizeof(__pyx_k_roll_min), 0, 0, 1, 1}, {&__pyx_n_s_roll_min2, __pyx_k_roll_min2, sizeof(__pyx_k_roll_min2), 0, 0, 1, 1}, {&__pyx_n_s_roll_quantile, __pyx_k_roll_quantile, sizeof(__pyx_k_roll_quantile), 0, 0, 1, 1}, {&__pyx_n_s_roll_skew, __pyx_k_roll_skew, sizeof(__pyx_k_roll_skew), 0, 0, 1, 1}, {&__pyx_n_s_roll_sum, __pyx_k_roll_sum, sizeof(__pyx_k_roll_sum), 0, 0, 1, 1}, {&__pyx_n_s_roll_var, __pyx_k_roll_var, sizeof(__pyx_k_roll_var), 0, 0, 1, 1}, {&__pyx_n_s_roll_window, __pyx_k_roll_window, sizeof(__pyx_k_roll_window), 0, 0, 1, 1}, {&__pyx_n_s_rval, __pyx_k_rval, sizeof(__pyx_k_rval), 0, 0, 1, 1}, {&__pyx_n_s_s, __pyx_k_s, sizeof(__pyx_k_s), 0, 0, 1, 1}, {&__pyx_n_s_second, __pyx_k_second, sizeof(__pyx_k_second), 0, 0, 1, 1}, {&__pyx_n_s_seen, __pyx_k_seen, sizeof(__pyx_k_seen), 0, 0, 1, 1}, {&__pyx_n_s_self, __pyx_k_self, sizeof(__pyx_k_self), 0, 0, 1, 1}, {&__pyx_n_s_shape, __pyx_k_shape, sizeof(__pyx_k_shape), 0, 0, 1, 1}, {&__pyx_n_s_size, __pyx_k_size, sizeof(__pyx_k_size), 0, 0, 1, 1}, {&__pyx_n_s_skiplist, __pyx_k_skiplist, sizeof(__pyx_k_skiplist), 0, 0, 1, 1}, {&__pyx_n_s_sl, __pyx_k_sl, sizeof(__pyx_k_sl), 0, 0, 1, 1}, {&__pyx_n_s_sort, __pyx_k_sort, sizeof(__pyx_k_sort), 0, 0, 1, 1}, {&__pyx_n_s_sorted_data, __pyx_k_sorted_data, sizeof(__pyx_k_sorted_data), 0, 0, 1, 1}, {&__pyx_n_s_sorter, __pyx_k_sorter, sizeof(__pyx_k_sorter), 0, 0, 1, 1}, {&__pyx_n_s_start, __pyx_k_start, sizeof(__pyx_k_start), 0, 0, 1, 1}, {&__pyx_n_s_stop, __pyx_k_stop, sizeof(__pyx_k_stop), 0, 0, 1, 1}, {&__pyx_n_s_sum_ranks, __pyx_k_sum_ranks, sizeof(__pyx_k_sum_ranks), 0, 0, 1, 1}, {&__pyx_n_s_sum_x, __pyx_k_sum_x, sizeof(__pyx_k_sum_x), 0, 0, 1, 1}, {&__pyx_n_s_sum_xx, __pyx_k_sum_xx, sizeof(__pyx_k_sum_xx), 0, 0, 1, 1}, {&__pyx_n_s_sumx, __pyx_k_sumx, sizeof(__pyx_k_sumx), 0, 0, 1, 1}, {&__pyx_n_s_sumxx, __pyx_k_sumxx, sizeof(__pyx_k_sumxx), 0, 0, 1, 1}, {&__pyx_n_s_sumy, __pyx_k_sumy, sizeof(__pyx_k_sumy), 0, 0, 1, 1}, {&__pyx_n_s_sumyy, __pyx_k_sumyy, sizeof(__pyx_k_sumyy), 0, 0, 1, 1}, {&__pyx_n_s_sx, __pyx_k_sx, sizeof(__pyx_k_sx), 0, 0, 1, 1}, {&__pyx_n_s_sy, __pyx_k_sy, sizeof(__pyx_k_sy), 0, 0, 1, 1}, {&__pyx_n_s_t, __pyx_k_t, sizeof(__pyx_k_t), 0, 0, 1, 1}, {&__pyx_n_s_take, __pyx_k_take, sizeof(__pyx_k_take), 0, 0, 1, 1}, {&__pyx_n_s_take_1d_bool_bool, __pyx_k_take_1d_bool_bool, sizeof(__pyx_k_take_1d_bool_bool), 0, 0, 1, 1}, {&__pyx_n_s_take_1d_bool_object, __pyx_k_take_1d_bool_object, sizeof(__pyx_k_take_1d_bool_object), 0, 0, 1, 1}, {&__pyx_n_s_take_1d_float32_float32, __pyx_k_take_1d_float32_float32, sizeof(__pyx_k_take_1d_float32_float32), 0, 0, 1, 1}, {&__pyx_n_s_take_1d_float32_float64, __pyx_k_take_1d_float32_float64, sizeof(__pyx_k_take_1d_float32_float64), 0, 0, 1, 1}, {&__pyx_n_s_take_1d_float64_float64, __pyx_k_take_1d_float64_float64, sizeof(__pyx_k_take_1d_float64_float64), 0, 0, 1, 1}, {&__pyx_n_s_take_1d_int16_float64, __pyx_k_take_1d_int16_float64, sizeof(__pyx_k_take_1d_int16_float64), 0, 0, 1, 1}, {&__pyx_n_s_take_1d_int16_int16, __pyx_k_take_1d_int16_int16, sizeof(__pyx_k_take_1d_int16_int16), 0, 0, 1, 1}, {&__pyx_n_s_take_1d_int16_int32, __pyx_k_take_1d_int16_int32, sizeof(__pyx_k_take_1d_int16_int32), 0, 0, 1, 1}, {&__pyx_n_s_take_1d_int16_int64, __pyx_k_take_1d_int16_int64, sizeof(__pyx_k_take_1d_int16_int64), 0, 0, 1, 1}, {&__pyx_n_s_take_1d_int32_float64, __pyx_k_take_1d_int32_float64, sizeof(__pyx_k_take_1d_int32_float64), 0, 0, 1, 1}, {&__pyx_n_s_take_1d_int32_int32, __pyx_k_take_1d_int32_int32, sizeof(__pyx_k_take_1d_int32_int32), 0, 0, 1, 1}, {&__pyx_n_s_take_1d_int32_int64, __pyx_k_take_1d_int32_int64, sizeof(__pyx_k_take_1d_int32_int64), 0, 0, 1, 1}, {&__pyx_n_s_take_1d_int64_float64, __pyx_k_take_1d_int64_float64, sizeof(__pyx_k_take_1d_int64_float64), 0, 0, 1, 1}, {&__pyx_n_s_take_1d_int64_int64, __pyx_k_take_1d_int64_int64, sizeof(__pyx_k_take_1d_int64_int64), 0, 0, 1, 1}, {&__pyx_n_s_take_1d_int8_float64, __pyx_k_take_1d_int8_float64, sizeof(__pyx_k_take_1d_int8_float64), 0, 0, 1, 1}, {&__pyx_n_s_take_1d_int8_int32, __pyx_k_take_1d_int8_int32, sizeof(__pyx_k_take_1d_int8_int32), 0, 0, 1, 1}, {&__pyx_n_s_take_1d_int8_int64, __pyx_k_take_1d_int8_int64, sizeof(__pyx_k_take_1d_int8_int64), 0, 0, 1, 1}, {&__pyx_n_s_take_1d_int8_int8, __pyx_k_take_1d_int8_int8, sizeof(__pyx_k_take_1d_int8_int8), 0, 0, 1, 1}, {&__pyx_n_s_take_1d_object_object, __pyx_k_take_1d_object_object, sizeof(__pyx_k_take_1d_object_object), 0, 0, 1, 1}, {&__pyx_n_s_take_2d_axis0_bool_bool, __pyx_k_take_2d_axis0_bool_bool, sizeof(__pyx_k_take_2d_axis0_bool_bool), 0, 0, 1, 1}, {&__pyx_n_s_take_2d_axis0_bool_object, __pyx_k_take_2d_axis0_bool_object, sizeof(__pyx_k_take_2d_axis0_bool_object), 0, 0, 1, 1}, {&__pyx_n_s_take_2d_axis0_float32_float32, __pyx_k_take_2d_axis0_float32_float32, sizeof(__pyx_k_take_2d_axis0_float32_float32), 0, 0, 1, 1}, {&__pyx_n_s_take_2d_axis0_float32_float64, __pyx_k_take_2d_axis0_float32_float64, sizeof(__pyx_k_take_2d_axis0_float32_float64), 0, 0, 1, 1}, {&__pyx_n_s_take_2d_axis0_float64_float64, __pyx_k_take_2d_axis0_float64_float64, sizeof(__pyx_k_take_2d_axis0_float64_float64), 0, 0, 1, 1}, {&__pyx_n_s_take_2d_axis0_int16_float64, __pyx_k_take_2d_axis0_int16_float64, sizeof(__pyx_k_take_2d_axis0_int16_float64), 0, 0, 1, 1}, {&__pyx_n_s_take_2d_axis0_int16_int16, __pyx_k_take_2d_axis0_int16_int16, sizeof(__pyx_k_take_2d_axis0_int16_int16), 0, 0, 1, 1}, {&__pyx_n_s_take_2d_axis0_int16_int32, __pyx_k_take_2d_axis0_int16_int32, sizeof(__pyx_k_take_2d_axis0_int16_int32), 0, 0, 1, 1}, {&__pyx_n_s_take_2d_axis0_int16_int64, __pyx_k_take_2d_axis0_int16_int64, sizeof(__pyx_k_take_2d_axis0_int16_int64), 0, 0, 1, 1}, {&__pyx_n_s_take_2d_axis0_int32_float64, __pyx_k_take_2d_axis0_int32_float64, sizeof(__pyx_k_take_2d_axis0_int32_float64), 0, 0, 1, 1}, {&__pyx_n_s_take_2d_axis0_int32_int32, __pyx_k_take_2d_axis0_int32_int32, sizeof(__pyx_k_take_2d_axis0_int32_int32), 0, 0, 1, 1}, {&__pyx_n_s_take_2d_axis0_int32_int64, __pyx_k_take_2d_axis0_int32_int64, sizeof(__pyx_k_take_2d_axis0_int32_int64), 0, 0, 1, 1}, {&__pyx_n_s_take_2d_axis0_int64_float64, __pyx_k_take_2d_axis0_int64_float64, sizeof(__pyx_k_take_2d_axis0_int64_float64), 0, 0, 1, 1}, {&__pyx_n_s_take_2d_axis0_int64_int64, __pyx_k_take_2d_axis0_int64_int64, sizeof(__pyx_k_take_2d_axis0_int64_int64), 0, 0, 1, 1}, {&__pyx_n_s_take_2d_axis0_int8_float64, __pyx_k_take_2d_axis0_int8_float64, sizeof(__pyx_k_take_2d_axis0_int8_float64), 0, 0, 1, 1}, {&__pyx_n_s_take_2d_axis0_int8_int32, __pyx_k_take_2d_axis0_int8_int32, sizeof(__pyx_k_take_2d_axis0_int8_int32), 0, 0, 1, 1}, {&__pyx_n_s_take_2d_axis0_int8_int64, __pyx_k_take_2d_axis0_int8_int64, sizeof(__pyx_k_take_2d_axis0_int8_int64), 0, 0, 1, 1}, {&__pyx_n_s_take_2d_axis0_int8_int8, __pyx_k_take_2d_axis0_int8_int8, sizeof(__pyx_k_take_2d_axis0_int8_int8), 0, 0, 1, 1}, {&__pyx_n_s_take_2d_axis0_object_object, __pyx_k_take_2d_axis0_object_object, sizeof(__pyx_k_take_2d_axis0_object_object), 0, 0, 1, 1}, {&__pyx_n_s_take_2d_axis1_bool_bool, __pyx_k_take_2d_axis1_bool_bool, sizeof(__pyx_k_take_2d_axis1_bool_bool), 0, 0, 1, 1}, {&__pyx_n_s_take_2d_axis1_bool_object, __pyx_k_take_2d_axis1_bool_object, sizeof(__pyx_k_take_2d_axis1_bool_object), 0, 0, 1, 1}, {&__pyx_n_s_take_2d_axis1_float32_float32, __pyx_k_take_2d_axis1_float32_float32, sizeof(__pyx_k_take_2d_axis1_float32_float32), 0, 0, 1, 1}, {&__pyx_n_s_take_2d_axis1_float32_float64, __pyx_k_take_2d_axis1_float32_float64, sizeof(__pyx_k_take_2d_axis1_float32_float64), 0, 0, 1, 1}, {&__pyx_n_s_take_2d_axis1_float64_float64, __pyx_k_take_2d_axis1_float64_float64, sizeof(__pyx_k_take_2d_axis1_float64_float64), 0, 0, 1, 1}, {&__pyx_n_s_take_2d_axis1_int16_float64, __pyx_k_take_2d_axis1_int16_float64, sizeof(__pyx_k_take_2d_axis1_int16_float64), 0, 0, 1, 1}, {&__pyx_n_s_take_2d_axis1_int16_int16, __pyx_k_take_2d_axis1_int16_int16, sizeof(__pyx_k_take_2d_axis1_int16_int16), 0, 0, 1, 1}, {&__pyx_n_s_take_2d_axis1_int16_int32, __pyx_k_take_2d_axis1_int16_int32, sizeof(__pyx_k_take_2d_axis1_int16_int32), 0, 0, 1, 1}, {&__pyx_n_s_take_2d_axis1_int16_int64, __pyx_k_take_2d_axis1_int16_int64, sizeof(__pyx_k_take_2d_axis1_int16_int64), 0, 0, 1, 1}, {&__pyx_n_s_take_2d_axis1_int32_float64, __pyx_k_take_2d_axis1_int32_float64, sizeof(__pyx_k_take_2d_axis1_int32_float64), 0, 0, 1, 1}, {&__pyx_n_s_take_2d_axis1_int32_int32, __pyx_k_take_2d_axis1_int32_int32, sizeof(__pyx_k_take_2d_axis1_int32_int32), 0, 0, 1, 1}, {&__pyx_n_s_take_2d_axis1_int32_int64, __pyx_k_take_2d_axis1_int32_int64, sizeof(__pyx_k_take_2d_axis1_int32_int64), 0, 0, 1, 1}, {&__pyx_n_s_take_2d_axis1_int64_float64, __pyx_k_take_2d_axis1_int64_float64, sizeof(__pyx_k_take_2d_axis1_int64_float64), 0, 0, 1, 1}, {&__pyx_n_s_take_2d_axis1_int64_int64, __pyx_k_take_2d_axis1_int64_int64, sizeof(__pyx_k_take_2d_axis1_int64_int64), 0, 0, 1, 1}, {&__pyx_n_s_take_2d_axis1_int8_float64, __pyx_k_take_2d_axis1_int8_float64, sizeof(__pyx_k_take_2d_axis1_int8_float64), 0, 0, 1, 1}, {&__pyx_n_s_take_2d_axis1_int8_int32, __pyx_k_take_2d_axis1_int8_int32, sizeof(__pyx_k_take_2d_axis1_int8_int32), 0, 0, 1, 1}, {&__pyx_n_s_take_2d_axis1_int8_int64, __pyx_k_take_2d_axis1_int8_int64, sizeof(__pyx_k_take_2d_axis1_int8_int64), 0, 0, 1, 1}, {&__pyx_n_s_take_2d_axis1_int8_int8, __pyx_k_take_2d_axis1_int8_int8, sizeof(__pyx_k_take_2d_axis1_int8_int8), 0, 0, 1, 1}, {&__pyx_n_s_take_2d_axis1_object_object, __pyx_k_take_2d_axis1_object_object, sizeof(__pyx_k_take_2d_axis1_object_object), 0, 0, 1, 1}, {&__pyx_n_s_take_2d_multi_bool_bool, __pyx_k_take_2d_multi_bool_bool, sizeof(__pyx_k_take_2d_multi_bool_bool), 0, 0, 1, 1}, {&__pyx_n_s_take_2d_multi_bool_object, __pyx_k_take_2d_multi_bool_object, sizeof(__pyx_k_take_2d_multi_bool_object), 0, 0, 1, 1}, {&__pyx_n_s_take_2d_multi_float32_float32, __pyx_k_take_2d_multi_float32_float32, sizeof(__pyx_k_take_2d_multi_float32_float32), 0, 0, 1, 1}, {&__pyx_n_s_take_2d_multi_float32_float64, __pyx_k_take_2d_multi_float32_float64, sizeof(__pyx_k_take_2d_multi_float32_float64), 0, 0, 1, 1}, {&__pyx_n_s_take_2d_multi_float64_float64, __pyx_k_take_2d_multi_float64_float64, sizeof(__pyx_k_take_2d_multi_float64_float64), 0, 0, 1, 1}, {&__pyx_n_s_take_2d_multi_int16_float64, __pyx_k_take_2d_multi_int16_float64, sizeof(__pyx_k_take_2d_multi_int16_float64), 0, 0, 1, 1}, {&__pyx_n_s_take_2d_multi_int16_int16, __pyx_k_take_2d_multi_int16_int16, sizeof(__pyx_k_take_2d_multi_int16_int16), 0, 0, 1, 1}, {&__pyx_n_s_take_2d_multi_int16_int32, __pyx_k_take_2d_multi_int16_int32, sizeof(__pyx_k_take_2d_multi_int16_int32), 0, 0, 1, 1}, {&__pyx_n_s_take_2d_multi_int16_int64, __pyx_k_take_2d_multi_int16_int64, sizeof(__pyx_k_take_2d_multi_int16_int64), 0, 0, 1, 1}, {&__pyx_n_s_take_2d_multi_int32_float64, __pyx_k_take_2d_multi_int32_float64, sizeof(__pyx_k_take_2d_multi_int32_float64), 0, 0, 1, 1}, {&__pyx_n_s_take_2d_multi_int32_int32, __pyx_k_take_2d_multi_int32_int32, sizeof(__pyx_k_take_2d_multi_int32_int32), 0, 0, 1, 1}, {&__pyx_n_s_take_2d_multi_int32_int64, __pyx_k_take_2d_multi_int32_int64, sizeof(__pyx_k_take_2d_multi_int32_int64), 0, 0, 1, 1}, {&__pyx_n_s_take_2d_multi_int64_float64, __pyx_k_take_2d_multi_int64_float64, sizeof(__pyx_k_take_2d_multi_int64_float64), 0, 0, 1, 1}, {&__pyx_n_s_take_2d_multi_int64_int64, __pyx_k_take_2d_multi_int64_int64, sizeof(__pyx_k_take_2d_multi_int64_int64), 0, 0, 1, 1}, {&__pyx_n_s_take_2d_multi_int8_float64, __pyx_k_take_2d_multi_int8_float64, sizeof(__pyx_k_take_2d_multi_int8_float64), 0, 0, 1, 1}, {&__pyx_n_s_take_2d_multi_int8_int32, __pyx_k_take_2d_multi_int8_int32, sizeof(__pyx_k_take_2d_multi_int8_int32), 0, 0, 1, 1}, {&__pyx_n_s_take_2d_multi_int8_int64, __pyx_k_take_2d_multi_int8_int64, sizeof(__pyx_k_take_2d_multi_int8_int64), 0, 0, 1, 1}, {&__pyx_n_s_take_2d_multi_int8_int8, __pyx_k_take_2d_multi_int8_int8, sizeof(__pyx_k_take_2d_multi_int8_int8), 0, 0, 1, 1}, {&__pyx_n_s_take_2d_multi_object_object, __pyx_k_take_2d_multi_object_object, sizeof(__pyx_k_take_2d_multi_object_object), 0, 0, 1, 1}, {&__pyx_n_s_test, __pyx_k_test, sizeof(__pyx_k_test), 0, 0, 1, 1}, {&__pyx_n_s_tiebreak, __pyx_k_tiebreak, sizeof(__pyx_k_tiebreak), 0, 0, 1, 1}, {&__pyx_n_s_tiebreakers, __pyx_k_tiebreakers, sizeof(__pyx_k_tiebreakers), 0, 0, 1, 1}, {&__pyx_n_s_ties_method, __pyx_k_ties_method, sizeof(__pyx_k_ties_method), 0, 0, 1, 1}, {&__pyx_n_s_top, __pyx_k_top, sizeof(__pyx_k_top), 0, 0, 1, 1}, {&__pyx_n_s_tot_wgt, __pyx_k_tot_wgt, sizeof(__pyx_k_tot_wgt), 0, 0, 1, 1}, {&__pyx_n_s_uint8, __pyx_k_uint8, sizeof(__pyx_k_uint8), 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_v, __pyx_k_v, sizeof(__pyx_k_v), 0, 0, 1, 1}, {&__pyx_n_s_val, __pyx_k_val, sizeof(__pyx_k_val), 0, 0, 1, 1}, {&__pyx_n_s_val_in, __pyx_k_val_in, sizeof(__pyx_k_val_in), 0, 0, 1, 1}, {&__pyx_n_s_val_win, __pyx_k_val_win, sizeof(__pyx_k_val_win), 0, 0, 1, 1}, {&__pyx_n_s_valid_locs, __pyx_k_valid_locs, sizeof(__pyx_k_valid_locs), 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_vclose, __pyx_k_vclose, sizeof(__pyx_k_vclose), 0, 0, 1, 1}, {&__pyx_n_s_vecs, __pyx_k_vecs, sizeof(__pyx_k_vecs), 0, 0, 1, 1}, {&__pyx_n_s_vhigh, __pyx_k_vhigh, sizeof(__pyx_k_vhigh), 0, 0, 1, 1}, {&__pyx_n_s_view, __pyx_k_view, sizeof(__pyx_k_view), 0, 0, 1, 1}, {&__pyx_n_s_vlow, __pyx_k_vlow, sizeof(__pyx_k_vlow), 0, 0, 1, 1}, {&__pyx_n_s_vopen, __pyx_k_vopen, sizeof(__pyx_k_vopen), 0, 0, 1, 1}, {&__pyx_n_s_vx, __pyx_k_vx, sizeof(__pyx_k_vx), 0, 0, 1, 1}, {&__pyx_n_s_vy, __pyx_k_vy, sizeof(__pyx_k_vy), 0, 0, 1, 1}, {&__pyx_n_s_w, __pyx_k_w, sizeof(__pyx_k_w), 0, 0, 1, 1}, {&__pyx_n_s_weights, __pyx_k_weights, sizeof(__pyx_k_weights), 0, 0, 1, 1}, {&__pyx_n_s_where, __pyx_k_where, sizeof(__pyx_k_where), 0, 0, 1, 1}, {&__pyx_n_s_width, __pyx_k_width, sizeof(__pyx_k_width), 0, 0, 1, 1}, {&__pyx_n_s_win, __pyx_k_win, sizeof(__pyx_k_win), 0, 0, 1, 1}, {&__pyx_n_s_win_i, __pyx_k_win_i, sizeof(__pyx_k_win_i), 0, 0, 1, 1}, {&__pyx_n_s_win_k, __pyx_k_win_k, sizeof(__pyx_k_win_k), 0, 0, 1, 1}, {&__pyx_n_s_win_n, __pyx_k_win_n, sizeof(__pyx_k_win_n), 0, 0, 1, 1}, {&__pyx_n_s_window, __pyx_k_window, sizeof(__pyx_k_window), 0, 0, 1, 1}, {&__pyx_n_s_x, __pyx_k_x, sizeof(__pyx_k_x), 0, 0, 1, 1}, {&__pyx_n_s_xi, __pyx_k_xi, sizeof(__pyx_k_xi), 0, 0, 1, 1}, {&__pyx_n_s_xx, __pyx_k_xx, sizeof(__pyx_k_xx), 0, 0, 1, 1}, {&__pyx_n_s_xxx, __pyx_k_xxx, sizeof(__pyx_k_xxx), 0, 0, 1, 1}, {&__pyx_n_s_xxxx, __pyx_k_xxxx, sizeof(__pyx_k_xxxx), 0, 0, 1, 1}, {&__pyx_n_s_y, __pyx_k_y, sizeof(__pyx_k_y), 0, 0, 1, 1}, {&__pyx_n_s_year, __pyx_k_year, sizeof(__pyx_k_year), 0, 0, 1, 1}, {&__pyx_n_s_yi, __pyx_k_yi, sizeof(__pyx_k_yi), 0, 0, 1, 1}, {&__pyx_n_s_z, __pyx_k_z, sizeof(__pyx_k_z), 0, 0, 1, 1}, {&__pyx_n_s_zeros, __pyx_k_zeros, sizeof(__pyx_k_zeros), 0, 0, 1, 1}, {&__pyx_n_s_zeros_like, __pyx_k_zeros_like, sizeof(__pyx_k_zeros_like), 0, 0, 1, 1}, {0, 0, 0, 0, 0, 0, 0} }; static int __Pyx_InitCachedBuiltins(void) { __pyx_builtin_object = __Pyx_GetBuiltinName(__pyx_n_s_object); if (!__pyx_builtin_object) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 505; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_range) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 73; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_builtin_KeyError = __Pyx_GetBuiltinName(__pyx_n_s_KeyError); if (!__pyx_builtin_KeyError) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 138; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_builtin_TypeError = __Pyx_GetBuiltinName(__pyx_n_s_TypeError); if (!__pyx_builtin_TypeError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 456; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_builtin_ValueError = __Pyx_GetBuiltinName(__pyx_n_s_ValueError); if (!__pyx_builtin_ValueError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 492; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_builtin_AssertionError = __Pyx_GetBuiltinName(__pyx_n_s_AssertionError); if (!__pyx_builtin_AssertionError) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1971; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_builtin_NotImplementedError = __Pyx_GetBuiltinName(__pyx_n_s_NotImplementedError); if (!__pyx_builtin_NotImplementedError) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6848; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_builtin_RuntimeError = __Pyx_GetBuiltinName(__pyx_n_s_RuntimeError); if (!__pyx_builtin_RuntimeError) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 803; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_builtin_IndexError = __Pyx_GetBuiltinName(__pyx_n_s_IndexError); if (!__pyx_builtin_IndexError) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 40; __pyx_clineno = __LINE__; goto __pyx_L1_error;} return 0; __pyx_L1_error:; return -1; } static int __Pyx_InitCachedConstants(void) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0); /* "pandas/src/skiplist.pyx":138 * * if value != ( ( ( chain[0]).next)[0]).value: * raise KeyError('Not Found') # <<<<<<<<<<<<<< * * # remove one link at each level */ __pyx_tuple_ = PyTuple_Pack(1, __pyx_kp_s_Not_Found); if (unlikely(!__pyx_tuple_)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 138; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple_); __Pyx_GIVEREF(__pyx_tuple_); /* "pandas/algos.pyx":173 * * if not ascending: * _as = _as[::-1] # <<<<<<<<<<<<<< * * sorted_data = values.take(_as) */ __pyx_slice__2 = PySlice_New(Py_None, Py_None, __pyx_int_neg_1); if (unlikely(!__pyx_slice__2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 173; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_slice__2); __Pyx_GIVEREF(__pyx_slice__2); /* "pandas/algos.pyx":176 * * sorted_data = values.take(_as) * argsorted = _as.astype('i8') # <<<<<<<<<<<<<< * * for i in range(n): */ __pyx_tuple__3 = PyTuple_Pack(1, __pyx_n_s_i8); if (unlikely(!__pyx_tuple__3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 176; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__3); __Pyx_GIVEREF(__pyx_tuple__3); /* "pandas/algos.pyx":236 * * if not ascending: * _as = _as[::-1] # <<<<<<<<<<<<<< * * sorted_data = values.take(_as) */ __pyx_slice__4 = PySlice_New(Py_None, Py_None, __pyx_int_neg_1); if (unlikely(!__pyx_slice__4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 236; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_slice__4); __Pyx_GIVEREF(__pyx_slice__4); /* "pandas/algos.pyx":239 * * sorted_data = values.take(_as) * argsorted = _as.astype('i8') # <<<<<<<<<<<<<< * * for i in range(n): */ __pyx_tuple__5 = PyTuple_Pack(1, __pyx_n_s_i8); if (unlikely(!__pyx_tuple__5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 239; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__5); __Pyx_GIVEREF(__pyx_tuple__5); /* "pandas/algos.pyx":307 * tiebreak = TIEBREAK_FIRST_DESCENDING * else: * _as = values.argsort(1) # <<<<<<<<<<<<<< * * if not ascending: */ __pyx_tuple__6 = PyTuple_Pack(1, __pyx_int_1); if (unlikely(!__pyx_tuple__6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 307; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__6); __Pyx_GIVEREF(__pyx_tuple__6); /* "pandas/algos.pyx":310 * * if not ascending: * _as = _as[:, ::-1] # <<<<<<<<<<<<<< * * values = _take_2d_float64(values, _as) */ __pyx_slice__7 = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_slice__7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 310; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_slice__7); __Pyx_GIVEREF(__pyx_slice__7); __pyx_slice__8 = PySlice_New(Py_None, Py_None, __pyx_int_neg_1); if (unlikely(!__pyx_slice__8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 310; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_slice__8); __Pyx_GIVEREF(__pyx_slice__8); __pyx_tuple__9 = PyTuple_Pack(2, __pyx_slice__7, __pyx_slice__8); if (unlikely(!__pyx_tuple__9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 310; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__9); __Pyx_GIVEREF(__pyx_tuple__9); /* "pandas/algos.pyx":313 * * values = _take_2d_float64(values, _as) * argsorted = _as.astype('i8') # <<<<<<<<<<<<<< * * for i in range(n): */ __pyx_tuple__10 = PyTuple_Pack(1, __pyx_n_s_i8); if (unlikely(!__pyx_tuple__10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 313; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__10); __Pyx_GIVEREF(__pyx_tuple__10); /* "pandas/algos.pyx":378 * tiebreak = TIEBREAK_FIRST_DESCENDING * else: * _as = values.argsort(1) # <<<<<<<<<<<<<< * * if not ascending: */ __pyx_tuple__11 = PyTuple_Pack(1, __pyx_int_1); if (unlikely(!__pyx_tuple__11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 378; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__11); __Pyx_GIVEREF(__pyx_tuple__11); /* "pandas/algos.pyx":381 * * if not ascending: * _as = _as[:, ::-1] # <<<<<<<<<<<<<< * * values = _take_2d_int64(values, _as) */ __pyx_slice__12 = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_slice__12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 381; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_slice__12); __Pyx_GIVEREF(__pyx_slice__12); __pyx_slice__13 = PySlice_New(Py_None, Py_None, __pyx_int_neg_1); if (unlikely(!__pyx_slice__13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 381; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_slice__13); __Pyx_GIVEREF(__pyx_slice__13); __pyx_tuple__14 = PyTuple_Pack(2, __pyx_slice__12, __pyx_slice__13); if (unlikely(!__pyx_tuple__14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 381; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__14); __Pyx_GIVEREF(__pyx_tuple__14); /* "pandas/algos.pyx":384 * * values = _take_2d_int64(values, _as) * argsorted = _as.astype('i8') # <<<<<<<<<<<<<< * * for i in range(n): */ __pyx_tuple__15 = PyTuple_Pack(1, __pyx_n_s_i8); if (unlikely(!__pyx_tuple__15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 384; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__15); __Pyx_GIVEREF(__pyx_tuple__15); /* "pandas/algos.pyx":439 * * if values.dtype != np.object_: * values = values.astype('O') # <<<<<<<<<<<<<< * * if ascending ^ (na_option == 'top'): */ __pyx_tuple__16 = PyTuple_Pack(1, __pyx_n_s_O); if (unlikely(!__pyx_tuple__16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 439; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__16); __Pyx_GIVEREF(__pyx_tuple__16); /* "pandas/algos.pyx":468 * * if not ascending: * _as = _as[::-1] # <<<<<<<<<<<<<< * * sorted_data = values.take(_as) */ __pyx_slice__17 = PySlice_New(Py_None, Py_None, __pyx_int_neg_1); if (unlikely(!__pyx_slice__17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 468; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_slice__17); __Pyx_GIVEREF(__pyx_slice__17); /* "pandas/algos.pyx":471 * * sorted_data = values.take(_as) * argsorted = _as.astype('i8') # <<<<<<<<<<<<<< * * for i in range(n): */ __pyx_tuple__18 = PyTuple_Pack(1, __pyx_n_s_i8); if (unlikely(!__pyx_tuple__18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 471; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__18); __Pyx_GIVEREF(__pyx_tuple__18); /* "pandas/algos.pyx":492 * ranks[argsorted[j]] = i + 1 * elif tiebreak == TIEBREAK_FIRST: * raise ValueError('first not supported for non-numeric data') # <<<<<<<<<<<<<< * sum_ranks = dups = 0 * return ranks */ __pyx_tuple__19 = PyTuple_Pack(1, __pyx_kp_s_first_not_supported_for_non_nume); if (unlikely(!__pyx_tuple__19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 492; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__19); __Pyx_GIVEREF(__pyx_tuple__19); /* "pandas/algos.pyx":553 * * if values.dtype != np.object_: * values = values.astype('O') # <<<<<<<<<<<<<< * * if ascending ^ (na_option == 'top'): */ __pyx_tuple__20 = PyTuple_Pack(1, __pyx_n_s_O); if (unlikely(!__pyx_tuple__20)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 553; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__20); __Pyx_GIVEREF(__pyx_tuple__20); /* "pandas/algos.pyx":568 * * try: * _as = values.argsort(1) # <<<<<<<<<<<<<< * except TypeError: * values = in_arr */ __pyx_tuple__21 = PyTuple_Pack(1, __pyx_int_1); if (unlikely(!__pyx_tuple__21)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 568; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__21); __Pyx_GIVEREF(__pyx_tuple__21); /* "pandas/algos.pyx":581 * * if not ascending: * _as = _as[:, ::-1] # <<<<<<<<<<<<<< * * values = _take_2d_object(values, _as) */ __pyx_slice__22 = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_slice__22)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 581; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_slice__22); __Pyx_GIVEREF(__pyx_slice__22); __pyx_slice__23 = PySlice_New(Py_None, Py_None, __pyx_int_neg_1); if (unlikely(!__pyx_slice__23)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 581; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_slice__23); __Pyx_GIVEREF(__pyx_slice__23); __pyx_tuple__24 = PyTuple_Pack(2, __pyx_slice__22, __pyx_slice__23); if (unlikely(!__pyx_tuple__24)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 581; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__24); __Pyx_GIVEREF(__pyx_tuple__24); /* "pandas/algos.pyx":584 * * values = _take_2d_object(values, _as) * argsorted = _as.astype('i8') # <<<<<<<<<<<<<< * * for i in range(n): */ __pyx_tuple__25 = PyTuple_Pack(1, __pyx_n_s_i8); if (unlikely(!__pyx_tuple__25)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 584; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__25); __Pyx_GIVEREF(__pyx_tuple__25); /* "pandas/algos.pyx":607 * ranks[i, argsorted[i, z]] = j + 1 * elif tiebreak == TIEBREAK_FIRST: * raise ValueError('first not supported for ' # <<<<<<<<<<<<<< * 'non-numeric data') * sum_ranks = dups = 0 */ __pyx_tuple__26 = PyTuple_Pack(1, __pyx_kp_s_first_not_supported_for_non_nume); if (unlikely(!__pyx_tuple__26)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 607; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__26); __Pyx_GIVEREF(__pyx_tuple__26); /* "pandas/algos.pyx":650 * minp = 1 * elif minp < 0: * raise ValueError('min_periods must be >= 0') # <<<<<<<<<<<<<< * return minp * */ __pyx_tuple__27 = PyTuple_Pack(1, __pyx_kp_s_min_periods_must_be_0); if (unlikely(!__pyx_tuple__27)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 650; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__27); __Pyx_GIVEREF(__pyx_tuple__27); /* "pandas/algos.pyx":753 * * if len(arr) == 0: * return (-1,-1,None) # <<<<<<<<<<<<<< * * m = arr[0] */ __pyx_tuple__28 = PyTuple_Pack(3, __pyx_int_neg_1, __pyx_int_neg_1, Py_None); if (unlikely(!__pyx_tuple__28)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 753; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__28); __Pyx_GIVEREF(__pyx_tuple__28); /* "pandas/algos.pyx":1578 * cdef double_t _get_min(object skiplist, int nobs, int minp): * if nobs >= minp: * return skiplist.get(0) # <<<<<<<<<<<<<< * else: * return NaN */ __pyx_tuple__29 = PyTuple_Pack(1, __pyx_int_0); if (unlikely(!__pyx_tuple__29)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1578; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__29); __Pyx_GIVEREF(__pyx_tuple__29); /* "pandas/algos.pyx":1636 * * if not input.flags.c_contiguous: * input = input.copy('C') # <<<<<<<<<<<<<< * * buf = input.data */ __pyx_tuple__30 = PyTuple_Pack(1, __pyx_n_s_C); if (unlikely(!__pyx_tuple__30)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1636; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__30); __Pyx_GIVEREF(__pyx_tuple__30); /* "pandas/algos.pyx":2087 * * indexer, _counts = groupsort_indexer(labels, ngroups) * counts[:] = _counts[1:] # <<<<<<<<<<<<<< * * data = np.empty((K, N), dtype=np.float64) */ __pyx_slice__31 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__31)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2087; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_slice__31); __Pyx_GIVEREF(__pyx_slice__31); __pyx_slice__32 = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_slice__32)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2087; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_slice__32); __Pyx_GIVEREF(__pyx_slice__32); /* "pandas/src/join.pyx":193 * # length-0 case * res = np.empty(len(indexer), dtype=np.int64) * res.fill(-1) # <<<<<<<<<<<<<< * * return res */ __pyx_tuple__33 = PyTuple_Pack(1, __pyx_int_neg_1); if (unlikely(!__pyx_tuple__33)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 193; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__33); __Pyx_GIVEREF(__pyx_tuple__33); /* "pandas/src/join.pyx":229 * * last_obs = np.empty(max_group, dtype=np.int64) * last_obs.fill(-1) # <<<<<<<<<<<<<< * * for i in range(n): */ __pyx_tuple__34 = PyTuple_Pack(1, __pyx_int_neg_1); if (unlikely(!__pyx_tuple__34)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 229; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__34); __Pyx_GIVEREF(__pyx_tuple__34); /* "pandas/src/generated.pyx":267 * nright = len(new) * indexer = np.empty(nright, dtype=np.int64) * indexer.fill(-1) # <<<<<<<<<<<<<< * * if limit is None: */ __pyx_tuple__35 = PyTuple_Pack(1, __pyx_int_neg_1); if (unlikely(!__pyx_tuple__35)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 267; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__35); __Pyx_GIVEREF(__pyx_tuple__35); /* "pandas/src/generated.pyx":273 * else: * if limit < 0: * raise ValueError('Limit must be non-negative') # <<<<<<<<<<<<<< * lim = limit * */ __pyx_tuple__36 = PyTuple_Pack(1, __pyx_kp_s_Limit_must_be_non_negative); if (unlikely(!__pyx_tuple__36)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 273; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__36); __Pyx_GIVEREF(__pyx_tuple__36); /* "pandas/src/generated.pyx":328 * nright = len(new) * indexer = np.empty(nright, dtype=np.int64) * indexer.fill(-1) # <<<<<<<<<<<<<< * * if limit is None: */ __pyx_tuple__37 = PyTuple_Pack(1, __pyx_int_neg_1); if (unlikely(!__pyx_tuple__37)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 328; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__37); __Pyx_GIVEREF(__pyx_tuple__37); /* "pandas/src/generated.pyx":334 * else: * if limit < 0: * raise ValueError('Limit must be non-negative') # <<<<<<<<<<<<<< * lim = limit * */ __pyx_tuple__38 = PyTuple_Pack(1, __pyx_kp_s_Limit_must_be_non_negative); if (unlikely(!__pyx_tuple__38)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 334; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__38); __Pyx_GIVEREF(__pyx_tuple__38); /* "pandas/src/generated.pyx":389 * nright = len(new) * indexer = np.empty(nright, dtype=np.int64) * indexer.fill(-1) # <<<<<<<<<<<<<< * * if limit is None: */ __pyx_tuple__39 = PyTuple_Pack(1, __pyx_int_neg_1); if (unlikely(!__pyx_tuple__39)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 389; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__39); __Pyx_GIVEREF(__pyx_tuple__39); /* "pandas/src/generated.pyx":395 * else: * if limit < 0: * raise ValueError('Limit must be non-negative') # <<<<<<<<<<<<<< * lim = limit * */ __pyx_tuple__40 = PyTuple_Pack(1, __pyx_kp_s_Limit_must_be_non_negative); if (unlikely(!__pyx_tuple__40)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 395; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__40); __Pyx_GIVEREF(__pyx_tuple__40); /* "pandas/src/generated.pyx":450 * nright = len(new) * indexer = np.empty(nright, dtype=np.int64) * indexer.fill(-1) # <<<<<<<<<<<<<< * * if limit is None: */ __pyx_tuple__41 = PyTuple_Pack(1, __pyx_int_neg_1); if (unlikely(!__pyx_tuple__41)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 450; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__41); __Pyx_GIVEREF(__pyx_tuple__41); /* "pandas/src/generated.pyx":456 * else: * if limit < 0: * raise ValueError('Limit must be non-negative') # <<<<<<<<<<<<<< * lim = limit * */ __pyx_tuple__42 = PyTuple_Pack(1, __pyx_kp_s_Limit_must_be_non_negative); if (unlikely(!__pyx_tuple__42)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 456; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__42); __Pyx_GIVEREF(__pyx_tuple__42); /* "pandas/src/generated.pyx":511 * nright = len(new) * indexer = np.empty(nright, dtype=np.int64) * indexer.fill(-1) # <<<<<<<<<<<<<< * * if limit is None: */ __pyx_tuple__43 = PyTuple_Pack(1, __pyx_int_neg_1); if (unlikely(!__pyx_tuple__43)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 511; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__43); __Pyx_GIVEREF(__pyx_tuple__43); /* "pandas/src/generated.pyx":517 * else: * if limit < 0: * raise ValueError('Limit must be non-negative') # <<<<<<<<<<<<<< * lim = limit * */ __pyx_tuple__44 = PyTuple_Pack(1, __pyx_kp_s_Limit_must_be_non_negative); if (unlikely(!__pyx_tuple__44)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 517; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__44); __Pyx_GIVEREF(__pyx_tuple__44); /* "pandas/src/generated.pyx":572 * nright = len(new) * indexer = np.empty(nright, dtype=np.int64) * indexer.fill(-1) # <<<<<<<<<<<<<< * * if limit is None: */ __pyx_tuple__45 = PyTuple_Pack(1, __pyx_int_neg_1); if (unlikely(!__pyx_tuple__45)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 572; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__45); __Pyx_GIVEREF(__pyx_tuple__45); /* "pandas/src/generated.pyx":578 * else: * if limit < 0: * raise ValueError('Limit must be non-negative') # <<<<<<<<<<<<<< * lim = limit * */ __pyx_tuple__46 = PyTuple_Pack(1, __pyx_kp_s_Limit_must_be_non_negative); if (unlikely(!__pyx_tuple__46)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 578; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__46); __Pyx_GIVEREF(__pyx_tuple__46); /* "pandas/src/generated.pyx":634 * nright = len(new) * indexer = np.empty(nright, dtype=np.int64) * indexer.fill(-1) # <<<<<<<<<<<<<< * * if limit is None: */ __pyx_tuple__47 = PyTuple_Pack(1, __pyx_int_neg_1); if (unlikely(!__pyx_tuple__47)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 634; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__47); __Pyx_GIVEREF(__pyx_tuple__47); /* "pandas/src/generated.pyx":640 * else: * if limit < 0: * raise ValueError('Limit must be non-negative') # <<<<<<<<<<<<<< * lim = limit * */ __pyx_tuple__48 = PyTuple_Pack(1, __pyx_kp_s_Limit_must_be_non_negative); if (unlikely(!__pyx_tuple__48)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 640; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__48); __Pyx_GIVEREF(__pyx_tuple__48); /* "pandas/src/generated.pyx":696 * nright = len(new) * indexer = np.empty(nright, dtype=np.int64) * indexer.fill(-1) # <<<<<<<<<<<<<< * * if limit is None: */ __pyx_tuple__49 = PyTuple_Pack(1, __pyx_int_neg_1); if (unlikely(!__pyx_tuple__49)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 696; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__49); __Pyx_GIVEREF(__pyx_tuple__49); /* "pandas/src/generated.pyx":702 * else: * if limit < 0: * raise ValueError('Limit must be non-negative') # <<<<<<<<<<<<<< * lim = limit * */ __pyx_tuple__50 = PyTuple_Pack(1, __pyx_kp_s_Limit_must_be_non_negative); if (unlikely(!__pyx_tuple__50)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 702; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__50); __Pyx_GIVEREF(__pyx_tuple__50); /* "pandas/src/generated.pyx":758 * nright = len(new) * indexer = np.empty(nright, dtype=np.int64) * indexer.fill(-1) # <<<<<<<<<<<<<< * * if limit is None: */ __pyx_tuple__51 = PyTuple_Pack(1, __pyx_int_neg_1); if (unlikely(!__pyx_tuple__51)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 758; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__51); __Pyx_GIVEREF(__pyx_tuple__51); /* "pandas/src/generated.pyx":764 * else: * if limit < 0: * raise ValueError('Limit must be non-negative') # <<<<<<<<<<<<<< * lim = limit * */ __pyx_tuple__52 = PyTuple_Pack(1, __pyx_kp_s_Limit_must_be_non_negative); if (unlikely(!__pyx_tuple__52)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 764; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__52); __Pyx_GIVEREF(__pyx_tuple__52); /* "pandas/src/generated.pyx":820 * nright = len(new) * indexer = np.empty(nright, dtype=np.int64) * indexer.fill(-1) # <<<<<<<<<<<<<< * * if limit is None: */ __pyx_tuple__53 = PyTuple_Pack(1, __pyx_int_neg_1); if (unlikely(!__pyx_tuple__53)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 820; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__53); __Pyx_GIVEREF(__pyx_tuple__53); /* "pandas/src/generated.pyx":826 * else: * if limit < 0: * raise ValueError('Limit must be non-negative') # <<<<<<<<<<<<<< * lim = limit * */ __pyx_tuple__54 = PyTuple_Pack(1, __pyx_kp_s_Limit_must_be_non_negative); if (unlikely(!__pyx_tuple__54)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 826; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__54); __Pyx_GIVEREF(__pyx_tuple__54); /* "pandas/src/generated.pyx":882 * nright = len(new) * indexer = np.empty(nright, dtype=np.int64) * indexer.fill(-1) # <<<<<<<<<<<<<< * * if limit is None: */ __pyx_tuple__55 = PyTuple_Pack(1, __pyx_int_neg_1); if (unlikely(!__pyx_tuple__55)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 882; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__55); __Pyx_GIVEREF(__pyx_tuple__55); /* "pandas/src/generated.pyx":888 * else: * if limit < 0: * raise ValueError('Limit must be non-negative') # <<<<<<<<<<<<<< * lim = limit * */ __pyx_tuple__56 = PyTuple_Pack(1, __pyx_kp_s_Limit_must_be_non_negative); if (unlikely(!__pyx_tuple__56)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 888; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__56); __Pyx_GIVEREF(__pyx_tuple__56); /* "pandas/src/generated.pyx":944 * nright = len(new) * indexer = np.empty(nright, dtype=np.int64) * indexer.fill(-1) # <<<<<<<<<<<<<< * * if limit is None: */ __pyx_tuple__57 = PyTuple_Pack(1, __pyx_int_neg_1); if (unlikely(!__pyx_tuple__57)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 944; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__57); __Pyx_GIVEREF(__pyx_tuple__57); /* "pandas/src/generated.pyx":950 * else: * if limit < 0: * raise ValueError('Limit must be non-negative') # <<<<<<<<<<<<<< * lim = limit * */ __pyx_tuple__58 = PyTuple_Pack(1, __pyx_kp_s_Limit_must_be_non_negative); if (unlikely(!__pyx_tuple__58)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 950; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__58); __Pyx_GIVEREF(__pyx_tuple__58); /* "pandas/src/generated.pyx":1014 * else: * if limit < 0: * raise ValueError('Limit must be non-negative') # <<<<<<<<<<<<<< * lim = limit * */ __pyx_tuple__59 = PyTuple_Pack(1, __pyx_kp_s_Limit_must_be_non_negative); if (unlikely(!__pyx_tuple__59)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1014; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__59); __Pyx_GIVEREF(__pyx_tuple__59); /* "pandas/src/generated.pyx":1047 * else: * if limit < 0: * raise ValueError('Limit must be non-negative') # <<<<<<<<<<<<<< * lim = limit * */ __pyx_tuple__60 = PyTuple_Pack(1, __pyx_kp_s_Limit_must_be_non_negative); if (unlikely(!__pyx_tuple__60)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1047; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__60); __Pyx_GIVEREF(__pyx_tuple__60); /* "pandas/src/generated.pyx":1080 * else: * if limit < 0: * raise ValueError('Limit must be non-negative') # <<<<<<<<<<<<<< * lim = limit * */ __pyx_tuple__61 = PyTuple_Pack(1, __pyx_kp_s_Limit_must_be_non_negative); if (unlikely(!__pyx_tuple__61)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1080; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__61); __Pyx_GIVEREF(__pyx_tuple__61); /* "pandas/src/generated.pyx":1113 * else: * if limit < 0: * raise ValueError('Limit must be non-negative') # <<<<<<<<<<<<<< * lim = limit * */ __pyx_tuple__62 = PyTuple_Pack(1, __pyx_kp_s_Limit_must_be_non_negative); if (unlikely(!__pyx_tuple__62)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1113; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__62); __Pyx_GIVEREF(__pyx_tuple__62); /* "pandas/src/generated.pyx":1146 * else: * if limit < 0: * raise ValueError('Limit must be non-negative') # <<<<<<<<<<<<<< * lim = limit * */ __pyx_tuple__63 = PyTuple_Pack(1, __pyx_kp_s_Limit_must_be_non_negative); if (unlikely(!__pyx_tuple__63)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1146; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__63); __Pyx_GIVEREF(__pyx_tuple__63); /* "pandas/src/generated.pyx":1179 * else: * if limit < 0: * raise ValueError('Limit must be non-negative') # <<<<<<<<<<<<<< * lim = limit * */ __pyx_tuple__64 = PyTuple_Pack(1, __pyx_kp_s_Limit_must_be_non_negative); if (unlikely(!__pyx_tuple__64)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1179; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__64); __Pyx_GIVEREF(__pyx_tuple__64); /* "pandas/src/generated.pyx":1213 * else: * if limit < 0: * raise ValueError('Limit must be non-negative') # <<<<<<<<<<<<<< * lim = limit * */ __pyx_tuple__65 = PyTuple_Pack(1, __pyx_kp_s_Limit_must_be_non_negative); if (unlikely(!__pyx_tuple__65)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1213; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__65); __Pyx_GIVEREF(__pyx_tuple__65); /* "pandas/src/generated.pyx":1245 * else: * if limit < 0: * raise ValueError('Limit must be non-negative') # <<<<<<<<<<<<<< * lim = limit * */ __pyx_tuple__66 = PyTuple_Pack(1, __pyx_kp_s_Limit_must_be_non_negative); if (unlikely(!__pyx_tuple__66)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1245; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__66); __Pyx_GIVEREF(__pyx_tuple__66); /* "pandas/src/generated.pyx":1277 * else: * if limit < 0: * raise ValueError('Limit must be non-negative') # <<<<<<<<<<<<<< * lim = limit * */ __pyx_tuple__67 = PyTuple_Pack(1, __pyx_kp_s_Limit_must_be_non_negative); if (unlikely(!__pyx_tuple__67)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1277; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__67); __Pyx_GIVEREF(__pyx_tuple__67); /* "pandas/src/generated.pyx":1309 * else: * if limit < 0: * raise ValueError('Limit must be non-negative') # <<<<<<<<<<<<<< * lim = limit * */ __pyx_tuple__68 = PyTuple_Pack(1, __pyx_kp_s_Limit_must_be_non_negative); if (unlikely(!__pyx_tuple__68)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1309; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__68); __Pyx_GIVEREF(__pyx_tuple__68); /* "pandas/src/generated.pyx":1341 * else: * if limit < 0: * raise ValueError('Limit must be non-negative') # <<<<<<<<<<<<<< * lim = limit * */ __pyx_tuple__69 = PyTuple_Pack(1, __pyx_kp_s_Limit_must_be_non_negative); if (unlikely(!__pyx_tuple__69)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1341; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__69); __Pyx_GIVEREF(__pyx_tuple__69); /* "pandas/src/generated.pyx":1373 * else: * if limit < 0: * raise ValueError('Limit must be non-negative') # <<<<<<<<<<<<<< * lim = limit * */ __pyx_tuple__70 = PyTuple_Pack(1, __pyx_kp_s_Limit_must_be_non_negative); if (unlikely(!__pyx_tuple__70)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1373; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__70); __Pyx_GIVEREF(__pyx_tuple__70); /* "pandas/src/generated.pyx":1406 * else: * if limit < 0: * raise ValueError('Limit must be non-negative') # <<<<<<<<<<<<<< * lim = limit * */ __pyx_tuple__71 = PyTuple_Pack(1, __pyx_kp_s_Limit_must_be_non_negative); if (unlikely(!__pyx_tuple__71)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1406; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__71); __Pyx_GIVEREF(__pyx_tuple__71); /* "pandas/src/generated.pyx":1440 * else: * if limit < 0: * raise ValueError('Limit must be non-negative') # <<<<<<<<<<<<<< * lim = limit * */ __pyx_tuple__72 = PyTuple_Pack(1, __pyx_kp_s_Limit_must_be_non_negative); if (unlikely(!__pyx_tuple__72)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1440; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__72); __Pyx_GIVEREF(__pyx_tuple__72); /* "pandas/src/generated.pyx":1474 * else: * if limit < 0: * raise ValueError('Limit must be non-negative') # <<<<<<<<<<<<<< * lim = limit * */ __pyx_tuple__73 = PyTuple_Pack(1, __pyx_kp_s_Limit_must_be_non_negative); if (unlikely(!__pyx_tuple__73)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1474; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__73); __Pyx_GIVEREF(__pyx_tuple__73); /* "pandas/src/generated.pyx":1508 * else: * if limit < 0: * raise ValueError('Limit must be non-negative') # <<<<<<<<<<<<<< * lim = limit * */ __pyx_tuple__74 = PyTuple_Pack(1, __pyx_kp_s_Limit_must_be_non_negative); if (unlikely(!__pyx_tuple__74)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1508; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__74); __Pyx_GIVEREF(__pyx_tuple__74); /* "pandas/src/generated.pyx":1542 * else: * if limit < 0: * raise ValueError('Limit must be non-negative') # <<<<<<<<<<<<<< * lim = limit * */ __pyx_tuple__75 = PyTuple_Pack(1, __pyx_kp_s_Limit_must_be_non_negative); if (unlikely(!__pyx_tuple__75)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1542; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__75); __Pyx_GIVEREF(__pyx_tuple__75); /* "pandas/src/generated.pyx":1576 * else: * if limit < 0: * raise ValueError('Limit must be non-negative') # <<<<<<<<<<<<<< * lim = limit * */ __pyx_tuple__76 = PyTuple_Pack(1, __pyx_kp_s_Limit_must_be_non_negative); if (unlikely(!__pyx_tuple__76)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1576; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__76); __Pyx_GIVEREF(__pyx_tuple__76); /* "pandas/src/generated.pyx":1611 * else: * if limit < 0: * raise ValueError('Limit must be non-negative') # <<<<<<<<<<<<<< * lim = limit * */ __pyx_tuple__77 = PyTuple_Pack(1, __pyx_kp_s_Limit_must_be_non_negative); if (unlikely(!__pyx_tuple__77)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1611; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__77); __Pyx_GIVEREF(__pyx_tuple__77); /* "pandas/src/generated.pyx":1645 * else: * if limit < 0: * raise ValueError('Limit must be non-negative') # <<<<<<<<<<<<<< * lim = limit * */ __pyx_tuple__78 = PyTuple_Pack(1, __pyx_kp_s_Limit_must_be_non_negative); if (unlikely(!__pyx_tuple__78)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1645; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__78); __Pyx_GIVEREF(__pyx_tuple__78); /* "pandas/src/generated.pyx":1679 * else: * if limit < 0: * raise ValueError('Limit must be non-negative') # <<<<<<<<<<<<<< * lim = limit * */ __pyx_tuple__79 = PyTuple_Pack(1, __pyx_kp_s_Limit_must_be_non_negative); if (unlikely(!__pyx_tuple__79)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1679; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__79); __Pyx_GIVEREF(__pyx_tuple__79); /* "pandas/src/generated.pyx":1713 * else: * if limit < 0: * raise ValueError('Limit must be non-negative') # <<<<<<<<<<<<<< * lim = limit * */ __pyx_tuple__80 = PyTuple_Pack(1, __pyx_kp_s_Limit_must_be_non_negative); if (unlikely(!__pyx_tuple__80)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1713; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__80); __Pyx_GIVEREF(__pyx_tuple__80); /* "pandas/src/generated.pyx":1747 * else: * if limit < 0: * raise ValueError('Limit must be non-negative') # <<<<<<<<<<<<<< * lim = limit * */ __pyx_tuple__81 = PyTuple_Pack(1, __pyx_kp_s_Limit_must_be_non_negative); if (unlikely(!__pyx_tuple__81)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1747; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__81); __Pyx_GIVEREF(__pyx_tuple__81); /* "pandas/src/generated.pyx":1781 * else: * if limit < 0: * raise ValueError('Limit must be non-negative') # <<<<<<<<<<<<<< * lim = limit * */ __pyx_tuple__82 = PyTuple_Pack(1, __pyx_kp_s_Limit_must_be_non_negative); if (unlikely(!__pyx_tuple__82)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1781; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__82); __Pyx_GIVEREF(__pyx_tuple__82); /* "pandas/src/generated.pyx":1813 * * if n < 2: * return True, True # <<<<<<<<<<<<<< * * prev = arr[0] */ __pyx_tuple__83 = PyTuple_Pack(2, Py_True, Py_True); if (unlikely(!__pyx_tuple__83)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1813; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__83); __Pyx_GIVEREF(__pyx_tuple__83); /* "pandas/src/generated.pyx":1819 * cur = arr[i] * if cur < prev: * return False, None # <<<<<<<<<<<<<< * elif cur == prev: * is_unique = 0 */ __pyx_tuple__84 = PyTuple_Pack(2, Py_False, Py_None); if (unlikely(!__pyx_tuple__84)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1819; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__84); __Pyx_GIVEREF(__pyx_tuple__84); /* "pandas/src/generated.pyx":1840 * * if n < 2: * return True, True # <<<<<<<<<<<<<< * * prev = arr[0] */ __pyx_tuple__85 = PyTuple_Pack(2, Py_True, Py_True); if (unlikely(!__pyx_tuple__85)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1840; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__85); __Pyx_GIVEREF(__pyx_tuple__85); /* "pandas/src/generated.pyx":1846 * cur = arr[i] * if cur < prev: * return False, None # <<<<<<<<<<<<<< * elif cur == prev: * is_unique = 0 */ __pyx_tuple__86 = PyTuple_Pack(2, Py_False, Py_None); if (unlikely(!__pyx_tuple__86)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1846; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__86); __Pyx_GIVEREF(__pyx_tuple__86); /* "pandas/src/generated.pyx":1867 * * if n < 2: * return True, True # <<<<<<<<<<<<<< * * prev = arr[0] */ __pyx_tuple__87 = PyTuple_Pack(2, Py_True, Py_True); if (unlikely(!__pyx_tuple__87)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1867; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__87); __Pyx_GIVEREF(__pyx_tuple__87); /* "pandas/src/generated.pyx":1873 * cur = arr[i] * if cur < prev: * return False, None # <<<<<<<<<<<<<< * elif cur == prev: * is_unique = 0 */ __pyx_tuple__88 = PyTuple_Pack(2, Py_False, Py_None); if (unlikely(!__pyx_tuple__88)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1873; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__88); __Pyx_GIVEREF(__pyx_tuple__88); /* "pandas/src/generated.pyx":1894 * * if n < 2: * return True, True # <<<<<<<<<<<<<< * * prev = arr[0] */ __pyx_tuple__89 = PyTuple_Pack(2, Py_True, Py_True); if (unlikely(!__pyx_tuple__89)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1894; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__89); __Pyx_GIVEREF(__pyx_tuple__89); /* "pandas/src/generated.pyx":1900 * cur = arr[i] * if cur < prev: * return False, None # <<<<<<<<<<<<<< * elif cur == prev: * is_unique = 0 */ __pyx_tuple__90 = PyTuple_Pack(2, Py_False, Py_None); if (unlikely(!__pyx_tuple__90)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1900; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__90); __Pyx_GIVEREF(__pyx_tuple__90); /* "pandas/src/generated.pyx":1921 * * if n < 2: * return True, True # <<<<<<<<<<<<<< * * prev = arr[0] */ __pyx_tuple__91 = PyTuple_Pack(2, Py_True, Py_True); if (unlikely(!__pyx_tuple__91)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1921; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__91); __Pyx_GIVEREF(__pyx_tuple__91); /* "pandas/src/generated.pyx":1927 * cur = arr[i] * if cur < prev: * return False, None # <<<<<<<<<<<<<< * elif cur == prev: * is_unique = 0 */ __pyx_tuple__92 = PyTuple_Pack(2, Py_False, Py_None); if (unlikely(!__pyx_tuple__92)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1927; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__92); __Pyx_GIVEREF(__pyx_tuple__92); /* "pandas/src/generated.pyx":1948 * * if n < 2: * return True, True # <<<<<<<<<<<<<< * * prev = arr[0] */ __pyx_tuple__93 = PyTuple_Pack(2, Py_True, Py_True); if (unlikely(!__pyx_tuple__93)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1948; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__93); __Pyx_GIVEREF(__pyx_tuple__93); /* "pandas/src/generated.pyx":1954 * cur = arr[i] * if cur < prev: * return False, None # <<<<<<<<<<<<<< * elif cur == prev: * is_unique = 0 */ __pyx_tuple__94 = PyTuple_Pack(2, Py_False, Py_None); if (unlikely(!__pyx_tuple__94)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1954; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__94); __Pyx_GIVEREF(__pyx_tuple__94); /* "pandas/src/generated.pyx":1971 * * if not length == len(labels): * raise AssertionError("len(index) != len(labels)") # <<<<<<<<<<<<<< * * for i in range(length): */ __pyx_tuple__95 = PyTuple_Pack(1, __pyx_kp_s_len_index_len_labels); if (unlikely(!__pyx_tuple__95)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1971; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__95); __Pyx_GIVEREF(__pyx_tuple__95); /* "pandas/src/generated.pyx":1999 * * if not length == len(labels): * raise AssertionError("len(index) != len(labels)") # <<<<<<<<<<<<<< * * for i in range(length): */ __pyx_tuple__96 = PyTuple_Pack(1, __pyx_kp_s_len_index_len_labels); if (unlikely(!__pyx_tuple__96)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1999; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__96); __Pyx_GIVEREF(__pyx_tuple__96); /* "pandas/src/generated.pyx":2027 * * if not length == len(labels): * raise AssertionError("len(index) != len(labels)") # <<<<<<<<<<<<<< * * for i in range(length): */ __pyx_tuple__97 = PyTuple_Pack(1, __pyx_kp_s_len_index_len_labels); if (unlikely(!__pyx_tuple__97)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2027; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__97); __Pyx_GIVEREF(__pyx_tuple__97); /* "pandas/src/generated.pyx":2055 * * if not length == len(labels): * raise AssertionError("len(index) != len(labels)") # <<<<<<<<<<<<<< * * for i in range(length): */ __pyx_tuple__98 = PyTuple_Pack(1, __pyx_kp_s_len_index_len_labels); if (unlikely(!__pyx_tuple__98)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2055; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__98); __Pyx_GIVEREF(__pyx_tuple__98); /* "pandas/src/generated.pyx":2083 * * if not length == len(labels): * raise AssertionError("len(index) != len(labels)") # <<<<<<<<<<<<<< * * for i in range(length): */ __pyx_tuple__99 = PyTuple_Pack(1, __pyx_kp_s_len_index_len_labels); if (unlikely(!__pyx_tuple__99)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2083; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__99); __Pyx_GIVEREF(__pyx_tuple__99); /* "pandas/src/generated.pyx":2111 * * if not length == len(labels): * raise AssertionError("len(index) != len(labels)") # <<<<<<<<<<<<<< * * for i in range(length): */ __pyx_tuple__100 = PyTuple_Pack(1, __pyx_kp_s_len_index_len_labels); if (unlikely(!__pyx_tuple__100)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2111; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__100); __Pyx_GIVEREF(__pyx_tuple__100); /* "pandas/src/generated.pyx":5083 * * if not len(values) == len(labels): * raise AssertionError("len(index) != len(labels)") # <<<<<<<<<<<<<< * * nobs = np.zeros(( out).shape, dtype=np.int64) */ __pyx_tuple__177 = PyTuple_Pack(1, __pyx_kp_s_len_index_len_labels); if (unlikely(!__pyx_tuple__177)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5083; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__177); __Pyx_GIVEREF(__pyx_tuple__177); /* "pandas/src/generated.pyx":5126 * * if not len(values) == len(labels): * raise AssertionError("len(index) != len(labels)") # <<<<<<<<<<<<<< * * nobs = np.zeros(( out).shape, dtype=np.int64) */ __pyx_tuple__178 = PyTuple_Pack(1, __pyx_kp_s_len_index_len_labels); if (unlikely(!__pyx_tuple__178)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5126; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__178); __Pyx_GIVEREF(__pyx_tuple__178); /* "pandas/src/generated.pyx":5259 * * if not len(values) == len(labels): * raise AssertionError("len(index) != len(labels)") # <<<<<<<<<<<<<< * * nobs = np.zeros(( out).shape, dtype=np.int64) */ __pyx_tuple__179 = PyTuple_Pack(1, __pyx_kp_s_len_index_len_labels); if (unlikely(!__pyx_tuple__179)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5259; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__179); __Pyx_GIVEREF(__pyx_tuple__179); /* "pandas/src/generated.pyx":5303 * * if not len(values) == len(labels): * raise AssertionError("len(index) != len(labels)") # <<<<<<<<<<<<<< * * nobs = np.zeros(( out).shape, dtype=np.int64) */ __pyx_tuple__180 = PyTuple_Pack(1, __pyx_kp_s_len_index_len_labels); if (unlikely(!__pyx_tuple__180)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5303; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__180); __Pyx_GIVEREF(__pyx_tuple__180); /* "pandas/src/generated.pyx":5438 * * if not len(values) == len(labels): * raise AssertionError("len(index) != len(labels)") # <<<<<<<<<<<<<< * * nobs = np.zeros_like(out) */ __pyx_tuple__181 = PyTuple_Pack(1, __pyx_kp_s_len_index_len_labels); if (unlikely(!__pyx_tuple__181)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5438; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__181); __Pyx_GIVEREF(__pyx_tuple__181); /* "pandas/src/generated.pyx":5494 * * if not len(values) == len(labels): * raise AssertionError("len(index) != len(labels)") # <<<<<<<<<<<<<< * * nobs = np.zeros_like(out) */ __pyx_tuple__182 = PyTuple_Pack(1, __pyx_kp_s_len_index_len_labels); if (unlikely(!__pyx_tuple__182)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5494; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__182); __Pyx_GIVEREF(__pyx_tuple__182); /* "pandas/src/generated.pyx":5664 * * if not len(values) == len(labels): * raise AssertionError("len(index) != len(labels)") # <<<<<<<<<<<<<< * * nobs = np.zeros_like(out) */ __pyx_tuple__183 = PyTuple_Pack(1, __pyx_kp_s_len_index_len_labels); if (unlikely(!__pyx_tuple__183)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5664; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__183); __Pyx_GIVEREF(__pyx_tuple__183); /* "pandas/src/generated.pyx":5720 * * if not len(values) == len(labels): * raise AssertionError("len(index) != len(labels)") # <<<<<<<<<<<<<< * * nobs = np.zeros_like(out) */ __pyx_tuple__184 = PyTuple_Pack(1, __pyx_kp_s_len_index_len_labels); if (unlikely(!__pyx_tuple__184)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5720; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__184); __Pyx_GIVEREF(__pyx_tuple__184); /* "pandas/src/generated.pyx":5887 * * if not len(values) == len(labels): * raise AssertionError("len(index) != len(labels)") # <<<<<<<<<<<<<< * * nobs = np.zeros_like(out) */ __pyx_tuple__185 = PyTuple_Pack(1, __pyx_kp_s_len_index_len_labels); if (unlikely(!__pyx_tuple__185)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5887; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__185); __Pyx_GIVEREF(__pyx_tuple__185); /* "pandas/src/generated.pyx":5948 * * if not len(values) == len(labels): * raise AssertionError("len(index) != len(labels)") # <<<<<<<<<<<<<< * * nobs = np.zeros_like(out) */ __pyx_tuple__186 = PyTuple_Pack(1, __pyx_kp_s_len_index_len_labels); if (unlikely(!__pyx_tuple__186)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5948; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__186); __Pyx_GIVEREF(__pyx_tuple__186); /* "pandas/src/generated.pyx":6133 * * if not len(values) == len(labels): * raise AssertionError("len(index) != len(labels)") # <<<<<<<<<<<<<< * * nobs = np.zeros_like(out) */ __pyx_tuple__187 = PyTuple_Pack(1, __pyx_kp_s_len_index_len_labels); if (unlikely(!__pyx_tuple__187)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6133; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__187); __Pyx_GIVEREF(__pyx_tuple__187); /* "pandas/src/generated.pyx":6185 * * if not len(values) == len(labels): * raise AssertionError("len(index) != len(labels)") # <<<<<<<<<<<<<< * * nobs = np.zeros_like(out) */ __pyx_tuple__188 = PyTuple_Pack(1, __pyx_kp_s_len_index_len_labels); if (unlikely(!__pyx_tuple__188)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6185; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__188); __Pyx_GIVEREF(__pyx_tuple__188); /* "pandas/src/generated.pyx":6348 * * if not len(values) == len(labels): * raise AssertionError("len(index) != len(labels)") # <<<<<<<<<<<<<< * * nobs = np.zeros_like(out) */ __pyx_tuple__189 = PyTuple_Pack(1, __pyx_kp_s_len_index_len_labels); if (unlikely(!__pyx_tuple__189)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6348; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__189); __Pyx_GIVEREF(__pyx_tuple__189); /* "pandas/src/generated.pyx":6408 * * if not len(values) == len(labels): * raise AssertionError("len(index) != len(labels)") # <<<<<<<<<<<<<< * * nobs = np.zeros_like(out) */ __pyx_tuple__190 = PyTuple_Pack(1, __pyx_kp_s_len_index_len_labels); if (unlikely(!__pyx_tuple__190)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6408; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__190); __Pyx_GIVEREF(__pyx_tuple__190); /* "pandas/src/generated.pyx":6592 * * if not len(values) == len(labels): * raise AssertionError("len(index) != len(labels)") # <<<<<<<<<<<<<< * * nobs = np.zeros_like(out) */ __pyx_tuple__191 = PyTuple_Pack(1, __pyx_kp_s_len_index_len_labels); if (unlikely(!__pyx_tuple__191)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6592; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__191); __Pyx_GIVEREF(__pyx_tuple__191); /* "pandas/src/generated.pyx":6652 * * if not len(values) == len(labels): * raise AssertionError("len(index) != len(labels)") # <<<<<<<<<<<<<< * * nobs = np.zeros_like(out) */ __pyx_tuple__192 = PyTuple_Pack(1, __pyx_kp_s_len_index_len_labels); if (unlikely(!__pyx_tuple__192)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6652; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__192); __Pyx_GIVEREF(__pyx_tuple__192); /* "pandas/src/generated.pyx":6842 * * if out.shape[1] != 4: * raise ValueError('Output array must have 4 columns') # <<<<<<<<<<<<<< * * NA = np.nan */ __pyx_tuple__193 = PyTuple_Pack(1, __pyx_kp_s_Output_array_must_have_4_columns); if (unlikely(!__pyx_tuple__193)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6842; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__193); __Pyx_GIVEREF(__pyx_tuple__193); /* "pandas/src/generated.pyx":6915 * * if out.shape[1] != 4: * raise ValueError('Output array must have 4 columns') # <<<<<<<<<<<<<< * * NA = np.nan */ __pyx_tuple__194 = PyTuple_Pack(1, __pyx_kp_s_Output_array_must_have_4_columns); if (unlikely(!__pyx_tuple__194)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6915; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__194); __Pyx_GIVEREF(__pyx_tuple__194); /* "numpy.pxd":217 * 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__195 = PyTuple_Pack(1, __pyx_kp_u_ndarray_is_not_C_contiguous); if (unlikely(!__pyx_tuple__195)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 217; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__195); __Pyx_GIVEREF(__pyx_tuple__195); /* "numpy.pxd":221 * 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__196 = PyTuple_Pack(1, __pyx_kp_u_ndarray_is_not_Fortran_contiguou); if (unlikely(!__pyx_tuple__196)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 221; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__196); __Pyx_GIVEREF(__pyx_tuple__196); /* "numpy.pxd":259 * if ((descr.byteorder == '>' and little_endian) or * (descr.byteorder == '<' 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__197 = PyTuple_Pack(1, __pyx_kp_u_Non_native_byte_order_not_suppor); if (unlikely(!__pyx_tuple__197)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 259; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__197); __Pyx_GIVEREF(__pyx_tuple__197); /* "numpy.pxd":803 * * if (end - f) - (new_offset - offset[0]) < 15: * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") # <<<<<<<<<<<<<< * * if ((child.byteorder == '>' and little_endian) or */ __pyx_tuple__198 = PyTuple_Pack(1, __pyx_kp_u_Format_string_allocated_too_shor); if (unlikely(!__pyx_tuple__198)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 803; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__198); __Pyx_GIVEREF(__pyx_tuple__198); /* "numpy.pxd":807 * if ((child.byteorder == '>' and little_endian) or * (child.byteorder == '<' 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__199 = PyTuple_Pack(1, __pyx_kp_u_Non_native_byte_order_not_suppor); if (unlikely(!__pyx_tuple__199)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 807; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__199); __Pyx_GIVEREF(__pyx_tuple__199); /* "numpy.pxd":827 * 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__200 = PyTuple_Pack(1, __pyx_kp_u_Format_string_allocated_too_shor_2); if (unlikely(!__pyx_tuple__200)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 827; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__200); __Pyx_GIVEREF(__pyx_tuple__200); /* "util.pxd":40 * i += sz * elif i >= sz or sz == 0: * raise IndexError('index out of bounds') # <<<<<<<<<<<<<< * * return get_value_1d(arr, i) */ __pyx_tuple__201 = PyTuple_Pack(1, __pyx_kp_s_index_out_of_bounds); if (unlikely(!__pyx_tuple__201)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 40; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__201); __Pyx_GIVEREF(__pyx_tuple__201); /* "util.pxd":57 * i += sz * elif i >= sz: * raise IndexError('index out of bounds') # <<<<<<<<<<<<<< * * assign_value_1d(arr, i, value) */ __pyx_tuple__202 = PyTuple_Pack(1, __pyx_kp_s_index_out_of_bounds); if (unlikely(!__pyx_tuple__202)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 57; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__202); __Pyx_GIVEREF(__pyx_tuple__202); /* "pandas/algos.pyx":133 * * * def rank_1d_float64(object in_arr, ties_method='average', ascending=True, # <<<<<<<<<<<<<< * na_option='keep'): * """ */ __pyx_tuple__203 = PyTuple_Pack(19, __pyx_n_s_in_arr, __pyx_n_s_ties_method, __pyx_n_s_ascending, __pyx_n_s_na_option, __pyx_n_s_i, __pyx_n_s_j, __pyx_n_s_n, __pyx_n_s_dups, __pyx_n_s_sorted_data, __pyx_n_s_ranks, __pyx_n_s_values, __pyx_n_s_argsorted, __pyx_n_s_val, __pyx_n_s_nan_value, __pyx_n_s_sum_ranks, __pyx_n_s_tiebreak, __pyx_n_s_keep_na, __pyx_n_s_mask, __pyx_n_s_as); if (unlikely(!__pyx_tuple__203)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 133; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__203); __Pyx_GIVEREF(__pyx_tuple__203); __pyx_codeobj__204 = (PyObject*)__Pyx_PyCode_New(4, 0, 19, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__203, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_yoh_deb_gits_pkg_exppsy_pa, __pyx_n_s_rank_1d_float64, 133, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__204)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 133; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/algos.pyx":205 * * * def rank_1d_int64(object in_arr, ties_method='average', ascending=True, # <<<<<<<<<<<<<< * na_option='keep'): * """ */ __pyx_tuple__205 = PyTuple_Pack(16, __pyx_n_s_in_arr, __pyx_n_s_ties_method, __pyx_n_s_ascending, __pyx_n_s_na_option, __pyx_n_s_i, __pyx_n_s_j, __pyx_n_s_n, __pyx_n_s_dups, __pyx_n_s_sorted_data, __pyx_n_s_values, __pyx_n_s_ranks, __pyx_n_s_argsorted, __pyx_n_s_val, __pyx_n_s_sum_ranks, __pyx_n_s_tiebreak, __pyx_n_s_as); if (unlikely(!__pyx_tuple__205)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 205; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__205); __Pyx_GIVEREF(__pyx_tuple__205); __pyx_codeobj__206 = (PyObject*)__Pyx_PyCode_New(4, 0, 16, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__205, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_yoh_deb_gits_pkg_exppsy_pa, __pyx_n_s_rank_1d_int64, 205, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__206)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 205; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/algos.pyx":265 * * * def rank_2d_float64(object in_arr, axis=0, ties_method='average', # <<<<<<<<<<<<<< * ascending=True, na_option='keep'): * """ */ __pyx_tuple__207 = PyTuple_Pack(20, __pyx_n_s_in_arr, __pyx_n_s_axis, __pyx_n_s_ties_method, __pyx_n_s_ascending, __pyx_n_s_na_option, __pyx_n_s_i, __pyx_n_s_j, __pyx_n_s_z, __pyx_n_s_k, __pyx_n_s_n, __pyx_n_s_dups, __pyx_n_s_ranks, __pyx_n_s_values, __pyx_n_s_argsorted, __pyx_n_s_val, __pyx_n_s_nan_value, __pyx_n_s_sum_ranks, __pyx_n_s_tiebreak, __pyx_n_s_keep_na, __pyx_n_s_as); if (unlikely(!__pyx_tuple__207)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 265; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__207); __Pyx_GIVEREF(__pyx_tuple__207); __pyx_codeobj__208 = (PyObject*)__Pyx_PyCode_New(5, 0, 20, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__207, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_yoh_deb_gits_pkg_exppsy_pa, __pyx_n_s_rank_2d_float64, 265, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__208)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 265; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/algos.pyx":348 * * * def rank_2d_int64(object in_arr, axis=0, ties_method='average', # <<<<<<<<<<<<<< * ascending=True, na_option='keep'): * """ */ __pyx_tuple__209 = PyTuple_Pack(18, __pyx_n_s_in_arr, __pyx_n_s_axis, __pyx_n_s_ties_method, __pyx_n_s_ascending, __pyx_n_s_na_option, __pyx_n_s_i, __pyx_n_s_j, __pyx_n_s_z, __pyx_n_s_k, __pyx_n_s_n, __pyx_n_s_dups, __pyx_n_s_ranks, __pyx_n_s_argsorted, __pyx_n_s_values, __pyx_n_s_val, __pyx_n_s_sum_ranks, __pyx_n_s_tiebreak, __pyx_n_s_as); if (unlikely(!__pyx_tuple__209)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 348; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__209); __Pyx_GIVEREF(__pyx_tuple__209); __pyx_codeobj__210 = (PyObject*)__Pyx_PyCode_New(5, 0, 18, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__209, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_yoh_deb_gits_pkg_exppsy_pa, __pyx_n_s_rank_2d_int64, 348, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__210)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 348; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/algos.pyx":416 * * * def rank_1d_generic(object in_arr, bint retry=1, ties_method='average', # <<<<<<<<<<<<<< * ascending=True, na_option='keep'): * """ */ __pyx_tuple__211 = PyTuple_Pack(21, __pyx_n_s_in_arr, __pyx_n_s_retry, __pyx_n_s_ties_method, __pyx_n_s_ascending, __pyx_n_s_na_option, __pyx_n_s_i, __pyx_n_s_j, __pyx_n_s_n, __pyx_n_s_dups, __pyx_n_s_ranks, __pyx_n_s_sorted_data, __pyx_n_s_values, __pyx_n_s_argsorted, __pyx_n_s_val, __pyx_n_s_nan_value, __pyx_n_s_sum_ranks, __pyx_n_s_tiebreak, __pyx_n_s_keep_na, __pyx_n_s_mask, __pyx_n_s_as, __pyx_n_s_valid_locs); if (unlikely(!__pyx_tuple__211)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 416; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__211); __Pyx_GIVEREF(__pyx_tuple__211); __pyx_codeobj__212 = (PyObject*)__Pyx_PyCode_New(5, 0, 21, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__211, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_yoh_deb_gits_pkg_exppsy_pa, __pyx_n_s_rank_1d_generic, 416, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__212)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 416; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/algos.pyx":525 * __cmp__ = _return_true * * def rank_2d_generic(object in_arr, axis=0, ties_method='average', # <<<<<<<<<<<<<< * ascending=True, na_option='keep'): * """ */ __pyx_tuple__213 = PyTuple_Pack(22, __pyx_n_s_in_arr, __pyx_n_s_axis, __pyx_n_s_ties_method, __pyx_n_s_ascending, __pyx_n_s_na_option, __pyx_n_s_i, __pyx_n_s_j, __pyx_n_s_z, __pyx_n_s_k, __pyx_n_s_n, __pyx_n_s_infs, __pyx_n_s_dups, __pyx_n_s_ranks, __pyx_n_s_values, __pyx_n_s_argsorted, __pyx_n_s_val, __pyx_n_s_nan_value, __pyx_n_s_sum_ranks, __pyx_n_s_tiebreak, __pyx_n_s_keep_na, __pyx_n_s_mask, __pyx_n_s_as); if (unlikely(!__pyx_tuple__213)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 525; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__213); __Pyx_GIVEREF(__pyx_tuple__213); __pyx_codeobj__214 = (PyObject*)__Pyx_PyCode_New(5, 0, 22, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__213, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_yoh_deb_gits_pkg_exppsy_pa, __pyx_n_s_rank_2d_generic, 525, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__214)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 525; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/algos.pyx":641 * # - * * def _check_minp(win, minp, N): # <<<<<<<<<<<<<< * if minp > win: * raise ValueError('min_periods (%d) must be <= window (%d)' */ __pyx_tuple__215 = PyTuple_Pack(3, __pyx_n_s_win, __pyx_n_s_minp, __pyx_n_s_N); if (unlikely(!__pyx_tuple__215)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 641; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__215); __Pyx_GIVEREF(__pyx_tuple__215); __pyx_codeobj__216 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__215, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_yoh_deb_gits_pkg_exppsy_pa, __pyx_n_s_check_minp, 641, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__216)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 641; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/algos.pyx":668 * # Series: Prentice-Hall Series in Automatic Computation * * def kth_smallest(ndarray[double_t] a, Py_ssize_t k): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i,j,l,m,n */ __pyx_tuple__217 = PyTuple_Pack(9, __pyx_n_s_a, __pyx_n_s_k, __pyx_n_s_i, __pyx_n_s_j, __pyx_n_s_l, __pyx_n_s_m, __pyx_n_s_n, __pyx_n_s_x, __pyx_n_s_t); if (unlikely(!__pyx_tuple__217)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 668; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__217); __Pyx_GIVEREF(__pyx_tuple__217); __pyx_codeobj__218 = (PyObject*)__Pyx_PyCode_New(2, 0, 9, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__217, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_yoh_deb_gits_pkg_exppsy_pa, __pyx_n_s_kth_smallest, 668, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__218)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 668; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/algos.pyx":725 * * * def median(ndarray arr): # <<<<<<<<<<<<<< * ''' * A faster median */ __pyx_tuple__219 = PyTuple_Pack(2, __pyx_n_s_arr, __pyx_n_s_n); if (unlikely(!__pyx_tuple__219)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 725; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__219); __Pyx_GIVEREF(__pyx_tuple__219); __pyx_codeobj__220 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__219, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_yoh_deb_gits_pkg_exppsy_pa, __pyx_n_s_median, 725, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__220)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 725; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/algos.pyx":745 * # -------------- Min, Max subsequence * * def max_subseq(ndarray[double_t] arr): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i=0,s=0,e=0,T,n */ __pyx_tuple__221 = PyTuple_Pack(8, __pyx_n_s_arr, __pyx_n_s_i, __pyx_n_s_s, __pyx_n_s_e, __pyx_n_s_T, __pyx_n_s_n, __pyx_n_s_m, __pyx_n_s_S); if (unlikely(!__pyx_tuple__221)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 745; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__221); __Pyx_GIVEREF(__pyx_tuple__221); __pyx_codeobj__222 = (PyObject*)__Pyx_PyCode_New(1, 0, 8, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__221, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_yoh_deb_gits_pkg_exppsy_pa, __pyx_n_s_max_subseq, 745, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__222)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 745; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/algos.pyx":773 * return (s, e, m) * * def min_subseq(ndarray[double_t] arr): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t s, e */ __pyx_tuple__223 = PyTuple_Pack(4, __pyx_n_s_arr, __pyx_n_s_s, __pyx_n_s_e, __pyx_n_s_m); if (unlikely(!__pyx_tuple__223)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 773; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__223); __Pyx_GIVEREF(__pyx_tuple__223); __pyx_codeobj__224 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__223, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_yoh_deb_gits_pkg_exppsy_pa, __pyx_n_s_min_subseq, 773, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__224)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 773; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/algos.pyx":785 * # Rolling sum * * def roll_sum(ndarray[double_t] input, int win, int minp): # <<<<<<<<<<<<<< * cdef double val, prev, sum_x = 0 * cdef int nobs = 0, i */ __pyx_tuple__225 = PyTuple_Pack(10, __pyx_n_s_input, __pyx_n_s_win, __pyx_n_s_minp, __pyx_n_s_val, __pyx_n_s_prev, __pyx_n_s_sum_x, __pyx_n_s_nobs, __pyx_n_s_i, __pyx_n_s_N, __pyx_n_s_output); if (unlikely(!__pyx_tuple__225)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 785; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__225); __Pyx_GIVEREF(__pyx_tuple__225); __pyx_codeobj__226 = (PyObject*)__Pyx_PyCode_New(3, 0, 10, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__225, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_yoh_deb_gits_pkg_exppsy_pa, __pyx_n_s_roll_sum, 785, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__226)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 785; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/algos.pyx":827 * # Rolling mean * * def roll_mean(ndarray[double_t] input, # <<<<<<<<<<<<<< * int win, int minp): * cdef: */ __pyx_tuple__227 = PyTuple_Pack(12, __pyx_n_s_input, __pyx_n_s_win, __pyx_n_s_minp, __pyx_n_s_val, __pyx_n_s_prev, __pyx_n_s_result, __pyx_n_s_sum_x, __pyx_n_s_nobs, __pyx_n_s_i, __pyx_n_s_neg_ct, __pyx_n_s_N, __pyx_n_s_output); if (unlikely(!__pyx_tuple__227)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 827; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__227); __Pyx_GIVEREF(__pyx_tuple__227); __pyx_codeobj__228 = (PyObject*)__Pyx_PyCode_New(3, 0, 12, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__227, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_yoh_deb_gits_pkg_exppsy_pa, __pyx_n_s_roll_mean, 827, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__228)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 827; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/algos.pyx":884 * # Exponentially weighted moving average * * def ewma(ndarray[double_t] input, double_t com, int adjust): # <<<<<<<<<<<<<< * ''' * Compute exponentially-weighted moving average using center-of-mass. */ __pyx_tuple__229 = PyTuple_Pack(11, __pyx_n_s_input, __pyx_n_s_com, __pyx_n_s_adjust, __pyx_n_s_cur, __pyx_n_s_prev, __pyx_n_s_neww, __pyx_n_s_oldw, __pyx_n_s_adj, __pyx_n_s_i, __pyx_n_s_N, __pyx_n_s_output); if (unlikely(!__pyx_tuple__229)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 884; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__229); __Pyx_GIVEREF(__pyx_tuple__229); __pyx_codeobj__230 = (PyObject*)__Pyx_PyCode_New(3, 0, 11, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__229, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_yoh_deb_gits_pkg_exppsy_pa, __pyx_n_s_ewma, 884, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__230)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 884; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/algos.pyx":946 * @cython.boundscheck(False) * @cython.wraparound(False) * def nancorr(ndarray[float64_t, ndim=2] mat, cov=False, minp=None): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, j, xi, yi, N, K */ __pyx_tuple__231 = PyTuple_Pack(21, __pyx_n_s_mat, __pyx_n_s_cov, __pyx_n_s_minp, __pyx_n_s_i, __pyx_n_s_j, __pyx_n_s_xi, __pyx_n_s_yi, __pyx_n_s_N, __pyx_n_s_K, __pyx_n_s_result, __pyx_n_s_mask, __pyx_n_s_nobs, __pyx_n_s_vx, __pyx_n_s_vy, __pyx_n_s_sumx, __pyx_n_s_sumy, __pyx_n_s_sumxx, __pyx_n_s_sumyy, __pyx_n_s_meanx, __pyx_n_s_meany, __pyx_n_s_divisor); if (unlikely(!__pyx_tuple__231)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 946; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__231); __Pyx_GIVEREF(__pyx_tuple__231); __pyx_codeobj__232 = (PyObject*)__Pyx_PyCode_New(3, 0, 21, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__231, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_yoh_deb_gits_pkg_exppsy_pa, __pyx_n_s_nancorr, 946, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__232)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 946; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/algos.pyx":1005 * @cython.boundscheck(False) * @cython.wraparound(False) * def nancorr_spearman(ndarray[float64_t, ndim=2] mat, Py_ssize_t minp=1): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, j, xi, yi, N, K */ __pyx_tuple__233 = PyTuple_Pack(20, __pyx_n_s_mat, __pyx_n_s_minp, __pyx_n_s_i, __pyx_n_s_j, __pyx_n_s_xi, __pyx_n_s_yi, __pyx_n_s_N, __pyx_n_s_K, __pyx_n_s_result, __pyx_n_s_maskedx, __pyx_n_s_maskedy, __pyx_n_s_mask, __pyx_n_s_nobs, __pyx_n_s_vx, __pyx_n_s_vy, __pyx_n_s_sumx, __pyx_n_s_sumxx, __pyx_n_s_sumyy, __pyx_n_s_mean, __pyx_n_s_divisor); if (unlikely(!__pyx_tuple__233)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1005; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__233); __Pyx_GIVEREF(__pyx_tuple__233); __pyx_codeobj__234 = (PyObject*)__Pyx_PyCode_New(2, 0, 20, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__233, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_yoh_deb_gits_pkg_exppsy_pa, __pyx_n_s_nancorr_spearman, 1005, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__234)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1005; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/algos.pyx":1066 * # Rolling variance * * def roll_var(ndarray[double_t] input, int win, int minp, int ddof=1): # <<<<<<<<<<<<<< * cdef double val, prev, sum_x = 0, sum_xx = 0, nobs = 0 * cdef Py_ssize_t i */ __pyx_tuple__235 = PyTuple_Pack(12, __pyx_n_s_input, __pyx_n_s_win, __pyx_n_s_minp, __pyx_n_s_ddof, __pyx_n_s_val, __pyx_n_s_prev, __pyx_n_s_sum_x, __pyx_n_s_sum_xx, __pyx_n_s_nobs, __pyx_n_s_i, __pyx_n_s_N, __pyx_n_s_output); if (unlikely(!__pyx_tuple__235)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1066; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__235); __Pyx_GIVEREF(__pyx_tuple__235); __pyx_codeobj__236 = (PyObject*)__Pyx_PyCode_New(4, 0, 12, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__235, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_yoh_deb_gits_pkg_exppsy_pa, __pyx_n_s_roll_var, 1066, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__236)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1066; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/algos.pyx":1120 * # Rolling skewness * * def roll_skew(ndarray[double_t] input, int win, int minp): # <<<<<<<<<<<<<< * cdef double val, prev * cdef double x = 0, xx = 0, xxx = 0 */ __pyx_tuple__237 = PyTuple_Pack(16, __pyx_n_s_input, __pyx_n_s_win, __pyx_n_s_minp, __pyx_n_s_val, __pyx_n_s_prev, __pyx_n_s_x, __pyx_n_s_xx, __pyx_n_s_xxx, __pyx_n_s_nobs, __pyx_n_s_i, __pyx_n_s_N, __pyx_n_s_output, __pyx_n_s_A, __pyx_n_s_B, __pyx_n_s_C, __pyx_n_s_R); if (unlikely(!__pyx_tuple__237)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1120; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__237); __Pyx_GIVEREF(__pyx_tuple__237); __pyx_codeobj__238 = (PyObject*)__Pyx_PyCode_New(3, 0, 16, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__237, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_yoh_deb_gits_pkg_exppsy_pa, __pyx_n_s_roll_skew, 1120, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__238)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1120; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/algos.pyx":1184 * * * def roll_kurt(ndarray[double_t] input, # <<<<<<<<<<<<<< * int win, int minp): * cdef double val, prev */ __pyx_tuple__239 = PyTuple_Pack(19, __pyx_n_s_input, __pyx_n_s_win, __pyx_n_s_minp, __pyx_n_s_val, __pyx_n_s_prev, __pyx_n_s_x, __pyx_n_s_xx, __pyx_n_s_xxx, __pyx_n_s_xxxx, __pyx_n_s_nobs, __pyx_n_s_i, __pyx_n_s_N, __pyx_n_s_output, __pyx_n_s_A, __pyx_n_s_B, __pyx_n_s_C, __pyx_n_s_D, __pyx_n_s_R, __pyx_n_s_K); if (unlikely(!__pyx_tuple__239)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1184; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__239); __Pyx_GIVEREF(__pyx_tuple__239); __pyx_codeobj__240 = (PyObject*)__Pyx_PyCode_New(3, 0, 19, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__239, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_yoh_deb_gits_pkg_exppsy_pa, __pyx_n_s_roll_kurt, 1184, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__240)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1184; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/algos.pyx":1304 * from skiplist cimport * * * def roll_median_c(ndarray[float64_t] arg, int win, int minp): # <<<<<<<<<<<<<< * cdef double val, res, prev * cdef: */ __pyx_tuple__241 = PyTuple_Pack(13, __pyx_n_s_arg, __pyx_n_s_win, __pyx_n_s_minp, __pyx_n_s_val, __pyx_n_s_res, __pyx_n_s_prev, __pyx_n_s_ret, __pyx_n_s_sl, __pyx_n_s_midpoint, __pyx_n_s_nobs, __pyx_n_s_i, __pyx_n_s_N, __pyx_n_s_output); if (unlikely(!__pyx_tuple__241)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1304; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__241); __Pyx_GIVEREF(__pyx_tuple__241); __pyx_codeobj__242 = (PyObject*)__Pyx_PyCode_New(3, 0, 13, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__241, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_yoh_deb_gits_pkg_exppsy_pa, __pyx_n_s_roll_median_c, 1304, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__242)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1304; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/algos.pyx":1359 * return output * * def roll_median_cython(ndarray input, int win, int minp): # <<<<<<<<<<<<<< * ''' * O(N log(window)) implementation using skip list */ __pyx_tuple__243 = PyTuple_Pack(3, __pyx_n_s_input, __pyx_n_s_win, __pyx_n_s_minp); if (unlikely(!__pyx_tuple__243)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1359; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__243); __Pyx_GIVEREF(__pyx_tuple__243); __pyx_codeobj__244 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__243, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_yoh_deb_gits_pkg_exppsy_pa, __pyx_n_s_roll_median_cython, 1359, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__244)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1359; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/algos.pyx":1395 * @cython.boundscheck(False) * @cython.wraparound(False) * def roll_max2(ndarray[float64_t] a, int window, int minp): # <<<<<<<<<<<<<< * "Moving max of 1d array of dtype=float64 along axis=0 ignoring NaNs." * cdef np.float64_t ai, aold */ __pyx_tuple__245 = PyTuple_Pack(15, __pyx_n_s_a, __pyx_n_s_window, __pyx_n_s_minp, __pyx_n_s_ai, __pyx_n_s_aold, __pyx_n_s_count, __pyx_n_s_ring, __pyx_n_s_minpair, __pyx_n_s_end, __pyx_n_s_last, __pyx_n_s_i0, __pyx_n_s_dim, __pyx_n_s_n0, __pyx_n_s_dims, __pyx_n_s_y); if (unlikely(!__pyx_tuple__245)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1395; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__245); __Pyx_GIVEREF(__pyx_tuple__245); __pyx_codeobj__246 = (PyObject*)__Pyx_PyCode_New(3, 0, 15, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__245, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_yoh_deb_gits_pkg_exppsy_pa, __pyx_n_s_roll_max2, 1395, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__246)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1395; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/algos.pyx":1475 * return y * * def roll_max(ndarray input, int win, int minp): # <<<<<<<<<<<<<< * ''' * O(N log(window)) implementation using skip list */ __pyx_tuple__247 = PyTuple_Pack(3, __pyx_n_s_input, __pyx_n_s_win, __pyx_n_s_minp); if (unlikely(!__pyx_tuple__247)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1475; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__247); __Pyx_GIVEREF(__pyx_tuple__247); __pyx_codeobj__248 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__247, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_yoh_deb_gits_pkg_exppsy_pa, __pyx_n_s_roll_max, 1475, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__248)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1475; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/algos.pyx":1488 * return NaN * * def roll_min(ndarray input, int win, int minp): # <<<<<<<<<<<<<< * ''' * O(N log(window)) implementation using skip list */ __pyx_tuple__249 = PyTuple_Pack(3, __pyx_n_s_input, __pyx_n_s_win, __pyx_n_s_minp); if (unlikely(!__pyx_tuple__249)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1488; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__249); __Pyx_GIVEREF(__pyx_tuple__249); __pyx_codeobj__250 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__249, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_yoh_deb_gits_pkg_exppsy_pa, __pyx_n_s_roll_min, 1488, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__250)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1488; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/algos.pyx":1496 * @cython.boundscheck(False) * @cython.wraparound(False) * def roll_min2(np.ndarray[np.float64_t, ndim=1] a, int window, int minp): # <<<<<<<<<<<<<< * "Moving min of 1d array of dtype=float64 along axis=0 ignoring NaNs." * cdef np.float64_t ai, aold */ __pyx_tuple__251 = PyTuple_Pack(15, __pyx_n_s_a, __pyx_n_s_window, __pyx_n_s_minp, __pyx_n_s_ai, __pyx_n_s_aold, __pyx_n_s_count, __pyx_n_s_ring, __pyx_n_s_minpair, __pyx_n_s_end, __pyx_n_s_last, __pyx_n_s_i0, __pyx_n_s_dim, __pyx_n_s_n0, __pyx_n_s_dims, __pyx_n_s_y); if (unlikely(!__pyx_tuple__251)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1496; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__251); __Pyx_GIVEREF(__pyx_tuple__251); __pyx_codeobj__252 = (PyObject*)__Pyx_PyCode_New(3, 0, 15, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__251, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_yoh_deb_gits_pkg_exppsy_pa, __pyx_n_s_roll_min2, 1496, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__252)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1496; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/algos.pyx":1582 * return NaN * * def roll_quantile(ndarray[float64_t, cast=True] input, int win, # <<<<<<<<<<<<<< * int minp, double quantile): * ''' */ __pyx_tuple__253 = PyTuple_Pack(13, __pyx_n_s_input, __pyx_n_s_win, __pyx_n_s_minp, __pyx_n_s_quantile, __pyx_n_s_val, __pyx_n_s_prev, __pyx_n_s_midpoint, __pyx_n_s_skiplist, __pyx_n_s_nobs, __pyx_n_s_i, __pyx_n_s_N, __pyx_n_s_output, __pyx_n_s_idx); if (unlikely(!__pyx_tuple__253)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1582; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__253); __Pyx_GIVEREF(__pyx_tuple__253); __pyx_codeobj__254 = (PyObject*)__Pyx_PyCode_New(4, 0, 13, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__253, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_yoh_deb_gits_pkg_exppsy_pa, __pyx_n_s_roll_quantile, 1582, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__254)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1582; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/algos.pyx":1629 * return output * * def roll_generic(ndarray[float64_t, cast=True] input, int win, # <<<<<<<<<<<<<< * int minp, object func): * cdef ndarray[double_t] output, counts, bufarr */ __pyx_tuple__255 = PyTuple_Pack(11, __pyx_n_s_input, __pyx_n_s_win, __pyx_n_s_minp, __pyx_n_s_func, __pyx_n_s_output, __pyx_n_s_counts, __pyx_n_s_bufarr, __pyx_n_s_i, __pyx_n_s_n, __pyx_n_s_buf, __pyx_n_s_oldbuf); if (unlikely(!__pyx_tuple__255)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1629; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__255); __Pyx_GIVEREF(__pyx_tuple__255); __pyx_codeobj__256 = (PyObject*)__Pyx_PyCode_New(4, 0, 11, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__255, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_yoh_deb_gits_pkg_exppsy_pa, __pyx_n_s_roll_generic, 1629, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__256)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1629; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/algos.pyx":1671 * * * def roll_window(ndarray[float64_t, ndim=1, cast=True] input, # <<<<<<<<<<<<<< * ndarray[float64_t, ndim=1, cast=True] weights, * int minp, bint avg=True, bint avg_wgt=False): */ __pyx_tuple__257 = PyTuple_Pack(18, __pyx_n_s_input, __pyx_n_s_weights, __pyx_n_s_minp, __pyx_n_s_avg, __pyx_n_s_avg_wgt, __pyx_n_s_output, __pyx_n_s_tot_wgt, __pyx_n_s_counts, __pyx_n_s_in_i, __pyx_n_s_win_i, __pyx_n_s_win_n, __pyx_n_s_win_k, __pyx_n_s_in_n, __pyx_n_s_in_k, __pyx_n_s_val_in, __pyx_n_s_val_win, __pyx_n_s_c, __pyx_n_s_w); if (unlikely(!__pyx_tuple__257)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1671; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__257); __Pyx_GIVEREF(__pyx_tuple__257); __pyx_codeobj__258 = (PyObject*)__Pyx_PyCode_New(5, 0, 18, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__257, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_yoh_deb_gits_pkg_exppsy_pa, __pyx_n_s_roll_window, 1671, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__258)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1671; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/algos.pyx":1744 * @cython.wraparound(False) * @cython.boundscheck(False) * def is_lexsorted(list list_of_arrays): # <<<<<<<<<<<<<< * cdef: * int i */ __pyx_tuple__259 = PyTuple_Pack(9, __pyx_n_s_list_of_arrays, __pyx_n_s_i, __pyx_n_s_n, __pyx_n_s_nlevels, __pyx_n_s_k, __pyx_n_s_cur, __pyx_n_s_pre, __pyx_n_s_arr, __pyx_n_s_vecs); if (unlikely(!__pyx_tuple__259)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1744; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__259); __Pyx_GIVEREF(__pyx_tuple__259); __pyx_codeobj__260 = (PyObject*)__Pyx_PyCode_New(1, 0, 9, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__259, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_yoh_deb_gits_pkg_exppsy_pa, __pyx_n_s_is_lexsorted, 1744, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__260)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1744; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/algos.pyx":1777 * * @cython.boundscheck(False) * def groupby_indices(ndarray values): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = len(values) */ __pyx_tuple__261 = PyTuple_Pack(13, __pyx_n_s_values, __pyx_n_s_i, __pyx_n_s_n, __pyx_n_s_labels, __pyx_n_s_counts, __pyx_n_s_arr, __pyx_n_s_seen, __pyx_n_s_loc, __pyx_n_s_ids, __pyx_n_s_val, __pyx_n_s_k, __pyx_n_s_vecs, __pyx_n_s_result); if (unlikely(!__pyx_tuple__261)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1777; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__261); __Pyx_GIVEREF(__pyx_tuple__261); __pyx_codeobj__262 = (PyObject*)__Pyx_PyCode_New(1, 0, 13, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__261, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_yoh_deb_gits_pkg_exppsy_pa, __pyx_n_s_groupby_indices, 1777, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__262)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1777; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/algos.pyx":1814 * @cython.wraparound(False) * @cython.boundscheck(False) * def group_labels(ndarray[object] values): # <<<<<<<<<<<<<< * ''' * Compute label vector from input values and associated useful data */ __pyx_tuple__263 = PyTuple_Pack(10, __pyx_n_s_values, __pyx_n_s_i, __pyx_n_s_n, __pyx_n_s_labels, __pyx_n_s_counts, __pyx_n_s_ids, __pyx_n_s_reverse, __pyx_n_s_idx, __pyx_n_s_val, __pyx_n_s_count); if (unlikely(!__pyx_tuple__263)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1814; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__263); __Pyx_GIVEREF(__pyx_tuple__263); __pyx_codeobj__264 = (PyObject*)__Pyx_PyCode_New(1, 0, 10, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__263, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_yoh_deb_gits_pkg_exppsy_pa, __pyx_n_s_group_labels, 1814, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__264)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1814; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/algos.pyx":1856 * @cython.boundscheck(False) * @cython.wraparound(False) * def groupsort_indexer(ndarray[int64_t] index, Py_ssize_t ngroups): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, loc, label, n */ __pyx_tuple__265 = PyTuple_Pack(9, __pyx_n_s_index, __pyx_n_s_ngroups, __pyx_n_s_i, __pyx_n_s_loc, __pyx_n_s_label, __pyx_n_s_n, __pyx_n_s_counts, __pyx_n_s_where, __pyx_n_s_result); if (unlikely(!__pyx_tuple__265)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1856; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__265); __Pyx_GIVEREF(__pyx_tuple__265); __pyx_codeobj__266 = (PyObject*)__Pyx_PyCode_New(2, 0, 9, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__265, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_yoh_deb_gits_pkg_exppsy_pa, __pyx_n_s_groupsort_indexer, 1856, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__266)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1856; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/algos.pyx":1887 * @cython.boundscheck(False) * @cython.wraparound(False) * def group_nth_object(ndarray[object, ndim=2] out, # <<<<<<<<<<<<<< * ndarray[int64_t] counts, * ndarray[object, ndim=2] values, */ __pyx_tuple__267 = PyTuple_Pack(14, __pyx_n_s_out, __pyx_n_s_counts, __pyx_n_s_values, __pyx_n_s_labels, __pyx_n_s_rank, __pyx_n_s_i, __pyx_n_s_j, __pyx_n_s_N, __pyx_n_s_K, __pyx_n_s_lab, __pyx_n_s_val, __pyx_n_s_count, __pyx_n_s_nobs, __pyx_n_s_resx); if (unlikely(!__pyx_tuple__267)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1887; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__267); __Pyx_GIVEREF(__pyx_tuple__267); __pyx_codeobj__268 = (PyObject*)__Pyx_PyCode_New(5, 0, 14, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__267, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_yoh_deb_gits_pkg_exppsy_pa, __pyx_n_s_group_nth_object, 1887, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__268)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1887; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/algos.pyx":1931 * @cython.boundscheck(False) * @cython.wraparound(False) * def group_nth_bin_object(ndarray[object, ndim=2] out, # <<<<<<<<<<<<<< * ndarray[int64_t] counts, * ndarray[object, ndim=2] values, */ __pyx_tuple__269 = PyTuple_Pack(15, __pyx_n_s_out, __pyx_n_s_counts, __pyx_n_s_values, __pyx_n_s_bins, __pyx_n_s_rank, __pyx_n_s_i, __pyx_n_s_j, __pyx_n_s_N, __pyx_n_s_K, __pyx_n_s_ngroups, __pyx_n_s_b, __pyx_n_s_val, __pyx_n_s_count, __pyx_n_s_resx, __pyx_n_s_nobs); if (unlikely(!__pyx_tuple__269)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1931; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__269); __Pyx_GIVEREF(__pyx_tuple__269); __pyx_codeobj__270 = (PyObject*)__Pyx_PyCode_New(5, 0, 15, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__269, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_yoh_deb_gits_pkg_exppsy_pa, __pyx_n_s_group_nth_bin_object, 1931, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__270)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1931; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/algos.pyx":1979 * @cython.boundscheck(False) * @cython.wraparound(False) * def group_last_object(ndarray[object, ndim=2] out, # <<<<<<<<<<<<<< * ndarray[int64_t] counts, * ndarray[object, ndim=2] values, */ __pyx_tuple__271 = PyTuple_Pack(13, __pyx_n_s_out, __pyx_n_s_counts, __pyx_n_s_values, __pyx_n_s_labels, __pyx_n_s_i, __pyx_n_s_j, __pyx_n_s_N, __pyx_n_s_K, __pyx_n_s_lab, __pyx_n_s_val, __pyx_n_s_count, __pyx_n_s_resx, __pyx_n_s_nobs); if (unlikely(!__pyx_tuple__271)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1979; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__271); __Pyx_GIVEREF(__pyx_tuple__271); __pyx_codeobj__272 = (PyObject*)__Pyx_PyCode_New(4, 0, 13, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__271, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_yoh_deb_gits_pkg_exppsy_pa, __pyx_n_s_group_last_object, 1979, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__272)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1979; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/algos.pyx":2021 * @cython.boundscheck(False) * @cython.wraparound(False) * def group_last_bin_object(ndarray[object, ndim=2] out, # <<<<<<<<<<<<<< * ndarray[int64_t] counts, * ndarray[object, ndim=2] values, */ __pyx_tuple__273 = PyTuple_Pack(14, __pyx_n_s_out, __pyx_n_s_counts, __pyx_n_s_values, __pyx_n_s_bins, __pyx_n_s_i, __pyx_n_s_j, __pyx_n_s_N, __pyx_n_s_K, __pyx_n_s_ngroups, __pyx_n_s_b, __pyx_n_s_val, __pyx_n_s_count, __pyx_n_s_resx, __pyx_n_s_nobs); if (unlikely(!__pyx_tuple__273)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2021; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__273); __Pyx_GIVEREF(__pyx_tuple__273); __pyx_codeobj__274 = (PyObject*)__Pyx_PyCode_New(4, 0, 14, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__273, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_yoh_deb_gits_pkg_exppsy_pa, __pyx_n_s_group_last_bin_object, 2021, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__274)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2021; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/algos.pyx":2071 * # median * * def group_median(ndarray[float64_t, ndim=2] out, # <<<<<<<<<<<<<< * ndarray[int64_t] counts, * ndarray[float64_t, ndim=2] values, */ __pyx_tuple__275 = PyTuple_Pack(14, __pyx_n_s_out, __pyx_n_s_counts, __pyx_n_s_values, __pyx_n_s_labels, __pyx_n_s_i, __pyx_n_s_j, __pyx_n_s_N, __pyx_n_s_K, __pyx_n_s_ngroups, __pyx_n_s_size, __pyx_n_s_counts_2, __pyx_n_s_data, __pyx_n_s_ptr, __pyx_n_s_indexer); if (unlikely(!__pyx_tuple__275)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2071; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__275); __Pyx_GIVEREF(__pyx_tuple__275); __pyx_codeobj__276 = (PyObject*)__Pyx_PyCode_New(4, 0, 14, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__275, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_yoh_deb_gits_pkg_exppsy_pa, __pyx_n_s_group_median, 2071, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__276)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2071; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/join.pyx":1 * def inner_join(ndarray[int64_t] left, ndarray[int64_t] right, # <<<<<<<<<<<<<< * Py_ssize_t max_groups): * cdef: */ __pyx_tuple__277 = PyTuple_Pack(20, __pyx_n_s_left, __pyx_n_s_right, __pyx_n_s_max_groups, __pyx_n_s_i, __pyx_n_s_j, __pyx_n_s_k, __pyx_n_s_count, __pyx_n_s_left_count, __pyx_n_s_right_count, __pyx_n_s_left_sorter, __pyx_n_s_right_sorter, __pyx_n_s_left_indexer, __pyx_n_s_right_indexer, __pyx_n_s_lc, __pyx_n_s_rc, __pyx_n_s_loc, __pyx_n_s_left_pos, __pyx_n_s_right_pos, __pyx_n_s_position, __pyx_n_s_offset); if (unlikely(!__pyx_tuple__277)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__277); __Pyx_GIVEREF(__pyx_tuple__277); __pyx_codeobj__278 = (PyObject*)__Pyx_PyCode_New(3, 0, 20, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__277, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pandas_src_join_pyx, __pyx_n_s_inner_join, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__278)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/join.pyx":51 * _get_result_indexer(right_sorter, right_indexer)) * * def left_outer_join(ndarray[int64_t] left, ndarray[int64_t] right, # <<<<<<<<<<<<<< * Py_ssize_t max_groups, sort=True): * cdef: */ __pyx_tuple__279 = PyTuple_Pack(22, __pyx_n_s_left, __pyx_n_s_right, __pyx_n_s_max_groups, __pyx_n_s_sort, __pyx_n_s_i, __pyx_n_s_j, __pyx_n_s_k, __pyx_n_s_count, __pyx_n_s_left_count, __pyx_n_s_right_count, __pyx_n_s_left_sorter, __pyx_n_s_right_sorter, __pyx_n_s_rev, __pyx_n_s_left_indexer, __pyx_n_s_right_indexer, __pyx_n_s_lc, __pyx_n_s_rc, __pyx_n_s_loc, __pyx_n_s_left_pos, __pyx_n_s_right_pos, __pyx_n_s_position, __pyx_n_s_offset); if (unlikely(!__pyx_tuple__279)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__279); __Pyx_GIVEREF(__pyx_tuple__279); __pyx_codeobj__280 = (PyObject*)__Pyx_PyCode_New(4, 0, 22, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__279, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pandas_src_join_pyx, __pyx_n_s_left_outer_join, 51, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__280)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/join.pyx":120 * * * def full_outer_join(ndarray[int64_t] left, ndarray[int64_t] right, # <<<<<<<<<<<<<< * Py_ssize_t max_groups): * cdef: */ __pyx_tuple__281 = PyTuple_Pack(19, __pyx_n_s_left, __pyx_n_s_right, __pyx_n_s_max_groups, __pyx_n_s_i, __pyx_n_s_j, __pyx_n_s_k, __pyx_n_s_count, __pyx_n_s_left_count, __pyx_n_s_right_count, __pyx_n_s_left_sorter, __pyx_n_s_right_sorter, __pyx_n_s_left_indexer, __pyx_n_s_right_indexer, __pyx_n_s_lc, __pyx_n_s_rc, __pyx_n_s_left_pos, __pyx_n_s_right_pos, __pyx_n_s_offset, __pyx_n_s_position); if (unlikely(!__pyx_tuple__281)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 120; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__281); __Pyx_GIVEREF(__pyx_tuple__281); __pyx_codeobj__282 = (PyObject*)__Pyx_PyCode_New(3, 0, 19, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__281, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pandas_src_join_pyx, __pyx_n_s_full_outer_join, 120, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__282)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 120; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/join.pyx":184 * * * def _get_result_indexer(sorter, indexer): # <<<<<<<<<<<<<< * if indexer.dtype != np.int_: * indexer = indexer.astype(np.int_) */ __pyx_tuple__283 = PyTuple_Pack(3, __pyx_n_s_sorter, __pyx_n_s_indexer, __pyx_n_s_res); if (unlikely(!__pyx_tuple__283)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 184; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__283); __Pyx_GIVEREF(__pyx_tuple__283); __pyx_codeobj__284 = (PyObject*)__Pyx_PyCode_New(2, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__283, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pandas_src_join_pyx, __pyx_n_s_get_result_indexer, 184, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__284)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 184; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/join.pyx":199 * * * def ffill_indexer(ndarray[int64_t] indexer): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = len(indexer) */ __pyx_tuple__285 = PyTuple_Pack(6, __pyx_n_s_indexer, __pyx_n_s_i, __pyx_n_s_n, __pyx_n_s_result, __pyx_n_s_val, __pyx_n_s_last_obs); if (unlikely(!__pyx_tuple__285)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 199; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__285); __Pyx_GIVEREF(__pyx_tuple__285); __pyx_codeobj__286 = (PyObject*)__Pyx_PyCode_New(1, 0, 6, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__285, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pandas_src_join_pyx, __pyx_n_s_ffill_indexer, 199, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__286)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 199; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/join.pyx":219 * * * def ffill_by_group(ndarray[int64_t] indexer, ndarray[int64_t] group_ids, # <<<<<<<<<<<<<< * int64_t max_group): * cdef: */ __pyx_tuple__287 = PyTuple_Pack(9, __pyx_n_s_indexer, __pyx_n_s_group_ids, __pyx_n_s_max_group, __pyx_n_s_i, __pyx_n_s_n, __pyx_n_s_result, __pyx_n_s_last_obs, __pyx_n_s_gid, __pyx_n_s_val); if (unlikely(!__pyx_tuple__287)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 219; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__287); __Pyx_GIVEREF(__pyx_tuple__287); __pyx_codeobj__288 = (PyObject*)__Pyx_PyCode_New(3, 0, 9, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__287, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pandas_src_join_pyx, __pyx_n_s_ffill_by_group, 219, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__288)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 219; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":39 * import_ufunc() * * cdef int PLATFORM_INT = ( np.arange(0, dtype=np.int_)).descr.type_num # <<<<<<<<<<<<<< * * cpdef ensure_platform_int(object arr): */ __pyx_tuple__289 = PyTuple_Pack(1, __pyx_int_0); if (unlikely(!__pyx_tuple__289)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 39; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__289); __Pyx_GIVEREF(__pyx_tuple__289); /* "pandas/src/generated.pyx":257 * @cython.boundscheck(False) * @cython.wraparound(False) * def pad_float64(ndarray[float64_t] old, ndarray[float64_t] new, # <<<<<<<<<<<<<< * limit=None): * cdef Py_ssize_t i, j, nleft, nright */ __pyx_tuple__290 = PyTuple_Pack(12, __pyx_n_s_old, __pyx_n_s_new, __pyx_n_s_limit, __pyx_n_s_i, __pyx_n_s_j, __pyx_n_s_nleft, __pyx_n_s_nright, __pyx_n_s_indexer, __pyx_n_s_cur, __pyx_n_s_next, __pyx_n_s_lim, __pyx_n_s_fill_count); if (unlikely(!__pyx_tuple__290)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 257; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__290); __Pyx_GIVEREF(__pyx_tuple__290); __pyx_codeobj__291 = (PyObject*)__Pyx_PyCode_New(3, 0, 12, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__290, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pandas_src_generated_pyx, __pyx_n_s_pad_float64, 257, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__291)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 257; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":318 * @cython.boundscheck(False) * @cython.wraparound(False) * def pad_float32(ndarray[float32_t] old, ndarray[float32_t] new, # <<<<<<<<<<<<<< * limit=None): * cdef Py_ssize_t i, j, nleft, nright */ __pyx_tuple__292 = PyTuple_Pack(12, __pyx_n_s_old, __pyx_n_s_new, __pyx_n_s_limit, __pyx_n_s_i, __pyx_n_s_j, __pyx_n_s_nleft, __pyx_n_s_nright, __pyx_n_s_indexer, __pyx_n_s_cur, __pyx_n_s_next, __pyx_n_s_lim, __pyx_n_s_fill_count); if (unlikely(!__pyx_tuple__292)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 318; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__292); __Pyx_GIVEREF(__pyx_tuple__292); __pyx_codeobj__293 = (PyObject*)__Pyx_PyCode_New(3, 0, 12, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__292, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pandas_src_generated_pyx, __pyx_n_s_pad_float32, 318, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__293)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 318; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":379 * @cython.boundscheck(False) * @cython.wraparound(False) * def pad_object(ndarray[object] old, ndarray[object] new, # <<<<<<<<<<<<<< * limit=None): * cdef Py_ssize_t i, j, nleft, nright */ __pyx_tuple__294 = PyTuple_Pack(12, __pyx_n_s_old, __pyx_n_s_new, __pyx_n_s_limit, __pyx_n_s_i, __pyx_n_s_j, __pyx_n_s_nleft, __pyx_n_s_nright, __pyx_n_s_indexer, __pyx_n_s_cur, __pyx_n_s_next, __pyx_n_s_lim, __pyx_n_s_fill_count); if (unlikely(!__pyx_tuple__294)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 379; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__294); __Pyx_GIVEREF(__pyx_tuple__294); __pyx_codeobj__295 = (PyObject*)__Pyx_PyCode_New(3, 0, 12, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__294, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pandas_src_generated_pyx, __pyx_n_s_pad_object, 379, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__295)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 379; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":440 * @cython.boundscheck(False) * @cython.wraparound(False) * def pad_int32(ndarray[int32_t] old, ndarray[int32_t] new, # <<<<<<<<<<<<<< * limit=None): * cdef Py_ssize_t i, j, nleft, nright */ __pyx_tuple__296 = PyTuple_Pack(12, __pyx_n_s_old, __pyx_n_s_new, __pyx_n_s_limit, __pyx_n_s_i, __pyx_n_s_j, __pyx_n_s_nleft, __pyx_n_s_nright, __pyx_n_s_indexer, __pyx_n_s_cur, __pyx_n_s_next, __pyx_n_s_lim, __pyx_n_s_fill_count); if (unlikely(!__pyx_tuple__296)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 440; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__296); __Pyx_GIVEREF(__pyx_tuple__296); __pyx_codeobj__297 = (PyObject*)__Pyx_PyCode_New(3, 0, 12, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__296, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pandas_src_generated_pyx, __pyx_n_s_pad_int32, 440, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__297)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 440; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":501 * @cython.boundscheck(False) * @cython.wraparound(False) * def pad_int64(ndarray[int64_t] old, ndarray[int64_t] new, # <<<<<<<<<<<<<< * limit=None): * cdef Py_ssize_t i, j, nleft, nright */ __pyx_tuple__298 = PyTuple_Pack(12, __pyx_n_s_old, __pyx_n_s_new, __pyx_n_s_limit, __pyx_n_s_i, __pyx_n_s_j, __pyx_n_s_nleft, __pyx_n_s_nright, __pyx_n_s_indexer, __pyx_n_s_cur, __pyx_n_s_next, __pyx_n_s_lim, __pyx_n_s_fill_count); if (unlikely(!__pyx_tuple__298)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 501; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__298); __Pyx_GIVEREF(__pyx_tuple__298); __pyx_codeobj__299 = (PyObject*)__Pyx_PyCode_New(3, 0, 12, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__298, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pandas_src_generated_pyx, __pyx_n_s_pad_int64, 501, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__299)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 501; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":562 * @cython.boundscheck(False) * @cython.wraparound(False) * def pad_bool(ndarray[uint8_t] old, ndarray[uint8_t] new, # <<<<<<<<<<<<<< * limit=None): * cdef Py_ssize_t i, j, nleft, nright */ __pyx_tuple__300 = PyTuple_Pack(12, __pyx_n_s_old, __pyx_n_s_new, __pyx_n_s_limit, __pyx_n_s_i, __pyx_n_s_j, __pyx_n_s_nleft, __pyx_n_s_nright, __pyx_n_s_indexer, __pyx_n_s_cur, __pyx_n_s_next, __pyx_n_s_lim, __pyx_n_s_fill_count); if (unlikely(!__pyx_tuple__300)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 562; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__300); __Pyx_GIVEREF(__pyx_tuple__300); __pyx_codeobj__301 = (PyObject*)__Pyx_PyCode_New(3, 0, 12, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__300, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pandas_src_generated_pyx, __pyx_n_s_pad_bool, 562, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__301)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 562; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":624 * @cython.boundscheck(False) * @cython.wraparound(False) * def backfill_float64(ndarray[float64_t] old, ndarray[float64_t] new, # <<<<<<<<<<<<<< * limit=None): * cdef Py_ssize_t i, j, nleft, nright */ __pyx_tuple__302 = PyTuple_Pack(12, __pyx_n_s_old, __pyx_n_s_new, __pyx_n_s_limit, __pyx_n_s_i, __pyx_n_s_j, __pyx_n_s_nleft, __pyx_n_s_nright, __pyx_n_s_indexer, __pyx_n_s_cur, __pyx_n_s_prev, __pyx_n_s_lim, __pyx_n_s_fill_count); if (unlikely(!__pyx_tuple__302)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 624; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__302); __Pyx_GIVEREF(__pyx_tuple__302); __pyx_codeobj__303 = (PyObject*)__Pyx_PyCode_New(3, 0, 12, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__302, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pandas_src_generated_pyx, __pyx_n_s_backfill_float64, 624, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__303)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 624; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":686 * @cython.boundscheck(False) * @cython.wraparound(False) * def backfill_float32(ndarray[float32_t] old, ndarray[float32_t] new, # <<<<<<<<<<<<<< * limit=None): * cdef Py_ssize_t i, j, nleft, nright */ __pyx_tuple__304 = PyTuple_Pack(12, __pyx_n_s_old, __pyx_n_s_new, __pyx_n_s_limit, __pyx_n_s_i, __pyx_n_s_j, __pyx_n_s_nleft, __pyx_n_s_nright, __pyx_n_s_indexer, __pyx_n_s_cur, __pyx_n_s_prev, __pyx_n_s_lim, __pyx_n_s_fill_count); if (unlikely(!__pyx_tuple__304)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 686; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__304); __Pyx_GIVEREF(__pyx_tuple__304); __pyx_codeobj__305 = (PyObject*)__Pyx_PyCode_New(3, 0, 12, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__304, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pandas_src_generated_pyx, __pyx_n_s_backfill_float32, 686, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__305)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 686; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":748 * @cython.boundscheck(False) * @cython.wraparound(False) * def backfill_object(ndarray[object] old, ndarray[object] new, # <<<<<<<<<<<<<< * limit=None): * cdef Py_ssize_t i, j, nleft, nright */ __pyx_tuple__306 = PyTuple_Pack(12, __pyx_n_s_old, __pyx_n_s_new, __pyx_n_s_limit, __pyx_n_s_i, __pyx_n_s_j, __pyx_n_s_nleft, __pyx_n_s_nright, __pyx_n_s_indexer, __pyx_n_s_cur, __pyx_n_s_prev, __pyx_n_s_lim, __pyx_n_s_fill_count); if (unlikely(!__pyx_tuple__306)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 748; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__306); __Pyx_GIVEREF(__pyx_tuple__306); __pyx_codeobj__307 = (PyObject*)__Pyx_PyCode_New(3, 0, 12, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__306, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pandas_src_generated_pyx, __pyx_n_s_backfill_object, 748, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__307)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 748; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":810 * @cython.boundscheck(False) * @cython.wraparound(False) * def backfill_int32(ndarray[int32_t] old, ndarray[int32_t] new, # <<<<<<<<<<<<<< * limit=None): * cdef Py_ssize_t i, j, nleft, nright */ __pyx_tuple__308 = PyTuple_Pack(12, __pyx_n_s_old, __pyx_n_s_new, __pyx_n_s_limit, __pyx_n_s_i, __pyx_n_s_j, __pyx_n_s_nleft, __pyx_n_s_nright, __pyx_n_s_indexer, __pyx_n_s_cur, __pyx_n_s_prev, __pyx_n_s_lim, __pyx_n_s_fill_count); if (unlikely(!__pyx_tuple__308)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 810; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__308); __Pyx_GIVEREF(__pyx_tuple__308); __pyx_codeobj__309 = (PyObject*)__Pyx_PyCode_New(3, 0, 12, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__308, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pandas_src_generated_pyx, __pyx_n_s_backfill_int32, 810, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__309)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 810; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":872 * @cython.boundscheck(False) * @cython.wraparound(False) * def backfill_int64(ndarray[int64_t] old, ndarray[int64_t] new, # <<<<<<<<<<<<<< * limit=None): * cdef Py_ssize_t i, j, nleft, nright */ __pyx_tuple__310 = PyTuple_Pack(12, __pyx_n_s_old, __pyx_n_s_new, __pyx_n_s_limit, __pyx_n_s_i, __pyx_n_s_j, __pyx_n_s_nleft, __pyx_n_s_nright, __pyx_n_s_indexer, __pyx_n_s_cur, __pyx_n_s_prev, __pyx_n_s_lim, __pyx_n_s_fill_count); if (unlikely(!__pyx_tuple__310)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 872; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__310); __Pyx_GIVEREF(__pyx_tuple__310); __pyx_codeobj__311 = (PyObject*)__Pyx_PyCode_New(3, 0, 12, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__310, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pandas_src_generated_pyx, __pyx_n_s_backfill_int64, 872, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__311)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 872; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":934 * @cython.boundscheck(False) * @cython.wraparound(False) * def backfill_bool(ndarray[uint8_t] old, ndarray[uint8_t] new, # <<<<<<<<<<<<<< * limit=None): * cdef Py_ssize_t i, j, nleft, nright */ __pyx_tuple__312 = PyTuple_Pack(12, __pyx_n_s_old, __pyx_n_s_new, __pyx_n_s_limit, __pyx_n_s_i, __pyx_n_s_j, __pyx_n_s_nleft, __pyx_n_s_nright, __pyx_n_s_indexer, __pyx_n_s_cur, __pyx_n_s_prev, __pyx_n_s_lim, __pyx_n_s_fill_count); if (unlikely(!__pyx_tuple__312)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 934; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__312); __Pyx_GIVEREF(__pyx_tuple__312); __pyx_codeobj__313 = (PyObject*)__Pyx_PyCode_New(3, 0, 12, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__312, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pandas_src_generated_pyx, __pyx_n_s_backfill_bool, 934, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__313)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 934; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":997 * @cython.boundscheck(False) * @cython.wraparound(False) * def pad_inplace_float64(ndarray[float64_t] values, # <<<<<<<<<<<<<< * ndarray[uint8_t, cast=True] mask, * limit=None): */ __pyx_tuple__314 = PyTuple_Pack(8, __pyx_n_s_values, __pyx_n_s_mask, __pyx_n_s_limit, __pyx_n_s_i, __pyx_n_s_N, __pyx_n_s_val, __pyx_n_s_lim, __pyx_n_s_fill_count); if (unlikely(!__pyx_tuple__314)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 997; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__314); __Pyx_GIVEREF(__pyx_tuple__314); __pyx_codeobj__315 = (PyObject*)__Pyx_PyCode_New(3, 0, 8, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__314, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pandas_src_generated_pyx, __pyx_n_s_pad_inplace_float64, 997, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__315)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 997; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":1030 * @cython.boundscheck(False) * @cython.wraparound(False) * def pad_inplace_float32(ndarray[float32_t] values, # <<<<<<<<<<<<<< * ndarray[uint8_t, cast=True] mask, * limit=None): */ __pyx_tuple__316 = PyTuple_Pack(8, __pyx_n_s_values, __pyx_n_s_mask, __pyx_n_s_limit, __pyx_n_s_i, __pyx_n_s_N, __pyx_n_s_val, __pyx_n_s_lim, __pyx_n_s_fill_count); if (unlikely(!__pyx_tuple__316)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1030; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__316); __Pyx_GIVEREF(__pyx_tuple__316); __pyx_codeobj__317 = (PyObject*)__Pyx_PyCode_New(3, 0, 8, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__316, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pandas_src_generated_pyx, __pyx_n_s_pad_inplace_float32, 1030, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__317)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1030; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":1063 * @cython.boundscheck(False) * @cython.wraparound(False) * def pad_inplace_object(ndarray[object] values, # <<<<<<<<<<<<<< * ndarray[uint8_t, cast=True] mask, * limit=None): */ __pyx_tuple__318 = PyTuple_Pack(8, __pyx_n_s_values, __pyx_n_s_mask, __pyx_n_s_limit, __pyx_n_s_i, __pyx_n_s_N, __pyx_n_s_val, __pyx_n_s_lim, __pyx_n_s_fill_count); if (unlikely(!__pyx_tuple__318)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1063; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__318); __Pyx_GIVEREF(__pyx_tuple__318); __pyx_codeobj__319 = (PyObject*)__Pyx_PyCode_New(3, 0, 8, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__318, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pandas_src_generated_pyx, __pyx_n_s_pad_inplace_object, 1063, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__319)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1063; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":1096 * @cython.boundscheck(False) * @cython.wraparound(False) * def pad_inplace_int32(ndarray[int32_t] values, # <<<<<<<<<<<<<< * ndarray[uint8_t, cast=True] mask, * limit=None): */ __pyx_tuple__320 = PyTuple_Pack(8, __pyx_n_s_values, __pyx_n_s_mask, __pyx_n_s_limit, __pyx_n_s_i, __pyx_n_s_N, __pyx_n_s_val, __pyx_n_s_lim, __pyx_n_s_fill_count); if (unlikely(!__pyx_tuple__320)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1096; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__320); __Pyx_GIVEREF(__pyx_tuple__320); __pyx_codeobj__321 = (PyObject*)__Pyx_PyCode_New(3, 0, 8, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__320, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pandas_src_generated_pyx, __pyx_n_s_pad_inplace_int32, 1096, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__321)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1096; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":1129 * @cython.boundscheck(False) * @cython.wraparound(False) * def pad_inplace_int64(ndarray[int64_t] values, # <<<<<<<<<<<<<< * ndarray[uint8_t, cast=True] mask, * limit=None): */ __pyx_tuple__322 = PyTuple_Pack(8, __pyx_n_s_values, __pyx_n_s_mask, __pyx_n_s_limit, __pyx_n_s_i, __pyx_n_s_N, __pyx_n_s_val, __pyx_n_s_lim, __pyx_n_s_fill_count); if (unlikely(!__pyx_tuple__322)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1129; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__322); __Pyx_GIVEREF(__pyx_tuple__322); __pyx_codeobj__323 = (PyObject*)__Pyx_PyCode_New(3, 0, 8, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__322, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pandas_src_generated_pyx, __pyx_n_s_pad_inplace_int64, 1129, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__323)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1129; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":1162 * @cython.boundscheck(False) * @cython.wraparound(False) * def pad_inplace_bool(ndarray[uint8_t] values, # <<<<<<<<<<<<<< * ndarray[uint8_t, cast=True] mask, * limit=None): */ __pyx_tuple__324 = PyTuple_Pack(8, __pyx_n_s_values, __pyx_n_s_mask, __pyx_n_s_limit, __pyx_n_s_i, __pyx_n_s_N, __pyx_n_s_val, __pyx_n_s_lim, __pyx_n_s_fill_count); if (unlikely(!__pyx_tuple__324)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1162; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__324); __Pyx_GIVEREF(__pyx_tuple__324); __pyx_codeobj__325 = (PyObject*)__Pyx_PyCode_New(3, 0, 8, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__324, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pandas_src_generated_pyx, __pyx_n_s_pad_inplace_bool, 1162, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__325)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1162; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":1196 * @cython.boundscheck(False) * @cython.wraparound(False) * def backfill_inplace_float64(ndarray[float64_t] values, # <<<<<<<<<<<<<< * ndarray[uint8_t, cast=True] mask, * limit=None): */ __pyx_tuple__326 = PyTuple_Pack(8, __pyx_n_s_values, __pyx_n_s_mask, __pyx_n_s_limit, __pyx_n_s_i, __pyx_n_s_N, __pyx_n_s_val, __pyx_n_s_lim, __pyx_n_s_fill_count); if (unlikely(!__pyx_tuple__326)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1196; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__326); __Pyx_GIVEREF(__pyx_tuple__326); __pyx_codeobj__327 = (PyObject*)__Pyx_PyCode_New(3, 0, 8, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__326, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pandas_src_generated_pyx, __pyx_n_s_backfill_inplace_float64, 1196, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__327)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1196; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":1228 * @cython.boundscheck(False) * @cython.wraparound(False) * def backfill_inplace_float32(ndarray[float32_t] values, # <<<<<<<<<<<<<< * ndarray[uint8_t, cast=True] mask, * limit=None): */ __pyx_tuple__328 = PyTuple_Pack(8, __pyx_n_s_values, __pyx_n_s_mask, __pyx_n_s_limit, __pyx_n_s_i, __pyx_n_s_N, __pyx_n_s_val, __pyx_n_s_lim, __pyx_n_s_fill_count); if (unlikely(!__pyx_tuple__328)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1228; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__328); __Pyx_GIVEREF(__pyx_tuple__328); __pyx_codeobj__329 = (PyObject*)__Pyx_PyCode_New(3, 0, 8, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__328, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pandas_src_generated_pyx, __pyx_n_s_backfill_inplace_float32, 1228, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__329)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1228; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":1260 * @cython.boundscheck(False) * @cython.wraparound(False) * def backfill_inplace_object(ndarray[object] values, # <<<<<<<<<<<<<< * ndarray[uint8_t, cast=True] mask, * limit=None): */ __pyx_tuple__330 = PyTuple_Pack(8, __pyx_n_s_values, __pyx_n_s_mask, __pyx_n_s_limit, __pyx_n_s_i, __pyx_n_s_N, __pyx_n_s_val, __pyx_n_s_lim, __pyx_n_s_fill_count); if (unlikely(!__pyx_tuple__330)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1260; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__330); __Pyx_GIVEREF(__pyx_tuple__330); __pyx_codeobj__331 = (PyObject*)__Pyx_PyCode_New(3, 0, 8, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__330, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pandas_src_generated_pyx, __pyx_n_s_backfill_inplace_object, 1260, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__331)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1260; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":1292 * @cython.boundscheck(False) * @cython.wraparound(False) * def backfill_inplace_int32(ndarray[int32_t] values, # <<<<<<<<<<<<<< * ndarray[uint8_t, cast=True] mask, * limit=None): */ __pyx_tuple__332 = PyTuple_Pack(8, __pyx_n_s_values, __pyx_n_s_mask, __pyx_n_s_limit, __pyx_n_s_i, __pyx_n_s_N, __pyx_n_s_val, __pyx_n_s_lim, __pyx_n_s_fill_count); if (unlikely(!__pyx_tuple__332)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1292; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__332); __Pyx_GIVEREF(__pyx_tuple__332); __pyx_codeobj__333 = (PyObject*)__Pyx_PyCode_New(3, 0, 8, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__332, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pandas_src_generated_pyx, __pyx_n_s_backfill_inplace_int32, 1292, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__333)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1292; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":1324 * @cython.boundscheck(False) * @cython.wraparound(False) * def backfill_inplace_int64(ndarray[int64_t] values, # <<<<<<<<<<<<<< * ndarray[uint8_t, cast=True] mask, * limit=None): */ __pyx_tuple__334 = PyTuple_Pack(8, __pyx_n_s_values, __pyx_n_s_mask, __pyx_n_s_limit, __pyx_n_s_i, __pyx_n_s_N, __pyx_n_s_val, __pyx_n_s_lim, __pyx_n_s_fill_count); if (unlikely(!__pyx_tuple__334)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1324; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__334); __Pyx_GIVEREF(__pyx_tuple__334); __pyx_codeobj__335 = (PyObject*)__Pyx_PyCode_New(3, 0, 8, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__334, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pandas_src_generated_pyx, __pyx_n_s_backfill_inplace_int64, 1324, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__335)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1324; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":1356 * @cython.boundscheck(False) * @cython.wraparound(False) * def backfill_inplace_bool(ndarray[uint8_t] values, # <<<<<<<<<<<<<< * ndarray[uint8_t, cast=True] mask, * limit=None): */ __pyx_tuple__336 = PyTuple_Pack(8, __pyx_n_s_values, __pyx_n_s_mask, __pyx_n_s_limit, __pyx_n_s_i, __pyx_n_s_N, __pyx_n_s_val, __pyx_n_s_lim, __pyx_n_s_fill_count); if (unlikely(!__pyx_tuple__336)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1356; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__336); __Pyx_GIVEREF(__pyx_tuple__336); __pyx_codeobj__337 = (PyObject*)__Pyx_PyCode_New(3, 0, 8, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__336, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pandas_src_generated_pyx, __pyx_n_s_backfill_inplace_bool, 1356, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__337)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1356; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":1389 * @cython.boundscheck(False) * @cython.wraparound(False) * def pad_2d_inplace_float64(ndarray[float64_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[uint8_t, ndim=2] mask, * limit=None): */ __pyx_tuple__338 = PyTuple_Pack(10, __pyx_n_s_values, __pyx_n_s_mask, __pyx_n_s_limit, __pyx_n_s_i, __pyx_n_s_j, __pyx_n_s_N, __pyx_n_s_K, __pyx_n_s_val, __pyx_n_s_lim, __pyx_n_s_fill_count); if (unlikely(!__pyx_tuple__338)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1389; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__338); __Pyx_GIVEREF(__pyx_tuple__338); __pyx_codeobj__339 = (PyObject*)__Pyx_PyCode_New(3, 0, 10, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__338, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pandas_src_generated_pyx, __pyx_n_s_pad_2d_inplace_float64, 1389, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__339)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1389; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":1423 * @cython.boundscheck(False) * @cython.wraparound(False) * def pad_2d_inplace_float32(ndarray[float32_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[uint8_t, ndim=2] mask, * limit=None): */ __pyx_tuple__340 = PyTuple_Pack(10, __pyx_n_s_values, __pyx_n_s_mask, __pyx_n_s_limit, __pyx_n_s_i, __pyx_n_s_j, __pyx_n_s_N, __pyx_n_s_K, __pyx_n_s_val, __pyx_n_s_lim, __pyx_n_s_fill_count); if (unlikely(!__pyx_tuple__340)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1423; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__340); __Pyx_GIVEREF(__pyx_tuple__340); __pyx_codeobj__341 = (PyObject*)__Pyx_PyCode_New(3, 0, 10, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__340, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pandas_src_generated_pyx, __pyx_n_s_pad_2d_inplace_float32, 1423, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__341)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1423; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":1457 * @cython.boundscheck(False) * @cython.wraparound(False) * def pad_2d_inplace_object(ndarray[object, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[uint8_t, ndim=2] mask, * limit=None): */ __pyx_tuple__342 = PyTuple_Pack(10, __pyx_n_s_values, __pyx_n_s_mask, __pyx_n_s_limit, __pyx_n_s_i, __pyx_n_s_j, __pyx_n_s_N, __pyx_n_s_K, __pyx_n_s_val, __pyx_n_s_lim, __pyx_n_s_fill_count); if (unlikely(!__pyx_tuple__342)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1457; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__342); __Pyx_GIVEREF(__pyx_tuple__342); __pyx_codeobj__343 = (PyObject*)__Pyx_PyCode_New(3, 0, 10, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__342, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pandas_src_generated_pyx, __pyx_n_s_pad_2d_inplace_object, 1457, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__343)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1457; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":1491 * @cython.boundscheck(False) * @cython.wraparound(False) * def pad_2d_inplace_int32(ndarray[int32_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[uint8_t, ndim=2] mask, * limit=None): */ __pyx_tuple__344 = PyTuple_Pack(10, __pyx_n_s_values, __pyx_n_s_mask, __pyx_n_s_limit, __pyx_n_s_i, __pyx_n_s_j, __pyx_n_s_N, __pyx_n_s_K, __pyx_n_s_val, __pyx_n_s_lim, __pyx_n_s_fill_count); if (unlikely(!__pyx_tuple__344)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1491; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__344); __Pyx_GIVEREF(__pyx_tuple__344); __pyx_codeobj__345 = (PyObject*)__Pyx_PyCode_New(3, 0, 10, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__344, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pandas_src_generated_pyx, __pyx_n_s_pad_2d_inplace_int32, 1491, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__345)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1491; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":1525 * @cython.boundscheck(False) * @cython.wraparound(False) * def pad_2d_inplace_int64(ndarray[int64_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[uint8_t, ndim=2] mask, * limit=None): */ __pyx_tuple__346 = PyTuple_Pack(10, __pyx_n_s_values, __pyx_n_s_mask, __pyx_n_s_limit, __pyx_n_s_i, __pyx_n_s_j, __pyx_n_s_N, __pyx_n_s_K, __pyx_n_s_val, __pyx_n_s_lim, __pyx_n_s_fill_count); if (unlikely(!__pyx_tuple__346)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1525; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__346); __Pyx_GIVEREF(__pyx_tuple__346); __pyx_codeobj__347 = (PyObject*)__Pyx_PyCode_New(3, 0, 10, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__346, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pandas_src_generated_pyx, __pyx_n_s_pad_2d_inplace_int64, 1525, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__347)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1525; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":1559 * @cython.boundscheck(False) * @cython.wraparound(False) * def pad_2d_inplace_bool(ndarray[uint8_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[uint8_t, ndim=2] mask, * limit=None): */ __pyx_tuple__348 = PyTuple_Pack(10, __pyx_n_s_values, __pyx_n_s_mask, __pyx_n_s_limit, __pyx_n_s_i, __pyx_n_s_j, __pyx_n_s_N, __pyx_n_s_K, __pyx_n_s_val, __pyx_n_s_lim, __pyx_n_s_fill_count); if (unlikely(!__pyx_tuple__348)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1559; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__348); __Pyx_GIVEREF(__pyx_tuple__348); __pyx_codeobj__349 = (PyObject*)__Pyx_PyCode_New(3, 0, 10, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__348, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pandas_src_generated_pyx, __pyx_n_s_pad_2d_inplace_bool, 1559, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__349)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1559; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":1594 * @cython.boundscheck(False) * @cython.wraparound(False) * def backfill_2d_inplace_float64(ndarray[float64_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[uint8_t, ndim=2] mask, * limit=None): */ __pyx_tuple__350 = PyTuple_Pack(10, __pyx_n_s_values, __pyx_n_s_mask, __pyx_n_s_limit, __pyx_n_s_i, __pyx_n_s_j, __pyx_n_s_N, __pyx_n_s_K, __pyx_n_s_val, __pyx_n_s_lim, __pyx_n_s_fill_count); if (unlikely(!__pyx_tuple__350)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1594; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__350); __Pyx_GIVEREF(__pyx_tuple__350); __pyx_codeobj__351 = (PyObject*)__Pyx_PyCode_New(3, 0, 10, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__350, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pandas_src_generated_pyx, __pyx_n_s_backfill_2d_inplace_float64, 1594, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__351)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1594; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":1628 * @cython.boundscheck(False) * @cython.wraparound(False) * def backfill_2d_inplace_float32(ndarray[float32_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[uint8_t, ndim=2] mask, * limit=None): */ __pyx_tuple__352 = PyTuple_Pack(10, __pyx_n_s_values, __pyx_n_s_mask, __pyx_n_s_limit, __pyx_n_s_i, __pyx_n_s_j, __pyx_n_s_N, __pyx_n_s_K, __pyx_n_s_val, __pyx_n_s_lim, __pyx_n_s_fill_count); if (unlikely(!__pyx_tuple__352)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1628; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__352); __Pyx_GIVEREF(__pyx_tuple__352); __pyx_codeobj__353 = (PyObject*)__Pyx_PyCode_New(3, 0, 10, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__352, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pandas_src_generated_pyx, __pyx_n_s_backfill_2d_inplace_float32, 1628, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__353)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1628; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":1662 * @cython.boundscheck(False) * @cython.wraparound(False) * def backfill_2d_inplace_object(ndarray[object, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[uint8_t, ndim=2] mask, * limit=None): */ __pyx_tuple__354 = PyTuple_Pack(10, __pyx_n_s_values, __pyx_n_s_mask, __pyx_n_s_limit, __pyx_n_s_i, __pyx_n_s_j, __pyx_n_s_N, __pyx_n_s_K, __pyx_n_s_val, __pyx_n_s_lim, __pyx_n_s_fill_count); if (unlikely(!__pyx_tuple__354)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1662; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__354); __Pyx_GIVEREF(__pyx_tuple__354); __pyx_codeobj__355 = (PyObject*)__Pyx_PyCode_New(3, 0, 10, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__354, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pandas_src_generated_pyx, __pyx_n_s_backfill_2d_inplace_object, 1662, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__355)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1662; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":1696 * @cython.boundscheck(False) * @cython.wraparound(False) * def backfill_2d_inplace_int32(ndarray[int32_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[uint8_t, ndim=2] mask, * limit=None): */ __pyx_tuple__356 = PyTuple_Pack(10, __pyx_n_s_values, __pyx_n_s_mask, __pyx_n_s_limit, __pyx_n_s_i, __pyx_n_s_j, __pyx_n_s_N, __pyx_n_s_K, __pyx_n_s_val, __pyx_n_s_lim, __pyx_n_s_fill_count); if (unlikely(!__pyx_tuple__356)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1696; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__356); __Pyx_GIVEREF(__pyx_tuple__356); __pyx_codeobj__357 = (PyObject*)__Pyx_PyCode_New(3, 0, 10, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__356, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pandas_src_generated_pyx, __pyx_n_s_backfill_2d_inplace_int32, 1696, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__357)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1696; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":1730 * @cython.boundscheck(False) * @cython.wraparound(False) * def backfill_2d_inplace_int64(ndarray[int64_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[uint8_t, ndim=2] mask, * limit=None): */ __pyx_tuple__358 = PyTuple_Pack(10, __pyx_n_s_values, __pyx_n_s_mask, __pyx_n_s_limit, __pyx_n_s_i, __pyx_n_s_j, __pyx_n_s_N, __pyx_n_s_K, __pyx_n_s_val, __pyx_n_s_lim, __pyx_n_s_fill_count); if (unlikely(!__pyx_tuple__358)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1730; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__358); __Pyx_GIVEREF(__pyx_tuple__358); __pyx_codeobj__359 = (PyObject*)__Pyx_PyCode_New(3, 0, 10, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__358, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pandas_src_generated_pyx, __pyx_n_s_backfill_2d_inplace_int64, 1730, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__359)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1730; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":1764 * @cython.boundscheck(False) * @cython.wraparound(False) * def backfill_2d_inplace_bool(ndarray[uint8_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[uint8_t, ndim=2] mask, * limit=None): */ __pyx_tuple__360 = PyTuple_Pack(10, __pyx_n_s_values, __pyx_n_s_mask, __pyx_n_s_limit, __pyx_n_s_i, __pyx_n_s_j, __pyx_n_s_N, __pyx_n_s_K, __pyx_n_s_val, __pyx_n_s_lim, __pyx_n_s_fill_count); if (unlikely(!__pyx_tuple__360)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1764; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__360); __Pyx_GIVEREF(__pyx_tuple__360); __pyx_codeobj__361 = (PyObject*)__Pyx_PyCode_New(3, 0, 10, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__360, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pandas_src_generated_pyx, __pyx_n_s_backfill_2d_inplace_bool, 1764, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__361)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1764; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":1799 * @cython.boundscheck(False) * @cython.wraparound(False) * def is_monotonic_float64(ndarray[float64_t] arr): # <<<<<<<<<<<<<< * ''' * Returns */ __pyx_tuple__362 = PyTuple_Pack(6, __pyx_n_s_arr, __pyx_n_s_i, __pyx_n_s_n, __pyx_n_s_prev, __pyx_n_s_cur, __pyx_n_s_is_unique); if (unlikely(!__pyx_tuple__362)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1799; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__362); __Pyx_GIVEREF(__pyx_tuple__362); __pyx_codeobj__363 = (PyObject*)__Pyx_PyCode_New(1, 0, 6, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__362, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pandas_src_generated_pyx, __pyx_n_s_is_monotonic_float64, 1799, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__363)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1799; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":1826 * @cython.boundscheck(False) * @cython.wraparound(False) * def is_monotonic_float32(ndarray[float32_t] arr): # <<<<<<<<<<<<<< * ''' * Returns */ __pyx_tuple__364 = PyTuple_Pack(6, __pyx_n_s_arr, __pyx_n_s_i, __pyx_n_s_n, __pyx_n_s_prev, __pyx_n_s_cur, __pyx_n_s_is_unique); if (unlikely(!__pyx_tuple__364)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1826; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__364); __Pyx_GIVEREF(__pyx_tuple__364); __pyx_codeobj__365 = (PyObject*)__Pyx_PyCode_New(1, 0, 6, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__364, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pandas_src_generated_pyx, __pyx_n_s_is_monotonic_float32, 1826, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__365)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1826; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":1853 * @cython.boundscheck(False) * @cython.wraparound(False) * def is_monotonic_object(ndarray[object] arr): # <<<<<<<<<<<<<< * ''' * Returns */ __pyx_tuple__366 = PyTuple_Pack(6, __pyx_n_s_arr, __pyx_n_s_i, __pyx_n_s_n, __pyx_n_s_prev, __pyx_n_s_cur, __pyx_n_s_is_unique); if (unlikely(!__pyx_tuple__366)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1853; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__366); __Pyx_GIVEREF(__pyx_tuple__366); __pyx_codeobj__367 = (PyObject*)__Pyx_PyCode_New(1, 0, 6, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__366, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pandas_src_generated_pyx, __pyx_n_s_is_monotonic_object, 1853, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__367)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1853; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":1880 * @cython.boundscheck(False) * @cython.wraparound(False) * def is_monotonic_int32(ndarray[int32_t] arr): # <<<<<<<<<<<<<< * ''' * Returns */ __pyx_tuple__368 = PyTuple_Pack(6, __pyx_n_s_arr, __pyx_n_s_i, __pyx_n_s_n, __pyx_n_s_prev, __pyx_n_s_cur, __pyx_n_s_is_unique); if (unlikely(!__pyx_tuple__368)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1880; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__368); __Pyx_GIVEREF(__pyx_tuple__368); __pyx_codeobj__369 = (PyObject*)__Pyx_PyCode_New(1, 0, 6, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__368, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pandas_src_generated_pyx, __pyx_n_s_is_monotonic_int32, 1880, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__369)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1880; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":1907 * @cython.boundscheck(False) * @cython.wraparound(False) * def is_monotonic_int64(ndarray[int64_t] arr): # <<<<<<<<<<<<<< * ''' * Returns */ __pyx_tuple__370 = PyTuple_Pack(6, __pyx_n_s_arr, __pyx_n_s_i, __pyx_n_s_n, __pyx_n_s_prev, __pyx_n_s_cur, __pyx_n_s_is_unique); if (unlikely(!__pyx_tuple__370)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1907; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__370); __Pyx_GIVEREF(__pyx_tuple__370); __pyx_codeobj__371 = (PyObject*)__Pyx_PyCode_New(1, 0, 6, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__370, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pandas_src_generated_pyx, __pyx_n_s_is_monotonic_int64, 1907, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__371)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1907; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":1934 * @cython.boundscheck(False) * @cython.wraparound(False) * def is_monotonic_bool(ndarray[uint8_t] arr): # <<<<<<<<<<<<<< * ''' * Returns */ __pyx_tuple__372 = PyTuple_Pack(6, __pyx_n_s_arr, __pyx_n_s_i, __pyx_n_s_n, __pyx_n_s_prev, __pyx_n_s_cur, __pyx_n_s_is_unique); if (unlikely(!__pyx_tuple__372)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1934; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__372); __Pyx_GIVEREF(__pyx_tuple__372); __pyx_codeobj__373 = (PyObject*)__Pyx_PyCode_New(1, 0, 6, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__372, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pandas_src_generated_pyx, __pyx_n_s_is_monotonic_bool, 1934, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__373)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1934; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":1962 * @cython.wraparound(False) * @cython.boundscheck(False) * def groupby_float64(ndarray[float64_t] index, ndarray labels): # <<<<<<<<<<<<<< * cdef dict result = {} * cdef Py_ssize_t i, length */ __pyx_tuple__374 = PyTuple_Pack(8, __pyx_n_s_index, __pyx_n_s_labels, __pyx_n_s_result, __pyx_n_s_i, __pyx_n_s_length, __pyx_n_s_members, __pyx_n_s_idx, __pyx_n_s_key); if (unlikely(!__pyx_tuple__374)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1962; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__374); __Pyx_GIVEREF(__pyx_tuple__374); __pyx_codeobj__375 = (PyObject*)__Pyx_PyCode_New(2, 0, 8, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__374, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pandas_src_generated_pyx, __pyx_n_s_groupby_float64, 1962, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__375)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1962; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":1990 * @cython.wraparound(False) * @cython.boundscheck(False) * def groupby_float32(ndarray[float32_t] index, ndarray labels): # <<<<<<<<<<<<<< * cdef dict result = {} * cdef Py_ssize_t i, length */ __pyx_tuple__376 = PyTuple_Pack(8, __pyx_n_s_index, __pyx_n_s_labels, __pyx_n_s_result, __pyx_n_s_i, __pyx_n_s_length, __pyx_n_s_members, __pyx_n_s_idx, __pyx_n_s_key); if (unlikely(!__pyx_tuple__376)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1990; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__376); __Pyx_GIVEREF(__pyx_tuple__376); __pyx_codeobj__377 = (PyObject*)__Pyx_PyCode_New(2, 0, 8, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__376, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pandas_src_generated_pyx, __pyx_n_s_groupby_float32, 1990, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__377)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1990; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":2018 * @cython.wraparound(False) * @cython.boundscheck(False) * def groupby_object(ndarray[object] index, ndarray labels): # <<<<<<<<<<<<<< * cdef dict result = {} * cdef Py_ssize_t i, length */ __pyx_tuple__378 = PyTuple_Pack(8, __pyx_n_s_index, __pyx_n_s_labels, __pyx_n_s_result, __pyx_n_s_i, __pyx_n_s_length, __pyx_n_s_members, __pyx_n_s_idx, __pyx_n_s_key); if (unlikely(!__pyx_tuple__378)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2018; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__378); __Pyx_GIVEREF(__pyx_tuple__378); __pyx_codeobj__379 = (PyObject*)__Pyx_PyCode_New(2, 0, 8, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__378, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pandas_src_generated_pyx, __pyx_n_s_groupby_object, 2018, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__379)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2018; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":2046 * @cython.wraparound(False) * @cython.boundscheck(False) * def groupby_int32(ndarray[int32_t] index, ndarray labels): # <<<<<<<<<<<<<< * cdef dict result = {} * cdef Py_ssize_t i, length */ __pyx_tuple__380 = PyTuple_Pack(8, __pyx_n_s_index, __pyx_n_s_labels, __pyx_n_s_result, __pyx_n_s_i, __pyx_n_s_length, __pyx_n_s_members, __pyx_n_s_idx, __pyx_n_s_key); if (unlikely(!__pyx_tuple__380)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2046; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__380); __Pyx_GIVEREF(__pyx_tuple__380); __pyx_codeobj__381 = (PyObject*)__Pyx_PyCode_New(2, 0, 8, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__380, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pandas_src_generated_pyx, __pyx_n_s_groupby_int32, 2046, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__381)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2046; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":2074 * @cython.wraparound(False) * @cython.boundscheck(False) * def groupby_int64(ndarray[int64_t] index, ndarray labels): # <<<<<<<<<<<<<< * cdef dict result = {} * cdef Py_ssize_t i, length */ __pyx_tuple__382 = PyTuple_Pack(8, __pyx_n_s_index, __pyx_n_s_labels, __pyx_n_s_result, __pyx_n_s_i, __pyx_n_s_length, __pyx_n_s_members, __pyx_n_s_idx, __pyx_n_s_key); if (unlikely(!__pyx_tuple__382)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2074; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__382); __Pyx_GIVEREF(__pyx_tuple__382); __pyx_codeobj__383 = (PyObject*)__Pyx_PyCode_New(2, 0, 8, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__382, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pandas_src_generated_pyx, __pyx_n_s_groupby_int64, 2074, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__383)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2074; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":2102 * @cython.wraparound(False) * @cython.boundscheck(False) * def groupby_bool(ndarray[uint8_t] index, ndarray labels): # <<<<<<<<<<<<<< * cdef dict result = {} * cdef Py_ssize_t i, length */ __pyx_tuple__384 = PyTuple_Pack(8, __pyx_n_s_index, __pyx_n_s_labels, __pyx_n_s_result, __pyx_n_s_i, __pyx_n_s_length, __pyx_n_s_members, __pyx_n_s_idx, __pyx_n_s_key); if (unlikely(!__pyx_tuple__384)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2102; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__384); __Pyx_GIVEREF(__pyx_tuple__384); __pyx_codeobj__385 = (PyObject*)__Pyx_PyCode_New(2, 0, 8, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__384, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pandas_src_generated_pyx, __pyx_n_s_groupby_bool, 2102, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__385)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2102; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":2131 * @cython.wraparound(False) * @cython.boundscheck(False) * def arrmap_float64(ndarray[float64_t] index, object func): # <<<<<<<<<<<<<< * cdef Py_ssize_t length = index.shape[0] * cdef Py_ssize_t i = 0 */ __pyx_tuple__386 = PyTuple_Pack(6, __pyx_n_s_index, __pyx_n_s_func, __pyx_n_s_length, __pyx_n_s_i, __pyx_n_s_result, __pyx_n_s_maybe_convert_objects); if (unlikely(!__pyx_tuple__386)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2131; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__386); __Pyx_GIVEREF(__pyx_tuple__386); __pyx_codeobj__387 = (PyObject*)__Pyx_PyCode_New(2, 0, 6, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__386, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pandas_src_generated_pyx, __pyx_n_s_arrmap_float64, 2131, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__387)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2131; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":2146 * @cython.wraparound(False) * @cython.boundscheck(False) * def arrmap_float32(ndarray[float32_t] index, object func): # <<<<<<<<<<<<<< * cdef Py_ssize_t length = index.shape[0] * cdef Py_ssize_t i = 0 */ __pyx_tuple__388 = PyTuple_Pack(6, __pyx_n_s_index, __pyx_n_s_func, __pyx_n_s_length, __pyx_n_s_i, __pyx_n_s_result, __pyx_n_s_maybe_convert_objects); if (unlikely(!__pyx_tuple__388)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2146; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__388); __Pyx_GIVEREF(__pyx_tuple__388); __pyx_codeobj__389 = (PyObject*)__Pyx_PyCode_New(2, 0, 6, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__388, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pandas_src_generated_pyx, __pyx_n_s_arrmap_float32, 2146, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__389)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2146; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":2161 * @cython.wraparound(False) * @cython.boundscheck(False) * def arrmap_object(ndarray[object] index, object func): # <<<<<<<<<<<<<< * cdef Py_ssize_t length = index.shape[0] * cdef Py_ssize_t i = 0 */ __pyx_tuple__390 = PyTuple_Pack(6, __pyx_n_s_index, __pyx_n_s_func, __pyx_n_s_length, __pyx_n_s_i, __pyx_n_s_result, __pyx_n_s_maybe_convert_objects); if (unlikely(!__pyx_tuple__390)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2161; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__390); __Pyx_GIVEREF(__pyx_tuple__390); __pyx_codeobj__391 = (PyObject*)__Pyx_PyCode_New(2, 0, 6, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__390, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pandas_src_generated_pyx, __pyx_n_s_arrmap_object, 2161, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__391)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2161; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":2176 * @cython.wraparound(False) * @cython.boundscheck(False) * def arrmap_int32(ndarray[int32_t] index, object func): # <<<<<<<<<<<<<< * cdef Py_ssize_t length = index.shape[0] * cdef Py_ssize_t i = 0 */ __pyx_tuple__392 = PyTuple_Pack(6, __pyx_n_s_index, __pyx_n_s_func, __pyx_n_s_length, __pyx_n_s_i, __pyx_n_s_result, __pyx_n_s_maybe_convert_objects); if (unlikely(!__pyx_tuple__392)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2176; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__392); __Pyx_GIVEREF(__pyx_tuple__392); __pyx_codeobj__393 = (PyObject*)__Pyx_PyCode_New(2, 0, 6, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__392, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pandas_src_generated_pyx, __pyx_n_s_arrmap_int32, 2176, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__393)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2176; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":2191 * @cython.wraparound(False) * @cython.boundscheck(False) * def arrmap_int64(ndarray[int64_t] index, object func): # <<<<<<<<<<<<<< * cdef Py_ssize_t length = index.shape[0] * cdef Py_ssize_t i = 0 */ __pyx_tuple__394 = PyTuple_Pack(6, __pyx_n_s_index, __pyx_n_s_func, __pyx_n_s_length, __pyx_n_s_i, __pyx_n_s_result, __pyx_n_s_maybe_convert_objects); if (unlikely(!__pyx_tuple__394)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2191; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__394); __Pyx_GIVEREF(__pyx_tuple__394); __pyx_codeobj__395 = (PyObject*)__Pyx_PyCode_New(2, 0, 6, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__394, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pandas_src_generated_pyx, __pyx_n_s_arrmap_int64, 2191, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__395)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2191; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":2206 * @cython.wraparound(False) * @cython.boundscheck(False) * def arrmap_bool(ndarray[uint8_t] index, object func): # <<<<<<<<<<<<<< * cdef Py_ssize_t length = index.shape[0] * cdef Py_ssize_t i = 0 */ __pyx_tuple__396 = PyTuple_Pack(6, __pyx_n_s_index, __pyx_n_s_func, __pyx_n_s_length, __pyx_n_s_i, __pyx_n_s_result, __pyx_n_s_maybe_convert_objects); if (unlikely(!__pyx_tuple__396)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2206; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__396); __Pyx_GIVEREF(__pyx_tuple__396); __pyx_codeobj__397 = (PyObject*)__Pyx_PyCode_New(2, 0, 6, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__396, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pandas_src_generated_pyx, __pyx_n_s_arrmap_bool, 2206, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__397)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2206; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":2221 * * @cython.wraparound(False) * def take_1d_bool_bool(ndarray[uint8_t] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[uint8_t] out, */ __pyx_tuple__398 = PyTuple_Pack(8, __pyx_n_s_values, __pyx_n_s_indexer, __pyx_n_s_out, __pyx_n_s_fill_value, __pyx_n_s_i, __pyx_n_s_n, __pyx_n_s_idx, __pyx_n_s_fv); if (unlikely(!__pyx_tuple__398)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2221; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__398); __Pyx_GIVEREF(__pyx_tuple__398); __pyx_codeobj__399 = (PyObject*)__Pyx_PyCode_New(4, 0, 8, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__398, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pandas_src_generated_pyx, __pyx_n_s_take_1d_bool_bool, 2221, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__399)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2221; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":2240 * * @cython.wraparound(False) * def take_1d_bool_object(ndarray[uint8_t] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[object] out, */ __pyx_tuple__400 = PyTuple_Pack(8, __pyx_n_s_values, __pyx_n_s_indexer, __pyx_n_s_out, __pyx_n_s_fill_value, __pyx_n_s_i, __pyx_n_s_n, __pyx_n_s_idx, __pyx_n_s_fv); if (unlikely(!__pyx_tuple__400)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2240; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__400); __Pyx_GIVEREF(__pyx_tuple__400); __pyx_codeobj__401 = (PyObject*)__Pyx_PyCode_New(4, 0, 8, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__400, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pandas_src_generated_pyx, __pyx_n_s_take_1d_bool_object, 2240, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__401)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2240; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":2259 * * @cython.wraparound(False) * def take_1d_int8_int8(ndarray[int8_t] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[int8_t] out, */ __pyx_tuple__402 = PyTuple_Pack(8, __pyx_n_s_values, __pyx_n_s_indexer, __pyx_n_s_out, __pyx_n_s_fill_value, __pyx_n_s_i, __pyx_n_s_n, __pyx_n_s_idx, __pyx_n_s_fv); if (unlikely(!__pyx_tuple__402)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2259; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__402); __Pyx_GIVEREF(__pyx_tuple__402); __pyx_codeobj__403 = (PyObject*)__Pyx_PyCode_New(4, 0, 8, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__402, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pandas_src_generated_pyx, __pyx_n_s_take_1d_int8_int8, 2259, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__403)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2259; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":2278 * * @cython.wraparound(False) * def take_1d_int8_int32(ndarray[int8_t] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[int32_t] out, */ __pyx_tuple__404 = PyTuple_Pack(8, __pyx_n_s_values, __pyx_n_s_indexer, __pyx_n_s_out, __pyx_n_s_fill_value, __pyx_n_s_i, __pyx_n_s_n, __pyx_n_s_idx, __pyx_n_s_fv); if (unlikely(!__pyx_tuple__404)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2278; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__404); __Pyx_GIVEREF(__pyx_tuple__404); __pyx_codeobj__405 = (PyObject*)__Pyx_PyCode_New(4, 0, 8, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__404, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pandas_src_generated_pyx, __pyx_n_s_take_1d_int8_int32, 2278, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__405)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2278; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":2297 * * @cython.wraparound(False) * def take_1d_int8_int64(ndarray[int8_t] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[int64_t] out, */ __pyx_tuple__406 = PyTuple_Pack(8, __pyx_n_s_values, __pyx_n_s_indexer, __pyx_n_s_out, __pyx_n_s_fill_value, __pyx_n_s_i, __pyx_n_s_n, __pyx_n_s_idx, __pyx_n_s_fv); if (unlikely(!__pyx_tuple__406)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2297; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__406); __Pyx_GIVEREF(__pyx_tuple__406); __pyx_codeobj__407 = (PyObject*)__Pyx_PyCode_New(4, 0, 8, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__406, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pandas_src_generated_pyx, __pyx_n_s_take_1d_int8_int64, 2297, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__407)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2297; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":2316 * * @cython.wraparound(False) * def take_1d_int8_float64(ndarray[int8_t] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[float64_t] out, */ __pyx_tuple__408 = PyTuple_Pack(8, __pyx_n_s_values, __pyx_n_s_indexer, __pyx_n_s_out, __pyx_n_s_fill_value, __pyx_n_s_i, __pyx_n_s_n, __pyx_n_s_idx, __pyx_n_s_fv); if (unlikely(!__pyx_tuple__408)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2316; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__408); __Pyx_GIVEREF(__pyx_tuple__408); __pyx_codeobj__409 = (PyObject*)__Pyx_PyCode_New(4, 0, 8, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__408, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pandas_src_generated_pyx, __pyx_n_s_take_1d_int8_float64, 2316, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__409)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2316; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":2335 * * @cython.wraparound(False) * def take_1d_int16_int16(ndarray[int16_t] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[int16_t] out, */ __pyx_tuple__410 = PyTuple_Pack(8, __pyx_n_s_values, __pyx_n_s_indexer, __pyx_n_s_out, __pyx_n_s_fill_value, __pyx_n_s_i, __pyx_n_s_n, __pyx_n_s_idx, __pyx_n_s_fv); if (unlikely(!__pyx_tuple__410)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2335; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__410); __Pyx_GIVEREF(__pyx_tuple__410); __pyx_codeobj__411 = (PyObject*)__Pyx_PyCode_New(4, 0, 8, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__410, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pandas_src_generated_pyx, __pyx_n_s_take_1d_int16_int16, 2335, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__411)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2335; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":2354 * * @cython.wraparound(False) * def take_1d_int16_int32(ndarray[int16_t] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[int32_t] out, */ __pyx_tuple__412 = PyTuple_Pack(8, __pyx_n_s_values, __pyx_n_s_indexer, __pyx_n_s_out, __pyx_n_s_fill_value, __pyx_n_s_i, __pyx_n_s_n, __pyx_n_s_idx, __pyx_n_s_fv); if (unlikely(!__pyx_tuple__412)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2354; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__412); __Pyx_GIVEREF(__pyx_tuple__412); __pyx_codeobj__413 = (PyObject*)__Pyx_PyCode_New(4, 0, 8, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__412, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pandas_src_generated_pyx, __pyx_n_s_take_1d_int16_int32, 2354, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__413)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2354; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":2373 * * @cython.wraparound(False) * def take_1d_int16_int64(ndarray[int16_t] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[int64_t] out, */ __pyx_tuple__414 = PyTuple_Pack(8, __pyx_n_s_values, __pyx_n_s_indexer, __pyx_n_s_out, __pyx_n_s_fill_value, __pyx_n_s_i, __pyx_n_s_n, __pyx_n_s_idx, __pyx_n_s_fv); if (unlikely(!__pyx_tuple__414)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2373; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__414); __Pyx_GIVEREF(__pyx_tuple__414); __pyx_codeobj__415 = (PyObject*)__Pyx_PyCode_New(4, 0, 8, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__414, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pandas_src_generated_pyx, __pyx_n_s_take_1d_int16_int64, 2373, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__415)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2373; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":2392 * * @cython.wraparound(False) * def take_1d_int16_float64(ndarray[int16_t] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[float64_t] out, */ __pyx_tuple__416 = PyTuple_Pack(8, __pyx_n_s_values, __pyx_n_s_indexer, __pyx_n_s_out, __pyx_n_s_fill_value, __pyx_n_s_i, __pyx_n_s_n, __pyx_n_s_idx, __pyx_n_s_fv); if (unlikely(!__pyx_tuple__416)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2392; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__416); __Pyx_GIVEREF(__pyx_tuple__416); __pyx_codeobj__417 = (PyObject*)__Pyx_PyCode_New(4, 0, 8, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__416, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pandas_src_generated_pyx, __pyx_n_s_take_1d_int16_float64, 2392, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__417)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2392; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":2411 * * @cython.wraparound(False) * def take_1d_int32_int32(ndarray[int32_t] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[int32_t] out, */ __pyx_tuple__418 = PyTuple_Pack(8, __pyx_n_s_values, __pyx_n_s_indexer, __pyx_n_s_out, __pyx_n_s_fill_value, __pyx_n_s_i, __pyx_n_s_n, __pyx_n_s_idx, __pyx_n_s_fv); if (unlikely(!__pyx_tuple__418)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2411; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__418); __Pyx_GIVEREF(__pyx_tuple__418); __pyx_codeobj__419 = (PyObject*)__Pyx_PyCode_New(4, 0, 8, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__418, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pandas_src_generated_pyx, __pyx_n_s_take_1d_int32_int32, 2411, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__419)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2411; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":2430 * * @cython.wraparound(False) * def take_1d_int32_int64(ndarray[int32_t] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[int64_t] out, */ __pyx_tuple__420 = PyTuple_Pack(8, __pyx_n_s_values, __pyx_n_s_indexer, __pyx_n_s_out, __pyx_n_s_fill_value, __pyx_n_s_i, __pyx_n_s_n, __pyx_n_s_idx, __pyx_n_s_fv); if (unlikely(!__pyx_tuple__420)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2430; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__420); __Pyx_GIVEREF(__pyx_tuple__420); __pyx_codeobj__421 = (PyObject*)__Pyx_PyCode_New(4, 0, 8, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__420, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pandas_src_generated_pyx, __pyx_n_s_take_1d_int32_int64, 2430, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__421)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2430; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":2449 * * @cython.wraparound(False) * def take_1d_int32_float64(ndarray[int32_t] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[float64_t] out, */ __pyx_tuple__422 = PyTuple_Pack(8, __pyx_n_s_values, __pyx_n_s_indexer, __pyx_n_s_out, __pyx_n_s_fill_value, __pyx_n_s_i, __pyx_n_s_n, __pyx_n_s_idx, __pyx_n_s_fv); if (unlikely(!__pyx_tuple__422)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2449; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__422); __Pyx_GIVEREF(__pyx_tuple__422); __pyx_codeobj__423 = (PyObject*)__Pyx_PyCode_New(4, 0, 8, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__422, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pandas_src_generated_pyx, __pyx_n_s_take_1d_int32_float64, 2449, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__423)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2449; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":2468 * * @cython.wraparound(False) * def take_1d_int64_int64(ndarray[int64_t] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[int64_t] out, */ __pyx_tuple__424 = PyTuple_Pack(8, __pyx_n_s_values, __pyx_n_s_indexer, __pyx_n_s_out, __pyx_n_s_fill_value, __pyx_n_s_i, __pyx_n_s_n, __pyx_n_s_idx, __pyx_n_s_fv); if (unlikely(!__pyx_tuple__424)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2468; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__424); __Pyx_GIVEREF(__pyx_tuple__424); __pyx_codeobj__425 = (PyObject*)__Pyx_PyCode_New(4, 0, 8, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__424, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pandas_src_generated_pyx, __pyx_n_s_take_1d_int64_int64, 2468, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__425)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2468; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":2487 * * @cython.wraparound(False) * def take_1d_int64_float64(ndarray[int64_t] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[float64_t] out, */ __pyx_tuple__426 = PyTuple_Pack(8, __pyx_n_s_values, __pyx_n_s_indexer, __pyx_n_s_out, __pyx_n_s_fill_value, __pyx_n_s_i, __pyx_n_s_n, __pyx_n_s_idx, __pyx_n_s_fv); if (unlikely(!__pyx_tuple__426)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2487; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__426); __Pyx_GIVEREF(__pyx_tuple__426); __pyx_codeobj__427 = (PyObject*)__Pyx_PyCode_New(4, 0, 8, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__426, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pandas_src_generated_pyx, __pyx_n_s_take_1d_int64_float64, 2487, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__427)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2487; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":2506 * * @cython.wraparound(False) * def take_1d_float32_float32(ndarray[float32_t] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[float32_t] out, */ __pyx_tuple__428 = PyTuple_Pack(8, __pyx_n_s_values, __pyx_n_s_indexer, __pyx_n_s_out, __pyx_n_s_fill_value, __pyx_n_s_i, __pyx_n_s_n, __pyx_n_s_idx, __pyx_n_s_fv); if (unlikely(!__pyx_tuple__428)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2506; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__428); __Pyx_GIVEREF(__pyx_tuple__428); __pyx_codeobj__429 = (PyObject*)__Pyx_PyCode_New(4, 0, 8, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__428, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pandas_src_generated_pyx, __pyx_n_s_take_1d_float32_float32, 2506, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__429)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2506; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":2525 * * @cython.wraparound(False) * def take_1d_float32_float64(ndarray[float32_t] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[float64_t] out, */ __pyx_tuple__430 = PyTuple_Pack(8, __pyx_n_s_values, __pyx_n_s_indexer, __pyx_n_s_out, __pyx_n_s_fill_value, __pyx_n_s_i, __pyx_n_s_n, __pyx_n_s_idx, __pyx_n_s_fv); if (unlikely(!__pyx_tuple__430)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2525; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__430); __Pyx_GIVEREF(__pyx_tuple__430); __pyx_codeobj__431 = (PyObject*)__Pyx_PyCode_New(4, 0, 8, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__430, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pandas_src_generated_pyx, __pyx_n_s_take_1d_float32_float64, 2525, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__431)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2525; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":2544 * * @cython.wraparound(False) * def take_1d_float64_float64(ndarray[float64_t] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[float64_t] out, */ __pyx_tuple__432 = PyTuple_Pack(8, __pyx_n_s_values, __pyx_n_s_indexer, __pyx_n_s_out, __pyx_n_s_fill_value, __pyx_n_s_i, __pyx_n_s_n, __pyx_n_s_idx, __pyx_n_s_fv); if (unlikely(!__pyx_tuple__432)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2544; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__432); __Pyx_GIVEREF(__pyx_tuple__432); __pyx_codeobj__433 = (PyObject*)__Pyx_PyCode_New(4, 0, 8, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__432, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pandas_src_generated_pyx, __pyx_n_s_take_1d_float64_float64, 2544, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__433)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2544; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":2563 * * @cython.wraparound(False) * def take_1d_object_object(ndarray[object] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[object] out, */ __pyx_tuple__434 = PyTuple_Pack(8, __pyx_n_s_values, __pyx_n_s_indexer, __pyx_n_s_out, __pyx_n_s_fill_value, __pyx_n_s_i, __pyx_n_s_n, __pyx_n_s_idx, __pyx_n_s_fv); if (unlikely(!__pyx_tuple__434)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2563; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__434); __Pyx_GIVEREF(__pyx_tuple__434); __pyx_codeobj__435 = (PyObject*)__Pyx_PyCode_New(4, 0, 8, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__434, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pandas_src_generated_pyx, __pyx_n_s_take_1d_object_object, 2563, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__435)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2563; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":2584 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_axis0_bool_bool(ndarray[uint8_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[uint8_t, ndim=2] out, */ __pyx_tuple__436 = PyTuple_Pack(12, __pyx_n_s_values, __pyx_n_s_indexer, __pyx_n_s_out, __pyx_n_s_fill_value, __pyx_n_s_i, __pyx_n_s_j, __pyx_n_s_k, __pyx_n_s_n, __pyx_n_s_idx, __pyx_n_s_fv, __pyx_n_s_v, __pyx_n_s_o); if (unlikely(!__pyx_tuple__436)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2584; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__436); __Pyx_GIVEREF(__pyx_tuple__436); __pyx_codeobj__437 = (PyObject*)__Pyx_PyCode_New(4, 0, 12, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__436, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pandas_src_generated_pyx, __pyx_n_s_take_2d_axis0_bool_bool, 2584, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__437)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2584; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":2627 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_axis0_bool_object(ndarray[uint8_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[object, ndim=2] out, */ __pyx_tuple__438 = PyTuple_Pack(10, __pyx_n_s_values, __pyx_n_s_indexer, __pyx_n_s_out, __pyx_n_s_fill_value, __pyx_n_s_i, __pyx_n_s_j, __pyx_n_s_k, __pyx_n_s_n, __pyx_n_s_idx, __pyx_n_s_fv); if (unlikely(!__pyx_tuple__438)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2627; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__438); __Pyx_GIVEREF(__pyx_tuple__438); __pyx_codeobj__439 = (PyObject*)__Pyx_PyCode_New(4, 0, 10, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__438, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pandas_src_generated_pyx, __pyx_n_s_take_2d_axis0_bool_object, 2627, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__439)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2627; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":2670 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_axis0_int8_int8(ndarray[int8_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[int8_t, ndim=2] out, */ __pyx_tuple__440 = PyTuple_Pack(12, __pyx_n_s_values, __pyx_n_s_indexer, __pyx_n_s_out, __pyx_n_s_fill_value, __pyx_n_s_i, __pyx_n_s_j, __pyx_n_s_k, __pyx_n_s_n, __pyx_n_s_idx, __pyx_n_s_fv, __pyx_n_s_v, __pyx_n_s_o); if (unlikely(!__pyx_tuple__440)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2670; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__440); __Pyx_GIVEREF(__pyx_tuple__440); __pyx_codeobj__441 = (PyObject*)__Pyx_PyCode_New(4, 0, 12, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__440, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pandas_src_generated_pyx, __pyx_n_s_take_2d_axis0_int8_int8, 2670, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__441)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2670; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":2713 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_axis0_int8_int32(ndarray[int8_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[int32_t, ndim=2] out, */ __pyx_tuple__442 = PyTuple_Pack(10, __pyx_n_s_values, __pyx_n_s_indexer, __pyx_n_s_out, __pyx_n_s_fill_value, __pyx_n_s_i, __pyx_n_s_j, __pyx_n_s_k, __pyx_n_s_n, __pyx_n_s_idx, __pyx_n_s_fv); if (unlikely(!__pyx_tuple__442)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2713; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__442); __Pyx_GIVEREF(__pyx_tuple__442); __pyx_codeobj__443 = (PyObject*)__Pyx_PyCode_New(4, 0, 10, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__442, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pandas_src_generated_pyx, __pyx_n_s_take_2d_axis0_int8_int32, 2713, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__443)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2713; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":2756 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_axis0_int8_int64(ndarray[int8_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[int64_t, ndim=2] out, */ __pyx_tuple__444 = PyTuple_Pack(10, __pyx_n_s_values, __pyx_n_s_indexer, __pyx_n_s_out, __pyx_n_s_fill_value, __pyx_n_s_i, __pyx_n_s_j, __pyx_n_s_k, __pyx_n_s_n, __pyx_n_s_idx, __pyx_n_s_fv); if (unlikely(!__pyx_tuple__444)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2756; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__444); __Pyx_GIVEREF(__pyx_tuple__444); __pyx_codeobj__445 = (PyObject*)__Pyx_PyCode_New(4, 0, 10, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__444, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pandas_src_generated_pyx, __pyx_n_s_take_2d_axis0_int8_int64, 2756, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__445)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2756; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":2799 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_axis0_int8_float64(ndarray[int8_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[float64_t, ndim=2] out, */ __pyx_tuple__446 = PyTuple_Pack(10, __pyx_n_s_values, __pyx_n_s_indexer, __pyx_n_s_out, __pyx_n_s_fill_value, __pyx_n_s_i, __pyx_n_s_j, __pyx_n_s_k, __pyx_n_s_n, __pyx_n_s_idx, __pyx_n_s_fv); if (unlikely(!__pyx_tuple__446)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2799; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__446); __Pyx_GIVEREF(__pyx_tuple__446); __pyx_codeobj__447 = (PyObject*)__Pyx_PyCode_New(4, 0, 10, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__446, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pandas_src_generated_pyx, __pyx_n_s_take_2d_axis0_int8_float64, 2799, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__447)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2799; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":2842 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_axis0_int16_int16(ndarray[int16_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[int16_t, ndim=2] out, */ __pyx_tuple__448 = PyTuple_Pack(12, __pyx_n_s_values, __pyx_n_s_indexer, __pyx_n_s_out, __pyx_n_s_fill_value, __pyx_n_s_i, __pyx_n_s_j, __pyx_n_s_k, __pyx_n_s_n, __pyx_n_s_idx, __pyx_n_s_fv, __pyx_n_s_v, __pyx_n_s_o); if (unlikely(!__pyx_tuple__448)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2842; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__448); __Pyx_GIVEREF(__pyx_tuple__448); __pyx_codeobj__449 = (PyObject*)__Pyx_PyCode_New(4, 0, 12, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__448, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pandas_src_generated_pyx, __pyx_n_s_take_2d_axis0_int16_int16, 2842, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__449)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2842; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":2885 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_axis0_int16_int32(ndarray[int16_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[int32_t, ndim=2] out, */ __pyx_tuple__450 = PyTuple_Pack(10, __pyx_n_s_values, __pyx_n_s_indexer, __pyx_n_s_out, __pyx_n_s_fill_value, __pyx_n_s_i, __pyx_n_s_j, __pyx_n_s_k, __pyx_n_s_n, __pyx_n_s_idx, __pyx_n_s_fv); if (unlikely(!__pyx_tuple__450)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2885; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__450); __Pyx_GIVEREF(__pyx_tuple__450); __pyx_codeobj__451 = (PyObject*)__Pyx_PyCode_New(4, 0, 10, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__450, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pandas_src_generated_pyx, __pyx_n_s_take_2d_axis0_int16_int32, 2885, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__451)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2885; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":2928 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_axis0_int16_int64(ndarray[int16_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[int64_t, ndim=2] out, */ __pyx_tuple__452 = PyTuple_Pack(10, __pyx_n_s_values, __pyx_n_s_indexer, __pyx_n_s_out, __pyx_n_s_fill_value, __pyx_n_s_i, __pyx_n_s_j, __pyx_n_s_k, __pyx_n_s_n, __pyx_n_s_idx, __pyx_n_s_fv); if (unlikely(!__pyx_tuple__452)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2928; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__452); __Pyx_GIVEREF(__pyx_tuple__452); __pyx_codeobj__453 = (PyObject*)__Pyx_PyCode_New(4, 0, 10, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__452, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pandas_src_generated_pyx, __pyx_n_s_take_2d_axis0_int16_int64, 2928, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__453)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2928; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":2971 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_axis0_int16_float64(ndarray[int16_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[float64_t, ndim=2] out, */ __pyx_tuple__454 = PyTuple_Pack(10, __pyx_n_s_values, __pyx_n_s_indexer, __pyx_n_s_out, __pyx_n_s_fill_value, __pyx_n_s_i, __pyx_n_s_j, __pyx_n_s_k, __pyx_n_s_n, __pyx_n_s_idx, __pyx_n_s_fv); if (unlikely(!__pyx_tuple__454)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2971; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__454); __Pyx_GIVEREF(__pyx_tuple__454); __pyx_codeobj__455 = (PyObject*)__Pyx_PyCode_New(4, 0, 10, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__454, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pandas_src_generated_pyx, __pyx_n_s_take_2d_axis0_int16_float64, 2971, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__455)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2971; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":3014 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_axis0_int32_int32(ndarray[int32_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[int32_t, ndim=2] out, */ __pyx_tuple__456 = PyTuple_Pack(12, __pyx_n_s_values, __pyx_n_s_indexer, __pyx_n_s_out, __pyx_n_s_fill_value, __pyx_n_s_i, __pyx_n_s_j, __pyx_n_s_k, __pyx_n_s_n, __pyx_n_s_idx, __pyx_n_s_fv, __pyx_n_s_v, __pyx_n_s_o); if (unlikely(!__pyx_tuple__456)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3014; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__456); __Pyx_GIVEREF(__pyx_tuple__456); __pyx_codeobj__457 = (PyObject*)__Pyx_PyCode_New(4, 0, 12, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__456, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pandas_src_generated_pyx, __pyx_n_s_take_2d_axis0_int32_int32, 3014, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__457)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3014; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":3057 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_axis0_int32_int64(ndarray[int32_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[int64_t, ndim=2] out, */ __pyx_tuple__458 = PyTuple_Pack(10, __pyx_n_s_values, __pyx_n_s_indexer, __pyx_n_s_out, __pyx_n_s_fill_value, __pyx_n_s_i, __pyx_n_s_j, __pyx_n_s_k, __pyx_n_s_n, __pyx_n_s_idx, __pyx_n_s_fv); if (unlikely(!__pyx_tuple__458)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3057; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__458); __Pyx_GIVEREF(__pyx_tuple__458); __pyx_codeobj__459 = (PyObject*)__Pyx_PyCode_New(4, 0, 10, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__458, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pandas_src_generated_pyx, __pyx_n_s_take_2d_axis0_int32_int64, 3057, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__459)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3057; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":3100 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_axis0_int32_float64(ndarray[int32_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[float64_t, ndim=2] out, */ __pyx_tuple__460 = PyTuple_Pack(10, __pyx_n_s_values, __pyx_n_s_indexer, __pyx_n_s_out, __pyx_n_s_fill_value, __pyx_n_s_i, __pyx_n_s_j, __pyx_n_s_k, __pyx_n_s_n, __pyx_n_s_idx, __pyx_n_s_fv); if (unlikely(!__pyx_tuple__460)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3100; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__460); __Pyx_GIVEREF(__pyx_tuple__460); __pyx_codeobj__461 = (PyObject*)__Pyx_PyCode_New(4, 0, 10, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__460, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pandas_src_generated_pyx, __pyx_n_s_take_2d_axis0_int32_float64, 3100, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__461)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3100; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":3143 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_axis0_int64_int64(ndarray[int64_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[int64_t, ndim=2] out, */ __pyx_tuple__462 = PyTuple_Pack(12, __pyx_n_s_values, __pyx_n_s_indexer, __pyx_n_s_out, __pyx_n_s_fill_value, __pyx_n_s_i, __pyx_n_s_j, __pyx_n_s_k, __pyx_n_s_n, __pyx_n_s_idx, __pyx_n_s_fv, __pyx_n_s_v, __pyx_n_s_o); if (unlikely(!__pyx_tuple__462)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3143; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__462); __Pyx_GIVEREF(__pyx_tuple__462); __pyx_codeobj__463 = (PyObject*)__Pyx_PyCode_New(4, 0, 12, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__462, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pandas_src_generated_pyx, __pyx_n_s_take_2d_axis0_int64_int64, 3143, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__463)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3143; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":3186 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_axis0_int64_float64(ndarray[int64_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[float64_t, ndim=2] out, */ __pyx_tuple__464 = PyTuple_Pack(10, __pyx_n_s_values, __pyx_n_s_indexer, __pyx_n_s_out, __pyx_n_s_fill_value, __pyx_n_s_i, __pyx_n_s_j, __pyx_n_s_k, __pyx_n_s_n, __pyx_n_s_idx, __pyx_n_s_fv); if (unlikely(!__pyx_tuple__464)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3186; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__464); __Pyx_GIVEREF(__pyx_tuple__464); __pyx_codeobj__465 = (PyObject*)__Pyx_PyCode_New(4, 0, 10, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__464, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pandas_src_generated_pyx, __pyx_n_s_take_2d_axis0_int64_float64, 3186, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__465)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3186; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":3229 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_axis0_float32_float32(ndarray[float32_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[float32_t, ndim=2] out, */ __pyx_tuple__466 = PyTuple_Pack(12, __pyx_n_s_values, __pyx_n_s_indexer, __pyx_n_s_out, __pyx_n_s_fill_value, __pyx_n_s_i, __pyx_n_s_j, __pyx_n_s_k, __pyx_n_s_n, __pyx_n_s_idx, __pyx_n_s_fv, __pyx_n_s_v, __pyx_n_s_o); if (unlikely(!__pyx_tuple__466)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3229; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__466); __Pyx_GIVEREF(__pyx_tuple__466); __pyx_codeobj__467 = (PyObject*)__Pyx_PyCode_New(4, 0, 12, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__466, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pandas_src_generated_pyx, __pyx_n_s_take_2d_axis0_float32_float32, 3229, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__467)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3229; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":3272 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_axis0_float32_float64(ndarray[float32_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[float64_t, ndim=2] out, */ __pyx_tuple__468 = PyTuple_Pack(10, __pyx_n_s_values, __pyx_n_s_indexer, __pyx_n_s_out, __pyx_n_s_fill_value, __pyx_n_s_i, __pyx_n_s_j, __pyx_n_s_k, __pyx_n_s_n, __pyx_n_s_idx, __pyx_n_s_fv); if (unlikely(!__pyx_tuple__468)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3272; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__468); __Pyx_GIVEREF(__pyx_tuple__468); __pyx_codeobj__469 = (PyObject*)__Pyx_PyCode_New(4, 0, 10, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__468, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pandas_src_generated_pyx, __pyx_n_s_take_2d_axis0_float32_float64, 3272, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__469)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3272; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":3315 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_axis0_float64_float64(ndarray[float64_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[float64_t, ndim=2] out, */ __pyx_tuple__470 = PyTuple_Pack(12, __pyx_n_s_values, __pyx_n_s_indexer, __pyx_n_s_out, __pyx_n_s_fill_value, __pyx_n_s_i, __pyx_n_s_j, __pyx_n_s_k, __pyx_n_s_n, __pyx_n_s_idx, __pyx_n_s_fv, __pyx_n_s_v, __pyx_n_s_o); if (unlikely(!__pyx_tuple__470)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3315; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__470); __Pyx_GIVEREF(__pyx_tuple__470); __pyx_codeobj__471 = (PyObject*)__Pyx_PyCode_New(4, 0, 12, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__470, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pandas_src_generated_pyx, __pyx_n_s_take_2d_axis0_float64_float64, 3315, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__471)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3315; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":3358 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_axis0_object_object(ndarray[object, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[object, ndim=2] out, */ __pyx_tuple__472 = PyTuple_Pack(10, __pyx_n_s_values, __pyx_n_s_indexer, __pyx_n_s_out, __pyx_n_s_fill_value, __pyx_n_s_i, __pyx_n_s_j, __pyx_n_s_k, __pyx_n_s_n, __pyx_n_s_idx, __pyx_n_s_fv); if (unlikely(!__pyx_tuple__472)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3358; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__472); __Pyx_GIVEREF(__pyx_tuple__472); __pyx_codeobj__473 = (PyObject*)__Pyx_PyCode_New(4, 0, 10, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__472, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pandas_src_generated_pyx, __pyx_n_s_take_2d_axis0_object_object, 3358, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__473)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3358; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":3402 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_axis1_bool_bool(ndarray[uint8_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[uint8_t, ndim=2] out, */ __pyx_tuple__474 = PyTuple_Pack(12, __pyx_n_s_values, __pyx_n_s_indexer, __pyx_n_s_out, __pyx_n_s_fill_value, __pyx_n_s_i, __pyx_n_s_j, __pyx_n_s_k, __pyx_n_s_n, __pyx_n_s_idx, __pyx_n_s_fv, __pyx_n_s_v, __pyx_n_s_o); if (unlikely(!__pyx_tuple__474)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3402; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__474); __Pyx_GIVEREF(__pyx_tuple__474); __pyx_codeobj__475 = (PyObject*)__Pyx_PyCode_New(4, 0, 12, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__474, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pandas_src_generated_pyx, __pyx_n_s_take_2d_axis1_bool_bool, 3402, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__475)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3402; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":3448 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_axis1_bool_object(ndarray[uint8_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[object, ndim=2] out, */ __pyx_tuple__476 = PyTuple_Pack(10, __pyx_n_s_values, __pyx_n_s_indexer, __pyx_n_s_out, __pyx_n_s_fill_value, __pyx_n_s_i, __pyx_n_s_j, __pyx_n_s_k, __pyx_n_s_n, __pyx_n_s_idx, __pyx_n_s_fv); if (unlikely(!__pyx_tuple__476)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3448; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__476); __Pyx_GIVEREF(__pyx_tuple__476); __pyx_codeobj__477 = (PyObject*)__Pyx_PyCode_New(4, 0, 10, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__476, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pandas_src_generated_pyx, __pyx_n_s_take_2d_axis1_bool_object, 3448, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__477)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3448; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":3494 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_axis1_int8_int8(ndarray[int8_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[int8_t, ndim=2] out, */ __pyx_tuple__478 = PyTuple_Pack(12, __pyx_n_s_values, __pyx_n_s_indexer, __pyx_n_s_out, __pyx_n_s_fill_value, __pyx_n_s_i, __pyx_n_s_j, __pyx_n_s_k, __pyx_n_s_n, __pyx_n_s_idx, __pyx_n_s_fv, __pyx_n_s_v, __pyx_n_s_o); if (unlikely(!__pyx_tuple__478)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3494; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__478); __Pyx_GIVEREF(__pyx_tuple__478); __pyx_codeobj__479 = (PyObject*)__Pyx_PyCode_New(4, 0, 12, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__478, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pandas_src_generated_pyx, __pyx_n_s_take_2d_axis1_int8_int8, 3494, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__479)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3494; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":3540 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_axis1_int8_int32(ndarray[int8_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[int32_t, ndim=2] out, */ __pyx_tuple__480 = PyTuple_Pack(10, __pyx_n_s_values, __pyx_n_s_indexer, __pyx_n_s_out, __pyx_n_s_fill_value, __pyx_n_s_i, __pyx_n_s_j, __pyx_n_s_k, __pyx_n_s_n, __pyx_n_s_idx, __pyx_n_s_fv); if (unlikely(!__pyx_tuple__480)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3540; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__480); __Pyx_GIVEREF(__pyx_tuple__480); __pyx_codeobj__481 = (PyObject*)__Pyx_PyCode_New(4, 0, 10, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__480, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pandas_src_generated_pyx, __pyx_n_s_take_2d_axis1_int8_int32, 3540, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__481)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3540; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":3586 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_axis1_int8_int64(ndarray[int8_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[int64_t, ndim=2] out, */ __pyx_tuple__482 = PyTuple_Pack(10, __pyx_n_s_values, __pyx_n_s_indexer, __pyx_n_s_out, __pyx_n_s_fill_value, __pyx_n_s_i, __pyx_n_s_j, __pyx_n_s_k, __pyx_n_s_n, __pyx_n_s_idx, __pyx_n_s_fv); if (unlikely(!__pyx_tuple__482)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3586; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__482); __Pyx_GIVEREF(__pyx_tuple__482); __pyx_codeobj__483 = (PyObject*)__Pyx_PyCode_New(4, 0, 10, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__482, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pandas_src_generated_pyx, __pyx_n_s_take_2d_axis1_int8_int64, 3586, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__483)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3586; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":3632 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_axis1_int8_float64(ndarray[int8_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[float64_t, ndim=2] out, */ __pyx_tuple__484 = PyTuple_Pack(10, __pyx_n_s_values, __pyx_n_s_indexer, __pyx_n_s_out, __pyx_n_s_fill_value, __pyx_n_s_i, __pyx_n_s_j, __pyx_n_s_k, __pyx_n_s_n, __pyx_n_s_idx, __pyx_n_s_fv); if (unlikely(!__pyx_tuple__484)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3632; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__484); __Pyx_GIVEREF(__pyx_tuple__484); __pyx_codeobj__485 = (PyObject*)__Pyx_PyCode_New(4, 0, 10, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__484, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pandas_src_generated_pyx, __pyx_n_s_take_2d_axis1_int8_float64, 3632, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__485)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3632; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":3678 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_axis1_int16_int16(ndarray[int16_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[int16_t, ndim=2] out, */ __pyx_tuple__486 = PyTuple_Pack(12, __pyx_n_s_values, __pyx_n_s_indexer, __pyx_n_s_out, __pyx_n_s_fill_value, __pyx_n_s_i, __pyx_n_s_j, __pyx_n_s_k, __pyx_n_s_n, __pyx_n_s_idx, __pyx_n_s_fv, __pyx_n_s_v, __pyx_n_s_o); if (unlikely(!__pyx_tuple__486)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3678; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__486); __Pyx_GIVEREF(__pyx_tuple__486); __pyx_codeobj__487 = (PyObject*)__Pyx_PyCode_New(4, 0, 12, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__486, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pandas_src_generated_pyx, __pyx_n_s_take_2d_axis1_int16_int16, 3678, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__487)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3678; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":3724 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_axis1_int16_int32(ndarray[int16_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[int32_t, ndim=2] out, */ __pyx_tuple__488 = PyTuple_Pack(10, __pyx_n_s_values, __pyx_n_s_indexer, __pyx_n_s_out, __pyx_n_s_fill_value, __pyx_n_s_i, __pyx_n_s_j, __pyx_n_s_k, __pyx_n_s_n, __pyx_n_s_idx, __pyx_n_s_fv); if (unlikely(!__pyx_tuple__488)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3724; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__488); __Pyx_GIVEREF(__pyx_tuple__488); __pyx_codeobj__489 = (PyObject*)__Pyx_PyCode_New(4, 0, 10, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__488, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pandas_src_generated_pyx, __pyx_n_s_take_2d_axis1_int16_int32, 3724, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__489)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3724; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":3770 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_axis1_int16_int64(ndarray[int16_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[int64_t, ndim=2] out, */ __pyx_tuple__490 = PyTuple_Pack(10, __pyx_n_s_values, __pyx_n_s_indexer, __pyx_n_s_out, __pyx_n_s_fill_value, __pyx_n_s_i, __pyx_n_s_j, __pyx_n_s_k, __pyx_n_s_n, __pyx_n_s_idx, __pyx_n_s_fv); if (unlikely(!__pyx_tuple__490)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3770; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__490); __Pyx_GIVEREF(__pyx_tuple__490); __pyx_codeobj__491 = (PyObject*)__Pyx_PyCode_New(4, 0, 10, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__490, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pandas_src_generated_pyx, __pyx_n_s_take_2d_axis1_int16_int64, 3770, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__491)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3770; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":3816 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_axis1_int16_float64(ndarray[int16_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[float64_t, ndim=2] out, */ __pyx_tuple__492 = PyTuple_Pack(10, __pyx_n_s_values, __pyx_n_s_indexer, __pyx_n_s_out, __pyx_n_s_fill_value, __pyx_n_s_i, __pyx_n_s_j, __pyx_n_s_k, __pyx_n_s_n, __pyx_n_s_idx, __pyx_n_s_fv); if (unlikely(!__pyx_tuple__492)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3816; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__492); __Pyx_GIVEREF(__pyx_tuple__492); __pyx_codeobj__493 = (PyObject*)__Pyx_PyCode_New(4, 0, 10, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__492, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pandas_src_generated_pyx, __pyx_n_s_take_2d_axis1_int16_float64, 3816, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__493)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3816; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":3862 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_axis1_int32_int32(ndarray[int32_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[int32_t, ndim=2] out, */ __pyx_tuple__494 = PyTuple_Pack(12, __pyx_n_s_values, __pyx_n_s_indexer, __pyx_n_s_out, __pyx_n_s_fill_value, __pyx_n_s_i, __pyx_n_s_j, __pyx_n_s_k, __pyx_n_s_n, __pyx_n_s_idx, __pyx_n_s_fv, __pyx_n_s_v, __pyx_n_s_o); if (unlikely(!__pyx_tuple__494)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3862; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__494); __Pyx_GIVEREF(__pyx_tuple__494); __pyx_codeobj__495 = (PyObject*)__Pyx_PyCode_New(4, 0, 12, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__494, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pandas_src_generated_pyx, __pyx_n_s_take_2d_axis1_int32_int32, 3862, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__495)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3862; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":3908 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_axis1_int32_int64(ndarray[int32_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[int64_t, ndim=2] out, */ __pyx_tuple__496 = PyTuple_Pack(10, __pyx_n_s_values, __pyx_n_s_indexer, __pyx_n_s_out, __pyx_n_s_fill_value, __pyx_n_s_i, __pyx_n_s_j, __pyx_n_s_k, __pyx_n_s_n, __pyx_n_s_idx, __pyx_n_s_fv); if (unlikely(!__pyx_tuple__496)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3908; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__496); __Pyx_GIVEREF(__pyx_tuple__496); __pyx_codeobj__497 = (PyObject*)__Pyx_PyCode_New(4, 0, 10, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__496, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pandas_src_generated_pyx, __pyx_n_s_take_2d_axis1_int32_int64, 3908, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__497)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3908; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":3954 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_axis1_int32_float64(ndarray[int32_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[float64_t, ndim=2] out, */ __pyx_tuple__498 = PyTuple_Pack(10, __pyx_n_s_values, __pyx_n_s_indexer, __pyx_n_s_out, __pyx_n_s_fill_value, __pyx_n_s_i, __pyx_n_s_j, __pyx_n_s_k, __pyx_n_s_n, __pyx_n_s_idx, __pyx_n_s_fv); if (unlikely(!__pyx_tuple__498)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3954; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__498); __Pyx_GIVEREF(__pyx_tuple__498); __pyx_codeobj__499 = (PyObject*)__Pyx_PyCode_New(4, 0, 10, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__498, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pandas_src_generated_pyx, __pyx_n_s_take_2d_axis1_int32_float64, 3954, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__499)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3954; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":4000 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_axis1_int64_int64(ndarray[int64_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[int64_t, ndim=2] out, */ __pyx_tuple__500 = PyTuple_Pack(12, __pyx_n_s_values, __pyx_n_s_indexer, __pyx_n_s_out, __pyx_n_s_fill_value, __pyx_n_s_i, __pyx_n_s_j, __pyx_n_s_k, __pyx_n_s_n, __pyx_n_s_idx, __pyx_n_s_fv, __pyx_n_s_v, __pyx_n_s_o); if (unlikely(!__pyx_tuple__500)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4000; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__500); __Pyx_GIVEREF(__pyx_tuple__500); __pyx_codeobj__501 = (PyObject*)__Pyx_PyCode_New(4, 0, 12, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__500, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pandas_src_generated_pyx, __pyx_n_s_take_2d_axis1_int64_int64, 4000, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__501)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4000; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":4046 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_axis1_int64_float64(ndarray[int64_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[float64_t, ndim=2] out, */ __pyx_tuple__502 = PyTuple_Pack(10, __pyx_n_s_values, __pyx_n_s_indexer, __pyx_n_s_out, __pyx_n_s_fill_value, __pyx_n_s_i, __pyx_n_s_j, __pyx_n_s_k, __pyx_n_s_n, __pyx_n_s_idx, __pyx_n_s_fv); if (unlikely(!__pyx_tuple__502)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4046; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__502); __Pyx_GIVEREF(__pyx_tuple__502); __pyx_codeobj__503 = (PyObject*)__Pyx_PyCode_New(4, 0, 10, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__502, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pandas_src_generated_pyx, __pyx_n_s_take_2d_axis1_int64_float64, 4046, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__503)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4046; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":4092 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_axis1_float32_float32(ndarray[float32_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[float32_t, ndim=2] out, */ __pyx_tuple__504 = PyTuple_Pack(12, __pyx_n_s_values, __pyx_n_s_indexer, __pyx_n_s_out, __pyx_n_s_fill_value, __pyx_n_s_i, __pyx_n_s_j, __pyx_n_s_k, __pyx_n_s_n, __pyx_n_s_idx, __pyx_n_s_fv, __pyx_n_s_v, __pyx_n_s_o); if (unlikely(!__pyx_tuple__504)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4092; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__504); __Pyx_GIVEREF(__pyx_tuple__504); __pyx_codeobj__505 = (PyObject*)__Pyx_PyCode_New(4, 0, 12, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__504, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pandas_src_generated_pyx, __pyx_n_s_take_2d_axis1_float32_float32, 4092, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__505)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4092; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":4138 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_axis1_float32_float64(ndarray[float32_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[float64_t, ndim=2] out, */ __pyx_tuple__506 = PyTuple_Pack(10, __pyx_n_s_values, __pyx_n_s_indexer, __pyx_n_s_out, __pyx_n_s_fill_value, __pyx_n_s_i, __pyx_n_s_j, __pyx_n_s_k, __pyx_n_s_n, __pyx_n_s_idx, __pyx_n_s_fv); if (unlikely(!__pyx_tuple__506)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4138; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__506); __Pyx_GIVEREF(__pyx_tuple__506); __pyx_codeobj__507 = (PyObject*)__Pyx_PyCode_New(4, 0, 10, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__506, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pandas_src_generated_pyx, __pyx_n_s_take_2d_axis1_float32_float64, 4138, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__507)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4138; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":4184 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_axis1_float64_float64(ndarray[float64_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[float64_t, ndim=2] out, */ __pyx_tuple__508 = PyTuple_Pack(12, __pyx_n_s_values, __pyx_n_s_indexer, __pyx_n_s_out, __pyx_n_s_fill_value, __pyx_n_s_i, __pyx_n_s_j, __pyx_n_s_k, __pyx_n_s_n, __pyx_n_s_idx, __pyx_n_s_fv, __pyx_n_s_v, __pyx_n_s_o); if (unlikely(!__pyx_tuple__508)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4184; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__508); __Pyx_GIVEREF(__pyx_tuple__508); __pyx_codeobj__509 = (PyObject*)__Pyx_PyCode_New(4, 0, 12, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__508, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pandas_src_generated_pyx, __pyx_n_s_take_2d_axis1_float64_float64, 4184, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__509)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4184; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":4230 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_axis1_object_object(ndarray[object, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[object, ndim=2] out, */ __pyx_tuple__510 = PyTuple_Pack(10, __pyx_n_s_values, __pyx_n_s_indexer, __pyx_n_s_out, __pyx_n_s_fill_value, __pyx_n_s_i, __pyx_n_s_j, __pyx_n_s_k, __pyx_n_s_n, __pyx_n_s_idx, __pyx_n_s_fv); if (unlikely(!__pyx_tuple__510)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4230; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__510); __Pyx_GIVEREF(__pyx_tuple__510); __pyx_codeobj__511 = (PyObject*)__Pyx_PyCode_New(4, 0, 10, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__510, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pandas_src_generated_pyx, __pyx_n_s_take_2d_axis1_object_object, 4230, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__511)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4230; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":4277 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_multi_bool_bool(ndarray[uint8_t, ndim=2] values, # <<<<<<<<<<<<<< * indexer, * ndarray[uint8_t, ndim=2] out, */ __pyx_tuple__512 = PyTuple_Pack(12, __pyx_n_s_values, __pyx_n_s_indexer, __pyx_n_s_out, __pyx_n_s_fill_value, __pyx_n_s_i, __pyx_n_s_j, __pyx_n_s_k, __pyx_n_s_n, __pyx_n_s_idx, __pyx_n_s_idx0, __pyx_n_s_idx1, __pyx_n_s_fv); if (unlikely(!__pyx_tuple__512)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4277; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__512); __Pyx_GIVEREF(__pyx_tuple__512); __pyx_codeobj__513 = (PyObject*)__Pyx_PyCode_New(4, 0, 12, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__512, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pandas_src_generated_pyx, __pyx_n_s_take_2d_multi_bool_bool, 4277, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__513)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4277; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":4305 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_multi_bool_object(ndarray[uint8_t, ndim=2] values, # <<<<<<<<<<<<<< * indexer, * ndarray[object, ndim=2] out, */ __pyx_tuple__514 = PyTuple_Pack(12, __pyx_n_s_values, __pyx_n_s_indexer, __pyx_n_s_out, __pyx_n_s_fill_value, __pyx_n_s_i, __pyx_n_s_j, __pyx_n_s_k, __pyx_n_s_n, __pyx_n_s_idx, __pyx_n_s_idx0, __pyx_n_s_idx1, __pyx_n_s_fv); if (unlikely(!__pyx_tuple__514)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4305; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__514); __Pyx_GIVEREF(__pyx_tuple__514); __pyx_codeobj__515 = (PyObject*)__Pyx_PyCode_New(4, 0, 12, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__514, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pandas_src_generated_pyx, __pyx_n_s_take_2d_multi_bool_object, 4305, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__515)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4305; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":4333 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_multi_int8_int8(ndarray[int8_t, ndim=2] values, # <<<<<<<<<<<<<< * indexer, * ndarray[int8_t, ndim=2] out, */ __pyx_tuple__516 = PyTuple_Pack(12, __pyx_n_s_values, __pyx_n_s_indexer, __pyx_n_s_out, __pyx_n_s_fill_value, __pyx_n_s_i, __pyx_n_s_j, __pyx_n_s_k, __pyx_n_s_n, __pyx_n_s_idx, __pyx_n_s_idx0, __pyx_n_s_idx1, __pyx_n_s_fv); if (unlikely(!__pyx_tuple__516)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4333; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__516); __Pyx_GIVEREF(__pyx_tuple__516); __pyx_codeobj__517 = (PyObject*)__Pyx_PyCode_New(4, 0, 12, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__516, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pandas_src_generated_pyx, __pyx_n_s_take_2d_multi_int8_int8, 4333, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__517)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4333; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":4361 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_multi_int8_int32(ndarray[int8_t, ndim=2] values, # <<<<<<<<<<<<<< * indexer, * ndarray[int32_t, ndim=2] out, */ __pyx_tuple__518 = PyTuple_Pack(12, __pyx_n_s_values, __pyx_n_s_indexer, __pyx_n_s_out, __pyx_n_s_fill_value, __pyx_n_s_i, __pyx_n_s_j, __pyx_n_s_k, __pyx_n_s_n, __pyx_n_s_idx, __pyx_n_s_idx0, __pyx_n_s_idx1, __pyx_n_s_fv); if (unlikely(!__pyx_tuple__518)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4361; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__518); __Pyx_GIVEREF(__pyx_tuple__518); __pyx_codeobj__519 = (PyObject*)__Pyx_PyCode_New(4, 0, 12, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__518, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pandas_src_generated_pyx, __pyx_n_s_take_2d_multi_int8_int32, 4361, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__519)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4361; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":4389 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_multi_int8_int64(ndarray[int8_t, ndim=2] values, # <<<<<<<<<<<<<< * indexer, * ndarray[int64_t, ndim=2] out, */ __pyx_tuple__520 = PyTuple_Pack(12, __pyx_n_s_values, __pyx_n_s_indexer, __pyx_n_s_out, __pyx_n_s_fill_value, __pyx_n_s_i, __pyx_n_s_j, __pyx_n_s_k, __pyx_n_s_n, __pyx_n_s_idx, __pyx_n_s_idx0, __pyx_n_s_idx1, __pyx_n_s_fv); if (unlikely(!__pyx_tuple__520)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4389; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__520); __Pyx_GIVEREF(__pyx_tuple__520); __pyx_codeobj__521 = (PyObject*)__Pyx_PyCode_New(4, 0, 12, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__520, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pandas_src_generated_pyx, __pyx_n_s_take_2d_multi_int8_int64, 4389, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__521)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4389; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":4417 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_multi_int8_float64(ndarray[int8_t, ndim=2] values, # <<<<<<<<<<<<<< * indexer, * ndarray[float64_t, ndim=2] out, */ __pyx_tuple__522 = PyTuple_Pack(12, __pyx_n_s_values, __pyx_n_s_indexer, __pyx_n_s_out, __pyx_n_s_fill_value, __pyx_n_s_i, __pyx_n_s_j, __pyx_n_s_k, __pyx_n_s_n, __pyx_n_s_idx, __pyx_n_s_idx0, __pyx_n_s_idx1, __pyx_n_s_fv); if (unlikely(!__pyx_tuple__522)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4417; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__522); __Pyx_GIVEREF(__pyx_tuple__522); __pyx_codeobj__523 = (PyObject*)__Pyx_PyCode_New(4, 0, 12, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__522, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pandas_src_generated_pyx, __pyx_n_s_take_2d_multi_int8_float64, 4417, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__523)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4417; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":4445 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_multi_int16_int16(ndarray[int16_t, ndim=2] values, # <<<<<<<<<<<<<< * indexer, * ndarray[int16_t, ndim=2] out, */ __pyx_tuple__524 = PyTuple_Pack(12, __pyx_n_s_values, __pyx_n_s_indexer, __pyx_n_s_out, __pyx_n_s_fill_value, __pyx_n_s_i, __pyx_n_s_j, __pyx_n_s_k, __pyx_n_s_n, __pyx_n_s_idx, __pyx_n_s_idx0, __pyx_n_s_idx1, __pyx_n_s_fv); if (unlikely(!__pyx_tuple__524)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4445; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__524); __Pyx_GIVEREF(__pyx_tuple__524); __pyx_codeobj__525 = (PyObject*)__Pyx_PyCode_New(4, 0, 12, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__524, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pandas_src_generated_pyx, __pyx_n_s_take_2d_multi_int16_int16, 4445, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__525)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4445; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":4473 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_multi_int16_int32(ndarray[int16_t, ndim=2] values, # <<<<<<<<<<<<<< * indexer, * ndarray[int32_t, ndim=2] out, */ __pyx_tuple__526 = PyTuple_Pack(12, __pyx_n_s_values, __pyx_n_s_indexer, __pyx_n_s_out, __pyx_n_s_fill_value, __pyx_n_s_i, __pyx_n_s_j, __pyx_n_s_k, __pyx_n_s_n, __pyx_n_s_idx, __pyx_n_s_idx0, __pyx_n_s_idx1, __pyx_n_s_fv); if (unlikely(!__pyx_tuple__526)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4473; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__526); __Pyx_GIVEREF(__pyx_tuple__526); __pyx_codeobj__527 = (PyObject*)__Pyx_PyCode_New(4, 0, 12, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__526, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pandas_src_generated_pyx, __pyx_n_s_take_2d_multi_int16_int32, 4473, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__527)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4473; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":4501 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_multi_int16_int64(ndarray[int16_t, ndim=2] values, # <<<<<<<<<<<<<< * indexer, * ndarray[int64_t, ndim=2] out, */ __pyx_tuple__528 = PyTuple_Pack(12, __pyx_n_s_values, __pyx_n_s_indexer, __pyx_n_s_out, __pyx_n_s_fill_value, __pyx_n_s_i, __pyx_n_s_j, __pyx_n_s_k, __pyx_n_s_n, __pyx_n_s_idx, __pyx_n_s_idx0, __pyx_n_s_idx1, __pyx_n_s_fv); if (unlikely(!__pyx_tuple__528)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4501; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__528); __Pyx_GIVEREF(__pyx_tuple__528); __pyx_codeobj__529 = (PyObject*)__Pyx_PyCode_New(4, 0, 12, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__528, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pandas_src_generated_pyx, __pyx_n_s_take_2d_multi_int16_int64, 4501, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__529)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4501; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":4529 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_multi_int16_float64(ndarray[int16_t, ndim=2] values, # <<<<<<<<<<<<<< * indexer, * ndarray[float64_t, ndim=2] out, */ __pyx_tuple__530 = PyTuple_Pack(12, __pyx_n_s_values, __pyx_n_s_indexer, __pyx_n_s_out, __pyx_n_s_fill_value, __pyx_n_s_i, __pyx_n_s_j, __pyx_n_s_k, __pyx_n_s_n, __pyx_n_s_idx, __pyx_n_s_idx0, __pyx_n_s_idx1, __pyx_n_s_fv); if (unlikely(!__pyx_tuple__530)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4529; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__530); __Pyx_GIVEREF(__pyx_tuple__530); __pyx_codeobj__531 = (PyObject*)__Pyx_PyCode_New(4, 0, 12, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__530, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pandas_src_generated_pyx, __pyx_n_s_take_2d_multi_int16_float64, 4529, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__531)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4529; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":4557 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_multi_int32_int32(ndarray[int32_t, ndim=2] values, # <<<<<<<<<<<<<< * indexer, * ndarray[int32_t, ndim=2] out, */ __pyx_tuple__532 = PyTuple_Pack(12, __pyx_n_s_values, __pyx_n_s_indexer, __pyx_n_s_out, __pyx_n_s_fill_value, __pyx_n_s_i, __pyx_n_s_j, __pyx_n_s_k, __pyx_n_s_n, __pyx_n_s_idx, __pyx_n_s_idx0, __pyx_n_s_idx1, __pyx_n_s_fv); if (unlikely(!__pyx_tuple__532)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4557; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__532); __Pyx_GIVEREF(__pyx_tuple__532); __pyx_codeobj__533 = (PyObject*)__Pyx_PyCode_New(4, 0, 12, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__532, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pandas_src_generated_pyx, __pyx_n_s_take_2d_multi_int32_int32, 4557, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__533)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4557; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":4585 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_multi_int32_int64(ndarray[int32_t, ndim=2] values, # <<<<<<<<<<<<<< * indexer, * ndarray[int64_t, ndim=2] out, */ __pyx_tuple__534 = PyTuple_Pack(12, __pyx_n_s_values, __pyx_n_s_indexer, __pyx_n_s_out, __pyx_n_s_fill_value, __pyx_n_s_i, __pyx_n_s_j, __pyx_n_s_k, __pyx_n_s_n, __pyx_n_s_idx, __pyx_n_s_idx0, __pyx_n_s_idx1, __pyx_n_s_fv); if (unlikely(!__pyx_tuple__534)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4585; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__534); __Pyx_GIVEREF(__pyx_tuple__534); __pyx_codeobj__535 = (PyObject*)__Pyx_PyCode_New(4, 0, 12, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__534, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pandas_src_generated_pyx, __pyx_n_s_take_2d_multi_int32_int64, 4585, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__535)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4585; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":4613 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_multi_int32_float64(ndarray[int32_t, ndim=2] values, # <<<<<<<<<<<<<< * indexer, * ndarray[float64_t, ndim=2] out, */ __pyx_tuple__536 = PyTuple_Pack(12, __pyx_n_s_values, __pyx_n_s_indexer, __pyx_n_s_out, __pyx_n_s_fill_value, __pyx_n_s_i, __pyx_n_s_j, __pyx_n_s_k, __pyx_n_s_n, __pyx_n_s_idx, __pyx_n_s_idx0, __pyx_n_s_idx1, __pyx_n_s_fv); if (unlikely(!__pyx_tuple__536)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4613; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__536); __Pyx_GIVEREF(__pyx_tuple__536); __pyx_codeobj__537 = (PyObject*)__Pyx_PyCode_New(4, 0, 12, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__536, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pandas_src_generated_pyx, __pyx_n_s_take_2d_multi_int32_float64, 4613, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__537)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4613; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":4641 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_multi_int64_int64(ndarray[int64_t, ndim=2] values, # <<<<<<<<<<<<<< * indexer, * ndarray[int64_t, ndim=2] out, */ __pyx_tuple__538 = PyTuple_Pack(12, __pyx_n_s_values, __pyx_n_s_indexer, __pyx_n_s_out, __pyx_n_s_fill_value, __pyx_n_s_i, __pyx_n_s_j, __pyx_n_s_k, __pyx_n_s_n, __pyx_n_s_idx, __pyx_n_s_idx0, __pyx_n_s_idx1, __pyx_n_s_fv); if (unlikely(!__pyx_tuple__538)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4641; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__538); __Pyx_GIVEREF(__pyx_tuple__538); __pyx_codeobj__539 = (PyObject*)__Pyx_PyCode_New(4, 0, 12, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__538, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pandas_src_generated_pyx, __pyx_n_s_take_2d_multi_int64_int64, 4641, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__539)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4641; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":4669 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_multi_int64_float64(ndarray[int64_t, ndim=2] values, # <<<<<<<<<<<<<< * indexer, * ndarray[float64_t, ndim=2] out, */ __pyx_tuple__540 = PyTuple_Pack(12, __pyx_n_s_values, __pyx_n_s_indexer, __pyx_n_s_out, __pyx_n_s_fill_value, __pyx_n_s_i, __pyx_n_s_j, __pyx_n_s_k, __pyx_n_s_n, __pyx_n_s_idx, __pyx_n_s_idx0, __pyx_n_s_idx1, __pyx_n_s_fv); if (unlikely(!__pyx_tuple__540)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4669; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__540); __Pyx_GIVEREF(__pyx_tuple__540); __pyx_codeobj__541 = (PyObject*)__Pyx_PyCode_New(4, 0, 12, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__540, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pandas_src_generated_pyx, __pyx_n_s_take_2d_multi_int64_float64, 4669, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__541)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4669; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":4697 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_multi_float32_float32(ndarray[float32_t, ndim=2] values, # <<<<<<<<<<<<<< * indexer, * ndarray[float32_t, ndim=2] out, */ __pyx_tuple__542 = PyTuple_Pack(12, __pyx_n_s_values, __pyx_n_s_indexer, __pyx_n_s_out, __pyx_n_s_fill_value, __pyx_n_s_i, __pyx_n_s_j, __pyx_n_s_k, __pyx_n_s_n, __pyx_n_s_idx, __pyx_n_s_idx0, __pyx_n_s_idx1, __pyx_n_s_fv); if (unlikely(!__pyx_tuple__542)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4697; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__542); __Pyx_GIVEREF(__pyx_tuple__542); __pyx_codeobj__543 = (PyObject*)__Pyx_PyCode_New(4, 0, 12, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__542, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pandas_src_generated_pyx, __pyx_n_s_take_2d_multi_float32_float32, 4697, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__543)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4697; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":4725 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_multi_float32_float64(ndarray[float32_t, ndim=2] values, # <<<<<<<<<<<<<< * indexer, * ndarray[float64_t, ndim=2] out, */ __pyx_tuple__544 = PyTuple_Pack(12, __pyx_n_s_values, __pyx_n_s_indexer, __pyx_n_s_out, __pyx_n_s_fill_value, __pyx_n_s_i, __pyx_n_s_j, __pyx_n_s_k, __pyx_n_s_n, __pyx_n_s_idx, __pyx_n_s_idx0, __pyx_n_s_idx1, __pyx_n_s_fv); if (unlikely(!__pyx_tuple__544)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4725; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__544); __Pyx_GIVEREF(__pyx_tuple__544); __pyx_codeobj__545 = (PyObject*)__Pyx_PyCode_New(4, 0, 12, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__544, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pandas_src_generated_pyx, __pyx_n_s_take_2d_multi_float32_float64, 4725, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__545)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4725; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":4753 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_multi_float64_float64(ndarray[float64_t, ndim=2] values, # <<<<<<<<<<<<<< * indexer, * ndarray[float64_t, ndim=2] out, */ __pyx_tuple__546 = PyTuple_Pack(12, __pyx_n_s_values, __pyx_n_s_indexer, __pyx_n_s_out, __pyx_n_s_fill_value, __pyx_n_s_i, __pyx_n_s_j, __pyx_n_s_k, __pyx_n_s_n, __pyx_n_s_idx, __pyx_n_s_idx0, __pyx_n_s_idx1, __pyx_n_s_fv); if (unlikely(!__pyx_tuple__546)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4753; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__546); __Pyx_GIVEREF(__pyx_tuple__546); __pyx_codeobj__547 = (PyObject*)__Pyx_PyCode_New(4, 0, 12, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__546, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pandas_src_generated_pyx, __pyx_n_s_take_2d_multi_float64_float64, 4753, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__547)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4753; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":4781 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_multi_object_object(ndarray[object, ndim=2] values, # <<<<<<<<<<<<<< * indexer, * ndarray[object, ndim=2] out, */ __pyx_tuple__548 = PyTuple_Pack(12, __pyx_n_s_values, __pyx_n_s_indexer, __pyx_n_s_out, __pyx_n_s_fill_value, __pyx_n_s_i, __pyx_n_s_j, __pyx_n_s_k, __pyx_n_s_n, __pyx_n_s_idx, __pyx_n_s_idx0, __pyx_n_s_idx1, __pyx_n_s_fv); if (unlikely(!__pyx_tuple__548)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4781; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__548); __Pyx_GIVEREF(__pyx_tuple__548); __pyx_codeobj__549 = (PyObject*)__Pyx_PyCode_New(4, 0, 12, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__548, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pandas_src_generated_pyx, __pyx_n_s_take_2d_multi_object_object, 4781, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__549)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4781; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":4810 * @cython.boundscheck(False) * @cython.wraparound(False) * def diff_2d_float64(ndarray[float64_t, ndim=2] arr, # <<<<<<<<<<<<<< * ndarray[float64_t, ndim=2] out, * Py_ssize_t periods, int axis): */ __pyx_tuple__550 = PyTuple_Pack(10, __pyx_n_s_arr, __pyx_n_s_out, __pyx_n_s_periods, __pyx_n_s_axis, __pyx_n_s_i, __pyx_n_s_j, __pyx_n_s_sx, __pyx_n_s_sy, __pyx_n_s_start, __pyx_n_s_stop); if (unlikely(!__pyx_tuple__550)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4810; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__550); __Pyx_GIVEREF(__pyx_tuple__550); __pyx_codeobj__551 = (PyObject*)__Pyx_PyCode_New(4, 0, 10, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__550, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pandas_src_generated_pyx, __pyx_n_s_diff_2d_float64, 4810, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__551)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4810; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":4853 * @cython.boundscheck(False) * @cython.wraparound(False) * def diff_2d_float32(ndarray[float32_t, ndim=2] arr, # <<<<<<<<<<<<<< * ndarray[float32_t, ndim=2] out, * Py_ssize_t periods, int axis): */ __pyx_tuple__552 = PyTuple_Pack(10, __pyx_n_s_arr, __pyx_n_s_out, __pyx_n_s_periods, __pyx_n_s_axis, __pyx_n_s_i, __pyx_n_s_j, __pyx_n_s_sx, __pyx_n_s_sy, __pyx_n_s_start, __pyx_n_s_stop); if (unlikely(!__pyx_tuple__552)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4853; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__552); __Pyx_GIVEREF(__pyx_tuple__552); __pyx_codeobj__553 = (PyObject*)__Pyx_PyCode_New(4, 0, 10, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__552, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pandas_src_generated_pyx, __pyx_n_s_diff_2d_float32, 4853, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__553)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4853; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":4896 * @cython.boundscheck(False) * @cython.wraparound(False) * def diff_2d_int8(ndarray[int8_t, ndim=2] arr, # <<<<<<<<<<<<<< * ndarray[float32_t, ndim=2] out, * Py_ssize_t periods, int axis): */ __pyx_tuple__554 = PyTuple_Pack(10, __pyx_n_s_arr, __pyx_n_s_out, __pyx_n_s_periods, __pyx_n_s_axis, __pyx_n_s_i, __pyx_n_s_j, __pyx_n_s_sx, __pyx_n_s_sy, __pyx_n_s_start, __pyx_n_s_stop); if (unlikely(!__pyx_tuple__554)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4896; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__554); __Pyx_GIVEREF(__pyx_tuple__554); __pyx_codeobj__555 = (PyObject*)__Pyx_PyCode_New(4, 0, 10, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__554, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pandas_src_generated_pyx, __pyx_n_s_diff_2d_int8, 4896, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__555)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4896; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":4939 * @cython.boundscheck(False) * @cython.wraparound(False) * def diff_2d_int16(ndarray[int16_t, ndim=2] arr, # <<<<<<<<<<<<<< * ndarray[float32_t, ndim=2] out, * Py_ssize_t periods, int axis): */ __pyx_tuple__556 = PyTuple_Pack(10, __pyx_n_s_arr, __pyx_n_s_out, __pyx_n_s_periods, __pyx_n_s_axis, __pyx_n_s_i, __pyx_n_s_j, __pyx_n_s_sx, __pyx_n_s_sy, __pyx_n_s_start, __pyx_n_s_stop); if (unlikely(!__pyx_tuple__556)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4939; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__556); __Pyx_GIVEREF(__pyx_tuple__556); __pyx_codeobj__557 = (PyObject*)__Pyx_PyCode_New(4, 0, 10, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__556, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pandas_src_generated_pyx, __pyx_n_s_diff_2d_int16, 4939, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__557)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4939; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":4982 * @cython.boundscheck(False) * @cython.wraparound(False) * def diff_2d_int32(ndarray[int32_t, ndim=2] arr, # <<<<<<<<<<<<<< * ndarray[float64_t, ndim=2] out, * Py_ssize_t periods, int axis): */ __pyx_tuple__558 = PyTuple_Pack(10, __pyx_n_s_arr, __pyx_n_s_out, __pyx_n_s_periods, __pyx_n_s_axis, __pyx_n_s_i, __pyx_n_s_j, __pyx_n_s_sx, __pyx_n_s_sy, __pyx_n_s_start, __pyx_n_s_stop); if (unlikely(!__pyx_tuple__558)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4982; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__558); __Pyx_GIVEREF(__pyx_tuple__558); __pyx_codeobj__559 = (PyObject*)__Pyx_PyCode_New(4, 0, 10, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__558, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pandas_src_generated_pyx, __pyx_n_s_diff_2d_int32, 4982, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__559)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4982; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":5025 * @cython.boundscheck(False) * @cython.wraparound(False) * def diff_2d_int64(ndarray[int64_t, ndim=2] arr, # <<<<<<<<<<<<<< * ndarray[float64_t, ndim=2] out, * Py_ssize_t periods, int axis): */ __pyx_tuple__560 = PyTuple_Pack(10, __pyx_n_s_arr, __pyx_n_s_out, __pyx_n_s_periods, __pyx_n_s_axis, __pyx_n_s_i, __pyx_n_s_j, __pyx_n_s_sx, __pyx_n_s_sy, __pyx_n_s_start, __pyx_n_s_stop); if (unlikely(!__pyx_tuple__560)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5025; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__560); __Pyx_GIVEREF(__pyx_tuple__560); __pyx_codeobj__561 = (PyObject*)__Pyx_PyCode_New(4, 0, 10, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__560, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pandas_src_generated_pyx, __pyx_n_s_diff_2d_int64, 5025, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__561)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5025; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":5069 * @cython.wraparound(False) * @cython.wraparound(False) * def group_last_float64(ndarray[float64_t, ndim=2] out, # <<<<<<<<<<<<<< * ndarray[int64_t] counts, * ndarray[float64_t, ndim=2] values, */ __pyx_tuple__562 = PyTuple_Pack(13, __pyx_n_s_out, __pyx_n_s_counts, __pyx_n_s_values, __pyx_n_s_labels, __pyx_n_s_i, __pyx_n_s_j, __pyx_n_s_N, __pyx_n_s_K, __pyx_n_s_lab, __pyx_n_s_val, __pyx_n_s_count, __pyx_n_s_resx, __pyx_n_s_nobs); if (unlikely(!__pyx_tuple__562)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5069; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__562); __Pyx_GIVEREF(__pyx_tuple__562); __pyx_codeobj__563 = (PyObject*)__Pyx_PyCode_New(4, 0, 13, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__562, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pandas_src_generated_pyx, __pyx_n_s_group_last_float64, 5069, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__563)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5069; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":5112 * @cython.wraparound(False) * @cython.wraparound(False) * def group_last_float32(ndarray[float32_t, ndim=2] out, # <<<<<<<<<<<<<< * ndarray[int64_t] counts, * ndarray[float32_t, ndim=2] values, */ __pyx_tuple__564 = PyTuple_Pack(13, __pyx_n_s_out, __pyx_n_s_counts, __pyx_n_s_values, __pyx_n_s_labels, __pyx_n_s_i, __pyx_n_s_j, __pyx_n_s_N, __pyx_n_s_K, __pyx_n_s_lab, __pyx_n_s_val, __pyx_n_s_count, __pyx_n_s_resx, __pyx_n_s_nobs); if (unlikely(!__pyx_tuple__564)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5112; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__564); __Pyx_GIVEREF(__pyx_tuple__564); __pyx_codeobj__565 = (PyObject*)__Pyx_PyCode_New(4, 0, 13, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__564, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pandas_src_generated_pyx, __pyx_n_s_group_last_float32, 5112, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__565)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5112; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":5156 * @cython.wraparound(False) * @cython.wraparound(False) * def group_last_bin_float64(ndarray[float64_t, ndim=2] out, # <<<<<<<<<<<<<< * ndarray[int64_t] counts, * ndarray[float64_t, ndim=2] values, */ __pyx_tuple__566 = PyTuple_Pack(14, __pyx_n_s_out, __pyx_n_s_counts, __pyx_n_s_values, __pyx_n_s_bins, __pyx_n_s_i, __pyx_n_s_j, __pyx_n_s_N, __pyx_n_s_K, __pyx_n_s_ngroups, __pyx_n_s_b, __pyx_n_s_val, __pyx_n_s_count, __pyx_n_s_resx, __pyx_n_s_nobs); if (unlikely(!__pyx_tuple__566)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5156; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__566); __Pyx_GIVEREF(__pyx_tuple__566); __pyx_codeobj__567 = (PyObject*)__Pyx_PyCode_New(4, 0, 14, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__566, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pandas_src_generated_pyx, __pyx_n_s_group_last_bin_float64, 5156, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__567)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5156; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":5200 * @cython.wraparound(False) * @cython.wraparound(False) * def group_last_bin_float32(ndarray[float32_t, ndim=2] out, # <<<<<<<<<<<<<< * ndarray[int64_t] counts, * ndarray[float32_t, ndim=2] values, */ __pyx_tuple__568 = PyTuple_Pack(14, __pyx_n_s_out, __pyx_n_s_counts, __pyx_n_s_values, __pyx_n_s_bins, __pyx_n_s_i, __pyx_n_s_j, __pyx_n_s_N, __pyx_n_s_K, __pyx_n_s_ngroups, __pyx_n_s_b, __pyx_n_s_val, __pyx_n_s_count, __pyx_n_s_resx, __pyx_n_s_nobs); if (unlikely(!__pyx_tuple__568)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5200; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__568); __Pyx_GIVEREF(__pyx_tuple__568); __pyx_codeobj__569 = (PyObject*)__Pyx_PyCode_New(4, 0, 14, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__568, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pandas_src_generated_pyx, __pyx_n_s_group_last_bin_float32, 5200, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__569)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5200; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":5245 * @cython.boundscheck(False) * @cython.wraparound(False) * def group_nth_float64(ndarray[float64_t, ndim=2] out, # <<<<<<<<<<<<<< * ndarray[int64_t] counts, * ndarray[float64_t, ndim=2] values, */ __pyx_tuple__570 = PyTuple_Pack(14, __pyx_n_s_out, __pyx_n_s_counts, __pyx_n_s_values, __pyx_n_s_labels, __pyx_n_s_rank, __pyx_n_s_i, __pyx_n_s_j, __pyx_n_s_N, __pyx_n_s_K, __pyx_n_s_lab, __pyx_n_s_val, __pyx_n_s_count, __pyx_n_s_resx, __pyx_n_s_nobs); if (unlikely(!__pyx_tuple__570)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5245; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__570); __Pyx_GIVEREF(__pyx_tuple__570); __pyx_codeobj__571 = (PyObject*)__Pyx_PyCode_New(5, 0, 14, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__570, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pandas_src_generated_pyx, __pyx_n_s_group_nth_float64, 5245, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__571)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5245; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":5289 * @cython.boundscheck(False) * @cython.wraparound(False) * def group_nth_float32(ndarray[float32_t, ndim=2] out, # <<<<<<<<<<<<<< * ndarray[int64_t] counts, * ndarray[float32_t, ndim=2] values, */ __pyx_tuple__572 = PyTuple_Pack(14, __pyx_n_s_out, __pyx_n_s_counts, __pyx_n_s_values, __pyx_n_s_labels, __pyx_n_s_rank, __pyx_n_s_i, __pyx_n_s_j, __pyx_n_s_N, __pyx_n_s_K, __pyx_n_s_lab, __pyx_n_s_val, __pyx_n_s_count, __pyx_n_s_resx, __pyx_n_s_nobs); if (unlikely(!__pyx_tuple__572)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5289; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__572); __Pyx_GIVEREF(__pyx_tuple__572); __pyx_codeobj__573 = (PyObject*)__Pyx_PyCode_New(5, 0, 14, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__572, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pandas_src_generated_pyx, __pyx_n_s_group_nth_float32, 5289, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__573)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5289; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":5334 * @cython.boundscheck(False) * @cython.wraparound(False) * def group_nth_bin_float64(ndarray[float64_t, ndim=2] out, # <<<<<<<<<<<<<< * ndarray[int64_t] counts, * ndarray[float64_t, ndim=2] values, */ __pyx_tuple__574 = PyTuple_Pack(15, __pyx_n_s_out, __pyx_n_s_counts, __pyx_n_s_values, __pyx_n_s_bins, __pyx_n_s_rank, __pyx_n_s_i, __pyx_n_s_j, __pyx_n_s_N, __pyx_n_s_K, __pyx_n_s_ngroups, __pyx_n_s_b, __pyx_n_s_val, __pyx_n_s_count, __pyx_n_s_resx, __pyx_n_s_nobs); if (unlikely(!__pyx_tuple__574)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5334; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__574); __Pyx_GIVEREF(__pyx_tuple__574); __pyx_codeobj__575 = (PyObject*)__Pyx_PyCode_New(5, 0, 15, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__574, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pandas_src_generated_pyx, __pyx_n_s_group_nth_bin_float64, 5334, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__575)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5334; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":5379 * @cython.boundscheck(False) * @cython.wraparound(False) * def group_nth_bin_float32(ndarray[float32_t, ndim=2] out, # <<<<<<<<<<<<<< * ndarray[int64_t] counts, * ndarray[float32_t, ndim=2] values, */ __pyx_tuple__576 = PyTuple_Pack(15, __pyx_n_s_out, __pyx_n_s_counts, __pyx_n_s_values, __pyx_n_s_bins, __pyx_n_s_rank, __pyx_n_s_i, __pyx_n_s_j, __pyx_n_s_N, __pyx_n_s_K, __pyx_n_s_ngroups, __pyx_n_s_b, __pyx_n_s_val, __pyx_n_s_count, __pyx_n_s_resx, __pyx_n_s_nobs); if (unlikely(!__pyx_tuple__576)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5379; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__576); __Pyx_GIVEREF(__pyx_tuple__576); __pyx_codeobj__577 = (PyObject*)__Pyx_PyCode_New(5, 0, 15, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__576, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pandas_src_generated_pyx, __pyx_n_s_group_nth_bin_float32, 5379, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__577)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5379; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":5425 * @cython.boundscheck(False) * @cython.wraparound(False) * def group_add_float64(ndarray[float64_t, ndim=2] out, # <<<<<<<<<<<<<< * ndarray[int64_t] counts, * ndarray[float64_t, ndim=2] values, */ __pyx_tuple__578 = PyTuple_Pack(13, __pyx_n_s_out, __pyx_n_s_counts, __pyx_n_s_values, __pyx_n_s_labels, __pyx_n_s_i, __pyx_n_s_j, __pyx_n_s_N, __pyx_n_s_K, __pyx_n_s_lab, __pyx_n_s_val, __pyx_n_s_count, __pyx_n_s_sumx, __pyx_n_s_nobs); if (unlikely(!__pyx_tuple__578)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5425; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__578); __Pyx_GIVEREF(__pyx_tuple__578); __pyx_codeobj__579 = (PyObject*)__Pyx_PyCode_New(4, 0, 13, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__578, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pandas_src_generated_pyx, __pyx_n_s_group_add_float64, 5425, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__579)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5425; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":5481 * @cython.boundscheck(False) * @cython.wraparound(False) * def group_add_float32(ndarray[float32_t, ndim=2] out, # <<<<<<<<<<<<<< * ndarray[int64_t] counts, * ndarray[float32_t, ndim=2] values, */ __pyx_tuple__580 = PyTuple_Pack(13, __pyx_n_s_out, __pyx_n_s_counts, __pyx_n_s_values, __pyx_n_s_labels, __pyx_n_s_i, __pyx_n_s_j, __pyx_n_s_N, __pyx_n_s_K, __pyx_n_s_lab, __pyx_n_s_val, __pyx_n_s_count, __pyx_n_s_sumx, __pyx_n_s_nobs); if (unlikely(!__pyx_tuple__580)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5481; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__580); __Pyx_GIVEREF(__pyx_tuple__580); __pyx_codeobj__581 = (PyObject*)__Pyx_PyCode_New(4, 0, 13, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__580, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pandas_src_generated_pyx, __pyx_n_s_group_add_float32, 5481, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__581)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5481; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":5538 * @cython.boundscheck(False) * @cython.wraparound(False) * def group_add_bin_float64(ndarray[float64_t, ndim=2] out, # <<<<<<<<<<<<<< * ndarray[int64_t] counts, * ndarray[float64_t, ndim=2] values, */ __pyx_tuple__582 = PyTuple_Pack(15, __pyx_n_s_out, __pyx_n_s_counts, __pyx_n_s_values, __pyx_n_s_bins, __pyx_n_s_i, __pyx_n_s_j, __pyx_n_s_N, __pyx_n_s_K, __pyx_n_s_ngroups, __pyx_n_s_b, __pyx_n_s_nbins, __pyx_n_s_val, __pyx_n_s_count, __pyx_n_s_sumx, __pyx_n_s_nobs); if (unlikely(!__pyx_tuple__582)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5538; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__582); __Pyx_GIVEREF(__pyx_tuple__582); __pyx_codeobj__583 = (PyObject*)__Pyx_PyCode_New(4, 0, 15, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__582, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pandas_src_generated_pyx, __pyx_n_s_group_add_bin_float64, 5538, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__583)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5538; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":5594 * @cython.boundscheck(False) * @cython.wraparound(False) * def group_add_bin_float32(ndarray[float32_t, ndim=2] out, # <<<<<<<<<<<<<< * ndarray[int64_t] counts, * ndarray[float32_t, ndim=2] values, */ __pyx_tuple__584 = PyTuple_Pack(15, __pyx_n_s_out, __pyx_n_s_counts, __pyx_n_s_values, __pyx_n_s_bins, __pyx_n_s_i, __pyx_n_s_j, __pyx_n_s_N, __pyx_n_s_K, __pyx_n_s_ngroups, __pyx_n_s_b, __pyx_n_s_nbins, __pyx_n_s_val, __pyx_n_s_count, __pyx_n_s_sumx, __pyx_n_s_nobs); if (unlikely(!__pyx_tuple__584)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5594; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__584); __Pyx_GIVEREF(__pyx_tuple__584); __pyx_codeobj__585 = (PyObject*)__Pyx_PyCode_New(4, 0, 15, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__584, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pandas_src_generated_pyx, __pyx_n_s_group_add_bin_float32, 5594, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__585)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5594; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":5651 * @cython.boundscheck(False) * @cython.wraparound(False) * def group_prod_float64(ndarray[float64_t, ndim=2] out, # <<<<<<<<<<<<<< * ndarray[int64_t] counts, * ndarray[float64_t, ndim=2] values, */ __pyx_tuple__586 = PyTuple_Pack(13, __pyx_n_s_out, __pyx_n_s_counts, __pyx_n_s_values, __pyx_n_s_labels, __pyx_n_s_i, __pyx_n_s_j, __pyx_n_s_N, __pyx_n_s_K, __pyx_n_s_lab, __pyx_n_s_val, __pyx_n_s_count, __pyx_n_s_prodx, __pyx_n_s_nobs); if (unlikely(!__pyx_tuple__586)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5651; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__586); __Pyx_GIVEREF(__pyx_tuple__586); __pyx_codeobj__587 = (PyObject*)__Pyx_PyCode_New(4, 0, 13, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__586, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pandas_src_generated_pyx, __pyx_n_s_group_prod_float64, 5651, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__587)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5651; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":5707 * @cython.boundscheck(False) * @cython.wraparound(False) * def group_prod_float32(ndarray[float32_t, ndim=2] out, # <<<<<<<<<<<<<< * ndarray[int64_t] counts, * ndarray[float32_t, ndim=2] values, */ __pyx_tuple__588 = PyTuple_Pack(13, __pyx_n_s_out, __pyx_n_s_counts, __pyx_n_s_values, __pyx_n_s_labels, __pyx_n_s_i, __pyx_n_s_j, __pyx_n_s_N, __pyx_n_s_K, __pyx_n_s_lab, __pyx_n_s_val, __pyx_n_s_count, __pyx_n_s_prodx, __pyx_n_s_nobs); if (unlikely(!__pyx_tuple__588)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5707; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__588); __Pyx_GIVEREF(__pyx_tuple__588); __pyx_codeobj__589 = (PyObject*)__Pyx_PyCode_New(4, 0, 13, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__588, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pandas_src_generated_pyx, __pyx_n_s_group_prod_float32, 5707, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__589)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5707; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":5764 * @cython.boundscheck(False) * @cython.wraparound(False) * def group_prod_bin_float64(ndarray[float64_t, ndim=2] out, # <<<<<<<<<<<<<< * ndarray[int64_t] counts, * ndarray[float64_t, ndim=2] values, */ __pyx_tuple__590 = PyTuple_Pack(14, __pyx_n_s_out, __pyx_n_s_counts, __pyx_n_s_values, __pyx_n_s_bins, __pyx_n_s_i, __pyx_n_s_j, __pyx_n_s_N, __pyx_n_s_K, __pyx_n_s_ngroups, __pyx_n_s_b, __pyx_n_s_val, __pyx_n_s_count, __pyx_n_s_prodx, __pyx_n_s_nobs); if (unlikely(!__pyx_tuple__590)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5764; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__590); __Pyx_GIVEREF(__pyx_tuple__590); __pyx_codeobj__591 = (PyObject*)__Pyx_PyCode_New(4, 0, 14, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__590, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pandas_src_generated_pyx, __pyx_n_s_group_prod_bin_float64, 5764, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__591)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5764; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":5820 * @cython.boundscheck(False) * @cython.wraparound(False) * def group_prod_bin_float32(ndarray[float32_t, ndim=2] out, # <<<<<<<<<<<<<< * ndarray[int64_t] counts, * ndarray[float32_t, ndim=2] values, */ __pyx_tuple__592 = PyTuple_Pack(14, __pyx_n_s_out, __pyx_n_s_counts, __pyx_n_s_values, __pyx_n_s_bins, __pyx_n_s_i, __pyx_n_s_j, __pyx_n_s_N, __pyx_n_s_K, __pyx_n_s_ngroups, __pyx_n_s_b, __pyx_n_s_val, __pyx_n_s_count, __pyx_n_s_prodx, __pyx_n_s_nobs); if (unlikely(!__pyx_tuple__592)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5820; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__592); __Pyx_GIVEREF(__pyx_tuple__592); __pyx_codeobj__593 = (PyObject*)__Pyx_PyCode_New(4, 0, 14, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__592, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pandas_src_generated_pyx, __pyx_n_s_group_prod_bin_float32, 5820, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__593)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5820; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":5877 * @cython.wraparound(False) * @cython.boundscheck(False) * def group_var_float64(ndarray[float64_t, ndim=2] out, # <<<<<<<<<<<<<< * ndarray[int64_t] counts, * ndarray[float64_t, ndim=2] values, */ __pyx_tuple__594 = PyTuple_Pack(14, __pyx_n_s_out, __pyx_n_s_counts, __pyx_n_s_values, __pyx_n_s_labels, __pyx_n_s_i, __pyx_n_s_j, __pyx_n_s_N, __pyx_n_s_K, __pyx_n_s_lab, __pyx_n_s_val, __pyx_n_s_ct, __pyx_n_s_nobs, __pyx_n_s_sumx, __pyx_n_s_sumxx); if (unlikely(!__pyx_tuple__594)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5877; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__594); __Pyx_GIVEREF(__pyx_tuple__594); __pyx_codeobj__595 = (PyObject*)__Pyx_PyCode_New(4, 0, 14, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__594, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pandas_src_generated_pyx, __pyx_n_s_group_var_float64, 5877, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__595)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5877; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":5938 * @cython.wraparound(False) * @cython.boundscheck(False) * def group_var_float32(ndarray[float32_t, ndim=2] out, # <<<<<<<<<<<<<< * ndarray[int64_t] counts, * ndarray[float32_t, ndim=2] values, */ __pyx_tuple__596 = PyTuple_Pack(14, __pyx_n_s_out, __pyx_n_s_counts, __pyx_n_s_values, __pyx_n_s_labels, __pyx_n_s_i, __pyx_n_s_j, __pyx_n_s_N, __pyx_n_s_K, __pyx_n_s_lab, __pyx_n_s_val, __pyx_n_s_ct, __pyx_n_s_nobs, __pyx_n_s_sumx, __pyx_n_s_sumxx); if (unlikely(!__pyx_tuple__596)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5938; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__596); __Pyx_GIVEREF(__pyx_tuple__596); __pyx_codeobj__597 = (PyObject*)__Pyx_PyCode_New(4, 0, 14, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__596, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pandas_src_generated_pyx, __pyx_n_s_group_var_float32, 5938, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__597)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5938; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":6000 * @cython.wraparound(False) * @cython.boundscheck(False) * def group_var_bin_float64(ndarray[float64_t, ndim=2] out, # <<<<<<<<<<<<<< * ndarray[int64_t] counts, * ndarray[float64_t, ndim=2] values, */ __pyx_tuple__598 = PyTuple_Pack(15, __pyx_n_s_out, __pyx_n_s_counts, __pyx_n_s_values, __pyx_n_s_bins, __pyx_n_s_i, __pyx_n_s_j, __pyx_n_s_N, __pyx_n_s_K, __pyx_n_s_ngroups, __pyx_n_s_b, __pyx_n_s_val, __pyx_n_s_ct, __pyx_n_s_nobs, __pyx_n_s_sumx, __pyx_n_s_sumxx); if (unlikely(!__pyx_tuple__598)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6000; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__598); __Pyx_GIVEREF(__pyx_tuple__598); __pyx_codeobj__599 = (PyObject*)__Pyx_PyCode_New(4, 0, 15, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__598, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pandas_src_generated_pyx, __pyx_n_s_group_var_bin_float64, 6000, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__599)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6000; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":6061 * @cython.wraparound(False) * @cython.boundscheck(False) * def group_var_bin_float32(ndarray[float32_t, ndim=2] out, # <<<<<<<<<<<<<< * ndarray[int64_t] counts, * ndarray[float32_t, ndim=2] values, */ __pyx_tuple__600 = PyTuple_Pack(15, __pyx_n_s_out, __pyx_n_s_counts, __pyx_n_s_values, __pyx_n_s_bins, __pyx_n_s_i, __pyx_n_s_j, __pyx_n_s_N, __pyx_n_s_K, __pyx_n_s_ngroups, __pyx_n_s_b, __pyx_n_s_val, __pyx_n_s_ct, __pyx_n_s_nobs, __pyx_n_s_sumx, __pyx_n_s_sumxx); if (unlikely(!__pyx_tuple__600)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6061; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__600); __Pyx_GIVEREF(__pyx_tuple__600); __pyx_codeobj__601 = (PyObject*)__Pyx_PyCode_New(4, 0, 15, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__600, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pandas_src_generated_pyx, __pyx_n_s_group_var_bin_float32, 6061, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__601)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6061; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":6123 * @cython.wraparound(False) * @cython.boundscheck(False) * def group_mean_float64(ndarray[float64_t, ndim=2] out, # <<<<<<<<<<<<<< * ndarray[int64_t] counts, * ndarray[float64_t, ndim=2] values, */ __pyx_tuple__602 = PyTuple_Pack(13, __pyx_n_s_out, __pyx_n_s_counts, __pyx_n_s_values, __pyx_n_s_labels, __pyx_n_s_i, __pyx_n_s_j, __pyx_n_s_N, __pyx_n_s_K, __pyx_n_s_lab, __pyx_n_s_val, __pyx_n_s_count, __pyx_n_s_sumx, __pyx_n_s_nobs); if (unlikely(!__pyx_tuple__602)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6123; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__602); __Pyx_GIVEREF(__pyx_tuple__602); __pyx_codeobj__603 = (PyObject*)__Pyx_PyCode_New(4, 0, 13, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__602, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pandas_src_generated_pyx, __pyx_n_s_group_mean_float64, 6123, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__603)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6123; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":6175 * @cython.wraparound(False) * @cython.boundscheck(False) * def group_mean_float32(ndarray[float32_t, ndim=2] out, # <<<<<<<<<<<<<< * ndarray[int64_t] counts, * ndarray[float32_t, ndim=2] values, */ __pyx_tuple__604 = PyTuple_Pack(13, __pyx_n_s_out, __pyx_n_s_counts, __pyx_n_s_values, __pyx_n_s_labels, __pyx_n_s_i, __pyx_n_s_j, __pyx_n_s_N, __pyx_n_s_K, __pyx_n_s_lab, __pyx_n_s_val, __pyx_n_s_count, __pyx_n_s_sumx, __pyx_n_s_nobs); if (unlikely(!__pyx_tuple__604)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6175; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__604); __Pyx_GIVEREF(__pyx_tuple__604); __pyx_codeobj__605 = (PyObject*)__Pyx_PyCode_New(4, 0, 13, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__604, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pandas_src_generated_pyx, __pyx_n_s_group_mean_float32, 6175, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__605)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6175; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":6227 * * * def group_mean_bin_float64(ndarray[float64_t, ndim=2] out, # <<<<<<<<<<<<<< * ndarray[int64_t] counts, * ndarray[float64_t, ndim=2] values, */ __pyx_tuple__606 = PyTuple_Pack(14, __pyx_n_s_out, __pyx_n_s_counts, __pyx_n_s_values, __pyx_n_s_bins, __pyx_n_s_i, __pyx_n_s_j, __pyx_n_s_N, __pyx_n_s_K, __pyx_n_s_ngroups, __pyx_n_s_b, __pyx_n_s_val, __pyx_n_s_count, __pyx_n_s_sumx, __pyx_n_s_nobs); if (unlikely(!__pyx_tuple__606)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6227; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__606); __Pyx_GIVEREF(__pyx_tuple__606); __pyx_codeobj__607 = (PyObject*)__Pyx_PyCode_New(4, 0, 14, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__606, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pandas_src_generated_pyx, __pyx_n_s_group_mean_bin_float64, 6227, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__607)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6227; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":6280 * out[i, j] = sumx[i, j] / count * * def group_mean_bin_float32(ndarray[float32_t, ndim=2] out, # <<<<<<<<<<<<<< * ndarray[int64_t] counts, * ndarray[float32_t, ndim=2] values, */ __pyx_tuple__608 = PyTuple_Pack(14, __pyx_n_s_out, __pyx_n_s_counts, __pyx_n_s_values, __pyx_n_s_bins, __pyx_n_s_i, __pyx_n_s_j, __pyx_n_s_N, __pyx_n_s_K, __pyx_n_s_ngroups, __pyx_n_s_b, __pyx_n_s_val, __pyx_n_s_count, __pyx_n_s_sumx, __pyx_n_s_nobs); if (unlikely(!__pyx_tuple__608)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6280; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__608); __Pyx_GIVEREF(__pyx_tuple__608); __pyx_codeobj__609 = (PyObject*)__Pyx_PyCode_New(4, 0, 14, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__608, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pandas_src_generated_pyx, __pyx_n_s_group_mean_bin_float32, 6280, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__609)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6280; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":6335 * @cython.wraparound(False) * @cython.boundscheck(False) * def group_min_float64(ndarray[float64_t, ndim=2] out, # <<<<<<<<<<<<<< * ndarray[int64_t] counts, * ndarray[float64_t, ndim=2] values, */ __pyx_tuple__610 = PyTuple_Pack(13, __pyx_n_s_out, __pyx_n_s_counts, __pyx_n_s_values, __pyx_n_s_labels, __pyx_n_s_i, __pyx_n_s_j, __pyx_n_s_N, __pyx_n_s_K, __pyx_n_s_lab, __pyx_n_s_val, __pyx_n_s_count, __pyx_n_s_minx, __pyx_n_s_nobs); if (unlikely(!__pyx_tuple__610)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6335; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__610); __Pyx_GIVEREF(__pyx_tuple__610); __pyx_codeobj__611 = (PyObject*)__Pyx_PyCode_New(4, 0, 13, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__610, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pandas_src_generated_pyx, __pyx_n_s_group_min_float64, 6335, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__611)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6335; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":6395 * @cython.wraparound(False) * @cython.boundscheck(False) * def group_min_float32(ndarray[float32_t, ndim=2] out, # <<<<<<<<<<<<<< * ndarray[int64_t] counts, * ndarray[float32_t, ndim=2] values, */ __pyx_tuple__612 = PyTuple_Pack(13, __pyx_n_s_out, __pyx_n_s_counts, __pyx_n_s_values, __pyx_n_s_labels, __pyx_n_s_i, __pyx_n_s_j, __pyx_n_s_N, __pyx_n_s_K, __pyx_n_s_lab, __pyx_n_s_val, __pyx_n_s_count, __pyx_n_s_minx, __pyx_n_s_nobs); if (unlikely(!__pyx_tuple__612)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6395; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__612); __Pyx_GIVEREF(__pyx_tuple__612); __pyx_codeobj__613 = (PyObject*)__Pyx_PyCode_New(4, 0, 13, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__612, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pandas_src_generated_pyx, __pyx_n_s_group_min_float32, 6395, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__613)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6395; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":6456 * @cython.wraparound(False) * @cython.boundscheck(False) * def group_min_bin_float64(ndarray[float64_t, ndim=2] out, # <<<<<<<<<<<<<< * ndarray[int64_t] counts, * ndarray[float64_t, ndim=2] values, */ __pyx_tuple__614 = PyTuple_Pack(14, __pyx_n_s_out, __pyx_n_s_counts, __pyx_n_s_values, __pyx_n_s_bins, __pyx_n_s_i, __pyx_n_s_j, __pyx_n_s_N, __pyx_n_s_K, __pyx_n_s_ngroups, __pyx_n_s_b, __pyx_n_s_val, __pyx_n_s_count, __pyx_n_s_minx, __pyx_n_s_nobs); if (unlikely(!__pyx_tuple__614)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6456; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__614); __Pyx_GIVEREF(__pyx_tuple__614); __pyx_codeobj__615 = (PyObject*)__Pyx_PyCode_New(4, 0, 14, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__614, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pandas_src_generated_pyx, __pyx_n_s_group_min_bin_float64, 6456, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__615)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6456; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":6517 * @cython.wraparound(False) * @cython.boundscheck(False) * def group_min_bin_float32(ndarray[float32_t, ndim=2] out, # <<<<<<<<<<<<<< * ndarray[int64_t] counts, * ndarray[float32_t, ndim=2] values, */ __pyx_tuple__616 = PyTuple_Pack(14, __pyx_n_s_out, __pyx_n_s_counts, __pyx_n_s_values, __pyx_n_s_bins, __pyx_n_s_i, __pyx_n_s_j, __pyx_n_s_N, __pyx_n_s_K, __pyx_n_s_ngroups, __pyx_n_s_b, __pyx_n_s_val, __pyx_n_s_count, __pyx_n_s_minx, __pyx_n_s_nobs); if (unlikely(!__pyx_tuple__616)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6517; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__616); __Pyx_GIVEREF(__pyx_tuple__616); __pyx_codeobj__617 = (PyObject*)__Pyx_PyCode_New(4, 0, 14, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__616, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pandas_src_generated_pyx, __pyx_n_s_group_min_bin_float32, 6517, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__617)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6517; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":6579 * @cython.wraparound(False) * @cython.boundscheck(False) * def group_max_float64(ndarray[float64_t, ndim=2] out, # <<<<<<<<<<<<<< * ndarray[int64_t] counts, * ndarray[float64_t, ndim=2] values, */ __pyx_tuple__618 = PyTuple_Pack(13, __pyx_n_s_out, __pyx_n_s_counts, __pyx_n_s_values, __pyx_n_s_labels, __pyx_n_s_i, __pyx_n_s_j, __pyx_n_s_N, __pyx_n_s_K, __pyx_n_s_lab, __pyx_n_s_val, __pyx_n_s_count, __pyx_n_s_maxx, __pyx_n_s_nobs); if (unlikely(!__pyx_tuple__618)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6579; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__618); __Pyx_GIVEREF(__pyx_tuple__618); __pyx_codeobj__619 = (PyObject*)__Pyx_PyCode_New(4, 0, 13, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__618, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pandas_src_generated_pyx, __pyx_n_s_group_max_float64, 6579, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__619)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6579; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":6639 * @cython.wraparound(False) * @cython.boundscheck(False) * def group_max_float32(ndarray[float32_t, ndim=2] out, # <<<<<<<<<<<<<< * ndarray[int64_t] counts, * ndarray[float32_t, ndim=2] values, */ __pyx_tuple__620 = PyTuple_Pack(13, __pyx_n_s_out, __pyx_n_s_counts, __pyx_n_s_values, __pyx_n_s_labels, __pyx_n_s_i, __pyx_n_s_j, __pyx_n_s_N, __pyx_n_s_K, __pyx_n_s_lab, __pyx_n_s_val, __pyx_n_s_count, __pyx_n_s_maxx, __pyx_n_s_nobs); if (unlikely(!__pyx_tuple__620)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6639; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__620); __Pyx_GIVEREF(__pyx_tuple__620); __pyx_codeobj__621 = (PyObject*)__Pyx_PyCode_New(4, 0, 13, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__620, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pandas_src_generated_pyx, __pyx_n_s_group_max_float32, 6639, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__621)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6639; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":6700 * @cython.wraparound(False) * @cython.boundscheck(False) * def group_max_bin_float64(ndarray[float64_t, ndim=2] out, # <<<<<<<<<<<<<< * ndarray[int64_t] counts, * ndarray[float64_t, ndim=2] values, */ __pyx_tuple__622 = PyTuple_Pack(14, __pyx_n_s_out, __pyx_n_s_counts, __pyx_n_s_values, __pyx_n_s_bins, __pyx_n_s_i, __pyx_n_s_j, __pyx_n_s_N, __pyx_n_s_K, __pyx_n_s_ngroups, __pyx_n_s_b, __pyx_n_s_val, __pyx_n_s_count, __pyx_n_s_maxx, __pyx_n_s_nobs); if (unlikely(!__pyx_tuple__622)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6700; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__622); __Pyx_GIVEREF(__pyx_tuple__622); __pyx_codeobj__623 = (PyObject*)__Pyx_PyCode_New(4, 0, 14, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__622, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pandas_src_generated_pyx, __pyx_n_s_group_max_bin_float64, 6700, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__623)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6700; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":6760 * @cython.wraparound(False) * @cython.boundscheck(False) * def group_max_bin_float32(ndarray[float32_t, ndim=2] out, # <<<<<<<<<<<<<< * ndarray[int64_t] counts, * ndarray[float32_t, ndim=2] values, */ __pyx_tuple__624 = PyTuple_Pack(14, __pyx_n_s_out, __pyx_n_s_counts, __pyx_n_s_values, __pyx_n_s_bins, __pyx_n_s_i, __pyx_n_s_j, __pyx_n_s_N, __pyx_n_s_K, __pyx_n_s_ngroups, __pyx_n_s_b, __pyx_n_s_val, __pyx_n_s_count, __pyx_n_s_maxx, __pyx_n_s_nobs); if (unlikely(!__pyx_tuple__624)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6760; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__624); __Pyx_GIVEREF(__pyx_tuple__624); __pyx_codeobj__625 = (PyObject*)__Pyx_PyCode_New(4, 0, 14, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__624, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pandas_src_generated_pyx, __pyx_n_s_group_max_bin_float32, 6760, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__625)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6760; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":6821 * @cython.wraparound(False) * @cython.boundscheck(False) * def group_ohlc_float64(ndarray[float64_t, ndim=2] out, # <<<<<<<<<<<<<< * ndarray[int64_t] counts, * ndarray[float64_t, ndim=2] values, */ __pyx_tuple__626 = PyTuple_Pack(18, __pyx_n_s_out, __pyx_n_s_counts, __pyx_n_s_values, __pyx_n_s_bins, __pyx_n_s_i, __pyx_n_s_j, __pyx_n_s_N, __pyx_n_s_K, __pyx_n_s_ngroups, __pyx_n_s_b, __pyx_n_s_val, __pyx_n_s_count, __pyx_n_s_vopen, __pyx_n_s_vhigh, __pyx_n_s_vlow, __pyx_n_s_vclose, __pyx_n_s_NA, __pyx_n_s_got_first); if (unlikely(!__pyx_tuple__626)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6821; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__626); __Pyx_GIVEREF(__pyx_tuple__626); __pyx_codeobj__627 = (PyObject*)__Pyx_PyCode_New(4, 0, 18, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__626, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pandas_src_generated_pyx, __pyx_n_s_group_ohlc_float64, 6821, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__627)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6821; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":6894 * @cython.wraparound(False) * @cython.boundscheck(False) * def group_ohlc_float32(ndarray[float32_t, ndim=2] out, # <<<<<<<<<<<<<< * ndarray[int64_t] counts, * ndarray[float32_t, ndim=2] values, */ __pyx_tuple__628 = PyTuple_Pack(18, __pyx_n_s_out, __pyx_n_s_counts, __pyx_n_s_values, __pyx_n_s_bins, __pyx_n_s_i, __pyx_n_s_j, __pyx_n_s_N, __pyx_n_s_K, __pyx_n_s_ngroups, __pyx_n_s_b, __pyx_n_s_val, __pyx_n_s_count, __pyx_n_s_vopen, __pyx_n_s_vhigh, __pyx_n_s_vlow, __pyx_n_s_vclose, __pyx_n_s_NA, __pyx_n_s_got_first); if (unlikely(!__pyx_tuple__628)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6894; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__628); __Pyx_GIVEREF(__pyx_tuple__628); __pyx_codeobj__629 = (PyObject*)__Pyx_PyCode_New(4, 0, 18, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__628, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pandas_src_generated_pyx, __pyx_n_s_group_ohlc_float32, 6894, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__629)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6894; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":6968 * @cython.wraparound(False) * @cython.boundscheck(False) * def left_join_indexer_unique_float64(ndarray[float64_t] left, # <<<<<<<<<<<<<< * ndarray[float64_t] right): * cdef: */ __pyx_tuple__630 = PyTuple_Pack(9, __pyx_n_s_left, __pyx_n_s_right, __pyx_n_s_i, __pyx_n_s_j, __pyx_n_s_nleft, __pyx_n_s_nright, __pyx_n_s_indexer, __pyx_n_s_lval, __pyx_n_s_rval); if (unlikely(!__pyx_tuple__630)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6968; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__630); __Pyx_GIVEREF(__pyx_tuple__630); __pyx_codeobj__631 = (PyObject*)__Pyx_PyCode_New(2, 0, 9, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__630, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pandas_src_generated_pyx, __pyx_n_s_left_join_indexer_unique_float64, 6968, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__631)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6968; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":7013 * @cython.wraparound(False) * @cython.boundscheck(False) * def left_join_indexer_unique_float32(ndarray[float32_t] left, # <<<<<<<<<<<<<< * ndarray[float32_t] right): * cdef: */ __pyx_tuple__632 = PyTuple_Pack(9, __pyx_n_s_left, __pyx_n_s_right, __pyx_n_s_i, __pyx_n_s_j, __pyx_n_s_nleft, __pyx_n_s_nright, __pyx_n_s_indexer, __pyx_n_s_lval, __pyx_n_s_rval); if (unlikely(!__pyx_tuple__632)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7013; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__632); __Pyx_GIVEREF(__pyx_tuple__632); __pyx_codeobj__633 = (PyObject*)__Pyx_PyCode_New(2, 0, 9, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__632, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pandas_src_generated_pyx, __pyx_n_s_left_join_indexer_unique_float32, 7013, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__633)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7013; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":7058 * @cython.wraparound(False) * @cython.boundscheck(False) * def left_join_indexer_unique_object(ndarray[object] left, # <<<<<<<<<<<<<< * ndarray[object] right): * cdef: */ __pyx_tuple__634 = PyTuple_Pack(9, __pyx_n_s_left, __pyx_n_s_right, __pyx_n_s_i, __pyx_n_s_j, __pyx_n_s_nleft, __pyx_n_s_nright, __pyx_n_s_indexer, __pyx_n_s_lval, __pyx_n_s_rval); if (unlikely(!__pyx_tuple__634)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7058; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__634); __Pyx_GIVEREF(__pyx_tuple__634); __pyx_codeobj__635 = (PyObject*)__Pyx_PyCode_New(2, 0, 9, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__634, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pandas_src_generated_pyx, __pyx_n_s_left_join_indexer_unique_object, 7058, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__635)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7058; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":7103 * @cython.wraparound(False) * @cython.boundscheck(False) * def left_join_indexer_unique_int32(ndarray[int32_t] left, # <<<<<<<<<<<<<< * ndarray[int32_t] right): * cdef: */ __pyx_tuple__636 = PyTuple_Pack(9, __pyx_n_s_left, __pyx_n_s_right, __pyx_n_s_i, __pyx_n_s_j, __pyx_n_s_nleft, __pyx_n_s_nright, __pyx_n_s_indexer, __pyx_n_s_lval, __pyx_n_s_rval); if (unlikely(!__pyx_tuple__636)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7103; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__636); __Pyx_GIVEREF(__pyx_tuple__636); __pyx_codeobj__637 = (PyObject*)__Pyx_PyCode_New(2, 0, 9, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__636, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pandas_src_generated_pyx, __pyx_n_s_left_join_indexer_unique_int32, 7103, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__637)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7103; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":7148 * @cython.wraparound(False) * @cython.boundscheck(False) * def left_join_indexer_unique_int64(ndarray[int64_t] left, # <<<<<<<<<<<<<< * ndarray[int64_t] right): * cdef: */ __pyx_tuple__638 = PyTuple_Pack(9, __pyx_n_s_left, __pyx_n_s_right, __pyx_n_s_i, __pyx_n_s_j, __pyx_n_s_nleft, __pyx_n_s_nright, __pyx_n_s_indexer, __pyx_n_s_lval, __pyx_n_s_rval); if (unlikely(!__pyx_tuple__638)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7148; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__638); __Pyx_GIVEREF(__pyx_tuple__638); __pyx_codeobj__639 = (PyObject*)__Pyx_PyCode_New(2, 0, 9, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__638, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pandas_src_generated_pyx, __pyx_n_s_left_join_indexer_unique_int64, 7148, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__639)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7148; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":7193 * * * def left_join_indexer_float64(ndarray[float64_t] left, # <<<<<<<<<<<<<< * ndarray[float64_t] right): * ''' */ __pyx_tuple__640 = PyTuple_Pack(13, __pyx_n_s_left, __pyx_n_s_right, __pyx_n_s_i, __pyx_n_s_j, __pyx_n_s_k, __pyx_n_s_nright, __pyx_n_s_nleft, __pyx_n_s_count, __pyx_n_s_lval, __pyx_n_s_rval, __pyx_n_s_lindexer, __pyx_n_s_rindexer, __pyx_n_s_result); if (unlikely(!__pyx_tuple__640)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7193; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__640); __Pyx_GIVEREF(__pyx_tuple__640); __pyx_codeobj__641 = (PyObject*)__Pyx_PyCode_New(2, 0, 13, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__640, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pandas_src_generated_pyx, __pyx_n_s_left_join_indexer_float64, 7193, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__641)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7193; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":7295 * * * def left_join_indexer_float32(ndarray[float32_t] left, # <<<<<<<<<<<<<< * ndarray[float32_t] right): * ''' */ __pyx_tuple__642 = PyTuple_Pack(13, __pyx_n_s_left, __pyx_n_s_right, __pyx_n_s_i, __pyx_n_s_j, __pyx_n_s_k, __pyx_n_s_nright, __pyx_n_s_nleft, __pyx_n_s_count, __pyx_n_s_lval, __pyx_n_s_rval, __pyx_n_s_lindexer, __pyx_n_s_rindexer, __pyx_n_s_result); if (unlikely(!__pyx_tuple__642)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7295; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__642); __Pyx_GIVEREF(__pyx_tuple__642); __pyx_codeobj__643 = (PyObject*)__Pyx_PyCode_New(2, 0, 13, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__642, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pandas_src_generated_pyx, __pyx_n_s_left_join_indexer_float32, 7295, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__643)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7295; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":7397 * * * def left_join_indexer_object(ndarray[object] left, # <<<<<<<<<<<<<< * ndarray[object] right): * ''' */ __pyx_tuple__644 = PyTuple_Pack(13, __pyx_n_s_left, __pyx_n_s_right, __pyx_n_s_i, __pyx_n_s_j, __pyx_n_s_k, __pyx_n_s_nright, __pyx_n_s_nleft, __pyx_n_s_count, __pyx_n_s_lval, __pyx_n_s_rval, __pyx_n_s_lindexer, __pyx_n_s_rindexer, __pyx_n_s_result); if (unlikely(!__pyx_tuple__644)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7397; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__644); __Pyx_GIVEREF(__pyx_tuple__644); __pyx_codeobj__645 = (PyObject*)__Pyx_PyCode_New(2, 0, 13, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__644, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pandas_src_generated_pyx, __pyx_n_s_left_join_indexer_object, 7397, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__645)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7397; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":7499 * * * def left_join_indexer_int32(ndarray[int32_t] left, # <<<<<<<<<<<<<< * ndarray[int32_t] right): * ''' */ __pyx_tuple__646 = PyTuple_Pack(13, __pyx_n_s_left, __pyx_n_s_right, __pyx_n_s_i, __pyx_n_s_j, __pyx_n_s_k, __pyx_n_s_nright, __pyx_n_s_nleft, __pyx_n_s_count, __pyx_n_s_lval, __pyx_n_s_rval, __pyx_n_s_lindexer, __pyx_n_s_rindexer, __pyx_n_s_result); if (unlikely(!__pyx_tuple__646)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7499; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__646); __Pyx_GIVEREF(__pyx_tuple__646); __pyx_codeobj__647 = (PyObject*)__Pyx_PyCode_New(2, 0, 13, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__646, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pandas_src_generated_pyx, __pyx_n_s_left_join_indexer_int32, 7499, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__647)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7499; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":7601 * * * def left_join_indexer_int64(ndarray[int64_t] left, # <<<<<<<<<<<<<< * ndarray[int64_t] right): * ''' */ __pyx_tuple__648 = PyTuple_Pack(13, __pyx_n_s_left, __pyx_n_s_right, __pyx_n_s_i, __pyx_n_s_j, __pyx_n_s_k, __pyx_n_s_nright, __pyx_n_s_nleft, __pyx_n_s_count, __pyx_n_s_lval, __pyx_n_s_rval, __pyx_n_s_lindexer, __pyx_n_s_rindexer, __pyx_n_s_result); if (unlikely(!__pyx_tuple__648)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7601; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__648); __Pyx_GIVEREF(__pyx_tuple__648); __pyx_codeobj__649 = (PyObject*)__Pyx_PyCode_New(2, 0, 13, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__648, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pandas_src_generated_pyx, __pyx_n_s_left_join_indexer_int64, 7601, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__649)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7601; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":7705 * @cython.wraparound(False) * @cython.boundscheck(False) * def outer_join_indexer_float64(ndarray[float64_t] left, # <<<<<<<<<<<<<< * ndarray[float64_t] right): * cdef: */ __pyx_tuple__650 = PyTuple_Pack(12, __pyx_n_s_left, __pyx_n_s_right, __pyx_n_s_i, __pyx_n_s_j, __pyx_n_s_nright, __pyx_n_s_nleft, __pyx_n_s_count, __pyx_n_s_lval, __pyx_n_s_rval, __pyx_n_s_lindexer, __pyx_n_s_rindexer, __pyx_n_s_result); if (unlikely(!__pyx_tuple__650)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7705; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__650); __Pyx_GIVEREF(__pyx_tuple__650); __pyx_codeobj__651 = (PyObject*)__Pyx_PyCode_New(2, 0, 12, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__650, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pandas_src_generated_pyx, __pyx_n_s_outer_join_indexer_float64, 7705, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__651)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7705; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":7834 * @cython.wraparound(False) * @cython.boundscheck(False) * def outer_join_indexer_float32(ndarray[float32_t] left, # <<<<<<<<<<<<<< * ndarray[float32_t] right): * cdef: */ __pyx_tuple__652 = PyTuple_Pack(12, __pyx_n_s_left, __pyx_n_s_right, __pyx_n_s_i, __pyx_n_s_j, __pyx_n_s_nright, __pyx_n_s_nleft, __pyx_n_s_count, __pyx_n_s_lval, __pyx_n_s_rval, __pyx_n_s_lindexer, __pyx_n_s_rindexer, __pyx_n_s_result); if (unlikely(!__pyx_tuple__652)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7834; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__652); __Pyx_GIVEREF(__pyx_tuple__652); __pyx_codeobj__653 = (PyObject*)__Pyx_PyCode_New(2, 0, 12, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__652, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pandas_src_generated_pyx, __pyx_n_s_outer_join_indexer_float32, 7834, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__653)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7834; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":7963 * @cython.wraparound(False) * @cython.boundscheck(False) * def outer_join_indexer_object(ndarray[object] left, # <<<<<<<<<<<<<< * ndarray[object] right): * cdef: */ __pyx_tuple__654 = PyTuple_Pack(12, __pyx_n_s_left, __pyx_n_s_right, __pyx_n_s_i, __pyx_n_s_j, __pyx_n_s_nright, __pyx_n_s_nleft, __pyx_n_s_count, __pyx_n_s_lval, __pyx_n_s_rval, __pyx_n_s_lindexer, __pyx_n_s_rindexer, __pyx_n_s_result); if (unlikely(!__pyx_tuple__654)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7963; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__654); __Pyx_GIVEREF(__pyx_tuple__654); __pyx_codeobj__655 = (PyObject*)__Pyx_PyCode_New(2, 0, 12, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__654, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pandas_src_generated_pyx, __pyx_n_s_outer_join_indexer_object, 7963, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__655)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7963; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":8092 * @cython.wraparound(False) * @cython.boundscheck(False) * def outer_join_indexer_int32(ndarray[int32_t] left, # <<<<<<<<<<<<<< * ndarray[int32_t] right): * cdef: */ __pyx_tuple__656 = PyTuple_Pack(12, __pyx_n_s_left, __pyx_n_s_right, __pyx_n_s_i, __pyx_n_s_j, __pyx_n_s_nright, __pyx_n_s_nleft, __pyx_n_s_count, __pyx_n_s_lval, __pyx_n_s_rval, __pyx_n_s_lindexer, __pyx_n_s_rindexer, __pyx_n_s_result); if (unlikely(!__pyx_tuple__656)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8092; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__656); __Pyx_GIVEREF(__pyx_tuple__656); __pyx_codeobj__657 = (PyObject*)__Pyx_PyCode_New(2, 0, 12, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__656, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pandas_src_generated_pyx, __pyx_n_s_outer_join_indexer_int32, 8092, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__657)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8092; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":8221 * @cython.wraparound(False) * @cython.boundscheck(False) * def outer_join_indexer_int64(ndarray[int64_t] left, # <<<<<<<<<<<<<< * ndarray[int64_t] right): * cdef: */ __pyx_tuple__658 = PyTuple_Pack(12, __pyx_n_s_left, __pyx_n_s_right, __pyx_n_s_i, __pyx_n_s_j, __pyx_n_s_nright, __pyx_n_s_nleft, __pyx_n_s_count, __pyx_n_s_lval, __pyx_n_s_rval, __pyx_n_s_lindexer, __pyx_n_s_rindexer, __pyx_n_s_result); if (unlikely(!__pyx_tuple__658)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8221; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__658); __Pyx_GIVEREF(__pyx_tuple__658); __pyx_codeobj__659 = (PyObject*)__Pyx_PyCode_New(2, 0, 12, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__658, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pandas_src_generated_pyx, __pyx_n_s_outer_join_indexer_int64, 8221, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__659)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8221; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":8351 * @cython.wraparound(False) * @cython.boundscheck(False) * def inner_join_indexer_float64(ndarray[float64_t] left, # <<<<<<<<<<<<<< * ndarray[float64_t] right): * ''' */ __pyx_tuple__660 = PyTuple_Pack(13, __pyx_n_s_left, __pyx_n_s_right, __pyx_n_s_i, __pyx_n_s_j, __pyx_n_s_k, __pyx_n_s_nright, __pyx_n_s_nleft, __pyx_n_s_count, __pyx_n_s_lval, __pyx_n_s_rval, __pyx_n_s_lindexer, __pyx_n_s_rindexer, __pyx_n_s_result); if (unlikely(!__pyx_tuple__660)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8351; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__660); __Pyx_GIVEREF(__pyx_tuple__660); __pyx_codeobj__661 = (PyObject*)__Pyx_PyCode_New(2, 0, 13, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__660, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pandas_src_generated_pyx, __pyx_n_s_inner_join_indexer_float64, 8351, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__661)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8351; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":8444 * @cython.wraparound(False) * @cython.boundscheck(False) * def inner_join_indexer_float32(ndarray[float32_t] left, # <<<<<<<<<<<<<< * ndarray[float32_t] right): * ''' */ __pyx_tuple__662 = PyTuple_Pack(13, __pyx_n_s_left, __pyx_n_s_right, __pyx_n_s_i, __pyx_n_s_j, __pyx_n_s_k, __pyx_n_s_nright, __pyx_n_s_nleft, __pyx_n_s_count, __pyx_n_s_lval, __pyx_n_s_rval, __pyx_n_s_lindexer, __pyx_n_s_rindexer, __pyx_n_s_result); if (unlikely(!__pyx_tuple__662)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8444; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__662); __Pyx_GIVEREF(__pyx_tuple__662); __pyx_codeobj__663 = (PyObject*)__Pyx_PyCode_New(2, 0, 13, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__662, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pandas_src_generated_pyx, __pyx_n_s_inner_join_indexer_float32, 8444, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__663)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8444; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":8537 * @cython.wraparound(False) * @cython.boundscheck(False) * def inner_join_indexer_object(ndarray[object] left, # <<<<<<<<<<<<<< * ndarray[object] right): * ''' */ __pyx_tuple__664 = PyTuple_Pack(13, __pyx_n_s_left, __pyx_n_s_right, __pyx_n_s_i, __pyx_n_s_j, __pyx_n_s_k, __pyx_n_s_nright, __pyx_n_s_nleft, __pyx_n_s_count, __pyx_n_s_lval, __pyx_n_s_rval, __pyx_n_s_lindexer, __pyx_n_s_rindexer, __pyx_n_s_result); if (unlikely(!__pyx_tuple__664)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8537; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__664); __Pyx_GIVEREF(__pyx_tuple__664); __pyx_codeobj__665 = (PyObject*)__Pyx_PyCode_New(2, 0, 13, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__664, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pandas_src_generated_pyx, __pyx_n_s_inner_join_indexer_object, 8537, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__665)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8537; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":8630 * @cython.wraparound(False) * @cython.boundscheck(False) * def inner_join_indexer_int32(ndarray[int32_t] left, # <<<<<<<<<<<<<< * ndarray[int32_t] right): * ''' */ __pyx_tuple__666 = PyTuple_Pack(13, __pyx_n_s_left, __pyx_n_s_right, __pyx_n_s_i, __pyx_n_s_j, __pyx_n_s_k, __pyx_n_s_nright, __pyx_n_s_nleft, __pyx_n_s_count, __pyx_n_s_lval, __pyx_n_s_rval, __pyx_n_s_lindexer, __pyx_n_s_rindexer, __pyx_n_s_result); if (unlikely(!__pyx_tuple__666)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8630; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__666); __Pyx_GIVEREF(__pyx_tuple__666); __pyx_codeobj__667 = (PyObject*)__Pyx_PyCode_New(2, 0, 13, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__666, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pandas_src_generated_pyx, __pyx_n_s_inner_join_indexer_int32, 8630, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__667)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8630; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":8723 * @cython.wraparound(False) * @cython.boundscheck(False) * def inner_join_indexer_int64(ndarray[int64_t] left, # <<<<<<<<<<<<<< * ndarray[int64_t] right): * ''' */ __pyx_tuple__668 = PyTuple_Pack(13, __pyx_n_s_left, __pyx_n_s_right, __pyx_n_s_i, __pyx_n_s_j, __pyx_n_s_k, __pyx_n_s_nright, __pyx_n_s_nleft, __pyx_n_s_count, __pyx_n_s_lval, __pyx_n_s_rval, __pyx_n_s_lindexer, __pyx_n_s_rindexer, __pyx_n_s_result); if (unlikely(!__pyx_tuple__668)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8723; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__668); __Pyx_GIVEREF(__pyx_tuple__668); __pyx_codeobj__669 = (PyObject*)__Pyx_PyCode_New(2, 0, 13, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__668, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pandas_src_generated_pyx, __pyx_n_s_inner_join_indexer_int64, 8723, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__669)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8723; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __pyx_int_0 = PyInt_FromLong(0); if (unlikely(!__pyx_int_0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_int_1 = PyInt_FromLong(1); if (unlikely(!__pyx_int_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_int_2 = PyInt_FromLong(2); if (unlikely(!__pyx_int_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_int_15 = PyInt_FromLong(15); if (unlikely(!__pyx_int_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_int_100 = PyInt_FromLong(100); if (unlikely(!__pyx_int_100)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_int_neg_1 = PyInt_FromLong(-1); if (unlikely(!__pyx_int_neg_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} return 0; __pyx_L1_error:; return -1; } #if PY_MAJOR_VERSION < 3 PyMODINIT_FUNC initalgos(void); /*proto*/ PyMODINIT_FUNC initalgos(void) #else PyMODINIT_FUNC PyInit_algos(void); /*proto*/ PyMODINIT_FUNC PyInit_algos(void) #endif { PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; __pyx_t_5numpy_int8_t __pyx_t_4; __pyx_t_5numpy_int16_t __pyx_t_5; __pyx_t_5numpy_int32_t __pyx_t_6; __pyx_t_5numpy_int64_t __pyx_t_7; __pyx_t_5numpy_float16_t __pyx_t_8; __pyx_t_5numpy_float32_t __pyx_t_9; __pyx_t_5numpy_float64_t __pyx_t_10; double __pyx_t_11; PyObject *__pyx_t_12 = NULL; int __pyx_t_13; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannyDeclarations #if CYTHON_REFNANNY __Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny"); if (!__Pyx_RefNanny) { PyErr_Clear(); __Pyx_RefNanny = __Pyx_RefNannyImportAPI("Cython.Runtime.refnanny"); if (!__Pyx_RefNanny) Py_FatalError("failed to import 'refnanny' module"); } #endif __Pyx_RefNannySetupContext("PyMODINIT_FUNC PyInit_algos(void)", 0); if ( __Pyx_check_binary_version() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_empty_tuple)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_bytes)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #ifdef __Pyx_CyFunction_USED if (__Pyx_CyFunction_init() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif #ifdef __Pyx_FusedFunction_USED if (__pyx_FusedFunction_init() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif #ifdef __Pyx_Generator_USED if (__pyx_Generator_init() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif /*--- Library function declarations ---*/ /*--- Threads initialization code ---*/ #if defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS #ifdef WITH_THREAD /* Python build with threading support? */ PyEval_InitThreads(); #endif #endif /*--- Module creation code ---*/ #if PY_MAJOR_VERSION < 3 __pyx_m = Py_InitModule4(__Pyx_NAMESTR("algos"), __pyx_methods, 0, 0, PYTHON_API_VERSION); Py_XINCREF(__pyx_m); #else __pyx_m = PyModule_Create(&__pyx_moduledef); #endif if (unlikely(!__pyx_m)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_d)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} Py_INCREF(__pyx_d); __pyx_b = PyImport_AddModule(__Pyx_NAMESTR(__Pyx_BUILTIN_MODULE_NAME)); if (unlikely(!__pyx_b)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #if CYTHON_COMPILING_IN_PYPY Py_INCREF(__pyx_b); #endif if (__Pyx_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; /*--- Initialize various global constants etc. ---*/ if (unlikely(__Pyx_InitGlobals() < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif if (__pyx_module_is_main_pandas__algos) { if (__Pyx_SetAttrString(__pyx_m, "__name__", __pyx_n_s_main) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; } #if PY_MAJOR_VERSION >= 3 { PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (!PyDict_GetItemString(modules, "pandas.algos")) { if (unlikely(PyDict_SetItemString(modules, "pandas.algos", __pyx_m) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } } #endif /*--- Builtin init code ---*/ if (unlikely(__Pyx_InitCachedBuiltins() < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /*--- Constants init code ---*/ if (unlikely(__Pyx_InitCachedConstants() < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /*--- Global init code ---*/ /*--- Variable export code ---*/ /*--- Function export code ---*/ /*--- Type init code ---*/ if (PyType_Ready(&__pyx_type_6pandas_5algos_Node) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 32; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_type_6pandas_5algos_Node.tp_print = 0; if (__Pyx_SetAttrString(__pyx_m, "Node", (PyObject *)&__pyx_type_6pandas_5algos_Node) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 32; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_6pandas_5algos_Node = &__pyx_type_6pandas_5algos_Node; __pyx_vtabptr_6pandas_5algos_IndexableSkiplist = &__pyx_vtable_6pandas_5algos_IndexableSkiplist; __pyx_vtable_6pandas_5algos_IndexableSkiplist.get = (PyObject *(*)(struct __pyx_obj_6pandas_5algos_IndexableSkiplist *, Py_ssize_t, int __pyx_skip_dispatch))__pyx_f_6pandas_5algos_17IndexableSkiplist_get; __pyx_vtable_6pandas_5algos_IndexableSkiplist.insert = (PyObject *(*)(struct __pyx_obj_6pandas_5algos_IndexableSkiplist *, double, int __pyx_skip_dispatch))__pyx_f_6pandas_5algos_17IndexableSkiplist_insert; __pyx_vtable_6pandas_5algos_IndexableSkiplist.remove = (PyObject *(*)(struct __pyx_obj_6pandas_5algos_IndexableSkiplist *, double, int __pyx_skip_dispatch))__pyx_f_6pandas_5algos_17IndexableSkiplist_remove; if (PyType_Ready(&__pyx_type_6pandas_5algos_IndexableSkiplist) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 46; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_type_6pandas_5algos_IndexableSkiplist.tp_print = 0; if (__Pyx_SetVtable(__pyx_type_6pandas_5algos_IndexableSkiplist.tp_dict, __pyx_vtabptr_6pandas_5algos_IndexableSkiplist) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 46; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__Pyx_SetAttrString(__pyx_m, "IndexableSkiplist", (PyObject *)&__pyx_type_6pandas_5algos_IndexableSkiplist) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 46; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_6pandas_5algos_IndexableSkiplist = &__pyx_type_6pandas_5algos_IndexableSkiplist; /*--- Type import code ---*/ __pyx_ptype_5numpy_dtype = __Pyx_ImportType("numpy", "dtype", sizeof(PyArray_Descr), 0); if (unlikely(!__pyx_ptype_5numpy_dtype)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_5numpy_flatiter = __Pyx_ImportType("numpy", "flatiter", sizeof(PyArrayIterObject), 0); if (unlikely(!__pyx_ptype_5numpy_flatiter)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 167; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_5numpy_broadcast = __Pyx_ImportType("numpy", "broadcast", sizeof(PyArrayMultiIterObject), 0); if (unlikely(!__pyx_ptype_5numpy_broadcast)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 171; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_5numpy_ndarray = __Pyx_ImportType("numpy", "ndarray", sizeof(PyArrayObject), 0); if (unlikely(!__pyx_ptype_5numpy_ndarray)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_5numpy_ufunc = __Pyx_ImportType("numpy", "ufunc", sizeof(PyUFuncObject), 0); if (unlikely(!__pyx_ptype_5numpy_ufunc)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 865; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_7cpython_4type_type = __Pyx_ImportType(__Pyx_BUILTIN_MODULE_NAME, "type", #if CYTHON_COMPILING_IN_PYPY sizeof(PyTypeObject), #else sizeof(PyHeapTypeObject), #endif 0); if (unlikely(!__pyx_ptype_7cpython_4type_type)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 9; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_7cpython_4bool_bool = __Pyx_ImportType(__Pyx_BUILTIN_MODULE_NAME, "bool", sizeof(PyBoolObject), 0); if (unlikely(!__pyx_ptype_7cpython_4bool_bool)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 8; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_7cpython_7complex_complex = __Pyx_ImportType(__Pyx_BUILTIN_MODULE_NAME, "complex", sizeof(PyComplexObject), 0); if (unlikely(!__pyx_ptype_7cpython_7complex_complex)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 15; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_8datetime_date = __Pyx_ImportType("datetime", "date", sizeof(PyDateTime_Date), 0); if (unlikely(!__pyx_ptype_8datetime_date)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 15; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_8datetime_datetime = __Pyx_ImportType("datetime", "datetime", sizeof(PyDateTime_DateTime), 0); if (unlikely(!__pyx_ptype_8datetime_datetime)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 18; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_8datetime_timedelta = __Pyx_ImportType("datetime", "timedelta", sizeof(PyDateTime_Delta), 0); if (unlikely(!__pyx_ptype_8datetime_timedelta)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 21; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /*--- Variable import code ---*/ /*--- Function import code ---*/ /*--- Execution code ---*/ /* "pandas/algos.pyx":3 * from numpy cimport * * cimport numpy as np * import numpy as np # <<<<<<<<<<<<<< * * cimport cython */ __pyx_t_1 = __Pyx_Import(__pyx_n_s_numpy, 0, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_np, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pandas/algos.pyx":7 * cimport cython * * import_array() # <<<<<<<<<<<<<< * * cdef float64_t FP_ERR = 1e-13 */ import_array(); /* "pandas/algos.pyx":9 * import_array() * * cdef float64_t FP_ERR = 1e-13 # <<<<<<<<<<<<<< * * cimport util */ __pyx_v_6pandas_5algos_FP_ERR = 1e-13; /* "pandas/algos.pyx":23 * from numpy cimport NPY_FLOAT64 as NPY_float64 * * int8 = np.dtype(np.int8) # <<<<<<<<<<<<<< * int16 = np.dtype(np.int16) * int32 = np.dtype(np.int32) */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 23; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_int8); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 23; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 23; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_5numpy_dtype)), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 23; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (PyDict_SetItem(__pyx_d, __pyx_n_s_int8, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 23; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/algos.pyx":24 * * int8 = np.dtype(np.int8) * int16 = np.dtype(np.int16) # <<<<<<<<<<<<<< * int32 = np.dtype(np.int32) * int64 = np.dtype(np.int64) */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 24; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_int16); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 24; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 24; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_5numpy_dtype)), __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 24; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (PyDict_SetItem(__pyx_d, __pyx_n_s_int16, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 24; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pandas/algos.pyx":25 * int8 = np.dtype(np.int8) * int16 = np.dtype(np.int16) * int32 = np.dtype(np.int32) # <<<<<<<<<<<<<< * int64 = np.dtype(np.int64) * float16 = np.dtype(np.float16) */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 25; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_int32); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 25; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 25; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_5numpy_dtype)), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 25; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (PyDict_SetItem(__pyx_d, __pyx_n_s_int32, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 25; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/algos.pyx":26 * int16 = np.dtype(np.int16) * int32 = np.dtype(np.int32) * int64 = np.dtype(np.int64) # <<<<<<<<<<<<<< * float16 = np.dtype(np.float16) * float32 = np.dtype(np.float32) */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 26; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_int64); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 26; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 26; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_5numpy_dtype)), __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 26; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (PyDict_SetItem(__pyx_d, __pyx_n_s_int64, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 26; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pandas/algos.pyx":27 * int32 = np.dtype(np.int32) * int64 = np.dtype(np.int64) * float16 = np.dtype(np.float16) # <<<<<<<<<<<<<< * float32 = np.dtype(np.float32) * float64 = np.dtype(np.float64) */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 27; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_float16); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 27; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 27; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_5numpy_dtype)), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 27; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (PyDict_SetItem(__pyx_d, __pyx_n_s_float16, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 27; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/algos.pyx":28 * int64 = np.dtype(np.int64) * float16 = np.dtype(np.float16) * float32 = np.dtype(np.float32) # <<<<<<<<<<<<<< * float64 = np.dtype(np.float64) * */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 28; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_float32); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 28; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 28; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_5numpy_dtype)), __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 28; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (PyDict_SetItem(__pyx_d, __pyx_n_s_float32, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 28; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pandas/algos.pyx":29 * float16 = np.dtype(np.float16) * float32 = np.dtype(np.float32) * float64 = np.dtype(np.float64) # <<<<<<<<<<<<<< * * cdef np.int8_t MINint8 = np.iinfo(np.int8).min */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 29; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_float64); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 29; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 29; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_5numpy_dtype)), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 29; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (PyDict_SetItem(__pyx_d, __pyx_n_s_float64, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 29; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/algos.pyx":31 * float64 = np.dtype(np.float64) * * cdef np.int8_t MINint8 = np.iinfo(np.int8).min # <<<<<<<<<<<<<< * cdef np.int16_t MINint16 = np.iinfo(np.int16).min * cdef np.int32_t MINint32 = np.iinfo(np.int32).min */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 31; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_iinfo); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 31; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 31; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_int8); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 31; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 31; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 31; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_min); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 31; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_4 = __Pyx_PyInt_As_npy_int8(__pyx_t_2); if (unlikely((__pyx_t_4 == (npy_int8)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 31; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_6pandas_5algos_MINint8 = __pyx_t_4; /* "pandas/algos.pyx":32 * * cdef np.int8_t MINint8 = np.iinfo(np.int8).min * cdef np.int16_t MINint16 = np.iinfo(np.int16).min # <<<<<<<<<<<<<< * cdef np.int32_t MINint32 = np.iinfo(np.int32).min * cdef np.int64_t MINint64 = np.iinfo(np.int64).min */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 32; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_iinfo); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 32; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 32; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_int16); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 32; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 32; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyObject_Call(__pyx_t_3, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 32; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_min); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 32; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_5 = __Pyx_PyInt_As_npy_int16(__pyx_t_2); if (unlikely((__pyx_t_5 == (npy_int16)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 32; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_6pandas_5algos_MINint16 = __pyx_t_5; /* "pandas/algos.pyx":33 * cdef np.int8_t MINint8 = np.iinfo(np.int8).min * cdef np.int16_t MINint16 = np.iinfo(np.int16).min * cdef np.int32_t MINint32 = np.iinfo(np.int32).min # <<<<<<<<<<<<<< * cdef np.int64_t MINint64 = np.iinfo(np.int64).min * cdef np.float16_t MINfloat16 = np.NINF */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 33; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_iinfo); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 33; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 33; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_int32); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 33; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 33; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 33; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_min); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 33; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_6 = __Pyx_PyInt_As_npy_int32(__pyx_t_2); if (unlikely((__pyx_t_6 == (npy_int32)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 33; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_6pandas_5algos_MINint32 = __pyx_t_6; /* "pandas/algos.pyx":34 * cdef np.int16_t MINint16 = np.iinfo(np.int16).min * cdef np.int32_t MINint32 = np.iinfo(np.int32).min * cdef np.int64_t MINint64 = np.iinfo(np.int64).min # <<<<<<<<<<<<<< * cdef np.float16_t MINfloat16 = np.NINF * cdef np.float32_t MINfloat32 = np.NINF */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 34; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_iinfo); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 34; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 34; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_int64); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 34; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 34; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyObject_Call(__pyx_t_3, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 34; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_min); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 34; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_7 = __Pyx_PyInt_As_npy_int64(__pyx_t_2); if (unlikely((__pyx_t_7 == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 34; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_6pandas_5algos_MINint64 = __pyx_t_7; /* "pandas/algos.pyx":35 * cdef np.int32_t MINint32 = np.iinfo(np.int32).min * cdef np.int64_t MINint64 = np.iinfo(np.int64).min * cdef np.float16_t MINfloat16 = np.NINF # <<<<<<<<<<<<<< * cdef np.float32_t MINfloat32 = np.NINF * cdef np.float64_t MINfloat64 = np.NINF */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_NINF); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_8 = __pyx_PyFloat_AsFloat(__pyx_t_1); if (unlikely((__pyx_t_8 == (npy_float16)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_6pandas_5algos_MINfloat16 = __pyx_t_8; /* "pandas/algos.pyx":36 * cdef np.int64_t MINint64 = np.iinfo(np.int64).min * cdef np.float16_t MINfloat16 = np.NINF * cdef np.float32_t MINfloat32 = np.NINF # <<<<<<<<<<<<<< * cdef np.float64_t MINfloat64 = np.NINF * */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 36; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_NINF); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 36; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_9 = __pyx_PyFloat_AsFloat(__pyx_t_2); if (unlikely((__pyx_t_9 == (npy_float32)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 36; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_6pandas_5algos_MINfloat32 = __pyx_t_9; /* "pandas/algos.pyx":37 * cdef np.float16_t MINfloat16 = np.NINF * cdef np.float32_t MINfloat32 = np.NINF * cdef np.float64_t MINfloat64 = np.NINF # <<<<<<<<<<<<<< * * cdef np.int8_t MAXint8 = np.iinfo(np.int8).max */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 37; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_NINF); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 37; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_10 = __pyx_PyFloat_AsDouble(__pyx_t_1); if (unlikely((__pyx_t_10 == (npy_float64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 37; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_6pandas_5algos_MINfloat64 = __pyx_t_10; /* "pandas/algos.pyx":39 * cdef np.float64_t MINfloat64 = np.NINF * * cdef np.int8_t MAXint8 = np.iinfo(np.int8).max # <<<<<<<<<<<<<< * cdef np.int16_t MAXint16 = np.iinfo(np.int16).max * cdef np.int32_t MAXint32 = np.iinfo(np.int32).max */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 39; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_iinfo); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 39; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 39; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_int8); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 39; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 39; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyObject_Call(__pyx_t_2, __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 39; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_max); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 39; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_4 = __Pyx_PyInt_As_npy_int8(__pyx_t_1); if (unlikely((__pyx_t_4 == (npy_int8)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 39; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_6pandas_5algos_MAXint8 = __pyx_t_4; /* "pandas/algos.pyx":40 * * cdef np.int8_t MAXint8 = np.iinfo(np.int8).max * cdef np.int16_t MAXint16 = np.iinfo(np.int16).max # <<<<<<<<<<<<<< * cdef np.int32_t MAXint32 = np.iinfo(np.int32).max * cdef np.int64_t MAXint64 = np.iinfo(np.int64).max */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 40; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_iinfo); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 40; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 40; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_int16); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 40; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 40; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_Call(__pyx_t_3, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 40; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_max); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 40; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_5 = __Pyx_PyInt_As_npy_int16(__pyx_t_1); if (unlikely((__pyx_t_5 == (npy_int16)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 40; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_6pandas_5algos_MAXint16 = __pyx_t_5; /* "pandas/algos.pyx":41 * cdef np.int8_t MAXint8 = np.iinfo(np.int8).max * cdef np.int16_t MAXint16 = np.iinfo(np.int16).max * cdef np.int32_t MAXint32 = np.iinfo(np.int32).max # <<<<<<<<<<<<<< * cdef np.int64_t MAXint64 = np.iinfo(np.int64).max * cdef np.float16_t MAXfloat16 = np.inf */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 41; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_iinfo); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 41; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 41; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_int32); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 41; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 41; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyObject_Call(__pyx_t_2, __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 41; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_max); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 41; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_6 = __Pyx_PyInt_As_npy_int32(__pyx_t_1); if (unlikely((__pyx_t_6 == (npy_int32)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 41; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_6pandas_5algos_MAXint32 = __pyx_t_6; /* "pandas/algos.pyx":42 * cdef np.int16_t MAXint16 = np.iinfo(np.int16).max * cdef np.int32_t MAXint32 = np.iinfo(np.int32).max * cdef np.int64_t MAXint64 = np.iinfo(np.int64).max # <<<<<<<<<<<<<< * cdef np.float16_t MAXfloat16 = np.inf * cdef np.float32_t MAXfloat32 = np.inf */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 42; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_iinfo); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 42; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 42; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_int64); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 42; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 42; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_Call(__pyx_t_3, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 42; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_max); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 42; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_7 = __Pyx_PyInt_As_npy_int64(__pyx_t_1); if (unlikely((__pyx_t_7 == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 42; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_6pandas_5algos_MAXint64 = __pyx_t_7; /* "pandas/algos.pyx":43 * cdef np.int32_t MAXint32 = np.iinfo(np.int32).max * cdef np.int64_t MAXint64 = np.iinfo(np.int64).max * cdef np.float16_t MAXfloat16 = np.inf # <<<<<<<<<<<<<< * cdef np.float32_t MAXfloat32 = np.inf * cdef np.float64_t MAXfloat64 = np.inf */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 43; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_inf); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 43; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_8 = __pyx_PyFloat_AsFloat(__pyx_t_2); if (unlikely((__pyx_t_8 == (npy_float16)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 43; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_6pandas_5algos_MAXfloat16 = __pyx_t_8; /* "pandas/algos.pyx":44 * cdef np.int64_t MAXint64 = np.iinfo(np.int64).max * cdef np.float16_t MAXfloat16 = np.inf * cdef np.float32_t MAXfloat32 = np.inf # <<<<<<<<<<<<<< * cdef np.float64_t MAXfloat64 = np.inf * */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 44; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_inf); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 44; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_9 = __pyx_PyFloat_AsFloat(__pyx_t_1); if (unlikely((__pyx_t_9 == (npy_float32)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 44; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_6pandas_5algos_MAXfloat32 = __pyx_t_9; /* "pandas/algos.pyx":45 * cdef np.float16_t MAXfloat16 = np.inf * cdef np.float32_t MAXfloat32 = np.inf * cdef np.float64_t MAXfloat64 = np.inf # <<<<<<<<<<<<<< * * cdef double NaN = np.NaN */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 45; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_inf); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 45; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_10 = __pyx_PyFloat_AsDouble(__pyx_t_2); if (unlikely((__pyx_t_10 == (npy_float64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 45; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_6pandas_5algos_MAXfloat64 = __pyx_t_10; /* "pandas/algos.pyx":47 * cdef np.float64_t MAXfloat64 = np.inf * * cdef double NaN = np.NaN # <<<<<<<<<<<<<< * cdef double nan = NaN * */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 47; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_NaN); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 47; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_11 = __pyx_PyFloat_AsDouble(__pyx_t_1); if (unlikely((__pyx_t_11 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 47; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_6pandas_5algos_NaN = ((double)__pyx_t_11); /* "pandas/algos.pyx":48 * * cdef double NaN = np.NaN * cdef double nan = NaN # <<<<<<<<<<<<<< * * */ __pyx_v_6pandas_5algos_nan = __pyx_v_6pandas_5algos_NaN; /* "pandas/algos.pyx":60 * int signbit(double) * * from pandas import lib # <<<<<<<<<<<<<< * * include "skiplist.pyx" */ __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 60; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_n_s_lib); PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_lib); __Pyx_GIVEREF(__pyx_n_s_lib); __pyx_t_2 = __Pyx_Import(__pyx_n_s_pandas, __pyx_t_1, -1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 60; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_lib); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 60; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_lib, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 60; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/skiplist.pyx":23 * cimport numpy as np * from numpy cimport * * import numpy as np # <<<<<<<<<<<<<< * * from random import random */ __pyx_t_2 = __Pyx_Import(__pyx_n_s_numpy, 0, -1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 23; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_np, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 23; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/skiplist.pyx":25 * import numpy as np * * from random import random # <<<<<<<<<<<<<< * * # initialize numpy */ __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 25; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_n_s_random); PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_random); __Pyx_GIVEREF(__pyx_n_s_random); __pyx_t_1 = __Pyx_Import(__pyx_n_s_random, __pyx_t_2, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 25; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_random); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 25; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_random, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 25; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/skiplist.pyx":28 * * # initialize numpy * import_array() # <<<<<<<<<<<<<< * * # TODO: optimize this, make less messy */ import_array(); /* "pandas/src/skiplist.pyx":44 * * # Singleton terminator node * NIL = Node(np.inf, [], []) # <<<<<<<<<<<<<< * * cdef class IndexableSkiplist: */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 44; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_inf); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 44; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 44; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 44; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_12 = PyTuple_New(3); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 44; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_12, 1, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_12, 2, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_2 = 0; __pyx_t_1 = 0; __pyx_t_3 = 0; __pyx_t_3 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_6pandas_5algos_Node)), __pyx_t_12, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 44; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; if (PyDict_SetItem(__pyx_d, __pyx_n_s_NIL, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 44; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/algos.pyx":66 * * cdef: * int TIEBREAK_AVERAGE = 0 # <<<<<<<<<<<<<< * int TIEBREAK_MIN = 1 * int TIEBREAK_MAX = 2 */ __pyx_v_6pandas_5algos_TIEBREAK_AVERAGE = 0; /* "pandas/algos.pyx":67 * cdef: * int TIEBREAK_AVERAGE = 0 * int TIEBREAK_MIN = 1 # <<<<<<<<<<<<<< * int TIEBREAK_MAX = 2 * int TIEBREAK_FIRST = 3 */ __pyx_v_6pandas_5algos_TIEBREAK_MIN = 1; /* "pandas/algos.pyx":68 * int TIEBREAK_AVERAGE = 0 * int TIEBREAK_MIN = 1 * int TIEBREAK_MAX = 2 # <<<<<<<<<<<<<< * int TIEBREAK_FIRST = 3 * int TIEBREAK_FIRST_DESCENDING = 4 */ __pyx_v_6pandas_5algos_TIEBREAK_MAX = 2; /* "pandas/algos.pyx":69 * int TIEBREAK_MIN = 1 * int TIEBREAK_MAX = 2 * int TIEBREAK_FIRST = 3 # <<<<<<<<<<<<<< * int TIEBREAK_FIRST_DESCENDING = 4 * */ __pyx_v_6pandas_5algos_TIEBREAK_FIRST = 3; /* "pandas/algos.pyx":70 * int TIEBREAK_MAX = 2 * int TIEBREAK_FIRST = 3 * int TIEBREAK_FIRST_DESCENDING = 4 # <<<<<<<<<<<<<< * * tiebreakers = { */ __pyx_v_6pandas_5algos_TIEBREAK_FIRST_DESCENDING = 4; /* "pandas/algos.pyx":72 * int TIEBREAK_FIRST_DESCENDING = 4 * * tiebreakers = { # <<<<<<<<<<<<<< * 'average' : TIEBREAK_AVERAGE, * 'min' : TIEBREAK_MIN, */ __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 72; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); /* "pandas/algos.pyx":73 * * tiebreakers = { * 'average' : TIEBREAK_AVERAGE, # <<<<<<<<<<<<<< * 'min' : TIEBREAK_MIN, * 'max' : TIEBREAK_MAX, */ __pyx_t_12 = __Pyx_PyInt_From_int(__pyx_v_6pandas_5algos_TIEBREAK_AVERAGE); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 73; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_average, __pyx_t_12) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 72; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; /* "pandas/algos.pyx":74 * tiebreakers = { * 'average' : TIEBREAK_AVERAGE, * 'min' : TIEBREAK_MIN, # <<<<<<<<<<<<<< * 'max' : TIEBREAK_MAX, * 'first' : TIEBREAK_FIRST */ __pyx_t_12 = __Pyx_PyInt_From_int(__pyx_v_6pandas_5algos_TIEBREAK_MIN); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 74; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_min, __pyx_t_12) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 72; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; /* "pandas/algos.pyx":75 * 'average' : TIEBREAK_AVERAGE, * 'min' : TIEBREAK_MIN, * 'max' : TIEBREAK_MAX, # <<<<<<<<<<<<<< * 'first' : TIEBREAK_FIRST * } */ __pyx_t_12 = __Pyx_PyInt_From_int(__pyx_v_6pandas_5algos_TIEBREAK_MAX); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 75; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_max, __pyx_t_12) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 72; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; /* "pandas/algos.pyx":77 * 'max' : TIEBREAK_MAX, * 'first' : TIEBREAK_FIRST * } # <<<<<<<<<<<<<< * * */ __pyx_t_12 = __Pyx_PyInt_From_int(__pyx_v_6pandas_5algos_TIEBREAK_FIRST); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 77; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_first, __pyx_t_12) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 72; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; if (PyDict_SetItem(__pyx_d, __pyx_n_s_tiebreakers, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 72; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/algos.pyx":133 * * * def rank_1d_float64(object in_arr, ties_method='average', ascending=True, # <<<<<<<<<<<<<< * na_option='keep'): * """ */ __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_1rank_1d_float64, NULL, __pyx_n_s_pandas_algos); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 133; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_rank_1d_float64, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 133; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/algos.pyx":205 * * * def rank_1d_int64(object in_arr, ties_method='average', ascending=True, # <<<<<<<<<<<<<< * na_option='keep'): * """ */ __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_3rank_1d_int64, NULL, __pyx_n_s_pandas_algos); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 205; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_rank_1d_int64, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 205; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/algos.pyx":265 * * * def rank_2d_float64(object in_arr, axis=0, ties_method='average', # <<<<<<<<<<<<<< * ascending=True, na_option='keep'): * """ */ __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_5rank_2d_float64, NULL, __pyx_n_s_pandas_algos); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 265; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_rank_2d_float64, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 265; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/algos.pyx":348 * * * def rank_2d_int64(object in_arr, axis=0, ties_method='average', # <<<<<<<<<<<<<< * ascending=True, na_option='keep'): * """ */ __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_7rank_2d_int64, NULL, __pyx_n_s_pandas_algos); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 348; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_rank_2d_int64, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 348; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/algos.pyx":416 * * * def rank_1d_generic(object in_arr, bint retry=1, ties_method='average', # <<<<<<<<<<<<<< * ascending=True, na_option='keep'): * """ */ __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_9rank_1d_generic, NULL, __pyx_n_s_pandas_algos); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 416; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_rank_1d_generic, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 416; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/algos.pyx":502 * return left != right * * _return_false = lambda self, other: False # <<<<<<<<<<<<<< * _return_true = lambda self, other: True * */ __pyx_t_3 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6pandas_5algos_494lambda1, 0, __pyx_n_s_lambda, NULL, __pyx_n_s_pandas_algos, PyModule_GetDict(__pyx_m), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 502; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_return_false, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 502; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/algos.pyx":503 * * _return_false = lambda self, other: False * _return_true = lambda self, other: True # <<<<<<<<<<<<<< * * class Infinity(object): */ __pyx_t_3 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6pandas_5algos_495lambda2, 0, __pyx_n_s_lambda, NULL, __pyx_n_s_pandas_algos, PyModule_GetDict(__pyx_m), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 503; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_return_true, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 503; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/algos.pyx":505 * _return_true = lambda self, other: True * * class Infinity(object): # <<<<<<<<<<<<<< * * __lt__ = _return_false */ __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 505; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_builtin_object); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_builtin_object); __Pyx_GIVEREF(__pyx_builtin_object); __pyx_t_12 = __Pyx_CalculateMetaclass(NULL, __pyx_t_3); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 505; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __pyx_t_1 = __Pyx_Py3MetaclassPrepare(__pyx_t_12, __pyx_t_3, __pyx_n_s_Infinity, __pyx_n_s_Infinity, (PyObject *) NULL, __pyx_n_s_pandas_algos, (PyObject *) NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 505; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); /* "pandas/algos.pyx":507 * class Infinity(object): * * __lt__ = _return_false # <<<<<<<<<<<<<< * __le__ = _return_false * __eq__ = _return_false */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_return_false); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 507; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_lt, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 507; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/algos.pyx":508 * * __lt__ = _return_false * __le__ = _return_false # <<<<<<<<<<<<<< * __eq__ = _return_false * __ne__ = _return_true */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_return_false); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 508; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_le, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 508; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/algos.pyx":509 * __lt__ = _return_false * __le__ = _return_false * __eq__ = _return_false # <<<<<<<<<<<<<< * __ne__ = _return_true * __gt__ = _return_true */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_return_false); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 509; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_eq, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 509; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/algos.pyx":510 * __le__ = _return_false * __eq__ = _return_false * __ne__ = _return_true # <<<<<<<<<<<<<< * __gt__ = _return_true * __ge__ = _return_true */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_return_true); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 510; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_ne, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 510; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/algos.pyx":511 * __eq__ = _return_false * __ne__ = _return_true * __gt__ = _return_true # <<<<<<<<<<<<<< * __ge__ = _return_true * __cmp__ = _return_false */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_return_true); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 511; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_gt, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 511; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/algos.pyx":512 * __ne__ = _return_true * __gt__ = _return_true * __ge__ = _return_true # <<<<<<<<<<<<<< * __cmp__ = _return_false * */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_return_true); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 512; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_ge, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 512; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/algos.pyx":513 * __gt__ = _return_true * __ge__ = _return_true * __cmp__ = _return_false # <<<<<<<<<<<<<< * * class NegInfinity(object): */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_return_false); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 513; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_cmp, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 513; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/algos.pyx":505 * _return_true = lambda self, other: True * * class Infinity(object): # <<<<<<<<<<<<<< * * __lt__ = _return_false */ __pyx_t_2 = __Pyx_Py3ClassCreate(__pyx_t_12, __pyx_n_s_Infinity, __pyx_t_3, __pyx_t_1, NULL, 0, 1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 505; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_Infinity, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 505; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/algos.pyx":515 * __cmp__ = _return_false * * class NegInfinity(object): # <<<<<<<<<<<<<< * * __lt__ = _return_true */ __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 515; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_builtin_object); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_builtin_object); __Pyx_GIVEREF(__pyx_builtin_object); __pyx_t_12 = __Pyx_CalculateMetaclass(NULL, __pyx_t_3); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 515; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __pyx_t_1 = __Pyx_Py3MetaclassPrepare(__pyx_t_12, __pyx_t_3, __pyx_n_s_NegInfinity, __pyx_n_s_NegInfinity, (PyObject *) NULL, __pyx_n_s_pandas_algos, (PyObject *) NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 515; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); /* "pandas/algos.pyx":517 * class NegInfinity(object): * * __lt__ = _return_true # <<<<<<<<<<<<<< * __le__ = _return_true * __eq__ = _return_false */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_return_true); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 517; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_lt, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 517; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/algos.pyx":518 * * __lt__ = _return_true * __le__ = _return_true # <<<<<<<<<<<<<< * __eq__ = _return_false * __ne__ = _return_true */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_return_true); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 518; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_le, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 518; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/algos.pyx":519 * __lt__ = _return_true * __le__ = _return_true * __eq__ = _return_false # <<<<<<<<<<<<<< * __ne__ = _return_true * __gt__ = _return_false */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_return_false); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 519; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_eq, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 519; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/algos.pyx":520 * __le__ = _return_true * __eq__ = _return_false * __ne__ = _return_true # <<<<<<<<<<<<<< * __gt__ = _return_false * __ge__ = _return_false */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_return_true); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 520; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_ne, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 520; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/algos.pyx":521 * __eq__ = _return_false * __ne__ = _return_true * __gt__ = _return_false # <<<<<<<<<<<<<< * __ge__ = _return_false * __cmp__ = _return_true */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_return_false); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 521; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_gt, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 521; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/algos.pyx":522 * __ne__ = _return_true * __gt__ = _return_false * __ge__ = _return_false # <<<<<<<<<<<<<< * __cmp__ = _return_true * */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_return_false); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 522; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_ge, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 522; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/algos.pyx":523 * __gt__ = _return_false * __ge__ = _return_false * __cmp__ = _return_true # <<<<<<<<<<<<<< * * def rank_2d_generic(object in_arr, axis=0, ties_method='average', */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_return_true); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 523; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_cmp, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 523; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/algos.pyx":515 * __cmp__ = _return_false * * class NegInfinity(object): # <<<<<<<<<<<<<< * * __lt__ = _return_true */ __pyx_t_2 = __Pyx_Py3ClassCreate(__pyx_t_12, __pyx_n_s_NegInfinity, __pyx_t_3, __pyx_t_1, NULL, 0, 1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 515; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_NegInfinity, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 515; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/algos.pyx":525 * __cmp__ = _return_true * * def rank_2d_generic(object in_arr, axis=0, ties_method='average', # <<<<<<<<<<<<<< * ascending=True, na_option='keep'): * """ */ __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_11rank_2d_generic, NULL, __pyx_n_s_pandas_algos); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 525; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_rank_2d_generic, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 525; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/algos.pyx":641 * # - * * def _check_minp(win, minp, N): # <<<<<<<<<<<<<< * if minp > win: * raise ValueError('min_periods (%d) must be <= window (%d)' */ __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_13_check_minp, NULL, __pyx_n_s_pandas_algos); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 641; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_check_minp, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 641; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/algos.pyx":668 * # Series: Prentice-Hall Series in Automatic Computation * * def kth_smallest(ndarray[double_t] a, Py_ssize_t k): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i,j,l,m,n */ __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_15kth_smallest, NULL, __pyx_n_s_pandas_algos); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 668; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_kth_smallest, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 668; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/algos.pyx":725 * * * def median(ndarray arr): # <<<<<<<<<<<<<< * ''' * A faster median */ __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_17median, NULL, __pyx_n_s_pandas_algos); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 725; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_median, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 725; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/algos.pyx":745 * # -------------- Min, Max subsequence * * def max_subseq(ndarray[double_t] arr): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i=0,s=0,e=0,T,n */ __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_19max_subseq, NULL, __pyx_n_s_pandas_algos); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 745; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_max_subseq, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 745; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/algos.pyx":773 * return (s, e, m) * * def min_subseq(ndarray[double_t] arr): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t s, e */ __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_21min_subseq, NULL, __pyx_n_s_pandas_algos); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 773; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_min_subseq, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 773; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/algos.pyx":785 * # Rolling sum * * def roll_sum(ndarray[double_t] input, int win, int minp): # <<<<<<<<<<<<<< * cdef double val, prev, sum_x = 0 * cdef int nobs = 0, i */ __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_23roll_sum, NULL, __pyx_n_s_pandas_algos); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 785; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_roll_sum, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 785; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/algos.pyx":827 * # Rolling mean * * def roll_mean(ndarray[double_t] input, # <<<<<<<<<<<<<< * int win, int minp): * cdef: */ __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_25roll_mean, NULL, __pyx_n_s_pandas_algos); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 827; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_roll_mean, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 827; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/algos.pyx":884 * # Exponentially weighted moving average * * def ewma(ndarray[double_t] input, double_t com, int adjust): # <<<<<<<<<<<<<< * ''' * Compute exponentially-weighted moving average using center-of-mass. */ __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_27ewma, NULL, __pyx_n_s_pandas_algos); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 884; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_ewma, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 884; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/algos.pyx":946 * @cython.boundscheck(False) * @cython.wraparound(False) * def nancorr(ndarray[float64_t, ndim=2] mat, cov=False, minp=None): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, j, xi, yi, N, K */ __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_29nancorr, NULL, __pyx_n_s_pandas_algos); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 946; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_nancorr, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 946; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/algos.pyx":1005 * @cython.boundscheck(False) * @cython.wraparound(False) * def nancorr_spearman(ndarray[float64_t, ndim=2] mat, Py_ssize_t minp=1): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, j, xi, yi, N, K */ __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_31nancorr_spearman, NULL, __pyx_n_s_pandas_algos); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1005; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_nancorr_spearman, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1005; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/algos.pyx":1066 * # Rolling variance * * def roll_var(ndarray[double_t] input, int win, int minp, int ddof=1): # <<<<<<<<<<<<<< * cdef double val, prev, sum_x = 0, sum_xx = 0, nobs = 0 * cdef Py_ssize_t i */ __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_33roll_var, NULL, __pyx_n_s_pandas_algos); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1066; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_roll_var, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1066; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/algos.pyx":1120 * # Rolling skewness * * def roll_skew(ndarray[double_t] input, int win, int minp): # <<<<<<<<<<<<<< * cdef double val, prev * cdef double x = 0, xx = 0, xxx = 0 */ __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_35roll_skew, NULL, __pyx_n_s_pandas_algos); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1120; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_roll_skew, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1120; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/algos.pyx":1184 * * * def roll_kurt(ndarray[double_t] input, # <<<<<<<<<<<<<< * int win, int minp): * cdef double val, prev */ __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_37roll_kurt, NULL, __pyx_n_s_pandas_algos); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1184; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_roll_kurt, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1184; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/algos.pyx":1304 * from skiplist cimport * * * def roll_median_c(ndarray[float64_t] arg, int win, int minp): # <<<<<<<<<<<<<< * cdef double val, res, prev * cdef: */ __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_39roll_median_c, NULL, __pyx_n_s_pandas_algos); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1304; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_roll_median_c, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1304; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/algos.pyx":1359 * return output * * def roll_median_cython(ndarray input, int win, int minp): # <<<<<<<<<<<<<< * ''' * O(N log(window)) implementation using skip list */ __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_41roll_median_cython, NULL, __pyx_n_s_pandas_algos); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1359; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_roll_median_cython, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1359; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/algos.pyx":1395 * @cython.boundscheck(False) * @cython.wraparound(False) * def roll_max2(ndarray[float64_t] a, int window, int minp): # <<<<<<<<<<<<<< * "Moving max of 1d array of dtype=float64 along axis=0 ignoring NaNs." * cdef np.float64_t ai, aold */ __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_43roll_max2, NULL, __pyx_n_s_pandas_algos); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1395; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_roll_max2, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1395; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/algos.pyx":1475 * return y * * def roll_max(ndarray input, int win, int minp): # <<<<<<<<<<<<<< * ''' * O(N log(window)) implementation using skip list */ __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_45roll_max, NULL, __pyx_n_s_pandas_algos); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1475; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_roll_max, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1475; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/algos.pyx":1488 * return NaN * * def roll_min(ndarray input, int win, int minp): # <<<<<<<<<<<<<< * ''' * O(N log(window)) implementation using skip list */ __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_47roll_min, NULL, __pyx_n_s_pandas_algos); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1488; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_roll_min, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1488; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/algos.pyx":1496 * @cython.boundscheck(False) * @cython.wraparound(False) * def roll_min2(np.ndarray[np.float64_t, ndim=1] a, int window, int minp): # <<<<<<<<<<<<<< * "Moving min of 1d array of dtype=float64 along axis=0 ignoring NaNs." * cdef np.float64_t ai, aold */ __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_49roll_min2, NULL, __pyx_n_s_pandas_algos); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1496; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_roll_min2, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1496; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/algos.pyx":1582 * return NaN * * def roll_quantile(ndarray[float64_t, cast=True] input, int win, # <<<<<<<<<<<<<< * int minp, double quantile): * ''' */ __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_51roll_quantile, NULL, __pyx_n_s_pandas_algos); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1582; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_roll_quantile, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1582; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/algos.pyx":1629 * return output * * def roll_generic(ndarray[float64_t, cast=True] input, int win, # <<<<<<<<<<<<<< * int minp, object func): * cdef ndarray[double_t] output, counts, bufarr */ __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_53roll_generic, NULL, __pyx_n_s_pandas_algos); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1629; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_roll_generic, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1629; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/algos.pyx":1671 * * * def roll_window(ndarray[float64_t, ndim=1, cast=True] input, # <<<<<<<<<<<<<< * ndarray[float64_t, ndim=1, cast=True] weights, * int minp, bint avg=True, bint avg_wgt=False): */ __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_55roll_window, NULL, __pyx_n_s_pandas_algos); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1671; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_roll_window, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1671; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/algos.pyx":1744 * @cython.wraparound(False) * @cython.boundscheck(False) * def is_lexsorted(list list_of_arrays): # <<<<<<<<<<<<<< * cdef: * int i */ __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_57is_lexsorted, NULL, __pyx_n_s_pandas_algos); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1744; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_is_lexsorted, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1744; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/algos.pyx":1777 * * @cython.boundscheck(False) * def groupby_indices(ndarray values): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = len(values) */ __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_59groupby_indices, NULL, __pyx_n_s_pandas_algos); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1777; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_groupby_indices, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1777; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/algos.pyx":1814 * @cython.wraparound(False) * @cython.boundscheck(False) * def group_labels(ndarray[object] values): # <<<<<<<<<<<<<< * ''' * Compute label vector from input values and associated useful data */ __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_61group_labels, NULL, __pyx_n_s_pandas_algos); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1814; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_group_labels, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1814; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/algos.pyx":1856 * @cython.boundscheck(False) * @cython.wraparound(False) * def groupsort_indexer(ndarray[int64_t] index, Py_ssize_t ngroups): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, loc, label, n */ __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_63groupsort_indexer, NULL, __pyx_n_s_pandas_algos); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1856; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_groupsort_indexer, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1856; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/algos.pyx":1887 * @cython.boundscheck(False) * @cython.wraparound(False) * def group_nth_object(ndarray[object, ndim=2] out, # <<<<<<<<<<<<<< * ndarray[int64_t] counts, * ndarray[object, ndim=2] values, */ __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_65group_nth_object, NULL, __pyx_n_s_pandas_algos); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1887; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_group_nth_object, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1887; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/algos.pyx":1931 * @cython.boundscheck(False) * @cython.wraparound(False) * def group_nth_bin_object(ndarray[object, ndim=2] out, # <<<<<<<<<<<<<< * ndarray[int64_t] counts, * ndarray[object, ndim=2] values, */ __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_67group_nth_bin_object, NULL, __pyx_n_s_pandas_algos); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1931; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_group_nth_bin_object, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1931; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/algos.pyx":1979 * @cython.boundscheck(False) * @cython.wraparound(False) * def group_last_object(ndarray[object, ndim=2] out, # <<<<<<<<<<<<<< * ndarray[int64_t] counts, * ndarray[object, ndim=2] values, */ __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_69group_last_object, NULL, __pyx_n_s_pandas_algos); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1979; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_group_last_object, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1979; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/algos.pyx":2021 * @cython.boundscheck(False) * @cython.wraparound(False) * def group_last_bin_object(ndarray[object, ndim=2] out, # <<<<<<<<<<<<<< * ndarray[int64_t] counts, * ndarray[object, ndim=2] values, */ __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_71group_last_bin_object, NULL, __pyx_n_s_pandas_algos); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2021; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_group_last_bin_object, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2021; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/algos.pyx":2071 * # median * * def group_median(ndarray[float64_t, ndim=2] out, # <<<<<<<<<<<<<< * ndarray[int64_t] counts, * ndarray[float64_t, ndim=2] values, */ __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_73group_median, NULL, __pyx_n_s_pandas_algos); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2071; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_group_median, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2071; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/join.pyx":1 * def inner_join(ndarray[int64_t] left, ndarray[int64_t] right, # <<<<<<<<<<<<<< * Py_ssize_t max_groups): * cdef: */ __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_75inner_join, NULL, __pyx_n_s_pandas_algos); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_inner_join, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/join.pyx":51 * _get_result_indexer(right_sorter, right_indexer)) * * def left_outer_join(ndarray[int64_t] left, ndarray[int64_t] right, # <<<<<<<<<<<<<< * Py_ssize_t max_groups, sort=True): * cdef: */ __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_77left_outer_join, NULL, __pyx_n_s_pandas_algos); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_left_outer_join, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/join.pyx":120 * * * def full_outer_join(ndarray[int64_t] left, ndarray[int64_t] right, # <<<<<<<<<<<<<< * Py_ssize_t max_groups): * cdef: */ __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_79full_outer_join, NULL, __pyx_n_s_pandas_algos); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 120; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_full_outer_join, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 120; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/join.pyx":184 * * * def _get_result_indexer(sorter, indexer): # <<<<<<<<<<<<<< * if indexer.dtype != np.int_: * indexer = indexer.astype(np.int_) */ __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_81_get_result_indexer, NULL, __pyx_n_s_pandas_algos); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 184; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_get_result_indexer, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 184; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/join.pyx":199 * * * def ffill_indexer(ndarray[int64_t] indexer): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = len(indexer) */ __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_83ffill_indexer, NULL, __pyx_n_s_pandas_algos); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 199; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_ffill_indexer, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 199; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/join.pyx":219 * * * def ffill_by_group(ndarray[int64_t] indexer, ndarray[int64_t] group_ids, # <<<<<<<<<<<<<< * int64_t max_group): * cdef: */ __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_85ffill_by_group, NULL, __pyx_n_s_pandas_algos); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 219; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_ffill_by_group, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 219; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/generated.pyx":17 * cimport cpython * * import numpy as np # <<<<<<<<<<<<<< * isnan = np.isnan * */ __pyx_t_3 = __Pyx_Import(__pyx_n_s_numpy, 0, -1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 17; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_np, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 17; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/generated.pyx":18 * * import numpy as np * isnan = np.isnan # <<<<<<<<<<<<<< * * from datetime import datetime as pydatetime */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 18; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_isnan); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 18; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (PyDict_SetItem(__pyx_d, __pyx_n_s_isnan, __pyx_t_12) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 18; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; /* "pandas/src/generated.pyx":20 * isnan = np.isnan * * from datetime import datetime as pydatetime # <<<<<<<<<<<<<< * * # this is our datetime.pxd */ __pyx_t_12 = PyList_New(1); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 20; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __Pyx_INCREF(__pyx_n_s_datetime); PyList_SET_ITEM(__pyx_t_12, 0, __pyx_n_s_datetime); __Pyx_GIVEREF(__pyx_n_s_datetime); __pyx_t_3 = __Pyx_Import(__pyx_n_s_datetime, __pyx_t_12, -1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 20; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __pyx_t_12 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_datetime); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 20; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); if (PyDict_SetItem(__pyx_d, __pyx_n_s_pydatetime, __pyx_t_12) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 20; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/generated.pyx":33 * * # import datetime C API * PyDateTime_IMPORT # <<<<<<<<<<<<<< * * # initialize numpy */ PyDateTime_IMPORT; /* "pandas/src/generated.pyx":36 * * # initialize numpy * import_array() # <<<<<<<<<<<<<< * import_ufunc() * */ import_array(); /* "pandas/src/generated.pyx":37 * # initialize numpy * import_array() * import_ufunc() # <<<<<<<<<<<<<< * * cdef int PLATFORM_INT = ( np.arange(0, dtype=np.int_)).descr.type_num */ import_ufunc(); /* "pandas/src/generated.pyx":39 * import_ufunc() * * cdef int PLATFORM_INT = ( np.arange(0, dtype=np.int_)).descr.type_num # <<<<<<<<<<<<<< * * cpdef ensure_platform_int(object arr): */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 39; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_arange); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 39; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 39; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 39; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_int); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 39; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dtype, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 39; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_Call(__pyx_t_12, __pyx_tuple__289, __pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 39; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_13 = ((PyArrayObject *)__pyx_t_2)->descr->type_num; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_6pandas_5algos_PLATFORM_INT = __pyx_t_13; /* "pandas/src/generated.pyx":257 * @cython.boundscheck(False) * @cython.wraparound(False) * def pad_float64(ndarray[float64_t] old, ndarray[float64_t] new, # <<<<<<<<<<<<<< * limit=None): * cdef Py_ssize_t i, j, nleft, nright */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_115pad_float64, NULL, __pyx_n_s_pandas_algos); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 257; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_pad_float64, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 257; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":318 * @cython.boundscheck(False) * @cython.wraparound(False) * def pad_float32(ndarray[float32_t] old, ndarray[float32_t] new, # <<<<<<<<<<<<<< * limit=None): * cdef Py_ssize_t i, j, nleft, nright */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_117pad_float32, NULL, __pyx_n_s_pandas_algos); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 318; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_pad_float32, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 318; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":379 * @cython.boundscheck(False) * @cython.wraparound(False) * def pad_object(ndarray[object] old, ndarray[object] new, # <<<<<<<<<<<<<< * limit=None): * cdef Py_ssize_t i, j, nleft, nright */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_119pad_object, NULL, __pyx_n_s_pandas_algos); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 379; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_pad_object, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 379; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":440 * @cython.boundscheck(False) * @cython.wraparound(False) * def pad_int32(ndarray[int32_t] old, ndarray[int32_t] new, # <<<<<<<<<<<<<< * limit=None): * cdef Py_ssize_t i, j, nleft, nright */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_121pad_int32, NULL, __pyx_n_s_pandas_algos); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 440; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_pad_int32, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 440; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":501 * @cython.boundscheck(False) * @cython.wraparound(False) * def pad_int64(ndarray[int64_t] old, ndarray[int64_t] new, # <<<<<<<<<<<<<< * limit=None): * cdef Py_ssize_t i, j, nleft, nright */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_123pad_int64, NULL, __pyx_n_s_pandas_algos); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 501; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_pad_int64, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 501; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":562 * @cython.boundscheck(False) * @cython.wraparound(False) * def pad_bool(ndarray[uint8_t] old, ndarray[uint8_t] new, # <<<<<<<<<<<<<< * limit=None): * cdef Py_ssize_t i, j, nleft, nright */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_125pad_bool, NULL, __pyx_n_s_pandas_algos); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 562; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_pad_bool, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 562; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":624 * @cython.boundscheck(False) * @cython.wraparound(False) * def backfill_float64(ndarray[float64_t] old, ndarray[float64_t] new, # <<<<<<<<<<<<<< * limit=None): * cdef Py_ssize_t i, j, nleft, nright */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_127backfill_float64, NULL, __pyx_n_s_pandas_algos); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 624; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_backfill_float64, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 624; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":686 * @cython.boundscheck(False) * @cython.wraparound(False) * def backfill_float32(ndarray[float32_t] old, ndarray[float32_t] new, # <<<<<<<<<<<<<< * limit=None): * cdef Py_ssize_t i, j, nleft, nright */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_129backfill_float32, NULL, __pyx_n_s_pandas_algos); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 686; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_backfill_float32, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 686; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":748 * @cython.boundscheck(False) * @cython.wraparound(False) * def backfill_object(ndarray[object] old, ndarray[object] new, # <<<<<<<<<<<<<< * limit=None): * cdef Py_ssize_t i, j, nleft, nright */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_131backfill_object, NULL, __pyx_n_s_pandas_algos); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 748; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_backfill_object, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 748; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":810 * @cython.boundscheck(False) * @cython.wraparound(False) * def backfill_int32(ndarray[int32_t] old, ndarray[int32_t] new, # <<<<<<<<<<<<<< * limit=None): * cdef Py_ssize_t i, j, nleft, nright */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_133backfill_int32, NULL, __pyx_n_s_pandas_algos); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 810; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_backfill_int32, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 810; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":872 * @cython.boundscheck(False) * @cython.wraparound(False) * def backfill_int64(ndarray[int64_t] old, ndarray[int64_t] new, # <<<<<<<<<<<<<< * limit=None): * cdef Py_ssize_t i, j, nleft, nright */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_135backfill_int64, NULL, __pyx_n_s_pandas_algos); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 872; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_backfill_int64, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 872; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":934 * @cython.boundscheck(False) * @cython.wraparound(False) * def backfill_bool(ndarray[uint8_t] old, ndarray[uint8_t] new, # <<<<<<<<<<<<<< * limit=None): * cdef Py_ssize_t i, j, nleft, nright */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_137backfill_bool, NULL, __pyx_n_s_pandas_algos); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 934; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_backfill_bool, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 934; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":997 * @cython.boundscheck(False) * @cython.wraparound(False) * def pad_inplace_float64(ndarray[float64_t] values, # <<<<<<<<<<<<<< * ndarray[uint8_t, cast=True] mask, * limit=None): */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_139pad_inplace_float64, NULL, __pyx_n_s_pandas_algos); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 997; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_pad_inplace_float64, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 997; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":1030 * @cython.boundscheck(False) * @cython.wraparound(False) * def pad_inplace_float32(ndarray[float32_t] values, # <<<<<<<<<<<<<< * ndarray[uint8_t, cast=True] mask, * limit=None): */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_141pad_inplace_float32, NULL, __pyx_n_s_pandas_algos); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1030; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_pad_inplace_float32, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1030; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":1063 * @cython.boundscheck(False) * @cython.wraparound(False) * def pad_inplace_object(ndarray[object] values, # <<<<<<<<<<<<<< * ndarray[uint8_t, cast=True] mask, * limit=None): */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_143pad_inplace_object, NULL, __pyx_n_s_pandas_algos); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1063; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_pad_inplace_object, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1063; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":1096 * @cython.boundscheck(False) * @cython.wraparound(False) * def pad_inplace_int32(ndarray[int32_t] values, # <<<<<<<<<<<<<< * ndarray[uint8_t, cast=True] mask, * limit=None): */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_145pad_inplace_int32, NULL, __pyx_n_s_pandas_algos); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1096; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_pad_inplace_int32, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1096; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":1129 * @cython.boundscheck(False) * @cython.wraparound(False) * def pad_inplace_int64(ndarray[int64_t] values, # <<<<<<<<<<<<<< * ndarray[uint8_t, cast=True] mask, * limit=None): */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_147pad_inplace_int64, NULL, __pyx_n_s_pandas_algos); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1129; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_pad_inplace_int64, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1129; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":1162 * @cython.boundscheck(False) * @cython.wraparound(False) * def pad_inplace_bool(ndarray[uint8_t] values, # <<<<<<<<<<<<<< * ndarray[uint8_t, cast=True] mask, * limit=None): */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_149pad_inplace_bool, NULL, __pyx_n_s_pandas_algos); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1162; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_pad_inplace_bool, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1162; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":1196 * @cython.boundscheck(False) * @cython.wraparound(False) * def backfill_inplace_float64(ndarray[float64_t] values, # <<<<<<<<<<<<<< * ndarray[uint8_t, cast=True] mask, * limit=None): */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_151backfill_inplace_float64, NULL, __pyx_n_s_pandas_algos); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1196; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_backfill_inplace_float64, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1196; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":1228 * @cython.boundscheck(False) * @cython.wraparound(False) * def backfill_inplace_float32(ndarray[float32_t] values, # <<<<<<<<<<<<<< * ndarray[uint8_t, cast=True] mask, * limit=None): */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_153backfill_inplace_float32, NULL, __pyx_n_s_pandas_algos); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1228; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_backfill_inplace_float32, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1228; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":1260 * @cython.boundscheck(False) * @cython.wraparound(False) * def backfill_inplace_object(ndarray[object] values, # <<<<<<<<<<<<<< * ndarray[uint8_t, cast=True] mask, * limit=None): */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_155backfill_inplace_object, NULL, __pyx_n_s_pandas_algos); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1260; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_backfill_inplace_object, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1260; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":1292 * @cython.boundscheck(False) * @cython.wraparound(False) * def backfill_inplace_int32(ndarray[int32_t] values, # <<<<<<<<<<<<<< * ndarray[uint8_t, cast=True] mask, * limit=None): */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_157backfill_inplace_int32, NULL, __pyx_n_s_pandas_algos); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1292; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_backfill_inplace_int32, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1292; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":1324 * @cython.boundscheck(False) * @cython.wraparound(False) * def backfill_inplace_int64(ndarray[int64_t] values, # <<<<<<<<<<<<<< * ndarray[uint8_t, cast=True] mask, * limit=None): */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_159backfill_inplace_int64, NULL, __pyx_n_s_pandas_algos); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1324; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_backfill_inplace_int64, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1324; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":1356 * @cython.boundscheck(False) * @cython.wraparound(False) * def backfill_inplace_bool(ndarray[uint8_t] values, # <<<<<<<<<<<<<< * ndarray[uint8_t, cast=True] mask, * limit=None): */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_161backfill_inplace_bool, NULL, __pyx_n_s_pandas_algos); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1356; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_backfill_inplace_bool, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1356; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":1389 * @cython.boundscheck(False) * @cython.wraparound(False) * def pad_2d_inplace_float64(ndarray[float64_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[uint8_t, ndim=2] mask, * limit=None): */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_163pad_2d_inplace_float64, NULL, __pyx_n_s_pandas_algos); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1389; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_pad_2d_inplace_float64, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1389; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":1423 * @cython.boundscheck(False) * @cython.wraparound(False) * def pad_2d_inplace_float32(ndarray[float32_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[uint8_t, ndim=2] mask, * limit=None): */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_165pad_2d_inplace_float32, NULL, __pyx_n_s_pandas_algos); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1423; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_pad_2d_inplace_float32, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1423; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":1457 * @cython.boundscheck(False) * @cython.wraparound(False) * def pad_2d_inplace_object(ndarray[object, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[uint8_t, ndim=2] mask, * limit=None): */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_167pad_2d_inplace_object, NULL, __pyx_n_s_pandas_algos); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1457; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_pad_2d_inplace_object, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1457; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":1491 * @cython.boundscheck(False) * @cython.wraparound(False) * def pad_2d_inplace_int32(ndarray[int32_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[uint8_t, ndim=2] mask, * limit=None): */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_169pad_2d_inplace_int32, NULL, __pyx_n_s_pandas_algos); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1491; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_pad_2d_inplace_int32, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1491; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":1525 * @cython.boundscheck(False) * @cython.wraparound(False) * def pad_2d_inplace_int64(ndarray[int64_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[uint8_t, ndim=2] mask, * limit=None): */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_171pad_2d_inplace_int64, NULL, __pyx_n_s_pandas_algos); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1525; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_pad_2d_inplace_int64, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1525; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":1559 * @cython.boundscheck(False) * @cython.wraparound(False) * def pad_2d_inplace_bool(ndarray[uint8_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[uint8_t, ndim=2] mask, * limit=None): */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_173pad_2d_inplace_bool, NULL, __pyx_n_s_pandas_algos); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1559; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_pad_2d_inplace_bool, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1559; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":1594 * @cython.boundscheck(False) * @cython.wraparound(False) * def backfill_2d_inplace_float64(ndarray[float64_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[uint8_t, ndim=2] mask, * limit=None): */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_175backfill_2d_inplace_float64, NULL, __pyx_n_s_pandas_algos); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1594; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_backfill_2d_inplace_float64, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1594; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":1628 * @cython.boundscheck(False) * @cython.wraparound(False) * def backfill_2d_inplace_float32(ndarray[float32_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[uint8_t, ndim=2] mask, * limit=None): */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_177backfill_2d_inplace_float32, NULL, __pyx_n_s_pandas_algos); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1628; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_backfill_2d_inplace_float32, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1628; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":1662 * @cython.boundscheck(False) * @cython.wraparound(False) * def backfill_2d_inplace_object(ndarray[object, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[uint8_t, ndim=2] mask, * limit=None): */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_179backfill_2d_inplace_object, NULL, __pyx_n_s_pandas_algos); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1662; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_backfill_2d_inplace_object, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1662; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":1696 * @cython.boundscheck(False) * @cython.wraparound(False) * def backfill_2d_inplace_int32(ndarray[int32_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[uint8_t, ndim=2] mask, * limit=None): */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_181backfill_2d_inplace_int32, NULL, __pyx_n_s_pandas_algos); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1696; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_backfill_2d_inplace_int32, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1696; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":1730 * @cython.boundscheck(False) * @cython.wraparound(False) * def backfill_2d_inplace_int64(ndarray[int64_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[uint8_t, ndim=2] mask, * limit=None): */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_183backfill_2d_inplace_int64, NULL, __pyx_n_s_pandas_algos); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1730; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_backfill_2d_inplace_int64, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1730; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":1764 * @cython.boundscheck(False) * @cython.wraparound(False) * def backfill_2d_inplace_bool(ndarray[uint8_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[uint8_t, ndim=2] mask, * limit=None): */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_185backfill_2d_inplace_bool, NULL, __pyx_n_s_pandas_algos); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1764; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_backfill_2d_inplace_bool, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1764; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":1799 * @cython.boundscheck(False) * @cython.wraparound(False) * def is_monotonic_float64(ndarray[float64_t] arr): # <<<<<<<<<<<<<< * ''' * Returns */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_187is_monotonic_float64, NULL, __pyx_n_s_pandas_algos); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1799; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_is_monotonic_float64, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1799; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":1826 * @cython.boundscheck(False) * @cython.wraparound(False) * def is_monotonic_float32(ndarray[float32_t] arr): # <<<<<<<<<<<<<< * ''' * Returns */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_189is_monotonic_float32, NULL, __pyx_n_s_pandas_algos); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1826; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_is_monotonic_float32, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1826; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":1853 * @cython.boundscheck(False) * @cython.wraparound(False) * def is_monotonic_object(ndarray[object] arr): # <<<<<<<<<<<<<< * ''' * Returns */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_191is_monotonic_object, NULL, __pyx_n_s_pandas_algos); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1853; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_is_monotonic_object, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1853; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":1880 * @cython.boundscheck(False) * @cython.wraparound(False) * def is_monotonic_int32(ndarray[int32_t] arr): # <<<<<<<<<<<<<< * ''' * Returns */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_193is_monotonic_int32, NULL, __pyx_n_s_pandas_algos); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1880; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_is_monotonic_int32, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1880; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":1907 * @cython.boundscheck(False) * @cython.wraparound(False) * def is_monotonic_int64(ndarray[int64_t] arr): # <<<<<<<<<<<<<< * ''' * Returns */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_195is_monotonic_int64, NULL, __pyx_n_s_pandas_algos); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1907; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_is_monotonic_int64, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1907; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":1934 * @cython.boundscheck(False) * @cython.wraparound(False) * def is_monotonic_bool(ndarray[uint8_t] arr): # <<<<<<<<<<<<<< * ''' * Returns */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_197is_monotonic_bool, NULL, __pyx_n_s_pandas_algos); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1934; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_is_monotonic_bool, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1934; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":1962 * @cython.wraparound(False) * @cython.boundscheck(False) * def groupby_float64(ndarray[float64_t] index, ndarray labels): # <<<<<<<<<<<<<< * cdef dict result = {} * cdef Py_ssize_t i, length */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_199groupby_float64, NULL, __pyx_n_s_pandas_algos); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1962; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_groupby_float64, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1962; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":1990 * @cython.wraparound(False) * @cython.boundscheck(False) * def groupby_float32(ndarray[float32_t] index, ndarray labels): # <<<<<<<<<<<<<< * cdef dict result = {} * cdef Py_ssize_t i, length */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_201groupby_float32, NULL, __pyx_n_s_pandas_algos); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1990; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_groupby_float32, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1990; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":2018 * @cython.wraparound(False) * @cython.boundscheck(False) * def groupby_object(ndarray[object] index, ndarray labels): # <<<<<<<<<<<<<< * cdef dict result = {} * cdef Py_ssize_t i, length */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_203groupby_object, NULL, __pyx_n_s_pandas_algos); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2018; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_groupby_object, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2018; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":2046 * @cython.wraparound(False) * @cython.boundscheck(False) * def groupby_int32(ndarray[int32_t] index, ndarray labels): # <<<<<<<<<<<<<< * cdef dict result = {} * cdef Py_ssize_t i, length */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_205groupby_int32, NULL, __pyx_n_s_pandas_algos); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2046; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_groupby_int32, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2046; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":2074 * @cython.wraparound(False) * @cython.boundscheck(False) * def groupby_int64(ndarray[int64_t] index, ndarray labels): # <<<<<<<<<<<<<< * cdef dict result = {} * cdef Py_ssize_t i, length */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_207groupby_int64, NULL, __pyx_n_s_pandas_algos); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2074; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_groupby_int64, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2074; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":2102 * @cython.wraparound(False) * @cython.boundscheck(False) * def groupby_bool(ndarray[uint8_t] index, ndarray labels): # <<<<<<<<<<<<<< * cdef dict result = {} * cdef Py_ssize_t i, length */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_209groupby_bool, NULL, __pyx_n_s_pandas_algos); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2102; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_groupby_bool, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2102; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":2131 * @cython.wraparound(False) * @cython.boundscheck(False) * def arrmap_float64(ndarray[float64_t] index, object func): # <<<<<<<<<<<<<< * cdef Py_ssize_t length = index.shape[0] * cdef Py_ssize_t i = 0 */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_211arrmap_float64, NULL, __pyx_n_s_pandas_algos); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2131; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_arrmap_float64, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2131; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":2146 * @cython.wraparound(False) * @cython.boundscheck(False) * def arrmap_float32(ndarray[float32_t] index, object func): # <<<<<<<<<<<<<< * cdef Py_ssize_t length = index.shape[0] * cdef Py_ssize_t i = 0 */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_213arrmap_float32, NULL, __pyx_n_s_pandas_algos); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2146; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_arrmap_float32, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2146; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":2161 * @cython.wraparound(False) * @cython.boundscheck(False) * def arrmap_object(ndarray[object] index, object func): # <<<<<<<<<<<<<< * cdef Py_ssize_t length = index.shape[0] * cdef Py_ssize_t i = 0 */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_215arrmap_object, NULL, __pyx_n_s_pandas_algos); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2161; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_arrmap_object, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2161; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":2176 * @cython.wraparound(False) * @cython.boundscheck(False) * def arrmap_int32(ndarray[int32_t] index, object func): # <<<<<<<<<<<<<< * cdef Py_ssize_t length = index.shape[0] * cdef Py_ssize_t i = 0 */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_217arrmap_int32, NULL, __pyx_n_s_pandas_algos); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2176; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_arrmap_int32, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2176; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":2191 * @cython.wraparound(False) * @cython.boundscheck(False) * def arrmap_int64(ndarray[int64_t] index, object func): # <<<<<<<<<<<<<< * cdef Py_ssize_t length = index.shape[0] * cdef Py_ssize_t i = 0 */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_219arrmap_int64, NULL, __pyx_n_s_pandas_algos); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2191; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_arrmap_int64, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2191; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":2206 * @cython.wraparound(False) * @cython.boundscheck(False) * def arrmap_bool(ndarray[uint8_t] index, object func): # <<<<<<<<<<<<<< * cdef Py_ssize_t length = index.shape[0] * cdef Py_ssize_t i = 0 */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_221arrmap_bool, NULL, __pyx_n_s_pandas_algos); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2206; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_arrmap_bool, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2206; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":2224 * ndarray[int64_t] indexer, * ndarray[uint8_t] out, * fill_value=np.nan): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n, idx */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2224; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_nan); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2224; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_k__101 = __pyx_t_3; __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/generated.pyx":2221 * * @cython.wraparound(False) * def take_1d_bool_bool(ndarray[uint8_t] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[uint8_t] out, */ __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_223take_1d_bool_bool, NULL, __pyx_n_s_pandas_algos); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2221; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_take_1d_bool_bool, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2221; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/generated.pyx":2243 * ndarray[int64_t] indexer, * ndarray[object] out, * fill_value=np.nan): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n, idx */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2243; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_nan); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2243; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_k__102 = __pyx_t_2; __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":2240 * * @cython.wraparound(False) * def take_1d_bool_object(ndarray[uint8_t] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[object] out, */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_225take_1d_bool_object, NULL, __pyx_n_s_pandas_algos); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2240; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_take_1d_bool_object, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2240; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":2262 * ndarray[int64_t] indexer, * ndarray[int8_t] out, * fill_value=np.nan): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n, idx */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2262; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_nan); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2262; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_k__103 = __pyx_t_3; __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/generated.pyx":2259 * * @cython.wraparound(False) * def take_1d_int8_int8(ndarray[int8_t] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[int8_t] out, */ __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_227take_1d_int8_int8, NULL, __pyx_n_s_pandas_algos); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2259; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_take_1d_int8_int8, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2259; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/generated.pyx":2281 * ndarray[int64_t] indexer, * ndarray[int32_t] out, * fill_value=np.nan): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n, idx */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2281; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_nan); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2281; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_k__104 = __pyx_t_2; __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":2278 * * @cython.wraparound(False) * def take_1d_int8_int32(ndarray[int8_t] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[int32_t] out, */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_229take_1d_int8_int32, NULL, __pyx_n_s_pandas_algos); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2278; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_take_1d_int8_int32, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2278; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":2300 * ndarray[int64_t] indexer, * ndarray[int64_t] out, * fill_value=np.nan): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n, idx */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2300; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_nan); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2300; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_k__105 = __pyx_t_3; __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/generated.pyx":2297 * * @cython.wraparound(False) * def take_1d_int8_int64(ndarray[int8_t] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[int64_t] out, */ __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_231take_1d_int8_int64, NULL, __pyx_n_s_pandas_algos); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2297; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_take_1d_int8_int64, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2297; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/generated.pyx":2319 * ndarray[int64_t] indexer, * ndarray[float64_t] out, * fill_value=np.nan): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n, idx */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2319; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_nan); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2319; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_k__106 = __pyx_t_2; __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":2316 * * @cython.wraparound(False) * def take_1d_int8_float64(ndarray[int8_t] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[float64_t] out, */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_233take_1d_int8_float64, NULL, __pyx_n_s_pandas_algos); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2316; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_take_1d_int8_float64, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2316; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":2338 * ndarray[int64_t] indexer, * ndarray[int16_t] out, * fill_value=np.nan): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n, idx */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2338; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_nan); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2338; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_k__107 = __pyx_t_3; __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/generated.pyx":2335 * * @cython.wraparound(False) * def take_1d_int16_int16(ndarray[int16_t] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[int16_t] out, */ __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_235take_1d_int16_int16, NULL, __pyx_n_s_pandas_algos); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2335; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_take_1d_int16_int16, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2335; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/generated.pyx":2357 * ndarray[int64_t] indexer, * ndarray[int32_t] out, * fill_value=np.nan): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n, idx */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2357; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_nan); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2357; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_k__108 = __pyx_t_2; __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":2354 * * @cython.wraparound(False) * def take_1d_int16_int32(ndarray[int16_t] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[int32_t] out, */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_237take_1d_int16_int32, NULL, __pyx_n_s_pandas_algos); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2354; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_take_1d_int16_int32, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2354; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":2376 * ndarray[int64_t] indexer, * ndarray[int64_t] out, * fill_value=np.nan): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n, idx */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2376; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_nan); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2376; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_k__109 = __pyx_t_3; __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/generated.pyx":2373 * * @cython.wraparound(False) * def take_1d_int16_int64(ndarray[int16_t] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[int64_t] out, */ __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_239take_1d_int16_int64, NULL, __pyx_n_s_pandas_algos); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2373; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_take_1d_int16_int64, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2373; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/generated.pyx":2395 * ndarray[int64_t] indexer, * ndarray[float64_t] out, * fill_value=np.nan): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n, idx */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2395; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_nan); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2395; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_k__110 = __pyx_t_2; __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":2392 * * @cython.wraparound(False) * def take_1d_int16_float64(ndarray[int16_t] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[float64_t] out, */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_241take_1d_int16_float64, NULL, __pyx_n_s_pandas_algos); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2392; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_take_1d_int16_float64, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2392; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":2414 * ndarray[int64_t] indexer, * ndarray[int32_t] out, * fill_value=np.nan): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n, idx */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2414; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_nan); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2414; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_k__111 = __pyx_t_3; __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/generated.pyx":2411 * * @cython.wraparound(False) * def take_1d_int32_int32(ndarray[int32_t] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[int32_t] out, */ __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_243take_1d_int32_int32, NULL, __pyx_n_s_pandas_algos); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2411; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_take_1d_int32_int32, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2411; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/generated.pyx":2433 * ndarray[int64_t] indexer, * ndarray[int64_t] out, * fill_value=np.nan): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n, idx */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2433; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_nan); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2433; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_k__112 = __pyx_t_2; __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":2430 * * @cython.wraparound(False) * def take_1d_int32_int64(ndarray[int32_t] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[int64_t] out, */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_245take_1d_int32_int64, NULL, __pyx_n_s_pandas_algos); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2430; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_take_1d_int32_int64, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2430; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":2452 * ndarray[int64_t] indexer, * ndarray[float64_t] out, * fill_value=np.nan): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n, idx */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2452; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_nan); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2452; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_k__113 = __pyx_t_3; __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/generated.pyx":2449 * * @cython.wraparound(False) * def take_1d_int32_float64(ndarray[int32_t] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[float64_t] out, */ __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_247take_1d_int32_float64, NULL, __pyx_n_s_pandas_algos); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2449; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_take_1d_int32_float64, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2449; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/generated.pyx":2471 * ndarray[int64_t] indexer, * ndarray[int64_t] out, * fill_value=np.nan): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n, idx */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2471; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_nan); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2471; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_k__114 = __pyx_t_2; __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":2468 * * @cython.wraparound(False) * def take_1d_int64_int64(ndarray[int64_t] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[int64_t] out, */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_249take_1d_int64_int64, NULL, __pyx_n_s_pandas_algos); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2468; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_take_1d_int64_int64, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2468; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":2490 * ndarray[int64_t] indexer, * ndarray[float64_t] out, * fill_value=np.nan): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n, idx */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2490; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_nan); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2490; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_k__115 = __pyx_t_3; __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/generated.pyx":2487 * * @cython.wraparound(False) * def take_1d_int64_float64(ndarray[int64_t] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[float64_t] out, */ __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_251take_1d_int64_float64, NULL, __pyx_n_s_pandas_algos); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2487; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_take_1d_int64_float64, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2487; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/generated.pyx":2509 * ndarray[int64_t] indexer, * ndarray[float32_t] out, * fill_value=np.nan): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n, idx */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2509; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_nan); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2509; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_k__116 = __pyx_t_2; __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":2506 * * @cython.wraparound(False) * def take_1d_float32_float32(ndarray[float32_t] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[float32_t] out, */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_253take_1d_float32_float32, NULL, __pyx_n_s_pandas_algos); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2506; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_take_1d_float32_float32, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2506; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":2528 * ndarray[int64_t] indexer, * ndarray[float64_t] out, * fill_value=np.nan): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n, idx */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2528; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_nan); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2528; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_k__117 = __pyx_t_3; __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/generated.pyx":2525 * * @cython.wraparound(False) * def take_1d_float32_float64(ndarray[float32_t] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[float64_t] out, */ __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_255take_1d_float32_float64, NULL, __pyx_n_s_pandas_algos); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2525; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_take_1d_float32_float64, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2525; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/generated.pyx":2547 * ndarray[int64_t] indexer, * ndarray[float64_t] out, * fill_value=np.nan): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n, idx */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2547; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_nan); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2547; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_k__118 = __pyx_t_2; __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":2544 * * @cython.wraparound(False) * def take_1d_float64_float64(ndarray[float64_t] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[float64_t] out, */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_257take_1d_float64_float64, NULL, __pyx_n_s_pandas_algos); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2544; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_take_1d_float64_float64, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2544; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":2566 * ndarray[int64_t] indexer, * ndarray[object] out, * fill_value=np.nan): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n, idx */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2566; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_nan); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2566; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_k__119 = __pyx_t_3; __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/generated.pyx":2563 * * @cython.wraparound(False) * def take_1d_object_object(ndarray[object] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[object] out, */ __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_259take_1d_object_object, NULL, __pyx_n_s_pandas_algos); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2563; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_take_1d_object_object, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2563; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/generated.pyx":2587 * ndarray[int64_t] indexer, * ndarray[uint8_t, ndim=2] out, * fill_value=np.nan): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, j, k, n, idx */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2587; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_nan); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2587; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_k__120 = __pyx_t_2; __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":2584 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_axis0_bool_bool(ndarray[uint8_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[uint8_t, ndim=2] out, */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_261take_2d_axis0_bool_bool, NULL, __pyx_n_s_pandas_algos); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2584; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_take_2d_axis0_bool_bool, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2584; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":2630 * ndarray[int64_t] indexer, * ndarray[object, ndim=2] out, * fill_value=np.nan): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, j, k, n, idx */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2630; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_nan); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2630; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_k__121 = __pyx_t_3; __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/generated.pyx":2627 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_axis0_bool_object(ndarray[uint8_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[object, ndim=2] out, */ __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_263take_2d_axis0_bool_object, NULL, __pyx_n_s_pandas_algos); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2627; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_take_2d_axis0_bool_object, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2627; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/generated.pyx":2673 * ndarray[int64_t] indexer, * ndarray[int8_t, ndim=2] out, * fill_value=np.nan): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, j, k, n, idx */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2673; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_nan); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2673; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_k__122 = __pyx_t_2; __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":2670 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_axis0_int8_int8(ndarray[int8_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[int8_t, ndim=2] out, */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_265take_2d_axis0_int8_int8, NULL, __pyx_n_s_pandas_algos); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2670; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_take_2d_axis0_int8_int8, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2670; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":2716 * ndarray[int64_t] indexer, * ndarray[int32_t, ndim=2] out, * fill_value=np.nan): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, j, k, n, idx */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2716; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_nan); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2716; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_k__123 = __pyx_t_3; __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/generated.pyx":2713 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_axis0_int8_int32(ndarray[int8_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[int32_t, ndim=2] out, */ __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_267take_2d_axis0_int8_int32, NULL, __pyx_n_s_pandas_algos); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2713; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_take_2d_axis0_int8_int32, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2713; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/generated.pyx":2759 * ndarray[int64_t] indexer, * ndarray[int64_t, ndim=2] out, * fill_value=np.nan): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, j, k, n, idx */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2759; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_nan); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2759; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_k__124 = __pyx_t_2; __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":2756 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_axis0_int8_int64(ndarray[int8_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[int64_t, ndim=2] out, */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_269take_2d_axis0_int8_int64, NULL, __pyx_n_s_pandas_algos); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2756; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_take_2d_axis0_int8_int64, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2756; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":2802 * ndarray[int64_t] indexer, * ndarray[float64_t, ndim=2] out, * fill_value=np.nan): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, j, k, n, idx */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2802; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_nan); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2802; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_k__125 = __pyx_t_3; __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/generated.pyx":2799 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_axis0_int8_float64(ndarray[int8_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[float64_t, ndim=2] out, */ __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_271take_2d_axis0_int8_float64, NULL, __pyx_n_s_pandas_algos); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2799; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_take_2d_axis0_int8_float64, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2799; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/generated.pyx":2845 * ndarray[int64_t] indexer, * ndarray[int16_t, ndim=2] out, * fill_value=np.nan): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, j, k, n, idx */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2845; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_nan); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2845; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_k__126 = __pyx_t_2; __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":2842 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_axis0_int16_int16(ndarray[int16_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[int16_t, ndim=2] out, */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_273take_2d_axis0_int16_int16, NULL, __pyx_n_s_pandas_algos); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2842; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_take_2d_axis0_int16_int16, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2842; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":2888 * ndarray[int64_t] indexer, * ndarray[int32_t, ndim=2] out, * fill_value=np.nan): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, j, k, n, idx */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2888; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_nan); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2888; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_k__127 = __pyx_t_3; __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/generated.pyx":2885 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_axis0_int16_int32(ndarray[int16_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[int32_t, ndim=2] out, */ __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_275take_2d_axis0_int16_int32, NULL, __pyx_n_s_pandas_algos); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2885; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_take_2d_axis0_int16_int32, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2885; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/generated.pyx":2931 * ndarray[int64_t] indexer, * ndarray[int64_t, ndim=2] out, * fill_value=np.nan): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, j, k, n, idx */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2931; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_nan); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2931; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_k__128 = __pyx_t_2; __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":2928 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_axis0_int16_int64(ndarray[int16_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[int64_t, ndim=2] out, */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_277take_2d_axis0_int16_int64, NULL, __pyx_n_s_pandas_algos); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2928; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_take_2d_axis0_int16_int64, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2928; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":2974 * ndarray[int64_t] indexer, * ndarray[float64_t, ndim=2] out, * fill_value=np.nan): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, j, k, n, idx */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2974; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_nan); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2974; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_k__129 = __pyx_t_3; __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/generated.pyx":2971 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_axis0_int16_float64(ndarray[int16_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[float64_t, ndim=2] out, */ __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_279take_2d_axis0_int16_float64, NULL, __pyx_n_s_pandas_algos); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2971; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_take_2d_axis0_int16_float64, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2971; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/generated.pyx":3017 * ndarray[int64_t] indexer, * ndarray[int32_t, ndim=2] out, * fill_value=np.nan): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, j, k, n, idx */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3017; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_nan); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3017; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_k__130 = __pyx_t_2; __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":3014 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_axis0_int32_int32(ndarray[int32_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[int32_t, ndim=2] out, */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_281take_2d_axis0_int32_int32, NULL, __pyx_n_s_pandas_algos); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3014; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_take_2d_axis0_int32_int32, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3014; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":3060 * ndarray[int64_t] indexer, * ndarray[int64_t, ndim=2] out, * fill_value=np.nan): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, j, k, n, idx */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3060; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_nan); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3060; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_k__131 = __pyx_t_3; __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/generated.pyx":3057 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_axis0_int32_int64(ndarray[int32_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[int64_t, ndim=2] out, */ __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_283take_2d_axis0_int32_int64, NULL, __pyx_n_s_pandas_algos); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3057; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_take_2d_axis0_int32_int64, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3057; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/generated.pyx":3103 * ndarray[int64_t] indexer, * ndarray[float64_t, ndim=2] out, * fill_value=np.nan): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, j, k, n, idx */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3103; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_nan); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3103; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_k__132 = __pyx_t_2; __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":3100 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_axis0_int32_float64(ndarray[int32_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[float64_t, ndim=2] out, */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_285take_2d_axis0_int32_float64, NULL, __pyx_n_s_pandas_algos); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3100; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_take_2d_axis0_int32_float64, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3100; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":3146 * ndarray[int64_t] indexer, * ndarray[int64_t, ndim=2] out, * fill_value=np.nan): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, j, k, n, idx */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3146; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_nan); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3146; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_k__133 = __pyx_t_3; __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/generated.pyx":3143 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_axis0_int64_int64(ndarray[int64_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[int64_t, ndim=2] out, */ __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_287take_2d_axis0_int64_int64, NULL, __pyx_n_s_pandas_algos); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3143; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_take_2d_axis0_int64_int64, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3143; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/generated.pyx":3189 * ndarray[int64_t] indexer, * ndarray[float64_t, ndim=2] out, * fill_value=np.nan): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, j, k, n, idx */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3189; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_nan); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3189; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_k__134 = __pyx_t_2; __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":3186 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_axis0_int64_float64(ndarray[int64_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[float64_t, ndim=2] out, */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_289take_2d_axis0_int64_float64, NULL, __pyx_n_s_pandas_algos); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3186; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_take_2d_axis0_int64_float64, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3186; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":3232 * ndarray[int64_t] indexer, * ndarray[float32_t, ndim=2] out, * fill_value=np.nan): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, j, k, n, idx */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3232; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_nan); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3232; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_k__135 = __pyx_t_3; __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/generated.pyx":3229 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_axis0_float32_float32(ndarray[float32_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[float32_t, ndim=2] out, */ __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_291take_2d_axis0_float32_float32, NULL, __pyx_n_s_pandas_algos); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3229; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_take_2d_axis0_float32_float32, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3229; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/generated.pyx":3275 * ndarray[int64_t] indexer, * ndarray[float64_t, ndim=2] out, * fill_value=np.nan): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, j, k, n, idx */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3275; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_nan); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3275; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_k__136 = __pyx_t_2; __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":3272 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_axis0_float32_float64(ndarray[float32_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[float64_t, ndim=2] out, */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_293take_2d_axis0_float32_float64, NULL, __pyx_n_s_pandas_algos); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3272; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_take_2d_axis0_float32_float64, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3272; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":3318 * ndarray[int64_t] indexer, * ndarray[float64_t, ndim=2] out, * fill_value=np.nan): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, j, k, n, idx */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3318; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_nan); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3318; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_k__137 = __pyx_t_3; __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/generated.pyx":3315 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_axis0_float64_float64(ndarray[float64_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[float64_t, ndim=2] out, */ __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_295take_2d_axis0_float64_float64, NULL, __pyx_n_s_pandas_algos); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3315; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_take_2d_axis0_float64_float64, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3315; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/generated.pyx":3361 * ndarray[int64_t] indexer, * ndarray[object, ndim=2] out, * fill_value=np.nan): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, j, k, n, idx */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3361; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_nan); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3361; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_k__138 = __pyx_t_2; __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":3358 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_axis0_object_object(ndarray[object, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[object, ndim=2] out, */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_297take_2d_axis0_object_object, NULL, __pyx_n_s_pandas_algos); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3358; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_take_2d_axis0_object_object, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3358; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":3405 * ndarray[int64_t] indexer, * ndarray[uint8_t, ndim=2] out, * fill_value=np.nan): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, j, k, n, idx */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3405; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_nan); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3405; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_k__139 = __pyx_t_3; __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/generated.pyx":3402 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_axis1_bool_bool(ndarray[uint8_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[uint8_t, ndim=2] out, */ __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_299take_2d_axis1_bool_bool, NULL, __pyx_n_s_pandas_algos); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3402; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_take_2d_axis1_bool_bool, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3402; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/generated.pyx":3451 * ndarray[int64_t] indexer, * ndarray[object, ndim=2] out, * fill_value=np.nan): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, j, k, n, idx */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3451; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_nan); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3451; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_k__140 = __pyx_t_2; __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":3448 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_axis1_bool_object(ndarray[uint8_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[object, ndim=2] out, */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_301take_2d_axis1_bool_object, NULL, __pyx_n_s_pandas_algos); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3448; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_take_2d_axis1_bool_object, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3448; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":3497 * ndarray[int64_t] indexer, * ndarray[int8_t, ndim=2] out, * fill_value=np.nan): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, j, k, n, idx */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3497; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_nan); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3497; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_k__141 = __pyx_t_3; __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/generated.pyx":3494 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_axis1_int8_int8(ndarray[int8_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[int8_t, ndim=2] out, */ __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_303take_2d_axis1_int8_int8, NULL, __pyx_n_s_pandas_algos); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3494; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_take_2d_axis1_int8_int8, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3494; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/generated.pyx":3543 * ndarray[int64_t] indexer, * ndarray[int32_t, ndim=2] out, * fill_value=np.nan): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, j, k, n, idx */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3543; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_nan); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3543; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_k__142 = __pyx_t_2; __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":3540 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_axis1_int8_int32(ndarray[int8_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[int32_t, ndim=2] out, */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_305take_2d_axis1_int8_int32, NULL, __pyx_n_s_pandas_algos); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3540; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_take_2d_axis1_int8_int32, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3540; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":3589 * ndarray[int64_t] indexer, * ndarray[int64_t, ndim=2] out, * fill_value=np.nan): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, j, k, n, idx */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3589; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_nan); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3589; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_k__143 = __pyx_t_3; __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/generated.pyx":3586 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_axis1_int8_int64(ndarray[int8_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[int64_t, ndim=2] out, */ __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_307take_2d_axis1_int8_int64, NULL, __pyx_n_s_pandas_algos); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3586; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_take_2d_axis1_int8_int64, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3586; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/generated.pyx":3635 * ndarray[int64_t] indexer, * ndarray[float64_t, ndim=2] out, * fill_value=np.nan): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, j, k, n, idx */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3635; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_nan); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3635; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_k__144 = __pyx_t_2; __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":3632 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_axis1_int8_float64(ndarray[int8_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[float64_t, ndim=2] out, */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_309take_2d_axis1_int8_float64, NULL, __pyx_n_s_pandas_algos); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3632; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_take_2d_axis1_int8_float64, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3632; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":3681 * ndarray[int64_t] indexer, * ndarray[int16_t, ndim=2] out, * fill_value=np.nan): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, j, k, n, idx */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3681; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_nan); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3681; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_k__145 = __pyx_t_3; __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/generated.pyx":3678 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_axis1_int16_int16(ndarray[int16_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[int16_t, ndim=2] out, */ __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_311take_2d_axis1_int16_int16, NULL, __pyx_n_s_pandas_algos); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3678; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_take_2d_axis1_int16_int16, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3678; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/generated.pyx":3727 * ndarray[int64_t] indexer, * ndarray[int32_t, ndim=2] out, * fill_value=np.nan): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, j, k, n, idx */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3727; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_nan); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3727; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_k__146 = __pyx_t_2; __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":3724 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_axis1_int16_int32(ndarray[int16_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[int32_t, ndim=2] out, */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_313take_2d_axis1_int16_int32, NULL, __pyx_n_s_pandas_algos); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3724; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_take_2d_axis1_int16_int32, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3724; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":3773 * ndarray[int64_t] indexer, * ndarray[int64_t, ndim=2] out, * fill_value=np.nan): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, j, k, n, idx */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3773; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_nan); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3773; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_k__147 = __pyx_t_3; __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/generated.pyx":3770 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_axis1_int16_int64(ndarray[int16_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[int64_t, ndim=2] out, */ __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_315take_2d_axis1_int16_int64, NULL, __pyx_n_s_pandas_algos); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3770; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_take_2d_axis1_int16_int64, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3770; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/generated.pyx":3819 * ndarray[int64_t] indexer, * ndarray[float64_t, ndim=2] out, * fill_value=np.nan): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, j, k, n, idx */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3819; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_nan); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3819; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_k__148 = __pyx_t_2; __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":3816 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_axis1_int16_float64(ndarray[int16_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[float64_t, ndim=2] out, */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_317take_2d_axis1_int16_float64, NULL, __pyx_n_s_pandas_algos); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3816; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_take_2d_axis1_int16_float64, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3816; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":3865 * ndarray[int64_t] indexer, * ndarray[int32_t, ndim=2] out, * fill_value=np.nan): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, j, k, n, idx */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3865; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_nan); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3865; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_k__149 = __pyx_t_3; __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/generated.pyx":3862 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_axis1_int32_int32(ndarray[int32_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[int32_t, ndim=2] out, */ __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_319take_2d_axis1_int32_int32, NULL, __pyx_n_s_pandas_algos); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3862; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_take_2d_axis1_int32_int32, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3862; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/generated.pyx":3911 * ndarray[int64_t] indexer, * ndarray[int64_t, ndim=2] out, * fill_value=np.nan): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, j, k, n, idx */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3911; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_nan); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3911; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_k__150 = __pyx_t_2; __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":3908 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_axis1_int32_int64(ndarray[int32_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[int64_t, ndim=2] out, */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_321take_2d_axis1_int32_int64, NULL, __pyx_n_s_pandas_algos); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3908; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_take_2d_axis1_int32_int64, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3908; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":3957 * ndarray[int64_t] indexer, * ndarray[float64_t, ndim=2] out, * fill_value=np.nan): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, j, k, n, idx */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3957; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_nan); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3957; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_k__151 = __pyx_t_3; __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/generated.pyx":3954 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_axis1_int32_float64(ndarray[int32_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[float64_t, ndim=2] out, */ __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_323take_2d_axis1_int32_float64, NULL, __pyx_n_s_pandas_algos); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3954; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_take_2d_axis1_int32_float64, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3954; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/generated.pyx":4003 * ndarray[int64_t] indexer, * ndarray[int64_t, ndim=2] out, * fill_value=np.nan): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, j, k, n, idx */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4003; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_nan); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4003; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_k__152 = __pyx_t_2; __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":4000 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_axis1_int64_int64(ndarray[int64_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[int64_t, ndim=2] out, */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_325take_2d_axis1_int64_int64, NULL, __pyx_n_s_pandas_algos); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4000; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_take_2d_axis1_int64_int64, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4000; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":4049 * ndarray[int64_t] indexer, * ndarray[float64_t, ndim=2] out, * fill_value=np.nan): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, j, k, n, idx */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4049; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_nan); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4049; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_k__153 = __pyx_t_3; __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/generated.pyx":4046 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_axis1_int64_float64(ndarray[int64_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[float64_t, ndim=2] out, */ __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_327take_2d_axis1_int64_float64, NULL, __pyx_n_s_pandas_algos); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4046; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_take_2d_axis1_int64_float64, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4046; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/generated.pyx":4095 * ndarray[int64_t] indexer, * ndarray[float32_t, ndim=2] out, * fill_value=np.nan): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, j, k, n, idx */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4095; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_nan); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4095; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_k__154 = __pyx_t_2; __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":4092 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_axis1_float32_float32(ndarray[float32_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[float32_t, ndim=2] out, */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_329take_2d_axis1_float32_float32, NULL, __pyx_n_s_pandas_algos); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4092; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_take_2d_axis1_float32_float32, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4092; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":4141 * ndarray[int64_t] indexer, * ndarray[float64_t, ndim=2] out, * fill_value=np.nan): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, j, k, n, idx */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4141; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_nan); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4141; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_k__155 = __pyx_t_3; __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/generated.pyx":4138 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_axis1_float32_float64(ndarray[float32_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[float64_t, ndim=2] out, */ __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_331take_2d_axis1_float32_float64, NULL, __pyx_n_s_pandas_algos); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4138; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_take_2d_axis1_float32_float64, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4138; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/generated.pyx":4187 * ndarray[int64_t] indexer, * ndarray[float64_t, ndim=2] out, * fill_value=np.nan): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, j, k, n, idx */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4187; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_nan); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4187; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_k__156 = __pyx_t_2; __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":4184 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_axis1_float64_float64(ndarray[float64_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[float64_t, ndim=2] out, */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_333take_2d_axis1_float64_float64, NULL, __pyx_n_s_pandas_algos); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4184; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_take_2d_axis1_float64_float64, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4184; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":4233 * ndarray[int64_t] indexer, * ndarray[object, ndim=2] out, * fill_value=np.nan): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, j, k, n, idx */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4233; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_nan); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4233; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_k__157 = __pyx_t_3; __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/generated.pyx":4230 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_axis1_object_object(ndarray[object, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[object, ndim=2] out, */ __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_335take_2d_axis1_object_object, NULL, __pyx_n_s_pandas_algos); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4230; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_take_2d_axis1_object_object, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4230; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/generated.pyx":4280 * indexer, * ndarray[uint8_t, ndim=2] out, * fill_value=np.nan): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, j, k, n, idx */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4280; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_nan); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4280; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_k__158 = __pyx_t_2; __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":4277 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_multi_bool_bool(ndarray[uint8_t, ndim=2] values, # <<<<<<<<<<<<<< * indexer, * ndarray[uint8_t, ndim=2] out, */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_337take_2d_multi_bool_bool, NULL, __pyx_n_s_pandas_algos); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4277; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_take_2d_multi_bool_bool, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4277; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":4308 * indexer, * ndarray[object, ndim=2] out, * fill_value=np.nan): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, j, k, n, idx */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4308; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_nan); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4308; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_k__159 = __pyx_t_3; __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/generated.pyx":4305 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_multi_bool_object(ndarray[uint8_t, ndim=2] values, # <<<<<<<<<<<<<< * indexer, * ndarray[object, ndim=2] out, */ __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_339take_2d_multi_bool_object, NULL, __pyx_n_s_pandas_algos); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4305; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_take_2d_multi_bool_object, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4305; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/generated.pyx":4336 * indexer, * ndarray[int8_t, ndim=2] out, * fill_value=np.nan): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, j, k, n, idx */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4336; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_nan); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4336; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_k__160 = __pyx_t_2; __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":4333 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_multi_int8_int8(ndarray[int8_t, ndim=2] values, # <<<<<<<<<<<<<< * indexer, * ndarray[int8_t, ndim=2] out, */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_341take_2d_multi_int8_int8, NULL, __pyx_n_s_pandas_algos); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4333; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_take_2d_multi_int8_int8, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4333; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":4364 * indexer, * ndarray[int32_t, ndim=2] out, * fill_value=np.nan): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, j, k, n, idx */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4364; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_nan); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4364; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_k__161 = __pyx_t_3; __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/generated.pyx":4361 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_multi_int8_int32(ndarray[int8_t, ndim=2] values, # <<<<<<<<<<<<<< * indexer, * ndarray[int32_t, ndim=2] out, */ __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_343take_2d_multi_int8_int32, NULL, __pyx_n_s_pandas_algos); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4361; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_take_2d_multi_int8_int32, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4361; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/generated.pyx":4392 * indexer, * ndarray[int64_t, ndim=2] out, * fill_value=np.nan): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, j, k, n, idx */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4392; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_nan); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4392; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_k__162 = __pyx_t_2; __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":4389 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_multi_int8_int64(ndarray[int8_t, ndim=2] values, # <<<<<<<<<<<<<< * indexer, * ndarray[int64_t, ndim=2] out, */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_345take_2d_multi_int8_int64, NULL, __pyx_n_s_pandas_algos); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4389; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_take_2d_multi_int8_int64, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4389; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":4420 * indexer, * ndarray[float64_t, ndim=2] out, * fill_value=np.nan): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, j, k, n, idx */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4420; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_nan); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4420; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_k__163 = __pyx_t_3; __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/generated.pyx":4417 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_multi_int8_float64(ndarray[int8_t, ndim=2] values, # <<<<<<<<<<<<<< * indexer, * ndarray[float64_t, ndim=2] out, */ __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_347take_2d_multi_int8_float64, NULL, __pyx_n_s_pandas_algos); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4417; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_take_2d_multi_int8_float64, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4417; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/generated.pyx":4448 * indexer, * ndarray[int16_t, ndim=2] out, * fill_value=np.nan): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, j, k, n, idx */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4448; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_nan); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4448; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_k__164 = __pyx_t_2; __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":4445 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_multi_int16_int16(ndarray[int16_t, ndim=2] values, # <<<<<<<<<<<<<< * indexer, * ndarray[int16_t, ndim=2] out, */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_349take_2d_multi_int16_int16, NULL, __pyx_n_s_pandas_algos); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4445; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_take_2d_multi_int16_int16, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4445; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":4476 * indexer, * ndarray[int32_t, ndim=2] out, * fill_value=np.nan): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, j, k, n, idx */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4476; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_nan); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4476; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_k__165 = __pyx_t_3; __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/generated.pyx":4473 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_multi_int16_int32(ndarray[int16_t, ndim=2] values, # <<<<<<<<<<<<<< * indexer, * ndarray[int32_t, ndim=2] out, */ __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_351take_2d_multi_int16_int32, NULL, __pyx_n_s_pandas_algos); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4473; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_take_2d_multi_int16_int32, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4473; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/generated.pyx":4504 * indexer, * ndarray[int64_t, ndim=2] out, * fill_value=np.nan): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, j, k, n, idx */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4504; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_nan); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4504; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_k__166 = __pyx_t_2; __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":4501 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_multi_int16_int64(ndarray[int16_t, ndim=2] values, # <<<<<<<<<<<<<< * indexer, * ndarray[int64_t, ndim=2] out, */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_353take_2d_multi_int16_int64, NULL, __pyx_n_s_pandas_algos); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4501; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_take_2d_multi_int16_int64, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4501; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":4532 * indexer, * ndarray[float64_t, ndim=2] out, * fill_value=np.nan): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, j, k, n, idx */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4532; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_nan); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4532; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_k__167 = __pyx_t_3; __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/generated.pyx":4529 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_multi_int16_float64(ndarray[int16_t, ndim=2] values, # <<<<<<<<<<<<<< * indexer, * ndarray[float64_t, ndim=2] out, */ __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_355take_2d_multi_int16_float64, NULL, __pyx_n_s_pandas_algos); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4529; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_take_2d_multi_int16_float64, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4529; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/generated.pyx":4560 * indexer, * ndarray[int32_t, ndim=2] out, * fill_value=np.nan): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, j, k, n, idx */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4560; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_nan); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4560; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_k__168 = __pyx_t_2; __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":4557 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_multi_int32_int32(ndarray[int32_t, ndim=2] values, # <<<<<<<<<<<<<< * indexer, * ndarray[int32_t, ndim=2] out, */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_357take_2d_multi_int32_int32, NULL, __pyx_n_s_pandas_algos); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4557; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_take_2d_multi_int32_int32, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4557; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":4588 * indexer, * ndarray[int64_t, ndim=2] out, * fill_value=np.nan): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, j, k, n, idx */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4588; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_nan); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4588; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_k__169 = __pyx_t_3; __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/generated.pyx":4585 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_multi_int32_int64(ndarray[int32_t, ndim=2] values, # <<<<<<<<<<<<<< * indexer, * ndarray[int64_t, ndim=2] out, */ __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_359take_2d_multi_int32_int64, NULL, __pyx_n_s_pandas_algos); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4585; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_take_2d_multi_int32_int64, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4585; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/generated.pyx":4616 * indexer, * ndarray[float64_t, ndim=2] out, * fill_value=np.nan): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, j, k, n, idx */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4616; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_nan); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4616; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_k__170 = __pyx_t_2; __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":4613 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_multi_int32_float64(ndarray[int32_t, ndim=2] values, # <<<<<<<<<<<<<< * indexer, * ndarray[float64_t, ndim=2] out, */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_361take_2d_multi_int32_float64, NULL, __pyx_n_s_pandas_algos); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4613; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_take_2d_multi_int32_float64, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4613; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":4644 * indexer, * ndarray[int64_t, ndim=2] out, * fill_value=np.nan): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, j, k, n, idx */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4644; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_nan); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4644; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_k__171 = __pyx_t_3; __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/generated.pyx":4641 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_multi_int64_int64(ndarray[int64_t, ndim=2] values, # <<<<<<<<<<<<<< * indexer, * ndarray[int64_t, ndim=2] out, */ __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_363take_2d_multi_int64_int64, NULL, __pyx_n_s_pandas_algos); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4641; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_take_2d_multi_int64_int64, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4641; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/generated.pyx":4672 * indexer, * ndarray[float64_t, ndim=2] out, * fill_value=np.nan): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, j, k, n, idx */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4672; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_nan); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4672; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_k__172 = __pyx_t_2; __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":4669 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_multi_int64_float64(ndarray[int64_t, ndim=2] values, # <<<<<<<<<<<<<< * indexer, * ndarray[float64_t, ndim=2] out, */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_365take_2d_multi_int64_float64, NULL, __pyx_n_s_pandas_algos); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4669; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_take_2d_multi_int64_float64, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4669; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":4700 * indexer, * ndarray[float32_t, ndim=2] out, * fill_value=np.nan): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, j, k, n, idx */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4700; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_nan); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4700; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_k__173 = __pyx_t_3; __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/generated.pyx":4697 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_multi_float32_float32(ndarray[float32_t, ndim=2] values, # <<<<<<<<<<<<<< * indexer, * ndarray[float32_t, ndim=2] out, */ __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_367take_2d_multi_float32_float32, NULL, __pyx_n_s_pandas_algos); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4697; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_take_2d_multi_float32_float32, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4697; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/generated.pyx":4728 * indexer, * ndarray[float64_t, ndim=2] out, * fill_value=np.nan): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, j, k, n, idx */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4728; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_nan); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4728; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_k__174 = __pyx_t_2; __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":4725 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_multi_float32_float64(ndarray[float32_t, ndim=2] values, # <<<<<<<<<<<<<< * indexer, * ndarray[float64_t, ndim=2] out, */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_369take_2d_multi_float32_float64, NULL, __pyx_n_s_pandas_algos); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4725; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_take_2d_multi_float32_float64, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4725; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":4756 * indexer, * ndarray[float64_t, ndim=2] out, * fill_value=np.nan): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, j, k, n, idx */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4756; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_nan); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4756; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_k__175 = __pyx_t_3; __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/generated.pyx":4753 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_multi_float64_float64(ndarray[float64_t, ndim=2] values, # <<<<<<<<<<<<<< * indexer, * ndarray[float64_t, ndim=2] out, */ __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_371take_2d_multi_float64_float64, NULL, __pyx_n_s_pandas_algos); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4753; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_take_2d_multi_float64_float64, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4753; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/generated.pyx":4784 * indexer, * ndarray[object, ndim=2] out, * fill_value=np.nan): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, j, k, n, idx */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4784; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_nan); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4784; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_k__176 = __pyx_t_2; __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":4781 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_multi_object_object(ndarray[object, ndim=2] values, # <<<<<<<<<<<<<< * indexer, * ndarray[object, ndim=2] out, */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_373take_2d_multi_object_object, NULL, __pyx_n_s_pandas_algos); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4781; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_take_2d_multi_object_object, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4781; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":4810 * @cython.boundscheck(False) * @cython.wraparound(False) * def diff_2d_float64(ndarray[float64_t, ndim=2] arr, # <<<<<<<<<<<<<< * ndarray[float64_t, ndim=2] out, * Py_ssize_t periods, int axis): */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_375diff_2d_float64, NULL, __pyx_n_s_pandas_algos); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4810; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_diff_2d_float64, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4810; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":4853 * @cython.boundscheck(False) * @cython.wraparound(False) * def diff_2d_float32(ndarray[float32_t, ndim=2] arr, # <<<<<<<<<<<<<< * ndarray[float32_t, ndim=2] out, * Py_ssize_t periods, int axis): */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_377diff_2d_float32, NULL, __pyx_n_s_pandas_algos); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4853; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_diff_2d_float32, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4853; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":4896 * @cython.boundscheck(False) * @cython.wraparound(False) * def diff_2d_int8(ndarray[int8_t, ndim=2] arr, # <<<<<<<<<<<<<< * ndarray[float32_t, ndim=2] out, * Py_ssize_t periods, int axis): */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_379diff_2d_int8, NULL, __pyx_n_s_pandas_algos); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4896; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_diff_2d_int8, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4896; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":4939 * @cython.boundscheck(False) * @cython.wraparound(False) * def diff_2d_int16(ndarray[int16_t, ndim=2] arr, # <<<<<<<<<<<<<< * ndarray[float32_t, ndim=2] out, * Py_ssize_t periods, int axis): */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_381diff_2d_int16, NULL, __pyx_n_s_pandas_algos); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4939; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_diff_2d_int16, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4939; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":4982 * @cython.boundscheck(False) * @cython.wraparound(False) * def diff_2d_int32(ndarray[int32_t, ndim=2] arr, # <<<<<<<<<<<<<< * ndarray[float64_t, ndim=2] out, * Py_ssize_t periods, int axis): */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_383diff_2d_int32, NULL, __pyx_n_s_pandas_algos); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4982; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_diff_2d_int32, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4982; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":5025 * @cython.boundscheck(False) * @cython.wraparound(False) * def diff_2d_int64(ndarray[int64_t, ndim=2] arr, # <<<<<<<<<<<<<< * ndarray[float64_t, ndim=2] out, * Py_ssize_t periods, int axis): */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_385diff_2d_int64, NULL, __pyx_n_s_pandas_algos); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5025; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_diff_2d_int64, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5025; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":5069 * @cython.wraparound(False) * @cython.wraparound(False) * def group_last_float64(ndarray[float64_t, ndim=2] out, # <<<<<<<<<<<<<< * ndarray[int64_t] counts, * ndarray[float64_t, ndim=2] values, */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_387group_last_float64, NULL, __pyx_n_s_pandas_algos); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5069; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_group_last_float64, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5069; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":5112 * @cython.wraparound(False) * @cython.wraparound(False) * def group_last_float32(ndarray[float32_t, ndim=2] out, # <<<<<<<<<<<<<< * ndarray[int64_t] counts, * ndarray[float32_t, ndim=2] values, */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_389group_last_float32, NULL, __pyx_n_s_pandas_algos); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5112; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_group_last_float32, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5112; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":5156 * @cython.wraparound(False) * @cython.wraparound(False) * def group_last_bin_float64(ndarray[float64_t, ndim=2] out, # <<<<<<<<<<<<<< * ndarray[int64_t] counts, * ndarray[float64_t, ndim=2] values, */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_391group_last_bin_float64, NULL, __pyx_n_s_pandas_algos); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5156; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_group_last_bin_float64, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5156; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":5200 * @cython.wraparound(False) * @cython.wraparound(False) * def group_last_bin_float32(ndarray[float32_t, ndim=2] out, # <<<<<<<<<<<<<< * ndarray[int64_t] counts, * ndarray[float32_t, ndim=2] values, */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_393group_last_bin_float32, NULL, __pyx_n_s_pandas_algos); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5200; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_group_last_bin_float32, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5200; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":5245 * @cython.boundscheck(False) * @cython.wraparound(False) * def group_nth_float64(ndarray[float64_t, ndim=2] out, # <<<<<<<<<<<<<< * ndarray[int64_t] counts, * ndarray[float64_t, ndim=2] values, */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_395group_nth_float64, NULL, __pyx_n_s_pandas_algos); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5245; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_group_nth_float64, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5245; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":5289 * @cython.boundscheck(False) * @cython.wraparound(False) * def group_nth_float32(ndarray[float32_t, ndim=2] out, # <<<<<<<<<<<<<< * ndarray[int64_t] counts, * ndarray[float32_t, ndim=2] values, */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_397group_nth_float32, NULL, __pyx_n_s_pandas_algos); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5289; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_group_nth_float32, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5289; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":5334 * @cython.boundscheck(False) * @cython.wraparound(False) * def group_nth_bin_float64(ndarray[float64_t, ndim=2] out, # <<<<<<<<<<<<<< * ndarray[int64_t] counts, * ndarray[float64_t, ndim=2] values, */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_399group_nth_bin_float64, NULL, __pyx_n_s_pandas_algos); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5334; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_group_nth_bin_float64, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5334; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":5379 * @cython.boundscheck(False) * @cython.wraparound(False) * def group_nth_bin_float32(ndarray[float32_t, ndim=2] out, # <<<<<<<<<<<<<< * ndarray[int64_t] counts, * ndarray[float32_t, ndim=2] values, */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_401group_nth_bin_float32, NULL, __pyx_n_s_pandas_algos); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5379; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_group_nth_bin_float32, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5379; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":5425 * @cython.boundscheck(False) * @cython.wraparound(False) * def group_add_float64(ndarray[float64_t, ndim=2] out, # <<<<<<<<<<<<<< * ndarray[int64_t] counts, * ndarray[float64_t, ndim=2] values, */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_403group_add_float64, NULL, __pyx_n_s_pandas_algos); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5425; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_group_add_float64, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5425; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":5481 * @cython.boundscheck(False) * @cython.wraparound(False) * def group_add_float32(ndarray[float32_t, ndim=2] out, # <<<<<<<<<<<<<< * ndarray[int64_t] counts, * ndarray[float32_t, ndim=2] values, */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_405group_add_float32, NULL, __pyx_n_s_pandas_algos); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5481; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_group_add_float32, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5481; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":5538 * @cython.boundscheck(False) * @cython.wraparound(False) * def group_add_bin_float64(ndarray[float64_t, ndim=2] out, # <<<<<<<<<<<<<< * ndarray[int64_t] counts, * ndarray[float64_t, ndim=2] values, */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_407group_add_bin_float64, NULL, __pyx_n_s_pandas_algos); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5538; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_group_add_bin_float64, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5538; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":5594 * @cython.boundscheck(False) * @cython.wraparound(False) * def group_add_bin_float32(ndarray[float32_t, ndim=2] out, # <<<<<<<<<<<<<< * ndarray[int64_t] counts, * ndarray[float32_t, ndim=2] values, */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_409group_add_bin_float32, NULL, __pyx_n_s_pandas_algos); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5594; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_group_add_bin_float32, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5594; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":5651 * @cython.boundscheck(False) * @cython.wraparound(False) * def group_prod_float64(ndarray[float64_t, ndim=2] out, # <<<<<<<<<<<<<< * ndarray[int64_t] counts, * ndarray[float64_t, ndim=2] values, */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_411group_prod_float64, NULL, __pyx_n_s_pandas_algos); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5651; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_group_prod_float64, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5651; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":5707 * @cython.boundscheck(False) * @cython.wraparound(False) * def group_prod_float32(ndarray[float32_t, ndim=2] out, # <<<<<<<<<<<<<< * ndarray[int64_t] counts, * ndarray[float32_t, ndim=2] values, */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_413group_prod_float32, NULL, __pyx_n_s_pandas_algos); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5707; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_group_prod_float32, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5707; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":5764 * @cython.boundscheck(False) * @cython.wraparound(False) * def group_prod_bin_float64(ndarray[float64_t, ndim=2] out, # <<<<<<<<<<<<<< * ndarray[int64_t] counts, * ndarray[float64_t, ndim=2] values, */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_415group_prod_bin_float64, NULL, __pyx_n_s_pandas_algos); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5764; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_group_prod_bin_float64, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5764; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":5820 * @cython.boundscheck(False) * @cython.wraparound(False) * def group_prod_bin_float32(ndarray[float32_t, ndim=2] out, # <<<<<<<<<<<<<< * ndarray[int64_t] counts, * ndarray[float32_t, ndim=2] values, */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_417group_prod_bin_float32, NULL, __pyx_n_s_pandas_algos); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5820; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_group_prod_bin_float32, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5820; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":5877 * @cython.wraparound(False) * @cython.boundscheck(False) * def group_var_float64(ndarray[float64_t, ndim=2] out, # <<<<<<<<<<<<<< * ndarray[int64_t] counts, * ndarray[float64_t, ndim=2] values, */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_419group_var_float64, NULL, __pyx_n_s_pandas_algos); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5877; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_group_var_float64, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5877; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":5938 * @cython.wraparound(False) * @cython.boundscheck(False) * def group_var_float32(ndarray[float32_t, ndim=2] out, # <<<<<<<<<<<<<< * ndarray[int64_t] counts, * ndarray[float32_t, ndim=2] values, */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_421group_var_float32, NULL, __pyx_n_s_pandas_algos); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5938; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_group_var_float32, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5938; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":6000 * @cython.wraparound(False) * @cython.boundscheck(False) * def group_var_bin_float64(ndarray[float64_t, ndim=2] out, # <<<<<<<<<<<<<< * ndarray[int64_t] counts, * ndarray[float64_t, ndim=2] values, */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_423group_var_bin_float64, NULL, __pyx_n_s_pandas_algos); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6000; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_group_var_bin_float64, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6000; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":6061 * @cython.wraparound(False) * @cython.boundscheck(False) * def group_var_bin_float32(ndarray[float32_t, ndim=2] out, # <<<<<<<<<<<<<< * ndarray[int64_t] counts, * ndarray[float32_t, ndim=2] values, */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_425group_var_bin_float32, NULL, __pyx_n_s_pandas_algos); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6061; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_group_var_bin_float32, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6061; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":6123 * @cython.wraparound(False) * @cython.boundscheck(False) * def group_mean_float64(ndarray[float64_t, ndim=2] out, # <<<<<<<<<<<<<< * ndarray[int64_t] counts, * ndarray[float64_t, ndim=2] values, */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_427group_mean_float64, NULL, __pyx_n_s_pandas_algos); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6123; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_group_mean_float64, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6123; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":6175 * @cython.wraparound(False) * @cython.boundscheck(False) * def group_mean_float32(ndarray[float32_t, ndim=2] out, # <<<<<<<<<<<<<< * ndarray[int64_t] counts, * ndarray[float32_t, ndim=2] values, */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_429group_mean_float32, NULL, __pyx_n_s_pandas_algos); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6175; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_group_mean_float32, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6175; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":6227 * * * def group_mean_bin_float64(ndarray[float64_t, ndim=2] out, # <<<<<<<<<<<<<< * ndarray[int64_t] counts, * ndarray[float64_t, ndim=2] values, */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_431group_mean_bin_float64, NULL, __pyx_n_s_pandas_algos); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6227; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_group_mean_bin_float64, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6227; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":6280 * out[i, j] = sumx[i, j] / count * * def group_mean_bin_float32(ndarray[float32_t, ndim=2] out, # <<<<<<<<<<<<<< * ndarray[int64_t] counts, * ndarray[float32_t, ndim=2] values, */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_433group_mean_bin_float32, NULL, __pyx_n_s_pandas_algos); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6280; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_group_mean_bin_float32, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6280; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":6335 * @cython.wraparound(False) * @cython.boundscheck(False) * def group_min_float64(ndarray[float64_t, ndim=2] out, # <<<<<<<<<<<<<< * ndarray[int64_t] counts, * ndarray[float64_t, ndim=2] values, */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_435group_min_float64, NULL, __pyx_n_s_pandas_algos); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6335; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_group_min_float64, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6335; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":6395 * @cython.wraparound(False) * @cython.boundscheck(False) * def group_min_float32(ndarray[float32_t, ndim=2] out, # <<<<<<<<<<<<<< * ndarray[int64_t] counts, * ndarray[float32_t, ndim=2] values, */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_437group_min_float32, NULL, __pyx_n_s_pandas_algos); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6395; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_group_min_float32, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6395; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":6456 * @cython.wraparound(False) * @cython.boundscheck(False) * def group_min_bin_float64(ndarray[float64_t, ndim=2] out, # <<<<<<<<<<<<<< * ndarray[int64_t] counts, * ndarray[float64_t, ndim=2] values, */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_439group_min_bin_float64, NULL, __pyx_n_s_pandas_algos); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6456; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_group_min_bin_float64, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6456; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":6517 * @cython.wraparound(False) * @cython.boundscheck(False) * def group_min_bin_float32(ndarray[float32_t, ndim=2] out, # <<<<<<<<<<<<<< * ndarray[int64_t] counts, * ndarray[float32_t, ndim=2] values, */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_441group_min_bin_float32, NULL, __pyx_n_s_pandas_algos); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6517; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_group_min_bin_float32, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6517; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":6579 * @cython.wraparound(False) * @cython.boundscheck(False) * def group_max_float64(ndarray[float64_t, ndim=2] out, # <<<<<<<<<<<<<< * ndarray[int64_t] counts, * ndarray[float64_t, ndim=2] values, */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_443group_max_float64, NULL, __pyx_n_s_pandas_algos); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6579; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_group_max_float64, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6579; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":6639 * @cython.wraparound(False) * @cython.boundscheck(False) * def group_max_float32(ndarray[float32_t, ndim=2] out, # <<<<<<<<<<<<<< * ndarray[int64_t] counts, * ndarray[float32_t, ndim=2] values, */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_445group_max_float32, NULL, __pyx_n_s_pandas_algos); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6639; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_group_max_float32, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6639; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":6700 * @cython.wraparound(False) * @cython.boundscheck(False) * def group_max_bin_float64(ndarray[float64_t, ndim=2] out, # <<<<<<<<<<<<<< * ndarray[int64_t] counts, * ndarray[float64_t, ndim=2] values, */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_447group_max_bin_float64, NULL, __pyx_n_s_pandas_algos); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6700; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_group_max_bin_float64, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6700; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":6760 * @cython.wraparound(False) * @cython.boundscheck(False) * def group_max_bin_float32(ndarray[float32_t, ndim=2] out, # <<<<<<<<<<<<<< * ndarray[int64_t] counts, * ndarray[float32_t, ndim=2] values, */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_449group_max_bin_float32, NULL, __pyx_n_s_pandas_algos); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6760; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_group_max_bin_float32, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6760; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":6821 * @cython.wraparound(False) * @cython.boundscheck(False) * def group_ohlc_float64(ndarray[float64_t, ndim=2] out, # <<<<<<<<<<<<<< * ndarray[int64_t] counts, * ndarray[float64_t, ndim=2] values, */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_451group_ohlc_float64, NULL, __pyx_n_s_pandas_algos); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6821; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_group_ohlc_float64, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6821; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":6894 * @cython.wraparound(False) * @cython.boundscheck(False) * def group_ohlc_float32(ndarray[float32_t, ndim=2] out, # <<<<<<<<<<<<<< * ndarray[int64_t] counts, * ndarray[float32_t, ndim=2] values, */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_453group_ohlc_float32, NULL, __pyx_n_s_pandas_algos); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6894; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_group_ohlc_float32, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6894; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":6968 * @cython.wraparound(False) * @cython.boundscheck(False) * def left_join_indexer_unique_float64(ndarray[float64_t] left, # <<<<<<<<<<<<<< * ndarray[float64_t] right): * cdef: */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_455left_join_indexer_unique_float64, NULL, __pyx_n_s_pandas_algos); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6968; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_left_join_indexer_unique_float64, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6968; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":7013 * @cython.wraparound(False) * @cython.boundscheck(False) * def left_join_indexer_unique_float32(ndarray[float32_t] left, # <<<<<<<<<<<<<< * ndarray[float32_t] right): * cdef: */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_457left_join_indexer_unique_float32, NULL, __pyx_n_s_pandas_algos); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7013; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_left_join_indexer_unique_float32, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7013; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":7058 * @cython.wraparound(False) * @cython.boundscheck(False) * def left_join_indexer_unique_object(ndarray[object] left, # <<<<<<<<<<<<<< * ndarray[object] right): * cdef: */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_459left_join_indexer_unique_object, NULL, __pyx_n_s_pandas_algos); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7058; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_left_join_indexer_unique_object, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7058; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":7103 * @cython.wraparound(False) * @cython.boundscheck(False) * def left_join_indexer_unique_int32(ndarray[int32_t] left, # <<<<<<<<<<<<<< * ndarray[int32_t] right): * cdef: */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_461left_join_indexer_unique_int32, NULL, __pyx_n_s_pandas_algos); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7103; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_left_join_indexer_unique_int32, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7103; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":7148 * @cython.wraparound(False) * @cython.boundscheck(False) * def left_join_indexer_unique_int64(ndarray[int64_t] left, # <<<<<<<<<<<<<< * ndarray[int64_t] right): * cdef: */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_463left_join_indexer_unique_int64, NULL, __pyx_n_s_pandas_algos); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7148; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_left_join_indexer_unique_int64, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7148; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":7193 * * * def left_join_indexer_float64(ndarray[float64_t] left, # <<<<<<<<<<<<<< * ndarray[float64_t] right): * ''' */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_465left_join_indexer_float64, NULL, __pyx_n_s_pandas_algos); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7193; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_left_join_indexer_float64, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7193; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":7295 * * * def left_join_indexer_float32(ndarray[float32_t] left, # <<<<<<<<<<<<<< * ndarray[float32_t] right): * ''' */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_467left_join_indexer_float32, NULL, __pyx_n_s_pandas_algos); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7295; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_left_join_indexer_float32, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7295; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":7397 * * * def left_join_indexer_object(ndarray[object] left, # <<<<<<<<<<<<<< * ndarray[object] right): * ''' */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_469left_join_indexer_object, NULL, __pyx_n_s_pandas_algos); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7397; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_left_join_indexer_object, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7397; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":7499 * * * def left_join_indexer_int32(ndarray[int32_t] left, # <<<<<<<<<<<<<< * ndarray[int32_t] right): * ''' */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_471left_join_indexer_int32, NULL, __pyx_n_s_pandas_algos); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7499; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_left_join_indexer_int32, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7499; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":7601 * * * def left_join_indexer_int64(ndarray[int64_t] left, # <<<<<<<<<<<<<< * ndarray[int64_t] right): * ''' */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_473left_join_indexer_int64, NULL, __pyx_n_s_pandas_algos); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7601; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_left_join_indexer_int64, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7601; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":7705 * @cython.wraparound(False) * @cython.boundscheck(False) * def outer_join_indexer_float64(ndarray[float64_t] left, # <<<<<<<<<<<<<< * ndarray[float64_t] right): * cdef: */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_475outer_join_indexer_float64, NULL, __pyx_n_s_pandas_algos); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7705; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_outer_join_indexer_float64, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7705; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":7834 * @cython.wraparound(False) * @cython.boundscheck(False) * def outer_join_indexer_float32(ndarray[float32_t] left, # <<<<<<<<<<<<<< * ndarray[float32_t] right): * cdef: */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_477outer_join_indexer_float32, NULL, __pyx_n_s_pandas_algos); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7834; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_outer_join_indexer_float32, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7834; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":7963 * @cython.wraparound(False) * @cython.boundscheck(False) * def outer_join_indexer_object(ndarray[object] left, # <<<<<<<<<<<<<< * ndarray[object] right): * cdef: */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_479outer_join_indexer_object, NULL, __pyx_n_s_pandas_algos); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7963; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_outer_join_indexer_object, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7963; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":8092 * @cython.wraparound(False) * @cython.boundscheck(False) * def outer_join_indexer_int32(ndarray[int32_t] left, # <<<<<<<<<<<<<< * ndarray[int32_t] right): * cdef: */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_481outer_join_indexer_int32, NULL, __pyx_n_s_pandas_algos); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8092; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_outer_join_indexer_int32, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8092; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":8221 * @cython.wraparound(False) * @cython.boundscheck(False) * def outer_join_indexer_int64(ndarray[int64_t] left, # <<<<<<<<<<<<<< * ndarray[int64_t] right): * cdef: */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_483outer_join_indexer_int64, NULL, __pyx_n_s_pandas_algos); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8221; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_outer_join_indexer_int64, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8221; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":8351 * @cython.wraparound(False) * @cython.boundscheck(False) * def inner_join_indexer_float64(ndarray[float64_t] left, # <<<<<<<<<<<<<< * ndarray[float64_t] right): * ''' */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_485inner_join_indexer_float64, NULL, __pyx_n_s_pandas_algos); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8351; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_inner_join_indexer_float64, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8351; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":8444 * @cython.wraparound(False) * @cython.boundscheck(False) * def inner_join_indexer_float32(ndarray[float32_t] left, # <<<<<<<<<<<<<< * ndarray[float32_t] right): * ''' */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_487inner_join_indexer_float32, NULL, __pyx_n_s_pandas_algos); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8444; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_inner_join_indexer_float32, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8444; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":8537 * @cython.wraparound(False) * @cython.boundscheck(False) * def inner_join_indexer_object(ndarray[object] left, # <<<<<<<<<<<<<< * ndarray[object] right): * ''' */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_489inner_join_indexer_object, NULL, __pyx_n_s_pandas_algos); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8537; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_inner_join_indexer_object, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8537; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":8630 * @cython.wraparound(False) * @cython.boundscheck(False) * def inner_join_indexer_int32(ndarray[int32_t] left, # <<<<<<<<<<<<<< * ndarray[int32_t] right): * ''' */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_491inner_join_indexer_int32, NULL, __pyx_n_s_pandas_algos); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8630; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_inner_join_indexer_int32, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8630; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":8723 * @cython.wraparound(False) * @cython.boundscheck(False) * def inner_join_indexer_int64(ndarray[int64_t] left, # <<<<<<<<<<<<<< * ndarray[int64_t] right): * ''' */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_493inner_join_indexer_int64, NULL, __pyx_n_s_pandas_algos); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8723; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_inner_join_indexer_int64, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8723; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/algos.pyx":1 * from numpy cimport * # <<<<<<<<<<<<<< * cimport numpy as np * import numpy as np */ __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_test, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "util.pxd":84 * return False * * cdef inline bint _checknan(object val): # <<<<<<<<<<<<<< * return not cnp.PyArray_Check(val) and val != val */ 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_12); if (__pyx_m) { __Pyx_AddTraceback("init pandas.algos", __pyx_clineno, __pyx_lineno, __pyx_filename); Py_DECREF(__pyx_m); __pyx_m = 0; } else if (!PyErr_Occurred()) { PyErr_SetString(PyExc_ImportError, "init pandas.algos"); } __pyx_L0:; __Pyx_RefNannyFinishContext(); #if PY_MAJOR_VERSION < 3 return; #else return __pyx_m; #endif } /* Runtime support code */ #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 /* CYTHON_REFNANNY */ 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; } 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); } 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 } 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; } static CYTHON_INLINE void __Pyx_ErrRestore(PyObject *type, PyObject *value, PyObject *tb) { #if CYTHON_COMPILING_IN_CPYTHON PyObject *tmp_type, *tmp_value, *tmp_tb; PyThreadState *tstate = PyThreadState_GET(); 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); #else PyErr_Restore(type, value, tb); #endif } static CYTHON_INLINE void __Pyx_ErrFetch(PyObject **type, PyObject **value, PyObject **tb) { #if CYTHON_COMPILING_IN_CPYTHON PyThreadState *tstate = PyThreadState_GET(); *type = tstate->curexc_type; *value = tstate->curexc_value; *tb = tstate->curexc_traceback; tstate->curexc_type = 0; tstate->curexc_value = 0; tstate->curexc_traceback = 0; #else PyErr_Fetch(type, value, tb); #endif } static void __Pyx_WriteUnraisable(const char *name, CYTHON_UNUSED int clineno, CYTHON_UNUSED int lineno, CYTHON_UNUSED const char *filename, int full_traceback) { PyObject *old_exc, *old_val, *old_tb; PyObject *ctx; __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); } } static void __Pyx_RaiseArgumentTypeInvalid(const char* name, PyObject *obj, PyTypeObject *type) { PyErr_Format(PyExc_TypeError, "Argument '%.200s' has incorrect type (expected %.200s, got %.200s)", name, type->tp_name, Py_TYPE(obj)->tp_name); } static CYTHON_INLINE int __Pyx_ArgTypeTest(PyObject *obj, PyTypeObject *type, int none_allowed, const char *name, int exact) { if (unlikely(!type)) { PyErr_SetString(PyExc_SystemError, "Missing type object"); return 0; } if (none_allowed && obj == Py_None) return 1; else if (exact) { if (likely(Py_TYPE(obj) == type)) return 1; #if PY_MAJOR_VERSION == 2 else if ((type == &PyBaseString_Type) && likely(__Pyx_PyBaseString_CheckExact(obj))) return 1; #endif } else { if (likely(PyObject_TypeCheck(obj, type))) return 1; } __Pyx_RaiseArgumentTypeInvalid(name, obj, type); return 0; } static CYTHON_INLINE PyObject *__Pyx_GetModuleGlobalName(PyObject *name) { PyObject *result; #if CYTHON_COMPILING_IN_CPYTHON result = PyDict_GetItem(__pyx_d, name); if (result) { Py_INCREF(result); } else { #else result = PyObject_GetItem(__pyx_d, name); if (!result) { PyErr_Clear(); #endif result = __Pyx_GetBuiltinName(name); } return result; } static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j) { PyObject *r; if (!j) return NULL; r = PyObject_GetItem(o, j); Py_DECREF(j); return r; } static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i, int wraparound, int boundscheck) { #if CYTHON_COMPILING_IN_CPYTHON if (wraparound & unlikely(i < 0)) i += PyList_GET_SIZE(o); if ((!boundscheck) || likely((0 <= i) & (i < PyList_GET_SIZE(o)))) { PyObject *r = PyList_GET_ITEM(o, i); Py_INCREF(r); return r; } return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i)); #else return PySequence_GetItem(o, i); #endif } static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i, int wraparound, int boundscheck) { #if CYTHON_COMPILING_IN_CPYTHON if (wraparound & unlikely(i < 0)) i += PyTuple_GET_SIZE(o); if ((!boundscheck) || likely((0 <= i) & (i < PyTuple_GET_SIZE(o)))) { PyObject *r = PyTuple_GET_ITEM(o, i); Py_INCREF(r); return r; } return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i)); #else return PySequence_GetItem(o, i); #endif } static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, int is_list, int wraparound, int boundscheck) { #if CYTHON_COMPILING_IN_CPYTHON if (is_list || PyList_CheckExact(o)) { Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyList_GET_SIZE(o); if ((!boundscheck) || (likely((n >= 0) & (n < PyList_GET_SIZE(o))))) { PyObject *r = PyList_GET_ITEM(o, n); Py_INCREF(r); return r; } } else if (PyTuple_CheckExact(o)) { Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyTuple_GET_SIZE(o); if ((!boundscheck) || likely((n >= 0) & (n < PyTuple_GET_SIZE(o)))) { PyObject *r = PyTuple_GET_ITEM(o, n); Py_INCREF(r); return r; } } else { PySequenceMethods *m = Py_TYPE(o)->tp_as_sequence; if (likely(m && m->sq_item)) { if (wraparound && unlikely(i < 0) && likely(m->sq_length)) { Py_ssize_t l = m->sq_length(o); if (likely(l >= 0)) { i += l; } else { if (PyErr_ExceptionMatches(PyExc_OverflowError)) PyErr_Clear(); else return NULL; } } 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)); } static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type) { if (unlikely(!type)) { PyErr_SetString(PyExc_SystemError, "Missing type object"); return 0; } if (likely(PyObject_TypeCheck(obj, type))) return 1; PyErr_Format(PyExc_TypeError, "Cannot convert %.200s to %.200s", Py_TYPE(obj)->tp_name, type->tp_name); return 0; } static CYTHON_INLINE int __Pyx_SetItemInt_Generic(PyObject *o, PyObject *j, PyObject *v) { int r; if (!j) return -1; r = PyObject_SetItem(o, j, v); Py_DECREF(j); return r; } static CYTHON_INLINE int __Pyx_SetItemInt_Fast(PyObject *o, Py_ssize_t i, PyObject *v, int is_list, int wraparound, int boundscheck) { #if CYTHON_COMPILING_IN_CPYTHON if (is_list || PyList_CheckExact(o)) { Py_ssize_t n = (!wraparound) ? i : ((likely(i >= 0)) ? i : i + PyList_GET_SIZE(o)); if ((!boundscheck) || likely((n >= 0) & (n < PyList_GET_SIZE(o)))) { PyObject* old = PyList_GET_ITEM(o, n); Py_INCREF(v); PyList_SET_ITEM(o, n, v); Py_DECREF(old); return 1; } } else { PySequenceMethods *m = Py_TYPE(o)->tp_as_sequence; if (likely(m && m->sq_ass_item)) { if (wraparound && unlikely(i < 0) && likely(m->sq_length)) { Py_ssize_t l = m->sq_length(o); if (likely(l >= 0)) { i += l; } else { if (PyErr_ExceptionMatches(PyExc_OverflowError)) PyErr_Clear(); else return -1; } } return m->sq_ass_item(o, i, v); } } #else #if CYTHON_COMPILING_IN_PYPY if (is_list || (PySequence_Check(o) && !PyDict_Check(o))) { #else if (is_list || PySequence_Check(o)) { #endif return PySequence_SetItem(o, i, v); } #endif return __Pyx_SetItemInt_Generic(o, PyInt_FromSsize_t(i), v); } #if PY_MAJOR_VERSION < 3 static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, CYTHON_UNUSED PyObject *cause) { 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 PY_VERSION_HEX < 0x02050000 if (PyClass_Check(type)) { #else if (PyType_Check(type)) { #endif #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; #if PY_VERSION_HEX < 0x02050000 if (PyInstance_Check(type)) { type = (PyObject*) ((PyInstanceObject*)type)->in_class; Py_INCREF(type); } else { type = 0; PyErr_SetString(PyExc_TypeError, "raise: exception must be an old-style class or instance"); goto raise_error; } #else 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; } #endif } __Pyx_ErrRestore(type, value, tb); return; raise_error: Py_XDECREF(value); Py_XDECREF(type); Py_XDECREF(tb); return; } #else /* Python 3+ */ 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) { if (PyObject_IsSubclass(instance_class, type)) { type = instance_class; } else { instance_class = NULL; } } } if (!instance_class) { PyObject *args; if (!value) args = PyTuple_New(0); else if (PyTuple_Check(value)) { Py_INCREF(value); args = value; } else args = PyTuple_Pack(1, value); if (!args) goto bad; owned_instance = PyObject_Call(type, args, NULL); Py_DECREF(args); if (!owned_instance) goto bad; value = owned_instance; if (!PyExceptionInstance_Check(value)) { PyErr_Format(PyExc_TypeError, "calling %R should have returned an instance of " "BaseException, not %R", type, Py_TYPE(value)); goto bad; } } } else { PyErr_SetString(PyExc_TypeError, "raise: exception class must be a subclass of BaseException"); goto bad; } #if PY_VERSION_HEX >= 0x03030000 if (cause) { #else if (cause && cause != Py_None) { #endif PyObject *fixed_cause; if (cause == Py_None) { fixed_cause = NULL; } else if (PyExceptionClass_Check(cause)) { fixed_cause = PyObject_CallObject(cause, NULL); if (fixed_cause == NULL) goto bad; } else if (PyExceptionInstance_Check(cause)) { fixed_cause = cause; Py_INCREF(fixed_cause); } else { PyErr_SetString(PyExc_TypeError, "exception causes must derive from " "BaseException"); goto bad; } PyException_SetCause(value, fixed_cause); } PyErr_SetObject(type, value); if (tb) { PyThreadState *tstate = PyThreadState_GET(); PyObject* tmp_tb = tstate->curexc_traceback; if (tb != tmp_tb) { Py_INCREF(tb); tstate->curexc_traceback = tb; Py_XDECREF(tmp_tb); } } bad: Py_XDECREF(owned_instance); return; } #endif static CYTHON_INLINE int __Pyx_IsLittleEndian(void) { unsigned int n = 1; return *(unsigned char*)(&n) != 0; } 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) /* First char was not a digit */ 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; /* Consume from buffer string */ while (1) { if (field == &ctx->root) { ctx->head = NULL; if (ctx->enc_count != 0) { __Pyx_BufFmt_RaiseExpected(ctx); return -1; } break; /* breaks both loops as ctx->enc_count == 0 */ } 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; /* empty struct */ 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 CYTHON_INLINE 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 != ')') { if (isspace(*ts)) continue; 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 10: case 13: ++ts; break; case '<': if (!__Pyx_IsLittleEndian()) { PyErr_SetString(PyExc_ValueError, "Little-endian buffer not supported on big-endian compiler"); return NULL; } ctx->new_packmode = '='; ++ts; break; case '>': case '!': if (__Pyx_IsLittleEndian()) { 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': /* substruct */ { 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; /* Erase processed last struct element */ 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 '}': /* end of substruct; either repeat or move on */ { size_t alignment = ctx->struct_alignment; ++ts; if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL; ctx->enc_type = 0; /* Erase processed last struct element */ 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; } /* fall through */ 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 's': case 'p': if (ctx->enc_type == *ts && got_Z == ctx->is_complex && ctx->enc_packmode == ctx->new_packmode) { ctx->enc_count += ctx->new_count; } else { 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; } } } } static CYTHON_INLINE 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 CYTHON_INLINE int __Pyx_GetBufferAndValidate( Py_buffer* buf, PyObject* obj, __Pyx_TypeInfo* dtype, int flags, int nd, int cast, __Pyx_BufFmt_StackElem* stack) { if (obj == Py_None || obj == NULL) { __Pyx_ZeroBuffer(buf); return 0; } buf->buf = NULL; if (__Pyx_GetBuffer(obj, buf, flags) == -1) goto fail; if (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 ((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_ZeroBuffer(buf); return -1; } static CYTHON_INLINE void __Pyx_SafeReleaseBuffer(Py_buffer* info) { if (info->buf == NULL) return; if (info->suboffsets == __Pyx_minusones) info->suboffsets = NULL; __Pyx_ReleaseBuffer(info); } 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); } 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"); } static CYTHON_INLINE int __Pyx_IterFinish(void) { #if CYTHON_COMPILING_IN_CPYTHON PyThreadState *tstate = PyThreadState_GET(); PyObject* exc_type = tstate->curexc_type; if (unlikely(exc_type)) { if (likely(exc_type == PyExc_StopIteration) || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration)) { PyObject *exc_value, *exc_tb; exc_value = tstate->curexc_value; exc_tb = tstate->curexc_traceback; tstate->curexc_type = 0; tstate->curexc_value = 0; tstate->curexc_traceback = 0; Py_DECREF(exc_type); Py_XDECREF(exc_value); Py_XDECREF(exc_tb); return 0; } else { return -1; } } return 0; #else if (unlikely(PyErr_Occurred())) { if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) { PyErr_Clear(); return 0; } else { return -1; } } return 0; #endif } 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; } static void __Pyx_RaiseBufferFallbackError(void) { PyErr_SetString(PyExc_ValueError, "Buffer acquisition failed on assignment; and then reacquiring the old buffer failed too!"); } static void __Pyx_RaiseBufferIndexError(int axis) { PyErr_Format(PyExc_IndexError, "Out of bounds on buffer access (axis %d)", axis); } static CYTHON_INLINE void __Pyx_ExceptionSave(PyObject **type, PyObject **value, PyObject **tb) { #if CYTHON_COMPILING_IN_CPYTHON PyThreadState *tstate = PyThreadState_GET(); *type = tstate->exc_type; *value = tstate->exc_value; *tb = tstate->exc_traceback; Py_XINCREF(*type); Py_XINCREF(*value); Py_XINCREF(*tb); #else PyErr_GetExcInfo(type, value, tb); #endif } static void __Pyx_ExceptionReset(PyObject *type, PyObject *value, PyObject *tb) { #if CYTHON_COMPILING_IN_CPYTHON PyObject *tmp_type, *tmp_value, *tmp_tb; PyThreadState *tstate = PyThreadState_GET(); tmp_type = tstate->exc_type; tmp_value = tstate->exc_value; tmp_tb = tstate->exc_traceback; tstate->exc_type = type; tstate->exc_value = value; tstate->exc_traceback = tb; Py_XDECREF(tmp_type); Py_XDECREF(tmp_value); Py_XDECREF(tmp_tb); #else PyErr_SetExcInfo(type, value, tb); #endif } static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb) { PyObject *local_type, *local_value, *local_tb; #if CYTHON_COMPILING_IN_CPYTHON PyObject *tmp_type, *tmp_value, *tmp_tb; PyThreadState *tstate = PyThreadState_GET(); local_type = tstate->curexc_type; local_value = tstate->curexc_value; local_tb = tstate->curexc_traceback; tstate->curexc_type = 0; tstate->curexc_value = 0; tstate->curexc_traceback = 0; #else PyErr_Fetch(&local_type, &local_value, &local_tb); #endif PyErr_NormalizeException(&local_type, &local_value, &local_tb); #if CYTHON_COMPILING_IN_CPYTHON if (unlikely(tstate->curexc_type)) #else if (unlikely(PyErr_Occurred())) #endif goto bad; #if PY_MAJOR_VERSION >= 3 if (local_tb) { if (unlikely(PyException_SetTraceback(local_value, local_tb) < 0)) goto bad; } #endif Py_XINCREF(local_tb); Py_XINCREF(local_type); Py_XINCREF(local_value); *type = local_type; *value = local_value; *tb = local_tb; #if CYTHON_COMPILING_IN_CPYTHON tmp_type = tstate->exc_type; tmp_value = tstate->exc_value; tmp_tb = tstate->exc_traceback; tstate->exc_type = local_type; tstate->exc_value = local_value; tstate->exc_traceback = local_tb; Py_XDECREF(tmp_type); Py_XDECREF(tmp_value); Py_XDECREF(tmp_tb); #else PyErr_SetExcInfo(local_type, local_value, local_tb); #endif return 0; bad: *type = 0; *value = 0; *tb = 0; Py_XDECREF(local_type); Py_XDECREF(local_value); Py_XDECREF(local_tb); return -1; } static CYTHON_INLINE long __Pyx_mod_long(long a, long b) { long r = a % b; r += ((r != 0) & ((r ^ b) < 0)) * b; return r; } 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; } static CYTHON_INLINE Py_ssize_t __Pyx_div_Py_ssize_t(Py_ssize_t a, Py_ssize_t b) { Py_ssize_t q = a / b; Py_ssize_t r = a - q*b; q -= ((r != 0) & ((r ^ b) < 0)); return q; } static CYTHON_INLINE Py_ssize_t __Pyx_mod_Py_ssize_t(Py_ssize_t a, Py_ssize_t b) { Py_ssize_t r = a % b; r += ((r != 0) & ((r ^ b) < 0)) * b; return r; } static CYTHON_INLINE PyObject* __Pyx_PyObject_GetSlice( PyObject* obj, Py_ssize_t cstart, Py_ssize_t cstop, PyObject** _py_start, PyObject** _py_stop, PyObject** _py_slice, int has_cstart, int has_cstop, CYTHON_UNUSED int wraparound) { #if CYTHON_COMPILING_IN_CPYTHON PyMappingMethods* mp; #if PY_MAJOR_VERSION < 3 PySequenceMethods* ms = Py_TYPE(obj)->tp_as_sequence; if (likely(ms && ms->sq_slice)) { if (!has_cstart) { if (_py_start && (*_py_start != Py_None)) { cstart = __Pyx_PyIndex_AsSsize_t(*_py_start); if ((cstart == (Py_ssize_t)-1) && PyErr_Occurred()) goto bad; } else cstart = 0; } if (!has_cstop) { if (_py_stop && (*_py_stop != Py_None)) { cstop = __Pyx_PyIndex_AsSsize_t(*_py_stop); if ((cstop == (Py_ssize_t)-1) && PyErr_Occurred()) goto bad; } else cstop = PY_SSIZE_T_MAX; } if (wraparound && unlikely((cstart < 0) | (cstop < 0)) && likely(ms->sq_length)) { Py_ssize_t l = ms->sq_length(obj); if (likely(l >= 0)) { if (cstop < 0) { cstop += l; if (cstop < 0) cstop = 0; } if (cstart < 0) { cstart += l; if (cstart < 0) cstart = 0; } } else { if (PyErr_ExceptionMatches(PyExc_OverflowError)) PyErr_Clear(); else goto bad; } } return ms->sq_slice(obj, cstart, cstop); } #endif mp = Py_TYPE(obj)->tp_as_mapping; if (likely(mp && mp->mp_subscript)) #endif { PyObject* result; PyObject *py_slice, *py_start, *py_stop; if (_py_slice) { py_slice = *_py_slice; } else { PyObject* owned_start = NULL; PyObject* owned_stop = NULL; if (_py_start) { py_start = *_py_start; } else { if (has_cstart) { owned_start = py_start = PyInt_FromSsize_t(cstart); if (unlikely(!py_start)) goto bad; } else py_start = Py_None; } if (_py_stop) { py_stop = *_py_stop; } else { if (has_cstop) { owned_stop = py_stop = PyInt_FromSsize_t(cstop); if (unlikely(!py_stop)) { Py_XDECREF(owned_start); goto bad; } } else py_stop = Py_None; } py_slice = PySlice_New(py_start, py_stop, Py_None); Py_XDECREF(owned_start); Py_XDECREF(owned_stop); if (unlikely(!py_slice)) goto bad; } #if CYTHON_COMPILING_IN_CPYTHON result = mp->mp_subscript(obj, py_slice); #else result = PyObject_GetItem(obj, py_slice); #endif if (!_py_slice) { Py_DECREF(py_slice); } return result; } PyErr_Format(PyExc_TypeError, "'%.200s' object is unsliceable", Py_TYPE(obj)->tp_name); bad: return NULL; } static CYTHON_INLINE int __Pyx_PyObject_SetSlice( PyObject* obj, PyObject* value, Py_ssize_t cstart, Py_ssize_t cstop, PyObject** _py_start, PyObject** _py_stop, PyObject** _py_slice, int has_cstart, int has_cstop, CYTHON_UNUSED int wraparound) { #if CYTHON_COMPILING_IN_CPYTHON PyMappingMethods* mp; #if PY_MAJOR_VERSION < 3 PySequenceMethods* ms = Py_TYPE(obj)->tp_as_sequence; if (likely(ms && ms->sq_ass_slice)) { if (!has_cstart) { if (_py_start && (*_py_start != Py_None)) { cstart = __Pyx_PyIndex_AsSsize_t(*_py_start); if ((cstart == (Py_ssize_t)-1) && PyErr_Occurred()) goto bad; } else cstart = 0; } if (!has_cstop) { if (_py_stop && (*_py_stop != Py_None)) { cstop = __Pyx_PyIndex_AsSsize_t(*_py_stop); if ((cstop == (Py_ssize_t)-1) && PyErr_Occurred()) goto bad; } else cstop = PY_SSIZE_T_MAX; } if (wraparound && unlikely((cstart < 0) | (cstop < 0)) && likely(ms->sq_length)) { Py_ssize_t l = ms->sq_length(obj); if (likely(l >= 0)) { if (cstop < 0) { cstop += l; if (cstop < 0) cstop = 0; } if (cstart < 0) { cstart += l; if (cstart < 0) cstart = 0; } } else { if (PyErr_ExceptionMatches(PyExc_OverflowError)) PyErr_Clear(); else goto bad; } } return ms->sq_ass_slice(obj, cstart, cstop, value); } #endif mp = Py_TYPE(obj)->tp_as_mapping; if (likely(mp && mp->mp_ass_subscript)) #endif { int result; PyObject *py_slice, *py_start, *py_stop; if (_py_slice) { py_slice = *_py_slice; } else { PyObject* owned_start = NULL; PyObject* owned_stop = NULL; if (_py_start) { py_start = *_py_start; } else { if (has_cstart) { owned_start = py_start = PyInt_FromSsize_t(cstart); if (unlikely(!py_start)) goto bad; } else py_start = Py_None; } if (_py_stop) { py_stop = *_py_stop; } else { if (has_cstop) { owned_stop = py_stop = PyInt_FromSsize_t(cstop); if (unlikely(!py_stop)) { Py_XDECREF(owned_start); goto bad; } } else py_stop = Py_None; } py_slice = PySlice_New(py_start, py_stop, Py_None); Py_XDECREF(owned_start); Py_XDECREF(owned_stop); if (unlikely(!py_slice)) goto bad; } #if CYTHON_COMPILING_IN_CPYTHON result = mp->mp_ass_subscript(obj, py_slice, value); #else result = value ? PyObject_SetItem(obj, py_slice, value) : PyObject_DelItem(obj, py_slice); #endif if (!_py_slice) { Py_DECREF(py_slice); } return result; } PyErr_Format(PyExc_TypeError, "'%.200s' object does not support slice %.10s", Py_TYPE(obj)->tp_name, value ? "assignment" : "deletion"); bad: return -1; } 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; } static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); } static int __Pyx_SetVtable(PyObject *dict, void *vtable) { #if PY_VERSION_HEX >= 0x02070000 && !(PY_MAJOR_VERSION==3&&PY_MINOR_VERSION==0) 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; } static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type) { PyObject* fake_module; PyTypeObject* cached_type = NULL; fake_module = PyImport_AddModule((char*) "_cython_" CYTHON_ABI); if (!fake_module) return NULL; Py_INCREF(fake_module); cached_type = (PyTypeObject*) PyObject_GetAttrString(fake_module, type->tp_name); if (cached_type) { if (!PyType_Check((PyObject*)cached_type)) { PyErr_Format(PyExc_TypeError, "Shared Cython type %.200s is not a type object", type->tp_name); goto bad; } if (cached_type->tp_basicsize != type->tp_basicsize) { PyErr_Format(PyExc_TypeError, "Shared Cython type %.200s has the wrong size, try recompiling", type->tp_name); goto bad; } } else { if (!PyErr_ExceptionMatches(PyExc_AttributeError)) goto bad; PyErr_Clear(); if (PyType_Ready(type) < 0) goto bad; if (PyObject_SetAttrString(fake_module, type->tp_name, (PyObject*) type) < 0) goto bad; Py_INCREF(type); cached_type = type; } done: Py_DECREF(fake_module); return cached_type; bad: Py_XDECREF(cached_type); cached_type = NULL; goto done; } static PyObject * __Pyx_CyFunction_get_doc(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *closure) { if (unlikely(op->func_doc == NULL)) { if (op->func.m_ml->ml_doc) { #if PY_MAJOR_VERSION >= 3 op->func_doc = PyUnicode_FromString(op->func.m_ml->ml_doc); #else op->func_doc = PyString_FromString(op->func.m_ml->ml_doc); #endif if (unlikely(op->func_doc == NULL)) return NULL; } else { Py_INCREF(Py_None); return Py_None; } } Py_INCREF(op->func_doc); return op->func_doc; } static int __Pyx_CyFunction_set_doc(__pyx_CyFunctionObject *op, PyObject *value) { PyObject *tmp = op->func_doc; if (value == NULL) value = Py_None; /* Mark as deleted */ Py_INCREF(value); op->func_doc = value; Py_XDECREF(tmp); return 0; } static PyObject * __Pyx_CyFunction_get_name(__pyx_CyFunctionObject *op) { if (unlikely(op->func_name == NULL)) { #if PY_MAJOR_VERSION >= 3 op->func_name = PyUnicode_InternFromString(op->func.m_ml->ml_name); #else op->func_name = PyString_InternFromString(op->func.m_ml->ml_name); #endif if (unlikely(op->func_name == NULL)) return NULL; } Py_INCREF(op->func_name); return op->func_name; } static int __Pyx_CyFunction_set_name(__pyx_CyFunctionObject *op, PyObject *value) { PyObject *tmp; #if PY_MAJOR_VERSION >= 3 if (unlikely(value == NULL || !PyUnicode_Check(value))) { #else if (unlikely(value == NULL || !PyString_Check(value))) { #endif PyErr_SetString(PyExc_TypeError, "__name__ must be set to a string object"); return -1; } tmp = op->func_name; Py_INCREF(value); op->func_name = value; Py_XDECREF(tmp); return 0; } static PyObject * __Pyx_CyFunction_get_qualname(__pyx_CyFunctionObject *op) { Py_INCREF(op->func_qualname); return op->func_qualname; } static int __Pyx_CyFunction_set_qualname(__pyx_CyFunctionObject *op, PyObject *value) { PyObject *tmp; #if PY_MAJOR_VERSION >= 3 if (unlikely(value == NULL || !PyUnicode_Check(value))) { #else if (unlikely(value == NULL || !PyString_Check(value))) { #endif PyErr_SetString(PyExc_TypeError, "__qualname__ must be set to a string object"); return -1; } tmp = op->func_qualname; Py_INCREF(value); op->func_qualname = value; Py_XDECREF(tmp); return 0; } static PyObject * __Pyx_CyFunction_get_self(__pyx_CyFunctionObject *m, CYTHON_UNUSED void *closure) { PyObject *self; self = m->func_closure; if (self == NULL) self = Py_None; Py_INCREF(self); return self; } static PyObject * __Pyx_CyFunction_get_dict(__pyx_CyFunctionObject *op) { if (unlikely(op->func_dict == NULL)) { op->func_dict = PyDict_New(); if (unlikely(op->func_dict == NULL)) return NULL; } Py_INCREF(op->func_dict); return op->func_dict; } static int __Pyx_CyFunction_set_dict(__pyx_CyFunctionObject *op, PyObject *value) { PyObject *tmp; if (unlikely(value == NULL)) { PyErr_SetString(PyExc_TypeError, "function's dictionary may not be deleted"); return -1; } if (unlikely(!PyDict_Check(value))) { PyErr_SetString(PyExc_TypeError, "setting function's dictionary to a non-dict"); return -1; } tmp = op->func_dict; Py_INCREF(value); op->func_dict = value; Py_XDECREF(tmp); return 0; } static PyObject * __Pyx_CyFunction_get_globals(__pyx_CyFunctionObject *op) { Py_INCREF(op->func_globals); return op->func_globals; } static PyObject * __Pyx_CyFunction_get_closure(CYTHON_UNUSED __pyx_CyFunctionObject *op) { Py_INCREF(Py_None); return Py_None; } static PyObject * __Pyx_CyFunction_get_code(__pyx_CyFunctionObject *op) { PyObject* result = (op->func_code) ? op->func_code : Py_None; Py_INCREF(result); return result; } static int __Pyx_CyFunction_init_defaults(__pyx_CyFunctionObject *op) { PyObject *res = op->defaults_getter((PyObject *) op); if (unlikely(!res)) return -1; op->defaults_tuple = PyTuple_GET_ITEM(res, 0); Py_INCREF(op->defaults_tuple); op->defaults_kwdict = PyTuple_GET_ITEM(res, 1); Py_INCREF(op->defaults_kwdict); Py_DECREF(res); return 0; } static int __Pyx_CyFunction_set_defaults(__pyx_CyFunctionObject *op, PyObject* value) { PyObject* tmp; if (!value) { value = Py_None; } else if (value != Py_None && !PyTuple_Check(value)) { PyErr_SetString(PyExc_TypeError, "__defaults__ must be set to a tuple object"); return -1; } Py_INCREF(value); tmp = op->defaults_tuple; op->defaults_tuple = value; Py_XDECREF(tmp); return 0; } static PyObject * __Pyx_CyFunction_get_defaults(__pyx_CyFunctionObject *op) { PyObject* result = op->defaults_tuple; if (unlikely(!result)) { if (op->defaults_getter) { if (__Pyx_CyFunction_init_defaults(op) < 0) return NULL; result = op->defaults_tuple; } else { result = Py_None; } } Py_INCREF(result); return result; } static int __Pyx_CyFunction_set_kwdefaults(__pyx_CyFunctionObject *op, PyObject* value) { PyObject* tmp; if (!value) { value = Py_None; } else if (value != Py_None && !PyDict_Check(value)) { PyErr_SetString(PyExc_TypeError, "__kwdefaults__ must be set to a dict object"); return -1; } Py_INCREF(value); tmp = op->defaults_kwdict; op->defaults_kwdict = value; Py_XDECREF(tmp); return 0; } static PyObject * __Pyx_CyFunction_get_kwdefaults(__pyx_CyFunctionObject *op) { PyObject* result = op->defaults_kwdict; if (unlikely(!result)) { if (op->defaults_getter) { if (__Pyx_CyFunction_init_defaults(op) < 0) return NULL; result = op->defaults_kwdict; } else { result = Py_None; } } Py_INCREF(result); return result; } static int __Pyx_CyFunction_set_annotations(__pyx_CyFunctionObject *op, PyObject* value) { PyObject* tmp; if (!value || value == Py_None) { value = NULL; } else if (!PyDict_Check(value)) { PyErr_SetString(PyExc_TypeError, "__annotations__ must be set to a dict object"); return -1; } Py_XINCREF(value); tmp = op->func_annotations; op->func_annotations = value; Py_XDECREF(tmp); return 0; } static PyObject * __Pyx_CyFunction_get_annotations(__pyx_CyFunctionObject *op) { PyObject* result = op->func_annotations; if (unlikely(!result)) { result = PyDict_New(); if (unlikely(!result)) return NULL; op->func_annotations = result; } Py_INCREF(result); return result; } static PyGetSetDef __pyx_CyFunction_getsets[] = { {(char *) "func_doc", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0}, {(char *) "__doc__", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0}, {(char *) "func_name", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0}, {(char *) "__name__", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0}, {(char *) "__qualname__", (getter)__Pyx_CyFunction_get_qualname, (setter)__Pyx_CyFunction_set_qualname, 0, 0}, {(char *) "__self__", (getter)__Pyx_CyFunction_get_self, 0, 0, 0}, {(char *) "func_dict", (getter)__Pyx_CyFunction_get_dict, (setter)__Pyx_CyFunction_set_dict, 0, 0}, {(char *) "__dict__", (getter)__Pyx_CyFunction_get_dict, (setter)__Pyx_CyFunction_set_dict, 0, 0}, {(char *) "func_globals", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0}, {(char *) "__globals__", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0}, {(char *) "func_closure", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0}, {(char *) "__closure__", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0}, {(char *) "func_code", (getter)__Pyx_CyFunction_get_code, 0, 0, 0}, {(char *) "__code__", (getter)__Pyx_CyFunction_get_code, 0, 0, 0}, {(char *) "func_defaults", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0}, {(char *) "__defaults__", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0}, {(char *) "__kwdefaults__", (getter)__Pyx_CyFunction_get_kwdefaults, (setter)__Pyx_CyFunction_set_kwdefaults, 0, 0}, {(char *) "__annotations__", (getter)__Pyx_CyFunction_get_annotations, (setter)__Pyx_CyFunction_set_annotations, 0, 0}, {0, 0, 0, 0, 0} }; #ifndef PY_WRITE_RESTRICTED /* < Py2.5 */ #define PY_WRITE_RESTRICTED WRITE_RESTRICTED #endif static PyMemberDef __pyx_CyFunction_members[] = { {(char *) "__module__", T_OBJECT, offsetof(__pyx_CyFunctionObject, func.m_module), PY_WRITE_RESTRICTED, 0}, {0, 0, 0, 0, 0} }; static PyObject * __Pyx_CyFunction_reduce(__pyx_CyFunctionObject *m, CYTHON_UNUSED PyObject *args) { #if PY_MAJOR_VERSION >= 3 return PyUnicode_FromString(m->func.m_ml->ml_name); #else return PyString_FromString(m->func.m_ml->ml_name); #endif } static PyMethodDef __pyx_CyFunction_methods[] = { {__Pyx_NAMESTR("__reduce__"), (PyCFunction)__Pyx_CyFunction_reduce, METH_VARARGS, 0}, {0, 0, 0, 0} }; static PyObject *__Pyx_CyFunction_New(PyTypeObject *type, PyMethodDef *ml, int flags, PyObject* qualname, PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) { __pyx_CyFunctionObject *op = PyObject_GC_New(__pyx_CyFunctionObject, type); if (op == NULL) return NULL; op->flags = flags; op->func_weakreflist = NULL; op->func.m_ml = ml; op->func.m_self = (PyObject *) op; Py_XINCREF(closure); op->func_closure = closure; Py_XINCREF(module); op->func.m_module = module; op->func_dict = NULL; op->func_name = NULL; Py_INCREF(qualname); op->func_qualname = qualname; op->func_doc = NULL; op->func_classobj = NULL; op->func_globals = globals; Py_INCREF(op->func_globals); Py_XINCREF(code); op->func_code = code; op->defaults_pyobjects = 0; op->defaults = NULL; op->defaults_tuple = NULL; op->defaults_kwdict = NULL; op->defaults_getter = NULL; op->func_annotations = NULL; PyObject_GC_Track(op); return (PyObject *) op; } static int __Pyx_CyFunction_clear(__pyx_CyFunctionObject *m) { Py_CLEAR(m->func_closure); Py_CLEAR(m->func.m_module); Py_CLEAR(m->func_dict); Py_CLEAR(m->func_name); Py_CLEAR(m->func_qualname); Py_CLEAR(m->func_doc); Py_CLEAR(m->func_globals); Py_CLEAR(m->func_code); Py_CLEAR(m->func_classobj); Py_CLEAR(m->defaults_tuple); Py_CLEAR(m->defaults_kwdict); Py_CLEAR(m->func_annotations); if (m->defaults) { PyObject **pydefaults = __Pyx_CyFunction_Defaults(PyObject *, m); int i; for (i = 0; i < m->defaults_pyobjects; i++) Py_XDECREF(pydefaults[i]); PyMem_Free(m->defaults); m->defaults = NULL; } return 0; } static void __Pyx_CyFunction_dealloc(__pyx_CyFunctionObject *m) { PyObject_GC_UnTrack(m); if (m->func_weakreflist != NULL) PyObject_ClearWeakRefs((PyObject *) m); __Pyx_CyFunction_clear(m); PyObject_GC_Del(m); } static int __Pyx_CyFunction_traverse(__pyx_CyFunctionObject *m, visitproc visit, void *arg) { Py_VISIT(m->func_closure); Py_VISIT(m->func.m_module); Py_VISIT(m->func_dict); Py_VISIT(m->func_name); Py_VISIT(m->func_qualname); Py_VISIT(m->func_doc); Py_VISIT(m->func_globals); Py_VISIT(m->func_code); Py_VISIT(m->func_classobj); Py_VISIT(m->defaults_tuple); Py_VISIT(m->defaults_kwdict); if (m->defaults) { PyObject **pydefaults = __Pyx_CyFunction_Defaults(PyObject *, m); int i; for (i = 0; i < m->defaults_pyobjects; i++) Py_VISIT(pydefaults[i]); } return 0; } static PyObject *__Pyx_CyFunction_descr_get(PyObject *func, PyObject *obj, PyObject *type) { __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; if (m->flags & __Pyx_CYFUNCTION_STATICMETHOD) { Py_INCREF(func); return func; } if (m->flags & __Pyx_CYFUNCTION_CLASSMETHOD) { if (type == NULL) type = (PyObject *)(Py_TYPE(obj)); return PyMethod_New(func, type, (PyObject *)(Py_TYPE(type))); } if (obj == Py_None) obj = NULL; return PyMethod_New(func, obj, type); } static PyObject* __Pyx_CyFunction_repr(__pyx_CyFunctionObject *op) { #if PY_MAJOR_VERSION >= 3 return PyUnicode_FromFormat("", op->func_qualname, (void *)op); #else return PyString_FromFormat("", PyString_AsString(op->func_qualname), (void *)op); #endif } #if CYTHON_COMPILING_IN_PYPY static PyObject * __Pyx_CyFunction_Call(PyObject *func, PyObject *arg, PyObject *kw) { PyCFunctionObject* f = (PyCFunctionObject*)func; PyCFunction meth = PyCFunction_GET_FUNCTION(func); PyObject *self = PyCFunction_GET_SELF(func); Py_ssize_t size; switch (PyCFunction_GET_FLAGS(func) & ~(METH_CLASS | METH_STATIC | METH_COEXIST)) { case METH_VARARGS: if (likely(kw == NULL) || PyDict_Size(kw) == 0) return (*meth)(self, arg); break; case METH_VARARGS | METH_KEYWORDS: return (*(PyCFunctionWithKeywords)meth)(self, arg, kw); case METH_NOARGS: if (likely(kw == NULL) || PyDict_Size(kw) == 0) { size = PyTuple_GET_SIZE(arg); if (size == 0) return (*meth)(self, NULL); PyErr_Format(PyExc_TypeError, "%.200s() takes no arguments (%zd given)", f->m_ml->ml_name, size); return NULL; } break; case METH_O: if (likely(kw == NULL) || PyDict_Size(kw) == 0) { size = PyTuple_GET_SIZE(arg); if (size == 1) return (*meth)(self, PyTuple_GET_ITEM(arg, 0)); PyErr_Format(PyExc_TypeError, "%.200s() takes exactly one argument (%zd given)", f->m_ml->ml_name, size); return NULL; } break; default: PyErr_SetString(PyExc_SystemError, "Bad call flags in " "__Pyx_CyFunction_Call. METH_OLDARGS is no " "longer supported!"); return NULL; } PyErr_Format(PyExc_TypeError, "%.200s() takes no keyword arguments", f->m_ml->ml_name); return NULL; } #else static PyObject * __Pyx_CyFunction_Call(PyObject *func, PyObject *arg, PyObject *kw) { return PyCFunction_Call(func, arg, kw); } #endif static PyTypeObject __pyx_CyFunctionType_type = { PyVarObject_HEAD_INIT(0, 0) __Pyx_NAMESTR("cython_function_or_method"), /*tp_name*/ sizeof(__pyx_CyFunctionObject), /*tp_basicsize*/ 0, /*tp_itemsize*/ (destructor) __Pyx_CyFunction_dealloc, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #else 0, /*reserved*/ #endif (reprfunc) __Pyx_CyFunction_repr, /*tp_repr*/ 0, /*tp_as_number*/ 0, /*tp_as_sequence*/ 0, /*tp_as_mapping*/ 0, /*tp_hash*/ __Pyx_CyFunction_Call, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC, /* tp_flags*/ 0, /*tp_doc*/ (traverseproc) __Pyx_CyFunction_traverse, /*tp_traverse*/ (inquiry) __Pyx_CyFunction_clear, /*tp_clear*/ 0, /*tp_richcompare*/ offsetof(__pyx_CyFunctionObject, func_weakreflist), /* tp_weaklistoffse */ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_CyFunction_methods, /*tp_methods*/ __pyx_CyFunction_members, /*tp_members*/ __pyx_CyFunction_getsets, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ __Pyx_CyFunction_descr_get, /*tp_descr_get*/ 0, /*tp_descr_set*/ offsetof(__pyx_CyFunctionObject, func_dict),/*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ 0, /*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*/ #if PY_VERSION_HEX >= 0x02060000 0, /*tp_version_tag*/ #endif #if PY_VERSION_HEX >= 0x030400a1 0, /*tp_finalize*/ #endif }; static int __Pyx_CyFunction_init(void) { #if !CYTHON_COMPILING_IN_PYPY __pyx_CyFunctionType_type.tp_call = PyCFunction_Call; #endif __pyx_CyFunctionType = __Pyx_FetchCommonType(&__pyx_CyFunctionType_type); if (__pyx_CyFunctionType == NULL) { return -1; } return 0; } static CYTHON_INLINE void *__Pyx_CyFunction_InitDefaults(PyObject *func, size_t size, int pyobjects) { __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; m->defaults = PyMem_Malloc(size); if (!m->defaults) return PyErr_NoMemory(); memset(m->defaults, 0, size); m->defaults_pyobjects = pyobjects; return m->defaults; } static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *func, PyObject *tuple) { __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; m->defaults_tuple = tuple; Py_INCREF(tuple); } static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *func, PyObject *dict) { __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; m->defaults_kwdict = dict; Py_INCREF(dict); } static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *func, PyObject *dict) { __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; m->func_annotations = dict; Py_INCREF(dict); } static PyObject *__Pyx_CalculateMetaclass(PyTypeObject *metaclass, PyObject *bases) { Py_ssize_t i, nbases = PyTuple_GET_SIZE(bases); for (i=0; i < nbases; i++) { PyTypeObject *tmptype; PyObject *tmp = PyTuple_GET_ITEM(bases, i); tmptype = Py_TYPE(tmp); #if PY_MAJOR_VERSION < 3 if (tmptype == &PyClass_Type) continue; #endif if (!metaclass) { metaclass = tmptype; continue; } if (PyType_IsSubtype(metaclass, tmptype)) continue; if (PyType_IsSubtype(tmptype, metaclass)) { metaclass = tmptype; continue; } PyErr_SetString(PyExc_TypeError, "metaclass conflict: " "the metaclass of a derived class " "must be a (non-strict) subclass " "of the metaclasses of all its bases"); return NULL; } if (!metaclass) { #if PY_MAJOR_VERSION < 3 metaclass = &PyClass_Type; #else metaclass = &PyType_Type; #endif } Py_INCREF((PyObject*) metaclass); return (PyObject*) metaclass; } static PyObject *__Pyx_Py3MetaclassPrepare(PyObject *metaclass, PyObject *bases, PyObject *name, PyObject *qualname, PyObject *mkw, PyObject *modname, PyObject *doc) { PyObject *ns; if (metaclass) { PyObject *prep = __Pyx_PyObject_GetAttrStr(metaclass, __pyx_n_s_prepare); if (prep) { PyObject *pargs = PyTuple_Pack(2, name, bases); if (unlikely(!pargs)) { Py_DECREF(prep); return NULL; } ns = PyObject_Call(prep, pargs, mkw); Py_DECREF(prep); Py_DECREF(pargs); } else { if (unlikely(!PyErr_ExceptionMatches(PyExc_AttributeError))) return NULL; PyErr_Clear(); ns = PyDict_New(); } } else { ns = PyDict_New(); } if (unlikely(!ns)) return NULL; if (unlikely(PyObject_SetItem(ns, __pyx_n_s_module, modname) < 0)) goto bad; if (unlikely(PyObject_SetItem(ns, __pyx_n_s_qualname, qualname) < 0)) goto bad; if (unlikely(doc && PyObject_SetItem(ns, __pyx_n_s_doc, doc) < 0)) goto bad; return ns; bad: Py_DECREF(ns); return NULL; } static PyObject *__Pyx_Py3ClassCreate(PyObject *metaclass, PyObject *name, PyObject *bases, PyObject *dict, PyObject *mkw, int calculate_metaclass, int allow_py2_metaclass) { PyObject *result, *margs; PyObject *owned_metaclass = NULL; if (allow_py2_metaclass) { owned_metaclass = PyObject_GetItem(dict, __pyx_n_s_metaclass); if (owned_metaclass) { metaclass = owned_metaclass; } else if (likely(PyErr_ExceptionMatches(PyExc_KeyError))) { PyErr_Clear(); } else { return NULL; } } if (calculate_metaclass && (!metaclass || PyType_Check(metaclass))) { metaclass = __Pyx_CalculateMetaclass((PyTypeObject*) metaclass, bases); Py_XDECREF(owned_metaclass); if (unlikely(!metaclass)) return NULL; owned_metaclass = metaclass; } margs = PyTuple_Pack(3, name, bases, dict); if (unlikely(!margs)) { result = NULL; } else { result = PyObject_Call(metaclass, margs, mkw); Py_DECREF(margs); } Py_XDECREF(owned_metaclass); return result; } #if PY_MAJOR_VERSION < 3 static int __Pyx_GetBuffer(PyObject *obj, Py_buffer *view, int flags) { #if PY_VERSION_HEX >= 0x02060000 if (PyObject_CheckBuffer(obj)) return PyObject_GetBuffer(obj, view, flags); #endif if (PyObject_TypeCheck(obj, __pyx_ptype_5numpy_ndarray)) return __pyx_pw_5numpy_7ndarray_1__getbuffer__(obj, view, flags); #if PY_VERSION_HEX < 0x02060000 if (obj->ob_type->tp_dict) { PyObject *getbuffer_cobj = PyObject_GetItem( obj->ob_type->tp_dict, __pyx_n_s_pyx_getbuffer); if (getbuffer_cobj) { getbufferproc func = (getbufferproc) PyCObject_AsVoidPtr(getbuffer_cobj); Py_DECREF(getbuffer_cobj); if (!func) goto fail; return func(obj, view, flags); } else { PyErr_Clear(); } } #endif PyErr_Format(PyExc_TypeError, "'%.200s' does not have the buffer interface", Py_TYPE(obj)->tp_name); #if PY_VERSION_HEX < 0x02060000 fail: #endif return -1; } static void __Pyx_ReleaseBuffer(Py_buffer *view) { PyObject *obj = view->obj; if (!obj) return; #if PY_VERSION_HEX >= 0x02060000 if (PyObject_CheckBuffer(obj)) { PyBuffer_Release(view); return; } #endif if (PyObject_TypeCheck(obj, __pyx_ptype_5numpy_ndarray)) { __pyx_pw_5numpy_7ndarray_3__releasebuffer__(obj, view); return; } #if PY_VERSION_HEX < 0x02060000 if (obj->ob_type->tp_dict) { PyObject *releasebuffer_cobj = PyObject_GetItem( obj->ob_type->tp_dict, __pyx_n_s_pyx_releasebuffer); if (releasebuffer_cobj) { releasebufferproc func = (releasebufferproc) PyCObject_AsVoidPtr(releasebuffer_cobj); Py_DECREF(releasebuffer_cobj); if (!func) goto fail; func(obj, view); return; } else { PyErr_Clear(); } } #endif goto nofail; #if PY_VERSION_HEX < 0x02060000 fail: #endif PyErr_WriteUnraisable(obj); nofail: Py_DECREF(obj); view->obj = NULL; } #endif /* PY_MAJOR_VERSION < 3 */ static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level) { PyObject *empty_list = 0; PyObject *module = 0; PyObject *global_dict = 0; PyObject *empty_dict = 0; PyObject *list; #if PY_VERSION_HEX < 0x03030000 PyObject *py_import; py_import = __Pyx_PyObject_GetAttrStr(__pyx_b, __pyx_n_s_import); if (!py_import) goto bad; #endif if (from_list) list = from_list; else { empty_list = PyList_New(0); if (!empty_list) goto bad; list = empty_list; } global_dict = PyModule_GetDict(__pyx_m); if (!global_dict) goto bad; empty_dict = PyDict_New(); if (!empty_dict) goto bad; #if PY_VERSION_HEX >= 0x02050000 { #if PY_MAJOR_VERSION >= 3 if (level == -1) { if (strchr(__Pyx_MODULE_NAME, '.')) { #if PY_VERSION_HEX < 0x03030000 PyObject *py_level = PyInt_FromLong(1); if (!py_level) goto bad; module = PyObject_CallFunctionObjArgs(py_import, name, global_dict, empty_dict, list, py_level, NULL); Py_DECREF(py_level); #else module = PyImport_ImportModuleLevelObject( name, global_dict, empty_dict, list, 1); #endif if (!module) { if (!PyErr_ExceptionMatches(PyExc_ImportError)) goto bad; PyErr_Clear(); } } level = 0; /* try absolute import on failure */ } #endif if (!module) { #if PY_VERSION_HEX < 0x03030000 PyObject *py_level = PyInt_FromLong(level); if (!py_level) goto bad; module = PyObject_CallFunctionObjArgs(py_import, name, global_dict, empty_dict, list, py_level, NULL); Py_DECREF(py_level); #else module = PyImport_ImportModuleLevelObject( name, global_dict, empty_dict, list, level); #endif } } #else if (level>0) { PyErr_SetString(PyExc_RuntimeError, "Relative import is not supported for Python <=2.4."); goto bad; } module = PyObject_CallFunctionObjArgs(py_import, name, global_dict, empty_dict, list, NULL); #endif bad: #if PY_VERSION_HEX < 0x03030000 Py_XDECREF(py_import); #endif Py_XDECREF(empty_list); Py_XDECREF(empty_dict); return module; } #define __PYX_VERIFY_RETURN_INT(target_type, func_type, func) \ { \ func_type value = func(x); \ if (sizeof(target_type) < sizeof(func_type)) { \ if (unlikely(value != (func_type) (target_type) value)) { \ func_type zero = 0; \ PyErr_SetString(PyExc_OverflowError, \ (is_unsigned && unlikely(value < zero)) ? \ "can't convert negative value to " #target_type : \ "value too large to convert to " #target_type); \ return (target_type) -1; \ } \ } \ return (target_type) value; \ } #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS #include "longintrepr.h" #endif #endif static CYTHON_INLINE npy_int8 __Pyx_PyInt_As_npy_int8(PyObject *x) { const npy_int8 neg_one = (npy_int8) -1, const_zero = 0; const int is_unsigned = neg_one > const_zero; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_Check(x))) { if (sizeof(npy_int8) < sizeof(long)) { __PYX_VERIFY_RETURN_INT(npy_int8, long, PyInt_AS_LONG) } else { long val = PyInt_AS_LONG(x); if (is_unsigned && unlikely(val < 0)) { PyErr_SetString(PyExc_OverflowError, "can't convert negative value to npy_int8"); return (npy_int8) -1; } return (npy_int8) val; } } else #endif if (likely(PyLong_Check(x))) { if (is_unsigned) { #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS if (sizeof(digit) <= sizeof(npy_int8)) { switch (Py_SIZE(x)) { case 0: return 0; case 1: return (npy_int8) ((PyLongObject*)x)->ob_digit[0]; } } #endif #endif if (unlikely(Py_SIZE(x) < 0)) { PyErr_SetString(PyExc_OverflowError, "can't convert negative value to npy_int8"); return (npy_int8) -1; } if (sizeof(npy_int8) <= sizeof(unsigned long)) { __PYX_VERIFY_RETURN_INT(npy_int8, unsigned long, PyLong_AsUnsignedLong) } else if (sizeof(npy_int8) <= sizeof(unsigned long long)) { __PYX_VERIFY_RETURN_INT(npy_int8, unsigned long long, PyLong_AsUnsignedLongLong) } } else { #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS if (sizeof(digit) <= sizeof(npy_int8)) { switch (Py_SIZE(x)) { case 0: return 0; case 1: return +(npy_int8) ((PyLongObject*)x)->ob_digit[0]; case -1: return -(npy_int8) ((PyLongObject*)x)->ob_digit[0]; } } #endif #endif if (sizeof(npy_int8) <= sizeof(long)) { __PYX_VERIFY_RETURN_INT(npy_int8, long, PyLong_AsLong) } else if (sizeof(npy_int8) <= sizeof(long long)) { __PYX_VERIFY_RETURN_INT(npy_int8, long long, PyLong_AsLongLong) } } { #if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray) PyErr_SetString(PyExc_RuntimeError, "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers"); #else npy_int8 val; PyObject *v = __Pyx_PyNumber_Int(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_int8) -1; } } else { npy_int8 val; PyObject *tmp = __Pyx_PyNumber_Int(x); if (!tmp) return (npy_int8) -1; val = __Pyx_PyInt_As_npy_int8(tmp); Py_DECREF(tmp); return val; } } #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS #include "longintrepr.h" #endif #endif static CYTHON_INLINE npy_int16 __Pyx_PyInt_As_npy_int16(PyObject *x) { const npy_int16 neg_one = (npy_int16) -1, const_zero = 0; const int is_unsigned = neg_one > const_zero; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_Check(x))) { if (sizeof(npy_int16) < sizeof(long)) { __PYX_VERIFY_RETURN_INT(npy_int16, long, PyInt_AS_LONG) } else { long val = PyInt_AS_LONG(x); if (is_unsigned && unlikely(val < 0)) { PyErr_SetString(PyExc_OverflowError, "can't convert negative value to npy_int16"); return (npy_int16) -1; } return (npy_int16) val; } } else #endif if (likely(PyLong_Check(x))) { if (is_unsigned) { #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS if (sizeof(digit) <= sizeof(npy_int16)) { switch (Py_SIZE(x)) { case 0: return 0; case 1: return (npy_int16) ((PyLongObject*)x)->ob_digit[0]; } } #endif #endif if (unlikely(Py_SIZE(x) < 0)) { PyErr_SetString(PyExc_OverflowError, "can't convert negative value to npy_int16"); return (npy_int16) -1; } if (sizeof(npy_int16) <= sizeof(unsigned long)) { __PYX_VERIFY_RETURN_INT(npy_int16, unsigned long, PyLong_AsUnsignedLong) } else if (sizeof(npy_int16) <= sizeof(unsigned long long)) { __PYX_VERIFY_RETURN_INT(npy_int16, unsigned long long, PyLong_AsUnsignedLongLong) } } else { #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS if (sizeof(digit) <= sizeof(npy_int16)) { switch (Py_SIZE(x)) { case 0: return 0; case 1: return +(npy_int16) ((PyLongObject*)x)->ob_digit[0]; case -1: return -(npy_int16) ((PyLongObject*)x)->ob_digit[0]; } } #endif #endif if (sizeof(npy_int16) <= sizeof(long)) { __PYX_VERIFY_RETURN_INT(npy_int16, long, PyLong_AsLong) } else if (sizeof(npy_int16) <= sizeof(long long)) { __PYX_VERIFY_RETURN_INT(npy_int16, long long, PyLong_AsLongLong) } } { #if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray) PyErr_SetString(PyExc_RuntimeError, "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers"); #else npy_int16 val; PyObject *v = __Pyx_PyNumber_Int(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_int16) -1; } } else { npy_int16 val; PyObject *tmp = __Pyx_PyNumber_Int(x); if (!tmp) return (npy_int16) -1; val = __Pyx_PyInt_As_npy_int16(tmp); Py_DECREF(tmp); return val; } } #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS #include "longintrepr.h" #endif #endif static CYTHON_INLINE npy_int32 __Pyx_PyInt_As_npy_int32(PyObject *x) { const npy_int32 neg_one = (npy_int32) -1, const_zero = 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) } else { long val = PyInt_AS_LONG(x); if (is_unsigned && unlikely(val < 0)) { PyErr_SetString(PyExc_OverflowError, "can't convert negative value to npy_int32"); return (npy_int32) -1; } return (npy_int32) val; } } else #endif if (likely(PyLong_Check(x))) { if (is_unsigned) { #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS if (sizeof(digit) <= sizeof(npy_int32)) { switch (Py_SIZE(x)) { case 0: return 0; case 1: return (npy_int32) ((PyLongObject*)x)->ob_digit[0]; } } #endif #endif if (unlikely(Py_SIZE(x) < 0)) { PyErr_SetString(PyExc_OverflowError, "can't convert negative value to npy_int32"); return (npy_int32) -1; } if (sizeof(npy_int32) <= sizeof(unsigned long)) { __PYX_VERIFY_RETURN_INT(npy_int32, unsigned long, PyLong_AsUnsignedLong) } else if (sizeof(npy_int32) <= sizeof(unsigned long long)) { __PYX_VERIFY_RETURN_INT(npy_int32, unsigned long long, PyLong_AsUnsignedLongLong) } } else { #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS if (sizeof(digit) <= sizeof(npy_int32)) { switch (Py_SIZE(x)) { case 0: return 0; case 1: return +(npy_int32) ((PyLongObject*)x)->ob_digit[0]; case -1: return -(npy_int32) ((PyLongObject*)x)->ob_digit[0]; } } #endif #endif if (sizeof(npy_int32) <= sizeof(long)) { __PYX_VERIFY_RETURN_INT(npy_int32, long, PyLong_AsLong) } else if (sizeof(npy_int32) <= sizeof(long long)) { __PYX_VERIFY_RETURN_INT(npy_int32, long long, PyLong_AsLongLong) } } { #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_Int(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_Int(x); if (!tmp) return (npy_int32) -1; val = __Pyx_PyInt_As_npy_int32(tmp); Py_DECREF(tmp); return val; } } #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS #include "longintrepr.h" #endif #endif static CYTHON_INLINE npy_int64 __Pyx_PyInt_As_npy_int64(PyObject *x) { const npy_int64 neg_one = (npy_int64) -1, const_zero = 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) } else { long val = PyInt_AS_LONG(x); if (is_unsigned && unlikely(val < 0)) { PyErr_SetString(PyExc_OverflowError, "can't convert negative value to npy_int64"); return (npy_int64) -1; } return (npy_int64) val; } } else #endif if (likely(PyLong_Check(x))) { if (is_unsigned) { #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS if (sizeof(digit) <= sizeof(npy_int64)) { switch (Py_SIZE(x)) { case 0: return 0; case 1: return (npy_int64) ((PyLongObject*)x)->ob_digit[0]; } } #endif #endif if (unlikely(Py_SIZE(x) < 0)) { PyErr_SetString(PyExc_OverflowError, "can't convert negative value to npy_int64"); return (npy_int64) -1; } if (sizeof(npy_int64) <= sizeof(unsigned long)) { __PYX_VERIFY_RETURN_INT(npy_int64, unsigned long, PyLong_AsUnsignedLong) } else if (sizeof(npy_int64) <= sizeof(unsigned long long)) { __PYX_VERIFY_RETURN_INT(npy_int64, unsigned long long, PyLong_AsUnsignedLongLong) } } else { #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS if (sizeof(digit) <= sizeof(npy_int64)) { switch (Py_SIZE(x)) { case 0: return 0; case 1: return +(npy_int64) ((PyLongObject*)x)->ob_digit[0]; case -1: return -(npy_int64) ((PyLongObject*)x)->ob_digit[0]; } } #endif #endif if (sizeof(npy_int64) <= sizeof(long)) { __PYX_VERIFY_RETURN_INT(npy_int64, long, PyLong_AsLong) } else if (sizeof(npy_int64) <= sizeof(long long)) { __PYX_VERIFY_RETURN_INT(npy_int64, long long, PyLong_AsLongLong) } } { #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_Int(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_Int(x); if (!tmp) return (npy_int64) -1; val = __Pyx_PyInt_As_npy_int64(tmp); Py_DECREF(tmp); return val; } } static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value) { const int neg_one = (int) -1, const_zero = 0; const int is_unsigned = neg_one > const_zero; if (is_unsigned) { if (sizeof(int) < sizeof(long)) { return PyInt_FromLong((long) value); } else if (sizeof(int) <= sizeof(unsigned long)) { return PyLong_FromUnsignedLong((unsigned long) value); } else if (sizeof(int) <= sizeof(unsigned long long)) { return PyLong_FromUnsignedLongLong((unsigned long long) value); } } else { if (sizeof(int) <= sizeof(long)) { return PyInt_FromLong((long) value); } else if (sizeof(int) <= sizeof(long long)) { return PyLong_FromLongLong((long long) value); } } { int one = 1; int little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&value; return _PyLong_FromByteArray(bytes, sizeof(int), little, !is_unsigned); } } #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS #include "longintrepr.h" #endif #endif static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) { const int neg_one = (int) -1, const_zero = 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) } else { long val = PyInt_AS_LONG(x); if (is_unsigned && unlikely(val < 0)) { PyErr_SetString(PyExc_OverflowError, "can't convert negative value to int"); return (int) -1; } return (int) val; } } else #endif if (likely(PyLong_Check(x))) { if (is_unsigned) { #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS if (sizeof(digit) <= sizeof(int)) { switch (Py_SIZE(x)) { case 0: return 0; case 1: return (int) ((PyLongObject*)x)->ob_digit[0]; } } #endif #endif if (unlikely(Py_SIZE(x) < 0)) { PyErr_SetString(PyExc_OverflowError, "can't convert negative value to int"); return (int) -1; } if (sizeof(int) <= sizeof(unsigned long)) { __PYX_VERIFY_RETURN_INT(int, unsigned long, PyLong_AsUnsignedLong) } else if (sizeof(int) <= sizeof(unsigned long long)) { __PYX_VERIFY_RETURN_INT(int, unsigned long long, PyLong_AsUnsignedLongLong) } } else { #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS if (sizeof(digit) <= sizeof(int)) { switch (Py_SIZE(x)) { case 0: return 0; case 1: return +(int) ((PyLongObject*)x)->ob_digit[0]; case -1: return -(int) ((PyLongObject*)x)->ob_digit[0]; } } #endif #endif if (sizeof(int) <= sizeof(long)) { __PYX_VERIFY_RETURN_INT(int, long, PyLong_AsLong) } else if (sizeof(int) <= sizeof(long long)) { __PYX_VERIFY_RETURN_INT(int, long long, PyLong_AsLongLong) } } { #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_Int(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_Int(x); if (!tmp) return (int) -1; val = __Pyx_PyInt_As_int(tmp); Py_DECREF(tmp); return val; } } static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) { const long neg_one = (long) -1, const_zero = 0; const int is_unsigned = neg_one > const_zero; if (is_unsigned) { if (sizeof(long) < sizeof(long)) { return PyInt_FromLong((long) value); } else if (sizeof(long) <= sizeof(unsigned long)) { return PyLong_FromUnsignedLong((unsigned long) value); } else if (sizeof(long) <= sizeof(unsigned long long)) { return PyLong_FromUnsignedLongLong((unsigned long long) value); } } else { if (sizeof(long) <= sizeof(long)) { return PyInt_FromLong((long) value); } else if (sizeof(long) <= sizeof(long long)) { return PyLong_FromLongLong((long long) value); } } { int one = 1; int little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&value; return _PyLong_FromByteArray(bytes, sizeof(long), little, !is_unsigned); } } static CYTHON_INLINE PyObject* __Pyx_PyInt_From_npy_int64(npy_int64 value) { const npy_int64 neg_one = (npy_int64) -1, const_zero = 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); } else if (sizeof(npy_int64) <= sizeof(unsigned long long)) { return PyLong_FromUnsignedLongLong((unsigned long long) value); } } else { if (sizeof(npy_int64) <= sizeof(long)) { return PyInt_FromLong((long) value); } else if (sizeof(npy_int64) <= sizeof(long long)) { return PyLong_FromLongLong((long long) value); } } { 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); } } static CYTHON_INLINE PyObject* __Pyx_PyInt_From_npy_int32(npy_int32 value) { const npy_int32 neg_one = (npy_int32) -1, const_zero = 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); } else if (sizeof(npy_int32) <= sizeof(unsigned long long)) { return PyLong_FromUnsignedLongLong((unsigned long long) value); } } else { if (sizeof(npy_int32) <= sizeof(long)) { return PyInt_FromLong((long) value); } else if (sizeof(npy_int32) <= sizeof(long long)) { return PyLong_FromLongLong((long long) value); } } { 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); } } static CYTHON_INLINE PyObject* __Pyx_PyInt_From_npy_uint8(npy_uint8 value) { const npy_uint8 neg_one = (npy_uint8) -1, const_zero = 0; const int is_unsigned = neg_one > const_zero; if (is_unsigned) { if (sizeof(npy_uint8) < sizeof(long)) { return PyInt_FromLong((long) value); } else if (sizeof(npy_uint8) <= sizeof(unsigned long)) { return PyLong_FromUnsignedLong((unsigned long) value); } else if (sizeof(npy_uint8) <= sizeof(unsigned long long)) { return PyLong_FromUnsignedLongLong((unsigned long long) value); } } else { if (sizeof(npy_uint8) <= sizeof(long)) { return PyInt_FromLong((long) value); } else if (sizeof(npy_uint8) <= sizeof(long long)) { return PyLong_FromLongLong((long long) value); } } { int one = 1; int little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&value; return _PyLong_FromByteArray(bytes, sizeof(npy_uint8), little, !is_unsigned); } } #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS #include "longintrepr.h" #endif #endif static CYTHON_INLINE npy_uint8 __Pyx_PyInt_As_npy_uint8(PyObject *x) { const npy_uint8 neg_one = (npy_uint8) -1, const_zero = 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) } else { long val = PyInt_AS_LONG(x); if (is_unsigned && unlikely(val < 0)) { PyErr_SetString(PyExc_OverflowError, "can't convert negative value to npy_uint8"); return (npy_uint8) -1; } return (npy_uint8) val; } } else #endif if (likely(PyLong_Check(x))) { if (is_unsigned) { #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS if (sizeof(digit) <= sizeof(npy_uint8)) { switch (Py_SIZE(x)) { case 0: return 0; case 1: return (npy_uint8) ((PyLongObject*)x)->ob_digit[0]; } } #endif #endif if (unlikely(Py_SIZE(x) < 0)) { PyErr_SetString(PyExc_OverflowError, "can't convert negative value to npy_uint8"); return (npy_uint8) -1; } if (sizeof(npy_uint8) <= sizeof(unsigned long)) { __PYX_VERIFY_RETURN_INT(npy_uint8, unsigned long, PyLong_AsUnsignedLong) } else if (sizeof(npy_uint8) <= sizeof(unsigned long long)) { __PYX_VERIFY_RETURN_INT(npy_uint8, unsigned long long, PyLong_AsUnsignedLongLong) } } else { #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS if (sizeof(digit) <= sizeof(npy_uint8)) { switch (Py_SIZE(x)) { case 0: return 0; case 1: return +(npy_uint8) ((PyLongObject*)x)->ob_digit[0]; case -1: return -(npy_uint8) ((PyLongObject*)x)->ob_digit[0]; } } #endif #endif if (sizeof(npy_uint8) <= sizeof(long)) { __PYX_VERIFY_RETURN_INT(npy_uint8, long, PyLong_AsLong) } else if (sizeof(npy_uint8) <= sizeof(long long)) { __PYX_VERIFY_RETURN_INT(npy_uint8, long long, PyLong_AsLongLong) } } { #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_Int(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_Int(x); if (!tmp) return (npy_uint8) -1; val = __Pyx_PyInt_As_npy_uint8(tmp); Py_DECREF(tmp); return val; } } #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 #if CYTHON_CCOMPLEX #else static CYTHON_INLINE int __Pyx_c_eqf(__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_sumf(__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_difff(__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_prodf(__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; } static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_quotf(__pyx_t_float_complex a, __pyx_t_float_complex b) { __pyx_t_float_complex z; float denom = b.real * b.real + b.imag * b.imag; z.real = (a.real * b.real + a.imag * b.imag) / denom; z.imag = (a.imag * b.real - a.real * b.imag) / denom; return z; } static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_negf(__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_zerof(__pyx_t_float_complex a) { return (a.real == 0) && (a.imag == 0); } static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_conjf(__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_absf(__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_powf(__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_prodf(a, a); return __Pyx_c_prodf(a, a); case 3: z = __Pyx_c_prodf(a, a); return __Pyx_c_prodf(z, a); case 4: z = __Pyx_c_prodf(a, a); return __Pyx_c_prodf(z, z); } } if (a.imag == 0) { if (a.real == 0) { return a; } r = a.real; theta = 0; } else { r = __Pyx_c_absf(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 #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 #if CYTHON_CCOMPLEX #else static CYTHON_INLINE int __Pyx_c_eq(__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(__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(__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(__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; } static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_quot(__pyx_t_double_complex a, __pyx_t_double_complex b) { __pyx_t_double_complex z; double denom = b.real * b.real + b.imag * b.imag; z.real = (a.real * b.real + a.imag * b.imag) / denom; z.imag = (a.imag * b.real - a.real * b.imag) / denom; return z; } static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_neg(__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(__pyx_t_double_complex a) { return (a.real == 0) && (a.imag == 0); } static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_conj(__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(__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(__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(a, a); return __Pyx_c_prod(a, a); case 3: z = __Pyx_c_prod(a, a); return __Pyx_c_prod(z, a); case 4: z = __Pyx_c_prod(a, a); return __Pyx_c_prod(z, z); } } if (a.imag == 0) { if (a.real == 0) { return a; } r = a.real; theta = 0; } else { r = __Pyx_c_abs(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 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_ptrdiff_t(ptrdiff_t value) { const ptrdiff_t neg_one = (ptrdiff_t) -1, const_zero = 0; const int is_unsigned = neg_one > const_zero; if (is_unsigned) { if (sizeof(ptrdiff_t) < sizeof(long)) { return PyInt_FromLong((long) value); } else if (sizeof(ptrdiff_t) <= sizeof(unsigned long)) { return PyLong_FromUnsignedLong((unsigned long) value); } else if (sizeof(ptrdiff_t) <= sizeof(unsigned long long)) { return PyLong_FromUnsignedLongLong((unsigned long long) value); } } else { if (sizeof(ptrdiff_t) <= sizeof(long)) { return PyInt_FromLong((long) value); } else if (sizeof(ptrdiff_t) <= sizeof(long long)) { return PyLong_FromLongLong((long long) value); } } { int one = 1; int little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&value; return _PyLong_FromByteArray(bytes, sizeof(ptrdiff_t), little, !is_unsigned); } } #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS #include "longintrepr.h" #endif #endif static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) { const long neg_one = (long) -1, const_zero = 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) } else { long val = PyInt_AS_LONG(x); if (is_unsigned && unlikely(val < 0)) { PyErr_SetString(PyExc_OverflowError, "can't convert negative value to long"); return (long) -1; } return (long) val; } } else #endif if (likely(PyLong_Check(x))) { if (is_unsigned) { #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS if (sizeof(digit) <= sizeof(long)) { switch (Py_SIZE(x)) { case 0: return 0; case 1: return (long) ((PyLongObject*)x)->ob_digit[0]; } } #endif #endif if (unlikely(Py_SIZE(x) < 0)) { PyErr_SetString(PyExc_OverflowError, "can't convert negative value to long"); return (long) -1; } if (sizeof(long) <= sizeof(unsigned long)) { __PYX_VERIFY_RETURN_INT(long, unsigned long, PyLong_AsUnsignedLong) } else if (sizeof(long) <= sizeof(unsigned long long)) { __PYX_VERIFY_RETURN_INT(long, unsigned long long, PyLong_AsUnsignedLongLong) } } else { #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS if (sizeof(digit) <= sizeof(long)) { switch (Py_SIZE(x)) { case 0: return 0; case 1: return +(long) ((PyLongObject*)x)->ob_digit[0]; case -1: return -(long) ((PyLongObject*)x)->ob_digit[0]; } } #endif #endif if (sizeof(long) <= sizeof(long)) { __PYX_VERIFY_RETURN_INT(long, long, PyLong_AsLong) } else if (sizeof(long) <= sizeof(long long)) { __PYX_VERIFY_RETURN_INT(long, long long, PyLong_AsLongLong) } } { #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_Int(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_Int(x); if (!tmp) return (long) -1; val = __Pyx_PyInt_As_long(tmp); Py_DECREF(tmp); return val; } } 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); #if PY_VERSION_HEX < 0x02050000 return PyErr_Warn(NULL, message); #else return PyErr_WarnEx(NULL, message, 1); #endif } return 0; } #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 #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", module_name, class_name); #if PY_VERSION_HEX < 0x02050000 if (PyErr_Warn(NULL, warning) < 0) goto bad; #else if (PyErr_WarnEx(NULL, warning, 0) < 0) goto bad; #endif } else if ((size_t)basicsize != size) { PyErr_Format(PyExc_ValueError, "%.200s.%.200s has the wrong size, try recompiling", module_name, class_name); goto bad; } return (PyTypeObject *)result; bad: Py_XDECREF(py_module); Py_XDECREF(result); return NULL; } #endif 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) / 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, 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); } #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, /*int argcount,*/ 0, /*int kwonlyargcount,*/ 0, /*int nlocals,*/ 0, /*int stacksize,*/ 0, /*int flags,*/ __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, /*int firstlineno,*/ __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; PyObject *py_globals = 0; PyFrameObject *py_frame = 0; py_code = __pyx_find_code_object(c_line ? c_line : py_line); if (!py_code) { py_code = __Pyx_CreateCodeObjectForTraceback( funcname, c_line, py_line, filename); if (!py_code) goto bad; __pyx_insert_code_object(c_line ? c_line : py_line, py_code); } py_globals = PyModule_GetDict(__pyx_m); if (!py_globals) goto bad; py_frame = PyFrame_New( PyThreadState_GET(), /*PyThreadState *tstate,*/ py_code, /*PyCodeObject *code,*/ py_globals, /*PyObject *globals,*/ 0 /*PyObject *locals*/ ); if (!py_frame) goto bad; py_frame->f_lineno = py_line; PyTraceBack_Here(py_frame); bad: Py_XDECREF(py_code); Py_XDECREF(py_frame); } 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 /* Python 3+ has unicode identifiers */ if (t->is_unicode | t->is_str) { if (t->intern) { *t->p = PyUnicode_InternFromString(t->s); } else if (t->encoding) { *t->p = PyUnicode_Decode(t->s, t->n - 1, t->encoding, NULL); } else { *t->p = PyUnicode_FromStringAndSize(t->s, t->n - 1); } } else { *t->p = PyBytes_FromStringAndSize(t->s, t->n - 1); } #endif if (!*t->p) return -1; ++t; } return 0; } static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(char* c_str) { return __Pyx_PyUnicode_FromStringAndSize(c_str, strlen(c_str)); } static CYTHON_INLINE char* __Pyx_PyObject_AsString(PyObject* o) { Py_ssize_t ignore; return __Pyx_PyObject_AsStringAndSize(o, &ignore); } static CYTHON_INLINE char* __Pyx_PyObject_AsStringAndSize(PyObject* o, Py_ssize_t *length) { #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT if ( #if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII __Pyx_sys_getdefaultencoding_not_ascii && #endif PyUnicode_Check(o)) { #if PY_VERSION_HEX < 0x03030000 char* defenc_c; PyObject* defenc = _PyUnicode_AsDefaultEncodedString(o, NULL); if (!defenc) return NULL; defenc_c = PyBytes_AS_STRING(defenc); #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII { char* end = defenc_c + PyBytes_GET_SIZE(defenc); char* c; for (c = defenc_c; c < end; c++) { if ((unsigned char) (*c) >= 128) { PyUnicode_AsASCIIString(o); return NULL; } } } #endif /*__PYX_DEFAULT_STRING_ENCODING_IS_ASCII*/ *length = PyBytes_GET_SIZE(defenc); return defenc_c; #else /* PY_VERSION_HEX < 0x03030000 */ if (PyUnicode_READY(o) == -1) return NULL; #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII if (PyUnicode_IS_ASCII(o)) { *length = PyUnicode_GET_DATA_SIZE(o); return PyUnicode_AsUTF8(o); } else { PyUnicode_AsASCIIString(o); return NULL; } #else /* __PYX_DEFAULT_STRING_ENCODING_IS_ASCII */ return PyUnicode_AsUTF8AndSize(o, length); #endif /* __PYX_DEFAULT_STRING_ENCODING_IS_ASCII */ #endif /* PY_VERSION_HEX < 0x03030000 */ } else #endif /* __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT */ #if PY_VERSION_HEX >= 0x02060000 if (PyByteArray_Check(o)) { *length = PyByteArray_GET_SIZE(o); return PyByteArray_AS_STRING(o); } else #endif { char* result; int r = PyBytes_AsStringAndSize(o, &result, length); if (unlikely(r < 0)) { return NULL; } else { return result; } } } static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject* x) { int is_true = x == Py_True; if (is_true | (x == Py_False) | (x == Py_None)) return is_true; else return PyObject_IsTrue(x); } static CYTHON_INLINE PyObject* __Pyx_PyNumber_Int(PyObject* x) { PyNumberMethods *m; const char *name = NULL; PyObject *res = NULL; #if PY_MAJOR_VERSION < 3 if (PyInt_Check(x) || PyLong_Check(x)) #else if (PyLong_Check(x)) #endif return Py_INCREF(x), x; m = Py_TYPE(x)->tp_as_number; #if PY_MAJOR_VERSION < 3 if (m && m->nb_int) { name = "int"; res = PyNumber_Int(x); } else if (m && m->nb_long) { name = "long"; res = PyNumber_Long(x); } #else if (m && m->nb_int) { name = "int"; res = PyNumber_Long(x); } #endif if (res) { #if PY_MAJOR_VERSION < 3 if (!PyInt_Check(res) && !PyLong_Check(res)) { #else if (!PyLong_Check(res)) { #endif PyErr_Format(PyExc_TypeError, "__%.4s__ returned non-%.4s (type %.200s)", name, name, Py_TYPE(res)->tp_name); Py_DECREF(res); return NULL; } } else if (!PyErr_Occurred()) { PyErr_SetString(PyExc_TypeError, "an integer is required"); } return res; } #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS #include "longintrepr.h" #endif #endif 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))) return PyInt_AS_LONG(b); #endif if (likely(PyLong_CheckExact(b))) { #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS switch (Py_SIZE(b)) { case -1: return -(sdigit)((PyLongObject*)b)->ob_digit[0]; case 0: return 0; case 1: return ((PyLongObject*)b)->ob_digit[0]; } #endif #endif #if PY_VERSION_HEX < 0x02060000 return PyInt_AsSsize_t(b); #else return PyLong_AsSsize_t(b); #endif } 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) { #if PY_VERSION_HEX < 0x02050000 if (ival <= LONG_MAX) return PyInt_FromLong((long)ival); else { unsigned char *bytes = (unsigned char *) &ival; int one = 1; int little = (int)*(unsigned char*)&one; return _PyLong_FromByteArray(bytes, sizeof(size_t), little, 0); } #else return PyInt_FromSize_t(ival); #endif } #endif /* Py_PYTHON_H */ debian/cythonized-files/pandas/tslib.c0000664000000000000000001325651012275603610015216 0ustar /* Generated by Cython 0.20 on Mon Feb 3 08:41:48 2014 */ #define PY_SSIZE_T_CLEAN #ifndef CYTHON_USE_PYLONG_INTERNALS #ifdef PYLONG_BITS_IN_DIGIT #define CYTHON_USE_PYLONG_INTERNALS 0 #else #include "pyconfig.h" #ifdef PYLONG_BITS_IN_DIGIT #define CYTHON_USE_PYLONG_INTERNALS 1 #else #define CYTHON_USE_PYLONG_INTERNALS 0 #endif #endif #endif #include "Python.h" #ifndef Py_PYTHON_H #error Python headers needed to compile C extensions, please install development version of Python. #elif PY_VERSION_HEX < 0x02040000 #error Cython requires Python 2.4+. #else #define CYTHON_ABI "0_20" #include /* For offsetof */ #ifndef offsetof #define offsetof(type, member) ( (size_t) & ((type*)0) -> member ) #endif #if !defined(WIN32) && !defined(MS_WINDOWS) #ifndef __stdcall #define __stdcall #endif #ifndef __cdecl #define __cdecl #endif #ifndef __fastcall #define __fastcall #endif #endif #ifndef DL_IMPORT #define DL_IMPORT(t) t #endif #ifndef DL_EXPORT #define DL_EXPORT(t) t #endif #ifndef PY_LONG_LONG #define PY_LONG_LONG LONG_LONG #endif #ifndef Py_HUGE_VAL #define Py_HUGE_VAL HUGE_VAL #endif #ifdef PYPY_VERSION #define CYTHON_COMPILING_IN_PYPY 1 #define CYTHON_COMPILING_IN_CPYTHON 0 #else #define CYTHON_COMPILING_IN_PYPY 0 #define CYTHON_COMPILING_IN_CPYTHON 1 #endif #if CYTHON_COMPILING_IN_PYPY #define Py_OptimizeFlag 0 #endif #if PY_VERSION_HEX < 0x02050000 typedef int Py_ssize_t; #define PY_SSIZE_T_MAX INT_MAX #define PY_SSIZE_T_MIN INT_MIN #define PY_FORMAT_SIZE_T "" #define CYTHON_FORMAT_SSIZE_T "" #define PyInt_FromSsize_t(z) PyInt_FromLong(z) #define PyInt_AsSsize_t(o) __Pyx_PyInt_As_int(o) #define PyNumber_Index(o) ((PyNumber_Check(o) && !PyFloat_Check(o)) ? PyNumber_Int(o) : \ (PyErr_Format(PyExc_TypeError, \ "expected index value, got %.200s", Py_TYPE(o)->tp_name), \ (PyObject*)0)) #define __Pyx_PyIndex_Check(o) (PyNumber_Check(o) && !PyFloat_Check(o) && \ !PyComplex_Check(o)) #define PyIndex_Check __Pyx_PyIndex_Check #define PyErr_WarnEx(category, message, stacklevel) PyErr_Warn(category, message) #define __PYX_BUILD_PY_SSIZE_T "i" #else #define __PYX_BUILD_PY_SSIZE_T "n" #define CYTHON_FORMAT_SSIZE_T "z" #define __Pyx_PyIndex_Check PyIndex_Check #endif #if PY_VERSION_HEX < 0x02060000 #define Py_REFCNT(ob) (((PyObject*)(ob))->ob_refcnt) #define Py_TYPE(ob) (((PyObject*)(ob))->ob_type) #define Py_SIZE(ob) (((PyVarObject*)(ob))->ob_size) #define PyVarObject_HEAD_INIT(type, size) \ PyObject_HEAD_INIT(type) size, #define PyType_Modified(t) typedef struct { void *buf; PyObject *obj; Py_ssize_t len; Py_ssize_t itemsize; int readonly; int ndim; char *format; Py_ssize_t *shape; Py_ssize_t *strides; Py_ssize_t *suboffsets; void *internal; } Py_buffer; #define PyBUF_SIMPLE 0 #define PyBUF_WRITABLE 0x0001 #define PyBUF_FORMAT 0x0004 #define PyBUF_ND 0x0008 #define PyBUF_STRIDES (0x0010 | PyBUF_ND) #define PyBUF_C_CONTIGUOUS (0x0020 | PyBUF_STRIDES) #define PyBUF_F_CONTIGUOUS (0x0040 | PyBUF_STRIDES) #define PyBUF_ANY_CONTIGUOUS (0x0080 | PyBUF_STRIDES) #define PyBUF_INDIRECT (0x0100 | PyBUF_STRIDES) #define PyBUF_RECORDS (PyBUF_STRIDES | PyBUF_FORMAT | PyBUF_WRITABLE) #define PyBUF_FULL (PyBUF_INDIRECT | PyBUF_FORMAT | PyBUF_WRITABLE) typedef int (*getbufferproc)(PyObject *, Py_buffer *, int); typedef void (*releasebufferproc)(PyObject *, Py_buffer *); #endif #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, 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 #if PY_VERSION_HEX < 0x02060000 #define PyUnicode_FromString(s) PyUnicode_Decode(s, strlen(s), "UTF-8", "strict") #endif #if PY_MAJOR_VERSION >= 3 #define Py_TPFLAGS_CHECKTYPES 0 #define Py_TPFLAGS_HAVE_INDEX 0 #endif #if (PY_VERSION_HEX < 0x02060000) || (PY_MAJOR_VERSION >= 3) #define Py_TPFLAGS_HAVE_NEWBUFFER 0 #endif #if PY_VERSION_HEX < 0x02060000 #define Py_TPFLAGS_HAVE_VERSION_TAG 0 #endif #if PY_VERSION_HEX < 0x02060000 && !defined(Py_TPFLAGS_IS_ABSTRACT) #define Py_TPFLAGS_IS_ABSTRACT 0 #endif #if PY_VERSION_HEX < 0x030400a1 && !defined(Py_TPFLAGS_HAVE_FINALIZE) #define Py_TPFLAGS_HAVE_FINALIZE 0 #endif #if PY_VERSION_HEX > 0x03030000 && defined(PyUnicode_KIND) #define CYTHON_PEP393_ENABLED 1 #define __Pyx_PyUnicode_READY(op) (likely(PyUnicode_IS_READY(op)) ? \ 0 : _PyUnicode_Ready((PyObject *)(op))) #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_LENGTH(u) #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i) #define __Pyx_PyUnicode_KIND(u) PyUnicode_KIND(u) #define __Pyx_PyUnicode_DATA(u) PyUnicode_DATA(u) #define __Pyx_PyUnicode_READ(k, d, i) PyUnicode_READ(k, d, i) #else #define CYTHON_PEP393_ENABLED 0 #define __Pyx_PyUnicode_READY(op) (0) #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_SIZE(u) #define __Pyx_PyUnicode_READ_CHAR(u, i) ((Py_UCS4)(PyUnicode_AS_UNICODE(u)[i])) #define __Pyx_PyUnicode_KIND(u) (sizeof(Py_UNICODE)) #define __Pyx_PyUnicode_DATA(u) ((void*)PyUnicode_AS_UNICODE(u)) #define __Pyx_PyUnicode_READ(k, d, i) ((void)(k), (Py_UCS4)(((Py_UNICODE*)d)[i])) #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)) #define __Pyx_PyUnicode_Concat(a, b) ((unlikely((a) == Py_None) || unlikely((b) == Py_None)) ? \ PyNumber_Add(a, b) : PyUnicode_Concat(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 #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_VERSION_HEX < 0x02060000 #define PyBytesObject PyStringObject #define PyBytes_Type PyString_Type #define PyBytes_Check PyString_Check #define PyBytes_CheckExact PyString_CheckExact #define PyBytes_FromString PyString_FromString #define PyBytes_FromStringAndSize PyString_FromStringAndSize #define PyBytes_FromFormat PyString_FromFormat #define PyBytes_DecodeEscape PyString_DecodeEscape #define PyBytes_AsString PyString_AsString #define PyBytes_AsStringAndSize PyString_AsStringAndSize #define PyBytes_Size PyString_Size #define PyBytes_AS_STRING PyString_AS_STRING #define PyBytes_GET_SIZE PyString_GET_SIZE #define PyBytes_Repr PyString_Repr #define PyBytes_Concat PyString_Concat #define PyBytes_ConcatAndDel PyString_ConcatAndDel #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_CheckExact(obj) || PyUnicode_CheckExact(obj) || \ PyString_Check(obj) || PyUnicode_Check(obj)) #define __Pyx_PyBaseString_CheckExact(obj) (PyString_CheckExact(obj) || PyUnicode_CheckExact(obj)) #endif #if PY_VERSION_HEX < 0x02060000 #define PySet_Check(obj) PyObject_TypeCheck(obj, &PySet_Type) #define PyFrozenSet_Check(obj) PyObject_TypeCheck(obj, &PyFrozenSet_Type) #endif #ifndef PySet_CheckExact #define PySet_CheckExact(obj) (Py_TYPE(obj) == &PySet_Type) #endif #define __Pyx_TypeCheck(obj, type) PyObject_TypeCheck(obj, (PyTypeObject *)type) #if PY_MAJOR_VERSION >= 3 #define PyIntObject PyLongObject #define PyInt_Type PyLong_Type #define PyInt_Check(op) PyLong_Check(op) #define PyInt_CheckExact(op) PyLong_CheckExact(op) #define PyInt_FromString PyLong_FromString #define PyInt_FromUnicode PyLong_FromUnicode #define PyInt_FromLong PyLong_FromLong #define PyInt_FromSize_t PyLong_FromSize_t #define PyInt_FromSsize_t PyLong_FromSsize_t #define PyInt_AsLong PyLong_AsLong #define PyInt_AS_LONG PyLong_AS_LONG #define PyInt_AsSsize_t PyLong_AsSsize_t #define PyInt_AsUnsignedLongMask PyLong_AsUnsignedLongMask #define PyInt_AsUnsignedLongLongMask PyLong_AsUnsignedLongLongMask #define PyNumber_Int PyNumber_Long #endif #if PY_MAJOR_VERSION >= 3 #define PyBoolObject PyLongObject #endif #if PY_VERSION_HEX < 0x03020000 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) || (PY_VERSION_HEX >= 0x03010300) #define __Pyx_PySequence_GetSlice(obj, a, b) PySequence_GetSlice(obj, a, b) #define __Pyx_PySequence_SetSlice(obj, a, b, value) PySequence_SetSlice(obj, a, b, value) #define __Pyx_PySequence_DelSlice(obj, a, b) PySequence_DelSlice(obj, a, b) #else #define __Pyx_PySequence_GetSlice(obj, a, b) (unlikely(!(obj)) ? \ (PyErr_SetString(PyExc_SystemError, "null argument to internal routine"), (PyObject*)0) : \ (likely((obj)->ob_type->tp_as_mapping) ? (PySequence_GetSlice(obj, a, b)) : \ (PyErr_Format(PyExc_TypeError, "'%.200s' object is unsliceable", (obj)->ob_type->tp_name), (PyObject*)0))) #define __Pyx_PySequence_SetSlice(obj, a, b, value) (unlikely(!(obj)) ? \ (PyErr_SetString(PyExc_SystemError, "null argument to internal routine"), -1) : \ (likely((obj)->ob_type->tp_as_mapping) ? (PySequence_SetSlice(obj, a, b, value)) : \ (PyErr_Format(PyExc_TypeError, "'%.200s' object doesn't support slice assignment", (obj)->ob_type->tp_name), -1))) #define __Pyx_PySequence_DelSlice(obj, a, b) (unlikely(!(obj)) ? \ (PyErr_SetString(PyExc_SystemError, "null argument to internal routine"), -1) : \ (likely((obj)->ob_type->tp_as_mapping) ? (PySequence_DelSlice(obj, a, b)) : \ (PyErr_Format(PyExc_TypeError, "'%.200s' object doesn't support slice deletion", (obj)->ob_type->tp_name), -1))) #endif #if PY_MAJOR_VERSION >= 3 #define PyMethod_New(func, self, klass) ((self) ? PyMethod_New(func, self) : PyInstanceMethod_New(func)) #endif #if PY_VERSION_HEX < 0x02050000 #define __Pyx_GetAttrString(o,n) PyObject_GetAttrString((o),((char *)(n))) #define __Pyx_SetAttrString(o,n,a) PyObject_SetAttrString((o),((char *)(n)),(a)) #define __Pyx_DelAttrString(o,n) PyObject_DelAttrString((o),((char *)(n))) #else #define __Pyx_GetAttrString(o,n) PyObject_GetAttrString((o),(n)) #define __Pyx_SetAttrString(o,n,a) PyObject_SetAttrString((o),(n),(a)) #define __Pyx_DelAttrString(o,n) PyObject_DelAttrString((o),(n)) #endif #if PY_VERSION_HEX < 0x02050000 #define __Pyx_NAMESTR(n) ((char *)(n)) #define __Pyx_DOCSTR(n) ((char *)(n)) #else #define __Pyx_NAMESTR(n) (n) #define __Pyx_DOCSTR(n) (n) #endif #ifndef CYTHON_INLINE #if defined(__GNUC__) #define CYTHON_INLINE __inline__ #elif defined(_MSC_VER) #define CYTHON_INLINE __inline #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L #define CYTHON_INLINE inline #else #define CYTHON_INLINE #endif #endif #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 #ifdef NAN #define __PYX_NAN() ((float) NAN) #else static CYTHON_INLINE float __PYX_NAN() { /* Initialize NaN. The sign is irrelevant, an exponent with all bits 1 and a nonzero mantissa means NaN. If the first bit in the mantissa is 1, it is a quiet NaN. */ float value; memset(&value, 0xFF, sizeof(value)); return value; } #endif #if PY_MAJOR_VERSION >= 3 #define __Pyx_PyNumber_Divide(x,y) PyNumber_TrueDivide(x,y) #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceTrueDivide(x,y) #else #define __Pyx_PyNumber_Divide(x,y) PyNumber_Divide(x,y) #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceDivide(x,y) #endif #ifndef __PYX_EXTERN_C #ifdef __cplusplus #define __PYX_EXTERN_C extern "C" #else #define __PYX_EXTERN_C extern #endif #endif #if defined(WIN32) || defined(MS_WINDOWS) #define _USE_MATH_DEFINES #endif #include #define __PYX_HAVE__pandas__tslib #define __PYX_HAVE_API__pandas__tslib #include "string.h" #include "stdio.h" #include "stdlib.h" #include "numpy/arrayobject.h" #include "numpy/ufuncobject.h" #include "pythread.h" #include "headers/stdint.h" #include "datetime.h" #include "datetime_helper.h" #include "numpy/ndarrayobject.h" #include "numpy_helper.h" #include "numpy/npy_common.h" #include "datetime/np_datetime.h" #include "datetime/np_datetime_strings.h" #include "khash_python.h" #include "period.h" #ifdef _OPENMP #include #endif /* _OPENMP */ #ifdef PYREX_WITHOUT_ASSERTIONS #define CYTHON_WITHOUT_ASSERTIONS #endif #ifndef CYTHON_UNUSED # if defined(__GNUC__) # if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)) # define CYTHON_UNUSED __attribute__ ((__unused__)) # else # define CYTHON_UNUSED # endif # elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER)) # define CYTHON_UNUSED __attribute__ ((__unused__)) # else # define CYTHON_UNUSED # endif #endif typedef struct {PyObject **p; char *s; const Py_ssize_t n; const char* encoding; const char is_unicode; const char is_str; const char intern; } __Pyx_StringTabEntry; /*proto*/ #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_fits_Py_ssize_t(v, type, is_signed) ( \ (sizeof(type) < sizeof(Py_ssize_t)) || \ (sizeof(type) > sizeof(Py_ssize_t) && \ likely(v < (type)PY_SSIZE_T_MAX || \ v == (type)PY_SSIZE_T_MAX) && \ (!is_signed || likely(v > (type)PY_SSIZE_T_MIN || \ v == (type)PY_SSIZE_T_MIN))) || \ (sizeof(type) == sizeof(Py_ssize_t) && \ (is_signed || likely(v < (type)PY_SSIZE_T_MAX || \ v == (type)PY_SSIZE_T_MAX))) ) static CYTHON_INLINE char* __Pyx_PyObject_AsString(PyObject*); static CYTHON_INLINE char* __Pyx_PyObject_AsStringAndSize(PyObject*, Py_ssize_t* length); #define __Pyx_PyByteArray_FromString(s) PyByteArray_FromStringAndSize((const char*)s, strlen((const char*)s)) #define __Pyx_PyByteArray_FromStringAndSize(s, l) PyByteArray_FromStringAndSize((const char*)s, l) #define __Pyx_PyBytes_FromString PyBytes_FromString #define __Pyx_PyBytes_FromStringAndSize PyBytes_FromStringAndSize static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(char*); #if PY_MAJOR_VERSION < 3 #define __Pyx_PyStr_FromString __Pyx_PyBytes_FromString #define __Pyx_PyStr_FromStringAndSize __Pyx_PyBytes_FromStringAndSize #else #define __Pyx_PyStr_FromString __Pyx_PyUnicode_FromString #define __Pyx_PyStr_FromStringAndSize __Pyx_PyUnicode_FromStringAndSize #endif #define __Pyx_PyObject_AsSString(s) ((signed char*) __Pyx_PyObject_AsString(s)) #define __Pyx_PyObject_AsUString(s) ((unsigned char*) __Pyx_PyObject_AsString(s)) #define __Pyx_PyObject_FromUString(s) __Pyx_PyObject_FromString((char*)s) #define __Pyx_PyBytes_FromUString(s) __Pyx_PyBytes_FromString((char*)s) #define __Pyx_PyByteArray_FromUString(s) __Pyx_PyByteArray_FromString((char*)s) #define __Pyx_PyStr_FromUString(s) __Pyx_PyStr_FromString((char*)s) #define __Pyx_PyUnicode_FromUString(s) __Pyx_PyUnicode_FromString((char*)s) #if PY_MAJOR_VERSION < 3 static CYTHON_INLINE size_t __Pyx_Py_UNICODE_strlen(const Py_UNICODE *u) { const Py_UNICODE *u_end = u; while (*u_end++) ; return u_end - u - 1; } #else #define __Pyx_Py_UNICODE_strlen Py_UNICODE_strlen #endif #define __Pyx_PyUnicode_FromUnicode(u) PyUnicode_FromUnicode(u, __Pyx_Py_UNICODE_strlen(u)) #define __Pyx_PyUnicode_FromUnicodeAndLength PyUnicode_FromUnicode #define __Pyx_PyUnicode_AsUnicode PyUnicode_AsUnicode #define __Pyx_Owned_Py_None(b) (Py_INCREF(Py_None), Py_None) #define __Pyx_PyBool_FromLong(b) ((b) ? (Py_INCREF(Py_True), Py_True) : (Py_INCREF(Py_False), Py_False)) static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*); static CYTHON_INLINE PyObject* __Pyx_PyNumber_Int(PyObject* x); static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*); static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t); #if CYTHON_COMPILING_IN_CPYTHON #define __pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x)) #else #define __pyx_PyFloat_AsDouble(x) PyFloat_AsDouble(x) #endif #define __pyx_PyFloat_AsFloat(x) ((float) __pyx_PyFloat_AsDouble(x)) #if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII static int __Pyx_sys_getdefaultencoding_not_ascii; static int __Pyx_init_sys_getdefaultencoding_params(void) { PyObject* sys = NULL; PyObject* default_encoding = NULL; PyObject* ascii_chars_u = NULL; PyObject* ascii_chars_b = NULL; sys = PyImport_ImportModule("sys"); if (sys == NULL) goto bad; default_encoding = PyObject_CallMethod(sys, (char*) (const char*) "getdefaultencoding", NULL); if (default_encoding == NULL) goto bad; if (strcmp(PyBytes_AsString(default_encoding), "ascii") == 0) { __Pyx_sys_getdefaultencoding_not_ascii = 0; } else { const char* default_encoding_c = PyBytes_AS_STRING(default_encoding); 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 == NULL) goto bad; ascii_chars_b = PyUnicode_AsEncodedString(ascii_chars_u, default_encoding_c, NULL); if (ascii_chars_b == NULL || strncmp(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_XDECREF(sys); Py_XDECREF(default_encoding); Py_XDECREF(ascii_chars_u); Py_XDECREF(ascii_chars_b); return 0; bad: Py_XDECREF(sys); 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 = NULL; PyObject* default_encoding = NULL; char* default_encoding_c; sys = PyImport_ImportModule("sys"); if (sys == NULL) goto bad; default_encoding = PyObject_CallMethod(sys, (char*) (const char*) "getdefaultencoding", NULL); if (default_encoding == NULL) goto bad; default_encoding_c = PyBytes_AS_STRING(default_encoding); __PYX_DEFAULT_STRING_ENCODING = (char*) malloc(strlen(default_encoding_c)); strcpy(__PYX_DEFAULT_STRING_ENCODING, default_encoding_c); Py_DECREF(sys); Py_DECREF(default_encoding); return 0; bad: Py_XDECREF(sys); Py_XDECREF(default_encoding); return -1; } #endif #endif #ifdef __GNUC__ /* Test for GCC > 2.95 */ #if __GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95)) #define likely(x) __builtin_expect(!!(x), 1) #define unlikely(x) __builtin_expect(!!(x), 0) #else /* __GNUC__ > 2 ... */ #define likely(x) (x) #define unlikely(x) (x) #endif /* __GNUC__ > 2 ... */ #else /* __GNUC__ */ #define likely(x) (x) #define unlikely(x) (x) #endif /* __GNUC__ */ static PyObject *__pyx_m; static PyObject *__pyx_d; static PyObject *__pyx_b; static PyObject *__pyx_empty_tuple; static PyObject *__pyx_empty_bytes; static int __pyx_lineno; static int __pyx_clineno = 0; static const char * __pyx_cfilenm= __FILE__; static const char *__pyx_filename; #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[] = { "tslib.pyx", "datetime.pxd", "numpy.pxd", "util.pxd", "type.pxd", "bool.pxd", "complex.pxd", }; #define IS_UNSIGNED(type) (((type) -1) > 0) struct __Pyx_StructField_; #define __PYX_BUF_FLAGS_PACKED_STRUCT (1 << 0) typedef struct { const char* name; /* for error messages only */ struct __Pyx_StructField_* fields; size_t size; /* sizeof(type) */ size_t arraysize[8]; /* length of array in each dimension */ int ndim; char typegroup; /* _R_eal, _C_omplex, Signed _I_nt, _U_nsigned int, _S_truct, _P_ointer, _O_bject, c_H_ar */ 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; /* "numpy.pxd":726 * # 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; /* "numpy.pxd":727 * * 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; /* "numpy.pxd":728 * 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; /* "numpy.pxd":729 * 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; /* "numpy.pxd":733 * #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; /* "numpy.pxd":734 * * 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; /* "numpy.pxd":735 * 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; /* "numpy.pxd":736 * 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; /* "numpy.pxd":740 * #ctypedef npy_uint128 uint128_t * * ctypedef npy_float16 float16_t # <<<<<<<<<<<<<< * ctypedef npy_float32 float32_t * ctypedef npy_float64 float64_t */ typedef npy_float16 __pyx_t_5numpy_float16_t; /* "numpy.pxd":741 * * ctypedef npy_float16 float16_t * ctypedef npy_float32 float32_t # <<<<<<<<<<<<<< * ctypedef npy_float64 float64_t * #ctypedef npy_float80 float80_t */ typedef npy_float32 __pyx_t_5numpy_float32_t; /* "numpy.pxd":742 * ctypedef npy_float16 float16_t * 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; /* "numpy.pxd":751 * # 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; /* "numpy.pxd":752 * # 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; /* "numpy.pxd":753 * 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; /* "numpy.pxd":755 * 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; /* "numpy.pxd":756 * * ctypedef npy_ulong uint_t * ctypedef npy_ulonglong ulong_t # <<<<<<<<<<<<<< * ctypedef npy_ulonglong ulonglong_t * */ typedef npy_ulonglong __pyx_t_5numpy_ulong_t; /* "numpy.pxd":757 * 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; /* "numpy.pxd":759 * ctypedef npy_ulonglong ulonglong_t * * ctypedef npy_intp intp_t # <<<<<<<<<<<<<< * ctypedef npy_uintp uintp_t * */ typedef npy_intp __pyx_t_5numpy_intp_t; /* "numpy.pxd":760 * * ctypedef npy_intp intp_t * ctypedef npy_uintp uintp_t # <<<<<<<<<<<<<< * * ctypedef npy_double float_t */ typedef npy_uintp __pyx_t_5numpy_uintp_t; /* "numpy.pxd":762 * 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; /* "numpy.pxd":763 * * ctypedef npy_double float_t * ctypedef npy_double double_t # <<<<<<<<<<<<<< * ctypedef npy_longdouble longdouble_t * */ typedef npy_double __pyx_t_5numpy_double_t; /* "numpy.pxd":764 * 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; #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 #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 /*--- Type declarations ---*/ struct __pyx_obj_6pandas_5tslib___pyx_scope_struct_3_genexpr; struct __pyx_obj_6pandas_5tslib__TSObject; struct __pyx_obj_6pandas_5tslib___pyx_scope_struct_2___seqToRE; struct __pyx_obj_6pandas_5tslib__Timestamp; struct __pyx_obj_6pandas_5tslib__NaT; struct __pyx_obj_6pandas_5tslib___pyx_scope_struct____init__; struct __pyx_obj_6pandas_5tslib___pyx_scope_struct_1_genexpr; /* "numpy.pxd":766 * 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; /* "numpy.pxd":767 * * ctypedef npy_cfloat cfloat_t * ctypedef npy_cdouble cdouble_t # <<<<<<<<<<<<<< * ctypedef npy_clongdouble clongdouble_t * */ typedef npy_cdouble __pyx_t_5numpy_cdouble_t; /* "numpy.pxd":768 * 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; /* "numpy.pxd":770 * ctypedef npy_clongdouble clongdouble_t * * ctypedef npy_cdouble complex_t # <<<<<<<<<<<<<< * * cdef inline object PyArray_MultiIterNew1(a): */ typedef npy_cdouble __pyx_t_5numpy_complex_t; struct __pyx_opt_args_6pandas_5tslib_resolution; /* "pandas/tslib.pyx":2777 * # period accessors * * ctypedef int (*accessor)(int64_t ordinal, int freq) except INT32_MIN # <<<<<<<<<<<<<< * * def get_period_field(int code, int64_t value, int freq): */ typedef int (*__pyx_t_6pandas_5tslib_accessor)(__pyx_t_5numpy_int64_t, int); /* "pandas/tslib.pyx":2845 * return ordinals * * cpdef resolution(ndarray[int64_t] stamps, tz=None): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = len(stamps) */ struct __pyx_opt_args_6pandas_5tslib_resolution { int __pyx_n; PyObject *tz; }; /* "pandas/tslib.pyx":3188 * else: * return '' * regex = '|'.join(re_escape(stuff) for stuff in to_convert) # <<<<<<<<<<<<<< * regex = '(?P<%s>%s' % (directive, regex) * return '%s)' % regex */ struct __pyx_obj_6pandas_5tslib___pyx_scope_struct_3_genexpr { PyObject_HEAD struct __pyx_obj_6pandas_5tslib___pyx_scope_struct_2___seqToRE *__pyx_outer_scope; PyObject *__pyx_v_stuff; PyObject *__pyx_t_0; Py_ssize_t __pyx_t_1; PyObject *(*__pyx_t_2)(PyObject *); }; /* "pandas/tslib.pyx":741 * * # lightweight C object to hold datetime & int64 pair * cdef class _TSObject: # <<<<<<<<<<<<<< * cdef: * pandas_datetimestruct dts # pandas_datetimestruct */ struct __pyx_obj_6pandas_5tslib__TSObject { PyObject_HEAD pandas_datetimestruct dts; __pyx_t_5numpy_int64_t value; PyObject *tzinfo; }; /* "pandas/tslib.pyx":3173 * base.__setitem__('X', self.pattern(self.locale_time.LC_time)) * * def __seqToRE(self, to_convert, directive): # <<<<<<<<<<<<<< * """Convert a list to a regex string for matching a directive. * */ struct __pyx_obj_6pandas_5tslib___pyx_scope_struct_2___seqToRE { PyObject_HEAD PyObject *__pyx_v_to_convert; }; /* "pandas/tslib.pyx":563 * # (see Timestamp class above). This will serve as a C extension type that * # shadows the python class, where we do any heavy lifting. * cdef class _Timestamp(datetime): # <<<<<<<<<<<<<< * cdef readonly: * int64_t value, nanosecond */ struct __pyx_obj_6pandas_5tslib__Timestamp { PyDateTime_DateTime __pyx_base; struct __pyx_vtabstruct_6pandas_5tslib__Timestamp *__pyx_vtab; __pyx_t_5numpy_int64_t value; __pyx_t_5numpy_int64_t nanosecond; PyObject *offset; }; /* "pandas/tslib.pyx":707 * * * cdef class _NaT(_Timestamp): # <<<<<<<<<<<<<< * * def __hash__(_NaT self): */ struct __pyx_obj_6pandas_5tslib__NaT { struct __pyx_obj_6pandas_5tslib__Timestamp __pyx_base; }; /* "pandas/tslib.pyx":3131 * """Handle conversion from format directives to regexes.""" * * def __init__(self, locale_time=None): # <<<<<<<<<<<<<< * """Create keys/values. * */ struct __pyx_obj_6pandas_5tslib___pyx_scope_struct____init__ { PyObject_HEAD PyObject *__pyx_v_self; }; /* "pandas/tslib.pyx":3164 * 'b': self.__seqToRE(self.locale_time.a_month[1:], 'b'), * 'p': self.__seqToRE(self.locale_time.am_pm, 'p'), * 'Z': self.__seqToRE((tz for tz_names in self.locale_time.timezone # <<<<<<<<<<<<<< * for tz in tz_names), * 'Z'), */ struct __pyx_obj_6pandas_5tslib___pyx_scope_struct_1_genexpr { PyObject_HEAD struct __pyx_obj_6pandas_5tslib___pyx_scope_struct____init__ *__pyx_outer_scope; PyObject *__pyx_v_tz; PyObject *__pyx_v_tz_names; PyObject *__pyx_t_0; PyObject *__pyx_t_1; Py_ssize_t __pyx_t_2; PyObject *(*__pyx_t_3)(PyObject *); Py_ssize_t __pyx_t_4; PyObject *(*__pyx_t_5)(PyObject *); }; /* "pandas/tslib.pyx":563 * # (see Timestamp class above). This will serve as a C extension type that * # shadows the python class, where we do any heavy lifting. * cdef class _Timestamp(datetime): # <<<<<<<<<<<<<< * cdef readonly: * int64_t value, nanosecond */ struct __pyx_vtabstruct_6pandas_5tslib__Timestamp { int (*_compare_outside_nanorange)(struct __pyx_obj_6pandas_5tslib__Timestamp *, PyDateTime_DateTime *, int); int (*_assert_tzawareness_compat)(struct __pyx_obj_6pandas_5tslib__Timestamp *, PyObject *); PyDateTime_DateTime *(*to_datetime)(struct __pyx_obj_6pandas_5tslib__Timestamp *, int __pyx_skip_dispatch); PyObject *(*_get_field)(struct __pyx_obj_6pandas_5tslib__Timestamp *, PyObject *, int __pyx_skip_dispatch); }; static struct __pyx_vtabstruct_6pandas_5tslib__Timestamp *__pyx_vtabptr_6pandas_5tslib__Timestamp; /* "pandas/tslib.pyx":707 * * * cdef class _NaT(_Timestamp): # <<<<<<<<<<<<<< * * def __hash__(_NaT self): */ struct __pyx_vtabstruct_6pandas_5tslib__NaT { struct __pyx_vtabstruct_6pandas_5tslib__Timestamp __pyx_base; }; static struct __pyx_vtabstruct_6pandas_5tslib__NaT *__pyx_vtabptr_6pandas_5tslib__NaT; #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); /*proto*/ #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 /* CYTHON_REFNANNY */ #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) #if CYTHON_COMPILING_IN_CPYTHON static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name) { PyTypeObject* tp = Py_TYPE(obj); if (likely(tp->tp_getattro)) return tp->tp_getattro(obj, attr_name); #if PY_MAJOR_VERSION < 3 if (likely(tp->tp_getattr)) return tp->tp_getattr(obj, PyString_AS_STRING(attr_name)); #endif return PyObject_GetAttr(obj, attr_name); } #else #define __Pyx_PyObject_GetAttrStr(o,n) PyObject_GetAttr(o,n) #endif static PyObject *__Pyx_GetBuiltinName(PyObject *name); /*proto*/ static void __Pyx_RaiseDoubleKeywordsError(const char* func_name, PyObject* kw_name); /*proto*/ static int __Pyx_ParseOptionalKeywords(PyObject *kwds, PyObject **argnames[], \ PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args, \ const char* function_name); /*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); /*proto*/ static CYTHON_INLINE int __Pyx_ArgTypeTest(PyObject *obj, PyTypeObject *type, int none_allowed, const char *name, int exact); /*proto*/ static CYTHON_INLINE int __Pyx_GetBufferAndValidate(Py_buffer* buf, PyObject* obj, __Pyx_TypeInfo* dtype, int flags, int nd, int cast, __Pyx_BufFmt_StackElem* stack); static CYTHON_INLINE void __Pyx_SafeReleaseBuffer(Py_buffer* info); static CYTHON_INLINE PyObject *__Pyx_GetModuleGlobalName(PyObject *name); /*proto*/ static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type); /*proto*/ static void __Pyx_RaiseBufferIndexError(int axis); /*proto*/ #define __Pyx_BufPtrStrided1d(type, buf, i0, s0) (type)((char*)buf + i0 * s0) static CYTHON_INLINE void __Pyx_ErrRestore(PyObject *type, PyObject *value, PyObject *tb); /*proto*/ static CYTHON_INLINE void __Pyx_ErrFetch(PyObject **type, PyObject **value, PyObject **tb); /*proto*/ static CYTHON_INLINE void __Pyx_ExceptionSave(PyObject **type, PyObject **value, PyObject **tb); /*proto*/ static void __Pyx_ExceptionReset(PyObject *type, PyObject *value, PyObject *tb); /*proto*/ static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb); /*proto*/ static CYTHON_INLINE long __Pyx_div_long(long, long); /* proto */ #define __Pyx_GetItemInt(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck) \ (__Pyx_fits_Py_ssize_t(i, type, is_signed) ? \ __Pyx_GetItemInt_Fast(o, (Py_ssize_t)i, is_list, wraparound, boundscheck) : \ (is_list ? (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL) : \ __Pyx_GetItemInt_Generic(o, to_py_func(i)))) #define __Pyx_GetItemInt_List(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck) \ (__Pyx_fits_Py_ssize_t(i, type, is_signed) ? \ __Pyx_GetItemInt_List_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) : \ (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL)) static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i, int wraparound, int boundscheck); #define __Pyx_GetItemInt_Tuple(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck) \ (__Pyx_fits_Py_ssize_t(i, type, is_signed) ? \ __Pyx_GetItemInt_Tuple_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) : \ (PyErr_SetString(PyExc_IndexError, "tuple index out of range"), (PyObject*)NULL)) static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i, int wraparound, int boundscheck); static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j); static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, int is_list, int wraparound, int boundscheck); #if CYTHON_COMPILING_IN_CPYTHON #define __Pyx_PyObject_DelAttrStr(o,n) __Pyx_PyObject_SetAttrStr(o,n,NULL) static CYTHON_INLINE int __Pyx_PyObject_SetAttrStr(PyObject* obj, PyObject* attr_name, PyObject* value) { PyTypeObject* tp = Py_TYPE(obj); if (likely(tp->tp_setattro)) return tp->tp_setattro(obj, attr_name, value); #if PY_MAJOR_VERSION < 3 if (likely(tp->tp_setattr)) return tp->tp_setattr(obj, PyString_AS_STRING(attr_name), value); #endif return PyObject_SetAttr(obj, attr_name, value); } #else #define __Pyx_PyObject_DelAttrStr(o,n) PyObject_DelAttr(o,n) #define __Pyx_PyObject_SetAttrStr(o,n,v) PyObject_SetAttr(o,n,v) #endif static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name); /*proto*/ static CYTHON_INLINE PyObject *__Pyx_GetAttr(PyObject *, PyObject *); /*proto*/ static CYTHON_INLINE PyObject *__Pyx_GetAttr3(PyObject *, PyObject *, PyObject *); /*proto*/ static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause); /*proto*/ static CYTHON_INLINE PyObject* __Pyx_PyObject_GetSlice( PyObject* obj, Py_ssize_t cstart, Py_ssize_t cstop, PyObject** py_start, PyObject** py_stop, PyObject** py_slice, int has_cstart, int has_cstop, int wraparound); static void __Pyx_WriteUnraisable(const char *name, int clineno, int lineno, const char *filename, int full_traceback); /*proto*/ #if CYTHON_COMPILING_IN_CPYTHON static CYTHON_INLINE int __Pyx_PyList_Append(PyObject* list, PyObject* x) { PyListObject* L = (PyListObject*) list; Py_ssize_t len = Py_SIZE(list); if (likely(L->allocated > len) & likely(len > (L->allocated >> 1))) { Py_INCREF(x); PyList_SET_ITEM(list, len, x); Py_SIZE(list) = len+1; return 0; } return PyList_Append(list, x); } #else #define __Pyx_PyList_Append(L,x) PyList_Append(L,x) #endif 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); /* proto */ #ifndef __PYX_FORCE_INIT_THREADS #define __PYX_FORCE_INIT_THREADS 0 #endif static void __Pyx_RaiseBufferFallbackError(void); /*proto*/ static CYTHON_INLINE int __Pyx_PySequence_Contains(PyObject* item, PyObject* seq, int eq) { int result = PySequence_Contains(seq, item); return unlikely(result < 0) ? result : (result == (eq == Py_EQ)); } static double __Pyx__PyObject_AsDouble(PyObject* obj); /* proto */ #if CYTHON_COMPILING_IN_PYPY #define __Pyx_PyObject_AsDouble(obj) \ (likely(PyFloat_CheckExact(obj)) ? PyFloat_AS_DOUBLE(obj) : \ likely(PyInt_CheckExact(obj)) ? \ PyFloat_AsDouble(obj) : __Pyx__PyObject_AsDouble(obj)) #else #define __Pyx_PyObject_AsDouble(obj) \ ((likely(PyFloat_CheckExact(obj))) ? \ PyFloat_AS_DOUBLE(obj) : __Pyx__PyObject_AsDouble(obj)) #endif #define __Pyx_SetItemInt(o, i, v, type, is_signed, to_py_func, is_list, wraparound, boundscheck) \ (__Pyx_fits_Py_ssize_t(i, type, is_signed) ? \ __Pyx_SetItemInt_Fast(o, (Py_ssize_t)i, v, is_list, wraparound, boundscheck) : \ (is_list ? (PyErr_SetString(PyExc_IndexError, "list assignment index out of range"), -1) : \ __Pyx_SetItemInt_Generic(o, to_py_func(i), v))) static CYTHON_INLINE int __Pyx_SetItemInt_Generic(PyObject *o, PyObject *j, PyObject *v); static CYTHON_INLINE int __Pyx_SetItemInt_Fast(PyObject *o, Py_ssize_t i, PyObject *v, int is_list, int wraparound, int boundscheck); #include static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals); /*proto*/ static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals); /*proto*/ #if PY_MAJOR_VERSION >= 3 #define __Pyx_PyString_Equals __Pyx_PyUnicode_Equals #else #define __Pyx_PyString_Equals __Pyx_PyBytes_Equals #endif #if CYTHON_COMPILING_IN_CPYTHON static CYTHON_INLINE PyObject* __Pyx_PyObject_LookupSpecial(PyObject* obj, PyObject* attr_name) { PyObject *res; PyTypeObject *tp = Py_TYPE(obj); #if PY_MAJOR_VERSION < 3 if (unlikely(PyInstance_Check(obj))) return __Pyx_PyObject_GetAttrStr(obj, attr_name); #endif res = _PyType_Lookup(tp, attr_name); if (likely(res)) { descrgetfunc f = Py_TYPE(res)->tp_descr_get; if (!f) { Py_INCREF(res); } else { res = f(res, obj, (PyObject *)tp); } } else { PyErr_SetObject(PyExc_AttributeError, attr_name); } return res; } #else #define __Pyx_PyObject_LookupSpecial(o,n) PyObject_GetAttr(o,n) #endif static CYTHON_INLINE void __Pyx_RaiseUnboundLocalError(const char *varname); static CYTHON_INLINE int __Pyx_IterFinish(void); /*proto*/ static PyObject* __Pyx_PyObject_CallMethodTuple(PyObject* obj, PyObject* method_name, PyObject* args) { PyObject *method, *result = NULL; if (unlikely(!args)) return NULL; method = __Pyx_PyObject_GetAttrStr(obj, method_name); if (unlikely(!method)) goto bad; result = PyObject_Call(method, args, NULL); Py_DECREF(method); bad: Py_DECREF(args); return result; } #define __Pyx_PyObject_CallMethod3(obj, name, arg1, arg2, arg3) \ __Pyx_PyObject_CallMethodTuple(obj, name, PyTuple_Pack(3, arg1, arg2, arg3)) #define __Pyx_PyObject_CallMethod2(obj, name, arg1, arg2) \ __Pyx_PyObject_CallMethodTuple(obj, name, PyTuple_Pack(2, arg1, arg2)) #define __Pyx_PyObject_CallMethod1(obj, name, arg1) \ __Pyx_PyObject_CallMethodTuple(obj, name, PyTuple_Pack(1, arg1)) #define __Pyx_PyObject_CallMethod0(obj, name) \ __Pyx_PyObject_CallMethodTuple(obj, name, (Py_INCREF(__pyx_empty_tuple), __pyx_empty_tuple)) static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected); static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index); static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void); static void __Pyx_UnpackTupleError(PyObject *, Py_ssize_t index); /*proto*/ static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected); /*proto*/ static CYTHON_INLINE int __Pyx_unpack_tuple2(PyObject* tuple, PyObject** value1, PyObject** value2, int is_tuple, int has_known_size, int decref_tuple); static CYTHON_INLINE PyObject* __Pyx_dict_iterator(PyObject* dict, int is_dict, PyObject* method_name, Py_ssize_t* p_orig_length, int* p_is_dict); static CYTHON_INLINE int __Pyx_dict_iter_next(PyObject* dict_or_iter, Py_ssize_t orig_length, Py_ssize_t* ppos, PyObject** pkey, PyObject** pvalue, PyObject** pitem, int is_dict); #if PY_MAJOR_VERSION >= 3 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; } #else #define __Pyx_PyDict_GetItem(d, key) PyObject_GetItem(d, key) #endif static CYTHON_INLINE Py_ssize_t __Pyx_div_Py_ssize_t(Py_ssize_t, Py_ssize_t); /* proto */ #define __Pyx_BufPtrStrided2d(type, buf, i0, s0, i1, s1) (type)((char*)buf + i0 * s0 + i1 * s1) 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); /* proto */ #define UNARY_NEG_WOULD_OVERFLOW(x) (((x) < 0) & ((unsigned long)(x) == 0-(unsigned long)(x))) static CYTHON_INLINE long __Pyx_mod_long(long, long); /* proto */ static CYTHON_INLINE int __Pyx_PyObject_Append(PyObject* L, PyObject* x); /*proto*/ #if CYTHON_COMPILING_IN_CPYTHON static CYTHON_INLINE int __Pyx_ListComp_Append(PyObject* list, PyObject* x) { PyListObject* L = (PyListObject*) list; Py_ssize_t len = Py_SIZE(list); if (likely(L->allocated > len)) { Py_INCREF(x); PyList_SET_ITEM(list, len, x); Py_SIZE(list) = len+1; return 0; } return PyList_Append(list, x); } #else #define __Pyx_ListComp_Append(L,x) PyList_Append(L,x) #endif static CYTHON_INLINE int __Pyx_PyList_Extend(PyObject* L, PyObject* v) { #if CYTHON_COMPILING_IN_CPYTHON PyObject* none = _PyList_Extend((PyListObject*)L, v); if (unlikely(!none)) return -1; Py_DECREF(none); return 0; #else return PyList_SetSlice(L, PY_SSIZE_T_MAX, PY_SSIZE_T_MAX, v); #endif } #if PY_VERSION_HEX < 0x02050000 #ifndef PyAnySet_CheckExact #define PyAnySet_CheckExact(ob) \ ((ob)->ob_type == &PySet_Type || \ (ob)->ob_type == &PyFrozenSet_Type) #define PySet_New(iterable) \ PyObject_CallFunctionObjArgs((PyObject *)&PySet_Type, (iterable), NULL) #define Pyx_PyFrozenSet_New(iterable) \ PyObject_CallFunctionObjArgs((PyObject *)&PyFrozenSet_Type, (iterable), NULL) #define PySet_Size(anyset) \ PyObject_Size((anyset)) #define PySet_Contains(anyset, key) \ PySequence_Contains((anyset), (key)) #define PySet_Pop(set) \ PyObject_CallMethod((set), (char*)"pop", NULL) static CYTHON_INLINE int PySet_Clear(PyObject *set) { PyObject *ret = PyObject_CallMethod(set, (char*)"clear", NULL); if (!ret) return -1; Py_DECREF(ret); return 0; } static CYTHON_INLINE int PySet_Discard(PyObject *set, PyObject *key) { PyObject *ret = PyObject_CallMethod(set, (char*)"discard", (char*)"(O)", key); if (!ret) return -1; Py_DECREF(ret); return 0; } static CYTHON_INLINE int PySet_Add(PyObject *set, PyObject *key) { PyObject *ret = PyObject_CallMethod(set, (char*)"add", (char*)"(O)", key); if (!ret) return -1; Py_DECREF(ret); return 0; } #endif /* PyAnySet_CheckExact (<= Py2.4) */ #endif /* < Py2.5 */ static CYTHON_INLINE void __Pyx_RaiseClosureNameError(const char *varname); #if PY_MAJOR_VERSION < 3 #define __Pyx_PyString_Join __Pyx_PyBytes_Join #define __Pyx_PyBaseString_Join(s, v) (PyUnicode_CheckExact(s) ? PyUnicode_Join(s, v) : __Pyx_PyBytes_Join(s, v)) #else #define __Pyx_PyString_Join PyUnicode_Join #define __Pyx_PyBaseString_Join PyUnicode_Join #endif #if CYTHON_COMPILING_IN_CPYTHON #if PY_MAJOR_VERSION < 3 #define __Pyx_PyBytes_Join _PyString_Join #else #define __Pyx_PyBytes_Join _PyBytes_Join #endif #else static CYTHON_INLINE PyObject* __Pyx_PyBytes_Join(PyObject* sep, PyObject* values); /*proto*/ #endif static void __Pyx_call_next_tp_dealloc(PyObject* obj, destructor current_tp_dealloc); static int __Pyx_call_next_tp_traverse(PyObject* obj, visitproc v, void *a, traverseproc current_tp_traverse); static void __Pyx_call_next_tp_clear(PyObject* obj, inquiry current_tp_dealloc); static int __Pyx_SetVtable(PyObject *dict, void *vtable); /*proto*/ static PyObject *__Pyx_CalculateMetaclass(PyTypeObject *metaclass, PyObject *bases); static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type); #define __Pyx_CyFunction_USED 1 #include #define __Pyx_CYFUNCTION_STATICMETHOD 0x01 #define __Pyx_CYFUNCTION_CLASSMETHOD 0x02 #define __Pyx_CYFUNCTION_CCLASS 0x04 #define __Pyx_CyFunction_GetClosure(f) \ (((__pyx_CyFunctionObject *) (f))->func_closure) #define __Pyx_CyFunction_GetClassObj(f) \ (((__pyx_CyFunctionObject *) (f))->func_classobj) #define __Pyx_CyFunction_Defaults(type, f) \ ((type *)(((__pyx_CyFunctionObject *) (f))->defaults)) #define __Pyx_CyFunction_SetDefaultsGetter(f, g) \ ((__pyx_CyFunctionObject *) (f))->defaults_getter = (g) typedef struct { PyCFunctionObject func; int flags; PyObject *func_dict; PyObject *func_weakreflist; PyObject *func_name; PyObject *func_qualname; PyObject *func_doc; PyObject *func_globals; PyObject *func_code; PyObject *func_closure; PyObject *func_classobj; /* No-args super() class cell */ void *defaults; int defaults_pyobjects; PyObject *defaults_tuple; /* Const defaults tuple */ PyObject *defaults_kwdict; /* Const kwonly defaults dict */ PyObject *(*defaults_getter)(PyObject *); PyObject *func_annotations; /* function annotations dict */ } __pyx_CyFunctionObject; static PyTypeObject *__pyx_CyFunctionType = 0; #define __Pyx_CyFunction_NewEx(ml, flags, qualname, self, module, globals, code) \ __Pyx_CyFunction_New(__pyx_CyFunctionType, ml, flags, qualname, self, module, globals, code) static PyObject *__Pyx_CyFunction_New(PyTypeObject *, PyMethodDef *ml, int flags, PyObject* qualname, PyObject *self, PyObject *module, PyObject *globals, PyObject* code); static CYTHON_INLINE void *__Pyx_CyFunction_InitDefaults(PyObject *m, size_t size, int pyobjects); static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *m, PyObject *tuple); static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *m, PyObject *dict); static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *m, PyObject *dict); static int __Pyx_CyFunction_init(void); static PyObject *__Pyx_Py3MetaclassPrepare(PyObject *metaclass, PyObject *bases, PyObject *name, PyObject *qualname, PyObject *mkw, PyObject *modname, PyObject *doc); /*proto*/ static PyObject *__Pyx_Py3ClassCreate(PyObject *metaclass, PyObject *name, PyObject *bases, PyObject *dict, PyObject *mkw, int calculate_metaclass, int allow_py2_metaclass); /*proto*/ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_npy_int64(npy_int64 value); 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 static Py_ssize_t __Pyx_zeros[] = {0, 0, 0, 0, 0, 0, 0, 0}; static Py_ssize_t __Pyx_minusones[] = {-1, -1, -1, -1, -1, -1, -1, -1}; static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level); /*proto*/ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value); static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *); static CYTHON_INLINE npy_int64 __Pyx_PyInt_As_npy_int64(PyObject *); static CYTHON_INLINE PyObject* __Pyx_PyInt_From_npy_int32(npy_int32 value); static int __Pyx_Print(PyObject*, PyObject *, int); /*proto*/ #if CYTHON_COMPILING_IN_PYPY || PY_MAJOR_VERSION >= 3 static PyObject* __pyx_print = 0; static PyObject* __pyx_print_kwargs = 0; #endif static int __Pyx_PrintOne(PyObject* stream, PyObject *o); /*proto*/ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value); static CYTHON_INLINE npy_int32 __Pyx_PyInt_As_npy_int32(PyObject *); static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *); #include "descrobject.h" static PyObject* __Pyx_Method_ClassMethod(PyObject *method); /*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(_WIN32) || defined(__clang__)) && defined(__cplusplus) && CYTHON_CCOMPLEX #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 static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float, float); #if CYTHON_CCOMPLEX #define __Pyx_c_eqf(a, b) ((a)==(b)) #define __Pyx_c_sumf(a, b) ((a)+(b)) #define __Pyx_c_difff(a, b) ((a)-(b)) #define __Pyx_c_prodf(a, b) ((a)*(b)) #define __Pyx_c_quotf(a, b) ((a)/(b)) #define __Pyx_c_negf(a) (-(a)) #ifdef __cplusplus #define __Pyx_c_is_zerof(z) ((z)==(float)0) #define __Pyx_c_conjf(z) (::std::conj(z)) #if 1 #define __Pyx_c_absf(z) (::std::abs(z)) #define __Pyx_c_powf(a, b) (::std::pow(a, b)) #endif #else #define __Pyx_c_is_zerof(z) ((z)==0) #define __Pyx_c_conjf(z) (conjf(z)) #if 1 #define __Pyx_c_absf(z) (cabsf(z)) #define __Pyx_c_powf(a, b) (cpowf(a, b)) #endif #endif #else static CYTHON_INLINE int __Pyx_c_eqf(__pyx_t_float_complex, __pyx_t_float_complex); static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_sumf(__pyx_t_float_complex, __pyx_t_float_complex); static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_difff(__pyx_t_float_complex, __pyx_t_float_complex); static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_prodf(__pyx_t_float_complex, __pyx_t_float_complex); static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_quotf(__pyx_t_float_complex, __pyx_t_float_complex); static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_negf(__pyx_t_float_complex); static CYTHON_INLINE int __Pyx_c_is_zerof(__pyx_t_float_complex); static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_conjf(__pyx_t_float_complex); #if 1 static CYTHON_INLINE float __Pyx_c_absf(__pyx_t_float_complex); static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_powf(__pyx_t_float_complex, __pyx_t_float_complex); #endif #endif static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double, double); #if CYTHON_CCOMPLEX #define __Pyx_c_eq(a, b) ((a)==(b)) #define __Pyx_c_sum(a, b) ((a)+(b)) #define __Pyx_c_diff(a, b) ((a)-(b)) #define __Pyx_c_prod(a, b) ((a)*(b)) #define __Pyx_c_quot(a, b) ((a)/(b)) #define __Pyx_c_neg(a) (-(a)) #ifdef __cplusplus #define __Pyx_c_is_zero(z) ((z)==(double)0) #define __Pyx_c_conj(z) (::std::conj(z)) #if 1 #define __Pyx_c_abs(z) (::std::abs(z)) #define __Pyx_c_pow(a, b) (::std::pow(a, b)) #endif #else #define __Pyx_c_is_zero(z) ((z)==0) #define __Pyx_c_conj(z) (conj(z)) #if 1 #define __Pyx_c_abs(z) (cabs(z)) #define __Pyx_c_pow(a, b) (cpow(a, b)) #endif #endif #else static CYTHON_INLINE int __Pyx_c_eq(__pyx_t_double_complex, __pyx_t_double_complex); static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_sum(__pyx_t_double_complex, __pyx_t_double_complex); static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_diff(__pyx_t_double_complex, __pyx_t_double_complex); static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_prod(__pyx_t_double_complex, __pyx_t_double_complex); static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_quot(__pyx_t_double_complex, __pyx_t_double_complex); static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_neg(__pyx_t_double_complex); static CYTHON_INLINE int __Pyx_c_is_zero(__pyx_t_double_complex); static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_conj(__pyx_t_double_complex); #if 1 static CYTHON_INLINE double __Pyx_c_abs(__pyx_t_double_complex); static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_pow(__pyx_t_double_complex, __pyx_t_double_complex); #endif #endif static CYTHON_INLINE PyObject* __Pyx_PyInt_From_ptrdiff_t(ptrdiff_t value); static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb); /*proto*/ #define __Pyx_Generator_USED #include #include typedef PyObject *(*__pyx_generator_body_t)(PyObject *, PyObject *); typedef struct { PyObject_HEAD __pyx_generator_body_t body; PyObject *closure; PyObject *exc_type; PyObject *exc_value; PyObject *exc_traceback; PyObject *gi_weakreflist; PyObject *classobj; PyObject *yieldfrom; int resume_label; char is_running; } __pyx_GeneratorObject; static __pyx_GeneratorObject *__Pyx_Generator_New(__pyx_generator_body_t body, PyObject *closure); static int __pyx_Generator_init(void); static int __Pyx_Generator_clear(PyObject* self); #if 1 || PY_VERSION_HEX < 0x030300B0 static int __Pyx_PyGen_FetchStopIterationValue(PyObject **pvalue); #else #define __Pyx_PyGen_FetchStopIterationValue(pvalue) PyGen_FetchStopIterationValue(pvalue) #endif static int __Pyx_check_binary_version(void); static int __Pyx_ExportFunction(const char *name, void (*f)(void), const char *sig); /*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 static PyObject *__Pyx_ImportModule(const char *name); /*proto*/ static PyTypeObject *__Pyx_ImportType(const char *module_name, const char *class_name, size_t size, int strict); /*proto*/ typedef struct { int code_line; PyCodeObject* code_object; } __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); static void __Pyx_AddTraceback(const char *funcname, int c_line, int py_line, const char *filename); /*proto*/ static int __Pyx_InitStrings(__Pyx_StringTabEntry *t); /*proto*/ /* Module declarations from 'cpython.buffer' */ /* Module declarations from 'cpython.ref' */ /* Module declarations from 'libc.string' */ /* Module declarations from 'libc.stdio' */ /* Module declarations from 'cpython.object' */ /* Module declarations from 'libc.stdlib' */ /* 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*/ /* Module declarations from 'cpython.version' */ /* Module declarations from 'cpython.exc' */ /* Module declarations from 'cpython.module' */ /* Module declarations from 'cpython.mem' */ /* Module declarations from 'cpython.tuple' */ /* Module declarations from 'cpython.list' */ /* Module declarations from 'cpython.sequence' */ /* Module declarations from 'cpython.mapping' */ /* Module declarations from 'cpython.iterator' */ /* Module declarations from '__builtin__' */ /* Module declarations from 'cpython.type' */ static PyTypeObject *__pyx_ptype_7cpython_4type_type = 0; /* Module declarations from 'cpython.number' */ /* Module declarations from 'cpython.int' */ /* Module declarations from '__builtin__' */ /* Module declarations from 'cpython.bool' */ static PyTypeObject *__pyx_ptype_7cpython_4bool_bool = 0; /* Module declarations from 'cpython.long' */ /* Module declarations from 'cpython.float' */ /* Module declarations from '__builtin__' */ /* Module declarations from 'cpython.complex' */ static PyTypeObject *__pyx_ptype_7cpython_7complex_complex = 0; /* Module declarations from 'cpython.string' */ /* Module declarations from 'cpython.unicode' */ /* Module declarations from 'cpython.dict' */ /* Module declarations from 'cpython.instance' */ /* Module declarations from 'cpython.function' */ /* Module declarations from 'cpython.method' */ /* Module declarations from 'cpython.weakref' */ /* Module declarations from 'cpython.getargs' */ /* Module declarations from 'cpython.pythread' */ /* Module declarations from 'cpython.pystate' */ /* Module declarations from 'cpython.cobject' */ /* Module declarations from 'cpython.oldbuffer' */ /* Module declarations from 'cpython.set' */ /* Module declarations from 'cpython.bytes' */ /* Module declarations from 'cpython.pycapsule' */ /* Module declarations from 'cpython' */ /* Module declarations from 'datetime' */ /* Module declarations from 'datetime' */ static PyTypeObject *__pyx_ptype_8datetime_date = 0; static PyTypeObject *__pyx_ptype_8datetime_datetime = 0; static PyTypeObject *__pyx_ptype_8datetime_timedelta = 0; static CYTHON_INLINE PyObject *__pyx_f_8datetime__string_to_dts(PyObject *, pandas_datetimestruct *); /*proto*/ static CYTHON_INLINE int __pyx_f_8datetime__cstring_to_dts(char *, int, pandas_datetimestruct *); /*proto*/ static CYTHON_INLINE PyObject *__pyx_f_8datetime__dts_to_pydatetime(pandas_datetimestruct *); /*proto*/ static CYTHON_INLINE __pyx_t_5numpy_int64_t __pyx_f_8datetime__pydatetime_to_dts(PyObject *, pandas_datetimestruct *); /*proto*/ static CYTHON_INLINE __pyx_t_5numpy_int64_t __pyx_f_8datetime__date_to_datetime64(PyObject *, pandas_datetimestruct *); /*proto*/ /* Module declarations from 'util' */ static CYTHON_INLINE PyObject *__pyx_f_4util_is_array(PyObject *); /*proto*/ /* Module declarations from 'khash' */ /* Module declarations from 'cython' */ /* Module declarations from 'pandas.tslib' */ static PyTypeObject *__pyx_ptype_6pandas_5tslib___pyx_scope_struct_3_genexpr = 0; static PyTypeObject *__pyx_ptype_6pandas_5tslib__TSObject = 0; static PyTypeObject *__pyx_ptype_6pandas_5tslib___pyx_scope_struct_2___seqToRE = 0; static PyTypeObject *__pyx_ptype_6pandas_5tslib__Timestamp = 0; static PyTypeObject *__pyx_ptype_6pandas_5tslib__NaT = 0; static PyTypeObject *__pyx_ptype_6pandas_5tslib___pyx_scope_struct____init__ = 0; static PyTypeObject *__pyx_ptype_6pandas_5tslib___pyx_scope_struct_1_genexpr = 0; static int __pyx_v_6pandas_5tslib_PY2; static __pyx_t_5numpy_int64_t __pyx_v_6pandas_5tslib_NPY_NAT; static __pyx_t_5numpy_int64_t __pyx_v_6pandas_5tslib__NS_LOWER_BOUND; static __pyx_t_5numpy_int64_t __pyx_v_6pandas_5tslib__NS_UPPER_BOUND; static pandas_datetimestruct __pyx_v_6pandas_5tslib__NS_MIN_DTS; static pandas_datetimestruct __pyx_v_6pandas_5tslib__NS_MAX_DTS; static int __pyx_v_6pandas_5tslib__reverse_ops[6]; static PyObject *__pyx_v_6pandas_5tslib__NDIM_STRING = 0; static PyTypeObject *__pyx_v_6pandas_5tslib_ts_type; static int __pyx_v_6pandas_5tslib__nat_scalar_rules[6]; static __pyx_t_5numpy_int64_t __pyx_v_6pandas_5tslib_DAY_NS; static char __pyx_v_6pandas_5tslib_START; static char __pyx_v_6pandas_5tslib_END; static PyObject *__pyx_v_6pandas_5tslib_extra_fmts = 0; static PyObject *__pyx_v_6pandas_5tslib_str_extra_fmts = 0; static PyObject *__pyx_f_6pandas_5tslib_convert_to_tsobject(PyObject *, PyObject *, PyObject *); /*proto*/ static PyObject *__pyx_f_6pandas_5tslib_convert_to_timedelta64(PyObject *, PyObject *, PyObject *); /*proto*/ static CYTHON_INLINE int __pyx_f_6pandas_5tslib__checknull_with_nat(PyObject *); /*proto*/ static CYTHON_INLINE int __pyx_f_6pandas_5tslib__cmp_nat_dt(struct __pyx_obj_6pandas_5tslib__NaT *, struct __pyx_obj_6pandas_5tslib__Timestamp *, int); /*proto*/ static PyObject *__pyx_f_6pandas_5tslib_get_value_box(PyArrayObject *, PyObject *, int __pyx_skip_dispatch); /*proto*/ static CYTHON_INLINE int __pyx_f_6pandas_5tslib__cmp_scalar(__pyx_t_5numpy_int64_t, __pyx_t_5numpy_int64_t, int); /*proto*/ static CYTHON_INLINE int __pyx_f_6pandas_5tslib_is_timestamp(PyObject *); /*proto*/ static PyObject *__pyx_f_6pandas_5tslib__get_utcoffset(PyObject *, PyObject *, int __pyx_skip_dispatch); /*proto*/ static CYTHON_INLINE void __pyx_f_6pandas_5tslib__localize_tso(struct __pyx_obj_6pandas_5tslib__TSObject *, PyObject *); /*proto*/ static CYTHON_INLINE int __pyx_f_6pandas_5tslib__is_utc(PyObject *); /*proto*/ static CYTHON_INLINE PyObject *__pyx_f_6pandas_5tslib__get_zone(PyObject *); /*proto*/ static CYTHON_INLINE PyObject *__pyx_f_6pandas_5tslib__check_dts_bounds(pandas_datetimestruct *); /*proto*/ static CYTHON_INLINE PyObject *__pyx_f_6pandas_5tslib__get_datetime64_nanos(PyObject *); /*proto*/ static CYTHON_INLINE __pyx_t_5numpy_int64_t __pyx_f_6pandas_5tslib_cast_from_unit(PyObject *, PyObject *, int __pyx_skip_dispatch); /*proto*/ static double __pyx_f_6pandas_5tslib_total_seconds(PyObject *); /*proto*/ static PyArrayObject *__pyx_f_6pandas_5tslib__unbox_utcoffsets(PyObject *, int __pyx_skip_dispatch); /*proto*/ static PyObject *__pyx_f_6pandas_5tslib__ensure_int64(PyObject *); /*proto*/ static CYTHON_INLINE PyObject *__pyx_f_6pandas_5tslib_bisect_right_i8(__pyx_t_5numpy_int64_t *, __pyx_t_5numpy_int64_t, Py_ssize_t); /*proto*/ static PyObject *__pyx_f_6pandas_5tslib__normalize_local(PyArrayObject *, PyObject *); /*proto*/ static CYTHON_INLINE __pyx_t_5numpy_int64_t __pyx_f_6pandas_5tslib__normalized_stamp(pandas_datetimestruct *); /*proto*/ static CYTHON_INLINE __pyx_t_5numpy_int64_t __pyx_f_6pandas_5tslib_ts_dayofweek(struct __pyx_obj_6pandas_5tslib__TSObject *); /*proto*/ static PyObject *__pyx_f_6pandas_5tslib_normalize_date(PyObject *, int __pyx_skip_dispatch); /*proto*/ static PyArrayObject *__pyx_f_6pandas_5tslib_localize_dt64arr_to_period(PyArrayObject *, int, PyObject *); /*proto*/ static __pyx_t_5numpy_int64_t __pyx_f_6pandas_5tslib_period_asfreq(__pyx_t_5numpy_int64_t, int, int, int, int __pyx_skip_dispatch); /*proto*/ static __pyx_t_5numpy_int64_t __pyx_f_6pandas_5tslib_period_ordinal_to_dt64(__pyx_t_5numpy_int64_t, int, int __pyx_skip_dispatch); /*proto*/ static PyObject *__pyx_f_6pandas_5tslib__period_strftime(__pyx_t_5numpy_int64_t, int, PyObject *); /*proto*/ static __pyx_t_6pandas_5tslib_accessor __pyx_f_6pandas_5tslib__get_accessor_func(int); /*proto*/ static PyObject *__pyx_f_6pandas_5tslib_resolution(PyArrayObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_6pandas_5tslib_resolution *__pyx_optional_args); /*proto*/ static CYTHON_INLINE int __pyx_f_6pandas_5tslib__reso_stamp(pandas_datetimestruct *); /*proto*/ static PyObject *__pyx_f_6pandas_5tslib__reso_local(PyArrayObject *, PyObject *); /*proto*/ 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_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 }; #define __Pyx_MODULE_NAME "pandas.tslib" int __pyx_module_is_main_pandas__tslib = 0; /* Implementation of 'pandas.tslib' */ static PyObject *__pyx_builtin_NameError; static PyObject *__pyx_builtin_property; static PyObject *__pyx_builtin_ValueError; static PyObject *__pyx_builtin_object; static PyObject *__pyx_builtin_range; static PyObject *__pyx_builtin_AttributeError; static PyObject *__pyx_builtin_Exception; static PyObject *__pyx_builtin_super; static PyObject *__pyx_builtin_IndexError; static PyObject *__pyx_builtin_TypeError; static PyObject *__pyx_builtin_round; static PyObject *__pyx_builtin_KeyError; static PyObject *__pyx_builtin_enumerate; static PyObject *__pyx_builtin_sorted; static PyObject *__pyx_builtin_RuntimeError; static PyObject *__pyx_lambda_funcdef_6pandas_5tslib_lambda1(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_5tslib_ints_to_pydatetime(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_arr, PyObject *__pyx_v_tz); /* proto */ static PyObject *__pyx_pf_6pandas_5tslib_2_is_tzlocal(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_tz); /* proto */ static PyObject *__pyx_pf_6pandas_5tslib_4_is_fixed_offset(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_tz); /* proto */ static PyObject *__pyx_pf_6pandas_5tslib_9Timestamp_fromordinal(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_ordinal, PyObject *__pyx_v_offset, PyObject *__pyx_v_tz); /* proto */ static PyObject *__pyx_pf_6pandas_5tslib_9Timestamp_2now(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_tz); /* proto */ static PyObject *__pyx_pf_6pandas_5tslib_9Timestamp_4today(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls); /* proto */ static PyObject *__pyx_pf_6pandas_5tslib_9Timestamp_6utcnow(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls); /* proto */ static PyObject *__pyx_pf_6pandas_5tslib_9Timestamp_8__new__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_ts_input, PyObject *__pyx_v_offset, PyObject *__pyx_v_tz, PyObject *__pyx_v_unit); /* proto */ static PyObject *__pyx_pf_6pandas_5tslib_9Timestamp_10__repr__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_5tslib_9Timestamp_12_date_repr(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_5tslib_9Timestamp_14_time_repr(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_5tslib_9Timestamp_16_repr_base(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_5tslib_9Timestamp_18tz(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_5tslib_9Timestamp_20freq(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_5tslib_9Timestamp_22__setstate__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_state); /* proto */ static PyObject *__pyx_pf_6pandas_5tslib_9Timestamp_24__reduce__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_5tslib_9Timestamp_26to_period(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_freq); /* proto */ static PyObject *__pyx_pf_6pandas_5tslib_9Timestamp_28dayofweek(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_5tslib_9Timestamp_30dayofyear(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_5tslib_9Timestamp_32week(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_5tslib_9Timestamp_34quarter(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_5tslib_9Timestamp_36freqstr(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_5tslib_9Timestamp_38asm8(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_5tslib_9Timestamp_40tz_localize(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_tz); /* proto */ static PyObject *__pyx_pf_6pandas_5tslib_9Timestamp_42tz_convert(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_tz); /* proto */ static PyObject *__pyx_pf_6pandas_5tslib_9Timestamp_44replace(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_kwds); /* proto */ static PyObject *__pyx_pf_6pandas_5tslib_9Timestamp_46to_pydatetime(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_warn); /* proto */ static PyObject *__pyx_pf_6pandas_5tslib_9Timestamp_48isoformat(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_sep); /* proto */ static PyObject *__pyx_pf_6pandas_5tslib_9Timestamp_50_has_time_component(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_5tslib_7NaTType___new__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls); /* proto */ static PyObject *__pyx_pf_6pandas_5tslib_7NaTType_2__repr__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_5tslib_7NaTType_4__str__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_5tslib_7NaTType_6__hash__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_5tslib_7NaTType_8weekday(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_5tslib_7NaTType_10toordinal(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_5tslib_6is_timestamp_array(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values); /* proto */ static PyObject *__pyx_pf_6pandas_5tslib_8get_value_box(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_arr, PyObject *__pyx_v_loc); /* proto */ static PyObject *__pyx_pf_6pandas_5tslib_10unique_deltas(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_arr); /* proto */ static PyObject *__pyx_pf_6pandas_5tslib_12apply_offset(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, CYTHON_UNUSED PyObject *__pyx_v_offset); /* proto */ static Py_hash_t __pyx_pf_6pandas_5tslib_10_Timestamp___hash__(struct __pyx_obj_6pandas_5tslib__Timestamp *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_5tslib_10_Timestamp_2__richcmp__(struct __pyx_obj_6pandas_5tslib__Timestamp *__pyx_v_self, PyObject *__pyx_v_other, int __pyx_v_op); /* proto */ static PyObject *__pyx_pf_6pandas_5tslib_10_Timestamp_4to_datetime(struct __pyx_obj_6pandas_5tslib__Timestamp *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_5tslib_10_Timestamp_6__add__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /* proto */ static PyObject *__pyx_pf_6pandas_5tslib_10_Timestamp_8__sub__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /* proto */ static PyObject *__pyx_pf_6pandas_5tslib_10_Timestamp_10_get_field(struct __pyx_obj_6pandas_5tslib__Timestamp *__pyx_v_self, PyObject *__pyx_v_field); /* proto */ static PyObject *__pyx_pf_6pandas_5tslib_10_Timestamp_5value___get__(struct __pyx_obj_6pandas_5tslib__Timestamp *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_5tslib_10_Timestamp_10nanosecond___get__(struct __pyx_obj_6pandas_5tslib__Timestamp *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_5tslib_10_Timestamp_6offset___get__(struct __pyx_obj_6pandas_5tslib__Timestamp *__pyx_v_self); /* proto */ static Py_hash_t __pyx_pf_6pandas_5tslib_4_NaT___hash__(struct __pyx_obj_6pandas_5tslib__NaT *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_5tslib_4_NaT_2__richcmp__(struct __pyx_obj_6pandas_5tslib__NaT *__pyx_v_self, PyObject *__pyx_v_other, int __pyx_v_op); /* proto */ static PyObject *__pyx_pf_6pandas_5tslib_14_delta_to_nanoseconds(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_delta); /* proto */ static PyObject *__pyx_pf_6pandas_5tslib_9_TSObject_5value___get__(struct __pyx_obj_6pandas_5tslib__TSObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_5tslib_16_get_utcoffset(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_tzinfo, PyObject *__pyx_v_obj); /* proto */ static PyObject *__pyx_pf_6pandas_5tslib_18get_timezone(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_tz); /* proto */ static PyObject *__pyx_pf_6pandas_5tslib_20datetime_to_datetime64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values); /* proto */ static PyObject *__pyx_pf_6pandas_5tslib_22_does_string_look_like_datetime(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_date_string); /* proto */ static PyObject *__pyx_pf_6pandas_5tslib_24parse_datetime_string(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_date_string, PyObject *__pyx_v_kwargs); /* proto */ static PyObject *__pyx_pf_6pandas_5tslib_26array_to_datetime(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyObject *__pyx_v_raise_, PyObject *__pyx_v_dayfirst, CYTHON_UNUSED PyObject *__pyx_v_format, PyObject *__pyx_v_utc, PyObject *__pyx_v_coerce, PyObject *__pyx_v_unit); /* proto */ static PyObject *__pyx_pf_6pandas_5tslib_28array_to_timedelta64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyObject *__pyx_v_coerce); /* proto */ static PyObject *__pyx_pf_6pandas_5tslib_30convert_to_timedelta(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_ts, PyObject *__pyx_v_unit, PyObject *__pyx_v_coerce); /* proto */ static PyObject *__pyx_pf_6pandas_5tslib_32repr_timedelta64(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_value, PyObject *__pyx_v_format); /* proto */ static PyObject *__pyx_pf_6pandas_5tslib_34array_strptime(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyObject *__pyx_v_fmt, PyObject *__pyx_v_coerce); /* proto */ static PyObject *__pyx_pf_6pandas_5tslib_36cast_from_unit(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_ts, PyObject *__pyx_v_unit); /* proto */ static PyObject *__pyx_pf_6pandas_5tslib_38cast_to_nanoseconds(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_arr); /* proto */ static PyObject *__pyx_pf_6pandas_5tslib_40pydt_to_i8(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_pydt); /* proto */ static PyObject *__pyx_pf_6pandas_5tslib_42i8_to_pydt(CYTHON_UNUSED PyObject *__pyx_self, __pyx_t_5numpy_int64_t __pyx_v_i8, CYTHON_UNUSED PyObject *__pyx_v_tzinfo); /* proto */ static PyObject *__pyx_pf_6pandas_5tslib_44tz_convert(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_vals, PyObject *__pyx_v_tz1, PyObject *__pyx_v_tz2); /* proto */ static PyObject *__pyx_pf_6pandas_5tslib_46tz_convert_single(CYTHON_UNUSED PyObject *__pyx_self, __pyx_t_5numpy_int64_t __pyx_v_val, PyObject *__pyx_v_tz1, PyObject *__pyx_v_tz2); /* proto */ static PyObject *__pyx_pf_6pandas_5tslib_48_get_transitions(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_tz); /* proto */ static PyObject *__pyx_pf_6pandas_5tslib_50_get_deltas(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_tz); /* proto */ static PyObject *__pyx_pf_6pandas_5tslib_52tot_seconds(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_td); /* proto */ static PyObject *__pyx_pf_6pandas_5tslib_54_unbox_utcoffsets(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_transinfo); /* proto */ static PyObject *__pyx_pf_6pandas_5tslib_56tz_localize_to_utc(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_vals, PyObject *__pyx_v_tz, int __pyx_v_infer_dst); /* proto */ static PyObject *__pyx_pf_6pandas_5tslib_58build_field_sarray(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_dtindex); /* proto */ static PyObject *__pyx_pf_6pandas_5tslib_60get_time_micros(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_dtindex); /* proto */ static PyObject *__pyx_pf_6pandas_5tslib_62get_date_field(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_dtindex, PyObject *__pyx_v_field); /* proto */ static PyObject *__pyx_pf_6pandas_5tslib_64date_normalize(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_stamps, PyObject *__pyx_v_tz); /* proto */ static PyObject *__pyx_pf_6pandas_5tslib_66dates_normalized(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_stamps, PyObject *__pyx_v_tz); /* proto */ static PyObject *__pyx_pf_6pandas_5tslib_68isleapyear(CYTHON_UNUSED PyObject *__pyx_self, __pyx_t_5numpy_int64_t __pyx_v_year); /* proto */ static PyObject *__pyx_pf_6pandas_5tslib_70monthrange(CYTHON_UNUSED PyObject *__pyx_self, __pyx_t_5numpy_int64_t __pyx_v_year, __pyx_t_5numpy_int64_t __pyx_v_month); /* proto */ static PyObject *__pyx_pf_6pandas_5tslib_72normalize_date(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_dt); /* proto */ static PyObject *__pyx_pf_6pandas_5tslib_74dt64arr_to_periodarr(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_dtarr, int __pyx_v_freq, PyObject *__pyx_v_tz); /* proto */ static PyObject *__pyx_pf_6pandas_5tslib_76periodarr_to_dt64arr(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_periodarr, int __pyx_v_freq); /* proto */ static PyObject *__pyx_pf_6pandas_5tslib_78period_asfreq(CYTHON_UNUSED PyObject *__pyx_self, __pyx_t_5numpy_int64_t __pyx_v_period_ordinal, int __pyx_v_freq1, int __pyx_v_freq2, int __pyx_v_end); /* proto */ static PyObject *__pyx_pf_6pandas_5tslib_80period_asfreq_arr(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_arr, int __pyx_v_freq1, int __pyx_v_freq2, int __pyx_v_end); /* proto */ static PyObject *__pyx_pf_6pandas_5tslib_82period_ordinal(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_y, int __pyx_v_m, int __pyx_v_d, int __pyx_v_h, int __pyx_v_min, int __pyx_v_s, int __pyx_v_us, int __pyx_v_ps, int __pyx_v_freq); /* proto */ static PyObject *__pyx_pf_6pandas_5tslib_84period_ordinal_to_dt64(CYTHON_UNUSED PyObject *__pyx_self, __pyx_t_5numpy_int64_t __pyx_v_ordinal, int __pyx_v_freq); /* proto */ static PyObject *__pyx_pf_6pandas_5tslib_86period_format(CYTHON_UNUSED PyObject *__pyx_self, __pyx_t_5numpy_int64_t __pyx_v_value, int __pyx_v_freq, PyObject *__pyx_v_fmt); /* proto */ static PyObject *__pyx_pf_6pandas_5tslib_88get_period_field(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_code, __pyx_t_5numpy_int64_t __pyx_v_value, int __pyx_v_freq); /* proto */ static PyObject *__pyx_pf_6pandas_5tslib_90get_period_field_arr(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_code, PyArrayObject *__pyx_v_arr, int __pyx_v_freq); /* proto */ static PyObject *__pyx_pf_6pandas_5tslib_92extract_ordinals(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyObject *__pyx_v_freq); /* proto */ static PyObject *__pyx_pf_6pandas_5tslib_94resolution(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_stamps, PyObject *__pyx_v_tz); /* proto */ static PyObject *__pyx_pf_6pandas_5tslib_96_getlang(CYTHON_UNUSED PyObject *__pyx_self); /* proto */ static PyObject *__pyx_pf_6pandas_5tslib_10LocaleTime___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_5tslib_10LocaleTime_2__pad(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, PyObject *__pyx_v_seq, PyObject *__pyx_v_front); /* proto */ static PyObject *__pyx_pf_6pandas_5tslib_10LocaleTime_4__calc_weekday(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_5tslib_10LocaleTime_6__calc_month(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_5tslib_10LocaleTime_8__calc_am_pm(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_5tslib_10LocaleTime_10__calc_date_time(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_5tslib_10LocaleTime_12__calc_timezone(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_5tslib_6TimeRE_8__init___genexpr(PyObject *__pyx_self); /* proto */ static PyObject *__pyx_pf_6pandas_5tslib_6TimeRE___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_locale_time); /* proto */ static PyObject *__pyx_pf_6pandas_5tslib_6TimeRE_9__seqToRE_genexpr(PyObject *__pyx_self); /* proto */ static PyObject *__pyx_pf_6pandas_5tslib_6TimeRE_2__seqToRE(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, PyObject *__pyx_v_to_convert, PyObject *__pyx_v_directive); /* proto */ static PyObject *__pyx_pf_6pandas_5tslib_6TimeRE_4pattern(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_format); /* proto */ static PyObject *__pyx_pf_6pandas_5tslib_6TimeRE_6compile(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_format); /* proto */ static PyObject *__pyx_pf_6pandas_5tslib_98_calc_julian_from_U_or_W(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_year, PyObject *__pyx_v_week_of_year, PyObject *__pyx_v_day_of_week, PyObject *__pyx_v_week_starts_Mon); /* 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_5tslib___pyx_scope_struct_3_genexpr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_6pandas_5tslib__TSObject(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_6pandas_5tslib___pyx_scope_struct_2___seqToRE(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_6pandas_5tslib__Timestamp(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_6pandas_5tslib__NaT(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_6pandas_5tslib___pyx_scope_struct____init__(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_6pandas_5tslib___pyx_scope_struct_1_genexpr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static char __pyx_k_0[] = "0"; static char __pyx_k_1[] = "\\\\\\1"; static char __pyx_k_2[] = "2"; static char __pyx_k_3[] = "3"; static char __pyx_k_A[] = "A"; static char __pyx_k_B[] = "B"; static char __pyx_k_D[] = "D"; static char __pyx_k_F[] = "%F"; static char __pyx_k_H[] = "H"; static char __pyx_k_I[] = "I"; static char __pyx_k_L[] = "L"; static char __pyx_k_M[] = "M"; static char __pyx_k_O[] = "O"; static char __pyx_k_P[] = "P"; static char __pyx_k_Q[] = "Q"; static char __pyx_k_S[] = "S"; static char __pyx_k_T[] = "T"; static char __pyx_k_U[] = "U"; static char __pyx_k_W[] = "W"; static char __pyx_k_X[] = "%X"; static char __pyx_k_Y[] = "Y"; static char __pyx_k_Z[] = " %%Z"; static char __pyx_k_a[] = "a"; static char __pyx_k_b[] = "b"; static char __pyx_k_c[] = "%c"; static char __pyx_k_d[] = "d"; static char __pyx_k_f[] = "f"; static char __pyx_k_g[] = "g"; static char __pyx_k_h[] = "h"; static char __pyx_k_i[] = "i"; static char __pyx_k_j[] = "j"; static char __pyx_k_k[] = "k"; static char __pyx_k_l[] = "l"; static char __pyx_k_m[] = "m"; static char __pyx_k_n[] = "n"; static char __pyx_k_p[] = "p"; static char __pyx_k_q[] = "q"; static char __pyx_k_s[] = "'%s'"; static char __pyx_k_t[] = "t"; static char __pyx_k_u[] = "u"; static char __pyx_k_v[] = "v"; static char __pyx_k_w[] = "w"; static char __pyx_k_x[] = "%x"; static char __pyx_k_y[] = "y"; static char __pyx_k_z[] = "%z"; static char __pyx_k_00[] = "00"; static char __pyx_k_03[] = "03"; static char __pyx_k_10[] = "10"; static char __pyx_k_11[] = "11"; static char __pyx_k_17[] = "17"; static char __pyx_k_22[] = "22"; static char __pyx_k_2d[] = "%.2d"; static char __pyx_k_3d[] = "%.3d"; static char __pyx_k_44[] = "44"; static char __pyx_k_55[] = "55"; static char __pyx_k_6d[] = ".%.6d"; static char __pyx_k_76[] = "76"; static char __pyx_k_99[] = "99"; static char __pyx_k_9d[] = ".%.9d"; static char __pyx_k_AB[] = "^`AB`^"; static char __pyx_k_CD[] = "^`CD`^"; static char __pyx_k_EF[] = "^`EF`^"; static char __pyx_k_GH[] = "^`GH`^"; static char __pyx_k_IJ[] = "^`IJ`^"; static char __pyx_k_KL[] = "^`KL`^"; static char __pyx_k_M8[] = "M8"; static char __pyx_k_Zd[] = "Zd"; static char __pyx_k_Zf[] = "Zf"; static char __pyx_k_Zg[] = "Zg"; static char __pyx_k_dt[] = "dt"; static char __pyx_k_i4[] = "i4"; static char __pyx_k_i8[] = "i8"; static char __pyx_k_ms[] = "ms"; static char __pyx_k_np[] = "np"; static char __pyx_k_ns[] = "ns"; static char __pyx_k_ps[] = "ps"; static char __pyx_k_re[] = "re"; static char __pyx_k_sp[] = "sp"; static char __pyx_k_sz[] = "sz"; static char __pyx_k_td[] = "td"; static char __pyx_k_ts[] = "ts"; static char __pyx_k_tz[] = "tz"; static char __pyx_k_us[] = "us"; static char __pyx_k_02d[] = "%02d"; static char __pyx_k_03d[] = "%03d"; static char __pyx_k_06d[] = "%06d"; static char __pyx_k_09d[] = "%09d"; static char __pyx_k_1_6[] = "1.6"; static char __pyx_k_1_7[] = "1.7"; static char __pyx_k_A_2[] = "%A"; static char __pyx_k_B_2[] = "%B"; static char __pyx_k_H_2[] = "%H"; static char __pyx_k_I_2[] = "%I"; static char __pyx_k_M_2[] = "%M"; static char __pyx_k_NAN[] = "NAN"; static char __pyx_k_NAT[] = "NAT"; static char __pyx_k_NaN[] = "NaN"; static char __pyx_k_NaT[] = "NaT"; static char __pyx_k_S_2[] = "%S"; static char __pyx_k_UTC[] = "UTC"; static char __pyx_k_U_2[] = "%U"; static char __pyx_k_U_W[] = "U_W"; static char __pyx_k_W_2[] = "%W"; static char __pyx_k_X_2[] = "X"; static char __pyx_k_Y_2[] = "%Y"; static char __pyx_k_Y_m[] = "%Y-%m"; static char __pyx_k_Z_2[] = "Z"; static char __pyx_k_Z_3[] = "%Z"; static char __pyx_k__13[] = ""; static char __pyx_k__34[] = "-"; static char __pyx_k__35[] = "\\"; static char __pyx_k__36[] = "%"; static char __pyx_k__67[] = "%%"; static char __pyx_k__90[] = "|"; static char __pyx_k__91[] = "([\\\\.^$*+?\\(\\){}\\[\\]|])"; static char __pyx_k_a_2[] = "%a"; static char __pyx_k_abs[] = "abs"; static char __pyx_k_add[] = "__add__"; static char __pyx_k_all[] = "all"; static char __pyx_k_arr[] = "arr"; static char __pyx_k_b_2[] = "%b"; static char __pyx_k_c_2[] = "c"; static char __pyx_k_cls[] = "cls"; static char __pyx_k_d_2[] = "%d"; static char __pyx_k_day[] = "day"; static char __pyx_k_doc[] = "__doc__"; static char __pyx_k_dow[] = "dow"; static char __pyx_k_doy[] = "doy"; static char __pyx_k_dts[] = "dts"; static char __pyx_k_end[] = "end"; static char __pyx_k_err[] = "err"; static char __pyx_k_f_2[] = "%f"; static char __pyx_k_fmt[] = "fmt"; static char __pyx_k_get[] = "get"; static char __pyx_k_gmt[] = "gmt"; static char __pyx_k_grp[] = "grp"; static char __pyx_k_idx[] = "idx"; static char __pyx_k_inf[] = "inf"; static char __pyx_k_j_2[] = "%j"; static char __pyx_k_key[] = "key"; static char __pyx_k_l_2[] = "%l"; static char __pyx_k_len[] = "len"; static char __pyx_k_loc[] = "loc"; static char __pyx_k_m_2[] = "%m"; static char __pyx_k_max[] = "max"; static char __pyx_k_min[] = "min"; static char __pyx_k_mus[] = "mus"; static char __pyx_k_n_2[] = "%n"; static char __pyx_k_nan[] = "nan"; static char __pyx_k_nat[] = "nat"; static char __pyx_k_new[] = "__new__"; static char __pyx_k_now[] = "now"; static char __pyx_k_num[] = "num"; static char __pyx_k_obj[] = "obj"; static char __pyx_k_old[] = "old"; static char __pyx_k_out[] = "out"; static char __pyx_k_p_2[] = "%p"; static char __pyx_k_pad[] = "__pad"; static char __pyx_k_pos[] = "pos"; static char __pyx_k_q_2[] = "%q"; static char __pyx_k_ret[] = "ret"; static char __pyx_k_s_2[] = "s"; static char __pyx_k_s_3[] = "%s)"; static char __pyx_k_s_4[] = "\\s+"; static char __pyx_k_s_s[] = "%s %s"; static char __pyx_k_sep[] = "sep"; static char __pyx_k_seq[] = "seq"; static char __pyx_k_str[] = "__str__"; static char __pyx_k_sub[] = "__sub__"; static char __pyx_k_sys[] = "sys"; static char __pyx_k_tso[] = "tso"; static char __pyx_k_tz1[] = "tz1"; static char __pyx_k_tz2[] = "tz2"; static char __pyx_k_u_2[] = "%u"; static char __pyx_k_utc[] = "utc"; static char __pyx_k_val[] = "val"; static char __pyx_k_w_2[] = "%w"; static char __pyx_k_woy[] = "woy"; static char __pyx_k_x_2[] = "x"; static char __pyx_k_y_2[] = "%y"; static char __pyx_k_1999[] = "1999"; static char __pyx_k_FQ_q[] = "%FQ%q"; static char __pyx_k_None[] = "None"; static char __pyx_k_ampm[] = "ampm"; static char __pyx_k_args[] = "args"; static char __pyx_k_asm8[] = "asm8"; static char __pyx_k_base[] = "base"; static char __pyx_k_code[] = "code"; static char __pyx_k_date[] = "date"; static char __pyx_k_days[] = "days"; static char __pyx_k_diff[] = "diff"; static char __pyx_k_exit[] = "__exit__"; static char __pyx_k_fget[] = "fget"; static char __pyx_k_file[] = "file"; static char __pyx_k_fill[] = "fill"; static char __pyx_k_flat[] = "flat"; static char __pyx_k_frac[] = "frac"; static char __pyx_k_freq[] = "freq"; static char __pyx_k_func[] = "func"; static char __pyx_k_hash[] = "__hash__"; static char __pyx_k_hour[] = "hour"; static char __pyx_k_iNaT[] = "iNaT"; static char __pyx_k_init[] = "__init__"; static char __pyx_k_item[] = "item"; static char __pyx_k_join[] = "join"; static char __pyx_k_kwds[] = "kwds"; static char __pyx_k_lang[] = "lang"; static char __pyx_k_left[] = "left"; static char __pyx_k_long[] = "long"; static char __pyx_k_m8_0[] = "m8[{0}]"; static char __pyx_k_main[] = "__main__"; static char __pyx_k_name[] = "__name__"; static char __pyx_k_ndim[] = "ndim"; static char __pyx_k_prop[] = "prop"; static char __pyx_k_pydt[] = "pydt"; static char __pyx_k_pytz[] = "pytz"; static char __pyx_k_repr[] = "__repr__"; static char __pyx_k_self[] = "self"; static char __pyx_k_send[] = "send"; static char __pyx_k_side[] = "side"; static char __pyx_k_sign[] = "sign"; static char __pyx_k_size[] = "size"; static char __pyx_k_sort[] = "sort"; static char __pyx_k_test[] = "__test__"; static char __pyx_k_time[] = "time"; static char __pyx_k_ts_2[] = "_ts"; static char __pyx_k_tz_s[] = ", tz=%s"; static char __pyx_k_unit[] = "unit"; static char __pyx_k_vals[] = "vals"; static char __pyx_k_view[] = "view"; static char __pyx_k_warn[] = "warn"; static char __pyx_k_week[] = "week"; static char __pyx_k_year[] = "year"; static char __pyx_k_zone[] = "zone"; static char __pyx_k_M8_ns[] = "M8[ns]"; static char __pyx_k_P_s_s[] = "(?P<%s>%s"; static char __pyx_k_Y_m_d[] = "%Y-%m-%d"; static char __pyx_k_a_idx[] = "a_idx"; static char __pyx_k_all_2[] = "__all__"; static char __pyx_k_am_pm[] = "am_pm"; static char __pyx_k_apply[] = "apply"; static char __pyx_k_array[] = "array"; static char __pyx_k_b_idx[] = "b_idx"; static char __pyx_k_base1[] = "base1"; static char __pyx_k_base2[] = "base2"; static char __pyx_k_boxed[] = "boxed"; static char __pyx_k_clear[] = "clear"; static char __pyx_k_close[] = "close"; static char __pyx_k_count[] = "count"; static char __pyx_k_delta[] = "delta"; static char __pyx_k_dtarr[] = "dtarr"; static char __pyx_k_dtype[] = "dtype"; static char __pyx_k_empty[] = "empty"; static char __pyx_k_enter[] = "__enter__"; static char __pyx_k_field[] = "field"; static char __pyx_k_finfo[] = "finfo"; static char __pyx_k_found[] = "found"; static char __pyx_k_freq1[] = "freq1"; static char __pyx_k_freq2[] = "freq2"; static char __pyx_k_front[] = "front"; static char __pyx_k_hours[] = "hours"; static char __pyx_k_index[] = "index"; static char __pyx_k_int32[] = "int32"; static char __pyx_k_int64[] = "int64"; static char __pyx_k_lower[] = "lower"; static char __pyx_k_m8_ns[] = "m8[ns]"; static char __pyx_k_match[] = "match"; static char __pyx_k_month[] = "month"; static char __pyx_k_nanos[] = "nanos"; static char __pyx_k_new_2[] = "new"; static char __pyx_k_numpy[] = "numpy"; static char __pyx_k_print[] = "print"; static char __pyx_k_raise[] = "raise_"; static char __pyx_k_range[] = "range"; static char __pyx_k_ravel[] = "ravel"; static char __pyx_k_regex[] = "regex"; static char __pyx_k_right[] = "right"; static char __pyx_k_round[] = "round"; static char __pyx_k_s_s_2[] = "%s/%s"; static char __pyx_k_s_s_3[] = "%s%s"; static char __pyx_k_s_s_s[] = "%s%s%s"; static char __pyx_k_shape[] = "shape"; static char __pyx_k_short[] = "short"; static char __pyx_k_stamp[] = "stamp"; static char __pyx_k_state[] = "state"; static char __pyx_k_sub_2[] = "sub"; static char __pyx_k_super[] = "super"; static char __pyx_k_table[] = "table"; static char __pyx_k_tdata[] = "tdata"; static char __pyx_k_throw[] = "throw"; static char __pyx_k_today[] = "today"; static char __pyx_k_trans[] = "trans"; static char __pyx_k_tzset[] = "tzset"; static char __pyx_k_tzutc[] = "tzutc"; static char __pyx_k_utf_8[] = "utf-8"; static char __pyx_k_value[] = "value"; static char __pyx_k_where[] = "where"; static char __pyx_k_years[] = "years"; static char __pyx_k_D_RESO[] = "D_RESO"; static char __pyx_k_H_RESO[] = "H_RESO"; static char __pyx_k_Period[] = "Period"; static char __pyx_k_S_RESO[] = "S_RESO"; static char __pyx_k_T_RESO[] = "T_RESO"; static char __pyx_k_TimeRE[] = "TimeRE"; static char __pyx_k_Z_tz_s[] = " %%Z, tz=%s"; static char __pyx_k_append[] = "append"; static char __pyx_k_astype[] = "astype"; static char __pyx_k_coerce[] = "coerce"; static char __pyx_k_decode[] = "decode"; static char __pyx_k_deltas[] = "deltas"; static char __pyx_k_du_utc[] = "_du_utc"; static char __pyx_k_encode[] = "encode"; static char __pyx_k_escape[] = "escape"; static char __pyx_k_fields[] = "fields"; static char __pyx_k_format[] = "format"; static char __pyx_k_hstack[] = "hstack"; static char __pyx_k_ignore[] = "ignore"; static char __pyx_k_import[] = "__import__"; static char __pyx_k_insert[] = "insert"; static char __pyx_k_isleap[] = "isleap"; static char __pyx_k_ivalue[] = "ivalue"; static char __pyx_k_julian[] = "julian"; static char __pyx_k_kwargs[] = "kwargs"; static char __pyx_k_lambda[] = ""; static char __pyx_k_locale[] = "locale"; static char __pyx_k_micros[] = "micros"; static char __pyx_k_minute[] = "minute"; static char __pyx_k_mo_off[] = "mo_off"; static char __pyx_k_module[] = "__module__"; static char __pyx_k_months[] = "months"; static char __pyx_k_np_NaT[] = "np_NaT"; static char __pyx_k_ntrans[] = "ntrans"; static char __pyx_k_object[] = "object"; static char __pyx_k_offset[] = "offset"; static char __pyx_k_reduce[] = "__reduce__"; static char __pyx_k_result[] = "result"; static char __pyx_k_second[] = "second"; static char __pyx_k_sorted[] = "sorted"; static char __pyx_k_stamps[] = "stamps"; static char __pyx_k_thread[] = "thread"; static char __pyx_k_tzinfo[] = "tzinfo"; static char __pyx_k_tzname[] = "tzname"; static char __pyx_k_utcnow[] = "utcnow"; static char __pyx_k_values[] = "values"; static char __pyx_k_02d_06d[] = "%02d.%06d"; static char __pyx_k_LC_TIME[] = "LC_TIME"; static char __pyx_k_LC_date[] = "LC_date"; static char __pyx_k_LC_time[] = "LC_time"; static char __pyx_k_NaTType[] = "NaTType"; static char __pyx_k_P_w_0_6[] = "(?P[0-6])"; static char __pyx_k_P_y_d_d[] = "(?P\\d\\d)"; static char __pyx_k_US_RESO[] = "US_RESO"; static char __pyx_k_a_month[] = "a_month"; static char __pyx_k_both_eq[] = "both_eq"; static char __pyx_k_combine[] = "combine"; static char __pyx_k_compile[] = "compile"; static char __pyx_k_d_2d_2d[] = "%d-%.2d-%.2d"; static char __pyx_k_dtindex[] = "dtindex"; static char __pyx_k_f_month[] = "f_month"; static char __pyx_k_freqstr[] = "freqstr"; static char __pyx_k_genexpr[] = "genexpr"; static char __pyx_k_getitem[] = "__getitem__"; static char __pyx_k_getlang[] = "_getlang"; static char __pyx_k_iresult[] = "iresult"; static char __pyx_k_ivalues[] = "ivalues"; static char __pyx_k_maximum[] = "maximum"; static char __pyx_k_minutes[] = "minutes"; static char __pyx_k_nonzero[] = "nonzero"; static char __pyx_k_ordinal[] = "ordinal"; static char __pyx_k_oresult[] = "oresult"; static char __pyx_k_pattern[] = "pattern"; static char __pyx_k_prepare[] = "__prepare__"; static char __pyx_k_quarter[] = "quarter"; static char __pyx_k_replace[] = "replace"; static char __pyx_k_reverse[] = "reverse"; static char __pyx_k_seconds[] = "seconds"; static char __pyx_k_seqToRE[] = "__seqToRE"; static char __pyx_k_setitem[] = "__setitem__"; static char __pyx_k_squeeze[] = "squeeze"; static char __pyx_k_ts_base[] = "ts_base"; static char __pyx_k_tzinfos[] = "_tzinfos"; static char __pyx_k_tzlocal[] = "tzlocal"; static char __pyx_k_uniques[] = "uniques"; static char __pyx_k_version[] = "version"; static char __pyx_k_weekday[] = "weekday"; static char __pyx_k_2d_2d_2d[] = "%.2d:%.2d:%.2d"; static char __pyx_k_KeyError[] = "KeyError"; static char __pyx_k_both_nat[] = "both_nat"; static char __pyx_k_calendar[] = "calendar"; static char __pyx_k_datetime[] = "datetime"; static char __pyx_k_day_abbr[] = "day_abbr"; static char __pyx_k_day_name[] = "day_name"; static char __pyx_k_dayfirst[] = "dayfirst"; static char __pyx_k_daylight[] = "daylight"; static char __pyx_k_fraction[] = "fraction"; static char __pyx_k_iterkeys[] = "iterkeys"; static char __pyx_k_localize[] = "localize"; static char __pyx_k_one_diff[] = "one_diff"; static char __pyx_k_ordinals[] = "ordinals"; static char __pyx_k_property[] = "property"; static char __pyx_k_qualname[] = "__qualname__"; static char __pyx_k_relation[] = "relation"; static char __pyx_k_result_a[] = "result_a"; static char __pyx_k_result_b[] = "result_b"; static char __pyx_k_s_d_days[] = "%s%d days"; static char __pyx_k_sa_dtype[] = "sa_dtype"; static char __pyx_k_setstate[] = "__setstate__"; static char __pyx_k_strftime[] = "strftime"; static char __pyx_k_thread_2[] = "_thread"; static char __pyx_k_timezone[] = "timezone"; static char __pyx_k_ts_input[] = "ts_input"; static char __pyx_k_utc_date[] = "utc_date"; static char __pyx_k_year2000[] = "year2000"; static char __pyx_k_Exception[] = "Exception"; static char __pyx_k_NameError[] = "NameError"; static char __pyx_k_Timestamp[] = "Timestamp"; static char __pyx_k_TypeError[] = "TypeError"; static char __pyx_k_Y_m_d_H_M[] = "%Y-%m-%d %H:%M"; static char __pyx_k_a_weekday[] = "a_weekday"; static char __pyx_k_date_repr[] = "_date_repr"; static char __pyx_k_date_time[] = "date_time"; static char __pyx_k_dayofweek[] = "dayofweek"; static char __pyx_k_dayofyear[] = "dayofyear"; static char __pyx_k_directive[] = "directive"; static char __pyx_k_dst_hours[] = "dst_hours"; static char __pyx_k_enumerate[] = "enumerate"; static char __pyx_k_f_weekday[] = "f_weekday"; static char __pyx_k_get_field[] = "_get_field"; static char __pyx_k_getlocale[] = "getlocale"; static char __pyx_k_group_key[] = "group_key"; static char __pyx_k_groupdict[] = "groupdict"; static char __pyx_k_have_pytz[] = "have_pytz"; static char __pyx_k_infer_dst[] = "infer_dst"; static char __pyx_k_isoformat[] = "isoformat"; static char __pyx_k_metaclass[] = "__metaclass__"; static char __pyx_k_no_saving[] = "no_saving"; static char __pyx_k_normalize[] = "normalize"; static char __pyx_k_periodarr[] = "periodarr"; static char __pyx_k_re_escape[] = "re_escape"; static char __pyx_k_repr_base[] = "_repr_base"; static char __pyx_k_time_repr[] = "_time_repr"; static char __pyx_k_timedelta[] = "timedelta"; static char __pyx_k_to_period[] = "to_period"; static char __pyx_k_toordinal[] = "toordinal"; static char __pyx_k_trans_grp[] = "trans_grp"; static char __pyx_k_trans_idx[] = "trans_idx"; static char __pyx_k_trans_len[] = "trans_len"; static char __pyx_k_tz_values[] = "tz_values"; static char __pyx_k_utc_dates[] = "utc_dates"; static char __pyx_k_utcoffset[] = "utcoffset"; static char __pyx_k_zero_time[] = "_zero_time"; static char __pyx_k_IGNORECASE[] = "IGNORECASE"; static char __pyx_k_IndexError[] = "IndexError"; static char __pyx_k_LocaleTime[] = "LocaleTime"; static char __pyx_k_ValueError[] = "ValueError"; static char __pyx_k_Y_m_d_H_00[] = "%Y-%m-%d %H:00"; static char __pyx_k_astimezone[] = "astimezone"; static char __pyx_k_basestring[] = "basestring"; static char __pyx_k_cache_lock[] = "_cache_lock"; static char __pyx_k_calc_am_pm[] = "__calc_am_pm"; static char __pyx_k_calc_month[] = "__calc_month"; static char __pyx_k_compat_NaT[] = "compat_NaT"; static char __pyx_k_datetime64[] = "datetime64"; static char __pyx_k_found_dict[] = "found_dict"; static char __pyx_k_found_zone[] = "found_zone"; static char __pyx_k_freq_group[] = "freq_group"; static char __pyx_k_get_deltas[] = "_get_deltas"; static char __pyx_k_has_saving[] = "has_saving"; static char __pyx_k_i8_to_pydt[] = "i8_to_pydt"; static char __pyx_k_is_tzlocal[] = "_is_tzlocal"; static char __pyx_k_isleapyear[] = "isleapyear"; static char __pyx_k_month_abbr[] = "month_abbr"; static char __pyx_k_month_name[] = "month_name"; static char __pyx_k_monthrange[] = "monthrange"; static char __pyx_k_nanosecond[] = "nanosecond"; static char __pyx_k_new_values[] = "new_values"; static char __pyx_k_np_version[] = "_np_version"; static char __pyx_k_parse_code[] = "parse_code"; static char __pyx_k_parse_date[] = "parse_date"; static char __pyx_k_pydt_to_i8[] = "pydt_to_i8"; static char __pyx_k_pyx_vtable[] = "__pyx_vtable__"; static char __pyx_k_re_compile[] = "re_compile"; static char __pyx_k_startswith[] = "startswith"; static char __pyx_k_switch_idx[] = "switch_idx"; static char __pyx_k_time_tuple[] = "time_tuple"; static char __pyx_k_to_convert[] = "to_convert"; static char __pyx_k_tz_convert[] = "tz_convert"; static char __pyx_k_weekofyear[] = "weekofyear"; static char __pyx_k_P_M_0_5_d_d[] = "(?P[0-5]\\d|\\d)"; static char __pyx_k_P_Y_d_d_d_d[] = "(?P\\d\\d\\d\\d)"; static char __pyx_k_P_f_0_9_1_6[] = "(?P[0-9]{1,6})"; static char __pyx_k_Y_m_d_H_M_S[] = "%Y-%m-%d %H:%M:%S"; static char __pyx_k_array_split[] = "array_split"; static char __pyx_k_date_string[] = "date_string"; static char __pyx_k_dateutil_tz[] = "dateutil.tz"; static char __pyx_k_day_of_week[] = "day_of_week"; static char __pyx_k_fromordinal[] = "fromordinal"; static char __pyx_k_idx_shifted[] = "idx_shifted"; static char __pyx_k_inferred_tz[] = "inferred_tz"; static char __pyx_k_isleap_prev[] = "isleap_prev"; static char __pyx_k_locale_time[] = "locale_time"; static char __pyx_k_logical_and[] = "logical_and"; static char __pyx_k_microsecond[] = "microsecond"; static char __pyx_k_nat_strings[] = "_nat_strings"; static char __pyx_k_regex_cache[] = "_regex_cache"; static char __pyx_k_regex_chars[] = "regex_chars"; static char __pyx_k_s_02d_02d_s[] = "%s%02d:%02d:%s"; static char __pyx_k_sign_pretty[] = "sign_pretty"; static char __pyx_k_struct_time[] = "struct_time"; static char __pyx_k_timedelta64[] = "timedelta64"; static char __pyx_k_to_datetime[] = "to_datetime"; static char __pyx_k_tot_seconds[] = "tot_seconds"; static char __pyx_k_trans_cache[] = "trans_cache"; static char __pyx_k_tz_localize[] = "tz_localize"; static char __pyx_k_utc_convert[] = "utc_convert"; static char __pyx_k_utcoffset_2[] = "_utcoffset"; static char __pyx_k_LC_date_time[] = "LC_date_time"; static char __pyx_k_LooseVersion[] = "LooseVersion"; static char __pyx_k_RuntimeError[] = "RuntimeError"; static char __pyx_k_TimeRE_cache[] = "_TimeRE_cache"; static char __pyx_k_Timestamp_tz[] = "Timestamp.tz"; static char __pyx_k_apply_offset[] = "apply_offset"; static char __pyx_k_calc_weekday[] = "__calc_weekday"; static char __pyx_k_days_to_week[] = "days_to_week"; static char __pyx_k_dummy_thread[] = "dummy_thread"; static char __pyx_k_format_regex[] = "format_regex"; static char __pyx_k_get_timezone[] = "get_timezone"; static char __pyx_k_microseconds[] = "microseconds"; static char __pyx_k_month_offset[] = "_month_offset"; static char __pyx_k_object_state[] = "object_state"; static char __pyx_k_pandas_tslib[] = "pandas.tslib"; static char __pyx_k_searchsorted[] = "searchsorted"; static char __pyx_k_seen_integer[] = "seen_integer"; static char __pyx_k_version_info[] = "version_info"; static char __pyx_k_week_of_year[] = "week_of_year"; static char __pyx_k_NaTType___new[] = "NaTType.__new__"; static char __pyx_k_NaTType___str[] = "NaTType.__str__"; static char __pyx_k_TimeRE___init[] = "TimeRE.__init__"; static char __pyx_k_Timestamp_now[] = "Timestamp.now"; static char __pyx_k_Y_m_d_H_M_S_l[] = "%Y-%m-%d %H:%M:%S.%l"; static char __pyx_k_Y_m_d_H_M_S_n[] = "%Y-%m-%d %H:%M:%S.%n"; static char __pyx_k_Y_m_d_H_M_S_u[] = "%Y-%m-%d %H:%M:%S.%u"; static char __pyx_k_allocate_lock[] = "allocate_lock"; static char __pyx_k_bad_directive[] = "bad_directive"; static char __pyx_k_calc_timezone[] = "__calc_timezone"; static char __pyx_k_datetime_date[] = "datetime_date"; static char __pyx_k_datetime_time[] = "datetime_time"; static char __pyx_k_first_weekday[] = "first_weekday"; static char __pyx_k_pandas_compat[] = "pandas.compat"; static char __pyx_k_period_format[] = "period_format"; static char __pyx_k_pyx_getbuffer[] = "__pyx_getbuffer"; static char __pyx_k_seen_datetime[] = "seen_datetime"; static char __pyx_k_short_version[] = "short_version"; static char __pyx_k_to_pydatetime[] = "to_pydatetime"; static char __pyx_k_total_seconds[] = "total_seconds"; static char __pyx_k_unique_deltas[] = "unique_deltas"; static char __pyx_k_week_0_length[] = "week_0_length"; static char __pyx_k_AttributeError[] = "AttributeError"; static char __pyx_k_CACHE_MAX_SIZE[] = "_CACHE_MAX_SIZE"; static char __pyx_k_NaTType___hash[] = "NaTType.__hash__"; static char __pyx_k_NaTType___repr[] = "NaTType.__repr__"; static char __pyx_k_TimeRE_compile[] = "TimeRE.compile"; static char __pyx_k_TimeRE_pattern[] = "TimeRE.pattern"; static char __pyx_k_Timestamp_asm8[] = "Timestamp.asm8"; static char __pyx_k_Timestamp_freq[] = "Timestamp.freq"; static char __pyx_k_Timestamp_week[] = "Timestamp.week"; static char __pyx_k_Unknown_freq_d[] = "Unknown freq: %d"; static char __pyx_k_array_strptime[] = "array_strptime"; static char __pyx_k_calc_date_time[] = "__calc_date_time"; static char __pyx_k_current_format[] = "current_format"; static char __pyx_k_date_normalize[] = "date_normalize"; static char __pyx_k_dummy_thread_2[] = "_dummy_thread"; static char __pyx_k_get_date_field[] = "get_date_field"; static char __pyx_k_period_ordinal[] = "period_ordinal"; static char __pyx_k_seconds_pretty[] = "seconds_pretty"; static char __pyx_k_timedelta64_ns[] = "timedelta64[ns]"; static char __pyx_k_LocaleTime__pad[] = "_LocaleTime__pad"; static char __pyx_k_NaTType_weekday[] = "NaTType.weekday"; static char __pyx_k_TimeRE__seqToRE[] = "_TimeRE__seqToRE"; static char __pyx_k_Timestamp___new[] = "Timestamp.__new__"; static char __pyx_k_Timestamp_today[] = "Timestamp.today"; static char __pyx_k_datetime_result[] = "datetime_result"; static char __pyx_k_directive_index[] = "directive_index"; static char __pyx_k_get_time_micros[] = "get_time_micros"; static char __pyx_k_get_transitions[] = "_get_transitions"; static char __pyx_k_is_fixed_offset[] = "_is_fixed_offset"; static char __pyx_k_s_is_wrong_freq[] = "%s is wrong freq"; static char __pyx_k_transition_info[] = "_transition_info"; static char __pyx_k_week_starts_Mon[] = "week_starts_Mon"; static char __pyx_k_LocaleTime___pad[] = "LocaleTime.__pad"; static char __pyx_k_TimeRE___seqToRE[] = "TimeRE.__seqToRE"; static char __pyx_k_Timestamp___repr[] = "Timestamp.__repr__"; static char __pyx_k_Timestamp_s_tz_s[] = "Timestamp('%s', tz=%s)"; static char __pyx_k_Timestamp_utcnow[] = "Timestamp.utcnow"; static char __pyx_k_d_2d_2d_2d_2d_2d[] = "%d-%.2d-%.2d %.2d:%.2d:%.2d"; static char __pyx_k_dates_normalized[] = "dates_normalized"; static char __pyx_k_extract_ordinals[] = "extract_ordinals"; static char __pyx_k_get_period_field[] = "get_period_field"; static char __pyx_k_parse_code_table[] = "_parse_code_table"; static char __pyx_k_processed_format[] = "processed_format"; static char __pyx_k_repr_timedelta64[] = "repr_timedelta64"; static char __pyx_k_utc_offset_cache[] = "utc_offset_cache"; static char __pyx_k_LocaleTime___init[] = "LocaleTime.__init__"; static char __pyx_k_NaTType_toordinal[] = "NaTType.toordinal"; static char __pyx_k_P_H_2_0_3_0_1_d_d[] = "(?P2[0-3]|[0-1]\\d|\\d)"; static char __pyx_k_P_S_6_0_1_0_5_d_d[] = "(?P6[0-1]|[0-5]\\d|\\d)"; static char __pyx_k_P_U_5_0_3_0_4_d_d[] = "(?P5[0-3]|[0-4]\\d|\\d)"; static char __pyx_k_Timestamp_freqstr[] = "Timestamp.freqstr"; static char __pyx_k_Timestamp_quarter[] = "Timestamp.quarter"; static char __pyx_k_Timestamp_replace[] = "Timestamp.replace"; static char __pyx_k_Unable_to_parse_s[] = "Unable to parse %s"; static char __pyx_k_array_to_datetime[] = "array_to_datetime"; static char __pyx_k_distutils_version[] = "distutils.version"; static char __pyx_k_period_asfreq_arr[] = "period_asfreq_arr"; static char __pyx_k_pyx_releasebuffer[] = "__pyx_releasebuffer"; static char __pyx_k_replacement_pairs[] = "replacement_pairs"; static char __pyx_k_stray_in_format_s[] = "stray %% in format '%s'"; static char __pyx_k_tz_convert_single[] = "tz_convert_single"; static char __pyx_k_AmbiguousTimeError[] = "AmbiguousTimeError"; static char __pyx_k_Timestamp___reduce[] = "Timestamp.__reduce__"; static char __pyx_k_build_field_sarray[] = "build_field_sarray"; static char __pyx_k_has_time_component[] = "_has_time_component"; static char __pyx_k_ints_to_pydatetime[] = "ints_to_pydatetime"; static char __pyx_k_is_timestamp_array[] = "is_timestamp_array"; static char __pyx_k_s_d_days_02d_02d_s[] = "%s%d days, %02d:%02d:%s"; static char __pyx_k_tz_localize_to_utc[] = "tz_localize_to_utc"; static char __pyx_k_week_of_year_start[] = "week_of_year_start"; static char __pyx_k_OutOfBoundsDatetime[] = "OutOfBoundsDatetime"; static char __pyx_k_P_I_1_0_2_0_1_9_1_9[] = "(?P1[0-2]|0[1-9]|[1-9])"; static char __pyx_k_P_m_1_0_2_0_1_9_1_9[] = "(?P1[0-2]|0[1-9]|[1-9])"; static char __pyx_k_Timestamp_dayofweek[] = "Timestamp.dayofweek"; static char __pyx_k_Timestamp_dayofyear[] = "Timestamp.dayofyear"; static char __pyx_k_Timestamp_isoformat[] = "Timestamp.isoformat"; static char __pyx_k_Timestamp_to_period[] = "Timestamp.to_period"; static char __pyx_k_Unrecognized_type_s[] = "Unrecognized type: %s"; static char __pyx_k_cast_to_nanoseconds[] = "cast_to_nanoseconds"; static char __pyx_k_index_out_of_bounds[] = "index out of bounds"; static char __pyx_k_np_version_under1p6[] = "_np_version_under1p6"; static char __pyx_k_np_version_under1p7[] = "_np_version_under1p7"; static char __pyx_k_NonExistentTimeError[] = "NonExistentTimeError"; static char __pyx_k_Timestamp___setstate[] = "Timestamp.__setstate__"; static char __pyx_k_Timestamp__date_repr[] = "Timestamp._date_repr"; static char __pyx_k_Timestamp__repr_base[] = "Timestamp._repr_base"; static char __pyx_k_Timestamp__time_repr[] = "Timestamp._time_repr"; static char __pyx_k_Timestamp_tz_convert[] = "Timestamp.tz_convert"; static char __pyx_k_array_to_timedelta64[] = "array_to_timedelta64"; static char __pyx_k_convert_to_timedelta[] = "convert_to_timedelta"; static char __pyx_k_delta_to_nanoseconds[] = "_delta_to_nanoseconds"; static char __pyx_k_dt64arr_to_periodarr[] = "dt64arr_to_periodarr"; static char __pyx_k_get_period_field_arr[] = "get_period_field_arr"; static char __pyx_k_not_datelike_strings[] = "_not_datelike_strings"; static char __pyx_k_periodarr_to_dt64arr[] = "periodarr_to_dt64arr"; static char __pyx_k_thread_allocate_lock[] = "_thread_allocate_lock"; static char __pyx_k_utc_transition_times[] = "_utc_transition_times"; static char __pyx_k_Field_s_not_supported[] = "Field %s not supported"; static char __pyx_k_Timestamp_fromordinal[] = "Timestamp.fromordinal"; static char __pyx_k_Timestamp_tz_localize[] = "Timestamp.tz_localize"; static char __pyx_k_pandas_tseries_period[] = "pandas.tseries.period"; static char __pyx_k_parse_datetime_string[] = "parse_datetime_string"; static char __pyx_k_LocaleTime__calc_am_pm[] = "_LocaleTime__calc_am_pm"; static char __pyx_k_LocaleTime__calc_month[] = "_LocaleTime__calc_month"; static char __pyx_k_datetime_to_datetime64[] = "datetime_to_datetime64"; static char __pyx_k_whitespace_replacement[] = "whitespace_replacement"; static char __pyx_k_LocaleTime___calc_am_pm[] = "LocaleTime.__calc_am_pm"; static char __pyx_k_LocaleTime___calc_month[] = "LocaleTime.__calc_month"; static char __pyx_k_Timestamp_to_pydatetime[] = "Timestamp.to_pydatetime"; static char __pyx_k_calc_julian_from_U_or_W[] = "_calc_julian_from_U_or_W"; static char __pyx_k_LocaleTime__calc_weekday[] = "_LocaleTime__calc_weekday"; static char __pyx_k_LocaleTime___calc_weekday[] = "LocaleTime.__calc_weekday"; static char __pyx_k_LocaleTime__calc_timezone[] = "_LocaleTime__calc_timezone"; static char __pyx_k_Unrecognized_value_type_s[] = "Unrecognized value type: %s"; static char __pyx_k_Could_not_find_pytz_module[] = "Could not find pytz module"; static char __pyx_k_LocaleTime___calc_timezone[] = "LocaleTime.__calc_timezone"; static char __pyx_k_LocaleTime__calc_date_time[] = "_LocaleTime__calc_date_time"; static char __pyx_k_Unrecognized_period_code_d[] = "Unrecognized period code: %d"; static char __pyx_k_unconverted_data_remains_s[] = "unconverted data remains: %s"; static char __pyx_k_Frequency_conversion_failed[] = "Frequency conversion failed"; static char __pyx_k_LocaleTime___calc_date_time[] = "LocaleTime.__calc_date_time"; static char __pyx_k_ndarray_is_not_C_contiguous[] = "ndarray is not C contiguous"; static char __pyx_k_P_d_3_0_1_1_2_d_0_1_9_1_9_1_9[] = "(?P3[0-1]|[1-2]\\d|0[1-9]|[1-9]| [1-9])"; static char __pyx_k_Timestamp__has_time_component[] = "Timestamp._has_time_component"; static char __pyx_k_P_j_36_0_6_3_0_5_d_1_2_d_d_0_1[] = "(?P36[0-6]|3[0-5]\\d|[1-2]\\d\\d|0[1-9]\\d|00[1-9]|[1-9]\\d|0[1-9]|[1-9])"; static char __pyx_k_Unable_to_get_quarter_and_year[] = "Unable to get quarter and year"; static char __pyx_k_does_string_look_like_datetime[] = "_does_string_look_like_datetime"; static char __pyx_k_s_is_a_bad_directive_in_format[] = "'%s' is a bad directive in format '%s'"; static char __pyx_k_Cannot_compare_type_r_with_type[] = "Cannot compare type %r with type %r"; static char __pyx_k_N_ot_A_T_ime_the_time_equivalen[] = "(N)ot-(A)-(T)ime, the time equivalent of NaN"; static char __pyx_k_bad_month_number_0_must_be_1_12[] = "bad month number 0; must be 1-12"; static char __pyx_k_home_yoh_deb_gits_pkg_exppsy_pa[] = "/home/yoh/deb/gits/pkg-exppsy/pandas/pandas/tslib.pyx"; static char __pyx_k_mixed_datetimes_and_integers_in[] = "mixed datetimes and integers in passed array"; static char __pyx_k_unknown_dtype_code_in_numpy_pxd[] = "unknown dtype code in numpy.pxd (%d)"; static char __pyx_k_Array_must_be_all_same_time_zone[] = "Array must be all same time zone"; static char __pyx_k_Cannot_add_integral_value_to_Tim[] = "Cannot add integral value to Timestamp without offset."; static char __pyx_k_Cannot_compare_tz_naive_and_tz_a[] = "Cannot compare tz-naive and tz-aware timestamps"; static char __pyx_k_Cannot_convert_tz_naive_Timestam[] = "Cannot convert tz-naive Timestamp, use tz_localize to localize"; static char __pyx_k_Cannot_infer_dst_time_from_r_try[] = "Cannot infer dst time from %r, try using the 'infer_dst' argument"; static char __pyx_k_Cannot_infer_dst_time_from_s_ast[] = "Cannot infer dst time from %s asthere are no repeated times"; static char __pyx_k_Cannot_localize_tz_aware_Timesta[] = "Cannot localize tz-aware Timestamp, use tz_convert for conversions"; static char __pyx_k_Cannot_mix_tz_aware_with_tz_naiv[] = "Cannot mix tz-aware with tz-naive values"; static char __pyx_k_Could_not_construct_Timestamp_fr[] = "Could not construct Timestamp from argument %s"; static char __pyx_k_First_time_before_start_of_DST_i[] = "First time before start of DST info"; static char __pyx_k_Format_string_allocated_too_shor[] = "Format string allocated too short, see comment in numpy.pxd"; static char __pyx_k_Given_date_string_not_likely_a_d[] = "Given date string not likely a datetime."; static char __pyx_k_Handle_conversion_from_format_di[] = "Handle conversion from format directives to regexes."; static char __pyx_k_Invalid_type_for_timedelta_scala[] = "Invalid type for timedelta scalar: %s"; static char __pyx_k_Non_native_byte_order_not_suppor[] = "Non-native byte order not supported"; static char __pyx_k_NumPy_1_6_1_business_freq_not_su[] = "NumPy 1.6.1 business freq not supported"; static char __pyx_k_Out_of_bounds_nanosecond_timesta[] = "Out of bounds nanosecond timestamp: %s"; static char __pyx_k_Stores_and_handles_locale_specif[] = "Stores and handles locale-specific information related to time.\n\n ATTRIBUTES:\n f_weekday -- full weekday names (7-item list)\n a_weekday -- abbreviated weekday names (7-item list)\n f_month -- full month names (13-item list; dummy value in [0], which\n is added by code)\n a_month -- abbreviated month names (13-item list, dummy value in\n [0], which is added by code)\n am_pm -- AM/PM representation (2-item list)\n LC_date_time -- format string for date/time representation (string)\n LC_date -- format string for date representation (string)\n LC_time -- format string for time representation (string)\n timezone -- daylight- and non-daylight-savings timezone representation\n (2-item list of sets)\n lang -- Language used by instance (2-item tuple)\n "; static char __pyx_k_There_are_i_dst_switches_when_th[] = "There are %i dst switches when there should only be 1."; static char __pyx_k_TimeStamp_is_the_pandas_equivale[] = "TimeStamp is the pandas equivalent of python's Datetime\n and is interchangable with it in most cases. It's the type used\n for the entries that make up a DatetimeIndex, and other timeseries\n oriented data structures in pandas.\n "; static char __pyx_k_Tz_aware_datetime_datetime_canno[] = "Tz-aware datetime.datetime cannot be converted to datetime64 unless utc=True"; static char __pyx_k_Unable_to_convert_to_desired_fre[] = "Unable to convert to desired frequency."; static char __pyx_k_Warning_discarding_nonzero_nanos[] = "Warning: discarding nonzero nanoseconds"; static char __pyx_k_locale_changed_during_initializa[] = "locale changed during initialization"; static char __pyx_k_ndarray_is_not_Fortran_contiguou[] = "ndarray is not Fortran contiguous"; static char __pyx_k_time_data_r_does_not_match_forma[] = "time data %r does not match format %r"; static char __pyx_k_Format_string_allocated_too_shor_2[] = "Format string allocated too short."; static PyObject *__pyx_kp_s_0; static PyObject *__pyx_kp_s_00; static PyObject *__pyx_kp_s_02d; static PyObject *__pyx_kp_s_02d_06d; static PyObject *__pyx_kp_s_03; static PyObject *__pyx_kp_s_03d; static PyObject *__pyx_kp_s_06d; static PyObject *__pyx_kp_s_09d; static PyObject *__pyx_kp_s_1; static PyObject *__pyx_kp_s_10; static PyObject *__pyx_kp_s_11; static PyObject *__pyx_kp_s_17; static PyObject *__pyx_kp_s_1999; static PyObject *__pyx_kp_s_1_6; static PyObject *__pyx_kp_s_1_7; static PyObject *__pyx_kp_s_2; static PyObject *__pyx_kp_s_22; static PyObject *__pyx_kp_s_2d; static PyObject *__pyx_kp_s_2d_2d_2d; static PyObject *__pyx_kp_s_3; static PyObject *__pyx_kp_s_3d; static PyObject *__pyx_kp_s_44; static PyObject *__pyx_kp_s_55; static PyObject *__pyx_kp_s_6d; static PyObject *__pyx_kp_s_76; static PyObject *__pyx_kp_s_99; static PyObject *__pyx_kp_s_9d; static PyObject *__pyx_n_s_A; static PyObject *__pyx_kp_b_AB; static PyObject *__pyx_kp_s_AB; static PyObject *__pyx_kp_s_A_2; static PyObject *__pyx_n_s_AmbiguousTimeError; static PyObject *__pyx_kp_s_Array_must_be_all_same_time_zone; static PyObject *__pyx_n_s_AttributeError; static PyObject *__pyx_n_s_B; static PyObject *__pyx_kp_s_B_2; static PyObject *__pyx_n_s_CACHE_MAX_SIZE; static PyObject *__pyx_kp_b_CD; static PyObject *__pyx_kp_s_CD; static PyObject *__pyx_kp_s_Cannot_add_integral_value_to_Tim; static PyObject *__pyx_kp_s_Cannot_compare_type_r_with_type; static PyObject *__pyx_kp_s_Cannot_compare_tz_naive_and_tz_a; static PyObject *__pyx_kp_s_Cannot_convert_tz_naive_Timestam; static PyObject *__pyx_kp_s_Cannot_infer_dst_time_from_r_try; static PyObject *__pyx_kp_s_Cannot_infer_dst_time_from_s_ast; static PyObject *__pyx_kp_s_Cannot_localize_tz_aware_Timesta; static PyObject *__pyx_kp_s_Cannot_mix_tz_aware_with_tz_naiv; static PyObject *__pyx_kp_s_Could_not_construct_Timestamp_fr; static PyObject *__pyx_kp_s_Could_not_find_pytz_module; static PyObject *__pyx_n_s_D; static PyObject *__pyx_n_s_D_RESO; static PyObject *__pyx_kp_b_EF; static PyObject *__pyx_kp_s_EF; static PyObject *__pyx_n_s_Exception; static PyObject *__pyx_kp_b_F; static PyObject *__pyx_kp_b_FQ_q; static PyObject *__pyx_kp_s_Field_s_not_supported; static PyObject *__pyx_kp_s_First_time_before_start_of_DST_i; static PyObject *__pyx_kp_u_Format_string_allocated_too_shor; static PyObject *__pyx_kp_u_Format_string_allocated_too_shor_2; static PyObject *__pyx_kp_s_Frequency_conversion_failed; static PyObject *__pyx_kp_b_GH; static PyObject *__pyx_kp_s_GH; static PyObject *__pyx_kp_s_Given_date_string_not_likely_a_d; static PyObject *__pyx_n_s_H; static PyObject *__pyx_kp_s_H_2; static PyObject *__pyx_n_s_H_RESO; static PyObject *__pyx_kp_s_Handle_conversion_from_format_di; static PyObject *__pyx_n_s_I; static PyObject *__pyx_n_s_IGNORECASE; static PyObject *__pyx_kp_b_IJ; static PyObject *__pyx_kp_s_IJ; static PyObject *__pyx_kp_s_I_2; static PyObject *__pyx_n_s_IndexError; static PyObject *__pyx_kp_s_Invalid_type_for_timedelta_scala; static PyObject *__pyx_kp_b_KL; static PyObject *__pyx_kp_s_KL; static PyObject *__pyx_n_s_KeyError; static PyObject *__pyx_n_s_LC_TIME; static PyObject *__pyx_n_s_LC_date; static PyObject *__pyx_n_s_LC_date_time; static PyObject *__pyx_n_s_LC_time; static PyObject *__pyx_n_s_LocaleTime; static PyObject *__pyx_n_s_LocaleTime___calc_am_pm; static PyObject *__pyx_n_s_LocaleTime___calc_date_time; static PyObject *__pyx_n_s_LocaleTime___calc_month; static PyObject *__pyx_n_s_LocaleTime___calc_timezone; static PyObject *__pyx_n_s_LocaleTime___calc_weekday; static PyObject *__pyx_n_s_LocaleTime___init; static PyObject *__pyx_n_s_LocaleTime___pad; static PyObject *__pyx_n_s_LocaleTime__calc_am_pm; static PyObject *__pyx_n_s_LocaleTime__calc_date_time; static PyObject *__pyx_n_s_LocaleTime__calc_month; static PyObject *__pyx_n_s_LocaleTime__calc_timezone; static PyObject *__pyx_n_s_LocaleTime__calc_weekday; static PyObject *__pyx_n_s_LocaleTime__pad; static PyObject *__pyx_n_s_LooseVersion; static PyObject *__pyx_n_s_M; static PyObject *__pyx_n_s_M8; static PyObject *__pyx_kp_s_M8_ns; static PyObject *__pyx_kp_s_M_2; static PyObject *__pyx_n_s_NAN; static PyObject *__pyx_n_s_NAT; static PyObject *__pyx_kp_s_N_ot_A_T_ime_the_time_equivalen; static PyObject *__pyx_n_s_NaN; static PyObject *__pyx_n_s_NaT; static PyObject *__pyx_n_s_NaTType; static PyObject *__pyx_n_s_NaTType___hash; static PyObject *__pyx_n_s_NaTType___new; static PyObject *__pyx_n_s_NaTType___repr; static PyObject *__pyx_n_s_NaTType___str; static PyObject *__pyx_n_s_NaTType_toordinal; static PyObject *__pyx_n_s_NaTType_weekday; static PyObject *__pyx_n_s_NameError; static PyObject *__pyx_n_s_NonExistentTimeError; static PyObject *__pyx_kp_u_Non_native_byte_order_not_suppor; static PyObject *__pyx_n_s_None; static PyObject *__pyx_kp_s_NumPy_1_6_1_business_freq_not_su; static PyObject *__pyx_n_s_OutOfBoundsDatetime; static PyObject *__pyx_kp_s_Out_of_bounds_nanosecond_timesta; static PyObject *__pyx_n_s_P; static PyObject *__pyx_kp_s_P_H_2_0_3_0_1_d_d; static PyObject *__pyx_kp_s_P_I_1_0_2_0_1_9_1_9; static PyObject *__pyx_kp_s_P_M_0_5_d_d; static PyObject *__pyx_kp_s_P_S_6_0_1_0_5_d_d; static PyObject *__pyx_kp_s_P_U_5_0_3_0_4_d_d; static PyObject *__pyx_kp_s_P_Y_d_d_d_d; static PyObject *__pyx_kp_s_P_d_3_0_1_1_2_d_0_1_9_1_9_1_9; static PyObject *__pyx_kp_s_P_f_0_9_1_6; static PyObject *__pyx_kp_s_P_j_36_0_6_3_0_5_d_1_2_d_d_0_1; static PyObject *__pyx_kp_s_P_m_1_0_2_0_1_9_1_9; static PyObject *__pyx_kp_s_P_s_s; static PyObject *__pyx_kp_s_P_w_0_6; static PyObject *__pyx_kp_s_P_y_d_d; static PyObject *__pyx_n_s_Period; static PyObject *__pyx_n_s_RuntimeError; static PyObject *__pyx_n_s_S; static PyObject *__pyx_kp_s_S_2; static PyObject *__pyx_n_s_S_RESO; static PyObject *__pyx_kp_s_Stores_and_handles_locale_specif; static PyObject *__pyx_n_s_T; static PyObject *__pyx_n_s_T_RESO; static PyObject *__pyx_kp_s_There_are_i_dst_switches_when_th; static PyObject *__pyx_n_s_TimeRE; static PyObject *__pyx_n_s_TimeRE___init; static PyObject *__pyx_n_s_TimeRE___seqToRE; static PyObject *__pyx_n_s_TimeRE__seqToRE; static PyObject *__pyx_n_s_TimeRE_cache; static PyObject *__pyx_n_s_TimeRE_compile; static PyObject *__pyx_n_s_TimeRE_pattern; static PyObject *__pyx_kp_s_TimeStamp_is_the_pandas_equivale; static PyObject *__pyx_n_s_Timestamp; static PyObject *__pyx_n_s_Timestamp___new; static PyObject *__pyx_n_s_Timestamp___reduce; static PyObject *__pyx_n_s_Timestamp___repr; static PyObject *__pyx_n_s_Timestamp___setstate; static PyObject *__pyx_n_s_Timestamp__date_repr; static PyObject *__pyx_n_s_Timestamp__has_time_component; static PyObject *__pyx_n_s_Timestamp__repr_base; static PyObject *__pyx_n_s_Timestamp__time_repr; static PyObject *__pyx_n_s_Timestamp_asm8; static PyObject *__pyx_n_s_Timestamp_dayofweek; static PyObject *__pyx_n_s_Timestamp_dayofyear; static PyObject *__pyx_n_s_Timestamp_freq; static PyObject *__pyx_n_s_Timestamp_freqstr; static PyObject *__pyx_n_s_Timestamp_fromordinal; static PyObject *__pyx_n_s_Timestamp_isoformat; static PyObject *__pyx_n_s_Timestamp_now; static PyObject *__pyx_n_s_Timestamp_quarter; static PyObject *__pyx_n_s_Timestamp_replace; static PyObject *__pyx_kp_s_Timestamp_s_tz_s; static PyObject *__pyx_n_s_Timestamp_to_period; static PyObject *__pyx_n_s_Timestamp_to_pydatetime; static PyObject *__pyx_n_s_Timestamp_today; static PyObject *__pyx_n_s_Timestamp_tz; static PyObject *__pyx_n_s_Timestamp_tz_convert; static PyObject *__pyx_n_s_Timestamp_tz_localize; static PyObject *__pyx_n_s_Timestamp_utcnow; static PyObject *__pyx_n_s_Timestamp_week; static PyObject *__pyx_n_s_TypeError; static PyObject *__pyx_kp_s_Tz_aware_datetime_datetime_canno; static PyObject *__pyx_n_s_U; static PyObject *__pyx_n_s_US_RESO; static PyObject *__pyx_n_s_UTC; static PyObject *__pyx_kp_s_U_2; static PyObject *__pyx_n_s_U_W; static PyObject *__pyx_kp_s_Unable_to_convert_to_desired_fre; static PyObject *__pyx_kp_s_Unable_to_get_quarter_and_year; static PyObject *__pyx_kp_s_Unable_to_parse_s; static PyObject *__pyx_kp_s_Unknown_freq_d; static PyObject *__pyx_kp_s_Unrecognized_period_code_d; static PyObject *__pyx_kp_s_Unrecognized_type_s; static PyObject *__pyx_kp_s_Unrecognized_value_type_s; static PyObject *__pyx_n_s_ValueError; static PyObject *__pyx_n_s_W; static PyObject *__pyx_kp_s_W_2; static PyObject *__pyx_kp_s_Warning_discarding_nonzero_nanos; static PyObject *__pyx_kp_s_X; static PyObject *__pyx_n_s_X_2; static PyObject *__pyx_n_s_Y; static PyObject *__pyx_kp_b_Y_2; static PyObject *__pyx_kp_s_Y_2; static PyObject *__pyx_kp_b_Y_m; static PyObject *__pyx_kp_b_Y_m_d; static PyObject *__pyx_kp_b_Y_m_d_H_00; static PyObject *__pyx_kp_b_Y_m_d_H_M; static PyObject *__pyx_kp_b_Y_m_d_H_M_S; static PyObject *__pyx_kp_b_Y_m_d_H_M_S_l; static PyObject *__pyx_kp_b_Y_m_d_H_M_S_n; static PyObject *__pyx_kp_b_Y_m_d_H_M_S_u; static PyObject *__pyx_kp_s_Z; static PyObject *__pyx_n_s_Z_2; static PyObject *__pyx_kp_s_Z_3; static PyObject *__pyx_kp_s_Z_tz_s; static PyObject *__pyx_kp_s__13; static PyObject *__pyx_kp_s__34; static PyObject *__pyx_kp_s__35; static PyObject *__pyx_kp_s__36; static PyObject *__pyx_kp_s__67; static PyObject *__pyx_kp_s__90; static PyObject *__pyx_kp_s__91; static PyObject *__pyx_n_s_a; static PyObject *__pyx_kp_s_a_2; static PyObject *__pyx_n_s_a_idx; static PyObject *__pyx_n_s_a_month; static PyObject *__pyx_n_s_a_weekday; static PyObject *__pyx_n_s_abs; static PyObject *__pyx_n_s_add; static PyObject *__pyx_n_s_all; static PyObject *__pyx_n_s_all_2; static PyObject *__pyx_n_s_allocate_lock; static PyObject *__pyx_n_s_am_pm; static PyObject *__pyx_n_s_ampm; static PyObject *__pyx_n_s_append; static PyObject *__pyx_n_s_apply; static PyObject *__pyx_n_s_apply_offset; static PyObject *__pyx_n_s_args; static PyObject *__pyx_n_s_arr; static PyObject *__pyx_n_s_array; static PyObject *__pyx_n_s_array_split; static PyObject *__pyx_n_s_array_strptime; static PyObject *__pyx_n_s_array_to_datetime; static PyObject *__pyx_n_s_array_to_timedelta64; static PyObject *__pyx_n_s_asm8; static PyObject *__pyx_n_s_astimezone; static PyObject *__pyx_n_s_astype; static PyObject *__pyx_n_s_b; static PyObject *__pyx_kp_s_b_2; static PyObject *__pyx_n_s_b_idx; static PyObject *__pyx_n_s_bad_directive; static PyObject *__pyx_kp_s_bad_month_number_0_must_be_1_12; static PyObject *__pyx_n_s_base; static PyObject *__pyx_n_s_base1; static PyObject *__pyx_n_s_base2; static PyObject *__pyx_n_s_basestring; static PyObject *__pyx_n_s_both_eq; static PyObject *__pyx_n_s_both_nat; static PyObject *__pyx_n_s_boxed; static PyObject *__pyx_n_s_build_field_sarray; static PyObject *__pyx_kp_s_c; static PyObject *__pyx_n_s_c_2; static PyObject *__pyx_n_s_cache_lock; static PyObject *__pyx_n_s_calc_am_pm; static PyObject *__pyx_n_s_calc_date_time; static PyObject *__pyx_n_s_calc_julian_from_U_or_W; static PyObject *__pyx_n_s_calc_month; static PyObject *__pyx_n_s_calc_timezone; static PyObject *__pyx_n_s_calc_weekday; static PyObject *__pyx_n_s_calendar; static PyObject *__pyx_n_s_cast_to_nanoseconds; static PyObject *__pyx_n_s_clear; static PyObject *__pyx_n_s_close; static PyObject *__pyx_n_s_cls; static PyObject *__pyx_n_s_code; static PyObject *__pyx_n_s_coerce; static PyObject *__pyx_n_s_combine; static PyObject *__pyx_n_s_compat_NaT; static PyObject *__pyx_n_s_compile; static PyObject *__pyx_n_s_convert_to_timedelta; static PyObject *__pyx_n_s_count; static PyObject *__pyx_n_s_current_format; static PyObject *__pyx_n_s_d; static PyObject *__pyx_kp_s_d_2; static PyObject *__pyx_kp_s_d_2d_2d; static PyObject *__pyx_kp_s_d_2d_2d_2d_2d_2d; static PyObject *__pyx_n_s_date; static PyObject *__pyx_n_s_date_normalize; static PyObject *__pyx_n_s_date_repr; static PyObject *__pyx_n_s_date_string; static PyObject *__pyx_n_s_date_time; static PyObject *__pyx_n_s_dates_normalized; static PyObject *__pyx_n_s_datetime; static PyObject *__pyx_n_s_datetime64; static PyObject *__pyx_n_s_datetime_date; static PyObject *__pyx_n_s_datetime_result; static PyObject *__pyx_n_s_datetime_time; static PyObject *__pyx_n_s_datetime_to_datetime64; static PyObject *__pyx_n_s_dateutil_tz; static PyObject *__pyx_n_s_day; static PyObject *__pyx_n_s_day_abbr; static PyObject *__pyx_n_s_day_name; static PyObject *__pyx_n_s_day_of_week; static PyObject *__pyx_n_s_dayfirst; static PyObject *__pyx_n_s_daylight; static PyObject *__pyx_n_s_dayofweek; static PyObject *__pyx_n_s_dayofyear; static PyObject *__pyx_n_s_days; static PyObject *__pyx_n_s_days_to_week; static PyObject *__pyx_n_s_decode; static PyObject *__pyx_n_s_delta; static PyObject *__pyx_n_s_delta_to_nanoseconds; static PyObject *__pyx_n_s_deltas; static PyObject *__pyx_n_s_diff; static PyObject *__pyx_n_s_directive; static PyObject *__pyx_n_s_directive_index; static PyObject *__pyx_n_s_distutils_version; static PyObject *__pyx_n_s_doc; static PyObject *__pyx_n_s_does_string_look_like_datetime; static PyObject *__pyx_n_s_dow; static PyObject *__pyx_n_s_doy; static PyObject *__pyx_n_s_dst_hours; static PyObject *__pyx_n_s_dt; static PyObject *__pyx_n_s_dt64arr_to_periodarr; static PyObject *__pyx_n_s_dtarr; static PyObject *__pyx_n_s_dtindex; static PyObject *__pyx_n_s_dts; static PyObject *__pyx_n_s_dtype; static PyObject *__pyx_n_s_du_utc; static PyObject *__pyx_n_s_dummy_thread; static PyObject *__pyx_n_s_dummy_thread_2; static PyObject *__pyx_n_s_empty; static PyObject *__pyx_n_s_encode; static PyObject *__pyx_n_s_end; static PyObject *__pyx_n_s_enter; static PyObject *__pyx_n_s_enumerate; static PyObject *__pyx_n_s_err; static PyObject *__pyx_n_s_escape; static PyObject *__pyx_n_s_exit; static PyObject *__pyx_n_s_extract_ordinals; static PyObject *__pyx_n_s_f; static PyObject *__pyx_kp_b_f_2; static PyObject *__pyx_n_s_f_month; static PyObject *__pyx_n_s_f_weekday; static PyObject *__pyx_n_s_fget; static PyObject *__pyx_n_s_field; static PyObject *__pyx_n_s_fields; static PyObject *__pyx_n_s_file; static PyObject *__pyx_n_s_fill; static PyObject *__pyx_n_s_finfo; static PyObject *__pyx_n_s_first_weekday; static PyObject *__pyx_n_s_flat; static PyObject *__pyx_n_s_fmt; static PyObject *__pyx_n_s_format; static PyObject *__pyx_n_s_format_regex; static PyObject *__pyx_n_s_found; static PyObject *__pyx_n_s_found_dict; static PyObject *__pyx_n_s_found_zone; static PyObject *__pyx_n_s_frac; static PyObject *__pyx_n_s_fraction; static PyObject *__pyx_n_s_freq; static PyObject *__pyx_n_s_freq1; static PyObject *__pyx_n_s_freq2; static PyObject *__pyx_n_s_freq_group; static PyObject *__pyx_n_s_freqstr; static PyObject *__pyx_n_s_fromordinal; static PyObject *__pyx_n_s_front; static PyObject *__pyx_n_s_func; static PyObject *__pyx_n_s_genexpr; static PyObject *__pyx_n_s_get; static PyObject *__pyx_n_s_get_date_field; static PyObject *__pyx_n_s_get_deltas; static PyObject *__pyx_n_s_get_field; static PyObject *__pyx_n_s_get_period_field; static PyObject *__pyx_n_s_get_period_field_arr; static PyObject *__pyx_n_s_get_time_micros; static PyObject *__pyx_n_s_get_timezone; static PyObject *__pyx_n_s_get_transitions; static PyObject *__pyx_n_s_getitem; static PyObject *__pyx_n_s_getlang; static PyObject *__pyx_n_s_getlocale; static PyObject *__pyx_n_s_gmt; static PyObject *__pyx_n_s_group_key; static PyObject *__pyx_n_s_groupdict; static PyObject *__pyx_n_s_grp; static PyObject *__pyx_n_s_h; static PyObject *__pyx_n_s_has_saving; static PyObject *__pyx_n_s_has_time_component; static PyObject *__pyx_n_s_hash; static PyObject *__pyx_n_s_have_pytz; static PyObject *__pyx_kp_s_home_yoh_deb_gits_pkg_exppsy_pa; static PyObject *__pyx_n_s_hour; static PyObject *__pyx_n_s_hours; static PyObject *__pyx_n_s_hstack; static PyObject *__pyx_n_s_i; static PyObject *__pyx_n_s_i4; static PyObject *__pyx_n_s_i8; static PyObject *__pyx_n_s_i8_to_pydt; static PyObject *__pyx_n_s_iNaT; static PyObject *__pyx_n_s_idx; static PyObject *__pyx_n_s_idx_shifted; static PyObject *__pyx_n_s_ignore; static PyObject *__pyx_n_s_import; static PyObject *__pyx_n_s_index; static PyObject *__pyx_kp_s_index_out_of_bounds; static PyObject *__pyx_n_s_inf; static PyObject *__pyx_n_s_infer_dst; static PyObject *__pyx_n_s_inferred_tz; static PyObject *__pyx_n_s_init; static PyObject *__pyx_n_s_insert; static PyObject *__pyx_n_s_int32; static PyObject *__pyx_n_s_int64; static PyObject *__pyx_n_s_ints_to_pydatetime; static PyObject *__pyx_n_s_iresult; static PyObject *__pyx_n_s_is_fixed_offset; static PyObject *__pyx_n_s_is_timestamp_array; static PyObject *__pyx_n_s_is_tzlocal; static PyObject *__pyx_n_s_isleap; static PyObject *__pyx_n_s_isleap_prev; static PyObject *__pyx_n_s_isleapyear; static PyObject *__pyx_n_s_isoformat; static PyObject *__pyx_n_s_item; static PyObject *__pyx_n_s_iterkeys; static PyObject *__pyx_n_s_ivalue; static PyObject *__pyx_n_s_ivalues; static PyObject *__pyx_n_s_j; static PyObject *__pyx_kp_s_j_2; static PyObject *__pyx_n_s_join; static PyObject *__pyx_n_s_julian; static PyObject *__pyx_n_s_k; static PyObject *__pyx_n_s_key; static PyObject *__pyx_n_s_kwargs; static PyObject *__pyx_n_s_kwds; static PyObject *__pyx_n_s_l; static PyObject *__pyx_kp_b_l_2; static PyObject *__pyx_n_s_lambda; static PyObject *__pyx_n_s_lang; static PyObject *__pyx_n_s_left; static PyObject *__pyx_n_s_len; static PyObject *__pyx_n_s_loc; static PyObject *__pyx_n_s_locale; static PyObject *__pyx_kp_s_locale_changed_during_initializa; static PyObject *__pyx_n_s_locale_time; static PyObject *__pyx_n_s_localize; static PyObject *__pyx_n_s_logical_and; static PyObject *__pyx_n_s_long; static PyObject *__pyx_n_s_lower; static PyObject *__pyx_n_s_m; static PyObject *__pyx_kp_s_m8_0; static PyObject *__pyx_kp_s_m8_ns; static PyObject *__pyx_kp_s_m_2; static PyObject *__pyx_n_s_main; static PyObject *__pyx_n_s_match; static PyObject *__pyx_n_s_max; static PyObject *__pyx_n_s_maximum; static PyObject *__pyx_n_s_metaclass; static PyObject *__pyx_n_s_micros; static PyObject *__pyx_n_s_microsecond; static PyObject *__pyx_n_s_microseconds; static PyObject *__pyx_n_s_min; static PyObject *__pyx_n_s_minute; static PyObject *__pyx_n_s_minutes; static PyObject *__pyx_kp_s_mixed_datetimes_and_integers_in; static PyObject *__pyx_n_s_mo_off; static PyObject *__pyx_n_s_module; static PyObject *__pyx_n_s_month; static PyObject *__pyx_n_s_month_abbr; static PyObject *__pyx_n_s_month_name; static PyObject *__pyx_n_s_month_offset; static PyObject *__pyx_n_s_monthrange; static PyObject *__pyx_n_s_months; static PyObject *__pyx_n_s_ms; static PyObject *__pyx_n_s_mus; static PyObject *__pyx_n_s_n; static PyObject *__pyx_kp_b_n_2; static PyObject *__pyx_n_s_name; static PyObject *__pyx_n_s_nan; static PyObject *__pyx_n_s_nanos; static PyObject *__pyx_n_s_nanosecond; static PyObject *__pyx_n_s_nat; static PyObject *__pyx_n_s_nat_strings; 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_ndim; static PyObject *__pyx_n_s_new; static PyObject *__pyx_n_s_new_2; static PyObject *__pyx_n_s_new_values; static PyObject *__pyx_n_s_no_saving; static PyObject *__pyx_n_s_nonzero; static PyObject *__pyx_n_s_normalize; static PyObject *__pyx_n_s_not_datelike_strings; static PyObject *__pyx_n_s_now; static PyObject *__pyx_n_s_np; static PyObject *__pyx_n_s_np_NaT; static PyObject *__pyx_n_s_np_version; static PyObject *__pyx_n_s_np_version_under1p6; static PyObject *__pyx_n_s_np_version_under1p7; static PyObject *__pyx_n_s_ns; static PyObject *__pyx_n_s_ntrans; static PyObject *__pyx_n_s_num; static PyObject *__pyx_n_s_numpy; static PyObject *__pyx_n_s_obj; static PyObject *__pyx_n_s_object; static PyObject *__pyx_n_s_object_state; static PyObject *__pyx_n_s_offset; static PyObject *__pyx_n_s_old; static PyObject *__pyx_n_s_one_diff; static PyObject *__pyx_n_s_ordinal; static PyObject *__pyx_n_s_ordinals; static PyObject *__pyx_n_s_oresult; static PyObject *__pyx_n_s_out; static PyObject *__pyx_n_s_p; static PyObject *__pyx_kp_s_p_2; static PyObject *__pyx_n_s_pad; static PyObject *__pyx_n_s_pandas_compat; static PyObject *__pyx_n_s_pandas_tseries_period; static PyObject *__pyx_n_s_pandas_tslib; static PyObject *__pyx_n_s_parse_code; static PyObject *__pyx_n_s_parse_code_table; static PyObject *__pyx_n_s_parse_date; static PyObject *__pyx_n_s_parse_datetime_string; static PyObject *__pyx_n_s_pattern; static PyObject *__pyx_n_s_period_asfreq_arr; static PyObject *__pyx_n_s_period_format; static PyObject *__pyx_n_s_period_ordinal; static PyObject *__pyx_n_s_periodarr; static PyObject *__pyx_n_s_periodarr_to_dt64arr; static PyObject *__pyx_n_s_pos; static PyObject *__pyx_n_s_prepare; static PyObject *__pyx_n_s_print; static PyObject *__pyx_n_s_processed_format; static PyObject *__pyx_n_s_prop; static PyObject *__pyx_n_s_property; static PyObject *__pyx_n_s_ps; static PyObject *__pyx_n_s_pydt; static PyObject *__pyx_n_s_pydt_to_i8; static PyObject *__pyx_n_s_pytz; static PyObject *__pyx_n_s_pyx_getbuffer; static PyObject *__pyx_n_s_pyx_releasebuffer; static PyObject *__pyx_n_s_pyx_vtable; static PyObject *__pyx_n_s_q; static PyObject *__pyx_kp_b_q_2; static PyObject *__pyx_n_s_qualname; static PyObject *__pyx_n_s_quarter; static PyObject *__pyx_n_s_raise; static PyObject *__pyx_n_s_range; static PyObject *__pyx_n_s_ravel; static PyObject *__pyx_n_s_re; static PyObject *__pyx_n_s_re_compile; static PyObject *__pyx_n_s_re_escape; static PyObject *__pyx_n_s_reduce; static PyObject *__pyx_n_s_regex; static PyObject *__pyx_n_s_regex_cache; static PyObject *__pyx_n_s_regex_chars; static PyObject *__pyx_n_s_relation; static PyObject *__pyx_n_s_replace; static PyObject *__pyx_n_s_replacement_pairs; static PyObject *__pyx_n_s_repr; static PyObject *__pyx_n_s_repr_base; static PyObject *__pyx_n_s_repr_timedelta64; static PyObject *__pyx_n_s_result; static PyObject *__pyx_n_s_result_a; static PyObject *__pyx_n_s_result_b; static PyObject *__pyx_n_s_ret; static PyObject *__pyx_n_s_reverse; static PyObject *__pyx_n_s_right; static PyObject *__pyx_n_s_round; static PyObject *__pyx_kp_s_s; static PyObject *__pyx_kp_s_s_02d_02d_s; static PyObject *__pyx_n_s_s_2; static PyObject *__pyx_kp_s_s_3; static PyObject *__pyx_kp_s_s_4; static PyObject *__pyx_kp_s_s_d_days; static PyObject *__pyx_kp_s_s_d_days_02d_02d_s; static PyObject *__pyx_kp_s_s_is_a_bad_directive_in_format; static PyObject *__pyx_kp_s_s_is_wrong_freq; static PyObject *__pyx_kp_s_s_s; static PyObject *__pyx_kp_s_s_s_2; static PyObject *__pyx_kp_s_s_s_3; static PyObject *__pyx_kp_s_s_s_s; static PyObject *__pyx_n_s_sa_dtype; static PyObject *__pyx_n_s_searchsorted; static PyObject *__pyx_n_s_second; static PyObject *__pyx_n_s_seconds; static PyObject *__pyx_n_s_seconds_pretty; static PyObject *__pyx_n_s_seen_datetime; static PyObject *__pyx_n_s_seen_integer; static PyObject *__pyx_n_s_self; static PyObject *__pyx_n_s_send; static PyObject *__pyx_n_s_sep; static PyObject *__pyx_n_s_seq; static PyObject *__pyx_n_s_seqToRE; static PyObject *__pyx_n_s_setitem; static PyObject *__pyx_n_s_setstate; static PyObject *__pyx_n_s_shape; static PyObject *__pyx_n_s_short; static PyObject *__pyx_n_s_short_version; static PyObject *__pyx_n_s_side; static PyObject *__pyx_n_s_sign; static PyObject *__pyx_n_s_sign_pretty; static PyObject *__pyx_n_s_size; static PyObject *__pyx_n_s_sort; static PyObject *__pyx_n_s_sorted; static PyObject *__pyx_n_s_sp; static PyObject *__pyx_n_s_squeeze; static PyObject *__pyx_n_s_stamp; static PyObject *__pyx_n_s_stamps; static PyObject *__pyx_n_s_startswith; static PyObject *__pyx_n_s_state; static PyObject *__pyx_n_s_str; static PyObject *__pyx_kp_s_stray_in_format_s; static PyObject *__pyx_n_s_strftime; static PyObject *__pyx_n_s_struct_time; static PyObject *__pyx_n_s_sub; static PyObject *__pyx_n_s_sub_2; static PyObject *__pyx_n_s_super; static PyObject *__pyx_n_s_switch_idx; static PyObject *__pyx_n_s_sys; static PyObject *__pyx_n_s_sz; static PyObject *__pyx_n_s_t; static PyObject *__pyx_n_s_table; static PyObject *__pyx_n_s_td; static PyObject *__pyx_n_s_tdata; static PyObject *__pyx_n_s_test; static PyObject *__pyx_n_s_thread; static PyObject *__pyx_n_s_thread_2; static PyObject *__pyx_n_s_thread_allocate_lock; static PyObject *__pyx_n_s_throw; static PyObject *__pyx_n_s_time; static PyObject *__pyx_kp_s_time_data_r_does_not_match_forma; static PyObject *__pyx_n_s_time_repr; static PyObject *__pyx_n_s_time_tuple; static PyObject *__pyx_n_s_timedelta; static PyObject *__pyx_n_s_timedelta64; static PyObject *__pyx_kp_s_timedelta64_ns; static PyObject *__pyx_n_s_timezone; static PyObject *__pyx_n_s_to_convert; static PyObject *__pyx_n_s_to_datetime; static PyObject *__pyx_n_s_to_period; static PyObject *__pyx_n_s_to_pydatetime; static PyObject *__pyx_n_s_today; static PyObject *__pyx_n_s_toordinal; static PyObject *__pyx_n_s_tot_seconds; static PyObject *__pyx_n_s_total_seconds; static PyObject *__pyx_n_s_trans; static PyObject *__pyx_n_s_trans_cache; static PyObject *__pyx_n_s_trans_grp; static PyObject *__pyx_n_s_trans_idx; static PyObject *__pyx_n_s_trans_len; static PyObject *__pyx_n_s_transition_info; static PyObject *__pyx_n_s_ts; static PyObject *__pyx_n_s_ts_2; static PyObject *__pyx_n_s_ts_base; static PyObject *__pyx_n_s_ts_input; static PyObject *__pyx_n_s_tso; static PyObject *__pyx_n_s_tz; static PyObject *__pyx_n_s_tz1; static PyObject *__pyx_n_s_tz2; static PyObject *__pyx_n_s_tz_convert; static PyObject *__pyx_n_s_tz_convert_single; static PyObject *__pyx_n_s_tz_localize; static PyObject *__pyx_n_s_tz_localize_to_utc; static PyObject *__pyx_kp_s_tz_s; static PyObject *__pyx_n_s_tz_values; static PyObject *__pyx_n_s_tzinfo; static PyObject *__pyx_n_s_tzinfos; static PyObject *__pyx_n_s_tzlocal; static PyObject *__pyx_n_s_tzname; static PyObject *__pyx_n_s_tzset; static PyObject *__pyx_n_s_tzutc; static PyObject *__pyx_n_s_u; static PyObject *__pyx_kp_b_u_2; static PyObject *__pyx_kp_s_unconverted_data_remains_s; static PyObject *__pyx_n_s_unique_deltas; static PyObject *__pyx_n_s_uniques; static PyObject *__pyx_n_s_unit; static PyObject *__pyx_kp_u_unknown_dtype_code_in_numpy_pxd; static PyObject *__pyx_n_s_us; static PyObject *__pyx_n_s_utc; static PyObject *__pyx_n_s_utc_convert; static PyObject *__pyx_n_s_utc_date; static PyObject *__pyx_n_s_utc_dates; static PyObject *__pyx_n_s_utc_offset_cache; static PyObject *__pyx_n_s_utc_transition_times; static PyObject *__pyx_n_s_utcnow; static PyObject *__pyx_n_s_utcoffset; static PyObject *__pyx_n_s_utcoffset_2; static PyObject *__pyx_kp_s_utf_8; static PyObject *__pyx_n_s_v; static PyObject *__pyx_n_s_val; static PyObject *__pyx_n_s_vals; static PyObject *__pyx_n_s_value; static PyObject *__pyx_n_s_values; static PyObject *__pyx_n_s_version; static PyObject *__pyx_n_s_version_info; static PyObject *__pyx_n_s_view; static PyObject *__pyx_n_s_w; static PyObject *__pyx_kp_s_w_2; static PyObject *__pyx_n_s_warn; static PyObject *__pyx_n_s_week; static PyObject *__pyx_n_s_week_0_length; static PyObject *__pyx_n_s_week_of_year; static PyObject *__pyx_n_s_week_of_year_start; static PyObject *__pyx_n_s_week_starts_Mon; static PyObject *__pyx_n_s_weekday; static PyObject *__pyx_n_s_weekofyear; static PyObject *__pyx_n_s_where; static PyObject *__pyx_n_s_whitespace_replacement; static PyObject *__pyx_n_s_woy; static PyObject *__pyx_kp_s_x; static PyObject *__pyx_n_s_x_2; static PyObject *__pyx_n_s_y; static PyObject *__pyx_kp_s_y_2; static PyObject *__pyx_n_s_year; static PyObject *__pyx_n_s_year2000; static PyObject *__pyx_n_s_years; static PyObject *__pyx_kp_s_z; static PyObject *__pyx_n_s_zero_time; static PyObject *__pyx_n_s_zone; static PyObject *__pyx_float_1e6; static PyObject *__pyx_float_1e9; static PyObject *__pyx_float_1000_0; static PyObject *__pyx_int_0; static PyObject *__pyx_int_1; static PyObject *__pyx_int_2; static PyObject *__pyx_int_3; static PyObject *__pyx_int_4; static PyObject *__pyx_int_5; static PyObject *__pyx_int_6; static PyObject *__pyx_int_7; static PyObject *__pyx_int_8; static PyObject *__pyx_int_9; static PyObject *__pyx_int_10; static PyObject *__pyx_int_11; static PyObject *__pyx_int_12; static PyObject *__pyx_int_13; static PyObject *__pyx_int_14; static PyObject *__pyx_int_15; static PyObject *__pyx_int_16; static PyObject *__pyx_int_17; static PyObject *__pyx_int_18; static PyObject *__pyx_int_22; static PyObject *__pyx_int_24; static PyObject *__pyx_int_31; static PyObject *__pyx_int_44; static PyObject *__pyx_int_55; static PyObject *__pyx_int_59; static PyObject *__pyx_int_60; static PyObject *__pyx_int_76; static PyObject *__pyx_int_90; static PyObject *__pyx_int_91; static PyObject *__pyx_int_120; static PyObject *__pyx_int_121; static PyObject *__pyx_int_151; static PyObject *__pyx_int_152; static PyObject *__pyx_int_181; static PyObject *__pyx_int_182; static PyObject *__pyx_int_212; static PyObject *__pyx_int_213; static PyObject *__pyx_int_243; static PyObject *__pyx_int_244; static PyObject *__pyx_int_273; static PyObject *__pyx_int_274; static PyObject *__pyx_int_304; static PyObject *__pyx_int_305; static PyObject *__pyx_int_334; static PyObject *__pyx_int_335; static PyObject *__pyx_int_365; static PyObject *__pyx_int_366; static PyObject *__pyx_int_1000; static PyObject *__pyx_int_1999; static PyObject *__pyx_int_2000; static PyObject *__pyx_int_3600; static PyObject *__pyx_int_6000; static PyObject *__pyx_int_86400; static PyObject *__pyx_int_1000000; static PyObject *__pyx_int_1000000000; static PyObject *__pyx_int_neg_1; static PyObject *__pyx_int_neg_6; static PyObject *__pyx_int_1L; static PyObject *__pyx_int_1000L; static PyObject *__pyx_int_1000000L; static PyObject *__pyx_int_1000000000L; static PyObject *__pyx_int_86400000000000L; 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_slice__11; static PyObject *__pyx_slice__12; static PyObject *__pyx_slice__86; static PyObject *__pyx_slice__87; static PyObject *__pyx_tuple__10; 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__25; static PyObject *__pyx_tuple__26; static PyObject *__pyx_tuple__27; static PyObject *__pyx_tuple__28; static PyObject *__pyx_tuple__29; static PyObject *__pyx_tuple__30; static PyObject *__pyx_tuple__31; static PyObject *__pyx_tuple__32; static PyObject *__pyx_tuple__33; static PyObject *__pyx_tuple__37; static PyObject *__pyx_tuple__38; static PyObject *__pyx_tuple__39; static PyObject *__pyx_tuple__40; static PyObject *__pyx_tuple__41; static PyObject *__pyx_tuple__42; static PyObject *__pyx_tuple__43; static PyObject *__pyx_tuple__44; static PyObject *__pyx_tuple__45; static PyObject *__pyx_tuple__46; static PyObject *__pyx_tuple__47; static PyObject *__pyx_tuple__48; static PyObject *__pyx_tuple__49; static PyObject *__pyx_tuple__50; static PyObject *__pyx_tuple__51; static PyObject *__pyx_tuple__52; static PyObject *__pyx_tuple__53; static PyObject *__pyx_tuple__54; static PyObject *__pyx_tuple__55; static PyObject *__pyx_tuple__56; static PyObject *__pyx_tuple__57; static PyObject *__pyx_tuple__58; static PyObject *__pyx_tuple__59; static PyObject *__pyx_tuple__60; static PyObject *__pyx_tuple__61; static PyObject *__pyx_tuple__62; static PyObject *__pyx_tuple__63; static PyObject *__pyx_tuple__64; static PyObject *__pyx_tuple__65; static PyObject *__pyx_tuple__66; static PyObject *__pyx_tuple__68; static PyObject *__pyx_tuple__69; static PyObject *__pyx_tuple__70; static PyObject *__pyx_tuple__71; static PyObject *__pyx_tuple__72; static PyObject *__pyx_tuple__73; static PyObject *__pyx_tuple__74; static PyObject *__pyx_tuple__75; static PyObject *__pyx_tuple__76; static PyObject *__pyx_tuple__77; static PyObject *__pyx_tuple__78; static PyObject *__pyx_tuple__79; static PyObject *__pyx_tuple__80; static PyObject *__pyx_tuple__81; static PyObject *__pyx_tuple__82; static PyObject *__pyx_tuple__83; static PyObject *__pyx_tuple__84; static PyObject *__pyx_tuple__85; static PyObject *__pyx_tuple__88; static PyObject *__pyx_tuple__89; static PyObject *__pyx_tuple__92; static PyObject *__pyx_tuple__93; static PyObject *__pyx_tuple__94; static PyObject *__pyx_tuple__95; static PyObject *__pyx_tuple__96; static PyObject *__pyx_tuple__97; static PyObject *__pyx_tuple__98; static PyObject *__pyx_tuple__99; static PyObject *__pyx_tuple__100; static PyObject *__pyx_tuple__101; static PyObject *__pyx_tuple__102; static PyObject *__pyx_tuple__103; static PyObject *__pyx_tuple__104; static PyObject *__pyx_tuple__105; static PyObject *__pyx_tuple__107; static PyObject *__pyx_tuple__109; static PyObject *__pyx_tuple__111; static PyObject *__pyx_tuple__112; static PyObject *__pyx_tuple__114; static PyObject *__pyx_tuple__115; static PyObject *__pyx_tuple__117; static PyObject *__pyx_tuple__118; static PyObject *__pyx_tuple__120; static PyObject *__pyx_tuple__122; static PyObject *__pyx_tuple__124; static PyObject *__pyx_tuple__125; static PyObject *__pyx_tuple__127; static PyObject *__pyx_tuple__129; static PyObject *__pyx_tuple__131; static PyObject *__pyx_tuple__133; static PyObject *__pyx_tuple__135; static PyObject *__pyx_tuple__137; static PyObject *__pyx_tuple__139; static PyObject *__pyx_tuple__141; static PyObject *__pyx_tuple__143; static PyObject *__pyx_tuple__144; static PyObject *__pyx_tuple__146; static PyObject *__pyx_tuple__148; static PyObject *__pyx_tuple__150; static PyObject *__pyx_tuple__152; static PyObject *__pyx_tuple__154; static PyObject *__pyx_tuple__156; static PyObject *__pyx_tuple__158; static PyObject *__pyx_tuple__160; static PyObject *__pyx_tuple__162; static PyObject *__pyx_tuple__164; static PyObject *__pyx_tuple__165; static PyObject *__pyx_tuple__167; static PyObject *__pyx_tuple__168; static PyObject *__pyx_tuple__170; static PyObject *__pyx_tuple__172; static PyObject *__pyx_tuple__174; static PyObject *__pyx_tuple__176; static PyObject *__pyx_tuple__178; static PyObject *__pyx_tuple__180; static PyObject *__pyx_tuple__182; static PyObject *__pyx_tuple__184; static PyObject *__pyx_tuple__186; static PyObject *__pyx_tuple__188; static PyObject *__pyx_tuple__190; static PyObject *__pyx_tuple__192; static PyObject *__pyx_tuple__194; static PyObject *__pyx_tuple__196; static PyObject *__pyx_tuple__198; static PyObject *__pyx_tuple__200; static PyObject *__pyx_tuple__202; static PyObject *__pyx_tuple__204; static PyObject *__pyx_tuple__206; static PyObject *__pyx_tuple__208; static PyObject *__pyx_tuple__210; static PyObject *__pyx_tuple__212; static PyObject *__pyx_tuple__214; static PyObject *__pyx_tuple__216; static PyObject *__pyx_tuple__218; static PyObject *__pyx_tuple__220; static PyObject *__pyx_tuple__222; static PyObject *__pyx_tuple__224; static PyObject *__pyx_tuple__226; static PyObject *__pyx_tuple__228; static PyObject *__pyx_tuple__230; static PyObject *__pyx_tuple__232; static PyObject *__pyx_tuple__234; static PyObject *__pyx_tuple__236; static PyObject *__pyx_tuple__238; static PyObject *__pyx_tuple__240; static PyObject *__pyx_tuple__242; static PyObject *__pyx_tuple__244; static PyObject *__pyx_tuple__246; static PyObject *__pyx_tuple__248; static PyObject *__pyx_tuple__250; static PyObject *__pyx_tuple__251; static PyObject *__pyx_tuple__252; static PyObject *__pyx_tuple__253; static PyObject *__pyx_tuple__254; static PyObject *__pyx_tuple__255; static PyObject *__pyx_tuple__256; static PyObject *__pyx_tuple__258; static PyObject *__pyx_tuple__260; static PyObject *__pyx_tuple__263; static PyObject *__pyx_tuple__265; static PyObject *__pyx_tuple__267; static PyObject *__pyx_tuple__269; static PyObject *__pyx_tuple__271; static PyObject *__pyx_tuple__273; static PyObject *__pyx_tuple__275; static PyObject *__pyx_tuple__277; static PyObject *__pyx_tuple__279; static PyObject *__pyx_tuple__280; static PyObject *__pyx_tuple__282; static PyObject *__pyx_tuple__284; static PyObject *__pyx_tuple__286; static PyObject *__pyx_codeobj__106; static PyObject *__pyx_codeobj__108; static PyObject *__pyx_codeobj__110; static PyObject *__pyx_codeobj__113; static PyObject *__pyx_codeobj__116; static PyObject *__pyx_codeobj__119; static PyObject *__pyx_codeobj__121; static PyObject *__pyx_codeobj__123; static PyObject *__pyx_codeobj__126; static PyObject *__pyx_codeobj__128; static PyObject *__pyx_codeobj__130; static PyObject *__pyx_codeobj__132; static PyObject *__pyx_codeobj__134; static PyObject *__pyx_codeobj__136; static PyObject *__pyx_codeobj__138; static PyObject *__pyx_codeobj__140; static PyObject *__pyx_codeobj__142; static PyObject *__pyx_codeobj__145; static PyObject *__pyx_codeobj__147; static PyObject *__pyx_codeobj__149; static PyObject *__pyx_codeobj__151; static PyObject *__pyx_codeobj__153; static PyObject *__pyx_codeobj__155; static PyObject *__pyx_codeobj__157; static PyObject *__pyx_codeobj__159; static PyObject *__pyx_codeobj__161; static PyObject *__pyx_codeobj__163; static PyObject *__pyx_codeobj__166; static PyObject *__pyx_codeobj__169; static PyObject *__pyx_codeobj__171; static PyObject *__pyx_codeobj__173; static PyObject *__pyx_codeobj__175; static PyObject *__pyx_codeobj__177; static PyObject *__pyx_codeobj__179; static PyObject *__pyx_codeobj__181; static PyObject *__pyx_codeobj__183; static PyObject *__pyx_codeobj__185; static PyObject *__pyx_codeobj__187; static PyObject *__pyx_codeobj__189; static PyObject *__pyx_codeobj__191; static PyObject *__pyx_codeobj__193; static PyObject *__pyx_codeobj__195; static PyObject *__pyx_codeobj__197; static PyObject *__pyx_codeobj__199; static PyObject *__pyx_codeobj__201; static PyObject *__pyx_codeobj__203; static PyObject *__pyx_codeobj__205; static PyObject *__pyx_codeobj__207; static PyObject *__pyx_codeobj__209; static PyObject *__pyx_codeobj__211; static PyObject *__pyx_codeobj__213; static PyObject *__pyx_codeobj__215; static PyObject *__pyx_codeobj__217; static PyObject *__pyx_codeobj__219; static PyObject *__pyx_codeobj__221; static PyObject *__pyx_codeobj__223; static PyObject *__pyx_codeobj__225; static PyObject *__pyx_codeobj__227; static PyObject *__pyx_codeobj__229; static PyObject *__pyx_codeobj__231; static PyObject *__pyx_codeobj__233; static PyObject *__pyx_codeobj__235; static PyObject *__pyx_codeobj__237; static PyObject *__pyx_codeobj__239; static PyObject *__pyx_codeobj__241; static PyObject *__pyx_codeobj__243; static PyObject *__pyx_codeobj__245; static PyObject *__pyx_codeobj__247; static PyObject *__pyx_codeobj__249; static PyObject *__pyx_codeobj__257; static PyObject *__pyx_codeobj__259; static PyObject *__pyx_codeobj__261; static PyObject *__pyx_codeobj__262; static PyObject *__pyx_codeobj__264; static PyObject *__pyx_codeobj__266; static PyObject *__pyx_codeobj__268; static PyObject *__pyx_codeobj__270; static PyObject *__pyx_codeobj__272; static PyObject *__pyx_codeobj__274; static PyObject *__pyx_codeobj__276; static PyObject *__pyx_codeobj__278; static PyObject *__pyx_codeobj__281; static PyObject *__pyx_codeobj__283; static PyObject *__pyx_codeobj__285; static PyObject *__pyx_codeobj__287; /* "pandas/tslib.pyx":420 * 'week', 'dayofyear'] * for field in fields: * prop = property(fget=lambda self: -1) # <<<<<<<<<<<<<< * setattr(NaTType, field, prop) * */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5tslib_100lambda1(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5tslib_100lambda1 = {__Pyx_NAMESTR("lambda1"), (PyCFunction)__pyx_pw_6pandas_5tslib_100lambda1, METH_O, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5tslib_100lambda1(PyObject *__pyx_self, PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("lambda1 (wrapper)", 0); __pyx_r = __pyx_lambda_funcdef_6pandas_5tslib_lambda1(__pyx_self, ((PyObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_lambda_funcdef_6pandas_5tslib_lambda1(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("lambda1", 0); __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_int_neg_1); __pyx_r = __pyx_int_neg_1; goto __pyx_L0; /* function exit code */ __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/tslib.pyx":73 * basestring = str * * def ints_to_pydatetime(ndarray[int64_t] arr, tz=None): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = len(arr) */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5tslib_1ints_to_pydatetime(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5tslib_1ints_to_pydatetime = {__Pyx_NAMESTR("ints_to_pydatetime"), (PyCFunction)__pyx_pw_6pandas_5tslib_1ints_to_pydatetime, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5tslib_1ints_to_pydatetime(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_arr = 0; PyObject *__pyx_v_tz = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("ints_to_pydatetime (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_arr,&__pyx_n_s_tz,0}; PyObject* values[2] = {0,0}; values[1] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_arr)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_tz); if (value) { values[1] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "ints_to_pydatetime") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 73; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_arr = ((PyArrayObject *)values[0]); __pyx_v_tz = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("ints_to_pydatetime", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 73; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.tslib.ints_to_pydatetime", __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_filename = __pyx_f[0]; __pyx_lineno = 73; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5tslib_ints_to_pydatetime(__pyx_self, __pyx_v_arr, __pyx_v_tz); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5tslib_ints_to_pydatetime(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_arr, PyObject *__pyx_v_tz) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_n; pandas_datetimestruct __pyx_v_dts; PyArrayObject *__pyx_v_result = 0; PyDateTime_DateTime *__pyx_v_dt = NULL; PyObject *__pyx_v_trans = NULL; PyObject *__pyx_v_deltas = NULL; PyObject *__pyx_v_pos = NULL; PyObject *__pyx_v_inf = NULL; __Pyx_LocalBuf_ND __pyx_pybuffernd_arr; __Pyx_Buffer __pyx_pybuffer_arr; __Pyx_LocalBuf_ND __pyx_pybuffernd_result; __Pyx_Buffer __pyx_pybuffer_result; 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; PyArrayObject *__pyx_t_6 = NULL; int __pyx_t_7; int __pyx_t_8; Py_ssize_t __pyx_t_9; Py_ssize_t __pyx_t_10; int __pyx_t_11; Py_ssize_t __pyx_t_12; PyObject **__pyx_t_13; Py_ssize_t __pyx_t_14; PyObject *__pyx_t_15 = NULL; PyObject *__pyx_t_16 = NULL; PyObject *__pyx_t_17 = NULL; PyObject *__pyx_t_18 = NULL; Py_ssize_t __pyx_t_19; int __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; npy_datetime __pyx_t_29; PyObject *__pyx_t_30 = NULL; 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("ints_to_pydatetime", 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_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_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 73; __pyx_clineno = __LINE__; goto __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/tslib.pyx":75 * def ints_to_pydatetime(ndarray[int64_t] arr, tz=None): * cdef: * Py_ssize_t i, n = len(arr) # <<<<<<<<<<<<<< * pandas_datetimestruct dts * ndarray[object] result = np.empty(n, dtype=object) */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_arr)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 75; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/tslib.pyx":77 * Py_ssize_t i, n = len(arr) * pandas_datetimestruct dts * ndarray[object] result = np.empty(n, dtype=object) # <<<<<<<<<<<<<< * * if tz is not None: */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 77; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 77; __pyx_clineno = __LINE__; goto __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_n); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 77; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 77; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 77; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_dtype, __pyx_builtin_object) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 77; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_5 = PyObject_Call(__pyx_t_3, __pyx_t_4, __pyx_t_2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 77; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 77; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_6 = ((PyArrayObject *)__pyx_t_5); { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { __pyx_v_result = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_result.rcbuffer->pybuffer.buf = NULL; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 77; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } else {__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]; } } __pyx_t_6 = 0; __pyx_v_result = ((PyArrayObject *)__pyx_t_5); __pyx_t_5 = 0; /* "pandas/tslib.pyx":79 * ndarray[object] result = np.empty(n, dtype=object) * * if tz is not None: # <<<<<<<<<<<<<< * if _is_utc(tz): * for i in range(n): */ __pyx_t_7 = (__pyx_v_tz != Py_None); __pyx_t_8 = (__pyx_t_7 != 0); if (__pyx_t_8) { /* "pandas/tslib.pyx":80 * * if tz is not None: * if _is_utc(tz): # <<<<<<<<<<<<<< * for i in range(n): * if arr[i] == iNaT: */ __pyx_t_8 = (__pyx_f_6pandas_5tslib__is_utc(__pyx_v_tz) != 0); if (__pyx_t_8) { /* "pandas/tslib.pyx":81 * if tz is not None: * if _is_utc(tz): * for i in range(n): # <<<<<<<<<<<<<< * if arr[i] == iNaT: * result[i] = np.nan */ __pyx_t_1 = __pyx_v_n; for (__pyx_t_9 = 0; __pyx_t_9 < __pyx_t_1; __pyx_t_9+=1) { __pyx_v_i = __pyx_t_9; /* "pandas/tslib.pyx":82 * if _is_utc(tz): * for i in range(n): * if arr[i] == iNaT: # <<<<<<<<<<<<<< * result[i] = np.nan * else: */ __pyx_t_10 = __pyx_v_i; __pyx_t_11 = -1; if (__pyx_t_10 < 0) { __pyx_t_10 += __pyx_pybuffernd_arr.diminfo[0].shape; if (unlikely(__pyx_t_10 < 0)) __pyx_t_11 = 0; } else if (unlikely(__pyx_t_10 >= __pyx_pybuffernd_arr.diminfo[0].shape)) __pyx_t_11 = 0; if (unlikely(__pyx_t_11 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_11); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_5 = __Pyx_PyInt_From_npy_int64((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_arr.rcbuffer->pybuffer.buf, __pyx_t_10, __pyx_pybuffernd_arr.diminfo[0].strides))); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_iNaT); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = PyObject_RichCompare(__pyx_t_5, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_8) { /* "pandas/tslib.pyx":83 * for i in range(n): * if arr[i] == iNaT: * result[i] = np.nan # <<<<<<<<<<<<<< * else: * pandas_datetime_to_datetimestruct(arr[i], PANDAS_FR_ns, &dts) */ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_nan); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_12 = __pyx_v_i; __pyx_t_11 = -1; if (__pyx_t_12 < 0) { __pyx_t_12 += __pyx_pybuffernd_result.diminfo[0].shape; if (unlikely(__pyx_t_12 < 0)) __pyx_t_11 = 0; } else if (unlikely(__pyx_t_12 >= __pyx_pybuffernd_result.diminfo[0].shape)) __pyx_t_11 = 0; if (unlikely(__pyx_t_11 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_11); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_13 = __Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_12, __pyx_pybuffernd_result.diminfo[0].strides); __Pyx_GOTREF(*__pyx_t_13); __Pyx_INCREF(__pyx_t_2); __Pyx_DECREF(*__pyx_t_13); *__pyx_t_13 = __pyx_t_2; __Pyx_GIVEREF(*__pyx_t_13); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; goto __pyx_L7; } /*else*/ { /* "pandas/tslib.pyx":85 * result[i] = np.nan * else: * pandas_datetime_to_datetimestruct(arr[i], PANDAS_FR_ns, &dts) # <<<<<<<<<<<<<< * result[i] = datetime(dts.year, dts.month, dts.day, dts.hour, * dts.min, dts.sec, dts.us, tz) */ __pyx_t_14 = __pyx_v_i; __pyx_t_11 = -1; if (__pyx_t_14 < 0) { __pyx_t_14 += __pyx_pybuffernd_arr.diminfo[0].shape; if (unlikely(__pyx_t_14 < 0)) __pyx_t_11 = 0; } else if (unlikely(__pyx_t_14 >= __pyx_pybuffernd_arr.diminfo[0].shape)) __pyx_t_11 = 0; if (unlikely(__pyx_t_11 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_11); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } pandas_datetime_to_datetimestruct((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_arr.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_arr.diminfo[0].strides)), PANDAS_FR_ns, (&__pyx_v_dts)); /* "pandas/tslib.pyx":86 * else: * pandas_datetime_to_datetimestruct(arr[i], PANDAS_FR_ns, &dts) * result[i] = datetime(dts.year, dts.month, dts.day, dts.hour, # <<<<<<<<<<<<<< * dts.min, dts.sec, dts.us, tz) * elif _is_tzlocal(tz) or _is_fixed_offset(tz): */ __pyx_t_2 = __Pyx_PyInt_From_npy_int64(__pyx_v_dts.year); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 86; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_PyInt_From_npy_int32(__pyx_v_dts.month); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 86; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyInt_From_npy_int32(__pyx_v_dts.day); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 86; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = __Pyx_PyInt_From_npy_int32(__pyx_v_dts.hour); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 86; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); /* "pandas/tslib.pyx":87 * pandas_datetime_to_datetimestruct(arr[i], PANDAS_FR_ns, &dts) * result[i] = datetime(dts.year, dts.month, dts.day, dts.hour, * dts.min, dts.sec, dts.us, tz) # <<<<<<<<<<<<<< * elif _is_tzlocal(tz) or _is_fixed_offset(tz): * for i in range(n): */ __pyx_t_15 = __Pyx_PyInt_From_npy_int32(__pyx_v_dts.min); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 87; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_15); __pyx_t_16 = __Pyx_PyInt_From_npy_int32(__pyx_v_dts.sec); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 87; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_16); __pyx_t_17 = __Pyx_PyInt_From_npy_int32(__pyx_v_dts.us); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 87; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_17); /* "pandas/tslib.pyx":86 * else: * pandas_datetime_to_datetimestruct(arr[i], PANDAS_FR_ns, &dts) * result[i] = datetime(dts.year, dts.month, dts.day, dts.hour, # <<<<<<<<<<<<<< * dts.min, dts.sec, dts.us, tz) * elif _is_tzlocal(tz) or _is_fixed_offset(tz): */ __pyx_t_18 = PyTuple_New(8); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 86; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); PyTuple_SET_ITEM(__pyx_t_18, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_18, 1, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_18, 2, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_18, 3, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_18, 4, __pyx_t_15); __Pyx_GIVEREF(__pyx_t_15); PyTuple_SET_ITEM(__pyx_t_18, 5, __pyx_t_16); __Pyx_GIVEREF(__pyx_t_16); PyTuple_SET_ITEM(__pyx_t_18, 6, __pyx_t_17); __Pyx_GIVEREF(__pyx_t_17); __Pyx_INCREF(__pyx_v_tz); PyTuple_SET_ITEM(__pyx_t_18, 7, __pyx_v_tz); __Pyx_GIVEREF(__pyx_v_tz); __pyx_t_2 = 0; __pyx_t_4 = 0; __pyx_t_5 = 0; __pyx_t_3 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_17 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_8datetime_datetime)), __pyx_t_18, NULL); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 86; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_17); __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; __pyx_t_19 = __pyx_v_i; __pyx_t_11 = -1; if (__pyx_t_19 < 0) { __pyx_t_19 += __pyx_pybuffernd_result.diminfo[0].shape; if (unlikely(__pyx_t_19 < 0)) __pyx_t_11 = 0; } else if (unlikely(__pyx_t_19 >= __pyx_pybuffernd_result.diminfo[0].shape)) __pyx_t_11 = 0; if (unlikely(__pyx_t_11 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_11); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 86; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_13 = __Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_result.diminfo[0].strides); __Pyx_GOTREF(*__pyx_t_13); __Pyx_INCREF(__pyx_t_17); __Pyx_DECREF(*__pyx_t_13); *__pyx_t_13 = __pyx_t_17; __Pyx_GIVEREF(*__pyx_t_13); __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; } __pyx_L7:; } goto __pyx_L4; } /* "pandas/tslib.pyx":88 * result[i] = datetime(dts.year, dts.month, dts.day, dts.hour, * dts.min, dts.sec, dts.us, tz) * elif _is_tzlocal(tz) or _is_fixed_offset(tz): # <<<<<<<<<<<<<< * for i in range(n): * if arr[i] == iNaT: */ __pyx_t_17 = __Pyx_GetModuleGlobalName(__pyx_n_s_is_tzlocal); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_17); __pyx_t_18 = PyTuple_New(1); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); __Pyx_INCREF(__pyx_v_tz); PyTuple_SET_ITEM(__pyx_t_18, 0, __pyx_v_tz); __Pyx_GIVEREF(__pyx_v_tz); __pyx_t_16 = PyObject_Call(__pyx_t_17, __pyx_t_18, NULL); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_16); __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_16); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; if (!__pyx_t_8) { __pyx_t_16 = __Pyx_GetModuleGlobalName(__pyx_n_s_is_fixed_offset); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_16); __pyx_t_18 = PyTuple_New(1); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); __Pyx_INCREF(__pyx_v_tz); PyTuple_SET_ITEM(__pyx_t_18, 0, __pyx_v_tz); __Pyx_GIVEREF(__pyx_v_tz); __pyx_t_17 = PyObject_Call(__pyx_t_16, __pyx_t_18, NULL); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_17); __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_17); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; __pyx_t_20 = __pyx_t_7; } else { __pyx_t_20 = __pyx_t_8; } if (__pyx_t_20) { /* "pandas/tslib.pyx":89 * dts.min, dts.sec, dts.us, tz) * elif _is_tzlocal(tz) or _is_fixed_offset(tz): * for i in range(n): # <<<<<<<<<<<<<< * if arr[i] == iNaT: * result[i] = np.nan */ __pyx_t_1 = __pyx_v_n; for (__pyx_t_9 = 0; __pyx_t_9 < __pyx_t_1; __pyx_t_9+=1) { __pyx_v_i = __pyx_t_9; /* "pandas/tslib.pyx":90 * elif _is_tzlocal(tz) or _is_fixed_offset(tz): * for i in range(n): * if arr[i] == iNaT: # <<<<<<<<<<<<<< * result[i] = np.nan * else: */ __pyx_t_21 = __pyx_v_i; __pyx_t_11 = -1; if (__pyx_t_21 < 0) { __pyx_t_21 += __pyx_pybuffernd_arr.diminfo[0].shape; if (unlikely(__pyx_t_21 < 0)) __pyx_t_11 = 0; } else if (unlikely(__pyx_t_21 >= __pyx_pybuffernd_arr.diminfo[0].shape)) __pyx_t_11 = 0; if (unlikely(__pyx_t_11 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_11); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 90; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_17 = __Pyx_PyInt_From_npy_int64((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_arr.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_arr.diminfo[0].strides))); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 90; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_17); __pyx_t_18 = __Pyx_GetModuleGlobalName(__pyx_n_s_iNaT); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 90; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); __pyx_t_16 = PyObject_RichCompare(__pyx_t_17, __pyx_t_18, Py_EQ); __Pyx_XGOTREF(__pyx_t_16); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 90; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; __pyx_t_20 = __Pyx_PyObject_IsTrue(__pyx_t_16); if (unlikely(__pyx_t_20 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 90; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; if (__pyx_t_20) { /* "pandas/tslib.pyx":91 * for i in range(n): * if arr[i] == iNaT: * result[i] = np.nan # <<<<<<<<<<<<<< * else: * pandas_datetime_to_datetimestruct(arr[i], PANDAS_FR_ns, &dts) */ __pyx_t_16 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 91; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_16); __pyx_t_18 = __Pyx_PyObject_GetAttrStr(__pyx_t_16, __pyx_n_s_nan); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 91; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; __pyx_t_22 = __pyx_v_i; __pyx_t_11 = -1; if (__pyx_t_22 < 0) { __pyx_t_22 += __pyx_pybuffernd_result.diminfo[0].shape; if (unlikely(__pyx_t_22 < 0)) __pyx_t_11 = 0; } else if (unlikely(__pyx_t_22 >= __pyx_pybuffernd_result.diminfo[0].shape)) __pyx_t_11 = 0; if (unlikely(__pyx_t_11 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_11); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 91; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_13 = __Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_22, __pyx_pybuffernd_result.diminfo[0].strides); __Pyx_GOTREF(*__pyx_t_13); __Pyx_INCREF(__pyx_t_18); __Pyx_DECREF(*__pyx_t_13); *__pyx_t_13 = __pyx_t_18; __Pyx_GIVEREF(*__pyx_t_13); __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; goto __pyx_L10; } /*else*/ { /* "pandas/tslib.pyx":93 * result[i] = np.nan * else: * pandas_datetime_to_datetimestruct(arr[i], PANDAS_FR_ns, &dts) # <<<<<<<<<<<<<< * dt = datetime(dts.year, dts.month, dts.day, dts.hour, * dts.min, dts.sec, dts.us, tz) */ __pyx_t_23 = __pyx_v_i; __pyx_t_11 = -1; if (__pyx_t_23 < 0) { __pyx_t_23 += __pyx_pybuffernd_arr.diminfo[0].shape; if (unlikely(__pyx_t_23 < 0)) __pyx_t_11 = 0; } else if (unlikely(__pyx_t_23 >= __pyx_pybuffernd_arr.diminfo[0].shape)) __pyx_t_11 = 0; if (unlikely(__pyx_t_11 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_11); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 93; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } pandas_datetime_to_datetimestruct((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_arr.rcbuffer->pybuffer.buf, __pyx_t_23, __pyx_pybuffernd_arr.diminfo[0].strides)), PANDAS_FR_ns, (&__pyx_v_dts)); /* "pandas/tslib.pyx":94 * else: * pandas_datetime_to_datetimestruct(arr[i], PANDAS_FR_ns, &dts) * dt = datetime(dts.year, dts.month, dts.day, dts.hour, # <<<<<<<<<<<<<< * dts.min, dts.sec, dts.us, tz) * result[i] = dt + tz.utcoffset(dt) */ __pyx_t_18 = __Pyx_PyInt_From_npy_int64(__pyx_v_dts.year); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 94; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); __pyx_t_16 = __Pyx_PyInt_From_npy_int32(__pyx_v_dts.month); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 94; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_16); __pyx_t_17 = __Pyx_PyInt_From_npy_int32(__pyx_v_dts.day); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 94; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_17); __pyx_t_15 = __Pyx_PyInt_From_npy_int32(__pyx_v_dts.hour); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 94; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_15); /* "pandas/tslib.pyx":95 * pandas_datetime_to_datetimestruct(arr[i], PANDAS_FR_ns, &dts) * dt = datetime(dts.year, dts.month, dts.day, dts.hour, * dts.min, dts.sec, dts.us, tz) # <<<<<<<<<<<<<< * result[i] = dt + tz.utcoffset(dt) * else: */ __pyx_t_3 = __Pyx_PyInt_From_npy_int32(__pyx_v_dts.min); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 95; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = __Pyx_PyInt_From_npy_int32(__pyx_v_dts.sec); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 95; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = __Pyx_PyInt_From_npy_int32(__pyx_v_dts.us); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 95; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); /* "pandas/tslib.pyx":94 * else: * pandas_datetime_to_datetimestruct(arr[i], PANDAS_FR_ns, &dts) * dt = datetime(dts.year, dts.month, dts.day, dts.hour, # <<<<<<<<<<<<<< * dts.min, dts.sec, dts.us, tz) * result[i] = dt + tz.utcoffset(dt) */ __pyx_t_2 = PyTuple_New(8); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 94; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_18); __Pyx_GIVEREF(__pyx_t_18); PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_16); __Pyx_GIVEREF(__pyx_t_16); PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_t_17); __Pyx_GIVEREF(__pyx_t_17); PyTuple_SET_ITEM(__pyx_t_2, 3, __pyx_t_15); __Pyx_GIVEREF(__pyx_t_15); PyTuple_SET_ITEM(__pyx_t_2, 4, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_2, 5, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_2, 6, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __Pyx_INCREF(__pyx_v_tz); PyTuple_SET_ITEM(__pyx_t_2, 7, __pyx_v_tz); __Pyx_GIVEREF(__pyx_v_tz); __pyx_t_18 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_15 = 0; __pyx_t_3 = 0; __pyx_t_5 = 0; __pyx_t_4 = 0; __pyx_t_4 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_8datetime_datetime)), __pyx_t_2, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 94; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF_SET(__pyx_v_dt, ((PyDateTime_DateTime *)__pyx_t_4)); __pyx_t_4 = 0; /* "pandas/tslib.pyx":96 * dt = datetime(dts.year, dts.month, dts.day, dts.hour, * dts.min, dts.sec, dts.us, tz) * result[i] = dt + tz.utcoffset(dt) # <<<<<<<<<<<<<< * else: * trans = _get_transitions(tz) */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_tz, __pyx_n_s_utcoffset); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 96; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 96; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(((PyObject *)__pyx_v_dt)); PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_dt)); __Pyx_GIVEREF(((PyObject *)__pyx_v_dt)); __pyx_t_5 = PyObject_Call(__pyx_t_4, __pyx_t_2, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 96; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyNumber_Add(((PyObject *)__pyx_v_dt), __pyx_t_5); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 96; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_24 = __pyx_v_i; __pyx_t_11 = -1; if (__pyx_t_24 < 0) { __pyx_t_24 += __pyx_pybuffernd_result.diminfo[0].shape; if (unlikely(__pyx_t_24 < 0)) __pyx_t_11 = 0; } else if (unlikely(__pyx_t_24 >= __pyx_pybuffernd_result.diminfo[0].shape)) __pyx_t_11 = 0; if (unlikely(__pyx_t_11 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_11); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 96; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_13 = __Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_24, __pyx_pybuffernd_result.diminfo[0].strides); __Pyx_GOTREF(*__pyx_t_13); __Pyx_INCREF(__pyx_t_2); __Pyx_DECREF(*__pyx_t_13); *__pyx_t_13 = __pyx_t_2; __Pyx_GIVEREF(*__pyx_t_13); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } __pyx_L10:; } goto __pyx_L4; } /*else*/ { /* "pandas/tslib.pyx":98 * result[i] = dt + tz.utcoffset(dt) * else: * trans = _get_transitions(tz) # <<<<<<<<<<<<<< * deltas = _get_deltas(tz) * for i in range(n): */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_get_transitions); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 98; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 98; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_v_tz); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_tz); __Pyx_GIVEREF(__pyx_v_tz); __pyx_t_4 = PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 98; __pyx_clineno = __LINE__; goto __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_v_trans = __pyx_t_4; __pyx_t_4 = 0; /* "pandas/tslib.pyx":99 * else: * trans = _get_transitions(tz) * deltas = _get_deltas(tz) # <<<<<<<<<<<<<< * for i in range(n): * */ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_get_deltas); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 99; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 99; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_v_tz); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_tz); __Pyx_GIVEREF(__pyx_v_tz); __pyx_t_2 = PyObject_Call(__pyx_t_4, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 99; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_v_deltas = __pyx_t_2; __pyx_t_2 = 0; /* "pandas/tslib.pyx":100 * trans = _get_transitions(tz) * deltas = _get_deltas(tz) * for i in range(n): # <<<<<<<<<<<<<< * * if arr[i] == iNaT: */ __pyx_t_1 = __pyx_v_n; for (__pyx_t_9 = 0; __pyx_t_9 < __pyx_t_1; __pyx_t_9+=1) { __pyx_v_i = __pyx_t_9; /* "pandas/tslib.pyx":102 * for i in range(n): * * if arr[i] == iNaT: # <<<<<<<<<<<<<< * result[i] = np.nan * else: */ __pyx_t_25 = __pyx_v_i; __pyx_t_11 = -1; if (__pyx_t_25 < 0) { __pyx_t_25 += __pyx_pybuffernd_arr.diminfo[0].shape; if (unlikely(__pyx_t_25 < 0)) __pyx_t_11 = 0; } else if (unlikely(__pyx_t_25 >= __pyx_pybuffernd_arr.diminfo[0].shape)) __pyx_t_11 = 0; if (unlikely(__pyx_t_11 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_11); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_2 = __Pyx_PyInt_From_npy_int64((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_arr.rcbuffer->pybuffer.buf, __pyx_t_25, __pyx_pybuffernd_arr.diminfo[0].strides))); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_iNaT); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = PyObject_RichCompare(__pyx_t_2, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_20 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_20 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_20) { /* "pandas/tslib.pyx":103 * * if arr[i] == iNaT: * result[i] = np.nan # <<<<<<<<<<<<<< * else: * */ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_nan); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_26 = __pyx_v_i; __pyx_t_11 = -1; if (__pyx_t_26 < 0) { __pyx_t_26 += __pyx_pybuffernd_result.diminfo[0].shape; if (unlikely(__pyx_t_26 < 0)) __pyx_t_11 = 0; } else if (unlikely(__pyx_t_26 >= __pyx_pybuffernd_result.diminfo[0].shape)) __pyx_t_11 = 0; if (unlikely(__pyx_t_11 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_11); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_13 = __Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_26, __pyx_pybuffernd_result.diminfo[0].strides); __Pyx_GOTREF(*__pyx_t_13); __Pyx_INCREF(__pyx_t_5); __Pyx_DECREF(*__pyx_t_13); *__pyx_t_13 = __pyx_t_5; __Pyx_GIVEREF(*__pyx_t_13); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; goto __pyx_L13; } /*else*/ { /* "pandas/tslib.pyx":107 * * # Adjust datetime64 timestamp, recompute datetimestruct * pos = trans.searchsorted(arr[i]) - 1 # <<<<<<<<<<<<<< * inf = tz._transition_info[pos] * */ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_trans, __pyx_n_s_searchsorted); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_27 = __pyx_v_i; __pyx_t_11 = -1; if (__pyx_t_27 < 0) { __pyx_t_27 += __pyx_pybuffernd_arr.diminfo[0].shape; if (unlikely(__pyx_t_27 < 0)) __pyx_t_11 = 0; } else if (unlikely(__pyx_t_27 >= __pyx_pybuffernd_arr.diminfo[0].shape)) __pyx_t_11 = 0; if (unlikely(__pyx_t_11 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_11); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_4 = __Pyx_PyInt_From_npy_int64((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_arr.rcbuffer->pybuffer.buf, __pyx_t_27, __pyx_pybuffernd_arr.diminfo[0].strides))); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyObject_Call(__pyx_t_5, __pyx_t_2, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyNumber_Subtract(__pyx_t_4, __pyx_int_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF_SET(__pyx_v_pos, __pyx_t_2); __pyx_t_2 = 0; /* "pandas/tslib.pyx":108 * # Adjust datetime64 timestamp, recompute datetimestruct * pos = trans.searchsorted(arr[i]) - 1 * inf = tz._transition_info[pos] # <<<<<<<<<<<<<< * * pandas_datetime_to_datetimestruct(arr[i] + deltas[pos], */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_tz, __pyx_n_s_transition_info); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 108; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = PyObject_GetItem(__pyx_t_2, __pyx_v_pos); if (unlikely(__pyx_t_4 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 108; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF_SET(__pyx_v_inf, __pyx_t_4); __pyx_t_4 = 0; /* "pandas/tslib.pyx":110 * inf = tz._transition_info[pos] * * pandas_datetime_to_datetimestruct(arr[i] + deltas[pos], # <<<<<<<<<<<<<< * PANDAS_FR_ns, &dts) * result[i] = datetime(dts.year, dts.month, dts.day, dts.hour, */ __pyx_t_28 = __pyx_v_i; __pyx_t_11 = -1; if (__pyx_t_28 < 0) { __pyx_t_28 += __pyx_pybuffernd_arr.diminfo[0].shape; if (unlikely(__pyx_t_28 < 0)) __pyx_t_11 = 0; } else if (unlikely(__pyx_t_28 >= __pyx_pybuffernd_arr.diminfo[0].shape)) __pyx_t_11 = 0; if (unlikely(__pyx_t_11 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_11); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 110; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_4 = __Pyx_PyInt_From_npy_int64((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_arr.rcbuffer->pybuffer.buf, __pyx_t_28, __pyx_pybuffernd_arr.diminfo[0].strides))); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 110; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_2 = PyObject_GetItem(__pyx_v_deltas, __pyx_v_pos); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 110; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = PyNumber_Add(__pyx_t_4, __pyx_t_2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 110; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_29 = __Pyx_PyInt_As_npy_int64(__pyx_t_5); if (unlikely((__pyx_t_29 == (npy_datetime)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 110; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "pandas/tslib.pyx":111 * * pandas_datetime_to_datetimestruct(arr[i] + deltas[pos], * PANDAS_FR_ns, &dts) # <<<<<<<<<<<<<< * result[i] = datetime(dts.year, dts.month, dts.day, dts.hour, * dts.min, dts.sec, dts.us, */ pandas_datetime_to_datetimestruct(__pyx_t_29, PANDAS_FR_ns, (&__pyx_v_dts)); /* "pandas/tslib.pyx":112 * pandas_datetime_to_datetimestruct(arr[i] + deltas[pos], * PANDAS_FR_ns, &dts) * result[i] = datetime(dts.year, dts.month, dts.day, dts.hour, # <<<<<<<<<<<<<< * dts.min, dts.sec, dts.us, * tz._tzinfos[inf]) */ __pyx_t_5 = __Pyx_PyInt_From_npy_int64(__pyx_v_dts.year); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 112; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_2 = __Pyx_PyInt_From_npy_int32(__pyx_v_dts.month); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 112; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_PyInt_From_npy_int32(__pyx_v_dts.day); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 112; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = __Pyx_PyInt_From_npy_int32(__pyx_v_dts.hour); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 112; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); /* "pandas/tslib.pyx":113 * PANDAS_FR_ns, &dts) * result[i] = datetime(dts.year, dts.month, dts.day, dts.hour, * dts.min, dts.sec, dts.us, # <<<<<<<<<<<<<< * tz._tzinfos[inf]) * else: */ __pyx_t_15 = __Pyx_PyInt_From_npy_int32(__pyx_v_dts.min); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 113; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_15); __pyx_t_17 = __Pyx_PyInt_From_npy_int32(__pyx_v_dts.sec); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 113; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_17); __pyx_t_16 = __Pyx_PyInt_From_npy_int32(__pyx_v_dts.us); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 113; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_16); /* "pandas/tslib.pyx":114 * result[i] = datetime(dts.year, dts.month, dts.day, dts.hour, * dts.min, dts.sec, dts.us, * tz._tzinfos[inf]) # <<<<<<<<<<<<<< * else: * for i in range(n): */ __pyx_t_18 = __Pyx_PyObject_GetAttrStr(__pyx_v_tz, __pyx_n_s_tzinfos); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 114; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); __pyx_t_30 = PyObject_GetItem(__pyx_t_18, __pyx_v_inf); if (unlikely(__pyx_t_30 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 114; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_30); __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; /* "pandas/tslib.pyx":112 * pandas_datetime_to_datetimestruct(arr[i] + deltas[pos], * PANDAS_FR_ns, &dts) * result[i] = datetime(dts.year, dts.month, dts.day, dts.hour, # <<<<<<<<<<<<<< * dts.min, dts.sec, dts.us, * tz._tzinfos[inf]) */ __pyx_t_18 = PyTuple_New(8); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 112; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); PyTuple_SET_ITEM(__pyx_t_18, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_18, 1, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_18, 2, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_18, 3, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_18, 4, __pyx_t_15); __Pyx_GIVEREF(__pyx_t_15); PyTuple_SET_ITEM(__pyx_t_18, 5, __pyx_t_17); __Pyx_GIVEREF(__pyx_t_17); PyTuple_SET_ITEM(__pyx_t_18, 6, __pyx_t_16); __Pyx_GIVEREF(__pyx_t_16); PyTuple_SET_ITEM(__pyx_t_18, 7, __pyx_t_30); __Pyx_GIVEREF(__pyx_t_30); __pyx_t_5 = 0; __pyx_t_2 = 0; __pyx_t_4 = 0; __pyx_t_3 = 0; __pyx_t_15 = 0; __pyx_t_17 = 0; __pyx_t_16 = 0; __pyx_t_30 = 0; __pyx_t_30 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_8datetime_datetime)), __pyx_t_18, NULL); if (unlikely(!__pyx_t_30)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 112; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_30); __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; __pyx_t_31 = __pyx_v_i; __pyx_t_11 = -1; if (__pyx_t_31 < 0) { __pyx_t_31 += __pyx_pybuffernd_result.diminfo[0].shape; if (unlikely(__pyx_t_31 < 0)) __pyx_t_11 = 0; } else if (unlikely(__pyx_t_31 >= __pyx_pybuffernd_result.diminfo[0].shape)) __pyx_t_11 = 0; if (unlikely(__pyx_t_11 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_11); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 112; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_13 = __Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_31, __pyx_pybuffernd_result.diminfo[0].strides); __Pyx_GOTREF(*__pyx_t_13); __Pyx_INCREF(__pyx_t_30); __Pyx_DECREF(*__pyx_t_13); *__pyx_t_13 = __pyx_t_30; __Pyx_GIVEREF(*__pyx_t_13); __Pyx_DECREF(__pyx_t_30); __pyx_t_30 = 0; } __pyx_L13:; } } __pyx_L4:; goto __pyx_L3; } /*else*/ { /* "pandas/tslib.pyx":116 * tz._tzinfos[inf]) * else: * for i in range(n): # <<<<<<<<<<<<<< * if arr[i] == iNaT: * result[i] = np.nan */ __pyx_t_1 = __pyx_v_n; for (__pyx_t_9 = 0; __pyx_t_9 < __pyx_t_1; __pyx_t_9+=1) { __pyx_v_i = __pyx_t_9; /* "pandas/tslib.pyx":117 * else: * for i in range(n): * if arr[i] == iNaT: # <<<<<<<<<<<<<< * result[i] = np.nan * else: */ __pyx_t_32 = __pyx_v_i; __pyx_t_11 = -1; if (__pyx_t_32 < 0) { __pyx_t_32 += __pyx_pybuffernd_arr.diminfo[0].shape; if (unlikely(__pyx_t_32 < 0)) __pyx_t_11 = 0; } else if (unlikely(__pyx_t_32 >= __pyx_pybuffernd_arr.diminfo[0].shape)) __pyx_t_11 = 0; if (unlikely(__pyx_t_11 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_11); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 117; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_30 = __Pyx_PyInt_From_npy_int64((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_arr.rcbuffer->pybuffer.buf, __pyx_t_32, __pyx_pybuffernd_arr.diminfo[0].strides))); if (unlikely(!__pyx_t_30)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 117; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_30); __pyx_t_18 = __Pyx_GetModuleGlobalName(__pyx_n_s_iNaT); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 117; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); __pyx_t_16 = PyObject_RichCompare(__pyx_t_30, __pyx_t_18, Py_EQ); __Pyx_XGOTREF(__pyx_t_16); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 117; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_30); __pyx_t_30 = 0; __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; __pyx_t_20 = __Pyx_PyObject_IsTrue(__pyx_t_16); if (unlikely(__pyx_t_20 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 117; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; if (__pyx_t_20) { /* "pandas/tslib.pyx":118 * for i in range(n): * if arr[i] == iNaT: * result[i] = np.nan # <<<<<<<<<<<<<< * else: * pandas_datetime_to_datetimestruct(arr[i], PANDAS_FR_ns, &dts) */ __pyx_t_16 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 118; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_16); __pyx_t_18 = __Pyx_PyObject_GetAttrStr(__pyx_t_16, __pyx_n_s_nan); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 118; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; __pyx_t_33 = __pyx_v_i; __pyx_t_11 = -1; if (__pyx_t_33 < 0) { __pyx_t_33 += __pyx_pybuffernd_result.diminfo[0].shape; if (unlikely(__pyx_t_33 < 0)) __pyx_t_11 = 0; } else if (unlikely(__pyx_t_33 >= __pyx_pybuffernd_result.diminfo[0].shape)) __pyx_t_11 = 0; if (unlikely(__pyx_t_11 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_11); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 118; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_13 = __Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_33, __pyx_pybuffernd_result.diminfo[0].strides); __Pyx_GOTREF(*__pyx_t_13); __Pyx_INCREF(__pyx_t_18); __Pyx_DECREF(*__pyx_t_13); *__pyx_t_13 = __pyx_t_18; __Pyx_GIVEREF(*__pyx_t_13); __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; goto __pyx_L16; } /*else*/ { /* "pandas/tslib.pyx":120 * result[i] = np.nan * else: * pandas_datetime_to_datetimestruct(arr[i], PANDAS_FR_ns, &dts) # <<<<<<<<<<<<<< * result[i] = datetime(dts.year, dts.month, dts.day, dts.hour, * dts.min, dts.sec, dts.us) */ __pyx_t_34 = __pyx_v_i; __pyx_t_11 = -1; if (__pyx_t_34 < 0) { __pyx_t_34 += __pyx_pybuffernd_arr.diminfo[0].shape; if (unlikely(__pyx_t_34 < 0)) __pyx_t_11 = 0; } else if (unlikely(__pyx_t_34 >= __pyx_pybuffernd_arr.diminfo[0].shape)) __pyx_t_11 = 0; if (unlikely(__pyx_t_11 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_11); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 120; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } pandas_datetime_to_datetimestruct((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_arr.rcbuffer->pybuffer.buf, __pyx_t_34, __pyx_pybuffernd_arr.diminfo[0].strides)), PANDAS_FR_ns, (&__pyx_v_dts)); /* "pandas/tslib.pyx":121 * else: * pandas_datetime_to_datetimestruct(arr[i], PANDAS_FR_ns, &dts) * result[i] = datetime(dts.year, dts.month, dts.day, dts.hour, # <<<<<<<<<<<<<< * dts.min, dts.sec, dts.us) * */ __pyx_t_18 = __Pyx_PyInt_From_npy_int64(__pyx_v_dts.year); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 121; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); __pyx_t_16 = __Pyx_PyInt_From_npy_int32(__pyx_v_dts.month); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 121; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_16); __pyx_t_30 = __Pyx_PyInt_From_npy_int32(__pyx_v_dts.day); if (unlikely(!__pyx_t_30)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 121; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_30); __pyx_t_17 = __Pyx_PyInt_From_npy_int32(__pyx_v_dts.hour); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 121; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_17); /* "pandas/tslib.pyx":122 * pandas_datetime_to_datetimestruct(arr[i], PANDAS_FR_ns, &dts) * result[i] = datetime(dts.year, dts.month, dts.day, dts.hour, * dts.min, dts.sec, dts.us) # <<<<<<<<<<<<<< * * return result */ __pyx_t_15 = __Pyx_PyInt_From_npy_int32(__pyx_v_dts.min); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 122; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_15); __pyx_t_3 = __Pyx_PyInt_From_npy_int32(__pyx_v_dts.sec); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 122; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyInt_From_npy_int32(__pyx_v_dts.us); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 122; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); /* "pandas/tslib.pyx":121 * else: * pandas_datetime_to_datetimestruct(arr[i], PANDAS_FR_ns, &dts) * result[i] = datetime(dts.year, dts.month, dts.day, dts.hour, # <<<<<<<<<<<<<< * dts.min, dts.sec, dts.us) * */ __pyx_t_2 = PyTuple_New(7); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 121; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_18); __Pyx_GIVEREF(__pyx_t_18); PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_16); __Pyx_GIVEREF(__pyx_t_16); PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_t_30); __Pyx_GIVEREF(__pyx_t_30); PyTuple_SET_ITEM(__pyx_t_2, 3, __pyx_t_17); __Pyx_GIVEREF(__pyx_t_17); PyTuple_SET_ITEM(__pyx_t_2, 4, __pyx_t_15); __Pyx_GIVEREF(__pyx_t_15); PyTuple_SET_ITEM(__pyx_t_2, 5, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_2, 6, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_18 = 0; __pyx_t_16 = 0; __pyx_t_30 = 0; __pyx_t_17 = 0; __pyx_t_15 = 0; __pyx_t_3 = 0; __pyx_t_4 = 0; __pyx_t_4 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_8datetime_datetime)), __pyx_t_2, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 121; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_35 = __pyx_v_i; __pyx_t_11 = -1; if (__pyx_t_35 < 0) { __pyx_t_35 += __pyx_pybuffernd_result.diminfo[0].shape; if (unlikely(__pyx_t_35 < 0)) __pyx_t_11 = 0; } else if (unlikely(__pyx_t_35 >= __pyx_pybuffernd_result.diminfo[0].shape)) __pyx_t_11 = 0; if (unlikely(__pyx_t_11 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_11); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 121; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_13 = __Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_35, __pyx_pybuffernd_result.diminfo[0].strides); __Pyx_GOTREF(*__pyx_t_13); __Pyx_INCREF(__pyx_t_4); __Pyx_DECREF(*__pyx_t_13); *__pyx_t_13 = __pyx_t_4; __Pyx_GIVEREF(*__pyx_t_13); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } __pyx_L16:; } } __pyx_L3:; /* "pandas/tslib.pyx":124 * dts.min, dts.sec, dts.us) * * return result # <<<<<<<<<<<<<< * * from dateutil.tz import tzlocal */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_result)); __pyx_r = ((PyObject *)__pyx_v_result); goto __pyx_L0; /* "pandas/tslib.pyx":73 * basestring = str * * def ints_to_pydatetime(ndarray[int64_t] arr, tz=None): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = len(arr) */ /* 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_15); __Pyx_XDECREF(__pyx_t_16); __Pyx_XDECREF(__pyx_t_17); __Pyx_XDECREF(__pyx_t_18); __Pyx_XDECREF(__pyx_t_30); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_arr.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.tslib.ints_to_pydatetime", __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_result.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_result); __Pyx_XDECREF((PyObject *)__pyx_v_dt); __Pyx_XDECREF(__pyx_v_trans); __Pyx_XDECREF(__pyx_v_deltas); __Pyx_XDECREF(__pyx_v_pos); __Pyx_XDECREF(__pyx_v_inf); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/tslib.pyx":128 * from dateutil.tz import tzlocal * * def _is_tzlocal(tz): # <<<<<<<<<<<<<< * return isinstance(tz, tzlocal) * */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5tslib_3_is_tzlocal(PyObject *__pyx_self, PyObject *__pyx_v_tz); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5tslib_3_is_tzlocal = {__Pyx_NAMESTR("_is_tzlocal"), (PyCFunction)__pyx_pw_6pandas_5tslib_3_is_tzlocal, METH_O, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5tslib_3_is_tzlocal(PyObject *__pyx_self, PyObject *__pyx_v_tz) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_is_tzlocal (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_5tslib_2_is_tzlocal(__pyx_self, ((PyObject *)__pyx_v_tz)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5tslib_2_is_tzlocal(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_tz) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_is_tzlocal", 0); /* "pandas/tslib.pyx":129 * * def _is_tzlocal(tz): * return isinstance(tz, tzlocal) # <<<<<<<<<<<<<< * * def _is_fixed_offset(tz): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_tzlocal); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 129; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyObject_IsInstance(__pyx_v_tz, __pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 129; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 129; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "pandas/tslib.pyx":128 * from dateutil.tz import tzlocal * * def _is_tzlocal(tz): # <<<<<<<<<<<<<< * return isinstance(tz, tzlocal) * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas.tslib._is_tzlocal", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/tslib.pyx":131 * return isinstance(tz, tzlocal) * * def _is_fixed_offset(tz): # <<<<<<<<<<<<<< * try: * tz._transition_info */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5tslib_5_is_fixed_offset(PyObject *__pyx_self, PyObject *__pyx_v_tz); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5tslib_5_is_fixed_offset = {__Pyx_NAMESTR("_is_fixed_offset"), (PyCFunction)__pyx_pw_6pandas_5tslib_5_is_fixed_offset, METH_O, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5tslib_5_is_fixed_offset(PyObject *__pyx_self, PyObject *__pyx_v_tz) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_is_fixed_offset (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_5tslib_4_is_fixed_offset(__pyx_self, ((PyObject *)__pyx_v_tz)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5tslib_4_is_fixed_offset(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_tz) { 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_is_fixed_offset", 0); /* "pandas/tslib.pyx":132 * * def _is_fixed_offset(tz): * try: # <<<<<<<<<<<<<< * tz._transition_info * return False */ { __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:*/ { /* "pandas/tslib.pyx":133 * def _is_fixed_offset(tz): * try: * tz._transition_info # <<<<<<<<<<<<<< * return False * except AttributeError: */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_tz, __pyx_n_s_transition_info); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 133; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "pandas/tslib.pyx":134 * try: * tz._transition_info * return False # <<<<<<<<<<<<<< * except AttributeError: * return True */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(Py_False); __pyx_r = Py_False; goto __pyx_L7_try_return; } __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L10_try_end; __pyx_L3_error:; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; /* "pandas/tslib.pyx":135 * tz._transition_info * return False * except AttributeError: # <<<<<<<<<<<<<< * return True * */ __pyx_t_5 = PyErr_ExceptionMatches(__pyx_builtin_AttributeError); if (__pyx_t_5) { __Pyx_AddTraceback("pandas.tslib._is_fixed_offset", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_6, &__pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 135; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_GOTREF(__pyx_t_6); __Pyx_GOTREF(__pyx_t_7); /* "pandas/tslib.pyx":136 * return False * except AttributeError: * return True # <<<<<<<<<<<<<< * * _zero_time = datetime_time(0, 0) */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(Py_True); __pyx_r = Py_True; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; goto __pyx_L6_except_return; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; goto __pyx_L4_exception_handled; } goto __pyx_L5_except_error; __pyx_L5_except_error:; __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); goto __pyx_L1_error; __pyx_L7_try_return:; __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); goto __pyx_L0; __pyx_L6_except_return:; __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); goto __pyx_L0; __pyx_L4_exception_handled:; __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); __pyx_L10_try_end:; } /* "pandas/tslib.pyx":131 * return isinstance(tz, tzlocal) * * def _is_fixed_offset(tz): # <<<<<<<<<<<<<< * try: * tz._transition_info */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_AddTraceback("pandas.tslib._is_fixed_offset", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/tslib.pyx":150 * * @classmethod * def fromordinal(cls, ordinal, offset=None, tz=None): # <<<<<<<<<<<<<< * """ passed an ordinal, translate and convert to a ts * note: by definition there cannot be any tz info on the ordinal itself """ */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5tslib_9Timestamp_1fromordinal(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6pandas_5tslib_9Timestamp_fromordinal[] = " passed an ordinal, translate and convert to a ts\n note: by definition there cannot be any tz info on the ordinal itself "; static PyMethodDef __pyx_mdef_6pandas_5tslib_9Timestamp_1fromordinal = {__Pyx_NAMESTR("fromordinal"), (PyCFunction)__pyx_pw_6pandas_5tslib_9Timestamp_1fromordinal, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_5tslib_9Timestamp_fromordinal)}; static PyObject *__pyx_pw_6pandas_5tslib_9Timestamp_1fromordinal(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_cls = 0; PyObject *__pyx_v_ordinal = 0; PyObject *__pyx_v_offset = 0; PyObject *__pyx_v_tz = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("fromordinal (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_cls,&__pyx_n_s_ordinal,&__pyx_n_s_offset,&__pyx_n_s_tz,0}; PyObject* values[4] = {0,0,0,0}; values[2] = ((PyObject *)((PyObject *)Py_None)); values[3] = ((PyObject *)((PyObject *)Py_None)); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_cls)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ordinal)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("fromordinal", 0, 2, 4, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 150; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_offset); if (value) { values[2] = value; kw_args--; } } case 3: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_tz); if (value) { values[3] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "fromordinal") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 150; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_cls = values[0]; __pyx_v_ordinal = values[1]; __pyx_v_offset = values[2]; __pyx_v_tz = values[3]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("fromordinal", 0, 2, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 150; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.tslib.Timestamp.fromordinal", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pandas_5tslib_9Timestamp_fromordinal(__pyx_self, __pyx_v_cls, __pyx_v_ordinal, __pyx_v_offset, __pyx_v_tz); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5tslib_9Timestamp_fromordinal(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_ordinal, PyObject *__pyx_v_offset, PyObject *__pyx_v_tz) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("fromordinal", 0); /* "pandas/tslib.pyx":153 * """ passed an ordinal, translate and convert to a ts * note: by definition there cannot be any tz info on the ordinal itself """ * return cls(datetime.fromordinal(ordinal),offset=offset,tz=tz) # <<<<<<<<<<<<<< * * @classmethod */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)((PyObject*)__pyx_ptype_8datetime_datetime)), __pyx_n_s_fromordinal); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 153; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 153; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_ordinal); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_ordinal); __Pyx_GIVEREF(__pyx_v_ordinal); __pyx_t_3 = PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 153; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 153; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 153; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_offset, __pyx_v_offset) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 153; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_tz, __pyx_v_tz) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 153; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_1 = PyObject_Call(__pyx_v_cls, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 153; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "pandas/tslib.pyx":150 * * @classmethod * def fromordinal(cls, ordinal, offset=None, tz=None): # <<<<<<<<<<<<<< * """ passed an ordinal, translate and convert to a ts * note: by definition there cannot be any tz info on the ordinal itself """ */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("pandas.tslib.Timestamp.fromordinal", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/tslib.pyx":156 * * @classmethod * def now(cls, tz=None): # <<<<<<<<<<<<<< * """ compat now with datetime """ * if isinstance(tz, basestring): */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5tslib_9Timestamp_3now(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6pandas_5tslib_9Timestamp_2now[] = " compat now with datetime "; static PyMethodDef __pyx_mdef_6pandas_5tslib_9Timestamp_3now = {__Pyx_NAMESTR("now"), (PyCFunction)__pyx_pw_6pandas_5tslib_9Timestamp_3now, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_5tslib_9Timestamp_2now)}; static PyObject *__pyx_pw_6pandas_5tslib_9Timestamp_3now(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_cls = 0; PyObject *__pyx_v_tz = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("now (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_cls,&__pyx_n_s_tz,0}; PyObject* values[2] = {0,0}; values[1] = ((PyObject *)((PyObject *)Py_None)); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_cls)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_tz); if (value) { values[1] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "now") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 156; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_cls = values[0]; __pyx_v_tz = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("now", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 156; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.tslib.Timestamp.now", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pandas_5tslib_9Timestamp_2now(__pyx_self, __pyx_v_cls, __pyx_v_tz); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5tslib_9Timestamp_2now(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_tz) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("now", 0); __Pyx_INCREF(__pyx_v_tz); /* "pandas/tslib.pyx":158 * def now(cls, tz=None): * """ compat now with datetime """ * if isinstance(tz, basestring): # <<<<<<<<<<<<<< * tz = pytz.timezone(tz) * return cls(datetime.now(tz)) */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_basestring); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 158; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyObject_IsInstance(__pyx_v_tz, __pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 158; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { /* "pandas/tslib.pyx":159 * """ compat now with datetime """ * if isinstance(tz, basestring): * tz = pytz.timezone(tz) # <<<<<<<<<<<<<< * return cls(datetime.now(tz)) * */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_pytz); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 159; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_timezone); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 159; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 159; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_tz); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_tz); __Pyx_GIVEREF(__pyx_v_tz); __pyx_t_5 = PyObject_Call(__pyx_t_4, __pyx_t_1, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 159; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF_SET(__pyx_v_tz, __pyx_t_5); __pyx_t_5 = 0; goto __pyx_L3; } __pyx_L3:; /* "pandas/tslib.pyx":160 * if isinstance(tz, basestring): * tz = pytz.timezone(tz) * return cls(datetime.now(tz)) # <<<<<<<<<<<<<< * * @classmethod */ __Pyx_XDECREF(__pyx_r); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)((PyObject*)__pyx_ptype_8datetime_datetime)), __pyx_n_s_now); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 160; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 160; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_tz); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_tz); __Pyx_GIVEREF(__pyx_v_tz); __pyx_t_4 = PyObject_Call(__pyx_t_5, __pyx_t_1, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 160; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 160; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyObject_Call(__pyx_v_cls, __pyx_t_1, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 160; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; /* "pandas/tslib.pyx":156 * * @classmethod * def now(cls, tz=None): # <<<<<<<<<<<<<< * """ compat now with datetime """ * if isinstance(tz, basestring): */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("pandas.tslib.Timestamp.now", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_tz); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/tslib.pyx":163 * * @classmethod * def today(cls): # <<<<<<<<<<<<<< * """ compat today with datetime """ * return cls(datetime.today()) */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5tslib_9Timestamp_5today(PyObject *__pyx_self, PyObject *__pyx_v_cls); /*proto*/ static char __pyx_doc_6pandas_5tslib_9Timestamp_4today[] = " compat today with datetime "; static PyMethodDef __pyx_mdef_6pandas_5tslib_9Timestamp_5today = {__Pyx_NAMESTR("today"), (PyCFunction)__pyx_pw_6pandas_5tslib_9Timestamp_5today, METH_O, __Pyx_DOCSTR(__pyx_doc_6pandas_5tslib_9Timestamp_4today)}; static PyObject *__pyx_pw_6pandas_5tslib_9Timestamp_5today(PyObject *__pyx_self, PyObject *__pyx_v_cls) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("today (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_5tslib_9Timestamp_4today(__pyx_self, ((PyObject *)__pyx_v_cls)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5tslib_9Timestamp_4today(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("today", 0); /* "pandas/tslib.pyx":165 * def today(cls): * """ compat today with datetime """ * return cls(datetime.today()) # <<<<<<<<<<<<<< * * @classmethod */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)((PyObject*)__pyx_ptype_8datetime_datetime)), __pyx_n_s_today); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 165; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyObject_Call(__pyx_t_1, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 165; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 165; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_Call(__pyx_v_cls, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 165; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "pandas/tslib.pyx":163 * * @classmethod * def today(cls): # <<<<<<<<<<<<<< * """ compat today with datetime """ * return cls(datetime.today()) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("pandas.tslib.Timestamp.today", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/tslib.pyx":168 * * @classmethod * def utcnow(cls): # <<<<<<<<<<<<<< * return cls.now('UTC') * */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5tslib_9Timestamp_7utcnow(PyObject *__pyx_self, PyObject *__pyx_v_cls); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5tslib_9Timestamp_7utcnow = {__Pyx_NAMESTR("utcnow"), (PyCFunction)__pyx_pw_6pandas_5tslib_9Timestamp_7utcnow, METH_O, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5tslib_9Timestamp_7utcnow(PyObject *__pyx_self, PyObject *__pyx_v_cls) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("utcnow (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_5tslib_9Timestamp_6utcnow(__pyx_self, ((PyObject *)__pyx_v_cls)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5tslib_9Timestamp_6utcnow(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("utcnow", 0); /* "pandas/tslib.pyx":169 * @classmethod * def utcnow(cls): * return cls.now('UTC') # <<<<<<<<<<<<<< * * def __new__(cls, object ts_input, object offset=None, tz=None, unit=None): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_cls, __pyx_n_s_now); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 169; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyObject_Call(__pyx_t_1, __pyx_tuple_, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 169; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "pandas/tslib.pyx":168 * * @classmethod * def utcnow(cls): # <<<<<<<<<<<<<< * return cls.now('UTC') * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("pandas.tslib.Timestamp.utcnow", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/tslib.pyx":171 * return cls.now('UTC') * * def __new__(cls, object ts_input, object offset=None, tz=None, unit=None): # <<<<<<<<<<<<<< * cdef _TSObject ts * cdef _Timestamp ts_base */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5tslib_9Timestamp_9__new__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5tslib_9Timestamp_9__new__ = {__Pyx_NAMESTR("__new__"), (PyCFunction)__pyx_pw_6pandas_5tslib_9Timestamp_9__new__, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5tslib_9Timestamp_9__new__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_cls = 0; PyObject *__pyx_v_ts_input = 0; PyObject *__pyx_v_offset = 0; PyObject *__pyx_v_tz = 0; PyObject *__pyx_v_unit = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__new__ (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_cls,&__pyx_n_s_ts_input,&__pyx_n_s_offset,&__pyx_n_s_tz,&__pyx_n_s_unit,0}; PyObject* values[5] = {0,0,0,0,0}; values[2] = ((PyObject *)((PyObject *)Py_None)); values[3] = ((PyObject *)((PyObject *)Py_None)); values[4] = ((PyObject *)((PyObject *)Py_None)); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_cls)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ts_input)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("__new__", 0, 2, 5, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 171; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_offset); if (value) { values[2] = value; kw_args--; } } case 3: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_tz); if (value) { values[3] = value; kw_args--; } } case 4: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_unit); if (value) { values[4] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__new__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 171; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_cls = values[0]; __pyx_v_ts_input = values[1]; __pyx_v_offset = values[2]; __pyx_v_tz = values[3]; __pyx_v_unit = values[4]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("__new__", 0, 2, 5, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 171; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.tslib.Timestamp.__new__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pandas_5tslib_9Timestamp_8__new__(__pyx_self, __pyx_v_cls, __pyx_v_ts_input, __pyx_v_offset, __pyx_v_tz, __pyx_v_unit); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5tslib_9Timestamp_8__new__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_ts_input, PyObject *__pyx_v_offset, PyObject *__pyx_v_tz, PyObject *__pyx_v_unit) { struct __pyx_obj_6pandas_5tslib__TSObject *__pyx_v_ts = 0; struct __pyx_obj_6pandas_5tslib__Timestamp *__pyx_v_ts_base = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; int __pyx_t_8; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; PyObject *__pyx_t_11 = NULL; PyObject *__pyx_t_12 = NULL; PyObject *__pyx_t_13 = NULL; PyObject *__pyx_t_14 = NULL; __pyx_t_5numpy_int64_t __pyx_t_15; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__new__", 0); __Pyx_INCREF(__pyx_v_ts_input); /* "pandas/tslib.pyx":175 * cdef _Timestamp ts_base * * if util.is_string_object(ts_input): # <<<<<<<<<<<<<< * try: * ts_input = parse_date(ts_input) */ __pyx_t_1 = (is_string_object(__pyx_v_ts_input) != 0); if (__pyx_t_1) { /* "pandas/tslib.pyx":176 * * if util.is_string_object(ts_input): * try: # <<<<<<<<<<<<<< * ts_input = parse_date(ts_input) * except Exception: */ { __Pyx_ExceptionSave(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4); __Pyx_XGOTREF(__pyx_t_2); __Pyx_XGOTREF(__pyx_t_3); __Pyx_XGOTREF(__pyx_t_4); /*try:*/ { /* "pandas/tslib.pyx":177 * if util.is_string_object(ts_input): * try: * ts_input = parse_date(ts_input) # <<<<<<<<<<<<<< * except Exception: * pass */ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_parse_date); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 177; __pyx_clineno = __LINE__; goto __pyx_L4_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 177; __pyx_clineno = __LINE__; goto __pyx_L4_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(__pyx_v_ts_input); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_ts_input); __Pyx_GIVEREF(__pyx_v_ts_input); __pyx_t_7 = PyObject_Call(__pyx_t_5, __pyx_t_6, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 177; __pyx_clineno = __LINE__; goto __pyx_L4_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF_SET(__pyx_v_ts_input, __pyx_t_7); __pyx_t_7 = 0; } __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; goto __pyx_L11_try_end; __pyx_L4_error:; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; /* "pandas/tslib.pyx":178 * try: * ts_input = parse_date(ts_input) * except Exception: # <<<<<<<<<<<<<< * pass * */ __pyx_t_8 = PyErr_ExceptionMatches(__pyx_builtin_Exception); if (__pyx_t_8) { PyErr_Restore(0,0,0); goto __pyx_L5_exception_handled; } goto __pyx_L6_except_error; __pyx_L6_except_error:; __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_XGIVEREF(__pyx_t_4); __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4); goto __pyx_L1_error; __pyx_L5_exception_handled:; __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_XGIVEREF(__pyx_t_4); __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4); __pyx_L11_try_end:; } goto __pyx_L3; } __pyx_L3:; /* "pandas/tslib.pyx":181 * pass * * ts = convert_to_tsobject(ts_input, tz, unit) # <<<<<<<<<<<<<< * * if ts.value == NPY_NAT: */ __pyx_t_7 = __pyx_f_6pandas_5tslib_convert_to_tsobject(__pyx_v_ts_input, __pyx_v_tz, __pyx_v_unit); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 181; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); if (!(likely(((__pyx_t_7) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_7, __pyx_ptype_6pandas_5tslib__TSObject))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 181; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_ts = ((struct __pyx_obj_6pandas_5tslib__TSObject *)__pyx_t_7); __pyx_t_7 = 0; /* "pandas/tslib.pyx":183 * ts = convert_to_tsobject(ts_input, tz, unit) * * if ts.value == NPY_NAT: # <<<<<<<<<<<<<< * return NaT * */ __pyx_t_1 = ((__pyx_v_ts->value == __pyx_v_6pandas_5tslib_NPY_NAT) != 0); if (__pyx_t_1) { /* "pandas/tslib.pyx":184 * * if ts.value == NPY_NAT: * return NaT # <<<<<<<<<<<<<< * * # make datetime happy */ __Pyx_XDECREF(__pyx_r); __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_NaT); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 184; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_r = __pyx_t_7; __pyx_t_7 = 0; goto __pyx_L0; } /* "pandas/tslib.pyx":187 * * # make datetime happy * ts_base = _Timestamp.__new__(cls, ts.dts.year, ts.dts.month, # <<<<<<<<<<<<<< * ts.dts.day, ts.dts.hour, ts.dts.min, * ts.dts.sec, ts.dts.us, ts.tzinfo) */ __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)((PyObject*)__pyx_ptype_6pandas_5tslib__Timestamp)), __pyx_n_s_new); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 187; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_t_6 = __Pyx_PyInt_From_npy_int64(__pyx_v_ts->dts.year); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 187; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_5 = __Pyx_PyInt_From_npy_int32(__pyx_v_ts->dts.month); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 187; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); /* "pandas/tslib.pyx":188 * # make datetime happy * ts_base = _Timestamp.__new__(cls, ts.dts.year, ts.dts.month, * ts.dts.day, ts.dts.hour, ts.dts.min, # <<<<<<<<<<<<<< * ts.dts.sec, ts.dts.us, ts.tzinfo) * */ __pyx_t_9 = __Pyx_PyInt_From_npy_int32(__pyx_v_ts->dts.day); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 188; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_t_10 = __Pyx_PyInt_From_npy_int32(__pyx_v_ts->dts.hour); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 188; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __pyx_t_11 = __Pyx_PyInt_From_npy_int32(__pyx_v_ts->dts.min); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 188; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); /* "pandas/tslib.pyx":189 * ts_base = _Timestamp.__new__(cls, ts.dts.year, ts.dts.month, * ts.dts.day, ts.dts.hour, ts.dts.min, * ts.dts.sec, ts.dts.us, ts.tzinfo) # <<<<<<<<<<<<<< * * # fill out rest of data */ __pyx_t_12 = __Pyx_PyInt_From_npy_int32(__pyx_v_ts->dts.sec); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 189; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __pyx_t_13 = __Pyx_PyInt_From_npy_int32(__pyx_v_ts->dts.us); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 189; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); /* "pandas/tslib.pyx":187 * * # make datetime happy * ts_base = _Timestamp.__new__(cls, ts.dts.year, ts.dts.month, # <<<<<<<<<<<<<< * ts.dts.day, ts.dts.hour, ts.dts.min, * ts.dts.sec, ts.dts.us, ts.tzinfo) */ __pyx_t_14 = PyTuple_New(9); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 187; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_14); __Pyx_INCREF(__pyx_v_cls); PyTuple_SET_ITEM(__pyx_t_14, 0, __pyx_v_cls); __Pyx_GIVEREF(__pyx_v_cls); PyTuple_SET_ITEM(__pyx_t_14, 1, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_14, 2, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_14, 3, __pyx_t_9); __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_14, 4, __pyx_t_10); __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_14, 5, __pyx_t_11); __Pyx_GIVEREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_14, 6, __pyx_t_12); __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_14, 7, __pyx_t_13); __Pyx_GIVEREF(__pyx_t_13); __Pyx_INCREF(__pyx_v_ts->tzinfo); PyTuple_SET_ITEM(__pyx_t_14, 8, __pyx_v_ts->tzinfo); __Pyx_GIVEREF(__pyx_v_ts->tzinfo); __pyx_t_6 = 0; __pyx_t_5 = 0; __pyx_t_9 = 0; __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_13 = PyObject_Call(__pyx_t_7, __pyx_t_14, NULL); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 187; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; if (!(likely(((__pyx_t_13) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_13, __pyx_ptype_6pandas_5tslib__Timestamp))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 187; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_ts_base = ((struct __pyx_obj_6pandas_5tslib__Timestamp *)__pyx_t_13); __pyx_t_13 = 0; /* "pandas/tslib.pyx":192 * * # fill out rest of data * ts_base.value = ts.value # <<<<<<<<<<<<<< * ts_base.offset = offset * ts_base.nanosecond = ts.dts.ps / 1000 */ __pyx_t_15 = __pyx_v_ts->value; __pyx_v_ts_base->value = __pyx_t_15; /* "pandas/tslib.pyx":193 * # fill out rest of data * ts_base.value = ts.value * ts_base.offset = offset # <<<<<<<<<<<<<< * ts_base.nanosecond = ts.dts.ps / 1000 * */ __Pyx_INCREF(__pyx_v_offset); __Pyx_GIVEREF(__pyx_v_offset); __Pyx_GOTREF(__pyx_v_ts_base->offset); __Pyx_DECREF(__pyx_v_ts_base->offset); __pyx_v_ts_base->offset = __pyx_v_offset; /* "pandas/tslib.pyx":194 * ts_base.value = ts.value * ts_base.offset = offset * ts_base.nanosecond = ts.dts.ps / 1000 # <<<<<<<<<<<<<< * * return ts_base */ __pyx_v_ts_base->nanosecond = __Pyx_div_long(__pyx_v_ts->dts.ps, 1000); /* "pandas/tslib.pyx":196 * ts_base.nanosecond = ts.dts.ps / 1000 * * return ts_base # <<<<<<<<<<<<<< * * def __repr__(self): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_ts_base)); __pyx_r = ((PyObject *)__pyx_v_ts_base); goto __pyx_L0; /* "pandas/tslib.pyx":171 * return cls.now('UTC') * * def __new__(cls, object ts_input, object offset=None, tz=None, unit=None): # <<<<<<<<<<<<<< * cdef _TSObject ts * cdef _Timestamp ts_base */ /* 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_9); __Pyx_XDECREF(__pyx_t_10); __Pyx_XDECREF(__pyx_t_11); __Pyx_XDECREF(__pyx_t_12); __Pyx_XDECREF(__pyx_t_13); __Pyx_XDECREF(__pyx_t_14); __Pyx_AddTraceback("pandas.tslib.Timestamp.__new__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_ts); __Pyx_XDECREF((PyObject *)__pyx_v_ts_base); __Pyx_XDECREF(__pyx_v_ts_input); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/tslib.pyx":198 * return ts_base * * def __repr__(self): # <<<<<<<<<<<<<< * result = self._repr_base * zone = None */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5tslib_9Timestamp_11__repr__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5tslib_9Timestamp_11__repr__ = {__Pyx_NAMESTR("__repr__"), (PyCFunction)__pyx_pw_6pandas_5tslib_9Timestamp_11__repr__, METH_O, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5tslib_9Timestamp_11__repr__(PyObject *__pyx_self, PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_5tslib_9Timestamp_10__repr__(__pyx_self, ((PyObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5tslib_9Timestamp_10__repr__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) { PyObject *__pyx_v_result = NULL; PyObject *__pyx_v_zone = NULL; PyObject *__pyx_v_year2000 = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; int __pyx_t_6; int __pyx_t_7; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; PyObject *__pyx_t_11 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__repr__", 0); /* "pandas/tslib.pyx":199 * * def __repr__(self): * result = self._repr_base # <<<<<<<<<<<<<< * zone = None * */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_repr_base); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 199; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_v_result = __pyx_t_1; __pyx_t_1 = 0; /* "pandas/tslib.pyx":200 * def __repr__(self): * result = self._repr_base * zone = None # <<<<<<<<<<<<<< * * try: */ __Pyx_INCREF(Py_None); __pyx_v_zone = Py_None; /* "pandas/tslib.pyx":202 * zone = None * * try: # <<<<<<<<<<<<<< * result += self.strftime('%z') * if self.tzinfo: */ { __Pyx_ExceptionSave(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4); __Pyx_XGOTREF(__pyx_t_2); __Pyx_XGOTREF(__pyx_t_3); __Pyx_XGOTREF(__pyx_t_4); /*try:*/ { /* "pandas/tslib.pyx":203 * * try: * result += self.strftime('%z') # <<<<<<<<<<<<<< * if self.tzinfo: * zone = _get_zone(self.tzinfo) */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_strftime); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 203; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_5 = PyObject_Call(__pyx_t_1, __pyx_tuple__2, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 203; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_result, __pyx_t_5); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 203; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF_SET(__pyx_v_result, __pyx_t_1); __pyx_t_1 = 0; /* "pandas/tslib.pyx":204 * try: * result += self.strftime('%z') * if self.tzinfo: # <<<<<<<<<<<<<< * zone = _get_zone(self.tzinfo) * except ValueError: */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_tzinfo); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 204; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 204; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_6) { /* "pandas/tslib.pyx":205 * result += self.strftime('%z') * if self.tzinfo: * zone = _get_zone(self.tzinfo) # <<<<<<<<<<<<<< * except ValueError: * year2000 = self.replace(year=2000) */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_tzinfo); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 205; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_5 = __pyx_f_6pandas_5tslib__get_zone(__pyx_t_1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 205; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF_SET(__pyx_v_zone, __pyx_t_5); __pyx_t_5 = 0; goto __pyx_L11; } __pyx_L11:; } __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; goto __pyx_L10_try_end; __pyx_L3_error:; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; /* "pandas/tslib.pyx":206 * if self.tzinfo: * zone = _get_zone(self.tzinfo) * except ValueError: # <<<<<<<<<<<<<< * year2000 = self.replace(year=2000) * result += year2000.strftime('%z') */ __pyx_t_7 = PyErr_ExceptionMatches(__pyx_builtin_ValueError); if (__pyx_t_7) { __Pyx_AddTraceback("pandas.tslib.Timestamp.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_1, &__pyx_t_8) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 206; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_GOTREF(__pyx_t_1); __Pyx_GOTREF(__pyx_t_8); /* "pandas/tslib.pyx":207 * zone = _get_zone(self.tzinfo) * except ValueError: * year2000 = self.replace(year=2000) # <<<<<<<<<<<<<< * result += year2000.strftime('%z') * if self.tzinfo: */ __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_replace); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 207; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_t_10 = PyDict_New(); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 207; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} __Pyx_GOTREF(__pyx_t_10); if (PyDict_SetItem(__pyx_t_10, __pyx_n_s_year, __pyx_int_2000) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 207; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} __pyx_t_11 = PyObject_Call(__pyx_t_9, __pyx_empty_tuple, __pyx_t_10); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 207; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_v_year2000 = __pyx_t_11; __pyx_t_11 = 0; /* "pandas/tslib.pyx":208 * except ValueError: * year2000 = self.replace(year=2000) * result += year2000.strftime('%z') # <<<<<<<<<<<<<< * if self.tzinfo: * zone = _get_zone(self.tzinfo) */ __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_year2000, __pyx_n_s_strftime); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 208; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} __Pyx_GOTREF(__pyx_t_11); __pyx_t_10 = PyObject_Call(__pyx_t_11, __pyx_tuple__3, NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 208; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __pyx_t_11 = PyNumber_InPlaceAdd(__pyx_v_result, __pyx_t_10); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 208; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF_SET(__pyx_v_result, __pyx_t_11); __pyx_t_11 = 0; /* "pandas/tslib.pyx":209 * year2000 = self.replace(year=2000) * result += year2000.strftime('%z') * if self.tzinfo: # <<<<<<<<<<<<<< * zone = _get_zone(self.tzinfo) * */ __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_tzinfo); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 209; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} __Pyx_GOTREF(__pyx_t_11); __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_11); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 209; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; if (__pyx_t_6) { /* "pandas/tslib.pyx":210 * result += year2000.strftime('%z') * if self.tzinfo: * zone = _get_zone(self.tzinfo) # <<<<<<<<<<<<<< * * try: */ __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_tzinfo); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 210; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} __Pyx_GOTREF(__pyx_t_11); __pyx_t_10 = __pyx_f_6pandas_5tslib__get_zone(__pyx_t_11); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 210; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF_SET(__pyx_v_zone, __pyx_t_10); __pyx_t_10 = 0; goto __pyx_L14; } __pyx_L14:; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; goto __pyx_L4_exception_handled; } goto __pyx_L5_except_error; __pyx_L5_except_error:; __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_XGIVEREF(__pyx_t_4); __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4); goto __pyx_L1_error; __pyx_L4_exception_handled:; __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_XGIVEREF(__pyx_t_4); __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4); __pyx_L10_try_end:; } /* "pandas/tslib.pyx":212 * zone = _get_zone(self.tzinfo) * * try: # <<<<<<<<<<<<<< * result += zone.strftime(' %%Z') * except: */ { __Pyx_ExceptionSave(&__pyx_t_4, &__pyx_t_3, &__pyx_t_2); __Pyx_XGOTREF(__pyx_t_4); __Pyx_XGOTREF(__pyx_t_3); __Pyx_XGOTREF(__pyx_t_2); /*try:*/ { /* "pandas/tslib.pyx":213 * * try: * result += zone.strftime(' %%Z') # <<<<<<<<<<<<<< * except: * pass */ __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_zone, __pyx_n_s_strftime); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 213; __pyx_clineno = __LINE__; goto __pyx_L15_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_1 = PyObject_Call(__pyx_t_8, __pyx_tuple__4, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 213; __pyx_clineno = __LINE__; goto __pyx_L15_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_8 = PyNumber_InPlaceAdd(__pyx_v_result, __pyx_t_1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 213; __pyx_clineno = __LINE__; goto __pyx_L15_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF_SET(__pyx_v_result, __pyx_t_8); __pyx_t_8 = 0; } __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; goto __pyx_L22_try_end; __pyx_L15_error:; __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; /* "pandas/tslib.pyx":214 * try: * result += zone.strftime(' %%Z') * except: # <<<<<<<<<<<<<< * pass * zone = "'%s'" % zone if zone else 'None' */ /*except:*/ { PyErr_Restore(0,0,0); goto __pyx_L16_exception_handled; } __pyx_L16_exception_handled:; __Pyx_XGIVEREF(__pyx_t_4); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_ExceptionReset(__pyx_t_4, __pyx_t_3, __pyx_t_2); __pyx_L22_try_end:; } /* "pandas/tslib.pyx":216 * except: * pass * zone = "'%s'" % zone if zone else 'None' # <<<<<<<<<<<<<< * * return "Timestamp('%s', tz=%s)" % (result, zone) */ __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_zone); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 216; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__pyx_t_6) { __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_s, __pyx_v_zone); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 216; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_8 = __pyx_t_1; __pyx_t_1 = 0; } else { __Pyx_INCREF(__pyx_n_s_None); __pyx_t_8 = __pyx_n_s_None; } __Pyx_DECREF_SET(__pyx_v_zone, __pyx_t_8); __pyx_t_8 = 0; /* "pandas/tslib.pyx":218 * zone = "'%s'" % zone if zone else 'None' * * return "Timestamp('%s', tz=%s)" % (result, zone) # <<<<<<<<<<<<<< * * @property */ __Pyx_XDECREF(__pyx_r); __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 218; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_INCREF(__pyx_v_result); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_v_result); __Pyx_GIVEREF(__pyx_v_result); __Pyx_INCREF(__pyx_v_zone); PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_v_zone); __Pyx_GIVEREF(__pyx_v_zone); __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_Timestamp_s_tz_s, __pyx_t_8); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 218; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "pandas/tslib.pyx":198 * return ts_base * * def __repr__(self): # <<<<<<<<<<<<<< * result = self._repr_base * zone = None */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); __Pyx_XDECREF(__pyx_t_10); __Pyx_XDECREF(__pyx_t_11); __Pyx_AddTraceback("pandas.tslib.Timestamp.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_result); __Pyx_XDECREF(__pyx_v_zone); __Pyx_XDECREF(__pyx_v_year2000); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/tslib.pyx":221 * * @property * def _date_repr(self): # <<<<<<<<<<<<<< * # Ideal here would be self.strftime("%Y-%m-%d"), but * # the datetime strftime() methods require year >= 1900 */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5tslib_9Timestamp_13_date_repr(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5tslib_9Timestamp_13_date_repr = {__Pyx_NAMESTR("_date_repr"), (PyCFunction)__pyx_pw_6pandas_5tslib_9Timestamp_13_date_repr, METH_O, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5tslib_9Timestamp_13_date_repr(PyObject *__pyx_self, PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_date_repr (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_5tslib_9Timestamp_12_date_repr(__pyx_self, ((PyObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5tslib_9Timestamp_12_date_repr(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_date_repr", 0); /* "pandas/tslib.pyx":224 * # Ideal here would be self.strftime("%Y-%m-%d"), but * # the datetime strftime() methods require year >= 1900 * return '%d-%.2d-%.2d' % (self.year, self.month, self.day) # <<<<<<<<<<<<<< * * @property */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_year); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 224; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_month); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 224; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_day); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 224; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 224; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_1 = 0; __pyx_t_2 = 0; __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyString_Format(__pyx_kp_s_d_2d_2d, __pyx_t_4); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 224; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; /* "pandas/tslib.pyx":221 * * @property * def _date_repr(self): # <<<<<<<<<<<<<< * # Ideal here would be self.strftime("%Y-%m-%d"), but * # the datetime strftime() methods require year >= 1900 */ /* 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.tslib.Timestamp._date_repr", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/tslib.pyx":227 * * @property * def _time_repr(self): # <<<<<<<<<<<<<< * result = '%.2d:%.2d:%.2d' % (self.hour, self.minute, self.second) * */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5tslib_9Timestamp_15_time_repr(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5tslib_9Timestamp_15_time_repr = {__Pyx_NAMESTR("_time_repr"), (PyCFunction)__pyx_pw_6pandas_5tslib_9Timestamp_15_time_repr, METH_O, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5tslib_9Timestamp_15_time_repr(PyObject *__pyx_self, PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_time_repr (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_5tslib_9Timestamp_14_time_repr(__pyx_self, ((PyObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5tslib_9Timestamp_14_time_repr(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) { PyObject *__pyx_v_result = NULL; PyObject *__pyx_v_nanos = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; int __pyx_t_5; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_time_repr", 0); /* "pandas/tslib.pyx":228 * @property * def _time_repr(self): * result = '%.2d:%.2d:%.2d' % (self.hour, self.minute, self.second) # <<<<<<<<<<<<<< * * if self.nanosecond != 0: */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_hour); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 228; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_minute); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 228; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_second); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 228; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 228; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_1 = 0; __pyx_t_2 = 0; __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyString_Format(__pyx_kp_s_2d_2d_2d, __pyx_t_4); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 228; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_result = ((PyObject*)__pyx_t_3); __pyx_t_3 = 0; /* "pandas/tslib.pyx":230 * result = '%.2d:%.2d:%.2d' % (self.hour, self.minute, self.second) * * if self.nanosecond != 0: # <<<<<<<<<<<<<< * nanos = self.nanosecond + 1000 * self.microsecond * result += '.%.9d' % nanos */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_nanosecond); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 230; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PyObject_RichCompare(__pyx_t_3, __pyx_int_0, Py_NE); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 230; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 230; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_5) { /* "pandas/tslib.pyx":231 * * if self.nanosecond != 0: * nanos = self.nanosecond + 1000 * self.microsecond # <<<<<<<<<<<<<< * result += '.%.9d' % nanos * elif self.microsecond != 0: */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_nanosecond); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 231; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_microsecond); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 231; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = PyNumber_Multiply(__pyx_int_1000, __pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 231; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyNumber_Add(__pyx_t_4, __pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 231; __pyx_clineno = __LINE__; goto __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_nanos = __pyx_t_3; __pyx_t_3 = 0; /* "pandas/tslib.pyx":232 * if self.nanosecond != 0: * nanos = self.nanosecond + 1000 * self.microsecond * result += '.%.9d' % nanos # <<<<<<<<<<<<<< * elif self.microsecond != 0: * result += '.%.6d' % self.microsecond */ __pyx_t_3 = __Pyx_PyString_Format(__pyx_kp_s_9d, __pyx_v_nanos); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 232; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_result, __pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 232; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF_SET(__pyx_v_result, ((PyObject*)__pyx_t_2)); __pyx_t_2 = 0; goto __pyx_L3; } /* "pandas/tslib.pyx":233 * nanos = self.nanosecond + 1000 * self.microsecond * result += '.%.9d' % nanos * elif self.microsecond != 0: # <<<<<<<<<<<<<< * result += '.%.6d' % self.microsecond * */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_microsecond); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 233; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyObject_RichCompare(__pyx_t_2, __pyx_int_0, Py_NE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 233; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 233; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_5) { /* "pandas/tslib.pyx":234 * result += '.%.9d' % nanos * elif self.microsecond != 0: * result += '.%.6d' % self.microsecond # <<<<<<<<<<<<<< * * return result */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_microsecond); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 234; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_6d, __pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 234; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyNumber_InPlaceAdd(__pyx_v_result, __pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 234; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF_SET(__pyx_v_result, ((PyObject*)__pyx_t_3)); __pyx_t_3 = 0; goto __pyx_L3; } __pyx_L3:; /* "pandas/tslib.pyx":236 * result += '.%.6d' % self.microsecond * * return result # <<<<<<<<<<<<<< * * @property */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_result); __pyx_r = __pyx_v_result; goto __pyx_L0; /* "pandas/tslib.pyx":227 * * @property * def _time_repr(self): # <<<<<<<<<<<<<< * result = '%.2d:%.2d:%.2d' % (self.hour, self.minute, self.second) * */ /* 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.tslib.Timestamp._time_repr", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_result); __Pyx_XDECREF(__pyx_v_nanos); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/tslib.pyx":239 * * @property * def _repr_base(self): # <<<<<<<<<<<<<< * return '%s %s' % (self._date_repr, self._time_repr) * */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5tslib_9Timestamp_17_repr_base(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5tslib_9Timestamp_17_repr_base = {__Pyx_NAMESTR("_repr_base"), (PyCFunction)__pyx_pw_6pandas_5tslib_9Timestamp_17_repr_base, METH_O, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5tslib_9Timestamp_17_repr_base(PyObject *__pyx_self, PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_repr_base (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_5tslib_9Timestamp_16_repr_base(__pyx_self, ((PyObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5tslib_9Timestamp_16_repr_base(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_repr_base", 0); /* "pandas/tslib.pyx":240 * @property * def _repr_base(self): * return '%s %s' % (self._date_repr, self._time_repr) # <<<<<<<<<<<<<< * * @property */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_date_repr); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 240; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_time_repr); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 240; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 240; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_1 = 0; __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_s_s, __pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 240; __pyx_clineno = __LINE__; goto __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/tslib.pyx":239 * * @property * def _repr_base(self): # <<<<<<<<<<<<<< * return '%s %s' % (self._date_repr, self._time_repr) * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("pandas.tslib.Timestamp._repr_base", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/tslib.pyx":243 * * @property * def tz(self): # <<<<<<<<<<<<<< * """ * Alias for tzinfo */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5tslib_9Timestamp_19tz(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/ static char __pyx_doc_6pandas_5tslib_9Timestamp_18tz[] = "\n Alias for tzinfo\n "; static PyMethodDef __pyx_mdef_6pandas_5tslib_9Timestamp_19tz = {__Pyx_NAMESTR("tz"), (PyCFunction)__pyx_pw_6pandas_5tslib_9Timestamp_19tz, METH_O, __Pyx_DOCSTR(__pyx_doc_6pandas_5tslib_9Timestamp_18tz)}; static PyObject *__pyx_pw_6pandas_5tslib_9Timestamp_19tz(PyObject *__pyx_self, PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("tz (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_5tslib_9Timestamp_18tz(__pyx_self, ((PyObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5tslib_9Timestamp_18tz(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("tz", 0); /* "pandas/tslib.pyx":247 * Alias for tzinfo * """ * return self.tzinfo # <<<<<<<<<<<<<< * * @property */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_tzinfo); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 247; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "pandas/tslib.pyx":243 * * @property * def tz(self): # <<<<<<<<<<<<<< * """ * Alias for tzinfo */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas.tslib.Timestamp.tz", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/tslib.pyx":250 * * @property * def freq(self): # <<<<<<<<<<<<<< * return self.offset * */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5tslib_9Timestamp_21freq(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5tslib_9Timestamp_21freq = {__Pyx_NAMESTR("freq"), (PyCFunction)__pyx_pw_6pandas_5tslib_9Timestamp_21freq, METH_O, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5tslib_9Timestamp_21freq(PyObject *__pyx_self, PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("freq (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_5tslib_9Timestamp_20freq(__pyx_self, ((PyObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5tslib_9Timestamp_20freq(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("freq", 0); /* "pandas/tslib.pyx":251 * @property * def freq(self): * return self.offset # <<<<<<<<<<<<<< * * def __setstate__(self, state): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_offset); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 251; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "pandas/tslib.pyx":250 * * @property * def freq(self): # <<<<<<<<<<<<<< * return self.offset * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas.tslib.Timestamp.freq", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/tslib.pyx":253 * return self.offset * * def __setstate__(self, state): # <<<<<<<<<<<<<< * self.value = state[0] * self.offset = state[1] */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5tslib_9Timestamp_23__setstate__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5tslib_9Timestamp_23__setstate__ = {__Pyx_NAMESTR("__setstate__"), (PyCFunction)__pyx_pw_6pandas_5tslib_9Timestamp_23__setstate__, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5tslib_9Timestamp_23__setstate__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_self = 0; PyObject *__pyx_v_state = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__setstate__ (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_state,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_state)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("__setstate__", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 253; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__setstate__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 253; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } __pyx_v_self = values[0]; __pyx_v_state = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("__setstate__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 253; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.tslib.Timestamp.__setstate__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pandas_5tslib_9Timestamp_22__setstate__(__pyx_self, __pyx_v_self, __pyx_v_state); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5tslib_9Timestamp_22__setstate__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_state) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__setstate__", 0); /* "pandas/tslib.pyx":254 * * def __setstate__(self, state): * self.value = state[0] # <<<<<<<<<<<<<< * self.offset = state[1] * self.tzinfo = state[2] */ __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 254; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_1); if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_value, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 254; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pandas/tslib.pyx":255 * def __setstate__(self, state): * self.value = state[0] * self.offset = state[1] # <<<<<<<<<<<<<< * self.tzinfo = state[2] * */ __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 255; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_1); if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_offset, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 255; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pandas/tslib.pyx":256 * self.value = state[0] * self.offset = state[1] * self.tzinfo = state[2] # <<<<<<<<<<<<<< * * def __reduce__(self): */ __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 256; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_1); if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_tzinfo, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 256; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pandas/tslib.pyx":253 * return self.offset * * def __setstate__(self, state): # <<<<<<<<<<<<<< * self.value = state[0] * self.offset = state[1] */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas.tslib.Timestamp.__setstate__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/tslib.pyx":258 * self.tzinfo = state[2] * * def __reduce__(self): # <<<<<<<<<<<<<< * object_state = self.value, self.offset, self.tzinfo * return (Timestamp, object_state) */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5tslib_9Timestamp_25__reduce__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5tslib_9Timestamp_25__reduce__ = {__Pyx_NAMESTR("__reduce__"), (PyCFunction)__pyx_pw_6pandas_5tslib_9Timestamp_25__reduce__, METH_O, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5tslib_9Timestamp_25__reduce__(PyObject *__pyx_self, PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__reduce__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_5tslib_9Timestamp_24__reduce__(__pyx_self, ((PyObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5tslib_9Timestamp_24__reduce__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) { PyObject *__pyx_v_object_state = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__reduce__", 0); /* "pandas/tslib.pyx":259 * * def __reduce__(self): * object_state = self.value, self.offset, self.tzinfo # <<<<<<<<<<<<<< * return (Timestamp, object_state) * */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_value); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 259; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_offset); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 259; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_tzinfo); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 259; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 259; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_1 = 0; __pyx_t_2 = 0; __pyx_t_3 = 0; __pyx_v_object_state = ((PyObject*)__pyx_t_4); __pyx_t_4 = 0; /* "pandas/tslib.pyx":260 * def __reduce__(self): * object_state = self.value, self.offset, self.tzinfo * return (Timestamp, object_state) # <<<<<<<<<<<<<< * * def to_period(self, freq=None): */ __Pyx_XDECREF(__pyx_r); __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_Timestamp); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 260; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 260; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __Pyx_INCREF(__pyx_v_object_state); PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_object_state); __Pyx_GIVEREF(__pyx_v_object_state); __pyx_t_4 = 0; __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; /* "pandas/tslib.pyx":258 * self.tzinfo = state[2] * * def __reduce__(self): # <<<<<<<<<<<<<< * object_state = self.value, self.offset, self.tzinfo * return (Timestamp, object_state) */ /* 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.tslib.Timestamp.__reduce__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_object_state); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/tslib.pyx":262 * return (Timestamp, object_state) * * def to_period(self, freq=None): # <<<<<<<<<<<<<< * """ * Return an period of which this timestamp is an observation. */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5tslib_9Timestamp_27to_period(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6pandas_5tslib_9Timestamp_26to_period[] = "\n Return an period of which this timestamp is an observation.\n "; static PyMethodDef __pyx_mdef_6pandas_5tslib_9Timestamp_27to_period = {__Pyx_NAMESTR("to_period"), (PyCFunction)__pyx_pw_6pandas_5tslib_9Timestamp_27to_period, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_5tslib_9Timestamp_26to_period)}; static PyObject *__pyx_pw_6pandas_5tslib_9Timestamp_27to_period(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_self = 0; PyObject *__pyx_v_freq = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("to_period (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_freq,0}; PyObject* values[2] = {0,0}; values[1] = ((PyObject *)((PyObject *)Py_None)); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_freq); if (value) { values[1] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "to_period") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 262; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_self = values[0]; __pyx_v_freq = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("to_period", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 262; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.tslib.Timestamp.to_period", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pandas_5tslib_9Timestamp_26to_period(__pyx_self, __pyx_v_self, __pyx_v_freq); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5tslib_9Timestamp_26to_period(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_freq) { PyObject *__pyx_v_Period = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_t_3; int __pyx_t_4; PyObject *__pyx_t_5 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("to_period", 0); __Pyx_INCREF(__pyx_v_freq); /* "pandas/tslib.pyx":266 * Return an period of which this timestamp is an observation. * """ * from pandas.tseries.period import Period # <<<<<<<<<<<<<< * * if freq is None: */ __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 266; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_n_s_Period); PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_Period); __Pyx_GIVEREF(__pyx_n_s_Period); __pyx_t_2 = __Pyx_Import(__pyx_n_s_pandas_tseries_period, __pyx_t_1, -1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 266; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_Period); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 266; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_t_1); __pyx_v_Period = __pyx_t_1; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/tslib.pyx":268 * from pandas.tseries.period import Period * * if freq is None: # <<<<<<<<<<<<<< * freq = self.freq * */ __pyx_t_3 = (__pyx_v_freq == Py_None); __pyx_t_4 = (__pyx_t_3 != 0); if (__pyx_t_4) { /* "pandas/tslib.pyx":269 * * if freq is None: * freq = self.freq # <<<<<<<<<<<<<< * * return Period(self, freq=freq) */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_freq); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 269; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF_SET(__pyx_v_freq, __pyx_t_2); __pyx_t_2 = 0; goto __pyx_L3; } __pyx_L3:; /* "pandas/tslib.pyx":271 * freq = self.freq * * return Period(self, freq=freq) # <<<<<<<<<<<<<< * * @property */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 271; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_self); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_self); __Pyx_GIVEREF(__pyx_v_self); __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 271; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_freq, __pyx_v_freq) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 271; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_5 = PyObject_Call(__pyx_v_Period, __pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 271; __pyx_clineno = __LINE__; goto __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_r = __pyx_t_5; __pyx_t_5 = 0; goto __pyx_L0; /* "pandas/tslib.pyx":262 * return (Timestamp, object_state) * * def to_period(self, freq=None): # <<<<<<<<<<<<<< * """ * Return an period of which this timestamp is an observation. */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("pandas.tslib.Timestamp.to_period", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_Period); __Pyx_XDECREF(__pyx_v_freq); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/tslib.pyx":274 * * @property * def dayofweek(self): # <<<<<<<<<<<<<< * return self.weekday() * */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5tslib_9Timestamp_29dayofweek(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5tslib_9Timestamp_29dayofweek = {__Pyx_NAMESTR("dayofweek"), (PyCFunction)__pyx_pw_6pandas_5tslib_9Timestamp_29dayofweek, METH_O, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5tslib_9Timestamp_29dayofweek(PyObject *__pyx_self, PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("dayofweek (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_5tslib_9Timestamp_28dayofweek(__pyx_self, ((PyObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5tslib_9Timestamp_28dayofweek(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("dayofweek", 0); /* "pandas/tslib.pyx":275 * @property * def dayofweek(self): * return self.weekday() # <<<<<<<<<<<<<< * * @property */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_weekday); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 275; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyObject_Call(__pyx_t_1, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 275; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "pandas/tslib.pyx":274 * * @property * def dayofweek(self): # <<<<<<<<<<<<<< * return self.weekday() * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("pandas.tslib.Timestamp.dayofweek", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/tslib.pyx":278 * * @property * def dayofyear(self): # <<<<<<<<<<<<<< * return self._get_field('doy') * */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5tslib_9Timestamp_31dayofyear(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5tslib_9Timestamp_31dayofyear = {__Pyx_NAMESTR("dayofyear"), (PyCFunction)__pyx_pw_6pandas_5tslib_9Timestamp_31dayofyear, METH_O, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5tslib_9Timestamp_31dayofyear(PyObject *__pyx_self, PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("dayofyear (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_5tslib_9Timestamp_30dayofyear(__pyx_self, ((PyObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5tslib_9Timestamp_30dayofyear(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("dayofyear", 0); /* "pandas/tslib.pyx":279 * @property * def dayofyear(self): * return self._get_field('doy') # <<<<<<<<<<<<<< * * @property */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_get_field); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 279; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyObject_Call(__pyx_t_1, __pyx_tuple__5, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 279; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "pandas/tslib.pyx":278 * * @property * def dayofyear(self): # <<<<<<<<<<<<<< * return self._get_field('doy') * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("pandas.tslib.Timestamp.dayofyear", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/tslib.pyx":282 * * @property * def week(self): # <<<<<<<<<<<<<< * return self._get_field('woy') * */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5tslib_9Timestamp_33week(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5tslib_9Timestamp_33week = {__Pyx_NAMESTR("week"), (PyCFunction)__pyx_pw_6pandas_5tslib_9Timestamp_33week, METH_O, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5tslib_9Timestamp_33week(PyObject *__pyx_self, PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("week (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_5tslib_9Timestamp_32week(__pyx_self, ((PyObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5tslib_9Timestamp_32week(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("week", 0); /* "pandas/tslib.pyx":283 * @property * def week(self): * return self._get_field('woy') # <<<<<<<<<<<<<< * * weekofyear = week */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_get_field); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 283; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyObject_Call(__pyx_t_1, __pyx_tuple__6, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 283; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "pandas/tslib.pyx":282 * * @property * def week(self): # <<<<<<<<<<<<<< * return self._get_field('woy') * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("pandas.tslib.Timestamp.week", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/tslib.pyx":288 * * @property * def quarter(self): # <<<<<<<<<<<<<< * return self._get_field('q') * */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5tslib_9Timestamp_35quarter(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5tslib_9Timestamp_35quarter = {__Pyx_NAMESTR("quarter"), (PyCFunction)__pyx_pw_6pandas_5tslib_9Timestamp_35quarter, METH_O, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5tslib_9Timestamp_35quarter(PyObject *__pyx_self, PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("quarter (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_5tslib_9Timestamp_34quarter(__pyx_self, ((PyObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5tslib_9Timestamp_34quarter(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("quarter", 0); /* "pandas/tslib.pyx":289 * @property * def quarter(self): * return self._get_field('q') # <<<<<<<<<<<<<< * * @property */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_get_field); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 289; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyObject_Call(__pyx_t_1, __pyx_tuple__7, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 289; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "pandas/tslib.pyx":288 * * @property * def quarter(self): # <<<<<<<<<<<<<< * return self._get_field('q') * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("pandas.tslib.Timestamp.quarter", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/tslib.pyx":292 * * @property * def freqstr(self): # <<<<<<<<<<<<<< * return getattr(self.offset, 'freqstr', self.offset) * */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5tslib_9Timestamp_37freqstr(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5tslib_9Timestamp_37freqstr = {__Pyx_NAMESTR("freqstr"), (PyCFunction)__pyx_pw_6pandas_5tslib_9Timestamp_37freqstr, METH_O, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5tslib_9Timestamp_37freqstr(PyObject *__pyx_self, PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("freqstr (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_5tslib_9Timestamp_36freqstr(__pyx_self, ((PyObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5tslib_9Timestamp_36freqstr(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("freqstr", 0); /* "pandas/tslib.pyx":293 * @property * def freqstr(self): * return getattr(self.offset, 'freqstr', self.offset) # <<<<<<<<<<<<<< * * @property */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_offset); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 293; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_offset); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 293; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_GetAttr3(__pyx_t_1, __pyx_n_s_freqstr, __pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 293; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; /* "pandas/tslib.pyx":292 * * @property * def freqstr(self): # <<<<<<<<<<<<<< * return getattr(self.offset, 'freqstr', self.offset) * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("pandas.tslib.Timestamp.freqstr", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/tslib.pyx":296 * * @property * def asm8(self): # <<<<<<<<<<<<<< * return np.int64(self.value).view('M8[ns]') * */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5tslib_9Timestamp_39asm8(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5tslib_9Timestamp_39asm8 = {__Pyx_NAMESTR("asm8"), (PyCFunction)__pyx_pw_6pandas_5tslib_9Timestamp_39asm8, METH_O, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5tslib_9Timestamp_39asm8(PyObject *__pyx_self, PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("asm8 (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_5tslib_9Timestamp_38asm8(__pyx_self, ((PyObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5tslib_9Timestamp_38asm8(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("asm8", 0); /* "pandas/tslib.pyx":297 * @property * def asm8(self): * return np.int64(self.value).view('M8[ns]') # <<<<<<<<<<<<<< * * def tz_localize(self, tz): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 297; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_int64); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 297; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_value); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 297; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 297; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyObject_Call(__pyx_t_2, __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 297; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_view); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 297; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyObject_Call(__pyx_t_3, __pyx_tuple__8, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 297; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "pandas/tslib.pyx":296 * * @property * def asm8(self): # <<<<<<<<<<<<<< * return np.int64(self.value).view('M8[ns]') * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("pandas.tslib.Timestamp.asm8", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/tslib.pyx":299 * return np.int64(self.value).view('M8[ns]') * * def tz_localize(self, tz): # <<<<<<<<<<<<<< * """ * Convert naive Timestamp to local time zone */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5tslib_9Timestamp_41tz_localize(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6pandas_5tslib_9Timestamp_40tz_localize[] = "\n Convert naive Timestamp to local time zone\n\n Parameters\n ----------\n tz : pytz.timezone\n\n Returns\n -------\n localized : Timestamp\n "; static PyMethodDef __pyx_mdef_6pandas_5tslib_9Timestamp_41tz_localize = {__Pyx_NAMESTR("tz_localize"), (PyCFunction)__pyx_pw_6pandas_5tslib_9Timestamp_41tz_localize, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_5tslib_9Timestamp_40tz_localize)}; static PyObject *__pyx_pw_6pandas_5tslib_9Timestamp_41tz_localize(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_self = 0; PyObject *__pyx_v_tz = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("tz_localize (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_tz,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_tz)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("tz_localize", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 299; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "tz_localize") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 299; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } __pyx_v_self = values[0]; __pyx_v_tz = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("tz_localize", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 299; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.tslib.Timestamp.tz_localize", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pandas_5tslib_9Timestamp_40tz_localize(__pyx_self, __pyx_v_self, __pyx_v_tz); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5tslib_9Timestamp_40tz_localize(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_tz) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("tz_localize", 0); /* "pandas/tslib.pyx":311 * localized : Timestamp * """ * if self.tzinfo is None: # <<<<<<<<<<<<<< * # tz naive, localize * return Timestamp(self.to_pydatetime(), tz=tz) */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_tzinfo); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 311; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = (__pyx_t_1 == Py_None); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { /* "pandas/tslib.pyx":313 * if self.tzinfo is None: * # tz naive, localize * return Timestamp(self.to_pydatetime(), tz=tz) # <<<<<<<<<<<<<< * else: * raise Exception('Cannot localize tz-aware Timestamp, use ' */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_Timestamp); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 313; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_to_pydatetime); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 313; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = PyObject_Call(__pyx_t_4, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 313; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 313; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyDict_New(); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 313; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_tz, __pyx_v_tz) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 313; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_6 = PyObject_Call(__pyx_t_1, __pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 313; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_r = __pyx_t_6; __pyx_t_6 = 0; goto __pyx_L0; } /*else*/ { /* "pandas/tslib.pyx":315 * return Timestamp(self.to_pydatetime(), tz=tz) * else: * raise Exception('Cannot localize tz-aware Timestamp, use ' # <<<<<<<<<<<<<< * 'tz_convert for conversions') * */ __pyx_t_6 = PyObject_Call(__pyx_builtin_Exception, __pyx_tuple__9, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 315; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_Raise(__pyx_t_6, 0, 0, 0); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 315; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } /* "pandas/tslib.pyx":299 * return np.int64(self.value).view('M8[ns]') * * def tz_localize(self, tz): # <<<<<<<<<<<<<< * """ * Convert naive Timestamp to local time zone */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("pandas.tslib.Timestamp.tz_localize", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/tslib.pyx":318 * 'tz_convert for conversions') * * def tz_convert(self, tz): # <<<<<<<<<<<<<< * """ * Convert Timestamp to another time zone or localize to requested time */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5tslib_9Timestamp_43tz_convert(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6pandas_5tslib_9Timestamp_42tz_convert[] = "\n Convert Timestamp to another time zone or localize to requested time\n zone\n\n Parameters\n ----------\n tz : pytz.timezone\n\n Returns\n -------\n converted : Timestamp\n "; static PyMethodDef __pyx_mdef_6pandas_5tslib_9Timestamp_43tz_convert = {__Pyx_NAMESTR("tz_convert"), (PyCFunction)__pyx_pw_6pandas_5tslib_9Timestamp_43tz_convert, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_5tslib_9Timestamp_42tz_convert)}; static PyObject *__pyx_pw_6pandas_5tslib_9Timestamp_43tz_convert(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_self = 0; PyObject *__pyx_v_tz = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("tz_convert (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_tz,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_tz)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("tz_convert", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 318; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "tz_convert") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 318; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } __pyx_v_self = values[0]; __pyx_v_tz = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("tz_convert", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 318; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.tslib.Timestamp.tz_convert", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pandas_5tslib_9Timestamp_42tz_convert(__pyx_self, __pyx_v_self, __pyx_v_tz); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5tslib_9Timestamp_42tz_convert(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_tz) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("tz_convert", 0); /* "pandas/tslib.pyx":331 * converted : Timestamp * """ * if self.tzinfo is None: # <<<<<<<<<<<<<< * # tz naive, use tz_localize * raise Exception('Cannot convert tz-naive Timestamp, use ' */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_tzinfo); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 331; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = (__pyx_t_1 == Py_None); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { /* "pandas/tslib.pyx":333 * if self.tzinfo is None: * # tz naive, use tz_localize * raise Exception('Cannot convert tz-naive Timestamp, use ' # <<<<<<<<<<<<<< * 'tz_localize to localize') * else: */ __pyx_t_1 = PyObject_Call(__pyx_builtin_Exception, __pyx_tuple__10, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 333; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 333; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } /*else*/ { /* "pandas/tslib.pyx":337 * else: * # Same UTC timestamp, different time zone * return Timestamp(self.value, tz=tz) # <<<<<<<<<<<<<< * * astimezone = tz_convert */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_Timestamp); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 337; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_value); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 337; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 337; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyDict_New(); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 337; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_tz, __pyx_v_tz) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 337; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_6 = PyObject_Call(__pyx_t_1, __pyx_t_5, __pyx_t_4); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 337; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_r = __pyx_t_6; __pyx_t_6 = 0; goto __pyx_L0; } /* "pandas/tslib.pyx":318 * 'tz_convert for conversions') * * def tz_convert(self, tz): # <<<<<<<<<<<<<< * """ * Convert Timestamp to another time zone or localize to requested time */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("pandas.tslib.Timestamp.tz_convert", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/tslib.pyx":341 * astimezone = tz_convert * * def replace(self, **kwds): # <<<<<<<<<<<<<< * return Timestamp(datetime.replace(self, **kwds), * offset=self.offset) */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5tslib_9Timestamp_45replace(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5tslib_9Timestamp_45replace = {__Pyx_NAMESTR("replace"), (PyCFunction)__pyx_pw_6pandas_5tslib_9Timestamp_45replace, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5tslib_9Timestamp_45replace(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_self = 0; PyObject *__pyx_v_kwds = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("replace (wrapper)", 0); __pyx_v_kwds = PyDict_New(); if (unlikely(!__pyx_v_kwds)) return NULL; __Pyx_GOTREF(__pyx_v_kwds); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,0}; PyObject* values[1] = {0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kwds, values, pos_args, "replace") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 341; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); } __pyx_v_self = values[0]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("replace", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 341; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_DECREF(__pyx_v_kwds); __pyx_v_kwds = 0; __Pyx_AddTraceback("pandas.tslib.Timestamp.replace", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pandas_5tslib_9Timestamp_44replace(__pyx_self, __pyx_v_self, __pyx_v_kwds); /* function exit code */ __Pyx_XDECREF(__pyx_v_kwds); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5tslib_9Timestamp_44replace(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_kwds) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("replace", 0); /* "pandas/tslib.pyx":342 * * def replace(self, **kwds): * return Timestamp(datetime.replace(self, **kwds), # <<<<<<<<<<<<<< * offset=self.offset) * */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_Timestamp); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 342; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)((PyObject*)__pyx_ptype_8datetime_datetime)), __pyx_n_s_replace); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 342; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 342; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_v_self); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_self); __Pyx_GIVEREF(__pyx_v_self); __pyx_t_4 = __pyx_v_kwds; __Pyx_INCREF(__pyx_t_4); __pyx_t_5 = PyObject_Call(__pyx_t_2, __pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 342; __pyx_clineno = __LINE__; goto __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_4); __pyx_t_4 = 0; __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 342; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyDict_New(); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 342; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); /* "pandas/tslib.pyx":343 * def replace(self, **kwds): * return Timestamp(datetime.replace(self, **kwds), * offset=self.offset) # <<<<<<<<<<<<<< * * def to_pydatetime(self, warn=True): */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_offset); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 343; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_offset, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 342; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/tslib.pyx":342 * * def replace(self, **kwds): * return Timestamp(datetime.replace(self, **kwds), # <<<<<<<<<<<<<< * offset=self.offset) * */ __pyx_t_3 = PyObject_Call(__pyx_t_1, __pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 342; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; /* "pandas/tslib.pyx":341 * astimezone = tz_convert * * def replace(self, **kwds): # <<<<<<<<<<<<<< * return Timestamp(datetime.replace(self, **kwds), * offset=self.offset) */ /* 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.tslib.Timestamp.replace", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/tslib.pyx":345 * offset=self.offset) * * def to_pydatetime(self, warn=True): # <<<<<<<<<<<<<< * """ * If warn=True, issue warning if nanoseconds is nonzero */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5tslib_9Timestamp_47to_pydatetime(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6pandas_5tslib_9Timestamp_46to_pydatetime[] = "\n If warn=True, issue warning if nanoseconds is nonzero\n "; static PyMethodDef __pyx_mdef_6pandas_5tslib_9Timestamp_47to_pydatetime = {__Pyx_NAMESTR("to_pydatetime"), (PyCFunction)__pyx_pw_6pandas_5tslib_9Timestamp_47to_pydatetime, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_5tslib_9Timestamp_46to_pydatetime)}; static PyObject *__pyx_pw_6pandas_5tslib_9Timestamp_47to_pydatetime(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_self = 0; PyObject *__pyx_v_warn = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("to_pydatetime (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_warn,0}; PyObject* values[2] = {0,0}; values[1] = ((PyObject *)((PyObject *)Py_True)); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_warn); if (value) { values[1] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "to_pydatetime") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 345; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_self = values[0]; __pyx_v_warn = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("to_pydatetime", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 345; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.tslib.Timestamp.to_pydatetime", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pandas_5tslib_9Timestamp_46to_pydatetime(__pyx_self, __pyx_v_self, __pyx_v_warn); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5tslib_9Timestamp_46to_pydatetime(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_warn) { struct __pyx_obj_6pandas_5tslib__TSObject *__pyx_v_ts = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_t_3; int __pyx_t_4; int __pyx_t_5; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; PyObject *__pyx_t_11 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("to_pydatetime", 0); /* "pandas/tslib.pyx":353 * _TSObject ts * * if self.nanosecond != 0 and warn: # <<<<<<<<<<<<<< * print 'Warning: discarding nonzero nanoseconds' * ts = convert_to_tsobject(self, self.tzinfo, None) */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_nanosecond); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 353; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyObject_RichCompare(__pyx_t_1, __pyx_int_0, Py_NE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 353; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 353; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_3) { __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_warn); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 353; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_5 = __pyx_t_4; } else { __pyx_t_5 = __pyx_t_3; } if (__pyx_t_5) { /* "pandas/tslib.pyx":354 * * if self.nanosecond != 0 and warn: * print 'Warning: discarding nonzero nanoseconds' # <<<<<<<<<<<<<< * ts = convert_to_tsobject(self, self.tzinfo, None) * */ if (__Pyx_PrintOne(0, __pyx_kp_s_Warning_discarding_nonzero_nanos) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 354; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L3; } __pyx_L3:; /* "pandas/tslib.pyx":355 * if self.nanosecond != 0 and warn: * print 'Warning: discarding nonzero nanoseconds' * ts = convert_to_tsobject(self, self.tzinfo, None) # <<<<<<<<<<<<<< * * return datetime(ts.dts.year, ts.dts.month, ts.dts.day, */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_tzinfo); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 355; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __pyx_f_6pandas_5tslib_convert_to_tsobject(__pyx_v_self, __pyx_t_2, Py_None); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 355; __pyx_clineno = __LINE__; goto __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_5tslib__TSObject))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 355; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_ts = ((struct __pyx_obj_6pandas_5tslib__TSObject *)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/tslib.pyx":357 * ts = convert_to_tsobject(self, self.tzinfo, None) * * return datetime(ts.dts.year, ts.dts.month, ts.dts.day, # <<<<<<<<<<<<<< * ts.dts.hour, ts.dts.min, ts.dts.sec, * ts.dts.us, ts.tzinfo) */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyInt_From_npy_int64(__pyx_v_ts->dts.year); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 357; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyInt_From_npy_int32(__pyx_v_ts->dts.month); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 357; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_6 = __Pyx_PyInt_From_npy_int32(__pyx_v_ts->dts.day); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 357; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); /* "pandas/tslib.pyx":358 * * return datetime(ts.dts.year, ts.dts.month, ts.dts.day, * ts.dts.hour, ts.dts.min, ts.dts.sec, # <<<<<<<<<<<<<< * ts.dts.us, ts.tzinfo) * */ __pyx_t_7 = __Pyx_PyInt_From_npy_int32(__pyx_v_ts->dts.hour); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 358; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_t_8 = __Pyx_PyInt_From_npy_int32(__pyx_v_ts->dts.min); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 358; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_9 = __Pyx_PyInt_From_npy_int32(__pyx_v_ts->dts.sec); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 358; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); /* "pandas/tslib.pyx":359 * return datetime(ts.dts.year, ts.dts.month, ts.dts.day, * ts.dts.hour, ts.dts.min, ts.dts.sec, * ts.dts.us, ts.tzinfo) # <<<<<<<<<<<<<< * * def isoformat(self, sep='T'): */ __pyx_t_10 = __Pyx_PyInt_From_npy_int32(__pyx_v_ts->dts.us); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 359; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); /* "pandas/tslib.pyx":357 * ts = convert_to_tsobject(self, self.tzinfo, None) * * return datetime(ts.dts.year, ts.dts.month, ts.dts.day, # <<<<<<<<<<<<<< * ts.dts.hour, ts.dts.min, ts.dts.sec, * ts.dts.us, ts.tzinfo) */ __pyx_t_11 = PyTuple_New(8); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 357; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_11, 1, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_11, 2, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_11, 3, __pyx_t_7); __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_11, 4, __pyx_t_8); __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_11, 5, __pyx_t_9); __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_11, 6, __pyx_t_10); __Pyx_GIVEREF(__pyx_t_10); __Pyx_INCREF(__pyx_v_ts->tzinfo); PyTuple_SET_ITEM(__pyx_t_11, 7, __pyx_v_ts->tzinfo); __Pyx_GIVEREF(__pyx_v_ts->tzinfo); __pyx_t_1 = 0; __pyx_t_2 = 0; __pyx_t_6 = 0; __pyx_t_7 = 0; __pyx_t_8 = 0; __pyx_t_9 = 0; __pyx_t_10 = 0; __pyx_t_10 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_8datetime_datetime)), __pyx_t_11, NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 357; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __pyx_r = __pyx_t_10; __pyx_t_10 = 0; goto __pyx_L0; /* "pandas/tslib.pyx":345 * offset=self.offset) * * def to_pydatetime(self, warn=True): # <<<<<<<<<<<<<< * """ * If warn=True, issue warning if nanoseconds is nonzero */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); __Pyx_XDECREF(__pyx_t_10); __Pyx_XDECREF(__pyx_t_11); __Pyx_AddTraceback("pandas.tslib.Timestamp.to_pydatetime", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_ts); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/tslib.pyx":361 * ts.dts.us, ts.tzinfo) * * def isoformat(self, sep='T'): # <<<<<<<<<<<<<< * base = super(_Timestamp, self).isoformat(sep=sep) * if self.nanosecond == 0: */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5tslib_9Timestamp_49isoformat(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5tslib_9Timestamp_49isoformat = {__Pyx_NAMESTR("isoformat"), (PyCFunction)__pyx_pw_6pandas_5tslib_9Timestamp_49isoformat, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5tslib_9Timestamp_49isoformat(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_self = 0; PyObject *__pyx_v_sep = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("isoformat (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_sep,0}; PyObject* values[2] = {0,0}; values[1] = ((PyObject *)((PyObject*)__pyx_n_s_T)); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_sep); if (value) { values[1] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "isoformat") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 361; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_self = values[0]; __pyx_v_sep = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("isoformat", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 361; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.tslib.Timestamp.isoformat", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pandas_5tslib_9Timestamp_48isoformat(__pyx_self, __pyx_v_self, __pyx_v_sep); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5tslib_9Timestamp_48isoformat(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_sep) { PyObject *__pyx_v_base = NULL; PyObject *__pyx_v_base1 = NULL; PyObject *__pyx_v_base2 = 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_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("isoformat", 0); /* "pandas/tslib.pyx":362 * * def isoformat(self, sep='T'): * base = super(_Timestamp, self).isoformat(sep=sep) # <<<<<<<<<<<<<< * if self.nanosecond == 0: * return base */ __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 362; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)((PyObject*)__pyx_ptype_6pandas_5tslib__Timestamp))); PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)((PyObject*)__pyx_ptype_6pandas_5tslib__Timestamp))); __Pyx_GIVEREF(((PyObject *)((PyObject*)__pyx_ptype_6pandas_5tslib__Timestamp))); __Pyx_INCREF(__pyx_v_self); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_self); __Pyx_GIVEREF(__pyx_v_self); __pyx_t_2 = PyObject_Call(__pyx_builtin_super, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 362; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_isoformat); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 362; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 362; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_sep, __pyx_v_sep) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 362; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_3 = PyObject_Call(__pyx_t_1, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 362; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_base = __pyx_t_3; __pyx_t_3 = 0; /* "pandas/tslib.pyx":363 * def isoformat(self, sep='T'): * base = super(_Timestamp, self).isoformat(sep=sep) * if self.nanosecond == 0: # <<<<<<<<<<<<<< * return base * */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_nanosecond); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 363; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = PyObject_RichCompare(__pyx_t_3, __pyx_int_0, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 363; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 363; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_4) { /* "pandas/tslib.pyx":364 * base = super(_Timestamp, self).isoformat(sep=sep) * if self.nanosecond == 0: * return base # <<<<<<<<<<<<<< * * if self.tzinfo is not None: */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_base); __pyx_r = __pyx_v_base; goto __pyx_L0; } /* "pandas/tslib.pyx":366 * return base * * if self.tzinfo is not None: # <<<<<<<<<<<<<< * base1, base2 = base[:-6], base[-6:] * else: */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_tzinfo); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 366; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = (__pyx_t_2 != Py_None); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_5 = (__pyx_t_4 != 0); if (__pyx_t_5) { /* "pandas/tslib.pyx":367 * * if self.tzinfo is not None: * base1, base2 = base[:-6], base[-6:] # <<<<<<<<<<<<<< * else: * base1, base2 = base, "" */ __pyx_t_2 = __Pyx_PyObject_GetSlice(__pyx_v_base, 0, -6, NULL, NULL, &__pyx_slice__11, 0, 1, 1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 367; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetSlice(__pyx_v_base, -6, 0, NULL, NULL, &__pyx_slice__12, 1, 0, 1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 367; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_v_base1 = __pyx_t_2; __pyx_t_2 = 0; __pyx_v_base2 = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L4; } /*else*/ { /* "pandas/tslib.pyx":369 * base1, base2 = base[:-6], base[-6:] * else: * base1, base2 = base, "" # <<<<<<<<<<<<<< * * if self.microsecond != 0: */ __pyx_t_3 = __pyx_v_base; __Pyx_INCREF(__pyx_t_3); __pyx_t_2 = __pyx_kp_s__13; __Pyx_INCREF(__pyx_t_2); __pyx_v_base1 = __pyx_t_3; __pyx_t_3 = 0; __pyx_v_base2 = __pyx_t_2; __pyx_t_2 = 0; } __pyx_L4:; /* "pandas/tslib.pyx":371 * base1, base2 = base, "" * * if self.microsecond != 0: # <<<<<<<<<<<<<< * base1 += "%.3d" % self.nanosecond * else: */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_microsecond); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 371; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyObject_RichCompare(__pyx_t_2, __pyx_int_0, Py_NE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 371; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 371; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_5) { /* "pandas/tslib.pyx":372 * * if self.microsecond != 0: * base1 += "%.3d" % self.nanosecond # <<<<<<<<<<<<<< * else: * base1 += ".%.9d" % self.nanosecond */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_nanosecond); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 372; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_3d, __pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 372; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyNumber_InPlaceAdd(__pyx_v_base1, __pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 372; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF_SET(__pyx_v_base1, __pyx_t_3); __pyx_t_3 = 0; goto __pyx_L5; } /*else*/ { /* "pandas/tslib.pyx":374 * base1 += "%.3d" % self.nanosecond * else: * base1 += ".%.9d" % self.nanosecond # <<<<<<<<<<<<<< * * return base1 + base2 */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_nanosecond); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 374; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_9d, __pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 374; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyNumber_InPlaceAdd(__pyx_v_base1, __pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 374; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF_SET(__pyx_v_base1, __pyx_t_3); __pyx_t_3 = 0; } __pyx_L5:; /* "pandas/tslib.pyx":376 * base1 += ".%.9d" % self.nanosecond * * return base1 + base2 # <<<<<<<<<<<<<< * * def _has_time_component(self): */ __Pyx_XDECREF(__pyx_r); __pyx_t_3 = PyNumber_Add(__pyx_v_base1, __pyx_v_base2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 376; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; /* "pandas/tslib.pyx":361 * ts.dts.us, ts.tzinfo) * * def isoformat(self, sep='T'): # <<<<<<<<<<<<<< * base = super(_Timestamp, self).isoformat(sep=sep) * if self.nanosecond == 0: */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("pandas.tslib.Timestamp.isoformat", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_base); __Pyx_XDECREF(__pyx_v_base1); __Pyx_XDECREF(__pyx_v_base2); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/tslib.pyx":378 * return base1 + base2 * * def _has_time_component(self): # <<<<<<<<<<<<<< * """ * Returns if the Timestamp has a time component */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5tslib_9Timestamp_51_has_time_component(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/ static char __pyx_doc_6pandas_5tslib_9Timestamp_50_has_time_component[] = "\n Returns if the Timestamp has a time component\n in addition to the date part\n "; static PyMethodDef __pyx_mdef_6pandas_5tslib_9Timestamp_51_has_time_component = {__Pyx_NAMESTR("_has_time_component"), (PyCFunction)__pyx_pw_6pandas_5tslib_9Timestamp_51_has_time_component, METH_O, __Pyx_DOCSTR(__pyx_doc_6pandas_5tslib_9Timestamp_50_has_time_component)}; static PyObject *__pyx_pw_6pandas_5tslib_9Timestamp_51_has_time_component(PyObject *__pyx_self, PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_has_time_component (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_5tslib_9Timestamp_50_has_time_component(__pyx_self, ((PyObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5tslib_9Timestamp_50_has_time_component(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_t_4; PyObject *__pyx_t_5 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_has_time_component", 0); /* "pandas/tslib.pyx":383 * in addition to the date part * """ * return (self.time() != _zero_time # <<<<<<<<<<<<<< * or self.tzinfo is not None * or self.nanosecond != 0) */ __Pyx_XDECREF(__pyx_r); /* "pandas/tslib.pyx":384 * """ * return (self.time() != _zero_time * or self.tzinfo is not None # <<<<<<<<<<<<<< * or self.nanosecond != 0) * */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_time); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 383; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); /* "pandas/tslib.pyx":383 * in addition to the date part * """ * return (self.time() != _zero_time # <<<<<<<<<<<<<< * or self.tzinfo is not None * or self.nanosecond != 0) */ __pyx_t_2 = PyObject_Call(__pyx_t_1, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 383; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pandas/tslib.pyx":384 * """ * return (self.time() != _zero_time * or self.tzinfo is not None # <<<<<<<<<<<<<< * or self.nanosecond != 0) * */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_zero_time); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 384; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = PyObject_RichCompare(__pyx_t_2, __pyx_t_1, Py_NE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 383; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 384; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (!__pyx_t_4) { __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/tslib.pyx":385 * return (self.time() != _zero_time * or self.tzinfo is not None * or self.nanosecond != 0) # <<<<<<<<<<<<<< * * */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_tzinfo); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 384; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); /* "pandas/tslib.pyx":384 * """ * return (self.time() != _zero_time * or self.tzinfo is not None # <<<<<<<<<<<<<< * or self.nanosecond != 0) * */ __pyx_t_4 = (__pyx_t_1 != Py_None); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_t_4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 384; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 385; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (!__pyx_t_4) { __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pandas/tslib.pyx":385 * return (self.time() != _zero_time * or self.tzinfo is not None * or self.nanosecond != 0) # <<<<<<<<<<<<<< * * */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_nanosecond); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 385; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = PyObject_RichCompare(__pyx_t_2, __pyx_int_0, Py_NE); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 385; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __pyx_t_5; __pyx_t_5 = 0; } else { __pyx_t_2 = __pyx_t_1; __pyx_t_1 = 0; } __pyx_t_1 = __pyx_t_2; __pyx_t_2 = 0; } else { __pyx_t_1 = __pyx_t_3; __pyx_t_3 = 0; } __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "pandas/tslib.pyx":378 * return base1 + base2 * * def _has_time_component(self): # <<<<<<<<<<<<<< * """ * Returns if the Timestamp has a time component */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("pandas.tslib.Timestamp._has_time_component", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/tslib.pyx":392 * """(N)ot-(A)-(T)ime, the time equivalent of NaN""" * * def __new__(cls): # <<<<<<<<<<<<<< * cdef _NaT base * */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5tslib_7NaTType_1__new__(PyObject *__pyx_self, PyObject *__pyx_v_cls); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5tslib_7NaTType_1__new__ = {__Pyx_NAMESTR("__new__"), (PyCFunction)__pyx_pw_6pandas_5tslib_7NaTType_1__new__, METH_O, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5tslib_7NaTType_1__new__(PyObject *__pyx_self, PyObject *__pyx_v_cls) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__new__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_5tslib_7NaTType___new__(__pyx_self, ((PyObject *)__pyx_v_cls)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5tslib_7NaTType___new__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls) { struct __pyx_obj_6pandas_5tslib__NaT *__pyx_v_base = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__new__", 0); /* "pandas/tslib.pyx":395 * cdef _NaT base * * base = _NaT.__new__(cls, 1, 1, 1) # <<<<<<<<<<<<<< * mangle_nat(base) * base.value = NPY_NAT */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)((PyObject*)__pyx_ptype_6pandas_5tslib__NaT)), __pyx_n_s_new); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 395; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyTuple_New(4); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 395; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_cls); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_cls); __Pyx_GIVEREF(__pyx_v_cls); __Pyx_INCREF(__pyx_int_1); PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_int_1); __Pyx_GIVEREF(__pyx_int_1); __Pyx_INCREF(__pyx_int_1); PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_int_1); __Pyx_GIVEREF(__pyx_int_1); __Pyx_INCREF(__pyx_int_1); PyTuple_SET_ITEM(__pyx_t_2, 3, __pyx_int_1); __Pyx_GIVEREF(__pyx_int_1); __pyx_t_3 = PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 395; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_6pandas_5tslib__NaT))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 395; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_base = ((struct __pyx_obj_6pandas_5tslib__NaT *)__pyx_t_3); __pyx_t_3 = 0; /* "pandas/tslib.pyx":396 * * base = _NaT.__new__(cls, 1, 1, 1) * mangle_nat(base) # <<<<<<<<<<<<<< * base.value = NPY_NAT * */ mangle_nat(((PyObject *)__pyx_v_base)); /* "pandas/tslib.pyx":397 * base = _NaT.__new__(cls, 1, 1, 1) * mangle_nat(base) * base.value = NPY_NAT # <<<<<<<<<<<<<< * * return base */ __pyx_v_base->__pyx_base.value = __pyx_v_6pandas_5tslib_NPY_NAT; /* "pandas/tslib.pyx":399 * base.value = NPY_NAT * * return base # <<<<<<<<<<<<<< * * def __repr__(self): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_base)); __pyx_r = ((PyObject *)__pyx_v_base); goto __pyx_L0; /* "pandas/tslib.pyx":392 * """(N)ot-(A)-(T)ime, the time equivalent of NaN""" * * def __new__(cls): # <<<<<<<<<<<<<< * cdef _NaT base * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("pandas.tslib.NaTType.__new__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_base); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/tslib.pyx":401 * return base * * def __repr__(self): # <<<<<<<<<<<<<< * return 'NaT' * */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5tslib_7NaTType_3__repr__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5tslib_7NaTType_3__repr__ = {__Pyx_NAMESTR("__repr__"), (PyCFunction)__pyx_pw_6pandas_5tslib_7NaTType_3__repr__, METH_O, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5tslib_7NaTType_3__repr__(PyObject *__pyx_self, PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_5tslib_7NaTType_2__repr__(__pyx_self, ((PyObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5tslib_7NaTType_2__repr__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__repr__", 0); /* "pandas/tslib.pyx":402 * * def __repr__(self): * return 'NaT' # <<<<<<<<<<<<<< * * def __str__(self): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_n_s_NaT); __pyx_r = __pyx_n_s_NaT; goto __pyx_L0; /* "pandas/tslib.pyx":401 * return base * * def __repr__(self): # <<<<<<<<<<<<<< * return 'NaT' * */ /* function exit code */ __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/tslib.pyx":404 * return 'NaT' * * def __str__(self): # <<<<<<<<<<<<<< * return 'NaT' * */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5tslib_7NaTType_5__str__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5tslib_7NaTType_5__str__ = {__Pyx_NAMESTR("__str__"), (PyCFunction)__pyx_pw_6pandas_5tslib_7NaTType_5__str__, METH_O, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5tslib_7NaTType_5__str__(PyObject *__pyx_self, PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__str__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_5tslib_7NaTType_4__str__(__pyx_self, ((PyObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5tslib_7NaTType_4__str__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__str__", 0); /* "pandas/tslib.pyx":405 * * def __str__(self): * return 'NaT' # <<<<<<<<<<<<<< * * def __hash__(self): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_n_s_NaT); __pyx_r = __pyx_n_s_NaT; goto __pyx_L0; /* "pandas/tslib.pyx":404 * return 'NaT' * * def __str__(self): # <<<<<<<<<<<<<< * return 'NaT' * */ /* function exit code */ __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/tslib.pyx":407 * return 'NaT' * * def __hash__(self): # <<<<<<<<<<<<<< * return iNaT * */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5tslib_7NaTType_7__hash__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5tslib_7NaTType_7__hash__ = {__Pyx_NAMESTR("__hash__"), (PyCFunction)__pyx_pw_6pandas_5tslib_7NaTType_7__hash__, METH_O, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5tslib_7NaTType_7__hash__(PyObject *__pyx_self, PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__hash__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_5tslib_7NaTType_6__hash__(__pyx_self, ((PyObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5tslib_7NaTType_6__hash__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__hash__", 0); /* "pandas/tslib.pyx":408 * * def __hash__(self): * return iNaT # <<<<<<<<<<<<<< * * def weekday(self): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_iNaT); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 408; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "pandas/tslib.pyx":407 * return 'NaT' * * def __hash__(self): # <<<<<<<<<<<<<< * return iNaT * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas.tslib.NaTType.__hash__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/tslib.pyx":410 * return iNaT * * def weekday(self): # <<<<<<<<<<<<<< * return -1 * */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5tslib_7NaTType_9weekday(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5tslib_7NaTType_9weekday = {__Pyx_NAMESTR("weekday"), (PyCFunction)__pyx_pw_6pandas_5tslib_7NaTType_9weekday, METH_O, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5tslib_7NaTType_9weekday(PyObject *__pyx_self, PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("weekday (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_5tslib_7NaTType_8weekday(__pyx_self, ((PyObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5tslib_7NaTType_8weekday(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("weekday", 0); /* "pandas/tslib.pyx":411 * * def weekday(self): * return -1 # <<<<<<<<<<<<<< * * def toordinal(self): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_int_neg_1); __pyx_r = __pyx_int_neg_1; goto __pyx_L0; /* "pandas/tslib.pyx":410 * return iNaT * * def weekday(self): # <<<<<<<<<<<<<< * return -1 * */ /* function exit code */ __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/tslib.pyx":413 * return -1 * * def toordinal(self): # <<<<<<<<<<<<<< * return -1 * */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5tslib_7NaTType_11toordinal(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5tslib_7NaTType_11toordinal = {__Pyx_NAMESTR("toordinal"), (PyCFunction)__pyx_pw_6pandas_5tslib_7NaTType_11toordinal, METH_O, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5tslib_7NaTType_11toordinal(PyObject *__pyx_self, PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("toordinal (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_5tslib_7NaTType_10toordinal(__pyx_self, ((PyObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5tslib_7NaTType_10toordinal(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("toordinal", 0); /* "pandas/tslib.pyx":414 * * def toordinal(self): * return -1 # <<<<<<<<<<<<<< * * fields = ['year', 'quarter', 'month', 'day', 'hour', */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_int_neg_1); __pyx_r = __pyx_int_neg_1; goto __pyx_L0; /* "pandas/tslib.pyx":413 * return -1 * * def toordinal(self): # <<<<<<<<<<<<<< * return -1 * */ /* function exit code */ __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/tslib.pyx":429 * * * cdef inline bint _checknull_with_nat(object val): # <<<<<<<<<<<<<< * """ utility to check if a value is a nat or not """ * return val is None or ( */ static CYTHON_INLINE int __pyx_f_6pandas_5tslib__checknull_with_nat(PyObject *__pyx_v_val) { int __pyx_r; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_checknull_with_nat", 0); /* "pandas/tslib.pyx":431 * cdef inline bint _checknull_with_nat(object val): * """ utility to check if a value is a nat or not """ * return val is None or ( # <<<<<<<<<<<<<< * PyFloat_Check(val) and val != val) or val is NaT * */ __pyx_t_1 = (__pyx_v_val == Py_None); __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 431; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 431; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (!__pyx_t_1) { __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/tslib.pyx":432 * """ utility to check if a value is a nat or not """ * return val is None or ( * PyFloat_Check(val) and val != val) or val is NaT # <<<<<<<<<<<<<< * * cdef inline bint _cmp_nat_dt(_NaT lhs, _Timestamp rhs, int op) except -1: */ __pyx_t_3 = __Pyx_PyBool_FromLong(PyFloat_Check(__pyx_v_val)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 432; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 432; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__pyx_t_1) { __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_4 = PyObject_RichCompare(__pyx_v_val, __pyx_v_val, Py_NE); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 432; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_5 = __pyx_t_4; __pyx_t_4 = 0; } else { __pyx_t_5 = __pyx_t_3; __pyx_t_3 = 0; } __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 432; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (!__pyx_t_1) { __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_NaT); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 432; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = (__pyx_v_val == __pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_t_1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 432; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __pyx_t_3; __pyx_t_3 = 0; } else { __pyx_t_4 = __pyx_t_5; __pyx_t_5 = 0; } __pyx_t_5 = __pyx_t_4; __pyx_t_4 = 0; } else { __pyx_t_5 = __pyx_t_2; __pyx_t_2 = 0; } /* "pandas/tslib.pyx":431 * cdef inline bint _checknull_with_nat(object val): * """ utility to check if a value is a nat or not """ * return val is None or ( # <<<<<<<<<<<<<< * PyFloat_Check(val) and val != val) or val is NaT * */ __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 431; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_r = __pyx_t_1; goto __pyx_L0; /* "pandas/tslib.pyx":429 * * * cdef inline bint _checknull_with_nat(object val): # <<<<<<<<<<<<<< * """ utility to check if a value is a nat or not """ * return val is None or ( */ /* 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_WriteUnraisable("pandas.tslib._checknull_with_nat", __pyx_clineno, __pyx_lineno, __pyx_filename, 0); __pyx_r = 0; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/tslib.pyx":434 * PyFloat_Check(val) and val != val) or val is NaT * * cdef inline bint _cmp_nat_dt(_NaT lhs, _Timestamp rhs, int op) except -1: # <<<<<<<<<<<<<< * return _nat_scalar_rules[op] * */ static CYTHON_INLINE int __pyx_f_6pandas_5tslib__cmp_nat_dt(CYTHON_UNUSED struct __pyx_obj_6pandas_5tslib__NaT *__pyx_v_lhs, CYTHON_UNUSED struct __pyx_obj_6pandas_5tslib__Timestamp *__pyx_v_rhs, int __pyx_v_op) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_cmp_nat_dt", 0); /* "pandas/tslib.pyx":435 * * cdef inline bint _cmp_nat_dt(_NaT lhs, _Timestamp rhs, int op) except -1: * return _nat_scalar_rules[op] # <<<<<<<<<<<<<< * * */ __pyx_r = (__pyx_v_6pandas_5tslib__nat_scalar_rules[__pyx_v_op]); goto __pyx_L0; /* "pandas/tslib.pyx":434 * PyFloat_Check(val) and val != val) or val is NaT * * cdef inline bint _cmp_nat_dt(_NaT lhs, _Timestamp rhs, int op) except -1: # <<<<<<<<<<<<<< * return _nat_scalar_rules[op] * */ /* function exit code */ __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/tslib.pyx":438 * * * cdef _tz_format(object obj, object zone): # <<<<<<<<<<<<<< * try: * return obj.strftime(' %%Z, tz=%s' % zone) */ static PyObject *__pyx_f_6pandas_5tslib__tz_format(PyObject *__pyx_v_obj, PyObject *__pyx_v_zone) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_tz_format", 0); /* "pandas/tslib.pyx":439 * * cdef _tz_format(object obj, object zone): * try: # <<<<<<<<<<<<<< * return obj.strftime(' %%Z, tz=%s' % zone) * except: */ { __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:*/ { /* "pandas/tslib.pyx":440 * cdef _tz_format(object obj, object zone): * try: * return obj.strftime(' %%Z, tz=%s' % zone) # <<<<<<<<<<<<<< * except: * return ', tz=%s' % zone */ __Pyx_XDECREF(__pyx_r); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_obj, __pyx_n_s_strftime); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 440; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyString_Format(__pyx_kp_s_Z_tz_s, __pyx_v_zone); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 440; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 440; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyObject_Call(__pyx_t_4, __pyx_t_6, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 440; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_r = __pyx_t_5; __pyx_t_5 = 0; goto __pyx_L7_try_return; } __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L10_try_end; __pyx_L3_error:; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; /* "pandas/tslib.pyx":441 * try: * return obj.strftime(' %%Z, tz=%s' % zone) * except: # <<<<<<<<<<<<<< * return ', tz=%s' % zone * */ /*except:*/ { __Pyx_AddTraceback("pandas.tslib._tz_format", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 441; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_GOTREF(__pyx_t_6); __Pyx_GOTREF(__pyx_t_4); /* "pandas/tslib.pyx":442 * return obj.strftime(' %%Z, tz=%s' % zone) * except: * return ', tz=%s' % zone # <<<<<<<<<<<<<< * * def is_timestamp_array(ndarray[object] values): */ __Pyx_XDECREF(__pyx_r); __pyx_t_7 = __Pyx_PyString_Format(__pyx_kp_s_tz_s, __pyx_v_zone); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 442; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_r = __pyx_t_7; __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; goto __pyx_L6_except_return; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; goto __pyx_L4_exception_handled; } __pyx_L5_except_error:; __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); goto __pyx_L1_error; __pyx_L7_try_return:; __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); goto __pyx_L0; __pyx_L6_except_return:; __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); goto __pyx_L0; __pyx_L4_exception_handled:; __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); __pyx_L10_try_end:; } /* "pandas/tslib.pyx":438 * * * cdef _tz_format(object obj, object zone): # <<<<<<<<<<<<<< * try: * return obj.strftime(' %%Z, tz=%s' % zone) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_AddTraceback("pandas.tslib._tz_format", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/tslib.pyx":444 * return ', tz=%s' % zone * * def is_timestamp_array(ndarray[object] values): # <<<<<<<<<<<<<< * cdef int i, n = len(values) * if n == 0: */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5tslib_7is_timestamp_array(PyObject *__pyx_self, PyObject *__pyx_v_values); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5tslib_7is_timestamp_array = {__Pyx_NAMESTR("is_timestamp_array"), (PyCFunction)__pyx_pw_6pandas_5tslib_7is_timestamp_array, METH_O, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5tslib_7is_timestamp_array(PyObject *__pyx_self, PyObject *__pyx_v_values) { CYTHON_UNUSED int __pyx_lineno = 0; CYTHON_UNUSED const char *__pyx_filename = NULL; CYTHON_UNUSED int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("is_timestamp_array (wrapper)", 0); if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 444; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5tslib_6is_timestamp_array(__pyx_self, ((PyArrayObject *)__pyx_v_values)); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5tslib_6is_timestamp_array(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values) { int __pyx_v_i; int __pyx_v_n; __Pyx_LocalBuf_ND __pyx_pybuffernd_values; __Pyx_Buffer __pyx_pybuffer_values; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; int __pyx_t_2; int __pyx_t_3; int __pyx_t_4; PyObject *__pyx_t_5 = NULL; int __pyx_t_6; int __pyx_t_7; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("is_timestamp_array", 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_object, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 444; __pyx_clineno = __LINE__; goto __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/tslib.pyx":445 * * def is_timestamp_array(ndarray[object] values): * cdef int i, n = len(values) # <<<<<<<<<<<<<< * if n == 0: * return False */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 445; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/tslib.pyx":446 * def is_timestamp_array(ndarray[object] values): * cdef int i, n = len(values) * if n == 0: # <<<<<<<<<<<<<< * return False * for i in range(n): */ __pyx_t_2 = ((__pyx_v_n == 0) != 0); if (__pyx_t_2) { /* "pandas/tslib.pyx":447 * cdef int i, n = len(values) * if n == 0: * return False # <<<<<<<<<<<<<< * for i in range(n): * if not is_timestamp(values[i]): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(Py_False); __pyx_r = Py_False; goto __pyx_L0; } /* "pandas/tslib.pyx":448 * if n == 0: * return False * for i in range(n): # <<<<<<<<<<<<<< * if not is_timestamp(values[i]): * return False */ __pyx_t_3 = __pyx_v_n; for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) { __pyx_v_i = __pyx_t_4; /* "pandas/tslib.pyx":449 * return False * for i in range(n): * if not is_timestamp(values[i]): # <<<<<<<<<<<<<< * return False * return True */ __pyx_t_6 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_6 < 0) { __pyx_t_6 += __pyx_pybuffernd_values.diminfo[0].shape; if (unlikely(__pyx_t_6 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_6 >= __pyx_pybuffernd_values.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 449; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_5 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_6, __pyx_pybuffernd_values.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_5); __pyx_t_2 = ((!(__pyx_f_6pandas_5tslib_is_timestamp(__pyx_t_5) != 0)) != 0); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_2) { /* "pandas/tslib.pyx":450 * for i in range(n): * if not is_timestamp(values[i]): * return False # <<<<<<<<<<<<<< * return True * */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(Py_False); __pyx_r = Py_False; goto __pyx_L0; } } /* "pandas/tslib.pyx":451 * if not is_timestamp(values[i]): * return False * return True # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(Py_True); __pyx_r = Py_True; goto __pyx_L0; /* "pandas/tslib.pyx":444 * return ', tz=%s' % zone * * def is_timestamp_array(ndarray[object] values): # <<<<<<<<<<<<<< * cdef int i, n = len(values) * if n == 0: */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_5); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __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.tslib.is_timestamp_array", __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/tslib.pyx":454 * * * cpdef object get_value_box(ndarray arr, object loc): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, sz */ static PyObject *__pyx_pw_6pandas_5tslib_9get_value_box(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_6pandas_5tslib_get_value_box(PyArrayObject *__pyx_v_arr, PyObject *__pyx_v_loc, CYTHON_UNUSED int __pyx_skip_dispatch) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_sz; PyObject *__pyx_v_casted = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; Py_ssize_t __pyx_t_3; int __pyx_t_4; int __pyx_t_5; int __pyx_t_6; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_value_box", 0); __Pyx_INCREF(__pyx_v_loc); /* "pandas/tslib.pyx":458 * Py_ssize_t i, sz * void* data_ptr * if util.is_float_object(loc): # <<<<<<<<<<<<<< * casted = int(loc) * if casted == loc: */ __pyx_t_1 = (is_float_object(__pyx_v_loc) != 0); if (__pyx_t_1) { /* "pandas/tslib.pyx":459 * void* data_ptr * if util.is_float_object(loc): * casted = int(loc) # <<<<<<<<<<<<<< * if casted == loc: * loc = casted */ __pyx_t_2 = PyNumber_Int(__pyx_v_loc); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 459; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_v_casted = __pyx_t_2; __pyx_t_2 = 0; /* "pandas/tslib.pyx":460 * if util.is_float_object(loc): * casted = int(loc) * if casted == loc: # <<<<<<<<<<<<<< * loc = casted * i = loc */ __pyx_t_2 = PyObject_RichCompare(__pyx_v_casted, __pyx_v_loc, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 460; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 460; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_1) { /* "pandas/tslib.pyx":461 * casted = int(loc) * if casted == loc: * loc = casted # <<<<<<<<<<<<<< * i = loc * sz = np.PyArray_SIZE(arr) */ __Pyx_INCREF(__pyx_v_casted); __Pyx_DECREF_SET(__pyx_v_loc, __pyx_v_casted); goto __pyx_L4; } __pyx_L4:; goto __pyx_L3; } __pyx_L3:; /* "pandas/tslib.pyx":462 * if casted == loc: * loc = casted * i = loc # <<<<<<<<<<<<<< * sz = np.PyArray_SIZE(arr) * */ __pyx_t_3 = __Pyx_PyIndex_AsSsize_t(__pyx_v_loc); if (unlikely((__pyx_t_3 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 462; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_i = ((Py_ssize_t)__pyx_t_3); /* "pandas/tslib.pyx":463 * loc = casted * i = loc * sz = np.PyArray_SIZE(arr) # <<<<<<<<<<<<<< * * if i < 0 and sz > 0: */ __pyx_v_sz = PyArray_SIZE(__pyx_v_arr); /* "pandas/tslib.pyx":465 * sz = np.PyArray_SIZE(arr) * * if i < 0 and sz > 0: # <<<<<<<<<<<<<< * i += sz * */ __pyx_t_1 = ((__pyx_v_i < 0) != 0); if (__pyx_t_1) { __pyx_t_4 = ((__pyx_v_sz > 0) != 0); __pyx_t_5 = __pyx_t_4; } else { __pyx_t_5 = __pyx_t_1; } if (__pyx_t_5) { /* "pandas/tslib.pyx":466 * * if i < 0 and sz > 0: * i += sz # <<<<<<<<<<<<<< * * if i >= sz or sz == 0 or i < 0: */ __pyx_v_i = (__pyx_v_i + __pyx_v_sz); goto __pyx_L5; } __pyx_L5:; /* "pandas/tslib.pyx":468 * i += sz * * if i >= sz or sz == 0 or i < 0: # <<<<<<<<<<<<<< * raise IndexError('index out of bounds') * */ __pyx_t_5 = ((__pyx_v_i >= __pyx_v_sz) != 0); if (!__pyx_t_5) { __pyx_t_1 = ((__pyx_v_sz == 0) != 0); if (!__pyx_t_1) { __pyx_t_4 = ((__pyx_v_i < 0) != 0); __pyx_t_6 = __pyx_t_4; } else { __pyx_t_6 = __pyx_t_1; } __pyx_t_1 = __pyx_t_6; } else { __pyx_t_1 = __pyx_t_5; } if (__pyx_t_1) { /* "pandas/tslib.pyx":469 * * if i >= sz or sz == 0 or i < 0: * raise IndexError('index out of bounds') # <<<<<<<<<<<<<< * * if arr.descr.type_num == NPY_DATETIME: */ __pyx_t_2 = PyObject_Call(__pyx_builtin_IndexError, __pyx_tuple__14, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 469; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 469; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } /* "pandas/tslib.pyx":471 * raise IndexError('index out of bounds') * * if arr.descr.type_num == NPY_DATETIME: # <<<<<<<<<<<<<< * return Timestamp(util.get_value_1d(arr, i)) * else: */ __pyx_t_1 = ((__pyx_v_arr->descr->type_num == NPY_DATETIME) != 0); if (__pyx_t_1) { /* "pandas/tslib.pyx":472 * * if arr.descr.type_num == NPY_DATETIME: * return Timestamp(util.get_value_1d(arr, i)) # <<<<<<<<<<<<<< * else: * return util.get_value_1d(arr, i) */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_Timestamp); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 472; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_7 = get_value_1d(__pyx_v_arr, __pyx_v_i); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 472; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 472; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_7); __Pyx_GIVEREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_7 = PyObject_Call(__pyx_t_2, __pyx_t_8, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 472; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_r = __pyx_t_7; __pyx_t_7 = 0; goto __pyx_L0; } /*else*/ { /* "pandas/tslib.pyx":474 * return Timestamp(util.get_value_1d(arr, i)) * else: * return util.get_value_1d(arr, i) # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_7 = get_value_1d(__pyx_v_arr, __pyx_v_i); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 474; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_r = __pyx_t_7; __pyx_t_7 = 0; goto __pyx_L0; } /* "pandas/tslib.pyx":454 * * * cpdef object get_value_box(ndarray arr, object loc): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, sz */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_AddTraceback("pandas.tslib.get_value_box", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_casted); __Pyx_XDECREF(__pyx_v_loc); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5tslib_9get_value_box(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_6pandas_5tslib_9get_value_box(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_arr = 0; PyObject *__pyx_v_loc = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("get_value_box (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_arr,&__pyx_n_s_loc,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_arr)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_loc)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("get_value_box", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 454; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "get_value_box") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 454; __pyx_clineno = __LINE__; goto __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_loc = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("get_value_box", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 454; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.tslib.get_value_box", __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_filename = __pyx_f[0]; __pyx_lineno = 454; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5tslib_8get_value_box(__pyx_self, __pyx_v_arr, __pyx_v_loc); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5tslib_8get_value_box(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_arr, PyObject *__pyx_v_loc) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_value_box", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_6pandas_5tslib_get_value_box(__pyx_v_arr, __pyx_v_loc, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 454; __pyx_clineno = __LINE__; goto __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.tslib.get_value_box", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/tslib.pyx":494 * # Frequency inference * * def unique_deltas(ndarray[int64_t] arr): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = len(arr) */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5tslib_11unique_deltas(PyObject *__pyx_self, PyObject *__pyx_v_arr); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5tslib_11unique_deltas = {__Pyx_NAMESTR("unique_deltas"), (PyCFunction)__pyx_pw_6pandas_5tslib_11unique_deltas, METH_O, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5tslib_11unique_deltas(PyObject *__pyx_self, PyObject *__pyx_v_arr) { CYTHON_UNUSED int __pyx_lineno = 0; CYTHON_UNUSED const char *__pyx_filename = NULL; CYTHON_UNUSED int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("unique_deltas (wrapper)", 0); if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_arr), __pyx_ptype_5numpy_ndarray, 1, "arr", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 494; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5tslib_10unique_deltas(__pyx_self, ((PyArrayObject *)__pyx_v_arr)); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5tslib_10unique_deltas(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_arr) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_n; __pyx_t_5numpy_int64_t __pyx_v_val; khiter_t __pyx_v_k; kh_int64_t *__pyx_v_table; int __pyx_v_ret; PyObject *__pyx_v_uniques = 0; PyObject *__pyx_v_result = NULL; __Pyx_LocalBuf_ND __pyx_pybuffernd_arr; __Pyx_Buffer __pyx_pybuffer_arr; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; PyObject *__pyx_t_2 = NULL; Py_ssize_t __pyx_t_3; Py_ssize_t __pyx_t_4; int __pyx_t_5; Py_ssize_t __pyx_t_6; int __pyx_t_7; int __pyx_t_8; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; PyObject *__pyx_t_11 = NULL; PyObject *__pyx_t_12 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("unique_deltas", 0); __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_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 494; __pyx_clineno = __LINE__; goto __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/tslib.pyx":496 * def unique_deltas(ndarray[int64_t] arr): * cdef: * Py_ssize_t i, n = len(arr) # <<<<<<<<<<<<<< * int64_t val * khiter_t k */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_arr)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 496; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/tslib.pyx":500 * khiter_t k * kh_int64_t *table * int ret = 0 # <<<<<<<<<<<<<< * list uniques = [] * */ __pyx_v_ret = 0; /* "pandas/tslib.pyx":501 * kh_int64_t *table * int ret = 0 * list uniques = [] # <<<<<<<<<<<<<< * * table = kh_init_int64() */ __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 501; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_v_uniques = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; /* "pandas/tslib.pyx":503 * list uniques = [] * * table = kh_init_int64() # <<<<<<<<<<<<<< * kh_resize_int64(table, 10) * for i in range(n - 1): */ __pyx_v_table = kh_init_int64(); /* "pandas/tslib.pyx":504 * * table = kh_init_int64() * kh_resize_int64(table, 10) # <<<<<<<<<<<<<< * for i in range(n - 1): * val = arr[i + 1] - arr[i] */ kh_resize_int64(__pyx_v_table, 10); /* "pandas/tslib.pyx":505 * table = kh_init_int64() * kh_resize_int64(table, 10) * for i in range(n - 1): # <<<<<<<<<<<<<< * val = arr[i + 1] - arr[i] * k = kh_get_int64(table, val) */ __pyx_t_1 = (__pyx_v_n - 1); for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_1; __pyx_t_3+=1) { __pyx_v_i = __pyx_t_3; /* "pandas/tslib.pyx":506 * kh_resize_int64(table, 10) * for i in range(n - 1): * val = arr[i + 1] - arr[i] # <<<<<<<<<<<<<< * k = kh_get_int64(table, val) * if k == table.n_buckets: */ __pyx_t_4 = (__pyx_v_i + 1); __pyx_t_5 = -1; if (__pyx_t_4 < 0) { __pyx_t_4 += __pyx_pybuffernd_arr.diminfo[0].shape; if (unlikely(__pyx_t_4 < 0)) __pyx_t_5 = 0; } else if (unlikely(__pyx_t_4 >= __pyx_pybuffernd_arr.diminfo[0].shape)) __pyx_t_5 = 0; if (unlikely(__pyx_t_5 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_5); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 506; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_6 = __pyx_v_i; __pyx_t_5 = -1; if (__pyx_t_6 < 0) { __pyx_t_6 += __pyx_pybuffernd_arr.diminfo[0].shape; if (unlikely(__pyx_t_6 < 0)) __pyx_t_5 = 0; } else if (unlikely(__pyx_t_6 >= __pyx_pybuffernd_arr.diminfo[0].shape)) __pyx_t_5 = 0; if (unlikely(__pyx_t_5 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_5); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 506; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_val = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_arr.rcbuffer->pybuffer.buf, __pyx_t_4, __pyx_pybuffernd_arr.diminfo[0].strides)) - (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_arr.rcbuffer->pybuffer.buf, __pyx_t_6, __pyx_pybuffernd_arr.diminfo[0].strides))); /* "pandas/tslib.pyx":507 * for i in range(n - 1): * val = arr[i + 1] - arr[i] * k = kh_get_int64(table, val) # <<<<<<<<<<<<<< * if k == table.n_buckets: * kh_put_int64(table, val, &ret) */ __pyx_v_k = kh_get_int64(__pyx_v_table, __pyx_v_val); /* "pandas/tslib.pyx":508 * val = arr[i + 1] - arr[i] * k = kh_get_int64(table, val) * if k == table.n_buckets: # <<<<<<<<<<<<<< * kh_put_int64(table, val, &ret) * uniques.append(val) */ __pyx_t_7 = ((__pyx_v_k == __pyx_v_table->n_buckets) != 0); if (__pyx_t_7) { /* "pandas/tslib.pyx":509 * k = kh_get_int64(table, val) * if k == table.n_buckets: * kh_put_int64(table, val, &ret) # <<<<<<<<<<<<<< * uniques.append(val) * kh_destroy_int64(table) */ kh_put_int64(__pyx_v_table, __pyx_v_val, (&__pyx_v_ret)); /* "pandas/tslib.pyx":510 * if k == table.n_buckets: * kh_put_int64(table, val, &ret) * uniques.append(val) # <<<<<<<<<<<<<< * kh_destroy_int64(table) * */ __pyx_t_2 = __Pyx_PyInt_From_npy_int64(__pyx_v_val); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 510; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_8 = __Pyx_PyList_Append(__pyx_v_uniques, __pyx_t_2); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 510; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; goto __pyx_L5; } __pyx_L5:; } /* "pandas/tslib.pyx":511 * kh_put_int64(table, val, &ret) * uniques.append(val) * kh_destroy_int64(table) # <<<<<<<<<<<<<< * * result = np.array(uniques, dtype=np.int64) */ kh_destroy_int64(__pyx_v_table); /* "pandas/tslib.pyx":513 * kh_destroy_int64(table) * * result = np.array(uniques, dtype=np.int64) # <<<<<<<<<<<<<< * result.sort() * return result */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 513; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_array); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 513; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 513; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_uniques); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_uniques); __Pyx_GIVEREF(__pyx_v_uniques); __pyx_t_10 = PyDict_New(); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 513; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __pyx_t_11 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 513; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_int64); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 513; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; if (PyDict_SetItem(__pyx_t_10, __pyx_n_s_dtype, __pyx_t_12) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 513; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __pyx_t_12 = PyObject_Call(__pyx_t_9, __pyx_t_2, __pyx_t_10); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 513; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_v_result = __pyx_t_12; __pyx_t_12 = 0; /* "pandas/tslib.pyx":514 * * result = np.array(uniques, dtype=np.int64) * result.sort() # <<<<<<<<<<<<<< * return result * */ __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_result, __pyx_n_s_sort); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 514; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __pyx_t_10 = PyObject_Call(__pyx_t_12, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 514; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; /* "pandas/tslib.pyx":515 * result = np.array(uniques, dtype=np.int64) * result.sort() * return result # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_result); __pyx_r = __pyx_v_result; goto __pyx_L0; /* "pandas/tslib.pyx":494 * # Frequency inference * * def unique_deltas(ndarray[int64_t] arr): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = len(arr) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_9); __Pyx_XDECREF(__pyx_t_10); __Pyx_XDECREF(__pyx_t_11); __Pyx_XDECREF(__pyx_t_12); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_arr.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.tslib.unique_deltas", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_arr.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF(__pyx_v_uniques); __Pyx_XDECREF(__pyx_v_result); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/tslib.pyx":518 * * * cdef inline bint _is_multiple(int64_t us, int64_t mult): # <<<<<<<<<<<<<< * return us % mult == 0 * */ static CYTHON_INLINE int __pyx_f_6pandas_5tslib__is_multiple(__pyx_t_5numpy_int64_t __pyx_v_us, __pyx_t_5numpy_int64_t __pyx_v_mult) { int __pyx_r; __Pyx_RefNannyDeclarations int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_is_multiple", 0); /* "pandas/tslib.pyx":519 * * cdef inline bint _is_multiple(int64_t us, int64_t mult): * return us % mult == 0 # <<<<<<<<<<<<<< * * */ if (unlikely(__pyx_v_mult == 0)) { #ifdef WITH_THREAD PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure(); #endif PyErr_SetString(PyExc_ZeroDivisionError, "integer division or modulo by zero"); #ifdef WITH_THREAD PyGILState_Release(__pyx_gilstate_save); #endif {__pyx_filename = __pyx_f[0]; __pyx_lineno = 519; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_r = (__Pyx_mod___pyx_t_5numpy_int64_t(__pyx_v_us, __pyx_v_mult) == 0); goto __pyx_L0; /* "pandas/tslib.pyx":518 * * * cdef inline bint _is_multiple(int64_t us, int64_t mult): # <<<<<<<<<<<<<< * return us % mult == 0 * */ /* function exit code */ __pyx_L1_error:; __Pyx_WriteUnraisable("pandas.tslib._is_multiple", __pyx_clineno, __pyx_lineno, __pyx_filename, 0); __pyx_r = 0; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/tslib.pyx":522 * * * def apply_offset(ndarray[object] values, object offset): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = len(values) */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5tslib_13apply_offset(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5tslib_13apply_offset = {__Pyx_NAMESTR("apply_offset"), (PyCFunction)__pyx_pw_6pandas_5tslib_13apply_offset, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5tslib_13apply_offset(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_values = 0; CYTHON_UNUSED PyObject *__pyx_v_offset = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("apply_offset (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_values,&__pyx_n_s_offset,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_values)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_offset)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("apply_offset", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 522; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "apply_offset") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 522; __pyx_clineno = __LINE__; goto __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_offset = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("apply_offset", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 522; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.tslib.apply_offset", __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_filename = __pyx_f[0]; __pyx_lineno = 522; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5tslib_12apply_offset(__pyx_self, __pyx_v_values, __pyx_v_offset); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5tslib_12apply_offset(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, CYTHON_UNUSED PyObject *__pyx_v_offset) { Py_ssize_t __pyx_v_n; CYTHON_UNUSED PyArrayObject *__pyx_v_new_values = 0; PyObject *__pyx_v_result = NULL; __Pyx_LocalBuf_ND __pyx_pybuffernd_new_values; __Pyx_Buffer __pyx_pybuffer_new_values; __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; PyArrayObject *__pyx_t_6 = NULL; int __pyx_t_7; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("apply_offset", 0); __pyx_pybuffer_new_values.pybuffer.buf = NULL; __pyx_pybuffer_new_values.refcount = 0; __pyx_pybuffernd_new_values.data = NULL; __pyx_pybuffernd_new_values.rcbuffer = &__pyx_pybuffer_new_values; __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_filename = __pyx_f[0]; __pyx_lineno = 522; __pyx_clineno = __LINE__; goto __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/tslib.pyx":524 * def apply_offset(ndarray[object] values, object offset): * cdef: * Py_ssize_t i, n = len(values) # <<<<<<<<<<<<<< * ndarray[int64_t] new_values * object boxed */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 524; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/tslib.pyx":528 * object boxed * * result = np.empty(n, dtype='M8[ns]') # <<<<<<<<<<<<<< * new_values = result.view('i8') * */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 528; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 528; __pyx_clineno = __LINE__; goto __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_n); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 528; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 528; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 528; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_dtype, __pyx_kp_s_M8_ns) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 528; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_5 = PyObject_Call(__pyx_t_3, __pyx_t_4, __pyx_t_2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 528; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_result = __pyx_t_5; __pyx_t_5 = 0; /* "pandas/tslib.pyx":529 * * result = np.empty(n, dtype='M8[ns]') * new_values = result.view('i8') # <<<<<<<<<<<<<< * * */ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_result, __pyx_n_s_view); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 529; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_2 = PyObject_Call(__pyx_t_5, __pyx_tuple__15, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 529; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 529; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_6 = ((PyArrayObject *)__pyx_t_2); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_new_values.rcbuffer->pybuffer); __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_new_values.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_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_new_values.rcbuffer->pybuffer, (PyObject*)__pyx_v_new_values, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_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_pybuffernd_new_values.diminfo[0].strides = __pyx_pybuffernd_new_values.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_new_values.diminfo[0].shape = __pyx_pybuffernd_new_values.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 529; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_6 = 0; __pyx_v_new_values = ((PyArrayObject *)__pyx_t_2); __pyx_t_2 = 0; /* "pandas/tslib.pyx":522 * * * def apply_offset(ndarray[object] values, object offset): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = len(values) */ /* 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_XDECREF(__pyx_t_5); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_new_values.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.tslib.apply_offset", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_new_values.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_new_values); __Pyx_XDECREF(__pyx_v_result); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/tslib.pyx":532 * * * cdef inline bint _cmp_scalar(int64_t lhs, int64_t rhs, int op) except -1: # <<<<<<<<<<<<<< * if op == Py_EQ: * return lhs == rhs */ static CYTHON_INLINE int __pyx_f_6pandas_5tslib__cmp_scalar(__pyx_t_5numpy_int64_t __pyx_v_lhs, __pyx_t_5numpy_int64_t __pyx_v_rhs, int __pyx_v_op) { int __pyx_r; __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("_cmp_scalar", 0); /* "pandas/tslib.pyx":533 * * cdef inline bint _cmp_scalar(int64_t lhs, int64_t rhs, int op) except -1: * if op == Py_EQ: # <<<<<<<<<<<<<< * return lhs == rhs * elif op == Py_NE: */ __pyx_t_1 = ((__pyx_v_op == Py_EQ) != 0); if (__pyx_t_1) { /* "pandas/tslib.pyx":534 * cdef inline bint _cmp_scalar(int64_t lhs, int64_t rhs, int op) except -1: * if op == Py_EQ: * return lhs == rhs # <<<<<<<<<<<<<< * elif op == Py_NE: * return lhs != rhs */ __pyx_r = (__pyx_v_lhs == __pyx_v_rhs); goto __pyx_L0; } /* "pandas/tslib.pyx":535 * if op == Py_EQ: * return lhs == rhs * elif op == Py_NE: # <<<<<<<<<<<<<< * return lhs != rhs * elif op == Py_LT: */ __pyx_t_1 = ((__pyx_v_op == Py_NE) != 0); if (__pyx_t_1) { /* "pandas/tslib.pyx":536 * return lhs == rhs * elif op == Py_NE: * return lhs != rhs # <<<<<<<<<<<<<< * elif op == Py_LT: * return lhs < rhs */ __pyx_r = (__pyx_v_lhs != __pyx_v_rhs); goto __pyx_L0; } /* "pandas/tslib.pyx":537 * elif op == Py_NE: * return lhs != rhs * elif op == Py_LT: # <<<<<<<<<<<<<< * return lhs < rhs * elif op == Py_LE: */ __pyx_t_1 = ((__pyx_v_op == Py_LT) != 0); if (__pyx_t_1) { /* "pandas/tslib.pyx":538 * return lhs != rhs * elif op == Py_LT: * return lhs < rhs # <<<<<<<<<<<<<< * elif op == Py_LE: * return lhs <= rhs */ __pyx_r = (__pyx_v_lhs < __pyx_v_rhs); goto __pyx_L0; } /* "pandas/tslib.pyx":539 * elif op == Py_LT: * return lhs < rhs * elif op == Py_LE: # <<<<<<<<<<<<<< * return lhs <= rhs * elif op == Py_GT: */ __pyx_t_1 = ((__pyx_v_op == Py_LE) != 0); if (__pyx_t_1) { /* "pandas/tslib.pyx":540 * return lhs < rhs * elif op == Py_LE: * return lhs <= rhs # <<<<<<<<<<<<<< * elif op == Py_GT: * return lhs > rhs */ __pyx_r = (__pyx_v_lhs <= __pyx_v_rhs); goto __pyx_L0; } /* "pandas/tslib.pyx":541 * elif op == Py_LE: * return lhs <= rhs * elif op == Py_GT: # <<<<<<<<<<<<<< * return lhs > rhs * elif op == Py_GE: */ __pyx_t_1 = ((__pyx_v_op == Py_GT) != 0); if (__pyx_t_1) { /* "pandas/tslib.pyx":542 * return lhs <= rhs * elif op == Py_GT: * return lhs > rhs # <<<<<<<<<<<<<< * elif op == Py_GE: * return lhs >= rhs */ __pyx_r = (__pyx_v_lhs > __pyx_v_rhs); goto __pyx_L0; } /* "pandas/tslib.pyx":543 * elif op == Py_GT: * return lhs > rhs * elif op == Py_GE: # <<<<<<<<<<<<<< * return lhs >= rhs * */ __pyx_t_1 = ((__pyx_v_op == Py_GE) != 0); if (__pyx_t_1) { /* "pandas/tslib.pyx":544 * return lhs > rhs * elif op == Py_GE: * return lhs >= rhs # <<<<<<<<<<<<<< * * */ __pyx_r = (__pyx_v_lhs >= __pyx_v_rhs); goto __pyx_L0; } /* "pandas/tslib.pyx":532 * * * cdef inline bint _cmp_scalar(int64_t lhs, int64_t rhs, int op) except -1: # <<<<<<<<<<<<<< * if op == Py_EQ: * return lhs == rhs */ /* function exit code */ __pyx_r = 0; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/tslib.pyx":568 * object offset # frequency reference * * def __hash__(_Timestamp self): # <<<<<<<<<<<<<< * if self.nanosecond: * return hash(self.value) */ /* Python wrapper */ static Py_hash_t __pyx_pw_6pandas_5tslib_10_Timestamp_1__hash__(PyObject *__pyx_v_self); /*proto*/ static Py_hash_t __pyx_pw_6pandas_5tslib_10_Timestamp_1__hash__(PyObject *__pyx_v_self) { Py_hash_t __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__hash__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_5tslib_10_Timestamp___hash__(((struct __pyx_obj_6pandas_5tslib__Timestamp *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static Py_hash_t __pyx_pf_6pandas_5tslib_10_Timestamp___hash__(struct __pyx_obj_6pandas_5tslib__Timestamp *__pyx_v_self) { Py_hash_t __pyx_r; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; Py_hash_t __pyx_t_3; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__hash__", 0); /* "pandas/tslib.pyx":569 * * def __hash__(_Timestamp self): * if self.nanosecond: # <<<<<<<<<<<<<< * return hash(self.value) * return datetime.__hash__(self) */ __pyx_t_1 = (__pyx_v_self->nanosecond != 0); if (__pyx_t_1) { /* "pandas/tslib.pyx":570 * def __hash__(_Timestamp self): * if self.nanosecond: * return hash(self.value) # <<<<<<<<<<<<<< * return datetime.__hash__(self) * */ __pyx_t_2 = __Pyx_PyInt_From_npy_int64(__pyx_v_self->value); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 570; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyObject_Hash(__pyx_t_2); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 570; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_3; goto __pyx_L0; } /* "pandas/tslib.pyx":571 * if self.nanosecond: * return hash(self.value) * return datetime.__hash__(self) # <<<<<<<<<<<<<< * * def __richcmp__(_Timestamp self, object other, int op): */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)((PyObject*)__pyx_ptype_8datetime_datetime)), __pyx_n_s_hash); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 571; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 571; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(((PyObject *)__pyx_v_self)); PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_v_self)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self)); __pyx_t_5 = PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 571; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_3 = __Pyx_PyInt_AsHash_t(__pyx_t_5); if (unlikely((__pyx_t_3 == (Py_hash_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 571; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_r = __pyx_t_3; goto __pyx_L0; /* "pandas/tslib.pyx":568 * object offset # frequency reference * * def __hash__(_Timestamp self): # <<<<<<<<<<<<<< * if self.nanosecond: * return hash(self.value) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("pandas.tslib._Timestamp.__hash__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; if (unlikely(__pyx_r == -1) && !PyErr_Occurred()) __pyx_r = -2; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/tslib.pyx":573 * return datetime.__hash__(self) * * def __richcmp__(_Timestamp self, object other, int op): # <<<<<<<<<<<<<< * cdef: * _Timestamp ots */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5tslib_10_Timestamp_3__richcmp__(PyObject *__pyx_v_self, PyObject *__pyx_v_other, int __pyx_v_op); /*proto*/ static PyObject *__pyx_pw_6pandas_5tslib_10_Timestamp_3__richcmp__(PyObject *__pyx_v_self, PyObject *__pyx_v_other, int __pyx_v_op) { CYTHON_UNUSED int __pyx_lineno = 0; CYTHON_UNUSED const char *__pyx_filename = NULL; CYTHON_UNUSED int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__richcmp__ (wrapper)", 0); if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_self), __pyx_ptype_6pandas_5tslib__Timestamp, 1, "self", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 573; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5tslib_10_Timestamp_2__richcmp__(((struct __pyx_obj_6pandas_5tslib__Timestamp *)__pyx_v_self), ((PyObject *)__pyx_v_other), ((int)__pyx_v_op)); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5tslib_10_Timestamp_2__richcmp__(struct __pyx_obj_6pandas_5tslib__Timestamp *__pyx_v_self, PyObject *__pyx_v_other, int __pyx_v_op) { struct __pyx_obj_6pandas_5tslib__Timestamp *__pyx_v_ots = 0; int __pyx_v_ndim; PyDateTime_DateTime *__pyx_v_val = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; int __pyx_t_9; PyObject *__pyx_t_10 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__richcmp__", 0); __Pyx_INCREF(__pyx_v_other); /* "pandas/tslib.pyx":578 * int ndim * * if isinstance(other, _Timestamp): # <<<<<<<<<<<<<< * if isinstance(other, _NaT): * return _cmp_nat_dt(other, self, _reverse_ops[op]) */ __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_other, ((PyObject*)__pyx_ptype_6pandas_5tslib__Timestamp)); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { /* "pandas/tslib.pyx":579 * * if isinstance(other, _Timestamp): * if isinstance(other, _NaT): # <<<<<<<<<<<<<< * return _cmp_nat_dt(other, self, _reverse_ops[op]) * ots = other */ __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_other, ((PyObject*)__pyx_ptype_6pandas_5tslib__NaT)); __pyx_t_1 = (__pyx_t_2 != 0); if (__pyx_t_1) { /* "pandas/tslib.pyx":580 * if isinstance(other, _Timestamp): * if isinstance(other, _NaT): * return _cmp_nat_dt(other, self, _reverse_ops[op]) # <<<<<<<<<<<<<< * ots = other * elif isinstance(other, datetime): */ __Pyx_XDECREF(__pyx_r); if (!(likely(((__pyx_v_other) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_other, __pyx_ptype_6pandas_5tslib__NaT))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 580; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_1 = __pyx_f_6pandas_5tslib__cmp_nat_dt(((struct __pyx_obj_6pandas_5tslib__NaT *)__pyx_v_other), __pyx_v_self, (__pyx_v_6pandas_5tslib__reverse_ops[__pyx_v_op])); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 580; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_t_1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 580; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; } /* "pandas/tslib.pyx":581 * if isinstance(other, _NaT): * return _cmp_nat_dt(other, self, _reverse_ops[op]) * ots = other # <<<<<<<<<<<<<< * elif isinstance(other, datetime): * if self.nanosecond == 0: */ if (!(likely(((__pyx_v_other) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_other, __pyx_ptype_6pandas_5tslib__Timestamp))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 581; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_3 = __pyx_v_other; __Pyx_INCREF(__pyx_t_3); __pyx_v_ots = ((struct __pyx_obj_6pandas_5tslib__Timestamp *)__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L3; } /* "pandas/tslib.pyx":582 * return _cmp_nat_dt(other, self, _reverse_ops[op]) * ots = other * elif isinstance(other, datetime): # <<<<<<<<<<<<<< * if self.nanosecond == 0: * val = self.to_datetime() */ __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_other, ((PyObject*)__pyx_ptype_8datetime_datetime)); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { /* "pandas/tslib.pyx":583 * ots = other * elif isinstance(other, datetime): * if self.nanosecond == 0: # <<<<<<<<<<<<<< * val = self.to_datetime() * return PyObject_RichCompareBool(val, other, op) */ __pyx_t_2 = ((__pyx_v_self->nanosecond == 0) != 0); if (__pyx_t_2) { /* "pandas/tslib.pyx":584 * elif isinstance(other, datetime): * if self.nanosecond == 0: * val = self.to_datetime() # <<<<<<<<<<<<<< * return PyObject_RichCompareBool(val, other, op) * */ __pyx_t_3 = ((PyObject *)((struct __pyx_vtabstruct_6pandas_5tslib__Timestamp *)__pyx_v_self->__pyx_vtab)->to_datetime(__pyx_v_self, 0)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 584; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_v_val = ((PyDateTime_DateTime *)__pyx_t_3); __pyx_t_3 = 0; /* "pandas/tslib.pyx":585 * if self.nanosecond == 0: * val = self.to_datetime() * return PyObject_RichCompareBool(val, other, op) # <<<<<<<<<<<<<< * * try: */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = PyObject_RichCompareBool(((PyObject *)__pyx_v_val), __pyx_v_other, __pyx_v_op); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 585; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 585; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; } /* "pandas/tslib.pyx":587 * return PyObject_RichCompareBool(val, other, op) * * try: # <<<<<<<<<<<<<< * ots = Timestamp(other) * except ValueError: */ { __Pyx_ExceptionSave(&__pyx_t_4, &__pyx_t_5, &__pyx_t_6); __Pyx_XGOTREF(__pyx_t_4); __Pyx_XGOTREF(__pyx_t_5); __Pyx_XGOTREF(__pyx_t_6); /*try:*/ { /* "pandas/tslib.pyx":588 * * try: * ots = Timestamp(other) # <<<<<<<<<<<<<< * except ValueError: * return self._compare_outside_nanorange(other, op) */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_Timestamp); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 588; __pyx_clineno = __LINE__; goto __pyx_L6_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 588; __pyx_clineno = __LINE__; goto __pyx_L6_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_INCREF(__pyx_v_other); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_v_other); __Pyx_GIVEREF(__pyx_v_other); __pyx_t_8 = PyObject_Call(__pyx_t_3, __pyx_t_7, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 588; __pyx_clineno = __LINE__; goto __pyx_L6_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (!(likely(((__pyx_t_8) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_8, __pyx_ptype_6pandas_5tslib__Timestamp))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 588; __pyx_clineno = __LINE__; goto __pyx_L6_error;} __pyx_v_ots = ((struct __pyx_obj_6pandas_5tslib__Timestamp *)__pyx_t_8); __pyx_t_8 = 0; } __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; goto __pyx_L13_try_end; __pyx_L6_error:; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; /* "pandas/tslib.pyx":589 * try: * ots = Timestamp(other) * except ValueError: # <<<<<<<<<<<<<< * return self._compare_outside_nanorange(other, op) * else: */ __pyx_t_9 = PyErr_ExceptionMatches(__pyx_builtin_ValueError); if (__pyx_t_9) { __Pyx_AddTraceback("pandas.tslib._Timestamp.__richcmp__", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_8, &__pyx_t_7, &__pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 589; __pyx_clineno = __LINE__; goto __pyx_L8_except_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_GOTREF(__pyx_t_7); __Pyx_GOTREF(__pyx_t_3); /* "pandas/tslib.pyx":590 * ots = Timestamp(other) * except ValueError: * return self._compare_outside_nanorange(other, op) # <<<<<<<<<<<<<< * else: * ndim = getattr(other, _NDIM_STRING, -1) */ __Pyx_XDECREF(__pyx_r); if (!(likely(((__pyx_v_other) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_other, __pyx_ptype_8datetime_datetime))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 590; __pyx_clineno = __LINE__; goto __pyx_L8_except_error;} __pyx_t_2 = ((struct __pyx_vtabstruct_6pandas_5tslib__Timestamp *)__pyx_v_self->__pyx_vtab)->_compare_outside_nanorange(__pyx_v_self, ((PyDateTime_DateTime *)__pyx_v_other), __pyx_v_op); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 590; __pyx_clineno = __LINE__; goto __pyx_L8_except_error;} __pyx_t_10 = __Pyx_PyBool_FromLong(__pyx_t_2); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 590; __pyx_clineno = __LINE__; goto __pyx_L8_except_error;} __Pyx_GOTREF(__pyx_t_10); __pyx_r = __pyx_t_10; __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; goto __pyx_L9_except_return; __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; goto __pyx_L7_exception_handled; } goto __pyx_L8_except_error; __pyx_L8_except_error:; __Pyx_XGIVEREF(__pyx_t_4); __Pyx_XGIVEREF(__pyx_t_5); __Pyx_XGIVEREF(__pyx_t_6); __Pyx_ExceptionReset(__pyx_t_4, __pyx_t_5, __pyx_t_6); goto __pyx_L1_error; __pyx_L9_except_return:; __Pyx_XGIVEREF(__pyx_t_4); __Pyx_XGIVEREF(__pyx_t_5); __Pyx_XGIVEREF(__pyx_t_6); __Pyx_ExceptionReset(__pyx_t_4, __pyx_t_5, __pyx_t_6); goto __pyx_L0; __pyx_L7_exception_handled:; __Pyx_XGIVEREF(__pyx_t_4); __Pyx_XGIVEREF(__pyx_t_5); __Pyx_XGIVEREF(__pyx_t_6); __Pyx_ExceptionReset(__pyx_t_4, __pyx_t_5, __pyx_t_6); __pyx_L13_try_end:; } goto __pyx_L3; } /*else*/ { /* "pandas/tslib.pyx":592 * return self._compare_outside_nanorange(other, op) * else: * ndim = getattr(other, _NDIM_STRING, -1) # <<<<<<<<<<<<<< * * if ndim != -1: */ __pyx_t_3 = __pyx_v_6pandas_5tslib__NDIM_STRING; __Pyx_INCREF(__pyx_t_3); __pyx_t_7 = __Pyx_GetAttr3(__pyx_v_other, __pyx_t_3, __pyx_int_neg_1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 592; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_9 = __Pyx_PyInt_As_int(__pyx_t_7); if (unlikely((__pyx_t_9 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 592; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_v_ndim = __pyx_t_9; /* "pandas/tslib.pyx":594 * ndim = getattr(other, _NDIM_STRING, -1) * * if ndim != -1: # <<<<<<<<<<<<<< * if ndim == 0: * if isinstance(other, np.datetime64): */ __pyx_t_2 = ((__pyx_v_ndim != -1) != 0); if (__pyx_t_2) { /* "pandas/tslib.pyx":595 * * if ndim != -1: * if ndim == 0: # <<<<<<<<<<<<<< * if isinstance(other, np.datetime64): * other = Timestamp(other) */ __pyx_t_2 = ((__pyx_v_ndim == 0) != 0); if (__pyx_t_2) { /* "pandas/tslib.pyx":596 * if ndim != -1: * if ndim == 0: * if isinstance(other, np.datetime64): # <<<<<<<<<<<<<< * other = Timestamp(other) * else: */ __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 596; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_datetime64); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 596; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_2 = PyObject_IsInstance(__pyx_v_other, __pyx_t_3); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 596; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_1 = (__pyx_t_2 != 0); if (__pyx_t_1) { /* "pandas/tslib.pyx":597 * if ndim == 0: * if isinstance(other, np.datetime64): * other = Timestamp(other) # <<<<<<<<<<<<<< * else: * raise TypeError('Cannot compare type %r with type %r' % */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_Timestamp); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 597; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 597; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_INCREF(__pyx_v_other); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_v_other); __Pyx_GIVEREF(__pyx_v_other); __pyx_t_8 = PyObject_Call(__pyx_t_3, __pyx_t_7, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 597; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF_SET(__pyx_v_other, __pyx_t_8); __pyx_t_8 = 0; goto __pyx_L18; } /*else*/ { /* "pandas/tslib.pyx":600 * else: * raise TypeError('Cannot compare type %r with type %r' % * (type(self).__name__, # <<<<<<<<<<<<<< * type(other).__name__)) * return PyObject_RichCompare(other, self, _reverse_ops[op]) */ __pyx_t_8 = __Pyx_PyObject_GetAttrStr(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))), __pyx_n_s_name); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 600; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); /* "pandas/tslib.pyx":601 * raise TypeError('Cannot compare type %r with type %r' % * (type(self).__name__, * type(other).__name__)) # <<<<<<<<<<<<<< * return PyObject_RichCompare(other, self, _reverse_ops[op]) * else: */ __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)Py_TYPE(__pyx_v_other)), __pyx_n_s_name); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 601; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); /* "pandas/tslib.pyx":600 * else: * raise TypeError('Cannot compare type %r with type %r' % * (type(self).__name__, # <<<<<<<<<<<<<< * type(other).__name__)) * return PyObject_RichCompare(other, self, _reverse_ops[op]) */ __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 600; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_8); __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_7); __Pyx_GIVEREF(__pyx_t_7); __pyx_t_8 = 0; __pyx_t_7 = 0; /* "pandas/tslib.pyx":599 * other = Timestamp(other) * else: * raise TypeError('Cannot compare type %r with type %r' % # <<<<<<<<<<<<<< * (type(self).__name__, * type(other).__name__)) */ __pyx_t_7 = __Pyx_PyString_Format(__pyx_kp_s_Cannot_compare_type_r_with_type, __pyx_t_3); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 599; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 599; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_7); __Pyx_GIVEREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_7 = PyObject_Call(__pyx_builtin_TypeError, __pyx_t_3, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 599; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_Raise(__pyx_t_7, 0, 0, 0); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 599; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_L18:; goto __pyx_L17; } __pyx_L17:; /* "pandas/tslib.pyx":602 * (type(self).__name__, * type(other).__name__)) * return PyObject_RichCompare(other, self, _reverse_ops[op]) # <<<<<<<<<<<<<< * else: * if op == Py_EQ: */ __Pyx_XDECREF(__pyx_r); __pyx_t_7 = PyObject_RichCompare(__pyx_v_other, ((PyObject *)__pyx_v_self), (__pyx_v_6pandas_5tslib__reverse_ops[__pyx_v_op])); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 602; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_r = __pyx_t_7; __pyx_t_7 = 0; goto __pyx_L0; } /*else*/ { /* "pandas/tslib.pyx":604 * return PyObject_RichCompare(other, self, _reverse_ops[op]) * else: * if op == Py_EQ: # <<<<<<<<<<<<<< * return False * elif op == Py_NE: */ __pyx_t_1 = ((__pyx_v_op == Py_EQ) != 0); if (__pyx_t_1) { /* "pandas/tslib.pyx":605 * else: * if op == Py_EQ: * return False # <<<<<<<<<<<<<< * elif op == Py_NE: * return True */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(Py_False); __pyx_r = Py_False; goto __pyx_L0; } /* "pandas/tslib.pyx":606 * if op == Py_EQ: * return False * elif op == Py_NE: # <<<<<<<<<<<<<< * return True * raise TypeError('Cannot compare type %r with type %r' % */ __pyx_t_1 = ((__pyx_v_op == Py_NE) != 0); if (__pyx_t_1) { /* "pandas/tslib.pyx":607 * return False * elif op == Py_NE: * return True # <<<<<<<<<<<<<< * raise TypeError('Cannot compare type %r with type %r' % * (type(self).__name__, type(other).__name__)) */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(Py_True); __pyx_r = Py_True; goto __pyx_L0; } /* "pandas/tslib.pyx":609 * return True * raise TypeError('Cannot compare type %r with type %r' % * (type(self).__name__, type(other).__name__)) # <<<<<<<<<<<<<< * * self._assert_tzawareness_compat(other) */ __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))), __pyx_n_s_name); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 609; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)Py_TYPE(__pyx_v_other)), __pyx_n_s_name); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 609; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 609; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_7); __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_7 = 0; __pyx_t_3 = 0; /* "pandas/tslib.pyx":608 * elif op == Py_NE: * return True * raise TypeError('Cannot compare type %r with type %r' % # <<<<<<<<<<<<<< * (type(self).__name__, type(other).__name__)) * */ __pyx_t_3 = __Pyx_PyString_Format(__pyx_kp_s_Cannot_compare_type_r_with_type, __pyx_t_8); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 608; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 608; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyObject_Call(__pyx_builtin_TypeError, __pyx_t_8, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 608; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 608; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } } __pyx_L3:; /* "pandas/tslib.pyx":611 * (type(self).__name__, type(other).__name__)) * * self._assert_tzawareness_compat(other) # <<<<<<<<<<<<<< * return _cmp_scalar(self.value, ots.value, op) * */ __pyx_t_9 = ((struct __pyx_vtabstruct_6pandas_5tslib__Timestamp *)__pyx_v_self->__pyx_vtab)->_assert_tzawareness_compat(__pyx_v_self, __pyx_v_other); if (unlikely(__pyx_t_9 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 611; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/tslib.pyx":612 * * self._assert_tzawareness_compat(other) * return _cmp_scalar(self.value, ots.value, op) # <<<<<<<<<<<<<< * * cdef bint _compare_outside_nanorange(_Timestamp self, datetime other, */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_6pandas_5tslib__cmp_scalar(__pyx_v_self->value, __pyx_v_ots->value, __pyx_v_op); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 612; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_t_1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 612; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; /* "pandas/tslib.pyx":573 * return datetime.__hash__(self) * * def __richcmp__(_Timestamp self, object other, int op): # <<<<<<<<<<<<<< * cdef: * _Timestamp ots */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_10); __Pyx_AddTraceback("pandas.tslib._Timestamp.__richcmp__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_ots); __Pyx_XDECREF((PyObject *)__pyx_v_val); __Pyx_XDECREF(__pyx_v_other); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/tslib.pyx":614 * return _cmp_scalar(self.value, ots.value, op) * * cdef bint _compare_outside_nanorange(_Timestamp self, datetime other, # <<<<<<<<<<<<<< * int op) except -1: * cdef datetime dtval = self.to_datetime() */ static int __pyx_f_6pandas_5tslib_10_Timestamp__compare_outside_nanorange(struct __pyx_obj_6pandas_5tslib__Timestamp *__pyx_v_self, PyDateTime_DateTime *__pyx_v_other, int __pyx_v_op) { PyDateTime_DateTime *__pyx_v_dtval = 0; int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; int __pyx_t_3; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_compare_outside_nanorange", 0); /* "pandas/tslib.pyx":616 * cdef bint _compare_outside_nanorange(_Timestamp self, datetime other, * int op) except -1: * cdef datetime dtval = self.to_datetime() # <<<<<<<<<<<<<< * * self._assert_tzawareness_compat(other) */ __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_6pandas_5tslib__Timestamp *)__pyx_v_self->__pyx_vtab)->to_datetime(__pyx_v_self, 0)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 616; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_v_dtval = ((PyDateTime_DateTime *)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/tslib.pyx":618 * cdef datetime dtval = self.to_datetime() * * self._assert_tzawareness_compat(other) # <<<<<<<<<<<<<< * * if self.nanosecond == 0: */ __pyx_t_2 = ((struct __pyx_vtabstruct_6pandas_5tslib__Timestamp *)__pyx_v_self->__pyx_vtab)->_assert_tzawareness_compat(__pyx_v_self, ((PyObject *)__pyx_v_other)); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 618; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/tslib.pyx":620 * self._assert_tzawareness_compat(other) * * if self.nanosecond == 0: # <<<<<<<<<<<<<< * return PyObject_RichCompareBool(dtval, other, op) * else: */ __pyx_t_3 = ((__pyx_v_self->nanosecond == 0) != 0); if (__pyx_t_3) { /* "pandas/tslib.pyx":621 * * if self.nanosecond == 0: * return PyObject_RichCompareBool(dtval, other, op) # <<<<<<<<<<<<<< * else: * if op == Py_EQ: */ __pyx_t_3 = PyObject_RichCompareBool(((PyObject *)__pyx_v_dtval), ((PyObject *)__pyx_v_other), __pyx_v_op); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 621; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_t_3; goto __pyx_L0; } /*else*/ { /* "pandas/tslib.pyx":623 * return PyObject_RichCompareBool(dtval, other, op) * else: * if op == Py_EQ: # <<<<<<<<<<<<<< * return False * elif op == Py_NE: */ __pyx_t_3 = ((__pyx_v_op == Py_EQ) != 0); if (__pyx_t_3) { /* "pandas/tslib.pyx":624 * else: * if op == Py_EQ: * return False # <<<<<<<<<<<<<< * elif op == Py_NE: * return True */ __pyx_r = 0; goto __pyx_L0; } /* "pandas/tslib.pyx":625 * if op == Py_EQ: * return False * elif op == Py_NE: # <<<<<<<<<<<<<< * return True * elif op == Py_LT: */ __pyx_t_3 = ((__pyx_v_op == Py_NE) != 0); if (__pyx_t_3) { /* "pandas/tslib.pyx":626 * return False * elif op == Py_NE: * return True # <<<<<<<<<<<<<< * elif op == Py_LT: * return dtval < other */ __pyx_r = 1; goto __pyx_L0; } /* "pandas/tslib.pyx":627 * elif op == Py_NE: * return True * elif op == Py_LT: # <<<<<<<<<<<<<< * return dtval < other * elif op == Py_LE: */ __pyx_t_3 = ((__pyx_v_op == Py_LT) != 0); if (__pyx_t_3) { /* "pandas/tslib.pyx":628 * return True * elif op == Py_LT: * return dtval < other # <<<<<<<<<<<<<< * elif op == Py_LE: * return dtval < other */ __pyx_t_1 = PyObject_RichCompare(((PyObject *)__pyx_v_dtval), ((PyObject *)__pyx_v_other), Py_LT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 628; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 628; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_3; goto __pyx_L0; } /* "pandas/tslib.pyx":629 * elif op == Py_LT: * return dtval < other * elif op == Py_LE: # <<<<<<<<<<<<<< * return dtval < other * elif op == Py_GT: */ __pyx_t_3 = ((__pyx_v_op == Py_LE) != 0); if (__pyx_t_3) { /* "pandas/tslib.pyx":630 * return dtval < other * elif op == Py_LE: * return dtval < other # <<<<<<<<<<<<<< * elif op == Py_GT: * return dtval >= other */ __pyx_t_1 = PyObject_RichCompare(((PyObject *)__pyx_v_dtval), ((PyObject *)__pyx_v_other), Py_LT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 630; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 630; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_3; goto __pyx_L0; } /* "pandas/tslib.pyx":631 * elif op == Py_LE: * return dtval < other * elif op == Py_GT: # <<<<<<<<<<<<<< * return dtval >= other * elif op == Py_GE: */ __pyx_t_3 = ((__pyx_v_op == Py_GT) != 0); if (__pyx_t_3) { /* "pandas/tslib.pyx":632 * return dtval < other * elif op == Py_GT: * return dtval >= other # <<<<<<<<<<<<<< * elif op == Py_GE: * return dtval >= other */ __pyx_t_1 = PyObject_RichCompare(((PyObject *)__pyx_v_dtval), ((PyObject *)__pyx_v_other), Py_GE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 632; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 632; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_3; goto __pyx_L0; } /* "pandas/tslib.pyx":633 * elif op == Py_GT: * return dtval >= other * elif op == Py_GE: # <<<<<<<<<<<<<< * return dtval >= other * */ __pyx_t_3 = ((__pyx_v_op == Py_GE) != 0); if (__pyx_t_3) { /* "pandas/tslib.pyx":634 * return dtval >= other * elif op == Py_GE: * return dtval >= other # <<<<<<<<<<<<<< * * cdef int _assert_tzawareness_compat(_Timestamp self, */ __pyx_t_1 = PyObject_RichCompare(((PyObject *)__pyx_v_dtval), ((PyObject *)__pyx_v_other), Py_GE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 634; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 634; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_3; goto __pyx_L0; } } /* "pandas/tslib.pyx":614 * return _cmp_scalar(self.value, ots.value, op) * * cdef bint _compare_outside_nanorange(_Timestamp self, datetime other, # <<<<<<<<<<<<<< * int op) except -1: * cdef datetime dtval = self.to_datetime() */ /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas.tslib._Timestamp._compare_outside_nanorange", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_dtval); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/tslib.pyx":636 * return dtval >= other * * cdef int _assert_tzawareness_compat(_Timestamp self, # <<<<<<<<<<<<<< * object other) except -1: * if self.tzinfo is None: */ static int __pyx_f_6pandas_5tslib_10_Timestamp__assert_tzawareness_compat(struct __pyx_obj_6pandas_5tslib__Timestamp *__pyx_v_self, PyObject *__pyx_v_other) { int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; int __pyx_t_3; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_assert_tzawareness_compat", 0); /* "pandas/tslib.pyx":638 * cdef int _assert_tzawareness_compat(_Timestamp self, * object other) except -1: * if self.tzinfo is None: # <<<<<<<<<<<<<< * if other.tzinfo is not None: * raise ValueError('Cannot compare tz-naive and tz-aware ' */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_tzinfo); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 638; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = (__pyx_t_1 == Py_None); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { /* "pandas/tslib.pyx":639 * object other) except -1: * if self.tzinfo is None: * if other.tzinfo is not None: # <<<<<<<<<<<<<< * raise ValueError('Cannot compare tz-naive and tz-aware ' * 'timestamps') */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_other, __pyx_n_s_tzinfo); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 639; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = (__pyx_t_1 != Py_None); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_2 = (__pyx_t_3 != 0); if (__pyx_t_2) { /* "pandas/tslib.pyx":640 * if self.tzinfo is None: * if other.tzinfo is not None: * raise ValueError('Cannot compare tz-naive and tz-aware ' # <<<<<<<<<<<<<< * 'timestamps') * elif other.tzinfo is None: */ __pyx_t_1 = PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__16, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 640; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 640; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } goto __pyx_L3; } /* "pandas/tslib.pyx":642 * raise ValueError('Cannot compare tz-naive and tz-aware ' * 'timestamps') * elif other.tzinfo is None: # <<<<<<<<<<<<<< * raise ValueError('Cannot compare tz-naive and tz-aware timestamps') * */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_other, __pyx_n_s_tzinfo); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 642; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = (__pyx_t_1 == Py_None); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { /* "pandas/tslib.pyx":643 * 'timestamps') * elif other.tzinfo is None: * raise ValueError('Cannot compare tz-naive and tz-aware timestamps') # <<<<<<<<<<<<<< * * cpdef datetime to_datetime(_Timestamp self): */ __pyx_t_1 = PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__17, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 643; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 643; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_L3:; /* "pandas/tslib.pyx":636 * return dtval >= other * * cdef int _assert_tzawareness_compat(_Timestamp self, # <<<<<<<<<<<<<< * object other) except -1: * if self.tzinfo is None: */ /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas.tslib._Timestamp._assert_tzawareness_compat", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/tslib.pyx":645 * raise ValueError('Cannot compare tz-naive and tz-aware timestamps') * * cpdef datetime to_datetime(_Timestamp self): # <<<<<<<<<<<<<< * cdef: * pandas_datetimestruct dts */ static PyObject *__pyx_pw_6pandas_5tslib_10_Timestamp_5to_datetime(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static PyDateTime_DateTime *__pyx_f_6pandas_5tslib_10_Timestamp_to_datetime(struct __pyx_obj_6pandas_5tslib__Timestamp *__pyx_v_self, int __pyx_skip_dispatch) { pandas_datetimestruct __pyx_v_dts; struct __pyx_obj_6pandas_5tslib__TSObject *__pyx_v_ts = 0; PyDateTime_DateTime *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; pandas_datetimestruct __pyx_t_3; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("to_datetime", 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_to_datetime); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 645; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_6pandas_5tslib_10_Timestamp_5to_datetime)) { __Pyx_XDECREF(((PyObject *)__pyx_r)); __pyx_t_2 = PyObject_Call(__pyx_t_1, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 645; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_8datetime_datetime))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 645; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = ((PyDateTime_DateTime *)__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/tslib.pyx":649 * pandas_datetimestruct dts * _TSObject ts * ts = convert_to_tsobject(self, self.tzinfo, None) # <<<<<<<<<<<<<< * dts = ts.dts * return datetime(dts.year, dts.month, dts.day, */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_tzinfo); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 649; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __pyx_f_6pandas_5tslib_convert_to_tsobject(((PyObject *)__pyx_v_self), __pyx_t_1, Py_None); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 649; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_6pandas_5tslib__TSObject))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 649; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_ts = ((struct __pyx_obj_6pandas_5tslib__TSObject *)__pyx_t_2); __pyx_t_2 = 0; /* "pandas/tslib.pyx":650 * _TSObject ts * ts = convert_to_tsobject(self, self.tzinfo, None) * dts = ts.dts # <<<<<<<<<<<<<< * return datetime(dts.year, dts.month, dts.day, * dts.hour, dts.min, dts.sec, */ __pyx_t_3 = __pyx_v_ts->dts; __pyx_v_dts = __pyx_t_3; /* "pandas/tslib.pyx":651 * ts = convert_to_tsobject(self, self.tzinfo, None) * dts = ts.dts * return datetime(dts.year, dts.month, dts.day, # <<<<<<<<<<<<<< * dts.hour, dts.min, dts.sec, * dts.us, ts.tzinfo) */ __Pyx_XDECREF(((PyObject *)__pyx_r)); __pyx_t_2 = __Pyx_PyInt_From_npy_int64(__pyx_v_dts.year); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 651; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __Pyx_PyInt_From_npy_int32(__pyx_v_dts.month); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 651; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = __Pyx_PyInt_From_npy_int32(__pyx_v_dts.day); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 651; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); /* "pandas/tslib.pyx":652 * dts = ts.dts * return datetime(dts.year, dts.month, dts.day, * dts.hour, dts.min, dts.sec, # <<<<<<<<<<<<<< * dts.us, ts.tzinfo) * */ __pyx_t_5 = __Pyx_PyInt_From_npy_int32(__pyx_v_dts.hour); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 652; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyInt_From_npy_int32(__pyx_v_dts.min); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 652; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = __Pyx_PyInt_From_npy_int32(__pyx_v_dts.sec); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 652; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); /* "pandas/tslib.pyx":653 * return datetime(dts.year, dts.month, dts.day, * dts.hour, dts.min, dts.sec, * dts.us, ts.tzinfo) # <<<<<<<<<<<<<< * * def __add__(self, other): */ __pyx_t_8 = __Pyx_PyInt_From_npy_int32(__pyx_v_dts.us); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 653; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); /* "pandas/tslib.pyx":651 * ts = convert_to_tsobject(self, self.tzinfo, None) * dts = ts.dts * return datetime(dts.year, dts.month, dts.day, # <<<<<<<<<<<<<< * dts.hour, dts.min, dts.sec, * dts.us, ts.tzinfo) */ __pyx_t_9 = PyTuple_New(8); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 651; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_9, 2, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_9, 3, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_9, 4, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_9, 5, __pyx_t_7); __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_9, 6, __pyx_t_8); __Pyx_GIVEREF(__pyx_t_8); __Pyx_INCREF(__pyx_v_ts->tzinfo); PyTuple_SET_ITEM(__pyx_t_9, 7, __pyx_v_ts->tzinfo); __Pyx_GIVEREF(__pyx_v_ts->tzinfo); __pyx_t_2 = 0; __pyx_t_1 = 0; __pyx_t_4 = 0; __pyx_t_5 = 0; __pyx_t_6 = 0; __pyx_t_7 = 0; __pyx_t_8 = 0; __pyx_t_8 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_8datetime_datetime)), __pyx_t_9, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 651; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_r = ((PyDateTime_DateTime *)__pyx_t_8); __pyx_t_8 = 0; goto __pyx_L0; /* "pandas/tslib.pyx":645 * raise ValueError('Cannot compare tz-naive and tz-aware timestamps') * * cpdef datetime to_datetime(_Timestamp self): # <<<<<<<<<<<<<< * cdef: * pandas_datetimestruct dts */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); __Pyx_AddTraceback("pandas.tslib._Timestamp.to_datetime", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_ts); __Pyx_XGIVEREF((PyObject *)__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5tslib_10_Timestamp_5to_datetime(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static PyObject *__pyx_pw_6pandas_5tslib_10_Timestamp_5to_datetime(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("to_datetime (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_5tslib_10_Timestamp_4to_datetime(((struct __pyx_obj_6pandas_5tslib__Timestamp *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5tslib_10_Timestamp_4to_datetime(struct __pyx_obj_6pandas_5tslib__Timestamp *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("to_datetime", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_6pandas_5tslib__Timestamp *)__pyx_v_self->__pyx_vtab)->to_datetime(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 645; __pyx_clineno = __LINE__; goto __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.tslib._Timestamp.to_datetime", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/tslib.pyx":655 * dts.us, ts.tzinfo) * * def __add__(self, other): # <<<<<<<<<<<<<< * cdef Py_ssize_t other_int * */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5tslib_10_Timestamp_7__add__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/ static PyObject *__pyx_pw_6pandas_5tslib_10_Timestamp_7__add__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__add__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_5tslib_10_Timestamp_6__add__(((PyObject *)__pyx_v_self), ((PyObject *)__pyx_v_other)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5tslib_10_Timestamp_6__add__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) { Py_ssize_t __pyx_v_other_int; PyObject *__pyx_v_nanos = NULL; PyObject *__pyx_v_result = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; Py_ssize_t __pyx_t_5; PyObject *__pyx_t_6 = NULL; int __pyx_t_7; int __pyx_t_8; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__add__", 0); /* "pandas/tslib.pyx":658 * cdef Py_ssize_t other_int * * if is_timedelta64_object(other): # <<<<<<<<<<<<<< * other_int = other.astype('timedelta64[ns]').astype(int) * return Timestamp(self.value + other_int, tz=self.tzinfo) */ __pyx_t_1 = (is_timedelta64_object(__pyx_v_other) != 0); if (__pyx_t_1) { /* "pandas/tslib.pyx":659 * * if is_timedelta64_object(other): * other_int = other.astype('timedelta64[ns]').astype(int) # <<<<<<<<<<<<<< * return Timestamp(self.value + other_int, tz=self.tzinfo) * */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_other, __pyx_n_s_astype); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 659; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyObject_Call(__pyx_t_2, __pyx_tuple__18, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 659; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_astype); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 659; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 659; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(((PyObject *)((PyObject*)(&PyInt_Type)))); PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)((PyObject*)(&PyInt_Type)))); __Pyx_GIVEREF(((PyObject *)((PyObject*)(&PyInt_Type)))); __pyx_t_4 = PyObject_Call(__pyx_t_2, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 659; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_5 = __Pyx_PyIndex_AsSsize_t(__pyx_t_4); if (unlikely((__pyx_t_5 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 659; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_other_int = __pyx_t_5; /* "pandas/tslib.pyx":660 * if is_timedelta64_object(other): * other_int = other.astype('timedelta64[ns]').astype(int) * return Timestamp(self.value + other_int, tz=self.tzinfo) # <<<<<<<<<<<<<< * * if is_integer_object(other): */ __Pyx_XDECREF(__pyx_r); __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_Timestamp); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 660; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_value); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 660; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_other_int); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 660; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_6 = PyNumber_Add(__pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 660; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 660; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyDict_New(); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 660; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_tzinfo); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 660; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_tz, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 660; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyObject_Call(__pyx_t_4, __pyx_t_2, __pyx_t_6); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 660; __pyx_clineno = __LINE__; goto __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_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; } /* "pandas/tslib.pyx":662 * return Timestamp(self.value + other_int, tz=self.tzinfo) * * if is_integer_object(other): # <<<<<<<<<<<<<< * if self.offset is None: * raise ValueError("Cannot add integral value to Timestamp " */ __pyx_t_1 = (is_integer_object(__pyx_v_other) != 0); if (__pyx_t_1) { /* "pandas/tslib.pyx":663 * * if is_integer_object(other): * if self.offset is None: # <<<<<<<<<<<<<< * raise ValueError("Cannot add integral value to Timestamp " * "without offset.") */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_offset); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 663; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = (__pyx_t_3 == Py_None); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_7 = (__pyx_t_1 != 0); if (__pyx_t_7) { /* "pandas/tslib.pyx":664 * if is_integer_object(other): * if self.offset is None: * raise ValueError("Cannot add integral value to Timestamp " # <<<<<<<<<<<<<< * "without offset.") * return Timestamp((self.offset * other).apply(self)) */ __pyx_t_3 = PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__19, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 664; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 664; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } /* "pandas/tslib.pyx":666 * raise ValueError("Cannot add integral value to Timestamp " * "without offset.") * return Timestamp((self.offset * other).apply(self)) # <<<<<<<<<<<<<< * * if isinstance(other, timedelta) or hasattr(other, 'delta'): */ __Pyx_XDECREF(__pyx_r); __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_Timestamp); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 666; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_offset); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 666; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_2 = PyNumber_Multiply(__pyx_t_6, __pyx_v_other); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 666; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_apply); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 666; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 666; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_self); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_self); __Pyx_GIVEREF(__pyx_v_self); __pyx_t_4 = PyObject_Call(__pyx_t_6, __pyx_t_2, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 666; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 666; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyObject_Call(__pyx_t_3, __pyx_t_2, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 666; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; } /* "pandas/tslib.pyx":668 * return Timestamp((self.offset * other).apply(self)) * * if isinstance(other, timedelta) or hasattr(other, 'delta'): # <<<<<<<<<<<<<< * nanos = _delta_to_nanoseconds(other) * return Timestamp(self.value + nanos, tz=self.tzinfo) */ __pyx_t_7 = __Pyx_TypeCheck(__pyx_v_other, ((PyObject*)__pyx_ptype_8datetime_timedelta)); if (!(__pyx_t_7 != 0)) { __pyx_t_1 = PyObject_HasAttr(__pyx_v_other, __pyx_n_s_delta); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 668; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_8 = (__pyx_t_1 != 0); } else { __pyx_t_8 = (__pyx_t_7 != 0); } if (__pyx_t_8) { /* "pandas/tslib.pyx":669 * * if isinstance(other, timedelta) or hasattr(other, 'delta'): * nanos = _delta_to_nanoseconds(other) # <<<<<<<<<<<<<< * return Timestamp(self.value + nanos, tz=self.tzinfo) * */ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_delta_to_nanoseconds); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 669; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 669; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_other); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_other); __Pyx_GIVEREF(__pyx_v_other); __pyx_t_3 = PyObject_Call(__pyx_t_4, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 669; __pyx_clineno = __LINE__; goto __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_nanos = __pyx_t_3; __pyx_t_3 = 0; /* "pandas/tslib.pyx":670 * if isinstance(other, timedelta) or hasattr(other, 'delta'): * nanos = _delta_to_nanoseconds(other) * return Timestamp(self.value + nanos, tz=self.tzinfo) # <<<<<<<<<<<<<< * * result = datetime.__add__(self, other) */ __Pyx_XDECREF(__pyx_r); __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_Timestamp); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 670; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_value); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 670; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = PyNumber_Add(__pyx_t_2, __pyx_v_nanos); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 670; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 670; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyDict_New(); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 670; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_tzinfo); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 670; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_tz, __pyx_t_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 670; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyObject_Call(__pyx_t_3, __pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 670; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_r = __pyx_t_6; __pyx_t_6 = 0; goto __pyx_L0; } /* "pandas/tslib.pyx":672 * return Timestamp(self.value + nanos, tz=self.tzinfo) * * result = datetime.__add__(self, other) # <<<<<<<<<<<<<< * if isinstance(result, datetime): * result = Timestamp(result) */ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)((PyObject*)__pyx_ptype_8datetime_datetime)), __pyx_n_s_add); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 672; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 672; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_v_self); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_self); __Pyx_GIVEREF(__pyx_v_self); __Pyx_INCREF(__pyx_v_other); PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_other); __Pyx_GIVEREF(__pyx_v_other); __pyx_t_2 = PyObject_Call(__pyx_t_6, __pyx_t_4, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 672; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_result = __pyx_t_2; __pyx_t_2 = 0; /* "pandas/tslib.pyx":673 * * result = datetime.__add__(self, other) * if isinstance(result, datetime): # <<<<<<<<<<<<<< * result = Timestamp(result) * result.nanosecond = self.nanosecond */ __pyx_t_8 = __Pyx_TypeCheck(__pyx_v_result, ((PyObject*)__pyx_ptype_8datetime_datetime)); __pyx_t_7 = (__pyx_t_8 != 0); if (__pyx_t_7) { /* "pandas/tslib.pyx":674 * result = datetime.__add__(self, other) * if isinstance(result, datetime): * result = Timestamp(result) # <<<<<<<<<<<<<< * result.nanosecond = self.nanosecond * return result */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_Timestamp); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 674; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 674; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_v_result); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_result); __Pyx_GIVEREF(__pyx_v_result); __pyx_t_6 = PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 674; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF_SET(__pyx_v_result, __pyx_t_6); __pyx_t_6 = 0; /* "pandas/tslib.pyx":675 * if isinstance(result, datetime): * result = Timestamp(result) * result.nanosecond = self.nanosecond # <<<<<<<<<<<<<< * return result * */ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_nanosecond); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 675; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); if (__Pyx_PyObject_SetAttrStr(__pyx_v_result, __pyx_n_s_nanosecond, __pyx_t_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 675; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; goto __pyx_L7; } __pyx_L7:; /* "pandas/tslib.pyx":676 * result = Timestamp(result) * result.nanosecond = self.nanosecond * return result # <<<<<<<<<<<<<< * * def __sub__(self, other): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_result); __pyx_r = __pyx_v_result; goto __pyx_L0; /* "pandas/tslib.pyx":655 * dts.us, ts.tzinfo) * * def __add__(self, other): # <<<<<<<<<<<<<< * cdef Py_ssize_t other_int * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("pandas.tslib._Timestamp.__add__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_nanos); __Pyx_XDECREF(__pyx_v_result); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/tslib.pyx":678 * return result * * def __sub__(self, other): # <<<<<<<<<<<<<< * if is_integer_object(other): * neg_other = -other */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5tslib_10_Timestamp_9__sub__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/ static PyObject *__pyx_pw_6pandas_5tslib_10_Timestamp_9__sub__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__sub__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_5tslib_10_Timestamp_8__sub__(((PyObject *)__pyx_v_self), ((PyObject *)__pyx_v_other)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5tslib_10_Timestamp_8__sub__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) { PyObject *__pyx_v_neg_other = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__sub__", 0); /* "pandas/tslib.pyx":679 * * def __sub__(self, other): * if is_integer_object(other): # <<<<<<<<<<<<<< * neg_other = -other * return self + neg_other */ __pyx_t_1 = (is_integer_object(__pyx_v_other) != 0); if (__pyx_t_1) { /* "pandas/tslib.pyx":680 * def __sub__(self, other): * if is_integer_object(other): * neg_other = -other # <<<<<<<<<<<<<< * return self + neg_other * # This calling convention is required */ __pyx_t_2 = PyNumber_Negative(__pyx_v_other); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 680; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_v_neg_other = __pyx_t_2; __pyx_t_2 = 0; /* "pandas/tslib.pyx":681 * if is_integer_object(other): * neg_other = -other * return self + neg_other # <<<<<<<<<<<<<< * # This calling convention is required * return datetime.__sub__(self, other) */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = PyNumber_Add(__pyx_v_self, __pyx_v_neg_other); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 681; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; } /* "pandas/tslib.pyx":683 * return self + neg_other * # This calling convention is required * return datetime.__sub__(self, other) # <<<<<<<<<<<<<< * * cpdef _get_field(self, field): */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)((PyObject*)__pyx_ptype_8datetime_datetime)), __pyx_n_s_sub); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 683; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 683; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_v_self); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_self); __Pyx_GIVEREF(__pyx_v_self); __Pyx_INCREF(__pyx_v_other); PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_other); __Pyx_GIVEREF(__pyx_v_other); __pyx_t_4 = PyObject_Call(__pyx_t_2, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 683; __pyx_clineno = __LINE__; goto __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_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; /* "pandas/tslib.pyx":678 * return result * * def __sub__(self, other): # <<<<<<<<<<<<<< * if is_integer_object(other): * neg_other = -other */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("pandas.tslib._Timestamp.__sub__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_neg_other); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/tslib.pyx":685 * return datetime.__sub__(self, other) * * cpdef _get_field(self, field): # <<<<<<<<<<<<<< * out = get_date_field(np.array([self.value], dtype=np.int64), field) * return out[0] */ static PyObject *__pyx_pw_6pandas_5tslib_10_Timestamp_11_get_field(PyObject *__pyx_v_self, PyObject *__pyx_v_field); /*proto*/ static PyObject *__pyx_f_6pandas_5tslib_10_Timestamp__get_field(struct __pyx_obj_6pandas_5tslib__Timestamp *__pyx_v_self, PyObject *__pyx_v_field, int __pyx_skip_dispatch) { PyObject *__pyx_v_out = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_get_field", 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_get_field); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 685; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_6pandas_5tslib_10_Timestamp_11_get_field)) { __Pyx_XDECREF(__pyx_r); __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 685; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_field); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_field); __Pyx_GIVEREF(__pyx_v_field); __pyx_t_3 = PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 685; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_3; __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } /* "pandas/tslib.pyx":686 * * cpdef _get_field(self, field): * out = get_date_field(np.array([self.value], dtype=np.int64), field) # <<<<<<<<<<<<<< * return out[0] * */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_get_date_field); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 686; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 686; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_array); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 686; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyInt_From_npy_int64(__pyx_v_self->value); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 686; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 686; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyList_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 686; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyDict_New(); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 686; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 686; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_int64); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 686; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_dtype, __pyx_t_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 686; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyObject_Call(__pyx_t_2, __pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 686; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 686; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_6); __Pyx_INCREF(__pyx_v_field); PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_field); __Pyx_GIVEREF(__pyx_v_field); __pyx_t_6 = 0; __pyx_t_6 = PyObject_Call(__pyx_t_1, __pyx_t_4, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 686; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_out = __pyx_t_6; __pyx_t_6 = 0; /* "pandas/tslib.pyx":687 * cpdef _get_field(self, field): * out = get_date_field(np.array([self.value], dtype=np.int64), field) * return out[0] # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_out, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_6 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 687; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_6); __pyx_r = __pyx_t_6; __pyx_t_6 = 0; goto __pyx_L0; /* "pandas/tslib.pyx":685 * return datetime.__sub__(self, other) * * cpdef _get_field(self, field): # <<<<<<<<<<<<<< * out = get_date_field(np.array([self.value], dtype=np.int64), field) * return out[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); __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("pandas.tslib._Timestamp._get_field", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_out); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5tslib_10_Timestamp_11_get_field(PyObject *__pyx_v_self, PyObject *__pyx_v_field); /*proto*/ static PyObject *__pyx_pw_6pandas_5tslib_10_Timestamp_11_get_field(PyObject *__pyx_v_self, PyObject *__pyx_v_field) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_get_field (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_5tslib_10_Timestamp_10_get_field(((struct __pyx_obj_6pandas_5tslib__Timestamp *)__pyx_v_self), ((PyObject *)__pyx_v_field)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5tslib_10_Timestamp_10_get_field(struct __pyx_obj_6pandas_5tslib__Timestamp *__pyx_v_self, PyObject *__pyx_v_field) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_get_field", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = ((struct __pyx_vtabstruct_6pandas_5tslib__Timestamp *)__pyx_v_self->__pyx_vtab)->_get_field(__pyx_v_self, __pyx_v_field, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 685; __pyx_clineno = __LINE__; goto __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.tslib._Timestamp._get_field", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/tslib.pyx":565 * cdef class _Timestamp(datetime): * cdef readonly: * int64_t value, nanosecond # <<<<<<<<<<<<<< * object offset # frequency reference * */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5tslib_10_Timestamp_5value_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6pandas_5tslib_10_Timestamp_5value_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_5tslib_10_Timestamp_5value___get__(((struct __pyx_obj_6pandas_5tslib__Timestamp *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5tslib_10_Timestamp_5value___get__(struct __pyx_obj_6pandas_5tslib__Timestamp *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyInt_From_npy_int64(__pyx_v_self->value); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 565; __pyx_clineno = __LINE__; goto __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.tslib._Timestamp.value.__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_5tslib_10_Timestamp_10nanosecond_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6pandas_5tslib_10_Timestamp_10nanosecond_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_5tslib_10_Timestamp_10nanosecond___get__(((struct __pyx_obj_6pandas_5tslib__Timestamp *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5tslib_10_Timestamp_10nanosecond___get__(struct __pyx_obj_6pandas_5tslib__Timestamp *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyInt_From_npy_int64(__pyx_v_self->nanosecond); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 565; __pyx_clineno = __LINE__; goto __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.tslib._Timestamp.nanosecond.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/tslib.pyx":566 * cdef readonly: * int64_t value, nanosecond * object offset # frequency reference # <<<<<<<<<<<<<< * * def __hash__(_Timestamp self): */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5tslib_10_Timestamp_6offset_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6pandas_5tslib_10_Timestamp_6offset_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_5tslib_10_Timestamp_6offset___get__(((struct __pyx_obj_6pandas_5tslib__Timestamp *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5tslib_10_Timestamp_6offset___get__(struct __pyx_obj_6pandas_5tslib__Timestamp *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_self->offset); __pyx_r = __pyx_v_self->offset; goto __pyx_L0; /* function exit code */ __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/tslib.pyx":693 * * * cdef inline bint is_timestamp(object o): # <<<<<<<<<<<<<< * return Py_TYPE(o) == ts_type # isinstance(o, Timestamp) * */ static CYTHON_INLINE int __pyx_f_6pandas_5tslib_is_timestamp(PyObject *__pyx_v_o) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("is_timestamp", 0); /* "pandas/tslib.pyx":694 * * cdef inline bint is_timestamp(object o): * return Py_TYPE(o) == ts_type # isinstance(o, Timestamp) # <<<<<<<<<<<<<< * * */ __pyx_r = (Py_TYPE(__pyx_v_o) == __pyx_v_6pandas_5tslib_ts_type); goto __pyx_L0; /* "pandas/tslib.pyx":693 * * * cdef inline bint is_timestamp(object o): # <<<<<<<<<<<<<< * return Py_TYPE(o) == ts_type # isinstance(o, Timestamp) * */ /* function exit code */ __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/tslib.pyx":709 * cdef class _NaT(_Timestamp): * * def __hash__(_NaT self): # <<<<<<<<<<<<<< * # py3k needs this defined here * return hash(self.value) */ /* Python wrapper */ static Py_hash_t __pyx_pw_6pandas_5tslib_4_NaT_1__hash__(PyObject *__pyx_v_self); /*proto*/ static Py_hash_t __pyx_pw_6pandas_5tslib_4_NaT_1__hash__(PyObject *__pyx_v_self) { Py_hash_t __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__hash__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_5tslib_4_NaT___hash__(((struct __pyx_obj_6pandas_5tslib__NaT *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static Py_hash_t __pyx_pf_6pandas_5tslib_4_NaT___hash__(struct __pyx_obj_6pandas_5tslib__NaT *__pyx_v_self) { Py_hash_t __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; Py_hash_t __pyx_t_2; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__hash__", 0); /* "pandas/tslib.pyx":711 * def __hash__(_NaT self): * # py3k needs this defined here * return hash(self.value) # <<<<<<<<<<<<<< * * def __richcmp__(_NaT self, object other, int op): */ __pyx_t_1 = __Pyx_PyInt_From_npy_int64(__pyx_v_self->__pyx_base.value); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 711; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyObject_Hash(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 711; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_2; goto __pyx_L0; /* "pandas/tslib.pyx":709 * cdef class _NaT(_Timestamp): * * def __hash__(_NaT self): # <<<<<<<<<<<<<< * # py3k needs this defined here * return hash(self.value) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas.tslib._NaT.__hash__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; if (unlikely(__pyx_r == -1) && !PyErr_Occurred()) __pyx_r = -2; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/tslib.pyx":713 * return hash(self.value) * * def __richcmp__(_NaT self, object other, int op): # <<<<<<<<<<<<<< * cdef int ndim = getattr(other, 'ndim', -1) * */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5tslib_4_NaT_3__richcmp__(PyObject *__pyx_v_self, PyObject *__pyx_v_other, int __pyx_v_op); /*proto*/ static PyObject *__pyx_pw_6pandas_5tslib_4_NaT_3__richcmp__(PyObject *__pyx_v_self, PyObject *__pyx_v_other, int __pyx_v_op) { CYTHON_UNUSED int __pyx_lineno = 0; CYTHON_UNUSED const char *__pyx_filename = NULL; CYTHON_UNUSED int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__richcmp__ (wrapper)", 0); if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_self), __pyx_ptype_6pandas_5tslib__NaT, 1, "self", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 713; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5tslib_4_NaT_2__richcmp__(((struct __pyx_obj_6pandas_5tslib__NaT *)__pyx_v_self), ((PyObject *)__pyx_v_other), ((int)__pyx_v_op)); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5tslib_4_NaT_2__richcmp__(struct __pyx_obj_6pandas_5tslib__NaT *__pyx_v_self, PyObject *__pyx_v_other, int __pyx_v_op) { int __pyx_v_ndim; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; int __pyx_t_5; PyObject *__pyx_t_6 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__richcmp__", 0); __Pyx_INCREF(__pyx_v_other); /* "pandas/tslib.pyx":714 * * def __richcmp__(_NaT self, object other, int op): * cdef int ndim = getattr(other, 'ndim', -1) # <<<<<<<<<<<<<< * * if ndim == -1: */ __pyx_t_1 = __Pyx_GetAttr3(__pyx_v_other, __pyx_n_s_ndim, __pyx_int_neg_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 714; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 714; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_ndim = __pyx_t_2; /* "pandas/tslib.pyx":716 * cdef int ndim = getattr(other, 'ndim', -1) * * if ndim == -1: # <<<<<<<<<<<<<< * return _nat_scalar_rules[op] * */ __pyx_t_3 = ((__pyx_v_ndim == -1) != 0); if (__pyx_t_3) { /* "pandas/tslib.pyx":717 * * if ndim == -1: * return _nat_scalar_rules[op] # <<<<<<<<<<<<<< * * if ndim == 0: */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyBool_FromLong((__pyx_v_6pandas_5tslib__nat_scalar_rules[__pyx_v_op])); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 717; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; } /* "pandas/tslib.pyx":719 * return _nat_scalar_rules[op] * * if ndim == 0: # <<<<<<<<<<<<<< * if isinstance(other, np.datetime64): * other = Timestamp(other) */ __pyx_t_3 = ((__pyx_v_ndim == 0) != 0); if (__pyx_t_3) { /* "pandas/tslib.pyx":720 * * if ndim == 0: * if isinstance(other, np.datetime64): # <<<<<<<<<<<<<< * other = Timestamp(other) * else: */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 720; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_datetime64); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 720; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_3 = PyObject_IsInstance(__pyx_v_other, __pyx_t_4); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 720; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_5 = (__pyx_t_3 != 0); if (__pyx_t_5) { /* "pandas/tslib.pyx":721 * if ndim == 0: * if isinstance(other, np.datetime64): * other = Timestamp(other) # <<<<<<<<<<<<<< * else: * raise TypeError('Cannot compare type %r with type %r' % */ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_Timestamp); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 721; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 721; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_other); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_other); __Pyx_GIVEREF(__pyx_v_other); __pyx_t_6 = PyObject_Call(__pyx_t_4, __pyx_t_1, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 721; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF_SET(__pyx_v_other, __pyx_t_6); __pyx_t_6 = 0; goto __pyx_L5; } /*else*/ { /* "pandas/tslib.pyx":724 * else: * raise TypeError('Cannot compare type %r with type %r' % * (type(self).__name__, type(other).__name__)) # <<<<<<<<<<<<<< * return PyObject_RichCompare(other, self, _reverse_ops[op]) * */ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))), __pyx_n_s_name); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 724; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)Py_TYPE(__pyx_v_other)), __pyx_n_s_name); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 724; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 724; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_6 = 0; __pyx_t_1 = 0; /* "pandas/tslib.pyx":723 * other = Timestamp(other) * else: * raise TypeError('Cannot compare type %r with type %r' % # <<<<<<<<<<<<<< * (type(self).__name__, type(other).__name__)) * return PyObject_RichCompare(other, self, _reverse_ops[op]) */ __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_Cannot_compare_type_r_with_type, __pyx_t_4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 723; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 723; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyObject_Call(__pyx_builtin_TypeError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 723; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 723; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_L5:; goto __pyx_L4; } __pyx_L4:; /* "pandas/tslib.pyx":725 * raise TypeError('Cannot compare type %r with type %r' % * (type(self).__name__, type(other).__name__)) * return PyObject_RichCompare(other, self, _reverse_ops[op]) # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyObject_RichCompare(__pyx_v_other, ((PyObject *)__pyx_v_self), (__pyx_v_6pandas_5tslib__reverse_ops[__pyx_v_op])); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 725; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "pandas/tslib.pyx":713 * return hash(self.value) * * def __richcmp__(_NaT self, object other, int op): # <<<<<<<<<<<<<< * cdef int ndim = getattr(other, 'ndim', -1) * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("pandas.tslib._NaT.__richcmp__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_other); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/tslib.pyx":728 * * * def _delta_to_nanoseconds(delta): # <<<<<<<<<<<<<< * if hasattr(delta, 'delta'): * delta = delta.delta */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5tslib_15_delta_to_nanoseconds(PyObject *__pyx_self, PyObject *__pyx_v_delta); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5tslib_15_delta_to_nanoseconds = {__Pyx_NAMESTR("_delta_to_nanoseconds"), (PyCFunction)__pyx_pw_6pandas_5tslib_15_delta_to_nanoseconds, METH_O, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5tslib_15_delta_to_nanoseconds(PyObject *__pyx_self, PyObject *__pyx_v_delta) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_delta_to_nanoseconds (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_5tslib_14_delta_to_nanoseconds(__pyx_self, ((PyObject *)__pyx_v_delta)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5tslib_14_delta_to_nanoseconds(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_delta) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_delta_to_nanoseconds", 0); __Pyx_INCREF(__pyx_v_delta); /* "pandas/tslib.pyx":729 * * def _delta_to_nanoseconds(delta): * if hasattr(delta, 'delta'): # <<<<<<<<<<<<<< * delta = delta.delta * if is_timedelta64_object(delta): */ __pyx_t_1 = PyObject_HasAttr(__pyx_v_delta, __pyx_n_s_delta); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 729; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { /* "pandas/tslib.pyx":730 * def _delta_to_nanoseconds(delta): * if hasattr(delta, 'delta'): * delta = delta.delta # <<<<<<<<<<<<<< * if is_timedelta64_object(delta): * return delta.astype("timedelta64[ns]").item() */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_delta, __pyx_n_s_delta); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 730; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF_SET(__pyx_v_delta, __pyx_t_3); __pyx_t_3 = 0; goto __pyx_L3; } __pyx_L3:; /* "pandas/tslib.pyx":731 * if hasattr(delta, 'delta'): * delta = delta.delta * if is_timedelta64_object(delta): # <<<<<<<<<<<<<< * return delta.astype("timedelta64[ns]").item() * if is_integer_object(delta): */ __pyx_t_2 = (is_timedelta64_object(__pyx_v_delta) != 0); if (__pyx_t_2) { /* "pandas/tslib.pyx":732 * delta = delta.delta * if is_timedelta64_object(delta): * return delta.astype("timedelta64[ns]").item() # <<<<<<<<<<<<<< * if is_integer_object(delta): * return delta */ __Pyx_XDECREF(__pyx_r); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_delta, __pyx_n_s_astype); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 732; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PyObject_Call(__pyx_t_3, __pyx_tuple__20, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 732; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_item); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 732; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyObject_Call(__pyx_t_3, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 732; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; } /* "pandas/tslib.pyx":733 * if is_timedelta64_object(delta): * return delta.astype("timedelta64[ns]").item() * if is_integer_object(delta): # <<<<<<<<<<<<<< * return delta * return (delta.days * 24 * 60 * 60 * 1000000 */ __pyx_t_2 = (is_integer_object(__pyx_v_delta) != 0); if (__pyx_t_2) { /* "pandas/tslib.pyx":734 * return delta.astype("timedelta64[ns]").item() * if is_integer_object(delta): * return delta # <<<<<<<<<<<<<< * return (delta.days * 24 * 60 * 60 * 1000000 * + delta.seconds * 1000000 */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_delta); __pyx_r = __pyx_v_delta; goto __pyx_L0; } /* "pandas/tslib.pyx":735 * if is_integer_object(delta): * return delta * return (delta.days * 24 * 60 * 60 * 1000000 # <<<<<<<<<<<<<< * + delta.seconds * 1000000 * + delta.microseconds) * 1000 */ __Pyx_XDECREF(__pyx_r); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_delta, __pyx_n_s_days); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 735; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = PyNumber_Multiply(__pyx_t_4, __pyx_int_24); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 735; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyNumber_Multiply(__pyx_t_3, __pyx_int_60); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 735; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyNumber_Multiply(__pyx_t_4, __pyx_int_60); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 735; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyNumber_Multiply(__pyx_t_3, __pyx_int_1000000); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 735; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/tslib.pyx":736 * return delta * return (delta.days * 24 * 60 * 60 * 1000000 * + delta.seconds * 1000000 # <<<<<<<<<<<<<< * + delta.microseconds) * 1000 * */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_delta, __pyx_n_s_seconds); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 736; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = PyNumber_Multiply(__pyx_t_3, __pyx_int_1000000); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 736; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyNumber_Add(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 736; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "pandas/tslib.pyx":737 * return (delta.days * 24 * 60 * 60 * 1000000 * + delta.seconds * 1000000 * + delta.microseconds) * 1000 # <<<<<<<<<<<<<< * * */ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_delta, __pyx_n_s_microseconds); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 737; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = PyNumber_Add(__pyx_t_3, __pyx_t_5); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 737; __pyx_clineno = __LINE__; goto __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_t_5 = PyNumber_Multiply(__pyx_t_4, __pyx_int_1000); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 737; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_r = __pyx_t_5; __pyx_t_5 = 0; goto __pyx_L0; /* "pandas/tslib.pyx":728 * * * def _delta_to_nanoseconds(delta): # <<<<<<<<<<<<<< * if hasattr(delta, 'delta'): * delta = delta.delta */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("pandas.tslib._delta_to_nanoseconds", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_delta); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/tslib.pyx":748 * * property value: * def __get__(self): # <<<<<<<<<<<<<< * return self.value * */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5tslib_9_TSObject_5value_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6pandas_5tslib_9_TSObject_5value_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_5tslib_9_TSObject_5value___get__(((struct __pyx_obj_6pandas_5tslib__TSObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5tslib_9_TSObject_5value___get__(struct __pyx_obj_6pandas_5tslib__TSObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); /* "pandas/tslib.pyx":749 * property value: * def __get__(self): * return self.value # <<<<<<<<<<<<<< * * cpdef _get_utcoffset(tzinfo, obj): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyInt_From_npy_int64(__pyx_v_self->value); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 749; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "pandas/tslib.pyx":748 * * property value: * def __get__(self): # <<<<<<<<<<<<<< * return self.value * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas.tslib._TSObject.value.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/tslib.pyx":751 * return self.value * * cpdef _get_utcoffset(tzinfo, obj): # <<<<<<<<<<<<<< * try: * return tzinfo._utcoffset */ static PyObject *__pyx_pw_6pandas_5tslib_17_get_utcoffset(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_6pandas_5tslib__get_utcoffset(PyObject *__pyx_v_tzinfo, PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; int __pyx_t_5; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_get_utcoffset", 0); /* "pandas/tslib.pyx":752 * * cpdef _get_utcoffset(tzinfo, obj): * try: # <<<<<<<<<<<<<< * return tzinfo._utcoffset * except AttributeError: */ { __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:*/ { /* "pandas/tslib.pyx":753 * cpdef _get_utcoffset(tzinfo, obj): * try: * return tzinfo._utcoffset # <<<<<<<<<<<<<< * except AttributeError: * return tzinfo.utcoffset(obj) */ __Pyx_XDECREF(__pyx_r); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_tzinfo, __pyx_n_s_utcoffset_2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 753; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L7_try_return; } __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L10_try_end; __pyx_L3_error:; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; /* "pandas/tslib.pyx":754 * try: * return tzinfo._utcoffset * except AttributeError: # <<<<<<<<<<<<<< * return tzinfo.utcoffset(obj) * */ __pyx_t_5 = PyErr_ExceptionMatches(__pyx_builtin_AttributeError); if (__pyx_t_5) { __Pyx_AddTraceback("pandas.tslib._get_utcoffset", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_6, &__pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 754; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_GOTREF(__pyx_t_6); __Pyx_GOTREF(__pyx_t_7); /* "pandas/tslib.pyx":755 * return tzinfo._utcoffset * except AttributeError: * return tzinfo.utcoffset(obj) # <<<<<<<<<<<<<< * * # helper to extract datetime and int64 from several different possibilities */ __Pyx_XDECREF(__pyx_r); __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_tzinfo, __pyx_n_s_utcoffset); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 755; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 755; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_INCREF(__pyx_v_obj); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_v_obj); __Pyx_GIVEREF(__pyx_v_obj); __pyx_t_10 = PyObject_Call(__pyx_t_8, __pyx_t_9, NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 755; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_r = __pyx_t_10; __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; goto __pyx_L6_except_return; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; goto __pyx_L4_exception_handled; } goto __pyx_L5_except_error; __pyx_L5_except_error:; __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); goto __pyx_L1_error; __pyx_L7_try_return:; __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); goto __pyx_L0; __pyx_L6_except_return:; __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); goto __pyx_L0; __pyx_L4_exception_handled:; __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); __pyx_L10_try_end:; } /* "pandas/tslib.pyx":751 * return self.value * * cpdef _get_utcoffset(tzinfo, obj): # <<<<<<<<<<<<<< * try: * return tzinfo._utcoffset */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); __Pyx_XDECREF(__pyx_t_10); __Pyx_AddTraceback("pandas.tslib._get_utcoffset", __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_5tslib_17_get_utcoffset(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_6pandas_5tslib_17_get_utcoffset(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_tzinfo = 0; PyObject *__pyx_v_obj = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_get_utcoffset (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_tzinfo,&__pyx_n_s_obj,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_tzinfo)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("_get_utcoffset", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 751; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_get_utcoffset") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 751; __pyx_clineno = __LINE__; goto __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_tzinfo = values[0]; __pyx_v_obj = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("_get_utcoffset", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 751; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.tslib._get_utcoffset", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pandas_5tslib_16_get_utcoffset(__pyx_self, __pyx_v_tzinfo, __pyx_v_obj); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5tslib_16_get_utcoffset(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_tzinfo, PyObject *__pyx_v_obj) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_get_utcoffset", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_6pandas_5tslib__get_utcoffset(__pyx_v_tzinfo, __pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 751; __pyx_clineno = __LINE__; goto __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.tslib._get_utcoffset", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/tslib.pyx":758 * * # helper to extract datetime and int64 from several different possibilities * cdef convert_to_tsobject(object ts, object tz, object unit): # <<<<<<<<<<<<<< * """ * Extract datetime and int64 from any of: */ static PyObject *__pyx_f_6pandas_5tslib_convert_to_tsobject(PyObject *__pyx_v_ts, PyObject *__pyx_v_tz, PyObject *__pyx_v_unit) { struct __pyx_obj_6pandas_5tslib__TSObject *__pyx_v_obj = 0; CYTHON_UNUSED int __pyx_v_utc_convert; PyObject *__pyx_v_ts_offset = NULL; PyObject *__pyx_v_tz_offset = NULL; PyObject *__pyx_v_offset = 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; int __pyx_t_6; int __pyx_t_7; __pyx_t_5numpy_int64_t __pyx_t_8; npy_datetime __pyx_t_9; PyObject *__pyx_t_10 = NULL; PyObject *__pyx_t_11 = NULL; PyObject *__pyx_t_12 = NULL; PyObject *__pyx_t_13 = NULL; int __pyx_t_14; PyObject *__pyx_t_15 = NULL; PyObject *__pyx_t_16 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("convert_to_tsobject", 0); __Pyx_INCREF(__pyx_v_ts); __Pyx_INCREF(__pyx_v_tz); /* "pandas/tslib.pyx":771 * cdef: * _TSObject obj * bint utc_convert = 1 # <<<<<<<<<<<<<< * * if tz is not None: */ __pyx_v_utc_convert = 1; /* "pandas/tslib.pyx":773 * bint utc_convert = 1 * * if tz is not None: # <<<<<<<<<<<<<< * if isinstance(tz, basestring): * tz = pytz.timezone(tz) */ __pyx_t_1 = (__pyx_v_tz != Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { /* "pandas/tslib.pyx":774 * * if tz is not None: * if isinstance(tz, basestring): # <<<<<<<<<<<<<< * tz = pytz.timezone(tz) * */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_basestring); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 774; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = PyObject_IsInstance(__pyx_v_tz, __pyx_t_3); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 774; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_1 = (__pyx_t_2 != 0); if (__pyx_t_1) { /* "pandas/tslib.pyx":775 * if tz is not None: * if isinstance(tz, basestring): * tz = pytz.timezone(tz) # <<<<<<<<<<<<<< * * obj = _TSObject() */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_pytz); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 775; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_timezone); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 775; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 775; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_v_tz); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_tz); __Pyx_GIVEREF(__pyx_v_tz); __pyx_t_5 = PyObject_Call(__pyx_t_4, __pyx_t_3, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 775; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF_SET(__pyx_v_tz, __pyx_t_5); __pyx_t_5 = 0; goto __pyx_L4; } __pyx_L4:; goto __pyx_L3; } __pyx_L3:; /* "pandas/tslib.pyx":777 * tz = pytz.timezone(tz) * * obj = _TSObject() # <<<<<<<<<<<<<< * * if ts is None or ts is NaT or ts is np_NaT: */ __pyx_t_5 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_6pandas_5tslib__TSObject)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 777; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_v_obj = ((struct __pyx_obj_6pandas_5tslib__TSObject *)__pyx_t_5); __pyx_t_5 = 0; /* "pandas/tslib.pyx":779 * obj = _TSObject() * * if ts is None or ts is NaT or ts is np_NaT: # <<<<<<<<<<<<<< * obj.value = NPY_NAT * elif is_datetime64_object(ts): */ __pyx_t_1 = (__pyx_v_ts == Py_None); if (!(__pyx_t_1 != 0)) { __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_NaT); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 779; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_2 = (__pyx_v_ts == __pyx_t_5); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (!(__pyx_t_2 != 0)) { __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_np_NaT); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 779; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = (__pyx_v_ts == __pyx_t_5); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_7 = (__pyx_t_6 != 0); } else { __pyx_t_7 = (__pyx_t_2 != 0); } __pyx_t_2 = __pyx_t_7; } else { __pyx_t_2 = (__pyx_t_1 != 0); } if (__pyx_t_2) { /* "pandas/tslib.pyx":780 * * if ts is None or ts is NaT or ts is np_NaT: * obj.value = NPY_NAT # <<<<<<<<<<<<<< * elif is_datetime64_object(ts): * obj.value = _get_datetime64_nanos(ts) */ __pyx_v_obj->value = __pyx_v_6pandas_5tslib_NPY_NAT; goto __pyx_L5; } /* "pandas/tslib.pyx":781 * if ts is None or ts is NaT or ts is np_NaT: * obj.value = NPY_NAT * elif is_datetime64_object(ts): # <<<<<<<<<<<<<< * obj.value = _get_datetime64_nanos(ts) * pandas_datetime_to_datetimestruct(obj.value, PANDAS_FR_ns, &obj.dts) */ __pyx_t_2 = (is_datetime64_object(__pyx_v_ts) != 0); if (__pyx_t_2) { /* "pandas/tslib.pyx":782 * obj.value = NPY_NAT * elif is_datetime64_object(ts): * obj.value = _get_datetime64_nanos(ts) # <<<<<<<<<<<<<< * pandas_datetime_to_datetimestruct(obj.value, PANDAS_FR_ns, &obj.dts) * elif is_integer_object(ts): */ __pyx_t_5 = __pyx_f_6pandas_5tslib__get_datetime64_nanos(__pyx_v_ts); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 782; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_8 = __Pyx_PyInt_As_npy_int64(__pyx_t_5); if (unlikely((__pyx_t_8 == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 782; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_v_obj->value = __pyx_t_8; /* "pandas/tslib.pyx":783 * elif is_datetime64_object(ts): * obj.value = _get_datetime64_nanos(ts) * pandas_datetime_to_datetimestruct(obj.value, PANDAS_FR_ns, &obj.dts) # <<<<<<<<<<<<<< * elif is_integer_object(ts): * if ts == NPY_NAT: */ pandas_datetime_to_datetimestruct(__pyx_v_obj->value, PANDAS_FR_ns, (&__pyx_v_obj->dts)); goto __pyx_L5; } /* "pandas/tslib.pyx":784 * obj.value = _get_datetime64_nanos(ts) * pandas_datetime_to_datetimestruct(obj.value, PANDAS_FR_ns, &obj.dts) * elif is_integer_object(ts): # <<<<<<<<<<<<<< * if ts == NPY_NAT: * obj.value = NPY_NAT */ __pyx_t_2 = (is_integer_object(__pyx_v_ts) != 0); if (__pyx_t_2) { /* "pandas/tslib.pyx":785 * pandas_datetime_to_datetimestruct(obj.value, PANDAS_FR_ns, &obj.dts) * elif is_integer_object(ts): * if ts == NPY_NAT: # <<<<<<<<<<<<<< * obj.value = NPY_NAT * else: */ __pyx_t_5 = __Pyx_PyInt_From_npy_int64(__pyx_v_6pandas_5tslib_NPY_NAT); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 785; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = PyObject_RichCompare(__pyx_v_ts, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 785; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 785; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_2) { /* "pandas/tslib.pyx":786 * elif is_integer_object(ts): * if ts == NPY_NAT: * obj.value = NPY_NAT # <<<<<<<<<<<<<< * else: * ts = ts * cast_from_unit(None,unit) */ __pyx_v_obj->value = __pyx_v_6pandas_5tslib_NPY_NAT; goto __pyx_L6; } /*else*/ { /* "pandas/tslib.pyx":788 * obj.value = NPY_NAT * else: * ts = ts * cast_from_unit(None,unit) # <<<<<<<<<<<<<< * obj.value = ts * pandas_datetime_to_datetimestruct(ts, PANDAS_FR_ns, &obj.dts) */ __pyx_t_8 = __pyx_f_6pandas_5tslib_cast_from_unit(Py_None, __pyx_v_unit, 0); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 788; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_3 = __Pyx_PyInt_From_npy_int64(__pyx_t_8); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 788; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = PyNumber_Multiply(__pyx_v_ts, __pyx_t_3); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 788; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF_SET(__pyx_v_ts, __pyx_t_5); __pyx_t_5 = 0; /* "pandas/tslib.pyx":789 * else: * ts = ts * cast_from_unit(None,unit) * obj.value = ts # <<<<<<<<<<<<<< * pandas_datetime_to_datetimestruct(ts, PANDAS_FR_ns, &obj.dts) * elif util.is_float_object(ts): */ __pyx_t_8 = __Pyx_PyInt_As_npy_int64(__pyx_v_ts); if (unlikely((__pyx_t_8 == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 789; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_obj->value = __pyx_t_8; /* "pandas/tslib.pyx":790 * ts = ts * cast_from_unit(None,unit) * obj.value = ts * pandas_datetime_to_datetimestruct(ts, PANDAS_FR_ns, &obj.dts) # <<<<<<<<<<<<<< * elif util.is_float_object(ts): * if ts != ts or ts == NPY_NAT: */ __pyx_t_9 = __Pyx_PyInt_As_npy_int64(__pyx_v_ts); if (unlikely((__pyx_t_9 == (npy_datetime)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 790; __pyx_clineno = __LINE__; goto __pyx_L1_error;} pandas_datetime_to_datetimestruct(__pyx_t_9, PANDAS_FR_ns, (&__pyx_v_obj->dts)); } __pyx_L6:; goto __pyx_L5; } /* "pandas/tslib.pyx":791 * obj.value = ts * pandas_datetime_to_datetimestruct(ts, PANDAS_FR_ns, &obj.dts) * elif util.is_float_object(ts): # <<<<<<<<<<<<<< * if ts != ts or ts == NPY_NAT: * obj.value = NPY_NAT */ __pyx_t_2 = (is_float_object(__pyx_v_ts) != 0); if (__pyx_t_2) { /* "pandas/tslib.pyx":792 * pandas_datetime_to_datetimestruct(ts, PANDAS_FR_ns, &obj.dts) * elif util.is_float_object(ts): * if ts != ts or ts == NPY_NAT: # <<<<<<<<<<<<<< * obj.value = NPY_NAT * else: */ __pyx_t_5 = PyObject_RichCompare(__pyx_v_ts, __pyx_v_ts, Py_NE); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 792; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 792; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (!__pyx_t_2) { __pyx_t_5 = __Pyx_PyInt_From_npy_int64(__pyx_v_6pandas_5tslib_NPY_NAT); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 792; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = PyObject_RichCompare(__pyx_v_ts, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 792; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 792; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_7 = __pyx_t_1; } else { __pyx_t_7 = __pyx_t_2; } if (__pyx_t_7) { /* "pandas/tslib.pyx":793 * elif util.is_float_object(ts): * if ts != ts or ts == NPY_NAT: * obj.value = NPY_NAT # <<<<<<<<<<<<<< * else: * ts = cast_from_unit(ts,unit) */ __pyx_v_obj->value = __pyx_v_6pandas_5tslib_NPY_NAT; goto __pyx_L7; } /*else*/ { /* "pandas/tslib.pyx":795 * obj.value = NPY_NAT * else: * ts = cast_from_unit(ts,unit) # <<<<<<<<<<<<<< * obj.value = ts * pandas_datetime_to_datetimestruct(ts, PANDAS_FR_ns, &obj.dts) */ __pyx_t_8 = __pyx_f_6pandas_5tslib_cast_from_unit(__pyx_v_ts, __pyx_v_unit, 0); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 795; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_3 = __Pyx_PyInt_From_npy_int64(__pyx_t_8); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 795; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF_SET(__pyx_v_ts, __pyx_t_3); __pyx_t_3 = 0; /* "pandas/tslib.pyx":796 * else: * ts = cast_from_unit(ts,unit) * obj.value = ts # <<<<<<<<<<<<<< * pandas_datetime_to_datetimestruct(ts, PANDAS_FR_ns, &obj.dts) * elif util.is_string_object(ts): */ __pyx_t_8 = __Pyx_PyInt_As_npy_int64(__pyx_v_ts); if (unlikely((__pyx_t_8 == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 796; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_obj->value = __pyx_t_8; /* "pandas/tslib.pyx":797 * ts = cast_from_unit(ts,unit) * obj.value = ts * pandas_datetime_to_datetimestruct(ts, PANDAS_FR_ns, &obj.dts) # <<<<<<<<<<<<<< * elif util.is_string_object(ts): * if ts in _nat_strings: */ __pyx_t_9 = __Pyx_PyInt_As_npy_int64(__pyx_v_ts); if (unlikely((__pyx_t_9 == (npy_datetime)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 797; __pyx_clineno = __LINE__; goto __pyx_L1_error;} pandas_datetime_to_datetimestruct(__pyx_t_9, PANDAS_FR_ns, (&__pyx_v_obj->dts)); } __pyx_L7:; goto __pyx_L5; } /* "pandas/tslib.pyx":798 * obj.value = ts * pandas_datetime_to_datetimestruct(ts, PANDAS_FR_ns, &obj.dts) * elif util.is_string_object(ts): # <<<<<<<<<<<<<< * if ts in _nat_strings: * obj.value = NPY_NAT */ __pyx_t_7 = (is_string_object(__pyx_v_ts) != 0); if (__pyx_t_7) { /* "pandas/tslib.pyx":799 * pandas_datetime_to_datetimestruct(ts, PANDAS_FR_ns, &obj.dts) * elif util.is_string_object(ts): * if ts in _nat_strings: # <<<<<<<<<<<<<< * obj.value = NPY_NAT * else: */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_nat_strings); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 799; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_7 = (__Pyx_PySequence_Contains(__pyx_v_ts, __pyx_t_3, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 799; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_2 = (__pyx_t_7 != 0); if (__pyx_t_2) { /* "pandas/tslib.pyx":800 * elif util.is_string_object(ts): * if ts in _nat_strings: * obj.value = NPY_NAT # <<<<<<<<<<<<<< * else: * _string_to_dts(ts, &obj.dts) */ __pyx_v_obj->value = __pyx_v_6pandas_5tslib_NPY_NAT; goto __pyx_L8; } /*else*/ { /* "pandas/tslib.pyx":802 * obj.value = NPY_NAT * else: * _string_to_dts(ts, &obj.dts) # <<<<<<<<<<<<<< * obj.value = pandas_datetimestruct_to_datetime(PANDAS_FR_ns, &obj.dts) * elif PyDateTime_Check(ts): */ __pyx_t_3 = __pyx_f_8datetime__string_to_dts(__pyx_v_ts, (&__pyx_v_obj->dts)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 802; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/tslib.pyx":803 * else: * _string_to_dts(ts, &obj.dts) * obj.value = pandas_datetimestruct_to_datetime(PANDAS_FR_ns, &obj.dts) # <<<<<<<<<<<<<< * elif PyDateTime_Check(ts): * if tz is not None: */ __pyx_v_obj->value = pandas_datetimestruct_to_datetime(PANDAS_FR_ns, (&__pyx_v_obj->dts)); } __pyx_L8:; goto __pyx_L5; } /* "pandas/tslib.pyx":804 * _string_to_dts(ts, &obj.dts) * obj.value = pandas_datetimestruct_to_datetime(PANDAS_FR_ns, &obj.dts) * elif PyDateTime_Check(ts): # <<<<<<<<<<<<<< * if tz is not None: * # sort of a temporary hack */ __pyx_t_2 = (PyDateTime_Check(__pyx_v_ts) != 0); if (__pyx_t_2) { /* "pandas/tslib.pyx":805 * obj.value = pandas_datetimestruct_to_datetime(PANDAS_FR_ns, &obj.dts) * elif PyDateTime_Check(ts): * if tz is not None: # <<<<<<<<<<<<<< * # sort of a temporary hack * if ts.tzinfo is not None: */ __pyx_t_2 = (__pyx_v_tz != Py_None); __pyx_t_7 = (__pyx_t_2 != 0); if (__pyx_t_7) { /* "pandas/tslib.pyx":807 * if tz is not None: * # sort of a temporary hack * if ts.tzinfo is not None: # <<<<<<<<<<<<<< * if (hasattr(tz, 'normalize') and * hasattr(ts.tzinfo, '_utcoffset')): */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_ts, __pyx_n_s_tzinfo); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 807; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_7 = (__pyx_t_3 != Py_None); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_2 = (__pyx_t_7 != 0); if (__pyx_t_2) { /* "pandas/tslib.pyx":808 * # sort of a temporary hack * if ts.tzinfo is not None: * if (hasattr(tz, 'normalize') and # <<<<<<<<<<<<<< * hasattr(ts.tzinfo, '_utcoffset')): * ts = tz.normalize(ts) */ __pyx_t_2 = PyObject_HasAttr(__pyx_v_tz, __pyx_n_s_normalize); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 808; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if ((__pyx_t_2 != 0)) { /* "pandas/tslib.pyx":809 * if ts.tzinfo is not None: * if (hasattr(tz, 'normalize') and * hasattr(ts.tzinfo, '_utcoffset')): # <<<<<<<<<<<<<< * ts = tz.normalize(ts) * obj.value = _pydatetime_to_dts(ts, &obj.dts) */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_ts, __pyx_n_s_tzinfo); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 809; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_7 = PyObject_HasAttr(__pyx_t_3, __pyx_n_s_utcoffset_2); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 809; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_1 = (__pyx_t_7 != 0); } else { __pyx_t_1 = (__pyx_t_2 != 0); } if (__pyx_t_1) { /* "pandas/tslib.pyx":810 * if (hasattr(tz, 'normalize') and * hasattr(ts.tzinfo, '_utcoffset')): * ts = tz.normalize(ts) # <<<<<<<<<<<<<< * obj.value = _pydatetime_to_dts(ts, &obj.dts) * obj.tzinfo = ts.tzinfo */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_tz, __pyx_n_s_normalize); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 810; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 810; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_v_ts); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_ts); __Pyx_GIVEREF(__pyx_v_ts); __pyx_t_4 = PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 810; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF_SET(__pyx_v_ts, __pyx_t_4); __pyx_t_4 = 0; /* "pandas/tslib.pyx":811 * hasattr(ts.tzinfo, '_utcoffset')): * ts = tz.normalize(ts) * obj.value = _pydatetime_to_dts(ts, &obj.dts) # <<<<<<<<<<<<<< * obj.tzinfo = ts.tzinfo * else: #tzoffset */ __pyx_v_obj->value = __pyx_f_8datetime__pydatetime_to_dts(__pyx_v_ts, (&__pyx_v_obj->dts)); /* "pandas/tslib.pyx":812 * ts = tz.normalize(ts) * obj.value = _pydatetime_to_dts(ts, &obj.dts) * obj.tzinfo = ts.tzinfo # <<<<<<<<<<<<<< * else: #tzoffset * obj.value = _pydatetime_to_dts(ts, &obj.dts) */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_ts, __pyx_n_s_tzinfo); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 812; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __Pyx_GOTREF(__pyx_v_obj->tzinfo); __Pyx_DECREF(__pyx_v_obj->tzinfo); __pyx_v_obj->tzinfo = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L11; } /*else*/ { /* "pandas/tslib.pyx":814 * obj.tzinfo = ts.tzinfo * else: #tzoffset * obj.value = _pydatetime_to_dts(ts, &obj.dts) # <<<<<<<<<<<<<< * ts_offset = _get_utcoffset(ts.tzinfo, ts) * obj.value -= _delta_to_nanoseconds(ts_offset) */ __pyx_v_obj->value = __pyx_f_8datetime__pydatetime_to_dts(__pyx_v_ts, (&__pyx_v_obj->dts)); /* "pandas/tslib.pyx":815 * else: #tzoffset * obj.value = _pydatetime_to_dts(ts, &obj.dts) * ts_offset = _get_utcoffset(ts.tzinfo, ts) # <<<<<<<<<<<<<< * obj.value -= _delta_to_nanoseconds(ts_offset) * tz_offset = _get_utcoffset(tz, ts) */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_ts, __pyx_n_s_tzinfo); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 815; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __pyx_f_6pandas_5tslib__get_utcoffset(__pyx_t_4, __pyx_v_ts, 0); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 815; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_ts_offset = __pyx_t_5; __pyx_t_5 = 0; /* "pandas/tslib.pyx":816 * obj.value = _pydatetime_to_dts(ts, &obj.dts) * ts_offset = _get_utcoffset(ts.tzinfo, ts) * obj.value -= _delta_to_nanoseconds(ts_offset) # <<<<<<<<<<<<<< * tz_offset = _get_utcoffset(tz, ts) * obj.value += _delta_to_nanoseconds(tz_offset) */ __pyx_t_5 = __Pyx_PyInt_From_npy_int64(__pyx_v_obj->value); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 816; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_delta_to_nanoseconds); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 816; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 816; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_v_ts_offset); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_ts_offset); __Pyx_GIVEREF(__pyx_v_ts_offset); __pyx_t_10 = PyObject_Call(__pyx_t_4, __pyx_t_3, NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 816; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyNumber_InPlaceSubtract(__pyx_t_5, __pyx_t_10); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 816; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_t_8 = __Pyx_PyInt_As_npy_int64(__pyx_t_3); if (unlikely((__pyx_t_8 == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 816; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_obj->value = __pyx_t_8; /* "pandas/tslib.pyx":817 * ts_offset = _get_utcoffset(ts.tzinfo, ts) * obj.value -= _delta_to_nanoseconds(ts_offset) * tz_offset = _get_utcoffset(tz, ts) # <<<<<<<<<<<<<< * obj.value += _delta_to_nanoseconds(tz_offset) * pandas_datetime_to_datetimestruct(obj.value, */ __pyx_t_3 = __pyx_f_6pandas_5tslib__get_utcoffset(__pyx_v_tz, __pyx_v_ts, 0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 817; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_v_tz_offset = __pyx_t_3; __pyx_t_3 = 0; /* "pandas/tslib.pyx":818 * obj.value -= _delta_to_nanoseconds(ts_offset) * tz_offset = _get_utcoffset(tz, ts) * obj.value += _delta_to_nanoseconds(tz_offset) # <<<<<<<<<<<<<< * pandas_datetime_to_datetimestruct(obj.value, * PANDAS_FR_ns, &obj.dts) */ __pyx_t_3 = __Pyx_PyInt_From_npy_int64(__pyx_v_obj->value); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 818; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_10 = __Pyx_GetModuleGlobalName(__pyx_n_s_delta_to_nanoseconds); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 818; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 818; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_v_tz_offset); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_tz_offset); __Pyx_GIVEREF(__pyx_v_tz_offset); __pyx_t_4 = PyObject_Call(__pyx_t_10, __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 818; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyNumber_InPlaceAdd(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 818; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_8 = __Pyx_PyInt_As_npy_int64(__pyx_t_5); if (unlikely((__pyx_t_8 == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 818; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_v_obj->value = __pyx_t_8; /* "pandas/tslib.pyx":819 * tz_offset = _get_utcoffset(tz, ts) * obj.value += _delta_to_nanoseconds(tz_offset) * pandas_datetime_to_datetimestruct(obj.value, # <<<<<<<<<<<<<< * PANDAS_FR_ns, &obj.dts) * obj.tzinfo = tz */ pandas_datetime_to_datetimestruct(__pyx_v_obj->value, PANDAS_FR_ns, (&__pyx_v_obj->dts)); /* "pandas/tslib.pyx":821 * pandas_datetime_to_datetimestruct(obj.value, * PANDAS_FR_ns, &obj.dts) * obj.tzinfo = tz # <<<<<<<<<<<<<< * elif not _is_utc(tz): * try: */ __Pyx_INCREF(__pyx_v_tz); __Pyx_GIVEREF(__pyx_v_tz); __Pyx_GOTREF(__pyx_v_obj->tzinfo); __Pyx_DECREF(__pyx_v_obj->tzinfo); __pyx_v_obj->tzinfo = __pyx_v_tz; } __pyx_L11:; goto __pyx_L10; } /* "pandas/tslib.pyx":822 * PANDAS_FR_ns, &obj.dts) * obj.tzinfo = tz * elif not _is_utc(tz): # <<<<<<<<<<<<<< * try: * ts = tz.localize(ts) */ __pyx_t_1 = ((!(__pyx_f_6pandas_5tslib__is_utc(__pyx_v_tz) != 0)) != 0); if (__pyx_t_1) { /* "pandas/tslib.pyx":823 * obj.tzinfo = tz * elif not _is_utc(tz): * try: # <<<<<<<<<<<<<< * ts = tz.localize(ts) * except AttributeError: */ { __Pyx_ExceptionSave(&__pyx_t_11, &__pyx_t_12, &__pyx_t_13); __Pyx_XGOTREF(__pyx_t_11); __Pyx_XGOTREF(__pyx_t_12); __Pyx_XGOTREF(__pyx_t_13); /*try:*/ { /* "pandas/tslib.pyx":824 * elif not _is_utc(tz): * try: * ts = tz.localize(ts) # <<<<<<<<<<<<<< * except AttributeError: * ts = ts.replace(tzinfo=tz) */ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_tz, __pyx_n_s_localize); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 824; __pyx_clineno = __LINE__; goto __pyx_L12_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 824; __pyx_clineno = __LINE__; goto __pyx_L12_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_v_ts); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_ts); __Pyx_GIVEREF(__pyx_v_ts); __pyx_t_3 = PyObject_Call(__pyx_t_5, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 824; __pyx_clineno = __LINE__; goto __pyx_L12_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF_SET(__pyx_v_ts, __pyx_t_3); __pyx_t_3 = 0; } __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; goto __pyx_L19_try_end; __pyx_L12_error:; __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/tslib.pyx":825 * try: * ts = tz.localize(ts) * except AttributeError: # <<<<<<<<<<<<<< * ts = ts.replace(tzinfo=tz) * obj.value = _pydatetime_to_dts(ts, &obj.dts) */ __pyx_t_14 = PyErr_ExceptionMatches(__pyx_builtin_AttributeError); if (__pyx_t_14) { __Pyx_AddTraceback("pandas.tslib.convert_to_tsobject", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_3, &__pyx_t_4, &__pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 825; __pyx_clineno = __LINE__; goto __pyx_L14_except_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_GOTREF(__pyx_t_4); __Pyx_GOTREF(__pyx_t_5); /* "pandas/tslib.pyx":826 * ts = tz.localize(ts) * except AttributeError: * ts = ts.replace(tzinfo=tz) # <<<<<<<<<<<<<< * obj.value = _pydatetime_to_dts(ts, &obj.dts) * obj.tzinfo = ts.tzinfo */ __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_ts, __pyx_n_s_replace); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 826; __pyx_clineno = __LINE__; goto __pyx_L14_except_error;} __Pyx_GOTREF(__pyx_t_10); __pyx_t_15 = PyDict_New(); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 826; __pyx_clineno = __LINE__; goto __pyx_L14_except_error;} __Pyx_GOTREF(__pyx_t_15); if (PyDict_SetItem(__pyx_t_15, __pyx_n_s_tzinfo, __pyx_v_tz) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 826; __pyx_clineno = __LINE__; goto __pyx_L14_except_error;} __pyx_t_16 = PyObject_Call(__pyx_t_10, __pyx_empty_tuple, __pyx_t_15); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 826; __pyx_clineno = __LINE__; goto __pyx_L14_except_error;} __Pyx_GOTREF(__pyx_t_16); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; __Pyx_DECREF_SET(__pyx_v_ts, __pyx_t_16); __pyx_t_16 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; goto __pyx_L13_exception_handled; } goto __pyx_L14_except_error; __pyx_L14_except_error:; __Pyx_XGIVEREF(__pyx_t_11); __Pyx_XGIVEREF(__pyx_t_12); __Pyx_XGIVEREF(__pyx_t_13); __Pyx_ExceptionReset(__pyx_t_11, __pyx_t_12, __pyx_t_13); goto __pyx_L1_error; __pyx_L13_exception_handled:; __Pyx_XGIVEREF(__pyx_t_11); __Pyx_XGIVEREF(__pyx_t_12); __Pyx_XGIVEREF(__pyx_t_13); __Pyx_ExceptionReset(__pyx_t_11, __pyx_t_12, __pyx_t_13); __pyx_L19_try_end:; } /* "pandas/tslib.pyx":827 * except AttributeError: * ts = ts.replace(tzinfo=tz) * obj.value = _pydatetime_to_dts(ts, &obj.dts) # <<<<<<<<<<<<<< * obj.tzinfo = ts.tzinfo * else: */ __pyx_v_obj->value = __pyx_f_8datetime__pydatetime_to_dts(__pyx_v_ts, (&__pyx_v_obj->dts)); /* "pandas/tslib.pyx":828 * ts = ts.replace(tzinfo=tz) * obj.value = _pydatetime_to_dts(ts, &obj.dts) * obj.tzinfo = ts.tzinfo # <<<<<<<<<<<<<< * else: * # UTC */ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_ts, __pyx_n_s_tzinfo); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 828; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __Pyx_GOTREF(__pyx_v_obj->tzinfo); __Pyx_DECREF(__pyx_v_obj->tzinfo); __pyx_v_obj->tzinfo = __pyx_t_5; __pyx_t_5 = 0; goto __pyx_L10; } /*else*/ { /* "pandas/tslib.pyx":831 * else: * # UTC * obj.value = _pydatetime_to_dts(ts, &obj.dts) # <<<<<<<<<<<<<< * obj.tzinfo = pytz.utc * else: */ __pyx_v_obj->value = __pyx_f_8datetime__pydatetime_to_dts(__pyx_v_ts, (&__pyx_v_obj->dts)); /* "pandas/tslib.pyx":832 * # UTC * obj.value = _pydatetime_to_dts(ts, &obj.dts) * obj.tzinfo = pytz.utc # <<<<<<<<<<<<<< * else: * obj.value = _pydatetime_to_dts(ts, &obj.dts) */ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_pytz); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 832; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_utc); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 832; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GIVEREF(__pyx_t_4); __Pyx_GOTREF(__pyx_v_obj->tzinfo); __Pyx_DECREF(__pyx_v_obj->tzinfo); __pyx_v_obj->tzinfo = __pyx_t_4; __pyx_t_4 = 0; } __pyx_L10:; goto __pyx_L9; } /*else*/ { /* "pandas/tslib.pyx":834 * obj.tzinfo = pytz.utc * else: * obj.value = _pydatetime_to_dts(ts, &obj.dts) # <<<<<<<<<<<<<< * obj.tzinfo = ts.tzinfo * */ __pyx_v_obj->value = __pyx_f_8datetime__pydatetime_to_dts(__pyx_v_ts, (&__pyx_v_obj->dts)); /* "pandas/tslib.pyx":835 * else: * obj.value = _pydatetime_to_dts(ts, &obj.dts) * obj.tzinfo = ts.tzinfo # <<<<<<<<<<<<<< * * if obj.tzinfo is not None and not _is_utc(obj.tzinfo): */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_ts, __pyx_n_s_tzinfo); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 835; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __Pyx_GOTREF(__pyx_v_obj->tzinfo); __Pyx_DECREF(__pyx_v_obj->tzinfo); __pyx_v_obj->tzinfo = __pyx_t_4; __pyx_t_4 = 0; } __pyx_L9:; /* "pandas/tslib.pyx":837 * obj.tzinfo = ts.tzinfo * * if obj.tzinfo is not None and not _is_utc(obj.tzinfo): # <<<<<<<<<<<<<< * offset = _get_utcoffset(obj.tzinfo, ts) * obj.value -= _delta_to_nanoseconds(offset) */ __pyx_t_1 = (__pyx_v_obj->tzinfo != Py_None); if ((__pyx_t_1 != 0)) { __pyx_t_4 = __pyx_v_obj->tzinfo; __Pyx_INCREF(__pyx_t_4); __pyx_t_2 = ((!(__pyx_f_6pandas_5tslib__is_utc(__pyx_t_4) != 0)) != 0); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_7 = __pyx_t_2; } else { __pyx_t_7 = (__pyx_t_1 != 0); } if (__pyx_t_7) { /* "pandas/tslib.pyx":838 * * if obj.tzinfo is not None and not _is_utc(obj.tzinfo): * offset = _get_utcoffset(obj.tzinfo, ts) # <<<<<<<<<<<<<< * obj.value -= _delta_to_nanoseconds(offset) * */ __pyx_t_4 = __pyx_v_obj->tzinfo; __Pyx_INCREF(__pyx_t_4); __pyx_t_5 = __pyx_f_6pandas_5tslib__get_utcoffset(__pyx_t_4, __pyx_v_ts, 0); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 838; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_offset = __pyx_t_5; __pyx_t_5 = 0; /* "pandas/tslib.pyx":839 * if obj.tzinfo is not None and not _is_utc(obj.tzinfo): * offset = _get_utcoffset(obj.tzinfo, ts) * obj.value -= _delta_to_nanoseconds(offset) # <<<<<<<<<<<<<< * * if is_timestamp(ts): */ __pyx_t_5 = __Pyx_PyInt_From_npy_int64(__pyx_v_obj->value); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 839; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_delta_to_nanoseconds); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 839; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 839; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_v_offset); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_offset); __Pyx_GIVEREF(__pyx_v_offset); __pyx_t_16 = PyObject_Call(__pyx_t_4, __pyx_t_3, NULL); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 839; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_16); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyNumber_InPlaceSubtract(__pyx_t_5, __pyx_t_16); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 839; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; __pyx_t_8 = __Pyx_PyInt_As_npy_int64(__pyx_t_3); if (unlikely((__pyx_t_8 == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 839; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_obj->value = __pyx_t_8; goto __pyx_L22; } __pyx_L22:; /* "pandas/tslib.pyx":841 * obj.value -= _delta_to_nanoseconds(offset) * * if is_timestamp(ts): # <<<<<<<<<<<<<< * obj.value += ts.nanosecond * _check_dts_bounds(&obj.dts) */ __pyx_t_7 = (__pyx_f_6pandas_5tslib_is_timestamp(__pyx_v_ts) != 0); if (__pyx_t_7) { /* "pandas/tslib.pyx":842 * * if is_timestamp(ts): * obj.value += ts.nanosecond # <<<<<<<<<<<<<< * _check_dts_bounds(&obj.dts) * return obj */ __pyx_t_3 = __Pyx_PyInt_From_npy_int64(__pyx_v_obj->value); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 842; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_v_ts, __pyx_n_s_nanosecond); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 842; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_16); __pyx_t_5 = PyNumber_InPlaceAdd(__pyx_t_3, __pyx_t_16); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 842; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; __pyx_t_8 = __Pyx_PyInt_As_npy_int64(__pyx_t_5); if (unlikely((__pyx_t_8 == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 842; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_v_obj->value = __pyx_t_8; goto __pyx_L23; } __pyx_L23:; /* "pandas/tslib.pyx":843 * if is_timestamp(ts): * obj.value += ts.nanosecond * _check_dts_bounds(&obj.dts) # <<<<<<<<<<<<<< * return obj * elif PyDate_Check(ts): */ __pyx_t_5 = __pyx_f_6pandas_5tslib__check_dts_bounds((&__pyx_v_obj->dts)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 843; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "pandas/tslib.pyx":844 * obj.value += ts.nanosecond * _check_dts_bounds(&obj.dts) * return obj # <<<<<<<<<<<<<< * elif PyDate_Check(ts): * # Keep the converter same as PyDateTime's */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_obj)); __pyx_r = ((PyObject *)__pyx_v_obj); goto __pyx_L0; } /* "pandas/tslib.pyx":845 * _check_dts_bounds(&obj.dts) * return obj * elif PyDate_Check(ts): # <<<<<<<<<<<<<< * # Keep the converter same as PyDateTime's * ts = datetime.combine(ts, datetime_time()) */ __pyx_t_7 = (PyDate_Check(__pyx_v_ts) != 0); if (__pyx_t_7) { /* "pandas/tslib.pyx":847 * elif PyDate_Check(ts): * # Keep the converter same as PyDateTime's * ts = datetime.combine(ts, datetime_time()) # <<<<<<<<<<<<<< * return convert_to_tsobject(ts, tz, None) * else: */ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)((PyObject*)__pyx_ptype_8datetime_datetime)), __pyx_n_s_combine); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 847; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_16 = __Pyx_GetModuleGlobalName(__pyx_n_s_datetime_time); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 847; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_16); __pyx_t_3 = PyObject_Call(__pyx_t_16, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 847; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; __pyx_t_16 = PyTuple_New(2); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 847; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_16); __Pyx_INCREF(__pyx_v_ts); PyTuple_SET_ITEM(__pyx_t_16, 0, __pyx_v_ts); __Pyx_GIVEREF(__pyx_v_ts); PyTuple_SET_ITEM(__pyx_t_16, 1, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyObject_Call(__pyx_t_5, __pyx_t_16, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 847; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; __Pyx_DECREF_SET(__pyx_v_ts, __pyx_t_3); __pyx_t_3 = 0; /* "pandas/tslib.pyx":848 * # Keep the converter same as PyDateTime's * ts = datetime.combine(ts, datetime_time()) * return convert_to_tsobject(ts, tz, None) # <<<<<<<<<<<<<< * else: * raise ValueError("Could not construct Timestamp from argument %s" % */ __Pyx_XDECREF(__pyx_r); __pyx_t_3 = __pyx_f_6pandas_5tslib_convert_to_tsobject(__pyx_v_ts, __pyx_v_tz, Py_None); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 848; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; } /*else*/ { /* "pandas/tslib.pyx":850 * return convert_to_tsobject(ts, tz, None) * else: * raise ValueError("Could not construct Timestamp from argument %s" % # <<<<<<<<<<<<<< * type(ts)) * */ __pyx_t_3 = __Pyx_PyString_Format(__pyx_kp_s_Could_not_construct_Timestamp_fr, ((PyObject *)Py_TYPE(__pyx_v_ts))); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 850; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_16 = PyTuple_New(1); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 850; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_16); PyTuple_SET_ITEM(__pyx_t_16, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyObject_Call(__pyx_builtin_ValueError, __pyx_t_16, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 850; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 850; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_L5:; /* "pandas/tslib.pyx":853 * type(ts)) * * if obj.value != NPY_NAT: # <<<<<<<<<<<<<< * _check_dts_bounds(&obj.dts) * */ __pyx_t_7 = ((__pyx_v_obj->value != __pyx_v_6pandas_5tslib_NPY_NAT) != 0); if (__pyx_t_7) { /* "pandas/tslib.pyx":854 * * if obj.value != NPY_NAT: * _check_dts_bounds(&obj.dts) # <<<<<<<<<<<<<< * * if tz is not None: */ __pyx_t_3 = __pyx_f_6pandas_5tslib__check_dts_bounds((&__pyx_v_obj->dts)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 854; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L24; } __pyx_L24:; /* "pandas/tslib.pyx":856 * _check_dts_bounds(&obj.dts) * * if tz is not None: # <<<<<<<<<<<<<< * _localize_tso(obj, tz) * */ __pyx_t_7 = (__pyx_v_tz != Py_None); __pyx_t_1 = (__pyx_t_7 != 0); if (__pyx_t_1) { /* "pandas/tslib.pyx":857 * * if tz is not None: * _localize_tso(obj, tz) # <<<<<<<<<<<<<< * * return obj */ __pyx_f_6pandas_5tslib__localize_tso(__pyx_v_obj, __pyx_v_tz); goto __pyx_L25; } __pyx_L25:; /* "pandas/tslib.pyx":859 * _localize_tso(obj, tz) * * return obj # <<<<<<<<<<<<<< * * cdef inline void _localize_tso(_TSObject obj, object tz): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_obj)); __pyx_r = ((PyObject *)__pyx_v_obj); goto __pyx_L0; /* "pandas/tslib.pyx":758 * * # helper to extract datetime and int64 from several different possibilities * cdef convert_to_tsobject(object ts, object tz, object unit): # <<<<<<<<<<<<<< * """ * Extract datetime and int64 from any of: */ /* 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_10); __Pyx_XDECREF(__pyx_t_15); __Pyx_XDECREF(__pyx_t_16); __Pyx_AddTraceback("pandas.tslib.convert_to_tsobject", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_obj); __Pyx_XDECREF(__pyx_v_ts_offset); __Pyx_XDECREF(__pyx_v_tz_offset); __Pyx_XDECREF(__pyx_v_offset); __Pyx_XDECREF(__pyx_v_ts); __Pyx_XDECREF(__pyx_v_tz); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/tslib.pyx":861 * return obj * * cdef inline void _localize_tso(_TSObject obj, object tz): # <<<<<<<<<<<<<< * if _is_utc(tz): * obj.tzinfo = tz */ static CYTHON_INLINE void __pyx_f_6pandas_5tslib__localize_tso(struct __pyx_obj_6pandas_5tslib__TSObject *__pyx_v_obj, PyObject *__pyx_v_tz) { PyDateTime_DateTime *__pyx_v_dt = NULL; PyObject *__pyx_v_delta = NULL; PyObject *__pyx_v_trans = NULL; PyObject *__pyx_v_deltas = NULL; PyObject *__pyx_v_pos = NULL; PyObject *__pyx_v_inf = 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; npy_datetime __pyx_t_10; int __pyx_t_11; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_localize_tso", 0); /* "pandas/tslib.pyx":862 * * cdef inline void _localize_tso(_TSObject obj, object tz): * if _is_utc(tz): # <<<<<<<<<<<<<< * obj.tzinfo = tz * elif _is_tzlocal(tz): */ __pyx_t_1 = (__pyx_f_6pandas_5tslib__is_utc(__pyx_v_tz) != 0); if (__pyx_t_1) { /* "pandas/tslib.pyx":863 * cdef inline void _localize_tso(_TSObject obj, object tz): * if _is_utc(tz): * obj.tzinfo = tz # <<<<<<<<<<<<<< * elif _is_tzlocal(tz): * pandas_datetime_to_datetimestruct(obj.value, PANDAS_FR_ns, &obj.dts) */ __Pyx_INCREF(__pyx_v_tz); __Pyx_GIVEREF(__pyx_v_tz); __Pyx_GOTREF(__pyx_v_obj->tzinfo); __Pyx_DECREF(__pyx_v_obj->tzinfo); __pyx_v_obj->tzinfo = __pyx_v_tz; goto __pyx_L3; } /* "pandas/tslib.pyx":864 * if _is_utc(tz): * obj.tzinfo = tz * elif _is_tzlocal(tz): # <<<<<<<<<<<<<< * pandas_datetime_to_datetimestruct(obj.value, PANDAS_FR_ns, &obj.dts) * dt = datetime(obj.dts.year, obj.dts.month, obj.dts.day, obj.dts.hour, */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_is_tzlocal); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 864; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 864; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_v_tz); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_tz); __Pyx_GIVEREF(__pyx_v_tz); __pyx_t_4 = PyObject_Call(__pyx_t_2, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 864; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 864; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_1) { /* "pandas/tslib.pyx":865 * obj.tzinfo = tz * elif _is_tzlocal(tz): * pandas_datetime_to_datetimestruct(obj.value, PANDAS_FR_ns, &obj.dts) # <<<<<<<<<<<<<< * dt = datetime(obj.dts.year, obj.dts.month, obj.dts.day, obj.dts.hour, * obj.dts.min, obj.dts.sec, obj.dts.us, tz) */ pandas_datetime_to_datetimestruct(__pyx_v_obj->value, PANDAS_FR_ns, (&__pyx_v_obj->dts)); /* "pandas/tslib.pyx":866 * elif _is_tzlocal(tz): * pandas_datetime_to_datetimestruct(obj.value, PANDAS_FR_ns, &obj.dts) * dt = datetime(obj.dts.year, obj.dts.month, obj.dts.day, obj.dts.hour, # <<<<<<<<<<<<<< * obj.dts.min, obj.dts.sec, obj.dts.us, tz) * delta = int(total_seconds(_get_utcoffset(tz, dt))) * 1000000000 */ __pyx_t_4 = __Pyx_PyInt_From_npy_int64(__pyx_v_obj->dts.year); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 866; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = __Pyx_PyInt_From_npy_int32(__pyx_v_obj->dts.month); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 866; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_PyInt_From_npy_int32(__pyx_v_obj->dts.day); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 866; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = __Pyx_PyInt_From_npy_int32(__pyx_v_obj->dts.hour); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 866; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); /* "pandas/tslib.pyx":867 * pandas_datetime_to_datetimestruct(obj.value, PANDAS_FR_ns, &obj.dts) * dt = datetime(obj.dts.year, obj.dts.month, obj.dts.day, obj.dts.hour, * obj.dts.min, obj.dts.sec, obj.dts.us, tz) # <<<<<<<<<<<<<< * delta = int(total_seconds(_get_utcoffset(tz, dt))) * 1000000000 * pandas_datetime_to_datetimestruct(obj.value + delta, */ __pyx_t_6 = __Pyx_PyInt_From_npy_int32(__pyx_v_obj->dts.min); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 867; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = __Pyx_PyInt_From_npy_int32(__pyx_v_obj->dts.sec); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 867; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_t_8 = __Pyx_PyInt_From_npy_int32(__pyx_v_obj->dts.us); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 867; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); /* "pandas/tslib.pyx":866 * elif _is_tzlocal(tz): * pandas_datetime_to_datetimestruct(obj.value, PANDAS_FR_ns, &obj.dts) * dt = datetime(obj.dts.year, obj.dts.month, obj.dts.day, obj.dts.hour, # <<<<<<<<<<<<<< * obj.dts.min, obj.dts.sec, obj.dts.us, tz) * delta = int(total_seconds(_get_utcoffset(tz, dt))) * 1000000000 */ __pyx_t_9 = PyTuple_New(8); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 866; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_9, 2, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_9, 3, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_9, 4, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_9, 5, __pyx_t_7); __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_9, 6, __pyx_t_8); __Pyx_GIVEREF(__pyx_t_8); __Pyx_INCREF(__pyx_v_tz); PyTuple_SET_ITEM(__pyx_t_9, 7, __pyx_v_tz); __Pyx_GIVEREF(__pyx_v_tz); __pyx_t_4 = 0; __pyx_t_3 = 0; __pyx_t_2 = 0; __pyx_t_5 = 0; __pyx_t_6 = 0; __pyx_t_7 = 0; __pyx_t_8 = 0; __pyx_t_8 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_8datetime_datetime)), __pyx_t_9, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 866; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_v_dt = ((PyDateTime_DateTime *)__pyx_t_8); __pyx_t_8 = 0; /* "pandas/tslib.pyx":868 * dt = datetime(obj.dts.year, obj.dts.month, obj.dts.day, obj.dts.hour, * obj.dts.min, obj.dts.sec, obj.dts.us, tz) * delta = int(total_seconds(_get_utcoffset(tz, dt))) * 1000000000 # <<<<<<<<<<<<<< * pandas_datetime_to_datetimestruct(obj.value + delta, * PANDAS_FR_ns, &obj.dts) */ __pyx_t_8 = __pyx_f_6pandas_5tslib__get_utcoffset(__pyx_v_tz, ((PyObject *)__pyx_v_dt), 0); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 868; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_9 = PyFloat_FromDouble(__pyx_f_6pandas_5tslib_total_seconds(__pyx_t_8)); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 868; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 868; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_9); __Pyx_GIVEREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_9 = PyObject_Call(((PyObject *)((PyObject*)(&PyInt_Type))), __pyx_t_8, NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 868; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_8 = PyNumber_Multiply(__pyx_t_9, __pyx_int_1000000000); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 868; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_v_delta = __pyx_t_8; __pyx_t_8 = 0; /* "pandas/tslib.pyx":869 * obj.dts.min, obj.dts.sec, obj.dts.us, tz) * delta = int(total_seconds(_get_utcoffset(tz, dt))) * 1000000000 * pandas_datetime_to_datetimestruct(obj.value + delta, # <<<<<<<<<<<<<< * PANDAS_FR_ns, &obj.dts) * obj.tzinfo = tz */ __pyx_t_8 = __Pyx_PyInt_From_npy_int64(__pyx_v_obj->value); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 869; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_9 = PyNumber_Add(__pyx_t_8, __pyx_v_delta); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 869; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_10 = __Pyx_PyInt_As_npy_int64(__pyx_t_9); if (unlikely((__pyx_t_10 == (npy_datetime)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 869; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; /* "pandas/tslib.pyx":870 * delta = int(total_seconds(_get_utcoffset(tz, dt))) * 1000000000 * pandas_datetime_to_datetimestruct(obj.value + delta, * PANDAS_FR_ns, &obj.dts) # <<<<<<<<<<<<<< * obj.tzinfo = tz * else: */ pandas_datetime_to_datetimestruct(__pyx_t_10, PANDAS_FR_ns, (&__pyx_v_obj->dts)); /* "pandas/tslib.pyx":871 * pandas_datetime_to_datetimestruct(obj.value + delta, * PANDAS_FR_ns, &obj.dts) * obj.tzinfo = tz # <<<<<<<<<<<<<< * else: * # Adjust datetime64 timestamp, recompute datetimestruct */ __Pyx_INCREF(__pyx_v_tz); __Pyx_GIVEREF(__pyx_v_tz); __Pyx_GOTREF(__pyx_v_obj->tzinfo); __Pyx_DECREF(__pyx_v_obj->tzinfo); __pyx_v_obj->tzinfo = __pyx_v_tz; goto __pyx_L3; } /*else*/ { /* "pandas/tslib.pyx":874 * else: * # Adjust datetime64 timestamp, recompute datetimestruct * trans = _get_transitions(tz) # <<<<<<<<<<<<<< * deltas = _get_deltas(tz) * pos = trans.searchsorted(obj.value, side='right') - 1 */ __pyx_t_9 = __Pyx_GetModuleGlobalName(__pyx_n_s_get_transitions); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 874; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 874; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_INCREF(__pyx_v_tz); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_v_tz); __Pyx_GIVEREF(__pyx_v_tz); __pyx_t_7 = PyObject_Call(__pyx_t_9, __pyx_t_8, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 874; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_v_trans = __pyx_t_7; __pyx_t_7 = 0; /* "pandas/tslib.pyx":875 * # Adjust datetime64 timestamp, recompute datetimestruct * trans = _get_transitions(tz) * deltas = _get_deltas(tz) # <<<<<<<<<<<<<< * pos = trans.searchsorted(obj.value, side='right') - 1 * */ __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_get_deltas); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 875; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 875; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_INCREF(__pyx_v_tz); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_v_tz); __Pyx_GIVEREF(__pyx_v_tz); __pyx_t_9 = PyObject_Call(__pyx_t_7, __pyx_t_8, NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 875; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_v_deltas = __pyx_t_9; __pyx_t_9 = 0; /* "pandas/tslib.pyx":876 * trans = _get_transitions(tz) * deltas = _get_deltas(tz) * pos = trans.searchsorted(obj.value, side='right') - 1 # <<<<<<<<<<<<<< * * # statictzinfo */ __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_trans, __pyx_n_s_searchsorted); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 876; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_t_8 = __Pyx_PyInt_From_npy_int64(__pyx_v_obj->value); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 876; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 876; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_8); __Pyx_GIVEREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_8 = PyDict_New(); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 876; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_side, __pyx_n_s_right) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 876; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_6 = PyObject_Call(__pyx_t_9, __pyx_t_7, __pyx_t_8); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 876; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_8 = PyNumber_Subtract(__pyx_t_6, __pyx_int_1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 876; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_v_pos = __pyx_t_8; __pyx_t_8 = 0; /* "pandas/tslib.pyx":879 * * # statictzinfo * if not hasattr(tz, '_transition_info'): # <<<<<<<<<<<<<< * pandas_datetime_to_datetimestruct(obj.value + deltas[0], * PANDAS_FR_ns, &obj.dts) */ __pyx_t_1 = PyObject_HasAttr(__pyx_v_tz, __pyx_n_s_transition_info); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 879; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_11 = ((!(__pyx_t_1 != 0)) != 0); if (__pyx_t_11) { /* "pandas/tslib.pyx":880 * # statictzinfo * if not hasattr(tz, '_transition_info'): * pandas_datetime_to_datetimestruct(obj.value + deltas[0], # <<<<<<<<<<<<<< * PANDAS_FR_ns, &obj.dts) * obj.tzinfo = tz */ __pyx_t_8 = __Pyx_PyInt_From_npy_int64(__pyx_v_obj->value); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 880; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_deltas, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_6 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 880; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = PyNumber_Add(__pyx_t_8, __pyx_t_6); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 880; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_10 = __Pyx_PyInt_As_npy_int64(__pyx_t_7); if (unlikely((__pyx_t_10 == (npy_datetime)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 880; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; /* "pandas/tslib.pyx":881 * if not hasattr(tz, '_transition_info'): * pandas_datetime_to_datetimestruct(obj.value + deltas[0], * PANDAS_FR_ns, &obj.dts) # <<<<<<<<<<<<<< * obj.tzinfo = tz * else: */ pandas_datetime_to_datetimestruct(__pyx_t_10, PANDAS_FR_ns, (&__pyx_v_obj->dts)); /* "pandas/tslib.pyx":882 * pandas_datetime_to_datetimestruct(obj.value + deltas[0], * PANDAS_FR_ns, &obj.dts) * obj.tzinfo = tz # <<<<<<<<<<<<<< * else: * inf = tz._transition_info[pos] */ __Pyx_INCREF(__pyx_v_tz); __Pyx_GIVEREF(__pyx_v_tz); __Pyx_GOTREF(__pyx_v_obj->tzinfo); __Pyx_DECREF(__pyx_v_obj->tzinfo); __pyx_v_obj->tzinfo = __pyx_v_tz; goto __pyx_L4; } /*else*/ { /* "pandas/tslib.pyx":884 * obj.tzinfo = tz * else: * inf = tz._transition_info[pos] # <<<<<<<<<<<<<< * pandas_datetime_to_datetimestruct(obj.value + deltas[pos], * PANDAS_FR_ns, &obj.dts) */ __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_tz, __pyx_n_s_transition_info); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 884; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_t_6 = PyObject_GetItem(__pyx_t_7, __pyx_v_pos); if (unlikely(__pyx_t_6 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 884; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_v_inf = __pyx_t_6; __pyx_t_6 = 0; /* "pandas/tslib.pyx":885 * else: * inf = tz._transition_info[pos] * pandas_datetime_to_datetimestruct(obj.value + deltas[pos], # <<<<<<<<<<<<<< * PANDAS_FR_ns, &obj.dts) * obj.tzinfo = tz._tzinfos[inf] */ __pyx_t_6 = __Pyx_PyInt_From_npy_int64(__pyx_v_obj->value); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 885; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = PyObject_GetItem(__pyx_v_deltas, __pyx_v_pos); if (unlikely(__pyx_t_7 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 885; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_7); __pyx_t_8 = PyNumber_Add(__pyx_t_6, __pyx_t_7); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 885; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_10 = __Pyx_PyInt_As_npy_int64(__pyx_t_8); if (unlikely((__pyx_t_10 == (npy_datetime)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 885; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; /* "pandas/tslib.pyx":886 * inf = tz._transition_info[pos] * pandas_datetime_to_datetimestruct(obj.value + deltas[pos], * PANDAS_FR_ns, &obj.dts) # <<<<<<<<<<<<<< * obj.tzinfo = tz._tzinfos[inf] * */ pandas_datetime_to_datetimestruct(__pyx_t_10, PANDAS_FR_ns, (&__pyx_v_obj->dts)); /* "pandas/tslib.pyx":887 * pandas_datetime_to_datetimestruct(obj.value + deltas[pos], * PANDAS_FR_ns, &obj.dts) * obj.tzinfo = tz._tzinfos[inf] # <<<<<<<<<<<<<< * * */ __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_tz, __pyx_n_s_tzinfos); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 887; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_7 = PyObject_GetItem(__pyx_t_8, __pyx_v_inf); if (unlikely(__pyx_t_7 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 887; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_GIVEREF(__pyx_t_7); __Pyx_GOTREF(__pyx_v_obj->tzinfo); __Pyx_DECREF(__pyx_v_obj->tzinfo); __pyx_v_obj->tzinfo = __pyx_t_7; __pyx_t_7 = 0; } __pyx_L4:; } __pyx_L3:; /* "pandas/tslib.pyx":861 * return obj * * cdef inline void _localize_tso(_TSObject obj, object tz): # <<<<<<<<<<<<<< * if _is_utc(tz): * obj.tzinfo = tz */ /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_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_WriteUnraisable("pandas.tslib._localize_tso", __pyx_clineno, __pyx_lineno, __pyx_filename, 0); __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_dt); __Pyx_XDECREF(__pyx_v_delta); __Pyx_XDECREF(__pyx_v_trans); __Pyx_XDECREF(__pyx_v_deltas); __Pyx_XDECREF(__pyx_v_pos); __Pyx_XDECREF(__pyx_v_inf); __Pyx_RefNannyFinishContext(); } /* "pandas/tslib.pyx":890 * * * def get_timezone(tz): # <<<<<<<<<<<<<< * return _get_zone(tz) * */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5tslib_19get_timezone(PyObject *__pyx_self, PyObject *__pyx_v_tz); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5tslib_19get_timezone = {__Pyx_NAMESTR("get_timezone"), (PyCFunction)__pyx_pw_6pandas_5tslib_19get_timezone, METH_O, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5tslib_19get_timezone(PyObject *__pyx_self, PyObject *__pyx_v_tz) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("get_timezone (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_5tslib_18get_timezone(__pyx_self, ((PyObject *)__pyx_v_tz)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5tslib_18get_timezone(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_tz) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_timezone", 0); /* "pandas/tslib.pyx":891 * * def get_timezone(tz): * return _get_zone(tz) # <<<<<<<<<<<<<< * * cdef inline bint _is_utc(object tz): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_6pandas_5tslib__get_zone(__pyx_v_tz); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 891; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "pandas/tslib.pyx":890 * * * def get_timezone(tz): # <<<<<<<<<<<<<< * return _get_zone(tz) * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas.tslib.get_timezone", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/tslib.pyx":893 * return _get_zone(tz) * * cdef inline bint _is_utc(object tz): # <<<<<<<<<<<<<< * return tz is UTC or isinstance(tz, _du_utc) * */ static CYTHON_INLINE int __pyx_f_6pandas_5tslib__is_utc(PyObject *__pyx_v_tz) { int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; int __pyx_t_3; int __pyx_t_4; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_is_utc", 0); /* "pandas/tslib.pyx":894 * * cdef inline bint _is_utc(object tz): * return tz is UTC or isinstance(tz, _du_utc) # <<<<<<<<<<<<<< * * cdef inline object _get_zone(object tz): */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_UTC); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 894; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = (__pyx_v_tz == __pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (!__pyx_t_2) { __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_du_utc); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 894; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = PyObject_IsInstance(__pyx_v_tz, __pyx_t_1); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 894; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_4 = __pyx_t_3; } else { __pyx_t_4 = __pyx_t_2; } __pyx_r = __pyx_t_4; goto __pyx_L0; /* "pandas/tslib.pyx":893 * return _get_zone(tz) * * cdef inline bint _is_utc(object tz): # <<<<<<<<<<<<<< * return tz is UTC or isinstance(tz, _du_utc) * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_WriteUnraisable("pandas.tslib._is_utc", __pyx_clineno, __pyx_lineno, __pyx_filename, 0); __pyx_r = 0; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/tslib.pyx":896 * return tz is UTC or isinstance(tz, _du_utc) * * cdef inline object _get_zone(object tz): # <<<<<<<<<<<<<< * if _is_utc(tz): * return 'UTC' */ static CYTHON_INLINE PyObject *__pyx_f_6pandas_5tslib__get_zone(PyObject *__pyx_v_tz) { PyObject *__pyx_v_zone = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; int __pyx_t_6; int __pyx_t_7; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_get_zone", 0); /* "pandas/tslib.pyx":897 * * cdef inline object _get_zone(object tz): * if _is_utc(tz): # <<<<<<<<<<<<<< * return 'UTC' * else: */ __pyx_t_1 = (__pyx_f_6pandas_5tslib__is_utc(__pyx_v_tz) != 0); if (__pyx_t_1) { /* "pandas/tslib.pyx":898 * cdef inline object _get_zone(object tz): * if _is_utc(tz): * return 'UTC' # <<<<<<<<<<<<<< * else: * try: */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_n_s_UTC); __pyx_r = __pyx_n_s_UTC; goto __pyx_L0; } /*else*/ { /* "pandas/tslib.pyx":900 * return 'UTC' * else: * try: # <<<<<<<<<<<<<< * zone = tz.zone * if zone is None: */ { __Pyx_ExceptionSave(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4); __Pyx_XGOTREF(__pyx_t_2); __Pyx_XGOTREF(__pyx_t_3); __Pyx_XGOTREF(__pyx_t_4); /*try:*/ { /* "pandas/tslib.pyx":901 * else: * try: * zone = tz.zone # <<<<<<<<<<<<<< * if zone is None: * return tz */ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_tz, __pyx_n_s_zone); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 901; __pyx_clineno = __LINE__; goto __pyx_L4_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_v_zone = __pyx_t_5; __pyx_t_5 = 0; /* "pandas/tslib.pyx":902 * try: * zone = tz.zone * if zone is None: # <<<<<<<<<<<<<< * return tz * return zone */ __pyx_t_1 = (__pyx_v_zone == Py_None); __pyx_t_6 = (__pyx_t_1 != 0); if (__pyx_t_6) { /* "pandas/tslib.pyx":903 * zone = tz.zone * if zone is None: * return tz # <<<<<<<<<<<<<< * return zone * except AttributeError: */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_tz); __pyx_r = __pyx_v_tz; goto __pyx_L8_try_return; } /* "pandas/tslib.pyx":904 * if zone is None: * return tz * return zone # <<<<<<<<<<<<<< * except AttributeError: * return tz */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_zone); __pyx_r = __pyx_v_zone; goto __pyx_L8_try_return; } __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; goto __pyx_L11_try_end; __pyx_L4_error:; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; /* "pandas/tslib.pyx":905 * return tz * return zone * except AttributeError: # <<<<<<<<<<<<<< * return tz * */ __pyx_t_7 = PyErr_ExceptionMatches(__pyx_builtin_AttributeError); if (__pyx_t_7) { __Pyx_AddTraceback("pandas.tslib._get_zone", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_8, &__pyx_t_9) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 905; __pyx_clineno = __LINE__; goto __pyx_L6_except_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_GOTREF(__pyx_t_8); __Pyx_GOTREF(__pyx_t_9); /* "pandas/tslib.pyx":906 * return zone * except AttributeError: * return tz # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_tz); __pyx_r = __pyx_v_tz; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; goto __pyx_L7_except_return; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; goto __pyx_L5_exception_handled; } goto __pyx_L6_except_error; __pyx_L6_except_error:; __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_XGIVEREF(__pyx_t_4); __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4); goto __pyx_L1_error; __pyx_L8_try_return:; __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_XGIVEREF(__pyx_t_4); __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4); goto __pyx_L0; __pyx_L7_except_return:; __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_XGIVEREF(__pyx_t_4); __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4); goto __pyx_L0; __pyx_L5_exception_handled:; __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_XGIVEREF(__pyx_t_4); __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4); __pyx_L11_try_end:; } } /* "pandas/tslib.pyx":896 * return tz is UTC or isinstance(tz, _du_utc) * * cdef inline object _get_zone(object tz): # <<<<<<<<<<<<<< * if _is_utc(tz): * return 'UTC' */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); __Pyx_AddTraceback("pandas.tslib._get_zone", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_zone); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/tslib.pyx":912 * pass * * cdef inline _check_dts_bounds(pandas_datetimestruct *dts): # <<<<<<<<<<<<<< * cdef: * bint error = False */ static CYTHON_INLINE PyObject *__pyx_f_6pandas_5tslib__check_dts_bounds(pandas_datetimestruct *__pyx_v_dts) { int __pyx_v_error; PyObject *__pyx_v_fmt = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_check_dts_bounds", 0); /* "pandas/tslib.pyx":914 * cdef inline _check_dts_bounds(pandas_datetimestruct *dts): * cdef: * bint error = False # <<<<<<<<<<<<<< * * if dts.year <= 1677 and cmp_pandas_datetimestruct(dts, &_NS_MIN_DTS) == -1: */ __pyx_v_error = 0; /* "pandas/tslib.pyx":916 * bint error = False * * if dts.year <= 1677 and cmp_pandas_datetimestruct(dts, &_NS_MIN_DTS) == -1: # <<<<<<<<<<<<<< * error = True * elif ( */ __pyx_t_1 = ((__pyx_v_dts->year <= 1677) != 0); if (__pyx_t_1) { __pyx_t_2 = ((cmp_pandas_datetimestruct(__pyx_v_dts, (&__pyx_v_6pandas_5tslib__NS_MIN_DTS)) == -1) != 0); __pyx_t_3 = __pyx_t_2; } else { __pyx_t_3 = __pyx_t_1; } if (__pyx_t_3) { /* "pandas/tslib.pyx":917 * * if dts.year <= 1677 and cmp_pandas_datetimestruct(dts, &_NS_MIN_DTS) == -1: * error = True # <<<<<<<<<<<<<< * elif ( * dts.year >= 2262 and */ __pyx_v_error = 1; goto __pyx_L3; } /* "pandas/tslib.pyx":919 * error = True * elif ( * dts.year >= 2262 and # <<<<<<<<<<<<<< * cmp_pandas_datetimestruct(dts, &_NS_MAX_DTS) == 1): * error = True */ __pyx_t_3 = ((__pyx_v_dts->year >= 2262) != 0); if (__pyx_t_3) { /* "pandas/tslib.pyx":920 * elif ( * dts.year >= 2262 and * cmp_pandas_datetimestruct(dts, &_NS_MAX_DTS) == 1): # <<<<<<<<<<<<<< * error = True * */ __pyx_t_1 = ((cmp_pandas_datetimestruct(__pyx_v_dts, (&__pyx_v_6pandas_5tslib__NS_MAX_DTS)) == 1) != 0); __pyx_t_2 = __pyx_t_1; } else { __pyx_t_2 = __pyx_t_3; } if (__pyx_t_2) { /* "pandas/tslib.pyx":921 * dts.year >= 2262 and * cmp_pandas_datetimestruct(dts, &_NS_MAX_DTS) == 1): * error = True # <<<<<<<<<<<<<< * * if error: */ __pyx_v_error = 1; goto __pyx_L3; } __pyx_L3:; /* "pandas/tslib.pyx":923 * error = True * * if error: # <<<<<<<<<<<<<< * fmt = '%d-%.2d-%.2d %.2d:%.2d:%.2d' % (dts.year, dts.month, * dts.day, dts.hour, */ __pyx_t_2 = (__pyx_v_error != 0); if (__pyx_t_2) { /* "pandas/tslib.pyx":924 * * if error: * fmt = '%d-%.2d-%.2d %.2d:%.2d:%.2d' % (dts.year, dts.month, # <<<<<<<<<<<<<< * dts.day, dts.hour, * dts.min, dts.sec) */ __pyx_t_4 = __Pyx_PyInt_From_npy_int64(__pyx_v_dts->year); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 924; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyInt_From_npy_int32(__pyx_v_dts->month); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 924; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); /* "pandas/tslib.pyx":925 * if error: * fmt = '%d-%.2d-%.2d %.2d:%.2d:%.2d' % (dts.year, dts.month, * dts.day, dts.hour, # <<<<<<<<<<<<<< * dts.min, dts.sec) * */ __pyx_t_6 = __Pyx_PyInt_From_npy_int32(__pyx_v_dts->day); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 925; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = __Pyx_PyInt_From_npy_int32(__pyx_v_dts->hour); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 925; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); /* "pandas/tslib.pyx":926 * fmt = '%d-%.2d-%.2d %.2d:%.2d:%.2d' % (dts.year, dts.month, * dts.day, dts.hour, * dts.min, dts.sec) # <<<<<<<<<<<<<< * * raise OutOfBoundsDatetime('Out of bounds nanosecond timestamp: %s' % fmt) */ __pyx_t_8 = __Pyx_PyInt_From_npy_int32(__pyx_v_dts->min); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 926; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_9 = __Pyx_PyInt_From_npy_int32(__pyx_v_dts->sec); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 926; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); /* "pandas/tslib.pyx":924 * * if error: * fmt = '%d-%.2d-%.2d %.2d:%.2d:%.2d' % (dts.year, dts.month, # <<<<<<<<<<<<<< * dts.day, dts.hour, * dts.min, dts.sec) */ __pyx_t_10 = PyTuple_New(6); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 924; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_10, 2, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_10, 3, __pyx_t_7); __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_10, 4, __pyx_t_8); __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_10, 5, __pyx_t_9); __Pyx_GIVEREF(__pyx_t_9); __pyx_t_4 = 0; __pyx_t_5 = 0; __pyx_t_6 = 0; __pyx_t_7 = 0; __pyx_t_8 = 0; __pyx_t_9 = 0; __pyx_t_9 = __Pyx_PyString_Format(__pyx_kp_s_d_2d_2d_2d_2d_2d, __pyx_t_10); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 924; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_v_fmt = ((PyObject*)__pyx_t_9); __pyx_t_9 = 0; /* "pandas/tslib.pyx":928 * dts.min, dts.sec) * * raise OutOfBoundsDatetime('Out of bounds nanosecond timestamp: %s' % fmt) # <<<<<<<<<<<<<< * * # elif isinstance(ts, _Timestamp): */ __pyx_t_9 = __Pyx_GetModuleGlobalName(__pyx_n_s_OutOfBoundsDatetime); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 928; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_t_10 = __Pyx_PyString_Format(__pyx_kp_s_Out_of_bounds_nanosecond_timesta, __pyx_v_fmt); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 928; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 928; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_10); __Pyx_GIVEREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_t_10 = PyObject_Call(__pyx_t_9, __pyx_t_8, NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 928; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_Raise(__pyx_t_10, 0, 0, 0); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 928; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } /* "pandas/tslib.pyx":912 * pass * * cdef inline _check_dts_bounds(pandas_datetimestruct *dts): # <<<<<<<<<<<<<< * cdef: * bint error = False */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); __Pyx_XDECREF(__pyx_t_10); __Pyx_AddTraceback("pandas.tslib._check_dts_bounds", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_fmt); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/tslib.pyx":939 * # obj.dtval = _dts_to_pydatetime(&obj.dts) * * def datetime_to_datetime64(ndarray[object] values): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = len(values) */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5tslib_21datetime_to_datetime64(PyObject *__pyx_self, PyObject *__pyx_v_values); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5tslib_21datetime_to_datetime64 = {__Pyx_NAMESTR("datetime_to_datetime64"), (PyCFunction)__pyx_pw_6pandas_5tslib_21datetime_to_datetime64, METH_O, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5tslib_21datetime_to_datetime64(PyObject *__pyx_self, PyObject *__pyx_v_values) { CYTHON_UNUSED int __pyx_lineno = 0; CYTHON_UNUSED const char *__pyx_filename = NULL; CYTHON_UNUSED int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("datetime_to_datetime64 (wrapper)", 0); if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 939; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5tslib_20datetime_to_datetime64(__pyx_self, ((PyArrayObject *)__pyx_v_values)); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5tslib_20datetime_to_datetime64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_n; PyObject *__pyx_v_val = 0; PyObject *__pyx_v_inferred_tz = 0; PyArrayObject *__pyx_v_iresult = 0; pandas_datetimestruct __pyx_v_dts; struct __pyx_obj_6pandas_5tslib__TSObject *__pyx_v__ts = 0; PyObject *__pyx_v_result = NULL; __Pyx_LocalBuf_ND __pyx_pybuffernd_iresult; __Pyx_Buffer __pyx_pybuffer_iresult; __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; PyArrayObject *__pyx_t_6 = NULL; 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; int __pyx_t_13; __pyx_t_5numpy_int64_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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("datetime_to_datetime64", 0); __pyx_pybuffer_iresult.pybuffer.buf = NULL; __pyx_pybuffer_iresult.refcount = 0; __pyx_pybuffernd_iresult.data = NULL; __pyx_pybuffernd_iresult.rcbuffer = &__pyx_pybuffer_iresult; __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_filename = __pyx_f[0]; __pyx_lineno = 939; __pyx_clineno = __LINE__; goto __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/tslib.pyx":941 * def datetime_to_datetime64(ndarray[object] values): * cdef: * Py_ssize_t i, n = len(values) # <<<<<<<<<<<<<< * object val, inferred_tz = None * ndarray[int64_t] iresult */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 941; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/tslib.pyx":942 * cdef: * Py_ssize_t i, n = len(values) * object val, inferred_tz = None # <<<<<<<<<<<<<< * ndarray[int64_t] iresult * pandas_datetimestruct dts */ __Pyx_INCREF(Py_None); __pyx_v_inferred_tz = Py_None; /* "pandas/tslib.pyx":947 * _TSObject _ts * * result = np.empty(n, dtype='M8[ns]') # <<<<<<<<<<<<<< * iresult = result.view('i8') * for i in range(n): */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 947; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 947; __pyx_clineno = __LINE__; goto __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_n); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 947; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 947; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 947; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_dtype, __pyx_kp_s_M8_ns) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 947; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_5 = PyObject_Call(__pyx_t_3, __pyx_t_4, __pyx_t_2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 947; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_result = __pyx_t_5; __pyx_t_5 = 0; /* "pandas/tslib.pyx":948 * * result = np.empty(n, dtype='M8[ns]') * iresult = result.view('i8') # <<<<<<<<<<<<<< * for i in range(n): * val = values[i] */ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_result, __pyx_n_s_view); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 948; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_2 = PyObject_Call(__pyx_t_5, __pyx_tuple__21, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 948; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 948; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_6 = ((PyArrayObject *)__pyx_t_2); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_iresult.rcbuffer->pybuffer); __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_iresult.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_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_iresult.rcbuffer->pybuffer, (PyObject*)__pyx_v_iresult, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_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_pybuffernd_iresult.diminfo[0].strides = __pyx_pybuffernd_iresult.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_iresult.diminfo[0].shape = __pyx_pybuffernd_iresult.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 948; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_6 = 0; __pyx_v_iresult = ((PyArrayObject *)__pyx_t_2); __pyx_t_2 = 0; /* "pandas/tslib.pyx":949 * result = np.empty(n, dtype='M8[ns]') * iresult = result.view('i8') * for i in range(n): # <<<<<<<<<<<<<< * val = values[i] * if _checknull_with_nat(val): */ __pyx_t_1 = __pyx_v_n; for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_1; __pyx_t_11+=1) { __pyx_v_i = __pyx_t_11; /* "pandas/tslib.pyx":950 * iresult = result.view('i8') * for i in range(n): * val = values[i] # <<<<<<<<<<<<<< * if _checknull_with_nat(val): * iresult[i] = iNaT */ __pyx_t_12 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_12 < 0) { __pyx_t_12 += __pyx_pybuffernd_values.diminfo[0].shape; if (unlikely(__pyx_t_12 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_12 >= __pyx_pybuffernd_values.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 950; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_2 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_12, __pyx_pybuffernd_values.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_2); __Pyx_XDECREF_SET(__pyx_v_val, __pyx_t_2); __pyx_t_2 = 0; /* "pandas/tslib.pyx":951 * for i in range(n): * val = values[i] * if _checknull_with_nat(val): # <<<<<<<<<<<<<< * iresult[i] = iNaT * elif PyDateTime_Check(val): */ __pyx_t_13 = (__pyx_f_6pandas_5tslib__checknull_with_nat(__pyx_v_val) != 0); if (__pyx_t_13) { /* "pandas/tslib.pyx":952 * val = values[i] * if _checknull_with_nat(val): * iresult[i] = iNaT # <<<<<<<<<<<<<< * elif PyDateTime_Check(val): * if val.tzinfo is not None: */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_iNaT); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 952; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_14 = __Pyx_PyInt_As_npy_int64(__pyx_t_2); if (unlikely((__pyx_t_14 == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 952; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_15 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_15 < 0) { __pyx_t_15 += __pyx_pybuffernd_iresult.diminfo[0].shape; if (unlikely(__pyx_t_15 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_15 >= __pyx_pybuffernd_iresult.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 952; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_iresult.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_iresult.diminfo[0].strides) = __pyx_t_14; goto __pyx_L5; } /* "pandas/tslib.pyx":953 * if _checknull_with_nat(val): * iresult[i] = iNaT * elif PyDateTime_Check(val): # <<<<<<<<<<<<<< * if val.tzinfo is not None: * if inferred_tz is not None: */ __pyx_t_13 = (PyDateTime_Check(__pyx_v_val) != 0); if (__pyx_t_13) { /* "pandas/tslib.pyx":954 * iresult[i] = iNaT * elif PyDateTime_Check(val): * if val.tzinfo is not None: # <<<<<<<<<<<<<< * if inferred_tz is not None: * if _get_zone(val.tzinfo) != inferred_tz: */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_val, __pyx_n_s_tzinfo); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 954; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_13 = (__pyx_t_2 != Py_None); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_16 = (__pyx_t_13 != 0); if (__pyx_t_16) { /* "pandas/tslib.pyx":955 * elif PyDateTime_Check(val): * if val.tzinfo is not None: * if inferred_tz is not None: # <<<<<<<<<<<<<< * if _get_zone(val.tzinfo) != inferred_tz: * raise ValueError('Array must be all same time zone') */ __pyx_t_16 = (__pyx_v_inferred_tz != Py_None); __pyx_t_13 = (__pyx_t_16 != 0); if (__pyx_t_13) { /* "pandas/tslib.pyx":956 * if val.tzinfo is not None: * if inferred_tz is not None: * if _get_zone(val.tzinfo) != inferred_tz: # <<<<<<<<<<<<<< * raise ValueError('Array must be all same time zone') * else: */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_val, __pyx_n_s_tzinfo); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 956; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = __pyx_f_6pandas_5tslib__get_zone(__pyx_t_2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 956; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_RichCompare(__pyx_t_5, __pyx_v_inferred_tz, Py_NE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 956; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_13 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 956; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_13) { /* "pandas/tslib.pyx":957 * if inferred_tz is not None: * if _get_zone(val.tzinfo) != inferred_tz: * raise ValueError('Array must be all same time zone') # <<<<<<<<<<<<<< * else: * inferred_tz = _get_zone(val.tzinfo) */ __pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__22, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 957; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 957; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } goto __pyx_L7; } /*else*/ { /* "pandas/tslib.pyx":959 * raise ValueError('Array must be all same time zone') * else: * inferred_tz = _get_zone(val.tzinfo) # <<<<<<<<<<<<<< * * _ts = convert_to_tsobject(val, None, None) */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_val, __pyx_n_s_tzinfo); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 959; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = __pyx_f_6pandas_5tslib__get_zone(__pyx_t_2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 959; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF_SET(__pyx_v_inferred_tz, __pyx_t_5); __pyx_t_5 = 0; } __pyx_L7:; /* "pandas/tslib.pyx":961 * inferred_tz = _get_zone(val.tzinfo) * * _ts = convert_to_tsobject(val, None, None) # <<<<<<<<<<<<<< * iresult[i] = _ts.value * _check_dts_bounds(&_ts.dts) */ __pyx_t_5 = __pyx_f_6pandas_5tslib_convert_to_tsobject(__pyx_v_val, Py_None, Py_None); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 961; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_6pandas_5tslib__TSObject))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 961; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_XDECREF_SET(__pyx_v__ts, ((struct __pyx_obj_6pandas_5tslib__TSObject *)__pyx_t_5)); __pyx_t_5 = 0; /* "pandas/tslib.pyx":962 * * _ts = convert_to_tsobject(val, None, None) * iresult[i] = _ts.value # <<<<<<<<<<<<<< * _check_dts_bounds(&_ts.dts) * else: */ __pyx_t_14 = __pyx_v__ts->value; __pyx_t_17 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_17 < 0) { __pyx_t_17 += __pyx_pybuffernd_iresult.diminfo[0].shape; if (unlikely(__pyx_t_17 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_17 >= __pyx_pybuffernd_iresult.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 962; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_iresult.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_iresult.diminfo[0].strides) = __pyx_t_14; /* "pandas/tslib.pyx":963 * _ts = convert_to_tsobject(val, None, None) * iresult[i] = _ts.value * _check_dts_bounds(&_ts.dts) # <<<<<<<<<<<<<< * else: * if inferred_tz is not None: */ __pyx_t_5 = __pyx_f_6pandas_5tslib__check_dts_bounds((&__pyx_v__ts->dts)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 963; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; goto __pyx_L6; } /*else*/ { /* "pandas/tslib.pyx":965 * _check_dts_bounds(&_ts.dts) * else: * if inferred_tz is not None: # <<<<<<<<<<<<<< * raise ValueError('Cannot mix tz-aware with tz-naive values') * iresult[i] = _pydatetime_to_dts(val, &dts) */ __pyx_t_13 = (__pyx_v_inferred_tz != Py_None); __pyx_t_16 = (__pyx_t_13 != 0); if (__pyx_t_16) { /* "pandas/tslib.pyx":966 * else: * if inferred_tz is not None: * raise ValueError('Cannot mix tz-aware with tz-naive values') # <<<<<<<<<<<<<< * iresult[i] = _pydatetime_to_dts(val, &dts) * _check_dts_bounds(&dts) */ __pyx_t_5 = PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__23, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 966; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_Raise(__pyx_t_5, 0, 0, 0); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 966; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } /* "pandas/tslib.pyx":967 * if inferred_tz is not None: * raise ValueError('Cannot mix tz-aware with tz-naive values') * iresult[i] = _pydatetime_to_dts(val, &dts) # <<<<<<<<<<<<<< * _check_dts_bounds(&dts) * else: */ __pyx_t_18 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_18 < 0) { __pyx_t_18 += __pyx_pybuffernd_iresult.diminfo[0].shape; if (unlikely(__pyx_t_18 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_18 >= __pyx_pybuffernd_iresult.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 967; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_iresult.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_iresult.diminfo[0].strides) = __pyx_f_8datetime__pydatetime_to_dts(__pyx_v_val, (&__pyx_v_dts)); /* "pandas/tslib.pyx":968 * raise ValueError('Cannot mix tz-aware with tz-naive values') * iresult[i] = _pydatetime_to_dts(val, &dts) * _check_dts_bounds(&dts) # <<<<<<<<<<<<<< * else: * raise TypeError('Unrecognized value type: %s' % type(val)) */ __pyx_t_5 = __pyx_f_6pandas_5tslib__check_dts_bounds((&__pyx_v_dts)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 968; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } __pyx_L6:; goto __pyx_L5; } /*else*/ { /* "pandas/tslib.pyx":970 * _check_dts_bounds(&dts) * else: * raise TypeError('Unrecognized value type: %s' % type(val)) # <<<<<<<<<<<<<< * * return result, inferred_tz */ __pyx_t_5 = __Pyx_PyString_Format(__pyx_kp_s_Unrecognized_value_type_s, ((PyObject *)Py_TYPE(__pyx_v_val))); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 970; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 970; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyObject_Call(__pyx_builtin_TypeError, __pyx_t_2, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 970; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_Raise(__pyx_t_5, 0, 0, 0); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 970; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_L5:; } /* "pandas/tslib.pyx":972 * raise TypeError('Unrecognized value type: %s' % type(val)) * * return result, inferred_tz # <<<<<<<<<<<<<< * * _not_datelike_strings = set(['a','A','m','M','p','P','t','T']) */ __Pyx_XDECREF(__pyx_r); __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 972; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_v_result); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_result); __Pyx_GIVEREF(__pyx_v_result); __Pyx_INCREF(__pyx_v_inferred_tz); PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_v_inferred_tz); __Pyx_GIVEREF(__pyx_v_inferred_tz); __pyx_r = __pyx_t_5; __pyx_t_5 = 0; goto __pyx_L0; /* "pandas/tslib.pyx":939 * # obj.dtval = _dts_to_pydatetime(&obj.dts) * * def datetime_to_datetime64(ndarray[object] values): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = len(values) */ /* 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); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_iresult.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.tslib.datetime_to_datetime64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_iresult.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF(__pyx_v_val); __Pyx_XDECREF(__pyx_v_inferred_tz); __Pyx_XDECREF((PyObject *)__pyx_v_iresult); __Pyx_XDECREF((PyObject *)__pyx_v__ts); __Pyx_XDECREF(__pyx_v_result); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/tslib.pyx":976 * _not_datelike_strings = set(['a','A','m','M','p','P','t','T']) * * def _does_string_look_like_datetime(date_string): # <<<<<<<<<<<<<< * if date_string.startswith('0'): * # Strings starting with 0 are more consistent with a */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5tslib_23_does_string_look_like_datetime(PyObject *__pyx_self, PyObject *__pyx_v_date_string); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5tslib_23_does_string_look_like_datetime = {__Pyx_NAMESTR("_does_string_look_like_datetime"), (PyCFunction)__pyx_pw_6pandas_5tslib_23_does_string_look_like_datetime, METH_O, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5tslib_23_does_string_look_like_datetime(PyObject *__pyx_self, PyObject *__pyx_v_date_string) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_does_string_look_like_datetime (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_5tslib_22_does_string_look_like_datetime(__pyx_self, ((PyObject *)__pyx_v_date_string)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5tslib_22_does_string_look_like_datetime(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_date_string) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; double __pyx_t_7; int __pyx_t_8; int __pyx_t_9; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_does_string_look_like_datetime", 0); /* "pandas/tslib.pyx":977 * * def _does_string_look_like_datetime(date_string): * if date_string.startswith('0'): # <<<<<<<<<<<<<< * # Strings starting with 0 are more consistent with a * # date-like string than a number */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_date_string, __pyx_n_s_startswith); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 977; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyObject_Call(__pyx_t_1, __pyx_tuple__24, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 977; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 977; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_3) { /* "pandas/tslib.pyx":980 * # Strings starting with 0 are more consistent with a * # date-like string than a number * return True # <<<<<<<<<<<<<< * * try: */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(Py_True); __pyx_r = Py_True; goto __pyx_L0; } /* "pandas/tslib.pyx":982 * return True * * try: # <<<<<<<<<<<<<< * if float(date_string) < 1000: * return False */ { __Pyx_ExceptionSave(&__pyx_t_4, &__pyx_t_5, &__pyx_t_6); __Pyx_XGOTREF(__pyx_t_4); __Pyx_XGOTREF(__pyx_t_5); __Pyx_XGOTREF(__pyx_t_6); /*try:*/ { /* "pandas/tslib.pyx":983 * * try: * if float(date_string) < 1000: # <<<<<<<<<<<<<< * return False * except ValueError: */ __pyx_t_7 = __Pyx_PyObject_AsDouble(__pyx_v_date_string); if (unlikely(__pyx_t_7 == ((double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 983; __pyx_clineno = __LINE__; goto __pyx_L4_error;} __pyx_t_3 = ((__pyx_t_7 < 1000.0) != 0); if (__pyx_t_3) { /* "pandas/tslib.pyx":984 * try: * if float(date_string) < 1000: * return False # <<<<<<<<<<<<<< * except ValueError: * pass */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(Py_False); __pyx_r = Py_False; goto __pyx_L8_try_return; } } __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; goto __pyx_L11_try_end; __pyx_L4_error:; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/tslib.pyx":985 * if float(date_string) < 1000: * return False * except ValueError: # <<<<<<<<<<<<<< * pass * */ __pyx_t_8 = PyErr_ExceptionMatches(__pyx_builtin_ValueError); if (__pyx_t_8) { PyErr_Restore(0,0,0); goto __pyx_L5_exception_handled; } goto __pyx_L6_except_error; __pyx_L6_except_error:; __Pyx_XGIVEREF(__pyx_t_4); __Pyx_XGIVEREF(__pyx_t_5); __Pyx_XGIVEREF(__pyx_t_6); __Pyx_ExceptionReset(__pyx_t_4, __pyx_t_5, __pyx_t_6); goto __pyx_L1_error; __pyx_L8_try_return:; __Pyx_XGIVEREF(__pyx_t_4); __Pyx_XGIVEREF(__pyx_t_5); __Pyx_XGIVEREF(__pyx_t_6); __Pyx_ExceptionReset(__pyx_t_4, __pyx_t_5, __pyx_t_6); goto __pyx_L0; __pyx_L5_exception_handled:; __Pyx_XGIVEREF(__pyx_t_4); __Pyx_XGIVEREF(__pyx_t_5); __Pyx_XGIVEREF(__pyx_t_6); __Pyx_ExceptionReset(__pyx_t_4, __pyx_t_5, __pyx_t_6); __pyx_L11_try_end:; } /* "pandas/tslib.pyx":988 * pass * * if date_string in _not_datelike_strings: # <<<<<<<<<<<<<< * return False * */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_not_datelike_strings); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 988; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = (__Pyx_PySequence_Contains(__pyx_v_date_string, __pyx_t_2, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 988; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_9 = (__pyx_t_3 != 0); if (__pyx_t_9) { /* "pandas/tslib.pyx":989 * * if date_string in _not_datelike_strings: * return False # <<<<<<<<<<<<<< * * return True */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(Py_False); __pyx_r = Py_False; goto __pyx_L0; } /* "pandas/tslib.pyx":991 * return False * * return True # <<<<<<<<<<<<<< * * def parse_datetime_string(date_string, **kwargs): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(Py_True); __pyx_r = Py_True; goto __pyx_L0; /* "pandas/tslib.pyx":976 * _not_datelike_strings = set(['a','A','m','M','p','P','t','T']) * * def _does_string_look_like_datetime(date_string): # <<<<<<<<<<<<<< * if date_string.startswith('0'): * # Strings starting with 0 are more consistent with a */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("pandas.tslib._does_string_look_like_datetime", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/tslib.pyx":993 * return True * * def parse_datetime_string(date_string, **kwargs): # <<<<<<<<<<<<<< * if not _does_string_look_like_datetime(date_string): * raise ValueError('Given date string not likely a datetime.') */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5tslib_25parse_datetime_string(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5tslib_25parse_datetime_string = {__Pyx_NAMESTR("parse_datetime_string"), (PyCFunction)__pyx_pw_6pandas_5tslib_25parse_datetime_string, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5tslib_25parse_datetime_string(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_date_string = 0; PyObject *__pyx_v_kwargs = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("parse_datetime_string (wrapper)", 0); __pyx_v_kwargs = PyDict_New(); if (unlikely(!__pyx_v_kwargs)) return NULL; __Pyx_GOTREF(__pyx_v_kwargs); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_date_string,0}; PyObject* values[1] = {0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_date_string)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kwargs, values, pos_args, "parse_datetime_string") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 993; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); } __pyx_v_date_string = values[0]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("parse_datetime_string", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 993; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0; __Pyx_AddTraceback("pandas.tslib.parse_datetime_string", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pandas_5tslib_24parse_datetime_string(__pyx_self, __pyx_v_date_string, __pyx_v_kwargs); /* function exit code */ __Pyx_XDECREF(__pyx_v_kwargs); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5tslib_24parse_datetime_string(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_date_string, PyObject *__pyx_v_kwargs) { PyObject *__pyx_v_dt = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_t_4; int __pyx_t_5; PyObject *__pyx_t_6 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("parse_datetime_string", 0); /* "pandas/tslib.pyx":994 * * def parse_datetime_string(date_string, **kwargs): * if not _does_string_look_like_datetime(date_string): # <<<<<<<<<<<<<< * raise ValueError('Given date string not likely a datetime.') * */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_does_string_look_like_datetime); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 994; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 994; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_date_string); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_date_string); __Pyx_GIVEREF(__pyx_v_date_string); __pyx_t_3 = PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 994; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 994; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_5 = ((!__pyx_t_4) != 0); if (__pyx_t_5) { /* "pandas/tslib.pyx":995 * def parse_datetime_string(date_string, **kwargs): * if not _does_string_look_like_datetime(date_string): * raise ValueError('Given date string not likely a datetime.') # <<<<<<<<<<<<<< * * dt = parse_date(date_string, **kwargs) */ __pyx_t_3 = PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__25, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 995; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 995; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } /* "pandas/tslib.pyx":997 * raise ValueError('Given date string not likely a datetime.') * * dt = parse_date(date_string, **kwargs) # <<<<<<<<<<<<<< * return dt * */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_parse_date); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 997; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 997; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_date_string); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_date_string); __Pyx_GIVEREF(__pyx_v_date_string); __pyx_t_1 = __pyx_v_kwargs; __Pyx_INCREF(__pyx_t_1); __pyx_t_6 = PyObject_Call(__pyx_t_3, __pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 997; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_dt = __pyx_t_6; __pyx_t_6 = 0; /* "pandas/tslib.pyx":998 * * dt = parse_date(date_string, **kwargs) * return dt # <<<<<<<<<<<<<< * * def array_to_datetime(ndarray[object] values, raise_=False, dayfirst=False, */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_dt); __pyx_r = __pyx_v_dt; goto __pyx_L0; /* "pandas/tslib.pyx":993 * return True * * def parse_datetime_string(date_string, **kwargs): # <<<<<<<<<<<<<< * if not _does_string_look_like_datetime(date_string): * raise ValueError('Given date string not likely a datetime.') */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("pandas.tslib.parse_datetime_string", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_dt); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/tslib.pyx":1000 * return dt * * def array_to_datetime(ndarray[object] values, raise_=False, dayfirst=False, # <<<<<<<<<<<<<< * format=None, utc=None, coerce=False, unit=None): * cdef: */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5tslib_27array_to_datetime(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5tslib_27array_to_datetime = {__Pyx_NAMESTR("array_to_datetime"), (PyCFunction)__pyx_pw_6pandas_5tslib_27array_to_datetime, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5tslib_27array_to_datetime(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_values = 0; PyObject *__pyx_v_raise_ = 0; PyObject *__pyx_v_dayfirst = 0; CYTHON_UNUSED PyObject *__pyx_v_format = 0; PyObject *__pyx_v_utc = 0; PyObject *__pyx_v_coerce = 0; PyObject *__pyx_v_unit = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("array_to_datetime (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_values,&__pyx_n_s_raise,&__pyx_n_s_dayfirst,&__pyx_n_s_format,&__pyx_n_s_utc,&__pyx_n_s_coerce,&__pyx_n_s_unit,0}; PyObject* values[7] = {0,0,0,0,0,0,0}; values[1] = ((PyObject *)Py_False); values[2] = ((PyObject *)Py_False); /* "pandas/tslib.pyx":1001 * * def array_to_datetime(ndarray[object] values, raise_=False, dayfirst=False, * format=None, utc=None, coerce=False, unit=None): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = len(values) */ values[3] = ((PyObject *)Py_None); values[4] = ((PyObject *)Py_None); values[5] = ((PyObject *)Py_False); values[6] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6); case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5); case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_values)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_raise); if (value) { values[1] = value; kw_args--; } } case 2: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_dayfirst); if (value) { values[2] = value; kw_args--; } } case 3: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_format); if (value) { values[3] = value; kw_args--; } } case 4: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_utc); if (value) { values[4] = value; kw_args--; } } case 5: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_coerce); if (value) { values[5] = value; kw_args--; } } case 6: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_unit); if (value) { values[6] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "array_to_datetime") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1000; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6); case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5); case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_values = ((PyArrayObject *)values[0]); __pyx_v_raise_ = values[1]; __pyx_v_dayfirst = values[2]; __pyx_v_format = values[3]; __pyx_v_utc = values[4]; __pyx_v_coerce = values[5]; __pyx_v_unit = values[6]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("array_to_datetime", 0, 1, 7, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1000; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.tslib.array_to_datetime", __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_filename = __pyx_f[0]; __pyx_lineno = 1000; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5tslib_26array_to_datetime(__pyx_self, __pyx_v_values, __pyx_v_raise_, __pyx_v_dayfirst, __pyx_v_format, __pyx_v_utc, __pyx_v_coerce, __pyx_v_unit); /* "pandas/tslib.pyx":1000 * return dt * * def array_to_datetime(ndarray[object] values, raise_=False, dayfirst=False, # <<<<<<<<<<<<<< * format=None, utc=None, coerce=False, unit=None): * cdef: */ /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5tslib_26array_to_datetime(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyObject *__pyx_v_raise_, PyObject *__pyx_v_dayfirst, CYTHON_UNUSED PyObject *__pyx_v_format, PyObject *__pyx_v_utc, PyObject *__pyx_v_coerce, PyObject *__pyx_v_unit) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_n; PyObject *__pyx_v_val = 0; PyArrayObject *__pyx_v_iresult = 0; PyArrayObject *__pyx_v_oresult = 0; pandas_datetimestruct __pyx_v_dts; int __pyx_v_utc_convert; int __pyx_v_seen_integer; int __pyx_v_seen_datetime; struct __pyx_obj_6pandas_5tslib__TSObject *__pyx_v__ts = 0; __pyx_t_5numpy_int64_t __pyx_v_m; PyObject *__pyx_v_result = NULL; __Pyx_LocalBuf_ND __pyx_pybuffernd_iresult; __Pyx_Buffer __pyx_pybuffer_iresult; __Pyx_LocalBuf_ND __pyx_pybuffernd_oresult; __Pyx_Buffer __pyx_pybuffer_oresult; __Pyx_LocalBuf_ND __pyx_pybuffernd_values; __Pyx_Buffer __pyx_pybuffer_values; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; int __pyx_t_2; __pyx_t_5numpy_int64_t __pyx_t_3; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; PyArrayObject *__pyx_t_11 = NULL; int __pyx_t_12; PyObject *__pyx_t_13 = NULL; PyObject *__pyx_t_14 = NULL; PyObject *__pyx_t_15 = NULL; Py_ssize_t __pyx_t_16; Py_ssize_t __pyx_t_17; Py_ssize_t __pyx_t_18; int __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; int __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; Py_ssize_t __pyx_t_37; PyObject *__pyx_t_38 = NULL; PyObject *__pyx_t_39 = NULL; PyObject *__pyx_t_40 = NULL; PyObject *__pyx_t_41 = NULL; PyObject *__pyx_t_42 = NULL; PyObject *__pyx_t_43 = NULL; Py_ssize_t __pyx_t_44; Py_ssize_t __pyx_t_45; Py_ssize_t __pyx_t_46; Py_ssize_t __pyx_t_47; PyArrayObject *__pyx_t_48 = NULL; Py_ssize_t __pyx_t_49; Py_ssize_t __pyx_t_50; PyObject **__pyx_t_51; Py_ssize_t __pyx_t_52; Py_ssize_t __pyx_t_53; Py_ssize_t __pyx_t_54; Py_ssize_t __pyx_t_55; Py_ssize_t __pyx_t_56; Py_ssize_t __pyx_t_57; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("array_to_datetime", 0); __pyx_pybuffer_iresult.pybuffer.buf = NULL; __pyx_pybuffer_iresult.refcount = 0; __pyx_pybuffernd_iresult.data = NULL; __pyx_pybuffernd_iresult.rcbuffer = &__pyx_pybuffer_iresult; __pyx_pybuffer_oresult.pybuffer.buf = NULL; __pyx_pybuffer_oresult.refcount = 0; __pyx_pybuffernd_oresult.data = NULL; __pyx_pybuffernd_oresult.rcbuffer = &__pyx_pybuffer_oresult; __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_filename = __pyx_f[0]; __pyx_lineno = 1000; __pyx_clineno = __LINE__; goto __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/tslib.pyx":1003 * format=None, utc=None, coerce=False, unit=None): * cdef: * Py_ssize_t i, n = len(values) # <<<<<<<<<<<<<< * object val * ndarray[int64_t] iresult */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1003; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/tslib.pyx":1008 * ndarray[object] oresult * pandas_datetimestruct dts * bint utc_convert = bool(utc), seen_integer=0, seen_datetime=0 # <<<<<<<<<<<<<< * _TSObject _ts * int64_t m = cast_from_unit(None,unit) */ __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_utc); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1008; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_utc_convert = (!(!__pyx_t_2)); __pyx_v_seen_integer = 0; __pyx_v_seen_datetime = 0; /* "pandas/tslib.pyx":1010 * bint utc_convert = bool(utc), seen_integer=0, seen_datetime=0 * _TSObject _ts * int64_t m = cast_from_unit(None,unit) # <<<<<<<<<<<<<< * * try: */ __pyx_t_3 = __pyx_f_6pandas_5tslib_cast_from_unit(Py_None, __pyx_v_unit, 0); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1010; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_m = __pyx_t_3; /* "pandas/tslib.pyx":1012 * int64_t m = cast_from_unit(None,unit) * * try: # <<<<<<<<<<<<<< * result = np.empty(n, dtype='M8[ns]') * iresult = result.view('i8') */ { __Pyx_ExceptionSave(&__pyx_t_4, &__pyx_t_5, &__pyx_t_6); __Pyx_XGOTREF(__pyx_t_4); __Pyx_XGOTREF(__pyx_t_5); __Pyx_XGOTREF(__pyx_t_6); /*try:*/ { /* "pandas/tslib.pyx":1013 * * try: * result = np.empty(n, dtype='M8[ns]') # <<<<<<<<<<<<<< * iresult = result.view('i8') * for i in range(n): */ __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1013; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_empty); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1013; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_7 = PyInt_FromSsize_t(__pyx_v_n); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1013; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1013; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7); __Pyx_GIVEREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_7 = PyDict_New(); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1013; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_7); if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_dtype, __pyx_kp_s_M8_ns) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1013; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_t_10 = PyObject_Call(__pyx_t_8, __pyx_t_9, __pyx_t_7); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1013; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_v_result = __pyx_t_10; __pyx_t_10 = 0; /* "pandas/tslib.pyx":1014 * try: * result = np.empty(n, dtype='M8[ns]') * iresult = result.view('i8') # <<<<<<<<<<<<<< * for i in range(n): * val = values[i] */ __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_result, __pyx_n_s_view); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1014; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_10); __pyx_t_7 = PyObject_Call(__pyx_t_10, __pyx_tuple__26, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1014; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; if (!(likely(((__pyx_t_7) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_7, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1014; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_t_11 = ((PyArrayObject *)__pyx_t_7); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_iresult.rcbuffer->pybuffer); __pyx_t_12 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_iresult.rcbuffer->pybuffer, (PyObject*)__pyx_t_11, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_12 < 0)) { PyErr_Fetch(&__pyx_t_13, &__pyx_t_14, &__pyx_t_15); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_iresult.rcbuffer->pybuffer, (PyObject*)__pyx_v_iresult, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_13); Py_XDECREF(__pyx_t_14); Py_XDECREF(__pyx_t_15); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_13, __pyx_t_14, __pyx_t_15); } } __pyx_pybuffernd_iresult.diminfo[0].strides = __pyx_pybuffernd_iresult.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_iresult.diminfo[0].shape = __pyx_pybuffernd_iresult.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_12 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1014; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } __pyx_t_11 = 0; __pyx_v_iresult = ((PyArrayObject *)__pyx_t_7); __pyx_t_7 = 0; /* "pandas/tslib.pyx":1015 * result = np.empty(n, dtype='M8[ns]') * iresult = result.view('i8') * for i in range(n): # <<<<<<<<<<<<<< * val = values[i] * if _checknull_with_nat(val): */ __pyx_t_1 = __pyx_v_n; for (__pyx_t_16 = 0; __pyx_t_16 < __pyx_t_1; __pyx_t_16+=1) { __pyx_v_i = __pyx_t_16; /* "pandas/tslib.pyx":1016 * iresult = result.view('i8') * for i in range(n): * val = values[i] # <<<<<<<<<<<<<< * if _checknull_with_nat(val): * iresult[i] = iNaT */ __pyx_t_17 = __pyx_v_i; __pyx_t_12 = -1; if (__pyx_t_17 < 0) { __pyx_t_17 += __pyx_pybuffernd_values.diminfo[0].shape; if (unlikely(__pyx_t_17 < 0)) __pyx_t_12 = 0; } else if (unlikely(__pyx_t_17 >= __pyx_pybuffernd_values.diminfo[0].shape)) __pyx_t_12 = 0; if (unlikely(__pyx_t_12 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_12); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1016; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } __pyx_t_7 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_values.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_7); __Pyx_XDECREF_SET(__pyx_v_val, __pyx_t_7); __pyx_t_7 = 0; /* "pandas/tslib.pyx":1017 * for i in range(n): * val = values[i] * if _checknull_with_nat(val): # <<<<<<<<<<<<<< * iresult[i] = iNaT * elif PyDateTime_Check(val): */ __pyx_t_2 = (__pyx_f_6pandas_5tslib__checknull_with_nat(__pyx_v_val) != 0); if (__pyx_t_2) { /* "pandas/tslib.pyx":1018 * val = values[i] * if _checknull_with_nat(val): * iresult[i] = iNaT # <<<<<<<<<<<<<< * elif PyDateTime_Check(val): * seen_datetime=1 */ __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_iNaT); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1018; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_t_3 = __Pyx_PyInt_As_npy_int64(__pyx_t_7); if (unlikely((__pyx_t_3 == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1018; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_18 = __pyx_v_i; __pyx_t_12 = -1; if (__pyx_t_18 < 0) { __pyx_t_18 += __pyx_pybuffernd_iresult.diminfo[0].shape; if (unlikely(__pyx_t_18 < 0)) __pyx_t_12 = 0; } else if (unlikely(__pyx_t_18 >= __pyx_pybuffernd_iresult.diminfo[0].shape)) __pyx_t_12 = 0; if (unlikely(__pyx_t_12 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_12); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1018; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_iresult.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_iresult.diminfo[0].strides) = __pyx_t_3; goto __pyx_L13; } /* "pandas/tslib.pyx":1019 * if _checknull_with_nat(val): * iresult[i] = iNaT * elif PyDateTime_Check(val): # <<<<<<<<<<<<<< * seen_datetime=1 * if val.tzinfo is not None: */ __pyx_t_2 = (PyDateTime_Check(__pyx_v_val) != 0); if (__pyx_t_2) { /* "pandas/tslib.pyx":1020 * iresult[i] = iNaT * elif PyDateTime_Check(val): * seen_datetime=1 # <<<<<<<<<<<<<< * if val.tzinfo is not None: * if utc_convert: */ __pyx_v_seen_datetime = 1; /* "pandas/tslib.pyx":1021 * elif PyDateTime_Check(val): * seen_datetime=1 * if val.tzinfo is not None: # <<<<<<<<<<<<<< * if utc_convert: * _ts = convert_to_tsobject(val, None, unit) */ __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_val, __pyx_n_s_tzinfo); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1021; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_t_2 = (__pyx_t_7 != Py_None); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_19 = (__pyx_t_2 != 0); if (__pyx_t_19) { /* "pandas/tslib.pyx":1022 * seen_datetime=1 * if val.tzinfo is not None: * if utc_convert: # <<<<<<<<<<<<<< * _ts = convert_to_tsobject(val, None, unit) * iresult[i] = _ts.value */ __pyx_t_19 = (__pyx_v_utc_convert != 0); if (__pyx_t_19) { /* "pandas/tslib.pyx":1023 * if val.tzinfo is not None: * if utc_convert: * _ts = convert_to_tsobject(val, None, unit) # <<<<<<<<<<<<<< * iresult[i] = _ts.value * try: */ __pyx_t_7 = __pyx_f_6pandas_5tslib_convert_to_tsobject(__pyx_v_val, Py_None, __pyx_v_unit); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1023; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_7); if (!(likely(((__pyx_t_7) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_7, __pyx_ptype_6pandas_5tslib__TSObject))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1023; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_XDECREF_SET(__pyx_v__ts, ((struct __pyx_obj_6pandas_5tslib__TSObject *)__pyx_t_7)); __pyx_t_7 = 0; /* "pandas/tslib.pyx":1024 * if utc_convert: * _ts = convert_to_tsobject(val, None, unit) * iresult[i] = _ts.value # <<<<<<<<<<<<<< * try: * _check_dts_bounds(&_ts.dts) */ __pyx_t_3 = __pyx_v__ts->value; __pyx_t_20 = __pyx_v_i; __pyx_t_12 = -1; if (__pyx_t_20 < 0) { __pyx_t_20 += __pyx_pybuffernd_iresult.diminfo[0].shape; if (unlikely(__pyx_t_20 < 0)) __pyx_t_12 = 0; } else if (unlikely(__pyx_t_20 >= __pyx_pybuffernd_iresult.diminfo[0].shape)) __pyx_t_12 = 0; if (unlikely(__pyx_t_12 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_12); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1024; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_iresult.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_iresult.diminfo[0].strides) = __pyx_t_3; /* "pandas/tslib.pyx":1025 * _ts = convert_to_tsobject(val, None, unit) * iresult[i] = _ts.value * try: # <<<<<<<<<<<<<< * _check_dts_bounds(&_ts.dts) * except ValueError: */ { __Pyx_ExceptionSave(&__pyx_t_15, &__pyx_t_14, &__pyx_t_13); __Pyx_XGOTREF(__pyx_t_15); __Pyx_XGOTREF(__pyx_t_14); __Pyx_XGOTREF(__pyx_t_13); /*try:*/ { /* "pandas/tslib.pyx":1026 * iresult[i] = _ts.value * try: * _check_dts_bounds(&_ts.dts) # <<<<<<<<<<<<<< * except ValueError: * if coerce: */ __pyx_t_7 = __pyx_f_6pandas_5tslib__check_dts_bounds((&__pyx_v__ts->dts)); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1026; __pyx_clineno = __LINE__; goto __pyx_L16_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0; __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; goto __pyx_L23_try_end; __pyx_L16_error:; __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; /* "pandas/tslib.pyx":1027 * try: * _check_dts_bounds(&_ts.dts) * except ValueError: # <<<<<<<<<<<<<< * if coerce: * iresult[i] = iNaT */ __pyx_t_12 = PyErr_ExceptionMatches(__pyx_builtin_ValueError); if (__pyx_t_12) { __Pyx_AddTraceback("pandas.tslib.array_to_datetime", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_7, &__pyx_t_10, &__pyx_t_9) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1027; __pyx_clineno = __LINE__; goto __pyx_L18_except_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_GOTREF(__pyx_t_10); __Pyx_GOTREF(__pyx_t_9); /* "pandas/tslib.pyx":1028 * _check_dts_bounds(&_ts.dts) * except ValueError: * if coerce: # <<<<<<<<<<<<<< * iresult[i] = iNaT * continue */ __pyx_t_19 = __Pyx_PyObject_IsTrue(__pyx_v_coerce); if (unlikely(__pyx_t_19 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1028; __pyx_clineno = __LINE__; goto __pyx_L18_except_error;} if (__pyx_t_19) { /* "pandas/tslib.pyx":1029 * except ValueError: * if coerce: * iresult[i] = iNaT # <<<<<<<<<<<<<< * continue * raise */ __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_iNaT); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1029; __pyx_clineno = __LINE__; goto __pyx_L18_except_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_3 = __Pyx_PyInt_As_npy_int64(__pyx_t_8); if (unlikely((__pyx_t_3 == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1029; __pyx_clineno = __LINE__; goto __pyx_L18_except_error;} __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_21 = __pyx_v_i; __pyx_t_12 = -1; if (__pyx_t_21 < 0) { __pyx_t_21 += __pyx_pybuffernd_iresult.diminfo[0].shape; if (unlikely(__pyx_t_21 < 0)) __pyx_t_12 = 0; } else if (unlikely(__pyx_t_21 >= __pyx_pybuffernd_iresult.diminfo[0].shape)) __pyx_t_12 = 0; if (unlikely(__pyx_t_12 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_12); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1029; __pyx_clineno = __LINE__; goto __pyx_L18_except_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_iresult.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_iresult.diminfo[0].strides) = __pyx_t_3; /* "pandas/tslib.pyx":1030 * if coerce: * iresult[i] = iNaT * continue # <<<<<<<<<<<<<< * raise * else: */ goto __pyx_L25_except_continue; } /* "pandas/tslib.pyx":1031 * iresult[i] = iNaT * continue * raise # <<<<<<<<<<<<<< * else: * raise ValueError('Tz-aware datetime.datetime cannot ' */ __Pyx_GIVEREF(__pyx_t_7); __Pyx_GIVEREF(__pyx_t_10); __Pyx_XGIVEREF(__pyx_t_9); __Pyx_ErrRestore(__pyx_t_7, __pyx_t_10, __pyx_t_9); __pyx_t_7 = 0; __pyx_t_10 = 0; __pyx_t_9 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1031; __pyx_clineno = __LINE__; goto __pyx_L18_except_error;} __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; goto __pyx_L17_exception_handled; __pyx_L25_except_continue:; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; goto __pyx_L22_try_continue; } goto __pyx_L18_except_error; __pyx_L18_except_error:; __Pyx_XGIVEREF(__pyx_t_15); __Pyx_XGIVEREF(__pyx_t_14); __Pyx_XGIVEREF(__pyx_t_13); __Pyx_ExceptionReset(__pyx_t_15, __pyx_t_14, __pyx_t_13); goto __pyx_L3_error; __pyx_L22_try_continue:; __Pyx_XGIVEREF(__pyx_t_15); __Pyx_XGIVEREF(__pyx_t_14); __Pyx_XGIVEREF(__pyx_t_13); __Pyx_ExceptionReset(__pyx_t_15, __pyx_t_14, __pyx_t_13); goto __pyx_L11_continue; __pyx_L17_exception_handled:; __Pyx_XGIVEREF(__pyx_t_15); __Pyx_XGIVEREF(__pyx_t_14); __Pyx_XGIVEREF(__pyx_t_13); __Pyx_ExceptionReset(__pyx_t_15, __pyx_t_14, __pyx_t_13); __pyx_L23_try_end:; } goto __pyx_L15; } /*else*/ { /* "pandas/tslib.pyx":1033 * raise * else: * raise ValueError('Tz-aware datetime.datetime cannot ' # <<<<<<<<<<<<<< * 'be converted to datetime64 unless ' * 'utc=True') */ __pyx_t_9 = PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__27, NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1033; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_Raise(__pyx_t_9, 0, 0, 0); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1033; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } __pyx_L15:; goto __pyx_L14; } /*else*/ { /* "pandas/tslib.pyx":1037 * 'utc=True') * else: * iresult[i] = _pydatetime_to_dts(val, &dts) # <<<<<<<<<<<<<< * if is_timestamp(val): * iresult[i] += (<_Timestamp>val).nanosecond */ __pyx_t_22 = __pyx_v_i; __pyx_t_12 = -1; if (__pyx_t_22 < 0) { __pyx_t_22 += __pyx_pybuffernd_iresult.diminfo[0].shape; if (unlikely(__pyx_t_22 < 0)) __pyx_t_12 = 0; } else if (unlikely(__pyx_t_22 >= __pyx_pybuffernd_iresult.diminfo[0].shape)) __pyx_t_12 = 0; if (unlikely(__pyx_t_12 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_12); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1037; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_iresult.rcbuffer->pybuffer.buf, __pyx_t_22, __pyx_pybuffernd_iresult.diminfo[0].strides) = __pyx_f_8datetime__pydatetime_to_dts(__pyx_v_val, (&__pyx_v_dts)); /* "pandas/tslib.pyx":1038 * else: * iresult[i] = _pydatetime_to_dts(val, &dts) * if is_timestamp(val): # <<<<<<<<<<<<<< * iresult[i] += (<_Timestamp>val).nanosecond * try: */ __pyx_t_19 = (__pyx_f_6pandas_5tslib_is_timestamp(__pyx_v_val) != 0); if (__pyx_t_19) { /* "pandas/tslib.pyx":1039 * iresult[i] = _pydatetime_to_dts(val, &dts) * if is_timestamp(val): * iresult[i] += (<_Timestamp>val).nanosecond # <<<<<<<<<<<<<< * try: * _check_dts_bounds(&dts) */ __pyx_t_23 = __pyx_v_i; __pyx_t_12 = -1; if (__pyx_t_23 < 0) { __pyx_t_23 += __pyx_pybuffernd_iresult.diminfo[0].shape; if (unlikely(__pyx_t_23 < 0)) __pyx_t_12 = 0; } else if (unlikely(__pyx_t_23 >= __pyx_pybuffernd_iresult.diminfo[0].shape)) __pyx_t_12 = 0; if (unlikely(__pyx_t_12 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_12); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1039; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_iresult.rcbuffer->pybuffer.buf, __pyx_t_23, __pyx_pybuffernd_iresult.diminfo[0].strides) += ((struct __pyx_obj_6pandas_5tslib__Timestamp *)__pyx_v_val)->nanosecond; goto __pyx_L27; } __pyx_L27:; /* "pandas/tslib.pyx":1040 * if is_timestamp(val): * iresult[i] += (<_Timestamp>val).nanosecond * try: # <<<<<<<<<<<<<< * _check_dts_bounds(&dts) * except ValueError: */ { __Pyx_ExceptionSave(&__pyx_t_13, &__pyx_t_14, &__pyx_t_15); __Pyx_XGOTREF(__pyx_t_13); __Pyx_XGOTREF(__pyx_t_14); __Pyx_XGOTREF(__pyx_t_15); /*try:*/ { /* "pandas/tslib.pyx":1041 * iresult[i] += (<_Timestamp>val).nanosecond * try: * _check_dts_bounds(&dts) # <<<<<<<<<<<<<< * except ValueError: * if coerce: */ __pyx_t_9 = __pyx_f_6pandas_5tslib__check_dts_bounds((&__pyx_v_dts)); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1041; __pyx_clineno = __LINE__; goto __pyx_L28_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; } __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0; goto __pyx_L35_try_end; __pyx_L28_error:; __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; /* "pandas/tslib.pyx":1042 * try: * _check_dts_bounds(&dts) * except ValueError: # <<<<<<<<<<<<<< * if coerce: * iresult[i] = iNaT */ __pyx_t_12 = PyErr_ExceptionMatches(__pyx_builtin_ValueError); if (__pyx_t_12) { __Pyx_AddTraceback("pandas.tslib.array_to_datetime", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_9, &__pyx_t_10, &__pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1042; __pyx_clineno = __LINE__; goto __pyx_L30_except_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_GOTREF(__pyx_t_10); __Pyx_GOTREF(__pyx_t_7); /* "pandas/tslib.pyx":1043 * _check_dts_bounds(&dts) * except ValueError: * if coerce: # <<<<<<<<<<<<<< * iresult[i] = iNaT * continue */ __pyx_t_19 = __Pyx_PyObject_IsTrue(__pyx_v_coerce); if (unlikely(__pyx_t_19 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1043; __pyx_clineno = __LINE__; goto __pyx_L30_except_error;} if (__pyx_t_19) { /* "pandas/tslib.pyx":1044 * except ValueError: * if coerce: * iresult[i] = iNaT # <<<<<<<<<<<<<< * continue * raise */ __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_iNaT); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1044; __pyx_clineno = __LINE__; goto __pyx_L30_except_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_3 = __Pyx_PyInt_As_npy_int64(__pyx_t_8); if (unlikely((__pyx_t_3 == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1044; __pyx_clineno = __LINE__; goto __pyx_L30_except_error;} __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_24 = __pyx_v_i; __pyx_t_12 = -1; if (__pyx_t_24 < 0) { __pyx_t_24 += __pyx_pybuffernd_iresult.diminfo[0].shape; if (unlikely(__pyx_t_24 < 0)) __pyx_t_12 = 0; } else if (unlikely(__pyx_t_24 >= __pyx_pybuffernd_iresult.diminfo[0].shape)) __pyx_t_12 = 0; if (unlikely(__pyx_t_12 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_12); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1044; __pyx_clineno = __LINE__; goto __pyx_L30_except_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_iresult.rcbuffer->pybuffer.buf, __pyx_t_24, __pyx_pybuffernd_iresult.diminfo[0].strides) = __pyx_t_3; /* "pandas/tslib.pyx":1045 * if coerce: * iresult[i] = iNaT * continue # <<<<<<<<<<<<<< * raise * elif PyDate_Check(val): */ goto __pyx_L37_except_continue; } /* "pandas/tslib.pyx":1046 * iresult[i] = iNaT * continue * raise # <<<<<<<<<<<<<< * elif PyDate_Check(val): * iresult[i] = _date_to_datetime64(val, &dts) */ __Pyx_GIVEREF(__pyx_t_9); __Pyx_GIVEREF(__pyx_t_10); __Pyx_XGIVEREF(__pyx_t_7); __Pyx_ErrRestore(__pyx_t_9, __pyx_t_10, __pyx_t_7); __pyx_t_9 = 0; __pyx_t_10 = 0; __pyx_t_7 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1046; __pyx_clineno = __LINE__; goto __pyx_L30_except_error;} __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; goto __pyx_L29_exception_handled; __pyx_L37_except_continue:; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; goto __pyx_L34_try_continue; } goto __pyx_L30_except_error; __pyx_L30_except_error:; __Pyx_XGIVEREF(__pyx_t_13); __Pyx_XGIVEREF(__pyx_t_14); __Pyx_XGIVEREF(__pyx_t_15); __Pyx_ExceptionReset(__pyx_t_13, __pyx_t_14, __pyx_t_15); goto __pyx_L3_error; __pyx_L34_try_continue:; __Pyx_XGIVEREF(__pyx_t_13); __Pyx_XGIVEREF(__pyx_t_14); __Pyx_XGIVEREF(__pyx_t_15); __Pyx_ExceptionReset(__pyx_t_13, __pyx_t_14, __pyx_t_15); goto __pyx_L11_continue; __pyx_L29_exception_handled:; __Pyx_XGIVEREF(__pyx_t_13); __Pyx_XGIVEREF(__pyx_t_14); __Pyx_XGIVEREF(__pyx_t_15); __Pyx_ExceptionReset(__pyx_t_13, __pyx_t_14, __pyx_t_15); __pyx_L35_try_end:; } } __pyx_L14:; goto __pyx_L13; } /* "pandas/tslib.pyx":1047 * continue * raise * elif PyDate_Check(val): # <<<<<<<<<<<<<< * iresult[i] = _date_to_datetime64(val, &dts) * try: */ __pyx_t_19 = (PyDate_Check(__pyx_v_val) != 0); if (__pyx_t_19) { /* "pandas/tslib.pyx":1048 * raise * elif PyDate_Check(val): * iresult[i] = _date_to_datetime64(val, &dts) # <<<<<<<<<<<<<< * try: * _check_dts_bounds(&dts) */ __pyx_t_25 = __pyx_v_i; __pyx_t_12 = -1; if (__pyx_t_25 < 0) { __pyx_t_25 += __pyx_pybuffernd_iresult.diminfo[0].shape; if (unlikely(__pyx_t_25 < 0)) __pyx_t_12 = 0; } else if (unlikely(__pyx_t_25 >= __pyx_pybuffernd_iresult.diminfo[0].shape)) __pyx_t_12 = 0; if (unlikely(__pyx_t_12 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_12); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1048; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_iresult.rcbuffer->pybuffer.buf, __pyx_t_25, __pyx_pybuffernd_iresult.diminfo[0].strides) = __pyx_f_8datetime__date_to_datetime64(__pyx_v_val, (&__pyx_v_dts)); /* "pandas/tslib.pyx":1049 * elif PyDate_Check(val): * iresult[i] = _date_to_datetime64(val, &dts) * try: # <<<<<<<<<<<<<< * _check_dts_bounds(&dts) * seen_datetime=1 */ { __Pyx_ExceptionSave(&__pyx_t_15, &__pyx_t_14, &__pyx_t_13); __Pyx_XGOTREF(__pyx_t_15); __Pyx_XGOTREF(__pyx_t_14); __Pyx_XGOTREF(__pyx_t_13); /*try:*/ { /* "pandas/tslib.pyx":1050 * iresult[i] = _date_to_datetime64(val, &dts) * try: * _check_dts_bounds(&dts) # <<<<<<<<<<<<<< * seen_datetime=1 * except ValueError: */ __pyx_t_7 = __pyx_f_6pandas_5tslib__check_dts_bounds((&__pyx_v_dts)); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1050; __pyx_clineno = __LINE__; goto __pyx_L39_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; /* "pandas/tslib.pyx":1051 * try: * _check_dts_bounds(&dts) * seen_datetime=1 # <<<<<<<<<<<<<< * except ValueError: * if coerce: */ __pyx_v_seen_datetime = 1; } __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0; __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; goto __pyx_L46_try_end; __pyx_L39_error:; __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; /* "pandas/tslib.pyx":1052 * _check_dts_bounds(&dts) * seen_datetime=1 * except ValueError: # <<<<<<<<<<<<<< * if coerce: * iresult[i] = iNaT */ __pyx_t_12 = PyErr_ExceptionMatches(__pyx_builtin_ValueError); if (__pyx_t_12) { __Pyx_AddTraceback("pandas.tslib.array_to_datetime", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_7, &__pyx_t_10, &__pyx_t_9) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1052; __pyx_clineno = __LINE__; goto __pyx_L41_except_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_GOTREF(__pyx_t_10); __Pyx_GOTREF(__pyx_t_9); /* "pandas/tslib.pyx":1053 * seen_datetime=1 * except ValueError: * if coerce: # <<<<<<<<<<<<<< * iresult[i] = iNaT * continue */ __pyx_t_19 = __Pyx_PyObject_IsTrue(__pyx_v_coerce); if (unlikely(__pyx_t_19 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1053; __pyx_clineno = __LINE__; goto __pyx_L41_except_error;} if (__pyx_t_19) { /* "pandas/tslib.pyx":1054 * except ValueError: * if coerce: * iresult[i] = iNaT # <<<<<<<<<<<<<< * continue * raise */ __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_iNaT); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1054; __pyx_clineno = __LINE__; goto __pyx_L41_except_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_3 = __Pyx_PyInt_As_npy_int64(__pyx_t_8); if (unlikely((__pyx_t_3 == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1054; __pyx_clineno = __LINE__; goto __pyx_L41_except_error;} __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_26 = __pyx_v_i; __pyx_t_12 = -1; if (__pyx_t_26 < 0) { __pyx_t_26 += __pyx_pybuffernd_iresult.diminfo[0].shape; if (unlikely(__pyx_t_26 < 0)) __pyx_t_12 = 0; } else if (unlikely(__pyx_t_26 >= __pyx_pybuffernd_iresult.diminfo[0].shape)) __pyx_t_12 = 0; if (unlikely(__pyx_t_12 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_12); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1054; __pyx_clineno = __LINE__; goto __pyx_L41_except_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_iresult.rcbuffer->pybuffer.buf, __pyx_t_26, __pyx_pybuffernd_iresult.diminfo[0].strides) = __pyx_t_3; /* "pandas/tslib.pyx":1055 * if coerce: * iresult[i] = iNaT * continue # <<<<<<<<<<<<<< * raise * elif util.is_datetime64_object(val): */ goto __pyx_L48_except_continue; } /* "pandas/tslib.pyx":1056 * iresult[i] = iNaT * continue * raise # <<<<<<<<<<<<<< * elif util.is_datetime64_object(val): * if val == np_NaT: */ __Pyx_GIVEREF(__pyx_t_7); __Pyx_GIVEREF(__pyx_t_10); __Pyx_XGIVEREF(__pyx_t_9); __Pyx_ErrRestore(__pyx_t_7, __pyx_t_10, __pyx_t_9); __pyx_t_7 = 0; __pyx_t_10 = 0; __pyx_t_9 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1056; __pyx_clineno = __LINE__; goto __pyx_L41_except_error;} __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; goto __pyx_L40_exception_handled; __pyx_L48_except_continue:; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; goto __pyx_L45_try_continue; } goto __pyx_L41_except_error; __pyx_L41_except_error:; __Pyx_XGIVEREF(__pyx_t_15); __Pyx_XGIVEREF(__pyx_t_14); __Pyx_XGIVEREF(__pyx_t_13); __Pyx_ExceptionReset(__pyx_t_15, __pyx_t_14, __pyx_t_13); goto __pyx_L3_error; __pyx_L45_try_continue:; __Pyx_XGIVEREF(__pyx_t_15); __Pyx_XGIVEREF(__pyx_t_14); __Pyx_XGIVEREF(__pyx_t_13); __Pyx_ExceptionReset(__pyx_t_15, __pyx_t_14, __pyx_t_13); goto __pyx_L11_continue; __pyx_L40_exception_handled:; __Pyx_XGIVEREF(__pyx_t_15); __Pyx_XGIVEREF(__pyx_t_14); __Pyx_XGIVEREF(__pyx_t_13); __Pyx_ExceptionReset(__pyx_t_15, __pyx_t_14, __pyx_t_13); __pyx_L46_try_end:; } goto __pyx_L13; } /* "pandas/tslib.pyx":1057 * continue * raise * elif util.is_datetime64_object(val): # <<<<<<<<<<<<<< * if val == np_NaT: * iresult[i] = iNaT */ __pyx_t_19 = (is_datetime64_object(__pyx_v_val) != 0); if (__pyx_t_19) { /* "pandas/tslib.pyx":1058 * raise * elif util.is_datetime64_object(val): * if val == np_NaT: # <<<<<<<<<<<<<< * iresult[i] = iNaT * else: */ __pyx_t_9 = __Pyx_GetModuleGlobalName(__pyx_n_s_np_NaT); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1058; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_t_10 = PyObject_RichCompare(__pyx_v_val, __pyx_t_9, Py_EQ); __Pyx_XGOTREF(__pyx_t_10); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1058; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_19 = __Pyx_PyObject_IsTrue(__pyx_t_10); if (unlikely(__pyx_t_19 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1058; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; if (__pyx_t_19) { /* "pandas/tslib.pyx":1059 * elif util.is_datetime64_object(val): * if val == np_NaT: * iresult[i] = iNaT # <<<<<<<<<<<<<< * else: * try: */ __pyx_t_10 = __Pyx_GetModuleGlobalName(__pyx_n_s_iNaT); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1059; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_10); __pyx_t_3 = __Pyx_PyInt_As_npy_int64(__pyx_t_10); if (unlikely((__pyx_t_3 == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1059; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_t_27 = __pyx_v_i; __pyx_t_12 = -1; if (__pyx_t_27 < 0) { __pyx_t_27 += __pyx_pybuffernd_iresult.diminfo[0].shape; if (unlikely(__pyx_t_27 < 0)) __pyx_t_12 = 0; } else if (unlikely(__pyx_t_27 >= __pyx_pybuffernd_iresult.diminfo[0].shape)) __pyx_t_12 = 0; if (unlikely(__pyx_t_12 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_12); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1059; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_iresult.rcbuffer->pybuffer.buf, __pyx_t_27, __pyx_pybuffernd_iresult.diminfo[0].strides) = __pyx_t_3; goto __pyx_L50; } /*else*/ { /* "pandas/tslib.pyx":1061 * iresult[i] = iNaT * else: * try: # <<<<<<<<<<<<<< * iresult[i] = _get_datetime64_nanos(val) * seen_datetime=1 */ { __Pyx_ExceptionSave(&__pyx_t_13, &__pyx_t_14, &__pyx_t_15); __Pyx_XGOTREF(__pyx_t_13); __Pyx_XGOTREF(__pyx_t_14); __Pyx_XGOTREF(__pyx_t_15); /*try:*/ { /* "pandas/tslib.pyx":1062 * else: * try: * iresult[i] = _get_datetime64_nanos(val) # <<<<<<<<<<<<<< * seen_datetime=1 * except ValueError: */ __pyx_t_10 = __pyx_f_6pandas_5tslib__get_datetime64_nanos(__pyx_v_val); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1062; __pyx_clineno = __LINE__; goto __pyx_L51_error;} __Pyx_GOTREF(__pyx_t_10); __pyx_t_3 = __Pyx_PyInt_As_npy_int64(__pyx_t_10); if (unlikely((__pyx_t_3 == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1062; __pyx_clineno = __LINE__; goto __pyx_L51_error;} __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_t_28 = __pyx_v_i; __pyx_t_12 = -1; if (__pyx_t_28 < 0) { __pyx_t_28 += __pyx_pybuffernd_iresult.diminfo[0].shape; if (unlikely(__pyx_t_28 < 0)) __pyx_t_12 = 0; } else if (unlikely(__pyx_t_28 >= __pyx_pybuffernd_iresult.diminfo[0].shape)) __pyx_t_12 = 0; if (unlikely(__pyx_t_12 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_12); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1062; __pyx_clineno = __LINE__; goto __pyx_L51_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_iresult.rcbuffer->pybuffer.buf, __pyx_t_28, __pyx_pybuffernd_iresult.diminfo[0].strides) = __pyx_t_3; /* "pandas/tslib.pyx":1063 * try: * iresult[i] = _get_datetime64_nanos(val) * seen_datetime=1 # <<<<<<<<<<<<<< * except ValueError: * if coerce: */ __pyx_v_seen_datetime = 1; } __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0; goto __pyx_L58_try_end; __pyx_L51_error:; __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; /* "pandas/tslib.pyx":1064 * iresult[i] = _get_datetime64_nanos(val) * seen_datetime=1 * except ValueError: # <<<<<<<<<<<<<< * if coerce: * iresult[i] = iNaT */ __pyx_t_12 = PyErr_ExceptionMatches(__pyx_builtin_ValueError); if (__pyx_t_12) { __Pyx_AddTraceback("pandas.tslib.array_to_datetime", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_10, &__pyx_t_9, &__pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1064; __pyx_clineno = __LINE__; goto __pyx_L53_except_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_GOTREF(__pyx_t_9); __Pyx_GOTREF(__pyx_t_7); /* "pandas/tslib.pyx":1065 * seen_datetime=1 * except ValueError: * if coerce: # <<<<<<<<<<<<<< * iresult[i] = iNaT * continue */ __pyx_t_19 = __Pyx_PyObject_IsTrue(__pyx_v_coerce); if (unlikely(__pyx_t_19 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1065; __pyx_clineno = __LINE__; goto __pyx_L53_except_error;} if (__pyx_t_19) { /* "pandas/tslib.pyx":1066 * except ValueError: * if coerce: * iresult[i] = iNaT # <<<<<<<<<<<<<< * continue * raise */ __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_iNaT); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1066; __pyx_clineno = __LINE__; goto __pyx_L53_except_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_3 = __Pyx_PyInt_As_npy_int64(__pyx_t_8); if (unlikely((__pyx_t_3 == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1066; __pyx_clineno = __LINE__; goto __pyx_L53_except_error;} __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_29 = __pyx_v_i; __pyx_t_12 = -1; if (__pyx_t_29 < 0) { __pyx_t_29 += __pyx_pybuffernd_iresult.diminfo[0].shape; if (unlikely(__pyx_t_29 < 0)) __pyx_t_12 = 0; } else if (unlikely(__pyx_t_29 >= __pyx_pybuffernd_iresult.diminfo[0].shape)) __pyx_t_12 = 0; if (unlikely(__pyx_t_12 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_12); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1066; __pyx_clineno = __LINE__; goto __pyx_L53_except_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_iresult.rcbuffer->pybuffer.buf, __pyx_t_29, __pyx_pybuffernd_iresult.diminfo[0].strides) = __pyx_t_3; /* "pandas/tslib.pyx":1067 * if coerce: * iresult[i] = iNaT * continue # <<<<<<<<<<<<<< * raise * */ goto __pyx_L60_except_continue; } /* "pandas/tslib.pyx":1068 * iresult[i] = iNaT * continue * raise # <<<<<<<<<<<<<< * * # if we are coercing, dont' allow integers */ __Pyx_GIVEREF(__pyx_t_10); __Pyx_GIVEREF(__pyx_t_9); __Pyx_XGIVEREF(__pyx_t_7); __Pyx_ErrRestore(__pyx_t_10, __pyx_t_9, __pyx_t_7); __pyx_t_10 = 0; __pyx_t_9 = 0; __pyx_t_7 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1068; __pyx_clineno = __LINE__; goto __pyx_L53_except_error;} __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; goto __pyx_L52_exception_handled; __pyx_L60_except_continue:; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; goto __pyx_L57_try_continue; } goto __pyx_L53_except_error; __pyx_L53_except_error:; __Pyx_XGIVEREF(__pyx_t_13); __Pyx_XGIVEREF(__pyx_t_14); __Pyx_XGIVEREF(__pyx_t_15); __Pyx_ExceptionReset(__pyx_t_13, __pyx_t_14, __pyx_t_15); goto __pyx_L3_error; __pyx_L57_try_continue:; __Pyx_XGIVEREF(__pyx_t_13); __Pyx_XGIVEREF(__pyx_t_14); __Pyx_XGIVEREF(__pyx_t_15); __Pyx_ExceptionReset(__pyx_t_13, __pyx_t_14, __pyx_t_15); goto __pyx_L11_continue; __pyx_L52_exception_handled:; __Pyx_XGIVEREF(__pyx_t_13); __Pyx_XGIVEREF(__pyx_t_14); __Pyx_XGIVEREF(__pyx_t_15); __Pyx_ExceptionReset(__pyx_t_13, __pyx_t_14, __pyx_t_15); __pyx_L58_try_end:; } } __pyx_L50:; goto __pyx_L13; } /* "pandas/tslib.pyx":1071 * * # if we are coercing, dont' allow integers * elif util.is_integer_object(val) and not coerce: # <<<<<<<<<<<<<< * if val == iNaT: * iresult[i] = iNaT */ if ((is_integer_object(__pyx_v_val) != 0)) { __pyx_t_19 = __Pyx_PyObject_IsTrue(__pyx_v_coerce); if (unlikely(__pyx_t_19 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1071; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_t_2 = (!__pyx_t_19); __pyx_t_19 = __pyx_t_2; } else { __pyx_t_19 = (is_integer_object(__pyx_v_val) != 0); } if (__pyx_t_19) { /* "pandas/tslib.pyx":1072 * # if we are coercing, dont' allow integers * elif util.is_integer_object(val) and not coerce: * if val == iNaT: # <<<<<<<<<<<<<< * iresult[i] = iNaT * else: */ __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_iNaT); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1072; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_t_9 = PyObject_RichCompare(__pyx_v_val, __pyx_t_7, Py_EQ); __Pyx_XGOTREF(__pyx_t_9); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1072; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_19 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_19 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1072; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; if (__pyx_t_19) { /* "pandas/tslib.pyx":1073 * elif util.is_integer_object(val) and not coerce: * if val == iNaT: * iresult[i] = iNaT # <<<<<<<<<<<<<< * else: * iresult[i] = val*m */ __pyx_t_9 = __Pyx_GetModuleGlobalName(__pyx_n_s_iNaT); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1073; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_t_3 = __Pyx_PyInt_As_npy_int64(__pyx_t_9); if (unlikely((__pyx_t_3 == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1073; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_30 = __pyx_v_i; __pyx_t_12 = -1; if (__pyx_t_30 < 0) { __pyx_t_30 += __pyx_pybuffernd_iresult.diminfo[0].shape; if (unlikely(__pyx_t_30 < 0)) __pyx_t_12 = 0; } else if (unlikely(__pyx_t_30 >= __pyx_pybuffernd_iresult.diminfo[0].shape)) __pyx_t_12 = 0; if (unlikely(__pyx_t_12 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_12); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1073; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_iresult.rcbuffer->pybuffer.buf, __pyx_t_30, __pyx_pybuffernd_iresult.diminfo[0].strides) = __pyx_t_3; goto __pyx_L62; } /*else*/ { /* "pandas/tslib.pyx":1075 * iresult[i] = iNaT * else: * iresult[i] = val*m # <<<<<<<<<<<<<< * seen_integer=1 * elif util.is_float_object(val) and not coerce: */ __pyx_t_9 = __Pyx_PyInt_From_npy_int64(__pyx_v_m); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1075; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_t_7 = PyNumber_Multiply(__pyx_v_val, __pyx_t_9); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1075; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_3 = __Pyx_PyInt_As_npy_int64(__pyx_t_7); if (unlikely((__pyx_t_3 == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1075; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_31 = __pyx_v_i; __pyx_t_12 = -1; if (__pyx_t_31 < 0) { __pyx_t_31 += __pyx_pybuffernd_iresult.diminfo[0].shape; if (unlikely(__pyx_t_31 < 0)) __pyx_t_12 = 0; } else if (unlikely(__pyx_t_31 >= __pyx_pybuffernd_iresult.diminfo[0].shape)) __pyx_t_12 = 0; if (unlikely(__pyx_t_12 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_12); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1075; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_iresult.rcbuffer->pybuffer.buf, __pyx_t_31, __pyx_pybuffernd_iresult.diminfo[0].strides) = __pyx_t_3; /* "pandas/tslib.pyx":1076 * else: * iresult[i] = val*m * seen_integer=1 # <<<<<<<<<<<<<< * elif util.is_float_object(val) and not coerce: * if val != val or val == iNaT: */ __pyx_v_seen_integer = 1; } __pyx_L62:; goto __pyx_L13; } /* "pandas/tslib.pyx":1077 * iresult[i] = val*m * seen_integer=1 * elif util.is_float_object(val) and not coerce: # <<<<<<<<<<<<<< * if val != val or val == iNaT: * iresult[i] = iNaT */ if ((is_float_object(__pyx_v_val) != 0)) { __pyx_t_19 = __Pyx_PyObject_IsTrue(__pyx_v_coerce); if (unlikely(__pyx_t_19 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1077; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_t_2 = (!__pyx_t_19); __pyx_t_19 = __pyx_t_2; } else { __pyx_t_19 = (is_float_object(__pyx_v_val) != 0); } if (__pyx_t_19) { /* "pandas/tslib.pyx":1078 * seen_integer=1 * elif util.is_float_object(val) and not coerce: * if val != val or val == iNaT: # <<<<<<<<<<<<<< * iresult[i] = iNaT * else: */ __pyx_t_7 = PyObject_RichCompare(__pyx_v_val, __pyx_v_val, Py_NE); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1078; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_t_19 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_19 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1078; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (!__pyx_t_19) { __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_iNaT); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1078; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_t_9 = PyObject_RichCompare(__pyx_v_val, __pyx_t_7, Py_EQ); __Pyx_XGOTREF(__pyx_t_9); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1078; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1078; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_32 = __pyx_t_2; } else { __pyx_t_32 = __pyx_t_19; } if (__pyx_t_32) { /* "pandas/tslib.pyx":1079 * elif util.is_float_object(val) and not coerce: * if val != val or val == iNaT: * iresult[i] = iNaT # <<<<<<<<<<<<<< * else: * iresult[i] = cast_from_unit(val,unit) */ __pyx_t_9 = __Pyx_GetModuleGlobalName(__pyx_n_s_iNaT); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1079; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_t_3 = __Pyx_PyInt_As_npy_int64(__pyx_t_9); if (unlikely((__pyx_t_3 == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1079; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_33 = __pyx_v_i; __pyx_t_12 = -1; if (__pyx_t_33 < 0) { __pyx_t_33 += __pyx_pybuffernd_iresult.diminfo[0].shape; if (unlikely(__pyx_t_33 < 0)) __pyx_t_12 = 0; } else if (unlikely(__pyx_t_33 >= __pyx_pybuffernd_iresult.diminfo[0].shape)) __pyx_t_12 = 0; if (unlikely(__pyx_t_12 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_12); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1079; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_iresult.rcbuffer->pybuffer.buf, __pyx_t_33, __pyx_pybuffernd_iresult.diminfo[0].strides) = __pyx_t_3; goto __pyx_L63; } /*else*/ { /* "pandas/tslib.pyx":1081 * iresult[i] = iNaT * else: * iresult[i] = cast_from_unit(val,unit) # <<<<<<<<<<<<<< * seen_integer=1 * else: */ __pyx_t_3 = __pyx_f_6pandas_5tslib_cast_from_unit(__pyx_v_val, __pyx_v_unit, 0); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1081; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_t_34 = __pyx_v_i; __pyx_t_12 = -1; if (__pyx_t_34 < 0) { __pyx_t_34 += __pyx_pybuffernd_iresult.diminfo[0].shape; if (unlikely(__pyx_t_34 < 0)) __pyx_t_12 = 0; } else if (unlikely(__pyx_t_34 >= __pyx_pybuffernd_iresult.diminfo[0].shape)) __pyx_t_12 = 0; if (unlikely(__pyx_t_12 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_12); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1081; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_iresult.rcbuffer->pybuffer.buf, __pyx_t_34, __pyx_pybuffernd_iresult.diminfo[0].strides) = __pyx_t_3; /* "pandas/tslib.pyx":1082 * else: * iresult[i] = cast_from_unit(val,unit) * seen_integer=1 # <<<<<<<<<<<<<< * else: * try: */ __pyx_v_seen_integer = 1; } __pyx_L63:; goto __pyx_L13; } /*else*/ { /* "pandas/tslib.pyx":1084 * seen_integer=1 * else: * try: # <<<<<<<<<<<<<< * if len(val) == 0: * iresult[i] = iNaT */ { __Pyx_ExceptionSave(&__pyx_t_15, &__pyx_t_14, &__pyx_t_13); __Pyx_XGOTREF(__pyx_t_15); __Pyx_XGOTREF(__pyx_t_14); __Pyx_XGOTREF(__pyx_t_13); /*try:*/ { /* "pandas/tslib.pyx":1085 * else: * try: * if len(val) == 0: # <<<<<<<<<<<<<< * iresult[i] = iNaT * continue */ __pyx_t_35 = PyObject_Length(__pyx_v_val); if (unlikely(__pyx_t_35 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1085; __pyx_clineno = __LINE__; goto __pyx_L64_error;} __pyx_t_32 = ((__pyx_t_35 == 0) != 0); if (__pyx_t_32) { /* "pandas/tslib.pyx":1086 * try: * if len(val) == 0: * iresult[i] = iNaT # <<<<<<<<<<<<<< * continue * */ __pyx_t_9 = __Pyx_GetModuleGlobalName(__pyx_n_s_iNaT); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1086; __pyx_clineno = __LINE__; goto __pyx_L64_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_t_3 = __Pyx_PyInt_As_npy_int64(__pyx_t_9); if (unlikely((__pyx_t_3 == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1086; __pyx_clineno = __LINE__; goto __pyx_L64_error;} __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_35 = __pyx_v_i; __pyx_t_12 = -1; if (__pyx_t_35 < 0) { __pyx_t_35 += __pyx_pybuffernd_iresult.diminfo[0].shape; if (unlikely(__pyx_t_35 < 0)) __pyx_t_12 = 0; } else if (unlikely(__pyx_t_35 >= __pyx_pybuffernd_iresult.diminfo[0].shape)) __pyx_t_12 = 0; if (unlikely(__pyx_t_12 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_12); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1086; __pyx_clineno = __LINE__; goto __pyx_L64_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_iresult.rcbuffer->pybuffer.buf, __pyx_t_35, __pyx_pybuffernd_iresult.diminfo[0].strides) = __pyx_t_3; /* "pandas/tslib.pyx":1087 * if len(val) == 0: * iresult[i] = iNaT * continue # <<<<<<<<<<<<<< * * elif val in _nat_strings: */ goto __pyx_L70_try_continue; } /* "pandas/tslib.pyx":1089 * continue * * elif val in _nat_strings: # <<<<<<<<<<<<<< * iresult[i] = iNaT * continue */ __pyx_t_9 = __Pyx_GetModuleGlobalName(__pyx_n_s_nat_strings); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1089; __pyx_clineno = __LINE__; goto __pyx_L64_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_t_32 = (__Pyx_PySequence_Contains(__pyx_v_val, __pyx_t_9, Py_EQ)); if (unlikely(__pyx_t_32 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1089; __pyx_clineno = __LINE__; goto __pyx_L64_error;} __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_19 = (__pyx_t_32 != 0); if (__pyx_t_19) { /* "pandas/tslib.pyx":1090 * * elif val in _nat_strings: * iresult[i] = iNaT # <<<<<<<<<<<<<< * continue * */ __pyx_t_9 = __Pyx_GetModuleGlobalName(__pyx_n_s_iNaT); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1090; __pyx_clineno = __LINE__; goto __pyx_L64_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_t_3 = __Pyx_PyInt_As_npy_int64(__pyx_t_9); if (unlikely((__pyx_t_3 == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1090; __pyx_clineno = __LINE__; goto __pyx_L64_error;} __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_36 = __pyx_v_i; __pyx_t_12 = -1; if (__pyx_t_36 < 0) { __pyx_t_36 += __pyx_pybuffernd_iresult.diminfo[0].shape; if (unlikely(__pyx_t_36 < 0)) __pyx_t_12 = 0; } else if (unlikely(__pyx_t_36 >= __pyx_pybuffernd_iresult.diminfo[0].shape)) __pyx_t_12 = 0; if (unlikely(__pyx_t_12 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_12); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1090; __pyx_clineno = __LINE__; goto __pyx_L64_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_iresult.rcbuffer->pybuffer.buf, __pyx_t_36, __pyx_pybuffernd_iresult.diminfo[0].strides) = __pyx_t_3; /* "pandas/tslib.pyx":1091 * elif val in _nat_strings: * iresult[i] = iNaT * continue # <<<<<<<<<<<<<< * * _string_to_dts(val, &dts) */ goto __pyx_L70_try_continue; } /* "pandas/tslib.pyx":1093 * continue * * _string_to_dts(val, &dts) # <<<<<<<<<<<<<< * iresult[i] = pandas_datetimestruct_to_datetime(PANDAS_FR_ns, * &dts) */ __pyx_t_9 = __pyx_f_8datetime__string_to_dts(__pyx_v_val, (&__pyx_v_dts)); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1093; __pyx_clineno = __LINE__; goto __pyx_L64_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; /* "pandas/tslib.pyx":1094 * * _string_to_dts(val, &dts) * iresult[i] = pandas_datetimestruct_to_datetime(PANDAS_FR_ns, # <<<<<<<<<<<<<< * &dts) * _check_dts_bounds(&dts) */ __pyx_t_37 = __pyx_v_i; __pyx_t_12 = -1; if (__pyx_t_37 < 0) { __pyx_t_37 += __pyx_pybuffernd_iresult.diminfo[0].shape; if (unlikely(__pyx_t_37 < 0)) __pyx_t_12 = 0; } else if (unlikely(__pyx_t_37 >= __pyx_pybuffernd_iresult.diminfo[0].shape)) __pyx_t_12 = 0; if (unlikely(__pyx_t_12 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_12); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1094; __pyx_clineno = __LINE__; goto __pyx_L64_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_iresult.rcbuffer->pybuffer.buf, __pyx_t_37, __pyx_pybuffernd_iresult.diminfo[0].strides) = pandas_datetimestruct_to_datetime(PANDAS_FR_ns, (&__pyx_v_dts)); /* "pandas/tslib.pyx":1096 * iresult[i] = pandas_datetimestruct_to_datetime(PANDAS_FR_ns, * &dts) * _check_dts_bounds(&dts) # <<<<<<<<<<<<<< * except ValueError: * try: */ __pyx_t_9 = __pyx_f_6pandas_5tslib__check_dts_bounds((&__pyx_v_dts)); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1096; __pyx_clineno = __LINE__; goto __pyx_L64_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; } __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0; __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; goto __pyx_L71_try_end; __pyx_L64_error:; __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; /* "pandas/tslib.pyx":1097 * &dts) * _check_dts_bounds(&dts) * except ValueError: # <<<<<<<<<<<<<< * try: * iresult[i] = _pydatetime_to_dts( */ __pyx_t_12 = PyErr_ExceptionMatches(__pyx_builtin_ValueError); if (__pyx_t_12) { __Pyx_AddTraceback("pandas.tslib.array_to_datetime", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_9, &__pyx_t_7, &__pyx_t_10) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1097; __pyx_clineno = __LINE__; goto __pyx_L66_except_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_GOTREF(__pyx_t_7); __Pyx_GOTREF(__pyx_t_10); /* "pandas/tslib.pyx":1098 * _check_dts_bounds(&dts) * except ValueError: * try: # <<<<<<<<<<<<<< * iresult[i] = _pydatetime_to_dts( * parse_datetime_string(val, dayfirst=dayfirst), */ { __Pyx_ExceptionSave(&__pyx_t_38, &__pyx_t_39, &__pyx_t_40); __Pyx_XGOTREF(__pyx_t_38); __Pyx_XGOTREF(__pyx_t_39); __Pyx_XGOTREF(__pyx_t_40); /*try:*/ { /* "pandas/tslib.pyx":1100 * try: * iresult[i] = _pydatetime_to_dts( * parse_datetime_string(val, dayfirst=dayfirst), # <<<<<<<<<<<<<< * &dts * ) */ __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_parse_datetime_string); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1100; __pyx_clineno = __LINE__; goto __pyx_L75_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_41 = PyTuple_New(1); if (unlikely(!__pyx_t_41)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1100; __pyx_clineno = __LINE__; goto __pyx_L75_error;} __Pyx_GOTREF(__pyx_t_41); __Pyx_INCREF(__pyx_v_val); PyTuple_SET_ITEM(__pyx_t_41, 0, __pyx_v_val); __Pyx_GIVEREF(__pyx_v_val); __pyx_t_42 = PyDict_New(); if (unlikely(!__pyx_t_42)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1100; __pyx_clineno = __LINE__; goto __pyx_L75_error;} __Pyx_GOTREF(__pyx_t_42); if (PyDict_SetItem(__pyx_t_42, __pyx_n_s_dayfirst, __pyx_v_dayfirst) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1100; __pyx_clineno = __LINE__; goto __pyx_L75_error;} __pyx_t_43 = PyObject_Call(__pyx_t_8, __pyx_t_41, __pyx_t_42); if (unlikely(!__pyx_t_43)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1100; __pyx_clineno = __LINE__; goto __pyx_L75_error;} __Pyx_GOTREF(__pyx_t_43); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_41); __pyx_t_41 = 0; __Pyx_DECREF(__pyx_t_42); __pyx_t_42 = 0; /* "pandas/tslib.pyx":1099 * except ValueError: * try: * iresult[i] = _pydatetime_to_dts( # <<<<<<<<<<<<<< * parse_datetime_string(val, dayfirst=dayfirst), * &dts */ __pyx_t_44 = __pyx_v_i; __pyx_t_12 = -1; if (__pyx_t_44 < 0) { __pyx_t_44 += __pyx_pybuffernd_iresult.diminfo[0].shape; if (unlikely(__pyx_t_44 < 0)) __pyx_t_12 = 0; } else if (unlikely(__pyx_t_44 >= __pyx_pybuffernd_iresult.diminfo[0].shape)) __pyx_t_12 = 0; if (unlikely(__pyx_t_12 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_12); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1099; __pyx_clineno = __LINE__; goto __pyx_L75_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_iresult.rcbuffer->pybuffer.buf, __pyx_t_44, __pyx_pybuffernd_iresult.diminfo[0].strides) = __pyx_f_8datetime__pydatetime_to_dts(__pyx_t_43, (&__pyx_v_dts)); __Pyx_DECREF(__pyx_t_43); __pyx_t_43 = 0; } __Pyx_XDECREF(__pyx_t_38); __pyx_t_38 = 0; __Pyx_XDECREF(__pyx_t_39); __pyx_t_39 = 0; __Pyx_XDECREF(__pyx_t_40); __pyx_t_40 = 0; goto __pyx_L82_try_end; __pyx_L75_error:; __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_XDECREF(__pyx_t_41); __pyx_t_41 = 0; __Pyx_XDECREF(__pyx_t_42); __pyx_t_42 = 0; __Pyx_XDECREF(__pyx_t_43); __pyx_t_43 = 0; /* "pandas/tslib.pyx":1103 * &dts * ) * except Exception: # <<<<<<<<<<<<<< * if coerce: * iresult[i] = iNaT */ __pyx_t_12 = PyErr_ExceptionMatches(__pyx_builtin_Exception); if (__pyx_t_12) { __Pyx_AddTraceback("pandas.tslib.array_to_datetime", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_43, &__pyx_t_42, &__pyx_t_41) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1103; __pyx_clineno = __LINE__; goto __pyx_L77_except_error;} __Pyx_GOTREF(__pyx_t_43); __Pyx_GOTREF(__pyx_t_42); __Pyx_GOTREF(__pyx_t_41); /* "pandas/tslib.pyx":1104 * ) * except Exception: * if coerce: # <<<<<<<<<<<<<< * iresult[i] = iNaT * continue */ __pyx_t_19 = __Pyx_PyObject_IsTrue(__pyx_v_coerce); if (unlikely(__pyx_t_19 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1104; __pyx_clineno = __LINE__; goto __pyx_L77_except_error;} if (__pyx_t_19) { /* "pandas/tslib.pyx":1105 * except Exception: * if coerce: * iresult[i] = iNaT # <<<<<<<<<<<<<< * continue * raise TypeError */ __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_iNaT); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1105; __pyx_clineno = __LINE__; goto __pyx_L77_except_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_3 = __Pyx_PyInt_As_npy_int64(__pyx_t_8); if (unlikely((__pyx_t_3 == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1105; __pyx_clineno = __LINE__; goto __pyx_L77_except_error;} __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_45 = __pyx_v_i; __pyx_t_12 = -1; if (__pyx_t_45 < 0) { __pyx_t_45 += __pyx_pybuffernd_iresult.diminfo[0].shape; if (unlikely(__pyx_t_45 < 0)) __pyx_t_12 = 0; } else if (unlikely(__pyx_t_45 >= __pyx_pybuffernd_iresult.diminfo[0].shape)) __pyx_t_12 = 0; if (unlikely(__pyx_t_12 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_12); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1105; __pyx_clineno = __LINE__; goto __pyx_L77_except_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_iresult.rcbuffer->pybuffer.buf, __pyx_t_45, __pyx_pybuffernd_iresult.diminfo[0].strides) = __pyx_t_3; /* "pandas/tslib.pyx":1106 * if coerce: * iresult[i] = iNaT * continue # <<<<<<<<<<<<<< * raise TypeError * */ goto __pyx_L84_except_continue; } /* "pandas/tslib.pyx":1107 * iresult[i] = iNaT * continue * raise TypeError # <<<<<<<<<<<<<< * * try: */ __Pyx_Raise(__pyx_builtin_TypeError, 0, 0, 0); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1107; __pyx_clineno = __LINE__; goto __pyx_L77_except_error;} __Pyx_DECREF(__pyx_t_43); __pyx_t_43 = 0; __Pyx_DECREF(__pyx_t_42); __pyx_t_42 = 0; __Pyx_DECREF(__pyx_t_41); __pyx_t_41 = 0; goto __pyx_L76_exception_handled; __pyx_L84_except_continue:; __Pyx_DECREF(__pyx_t_43); __pyx_t_43 = 0; __Pyx_DECREF(__pyx_t_42); __pyx_t_42 = 0; __Pyx_DECREF(__pyx_t_41); __pyx_t_41 = 0; goto __pyx_L81_try_continue; } goto __pyx_L77_except_error; __pyx_L77_except_error:; __Pyx_XGIVEREF(__pyx_t_38); __Pyx_XGIVEREF(__pyx_t_39); __Pyx_XGIVEREF(__pyx_t_40); __Pyx_ExceptionReset(__pyx_t_38, __pyx_t_39, __pyx_t_40); goto __pyx_L66_except_error; __pyx_L81_try_continue:; __Pyx_XGIVEREF(__pyx_t_38); __Pyx_XGIVEREF(__pyx_t_39); __Pyx_XGIVEREF(__pyx_t_40); __Pyx_ExceptionReset(__pyx_t_38, __pyx_t_39, __pyx_t_40); goto __pyx_L74_except_continue; __pyx_L76_exception_handled:; __Pyx_XGIVEREF(__pyx_t_38); __Pyx_XGIVEREF(__pyx_t_39); __Pyx_XGIVEREF(__pyx_t_40); __Pyx_ExceptionReset(__pyx_t_38, __pyx_t_39, __pyx_t_40); __pyx_L82_try_end:; } /* "pandas/tslib.pyx":1109 * raise TypeError * * try: # <<<<<<<<<<<<<< * _check_dts_bounds(&dts) * except ValueError: */ { __Pyx_ExceptionSave(&__pyx_t_40, &__pyx_t_39, &__pyx_t_38); __Pyx_XGOTREF(__pyx_t_40); __Pyx_XGOTREF(__pyx_t_39); __Pyx_XGOTREF(__pyx_t_38); /*try:*/ { /* "pandas/tslib.pyx":1110 * * try: * _check_dts_bounds(&dts) # <<<<<<<<<<<<<< * except ValueError: * if coerce: */ __pyx_t_41 = __pyx_f_6pandas_5tslib__check_dts_bounds((&__pyx_v_dts)); if (unlikely(!__pyx_t_41)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1110; __pyx_clineno = __LINE__; goto __pyx_L86_error;} __Pyx_GOTREF(__pyx_t_41); __Pyx_DECREF(__pyx_t_41); __pyx_t_41 = 0; } __Pyx_XDECREF(__pyx_t_40); __pyx_t_40 = 0; __Pyx_XDECREF(__pyx_t_39); __pyx_t_39 = 0; __Pyx_XDECREF(__pyx_t_38); __pyx_t_38 = 0; goto __pyx_L93_try_end; __pyx_L86_error:; __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_XDECREF(__pyx_t_43); __pyx_t_43 = 0; __Pyx_XDECREF(__pyx_t_42); __pyx_t_42 = 0; __Pyx_XDECREF(__pyx_t_41); __pyx_t_41 = 0; /* "pandas/tslib.pyx":1111 * try: * _check_dts_bounds(&dts) * except ValueError: # <<<<<<<<<<<<<< * if coerce: * iresult[i] = iNaT */ __pyx_t_12 = PyErr_ExceptionMatches(__pyx_builtin_ValueError); if (__pyx_t_12) { __Pyx_AddTraceback("pandas.tslib.array_to_datetime", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_41, &__pyx_t_42, &__pyx_t_43) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1111; __pyx_clineno = __LINE__; goto __pyx_L88_except_error;} __Pyx_GOTREF(__pyx_t_41); __Pyx_GOTREF(__pyx_t_42); __Pyx_GOTREF(__pyx_t_43); /* "pandas/tslib.pyx":1112 * _check_dts_bounds(&dts) * except ValueError: * if coerce: # <<<<<<<<<<<<<< * iresult[i] = iNaT * continue */ __pyx_t_19 = __Pyx_PyObject_IsTrue(__pyx_v_coerce); if (unlikely(__pyx_t_19 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1112; __pyx_clineno = __LINE__; goto __pyx_L88_except_error;} if (__pyx_t_19) { /* "pandas/tslib.pyx":1113 * except ValueError: * if coerce: * iresult[i] = iNaT # <<<<<<<<<<<<<< * continue * raise */ __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_iNaT); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1113; __pyx_clineno = __LINE__; goto __pyx_L88_except_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_3 = __Pyx_PyInt_As_npy_int64(__pyx_t_8); if (unlikely((__pyx_t_3 == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1113; __pyx_clineno = __LINE__; goto __pyx_L88_except_error;} __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_46 = __pyx_v_i; __pyx_t_12 = -1; if (__pyx_t_46 < 0) { __pyx_t_46 += __pyx_pybuffernd_iresult.diminfo[0].shape; if (unlikely(__pyx_t_46 < 0)) __pyx_t_12 = 0; } else if (unlikely(__pyx_t_46 >= __pyx_pybuffernd_iresult.diminfo[0].shape)) __pyx_t_12 = 0; if (unlikely(__pyx_t_12 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_12); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1113; __pyx_clineno = __LINE__; goto __pyx_L88_except_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_iresult.rcbuffer->pybuffer.buf, __pyx_t_46, __pyx_pybuffernd_iresult.diminfo[0].strides) = __pyx_t_3; /* "pandas/tslib.pyx":1114 * if coerce: * iresult[i] = iNaT * continue # <<<<<<<<<<<<<< * raise * except: */ goto __pyx_L95_except_continue; } /* "pandas/tslib.pyx":1115 * iresult[i] = iNaT * continue * raise # <<<<<<<<<<<<<< * except: * if coerce: */ __Pyx_GIVEREF(__pyx_t_41); __Pyx_GIVEREF(__pyx_t_42); __Pyx_XGIVEREF(__pyx_t_43); __Pyx_ErrRestore(__pyx_t_41, __pyx_t_42, __pyx_t_43); __pyx_t_41 = 0; __pyx_t_42 = 0; __pyx_t_43 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1115; __pyx_clineno = __LINE__; goto __pyx_L88_except_error;} __Pyx_DECREF(__pyx_t_41); __pyx_t_41 = 0; __Pyx_DECREF(__pyx_t_42); __pyx_t_42 = 0; __Pyx_DECREF(__pyx_t_43); __pyx_t_43 = 0; goto __pyx_L87_exception_handled; __pyx_L95_except_continue:; __Pyx_DECREF(__pyx_t_41); __pyx_t_41 = 0; __Pyx_DECREF(__pyx_t_42); __pyx_t_42 = 0; __Pyx_DECREF(__pyx_t_43); __pyx_t_43 = 0; goto __pyx_L92_try_continue; } goto __pyx_L88_except_error; __pyx_L88_except_error:; __Pyx_XGIVEREF(__pyx_t_40); __Pyx_XGIVEREF(__pyx_t_39); __Pyx_XGIVEREF(__pyx_t_38); __Pyx_ExceptionReset(__pyx_t_40, __pyx_t_39, __pyx_t_38); goto __pyx_L66_except_error; __pyx_L92_try_continue:; __Pyx_XGIVEREF(__pyx_t_40); __Pyx_XGIVEREF(__pyx_t_39); __Pyx_XGIVEREF(__pyx_t_38); __Pyx_ExceptionReset(__pyx_t_40, __pyx_t_39, __pyx_t_38); goto __pyx_L74_except_continue; __pyx_L87_exception_handled:; __Pyx_XGIVEREF(__pyx_t_40); __Pyx_XGIVEREF(__pyx_t_39); __Pyx_XGIVEREF(__pyx_t_38); __Pyx_ExceptionReset(__pyx_t_40, __pyx_t_39, __pyx_t_38); __pyx_L93_try_end:; } __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; goto __pyx_L65_exception_handled; __pyx_L74_except_continue:; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; goto __pyx_L70_try_continue; } /* "pandas/tslib.pyx":1116 * continue * raise * except: # <<<<<<<<<<<<<< * if coerce: * iresult[i] = iNaT */ /*except:*/ { __Pyx_AddTraceback("pandas.tslib.array_to_datetime", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_10, &__pyx_t_7, &__pyx_t_9) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1116; __pyx_clineno = __LINE__; goto __pyx_L66_except_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_GOTREF(__pyx_t_7); __Pyx_GOTREF(__pyx_t_9); /* "pandas/tslib.pyx":1117 * raise * except: * if coerce: # <<<<<<<<<<<<<< * iresult[i] = iNaT * continue */ __pyx_t_19 = __Pyx_PyObject_IsTrue(__pyx_v_coerce); if (unlikely(__pyx_t_19 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1117; __pyx_clineno = __LINE__; goto __pyx_L66_except_error;} if (__pyx_t_19) { /* "pandas/tslib.pyx":1118 * except: * if coerce: * iresult[i] = iNaT # <<<<<<<<<<<<<< * continue * raise */ __pyx_t_43 = __Pyx_GetModuleGlobalName(__pyx_n_s_iNaT); if (unlikely(!__pyx_t_43)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1118; __pyx_clineno = __LINE__; goto __pyx_L66_except_error;} __Pyx_GOTREF(__pyx_t_43); __pyx_t_3 = __Pyx_PyInt_As_npy_int64(__pyx_t_43); if (unlikely((__pyx_t_3 == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1118; __pyx_clineno = __LINE__; goto __pyx_L66_except_error;} __Pyx_DECREF(__pyx_t_43); __pyx_t_43 = 0; __pyx_t_47 = __pyx_v_i; __pyx_t_12 = -1; if (__pyx_t_47 < 0) { __pyx_t_47 += __pyx_pybuffernd_iresult.diminfo[0].shape; if (unlikely(__pyx_t_47 < 0)) __pyx_t_12 = 0; } else if (unlikely(__pyx_t_47 >= __pyx_pybuffernd_iresult.diminfo[0].shape)) __pyx_t_12 = 0; if (unlikely(__pyx_t_12 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_12); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1118; __pyx_clineno = __LINE__; goto __pyx_L66_except_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_iresult.rcbuffer->pybuffer.buf, __pyx_t_47, __pyx_pybuffernd_iresult.diminfo[0].strides) = __pyx_t_3; /* "pandas/tslib.pyx":1119 * if coerce: * iresult[i] = iNaT * continue # <<<<<<<<<<<<<< * raise * */ goto __pyx_L98_except_continue; } /* "pandas/tslib.pyx":1120 * iresult[i] = iNaT * continue * raise # <<<<<<<<<<<<<< * * # don't allow mixed integers and datetime like */ __Pyx_GIVEREF(__pyx_t_10); __Pyx_GIVEREF(__pyx_t_7); __Pyx_XGIVEREF(__pyx_t_9); __Pyx_ErrRestore(__pyx_t_10, __pyx_t_7, __pyx_t_9); __pyx_t_10 = 0; __pyx_t_7 = 0; __pyx_t_9 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1120; __pyx_clineno = __LINE__; goto __pyx_L66_except_error;} __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; goto __pyx_L65_exception_handled; __pyx_L98_except_continue:; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; goto __pyx_L70_try_continue; } __pyx_L66_except_error:; __Pyx_XGIVEREF(__pyx_t_15); __Pyx_XGIVEREF(__pyx_t_14); __Pyx_XGIVEREF(__pyx_t_13); __Pyx_ExceptionReset(__pyx_t_15, __pyx_t_14, __pyx_t_13); goto __pyx_L3_error; __pyx_L70_try_continue:; __Pyx_XGIVEREF(__pyx_t_15); __Pyx_XGIVEREF(__pyx_t_14); __Pyx_XGIVEREF(__pyx_t_13); __Pyx_ExceptionReset(__pyx_t_15, __pyx_t_14, __pyx_t_13); goto __pyx_L11_continue; __pyx_L65_exception_handled:; __Pyx_XGIVEREF(__pyx_t_15); __Pyx_XGIVEREF(__pyx_t_14); __Pyx_XGIVEREF(__pyx_t_13); __Pyx_ExceptionReset(__pyx_t_15, __pyx_t_14, __pyx_t_13); __pyx_L71_try_end:; } } __pyx_L13:; __pyx_L11_continue:; } /* "pandas/tslib.pyx":1125 * # higher levels can catch and coerce to object, for * # example * if seen_integer and seen_datetime: # <<<<<<<<<<<<<< * raise ValueError("mixed datetimes and integers in passed array") * */ if ((__pyx_v_seen_integer != 0)) { __pyx_t_19 = (__pyx_v_seen_datetime != 0); } else { __pyx_t_19 = (__pyx_v_seen_integer != 0); } if (__pyx_t_19) { /* "pandas/tslib.pyx":1126 * # example * if seen_integer and seen_datetime: * raise ValueError("mixed datetimes and integers in passed array") # <<<<<<<<<<<<<< * * return result */ __pyx_t_9 = PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__28, NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1126; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_Raise(__pyx_t_9, 0, 0, 0); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1126; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } /* "pandas/tslib.pyx":1128 * raise ValueError("mixed datetimes and integers in passed array") * * return result # <<<<<<<<<<<<<< * except OutOfBoundsDatetime: * if raise_: */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_result); __pyx_r = __pyx_v_result; goto __pyx_L7_try_return; } __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; goto __pyx_L10_try_end; __pyx_L3_error:; __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_XDECREF(__pyx_t_41); __pyx_t_41 = 0; __Pyx_XDECREF(__pyx_t_42); __pyx_t_42 = 0; __Pyx_XDECREF(__pyx_t_43); __pyx_t_43 = 0; __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; /* "pandas/tslib.pyx":1129 * * return result * except OutOfBoundsDatetime: # <<<<<<<<<<<<<< * if raise_: * raise */ __pyx_t_9 = __Pyx_GetModuleGlobalName(__pyx_n_s_OutOfBoundsDatetime); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1129; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_t_12 = PyErr_ExceptionMatches(__pyx_t_9); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; if (__pyx_t_12) { __Pyx_AddTraceback("pandas.tslib.array_to_datetime", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_9, &__pyx_t_7, &__pyx_t_10) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1129; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_GOTREF(__pyx_t_7); __Pyx_GOTREF(__pyx_t_10); /* "pandas/tslib.pyx":1130 * return result * except OutOfBoundsDatetime: * if raise_: # <<<<<<<<<<<<<< * raise * */ __pyx_t_19 = __Pyx_PyObject_IsTrue(__pyx_v_raise_); if (unlikely(__pyx_t_19 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1130; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} if (__pyx_t_19) { /* "pandas/tslib.pyx":1131 * except OutOfBoundsDatetime: * if raise_: * raise # <<<<<<<<<<<<<< * * oresult = np.empty(n, dtype=object) */ __Pyx_GIVEREF(__pyx_t_9); __Pyx_GIVEREF(__pyx_t_7); __Pyx_XGIVEREF(__pyx_t_10); __Pyx_ErrRestore(__pyx_t_9, __pyx_t_7, __pyx_t_10); __pyx_t_9 = 0; __pyx_t_7 = 0; __pyx_t_10 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1131; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} } /* "pandas/tslib.pyx":1133 * raise * * oresult = np.empty(n, dtype=object) # <<<<<<<<<<<<<< * for i in range(n): * val = values[i] */ __pyx_t_43 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_43)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1133; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} __Pyx_GOTREF(__pyx_t_43); __pyx_t_42 = __Pyx_PyObject_GetAttrStr(__pyx_t_43, __pyx_n_s_empty); if (unlikely(!__pyx_t_42)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1133; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} __Pyx_GOTREF(__pyx_t_42); __Pyx_DECREF(__pyx_t_43); __pyx_t_43 = 0; __pyx_t_43 = PyInt_FromSsize_t(__pyx_v_n); if (unlikely(!__pyx_t_43)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1133; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} __Pyx_GOTREF(__pyx_t_43); __pyx_t_41 = PyTuple_New(1); if (unlikely(!__pyx_t_41)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1133; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} __Pyx_GOTREF(__pyx_t_41); PyTuple_SET_ITEM(__pyx_t_41, 0, __pyx_t_43); __Pyx_GIVEREF(__pyx_t_43); __pyx_t_43 = 0; __pyx_t_43 = PyDict_New(); if (unlikely(!__pyx_t_43)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1133; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} __Pyx_GOTREF(__pyx_t_43); if (PyDict_SetItem(__pyx_t_43, __pyx_n_s_dtype, __pyx_builtin_object) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1133; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} __pyx_t_8 = PyObject_Call(__pyx_t_42, __pyx_t_41, __pyx_t_43); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1133; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_42); __pyx_t_42 = 0; __Pyx_DECREF(__pyx_t_41); __pyx_t_41 = 0; __Pyx_DECREF(__pyx_t_43); __pyx_t_43 = 0; if (!(likely(((__pyx_t_8) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_8, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1133; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} __pyx_t_48 = ((PyArrayObject *)__pyx_t_8); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_oresult.rcbuffer->pybuffer); __pyx_t_12 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_oresult.rcbuffer->pybuffer, (PyObject*)__pyx_t_48, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_12 < 0)) { PyErr_Fetch(&__pyx_t_13, &__pyx_t_14, &__pyx_t_15); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_oresult.rcbuffer->pybuffer, (PyObject*)__pyx_v_oresult, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_13); Py_XDECREF(__pyx_t_14); Py_XDECREF(__pyx_t_15); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_13, __pyx_t_14, __pyx_t_15); } } __pyx_pybuffernd_oresult.diminfo[0].strides = __pyx_pybuffernd_oresult.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_oresult.diminfo[0].shape = __pyx_pybuffernd_oresult.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_12 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1133; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} } __pyx_t_48 = 0; __pyx_v_oresult = ((PyArrayObject *)__pyx_t_8); __pyx_t_8 = 0; /* "pandas/tslib.pyx":1134 * * oresult = np.empty(n, dtype=object) * for i in range(n): # <<<<<<<<<<<<<< * val = values[i] * if util.is_datetime64_object(val): */ __pyx_t_1 = __pyx_v_n; for (__pyx_t_16 = 0; __pyx_t_16 < __pyx_t_1; __pyx_t_16+=1) { __pyx_v_i = __pyx_t_16; /* "pandas/tslib.pyx":1135 * oresult = np.empty(n, dtype=object) * for i in range(n): * val = values[i] # <<<<<<<<<<<<<< * if util.is_datetime64_object(val): * oresult[i] = val.item() */ __pyx_t_49 = __pyx_v_i; __pyx_t_12 = -1; if (__pyx_t_49 < 0) { __pyx_t_49 += __pyx_pybuffernd_values.diminfo[0].shape; if (unlikely(__pyx_t_49 < 0)) __pyx_t_12 = 0; } else if (unlikely(__pyx_t_49 >= __pyx_pybuffernd_values.diminfo[0].shape)) __pyx_t_12 = 0; if (unlikely(__pyx_t_12 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_12); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1135; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} } __pyx_t_8 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_49, __pyx_pybuffernd_values.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_8); __Pyx_XDECREF_SET(__pyx_v_val, __pyx_t_8); __pyx_t_8 = 0; /* "pandas/tslib.pyx":1136 * for i in range(n): * val = values[i] * if util.is_datetime64_object(val): # <<<<<<<<<<<<<< * oresult[i] = val.item() * else: */ __pyx_t_19 = (is_datetime64_object(__pyx_v_val) != 0); if (__pyx_t_19) { /* "pandas/tslib.pyx":1137 * val = values[i] * if util.is_datetime64_object(val): * oresult[i] = val.item() # <<<<<<<<<<<<<< * else: * oresult[i] = val */ __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_val, __pyx_n_s_item); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1137; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_43 = PyObject_Call(__pyx_t_8, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_43)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1137; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} __Pyx_GOTREF(__pyx_t_43); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_50 = __pyx_v_i; __pyx_t_12 = -1; if (__pyx_t_50 < 0) { __pyx_t_50 += __pyx_pybuffernd_oresult.diminfo[0].shape; if (unlikely(__pyx_t_50 < 0)) __pyx_t_12 = 0; } else if (unlikely(__pyx_t_50 >= __pyx_pybuffernd_oresult.diminfo[0].shape)) __pyx_t_12 = 0; if (unlikely(__pyx_t_12 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_12); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1137; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} } __pyx_t_51 = __Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_oresult.rcbuffer->pybuffer.buf, __pyx_t_50, __pyx_pybuffernd_oresult.diminfo[0].strides); __Pyx_GOTREF(*__pyx_t_51); __Pyx_INCREF(__pyx_t_43); __Pyx_DECREF(*__pyx_t_51); *__pyx_t_51 = __pyx_t_43; __Pyx_GIVEREF(*__pyx_t_51); __Pyx_DECREF(__pyx_t_43); __pyx_t_43 = 0; goto __pyx_L106; } /*else*/ { /* "pandas/tslib.pyx":1139 * oresult[i] = val.item() * else: * oresult[i] = val # <<<<<<<<<<<<<< * return oresult * except TypeError: */ __pyx_t_52 = __pyx_v_i; __pyx_t_12 = -1; if (__pyx_t_52 < 0) { __pyx_t_52 += __pyx_pybuffernd_oresult.diminfo[0].shape; if (unlikely(__pyx_t_52 < 0)) __pyx_t_12 = 0; } else if (unlikely(__pyx_t_52 >= __pyx_pybuffernd_oresult.diminfo[0].shape)) __pyx_t_12 = 0; if (unlikely(__pyx_t_12 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_12); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1139; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} } __pyx_t_51 = __Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_oresult.rcbuffer->pybuffer.buf, __pyx_t_52, __pyx_pybuffernd_oresult.diminfo[0].strides); __Pyx_GOTREF(*__pyx_t_51); __Pyx_INCREF(__pyx_v_val); __Pyx_DECREF(*__pyx_t_51); *__pyx_t_51 = __pyx_v_val; __Pyx_GIVEREF(*__pyx_t_51); } __pyx_L106:; } /* "pandas/tslib.pyx":1140 * else: * oresult[i] = val * return oresult # <<<<<<<<<<<<<< * except TypeError: * oresult = np.empty(n, dtype=object) */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_oresult)); __pyx_r = ((PyObject *)__pyx_v_oresult); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; goto __pyx_L6_except_return; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; goto __pyx_L4_exception_handled; } /* "pandas/tslib.pyx":1141 * oresult[i] = val * return oresult * except TypeError: # <<<<<<<<<<<<<< * oresult = np.empty(n, dtype=object) * */ __pyx_t_12 = PyErr_ExceptionMatches(__pyx_builtin_TypeError); if (__pyx_t_12) { __Pyx_AddTraceback("pandas.tslib.array_to_datetime", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_10, &__pyx_t_7, &__pyx_t_9) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1141; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_GOTREF(__pyx_t_7); __Pyx_GOTREF(__pyx_t_9); /* "pandas/tslib.pyx":1142 * return oresult * except TypeError: * oresult = np.empty(n, dtype=object) # <<<<<<<<<<<<<< * * for i in range(n): */ __pyx_t_43 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_43)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1142; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} __Pyx_GOTREF(__pyx_t_43); __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_43, __pyx_n_s_empty); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1142; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_43); __pyx_t_43 = 0; __pyx_t_43 = PyInt_FromSsize_t(__pyx_v_n); if (unlikely(!__pyx_t_43)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1142; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} __Pyx_GOTREF(__pyx_t_43); __pyx_t_41 = PyTuple_New(1); if (unlikely(!__pyx_t_41)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1142; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} __Pyx_GOTREF(__pyx_t_41); PyTuple_SET_ITEM(__pyx_t_41, 0, __pyx_t_43); __Pyx_GIVEREF(__pyx_t_43); __pyx_t_43 = 0; __pyx_t_43 = PyDict_New(); if (unlikely(!__pyx_t_43)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1142; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} __Pyx_GOTREF(__pyx_t_43); if (PyDict_SetItem(__pyx_t_43, __pyx_n_s_dtype, __pyx_builtin_object) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1142; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} __pyx_t_42 = PyObject_Call(__pyx_t_8, __pyx_t_41, __pyx_t_43); if (unlikely(!__pyx_t_42)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1142; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} __Pyx_GOTREF(__pyx_t_42); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_41); __pyx_t_41 = 0; __Pyx_DECREF(__pyx_t_43); __pyx_t_43 = 0; if (!(likely(((__pyx_t_42) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_42, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1142; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} __pyx_t_48 = ((PyArrayObject *)__pyx_t_42); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_oresult.rcbuffer->pybuffer); __pyx_t_12 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_oresult.rcbuffer->pybuffer, (PyObject*)__pyx_t_48, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_12 < 0)) { PyErr_Fetch(&__pyx_t_15, &__pyx_t_14, &__pyx_t_13); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_oresult.rcbuffer->pybuffer, (PyObject*)__pyx_v_oresult, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_15); Py_XDECREF(__pyx_t_14); Py_XDECREF(__pyx_t_13); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_15, __pyx_t_14, __pyx_t_13); } } __pyx_pybuffernd_oresult.diminfo[0].strides = __pyx_pybuffernd_oresult.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_oresult.diminfo[0].shape = __pyx_pybuffernd_oresult.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_12 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1142; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} } __pyx_t_48 = 0; __pyx_v_oresult = ((PyArrayObject *)__pyx_t_42); __pyx_t_42 = 0; /* "pandas/tslib.pyx":1144 * oresult = np.empty(n, dtype=object) * * for i in range(n): # <<<<<<<<<<<<<< * val = values[i] * if _checknull_with_nat(val): */ __pyx_t_1 = __pyx_v_n; for (__pyx_t_16 = 0; __pyx_t_16 < __pyx_t_1; __pyx_t_16+=1) { __pyx_v_i = __pyx_t_16; /* "pandas/tslib.pyx":1145 * * for i in range(n): * val = values[i] # <<<<<<<<<<<<<< * if _checknull_with_nat(val): * oresult[i] = val */ __pyx_t_53 = __pyx_v_i; __pyx_t_12 = -1; if (__pyx_t_53 < 0) { __pyx_t_53 += __pyx_pybuffernd_values.diminfo[0].shape; if (unlikely(__pyx_t_53 < 0)) __pyx_t_12 = 0; } else if (unlikely(__pyx_t_53 >= __pyx_pybuffernd_values.diminfo[0].shape)) __pyx_t_12 = 0; if (unlikely(__pyx_t_12 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_12); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1145; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} } __pyx_t_42 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_53, __pyx_pybuffernd_values.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_42); __Pyx_XDECREF_SET(__pyx_v_val, __pyx_t_42); __pyx_t_42 = 0; /* "pandas/tslib.pyx":1146 * for i in range(n): * val = values[i] * if _checknull_with_nat(val): # <<<<<<<<<<<<<< * oresult[i] = val * elif util.is_string_object(val): */ __pyx_t_19 = (__pyx_f_6pandas_5tslib__checknull_with_nat(__pyx_v_val) != 0); if (__pyx_t_19) { /* "pandas/tslib.pyx":1147 * val = values[i] * if _checknull_with_nat(val): * oresult[i] = val # <<<<<<<<<<<<<< * elif util.is_string_object(val): * if len(val) == 0: */ __pyx_t_54 = __pyx_v_i; __pyx_t_12 = -1; if (__pyx_t_54 < 0) { __pyx_t_54 += __pyx_pybuffernd_oresult.diminfo[0].shape; if (unlikely(__pyx_t_54 < 0)) __pyx_t_12 = 0; } else if (unlikely(__pyx_t_54 >= __pyx_pybuffernd_oresult.diminfo[0].shape)) __pyx_t_12 = 0; if (unlikely(__pyx_t_12 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_12); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1147; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} } __pyx_t_51 = __Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_oresult.rcbuffer->pybuffer.buf, __pyx_t_54, __pyx_pybuffernd_oresult.diminfo[0].strides); __Pyx_GOTREF(*__pyx_t_51); __Pyx_INCREF(__pyx_v_val); __Pyx_DECREF(*__pyx_t_51); *__pyx_t_51 = __pyx_v_val; __Pyx_GIVEREF(*__pyx_t_51); goto __pyx_L111; } /* "pandas/tslib.pyx":1148 * if _checknull_with_nat(val): * oresult[i] = val * elif util.is_string_object(val): # <<<<<<<<<<<<<< * if len(val) == 0: * # TODO: ?? */ __pyx_t_19 = (is_string_object(__pyx_v_val) != 0); if (__pyx_t_19) { /* "pandas/tslib.pyx":1149 * oresult[i] = val * elif util.is_string_object(val): * if len(val) == 0: # <<<<<<<<<<<<<< * # TODO: ?? * oresult[i] = 'NaT' */ __pyx_t_55 = PyObject_Length(__pyx_v_val); if (unlikely(__pyx_t_55 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1149; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} __pyx_t_19 = ((__pyx_t_55 == 0) != 0); if (__pyx_t_19) { /* "pandas/tslib.pyx":1151 * if len(val) == 0: * # TODO: ?? * oresult[i] = 'NaT' # <<<<<<<<<<<<<< * continue * try: */ __pyx_t_55 = __pyx_v_i; __pyx_t_12 = -1; if (__pyx_t_55 < 0) { __pyx_t_55 += __pyx_pybuffernd_oresult.diminfo[0].shape; if (unlikely(__pyx_t_55 < 0)) __pyx_t_12 = 0; } else if (unlikely(__pyx_t_55 >= __pyx_pybuffernd_oresult.diminfo[0].shape)) __pyx_t_12 = 0; if (unlikely(__pyx_t_12 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_12); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1151; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} } __pyx_t_51 = __Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_oresult.rcbuffer->pybuffer.buf, __pyx_t_55, __pyx_pybuffernd_oresult.diminfo[0].strides); __Pyx_GOTREF(*__pyx_t_51); __Pyx_INCREF(__pyx_n_s_NaT); __Pyx_DECREF(*__pyx_t_51); *__pyx_t_51 = __pyx_n_s_NaT; __Pyx_GIVEREF(*__pyx_t_51); /* "pandas/tslib.pyx":1152 * # TODO: ?? * oresult[i] = 'NaT' * continue # <<<<<<<<<<<<<< * try: * oresult[i] = parse_datetime_string(val, dayfirst=dayfirst) */ goto __pyx_L109_continue; } /* "pandas/tslib.pyx":1153 * oresult[i] = 'NaT' * continue * try: # <<<<<<<<<<<<<< * oresult[i] = parse_datetime_string(val, dayfirst=dayfirst) * _pydatetime_to_dts(oresult[i], &dts) */ { __Pyx_ExceptionSave(&__pyx_t_13, &__pyx_t_14, &__pyx_t_15); __Pyx_XGOTREF(__pyx_t_13); __Pyx_XGOTREF(__pyx_t_14); __Pyx_XGOTREF(__pyx_t_15); /*try:*/ { /* "pandas/tslib.pyx":1154 * continue * try: * oresult[i] = parse_datetime_string(val, dayfirst=dayfirst) # <<<<<<<<<<<<<< * _pydatetime_to_dts(oresult[i], &dts) * _check_dts_bounds(&dts) */ __pyx_t_42 = __Pyx_GetModuleGlobalName(__pyx_n_s_parse_datetime_string); if (unlikely(!__pyx_t_42)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1154; __pyx_clineno = __LINE__; goto __pyx_L113_error;} __Pyx_GOTREF(__pyx_t_42); __pyx_t_43 = PyTuple_New(1); if (unlikely(!__pyx_t_43)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1154; __pyx_clineno = __LINE__; goto __pyx_L113_error;} __Pyx_GOTREF(__pyx_t_43); __Pyx_INCREF(__pyx_v_val); PyTuple_SET_ITEM(__pyx_t_43, 0, __pyx_v_val); __Pyx_GIVEREF(__pyx_v_val); __pyx_t_41 = PyDict_New(); if (unlikely(!__pyx_t_41)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1154; __pyx_clineno = __LINE__; goto __pyx_L113_error;} __Pyx_GOTREF(__pyx_t_41); if (PyDict_SetItem(__pyx_t_41, __pyx_n_s_dayfirst, __pyx_v_dayfirst) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1154; __pyx_clineno = __LINE__; goto __pyx_L113_error;} __pyx_t_8 = PyObject_Call(__pyx_t_42, __pyx_t_43, __pyx_t_41); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1154; __pyx_clineno = __LINE__; goto __pyx_L113_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_42); __pyx_t_42 = 0; __Pyx_DECREF(__pyx_t_43); __pyx_t_43 = 0; __Pyx_DECREF(__pyx_t_41); __pyx_t_41 = 0; __pyx_t_56 = __pyx_v_i; __pyx_t_12 = -1; if (__pyx_t_56 < 0) { __pyx_t_56 += __pyx_pybuffernd_oresult.diminfo[0].shape; if (unlikely(__pyx_t_56 < 0)) __pyx_t_12 = 0; } else if (unlikely(__pyx_t_56 >= __pyx_pybuffernd_oresult.diminfo[0].shape)) __pyx_t_12 = 0; if (unlikely(__pyx_t_12 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_12); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1154; __pyx_clineno = __LINE__; goto __pyx_L113_error;} } __pyx_t_51 = __Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_oresult.rcbuffer->pybuffer.buf, __pyx_t_56, __pyx_pybuffernd_oresult.diminfo[0].strides); __Pyx_GOTREF(*__pyx_t_51); __Pyx_INCREF(__pyx_t_8); __Pyx_DECREF(*__pyx_t_51); *__pyx_t_51 = __pyx_t_8; __Pyx_GIVEREF(*__pyx_t_51); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; /* "pandas/tslib.pyx":1155 * try: * oresult[i] = parse_datetime_string(val, dayfirst=dayfirst) * _pydatetime_to_dts(oresult[i], &dts) # <<<<<<<<<<<<<< * _check_dts_bounds(&dts) * except Exception: */ __pyx_t_57 = __pyx_v_i; __pyx_t_12 = -1; if (__pyx_t_57 < 0) { __pyx_t_57 += __pyx_pybuffernd_oresult.diminfo[0].shape; if (unlikely(__pyx_t_57 < 0)) __pyx_t_12 = 0; } else if (unlikely(__pyx_t_57 >= __pyx_pybuffernd_oresult.diminfo[0].shape)) __pyx_t_12 = 0; if (unlikely(__pyx_t_12 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_12); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1155; __pyx_clineno = __LINE__; goto __pyx_L113_error;} } __pyx_t_8 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_oresult.rcbuffer->pybuffer.buf, __pyx_t_57, __pyx_pybuffernd_oresult.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_8); __pyx_f_8datetime__pydatetime_to_dts(__pyx_t_8, (&__pyx_v_dts)); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; /* "pandas/tslib.pyx":1156 * oresult[i] = parse_datetime_string(val, dayfirst=dayfirst) * _pydatetime_to_dts(oresult[i], &dts) * _check_dts_bounds(&dts) # <<<<<<<<<<<<<< * except Exception: * if raise_: */ __pyx_t_8 = __pyx_f_6pandas_5tslib__check_dts_bounds((&__pyx_v_dts)); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1156; __pyx_clineno = __LINE__; goto __pyx_L113_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0; goto __pyx_L120_try_end; __pyx_L113_error:; __Pyx_XDECREF(__pyx_t_42); __pyx_t_42 = 0; __Pyx_XDECREF(__pyx_t_43); __pyx_t_43 = 0; __Pyx_XDECREF(__pyx_t_41); __pyx_t_41 = 0; __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; /* "pandas/tslib.pyx":1157 * _pydatetime_to_dts(oresult[i], &dts) * _check_dts_bounds(&dts) * except Exception: # <<<<<<<<<<<<<< * if raise_: * raise */ __pyx_t_12 = PyErr_ExceptionMatches(__pyx_builtin_Exception); if (__pyx_t_12) { __Pyx_AddTraceback("pandas.tslib.array_to_datetime", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_8, &__pyx_t_41, &__pyx_t_43) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1157; __pyx_clineno = __LINE__; goto __pyx_L115_except_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_GOTREF(__pyx_t_41); __Pyx_GOTREF(__pyx_t_43); /* "pandas/tslib.pyx":1158 * _check_dts_bounds(&dts) * except Exception: * if raise_: # <<<<<<<<<<<<<< * raise * return values */ __pyx_t_19 = __Pyx_PyObject_IsTrue(__pyx_v_raise_); if (unlikely(__pyx_t_19 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1158; __pyx_clineno = __LINE__; goto __pyx_L115_except_error;} if (__pyx_t_19) { /* "pandas/tslib.pyx":1159 * except Exception: * if raise_: * raise # <<<<<<<<<<<<<< * return values * # oresult[i] = val */ __Pyx_GIVEREF(__pyx_t_8); __Pyx_GIVEREF(__pyx_t_41); __Pyx_XGIVEREF(__pyx_t_43); __Pyx_ErrRestore(__pyx_t_8, __pyx_t_41, __pyx_t_43); __pyx_t_8 = 0; __pyx_t_41 = 0; __pyx_t_43 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1159; __pyx_clineno = __LINE__; goto __pyx_L115_except_error;} } /* "pandas/tslib.pyx":1160 * if raise_: * raise * return values # <<<<<<<<<<<<<< * # oresult[i] = val * else: */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_values)); __pyx_r = ((PyObject *)__pyx_v_values); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_41); __pyx_t_41 = 0; __Pyx_DECREF(__pyx_t_43); __pyx_t_43 = 0; goto __pyx_L116_except_return; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_41); __pyx_t_41 = 0; __Pyx_DECREF(__pyx_t_43); __pyx_t_43 = 0; goto __pyx_L114_exception_handled; } goto __pyx_L115_except_error; __pyx_L115_except_error:; __Pyx_XGIVEREF(__pyx_t_13); __Pyx_XGIVEREF(__pyx_t_14); __Pyx_XGIVEREF(__pyx_t_15); __Pyx_ExceptionReset(__pyx_t_13, __pyx_t_14, __pyx_t_15); goto __pyx_L5_except_error; __pyx_L116_except_return:; __Pyx_XGIVEREF(__pyx_t_13); __Pyx_XGIVEREF(__pyx_t_14); __Pyx_XGIVEREF(__pyx_t_15); __Pyx_ExceptionReset(__pyx_t_13, __pyx_t_14, __pyx_t_15); goto __pyx_L6_except_return; __pyx_L114_exception_handled:; __Pyx_XGIVEREF(__pyx_t_13); __Pyx_XGIVEREF(__pyx_t_14); __Pyx_XGIVEREF(__pyx_t_15); __Pyx_ExceptionReset(__pyx_t_13, __pyx_t_14, __pyx_t_15); __pyx_L120_try_end:; } goto __pyx_L111; } /*else*/ { /* "pandas/tslib.pyx":1163 * # oresult[i] = val * else: * if raise_: # <<<<<<<<<<<<<< * raise * return values */ __pyx_t_19 = __Pyx_PyObject_IsTrue(__pyx_v_raise_); if (unlikely(__pyx_t_19 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1163; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} if (__pyx_t_19) { /* "pandas/tslib.pyx":1164 * else: * if raise_: * raise # <<<<<<<<<<<<<< * return values * */ __Pyx_GIVEREF(__pyx_t_10); __Pyx_GIVEREF(__pyx_t_7); __Pyx_XGIVEREF(__pyx_t_9); __Pyx_ErrRestore(__pyx_t_10, __pyx_t_7, __pyx_t_9); __pyx_t_10 = 0; __pyx_t_7 = 0; __pyx_t_9 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1164; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} } /* "pandas/tslib.pyx":1165 * if raise_: * raise * return values # <<<<<<<<<<<<<< * * return oresult */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_values)); __pyx_r = ((PyObject *)__pyx_v_values); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; goto __pyx_L6_except_return; } __pyx_L111:; __pyx_L109_continue:; } /* "pandas/tslib.pyx":1167 * return values * * return oresult # <<<<<<<<<<<<<< * * def array_to_timedelta64(ndarray[object] values, coerce=False): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_oresult)); __pyx_r = ((PyObject *)__pyx_v_oresult); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; goto __pyx_L6_except_return; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; goto __pyx_L4_exception_handled; } goto __pyx_L5_except_error; __pyx_L5_except_error:; __Pyx_XGIVEREF(__pyx_t_4); __Pyx_XGIVEREF(__pyx_t_5); __Pyx_XGIVEREF(__pyx_t_6); __Pyx_ExceptionReset(__pyx_t_4, __pyx_t_5, __pyx_t_6); goto __pyx_L1_error; __pyx_L7_try_return:; __Pyx_XGIVEREF(__pyx_t_4); __Pyx_XGIVEREF(__pyx_t_5); __Pyx_XGIVEREF(__pyx_t_6); __Pyx_ExceptionReset(__pyx_t_4, __pyx_t_5, __pyx_t_6); goto __pyx_L0; __pyx_L6_except_return:; __Pyx_XGIVEREF(__pyx_t_4); __Pyx_XGIVEREF(__pyx_t_5); __Pyx_XGIVEREF(__pyx_t_6); __Pyx_ExceptionReset(__pyx_t_4, __pyx_t_5, __pyx_t_6); goto __pyx_L0; __pyx_L4_exception_handled:; __Pyx_XGIVEREF(__pyx_t_4); __Pyx_XGIVEREF(__pyx_t_5); __Pyx_XGIVEREF(__pyx_t_6); __Pyx_ExceptionReset(__pyx_t_4, __pyx_t_5, __pyx_t_6); __pyx_L10_try_end:; } /* "pandas/tslib.pyx":1000 * return dt * * def array_to_datetime(ndarray[object] values, raise_=False, dayfirst=False, # <<<<<<<<<<<<<< * format=None, utc=None, coerce=False, unit=None): * cdef: */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); __Pyx_XDECREF(__pyx_t_10); __Pyx_XDECREF(__pyx_t_41); __Pyx_XDECREF(__pyx_t_42); __Pyx_XDECREF(__pyx_t_43); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_iresult.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_oresult.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.tslib.array_to_datetime", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_iresult.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_oresult.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF(__pyx_v_val); __Pyx_XDECREF((PyObject *)__pyx_v_iresult); __Pyx_XDECREF((PyObject *)__pyx_v_oresult); __Pyx_XDECREF((PyObject *)__pyx_v__ts); __Pyx_XDECREF(__pyx_v_result); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/tslib.pyx":1169 * return oresult * * def array_to_timedelta64(ndarray[object] values, coerce=False): # <<<<<<<<<<<<<< * """ convert an ndarray to an array of ints that are timedeltas * force conversion if coerce = True, */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5tslib_29array_to_timedelta64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6pandas_5tslib_28array_to_timedelta64[] = " convert an ndarray to an array of ints that are timedeltas\n force conversion if coerce = True,\n else will raise if cannot convert "; static PyMethodDef __pyx_mdef_6pandas_5tslib_29array_to_timedelta64 = {__Pyx_NAMESTR("array_to_timedelta64"), (PyCFunction)__pyx_pw_6pandas_5tslib_29array_to_timedelta64, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_5tslib_28array_to_timedelta64)}; static PyObject *__pyx_pw_6pandas_5tslib_29array_to_timedelta64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_values = 0; PyObject *__pyx_v_coerce = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("array_to_timedelta64 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_values,&__pyx_n_s_coerce,0}; PyObject* values[2] = {0,0}; values[1] = ((PyObject *)Py_False); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_values)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_coerce); if (value) { values[1] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "array_to_timedelta64") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1169; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_values = ((PyArrayObject *)values[0]); __pyx_v_coerce = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("array_to_timedelta64", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1169; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.tslib.array_to_timedelta64", __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_filename = __pyx_f[0]; __pyx_lineno = 1169; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5tslib_28array_to_timedelta64(__pyx_self, __pyx_v_values, __pyx_v_coerce); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5tslib_28array_to_timedelta64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyObject *__pyx_v_coerce) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_n; PyArrayObject *__pyx_v_iresult = 0; PyObject *__pyx_v_result = NULL; __Pyx_LocalBuf_ND __pyx_pybuffernd_iresult; __Pyx_Buffer __pyx_pybuffer_iresult; __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; PyArrayObject *__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; Py_ssize_t __pyx_t_11; Py_ssize_t __pyx_t_12; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("array_to_timedelta64", 0); __pyx_pybuffer_iresult.pybuffer.buf = NULL; __pyx_pybuffer_iresult.refcount = 0; __pyx_pybuffernd_iresult.data = NULL; __pyx_pybuffernd_iresult.rcbuffer = &__pyx_pybuffer_iresult; __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_filename = __pyx_f[0]; __pyx_lineno = 1169; __pyx_clineno = __LINE__; goto __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/tslib.pyx":1177 * ndarray[int64_t] iresult * * n = values.shape[0] # <<<<<<<<<<<<<< * result = np.empty(n, dtype='m8[ns]') * iresult = result.view('i8') */ __pyx_v_n = (__pyx_v_values->dimensions[0]); /* "pandas/tslib.pyx":1178 * * n = values.shape[0] * result = np.empty(n, dtype='m8[ns]') # <<<<<<<<<<<<<< * iresult = result.view('i8') * */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1178; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 1178; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 1178; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1178; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1178; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_dtype, __pyx_kp_s_m8_ns) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1178; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_4 = PyObject_Call(__pyx_t_2, __pyx_t_3, __pyx_t_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1178; __pyx_clineno = __LINE__; goto __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; __pyx_v_result = __pyx_t_4; __pyx_t_4 = 0; /* "pandas/tslib.pyx":1179 * n = values.shape[0] * result = np.empty(n, dtype='m8[ns]') * iresult = result.view('i8') # <<<<<<<<<<<<<< * * for i in range(n): */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_result, __pyx_n_s_view); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1179; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_1 = PyObject_Call(__pyx_t_4, __pyx_tuple__29, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1179; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __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_filename = __pyx_f[0]; __pyx_lineno = 1179; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_5 = ((PyArrayObject *)__pyx_t_1); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_iresult.rcbuffer->pybuffer); __pyx_t_6 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_iresult.rcbuffer->pybuffer, (PyObject*)__pyx_t_5, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_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_iresult.rcbuffer->pybuffer, (PyObject*)__pyx_v_iresult, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_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_pybuffernd_iresult.diminfo[0].strides = __pyx_pybuffernd_iresult.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_iresult.diminfo[0].shape = __pyx_pybuffernd_iresult.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1179; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_5 = 0; __pyx_v_iresult = ((PyArrayObject *)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/tslib.pyx":1181 * iresult = result.view('i8') * * for i in range(n): # <<<<<<<<<<<<<< * result[i] = convert_to_timedelta64(values[i], 'ns', coerce) * return iresult */ __pyx_t_10 = __pyx_v_n; for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_10; __pyx_t_11+=1) { __pyx_v_i = __pyx_t_11; /* "pandas/tslib.pyx":1182 * * for i in range(n): * result[i] = convert_to_timedelta64(values[i], 'ns', coerce) # <<<<<<<<<<<<<< * return iresult * */ __pyx_t_12 = __pyx_v_i; __pyx_t_6 = -1; if (__pyx_t_12 < 0) { __pyx_t_12 += __pyx_pybuffernd_values.diminfo[0].shape; if (unlikely(__pyx_t_12 < 0)) __pyx_t_6 = 0; } else if (unlikely(__pyx_t_12 >= __pyx_pybuffernd_values.diminfo[0].shape)) __pyx_t_6 = 0; if (unlikely(__pyx_t_6 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_6); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1182; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_1 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_12, __pyx_pybuffernd_values.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_1); __pyx_t_4 = __pyx_f_6pandas_5tslib_convert_to_timedelta64(__pyx_t_1, __pyx_n_s_ns, __pyx_v_coerce); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1182; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (unlikely(__Pyx_SetItemInt(__pyx_v_result, __pyx_v_i, __pyx_t_4, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1182; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } /* "pandas/tslib.pyx":1183 * for i in range(n): * result[i] = convert_to_timedelta64(values[i], 'ns', coerce) * return iresult # <<<<<<<<<<<<<< * * def convert_to_timedelta(object ts, object unit='ns', coerce=False): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_iresult)); __pyx_r = ((PyObject *)__pyx_v_iresult); goto __pyx_L0; /* "pandas/tslib.pyx":1169 * return oresult * * def array_to_timedelta64(ndarray[object] values, coerce=False): # <<<<<<<<<<<<<< * """ convert an ndarray to an array of ints that are timedeltas * force conversion if coerce = True, */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_iresult.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.tslib.array_to_timedelta64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_iresult.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_iresult); __Pyx_XDECREF(__pyx_v_result); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/tslib.pyx":1185 * return iresult * * def convert_to_timedelta(object ts, object unit='ns', coerce=False): # <<<<<<<<<<<<<< * return convert_to_timedelta64(ts, unit, coerce) * */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5tslib_31convert_to_timedelta(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5tslib_31convert_to_timedelta = {__Pyx_NAMESTR("convert_to_timedelta"), (PyCFunction)__pyx_pw_6pandas_5tslib_31convert_to_timedelta, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5tslib_31convert_to_timedelta(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_ts = 0; PyObject *__pyx_v_unit = 0; PyObject *__pyx_v_coerce = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("convert_to_timedelta (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ts,&__pyx_n_s_unit,&__pyx_n_s_coerce,0}; PyObject* values[3] = {0,0,0}; values[1] = ((PyObject *)__pyx_n_s_ns); values[2] = ((PyObject *)Py_False); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ts)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_unit); if (value) { values[1] = value; kw_args--; } } case 2: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_coerce); if (value) { values[2] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "convert_to_timedelta") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1185; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_ts = values[0]; __pyx_v_unit = values[1]; __pyx_v_coerce = values[2]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("convert_to_timedelta", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1185; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.tslib.convert_to_timedelta", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pandas_5tslib_30convert_to_timedelta(__pyx_self, __pyx_v_ts, __pyx_v_unit, __pyx_v_coerce); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5tslib_30convert_to_timedelta(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_ts, PyObject *__pyx_v_unit, PyObject *__pyx_v_coerce) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("convert_to_timedelta", 0); /* "pandas/tslib.pyx":1186 * * def convert_to_timedelta(object ts, object unit='ns', coerce=False): * return convert_to_timedelta64(ts, unit, coerce) # <<<<<<<<<<<<<< * * cdef convert_to_timedelta64(object ts, object unit, object coerce): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_6pandas_5tslib_convert_to_timedelta64(__pyx_v_ts, __pyx_v_unit, __pyx_v_coerce); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1186; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "pandas/tslib.pyx":1185 * return iresult * * def convert_to_timedelta(object ts, object unit='ns', coerce=False): # <<<<<<<<<<<<<< * return convert_to_timedelta64(ts, unit, coerce) * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas.tslib.convert_to_timedelta", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/tslib.pyx":1188 * return convert_to_timedelta64(ts, unit, coerce) * * cdef convert_to_timedelta64(object ts, object unit, object coerce): # <<<<<<<<<<<<<< * """ * Convert an incoming object to a timedelta64 if possible */ static PyObject *__pyx_f_6pandas_5tslib_convert_to_timedelta64(PyObject *__pyx_v_ts, PyObject *__pyx_v_unit, PyObject *__pyx_v_coerce) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; int __pyx_t_5; PyObject *__pyx_t_6 = NULL; __pyx_t_5numpy_int64_t __pyx_t_7; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("convert_to_timedelta64", 0); __Pyx_INCREF(__pyx_v_ts); /* "pandas/tslib.pyx":1205 * # handle the numpy < 1.7 case * """ * if _checknull_with_nat(ts): # <<<<<<<<<<<<<< * ts = np.timedelta64(iNaT) * elif util.is_datetime64_object(ts): */ __pyx_t_1 = (__pyx_f_6pandas_5tslib__checknull_with_nat(__pyx_v_ts) != 0); if (__pyx_t_1) { /* "pandas/tslib.pyx":1206 * """ * if _checknull_with_nat(ts): * ts = np.timedelta64(iNaT) # <<<<<<<<<<<<<< * elif util.is_datetime64_object(ts): * # only accept a NaT here */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1206; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_timedelta64); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1206; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_iNaT); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1206; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1206; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_Call(__pyx_t_3, __pyx_t_4, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1206; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF_SET(__pyx_v_ts, __pyx_t_2); __pyx_t_2 = 0; goto __pyx_L3; } /* "pandas/tslib.pyx":1207 * if _checknull_with_nat(ts): * ts = np.timedelta64(iNaT) * elif util.is_datetime64_object(ts): # <<<<<<<<<<<<<< * # only accept a NaT here * if ts.astype('int64') == iNaT: */ __pyx_t_1 = (is_datetime64_object(__pyx_v_ts) != 0); if (__pyx_t_1) { /* "pandas/tslib.pyx":1209 * elif util.is_datetime64_object(ts): * # only accept a NaT here * if ts.astype('int64') == iNaT: # <<<<<<<<<<<<<< * ts = np.timedelta64(iNaT) * elif isinstance(ts, np.timedelta64): */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_ts, __pyx_n_s_astype); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1209; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = PyObject_Call(__pyx_t_2, __pyx_tuple__30, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1209; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_iNaT); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1209; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyObject_RichCompare(__pyx_t_4, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1209; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1209; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_1) { /* "pandas/tslib.pyx":1210 * # only accept a NaT here * if ts.astype('int64') == iNaT: * ts = np.timedelta64(iNaT) # <<<<<<<<<<<<<< * elif isinstance(ts, np.timedelta64): * ts = ts.astype("m8[{0}]".format(unit.lower())) */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1210; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_timedelta64); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1210; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_iNaT); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1210; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1210; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1210; __pyx_clineno = __LINE__; goto __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_SET(__pyx_v_ts, __pyx_t_3); __pyx_t_3 = 0; goto __pyx_L4; } __pyx_L4:; goto __pyx_L3; } /* "pandas/tslib.pyx":1211 * if ts.astype('int64') == iNaT: * ts = np.timedelta64(iNaT) * elif isinstance(ts, np.timedelta64): # <<<<<<<<<<<<<< * ts = ts.astype("m8[{0}]".format(unit.lower())) * elif is_integer_object(ts): */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1211; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_timedelta64); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1211; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_1 = PyObject_IsInstance(__pyx_v_ts, __pyx_t_4); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1211; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_5 = (__pyx_t_1 != 0); if (__pyx_t_5) { /* "pandas/tslib.pyx":1212 * ts = np.timedelta64(iNaT) * elif isinstance(ts, np.timedelta64): * ts = ts.astype("m8[{0}]".format(unit.lower())) # <<<<<<<<<<<<<< * elif is_integer_object(ts): * if ts == iNaT: */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_ts, __pyx_n_s_astype); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1212; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_m8_0, __pyx_n_s_format); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1212; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_unit, __pyx_n_s_lower); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1212; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_6 = PyObject_Call(__pyx_t_2, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1212; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1212; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyObject_Call(__pyx_t_3, __pyx_t_2, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1212; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1212; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyObject_Call(__pyx_t_4, __pyx_t_2, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1212; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF_SET(__pyx_v_ts, __pyx_t_6); __pyx_t_6 = 0; goto __pyx_L3; } /* "pandas/tslib.pyx":1213 * elif isinstance(ts, np.timedelta64): * ts = ts.astype("m8[{0}]".format(unit.lower())) * elif is_integer_object(ts): # <<<<<<<<<<<<<< * if ts == iNaT: * ts = np.timedelta64(iNaT) */ __pyx_t_5 = (is_integer_object(__pyx_v_ts) != 0); if (__pyx_t_5) { /* "pandas/tslib.pyx":1214 * ts = ts.astype("m8[{0}]".format(unit.lower())) * elif is_integer_object(ts): * if ts == iNaT: # <<<<<<<<<<<<<< * ts = np.timedelta64(iNaT) * else: */ __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_iNaT); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1214; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_2 = PyObject_RichCompare(__pyx_v_ts, __pyx_t_6, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1214; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1214; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_5) { /* "pandas/tslib.pyx":1215 * elif is_integer_object(ts): * if ts == iNaT: * ts = np.timedelta64(iNaT) # <<<<<<<<<<<<<< * else: * if util.is_array(ts): */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1215; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_timedelta64); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1215; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_iNaT); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1215; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1215; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_Call(__pyx_t_6, __pyx_t_4, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1215; __pyx_clineno = __LINE__; goto __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_DECREF_SET(__pyx_v_ts, __pyx_t_2); __pyx_t_2 = 0; goto __pyx_L5; } /*else*/ { /* "pandas/tslib.pyx":1217 * ts = np.timedelta64(iNaT) * else: * if util.is_array(ts): # <<<<<<<<<<<<<< * ts = ts.astype('int64').item() * ts = cast_from_unit(ts, unit) */ __pyx_t_2 = __pyx_f_4util_is_array(__pyx_v_ts); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1217; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1217; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_5) { /* "pandas/tslib.pyx":1218 * else: * if util.is_array(ts): * ts = ts.astype('int64').item() # <<<<<<<<<<<<<< * ts = cast_from_unit(ts, unit) * if _np_version_under1p7: */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_ts, __pyx_n_s_astype); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1218; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = PyObject_Call(__pyx_t_2, __pyx_tuple__31, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1218; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_item); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1218; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyObject_Call(__pyx_t_2, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1218; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF_SET(__pyx_v_ts, __pyx_t_4); __pyx_t_4 = 0; goto __pyx_L6; } __pyx_L6:; /* "pandas/tslib.pyx":1219 * if util.is_array(ts): * ts = ts.astype('int64').item() * ts = cast_from_unit(ts, unit) # <<<<<<<<<<<<<< * if _np_version_under1p7: * ts = timedelta(microseconds=ts/1000.0) */ __pyx_t_7 = __pyx_f_6pandas_5tslib_cast_from_unit(__pyx_v_ts, __pyx_v_unit, 0); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1219; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_4 = __Pyx_PyInt_From_npy_int64(__pyx_t_7); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1219; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF_SET(__pyx_v_ts, __pyx_t_4); __pyx_t_4 = 0; /* "pandas/tslib.pyx":1220 * ts = ts.astype('int64').item() * ts = cast_from_unit(ts, unit) * if _np_version_under1p7: # <<<<<<<<<<<<<< * ts = timedelta(microseconds=ts/1000.0) * else: */ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_np_version_under1p7); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1220; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1220; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_5) { /* "pandas/tslib.pyx":1221 * ts = cast_from_unit(ts, unit) * if _np_version_under1p7: * ts = timedelta(microseconds=ts/1000.0) # <<<<<<<<<<<<<< * else: * ts = np.timedelta64(ts) */ __pyx_t_4 = PyDict_New(); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1221; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_2 = __Pyx_PyNumber_Divide(__pyx_v_ts, __pyx_float_1000_0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1221; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_microseconds, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1221; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_8datetime_timedelta)), __pyx_empty_tuple, __pyx_t_4); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1221; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF_SET(__pyx_v_ts, __pyx_t_2); __pyx_t_2 = 0; goto __pyx_L7; } /*else*/ { /* "pandas/tslib.pyx":1223 * ts = timedelta(microseconds=ts/1000.0) * else: * ts = np.timedelta64(ts) # <<<<<<<<<<<<<< * * if _np_version_under1p7: */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1223; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_timedelta64); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1223; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1223; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_ts); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_ts); __Pyx_GIVEREF(__pyx_v_ts); __pyx_t_6 = PyObject_Call(__pyx_t_4, __pyx_t_2, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1223; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF_SET(__pyx_v_ts, __pyx_t_6); __pyx_t_6 = 0; } __pyx_L7:; } __pyx_L5:; goto __pyx_L3; } __pyx_L3:; /* "pandas/tslib.pyx":1225 * ts = np.timedelta64(ts) * * if _np_version_under1p7: # <<<<<<<<<<<<<< * if not isinstance(ts, timedelta): * if coerce: */ __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_np_version_under1p7); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1225; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1225; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (__pyx_t_5) { /* "pandas/tslib.pyx":1226 * * if _np_version_under1p7: * if not isinstance(ts, timedelta): # <<<<<<<<<<<<<< * if coerce: * return np.timedelta64(iNaT) */ __pyx_t_5 = __Pyx_TypeCheck(__pyx_v_ts, ((PyObject*)__pyx_ptype_8datetime_timedelta)); __pyx_t_1 = ((!(__pyx_t_5 != 0)) != 0); if (__pyx_t_1) { /* "pandas/tslib.pyx":1227 * if _np_version_under1p7: * if not isinstance(ts, timedelta): * if coerce: # <<<<<<<<<<<<<< * return np.timedelta64(iNaT) * raise ValueError("Invalid type for timedelta scalar: %s" % type(ts)) */ __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_coerce); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1227; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__pyx_t_1) { /* "pandas/tslib.pyx":1228 * if not isinstance(ts, timedelta): * if coerce: * return np.timedelta64(iNaT) # <<<<<<<<<<<<<< * raise ValueError("Invalid type for timedelta scalar: %s" % type(ts)) * if not PY2: */ __Pyx_XDECREF(__pyx_r); __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1228; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_timedelta64); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1228; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_iNaT); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1228; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1228; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1228; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_r = __pyx_t_6; __pyx_t_6 = 0; goto __pyx_L0; } /* "pandas/tslib.pyx":1229 * if coerce: * return np.timedelta64(iNaT) * raise ValueError("Invalid type for timedelta scalar: %s" % type(ts)) # <<<<<<<<<<<<<< * if not PY2: * # convert to microseconds in timedelta64 */ __pyx_t_6 = __Pyx_PyString_Format(__pyx_kp_s_Invalid_type_for_timedelta_scala, ((PyObject *)Py_TYPE(__pyx_v_ts))); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1229; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1229; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyObject_Call(__pyx_builtin_ValueError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1229; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_Raise(__pyx_t_6, 0, 0, 0); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1229; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } /* "pandas/tslib.pyx":1230 * return np.timedelta64(iNaT) * raise ValueError("Invalid type for timedelta scalar: %s" % type(ts)) * if not PY2: # <<<<<<<<<<<<<< * # convert to microseconds in timedelta64 * ts = np.timedelta64(int(ts.total_seconds()*1e9 + ts.microseconds*1000)) */ __pyx_t_1 = ((!(__pyx_v_6pandas_5tslib_PY2 != 0)) != 0); if (__pyx_t_1) { /* "pandas/tslib.pyx":1232 * if not PY2: * # convert to microseconds in timedelta64 * ts = np.timedelta64(int(ts.total_seconds()*1e9 + ts.microseconds*1000)) # <<<<<<<<<<<<<< * else: * return ts */ __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1232; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_timedelta64); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1232; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_ts, __pyx_n_s_total_seconds); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1232; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_2 = PyObject_Call(__pyx_t_6, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1232; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyNumber_Multiply(__pyx_t_2, __pyx_float_1e9); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1232; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_ts, __pyx_n_s_microseconds); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1232; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyNumber_Multiply(__pyx_t_2, __pyx_int_1000); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1232; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyNumber_Add(__pyx_t_6, __pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1232; __pyx_clineno = __LINE__; goto __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_t_3 = PyNumber_Int(__pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1232; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1232; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyObject_Call(__pyx_t_4, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1232; __pyx_clineno = __LINE__; goto __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_DECREF_SET(__pyx_v_ts, __pyx_t_3); __pyx_t_3 = 0; goto __pyx_L11; } /*else*/ { /* "pandas/tslib.pyx":1234 * ts = np.timedelta64(int(ts.total_seconds()*1e9 + ts.microseconds*1000)) * else: * return ts # <<<<<<<<<<<<<< * * if isinstance(ts, timedelta): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_ts); __pyx_r = __pyx_v_ts; goto __pyx_L0; } __pyx_L11:; goto __pyx_L8; } __pyx_L8:; /* "pandas/tslib.pyx":1236 * return ts * * if isinstance(ts, timedelta): # <<<<<<<<<<<<<< * ts = np.timedelta64(ts) * elif not isinstance(ts, np.timedelta64): */ __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_ts, ((PyObject*)__pyx_ptype_8datetime_timedelta)); __pyx_t_5 = (__pyx_t_1 != 0); if (__pyx_t_5) { /* "pandas/tslib.pyx":1237 * * if isinstance(ts, timedelta): * ts = np.timedelta64(ts) # <<<<<<<<<<<<<< * elif not isinstance(ts, np.timedelta64): * if coerce: */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1237; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_timedelta64); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1237; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1237; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_v_ts); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_ts); __Pyx_GIVEREF(__pyx_v_ts); __pyx_t_4 = PyObject_Call(__pyx_t_2, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1237; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF_SET(__pyx_v_ts, __pyx_t_4); __pyx_t_4 = 0; goto __pyx_L12; } /* "pandas/tslib.pyx":1238 * if isinstance(ts, timedelta): * ts = np.timedelta64(ts) * elif not isinstance(ts, np.timedelta64): # <<<<<<<<<<<<<< * if coerce: * return np.timedelta64(iNaT) */ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1238; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_timedelta64); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1238; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_5 = PyObject_IsInstance(__pyx_v_ts, __pyx_t_3); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1238; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_1 = ((!(__pyx_t_5 != 0)) != 0); if (__pyx_t_1) { /* "pandas/tslib.pyx":1239 * ts = np.timedelta64(ts) * elif not isinstance(ts, np.timedelta64): * if coerce: # <<<<<<<<<<<<<< * return np.timedelta64(iNaT) * raise ValueError("Invalid type for timedelta scalar: %s" % type(ts)) */ __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_coerce); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1239; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__pyx_t_1) { /* "pandas/tslib.pyx":1240 * elif not isinstance(ts, np.timedelta64): * if coerce: * return np.timedelta64(iNaT) # <<<<<<<<<<<<<< * raise ValueError("Invalid type for timedelta scalar: %s" % type(ts)) * return ts.astype('timedelta64[ns]') */ __Pyx_XDECREF(__pyx_r); __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1240; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_timedelta64); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1240; __pyx_clineno = __LINE__; goto __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_iNaT); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1240; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1240; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyObject_Call(__pyx_t_4, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1240; __pyx_clineno = __LINE__; goto __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_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; } /* "pandas/tslib.pyx":1241 * if coerce: * return np.timedelta64(iNaT) * raise ValueError("Invalid type for timedelta scalar: %s" % type(ts)) # <<<<<<<<<<<<<< * return ts.astype('timedelta64[ns]') * */ __pyx_t_3 = __Pyx_PyString_Format(__pyx_kp_s_Invalid_type_for_timedelta_scala, ((PyObject *)Py_TYPE(__pyx_v_ts))); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1241; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1241; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyObject_Call(__pyx_builtin_ValueError, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1241; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __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_filename = __pyx_f[0]; __pyx_lineno = 1241; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_L12:; /* "pandas/tslib.pyx":1242 * return np.timedelta64(iNaT) * raise ValueError("Invalid type for timedelta scalar: %s" % type(ts)) * return ts.astype('timedelta64[ns]') # <<<<<<<<<<<<<< * * def repr_timedelta64(object value, format=None): */ __Pyx_XDECREF(__pyx_r); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_ts, __pyx_n_s_astype); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1242; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = PyObject_Call(__pyx_t_3, __pyx_tuple__32, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1242; __pyx_clineno = __LINE__; goto __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/tslib.pyx":1188 * return convert_to_timedelta64(ts, unit, coerce) * * cdef convert_to_timedelta64(object ts, object unit, object coerce): # <<<<<<<<<<<<<< * """ * Convert an incoming object to a timedelta64 if possible */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("pandas.tslib.convert_to_timedelta64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_ts); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/tslib.pyx":1244 * return ts.astype('timedelta64[ns]') * * def repr_timedelta64(object value, format=None): # <<<<<<<<<<<<<< * """ * provide repr for timedelta64 */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5tslib_33repr_timedelta64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6pandas_5tslib_32repr_timedelta64[] = "\n provide repr for timedelta64\n\n Parameters\n ----------\n value : timedelta64\n format : None|\"short\"|\"long\"\n\n Returns\n -------\n converted : Timestamp\n\n "; static PyMethodDef __pyx_mdef_6pandas_5tslib_33repr_timedelta64 = {__Pyx_NAMESTR("repr_timedelta64"), (PyCFunction)__pyx_pw_6pandas_5tslib_33repr_timedelta64, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_5tslib_32repr_timedelta64)}; static PyObject *__pyx_pw_6pandas_5tslib_33repr_timedelta64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_value = 0; PyObject *__pyx_v_format = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("repr_timedelta64 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_value,&__pyx_n_s_format,0}; PyObject* values[2] = {0,0}; values[1] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_value)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_format); if (value) { values[1] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "repr_timedelta64") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1244; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_value = values[0]; __pyx_v_format = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("repr_timedelta64", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1244; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.tslib.repr_timedelta64", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pandas_5tslib_32repr_timedelta64(__pyx_self, __pyx_v_value, __pyx_v_format); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5tslib_32repr_timedelta64(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_value, PyObject *__pyx_v_format) { PyObject *__pyx_v_ivalue = 0; PyObject *__pyx_v_frac = NULL; PyObject *__pyx_v_sign = NULL; PyObject *__pyx_v_days = NULL; PyObject *__pyx_v_hours = NULL; PyObject *__pyx_v_minutes = NULL; PyObject *__pyx_v_seconds = NULL; PyObject *__pyx_v_seconds_pretty = NULL; PyObject *__pyx_v_sp = NULL; PyObject *__pyx_v_sign_pretty = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; double __pyx_t_3; PyObject *__pyx_t_4 = NULL; int __pyx_t_5; int __pyx_t_6; int __pyx_t_7; int __pyx_t_8; int __pyx_t_9; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("repr_timedelta64", 0); /* "pandas/tslib.pyx":1260 * cdef object ivalue * * ivalue = value.view('i8') # <<<<<<<<<<<<<< * * # put frac in seconds */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_value, __pyx_n_s_view); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1260; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyObject_Call(__pyx_t_1, __pyx_tuple__33, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1260; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_ivalue = __pyx_t_2; __pyx_t_2 = 0; /* "pandas/tslib.pyx":1263 * * # put frac in seconds * frac = float(ivalue)/1e9 # <<<<<<<<<<<<<< * sign = np.sign(frac) * frac = np.abs(frac) */ __pyx_t_3 = __Pyx_PyObject_AsDouble(__pyx_v_ivalue); if (unlikely(__pyx_t_3 == ((double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1263; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_2 = PyFloat_FromDouble((__pyx_t_3 / 1e9)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1263; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_v_frac = __pyx_t_2; __pyx_t_2 = 0; /* "pandas/tslib.pyx":1264 * # put frac in seconds * frac = float(ivalue)/1e9 * sign = np.sign(frac) # <<<<<<<<<<<<<< * frac = np.abs(frac) * */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1264; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_sign); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1264; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1264; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_frac); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_frac); __Pyx_GIVEREF(__pyx_v_frac); __pyx_t_4 = PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1264; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_sign = __pyx_t_4; __pyx_t_4 = 0; /* "pandas/tslib.pyx":1265 * frac = float(ivalue)/1e9 * sign = np.sign(frac) * frac = np.abs(frac) # <<<<<<<<<<<<<< * * if frac >= 86400: */ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1265; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_abs); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1265; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1265; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_v_frac); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_frac); __Pyx_GIVEREF(__pyx_v_frac); __pyx_t_1 = PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1265; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF_SET(__pyx_v_frac, __pyx_t_1); __pyx_t_1 = 0; /* "pandas/tslib.pyx":1267 * frac = np.abs(frac) * * if frac >= 86400: # <<<<<<<<<<<<<< * days = int(frac / 86400) * frac -= days * 86400 */ __pyx_t_1 = PyObject_RichCompare(__pyx_v_frac, __pyx_int_86400, Py_GE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1267; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1267; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_5) { /* "pandas/tslib.pyx":1268 * * if frac >= 86400: * days = int(frac / 86400) # <<<<<<<<<<<<<< * frac -= days * 86400 * else: */ __pyx_t_1 = __Pyx_PyNumber_Divide(__pyx_v_frac, __pyx_int_86400); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1268; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = PyNumber_Int(__pyx_t_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1268; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_days = __pyx_t_4; __pyx_t_4 = 0; /* "pandas/tslib.pyx":1269 * if frac >= 86400: * days = int(frac / 86400) * frac -= days * 86400 # <<<<<<<<<<<<<< * else: * days = 0 */ __pyx_t_4 = PyNumber_Multiply(__pyx_v_days, __pyx_int_86400); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1269; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_1 = PyNumber_InPlaceSubtract(__pyx_v_frac, __pyx_t_4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1269; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF_SET(__pyx_v_frac, __pyx_t_1); __pyx_t_1 = 0; goto __pyx_L3; } /*else*/ { /* "pandas/tslib.pyx":1271 * frac -= days * 86400 * else: * days = 0 # <<<<<<<<<<<<<< * * if frac >= 3600: */ __Pyx_INCREF(__pyx_int_0); __pyx_v_days = __pyx_int_0; } __pyx_L3:; /* "pandas/tslib.pyx":1273 * days = 0 * * if frac >= 3600: # <<<<<<<<<<<<<< * hours = int(frac / 3600) * frac -= hours * 3600 */ __pyx_t_1 = PyObject_RichCompare(__pyx_v_frac, __pyx_int_3600, Py_GE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1273; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1273; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_5) { /* "pandas/tslib.pyx":1274 * * if frac >= 3600: * hours = int(frac / 3600) # <<<<<<<<<<<<<< * frac -= hours * 3600 * else: */ __pyx_t_1 = __Pyx_PyNumber_Divide(__pyx_v_frac, __pyx_int_3600); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1274; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = PyNumber_Int(__pyx_t_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1274; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_hours = __pyx_t_4; __pyx_t_4 = 0; /* "pandas/tslib.pyx":1275 * if frac >= 3600: * hours = int(frac / 3600) * frac -= hours * 3600 # <<<<<<<<<<<<<< * else: * hours = 0 */ __pyx_t_4 = PyNumber_Multiply(__pyx_v_hours, __pyx_int_3600); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1275; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_1 = PyNumber_InPlaceSubtract(__pyx_v_frac, __pyx_t_4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1275; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF_SET(__pyx_v_frac, __pyx_t_1); __pyx_t_1 = 0; goto __pyx_L4; } /*else*/ { /* "pandas/tslib.pyx":1277 * frac -= hours * 3600 * else: * hours = 0 # <<<<<<<<<<<<<< * * if frac >= 60: */ __Pyx_INCREF(__pyx_int_0); __pyx_v_hours = __pyx_int_0; } __pyx_L4:; /* "pandas/tslib.pyx":1279 * hours = 0 * * if frac >= 60: # <<<<<<<<<<<<<< * minutes = int(frac / 60) * frac -= minutes * 60 */ __pyx_t_1 = PyObject_RichCompare(__pyx_v_frac, __pyx_int_60, Py_GE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1279; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1279; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_5) { /* "pandas/tslib.pyx":1280 * * if frac >= 60: * minutes = int(frac / 60) # <<<<<<<<<<<<<< * frac -= minutes * 60 * else: */ __pyx_t_1 = __Pyx_PyNumber_Divide(__pyx_v_frac, __pyx_int_60); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1280; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = PyNumber_Int(__pyx_t_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1280; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_minutes = __pyx_t_4; __pyx_t_4 = 0; /* "pandas/tslib.pyx":1281 * if frac >= 60: * minutes = int(frac / 60) * frac -= minutes * 60 # <<<<<<<<<<<<<< * else: * minutes = 0 */ __pyx_t_4 = PyNumber_Multiply(__pyx_v_minutes, __pyx_int_60); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1281; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_1 = PyNumber_InPlaceSubtract(__pyx_v_frac, __pyx_t_4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1281; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF_SET(__pyx_v_frac, __pyx_t_1); __pyx_t_1 = 0; goto __pyx_L5; } /*else*/ { /* "pandas/tslib.pyx":1283 * frac -= minutes * 60 * else: * minutes = 0 # <<<<<<<<<<<<<< * * if frac >= 1: */ __Pyx_INCREF(__pyx_int_0); __pyx_v_minutes = __pyx_int_0; } __pyx_L5:; /* "pandas/tslib.pyx":1285 * minutes = 0 * * if frac >= 1: # <<<<<<<<<<<<<< * seconds = int(frac) * frac -= seconds */ __pyx_t_1 = PyObject_RichCompare(__pyx_v_frac, __pyx_int_1, Py_GE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1285; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1285; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_5) { /* "pandas/tslib.pyx":1286 * * if frac >= 1: * seconds = int(frac) # <<<<<<<<<<<<<< * frac -= seconds * else: */ __pyx_t_1 = PyNumber_Int(__pyx_v_frac); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1286; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_v_seconds = __pyx_t_1; __pyx_t_1 = 0; /* "pandas/tslib.pyx":1287 * if frac >= 1: * seconds = int(frac) * frac -= seconds # <<<<<<<<<<<<<< * else: * seconds = 0 */ __pyx_t_1 = PyNumber_InPlaceSubtract(__pyx_v_frac, __pyx_v_seconds); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1287; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF_SET(__pyx_v_frac, __pyx_t_1); __pyx_t_1 = 0; goto __pyx_L6; } /*else*/ { /* "pandas/tslib.pyx":1289 * frac -= seconds * else: * seconds = 0 # <<<<<<<<<<<<<< * * if frac == int(frac): */ __Pyx_INCREF(__pyx_int_0); __pyx_v_seconds = __pyx_int_0; } __pyx_L6:; /* "pandas/tslib.pyx":1291 * seconds = 0 * * if frac == int(frac): # <<<<<<<<<<<<<< * seconds_pretty = "%02d" % seconds * else: */ __pyx_t_1 = PyNumber_Int(__pyx_v_frac); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1291; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = PyObject_RichCompare(__pyx_v_frac, __pyx_t_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1291; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1291; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_5) { /* "pandas/tslib.pyx":1292 * * if frac == int(frac): * seconds_pretty = "%02d" % seconds # <<<<<<<<<<<<<< * else: * sp = abs(round(1e6*frac)) */ __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_02d, __pyx_v_seconds); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1292; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_v_seconds_pretty = ((PyObject*)__pyx_t_4); __pyx_t_4 = 0; goto __pyx_L7; } /*else*/ { /* "pandas/tslib.pyx":1294 * seconds_pretty = "%02d" % seconds * else: * sp = abs(round(1e6*frac)) # <<<<<<<<<<<<<< * seconds_pretty = "%02d.%06d" % (seconds, sp) * */ __pyx_t_4 = PyNumber_Multiply(__pyx_float_1e6, __pyx_v_frac); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1294; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1294; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyObject_Call(__pyx_builtin_round, __pyx_t_1, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1294; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyNumber_Absolute(__pyx_t_4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1294; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_sp = __pyx_t_1; __pyx_t_1 = 0; /* "pandas/tslib.pyx":1295 * else: * sp = abs(round(1e6*frac)) * seconds_pretty = "%02d.%06d" % (seconds, sp) # <<<<<<<<<<<<<< * * if sign < 0: */ __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1295; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_seconds); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_seconds); __Pyx_GIVEREF(__pyx_v_seconds); __Pyx_INCREF(__pyx_v_sp); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_sp); __Pyx_GIVEREF(__pyx_v_sp); __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_02d_06d, __pyx_t_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1295; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_seconds_pretty = ((PyObject*)__pyx_t_4); __pyx_t_4 = 0; } __pyx_L7:; /* "pandas/tslib.pyx":1297 * seconds_pretty = "%02d.%06d" % (seconds, sp) * * if sign < 0: # <<<<<<<<<<<<<< * sign_pretty = "-" * else: */ __pyx_t_4 = PyObject_RichCompare(__pyx_v_sign, __pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1297; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1297; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_5) { /* "pandas/tslib.pyx":1298 * * if sign < 0: * sign_pretty = "-" # <<<<<<<<<<<<<< * else: * sign_pretty = "" */ __Pyx_INCREF(__pyx_kp_s__34); __pyx_v_sign_pretty = __pyx_kp_s__34; goto __pyx_L8; } /*else*/ { /* "pandas/tslib.pyx":1300 * sign_pretty = "-" * else: * sign_pretty = "" # <<<<<<<<<<<<<< * * if days or format == 'long': */ __Pyx_INCREF(__pyx_kp_s__13); __pyx_v_sign_pretty = __pyx_kp_s__13; } __pyx_L8:; /* "pandas/tslib.pyx":1302 * sign_pretty = "" * * if days or format == 'long': # <<<<<<<<<<<<<< * if (hours or minutes or seconds or frac) or format != 'short': * return "%s%d days, %02d:%02d:%s" % (sign_pretty, days, hours, minutes, */ __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_days); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1302; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (!__pyx_t_5) { __pyx_t_6 = (__Pyx_PyString_Equals(__pyx_v_format, __pyx_n_s_long, Py_EQ)); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1302; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_7 = __pyx_t_6; } else { __pyx_t_7 = __pyx_t_5; } if (__pyx_t_7) { /* "pandas/tslib.pyx":1303 * * if days or format == 'long': * if (hours or minutes or seconds or frac) or format != 'short': # <<<<<<<<<<<<<< * return "%s%d days, %02d:%02d:%s" % (sign_pretty, days, hours, minutes, * seconds_pretty) */ __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_v_hours); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1303; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (!__pyx_t_7) { __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_minutes); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1303; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (!__pyx_t_5) { __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_seconds); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1303; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (!__pyx_t_6) { __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_v_frac); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1303; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_9 = __pyx_t_8; } else { __pyx_t_9 = __pyx_t_6; } __pyx_t_6 = __pyx_t_9; } else { __pyx_t_6 = __pyx_t_5; } __pyx_t_5 = __pyx_t_6; } else { __pyx_t_5 = __pyx_t_7; } if (!__pyx_t_5) { __pyx_t_7 = (__Pyx_PyString_Equals(__pyx_v_format, __pyx_n_s_short, Py_NE)); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1303; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_6 = __pyx_t_7; } else { __pyx_t_6 = __pyx_t_5; } if (__pyx_t_6) { /* "pandas/tslib.pyx":1304 * if days or format == 'long': * if (hours or minutes or seconds or frac) or format != 'short': * return "%s%d days, %02d:%02d:%s" % (sign_pretty, days, hours, minutes, # <<<<<<<<<<<<<< * seconds_pretty) * else: */ __Pyx_XDECREF(__pyx_r); /* "pandas/tslib.pyx":1305 * if (hours or minutes or seconds or frac) or format != 'short': * return "%s%d days, %02d:%02d:%s" % (sign_pretty, days, hours, minutes, * seconds_pretty) # <<<<<<<<<<<<<< * else: * return "%s%d days" % (sign_pretty, days) */ __pyx_t_4 = PyTuple_New(5); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1304; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_v_sign_pretty); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_sign_pretty); __Pyx_GIVEREF(__pyx_v_sign_pretty); __Pyx_INCREF(__pyx_v_days); PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_days); __Pyx_GIVEREF(__pyx_v_days); __Pyx_INCREF(__pyx_v_hours); PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_v_hours); __Pyx_GIVEREF(__pyx_v_hours); __Pyx_INCREF(__pyx_v_minutes); PyTuple_SET_ITEM(__pyx_t_4, 3, __pyx_v_minutes); __Pyx_GIVEREF(__pyx_v_minutes); __Pyx_INCREF(__pyx_v_seconds_pretty); PyTuple_SET_ITEM(__pyx_t_4, 4, __pyx_v_seconds_pretty); __Pyx_GIVEREF(__pyx_v_seconds_pretty); /* "pandas/tslib.pyx":1304 * if days or format == 'long': * if (hours or minutes or seconds or frac) or format != 'short': * return "%s%d days, %02d:%02d:%s" % (sign_pretty, days, hours, minutes, # <<<<<<<<<<<<<< * seconds_pretty) * else: */ __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_s_d_days_02d_02d_s, __pyx_t_4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1304; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; } /*else*/ { /* "pandas/tslib.pyx":1307 * seconds_pretty) * else: * return "%s%d days" % (sign_pretty, days) # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1307; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_sign_pretty); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_sign_pretty); __Pyx_GIVEREF(__pyx_v_sign_pretty); __Pyx_INCREF(__pyx_v_days); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_days); __Pyx_GIVEREF(__pyx_v_days); __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_s_d_days, __pyx_t_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1307; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; } } /* "pandas/tslib.pyx":1310 * * * return "%s%02d:%02d:%s" % (sign_pretty, hours, minutes, seconds_pretty) # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_4 = PyTuple_New(4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1310; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_v_sign_pretty); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_sign_pretty); __Pyx_GIVEREF(__pyx_v_sign_pretty); __Pyx_INCREF(__pyx_v_hours); PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_hours); __Pyx_GIVEREF(__pyx_v_hours); __Pyx_INCREF(__pyx_v_minutes); PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_v_minutes); __Pyx_GIVEREF(__pyx_v_minutes); __Pyx_INCREF(__pyx_v_seconds_pretty); PyTuple_SET_ITEM(__pyx_t_4, 3, __pyx_v_seconds_pretty); __Pyx_GIVEREF(__pyx_v_seconds_pretty); __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_s_02d_02d_s, __pyx_t_4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1310; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "pandas/tslib.pyx":1244 * return ts.astype('timedelta64[ns]') * * def repr_timedelta64(object value, format=None): # <<<<<<<<<<<<<< * """ * provide repr for timedelta64 */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("pandas.tslib.repr_timedelta64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_ivalue); __Pyx_XDECREF(__pyx_v_frac); __Pyx_XDECREF(__pyx_v_sign); __Pyx_XDECREF(__pyx_v_days); __Pyx_XDECREF(__pyx_v_hours); __Pyx_XDECREF(__pyx_v_minutes); __Pyx_XDECREF(__pyx_v_seconds); __Pyx_XDECREF(__pyx_v_seconds_pretty); __Pyx_XDECREF(__pyx_v_sp); __Pyx_XDECREF(__pyx_v_sign_pretty); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/tslib.pyx":1313 * * * def array_strptime(ndarray[object] values, object fmt, coerce=False): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = len(values) */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5tslib_35array_strptime(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5tslib_35array_strptime = {__Pyx_NAMESTR("array_strptime"), (PyCFunction)__pyx_pw_6pandas_5tslib_35array_strptime, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5tslib_35array_strptime(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_values = 0; PyObject *__pyx_v_fmt = 0; PyObject *__pyx_v_coerce = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("array_strptime (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_values,&__pyx_n_s_fmt,&__pyx_n_s_coerce,0}; PyObject* values[3] = {0,0,0}; values[2] = ((PyObject *)Py_False); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_values)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_fmt)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("array_strptime", 0, 2, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1313; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_coerce); if (value) { values[2] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "array_strptime") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1313; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_values = ((PyArrayObject *)values[0]); __pyx_v_fmt = values[1]; __pyx_v_coerce = values[2]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("array_strptime", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1313; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.tslib.array_strptime", __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_filename = __pyx_f[0]; __pyx_lineno = 1313; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5tslib_34array_strptime(__pyx_self, __pyx_v_values, __pyx_v_fmt, __pyx_v_coerce); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5tslib_34array_strptime(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyObject *__pyx_v_fmt, PyObject *__pyx_v_coerce) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_n; pandas_datetimestruct __pyx_v_dts; PyArrayObject *__pyx_v_iresult = 0; int __pyx_v_year; int __pyx_v_month; int __pyx_v_day; int __pyx_v_minute; int __pyx_v_hour; int __pyx_v_second; int __pyx_v_fraction; int __pyx_v_weekday; int __pyx_v_julian; PyObject *__pyx_v_val = 0; PyObject *__pyx_v_locale_time = NULL; PyObject *__pyx_v_format_regex = NULL; PyObject *__pyx_v_err = NULL; PyObject *__pyx_v_bad_directive = NULL; PyObject *__pyx_v_result = NULL; PyObject *__pyx_v__parse_code_table = 0; int __pyx_v_parse_code; PyObject *__pyx_v_found = NULL; CYTHON_UNUSED PyObject *__pyx_v_tz = NULL; PyObject *__pyx_v_week_of_year = NULL; long __pyx_v_week_of_year_start; PyObject *__pyx_v_found_dict = NULL; PyObject *__pyx_v_group_key = NULL; PyObject *__pyx_v_ampm = NULL; PyObject *__pyx_v_s = NULL; PyObject *__pyx_v_found_zone = NULL; PyObject *__pyx_v_value = NULL; PyObject *__pyx_v_tz_values = NULL; int __pyx_v_week_starts_Mon; PyObject *__pyx_v_datetime_result = NULL; __Pyx_LocalBuf_ND __pyx_pybuffernd_iresult; __Pyx_Buffer __pyx_pybuffer_iresult; __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; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; int __pyx_t_9; int __pyx_t_10; PyObject *__pyx_t_11 = NULL; PyObject *__pyx_t_12 = NULL; PyObject *__pyx_t_13 = NULL; int __pyx_t_14; PyObject *__pyx_t_15 = NULL; PyObject *__pyx_t_16 = NULL; PyArrayObject *__pyx_t_17 = NULL; Py_ssize_t __pyx_t_18; Py_ssize_t __pyx_t_19; __pyx_t_5numpy_int64_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; int __pyx_t_29; int __pyx_t_30; Py_ssize_t __pyx_t_31; PyObject *(*__pyx_t_32)(PyObject *); PyObject *__pyx_t_33 = NULL; int __pyx_t_34; int __pyx_t_35; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("array_strptime", 0); __pyx_pybuffer_iresult.pybuffer.buf = NULL; __pyx_pybuffer_iresult.refcount = 0; __pyx_pybuffernd_iresult.data = NULL; __pyx_pybuffernd_iresult.rcbuffer = &__pyx_pybuffer_iresult; __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_filename = __pyx_f[0]; __pyx_lineno = 1313; __pyx_clineno = __LINE__; goto __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/tslib.pyx":1315 * def array_strptime(ndarray[object] values, object fmt, coerce=False): * cdef: * Py_ssize_t i, n = len(values) # <<<<<<<<<<<<<< * pandas_datetimestruct dts * ndarray[int64_t] iresult */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1315; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/tslib.pyx":1322 * * global _TimeRE_cache, _regex_cache * with _cache_lock: # <<<<<<<<<<<<<< * if _getlang() != _TimeRE_cache.locale_time.lang: * _TimeRE_cache = TimeRE() */ /*with:*/ { __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_cache_lock); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1322; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_LookupSpecial(__pyx_t_2, __pyx_n_s_exit); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1322; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_LookupSpecial(__pyx_t_2, __pyx_n_s_enter); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1322; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = PyObject_Call(__pyx_t_4, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1322; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /*try:*/ { { __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8); __Pyx_XGOTREF(__pyx_t_6); __Pyx_XGOTREF(__pyx_t_7); __Pyx_XGOTREF(__pyx_t_8); /*try:*/ { /* "pandas/tslib.pyx":1323 * global _TimeRE_cache, _regex_cache * with _cache_lock: * if _getlang() != _TimeRE_cache.locale_time.lang: # <<<<<<<<<<<<<< * _TimeRE_cache = TimeRE() * _regex_cache.clear() */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_getlang); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1323; __pyx_clineno = __LINE__; goto __pyx_L7_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = PyObject_Call(__pyx_t_2, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1323; __pyx_clineno = __LINE__; goto __pyx_L7_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_TimeRE_cache); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1323; __pyx_clineno = __LINE__; goto __pyx_L7_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_locale_time); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1323; __pyx_clineno = __LINE__; goto __pyx_L7_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_lang); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1323; __pyx_clineno = __LINE__; goto __pyx_L7_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyObject_RichCompare(__pyx_t_5, __pyx_t_2, Py_NE); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1323; __pyx_clineno = __LINE__; goto __pyx_L7_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1323; __pyx_clineno = __LINE__; goto __pyx_L7_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_9) { /* "pandas/tslib.pyx":1324 * with _cache_lock: * if _getlang() != _TimeRE_cache.locale_time.lang: * _TimeRE_cache = TimeRE() # <<<<<<<<<<<<<< * _regex_cache.clear() * if len(_regex_cache) > _CACHE_MAX_SIZE: */ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_TimeRE); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1324; __pyx_clineno = __LINE__; goto __pyx_L7_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_2 = PyObject_Call(__pyx_t_4, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1324; __pyx_clineno = __LINE__; goto __pyx_L7_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (PyDict_SetItem(__pyx_d, __pyx_n_s_TimeRE_cache, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1324; __pyx_clineno = __LINE__; goto __pyx_L7_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/tslib.pyx":1325 * if _getlang() != _TimeRE_cache.locale_time.lang: * _TimeRE_cache = TimeRE() * _regex_cache.clear() # <<<<<<<<<<<<<< * if len(_regex_cache) > _CACHE_MAX_SIZE: * _regex_cache.clear() */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_regex_cache); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1325; __pyx_clineno = __LINE__; goto __pyx_L7_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_clear); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1325; __pyx_clineno = __LINE__; goto __pyx_L7_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_Call(__pyx_t_4, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1325; __pyx_clineno = __LINE__; goto __pyx_L7_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; goto __pyx_L15; } __pyx_L15:; /* "pandas/tslib.pyx":1326 * _TimeRE_cache = TimeRE() * _regex_cache.clear() * if len(_regex_cache) > _CACHE_MAX_SIZE: # <<<<<<<<<<<<<< * _regex_cache.clear() * locale_time = _TimeRE_cache.locale_time */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_regex_cache); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1326; __pyx_clineno = __LINE__; goto __pyx_L7_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = PyObject_Length(__pyx_t_2); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1326; __pyx_clineno = __LINE__; goto __pyx_L7_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyInt_FromSsize_t(__pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1326; __pyx_clineno = __LINE__; goto __pyx_L7_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_CACHE_MAX_SIZE); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1326; __pyx_clineno = __LINE__; goto __pyx_L7_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = PyObject_RichCompare(__pyx_t_2, __pyx_t_4, Py_GT); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1326; __pyx_clineno = __LINE__; goto __pyx_L7_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1326; __pyx_clineno = __LINE__; goto __pyx_L7_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_9) { /* "pandas/tslib.pyx":1327 * _regex_cache.clear() * if len(_regex_cache) > _CACHE_MAX_SIZE: * _regex_cache.clear() # <<<<<<<<<<<<<< * locale_time = _TimeRE_cache.locale_time * format_regex = _regex_cache.get(fmt) */ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_regex_cache); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1327; __pyx_clineno = __LINE__; goto __pyx_L7_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_clear); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1327; __pyx_clineno = __LINE__; goto __pyx_L7_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyObject_Call(__pyx_t_4, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1327; __pyx_clineno = __LINE__; goto __pyx_L7_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; goto __pyx_L16; } __pyx_L16:; /* "pandas/tslib.pyx":1328 * if len(_regex_cache) > _CACHE_MAX_SIZE: * _regex_cache.clear() * locale_time = _TimeRE_cache.locale_time # <<<<<<<<<<<<<< * format_regex = _regex_cache.get(fmt) * if not format_regex: */ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_TimeRE_cache); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1328; __pyx_clineno = __LINE__; goto __pyx_L7_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_locale_time); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1328; __pyx_clineno = __LINE__; goto __pyx_L7_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_v_locale_time = __pyx_t_4; __pyx_t_4 = 0; /* "pandas/tslib.pyx":1329 * _regex_cache.clear() * locale_time = _TimeRE_cache.locale_time * format_regex = _regex_cache.get(fmt) # <<<<<<<<<<<<<< * if not format_regex: * try: */ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_regex_cache); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1329; __pyx_clineno = __LINE__; goto __pyx_L7_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_get); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1329; __pyx_clineno = __LINE__; goto __pyx_L7_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1329; __pyx_clineno = __LINE__; goto __pyx_L7_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_v_fmt); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_fmt); __Pyx_GIVEREF(__pyx_v_fmt); __pyx_t_2 = PyObject_Call(__pyx_t_5, __pyx_t_4, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1329; __pyx_clineno = __LINE__; goto __pyx_L7_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_format_regex = __pyx_t_2; __pyx_t_2 = 0; /* "pandas/tslib.pyx":1330 * locale_time = _TimeRE_cache.locale_time * format_regex = _regex_cache.get(fmt) * if not format_regex: # <<<<<<<<<<<<<< * try: * format_regex = _TimeRE_cache.compile(fmt) */ __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_v_format_regex); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1330; __pyx_clineno = __LINE__; goto __pyx_L7_error;} __pyx_t_10 = ((!__pyx_t_9) != 0); if (__pyx_t_10) { /* "pandas/tslib.pyx":1331 * format_regex = _regex_cache.get(fmt) * if not format_regex: * try: # <<<<<<<<<<<<<< * format_regex = _TimeRE_cache.compile(fmt) * # KeyError raised when a bad format is found; can be specified as */ { __Pyx_ExceptionSave(&__pyx_t_11, &__pyx_t_12, &__pyx_t_13); __Pyx_XGOTREF(__pyx_t_11); __Pyx_XGOTREF(__pyx_t_12); __Pyx_XGOTREF(__pyx_t_13); /*try:*/ { /* "pandas/tslib.pyx":1332 * if not format_regex: * try: * format_regex = _TimeRE_cache.compile(fmt) # <<<<<<<<<<<<<< * # KeyError raised when a bad format is found; can be specified as * # \\, in which case it was a stray % but with a space after it */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_TimeRE_cache); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1332; __pyx_clineno = __LINE__; goto __pyx_L18_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_compile); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1332; __pyx_clineno = __LINE__; goto __pyx_L18_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1332; __pyx_clineno = __LINE__; goto __pyx_L18_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_fmt); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_fmt); __Pyx_GIVEREF(__pyx_v_fmt); __pyx_t_5 = PyObject_Call(__pyx_t_4, __pyx_t_2, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1332; __pyx_clineno = __LINE__; goto __pyx_L18_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF_SET(__pyx_v_format_regex, __pyx_t_5); __pyx_t_5 = 0; } __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; goto __pyx_L25_try_end; __pyx_L18_error:; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; /* "pandas/tslib.pyx":1335 * # KeyError raised when a bad format is found; can be specified as * # \\, in which case it was a stray % but with a space after it * except KeyError, err: # <<<<<<<<<<<<<< * bad_directive = err.args[0] * if bad_directive == "\\": */ __pyx_t_14 = PyErr_ExceptionMatches(__pyx_builtin_KeyError); if (__pyx_t_14) { __Pyx_AddTraceback("pandas.tslib.array_strptime", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_2, &__pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1335; __pyx_clineno = __LINE__; goto __pyx_L20_except_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_GOTREF(__pyx_t_2); __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_v_err = __pyx_t_2; /* "pandas/tslib.pyx":1336 * # \\, in which case it was a stray % but with a space after it * except KeyError, err: * bad_directive = err.args[0] # <<<<<<<<<<<<<< * if bad_directive == "\\": * bad_directive = "%" */ __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_v_err, __pyx_n_s_args); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1336; __pyx_clineno = __LINE__; goto __pyx_L20_except_error;} __Pyx_GOTREF(__pyx_t_15); __pyx_t_16 = __Pyx_GetItemInt(__pyx_t_15, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_16 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1336; __pyx_clineno = __LINE__; goto __pyx_L20_except_error;}; __Pyx_GOTREF(__pyx_t_16); __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; __pyx_v_bad_directive = __pyx_t_16; __pyx_t_16 = 0; /* "pandas/tslib.pyx":1337 * except KeyError, err: * bad_directive = err.args[0] * if bad_directive == "\\": # <<<<<<<<<<<<<< * bad_directive = "%" * del err */ __pyx_t_10 = (__Pyx_PyString_Equals(__pyx_v_bad_directive, __pyx_kp_s__35, Py_EQ)); if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1337; __pyx_clineno = __LINE__; goto __pyx_L20_except_error;} if (__pyx_t_10) { /* "pandas/tslib.pyx":1338 * bad_directive = err.args[0] * if bad_directive == "\\": * bad_directive = "%" # <<<<<<<<<<<<<< * del err * raise ValueError("'%s' is a bad directive in format '%s'" % */ __Pyx_INCREF(__pyx_kp_s__36); __Pyx_DECREF_SET(__pyx_v_bad_directive, __pyx_kp_s__36); goto __pyx_L28; } __pyx_L28:; /* "pandas/tslib.pyx":1339 * if bad_directive == "\\": * bad_directive = "%" * del err # <<<<<<<<<<<<<< * raise ValueError("'%s' is a bad directive in format '%s'" % * (bad_directive, fmt)) */ __Pyx_DECREF(__pyx_v_err); __pyx_v_err = NULL; /* "pandas/tslib.pyx":1341 * del err * raise ValueError("'%s' is a bad directive in format '%s'" % * (bad_directive, fmt)) # <<<<<<<<<<<<<< * # IndexError only occurs when the format string is "%" * except IndexError: */ __pyx_t_16 = PyTuple_New(2); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1341; __pyx_clineno = __LINE__; goto __pyx_L20_except_error;} __Pyx_GOTREF(__pyx_t_16); __Pyx_INCREF(__pyx_v_bad_directive); PyTuple_SET_ITEM(__pyx_t_16, 0, __pyx_v_bad_directive); __Pyx_GIVEREF(__pyx_v_bad_directive); __Pyx_INCREF(__pyx_v_fmt); PyTuple_SET_ITEM(__pyx_t_16, 1, __pyx_v_fmt); __Pyx_GIVEREF(__pyx_v_fmt); /* "pandas/tslib.pyx":1340 * bad_directive = "%" * del err * raise ValueError("'%s' is a bad directive in format '%s'" % # <<<<<<<<<<<<<< * (bad_directive, fmt)) * # IndexError only occurs when the format string is "%" */ __pyx_t_15 = __Pyx_PyString_Format(__pyx_kp_s_s_is_a_bad_directive_in_format, __pyx_t_16); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1340; __pyx_clineno = __LINE__; goto __pyx_L20_except_error;} __Pyx_GOTREF(__pyx_t_15); __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; __pyx_t_16 = PyTuple_New(1); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1340; __pyx_clineno = __LINE__; goto __pyx_L20_except_error;} __Pyx_GOTREF(__pyx_t_16); PyTuple_SET_ITEM(__pyx_t_16, 0, __pyx_t_15); __Pyx_GIVEREF(__pyx_t_15); __pyx_t_15 = 0; __pyx_t_15 = PyObject_Call(__pyx_builtin_ValueError, __pyx_t_16, NULL); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1340; __pyx_clineno = __LINE__; goto __pyx_L20_except_error;} __Pyx_GOTREF(__pyx_t_15); __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; __Pyx_Raise(__pyx_t_15, 0, 0, 0); __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1340; __pyx_clineno = __LINE__; goto __pyx_L20_except_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; goto __pyx_L19_exception_handled; } /* "pandas/tslib.pyx":1343 * (bad_directive, fmt)) * # IndexError only occurs when the format string is "%" * except IndexError: # <<<<<<<<<<<<<< * raise ValueError("stray %% in format '%s'" % fmt) * _regex_cache[fmt] = format_regex */ __pyx_t_14 = PyErr_ExceptionMatches(__pyx_builtin_IndexError); if (__pyx_t_14) { __Pyx_AddTraceback("pandas.tslib.array_strptime", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_2, &__pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1343; __pyx_clineno = __LINE__; goto __pyx_L20_except_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_GOTREF(__pyx_t_2); __Pyx_GOTREF(__pyx_t_5); /* "pandas/tslib.pyx":1344 * # IndexError only occurs when the format string is "%" * except IndexError: * raise ValueError("stray %% in format '%s'" % fmt) # <<<<<<<<<<<<<< * _regex_cache[fmt] = format_regex * */ __pyx_t_15 = __Pyx_PyString_Format(__pyx_kp_s_stray_in_format_s, __pyx_v_fmt); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1344; __pyx_clineno = __LINE__; goto __pyx_L20_except_error;} __Pyx_GOTREF(__pyx_t_15); __pyx_t_16 = PyTuple_New(1); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1344; __pyx_clineno = __LINE__; goto __pyx_L20_except_error;} __Pyx_GOTREF(__pyx_t_16); PyTuple_SET_ITEM(__pyx_t_16, 0, __pyx_t_15); __Pyx_GIVEREF(__pyx_t_15); __pyx_t_15 = 0; __pyx_t_15 = PyObject_Call(__pyx_builtin_ValueError, __pyx_t_16, NULL); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1344; __pyx_clineno = __LINE__; goto __pyx_L20_except_error;} __Pyx_GOTREF(__pyx_t_15); __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; __Pyx_Raise(__pyx_t_15, 0, 0, 0); __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1344; __pyx_clineno = __LINE__; goto __pyx_L20_except_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; goto __pyx_L19_exception_handled; } goto __pyx_L20_except_error; __pyx_L20_except_error:; __Pyx_XGIVEREF(__pyx_t_11); __Pyx_XGIVEREF(__pyx_t_12); __Pyx_XGIVEREF(__pyx_t_13); __Pyx_ExceptionReset(__pyx_t_11, __pyx_t_12, __pyx_t_13); goto __pyx_L7_error; __pyx_L19_exception_handled:; __Pyx_XGIVEREF(__pyx_t_11); __Pyx_XGIVEREF(__pyx_t_12); __Pyx_XGIVEREF(__pyx_t_13); __Pyx_ExceptionReset(__pyx_t_11, __pyx_t_12, __pyx_t_13); __pyx_L25_try_end:; } /* "pandas/tslib.pyx":1345 * except IndexError: * raise ValueError("stray %% in format '%s'" % fmt) * _regex_cache[fmt] = format_regex # <<<<<<<<<<<<<< * * result = np.empty(n, dtype='M8[ns]') */ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_regex_cache); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1345; __pyx_clineno = __LINE__; goto __pyx_L7_error;} __Pyx_GOTREF(__pyx_t_5); if (unlikely(PyObject_SetItem(__pyx_t_5, __pyx_v_fmt, __pyx_v_format_regex) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1345; __pyx_clineno = __LINE__; goto __pyx_L7_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; goto __pyx_L17; } __pyx_L17:; } __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; goto __pyx_L14_try_end; __pyx_L7_error:; __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0; __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; /* "pandas/tslib.pyx":1322 * * global _TimeRE_cache, _regex_cache * with _cache_lock: # <<<<<<<<<<<<<< * if _getlang() != _TimeRE_cache.locale_time.lang: * _TimeRE_cache = TimeRE() */ /*except:*/ { __Pyx_AddTraceback("pandas.tslib.array_strptime", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_2, &__pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1322; __pyx_clineno = __LINE__; goto __pyx_L9_except_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_GOTREF(__pyx_t_2); __Pyx_GOTREF(__pyx_t_4); __pyx_t_15 = PyTuple_Pack(3, __pyx_t_5, __pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1322; __pyx_clineno = __LINE__; goto __pyx_L9_except_error;} __Pyx_GOTREF(__pyx_t_15); __pyx_t_13 = PyObject_Call(__pyx_t_3, __pyx_t_15, NULL); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1322; __pyx_clineno = __LINE__; goto __pyx_L9_except_error;} __Pyx_GOTREF(__pyx_t_13); __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_13); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; if (__pyx_t_10 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1322; __pyx_clineno = __LINE__; goto __pyx_L9_except_error;} __pyx_t_9 = ((!(__pyx_t_10 != 0)) != 0); if (__pyx_t_9) { __Pyx_GIVEREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_4); __Pyx_ErrRestore(__pyx_t_5, __pyx_t_2, __pyx_t_4); __pyx_t_5 = 0; __pyx_t_2 = 0; __pyx_t_4 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1322; __pyx_clineno = __LINE__; goto __pyx_L9_except_error;} } __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; goto __pyx_L8_exception_handled; } __pyx_L9_except_error:; __Pyx_XGIVEREF(__pyx_t_6); __Pyx_XGIVEREF(__pyx_t_7); __Pyx_XGIVEREF(__pyx_t_8); __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8); goto __pyx_L1_error; __pyx_L8_exception_handled:; __Pyx_XGIVEREF(__pyx_t_6); __Pyx_XGIVEREF(__pyx_t_7); __Pyx_XGIVEREF(__pyx_t_8); __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8); __pyx_L14_try_end:; } } /*finally:*/ { /*normal exit:*/{ if (__pyx_t_3) { __pyx_t_8 = PyObject_Call(__pyx_t_3, __pyx_tuple__37, NULL); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1322; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } goto __pyx_L6; } __pyx_L6:; } goto __pyx_L34; __pyx_L3_error:; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L1_error; __pyx_L34:; } /* "pandas/tslib.pyx":1347 * _regex_cache[fmt] = format_regex * * result = np.empty(n, dtype='M8[ns]') # <<<<<<<<<<<<<< * iresult = result.view('i8') * */ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1347; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_empty); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1347; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyInt_FromSsize_t(__pyx_v_n); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1347; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1347; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyDict_New(); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1347; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_dtype, __pyx_kp_s_M8_ns) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1347; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_15 = PyObject_Call(__pyx_t_2, __pyx_t_5, __pyx_t_4); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1347; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_15); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_result = __pyx_t_15; __pyx_t_15 = 0; /* "pandas/tslib.pyx":1348 * * result = np.empty(n, dtype='M8[ns]') * iresult = result.view('i8') # <<<<<<<<<<<<<< * * dts.us = dts.ps = dts.as = 0 */ __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_v_result, __pyx_n_s_view); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1348; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_15); __pyx_t_4 = PyObject_Call(__pyx_t_15, __pyx_tuple__38, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1348; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1348; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_17 = ((PyArrayObject *)__pyx_t_4); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_iresult.rcbuffer->pybuffer); __pyx_t_14 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_iresult.rcbuffer->pybuffer, (PyObject*)__pyx_t_17, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_14 < 0)) { PyErr_Fetch(&__pyx_t_3, &__pyx_t_8, &__pyx_t_7); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_iresult.rcbuffer->pybuffer, (PyObject*)__pyx_v_iresult, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_8); Py_XDECREF(__pyx_t_7); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_3, __pyx_t_8, __pyx_t_7); } } __pyx_pybuffernd_iresult.diminfo[0].strides = __pyx_pybuffernd_iresult.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_iresult.diminfo[0].shape = __pyx_pybuffernd_iresult.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_14 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1348; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_17 = 0; __pyx_v_iresult = ((PyArrayObject *)__pyx_t_4); __pyx_t_4 = 0; /* "pandas/tslib.pyx":1350 * iresult = result.view('i8') * * dts.us = dts.ps = dts.as = 0 # <<<<<<<<<<<<<< * * cdef dict _parse_code_table = { */ __pyx_v_dts.us = 0; __pyx_v_dts.ps = 0; __pyx_v_dts.as = 0; /* "pandas/tslib.pyx":1352 * dts.us = dts.ps = dts.as = 0 * * cdef dict _parse_code_table = { # <<<<<<<<<<<<<< * 'y': 0, * 'Y': 1, */ __pyx_t_4 = PyDict_New(); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1352; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_y, __pyx_int_0) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1352; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_Y, __pyx_int_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1352; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_m, __pyx_int_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1352; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_B, __pyx_int_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1352; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_b, __pyx_int_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1352; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_d, __pyx_int_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1352; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_H, __pyx_int_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1352; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_I, __pyx_int_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1352; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_M, __pyx_int_8) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1352; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_S, __pyx_int_9) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1352; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_f, __pyx_int_10) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1352; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_A, __pyx_int_11) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1352; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_a, __pyx_int_12) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1352; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_w, __pyx_int_13) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1352; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_j, __pyx_int_14) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1352; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_U, __pyx_int_15) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1352; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_W, __pyx_int_16) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1352; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_Z_2, __pyx_int_17) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1352; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_p, __pyx_int_18) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1352; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v__parse_code_table = ((PyObject*)__pyx_t_4); __pyx_t_4 = 0; /* "pandas/tslib.pyx":1375 * cdef int parse_code * * for i in range(n): # <<<<<<<<<<<<<< * val = values[i] * if util.is_string_object(val): */ __pyx_t_1 = __pyx_v_n; for (__pyx_t_18 = 0; __pyx_t_18 < __pyx_t_1; __pyx_t_18+=1) { __pyx_v_i = __pyx_t_18; /* "pandas/tslib.pyx":1376 * * for i in range(n): * val = values[i] # <<<<<<<<<<<<<< * if util.is_string_object(val): * if val in _nat_strings: */ __pyx_t_19 = __pyx_v_i; __pyx_t_14 = -1; if (__pyx_t_19 < 0) { __pyx_t_19 += __pyx_pybuffernd_values.diminfo[0].shape; if (unlikely(__pyx_t_19 < 0)) __pyx_t_14 = 0; } else if (unlikely(__pyx_t_19 >= __pyx_pybuffernd_values.diminfo[0].shape)) __pyx_t_14 = 0; if (unlikely(__pyx_t_14 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_14); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1376; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_4 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_values.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_4); __Pyx_XDECREF_SET(__pyx_v_val, __pyx_t_4); __pyx_t_4 = 0; /* "pandas/tslib.pyx":1377 * for i in range(n): * val = values[i] * if util.is_string_object(val): # <<<<<<<<<<<<<< * if val in _nat_strings: * iresult[i] = iNaT */ __pyx_t_9 = (is_string_object(__pyx_v_val) != 0); if (__pyx_t_9) { /* "pandas/tslib.pyx":1378 * val = values[i] * if util.is_string_object(val): * if val in _nat_strings: # <<<<<<<<<<<<<< * iresult[i] = iNaT * continue */ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_nat_strings); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1378; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_9 = (__Pyx_PySequence_Contains(__pyx_v_val, __pyx_t_4, Py_EQ)); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1378; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_10 = (__pyx_t_9 != 0); if (__pyx_t_10) { /* "pandas/tslib.pyx":1379 * if util.is_string_object(val): * if val in _nat_strings: * iresult[i] = iNaT # <<<<<<<<<<<<<< * continue * else: */ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_iNaT); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1379; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_20 = __Pyx_PyInt_As_npy_int64(__pyx_t_4); if (unlikely((__pyx_t_20 == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1379; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_21 = __pyx_v_i; __pyx_t_14 = -1; if (__pyx_t_21 < 0) { __pyx_t_21 += __pyx_pybuffernd_iresult.diminfo[0].shape; if (unlikely(__pyx_t_21 < 0)) __pyx_t_14 = 0; } else if (unlikely(__pyx_t_21 >= __pyx_pybuffernd_iresult.diminfo[0].shape)) __pyx_t_14 = 0; if (unlikely(__pyx_t_14 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_14); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1379; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_iresult.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_iresult.diminfo[0].strides) = __pyx_t_20; /* "pandas/tslib.pyx":1380 * if val in _nat_strings: * iresult[i] = iNaT * continue # <<<<<<<<<<<<<< * else: * if _checknull_with_nat(val): */ goto __pyx_L35_continue; } goto __pyx_L37; } /*else*/ { /* "pandas/tslib.pyx":1382 * continue * else: * if _checknull_with_nat(val): # <<<<<<<<<<<<<< * iresult[i] = iNaT * continue */ __pyx_t_10 = (__pyx_f_6pandas_5tslib__checknull_with_nat(__pyx_v_val) != 0); if (__pyx_t_10) { /* "pandas/tslib.pyx":1383 * else: * if _checknull_with_nat(val): * iresult[i] = iNaT # <<<<<<<<<<<<<< * continue * else: */ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_iNaT); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1383; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_20 = __Pyx_PyInt_As_npy_int64(__pyx_t_4); if (unlikely((__pyx_t_20 == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1383; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_22 = __pyx_v_i; __pyx_t_14 = -1; if (__pyx_t_22 < 0) { __pyx_t_22 += __pyx_pybuffernd_iresult.diminfo[0].shape; if (unlikely(__pyx_t_22 < 0)) __pyx_t_14 = 0; } else if (unlikely(__pyx_t_22 >= __pyx_pybuffernd_iresult.diminfo[0].shape)) __pyx_t_14 = 0; if (unlikely(__pyx_t_14 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_14); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1383; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_iresult.rcbuffer->pybuffer.buf, __pyx_t_22, __pyx_pybuffernd_iresult.diminfo[0].strides) = __pyx_t_20; /* "pandas/tslib.pyx":1384 * if _checknull_with_nat(val): * iresult[i] = iNaT * continue # <<<<<<<<<<<<<< * else: * val = str(val) */ goto __pyx_L35_continue; } /*else*/ { /* "pandas/tslib.pyx":1386 * continue * else: * val = str(val) # <<<<<<<<<<<<<< * * found = format_regex.match(val) */ __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1386; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_v_val); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_val); __Pyx_GIVEREF(__pyx_v_val); __pyx_t_15 = PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), __pyx_t_4, NULL); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1386; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_15); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF_SET(__pyx_v_val, __pyx_t_15); __pyx_t_15 = 0; } } __pyx_L37:; /* "pandas/tslib.pyx":1388 * val = str(val) * * found = format_regex.match(val) # <<<<<<<<<<<<<< * if not found: * if coerce: */ if (unlikely(!__pyx_v_format_regex)) { __Pyx_RaiseUnboundLocalError("format_regex"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1388; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_v_format_regex, __pyx_n_s_match); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1388; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_15); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1388; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_v_val); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_val); __Pyx_GIVEREF(__pyx_v_val); __pyx_t_5 = PyObject_Call(__pyx_t_15, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1388; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF_SET(__pyx_v_found, __pyx_t_5); __pyx_t_5 = 0; /* "pandas/tslib.pyx":1389 * * found = format_regex.match(val) * if not found: # <<<<<<<<<<<<<< * if coerce: * iresult[i] = iNaT */ __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_v_found); if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1389; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_9 = ((!__pyx_t_10) != 0); if (__pyx_t_9) { /* "pandas/tslib.pyx":1390 * found = format_regex.match(val) * if not found: * if coerce: # <<<<<<<<<<<<<< * iresult[i] = iNaT * continue */ __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_v_coerce); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1390; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__pyx_t_9) { /* "pandas/tslib.pyx":1391 * if not found: * if coerce: * iresult[i] = iNaT # <<<<<<<<<<<<<< * continue * raise ValueError("time data %r does not match format %r" % */ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_iNaT); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1391; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_20 = __Pyx_PyInt_As_npy_int64(__pyx_t_5); if (unlikely((__pyx_t_20 == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1391; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_23 = __pyx_v_i; __pyx_t_14 = -1; if (__pyx_t_23 < 0) { __pyx_t_23 += __pyx_pybuffernd_iresult.diminfo[0].shape; if (unlikely(__pyx_t_23 < 0)) __pyx_t_14 = 0; } else if (unlikely(__pyx_t_23 >= __pyx_pybuffernd_iresult.diminfo[0].shape)) __pyx_t_14 = 0; if (unlikely(__pyx_t_14 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_14); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1391; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_iresult.rcbuffer->pybuffer.buf, __pyx_t_23, __pyx_pybuffernd_iresult.diminfo[0].strides) = __pyx_t_20; /* "pandas/tslib.pyx":1392 * if coerce: * iresult[i] = iNaT * continue # <<<<<<<<<<<<<< * raise ValueError("time data %r does not match format %r" % * (values[i], fmt)) */ goto __pyx_L35_continue; } /* "pandas/tslib.pyx":1394 * continue * raise ValueError("time data %r does not match format %r" % * (values[i], fmt)) # <<<<<<<<<<<<<< * if len(val) != found.end(): * if coerce: */ __pyx_t_24 = __pyx_v_i; __pyx_t_14 = -1; if (__pyx_t_24 < 0) { __pyx_t_24 += __pyx_pybuffernd_values.diminfo[0].shape; if (unlikely(__pyx_t_24 < 0)) __pyx_t_14 = 0; } else if (unlikely(__pyx_t_24 >= __pyx_pybuffernd_values.diminfo[0].shape)) __pyx_t_14 = 0; if (unlikely(__pyx_t_14 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_14); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1394; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_5 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_24, __pyx_pybuffernd_values.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_5); __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1394; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __Pyx_INCREF(__pyx_v_fmt); PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_fmt); __Pyx_GIVEREF(__pyx_v_fmt); __pyx_t_5 = 0; /* "pandas/tslib.pyx":1393 * iresult[i] = iNaT * continue * raise ValueError("time data %r does not match format %r" % # <<<<<<<<<<<<<< * (values[i], fmt)) * if len(val) != found.end(): */ __pyx_t_5 = __Pyx_PyString_Format(__pyx_kp_s_time_data_r_does_not_match_forma, __pyx_t_4); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1393; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1393; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyObject_Call(__pyx_builtin_ValueError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1393; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_Raise(__pyx_t_5, 0, 0, 0); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1393; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } /* "pandas/tslib.pyx":1395 * raise ValueError("time data %r does not match format %r" % * (values[i], fmt)) * if len(val) != found.end(): # <<<<<<<<<<<<<< * if coerce: * iresult[i] = iNaT */ __pyx_t_25 = PyObject_Length(__pyx_v_val); if (unlikely(__pyx_t_25 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1395; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_5 = PyInt_FromSsize_t(__pyx_t_25); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1395; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_found, __pyx_n_s_end); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1395; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_15 = PyObject_Call(__pyx_t_4, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1395; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_15); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyObject_RichCompare(__pyx_t_5, __pyx_t_15, Py_NE); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1395; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1395; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_9) { /* "pandas/tslib.pyx":1396 * (values[i], fmt)) * if len(val) != found.end(): * if coerce: # <<<<<<<<<<<<<< * iresult[i] = iNaT * continue */ __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_v_coerce); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1396; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__pyx_t_9) { /* "pandas/tslib.pyx":1397 * if len(val) != found.end(): * if coerce: * iresult[i] = iNaT # <<<<<<<<<<<<<< * continue * raise ValueError("unconverted data remains: %s" % */ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_iNaT); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1397; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_20 = __Pyx_PyInt_As_npy_int64(__pyx_t_4); if (unlikely((__pyx_t_20 == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1397; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_25 = __pyx_v_i; __pyx_t_14 = -1; if (__pyx_t_25 < 0) { __pyx_t_25 += __pyx_pybuffernd_iresult.diminfo[0].shape; if (unlikely(__pyx_t_25 < 0)) __pyx_t_14 = 0; } else if (unlikely(__pyx_t_25 >= __pyx_pybuffernd_iresult.diminfo[0].shape)) __pyx_t_14 = 0; if (unlikely(__pyx_t_14 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_14); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1397; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_iresult.rcbuffer->pybuffer.buf, __pyx_t_25, __pyx_pybuffernd_iresult.diminfo[0].strides) = __pyx_t_20; /* "pandas/tslib.pyx":1398 * if coerce: * iresult[i] = iNaT * continue # <<<<<<<<<<<<<< * raise ValueError("unconverted data remains: %s" % * values[i][found.end():]) */ goto __pyx_L35_continue; } /* "pandas/tslib.pyx":1400 * continue * raise ValueError("unconverted data remains: %s" % * values[i][found.end():]) # <<<<<<<<<<<<<< * year = 1900 * month = day = 1 */ __pyx_t_26 = __pyx_v_i; __pyx_t_14 = -1; if (__pyx_t_26 < 0) { __pyx_t_26 += __pyx_pybuffernd_values.diminfo[0].shape; if (unlikely(__pyx_t_26 < 0)) __pyx_t_14 = 0; } else if (unlikely(__pyx_t_26 >= __pyx_pybuffernd_values.diminfo[0].shape)) __pyx_t_14 = 0; if (unlikely(__pyx_t_14 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_14); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1400; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_4 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_26, __pyx_pybuffernd_values.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_4); __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_v_found, __pyx_n_s_end); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1400; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_15); __pyx_t_5 = PyObject_Call(__pyx_t_15, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1400; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; __pyx_t_15 = __Pyx_PyObject_GetSlice(__pyx_t_4, 0, 0, &__pyx_t_5, NULL, NULL, 0, 0, 1); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1400; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_15); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "pandas/tslib.pyx":1399 * iresult[i] = iNaT * continue * raise ValueError("unconverted data remains: %s" % # <<<<<<<<<<<<<< * values[i][found.end():]) * year = 1900 */ __pyx_t_5 = __Pyx_PyString_Format(__pyx_kp_s_unconverted_data_remains_s, __pyx_t_15); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1399; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; __pyx_t_15 = PyTuple_New(1); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1399; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_15); PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyObject_Call(__pyx_builtin_ValueError, __pyx_t_15, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1399; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; __Pyx_Raise(__pyx_t_5, 0, 0, 0); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1399; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } /* "pandas/tslib.pyx":1401 * raise ValueError("unconverted data remains: %s" % * values[i][found.end():]) * year = 1900 # <<<<<<<<<<<<<< * month = day = 1 * hour = minute = second = fraction = 0 */ __pyx_v_year = 1900; /* "pandas/tslib.pyx":1402 * values[i][found.end():]) * year = 1900 * month = day = 1 # <<<<<<<<<<<<<< * hour = minute = second = fraction = 0 * tz = -1 */ __pyx_v_month = 1; __pyx_v_day = 1; /* "pandas/tslib.pyx":1403 * year = 1900 * month = day = 1 * hour = minute = second = fraction = 0 # <<<<<<<<<<<<<< * tz = -1 * # Default to -1 to signify that values not known; not critical to have, */ __pyx_v_hour = 0; __pyx_v_minute = 0; __pyx_v_second = 0; __pyx_v_fraction = 0; /* "pandas/tslib.pyx":1404 * month = day = 1 * hour = minute = second = fraction = 0 * tz = -1 # <<<<<<<<<<<<<< * # Default to -1 to signify that values not known; not critical to have, * # though */ __Pyx_INCREF(__pyx_int_neg_1); __Pyx_XDECREF_SET(__pyx_v_tz, __pyx_int_neg_1); /* "pandas/tslib.pyx":1407 * # Default to -1 to signify that values not known; not critical to have, * # though * week_of_year = -1 # <<<<<<<<<<<<<< * week_of_year_start = -1 * # weekday and julian defaulted to -1 so as to signal need to calculate */ __Pyx_INCREF(__pyx_int_neg_1); __Pyx_XDECREF_SET(__pyx_v_week_of_year, __pyx_int_neg_1); /* "pandas/tslib.pyx":1408 * # though * week_of_year = -1 * week_of_year_start = -1 # <<<<<<<<<<<<<< * # weekday and julian defaulted to -1 so as to signal need to calculate * # values */ __pyx_v_week_of_year_start = -1; /* "pandas/tslib.pyx":1411 * # weekday and julian defaulted to -1 so as to signal need to calculate * # values * weekday = julian = -1 # <<<<<<<<<<<<<< * found_dict = found.groupdict() * for group_key in found_dict.iterkeys(): */ __pyx_v_weekday = -1; __pyx_v_julian = -1; /* "pandas/tslib.pyx":1412 * # values * weekday = julian = -1 * found_dict = found.groupdict() # <<<<<<<<<<<<<< * for group_key in found_dict.iterkeys(): * # Directives not explicitly handled below: */ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_found, __pyx_n_s_groupdict); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1412; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_15 = PyObject_Call(__pyx_t_5, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1412; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_15); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF_SET(__pyx_v_found_dict, __pyx_t_15); __pyx_t_15 = 0; /* "pandas/tslib.pyx":1413 * weekday = julian = -1 * found_dict = found.groupdict() * for group_key in found_dict.iterkeys(): # <<<<<<<<<<<<<< * # Directives not explicitly handled below: * # c, x, X */ __pyx_t_27 = 0; if (unlikely(__pyx_v_found_dict == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "iterkeys"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1413; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_5 = __Pyx_dict_iterator(__pyx_v_found_dict, 0, __pyx_n_s_iterkeys, (&__pyx_t_28), (&__pyx_t_14)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1413; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = __pyx_t_5; __pyx_t_5 = 0; while (1) { __pyx_t_29 = __Pyx_dict_iter_next(__pyx_t_15, __pyx_t_28, &__pyx_t_27, &__pyx_t_5, NULL, NULL, __pyx_t_14); if (unlikely(__pyx_t_29 == 0)) break; if (unlikely(__pyx_t_29 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1413; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_XDECREF_SET(__pyx_v_group_key, __pyx_t_5); __pyx_t_5 = 0; /* "pandas/tslib.pyx":1419 * # U, W * # worthless without day of the week * parse_code = _parse_code_table[group_key] # <<<<<<<<<<<<<< * * if parse_code == 0: */ __pyx_t_5 = __Pyx_PyDict_GetItem(__pyx_v__parse_code_table, __pyx_v_group_key); if (unlikely(__pyx_t_5 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1419; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_5); __pyx_t_29 = __Pyx_PyInt_As_int(__pyx_t_5); if (unlikely((__pyx_t_29 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1419; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_v_parse_code = __pyx_t_29; /* "pandas/tslib.pyx":1491 * # W starts week on Monday. * week_of_year_start = 0 * elif parse_code == 17: # <<<<<<<<<<<<<< * # Since -1 is default value only need to worry about setting tz * # if it can be something other than -1. */ switch (__pyx_v_parse_code) { /* "pandas/tslib.pyx":1421 * parse_code = _parse_code_table[group_key] * * if parse_code == 0: # <<<<<<<<<<<<<< * year = int(found_dict['y']) * # Open Group specification for strptime() states that a %y */ case 0: /* "pandas/tslib.pyx":1422 * * if parse_code == 0: * year = int(found_dict['y']) # <<<<<<<<<<<<<< * # Open Group specification for strptime() states that a %y * #value in the range of [00, 68] is in the century 2000, while */ __pyx_t_5 = PyObject_GetItem(__pyx_v_found_dict, __pyx_n_s_y); if (unlikely(__pyx_t_5 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1422; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = PyNumber_Int(__pyx_t_5); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1422; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_29 = __Pyx_PyInt_As_int(__pyx_t_4); if (unlikely((__pyx_t_29 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1422; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_year = __pyx_t_29; /* "pandas/tslib.pyx":1426 * #value in the range of [00, 68] is in the century 2000, while * #[69,99] is in the century 1900 * if year <= 68: # <<<<<<<<<<<<<< * year += 2000 * else: */ __pyx_t_9 = ((__pyx_v_year <= 68) != 0); if (__pyx_t_9) { /* "pandas/tslib.pyx":1427 * #[69,99] is in the century 1900 * if year <= 68: * year += 2000 # <<<<<<<<<<<<<< * else: * year += 1900 */ __pyx_v_year = (__pyx_v_year + 2000); goto __pyx_L46; } /*else*/ { /* "pandas/tslib.pyx":1429 * year += 2000 * else: * year += 1900 # <<<<<<<<<<<<<< * elif parse_code == 1: * year = int(found_dict['Y']) */ __pyx_v_year = (__pyx_v_year + 1900); } __pyx_L46:; break; /* "pandas/tslib.pyx":1430 * else: * year += 1900 * elif parse_code == 1: # <<<<<<<<<<<<<< * year = int(found_dict['Y']) * elif parse_code == 2: */ case 1: /* "pandas/tslib.pyx":1431 * year += 1900 * elif parse_code == 1: * year = int(found_dict['Y']) # <<<<<<<<<<<<<< * elif parse_code == 2: * month = int(found_dict['m']) */ __pyx_t_4 = PyObject_GetItem(__pyx_v_found_dict, __pyx_n_s_Y); if (unlikely(__pyx_t_4 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1431; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = PyNumber_Int(__pyx_t_4); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1431; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_29 = __Pyx_PyInt_As_int(__pyx_t_5); if (unlikely((__pyx_t_29 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1431; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_v_year = __pyx_t_29; break; /* "pandas/tslib.pyx":1432 * elif parse_code == 1: * year = int(found_dict['Y']) * elif parse_code == 2: # <<<<<<<<<<<<<< * month = int(found_dict['m']) * elif parse_code == 3: */ case 2: /* "pandas/tslib.pyx":1433 * year = int(found_dict['Y']) * elif parse_code == 2: * month = int(found_dict['m']) # <<<<<<<<<<<<<< * elif parse_code == 3: * # elif group_key == 'B': */ __pyx_t_5 = PyObject_GetItem(__pyx_v_found_dict, __pyx_n_s_m); if (unlikely(__pyx_t_5 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1433; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = PyNumber_Int(__pyx_t_5); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1433; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_29 = __Pyx_PyInt_As_int(__pyx_t_4); if (unlikely((__pyx_t_29 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1433; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_month = __pyx_t_29; break; /* "pandas/tslib.pyx":1434 * elif parse_code == 2: * month = int(found_dict['m']) * elif parse_code == 3: # <<<<<<<<<<<<<< * # elif group_key == 'B': * month = locale_time.f_month.index(found_dict['B'].lower()) */ case 3: /* "pandas/tslib.pyx":1436 * elif parse_code == 3: * # elif group_key == 'B': * month = locale_time.f_month.index(found_dict['B'].lower()) # <<<<<<<<<<<<<< * elif parse_code == 4: * # elif group_key == 'b': */ if (unlikely(!__pyx_v_locale_time)) { __Pyx_RaiseUnboundLocalError("locale_time"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1436; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_locale_time, __pyx_n_s_f_month); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1436; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_index); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1436; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyObject_GetItem(__pyx_v_found_dict, __pyx_n_s_B); if (unlikely(__pyx_t_4 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1436; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_4); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_lower); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1436; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyObject_Call(__pyx_t_2, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1436; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1436; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyObject_Call(__pyx_t_5, __pyx_t_2, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1436; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_29 = __Pyx_PyInt_As_int(__pyx_t_4); if (unlikely((__pyx_t_29 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1436; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_month = __pyx_t_29; break; /* "pandas/tslib.pyx":1437 * # elif group_key == 'B': * month = locale_time.f_month.index(found_dict['B'].lower()) * elif parse_code == 4: # <<<<<<<<<<<<<< * # elif group_key == 'b': * month = locale_time.a_month.index(found_dict['b'].lower()) */ case 4: /* "pandas/tslib.pyx":1439 * elif parse_code == 4: * # elif group_key == 'b': * month = locale_time.a_month.index(found_dict['b'].lower()) # <<<<<<<<<<<<<< * elif parse_code == 5: * # elif group_key == 'd': */ if (unlikely(!__pyx_v_locale_time)) { __Pyx_RaiseUnboundLocalError("locale_time"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1439; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_locale_time, __pyx_n_s_a_month); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1439; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_index); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1439; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyObject_GetItem(__pyx_v_found_dict, __pyx_n_s_b); if (unlikely(__pyx_t_4 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1439; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_lower); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1439; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyObject_Call(__pyx_t_5, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1439; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1439; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1439; __pyx_clineno = __LINE__; goto __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_29 = __Pyx_PyInt_As_int(__pyx_t_4); if (unlikely((__pyx_t_29 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1439; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_month = __pyx_t_29; break; /* "pandas/tslib.pyx":1440 * # elif group_key == 'b': * month = locale_time.a_month.index(found_dict['b'].lower()) * elif parse_code == 5: # <<<<<<<<<<<<<< * # elif group_key == 'd': * day = int(found_dict['d']) */ case 5: /* "pandas/tslib.pyx":1442 * elif parse_code == 5: * # elif group_key == 'd': * day = int(found_dict['d']) # <<<<<<<<<<<<<< * elif parse_code == 6: * # elif group_key == 'H': */ __pyx_t_4 = PyObject_GetItem(__pyx_v_found_dict, __pyx_n_s_d); if (unlikely(__pyx_t_4 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1442; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = PyNumber_Int(__pyx_t_4); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1442; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_29 = __Pyx_PyInt_As_int(__pyx_t_5); if (unlikely((__pyx_t_29 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1442; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_v_day = __pyx_t_29; break; /* "pandas/tslib.pyx":1443 * # elif group_key == 'd': * day = int(found_dict['d']) * elif parse_code == 6: # <<<<<<<<<<<<<< * # elif group_key == 'H': * hour = int(found_dict['H']) */ case 6: /* "pandas/tslib.pyx":1445 * elif parse_code == 6: * # elif group_key == 'H': * hour = int(found_dict['H']) # <<<<<<<<<<<<<< * elif parse_code == 7: * hour = int(found_dict['I']) */ __pyx_t_5 = PyObject_GetItem(__pyx_v_found_dict, __pyx_n_s_H); if (unlikely(__pyx_t_5 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1445; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = PyNumber_Int(__pyx_t_5); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1445; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_29 = __Pyx_PyInt_As_int(__pyx_t_4); if (unlikely((__pyx_t_29 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1445; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_hour = __pyx_t_29; break; /* "pandas/tslib.pyx":1446 * # elif group_key == 'H': * hour = int(found_dict['H']) * elif parse_code == 7: # <<<<<<<<<<<<<< * hour = int(found_dict['I']) * ampm = found_dict.get('p', '').lower() */ case 7: /* "pandas/tslib.pyx":1447 * hour = int(found_dict['H']) * elif parse_code == 7: * hour = int(found_dict['I']) # <<<<<<<<<<<<<< * ampm = found_dict.get('p', '').lower() * # If there was no AM/PM indicator, we'll treat this like AM */ __pyx_t_4 = PyObject_GetItem(__pyx_v_found_dict, __pyx_n_s_I); if (unlikely(__pyx_t_4 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1447; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = PyNumber_Int(__pyx_t_4); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1447; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_29 = __Pyx_PyInt_As_int(__pyx_t_5); if (unlikely((__pyx_t_29 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1447; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_v_hour = __pyx_t_29; /* "pandas/tslib.pyx":1448 * elif parse_code == 7: * hour = int(found_dict['I']) * ampm = found_dict.get('p', '').lower() # <<<<<<<<<<<<<< * # If there was no AM/PM indicator, we'll treat this like AM * if ampm in ('', locale_time.am_pm[0]): */ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_found_dict, __pyx_n_s_get); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1448; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = PyObject_Call(__pyx_t_5, __pyx_tuple__39, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1448; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_lower); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1448; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyObject_Call(__pyx_t_5, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1448; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF_SET(__pyx_v_ampm, __pyx_t_4); __pyx_t_4 = 0; /* "pandas/tslib.pyx":1450 * ampm = found_dict.get('p', '').lower() * # If there was no AM/PM indicator, we'll treat this like AM * if ampm in ('', locale_time.am_pm[0]): # <<<<<<<<<<<<<< * # We're in AM so the hour is correct unless we're * # looking at 12 midnight. */ if (unlikely(!__pyx_v_locale_time)) { __Pyx_RaiseUnboundLocalError("locale_time"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1450; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_locale_time, __pyx_n_s_am_pm); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1450; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_GetItemInt(__pyx_t_4, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_5 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1450; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_INCREF(__pyx_v_ampm); __pyx_t_4 = __pyx_v_ampm; __pyx_t_2 = PyObject_RichCompare(__pyx_t_4, __pyx_kp_s__13, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1450; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_9 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1450; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (!((int)__pyx_t_9)) { __pyx_t_2 = PyObject_RichCompare(__pyx_t_4, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1450; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_10 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1450; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_30 = ((int)__pyx_t_10); } else { __pyx_t_30 = ((int)__pyx_t_9); } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_9 = (__pyx_t_30 != 0); if (__pyx_t_9) { /* "pandas/tslib.pyx":1454 * # looking at 12 midnight. * # 12 midnight == 12 AM == hour 0 * if hour == 12: # <<<<<<<<<<<<<< * hour = 0 * elif ampm == locale_time.am_pm[1]: */ __pyx_t_9 = ((__pyx_v_hour == 12) != 0); if (__pyx_t_9) { /* "pandas/tslib.pyx":1455 * # 12 midnight == 12 AM == hour 0 * if hour == 12: * hour = 0 # <<<<<<<<<<<<<< * elif ampm == locale_time.am_pm[1]: * # We're in PM so we need to add 12 to the hour unless */ __pyx_v_hour = 0; goto __pyx_L48; } __pyx_L48:; goto __pyx_L47; } /* "pandas/tslib.pyx":1456 * if hour == 12: * hour = 0 * elif ampm == locale_time.am_pm[1]: # <<<<<<<<<<<<<< * # We're in PM so we need to add 12 to the hour unless * # we're looking at 12 noon. */ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_locale_time, __pyx_n_s_am_pm); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1456; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_5, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_4 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1456; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyObject_RichCompare(__pyx_v_ampm, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1456; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1456; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_9) { /* "pandas/tslib.pyx":1460 * # we're looking at 12 noon. * # 12 noon == 12 PM == hour 12 * if hour != 12: # <<<<<<<<<<<<<< * hour += 12 * elif parse_code == 8: */ __pyx_t_9 = ((__pyx_v_hour != 12) != 0); if (__pyx_t_9) { /* "pandas/tslib.pyx":1461 * # 12 noon == 12 PM == hour 12 * if hour != 12: * hour += 12 # <<<<<<<<<<<<<< * elif parse_code == 8: * minute = int(found_dict['M']) */ __pyx_v_hour = (__pyx_v_hour + 12); goto __pyx_L49; } __pyx_L49:; goto __pyx_L47; } __pyx_L47:; break; /* "pandas/tslib.pyx":1462 * if hour != 12: * hour += 12 * elif parse_code == 8: # <<<<<<<<<<<<<< * minute = int(found_dict['M']) * elif parse_code == 9: */ case 8: /* "pandas/tslib.pyx":1463 * hour += 12 * elif parse_code == 8: * minute = int(found_dict['M']) # <<<<<<<<<<<<<< * elif parse_code == 9: * second = int(found_dict['S']) */ __pyx_t_5 = PyObject_GetItem(__pyx_v_found_dict, __pyx_n_s_M); if (unlikely(__pyx_t_5 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1463; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = PyNumber_Int(__pyx_t_5); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1463; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_29 = __Pyx_PyInt_As_int(__pyx_t_4); if (unlikely((__pyx_t_29 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1463; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_minute = __pyx_t_29; break; /* "pandas/tslib.pyx":1464 * elif parse_code == 8: * minute = int(found_dict['M']) * elif parse_code == 9: # <<<<<<<<<<<<<< * second = int(found_dict['S']) * elif parse_code == 10: */ case 9: /* "pandas/tslib.pyx":1465 * minute = int(found_dict['M']) * elif parse_code == 9: * second = int(found_dict['S']) # <<<<<<<<<<<<<< * elif parse_code == 10: * s = found_dict['f'] */ __pyx_t_4 = PyObject_GetItem(__pyx_v_found_dict, __pyx_n_s_S); if (unlikely(__pyx_t_4 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1465; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = PyNumber_Int(__pyx_t_4); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1465; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_29 = __Pyx_PyInt_As_int(__pyx_t_5); if (unlikely((__pyx_t_29 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1465; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_v_second = __pyx_t_29; break; /* "pandas/tslib.pyx":1466 * elif parse_code == 9: * second = int(found_dict['S']) * elif parse_code == 10: # <<<<<<<<<<<<<< * s = found_dict['f'] * # Pad to always return microseconds. */ case 10: /* "pandas/tslib.pyx":1467 * second = int(found_dict['S']) * elif parse_code == 10: * s = found_dict['f'] # <<<<<<<<<<<<<< * # Pad to always return microseconds. * s += "0" * (6 - len(s)) */ __pyx_t_5 = PyObject_GetItem(__pyx_v_found_dict, __pyx_n_s_f); if (unlikely(__pyx_t_5 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1467; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_5); __Pyx_XDECREF_SET(__pyx_v_s, __pyx_t_5); __pyx_t_5 = 0; /* "pandas/tslib.pyx":1469 * s = found_dict['f'] * # Pad to always return microseconds. * s += "0" * (6 - len(s)) # <<<<<<<<<<<<<< * fraction = int(s) * elif parse_code == 11: */ __pyx_t_31 = PyObject_Length(__pyx_v_s); if (unlikely(__pyx_t_31 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1469; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_5 = PyInt_FromSsize_t((6 - __pyx_t_31)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1469; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = PyNumber_Multiply(__pyx_kp_s_0, __pyx_t_5); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1469; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyNumber_InPlaceAdd(__pyx_v_s, __pyx_t_4); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1469; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF_SET(__pyx_v_s, __pyx_t_5); __pyx_t_5 = 0; /* "pandas/tslib.pyx":1470 * # Pad to always return microseconds. * s += "0" * (6 - len(s)) * fraction = int(s) # <<<<<<<<<<<<<< * elif parse_code == 11: * weekday = locale_time.f_weekday.index(found_dict['A'].lower()) */ __pyx_t_5 = PyNumber_Int(__pyx_v_s); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1470; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_29 = __Pyx_PyInt_As_int(__pyx_t_5); if (unlikely((__pyx_t_29 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1470; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_v_fraction = __pyx_t_29; break; /* "pandas/tslib.pyx":1471 * s += "0" * (6 - len(s)) * fraction = int(s) * elif parse_code == 11: # <<<<<<<<<<<<<< * weekday = locale_time.f_weekday.index(found_dict['A'].lower()) * elif parse_code == 12: */ case 11: /* "pandas/tslib.pyx":1472 * fraction = int(s) * elif parse_code == 11: * weekday = locale_time.f_weekday.index(found_dict['A'].lower()) # <<<<<<<<<<<<<< * elif parse_code == 12: * weekday = locale_time.a_weekday.index(found_dict['a'].lower()) */ if (unlikely(!__pyx_v_locale_time)) { __Pyx_RaiseUnboundLocalError("locale_time"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1472; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_locale_time, __pyx_n_s_f_weekday); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1472; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_index); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1472; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyObject_GetItem(__pyx_v_found_dict, __pyx_n_s_A); if (unlikely(__pyx_t_5 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1472; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_5); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_lower); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1472; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyObject_Call(__pyx_t_2, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1472; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1472; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyObject_Call(__pyx_t_4, __pyx_t_2, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1472; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_29 = __Pyx_PyInt_As_int(__pyx_t_5); if (unlikely((__pyx_t_29 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1472; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_v_weekday = __pyx_t_29; break; /* "pandas/tslib.pyx":1473 * elif parse_code == 11: * weekday = locale_time.f_weekday.index(found_dict['A'].lower()) * elif parse_code == 12: # <<<<<<<<<<<<<< * weekday = locale_time.a_weekday.index(found_dict['a'].lower()) * elif parse_code == 13: */ case 12: /* "pandas/tslib.pyx":1474 * weekday = locale_time.f_weekday.index(found_dict['A'].lower()) * elif parse_code == 12: * weekday = locale_time.a_weekday.index(found_dict['a'].lower()) # <<<<<<<<<<<<<< * elif parse_code == 13: * weekday = int(found_dict['w']) */ if (unlikely(!__pyx_v_locale_time)) { __Pyx_RaiseUnboundLocalError("locale_time"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1474; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_locale_time, __pyx_n_s_a_weekday); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1474; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_index); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1474; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyObject_GetItem(__pyx_v_found_dict, __pyx_n_s_a); if (unlikely(__pyx_t_5 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1474; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_lower); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1474; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyObject_Call(__pyx_t_4, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1474; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1474; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1474; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_29 = __Pyx_PyInt_As_int(__pyx_t_5); if (unlikely((__pyx_t_29 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1474; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_v_weekday = __pyx_t_29; break; /* "pandas/tslib.pyx":1475 * elif parse_code == 12: * weekday = locale_time.a_weekday.index(found_dict['a'].lower()) * elif parse_code == 13: # <<<<<<<<<<<<<< * weekday = int(found_dict['w']) * if weekday == 0: */ case 13: /* "pandas/tslib.pyx":1476 * weekday = locale_time.a_weekday.index(found_dict['a'].lower()) * elif parse_code == 13: * weekday = int(found_dict['w']) # <<<<<<<<<<<<<< * if weekday == 0: * weekday = 6 */ __pyx_t_5 = PyObject_GetItem(__pyx_v_found_dict, __pyx_n_s_w); if (unlikely(__pyx_t_5 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1476; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = PyNumber_Int(__pyx_t_5); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1476; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_29 = __Pyx_PyInt_As_int(__pyx_t_4); if (unlikely((__pyx_t_29 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1476; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_weekday = __pyx_t_29; /* "pandas/tslib.pyx":1477 * elif parse_code == 13: * weekday = int(found_dict['w']) * if weekday == 0: # <<<<<<<<<<<<<< * weekday = 6 * else: */ __pyx_t_9 = ((__pyx_v_weekday == 0) != 0); if (__pyx_t_9) { /* "pandas/tslib.pyx":1478 * weekday = int(found_dict['w']) * if weekday == 0: * weekday = 6 # <<<<<<<<<<<<<< * else: * weekday -= 1 */ __pyx_v_weekday = 6; goto __pyx_L50; } /*else*/ { /* "pandas/tslib.pyx":1480 * weekday = 6 * else: * weekday -= 1 # <<<<<<<<<<<<<< * elif parse_code == 14: * julian = int(found_dict['j']) */ __pyx_v_weekday = (__pyx_v_weekday - 1); } __pyx_L50:; break; /* "pandas/tslib.pyx":1481 * else: * weekday -= 1 * elif parse_code == 14: # <<<<<<<<<<<<<< * julian = int(found_dict['j']) * elif parse_code == 15 or parse_code == 16: */ case 14: /* "pandas/tslib.pyx":1482 * weekday -= 1 * elif parse_code == 14: * julian = int(found_dict['j']) # <<<<<<<<<<<<<< * elif parse_code == 15 or parse_code == 16: * week_of_year = int(found_dict[group_key]) */ __pyx_t_4 = PyObject_GetItem(__pyx_v_found_dict, __pyx_n_s_j); if (unlikely(__pyx_t_4 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1482; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = PyNumber_Int(__pyx_t_4); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1482; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_29 = __Pyx_PyInt_As_int(__pyx_t_5); if (unlikely((__pyx_t_29 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1482; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_v_julian = __pyx_t_29; break; /* "pandas/tslib.pyx":1483 * elif parse_code == 14: * julian = int(found_dict['j']) * elif parse_code == 15 or parse_code == 16: # <<<<<<<<<<<<<< * week_of_year = int(found_dict[group_key]) * if group_key == 'U': */ case 15: case 16: /* "pandas/tslib.pyx":1484 * julian = int(found_dict['j']) * elif parse_code == 15 or parse_code == 16: * week_of_year = int(found_dict[group_key]) # <<<<<<<<<<<<<< * if group_key == 'U': * # U starts week on Sunday. */ __pyx_t_5 = PyObject_GetItem(__pyx_v_found_dict, __pyx_v_group_key); if (unlikely(__pyx_t_5 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1484; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = PyNumber_Int(__pyx_t_5); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1484; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF_SET(__pyx_v_week_of_year, __pyx_t_4); __pyx_t_4 = 0; /* "pandas/tslib.pyx":1485 * elif parse_code == 15 or parse_code == 16: * week_of_year = int(found_dict[group_key]) * if group_key == 'U': # <<<<<<<<<<<<<< * # U starts week on Sunday. * week_of_year_start = 6 */ __pyx_t_9 = (__Pyx_PyString_Equals(__pyx_v_group_key, __pyx_n_s_U, Py_EQ)); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1485; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__pyx_t_9) { /* "pandas/tslib.pyx":1487 * if group_key == 'U': * # U starts week on Sunday. * week_of_year_start = 6 # <<<<<<<<<<<<<< * else: * # W starts week on Monday. */ __pyx_v_week_of_year_start = 6; goto __pyx_L51; } /*else*/ { /* "pandas/tslib.pyx":1490 * else: * # W starts week on Monday. * week_of_year_start = 0 # <<<<<<<<<<<<<< * elif parse_code == 17: * # Since -1 is default value only need to worry about setting tz */ __pyx_v_week_of_year_start = 0; } __pyx_L51:; break; /* "pandas/tslib.pyx":1491 * # W starts week on Monday. * week_of_year_start = 0 * elif parse_code == 17: # <<<<<<<<<<<<<< * # Since -1 is default value only need to worry about setting tz * # if it can be something other than -1. */ case 17: /* "pandas/tslib.pyx":1494 * # Since -1 is default value only need to worry about setting tz * # if it can be something other than -1. * found_zone = found_dict['Z'].lower() # <<<<<<<<<<<<<< * for value, tz_values in enumerate(locale_time.timezone): * if found_zone in tz_values: */ __pyx_t_4 = PyObject_GetItem(__pyx_v_found_dict, __pyx_n_s_Z_2); if (unlikely(__pyx_t_4 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1494; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_lower); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1494; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyObject_Call(__pyx_t_5, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1494; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF_SET(__pyx_v_found_zone, __pyx_t_4); __pyx_t_4 = 0; /* "pandas/tslib.pyx":1495 * # if it can be something other than -1. * found_zone = found_dict['Z'].lower() * for value, tz_values in enumerate(locale_time.timezone): # <<<<<<<<<<<<<< * if found_zone in tz_values: * # Deal w/ bad locale setup where timezone names are the */ __Pyx_INCREF(__pyx_int_0); __pyx_t_4 = __pyx_int_0; if (unlikely(!__pyx_v_locale_time)) { __Pyx_RaiseUnboundLocalError("locale_time"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1495; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_locale_time, __pyx_n_s_timezone); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1495; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); if (PyList_CheckExact(__pyx_t_5) || PyTuple_CheckExact(__pyx_t_5)) { __pyx_t_2 = __pyx_t_5; __Pyx_INCREF(__pyx_t_2); __pyx_t_31 = 0; __pyx_t_32 = NULL; } else { __pyx_t_31 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1495; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_32 = Py_TYPE(__pyx_t_2)->tp_iternext; } __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; for (;;) { if (!__pyx_t_32 && PyList_CheckExact(__pyx_t_2)) { if (__pyx_t_31 >= PyList_GET_SIZE(__pyx_t_2)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_5 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_31); __Pyx_INCREF(__pyx_t_5); __pyx_t_31++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1495; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_5 = PySequence_ITEM(__pyx_t_2, __pyx_t_31); __pyx_t_31++; if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1495; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif } else if (!__pyx_t_32 && PyTuple_CheckExact(__pyx_t_2)) { if (__pyx_t_31 >= PyTuple_GET_SIZE(__pyx_t_2)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_31); __Pyx_INCREF(__pyx_t_5); __pyx_t_31++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1495; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_5 = PySequence_ITEM(__pyx_t_2, __pyx_t_31); __pyx_t_31++; if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1495; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif } else { __pyx_t_5 = __pyx_t_32(__pyx_t_2); if (unlikely(!__pyx_t_5)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1495; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } break; } __Pyx_GOTREF(__pyx_t_5); } __Pyx_XDECREF_SET(__pyx_v_tz_values, __pyx_t_5); __pyx_t_5 = 0; __Pyx_INCREF(__pyx_t_4); __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_4); __pyx_t_5 = PyNumber_Add(__pyx_t_4, __pyx_int_1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1495; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = __pyx_t_5; __pyx_t_5 = 0; /* "pandas/tslib.pyx":1496 * found_zone = found_dict['Z'].lower() * for value, tz_values in enumerate(locale_time.timezone): * if found_zone in tz_values: # <<<<<<<<<<<<<< * # Deal w/ bad locale setup where timezone names are the * # same and yet time.daylight is true; too ambiguous to */ __pyx_t_9 = (__Pyx_PySequence_Contains(__pyx_v_found_zone, __pyx_v_tz_values, Py_EQ)); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1496; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_30 = (__pyx_t_9 != 0); if (__pyx_t_30) { /* "pandas/tslib.pyx":1500 * # same and yet time.daylight is true; too ambiguous to * # be able to tell what timezone has daylight savings * if (time.tzname[0] == time.tzname[1] and # <<<<<<<<<<<<<< * time.daylight and found_zone not in ("utc", "gmt")): * break */ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_time); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1500; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_tzname); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1500; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_16); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_GetItemInt(__pyx_t_16, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_5 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1500; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; __pyx_t_16 = __Pyx_GetModuleGlobalName(__pyx_n_s_time); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1500; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_16); __pyx_t_33 = __Pyx_PyObject_GetAttrStr(__pyx_t_16, __pyx_n_s_tzname); if (unlikely(!__pyx_t_33)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1500; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_33); __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; __pyx_t_16 = __Pyx_GetItemInt(__pyx_t_33, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_16 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1500; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_16); __Pyx_DECREF(__pyx_t_33); __pyx_t_33 = 0; __pyx_t_33 = PyObject_RichCompare(__pyx_t_5, __pyx_t_16, Py_EQ); __Pyx_XGOTREF(__pyx_t_33); if (unlikely(!__pyx_t_33)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1500; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; __pyx_t_30 = __Pyx_PyObject_IsTrue(__pyx_t_33); if (unlikely(__pyx_t_30 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1500; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_33); __pyx_t_33 = 0; if (__pyx_t_30) { /* "pandas/tslib.pyx":1501 * # be able to tell what timezone has daylight savings * if (time.tzname[0] == time.tzname[1] and * time.daylight and found_zone not in ("utc", "gmt")): # <<<<<<<<<<<<<< * break * else: */ __pyx_t_33 = __Pyx_GetModuleGlobalName(__pyx_n_s_time); if (unlikely(!__pyx_t_33)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1501; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_33); __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_t_33, __pyx_n_s_daylight); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1501; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_16); __Pyx_DECREF(__pyx_t_33); __pyx_t_33 = 0; __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_16); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1501; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; if (__pyx_t_9) { __Pyx_INCREF(__pyx_v_found_zone); __pyx_t_16 = __pyx_v_found_zone; __pyx_t_33 = PyObject_RichCompare(__pyx_t_16, __pyx_n_s_utc, Py_NE); __Pyx_XGOTREF(__pyx_t_33); if (unlikely(!__pyx_t_33)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1501; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_33); if (unlikely((__pyx_t_10 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1501; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_33); __pyx_t_33 = 0; if (((int)__pyx_t_10)) { __pyx_t_33 = PyObject_RichCompare(__pyx_t_16, __pyx_n_s_gmt, Py_NE); __Pyx_XGOTREF(__pyx_t_33); if (unlikely(!__pyx_t_33)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1501; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_34 = __Pyx_PyObject_IsTrue(__pyx_t_33); if (unlikely((__pyx_t_34 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1501; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_33); __pyx_t_33 = 0; __pyx_t_35 = ((int)__pyx_t_34); } else { __pyx_t_35 = ((int)__pyx_t_10); } __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; __pyx_t_10 = __pyx_t_35; __pyx_t_35 = __pyx_t_10; } else { __pyx_t_35 = __pyx_t_9; } __pyx_t_9 = __pyx_t_35; } else { __pyx_t_9 = __pyx_t_30; } if (__pyx_t_9) { /* "pandas/tslib.pyx":1502 * if (time.tzname[0] == time.tzname[1] and * time.daylight and found_zone not in ("utc", "gmt")): * break # <<<<<<<<<<<<<< * else: * tz = value */ goto __pyx_L53_break; } /*else*/ { /* "pandas/tslib.pyx":1504 * break * else: * tz = value # <<<<<<<<<<<<<< * break * # If we know the wk of the year and what day of that wk, we can figure */ __Pyx_INCREF(__pyx_v_value); __Pyx_DECREF_SET(__pyx_v_tz, __pyx_v_value); /* "pandas/tslib.pyx":1505 * else: * tz = value * break # <<<<<<<<<<<<<< * # If we know the wk of the year and what day of that wk, we can figure * # out the Julian day of the year. */ goto __pyx_L53_break; } } } __pyx_L53_break:; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; break; default: break; } } __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; /* "pandas/tslib.pyx":1508 * # If we know the wk of the year and what day of that wk, we can figure * # out the Julian day of the year. * if julian == -1 and week_of_year != -1 and weekday != -1: # <<<<<<<<<<<<<< * week_starts_Mon = True if week_of_year_start == 0 else False * julian = _calc_julian_from_U_or_W(year, week_of_year, weekday, */ __pyx_t_9 = (__pyx_v_julian == -1); if (__pyx_t_9) { __pyx_t_15 = PyObject_RichCompare(__pyx_v_week_of_year, __pyx_int_neg_1, Py_NE); __Pyx_XGOTREF(__pyx_t_15); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1508; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_30 = __Pyx_PyObject_IsTrue(__pyx_t_15); if (unlikely(__pyx_t_30 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1508; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; if (__pyx_t_30) { __pyx_t_35 = (__pyx_v_weekday != -1); __pyx_t_10 = __pyx_t_35; } else { __pyx_t_10 = __pyx_t_30; } __pyx_t_30 = __pyx_t_10; } else { __pyx_t_30 = __pyx_t_9; } if (__pyx_t_30) { /* "pandas/tslib.pyx":1509 * # out the Julian day of the year. * if julian == -1 and week_of_year != -1 and weekday != -1: * week_starts_Mon = True if week_of_year_start == 0 else False # <<<<<<<<<<<<<< * julian = _calc_julian_from_U_or_W(year, week_of_year, weekday, * week_starts_Mon) */ if (((__pyx_v_week_of_year_start == 0) != 0)) { __pyx_t_30 = 1; } else { __pyx_t_30 = 0; } __pyx_v_week_starts_Mon = __pyx_t_30; /* "pandas/tslib.pyx":1510 * if julian == -1 and week_of_year != -1 and weekday != -1: * week_starts_Mon = True if week_of_year_start == 0 else False * julian = _calc_julian_from_U_or_W(year, week_of_year, weekday, # <<<<<<<<<<<<<< * week_starts_Mon) * # Cannot pre-calculate datetime_date() since can change in Julian */ __pyx_t_15 = __Pyx_GetModuleGlobalName(__pyx_n_s_calc_julian_from_U_or_W); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1510; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_15); __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_year); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1510; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_weekday); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1510; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); /* "pandas/tslib.pyx":1511 * week_starts_Mon = True if week_of_year_start == 0 else False * julian = _calc_julian_from_U_or_W(year, week_of_year, weekday, * week_starts_Mon) # <<<<<<<<<<<<<< * # Cannot pre-calculate datetime_date() since can change in Julian * # calculation and thus could have different value for the day of the wk */ __pyx_t_16 = __Pyx_PyBool_FromLong(__pyx_v_week_starts_Mon); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1511; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_16); /* "pandas/tslib.pyx":1510 * if julian == -1 and week_of_year != -1 and weekday != -1: * week_starts_Mon = True if week_of_year_start == 0 else False * julian = _calc_julian_from_U_or_W(year, week_of_year, weekday, # <<<<<<<<<<<<<< * week_starts_Mon) * # Cannot pre-calculate datetime_date() since can change in Julian */ __pyx_t_33 = PyTuple_New(4); if (unlikely(!__pyx_t_33)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1510; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_33); PyTuple_SET_ITEM(__pyx_t_33, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __Pyx_INCREF(__pyx_v_week_of_year); PyTuple_SET_ITEM(__pyx_t_33, 1, __pyx_v_week_of_year); __Pyx_GIVEREF(__pyx_v_week_of_year); PyTuple_SET_ITEM(__pyx_t_33, 2, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_33, 3, __pyx_t_16); __Pyx_GIVEREF(__pyx_t_16); __pyx_t_4 = 0; __pyx_t_2 = 0; __pyx_t_16 = 0; __pyx_t_16 = PyObject_Call(__pyx_t_15, __pyx_t_33, NULL); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1510; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_16); __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; __Pyx_DECREF(__pyx_t_33); __pyx_t_33 = 0; __pyx_t_14 = __Pyx_PyInt_As_int(__pyx_t_16); if (unlikely((__pyx_t_14 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1510; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; __pyx_v_julian = __pyx_t_14; goto __pyx_L56; } __pyx_L56:; /* "pandas/tslib.pyx":1515 * # calculation and thus could have different value for the day of the wk * # calculation. * if julian == -1: # <<<<<<<<<<<<<< * # Need to add 1 to result since first day of the year is 1, not 0. * julian = datetime_date(year, month, day).toordinal() - \ */ __pyx_t_30 = ((__pyx_v_julian == -1) != 0); if (__pyx_t_30) { /* "pandas/tslib.pyx":1517 * if julian == -1: * # Need to add 1 to result since first day of the year is 1, not 0. * julian = datetime_date(year, month, day).toordinal() - \ # <<<<<<<<<<<<<< * datetime_date(year, 1, 1).toordinal() + 1 * else: # Assume that if they bothered to include Julian day it will */ __pyx_t_16 = __Pyx_GetModuleGlobalName(__pyx_n_s_datetime_date); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1517; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_16); __pyx_t_33 = __Pyx_PyInt_From_int(__pyx_v_year); if (unlikely(!__pyx_t_33)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1517; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_33); __pyx_t_15 = __Pyx_PyInt_From_int(__pyx_v_month); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1517; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_15); __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_day); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1517; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1517; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_33); __Pyx_GIVEREF(__pyx_t_33); PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_15); __Pyx_GIVEREF(__pyx_t_15); PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_33 = 0; __pyx_t_15 = 0; __pyx_t_2 = 0; __pyx_t_2 = PyObject_Call(__pyx_t_16, __pyx_t_4, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1517; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_toordinal); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1517; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_Call(__pyx_t_4, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1517; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "pandas/tslib.pyx":1518 * # Need to add 1 to result since first day of the year is 1, not 0. * julian = datetime_date(year, month, day).toordinal() - \ * datetime_date(year, 1, 1).toordinal() + 1 # <<<<<<<<<<<<<< * else: # Assume that if they bothered to include Julian day it will * # be accurate. */ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_datetime_date); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1518; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_16 = __Pyx_PyInt_From_int(__pyx_v_year); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1518; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_16); __pyx_t_15 = PyTuple_New(3); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1518; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_15); PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_t_16); __Pyx_GIVEREF(__pyx_t_16); __Pyx_INCREF(__pyx_int_1); PyTuple_SET_ITEM(__pyx_t_15, 1, __pyx_int_1); __Pyx_GIVEREF(__pyx_int_1); __Pyx_INCREF(__pyx_int_1); PyTuple_SET_ITEM(__pyx_t_15, 2, __pyx_int_1); __Pyx_GIVEREF(__pyx_int_1); __pyx_t_16 = 0; __pyx_t_16 = PyObject_Call(__pyx_t_4, __pyx_t_15, NULL); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1518; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_16); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_t_16, __pyx_n_s_toordinal); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1518; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_15); __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; __pyx_t_16 = PyObject_Call(__pyx_t_15, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1518; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_16); __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; /* "pandas/tslib.pyx":1517 * if julian == -1: * # Need to add 1 to result since first day of the year is 1, not 0. * julian = datetime_date(year, month, day).toordinal() - \ # <<<<<<<<<<<<<< * datetime_date(year, 1, 1).toordinal() + 1 * else: # Assume that if they bothered to include Julian day it will */ __pyx_t_15 = PyNumber_Subtract(__pyx_t_2, __pyx_t_16); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1517; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_15); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; /* "pandas/tslib.pyx":1518 * # Need to add 1 to result since first day of the year is 1, not 0. * julian = datetime_date(year, month, day).toordinal() - \ * datetime_date(year, 1, 1).toordinal() + 1 # <<<<<<<<<<<<<< * else: # Assume that if they bothered to include Julian day it will * # be accurate. */ __pyx_t_16 = PyNumber_Add(__pyx_t_15, __pyx_int_1); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1518; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_16); __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; __pyx_t_14 = __Pyx_PyInt_As_int(__pyx_t_16); if (unlikely((__pyx_t_14 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1518; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; __pyx_v_julian = __pyx_t_14; goto __pyx_L57; } /*else*/ { /* "pandas/tslib.pyx":1521 * else: # Assume that if they bothered to include Julian day it will * # be accurate. * datetime_result = datetime_date.fromordinal( # <<<<<<<<<<<<<< * (julian - 1) + datetime_date(year, 1, 1).toordinal()) * year = datetime_result.year */ __pyx_t_16 = __Pyx_GetModuleGlobalName(__pyx_n_s_datetime_date); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1521; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_16); __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_t_16, __pyx_n_s_fromordinal); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1521; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_15); __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; /* "pandas/tslib.pyx":1522 * # be accurate. * datetime_result = datetime_date.fromordinal( * (julian - 1) + datetime_date(year, 1, 1).toordinal()) # <<<<<<<<<<<<<< * year = datetime_result.year * month = datetime_result.month */ __pyx_t_16 = __Pyx_PyInt_From_long((__pyx_v_julian - 1)); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1522; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_16); __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_datetime_date); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1522; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_year); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1522; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_33 = PyTuple_New(3); if (unlikely(!__pyx_t_33)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1522; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_33); PyTuple_SET_ITEM(__pyx_t_33, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __Pyx_INCREF(__pyx_int_1); PyTuple_SET_ITEM(__pyx_t_33, 1, __pyx_int_1); __Pyx_GIVEREF(__pyx_int_1); __Pyx_INCREF(__pyx_int_1); PyTuple_SET_ITEM(__pyx_t_33, 2, __pyx_int_1); __Pyx_GIVEREF(__pyx_int_1); __pyx_t_4 = 0; __pyx_t_4 = PyObject_Call(__pyx_t_2, __pyx_t_33, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1522; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_33); __pyx_t_33 = 0; __pyx_t_33 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_toordinal); if (unlikely(!__pyx_t_33)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1522; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_33); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyObject_Call(__pyx_t_33, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1522; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_33); __pyx_t_33 = 0; __pyx_t_33 = PyNumber_Add(__pyx_t_16, __pyx_t_4); if (unlikely(!__pyx_t_33)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1522; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_33); __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "pandas/tslib.pyx":1521 * else: # Assume that if they bothered to include Julian day it will * # be accurate. * datetime_result = datetime_date.fromordinal( # <<<<<<<<<<<<<< * (julian - 1) + datetime_date(year, 1, 1).toordinal()) * year = datetime_result.year */ __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1521; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_33); __Pyx_GIVEREF(__pyx_t_33); __pyx_t_33 = 0; __pyx_t_33 = PyObject_Call(__pyx_t_15, __pyx_t_4, NULL); if (unlikely(!__pyx_t_33)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1521; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_33); __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF_SET(__pyx_v_datetime_result, __pyx_t_33); __pyx_t_33 = 0; /* "pandas/tslib.pyx":1523 * datetime_result = datetime_date.fromordinal( * (julian - 1) + datetime_date(year, 1, 1).toordinal()) * year = datetime_result.year # <<<<<<<<<<<<<< * month = datetime_result.month * day = datetime_result.day */ __pyx_t_33 = __Pyx_PyObject_GetAttrStr(__pyx_v_datetime_result, __pyx_n_s_year); if (unlikely(!__pyx_t_33)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1523; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_33); __pyx_t_14 = __Pyx_PyInt_As_int(__pyx_t_33); if (unlikely((__pyx_t_14 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1523; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_33); __pyx_t_33 = 0; __pyx_v_year = __pyx_t_14; /* "pandas/tslib.pyx":1524 * (julian - 1) + datetime_date(year, 1, 1).toordinal()) * year = datetime_result.year * month = datetime_result.month # <<<<<<<<<<<<<< * day = datetime_result.day * if weekday == -1: */ __pyx_t_33 = __Pyx_PyObject_GetAttrStr(__pyx_v_datetime_result, __pyx_n_s_month); if (unlikely(!__pyx_t_33)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1524; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_33); __pyx_t_14 = __Pyx_PyInt_As_int(__pyx_t_33); if (unlikely((__pyx_t_14 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1524; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_33); __pyx_t_33 = 0; __pyx_v_month = __pyx_t_14; /* "pandas/tslib.pyx":1525 * year = datetime_result.year * month = datetime_result.month * day = datetime_result.day # <<<<<<<<<<<<<< * if weekday == -1: * weekday = datetime_date(year, month, day).weekday() */ __pyx_t_33 = __Pyx_PyObject_GetAttrStr(__pyx_v_datetime_result, __pyx_n_s_day); if (unlikely(!__pyx_t_33)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1525; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_33); __pyx_t_14 = __Pyx_PyInt_As_int(__pyx_t_33); if (unlikely((__pyx_t_14 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1525; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_33); __pyx_t_33 = 0; __pyx_v_day = __pyx_t_14; } __pyx_L57:; /* "pandas/tslib.pyx":1526 * month = datetime_result.month * day = datetime_result.day * if weekday == -1: # <<<<<<<<<<<<<< * weekday = datetime_date(year, month, day).weekday() * */ __pyx_t_30 = ((__pyx_v_weekday == -1) != 0); if (__pyx_t_30) { /* "pandas/tslib.pyx":1527 * day = datetime_result.day * if weekday == -1: * weekday = datetime_date(year, month, day).weekday() # <<<<<<<<<<<<<< * * dts.year = year */ __pyx_t_33 = __Pyx_GetModuleGlobalName(__pyx_n_s_datetime_date); if (unlikely(!__pyx_t_33)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1527; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_33); __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_year); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1527; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_15 = __Pyx_PyInt_From_int(__pyx_v_month); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1527; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_15); __pyx_t_16 = __Pyx_PyInt_From_int(__pyx_v_day); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1527; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_16); __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1527; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_15); __Pyx_GIVEREF(__pyx_t_15); PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_t_16); __Pyx_GIVEREF(__pyx_t_16); __pyx_t_4 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_16 = PyObject_Call(__pyx_t_33, __pyx_t_2, NULL); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1527; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_16); __Pyx_DECREF(__pyx_t_33); __pyx_t_33 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_16, __pyx_n_s_weekday); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1527; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; __pyx_t_16 = PyObject_Call(__pyx_t_2, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1527; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_16); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_14 = __Pyx_PyInt_As_int(__pyx_t_16); if (unlikely((__pyx_t_14 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1527; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; __pyx_v_weekday = __pyx_t_14; goto __pyx_L58; } __pyx_L58:; /* "pandas/tslib.pyx":1529 * weekday = datetime_date(year, month, day).weekday() * * dts.year = year # <<<<<<<<<<<<<< * dts.month = month * dts.day = day */ __pyx_v_dts.year = __pyx_v_year; /* "pandas/tslib.pyx":1530 * * dts.year = year * dts.month = month # <<<<<<<<<<<<<< * dts.day = day * dts.hour = hour */ __pyx_v_dts.month = __pyx_v_month; /* "pandas/tslib.pyx":1531 * dts.year = year * dts.month = month * dts.day = day # <<<<<<<<<<<<<< * dts.hour = hour * dts.min = minute */ __pyx_v_dts.day = __pyx_v_day; /* "pandas/tslib.pyx":1532 * dts.month = month * dts.day = day * dts.hour = hour # <<<<<<<<<<<<<< * dts.min = minute * dts.sec = second */ __pyx_v_dts.hour = __pyx_v_hour; /* "pandas/tslib.pyx":1533 * dts.day = day * dts.hour = hour * dts.min = minute # <<<<<<<<<<<<<< * dts.sec = second * dts.us = fraction */ __pyx_v_dts.min = __pyx_v_minute; /* "pandas/tslib.pyx":1534 * dts.hour = hour * dts.min = minute * dts.sec = second # <<<<<<<<<<<<<< * dts.us = fraction * */ __pyx_v_dts.sec = __pyx_v_second; /* "pandas/tslib.pyx":1535 * dts.min = minute * dts.sec = second * dts.us = fraction # <<<<<<<<<<<<<< * * iresult[i] = pandas_datetimestruct_to_datetime(PANDAS_FR_ns, &dts) */ __pyx_v_dts.us = __pyx_v_fraction; /* "pandas/tslib.pyx":1537 * dts.us = fraction * * iresult[i] = pandas_datetimestruct_to_datetime(PANDAS_FR_ns, &dts) # <<<<<<<<<<<<<< * try: * _check_dts_bounds(&dts) */ __pyx_t_28 = __pyx_v_i; __pyx_t_14 = -1; if (__pyx_t_28 < 0) { __pyx_t_28 += __pyx_pybuffernd_iresult.diminfo[0].shape; if (unlikely(__pyx_t_28 < 0)) __pyx_t_14 = 0; } else if (unlikely(__pyx_t_28 >= __pyx_pybuffernd_iresult.diminfo[0].shape)) __pyx_t_14 = 0; if (unlikely(__pyx_t_14 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_14); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1537; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_iresult.rcbuffer->pybuffer.buf, __pyx_t_28, __pyx_pybuffernd_iresult.diminfo[0].strides) = pandas_datetimestruct_to_datetime(PANDAS_FR_ns, (&__pyx_v_dts)); /* "pandas/tslib.pyx":1538 * * iresult[i] = pandas_datetimestruct_to_datetime(PANDAS_FR_ns, &dts) * try: # <<<<<<<<<<<<<< * _check_dts_bounds(&dts) * except ValueError: */ { __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_3); __Pyx_XGOTREF(__pyx_t_7); __Pyx_XGOTREF(__pyx_t_8); __Pyx_XGOTREF(__pyx_t_3); /*try:*/ { /* "pandas/tslib.pyx":1539 * iresult[i] = pandas_datetimestruct_to_datetime(PANDAS_FR_ns, &dts) * try: * _check_dts_bounds(&dts) # <<<<<<<<<<<<<< * except ValueError: * if coerce: */ __pyx_t_16 = __pyx_f_6pandas_5tslib__check_dts_bounds((&__pyx_v_dts)); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1539; __pyx_clineno = __LINE__; goto __pyx_L59_error;} __Pyx_GOTREF(__pyx_t_16); __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; } __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L66_try_end; __pyx_L59_error:; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0; __Pyx_XDECREF(__pyx_t_33); __pyx_t_33 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0; /* "pandas/tslib.pyx":1540 * try: * _check_dts_bounds(&dts) * except ValueError: # <<<<<<<<<<<<<< * if coerce: * iresult[i] = iNaT */ __pyx_t_14 = PyErr_ExceptionMatches(__pyx_builtin_ValueError); if (__pyx_t_14) { __Pyx_AddTraceback("pandas.tslib.array_strptime", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_16, &__pyx_t_2, &__pyx_t_33) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1540; __pyx_clineno = __LINE__; goto __pyx_L61_except_error;} __Pyx_GOTREF(__pyx_t_16); __Pyx_GOTREF(__pyx_t_2); __Pyx_GOTREF(__pyx_t_33); /* "pandas/tslib.pyx":1541 * _check_dts_bounds(&dts) * except ValueError: * if coerce: # <<<<<<<<<<<<<< * iresult[i] = iNaT * continue */ __pyx_t_30 = __Pyx_PyObject_IsTrue(__pyx_v_coerce); if (unlikely(__pyx_t_30 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1541; __pyx_clineno = __LINE__; goto __pyx_L61_except_error;} if (__pyx_t_30) { /* "pandas/tslib.pyx":1542 * except ValueError: * if coerce: * iresult[i] = iNaT # <<<<<<<<<<<<<< * continue * raise */ __pyx_t_15 = __Pyx_GetModuleGlobalName(__pyx_n_s_iNaT); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1542; __pyx_clineno = __LINE__; goto __pyx_L61_except_error;} __Pyx_GOTREF(__pyx_t_15); __pyx_t_20 = __Pyx_PyInt_As_npy_int64(__pyx_t_15); if (unlikely((__pyx_t_20 == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1542; __pyx_clineno = __LINE__; goto __pyx_L61_except_error;} __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; __pyx_t_27 = __pyx_v_i; __pyx_t_14 = -1; if (__pyx_t_27 < 0) { __pyx_t_27 += __pyx_pybuffernd_iresult.diminfo[0].shape; if (unlikely(__pyx_t_27 < 0)) __pyx_t_14 = 0; } else if (unlikely(__pyx_t_27 >= __pyx_pybuffernd_iresult.diminfo[0].shape)) __pyx_t_14 = 0; if (unlikely(__pyx_t_14 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_14); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1542; __pyx_clineno = __LINE__; goto __pyx_L61_except_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_iresult.rcbuffer->pybuffer.buf, __pyx_t_27, __pyx_pybuffernd_iresult.diminfo[0].strides) = __pyx_t_20; /* "pandas/tslib.pyx":1543 * if coerce: * iresult[i] = iNaT * continue # <<<<<<<<<<<<<< * raise * */ goto __pyx_L68_except_continue; } /* "pandas/tslib.pyx":1544 * iresult[i] = iNaT * continue * raise # <<<<<<<<<<<<<< * * return result */ __Pyx_GIVEREF(__pyx_t_16); __Pyx_GIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_33); __Pyx_ErrRestore(__pyx_t_16, __pyx_t_2, __pyx_t_33); __pyx_t_16 = 0; __pyx_t_2 = 0; __pyx_t_33 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1544; __pyx_clineno = __LINE__; goto __pyx_L61_except_error;} __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_33); __pyx_t_33 = 0; goto __pyx_L60_exception_handled; __pyx_L68_except_continue:; __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_33); __pyx_t_33 = 0; goto __pyx_L65_try_continue; } goto __pyx_L61_except_error; __pyx_L61_except_error:; __Pyx_XGIVEREF(__pyx_t_7); __Pyx_XGIVEREF(__pyx_t_8); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_3); goto __pyx_L1_error; __pyx_L65_try_continue:; __Pyx_XGIVEREF(__pyx_t_7); __Pyx_XGIVEREF(__pyx_t_8); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_3); goto __pyx_L35_continue; __pyx_L60_exception_handled:; __Pyx_XGIVEREF(__pyx_t_7); __Pyx_XGIVEREF(__pyx_t_8); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_3); __pyx_L66_try_end:; } __pyx_L35_continue:; } /* "pandas/tslib.pyx":1546 * raise * * return result # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_result); __pyx_r = __pyx_v_result; goto __pyx_L0; /* "pandas/tslib.pyx":1313 * * * def array_strptime(ndarray[object] values, object fmt, coerce=False): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = len(values) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_15); __Pyx_XDECREF(__pyx_t_16); __Pyx_XDECREF(__pyx_t_33); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_iresult.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.tslib.array_strptime", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_iresult.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_iresult); __Pyx_XDECREF(__pyx_v_val); __Pyx_XDECREF(__pyx_v_locale_time); __Pyx_XDECREF(__pyx_v_format_regex); __Pyx_XDECREF(__pyx_v_err); __Pyx_XDECREF(__pyx_v_bad_directive); __Pyx_XDECREF(__pyx_v_result); __Pyx_XDECREF(__pyx_v__parse_code_table); __Pyx_XDECREF(__pyx_v_found); __Pyx_XDECREF(__pyx_v_tz); __Pyx_XDECREF(__pyx_v_week_of_year); __Pyx_XDECREF(__pyx_v_found_dict); __Pyx_XDECREF(__pyx_v_group_key); __Pyx_XDECREF(__pyx_v_ampm); __Pyx_XDECREF(__pyx_v_s); __Pyx_XDECREF(__pyx_v_found_zone); __Pyx_XDECREF(__pyx_v_value); __Pyx_XDECREF(__pyx_v_tz_values); __Pyx_XDECREF(__pyx_v_datetime_result); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/tslib.pyx":1549 * * * cdef inline _get_datetime64_nanos(object val): # <<<<<<<<<<<<<< * cdef: * pandas_datetimestruct dts */ static CYTHON_INLINE PyObject *__pyx_f_6pandas_5tslib__get_datetime64_nanos(PyObject *__pyx_v_val) { pandas_datetimestruct __pyx_v_dts; PANDAS_DATETIMEUNIT __pyx_v_unit; npy_datetime __pyx_v_ival; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_get_datetime64_nanos", 0); /* "pandas/tslib.pyx":1555 * npy_datetime ival * * unit = get_datetime64_unit(val) # <<<<<<<<<<<<<< * if unit == 3: * raise ValueError('NumPy 1.6.1 business freq not supported') */ __pyx_v_unit = get_datetime64_unit(__pyx_v_val); /* "pandas/tslib.pyx":1556 * * unit = get_datetime64_unit(val) * if unit == 3: # <<<<<<<<<<<<<< * raise ValueError('NumPy 1.6.1 business freq not supported') * */ __pyx_t_1 = ((__pyx_v_unit == 3) != 0); if (__pyx_t_1) { /* "pandas/tslib.pyx":1557 * unit = get_datetime64_unit(val) * if unit == 3: * raise ValueError('NumPy 1.6.1 business freq not supported') # <<<<<<<<<<<<<< * * ival = get_datetime64_value(val) */ __pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__40, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1557; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 1557; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } /* "pandas/tslib.pyx":1559 * raise ValueError('NumPy 1.6.1 business freq not supported') * * ival = get_datetime64_value(val) # <<<<<<<<<<<<<< * * if unit != PANDAS_FR_ns: */ __pyx_v_ival = get_datetime64_value(__pyx_v_val); /* "pandas/tslib.pyx":1561 * ival = get_datetime64_value(val) * * if unit != PANDAS_FR_ns: # <<<<<<<<<<<<<< * pandas_datetime_to_datetimestruct(ival, unit, &dts) * _check_dts_bounds(&dts) */ __pyx_t_1 = ((__pyx_v_unit != PANDAS_FR_ns) != 0); if (__pyx_t_1) { /* "pandas/tslib.pyx":1562 * * if unit != PANDAS_FR_ns: * pandas_datetime_to_datetimestruct(ival, unit, &dts) # <<<<<<<<<<<<<< * _check_dts_bounds(&dts) * return pandas_datetimestruct_to_datetime(PANDAS_FR_ns, &dts) */ pandas_datetime_to_datetimestruct(__pyx_v_ival, __pyx_v_unit, (&__pyx_v_dts)); /* "pandas/tslib.pyx":1563 * if unit != PANDAS_FR_ns: * pandas_datetime_to_datetimestruct(ival, unit, &dts) * _check_dts_bounds(&dts) # <<<<<<<<<<<<<< * return pandas_datetimestruct_to_datetime(PANDAS_FR_ns, &dts) * else: */ __pyx_t_2 = __pyx_f_6pandas_5tslib__check_dts_bounds((&__pyx_v_dts)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1563; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/tslib.pyx":1564 * pandas_datetime_to_datetimestruct(ival, unit, &dts) * _check_dts_bounds(&dts) * return pandas_datetimestruct_to_datetime(PANDAS_FR_ns, &dts) # <<<<<<<<<<<<<< * else: * return ival */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyInt_From_npy_int64(pandas_datetimestruct_to_datetime(PANDAS_FR_ns, (&__pyx_v_dts))); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1564; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; } /*else*/ { /* "pandas/tslib.pyx":1566 * return pandas_datetimestruct_to_datetime(PANDAS_FR_ns, &dts) * else: * return ival # <<<<<<<<<<<<<< * * cpdef inline int64_t cast_from_unit(object ts, object unit) except -1: */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyInt_From_npy_int64(__pyx_v_ival); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1566; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; } /* "pandas/tslib.pyx":1549 * * * cdef inline _get_datetime64_nanos(object val): # <<<<<<<<<<<<<< * cdef: * pandas_datetimestruct dts */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("pandas.tslib._get_datetime64_nanos", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/tslib.pyx":1568 * return ival * * cpdef inline int64_t cast_from_unit(object ts, object unit) except -1: # <<<<<<<<<<<<<< * """ return a casting of the unit represented to nanoseconds * round the fractional part of a float to our precision, p """ */ static PyObject *__pyx_pw_6pandas_5tslib_37cast_from_unit(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static CYTHON_INLINE __pyx_t_5numpy_int64_t __pyx_f_6pandas_5tslib_cast_from_unit(PyObject *__pyx_v_ts, PyObject *__pyx_v_unit, CYTHON_UNUSED int __pyx_skip_dispatch) { PyObject *__pyx_v_m = NULL; long __pyx_v_p; PyObject *__pyx_v_base = NULL; PyObject *__pyx_v_frac = NULL; __pyx_t_5numpy_int64_t __pyx_r; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; int __pyx_t_3; __pyx_t_5numpy_int64_t __pyx_t_4; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; __pyx_t_5numpy_int64_t __pyx_t_7; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("cast_from_unit", 0); /* "pandas/tslib.pyx":1571 * """ return a casting of the unit represented to nanoseconds * round the fractional part of a float to our precision, p """ * if unit == 'D' or unit == 'd': # <<<<<<<<<<<<<< * m = 1000000000L * 86400 * p = 6 */ __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_unit, __pyx_n_s_D, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1571; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (!__pyx_t_1) { __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_v_unit, __pyx_n_s_d, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1571; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_3 = __pyx_t_2; } else { __pyx_t_3 = __pyx_t_1; } if (__pyx_t_3) { /* "pandas/tslib.pyx":1572 * round the fractional part of a float to our precision, p """ * if unit == 'D' or unit == 'd': * m = 1000000000L * 86400 # <<<<<<<<<<<<<< * p = 6 * elif unit == 's': */ __Pyx_INCREF(__pyx_int_86400000000000L); __pyx_v_m = __pyx_int_86400000000000L; /* "pandas/tslib.pyx":1573 * if unit == 'D' or unit == 'd': * m = 1000000000L * 86400 * p = 6 # <<<<<<<<<<<<<< * elif unit == 's': * m = 1000000000L */ __pyx_v_p = 6; goto __pyx_L3; } /* "pandas/tslib.pyx":1574 * m = 1000000000L * 86400 * p = 6 * elif unit == 's': # <<<<<<<<<<<<<< * m = 1000000000L * p = 6 */ __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_v_unit, __pyx_n_s_s_2, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1574; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__pyx_t_3) { /* "pandas/tslib.pyx":1575 * p = 6 * elif unit == 's': * m = 1000000000L # <<<<<<<<<<<<<< * p = 6 * elif unit == 'ms': */ __Pyx_INCREF(__pyx_int_1000000000L); __pyx_v_m = __pyx_int_1000000000L; /* "pandas/tslib.pyx":1576 * elif unit == 's': * m = 1000000000L * p = 6 # <<<<<<<<<<<<<< * elif unit == 'ms': * m = 1000000L */ __pyx_v_p = 6; goto __pyx_L3; } /* "pandas/tslib.pyx":1577 * m = 1000000000L * p = 6 * elif unit == 'ms': # <<<<<<<<<<<<<< * m = 1000000L * p = 3 */ __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_v_unit, __pyx_n_s_ms, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1577; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__pyx_t_3) { /* "pandas/tslib.pyx":1578 * p = 6 * elif unit == 'ms': * m = 1000000L # <<<<<<<<<<<<<< * p = 3 * elif unit == 'us': */ __Pyx_INCREF(__pyx_int_1000000L); __pyx_v_m = __pyx_int_1000000L; /* "pandas/tslib.pyx":1579 * elif unit == 'ms': * m = 1000000L * p = 3 # <<<<<<<<<<<<<< * elif unit == 'us': * m = 1000L */ __pyx_v_p = 3; goto __pyx_L3; } /* "pandas/tslib.pyx":1580 * m = 1000000L * p = 3 * elif unit == 'us': # <<<<<<<<<<<<<< * m = 1000L * p = 0 */ __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_v_unit, __pyx_n_s_us, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1580; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__pyx_t_3) { /* "pandas/tslib.pyx":1581 * p = 3 * elif unit == 'us': * m = 1000L # <<<<<<<<<<<<<< * p = 0 * else: */ __Pyx_INCREF(__pyx_int_1000L); __pyx_v_m = __pyx_int_1000L; /* "pandas/tslib.pyx":1582 * elif unit == 'us': * m = 1000L * p = 0 # <<<<<<<<<<<<<< * else: * m = 1L */ __pyx_v_p = 0; goto __pyx_L3; } /*else*/ { /* "pandas/tslib.pyx":1584 * p = 0 * else: * m = 1L # <<<<<<<<<<<<<< * p = 0 * */ __Pyx_INCREF(__pyx_int_1L); __pyx_v_m = __pyx_int_1L; /* "pandas/tslib.pyx":1585 * else: * m = 1L * p = 0 # <<<<<<<<<<<<<< * * # just give me the unit back */ __pyx_v_p = 0; } __pyx_L3:; /* "pandas/tslib.pyx":1588 * * # just give me the unit back * if ts is None: # <<<<<<<<<<<<<< * return m * */ __pyx_t_3 = (__pyx_v_ts == Py_None); __pyx_t_1 = (__pyx_t_3 != 0); if (__pyx_t_1) { /* "pandas/tslib.pyx":1589 * # just give me the unit back * if ts is None: * return m # <<<<<<<<<<<<<< * * # cast the unit, multiply base/frace separately */ __pyx_t_4 = __Pyx_PyInt_As_npy_int64(__pyx_v_m); if (unlikely((__pyx_t_4 == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1589; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_t_4; goto __pyx_L0; } /* "pandas/tslib.pyx":1593 * # cast the unit, multiply base/frace separately * # to avoid precision issues from float -> int * base = ts # <<<<<<<<<<<<<< * frac = ts-base * if p: */ __pyx_t_4 = __Pyx_PyInt_As_npy_int64(__pyx_v_ts); if (unlikely((__pyx_t_4 == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1593; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_5 = __Pyx_PyInt_From_npy_int64(((__pyx_t_5numpy_int64_t)__pyx_t_4)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1593; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_v_base = __pyx_t_5; __pyx_t_5 = 0; /* "pandas/tslib.pyx":1594 * # to avoid precision issues from float -> int * base = ts * frac = ts-base # <<<<<<<<<<<<<< * if p: * frac = round(frac,p) */ __pyx_t_5 = PyNumber_Subtract(__pyx_v_ts, __pyx_v_base); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1594; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_v_frac = __pyx_t_5; __pyx_t_5 = 0; /* "pandas/tslib.pyx":1595 * base = ts * frac = ts-base * if p: # <<<<<<<<<<<<<< * frac = round(frac,p) * return (base*m) + (frac*m) */ __pyx_t_1 = (__pyx_v_p != 0); if (__pyx_t_1) { /* "pandas/tslib.pyx":1596 * frac = ts-base * if p: * frac = round(frac,p) # <<<<<<<<<<<<<< * return (base*m) + (frac*m) * */ __pyx_t_5 = __Pyx_PyInt_From_long(__pyx_v_p); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1596; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1596; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(__pyx_v_frac); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_frac); __Pyx_GIVEREF(__pyx_v_frac); PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyObject_Call(__pyx_builtin_round, __pyx_t_6, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1596; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF_SET(__pyx_v_frac, __pyx_t_5); __pyx_t_5 = 0; goto __pyx_L5; } __pyx_L5:; /* "pandas/tslib.pyx":1597 * if p: * frac = round(frac,p) * return (base*m) + (frac*m) # <<<<<<<<<<<<<< * * def cast_to_nanoseconds(ndarray arr): */ __pyx_t_5 = PyNumber_Multiply(__pyx_v_base, __pyx_v_m); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1597; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = __Pyx_PyInt_As_npy_int64(__pyx_t_5); if (unlikely((__pyx_t_4 == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1597; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyNumber_Multiply(__pyx_v_frac, __pyx_v_m); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1597; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_7 = __Pyx_PyInt_As_npy_int64(__pyx_t_5); if (unlikely((__pyx_t_7 == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1597; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_r = (((__pyx_t_5numpy_int64_t)__pyx_t_4) + ((__pyx_t_5numpy_int64_t)__pyx_t_7)); goto __pyx_L0; /* "pandas/tslib.pyx":1568 * return ival * * cpdef inline int64_t cast_from_unit(object ts, object unit) except -1: # <<<<<<<<<<<<<< * """ return a casting of the unit represented to nanoseconds * round the fractional part of a float to our precision, p """ */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("pandas.tslib.cast_from_unit", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_XDECREF(__pyx_v_m); __Pyx_XDECREF(__pyx_v_base); __Pyx_XDECREF(__pyx_v_frac); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5tslib_37cast_from_unit(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6pandas_5tslib_36cast_from_unit[] = " return a casting of the unit represented to nanoseconds\n round the fractional part of a float to our precision, p "; static PyObject *__pyx_pw_6pandas_5tslib_37cast_from_unit(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_ts = 0; PyObject *__pyx_v_unit = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("cast_from_unit (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ts,&__pyx_n_s_unit,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ts)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_unit)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("cast_from_unit", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1568; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cast_from_unit") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1568; __pyx_clineno = __LINE__; goto __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_ts = values[0]; __pyx_v_unit = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("cast_from_unit", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1568; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.tslib.cast_from_unit", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pandas_5tslib_36cast_from_unit(__pyx_self, __pyx_v_ts, __pyx_v_unit); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5tslib_36cast_from_unit(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_ts, PyObject *__pyx_v_unit) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __pyx_t_5numpy_int64_t __pyx_t_1; PyObject *__pyx_t_2 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("cast_from_unit", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_6pandas_5tslib_cast_from_unit(__pyx_v_ts, __pyx_v_unit, 0); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1568; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_2 = __Pyx_PyInt_From_npy_int64(__pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1568; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("pandas.tslib.cast_from_unit", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/tslib.pyx":1599 * return (base*m) + (frac*m) * * def cast_to_nanoseconds(ndarray arr): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = arr.size */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5tslib_39cast_to_nanoseconds(PyObject *__pyx_self, PyObject *__pyx_v_arr); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5tslib_39cast_to_nanoseconds = {__Pyx_NAMESTR("cast_to_nanoseconds"), (PyCFunction)__pyx_pw_6pandas_5tslib_39cast_to_nanoseconds, METH_O, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5tslib_39cast_to_nanoseconds(PyObject *__pyx_self, PyObject *__pyx_v_arr) { CYTHON_UNUSED int __pyx_lineno = 0; CYTHON_UNUSED const char *__pyx_filename = NULL; CYTHON_UNUSED int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("cast_to_nanoseconds (wrapper)", 0); if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_arr), __pyx_ptype_5numpy_ndarray, 1, "arr", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1599; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5tslib_38cast_to_nanoseconds(__pyx_self, ((PyArrayObject *)__pyx_v_arr)); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5tslib_38cast_to_nanoseconds(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_arr) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_n; PyArrayObject *__pyx_v_ivalues = 0; PyArrayObject *__pyx_v_iresult = 0; PANDAS_DATETIMEUNIT __pyx_v_unit; pandas_datetimestruct __pyx_v_dts; PyObject *__pyx_v_shape = NULL; PyObject *__pyx_v_result = NULL; __Pyx_LocalBuf_ND __pyx_pybuffernd_iresult; __Pyx_Buffer __pyx_pybuffer_iresult; __Pyx_LocalBuf_ND __pyx_pybuffernd_ivalues; __Pyx_Buffer __pyx_pybuffer_ivalues; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; Py_ssize_t __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyArrayObject *__pyx_t_5 = NULL; int __pyx_t_6; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; int __pyx_t_11; Py_ssize_t __pyx_t_12; Py_ssize_t __pyx_t_13; Py_ssize_t __pyx_t_14; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("cast_to_nanoseconds", 0); __pyx_pybuffer_ivalues.pybuffer.buf = NULL; __pyx_pybuffer_ivalues.refcount = 0; __pyx_pybuffernd_ivalues.data = NULL; __pyx_pybuffernd_ivalues.rcbuffer = &__pyx_pybuffer_ivalues; __pyx_pybuffer_iresult.pybuffer.buf = NULL; __pyx_pybuffer_iresult.refcount = 0; __pyx_pybuffernd_iresult.data = NULL; __pyx_pybuffernd_iresult.rcbuffer = &__pyx_pybuffer_iresult; /* "pandas/tslib.pyx":1601 * def cast_to_nanoseconds(ndarray arr): * cdef: * Py_ssize_t i, n = arr.size # <<<<<<<<<<<<<< * ndarray[int64_t] ivalues, iresult * PANDAS_DATETIMEUNIT unit */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_arr), __pyx_n_s_size); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1601; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyIndex_AsSsize_t(__pyx_t_1); if (unlikely((__pyx_t_2 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1601; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_n = __pyx_t_2; /* "pandas/tslib.pyx":1606 * pandas_datetimestruct dts * * shape = ( arr).shape # <<<<<<<<<<<<<< * * ivalues = arr.view(np.int64).ravel() */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_arr), __pyx_n_s_shape); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1606; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_v_shape = __pyx_t_1; __pyx_t_1 = 0; /* "pandas/tslib.pyx":1608 * shape = ( arr).shape * * ivalues = arr.view(np.int64).ravel() # <<<<<<<<<<<<<< * * result = np.empty(shape, dtype='M8[ns]') */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_arr), __pyx_n_s_view); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1608; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1608; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_int64); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1608; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1608; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyObject_Call(__pyx_t_1, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1608; __pyx_clineno = __LINE__; goto __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_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_ravel); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1608; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyObject_Call(__pyx_t_3, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1608; __pyx_clineno = __LINE__; goto __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_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1608; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_5 = ((PyArrayObject *)__pyx_t_4); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_ivalues.rcbuffer->pybuffer); __pyx_t_6 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_ivalues.rcbuffer->pybuffer, (PyObject*)__pyx_t_5, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_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_ivalues.rcbuffer->pybuffer, (PyObject*)__pyx_v_ivalues, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_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_pybuffernd_ivalues.diminfo[0].strides = __pyx_pybuffernd_ivalues.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_ivalues.diminfo[0].shape = __pyx_pybuffernd_ivalues.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1608; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_5 = 0; __pyx_v_ivalues = ((PyArrayObject *)__pyx_t_4); __pyx_t_4 = 0; /* "pandas/tslib.pyx":1610 * ivalues = arr.view(np.int64).ravel() * * result = np.empty(shape, dtype='M8[ns]') # <<<<<<<<<<<<<< * iresult = result.ravel().view(np.int64) * */ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1610; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_empty); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1610; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1610; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_v_shape); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_shape); __Pyx_GIVEREF(__pyx_v_shape); __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1610; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_dtype, __pyx_kp_s_M8_ns) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1610; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_10 = PyObject_Call(__pyx_t_3, __pyx_t_4, __pyx_t_1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1610; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_result = __pyx_t_10; __pyx_t_10 = 0; /* "pandas/tslib.pyx":1611 * * result = np.empty(shape, dtype='M8[ns]') * iresult = result.ravel().view(np.int64) # <<<<<<<<<<<<<< * * if len(iresult) == 0: */ __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_result, __pyx_n_s_ravel); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1611; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __pyx_t_1 = PyObject_Call(__pyx_t_10, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1611; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_view); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1611; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1611; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_int64); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1611; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1611; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyObject_Call(__pyx_t_10, __pyx_t_1, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1611; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 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_filename = __pyx_f[0]; __pyx_lineno = 1611; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_5 = ((PyArrayObject *)__pyx_t_4); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_iresult.rcbuffer->pybuffer); __pyx_t_6 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_iresult.rcbuffer->pybuffer, (PyObject*)__pyx_t_5, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 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_iresult.rcbuffer->pybuffer, (PyObject*)__pyx_v_iresult, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 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_pybuffernd_iresult.diminfo[0].strides = __pyx_pybuffernd_iresult.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_iresult.diminfo[0].shape = __pyx_pybuffernd_iresult.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1611; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_5 = 0; __pyx_v_iresult = ((PyArrayObject *)__pyx_t_4); __pyx_t_4 = 0; /* "pandas/tslib.pyx":1613 * iresult = result.ravel().view(np.int64) * * if len(iresult) == 0: # <<<<<<<<<<<<<< * return result * */ __pyx_t_2 = PyObject_Length(((PyObject *)__pyx_v_iresult)); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1613; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_11 = ((__pyx_t_2 == 0) != 0); if (__pyx_t_11) { /* "pandas/tslib.pyx":1614 * * if len(iresult) == 0: * return result # <<<<<<<<<<<<<< * * unit = get_datetime64_unit(arr.flat[0]) */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_result); __pyx_r = __pyx_v_result; goto __pyx_L0; } /* "pandas/tslib.pyx":1616 * return result * * unit = get_datetime64_unit(arr.flat[0]) # <<<<<<<<<<<<<< * if unit == 3: * raise ValueError('NumPy 1.6.1 business freq not supported') */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_arr), __pyx_n_s_flat); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1616; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_4, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1616; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_unit = get_datetime64_unit(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pandas/tslib.pyx":1617 * * unit = get_datetime64_unit(arr.flat[0]) * if unit == 3: # <<<<<<<<<<<<<< * raise ValueError('NumPy 1.6.1 business freq not supported') * */ __pyx_t_11 = ((__pyx_v_unit == 3) != 0); if (__pyx_t_11) { /* "pandas/tslib.pyx":1618 * unit = get_datetime64_unit(arr.flat[0]) * if unit == 3: * raise ValueError('NumPy 1.6.1 business freq not supported') # <<<<<<<<<<<<<< * * for i in range(n): */ __pyx_t_1 = PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__41, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1618; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 1618; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } /* "pandas/tslib.pyx":1620 * raise ValueError('NumPy 1.6.1 business freq not supported') * * for i in range(n): # <<<<<<<<<<<<<< * pandas_datetime_to_datetimestruct(ivalues[i], unit, &dts) * iresult[i] = pandas_datetimestruct_to_datetime(PANDAS_FR_ns, &dts) */ __pyx_t_2 = __pyx_v_n; for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_2; __pyx_t_12+=1) { __pyx_v_i = __pyx_t_12; /* "pandas/tslib.pyx":1621 * * for i in range(n): * pandas_datetime_to_datetimestruct(ivalues[i], unit, &dts) # <<<<<<<<<<<<<< * iresult[i] = pandas_datetimestruct_to_datetime(PANDAS_FR_ns, &dts) * _check_dts_bounds(&dts) */ __pyx_t_13 = __pyx_v_i; __pyx_t_6 = -1; if (__pyx_t_13 < 0) { __pyx_t_13 += __pyx_pybuffernd_ivalues.diminfo[0].shape; if (unlikely(__pyx_t_13 < 0)) __pyx_t_6 = 0; } else if (unlikely(__pyx_t_13 >= __pyx_pybuffernd_ivalues.diminfo[0].shape)) __pyx_t_6 = 0; if (unlikely(__pyx_t_6 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_6); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1621; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } pandas_datetime_to_datetimestruct((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_ivalues.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_ivalues.diminfo[0].strides)), __pyx_v_unit, (&__pyx_v_dts)); /* "pandas/tslib.pyx":1622 * for i in range(n): * pandas_datetime_to_datetimestruct(ivalues[i], unit, &dts) * iresult[i] = pandas_datetimestruct_to_datetime(PANDAS_FR_ns, &dts) # <<<<<<<<<<<<<< * _check_dts_bounds(&dts) * */ __pyx_t_14 = __pyx_v_i; __pyx_t_6 = -1; if (__pyx_t_14 < 0) { __pyx_t_14 += __pyx_pybuffernd_iresult.diminfo[0].shape; if (unlikely(__pyx_t_14 < 0)) __pyx_t_6 = 0; } else if (unlikely(__pyx_t_14 >= __pyx_pybuffernd_iresult.diminfo[0].shape)) __pyx_t_6 = 0; if (unlikely(__pyx_t_6 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_6); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1622; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_iresult.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_iresult.diminfo[0].strides) = pandas_datetimestruct_to_datetime(PANDAS_FR_ns, (&__pyx_v_dts)); /* "pandas/tslib.pyx":1623 * pandas_datetime_to_datetimestruct(ivalues[i], unit, &dts) * iresult[i] = pandas_datetimestruct_to_datetime(PANDAS_FR_ns, &dts) * _check_dts_bounds(&dts) # <<<<<<<<<<<<<< * * return result */ __pyx_t_1 = __pyx_f_6pandas_5tslib__check_dts_bounds((&__pyx_v_dts)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1623; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } /* "pandas/tslib.pyx":1625 * _check_dts_bounds(&dts) * * return result # <<<<<<<<<<<<<< * * #---------------------------------------------------------------------- */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_result); __pyx_r = __pyx_v_result; goto __pyx_L0; /* "pandas/tslib.pyx":1599 * return (base*m) + (frac*m) * * def cast_to_nanoseconds(ndarray arr): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = arr.size */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_10); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_iresult.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_ivalues.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.tslib.cast_to_nanoseconds", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_iresult.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_ivalues.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_ivalues); __Pyx_XDECREF((PyObject *)__pyx_v_iresult); __Pyx_XDECREF(__pyx_v_shape); __Pyx_XDECREF(__pyx_v_result); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/tslib.pyx":1631 * * * def pydt_to_i8(object pydt): # <<<<<<<<<<<<<< * ''' * Convert to int64 representation compatible with numpy datetime64; converts */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5tslib_41pydt_to_i8(PyObject *__pyx_self, PyObject *__pyx_v_pydt); /*proto*/ static char __pyx_doc_6pandas_5tslib_40pydt_to_i8[] = "\n Convert to int64 representation compatible with numpy datetime64; converts\n to UTC\n "; static PyMethodDef __pyx_mdef_6pandas_5tslib_41pydt_to_i8 = {__Pyx_NAMESTR("pydt_to_i8"), (PyCFunction)__pyx_pw_6pandas_5tslib_41pydt_to_i8, METH_O, __Pyx_DOCSTR(__pyx_doc_6pandas_5tslib_40pydt_to_i8)}; static PyObject *__pyx_pw_6pandas_5tslib_41pydt_to_i8(PyObject *__pyx_self, PyObject *__pyx_v_pydt) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("pydt_to_i8 (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_5tslib_40pydt_to_i8(__pyx_self, ((PyObject *)__pyx_v_pydt)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5tslib_40pydt_to_i8(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_pydt) { struct __pyx_obj_6pandas_5tslib__TSObject *__pyx_v_ts = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("pydt_to_i8", 0); /* "pandas/tslib.pyx":1639 * _TSObject ts * * ts = convert_to_tsobject(pydt, None, None) # <<<<<<<<<<<<<< * * return ts.value */ __pyx_t_1 = __pyx_f_6pandas_5tslib_convert_to_tsobject(__pyx_v_pydt, Py_None, Py_None); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1639; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_6pandas_5tslib__TSObject))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1639; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_ts = ((struct __pyx_obj_6pandas_5tslib__TSObject *)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/tslib.pyx":1641 * ts = convert_to_tsobject(pydt, None, None) * * return ts.value # <<<<<<<<<<<<<< * * def i8_to_pydt(int64_t i8, object tzinfo = None): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyInt_From_npy_int64(__pyx_v_ts->value); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1641; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "pandas/tslib.pyx":1631 * * * def pydt_to_i8(object pydt): # <<<<<<<<<<<<<< * ''' * Convert to int64 representation compatible with numpy datetime64; converts */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas.tslib.pydt_to_i8", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_ts); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/tslib.pyx":1643 * return ts.value * * def i8_to_pydt(int64_t i8, object tzinfo = None): # <<<<<<<<<<<<<< * ''' * Inverse of pydt_to_i8 */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5tslib_43i8_to_pydt(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6pandas_5tslib_42i8_to_pydt[] = "\n Inverse of pydt_to_i8\n "; static PyMethodDef __pyx_mdef_6pandas_5tslib_43i8_to_pydt = {__Pyx_NAMESTR("i8_to_pydt"), (PyCFunction)__pyx_pw_6pandas_5tslib_43i8_to_pydt, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_5tslib_42i8_to_pydt)}; static PyObject *__pyx_pw_6pandas_5tslib_43i8_to_pydt(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { __pyx_t_5numpy_int64_t __pyx_v_i8; CYTHON_UNUSED PyObject *__pyx_v_tzinfo = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("i8_to_pydt (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_i8,&__pyx_n_s_tzinfo,0}; PyObject* values[2] = {0,0}; values[1] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i8)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_tzinfo); if (value) { values[1] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "i8_to_pydt") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1643; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_i8 = __Pyx_PyInt_As_npy_int64(values[0]); if (unlikely((__pyx_v_i8 == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1643; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_tzinfo = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("i8_to_pydt", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1643; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.tslib.i8_to_pydt", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pandas_5tslib_42i8_to_pydt(__pyx_self, __pyx_v_i8, __pyx_v_tzinfo); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5tslib_42i8_to_pydt(CYTHON_UNUSED PyObject *__pyx_self, __pyx_t_5numpy_int64_t __pyx_v_i8, CYTHON_UNUSED PyObject *__pyx_v_tzinfo) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("i8_to_pydt", 0); /* "pandas/tslib.pyx":1647 * Inverse of pydt_to_i8 * ''' * return Timestamp(i8) # <<<<<<<<<<<<<< * * #---------------------------------------------------------------------- */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_Timestamp); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1647; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyInt_From_npy_int64(__pyx_v_i8); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1647; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1647; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_Call(__pyx_t_1, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1647; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "pandas/tslib.pyx":1643 * return ts.value * * def i8_to_pydt(int64_t i8, object tzinfo = None): # <<<<<<<<<<<<<< * ''' * Inverse of pydt_to_i8 */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("pandas.tslib.i8_to_pydt", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/tslib.pyx":1660 * have_pytz = False * * def tz_convert(ndarray[int64_t] vals, object tz1, object tz2): # <<<<<<<<<<<<<< * cdef: * ndarray[int64_t] utc_dates, result, trans, deltas */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5tslib_45tz_convert(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5tslib_45tz_convert = {__Pyx_NAMESTR("tz_convert"), (PyCFunction)__pyx_pw_6pandas_5tslib_45tz_convert, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5tslib_45tz_convert(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_vals = 0; PyObject *__pyx_v_tz1 = 0; PyObject *__pyx_v_tz2 = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("tz_convert (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_vals,&__pyx_n_s_tz1,&__pyx_n_s_tz2,0}; PyObject* values[3] = {0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_vals)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_tz1)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("tz_convert", 1, 3, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1660; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_tz2)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("tz_convert", 1, 3, 3, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1660; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "tz_convert") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1660; __pyx_clineno = __LINE__; goto __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_vals = ((PyArrayObject *)values[0]); __pyx_v_tz1 = values[1]; __pyx_v_tz2 = values[2]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("tz_convert", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1660; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.tslib.tz_convert", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_vals), __pyx_ptype_5numpy_ndarray, 1, "vals", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1660; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5tslib_44tz_convert(__pyx_self, __pyx_v_vals, __pyx_v_tz1, __pyx_v_tz2); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5tslib_44tz_convert(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_vals, PyObject *__pyx_v_tz1, PyObject *__pyx_v_tz2) { PyArrayObject *__pyx_v_utc_dates = 0; PyArrayObject *__pyx_v_result = 0; PyArrayObject *__pyx_v_trans = 0; PyArrayObject *__pyx_v_deltas = 0; Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_pos; Py_ssize_t __pyx_v_n; __pyx_t_5numpy_int64_t __pyx_v_v; __pyx_t_5numpy_int64_t __pyx_v_offset; pandas_datetimestruct __pyx_v_dts; CYTHON_UNUSED PyObject *__pyx_v_pytz = NULL; PyDateTime_DateTime *__pyx_v_dt = NULL; PyObject *__pyx_v_delta = NULL; Py_ssize_t __pyx_v_trans_len; __Pyx_LocalBuf_ND __pyx_pybuffernd_deltas; __Pyx_Buffer __pyx_pybuffer_deltas; __Pyx_LocalBuf_ND __pyx_pybuffernd_result; __Pyx_Buffer __pyx_pybuffer_result; __Pyx_LocalBuf_ND __pyx_pybuffernd_trans; __Pyx_Buffer __pyx_pybuffer_trans; __Pyx_LocalBuf_ND __pyx_pybuffernd_utc_dates; __Pyx_Buffer __pyx_pybuffer_utc_dates; __Pyx_LocalBuf_ND __pyx_pybuffernd_vals; __Pyx_Buffer __pyx_pybuffer_vals; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; PyObject *__pyx_t_2 = NULL; int __pyx_t_3; int __pyx_t_4; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; 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; Py_ssize_t __pyx_t_15; PyObject *__pyx_t_16 = NULL; PyObject *__pyx_t_17 = NULL; PyObject *__pyx_t_18 = NULL; __pyx_t_5numpy_int64_t __pyx_t_19; Py_ssize_t __pyx_t_20; long __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; long __pyx_t_28; long __pyx_t_29; Py_ssize_t __pyx_t_30; Py_ssize_t __pyx_t_31; Py_ssize_t __pyx_t_32; int __pyx_t_33; Py_ssize_t __pyx_t_34; Py_ssize_t __pyx_t_35; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("tz_convert", 0); __pyx_pybuffer_utc_dates.pybuffer.buf = NULL; __pyx_pybuffer_utc_dates.refcount = 0; __pyx_pybuffernd_utc_dates.data = NULL; __pyx_pybuffernd_utc_dates.rcbuffer = &__pyx_pybuffer_utc_dates; __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_trans.pybuffer.buf = NULL; __pyx_pybuffer_trans.refcount = 0; __pyx_pybuffernd_trans.data = NULL; __pyx_pybuffernd_trans.rcbuffer = &__pyx_pybuffer_trans; __pyx_pybuffer_deltas.pybuffer.buf = NULL; __pyx_pybuffer_deltas.refcount = 0; __pyx_pybuffernd_deltas.data = NULL; __pyx_pybuffernd_deltas.rcbuffer = &__pyx_pybuffer_deltas; __pyx_pybuffer_vals.pybuffer.buf = NULL; __pyx_pybuffer_vals.refcount = 0; __pyx_pybuffernd_vals.data = NULL; __pyx_pybuffernd_vals.rcbuffer = &__pyx_pybuffer_vals; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_vals.rcbuffer->pybuffer, (PyObject*)__pyx_v_vals, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1660; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_vals.diminfo[0].strides = __pyx_pybuffernd_vals.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_vals.diminfo[0].shape = __pyx_pybuffernd_vals.rcbuffer->pybuffer.shape[0]; /* "pandas/tslib.pyx":1663 * cdef: * ndarray[int64_t] utc_dates, result, trans, deltas * Py_ssize_t i, pos, n = len(vals) # <<<<<<<<<<<<<< * int64_t v, offset * pandas_datetimestruct dts */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_vals)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1663; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/tslib.pyx":1667 * pandas_datetimestruct dts * * if not have_pytz: # <<<<<<<<<<<<<< * import pytz * */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_have_pytz); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1667; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1667; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_4 = ((!__pyx_t_3) != 0); if (__pyx_t_4) { /* "pandas/tslib.pyx":1668 * * if not have_pytz: * import pytz # <<<<<<<<<<<<<< * * # Convert to UTC */ __pyx_t_2 = __Pyx_Import(__pyx_n_s_pytz, 0, -1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1668; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_v_pytz = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L3; } __pyx_L3:; /* "pandas/tslib.pyx":1672 * # Convert to UTC * * if _get_zone(tz1) != 'UTC': # <<<<<<<<<<<<<< * utc_dates = np.empty(n, dtype=np.int64) * if _is_tzlocal(tz1): */ __pyx_t_2 = __pyx_f_6pandas_5tslib__get_zone(__pyx_v_tz1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1672; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = (__Pyx_PyString_Equals(__pyx_t_2, __pyx_n_s_UTC, Py_NE)); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1672; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_4) { /* "pandas/tslib.pyx":1673 * * if _get_zone(tz1) != 'UTC': * utc_dates = np.empty(n, dtype=np.int64) # <<<<<<<<<<<<<< * if _is_tzlocal(tz1): * for i in range(n): */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1673; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_empty); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1673; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_n); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1673; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1673; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1673; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1673; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_int64); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1673; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_dtype, __pyx_t_8) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1673; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_8 = PyObject_Call(__pyx_t_5, __pyx_t_6, __pyx_t_2); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1673; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (!(likely(((__pyx_t_8) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_8, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1673; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_9 = ((PyArrayObject *)__pyx_t_8); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_utc_dates.rcbuffer->pybuffer); __pyx_t_10 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_utc_dates.rcbuffer->pybuffer, (PyObject*)__pyx_t_9, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_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_utc_dates.rcbuffer->pybuffer, (PyObject*)__pyx_v_utc_dates, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_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_pybuffernd_utc_dates.diminfo[0].strides = __pyx_pybuffernd_utc_dates.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_utc_dates.diminfo[0].shape = __pyx_pybuffernd_utc_dates.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1673; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_9 = 0; __pyx_v_utc_dates = ((PyArrayObject *)__pyx_t_8); __pyx_t_8 = 0; /* "pandas/tslib.pyx":1674 * if _get_zone(tz1) != 'UTC': * utc_dates = np.empty(n, dtype=np.int64) * if _is_tzlocal(tz1): # <<<<<<<<<<<<<< * for i in range(n): * v = vals[i] */ __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_is_tzlocal); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1674; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1674; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_tz1); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_tz1); __Pyx_GIVEREF(__pyx_v_tz1); __pyx_t_6 = PyObject_Call(__pyx_t_8, __pyx_t_2, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1674; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1674; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (__pyx_t_4) { /* "pandas/tslib.pyx":1675 * utc_dates = np.empty(n, dtype=np.int64) * if _is_tzlocal(tz1): * for i in range(n): # <<<<<<<<<<<<<< * v = vals[i] * pandas_datetime_to_datetimestruct(v, PANDAS_FR_ns, &dts) */ __pyx_t_1 = __pyx_v_n; for (__pyx_t_14 = 0; __pyx_t_14 < __pyx_t_1; __pyx_t_14+=1) { __pyx_v_i = __pyx_t_14; /* "pandas/tslib.pyx":1676 * if _is_tzlocal(tz1): * for i in range(n): * v = vals[i] # <<<<<<<<<<<<<< * pandas_datetime_to_datetimestruct(v, PANDAS_FR_ns, &dts) * dt = datetime(dts.year, dts.month, dts.day, dts.hour, */ __pyx_t_15 = __pyx_v_i; __pyx_t_10 = -1; if (__pyx_t_15 < 0) { __pyx_t_15 += __pyx_pybuffernd_vals.diminfo[0].shape; if (unlikely(__pyx_t_15 < 0)) __pyx_t_10 = 0; } else if (unlikely(__pyx_t_15 >= __pyx_pybuffernd_vals.diminfo[0].shape)) __pyx_t_10 = 0; if (unlikely(__pyx_t_10 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_10); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1676; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_v = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_vals.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_vals.diminfo[0].strides)); /* "pandas/tslib.pyx":1677 * for i in range(n): * v = vals[i] * pandas_datetime_to_datetimestruct(v, PANDAS_FR_ns, &dts) # <<<<<<<<<<<<<< * dt = datetime(dts.year, dts.month, dts.day, dts.hour, * dts.min, dts.sec, dts.us, tz1) */ pandas_datetime_to_datetimestruct(__pyx_v_v, PANDAS_FR_ns, (&__pyx_v_dts)); /* "pandas/tslib.pyx":1678 * v = vals[i] * pandas_datetime_to_datetimestruct(v, PANDAS_FR_ns, &dts) * dt = datetime(dts.year, dts.month, dts.day, dts.hour, # <<<<<<<<<<<<<< * dts.min, dts.sec, dts.us, tz1) * delta = (int(total_seconds(_get_utcoffset(tz1, dt))) */ __pyx_t_6 = __Pyx_PyInt_From_npy_int64(__pyx_v_dts.year); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1678; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_2 = __Pyx_PyInt_From_npy_int32(__pyx_v_dts.month); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1678; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_8 = __Pyx_PyInt_From_npy_int32(__pyx_v_dts.day); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1678; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_5 = __Pyx_PyInt_From_npy_int32(__pyx_v_dts.hour); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1678; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); /* "pandas/tslib.pyx":1679 * pandas_datetime_to_datetimestruct(v, PANDAS_FR_ns, &dts) * dt = datetime(dts.year, dts.month, dts.day, dts.hour, * dts.min, dts.sec, dts.us, tz1) # <<<<<<<<<<<<<< * delta = (int(total_seconds(_get_utcoffset(tz1, dt))) * * 1000000000) */ __pyx_t_7 = __Pyx_PyInt_From_npy_int32(__pyx_v_dts.min); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1679; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_t_16 = __Pyx_PyInt_From_npy_int32(__pyx_v_dts.sec); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1679; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_16); __pyx_t_17 = __Pyx_PyInt_From_npy_int32(__pyx_v_dts.us); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1679; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_17); /* "pandas/tslib.pyx":1678 * v = vals[i] * pandas_datetime_to_datetimestruct(v, PANDAS_FR_ns, &dts) * dt = datetime(dts.year, dts.month, dts.day, dts.hour, # <<<<<<<<<<<<<< * dts.min, dts.sec, dts.us, tz1) * delta = (int(total_seconds(_get_utcoffset(tz1, dt))) */ __pyx_t_18 = PyTuple_New(8); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1678; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); PyTuple_SET_ITEM(__pyx_t_18, 0, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_18, 1, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_18, 2, __pyx_t_8); __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_18, 3, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_18, 4, __pyx_t_7); __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_18, 5, __pyx_t_16); __Pyx_GIVEREF(__pyx_t_16); PyTuple_SET_ITEM(__pyx_t_18, 6, __pyx_t_17); __Pyx_GIVEREF(__pyx_t_17); __Pyx_INCREF(__pyx_v_tz1); PyTuple_SET_ITEM(__pyx_t_18, 7, __pyx_v_tz1); __Pyx_GIVEREF(__pyx_v_tz1); __pyx_t_6 = 0; __pyx_t_2 = 0; __pyx_t_8 = 0; __pyx_t_5 = 0; __pyx_t_7 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_17 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_8datetime_datetime)), __pyx_t_18, NULL); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1678; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_17); __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; __Pyx_XDECREF_SET(__pyx_v_dt, ((PyDateTime_DateTime *)__pyx_t_17)); __pyx_t_17 = 0; /* "pandas/tslib.pyx":1680 * dt = datetime(dts.year, dts.month, dts.day, dts.hour, * dts.min, dts.sec, dts.us, tz1) * delta = (int(total_seconds(_get_utcoffset(tz1, dt))) # <<<<<<<<<<<<<< * * 1000000000) * utc_dates[i] = v - delta */ __pyx_t_17 = __pyx_f_6pandas_5tslib__get_utcoffset(__pyx_v_tz1, ((PyObject *)__pyx_v_dt), 0); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1680; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_17); __pyx_t_18 = PyFloat_FromDouble(__pyx_f_6pandas_5tslib_total_seconds(__pyx_t_17)); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1680; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; __pyx_t_17 = PyTuple_New(1); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1680; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_17); PyTuple_SET_ITEM(__pyx_t_17, 0, __pyx_t_18); __Pyx_GIVEREF(__pyx_t_18); __pyx_t_18 = 0; __pyx_t_18 = PyObject_Call(((PyObject *)((PyObject*)(&PyInt_Type))), __pyx_t_17, NULL); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1680; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; /* "pandas/tslib.pyx":1681 * dts.min, dts.sec, dts.us, tz1) * delta = (int(total_seconds(_get_utcoffset(tz1, dt))) * * 1000000000) # <<<<<<<<<<<<<< * utc_dates[i] = v - delta * else: */ __pyx_t_17 = PyNumber_Multiply(__pyx_t_18, __pyx_int_1000000000); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1681; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_17); __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; __Pyx_XDECREF_SET(__pyx_v_delta, __pyx_t_17); __pyx_t_17 = 0; /* "pandas/tslib.pyx":1682 * delta = (int(total_seconds(_get_utcoffset(tz1, dt))) * * 1000000000) * utc_dates[i] = v - delta # <<<<<<<<<<<<<< * else: * deltas = _get_deltas(tz1) */ __pyx_t_17 = __Pyx_PyInt_From_npy_int64(__pyx_v_v); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1682; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_17); __pyx_t_18 = PyNumber_Subtract(__pyx_t_17, __pyx_v_delta); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1682; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; __pyx_t_19 = __Pyx_PyInt_As_npy_int64(__pyx_t_18); if (unlikely((__pyx_t_19 == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1682; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; __pyx_t_20 = __pyx_v_i; __pyx_t_10 = -1; if (__pyx_t_20 < 0) { __pyx_t_20 += __pyx_pybuffernd_utc_dates.diminfo[0].shape; if (unlikely(__pyx_t_20 < 0)) __pyx_t_10 = 0; } else if (unlikely(__pyx_t_20 >= __pyx_pybuffernd_utc_dates.diminfo[0].shape)) __pyx_t_10 = 0; if (unlikely(__pyx_t_10 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_10); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1682; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_utc_dates.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_utc_dates.diminfo[0].strides) = __pyx_t_19; } goto __pyx_L5; } /*else*/ { /* "pandas/tslib.pyx":1684 * utc_dates[i] = v - delta * else: * deltas = _get_deltas(tz1) # <<<<<<<<<<<<<< * trans = _get_transitions(tz1) * pos = trans.searchsorted(vals[0]) - 1 */ __pyx_t_18 = __Pyx_GetModuleGlobalName(__pyx_n_s_get_deltas); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1684; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); __pyx_t_17 = PyTuple_New(1); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1684; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_17); __Pyx_INCREF(__pyx_v_tz1); PyTuple_SET_ITEM(__pyx_t_17, 0, __pyx_v_tz1); __Pyx_GIVEREF(__pyx_v_tz1); __pyx_t_16 = PyObject_Call(__pyx_t_18, __pyx_t_17, NULL); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1684; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_16); __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; if (!(likely(((__pyx_t_16) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_16, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1684; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_9 = ((PyArrayObject *)__pyx_t_16); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_deltas.rcbuffer->pybuffer); __pyx_t_10 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_deltas.rcbuffer->pybuffer, (PyObject*)__pyx_t_9, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 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_deltas.rcbuffer->pybuffer, (PyObject*)__pyx_v_deltas, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 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_pybuffernd_deltas.diminfo[0].strides = __pyx_pybuffernd_deltas.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_deltas.diminfo[0].shape = __pyx_pybuffernd_deltas.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1684; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_9 = 0; __pyx_v_deltas = ((PyArrayObject *)__pyx_t_16); __pyx_t_16 = 0; /* "pandas/tslib.pyx":1685 * else: * deltas = _get_deltas(tz1) * trans = _get_transitions(tz1) # <<<<<<<<<<<<<< * pos = trans.searchsorted(vals[0]) - 1 * if pos < 0: */ __pyx_t_16 = __Pyx_GetModuleGlobalName(__pyx_n_s_get_transitions); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1685; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_16); __pyx_t_17 = PyTuple_New(1); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1685; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_17); __Pyx_INCREF(__pyx_v_tz1); PyTuple_SET_ITEM(__pyx_t_17, 0, __pyx_v_tz1); __Pyx_GIVEREF(__pyx_v_tz1); __pyx_t_18 = PyObject_Call(__pyx_t_16, __pyx_t_17, NULL); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1685; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; if (!(likely(((__pyx_t_18) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_18, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1685; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_9 = ((PyArrayObject *)__pyx_t_18); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_trans.rcbuffer->pybuffer); __pyx_t_10 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_trans.rcbuffer->pybuffer, (PyObject*)__pyx_t_9, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 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_trans.rcbuffer->pybuffer, (PyObject*)__pyx_v_trans, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 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_pybuffernd_trans.diminfo[0].strides = __pyx_pybuffernd_trans.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_trans.diminfo[0].shape = __pyx_pybuffernd_trans.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1685; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_9 = 0; __pyx_v_trans = ((PyArrayObject *)__pyx_t_18); __pyx_t_18 = 0; /* "pandas/tslib.pyx":1686 * deltas = _get_deltas(tz1) * trans = _get_transitions(tz1) * pos = trans.searchsorted(vals[0]) - 1 # <<<<<<<<<<<<<< * if pos < 0: * raise ValueError('First time before start of DST info') */ __pyx_t_18 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_trans), __pyx_n_s_searchsorted); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1686; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); __pyx_t_21 = 0; __pyx_t_10 = -1; if (__pyx_t_21 < 0) { __pyx_t_21 += __pyx_pybuffernd_vals.diminfo[0].shape; if (unlikely(__pyx_t_21 < 0)) __pyx_t_10 = 0; } else if (unlikely(__pyx_t_21 >= __pyx_pybuffernd_vals.diminfo[0].shape)) __pyx_t_10 = 0; if (unlikely(__pyx_t_10 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_10); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1686; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_17 = __Pyx_PyInt_From_npy_int64((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_vals.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_vals.diminfo[0].strides))); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1686; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_17); __pyx_t_16 = PyTuple_New(1); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1686; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_16); PyTuple_SET_ITEM(__pyx_t_16, 0, __pyx_t_17); __Pyx_GIVEREF(__pyx_t_17); __pyx_t_17 = 0; __pyx_t_17 = PyObject_Call(__pyx_t_18, __pyx_t_16, NULL); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1686; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_17); __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; __pyx_t_16 = PyNumber_Subtract(__pyx_t_17, __pyx_int_1); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1686; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_16); __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; __pyx_t_1 = __Pyx_PyIndex_AsSsize_t(__pyx_t_16); if (unlikely((__pyx_t_1 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1686; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; __pyx_v_pos = __pyx_t_1; /* "pandas/tslib.pyx":1687 * trans = _get_transitions(tz1) * pos = trans.searchsorted(vals[0]) - 1 * if pos < 0: # <<<<<<<<<<<<<< * raise ValueError('First time before start of DST info') * */ __pyx_t_4 = ((__pyx_v_pos < 0) != 0); if (__pyx_t_4) { /* "pandas/tslib.pyx":1688 * pos = trans.searchsorted(vals[0]) - 1 * if pos < 0: * raise ValueError('First time before start of DST info') # <<<<<<<<<<<<<< * * offset = deltas[pos] */ __pyx_t_16 = PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__42, NULL); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1688; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_16); __Pyx_Raise(__pyx_t_16, 0, 0, 0); __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1688; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } /* "pandas/tslib.pyx":1690 * raise ValueError('First time before start of DST info') * * offset = deltas[pos] # <<<<<<<<<<<<<< * for i in range(n): * v = vals[i] */ __pyx_t_1 = __pyx_v_pos; __pyx_t_10 = -1; if (__pyx_t_1 < 0) { __pyx_t_1 += __pyx_pybuffernd_deltas.diminfo[0].shape; if (unlikely(__pyx_t_1 < 0)) __pyx_t_10 = 0; } else if (unlikely(__pyx_t_1 >= __pyx_pybuffernd_deltas.diminfo[0].shape)) __pyx_t_10 = 0; if (unlikely(__pyx_t_10 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_10); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1690; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_offset = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_deltas.rcbuffer->pybuffer.buf, __pyx_t_1, __pyx_pybuffernd_deltas.diminfo[0].strides)); /* "pandas/tslib.pyx":1691 * * offset = deltas[pos] * for i in range(n): # <<<<<<<<<<<<<< * v = vals[i] * if v >= [pos + 1]: */ __pyx_t_14 = __pyx_v_n; for (__pyx_t_22 = 0; __pyx_t_22 < __pyx_t_14; __pyx_t_22+=1) { __pyx_v_i = __pyx_t_22; /* "pandas/tslib.pyx":1692 * offset = deltas[pos] * for i in range(n): * v = vals[i] # <<<<<<<<<<<<<< * if v >= [pos + 1]: * pos += 1 */ __pyx_t_23 = __pyx_v_i; __pyx_t_10 = -1; if (__pyx_t_23 < 0) { __pyx_t_23 += __pyx_pybuffernd_vals.diminfo[0].shape; if (unlikely(__pyx_t_23 < 0)) __pyx_t_10 = 0; } else if (unlikely(__pyx_t_23 >= __pyx_pybuffernd_vals.diminfo[0].shape)) __pyx_t_10 = 0; if (unlikely(__pyx_t_10 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_10); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1692; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_v = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_vals.rcbuffer->pybuffer.buf, __pyx_t_23, __pyx_pybuffernd_vals.diminfo[0].strides)); /* "pandas/tslib.pyx":1693 * for i in range(n): * v = vals[i] * if v >= [pos + 1]: # <<<<<<<<<<<<<< * pos += 1 * offset = deltas[pos] */ __pyx_t_16 = __Pyx_PyInt_From_npy_int64(__pyx_v_v); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1693; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_16); __pyx_t_17 = PyInt_FromSsize_t((__pyx_v_pos + 1)); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1693; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_17); __pyx_t_18 = PyList_New(1); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1693; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); PyList_SET_ITEM(__pyx_t_18, 0, __pyx_t_17); __Pyx_GIVEREF(__pyx_t_17); __pyx_t_17 = 0; __pyx_t_17 = PyObject_RichCompare(__pyx_t_16, __pyx_t_18, Py_GE); __Pyx_XGOTREF(__pyx_t_17); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1693; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_17); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1693; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; if (__pyx_t_4) { /* "pandas/tslib.pyx":1694 * v = vals[i] * if v >= [pos + 1]: * pos += 1 # <<<<<<<<<<<<<< * offset = deltas[pos] * utc_dates[i] = v - offset */ __pyx_v_pos = (__pyx_v_pos + 1); /* "pandas/tslib.pyx":1695 * if v >= [pos + 1]: * pos += 1 * offset = deltas[pos] # <<<<<<<<<<<<<< * utc_dates[i] = v - offset * else: */ __pyx_t_24 = __pyx_v_pos; __pyx_t_10 = -1; if (__pyx_t_24 < 0) { __pyx_t_24 += __pyx_pybuffernd_deltas.diminfo[0].shape; if (unlikely(__pyx_t_24 < 0)) __pyx_t_10 = 0; } else if (unlikely(__pyx_t_24 >= __pyx_pybuffernd_deltas.diminfo[0].shape)) __pyx_t_10 = 0; if (unlikely(__pyx_t_10 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_10); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1695; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_offset = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_deltas.rcbuffer->pybuffer.buf, __pyx_t_24, __pyx_pybuffernd_deltas.diminfo[0].strides)); goto __pyx_L11; } __pyx_L11:; /* "pandas/tslib.pyx":1696 * pos += 1 * offset = deltas[pos] * utc_dates[i] = v - offset # <<<<<<<<<<<<<< * else: * utc_dates = vals */ __pyx_t_25 = __pyx_v_i; __pyx_t_10 = -1; if (__pyx_t_25 < 0) { __pyx_t_25 += __pyx_pybuffernd_utc_dates.diminfo[0].shape; if (unlikely(__pyx_t_25 < 0)) __pyx_t_10 = 0; } else if (unlikely(__pyx_t_25 >= __pyx_pybuffernd_utc_dates.diminfo[0].shape)) __pyx_t_10 = 0; if (unlikely(__pyx_t_10 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_10); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1696; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_utc_dates.rcbuffer->pybuffer.buf, __pyx_t_25, __pyx_pybuffernd_utc_dates.diminfo[0].strides) = (__pyx_v_v - __pyx_v_offset); } } __pyx_L5:; goto __pyx_L4; } /*else*/ { /* "pandas/tslib.pyx":1698 * utc_dates[i] = v - offset * else: * utc_dates = vals # <<<<<<<<<<<<<< * * if _get_zone(tz2) == 'UTC': */ { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_utc_dates.rcbuffer->pybuffer); __pyx_t_10 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_utc_dates.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_v_vals), &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_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_utc_dates.rcbuffer->pybuffer, (PyObject*)__pyx_v_utc_dates, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_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_pybuffernd_utc_dates.diminfo[0].strides = __pyx_pybuffernd_utc_dates.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_utc_dates.diminfo[0].shape = __pyx_pybuffernd_utc_dates.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1698; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __Pyx_INCREF(((PyObject *)__pyx_v_vals)); __pyx_v_utc_dates = ((PyArrayObject *)__pyx_v_vals); } __pyx_L4:; /* "pandas/tslib.pyx":1700 * utc_dates = vals * * if _get_zone(tz2) == 'UTC': # <<<<<<<<<<<<<< * return utc_dates * */ __pyx_t_17 = __pyx_f_6pandas_5tslib__get_zone(__pyx_v_tz2); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1700; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_17); __pyx_t_4 = (__Pyx_PyString_Equals(__pyx_t_17, __pyx_n_s_UTC, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1700; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; if (__pyx_t_4) { /* "pandas/tslib.pyx":1701 * * if _get_zone(tz2) == 'UTC': * return utc_dates # <<<<<<<<<<<<<< * * result = np.empty(n, dtype=np.int64) */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_utc_dates)); __pyx_r = ((PyObject *)__pyx_v_utc_dates); goto __pyx_L0; } /* "pandas/tslib.pyx":1703 * return utc_dates * * result = np.empty(n, dtype=np.int64) # <<<<<<<<<<<<<< * if _is_tzlocal(tz2): * for i in range(n): */ __pyx_t_17 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1703; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_17); __pyx_t_18 = __Pyx_PyObject_GetAttrStr(__pyx_t_17, __pyx_n_s_empty); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1703; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; __pyx_t_17 = PyInt_FromSsize_t(__pyx_v_n); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1703; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_17); __pyx_t_16 = PyTuple_New(1); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1703; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_16); PyTuple_SET_ITEM(__pyx_t_16, 0, __pyx_t_17); __Pyx_GIVEREF(__pyx_t_17); __pyx_t_17 = 0; __pyx_t_17 = PyDict_New(); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1703; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_17); __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1703; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_int64); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1703; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (PyDict_SetItem(__pyx_t_17, __pyx_n_s_dtype, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1703; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyObject_Call(__pyx_t_18, __pyx_t_16, __pyx_t_17); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1703; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1703; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_9 = ((PyArrayObject *)__pyx_t_5); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __pyx_t_10 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_t_9, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_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_result.rcbuffer->pybuffer, (PyObject*)__pyx_v_result, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_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_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_10 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1703; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_9 = 0; __pyx_v_result = ((PyArrayObject *)__pyx_t_5); __pyx_t_5 = 0; /* "pandas/tslib.pyx":1704 * * result = np.empty(n, dtype=np.int64) * if _is_tzlocal(tz2): # <<<<<<<<<<<<<< * for i in range(n): * v = utc_dates[i] */ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_is_tzlocal); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1704; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_17 = PyTuple_New(1); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1704; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_17); __Pyx_INCREF(__pyx_v_tz2); PyTuple_SET_ITEM(__pyx_t_17, 0, __pyx_v_tz2); __Pyx_GIVEREF(__pyx_v_tz2); __pyx_t_16 = PyObject_Call(__pyx_t_5, __pyx_t_17, NULL); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1704; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_16); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_16); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1704; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; if (__pyx_t_4) { /* "pandas/tslib.pyx":1705 * result = np.empty(n, dtype=np.int64) * if _is_tzlocal(tz2): * for i in range(n): # <<<<<<<<<<<<<< * v = utc_dates[i] * pandas_datetime_to_datetimestruct(v, PANDAS_FR_ns, &dts) */ __pyx_t_14 = __pyx_v_n; for (__pyx_t_22 = 0; __pyx_t_22 < __pyx_t_14; __pyx_t_22+=1) { __pyx_v_i = __pyx_t_22; /* "pandas/tslib.pyx":1706 * if _is_tzlocal(tz2): * for i in range(n): * v = utc_dates[i] # <<<<<<<<<<<<<< * pandas_datetime_to_datetimestruct(v, PANDAS_FR_ns, &dts) * dt = datetime(dts.year, dts.month, dts.day, dts.hour, */ __pyx_t_26 = __pyx_v_i; __pyx_t_10 = -1; if (__pyx_t_26 < 0) { __pyx_t_26 += __pyx_pybuffernd_utc_dates.diminfo[0].shape; if (unlikely(__pyx_t_26 < 0)) __pyx_t_10 = 0; } else if (unlikely(__pyx_t_26 >= __pyx_pybuffernd_utc_dates.diminfo[0].shape)) __pyx_t_10 = 0; if (unlikely(__pyx_t_10 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_10); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1706; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_v = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_utc_dates.rcbuffer->pybuffer.buf, __pyx_t_26, __pyx_pybuffernd_utc_dates.diminfo[0].strides)); /* "pandas/tslib.pyx":1707 * for i in range(n): * v = utc_dates[i] * pandas_datetime_to_datetimestruct(v, PANDAS_FR_ns, &dts) # <<<<<<<<<<<<<< * dt = datetime(dts.year, dts.month, dts.day, dts.hour, * dts.min, dts.sec, dts.us, tz2) */ pandas_datetime_to_datetimestruct(__pyx_v_v, PANDAS_FR_ns, (&__pyx_v_dts)); /* "pandas/tslib.pyx":1708 * v = utc_dates[i] * pandas_datetime_to_datetimestruct(v, PANDAS_FR_ns, &dts) * dt = datetime(dts.year, dts.month, dts.day, dts.hour, # <<<<<<<<<<<<<< * dts.min, dts.sec, dts.us, tz2) * delta = int(total_seconds(_get_utcoffset(tz2, dt))) * 1000000000 */ __pyx_t_16 = __Pyx_PyInt_From_npy_int64(__pyx_v_dts.year); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1708; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_16); __pyx_t_17 = __Pyx_PyInt_From_npy_int32(__pyx_v_dts.month); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1708; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_17); __pyx_t_5 = __Pyx_PyInt_From_npy_int32(__pyx_v_dts.day); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1708; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_18 = __Pyx_PyInt_From_npy_int32(__pyx_v_dts.hour); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1708; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); /* "pandas/tslib.pyx":1709 * pandas_datetime_to_datetimestruct(v, PANDAS_FR_ns, &dts) * dt = datetime(dts.year, dts.month, dts.day, dts.hour, * dts.min, dts.sec, dts.us, tz2) # <<<<<<<<<<<<<< * delta = int(total_seconds(_get_utcoffset(tz2, dt))) * 1000000000 * result[i] = v + delta */ __pyx_t_7 = __Pyx_PyInt_From_npy_int32(__pyx_v_dts.min); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1709; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_t_8 = __Pyx_PyInt_From_npy_int32(__pyx_v_dts.sec); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1709; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_2 = __Pyx_PyInt_From_npy_int32(__pyx_v_dts.us); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1709; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); /* "pandas/tslib.pyx":1708 * v = utc_dates[i] * pandas_datetime_to_datetimestruct(v, PANDAS_FR_ns, &dts) * dt = datetime(dts.year, dts.month, dts.day, dts.hour, # <<<<<<<<<<<<<< * dts.min, dts.sec, dts.us, tz2) * delta = int(total_seconds(_get_utcoffset(tz2, dt))) * 1000000000 */ __pyx_t_6 = PyTuple_New(8); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1708; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_16); __Pyx_GIVEREF(__pyx_t_16); PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_17); __Pyx_GIVEREF(__pyx_t_17); PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 3, __pyx_t_18); __Pyx_GIVEREF(__pyx_t_18); PyTuple_SET_ITEM(__pyx_t_6, 4, __pyx_t_7); __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_6, 5, __pyx_t_8); __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_6, 6, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_tz2); PyTuple_SET_ITEM(__pyx_t_6, 7, __pyx_v_tz2); __Pyx_GIVEREF(__pyx_v_tz2); __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_5 = 0; __pyx_t_18 = 0; __pyx_t_7 = 0; __pyx_t_8 = 0; __pyx_t_2 = 0; __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_8datetime_datetime)), __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1708; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF_SET(__pyx_v_dt, ((PyDateTime_DateTime *)__pyx_t_2)); __pyx_t_2 = 0; /* "pandas/tslib.pyx":1710 * dt = datetime(dts.year, dts.month, dts.day, dts.hour, * dts.min, dts.sec, dts.us, tz2) * delta = int(total_seconds(_get_utcoffset(tz2, dt))) * 1000000000 # <<<<<<<<<<<<<< * result[i] = v + delta * return result */ __pyx_t_2 = __pyx_f_6pandas_5tslib__get_utcoffset(__pyx_v_tz2, ((PyObject *)__pyx_v_dt), 0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1710; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_6 = PyFloat_FromDouble(__pyx_f_6pandas_5tslib_total_seconds(__pyx_t_2)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1710; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1710; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyObject_Call(((PyObject *)((PyObject*)(&PyInt_Type))), __pyx_t_2, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1710; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyNumber_Multiply(__pyx_t_6, __pyx_int_1000000000); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1710; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF_SET(__pyx_v_delta, __pyx_t_2); __pyx_t_2 = 0; /* "pandas/tslib.pyx":1711 * dts.min, dts.sec, dts.us, tz2) * delta = int(total_seconds(_get_utcoffset(tz2, dt))) * 1000000000 * result[i] = v + delta # <<<<<<<<<<<<<< * return result * */ __pyx_t_2 = __Pyx_PyInt_From_npy_int64(__pyx_v_v); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1711; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_6 = PyNumber_Add(__pyx_t_2, __pyx_v_delta); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1711; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_19 = __Pyx_PyInt_As_npy_int64(__pyx_t_6); if (unlikely((__pyx_t_19 == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1711; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_27 = __pyx_v_i; __pyx_t_10 = -1; if (__pyx_t_27 < 0) { __pyx_t_27 += __pyx_pybuffernd_result.diminfo[0].shape; if (unlikely(__pyx_t_27 < 0)) __pyx_t_10 = 0; } else if (unlikely(__pyx_t_27 >= __pyx_pybuffernd_result.diminfo[0].shape)) __pyx_t_10 = 0; if (unlikely(__pyx_t_10 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_10); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1711; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_27, __pyx_pybuffernd_result.diminfo[0].strides) = __pyx_t_19; /* "pandas/tslib.pyx":1712 * delta = int(total_seconds(_get_utcoffset(tz2, dt))) * 1000000000 * result[i] = v + delta * return result # <<<<<<<<<<<<<< * * # Convert UTC to other timezone */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_result)); __pyx_r = ((PyObject *)__pyx_v_result); goto __pyx_L0; } goto __pyx_L13; } __pyx_L13:; /* "pandas/tslib.pyx":1715 * * # Convert UTC to other timezone * trans = _get_transitions(tz2) # <<<<<<<<<<<<<< * deltas = _get_deltas(tz2) * pos = trans.searchsorted(utc_dates[0]) */ __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_get_transitions); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1715; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1715; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_tz2); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_tz2); __Pyx_GIVEREF(__pyx_v_tz2); __pyx_t_8 = PyObject_Call(__pyx_t_6, __pyx_t_2, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1715; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (!(likely(((__pyx_t_8) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_8, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1715; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_9 = ((PyArrayObject *)__pyx_t_8); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_trans.rcbuffer->pybuffer); __pyx_t_10 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_trans.rcbuffer->pybuffer, (PyObject*)__pyx_t_9, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 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_trans.rcbuffer->pybuffer, (PyObject*)__pyx_v_trans, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 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_pybuffernd_trans.diminfo[0].strides = __pyx_pybuffernd_trans.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_trans.diminfo[0].shape = __pyx_pybuffernd_trans.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1715; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_9 = 0; __Pyx_XDECREF_SET(__pyx_v_trans, ((PyArrayObject *)__pyx_t_8)); __pyx_t_8 = 0; /* "pandas/tslib.pyx":1716 * # Convert UTC to other timezone * trans = _get_transitions(tz2) * deltas = _get_deltas(tz2) # <<<<<<<<<<<<<< * pos = trans.searchsorted(utc_dates[0]) * if pos == 0: */ __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_get_deltas); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1716; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1716; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_tz2); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_tz2); __Pyx_GIVEREF(__pyx_v_tz2); __pyx_t_6 = PyObject_Call(__pyx_t_8, __pyx_t_2, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1716; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 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_filename = __pyx_f[0]; __pyx_lineno = 1716; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_9 = ((PyArrayObject *)__pyx_t_6); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_deltas.rcbuffer->pybuffer); __pyx_t_10 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_deltas.rcbuffer->pybuffer, (PyObject*)__pyx_t_9, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 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_deltas.rcbuffer->pybuffer, (PyObject*)__pyx_v_deltas, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 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_pybuffernd_deltas.diminfo[0].strides = __pyx_pybuffernd_deltas.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_deltas.diminfo[0].shape = __pyx_pybuffernd_deltas.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1716; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_9 = 0; __Pyx_XDECREF_SET(__pyx_v_deltas, ((PyArrayObject *)__pyx_t_6)); __pyx_t_6 = 0; /* "pandas/tslib.pyx":1717 * trans = _get_transitions(tz2) * deltas = _get_deltas(tz2) * pos = trans.searchsorted(utc_dates[0]) # <<<<<<<<<<<<<< * if pos == 0: * raise ValueError('First time before start of DST info') */ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_trans), __pyx_n_s_searchsorted); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1717; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_28 = 0; __pyx_t_10 = -1; if (__pyx_t_28 < 0) { __pyx_t_28 += __pyx_pybuffernd_utc_dates.diminfo[0].shape; if (unlikely(__pyx_t_28 < 0)) __pyx_t_10 = 0; } else if (unlikely(__pyx_t_28 >= __pyx_pybuffernd_utc_dates.diminfo[0].shape)) __pyx_t_10 = 0; if (unlikely(__pyx_t_10 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_10); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1717; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_2 = __Pyx_PyInt_From_npy_int64((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_utc_dates.rcbuffer->pybuffer.buf, __pyx_t_28, __pyx_pybuffernd_utc_dates.diminfo[0].strides))); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1717; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1717; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_Call(__pyx_t_6, __pyx_t_8, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1717; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_14 = __Pyx_PyIndex_AsSsize_t(__pyx_t_2); if (unlikely((__pyx_t_14 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1717; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_pos = __pyx_t_14; /* "pandas/tslib.pyx":1718 * deltas = _get_deltas(tz2) * pos = trans.searchsorted(utc_dates[0]) * if pos == 0: # <<<<<<<<<<<<<< * raise ValueError('First time before start of DST info') * elif pos == len(trans): */ __pyx_t_4 = ((__pyx_v_pos == 0) != 0); if (__pyx_t_4) { /* "pandas/tslib.pyx":1719 * pos = trans.searchsorted(utc_dates[0]) * if pos == 0: * raise ValueError('First time before start of DST info') # <<<<<<<<<<<<<< * elif pos == len(trans): * return utc_dates + deltas[-1] */ __pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__43, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1719; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 1719; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } /* "pandas/tslib.pyx":1720 * if pos == 0: * raise ValueError('First time before start of DST info') * elif pos == len(trans): # <<<<<<<<<<<<<< * return utc_dates + deltas[-1] * */ __pyx_t_14 = PyObject_Length(((PyObject *)__pyx_v_trans)); if (unlikely(__pyx_t_14 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1720; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_4 = ((__pyx_v_pos == __pyx_t_14) != 0); if (__pyx_t_4) { /* "pandas/tslib.pyx":1721 * raise ValueError('First time before start of DST info') * elif pos == len(trans): * return utc_dates + deltas[-1] # <<<<<<<<<<<<<< * * # TODO: this assumed sortedness :/ */ __Pyx_XDECREF(__pyx_r); __pyx_t_29 = -1; __pyx_t_10 = -1; if (__pyx_t_29 < 0) { __pyx_t_29 += __pyx_pybuffernd_deltas.diminfo[0].shape; if (unlikely(__pyx_t_29 < 0)) __pyx_t_10 = 0; } else if (unlikely(__pyx_t_29 >= __pyx_pybuffernd_deltas.diminfo[0].shape)) __pyx_t_10 = 0; if (unlikely(__pyx_t_10 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_10); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1721; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_2 = __Pyx_PyInt_From_npy_int64((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_deltas.rcbuffer->pybuffer.buf, __pyx_t_29, __pyx_pybuffernd_deltas.diminfo[0].strides))); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1721; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_8 = PyNumber_Add(((PyObject *)__pyx_v_utc_dates), __pyx_t_2); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1721; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_8; __pyx_t_8 = 0; goto __pyx_L0; } /* "pandas/tslib.pyx":1724 * * # TODO: this assumed sortedness :/ * pos -= 1 # <<<<<<<<<<<<<< * * offset = deltas[pos] */ __pyx_v_pos = (__pyx_v_pos - 1); /* "pandas/tslib.pyx":1726 * pos -= 1 * * offset = deltas[pos] # <<<<<<<<<<<<<< * cdef Py_ssize_t trans_len = len(trans) * */ __pyx_t_14 = __pyx_v_pos; __pyx_t_10 = -1; if (__pyx_t_14 < 0) { __pyx_t_14 += __pyx_pybuffernd_deltas.diminfo[0].shape; if (unlikely(__pyx_t_14 < 0)) __pyx_t_10 = 0; } else if (unlikely(__pyx_t_14 >= __pyx_pybuffernd_deltas.diminfo[0].shape)) __pyx_t_10 = 0; if (unlikely(__pyx_t_10 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_10); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1726; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_offset = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_deltas.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_deltas.diminfo[0].strides)); /* "pandas/tslib.pyx":1727 * * offset = deltas[pos] * cdef Py_ssize_t trans_len = len(trans) # <<<<<<<<<<<<<< * * for i in range(n): */ __pyx_t_22 = PyObject_Length(((PyObject *)__pyx_v_trans)); if (unlikely(__pyx_t_22 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1727; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_trans_len = __pyx_t_22; /* "pandas/tslib.pyx":1729 * cdef Py_ssize_t trans_len = len(trans) * * for i in range(n): # <<<<<<<<<<<<<< * v = utc_dates[i] * if (pos + 1) < trans_len and v >= trans[pos + 1]: */ __pyx_t_22 = __pyx_v_n; for (__pyx_t_30 = 0; __pyx_t_30 < __pyx_t_22; __pyx_t_30+=1) { __pyx_v_i = __pyx_t_30; /* "pandas/tslib.pyx":1730 * * for i in range(n): * v = utc_dates[i] # <<<<<<<<<<<<<< * if (pos + 1) < trans_len and v >= trans[pos + 1]: * pos += 1 */ __pyx_t_31 = __pyx_v_i; __pyx_t_10 = -1; if (__pyx_t_31 < 0) { __pyx_t_31 += __pyx_pybuffernd_utc_dates.diminfo[0].shape; if (unlikely(__pyx_t_31 < 0)) __pyx_t_10 = 0; } else if (unlikely(__pyx_t_31 >= __pyx_pybuffernd_utc_dates.diminfo[0].shape)) __pyx_t_10 = 0; if (unlikely(__pyx_t_10 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_10); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1730; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_v = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_utc_dates.rcbuffer->pybuffer.buf, __pyx_t_31, __pyx_pybuffernd_utc_dates.diminfo[0].strides)); /* "pandas/tslib.pyx":1731 * for i in range(n): * v = utc_dates[i] * if (pos + 1) < trans_len and v >= trans[pos + 1]: # <<<<<<<<<<<<<< * pos += 1 * offset = deltas[pos] */ __pyx_t_4 = (((__pyx_v_pos + 1) < __pyx_v_trans_len) != 0); if (__pyx_t_4) { __pyx_t_32 = (__pyx_v_pos + 1); __pyx_t_10 = -1; if (__pyx_t_32 < 0) { __pyx_t_32 += __pyx_pybuffernd_trans.diminfo[0].shape; if (unlikely(__pyx_t_32 < 0)) __pyx_t_10 = 0; } else if (unlikely(__pyx_t_32 >= __pyx_pybuffernd_trans.diminfo[0].shape)) __pyx_t_10 = 0; if (unlikely(__pyx_t_10 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_10); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1731; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_3 = ((__pyx_v_v >= (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_trans.rcbuffer->pybuffer.buf, __pyx_t_32, __pyx_pybuffernd_trans.diminfo[0].strides))) != 0); __pyx_t_33 = __pyx_t_3; } else { __pyx_t_33 = __pyx_t_4; } if (__pyx_t_33) { /* "pandas/tslib.pyx":1732 * v = utc_dates[i] * if (pos + 1) < trans_len and v >= trans[pos + 1]: * pos += 1 # <<<<<<<<<<<<<< * offset = deltas[pos] * result[i] = v + offset */ __pyx_v_pos = (__pyx_v_pos + 1); /* "pandas/tslib.pyx":1733 * if (pos + 1) < trans_len and v >= trans[pos + 1]: * pos += 1 * offset = deltas[pos] # <<<<<<<<<<<<<< * result[i] = v + offset * */ __pyx_t_34 = __pyx_v_pos; __pyx_t_10 = -1; if (__pyx_t_34 < 0) { __pyx_t_34 += __pyx_pybuffernd_deltas.diminfo[0].shape; if (unlikely(__pyx_t_34 < 0)) __pyx_t_10 = 0; } else if (unlikely(__pyx_t_34 >= __pyx_pybuffernd_deltas.diminfo[0].shape)) __pyx_t_10 = 0; if (unlikely(__pyx_t_10 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_10); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1733; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_offset = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_deltas.rcbuffer->pybuffer.buf, __pyx_t_34, __pyx_pybuffernd_deltas.diminfo[0].strides)); goto __pyx_L19; } __pyx_L19:; /* "pandas/tslib.pyx":1734 * pos += 1 * offset = deltas[pos] * result[i] = v + offset # <<<<<<<<<<<<<< * * return result */ __pyx_t_35 = __pyx_v_i; __pyx_t_10 = -1; if (__pyx_t_35 < 0) { __pyx_t_35 += __pyx_pybuffernd_result.diminfo[0].shape; if (unlikely(__pyx_t_35 < 0)) __pyx_t_10 = 0; } else if (unlikely(__pyx_t_35 >= __pyx_pybuffernd_result.diminfo[0].shape)) __pyx_t_10 = 0; if (unlikely(__pyx_t_10 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_10); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1734; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_35, __pyx_pybuffernd_result.diminfo[0].strides) = (__pyx_v_v + __pyx_v_offset); } /* "pandas/tslib.pyx":1736 * result[i] = v + offset * * return result # <<<<<<<<<<<<<< * * def tz_convert_single(int64_t val, object tz1, object tz2): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_result)); __pyx_r = ((PyObject *)__pyx_v_result); goto __pyx_L0; /* "pandas/tslib.pyx":1660 * have_pytz = False * * def tz_convert(ndarray[int64_t] vals, object tz1, object tz2): # <<<<<<<<<<<<<< * cdef: * ndarray[int64_t] utc_dates, result, trans, deltas */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_16); __Pyx_XDECREF(__pyx_t_17); __Pyx_XDECREF(__pyx_t_18); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_deltas.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_trans.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_utc_dates.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_vals.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.tslib.tz_convert", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_deltas.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_trans.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_utc_dates.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_vals.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_utc_dates); __Pyx_XDECREF((PyObject *)__pyx_v_result); __Pyx_XDECREF((PyObject *)__pyx_v_trans); __Pyx_XDECREF((PyObject *)__pyx_v_deltas); __Pyx_XDECREF(__pyx_v_pytz); __Pyx_XDECREF((PyObject *)__pyx_v_dt); __Pyx_XDECREF(__pyx_v_delta); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/tslib.pyx":1738 * return result * * def tz_convert_single(int64_t val, object tz1, object tz2): # <<<<<<<<<<<<<< * cdef: * ndarray[int64_t] trans, deltas */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5tslib_47tz_convert_single(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5tslib_47tz_convert_single = {__Pyx_NAMESTR("tz_convert_single"), (PyCFunction)__pyx_pw_6pandas_5tslib_47tz_convert_single, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5tslib_47tz_convert_single(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { __pyx_t_5numpy_int64_t __pyx_v_val; PyObject *__pyx_v_tz1 = 0; PyObject *__pyx_v_tz2 = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("tz_convert_single (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_val,&__pyx_n_s_tz1,&__pyx_n_s_tz2,0}; PyObject* values[3] = {0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_val)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_tz1)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("tz_convert_single", 1, 3, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1738; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_tz2)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("tz_convert_single", 1, 3, 3, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1738; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "tz_convert_single") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1738; __pyx_clineno = __LINE__; goto __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_val = __Pyx_PyInt_As_npy_int64(values[0]); if (unlikely((__pyx_v_val == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1738; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_tz1 = values[1]; __pyx_v_tz2 = values[2]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("tz_convert_single", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1738; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.tslib.tz_convert_single", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pandas_5tslib_46tz_convert_single(__pyx_self, __pyx_v_val, __pyx_v_tz1, __pyx_v_tz2); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5tslib_46tz_convert_single(CYTHON_UNUSED PyObject *__pyx_self, __pyx_t_5numpy_int64_t __pyx_v_val, PyObject *__pyx_v_tz1, PyObject *__pyx_v_tz2) { PyArrayObject *__pyx_v_trans = 0; PyArrayObject *__pyx_v_deltas = 0; Py_ssize_t __pyx_v_pos; __pyx_t_5numpy_int64_t __pyx_v_offset; __pyx_t_5numpy_int64_t __pyx_v_utc_date; pandas_datetimestruct __pyx_v_dts; CYTHON_UNUSED PyObject *__pyx_v_pytz = NULL; PyDateTime_DateTime *__pyx_v_dt = NULL; PyObject *__pyx_v_delta = NULL; __Pyx_LocalBuf_ND __pyx_pybuffernd_deltas; __Pyx_Buffer __pyx_pybuffer_deltas; __Pyx_LocalBuf_ND __pyx_pybuffernd_trans; __Pyx_Buffer __pyx_pybuffer_trans; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; __pyx_t_5numpy_int64_t __pyx_t_11; PyArrayObject *__pyx_t_12 = NULL; int __pyx_t_13; PyObject *__pyx_t_14 = NULL; PyObject *__pyx_t_15 = NULL; PyObject *__pyx_t_16 = NULL; Py_ssize_t __pyx_t_17; Py_ssize_t __pyx_t_18; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("tz_convert_single", 0); __pyx_pybuffer_trans.pybuffer.buf = NULL; __pyx_pybuffer_trans.refcount = 0; __pyx_pybuffernd_trans.data = NULL; __pyx_pybuffernd_trans.rcbuffer = &__pyx_pybuffer_trans; __pyx_pybuffer_deltas.pybuffer.buf = NULL; __pyx_pybuffer_deltas.refcount = 0; __pyx_pybuffernd_deltas.data = NULL; __pyx_pybuffernd_deltas.rcbuffer = &__pyx_pybuffer_deltas; /* "pandas/tslib.pyx":1745 * pandas_datetimestruct dts * * if not have_pytz: # <<<<<<<<<<<<<< * import pytz * */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_have_pytz); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1745; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1745; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_3 = ((!__pyx_t_2) != 0); if (__pyx_t_3) { /* "pandas/tslib.pyx":1746 * * if not have_pytz: * import pytz # <<<<<<<<<<<<<< * * # Convert to UTC */ __pyx_t_1 = __Pyx_Import(__pyx_n_s_pytz, 0, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1746; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_v_pytz = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L3; } __pyx_L3:; /* "pandas/tslib.pyx":1749 * * # Convert to UTC * if _is_tzlocal(tz1): # <<<<<<<<<<<<<< * pandas_datetime_to_datetimestruct(val, PANDAS_FR_ns, &dts) * dt = datetime(dts.year, dts.month, dts.day, dts.hour, */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_is_tzlocal); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1749; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1749; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_v_tz1); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_tz1); __Pyx_GIVEREF(__pyx_v_tz1); __pyx_t_5 = PyObject_Call(__pyx_t_1, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1749; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1749; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_3) { /* "pandas/tslib.pyx":1750 * # Convert to UTC * if _is_tzlocal(tz1): * pandas_datetime_to_datetimestruct(val, PANDAS_FR_ns, &dts) # <<<<<<<<<<<<<< * dt = datetime(dts.year, dts.month, dts.day, dts.hour, * dts.min, dts.sec, dts.us, tz1) */ pandas_datetime_to_datetimestruct(__pyx_v_val, PANDAS_FR_ns, (&__pyx_v_dts)); /* "pandas/tslib.pyx":1751 * if _is_tzlocal(tz1): * pandas_datetime_to_datetimestruct(val, PANDAS_FR_ns, &dts) * dt = datetime(dts.year, dts.month, dts.day, dts.hour, # <<<<<<<<<<<<<< * dts.min, dts.sec, dts.us, tz1) * delta = int(total_seconds(_get_utcoffset(tz1, dt))) * 1000000000 */ __pyx_t_5 = __Pyx_PyInt_From_npy_int64(__pyx_v_dts.year); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1751; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = __Pyx_PyInt_From_npy_int32(__pyx_v_dts.month); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1751; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_1 = __Pyx_PyInt_From_npy_int32(__pyx_v_dts.day); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1751; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_6 = __Pyx_PyInt_From_npy_int32(__pyx_v_dts.hour); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1751; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); /* "pandas/tslib.pyx":1752 * pandas_datetime_to_datetimestruct(val, PANDAS_FR_ns, &dts) * dt = datetime(dts.year, dts.month, dts.day, dts.hour, * dts.min, dts.sec, dts.us, tz1) # <<<<<<<<<<<<<< * delta = int(total_seconds(_get_utcoffset(tz1, dt))) * 1000000000 * utc_date = val - delta */ __pyx_t_7 = __Pyx_PyInt_From_npy_int32(__pyx_v_dts.min); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1752; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_t_8 = __Pyx_PyInt_From_npy_int32(__pyx_v_dts.sec); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1752; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_9 = __Pyx_PyInt_From_npy_int32(__pyx_v_dts.us); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1752; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); /* "pandas/tslib.pyx":1751 * if _is_tzlocal(tz1): * pandas_datetime_to_datetimestruct(val, PANDAS_FR_ns, &dts) * dt = datetime(dts.year, dts.month, dts.day, dts.hour, # <<<<<<<<<<<<<< * dts.min, dts.sec, dts.us, tz1) * delta = int(total_seconds(_get_utcoffset(tz1, dt))) * 1000000000 */ __pyx_t_10 = PyTuple_New(8); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1751; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_10, 2, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_10, 3, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_10, 4, __pyx_t_7); __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_10, 5, __pyx_t_8); __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_10, 6, __pyx_t_9); __Pyx_GIVEREF(__pyx_t_9); __Pyx_INCREF(__pyx_v_tz1); PyTuple_SET_ITEM(__pyx_t_10, 7, __pyx_v_tz1); __Pyx_GIVEREF(__pyx_v_tz1); __pyx_t_5 = 0; __pyx_t_4 = 0; __pyx_t_1 = 0; __pyx_t_6 = 0; __pyx_t_7 = 0; __pyx_t_8 = 0; __pyx_t_9 = 0; __pyx_t_9 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_8datetime_datetime)), __pyx_t_10, NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1751; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_v_dt = ((PyDateTime_DateTime *)__pyx_t_9); __pyx_t_9 = 0; /* "pandas/tslib.pyx":1753 * dt = datetime(dts.year, dts.month, dts.day, dts.hour, * dts.min, dts.sec, dts.us, tz1) * delta = int(total_seconds(_get_utcoffset(tz1, dt))) * 1000000000 # <<<<<<<<<<<<<< * utc_date = val - delta * elif _get_zone(tz1) != 'UTC': */ __pyx_t_9 = __pyx_f_6pandas_5tslib__get_utcoffset(__pyx_v_tz1, ((PyObject *)__pyx_v_dt), 0); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1753; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_t_10 = PyFloat_FromDouble(__pyx_f_6pandas_5tslib_total_seconds(__pyx_t_9)); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1753; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1753; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_10); __Pyx_GIVEREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_t_10 = PyObject_Call(((PyObject *)((PyObject*)(&PyInt_Type))), __pyx_t_9, NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1753; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_9 = PyNumber_Multiply(__pyx_t_10, __pyx_int_1000000000); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1753; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_v_delta = __pyx_t_9; __pyx_t_9 = 0; /* "pandas/tslib.pyx":1754 * dts.min, dts.sec, dts.us, tz1) * delta = int(total_seconds(_get_utcoffset(tz1, dt))) * 1000000000 * utc_date = val - delta # <<<<<<<<<<<<<< * elif _get_zone(tz1) != 'UTC': * deltas = _get_deltas(tz1) */ __pyx_t_9 = __Pyx_PyInt_From_npy_int64(__pyx_v_val); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1754; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_t_10 = PyNumber_Subtract(__pyx_t_9, __pyx_v_delta); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1754; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_11 = __Pyx_PyInt_As_npy_int64(__pyx_t_10); if (unlikely((__pyx_t_11 == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1754; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_v_utc_date = __pyx_t_11; goto __pyx_L4; } /* "pandas/tslib.pyx":1755 * delta = int(total_seconds(_get_utcoffset(tz1, dt))) * 1000000000 * utc_date = val - delta * elif _get_zone(tz1) != 'UTC': # <<<<<<<<<<<<<< * deltas = _get_deltas(tz1) * trans = _get_transitions(tz1) */ __pyx_t_10 = __pyx_f_6pandas_5tslib__get_zone(__pyx_v_tz1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1755; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_t_10, __pyx_n_s_UTC, Py_NE)); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1755; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; if (__pyx_t_3) { /* "pandas/tslib.pyx":1756 * utc_date = val - delta * elif _get_zone(tz1) != 'UTC': * deltas = _get_deltas(tz1) # <<<<<<<<<<<<<< * trans = _get_transitions(tz1) * pos = trans.searchsorted(val) - 1 */ __pyx_t_10 = __Pyx_GetModuleGlobalName(__pyx_n_s_get_deltas); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1756; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1756; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_INCREF(__pyx_v_tz1); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_v_tz1); __Pyx_GIVEREF(__pyx_v_tz1); __pyx_t_8 = PyObject_Call(__pyx_t_10, __pyx_t_9, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1756; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; if (!(likely(((__pyx_t_8) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_8, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1756; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_12 = ((PyArrayObject *)__pyx_t_8); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_deltas.rcbuffer->pybuffer); __pyx_t_13 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_deltas.rcbuffer->pybuffer, (PyObject*)__pyx_t_12, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_13 < 0)) { PyErr_Fetch(&__pyx_t_14, &__pyx_t_15, &__pyx_t_16); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_deltas.rcbuffer->pybuffer, (PyObject*)__pyx_v_deltas, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_14); Py_XDECREF(__pyx_t_15); Py_XDECREF(__pyx_t_16); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_14, __pyx_t_15, __pyx_t_16); } } __pyx_pybuffernd_deltas.diminfo[0].strides = __pyx_pybuffernd_deltas.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_deltas.diminfo[0].shape = __pyx_pybuffernd_deltas.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_13 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1756; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_12 = 0; __pyx_v_deltas = ((PyArrayObject *)__pyx_t_8); __pyx_t_8 = 0; /* "pandas/tslib.pyx":1757 * elif _get_zone(tz1) != 'UTC': * deltas = _get_deltas(tz1) * trans = _get_transitions(tz1) # <<<<<<<<<<<<<< * pos = trans.searchsorted(val) - 1 * if pos < 0: */ __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_get_transitions); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1757; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1757; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_INCREF(__pyx_v_tz1); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_v_tz1); __Pyx_GIVEREF(__pyx_v_tz1); __pyx_t_10 = PyObject_Call(__pyx_t_8, __pyx_t_9, NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1757; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; if (!(likely(((__pyx_t_10) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_10, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1757; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_12 = ((PyArrayObject *)__pyx_t_10); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_trans.rcbuffer->pybuffer); __pyx_t_13 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_trans.rcbuffer->pybuffer, (PyObject*)__pyx_t_12, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_13 < 0)) { PyErr_Fetch(&__pyx_t_16, &__pyx_t_15, &__pyx_t_14); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_trans.rcbuffer->pybuffer, (PyObject*)__pyx_v_trans, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_16); Py_XDECREF(__pyx_t_15); Py_XDECREF(__pyx_t_14); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_16, __pyx_t_15, __pyx_t_14); } } __pyx_pybuffernd_trans.diminfo[0].strides = __pyx_pybuffernd_trans.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_trans.diminfo[0].shape = __pyx_pybuffernd_trans.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_13 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1757; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_12 = 0; __pyx_v_trans = ((PyArrayObject *)__pyx_t_10); __pyx_t_10 = 0; /* "pandas/tslib.pyx":1758 * deltas = _get_deltas(tz1) * trans = _get_transitions(tz1) * pos = trans.searchsorted(val) - 1 # <<<<<<<<<<<<<< * if pos < 0: * raise ValueError('First time before start of DST info') */ __pyx_t_10 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_trans), __pyx_n_s_searchsorted); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1758; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __pyx_t_9 = __Pyx_PyInt_From_npy_int64(__pyx_v_val); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1758; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1758; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_9); __Pyx_GIVEREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_9 = PyObject_Call(__pyx_t_10, __pyx_t_8, NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1758; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_8 = PyNumber_Subtract(__pyx_t_9, __pyx_int_1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1758; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_17 = __Pyx_PyIndex_AsSsize_t(__pyx_t_8); if (unlikely((__pyx_t_17 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1758; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_v_pos = __pyx_t_17; /* "pandas/tslib.pyx":1759 * trans = _get_transitions(tz1) * pos = trans.searchsorted(val) - 1 * if pos < 0: # <<<<<<<<<<<<<< * raise ValueError('First time before start of DST info') * offset = deltas[pos] */ __pyx_t_3 = ((__pyx_v_pos < 0) != 0); if (__pyx_t_3) { /* "pandas/tslib.pyx":1760 * pos = trans.searchsorted(val) - 1 * if pos < 0: * raise ValueError('First time before start of DST info') # <<<<<<<<<<<<<< * offset = deltas[pos] * utc_date = val - offset */ __pyx_t_8 = PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__44, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1760; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_Raise(__pyx_t_8, 0, 0, 0); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1760; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } /* "pandas/tslib.pyx":1761 * if pos < 0: * raise ValueError('First time before start of DST info') * offset = deltas[pos] # <<<<<<<<<<<<<< * utc_date = val - offset * else: */ __pyx_t_17 = __pyx_v_pos; __pyx_t_13 = -1; if (__pyx_t_17 < 0) { __pyx_t_17 += __pyx_pybuffernd_deltas.diminfo[0].shape; if (unlikely(__pyx_t_17 < 0)) __pyx_t_13 = 0; } else if (unlikely(__pyx_t_17 >= __pyx_pybuffernd_deltas.diminfo[0].shape)) __pyx_t_13 = 0; if (unlikely(__pyx_t_13 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_13); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1761; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_offset = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_deltas.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_deltas.diminfo[0].strides)); /* "pandas/tslib.pyx":1762 * raise ValueError('First time before start of DST info') * offset = deltas[pos] * utc_date = val - offset # <<<<<<<<<<<<<< * else: * utc_date = val */ __pyx_v_utc_date = (__pyx_v_val - __pyx_v_offset); goto __pyx_L4; } /*else*/ { /* "pandas/tslib.pyx":1764 * utc_date = val - offset * else: * utc_date = val # <<<<<<<<<<<<<< * * if _get_zone(tz2) == 'UTC': */ __pyx_v_utc_date = __pyx_v_val; } __pyx_L4:; /* "pandas/tslib.pyx":1766 * utc_date = val * * if _get_zone(tz2) == 'UTC': # <<<<<<<<<<<<<< * return utc_date * if _is_tzlocal(tz2): */ __pyx_t_8 = __pyx_f_6pandas_5tslib__get_zone(__pyx_v_tz2); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1766; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_t_8, __pyx_n_s_UTC, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1766; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (__pyx_t_3) { /* "pandas/tslib.pyx":1767 * * if _get_zone(tz2) == 'UTC': * return utc_date # <<<<<<<<<<<<<< * if _is_tzlocal(tz2): * pandas_datetime_to_datetimestruct(val, PANDAS_FR_ns, &dts) */ __Pyx_XDECREF(__pyx_r); __pyx_t_8 = __Pyx_PyInt_From_npy_int64(__pyx_v_utc_date); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1767; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_r = __pyx_t_8; __pyx_t_8 = 0; goto __pyx_L0; } /* "pandas/tslib.pyx":1768 * if _get_zone(tz2) == 'UTC': * return utc_date * if _is_tzlocal(tz2): # <<<<<<<<<<<<<< * pandas_datetime_to_datetimestruct(val, PANDAS_FR_ns, &dts) * dt = datetime(dts.year, dts.month, dts.day, dts.hour, */ __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_is_tzlocal); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1768; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1768; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_INCREF(__pyx_v_tz2); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_v_tz2); __Pyx_GIVEREF(__pyx_v_tz2); __pyx_t_10 = PyObject_Call(__pyx_t_8, __pyx_t_9, NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1768; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_10); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1768; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; if (__pyx_t_3) { /* "pandas/tslib.pyx":1769 * return utc_date * if _is_tzlocal(tz2): * pandas_datetime_to_datetimestruct(val, PANDAS_FR_ns, &dts) # <<<<<<<<<<<<<< * dt = datetime(dts.year, dts.month, dts.day, dts.hour, * dts.min, dts.sec, dts.us, tz2) */ pandas_datetime_to_datetimestruct(__pyx_v_val, PANDAS_FR_ns, (&__pyx_v_dts)); /* "pandas/tslib.pyx":1770 * if _is_tzlocal(tz2): * pandas_datetime_to_datetimestruct(val, PANDAS_FR_ns, &dts) * dt = datetime(dts.year, dts.month, dts.day, dts.hour, # <<<<<<<<<<<<<< * dts.min, dts.sec, dts.us, tz2) * delta = int(total_seconds(_get_utcoffset(tz2, dt))) * 1000000000 */ __pyx_t_10 = __Pyx_PyInt_From_npy_int64(__pyx_v_dts.year); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1770; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __pyx_t_9 = __Pyx_PyInt_From_npy_int32(__pyx_v_dts.month); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1770; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_t_8 = __Pyx_PyInt_From_npy_int32(__pyx_v_dts.day); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1770; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_7 = __Pyx_PyInt_From_npy_int32(__pyx_v_dts.hour); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1770; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); /* "pandas/tslib.pyx":1771 * pandas_datetime_to_datetimestruct(val, PANDAS_FR_ns, &dts) * dt = datetime(dts.year, dts.month, dts.day, dts.hour, * dts.min, dts.sec, dts.us, tz2) # <<<<<<<<<<<<<< * delta = int(total_seconds(_get_utcoffset(tz2, dt))) * 1000000000 * return utc_date + delta */ __pyx_t_6 = __Pyx_PyInt_From_npy_int32(__pyx_v_dts.min); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1771; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_1 = __Pyx_PyInt_From_npy_int32(__pyx_v_dts.sec); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1771; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = __Pyx_PyInt_From_npy_int32(__pyx_v_dts.us); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1771; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); /* "pandas/tslib.pyx":1770 * if _is_tzlocal(tz2): * pandas_datetime_to_datetimestruct(val, PANDAS_FR_ns, &dts) * dt = datetime(dts.year, dts.month, dts.day, dts.hour, # <<<<<<<<<<<<<< * dts.min, dts.sec, dts.us, tz2) * delta = int(total_seconds(_get_utcoffset(tz2, dt))) * 1000000000 */ __pyx_t_5 = PyTuple_New(8); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1770; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_10); __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_9); __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_t_8); __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_5, 3, __pyx_t_7); __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_5, 4, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_5, 5, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_5, 6, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __Pyx_INCREF(__pyx_v_tz2); PyTuple_SET_ITEM(__pyx_t_5, 7, __pyx_v_tz2); __Pyx_GIVEREF(__pyx_v_tz2); __pyx_t_10 = 0; __pyx_t_9 = 0; __pyx_t_8 = 0; __pyx_t_7 = 0; __pyx_t_6 = 0; __pyx_t_1 = 0; __pyx_t_4 = 0; __pyx_t_4 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_8datetime_datetime)), __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1770; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF_SET(__pyx_v_dt, ((PyDateTime_DateTime *)__pyx_t_4)); __pyx_t_4 = 0; /* "pandas/tslib.pyx":1772 * dt = datetime(dts.year, dts.month, dts.day, dts.hour, * dts.min, dts.sec, dts.us, tz2) * delta = int(total_seconds(_get_utcoffset(tz2, dt))) * 1000000000 # <<<<<<<<<<<<<< * return utc_date + delta * # Convert UTC to other timezone */ __pyx_t_4 = __pyx_f_6pandas_5tslib__get_utcoffset(__pyx_v_tz2, ((PyObject *)__pyx_v_dt), 0); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1772; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = PyFloat_FromDouble(__pyx_f_6pandas_5tslib_total_seconds(__pyx_t_4)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1772; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1772; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyObject_Call(((PyObject *)((PyObject*)(&PyInt_Type))), __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1772; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyNumber_Multiply(__pyx_t_5, __pyx_int_1000000000); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1772; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF_SET(__pyx_v_delta, __pyx_t_4); __pyx_t_4 = 0; /* "pandas/tslib.pyx":1773 * dts.min, dts.sec, dts.us, tz2) * delta = int(total_seconds(_get_utcoffset(tz2, dt))) * 1000000000 * return utc_date + delta # <<<<<<<<<<<<<< * # Convert UTC to other timezone * trans = _get_transitions(tz2) */ __Pyx_XDECREF(__pyx_r); __pyx_t_4 = __Pyx_PyInt_From_npy_int64(__pyx_v_utc_date); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1773; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = PyNumber_Add(__pyx_t_4, __pyx_v_delta); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1773; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_r = __pyx_t_5; __pyx_t_5 = 0; goto __pyx_L0; } /* "pandas/tslib.pyx":1775 * return utc_date + delta * # Convert UTC to other timezone * trans = _get_transitions(tz2) # <<<<<<<<<<<<<< * deltas = _get_deltas(tz2) * pos = trans.searchsorted(utc_date) - 1 */ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_get_transitions); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1775; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1775; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_v_tz2); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_tz2); __Pyx_GIVEREF(__pyx_v_tz2); __pyx_t_1 = PyObject_Call(__pyx_t_5, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1775; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1775; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_12 = ((PyArrayObject *)__pyx_t_1); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_trans.rcbuffer->pybuffer); __pyx_t_13 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_trans.rcbuffer->pybuffer, (PyObject*)__pyx_t_12, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_13 < 0)) { PyErr_Fetch(&__pyx_t_14, &__pyx_t_15, &__pyx_t_16); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_trans.rcbuffer->pybuffer, (PyObject*)__pyx_v_trans, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_14); Py_XDECREF(__pyx_t_15); Py_XDECREF(__pyx_t_16); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_14, __pyx_t_15, __pyx_t_16); } } __pyx_pybuffernd_trans.diminfo[0].strides = __pyx_pybuffernd_trans.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_trans.diminfo[0].shape = __pyx_pybuffernd_trans.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_13 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1775; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_12 = 0; __Pyx_XDECREF_SET(__pyx_v_trans, ((PyArrayObject *)__pyx_t_1)); __pyx_t_1 = 0; /* "pandas/tslib.pyx":1776 * # Convert UTC to other timezone * trans = _get_transitions(tz2) * deltas = _get_deltas(tz2) # <<<<<<<<<<<<<< * pos = trans.searchsorted(utc_date) - 1 * if pos < 0: */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_get_deltas); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1776; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1776; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_v_tz2); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_tz2); __Pyx_GIVEREF(__pyx_v_tz2); __pyx_t_5 = PyObject_Call(__pyx_t_1, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1776; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1776; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_12 = ((PyArrayObject *)__pyx_t_5); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_deltas.rcbuffer->pybuffer); __pyx_t_13 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_deltas.rcbuffer->pybuffer, (PyObject*)__pyx_t_12, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_13 < 0)) { PyErr_Fetch(&__pyx_t_16, &__pyx_t_15, &__pyx_t_14); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_deltas.rcbuffer->pybuffer, (PyObject*)__pyx_v_deltas, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_16); Py_XDECREF(__pyx_t_15); Py_XDECREF(__pyx_t_14); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_16, __pyx_t_15, __pyx_t_14); } } __pyx_pybuffernd_deltas.diminfo[0].strides = __pyx_pybuffernd_deltas.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_deltas.diminfo[0].shape = __pyx_pybuffernd_deltas.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_13 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1776; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_12 = 0; __Pyx_XDECREF_SET(__pyx_v_deltas, ((PyArrayObject *)__pyx_t_5)); __pyx_t_5 = 0; /* "pandas/tslib.pyx":1777 * trans = _get_transitions(tz2) * deltas = _get_deltas(tz2) * pos = trans.searchsorted(utc_date) - 1 # <<<<<<<<<<<<<< * if pos < 0: * raise ValueError('First time before start of DST info') */ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_trans), __pyx_n_s_searchsorted); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1777; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = __Pyx_PyInt_From_npy_int64(__pyx_v_utc_date); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1777; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1777; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyObject_Call(__pyx_t_5, __pyx_t_1, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1777; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyNumber_Subtract(__pyx_t_4, __pyx_int_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1777; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_18 = __Pyx_PyIndex_AsSsize_t(__pyx_t_1); if (unlikely((__pyx_t_18 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1777; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_pos = __pyx_t_18; /* "pandas/tslib.pyx":1778 * deltas = _get_deltas(tz2) * pos = trans.searchsorted(utc_date) - 1 * if pos < 0: # <<<<<<<<<<<<<< * raise ValueError('First time before start of DST info') * */ __pyx_t_3 = ((__pyx_v_pos < 0) != 0); if (__pyx_t_3) { /* "pandas/tslib.pyx":1779 * pos = trans.searchsorted(utc_date) - 1 * if pos < 0: * raise ValueError('First time before start of DST info') # <<<<<<<<<<<<<< * * offset = deltas[pos] */ __pyx_t_1 = PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__45, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1779; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 1779; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } /* "pandas/tslib.pyx":1781 * raise ValueError('First time before start of DST info') * * offset = deltas[pos] # <<<<<<<<<<<<<< * return utc_date + offset * */ __pyx_t_18 = __pyx_v_pos; __pyx_t_13 = -1; if (__pyx_t_18 < 0) { __pyx_t_18 += __pyx_pybuffernd_deltas.diminfo[0].shape; if (unlikely(__pyx_t_18 < 0)) __pyx_t_13 = 0; } else if (unlikely(__pyx_t_18 >= __pyx_pybuffernd_deltas.diminfo[0].shape)) __pyx_t_13 = 0; if (unlikely(__pyx_t_13 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_13); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1781; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_offset = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_deltas.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_deltas.diminfo[0].strides)); /* "pandas/tslib.pyx":1782 * * offset = deltas[pos] * return utc_date + offset # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyInt_From_npy_int64((__pyx_v_utc_date + __pyx_v_offset)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1782; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "pandas/tslib.pyx":1738 * return result * * def tz_convert_single(int64_t val, object tz1, object tz2): # <<<<<<<<<<<<<< * cdef: * ndarray[int64_t] trans, deltas */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); __Pyx_XDECREF(__pyx_t_10); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_deltas.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_trans.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.tslib.tz_convert_single", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_deltas.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_trans.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_trans); __Pyx_XDECREF((PyObject *)__pyx_v_deltas); __Pyx_XDECREF(__pyx_v_pytz); __Pyx_XDECREF((PyObject *)__pyx_v_dt); __Pyx_XDECREF(__pyx_v_delta); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/tslib.pyx":1788 * utc_offset_cache = {} * * def _get_transitions(tz): # <<<<<<<<<<<<<< * """ * Get UTC times of DST transitions */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5tslib_49_get_transitions(PyObject *__pyx_self, PyObject *__pyx_v_tz); /*proto*/ static char __pyx_doc_6pandas_5tslib_48_get_transitions[] = "\n Get UTC times of DST transitions\n "; static PyMethodDef __pyx_mdef_6pandas_5tslib_49_get_transitions = {__Pyx_NAMESTR("_get_transitions"), (PyCFunction)__pyx_pw_6pandas_5tslib_49_get_transitions, METH_O, __Pyx_DOCSTR(__pyx_doc_6pandas_5tslib_48_get_transitions)}; static PyObject *__pyx_pw_6pandas_5tslib_49_get_transitions(PyObject *__pyx_self, PyObject *__pyx_v_tz) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_get_transitions (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_5tslib_48_get_transitions(__pyx_self, ((PyObject *)__pyx_v_tz)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5tslib_48_get_transitions(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_tz) { PyObject *__pyx_v_arr = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; Py_hash_t __pyx_t_4; int __pyx_t_5; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; PyObject *__pyx_t_11 = NULL; PyObject *__pyx_t_12 = NULL; PyObject *__pyx_t_13 = NULL; int __pyx_t_14; int __pyx_t_15; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_get_transitions", 0); /* "pandas/tslib.pyx":1792 * Get UTC times of DST transitions * """ * try: # <<<<<<<<<<<<<< * # tzoffset not hashable in Python 3 * hash(tz) */ { __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:*/ { /* "pandas/tslib.pyx":1794 * try: * # tzoffset not hashable in Python 3 * hash(tz) # <<<<<<<<<<<<<< * except TypeError: * return np.array([NPY_NAT + 1], dtype=np.int64) */ __pyx_t_4 = PyObject_Hash(__pyx_v_tz); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1794; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L10_try_end; __pyx_L3_error:; /* "pandas/tslib.pyx":1795 * # tzoffset not hashable in Python 3 * hash(tz) * except TypeError: # <<<<<<<<<<<<<< * return np.array([NPY_NAT + 1], dtype=np.int64) * */ __pyx_t_5 = PyErr_ExceptionMatches(__pyx_builtin_TypeError); if (__pyx_t_5) { __Pyx_AddTraceback("pandas.tslib._get_transitions", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1795; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_GOTREF(__pyx_t_7); __Pyx_GOTREF(__pyx_t_8); /* "pandas/tslib.pyx":1796 * hash(tz) * except TypeError: * return np.array([NPY_NAT + 1], dtype=np.int64) # <<<<<<<<<<<<<< * * if tz not in trans_cache: */ __Pyx_XDECREF(__pyx_r); __pyx_t_9 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1796; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_array); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1796; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_9 = __Pyx_PyInt_From_npy_int64((__pyx_v_6pandas_5tslib_NPY_NAT + 1)); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1796; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_t_11 = PyList_New(1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1796; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} __Pyx_GOTREF(__pyx_t_11); PyList_SET_ITEM(__pyx_t_11, 0, __pyx_t_9); __Pyx_GIVEREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1796; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} __Pyx_GOTREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_11); __Pyx_GIVEREF(__pyx_t_11); __pyx_t_11 = 0; __pyx_t_11 = PyDict_New(); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1796; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} __Pyx_GOTREF(__pyx_t_11); __pyx_t_12 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1796; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} __Pyx_GOTREF(__pyx_t_12); __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_int64); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1796; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; if (PyDict_SetItem(__pyx_t_11, __pyx_n_s_dtype, __pyx_t_13) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1796; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_13 = PyObject_Call(__pyx_t_10, __pyx_t_9, __pyx_t_11); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1796; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __pyx_r = __pyx_t_13; __pyx_t_13 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; goto __pyx_L6_except_return; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; goto __pyx_L4_exception_handled; } goto __pyx_L5_except_error; __pyx_L5_except_error:; __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); goto __pyx_L1_error; __pyx_L6_except_return:; __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); goto __pyx_L0; __pyx_L4_exception_handled:; __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); __pyx_L10_try_end:; } /* "pandas/tslib.pyx":1798 * return np.array([NPY_NAT + 1], dtype=np.int64) * * if tz not in trans_cache: # <<<<<<<<<<<<<< * if hasattr(tz, '_utc_transition_times'): * arr = np.array(tz._utc_transition_times, dtype='M8[ns]') */ __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_trans_cache); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1798; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_14 = (__Pyx_PySequence_Contains(__pyx_v_tz, __pyx_t_8, Py_NE)); if (unlikely(__pyx_t_14 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1798; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_15 = (__pyx_t_14 != 0); if (__pyx_t_15) { /* "pandas/tslib.pyx":1799 * * if tz not in trans_cache: * if hasattr(tz, '_utc_transition_times'): # <<<<<<<<<<<<<< * arr = np.array(tz._utc_transition_times, dtype='M8[ns]') * arr = arr.view('i8') */ __pyx_t_15 = PyObject_HasAttr(__pyx_v_tz, __pyx_n_s_utc_transition_times); if (unlikely(__pyx_t_15 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1799; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_14 = (__pyx_t_15 != 0); if (__pyx_t_14) { /* "pandas/tslib.pyx":1800 * if tz not in trans_cache: * if hasattr(tz, '_utc_transition_times'): * arr = np.array(tz._utc_transition_times, dtype='M8[ns]') # <<<<<<<<<<<<<< * arr = arr.view('i8') * try: */ __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1800; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_array); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1800; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_tz, __pyx_n_s_utc_transition_times); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1800; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1800; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_8); __Pyx_GIVEREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_8 = PyDict_New(); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1800; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_dtype, __pyx_kp_s_M8_ns) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1800; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_13 = PyObject_Call(__pyx_t_7, __pyx_t_6, __pyx_t_8); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1800; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_v_arr = __pyx_t_13; __pyx_t_13 = 0; /* "pandas/tslib.pyx":1801 * if hasattr(tz, '_utc_transition_times'): * arr = np.array(tz._utc_transition_times, dtype='M8[ns]') * arr = arr.view('i8') # <<<<<<<<<<<<<< * try: * if tz._utc_transition_times[0].year == 1: */ __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_v_arr, __pyx_n_s_view); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1801; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __pyx_t_8 = PyObject_Call(__pyx_t_13, __pyx_tuple__46, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1801; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_DECREF_SET(__pyx_v_arr, __pyx_t_8); __pyx_t_8 = 0; /* "pandas/tslib.pyx":1802 * arr = np.array(tz._utc_transition_times, dtype='M8[ns]') * arr = arr.view('i8') * try: # <<<<<<<<<<<<<< * if tz._utc_transition_times[0].year == 1: * arr[0] = NPY_NAT + 1 */ { __Pyx_ExceptionSave(&__pyx_t_3, &__pyx_t_2, &__pyx_t_1); __Pyx_XGOTREF(__pyx_t_3); __Pyx_XGOTREF(__pyx_t_2); __Pyx_XGOTREF(__pyx_t_1); /*try:*/ { /* "pandas/tslib.pyx":1803 * arr = arr.view('i8') * try: * if tz._utc_transition_times[0].year == 1: # <<<<<<<<<<<<<< * arr[0] = NPY_NAT + 1 * except Exception: */ __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_tz, __pyx_n_s_utc_transition_times); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1803; __pyx_clineno = __LINE__; goto __pyx_L15_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_13 = __Pyx_GetItemInt(__pyx_t_8, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_13 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1803; __pyx_clineno = __LINE__; goto __pyx_L15_error;}; __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_13, __pyx_n_s_year); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1803; __pyx_clineno = __LINE__; goto __pyx_L15_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_13 = PyObject_RichCompare(__pyx_t_8, __pyx_int_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_13); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1803; __pyx_clineno = __LINE__; goto __pyx_L15_error;} __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_14 = __Pyx_PyObject_IsTrue(__pyx_t_13); if (unlikely(__pyx_t_14 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1803; __pyx_clineno = __LINE__; goto __pyx_L15_error;} __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; if (__pyx_t_14) { /* "pandas/tslib.pyx":1804 * try: * if tz._utc_transition_times[0].year == 1: * arr[0] = NPY_NAT + 1 # <<<<<<<<<<<<<< * except Exception: * pass */ __pyx_t_13 = __Pyx_PyInt_From_npy_int64((__pyx_v_6pandas_5tslib_NPY_NAT + 1)); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1804; __pyx_clineno = __LINE__; goto __pyx_L15_error;} __Pyx_GOTREF(__pyx_t_13); if (unlikely(__Pyx_SetItemInt(__pyx_v_arr, 0, __pyx_t_13, long, 1, __Pyx_PyInt_From_long, 0, 0, 1) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1804; __pyx_clineno = __LINE__; goto __pyx_L15_error;} __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; goto __pyx_L23; } __pyx_L23:; } __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L22_try_end; __pyx_L15_error:; __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; /* "pandas/tslib.pyx":1805 * if tz._utc_transition_times[0].year == 1: * arr[0] = NPY_NAT + 1 * except Exception: # <<<<<<<<<<<<<< * pass * else: */ __pyx_t_5 = PyErr_ExceptionMatches(__pyx_builtin_Exception); if (__pyx_t_5) { PyErr_Restore(0,0,0); goto __pyx_L16_exception_handled; } goto __pyx_L17_except_error; __pyx_L17_except_error:; __Pyx_XGIVEREF(__pyx_t_3); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_1); __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_2, __pyx_t_1); goto __pyx_L1_error; __pyx_L16_exception_handled:; __Pyx_XGIVEREF(__pyx_t_3); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_1); __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_2, __pyx_t_1); __pyx_L22_try_end:; } goto __pyx_L14; } /*else*/ { /* "pandas/tslib.pyx":1808 * pass * else: * arr = np.array([NPY_NAT + 1], dtype=np.int64) # <<<<<<<<<<<<<< * trans_cache[tz] = arr * return trans_cache[tz] */ __pyx_t_13 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1808; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_13, __pyx_n_s_array); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1808; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_13 = __Pyx_PyInt_From_npy_int64((__pyx_v_6pandas_5tslib_NPY_NAT + 1)); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1808; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __pyx_t_6 = PyList_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1808; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); PyList_SET_ITEM(__pyx_t_6, 0, __pyx_t_13); __Pyx_GIVEREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_13 = PyTuple_New(1); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1808; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyDict_New(); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1808; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1808; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_int64); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1808; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_dtype, __pyx_t_11) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1808; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __pyx_t_11 = PyObject_Call(__pyx_t_8, __pyx_t_13, __pyx_t_6); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1808; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_v_arr = __pyx_t_11; __pyx_t_11 = 0; } __pyx_L14:; /* "pandas/tslib.pyx":1809 * else: * arr = np.array([NPY_NAT + 1], dtype=np.int64) * trans_cache[tz] = arr # <<<<<<<<<<<<<< * return trans_cache[tz] * */ __pyx_t_11 = __Pyx_GetModuleGlobalName(__pyx_n_s_trans_cache); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1809; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); if (unlikely(PyObject_SetItem(__pyx_t_11, __pyx_v_tz, __pyx_v_arr) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1809; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; goto __pyx_L13; } __pyx_L13:; /* "pandas/tslib.pyx":1810 * arr = np.array([NPY_NAT + 1], dtype=np.int64) * trans_cache[tz] = arr * return trans_cache[tz] # <<<<<<<<<<<<<< * * def _get_deltas(tz): */ __Pyx_XDECREF(__pyx_r); __pyx_t_11 = __Pyx_GetModuleGlobalName(__pyx_n_s_trans_cache); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1810; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __pyx_t_6 = PyObject_GetItem(__pyx_t_11, __pyx_v_tz); if (unlikely(__pyx_t_6 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1810; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __pyx_r = __pyx_t_6; __pyx_t_6 = 0; goto __pyx_L0; /* "pandas/tslib.pyx":1788 * utc_offset_cache = {} * * def _get_transitions(tz): # <<<<<<<<<<<<<< * """ * Get UTC times of DST transitions */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); __Pyx_XDECREF(__pyx_t_10); __Pyx_XDECREF(__pyx_t_11); __Pyx_XDECREF(__pyx_t_12); __Pyx_XDECREF(__pyx_t_13); __Pyx_AddTraceback("pandas.tslib._get_transitions", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_arr); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/tslib.pyx":1812 * return trans_cache[tz] * * def _get_deltas(tz): # <<<<<<<<<<<<<< * """ * Get UTC offsets in microseconds corresponding to DST transitions */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5tslib_51_get_deltas(PyObject *__pyx_self, PyObject *__pyx_v_tz); /*proto*/ static char __pyx_doc_6pandas_5tslib_50_get_deltas[] = "\n Get UTC offsets in microseconds corresponding to DST transitions\n "; static PyMethodDef __pyx_mdef_6pandas_5tslib_51_get_deltas = {__Pyx_NAMESTR("_get_deltas"), (PyCFunction)__pyx_pw_6pandas_5tslib_51_get_deltas, METH_O, __Pyx_DOCSTR(__pyx_doc_6pandas_5tslib_50_get_deltas)}; static PyObject *__pyx_pw_6pandas_5tslib_51_get_deltas(PyObject *__pyx_self, PyObject *__pyx_v_tz) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_get_deltas (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_5tslib_50_get_deltas(__pyx_self, ((PyObject *)__pyx_v_tz)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5tslib_50_get_deltas(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_tz) { PyObject *__pyx_v_num = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; Py_hash_t __pyx_t_4; int __pyx_t_5; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; PyObject *__pyx_t_11 = NULL; PyObject *__pyx_t_12 = NULL; PyObject *__pyx_t_13 = NULL; int __pyx_t_14; int __pyx_t_15; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_get_deltas", 0); /* "pandas/tslib.pyx":1816 * Get UTC offsets in microseconds corresponding to DST transitions * """ * try: # <<<<<<<<<<<<<< * # tzoffset not hashable in Python 3 * hash(tz) */ { __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:*/ { /* "pandas/tslib.pyx":1818 * try: * # tzoffset not hashable in Python 3 * hash(tz) # <<<<<<<<<<<<<< * except TypeError: * num = int(total_seconds(_get_utcoffset(tz, None))) * 1000000000 */ __pyx_t_4 = PyObject_Hash(__pyx_v_tz); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1818; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L10_try_end; __pyx_L3_error:; /* "pandas/tslib.pyx":1819 * # tzoffset not hashable in Python 3 * hash(tz) * except TypeError: # <<<<<<<<<<<<<< * num = int(total_seconds(_get_utcoffset(tz, None))) * 1000000000 * return np.array([num], dtype=np.int64) */ __pyx_t_5 = PyErr_ExceptionMatches(__pyx_builtin_TypeError); if (__pyx_t_5) { __Pyx_AddTraceback("pandas.tslib._get_deltas", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1819; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_GOTREF(__pyx_t_7); __Pyx_GOTREF(__pyx_t_8); /* "pandas/tslib.pyx":1820 * hash(tz) * except TypeError: * num = int(total_seconds(_get_utcoffset(tz, None))) * 1000000000 # <<<<<<<<<<<<<< * return np.array([num], dtype=np.int64) * */ __pyx_t_9 = __pyx_f_6pandas_5tslib__get_utcoffset(__pyx_v_tz, Py_None, 0); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1820; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_t_10 = PyFloat_FromDouble(__pyx_f_6pandas_5tslib_total_seconds(__pyx_t_9)); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1820; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1820; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} __Pyx_GOTREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_10); __Pyx_GIVEREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_t_10 = PyObject_Call(((PyObject *)((PyObject*)(&PyInt_Type))), __pyx_t_9, NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1820; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_9 = PyNumber_Multiply(__pyx_t_10, __pyx_int_1000000000); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1820; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_v_num = __pyx_t_9; __pyx_t_9 = 0; /* "pandas/tslib.pyx":1821 * except TypeError: * num = int(total_seconds(_get_utcoffset(tz, None))) * 1000000000 * return np.array([num], dtype=np.int64) # <<<<<<<<<<<<<< * * if tz not in utc_offset_cache: */ __Pyx_XDECREF(__pyx_r); __pyx_t_9 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1821; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_array); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1821; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_9 = PyList_New(1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1821; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_INCREF(__pyx_v_num); PyList_SET_ITEM(__pyx_t_9, 0, __pyx_v_num); __Pyx_GIVEREF(__pyx_v_num); __pyx_t_11 = PyTuple_New(1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1821; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} __Pyx_GOTREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_9); __Pyx_GIVEREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_9 = PyDict_New(); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1821; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_t_12 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1821; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} __Pyx_GOTREF(__pyx_t_12); __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_int64); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1821; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_dtype, __pyx_t_13) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1821; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_13 = PyObject_Call(__pyx_t_10, __pyx_t_11, __pyx_t_9); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1821; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_r = __pyx_t_13; __pyx_t_13 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; goto __pyx_L6_except_return; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; goto __pyx_L4_exception_handled; } goto __pyx_L5_except_error; __pyx_L5_except_error:; __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); goto __pyx_L1_error; __pyx_L6_except_return:; __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); goto __pyx_L0; __pyx_L4_exception_handled:; __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); __pyx_L10_try_end:; } /* "pandas/tslib.pyx":1823 * return np.array([num], dtype=np.int64) * * if tz not in utc_offset_cache: # <<<<<<<<<<<<<< * if hasattr(tz, '_utc_transition_times'): * utc_offset_cache[tz] = _unbox_utcoffsets(tz._transition_info) */ __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_utc_offset_cache); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1823; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_14 = (__Pyx_PySequence_Contains(__pyx_v_tz, __pyx_t_8, Py_NE)); if (unlikely(__pyx_t_14 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1823; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_15 = (__pyx_t_14 != 0); if (__pyx_t_15) { /* "pandas/tslib.pyx":1824 * * if tz not in utc_offset_cache: * if hasattr(tz, '_utc_transition_times'): # <<<<<<<<<<<<<< * utc_offset_cache[tz] = _unbox_utcoffsets(tz._transition_info) * else: */ __pyx_t_15 = PyObject_HasAttr(__pyx_v_tz, __pyx_n_s_utc_transition_times); if (unlikely(__pyx_t_15 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1824; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_14 = (__pyx_t_15 != 0); if (__pyx_t_14) { /* "pandas/tslib.pyx":1825 * if tz not in utc_offset_cache: * if hasattr(tz, '_utc_transition_times'): * utc_offset_cache[tz] = _unbox_utcoffsets(tz._transition_info) # <<<<<<<<<<<<<< * else: * # static tzinfo */ __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_tz, __pyx_n_s_transition_info); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1825; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_7 = ((PyObject *)__pyx_f_6pandas_5tslib__unbox_utcoffsets(__pyx_t_8, 0)); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1825; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_utc_offset_cache); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1825; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); if (unlikely(PyObject_SetItem(__pyx_t_8, __pyx_v_tz, __pyx_t_7) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1825; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; goto __pyx_L14; } /*else*/ { /* "pandas/tslib.pyx":1828 * else: * # static tzinfo * num = int(total_seconds(_get_utcoffset(tz, None))) * 1000000000 # <<<<<<<<<<<<<< * utc_offset_cache[tz] = np.array([num], dtype=np.int64) * */ __pyx_t_7 = __pyx_f_6pandas_5tslib__get_utcoffset(__pyx_v_tz, Py_None, 0); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1828; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_t_8 = PyFloat_FromDouble(__pyx_f_6pandas_5tslib_total_seconds(__pyx_t_7)); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1828; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1828; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_8); __Pyx_GIVEREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_8 = PyObject_Call(((PyObject *)((PyObject*)(&PyInt_Type))), __pyx_t_7, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1828; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_7 = PyNumber_Multiply(__pyx_t_8, __pyx_int_1000000000); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1828; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_v_num = __pyx_t_7; __pyx_t_7 = 0; /* "pandas/tslib.pyx":1829 * # static tzinfo * num = int(total_seconds(_get_utcoffset(tz, None))) * 1000000000 * utc_offset_cache[tz] = np.array([num], dtype=np.int64) # <<<<<<<<<<<<<< * * return utc_offset_cache[tz] */ __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1829; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_array); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1829; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_7 = PyList_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1829; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_INCREF(__pyx_v_num); PyList_SET_ITEM(__pyx_t_7, 0, __pyx_v_num); __Pyx_GIVEREF(__pyx_v_num); __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1829; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_7); __Pyx_GIVEREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_7 = PyDict_New(); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1829; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_t_13 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1829; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_13, __pyx_n_s_int64); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1829; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_dtype, __pyx_t_9) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1829; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_9 = PyObject_Call(__pyx_t_8, __pyx_t_6, __pyx_t_7); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1829; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_utc_offset_cache); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1829; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); if (unlikely(PyObject_SetItem(__pyx_t_7, __pyx_v_tz, __pyx_t_9) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1829; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; } __pyx_L14:; goto __pyx_L13; } __pyx_L13:; /* "pandas/tslib.pyx":1831 * utc_offset_cache[tz] = np.array([num], dtype=np.int64) * * return utc_offset_cache[tz] # <<<<<<<<<<<<<< * * cdef double total_seconds(object td): # Python 2.6 compat */ __Pyx_XDECREF(__pyx_r); __pyx_t_9 = __Pyx_GetModuleGlobalName(__pyx_n_s_utc_offset_cache); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1831; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_t_7 = PyObject_GetItem(__pyx_t_9, __pyx_v_tz); if (unlikely(__pyx_t_7 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1831; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_r = __pyx_t_7; __pyx_t_7 = 0; goto __pyx_L0; /* "pandas/tslib.pyx":1812 * return trans_cache[tz] * * def _get_deltas(tz): # <<<<<<<<<<<<<< * """ * Get UTC offsets in microseconds corresponding to DST transitions */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); __Pyx_XDECREF(__pyx_t_10); __Pyx_XDECREF(__pyx_t_11); __Pyx_XDECREF(__pyx_t_12); __Pyx_XDECREF(__pyx_t_13); __Pyx_AddTraceback("pandas.tslib._get_deltas", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_num); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/tslib.pyx":1833 * return utc_offset_cache[tz] * * cdef double total_seconds(object td): # Python 2.6 compat # <<<<<<<<<<<<<< * return ((td.microseconds + (td.seconds + td.days * 24 * 3600) * 10**6) // * 10**6) */ static double __pyx_f_6pandas_5tslib_total_seconds(PyObject *__pyx_v_td) { double __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; double __pyx_t_5; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("total_seconds", 0); /* "pandas/tslib.pyx":1834 * * cdef double total_seconds(object td): # Python 2.6 compat * return ((td.microseconds + (td.seconds + td.days * 24 * 3600) * 10**6) // # <<<<<<<<<<<<<< * 10**6) * */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_td, __pyx_n_s_microseconds); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1834; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_td, __pyx_n_s_seconds); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1834; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_td, __pyx_n_s_days); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1834; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PyNumber_Multiply(__pyx_t_3, __pyx_int_24); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1834; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyNumber_Multiply(__pyx_t_4, __pyx_int_3600); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1834; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyNumber_Add(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1834; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyNumber_Multiply(__pyx_t_4, __pyx_int_1000000); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1834; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyNumber_Add(__pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1834; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyNumber_FloorDivide(__pyx_t_4, __pyx_int_1000000); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1834; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_5 = __pyx_PyFloat_AsDouble(__pyx_t_3); if (unlikely((__pyx_t_5 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1834; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_r = __pyx_t_5; goto __pyx_L0; /* "pandas/tslib.pyx":1833 * return utc_offset_cache[tz] * * cdef double total_seconds(object td): # Python 2.6 compat # <<<<<<<<<<<<<< * return ((td.microseconds + (td.seconds + td.days * 24 * 3600) * 10**6) // * 10**6) */ /* 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_WriteUnraisable("pandas.tslib.total_seconds", __pyx_clineno, __pyx_lineno, __pyx_filename, 0); __pyx_r = 0; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/tslib.pyx":1837 * 10**6) * * def tot_seconds(td): # <<<<<<<<<<<<<< * return total_seconds(td) * */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5tslib_53tot_seconds(PyObject *__pyx_self, PyObject *__pyx_v_td); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5tslib_53tot_seconds = {__Pyx_NAMESTR("tot_seconds"), (PyCFunction)__pyx_pw_6pandas_5tslib_53tot_seconds, METH_O, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5tslib_53tot_seconds(PyObject *__pyx_self, PyObject *__pyx_v_td) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("tot_seconds (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_5tslib_52tot_seconds(__pyx_self, ((PyObject *)__pyx_v_td)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5tslib_52tot_seconds(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_td) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("tot_seconds", 0); /* "pandas/tslib.pyx":1838 * * def tot_seconds(td): * return total_seconds(td) # <<<<<<<<<<<<<< * * cpdef ndarray _unbox_utcoffsets(object transinfo): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyFloat_FromDouble(__pyx_f_6pandas_5tslib_total_seconds(__pyx_v_td)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1838; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "pandas/tslib.pyx":1837 * 10**6) * * def tot_seconds(td): # <<<<<<<<<<<<<< * return total_seconds(td) * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas.tslib.tot_seconds", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/tslib.pyx":1840 * return total_seconds(td) * * cpdef ndarray _unbox_utcoffsets(object transinfo): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, sz */ static PyObject *__pyx_pw_6pandas_5tslib_55_unbox_utcoffsets(PyObject *__pyx_self, PyObject *__pyx_v_transinfo); /*proto*/ static PyArrayObject *__pyx_f_6pandas_5tslib__unbox_utcoffsets(PyObject *__pyx_v_transinfo, CYTHON_UNUSED int __pyx_skip_dispatch) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_sz; PyArrayObject *__pyx_v_arr = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_arr; __Pyx_Buffer __pyx_pybuffer_arr; PyArrayObject *__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; PyArrayObject *__pyx_t_6 = NULL; 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; __pyx_t_5numpy_int64_t __pyx_t_12; Py_ssize_t __pyx_t_13; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_unbox_utcoffsets", 0); __pyx_pybuffer_arr.pybuffer.buf = NULL; __pyx_pybuffer_arr.refcount = 0; __pyx_pybuffernd_arr.data = NULL; __pyx_pybuffernd_arr.rcbuffer = &__pyx_pybuffer_arr; /* "pandas/tslib.pyx":1845 * ndarray[int64_t] arr * * sz = len(transinfo) # <<<<<<<<<<<<<< * arr = np.empty(sz, dtype='i8') * */ __pyx_t_1 = PyObject_Length(__pyx_v_transinfo); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1845; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_sz = __pyx_t_1; /* "pandas/tslib.pyx":1846 * * sz = len(transinfo) * arr = np.empty(sz, dtype='i8') # <<<<<<<<<<<<<< * * for i in range(sz): */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1846; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 1846; __pyx_clineno = __LINE__; goto __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_sz); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1846; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1846; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1846; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_dtype, __pyx_n_s_i8) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1846; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_5 = PyObject_Call(__pyx_t_3, __pyx_t_4, __pyx_t_2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1846; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1846; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_6 = ((PyArrayObject *)__pyx_t_5); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_arr.rcbuffer->pybuffer); __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_arr.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_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_arr.rcbuffer->pybuffer, (PyObject*)__pyx_v_arr, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_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_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]; if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1846; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_6 = 0; __pyx_v_arr = ((PyArrayObject *)__pyx_t_5); __pyx_t_5 = 0; /* "pandas/tslib.pyx":1848 * arr = np.empty(sz, dtype='i8') * * for i in range(sz): # <<<<<<<<<<<<<< * arr[i] = int(total_seconds(transinfo[i][0])) * 1000000000 * */ __pyx_t_1 = __pyx_v_sz; for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_1; __pyx_t_11+=1) { __pyx_v_i = __pyx_t_11; /* "pandas/tslib.pyx":1849 * * for i in range(sz): * arr[i] = int(total_seconds(transinfo[i][0])) * 1000000000 # <<<<<<<<<<<<<< * * return arr */ __pyx_t_5 = __Pyx_GetItemInt(__pyx_v_transinfo, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(__pyx_t_5 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1849; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_5); __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_5, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1849; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyFloat_FromDouble(__pyx_f_6pandas_5tslib_total_seconds(__pyx_t_2)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1849; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1849; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyObject_Call(((PyObject *)((PyObject*)(&PyInt_Type))), __pyx_t_2, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1849; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyNumber_Multiply(__pyx_t_5, __pyx_int_1000000000); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1849; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_12 = __Pyx_PyInt_As_npy_int64(__pyx_t_2); if (unlikely((__pyx_t_12 == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1849; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_13 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_13 < 0) { __pyx_t_13 += __pyx_pybuffernd_arr.diminfo[0].shape; if (unlikely(__pyx_t_13 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_13 >= __pyx_pybuffernd_arr.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1849; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_arr.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_arr.diminfo[0].strides) = __pyx_t_12; } /* "pandas/tslib.pyx":1851 * arr[i] = int(total_seconds(transinfo[i][0])) * 1000000000 * * return arr # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(((PyObject *)__pyx_r)); __Pyx_INCREF(((PyObject *)__pyx_v_arr)); __pyx_r = ((PyArrayObject *)__pyx_v_arr); goto __pyx_L0; /* "pandas/tslib.pyx":1840 * return total_seconds(td) * * cpdef ndarray _unbox_utcoffsets(object transinfo): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, sz */ /* 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); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_arr.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.tslib._unbox_utcoffsets", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_arr.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_arr); __Pyx_XGIVEREF((PyObject *)__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5tslib_55_unbox_utcoffsets(PyObject *__pyx_self, PyObject *__pyx_v_transinfo); /*proto*/ static PyObject *__pyx_pw_6pandas_5tslib_55_unbox_utcoffsets(PyObject *__pyx_self, PyObject *__pyx_v_transinfo) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_unbox_utcoffsets (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_5tslib_54_unbox_utcoffsets(__pyx_self, ((PyObject *)__pyx_v_transinfo)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5tslib_54_unbox_utcoffsets(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_transinfo) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_unbox_utcoffsets", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = ((PyObject *)__pyx_f_6pandas_5tslib__unbox_utcoffsets(__pyx_v_transinfo, 0)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1840; __pyx_clineno = __LINE__; goto __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.tslib._unbox_utcoffsets", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/tslib.pyx":1856 * @cython.boundscheck(False) * @cython.wraparound(False) * def tz_localize_to_utc(ndarray[int64_t] vals, object tz, bint infer_dst=False): # <<<<<<<<<<<<<< * """ * Localize tzinfo-naive DateRange to given time zone (using pytz). If */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5tslib_57tz_localize_to_utc(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6pandas_5tslib_56tz_localize_to_utc[] = "\n Localize tzinfo-naive DateRange to given time zone (using pytz). If\n there are ambiguities in the values, raise AmbiguousTimeError.\n\n Returns\n -------\n localized : DatetimeIndex\n "; static PyMethodDef __pyx_mdef_6pandas_5tslib_57tz_localize_to_utc = {__Pyx_NAMESTR("tz_localize_to_utc"), (PyCFunction)__pyx_pw_6pandas_5tslib_57tz_localize_to_utc, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_5tslib_56tz_localize_to_utc)}; static PyObject *__pyx_pw_6pandas_5tslib_57tz_localize_to_utc(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_vals = 0; PyObject *__pyx_v_tz = 0; int __pyx_v_infer_dst; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("tz_localize_to_utc (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_vals,&__pyx_n_s_tz,&__pyx_n_s_infer_dst,0}; PyObject* values[3] = {0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_vals)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_tz)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("tz_localize_to_utc", 0, 2, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1856; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_infer_dst); if (value) { values[2] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "tz_localize_to_utc") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1856; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_vals = ((PyArrayObject *)values[0]); __pyx_v_tz = values[1]; if (values[2]) { __pyx_v_infer_dst = __Pyx_PyObject_IsTrue(values[2]); if (unlikely((__pyx_v_infer_dst == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1856; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } else { __pyx_v_infer_dst = ((int)0); } } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("tz_localize_to_utc", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1856; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.tslib.tz_localize_to_utc", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_vals), __pyx_ptype_5numpy_ndarray, 1, "vals", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1856; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5tslib_56tz_localize_to_utc(__pyx_self, __pyx_v_vals, __pyx_v_tz, __pyx_v_infer_dst); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5tslib_56tz_localize_to_utc(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_vals, PyObject *__pyx_v_tz, int __pyx_v_infer_dst) { PyArrayObject *__pyx_v_trans = 0; PyArrayObject *__pyx_v_deltas = 0; PyArrayObject *__pyx_v_idx_shifted = 0; Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_pos; Py_ssize_t __pyx_v_ntrans; Py_ssize_t __pyx_v_n; __pyx_t_5numpy_int64_t *__pyx_v_tdata; __pyx_t_5numpy_int64_t __pyx_v_v; __pyx_t_5numpy_int64_t __pyx_v_left; __pyx_t_5numpy_int64_t __pyx_v_right; PyArrayObject *__pyx_v_result = 0; PyArrayObject *__pyx_v_result_a = 0; PyArrayObject *__pyx_v_result_b = 0; PyArrayObject *__pyx_v_dst_hours = 0; pandas_datetimestruct __pyx_v_dts; PyDateTime_DateTime *__pyx_v_dt = NULL; PyObject *__pyx_v_delta = NULL; PyObject *__pyx_v_both_nat = NULL; PyObject *__pyx_v_both_eq = NULL; PyObject *__pyx_v_trans_idx = NULL; PyObject *__pyx_v_stamp = NULL; PyObject *__pyx_v_one_diff = NULL; PyObject *__pyx_v_trans_grp = NULL; PyObject *__pyx_v_grp = NULL; PyObject *__pyx_v_switch_idx = NULL; PyObject *__pyx_v_a_idx = NULL; PyObject *__pyx_v_b_idx = NULL; __Pyx_LocalBuf_ND __pyx_pybuffernd_deltas; __Pyx_Buffer __pyx_pybuffer_deltas; __Pyx_LocalBuf_ND __pyx_pybuffernd_dst_hours; __Pyx_Buffer __pyx_pybuffer_dst_hours; __Pyx_LocalBuf_ND __pyx_pybuffernd_idx_shifted; __Pyx_Buffer __pyx_pybuffer_idx_shifted; __Pyx_LocalBuf_ND __pyx_pybuffernd_result; __Pyx_Buffer __pyx_pybuffer_result; __Pyx_LocalBuf_ND __pyx_pybuffernd_result_a; __Pyx_Buffer __pyx_pybuffer_result_a; __Pyx_LocalBuf_ND __pyx_pybuffernd_result_b; __Pyx_Buffer __pyx_pybuffer_result_b; __Pyx_LocalBuf_ND __pyx_pybuffernd_trans; __Pyx_Buffer __pyx_pybuffer_trans; __Pyx_LocalBuf_ND __pyx_pybuffernd_vals; __Pyx_Buffer __pyx_pybuffer_vals; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; PyObject *__pyx_t_2 = NULL; int __pyx_t_3; int __pyx_t_4; PyObject *__pyx_t_5 = NULL; int __pyx_t_6; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; PyArrayObject *__pyx_t_10 = NULL; int __pyx_t_11; PyObject *__pyx_t_12 = NULL; PyObject *__pyx_t_13 = NULL; PyObject *__pyx_t_14 = NULL; Py_ssize_t __pyx_t_15; Py_ssize_t __pyx_t_16; PyObject *__pyx_t_17 = NULL; PyObject *__pyx_t_18 = NULL; PyObject *__pyx_t_19 = NULL; __pyx_t_5numpy_int64_t __pyx_t_20; Py_ssize_t __pyx_t_21; PyArrayObject *__pyx_t_22 = NULL; 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; __pyx_t_5numpy_int64_t __pyx_t_30; Py_ssize_t __pyx_t_31; Py_ssize_t __pyx_t_32; Py_ssize_t __pyx_t_33; PyObject *(*__pyx_t_34)(PyObject *); Py_ssize_t __pyx_t_35; Py_ssize_t __pyx_t_36; Py_ssize_t __pyx_t_37; Py_ssize_t __pyx_t_38; Py_ssize_t __pyx_t_39; Py_ssize_t __pyx_t_40; Py_ssize_t __pyx_t_41; Py_ssize_t __pyx_t_42; Py_ssize_t __pyx_t_43; Py_ssize_t __pyx_t_44; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("tz_localize_to_utc", 0); __pyx_pybuffer_trans.pybuffer.buf = NULL; __pyx_pybuffer_trans.refcount = 0; __pyx_pybuffernd_trans.data = NULL; __pyx_pybuffernd_trans.rcbuffer = &__pyx_pybuffer_trans; __pyx_pybuffer_deltas.pybuffer.buf = NULL; __pyx_pybuffer_deltas.refcount = 0; __pyx_pybuffernd_deltas.data = NULL; __pyx_pybuffernd_deltas.rcbuffer = &__pyx_pybuffer_deltas; __pyx_pybuffer_idx_shifted.pybuffer.buf = NULL; __pyx_pybuffer_idx_shifted.refcount = 0; __pyx_pybuffernd_idx_shifted.data = NULL; __pyx_pybuffernd_idx_shifted.rcbuffer = &__pyx_pybuffer_idx_shifted; __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_result_a.pybuffer.buf = NULL; __pyx_pybuffer_result_a.refcount = 0; __pyx_pybuffernd_result_a.data = NULL; __pyx_pybuffernd_result_a.rcbuffer = &__pyx_pybuffer_result_a; __pyx_pybuffer_result_b.pybuffer.buf = NULL; __pyx_pybuffer_result_b.refcount = 0; __pyx_pybuffernd_result_b.data = NULL; __pyx_pybuffernd_result_b.rcbuffer = &__pyx_pybuffer_result_b; __pyx_pybuffer_dst_hours.pybuffer.buf = NULL; __pyx_pybuffer_dst_hours.refcount = 0; __pyx_pybuffernd_dst_hours.data = NULL; __pyx_pybuffernd_dst_hours.rcbuffer = &__pyx_pybuffer_dst_hours; __pyx_pybuffer_vals.pybuffer.buf = NULL; __pyx_pybuffer_vals.refcount = 0; __pyx_pybuffernd_vals.data = NULL; __pyx_pybuffernd_vals.rcbuffer = &__pyx_pybuffer_vals; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_vals.rcbuffer->pybuffer, (PyObject*)__pyx_v_vals, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1856; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_vals.diminfo[0].strides = __pyx_pybuffernd_vals.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_vals.diminfo[0].shape = __pyx_pybuffernd_vals.rcbuffer->pybuffer.shape[0]; /* "pandas/tslib.pyx":1867 * cdef: * ndarray[int64_t] trans, deltas, idx_shifted * Py_ssize_t i, idx, pos, ntrans, n = len(vals) # <<<<<<<<<<<<<< * int64_t *tdata * int64_t v, left, right */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_vals)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1867; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/tslib.pyx":1875 * # Vectorized version of DstTzInfo.localize * * if not have_pytz: # <<<<<<<<<<<<<< * raise Exception("Could not find pytz module") * */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_have_pytz); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1875; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1875; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_4 = ((!__pyx_t_3) != 0); if (__pyx_t_4) { /* "pandas/tslib.pyx":1876 * * if not have_pytz: * raise Exception("Could not find pytz module") # <<<<<<<<<<<<<< * * if tz == UTC or tz is None: */ __pyx_t_2 = PyObject_Call(__pyx_builtin_Exception, __pyx_tuple__47, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1876; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 1876; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } /* "pandas/tslib.pyx":1878 * raise Exception("Could not find pytz module") * * if tz == UTC or tz is None: # <<<<<<<<<<<<<< * return vals * */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_UTC); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1878; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = PyObject_RichCompare(__pyx_v_tz, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1878; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1878; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (!__pyx_t_4) { __pyx_t_3 = (__pyx_v_tz == Py_None); __pyx_t_6 = __pyx_t_3; } else { __pyx_t_6 = __pyx_t_4; } if (__pyx_t_6) { /* "pandas/tslib.pyx":1879 * * if tz == UTC or tz is None: * return vals # <<<<<<<<<<<<<< * * result = np.empty(n, dtype=np.int64) */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_vals)); __pyx_r = ((PyObject *)__pyx_v_vals); goto __pyx_L0; } /* "pandas/tslib.pyx":1881 * return vals * * result = np.empty(n, dtype=np.int64) # <<<<<<<<<<<<<< * * if _is_tzlocal(tz): */ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1881; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_empty); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1881; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyInt_FromSsize_t(__pyx_v_n); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1881; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1881; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyDict_New(); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1881; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1881; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 1881; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 1881; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_9 = PyObject_Call(__pyx_t_2, __pyx_t_7, __pyx_t_5); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1881; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 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_filename = __pyx_f[0]; __pyx_lineno = 1881; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_10 = ((PyArrayObject *)__pyx_t_9); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __pyx_t_11 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.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_11 < 0)) { PyErr_Fetch(&__pyx_t_12, &__pyx_t_13, &__pyx_t_14); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_v_result, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_12); Py_XDECREF(__pyx_t_13); Py_XDECREF(__pyx_t_14); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_12, __pyx_t_13, __pyx_t_14); } } __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_11 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1881; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_10 = 0; __pyx_v_result = ((PyArrayObject *)__pyx_t_9); __pyx_t_9 = 0; /* "pandas/tslib.pyx":1883 * result = np.empty(n, dtype=np.int64) * * if _is_tzlocal(tz): # <<<<<<<<<<<<<< * for i in range(n): * v = vals[i] */ __pyx_t_9 = __Pyx_GetModuleGlobalName(__pyx_n_s_is_tzlocal); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1883; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1883; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_v_tz); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_tz); __Pyx_GIVEREF(__pyx_v_tz); __pyx_t_7 = PyObject_Call(__pyx_t_9, __pyx_t_5, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1883; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1883; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (__pyx_t_6) { /* "pandas/tslib.pyx":1884 * * if _is_tzlocal(tz): * for i in range(n): # <<<<<<<<<<<<<< * v = vals[i] * pandas_datetime_to_datetimestruct(v, PANDAS_FR_ns, &dts) */ __pyx_t_1 = __pyx_v_n; for (__pyx_t_15 = 0; __pyx_t_15 < __pyx_t_1; __pyx_t_15+=1) { __pyx_v_i = __pyx_t_15; /* "pandas/tslib.pyx":1885 * if _is_tzlocal(tz): * for i in range(n): * v = vals[i] # <<<<<<<<<<<<<< * pandas_datetime_to_datetimestruct(v, PANDAS_FR_ns, &dts) * dt = datetime(dts.year, dts.month, dts.day, dts.hour, */ __pyx_t_16 = __pyx_v_i; __pyx_v_v = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_vals.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_vals.diminfo[0].strides)); /* "pandas/tslib.pyx":1886 * for i in range(n): * v = vals[i] * pandas_datetime_to_datetimestruct(v, PANDAS_FR_ns, &dts) # <<<<<<<<<<<<<< * dt = datetime(dts.year, dts.month, dts.day, dts.hour, * dts.min, dts.sec, dts.us, tz) */ pandas_datetime_to_datetimestruct(__pyx_v_v, PANDAS_FR_ns, (&__pyx_v_dts)); /* "pandas/tslib.pyx":1887 * v = vals[i] * pandas_datetime_to_datetimestruct(v, PANDAS_FR_ns, &dts) * dt = datetime(dts.year, dts.month, dts.day, dts.hour, # <<<<<<<<<<<<<< * dts.min, dts.sec, dts.us, tz) * delta = int(total_seconds(_get_utcoffset(tz, dt))) * 1000000000 */ __pyx_t_7 = __Pyx_PyInt_From_npy_int64(__pyx_v_dts.year); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1887; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_t_5 = __Pyx_PyInt_From_npy_int32(__pyx_v_dts.month); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1887; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_9 = __Pyx_PyInt_From_npy_int32(__pyx_v_dts.day); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1887; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_t_2 = __Pyx_PyInt_From_npy_int32(__pyx_v_dts.hour); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1887; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); /* "pandas/tslib.pyx":1888 * pandas_datetime_to_datetimestruct(v, PANDAS_FR_ns, &dts) * dt = datetime(dts.year, dts.month, dts.day, dts.hour, * dts.min, dts.sec, dts.us, tz) # <<<<<<<<<<<<<< * delta = int(total_seconds(_get_utcoffset(tz, dt))) * 1000000000 * result[i] = v - delta */ __pyx_t_8 = __Pyx_PyInt_From_npy_int32(__pyx_v_dts.min); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1888; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_17 = __Pyx_PyInt_From_npy_int32(__pyx_v_dts.sec); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1888; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_17); __pyx_t_18 = __Pyx_PyInt_From_npy_int32(__pyx_v_dts.us); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1888; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); /* "pandas/tslib.pyx":1887 * v = vals[i] * pandas_datetime_to_datetimestruct(v, PANDAS_FR_ns, &dts) * dt = datetime(dts.year, dts.month, dts.day, dts.hour, # <<<<<<<<<<<<<< * dts.min, dts.sec, dts.us, tz) * delta = int(total_seconds(_get_utcoffset(tz, dt))) * 1000000000 */ __pyx_t_19 = PyTuple_New(8); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1887; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_19); PyTuple_SET_ITEM(__pyx_t_19, 0, __pyx_t_7); __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_19, 1, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_19, 2, __pyx_t_9); __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_19, 3, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_19, 4, __pyx_t_8); __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_19, 5, __pyx_t_17); __Pyx_GIVEREF(__pyx_t_17); PyTuple_SET_ITEM(__pyx_t_19, 6, __pyx_t_18); __Pyx_GIVEREF(__pyx_t_18); __Pyx_INCREF(__pyx_v_tz); PyTuple_SET_ITEM(__pyx_t_19, 7, __pyx_v_tz); __Pyx_GIVEREF(__pyx_v_tz); __pyx_t_7 = 0; __pyx_t_5 = 0; __pyx_t_9 = 0; __pyx_t_2 = 0; __pyx_t_8 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_18 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_8datetime_datetime)), __pyx_t_19, NULL); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1887; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0; __Pyx_XDECREF_SET(__pyx_v_dt, ((PyDateTime_DateTime *)__pyx_t_18)); __pyx_t_18 = 0; /* "pandas/tslib.pyx":1889 * dt = datetime(dts.year, dts.month, dts.day, dts.hour, * dts.min, dts.sec, dts.us, tz) * delta = int(total_seconds(_get_utcoffset(tz, dt))) * 1000000000 # <<<<<<<<<<<<<< * result[i] = v - delta * return result */ __pyx_t_18 = __pyx_f_6pandas_5tslib__get_utcoffset(__pyx_v_tz, ((PyObject *)__pyx_v_dt), 0); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1889; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); __pyx_t_19 = PyFloat_FromDouble(__pyx_f_6pandas_5tslib_total_seconds(__pyx_t_18)); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1889; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_19); __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; __pyx_t_18 = PyTuple_New(1); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1889; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); PyTuple_SET_ITEM(__pyx_t_18, 0, __pyx_t_19); __Pyx_GIVEREF(__pyx_t_19); __pyx_t_19 = 0; __pyx_t_19 = PyObject_Call(((PyObject *)((PyObject*)(&PyInt_Type))), __pyx_t_18, NULL); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1889; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_19); __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; __pyx_t_18 = PyNumber_Multiply(__pyx_t_19, __pyx_int_1000000000); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1889; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0; __Pyx_XDECREF_SET(__pyx_v_delta, __pyx_t_18); __pyx_t_18 = 0; /* "pandas/tslib.pyx":1890 * dts.min, dts.sec, dts.us, tz) * delta = int(total_seconds(_get_utcoffset(tz, dt))) * 1000000000 * result[i] = v - delta # <<<<<<<<<<<<<< * return result * */ __pyx_t_18 = __Pyx_PyInt_From_npy_int64(__pyx_v_v); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1890; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); __pyx_t_19 = PyNumber_Subtract(__pyx_t_18, __pyx_v_delta); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1890; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_19); __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; __pyx_t_20 = __Pyx_PyInt_As_npy_int64(__pyx_t_19); if (unlikely((__pyx_t_20 == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1890; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0; __pyx_t_21 = __pyx_v_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_result.diminfo[0].strides) = __pyx_t_20; } /* "pandas/tslib.pyx":1891 * delta = int(total_seconds(_get_utcoffset(tz, dt))) * 1000000000 * result[i] = v - delta * return result # <<<<<<<<<<<<<< * * trans = _get_transitions(tz) # transition dates */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_result)); __pyx_r = ((PyObject *)__pyx_v_result); goto __pyx_L0; } /* "pandas/tslib.pyx":1893 * return result * * trans = _get_transitions(tz) # transition dates # <<<<<<<<<<<<<< * deltas = _get_deltas(tz) # utc offsets * */ __pyx_t_19 = __Pyx_GetModuleGlobalName(__pyx_n_s_get_transitions); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1893; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_19); __pyx_t_18 = PyTuple_New(1); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1893; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); __Pyx_INCREF(__pyx_v_tz); PyTuple_SET_ITEM(__pyx_t_18, 0, __pyx_v_tz); __Pyx_GIVEREF(__pyx_v_tz); __pyx_t_17 = PyObject_Call(__pyx_t_19, __pyx_t_18, NULL); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1893; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_17); __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0; __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; if (!(likely(((__pyx_t_17) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_17, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1893; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_22 = ((PyArrayObject *)__pyx_t_17); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_trans.rcbuffer->pybuffer); __pyx_t_11 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_trans.rcbuffer->pybuffer, (PyObject*)__pyx_t_22, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_11 < 0)) { PyErr_Fetch(&__pyx_t_14, &__pyx_t_13, &__pyx_t_12); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_trans.rcbuffer->pybuffer, (PyObject*)__pyx_v_trans, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_14); Py_XDECREF(__pyx_t_13); Py_XDECREF(__pyx_t_12); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_14, __pyx_t_13, __pyx_t_12); } } __pyx_pybuffernd_trans.diminfo[0].strides = __pyx_pybuffernd_trans.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_trans.diminfo[0].shape = __pyx_pybuffernd_trans.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_11 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1893; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_22 = 0; __pyx_v_trans = ((PyArrayObject *)__pyx_t_17); __pyx_t_17 = 0; /* "pandas/tslib.pyx":1894 * * trans = _get_transitions(tz) # transition dates * deltas = _get_deltas(tz) # utc offsets # <<<<<<<<<<<<<< * * tdata = trans.data */ __pyx_t_17 = __Pyx_GetModuleGlobalName(__pyx_n_s_get_deltas); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1894; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_17); __pyx_t_18 = PyTuple_New(1); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1894; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); __Pyx_INCREF(__pyx_v_tz); PyTuple_SET_ITEM(__pyx_t_18, 0, __pyx_v_tz); __Pyx_GIVEREF(__pyx_v_tz); __pyx_t_19 = PyObject_Call(__pyx_t_17, __pyx_t_18, NULL); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1894; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_19); __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; if (!(likely(((__pyx_t_19) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_19, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1894; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_22 = ((PyArrayObject *)__pyx_t_19); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_deltas.rcbuffer->pybuffer); __pyx_t_11 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_deltas.rcbuffer->pybuffer, (PyObject*)__pyx_t_22, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_11 < 0)) { PyErr_Fetch(&__pyx_t_12, &__pyx_t_13, &__pyx_t_14); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_deltas.rcbuffer->pybuffer, (PyObject*)__pyx_v_deltas, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_12); Py_XDECREF(__pyx_t_13); Py_XDECREF(__pyx_t_14); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_12, __pyx_t_13, __pyx_t_14); } } __pyx_pybuffernd_deltas.diminfo[0].strides = __pyx_pybuffernd_deltas.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_deltas.diminfo[0].shape = __pyx_pybuffernd_deltas.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_11 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1894; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_22 = 0; __pyx_v_deltas = ((PyArrayObject *)__pyx_t_19); __pyx_t_19 = 0; /* "pandas/tslib.pyx":1896 * deltas = _get_deltas(tz) # utc offsets * * tdata = trans.data # <<<<<<<<<<<<<< * ntrans = len(trans) * */ __pyx_v_tdata = ((__pyx_t_5numpy_int64_t *)__pyx_v_trans->data); /* "pandas/tslib.pyx":1897 * * tdata = trans.data * ntrans = len(trans) # <<<<<<<<<<<<<< * * result_a = np.empty(n, dtype=np.int64) */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_trans)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1897; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_ntrans = __pyx_t_1; /* "pandas/tslib.pyx":1899 * ntrans = len(trans) * * result_a = np.empty(n, dtype=np.int64) # <<<<<<<<<<<<<< * result_b = np.empty(n, dtype=np.int64) * result_a.fill(NPY_NAT) */ __pyx_t_19 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1899; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_19); __pyx_t_18 = __Pyx_PyObject_GetAttrStr(__pyx_t_19, __pyx_n_s_empty); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1899; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0; __pyx_t_19 = PyInt_FromSsize_t(__pyx_v_n); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1899; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_19); __pyx_t_17 = PyTuple_New(1); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1899; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_17); PyTuple_SET_ITEM(__pyx_t_17, 0, __pyx_t_19); __Pyx_GIVEREF(__pyx_t_19); __pyx_t_19 = 0; __pyx_t_19 = PyDict_New(); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1899; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_19); __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1899; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_int64); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1899; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (PyDict_SetItem(__pyx_t_19, __pyx_n_s_dtype, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1899; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_Call(__pyx_t_18, __pyx_t_17, __pyx_t_19); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1899; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0; if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1899; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_10 = ((PyArrayObject *)__pyx_t_2); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result_a.rcbuffer->pybuffer); __pyx_t_11 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result_a.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_11 < 0)) { PyErr_Fetch(&__pyx_t_14, &__pyx_t_13, &__pyx_t_12); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result_a.rcbuffer->pybuffer, (PyObject*)__pyx_v_result_a, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_14); Py_XDECREF(__pyx_t_13); Py_XDECREF(__pyx_t_12); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_14, __pyx_t_13, __pyx_t_12); } } __pyx_pybuffernd_result_a.diminfo[0].strides = __pyx_pybuffernd_result_a.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_result_a.diminfo[0].shape = __pyx_pybuffernd_result_a.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_11 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1899; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_10 = 0; __pyx_v_result_a = ((PyArrayObject *)__pyx_t_2); __pyx_t_2 = 0; /* "pandas/tslib.pyx":1900 * * result_a = np.empty(n, dtype=np.int64) * result_b = np.empty(n, dtype=np.int64) # <<<<<<<<<<<<<< * result_a.fill(NPY_NAT) * result_b.fill(NPY_NAT) */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1900; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_19 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_empty); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1900; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_19); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_n); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1900; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_17 = PyTuple_New(1); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1900; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_17); PyTuple_SET_ITEM(__pyx_t_17, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1900; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_18 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1900; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_18, __pyx_n_s_int64); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1900; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_dtype, __pyx_t_8) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1900; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_8 = PyObject_Call(__pyx_t_19, __pyx_t_17, __pyx_t_2); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1900; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0; __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (!(likely(((__pyx_t_8) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_8, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1900; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_10 = ((PyArrayObject *)__pyx_t_8); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result_b.rcbuffer->pybuffer); __pyx_t_11 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result_b.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_11 < 0)) { PyErr_Fetch(&__pyx_t_12, &__pyx_t_13, &__pyx_t_14); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result_b.rcbuffer->pybuffer, (PyObject*)__pyx_v_result_b, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_12); Py_XDECREF(__pyx_t_13); Py_XDECREF(__pyx_t_14); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_12, __pyx_t_13, __pyx_t_14); } } __pyx_pybuffernd_result_b.diminfo[0].strides = __pyx_pybuffernd_result_b.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_result_b.diminfo[0].shape = __pyx_pybuffernd_result_b.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_11 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1900; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_10 = 0; __pyx_v_result_b = ((PyArrayObject *)__pyx_t_8); __pyx_t_8 = 0; /* "pandas/tslib.pyx":1901 * result_a = np.empty(n, dtype=np.int64) * result_b = np.empty(n, dtype=np.int64) * result_a.fill(NPY_NAT) # <<<<<<<<<<<<<< * result_b.fill(NPY_NAT) * */ __pyx_t_8 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_result_a), __pyx_n_s_fill); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1901; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_2 = __Pyx_PyInt_From_npy_int64(__pyx_v_6pandas_5tslib_NPY_NAT); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1901; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_17 = PyTuple_New(1); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1901; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_17); PyTuple_SET_ITEM(__pyx_t_17, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_Call(__pyx_t_8, __pyx_t_17, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1901; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/tslib.pyx":1902 * result_b = np.empty(n, dtype=np.int64) * result_a.fill(NPY_NAT) * result_b.fill(NPY_NAT) # <<<<<<<<<<<<<< * * # left side */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_result_b), __pyx_n_s_fill); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1902; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_17 = __Pyx_PyInt_From_npy_int64(__pyx_v_6pandas_5tslib_NPY_NAT); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1902; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_17); __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1902; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_17); __Pyx_GIVEREF(__pyx_t_17); __pyx_t_17 = 0; __pyx_t_17 = PyObject_Call(__pyx_t_2, __pyx_t_8, NULL); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1902; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_17); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; /* "pandas/tslib.pyx":1906 * # left side * idx_shifted = _ensure_int64( * np.maximum(0, trans.searchsorted(vals - DAY_NS, side='right') - 1)) # <<<<<<<<<<<<<< * * for i in range(n): */ __pyx_t_17 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1906; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_17); __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_17, __pyx_n_s_maximum); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1906; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; __pyx_t_17 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_trans), __pyx_n_s_searchsorted); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1906; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_17); __pyx_t_2 = __Pyx_PyInt_From_npy_int64(__pyx_v_6pandas_5tslib_DAY_NS); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1906; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_19 = PyNumber_Subtract(((PyObject *)__pyx_v_vals), __pyx_t_2); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1906; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_19); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1906; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_19); __Pyx_GIVEREF(__pyx_t_19); __pyx_t_19 = 0; __pyx_t_19 = PyDict_New(); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1906; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_19); if (PyDict_SetItem(__pyx_t_19, __pyx_n_s_side, __pyx_n_s_right) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1906; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_18 = PyObject_Call(__pyx_t_17, __pyx_t_2, __pyx_t_19); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1906; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0; __pyx_t_19 = PyNumber_Subtract(__pyx_t_18, __pyx_int_1); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1906; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_19); __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; __pyx_t_18 = PyTuple_New(2); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1906; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); __Pyx_INCREF(__pyx_int_0); PyTuple_SET_ITEM(__pyx_t_18, 0, __pyx_int_0); __Pyx_GIVEREF(__pyx_int_0); PyTuple_SET_ITEM(__pyx_t_18, 1, __pyx_t_19); __Pyx_GIVEREF(__pyx_t_19); __pyx_t_19 = 0; __pyx_t_19 = PyObject_Call(__pyx_t_8, __pyx_t_18, NULL); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1906; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_19); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; /* "pandas/tslib.pyx":1905 * * # left side * idx_shifted = _ensure_int64( # <<<<<<<<<<<<<< * np.maximum(0, trans.searchsorted(vals - DAY_NS, side='right') - 1)) * */ __pyx_t_18 = __pyx_f_6pandas_5tslib__ensure_int64(__pyx_t_19); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1905; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0; if (!(likely(((__pyx_t_18) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_18, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1905; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_22 = ((PyArrayObject *)__pyx_t_18); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_idx_shifted.rcbuffer->pybuffer); __pyx_t_11 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_idx_shifted.rcbuffer->pybuffer, (PyObject*)__pyx_t_22, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_11 < 0)) { PyErr_Fetch(&__pyx_t_14, &__pyx_t_13, &__pyx_t_12); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_idx_shifted.rcbuffer->pybuffer, (PyObject*)__pyx_v_idx_shifted, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_14); Py_XDECREF(__pyx_t_13); Py_XDECREF(__pyx_t_12); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_14, __pyx_t_13, __pyx_t_12); } } __pyx_pybuffernd_idx_shifted.diminfo[0].strides = __pyx_pybuffernd_idx_shifted.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_idx_shifted.diminfo[0].shape = __pyx_pybuffernd_idx_shifted.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_11 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1905; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_22 = 0; __pyx_v_idx_shifted = ((PyArrayObject *)__pyx_t_18); __pyx_t_18 = 0; /* "pandas/tslib.pyx":1908 * np.maximum(0, trans.searchsorted(vals - DAY_NS, side='right') - 1)) * * for i in range(n): # <<<<<<<<<<<<<< * v = vals[i] - deltas[idx_shifted[i]] * pos = bisect_right_i8(tdata, v, ntrans) - 1 */ __pyx_t_1 = __pyx_v_n; for (__pyx_t_15 = 0; __pyx_t_15 < __pyx_t_1; __pyx_t_15+=1) { __pyx_v_i = __pyx_t_15; /* "pandas/tslib.pyx":1909 * * for i in range(n): * v = vals[i] - deltas[idx_shifted[i]] # <<<<<<<<<<<<<< * pos = bisect_right_i8(tdata, v, ntrans) - 1 * */ __pyx_t_23 = __pyx_v_i; __pyx_t_24 = __pyx_v_i; __pyx_t_20 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_idx_shifted.rcbuffer->pybuffer.buf, __pyx_t_24, __pyx_pybuffernd_idx_shifted.diminfo[0].strides)); __pyx_v_v = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_vals.rcbuffer->pybuffer.buf, __pyx_t_23, __pyx_pybuffernd_vals.diminfo[0].strides)) - (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_deltas.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_deltas.diminfo[0].strides))); /* "pandas/tslib.pyx":1910 * for i in range(n): * v = vals[i] - deltas[idx_shifted[i]] * pos = bisect_right_i8(tdata, v, ntrans) - 1 # <<<<<<<<<<<<<< * * # timestamp falls to the left side of the DST transition */ __pyx_t_18 = __pyx_f_6pandas_5tslib_bisect_right_i8(__pyx_v_tdata, __pyx_v_v, __pyx_v_ntrans); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1910; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); __pyx_t_19 = PyNumber_Subtract(__pyx_t_18, __pyx_int_1); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1910; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_19); __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; __pyx_t_25 = __Pyx_PyIndex_AsSsize_t(__pyx_t_19); if (unlikely((__pyx_t_25 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1910; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0; __pyx_v_pos = __pyx_t_25; /* "pandas/tslib.pyx":1913 * * # timestamp falls to the left side of the DST transition * if v + deltas[pos] == vals[i]: # <<<<<<<<<<<<<< * result_a[i] = v * */ __pyx_t_25 = __pyx_v_pos; __pyx_t_26 = __pyx_v_i; __pyx_t_6 = (((__pyx_v_v + (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_deltas.rcbuffer->pybuffer.buf, __pyx_t_25, __pyx_pybuffernd_deltas.diminfo[0].strides))) == (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_vals.rcbuffer->pybuffer.buf, __pyx_t_26, __pyx_pybuffernd_vals.diminfo[0].strides))) != 0); if (__pyx_t_6) { /* "pandas/tslib.pyx":1914 * # timestamp falls to the left side of the DST transition * if v + deltas[pos] == vals[i]: * result_a[i] = v # <<<<<<<<<<<<<< * * # right side */ __pyx_t_27 = __pyx_v_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_result_a.rcbuffer->pybuffer.buf, __pyx_t_27, __pyx_pybuffernd_result_a.diminfo[0].strides) = __pyx_v_v; goto __pyx_L10; } __pyx_L10:; } /* "pandas/tslib.pyx":1918 * # right side * idx_shifted = _ensure_int64( * np.maximum(0, trans.searchsorted(vals + DAY_NS, side='right') - 1)) # <<<<<<<<<<<<<< * * for i in range(n): */ __pyx_t_19 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1918; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_19); __pyx_t_18 = __Pyx_PyObject_GetAttrStr(__pyx_t_19, __pyx_n_s_maximum); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1918; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0; __pyx_t_19 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_trans), __pyx_n_s_searchsorted); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1918; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_19); __pyx_t_8 = __Pyx_PyInt_From_npy_int64(__pyx_v_6pandas_5tslib_DAY_NS); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1918; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_2 = PyNumber_Add(((PyObject *)__pyx_v_vals), __pyx_t_8); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1918; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1918; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1918; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_side, __pyx_n_s_right) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1918; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_17 = PyObject_Call(__pyx_t_19, __pyx_t_8, __pyx_t_2); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1918; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_17); __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyNumber_Subtract(__pyx_t_17, __pyx_int_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1918; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; __pyx_t_17 = PyTuple_New(2); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1918; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_17); __Pyx_INCREF(__pyx_int_0); PyTuple_SET_ITEM(__pyx_t_17, 0, __pyx_int_0); __Pyx_GIVEREF(__pyx_int_0); PyTuple_SET_ITEM(__pyx_t_17, 1, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_Call(__pyx_t_18, __pyx_t_17, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1918; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; /* "pandas/tslib.pyx":1917 * * # right side * idx_shifted = _ensure_int64( # <<<<<<<<<<<<<< * np.maximum(0, trans.searchsorted(vals + DAY_NS, side='right') - 1)) * */ __pyx_t_17 = __pyx_f_6pandas_5tslib__ensure_int64(__pyx_t_2); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1917; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_17); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (!(likely(((__pyx_t_17) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_17, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1917; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_22 = ((PyArrayObject *)__pyx_t_17); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_idx_shifted.rcbuffer->pybuffer); __pyx_t_11 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_idx_shifted.rcbuffer->pybuffer, (PyObject*)__pyx_t_22, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_11 < 0)) { PyErr_Fetch(&__pyx_t_12, &__pyx_t_13, &__pyx_t_14); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_idx_shifted.rcbuffer->pybuffer, (PyObject*)__pyx_v_idx_shifted, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_12); Py_XDECREF(__pyx_t_13); Py_XDECREF(__pyx_t_14); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_12, __pyx_t_13, __pyx_t_14); } } __pyx_pybuffernd_idx_shifted.diminfo[0].strides = __pyx_pybuffernd_idx_shifted.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_idx_shifted.diminfo[0].shape = __pyx_pybuffernd_idx_shifted.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_11 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1917; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_22 = 0; __Pyx_DECREF_SET(__pyx_v_idx_shifted, ((PyArrayObject *)__pyx_t_17)); __pyx_t_17 = 0; /* "pandas/tslib.pyx":1920 * np.maximum(0, trans.searchsorted(vals + DAY_NS, side='right') - 1)) * * for i in range(n): # <<<<<<<<<<<<<< * v = vals[i] - deltas[idx_shifted[i]] * pos = bisect_right_i8(tdata, v, ntrans) - 1 */ __pyx_t_1 = __pyx_v_n; for (__pyx_t_15 = 0; __pyx_t_15 < __pyx_t_1; __pyx_t_15+=1) { __pyx_v_i = __pyx_t_15; /* "pandas/tslib.pyx":1921 * * for i in range(n): * v = vals[i] - deltas[idx_shifted[i]] # <<<<<<<<<<<<<< * pos = bisect_right_i8(tdata, v, ntrans) - 1 * */ __pyx_t_28 = __pyx_v_i; __pyx_t_29 = __pyx_v_i; __pyx_t_30 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_idx_shifted.rcbuffer->pybuffer.buf, __pyx_t_29, __pyx_pybuffernd_idx_shifted.diminfo[0].strides)); __pyx_v_v = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_vals.rcbuffer->pybuffer.buf, __pyx_t_28, __pyx_pybuffernd_vals.diminfo[0].strides)) - (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_deltas.rcbuffer->pybuffer.buf, __pyx_t_30, __pyx_pybuffernd_deltas.diminfo[0].strides))); /* "pandas/tslib.pyx":1922 * for i in range(n): * v = vals[i] - deltas[idx_shifted[i]] * pos = bisect_right_i8(tdata, v, ntrans) - 1 # <<<<<<<<<<<<<< * * # timestamp falls to the right side of the DST transition */ __pyx_t_17 = __pyx_f_6pandas_5tslib_bisect_right_i8(__pyx_v_tdata, __pyx_v_v, __pyx_v_ntrans); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1922; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_17); __pyx_t_2 = PyNumber_Subtract(__pyx_t_17, __pyx_int_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1922; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; __pyx_t_31 = __Pyx_PyIndex_AsSsize_t(__pyx_t_2); if (unlikely((__pyx_t_31 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1922; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_pos = __pyx_t_31; /* "pandas/tslib.pyx":1925 * * # timestamp falls to the right side of the DST transition * if v + deltas[pos] == vals[i]: # <<<<<<<<<<<<<< * result_b[i] = v * */ __pyx_t_31 = __pyx_v_pos; __pyx_t_32 = __pyx_v_i; __pyx_t_6 = (((__pyx_v_v + (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_deltas.rcbuffer->pybuffer.buf, __pyx_t_31, __pyx_pybuffernd_deltas.diminfo[0].strides))) == (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_vals.rcbuffer->pybuffer.buf, __pyx_t_32, __pyx_pybuffernd_vals.diminfo[0].strides))) != 0); if (__pyx_t_6) { /* "pandas/tslib.pyx":1926 * # timestamp falls to the right side of the DST transition * if v + deltas[pos] == vals[i]: * result_b[i] = v # <<<<<<<<<<<<<< * * */ __pyx_t_33 = __pyx_v_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_result_b.rcbuffer->pybuffer.buf, __pyx_t_33, __pyx_pybuffernd_result_b.diminfo[0].strides) = __pyx_v_v; goto __pyx_L13; } __pyx_L13:; } /* "pandas/tslib.pyx":1929 * * * if infer_dst: # <<<<<<<<<<<<<< * dst_hours = np.empty(n, dtype=np.int64) * dst_hours.fill(NPY_NAT) */ __pyx_t_6 = (__pyx_v_infer_dst != 0); if (__pyx_t_6) { /* "pandas/tslib.pyx":1930 * * if infer_dst: * dst_hours = np.empty(n, dtype=np.int64) # <<<<<<<<<<<<<< * dst_hours.fill(NPY_NAT) * */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1930; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_17 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_empty); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1930; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_17); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_n); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1930; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_18 = PyTuple_New(1); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1930; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); PyTuple_SET_ITEM(__pyx_t_18, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1930; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1930; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_19 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_int64); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1930; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_19); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_dtype, __pyx_t_19) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1930; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0; __pyx_t_19 = PyObject_Call(__pyx_t_17, __pyx_t_18, __pyx_t_2); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1930; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_19); __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (!(likely(((__pyx_t_19) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_19, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1930; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_10 = ((PyArrayObject *)__pyx_t_19); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_dst_hours.rcbuffer->pybuffer); __pyx_t_11 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_dst_hours.rcbuffer->pybuffer, (PyObject*)__pyx_t_10, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_11 < 0)) { PyErr_Fetch(&__pyx_t_14, &__pyx_t_13, &__pyx_t_12); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_dst_hours.rcbuffer->pybuffer, (PyObject*)__pyx_v_dst_hours, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_14); Py_XDECREF(__pyx_t_13); Py_XDECREF(__pyx_t_12); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_14, __pyx_t_13, __pyx_t_12); } } __pyx_pybuffernd_dst_hours.diminfo[0].strides = __pyx_pybuffernd_dst_hours.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_dst_hours.diminfo[0].shape = __pyx_pybuffernd_dst_hours.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_11 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1930; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_10 = 0; __pyx_v_dst_hours = ((PyArrayObject *)__pyx_t_19); __pyx_t_19 = 0; /* "pandas/tslib.pyx":1931 * if infer_dst: * dst_hours = np.empty(n, dtype=np.int64) * dst_hours.fill(NPY_NAT) # <<<<<<<<<<<<<< * * # Get the ambiguous hours (given the above, these are the hours */ __pyx_t_19 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_dst_hours), __pyx_n_s_fill); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1931; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_19); __pyx_t_2 = __Pyx_PyInt_From_npy_int64(__pyx_v_6pandas_5tslib_NPY_NAT); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1931; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_18 = PyTuple_New(1); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1931; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); PyTuple_SET_ITEM(__pyx_t_18, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_Call(__pyx_t_19, __pyx_t_18, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1931; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0; __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/tslib.pyx":1935 * # Get the ambiguous hours (given the above, these are the hours * # where result_a != result_b and neither of them are NAT) * both_nat = np.logical_and(result_a != NPY_NAT, result_b != NPY_NAT) # <<<<<<<<<<<<<< * both_eq = result_a == result_b * trans_idx = np.squeeze(np.nonzero(np.logical_and(both_nat, ~both_eq))) */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1935; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_18 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_logical_and); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1935; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyInt_From_npy_int64(__pyx_v_6pandas_5tslib_NPY_NAT); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1935; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_19 = PyObject_RichCompare(((PyObject *)__pyx_v_result_a), __pyx_t_2, Py_NE); __Pyx_XGOTREF(__pyx_t_19); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1935; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyInt_From_npy_int64(__pyx_v_6pandas_5tslib_NPY_NAT); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1935; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_17 = PyObject_RichCompare(((PyObject *)__pyx_v_result_b), __pyx_t_2, Py_NE); __Pyx_XGOTREF(__pyx_t_17); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1935; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1935; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_19); __Pyx_GIVEREF(__pyx_t_19); PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_17); __Pyx_GIVEREF(__pyx_t_17); __pyx_t_19 = 0; __pyx_t_17 = 0; __pyx_t_17 = PyObject_Call(__pyx_t_18, __pyx_t_2, NULL); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1935; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_17); __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_both_nat = __pyx_t_17; __pyx_t_17 = 0; /* "pandas/tslib.pyx":1936 * # where result_a != result_b and neither of them are NAT) * both_nat = np.logical_and(result_a != NPY_NAT, result_b != NPY_NAT) * both_eq = result_a == result_b # <<<<<<<<<<<<<< * trans_idx = np.squeeze(np.nonzero(np.logical_and(both_nat, ~both_eq))) * if trans_idx.size == 1: */ __pyx_t_17 = PyObject_RichCompare(((PyObject *)__pyx_v_result_a), ((PyObject *)__pyx_v_result_b), Py_EQ); __Pyx_XGOTREF(__pyx_t_17); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1936; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_both_eq = __pyx_t_17; __pyx_t_17 = 0; /* "pandas/tslib.pyx":1937 * both_nat = np.logical_and(result_a != NPY_NAT, result_b != NPY_NAT) * both_eq = result_a == result_b * trans_idx = np.squeeze(np.nonzero(np.logical_and(both_nat, ~both_eq))) # <<<<<<<<<<<<<< * if trans_idx.size == 1: * stamp = Timestamp(vals[trans_idx]) */ __pyx_t_17 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1937; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_17); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_17, __pyx_n_s_squeeze); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1937; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; __pyx_t_17 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1937; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_17); __pyx_t_18 = __Pyx_PyObject_GetAttrStr(__pyx_t_17, __pyx_n_s_nonzero); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1937; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; __pyx_t_17 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1937; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_17); __pyx_t_19 = __Pyx_PyObject_GetAttrStr(__pyx_t_17, __pyx_n_s_logical_and); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1937; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_19); __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; __pyx_t_17 = PyNumber_Invert(__pyx_v_both_eq); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1937; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_17); __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1937; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_INCREF(__pyx_v_both_nat); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_v_both_nat); __Pyx_GIVEREF(__pyx_v_both_nat); PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_17); __Pyx_GIVEREF(__pyx_t_17); __pyx_t_17 = 0; __pyx_t_17 = PyObject_Call(__pyx_t_19, __pyx_t_8, NULL); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1937; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_17); __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1937; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_17); __Pyx_GIVEREF(__pyx_t_17); __pyx_t_17 = 0; __pyx_t_17 = PyObject_Call(__pyx_t_18, __pyx_t_8, NULL); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1937; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_17); __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1937; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_17); __Pyx_GIVEREF(__pyx_t_17); __pyx_t_17 = 0; __pyx_t_17 = PyObject_Call(__pyx_t_2, __pyx_t_8, NULL); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1937; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_17); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_v_trans_idx = __pyx_t_17; __pyx_t_17 = 0; /* "pandas/tslib.pyx":1938 * both_eq = result_a == result_b * trans_idx = np.squeeze(np.nonzero(np.logical_and(both_nat, ~both_eq))) * if trans_idx.size == 1: # <<<<<<<<<<<<<< * stamp = Timestamp(vals[trans_idx]) * raise pytz.AmbiguousTimeError("Cannot infer dst time from %s as" */ __pyx_t_17 = __Pyx_PyObject_GetAttrStr(__pyx_v_trans_idx, __pyx_n_s_size); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1938; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_17); __pyx_t_8 = PyObject_RichCompare(__pyx_t_17, __pyx_int_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1938; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1938; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (__pyx_t_6) { /* "pandas/tslib.pyx":1939 * trans_idx = np.squeeze(np.nonzero(np.logical_and(both_nat, ~both_eq))) * if trans_idx.size == 1: * stamp = Timestamp(vals[trans_idx]) # <<<<<<<<<<<<<< * raise pytz.AmbiguousTimeError("Cannot infer dst time from %s as" * "there are no repeated times" % stamp) */ __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_Timestamp); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1939; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_17 = PyObject_GetItem(((PyObject *)__pyx_v_vals), __pyx_v_trans_idx); if (unlikely(__pyx_t_17 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1939; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_17); __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1939; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_17); __Pyx_GIVEREF(__pyx_t_17); __pyx_t_17 = 0; __pyx_t_17 = PyObject_Call(__pyx_t_8, __pyx_t_2, NULL); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1939; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_17); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_stamp = __pyx_t_17; __pyx_t_17 = 0; /* "pandas/tslib.pyx":1940 * if trans_idx.size == 1: * stamp = Timestamp(vals[trans_idx]) * raise pytz.AmbiguousTimeError("Cannot infer dst time from %s as" # <<<<<<<<<<<<<< * "there are no repeated times" % stamp) * # Split the array into contiguous chunks (where the difference between */ __pyx_t_17 = __Pyx_GetModuleGlobalName(__pyx_n_s_pytz); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1940; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_17); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_17, __pyx_n_s_AmbiguousTimeError); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1940; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; /* "pandas/tslib.pyx":1941 * stamp = Timestamp(vals[trans_idx]) * raise pytz.AmbiguousTimeError("Cannot infer dst time from %s as" * "there are no repeated times" % stamp) # <<<<<<<<<<<<<< * # Split the array into contiguous chunks (where the difference between * # indices is 1). These are effectively dst transitions in different years */ __pyx_t_17 = __Pyx_PyString_Format(__pyx_kp_s_Cannot_infer_dst_time_from_s_ast, __pyx_v_stamp); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1941; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_17); /* "pandas/tslib.pyx":1940 * if trans_idx.size == 1: * stamp = Timestamp(vals[trans_idx]) * raise pytz.AmbiguousTimeError("Cannot infer dst time from %s as" # <<<<<<<<<<<<<< * "there are no repeated times" % stamp) * # Split the array into contiguous chunks (where the difference between */ __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1940; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_17); __Pyx_GIVEREF(__pyx_t_17); __pyx_t_17 = 0; __pyx_t_17 = PyObject_Call(__pyx_t_2, __pyx_t_8, NULL); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1940; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_17); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_Raise(__pyx_t_17, 0, 0, 0); __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1940; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } /* "pandas/tslib.pyx":1946 * # which is useful for checking that there is not an ambiguous transition * # in an individual year. * if trans_idx.size > 0: # <<<<<<<<<<<<<< * one_diff = np.where(np.diff(trans_idx)!=1)[0]+1 * trans_grp = np.array_split(trans_idx, one_diff) */ __pyx_t_17 = __Pyx_PyObject_GetAttrStr(__pyx_v_trans_idx, __pyx_n_s_size); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1946; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_17); __pyx_t_8 = PyObject_RichCompare(__pyx_t_17, __pyx_int_0, Py_GT); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1946; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1946; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (__pyx_t_6) { /* "pandas/tslib.pyx":1947 * # in an individual year. * if trans_idx.size > 0: * one_diff = np.where(np.diff(trans_idx)!=1)[0]+1 # <<<<<<<<<<<<<< * trans_grp = np.array_split(trans_idx, one_diff) * */ __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1947; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_17 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_where); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1947; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_17); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1947; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_diff); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1947; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1947; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_INCREF(__pyx_v_trans_idx); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_v_trans_idx); __Pyx_GIVEREF(__pyx_v_trans_idx); __pyx_t_18 = PyObject_Call(__pyx_t_2, __pyx_t_8, NULL); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1947; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_8 = PyObject_RichCompare(__pyx_t_18, __pyx_int_1, Py_NE); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1947; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; __pyx_t_18 = PyTuple_New(1); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1947; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); PyTuple_SET_ITEM(__pyx_t_18, 0, __pyx_t_8); __Pyx_GIVEREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_8 = PyObject_Call(__pyx_t_17, __pyx_t_18, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1947; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; __pyx_t_18 = __Pyx_GetItemInt(__pyx_t_8, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(__pyx_t_18 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1947; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_18); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_8 = PyNumber_Add(__pyx_t_18, __pyx_int_1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1947; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; __pyx_v_one_diff = __pyx_t_8; __pyx_t_8 = 0; /* "pandas/tslib.pyx":1948 * if trans_idx.size > 0: * one_diff = np.where(np.diff(trans_idx)!=1)[0]+1 * trans_grp = np.array_split(trans_idx, one_diff) # <<<<<<<<<<<<<< * * # Iterate through each day, if there are no hours where the delta is negative */ __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1948; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_18 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_array_split); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1948; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1948; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_INCREF(__pyx_v_trans_idx); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_v_trans_idx); __Pyx_GIVEREF(__pyx_v_trans_idx); __Pyx_INCREF(__pyx_v_one_diff); PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_v_one_diff); __Pyx_GIVEREF(__pyx_v_one_diff); __pyx_t_17 = PyObject_Call(__pyx_t_18, __pyx_t_8, NULL); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1948; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_17); __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_v_trans_grp = __pyx_t_17; __pyx_t_17 = 0; /* "pandas/tslib.pyx":1952 * # Iterate through each day, if there are no hours where the delta is negative * # (indicates a repeat of hour) the switch cannot be inferred * for grp in trans_grp: # <<<<<<<<<<<<<< * * delta = np.diff(result_a[grp]) */ if (PyList_CheckExact(__pyx_v_trans_grp) || PyTuple_CheckExact(__pyx_v_trans_grp)) { __pyx_t_17 = __pyx_v_trans_grp; __Pyx_INCREF(__pyx_t_17); __pyx_t_1 = 0; __pyx_t_34 = NULL; } else { __pyx_t_1 = -1; __pyx_t_17 = PyObject_GetIter(__pyx_v_trans_grp); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1952; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_17); __pyx_t_34 = Py_TYPE(__pyx_t_17)->tp_iternext; } for (;;) { if (!__pyx_t_34 && PyList_CheckExact(__pyx_t_17)) { if (__pyx_t_1 >= PyList_GET_SIZE(__pyx_t_17)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_8 = PyList_GET_ITEM(__pyx_t_17, __pyx_t_1); __Pyx_INCREF(__pyx_t_8); __pyx_t_1++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1952; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_8 = PySequence_ITEM(__pyx_t_17, __pyx_t_1); __pyx_t_1++; if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1952; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif } else if (!__pyx_t_34 && PyTuple_CheckExact(__pyx_t_17)) { if (__pyx_t_1 >= PyTuple_GET_SIZE(__pyx_t_17)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_8 = PyTuple_GET_ITEM(__pyx_t_17, __pyx_t_1); __Pyx_INCREF(__pyx_t_8); __pyx_t_1++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1952; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_8 = PySequence_ITEM(__pyx_t_17, __pyx_t_1); __pyx_t_1++; if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1952; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif } else { __pyx_t_8 = __pyx_t_34(__pyx_t_17); if (unlikely(!__pyx_t_8)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1952; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } break; } __Pyx_GOTREF(__pyx_t_8); } __Pyx_XDECREF_SET(__pyx_v_grp, __pyx_t_8); __pyx_t_8 = 0; /* "pandas/tslib.pyx":1954 * for grp in trans_grp: * * delta = np.diff(result_a[grp]) # <<<<<<<<<<<<<< * if grp.size == 1 or np.all(delta>0): * stamp = Timestamp(vals[grp[0]]) */ __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1954; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_18 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_diff); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1954; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_8 = PyObject_GetItem(((PyObject *)__pyx_v_result_a), __pyx_v_grp); if (unlikely(__pyx_t_8 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1954; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_8); __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1954; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_8); __Pyx_GIVEREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_8 = PyObject_Call(__pyx_t_18, __pyx_t_2, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1954; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF_SET(__pyx_v_delta, __pyx_t_8); __pyx_t_8 = 0; /* "pandas/tslib.pyx":1955 * * delta = np.diff(result_a[grp]) * if grp.size == 1 or np.all(delta>0): # <<<<<<<<<<<<<< * stamp = Timestamp(vals[grp[0]]) * raise pytz.AmbiguousTimeError(stamp) */ __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_grp, __pyx_n_s_size); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1955; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_2 = PyObject_RichCompare(__pyx_t_8, __pyx_int_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1955; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1955; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (!__pyx_t_6) { __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1955; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_all); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1955; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_RichCompare(__pyx_v_delta, __pyx_int_0, Py_GT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1955; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_18 = PyTuple_New(1); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1955; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); PyTuple_SET_ITEM(__pyx_t_18, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_Call(__pyx_t_8, __pyx_t_18, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1955; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1955; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_3 = __pyx_t_4; } else { __pyx_t_3 = __pyx_t_6; } if (__pyx_t_3) { /* "pandas/tslib.pyx":1956 * delta = np.diff(result_a[grp]) * if grp.size == 1 or np.all(delta>0): * stamp = Timestamp(vals[grp[0]]) # <<<<<<<<<<<<<< * raise pytz.AmbiguousTimeError(stamp) * */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_Timestamp); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1956; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_18 = __Pyx_GetItemInt(__pyx_v_grp, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(__pyx_t_18 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1956; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_18); __pyx_t_8 = PyObject_GetItem(((PyObject *)__pyx_v_vals), __pyx_t_18); if (unlikely(__pyx_t_8 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1956; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; __pyx_t_18 = PyTuple_New(1); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1956; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); PyTuple_SET_ITEM(__pyx_t_18, 0, __pyx_t_8); __Pyx_GIVEREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_8 = PyObject_Call(__pyx_t_2, __pyx_t_18, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1956; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; __pyx_v_stamp = __pyx_t_8; __pyx_t_8 = 0; /* "pandas/tslib.pyx":1957 * if grp.size == 1 or np.all(delta>0): * stamp = Timestamp(vals[grp[0]]) * raise pytz.AmbiguousTimeError(stamp) # <<<<<<<<<<<<<< * * # Find the index for the switch and pull from a for dst and b for standard */ __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_pytz); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1957; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_18 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_AmbiguousTimeError); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1957; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1957; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_INCREF(__pyx_v_stamp); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_v_stamp); __Pyx_GIVEREF(__pyx_v_stamp); __pyx_t_2 = PyObject_Call(__pyx_t_18, __pyx_t_8, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1957; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1957; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } /* "pandas/tslib.pyx":1960 * * # Find the index for the switch and pull from a for dst and b for standard * switch_idx = (delta<=0).nonzero()[0] # <<<<<<<<<<<<<< * if switch_idx.size > 1: * raise pytz.AmbiguousTimeError("There are %i dst switches " */ __pyx_t_2 = PyObject_RichCompare(__pyx_v_delta, __pyx_int_0, Py_LE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1960; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_nonzero); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1960; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_Call(__pyx_t_8, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1960; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_8 = __Pyx_GetItemInt(__pyx_t_2, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(__pyx_t_8 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1960; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF_SET(__pyx_v_switch_idx, __pyx_t_8); __pyx_t_8 = 0; /* "pandas/tslib.pyx":1961 * # Find the index for the switch and pull from a for dst and b for standard * switch_idx = (delta<=0).nonzero()[0] * if switch_idx.size > 1: # <<<<<<<<<<<<<< * raise pytz.AmbiguousTimeError("There are %i dst switches " * "when there should only be 1." */ __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_switch_idx, __pyx_n_s_size); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1961; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_2 = PyObject_RichCompare(__pyx_t_8, __pyx_int_1, Py_GT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1961; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1961; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_3) { /* "pandas/tslib.pyx":1962 * switch_idx = (delta<=0).nonzero()[0] * if switch_idx.size > 1: * raise pytz.AmbiguousTimeError("There are %i dst switches " # <<<<<<<<<<<<<< * "when there should only be 1." * % switch_idx.size) */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_pytz); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1962; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_AmbiguousTimeError); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1962; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/tslib.pyx":1964 * raise pytz.AmbiguousTimeError("There are %i dst switches " * "when there should only be 1." * % switch_idx.size) # <<<<<<<<<<<<<< * switch_idx = switch_idx[0]+1 # Pull the only index and adjust * a_idx = grp[:switch_idx] */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_switch_idx, __pyx_n_s_size); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1964; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_18 = __Pyx_PyString_Format(__pyx_kp_s_There_are_i_dst_switches_when_th, __pyx_t_2); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1964; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/tslib.pyx":1962 * switch_idx = (delta<=0).nonzero()[0] * if switch_idx.size > 1: * raise pytz.AmbiguousTimeError("There are %i dst switches " # <<<<<<<<<<<<<< * "when there should only be 1." * % switch_idx.size) */ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1962; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_18); __Pyx_GIVEREF(__pyx_t_18); __pyx_t_18 = 0; __pyx_t_18 = PyObject_Call(__pyx_t_8, __pyx_t_2, NULL); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1962; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_Raise(__pyx_t_18, 0, 0, 0); __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1962; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } /* "pandas/tslib.pyx":1965 * "when there should only be 1." * % switch_idx.size) * switch_idx = switch_idx[0]+1 # Pull the only index and adjust # <<<<<<<<<<<<<< * a_idx = grp[:switch_idx] * b_idx = grp[switch_idx:] */ __pyx_t_18 = __Pyx_GetItemInt(__pyx_v_switch_idx, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(__pyx_t_18 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1965; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_18); __pyx_t_2 = PyNumber_Add(__pyx_t_18, __pyx_int_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1965; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; __Pyx_DECREF_SET(__pyx_v_switch_idx, __pyx_t_2); __pyx_t_2 = 0; /* "pandas/tslib.pyx":1966 * % switch_idx.size) * switch_idx = switch_idx[0]+1 # Pull the only index and adjust * a_idx = grp[:switch_idx] # <<<<<<<<<<<<<< * b_idx = grp[switch_idx:] * dst_hours[grp] = np.hstack((result_a[a_idx], result_b[b_idx])) */ __pyx_t_2 = __Pyx_PyObject_GetSlice(__pyx_v_grp, 0, 0, NULL, &__pyx_v_switch_idx, NULL, 0, 0, 0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1966; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_XDECREF_SET(__pyx_v_a_idx, __pyx_t_2); __pyx_t_2 = 0; /* "pandas/tslib.pyx":1967 * switch_idx = switch_idx[0]+1 # Pull the only index and adjust * a_idx = grp[:switch_idx] * b_idx = grp[switch_idx:] # <<<<<<<<<<<<<< * dst_hours[grp] = np.hstack((result_a[a_idx], result_b[b_idx])) * */ __pyx_t_2 = __Pyx_PyObject_GetSlice(__pyx_v_grp, 0, 0, &__pyx_v_switch_idx, NULL, NULL, 0, 0, 0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1967; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_XDECREF_SET(__pyx_v_b_idx, __pyx_t_2); __pyx_t_2 = 0; /* "pandas/tslib.pyx":1968 * a_idx = grp[:switch_idx] * b_idx = grp[switch_idx:] * dst_hours[grp] = np.hstack((result_a[a_idx], result_b[b_idx])) # <<<<<<<<<<<<<< * * for i in range(n): */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1968; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_18 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_hstack); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1968; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_GetItem(((PyObject *)__pyx_v_result_a), __pyx_v_a_idx); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1968; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_2); __pyx_t_8 = PyObject_GetItem(((PyObject *)__pyx_v_result_b), __pyx_v_b_idx); if (unlikely(__pyx_t_8 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1968; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_8); __pyx_t_19 = PyTuple_New(2); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1968; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_19); PyTuple_SET_ITEM(__pyx_t_19, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_19, 1, __pyx_t_8); __Pyx_GIVEREF(__pyx_t_8); __pyx_t_2 = 0; __pyx_t_8 = 0; __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1968; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_19); __Pyx_GIVEREF(__pyx_t_19); __pyx_t_19 = 0; __pyx_t_19 = PyObject_Call(__pyx_t_18, __pyx_t_8, NULL); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1968; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_19); __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (unlikely(PyObject_SetItem(((PyObject *)__pyx_v_dst_hours), __pyx_v_grp, __pyx_t_19) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1968; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0; } __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; goto __pyx_L16; } __pyx_L16:; goto __pyx_L14; } __pyx_L14:; /* "pandas/tslib.pyx":1970 * dst_hours[grp] = np.hstack((result_a[a_idx], result_b[b_idx])) * * for i in range(n): # <<<<<<<<<<<<<< * left = result_a[i] * right = result_b[i] */ __pyx_t_1 = __pyx_v_n; for (__pyx_t_15 = 0; __pyx_t_15 < __pyx_t_1; __pyx_t_15+=1) { __pyx_v_i = __pyx_t_15; /* "pandas/tslib.pyx":1971 * * for i in range(n): * left = result_a[i] # <<<<<<<<<<<<<< * right = result_b[i] * if left != NPY_NAT and right != NPY_NAT: */ __pyx_t_35 = __pyx_v_i; __pyx_v_left = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_result_a.rcbuffer->pybuffer.buf, __pyx_t_35, __pyx_pybuffernd_result_a.diminfo[0].strides)); /* "pandas/tslib.pyx":1972 * for i in range(n): * left = result_a[i] * right = result_b[i] # <<<<<<<<<<<<<< * if left != NPY_NAT and right != NPY_NAT: * if left == right: */ __pyx_t_36 = __pyx_v_i; __pyx_v_right = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_result_b.rcbuffer->pybuffer.buf, __pyx_t_36, __pyx_pybuffernd_result_b.diminfo[0].strides)); /* "pandas/tslib.pyx":1973 * left = result_a[i] * right = result_b[i] * if left != NPY_NAT and right != NPY_NAT: # <<<<<<<<<<<<<< * if left == right: * result[i] = left */ __pyx_t_3 = ((__pyx_v_left != __pyx_v_6pandas_5tslib_NPY_NAT) != 0); if (__pyx_t_3) { __pyx_t_6 = ((__pyx_v_right != __pyx_v_6pandas_5tslib_NPY_NAT) != 0); __pyx_t_4 = __pyx_t_6; } else { __pyx_t_4 = __pyx_t_3; } if (__pyx_t_4) { /* "pandas/tslib.pyx":1974 * right = result_b[i] * if left != NPY_NAT and right != NPY_NAT: * if left == right: # <<<<<<<<<<<<<< * result[i] = left * else: */ __pyx_t_4 = ((__pyx_v_left == __pyx_v_right) != 0); if (__pyx_t_4) { /* "pandas/tslib.pyx":1975 * if left != NPY_NAT and right != NPY_NAT: * if left == right: * result[i] = left # <<<<<<<<<<<<<< * else: * if infer_dst and dst_hours[i] != NPY_NAT: */ __pyx_t_37 = __pyx_v_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_37, __pyx_pybuffernd_result.diminfo[0].strides) = __pyx_v_left; goto __pyx_L24; } /*else*/ { /* "pandas/tslib.pyx":1977 * result[i] = left * else: * if infer_dst and dst_hours[i] != NPY_NAT: # <<<<<<<<<<<<<< * result[i] = dst_hours[i] * else: */ if ((__pyx_v_infer_dst != 0)) { __pyx_t_38 = __pyx_v_i; __pyx_t_4 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_dst_hours.rcbuffer->pybuffer.buf, __pyx_t_38, __pyx_pybuffernd_dst_hours.diminfo[0].strides)) != __pyx_v_6pandas_5tslib_NPY_NAT) != 0); __pyx_t_3 = __pyx_t_4; } else { __pyx_t_3 = (__pyx_v_infer_dst != 0); } if (__pyx_t_3) { /* "pandas/tslib.pyx":1978 * else: * if infer_dst and dst_hours[i] != NPY_NAT: * result[i] = dst_hours[i] # <<<<<<<<<<<<<< * else: * stamp = Timestamp(vals[i]) */ __pyx_t_39 = __pyx_v_i; __pyx_t_40 = __pyx_v_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_40, __pyx_pybuffernd_result.diminfo[0].strides) = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_dst_hours.rcbuffer->pybuffer.buf, __pyx_t_39, __pyx_pybuffernd_dst_hours.diminfo[0].strides)); goto __pyx_L25; } /*else*/ { /* "pandas/tslib.pyx":1980 * result[i] = dst_hours[i] * else: * stamp = Timestamp(vals[i]) # <<<<<<<<<<<<<< * raise pytz.AmbiguousTimeError("Cannot infer dst time from %r, "\ * "try using the 'infer_dst' argument" */ __pyx_t_17 = __Pyx_GetModuleGlobalName(__pyx_n_s_Timestamp); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1980; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_17); __pyx_t_41 = __pyx_v_i; __pyx_t_19 = __Pyx_PyInt_From_npy_int64((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_vals.rcbuffer->pybuffer.buf, __pyx_t_41, __pyx_pybuffernd_vals.diminfo[0].strides))); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1980; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_19); __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1980; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_19); __Pyx_GIVEREF(__pyx_t_19); __pyx_t_19 = 0; __pyx_t_19 = PyObject_Call(__pyx_t_17, __pyx_t_8, NULL); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1980; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_19); __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_v_stamp = __pyx_t_19; __pyx_t_19 = 0; /* "pandas/tslib.pyx":1981 * else: * stamp = Timestamp(vals[i]) * raise pytz.AmbiguousTimeError("Cannot infer dst time from %r, "\ # <<<<<<<<<<<<<< * "try using the 'infer_dst' argument" * % stamp) */ __pyx_t_19 = __Pyx_GetModuleGlobalName(__pyx_n_s_pytz); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1981; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_19); __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_19, __pyx_n_s_AmbiguousTimeError); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1981; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0; /* "pandas/tslib.pyx":1983 * raise pytz.AmbiguousTimeError("Cannot infer dst time from %r, "\ * "try using the 'infer_dst' argument" * % stamp) # <<<<<<<<<<<<<< * elif left != NPY_NAT: * result[i] = left */ __pyx_t_19 = __Pyx_PyString_Format(__pyx_kp_s_Cannot_infer_dst_time_from_r_try, __pyx_v_stamp); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1983; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_19); /* "pandas/tslib.pyx":1981 * else: * stamp = Timestamp(vals[i]) * raise pytz.AmbiguousTimeError("Cannot infer dst time from %r, "\ # <<<<<<<<<<<<<< * "try using the 'infer_dst' argument" * % stamp) */ __pyx_t_17 = PyTuple_New(1); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1981; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_17); PyTuple_SET_ITEM(__pyx_t_17, 0, __pyx_t_19); __Pyx_GIVEREF(__pyx_t_19); __pyx_t_19 = 0; __pyx_t_19 = PyObject_Call(__pyx_t_8, __pyx_t_17, NULL); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1981; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_19); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; __Pyx_Raise(__pyx_t_19, 0, 0, 0); __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1981; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_L25:; } __pyx_L24:; goto __pyx_L23; } /* "pandas/tslib.pyx":1984 * "try using the 'infer_dst' argument" * % stamp) * elif left != NPY_NAT: # <<<<<<<<<<<<<< * result[i] = left * elif right != NPY_NAT: */ __pyx_t_3 = ((__pyx_v_left != __pyx_v_6pandas_5tslib_NPY_NAT) != 0); if (__pyx_t_3) { /* "pandas/tslib.pyx":1985 * % stamp) * elif left != NPY_NAT: * result[i] = left # <<<<<<<<<<<<<< * elif right != NPY_NAT: * result[i] = right */ __pyx_t_42 = __pyx_v_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_42, __pyx_pybuffernd_result.diminfo[0].strides) = __pyx_v_left; goto __pyx_L23; } /* "pandas/tslib.pyx":1986 * elif left != NPY_NAT: * result[i] = left * elif right != NPY_NAT: # <<<<<<<<<<<<<< * result[i] = right * else: */ __pyx_t_3 = ((__pyx_v_right != __pyx_v_6pandas_5tslib_NPY_NAT) != 0); if (__pyx_t_3) { /* "pandas/tslib.pyx":1987 * result[i] = left * elif right != NPY_NAT: * result[i] = right # <<<<<<<<<<<<<< * else: * stamp = Timestamp(vals[i]) */ __pyx_t_43 = __pyx_v_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_43, __pyx_pybuffernd_result.diminfo[0].strides) = __pyx_v_right; goto __pyx_L23; } /*else*/ { /* "pandas/tslib.pyx":1989 * result[i] = right * else: * stamp = Timestamp(vals[i]) # <<<<<<<<<<<<<< * raise pytz.NonExistentTimeError(stamp) * */ __pyx_t_19 = __Pyx_GetModuleGlobalName(__pyx_n_s_Timestamp); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1989; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_19); __pyx_t_44 = __pyx_v_i; __pyx_t_17 = __Pyx_PyInt_From_npy_int64((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_vals.rcbuffer->pybuffer.buf, __pyx_t_44, __pyx_pybuffernd_vals.diminfo[0].strides))); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1989; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_17); __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1989; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_17); __Pyx_GIVEREF(__pyx_t_17); __pyx_t_17 = 0; __pyx_t_17 = PyObject_Call(__pyx_t_19, __pyx_t_8, NULL); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1989; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_17); __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_v_stamp = __pyx_t_17; __pyx_t_17 = 0; /* "pandas/tslib.pyx":1990 * else: * stamp = Timestamp(vals[i]) * raise pytz.NonExistentTimeError(stamp) # <<<<<<<<<<<<<< * * return result */ __pyx_t_17 = __Pyx_GetModuleGlobalName(__pyx_n_s_pytz); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1990; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_17); __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_17, __pyx_n_s_NonExistentTimeError); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1990; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; __pyx_t_17 = PyTuple_New(1); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1990; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_17); __Pyx_INCREF(__pyx_v_stamp); PyTuple_SET_ITEM(__pyx_t_17, 0, __pyx_v_stamp); __Pyx_GIVEREF(__pyx_v_stamp); __pyx_t_19 = PyObject_Call(__pyx_t_8, __pyx_t_17, NULL); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1990; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_19); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; __Pyx_Raise(__pyx_t_19, 0, 0, 0); __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1990; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_L23:; } /* "pandas/tslib.pyx":1992 * raise pytz.NonExistentTimeError(stamp) * * return result # <<<<<<<<<<<<<< * * cdef _ensure_int64(object arr): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_result)); __pyx_r = ((PyObject *)__pyx_v_result); goto __pyx_L0; /* "pandas/tslib.pyx":1856 * @cython.boundscheck(False) * @cython.wraparound(False) * def tz_localize_to_utc(ndarray[int64_t] vals, object tz, bint infer_dst=False): # <<<<<<<<<<<<<< * """ * Localize tzinfo-naive DateRange to given time zone (using pytz). If */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); __Pyx_XDECREF(__pyx_t_17); __Pyx_XDECREF(__pyx_t_18); __Pyx_XDECREF(__pyx_t_19); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_deltas.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_dst_hours.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_idx_shifted.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result_a.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result_b.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_trans.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_vals.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.tslib.tz_localize_to_utc", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_deltas.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_dst_hours.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_idx_shifted.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result_a.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result_b.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_trans.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_vals.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_trans); __Pyx_XDECREF((PyObject *)__pyx_v_deltas); __Pyx_XDECREF((PyObject *)__pyx_v_idx_shifted); __Pyx_XDECREF((PyObject *)__pyx_v_result); __Pyx_XDECREF((PyObject *)__pyx_v_result_a); __Pyx_XDECREF((PyObject *)__pyx_v_result_b); __Pyx_XDECREF((PyObject *)__pyx_v_dst_hours); __Pyx_XDECREF((PyObject *)__pyx_v_dt); __Pyx_XDECREF(__pyx_v_delta); __Pyx_XDECREF(__pyx_v_both_nat); __Pyx_XDECREF(__pyx_v_both_eq); __Pyx_XDECREF(__pyx_v_trans_idx); __Pyx_XDECREF(__pyx_v_stamp); __Pyx_XDECREF(__pyx_v_one_diff); __Pyx_XDECREF(__pyx_v_trans_grp); __Pyx_XDECREF(__pyx_v_grp); __Pyx_XDECREF(__pyx_v_switch_idx); __Pyx_XDECREF(__pyx_v_a_idx); __Pyx_XDECREF(__pyx_v_b_idx); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/tslib.pyx":1994 * return result * * cdef _ensure_int64(object arr): # <<<<<<<<<<<<<< * if util.is_array(arr): * if ( arr).descr.type_num == NPY_INT64: */ static PyObject *__pyx_f_6pandas_5tslib__ensure_int64(PyObject *__pyx_v_arr) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_ensure_int64", 0); /* "pandas/tslib.pyx":1995 * * cdef _ensure_int64(object arr): * if util.is_array(arr): # <<<<<<<<<<<<<< * if ( arr).descr.type_num == NPY_INT64: * return arr */ __pyx_t_1 = __pyx_f_4util_is_array(__pyx_v_arr); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1995; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1995; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_2) { /* "pandas/tslib.pyx":1996 * cdef _ensure_int64(object arr): * if util.is_array(arr): * if ( arr).descr.type_num == NPY_INT64: # <<<<<<<<<<<<<< * return arr * else: */ __pyx_t_2 = ((((PyArrayObject *)__pyx_v_arr)->descr->type_num == NPY_INT64) != 0); if (__pyx_t_2) { /* "pandas/tslib.pyx":1997 * if util.is_array(arr): * if ( arr).descr.type_num == NPY_INT64: * return arr # <<<<<<<<<<<<<< * else: * return arr.astype(np.int64) */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_arr); __pyx_r = __pyx_v_arr; goto __pyx_L0; } /*else*/ { /* "pandas/tslib.pyx":1999 * return arr * else: * return arr.astype(np.int64) # <<<<<<<<<<<<<< * else: * return np.array(arr, dtype=np.int64) */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_arr, __pyx_n_s_astype); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1999; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1999; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_int64); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1999; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1999; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyObject_Call(__pyx_t_1, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1999; __pyx_clineno = __LINE__; goto __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_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; } } /*else*/ { /* "pandas/tslib.pyx":2001 * return arr.astype(np.int64) * else: * return np.array(arr, dtype=np.int64) # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2001; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_array); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2001; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2001; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_v_arr); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_arr); __Pyx_GIVEREF(__pyx_v_arr); __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2001; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2001; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_int64); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2001; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_dtype, __pyx_t_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2001; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyObject_Call(__pyx_t_3, __pyx_t_4, __pyx_t_1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2001; __pyx_clineno = __LINE__; goto __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_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_6; __pyx_t_6 = 0; goto __pyx_L0; } /* "pandas/tslib.pyx":1994 * return result * * cdef _ensure_int64(object arr): # <<<<<<<<<<<<<< * if util.is_array(arr): * if ( arr).descr.type_num == NPY_INT64: */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("pandas.tslib._ensure_int64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/tslib.pyx":2004 * * * cdef inline bisect_right_i8(int64_t *data, int64_t val, Py_ssize_t n): # <<<<<<<<<<<<<< * cdef Py_ssize_t pivot, left = 0, right = n * */ static CYTHON_INLINE PyObject *__pyx_f_6pandas_5tslib_bisect_right_i8(__pyx_t_5numpy_int64_t *__pyx_v_data, __pyx_t_5numpy_int64_t __pyx_v_val, Py_ssize_t __pyx_v_n) { Py_ssize_t __pyx_v_pivot; Py_ssize_t __pyx_v_left; Py_ssize_t __pyx_v_right; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("bisect_right_i8", 0); /* "pandas/tslib.pyx":2005 * * cdef inline bisect_right_i8(int64_t *data, int64_t val, Py_ssize_t n): * cdef Py_ssize_t pivot, left = 0, right = n # <<<<<<<<<<<<<< * * # edge cases */ __pyx_v_left = 0; __pyx_v_right = __pyx_v_n; /* "pandas/tslib.pyx":2008 * * # edge cases * if val > data[n - 1]: # <<<<<<<<<<<<<< * return n * */ __pyx_t_1 = ((__pyx_v_val > (__pyx_v_data[(__pyx_v_n - 1)])) != 0); if (__pyx_t_1) { /* "pandas/tslib.pyx":2009 * # edge cases * if val > data[n - 1]: * return n # <<<<<<<<<<<<<< * * if val < data[0]: */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_n); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2009; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; } /* "pandas/tslib.pyx":2011 * return n * * if val < data[0]: # <<<<<<<<<<<<<< * return 0 * */ __pyx_t_1 = ((__pyx_v_val < (__pyx_v_data[0])) != 0); if (__pyx_t_1) { /* "pandas/tslib.pyx":2012 * * if val < data[0]: * return 0 # <<<<<<<<<<<<<< * * while left < right: */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_int_0); __pyx_r = __pyx_int_0; goto __pyx_L0; } /* "pandas/tslib.pyx":2014 * return 0 * * while left < right: # <<<<<<<<<<<<<< * pivot = left + (right - left) // 2 * */ while (1) { __pyx_t_1 = ((__pyx_v_left < __pyx_v_right) != 0); if (!__pyx_t_1) break; /* "pandas/tslib.pyx":2015 * * while left < right: * pivot = left + (right - left) // 2 # <<<<<<<<<<<<<< * * if data[pivot] <= val: */ __pyx_v_pivot = (__pyx_v_left + __Pyx_div_Py_ssize_t((__pyx_v_right - __pyx_v_left), 2)); /* "pandas/tslib.pyx":2017 * pivot = left + (right - left) // 2 * * if data[pivot] <= val: # <<<<<<<<<<<<<< * left = pivot + 1 * else: */ __pyx_t_1 = (((__pyx_v_data[__pyx_v_pivot]) <= __pyx_v_val) != 0); if (__pyx_t_1) { /* "pandas/tslib.pyx":2018 * * if data[pivot] <= val: * left = pivot + 1 # <<<<<<<<<<<<<< * else: * right = pivot */ __pyx_v_left = (__pyx_v_pivot + 1); goto __pyx_L7; } /*else*/ { /* "pandas/tslib.pyx":2020 * left = pivot + 1 * else: * right = pivot # <<<<<<<<<<<<<< * * return left */ __pyx_v_right = __pyx_v_pivot; } __pyx_L7:; } /* "pandas/tslib.pyx":2022 * right = pivot * * return left # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_left); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2022; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "pandas/tslib.pyx":2004 * * * cdef inline bisect_right_i8(int64_t *data, int64_t val, Py_ssize_t n): # <<<<<<<<<<<<<< * cdef Py_ssize_t pivot, left = 0, right = n * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("pandas.tslib.bisect_right_i8", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/tslib.pyx":2028 * #---------------------------------------------------------------------- * * def build_field_sarray(ndarray[int64_t] dtindex): # <<<<<<<<<<<<<< * ''' * Datetime as int64 representation to a structured array of fields */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5tslib_59build_field_sarray(PyObject *__pyx_self, PyObject *__pyx_v_dtindex); /*proto*/ static char __pyx_doc_6pandas_5tslib_58build_field_sarray[] = "\n Datetime as int64 representation to a structured array of fields\n "; static PyMethodDef __pyx_mdef_6pandas_5tslib_59build_field_sarray = {__Pyx_NAMESTR("build_field_sarray"), (PyCFunction)__pyx_pw_6pandas_5tslib_59build_field_sarray, METH_O, __Pyx_DOCSTR(__pyx_doc_6pandas_5tslib_58build_field_sarray)}; static PyObject *__pyx_pw_6pandas_5tslib_59build_field_sarray(PyObject *__pyx_self, PyObject *__pyx_v_dtindex) { CYTHON_UNUSED int __pyx_lineno = 0; CYTHON_UNUSED const char *__pyx_filename = NULL; CYTHON_UNUSED int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("build_field_sarray (wrapper)", 0); if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dtindex), __pyx_ptype_5numpy_ndarray, 1, "dtindex", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2028; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5tslib_58build_field_sarray(__pyx_self, ((PyArrayObject *)__pyx_v_dtindex)); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5tslib_58build_field_sarray(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_dtindex) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_count; pandas_datetimestruct __pyx_v_dts; PyArrayObject *__pyx_v_years = 0; PyArrayObject *__pyx_v_months = 0; PyArrayObject *__pyx_v_days = 0; PyArrayObject *__pyx_v_hours = 0; PyArrayObject *__pyx_v_minutes = 0; PyArrayObject *__pyx_v_seconds = 0; PyArrayObject *__pyx_v_mus = 0; PyObject *__pyx_v_sa_dtype = NULL; PyObject *__pyx_v_out = NULL; __Pyx_LocalBuf_ND __pyx_pybuffernd_days; __Pyx_Buffer __pyx_pybuffer_days; __Pyx_LocalBuf_ND __pyx_pybuffernd_dtindex; __Pyx_Buffer __pyx_pybuffer_dtindex; __Pyx_LocalBuf_ND __pyx_pybuffernd_hours; __Pyx_Buffer __pyx_pybuffer_hours; __Pyx_LocalBuf_ND __pyx_pybuffernd_minutes; __Pyx_Buffer __pyx_pybuffer_minutes; __Pyx_LocalBuf_ND __pyx_pybuffernd_months; __Pyx_Buffer __pyx_pybuffer_months; __Pyx_LocalBuf_ND __pyx_pybuffernd_mus; __Pyx_Buffer __pyx_pybuffer_mus; __Pyx_LocalBuf_ND __pyx_pybuffernd_seconds; __Pyx_Buffer __pyx_pybuffer_seconds; __Pyx_LocalBuf_ND __pyx_pybuffernd_years; __Pyx_Buffer __pyx_pybuffer_years; 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; PyArrayObject *__pyx_t_6 = NULL; 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; npy_int64 __pyx_t_13; Py_ssize_t __pyx_t_14; npy_int32 __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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("build_field_sarray", 0); __pyx_pybuffer_years.pybuffer.buf = NULL; __pyx_pybuffer_years.refcount = 0; __pyx_pybuffernd_years.data = NULL; __pyx_pybuffernd_years.rcbuffer = &__pyx_pybuffer_years; __pyx_pybuffer_months.pybuffer.buf = NULL; __pyx_pybuffer_months.refcount = 0; __pyx_pybuffernd_months.data = NULL; __pyx_pybuffernd_months.rcbuffer = &__pyx_pybuffer_months; __pyx_pybuffer_days.pybuffer.buf = NULL; __pyx_pybuffer_days.refcount = 0; __pyx_pybuffernd_days.data = NULL; __pyx_pybuffernd_days.rcbuffer = &__pyx_pybuffer_days; __pyx_pybuffer_hours.pybuffer.buf = NULL; __pyx_pybuffer_hours.refcount = 0; __pyx_pybuffernd_hours.data = NULL; __pyx_pybuffernd_hours.rcbuffer = &__pyx_pybuffer_hours; __pyx_pybuffer_minutes.pybuffer.buf = NULL; __pyx_pybuffer_minutes.refcount = 0; __pyx_pybuffernd_minutes.data = NULL; __pyx_pybuffernd_minutes.rcbuffer = &__pyx_pybuffer_minutes; __pyx_pybuffer_seconds.pybuffer.buf = NULL; __pyx_pybuffer_seconds.refcount = 0; __pyx_pybuffernd_seconds.data = NULL; __pyx_pybuffernd_seconds.rcbuffer = &__pyx_pybuffer_seconds; __pyx_pybuffer_mus.pybuffer.buf = NULL; __pyx_pybuffer_mus.refcount = 0; __pyx_pybuffernd_mus.data = NULL; __pyx_pybuffernd_mus.rcbuffer = &__pyx_pybuffer_mus; __pyx_pybuffer_dtindex.pybuffer.buf = NULL; __pyx_pybuffer_dtindex.refcount = 0; __pyx_pybuffernd_dtindex.data = NULL; __pyx_pybuffernd_dtindex.rcbuffer = &__pyx_pybuffer_dtindex; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_dtindex.rcbuffer->pybuffer, (PyObject*)__pyx_v_dtindex, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2028; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_dtindex.diminfo[0].strides = __pyx_pybuffernd_dtindex.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_dtindex.diminfo[0].shape = __pyx_pybuffernd_dtindex.rcbuffer->pybuffer.shape[0]; /* "pandas/tslib.pyx":2033 * ''' * cdef: * Py_ssize_t i, count = 0 # <<<<<<<<<<<<<< * int isleap * pandas_datetimestruct dts */ __pyx_v_count = 0; /* "pandas/tslib.pyx":2038 * ndarray[int32_t] years, months, days, hours, minutes, seconds, mus * * count = len(dtindex) # <<<<<<<<<<<<<< * * sa_dtype = [('Y', 'i4'), # year */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_dtindex)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2038; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_count = __pyx_t_1; /* "pandas/tslib.pyx":2040 * count = len(dtindex) * * sa_dtype = [('Y', 'i4'), # year # <<<<<<<<<<<<<< * ('M', 'i4'), # month * ('D', 'i4'), # day */ __pyx_t_2 = PyList_New(7); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2040; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_tuple__48); PyList_SET_ITEM(__pyx_t_2, 0, __pyx_tuple__48); __Pyx_GIVEREF(__pyx_tuple__48); __Pyx_INCREF(__pyx_tuple__49); PyList_SET_ITEM(__pyx_t_2, 1, __pyx_tuple__49); __Pyx_GIVEREF(__pyx_tuple__49); __Pyx_INCREF(__pyx_tuple__50); PyList_SET_ITEM(__pyx_t_2, 2, __pyx_tuple__50); __Pyx_GIVEREF(__pyx_tuple__50); __Pyx_INCREF(__pyx_tuple__51); PyList_SET_ITEM(__pyx_t_2, 3, __pyx_tuple__51); __Pyx_GIVEREF(__pyx_tuple__51); __Pyx_INCREF(__pyx_tuple__52); PyList_SET_ITEM(__pyx_t_2, 4, __pyx_tuple__52); __Pyx_GIVEREF(__pyx_tuple__52); __Pyx_INCREF(__pyx_tuple__53); PyList_SET_ITEM(__pyx_t_2, 5, __pyx_tuple__53); __Pyx_GIVEREF(__pyx_tuple__53); __Pyx_INCREF(__pyx_tuple__54); PyList_SET_ITEM(__pyx_t_2, 6, __pyx_tuple__54); __Pyx_GIVEREF(__pyx_tuple__54); __pyx_v_sa_dtype = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; /* "pandas/tslib.pyx":2048 * ('u', 'i4')] # microsecond * * out = np.empty(count, dtype=sa_dtype) # <<<<<<<<<<<<<< * * years = out['Y'] */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2048; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 2048; __pyx_clineno = __LINE__; goto __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_count); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2048; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2048; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2048; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_dtype, __pyx_v_sa_dtype) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2048; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_5 = PyObject_Call(__pyx_t_3, __pyx_t_4, __pyx_t_2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2048; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_out = __pyx_t_5; __pyx_t_5 = 0; /* "pandas/tslib.pyx":2050 * out = np.empty(count, dtype=sa_dtype) * * years = out['Y'] # <<<<<<<<<<<<<< * months = out['M'] * days = out['D'] */ __pyx_t_5 = PyObject_GetItem(__pyx_v_out, __pyx_n_s_Y); if (unlikely(__pyx_t_5 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2050; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_5); if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2050; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_6 = ((PyArrayObject *)__pyx_t_5); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_years.rcbuffer->pybuffer); __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_years.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_years.rcbuffer->pybuffer, (PyObject*)__pyx_v_years, &__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_pybuffernd_years.diminfo[0].strides = __pyx_pybuffernd_years.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_years.diminfo[0].shape = __pyx_pybuffernd_years.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2050; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_6 = 0; __pyx_v_years = ((PyArrayObject *)__pyx_t_5); __pyx_t_5 = 0; /* "pandas/tslib.pyx":2051 * * years = out['Y'] * months = out['M'] # <<<<<<<<<<<<<< * days = out['D'] * hours = out['h'] */ __pyx_t_5 = PyObject_GetItem(__pyx_v_out, __pyx_n_s_M); if (unlikely(__pyx_t_5 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2051; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_5); if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2051; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_6 = ((PyArrayObject *)__pyx_t_5); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_months.rcbuffer->pybuffer); __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_months.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_10, &__pyx_t_9, &__pyx_t_8); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_months.rcbuffer->pybuffer, (PyObject*)__pyx_v_months, &__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_pybuffernd_months.diminfo[0].strides = __pyx_pybuffernd_months.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_months.diminfo[0].shape = __pyx_pybuffernd_months.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2051; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_6 = 0; __pyx_v_months = ((PyArrayObject *)__pyx_t_5); __pyx_t_5 = 0; /* "pandas/tslib.pyx":2052 * years = out['Y'] * months = out['M'] * days = out['D'] # <<<<<<<<<<<<<< * hours = out['h'] * minutes = out['m'] */ __pyx_t_5 = PyObject_GetItem(__pyx_v_out, __pyx_n_s_D); if (unlikely(__pyx_t_5 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2052; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_5); if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2052; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_6 = ((PyArrayObject *)__pyx_t_5); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_days.rcbuffer->pybuffer); __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_days.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_days.rcbuffer->pybuffer, (PyObject*)__pyx_v_days, &__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_pybuffernd_days.diminfo[0].strides = __pyx_pybuffernd_days.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_days.diminfo[0].shape = __pyx_pybuffernd_days.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2052; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_6 = 0; __pyx_v_days = ((PyArrayObject *)__pyx_t_5); __pyx_t_5 = 0; /* "pandas/tslib.pyx":2053 * months = out['M'] * days = out['D'] * hours = out['h'] # <<<<<<<<<<<<<< * minutes = out['m'] * seconds = out['s'] */ __pyx_t_5 = PyObject_GetItem(__pyx_v_out, __pyx_n_s_h); if (unlikely(__pyx_t_5 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2053; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_5); if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2053; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_6 = ((PyArrayObject *)__pyx_t_5); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_hours.rcbuffer->pybuffer); __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_hours.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_10, &__pyx_t_9, &__pyx_t_8); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_hours.rcbuffer->pybuffer, (PyObject*)__pyx_v_hours, &__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_pybuffernd_hours.diminfo[0].strides = __pyx_pybuffernd_hours.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_hours.diminfo[0].shape = __pyx_pybuffernd_hours.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2053; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_6 = 0; __pyx_v_hours = ((PyArrayObject *)__pyx_t_5); __pyx_t_5 = 0; /* "pandas/tslib.pyx":2054 * days = out['D'] * hours = out['h'] * minutes = out['m'] # <<<<<<<<<<<<<< * seconds = out['s'] * mus = out['u'] */ __pyx_t_5 = PyObject_GetItem(__pyx_v_out, __pyx_n_s_m); if (unlikely(__pyx_t_5 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2054; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_5); if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2054; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_6 = ((PyArrayObject *)__pyx_t_5); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_minutes.rcbuffer->pybuffer); __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_minutes.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_minutes.rcbuffer->pybuffer, (PyObject*)__pyx_v_minutes, &__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_pybuffernd_minutes.diminfo[0].strides = __pyx_pybuffernd_minutes.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_minutes.diminfo[0].shape = __pyx_pybuffernd_minutes.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2054; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_6 = 0; __pyx_v_minutes = ((PyArrayObject *)__pyx_t_5); __pyx_t_5 = 0; /* "pandas/tslib.pyx":2055 * hours = out['h'] * minutes = out['m'] * seconds = out['s'] # <<<<<<<<<<<<<< * mus = out['u'] * */ __pyx_t_5 = PyObject_GetItem(__pyx_v_out, __pyx_n_s_s_2); if (unlikely(__pyx_t_5 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2055; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_5); if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2055; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_6 = ((PyArrayObject *)__pyx_t_5); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_seconds.rcbuffer->pybuffer); __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_seconds.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_10, &__pyx_t_9, &__pyx_t_8); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_seconds.rcbuffer->pybuffer, (PyObject*)__pyx_v_seconds, &__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_pybuffernd_seconds.diminfo[0].strides = __pyx_pybuffernd_seconds.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_seconds.diminfo[0].shape = __pyx_pybuffernd_seconds.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2055; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_6 = 0; __pyx_v_seconds = ((PyArrayObject *)__pyx_t_5); __pyx_t_5 = 0; /* "pandas/tslib.pyx":2056 * minutes = out['m'] * seconds = out['s'] * mus = out['u'] # <<<<<<<<<<<<<< * * for i in range(count): */ __pyx_t_5 = PyObject_GetItem(__pyx_v_out, __pyx_n_s_u); if (unlikely(__pyx_t_5 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2056; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_5); if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2056; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_6 = ((PyArrayObject *)__pyx_t_5); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_mus.rcbuffer->pybuffer); __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_mus.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_mus.rcbuffer->pybuffer, (PyObject*)__pyx_v_mus, &__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_pybuffernd_mus.diminfo[0].strides = __pyx_pybuffernd_mus.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_mus.diminfo[0].shape = __pyx_pybuffernd_mus.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2056; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_6 = 0; __pyx_v_mus = ((PyArrayObject *)__pyx_t_5); __pyx_t_5 = 0; /* "pandas/tslib.pyx":2058 * mus = out['u'] * * for i in range(count): # <<<<<<<<<<<<<< * pandas_datetime_to_datetimestruct(dtindex[i], PANDAS_FR_ns, &dts) * years[i] = dts.year */ __pyx_t_1 = __pyx_v_count; for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_1; __pyx_t_11+=1) { __pyx_v_i = __pyx_t_11; /* "pandas/tslib.pyx":2059 * * for i in range(count): * pandas_datetime_to_datetimestruct(dtindex[i], PANDAS_FR_ns, &dts) # <<<<<<<<<<<<<< * years[i] = dts.year * months[i] = dts.month */ __pyx_t_12 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_12 < 0) { __pyx_t_12 += __pyx_pybuffernd_dtindex.diminfo[0].shape; if (unlikely(__pyx_t_12 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_12 >= __pyx_pybuffernd_dtindex.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2059; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } pandas_datetime_to_datetimestruct((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_dtindex.rcbuffer->pybuffer.buf, __pyx_t_12, __pyx_pybuffernd_dtindex.diminfo[0].strides)), PANDAS_FR_ns, (&__pyx_v_dts)); /* "pandas/tslib.pyx":2060 * for i in range(count): * pandas_datetime_to_datetimestruct(dtindex[i], PANDAS_FR_ns, &dts) * years[i] = dts.year # <<<<<<<<<<<<<< * months[i] = dts.month * days[i] = dts.day */ __pyx_t_13 = __pyx_v_dts.year; __pyx_t_14 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_14 < 0) { __pyx_t_14 += __pyx_pybuffernd_years.diminfo[0].shape; if (unlikely(__pyx_t_14 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_14 >= __pyx_pybuffernd_years.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2060; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_years.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_years.diminfo[0].strides) = __pyx_t_13; /* "pandas/tslib.pyx":2061 * pandas_datetime_to_datetimestruct(dtindex[i], PANDAS_FR_ns, &dts) * years[i] = dts.year * months[i] = dts.month # <<<<<<<<<<<<<< * days[i] = dts.day * hours[i] = dts.hour */ __pyx_t_15 = __pyx_v_dts.month; __pyx_t_16 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_16 < 0) { __pyx_t_16 += __pyx_pybuffernd_months.diminfo[0].shape; if (unlikely(__pyx_t_16 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_16 >= __pyx_pybuffernd_months.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2061; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_months.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_months.diminfo[0].strides) = __pyx_t_15; /* "pandas/tslib.pyx":2062 * years[i] = dts.year * months[i] = dts.month * days[i] = dts.day # <<<<<<<<<<<<<< * hours[i] = dts.hour * minutes[i] = dts.min */ __pyx_t_15 = __pyx_v_dts.day; __pyx_t_17 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_17 < 0) { __pyx_t_17 += __pyx_pybuffernd_days.diminfo[0].shape; if (unlikely(__pyx_t_17 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_17 >= __pyx_pybuffernd_days.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2062; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_days.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_days.diminfo[0].strides) = __pyx_t_15; /* "pandas/tslib.pyx":2063 * months[i] = dts.month * days[i] = dts.day * hours[i] = dts.hour # <<<<<<<<<<<<<< * minutes[i] = dts.min * seconds[i] = dts.sec */ __pyx_t_15 = __pyx_v_dts.hour; __pyx_t_18 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_18 < 0) { __pyx_t_18 += __pyx_pybuffernd_hours.diminfo[0].shape; if (unlikely(__pyx_t_18 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_18 >= __pyx_pybuffernd_hours.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2063; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_hours.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_hours.diminfo[0].strides) = __pyx_t_15; /* "pandas/tslib.pyx":2064 * days[i] = dts.day * hours[i] = dts.hour * minutes[i] = dts.min # <<<<<<<<<<<<<< * seconds[i] = dts.sec * mus[i] = dts.us */ __pyx_t_15 = __pyx_v_dts.min; __pyx_t_19 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_19 < 0) { __pyx_t_19 += __pyx_pybuffernd_minutes.diminfo[0].shape; if (unlikely(__pyx_t_19 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_19 >= __pyx_pybuffernd_minutes.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2064; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_minutes.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_minutes.diminfo[0].strides) = __pyx_t_15; /* "pandas/tslib.pyx":2065 * hours[i] = dts.hour * minutes[i] = dts.min * seconds[i] = dts.sec # <<<<<<<<<<<<<< * mus[i] = dts.us * */ __pyx_t_15 = __pyx_v_dts.sec; __pyx_t_20 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_20 < 0) { __pyx_t_20 += __pyx_pybuffernd_seconds.diminfo[0].shape; if (unlikely(__pyx_t_20 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_20 >= __pyx_pybuffernd_seconds.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2065; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_seconds.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_seconds.diminfo[0].strides) = __pyx_t_15; /* "pandas/tslib.pyx":2066 * minutes[i] = dts.min * seconds[i] = dts.sec * mus[i] = dts.us # <<<<<<<<<<<<<< * * return out */ __pyx_t_15 = __pyx_v_dts.us; __pyx_t_21 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_21 < 0) { __pyx_t_21 += __pyx_pybuffernd_mus.diminfo[0].shape; if (unlikely(__pyx_t_21 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_21 >= __pyx_pybuffernd_mus.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2066; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_mus.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_mus.diminfo[0].strides) = __pyx_t_15; } /* "pandas/tslib.pyx":2068 * mus[i] = dts.us * * return out # <<<<<<<<<<<<<< * * def get_time_micros(ndarray[int64_t] dtindex): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_out); __pyx_r = __pyx_v_out; goto __pyx_L0; /* "pandas/tslib.pyx":2028 * #---------------------------------------------------------------------- * * def build_field_sarray(ndarray[int64_t] dtindex): # <<<<<<<<<<<<<< * ''' * Datetime as int64 representation to a structured array of fields */ /* 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); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_days.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_dtindex.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_hours.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_minutes.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_months.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_mus.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_seconds.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_years.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.tslib.build_field_sarray", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_days.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_dtindex.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_hours.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_minutes.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_months.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_mus.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_seconds.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_years.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_years); __Pyx_XDECREF((PyObject *)__pyx_v_months); __Pyx_XDECREF((PyObject *)__pyx_v_days); __Pyx_XDECREF((PyObject *)__pyx_v_hours); __Pyx_XDECREF((PyObject *)__pyx_v_minutes); __Pyx_XDECREF((PyObject *)__pyx_v_seconds); __Pyx_XDECREF((PyObject *)__pyx_v_mus); __Pyx_XDECREF(__pyx_v_sa_dtype); __Pyx_XDECREF(__pyx_v_out); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/tslib.pyx":2070 * return out * * def get_time_micros(ndarray[int64_t] dtindex): # <<<<<<<<<<<<<< * ''' * Datetime as int64 representation to a structured array of fields */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5tslib_61get_time_micros(PyObject *__pyx_self, PyObject *__pyx_v_dtindex); /*proto*/ static char __pyx_doc_6pandas_5tslib_60get_time_micros[] = "\n Datetime as int64 representation to a structured array of fields\n "; static PyMethodDef __pyx_mdef_6pandas_5tslib_61get_time_micros = {__Pyx_NAMESTR("get_time_micros"), (PyCFunction)__pyx_pw_6pandas_5tslib_61get_time_micros, METH_O, __Pyx_DOCSTR(__pyx_doc_6pandas_5tslib_60get_time_micros)}; static PyObject *__pyx_pw_6pandas_5tslib_61get_time_micros(PyObject *__pyx_self, PyObject *__pyx_v_dtindex) { CYTHON_UNUSED int __pyx_lineno = 0; CYTHON_UNUSED const char *__pyx_filename = NULL; CYTHON_UNUSED int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("get_time_micros (wrapper)", 0); if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dtindex), __pyx_ptype_5numpy_ndarray, 1, "dtindex", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2070; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5tslib_60get_time_micros(__pyx_self, ((PyArrayObject *)__pyx_v_dtindex)); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5tslib_60get_time_micros(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_dtindex) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_n; pandas_datetimestruct __pyx_v_dts; PyArrayObject *__pyx_v_micros = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_dtindex; __Pyx_Buffer __pyx_pybuffer_dtindex; __Pyx_LocalBuf_ND __pyx_pybuffernd_micros; __Pyx_Buffer __pyx_pybuffer_micros; 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_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_time_micros", 0); __pyx_pybuffer_micros.pybuffer.buf = NULL; __pyx_pybuffer_micros.refcount = 0; __pyx_pybuffernd_micros.data = NULL; __pyx_pybuffernd_micros.rcbuffer = &__pyx_pybuffer_micros; __pyx_pybuffer_dtindex.pybuffer.buf = NULL; __pyx_pybuffer_dtindex.refcount = 0; __pyx_pybuffernd_dtindex.data = NULL; __pyx_pybuffernd_dtindex.rcbuffer = &__pyx_pybuffer_dtindex; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_dtindex.rcbuffer->pybuffer, (PyObject*)__pyx_v_dtindex, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2070; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_dtindex.diminfo[0].strides = __pyx_pybuffernd_dtindex.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_dtindex.diminfo[0].shape = __pyx_pybuffernd_dtindex.rcbuffer->pybuffer.shape[0]; /* "pandas/tslib.pyx":2075 * ''' * cdef: * Py_ssize_t i, n = len(dtindex) # <<<<<<<<<<<<<< * pandas_datetimestruct dts * ndarray[int64_t] micros */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_dtindex)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2075; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/tslib.pyx":2079 * ndarray[int64_t] micros * * micros = np.empty(n, dtype=np.int64) # <<<<<<<<<<<<<< * * for i in range(n): */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2079; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 2079; __pyx_clineno = __LINE__; goto __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_n); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2079; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2079; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2079; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2079; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_int64); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2079; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 2079; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyObject_Call(__pyx_t_3, __pyx_t_4, __pyx_t_2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2079; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 2079; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_7 = ((PyArrayObject *)__pyx_t_6); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_micros.rcbuffer->pybuffer); __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_micros.rcbuffer->pybuffer, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_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_micros.rcbuffer->pybuffer, (PyObject*)__pyx_v_micros, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_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_pybuffernd_micros.diminfo[0].strides = __pyx_pybuffernd_micros.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_micros.diminfo[0].shape = __pyx_pybuffernd_micros.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2079; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_7 = 0; __pyx_v_micros = ((PyArrayObject *)__pyx_t_6); __pyx_t_6 = 0; /* "pandas/tslib.pyx":2081 * micros = np.empty(n, dtype=np.int64) * * for i in range(n): # <<<<<<<<<<<<<< * pandas_datetime_to_datetimestruct(dtindex[i], PANDAS_FR_ns, &dts) * micros[i] = 1000000LL * (dts.hour * 60 * 60 + */ __pyx_t_1 = __pyx_v_n; for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_1; __pyx_t_12+=1) { __pyx_v_i = __pyx_t_12; /* "pandas/tslib.pyx":2082 * * for i in range(n): * pandas_datetime_to_datetimestruct(dtindex[i], PANDAS_FR_ns, &dts) # <<<<<<<<<<<<<< * micros[i] = 1000000LL * (dts.hour * 60 * 60 + * 60 * dts.min + dts.sec) + dts.us */ __pyx_t_13 = __pyx_v_i; __pyx_t_8 = -1; if (__pyx_t_13 < 0) { __pyx_t_13 += __pyx_pybuffernd_dtindex.diminfo[0].shape; if (unlikely(__pyx_t_13 < 0)) __pyx_t_8 = 0; } else if (unlikely(__pyx_t_13 >= __pyx_pybuffernd_dtindex.diminfo[0].shape)) __pyx_t_8 = 0; if (unlikely(__pyx_t_8 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_8); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2082; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } pandas_datetime_to_datetimestruct((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_dtindex.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_dtindex.diminfo[0].strides)), PANDAS_FR_ns, (&__pyx_v_dts)); /* "pandas/tslib.pyx":2083 * for i in range(n): * pandas_datetime_to_datetimestruct(dtindex[i], PANDAS_FR_ns, &dts) * micros[i] = 1000000LL * (dts.hour * 60 * 60 + # <<<<<<<<<<<<<< * 60 * dts.min + dts.sec) + dts.us * */ __pyx_t_14 = __pyx_v_i; __pyx_t_8 = -1; if (__pyx_t_14 < 0) { __pyx_t_14 += __pyx_pybuffernd_micros.diminfo[0].shape; if (unlikely(__pyx_t_14 < 0)) __pyx_t_8 = 0; } else if (unlikely(__pyx_t_14 >= __pyx_pybuffernd_micros.diminfo[0].shape)) __pyx_t_8 = 0; if (unlikely(__pyx_t_8 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_8); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2083; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_micros.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_micros.diminfo[0].strides) = ((1000000LL * ((((__pyx_v_dts.hour * 60) * 60) + (60 * __pyx_v_dts.min)) + __pyx_v_dts.sec)) + __pyx_v_dts.us); } /* "pandas/tslib.pyx":2086 * 60 * dts.min + dts.sec) + dts.us * * return micros # <<<<<<<<<<<<<< * * @cython.wraparound(False) */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_micros)); __pyx_r = ((PyObject *)__pyx_v_micros); goto __pyx_L0; /* "pandas/tslib.pyx":2070 * return out * * def get_time_micros(ndarray[int64_t] dtindex): # <<<<<<<<<<<<<< * ''' * Datetime as int64 representation to a structured array of fields */ /* 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_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_dtindex.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_micros.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.tslib.get_time_micros", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_dtindex.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_micros.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_micros); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/tslib.pyx":2089 * * @cython.wraparound(False) * def get_date_field(ndarray[int64_t] dtindex, object field): # <<<<<<<<<<<<<< * ''' * Given a int64-based datetime index, extract the year, month, etc., */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5tslib_63get_date_field(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6pandas_5tslib_62get_date_field[] = "\n Given a int64-based datetime index, extract the year, month, etc.,\n field and return an array of these values.\n "; static PyMethodDef __pyx_mdef_6pandas_5tslib_63get_date_field = {__Pyx_NAMESTR("get_date_field"), (PyCFunction)__pyx_pw_6pandas_5tslib_63get_date_field, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_5tslib_62get_date_field)}; static PyObject *__pyx_pw_6pandas_5tslib_63get_date_field(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_dtindex = 0; PyObject *__pyx_v_field = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("get_date_field (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_dtindex,&__pyx_n_s_field,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_dtindex)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_field)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("get_date_field", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2089; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "get_date_field") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2089; __pyx_clineno = __LINE__; goto __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_dtindex = ((PyArrayObject *)values[0]); __pyx_v_field = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("get_date_field", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2089; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.tslib.get_date_field", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dtindex), __pyx_ptype_5numpy_ndarray, 1, "dtindex", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2089; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5tslib_62get_date_field(__pyx_self, __pyx_v_dtindex, __pyx_v_field); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5tslib_62get_date_field(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_dtindex, PyObject *__pyx_v_field) { struct __pyx_obj_6pandas_5tslib__TSObject *__pyx_v_ts = 0; Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_count; PyArrayObject *__pyx_v_out = 0; PyArrayObject *__pyx_v__month_offset = 0; int __pyx_v_isleap; int __pyx_v_isleap_prev; pandas_datetimestruct __pyx_v_dts; int __pyx_v_mo_off; int __pyx_v_doy; int __pyx_v_dow; int __pyx_v_woy; __Pyx_LocalBuf_ND __pyx_pybuffernd__month_offset; __Pyx_Buffer __pyx_pybuffer__month_offset; __Pyx_LocalBuf_ND __pyx_pybuffernd_dtindex; __Pyx_Buffer __pyx_pybuffer_dtindex; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; 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; Py_ssize_t __pyx_t_11; PyArrayObject *__pyx_t_12 = NULL; int __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; npy_int64 __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; npy_int32 __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; Py_ssize_t __pyx_t_37; Py_ssize_t __pyx_t_38; Py_ssize_t __pyx_t_39; Py_ssize_t __pyx_t_40; Py_ssize_t __pyx_t_41; Py_ssize_t __pyx_t_42; Py_ssize_t __pyx_t_43; Py_ssize_t __pyx_t_44; Py_ssize_t __pyx_t_45; Py_ssize_t __pyx_t_46; Py_ssize_t __pyx_t_47; Py_ssize_t __pyx_t_48; Py_ssize_t __pyx_t_49; Py_ssize_t __pyx_t_50; Py_ssize_t __pyx_t_51; long __pyx_t_52; int __pyx_t_53; Py_ssize_t __pyx_t_54; Py_ssize_t __pyx_t_55; Py_ssize_t __pyx_t_56; Py_ssize_t __pyx_t_57; Py_ssize_t __pyx_t_58; Py_ssize_t __pyx_t_59; Py_ssize_t __pyx_t_60; Py_ssize_t __pyx_t_61; Py_ssize_t __pyx_t_62; long __pyx_t_63; int __pyx_t_64; int __pyx_t_65; int __pyx_t_66; Py_ssize_t __pyx_t_67; Py_ssize_t __pyx_t_68; Py_ssize_t __pyx_t_69; Py_ssize_t __pyx_t_70; Py_ssize_t __pyx_t_71; Py_ssize_t __pyx_t_72; Py_ssize_t __pyx_t_73; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_date_field", 0); __pyx_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; __pyx_pybuffer__month_offset.pybuffer.buf = NULL; __pyx_pybuffer__month_offset.refcount = 0; __pyx_pybuffernd__month_offset.data = NULL; __pyx_pybuffernd__month_offset.rcbuffer = &__pyx_pybuffer__month_offset; __pyx_pybuffer_dtindex.pybuffer.buf = NULL; __pyx_pybuffer_dtindex.refcount = 0; __pyx_pybuffernd_dtindex.data = NULL; __pyx_pybuffernd_dtindex.rcbuffer = &__pyx_pybuffer_dtindex; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_dtindex.rcbuffer->pybuffer, (PyObject*)__pyx_v_dtindex, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2089; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_dtindex.diminfo[0].strides = __pyx_pybuffernd_dtindex.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_dtindex.diminfo[0].shape = __pyx_pybuffernd_dtindex.rcbuffer->pybuffer.shape[0]; /* "pandas/tslib.pyx":2096 * cdef: * _TSObject ts * Py_ssize_t i, count = 0 # <<<<<<<<<<<<<< * ndarray[int32_t] out * ndarray[int32_t, ndim=2] _month_offset */ __pyx_v_count = 0; /* "pandas/tslib.pyx":2103 * int mo_off, doy, dow, woy * * _month_offset = np.array( # <<<<<<<<<<<<<< * [[ 0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334, 365 ], * [ 0, 31, 60, 91, 121, 152, 182, 213, 244, 274, 305, 335, 366 ]], */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2103; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_array); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2103; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pandas/tslib.pyx":2104 * * _month_offset = np.array( * [[ 0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334, 365 ], # <<<<<<<<<<<<<< * [ 0, 31, 60, 91, 121, 152, 182, 213, 244, 274, 305, 335, 366 ]], * dtype=np.int32 ) */ __pyx_t_1 = PyList_New(13); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2104; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_int_0); PyList_SET_ITEM(__pyx_t_1, 0, __pyx_int_0); __Pyx_GIVEREF(__pyx_int_0); __Pyx_INCREF(__pyx_int_31); PyList_SET_ITEM(__pyx_t_1, 1, __pyx_int_31); __Pyx_GIVEREF(__pyx_int_31); __Pyx_INCREF(__pyx_int_59); PyList_SET_ITEM(__pyx_t_1, 2, __pyx_int_59); __Pyx_GIVEREF(__pyx_int_59); __Pyx_INCREF(__pyx_int_90); PyList_SET_ITEM(__pyx_t_1, 3, __pyx_int_90); __Pyx_GIVEREF(__pyx_int_90); __Pyx_INCREF(__pyx_int_120); PyList_SET_ITEM(__pyx_t_1, 4, __pyx_int_120); __Pyx_GIVEREF(__pyx_int_120); __Pyx_INCREF(__pyx_int_151); PyList_SET_ITEM(__pyx_t_1, 5, __pyx_int_151); __Pyx_GIVEREF(__pyx_int_151); __Pyx_INCREF(__pyx_int_181); PyList_SET_ITEM(__pyx_t_1, 6, __pyx_int_181); __Pyx_GIVEREF(__pyx_int_181); __Pyx_INCREF(__pyx_int_212); PyList_SET_ITEM(__pyx_t_1, 7, __pyx_int_212); __Pyx_GIVEREF(__pyx_int_212); __Pyx_INCREF(__pyx_int_243); PyList_SET_ITEM(__pyx_t_1, 8, __pyx_int_243); __Pyx_GIVEREF(__pyx_int_243); __Pyx_INCREF(__pyx_int_273); PyList_SET_ITEM(__pyx_t_1, 9, __pyx_int_273); __Pyx_GIVEREF(__pyx_int_273); __Pyx_INCREF(__pyx_int_304); PyList_SET_ITEM(__pyx_t_1, 10, __pyx_int_304); __Pyx_GIVEREF(__pyx_int_304); __Pyx_INCREF(__pyx_int_334); PyList_SET_ITEM(__pyx_t_1, 11, __pyx_int_334); __Pyx_GIVEREF(__pyx_int_334); __Pyx_INCREF(__pyx_int_365); PyList_SET_ITEM(__pyx_t_1, 12, __pyx_int_365); __Pyx_GIVEREF(__pyx_int_365); /* "pandas/tslib.pyx":2105 * _month_offset = np.array( * [[ 0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334, 365 ], * [ 0, 31, 60, 91, 121, 152, 182, 213, 244, 274, 305, 335, 366 ]], # <<<<<<<<<<<<<< * dtype=np.int32 ) * */ __pyx_t_3 = PyList_New(13); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2105; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_int_0); PyList_SET_ITEM(__pyx_t_3, 0, __pyx_int_0); __Pyx_GIVEREF(__pyx_int_0); __Pyx_INCREF(__pyx_int_31); PyList_SET_ITEM(__pyx_t_3, 1, __pyx_int_31); __Pyx_GIVEREF(__pyx_int_31); __Pyx_INCREF(__pyx_int_60); PyList_SET_ITEM(__pyx_t_3, 2, __pyx_int_60); __Pyx_GIVEREF(__pyx_int_60); __Pyx_INCREF(__pyx_int_91); PyList_SET_ITEM(__pyx_t_3, 3, __pyx_int_91); __Pyx_GIVEREF(__pyx_int_91); __Pyx_INCREF(__pyx_int_121); PyList_SET_ITEM(__pyx_t_3, 4, __pyx_int_121); __Pyx_GIVEREF(__pyx_int_121); __Pyx_INCREF(__pyx_int_152); PyList_SET_ITEM(__pyx_t_3, 5, __pyx_int_152); __Pyx_GIVEREF(__pyx_int_152); __Pyx_INCREF(__pyx_int_182); PyList_SET_ITEM(__pyx_t_3, 6, __pyx_int_182); __Pyx_GIVEREF(__pyx_int_182); __Pyx_INCREF(__pyx_int_213); PyList_SET_ITEM(__pyx_t_3, 7, __pyx_int_213); __Pyx_GIVEREF(__pyx_int_213); __Pyx_INCREF(__pyx_int_244); PyList_SET_ITEM(__pyx_t_3, 8, __pyx_int_244); __Pyx_GIVEREF(__pyx_int_244); __Pyx_INCREF(__pyx_int_274); PyList_SET_ITEM(__pyx_t_3, 9, __pyx_int_274); __Pyx_GIVEREF(__pyx_int_274); __Pyx_INCREF(__pyx_int_305); PyList_SET_ITEM(__pyx_t_3, 10, __pyx_int_305); __Pyx_GIVEREF(__pyx_int_305); __Pyx_INCREF(__pyx_int_335); PyList_SET_ITEM(__pyx_t_3, 11, __pyx_int_335); __Pyx_GIVEREF(__pyx_int_335); __Pyx_INCREF(__pyx_int_366); PyList_SET_ITEM(__pyx_t_3, 12, __pyx_int_366); __Pyx_GIVEREF(__pyx_int_366); /* "pandas/tslib.pyx":2104 * * _month_offset = np.array( * [[ 0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334, 365 ], # <<<<<<<<<<<<<< * [ 0, 31, 60, 91, 121, 152, 182, 213, 244, 274, 305, 335, 366 ]], * dtype=np.int32 ) */ __pyx_t_4 = PyList_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2104; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyList_SET_ITEM(__pyx_t_4, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); PyList_SET_ITEM(__pyx_t_4, 1, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_1 = 0; __pyx_t_3 = 0; /* "pandas/tslib.pyx":2103 * int mo_off, doy, dow, woy * * _month_offset = np.array( # <<<<<<<<<<<<<< * [[ 0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334, 365 ], * [ 0, 31, 60, 91, 121, 152, 182, 213, 244, 274, 305, 335, 366 ]], */ __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2103; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyDict_New(); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2103; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); /* "pandas/tslib.pyx":2106 * [[ 0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334, 365 ], * [ 0, 31, 60, 91, 121, 152, 182, 213, 244, 274, 305, 335, 366 ]], * dtype=np.int32 ) # <<<<<<<<<<<<<< * * count = len(dtindex) */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2106; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 2106; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_dtype, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2103; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "pandas/tslib.pyx":2103 * int mo_off, doy, dow, woy * * _month_offset = np.array( # <<<<<<<<<<<<<< * [[ 0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334, 365 ], * [ 0, 31, 60, 91, 121, 152, 182, 213, 244, 274, 305, 335, 366 ]], */ __pyx_t_5 = PyObject_Call(__pyx_t_2, __pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2103; __pyx_clineno = __LINE__; goto __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_4); __pyx_t_4 = 0; if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2103; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_6 = ((PyArrayObject *)__pyx_t_5); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd__month_offset.rcbuffer->pybuffer); __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd__month_offset.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 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__month_offset.rcbuffer->pybuffer, (PyObject*)__pyx_v__month_offset, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 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_pybuffernd__month_offset.diminfo[0].strides = __pyx_pybuffernd__month_offset.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd__month_offset.diminfo[0].shape = __pyx_pybuffernd__month_offset.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd__month_offset.diminfo[1].strides = __pyx_pybuffernd__month_offset.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd__month_offset.diminfo[1].shape = __pyx_pybuffernd__month_offset.rcbuffer->pybuffer.shape[1]; if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2103; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_6 = 0; __pyx_v__month_offset = ((PyArrayObject *)__pyx_t_5); __pyx_t_5 = 0; /* "pandas/tslib.pyx":2108 * dtype=np.int32 ) * * count = len(dtindex) # <<<<<<<<<<<<<< * out = np.empty(count, dtype='i4') * */ __pyx_t_11 = PyObject_Length(((PyObject *)__pyx_v_dtindex)); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2108; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_count = __pyx_t_11; /* "pandas/tslib.pyx":2109 * * count = len(dtindex) * out = np.empty(count, dtype='i4') # <<<<<<<<<<<<<< * * if field == 'Y': */ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2109; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_empty); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2109; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyInt_FromSsize_t(__pyx_v_count); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2109; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2109; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyDict_New(); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2109; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_dtype, __pyx_n_s_i4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2109; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_2 = PyObject_Call(__pyx_t_4, __pyx_t_3, __pyx_t_5); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2109; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2109; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_12 = ((PyArrayObject *)__pyx_t_2); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_t_12, &__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.rcbuffer->pybuffer, (PyObject*)__pyx_v_out, &__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_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_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2109; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_12 = 0; __pyx_v_out = ((PyArrayObject *)__pyx_t_2); __pyx_t_2 = 0; /* "pandas/tslib.pyx":2111 * out = np.empty(count, dtype='i4') * * if field == 'Y': # <<<<<<<<<<<<<< * for i in range(count): * if dtindex[i] == NPY_NAT: out[i] = -1; continue */ __pyx_t_13 = (__Pyx_PyString_Equals(__pyx_v_field, __pyx_n_s_Y, Py_EQ)); if (unlikely(__pyx_t_13 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2111; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__pyx_t_13) { /* "pandas/tslib.pyx":2112 * * if field == 'Y': * for i in range(count): # <<<<<<<<<<<<<< * if dtindex[i] == NPY_NAT: out[i] = -1; continue * */ __pyx_t_11 = __pyx_v_count; for (__pyx_t_14 = 0; __pyx_t_14 < __pyx_t_11; __pyx_t_14+=1) { __pyx_v_i = __pyx_t_14; /* "pandas/tslib.pyx":2113 * if field == 'Y': * for i in range(count): * if dtindex[i] == NPY_NAT: out[i] = -1; continue # <<<<<<<<<<<<<< * * pandas_datetime_to_datetimestruct(dtindex[i], PANDAS_FR_ns, &dts) */ __pyx_t_15 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_15 < 0) { __pyx_t_7 = 0; } else if (unlikely(__pyx_t_15 >= __pyx_pybuffernd_dtindex.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2113; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_13 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_dtindex.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_dtindex.diminfo[0].strides)) == __pyx_v_6pandas_5tslib_NPY_NAT) != 0); if (__pyx_t_13) { __pyx_t_16 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_16 < 0) { __pyx_t_7 = 0; } else if (unlikely(__pyx_t_16 >= __pyx_pybuffernd_out.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2113; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_out.diminfo[0].strides) = -1; goto __pyx_L4_continue; } /* "pandas/tslib.pyx":2115 * if dtindex[i] == NPY_NAT: out[i] = -1; continue * * pandas_datetime_to_datetimestruct(dtindex[i], PANDAS_FR_ns, &dts) # <<<<<<<<<<<<<< * out[i] = dts.year * return out */ __pyx_t_17 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_17 < 0) { __pyx_t_7 = 0; } else if (unlikely(__pyx_t_17 >= __pyx_pybuffernd_dtindex.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2115; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } pandas_datetime_to_datetimestruct((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_dtindex.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_dtindex.diminfo[0].strides)), PANDAS_FR_ns, (&__pyx_v_dts)); /* "pandas/tslib.pyx":2116 * * pandas_datetime_to_datetimestruct(dtindex[i], PANDAS_FR_ns, &dts) * out[i] = dts.year # <<<<<<<<<<<<<< * return out * */ __pyx_t_18 = __pyx_v_dts.year; __pyx_t_19 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_19 < 0) { __pyx_t_7 = 0; } else if (unlikely(__pyx_t_19 >= __pyx_pybuffernd_out.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2116; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_out.diminfo[0].strides) = __pyx_t_18; __pyx_L4_continue:; } /* "pandas/tslib.pyx":2117 * pandas_datetime_to_datetimestruct(dtindex[i], PANDAS_FR_ns, &dts) * out[i] = dts.year * return out # <<<<<<<<<<<<<< * * elif field == 'M': */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_out)); __pyx_r = ((PyObject *)__pyx_v_out); goto __pyx_L0; } /* "pandas/tslib.pyx":2119 * return out * * elif field == 'M': # <<<<<<<<<<<<<< * for i in range(count): * if dtindex[i] == NPY_NAT: out[i] = -1; continue */ __pyx_t_13 = (__Pyx_PyString_Equals(__pyx_v_field, __pyx_n_s_M, Py_EQ)); if (unlikely(__pyx_t_13 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2119; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__pyx_t_13) { /* "pandas/tslib.pyx":2120 * * elif field == 'M': * for i in range(count): # <<<<<<<<<<<<<< * if dtindex[i] == NPY_NAT: out[i] = -1; continue * */ __pyx_t_11 = __pyx_v_count; for (__pyx_t_14 = 0; __pyx_t_14 < __pyx_t_11; __pyx_t_14+=1) { __pyx_v_i = __pyx_t_14; /* "pandas/tslib.pyx":2121 * elif field == 'M': * for i in range(count): * if dtindex[i] == NPY_NAT: out[i] = -1; continue # <<<<<<<<<<<<<< * * pandas_datetime_to_datetimestruct(dtindex[i], PANDAS_FR_ns, &dts) */ __pyx_t_20 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_20 < 0) { __pyx_t_7 = 0; } else if (unlikely(__pyx_t_20 >= __pyx_pybuffernd_dtindex.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2121; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_13 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_dtindex.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_dtindex.diminfo[0].strides)) == __pyx_v_6pandas_5tslib_NPY_NAT) != 0); if (__pyx_t_13) { __pyx_t_21 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_21 < 0) { __pyx_t_7 = 0; } else if (unlikely(__pyx_t_21 >= __pyx_pybuffernd_out.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2121; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_out.diminfo[0].strides) = -1; goto __pyx_L7_continue; } /* "pandas/tslib.pyx":2123 * if dtindex[i] == NPY_NAT: out[i] = -1; continue * * pandas_datetime_to_datetimestruct(dtindex[i], PANDAS_FR_ns, &dts) # <<<<<<<<<<<<<< * out[i] = dts.month * return out */ __pyx_t_22 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_22 < 0) { __pyx_t_7 = 0; } else if (unlikely(__pyx_t_22 >= __pyx_pybuffernd_dtindex.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2123; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } pandas_datetime_to_datetimestruct((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_dtindex.rcbuffer->pybuffer.buf, __pyx_t_22, __pyx_pybuffernd_dtindex.diminfo[0].strides)), PANDAS_FR_ns, (&__pyx_v_dts)); /* "pandas/tslib.pyx":2124 * * pandas_datetime_to_datetimestruct(dtindex[i], PANDAS_FR_ns, &dts) * out[i] = dts.month # <<<<<<<<<<<<<< * return out * */ __pyx_t_23 = __pyx_v_dts.month; __pyx_t_24 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_24 < 0) { __pyx_t_7 = 0; } else if (unlikely(__pyx_t_24 >= __pyx_pybuffernd_out.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2124; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_24, __pyx_pybuffernd_out.diminfo[0].strides) = __pyx_t_23; __pyx_L7_continue:; } /* "pandas/tslib.pyx":2125 * pandas_datetime_to_datetimestruct(dtindex[i], PANDAS_FR_ns, &dts) * out[i] = dts.month * return out # <<<<<<<<<<<<<< * * elif field == 'D': */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_out)); __pyx_r = ((PyObject *)__pyx_v_out); goto __pyx_L0; } /* "pandas/tslib.pyx":2127 * return out * * elif field == 'D': # <<<<<<<<<<<<<< * for i in range(count): * if dtindex[i] == NPY_NAT: out[i] = -1; continue */ __pyx_t_13 = (__Pyx_PyString_Equals(__pyx_v_field, __pyx_n_s_D, Py_EQ)); if (unlikely(__pyx_t_13 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2127; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__pyx_t_13) { /* "pandas/tslib.pyx":2128 * * elif field == 'D': * for i in range(count): # <<<<<<<<<<<<<< * if dtindex[i] == NPY_NAT: out[i] = -1; continue * */ __pyx_t_11 = __pyx_v_count; for (__pyx_t_14 = 0; __pyx_t_14 < __pyx_t_11; __pyx_t_14+=1) { __pyx_v_i = __pyx_t_14; /* "pandas/tslib.pyx":2129 * elif field == 'D': * for i in range(count): * if dtindex[i] == NPY_NAT: out[i] = -1; continue # <<<<<<<<<<<<<< * * pandas_datetime_to_datetimestruct(dtindex[i], PANDAS_FR_ns, &dts) */ __pyx_t_25 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_25 < 0) { __pyx_t_7 = 0; } else if (unlikely(__pyx_t_25 >= __pyx_pybuffernd_dtindex.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2129; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_13 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_dtindex.rcbuffer->pybuffer.buf, __pyx_t_25, __pyx_pybuffernd_dtindex.diminfo[0].strides)) == __pyx_v_6pandas_5tslib_NPY_NAT) != 0); if (__pyx_t_13) { __pyx_t_26 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_26 < 0) { __pyx_t_7 = 0; } else if (unlikely(__pyx_t_26 >= __pyx_pybuffernd_out.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2129; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_26, __pyx_pybuffernd_out.diminfo[0].strides) = -1; goto __pyx_L10_continue; } /* "pandas/tslib.pyx":2131 * if dtindex[i] == NPY_NAT: out[i] = -1; continue * * pandas_datetime_to_datetimestruct(dtindex[i], PANDAS_FR_ns, &dts) # <<<<<<<<<<<<<< * out[i] = dts.day * return out */ __pyx_t_27 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_27 < 0) { __pyx_t_7 = 0; } else if (unlikely(__pyx_t_27 >= __pyx_pybuffernd_dtindex.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2131; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } pandas_datetime_to_datetimestruct((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_dtindex.rcbuffer->pybuffer.buf, __pyx_t_27, __pyx_pybuffernd_dtindex.diminfo[0].strides)), PANDAS_FR_ns, (&__pyx_v_dts)); /* "pandas/tslib.pyx":2132 * * pandas_datetime_to_datetimestruct(dtindex[i], PANDAS_FR_ns, &dts) * out[i] = dts.day # <<<<<<<<<<<<<< * return out * */ __pyx_t_23 = __pyx_v_dts.day; __pyx_t_28 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_28 < 0) { __pyx_t_7 = 0; } else if (unlikely(__pyx_t_28 >= __pyx_pybuffernd_out.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2132; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_28, __pyx_pybuffernd_out.diminfo[0].strides) = __pyx_t_23; __pyx_L10_continue:; } /* "pandas/tslib.pyx":2133 * pandas_datetime_to_datetimestruct(dtindex[i], PANDAS_FR_ns, &dts) * out[i] = dts.day * return out # <<<<<<<<<<<<<< * * elif field == 'h': */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_out)); __pyx_r = ((PyObject *)__pyx_v_out); goto __pyx_L0; } /* "pandas/tslib.pyx":2135 * return out * * elif field == 'h': # <<<<<<<<<<<<<< * for i in range(count): * if dtindex[i] == NPY_NAT: out[i] = -1; continue */ __pyx_t_13 = (__Pyx_PyString_Equals(__pyx_v_field, __pyx_n_s_h, Py_EQ)); if (unlikely(__pyx_t_13 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2135; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__pyx_t_13) { /* "pandas/tslib.pyx":2136 * * elif field == 'h': * for i in range(count): # <<<<<<<<<<<<<< * if dtindex[i] == NPY_NAT: out[i] = -1; continue * */ __pyx_t_11 = __pyx_v_count; for (__pyx_t_14 = 0; __pyx_t_14 < __pyx_t_11; __pyx_t_14+=1) { __pyx_v_i = __pyx_t_14; /* "pandas/tslib.pyx":2137 * elif field == 'h': * for i in range(count): * if dtindex[i] == NPY_NAT: out[i] = -1; continue # <<<<<<<<<<<<<< * * pandas_datetime_to_datetimestruct(dtindex[i], PANDAS_FR_ns, &dts) */ __pyx_t_29 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_29 < 0) { __pyx_t_7 = 0; } else if (unlikely(__pyx_t_29 >= __pyx_pybuffernd_dtindex.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2137; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_13 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_dtindex.rcbuffer->pybuffer.buf, __pyx_t_29, __pyx_pybuffernd_dtindex.diminfo[0].strides)) == __pyx_v_6pandas_5tslib_NPY_NAT) != 0); if (__pyx_t_13) { __pyx_t_30 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_30 < 0) { __pyx_t_7 = 0; } else if (unlikely(__pyx_t_30 >= __pyx_pybuffernd_out.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2137; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_30, __pyx_pybuffernd_out.diminfo[0].strides) = -1; goto __pyx_L13_continue; } /* "pandas/tslib.pyx":2139 * if dtindex[i] == NPY_NAT: out[i] = -1; continue * * pandas_datetime_to_datetimestruct(dtindex[i], PANDAS_FR_ns, &dts) # <<<<<<<<<<<<<< * out[i] = dts.hour * return out */ __pyx_t_31 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_31 < 0) { __pyx_t_7 = 0; } else if (unlikely(__pyx_t_31 >= __pyx_pybuffernd_dtindex.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2139; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } pandas_datetime_to_datetimestruct((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_dtindex.rcbuffer->pybuffer.buf, __pyx_t_31, __pyx_pybuffernd_dtindex.diminfo[0].strides)), PANDAS_FR_ns, (&__pyx_v_dts)); /* "pandas/tslib.pyx":2140 * * pandas_datetime_to_datetimestruct(dtindex[i], PANDAS_FR_ns, &dts) * out[i] = dts.hour # <<<<<<<<<<<<<< * return out * */ __pyx_t_23 = __pyx_v_dts.hour; __pyx_t_32 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_32 < 0) { __pyx_t_7 = 0; } else if (unlikely(__pyx_t_32 >= __pyx_pybuffernd_out.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2140; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_32, __pyx_pybuffernd_out.diminfo[0].strides) = __pyx_t_23; __pyx_L13_continue:; } /* "pandas/tslib.pyx":2141 * pandas_datetime_to_datetimestruct(dtindex[i], PANDAS_FR_ns, &dts) * out[i] = dts.hour * return out # <<<<<<<<<<<<<< * * elif field == 'm': */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_out)); __pyx_r = ((PyObject *)__pyx_v_out); goto __pyx_L0; } /* "pandas/tslib.pyx":2143 * return out * * elif field == 'm': # <<<<<<<<<<<<<< * for i in range(count): * if dtindex[i] == NPY_NAT: out[i] = -1; continue */ __pyx_t_13 = (__Pyx_PyString_Equals(__pyx_v_field, __pyx_n_s_m, Py_EQ)); if (unlikely(__pyx_t_13 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2143; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__pyx_t_13) { /* "pandas/tslib.pyx":2144 * * elif field == 'm': * for i in range(count): # <<<<<<<<<<<<<< * if dtindex[i] == NPY_NAT: out[i] = -1; continue * */ __pyx_t_11 = __pyx_v_count; for (__pyx_t_14 = 0; __pyx_t_14 < __pyx_t_11; __pyx_t_14+=1) { __pyx_v_i = __pyx_t_14; /* "pandas/tslib.pyx":2145 * elif field == 'm': * for i in range(count): * if dtindex[i] == NPY_NAT: out[i] = -1; continue # <<<<<<<<<<<<<< * * pandas_datetime_to_datetimestruct(dtindex[i], PANDAS_FR_ns, &dts) */ __pyx_t_33 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_33 < 0) { __pyx_t_7 = 0; } else if (unlikely(__pyx_t_33 >= __pyx_pybuffernd_dtindex.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2145; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_13 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_dtindex.rcbuffer->pybuffer.buf, __pyx_t_33, __pyx_pybuffernd_dtindex.diminfo[0].strides)) == __pyx_v_6pandas_5tslib_NPY_NAT) != 0); if (__pyx_t_13) { __pyx_t_34 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_34 < 0) { __pyx_t_7 = 0; } else if (unlikely(__pyx_t_34 >= __pyx_pybuffernd_out.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2145; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_34, __pyx_pybuffernd_out.diminfo[0].strides) = -1; goto __pyx_L16_continue; } /* "pandas/tslib.pyx":2147 * if dtindex[i] == NPY_NAT: out[i] = -1; continue * * pandas_datetime_to_datetimestruct(dtindex[i], PANDAS_FR_ns, &dts) # <<<<<<<<<<<<<< * out[i] = dts.min * return out */ __pyx_t_35 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_35 < 0) { __pyx_t_7 = 0; } else if (unlikely(__pyx_t_35 >= __pyx_pybuffernd_dtindex.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2147; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } pandas_datetime_to_datetimestruct((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_dtindex.rcbuffer->pybuffer.buf, __pyx_t_35, __pyx_pybuffernd_dtindex.diminfo[0].strides)), PANDAS_FR_ns, (&__pyx_v_dts)); /* "pandas/tslib.pyx":2148 * * pandas_datetime_to_datetimestruct(dtindex[i], PANDAS_FR_ns, &dts) * out[i] = dts.min # <<<<<<<<<<<<<< * return out * */ __pyx_t_23 = __pyx_v_dts.min; __pyx_t_36 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_36 < 0) { __pyx_t_7 = 0; } else if (unlikely(__pyx_t_36 >= __pyx_pybuffernd_out.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2148; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_36, __pyx_pybuffernd_out.diminfo[0].strides) = __pyx_t_23; __pyx_L16_continue:; } /* "pandas/tslib.pyx":2149 * pandas_datetime_to_datetimestruct(dtindex[i], PANDAS_FR_ns, &dts) * out[i] = dts.min * return out # <<<<<<<<<<<<<< * * elif field == 's': */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_out)); __pyx_r = ((PyObject *)__pyx_v_out); goto __pyx_L0; } /* "pandas/tslib.pyx":2151 * return out * * elif field == 's': # <<<<<<<<<<<<<< * for i in range(count): * if dtindex[i] == NPY_NAT: out[i] = -1; continue */ __pyx_t_13 = (__Pyx_PyString_Equals(__pyx_v_field, __pyx_n_s_s_2, Py_EQ)); if (unlikely(__pyx_t_13 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2151; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__pyx_t_13) { /* "pandas/tslib.pyx":2152 * * elif field == 's': * for i in range(count): # <<<<<<<<<<<<<< * if dtindex[i] == NPY_NAT: out[i] = -1; continue * */ __pyx_t_11 = __pyx_v_count; for (__pyx_t_14 = 0; __pyx_t_14 < __pyx_t_11; __pyx_t_14+=1) { __pyx_v_i = __pyx_t_14; /* "pandas/tslib.pyx":2153 * elif field == 's': * for i in range(count): * if dtindex[i] == NPY_NAT: out[i] = -1; continue # <<<<<<<<<<<<<< * * pandas_datetime_to_datetimestruct(dtindex[i], PANDAS_FR_ns, &dts) */ __pyx_t_37 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_37 < 0) { __pyx_t_7 = 0; } else if (unlikely(__pyx_t_37 >= __pyx_pybuffernd_dtindex.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2153; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_13 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_dtindex.rcbuffer->pybuffer.buf, __pyx_t_37, __pyx_pybuffernd_dtindex.diminfo[0].strides)) == __pyx_v_6pandas_5tslib_NPY_NAT) != 0); if (__pyx_t_13) { __pyx_t_38 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_38 < 0) { __pyx_t_7 = 0; } else if (unlikely(__pyx_t_38 >= __pyx_pybuffernd_out.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2153; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_38, __pyx_pybuffernd_out.diminfo[0].strides) = -1; goto __pyx_L19_continue; } /* "pandas/tslib.pyx":2155 * if dtindex[i] == NPY_NAT: out[i] = -1; continue * * pandas_datetime_to_datetimestruct(dtindex[i], PANDAS_FR_ns, &dts) # <<<<<<<<<<<<<< * out[i] = dts.sec * return out */ __pyx_t_39 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_39 < 0) { __pyx_t_7 = 0; } else if (unlikely(__pyx_t_39 >= __pyx_pybuffernd_dtindex.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2155; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } pandas_datetime_to_datetimestruct((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_dtindex.rcbuffer->pybuffer.buf, __pyx_t_39, __pyx_pybuffernd_dtindex.diminfo[0].strides)), PANDAS_FR_ns, (&__pyx_v_dts)); /* "pandas/tslib.pyx":2156 * * pandas_datetime_to_datetimestruct(dtindex[i], PANDAS_FR_ns, &dts) * out[i] = dts.sec # <<<<<<<<<<<<<< * return out * */ __pyx_t_23 = __pyx_v_dts.sec; __pyx_t_40 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_40 < 0) { __pyx_t_7 = 0; } else if (unlikely(__pyx_t_40 >= __pyx_pybuffernd_out.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2156; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_40, __pyx_pybuffernd_out.diminfo[0].strides) = __pyx_t_23; __pyx_L19_continue:; } /* "pandas/tslib.pyx":2157 * pandas_datetime_to_datetimestruct(dtindex[i], PANDAS_FR_ns, &dts) * out[i] = dts.sec * return out # <<<<<<<<<<<<<< * * elif field == 'us': */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_out)); __pyx_r = ((PyObject *)__pyx_v_out); goto __pyx_L0; } /* "pandas/tslib.pyx":2159 * return out * * elif field == 'us': # <<<<<<<<<<<<<< * for i in range(count): * if dtindex[i] == NPY_NAT: out[i] = -1; continue */ __pyx_t_13 = (__Pyx_PyString_Equals(__pyx_v_field, __pyx_n_s_us, Py_EQ)); if (unlikely(__pyx_t_13 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2159; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__pyx_t_13) { /* "pandas/tslib.pyx":2160 * * elif field == 'us': * for i in range(count): # <<<<<<<<<<<<<< * if dtindex[i] == NPY_NAT: out[i] = -1; continue * */ __pyx_t_11 = __pyx_v_count; for (__pyx_t_14 = 0; __pyx_t_14 < __pyx_t_11; __pyx_t_14+=1) { __pyx_v_i = __pyx_t_14; /* "pandas/tslib.pyx":2161 * elif field == 'us': * for i in range(count): * if dtindex[i] == NPY_NAT: out[i] = -1; continue # <<<<<<<<<<<<<< * * pandas_datetime_to_datetimestruct(dtindex[i], PANDAS_FR_ns, &dts) */ __pyx_t_41 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_41 < 0) { __pyx_t_7 = 0; } else if (unlikely(__pyx_t_41 >= __pyx_pybuffernd_dtindex.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2161; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_13 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_dtindex.rcbuffer->pybuffer.buf, __pyx_t_41, __pyx_pybuffernd_dtindex.diminfo[0].strides)) == __pyx_v_6pandas_5tslib_NPY_NAT) != 0); if (__pyx_t_13) { __pyx_t_42 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_42 < 0) { __pyx_t_7 = 0; } else if (unlikely(__pyx_t_42 >= __pyx_pybuffernd_out.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2161; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_42, __pyx_pybuffernd_out.diminfo[0].strides) = -1; goto __pyx_L22_continue; } /* "pandas/tslib.pyx":2163 * if dtindex[i] == NPY_NAT: out[i] = -1; continue * * pandas_datetime_to_datetimestruct(dtindex[i], PANDAS_FR_ns, &dts) # <<<<<<<<<<<<<< * out[i] = dts.us * return out */ __pyx_t_43 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_43 < 0) { __pyx_t_7 = 0; } else if (unlikely(__pyx_t_43 >= __pyx_pybuffernd_dtindex.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2163; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } pandas_datetime_to_datetimestruct((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_dtindex.rcbuffer->pybuffer.buf, __pyx_t_43, __pyx_pybuffernd_dtindex.diminfo[0].strides)), PANDAS_FR_ns, (&__pyx_v_dts)); /* "pandas/tslib.pyx":2164 * * pandas_datetime_to_datetimestruct(dtindex[i], PANDAS_FR_ns, &dts) * out[i] = dts.us # <<<<<<<<<<<<<< * return out * elif field == 'ns': */ __pyx_t_23 = __pyx_v_dts.us; __pyx_t_44 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_44 < 0) { __pyx_t_7 = 0; } else if (unlikely(__pyx_t_44 >= __pyx_pybuffernd_out.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2164; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_44, __pyx_pybuffernd_out.diminfo[0].strides) = __pyx_t_23; __pyx_L22_continue:; } /* "pandas/tslib.pyx":2165 * pandas_datetime_to_datetimestruct(dtindex[i], PANDAS_FR_ns, &dts) * out[i] = dts.us * return out # <<<<<<<<<<<<<< * elif field == 'ns': * for i in range(count): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_out)); __pyx_r = ((PyObject *)__pyx_v_out); goto __pyx_L0; } /* "pandas/tslib.pyx":2166 * out[i] = dts.us * return out * elif field == 'ns': # <<<<<<<<<<<<<< * for i in range(count): * if dtindex[i] == NPY_NAT: out[i] = -1; continue */ __pyx_t_13 = (__Pyx_PyString_Equals(__pyx_v_field, __pyx_n_s_ns, Py_EQ)); if (unlikely(__pyx_t_13 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2166; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__pyx_t_13) { /* "pandas/tslib.pyx":2167 * return out * elif field == 'ns': * for i in range(count): # <<<<<<<<<<<<<< * if dtindex[i] == NPY_NAT: out[i] = -1; continue * */ __pyx_t_11 = __pyx_v_count; for (__pyx_t_14 = 0; __pyx_t_14 < __pyx_t_11; __pyx_t_14+=1) { __pyx_v_i = __pyx_t_14; /* "pandas/tslib.pyx":2168 * elif field == 'ns': * for i in range(count): * if dtindex[i] == NPY_NAT: out[i] = -1; continue # <<<<<<<<<<<<<< * * pandas_datetime_to_datetimestruct(dtindex[i], PANDAS_FR_ns, &dts) */ __pyx_t_45 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_45 < 0) { __pyx_t_7 = 0; } else if (unlikely(__pyx_t_45 >= __pyx_pybuffernd_dtindex.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2168; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_13 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_dtindex.rcbuffer->pybuffer.buf, __pyx_t_45, __pyx_pybuffernd_dtindex.diminfo[0].strides)) == __pyx_v_6pandas_5tslib_NPY_NAT) != 0); if (__pyx_t_13) { __pyx_t_46 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_46 < 0) { __pyx_t_7 = 0; } else if (unlikely(__pyx_t_46 >= __pyx_pybuffernd_out.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2168; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_46, __pyx_pybuffernd_out.diminfo[0].strides) = -1; goto __pyx_L25_continue; } /* "pandas/tslib.pyx":2170 * if dtindex[i] == NPY_NAT: out[i] = -1; continue * * pandas_datetime_to_datetimestruct(dtindex[i], PANDAS_FR_ns, &dts) # <<<<<<<<<<<<<< * out[i] = dts.ps / 1000 * return out */ __pyx_t_47 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_47 < 0) { __pyx_t_7 = 0; } else if (unlikely(__pyx_t_47 >= __pyx_pybuffernd_dtindex.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2170; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } pandas_datetime_to_datetimestruct((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_dtindex.rcbuffer->pybuffer.buf, __pyx_t_47, __pyx_pybuffernd_dtindex.diminfo[0].strides)), PANDAS_FR_ns, (&__pyx_v_dts)); /* "pandas/tslib.pyx":2171 * * pandas_datetime_to_datetimestruct(dtindex[i], PANDAS_FR_ns, &dts) * out[i] = dts.ps / 1000 # <<<<<<<<<<<<<< * return out * elif field == 'doy': */ __pyx_t_48 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_48 < 0) { __pyx_t_7 = 0; } else if (unlikely(__pyx_t_48 >= __pyx_pybuffernd_out.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2171; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_48, __pyx_pybuffernd_out.diminfo[0].strides) = __Pyx_div_long(__pyx_v_dts.ps, 1000); __pyx_L25_continue:; } /* "pandas/tslib.pyx":2172 * pandas_datetime_to_datetimestruct(dtindex[i], PANDAS_FR_ns, &dts) * out[i] = dts.ps / 1000 * return out # <<<<<<<<<<<<<< * elif field == 'doy': * for i in range(count): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_out)); __pyx_r = ((PyObject *)__pyx_v_out); goto __pyx_L0; } /* "pandas/tslib.pyx":2173 * out[i] = dts.ps / 1000 * return out * elif field == 'doy': # <<<<<<<<<<<<<< * for i in range(count): * if dtindex[i] == NPY_NAT: out[i] = -1; continue */ __pyx_t_13 = (__Pyx_PyString_Equals(__pyx_v_field, __pyx_n_s_doy, Py_EQ)); if (unlikely(__pyx_t_13 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2173; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__pyx_t_13) { /* "pandas/tslib.pyx":2174 * return out * elif field == 'doy': * for i in range(count): # <<<<<<<<<<<<<< * if dtindex[i] == NPY_NAT: out[i] = -1; continue * */ __pyx_t_11 = __pyx_v_count; for (__pyx_t_14 = 0; __pyx_t_14 < __pyx_t_11; __pyx_t_14+=1) { __pyx_v_i = __pyx_t_14; /* "pandas/tslib.pyx":2175 * elif field == 'doy': * for i in range(count): * if dtindex[i] == NPY_NAT: out[i] = -1; continue # <<<<<<<<<<<<<< * * pandas_datetime_to_datetimestruct(dtindex[i], PANDAS_FR_ns, &dts) */ __pyx_t_49 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_49 < 0) { __pyx_t_7 = 0; } else if (unlikely(__pyx_t_49 >= __pyx_pybuffernd_dtindex.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2175; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_13 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_dtindex.rcbuffer->pybuffer.buf, __pyx_t_49, __pyx_pybuffernd_dtindex.diminfo[0].strides)) == __pyx_v_6pandas_5tslib_NPY_NAT) != 0); if (__pyx_t_13) { __pyx_t_50 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_50 < 0) { __pyx_t_7 = 0; } else if (unlikely(__pyx_t_50 >= __pyx_pybuffernd_out.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2175; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_50, __pyx_pybuffernd_out.diminfo[0].strides) = -1; goto __pyx_L28_continue; } /* "pandas/tslib.pyx":2177 * if dtindex[i] == NPY_NAT: out[i] = -1; continue * * pandas_datetime_to_datetimestruct(dtindex[i], PANDAS_FR_ns, &dts) # <<<<<<<<<<<<<< * isleap = is_leapyear(dts.year) * out[i] = _month_offset[isleap, dts.month-1] + dts.day */ __pyx_t_51 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_51 < 0) { __pyx_t_7 = 0; } else if (unlikely(__pyx_t_51 >= __pyx_pybuffernd_dtindex.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2177; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } pandas_datetime_to_datetimestruct((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_dtindex.rcbuffer->pybuffer.buf, __pyx_t_51, __pyx_pybuffernd_dtindex.diminfo[0].strides)), PANDAS_FR_ns, (&__pyx_v_dts)); /* "pandas/tslib.pyx":2178 * * pandas_datetime_to_datetimestruct(dtindex[i], PANDAS_FR_ns, &dts) * isleap = is_leapyear(dts.year) # <<<<<<<<<<<<<< * out[i] = _month_offset[isleap, dts.month-1] + dts.day * return out */ __pyx_v_isleap = is_leapyear(__pyx_v_dts.year); /* "pandas/tslib.pyx":2179 * pandas_datetime_to_datetimestruct(dtindex[i], PANDAS_FR_ns, &dts) * isleap = is_leapyear(dts.year) * out[i] = _month_offset[isleap, dts.month-1] + dts.day # <<<<<<<<<<<<<< * return out * */ __pyx_t_7 = __pyx_v_isleap; __pyx_t_52 = (__pyx_v_dts.month - 1); __pyx_t_53 = -1; if (__pyx_t_7 < 0) { __pyx_t_53 = 0; } else if (unlikely(__pyx_t_7 >= __pyx_pybuffernd__month_offset.diminfo[0].shape)) __pyx_t_53 = 0; if (__pyx_t_52 < 0) { __pyx_t_53 = 1; } else if (unlikely(__pyx_t_52 >= __pyx_pybuffernd__month_offset.diminfo[1].shape)) __pyx_t_53 = 1; if (unlikely(__pyx_t_53 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_53); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2179; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_54 = __pyx_v_i; __pyx_t_53 = -1; if (__pyx_t_54 < 0) { __pyx_t_53 = 0; } else if (unlikely(__pyx_t_54 >= __pyx_pybuffernd_out.diminfo[0].shape)) __pyx_t_53 = 0; if (unlikely(__pyx_t_53 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_53); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2179; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_54, __pyx_pybuffernd_out.diminfo[0].strides) = ((*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd__month_offset.rcbuffer->pybuffer.buf, __pyx_t_7, __pyx_pybuffernd__month_offset.diminfo[0].strides, __pyx_t_52, __pyx_pybuffernd__month_offset.diminfo[1].strides)) + __pyx_v_dts.day); __pyx_L28_continue:; } /* "pandas/tslib.pyx":2180 * isleap = is_leapyear(dts.year) * out[i] = _month_offset[isleap, dts.month-1] + dts.day * return out # <<<<<<<<<<<<<< * * elif field == 'dow': */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_out)); __pyx_r = ((PyObject *)__pyx_v_out); goto __pyx_L0; } /* "pandas/tslib.pyx":2182 * return out * * elif field == 'dow': # <<<<<<<<<<<<<< * for i in range(count): * if dtindex[i] == NPY_NAT: out[i] = -1; continue */ __pyx_t_13 = (__Pyx_PyString_Equals(__pyx_v_field, __pyx_n_s_dow, Py_EQ)); if (unlikely(__pyx_t_13 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2182; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__pyx_t_13) { /* "pandas/tslib.pyx":2183 * * elif field == 'dow': * for i in range(count): # <<<<<<<<<<<<<< * if dtindex[i] == NPY_NAT: out[i] = -1; continue * */ __pyx_t_11 = __pyx_v_count; for (__pyx_t_14 = 0; __pyx_t_14 < __pyx_t_11; __pyx_t_14+=1) { __pyx_v_i = __pyx_t_14; /* "pandas/tslib.pyx":2184 * elif field == 'dow': * for i in range(count): * if dtindex[i] == NPY_NAT: out[i] = -1; continue # <<<<<<<<<<<<<< * * ts = convert_to_tsobject(dtindex[i], None, None) */ __pyx_t_55 = __pyx_v_i; __pyx_t_53 = -1; if (__pyx_t_55 < 0) { __pyx_t_53 = 0; } else if (unlikely(__pyx_t_55 >= __pyx_pybuffernd_dtindex.diminfo[0].shape)) __pyx_t_53 = 0; if (unlikely(__pyx_t_53 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_53); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2184; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_13 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_dtindex.rcbuffer->pybuffer.buf, __pyx_t_55, __pyx_pybuffernd_dtindex.diminfo[0].strides)) == __pyx_v_6pandas_5tslib_NPY_NAT) != 0); if (__pyx_t_13) { __pyx_t_56 = __pyx_v_i; __pyx_t_53 = -1; if (__pyx_t_56 < 0) { __pyx_t_53 = 0; } else if (unlikely(__pyx_t_56 >= __pyx_pybuffernd_out.diminfo[0].shape)) __pyx_t_53 = 0; if (unlikely(__pyx_t_53 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_53); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2184; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_56, __pyx_pybuffernd_out.diminfo[0].strides) = -1; goto __pyx_L31_continue; } /* "pandas/tslib.pyx":2186 * if dtindex[i] == NPY_NAT: out[i] = -1; continue * * ts = convert_to_tsobject(dtindex[i], None, None) # <<<<<<<<<<<<<< * out[i] = ts_dayofweek(ts) * return out */ __pyx_t_57 = __pyx_v_i; __pyx_t_53 = -1; if (__pyx_t_57 < 0) { __pyx_t_53 = 0; } else if (unlikely(__pyx_t_57 >= __pyx_pybuffernd_dtindex.diminfo[0].shape)) __pyx_t_53 = 0; if (unlikely(__pyx_t_53 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_53); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2186; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_2 = __Pyx_PyInt_From_npy_int64((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_dtindex.rcbuffer->pybuffer.buf, __pyx_t_57, __pyx_pybuffernd_dtindex.diminfo[0].strides))); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2186; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = __pyx_f_6pandas_5tslib_convert_to_tsobject(__pyx_t_2, Py_None, Py_None); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2186; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_6pandas_5tslib__TSObject))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2186; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_XDECREF_SET(__pyx_v_ts, ((struct __pyx_obj_6pandas_5tslib__TSObject *)__pyx_t_5)); __pyx_t_5 = 0; /* "pandas/tslib.pyx":2187 * * ts = convert_to_tsobject(dtindex[i], None, None) * out[i] = ts_dayofweek(ts) # <<<<<<<<<<<<<< * return out * */ __pyx_t_58 = __pyx_v_i; __pyx_t_53 = -1; if (__pyx_t_58 < 0) { __pyx_t_53 = 0; } else if (unlikely(__pyx_t_58 >= __pyx_pybuffernd_out.diminfo[0].shape)) __pyx_t_53 = 0; if (unlikely(__pyx_t_53 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_53); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2187; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_58, __pyx_pybuffernd_out.diminfo[0].strides) = __pyx_f_6pandas_5tslib_ts_dayofweek(__pyx_v_ts); __pyx_L31_continue:; } /* "pandas/tslib.pyx":2188 * ts = convert_to_tsobject(dtindex[i], None, None) * out[i] = ts_dayofweek(ts) * return out # <<<<<<<<<<<<<< * * elif field == 'woy': */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_out)); __pyx_r = ((PyObject *)__pyx_v_out); goto __pyx_L0; } /* "pandas/tslib.pyx":2190 * return out * * elif field == 'woy': # <<<<<<<<<<<<<< * for i in range(count): * if dtindex[i] == NPY_NAT: out[i] = -1; continue */ __pyx_t_13 = (__Pyx_PyString_Equals(__pyx_v_field, __pyx_n_s_woy, Py_EQ)); if (unlikely(__pyx_t_13 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2190; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__pyx_t_13) { /* "pandas/tslib.pyx":2191 * * elif field == 'woy': * for i in range(count): # <<<<<<<<<<<<<< * if dtindex[i] == NPY_NAT: out[i] = -1; continue * */ __pyx_t_11 = __pyx_v_count; for (__pyx_t_14 = 0; __pyx_t_14 < __pyx_t_11; __pyx_t_14+=1) { __pyx_v_i = __pyx_t_14; /* "pandas/tslib.pyx":2192 * elif field == 'woy': * for i in range(count): * if dtindex[i] == NPY_NAT: out[i] = -1; continue # <<<<<<<<<<<<<< * * pandas_datetime_to_datetimestruct(dtindex[i], PANDAS_FR_ns, &dts) */ __pyx_t_59 = __pyx_v_i; __pyx_t_53 = -1; if (__pyx_t_59 < 0) { __pyx_t_53 = 0; } else if (unlikely(__pyx_t_59 >= __pyx_pybuffernd_dtindex.diminfo[0].shape)) __pyx_t_53 = 0; if (unlikely(__pyx_t_53 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_53); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2192; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_13 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_dtindex.rcbuffer->pybuffer.buf, __pyx_t_59, __pyx_pybuffernd_dtindex.diminfo[0].strides)) == __pyx_v_6pandas_5tslib_NPY_NAT) != 0); if (__pyx_t_13) { __pyx_t_60 = __pyx_v_i; __pyx_t_53 = -1; if (__pyx_t_60 < 0) { __pyx_t_53 = 0; } else if (unlikely(__pyx_t_60 >= __pyx_pybuffernd_out.diminfo[0].shape)) __pyx_t_53 = 0; if (unlikely(__pyx_t_53 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_53); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2192; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_60, __pyx_pybuffernd_out.diminfo[0].strides) = -1; goto __pyx_L34_continue; } /* "pandas/tslib.pyx":2194 * if dtindex[i] == NPY_NAT: out[i] = -1; continue * * pandas_datetime_to_datetimestruct(dtindex[i], PANDAS_FR_ns, &dts) # <<<<<<<<<<<<<< * ts = convert_to_tsobject(dtindex[i], None, None) * isleap = is_leapyear(dts.year) */ __pyx_t_61 = __pyx_v_i; __pyx_t_53 = -1; if (__pyx_t_61 < 0) { __pyx_t_53 = 0; } else if (unlikely(__pyx_t_61 >= __pyx_pybuffernd_dtindex.diminfo[0].shape)) __pyx_t_53 = 0; if (unlikely(__pyx_t_53 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_53); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2194; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } pandas_datetime_to_datetimestruct((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_dtindex.rcbuffer->pybuffer.buf, __pyx_t_61, __pyx_pybuffernd_dtindex.diminfo[0].strides)), PANDAS_FR_ns, (&__pyx_v_dts)); /* "pandas/tslib.pyx":2195 * * pandas_datetime_to_datetimestruct(dtindex[i], PANDAS_FR_ns, &dts) * ts = convert_to_tsobject(dtindex[i], None, None) # <<<<<<<<<<<<<< * isleap = is_leapyear(dts.year) * isleap_prev = is_leapyear(dts.year - 1) */ __pyx_t_62 = __pyx_v_i; __pyx_t_53 = -1; if (__pyx_t_62 < 0) { __pyx_t_53 = 0; } else if (unlikely(__pyx_t_62 >= __pyx_pybuffernd_dtindex.diminfo[0].shape)) __pyx_t_53 = 0; if (unlikely(__pyx_t_53 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_53); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2195; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_5 = __Pyx_PyInt_From_npy_int64((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_dtindex.rcbuffer->pybuffer.buf, __pyx_t_62, __pyx_pybuffernd_dtindex.diminfo[0].strides))); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2195; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_2 = __pyx_f_6pandas_5tslib_convert_to_tsobject(__pyx_t_5, Py_None, Py_None); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2195; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_6pandas_5tslib__TSObject))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2195; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_XDECREF_SET(__pyx_v_ts, ((struct __pyx_obj_6pandas_5tslib__TSObject *)__pyx_t_2)); __pyx_t_2 = 0; /* "pandas/tslib.pyx":2196 * pandas_datetime_to_datetimestruct(dtindex[i], PANDAS_FR_ns, &dts) * ts = convert_to_tsobject(dtindex[i], None, None) * isleap = is_leapyear(dts.year) # <<<<<<<<<<<<<< * isleap_prev = is_leapyear(dts.year - 1) * mo_off = _month_offset[isleap, dts.month - 1] */ __pyx_v_isleap = is_leapyear(__pyx_v_dts.year); /* "pandas/tslib.pyx":2197 * ts = convert_to_tsobject(dtindex[i], None, None) * isleap = is_leapyear(dts.year) * isleap_prev = is_leapyear(dts.year - 1) # <<<<<<<<<<<<<< * mo_off = _month_offset[isleap, dts.month - 1] * doy = mo_off + dts.day */ __pyx_v_isleap_prev = is_leapyear((__pyx_v_dts.year - 1)); /* "pandas/tslib.pyx":2198 * isleap = is_leapyear(dts.year) * isleap_prev = is_leapyear(dts.year - 1) * mo_off = _month_offset[isleap, dts.month - 1] # <<<<<<<<<<<<<< * doy = mo_off + dts.day * dow = ts_dayofweek(ts) */ __pyx_t_53 = __pyx_v_isleap; __pyx_t_63 = (__pyx_v_dts.month - 1); __pyx_t_64 = -1; if (__pyx_t_53 < 0) { __pyx_t_64 = 0; } else if (unlikely(__pyx_t_53 >= __pyx_pybuffernd__month_offset.diminfo[0].shape)) __pyx_t_64 = 0; if (__pyx_t_63 < 0) { __pyx_t_64 = 1; } else if (unlikely(__pyx_t_63 >= __pyx_pybuffernd__month_offset.diminfo[1].shape)) __pyx_t_64 = 1; if (unlikely(__pyx_t_64 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_64); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2198; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_mo_off = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd__month_offset.rcbuffer->pybuffer.buf, __pyx_t_53, __pyx_pybuffernd__month_offset.diminfo[0].strides, __pyx_t_63, __pyx_pybuffernd__month_offset.diminfo[1].strides)); /* "pandas/tslib.pyx":2199 * isleap_prev = is_leapyear(dts.year - 1) * mo_off = _month_offset[isleap, dts.month - 1] * doy = mo_off + dts.day # <<<<<<<<<<<<<< * dow = ts_dayofweek(ts) * */ __pyx_v_doy = (__pyx_v_mo_off + __pyx_v_dts.day); /* "pandas/tslib.pyx":2200 * mo_off = _month_offset[isleap, dts.month - 1] * doy = mo_off + dts.day * dow = ts_dayofweek(ts) # <<<<<<<<<<<<<< * * #estimate */ __pyx_v_dow = __pyx_f_6pandas_5tslib_ts_dayofweek(__pyx_v_ts); /* "pandas/tslib.pyx":2203 * * #estimate * woy = (doy - 1) - dow + 3 # <<<<<<<<<<<<<< * if woy >= 0: * woy = woy / 7 + 1 */ __pyx_v_woy = (((__pyx_v_doy - 1) - __pyx_v_dow) + 3); /* "pandas/tslib.pyx":2204 * #estimate * woy = (doy - 1) - dow + 3 * if woy >= 0: # <<<<<<<<<<<<<< * woy = woy / 7 + 1 * */ __pyx_t_13 = ((__pyx_v_woy >= 0) != 0); if (__pyx_t_13) { /* "pandas/tslib.pyx":2205 * woy = (doy - 1) - dow + 3 * if woy >= 0: * woy = woy / 7 + 1 # <<<<<<<<<<<<<< * * # verify */ __pyx_v_woy = (__Pyx_div_long(__pyx_v_woy, 7) + 1); goto __pyx_L37; } __pyx_L37:; /* "pandas/tslib.pyx":2208 * * # verify * if woy < 0: # <<<<<<<<<<<<<< * if (woy > -2) or (woy == -2 and isleap_prev): * woy = 53 */ __pyx_t_13 = ((__pyx_v_woy < 0) != 0); if (__pyx_t_13) { /* "pandas/tslib.pyx":2209 * # verify * if woy < 0: * if (woy > -2) or (woy == -2 and isleap_prev): # <<<<<<<<<<<<<< * woy = 53 * else: */ __pyx_t_13 = (__pyx_v_woy > -2); if (!__pyx_t_13) { __pyx_t_65 = (__pyx_v_woy == -2); if (__pyx_t_65) { __pyx_t_66 = (__pyx_v_isleap_prev != 0); } else { __pyx_t_66 = __pyx_t_65; } __pyx_t_65 = __pyx_t_66; } else { __pyx_t_65 = __pyx_t_13; } if (__pyx_t_65) { /* "pandas/tslib.pyx":2210 * if woy < 0: * if (woy > -2) or (woy == -2 and isleap_prev): * woy = 53 # <<<<<<<<<<<<<< * else: * woy = 52 */ __pyx_v_woy = 53; goto __pyx_L39; } /*else*/ { /* "pandas/tslib.pyx":2212 * woy = 53 * else: * woy = 52 # <<<<<<<<<<<<<< * elif woy == 53: * if 31 - dts.day + dow < 3: */ __pyx_v_woy = 52; } __pyx_L39:; goto __pyx_L38; } /* "pandas/tslib.pyx":2213 * else: * woy = 52 * elif woy == 53: # <<<<<<<<<<<<<< * if 31 - dts.day + dow < 3: * woy = 1 */ __pyx_t_65 = ((__pyx_v_woy == 53) != 0); if (__pyx_t_65) { /* "pandas/tslib.pyx":2214 * woy = 52 * elif woy == 53: * if 31 - dts.day + dow < 3: # <<<<<<<<<<<<<< * woy = 1 * */ __pyx_t_65 = ((((31 - __pyx_v_dts.day) + __pyx_v_dow) < 3) != 0); if (__pyx_t_65) { /* "pandas/tslib.pyx":2215 * elif woy == 53: * if 31 - dts.day + dow < 3: * woy = 1 # <<<<<<<<<<<<<< * * out[i] = woy */ __pyx_v_woy = 1; goto __pyx_L40; } __pyx_L40:; goto __pyx_L38; } __pyx_L38:; /* "pandas/tslib.pyx":2217 * woy = 1 * * out[i] = woy # <<<<<<<<<<<<<< * return out * */ __pyx_t_67 = __pyx_v_i; __pyx_t_64 = -1; if (__pyx_t_67 < 0) { __pyx_t_64 = 0; } else if (unlikely(__pyx_t_67 >= __pyx_pybuffernd_out.diminfo[0].shape)) __pyx_t_64 = 0; if (unlikely(__pyx_t_64 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_64); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2217; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_67, __pyx_pybuffernd_out.diminfo[0].strides) = __pyx_v_woy; __pyx_L34_continue:; } /* "pandas/tslib.pyx":2218 * * out[i] = woy * return out # <<<<<<<<<<<<<< * * elif field == 'q': */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_out)); __pyx_r = ((PyObject *)__pyx_v_out); goto __pyx_L0; } /* "pandas/tslib.pyx":2220 * return out * * elif field == 'q': # <<<<<<<<<<<<<< * for i in range(count): * if dtindex[i] == NPY_NAT: out[i] = -1; continue */ __pyx_t_65 = (__Pyx_PyString_Equals(__pyx_v_field, __pyx_n_s_q, Py_EQ)); if (unlikely(__pyx_t_65 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2220; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__pyx_t_65) { /* "pandas/tslib.pyx":2221 * * elif field == 'q': * for i in range(count): # <<<<<<<<<<<<<< * if dtindex[i] == NPY_NAT: out[i] = -1; continue * */ __pyx_t_11 = __pyx_v_count; for (__pyx_t_14 = 0; __pyx_t_14 < __pyx_t_11; __pyx_t_14+=1) { __pyx_v_i = __pyx_t_14; /* "pandas/tslib.pyx":2222 * elif field == 'q': * for i in range(count): * if dtindex[i] == NPY_NAT: out[i] = -1; continue # <<<<<<<<<<<<<< * * pandas_datetime_to_datetimestruct(dtindex[i], PANDAS_FR_ns, &dts) */ __pyx_t_68 = __pyx_v_i; __pyx_t_64 = -1; if (__pyx_t_68 < 0) { __pyx_t_64 = 0; } else if (unlikely(__pyx_t_68 >= __pyx_pybuffernd_dtindex.diminfo[0].shape)) __pyx_t_64 = 0; if (unlikely(__pyx_t_64 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_64); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2222; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_65 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_dtindex.rcbuffer->pybuffer.buf, __pyx_t_68, __pyx_pybuffernd_dtindex.diminfo[0].strides)) == __pyx_v_6pandas_5tslib_NPY_NAT) != 0); if (__pyx_t_65) { __pyx_t_69 = __pyx_v_i; __pyx_t_64 = -1; if (__pyx_t_69 < 0) { __pyx_t_64 = 0; } else if (unlikely(__pyx_t_69 >= __pyx_pybuffernd_out.diminfo[0].shape)) __pyx_t_64 = 0; if (unlikely(__pyx_t_64 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_64); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2222; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_69, __pyx_pybuffernd_out.diminfo[0].strides) = -1; goto __pyx_L41_continue; } /* "pandas/tslib.pyx":2224 * if dtindex[i] == NPY_NAT: out[i] = -1; continue * * pandas_datetime_to_datetimestruct(dtindex[i], PANDAS_FR_ns, &dts) # <<<<<<<<<<<<<< * out[i] = dts.month * out[i] = ((out[i] - 1) / 3) + 1 */ __pyx_t_70 = __pyx_v_i; __pyx_t_64 = -1; if (__pyx_t_70 < 0) { __pyx_t_64 = 0; } else if (unlikely(__pyx_t_70 >= __pyx_pybuffernd_dtindex.diminfo[0].shape)) __pyx_t_64 = 0; if (unlikely(__pyx_t_64 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_64); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2224; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } pandas_datetime_to_datetimestruct((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_dtindex.rcbuffer->pybuffer.buf, __pyx_t_70, __pyx_pybuffernd_dtindex.diminfo[0].strides)), PANDAS_FR_ns, (&__pyx_v_dts)); /* "pandas/tslib.pyx":2225 * * pandas_datetime_to_datetimestruct(dtindex[i], PANDAS_FR_ns, &dts) * out[i] = dts.month # <<<<<<<<<<<<<< * out[i] = ((out[i] - 1) / 3) + 1 * return out */ __pyx_t_23 = __pyx_v_dts.month; __pyx_t_71 = __pyx_v_i; __pyx_t_64 = -1; if (__pyx_t_71 < 0) { __pyx_t_64 = 0; } else if (unlikely(__pyx_t_71 >= __pyx_pybuffernd_out.diminfo[0].shape)) __pyx_t_64 = 0; if (unlikely(__pyx_t_64 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_64); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2225; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_71, __pyx_pybuffernd_out.diminfo[0].strides) = __pyx_t_23; /* "pandas/tslib.pyx":2226 * pandas_datetime_to_datetimestruct(dtindex[i], PANDAS_FR_ns, &dts) * out[i] = dts.month * out[i] = ((out[i] - 1) / 3) + 1 # <<<<<<<<<<<<<< * return out * */ __pyx_t_72 = __pyx_v_i; __pyx_t_64 = -1; if (__pyx_t_72 < 0) { __pyx_t_64 = 0; } else if (unlikely(__pyx_t_72 >= __pyx_pybuffernd_out.diminfo[0].shape)) __pyx_t_64 = 0; if (unlikely(__pyx_t_64 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_64); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2226; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_73 = __pyx_v_i; __pyx_t_64 = -1; if (__pyx_t_73 < 0) { __pyx_t_64 = 0; } else if (unlikely(__pyx_t_73 >= __pyx_pybuffernd_out.diminfo[0].shape)) __pyx_t_64 = 0; if (unlikely(__pyx_t_64 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_64); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2226; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_73, __pyx_pybuffernd_out.diminfo[0].strides) = (__Pyx_div_long(((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_72, __pyx_pybuffernd_out.diminfo[0].strides)) - 1), 3) + 1); __pyx_L41_continue:; } /* "pandas/tslib.pyx":2227 * out[i] = dts.month * out[i] = ((out[i] - 1) / 3) + 1 * return out # <<<<<<<<<<<<<< * * raise ValueError("Field %s not supported" % field) */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_out)); __pyx_r = ((PyObject *)__pyx_v_out); goto __pyx_L0; } /* "pandas/tslib.pyx":2229 * return out * * raise ValueError("Field %s not supported" % field) # <<<<<<<<<<<<<< * * */ __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_Field_s_not_supported, __pyx_v_field); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2229; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2229; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2229; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2229; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/tslib.pyx":2089 * * @cython.wraparound(False) * def get_date_field(ndarray[int64_t] dtindex, object field): # <<<<<<<<<<<<<< * ''' * Given a int64-based datetime index, extract the year, month, etc., */ /* 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_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd__month_offset.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_dtindex.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.tslib.get_date_field", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd__month_offset.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_dtindex.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_ts); __Pyx_XDECREF((PyObject *)__pyx_v_out); __Pyx_XDECREF((PyObject *)__pyx_v__month_offset); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/tslib.pyx":2232 * * * cdef inline int m8_weekday(int64_t val): # <<<<<<<<<<<<<< * ts = convert_to_tsobject(val, None, None) * return ts_dayofweek(ts) */ static CYTHON_INLINE int __pyx_f_6pandas_5tslib_m8_weekday(__pyx_t_5numpy_int64_t __pyx_v_val) { PyObject *__pyx_v_ts = NULL; int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("m8_weekday", 0); /* "pandas/tslib.pyx":2233 * * cdef inline int m8_weekday(int64_t val): * ts = convert_to_tsobject(val, None, None) # <<<<<<<<<<<<<< * return ts_dayofweek(ts) * */ __pyx_t_1 = __Pyx_PyInt_From_npy_int64(__pyx_v_val); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2233; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __pyx_f_6pandas_5tslib_convert_to_tsobject(__pyx_t_1, Py_None, Py_None); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2233; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_ts = __pyx_t_2; __pyx_t_2 = 0; /* "pandas/tslib.pyx":2234 * cdef inline int m8_weekday(int64_t val): * ts = convert_to_tsobject(val, None, None) * return ts_dayofweek(ts) # <<<<<<<<<<<<<< * * cdef int64_t DAY_NS = 86400000000000LL */ if (!(likely(((__pyx_v_ts) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_ts, __pyx_ptype_6pandas_5tslib__TSObject))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2234; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_f_6pandas_5tslib_ts_dayofweek(((struct __pyx_obj_6pandas_5tslib__TSObject *)__pyx_v_ts)); goto __pyx_L0; /* "pandas/tslib.pyx":2232 * * * cdef inline int m8_weekday(int64_t val): # <<<<<<<<<<<<<< * ts = convert_to_tsobject(val, None, None) * return ts_dayofweek(ts) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_WriteUnraisable("pandas.tslib.m8_weekday", __pyx_clineno, __pyx_lineno, __pyx_filename, 0); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_ts); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/tslib.pyx":2239 * * * def date_normalize(ndarray[int64_t] stamps, tz=None): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = len(stamps) */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5tslib_65date_normalize(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5tslib_65date_normalize = {__Pyx_NAMESTR("date_normalize"), (PyCFunction)__pyx_pw_6pandas_5tslib_65date_normalize, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5tslib_65date_normalize(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_stamps = 0; PyObject *__pyx_v_tz = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("date_normalize (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_stamps,&__pyx_n_s_tz,0}; PyObject* values[2] = {0,0}; values[1] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_stamps)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_tz); if (value) { values[1] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "date_normalize") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2239; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_stamps = ((PyArrayObject *)values[0]); __pyx_v_tz = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("date_normalize", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2239; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.tslib.date_normalize", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_stamps), __pyx_ptype_5numpy_ndarray, 1, "stamps", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2239; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5tslib_64date_normalize(__pyx_self, __pyx_v_stamps, __pyx_v_tz); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5tslib_64date_normalize(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_stamps, PyObject *__pyx_v_tz) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_n; pandas_datetimestruct __pyx_v_dts; CYTHON_UNUSED struct __pyx_obj_6pandas_5tslib__TSObject *__pyx_v_tso = 0; PyArrayObject *__pyx_v_result = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_result; __Pyx_Buffer __pyx_pybuffer_result; __Pyx_LocalBuf_ND __pyx_pybuffernd_stamps; __Pyx_Buffer __pyx_pybuffer_stamps; 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; int __pyx_t_9; 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; Py_ssize_t __pyx_t_15; Py_ssize_t __pyx_t_16; Py_ssize_t __pyx_t_17; Py_ssize_t __pyx_t_18; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("date_normalize", 0); __Pyx_INCREF(__pyx_v_tz); __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_stamps.pybuffer.buf = NULL; __pyx_pybuffer_stamps.refcount = 0; __pyx_pybuffernd_stamps.data = NULL; __pyx_pybuffernd_stamps.rcbuffer = &__pyx_pybuffer_stamps; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_stamps.rcbuffer->pybuffer, (PyObject*)__pyx_v_stamps, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2239; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_stamps.diminfo[0].strides = __pyx_pybuffernd_stamps.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_stamps.diminfo[0].shape = __pyx_pybuffernd_stamps.rcbuffer->pybuffer.shape[0]; /* "pandas/tslib.pyx":2241 * def date_normalize(ndarray[int64_t] stamps, tz=None): * cdef: * Py_ssize_t i, n = len(stamps) # <<<<<<<<<<<<<< * pandas_datetimestruct dts * _TSObject tso */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_stamps)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2241; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/tslib.pyx":2244 * pandas_datetimestruct dts * _TSObject tso * ndarray[int64_t] result = np.empty(n, dtype=np.int64) # <<<<<<<<<<<<<< * * if tz is not None: */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2244; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 2244; __pyx_clineno = __LINE__; goto __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_n); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2244; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2244; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2244; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2244; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_int64); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2244; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 2244; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyObject_Call(__pyx_t_3, __pyx_t_4, __pyx_t_2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2244; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 2244; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_7 = ((PyArrayObject *)__pyx_t_6); { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { __pyx_v_result = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_result.rcbuffer->pybuffer.buf = NULL; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2244; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } else {__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]; } } __pyx_t_7 = 0; __pyx_v_result = ((PyArrayObject *)__pyx_t_6); __pyx_t_6 = 0; /* "pandas/tslib.pyx":2246 * ndarray[int64_t] result = np.empty(n, dtype=np.int64) * * if tz is not None: # <<<<<<<<<<<<<< * tso = _TSObject() * if isinstance(tz, basestring): */ __pyx_t_8 = (__pyx_v_tz != Py_None); __pyx_t_9 = (__pyx_t_8 != 0); if (__pyx_t_9) { /* "pandas/tslib.pyx":2247 * * if tz is not None: * tso = _TSObject() # <<<<<<<<<<<<<< * if isinstance(tz, basestring): * tz = pytz.timezone(tz) */ __pyx_t_6 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_6pandas_5tslib__TSObject)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2247; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_v_tso = ((struct __pyx_obj_6pandas_5tslib__TSObject *)__pyx_t_6); __pyx_t_6 = 0; /* "pandas/tslib.pyx":2248 * if tz is not None: * tso = _TSObject() * if isinstance(tz, basestring): # <<<<<<<<<<<<<< * tz = pytz.timezone(tz) * result = _normalize_local(stamps, tz) */ __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_basestring); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2248; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_9 = PyObject_IsInstance(__pyx_v_tz, __pyx_t_6); if (unlikely(__pyx_t_9 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2248; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_8 = (__pyx_t_9 != 0); if (__pyx_t_8) { /* "pandas/tslib.pyx":2249 * tso = _TSObject() * if isinstance(tz, basestring): * tz = pytz.timezone(tz) # <<<<<<<<<<<<<< * result = _normalize_local(stamps, tz) * else: */ __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_pytz); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2249; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_timezone); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2249; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2249; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(__pyx_v_tz); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_tz); __Pyx_GIVEREF(__pyx_v_tz); __pyx_t_4 = PyObject_Call(__pyx_t_2, __pyx_t_6, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2249; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF_SET(__pyx_v_tz, __pyx_t_4); __pyx_t_4 = 0; goto __pyx_L4; } __pyx_L4:; /* "pandas/tslib.pyx":2250 * if isinstance(tz, basestring): * tz = pytz.timezone(tz) * result = _normalize_local(stamps, tz) # <<<<<<<<<<<<<< * else: * for i in range(n): */ __pyx_t_4 = __pyx_f_6pandas_5tslib__normalize_local(((PyArrayObject *)__pyx_v_stamps), __pyx_v_tz); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2250; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2250; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_7 = ((PyArrayObject *)__pyx_t_4); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __pyx_t_10 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_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_result.rcbuffer->pybuffer, (PyObject*)__pyx_v_result, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_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_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_10 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2250; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_7 = 0; __Pyx_DECREF_SET(__pyx_v_result, ((PyArrayObject *)__pyx_t_4)); __pyx_t_4 = 0; goto __pyx_L3; } /*else*/ { /* "pandas/tslib.pyx":2252 * result = _normalize_local(stamps, tz) * else: * for i in range(n): # <<<<<<<<<<<<<< * if stamps[i] == NPY_NAT: * result[i] = NPY_NAT */ __pyx_t_1 = __pyx_v_n; for (__pyx_t_14 = 0; __pyx_t_14 < __pyx_t_1; __pyx_t_14+=1) { __pyx_v_i = __pyx_t_14; /* "pandas/tslib.pyx":2253 * else: * for i in range(n): * if stamps[i] == NPY_NAT: # <<<<<<<<<<<<<< * result[i] = NPY_NAT * continue */ __pyx_t_15 = __pyx_v_i; __pyx_t_10 = -1; if (__pyx_t_15 < 0) { __pyx_t_15 += __pyx_pybuffernd_stamps.diminfo[0].shape; if (unlikely(__pyx_t_15 < 0)) __pyx_t_10 = 0; } else if (unlikely(__pyx_t_15 >= __pyx_pybuffernd_stamps.diminfo[0].shape)) __pyx_t_10 = 0; if (unlikely(__pyx_t_10 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_10); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2253; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_8 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_stamps.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_stamps.diminfo[0].strides)) == __pyx_v_6pandas_5tslib_NPY_NAT) != 0); if (__pyx_t_8) { /* "pandas/tslib.pyx":2254 * for i in range(n): * if stamps[i] == NPY_NAT: * result[i] = NPY_NAT # <<<<<<<<<<<<<< * continue * pandas_datetime_to_datetimestruct(stamps[i], PANDAS_FR_ns, &dts) */ __pyx_t_16 = __pyx_v_i; __pyx_t_10 = -1; if (__pyx_t_16 < 0) { __pyx_t_16 += __pyx_pybuffernd_result.diminfo[0].shape; if (unlikely(__pyx_t_16 < 0)) __pyx_t_10 = 0; } else if (unlikely(__pyx_t_16 >= __pyx_pybuffernd_result.diminfo[0].shape)) __pyx_t_10 = 0; if (unlikely(__pyx_t_10 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_10); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2254; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_result.diminfo[0].strides) = __pyx_v_6pandas_5tslib_NPY_NAT; /* "pandas/tslib.pyx":2255 * if stamps[i] == NPY_NAT: * result[i] = NPY_NAT * continue # <<<<<<<<<<<<<< * pandas_datetime_to_datetimestruct(stamps[i], PANDAS_FR_ns, &dts) * result[i] = _normalized_stamp(&dts) */ goto __pyx_L5_continue; } /* "pandas/tslib.pyx":2256 * result[i] = NPY_NAT * continue * pandas_datetime_to_datetimestruct(stamps[i], PANDAS_FR_ns, &dts) # <<<<<<<<<<<<<< * result[i] = _normalized_stamp(&dts) * */ __pyx_t_17 = __pyx_v_i; __pyx_t_10 = -1; if (__pyx_t_17 < 0) { __pyx_t_17 += __pyx_pybuffernd_stamps.diminfo[0].shape; if (unlikely(__pyx_t_17 < 0)) __pyx_t_10 = 0; } else if (unlikely(__pyx_t_17 >= __pyx_pybuffernd_stamps.diminfo[0].shape)) __pyx_t_10 = 0; if (unlikely(__pyx_t_10 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_10); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2256; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } pandas_datetime_to_datetimestruct((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_stamps.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_stamps.diminfo[0].strides)), PANDAS_FR_ns, (&__pyx_v_dts)); /* "pandas/tslib.pyx":2257 * continue * pandas_datetime_to_datetimestruct(stamps[i], PANDAS_FR_ns, &dts) * result[i] = _normalized_stamp(&dts) # <<<<<<<<<<<<<< * * return result */ __pyx_t_18 = __pyx_v_i; __pyx_t_10 = -1; if (__pyx_t_18 < 0) { __pyx_t_18 += __pyx_pybuffernd_result.diminfo[0].shape; if (unlikely(__pyx_t_18 < 0)) __pyx_t_10 = 0; } else if (unlikely(__pyx_t_18 >= __pyx_pybuffernd_result.diminfo[0].shape)) __pyx_t_10 = 0; if (unlikely(__pyx_t_10 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_10); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2257; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_result.diminfo[0].strides) = __pyx_f_6pandas_5tslib__normalized_stamp((&__pyx_v_dts)); __pyx_L5_continue:; } } __pyx_L3:; /* "pandas/tslib.pyx":2259 * result[i] = _normalized_stamp(&dts) * * return result # <<<<<<<<<<<<<< * * cdef _normalize_local(ndarray[int64_t] stamps, object tz): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_result)); __pyx_r = ((PyObject *)__pyx_v_result); goto __pyx_L0; /* "pandas/tslib.pyx":2239 * * * def date_normalize(ndarray[int64_t] stamps, tz=None): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = len(stamps) */ /* 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_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_stamps.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.tslib.date_normalize", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_stamps.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_tso); __Pyx_XDECREF((PyObject *)__pyx_v_result); __Pyx_XDECREF(__pyx_v_tz); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/tslib.pyx":2261 * return result * * cdef _normalize_local(ndarray[int64_t] stamps, object tz): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t n = len(stamps) */ static PyObject *__pyx_f_6pandas_5tslib__normalize_local(PyArrayObject *__pyx_v_stamps, PyObject *__pyx_v_tz) { Py_ssize_t __pyx_v_n; PyArrayObject *__pyx_v_result = 0; PyArrayObject *__pyx_v_trans = 0; PyArrayObject *__pyx_v_deltas = 0; PyArrayObject *__pyx_v_pos = 0; pandas_datetimestruct __pyx_v_dts; Py_ssize_t __pyx_v_i; PyDateTime_DateTime *__pyx_v_dt = NULL; PyObject *__pyx_v_delta = NULL; PyObject *__pyx_v__pos = NULL; __Pyx_LocalBuf_ND __pyx_pybuffernd_deltas; __Pyx_Buffer __pyx_pybuffer_deltas; __Pyx_LocalBuf_ND __pyx_pybuffernd_pos; __Pyx_Buffer __pyx_pybuffer_pos; __Pyx_LocalBuf_ND __pyx_pybuffernd_result; __Pyx_Buffer __pyx_pybuffer_result; __Pyx_LocalBuf_ND __pyx_pybuffernd_stamps; __Pyx_Buffer __pyx_pybuffer_stamps; __Pyx_LocalBuf_ND __pyx_pybuffernd_trans; __Pyx_Buffer __pyx_pybuffer_trans; 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; Py_ssize_t __pyx_t_9; Py_ssize_t __pyx_t_10; int __pyx_t_11; Py_ssize_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; PyObject *__pyx_t_18 = NULL; PyObject *__pyx_t_19 = NULL; PyObject *__pyx_t_20 = NULL; Py_ssize_t __pyx_t_21; npy_datetime __pyx_t_22; Py_ssize_t __pyx_t_23; PyArrayObject *__pyx_t_24 = NULL; PyObject *__pyx_t_25 = NULL; PyObject *__pyx_t_26 = NULL; PyObject *__pyx_t_27 = NULL; int __pyx_t_28; Py_ssize_t __pyx_t_29; Py_ssize_t __pyx_t_30; Py_ssize_t __pyx_t_31; long __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; Py_ssize_t __pyx_t_37; __pyx_t_5numpy_int64_t __pyx_t_38; Py_ssize_t __pyx_t_39; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_normalize_local", 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_trans.pybuffer.buf = NULL; __pyx_pybuffer_trans.refcount = 0; __pyx_pybuffernd_trans.data = NULL; __pyx_pybuffernd_trans.rcbuffer = &__pyx_pybuffer_trans; __pyx_pybuffer_deltas.pybuffer.buf = NULL; __pyx_pybuffer_deltas.refcount = 0; __pyx_pybuffernd_deltas.data = NULL; __pyx_pybuffernd_deltas.rcbuffer = &__pyx_pybuffer_deltas; __pyx_pybuffer_pos.pybuffer.buf = NULL; __pyx_pybuffer_pos.refcount = 0; __pyx_pybuffernd_pos.data = NULL; __pyx_pybuffernd_pos.rcbuffer = &__pyx_pybuffer_pos; __pyx_pybuffer_stamps.pybuffer.buf = NULL; __pyx_pybuffer_stamps.refcount = 0; __pyx_pybuffernd_stamps.data = NULL; __pyx_pybuffernd_stamps.rcbuffer = &__pyx_pybuffer_stamps; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_stamps.rcbuffer->pybuffer, (PyObject*)__pyx_v_stamps, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2261; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_stamps.diminfo[0].strides = __pyx_pybuffernd_stamps.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_stamps.diminfo[0].shape = __pyx_pybuffernd_stamps.rcbuffer->pybuffer.shape[0]; /* "pandas/tslib.pyx":2263 * cdef _normalize_local(ndarray[int64_t] stamps, object tz): * cdef: * Py_ssize_t n = len(stamps) # <<<<<<<<<<<<<< * ndarray[int64_t] result = np.empty(n, dtype=np.int64) * ndarray[int64_t] trans, deltas, pos */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_stamps)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2263; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/tslib.pyx":2264 * cdef: * Py_ssize_t n = len(stamps) * ndarray[int64_t] result = np.empty(n, dtype=np.int64) # <<<<<<<<<<<<<< * ndarray[int64_t] trans, deltas, pos * pandas_datetimestruct dts */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2264; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 2264; __pyx_clineno = __LINE__; goto __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_n); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2264; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2264; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2264; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2264; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_int64); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2264; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 2264; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyObject_Call(__pyx_t_3, __pyx_t_4, __pyx_t_2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2264; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 2264; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_7 = ((PyArrayObject *)__pyx_t_6); { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { __pyx_v_result = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_result.rcbuffer->pybuffer.buf = NULL; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2264; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } else {__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]; } } __pyx_t_7 = 0; __pyx_v_result = ((PyArrayObject *)__pyx_t_6); __pyx_t_6 = 0; /* "pandas/tslib.pyx":2268 * pandas_datetimestruct dts * * if _is_utc(tz): # <<<<<<<<<<<<<< * for i in range(n): * if stamps[i] == NPY_NAT: */ __pyx_t_8 = (__pyx_f_6pandas_5tslib__is_utc(__pyx_v_tz) != 0); if (__pyx_t_8) { /* "pandas/tslib.pyx":2269 * * if _is_utc(tz): * for i in range(n): # <<<<<<<<<<<<<< * if stamps[i] == NPY_NAT: * result[i] = NPY_NAT */ __pyx_t_1 = __pyx_v_n; for (__pyx_t_9 = 0; __pyx_t_9 < __pyx_t_1; __pyx_t_9+=1) { __pyx_v_i = __pyx_t_9; /* "pandas/tslib.pyx":2270 * if _is_utc(tz): * for i in range(n): * if stamps[i] == NPY_NAT: # <<<<<<<<<<<<<< * result[i] = NPY_NAT * continue */ __pyx_t_10 = __pyx_v_i; __pyx_t_11 = -1; if (__pyx_t_10 < 0) { __pyx_t_10 += __pyx_pybuffernd_stamps.diminfo[0].shape; if (unlikely(__pyx_t_10 < 0)) __pyx_t_11 = 0; } else if (unlikely(__pyx_t_10 >= __pyx_pybuffernd_stamps.diminfo[0].shape)) __pyx_t_11 = 0; if (unlikely(__pyx_t_11 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_11); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2270; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_8 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_stamps.rcbuffer->pybuffer.buf, __pyx_t_10, __pyx_pybuffernd_stamps.diminfo[0].strides)) == __pyx_v_6pandas_5tslib_NPY_NAT) != 0); if (__pyx_t_8) { /* "pandas/tslib.pyx":2271 * for i in range(n): * if stamps[i] == NPY_NAT: * result[i] = NPY_NAT # <<<<<<<<<<<<<< * continue * pandas_datetime_to_datetimestruct(stamps[i], PANDAS_FR_ns, &dts) */ __pyx_t_12 = __pyx_v_i; __pyx_t_11 = -1; if (__pyx_t_12 < 0) { __pyx_t_12 += __pyx_pybuffernd_result.diminfo[0].shape; if (unlikely(__pyx_t_12 < 0)) __pyx_t_11 = 0; } else if (unlikely(__pyx_t_12 >= __pyx_pybuffernd_result.diminfo[0].shape)) __pyx_t_11 = 0; if (unlikely(__pyx_t_11 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_11); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2271; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_12, __pyx_pybuffernd_result.diminfo[0].strides) = __pyx_v_6pandas_5tslib_NPY_NAT; /* "pandas/tslib.pyx":2272 * if stamps[i] == NPY_NAT: * result[i] = NPY_NAT * continue # <<<<<<<<<<<<<< * pandas_datetime_to_datetimestruct(stamps[i], PANDAS_FR_ns, &dts) * result[i] = _normalized_stamp(&dts) */ goto __pyx_L4_continue; } /* "pandas/tslib.pyx":2273 * result[i] = NPY_NAT * continue * pandas_datetime_to_datetimestruct(stamps[i], PANDAS_FR_ns, &dts) # <<<<<<<<<<<<<< * result[i] = _normalized_stamp(&dts) * elif _is_tzlocal(tz): */ __pyx_t_13 = __pyx_v_i; __pyx_t_11 = -1; if (__pyx_t_13 < 0) { __pyx_t_13 += __pyx_pybuffernd_stamps.diminfo[0].shape; if (unlikely(__pyx_t_13 < 0)) __pyx_t_11 = 0; } else if (unlikely(__pyx_t_13 >= __pyx_pybuffernd_stamps.diminfo[0].shape)) __pyx_t_11 = 0; if (unlikely(__pyx_t_11 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_11); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2273; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } pandas_datetime_to_datetimestruct((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_stamps.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_stamps.diminfo[0].strides)), PANDAS_FR_ns, (&__pyx_v_dts)); /* "pandas/tslib.pyx":2274 * continue * pandas_datetime_to_datetimestruct(stamps[i], PANDAS_FR_ns, &dts) * result[i] = _normalized_stamp(&dts) # <<<<<<<<<<<<<< * elif _is_tzlocal(tz): * for i in range(n): */ __pyx_t_14 = __pyx_v_i; __pyx_t_11 = -1; if (__pyx_t_14 < 0) { __pyx_t_14 += __pyx_pybuffernd_result.diminfo[0].shape; if (unlikely(__pyx_t_14 < 0)) __pyx_t_11 = 0; } else if (unlikely(__pyx_t_14 >= __pyx_pybuffernd_result.diminfo[0].shape)) __pyx_t_11 = 0; if (unlikely(__pyx_t_11 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_11); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2274; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_result.diminfo[0].strides) = __pyx_f_6pandas_5tslib__normalized_stamp((&__pyx_v_dts)); __pyx_L4_continue:; } goto __pyx_L3; } /* "pandas/tslib.pyx":2275 * pandas_datetime_to_datetimestruct(stamps[i], PANDAS_FR_ns, &dts) * result[i] = _normalized_stamp(&dts) * elif _is_tzlocal(tz): # <<<<<<<<<<<<<< * for i in range(n): * if stamps[i] == NPY_NAT: */ __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_is_tzlocal); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2275; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2275; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_tz); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_tz); __Pyx_GIVEREF(__pyx_v_tz); __pyx_t_4 = PyObject_Call(__pyx_t_6, __pyx_t_2, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2275; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2275; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_8) { /* "pandas/tslib.pyx":2276 * result[i] = _normalized_stamp(&dts) * elif _is_tzlocal(tz): * for i in range(n): # <<<<<<<<<<<<<< * if stamps[i] == NPY_NAT: * result[i] = NPY_NAT */ __pyx_t_1 = __pyx_v_n; for (__pyx_t_9 = 0; __pyx_t_9 < __pyx_t_1; __pyx_t_9+=1) { __pyx_v_i = __pyx_t_9; /* "pandas/tslib.pyx":2277 * elif _is_tzlocal(tz): * for i in range(n): * if stamps[i] == NPY_NAT: # <<<<<<<<<<<<<< * result[i] = NPY_NAT * continue */ __pyx_t_15 = __pyx_v_i; __pyx_t_11 = -1; if (__pyx_t_15 < 0) { __pyx_t_15 += __pyx_pybuffernd_stamps.diminfo[0].shape; if (unlikely(__pyx_t_15 < 0)) __pyx_t_11 = 0; } else if (unlikely(__pyx_t_15 >= __pyx_pybuffernd_stamps.diminfo[0].shape)) __pyx_t_11 = 0; if (unlikely(__pyx_t_11 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_11); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2277; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_8 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_stamps.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_stamps.diminfo[0].strides)) == __pyx_v_6pandas_5tslib_NPY_NAT) != 0); if (__pyx_t_8) { /* "pandas/tslib.pyx":2278 * for i in range(n): * if stamps[i] == NPY_NAT: * result[i] = NPY_NAT # <<<<<<<<<<<<<< * continue * pandas_datetime_to_datetimestruct(stamps[i], PANDAS_FR_ns, */ __pyx_t_16 = __pyx_v_i; __pyx_t_11 = -1; if (__pyx_t_16 < 0) { __pyx_t_16 += __pyx_pybuffernd_result.diminfo[0].shape; if (unlikely(__pyx_t_16 < 0)) __pyx_t_11 = 0; } else if (unlikely(__pyx_t_16 >= __pyx_pybuffernd_result.diminfo[0].shape)) __pyx_t_11 = 0; if (unlikely(__pyx_t_11 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_11); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2278; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_result.diminfo[0].strides) = __pyx_v_6pandas_5tslib_NPY_NAT; /* "pandas/tslib.pyx":2279 * if stamps[i] == NPY_NAT: * result[i] = NPY_NAT * continue # <<<<<<<<<<<<<< * pandas_datetime_to_datetimestruct(stamps[i], PANDAS_FR_ns, * &dts) */ goto __pyx_L7_continue; } /* "pandas/tslib.pyx":2280 * result[i] = NPY_NAT * continue * pandas_datetime_to_datetimestruct(stamps[i], PANDAS_FR_ns, # <<<<<<<<<<<<<< * &dts) * dt = datetime(dts.year, dts.month, dts.day, dts.hour, */ __pyx_t_17 = __pyx_v_i; __pyx_t_11 = -1; if (__pyx_t_17 < 0) { __pyx_t_17 += __pyx_pybuffernd_stamps.diminfo[0].shape; if (unlikely(__pyx_t_17 < 0)) __pyx_t_11 = 0; } else if (unlikely(__pyx_t_17 >= __pyx_pybuffernd_stamps.diminfo[0].shape)) __pyx_t_11 = 0; if (unlikely(__pyx_t_11 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_11); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2280; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } /* "pandas/tslib.pyx":2281 * continue * pandas_datetime_to_datetimestruct(stamps[i], PANDAS_FR_ns, * &dts) # <<<<<<<<<<<<<< * dt = datetime(dts.year, dts.month, dts.day, dts.hour, * dts.min, dts.sec, dts.us, tz) */ pandas_datetime_to_datetimestruct((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_stamps.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_stamps.diminfo[0].strides)), PANDAS_FR_ns, (&__pyx_v_dts)); /* "pandas/tslib.pyx":2282 * pandas_datetime_to_datetimestruct(stamps[i], PANDAS_FR_ns, * &dts) * dt = datetime(dts.year, dts.month, dts.day, dts.hour, # <<<<<<<<<<<<<< * dts.min, dts.sec, dts.us, tz) * delta = int(total_seconds(_get_utcoffset(tz, dt))) * 1000000000 */ __pyx_t_4 = __Pyx_PyInt_From_npy_int64(__pyx_v_dts.year); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2282; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_2 = __Pyx_PyInt_From_npy_int32(__pyx_v_dts.month); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2282; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_6 = __Pyx_PyInt_From_npy_int32(__pyx_v_dts.day); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2282; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_3 = __Pyx_PyInt_From_npy_int32(__pyx_v_dts.hour); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2282; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); /* "pandas/tslib.pyx":2283 * &dts) * dt = datetime(dts.year, dts.month, dts.day, dts.hour, * dts.min, dts.sec, dts.us, tz) # <<<<<<<<<<<<<< * delta = int(total_seconds(_get_utcoffset(tz, dt))) * 1000000000 * pandas_datetime_to_datetimestruct(stamps[i] + delta, */ __pyx_t_5 = __Pyx_PyInt_From_npy_int32(__pyx_v_dts.min); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2283; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_18 = __Pyx_PyInt_From_npy_int32(__pyx_v_dts.sec); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2283; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); __pyx_t_19 = __Pyx_PyInt_From_npy_int32(__pyx_v_dts.us); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2283; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_19); /* "pandas/tslib.pyx":2282 * pandas_datetime_to_datetimestruct(stamps[i], PANDAS_FR_ns, * &dts) * dt = datetime(dts.year, dts.month, dts.day, dts.hour, # <<<<<<<<<<<<<< * dts.min, dts.sec, dts.us, tz) * delta = int(total_seconds(_get_utcoffset(tz, dt))) * 1000000000 */ __pyx_t_20 = PyTuple_New(8); if (unlikely(!__pyx_t_20)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2282; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_20); PyTuple_SET_ITEM(__pyx_t_20, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_20, 1, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_20, 2, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_20, 3, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_20, 4, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_20, 5, __pyx_t_18); __Pyx_GIVEREF(__pyx_t_18); PyTuple_SET_ITEM(__pyx_t_20, 6, __pyx_t_19); __Pyx_GIVEREF(__pyx_t_19); __Pyx_INCREF(__pyx_v_tz); PyTuple_SET_ITEM(__pyx_t_20, 7, __pyx_v_tz); __Pyx_GIVEREF(__pyx_v_tz); __pyx_t_4 = 0; __pyx_t_2 = 0; __pyx_t_6 = 0; __pyx_t_3 = 0; __pyx_t_5 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_19 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_8datetime_datetime)), __pyx_t_20, NULL); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2282; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_19); __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0; __Pyx_XDECREF_SET(__pyx_v_dt, ((PyDateTime_DateTime *)__pyx_t_19)); __pyx_t_19 = 0; /* "pandas/tslib.pyx":2284 * dt = datetime(dts.year, dts.month, dts.day, dts.hour, * dts.min, dts.sec, dts.us, tz) * delta = int(total_seconds(_get_utcoffset(tz, dt))) * 1000000000 # <<<<<<<<<<<<<< * pandas_datetime_to_datetimestruct(stamps[i] + delta, * PANDAS_FR_ns, &dts) */ __pyx_t_19 = __pyx_f_6pandas_5tslib__get_utcoffset(__pyx_v_tz, ((PyObject *)__pyx_v_dt), 0); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2284; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_19); __pyx_t_20 = PyFloat_FromDouble(__pyx_f_6pandas_5tslib_total_seconds(__pyx_t_19)); if (unlikely(!__pyx_t_20)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2284; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_20); __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0; __pyx_t_19 = PyTuple_New(1); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2284; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_19); PyTuple_SET_ITEM(__pyx_t_19, 0, __pyx_t_20); __Pyx_GIVEREF(__pyx_t_20); __pyx_t_20 = 0; __pyx_t_20 = PyObject_Call(((PyObject *)((PyObject*)(&PyInt_Type))), __pyx_t_19, NULL); if (unlikely(!__pyx_t_20)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2284; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_20); __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0; __pyx_t_19 = PyNumber_Multiply(__pyx_t_20, __pyx_int_1000000000); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2284; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_19); __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0; __Pyx_XDECREF_SET(__pyx_v_delta, __pyx_t_19); __pyx_t_19 = 0; /* "pandas/tslib.pyx":2285 * dts.min, dts.sec, dts.us, tz) * delta = int(total_seconds(_get_utcoffset(tz, dt))) * 1000000000 * pandas_datetime_to_datetimestruct(stamps[i] + delta, # <<<<<<<<<<<<<< * PANDAS_FR_ns, &dts) * result[i] = _normalized_stamp(&dts) */ __pyx_t_21 = __pyx_v_i; __pyx_t_11 = -1; if (__pyx_t_21 < 0) { __pyx_t_21 += __pyx_pybuffernd_stamps.diminfo[0].shape; if (unlikely(__pyx_t_21 < 0)) __pyx_t_11 = 0; } else if (unlikely(__pyx_t_21 >= __pyx_pybuffernd_stamps.diminfo[0].shape)) __pyx_t_11 = 0; if (unlikely(__pyx_t_11 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_11); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2285; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_19 = __Pyx_PyInt_From_npy_int64((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_stamps.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_stamps.diminfo[0].strides))); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2285; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_19); __pyx_t_20 = PyNumber_Add(__pyx_t_19, __pyx_v_delta); if (unlikely(!__pyx_t_20)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2285; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_20); __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0; __pyx_t_22 = __Pyx_PyInt_As_npy_int64(__pyx_t_20); if (unlikely((__pyx_t_22 == (npy_datetime)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2285; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0; /* "pandas/tslib.pyx":2286 * delta = int(total_seconds(_get_utcoffset(tz, dt))) * 1000000000 * pandas_datetime_to_datetimestruct(stamps[i] + delta, * PANDAS_FR_ns, &dts) # <<<<<<<<<<<<<< * result[i] = _normalized_stamp(&dts) * else: */ pandas_datetime_to_datetimestruct(__pyx_t_22, PANDAS_FR_ns, (&__pyx_v_dts)); /* "pandas/tslib.pyx":2287 * pandas_datetime_to_datetimestruct(stamps[i] + delta, * PANDAS_FR_ns, &dts) * result[i] = _normalized_stamp(&dts) # <<<<<<<<<<<<<< * else: * # Adjust datetime64 timestamp, recompute datetimestruct */ __pyx_t_23 = __pyx_v_i; __pyx_t_11 = -1; if (__pyx_t_23 < 0) { __pyx_t_23 += __pyx_pybuffernd_result.diminfo[0].shape; if (unlikely(__pyx_t_23 < 0)) __pyx_t_11 = 0; } else if (unlikely(__pyx_t_23 >= __pyx_pybuffernd_result.diminfo[0].shape)) __pyx_t_11 = 0; if (unlikely(__pyx_t_11 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_11); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2287; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_23, __pyx_pybuffernd_result.diminfo[0].strides) = __pyx_f_6pandas_5tslib__normalized_stamp((&__pyx_v_dts)); __pyx_L7_continue:; } goto __pyx_L3; } /*else*/ { /* "pandas/tslib.pyx":2290 * else: * # Adjust datetime64 timestamp, recompute datetimestruct * trans = _get_transitions(tz) # <<<<<<<<<<<<<< * deltas = _get_deltas(tz) * _pos = trans.searchsorted(stamps, side='right') - 1 */ __pyx_t_20 = __Pyx_GetModuleGlobalName(__pyx_n_s_get_transitions); if (unlikely(!__pyx_t_20)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2290; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_20); __pyx_t_19 = PyTuple_New(1); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2290; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_19); __Pyx_INCREF(__pyx_v_tz); PyTuple_SET_ITEM(__pyx_t_19, 0, __pyx_v_tz); __Pyx_GIVEREF(__pyx_v_tz); __pyx_t_18 = PyObject_Call(__pyx_t_20, __pyx_t_19, NULL); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2290; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0; __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0; if (!(likely(((__pyx_t_18) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_18, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2290; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_24 = ((PyArrayObject *)__pyx_t_18); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_trans.rcbuffer->pybuffer); __pyx_t_11 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_trans.rcbuffer->pybuffer, (PyObject*)__pyx_t_24, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_11 < 0)) { PyErr_Fetch(&__pyx_t_25, &__pyx_t_26, &__pyx_t_27); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_trans.rcbuffer->pybuffer, (PyObject*)__pyx_v_trans, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_25); Py_XDECREF(__pyx_t_26); Py_XDECREF(__pyx_t_27); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_25, __pyx_t_26, __pyx_t_27); } } __pyx_pybuffernd_trans.diminfo[0].strides = __pyx_pybuffernd_trans.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_trans.diminfo[0].shape = __pyx_pybuffernd_trans.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_11 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2290; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_24 = 0; __pyx_v_trans = ((PyArrayObject *)__pyx_t_18); __pyx_t_18 = 0; /* "pandas/tslib.pyx":2291 * # Adjust datetime64 timestamp, recompute datetimestruct * trans = _get_transitions(tz) * deltas = _get_deltas(tz) # <<<<<<<<<<<<<< * _pos = trans.searchsorted(stamps, side='right') - 1 * if _pos.dtype != np.int64: */ __pyx_t_18 = __Pyx_GetModuleGlobalName(__pyx_n_s_get_deltas); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2291; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); __pyx_t_19 = PyTuple_New(1); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2291; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_19); __Pyx_INCREF(__pyx_v_tz); PyTuple_SET_ITEM(__pyx_t_19, 0, __pyx_v_tz); __Pyx_GIVEREF(__pyx_v_tz); __pyx_t_20 = PyObject_Call(__pyx_t_18, __pyx_t_19, NULL); if (unlikely(!__pyx_t_20)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2291; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_20); __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0; if (!(likely(((__pyx_t_20) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_20, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2291; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_24 = ((PyArrayObject *)__pyx_t_20); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_deltas.rcbuffer->pybuffer); __pyx_t_11 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_deltas.rcbuffer->pybuffer, (PyObject*)__pyx_t_24, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_11 < 0)) { PyErr_Fetch(&__pyx_t_27, &__pyx_t_26, &__pyx_t_25); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_deltas.rcbuffer->pybuffer, (PyObject*)__pyx_v_deltas, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_27); Py_XDECREF(__pyx_t_26); Py_XDECREF(__pyx_t_25); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_27, __pyx_t_26, __pyx_t_25); } } __pyx_pybuffernd_deltas.diminfo[0].strides = __pyx_pybuffernd_deltas.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_deltas.diminfo[0].shape = __pyx_pybuffernd_deltas.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_11 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2291; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_24 = 0; __pyx_v_deltas = ((PyArrayObject *)__pyx_t_20); __pyx_t_20 = 0; /* "pandas/tslib.pyx":2292 * trans = _get_transitions(tz) * deltas = _get_deltas(tz) * _pos = trans.searchsorted(stamps, side='right') - 1 # <<<<<<<<<<<<<< * if _pos.dtype != np.int64: * _pos = _pos.astype(np.int64) */ __pyx_t_20 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_trans), __pyx_n_s_searchsorted); if (unlikely(!__pyx_t_20)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2292; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_20); __pyx_t_19 = PyTuple_New(1); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2292; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_19); __Pyx_INCREF(((PyObject *)__pyx_v_stamps)); PyTuple_SET_ITEM(__pyx_t_19, 0, ((PyObject *)__pyx_v_stamps)); __Pyx_GIVEREF(((PyObject *)__pyx_v_stamps)); __pyx_t_18 = PyDict_New(); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2292; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); if (PyDict_SetItem(__pyx_t_18, __pyx_n_s_side, __pyx_n_s_right) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2292; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_5 = PyObject_Call(__pyx_t_20, __pyx_t_19, __pyx_t_18); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2292; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0; __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0; __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; __pyx_t_18 = PyNumber_Subtract(__pyx_t_5, __pyx_int_1); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2292; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_v__pos = __pyx_t_18; __pyx_t_18 = 0; /* "pandas/tslib.pyx":2293 * deltas = _get_deltas(tz) * _pos = trans.searchsorted(stamps, side='right') - 1 * if _pos.dtype != np.int64: # <<<<<<<<<<<<<< * _pos = _pos.astype(np.int64) * pos = _pos */ __pyx_t_18 = __Pyx_PyObject_GetAttrStr(__pyx_v__pos, __pyx_n_s_dtype); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2293; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2293; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_19 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_int64); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2293; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_19); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyObject_RichCompare(__pyx_t_18, __pyx_t_19, Py_NE); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2293; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0; __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2293; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_8) { /* "pandas/tslib.pyx":2294 * _pos = trans.searchsorted(stamps, side='right') - 1 * if _pos.dtype != np.int64: * _pos = _pos.astype(np.int64) # <<<<<<<<<<<<<< * pos = _pos * */ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v__pos, __pyx_n_s_astype); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2294; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_19 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2294; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_19); __pyx_t_18 = __Pyx_PyObject_GetAttrStr(__pyx_t_19, __pyx_n_s_int64); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2294; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0; __pyx_t_19 = PyTuple_New(1); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2294; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_19); PyTuple_SET_ITEM(__pyx_t_19, 0, __pyx_t_18); __Pyx_GIVEREF(__pyx_t_18); __pyx_t_18 = 0; __pyx_t_18 = PyObject_Call(__pyx_t_5, __pyx_t_19, NULL); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2294; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0; __Pyx_DECREF_SET(__pyx_v__pos, __pyx_t_18); __pyx_t_18 = 0; goto __pyx_L10; } __pyx_L10:; /* "pandas/tslib.pyx":2295 * if _pos.dtype != np.int64: * _pos = _pos.astype(np.int64) * pos = _pos # <<<<<<<<<<<<<< * * # statictzinfo */ if (!(likely(((__pyx_v__pos) == Py_None) || likely(__Pyx_TypeTest(__pyx_v__pos, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2295; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_18 = __pyx_v__pos; __Pyx_INCREF(__pyx_t_18); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_pos.rcbuffer->pybuffer); __pyx_t_11 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_pos.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_18), &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_11 < 0)) { PyErr_Fetch(&__pyx_t_25, &__pyx_t_26, &__pyx_t_27); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_pos.rcbuffer->pybuffer, (PyObject*)__pyx_v_pos, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_25); Py_XDECREF(__pyx_t_26); Py_XDECREF(__pyx_t_27); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_25, __pyx_t_26, __pyx_t_27); } } __pyx_pybuffernd_pos.diminfo[0].strides = __pyx_pybuffernd_pos.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_pos.diminfo[0].shape = __pyx_pybuffernd_pos.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_11 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2295; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_pos = ((PyArrayObject *)__pyx_t_18); __pyx_t_18 = 0; /* "pandas/tslib.pyx":2298 * * # statictzinfo * if not hasattr(tz, '_transition_info'): # <<<<<<<<<<<<<< * for i in range(n): * if stamps[i] == NPY_NAT: */ __pyx_t_8 = PyObject_HasAttr(__pyx_v_tz, __pyx_n_s_transition_info); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2298; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_28 = ((!(__pyx_t_8 != 0)) != 0); if (__pyx_t_28) { /* "pandas/tslib.pyx":2299 * # statictzinfo * if not hasattr(tz, '_transition_info'): * for i in range(n): # <<<<<<<<<<<<<< * if stamps[i] == NPY_NAT: * result[i] = NPY_NAT */ __pyx_t_1 = __pyx_v_n; for (__pyx_t_9 = 0; __pyx_t_9 < __pyx_t_1; __pyx_t_9+=1) { __pyx_v_i = __pyx_t_9; /* "pandas/tslib.pyx":2300 * if not hasattr(tz, '_transition_info'): * for i in range(n): * if stamps[i] == NPY_NAT: # <<<<<<<<<<<<<< * result[i] = NPY_NAT * continue */ __pyx_t_29 = __pyx_v_i; __pyx_t_11 = -1; if (__pyx_t_29 < 0) { __pyx_t_29 += __pyx_pybuffernd_stamps.diminfo[0].shape; if (unlikely(__pyx_t_29 < 0)) __pyx_t_11 = 0; } else if (unlikely(__pyx_t_29 >= __pyx_pybuffernd_stamps.diminfo[0].shape)) __pyx_t_11 = 0; if (unlikely(__pyx_t_11 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_11); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2300; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_28 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_stamps.rcbuffer->pybuffer.buf, __pyx_t_29, __pyx_pybuffernd_stamps.diminfo[0].strides)) == __pyx_v_6pandas_5tslib_NPY_NAT) != 0); if (__pyx_t_28) { /* "pandas/tslib.pyx":2301 * for i in range(n): * if stamps[i] == NPY_NAT: * result[i] = NPY_NAT # <<<<<<<<<<<<<< * continue * pandas_datetime_to_datetimestruct(stamps[i] + deltas[0], */ __pyx_t_30 = __pyx_v_i; __pyx_t_11 = -1; if (__pyx_t_30 < 0) { __pyx_t_30 += __pyx_pybuffernd_result.diminfo[0].shape; if (unlikely(__pyx_t_30 < 0)) __pyx_t_11 = 0; } else if (unlikely(__pyx_t_30 >= __pyx_pybuffernd_result.diminfo[0].shape)) __pyx_t_11 = 0; if (unlikely(__pyx_t_11 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_11); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2301; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_30, __pyx_pybuffernd_result.diminfo[0].strides) = __pyx_v_6pandas_5tslib_NPY_NAT; /* "pandas/tslib.pyx":2302 * if stamps[i] == NPY_NAT: * result[i] = NPY_NAT * continue # <<<<<<<<<<<<<< * pandas_datetime_to_datetimestruct(stamps[i] + deltas[0], * PANDAS_FR_ns, &dts) */ goto __pyx_L12_continue; } /* "pandas/tslib.pyx":2303 * result[i] = NPY_NAT * continue * pandas_datetime_to_datetimestruct(stamps[i] + deltas[0], # <<<<<<<<<<<<<< * PANDAS_FR_ns, &dts) * result[i] = _normalized_stamp(&dts) */ __pyx_t_31 = __pyx_v_i; __pyx_t_11 = -1; if (__pyx_t_31 < 0) { __pyx_t_31 += __pyx_pybuffernd_stamps.diminfo[0].shape; if (unlikely(__pyx_t_31 < 0)) __pyx_t_11 = 0; } else if (unlikely(__pyx_t_31 >= __pyx_pybuffernd_stamps.diminfo[0].shape)) __pyx_t_11 = 0; if (unlikely(__pyx_t_11 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_11); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2303; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_32 = 0; __pyx_t_11 = -1; if (__pyx_t_32 < 0) { __pyx_t_32 += __pyx_pybuffernd_deltas.diminfo[0].shape; if (unlikely(__pyx_t_32 < 0)) __pyx_t_11 = 0; } else if (unlikely(__pyx_t_32 >= __pyx_pybuffernd_deltas.diminfo[0].shape)) __pyx_t_11 = 0; if (unlikely(__pyx_t_11 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_11); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2303; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } /* "pandas/tslib.pyx":2304 * continue * pandas_datetime_to_datetimestruct(stamps[i] + deltas[0], * PANDAS_FR_ns, &dts) # <<<<<<<<<<<<<< * result[i] = _normalized_stamp(&dts) * else: */ pandas_datetime_to_datetimestruct(((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_stamps.rcbuffer->pybuffer.buf, __pyx_t_31, __pyx_pybuffernd_stamps.diminfo[0].strides)) + (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_deltas.rcbuffer->pybuffer.buf, __pyx_t_32, __pyx_pybuffernd_deltas.diminfo[0].strides))), PANDAS_FR_ns, (&__pyx_v_dts)); /* "pandas/tslib.pyx":2305 * pandas_datetime_to_datetimestruct(stamps[i] + deltas[0], * PANDAS_FR_ns, &dts) * result[i] = _normalized_stamp(&dts) # <<<<<<<<<<<<<< * else: * for i in range(n): */ __pyx_t_33 = __pyx_v_i; __pyx_t_11 = -1; if (__pyx_t_33 < 0) { __pyx_t_33 += __pyx_pybuffernd_result.diminfo[0].shape; if (unlikely(__pyx_t_33 < 0)) __pyx_t_11 = 0; } else if (unlikely(__pyx_t_33 >= __pyx_pybuffernd_result.diminfo[0].shape)) __pyx_t_11 = 0; if (unlikely(__pyx_t_11 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_11); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2305; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_33, __pyx_pybuffernd_result.diminfo[0].strides) = __pyx_f_6pandas_5tslib__normalized_stamp((&__pyx_v_dts)); __pyx_L12_continue:; } goto __pyx_L11; } /*else*/ { /* "pandas/tslib.pyx":2307 * result[i] = _normalized_stamp(&dts) * else: * for i in range(n): # <<<<<<<<<<<<<< * if stamps[i] == NPY_NAT: * result[i] = NPY_NAT */ __pyx_t_1 = __pyx_v_n; for (__pyx_t_9 = 0; __pyx_t_9 < __pyx_t_1; __pyx_t_9+=1) { __pyx_v_i = __pyx_t_9; /* "pandas/tslib.pyx":2308 * else: * for i in range(n): * if stamps[i] == NPY_NAT: # <<<<<<<<<<<<<< * result[i] = NPY_NAT * continue */ __pyx_t_34 = __pyx_v_i; __pyx_t_11 = -1; if (__pyx_t_34 < 0) { __pyx_t_34 += __pyx_pybuffernd_stamps.diminfo[0].shape; if (unlikely(__pyx_t_34 < 0)) __pyx_t_11 = 0; } else if (unlikely(__pyx_t_34 >= __pyx_pybuffernd_stamps.diminfo[0].shape)) __pyx_t_11 = 0; if (unlikely(__pyx_t_11 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_11); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2308; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_28 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_stamps.rcbuffer->pybuffer.buf, __pyx_t_34, __pyx_pybuffernd_stamps.diminfo[0].strides)) == __pyx_v_6pandas_5tslib_NPY_NAT) != 0); if (__pyx_t_28) { /* "pandas/tslib.pyx":2309 * for i in range(n): * if stamps[i] == NPY_NAT: * result[i] = NPY_NAT # <<<<<<<<<<<<<< * continue * pandas_datetime_to_datetimestruct(stamps[i] + deltas[pos[i]], */ __pyx_t_35 = __pyx_v_i; __pyx_t_11 = -1; if (__pyx_t_35 < 0) { __pyx_t_35 += __pyx_pybuffernd_result.diminfo[0].shape; if (unlikely(__pyx_t_35 < 0)) __pyx_t_11 = 0; } else if (unlikely(__pyx_t_35 >= __pyx_pybuffernd_result.diminfo[0].shape)) __pyx_t_11 = 0; if (unlikely(__pyx_t_11 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_11); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2309; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_35, __pyx_pybuffernd_result.diminfo[0].strides) = __pyx_v_6pandas_5tslib_NPY_NAT; /* "pandas/tslib.pyx":2310 * if stamps[i] == NPY_NAT: * result[i] = NPY_NAT * continue # <<<<<<<<<<<<<< * pandas_datetime_to_datetimestruct(stamps[i] + deltas[pos[i]], * PANDAS_FR_ns, &dts) */ goto __pyx_L15_continue; } /* "pandas/tslib.pyx":2311 * result[i] = NPY_NAT * continue * pandas_datetime_to_datetimestruct(stamps[i] + deltas[pos[i]], # <<<<<<<<<<<<<< * PANDAS_FR_ns, &dts) * result[i] = _normalized_stamp(&dts) */ __pyx_t_36 = __pyx_v_i; __pyx_t_11 = -1; if (__pyx_t_36 < 0) { __pyx_t_36 += __pyx_pybuffernd_stamps.diminfo[0].shape; if (unlikely(__pyx_t_36 < 0)) __pyx_t_11 = 0; } else if (unlikely(__pyx_t_36 >= __pyx_pybuffernd_stamps.diminfo[0].shape)) __pyx_t_11 = 0; if (unlikely(__pyx_t_11 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_11); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2311; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_37 = __pyx_v_i; __pyx_t_11 = -1; if (__pyx_t_37 < 0) { __pyx_t_37 += __pyx_pybuffernd_pos.diminfo[0].shape; if (unlikely(__pyx_t_37 < 0)) __pyx_t_11 = 0; } else if (unlikely(__pyx_t_37 >= __pyx_pybuffernd_pos.diminfo[0].shape)) __pyx_t_11 = 0; if (unlikely(__pyx_t_11 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_11); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2311; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_38 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_pos.rcbuffer->pybuffer.buf, __pyx_t_37, __pyx_pybuffernd_pos.diminfo[0].strides)); __pyx_t_11 = -1; if (__pyx_t_38 < 0) { __pyx_t_38 += __pyx_pybuffernd_deltas.diminfo[0].shape; if (unlikely(__pyx_t_38 < 0)) __pyx_t_11 = 0; } else if (unlikely(__pyx_t_38 >= __pyx_pybuffernd_deltas.diminfo[0].shape)) __pyx_t_11 = 0; if (unlikely(__pyx_t_11 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_11); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2311; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } /* "pandas/tslib.pyx":2312 * continue * pandas_datetime_to_datetimestruct(stamps[i] + deltas[pos[i]], * PANDAS_FR_ns, &dts) # <<<<<<<<<<<<<< * result[i] = _normalized_stamp(&dts) * */ pandas_datetime_to_datetimestruct(((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_stamps.rcbuffer->pybuffer.buf, __pyx_t_36, __pyx_pybuffernd_stamps.diminfo[0].strides)) + (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_deltas.rcbuffer->pybuffer.buf, __pyx_t_38, __pyx_pybuffernd_deltas.diminfo[0].strides))), PANDAS_FR_ns, (&__pyx_v_dts)); /* "pandas/tslib.pyx":2313 * pandas_datetime_to_datetimestruct(stamps[i] + deltas[pos[i]], * PANDAS_FR_ns, &dts) * result[i] = _normalized_stamp(&dts) # <<<<<<<<<<<<<< * * return result */ __pyx_t_39 = __pyx_v_i; __pyx_t_11 = -1; if (__pyx_t_39 < 0) { __pyx_t_39 += __pyx_pybuffernd_result.diminfo[0].shape; if (unlikely(__pyx_t_39 < 0)) __pyx_t_11 = 0; } else if (unlikely(__pyx_t_39 >= __pyx_pybuffernd_result.diminfo[0].shape)) __pyx_t_11 = 0; if (unlikely(__pyx_t_11 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_11); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2313; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_39, __pyx_pybuffernd_result.diminfo[0].strides) = __pyx_f_6pandas_5tslib__normalized_stamp((&__pyx_v_dts)); __pyx_L15_continue:; } } __pyx_L11:; } __pyx_L3:; /* "pandas/tslib.pyx":2315 * result[i] = _normalized_stamp(&dts) * * return result # <<<<<<<<<<<<<< * * cdef inline int64_t _normalized_stamp(pandas_datetimestruct *dts): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_result)); __pyx_r = ((PyObject *)__pyx_v_result); goto __pyx_L0; /* "pandas/tslib.pyx":2261 * return result * * cdef _normalize_local(ndarray[int64_t] stamps, object tz): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t n = len(stamps) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_18); __Pyx_XDECREF(__pyx_t_19); __Pyx_XDECREF(__pyx_t_20); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_deltas.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_pos.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_stamps.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_trans.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.tslib._normalize_local", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_deltas.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_pos.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_stamps.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_trans.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_result); __Pyx_XDECREF((PyObject *)__pyx_v_trans); __Pyx_XDECREF((PyObject *)__pyx_v_deltas); __Pyx_XDECREF((PyObject *)__pyx_v_pos); __Pyx_XDECREF((PyObject *)__pyx_v_dt); __Pyx_XDECREF(__pyx_v_delta); __Pyx_XDECREF(__pyx_v__pos); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/tslib.pyx":2317 * return result * * cdef inline int64_t _normalized_stamp(pandas_datetimestruct *dts): # <<<<<<<<<<<<<< * dts.hour = 0 * dts.min = 0 */ static CYTHON_INLINE __pyx_t_5numpy_int64_t __pyx_f_6pandas_5tslib__normalized_stamp(pandas_datetimestruct *__pyx_v_dts) { __pyx_t_5numpy_int64_t __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_normalized_stamp", 0); /* "pandas/tslib.pyx":2318 * * cdef inline int64_t _normalized_stamp(pandas_datetimestruct *dts): * dts.hour = 0 # <<<<<<<<<<<<<< * dts.min = 0 * dts.sec = 0 */ __pyx_v_dts->hour = 0; /* "pandas/tslib.pyx":2319 * cdef inline int64_t _normalized_stamp(pandas_datetimestruct *dts): * dts.hour = 0 * dts.min = 0 # <<<<<<<<<<<<<< * dts.sec = 0 * dts.us = 0 */ __pyx_v_dts->min = 0; /* "pandas/tslib.pyx":2320 * dts.hour = 0 * dts.min = 0 * dts.sec = 0 # <<<<<<<<<<<<<< * dts.us = 0 * dts.ps = 0 */ __pyx_v_dts->sec = 0; /* "pandas/tslib.pyx":2321 * dts.min = 0 * dts.sec = 0 * dts.us = 0 # <<<<<<<<<<<<<< * dts.ps = 0 * return pandas_datetimestruct_to_datetime(PANDAS_FR_ns, dts) */ __pyx_v_dts->us = 0; /* "pandas/tslib.pyx":2322 * dts.sec = 0 * dts.us = 0 * dts.ps = 0 # <<<<<<<<<<<<<< * return pandas_datetimestruct_to_datetime(PANDAS_FR_ns, dts) * */ __pyx_v_dts->ps = 0; /* "pandas/tslib.pyx":2323 * dts.us = 0 * dts.ps = 0 * return pandas_datetimestruct_to_datetime(PANDAS_FR_ns, dts) # <<<<<<<<<<<<<< * * */ __pyx_r = pandas_datetimestruct_to_datetime(PANDAS_FR_ns, __pyx_v_dts); goto __pyx_L0; /* "pandas/tslib.pyx":2317 * return result * * cdef inline int64_t _normalized_stamp(pandas_datetimestruct *dts): # <<<<<<<<<<<<<< * dts.hour = 0 * dts.min = 0 */ /* function exit code */ __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/tslib.pyx":2326 * * * cdef inline void m8_populate_tsobject(int64_t stamp, _TSObject tso, object tz): # <<<<<<<<<<<<<< * tso.value = stamp * pandas_datetime_to_datetimestruct(tso.value, PANDAS_FR_ns, &tso.dts) */ static CYTHON_INLINE void __pyx_f_6pandas_5tslib_m8_populate_tsobject(__pyx_t_5numpy_int64_t __pyx_v_stamp, struct __pyx_obj_6pandas_5tslib__TSObject *__pyx_v_tso, PyObject *__pyx_v_tz) { __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; __Pyx_RefNannySetupContext("m8_populate_tsobject", 0); /* "pandas/tslib.pyx":2327 * * cdef inline void m8_populate_tsobject(int64_t stamp, _TSObject tso, object tz): * tso.value = stamp # <<<<<<<<<<<<<< * pandas_datetime_to_datetimestruct(tso.value, PANDAS_FR_ns, &tso.dts) * */ __pyx_v_tso->value = __pyx_v_stamp; /* "pandas/tslib.pyx":2328 * cdef inline void m8_populate_tsobject(int64_t stamp, _TSObject tso, object tz): * tso.value = stamp * pandas_datetime_to_datetimestruct(tso.value, PANDAS_FR_ns, &tso.dts) # <<<<<<<<<<<<<< * * if tz is not None: */ pandas_datetime_to_datetimestruct(__pyx_v_tso->value, PANDAS_FR_ns, (&__pyx_v_tso->dts)); /* "pandas/tslib.pyx":2330 * pandas_datetime_to_datetimestruct(tso.value, PANDAS_FR_ns, &tso.dts) * * if tz is not None: # <<<<<<<<<<<<<< * _localize_tso(tso, tz) * */ __pyx_t_1 = (__pyx_v_tz != Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { /* "pandas/tslib.pyx":2331 * * if tz is not None: * _localize_tso(tso, tz) # <<<<<<<<<<<<<< * * */ __pyx_f_6pandas_5tslib__localize_tso(__pyx_v_tso, __pyx_v_tz); goto __pyx_L3; } __pyx_L3:; /* "pandas/tslib.pyx":2326 * * * cdef inline void m8_populate_tsobject(int64_t stamp, _TSObject tso, object tz): # <<<<<<<<<<<<<< * tso.value = stamp * pandas_datetime_to_datetimestruct(tso.value, PANDAS_FR_ns, &tso.dts) */ /* function exit code */ __Pyx_RefNannyFinishContext(); } /* "pandas/tslib.pyx":2334 * * * def dates_normalized(ndarray[int64_t] stamps, tz=None): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = len(stamps) */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5tslib_67dates_normalized(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5tslib_67dates_normalized = {__Pyx_NAMESTR("dates_normalized"), (PyCFunction)__pyx_pw_6pandas_5tslib_67dates_normalized, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5tslib_67dates_normalized(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_stamps = 0; PyObject *__pyx_v_tz = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("dates_normalized (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_stamps,&__pyx_n_s_tz,0}; PyObject* values[2] = {0,0}; values[1] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_stamps)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_tz); if (value) { values[1] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "dates_normalized") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2334; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_stamps = ((PyArrayObject *)values[0]); __pyx_v_tz = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("dates_normalized", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2334; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.tslib.dates_normalized", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_stamps), __pyx_ptype_5numpy_ndarray, 1, "stamps", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2334; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5tslib_66dates_normalized(__pyx_self, __pyx_v_stamps, __pyx_v_tz); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5tslib_66dates_normalized(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_stamps, PyObject *__pyx_v_tz) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_n; pandas_datetimestruct __pyx_v_dts; PyObject *__pyx_v_dt = NULL; PyObject *__pyx_v_trans = NULL; PyObject *__pyx_v_deltas = NULL; PyObject *__pyx_v_pos = NULL; CYTHON_UNUSED PyObject *__pyx_v_inf = NULL; __Pyx_LocalBuf_ND __pyx_pybuffernd_stamps; __Pyx_Buffer __pyx_pybuffer_stamps; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; int __pyx_t_2; int __pyx_t_3; int __pyx_t_4; Py_ssize_t __pyx_t_5; Py_ssize_t __pyx_t_6; int __pyx_t_7; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; Py_ssize_t __pyx_t_11; PyObject *__pyx_t_12 = NULL; PyObject *__pyx_t_13 = NULL; PyObject *__pyx_t_14 = NULL; PyObject *__pyx_t_15 = NULL; PyObject *__pyx_t_16 = NULL; Py_ssize_t __pyx_t_17; Py_ssize_t __pyx_t_18; npy_datetime __pyx_t_19; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("dates_normalized", 0); __pyx_pybuffer_stamps.pybuffer.buf = NULL; __pyx_pybuffer_stamps.refcount = 0; __pyx_pybuffernd_stamps.data = NULL; __pyx_pybuffernd_stamps.rcbuffer = &__pyx_pybuffer_stamps; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_stamps.rcbuffer->pybuffer, (PyObject*)__pyx_v_stamps, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2334; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_stamps.diminfo[0].strides = __pyx_pybuffernd_stamps.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_stamps.diminfo[0].shape = __pyx_pybuffernd_stamps.rcbuffer->pybuffer.shape[0]; /* "pandas/tslib.pyx":2336 * def dates_normalized(ndarray[int64_t] stamps, tz=None): * cdef: * Py_ssize_t i, n = len(stamps) # <<<<<<<<<<<<<< * pandas_datetimestruct dts * */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_stamps)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2336; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/tslib.pyx":2339 * pandas_datetimestruct dts * * if tz is None or _is_utc(tz): # <<<<<<<<<<<<<< * for i in range(n): * pandas_datetime_to_datetimestruct(stamps[i], PANDAS_FR_ns, &dts) */ __pyx_t_2 = (__pyx_v_tz == Py_None); if (!(__pyx_t_2 != 0)) { __pyx_t_3 = (__pyx_f_6pandas_5tslib__is_utc(__pyx_v_tz) != 0); __pyx_t_4 = __pyx_t_3; } else { __pyx_t_4 = (__pyx_t_2 != 0); } if (__pyx_t_4) { /* "pandas/tslib.pyx":2340 * * if tz is None or _is_utc(tz): * for i in range(n): # <<<<<<<<<<<<<< * pandas_datetime_to_datetimestruct(stamps[i], PANDAS_FR_ns, &dts) * if (dts.hour + dts.min + dts.sec + dts.us) > 0: */ __pyx_t_1 = __pyx_v_n; for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_1; __pyx_t_5+=1) { __pyx_v_i = __pyx_t_5; /* "pandas/tslib.pyx":2341 * if tz is None or _is_utc(tz): * for i in range(n): * pandas_datetime_to_datetimestruct(stamps[i], PANDAS_FR_ns, &dts) # <<<<<<<<<<<<<< * if (dts.hour + dts.min + dts.sec + dts.us) > 0: * return False */ __pyx_t_6 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_6 < 0) { __pyx_t_6 += __pyx_pybuffernd_stamps.diminfo[0].shape; if (unlikely(__pyx_t_6 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_6 >= __pyx_pybuffernd_stamps.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2341; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } pandas_datetime_to_datetimestruct((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_stamps.rcbuffer->pybuffer.buf, __pyx_t_6, __pyx_pybuffernd_stamps.diminfo[0].strides)), PANDAS_FR_ns, (&__pyx_v_dts)); /* "pandas/tslib.pyx":2342 * for i in range(n): * pandas_datetime_to_datetimestruct(stamps[i], PANDAS_FR_ns, &dts) * if (dts.hour + dts.min + dts.sec + dts.us) > 0: # <<<<<<<<<<<<<< * return False * elif _is_tzlocal(tz): */ __pyx_t_4 = (((((__pyx_v_dts.hour + __pyx_v_dts.min) + __pyx_v_dts.sec) + __pyx_v_dts.us) > 0) != 0); if (__pyx_t_4) { /* "pandas/tslib.pyx":2343 * pandas_datetime_to_datetimestruct(stamps[i], PANDAS_FR_ns, &dts) * if (dts.hour + dts.min + dts.sec + dts.us) > 0: * return False # <<<<<<<<<<<<<< * elif _is_tzlocal(tz): * for i in range(n): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(Py_False); __pyx_r = Py_False; goto __pyx_L0; } } goto __pyx_L3; } /* "pandas/tslib.pyx":2344 * if (dts.hour + dts.min + dts.sec + dts.us) > 0: * return False * elif _is_tzlocal(tz): # <<<<<<<<<<<<<< * for i in range(n): * pandas_datetime_to_datetimestruct(stamps[i], PANDAS_FR_ns, &dts) */ __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_is_tzlocal); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2344; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2344; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_INCREF(__pyx_v_tz); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_v_tz); __Pyx_GIVEREF(__pyx_v_tz); __pyx_t_10 = PyObject_Call(__pyx_t_8, __pyx_t_9, NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2344; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_10); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2344; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; if (__pyx_t_4) { /* "pandas/tslib.pyx":2345 * return False * elif _is_tzlocal(tz): * for i in range(n): # <<<<<<<<<<<<<< * pandas_datetime_to_datetimestruct(stamps[i], PANDAS_FR_ns, &dts) * if (dts.min + dts.sec + dts.us) > 0: */ __pyx_t_1 = __pyx_v_n; for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_1; __pyx_t_5+=1) { __pyx_v_i = __pyx_t_5; /* "pandas/tslib.pyx":2346 * elif _is_tzlocal(tz): * for i in range(n): * pandas_datetime_to_datetimestruct(stamps[i], PANDAS_FR_ns, &dts) # <<<<<<<<<<<<<< * if (dts.min + dts.sec + dts.us) > 0: * return False */ __pyx_t_11 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_11 < 0) { __pyx_t_11 += __pyx_pybuffernd_stamps.diminfo[0].shape; if (unlikely(__pyx_t_11 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_11 >= __pyx_pybuffernd_stamps.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2346; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } pandas_datetime_to_datetimestruct((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_stamps.rcbuffer->pybuffer.buf, __pyx_t_11, __pyx_pybuffernd_stamps.diminfo[0].strides)), PANDAS_FR_ns, (&__pyx_v_dts)); /* "pandas/tslib.pyx":2347 * for i in range(n): * pandas_datetime_to_datetimestruct(stamps[i], PANDAS_FR_ns, &dts) * if (dts.min + dts.sec + dts.us) > 0: # <<<<<<<<<<<<<< * return False * dt = datetime(dts.year, dts.month, dts.day, dts.hour, dts.min, */ __pyx_t_4 = ((((__pyx_v_dts.min + __pyx_v_dts.sec) + __pyx_v_dts.us) > 0) != 0); if (__pyx_t_4) { /* "pandas/tslib.pyx":2348 * pandas_datetime_to_datetimestruct(stamps[i], PANDAS_FR_ns, &dts) * if (dts.min + dts.sec + dts.us) > 0: * return False # <<<<<<<<<<<<<< * dt = datetime(dts.year, dts.month, dts.day, dts.hour, dts.min, * dts.sec, dts.us, tz) */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(Py_False); __pyx_r = Py_False; goto __pyx_L0; } /* "pandas/tslib.pyx":2349 * if (dts.min + dts.sec + dts.us) > 0: * return False * dt = datetime(dts.year, dts.month, dts.day, dts.hour, dts.min, # <<<<<<<<<<<<<< * dts.sec, dts.us, tz) * dt = dt + tz.utcoffset(dt) */ __pyx_t_10 = __Pyx_PyInt_From_npy_int64(__pyx_v_dts.year); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2349; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __pyx_t_9 = __Pyx_PyInt_From_npy_int32(__pyx_v_dts.month); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2349; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_t_8 = __Pyx_PyInt_From_npy_int32(__pyx_v_dts.day); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2349; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_12 = __Pyx_PyInt_From_npy_int32(__pyx_v_dts.hour); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2349; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __pyx_t_13 = __Pyx_PyInt_From_npy_int32(__pyx_v_dts.min); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2349; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); /* "pandas/tslib.pyx":2350 * return False * dt = datetime(dts.year, dts.month, dts.day, dts.hour, dts.min, * dts.sec, dts.us, tz) # <<<<<<<<<<<<<< * dt = dt + tz.utcoffset(dt) * if dt.hour > 0: */ __pyx_t_14 = __Pyx_PyInt_From_npy_int32(__pyx_v_dts.sec); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2350; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_14); __pyx_t_15 = __Pyx_PyInt_From_npy_int32(__pyx_v_dts.us); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2350; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_15); /* "pandas/tslib.pyx":2349 * if (dts.min + dts.sec + dts.us) > 0: * return False * dt = datetime(dts.year, dts.month, dts.day, dts.hour, dts.min, # <<<<<<<<<<<<<< * dts.sec, dts.us, tz) * dt = dt + tz.utcoffset(dt) */ __pyx_t_16 = PyTuple_New(8); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2349; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_16); PyTuple_SET_ITEM(__pyx_t_16, 0, __pyx_t_10); __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_16, 1, __pyx_t_9); __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_16, 2, __pyx_t_8); __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_16, 3, __pyx_t_12); __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_16, 4, __pyx_t_13); __Pyx_GIVEREF(__pyx_t_13); PyTuple_SET_ITEM(__pyx_t_16, 5, __pyx_t_14); __Pyx_GIVEREF(__pyx_t_14); PyTuple_SET_ITEM(__pyx_t_16, 6, __pyx_t_15); __Pyx_GIVEREF(__pyx_t_15); __Pyx_INCREF(__pyx_v_tz); PyTuple_SET_ITEM(__pyx_t_16, 7, __pyx_v_tz); __Pyx_GIVEREF(__pyx_v_tz); __pyx_t_10 = 0; __pyx_t_9 = 0; __pyx_t_8 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_15 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_8datetime_datetime)), __pyx_t_16, NULL); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2349; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_15); __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; __Pyx_XDECREF_SET(__pyx_v_dt, __pyx_t_15); __pyx_t_15 = 0; /* "pandas/tslib.pyx":2351 * dt = datetime(dts.year, dts.month, dts.day, dts.hour, dts.min, * dts.sec, dts.us, tz) * dt = dt + tz.utcoffset(dt) # <<<<<<<<<<<<<< * if dt.hour > 0: * return False */ __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_v_tz, __pyx_n_s_utcoffset); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2351; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_15); __pyx_t_16 = PyTuple_New(1); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2351; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_16); __Pyx_INCREF(__pyx_v_dt); PyTuple_SET_ITEM(__pyx_t_16, 0, __pyx_v_dt); __Pyx_GIVEREF(__pyx_v_dt); __pyx_t_14 = PyObject_Call(__pyx_t_15, __pyx_t_16, NULL); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2351; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_14); __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; __pyx_t_16 = PyNumber_Add(__pyx_v_dt, __pyx_t_14); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2351; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_16); __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; __Pyx_DECREF_SET(__pyx_v_dt, __pyx_t_16); __pyx_t_16 = 0; /* "pandas/tslib.pyx":2352 * dts.sec, dts.us, tz) * dt = dt + tz.utcoffset(dt) * if dt.hour > 0: # <<<<<<<<<<<<<< * return False * else: */ __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_v_dt, __pyx_n_s_hour); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2352; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_16); __pyx_t_14 = PyObject_RichCompare(__pyx_t_16, __pyx_int_0, Py_GT); __Pyx_XGOTREF(__pyx_t_14); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2352; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_14); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2352; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; if (__pyx_t_4) { /* "pandas/tslib.pyx":2353 * dt = dt + tz.utcoffset(dt) * if dt.hour > 0: * return False # <<<<<<<<<<<<<< * else: * trans = _get_transitions(tz) */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(Py_False); __pyx_r = Py_False; goto __pyx_L0; } } goto __pyx_L3; } /*else*/ { /* "pandas/tslib.pyx":2355 * return False * else: * trans = _get_transitions(tz) # <<<<<<<<<<<<<< * deltas = _get_deltas(tz) * for i in range(n): */ __pyx_t_14 = __Pyx_GetModuleGlobalName(__pyx_n_s_get_transitions); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2355; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_14); __pyx_t_16 = PyTuple_New(1); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2355; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_16); __Pyx_INCREF(__pyx_v_tz); PyTuple_SET_ITEM(__pyx_t_16, 0, __pyx_v_tz); __Pyx_GIVEREF(__pyx_v_tz); __pyx_t_15 = PyObject_Call(__pyx_t_14, __pyx_t_16, NULL); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2355; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_15); __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; __pyx_v_trans = __pyx_t_15; __pyx_t_15 = 0; /* "pandas/tslib.pyx":2356 * else: * trans = _get_transitions(tz) * deltas = _get_deltas(tz) # <<<<<<<<<<<<<< * for i in range(n): * # Adjust datetime64 timestamp, recompute datetimestruct */ __pyx_t_15 = __Pyx_GetModuleGlobalName(__pyx_n_s_get_deltas); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2356; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_15); __pyx_t_16 = PyTuple_New(1); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2356; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_16); __Pyx_INCREF(__pyx_v_tz); PyTuple_SET_ITEM(__pyx_t_16, 0, __pyx_v_tz); __Pyx_GIVEREF(__pyx_v_tz); __pyx_t_14 = PyObject_Call(__pyx_t_15, __pyx_t_16, NULL); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2356; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_14); __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; __pyx_v_deltas = __pyx_t_14; __pyx_t_14 = 0; /* "pandas/tslib.pyx":2357 * trans = _get_transitions(tz) * deltas = _get_deltas(tz) * for i in range(n): # <<<<<<<<<<<<<< * # Adjust datetime64 timestamp, recompute datetimestruct * pos = trans.searchsorted(stamps[i]) - 1 */ __pyx_t_1 = __pyx_v_n; for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_1; __pyx_t_5+=1) { __pyx_v_i = __pyx_t_5; /* "pandas/tslib.pyx":2359 * for i in range(n): * # Adjust datetime64 timestamp, recompute datetimestruct * pos = trans.searchsorted(stamps[i]) - 1 # <<<<<<<<<<<<<< * inf = tz._transition_info[pos] * */ __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_v_trans, __pyx_n_s_searchsorted); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2359; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_14); __pyx_t_17 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_17 < 0) { __pyx_t_17 += __pyx_pybuffernd_stamps.diminfo[0].shape; if (unlikely(__pyx_t_17 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_17 >= __pyx_pybuffernd_stamps.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2359; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_16 = __Pyx_PyInt_From_npy_int64((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_stamps.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_stamps.diminfo[0].strides))); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2359; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_16); __pyx_t_15 = PyTuple_New(1); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2359; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_15); PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_t_16); __Pyx_GIVEREF(__pyx_t_16); __pyx_t_16 = 0; __pyx_t_16 = PyObject_Call(__pyx_t_14, __pyx_t_15, NULL); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2359; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_16); __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; __pyx_t_15 = PyNumber_Subtract(__pyx_t_16, __pyx_int_1); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2359; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_15); __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; __Pyx_XDECREF_SET(__pyx_v_pos, __pyx_t_15); __pyx_t_15 = 0; /* "pandas/tslib.pyx":2360 * # Adjust datetime64 timestamp, recompute datetimestruct * pos = trans.searchsorted(stamps[i]) - 1 * inf = tz._transition_info[pos] # <<<<<<<<<<<<<< * * pandas_datetime_to_datetimestruct(stamps[i] + deltas[pos], */ __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_v_tz, __pyx_n_s_transition_info); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2360; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_15); __pyx_t_16 = PyObject_GetItem(__pyx_t_15, __pyx_v_pos); if (unlikely(__pyx_t_16 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2360; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_16); __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; __Pyx_XDECREF_SET(__pyx_v_inf, __pyx_t_16); __pyx_t_16 = 0; /* "pandas/tslib.pyx":2362 * inf = tz._transition_info[pos] * * pandas_datetime_to_datetimestruct(stamps[i] + deltas[pos], # <<<<<<<<<<<<<< * PANDAS_FR_ns, &dts) * if (dts.hour + dts.min + dts.sec + dts.us) > 0: */ __pyx_t_18 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_18 < 0) { __pyx_t_18 += __pyx_pybuffernd_stamps.diminfo[0].shape; if (unlikely(__pyx_t_18 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_18 >= __pyx_pybuffernd_stamps.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2362; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_16 = __Pyx_PyInt_From_npy_int64((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_stamps.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_stamps.diminfo[0].strides))); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2362; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_16); __pyx_t_15 = PyObject_GetItem(__pyx_v_deltas, __pyx_v_pos); if (unlikely(__pyx_t_15 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2362; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_15); __pyx_t_14 = PyNumber_Add(__pyx_t_16, __pyx_t_15); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2362; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_14); __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; __pyx_t_19 = __Pyx_PyInt_As_npy_int64(__pyx_t_14); if (unlikely((__pyx_t_19 == (npy_datetime)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2362; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; /* "pandas/tslib.pyx":2363 * * pandas_datetime_to_datetimestruct(stamps[i] + deltas[pos], * PANDAS_FR_ns, &dts) # <<<<<<<<<<<<<< * if (dts.hour + dts.min + dts.sec + dts.us) > 0: * return False */ pandas_datetime_to_datetimestruct(__pyx_t_19, PANDAS_FR_ns, (&__pyx_v_dts)); /* "pandas/tslib.pyx":2364 * pandas_datetime_to_datetimestruct(stamps[i] + deltas[pos], * PANDAS_FR_ns, &dts) * if (dts.hour + dts.min + dts.sec + dts.us) > 0: # <<<<<<<<<<<<<< * return False * */ __pyx_t_4 = (((((__pyx_v_dts.hour + __pyx_v_dts.min) + __pyx_v_dts.sec) + __pyx_v_dts.us) > 0) != 0); if (__pyx_t_4) { /* "pandas/tslib.pyx":2365 * PANDAS_FR_ns, &dts) * if (dts.hour + dts.min + dts.sec + dts.us) > 0: * return False # <<<<<<<<<<<<<< * * return True */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(Py_False); __pyx_r = Py_False; goto __pyx_L0; } } } __pyx_L3:; /* "pandas/tslib.pyx":2367 * return False * * return True # <<<<<<<<<<<<<< * * # Some general helper functions */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(Py_True); __pyx_r = Py_True; goto __pyx_L0; /* "pandas/tslib.pyx":2334 * * * def dates_normalized(ndarray[int64_t] stamps, tz=None): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = len(stamps) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); __Pyx_XDECREF(__pyx_t_10); __Pyx_XDECREF(__pyx_t_12); __Pyx_XDECREF(__pyx_t_13); __Pyx_XDECREF(__pyx_t_14); __Pyx_XDECREF(__pyx_t_15); __Pyx_XDECREF(__pyx_t_16); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_stamps.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.tslib.dates_normalized", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_stamps.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF(__pyx_v_dt); __Pyx_XDECREF(__pyx_v_trans); __Pyx_XDECREF(__pyx_v_deltas); __Pyx_XDECREF(__pyx_v_pos); __Pyx_XDECREF(__pyx_v_inf); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/tslib.pyx":2372 * #---------------------------------------------------------------------- * * def isleapyear(int64_t year): # <<<<<<<<<<<<<< * return is_leapyear(year) * */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5tslib_69isleapyear(PyObject *__pyx_self, PyObject *__pyx_arg_year); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5tslib_69isleapyear = {__Pyx_NAMESTR("isleapyear"), (PyCFunction)__pyx_pw_6pandas_5tslib_69isleapyear, METH_O, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5tslib_69isleapyear(PyObject *__pyx_self, PyObject *__pyx_arg_year) { __pyx_t_5numpy_int64_t __pyx_v_year; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("isleapyear (wrapper)", 0); assert(__pyx_arg_year); { __pyx_v_year = __Pyx_PyInt_As_npy_int64(__pyx_arg_year); if (unlikely((__pyx_v_year == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2372; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; __Pyx_AddTraceback("pandas.tslib.isleapyear", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pandas_5tslib_68isleapyear(__pyx_self, ((__pyx_t_5numpy_int64_t)__pyx_v_year)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5tslib_68isleapyear(CYTHON_UNUSED PyObject *__pyx_self, __pyx_t_5numpy_int64_t __pyx_v_year) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("isleapyear", 0); /* "pandas/tslib.pyx":2373 * * def isleapyear(int64_t year): * return is_leapyear(year) # <<<<<<<<<<<<<< * * def monthrange(int64_t year, int64_t month): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyInt_From_int(is_leapyear(__pyx_v_year)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2373; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "pandas/tslib.pyx":2372 * #---------------------------------------------------------------------- * * def isleapyear(int64_t year): # <<<<<<<<<<<<<< * return is_leapyear(year) * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas.tslib.isleapyear", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/tslib.pyx":2375 * return is_leapyear(year) * * def monthrange(int64_t year, int64_t month): # <<<<<<<<<<<<<< * cdef: * int64_t days */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5tslib_71monthrange(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5tslib_71monthrange = {__Pyx_NAMESTR("monthrange"), (PyCFunction)__pyx_pw_6pandas_5tslib_71monthrange, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5tslib_71monthrange(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { __pyx_t_5numpy_int64_t __pyx_v_year; __pyx_t_5numpy_int64_t __pyx_v_month; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("monthrange (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_year,&__pyx_n_s_month,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_year)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_month)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("monthrange", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2375; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "monthrange") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2375; __pyx_clineno = __LINE__; goto __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_year = __Pyx_PyInt_As_npy_int64(values[0]); if (unlikely((__pyx_v_year == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2375; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_month = __Pyx_PyInt_As_npy_int64(values[1]); if (unlikely((__pyx_v_month == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2375; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("monthrange", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2375; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.tslib.monthrange", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pandas_5tslib_70monthrange(__pyx_self, __pyx_v_year, __pyx_v_month); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5tslib_70monthrange(CYTHON_UNUSED PyObject *__pyx_self, __pyx_t_5numpy_int64_t __pyx_v_year, __pyx_t_5numpy_int64_t __pyx_v_month) { __pyx_t_5numpy_int64_t __pyx_v_days; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("monthrange", 0); /* "pandas/tslib.pyx":2380 * int64_t day_of_week * * if month < 1 or month > 12: # <<<<<<<<<<<<<< * raise ValueError("bad month number 0; must be 1-12") * */ __pyx_t_1 = ((__pyx_v_month < 1) != 0); if (!__pyx_t_1) { __pyx_t_2 = ((__pyx_v_month > 12) != 0); __pyx_t_3 = __pyx_t_2; } else { __pyx_t_3 = __pyx_t_1; } if (__pyx_t_3) { /* "pandas/tslib.pyx":2381 * * if month < 1 or month > 12: * raise ValueError("bad month number 0; must be 1-12") # <<<<<<<<<<<<<< * * days = days_per_month_table[is_leapyear(year)][month-1] */ __pyx_t_4 = PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__55, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2381; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 2381; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } /* "pandas/tslib.pyx":2383 * raise ValueError("bad month number 0; must be 1-12") * * days = days_per_month_table[is_leapyear(year)][month-1] # <<<<<<<<<<<<<< * * return (dayofweek(year, month, 1), days) */ __pyx_v_days = ((days_per_month_table[is_leapyear(__pyx_v_year)])[(__pyx_v_month - 1)]); /* "pandas/tslib.pyx":2385 * days = days_per_month_table[is_leapyear(year)][month-1] * * return (dayofweek(year, month, 1), days) # <<<<<<<<<<<<<< * * cdef inline int64_t ts_dayofweek(_TSObject ts): */ __Pyx_XDECREF(__pyx_r); __pyx_t_4 = __Pyx_PyInt_From_int(dayofweek(__pyx_v_year, __pyx_v_month, 1)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2385; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyInt_From_npy_int64(__pyx_v_days); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2385; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2385; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __pyx_t_4 = 0; __pyx_t_5 = 0; __pyx_r = __pyx_t_6; __pyx_t_6 = 0; goto __pyx_L0; /* "pandas/tslib.pyx":2375 * return is_leapyear(year) * * def monthrange(int64_t year, int64_t month): # <<<<<<<<<<<<<< * cdef: * int64_t days */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("pandas.tslib.monthrange", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/tslib.pyx":2387 * return (dayofweek(year, month, 1), days) * * cdef inline int64_t ts_dayofweek(_TSObject ts): # <<<<<<<<<<<<<< * return dayofweek(ts.dts.year, ts.dts.month, ts.dts.day) * */ static CYTHON_INLINE __pyx_t_5numpy_int64_t __pyx_f_6pandas_5tslib_ts_dayofweek(struct __pyx_obj_6pandas_5tslib__TSObject *__pyx_v_ts) { __pyx_t_5numpy_int64_t __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("ts_dayofweek", 0); /* "pandas/tslib.pyx":2388 * * cdef inline int64_t ts_dayofweek(_TSObject ts): * return dayofweek(ts.dts.year, ts.dts.month, ts.dts.day) # <<<<<<<<<<<<<< * * */ __pyx_r = dayofweek(__pyx_v_ts->dts.year, __pyx_v_ts->dts.month, __pyx_v_ts->dts.day); goto __pyx_L0; /* "pandas/tslib.pyx":2387 * return (dayofweek(year, month, 1), days) * * cdef inline int64_t ts_dayofweek(_TSObject ts): # <<<<<<<<<<<<<< * return dayofweek(ts.dts.year, ts.dts.month, ts.dts.day) * */ /* function exit code */ __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/tslib.pyx":2391 * * * cpdef normalize_date(object dt): # <<<<<<<<<<<<<< * ''' * Normalize datetime.datetime value to midnight. Returns datetime.date as a */ static PyObject *__pyx_pw_6pandas_5tslib_73normalize_date(PyObject *__pyx_self, PyObject *__pyx_v_dt); /*proto*/ static PyObject *__pyx_f_6pandas_5tslib_normalize_date(PyObject *__pyx_v_dt, CYTHON_UNUSED int __pyx_skip_dispatch) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("normalize_date", 0); /* "pandas/tslib.pyx":2400 * normalized : datetime.datetime or Timestamp * ''' * if PyDateTime_Check(dt): # <<<<<<<<<<<<<< * return dt.replace(hour=0, minute=0, second=0, microsecond=0) * elif PyDate_Check(dt): */ __pyx_t_1 = (PyDateTime_Check(__pyx_v_dt) != 0); if (__pyx_t_1) { /* "pandas/tslib.pyx":2401 * ''' * if PyDateTime_Check(dt): * return dt.replace(hour=0, minute=0, second=0, microsecond=0) # <<<<<<<<<<<<<< * elif PyDate_Check(dt): * return datetime(dt.year, dt.month, dt.day) */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_dt, __pyx_n_s_replace); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2401; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2401; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_hour, __pyx_int_0) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2401; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_minute, __pyx_int_0) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2401; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_second, __pyx_int_0) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2401; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_microsecond, __pyx_int_0) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2401; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_4 = PyObject_Call(__pyx_t_2, __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2401; __pyx_clineno = __LINE__; goto __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_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; } /* "pandas/tslib.pyx":2402 * if PyDateTime_Check(dt): * return dt.replace(hour=0, minute=0, second=0, microsecond=0) * elif PyDate_Check(dt): # <<<<<<<<<<<<<< * return datetime(dt.year, dt.month, dt.day) * else: */ __pyx_t_1 = (PyDate_Check(__pyx_v_dt) != 0); if (__pyx_t_1) { /* "pandas/tslib.pyx":2403 * return dt.replace(hour=0, minute=0, second=0, microsecond=0) * elif PyDate_Check(dt): * return datetime(dt.year, dt.month, dt.day) # <<<<<<<<<<<<<< * else: * raise TypeError('Unrecognized type: %s' % type(dt)) */ __Pyx_XDECREF(__pyx_r); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_dt, __pyx_n_s_year); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2403; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_dt, __pyx_n_s_month); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2403; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_dt, __pyx_n_s_day); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2403; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2403; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_4 = 0; __pyx_t_3 = 0; __pyx_t_2 = 0; __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_8datetime_datetime)), __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2403; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; } /*else*/ { /* "pandas/tslib.pyx":2405 * return datetime(dt.year, dt.month, dt.day) * else: * raise TypeError('Unrecognized type: %s' % type(dt)) # <<<<<<<<<<<<<< * * cdef ndarray[int64_t] localize_dt64arr_to_period(ndarray[int64_t] stamps, */ __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_Unrecognized_type_s, ((PyObject *)Py_TYPE(__pyx_v_dt))); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2405; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2405; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_Call(__pyx_builtin_TypeError, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2405; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2405; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } /* "pandas/tslib.pyx":2391 * * * cpdef normalize_date(object dt): # <<<<<<<<<<<<<< * ''' * Normalize datetime.datetime value to midnight. Returns datetime.date as a */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("pandas.tslib.normalize_date", __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_5tslib_73normalize_date(PyObject *__pyx_self, PyObject *__pyx_v_dt); /*proto*/ static char __pyx_doc_6pandas_5tslib_72normalize_date[] = "\n Normalize datetime.datetime value to midnight. Returns datetime.date as a\n datetime.datetime at midnight\n\n Returns\n -------\n normalized : datetime.datetime or Timestamp\n "; static PyObject *__pyx_pw_6pandas_5tslib_73normalize_date(PyObject *__pyx_self, PyObject *__pyx_v_dt) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("normalize_date (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_5tslib_72normalize_date(__pyx_self, ((PyObject *)__pyx_v_dt)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5tslib_72normalize_date(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_dt) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("normalize_date", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_6pandas_5tslib_normalize_date(__pyx_v_dt, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2391; __pyx_clineno = __LINE__; goto __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.tslib.normalize_date", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/tslib.pyx":2407 * raise TypeError('Unrecognized type: %s' % type(dt)) * * cdef ndarray[int64_t] localize_dt64arr_to_period(ndarray[int64_t] stamps, # <<<<<<<<<<<<<< * int freq, object tz): * cdef: */ static PyArrayObject *__pyx_f_6pandas_5tslib_localize_dt64arr_to_period(PyArrayObject *__pyx_v_stamps, int __pyx_v_freq, PyObject *__pyx_v_tz) { Py_ssize_t __pyx_v_n; PyArrayObject *__pyx_v_result = 0; PyArrayObject *__pyx_v_trans = 0; PyArrayObject *__pyx_v_deltas = 0; PyArrayObject *__pyx_v_pos = 0; pandas_datetimestruct __pyx_v_dts; Py_ssize_t __pyx_v_i; PyDateTime_DateTime *__pyx_v_dt = NULL; PyObject *__pyx_v_delta = NULL; PyObject *__pyx_v__pos = NULL; __Pyx_LocalBuf_ND __pyx_pybuffernd_deltas; __Pyx_Buffer __pyx_pybuffer_deltas; __Pyx_LocalBuf_ND __pyx_pybuffernd_pos; __Pyx_Buffer __pyx_pybuffer_pos; __Pyx_LocalBuf_ND __pyx_pybuffernd_result; __Pyx_Buffer __pyx_pybuffer_result; __Pyx_LocalBuf_ND __pyx_pybuffernd_stamps; __Pyx_Buffer __pyx_pybuffer_stamps; __Pyx_LocalBuf_ND __pyx_pybuffernd_trans; __Pyx_Buffer __pyx_pybuffer_trans; PyArrayObject *__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; int __pyx_t_9; Py_ssize_t __pyx_t_10; Py_ssize_t __pyx_t_11; int __pyx_t_12; Py_ssize_t __pyx_t_13; Py_ssize_t __pyx_t_14; __pyx_t_5numpy_int64_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; PyObject *__pyx_t_20 = NULL; PyObject *__pyx_t_21 = NULL; PyObject *__pyx_t_22 = NULL; Py_ssize_t __pyx_t_23; npy_datetime __pyx_t_24; Py_ssize_t __pyx_t_25; PyArrayObject *__pyx_t_26 = NULL; PyObject *__pyx_t_27 = NULL; PyObject *__pyx_t_28 = NULL; PyObject *__pyx_t_29 = NULL; Py_ssize_t __pyx_t_30; Py_ssize_t __pyx_t_31; Py_ssize_t __pyx_t_32; long __pyx_t_33; Py_ssize_t __pyx_t_34; Py_ssize_t __pyx_t_35; Py_ssize_t __pyx_t_36; Py_ssize_t __pyx_t_37; Py_ssize_t __pyx_t_38; __pyx_t_5numpy_int64_t __pyx_t_39; Py_ssize_t __pyx_t_40; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("localize_dt64arr_to_period", 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_trans.pybuffer.buf = NULL; __pyx_pybuffer_trans.refcount = 0; __pyx_pybuffernd_trans.data = NULL; __pyx_pybuffernd_trans.rcbuffer = &__pyx_pybuffer_trans; __pyx_pybuffer_deltas.pybuffer.buf = NULL; __pyx_pybuffer_deltas.refcount = 0; __pyx_pybuffernd_deltas.data = NULL; __pyx_pybuffernd_deltas.rcbuffer = &__pyx_pybuffer_deltas; __pyx_pybuffer_pos.pybuffer.buf = NULL; __pyx_pybuffer_pos.refcount = 0; __pyx_pybuffernd_pos.data = NULL; __pyx_pybuffernd_pos.rcbuffer = &__pyx_pybuffer_pos; __pyx_pybuffer_stamps.pybuffer.buf = NULL; __pyx_pybuffer_stamps.refcount = 0; __pyx_pybuffernd_stamps.data = NULL; __pyx_pybuffernd_stamps.rcbuffer = &__pyx_pybuffer_stamps; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_stamps.rcbuffer->pybuffer, (PyObject*)__pyx_v_stamps, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2407; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_stamps.diminfo[0].strides = __pyx_pybuffernd_stamps.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_stamps.diminfo[0].shape = __pyx_pybuffernd_stamps.rcbuffer->pybuffer.shape[0]; /* "pandas/tslib.pyx":2410 * int freq, object tz): * cdef: * Py_ssize_t n = len(stamps) # <<<<<<<<<<<<<< * ndarray[int64_t] result = np.empty(n, dtype=np.int64) * ndarray[int64_t] trans, deltas, pos */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_stamps)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2410; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/tslib.pyx":2411 * cdef: * Py_ssize_t n = len(stamps) * ndarray[int64_t] result = np.empty(n, dtype=np.int64) # <<<<<<<<<<<<<< * ndarray[int64_t] trans, deltas, pos * pandas_datetimestruct dts */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2411; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 2411; __pyx_clineno = __LINE__; goto __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_n); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2411; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2411; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2411; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2411; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_int64); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2411; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 2411; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyObject_Call(__pyx_t_3, __pyx_t_4, __pyx_t_2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2411; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 2411; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_7 = ((PyArrayObject *)__pyx_t_6); { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { __pyx_v_result = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_result.rcbuffer->pybuffer.buf = NULL; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2411; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } else {__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]; } } __pyx_t_7 = 0; __pyx_v_result = ((PyArrayObject *)__pyx_t_6); __pyx_t_6 = 0; /* "pandas/tslib.pyx":2415 * pandas_datetimestruct dts * * if not have_pytz: # <<<<<<<<<<<<<< * raise Exception('Could not find pytz module') * */ __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_have_pytz); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2415; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2415; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_9 = ((!__pyx_t_8) != 0); if (__pyx_t_9) { /* "pandas/tslib.pyx":2416 * * if not have_pytz: * raise Exception('Could not find pytz module') # <<<<<<<<<<<<<< * * if _is_utc(tz): */ __pyx_t_6 = PyObject_Call(__pyx_builtin_Exception, __pyx_tuple__56, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2416; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_Raise(__pyx_t_6, 0, 0, 0); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2416; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } /* "pandas/tslib.pyx":2418 * raise Exception('Could not find pytz module') * * if _is_utc(tz): # <<<<<<<<<<<<<< * for i in range(n): * if stamps[i] == NPY_NAT: */ __pyx_t_9 = (__pyx_f_6pandas_5tslib__is_utc(__pyx_v_tz) != 0); if (__pyx_t_9) { /* "pandas/tslib.pyx":2419 * * if _is_utc(tz): * for i in range(n): # <<<<<<<<<<<<<< * if stamps[i] == NPY_NAT: * result[i] = NPY_NAT */ __pyx_t_1 = __pyx_v_n; for (__pyx_t_10 = 0; __pyx_t_10 < __pyx_t_1; __pyx_t_10+=1) { __pyx_v_i = __pyx_t_10; /* "pandas/tslib.pyx":2420 * if _is_utc(tz): * for i in range(n): * if stamps[i] == NPY_NAT: # <<<<<<<<<<<<<< * result[i] = NPY_NAT * continue */ __pyx_t_11 = __pyx_v_i; __pyx_t_12 = -1; if (__pyx_t_11 < 0) { __pyx_t_11 += __pyx_pybuffernd_stamps.diminfo[0].shape; if (unlikely(__pyx_t_11 < 0)) __pyx_t_12 = 0; } else if (unlikely(__pyx_t_11 >= __pyx_pybuffernd_stamps.diminfo[0].shape)) __pyx_t_12 = 0; if (unlikely(__pyx_t_12 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_12); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2420; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_9 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_stamps.rcbuffer->pybuffer.buf, __pyx_t_11, __pyx_pybuffernd_stamps.diminfo[0].strides)) == __pyx_v_6pandas_5tslib_NPY_NAT) != 0); if (__pyx_t_9) { /* "pandas/tslib.pyx":2421 * for i in range(n): * if stamps[i] == NPY_NAT: * result[i] = NPY_NAT # <<<<<<<<<<<<<< * continue * pandas_datetime_to_datetimestruct(stamps[i], PANDAS_FR_ns, &dts) */ __pyx_t_13 = __pyx_v_i; __pyx_t_12 = -1; if (__pyx_t_13 < 0) { __pyx_t_13 += __pyx_pybuffernd_result.diminfo[0].shape; if (unlikely(__pyx_t_13 < 0)) __pyx_t_12 = 0; } else if (unlikely(__pyx_t_13 >= __pyx_pybuffernd_result.diminfo[0].shape)) __pyx_t_12 = 0; if (unlikely(__pyx_t_12 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_12); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2421; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_result.diminfo[0].strides) = __pyx_v_6pandas_5tslib_NPY_NAT; /* "pandas/tslib.pyx":2422 * if stamps[i] == NPY_NAT: * result[i] = NPY_NAT * continue # <<<<<<<<<<<<<< * pandas_datetime_to_datetimestruct(stamps[i], PANDAS_FR_ns, &dts) * result[i] = get_period_ordinal(dts.year, dts.month, dts.day, */ goto __pyx_L5_continue; } /* "pandas/tslib.pyx":2423 * result[i] = NPY_NAT * continue * pandas_datetime_to_datetimestruct(stamps[i], PANDAS_FR_ns, &dts) # <<<<<<<<<<<<<< * result[i] = get_period_ordinal(dts.year, dts.month, dts.day, * dts.hour, dts.min, dts.sec, dts.us, dts.ps, freq) */ __pyx_t_14 = __pyx_v_i; __pyx_t_12 = -1; if (__pyx_t_14 < 0) { __pyx_t_14 += __pyx_pybuffernd_stamps.diminfo[0].shape; if (unlikely(__pyx_t_14 < 0)) __pyx_t_12 = 0; } else if (unlikely(__pyx_t_14 >= __pyx_pybuffernd_stamps.diminfo[0].shape)) __pyx_t_12 = 0; if (unlikely(__pyx_t_12 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_12); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2423; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } pandas_datetime_to_datetimestruct((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_stamps.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_stamps.diminfo[0].strides)), PANDAS_FR_ns, (&__pyx_v_dts)); /* "pandas/tslib.pyx":2424 * continue * pandas_datetime_to_datetimestruct(stamps[i], PANDAS_FR_ns, &dts) * result[i] = get_period_ordinal(dts.year, dts.month, dts.day, # <<<<<<<<<<<<<< * dts.hour, dts.min, dts.sec, dts.us, dts.ps, freq) * */ __pyx_t_15 = get_period_ordinal(__pyx_v_dts.year, __pyx_v_dts.month, __pyx_v_dts.day, __pyx_v_dts.hour, __pyx_v_dts.min, __pyx_v_dts.sec, __pyx_v_dts.us, __pyx_v_dts.ps, __pyx_v_freq); if (unlikely(__pyx_t_15 == INT32_MIN)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2424; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_16 = __pyx_v_i; __pyx_t_12 = -1; if (__pyx_t_16 < 0) { __pyx_t_16 += __pyx_pybuffernd_result.diminfo[0].shape; if (unlikely(__pyx_t_16 < 0)) __pyx_t_12 = 0; } else if (unlikely(__pyx_t_16 >= __pyx_pybuffernd_result.diminfo[0].shape)) __pyx_t_12 = 0; if (unlikely(__pyx_t_12 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_12); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2424; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_result.diminfo[0].strides) = __pyx_t_15; __pyx_L5_continue:; } goto __pyx_L4; } /* "pandas/tslib.pyx":2427 * dts.hour, dts.min, dts.sec, dts.us, dts.ps, freq) * * elif _is_tzlocal(tz): # <<<<<<<<<<<<<< * for i in range(n): * if stamps[i] == NPY_NAT: */ __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_is_tzlocal); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2427; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2427; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_tz); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_tz); __Pyx_GIVEREF(__pyx_v_tz); __pyx_t_4 = PyObject_Call(__pyx_t_6, __pyx_t_2, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2427; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2427; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_9) { /* "pandas/tslib.pyx":2428 * * elif _is_tzlocal(tz): * for i in range(n): # <<<<<<<<<<<<<< * if stamps[i] == NPY_NAT: * result[i] = NPY_NAT */ __pyx_t_1 = __pyx_v_n; for (__pyx_t_10 = 0; __pyx_t_10 < __pyx_t_1; __pyx_t_10+=1) { __pyx_v_i = __pyx_t_10; /* "pandas/tslib.pyx":2429 * elif _is_tzlocal(tz): * for i in range(n): * if stamps[i] == NPY_NAT: # <<<<<<<<<<<<<< * result[i] = NPY_NAT * continue */ __pyx_t_17 = __pyx_v_i; __pyx_t_12 = -1; if (__pyx_t_17 < 0) { __pyx_t_17 += __pyx_pybuffernd_stamps.diminfo[0].shape; if (unlikely(__pyx_t_17 < 0)) __pyx_t_12 = 0; } else if (unlikely(__pyx_t_17 >= __pyx_pybuffernd_stamps.diminfo[0].shape)) __pyx_t_12 = 0; if (unlikely(__pyx_t_12 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_12); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2429; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_9 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_stamps.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_stamps.diminfo[0].strides)) == __pyx_v_6pandas_5tslib_NPY_NAT) != 0); if (__pyx_t_9) { /* "pandas/tslib.pyx":2430 * for i in range(n): * if stamps[i] == NPY_NAT: * result[i] = NPY_NAT # <<<<<<<<<<<<<< * continue * pandas_datetime_to_datetimestruct(stamps[i], PANDAS_FR_ns, */ __pyx_t_18 = __pyx_v_i; __pyx_t_12 = -1; if (__pyx_t_18 < 0) { __pyx_t_18 += __pyx_pybuffernd_result.diminfo[0].shape; if (unlikely(__pyx_t_18 < 0)) __pyx_t_12 = 0; } else if (unlikely(__pyx_t_18 >= __pyx_pybuffernd_result.diminfo[0].shape)) __pyx_t_12 = 0; if (unlikely(__pyx_t_12 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_12); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2430; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_result.diminfo[0].strides) = __pyx_v_6pandas_5tslib_NPY_NAT; /* "pandas/tslib.pyx":2431 * if stamps[i] == NPY_NAT: * result[i] = NPY_NAT * continue # <<<<<<<<<<<<<< * pandas_datetime_to_datetimestruct(stamps[i], PANDAS_FR_ns, * &dts) */ goto __pyx_L8_continue; } /* "pandas/tslib.pyx":2432 * result[i] = NPY_NAT * continue * pandas_datetime_to_datetimestruct(stamps[i], PANDAS_FR_ns, # <<<<<<<<<<<<<< * &dts) * dt = datetime(dts.year, dts.month, dts.day, dts.hour, */ __pyx_t_19 = __pyx_v_i; __pyx_t_12 = -1; if (__pyx_t_19 < 0) { __pyx_t_19 += __pyx_pybuffernd_stamps.diminfo[0].shape; if (unlikely(__pyx_t_19 < 0)) __pyx_t_12 = 0; } else if (unlikely(__pyx_t_19 >= __pyx_pybuffernd_stamps.diminfo[0].shape)) __pyx_t_12 = 0; if (unlikely(__pyx_t_12 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_12); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2432; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } /* "pandas/tslib.pyx":2433 * continue * pandas_datetime_to_datetimestruct(stamps[i], PANDAS_FR_ns, * &dts) # <<<<<<<<<<<<<< * dt = datetime(dts.year, dts.month, dts.day, dts.hour, * dts.min, dts.sec, dts.us, tz) */ pandas_datetime_to_datetimestruct((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_stamps.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_stamps.diminfo[0].strides)), PANDAS_FR_ns, (&__pyx_v_dts)); /* "pandas/tslib.pyx":2434 * pandas_datetime_to_datetimestruct(stamps[i], PANDAS_FR_ns, * &dts) * dt = datetime(dts.year, dts.month, dts.day, dts.hour, # <<<<<<<<<<<<<< * dts.min, dts.sec, dts.us, tz) * delta = int(total_seconds(_get_utcoffset(tz, dt))) * 1000000000 */ __pyx_t_4 = __Pyx_PyInt_From_npy_int64(__pyx_v_dts.year); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2434; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_2 = __Pyx_PyInt_From_npy_int32(__pyx_v_dts.month); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2434; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_6 = __Pyx_PyInt_From_npy_int32(__pyx_v_dts.day); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2434; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_3 = __Pyx_PyInt_From_npy_int32(__pyx_v_dts.hour); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2434; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); /* "pandas/tslib.pyx":2435 * &dts) * dt = datetime(dts.year, dts.month, dts.day, dts.hour, * dts.min, dts.sec, dts.us, tz) # <<<<<<<<<<<<<< * delta = int(total_seconds(_get_utcoffset(tz, dt))) * 1000000000 * pandas_datetime_to_datetimestruct(stamps[i] + delta, */ __pyx_t_5 = __Pyx_PyInt_From_npy_int32(__pyx_v_dts.min); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2435; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_20 = __Pyx_PyInt_From_npy_int32(__pyx_v_dts.sec); if (unlikely(!__pyx_t_20)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2435; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_20); __pyx_t_21 = __Pyx_PyInt_From_npy_int32(__pyx_v_dts.us); if (unlikely(!__pyx_t_21)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2435; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_21); /* "pandas/tslib.pyx":2434 * pandas_datetime_to_datetimestruct(stamps[i], PANDAS_FR_ns, * &dts) * dt = datetime(dts.year, dts.month, dts.day, dts.hour, # <<<<<<<<<<<<<< * dts.min, dts.sec, dts.us, tz) * delta = int(total_seconds(_get_utcoffset(tz, dt))) * 1000000000 */ __pyx_t_22 = PyTuple_New(8); if (unlikely(!__pyx_t_22)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2434; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_22); PyTuple_SET_ITEM(__pyx_t_22, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_22, 1, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_22, 2, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_22, 3, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_22, 4, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_22, 5, __pyx_t_20); __Pyx_GIVEREF(__pyx_t_20); PyTuple_SET_ITEM(__pyx_t_22, 6, __pyx_t_21); __Pyx_GIVEREF(__pyx_t_21); __Pyx_INCREF(__pyx_v_tz); PyTuple_SET_ITEM(__pyx_t_22, 7, __pyx_v_tz); __Pyx_GIVEREF(__pyx_v_tz); __pyx_t_4 = 0; __pyx_t_2 = 0; __pyx_t_6 = 0; __pyx_t_3 = 0; __pyx_t_5 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_21 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_8datetime_datetime)), __pyx_t_22, NULL); if (unlikely(!__pyx_t_21)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2434; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_21); __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0; __Pyx_XDECREF_SET(__pyx_v_dt, ((PyDateTime_DateTime *)__pyx_t_21)); __pyx_t_21 = 0; /* "pandas/tslib.pyx":2436 * dt = datetime(dts.year, dts.month, dts.day, dts.hour, * dts.min, dts.sec, dts.us, tz) * delta = int(total_seconds(_get_utcoffset(tz, dt))) * 1000000000 # <<<<<<<<<<<<<< * pandas_datetime_to_datetimestruct(stamps[i] + delta, * PANDAS_FR_ns, &dts) */ __pyx_t_21 = __pyx_f_6pandas_5tslib__get_utcoffset(__pyx_v_tz, ((PyObject *)__pyx_v_dt), 0); if (unlikely(!__pyx_t_21)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2436; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_21); __pyx_t_22 = PyFloat_FromDouble(__pyx_f_6pandas_5tslib_total_seconds(__pyx_t_21)); if (unlikely(!__pyx_t_22)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2436; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_22); __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0; __pyx_t_21 = PyTuple_New(1); if (unlikely(!__pyx_t_21)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2436; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_21); PyTuple_SET_ITEM(__pyx_t_21, 0, __pyx_t_22); __Pyx_GIVEREF(__pyx_t_22); __pyx_t_22 = 0; __pyx_t_22 = PyObject_Call(((PyObject *)((PyObject*)(&PyInt_Type))), __pyx_t_21, NULL); if (unlikely(!__pyx_t_22)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2436; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_22); __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0; __pyx_t_21 = PyNumber_Multiply(__pyx_t_22, __pyx_int_1000000000); if (unlikely(!__pyx_t_21)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2436; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_21); __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0; __Pyx_XDECREF_SET(__pyx_v_delta, __pyx_t_21); __pyx_t_21 = 0; /* "pandas/tslib.pyx":2437 * dts.min, dts.sec, dts.us, tz) * delta = int(total_seconds(_get_utcoffset(tz, dt))) * 1000000000 * pandas_datetime_to_datetimestruct(stamps[i] + delta, # <<<<<<<<<<<<<< * PANDAS_FR_ns, &dts) * result[i] = get_period_ordinal(dts.year, dts.month, dts.day, */ __pyx_t_23 = __pyx_v_i; __pyx_t_12 = -1; if (__pyx_t_23 < 0) { __pyx_t_23 += __pyx_pybuffernd_stamps.diminfo[0].shape; if (unlikely(__pyx_t_23 < 0)) __pyx_t_12 = 0; } else if (unlikely(__pyx_t_23 >= __pyx_pybuffernd_stamps.diminfo[0].shape)) __pyx_t_12 = 0; if (unlikely(__pyx_t_12 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_12); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2437; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_21 = __Pyx_PyInt_From_npy_int64((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_stamps.rcbuffer->pybuffer.buf, __pyx_t_23, __pyx_pybuffernd_stamps.diminfo[0].strides))); if (unlikely(!__pyx_t_21)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2437; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_21); __pyx_t_22 = PyNumber_Add(__pyx_t_21, __pyx_v_delta); if (unlikely(!__pyx_t_22)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2437; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_22); __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0; __pyx_t_24 = __Pyx_PyInt_As_npy_int64(__pyx_t_22); if (unlikely((__pyx_t_24 == (npy_datetime)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2437; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0; /* "pandas/tslib.pyx":2438 * delta = int(total_seconds(_get_utcoffset(tz, dt))) * 1000000000 * pandas_datetime_to_datetimestruct(stamps[i] + delta, * PANDAS_FR_ns, &dts) # <<<<<<<<<<<<<< * result[i] = get_period_ordinal(dts.year, dts.month, dts.day, * dts.hour, dts.min, dts.sec, dts.us, dts.ps, freq) */ pandas_datetime_to_datetimestruct(__pyx_t_24, PANDAS_FR_ns, (&__pyx_v_dts)); /* "pandas/tslib.pyx":2439 * pandas_datetime_to_datetimestruct(stamps[i] + delta, * PANDAS_FR_ns, &dts) * result[i] = get_period_ordinal(dts.year, dts.month, dts.day, # <<<<<<<<<<<<<< * dts.hour, dts.min, dts.sec, dts.us, dts.ps, freq) * else: */ __pyx_t_15 = get_period_ordinal(__pyx_v_dts.year, __pyx_v_dts.month, __pyx_v_dts.day, __pyx_v_dts.hour, __pyx_v_dts.min, __pyx_v_dts.sec, __pyx_v_dts.us, __pyx_v_dts.ps, __pyx_v_freq); if (unlikely(__pyx_t_15 == INT32_MIN)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2439; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_25 = __pyx_v_i; __pyx_t_12 = -1; if (__pyx_t_25 < 0) { __pyx_t_25 += __pyx_pybuffernd_result.diminfo[0].shape; if (unlikely(__pyx_t_25 < 0)) __pyx_t_12 = 0; } else if (unlikely(__pyx_t_25 >= __pyx_pybuffernd_result.diminfo[0].shape)) __pyx_t_12 = 0; if (unlikely(__pyx_t_12 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_12); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2439; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_25, __pyx_pybuffernd_result.diminfo[0].strides) = __pyx_t_15; __pyx_L8_continue:; } goto __pyx_L4; } /*else*/ { /* "pandas/tslib.pyx":2443 * else: * # Adjust datetime64 timestamp, recompute datetimestruct * trans = _get_transitions(tz) # <<<<<<<<<<<<<< * deltas = _get_deltas(tz) * _pos = trans.searchsorted(stamps, side='right') - 1 */ __pyx_t_22 = __Pyx_GetModuleGlobalName(__pyx_n_s_get_transitions); if (unlikely(!__pyx_t_22)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2443; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_22); __pyx_t_21 = PyTuple_New(1); if (unlikely(!__pyx_t_21)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2443; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_21); __Pyx_INCREF(__pyx_v_tz); PyTuple_SET_ITEM(__pyx_t_21, 0, __pyx_v_tz); __Pyx_GIVEREF(__pyx_v_tz); __pyx_t_20 = PyObject_Call(__pyx_t_22, __pyx_t_21, NULL); if (unlikely(!__pyx_t_20)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2443; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_20); __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0; __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0; if (!(likely(((__pyx_t_20) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_20, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2443; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_26 = ((PyArrayObject *)__pyx_t_20); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_trans.rcbuffer->pybuffer); __pyx_t_12 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_trans.rcbuffer->pybuffer, (PyObject*)__pyx_t_26, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_12 < 0)) { PyErr_Fetch(&__pyx_t_27, &__pyx_t_28, &__pyx_t_29); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_trans.rcbuffer->pybuffer, (PyObject*)__pyx_v_trans, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_27); Py_XDECREF(__pyx_t_28); Py_XDECREF(__pyx_t_29); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_27, __pyx_t_28, __pyx_t_29); } } __pyx_pybuffernd_trans.diminfo[0].strides = __pyx_pybuffernd_trans.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_trans.diminfo[0].shape = __pyx_pybuffernd_trans.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_12 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2443; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_26 = 0; __pyx_v_trans = ((PyArrayObject *)__pyx_t_20); __pyx_t_20 = 0; /* "pandas/tslib.pyx":2444 * # Adjust datetime64 timestamp, recompute datetimestruct * trans = _get_transitions(tz) * deltas = _get_deltas(tz) # <<<<<<<<<<<<<< * _pos = trans.searchsorted(stamps, side='right') - 1 * if _pos.dtype != np.int64: */ __pyx_t_20 = __Pyx_GetModuleGlobalName(__pyx_n_s_get_deltas); if (unlikely(!__pyx_t_20)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2444; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_20); __pyx_t_21 = PyTuple_New(1); if (unlikely(!__pyx_t_21)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2444; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_21); __Pyx_INCREF(__pyx_v_tz); PyTuple_SET_ITEM(__pyx_t_21, 0, __pyx_v_tz); __Pyx_GIVEREF(__pyx_v_tz); __pyx_t_22 = PyObject_Call(__pyx_t_20, __pyx_t_21, NULL); if (unlikely(!__pyx_t_22)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2444; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_22); __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0; __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0; if (!(likely(((__pyx_t_22) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_22, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2444; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_26 = ((PyArrayObject *)__pyx_t_22); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_deltas.rcbuffer->pybuffer); __pyx_t_12 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_deltas.rcbuffer->pybuffer, (PyObject*)__pyx_t_26, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_12 < 0)) { PyErr_Fetch(&__pyx_t_29, &__pyx_t_28, &__pyx_t_27); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_deltas.rcbuffer->pybuffer, (PyObject*)__pyx_v_deltas, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_29); Py_XDECREF(__pyx_t_28); Py_XDECREF(__pyx_t_27); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_29, __pyx_t_28, __pyx_t_27); } } __pyx_pybuffernd_deltas.diminfo[0].strides = __pyx_pybuffernd_deltas.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_deltas.diminfo[0].shape = __pyx_pybuffernd_deltas.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_12 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2444; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_26 = 0; __pyx_v_deltas = ((PyArrayObject *)__pyx_t_22); __pyx_t_22 = 0; /* "pandas/tslib.pyx":2445 * trans = _get_transitions(tz) * deltas = _get_deltas(tz) * _pos = trans.searchsorted(stamps, side='right') - 1 # <<<<<<<<<<<<<< * if _pos.dtype != np.int64: * _pos = _pos.astype(np.int64) */ __pyx_t_22 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_trans), __pyx_n_s_searchsorted); if (unlikely(!__pyx_t_22)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2445; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_22); __pyx_t_21 = PyTuple_New(1); if (unlikely(!__pyx_t_21)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2445; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_21); __Pyx_INCREF(((PyObject *)__pyx_v_stamps)); PyTuple_SET_ITEM(__pyx_t_21, 0, ((PyObject *)__pyx_v_stamps)); __Pyx_GIVEREF(((PyObject *)__pyx_v_stamps)); __pyx_t_20 = PyDict_New(); if (unlikely(!__pyx_t_20)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2445; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_20); if (PyDict_SetItem(__pyx_t_20, __pyx_n_s_side, __pyx_n_s_right) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2445; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_5 = PyObject_Call(__pyx_t_22, __pyx_t_21, __pyx_t_20); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2445; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0; __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0; __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0; __pyx_t_20 = PyNumber_Subtract(__pyx_t_5, __pyx_int_1); if (unlikely(!__pyx_t_20)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2445; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_20); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_v__pos = __pyx_t_20; __pyx_t_20 = 0; /* "pandas/tslib.pyx":2446 * deltas = _get_deltas(tz) * _pos = trans.searchsorted(stamps, side='right') - 1 * if _pos.dtype != np.int64: # <<<<<<<<<<<<<< * _pos = _pos.astype(np.int64) * pos = _pos */ __pyx_t_20 = __Pyx_PyObject_GetAttrStr(__pyx_v__pos, __pyx_n_s_dtype); if (unlikely(!__pyx_t_20)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2446; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_20); __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2446; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_21 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_int64); if (unlikely(!__pyx_t_21)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2446; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_21); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyObject_RichCompare(__pyx_t_20, __pyx_t_21, Py_NE); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2446; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0; __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0; __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2446; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_9) { /* "pandas/tslib.pyx":2447 * _pos = trans.searchsorted(stamps, side='right') - 1 * if _pos.dtype != np.int64: * _pos = _pos.astype(np.int64) # <<<<<<<<<<<<<< * pos = _pos * */ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v__pos, __pyx_n_s_astype); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2447; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_21 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_21)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2447; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_21); __pyx_t_20 = __Pyx_PyObject_GetAttrStr(__pyx_t_21, __pyx_n_s_int64); if (unlikely(!__pyx_t_20)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2447; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_20); __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0; __pyx_t_21 = PyTuple_New(1); if (unlikely(!__pyx_t_21)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2447; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_21); PyTuple_SET_ITEM(__pyx_t_21, 0, __pyx_t_20); __Pyx_GIVEREF(__pyx_t_20); __pyx_t_20 = 0; __pyx_t_20 = PyObject_Call(__pyx_t_5, __pyx_t_21, NULL); if (unlikely(!__pyx_t_20)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2447; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_20); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0; __Pyx_DECREF_SET(__pyx_v__pos, __pyx_t_20); __pyx_t_20 = 0; goto __pyx_L11; } __pyx_L11:; /* "pandas/tslib.pyx":2448 * if _pos.dtype != np.int64: * _pos = _pos.astype(np.int64) * pos = _pos # <<<<<<<<<<<<<< * * # statictzinfo */ if (!(likely(((__pyx_v__pos) == Py_None) || likely(__Pyx_TypeTest(__pyx_v__pos, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2448; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_20 = __pyx_v__pos; __Pyx_INCREF(__pyx_t_20); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_pos.rcbuffer->pybuffer); __pyx_t_12 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_pos.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_20), &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_12 < 0)) { PyErr_Fetch(&__pyx_t_27, &__pyx_t_28, &__pyx_t_29); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_pos.rcbuffer->pybuffer, (PyObject*)__pyx_v_pos, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_27); Py_XDECREF(__pyx_t_28); Py_XDECREF(__pyx_t_29); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_27, __pyx_t_28, __pyx_t_29); } } __pyx_pybuffernd_pos.diminfo[0].strides = __pyx_pybuffernd_pos.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_pos.diminfo[0].shape = __pyx_pybuffernd_pos.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_12 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2448; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_pos = ((PyArrayObject *)__pyx_t_20); __pyx_t_20 = 0; /* "pandas/tslib.pyx":2451 * * # statictzinfo * if not hasattr(tz, '_transition_info'): # <<<<<<<<<<<<<< * for i in range(n): * if stamps[i] == NPY_NAT: */ __pyx_t_9 = PyObject_HasAttr(__pyx_v_tz, __pyx_n_s_transition_info); if (unlikely(__pyx_t_9 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2451; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_8 = ((!(__pyx_t_9 != 0)) != 0); if (__pyx_t_8) { /* "pandas/tslib.pyx":2452 * # statictzinfo * if not hasattr(tz, '_transition_info'): * for i in range(n): # <<<<<<<<<<<<<< * if stamps[i] == NPY_NAT: * result[i] = NPY_NAT */ __pyx_t_1 = __pyx_v_n; for (__pyx_t_10 = 0; __pyx_t_10 < __pyx_t_1; __pyx_t_10+=1) { __pyx_v_i = __pyx_t_10; /* "pandas/tslib.pyx":2453 * if not hasattr(tz, '_transition_info'): * for i in range(n): * if stamps[i] == NPY_NAT: # <<<<<<<<<<<<<< * result[i] = NPY_NAT * continue */ __pyx_t_30 = __pyx_v_i; __pyx_t_12 = -1; if (__pyx_t_30 < 0) { __pyx_t_30 += __pyx_pybuffernd_stamps.diminfo[0].shape; if (unlikely(__pyx_t_30 < 0)) __pyx_t_12 = 0; } else if (unlikely(__pyx_t_30 >= __pyx_pybuffernd_stamps.diminfo[0].shape)) __pyx_t_12 = 0; if (unlikely(__pyx_t_12 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_12); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2453; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_8 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_stamps.rcbuffer->pybuffer.buf, __pyx_t_30, __pyx_pybuffernd_stamps.diminfo[0].strides)) == __pyx_v_6pandas_5tslib_NPY_NAT) != 0); if (__pyx_t_8) { /* "pandas/tslib.pyx":2454 * for i in range(n): * if stamps[i] == NPY_NAT: * result[i] = NPY_NAT # <<<<<<<<<<<<<< * continue * pandas_datetime_to_datetimestruct(stamps[i] + deltas[0], */ __pyx_t_31 = __pyx_v_i; __pyx_t_12 = -1; if (__pyx_t_31 < 0) { __pyx_t_31 += __pyx_pybuffernd_result.diminfo[0].shape; if (unlikely(__pyx_t_31 < 0)) __pyx_t_12 = 0; } else if (unlikely(__pyx_t_31 >= __pyx_pybuffernd_result.diminfo[0].shape)) __pyx_t_12 = 0; if (unlikely(__pyx_t_12 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_12); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2454; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_31, __pyx_pybuffernd_result.diminfo[0].strides) = __pyx_v_6pandas_5tslib_NPY_NAT; /* "pandas/tslib.pyx":2455 * if stamps[i] == NPY_NAT: * result[i] = NPY_NAT * continue # <<<<<<<<<<<<<< * pandas_datetime_to_datetimestruct(stamps[i] + deltas[0], * PANDAS_FR_ns, &dts) */ goto __pyx_L13_continue; } /* "pandas/tslib.pyx":2456 * result[i] = NPY_NAT * continue * pandas_datetime_to_datetimestruct(stamps[i] + deltas[0], # <<<<<<<<<<<<<< * PANDAS_FR_ns, &dts) * result[i] = get_period_ordinal(dts.year, dts.month, dts.day, */ __pyx_t_32 = __pyx_v_i; __pyx_t_12 = -1; if (__pyx_t_32 < 0) { __pyx_t_32 += __pyx_pybuffernd_stamps.diminfo[0].shape; if (unlikely(__pyx_t_32 < 0)) __pyx_t_12 = 0; } else if (unlikely(__pyx_t_32 >= __pyx_pybuffernd_stamps.diminfo[0].shape)) __pyx_t_12 = 0; if (unlikely(__pyx_t_12 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_12); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2456; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_33 = 0; __pyx_t_12 = -1; if (__pyx_t_33 < 0) { __pyx_t_33 += __pyx_pybuffernd_deltas.diminfo[0].shape; if (unlikely(__pyx_t_33 < 0)) __pyx_t_12 = 0; } else if (unlikely(__pyx_t_33 >= __pyx_pybuffernd_deltas.diminfo[0].shape)) __pyx_t_12 = 0; if (unlikely(__pyx_t_12 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_12); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2456; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } /* "pandas/tslib.pyx":2457 * continue * pandas_datetime_to_datetimestruct(stamps[i] + deltas[0], * PANDAS_FR_ns, &dts) # <<<<<<<<<<<<<< * result[i] = get_period_ordinal(dts.year, dts.month, dts.day, * dts.hour, dts.min, dts.sec, dts.us, dts.ps, freq) */ pandas_datetime_to_datetimestruct(((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_stamps.rcbuffer->pybuffer.buf, __pyx_t_32, __pyx_pybuffernd_stamps.diminfo[0].strides)) + (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_deltas.rcbuffer->pybuffer.buf, __pyx_t_33, __pyx_pybuffernd_deltas.diminfo[0].strides))), PANDAS_FR_ns, (&__pyx_v_dts)); /* "pandas/tslib.pyx":2458 * pandas_datetime_to_datetimestruct(stamps[i] + deltas[0], * PANDAS_FR_ns, &dts) * result[i] = get_period_ordinal(dts.year, dts.month, dts.day, # <<<<<<<<<<<<<< * dts.hour, dts.min, dts.sec, dts.us, dts.ps, freq) * else: */ __pyx_t_15 = get_period_ordinal(__pyx_v_dts.year, __pyx_v_dts.month, __pyx_v_dts.day, __pyx_v_dts.hour, __pyx_v_dts.min, __pyx_v_dts.sec, __pyx_v_dts.us, __pyx_v_dts.ps, __pyx_v_freq); if (unlikely(__pyx_t_15 == INT32_MIN)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2458; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_34 = __pyx_v_i; __pyx_t_12 = -1; if (__pyx_t_34 < 0) { __pyx_t_34 += __pyx_pybuffernd_result.diminfo[0].shape; if (unlikely(__pyx_t_34 < 0)) __pyx_t_12 = 0; } else if (unlikely(__pyx_t_34 >= __pyx_pybuffernd_result.diminfo[0].shape)) __pyx_t_12 = 0; if (unlikely(__pyx_t_12 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_12); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2458; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_34, __pyx_pybuffernd_result.diminfo[0].strides) = __pyx_t_15; __pyx_L13_continue:; } goto __pyx_L12; } /*else*/ { /* "pandas/tslib.pyx":2461 * dts.hour, dts.min, dts.sec, dts.us, dts.ps, freq) * else: * for i in range(n): # <<<<<<<<<<<<<< * if stamps[i] == NPY_NAT: * result[i] = NPY_NAT */ __pyx_t_1 = __pyx_v_n; for (__pyx_t_10 = 0; __pyx_t_10 < __pyx_t_1; __pyx_t_10+=1) { __pyx_v_i = __pyx_t_10; /* "pandas/tslib.pyx":2462 * else: * for i in range(n): * if stamps[i] == NPY_NAT: # <<<<<<<<<<<<<< * result[i] = NPY_NAT * continue */ __pyx_t_35 = __pyx_v_i; __pyx_t_12 = -1; if (__pyx_t_35 < 0) { __pyx_t_35 += __pyx_pybuffernd_stamps.diminfo[0].shape; if (unlikely(__pyx_t_35 < 0)) __pyx_t_12 = 0; } else if (unlikely(__pyx_t_35 >= __pyx_pybuffernd_stamps.diminfo[0].shape)) __pyx_t_12 = 0; if (unlikely(__pyx_t_12 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_12); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2462; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_8 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_stamps.rcbuffer->pybuffer.buf, __pyx_t_35, __pyx_pybuffernd_stamps.diminfo[0].strides)) == __pyx_v_6pandas_5tslib_NPY_NAT) != 0); if (__pyx_t_8) { /* "pandas/tslib.pyx":2463 * for i in range(n): * if stamps[i] == NPY_NAT: * result[i] = NPY_NAT # <<<<<<<<<<<<<< * continue * pandas_datetime_to_datetimestruct(stamps[i] + deltas[pos[i]], */ __pyx_t_36 = __pyx_v_i; __pyx_t_12 = -1; if (__pyx_t_36 < 0) { __pyx_t_36 += __pyx_pybuffernd_result.diminfo[0].shape; if (unlikely(__pyx_t_36 < 0)) __pyx_t_12 = 0; } else if (unlikely(__pyx_t_36 >= __pyx_pybuffernd_result.diminfo[0].shape)) __pyx_t_12 = 0; if (unlikely(__pyx_t_12 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_12); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2463; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_36, __pyx_pybuffernd_result.diminfo[0].strides) = __pyx_v_6pandas_5tslib_NPY_NAT; /* "pandas/tslib.pyx":2464 * if stamps[i] == NPY_NAT: * result[i] = NPY_NAT * continue # <<<<<<<<<<<<<< * pandas_datetime_to_datetimestruct(stamps[i] + deltas[pos[i]], * PANDAS_FR_ns, &dts) */ goto __pyx_L16_continue; } /* "pandas/tslib.pyx":2465 * result[i] = NPY_NAT * continue * pandas_datetime_to_datetimestruct(stamps[i] + deltas[pos[i]], # <<<<<<<<<<<<<< * PANDAS_FR_ns, &dts) * result[i] = get_period_ordinal(dts.year, dts.month, dts.day, */ __pyx_t_37 = __pyx_v_i; __pyx_t_12 = -1; if (__pyx_t_37 < 0) { __pyx_t_37 += __pyx_pybuffernd_stamps.diminfo[0].shape; if (unlikely(__pyx_t_37 < 0)) __pyx_t_12 = 0; } else if (unlikely(__pyx_t_37 >= __pyx_pybuffernd_stamps.diminfo[0].shape)) __pyx_t_12 = 0; if (unlikely(__pyx_t_12 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_12); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2465; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_38 = __pyx_v_i; __pyx_t_12 = -1; if (__pyx_t_38 < 0) { __pyx_t_38 += __pyx_pybuffernd_pos.diminfo[0].shape; if (unlikely(__pyx_t_38 < 0)) __pyx_t_12 = 0; } else if (unlikely(__pyx_t_38 >= __pyx_pybuffernd_pos.diminfo[0].shape)) __pyx_t_12 = 0; if (unlikely(__pyx_t_12 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_12); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2465; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_15 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_pos.rcbuffer->pybuffer.buf, __pyx_t_38, __pyx_pybuffernd_pos.diminfo[0].strides)); __pyx_t_12 = -1; if (__pyx_t_15 < 0) { __pyx_t_15 += __pyx_pybuffernd_deltas.diminfo[0].shape; if (unlikely(__pyx_t_15 < 0)) __pyx_t_12 = 0; } else if (unlikely(__pyx_t_15 >= __pyx_pybuffernd_deltas.diminfo[0].shape)) __pyx_t_12 = 0; if (unlikely(__pyx_t_12 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_12); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2465; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } /* "pandas/tslib.pyx":2466 * continue * pandas_datetime_to_datetimestruct(stamps[i] + deltas[pos[i]], * PANDAS_FR_ns, &dts) # <<<<<<<<<<<<<< * result[i] = get_period_ordinal(dts.year, dts.month, dts.day, * dts.hour, dts.min, dts.sec, dts.us, dts.ps, freq) */ pandas_datetime_to_datetimestruct(((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_stamps.rcbuffer->pybuffer.buf, __pyx_t_37, __pyx_pybuffernd_stamps.diminfo[0].strides)) + (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_deltas.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_deltas.diminfo[0].strides))), PANDAS_FR_ns, (&__pyx_v_dts)); /* "pandas/tslib.pyx":2467 * pandas_datetime_to_datetimestruct(stamps[i] + deltas[pos[i]], * PANDAS_FR_ns, &dts) * result[i] = get_period_ordinal(dts.year, dts.month, dts.day, # <<<<<<<<<<<<<< * dts.hour, dts.min, dts.sec, dts.us, dts.ps, freq) * */ __pyx_t_39 = get_period_ordinal(__pyx_v_dts.year, __pyx_v_dts.month, __pyx_v_dts.day, __pyx_v_dts.hour, __pyx_v_dts.min, __pyx_v_dts.sec, __pyx_v_dts.us, __pyx_v_dts.ps, __pyx_v_freq); if (unlikely(__pyx_t_39 == INT32_MIN)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2467; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_40 = __pyx_v_i; __pyx_t_12 = -1; if (__pyx_t_40 < 0) { __pyx_t_40 += __pyx_pybuffernd_result.diminfo[0].shape; if (unlikely(__pyx_t_40 < 0)) __pyx_t_12 = 0; } else if (unlikely(__pyx_t_40 >= __pyx_pybuffernd_result.diminfo[0].shape)) __pyx_t_12 = 0; if (unlikely(__pyx_t_12 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_12); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2467; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_40, __pyx_pybuffernd_result.diminfo[0].strides) = __pyx_t_39; __pyx_L16_continue:; } } __pyx_L12:; } __pyx_L4:; /* "pandas/tslib.pyx":2470 * dts.hour, dts.min, dts.sec, dts.us, dts.ps, freq) * * return result # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(((PyObject *)__pyx_r)); __Pyx_INCREF(((PyObject *)__pyx_v_result)); __pyx_r = ((PyArrayObject *)__pyx_v_result); goto __pyx_L0; /* "pandas/tslib.pyx":2407 * raise TypeError('Unrecognized type: %s' % type(dt)) * * cdef ndarray[int64_t] localize_dt64arr_to_period(ndarray[int64_t] stamps, # <<<<<<<<<<<<<< * int freq, object tz): * cdef: */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_20); __Pyx_XDECREF(__pyx_t_21); __Pyx_XDECREF(__pyx_t_22); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_deltas.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_pos.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_stamps.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_trans.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.tslib.localize_dt64arr_to_period", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_deltas.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_pos.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_stamps.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_trans.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_result); __Pyx_XDECREF((PyObject *)__pyx_v_trans); __Pyx_XDECREF((PyObject *)__pyx_v_deltas); __Pyx_XDECREF((PyObject *)__pyx_v_pos); __Pyx_XDECREF((PyObject *)__pyx_v_dt); __Pyx_XDECREF(__pyx_v_delta); __Pyx_XDECREF(__pyx_v__pos); __Pyx_XGIVEREF((PyObject *)__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/tslib.pyx":2534 * #---------------------------------------------------------------------- * * cdef inline int64_t apply_mult(int64_t period_ord, int64_t mult): # <<<<<<<<<<<<<< * """ * Get freq+multiple ordinal value from corresponding freq-only ordinal value. */ static CYTHON_INLINE __pyx_t_5numpy_int64_t __pyx_f_6pandas_5tslib_apply_mult(__pyx_t_5numpy_int64_t __pyx_v_period_ord, __pyx_t_5numpy_int64_t __pyx_v_mult) { __pyx_t_5numpy_int64_t __pyx_r; __Pyx_RefNannyDeclarations int __pyx_t_1; __pyx_t_5numpy_int64_t __pyx_t_2; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("apply_mult", 0); /* "pandas/tslib.pyx":2540 * integer). * """ * if mult == 1: # <<<<<<<<<<<<<< * return period_ord * */ __pyx_t_1 = ((__pyx_v_mult == 1) != 0); if (__pyx_t_1) { /* "pandas/tslib.pyx":2541 * """ * if mult == 1: * return period_ord # <<<<<<<<<<<<<< * * return (period_ord - 1) // mult */ __pyx_r = __pyx_v_period_ord; goto __pyx_L0; } /* "pandas/tslib.pyx":2543 * return period_ord * * return (period_ord - 1) // mult # <<<<<<<<<<<<<< * * cdef inline int64_t remove_mult(int64_t period_ord_w_mult, int64_t mult): */ __pyx_t_2 = (__pyx_v_period_ord - 1); if (unlikely(__pyx_v_mult == 0)) { #ifdef WITH_THREAD PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure(); #endif PyErr_SetString(PyExc_ZeroDivisionError, "integer division or modulo by zero"); #ifdef WITH_THREAD PyGILState_Release(__pyx_gilstate_save); #endif {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2543; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } else if (sizeof(__pyx_t_5numpy_int64_t) == sizeof(long) && unlikely(__pyx_v_mult == -1) && unlikely(UNARY_NEG_WOULD_OVERFLOW(__pyx_t_2))) { #ifdef WITH_THREAD PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure(); #endif PyErr_SetString(PyExc_OverflowError, "value too large to perform division"); #ifdef WITH_THREAD PyGILState_Release(__pyx_gilstate_save); #endif {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2543; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_r = __Pyx_div___pyx_t_5numpy_int64_t(__pyx_t_2, __pyx_v_mult); goto __pyx_L0; /* "pandas/tslib.pyx":2534 * #---------------------------------------------------------------------- * * cdef inline int64_t apply_mult(int64_t period_ord, int64_t mult): # <<<<<<<<<<<<<< * """ * Get freq+multiple ordinal value from corresponding freq-only ordinal value. */ /* function exit code */ __pyx_L1_error:; __Pyx_WriteUnraisable("pandas.tslib.apply_mult", __pyx_clineno, __pyx_lineno, __pyx_filename, 0); __pyx_r = 0; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/tslib.pyx":2545 * return (period_ord - 1) // mult * * cdef inline int64_t remove_mult(int64_t period_ord_w_mult, int64_t mult): # <<<<<<<<<<<<<< * """ * Get freq-only ordinal value from corresponding freq+multiple ordinal. */ static CYTHON_INLINE __pyx_t_5numpy_int64_t __pyx_f_6pandas_5tslib_remove_mult(__pyx_t_5numpy_int64_t __pyx_v_period_ord_w_mult, __pyx_t_5numpy_int64_t __pyx_v_mult) { __pyx_t_5numpy_int64_t __pyx_r; __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("remove_mult", 0); /* "pandas/tslib.pyx":2549 * Get freq-only ordinal value from corresponding freq+multiple ordinal. * """ * if mult == 1: # <<<<<<<<<<<<<< * return period_ord_w_mult * */ __pyx_t_1 = ((__pyx_v_mult == 1) != 0); if (__pyx_t_1) { /* "pandas/tslib.pyx":2550 * """ * if mult == 1: * return period_ord_w_mult # <<<<<<<<<<<<<< * * return period_ord_w_mult * mult + 1; */ __pyx_r = __pyx_v_period_ord_w_mult; goto __pyx_L0; } /* "pandas/tslib.pyx":2552 * return period_ord_w_mult * * return period_ord_w_mult * mult + 1; # <<<<<<<<<<<<<< * * def dt64arr_to_periodarr(ndarray[int64_t] dtarr, int freq, tz=None): */ __pyx_r = ((__pyx_v_period_ord_w_mult * __pyx_v_mult) + 1); goto __pyx_L0; /* "pandas/tslib.pyx":2545 * return (period_ord - 1) // mult * * cdef inline int64_t remove_mult(int64_t period_ord_w_mult, int64_t mult): # <<<<<<<<<<<<<< * """ * Get freq-only ordinal value from corresponding freq+multiple ordinal. */ /* function exit code */ __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/tslib.pyx":2554 * return period_ord_w_mult * mult + 1; * * def dt64arr_to_periodarr(ndarray[int64_t] dtarr, int freq, tz=None): # <<<<<<<<<<<<<< * """ * Convert array of datetime64 values (passed in as 'i8' dtype) to a set of */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5tslib_75dt64arr_to_periodarr(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6pandas_5tslib_74dt64arr_to_periodarr[] = "\n Convert array of datetime64 values (passed in as 'i8' dtype) to a set of\n periods corresponding to desired frequency, per period convention.\n "; static PyMethodDef __pyx_mdef_6pandas_5tslib_75dt64arr_to_periodarr = {__Pyx_NAMESTR("dt64arr_to_periodarr"), (PyCFunction)__pyx_pw_6pandas_5tslib_75dt64arr_to_periodarr, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_5tslib_74dt64arr_to_periodarr)}; static PyObject *__pyx_pw_6pandas_5tslib_75dt64arr_to_periodarr(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_dtarr = 0; int __pyx_v_freq; PyObject *__pyx_v_tz = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("dt64arr_to_periodarr (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_dtarr,&__pyx_n_s_freq,&__pyx_n_s_tz,0}; PyObject* values[3] = {0,0,0}; values[2] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_dtarr)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_freq)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("dt64arr_to_periodarr", 0, 2, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2554; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_tz); if (value) { values[2] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "dt64arr_to_periodarr") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2554; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_dtarr = ((PyArrayObject *)values[0]); __pyx_v_freq = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_freq == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2554; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_tz = values[2]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("dt64arr_to_periodarr", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2554; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.tslib.dt64arr_to_periodarr", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dtarr), __pyx_ptype_5numpy_ndarray, 1, "dtarr", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2554; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5tslib_74dt64arr_to_periodarr(__pyx_self, __pyx_v_dtarr, __pyx_v_freq, __pyx_v_tz); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5tslib_74dt64arr_to_periodarr(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_dtarr, int __pyx_v_freq, PyObject *__pyx_v_tz) { PyArrayObject *__pyx_v_out = 0; Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_l; pandas_datetimestruct __pyx_v_dts; __Pyx_LocalBuf_ND __pyx_pybuffernd_dtarr; __Pyx_Buffer __pyx_pybuffer_dtarr; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; 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; PyArrayObject *__pyx_t_6 = NULL; int __pyx_t_7; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; int __pyx_t_11; int __pyx_t_12; Py_ssize_t __pyx_t_13; Py_ssize_t __pyx_t_14; __pyx_t_5numpy_int64_t __pyx_t_15; Py_ssize_t __pyx_t_16; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("dt64arr_to_periodarr", 0); __pyx_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; __pyx_pybuffer_dtarr.pybuffer.buf = NULL; __pyx_pybuffer_dtarr.refcount = 0; __pyx_pybuffernd_dtarr.data = NULL; __pyx_pybuffernd_dtarr.rcbuffer = &__pyx_pybuffer_dtarr; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_dtarr.rcbuffer->pybuffer, (PyObject*)__pyx_v_dtarr, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2554; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_dtarr.diminfo[0].strides = __pyx_pybuffernd_dtarr.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_dtarr.diminfo[0].shape = __pyx_pybuffernd_dtarr.rcbuffer->pybuffer.shape[0]; /* "pandas/tslib.pyx":2564 * pandas_datetimestruct dts * * l = len(dtarr) # <<<<<<<<<<<<<< * * out = np.empty(l, dtype='i8') */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_dtarr)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2564; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_l = __pyx_t_1; /* "pandas/tslib.pyx":2566 * l = len(dtarr) * * out = np.empty(l, dtype='i8') # <<<<<<<<<<<<<< * * if tz is None: */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2566; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 2566; __pyx_clineno = __LINE__; goto __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_l); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2566; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2566; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2566; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_dtype, __pyx_n_s_i8) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2566; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_5 = PyObject_Call(__pyx_t_3, __pyx_t_4, __pyx_t_2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2566; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2566; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_6 = ((PyArrayObject *)__pyx_t_5); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_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.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_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_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_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2566; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_6 = 0; __pyx_v_out = ((PyArrayObject *)__pyx_t_5); __pyx_t_5 = 0; /* "pandas/tslib.pyx":2568 * out = np.empty(l, dtype='i8') * * if tz is None: # <<<<<<<<<<<<<< * for i in range(l): * pandas_datetime_to_datetimestruct(dtarr[i], PANDAS_FR_ns, &dts) */ __pyx_t_11 = (__pyx_v_tz == Py_None); __pyx_t_12 = (__pyx_t_11 != 0); if (__pyx_t_12) { /* "pandas/tslib.pyx":2569 * * if tz is None: * for i in range(l): # <<<<<<<<<<<<<< * pandas_datetime_to_datetimestruct(dtarr[i], PANDAS_FR_ns, &dts) * out[i] = get_period_ordinal(dts.year, dts.month, dts.day, */ __pyx_t_1 = __pyx_v_l; for (__pyx_t_13 = 0; __pyx_t_13 < __pyx_t_1; __pyx_t_13+=1) { __pyx_v_i = __pyx_t_13; /* "pandas/tslib.pyx":2570 * if tz is None: * for i in range(l): * pandas_datetime_to_datetimestruct(dtarr[i], PANDAS_FR_ns, &dts) # <<<<<<<<<<<<<< * out[i] = get_period_ordinal(dts.year, dts.month, dts.day, * dts.hour, dts.min, dts.sec, dts.us, dts.ps, freq) */ __pyx_t_14 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_14 < 0) { __pyx_t_14 += __pyx_pybuffernd_dtarr.diminfo[0].shape; if (unlikely(__pyx_t_14 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_14 >= __pyx_pybuffernd_dtarr.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2570; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } pandas_datetime_to_datetimestruct((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_dtarr.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_dtarr.diminfo[0].strides)), PANDAS_FR_ns, (&__pyx_v_dts)); /* "pandas/tslib.pyx":2571 * for i in range(l): * pandas_datetime_to_datetimestruct(dtarr[i], PANDAS_FR_ns, &dts) * out[i] = get_period_ordinal(dts.year, dts.month, dts.day, # <<<<<<<<<<<<<< * dts.hour, dts.min, dts.sec, dts.us, dts.ps, freq) * else: */ __pyx_t_15 = get_period_ordinal(__pyx_v_dts.year, __pyx_v_dts.month, __pyx_v_dts.day, __pyx_v_dts.hour, __pyx_v_dts.min, __pyx_v_dts.sec, __pyx_v_dts.us, __pyx_v_dts.ps, __pyx_v_freq); if (unlikely(__pyx_t_15 == INT32_MIN)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2571; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_16 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_16 < 0) { __pyx_t_16 += __pyx_pybuffernd_out.diminfo[0].shape; if (unlikely(__pyx_t_16 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_16 >= __pyx_pybuffernd_out.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2571; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_out.diminfo[0].strides) = __pyx_t_15; } goto __pyx_L3; } /*else*/ { /* "pandas/tslib.pyx":2574 * dts.hour, dts.min, dts.sec, dts.us, dts.ps, freq) * else: * out = localize_dt64arr_to_period(dtarr, freq, tz) # <<<<<<<<<<<<<< * return out * */ __pyx_t_5 = ((PyObject *)__pyx_f_6pandas_5tslib_localize_dt64arr_to_period(((PyArrayObject *)__pyx_v_dtarr), __pyx_v_freq, __pyx_v_tz)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2574; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_5), &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_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.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_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_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_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2574; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __Pyx_DECREF_SET(__pyx_v_out, ((PyArrayObject *)__pyx_t_5)); __pyx_t_5 = 0; } __pyx_L3:; /* "pandas/tslib.pyx":2575 * else: * out = localize_dt64arr_to_period(dtarr, freq, tz) * return out # <<<<<<<<<<<<<< * * def periodarr_to_dt64arr(ndarray[int64_t] periodarr, int freq): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_out)); __pyx_r = ((PyObject *)__pyx_v_out); goto __pyx_L0; /* "pandas/tslib.pyx":2554 * return period_ord_w_mult * mult + 1; * * def dt64arr_to_periodarr(ndarray[int64_t] dtarr, int freq, tz=None): # <<<<<<<<<<<<<< * """ * Convert array of datetime64 values (passed in as 'i8' dtype) to a set of */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_dtarr.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.tslib.dt64arr_to_periodarr", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_dtarr.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_out); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/tslib.pyx":2577 * return out * * def periodarr_to_dt64arr(ndarray[int64_t] periodarr, int freq): # <<<<<<<<<<<<<< * """ * Convert array to datetime64 values from a set of ordinals corresponding to */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5tslib_77periodarr_to_dt64arr(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6pandas_5tslib_76periodarr_to_dt64arr[] = "\n Convert array to datetime64 values from a set of ordinals corresponding to\n periods per period convention.\n "; static PyMethodDef __pyx_mdef_6pandas_5tslib_77periodarr_to_dt64arr = {__Pyx_NAMESTR("periodarr_to_dt64arr"), (PyCFunction)__pyx_pw_6pandas_5tslib_77periodarr_to_dt64arr, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_5tslib_76periodarr_to_dt64arr)}; static PyObject *__pyx_pw_6pandas_5tslib_77periodarr_to_dt64arr(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_periodarr = 0; int __pyx_v_freq; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("periodarr_to_dt64arr (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_periodarr,&__pyx_n_s_freq,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_periodarr)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_freq)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("periodarr_to_dt64arr", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2577; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "periodarr_to_dt64arr") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2577; __pyx_clineno = __LINE__; goto __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_periodarr = ((PyArrayObject *)values[0]); __pyx_v_freq = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_freq == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2577; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("periodarr_to_dt64arr", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2577; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.tslib.periodarr_to_dt64arr", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_periodarr), __pyx_ptype_5numpy_ndarray, 1, "periodarr", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2577; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5tslib_76periodarr_to_dt64arr(__pyx_self, __pyx_v_periodarr, __pyx_v_freq); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5tslib_76periodarr_to_dt64arr(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_periodarr, int __pyx_v_freq) { PyArrayObject *__pyx_v_out = 0; Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_l; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_periodarr; __Pyx_Buffer __pyx_pybuffer_periodarr; 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; PyArrayObject *__pyx_t_6 = NULL; 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("periodarr_to_dt64arr", 0); __pyx_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; __pyx_pybuffer_periodarr.pybuffer.buf = NULL; __pyx_pybuffer_periodarr.refcount = 0; __pyx_pybuffernd_periodarr.data = NULL; __pyx_pybuffernd_periodarr.rcbuffer = &__pyx_pybuffer_periodarr; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_periodarr.rcbuffer->pybuffer, (PyObject*)__pyx_v_periodarr, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2577; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_periodarr.diminfo[0].strides = __pyx_pybuffernd_periodarr.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_periodarr.diminfo[0].shape = __pyx_pybuffernd_periodarr.rcbuffer->pybuffer.shape[0]; /* "pandas/tslib.pyx":2586 * Py_ssize_t i, l * * l = len(periodarr) # <<<<<<<<<<<<<< * * out = np.empty(l, dtype='i8') */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_periodarr)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2586; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_l = __pyx_t_1; /* "pandas/tslib.pyx":2588 * l = len(periodarr) * * out = np.empty(l, dtype='i8') # <<<<<<<<<<<<<< * * for i in range(l): */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2588; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 2588; __pyx_clineno = __LINE__; goto __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_l); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2588; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2588; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2588; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_dtype, __pyx_n_s_i8) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2588; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_5 = PyObject_Call(__pyx_t_3, __pyx_t_4, __pyx_t_2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2588; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2588; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_6 = ((PyArrayObject *)__pyx_t_5); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_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.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_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_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_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2588; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_6 = 0; __pyx_v_out = ((PyArrayObject *)__pyx_t_5); __pyx_t_5 = 0; /* "pandas/tslib.pyx":2590 * out = np.empty(l, dtype='i8') * * for i in range(l): # <<<<<<<<<<<<<< * out[i] = period_ordinal_to_dt64(periodarr[i], freq) * */ __pyx_t_1 = __pyx_v_l; for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_1; __pyx_t_11+=1) { __pyx_v_i = __pyx_t_11; /* "pandas/tslib.pyx":2591 * * for i in range(l): * out[i] = period_ordinal_to_dt64(periodarr[i], freq) # <<<<<<<<<<<<<< * * return out */ __pyx_t_12 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_12 < 0) { __pyx_t_12 += __pyx_pybuffernd_periodarr.diminfo[0].shape; if (unlikely(__pyx_t_12 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_12 >= __pyx_pybuffernd_periodarr.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2591; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_13 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_13 < 0) { __pyx_t_13 += __pyx_pybuffernd_out.diminfo[0].shape; if (unlikely(__pyx_t_13 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_13 >= __pyx_pybuffernd_out.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2591; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_out.diminfo[0].strides) = __pyx_f_6pandas_5tslib_period_ordinal_to_dt64((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_periodarr.rcbuffer->pybuffer.buf, __pyx_t_12, __pyx_pybuffernd_periodarr.diminfo[0].strides)), __pyx_v_freq, 0); } /* "pandas/tslib.pyx":2593 * out[i] = period_ordinal_to_dt64(periodarr[i], freq) * * return out # <<<<<<<<<<<<<< * * cdef char START = 'S' */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_out)); __pyx_r = ((PyObject *)__pyx_v_out); goto __pyx_L0; /* "pandas/tslib.pyx":2577 * return out * * def periodarr_to_dt64arr(ndarray[int64_t] periodarr, int freq): # <<<<<<<<<<<<<< * """ * Convert array to datetime64 values from a set of ordinals corresponding to */ /* 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); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_periodarr.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.tslib.periodarr_to_dt64arr", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_periodarr.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_out); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/tslib.pyx":2598 * cdef char END = 'E' * * cpdef int64_t period_asfreq(int64_t period_ordinal, int freq1, int freq2, # <<<<<<<<<<<<<< * bint end): * """ */ static PyObject *__pyx_pw_6pandas_5tslib_79period_asfreq(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static __pyx_t_5numpy_int64_t __pyx_f_6pandas_5tslib_period_asfreq(__pyx_t_5numpy_int64_t __pyx_v_period_ordinal, int __pyx_v_freq1, int __pyx_v_freq2, int __pyx_v_end, CYTHON_UNUSED int __pyx_skip_dispatch) { __pyx_t_5numpy_int64_t __pyx_v_retval; __pyx_t_5numpy_int64_t __pyx_r; __Pyx_RefNannyDeclarations int __pyx_t_1; __pyx_t_5numpy_int64_t __pyx_t_2; PyObject *__pyx_t_3 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("period_asfreq", 0); /* "pandas/tslib.pyx":2607 * int64_t retval * * if end: # <<<<<<<<<<<<<< * retval = asfreq(period_ordinal, freq1, freq2, END) * else: */ __pyx_t_1 = (__pyx_v_end != 0); if (__pyx_t_1) { /* "pandas/tslib.pyx":2608 * * if end: * retval = asfreq(period_ordinal, freq1, freq2, END) # <<<<<<<<<<<<<< * else: * retval = asfreq(period_ordinal, freq1, freq2, START) */ __pyx_t_2 = asfreq(__pyx_v_period_ordinal, __pyx_v_freq1, __pyx_v_freq2, __pyx_v_6pandas_5tslib_END); if (unlikely(__pyx_t_2 == INT32_MIN)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2608; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_retval = __pyx_t_2; goto __pyx_L3; } /*else*/ { /* "pandas/tslib.pyx":2610 * retval = asfreq(period_ordinal, freq1, freq2, END) * else: * retval = asfreq(period_ordinal, freq1, freq2, START) # <<<<<<<<<<<<<< * * if retval == INT32_MIN: */ __pyx_t_2 = asfreq(__pyx_v_period_ordinal, __pyx_v_freq1, __pyx_v_freq2, __pyx_v_6pandas_5tslib_START); if (unlikely(__pyx_t_2 == INT32_MIN)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2610; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_retval = __pyx_t_2; } __pyx_L3:; /* "pandas/tslib.pyx":2612 * retval = asfreq(period_ordinal, freq1, freq2, START) * * if retval == INT32_MIN: # <<<<<<<<<<<<<< * raise ValueError('Frequency conversion failed') * */ __pyx_t_1 = ((__pyx_v_retval == INT32_MIN) != 0); if (__pyx_t_1) { /* "pandas/tslib.pyx":2613 * * if retval == INT32_MIN: * raise ValueError('Frequency conversion failed') # <<<<<<<<<<<<<< * * return retval */ __pyx_t_3 = PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__57, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2613; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 2613; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } /* "pandas/tslib.pyx":2615 * raise ValueError('Frequency conversion failed') * * return retval # <<<<<<<<<<<<<< * * def period_asfreq_arr(ndarray[int64_t] arr, int freq1, int freq2, bint end): */ __pyx_r = __pyx_v_retval; goto __pyx_L0; /* "pandas/tslib.pyx":2598 * cdef char END = 'E' * * cpdef int64_t period_asfreq(int64_t period_ordinal, int freq1, int freq2, # <<<<<<<<<<<<<< * bint end): * """ */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_WriteUnraisable("pandas.tslib.period_asfreq", __pyx_clineno, __pyx_lineno, __pyx_filename, 0); __pyx_r = 0; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5tslib_79period_asfreq(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6pandas_5tslib_78period_asfreq[] = "\n Convert period ordinal from one frequency to another, and if upsampling,\n choose to use start ('S') or end ('E') of period.\n "; static PyObject *__pyx_pw_6pandas_5tslib_79period_asfreq(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { __pyx_t_5numpy_int64_t __pyx_v_period_ordinal; int __pyx_v_freq1; int __pyx_v_freq2; int __pyx_v_end; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("period_asfreq (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_period_ordinal,&__pyx_n_s_freq1,&__pyx_n_s_freq2,&__pyx_n_s_end,0}; PyObject* values[4] = {0,0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_period_ordinal)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_freq1)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("period_asfreq", 1, 4, 4, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2598; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_freq2)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("period_asfreq", 1, 4, 4, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2598; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_end)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("period_asfreq", 1, 4, 4, 3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2598; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "period_asfreq") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2598; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 4) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[3] = PyTuple_GET_ITEM(__pyx_args, 3); } __pyx_v_period_ordinal = __Pyx_PyInt_As_npy_int64(values[0]); if (unlikely((__pyx_v_period_ordinal == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2598; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_freq1 = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_freq1 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2598; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_freq2 = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_freq2 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2598; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_end = __Pyx_PyObject_IsTrue(values[3]); if (unlikely((__pyx_v_end == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2599; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("period_asfreq", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2598; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.tslib.period_asfreq", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pandas_5tslib_78period_asfreq(__pyx_self, __pyx_v_period_ordinal, __pyx_v_freq1, __pyx_v_freq2, __pyx_v_end); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5tslib_78period_asfreq(CYTHON_UNUSED PyObject *__pyx_self, __pyx_t_5numpy_int64_t __pyx_v_period_ordinal, int __pyx_v_freq1, int __pyx_v_freq2, int __pyx_v_end) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("period_asfreq", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyInt_From_npy_int64(__pyx_f_6pandas_5tslib_period_asfreq(__pyx_v_period_ordinal, __pyx_v_freq1, __pyx_v_freq2, __pyx_v_end, 0)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2598; __pyx_clineno = __LINE__; goto __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.tslib.period_asfreq", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/tslib.pyx":2617 * return retval * * def period_asfreq_arr(ndarray[int64_t] arr, int freq1, int freq2, bint end): # <<<<<<<<<<<<<< * """ * Convert int64-array of period ordinals from one frequency to another, and */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5tslib_81period_asfreq_arr(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6pandas_5tslib_80period_asfreq_arr[] = "\n Convert int64-array of period ordinals from one frequency to another, and\n if upsampling, choose to use start ('S') or end ('E') of period.\n "; static PyMethodDef __pyx_mdef_6pandas_5tslib_81period_asfreq_arr = {__Pyx_NAMESTR("period_asfreq_arr"), (PyCFunction)__pyx_pw_6pandas_5tslib_81period_asfreq_arr, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_5tslib_80period_asfreq_arr)}; static PyObject *__pyx_pw_6pandas_5tslib_81period_asfreq_arr(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_arr = 0; int __pyx_v_freq1; int __pyx_v_freq2; int __pyx_v_end; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("period_asfreq_arr (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_arr,&__pyx_n_s_freq1,&__pyx_n_s_freq2,&__pyx_n_s_end,0}; PyObject* values[4] = {0,0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_arr)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_freq1)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("period_asfreq_arr", 1, 4, 4, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2617; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_freq2)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("period_asfreq_arr", 1, 4, 4, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2617; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_end)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("period_asfreq_arr", 1, 4, 4, 3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2617; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "period_asfreq_arr") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2617; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 4) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[3] = PyTuple_GET_ITEM(__pyx_args, 3); } __pyx_v_arr = ((PyArrayObject *)values[0]); __pyx_v_freq1 = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_freq1 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2617; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_freq2 = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_freq2 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2617; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_end = __Pyx_PyObject_IsTrue(values[3]); if (unlikely((__pyx_v_end == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2617; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("period_asfreq_arr", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2617; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.tslib.period_asfreq_arr", __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_filename = __pyx_f[0]; __pyx_lineno = 2617; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5tslib_80period_asfreq_arr(__pyx_self, __pyx_v_arr, __pyx_v_freq1, __pyx_v_freq2, __pyx_v_end); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5tslib_80period_asfreq_arr(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_arr, int __pyx_v_freq1, int __pyx_v_freq2, int __pyx_v_end) { PyArrayObject *__pyx_v_result = 0; Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_n; freq_conv_func __pyx_v_func; asfreq_info __pyx_v_finfo; __pyx_t_5numpy_int64_t __pyx_v_val; char __pyx_v_relation; __Pyx_LocalBuf_ND __pyx_pybuffernd_arr; __Pyx_Buffer __pyx_pybuffer_arr; __Pyx_LocalBuf_ND __pyx_pybuffernd_result; __Pyx_Buffer __pyx_pybuffer_result; 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; int __pyx_t_12; Py_ssize_t __pyx_t_13; Py_ssize_t __pyx_t_14; Py_ssize_t __pyx_t_15; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("period_asfreq_arr", 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_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_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2617; __pyx_clineno = __LINE__; goto __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/tslib.pyx":2630 * char relation * * n = len(arr) # <<<<<<<<<<<<<< * result = np.empty(n, dtype=np.int64) * */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_arr)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2630; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/tslib.pyx":2631 * * n = len(arr) * result = np.empty(n, dtype=np.int64) # <<<<<<<<<<<<<< * * func = get_asfreq_func(freq1, freq2) */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2631; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 2631; __pyx_clineno = __LINE__; goto __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_n); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2631; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2631; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2631; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2631; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_int64); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2631; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 2631; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyObject_Call(__pyx_t_3, __pyx_t_4, __pyx_t_2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2631; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 2631; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_7 = ((PyArrayObject *)__pyx_t_6); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_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_result.rcbuffer->pybuffer, (PyObject*)__pyx_v_result, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_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_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_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2631; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_7 = 0; __pyx_v_result = ((PyArrayObject *)__pyx_t_6); __pyx_t_6 = 0; /* "pandas/tslib.pyx":2633 * result = np.empty(n, dtype=np.int64) * * func = get_asfreq_func(freq1, freq2) # <<<<<<<<<<<<<< * get_asfreq_info(freq1, freq2, &finfo) * */ __pyx_v_func = get_asfreq_func(__pyx_v_freq1, __pyx_v_freq2); /* "pandas/tslib.pyx":2634 * * func = get_asfreq_func(freq1, freq2) * get_asfreq_info(freq1, freq2, &finfo) # <<<<<<<<<<<<<< * * if end: */ get_asfreq_info(__pyx_v_freq1, __pyx_v_freq2, (&__pyx_v_finfo)); /* "pandas/tslib.pyx":2636 * get_asfreq_info(freq1, freq2, &finfo) * * if end: # <<<<<<<<<<<<<< * relation = END * else: */ __pyx_t_12 = (__pyx_v_end != 0); if (__pyx_t_12) { /* "pandas/tslib.pyx":2637 * * if end: * relation = END # <<<<<<<<<<<<<< * else: * relation = START */ __pyx_v_relation = __pyx_v_6pandas_5tslib_END; goto __pyx_L3; } /*else*/ { /* "pandas/tslib.pyx":2639 * relation = END * else: * relation = START # <<<<<<<<<<<<<< * * for i in range(n): */ __pyx_v_relation = __pyx_v_6pandas_5tslib_START; } __pyx_L3:; /* "pandas/tslib.pyx":2641 * relation = START * * for i in range(n): # <<<<<<<<<<<<<< * val = func(arr[i], relation, &finfo) * if val == INT32_MIN: */ __pyx_t_1 = __pyx_v_n; for (__pyx_t_13 = 0; __pyx_t_13 < __pyx_t_1; __pyx_t_13+=1) { __pyx_v_i = __pyx_t_13; /* "pandas/tslib.pyx":2642 * * for i in range(n): * val = func(arr[i], relation, &finfo) # <<<<<<<<<<<<<< * if val == INT32_MIN: * raise ValueError("Unable to convert to desired frequency.") */ __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_filename = __pyx_f[0]; __pyx_lineno = 2642; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_val = __pyx_v_func((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_arr.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_arr.diminfo[0].strides)), __pyx_v_relation, (&__pyx_v_finfo)); /* "pandas/tslib.pyx":2643 * for i in range(n): * val = func(arr[i], relation, &finfo) * if val == INT32_MIN: # <<<<<<<<<<<<<< * raise ValueError("Unable to convert to desired frequency.") * result[i] = val */ __pyx_t_12 = ((__pyx_v_val == INT32_MIN) != 0); if (__pyx_t_12) { /* "pandas/tslib.pyx":2644 * val = func(arr[i], relation, &finfo) * if val == INT32_MIN: * raise ValueError("Unable to convert to desired frequency.") # <<<<<<<<<<<<<< * result[i] = val * */ __pyx_t_6 = PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__58, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2644; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_Raise(__pyx_t_6, 0, 0, 0); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2644; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } /* "pandas/tslib.pyx":2645 * if val == INT32_MIN: * raise ValueError("Unable to convert to desired frequency.") * result[i] = val # <<<<<<<<<<<<<< * * return result */ __pyx_t_15 = __pyx_v_i; __pyx_t_8 = -1; if (__pyx_t_15 < 0) { __pyx_t_15 += __pyx_pybuffernd_result.diminfo[0].shape; if (unlikely(__pyx_t_15 < 0)) __pyx_t_8 = 0; } else if (unlikely(__pyx_t_15 >= __pyx_pybuffernd_result.diminfo[0].shape)) __pyx_t_8 = 0; if (unlikely(__pyx_t_8 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_8); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2645; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_result.diminfo[0].strides) = __pyx_v_val; } /* "pandas/tslib.pyx":2647 * result[i] = val * * return result # <<<<<<<<<<<<<< * * def period_ordinal(int y, int m, int d, int h, int min, int s, int us, int ps, int freq): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_result)); __pyx_r = ((PyObject *)__pyx_v_result); goto __pyx_L0; /* "pandas/tslib.pyx":2617 * return retval * * def period_asfreq_arr(ndarray[int64_t] arr, int freq1, int freq2, bint end): # <<<<<<<<<<<<<< * """ * Convert int64-array of period ordinals from one frequency to another, and */ /* 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_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_arr.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.tslib.period_asfreq_arr", __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_result.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_result); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/tslib.pyx":2649 * return result * * def period_ordinal(int y, int m, int d, int h, int min, int s, int us, int ps, int freq): # <<<<<<<<<<<<<< * cdef: * int64_t ordinal */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5tslib_83period_ordinal(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5tslib_83period_ordinal = {__Pyx_NAMESTR("period_ordinal"), (PyCFunction)__pyx_pw_6pandas_5tslib_83period_ordinal, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5tslib_83period_ordinal(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { int __pyx_v_y; int __pyx_v_m; int __pyx_v_d; int __pyx_v_h; int __pyx_v_min; int __pyx_v_s; int __pyx_v_us; int __pyx_v_ps; int __pyx_v_freq; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("period_ordinal (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_y,&__pyx_n_s_m,&__pyx_n_s_d,&__pyx_n_s_h,&__pyx_n_s_min,&__pyx_n_s_s_2,&__pyx_n_s_us,&__pyx_n_s_ps,&__pyx_n_s_freq,0}; PyObject* values[9] = {0,0,0,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 9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8); case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7); case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6); case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5); case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_y)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_m)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("period_ordinal", 1, 9, 9, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2649; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_d)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("period_ordinal", 1, 9, 9, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2649; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_h)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("period_ordinal", 1, 9, 9, 3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2649; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 4: if (likely((values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_min)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("period_ordinal", 1, 9, 9, 4); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2649; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 5: if (likely((values[5] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_s_2)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("period_ordinal", 1, 9, 9, 5); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2649; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 6: if (likely((values[6] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_us)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("period_ordinal", 1, 9, 9, 6); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2649; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 7: if (likely((values[7] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ps)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("period_ordinal", 1, 9, 9, 7); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2649; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 8: if (likely((values[8] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_freq)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("period_ordinal", 1, 9, 9, 8); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2649; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "period_ordinal") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2649; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 9) { 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); values[6] = PyTuple_GET_ITEM(__pyx_args, 6); values[7] = PyTuple_GET_ITEM(__pyx_args, 7); values[8] = PyTuple_GET_ITEM(__pyx_args, 8); } __pyx_v_y = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_y == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2649; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_m = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_m == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2649; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_d = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_d == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2649; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_h = __Pyx_PyInt_As_int(values[3]); if (unlikely((__pyx_v_h == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2649; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_min = __Pyx_PyInt_As_int(values[4]); if (unlikely((__pyx_v_min == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2649; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_s = __Pyx_PyInt_As_int(values[5]); if (unlikely((__pyx_v_s == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2649; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_us = __Pyx_PyInt_As_int(values[6]); if (unlikely((__pyx_v_us == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2649; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_ps = __Pyx_PyInt_As_int(values[7]); if (unlikely((__pyx_v_ps == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2649; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_freq = __Pyx_PyInt_As_int(values[8]); if (unlikely((__pyx_v_freq == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2649; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("period_ordinal", 1, 9, 9, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2649; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.tslib.period_ordinal", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pandas_5tslib_82period_ordinal(__pyx_self, __pyx_v_y, __pyx_v_m, __pyx_v_d, __pyx_v_h, __pyx_v_min, __pyx_v_s, __pyx_v_us, __pyx_v_ps, __pyx_v_freq); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5tslib_82period_ordinal(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_y, int __pyx_v_m, int __pyx_v_d, int __pyx_v_h, int __pyx_v_min, int __pyx_v_s, int __pyx_v_us, int __pyx_v_ps, int __pyx_v_freq) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __pyx_t_5numpy_int64_t __pyx_t_1; PyObject *__pyx_t_2 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("period_ordinal", 0); /* "pandas/tslib.pyx":2653 * int64_t ordinal * * return get_period_ordinal(y, m, d, h, min, s, us, ps, freq) # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = get_period_ordinal(__pyx_v_y, __pyx_v_m, __pyx_v_d, __pyx_v_h, __pyx_v_min, __pyx_v_s, __pyx_v_us, __pyx_v_ps, __pyx_v_freq); if (unlikely(__pyx_t_1 == INT32_MIN)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2653; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_2 = __Pyx_PyInt_From_npy_int64(__pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2653; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "pandas/tslib.pyx":2649 * return result * * def period_ordinal(int y, int m, int d, int h, int min, int s, int us, int ps, int freq): # <<<<<<<<<<<<<< * cdef: * int64_t ordinal */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("pandas.tslib.period_ordinal", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/tslib.pyx":2656 * * * cpdef int64_t period_ordinal_to_dt64(int64_t ordinal, int freq): # <<<<<<<<<<<<<< * cdef: * pandas_datetimestruct dts */ static PyObject *__pyx_pw_6pandas_5tslib_85period_ordinal_to_dt64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static __pyx_t_5numpy_int64_t __pyx_f_6pandas_5tslib_period_ordinal_to_dt64(__pyx_t_5numpy_int64_t __pyx_v_ordinal, int __pyx_v_freq, CYTHON_UNUSED int __pyx_skip_dispatch) { pandas_datetimestruct __pyx_v_dts; date_info __pyx_v_dinfo; float __pyx_v_subsecond_fraction; __pyx_t_5numpy_int64_t __pyx_r; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("period_ordinal_to_dt64", 0); /* "pandas/tslib.pyx":2662 * float subsecond_fraction * * get_date_info(ordinal, freq, &dinfo) # <<<<<<<<<<<<<< * * dts.year = dinfo.year */ __pyx_t_1 = get_date_info(__pyx_v_ordinal, __pyx_v_freq, (&__pyx_v_dinfo)); if (unlikely(__pyx_t_1 == INT32_MIN)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2662; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/tslib.pyx":2664 * get_date_info(ordinal, freq, &dinfo) * * dts.year = dinfo.year # <<<<<<<<<<<<<< * dts.month = dinfo.month * dts.day = dinfo.day */ __pyx_t_1 = __pyx_v_dinfo.year; __pyx_v_dts.year = __pyx_t_1; /* "pandas/tslib.pyx":2665 * * dts.year = dinfo.year * dts.month = dinfo.month # <<<<<<<<<<<<<< * dts.day = dinfo.day * dts.hour = dinfo.hour */ __pyx_t_1 = __pyx_v_dinfo.month; __pyx_v_dts.month = __pyx_t_1; /* "pandas/tslib.pyx":2666 * dts.year = dinfo.year * dts.month = dinfo.month * dts.day = dinfo.day # <<<<<<<<<<<<<< * dts.hour = dinfo.hour * dts.min = dinfo.minute */ __pyx_t_1 = __pyx_v_dinfo.day; __pyx_v_dts.day = __pyx_t_1; /* "pandas/tslib.pyx":2667 * dts.month = dinfo.month * dts.day = dinfo.day * dts.hour = dinfo.hour # <<<<<<<<<<<<<< * dts.min = dinfo.minute * dts.sec = int(dinfo.second) */ __pyx_t_1 = __pyx_v_dinfo.hour; __pyx_v_dts.hour = __pyx_t_1; /* "pandas/tslib.pyx":2668 * dts.day = dinfo.day * dts.hour = dinfo.hour * dts.min = dinfo.minute # <<<<<<<<<<<<<< * dts.sec = int(dinfo.second) * subsecond_fraction = dinfo.second - dts.sec */ __pyx_t_1 = __pyx_v_dinfo.minute; __pyx_v_dts.min = __pyx_t_1; /* "pandas/tslib.pyx":2669 * dts.hour = dinfo.hour * dts.min = dinfo.minute * dts.sec = int(dinfo.second) # <<<<<<<<<<<<<< * subsecond_fraction = dinfo.second - dts.sec * dts.us = int((subsecond_fraction) * 1e6) */ __pyx_v_dts.sec = ((npy_int32)__pyx_v_dinfo.second); /* "pandas/tslib.pyx":2670 * dts.min = dinfo.minute * dts.sec = int(dinfo.second) * subsecond_fraction = dinfo.second - dts.sec # <<<<<<<<<<<<<< * dts.us = int((subsecond_fraction) * 1e6) * dts.ps = int(((subsecond_fraction) * 1e6 - dts.us) * 1e6) */ __pyx_v_subsecond_fraction = (__pyx_v_dinfo.second - __pyx_v_dts.sec); /* "pandas/tslib.pyx":2671 * dts.sec = int(dinfo.second) * subsecond_fraction = dinfo.second - dts.sec * dts.us = int((subsecond_fraction) * 1e6) # <<<<<<<<<<<<<< * dts.ps = int(((subsecond_fraction) * 1e6 - dts.us) * 1e6) * */ __pyx_v_dts.us = ((npy_int32)(__pyx_v_subsecond_fraction * 1e6)); /* "pandas/tslib.pyx":2672 * subsecond_fraction = dinfo.second - dts.sec * dts.us = int((subsecond_fraction) * 1e6) * dts.ps = int(((subsecond_fraction) * 1e6 - dts.us) * 1e6) # <<<<<<<<<<<<<< * * return pandas_datetimestruct_to_datetime(PANDAS_FR_ns, &dts) */ __pyx_v_dts.ps = ((npy_int32)(((__pyx_v_subsecond_fraction * 1e6) - __pyx_v_dts.us) * 1e6)); /* "pandas/tslib.pyx":2674 * dts.ps = int(((subsecond_fraction) * 1e6 - dts.us) * 1e6) * * return pandas_datetimestruct_to_datetime(PANDAS_FR_ns, &dts) # <<<<<<<<<<<<<< * * def period_format(int64_t value, int freq, object fmt=None): */ __pyx_r = pandas_datetimestruct_to_datetime(PANDAS_FR_ns, (&__pyx_v_dts)); goto __pyx_L0; /* "pandas/tslib.pyx":2656 * * * cpdef int64_t period_ordinal_to_dt64(int64_t ordinal, int freq): # <<<<<<<<<<<<<< * cdef: * pandas_datetimestruct dts */ /* function exit code */ __pyx_L1_error:; __Pyx_WriteUnraisable("pandas.tslib.period_ordinal_to_dt64", __pyx_clineno, __pyx_lineno, __pyx_filename, 0); __pyx_r = 0; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5tslib_85period_ordinal_to_dt64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_6pandas_5tslib_85period_ordinal_to_dt64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { __pyx_t_5numpy_int64_t __pyx_v_ordinal; int __pyx_v_freq; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("period_ordinal_to_dt64 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ordinal,&__pyx_n_s_freq,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ordinal)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_freq)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("period_ordinal_to_dt64", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2656; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "period_ordinal_to_dt64") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2656; __pyx_clineno = __LINE__; goto __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_ordinal = __Pyx_PyInt_As_npy_int64(values[0]); if (unlikely((__pyx_v_ordinal == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2656; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_freq = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_freq == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2656; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("period_ordinal_to_dt64", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2656; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.tslib.period_ordinal_to_dt64", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pandas_5tslib_84period_ordinal_to_dt64(__pyx_self, __pyx_v_ordinal, __pyx_v_freq); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5tslib_84period_ordinal_to_dt64(CYTHON_UNUSED PyObject *__pyx_self, __pyx_t_5numpy_int64_t __pyx_v_ordinal, int __pyx_v_freq) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("period_ordinal_to_dt64", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyInt_From_npy_int64(__pyx_f_6pandas_5tslib_period_ordinal_to_dt64(__pyx_v_ordinal, __pyx_v_freq, 0)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2656; __pyx_clineno = __LINE__; goto __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.tslib.period_ordinal_to_dt64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/tslib.pyx":2676 * return pandas_datetimestruct_to_datetime(PANDAS_FR_ns, &dts) * * def period_format(int64_t value, int freq, object fmt=None): # <<<<<<<<<<<<<< * cdef: * int freq_group */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5tslib_87period_format(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5tslib_87period_format = {__Pyx_NAMESTR("period_format"), (PyCFunction)__pyx_pw_6pandas_5tslib_87period_format, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5tslib_87period_format(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { __pyx_t_5numpy_int64_t __pyx_v_value; int __pyx_v_freq; PyObject *__pyx_v_fmt = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("period_format (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_value,&__pyx_n_s_freq,&__pyx_n_s_fmt,0}; PyObject* values[3] = {0,0,0}; values[2] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_value)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_freq)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("period_format", 0, 2, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2676; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_fmt); if (value) { values[2] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "period_format") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2676; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_value = __Pyx_PyInt_As_npy_int64(values[0]); if (unlikely((__pyx_v_value == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2676; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_freq = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_freq == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2676; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_fmt = values[2]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("period_format", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2676; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.tslib.period_format", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pandas_5tslib_86period_format(__pyx_self, __pyx_v_value, __pyx_v_freq, __pyx_v_fmt); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5tslib_86period_format(CYTHON_UNUSED PyObject *__pyx_self, __pyx_t_5numpy_int64_t __pyx_v_value, int __pyx_v_freq, PyObject *__pyx_v_fmt) { int __pyx_v_freq_group; __pyx_t_5numpy_int64_t __pyx_v_left; __pyx_t_5numpy_int64_t __pyx_v_right; 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_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("period_format", 0); __Pyx_INCREF(__pyx_v_fmt); /* "pandas/tslib.pyx":2680 * int freq_group * * if fmt is None: # <<<<<<<<<<<<<< * freq_group = (freq // 1000) * 1000 * if freq_group == 1000: # FR_ANN */ __pyx_t_1 = (__pyx_v_fmt == Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { /* "pandas/tslib.pyx":2681 * * if fmt is None: * freq_group = (freq // 1000) * 1000 # <<<<<<<<<<<<<< * if freq_group == 1000: # FR_ANN * fmt = b'%Y' */ __pyx_v_freq_group = (__Pyx_div_long(__pyx_v_freq, 1000) * 1000); /* "pandas/tslib.pyx":2706 * elif freq_group == 11000: # MICROSEC * fmt = b'%Y-%m-%d %H:%M:%S.%u' * elif freq_group == 12000: # NANOSEC # <<<<<<<<<<<<<< * fmt = b'%Y-%m-%d %H:%M:%S.%n' * else: */ switch (__pyx_v_freq_group) { /* "pandas/tslib.pyx":2682 * if fmt is None: * freq_group = (freq // 1000) * 1000 * if freq_group == 1000: # FR_ANN # <<<<<<<<<<<<<< * fmt = b'%Y' * elif freq_group == 2000: # FR_QTR */ case 1000: /* "pandas/tslib.pyx":2683 * freq_group = (freq // 1000) * 1000 * if freq_group == 1000: # FR_ANN * fmt = b'%Y' # <<<<<<<<<<<<<< * elif freq_group == 2000: # FR_QTR * fmt = b'%FQ%q' */ __Pyx_INCREF(__pyx_kp_b_Y_2); __Pyx_DECREF_SET(__pyx_v_fmt, __pyx_kp_b_Y_2); break; /* "pandas/tslib.pyx":2684 * if freq_group == 1000: # FR_ANN * fmt = b'%Y' * elif freq_group == 2000: # FR_QTR # <<<<<<<<<<<<<< * fmt = b'%FQ%q' * elif freq_group == 3000: # FR_MTH */ case 2000: /* "pandas/tslib.pyx":2685 * fmt = b'%Y' * elif freq_group == 2000: # FR_QTR * fmt = b'%FQ%q' # <<<<<<<<<<<<<< * elif freq_group == 3000: # FR_MTH * fmt = b'%Y-%m' */ __Pyx_INCREF(__pyx_kp_b_FQ_q); __Pyx_DECREF_SET(__pyx_v_fmt, __pyx_kp_b_FQ_q); break; /* "pandas/tslib.pyx":2686 * elif freq_group == 2000: # FR_QTR * fmt = b'%FQ%q' * elif freq_group == 3000: # FR_MTH # <<<<<<<<<<<<<< * fmt = b'%Y-%m' * elif freq_group == 4000: # WK */ case 3000: /* "pandas/tslib.pyx":2687 * fmt = b'%FQ%q' * elif freq_group == 3000: # FR_MTH * fmt = b'%Y-%m' # <<<<<<<<<<<<<< * elif freq_group == 4000: # WK * left = period_asfreq(value, freq, 6000, 0) */ __Pyx_INCREF(__pyx_kp_b_Y_m); __Pyx_DECREF_SET(__pyx_v_fmt, __pyx_kp_b_Y_m); break; /* "pandas/tslib.pyx":2688 * elif freq_group == 3000: # FR_MTH * fmt = b'%Y-%m' * elif freq_group == 4000: # WK # <<<<<<<<<<<<<< * left = period_asfreq(value, freq, 6000, 0) * right = period_asfreq(value, freq, 6000, 1) */ case 4000: /* "pandas/tslib.pyx":2689 * fmt = b'%Y-%m' * elif freq_group == 4000: # WK * left = period_asfreq(value, freq, 6000, 0) # <<<<<<<<<<<<<< * right = period_asfreq(value, freq, 6000, 1) * return '%s/%s' % (period_format(left, 6000), */ __pyx_v_left = __pyx_f_6pandas_5tslib_period_asfreq(__pyx_v_value, __pyx_v_freq, 6000, 0, 0); /* "pandas/tslib.pyx":2690 * elif freq_group == 4000: # WK * left = period_asfreq(value, freq, 6000, 0) * right = period_asfreq(value, freq, 6000, 1) # <<<<<<<<<<<<<< * return '%s/%s' % (period_format(left, 6000), * period_format(right, 6000)) */ __pyx_v_right = __pyx_f_6pandas_5tslib_period_asfreq(__pyx_v_value, __pyx_v_freq, 6000, 1, 0); /* "pandas/tslib.pyx":2691 * left = period_asfreq(value, freq, 6000, 0) * right = period_asfreq(value, freq, 6000, 1) * return '%s/%s' % (period_format(left, 6000), # <<<<<<<<<<<<<< * period_format(right, 6000)) * elif (freq_group == 5000 # BUS */ __Pyx_XDECREF(__pyx_r); __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_period_format); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2691; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyInt_From_npy_int64(__pyx_v_left); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2691; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2691; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __Pyx_INCREF(__pyx_int_6000); PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_int_6000); __Pyx_GIVEREF(__pyx_int_6000); __pyx_t_4 = 0; __pyx_t_4 = PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2691; __pyx_clineno = __LINE__; goto __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; /* "pandas/tslib.pyx":2692 * right = period_asfreq(value, freq, 6000, 1) * return '%s/%s' % (period_format(left, 6000), * period_format(right, 6000)) # <<<<<<<<<<<<<< * elif (freq_group == 5000 # BUS * or freq_group == 6000): # DAY */ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_period_format); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2692; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = __Pyx_PyInt_From_npy_int64(__pyx_v_right); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2692; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2692; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __Pyx_INCREF(__pyx_int_6000); PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_int_6000); __Pyx_GIVEREF(__pyx_int_6000); __pyx_t_3 = 0; __pyx_t_3 = PyObject_Call(__pyx_t_5, __pyx_t_6, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2692; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; /* "pandas/tslib.pyx":2691 * left = period_asfreq(value, freq, 6000, 0) * right = period_asfreq(value, freq, 6000, 1) * return '%s/%s' % (period_format(left, 6000), # <<<<<<<<<<<<<< * period_format(right, 6000)) * elif (freq_group == 5000 # BUS */ __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2691; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_4 = 0; __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyString_Format(__pyx_kp_s_s_s_2, __pyx_t_6); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2691; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; break; /* "pandas/tslib.pyx":2693 * return '%s/%s' % (period_format(left, 6000), * period_format(right, 6000)) * elif (freq_group == 5000 # BUS # <<<<<<<<<<<<<< * or freq_group == 6000): # DAY * fmt = b'%Y-%m-%d' */ case 5000: /* "pandas/tslib.pyx":2694 * period_format(right, 6000)) * elif (freq_group == 5000 # BUS * or freq_group == 6000): # DAY # <<<<<<<<<<<<<< * fmt = b'%Y-%m-%d' * elif freq_group == 7000: # HR */ case 6000: /* "pandas/tslib.pyx":2695 * elif (freq_group == 5000 # BUS * or freq_group == 6000): # DAY * fmt = b'%Y-%m-%d' # <<<<<<<<<<<<<< * elif freq_group == 7000: # HR * fmt = b'%Y-%m-%d %H:00' */ __Pyx_INCREF(__pyx_kp_b_Y_m_d); __Pyx_DECREF_SET(__pyx_v_fmt, __pyx_kp_b_Y_m_d); break; /* "pandas/tslib.pyx":2696 * or freq_group == 6000): # DAY * fmt = b'%Y-%m-%d' * elif freq_group == 7000: # HR # <<<<<<<<<<<<<< * fmt = b'%Y-%m-%d %H:00' * elif freq_group == 8000: # MIN */ case 7000: /* "pandas/tslib.pyx":2697 * fmt = b'%Y-%m-%d' * elif freq_group == 7000: # HR * fmt = b'%Y-%m-%d %H:00' # <<<<<<<<<<<<<< * elif freq_group == 8000: # MIN * fmt = b'%Y-%m-%d %H:%M' */ __Pyx_INCREF(__pyx_kp_b_Y_m_d_H_00); __Pyx_DECREF_SET(__pyx_v_fmt, __pyx_kp_b_Y_m_d_H_00); break; /* "pandas/tslib.pyx":2698 * elif freq_group == 7000: # HR * fmt = b'%Y-%m-%d %H:00' * elif freq_group == 8000: # MIN # <<<<<<<<<<<<<< * fmt = b'%Y-%m-%d %H:%M' * elif freq_group == 9000: # SEC */ case 8000: /* "pandas/tslib.pyx":2699 * fmt = b'%Y-%m-%d %H:00' * elif freq_group == 8000: # MIN * fmt = b'%Y-%m-%d %H:%M' # <<<<<<<<<<<<<< * elif freq_group == 9000: # SEC * fmt = b'%Y-%m-%d %H:%M:%S' */ __Pyx_INCREF(__pyx_kp_b_Y_m_d_H_M); __Pyx_DECREF_SET(__pyx_v_fmt, __pyx_kp_b_Y_m_d_H_M); break; /* "pandas/tslib.pyx":2700 * elif freq_group == 8000: # MIN * fmt = b'%Y-%m-%d %H:%M' * elif freq_group == 9000: # SEC # <<<<<<<<<<<<<< * fmt = b'%Y-%m-%d %H:%M:%S' * elif freq_group == 10000: # MILLISEC */ case 9000: /* "pandas/tslib.pyx":2701 * fmt = b'%Y-%m-%d %H:%M' * elif freq_group == 9000: # SEC * fmt = b'%Y-%m-%d %H:%M:%S' # <<<<<<<<<<<<<< * elif freq_group == 10000: # MILLISEC * fmt = b'%Y-%m-%d %H:%M:%S.%l' */ __Pyx_INCREF(__pyx_kp_b_Y_m_d_H_M_S); __Pyx_DECREF_SET(__pyx_v_fmt, __pyx_kp_b_Y_m_d_H_M_S); break; /* "pandas/tslib.pyx":2702 * elif freq_group == 9000: # SEC * fmt = b'%Y-%m-%d %H:%M:%S' * elif freq_group == 10000: # MILLISEC # <<<<<<<<<<<<<< * fmt = b'%Y-%m-%d %H:%M:%S.%l' * elif freq_group == 11000: # MICROSEC */ case 10000: /* "pandas/tslib.pyx":2703 * fmt = b'%Y-%m-%d %H:%M:%S' * elif freq_group == 10000: # MILLISEC * fmt = b'%Y-%m-%d %H:%M:%S.%l' # <<<<<<<<<<<<<< * elif freq_group == 11000: # MICROSEC * fmt = b'%Y-%m-%d %H:%M:%S.%u' */ __Pyx_INCREF(__pyx_kp_b_Y_m_d_H_M_S_l); __Pyx_DECREF_SET(__pyx_v_fmt, __pyx_kp_b_Y_m_d_H_M_S_l); break; /* "pandas/tslib.pyx":2704 * elif freq_group == 10000: # MILLISEC * fmt = b'%Y-%m-%d %H:%M:%S.%l' * elif freq_group == 11000: # MICROSEC # <<<<<<<<<<<<<< * fmt = b'%Y-%m-%d %H:%M:%S.%u' * elif freq_group == 12000: # NANOSEC */ case 11000: /* "pandas/tslib.pyx":2705 * fmt = b'%Y-%m-%d %H:%M:%S.%l' * elif freq_group == 11000: # MICROSEC * fmt = b'%Y-%m-%d %H:%M:%S.%u' # <<<<<<<<<<<<<< * elif freq_group == 12000: # NANOSEC * fmt = b'%Y-%m-%d %H:%M:%S.%n' */ __Pyx_INCREF(__pyx_kp_b_Y_m_d_H_M_S_u); __Pyx_DECREF_SET(__pyx_v_fmt, __pyx_kp_b_Y_m_d_H_M_S_u); break; /* "pandas/tslib.pyx":2706 * elif freq_group == 11000: # MICROSEC * fmt = b'%Y-%m-%d %H:%M:%S.%u' * elif freq_group == 12000: # NANOSEC # <<<<<<<<<<<<<< * fmt = b'%Y-%m-%d %H:%M:%S.%n' * else: */ case 12000: /* "pandas/tslib.pyx":2707 * fmt = b'%Y-%m-%d %H:%M:%S.%u' * elif freq_group == 12000: # NANOSEC * fmt = b'%Y-%m-%d %H:%M:%S.%n' # <<<<<<<<<<<<<< * else: * raise ValueError('Unknown freq: %d' % freq) */ __Pyx_INCREF(__pyx_kp_b_Y_m_d_H_M_S_n); __Pyx_DECREF_SET(__pyx_v_fmt, __pyx_kp_b_Y_m_d_H_M_S_n); break; default: /* "pandas/tslib.pyx":2709 * fmt = b'%Y-%m-%d %H:%M:%S.%n' * else: * raise ValueError('Unknown freq: %d' % freq) # <<<<<<<<<<<<<< * * return _period_strftime(value, freq, fmt) */ __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_freq); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2709; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_6 = __Pyx_PyString_Format(__pyx_kp_s_Unknown_freq_d, __pyx_t_3); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2709; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2709; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyObject_Call(__pyx_builtin_ValueError, __pyx_t_3, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2709; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_Raise(__pyx_t_6, 0, 0, 0); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2709; __pyx_clineno = __LINE__; goto __pyx_L1_error;} break; } goto __pyx_L3; } __pyx_L3:; /* "pandas/tslib.pyx":2711 * raise ValueError('Unknown freq: %d' % freq) * * return _period_strftime(value, freq, fmt) # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_6 = __pyx_f_6pandas_5tslib__period_strftime(__pyx_v_value, __pyx_v_freq, __pyx_v_fmt); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2711; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_r = __pyx_t_6; __pyx_t_6 = 0; goto __pyx_L0; /* "pandas/tslib.pyx":2676 * return pandas_datetimestruct_to_datetime(PANDAS_FR_ns, &dts) * * def period_format(int64_t value, int freq, object fmt=None): # <<<<<<<<<<<<<< * cdef: * int freq_group */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("pandas.tslib.period_format", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_fmt); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/tslib.pyx":2723 * cdef list str_extra_fmts = ["^`AB`^", "^`CD`^", "^`EF`^", "^`GH`^", "^`IJ`^", "^`KL`^"] * * cdef object _period_strftime(int64_t value, int freq, object fmt): # <<<<<<<<<<<<<< * import sys * */ static PyObject *__pyx_f_6pandas_5tslib__period_strftime(__pyx_t_5numpy_int64_t __pyx_v_value, int __pyx_v_freq, PyObject *__pyx_v_fmt) { CYTHON_UNUSED PyObject *__pyx_v_sys = NULL; Py_ssize_t __pyx_v_i; date_info __pyx_v_dinfo; char *__pyx_v_formatted; PyObject *__pyx_v_pat = 0; PyObject *__pyx_v_repl = 0; PyObject *__pyx_v_result = 0; PyObject *__pyx_v_found_pat = 0; int __pyx_v_year; int __pyx_v_quarter; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; Py_ssize_t __pyx_t_2; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; int __pyx_t_5; Py_ssize_t __pyx_t_6; int __pyx_t_7; PyObject *__pyx_t_8 = NULL; char *__pyx_t_9; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_period_strftime", 0); __Pyx_INCREF(__pyx_v_fmt); /* "pandas/tslib.pyx":2724 * * cdef object _period_strftime(int64_t value, int freq, object fmt): * import sys # <<<<<<<<<<<<<< * * cdef: */ __pyx_t_1 = __Pyx_Import(__pyx_n_s_sys, 0, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2724; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_v_sys = __pyx_t_1; __pyx_t_1 = 0; /* "pandas/tslib.pyx":2731 * char *formatted * object pat, repl, result * list found_pat = [False] * len(extra_fmts) # <<<<<<<<<<<<<< * int year, quarter * */ __pyx_t_1 = __pyx_v_6pandas_5tslib_extra_fmts; __Pyx_INCREF(__pyx_t_1); if (unlikely(__pyx_t_1 == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2731; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_2 = PyList_GET_SIZE(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2731; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyList_New(1 * ((__pyx_t_2<0) ? 0:__pyx_t_2)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2731; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < __pyx_t_2; __pyx_temp++) { __Pyx_INCREF(Py_False); PyList_SET_ITEM(__pyx_t_1, __pyx_temp, Py_False); __Pyx_GIVEREF(Py_False); } } __pyx_v_found_pat = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/tslib.pyx":2734 * int year, quarter * * if PyUnicode_Check(fmt): # <<<<<<<<<<<<<< * fmt = fmt.encode('utf-8') * */ __pyx_t_3 = (PyUnicode_Check(__pyx_v_fmt) != 0); if (__pyx_t_3) { /* "pandas/tslib.pyx":2735 * * if PyUnicode_Check(fmt): * fmt = fmt.encode('utf-8') # <<<<<<<<<<<<<< * * get_date_info(value, freq, &dinfo) */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_fmt, __pyx_n_s_encode); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2735; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = PyObject_Call(__pyx_t_1, __pyx_tuple__59, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2735; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF_SET(__pyx_v_fmt, __pyx_t_4); __pyx_t_4 = 0; goto __pyx_L3; } __pyx_L3:; /* "pandas/tslib.pyx":2737 * fmt = fmt.encode('utf-8') * * get_date_info(value, freq, &dinfo) # <<<<<<<<<<<<<< * for i in range(len(extra_fmts)): * pat = extra_fmts[i][0] */ __pyx_t_5 = get_date_info(__pyx_v_value, __pyx_v_freq, (&__pyx_v_dinfo)); if (unlikely(__pyx_t_5 == INT32_MIN)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2737; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/tslib.pyx":2738 * * get_date_info(value, freq, &dinfo) * for i in range(len(extra_fmts)): # <<<<<<<<<<<<<< * pat = extra_fmts[i][0] * repl = extra_fmts[i][1] */ __pyx_t_4 = __pyx_v_6pandas_5tslib_extra_fmts; __Pyx_INCREF(__pyx_t_4); if (unlikely(__pyx_t_4 == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2738; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_2 = PyList_GET_SIZE(__pyx_t_4); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2738; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_2; __pyx_t_6+=1) { __pyx_v_i = __pyx_t_6; /* "pandas/tslib.pyx":2739 * get_date_info(value, freq, &dinfo) * for i in range(len(extra_fmts)): * pat = extra_fmts[i][0] # <<<<<<<<<<<<<< * repl = extra_fmts[i][1] * if pat in fmt: */ if (unlikely(__pyx_v_6pandas_5tslib_extra_fmts == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2739; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_4 = __Pyx_GetItemInt_List(__pyx_v_6pandas_5tslib_extra_fmts, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1); if (unlikely(__pyx_t_4 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2739; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_4); __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_4, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2739; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF_SET(__pyx_v_pat, __pyx_t_1); __pyx_t_1 = 0; /* "pandas/tslib.pyx":2740 * for i in range(len(extra_fmts)): * pat = extra_fmts[i][0] * repl = extra_fmts[i][1] # <<<<<<<<<<<<<< * if pat in fmt: * fmt = fmt.replace(pat, repl) */ if (unlikely(__pyx_v_6pandas_5tslib_extra_fmts == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2740; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_6pandas_5tslib_extra_fmts, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2740; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_1, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_4 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2740; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF_SET(__pyx_v_repl, __pyx_t_4); __pyx_t_4 = 0; /* "pandas/tslib.pyx":2741 * pat = extra_fmts[i][0] * repl = extra_fmts[i][1] * if pat in fmt: # <<<<<<<<<<<<<< * fmt = fmt.replace(pat, repl) * found_pat[i] = True */ __pyx_t_3 = (__Pyx_PySequence_Contains(__pyx_v_pat, __pyx_v_fmt, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2741; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_7 = (__pyx_t_3 != 0); if (__pyx_t_7) { /* "pandas/tslib.pyx":2742 * repl = extra_fmts[i][1] * if pat in fmt: * fmt = fmt.replace(pat, repl) # <<<<<<<<<<<<<< * found_pat[i] = True * */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_fmt, __pyx_n_s_replace); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2742; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2742; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_pat); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_pat); __Pyx_GIVEREF(__pyx_v_pat); __Pyx_INCREF(__pyx_v_repl); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_repl); __Pyx_GIVEREF(__pyx_v_repl); __pyx_t_8 = PyObject_Call(__pyx_t_4, __pyx_t_1, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2742; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF_SET(__pyx_v_fmt, __pyx_t_8); __pyx_t_8 = 0; /* "pandas/tslib.pyx":2743 * if pat in fmt: * fmt = fmt.replace(pat, repl) * found_pat[i] = True # <<<<<<<<<<<<<< * * formatted = c_strftime(&dinfo, fmt) */ if (unlikely(__Pyx_SetItemInt(__pyx_v_found_pat, __pyx_v_i, Py_True, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2743; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L6; } __pyx_L6:; } /* "pandas/tslib.pyx":2745 * found_pat[i] = True * * formatted = c_strftime(&dinfo, fmt) # <<<<<<<<<<<<<< * * result = util.char_to_string(formatted) */ __pyx_t_9 = __Pyx_PyObject_AsString(__pyx_v_fmt); if (unlikely((!__pyx_t_9) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2745; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_formatted = c_strftime((&__pyx_v_dinfo), ((char *)__pyx_t_9)); /* "pandas/tslib.pyx":2747 * formatted = c_strftime(&dinfo, fmt) * * result = util.char_to_string(formatted) # <<<<<<<<<<<<<< * free(formatted) * */ __pyx_t_8 = char_to_string(__pyx_v_formatted); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2747; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_v_result = __pyx_t_8; __pyx_t_8 = 0; /* "pandas/tslib.pyx":2748 * * result = util.char_to_string(formatted) * free(formatted) # <<<<<<<<<<<<<< * * for i in range(len(extra_fmts)): */ free(__pyx_v_formatted); /* "pandas/tslib.pyx":2750 * free(formatted) * * for i in range(len(extra_fmts)): # <<<<<<<<<<<<<< * if found_pat[i]: * if get_yq(value, freq, &quarter, &year) < 0: */ __pyx_t_8 = __pyx_v_6pandas_5tslib_extra_fmts; __Pyx_INCREF(__pyx_t_8); if (unlikely(__pyx_t_8 == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2750; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_2 = PyList_GET_SIZE(__pyx_t_8); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2750; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_2; __pyx_t_6+=1) { __pyx_v_i = __pyx_t_6; /* "pandas/tslib.pyx":2751 * * for i in range(len(extra_fmts)): * if found_pat[i]: # <<<<<<<<<<<<<< * if get_yq(value, freq, &quarter, &year) < 0: * raise ValueError('Unable to get quarter and year') */ __pyx_t_8 = __Pyx_GetItemInt_List(__pyx_v_found_pat, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1); if (unlikely(__pyx_t_8 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2751; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_8); __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2751; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (__pyx_t_7) { /* "pandas/tslib.pyx":2752 * for i in range(len(extra_fmts)): * if found_pat[i]: * if get_yq(value, freq, &quarter, &year) < 0: # <<<<<<<<<<<<<< * raise ValueError('Unable to get quarter and year') * */ __pyx_t_7 = ((get_yq(__pyx_v_value, __pyx_v_freq, (&__pyx_v_quarter), (&__pyx_v_year)) < 0) != 0); if (__pyx_t_7) { /* "pandas/tslib.pyx":2753 * if found_pat[i]: * if get_yq(value, freq, &quarter, &year) < 0: * raise ValueError('Unable to get quarter and year') # <<<<<<<<<<<<<< * * if i == 0: */ __pyx_t_8 = PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__60, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2753; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_Raise(__pyx_t_8, 0, 0, 0); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2753; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } /* "pandas/tslib.pyx":2765 * elif i == 4: * repl = '%06d' % (value % 1000000) * elif i == 5: # <<<<<<<<<<<<<< * repl = '%09d' % (value % 1000000000) * */ switch (__pyx_v_i) { /* "pandas/tslib.pyx":2755 * raise ValueError('Unable to get quarter and year') * * if i == 0: # <<<<<<<<<<<<<< * repl = '%d' % quarter * elif i == 1: # %f, 2-digit year */ case 0: /* "pandas/tslib.pyx":2756 * * if i == 0: * repl = '%d' % quarter # <<<<<<<<<<<<<< * elif i == 1: # %f, 2-digit year * repl = '%.2d' % (year % 100) */ __pyx_t_8 = __Pyx_PyInt_From_int(__pyx_v_quarter); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2756; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_d_2, __pyx_t_8); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2756; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_XDECREF_SET(__pyx_v_repl, __pyx_t_1); __pyx_t_1 = 0; break; /* "pandas/tslib.pyx":2757 * if i == 0: * repl = '%d' % quarter * elif i == 1: # %f, 2-digit year # <<<<<<<<<<<<<< * repl = '%.2d' % (year % 100) * elif i == 2: */ case 1: /* "pandas/tslib.pyx":2758 * repl = '%d' % quarter * elif i == 1: # %f, 2-digit year * repl = '%.2d' % (year % 100) # <<<<<<<<<<<<<< * elif i == 2: * repl = '%d' % year */ __pyx_t_1 = __Pyx_PyInt_From_long(__Pyx_mod_long(__pyx_v_year, 100)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2758; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_8 = __Pyx_PyString_Format(__pyx_kp_s_2d, __pyx_t_1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2758; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF_SET(__pyx_v_repl, __pyx_t_8); __pyx_t_8 = 0; break; /* "pandas/tslib.pyx":2759 * elif i == 1: # %f, 2-digit year * repl = '%.2d' % (year % 100) * elif i == 2: # <<<<<<<<<<<<<< * repl = '%d' % year * elif i == 3: */ case 2: /* "pandas/tslib.pyx":2760 * repl = '%.2d' % (year % 100) * elif i == 2: * repl = '%d' % year # <<<<<<<<<<<<<< * elif i == 3: * repl = '%03d' % (value % 1000) */ __pyx_t_8 = __Pyx_PyInt_From_int(__pyx_v_year); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2760; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_d_2, __pyx_t_8); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2760; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_XDECREF_SET(__pyx_v_repl, __pyx_t_1); __pyx_t_1 = 0; break; /* "pandas/tslib.pyx":2761 * elif i == 2: * repl = '%d' % year * elif i == 3: # <<<<<<<<<<<<<< * repl = '%03d' % (value % 1000) * elif i == 4: */ case 3: /* "pandas/tslib.pyx":2762 * repl = '%d' % year * elif i == 3: * repl = '%03d' % (value % 1000) # <<<<<<<<<<<<<< * elif i == 4: * repl = '%06d' % (value % 1000000) */ __pyx_t_1 = __Pyx_PyInt_From_npy_int64(__Pyx_mod___pyx_t_5numpy_int64_t(__pyx_v_value, 1000)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2762; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_8 = __Pyx_PyString_Format(__pyx_kp_s_03d, __pyx_t_1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2762; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF_SET(__pyx_v_repl, __pyx_t_8); __pyx_t_8 = 0; break; /* "pandas/tslib.pyx":2763 * elif i == 3: * repl = '%03d' % (value % 1000) * elif i == 4: # <<<<<<<<<<<<<< * repl = '%06d' % (value % 1000000) * elif i == 5: */ case 4: /* "pandas/tslib.pyx":2764 * repl = '%03d' % (value % 1000) * elif i == 4: * repl = '%06d' % (value % 1000000) # <<<<<<<<<<<<<< * elif i == 5: * repl = '%09d' % (value % 1000000000) */ __pyx_t_8 = __Pyx_PyInt_From_npy_int64(__Pyx_mod___pyx_t_5numpy_int64_t(__pyx_v_value, 1000000)); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2764; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_06d, __pyx_t_8); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2764; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_XDECREF_SET(__pyx_v_repl, __pyx_t_1); __pyx_t_1 = 0; break; /* "pandas/tslib.pyx":2765 * elif i == 4: * repl = '%06d' % (value % 1000000) * elif i == 5: # <<<<<<<<<<<<<< * repl = '%09d' % (value % 1000000000) * */ case 5: /* "pandas/tslib.pyx":2766 * repl = '%06d' % (value % 1000000) * elif i == 5: * repl = '%09d' % (value % 1000000000) # <<<<<<<<<<<<<< * * result = result.replace(str_extra_fmts[i], repl) */ __pyx_t_1 = __Pyx_PyInt_From_npy_int64(__Pyx_mod___pyx_t_5numpy_int64_t(__pyx_v_value, 1000000000)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2766; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_8 = __Pyx_PyString_Format(__pyx_kp_s_09d, __pyx_t_1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2766; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF_SET(__pyx_v_repl, __pyx_t_8); __pyx_t_8 = 0; break; default: break; } /* "pandas/tslib.pyx":2768 * repl = '%09d' % (value % 1000000000) * * result = result.replace(str_extra_fmts[i], repl) # <<<<<<<<<<<<<< * * if PY2: */ __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_result, __pyx_n_s_replace); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2768; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); if (unlikely(__pyx_v_6pandas_5tslib_str_extra_fmts == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2768; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_6pandas_5tslib_str_extra_fmts, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2768; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_1); if (unlikely(!__pyx_v_repl)) { __Pyx_RaiseUnboundLocalError("repl"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2768; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2768; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_repl); PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_repl); __Pyx_GIVEREF(__pyx_v_repl); __pyx_t_1 = 0; __pyx_t_1 = PyObject_Call(__pyx_t_8, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2768; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF_SET(__pyx_v_result, __pyx_t_1); __pyx_t_1 = 0; goto __pyx_L9; } __pyx_L9:; } /* "pandas/tslib.pyx":2770 * result = result.replace(str_extra_fmts[i], repl) * * if PY2: # <<<<<<<<<<<<<< * result = result.decode('utf-8', 'ignore') * */ __pyx_t_7 = (__pyx_v_6pandas_5tslib_PY2 != 0); if (__pyx_t_7) { /* "pandas/tslib.pyx":2771 * * if PY2: * result = result.decode('utf-8', 'ignore') # <<<<<<<<<<<<<< * * return result */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_result, __pyx_n_s_decode); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2771; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = PyObject_Call(__pyx_t_1, __pyx_tuple__61, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2771; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF_SET(__pyx_v_result, __pyx_t_4); __pyx_t_4 = 0; goto __pyx_L11; } __pyx_L11:; /* "pandas/tslib.pyx":2773 * result = result.decode('utf-8', 'ignore') * * return result # <<<<<<<<<<<<<< * * # period accessors */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_result); __pyx_r = __pyx_v_result; goto __pyx_L0; /* "pandas/tslib.pyx":2723 * cdef list str_extra_fmts = ["^`AB`^", "^`CD`^", "^`EF`^", "^`GH`^", "^`IJ`^", "^`KL`^"] * * cdef object _period_strftime(int64_t value, int freq, object fmt): # <<<<<<<<<<<<<< * import sys * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_8); __Pyx_AddTraceback("pandas.tslib._period_strftime", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_sys); __Pyx_XDECREF(__pyx_v_pat); __Pyx_XDECREF(__pyx_v_repl); __Pyx_XDECREF(__pyx_v_result); __Pyx_XDECREF(__pyx_v_found_pat); __Pyx_XDECREF(__pyx_v_fmt); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/tslib.pyx":2779 * ctypedef int (*accessor)(int64_t ordinal, int freq) except INT32_MIN * * def get_period_field(int code, int64_t value, int freq): # <<<<<<<<<<<<<< * cdef accessor f = _get_accessor_func(code) * if f is NULL: */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5tslib_89get_period_field(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5tslib_89get_period_field = {__Pyx_NAMESTR("get_period_field"), (PyCFunction)__pyx_pw_6pandas_5tslib_89get_period_field, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5tslib_89get_period_field(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { int __pyx_v_code; __pyx_t_5numpy_int64_t __pyx_v_value; int __pyx_v_freq; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("get_period_field (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_code,&__pyx_n_s_value,&__pyx_n_s_freq,0}; PyObject* values[3] = {0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_code)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_value)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("get_period_field", 1, 3, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2779; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_freq)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("get_period_field", 1, 3, 3, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2779; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "get_period_field") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2779; __pyx_clineno = __LINE__; goto __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_code = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_code == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2779; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_value = __Pyx_PyInt_As_npy_int64(values[1]); if (unlikely((__pyx_v_value == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2779; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_freq = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_freq == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2779; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("get_period_field", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2779; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.tslib.get_period_field", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pandas_5tslib_88get_period_field(__pyx_self, __pyx_v_code, __pyx_v_value, __pyx_v_freq); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5tslib_88get_period_field(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_code, __pyx_t_5numpy_int64_t __pyx_v_value, int __pyx_v_freq) { __pyx_t_6pandas_5tslib_accessor __pyx_v_f; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_t_4; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_period_field", 0); /* "pandas/tslib.pyx":2780 * * def get_period_field(int code, int64_t value, int freq): * cdef accessor f = _get_accessor_func(code) # <<<<<<<<<<<<<< * if f is NULL: * raise ValueError('Unrecognized period code: %d' % code) */ __pyx_v_f = __pyx_f_6pandas_5tslib__get_accessor_func(__pyx_v_code); /* "pandas/tslib.pyx":2781 * def get_period_field(int code, int64_t value, int freq): * cdef accessor f = _get_accessor_func(code) * if f is NULL: # <<<<<<<<<<<<<< * raise ValueError('Unrecognized period code: %d' % code) * return f(value, freq) */ __pyx_t_1 = ((__pyx_v_f == NULL) != 0); if (__pyx_t_1) { /* "pandas/tslib.pyx":2782 * cdef accessor f = _get_accessor_func(code) * if f is NULL: * raise ValueError('Unrecognized period code: %d' % code) # <<<<<<<<<<<<<< * return f(value, freq) * */ __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_code); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2782; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyString_Format(__pyx_kp_s_Unrecognized_period_code_d, __pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2782; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2782; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyObject_Call(__pyx_builtin_ValueError, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2782; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __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_filename = __pyx_f[0]; __pyx_lineno = 2782; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } /* "pandas/tslib.pyx":2783 * if f is NULL: * raise ValueError('Unrecognized period code: %d' % code) * return f(value, freq) # <<<<<<<<<<<<<< * * def get_period_field_arr(int code, ndarray[int64_t] arr, int freq): */ __Pyx_XDECREF(__pyx_r); __pyx_t_4 = __pyx_v_f(__pyx_v_value, __pyx_v_freq); if (unlikely(__pyx_t_4 == INT32_MIN)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2783; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_t_4); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2783; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; /* "pandas/tslib.pyx":2779 * ctypedef int (*accessor)(int64_t ordinal, int freq) except INT32_MIN * * def get_period_field(int code, int64_t value, int freq): # <<<<<<<<<<<<<< * cdef accessor f = _get_accessor_func(code) * if f is NULL: */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("pandas.tslib.get_period_field", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/tslib.pyx":2785 * return f(value, freq) * * def get_period_field_arr(int code, ndarray[int64_t] arr, int freq): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, sz */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5tslib_91get_period_field_arr(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5tslib_91get_period_field_arr = {__Pyx_NAMESTR("get_period_field_arr"), (PyCFunction)__pyx_pw_6pandas_5tslib_91get_period_field_arr, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5tslib_91get_period_field_arr(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { int __pyx_v_code; PyArrayObject *__pyx_v_arr = 0; int __pyx_v_freq; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("get_period_field_arr (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_code,&__pyx_n_s_arr,&__pyx_n_s_freq,0}; PyObject* values[3] = {0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_code)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_arr)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("get_period_field_arr", 1, 3, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2785; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_freq)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("get_period_field_arr", 1, 3, 3, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2785; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "get_period_field_arr") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2785; __pyx_clineno = __LINE__; goto __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_code = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_code == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2785; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_arr = ((PyArrayObject *)values[1]); __pyx_v_freq = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_freq == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2785; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("get_period_field_arr", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2785; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.tslib.get_period_field_arr", __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_filename = __pyx_f[0]; __pyx_lineno = 2785; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5tslib_90get_period_field_arr(__pyx_self, __pyx_v_code, __pyx_v_arr, __pyx_v_freq); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5tslib_90get_period_field_arr(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_code, PyArrayObject *__pyx_v_arr, int __pyx_v_freq) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_sz; PyArrayObject *__pyx_v_out = 0; __pyx_t_6pandas_5tslib_accessor __pyx_v_f; __Pyx_LocalBuf_ND __pyx_pybuffernd_arr; __Pyx_Buffer __pyx_pybuffer_arr; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; Py_ssize_t __pyx_t_4; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyArrayObject *__pyx_t_8 = NULL; int __pyx_t_9; PyObject *__pyx_t_10 = NULL; PyObject *__pyx_t_11 = NULL; PyObject *__pyx_t_12 = NULL; Py_ssize_t __pyx_t_13; Py_ssize_t __pyx_t_14; Py_ssize_t __pyx_t_15; int __pyx_t_16; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_period_field_arr", 0); __pyx_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; __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_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2785; __pyx_clineno = __LINE__; goto __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/tslib.pyx":2791 * accessor f * * f = _get_accessor_func(code) # <<<<<<<<<<<<<< * if f is NULL: * raise ValueError('Unrecognized period code: %d' % code) */ __pyx_v_f = __pyx_f_6pandas_5tslib__get_accessor_func(__pyx_v_code); /* "pandas/tslib.pyx":2792 * * f = _get_accessor_func(code) * if f is NULL: # <<<<<<<<<<<<<< * raise ValueError('Unrecognized period code: %d' % code) * */ __pyx_t_1 = ((__pyx_v_f == NULL) != 0); if (__pyx_t_1) { /* "pandas/tslib.pyx":2793 * f = _get_accessor_func(code) * if f is NULL: * raise ValueError('Unrecognized period code: %d' % code) # <<<<<<<<<<<<<< * * sz = len(arr) */ __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_code); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2793; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyString_Format(__pyx_kp_s_Unrecognized_period_code_d, __pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2793; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2793; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyObject_Call(__pyx_builtin_ValueError, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2793; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __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_filename = __pyx_f[0]; __pyx_lineno = 2793; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } /* "pandas/tslib.pyx":2795 * raise ValueError('Unrecognized period code: %d' % code) * * sz = len(arr) # <<<<<<<<<<<<<< * out = np.empty(sz, dtype=np.int64) * */ __pyx_t_4 = PyObject_Length(((PyObject *)__pyx_v_arr)); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2795; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_sz = __pyx_t_4; /* "pandas/tslib.pyx":2796 * * sz = len(arr) * out = np.empty(sz, dtype=np.int64) # <<<<<<<<<<<<<< * * for i in range(sz): */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2796; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_empty); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2796; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyInt_FromSsize_t(__pyx_v_sz); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2796; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2796; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2796; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2796; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_int64); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2796; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 2796; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_7 = PyObject_Call(__pyx_t_2, __pyx_t_5, __pyx_t_3); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2796; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (!(likely(((__pyx_t_7) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_7, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2796; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_8 = ((PyArrayObject *)__pyx_t_7); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __pyx_t_9 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_t_8, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_9 < 0)) { PyErr_Fetch(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12); 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_10); Py_XDECREF(__pyx_t_11); Py_XDECREF(__pyx_t_12); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_10, __pyx_t_11, __pyx_t_12); } } __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_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2796; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_8 = 0; __pyx_v_out = ((PyArrayObject *)__pyx_t_7); __pyx_t_7 = 0; /* "pandas/tslib.pyx":2798 * out = np.empty(sz, dtype=np.int64) * * for i in range(sz): # <<<<<<<<<<<<<< * out[i] = f(arr[i], freq) * */ __pyx_t_4 = __pyx_v_sz; for (__pyx_t_13 = 0; __pyx_t_13 < __pyx_t_4; __pyx_t_13+=1) { __pyx_v_i = __pyx_t_13; /* "pandas/tslib.pyx":2799 * * for i in range(sz): * out[i] = f(arr[i], freq) # <<<<<<<<<<<<<< * * return out */ __pyx_t_14 = __pyx_v_i; __pyx_t_9 = -1; if (__pyx_t_14 < 0) { __pyx_t_14 += __pyx_pybuffernd_arr.diminfo[0].shape; if (unlikely(__pyx_t_14 < 0)) __pyx_t_9 = 0; } else if (unlikely(__pyx_t_14 >= __pyx_pybuffernd_arr.diminfo[0].shape)) __pyx_t_9 = 0; if (unlikely(__pyx_t_9 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_9); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2799; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_9 = __pyx_v_f((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_arr.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_arr.diminfo[0].strides)), __pyx_v_freq); if (unlikely(__pyx_t_9 == INT32_MIN)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2799; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_15 = __pyx_v_i; __pyx_t_16 = -1; if (__pyx_t_15 < 0) { __pyx_t_15 += __pyx_pybuffernd_out.diminfo[0].shape; if (unlikely(__pyx_t_15 < 0)) __pyx_t_16 = 0; } else if (unlikely(__pyx_t_15 >= __pyx_pybuffernd_out.diminfo[0].shape)) __pyx_t_16 = 0; if (unlikely(__pyx_t_16 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_16); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2799; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_out.diminfo[0].strides) = __pyx_t_9; } /* "pandas/tslib.pyx":2801 * out[i] = f(arr[i], freq) * * return out # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_out)); __pyx_r = ((PyObject *)__pyx_v_out); goto __pyx_L0; /* "pandas/tslib.pyx":2785 * return f(value, freq) * * def get_period_field_arr(int code, ndarray[int64_t] arr, int freq): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, sz */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_arr.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.tslib.get_period_field_arr", __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_out.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_out); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/tslib.pyx":2805 * * * cdef accessor _get_accessor_func(int code): # <<<<<<<<<<<<<< * if code == 0: * return &pyear */ static __pyx_t_6pandas_5tslib_accessor __pyx_f_6pandas_5tslib__get_accessor_func(int __pyx_v_code) { __pyx_t_6pandas_5tslib_accessor __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_get_accessor_func", 0); /* "pandas/tslib.pyx":2826 * elif code == 9: * return &pday_of_year * elif code == 10: # <<<<<<<<<<<<<< * return &pweekday * return NULL */ switch (__pyx_v_code) { /* "pandas/tslib.pyx":2806 * * cdef accessor _get_accessor_func(int code): * if code == 0: # <<<<<<<<<<<<<< * return &pyear * elif code == 1: */ case 0: /* "pandas/tslib.pyx":2807 * cdef accessor _get_accessor_func(int code): * if code == 0: * return &pyear # <<<<<<<<<<<<<< * elif code == 1: * return &pqyear */ __pyx_r = (&pyear); goto __pyx_L0; break; /* "pandas/tslib.pyx":2808 * if code == 0: * return &pyear * elif code == 1: # <<<<<<<<<<<<<< * return &pqyear * elif code == 2: */ case 1: /* "pandas/tslib.pyx":2809 * return &pyear * elif code == 1: * return &pqyear # <<<<<<<<<<<<<< * elif code == 2: * return &pquarter */ __pyx_r = (&pqyear); goto __pyx_L0; break; /* "pandas/tslib.pyx":2810 * elif code == 1: * return &pqyear * elif code == 2: # <<<<<<<<<<<<<< * return &pquarter * elif code == 3: */ case 2: /* "pandas/tslib.pyx":2811 * return &pqyear * elif code == 2: * return &pquarter # <<<<<<<<<<<<<< * elif code == 3: * return &pmonth */ __pyx_r = (&pquarter); goto __pyx_L0; break; /* "pandas/tslib.pyx":2812 * elif code == 2: * return &pquarter * elif code == 3: # <<<<<<<<<<<<<< * return &pmonth * elif code == 4: */ case 3: /* "pandas/tslib.pyx":2813 * return &pquarter * elif code == 3: * return &pmonth # <<<<<<<<<<<<<< * elif code == 4: * return &pday */ __pyx_r = (&pmonth); goto __pyx_L0; break; /* "pandas/tslib.pyx":2814 * elif code == 3: * return &pmonth * elif code == 4: # <<<<<<<<<<<<<< * return &pday * elif code == 5: */ case 4: /* "pandas/tslib.pyx":2815 * return &pmonth * elif code == 4: * return &pday # <<<<<<<<<<<<<< * elif code == 5: * return &phour */ __pyx_r = (&pday); goto __pyx_L0; break; /* "pandas/tslib.pyx":2816 * elif code == 4: * return &pday * elif code == 5: # <<<<<<<<<<<<<< * return &phour * elif code == 6: */ case 5: /* "pandas/tslib.pyx":2817 * return &pday * elif code == 5: * return &phour # <<<<<<<<<<<<<< * elif code == 6: * return &pminute */ __pyx_r = (&phour); goto __pyx_L0; break; /* "pandas/tslib.pyx":2818 * elif code == 5: * return &phour * elif code == 6: # <<<<<<<<<<<<<< * return &pminute * elif code == 7: */ case 6: /* "pandas/tslib.pyx":2819 * return &phour * elif code == 6: * return &pminute # <<<<<<<<<<<<<< * elif code == 7: * return &psecond */ __pyx_r = (&pminute); goto __pyx_L0; break; /* "pandas/tslib.pyx":2820 * elif code == 6: * return &pminute * elif code == 7: # <<<<<<<<<<<<<< * return &psecond * elif code == 8: */ case 7: /* "pandas/tslib.pyx":2821 * return &pminute * elif code == 7: * return &psecond # <<<<<<<<<<<<<< * elif code == 8: * return &pweek */ __pyx_r = (&psecond); goto __pyx_L0; break; /* "pandas/tslib.pyx":2822 * elif code == 7: * return &psecond * elif code == 8: # <<<<<<<<<<<<<< * return &pweek * elif code == 9: */ case 8: /* "pandas/tslib.pyx":2823 * return &psecond * elif code == 8: * return &pweek # <<<<<<<<<<<<<< * elif code == 9: * return &pday_of_year */ __pyx_r = (&pweek); goto __pyx_L0; break; /* "pandas/tslib.pyx":2824 * elif code == 8: * return &pweek * elif code == 9: # <<<<<<<<<<<<<< * return &pday_of_year * elif code == 10: */ case 9: /* "pandas/tslib.pyx":2825 * return &pweek * elif code == 9: * return &pday_of_year # <<<<<<<<<<<<<< * elif code == 10: * return &pweekday */ __pyx_r = (&pday_of_year); goto __pyx_L0; break; /* "pandas/tslib.pyx":2826 * elif code == 9: * return &pday_of_year * elif code == 10: # <<<<<<<<<<<<<< * return &pweekday * return NULL */ case 10: /* "pandas/tslib.pyx":2827 * return &pday_of_year * elif code == 10: * return &pweekday # <<<<<<<<<<<<<< * return NULL * */ __pyx_r = (&pweekday); goto __pyx_L0; break; default: break; } /* "pandas/tslib.pyx":2828 * elif code == 10: * return &pweekday * return NULL # <<<<<<<<<<<<<< * * */ __pyx_r = NULL; goto __pyx_L0; /* "pandas/tslib.pyx":2805 * * * cdef accessor _get_accessor_func(int code): # <<<<<<<<<<<<<< * if code == 0: * return &pyear */ /* function exit code */ __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/tslib.pyx":2831 * * * def extract_ordinals(ndarray[object] values, freq): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = len(values) */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5tslib_93extract_ordinals(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5tslib_93extract_ordinals = {__Pyx_NAMESTR("extract_ordinals"), (PyCFunction)__pyx_pw_6pandas_5tslib_93extract_ordinals, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5tslib_93extract_ordinals(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_values = 0; PyObject *__pyx_v_freq = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("extract_ordinals (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_values,&__pyx_n_s_freq,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_values)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_freq)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("extract_ordinals", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2831; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "extract_ordinals") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2831; __pyx_clineno = __LINE__; goto __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_freq = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("extract_ordinals", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2831; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.tslib.extract_ordinals", __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_filename = __pyx_f[0]; __pyx_lineno = 2831; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5tslib_92extract_ordinals(__pyx_self, __pyx_v_values, __pyx_v_freq); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5tslib_92extract_ordinals(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyObject *__pyx_v_freq) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_n; PyArrayObject *__pyx_v_ordinals = 0; PyObject *__pyx_v_p = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_ordinals; __Pyx_Buffer __pyx_pybuffer_ordinals; __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; Py_ssize_t __pyx_t_8; Py_ssize_t __pyx_t_9; int __pyx_t_10; __pyx_t_5numpy_int64_t __pyx_t_11; Py_ssize_t __pyx_t_12; int __pyx_t_13; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("extract_ordinals", 0); __pyx_pybuffer_ordinals.pybuffer.buf = NULL; __pyx_pybuffer_ordinals.refcount = 0; __pyx_pybuffernd_ordinals.data = NULL; __pyx_pybuffernd_ordinals.rcbuffer = &__pyx_pybuffer_ordinals; __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_filename = __pyx_f[0]; __pyx_lineno = 2831; __pyx_clineno = __LINE__; goto __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/tslib.pyx":2833 * def extract_ordinals(ndarray[object] values, freq): * cdef: * Py_ssize_t i, n = len(values) # <<<<<<<<<<<<<< * ndarray[int64_t] ordinals = np.empty(n, dtype=np.int64) * object p */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2833; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/tslib.pyx":2834 * cdef: * Py_ssize_t i, n = len(values) * ndarray[int64_t] ordinals = np.empty(n, dtype=np.int64) # <<<<<<<<<<<<<< * object p * */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2834; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 2834; __pyx_clineno = __LINE__; goto __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_n); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2834; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2834; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2834; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2834; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_int64); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2834; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 2834; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyObject_Call(__pyx_t_3, __pyx_t_4, __pyx_t_2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2834; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 2834; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_7 = ((PyArrayObject *)__pyx_t_6); { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_ordinals.rcbuffer->pybuffer, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { __pyx_v_ordinals = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_ordinals.rcbuffer->pybuffer.buf = NULL; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2834; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } else {__pyx_pybuffernd_ordinals.diminfo[0].strides = __pyx_pybuffernd_ordinals.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_ordinals.diminfo[0].shape = __pyx_pybuffernd_ordinals.rcbuffer->pybuffer.shape[0]; } } __pyx_t_7 = 0; __pyx_v_ordinals = ((PyArrayObject *)__pyx_t_6); __pyx_t_6 = 0; /* "pandas/tslib.pyx":2837 * object p * * for i in range(n): # <<<<<<<<<<<<<< * p = values[i] * ordinals[i] = p.ordinal */ __pyx_t_1 = __pyx_v_n; for (__pyx_t_8 = 0; __pyx_t_8 < __pyx_t_1; __pyx_t_8+=1) { __pyx_v_i = __pyx_t_8; /* "pandas/tslib.pyx":2838 * * for i in range(n): * p = values[i] # <<<<<<<<<<<<<< * ordinals[i] = p.ordinal * if p.freq != freq: */ __pyx_t_9 = __pyx_v_i; __pyx_t_10 = -1; if (__pyx_t_9 < 0) { __pyx_t_9 += __pyx_pybuffernd_values.diminfo[0].shape; if (unlikely(__pyx_t_9 < 0)) __pyx_t_10 = 0; } else if (unlikely(__pyx_t_9 >= __pyx_pybuffernd_values.diminfo[0].shape)) __pyx_t_10 = 0; if (unlikely(__pyx_t_10 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_10); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2838; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_6 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_9, __pyx_pybuffernd_values.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_6); __Pyx_XDECREF_SET(__pyx_v_p, __pyx_t_6); __pyx_t_6 = 0; /* "pandas/tslib.pyx":2839 * for i in range(n): * p = values[i] * ordinals[i] = p.ordinal # <<<<<<<<<<<<<< * if p.freq != freq: * raise ValueError("%s is wrong freq" % p) */ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_p, __pyx_n_s_ordinal); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2839; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_11 = __Pyx_PyInt_As_npy_int64(__pyx_t_6); if (unlikely((__pyx_t_11 == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2839; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_12 = __pyx_v_i; __pyx_t_10 = -1; if (__pyx_t_12 < 0) { __pyx_t_12 += __pyx_pybuffernd_ordinals.diminfo[0].shape; if (unlikely(__pyx_t_12 < 0)) __pyx_t_10 = 0; } else if (unlikely(__pyx_t_12 >= __pyx_pybuffernd_ordinals.diminfo[0].shape)) __pyx_t_10 = 0; if (unlikely(__pyx_t_10 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_10); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2839; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_ordinals.rcbuffer->pybuffer.buf, __pyx_t_12, __pyx_pybuffernd_ordinals.diminfo[0].strides) = __pyx_t_11; /* "pandas/tslib.pyx":2840 * p = values[i] * ordinals[i] = p.ordinal * if p.freq != freq: # <<<<<<<<<<<<<< * raise ValueError("%s is wrong freq" % p) * */ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_p, __pyx_n_s_freq); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2840; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_2 = PyObject_RichCompare(__pyx_t_6, __pyx_v_freq, Py_NE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2840; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_13 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2840; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_13) { /* "pandas/tslib.pyx":2841 * ordinals[i] = p.ordinal * if p.freq != freq: * raise ValueError("%s is wrong freq" % p) # <<<<<<<<<<<<<< * * return ordinals */ __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_s_is_wrong_freq, __pyx_v_p); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2841; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2841; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2841; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2841; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } } /* "pandas/tslib.pyx":2843 * raise ValueError("%s is wrong freq" % p) * * return ordinals # <<<<<<<<<<<<<< * * cpdef resolution(ndarray[int64_t] stamps, tz=None): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_ordinals)); __pyx_r = ((PyObject *)__pyx_v_ordinals); goto __pyx_L0; /* "pandas/tslib.pyx":2831 * * * def extract_ordinals(ndarray[object] values, freq): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = len(values) */ /* 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_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_ordinals.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.tslib.extract_ordinals", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_ordinals.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_ordinals); __Pyx_XDECREF(__pyx_v_p); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/tslib.pyx":2845 * return ordinals * * cpdef resolution(ndarray[int64_t] stamps, tz=None): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = len(stamps) */ static PyObject *__pyx_pw_6pandas_5tslib_95resolution(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_6pandas_5tslib_resolution(PyArrayObject *__pyx_v_stamps, CYTHON_UNUSED int __pyx_skip_dispatch, struct __pyx_opt_args_6pandas_5tslib_resolution *__pyx_optional_args) { PyObject *__pyx_v_tz = ((PyObject *)Py_None); Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_n; pandas_datetimestruct __pyx_v_dts; int __pyx_v_reso; int __pyx_v_curr_reso; __Pyx_LocalBuf_ND __pyx_pybuffernd_stamps; __Pyx_Buffer __pyx_pybuffer_stamps; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; PyObject *__pyx_t_2 = NULL; int __pyx_t_3; int __pyx_t_4; int __pyx_t_5; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; Py_ssize_t __pyx_t_8; Py_ssize_t __pyx_t_9; Py_ssize_t __pyx_t_10; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("resolution", 0); if (__pyx_optional_args) { if (__pyx_optional_args->__pyx_n > 0) { __pyx_v_tz = __pyx_optional_args->tz; } } __Pyx_INCREF(__pyx_v_tz); __pyx_pybuffer_stamps.pybuffer.buf = NULL; __pyx_pybuffer_stamps.refcount = 0; __pyx_pybuffernd_stamps.data = NULL; __pyx_pybuffernd_stamps.rcbuffer = &__pyx_pybuffer_stamps; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_stamps.rcbuffer->pybuffer, (PyObject*)__pyx_v_stamps, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2845; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_stamps.diminfo[0].strides = __pyx_pybuffernd_stamps.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_stamps.diminfo[0].shape = __pyx_pybuffernd_stamps.rcbuffer->pybuffer.shape[0]; /* "pandas/tslib.pyx":2847 * cpdef resolution(ndarray[int64_t] stamps, tz=None): * cdef: * Py_ssize_t i, n = len(stamps) # <<<<<<<<<<<<<< * pandas_datetimestruct dts * int reso = D_RESO, curr_reso */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_stamps)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2847; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/tslib.pyx":2849 * Py_ssize_t i, n = len(stamps) * pandas_datetimestruct dts * int reso = D_RESO, curr_reso # <<<<<<<<<<<<<< * * if tz is not None: */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_D_RESO); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2849; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2849; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_reso = __pyx_t_3; /* "pandas/tslib.pyx":2851 * int reso = D_RESO, curr_reso * * if tz is not None: # <<<<<<<<<<<<<< * if isinstance(tz, basestring): * tz = pytz.timezone(tz) */ __pyx_t_4 = (__pyx_v_tz != Py_None); __pyx_t_5 = (__pyx_t_4 != 0); if (__pyx_t_5) { /* "pandas/tslib.pyx":2852 * * if tz is not None: * if isinstance(tz, basestring): # <<<<<<<<<<<<<< * tz = pytz.timezone(tz) * return _reso_local(stamps, tz) */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_basestring); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2852; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = PyObject_IsInstance(__pyx_v_tz, __pyx_t_2); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2852; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_4 = (__pyx_t_5 != 0); if (__pyx_t_4) { /* "pandas/tslib.pyx":2853 * if tz is not None: * if isinstance(tz, basestring): * tz = pytz.timezone(tz) # <<<<<<<<<<<<<< * return _reso_local(stamps, tz) * else: */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_pytz); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2853; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_timezone); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2853; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2853; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_tz); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_tz); __Pyx_GIVEREF(__pyx_v_tz); __pyx_t_7 = PyObject_Call(__pyx_t_6, __pyx_t_2, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2853; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF_SET(__pyx_v_tz, __pyx_t_7); __pyx_t_7 = 0; goto __pyx_L4; } __pyx_L4:; /* "pandas/tslib.pyx":2854 * if isinstance(tz, basestring): * tz = pytz.timezone(tz) * return _reso_local(stamps, tz) # <<<<<<<<<<<<<< * else: * for i in range(n): */ __Pyx_XDECREF(__pyx_r); __pyx_t_7 = __pyx_f_6pandas_5tslib__reso_local(((PyArrayObject *)__pyx_v_stamps), __pyx_v_tz); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2854; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_r = __pyx_t_7; __pyx_t_7 = 0; goto __pyx_L0; } /*else*/ { /* "pandas/tslib.pyx":2856 * return _reso_local(stamps, tz) * else: * for i in range(n): # <<<<<<<<<<<<<< * if stamps[i] == NPY_NAT: * continue */ __pyx_t_1 = __pyx_v_n; for (__pyx_t_8 = 0; __pyx_t_8 < __pyx_t_1; __pyx_t_8+=1) { __pyx_v_i = __pyx_t_8; /* "pandas/tslib.pyx":2857 * else: * for i in range(n): * if stamps[i] == NPY_NAT: # <<<<<<<<<<<<<< * continue * pandas_datetime_to_datetimestruct(stamps[i], PANDAS_FR_ns, &dts) */ __pyx_t_9 = __pyx_v_i; __pyx_t_3 = -1; if (__pyx_t_9 < 0) { __pyx_t_9 += __pyx_pybuffernd_stamps.diminfo[0].shape; if (unlikely(__pyx_t_9 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_9 >= __pyx_pybuffernd_stamps.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2857; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_4 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_stamps.rcbuffer->pybuffer.buf, __pyx_t_9, __pyx_pybuffernd_stamps.diminfo[0].strides)) == __pyx_v_6pandas_5tslib_NPY_NAT) != 0); if (__pyx_t_4) { /* "pandas/tslib.pyx":2858 * for i in range(n): * if stamps[i] == NPY_NAT: * continue # <<<<<<<<<<<<<< * pandas_datetime_to_datetimestruct(stamps[i], PANDAS_FR_ns, &dts) * curr_reso = _reso_stamp(&dts) */ goto __pyx_L5_continue; } /* "pandas/tslib.pyx":2859 * if stamps[i] == NPY_NAT: * continue * pandas_datetime_to_datetimestruct(stamps[i], PANDAS_FR_ns, &dts) # <<<<<<<<<<<<<< * curr_reso = _reso_stamp(&dts) * if curr_reso < reso: */ __pyx_t_10 = __pyx_v_i; __pyx_t_3 = -1; if (__pyx_t_10 < 0) { __pyx_t_10 += __pyx_pybuffernd_stamps.diminfo[0].shape; if (unlikely(__pyx_t_10 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_10 >= __pyx_pybuffernd_stamps.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2859; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } pandas_datetime_to_datetimestruct((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_stamps.rcbuffer->pybuffer.buf, __pyx_t_10, __pyx_pybuffernd_stamps.diminfo[0].strides)), PANDAS_FR_ns, (&__pyx_v_dts)); /* "pandas/tslib.pyx":2860 * continue * pandas_datetime_to_datetimestruct(stamps[i], PANDAS_FR_ns, &dts) * curr_reso = _reso_stamp(&dts) # <<<<<<<<<<<<<< * if curr_reso < reso: * reso = curr_reso */ __pyx_v_curr_reso = __pyx_f_6pandas_5tslib__reso_stamp((&__pyx_v_dts)); /* "pandas/tslib.pyx":2861 * pandas_datetime_to_datetimestruct(stamps[i], PANDAS_FR_ns, &dts) * curr_reso = _reso_stamp(&dts) * if curr_reso < reso: # <<<<<<<<<<<<<< * reso = curr_reso * return reso */ __pyx_t_4 = ((__pyx_v_curr_reso < __pyx_v_reso) != 0); if (__pyx_t_4) { /* "pandas/tslib.pyx":2862 * curr_reso = _reso_stamp(&dts) * if curr_reso < reso: * reso = curr_reso # <<<<<<<<<<<<<< * return reso * */ __pyx_v_reso = __pyx_v_curr_reso; goto __pyx_L8; } __pyx_L8:; __pyx_L5_continue:; } /* "pandas/tslib.pyx":2863 * if curr_reso < reso: * reso = curr_reso * return reso # <<<<<<<<<<<<<< * * US_RESO = 0 */ __Pyx_XDECREF(__pyx_r); __pyx_t_7 = __Pyx_PyInt_From_int(__pyx_v_reso); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2863; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_r = __pyx_t_7; __pyx_t_7 = 0; goto __pyx_L0; } /* "pandas/tslib.pyx":2845 * return ordinals * * cpdef resolution(ndarray[int64_t] stamps, tz=None): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = len(stamps) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_stamps.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.tslib.resolution", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_stamps.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF(__pyx_v_tz); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5tslib_95resolution(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_6pandas_5tslib_95resolution(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_stamps = 0; PyObject *__pyx_v_tz = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("resolution (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_stamps,&__pyx_n_s_tz,0}; PyObject* values[2] = {0,0}; values[1] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_stamps)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_tz); if (value) { values[1] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "resolution") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2845; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_stamps = ((PyArrayObject *)values[0]); __pyx_v_tz = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("resolution", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2845; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.tslib.resolution", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_stamps), __pyx_ptype_5numpy_ndarray, 1, "stamps", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2845; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5tslib_94resolution(__pyx_self, __pyx_v_stamps, __pyx_v_tz); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5tslib_94resolution(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_stamps, PyObject *__pyx_v_tz) { __Pyx_LocalBuf_ND __pyx_pybuffernd_stamps; __Pyx_Buffer __pyx_pybuffer_stamps; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; struct __pyx_opt_args_6pandas_5tslib_resolution __pyx_t_2; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("resolution", 0); __pyx_pybuffer_stamps.pybuffer.buf = NULL; __pyx_pybuffer_stamps.refcount = 0; __pyx_pybuffernd_stamps.data = NULL; __pyx_pybuffernd_stamps.rcbuffer = &__pyx_pybuffer_stamps; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_stamps.rcbuffer->pybuffer, (PyObject*)__pyx_v_stamps, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2845; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_stamps.diminfo[0].strides = __pyx_pybuffernd_stamps.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_stamps.diminfo[0].shape = __pyx_pybuffernd_stamps.rcbuffer->pybuffer.shape[0]; __Pyx_XDECREF(__pyx_r); __pyx_t_2.__pyx_n = 1; __pyx_t_2.tz = __pyx_v_tz; __pyx_t_1 = __pyx_f_6pandas_5tslib_resolution(__pyx_v_stamps, 0, &__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2845; __pyx_clineno = __LINE__; goto __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_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_stamps.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.tslib.resolution", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_stamps.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/tslib.pyx":2871 * D_RESO = 4 * * cdef inline int _reso_stamp(pandas_datetimestruct *dts): # <<<<<<<<<<<<<< * if dts.us != 0: * return US_RESO */ static CYTHON_INLINE int __pyx_f_6pandas_5tslib__reso_stamp(pandas_datetimestruct *__pyx_v_dts) { int __pyx_r; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; int __pyx_t_3; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_reso_stamp", 0); /* "pandas/tslib.pyx":2872 * * cdef inline int _reso_stamp(pandas_datetimestruct *dts): * if dts.us != 0: # <<<<<<<<<<<<<< * return US_RESO * elif dts.sec != 0: */ __pyx_t_1 = ((__pyx_v_dts->us != 0) != 0); if (__pyx_t_1) { /* "pandas/tslib.pyx":2873 * cdef inline int _reso_stamp(pandas_datetimestruct *dts): * if dts.us != 0: * return US_RESO # <<<<<<<<<<<<<< * elif dts.sec != 0: * return S_RESO */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_US_RESO); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2873; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2873; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_3; goto __pyx_L0; } /* "pandas/tslib.pyx":2874 * if dts.us != 0: * return US_RESO * elif dts.sec != 0: # <<<<<<<<<<<<<< * return S_RESO * elif dts.min != 0: */ __pyx_t_1 = ((__pyx_v_dts->sec != 0) != 0); if (__pyx_t_1) { /* "pandas/tslib.pyx":2875 * return US_RESO * elif dts.sec != 0: * return S_RESO # <<<<<<<<<<<<<< * elif dts.min != 0: * return T_RESO */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_S_RESO); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2875; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2875; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_3; goto __pyx_L0; } /* "pandas/tslib.pyx":2876 * elif dts.sec != 0: * return S_RESO * elif dts.min != 0: # <<<<<<<<<<<<<< * return T_RESO * elif dts.hour != 0: */ __pyx_t_1 = ((__pyx_v_dts->min != 0) != 0); if (__pyx_t_1) { /* "pandas/tslib.pyx":2877 * return S_RESO * elif dts.min != 0: * return T_RESO # <<<<<<<<<<<<<< * elif dts.hour != 0: * return H_RESO */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_T_RESO); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2877; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2877; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_3; goto __pyx_L0; } /* "pandas/tslib.pyx":2878 * elif dts.min != 0: * return T_RESO * elif dts.hour != 0: # <<<<<<<<<<<<<< * return H_RESO * return D_RESO */ __pyx_t_1 = ((__pyx_v_dts->hour != 0) != 0); if (__pyx_t_1) { /* "pandas/tslib.pyx":2879 * return T_RESO * elif dts.hour != 0: * return H_RESO # <<<<<<<<<<<<<< * return D_RESO * */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_H_RESO); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2879; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2879; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_3; goto __pyx_L0; } /* "pandas/tslib.pyx":2880 * elif dts.hour != 0: * return H_RESO * return D_RESO # <<<<<<<<<<<<<< * * cdef _reso_local(ndarray[int64_t] stamps, object tz): */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_D_RESO); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2880; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2880; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_3; goto __pyx_L0; /* "pandas/tslib.pyx":2871 * D_RESO = 4 * * cdef inline int _reso_stamp(pandas_datetimestruct *dts): # <<<<<<<<<<<<<< * if dts.us != 0: * return US_RESO */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_WriteUnraisable("pandas.tslib._reso_stamp", __pyx_clineno, __pyx_lineno, __pyx_filename, 0); __pyx_r = 0; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/tslib.pyx":2882 * return D_RESO * * cdef _reso_local(ndarray[int64_t] stamps, object tz): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t n = len(stamps) */ static PyObject *__pyx_f_6pandas_5tslib__reso_local(PyArrayObject *__pyx_v_stamps, PyObject *__pyx_v_tz) { Py_ssize_t __pyx_v_n; int __pyx_v_reso; int __pyx_v_curr_reso; PyArrayObject *__pyx_v_trans = 0; PyArrayObject *__pyx_v_deltas = 0; PyArrayObject *__pyx_v_pos = 0; pandas_datetimestruct __pyx_v_dts; Py_ssize_t __pyx_v_i; PyDateTime_DateTime *__pyx_v_dt = NULL; PyObject *__pyx_v_delta = NULL; PyObject *__pyx_v__pos = NULL; __Pyx_LocalBuf_ND __pyx_pybuffernd_deltas; __Pyx_Buffer __pyx_pybuffer_deltas; __Pyx_LocalBuf_ND __pyx_pybuffernd_pos; __Pyx_Buffer __pyx_pybuffer_pos; __Pyx_LocalBuf_ND __pyx_pybuffernd_stamps; __Pyx_Buffer __pyx_pybuffer_stamps; __Pyx_LocalBuf_ND __pyx_pybuffernd_trans; __Pyx_Buffer __pyx_pybuffer_trans; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; PyObject *__pyx_t_2 = NULL; int __pyx_t_3; int __pyx_t_4; Py_ssize_t __pyx_t_5; Py_ssize_t __pyx_t_6; Py_ssize_t __pyx_t_7; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; Py_ssize_t __pyx_t_10; Py_ssize_t __pyx_t_11; PyObject *__pyx_t_12 = NULL; PyObject *__pyx_t_13 = NULL; PyObject *__pyx_t_14 = NULL; PyObject *__pyx_t_15 = NULL; PyObject *__pyx_t_16 = NULL; Py_ssize_t __pyx_t_17; npy_datetime __pyx_t_18; PyArrayObject *__pyx_t_19 = NULL; PyObject *__pyx_t_20 = NULL; PyObject *__pyx_t_21 = NULL; PyObject *__pyx_t_22 = NULL; int __pyx_t_23; Py_ssize_t __pyx_t_24; Py_ssize_t __pyx_t_25; long __pyx_t_26; Py_ssize_t __pyx_t_27; Py_ssize_t __pyx_t_28; Py_ssize_t __pyx_t_29; __pyx_t_5numpy_int64_t __pyx_t_30; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_reso_local", 0); __pyx_pybuffer_trans.pybuffer.buf = NULL; __pyx_pybuffer_trans.refcount = 0; __pyx_pybuffernd_trans.data = NULL; __pyx_pybuffernd_trans.rcbuffer = &__pyx_pybuffer_trans; __pyx_pybuffer_deltas.pybuffer.buf = NULL; __pyx_pybuffer_deltas.refcount = 0; __pyx_pybuffernd_deltas.data = NULL; __pyx_pybuffernd_deltas.rcbuffer = &__pyx_pybuffer_deltas; __pyx_pybuffer_pos.pybuffer.buf = NULL; __pyx_pybuffer_pos.refcount = 0; __pyx_pybuffernd_pos.data = NULL; __pyx_pybuffernd_pos.rcbuffer = &__pyx_pybuffer_pos; __pyx_pybuffer_stamps.pybuffer.buf = NULL; __pyx_pybuffer_stamps.refcount = 0; __pyx_pybuffernd_stamps.data = NULL; __pyx_pybuffernd_stamps.rcbuffer = &__pyx_pybuffer_stamps; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_stamps.rcbuffer->pybuffer, (PyObject*)__pyx_v_stamps, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2882; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_stamps.diminfo[0].strides = __pyx_pybuffernd_stamps.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_stamps.diminfo[0].shape = __pyx_pybuffernd_stamps.rcbuffer->pybuffer.shape[0]; /* "pandas/tslib.pyx":2884 * cdef _reso_local(ndarray[int64_t] stamps, object tz): * cdef: * Py_ssize_t n = len(stamps) # <<<<<<<<<<<<<< * int reso = D_RESO, curr_reso * ndarray[int64_t] trans, deltas, pos */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_stamps)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2884; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/tslib.pyx":2885 * cdef: * Py_ssize_t n = len(stamps) * int reso = D_RESO, curr_reso # <<<<<<<<<<<<<< * ndarray[int64_t] trans, deltas, pos * pandas_datetimestruct dts */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_D_RESO); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2885; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2885; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_reso = __pyx_t_3; /* "pandas/tslib.pyx":2889 * pandas_datetimestruct dts * * if _is_utc(tz): # <<<<<<<<<<<<<< * for i in range(n): * if stamps[i] == NPY_NAT: */ __pyx_t_4 = (__pyx_f_6pandas_5tslib__is_utc(__pyx_v_tz) != 0); if (__pyx_t_4) { /* "pandas/tslib.pyx":2890 * * if _is_utc(tz): * for i in range(n): # <<<<<<<<<<<<<< * if stamps[i] == NPY_NAT: * continue */ __pyx_t_1 = __pyx_v_n; for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_1; __pyx_t_5+=1) { __pyx_v_i = __pyx_t_5; /* "pandas/tslib.pyx":2891 * if _is_utc(tz): * for i in range(n): * if stamps[i] == NPY_NAT: # <<<<<<<<<<<<<< * continue * pandas_datetime_to_datetimestruct(stamps[i], PANDAS_FR_ns, &dts) */ __pyx_t_6 = __pyx_v_i; __pyx_t_3 = -1; if (__pyx_t_6 < 0) { __pyx_t_6 += __pyx_pybuffernd_stamps.diminfo[0].shape; if (unlikely(__pyx_t_6 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_6 >= __pyx_pybuffernd_stamps.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2891; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_4 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_stamps.rcbuffer->pybuffer.buf, __pyx_t_6, __pyx_pybuffernd_stamps.diminfo[0].strides)) == __pyx_v_6pandas_5tslib_NPY_NAT) != 0); if (__pyx_t_4) { /* "pandas/tslib.pyx":2892 * for i in range(n): * if stamps[i] == NPY_NAT: * continue # <<<<<<<<<<<<<< * pandas_datetime_to_datetimestruct(stamps[i], PANDAS_FR_ns, &dts) * curr_reso = _reso_stamp(&dts) */ goto __pyx_L4_continue; } /* "pandas/tslib.pyx":2893 * if stamps[i] == NPY_NAT: * continue * pandas_datetime_to_datetimestruct(stamps[i], PANDAS_FR_ns, &dts) # <<<<<<<<<<<<<< * curr_reso = _reso_stamp(&dts) * if curr_reso < reso: */ __pyx_t_7 = __pyx_v_i; __pyx_t_3 = -1; if (__pyx_t_7 < 0) { __pyx_t_7 += __pyx_pybuffernd_stamps.diminfo[0].shape; if (unlikely(__pyx_t_7 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_7 >= __pyx_pybuffernd_stamps.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2893; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } pandas_datetime_to_datetimestruct((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_stamps.rcbuffer->pybuffer.buf, __pyx_t_7, __pyx_pybuffernd_stamps.diminfo[0].strides)), PANDAS_FR_ns, (&__pyx_v_dts)); /* "pandas/tslib.pyx":2894 * continue * pandas_datetime_to_datetimestruct(stamps[i], PANDAS_FR_ns, &dts) * curr_reso = _reso_stamp(&dts) # <<<<<<<<<<<<<< * if curr_reso < reso: * reso = curr_reso */ __pyx_v_curr_reso = __pyx_f_6pandas_5tslib__reso_stamp((&__pyx_v_dts)); /* "pandas/tslib.pyx":2895 * pandas_datetime_to_datetimestruct(stamps[i], PANDAS_FR_ns, &dts) * curr_reso = _reso_stamp(&dts) * if curr_reso < reso: # <<<<<<<<<<<<<< * reso = curr_reso * elif _is_tzlocal(tz): */ __pyx_t_4 = ((__pyx_v_curr_reso < __pyx_v_reso) != 0); if (__pyx_t_4) { /* "pandas/tslib.pyx":2896 * curr_reso = _reso_stamp(&dts) * if curr_reso < reso: * reso = curr_reso # <<<<<<<<<<<<<< * elif _is_tzlocal(tz): * for i in range(n): */ __pyx_v_reso = __pyx_v_curr_reso; goto __pyx_L7; } __pyx_L7:; __pyx_L4_continue:; } goto __pyx_L3; } /* "pandas/tslib.pyx":2897 * if curr_reso < reso: * reso = curr_reso * elif _is_tzlocal(tz): # <<<<<<<<<<<<<< * for i in range(n): * if stamps[i] == NPY_NAT: */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_is_tzlocal); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2897; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2897; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_INCREF(__pyx_v_tz); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_v_tz); __Pyx_GIVEREF(__pyx_v_tz); __pyx_t_9 = PyObject_Call(__pyx_t_2, __pyx_t_8, NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2897; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2897; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; if (__pyx_t_4) { /* "pandas/tslib.pyx":2898 * reso = curr_reso * elif _is_tzlocal(tz): * for i in range(n): # <<<<<<<<<<<<<< * if stamps[i] == NPY_NAT: * continue */ __pyx_t_1 = __pyx_v_n; for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_1; __pyx_t_5+=1) { __pyx_v_i = __pyx_t_5; /* "pandas/tslib.pyx":2899 * elif _is_tzlocal(tz): * for i in range(n): * if stamps[i] == NPY_NAT: # <<<<<<<<<<<<<< * continue * pandas_datetime_to_datetimestruct(stamps[i], PANDAS_FR_ns, */ __pyx_t_10 = __pyx_v_i; __pyx_t_3 = -1; if (__pyx_t_10 < 0) { __pyx_t_10 += __pyx_pybuffernd_stamps.diminfo[0].shape; if (unlikely(__pyx_t_10 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_10 >= __pyx_pybuffernd_stamps.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2899; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_4 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_stamps.rcbuffer->pybuffer.buf, __pyx_t_10, __pyx_pybuffernd_stamps.diminfo[0].strides)) == __pyx_v_6pandas_5tslib_NPY_NAT) != 0); if (__pyx_t_4) { /* "pandas/tslib.pyx":2900 * for i in range(n): * if stamps[i] == NPY_NAT: * continue # <<<<<<<<<<<<<< * pandas_datetime_to_datetimestruct(stamps[i], PANDAS_FR_ns, * &dts) */ goto __pyx_L8_continue; } /* "pandas/tslib.pyx":2901 * if stamps[i] == NPY_NAT: * continue * pandas_datetime_to_datetimestruct(stamps[i], PANDAS_FR_ns, # <<<<<<<<<<<<<< * &dts) * dt = datetime(dts.year, dts.month, dts.day, dts.hour, */ __pyx_t_11 = __pyx_v_i; __pyx_t_3 = -1; if (__pyx_t_11 < 0) { __pyx_t_11 += __pyx_pybuffernd_stamps.diminfo[0].shape; if (unlikely(__pyx_t_11 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_11 >= __pyx_pybuffernd_stamps.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2901; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } /* "pandas/tslib.pyx":2902 * continue * pandas_datetime_to_datetimestruct(stamps[i], PANDAS_FR_ns, * &dts) # <<<<<<<<<<<<<< * dt = datetime(dts.year, dts.month, dts.day, dts.hour, * dts.min, dts.sec, dts.us, tz) */ pandas_datetime_to_datetimestruct((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_stamps.rcbuffer->pybuffer.buf, __pyx_t_11, __pyx_pybuffernd_stamps.diminfo[0].strides)), PANDAS_FR_ns, (&__pyx_v_dts)); /* "pandas/tslib.pyx":2903 * pandas_datetime_to_datetimestruct(stamps[i], PANDAS_FR_ns, * &dts) * dt = datetime(dts.year, dts.month, dts.day, dts.hour, # <<<<<<<<<<<<<< * dts.min, dts.sec, dts.us, tz) * delta = int(total_seconds(_get_utcoffset(tz, dt))) * 1000000000 */ __pyx_t_9 = __Pyx_PyInt_From_npy_int64(__pyx_v_dts.year); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2903; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_t_8 = __Pyx_PyInt_From_npy_int32(__pyx_v_dts.month); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2903; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_2 = __Pyx_PyInt_From_npy_int32(__pyx_v_dts.day); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2903; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_12 = __Pyx_PyInt_From_npy_int32(__pyx_v_dts.hour); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2903; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); /* "pandas/tslib.pyx":2904 * &dts) * dt = datetime(dts.year, dts.month, dts.day, dts.hour, * dts.min, dts.sec, dts.us, tz) # <<<<<<<<<<<<<< * delta = int(total_seconds(_get_utcoffset(tz, dt))) * 1000000000 * pandas_datetime_to_datetimestruct(stamps[i] + delta, */ __pyx_t_13 = __Pyx_PyInt_From_npy_int32(__pyx_v_dts.min); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2904; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __pyx_t_14 = __Pyx_PyInt_From_npy_int32(__pyx_v_dts.sec); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2904; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_14); __pyx_t_15 = __Pyx_PyInt_From_npy_int32(__pyx_v_dts.us); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2904; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_15); /* "pandas/tslib.pyx":2903 * pandas_datetime_to_datetimestruct(stamps[i], PANDAS_FR_ns, * &dts) * dt = datetime(dts.year, dts.month, dts.day, dts.hour, # <<<<<<<<<<<<<< * dts.min, dts.sec, dts.us, tz) * delta = int(total_seconds(_get_utcoffset(tz, dt))) * 1000000000 */ __pyx_t_16 = PyTuple_New(8); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2903; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_16); PyTuple_SET_ITEM(__pyx_t_16, 0, __pyx_t_9); __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_16, 1, __pyx_t_8); __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_16, 2, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_16, 3, __pyx_t_12); __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_16, 4, __pyx_t_13); __Pyx_GIVEREF(__pyx_t_13); PyTuple_SET_ITEM(__pyx_t_16, 5, __pyx_t_14); __Pyx_GIVEREF(__pyx_t_14); PyTuple_SET_ITEM(__pyx_t_16, 6, __pyx_t_15); __Pyx_GIVEREF(__pyx_t_15); __Pyx_INCREF(__pyx_v_tz); PyTuple_SET_ITEM(__pyx_t_16, 7, __pyx_v_tz); __Pyx_GIVEREF(__pyx_v_tz); __pyx_t_9 = 0; __pyx_t_8 = 0; __pyx_t_2 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_15 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_8datetime_datetime)), __pyx_t_16, NULL); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2903; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_15); __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; __Pyx_XDECREF_SET(__pyx_v_dt, ((PyDateTime_DateTime *)__pyx_t_15)); __pyx_t_15 = 0; /* "pandas/tslib.pyx":2905 * dt = datetime(dts.year, dts.month, dts.day, dts.hour, * dts.min, dts.sec, dts.us, tz) * delta = int(total_seconds(_get_utcoffset(tz, dt))) * 1000000000 # <<<<<<<<<<<<<< * pandas_datetime_to_datetimestruct(stamps[i] + delta, * PANDAS_FR_ns, &dts) */ __pyx_t_15 = __pyx_f_6pandas_5tslib__get_utcoffset(__pyx_v_tz, ((PyObject *)__pyx_v_dt), 0); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2905; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_15); __pyx_t_16 = PyFloat_FromDouble(__pyx_f_6pandas_5tslib_total_seconds(__pyx_t_15)); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2905; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_16); __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; __pyx_t_15 = PyTuple_New(1); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2905; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_15); PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_t_16); __Pyx_GIVEREF(__pyx_t_16); __pyx_t_16 = 0; __pyx_t_16 = PyObject_Call(((PyObject *)((PyObject*)(&PyInt_Type))), __pyx_t_15, NULL); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2905; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_16); __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; __pyx_t_15 = PyNumber_Multiply(__pyx_t_16, __pyx_int_1000000000); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2905; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_15); __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; __Pyx_XDECREF_SET(__pyx_v_delta, __pyx_t_15); __pyx_t_15 = 0; /* "pandas/tslib.pyx":2906 * dts.min, dts.sec, dts.us, tz) * delta = int(total_seconds(_get_utcoffset(tz, dt))) * 1000000000 * pandas_datetime_to_datetimestruct(stamps[i] + delta, # <<<<<<<<<<<<<< * PANDAS_FR_ns, &dts) * curr_reso = _reso_stamp(&dts) */ __pyx_t_17 = __pyx_v_i; __pyx_t_3 = -1; if (__pyx_t_17 < 0) { __pyx_t_17 += __pyx_pybuffernd_stamps.diminfo[0].shape; if (unlikely(__pyx_t_17 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_17 >= __pyx_pybuffernd_stamps.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2906; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_15 = __Pyx_PyInt_From_npy_int64((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_stamps.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_stamps.diminfo[0].strides))); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2906; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_15); __pyx_t_16 = PyNumber_Add(__pyx_t_15, __pyx_v_delta); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2906; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_16); __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; __pyx_t_18 = __Pyx_PyInt_As_npy_int64(__pyx_t_16); if (unlikely((__pyx_t_18 == (npy_datetime)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2906; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; /* "pandas/tslib.pyx":2907 * delta = int(total_seconds(_get_utcoffset(tz, dt))) * 1000000000 * pandas_datetime_to_datetimestruct(stamps[i] + delta, * PANDAS_FR_ns, &dts) # <<<<<<<<<<<<<< * curr_reso = _reso_stamp(&dts) * if curr_reso < reso: */ pandas_datetime_to_datetimestruct(__pyx_t_18, PANDAS_FR_ns, (&__pyx_v_dts)); /* "pandas/tslib.pyx":2908 * pandas_datetime_to_datetimestruct(stamps[i] + delta, * PANDAS_FR_ns, &dts) * curr_reso = _reso_stamp(&dts) # <<<<<<<<<<<<<< * if curr_reso < reso: * reso = curr_reso */ __pyx_v_curr_reso = __pyx_f_6pandas_5tslib__reso_stamp((&__pyx_v_dts)); /* "pandas/tslib.pyx":2909 * PANDAS_FR_ns, &dts) * curr_reso = _reso_stamp(&dts) * if curr_reso < reso: # <<<<<<<<<<<<<< * reso = curr_reso * else: */ __pyx_t_4 = ((__pyx_v_curr_reso < __pyx_v_reso) != 0); if (__pyx_t_4) { /* "pandas/tslib.pyx":2910 * curr_reso = _reso_stamp(&dts) * if curr_reso < reso: * reso = curr_reso # <<<<<<<<<<<<<< * else: * # Adjust datetime64 timestamp, recompute datetimestruct */ __pyx_v_reso = __pyx_v_curr_reso; goto __pyx_L11; } __pyx_L11:; __pyx_L8_continue:; } goto __pyx_L3; } /*else*/ { /* "pandas/tslib.pyx":2913 * else: * # Adjust datetime64 timestamp, recompute datetimestruct * trans = _get_transitions(tz) # <<<<<<<<<<<<<< * deltas = _get_deltas(tz) * _pos = trans.searchsorted(stamps, side='right') - 1 */ __pyx_t_16 = __Pyx_GetModuleGlobalName(__pyx_n_s_get_transitions); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2913; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_16); __pyx_t_15 = PyTuple_New(1); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2913; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_15); __Pyx_INCREF(__pyx_v_tz); PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_v_tz); __Pyx_GIVEREF(__pyx_v_tz); __pyx_t_14 = PyObject_Call(__pyx_t_16, __pyx_t_15, NULL); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2913; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_14); __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; if (!(likely(((__pyx_t_14) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_14, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2913; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_19 = ((PyArrayObject *)__pyx_t_14); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_trans.rcbuffer->pybuffer); __pyx_t_3 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_trans.rcbuffer->pybuffer, (PyObject*)__pyx_t_19, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_3 < 0)) { PyErr_Fetch(&__pyx_t_20, &__pyx_t_21, &__pyx_t_22); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_trans.rcbuffer->pybuffer, (PyObject*)__pyx_v_trans, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_20); Py_XDECREF(__pyx_t_21); Py_XDECREF(__pyx_t_22); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_20, __pyx_t_21, __pyx_t_22); } } __pyx_pybuffernd_trans.diminfo[0].strides = __pyx_pybuffernd_trans.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_trans.diminfo[0].shape = __pyx_pybuffernd_trans.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2913; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_19 = 0; __pyx_v_trans = ((PyArrayObject *)__pyx_t_14); __pyx_t_14 = 0; /* "pandas/tslib.pyx":2914 * # Adjust datetime64 timestamp, recompute datetimestruct * trans = _get_transitions(tz) * deltas = _get_deltas(tz) # <<<<<<<<<<<<<< * _pos = trans.searchsorted(stamps, side='right') - 1 * if _pos.dtype != np.int64: */ __pyx_t_14 = __Pyx_GetModuleGlobalName(__pyx_n_s_get_deltas); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2914; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_14); __pyx_t_15 = PyTuple_New(1); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2914; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_15); __Pyx_INCREF(__pyx_v_tz); PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_v_tz); __Pyx_GIVEREF(__pyx_v_tz); __pyx_t_16 = PyObject_Call(__pyx_t_14, __pyx_t_15, NULL); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2914; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_16); __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; if (!(likely(((__pyx_t_16) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_16, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2914; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_19 = ((PyArrayObject *)__pyx_t_16); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_deltas.rcbuffer->pybuffer); __pyx_t_3 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_deltas.rcbuffer->pybuffer, (PyObject*)__pyx_t_19, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_3 < 0)) { PyErr_Fetch(&__pyx_t_22, &__pyx_t_21, &__pyx_t_20); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_deltas.rcbuffer->pybuffer, (PyObject*)__pyx_v_deltas, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_22); Py_XDECREF(__pyx_t_21); Py_XDECREF(__pyx_t_20); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_22, __pyx_t_21, __pyx_t_20); } } __pyx_pybuffernd_deltas.diminfo[0].strides = __pyx_pybuffernd_deltas.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_deltas.diminfo[0].shape = __pyx_pybuffernd_deltas.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2914; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_19 = 0; __pyx_v_deltas = ((PyArrayObject *)__pyx_t_16); __pyx_t_16 = 0; /* "pandas/tslib.pyx":2915 * trans = _get_transitions(tz) * deltas = _get_deltas(tz) * _pos = trans.searchsorted(stamps, side='right') - 1 # <<<<<<<<<<<<<< * if _pos.dtype != np.int64: * _pos = _pos.astype(np.int64) */ __pyx_t_16 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_trans), __pyx_n_s_searchsorted); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2915; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_16); __pyx_t_15 = PyTuple_New(1); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2915; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_15); __Pyx_INCREF(((PyObject *)__pyx_v_stamps)); PyTuple_SET_ITEM(__pyx_t_15, 0, ((PyObject *)__pyx_v_stamps)); __Pyx_GIVEREF(((PyObject *)__pyx_v_stamps)); __pyx_t_14 = PyDict_New(); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2915; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_14); if (PyDict_SetItem(__pyx_t_14, __pyx_n_s_side, __pyx_n_s_right) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2915; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_13 = PyObject_Call(__pyx_t_16, __pyx_t_15, __pyx_t_14); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2915; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; __pyx_t_14 = PyNumber_Subtract(__pyx_t_13, __pyx_int_1); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2915; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_14); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_v__pos = __pyx_t_14; __pyx_t_14 = 0; /* "pandas/tslib.pyx":2916 * deltas = _get_deltas(tz) * _pos = trans.searchsorted(stamps, side='right') - 1 * if _pos.dtype != np.int64: # <<<<<<<<<<<<<< * _pos = _pos.astype(np.int64) * pos = _pos */ __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_v__pos, __pyx_n_s_dtype); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2916; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_14); __pyx_t_13 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2916; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_t_13, __pyx_n_s_int64); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2916; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_15); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_13 = PyObject_RichCompare(__pyx_t_14, __pyx_t_15, Py_NE); __Pyx_XGOTREF(__pyx_t_13); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2916; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_13); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2916; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; if (__pyx_t_4) { /* "pandas/tslib.pyx":2917 * _pos = trans.searchsorted(stamps, side='right') - 1 * if _pos.dtype != np.int64: * _pos = _pos.astype(np.int64) # <<<<<<<<<<<<<< * pos = _pos * */ __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_v__pos, __pyx_n_s_astype); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2917; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __pyx_t_15 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2917; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_15); __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_t_15, __pyx_n_s_int64); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2917; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_14); __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; __pyx_t_15 = PyTuple_New(1); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2917; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_15); PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_t_14); __Pyx_GIVEREF(__pyx_t_14); __pyx_t_14 = 0; __pyx_t_14 = PyObject_Call(__pyx_t_13, __pyx_t_15, NULL); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2917; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_14); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; __Pyx_DECREF_SET(__pyx_v__pos, __pyx_t_14); __pyx_t_14 = 0; goto __pyx_L12; } __pyx_L12:; /* "pandas/tslib.pyx":2918 * if _pos.dtype != np.int64: * _pos = _pos.astype(np.int64) * pos = _pos # <<<<<<<<<<<<<< * * # statictzinfo */ if (!(likely(((__pyx_v__pos) == Py_None) || likely(__Pyx_TypeTest(__pyx_v__pos, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2918; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_14 = __pyx_v__pos; __Pyx_INCREF(__pyx_t_14); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_pos.rcbuffer->pybuffer); __pyx_t_3 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_pos.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_14), &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_3 < 0)) { PyErr_Fetch(&__pyx_t_20, &__pyx_t_21, &__pyx_t_22); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_pos.rcbuffer->pybuffer, (PyObject*)__pyx_v_pos, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_20); Py_XDECREF(__pyx_t_21); Py_XDECREF(__pyx_t_22); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_20, __pyx_t_21, __pyx_t_22); } } __pyx_pybuffernd_pos.diminfo[0].strides = __pyx_pybuffernd_pos.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_pos.diminfo[0].shape = __pyx_pybuffernd_pos.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2918; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_pos = ((PyArrayObject *)__pyx_t_14); __pyx_t_14 = 0; /* "pandas/tslib.pyx":2921 * * # statictzinfo * if not hasattr(tz, '_transition_info'): # <<<<<<<<<<<<<< * for i in range(n): * if stamps[i] == NPY_NAT: */ __pyx_t_4 = PyObject_HasAttr(__pyx_v_tz, __pyx_n_s_transition_info); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2921; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_23 = ((!(__pyx_t_4 != 0)) != 0); if (__pyx_t_23) { /* "pandas/tslib.pyx":2922 * # statictzinfo * if not hasattr(tz, '_transition_info'): * for i in range(n): # <<<<<<<<<<<<<< * if stamps[i] == NPY_NAT: * continue */ __pyx_t_1 = __pyx_v_n; for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_1; __pyx_t_5+=1) { __pyx_v_i = __pyx_t_5; /* "pandas/tslib.pyx":2923 * if not hasattr(tz, '_transition_info'): * for i in range(n): * if stamps[i] == NPY_NAT: # <<<<<<<<<<<<<< * continue * pandas_datetime_to_datetimestruct(stamps[i] + deltas[0], */ __pyx_t_24 = __pyx_v_i; __pyx_t_3 = -1; if (__pyx_t_24 < 0) { __pyx_t_24 += __pyx_pybuffernd_stamps.diminfo[0].shape; if (unlikely(__pyx_t_24 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_24 >= __pyx_pybuffernd_stamps.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2923; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_23 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_stamps.rcbuffer->pybuffer.buf, __pyx_t_24, __pyx_pybuffernd_stamps.diminfo[0].strides)) == __pyx_v_6pandas_5tslib_NPY_NAT) != 0); if (__pyx_t_23) { /* "pandas/tslib.pyx":2924 * for i in range(n): * if stamps[i] == NPY_NAT: * continue # <<<<<<<<<<<<<< * pandas_datetime_to_datetimestruct(stamps[i] + deltas[0], * PANDAS_FR_ns, &dts) */ goto __pyx_L14_continue; } /* "pandas/tslib.pyx":2925 * if stamps[i] == NPY_NAT: * continue * pandas_datetime_to_datetimestruct(stamps[i] + deltas[0], # <<<<<<<<<<<<<< * PANDAS_FR_ns, &dts) * curr_reso = _reso_stamp(&dts) */ __pyx_t_25 = __pyx_v_i; __pyx_t_3 = -1; if (__pyx_t_25 < 0) { __pyx_t_25 += __pyx_pybuffernd_stamps.diminfo[0].shape; if (unlikely(__pyx_t_25 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_25 >= __pyx_pybuffernd_stamps.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2925; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_26 = 0; __pyx_t_3 = -1; if (__pyx_t_26 < 0) { __pyx_t_26 += __pyx_pybuffernd_deltas.diminfo[0].shape; if (unlikely(__pyx_t_26 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_26 >= __pyx_pybuffernd_deltas.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2925; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } /* "pandas/tslib.pyx":2926 * continue * pandas_datetime_to_datetimestruct(stamps[i] + deltas[0], * PANDAS_FR_ns, &dts) # <<<<<<<<<<<<<< * curr_reso = _reso_stamp(&dts) * if curr_reso < reso: */ pandas_datetime_to_datetimestruct(((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_stamps.rcbuffer->pybuffer.buf, __pyx_t_25, __pyx_pybuffernd_stamps.diminfo[0].strides)) + (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_deltas.rcbuffer->pybuffer.buf, __pyx_t_26, __pyx_pybuffernd_deltas.diminfo[0].strides))), PANDAS_FR_ns, (&__pyx_v_dts)); /* "pandas/tslib.pyx":2927 * pandas_datetime_to_datetimestruct(stamps[i] + deltas[0], * PANDAS_FR_ns, &dts) * curr_reso = _reso_stamp(&dts) # <<<<<<<<<<<<<< * if curr_reso < reso: * reso = curr_reso */ __pyx_v_curr_reso = __pyx_f_6pandas_5tslib__reso_stamp((&__pyx_v_dts)); /* "pandas/tslib.pyx":2928 * PANDAS_FR_ns, &dts) * curr_reso = _reso_stamp(&dts) * if curr_reso < reso: # <<<<<<<<<<<<<< * reso = curr_reso * else: */ __pyx_t_23 = ((__pyx_v_curr_reso < __pyx_v_reso) != 0); if (__pyx_t_23) { /* "pandas/tslib.pyx":2929 * curr_reso = _reso_stamp(&dts) * if curr_reso < reso: * reso = curr_reso # <<<<<<<<<<<<<< * else: * for i in range(n): */ __pyx_v_reso = __pyx_v_curr_reso; goto __pyx_L17; } __pyx_L17:; __pyx_L14_continue:; } goto __pyx_L13; } /*else*/ { /* "pandas/tslib.pyx":2931 * reso = curr_reso * else: * for i in range(n): # <<<<<<<<<<<<<< * if stamps[i] == NPY_NAT: * continue */ __pyx_t_1 = __pyx_v_n; for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_1; __pyx_t_5+=1) { __pyx_v_i = __pyx_t_5; /* "pandas/tslib.pyx":2932 * else: * for i in range(n): * if stamps[i] == NPY_NAT: # <<<<<<<<<<<<<< * continue * pandas_datetime_to_datetimestruct(stamps[i] + deltas[pos[i]], */ __pyx_t_27 = __pyx_v_i; __pyx_t_3 = -1; if (__pyx_t_27 < 0) { __pyx_t_27 += __pyx_pybuffernd_stamps.diminfo[0].shape; if (unlikely(__pyx_t_27 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_27 >= __pyx_pybuffernd_stamps.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2932; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_23 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_stamps.rcbuffer->pybuffer.buf, __pyx_t_27, __pyx_pybuffernd_stamps.diminfo[0].strides)) == __pyx_v_6pandas_5tslib_NPY_NAT) != 0); if (__pyx_t_23) { /* "pandas/tslib.pyx":2933 * for i in range(n): * if stamps[i] == NPY_NAT: * continue # <<<<<<<<<<<<<< * pandas_datetime_to_datetimestruct(stamps[i] + deltas[pos[i]], * PANDAS_FR_ns, &dts) */ goto __pyx_L18_continue; } /* "pandas/tslib.pyx":2934 * if stamps[i] == NPY_NAT: * continue * pandas_datetime_to_datetimestruct(stamps[i] + deltas[pos[i]], # <<<<<<<<<<<<<< * PANDAS_FR_ns, &dts) * curr_reso = _reso_stamp(&dts) */ __pyx_t_28 = __pyx_v_i; __pyx_t_3 = -1; if (__pyx_t_28 < 0) { __pyx_t_28 += __pyx_pybuffernd_stamps.diminfo[0].shape; if (unlikely(__pyx_t_28 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_28 >= __pyx_pybuffernd_stamps.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2934; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_29 = __pyx_v_i; __pyx_t_3 = -1; if (__pyx_t_29 < 0) { __pyx_t_29 += __pyx_pybuffernd_pos.diminfo[0].shape; if (unlikely(__pyx_t_29 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_29 >= __pyx_pybuffernd_pos.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2934; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_30 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_pos.rcbuffer->pybuffer.buf, __pyx_t_29, __pyx_pybuffernd_pos.diminfo[0].strides)); __pyx_t_3 = -1; if (__pyx_t_30 < 0) { __pyx_t_30 += __pyx_pybuffernd_deltas.diminfo[0].shape; if (unlikely(__pyx_t_30 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_30 >= __pyx_pybuffernd_deltas.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2934; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } /* "pandas/tslib.pyx":2935 * continue * pandas_datetime_to_datetimestruct(stamps[i] + deltas[pos[i]], * PANDAS_FR_ns, &dts) # <<<<<<<<<<<<<< * curr_reso = _reso_stamp(&dts) * if curr_reso < reso: */ pandas_datetime_to_datetimestruct(((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_stamps.rcbuffer->pybuffer.buf, __pyx_t_28, __pyx_pybuffernd_stamps.diminfo[0].strides)) + (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_deltas.rcbuffer->pybuffer.buf, __pyx_t_30, __pyx_pybuffernd_deltas.diminfo[0].strides))), PANDAS_FR_ns, (&__pyx_v_dts)); /* "pandas/tslib.pyx":2936 * pandas_datetime_to_datetimestruct(stamps[i] + deltas[pos[i]], * PANDAS_FR_ns, &dts) * curr_reso = _reso_stamp(&dts) # <<<<<<<<<<<<<< * if curr_reso < reso: * reso = curr_reso */ __pyx_v_curr_reso = __pyx_f_6pandas_5tslib__reso_stamp((&__pyx_v_dts)); /* "pandas/tslib.pyx":2937 * PANDAS_FR_ns, &dts) * curr_reso = _reso_stamp(&dts) * if curr_reso < reso: # <<<<<<<<<<<<<< * reso = curr_reso * */ __pyx_t_23 = ((__pyx_v_curr_reso < __pyx_v_reso) != 0); if (__pyx_t_23) { /* "pandas/tslib.pyx":2938 * curr_reso = _reso_stamp(&dts) * if curr_reso < reso: * reso = curr_reso # <<<<<<<<<<<<<< * * return reso */ __pyx_v_reso = __pyx_v_curr_reso; goto __pyx_L21; } __pyx_L21:; __pyx_L18_continue:; } } __pyx_L13:; } __pyx_L3:; /* "pandas/tslib.pyx":2940 * reso = curr_reso * * return reso # <<<<<<<<<<<<<< * * #---------------------------------------------------------------------- */ __Pyx_XDECREF(__pyx_r); __pyx_t_14 = __Pyx_PyInt_From_int(__pyx_v_reso); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2940; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_14); __pyx_r = __pyx_t_14; __pyx_t_14 = 0; goto __pyx_L0; /* "pandas/tslib.pyx":2882 * return D_RESO * * cdef _reso_local(ndarray[int64_t] stamps, object tz): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t n = len(stamps) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); __Pyx_XDECREF(__pyx_t_12); __Pyx_XDECREF(__pyx_t_13); __Pyx_XDECREF(__pyx_t_14); __Pyx_XDECREF(__pyx_t_15); __Pyx_XDECREF(__pyx_t_16); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_deltas.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_pos.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_stamps.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_trans.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.tslib._reso_local", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_deltas.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_pos.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_stamps.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_trans.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_trans); __Pyx_XDECREF((PyObject *)__pyx_v_deltas); __Pyx_XDECREF((PyObject *)__pyx_v_pos); __Pyx_XDECREF((PyObject *)__pyx_v_dt); __Pyx_XDECREF(__pyx_v_delta); __Pyx_XDECREF(__pyx_v__pos); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/tslib.pyx":2979 * __all__ = [] * * def _getlang(): # <<<<<<<<<<<<<< * # Figure out what the current language is set to. * return locale.getlocale(locale.LC_TIME) */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5tslib_97_getlang(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5tslib_97_getlang = {__Pyx_NAMESTR("_getlang"), (PyCFunction)__pyx_pw_6pandas_5tslib_97_getlang, METH_NOARGS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5tslib_97_getlang(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_getlang (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_5tslib_96_getlang(__pyx_self); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5tslib_96_getlang(CYTHON_UNUSED PyObject *__pyx_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_getlang", 0); /* "pandas/tslib.pyx":2981 * def _getlang(): * # Figure out what the current language is set to. * return locale.getlocale(locale.LC_TIME) # <<<<<<<<<<<<<< * * class LocaleTime(object): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_locale); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2981; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_getlocale); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2981; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_locale); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2981; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_LC_TIME); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2981; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2981; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyObject_Call(__pyx_t_2, __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2981; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; /* "pandas/tslib.pyx":2979 * __all__ = [] * * def _getlang(): # <<<<<<<<<<<<<< * # Figure out what the current language is set to. * return locale.getlocale(locale.LC_TIME) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("pandas.tslib._getlang", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/tslib.pyx":3002 * """ * * def __init__(self): # <<<<<<<<<<<<<< * """Set all attributes. * */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5tslib_10LocaleTime_1__init__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/ static char __pyx_doc_6pandas_5tslib_10LocaleTime___init__[] = "Set all attributes.\n\n Order of methods called matters for dependency reasons.\n\n The locale language is set at the offset and then checked again before\n exiting. This is to make sure that the attributes were not set with a\n mix of information from more than one locale. This would most likely\n happen when using threads where one thread calls a locale-dependent\n function while another thread changes the locale while the function in\n the other thread is still running. Proper coding would call for\n locks to prevent changing the locale while locale-dependent code is\n running. The check here is done in case someone does not think about\n doing this.\n\n Only other possible issue is if someone changed the timezone and did\n not call tz.tzset . That is an issue for the programmer, though,\n since changing the timezone is worthless without that call.\n\n "; static PyMethodDef __pyx_mdef_6pandas_5tslib_10LocaleTime_1__init__ = {__Pyx_NAMESTR("__init__"), (PyCFunction)__pyx_pw_6pandas_5tslib_10LocaleTime_1__init__, METH_O, __Pyx_DOCSTR(__pyx_doc_6pandas_5tslib_10LocaleTime___init__)}; static PyObject *__pyx_pw_6pandas_5tslib_10LocaleTime_1__init__(PyObject *__pyx_self, PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_5tslib_10LocaleTime___init__(__pyx_self, ((PyObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5tslib_10LocaleTime___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_t_4; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__init__", 0); /* "pandas/tslib.pyx":3022 * * """ * self.lang = _getlang() # <<<<<<<<<<<<<< * self.__calc_weekday() * self.__calc_month() */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_getlang); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3022; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyObject_Call(__pyx_t_1, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3022; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_lang, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3022; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/tslib.pyx":3023 * """ * self.lang = _getlang() * self.__calc_weekday() # <<<<<<<<<<<<<< * self.__calc_month() * self.__calc_am_pm() */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_LocaleTime__calc_weekday); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3023; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = PyObject_Call(__pyx_t_2, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3023; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pandas/tslib.pyx":3024 * self.lang = _getlang() * self.__calc_weekday() * self.__calc_month() # <<<<<<<<<<<<<< * self.__calc_am_pm() * self.__calc_timezone() */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_LocaleTime__calc_month); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3024; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyObject_Call(__pyx_t_1, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3024; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/tslib.pyx":3025 * self.__calc_weekday() * self.__calc_month() * self.__calc_am_pm() # <<<<<<<<<<<<<< * self.__calc_timezone() * self.__calc_date_time() */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_LocaleTime__calc_am_pm); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3025; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = PyObject_Call(__pyx_t_2, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3025; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pandas/tslib.pyx":3026 * self.__calc_month() * self.__calc_am_pm() * self.__calc_timezone() # <<<<<<<<<<<<<< * self.__calc_date_time() * if _getlang() != self.lang: */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_LocaleTime__calc_timezone); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3026; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyObject_Call(__pyx_t_1, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3026; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/tslib.pyx":3027 * self.__calc_am_pm() * self.__calc_timezone() * self.__calc_date_time() # <<<<<<<<<<<<<< * if _getlang() != self.lang: * raise ValueError("locale changed during initialization") */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_LocaleTime__calc_date_time); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3027; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = PyObject_Call(__pyx_t_2, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3027; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pandas/tslib.pyx":3028 * self.__calc_timezone() * self.__calc_date_time() * if _getlang() != self.lang: # <<<<<<<<<<<<<< * raise ValueError("locale changed during initialization") * */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_getlang); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3028; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyObject_Call(__pyx_t_1, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3028; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_lang); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3028; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = PyObject_RichCompare(__pyx_t_2, __pyx_t_1, Py_NE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3028; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3028; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_4) { /* "pandas/tslib.pyx":3029 * self.__calc_date_time() * if _getlang() != self.lang: * raise ValueError("locale changed during initialization") # <<<<<<<<<<<<<< * * def __pad(self, seq, front): */ __pyx_t_3 = PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__62, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3029; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 3029; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } /* "pandas/tslib.pyx":3002 * """ * * def __init__(self): # <<<<<<<<<<<<<< * """Set all attributes. * */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("pandas.tslib.LocaleTime.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/tslib.pyx":3031 * raise ValueError("locale changed during initialization") * * def __pad(self, seq, front): # <<<<<<<<<<<<<< * # Add '' to seq to either the front (is True), else the back. * seq = list(seq) */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5tslib_10LocaleTime_3__pad(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5tslib_10LocaleTime_3__pad = {__Pyx_NAMESTR("__pad"), (PyCFunction)__pyx_pw_6pandas_5tslib_10LocaleTime_3__pad, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5tslib_10LocaleTime_3__pad(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { CYTHON_UNUSED PyObject *__pyx_v_self = 0; PyObject *__pyx_v_seq = 0; PyObject *__pyx_v_front = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__pad (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_seq,&__pyx_n_s_front,0}; PyObject* values[3] = {0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_seq)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("__pad", 1, 3, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3031; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_front)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("__pad", 1, 3, 3, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3031; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pad") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3031; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 3) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); } __pyx_v_self = values[0]; __pyx_v_seq = values[1]; __pyx_v_front = values[2]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("__pad", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3031; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.tslib.LocaleTime.__pad", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pandas_5tslib_10LocaleTime_2__pad(__pyx_self, __pyx_v_self, __pyx_v_seq, __pyx_v_front); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5tslib_10LocaleTime_2__pad(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, PyObject *__pyx_v_seq, PyObject *__pyx_v_front) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_t_3; int __pyx_t_4; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__pad", 0); __Pyx_INCREF(__pyx_v_seq); /* "pandas/tslib.pyx":3033 * def __pad(self, seq, front): * # Add '' to seq to either the front (is True), else the back. * seq = list(seq) # <<<<<<<<<<<<<< * if front: * seq.insert(0, '') */ __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3033; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_seq); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_seq); __Pyx_GIVEREF(__pyx_v_seq); __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)(&PyList_Type))), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3033; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF_SET(__pyx_v_seq, __pyx_t_2); __pyx_t_2 = 0; /* "pandas/tslib.pyx":3034 * # Add '' to seq to either the front (is True), else the back. * seq = list(seq) * if front: # <<<<<<<<<<<<<< * seq.insert(0, '') * else: */ __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_front); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3034; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__pyx_t_3) { /* "pandas/tslib.pyx":3035 * seq = list(seq) * if front: * seq.insert(0, '') # <<<<<<<<<<<<<< * else: * seq.append('') */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_seq, __pyx_n_s_insert); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3035; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = PyObject_Call(__pyx_t_2, __pyx_tuple__63, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3035; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L3; } /*else*/ { /* "pandas/tslib.pyx":3037 * seq.insert(0, '') * else: * seq.append('') # <<<<<<<<<<<<<< * return seq * */ __pyx_t_4 = __Pyx_PyObject_Append(__pyx_v_seq, __pyx_kp_s__13); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3037; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_L3:; /* "pandas/tslib.pyx":3038 * else: * seq.append('') * return seq # <<<<<<<<<<<<<< * * def __calc_weekday(self): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_seq); __pyx_r = __pyx_v_seq; goto __pyx_L0; /* "pandas/tslib.pyx":3031 * raise ValueError("locale changed during initialization") * * def __pad(self, seq, front): # <<<<<<<<<<<<<< * # Add '' to seq to either the front (is True), else the back. * seq = list(seq) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("pandas.tslib.LocaleTime.__pad", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_seq); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/tslib.pyx":3040 * return seq * * def __calc_weekday(self): # <<<<<<<<<<<<<< * # Set self.a_weekday and self.f_weekday using the calendar * # module. */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5tslib_10LocaleTime_5__calc_weekday(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5tslib_10LocaleTime_5__calc_weekday = {__Pyx_NAMESTR("__calc_weekday"), (PyCFunction)__pyx_pw_6pandas_5tslib_10LocaleTime_5__calc_weekday, METH_O, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5tslib_10LocaleTime_5__calc_weekday(PyObject *__pyx_self, PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__calc_weekday (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_5tslib_10LocaleTime_4__calc_weekday(__pyx_self, ((PyObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5tslib_10LocaleTime_4__calc_weekday(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) { PyObject *__pyx_v_a_weekday = NULL; PyObject *__pyx_v_f_weekday = NULL; long __pyx_v_i; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; long __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__calc_weekday", 0); /* "pandas/tslib.pyx":3043 * # Set self.a_weekday and self.f_weekday using the calendar * # module. * a_weekday = [calendar.day_abbr[i].lower() for i in range(7)] # <<<<<<<<<<<<<< * f_weekday = [calendar.day_name[i].lower() for i in range(7)] * self.a_weekday = a_weekday */ __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3043; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); for (__pyx_t_2 = 0; __pyx_t_2 < 7; __pyx_t_2+=1) { __pyx_v_i = __pyx_t_2; __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_calendar); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3043; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_day_abbr); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3043; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_4, __pyx_v_i, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(__pyx_t_3 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3043; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_lower); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3043; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyObject_Call(__pyx_t_4, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3043; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_3))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3043; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } __pyx_v_a_weekday = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/tslib.pyx":3044 * # module. * a_weekday = [calendar.day_abbr[i].lower() for i in range(7)] * f_weekday = [calendar.day_name[i].lower() for i in range(7)] # <<<<<<<<<<<<<< * self.a_weekday = a_weekday * self.f_weekday = f_weekday */ __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3044; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); for (__pyx_t_2 = 0; __pyx_t_2 < 7; __pyx_t_2+=1) { __pyx_v_i = __pyx_t_2; __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_calendar); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3044; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_day_name); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3044; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_4, __pyx_v_i, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(__pyx_t_3 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3044; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_lower); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3044; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyObject_Call(__pyx_t_4, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3044; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_3))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3044; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } __pyx_v_f_weekday = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/tslib.pyx":3045 * a_weekday = [calendar.day_abbr[i].lower() for i in range(7)] * f_weekday = [calendar.day_name[i].lower() for i in range(7)] * self.a_weekday = a_weekday # <<<<<<<<<<<<<< * self.f_weekday = f_weekday * */ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_a_weekday, __pyx_v_a_weekday) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3045; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/tslib.pyx":3046 * f_weekday = [calendar.day_name[i].lower() for i in range(7)] * self.a_weekday = a_weekday * self.f_weekday = f_weekday # <<<<<<<<<<<<<< * * def __calc_month(self): */ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_f_weekday, __pyx_v_f_weekday) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3046; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/tslib.pyx":3040 * return seq * * def __calc_weekday(self): # <<<<<<<<<<<<<< * # Set self.a_weekday and self.f_weekday using the calendar * # module. */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("pandas.tslib.LocaleTime.__calc_weekday", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_a_weekday); __Pyx_XDECREF(__pyx_v_f_weekday); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/tslib.pyx":3048 * self.f_weekday = f_weekday * * def __calc_month(self): # <<<<<<<<<<<<<< * # Set self.f_month and self.a_month using the calendar module. * a_month = [calendar.month_abbr[i].lower() for i in range(13)] */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5tslib_10LocaleTime_7__calc_month(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5tslib_10LocaleTime_7__calc_month = {__Pyx_NAMESTR("__calc_month"), (PyCFunction)__pyx_pw_6pandas_5tslib_10LocaleTime_7__calc_month, METH_O, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5tslib_10LocaleTime_7__calc_month(PyObject *__pyx_self, PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__calc_month (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_5tslib_10LocaleTime_6__calc_month(__pyx_self, ((PyObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5tslib_10LocaleTime_6__calc_month(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) { PyObject *__pyx_v_a_month = NULL; PyObject *__pyx_v_f_month = NULL; long __pyx_v_i; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; long __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__calc_month", 0); /* "pandas/tslib.pyx":3050 * def __calc_month(self): * # Set self.f_month and self.a_month using the calendar module. * a_month = [calendar.month_abbr[i].lower() for i in range(13)] # <<<<<<<<<<<<<< * f_month = [calendar.month_name[i].lower() for i in range(13)] * self.a_month = a_month */ __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3050; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); for (__pyx_t_2 = 0; __pyx_t_2 < 13; __pyx_t_2+=1) { __pyx_v_i = __pyx_t_2; __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_calendar); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3050; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_month_abbr); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3050; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_4, __pyx_v_i, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(__pyx_t_3 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3050; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_lower); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3050; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyObject_Call(__pyx_t_4, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3050; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_3))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3050; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } __pyx_v_a_month = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/tslib.pyx":3051 * # Set self.f_month and self.a_month using the calendar module. * a_month = [calendar.month_abbr[i].lower() for i in range(13)] * f_month = [calendar.month_name[i].lower() for i in range(13)] # <<<<<<<<<<<<<< * self.a_month = a_month * self.f_month = f_month */ __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3051; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); for (__pyx_t_2 = 0; __pyx_t_2 < 13; __pyx_t_2+=1) { __pyx_v_i = __pyx_t_2; __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_calendar); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3051; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_month_name); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3051; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_4, __pyx_v_i, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(__pyx_t_3 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3051; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_lower); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3051; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyObject_Call(__pyx_t_4, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3051; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_3))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3051; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } __pyx_v_f_month = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/tslib.pyx":3052 * a_month = [calendar.month_abbr[i].lower() for i in range(13)] * f_month = [calendar.month_name[i].lower() for i in range(13)] * self.a_month = a_month # <<<<<<<<<<<<<< * self.f_month = f_month * */ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_a_month, __pyx_v_a_month) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3052; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/tslib.pyx":3053 * f_month = [calendar.month_name[i].lower() for i in range(13)] * self.a_month = a_month * self.f_month = f_month # <<<<<<<<<<<<<< * * def __calc_am_pm(self): */ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_f_month, __pyx_v_f_month) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3053; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/tslib.pyx":3048 * self.f_weekday = f_weekday * * def __calc_month(self): # <<<<<<<<<<<<<< * # Set self.f_month and self.a_month using the calendar module. * a_month = [calendar.month_abbr[i].lower() for i in range(13)] */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("pandas.tslib.LocaleTime.__calc_month", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_a_month); __Pyx_XDECREF(__pyx_v_f_month); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/tslib.pyx":3055 * self.f_month = f_month * * def __calc_am_pm(self): # <<<<<<<<<<<<<< * # Set self.am_pm by using time.strftime(). * */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5tslib_10LocaleTime_9__calc_am_pm(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5tslib_10LocaleTime_9__calc_am_pm = {__Pyx_NAMESTR("__calc_am_pm"), (PyCFunction)__pyx_pw_6pandas_5tslib_10LocaleTime_9__calc_am_pm, METH_O, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5tslib_10LocaleTime_9__calc_am_pm(PyObject *__pyx_self, PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__calc_am_pm (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_5tslib_10LocaleTime_8__calc_am_pm(__pyx_self, ((PyObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5tslib_10LocaleTime_8__calc_am_pm(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) { PyObject *__pyx_v_am_pm = NULL; long __pyx_v_hour; PyObject *__pyx_v_time_tuple = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; Py_ssize_t __pyx_t_2; PyObject *__pyx_t_3 = NULL; long __pyx_t_4; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; int __pyx_t_7; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__calc_am_pm", 0); /* "pandas/tslib.pyx":3061 * # magical; just happened to have used it everywhere else where a * # static date was needed. * am_pm = [] # <<<<<<<<<<<<<< * for hour in (01,22): * time_tuple = time.struct_time((1999,3,17,hour,44,55,2,76,0)) */ __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3061; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_v_am_pm = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/tslib.pyx":3062 * # static date was needed. * am_pm = [] * for hour in (01,22): # <<<<<<<<<<<<<< * time_tuple = time.struct_time((1999,3,17,hour,44,55,2,76,0)) * am_pm.append(time.strftime("%p", time_tuple).lower()) */ __pyx_t_1 = __pyx_tuple__64; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0; for (;;) { if (__pyx_t_2 >= 2) break; #if CYTHON_COMPILING_IN_CPYTHON __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_filename = __pyx_f[0]; __pyx_lineno = 3062; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3062; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif __pyx_t_4 = __Pyx_PyInt_As_long(__pyx_t_3); if (unlikely((__pyx_t_4 == (long)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3062; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_hour = __pyx_t_4; /* "pandas/tslib.pyx":3063 * am_pm = [] * for hour in (01,22): * time_tuple = time.struct_time((1999,3,17,hour,44,55,2,76,0)) # <<<<<<<<<<<<<< * am_pm.append(time.strftime("%p", time_tuple).lower()) * self.am_pm = am_pm */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_time); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3063; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_struct_time); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3063; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyInt_From_long(__pyx_v_hour); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3063; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_6 = PyTuple_New(9); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3063; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(__pyx_int_1999); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_int_1999); __Pyx_GIVEREF(__pyx_int_1999); __Pyx_INCREF(__pyx_int_3); PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_int_3); __Pyx_GIVEREF(__pyx_int_3); __Pyx_INCREF(__pyx_int_17); PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_int_17); __Pyx_GIVEREF(__pyx_int_17); PyTuple_SET_ITEM(__pyx_t_6, 3, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __Pyx_INCREF(__pyx_int_44); PyTuple_SET_ITEM(__pyx_t_6, 4, __pyx_int_44); __Pyx_GIVEREF(__pyx_int_44); __Pyx_INCREF(__pyx_int_55); PyTuple_SET_ITEM(__pyx_t_6, 5, __pyx_int_55); __Pyx_GIVEREF(__pyx_int_55); __Pyx_INCREF(__pyx_int_2); PyTuple_SET_ITEM(__pyx_t_6, 6, __pyx_int_2); __Pyx_GIVEREF(__pyx_int_2); __Pyx_INCREF(__pyx_int_76); PyTuple_SET_ITEM(__pyx_t_6, 7, __pyx_int_76); __Pyx_GIVEREF(__pyx_int_76); __Pyx_INCREF(__pyx_int_0); PyTuple_SET_ITEM(__pyx_t_6, 8, __pyx_int_0); __Pyx_GIVEREF(__pyx_int_0); __pyx_t_3 = 0; __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3063; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyObject_Call(__pyx_t_5, __pyx_t_3, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3063; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF_SET(__pyx_v_time_tuple, __pyx_t_6); __pyx_t_6 = 0; /* "pandas/tslib.pyx":3064 * for hour in (01,22): * time_tuple = time.struct_time((1999,3,17,hour,44,55,2,76,0)) * am_pm.append(time.strftime("%p", time_tuple).lower()) # <<<<<<<<<<<<<< * self.am_pm = am_pm * */ __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_time); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3064; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_strftime); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3064; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3064; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(__pyx_kp_s_p_2); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_kp_s_p_2); __Pyx_GIVEREF(__pyx_kp_s_p_2); __Pyx_INCREF(__pyx_v_time_tuple); PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_v_time_tuple); __Pyx_GIVEREF(__pyx_v_time_tuple); __pyx_t_5 = PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3064; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_lower); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3064; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyObject_Call(__pyx_t_6, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3064; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_7 = __Pyx_PyList_Append(__pyx_v_am_pm, __pyx_t_5); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3064; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pandas/tslib.pyx":3065 * time_tuple = time.struct_time((1999,3,17,hour,44,55,2,76,0)) * am_pm.append(time.strftime("%p", time_tuple).lower()) * self.am_pm = am_pm # <<<<<<<<<<<<<< * * def __calc_date_time(self): */ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_am_pm, __pyx_v_am_pm) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3065; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/tslib.pyx":3055 * self.f_month = f_month * * def __calc_am_pm(self): # <<<<<<<<<<<<<< * # Set self.am_pm by using time.strftime(). * */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("pandas.tslib.LocaleTime.__calc_am_pm", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_am_pm); __Pyx_XDECREF(__pyx_v_time_tuple); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/tslib.pyx":3067 * self.am_pm = am_pm * * def __calc_date_time(self): # <<<<<<<<<<<<<< * # Set self.date_time, self.date, & self.time by using * # time.strftime(). */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5tslib_10LocaleTime_11__calc_date_time(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5tslib_10LocaleTime_11__calc_date_time = {__Pyx_NAMESTR("__calc_date_time"), (PyCFunction)__pyx_pw_6pandas_5tslib_10LocaleTime_11__calc_date_time, METH_O, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5tslib_10LocaleTime_11__calc_date_time(PyObject *__pyx_self, PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__calc_date_time (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_5tslib_10LocaleTime_10__calc_date_time(__pyx_self, ((PyObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5tslib_10LocaleTime_10__calc_date_time(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) { PyObject *__pyx_v_time_tuple = NULL; PyObject *__pyx_v_date_time = NULL; PyObject *__pyx_v_replacement_pairs = NULL; PyObject *__pyx_v_offset = NULL; PyObject *__pyx_v_directive = NULL; PyObject *__pyx_v_current_format = NULL; PyObject *__pyx_v_old = NULL; PyObject *__pyx_v_new = NULL; PyObject *__pyx_v_U_W = NULL; PyObject *__pyx_v_tz_values = NULL; PyObject *__pyx_v_tz = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; Py_ssize_t __pyx_t_7; PyObject *(*__pyx_t_8)(PyObject *); Py_ssize_t __pyx_t_9; PyObject *(*__pyx_t_10)(PyObject *); int __pyx_t_11; PyObject *(*__pyx_t_12)(PyObject *); int __pyx_t_13; int __pyx_t_14; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__calc_date_time", 0); /* "pandas/tslib.pyx":3075 * # values within the format string is very important; it eliminates * # possible ambiguity for what something represents. * time_tuple = time.struct_time((1999,3,17,22,44,55,2,76,0)) # <<<<<<<<<<<<<< * date_time = [None, None, None] * date_time[0] = time.strftime("%c", time_tuple).lower() */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_time); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3075; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_struct_time); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3075; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyObject_Call(__pyx_t_2, __pyx_tuple__66, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3075; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_time_tuple = __pyx_t_1; __pyx_t_1 = 0; /* "pandas/tslib.pyx":3076 * # possible ambiguity for what something represents. * time_tuple = time.struct_time((1999,3,17,22,44,55,2,76,0)) * date_time = [None, None, None] # <<<<<<<<<<<<<< * date_time[0] = time.strftime("%c", time_tuple).lower() * date_time[1] = time.strftime("%x", time_tuple).lower() */ __pyx_t_1 = PyList_New(3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3076; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(Py_None); PyList_SET_ITEM(__pyx_t_1, 0, Py_None); __Pyx_GIVEREF(Py_None); __Pyx_INCREF(Py_None); PyList_SET_ITEM(__pyx_t_1, 1, Py_None); __Pyx_GIVEREF(Py_None); __Pyx_INCREF(Py_None); PyList_SET_ITEM(__pyx_t_1, 2, Py_None); __Pyx_GIVEREF(Py_None); __pyx_v_date_time = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/tslib.pyx":3077 * time_tuple = time.struct_time((1999,3,17,22,44,55,2,76,0)) * date_time = [None, None, None] * date_time[0] = time.strftime("%c", time_tuple).lower() # <<<<<<<<<<<<<< * date_time[1] = time.strftime("%x", time_tuple).lower() * date_time[2] = time.strftime("%X", time_tuple).lower() */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_time); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3077; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_strftime); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3077; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3077; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_kp_s_c); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_kp_s_c); __Pyx_GIVEREF(__pyx_kp_s_c); __Pyx_INCREF(__pyx_v_time_tuple); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_time_tuple); __Pyx_GIVEREF(__pyx_v_time_tuple); __pyx_t_3 = PyObject_Call(__pyx_t_2, __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3077; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_lower); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3077; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyObject_Call(__pyx_t_1, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3077; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (unlikely(__Pyx_SetItemInt(__pyx_v_date_time, 0, __pyx_t_3, long, 1, __Pyx_PyInt_From_long, 1, 0, 1) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3077; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/tslib.pyx":3078 * date_time = [None, None, None] * date_time[0] = time.strftime("%c", time_tuple).lower() * date_time[1] = time.strftime("%x", time_tuple).lower() # <<<<<<<<<<<<<< * date_time[2] = time.strftime("%X", time_tuple).lower() * replacement_pairs = [('%', '%%'), (self.f_weekday[2], '%A'), */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_time); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3078; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_strftime); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3078; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3078; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_kp_s_x); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_kp_s_x); __Pyx_GIVEREF(__pyx_kp_s_x); __Pyx_INCREF(__pyx_v_time_tuple); PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_time_tuple); __Pyx_GIVEREF(__pyx_v_time_tuple); __pyx_t_2 = PyObject_Call(__pyx_t_1, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3078; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_lower); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3078; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_Call(__pyx_t_3, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3078; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(__Pyx_SetItemInt(__pyx_v_date_time, 1, __pyx_t_2, long, 1, __Pyx_PyInt_From_long, 1, 0, 1) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3078; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/tslib.pyx":3079 * date_time[0] = time.strftime("%c", time_tuple).lower() * date_time[1] = time.strftime("%x", time_tuple).lower() * date_time[2] = time.strftime("%X", time_tuple).lower() # <<<<<<<<<<<<<< * replacement_pairs = [('%', '%%'), (self.f_weekday[2], '%A'), * (self.f_month[3], '%B'), (self.a_weekday[2], '%a'), */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_time); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3079; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_strftime); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3079; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3079; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_kp_s_X); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_kp_s_X); __Pyx_GIVEREF(__pyx_kp_s_X); __Pyx_INCREF(__pyx_v_time_tuple); PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_time_tuple); __Pyx_GIVEREF(__pyx_v_time_tuple); __pyx_t_1 = PyObject_Call(__pyx_t_3, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3079; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_lower); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3079; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyObject_Call(__pyx_t_2, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3079; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(__Pyx_SetItemInt(__pyx_v_date_time, 2, __pyx_t_1, long, 1, __Pyx_PyInt_From_long, 1, 0, 1) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3079; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pandas/tslib.pyx":3080 * date_time[1] = time.strftime("%x", time_tuple).lower() * date_time[2] = time.strftime("%X", time_tuple).lower() * replacement_pairs = [('%', '%%'), (self.f_weekday[2], '%A'), # <<<<<<<<<<<<<< * (self.f_month[3], '%B'), (self.a_weekday[2], '%a'), * (self.a_month[3], '%b'), (self.am_pm[1], '%p'), */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_f_weekday); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3080; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_1, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3080; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3080; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __Pyx_INCREF(__pyx_kp_s_A_2); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_kp_s_A_2); __Pyx_GIVEREF(__pyx_kp_s_A_2); __pyx_t_2 = 0; /* "pandas/tslib.pyx":3081 * date_time[2] = time.strftime("%X", time_tuple).lower() * replacement_pairs = [('%', '%%'), (self.f_weekday[2], '%A'), * (self.f_month[3], '%B'), (self.a_weekday[2], '%a'), # <<<<<<<<<<<<<< * (self.a_month[3], '%b'), (self.am_pm[1], '%p'), * ('1999', '%Y'), ('99', '%y'), ('22', '%H'), */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_f_month); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3081; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_2, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_3 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3081; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3081; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __Pyx_INCREF(__pyx_kp_s_B_2); PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_kp_s_B_2); __Pyx_GIVEREF(__pyx_kp_s_B_2); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_a_weekday); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3081; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_3, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_4 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3081; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3081; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __Pyx_INCREF(__pyx_kp_s_a_2); PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_kp_s_a_2); __Pyx_GIVEREF(__pyx_kp_s_a_2); __pyx_t_4 = 0; /* "pandas/tslib.pyx":3082 * replacement_pairs = [('%', '%%'), (self.f_weekday[2], '%A'), * (self.f_month[3], '%B'), (self.a_weekday[2], '%a'), * (self.a_month[3], '%b'), (self.am_pm[1], '%p'), # <<<<<<<<<<<<<< * ('1999', '%Y'), ('99', '%y'), ('22', '%H'), * ('44', '%M'), ('55', '%S'), ('76', '%j'), */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_a_month); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3082; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_GetItemInt(__pyx_t_4, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_5 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3082; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3082; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __Pyx_INCREF(__pyx_kp_s_b_2); PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_kp_s_b_2); __Pyx_GIVEREF(__pyx_kp_s_b_2); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_am_pm); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3082; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_GetItemInt(__pyx_t_5, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_6 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3082; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3082; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_6); __Pyx_INCREF(__pyx_kp_s_p_2); PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_kp_s_p_2); __Pyx_GIVEREF(__pyx_kp_s_p_2); __pyx_t_6 = 0; /* "pandas/tslib.pyx":3080 * date_time[1] = time.strftime("%x", time_tuple).lower() * date_time[2] = time.strftime("%X", time_tuple).lower() * replacement_pairs = [('%', '%%'), (self.f_weekday[2], '%A'), # <<<<<<<<<<<<<< * (self.f_month[3], '%B'), (self.a_weekday[2], '%a'), * (self.a_month[3], '%b'), (self.am_pm[1], '%p'), */ __pyx_t_6 = PyList_New(17); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3080; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(__pyx_tuple__68); PyList_SET_ITEM(__pyx_t_6, 0, __pyx_tuple__68); __Pyx_GIVEREF(__pyx_tuple__68); PyList_SET_ITEM(__pyx_t_6, 1, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); PyList_SET_ITEM(__pyx_t_6, 2, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); PyList_SET_ITEM(__pyx_t_6, 3, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); PyList_SET_ITEM(__pyx_t_6, 4, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); PyList_SET_ITEM(__pyx_t_6, 5, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __Pyx_INCREF(__pyx_tuple__69); PyList_SET_ITEM(__pyx_t_6, 6, __pyx_tuple__69); __Pyx_GIVEREF(__pyx_tuple__69); __Pyx_INCREF(__pyx_tuple__70); PyList_SET_ITEM(__pyx_t_6, 7, __pyx_tuple__70); __Pyx_GIVEREF(__pyx_tuple__70); __Pyx_INCREF(__pyx_tuple__71); PyList_SET_ITEM(__pyx_t_6, 8, __pyx_tuple__71); __Pyx_GIVEREF(__pyx_tuple__71); __Pyx_INCREF(__pyx_tuple__72); PyList_SET_ITEM(__pyx_t_6, 9, __pyx_tuple__72); __Pyx_GIVEREF(__pyx_tuple__72); __Pyx_INCREF(__pyx_tuple__73); PyList_SET_ITEM(__pyx_t_6, 10, __pyx_tuple__73); __Pyx_GIVEREF(__pyx_tuple__73); __Pyx_INCREF(__pyx_tuple__74); PyList_SET_ITEM(__pyx_t_6, 11, __pyx_tuple__74); __Pyx_GIVEREF(__pyx_tuple__74); __Pyx_INCREF(__pyx_tuple__75); PyList_SET_ITEM(__pyx_t_6, 12, __pyx_tuple__75); __Pyx_GIVEREF(__pyx_tuple__75); __Pyx_INCREF(__pyx_tuple__76); PyList_SET_ITEM(__pyx_t_6, 13, __pyx_tuple__76); __Pyx_GIVEREF(__pyx_tuple__76); __Pyx_INCREF(__pyx_tuple__77); PyList_SET_ITEM(__pyx_t_6, 14, __pyx_tuple__77); __Pyx_GIVEREF(__pyx_tuple__77); __Pyx_INCREF(__pyx_tuple__78); PyList_SET_ITEM(__pyx_t_6, 15, __pyx_tuple__78); __Pyx_GIVEREF(__pyx_tuple__78); __Pyx_INCREF(__pyx_tuple__79); PyList_SET_ITEM(__pyx_t_6, 16, __pyx_tuple__79); __Pyx_GIVEREF(__pyx_tuple__79); __pyx_t_1 = 0; __pyx_t_2 = 0; __pyx_t_3 = 0; __pyx_t_4 = 0; __pyx_t_5 = 0; __pyx_v_replacement_pairs = ((PyObject*)__pyx_t_6); __pyx_t_6 = 0; /* "pandas/tslib.pyx":3088 * # '3' needed for when no leading zero. * ('2', '%w'), ('10', '%I')] * replacement_pairs.extend([(tz, "%Z") for tz_values in self.timezone # <<<<<<<<<<<<<< * for tz in tz_values]) * for offset,directive in ((0,'%c'), (1,'%x'), (2,'%X')): */ __pyx_t_6 = PyList_New(0); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3088; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_timezone); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3088; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); if (PyList_CheckExact(__pyx_t_5) || PyTuple_CheckExact(__pyx_t_5)) { __pyx_t_4 = __pyx_t_5; __Pyx_INCREF(__pyx_t_4); __pyx_t_7 = 0; __pyx_t_8 = NULL; } else { __pyx_t_7 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3088; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_8 = Py_TYPE(__pyx_t_4)->tp_iternext; } __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; for (;;) { if (!__pyx_t_8 && PyList_CheckExact(__pyx_t_4)) { if (__pyx_t_7 >= PyList_GET_SIZE(__pyx_t_4)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_5 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_7); __Pyx_INCREF(__pyx_t_5); __pyx_t_7++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3088; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_5 = PySequence_ITEM(__pyx_t_4, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3088; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif } else if (!__pyx_t_8 && PyTuple_CheckExact(__pyx_t_4)) { if (__pyx_t_7 >= PyTuple_GET_SIZE(__pyx_t_4)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_7); __Pyx_INCREF(__pyx_t_5); __pyx_t_7++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3088; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_5 = PySequence_ITEM(__pyx_t_4, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3088; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif } else { __pyx_t_5 = __pyx_t_8(__pyx_t_4); if (unlikely(!__pyx_t_5)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3088; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } break; } __Pyx_GOTREF(__pyx_t_5); } __Pyx_XDECREF_SET(__pyx_v_tz_values, __pyx_t_5); __pyx_t_5 = 0; /* "pandas/tslib.pyx":3089 * ('2', '%w'), ('10', '%I')] * replacement_pairs.extend([(tz, "%Z") for tz_values in self.timezone * for tz in tz_values]) # <<<<<<<<<<<<<< * for offset,directive in ((0,'%c'), (1,'%x'), (2,'%X')): * current_format = date_time[offset] */ if (PyList_CheckExact(__pyx_v_tz_values) || PyTuple_CheckExact(__pyx_v_tz_values)) { __pyx_t_5 = __pyx_v_tz_values; __Pyx_INCREF(__pyx_t_5); __pyx_t_9 = 0; __pyx_t_10 = NULL; } else { __pyx_t_9 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_v_tz_values); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3089; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_10 = Py_TYPE(__pyx_t_5)->tp_iternext; } for (;;) { if (!__pyx_t_10 && PyList_CheckExact(__pyx_t_5)) { if (__pyx_t_9 >= PyList_GET_SIZE(__pyx_t_5)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_3 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_9); __Pyx_INCREF(__pyx_t_3); __pyx_t_9++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3089; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_3 = PySequence_ITEM(__pyx_t_5, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3089; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif } else if (!__pyx_t_10 && PyTuple_CheckExact(__pyx_t_5)) { if (__pyx_t_9 >= PyTuple_GET_SIZE(__pyx_t_5)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_9); __Pyx_INCREF(__pyx_t_3); __pyx_t_9++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3089; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_3 = PySequence_ITEM(__pyx_t_5, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3089; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif } else { __pyx_t_3 = __pyx_t_10(__pyx_t_5); if (unlikely(!__pyx_t_3)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3089; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } break; } __Pyx_GOTREF(__pyx_t_3); } __Pyx_XDECREF_SET(__pyx_v_tz, __pyx_t_3); __pyx_t_3 = 0; /* "pandas/tslib.pyx":3088 * # '3' needed for when no leading zero. * ('2', '%w'), ('10', '%I')] * replacement_pairs.extend([(tz, "%Z") for tz_values in self.timezone # <<<<<<<<<<<<<< * for tz in tz_values]) * for offset,directive in ((0,'%c'), (1,'%x'), (2,'%X')): */ __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3088; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_v_tz); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_tz); __Pyx_GIVEREF(__pyx_v_tz); __Pyx_INCREF(__pyx_kp_s_Z_3); PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_kp_s_Z_3); __Pyx_GIVEREF(__pyx_kp_s_Z_3); if (unlikely(__Pyx_ListComp_Append(__pyx_t_6, (PyObject*)__pyx_t_3))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3088; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_11 = __Pyx_PyList_Extend(__pyx_v_replacement_pairs, __pyx_t_6); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3088; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; /* "pandas/tslib.pyx":3090 * replacement_pairs.extend([(tz, "%Z") for tz_values in self.timezone * for tz in tz_values]) * for offset,directive in ((0,'%c'), (1,'%x'), (2,'%X')): # <<<<<<<<<<<<<< * current_format = date_time[offset] * for old, new in replacement_pairs: */ __pyx_t_6 = __pyx_tuple__83; __Pyx_INCREF(__pyx_t_6); __pyx_t_7 = 0; for (;;) { if (__pyx_t_7 >= 3) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_6, __pyx_t_7); __Pyx_INCREF(__pyx_t_4); __pyx_t_7++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3090; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_4 = PySequence_ITEM(__pyx_t_6, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3090; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif if (likely(__pyx_t_4 != Py_None)) { PyObject* sequence = __pyx_t_4; #if CYTHON_COMPILING_IN_CPYTHON Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3090; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_5 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(__pyx_t_3); #else __pyx_t_5 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3090; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3090; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); #endif __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else { __Pyx_RaiseNoneNotIterableError(); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3090; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __Pyx_XDECREF_SET(__pyx_v_offset, __pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF_SET(__pyx_v_directive, __pyx_t_3); __pyx_t_3 = 0; /* "pandas/tslib.pyx":3091 * for tz in tz_values]) * for offset,directive in ((0,'%c'), (1,'%x'), (2,'%X')): * current_format = date_time[offset] # <<<<<<<<<<<<<< * for old, new in replacement_pairs: * # Must deal with possible lack of locale info */ __pyx_t_4 = PyObject_GetItem(__pyx_v_date_time, __pyx_v_offset); if (unlikely(__pyx_t_4 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3091; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_4); __Pyx_XDECREF_SET(__pyx_v_current_format, __pyx_t_4); __pyx_t_4 = 0; /* "pandas/tslib.pyx":3092 * for offset,directive in ((0,'%c'), (1,'%x'), (2,'%X')): * current_format = date_time[offset] * for old, new in replacement_pairs: # <<<<<<<<<<<<<< * # Must deal with possible lack of locale info * # manifesting itself as the empty string (e.g., Swedish's */ __pyx_t_4 = __pyx_v_replacement_pairs; __Pyx_INCREF(__pyx_t_4); __pyx_t_9 = 0; for (;;) { if (__pyx_t_9 >= PyList_GET_SIZE(__pyx_t_4)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_3 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_9); __Pyx_INCREF(__pyx_t_3); __pyx_t_9++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3092; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_3 = PySequence_ITEM(__pyx_t_4, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3092; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif if ((likely(PyTuple_CheckExact(__pyx_t_3))) || (PyList_CheckExact(__pyx_t_3))) { PyObject* sequence = __pyx_t_3; #if CYTHON_COMPILING_IN_CPYTHON Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3092; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_5 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_2 = PyTuple_GET_ITEM(sequence, 1); } else { __pyx_t_5 = PyList_GET_ITEM(sequence, 0); __pyx_t_2 = PyList_GET_ITEM(sequence, 1); } __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(__pyx_t_2); #else __pyx_t_5 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3092; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_2 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3092; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); #endif __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else { Py_ssize_t index = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3092; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_12 = Py_TYPE(__pyx_t_1)->tp_iternext; index = 0; __pyx_t_5 = __pyx_t_12(__pyx_t_1); if (unlikely(!__pyx_t_5)) goto __pyx_L11_unpacking_failed; __Pyx_GOTREF(__pyx_t_5); index = 1; __pyx_t_2 = __pyx_t_12(__pyx_t_1); if (unlikely(!__pyx_t_2)) goto __pyx_L11_unpacking_failed; __Pyx_GOTREF(__pyx_t_2); if (__Pyx_IternextUnpackEndCheck(__pyx_t_12(__pyx_t_1), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3092; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_12 = NULL; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L12_unpacking_done; __pyx_L11_unpacking_failed:; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_12 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3092; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_L12_unpacking_done:; } __Pyx_XDECREF_SET(__pyx_v_old, __pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF_SET(__pyx_v_new, __pyx_t_2); __pyx_t_2 = 0; /* "pandas/tslib.pyx":3097 * # lack of AM/PM info) or a platform returning a tuple of empty * # strings (e.g., MacOS 9 having timezone as ('','')). * if old: # <<<<<<<<<<<<<< * current_format = current_format.replace(old, new) * # If %W is used, then Sunday, 2005-01-03 will fall on week 0 since */ __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_v_old); if (unlikely(__pyx_t_13 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3097; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__pyx_t_13) { /* "pandas/tslib.pyx":3098 * # strings (e.g., MacOS 9 having timezone as ('','')). * if old: * current_format = current_format.replace(old, new) # <<<<<<<<<<<<<< * # If %W is used, then Sunday, 2005-01-03 will fall on week 0 since * # 2005-01-03 occurs before the first Monday of the year. Otherwise */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_current_format, __pyx_n_s_replace); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3098; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3098; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_old); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_old); __Pyx_GIVEREF(__pyx_v_old); __Pyx_INCREF(__pyx_v_new); PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_new); __Pyx_GIVEREF(__pyx_v_new); __pyx_t_5 = PyObject_Call(__pyx_t_3, __pyx_t_2, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3098; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF_SET(__pyx_v_current_format, __pyx_t_5); __pyx_t_5 = 0; goto __pyx_L13; } __pyx_L13:; } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "pandas/tslib.pyx":3102 * # 2005-01-03 occurs before the first Monday of the year. Otherwise * # %U is used. * time_tuple = time.struct_time((1999,1,3,1,1,1,6,3,0)) # <<<<<<<<<<<<<< * if '00' in time.strftime(directive, time_tuple): * U_W = '%W' */ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_time); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3102; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_struct_time); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3102; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyObject_Call(__pyx_t_5, __pyx_tuple__85, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3102; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF_SET(__pyx_v_time_tuple, __pyx_t_4); __pyx_t_4 = 0; /* "pandas/tslib.pyx":3103 * # %U is used. * time_tuple = time.struct_time((1999,1,3,1,1,1,6,3,0)) * if '00' in time.strftime(directive, time_tuple): # <<<<<<<<<<<<<< * U_W = '%W' * else: */ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_time); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3103; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_strftime); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3103; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3103; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_v_directive); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_directive); __Pyx_GIVEREF(__pyx_v_directive); __Pyx_INCREF(__pyx_v_time_tuple); PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_time_tuple); __Pyx_GIVEREF(__pyx_v_time_tuple); __pyx_t_2 = PyObject_Call(__pyx_t_5, __pyx_t_4, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3103; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_13 = (__Pyx_PySequence_Contains(__pyx_kp_s_00, __pyx_t_2, Py_EQ)); if (unlikely(__pyx_t_13 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3103; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_14 = (__pyx_t_13 != 0); if (__pyx_t_14) { /* "pandas/tslib.pyx":3104 * time_tuple = time.struct_time((1999,1,3,1,1,1,6,3,0)) * if '00' in time.strftime(directive, time_tuple): * U_W = '%W' # <<<<<<<<<<<<<< * else: * U_W = '%U' */ __Pyx_INCREF(__pyx_kp_s_W_2); __Pyx_XDECREF_SET(__pyx_v_U_W, __pyx_kp_s_W_2); goto __pyx_L14; } /*else*/ { /* "pandas/tslib.pyx":3106 * U_W = '%W' * else: * U_W = '%U' # <<<<<<<<<<<<<< * date_time[offset] = current_format.replace('11', U_W) * self.LC_date_time = date_time[0] */ __Pyx_INCREF(__pyx_kp_s_U_2); __Pyx_XDECREF_SET(__pyx_v_U_W, __pyx_kp_s_U_2); } __pyx_L14:; /* "pandas/tslib.pyx":3107 * else: * U_W = '%U' * date_time[offset] = current_format.replace('11', U_W) # <<<<<<<<<<<<<< * self.LC_date_time = date_time[0] * self.LC_date = date_time[1] */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_current_format, __pyx_n_s_replace); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3107; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3107; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_kp_s_11); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_kp_s_11); __Pyx_GIVEREF(__pyx_kp_s_11); __Pyx_INCREF(__pyx_v_U_W); PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_U_W); __Pyx_GIVEREF(__pyx_v_U_W); __pyx_t_5 = PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3107; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(PyObject_SetItem(__pyx_v_date_time, __pyx_v_offset, __pyx_t_5) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3107; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; /* "pandas/tslib.pyx":3108 * U_W = '%U' * date_time[offset] = current_format.replace('11', U_W) * self.LC_date_time = date_time[0] # <<<<<<<<<<<<<< * self.LC_date = date_time[1] * self.LC_time = date_time[2] */ __pyx_t_6 = __Pyx_GetItemInt_List(__pyx_v_date_time, 0, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(__pyx_t_6 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3108; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_6); if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_LC_date_time, __pyx_t_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3108; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; /* "pandas/tslib.pyx":3109 * date_time[offset] = current_format.replace('11', U_W) * self.LC_date_time = date_time[0] * self.LC_date = date_time[1] # <<<<<<<<<<<<<< * self.LC_time = date_time[2] * */ __pyx_t_6 = __Pyx_GetItemInt_List(__pyx_v_date_time, 1, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(__pyx_t_6 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3109; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_6); if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_LC_date, __pyx_t_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3109; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; /* "pandas/tslib.pyx":3110 * self.LC_date_time = date_time[0] * self.LC_date = date_time[1] * self.LC_time = date_time[2] # <<<<<<<<<<<<<< * * def __calc_timezone(self): */ __pyx_t_6 = __Pyx_GetItemInt_List(__pyx_v_date_time, 2, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(__pyx_t_6 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3110; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_6); if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_LC_time, __pyx_t_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3110; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; /* "pandas/tslib.pyx":3067 * self.am_pm = am_pm * * def __calc_date_time(self): # <<<<<<<<<<<<<< * # Set self.date_time, self.date, & self.time by using * # time.strftime(). */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("pandas.tslib.LocaleTime.__calc_date_time", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_time_tuple); __Pyx_XDECREF(__pyx_v_date_time); __Pyx_XDECREF(__pyx_v_replacement_pairs); __Pyx_XDECREF(__pyx_v_offset); __Pyx_XDECREF(__pyx_v_directive); __Pyx_XDECREF(__pyx_v_current_format); __Pyx_XDECREF(__pyx_v_old); __Pyx_XDECREF(__pyx_v_new); __Pyx_XDECREF(__pyx_v_U_W); __Pyx_XDECREF(__pyx_v_tz_values); __Pyx_XDECREF(__pyx_v_tz); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/tslib.pyx":3112 * self.LC_time = date_time[2] * * def __calc_timezone(self): # <<<<<<<<<<<<<< * # Set self.timezone by using time.tzname. * # Do not worry about possibility of time.tzname[0] == timetzname[1] */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5tslib_10LocaleTime_13__calc_timezone(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5tslib_10LocaleTime_13__calc_timezone = {__Pyx_NAMESTR("__calc_timezone"), (PyCFunction)__pyx_pw_6pandas_5tslib_10LocaleTime_13__calc_timezone, METH_O, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5tslib_10LocaleTime_13__calc_timezone(PyObject *__pyx_self, PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__calc_timezone (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_5tslib_10LocaleTime_12__calc_timezone(__pyx_self, ((PyObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5tslib_10LocaleTime_12__calc_timezone(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) { PyObject *__pyx_v_no_saving = NULL; PyObject *__pyx_v_has_saving = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; int __pyx_t_6; int __pyx_t_7; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__calc_timezone", 0); /* "pandas/tslib.pyx":3116 * # Do not worry about possibility of time.tzname[0] == timetzname[1] * # and time.daylight; handle that in strptime . * try: # <<<<<<<<<<<<<< * time.tzset() * except AttributeError: */ { __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:*/ { /* "pandas/tslib.pyx":3117 * # and time.daylight; handle that in strptime . * try: * time.tzset() # <<<<<<<<<<<<<< * except AttributeError: * pass */ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_time); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3117; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_tzset); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3117; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyObject_Call(__pyx_t_5, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3117; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L10_try_end; __pyx_L3_error:; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; /* "pandas/tslib.pyx":3118 * try: * time.tzset() * except AttributeError: # <<<<<<<<<<<<<< * pass * no_saving = frozenset(["utc", "gmt", time.tzname[0].lower()]) */ __pyx_t_6 = PyErr_ExceptionMatches(__pyx_builtin_AttributeError); if (__pyx_t_6) { PyErr_Restore(0,0,0); goto __pyx_L4_exception_handled; } goto __pyx_L5_except_error; __pyx_L5_except_error:; __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); goto __pyx_L1_error; __pyx_L4_exception_handled:; __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); __pyx_L10_try_end:; } /* "pandas/tslib.pyx":3120 * except AttributeError: * pass * no_saving = frozenset(["utc", "gmt", time.tzname[0].lower()]) # <<<<<<<<<<<<<< * if time.daylight: * has_saving = frozenset([time.tzname[1].lower()]) */ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_time); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3120; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_tzname); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3120; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_5, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_4 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3120; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_lower); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3120; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyObject_Call(__pyx_t_5, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3120; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyList_New(3); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3120; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_n_s_utc); PyList_SET_ITEM(__pyx_t_5, 0, __pyx_n_s_utc); __Pyx_GIVEREF(__pyx_n_s_utc); __Pyx_INCREF(__pyx_n_s_gmt); PyList_SET_ITEM(__pyx_t_5, 1, __pyx_n_s_gmt); __Pyx_GIVEREF(__pyx_n_s_gmt); PyList_SET_ITEM(__pyx_t_5, 2, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3120; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyObject_Call(((PyObject *)((PyObject*)(&PyFrozenSet_Type))), __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3120; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_no_saving = ((PyObject*)__pyx_t_5); __pyx_t_5 = 0; /* "pandas/tslib.pyx":3121 * pass * no_saving = frozenset(["utc", "gmt", time.tzname[0].lower()]) * if time.daylight: # <<<<<<<<<<<<<< * has_saving = frozenset([time.tzname[1].lower()]) * else: */ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_time); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3121; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_daylight); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3121; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3121; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_7) { /* "pandas/tslib.pyx":3122 * no_saving = frozenset(["utc", "gmt", time.tzname[0].lower()]) * if time.daylight: * has_saving = frozenset([time.tzname[1].lower()]) # <<<<<<<<<<<<<< * else: * has_saving = frozenset() */ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_time); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3122; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_tzname); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3122; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_5, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_4 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3122; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_lower); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3122; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyObject_Call(__pyx_t_5, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3122; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyList_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3122; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); PyList_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3122; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyObject_Call(((PyObject *)((PyObject*)(&PyFrozenSet_Type))), __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3122; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_has_saving = ((PyObject*)__pyx_t_5); __pyx_t_5 = 0; goto __pyx_L11; } /*else*/ { /* "pandas/tslib.pyx":3124 * has_saving = frozenset([time.tzname[1].lower()]) * else: * has_saving = frozenset() # <<<<<<<<<<<<<< * self.timezone = (no_saving, has_saving) * */ __pyx_t_5 = PyObject_Call(((PyObject *)((PyObject*)(&PyFrozenSet_Type))), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3124; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_v_has_saving = ((PyObject*)__pyx_t_5); __pyx_t_5 = 0; } __pyx_L11:; /* "pandas/tslib.pyx":3125 * else: * has_saving = frozenset() * self.timezone = (no_saving, has_saving) # <<<<<<<<<<<<<< * * */ __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3125; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_v_no_saving); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_no_saving); __Pyx_GIVEREF(__pyx_v_no_saving); __Pyx_INCREF(__pyx_v_has_saving); PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_v_has_saving); __Pyx_GIVEREF(__pyx_v_has_saving); if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_timezone, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3125; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "pandas/tslib.pyx":3112 * self.LC_time = date_time[2] * * def __calc_timezone(self): # <<<<<<<<<<<<<< * # Set self.timezone by using time.tzname. * # Do not worry about possibility of time.tzname[0] == timetzname[1] */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("pandas.tslib.LocaleTime.__calc_timezone", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_no_saving); __Pyx_XDECREF(__pyx_v_has_saving); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/tslib.pyx":3131 * """Handle conversion from format directives to regexes.""" * * def __init__(self, locale_time=None): # <<<<<<<<<<<<<< * """Create keys/values. * */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5tslib_6TimeRE_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6pandas_5tslib_6TimeRE___init__[] = "Create keys/values.\n\n Order of execution is important for dependency reasons.\n\n "; static PyMethodDef __pyx_mdef_6pandas_5tslib_6TimeRE_1__init__ = {__Pyx_NAMESTR("__init__"), (PyCFunction)__pyx_pw_6pandas_5tslib_6TimeRE_1__init__, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_5tslib_6TimeRE___init__)}; static PyObject *__pyx_pw_6pandas_5tslib_6TimeRE_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_self = 0; PyObject *__pyx_v_locale_time = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_locale_time,0}; PyObject* values[2] = {0,0}; values[1] = ((PyObject *)((PyObject *)Py_None)); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_locale_time); if (value) { values[1] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3131; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_self = values[0]; __pyx_v_locale_time = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3131; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.tslib.TimeRE.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pandas_5tslib_6TimeRE___init__(__pyx_self, __pyx_v_self, __pyx_v_locale_time); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_gb_6pandas_5tslib_6TimeRE_8__init___2generator(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */ /* "pandas/tslib.pyx":3164 * 'b': self.__seqToRE(self.locale_time.a_month[1:], 'b'), * 'p': self.__seqToRE(self.locale_time.am_pm, 'p'), * 'Z': self.__seqToRE((tz for tz_names in self.locale_time.timezone # <<<<<<<<<<<<<< * for tz in tz_names), * 'Z'), */ static PyObject *__pyx_pf_6pandas_5tslib_6TimeRE_8__init___genexpr(PyObject *__pyx_self) { struct __pyx_obj_6pandas_5tslib___pyx_scope_struct_1_genexpr *__pyx_cur_scope; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("genexpr", 0); __pyx_cur_scope = (struct __pyx_obj_6pandas_5tslib___pyx_scope_struct_1_genexpr *)__pyx_tp_new_6pandas_5tslib___pyx_scope_struct_1_genexpr(__pyx_ptype_6pandas_5tslib___pyx_scope_struct_1_genexpr, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_cur_scope)) { __Pyx_RefNannyFinishContext(); return NULL; } __Pyx_GOTREF(__pyx_cur_scope); __pyx_cur_scope->__pyx_outer_scope = (struct __pyx_obj_6pandas_5tslib___pyx_scope_struct____init__ *) __pyx_self; __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_outer_scope)); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope); { __pyx_GeneratorObject *gen = __Pyx_Generator_New((__pyx_generator_body_t) __pyx_gb_6pandas_5tslib_6TimeRE_8__init___2generator, (PyObject *) __pyx_cur_scope); if (unlikely(!gen)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3164; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; } /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("pandas.tslib.TimeRE.__init__.genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_DECREF(((PyObject *)__pyx_cur_scope)); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_gb_6pandas_5tslib_6TimeRE_8__init___2generator(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value) /* generator body */ { struct __pyx_obj_6pandas_5tslib___pyx_scope_struct_1_genexpr *__pyx_cur_scope = ((struct __pyx_obj_6pandas_5tslib___pyx_scope_struct_1_genexpr *)__pyx_generator->closure); PyObject *__pyx_r = NULL; PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; Py_ssize_t __pyx_t_3; PyObject *(*__pyx_t_4)(PyObject *); Py_ssize_t __pyx_t_5; PyObject *(*__pyx_t_6)(PyObject *); PyObject *__pyx_t_7 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("None", 0); switch (__pyx_generator->resume_label) { case 0: goto __pyx_L3_first_run; case 1: goto __pyx_L8_resume_from_yield; default: /* CPython raises the right error here */ __Pyx_RefNannyFinishContext(); return NULL; } __pyx_L3_first_run:; if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3164; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3164; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_self, __pyx_n_s_locale_time); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3164; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_timezone); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3164; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (PyList_CheckExact(__pyx_t_2) || PyTuple_CheckExact(__pyx_t_2)) { __pyx_t_1 = __pyx_t_2; __Pyx_INCREF(__pyx_t_1); __pyx_t_3 = 0; __pyx_t_4 = NULL; } else { __pyx_t_3 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3164; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = Py_TYPE(__pyx_t_1)->tp_iternext; } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; for (;;) { if (!__pyx_t_4 && PyList_CheckExact(__pyx_t_1)) { if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_1)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_3); __Pyx_INCREF(__pyx_t_2); __pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3164; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3164; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif } else if (!__pyx_t_4 && PyTuple_CheckExact(__pyx_t_1)) { if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_1)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_3); __Pyx_INCREF(__pyx_t_2); __pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3164; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3164; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif } else { __pyx_t_2 = __pyx_t_4(__pyx_t_1); if (unlikely(!__pyx_t_2)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3164; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } break; } __Pyx_GOTREF(__pyx_t_2); } __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_tz_names); __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_tz_names, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/tslib.pyx":3165 * 'p': self.__seqToRE(self.locale_time.am_pm, 'p'), * 'Z': self.__seqToRE((tz for tz_names in self.locale_time.timezone * for tz in tz_names), # <<<<<<<<<<<<<< * 'Z'), * '%': '%'}) */ if (PyList_CheckExact(__pyx_cur_scope->__pyx_v_tz_names) || PyTuple_CheckExact(__pyx_cur_scope->__pyx_v_tz_names)) { __pyx_t_2 = __pyx_cur_scope->__pyx_v_tz_names; __Pyx_INCREF(__pyx_t_2); __pyx_t_5 = 0; __pyx_t_6 = NULL; } else { __pyx_t_5 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_cur_scope->__pyx_v_tz_names); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3165; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_6 = Py_TYPE(__pyx_t_2)->tp_iternext; } for (;;) { if (!__pyx_t_6 && PyList_CheckExact(__pyx_t_2)) { if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_2)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_7 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_5); __Pyx_INCREF(__pyx_t_7); __pyx_t_5++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3165; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_7 = PySequence_ITEM(__pyx_t_2, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3165; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif } else if (!__pyx_t_6 && PyTuple_CheckExact(__pyx_t_2)) { if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_2)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_7 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_5); __Pyx_INCREF(__pyx_t_7); __pyx_t_5++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3165; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_7 = PySequence_ITEM(__pyx_t_2, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3165; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif } else { __pyx_t_7 = __pyx_t_6(__pyx_t_2); if (unlikely(!__pyx_t_7)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3165; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } break; } __Pyx_GOTREF(__pyx_t_7); } __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_tz); __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_tz, __pyx_t_7); __Pyx_GIVEREF(__pyx_t_7); __pyx_t_7 = 0; /* "pandas/tslib.pyx":3164 * 'b': self.__seqToRE(self.locale_time.a_month[1:], 'b'), * 'p': self.__seqToRE(self.locale_time.am_pm, 'p'), * 'Z': self.__seqToRE((tz for tz_names in self.locale_time.timezone # <<<<<<<<<<<<<< * for tz in tz_names), * 'Z'), */ __Pyx_INCREF(__pyx_cur_scope->__pyx_v_tz); __pyx_r = __pyx_cur_scope->__pyx_v_tz; __Pyx_XGIVEREF(__pyx_t_1); __pyx_cur_scope->__pyx_t_0 = __pyx_t_1; __Pyx_XGIVEREF(__pyx_t_2); __pyx_cur_scope->__pyx_t_1 = __pyx_t_2; __pyx_cur_scope->__pyx_t_2 = __pyx_t_3; __pyx_cur_scope->__pyx_t_3 = __pyx_t_4; __pyx_cur_scope->__pyx_t_4 = __pyx_t_5; __pyx_cur_scope->__pyx_t_5 = __pyx_t_6; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); /* return from generator, yielding value */ __pyx_generator->resume_label = 1; return __pyx_r; __pyx_L8_resume_from_yield:; __pyx_t_1 = __pyx_cur_scope->__pyx_t_0; __pyx_cur_scope->__pyx_t_0 = 0; __Pyx_XGOTREF(__pyx_t_1); __pyx_t_2 = __pyx_cur_scope->__pyx_t_1; __pyx_cur_scope->__pyx_t_1 = 0; __Pyx_XGOTREF(__pyx_t_2); __pyx_t_3 = __pyx_cur_scope->__pyx_t_2; __pyx_t_4 = __pyx_cur_scope->__pyx_t_3; __pyx_t_5 = __pyx_cur_scope->__pyx_t_4; __pyx_t_6 = __pyx_cur_scope->__pyx_t_5; if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3164; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* function exit code */ PyErr_SetNone(PyExc_StopIteration); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_7); __Pyx_AddTraceback("genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_L0:; __Pyx_XDECREF(__pyx_r); __pyx_generator->resume_label = -1; __Pyx_Generator_clear((PyObject*)__pyx_generator); __Pyx_RefNannyFinishContext(); return NULL; } /* "pandas/tslib.pyx":3131 * """Handle conversion from format directives to regexes.""" * * def __init__(self, locale_time=None): # <<<<<<<<<<<<<< * """Create keys/values. * */ static PyObject *__pyx_pf_6pandas_5tslib_6TimeRE___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_locale_time) { struct __pyx_obj_6pandas_5tslib___pyx_scope_struct____init__ *__pyx_cur_scope; PyObject *__pyx_v_base = 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_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__init__", 0); __pyx_cur_scope = (struct __pyx_obj_6pandas_5tslib___pyx_scope_struct____init__ *)__pyx_tp_new_6pandas_5tslib___pyx_scope_struct____init__(__pyx_ptype_6pandas_5tslib___pyx_scope_struct____init__, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_cur_scope)) { __Pyx_RefNannyFinishContext(); return NULL; } __Pyx_GOTREF(__pyx_cur_scope); __pyx_cur_scope->__pyx_v_self = __pyx_v_self; __Pyx_INCREF(__pyx_cur_scope->__pyx_v_self); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_self); /* "pandas/tslib.pyx":3137 * * """ * if locale_time: # <<<<<<<<<<<<<< * self.locale_time = locale_time * else: */ __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_locale_time); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3137; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__pyx_t_1) { /* "pandas/tslib.pyx":3138 * """ * if locale_time: * self.locale_time = locale_time # <<<<<<<<<<<<<< * else: * self.locale_time = LocaleTime() */ if (__Pyx_PyObject_SetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_locale_time, __pyx_v_locale_time) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3138; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L3; } /*else*/ { /* "pandas/tslib.pyx":3140 * self.locale_time = locale_time * else: * self.locale_time = LocaleTime() # <<<<<<<<<<<<<< * base = super(TimeRE, self) * base.__init__({ */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_LocaleTime); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3140; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyObject_Call(__pyx_t_2, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3140; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__Pyx_PyObject_SetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_locale_time, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3140; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } __pyx_L3:; /* "pandas/tslib.pyx":3141 * else: * self.locale_time = LocaleTime() * base = super(TimeRE, self) # <<<<<<<<<<<<<< * base.__init__({ * # The " \d" part of the regex is to make %c from ANSI C work */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_TimeRE); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3141; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3141; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __Pyx_INCREF(__pyx_cur_scope->__pyx_v_self); PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_cur_scope->__pyx_v_self); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_self); __pyx_t_3 = 0; __pyx_t_3 = PyObject_Call(__pyx_builtin_super, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3141; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_base = __pyx_t_3; __pyx_t_3 = 0; /* "pandas/tslib.pyx":3142 * self.locale_time = LocaleTime() * base = super(TimeRE, self) * base.__init__({ # <<<<<<<<<<<<<< * # The " \d" part of the regex is to make %c from ANSI C work * 'd': r"(?P3[0-1]|[1-2]\d|0[1-9]|[1-9]| [1-9])", */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_base, __pyx_n_s_init); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3142; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3142; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_d, __pyx_kp_s_P_d_3_0_1_1_2_d_0_1_9_1_9_1_9) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3142; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_f, __pyx_kp_s_P_f_0_9_1_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3142; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_H, __pyx_kp_s_P_H_2_0_3_0_1_d_d) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3142; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_I, __pyx_kp_s_P_I_1_0_2_0_1_9_1_9) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3142; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_j, __pyx_kp_s_P_j_36_0_6_3_0_5_d_1_2_d_d_0_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3142; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_m, __pyx_kp_s_P_m_1_0_2_0_1_9_1_9) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3142; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_M, __pyx_kp_s_P_M_0_5_d_d) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3142; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_S, __pyx_kp_s_P_S_6_0_1_0_5_d_d) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3142; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_U, __pyx_kp_s_P_U_5_0_3_0_4_d_d) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3142; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_w, __pyx_kp_s_P_w_0_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3142; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_y, __pyx_kp_s_P_y_d_d) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3142; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_Y, __pyx_kp_s_P_Y_d_d_d_d) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3142; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/tslib.pyx":3159 * # 4 digits? * 'Y': r"(?P\d\d\d\d)", * 'A': self.__seqToRE(self.locale_time.f_weekday, 'A'), # <<<<<<<<<<<<<< * 'a': self.__seqToRE(self.locale_time.a_weekday, 'a'), * 'B': self.__seqToRE(self.locale_time.f_month[1:], 'B'), */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_TimeRE__seqToRE); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3159; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_locale_time); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3159; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_f_weekday); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3159; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3159; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_6); __Pyx_INCREF(__pyx_n_s_A); PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_n_s_A); __Pyx_GIVEREF(__pyx_n_s_A); __pyx_t_6 = 0; __pyx_t_6 = PyObject_Call(__pyx_t_4, __pyx_t_5, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3159; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_A, __pyx_t_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3142; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; /* "pandas/tslib.pyx":3160 * 'Y': r"(?P\d\d\d\d)", * 'A': self.__seqToRE(self.locale_time.f_weekday, 'A'), * 'a': self.__seqToRE(self.locale_time.a_weekday, 'a'), # <<<<<<<<<<<<<< * 'B': self.__seqToRE(self.locale_time.f_month[1:], 'B'), * 'b': self.__seqToRE(self.locale_time.a_month[1:], 'b'), */ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_TimeRE__seqToRE); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3160; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_locale_time); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3160; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_a_weekday); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3160; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3160; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __Pyx_INCREF(__pyx_n_s_a); PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_n_s_a); __Pyx_GIVEREF(__pyx_n_s_a); __pyx_t_4 = 0; __pyx_t_4 = PyObject_Call(__pyx_t_6, __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3160; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_a, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3142; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "pandas/tslib.pyx":3161 * 'A': self.__seqToRE(self.locale_time.f_weekday, 'A'), * 'a': self.__seqToRE(self.locale_time.a_weekday, 'a'), * 'B': self.__seqToRE(self.locale_time.f_month[1:], 'B'), # <<<<<<<<<<<<<< * 'b': self.__seqToRE(self.locale_time.a_month[1:], 'b'), * 'p': self.__seqToRE(self.locale_time.am_pm, 'p'), */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_TimeRE__seqToRE); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3161; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_locale_time); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3161; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_f_month); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3161; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyObject_GetSlice(__pyx_t_6, 1, 0, NULL, NULL, &__pyx_slice__86, 1, 0, 1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3161; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3161; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __Pyx_INCREF(__pyx_n_s_B); PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_n_s_B); __Pyx_GIVEREF(__pyx_n_s_B); __pyx_t_5 = 0; __pyx_t_5 = PyObject_Call(__pyx_t_4, __pyx_t_6, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3161; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_B, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3142; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "pandas/tslib.pyx":3162 * 'a': self.__seqToRE(self.locale_time.a_weekday, 'a'), * 'B': self.__seqToRE(self.locale_time.f_month[1:], 'B'), * 'b': self.__seqToRE(self.locale_time.a_month[1:], 'b'), # <<<<<<<<<<<<<< * 'p': self.__seqToRE(self.locale_time.am_pm, 'p'), * 'Z': self.__seqToRE((tz for tz_names in self.locale_time.timezone */ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_TimeRE__seqToRE); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3162; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_locale_time); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3162; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_a_month); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3162; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = __Pyx_PyObject_GetSlice(__pyx_t_4, 1, 0, NULL, NULL, &__pyx_slice__87, 1, 0, 1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3162; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3162; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_6); __Pyx_INCREF(__pyx_n_s_b); PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_n_s_b); __Pyx_GIVEREF(__pyx_n_s_b); __pyx_t_6 = 0; __pyx_t_6 = PyObject_Call(__pyx_t_5, __pyx_t_4, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3162; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_b, __pyx_t_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3142; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; /* "pandas/tslib.pyx":3163 * 'B': self.__seqToRE(self.locale_time.f_month[1:], 'B'), * 'b': self.__seqToRE(self.locale_time.a_month[1:], 'b'), * 'p': self.__seqToRE(self.locale_time.am_pm, 'p'), # <<<<<<<<<<<<<< * 'Z': self.__seqToRE((tz for tz_names in self.locale_time.timezone * for tz in tz_names), */ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_TimeRE__seqToRE); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3163; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_locale_time); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3163; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_am_pm); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3163; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3163; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __Pyx_INCREF(__pyx_n_s_p); PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_n_s_p); __Pyx_GIVEREF(__pyx_n_s_p); __pyx_t_5 = 0; __pyx_t_5 = PyObject_Call(__pyx_t_6, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3163; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_p, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3142; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "pandas/tslib.pyx":3164 * 'b': self.__seqToRE(self.locale_time.a_month[1:], 'b'), * 'p': self.__seqToRE(self.locale_time.am_pm, 'p'), * 'Z': self.__seqToRE((tz for tz_names in self.locale_time.timezone # <<<<<<<<<<<<<< * for tz in tz_names), * 'Z'), */ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_TimeRE__seqToRE); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3164; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = __pyx_pf_6pandas_5tslib_6TimeRE_8__init___genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3164; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3164; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __Pyx_INCREF(__pyx_n_s_Z_2); PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_n_s_Z_2); __Pyx_GIVEREF(__pyx_n_s_Z_2); __pyx_t_4 = 0; __pyx_t_4 = PyObject_Call(__pyx_t_5, __pyx_t_6, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3164; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_Z_2, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3142; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (PyDict_SetItem(__pyx_t_2, __pyx_kp_s__36, __pyx_kp_s__36) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3142; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/tslib.pyx":3142 * self.locale_time = LocaleTime() * base = super(TimeRE, self) * base.__init__({ # <<<<<<<<<<<<<< * # The " \d" part of the regex is to make %c from ANSI C work * 'd': r"(?P3[0-1]|[1-2]\d|0[1-9]|[1-9]| [1-9])", */ __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3142; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_Call(__pyx_t_3, __pyx_t_4, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3142; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/tslib.pyx":3168 * 'Z'), * '%': '%'}) * base.__setitem__('W', base.__getitem__('U').replace('U', 'W')) # <<<<<<<<<<<<<< * base.__setitem__('c', self.pattern(self.locale_time.LC_date_time)) * base.__setitem__('x', self.pattern(self.locale_time.LC_date)) */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_base, __pyx_n_s_setitem); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3168; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_base, __pyx_n_s_getitem); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3168; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = PyObject_Call(__pyx_t_4, __pyx_tuple__88, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3168; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_replace); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3168; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyObject_Call(__pyx_t_4, __pyx_tuple__89, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3168; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3168; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_n_s_W); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_n_s_W); __Pyx_GIVEREF(__pyx_n_s_W); PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3168; __pyx_clineno = __LINE__; goto __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_3); __pyx_t_3 = 0; /* "pandas/tslib.pyx":3169 * '%': '%'}) * base.__setitem__('W', base.__getitem__('U').replace('U', 'W')) * base.__setitem__('c', self.pattern(self.locale_time.LC_date_time)) # <<<<<<<<<<<<<< * base.__setitem__('x', self.pattern(self.locale_time.LC_date)) * base.__setitem__('X', self.pattern(self.locale_time.LC_time)) */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_base, __pyx_n_s_setitem); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3169; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_pattern); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3169; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_locale_time); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3169; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_LC_date_time); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3169; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3169; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyObject_Call(__pyx_t_4, __pyx_t_2, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3169; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3169; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_n_s_c_2); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_c_2); __Pyx_GIVEREF(__pyx_n_s_c_2); PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyObject_Call(__pyx_t_3, __pyx_t_2, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3169; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; /* "pandas/tslib.pyx":3170 * base.__setitem__('W', base.__getitem__('U').replace('U', 'W')) * base.__setitem__('c', self.pattern(self.locale_time.LC_date_time)) * base.__setitem__('x', self.pattern(self.locale_time.LC_date)) # <<<<<<<<<<<<<< * base.__setitem__('X', self.pattern(self.locale_time.LC_time)) * */ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_base, __pyx_n_s_setitem); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3170; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_pattern); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3170; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_locale_time); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3170; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_LC_date); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3170; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3170; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyObject_Call(__pyx_t_2, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3170; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3170; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_n_s_x_2); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_n_s_x_2); __Pyx_GIVEREF(__pyx_n_s_x_2); PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyObject_Call(__pyx_t_6, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3170; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "pandas/tslib.pyx":3171 * base.__setitem__('c', self.pattern(self.locale_time.LC_date_time)) * base.__setitem__('x', self.pattern(self.locale_time.LC_date)) * base.__setitem__('X', self.pattern(self.locale_time.LC_time)) # <<<<<<<<<<<<<< * * def __seqToRE(self, to_convert, directive): */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_base, __pyx_n_s_setitem); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3171; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_pattern); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3171; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_locale_time); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3171; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_LC_time); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3171; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3171; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3171; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3171; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(__pyx_n_s_X_2); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_n_s_X_2); __Pyx_GIVEREF(__pyx_n_s_X_2); PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_Call(__pyx_t_4, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3171; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/tslib.pyx":3131 * """Handle conversion from format directives to regexes.""" * * def __init__(self, locale_time=None): # <<<<<<<<<<<<<< * """Create keys/values. * */ /* 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_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("pandas.tslib.TimeRE.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_base); __Pyx_DECREF(((PyObject *)__pyx_cur_scope)); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/tslib.pyx":3173 * base.__setitem__('X', self.pattern(self.locale_time.LC_time)) * * def __seqToRE(self, to_convert, directive): # <<<<<<<<<<<<<< * """Convert a list to a regex string for matching a directive. * */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5tslib_6TimeRE_3__seqToRE(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6pandas_5tslib_6TimeRE_2__seqToRE[] = "Convert a list to a regex string for matching a directive.\n\n Want possible matching values to be from longest to shortest. This\n prevents the possibility of a match occuring for a value that also\n a substring of a larger value that should have matched (e.g., 'abc'\n matching when 'abcdef' should have been the match).\n\n "; static PyMethodDef __pyx_mdef_6pandas_5tslib_6TimeRE_3__seqToRE = {__Pyx_NAMESTR("__seqToRE"), (PyCFunction)__pyx_pw_6pandas_5tslib_6TimeRE_3__seqToRE, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_5tslib_6TimeRE_2__seqToRE)}; static PyObject *__pyx_pw_6pandas_5tslib_6TimeRE_3__seqToRE(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { CYTHON_UNUSED PyObject *__pyx_v_self = 0; PyObject *__pyx_v_to_convert = 0; PyObject *__pyx_v_directive = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__seqToRE (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_to_convert,&__pyx_n_s_directive,0}; PyObject* values[3] = {0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_to_convert)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("__seqToRE", 1, 3, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3173; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_directive)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("__seqToRE", 1, 3, 3, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3173; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__seqToRE") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3173; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 3) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); } __pyx_v_self = values[0]; __pyx_v_to_convert = values[1]; __pyx_v_directive = values[2]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("__seqToRE", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3173; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.tslib.TimeRE.__seqToRE", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pandas_5tslib_6TimeRE_2__seqToRE(__pyx_self, __pyx_v_self, __pyx_v_to_convert, __pyx_v_directive); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_gb_6pandas_5tslib_6TimeRE_9__seqToRE_2generator1(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */ /* "pandas/tslib.pyx":3188 * else: * return '' * regex = '|'.join(re_escape(stuff) for stuff in to_convert) # <<<<<<<<<<<<<< * regex = '(?P<%s>%s' % (directive, regex) * return '%s)' % regex */ static PyObject *__pyx_pf_6pandas_5tslib_6TimeRE_9__seqToRE_genexpr(PyObject *__pyx_self) { struct __pyx_obj_6pandas_5tslib___pyx_scope_struct_3_genexpr *__pyx_cur_scope; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("genexpr", 0); __pyx_cur_scope = (struct __pyx_obj_6pandas_5tslib___pyx_scope_struct_3_genexpr *)__pyx_tp_new_6pandas_5tslib___pyx_scope_struct_3_genexpr(__pyx_ptype_6pandas_5tslib___pyx_scope_struct_3_genexpr, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_cur_scope)) { __Pyx_RefNannyFinishContext(); return NULL; } __Pyx_GOTREF(__pyx_cur_scope); __pyx_cur_scope->__pyx_outer_scope = (struct __pyx_obj_6pandas_5tslib___pyx_scope_struct_2___seqToRE *) __pyx_self; __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_outer_scope)); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope); { __pyx_GeneratorObject *gen = __Pyx_Generator_New((__pyx_generator_body_t) __pyx_gb_6pandas_5tslib_6TimeRE_9__seqToRE_2generator1, (PyObject *) __pyx_cur_scope); if (unlikely(!gen)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3188; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; } /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("pandas.tslib.TimeRE.__seqToRE.genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_DECREF(((PyObject *)__pyx_cur_scope)); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_gb_6pandas_5tslib_6TimeRE_9__seqToRE_2generator1(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value) /* generator body */ { struct __pyx_obj_6pandas_5tslib___pyx_scope_struct_3_genexpr *__pyx_cur_scope = ((struct __pyx_obj_6pandas_5tslib___pyx_scope_struct_3_genexpr *)__pyx_generator->closure); PyObject *__pyx_r = NULL; PyObject *__pyx_t_1 = NULL; Py_ssize_t __pyx_t_2; PyObject *(*__pyx_t_3)(PyObject *); PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("None", 0); switch (__pyx_generator->resume_label) { case 0: goto __pyx_L3_first_run; case 1: goto __pyx_L6_resume_from_yield; default: /* CPython raises the right error here */ __Pyx_RefNannyFinishContext(); return NULL; } __pyx_L3_first_run:; if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3188; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_to_convert)) { __Pyx_RaiseClosureNameError("to_convert"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3188; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } if (PyList_CheckExact(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_to_convert) || PyTuple_CheckExact(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_to_convert)) { __pyx_t_1 = __pyx_cur_scope->__pyx_outer_scope->__pyx_v_to_convert; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0; __pyx_t_3 = NULL; } else { __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_to_convert); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3188; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = Py_TYPE(__pyx_t_1)->tp_iternext; } for (;;) { if (!__pyx_t_3 && PyList_CheckExact(__pyx_t_1)) { if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3188; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3188; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif } else if (!__pyx_t_3 && PyTuple_CheckExact(__pyx_t_1)) { if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3188; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3188; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif } else { __pyx_t_4 = __pyx_t_3(__pyx_t_1); if (unlikely(!__pyx_t_4)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3188; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } break; } __Pyx_GOTREF(__pyx_t_4); } __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_stuff); __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_stuff, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_re_escape); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3188; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3188; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_cur_scope->__pyx_v_stuff); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_cur_scope->__pyx_v_stuff); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_stuff); __pyx_t_6 = PyObject_Call(__pyx_t_4, __pyx_t_5, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3188; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_r = __pyx_t_6; __pyx_t_6 = 0; __Pyx_XGIVEREF(__pyx_t_1); __pyx_cur_scope->__pyx_t_0 = __pyx_t_1; __pyx_cur_scope->__pyx_t_1 = __pyx_t_2; __pyx_cur_scope->__pyx_t_2 = __pyx_t_3; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); /* return from generator, yielding value */ __pyx_generator->resume_label = 1; return __pyx_r; __pyx_L6_resume_from_yield:; __pyx_t_1 = __pyx_cur_scope->__pyx_t_0; __pyx_cur_scope->__pyx_t_0 = 0; __Pyx_XGOTREF(__pyx_t_1); __pyx_t_2 = __pyx_cur_scope->__pyx_t_1; __pyx_t_3 = __pyx_cur_scope->__pyx_t_2; if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3188; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* function exit code */ PyErr_SetNone(PyExc_StopIteration); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_L0:; __Pyx_XDECREF(__pyx_r); __pyx_generator->resume_label = -1; __Pyx_Generator_clear((PyObject*)__pyx_generator); __Pyx_RefNannyFinishContext(); return NULL; } /* "pandas/tslib.pyx":3173 * base.__setitem__('X', self.pattern(self.locale_time.LC_time)) * * def __seqToRE(self, to_convert, directive): # <<<<<<<<<<<<<< * """Convert a list to a regex string for matching a directive. * */ static PyObject *__pyx_pf_6pandas_5tslib_6TimeRE_2__seqToRE(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, PyObject *__pyx_v_to_convert, PyObject *__pyx_v_directive) { struct __pyx_obj_6pandas_5tslib___pyx_scope_struct_2___seqToRE *__pyx_cur_scope; PyObject *__pyx_v_value = NULL; PyObject *__pyx_v_regex = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; Py_ssize_t __pyx_t_4; PyObject *(*__pyx_t_5)(PyObject *); int __pyx_t_6; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__seqToRE", 0); __pyx_cur_scope = (struct __pyx_obj_6pandas_5tslib___pyx_scope_struct_2___seqToRE *)__pyx_tp_new_6pandas_5tslib___pyx_scope_struct_2___seqToRE(__pyx_ptype_6pandas_5tslib___pyx_scope_struct_2___seqToRE, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_cur_scope)) { __Pyx_RefNannyFinishContext(); return NULL; } __Pyx_GOTREF(__pyx_cur_scope); __pyx_cur_scope->__pyx_v_to_convert = __pyx_v_to_convert; __Pyx_INCREF(__pyx_cur_scope->__pyx_v_to_convert); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_to_convert); /* "pandas/tslib.pyx":3182 * * """ * to_convert = sorted(to_convert, key=len, reverse=True) # <<<<<<<<<<<<<< * for value in to_convert: * if value != '': */ __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3182; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_cur_scope->__pyx_v_to_convert); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_cur_scope->__pyx_v_to_convert); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_to_convert); __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3182; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_GetBuiltinName(__pyx_n_s_len); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3182; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_key, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3182; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_reverse, Py_True) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3182; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_3 = PyObject_Call(__pyx_builtin_sorted, __pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3182; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_to_convert); __Pyx_DECREF_SET(__pyx_cur_scope->__pyx_v_to_convert, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/tslib.pyx":3183 * """ * to_convert = sorted(to_convert, key=len, reverse=True) * for value in to_convert: # <<<<<<<<<<<<<< * if value != '': * break */ if (PyList_CheckExact(__pyx_cur_scope->__pyx_v_to_convert) || PyTuple_CheckExact(__pyx_cur_scope->__pyx_v_to_convert)) { __pyx_t_3 = __pyx_cur_scope->__pyx_v_to_convert; __Pyx_INCREF(__pyx_t_3); __pyx_t_4 = 0; __pyx_t_5 = NULL; } else { __pyx_t_4 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_cur_scope->__pyx_v_to_convert); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3183; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = Py_TYPE(__pyx_t_3)->tp_iternext; } for (;;) { if (!__pyx_t_5 && PyList_CheckExact(__pyx_t_3)) { if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_3)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_2 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3183; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_2 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3183; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif } else if (!__pyx_t_5 && PyTuple_CheckExact(__pyx_t_3)) { if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_3)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3183; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_2 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3183; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif } else { __pyx_t_2 = __pyx_t_5(__pyx_t_3); if (unlikely(!__pyx_t_2)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3183; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } break; } __Pyx_GOTREF(__pyx_t_2); } __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_2); __pyx_t_2 = 0; /* "pandas/tslib.pyx":3184 * to_convert = sorted(to_convert, key=len, reverse=True) * for value in to_convert: * if value != '': # <<<<<<<<<<<<<< * break * else: */ __pyx_t_6 = (__Pyx_PyString_Equals(__pyx_v_value, __pyx_kp_s__13, Py_NE)); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3184; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__pyx_t_6) { /* "pandas/tslib.pyx":3185 * for value in to_convert: * if value != '': * break # <<<<<<<<<<<<<< * else: * return '' */ goto __pyx_L4_break; } } /*else*/ { /* "pandas/tslib.pyx":3187 * break * else: * return '' # <<<<<<<<<<<<<< * regex = '|'.join(re_escape(stuff) for stuff in to_convert) * regex = '(?P<%s>%s' % (directive, regex) */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_kp_s__13); __pyx_r = __pyx_kp_s__13; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L0; } __pyx_L4_break:; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/tslib.pyx":3188 * else: * return '' * regex = '|'.join(re_escape(stuff) for stuff in to_convert) # <<<<<<<<<<<<<< * regex = '(?P<%s>%s' % (directive, regex) * return '%s)' % regex */ __pyx_t_3 = __pyx_pf_6pandas_5tslib_6TimeRE_9__seqToRE_genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3188; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_PyString_Join(__pyx_kp_s__90, __pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3188; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_regex = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; /* "pandas/tslib.pyx":3189 * return '' * regex = '|'.join(re_escape(stuff) for stuff in to_convert) * regex = '(?P<%s>%s' % (directive, regex) # <<<<<<<<<<<<<< * return '%s)' % regex * */ __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3189; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_directive); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_directive); __Pyx_GIVEREF(__pyx_v_directive); __Pyx_INCREF(__pyx_v_regex); PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_regex); __Pyx_GIVEREF(__pyx_v_regex); __pyx_t_3 = __Pyx_PyString_Format(__pyx_kp_s_P_s_s, __pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3189; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF_SET(__pyx_v_regex, ((PyObject*)__pyx_t_3)); __pyx_t_3 = 0; /* "pandas/tslib.pyx":3190 * regex = '|'.join(re_escape(stuff) for stuff in to_convert) * regex = '(?P<%s>%s' % (directive, regex) * return '%s)' % regex # <<<<<<<<<<<<<< * * def pattern(self, format): */ __Pyx_XDECREF(__pyx_r); __pyx_t_3 = __Pyx_PyString_Format(__pyx_kp_s_s_3, __pyx_v_regex); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3190; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; /* "pandas/tslib.pyx":3173 * base.__setitem__('X', self.pattern(self.locale_time.LC_time)) * * def __seqToRE(self, to_convert, directive): # <<<<<<<<<<<<<< * """Convert a list to a regex string for matching a directive. * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("pandas.tslib.TimeRE.__seqToRE", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_value); __Pyx_XDECREF(__pyx_v_regex); __Pyx_DECREF(((PyObject *)__pyx_cur_scope)); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/tslib.pyx":3192 * return '%s)' % regex * * def pattern(self, format): # <<<<<<<<<<<<<< * """Return regex pattern for the format string. * */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5tslib_6TimeRE_5pattern(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6pandas_5tslib_6TimeRE_4pattern[] = "Return regex pattern for the format string.\n\n Need to make sure that any characters that might be interpreted as\n regex syntax are escaped.\n\n "; static PyMethodDef __pyx_mdef_6pandas_5tslib_6TimeRE_5pattern = {__Pyx_NAMESTR("pattern"), (PyCFunction)__pyx_pw_6pandas_5tslib_6TimeRE_5pattern, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_5tslib_6TimeRE_4pattern)}; static PyObject *__pyx_pw_6pandas_5tslib_6TimeRE_5pattern(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_self = 0; PyObject *__pyx_v_format = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("pattern (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_format,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_format)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("pattern", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3192; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "pattern") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3192; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } __pyx_v_self = values[0]; __pyx_v_format = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("pattern", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3192; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.tslib.TimeRE.pattern", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pandas_5tslib_6TimeRE_4pattern(__pyx_self, __pyx_v_self, __pyx_v_format); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5tslib_6TimeRE_4pattern(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_format) { PyObject *__pyx_v_processed_format = NULL; PyObject *__pyx_v_regex_chars = NULL; PyObject *__pyx_v_whitespace_replacement = NULL; PyObject *__pyx_v_directive_index = 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_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("pattern", 0); __Pyx_INCREF(__pyx_v_format); /* "pandas/tslib.pyx":3199 * * """ * processed_format = '' # <<<<<<<<<<<<<< * # The sub() call escapes all characters that might be misconstrued * # as regex syntax. Cannot use re.escape since we have to deal with */ __Pyx_INCREF(__pyx_kp_s__13); __pyx_v_processed_format = __pyx_kp_s__13; /* "pandas/tslib.pyx":3203 * # as regex syntax. Cannot use re.escape since we have to deal with * # format directives (%m, etc.). * regex_chars = re_compile(r"([\\.^$*+?\(\){}\[\]|])") # <<<<<<<<<<<<<< * format = regex_chars.sub(r"\\\1", format) * whitespace_replacement = re_compile('\s+') */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_re_compile); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3203; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyObject_Call(__pyx_t_1, __pyx_tuple__92, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3203; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_regex_chars = __pyx_t_2; __pyx_t_2 = 0; /* "pandas/tslib.pyx":3204 * # format directives (%m, etc.). * regex_chars = re_compile(r"([\\.^$*+?\(\){}\[\]|])") * format = regex_chars.sub(r"\\\1", format) # <<<<<<<<<<<<<< * whitespace_replacement = re_compile('\s+') * format = whitespace_replacement.sub('\s+', format) */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_regex_chars, __pyx_n_s_sub_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3204; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3204; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_kp_s_1); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_kp_s_1); __Pyx_GIVEREF(__pyx_kp_s_1); __Pyx_INCREF(__pyx_v_format); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_format); __Pyx_GIVEREF(__pyx_v_format); __pyx_t_3 = PyObject_Call(__pyx_t_2, __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3204; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF_SET(__pyx_v_format, __pyx_t_3); __pyx_t_3 = 0; /* "pandas/tslib.pyx":3205 * regex_chars = re_compile(r"([\\.^$*+?\(\){}\[\]|])") * format = regex_chars.sub(r"\\\1", format) * whitespace_replacement = re_compile('\s+') # <<<<<<<<<<<<<< * format = whitespace_replacement.sub('\s+', format) * while '%' in format: */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_re_compile); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3205; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = PyObject_Call(__pyx_t_3, __pyx_tuple__93, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3205; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_whitespace_replacement = __pyx_t_1; __pyx_t_1 = 0; /* "pandas/tslib.pyx":3206 * format = regex_chars.sub(r"\\\1", format) * whitespace_replacement = re_compile('\s+') * format = whitespace_replacement.sub('\s+', format) # <<<<<<<<<<<<<< * while '%' in format: * directive_index = format.index('%')+1 */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_whitespace_replacement, __pyx_n_s_sub_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3206; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3206; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_kp_s_s_4); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_kp_s_s_4); __Pyx_GIVEREF(__pyx_kp_s_s_4); __Pyx_INCREF(__pyx_v_format); PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_format); __Pyx_GIVEREF(__pyx_v_format); __pyx_t_2 = PyObject_Call(__pyx_t_1, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3206; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF_SET(__pyx_v_format, __pyx_t_2); __pyx_t_2 = 0; /* "pandas/tslib.pyx":3207 * whitespace_replacement = re_compile('\s+') * format = whitespace_replacement.sub('\s+', format) * while '%' in format: # <<<<<<<<<<<<<< * directive_index = format.index('%')+1 * processed_format = "%s%s%s" % (processed_format, */ while (1) { __pyx_t_4 = (__Pyx_PySequence_Contains(__pyx_kp_s__36, __pyx_v_format, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3207; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_5 = (__pyx_t_4 != 0); if (!__pyx_t_5) break; /* "pandas/tslib.pyx":3208 * format = whitespace_replacement.sub('\s+', format) * while '%' in format: * directive_index = format.index('%')+1 # <<<<<<<<<<<<<< * processed_format = "%s%s%s" % (processed_format, * format[:directive_index-1], */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_format, __pyx_n_s_index); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3208; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyObject_Call(__pyx_t_2, __pyx_tuple__94, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3208; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyNumber_Add(__pyx_t_3, __pyx_int_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3208; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF_SET(__pyx_v_directive_index, __pyx_t_2); __pyx_t_2 = 0; /* "pandas/tslib.pyx":3210 * directive_index = format.index('%')+1 * processed_format = "%s%s%s" % (processed_format, * format[:directive_index-1], # <<<<<<<<<<<<<< * self[format[directive_index]]) * format = format[directive_index+1:] */ __pyx_t_2 = PyNumber_Subtract(__pyx_v_directive_index, __pyx_int_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3210; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetSlice(__pyx_v_format, 0, 0, NULL, &__pyx_t_2, NULL, 0, 0, 1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3210; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/tslib.pyx":3211 * processed_format = "%s%s%s" % (processed_format, * format[:directive_index-1], * self[format[directive_index]]) # <<<<<<<<<<<<<< * format = format[directive_index+1:] * return "%s%s" % (processed_format, format) */ __pyx_t_2 = PyObject_GetItem(__pyx_v_format, __pyx_v_directive_index); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3211; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = PyObject_GetItem(__pyx_v_self, __pyx_t_2); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3211; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/tslib.pyx":3209 * while '%' in format: * directive_index = format.index('%')+1 * processed_format = "%s%s%s" % (processed_format, # <<<<<<<<<<<<<< * format[:directive_index-1], * self[format[directive_index]]) */ __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3209; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_processed_format); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_processed_format); __Pyx_GIVEREF(__pyx_v_processed_format); PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_3 = 0; __pyx_t_1 = 0; __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_s_s_s, __pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3209; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF_SET(__pyx_v_processed_format, __pyx_t_1); __pyx_t_1 = 0; /* "pandas/tslib.pyx":3212 * format[:directive_index-1], * self[format[directive_index]]) * format = format[directive_index+1:] # <<<<<<<<<<<<<< * return "%s%s" % (processed_format, format) * */ __pyx_t_1 = PyNumber_Add(__pyx_v_directive_index, __pyx_int_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3212; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetSlice(__pyx_v_format, 0, 0, &__pyx_t_1, NULL, NULL, 0, 0, 1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3212; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF_SET(__pyx_v_format, __pyx_t_2); __pyx_t_2 = 0; } /* "pandas/tslib.pyx":3213 * self[format[directive_index]]) * format = format[directive_index+1:] * return "%s%s" % (processed_format, format) # <<<<<<<<<<<<<< * * def compile(self, format): */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3213; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_processed_format); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_processed_format); __Pyx_GIVEREF(__pyx_v_processed_format); __Pyx_INCREF(__pyx_v_format); PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_format); __Pyx_GIVEREF(__pyx_v_format); __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_s_s_3, __pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3213; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "pandas/tslib.pyx":3192 * return '%s)' % regex * * def pattern(self, format): # <<<<<<<<<<<<<< * """Return regex pattern for the format string. * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("pandas.tslib.TimeRE.pattern", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_processed_format); __Pyx_XDECREF(__pyx_v_regex_chars); __Pyx_XDECREF(__pyx_v_whitespace_replacement); __Pyx_XDECREF(__pyx_v_directive_index); __Pyx_XDECREF(__pyx_v_format); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/tslib.pyx":3215 * return "%s%s" % (processed_format, format) * * def compile(self, format): # <<<<<<<<<<<<<< * """Return a compiled re object for the format string.""" * return re_compile(self.pattern(format), IGNORECASE) */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5tslib_6TimeRE_7compile(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6pandas_5tslib_6TimeRE_6compile[] = "Return a compiled re object for the format string."; static PyMethodDef __pyx_mdef_6pandas_5tslib_6TimeRE_7compile = {__Pyx_NAMESTR("compile"), (PyCFunction)__pyx_pw_6pandas_5tslib_6TimeRE_7compile, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_5tslib_6TimeRE_6compile)}; static PyObject *__pyx_pw_6pandas_5tslib_6TimeRE_7compile(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_self = 0; PyObject *__pyx_v_format = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("compile (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_format,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_format)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("compile", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3215; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "compile") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3215; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } __pyx_v_self = values[0]; __pyx_v_format = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("compile", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3215; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.tslib.TimeRE.compile", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pandas_5tslib_6TimeRE_6compile(__pyx_self, __pyx_v_self, __pyx_v_format); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5tslib_6TimeRE_6compile(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_format) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("compile", 0); /* "pandas/tslib.pyx":3217 * def compile(self, format): * """Return a compiled re object for the format string.""" * return re_compile(self.pattern(format), IGNORECASE) # <<<<<<<<<<<<<< * * _cache_lock = _thread_allocate_lock() */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_re_compile); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3217; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_pattern); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3217; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3217; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_v_format); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_format); __Pyx_GIVEREF(__pyx_v_format); __pyx_t_4 = PyObject_Call(__pyx_t_2, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3217; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_IGNORECASE); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3217; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3217; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_4 = 0; __pyx_t_3 = 0; __pyx_t_3 = PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3217; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; /* "pandas/tslib.pyx":3215 * return "%s%s" % (processed_format, format) * * def compile(self, format): # <<<<<<<<<<<<<< * """Return a compiled re object for the format string.""" * return re_compile(self.pattern(format), IGNORECASE) */ /* 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.tslib.TimeRE.compile", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/tslib.pyx":3226 * _regex_cache = {} * * def _calc_julian_from_U_or_W(year, week_of_year, day_of_week, week_starts_Mon): # <<<<<<<<<<<<<< * """Calculate the Julian day based on the year, week of the year, and day of * the week, with week_start_day representing whether the week of the year */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5tslib_99_calc_julian_from_U_or_W(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6pandas_5tslib_98_calc_julian_from_U_or_W[] = "Calculate the Julian day based on the year, week of the year, and day of\n the week, with week_start_day representing whether the week of the year\n assumes the week starts on Sunday or Monday (6 or 0)."; static PyMethodDef __pyx_mdef_6pandas_5tslib_99_calc_julian_from_U_or_W = {__Pyx_NAMESTR("_calc_julian_from_U_or_W"), (PyCFunction)__pyx_pw_6pandas_5tslib_99_calc_julian_from_U_or_W, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_5tslib_98_calc_julian_from_U_or_W)}; static PyObject *__pyx_pw_6pandas_5tslib_99_calc_julian_from_U_or_W(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_year = 0; PyObject *__pyx_v_week_of_year = 0; PyObject *__pyx_v_day_of_week = 0; PyObject *__pyx_v_week_starts_Mon = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_calc_julian_from_U_or_W (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_year,&__pyx_n_s_week_of_year,&__pyx_n_s_day_of_week,&__pyx_n_s_week_starts_Mon,0}; PyObject* values[4] = {0,0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_year)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_week_of_year)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("_calc_julian_from_U_or_W", 1, 4, 4, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3226; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_day_of_week)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("_calc_julian_from_U_or_W", 1, 4, 4, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3226; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_week_starts_Mon)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("_calc_julian_from_U_or_W", 1, 4, 4, 3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3226; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_calc_julian_from_U_or_W") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3226; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 4) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[3] = PyTuple_GET_ITEM(__pyx_args, 3); } __pyx_v_year = values[0]; __pyx_v_week_of_year = values[1]; __pyx_v_day_of_week = values[2]; __pyx_v_week_starts_Mon = values[3]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("_calc_julian_from_U_or_W", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3226; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.tslib._calc_julian_from_U_or_W", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pandas_5tslib_98_calc_julian_from_U_or_W(__pyx_self, __pyx_v_year, __pyx_v_week_of_year, __pyx_v_day_of_week, __pyx_v_week_starts_Mon); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5tslib_98_calc_julian_from_U_or_W(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_year, PyObject *__pyx_v_week_of_year, PyObject *__pyx_v_day_of_week, PyObject *__pyx_v_week_starts_Mon) { PyObject *__pyx_v_first_weekday = NULL; PyObject *__pyx_v_week_0_length = NULL; PyObject *__pyx_v_days_to_week = 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_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_calc_julian_from_U_or_W", 0); __Pyx_INCREF(__pyx_v_day_of_week); /* "pandas/tslib.pyx":3230 * the week, with week_start_day representing whether the week of the year * assumes the week starts on Sunday or Monday (6 or 0).""" * first_weekday = datetime_date(year, 1, 1).weekday() # <<<<<<<<<<<<<< * # If we are dealing with the %U directive (week starts on Sunday), it's * # easier to just shift the view to Sunday being the first day of the */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_datetime_date); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3230; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3230; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_year); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_year); __Pyx_GIVEREF(__pyx_v_year); __Pyx_INCREF(__pyx_int_1); PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_int_1); __Pyx_GIVEREF(__pyx_int_1); __Pyx_INCREF(__pyx_int_1); PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_int_1); __Pyx_GIVEREF(__pyx_int_1); __pyx_t_3 = PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3230; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_weekday); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3230; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyObject_Call(__pyx_t_2, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3230; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_first_weekday = __pyx_t_3; __pyx_t_3 = 0; /* "pandas/tslib.pyx":3234 * # easier to just shift the view to Sunday being the first day of the * # week. * if not week_starts_Mon: # <<<<<<<<<<<<<< * first_weekday = (first_weekday + 1) % 7 * day_of_week = (day_of_week + 1) % 7 */ __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_week_starts_Mon); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3234; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_5 = ((!__pyx_t_4) != 0); if (__pyx_t_5) { /* "pandas/tslib.pyx":3235 * # week. * if not week_starts_Mon: * first_weekday = (first_weekday + 1) % 7 # <<<<<<<<<<<<<< * day_of_week = (day_of_week + 1) % 7 * # Need to watch out for a week 0 (when the first day of the year is not */ __pyx_t_3 = PyNumber_Add(__pyx_v_first_weekday, __pyx_int_1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3235; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = PyNumber_Remainder(__pyx_t_3, __pyx_int_7); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3235; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF_SET(__pyx_v_first_weekday, __pyx_t_2); __pyx_t_2 = 0; /* "pandas/tslib.pyx":3236 * if not week_starts_Mon: * first_weekday = (first_weekday + 1) % 7 * day_of_week = (day_of_week + 1) % 7 # <<<<<<<<<<<<<< * # Need to watch out for a week 0 (when the first day of the year is not * # the same as that specified by %U or %W). */ __pyx_t_2 = PyNumber_Add(__pyx_v_day_of_week, __pyx_int_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3236; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyNumber_Remainder(__pyx_t_2, __pyx_int_7); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3236; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF_SET(__pyx_v_day_of_week, __pyx_t_3); __pyx_t_3 = 0; goto __pyx_L3; } __pyx_L3:; /* "pandas/tslib.pyx":3239 * # Need to watch out for a week 0 (when the first day of the year is not * # the same as that specified by %U or %W). * week_0_length = (7 - first_weekday) % 7 # <<<<<<<<<<<<<< * if week_of_year == 0: * return 1 + day_of_week - first_weekday */ __pyx_t_3 = PyNumber_Subtract(__pyx_int_7, __pyx_v_first_weekday); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3239; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = PyNumber_Remainder(__pyx_t_3, __pyx_int_7); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3239; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_week_0_length = __pyx_t_2; __pyx_t_2 = 0; /* "pandas/tslib.pyx":3240 * # the same as that specified by %U or %W). * week_0_length = (7 - first_weekday) % 7 * if week_of_year == 0: # <<<<<<<<<<<<<< * return 1 + day_of_week - first_weekday * else: */ __pyx_t_2 = PyObject_RichCompare(__pyx_v_week_of_year, __pyx_int_0, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3240; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3240; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_5) { /* "pandas/tslib.pyx":3241 * week_0_length = (7 - first_weekday) % 7 * if week_of_year == 0: * return 1 + day_of_week - first_weekday # <<<<<<<<<<<<<< * else: * days_to_week = week_0_length + (7 * (week_of_year - 1)) */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = PyNumber_Add(__pyx_int_1, __pyx_v_day_of_week); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3241; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyNumber_Subtract(__pyx_t_2, __pyx_v_first_weekday); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3241; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; } /*else*/ { /* "pandas/tslib.pyx":3243 * return 1 + day_of_week - first_weekday * else: * days_to_week = week_0_length + (7 * (week_of_year - 1)) # <<<<<<<<<<<<<< * return 1 + days_to_week + day_of_week * */ __pyx_t_3 = PyNumber_Subtract(__pyx_v_week_of_year, __pyx_int_1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3243; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = PyNumber_Multiply(__pyx_int_7, __pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3243; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyNumber_Add(__pyx_v_week_0_length, __pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3243; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_days_to_week = __pyx_t_3; __pyx_t_3 = 0; /* "pandas/tslib.pyx":3244 * else: * days_to_week = week_0_length + (7 * (week_of_year - 1)) * return 1 + days_to_week + day_of_week # <<<<<<<<<<<<<< * * # def _strptime_time(data_string, format="%a %b %d %H:%M:%S %Y"): */ __Pyx_XDECREF(__pyx_r); __pyx_t_3 = PyNumber_Add(__pyx_int_1, __pyx_v_days_to_week); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3244; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = PyNumber_Add(__pyx_t_3, __pyx_v_day_of_week); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3244; __pyx_clineno = __LINE__; goto __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/tslib.pyx":3226 * _regex_cache = {} * * def _calc_julian_from_U_or_W(year, week_of_year, day_of_week, week_starts_Mon): # <<<<<<<<<<<<<< * """Calculate the Julian day based on the year, week of the year, and day of * the week, with week_start_day representing whether the week of the year */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("pandas.tslib._calc_julian_from_U_or_W", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_first_weekday); __Pyx_XDECREF(__pyx_v_week_0_length); __Pyx_XDECREF(__pyx_v_days_to_week); __Pyx_XDECREF(__pyx_v_day_of_week); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "datetime.pxd":126 * * * cdef inline _string_to_dts(object val, pandas_datetimestruct* dts): # <<<<<<<<<<<<<< * cdef int result * cdef char *tmp */ static CYTHON_INLINE PyObject *__pyx_f_8datetime__string_to_dts(PyObject *__pyx_v_val, pandas_datetimestruct *__pyx_v_dts) { int __pyx_v_result; char *__pyx_v_tmp; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; char *__pyx_t_3; Py_ssize_t __pyx_t_4; PyObject *__pyx_t_5 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_string_to_dts", 0); __Pyx_INCREF(__pyx_v_val); /* "datetime.pxd":130 * cdef char *tmp * * if PyUnicode_Check(val): # <<<<<<<<<<<<<< * val = PyUnicode_AsASCIIString(val); * */ __pyx_t_1 = (PyUnicode_Check(__pyx_v_val) != 0); if (__pyx_t_1) { /* "datetime.pxd":131 * * if PyUnicode_Check(val): * val = PyUnicode_AsASCIIString(val); # <<<<<<<<<<<<<< * * tmp = val */ __pyx_t_2 = PyUnicode_AsASCIIString(__pyx_v_val); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 131; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF_SET(__pyx_v_val, __pyx_t_2); __pyx_t_2 = 0; goto __pyx_L3; } __pyx_L3:; /* "datetime.pxd":133 * val = PyUnicode_AsASCIIString(val); * * tmp = val # <<<<<<<<<<<<<< * result = _cstring_to_dts(tmp, len(val), dts) * */ __pyx_t_3 = __Pyx_PyObject_AsString(__pyx_v_val); if (unlikely((!__pyx_t_3) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 133; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_tmp = __pyx_t_3; /* "datetime.pxd":134 * * tmp = val * result = _cstring_to_dts(tmp, len(val), dts) # <<<<<<<<<<<<<< * * if result == -1: */ __pyx_t_4 = PyObject_Length(__pyx_v_val); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 134; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_result = __pyx_f_8datetime__cstring_to_dts(__pyx_v_tmp, __pyx_t_4, __pyx_v_dts); /* "datetime.pxd":136 * result = _cstring_to_dts(tmp, len(val), dts) * * if result == -1: # <<<<<<<<<<<<<< * raise ValueError('Unable to parse %s' % str(val)) * */ __pyx_t_1 = ((__pyx_v_result == -1) != 0); if (__pyx_t_1) { /* "datetime.pxd":137 * * if result == -1: * raise ValueError('Unable to parse %s' % str(val)) # <<<<<<<<<<<<<< * * cdef inline int _cstring_to_dts(char *val, int length, */ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 137; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_val); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_val); __Pyx_GIVEREF(__pyx_v_val); __pyx_t_5 = PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), __pyx_t_2, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 137; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_Unable_to_parse_s, __pyx_t_5); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 137; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 137; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 137; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; {__pyx_filename = __pyx_f[1]; __pyx_lineno = 137; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } /* "datetime.pxd":126 * * * cdef inline _string_to_dts(object val, pandas_datetimestruct* dts): # <<<<<<<<<<<<<< * cdef int result * cdef char *tmp */ /* 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_5); __Pyx_AddTraceback("datetime._string_to_dts", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_val); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "datetime.pxd":139 * raise ValueError('Unable to parse %s' % str(val)) * * cdef inline int _cstring_to_dts(char *val, int length, # <<<<<<<<<<<<<< * pandas_datetimestruct* dts): * cdef: */ static CYTHON_INLINE int __pyx_f_8datetime__cstring_to_dts(char *__pyx_v_val, int __pyx_v_length, pandas_datetimestruct *__pyx_v_dts) { npy_bool __pyx_v_islocal; npy_bool __pyx_v_special; PANDAS_DATETIMEUNIT __pyx_v_out_bestunit; int __pyx_v_result; int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_cstring_to_dts", 0); /* "datetime.pxd":146 * int result * * result = parse_iso_8601_datetime(val, length, PANDAS_FR_ns, # <<<<<<<<<<<<<< * NPY_UNSAFE_CASTING, * dts, &islocal, &out_bestunit, &special) */ __pyx_v_result = parse_iso_8601_datetime(__pyx_v_val, __pyx_v_length, PANDAS_FR_ns, NPY_UNSAFE_CASTING, __pyx_v_dts, (&__pyx_v_islocal), (&__pyx_v_out_bestunit), (&__pyx_v_special)); /* "datetime.pxd":149 * NPY_UNSAFE_CASTING, * dts, &islocal, &out_bestunit, &special) * return result # <<<<<<<<<<<<<< * * */ __pyx_r = __pyx_v_result; goto __pyx_L0; /* "datetime.pxd":139 * raise ValueError('Unable to parse %s' % str(val)) * * cdef inline int _cstring_to_dts(char *val, int length, # <<<<<<<<<<<<<< * pandas_datetimestruct* dts): * cdef: */ /* function exit code */ __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "datetime.pxd":152 * * * cdef inline object _datetime64_to_datetime(int64_t val): # <<<<<<<<<<<<<< * cdef pandas_datetimestruct dts * pandas_datetime_to_datetimestruct(val, PANDAS_FR_ns, &dts) */ static CYTHON_INLINE PyObject *__pyx_f_8datetime__datetime64_to_datetime(__pyx_t_5numpy_int64_t __pyx_v_val) { pandas_datetimestruct __pyx_v_dts; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_datetime64_to_datetime", 0); /* "datetime.pxd":154 * cdef inline object _datetime64_to_datetime(int64_t val): * cdef pandas_datetimestruct dts * pandas_datetime_to_datetimestruct(val, PANDAS_FR_ns, &dts) # <<<<<<<<<<<<<< * return _dts_to_pydatetime(&dts) * */ pandas_datetime_to_datetimestruct(__pyx_v_val, PANDAS_FR_ns, (&__pyx_v_dts)); /* "datetime.pxd":155 * cdef pandas_datetimestruct dts * pandas_datetime_to_datetimestruct(val, PANDAS_FR_ns, &dts) * return _dts_to_pydatetime(&dts) # <<<<<<<<<<<<<< * * cdef inline object _dts_to_pydatetime(pandas_datetimestruct *dts): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_8datetime__dts_to_pydatetime((&__pyx_v_dts)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 155; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "datetime.pxd":152 * * * cdef inline object _datetime64_to_datetime(int64_t val): # <<<<<<<<<<<<<< * cdef pandas_datetimestruct dts * pandas_datetime_to_datetimestruct(val, PANDAS_FR_ns, &dts) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("datetime._datetime64_to_datetime", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "datetime.pxd":157 * return _dts_to_pydatetime(&dts) * * cdef inline object _dts_to_pydatetime(pandas_datetimestruct *dts): # <<<<<<<<<<<<<< * return PyDateTime_FromDateAndTime(dts.year, dts.month, * dts.day, dts.hour, */ static CYTHON_INLINE PyObject *__pyx_f_8datetime__dts_to_pydatetime(pandas_datetimestruct *__pyx_v_dts) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_dts_to_pydatetime", 0); /* "datetime.pxd":158 * * cdef inline object _dts_to_pydatetime(pandas_datetimestruct *dts): * return PyDateTime_FromDateAndTime(dts.year, dts.month, # <<<<<<<<<<<<<< * dts.day, dts.hour, * dts.min, dts.sec, dts.us) */ __Pyx_XDECREF(__pyx_r); /* "datetime.pxd":160 * return PyDateTime_FromDateAndTime(dts.year, dts.month, * dts.day, dts.hour, * dts.min, dts.sec, dts.us) # <<<<<<<<<<<<<< * * cdef inline int64_t _pydatetime_to_dts(object val, pandas_datetimestruct *dts): */ __pyx_t_1 = PyDateTime_FromDateAndTime(__pyx_v_dts->year, __pyx_v_dts->month, __pyx_v_dts->day, __pyx_v_dts->hour, __pyx_v_dts->min, __pyx_v_dts->sec, __pyx_v_dts->us); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 158; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); /* "datetime.pxd":158 * * cdef inline object _dts_to_pydatetime(pandas_datetimestruct *dts): * return PyDateTime_FromDateAndTime(dts.year, dts.month, # <<<<<<<<<<<<<< * dts.day, dts.hour, * dts.min, dts.sec, dts.us) */ __Pyx_INCREF(((PyObject *)__pyx_t_1)); __pyx_r = __pyx_t_1; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; /* "datetime.pxd":157 * return _dts_to_pydatetime(&dts) * * cdef inline object _dts_to_pydatetime(pandas_datetimestruct *dts): # <<<<<<<<<<<<<< * return PyDateTime_FromDateAndTime(dts.year, dts.month, * dts.day, dts.hour, */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("datetime._dts_to_pydatetime", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "datetime.pxd":162 * dts.min, dts.sec, dts.us) * * cdef inline int64_t _pydatetime_to_dts(object val, pandas_datetimestruct *dts): # <<<<<<<<<<<<<< * dts.year = PyDateTime_GET_YEAR(val) * dts.month = PyDateTime_GET_MONTH(val) */ static CYTHON_INLINE __pyx_t_5numpy_int64_t __pyx_f_8datetime__pydatetime_to_dts(PyObject *__pyx_v_val, pandas_datetimestruct *__pyx_v_dts) { __pyx_t_5numpy_int64_t __pyx_r; __Pyx_RefNannyDeclarations int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_pydatetime_to_dts", 0); /* "datetime.pxd":163 * * cdef inline int64_t _pydatetime_to_dts(object val, pandas_datetimestruct *dts): * dts.year = PyDateTime_GET_YEAR(val) # <<<<<<<<<<<<<< * dts.month = PyDateTime_GET_MONTH(val) * dts.day = PyDateTime_GET_DAY(val) */ if (!(likely(((__pyx_v_val) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_val, __pyx_ptype_8datetime_date))))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 163; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_dts->year = PyDateTime_GET_YEAR(((PyDateTime_Date *)__pyx_v_val)); /* "datetime.pxd":164 * cdef inline int64_t _pydatetime_to_dts(object val, pandas_datetimestruct *dts): * dts.year = PyDateTime_GET_YEAR(val) * dts.month = PyDateTime_GET_MONTH(val) # <<<<<<<<<<<<<< * dts.day = PyDateTime_GET_DAY(val) * dts.hour = PyDateTime_DATE_GET_HOUR(val) */ if (!(likely(((__pyx_v_val) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_val, __pyx_ptype_8datetime_date))))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 164; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_dts->month = PyDateTime_GET_MONTH(((PyDateTime_Date *)__pyx_v_val)); /* "datetime.pxd":165 * dts.year = PyDateTime_GET_YEAR(val) * dts.month = PyDateTime_GET_MONTH(val) * dts.day = PyDateTime_GET_DAY(val) # <<<<<<<<<<<<<< * dts.hour = PyDateTime_DATE_GET_HOUR(val) * dts.min = PyDateTime_DATE_GET_MINUTE(val) */ if (!(likely(((__pyx_v_val) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_val, __pyx_ptype_8datetime_date))))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 165; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_dts->day = PyDateTime_GET_DAY(((PyDateTime_Date *)__pyx_v_val)); /* "datetime.pxd":166 * dts.month = PyDateTime_GET_MONTH(val) * dts.day = PyDateTime_GET_DAY(val) * dts.hour = PyDateTime_DATE_GET_HOUR(val) # <<<<<<<<<<<<<< * dts.min = PyDateTime_DATE_GET_MINUTE(val) * dts.sec = PyDateTime_DATE_GET_SECOND(val) */ __pyx_v_dts->hour = PyDateTime_DATE_GET_HOUR(__pyx_v_val); /* "datetime.pxd":167 * dts.day = PyDateTime_GET_DAY(val) * dts.hour = PyDateTime_DATE_GET_HOUR(val) * dts.min = PyDateTime_DATE_GET_MINUTE(val) # <<<<<<<<<<<<<< * dts.sec = PyDateTime_DATE_GET_SECOND(val) * dts.us = PyDateTime_DATE_GET_MICROSECOND(val) */ __pyx_v_dts->min = PyDateTime_DATE_GET_MINUTE(__pyx_v_val); /* "datetime.pxd":168 * dts.hour = PyDateTime_DATE_GET_HOUR(val) * dts.min = PyDateTime_DATE_GET_MINUTE(val) * dts.sec = PyDateTime_DATE_GET_SECOND(val) # <<<<<<<<<<<<<< * dts.us = PyDateTime_DATE_GET_MICROSECOND(val) * dts.ps = dts.as = 0 */ __pyx_v_dts->sec = PyDateTime_DATE_GET_SECOND(__pyx_v_val); /* "datetime.pxd":169 * dts.min = PyDateTime_DATE_GET_MINUTE(val) * dts.sec = PyDateTime_DATE_GET_SECOND(val) * dts.us = PyDateTime_DATE_GET_MICROSECOND(val) # <<<<<<<<<<<<<< * dts.ps = dts.as = 0 * return pandas_datetimestruct_to_datetime(PANDAS_FR_ns, dts) */ __pyx_v_dts->us = PyDateTime_DATE_GET_MICROSECOND(__pyx_v_val); /* "datetime.pxd":170 * dts.sec = PyDateTime_DATE_GET_SECOND(val) * dts.us = PyDateTime_DATE_GET_MICROSECOND(val) * dts.ps = dts.as = 0 # <<<<<<<<<<<<<< * return pandas_datetimestruct_to_datetime(PANDAS_FR_ns, dts) * */ __pyx_v_dts->ps = 0; __pyx_v_dts->as = 0; /* "datetime.pxd":171 * dts.us = PyDateTime_DATE_GET_MICROSECOND(val) * dts.ps = dts.as = 0 * return pandas_datetimestruct_to_datetime(PANDAS_FR_ns, dts) # <<<<<<<<<<<<<< * * cdef inline int64_t _dtlike_to_datetime64(object val, */ __pyx_r = pandas_datetimestruct_to_datetime(PANDAS_FR_ns, __pyx_v_dts); goto __pyx_L0; /* "datetime.pxd":162 * dts.min, dts.sec, dts.us) * * cdef inline int64_t _pydatetime_to_dts(object val, pandas_datetimestruct *dts): # <<<<<<<<<<<<<< * dts.year = PyDateTime_GET_YEAR(val) * dts.month = PyDateTime_GET_MONTH(val) */ /* function exit code */ __pyx_L1_error:; __Pyx_WriteUnraisable("datetime._pydatetime_to_dts", __pyx_clineno, __pyx_lineno, __pyx_filename, 0); __pyx_r = 0; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "datetime.pxd":173 * return pandas_datetimestruct_to_datetime(PANDAS_FR_ns, dts) * * cdef inline int64_t _dtlike_to_datetime64(object val, # <<<<<<<<<<<<<< * pandas_datetimestruct *dts): * dts.year = val.year */ static CYTHON_INLINE __pyx_t_5numpy_int64_t __pyx_f_8datetime__dtlike_to_datetime64(PyObject *__pyx_v_val, pandas_datetimestruct *__pyx_v_dts) { __pyx_t_5numpy_int64_t __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; npy_int64 __pyx_t_2; npy_int32 __pyx_t_3; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_dtlike_to_datetime64", 0); /* "datetime.pxd":175 * cdef inline int64_t _dtlike_to_datetime64(object val, * pandas_datetimestruct *dts): * dts.year = val.year # <<<<<<<<<<<<<< * dts.month = val.month * dts.day = val.day */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_val, __pyx_n_s_year); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 175; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyInt_As_npy_int64(__pyx_t_1); if (unlikely((__pyx_t_2 == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 175; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_dts->year = __pyx_t_2; /* "datetime.pxd":176 * pandas_datetimestruct *dts): * dts.year = val.year * dts.month = val.month # <<<<<<<<<<<<<< * dts.day = val.day * dts.hour = val.hour */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_val, __pyx_n_s_month); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 176; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __Pyx_PyInt_As_npy_int32(__pyx_t_1); if (unlikely((__pyx_t_3 == (npy_int32)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 176; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_dts->month = __pyx_t_3; /* "datetime.pxd":177 * dts.year = val.year * dts.month = val.month * dts.day = val.day # <<<<<<<<<<<<<< * dts.hour = val.hour * dts.min = val.minute */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_val, __pyx_n_s_day); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 177; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __Pyx_PyInt_As_npy_int32(__pyx_t_1); if (unlikely((__pyx_t_3 == (npy_int32)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 177; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_dts->day = __pyx_t_3; /* "datetime.pxd":178 * dts.month = val.month * dts.day = val.day * dts.hour = val.hour # <<<<<<<<<<<<<< * dts.min = val.minute * dts.sec = val.second */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_val, __pyx_n_s_hour); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 178; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __Pyx_PyInt_As_npy_int32(__pyx_t_1); if (unlikely((__pyx_t_3 == (npy_int32)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 178; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_dts->hour = __pyx_t_3; /* "datetime.pxd":179 * dts.day = val.day * dts.hour = val.hour * dts.min = val.minute # <<<<<<<<<<<<<< * dts.sec = val.second * dts.us = val.microsecond */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_val, __pyx_n_s_minute); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 179; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __Pyx_PyInt_As_npy_int32(__pyx_t_1); if (unlikely((__pyx_t_3 == (npy_int32)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 179; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_dts->min = __pyx_t_3; /* "datetime.pxd":180 * dts.hour = val.hour * dts.min = val.minute * dts.sec = val.second # <<<<<<<<<<<<<< * dts.us = val.microsecond * dts.ps = dts.as = 0 */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_val, __pyx_n_s_second); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __Pyx_PyInt_As_npy_int32(__pyx_t_1); if (unlikely((__pyx_t_3 == (npy_int32)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_dts->sec = __pyx_t_3; /* "datetime.pxd":181 * dts.min = val.minute * dts.sec = val.second * dts.us = val.microsecond # <<<<<<<<<<<<<< * dts.ps = dts.as = 0 * return pandas_datetimestruct_to_datetime(PANDAS_FR_ns, dts) */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_val, __pyx_n_s_microsecond); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 181; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __Pyx_PyInt_As_npy_int32(__pyx_t_1); if (unlikely((__pyx_t_3 == (npy_int32)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 181; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_dts->us = __pyx_t_3; /* "datetime.pxd":182 * dts.sec = val.second * dts.us = val.microsecond * dts.ps = dts.as = 0 # <<<<<<<<<<<<<< * return pandas_datetimestruct_to_datetime(PANDAS_FR_ns, dts) * */ __pyx_v_dts->ps = 0; __pyx_v_dts->as = 0; /* "datetime.pxd":183 * dts.us = val.microsecond * dts.ps = dts.as = 0 * return pandas_datetimestruct_to_datetime(PANDAS_FR_ns, dts) # <<<<<<<<<<<<<< * * cdef inline int64_t _date_to_datetime64(object val, */ __pyx_r = pandas_datetimestruct_to_datetime(PANDAS_FR_ns, __pyx_v_dts); goto __pyx_L0; /* "datetime.pxd":173 * return pandas_datetimestruct_to_datetime(PANDAS_FR_ns, dts) * * cdef inline int64_t _dtlike_to_datetime64(object val, # <<<<<<<<<<<<<< * pandas_datetimestruct *dts): * dts.year = val.year */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_WriteUnraisable("datetime._dtlike_to_datetime64", __pyx_clineno, __pyx_lineno, __pyx_filename, 0); __pyx_r = 0; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "datetime.pxd":185 * return pandas_datetimestruct_to_datetime(PANDAS_FR_ns, dts) * * cdef inline int64_t _date_to_datetime64(object val, # <<<<<<<<<<<<<< * pandas_datetimestruct *dts): * dts.year = PyDateTime_GET_YEAR(val) */ static CYTHON_INLINE __pyx_t_5numpy_int64_t __pyx_f_8datetime__date_to_datetime64(PyObject *__pyx_v_val, pandas_datetimestruct *__pyx_v_dts) { __pyx_t_5numpy_int64_t __pyx_r; __Pyx_RefNannyDeclarations int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_date_to_datetime64", 0); /* "datetime.pxd":187 * cdef inline int64_t _date_to_datetime64(object val, * pandas_datetimestruct *dts): * dts.year = PyDateTime_GET_YEAR(val) # <<<<<<<<<<<<<< * dts.month = PyDateTime_GET_MONTH(val) * dts.day = PyDateTime_GET_DAY(val) */ if (!(likely(((__pyx_v_val) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_val, __pyx_ptype_8datetime_date))))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 187; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_dts->year = PyDateTime_GET_YEAR(((PyDateTime_Date *)__pyx_v_val)); /* "datetime.pxd":188 * pandas_datetimestruct *dts): * dts.year = PyDateTime_GET_YEAR(val) * dts.month = PyDateTime_GET_MONTH(val) # <<<<<<<<<<<<<< * dts.day = PyDateTime_GET_DAY(val) * dts.hour = dts.min = dts.sec = dts.us = 0 */ if (!(likely(((__pyx_v_val) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_val, __pyx_ptype_8datetime_date))))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 188; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_dts->month = PyDateTime_GET_MONTH(((PyDateTime_Date *)__pyx_v_val)); /* "datetime.pxd":189 * dts.year = PyDateTime_GET_YEAR(val) * dts.month = PyDateTime_GET_MONTH(val) * dts.day = PyDateTime_GET_DAY(val) # <<<<<<<<<<<<<< * dts.hour = dts.min = dts.sec = dts.us = 0 * dts.ps = dts.as = 0 */ if (!(likely(((__pyx_v_val) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_val, __pyx_ptype_8datetime_date))))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 189; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_dts->day = PyDateTime_GET_DAY(((PyDateTime_Date *)__pyx_v_val)); /* "datetime.pxd":190 * dts.month = PyDateTime_GET_MONTH(val) * dts.day = PyDateTime_GET_DAY(val) * dts.hour = dts.min = dts.sec = dts.us = 0 # <<<<<<<<<<<<<< * dts.ps = dts.as = 0 * return pandas_datetimestruct_to_datetime(PANDAS_FR_ns, dts) */ __pyx_v_dts->hour = 0; __pyx_v_dts->min = 0; __pyx_v_dts->sec = 0; __pyx_v_dts->us = 0; /* "datetime.pxd":191 * dts.day = PyDateTime_GET_DAY(val) * dts.hour = dts.min = dts.sec = dts.us = 0 * dts.ps = dts.as = 0 # <<<<<<<<<<<<<< * return pandas_datetimestruct_to_datetime(PANDAS_FR_ns, dts) * */ __pyx_v_dts->ps = 0; __pyx_v_dts->as = 0; /* "datetime.pxd":192 * dts.hour = dts.min = dts.sec = dts.us = 0 * dts.ps = dts.as = 0 * return pandas_datetimestruct_to_datetime(PANDAS_FR_ns, dts) # <<<<<<<<<<<<<< * */ __pyx_r = pandas_datetimestruct_to_datetime(PANDAS_FR_ns, __pyx_v_dts); goto __pyx_L0; /* "datetime.pxd":185 * return pandas_datetimestruct_to_datetime(PANDAS_FR_ns, dts) * * cdef inline int64_t _date_to_datetime64(object val, # <<<<<<<<<<<<<< * pandas_datetimestruct *dts): * dts.year = PyDateTime_GET_YEAR(val) */ /* function exit code */ __pyx_L1_error:; __Pyx_WriteUnraisable("datetime._date_to_datetime64", __pyx_clineno, __pyx_lineno, __pyx_filename, 0); __pyx_r = 0; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "numpy.pxd":196 * # 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 fullfill 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_copy_shape; 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_v_hasfields; int __pyx_r; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; int __pyx_t_5; int __pyx_t_6; int __pyx_t_7; PyObject *__pyx_t_8 = NULL; char *__pyx_t_9; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__getbuffer__", 0); if (__pyx_v_info != NULL) { __pyx_v_info->obj = Py_None; __Pyx_INCREF(Py_None); __Pyx_GIVEREF(__pyx_v_info->obj); } /* "numpy.pxd":202 * # of flags * * if info == NULL: return # <<<<<<<<<<<<<< * * cdef int copy_shape, i, ndim */ __pyx_t_1 = ((__pyx_v_info == NULL) != 0); if (__pyx_t_1) { __pyx_r = 0; goto __pyx_L0; } /* "numpy.pxd":205 * * cdef int copy_shape, i, ndim * cdef int endian_detector = 1 # <<<<<<<<<<<<<< * cdef bint little_endian = ((&endian_detector)[0] != 0) * */ __pyx_v_endian_detector = 1; /* "numpy.pxd":206 * cdef int copy_shape, 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); /* "numpy.pxd":208 * cdef bint little_endian = ((&endian_detector)[0] != 0) * * ndim = PyArray_NDIM(self) # <<<<<<<<<<<<<< * * if sizeof(npy_intp) != sizeof(Py_ssize_t): */ __pyx_v_ndim = PyArray_NDIM(__pyx_v_self); /* "numpy.pxd":210 * ndim = PyArray_NDIM(self) * * if sizeof(npy_intp) != sizeof(Py_ssize_t): # <<<<<<<<<<<<<< * copy_shape = 1 * else: */ __pyx_t_1 = (((sizeof(npy_intp)) != (sizeof(Py_ssize_t))) != 0); if (__pyx_t_1) { /* "numpy.pxd":211 * * if sizeof(npy_intp) != sizeof(Py_ssize_t): * copy_shape = 1 # <<<<<<<<<<<<<< * else: * copy_shape = 0 */ __pyx_v_copy_shape = 1; goto __pyx_L4; } /*else*/ { /* "numpy.pxd":213 * copy_shape = 1 * else: * copy_shape = 0 # <<<<<<<<<<<<<< * * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) */ __pyx_v_copy_shape = 0; } __pyx_L4:; /* "numpy.pxd":215 * copy_shape = 0 * * 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_1 = (((__pyx_v_flags & PyBUF_C_CONTIGUOUS) == PyBUF_C_CONTIGUOUS) != 0); if (__pyx_t_1) { /* "numpy.pxd":216 * * 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_3 = __pyx_t_2; } else { __pyx_t_3 = __pyx_t_1; } if (__pyx_t_3) { /* "numpy.pxd":217 * 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_4 = PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__95, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 217; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 217; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } /* "numpy.pxd":219 * 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_3 = (((__pyx_v_flags & PyBUF_F_CONTIGUOUS) == PyBUF_F_CONTIGUOUS) != 0); if (__pyx_t_3) { /* "numpy.pxd":220 * * 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_1 = ((!(PyArray_CHKFLAGS(__pyx_v_self, NPY_F_CONTIGUOUS) != 0)) != 0); __pyx_t_2 = __pyx_t_1; } else { __pyx_t_2 = __pyx_t_3; } if (__pyx_t_2) { /* "numpy.pxd":221 * 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_4 = PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__96, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 221; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 221; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } /* "numpy.pxd":223 * raise ValueError(u"ndarray is not Fortran contiguous") * * info.buf = PyArray_DATA(self) # <<<<<<<<<<<<<< * info.ndim = ndim * if copy_shape: */ __pyx_v_info->buf = PyArray_DATA(__pyx_v_self); /* "numpy.pxd":224 * * info.buf = PyArray_DATA(self) * info.ndim = ndim # <<<<<<<<<<<<<< * if copy_shape: * # Allocate new buffer for strides and shape info. */ __pyx_v_info->ndim = __pyx_v_ndim; /* "numpy.pxd":225 * info.buf = PyArray_DATA(self) * info.ndim = ndim * if copy_shape: # <<<<<<<<<<<<<< * # Allocate new buffer for strides and shape info. * # This is allocated as one block, strides first. */ __pyx_t_2 = (__pyx_v_copy_shape != 0); if (__pyx_t_2) { /* "numpy.pxd":228 * # Allocate new buffer for strides and shape info. * # This is allocated as one block, strides first. * info.strides = stdlib.malloc(sizeof(Py_ssize_t) * ndim * 2) # <<<<<<<<<<<<<< * info.shape = info.strides + ndim * for i in range(ndim): */ __pyx_v_info->strides = ((Py_ssize_t *)malloc((((sizeof(Py_ssize_t)) * ((size_t)__pyx_v_ndim)) * 2))); /* "numpy.pxd":229 * # This is allocated as one block, strides first. * info.strides = stdlib.malloc(sizeof(Py_ssize_t) * ndim * 2) * 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); /* "numpy.pxd":230 * info.strides = stdlib.malloc(sizeof(Py_ssize_t) * ndim * 2) * 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_5 = __pyx_v_ndim; for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) { __pyx_v_i = __pyx_t_6; /* "numpy.pxd":231 * 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]); /* "numpy.pxd":232 * 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]); } goto __pyx_L7; } /*else*/ { /* "numpy.pxd":234 * info.shape[i] = PyArray_DIMS(self)[i] * else: * info.strides = PyArray_STRIDES(self) # <<<<<<<<<<<<<< * info.shape = PyArray_DIMS(self) * info.suboffsets = NULL */ __pyx_v_info->strides = ((Py_ssize_t *)PyArray_STRIDES(__pyx_v_self)); /* "numpy.pxd":235 * 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_L7:; /* "numpy.pxd":236 * 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; /* "numpy.pxd":237 * 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); /* "numpy.pxd":238 * 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)); /* "numpy.pxd":241 * * cdef int t * cdef char* f = NULL # <<<<<<<<<<<<<< * cdef dtype descr = self.descr * cdef list stack */ __pyx_v_f = NULL; /* "numpy.pxd":242 * cdef int t * cdef char* f = NULL * cdef dtype descr = self.descr # <<<<<<<<<<<<<< * cdef list stack * cdef int offset */ __pyx_t_4 = ((PyObject *)__pyx_v_self->descr); __Pyx_INCREF(__pyx_t_4); __pyx_v_descr = ((PyArray_Descr *)__pyx_t_4); __pyx_t_4 = 0; /* "numpy.pxd":246 * cdef int offset * * cdef bint hasfields = PyDataType_HASFIELDS(descr) # <<<<<<<<<<<<<< * * if not hasfields and not copy_shape: */ __pyx_v_hasfields = PyDataType_HASFIELDS(__pyx_v_descr); /* "numpy.pxd":248 * cdef bint hasfields = PyDataType_HASFIELDS(descr) * * if not hasfields and not copy_shape: # <<<<<<<<<<<<<< * # do not call releasebuffer * info.obj = None */ __pyx_t_2 = ((!(__pyx_v_hasfields != 0)) != 0); if (__pyx_t_2) { __pyx_t_3 = ((!(__pyx_v_copy_shape != 0)) != 0); __pyx_t_1 = __pyx_t_3; } else { __pyx_t_1 = __pyx_t_2; } if (__pyx_t_1) { /* "numpy.pxd":250 * if not hasfields and not copy_shape: * # do not call releasebuffer * info.obj = None # <<<<<<<<<<<<<< * else: * # need to call releasebuffer */ __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_info->obj); __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = Py_None; goto __pyx_L10; } /*else*/ { /* "numpy.pxd":253 * else: * # need to call releasebuffer * info.obj = self # <<<<<<<<<<<<<< * * if not hasfields: */ __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); } __pyx_L10:; /* "numpy.pxd":255 * info.obj = self * * if not hasfields: # <<<<<<<<<<<<<< * t = descr.type_num * if ((descr.byteorder == '>' and little_endian) or */ __pyx_t_1 = ((!(__pyx_v_hasfields != 0)) != 0); if (__pyx_t_1) { /* "numpy.pxd":256 * * if not hasfields: * t = descr.type_num # <<<<<<<<<<<<<< * if ((descr.byteorder == '>' and little_endian) or * (descr.byteorder == '<' and not little_endian)): */ __pyx_t_5 = __pyx_v_descr->type_num; __pyx_v_t = __pyx_t_5; /* "numpy.pxd":257 * if not hasfields: * t = descr.type_num * if ((descr.byteorder == '>' and little_endian) or # <<<<<<<<<<<<<< * (descr.byteorder == '<' and not little_endian)): * raise ValueError(u"Non-native byte order not supported") */ __pyx_t_1 = ((__pyx_v_descr->byteorder == '>') != 0); if (__pyx_t_1) { __pyx_t_2 = (__pyx_v_little_endian != 0); } else { __pyx_t_2 = __pyx_t_1; } if (!__pyx_t_2) { /* "numpy.pxd":258 * t = descr.type_num * if ((descr.byteorder == '>' and little_endian) or * (descr.byteorder == '<' and not little_endian)): # <<<<<<<<<<<<<< * raise ValueError(u"Non-native byte order not supported") * if t == NPY_BYTE: f = "b" */ __pyx_t_1 = ((__pyx_v_descr->byteorder == '<') != 0); if (__pyx_t_1) { __pyx_t_3 = ((!(__pyx_v_little_endian != 0)) != 0); __pyx_t_7 = __pyx_t_3; } else { __pyx_t_7 = __pyx_t_1; } __pyx_t_1 = __pyx_t_7; } else { __pyx_t_1 = __pyx_t_2; } if (__pyx_t_1) { /* "numpy.pxd":259 * if ((descr.byteorder == '>' and little_endian) or * (descr.byteorder == '<' 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_4 = PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__97, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 259; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 259; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } /* "numpy.pxd":276 * 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) */ switch (__pyx_v_t) { /* "numpy.pxd":260 * (descr.byteorder == '<' 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" */ case NPY_BYTE: __pyx_v_f = __pyx_k_b; break; /* "numpy.pxd":261 * 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 = __pyx_k_B; break; /* "numpy.pxd":262 * 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 = __pyx_k_h; break; /* "numpy.pxd":263 * 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 = __pyx_k_H; break; /* "numpy.pxd":264 * 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 = __pyx_k_i; break; /* "numpy.pxd":265 * 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 = __pyx_k_I; break; /* "numpy.pxd":266 * 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 = __pyx_k_l; break; /* "numpy.pxd":267 * 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 = __pyx_k_L; break; /* "numpy.pxd":268 * 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 = __pyx_k_q; break; /* "numpy.pxd":269 * 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 = __pyx_k_Q; break; /* "numpy.pxd":270 * 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 = __pyx_k_f; break; /* "numpy.pxd":271 * 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 = __pyx_k_d; break; /* "numpy.pxd":272 * 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 = __pyx_k_g; break; /* "numpy.pxd":273 * 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 = __pyx_k_Zf; break; /* "numpy.pxd":274 * 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 = __pyx_k_Zd; break; /* "numpy.pxd":275 * 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 = __pyx_k_Zg; break; /* "numpy.pxd":276 * 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 = __pyx_k_O; break; default: /* "numpy.pxd":278 * elif t == NPY_OBJECT: f = "O" * else: * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) # <<<<<<<<<<<<<< * info.format = f * return */ __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_t); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 278; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_8 = PyUnicode_Format(__pyx_kp_u_unknown_dtype_code_in_numpy_pxd, __pyx_t_4); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 278; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 278; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_8); __Pyx_GIVEREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_8 = PyObject_Call(__pyx_builtin_ValueError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 278; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_Raise(__pyx_t_8, 0, 0, 0); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; {__pyx_filename = __pyx_f[2]; __pyx_lineno = 278; __pyx_clineno = __LINE__; goto __pyx_L1_error;} break; } /* "numpy.pxd":279 * else: * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) * info.format = f # <<<<<<<<<<<<<< * return * else: */ __pyx_v_info->format = __pyx_v_f; /* "numpy.pxd":280 * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) * info.format = f * return # <<<<<<<<<<<<<< * else: * info.format = stdlib.malloc(_buffer_format_string_len) */ __pyx_r = 0; goto __pyx_L0; } /*else*/ { /* "numpy.pxd":282 * return * else: * info.format = stdlib.malloc(_buffer_format_string_len) # <<<<<<<<<<<<<< * info.format[0] = '^' # Native data types, manual alignment * offset = 0 */ __pyx_v_info->format = ((char *)malloc(255)); /* "numpy.pxd":283 * else: * info.format = stdlib.malloc(_buffer_format_string_len) * info.format[0] = '^' # Native data types, manual alignment # <<<<<<<<<<<<<< * offset = 0 * f = _util_dtypestring(descr, info.format + 1, */ (__pyx_v_info->format[0]) = '^'; /* "numpy.pxd":284 * info.format = stdlib.malloc(_buffer_format_string_len) * info.format[0] = '^' # Native data types, manual alignment * offset = 0 # <<<<<<<<<<<<<< * f = _util_dtypestring(descr, info.format + 1, * info.format + _buffer_format_string_len, */ __pyx_v_offset = 0; /* "numpy.pxd":285 * info.format[0] = '^' # Native data types, manual alignment * offset = 0 * f = _util_dtypestring(descr, info.format + 1, # <<<<<<<<<<<<<< * info.format + _buffer_format_string_len, * &offset) */ __pyx_t_9 = __pyx_f_5numpy__util_dtypestring(__pyx_v_descr, (__pyx_v_info->format + 1), (__pyx_v_info->format + 255), (&__pyx_v_offset)); if (unlikely(__pyx_t_9 == NULL)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 285; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_f = __pyx_t_9; /* "numpy.pxd":288 * info.format + _buffer_format_string_len, * &offset) * f[0] = 0 # Terminate format string # <<<<<<<<<<<<<< * * def __releasebuffer__(ndarray self, Py_buffer* info): */ (__pyx_v_f[0]) = 0; } /* "numpy.pxd":196 * # 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 fullfill the PEP. */ /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_8); __Pyx_AddTraceback("numpy.ndarray.__getbuffer__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; if (__pyx_v_info != NULL && __pyx_v_info->obj != NULL) { __Pyx_GOTREF(__pyx_v_info->obj); __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = NULL; } goto __pyx_L2; __pyx_L0:; if (__pyx_v_info != NULL && __pyx_v_info->obj == Py_None) { __Pyx_GOTREF(Py_None); __Pyx_DECREF(Py_None); __pyx_v_info->obj = NULL; } __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_descr); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "numpy.pxd":290 * f[0] = 0 # Terminate format string * * def __releasebuffer__(ndarray self, Py_buffer* info): # <<<<<<<<<<<<<< * if PyArray_HASFIELDS(self): * stdlib.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); /* "numpy.pxd":291 * * def __releasebuffer__(ndarray self, Py_buffer* info): * if PyArray_HASFIELDS(self): # <<<<<<<<<<<<<< * stdlib.free(info.format) * if sizeof(npy_intp) != sizeof(Py_ssize_t): */ __pyx_t_1 = (PyArray_HASFIELDS(__pyx_v_self) != 0); if (__pyx_t_1) { /* "numpy.pxd":292 * def __releasebuffer__(ndarray self, Py_buffer* info): * if PyArray_HASFIELDS(self): * stdlib.free(info.format) # <<<<<<<<<<<<<< * if sizeof(npy_intp) != sizeof(Py_ssize_t): * stdlib.free(info.strides) */ free(__pyx_v_info->format); goto __pyx_L3; } __pyx_L3:; /* "numpy.pxd":293 * if PyArray_HASFIELDS(self): * stdlib.free(info.format) * if sizeof(npy_intp) != sizeof(Py_ssize_t): # <<<<<<<<<<<<<< * stdlib.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) { /* "numpy.pxd":294 * stdlib.free(info.format) * if sizeof(npy_intp) != sizeof(Py_ssize_t): * stdlib.free(info.strides) # <<<<<<<<<<<<<< * # info.shape was stored after info.strides in the same block * */ free(__pyx_v_info->strides); goto __pyx_L4; } __pyx_L4:; /* "numpy.pxd":290 * f[0] = 0 # Terminate format string * * def __releasebuffer__(ndarray self, Py_buffer* info): # <<<<<<<<<<<<<< * if PyArray_HASFIELDS(self): * stdlib.free(info.format) */ /* function exit code */ __Pyx_RefNannyFinishContext(); } /* "numpy.pxd":772 * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PyArray_MultiIterNew1", 0); /* "numpy.pxd":773 * * 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_filename = __pyx_f[2]; __pyx_lineno = 773; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "numpy.pxd":772 * 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; } /* "numpy.pxd":775 * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PyArray_MultiIterNew2", 0); /* "numpy.pxd":776 * * 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_filename = __pyx_f[2]; __pyx_lineno = 776; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "numpy.pxd":775 * 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; } /* "numpy.pxd":778 * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PyArray_MultiIterNew3", 0); /* "numpy.pxd":779 * * 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_filename = __pyx_f[2]; __pyx_lineno = 779; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "numpy.pxd":778 * 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; } /* "numpy.pxd":781 * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PyArray_MultiIterNew4", 0); /* "numpy.pxd":782 * * 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_filename = __pyx_f[2]; __pyx_lineno = 782; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "numpy.pxd":781 * 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; } /* "numpy.pxd":784 * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PyArray_MultiIterNew5", 0); /* "numpy.pxd":785 * * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): * return PyArray_MultiIterNew(5, a, b, c, d, e) # <<<<<<<<<<<<<< * * cdef inline char* _util_dtypestring(dtype descr, char* f, char* end, int* offset) except NULL: */ __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_filename = __pyx_f[2]; __pyx_lineno = 785; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "numpy.pxd":784 * 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; } /* "numpy.pxd":787 * return PyArray_MultiIterNew(5, a, b, c, d, e) * * 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; PyObject *__pyx_t_5 = NULL; int __pyx_t_6; int __pyx_t_7; int __pyx_t_8; int __pyx_t_9; long __pyx_t_10; char *__pyx_t_11; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_util_dtypestring", 0); /* "numpy.pxd":794 * cdef int delta_offset * cdef tuple i * cdef int endian_detector = 1 # <<<<<<<<<<<<<< * cdef bint little_endian = ((&endian_detector)[0] != 0) * cdef tuple fields */ __pyx_v_endian_detector = 1; /* "numpy.pxd":795 * cdef tuple i * 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); /* "numpy.pxd":798 * 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_filename = __pyx_f[2]; __pyx_lineno = 798; __pyx_clineno = __LINE__; goto __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_COMPILING_IN_CPYTHON __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_filename = __pyx_f[2]; __pyx_lineno = 798; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 798; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif __Pyx_XDECREF_SET(__pyx_v_childname, __pyx_t_3); __pyx_t_3 = 0; /* "numpy.pxd":799 * * for childname in descr.names: * fields = descr.fields[childname] # <<<<<<<<<<<<<< * child, new_offset = fields * */ __pyx_t_3 = PyObject_GetItem(__pyx_v_descr->fields, __pyx_v_childname); if (unlikely(__pyx_t_3 == NULL)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 799; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 799; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_XDECREF_SET(__pyx_v_fields, ((PyObject*)__pyx_t_3)); __pyx_t_3 = 0; /* "numpy.pxd":800 * 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; #if CYTHON_COMPILING_IN_CPYTHON Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 800; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON __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_filename = __pyx_f[2]; __pyx_lineno = 800; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 800; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); #endif } else { __Pyx_RaiseNoneNotIterableError(); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 800; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_dtype))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 800; __pyx_clineno = __LINE__; goto __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; /* "numpy.pxd":802 * 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_ptrdiff_t((__pyx_v_end - __pyx_v_f)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 802; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = __Pyx_PyInt_From_int((__pyx_v_offset[0])); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 802; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = PyNumber_Subtract(__pyx_v_new_offset, __pyx_t_3); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 802; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyNumber_Subtract(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 802; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyObject_RichCompare(__pyx_t_3, __pyx_int_15, Py_LT); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 802; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 802; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_6) { /* "numpy.pxd":803 * * if (end - f) - (new_offset - offset[0]) < 15: * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") # <<<<<<<<<<<<<< * * if ((child.byteorder == '>' and little_endian) or */ __pyx_t_5 = PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__98, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 803; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_Raise(__pyx_t_5, 0, 0, 0); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; {__pyx_filename = __pyx_f[2]; __pyx_lineno = 803; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } /* "numpy.pxd":805 * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") * * if ((child.byteorder == '>' and little_endian) or # <<<<<<<<<<<<<< * (child.byteorder == '<' and not little_endian)): * raise ValueError(u"Non-native byte order not supported") */ __pyx_t_6 = ((__pyx_v_child->byteorder == '>') != 0); if (__pyx_t_6) { __pyx_t_7 = (__pyx_v_little_endian != 0); } else { __pyx_t_7 = __pyx_t_6; } if (!__pyx_t_7) { /* "numpy.pxd":806 * * if ((child.byteorder == '>' and little_endian) or * (child.byteorder == '<' 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_6 = ((__pyx_v_child->byteorder == '<') != 0); if (__pyx_t_6) { __pyx_t_8 = ((!(__pyx_v_little_endian != 0)) != 0); __pyx_t_9 = __pyx_t_8; } else { __pyx_t_9 = __pyx_t_6; } __pyx_t_6 = __pyx_t_9; } else { __pyx_t_6 = __pyx_t_7; } if (__pyx_t_6) { /* "numpy.pxd":807 * if ((child.byteorder == '>' and little_endian) or * (child.byteorder == '<' 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_5 = PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__99, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 807; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_Raise(__pyx_t_5, 0, 0, 0); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; {__pyx_filename = __pyx_f[2]; __pyx_lineno = 807; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } /* "numpy.pxd":817 * * # Output padding bytes * while offset[0] < new_offset: # <<<<<<<<<<<<<< * f[0] = 120 # "x"; pad byte * f += 1 */ while (1) { __pyx_t_5 = __Pyx_PyInt_From_int((__pyx_v_offset[0])); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 817; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = PyObject_RichCompare(__pyx_t_5, __pyx_v_new_offset, Py_LT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 817; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 817; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (!__pyx_t_6) break; /* "numpy.pxd":818 * # Output padding bytes * while offset[0] < new_offset: * f[0] = 120 # "x"; pad byte # <<<<<<<<<<<<<< * f += 1 * offset[0] += 1 */ (__pyx_v_f[0]) = 120; /* "numpy.pxd":819 * while offset[0] < new_offset: * f[0] = 120 # "x"; pad byte * f += 1 # <<<<<<<<<<<<<< * offset[0] += 1 * */ __pyx_v_f = (__pyx_v_f + 1); /* "numpy.pxd":820 * f[0] = 120 # "x"; pad byte * f += 1 * offset[0] += 1 # <<<<<<<<<<<<<< * * offset[0] += child.itemsize */ __pyx_t_10 = 0; (__pyx_v_offset[__pyx_t_10]) = ((__pyx_v_offset[__pyx_t_10]) + 1); } /* "numpy.pxd":822 * offset[0] += 1 * * offset[0] += child.itemsize # <<<<<<<<<<<<<< * * if not PyDataType_HASFIELDS(child): */ __pyx_t_10 = 0; (__pyx_v_offset[__pyx_t_10]) = ((__pyx_v_offset[__pyx_t_10]) + __pyx_v_child->elsize); /* "numpy.pxd":824 * 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) { /* "numpy.pxd":825 * * if not PyDataType_HASFIELDS(child): * t = child.type_num # <<<<<<<<<<<<<< * if end - f < 5: * raise RuntimeError(u"Format string allocated too short.") */ __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_child->type_num); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 825; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_XDECREF_SET(__pyx_v_t, __pyx_t_3); __pyx_t_3 = 0; /* "numpy.pxd":826 * 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 (__pyx_t_6) { /* "numpy.pxd":827 * 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_3 = PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__100, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 827; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 827; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } /* "numpy.pxd":830 * * # 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_3 = PyInt_FromLong(NPY_BYTE); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 830; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 830; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 830; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_6) { (__pyx_v_f[0]) = 98; goto __pyx_L11; } /* "numpy.pxd":831 * # 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_5 = PyInt_FromLong(NPY_UBYTE); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 831; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 831; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 831; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_6) { (__pyx_v_f[0]) = 66; goto __pyx_L11; } /* "numpy.pxd":832 * 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_3 = PyInt_FromLong(NPY_SHORT); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 832; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 832; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 832; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_6) { (__pyx_v_f[0]) = 104; goto __pyx_L11; } /* "numpy.pxd":833 * 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_5 = PyInt_FromLong(NPY_USHORT); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 833; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 833; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 833; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_6) { (__pyx_v_f[0]) = 72; goto __pyx_L11; } /* "numpy.pxd":834 * 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_3 = PyInt_FromLong(NPY_INT); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 834; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 834; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 834; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_6) { (__pyx_v_f[0]) = 105; goto __pyx_L11; } /* "numpy.pxd":835 * 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_5 = PyInt_FromLong(NPY_UINT); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 835; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 835; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 835; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_6) { (__pyx_v_f[0]) = 73; goto __pyx_L11; } /* "numpy.pxd":836 * 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_3 = PyInt_FromLong(NPY_LONG); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 836; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 836; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 836; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_6) { (__pyx_v_f[0]) = 108; goto __pyx_L11; } /* "numpy.pxd":837 * 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_5 = PyInt_FromLong(NPY_ULONG); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 837; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 837; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 837; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_6) { (__pyx_v_f[0]) = 76; goto __pyx_L11; } /* "numpy.pxd":838 * 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_3 = PyInt_FromLong(NPY_LONGLONG); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 838; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 838; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 838; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_6) { (__pyx_v_f[0]) = 113; goto __pyx_L11; } /* "numpy.pxd":839 * 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_5 = PyInt_FromLong(NPY_ULONGLONG); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 839; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 839; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 839; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_6) { (__pyx_v_f[0]) = 81; goto __pyx_L11; } /* "numpy.pxd":840 * 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_3 = PyInt_FromLong(NPY_FLOAT); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 840; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 840; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 840; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_6) { (__pyx_v_f[0]) = 102; goto __pyx_L11; } /* "numpy.pxd":841 * 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_5 = PyInt_FromLong(NPY_DOUBLE); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 841; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 841; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 841; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_6) { (__pyx_v_f[0]) = 100; goto __pyx_L11; } /* "numpy.pxd":842 * 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_3 = PyInt_FromLong(NPY_LONGDOUBLE); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 842; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 842; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 842; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_6) { (__pyx_v_f[0]) = 103; goto __pyx_L11; } /* "numpy.pxd":843 * 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_5 = PyInt_FromLong(NPY_CFLOAT); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 843; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 843; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 843; __pyx_clineno = __LINE__; goto __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]) = 102; __pyx_v_f = (__pyx_v_f + 1); goto __pyx_L11; } /* "numpy.pxd":844 * 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_3 = PyInt_FromLong(NPY_CDOUBLE); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 844; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 844; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 844; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_6) { (__pyx_v_f[0]) = 90; (__pyx_v_f[1]) = 100; __pyx_v_f = (__pyx_v_f + 1); goto __pyx_L11; } /* "numpy.pxd":845 * 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_5 = PyInt_FromLong(NPY_CLONGDOUBLE); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 845; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 845; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 845; __pyx_clineno = __LINE__; goto __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]) = 103; __pyx_v_f = (__pyx_v_f + 1); goto __pyx_L11; } /* "numpy.pxd":846 * 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_3 = PyInt_FromLong(NPY_OBJECT); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 846; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 846; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 846; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_6) { (__pyx_v_f[0]) = 79; goto __pyx_L11; } /*else*/ { /* "numpy.pxd":848 * elif t == NPY_OBJECT: f[0] = 79 #"O" * else: * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) # <<<<<<<<<<<<<< * f += 1 * else: */ __pyx_t_5 = PyUnicode_Format(__pyx_kp_u_unknown_dtype_code_in_numpy_pxd, __pyx_v_t); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 848; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 848; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyObject_Call(__pyx_builtin_ValueError, __pyx_t_3, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 848; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_Raise(__pyx_t_5, 0, 0, 0); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; {__pyx_filename = __pyx_f[2]; __pyx_lineno = 848; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_L11:; /* "numpy.pxd":849 * 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); goto __pyx_L9; } /*else*/ { /* "numpy.pxd":853 * # Cython ignores struct boundary information ("T{...}"), * # so don't output it * f = _util_dtypestring(child, f, end, offset) # <<<<<<<<<<<<<< * return f * */ __pyx_t_11 = __pyx_f_5numpy__util_dtypestring(__pyx_v_child, __pyx_v_f, __pyx_v_end, __pyx_v_offset); if (unlikely(__pyx_t_11 == NULL)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 853; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_f = __pyx_t_11; } __pyx_L9:; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "numpy.pxd":854 * # so don't output it * f = _util_dtypestring(child, f, end, offset) * return f # <<<<<<<<<<<<<< * * */ __pyx_r = __pyx_v_f; goto __pyx_L0; /* "numpy.pxd":787 * return PyArray_MultiIterNew(5, a, b, c, d, e) * * 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_XDECREF(__pyx_t_5); __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; } /* "numpy.pxd":969 * * * 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); /* "numpy.pxd":971 * 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) { /* "numpy.pxd":972 * cdef PyObject* baseptr * if base is None: * baseptr = NULL # <<<<<<<<<<<<<< * else: * Py_INCREF(base) # important to do this before decref below! */ __pyx_v_baseptr = NULL; goto __pyx_L3; } /*else*/ { /* "numpy.pxd":974 * baseptr = NULL * else: * Py_INCREF(base) # important to do this before decref below! # <<<<<<<<<<<<<< * baseptr = base * Py_XDECREF(arr.base) */ Py_INCREF(__pyx_v_base); /* "numpy.pxd":975 * 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:; /* "numpy.pxd":976 * 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); /* "numpy.pxd":977 * baseptr = base * Py_XDECREF(arr.base) * arr.base = baseptr # <<<<<<<<<<<<<< * * cdef inline object get_array_base(ndarray arr): */ __pyx_v_arr->base = __pyx_v_baseptr; /* "numpy.pxd":969 * * * cdef inline void set_array_base(ndarray arr, object base): # <<<<<<<<<<<<<< * cdef PyObject* baseptr * if base is None: */ /* function exit code */ __Pyx_RefNannyFinishContext(); } /* "numpy.pxd":979 * 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); /* "numpy.pxd":980 * * 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) { /* "numpy.pxd":981 * cdef inline object get_array_base(ndarray arr): * if arr.base is NULL: * return None # <<<<<<<<<<<<<< * else: * return arr.base */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(Py_None); __pyx_r = Py_None; goto __pyx_L0; } /*else*/ { /* "numpy.pxd":983 * return None * else: * return arr.base # <<<<<<<<<<<<<< */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_arr->base)); __pyx_r = ((PyObject *)__pyx_v_arr->base); goto __pyx_L0; } /* "numpy.pxd":979 * 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; } /* "util.pxd":26 * object sarr_from_data(cnp.dtype, int length, void* data) * * cdef inline object get_value_at(ndarray arr, object loc): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, sz */ static CYTHON_INLINE PyObject *__pyx_f_4util_get_value_at(PyArrayObject *__pyx_v_arr, PyObject *__pyx_v_loc) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_sz; PyObject *__pyx_v_casted = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; Py_ssize_t __pyx_t_3; int __pyx_t_4; int __pyx_t_5; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_value_at", 0); __Pyx_INCREF(__pyx_v_loc); /* "util.pxd":30 * Py_ssize_t i, sz * void* data_ptr * if is_float_object(loc): # <<<<<<<<<<<<<< * casted = int(loc) * if casted == loc: */ __pyx_t_1 = (is_float_object(__pyx_v_loc) != 0); if (__pyx_t_1) { /* "util.pxd":31 * void* data_ptr * if is_float_object(loc): * casted = int(loc) # <<<<<<<<<<<<<< * if casted == loc: * loc = casted */ __pyx_t_2 = PyNumber_Int(__pyx_v_loc); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 31; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_v_casted = __pyx_t_2; __pyx_t_2 = 0; /* "util.pxd":32 * if is_float_object(loc): * casted = int(loc) * if casted == loc: # <<<<<<<<<<<<<< * loc = casted * i = loc */ __pyx_t_2 = PyObject_RichCompare(__pyx_v_casted, __pyx_v_loc, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 32; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 32; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_1) { /* "util.pxd":33 * casted = int(loc) * if casted == loc: * loc = casted # <<<<<<<<<<<<<< * i = loc * sz = cnp.PyArray_SIZE(arr) */ __Pyx_INCREF(__pyx_v_casted); __Pyx_DECREF_SET(__pyx_v_loc, __pyx_v_casted); goto __pyx_L4; } __pyx_L4:; goto __pyx_L3; } __pyx_L3:; /* "util.pxd":34 * if casted == loc: * loc = casted * i = loc # <<<<<<<<<<<<<< * sz = cnp.PyArray_SIZE(arr) * */ __pyx_t_3 = __Pyx_PyIndex_AsSsize_t(__pyx_v_loc); if (unlikely((__pyx_t_3 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 34; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_i = ((Py_ssize_t)__pyx_t_3); /* "util.pxd":35 * loc = casted * i = loc * sz = cnp.PyArray_SIZE(arr) # <<<<<<<<<<<<<< * * if i < 0 and sz > 0: */ __pyx_v_sz = PyArray_SIZE(__pyx_v_arr); /* "util.pxd":37 * sz = cnp.PyArray_SIZE(arr) * * if i < 0 and sz > 0: # <<<<<<<<<<<<<< * i += sz * elif i >= sz or sz == 0: */ __pyx_t_1 = ((__pyx_v_i < 0) != 0); if (__pyx_t_1) { __pyx_t_4 = ((__pyx_v_sz > 0) != 0); __pyx_t_5 = __pyx_t_4; } else { __pyx_t_5 = __pyx_t_1; } if (__pyx_t_5) { /* "util.pxd":38 * * if i < 0 and sz > 0: * i += sz # <<<<<<<<<<<<<< * elif i >= sz or sz == 0: * raise IndexError('index out of bounds') */ __pyx_v_i = (__pyx_v_i + __pyx_v_sz); goto __pyx_L5; } /* "util.pxd":39 * if i < 0 and sz > 0: * i += sz * elif i >= sz or sz == 0: # <<<<<<<<<<<<<< * raise IndexError('index out of bounds') * */ __pyx_t_5 = ((__pyx_v_i >= __pyx_v_sz) != 0); if (!__pyx_t_5) { __pyx_t_1 = ((__pyx_v_sz == 0) != 0); __pyx_t_4 = __pyx_t_1; } else { __pyx_t_4 = __pyx_t_5; } if (__pyx_t_4) { /* "util.pxd":40 * i += sz * elif i >= sz or sz == 0: * raise IndexError('index out of bounds') # <<<<<<<<<<<<<< * * return get_value_1d(arr, i) */ __pyx_t_2 = PyObject_Call(__pyx_builtin_IndexError, __pyx_tuple__101, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 40; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[3]; __pyx_lineno = 40; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_L5:; /* "util.pxd":42 * raise IndexError('index out of bounds') * * return get_value_1d(arr, i) # <<<<<<<<<<<<<< * * cdef inline set_value_at(ndarray arr, object loc, object value): */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = get_value_1d(__pyx_v_arr, __pyx_v_i); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 42; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "util.pxd":26 * object sarr_from_data(cnp.dtype, int length, void* data) * * cdef inline object get_value_at(ndarray arr, object loc): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, sz */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("util.get_value_at", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_casted); __Pyx_XDECREF(__pyx_v_loc); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "util.pxd":44 * return get_value_1d(arr, i) * * cdef inline set_value_at(ndarray arr, object loc, object value): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, sz */ static CYTHON_INLINE PyObject *__pyx_f_4util_set_value_at(PyArrayObject *__pyx_v_arr, PyObject *__pyx_v_loc, PyObject *__pyx_v_value) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_sz; PyObject *__pyx_v_casted = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; Py_ssize_t __pyx_t_3; int __pyx_t_4; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("set_value_at", 0); __Pyx_INCREF(__pyx_v_loc); /* "util.pxd":47 * cdef: * Py_ssize_t i, sz * if is_float_object(loc): # <<<<<<<<<<<<<< * casted = int(loc) * if casted == loc: */ __pyx_t_1 = (is_float_object(__pyx_v_loc) != 0); if (__pyx_t_1) { /* "util.pxd":48 * Py_ssize_t i, sz * if is_float_object(loc): * casted = int(loc) # <<<<<<<<<<<<<< * if casted == loc: * loc = casted */ __pyx_t_2 = PyNumber_Int(__pyx_v_loc); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_v_casted = __pyx_t_2; __pyx_t_2 = 0; /* "util.pxd":49 * if is_float_object(loc): * casted = int(loc) * if casted == loc: # <<<<<<<<<<<<<< * loc = casted * i = loc */ __pyx_t_2 = PyObject_RichCompare(__pyx_v_casted, __pyx_v_loc, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_1) { /* "util.pxd":50 * casted = int(loc) * if casted == loc: * loc = casted # <<<<<<<<<<<<<< * i = loc * sz = cnp.PyArray_SIZE(arr) */ __Pyx_INCREF(__pyx_v_casted); __Pyx_DECREF_SET(__pyx_v_loc, __pyx_v_casted); goto __pyx_L4; } __pyx_L4:; goto __pyx_L3; } __pyx_L3:; /* "util.pxd":51 * if casted == loc: * loc = casted * i = loc # <<<<<<<<<<<<<< * sz = cnp.PyArray_SIZE(arr) * */ __pyx_t_3 = __Pyx_PyIndex_AsSsize_t(__pyx_v_loc); if (unlikely((__pyx_t_3 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_i = ((Py_ssize_t)__pyx_t_3); /* "util.pxd":52 * loc = casted * i = loc * sz = cnp.PyArray_SIZE(arr) # <<<<<<<<<<<<<< * * if i < 0: */ __pyx_v_sz = PyArray_SIZE(__pyx_v_arr); /* "util.pxd":54 * sz = cnp.PyArray_SIZE(arr) * * if i < 0: # <<<<<<<<<<<<<< * i += sz * elif i >= sz: */ __pyx_t_1 = ((__pyx_v_i < 0) != 0); if (__pyx_t_1) { /* "util.pxd":55 * * if i < 0: * i += sz # <<<<<<<<<<<<<< * elif i >= sz: * raise IndexError('index out of bounds') */ __pyx_v_i = (__pyx_v_i + __pyx_v_sz); goto __pyx_L5; } /* "util.pxd":56 * if i < 0: * i += sz * elif i >= sz: # <<<<<<<<<<<<<< * raise IndexError('index out of bounds') * */ __pyx_t_1 = ((__pyx_v_i >= __pyx_v_sz) != 0); if (__pyx_t_1) { /* "util.pxd":57 * i += sz * elif i >= sz: * raise IndexError('index out of bounds') # <<<<<<<<<<<<<< * * assign_value_1d(arr, i, value) */ __pyx_t_2 = PyObject_Call(__pyx_builtin_IndexError, __pyx_tuple__102, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 57; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[3]; __pyx_lineno = 57; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_L5:; /* "util.pxd":59 * raise IndexError('index out of bounds') * * assign_value_1d(arr, i, value) # <<<<<<<<<<<<<< * * cdef inline int is_contiguous(ndarray arr): */ __pyx_t_4 = assign_value_1d(__pyx_v_arr, __pyx_v_i, __pyx_v_value); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 59; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "util.pxd":44 * return get_value_1d(arr, i) * * cdef inline set_value_at(ndarray arr, object loc, object value): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, sz */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("util.set_value_at", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_casted); __Pyx_XDECREF(__pyx_v_loc); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "util.pxd":61 * assign_value_1d(arr, i, value) * * cdef inline int is_contiguous(ndarray arr): # <<<<<<<<<<<<<< * return cnp.PyArray_CHKFLAGS(arr, cnp.NPY_C_CONTIGUOUS) * */ static CYTHON_INLINE int __pyx_f_4util_is_contiguous(PyArrayObject *__pyx_v_arr) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("is_contiguous", 0); /* "util.pxd":62 * * cdef inline int is_contiguous(ndarray arr): * return cnp.PyArray_CHKFLAGS(arr, cnp.NPY_C_CONTIGUOUS) # <<<<<<<<<<<<<< * * cdef inline is_array(object o): */ __pyx_r = PyArray_CHKFLAGS(__pyx_v_arr, NPY_C_CONTIGUOUS); goto __pyx_L0; /* "util.pxd":61 * assign_value_1d(arr, i, value) * * cdef inline int is_contiguous(ndarray arr): # <<<<<<<<<<<<<< * return cnp.PyArray_CHKFLAGS(arr, cnp.NPY_C_CONTIGUOUS) * */ /* function exit code */ __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "util.pxd":64 * return cnp.PyArray_CHKFLAGS(arr, cnp.NPY_C_CONTIGUOUS) * * cdef inline is_array(object o): # <<<<<<<<<<<<<< * return cnp.PyArray_Check(o) * */ static CYTHON_INLINE PyObject *__pyx_f_4util_is_array(PyObject *__pyx_v_o) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("is_array", 0); /* "util.pxd":65 * * cdef inline is_array(object o): * return cnp.PyArray_Check(o) # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyBool_FromLong(PyArray_Check(__pyx_v_o)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 65; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "util.pxd":64 * return cnp.PyArray_CHKFLAGS(arr, cnp.NPY_C_CONTIGUOUS) * * cdef inline is_array(object o): # <<<<<<<<<<<<<< * return cnp.PyArray_Check(o) * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("util.is_array", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "util.pxd":68 * * * cdef inline bint _checknull(object val): # <<<<<<<<<<<<<< * try: * return val is None or (cpython.PyFloat_Check(val) and val != val) */ static CYTHON_INLINE int __pyx_f_4util__checknull(PyObject *__pyx_v_val) { 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; int __pyx_t_9; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_checknull", 0); /* "util.pxd":69 * * cdef inline bint _checknull(object val): * try: # <<<<<<<<<<<<<< * return val is None or (cpython.PyFloat_Check(val) and val != val) * except ValueError: */ { __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:*/ { /* "util.pxd":70 * cdef inline bint _checknull(object val): * try: * return val is None or (cpython.PyFloat_Check(val) and val != val) # <<<<<<<<<<<<<< * except ValueError: * return False */ __pyx_t_4 = (__pyx_v_val == Py_None); __pyx_t_5 = __Pyx_PyBool_FromLong(__pyx_t_4); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L3_error;} if (!__pyx_t_4) { __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_6 = __Pyx_PyBool_FromLong(PyFloat_Check(__pyx_v_val)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L3_error;} if (__pyx_t_4) { __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_7 = PyObject_RichCompare(__pyx_v_val, __pyx_v_val, Py_NE); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_t_8 = __pyx_t_7; __pyx_t_7 = 0; } else { __pyx_t_8 = __pyx_t_6; __pyx_t_6 = 0; } __pyx_t_6 = __pyx_t_8; __pyx_t_8 = 0; } else { __pyx_t_6 = __pyx_t_5; __pyx_t_5 = 0; } __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_r = __pyx_t_4; goto __pyx_L7_try_return; } __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L10_try_end; __pyx_L3_error:; __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; /* "util.pxd":71 * try: * return val is None or (cpython.PyFloat_Check(val) and val != val) * except ValueError: # <<<<<<<<<<<<<< * return False * */ __pyx_t_9 = PyErr_ExceptionMatches(__pyx_builtin_ValueError); if (__pyx_t_9) { __Pyx_AddTraceback("util._checknull", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_5, &__pyx_t_8) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 71; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_GOTREF(__pyx_t_5); __Pyx_GOTREF(__pyx_t_8); /* "util.pxd":72 * return val is None or (cpython.PyFloat_Check(val) and val != val) * except ValueError: * return False # <<<<<<<<<<<<<< * * cdef inline bint _checknull_old(object val): */ __pyx_r = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; goto __pyx_L6_except_return; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; goto __pyx_L4_exception_handled; } goto __pyx_L5_except_error; __pyx_L5_except_error:; __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); goto __pyx_L1_error; __pyx_L7_try_return:; __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); goto __pyx_L0; __pyx_L6_except_return:; __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); goto __pyx_L0; __pyx_L4_exception_handled:; __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); __pyx_L10_try_end:; } /* "util.pxd":68 * * * cdef inline bint _checknull(object val): # <<<<<<<<<<<<<< * try: * return val is None or (cpython.PyFloat_Check(val) and val != val) */ /* 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_WriteUnraisable("util._checknull", __pyx_clineno, __pyx_lineno, __pyx_filename, 0); __pyx_r = 0; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "util.pxd":74 * return False * * cdef inline bint _checknull_old(object val): # <<<<<<<<<<<<<< * import numpy as np * cdef double INF = np.inf */ static CYTHON_INLINE int __pyx_f_4util__checknull_old(PyObject *__pyx_v_val) { PyObject *__pyx_v_np = NULL; double __pyx_v_INF; double __pyx_v_NEGINF; int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; double __pyx_t_2; 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; int __pyx_t_9; int __pyx_t_10; int __pyx_t_11; int __pyx_t_12; PyObject *__pyx_t_13 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_checknull_old", 0); /* "util.pxd":75 * * cdef inline bint _checknull_old(object val): * import numpy as np # <<<<<<<<<<<<<< * cdef double INF = np.inf * cdef double NEGINF = -INF */ __pyx_t_1 = __Pyx_Import(__pyx_n_s_numpy, 0, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 75; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_v_np = __pyx_t_1; __pyx_t_1 = 0; /* "util.pxd":76 * cdef inline bint _checknull_old(object val): * import numpy as np * cdef double INF = np.inf # <<<<<<<<<<<<<< * cdef double NEGINF = -INF * try: */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_np, __pyx_n_s_inf); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 76; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __pyx_PyFloat_AsDouble(__pyx_t_1); if (unlikely((__pyx_t_2 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 76; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_INF = ((double)__pyx_t_2); /* "util.pxd":77 * import numpy as np * cdef double INF = np.inf * cdef double NEGINF = -INF # <<<<<<<<<<<<<< * try: * return bool(val is None or val != val and val != INF */ __pyx_v_NEGINF = (-__pyx_v_INF); /* "util.pxd":78 * cdef double INF = np.inf * cdef double NEGINF = -INF * try: # <<<<<<<<<<<<<< * return bool(val is None or val != val and val != INF * and val != NEGINF) */ { __Pyx_ExceptionSave(&__pyx_t_3, &__pyx_t_4, &__pyx_t_5); __Pyx_XGOTREF(__pyx_t_3); __Pyx_XGOTREF(__pyx_t_4); __Pyx_XGOTREF(__pyx_t_5); /*try:*/ { /* "util.pxd":79 * cdef double NEGINF = -INF * try: * return bool(val is None or val != val and val != INF # <<<<<<<<<<<<<< * and val != NEGINF) * except ValueError: */ __pyx_t_6 = (__pyx_v_val == Py_None); if (!__pyx_t_6) { __pyx_t_1 = PyObject_RichCompare(__pyx_v_val, __pyx_v_val, Py_NE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_7) { /* "util.pxd":80 * try: * return bool(val is None or val != val and val != INF * and val != NEGINF) # <<<<<<<<<<<<<< * except ValueError: * return False */ __pyx_t_1 = PyFloat_FromDouble(__pyx_v_INF); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 80; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_8 = PyObject_RichCompare(__pyx_v_val, __pyx_t_1, Py_NE); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "util.pxd":79 * cdef double NEGINF = -INF * try: * return bool(val is None or val != val and val != INF # <<<<<<<<<<<<<< * and val != NEGINF) * except ValueError: */ __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (__pyx_t_9) { /* "util.pxd":80 * try: * return bool(val is None or val != val and val != INF * and val != NEGINF) # <<<<<<<<<<<<<< * except ValueError: * return False */ __pyx_t_8 = PyFloat_FromDouble(__pyx_v_NEGINF); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 80; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_1 = PyObject_RichCompare(__pyx_v_val, __pyx_t_8, Py_NE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 80; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 80; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_11 = __pyx_t_10; } else { __pyx_t_11 = __pyx_t_9; } __pyx_t_9 = __pyx_t_11; } else { __pyx_t_9 = __pyx_t_7; } __pyx_t_7 = __pyx_t_9; } else { __pyx_t_7 = __pyx_t_6; } /* "util.pxd":79 * cdef double NEGINF = -INF * try: * return bool(val is None or val != val and val != INF # <<<<<<<<<<<<<< * and val != NEGINF) * except ValueError: */ __pyx_r = (!(!__pyx_t_7)); goto __pyx_L7_try_return; } __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; goto __pyx_L10_try_end; __pyx_L3_error:; __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; /* "util.pxd":81 * return bool(val is None or val != val and val != INF * and val != NEGINF) * except ValueError: # <<<<<<<<<<<<<< * return False * */ __pyx_t_12 = PyErr_ExceptionMatches(__pyx_builtin_ValueError); if (__pyx_t_12) { __Pyx_AddTraceback("util._checknull_old", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_8, &__pyx_t_13) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_GOTREF(__pyx_t_8); __Pyx_GOTREF(__pyx_t_13); /* "util.pxd":82 * and val != NEGINF) * except ValueError: * return False # <<<<<<<<<<<<<< * * cdef inline bint _checknan(object val): */ __pyx_r = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; goto __pyx_L6_except_return; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; goto __pyx_L4_exception_handled; } goto __pyx_L5_except_error; __pyx_L5_except_error:; __Pyx_XGIVEREF(__pyx_t_3); __Pyx_XGIVEREF(__pyx_t_4); __Pyx_XGIVEREF(__pyx_t_5); __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5); goto __pyx_L1_error; __pyx_L7_try_return:; __Pyx_XGIVEREF(__pyx_t_3); __Pyx_XGIVEREF(__pyx_t_4); __Pyx_XGIVEREF(__pyx_t_5); __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5); goto __pyx_L0; __pyx_L6_except_return:; __Pyx_XGIVEREF(__pyx_t_3); __Pyx_XGIVEREF(__pyx_t_4); __Pyx_XGIVEREF(__pyx_t_5); __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5); goto __pyx_L0; __pyx_L4_exception_handled:; __Pyx_XGIVEREF(__pyx_t_3); __Pyx_XGIVEREF(__pyx_t_4); __Pyx_XGIVEREF(__pyx_t_5); __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5); __pyx_L10_try_end:; } /* "util.pxd":74 * return False * * cdef inline bint _checknull_old(object val): # <<<<<<<<<<<<<< * import numpy as np * cdef double INF = np.inf */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_13); __Pyx_WriteUnraisable("util._checknull_old", __pyx_clineno, __pyx_lineno, __pyx_filename, 0); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_np); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "util.pxd":84 * return False * * cdef inline bint _checknan(object val): # <<<<<<<<<<<<<< * return not cnp.PyArray_Check(val) and val != val */ static CYTHON_INLINE int __pyx_f_4util__checknan(PyObject *__pyx_v_val) { int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_checknan", 0); /* "util.pxd":85 * * cdef inline bint _checknan(object val): * return not cnp.PyArray_Check(val) and val != val # <<<<<<<<<<<<<< */ __pyx_t_1 = __Pyx_PyBool_FromLong((!(PyArray_Check(__pyx_v_val) != 0))); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__pyx_t_2) { __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_3 = PyObject_RichCompare(__pyx_v_val, __pyx_v_val, Py_NE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_4 = __pyx_t_3; __pyx_t_3 = 0; } else { __pyx_t_4 = __pyx_t_1; __pyx_t_1 = 0; } __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_r = __pyx_t_2; goto __pyx_L0; /* "util.pxd":84 * return False * * cdef inline bint _checknan(object val): # <<<<<<<<<<<<<< * return not cnp.PyArray_Check(val) and val != val */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_WriteUnraisable("util._checknan", __pyx_clineno, __pyx_lineno, __pyx_filename, 0); __pyx_r = 0; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static struct __pyx_obj_6pandas_5tslib___pyx_scope_struct_3_genexpr *__pyx_freelist_6pandas_5tslib___pyx_scope_struct_3_genexpr[8]; static int __pyx_freecount_6pandas_5tslib___pyx_scope_struct_3_genexpr = 0; static PyObject *__pyx_tp_new_6pandas_5tslib___pyx_scope_struct_3_genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { PyObject *o; if (likely((__pyx_freecount_6pandas_5tslib___pyx_scope_struct_3_genexpr > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_6pandas_5tslib___pyx_scope_struct_3_genexpr)))) { o = (PyObject*)__pyx_freelist_6pandas_5tslib___pyx_scope_struct_3_genexpr[--__pyx_freecount_6pandas_5tslib___pyx_scope_struct_3_genexpr]; memset(o, 0, sizeof(struct __pyx_obj_6pandas_5tslib___pyx_scope_struct_3_genexpr)); (void) PyObject_INIT(o, t); PyObject_GC_Track(o); } else { o = (*t->tp_alloc)(t, 0); if (unlikely(!o)) return 0; } return o; } static void __pyx_tp_dealloc_6pandas_5tslib___pyx_scope_struct_3_genexpr(PyObject *o) { struct __pyx_obj_6pandas_5tslib___pyx_scope_struct_3_genexpr *p = (struct __pyx_obj_6pandas_5tslib___pyx_scope_struct_3_genexpr *)o; PyObject_GC_UnTrack(o); Py_CLEAR(p->__pyx_outer_scope); Py_CLEAR(p->__pyx_v_stuff); Py_CLEAR(p->__pyx_t_0); if ((__pyx_freecount_6pandas_5tslib___pyx_scope_struct_3_genexpr < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_6pandas_5tslib___pyx_scope_struct_3_genexpr))) { __pyx_freelist_6pandas_5tslib___pyx_scope_struct_3_genexpr[__pyx_freecount_6pandas_5tslib___pyx_scope_struct_3_genexpr++] = ((struct __pyx_obj_6pandas_5tslib___pyx_scope_struct_3_genexpr *)o); } else { (*Py_TYPE(o)->tp_free)(o); } } static int __pyx_tp_traverse_6pandas_5tslib___pyx_scope_struct_3_genexpr(PyObject *o, visitproc v, void *a) { int e; struct __pyx_obj_6pandas_5tslib___pyx_scope_struct_3_genexpr *p = (struct __pyx_obj_6pandas_5tslib___pyx_scope_struct_3_genexpr *)o; if (p->__pyx_outer_scope) { e = (*v)(((PyObject*)p->__pyx_outer_scope), a); if (e) return e; } if (p->__pyx_v_stuff) { e = (*v)(p->__pyx_v_stuff, a); if (e) return e; } if (p->__pyx_t_0) { e = (*v)(p->__pyx_t_0, a); if (e) return e; } return 0; } static int __pyx_tp_clear_6pandas_5tslib___pyx_scope_struct_3_genexpr(PyObject *o) { PyObject* tmp; struct __pyx_obj_6pandas_5tslib___pyx_scope_struct_3_genexpr *p = (struct __pyx_obj_6pandas_5tslib___pyx_scope_struct_3_genexpr *)o; tmp = ((PyObject*)p->__pyx_outer_scope); p->__pyx_outer_scope = ((struct __pyx_obj_6pandas_5tslib___pyx_scope_struct_2___seqToRE *)Py_None); Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->__pyx_v_stuff); p->__pyx_v_stuff = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->__pyx_t_0); p->__pyx_t_0 = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); return 0; } static PyTypeObject __pyx_type_6pandas_5tslib___pyx_scope_struct_3_genexpr = { PyVarObject_HEAD_INIT(0, 0) __Pyx_NAMESTR("pandas.tslib.__pyx_scope_struct_3_genexpr"), /*tp_name*/ sizeof(struct __pyx_obj_6pandas_5tslib___pyx_scope_struct_3_genexpr), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_6pandas_5tslib___pyx_scope_struct_3_genexpr, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #else 0, /*reserved*/ #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_HAVE_GC, /*tp_flags*/ 0, /*tp_doc*/ __pyx_tp_traverse_6pandas_5tslib___pyx_scope_struct_3_genexpr, /*tp_traverse*/ __pyx_tp_clear_6pandas_5tslib___pyx_scope_struct_3_genexpr, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ 0, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_6pandas_5tslib___pyx_scope_struct_3_genexpr, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ 0, /*tp_del*/ #if PY_VERSION_HEX >= 0x02060000 0, /*tp_version_tag*/ #endif #if PY_VERSION_HEX >= 0x030400a1 0, /*tp_finalize*/ #endif }; static PyObject *__pyx_tp_new_6pandas_5tslib__TSObject(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { struct __pyx_obj_6pandas_5tslib__TSObject *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_5tslib__TSObject *)o); p->tzinfo = Py_None; Py_INCREF(Py_None); return o; } static void __pyx_tp_dealloc_6pandas_5tslib__TSObject(PyObject *o) { struct __pyx_obj_6pandas_5tslib__TSObject *p = (struct __pyx_obj_6pandas_5tslib__TSObject *)o; #if PY_VERSION_HEX >= 0x030400a1 if (unlikely(Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) { if (PyObject_CallFinalizerFromDealloc(o)) return; } #endif PyObject_GC_UnTrack(o); Py_CLEAR(p->tzinfo); (*Py_TYPE(o)->tp_free)(o); } static int __pyx_tp_traverse_6pandas_5tslib__TSObject(PyObject *o, visitproc v, void *a) { int e; struct __pyx_obj_6pandas_5tslib__TSObject *p = (struct __pyx_obj_6pandas_5tslib__TSObject *)o; if (p->tzinfo) { e = (*v)(p->tzinfo, a); if (e) return e; } return 0; } static int __pyx_tp_clear_6pandas_5tslib__TSObject(PyObject *o) { PyObject* tmp; struct __pyx_obj_6pandas_5tslib__TSObject *p = (struct __pyx_obj_6pandas_5tslib__TSObject *)o; tmp = ((PyObject*)p->tzinfo); p->tzinfo = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); return 0; } static PyObject *__pyx_getprop_6pandas_5tslib_9_TSObject_value(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6pandas_5tslib_9_TSObject_5value_1__get__(o); } static struct PyGetSetDef __pyx_getsets_6pandas_5tslib__TSObject[] = { {(char *)"value", __pyx_getprop_6pandas_5tslib_9_TSObject_value, 0, 0, 0}, {0, 0, 0, 0, 0} }; static PyTypeObject __pyx_type_6pandas_5tslib__TSObject = { PyVarObject_HEAD_INIT(0, 0) __Pyx_NAMESTR("pandas.tslib._TSObject"), /*tp_name*/ sizeof(struct __pyx_obj_6pandas_5tslib__TSObject), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_6pandas_5tslib__TSObject, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #else 0, /*reserved*/ #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*/ 0, /*tp_doc*/ __pyx_tp_traverse_6pandas_5tslib__TSObject, /*tp_traverse*/ __pyx_tp_clear_6pandas_5tslib__TSObject, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ 0, /*tp_methods*/ 0, /*tp_members*/ __pyx_getsets_6pandas_5tslib__TSObject, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_6pandas_5tslib__TSObject, /*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*/ #if PY_VERSION_HEX >= 0x02060000 0, /*tp_version_tag*/ #endif #if PY_VERSION_HEX >= 0x030400a1 0, /*tp_finalize*/ #endif }; static struct __pyx_obj_6pandas_5tslib___pyx_scope_struct_2___seqToRE *__pyx_freelist_6pandas_5tslib___pyx_scope_struct_2___seqToRE[8]; static int __pyx_freecount_6pandas_5tslib___pyx_scope_struct_2___seqToRE = 0; static PyObject *__pyx_tp_new_6pandas_5tslib___pyx_scope_struct_2___seqToRE(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { PyObject *o; if (likely((__pyx_freecount_6pandas_5tslib___pyx_scope_struct_2___seqToRE > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_6pandas_5tslib___pyx_scope_struct_2___seqToRE)))) { o = (PyObject*)__pyx_freelist_6pandas_5tslib___pyx_scope_struct_2___seqToRE[--__pyx_freecount_6pandas_5tslib___pyx_scope_struct_2___seqToRE]; memset(o, 0, sizeof(struct __pyx_obj_6pandas_5tslib___pyx_scope_struct_2___seqToRE)); (void) PyObject_INIT(o, t); PyObject_GC_Track(o); } else { o = (*t->tp_alloc)(t, 0); if (unlikely(!o)) return 0; } return o; } static void __pyx_tp_dealloc_6pandas_5tslib___pyx_scope_struct_2___seqToRE(PyObject *o) { struct __pyx_obj_6pandas_5tslib___pyx_scope_struct_2___seqToRE *p = (struct __pyx_obj_6pandas_5tslib___pyx_scope_struct_2___seqToRE *)o; PyObject_GC_UnTrack(o); Py_CLEAR(p->__pyx_v_to_convert); if ((__pyx_freecount_6pandas_5tslib___pyx_scope_struct_2___seqToRE < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_6pandas_5tslib___pyx_scope_struct_2___seqToRE))) { __pyx_freelist_6pandas_5tslib___pyx_scope_struct_2___seqToRE[__pyx_freecount_6pandas_5tslib___pyx_scope_struct_2___seqToRE++] = ((struct __pyx_obj_6pandas_5tslib___pyx_scope_struct_2___seqToRE *)o); } else { (*Py_TYPE(o)->tp_free)(o); } } static int __pyx_tp_traverse_6pandas_5tslib___pyx_scope_struct_2___seqToRE(PyObject *o, visitproc v, void *a) { int e; struct __pyx_obj_6pandas_5tslib___pyx_scope_struct_2___seqToRE *p = (struct __pyx_obj_6pandas_5tslib___pyx_scope_struct_2___seqToRE *)o; if (p->__pyx_v_to_convert) { e = (*v)(p->__pyx_v_to_convert, a); if (e) return e; } return 0; } static int __pyx_tp_clear_6pandas_5tslib___pyx_scope_struct_2___seqToRE(PyObject *o) { PyObject* tmp; struct __pyx_obj_6pandas_5tslib___pyx_scope_struct_2___seqToRE *p = (struct __pyx_obj_6pandas_5tslib___pyx_scope_struct_2___seqToRE *)o; tmp = ((PyObject*)p->__pyx_v_to_convert); p->__pyx_v_to_convert = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); return 0; } static PyTypeObject __pyx_type_6pandas_5tslib___pyx_scope_struct_2___seqToRE = { PyVarObject_HEAD_INIT(0, 0) __Pyx_NAMESTR("pandas.tslib.__pyx_scope_struct_2___seqToRE"), /*tp_name*/ sizeof(struct __pyx_obj_6pandas_5tslib___pyx_scope_struct_2___seqToRE), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_6pandas_5tslib___pyx_scope_struct_2___seqToRE, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #else 0, /*reserved*/ #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_HAVE_GC, /*tp_flags*/ 0, /*tp_doc*/ __pyx_tp_traverse_6pandas_5tslib___pyx_scope_struct_2___seqToRE, /*tp_traverse*/ __pyx_tp_clear_6pandas_5tslib___pyx_scope_struct_2___seqToRE, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ 0, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_6pandas_5tslib___pyx_scope_struct_2___seqToRE, /*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*/ #if PY_VERSION_HEX >= 0x02060000 0, /*tp_version_tag*/ #endif #if PY_VERSION_HEX >= 0x030400a1 0, /*tp_finalize*/ #endif }; static struct __pyx_vtabstruct_6pandas_5tslib__Timestamp __pyx_vtable_6pandas_5tslib__Timestamp; static PyObject *__pyx_tp_new_6pandas_5tslib__Timestamp(PyTypeObject *t, PyObject *a, PyObject *k) { struct __pyx_obj_6pandas_5tslib__Timestamp *p; PyObject *o = __pyx_ptype_8datetime_datetime->tp_new(t, a, k); if (unlikely(!o)) return 0; p = ((struct __pyx_obj_6pandas_5tslib__Timestamp *)o); p->__pyx_vtab = __pyx_vtabptr_6pandas_5tslib__Timestamp; p->offset = Py_None; Py_INCREF(Py_None); return o; } static void __pyx_tp_dealloc_6pandas_5tslib__Timestamp(PyObject *o) { struct __pyx_obj_6pandas_5tslib__Timestamp *p = (struct __pyx_obj_6pandas_5tslib__Timestamp *)o; #if PY_VERSION_HEX >= 0x030400a1 if (unlikely(Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) { if (PyObject_CallFinalizerFromDealloc(o)) return; } #endif PyObject_GC_UnTrack(o); Py_CLEAR(p->offset); #if CYTHON_COMPILING_IN_CPYTHON if (PyType_IS_GC(Py_TYPE(o)->tp_base)) #endif PyObject_GC_Track(o); if (likely(__pyx_ptype_8datetime_datetime)) __pyx_ptype_8datetime_datetime->tp_dealloc(o); else __Pyx_call_next_tp_dealloc(o, __pyx_tp_dealloc_6pandas_5tslib__Timestamp); } static int __pyx_tp_traverse_6pandas_5tslib__Timestamp(PyObject *o, visitproc v, void *a) { int e; struct __pyx_obj_6pandas_5tslib__Timestamp *p = (struct __pyx_obj_6pandas_5tslib__Timestamp *)o; e = ((likely(__pyx_ptype_8datetime_datetime)) ? ((__pyx_ptype_8datetime_datetime->tp_traverse) ? __pyx_ptype_8datetime_datetime->tp_traverse(o, v, a) : 0) : __Pyx_call_next_tp_traverse(o, v, a, __pyx_tp_traverse_6pandas_5tslib__Timestamp)); if (e) return e; if (p->offset) { e = (*v)(p->offset, a); if (e) return e; } return 0; } static int __pyx_tp_clear_6pandas_5tslib__Timestamp(PyObject *o) { PyObject* tmp; struct __pyx_obj_6pandas_5tslib__Timestamp *p = (struct __pyx_obj_6pandas_5tslib__Timestamp *)o; if (likely(__pyx_ptype_8datetime_datetime)) { if (__pyx_ptype_8datetime_datetime->tp_clear) __pyx_ptype_8datetime_datetime->tp_clear(o); } else __Pyx_call_next_tp_clear(o, __pyx_tp_clear_6pandas_5tslib__Timestamp); tmp = ((PyObject*)p->offset); p->offset = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); return 0; } static PyObject *__pyx_getprop_6pandas_5tslib_10_Timestamp_value(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6pandas_5tslib_10_Timestamp_5value_1__get__(o); } static PyObject *__pyx_getprop_6pandas_5tslib_10_Timestamp_nanosecond(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6pandas_5tslib_10_Timestamp_10nanosecond_1__get__(o); } static PyObject *__pyx_getprop_6pandas_5tslib_10_Timestamp_offset(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6pandas_5tslib_10_Timestamp_6offset_1__get__(o); } static PyMethodDef __pyx_methods_6pandas_5tslib__Timestamp[] = { {__Pyx_NAMESTR("to_datetime"), (PyCFunction)__pyx_pw_6pandas_5tslib_10_Timestamp_5to_datetime, METH_NOARGS, __Pyx_DOCSTR(0)}, {__Pyx_NAMESTR("_get_field"), (PyCFunction)__pyx_pw_6pandas_5tslib_10_Timestamp_11_get_field, METH_O, __Pyx_DOCSTR(0)}, {0, 0, 0, 0} }; static struct PyGetSetDef __pyx_getsets_6pandas_5tslib__Timestamp[] = { {(char *)"value", __pyx_getprop_6pandas_5tslib_10_Timestamp_value, 0, 0, 0}, {(char *)"nanosecond", __pyx_getprop_6pandas_5tslib_10_Timestamp_nanosecond, 0, 0, 0}, {(char *)"offset", __pyx_getprop_6pandas_5tslib_10_Timestamp_offset, 0, 0, 0}, {0, 0, 0, 0, 0} }; static PyNumberMethods __pyx_tp_as_number__Timestamp = { __pyx_pw_6pandas_5tslib_10_Timestamp_7__add__, /*nb_add*/ __pyx_pw_6pandas_5tslib_10_Timestamp_9__sub__, /*nb_subtract*/ 0, /*nb_multiply*/ #if PY_MAJOR_VERSION < 3 0, /*nb_divide*/ #endif 0, /*nb_remainder*/ 0, /*nb_divmod*/ 0, /*nb_power*/ 0, /*nb_negative*/ 0, /*nb_positive*/ 0, /*nb_absolute*/ 0, /*nb_nonzero*/ 0, /*nb_invert*/ 0, /*nb_lshift*/ 0, /*nb_rshift*/ 0, /*nb_and*/ 0, /*nb_xor*/ 0, /*nb_or*/ #if PY_MAJOR_VERSION < 3 0, /*nb_coerce*/ #endif 0, /*nb_int*/ #if PY_MAJOR_VERSION < 3 0, /*nb_long*/ #else 0, /*reserved*/ #endif 0, /*nb_float*/ #if PY_MAJOR_VERSION < 3 0, /*nb_oct*/ #endif #if PY_MAJOR_VERSION < 3 0, /*nb_hex*/ #endif 0, /*nb_inplace_add*/ 0, /*nb_inplace_subtract*/ 0, /*nb_inplace_multiply*/ #if PY_MAJOR_VERSION < 3 0, /*nb_inplace_divide*/ #endif 0, /*nb_inplace_remainder*/ 0, /*nb_inplace_power*/ 0, /*nb_inplace_lshift*/ 0, /*nb_inplace_rshift*/ 0, /*nb_inplace_and*/ 0, /*nb_inplace_xor*/ 0, /*nb_inplace_or*/ 0, /*nb_floor_divide*/ 0, /*nb_true_divide*/ 0, /*nb_inplace_floor_divide*/ 0, /*nb_inplace_true_divide*/ #if PY_VERSION_HEX >= 0x02050000 0, /*nb_index*/ #endif }; static PyTypeObject __pyx_type_6pandas_5tslib__Timestamp = { PyVarObject_HEAD_INIT(0, 0) __Pyx_NAMESTR("pandas.tslib._Timestamp"), /*tp_name*/ sizeof(struct __pyx_obj_6pandas_5tslib__Timestamp), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_6pandas_5tslib__Timestamp, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #else 0, /*reserved*/ #endif 0, /*tp_repr*/ &__pyx_tp_as_number__Timestamp, /*tp_as_number*/ 0, /*tp_as_sequence*/ 0, /*tp_as_mapping*/ __pyx_pw_6pandas_5tslib_10_Timestamp_1__hash__, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ 0, /*tp_doc*/ __pyx_tp_traverse_6pandas_5tslib__Timestamp, /*tp_traverse*/ __pyx_tp_clear_6pandas_5tslib__Timestamp, /*tp_clear*/ __pyx_pw_6pandas_5tslib_10_Timestamp_3__richcmp__, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_6pandas_5tslib__Timestamp, /*tp_methods*/ 0, /*tp_members*/ __pyx_getsets_6pandas_5tslib__Timestamp, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_6pandas_5tslib__Timestamp, /*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*/ #if PY_VERSION_HEX >= 0x02060000 0, /*tp_version_tag*/ #endif #if PY_VERSION_HEX >= 0x030400a1 0, /*tp_finalize*/ #endif }; static struct __pyx_vtabstruct_6pandas_5tslib__NaT __pyx_vtable_6pandas_5tslib__NaT; static PyObject *__pyx_tp_new_6pandas_5tslib__NaT(PyTypeObject *t, PyObject *a, PyObject *k) { struct __pyx_obj_6pandas_5tslib__NaT *p; PyObject *o = __pyx_tp_new_6pandas_5tslib__Timestamp(t, a, k); if (unlikely(!o)) return 0; p = ((struct __pyx_obj_6pandas_5tslib__NaT *)o); p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_6pandas_5tslib__Timestamp*)__pyx_vtabptr_6pandas_5tslib__NaT; return o; } static PyMethodDef __pyx_methods_6pandas_5tslib__NaT[] = { {0, 0, 0, 0} }; static PyTypeObject __pyx_type_6pandas_5tslib__NaT = { PyVarObject_HEAD_INIT(0, 0) __Pyx_NAMESTR("pandas.tslib._NaT"), /*tp_name*/ sizeof(struct __pyx_obj_6pandas_5tslib__NaT), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_6pandas_5tslib__Timestamp, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #else 0, /*reserved*/ #endif 0, /*tp_repr*/ 0, /*tp_as_number*/ 0, /*tp_as_sequence*/ 0, /*tp_as_mapping*/ __pyx_pw_6pandas_5tslib_4_NaT_1__hash__, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ 0, /*tp_doc*/ __pyx_tp_traverse_6pandas_5tslib__Timestamp, /*tp_traverse*/ __pyx_tp_clear_6pandas_5tslib__Timestamp, /*tp_clear*/ __pyx_pw_6pandas_5tslib_4_NaT_3__richcmp__, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_6pandas_5tslib__NaT, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_6pandas_5tslib__NaT, /*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*/ #if PY_VERSION_HEX >= 0x02060000 0, /*tp_version_tag*/ #endif #if PY_VERSION_HEX >= 0x030400a1 0, /*tp_finalize*/ #endif }; static struct __pyx_obj_6pandas_5tslib___pyx_scope_struct____init__ *__pyx_freelist_6pandas_5tslib___pyx_scope_struct____init__[8]; static int __pyx_freecount_6pandas_5tslib___pyx_scope_struct____init__ = 0; static PyObject *__pyx_tp_new_6pandas_5tslib___pyx_scope_struct____init__(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { PyObject *o; if (likely((__pyx_freecount_6pandas_5tslib___pyx_scope_struct____init__ > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_6pandas_5tslib___pyx_scope_struct____init__)))) { o = (PyObject*)__pyx_freelist_6pandas_5tslib___pyx_scope_struct____init__[--__pyx_freecount_6pandas_5tslib___pyx_scope_struct____init__]; memset(o, 0, sizeof(struct __pyx_obj_6pandas_5tslib___pyx_scope_struct____init__)); (void) PyObject_INIT(o, t); PyObject_GC_Track(o); } else { o = (*t->tp_alloc)(t, 0); if (unlikely(!o)) return 0; } return o; } static void __pyx_tp_dealloc_6pandas_5tslib___pyx_scope_struct____init__(PyObject *o) { struct __pyx_obj_6pandas_5tslib___pyx_scope_struct____init__ *p = (struct __pyx_obj_6pandas_5tslib___pyx_scope_struct____init__ *)o; PyObject_GC_UnTrack(o); Py_CLEAR(p->__pyx_v_self); if ((__pyx_freecount_6pandas_5tslib___pyx_scope_struct____init__ < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_6pandas_5tslib___pyx_scope_struct____init__))) { __pyx_freelist_6pandas_5tslib___pyx_scope_struct____init__[__pyx_freecount_6pandas_5tslib___pyx_scope_struct____init__++] = ((struct __pyx_obj_6pandas_5tslib___pyx_scope_struct____init__ *)o); } else { (*Py_TYPE(o)->tp_free)(o); } } static int __pyx_tp_traverse_6pandas_5tslib___pyx_scope_struct____init__(PyObject *o, visitproc v, void *a) { int e; struct __pyx_obj_6pandas_5tslib___pyx_scope_struct____init__ *p = (struct __pyx_obj_6pandas_5tslib___pyx_scope_struct____init__ *)o; if (p->__pyx_v_self) { e = (*v)(p->__pyx_v_self, a); if (e) return e; } return 0; } static int __pyx_tp_clear_6pandas_5tslib___pyx_scope_struct____init__(PyObject *o) { PyObject* tmp; struct __pyx_obj_6pandas_5tslib___pyx_scope_struct____init__ *p = (struct __pyx_obj_6pandas_5tslib___pyx_scope_struct____init__ *)o; tmp = ((PyObject*)p->__pyx_v_self); p->__pyx_v_self = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); return 0; } static PyTypeObject __pyx_type_6pandas_5tslib___pyx_scope_struct____init__ = { PyVarObject_HEAD_INIT(0, 0) __Pyx_NAMESTR("pandas.tslib.__pyx_scope_struct____init__"), /*tp_name*/ sizeof(struct __pyx_obj_6pandas_5tslib___pyx_scope_struct____init__), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_6pandas_5tslib___pyx_scope_struct____init__, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #else 0, /*reserved*/ #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_HAVE_GC, /*tp_flags*/ 0, /*tp_doc*/ __pyx_tp_traverse_6pandas_5tslib___pyx_scope_struct____init__, /*tp_traverse*/ __pyx_tp_clear_6pandas_5tslib___pyx_scope_struct____init__, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ 0, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_6pandas_5tslib___pyx_scope_struct____init__, /*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*/ #if PY_VERSION_HEX >= 0x02060000 0, /*tp_version_tag*/ #endif #if PY_VERSION_HEX >= 0x030400a1 0, /*tp_finalize*/ #endif }; static struct __pyx_obj_6pandas_5tslib___pyx_scope_struct_1_genexpr *__pyx_freelist_6pandas_5tslib___pyx_scope_struct_1_genexpr[8]; static int __pyx_freecount_6pandas_5tslib___pyx_scope_struct_1_genexpr = 0; static PyObject *__pyx_tp_new_6pandas_5tslib___pyx_scope_struct_1_genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { PyObject *o; if (likely((__pyx_freecount_6pandas_5tslib___pyx_scope_struct_1_genexpr > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_6pandas_5tslib___pyx_scope_struct_1_genexpr)))) { o = (PyObject*)__pyx_freelist_6pandas_5tslib___pyx_scope_struct_1_genexpr[--__pyx_freecount_6pandas_5tslib___pyx_scope_struct_1_genexpr]; memset(o, 0, sizeof(struct __pyx_obj_6pandas_5tslib___pyx_scope_struct_1_genexpr)); (void) PyObject_INIT(o, t); PyObject_GC_Track(o); } else { o = (*t->tp_alloc)(t, 0); if (unlikely(!o)) return 0; } return o; } static void __pyx_tp_dealloc_6pandas_5tslib___pyx_scope_struct_1_genexpr(PyObject *o) { struct __pyx_obj_6pandas_5tslib___pyx_scope_struct_1_genexpr *p = (struct __pyx_obj_6pandas_5tslib___pyx_scope_struct_1_genexpr *)o; PyObject_GC_UnTrack(o); Py_CLEAR(p->__pyx_outer_scope); Py_CLEAR(p->__pyx_v_tz); Py_CLEAR(p->__pyx_v_tz_names); Py_CLEAR(p->__pyx_t_0); Py_CLEAR(p->__pyx_t_1); if ((__pyx_freecount_6pandas_5tslib___pyx_scope_struct_1_genexpr < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_6pandas_5tslib___pyx_scope_struct_1_genexpr))) { __pyx_freelist_6pandas_5tslib___pyx_scope_struct_1_genexpr[__pyx_freecount_6pandas_5tslib___pyx_scope_struct_1_genexpr++] = ((struct __pyx_obj_6pandas_5tslib___pyx_scope_struct_1_genexpr *)o); } else { (*Py_TYPE(o)->tp_free)(o); } } static int __pyx_tp_traverse_6pandas_5tslib___pyx_scope_struct_1_genexpr(PyObject *o, visitproc v, void *a) { int e; struct __pyx_obj_6pandas_5tslib___pyx_scope_struct_1_genexpr *p = (struct __pyx_obj_6pandas_5tslib___pyx_scope_struct_1_genexpr *)o; if (p->__pyx_outer_scope) { e = (*v)(((PyObject*)p->__pyx_outer_scope), a); if (e) return e; } if (p->__pyx_v_tz) { e = (*v)(p->__pyx_v_tz, a); if (e) return e; } if (p->__pyx_v_tz_names) { e = (*v)(p->__pyx_v_tz_names, a); if (e) return e; } if (p->__pyx_t_0) { e = (*v)(p->__pyx_t_0, a); if (e) return e; } if (p->__pyx_t_1) { e = (*v)(p->__pyx_t_1, a); if (e) return e; } return 0; } static int __pyx_tp_clear_6pandas_5tslib___pyx_scope_struct_1_genexpr(PyObject *o) { PyObject* tmp; struct __pyx_obj_6pandas_5tslib___pyx_scope_struct_1_genexpr *p = (struct __pyx_obj_6pandas_5tslib___pyx_scope_struct_1_genexpr *)o; tmp = ((PyObject*)p->__pyx_outer_scope); p->__pyx_outer_scope = ((struct __pyx_obj_6pandas_5tslib___pyx_scope_struct____init__ *)Py_None); Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->__pyx_v_tz); p->__pyx_v_tz = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->__pyx_v_tz_names); p->__pyx_v_tz_names = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->__pyx_t_0); p->__pyx_t_0 = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->__pyx_t_1); p->__pyx_t_1 = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); return 0; } static PyTypeObject __pyx_type_6pandas_5tslib___pyx_scope_struct_1_genexpr = { PyVarObject_HEAD_INIT(0, 0) __Pyx_NAMESTR("pandas.tslib.__pyx_scope_struct_1_genexpr"), /*tp_name*/ sizeof(struct __pyx_obj_6pandas_5tslib___pyx_scope_struct_1_genexpr), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_6pandas_5tslib___pyx_scope_struct_1_genexpr, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #else 0, /*reserved*/ #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_HAVE_GC, /*tp_flags*/ 0, /*tp_doc*/ __pyx_tp_traverse_6pandas_5tslib___pyx_scope_struct_1_genexpr, /*tp_traverse*/ __pyx_tp_clear_6pandas_5tslib___pyx_scope_struct_1_genexpr, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ 0, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_6pandas_5tslib___pyx_scope_struct_1_genexpr, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ 0, /*tp_del*/ #if PY_VERSION_HEX >= 0x02060000 0, /*tp_version_tag*/ #endif #if PY_VERSION_HEX >= 0x030400a1 0, /*tp_finalize*/ #endif }; static PyMethodDef __pyx_methods[] = { {__Pyx_NAMESTR("get_value_box"), (PyCFunction)__pyx_pw_6pandas_5tslib_9get_value_box, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}, {__Pyx_NAMESTR("_get_utcoffset"), (PyCFunction)__pyx_pw_6pandas_5tslib_17_get_utcoffset, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}, {__Pyx_NAMESTR("cast_from_unit"), (PyCFunction)__pyx_pw_6pandas_5tslib_37cast_from_unit, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_5tslib_36cast_from_unit)}, {__Pyx_NAMESTR("_unbox_utcoffsets"), (PyCFunction)__pyx_pw_6pandas_5tslib_55_unbox_utcoffsets, METH_O, __Pyx_DOCSTR(0)}, {__Pyx_NAMESTR("normalize_date"), (PyCFunction)__pyx_pw_6pandas_5tslib_73normalize_date, METH_O, __Pyx_DOCSTR(__pyx_doc_6pandas_5tslib_72normalize_date)}, {__Pyx_NAMESTR("period_asfreq"), (PyCFunction)__pyx_pw_6pandas_5tslib_79period_asfreq, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_5tslib_78period_asfreq)}, {__Pyx_NAMESTR("period_ordinal_to_dt64"), (PyCFunction)__pyx_pw_6pandas_5tslib_85period_ordinal_to_dt64, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}, {__Pyx_NAMESTR("resolution"), (PyCFunction)__pyx_pw_6pandas_5tslib_95resolution, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}, {0, 0, 0, 0} }; #if PY_MAJOR_VERSION >= 3 static struct PyModuleDef __pyx_moduledef = { #if PY_VERSION_HEX < 0x03020000 { PyObject_HEAD_INIT(NULL) NULL, 0, NULL }, #else PyModuleDef_HEAD_INIT, #endif __Pyx_NAMESTR("tslib"), 0, /* m_doc */ -1, /* m_size */ __pyx_methods /* m_methods */, NULL, /* m_reload */ NULL, /* m_traverse */ NULL, /* m_clear */ NULL /* m_free */ }; #endif static __Pyx_StringTabEntry __pyx_string_tab[] = { {&__pyx_kp_s_0, __pyx_k_0, sizeof(__pyx_k_0), 0, 0, 1, 0}, {&__pyx_kp_s_00, __pyx_k_00, sizeof(__pyx_k_00), 0, 0, 1, 0}, {&__pyx_kp_s_02d, __pyx_k_02d, sizeof(__pyx_k_02d), 0, 0, 1, 0}, {&__pyx_kp_s_02d_06d, __pyx_k_02d_06d, sizeof(__pyx_k_02d_06d), 0, 0, 1, 0}, {&__pyx_kp_s_03, __pyx_k_03, sizeof(__pyx_k_03), 0, 0, 1, 0}, {&__pyx_kp_s_03d, __pyx_k_03d, sizeof(__pyx_k_03d), 0, 0, 1, 0}, {&__pyx_kp_s_06d, __pyx_k_06d, sizeof(__pyx_k_06d), 0, 0, 1, 0}, {&__pyx_kp_s_09d, __pyx_k_09d, sizeof(__pyx_k_09d), 0, 0, 1, 0}, {&__pyx_kp_s_1, __pyx_k_1, sizeof(__pyx_k_1), 0, 0, 1, 0}, {&__pyx_kp_s_10, __pyx_k_10, sizeof(__pyx_k_10), 0, 0, 1, 0}, {&__pyx_kp_s_11, __pyx_k_11, sizeof(__pyx_k_11), 0, 0, 1, 0}, {&__pyx_kp_s_17, __pyx_k_17, sizeof(__pyx_k_17), 0, 0, 1, 0}, {&__pyx_kp_s_1999, __pyx_k_1999, sizeof(__pyx_k_1999), 0, 0, 1, 0}, {&__pyx_kp_s_1_6, __pyx_k_1_6, sizeof(__pyx_k_1_6), 0, 0, 1, 0}, {&__pyx_kp_s_1_7, __pyx_k_1_7, sizeof(__pyx_k_1_7), 0, 0, 1, 0}, {&__pyx_kp_s_2, __pyx_k_2, sizeof(__pyx_k_2), 0, 0, 1, 0}, {&__pyx_kp_s_22, __pyx_k_22, sizeof(__pyx_k_22), 0, 0, 1, 0}, {&__pyx_kp_s_2d, __pyx_k_2d, sizeof(__pyx_k_2d), 0, 0, 1, 0}, {&__pyx_kp_s_2d_2d_2d, __pyx_k_2d_2d_2d, sizeof(__pyx_k_2d_2d_2d), 0, 0, 1, 0}, {&__pyx_kp_s_3, __pyx_k_3, sizeof(__pyx_k_3), 0, 0, 1, 0}, {&__pyx_kp_s_3d, __pyx_k_3d, sizeof(__pyx_k_3d), 0, 0, 1, 0}, {&__pyx_kp_s_44, __pyx_k_44, sizeof(__pyx_k_44), 0, 0, 1, 0}, {&__pyx_kp_s_55, __pyx_k_55, sizeof(__pyx_k_55), 0, 0, 1, 0}, {&__pyx_kp_s_6d, __pyx_k_6d, sizeof(__pyx_k_6d), 0, 0, 1, 0}, {&__pyx_kp_s_76, __pyx_k_76, sizeof(__pyx_k_76), 0, 0, 1, 0}, {&__pyx_kp_s_99, __pyx_k_99, sizeof(__pyx_k_99), 0, 0, 1, 0}, {&__pyx_kp_s_9d, __pyx_k_9d, sizeof(__pyx_k_9d), 0, 0, 1, 0}, {&__pyx_n_s_A, __pyx_k_A, sizeof(__pyx_k_A), 0, 0, 1, 1}, {&__pyx_kp_b_AB, __pyx_k_AB, sizeof(__pyx_k_AB), 0, 0, 0, 0}, {&__pyx_kp_s_AB, __pyx_k_AB, sizeof(__pyx_k_AB), 0, 0, 1, 0}, {&__pyx_kp_s_A_2, __pyx_k_A_2, sizeof(__pyx_k_A_2), 0, 0, 1, 0}, {&__pyx_n_s_AmbiguousTimeError, __pyx_k_AmbiguousTimeError, sizeof(__pyx_k_AmbiguousTimeError), 0, 0, 1, 1}, {&__pyx_kp_s_Array_must_be_all_same_time_zone, __pyx_k_Array_must_be_all_same_time_zone, sizeof(__pyx_k_Array_must_be_all_same_time_zone), 0, 0, 1, 0}, {&__pyx_n_s_AttributeError, __pyx_k_AttributeError, sizeof(__pyx_k_AttributeError), 0, 0, 1, 1}, {&__pyx_n_s_B, __pyx_k_B, sizeof(__pyx_k_B), 0, 0, 1, 1}, {&__pyx_kp_s_B_2, __pyx_k_B_2, sizeof(__pyx_k_B_2), 0, 0, 1, 0}, {&__pyx_n_s_CACHE_MAX_SIZE, __pyx_k_CACHE_MAX_SIZE, sizeof(__pyx_k_CACHE_MAX_SIZE), 0, 0, 1, 1}, {&__pyx_kp_b_CD, __pyx_k_CD, sizeof(__pyx_k_CD), 0, 0, 0, 0}, {&__pyx_kp_s_CD, __pyx_k_CD, sizeof(__pyx_k_CD), 0, 0, 1, 0}, {&__pyx_kp_s_Cannot_add_integral_value_to_Tim, __pyx_k_Cannot_add_integral_value_to_Tim, sizeof(__pyx_k_Cannot_add_integral_value_to_Tim), 0, 0, 1, 0}, {&__pyx_kp_s_Cannot_compare_type_r_with_type, __pyx_k_Cannot_compare_type_r_with_type, sizeof(__pyx_k_Cannot_compare_type_r_with_type), 0, 0, 1, 0}, {&__pyx_kp_s_Cannot_compare_tz_naive_and_tz_a, __pyx_k_Cannot_compare_tz_naive_and_tz_a, sizeof(__pyx_k_Cannot_compare_tz_naive_and_tz_a), 0, 0, 1, 0}, {&__pyx_kp_s_Cannot_convert_tz_naive_Timestam, __pyx_k_Cannot_convert_tz_naive_Timestam, sizeof(__pyx_k_Cannot_convert_tz_naive_Timestam), 0, 0, 1, 0}, {&__pyx_kp_s_Cannot_infer_dst_time_from_r_try, __pyx_k_Cannot_infer_dst_time_from_r_try, sizeof(__pyx_k_Cannot_infer_dst_time_from_r_try), 0, 0, 1, 0}, {&__pyx_kp_s_Cannot_infer_dst_time_from_s_ast, __pyx_k_Cannot_infer_dst_time_from_s_ast, sizeof(__pyx_k_Cannot_infer_dst_time_from_s_ast), 0, 0, 1, 0}, {&__pyx_kp_s_Cannot_localize_tz_aware_Timesta, __pyx_k_Cannot_localize_tz_aware_Timesta, sizeof(__pyx_k_Cannot_localize_tz_aware_Timesta), 0, 0, 1, 0}, {&__pyx_kp_s_Cannot_mix_tz_aware_with_tz_naiv, __pyx_k_Cannot_mix_tz_aware_with_tz_naiv, sizeof(__pyx_k_Cannot_mix_tz_aware_with_tz_naiv), 0, 0, 1, 0}, {&__pyx_kp_s_Could_not_construct_Timestamp_fr, __pyx_k_Could_not_construct_Timestamp_fr, sizeof(__pyx_k_Could_not_construct_Timestamp_fr), 0, 0, 1, 0}, {&__pyx_kp_s_Could_not_find_pytz_module, __pyx_k_Could_not_find_pytz_module, sizeof(__pyx_k_Could_not_find_pytz_module), 0, 0, 1, 0}, {&__pyx_n_s_D, __pyx_k_D, sizeof(__pyx_k_D), 0, 0, 1, 1}, {&__pyx_n_s_D_RESO, __pyx_k_D_RESO, sizeof(__pyx_k_D_RESO), 0, 0, 1, 1}, {&__pyx_kp_b_EF, __pyx_k_EF, sizeof(__pyx_k_EF), 0, 0, 0, 0}, {&__pyx_kp_s_EF, __pyx_k_EF, sizeof(__pyx_k_EF), 0, 0, 1, 0}, {&__pyx_n_s_Exception, __pyx_k_Exception, sizeof(__pyx_k_Exception), 0, 0, 1, 1}, {&__pyx_kp_b_F, __pyx_k_F, sizeof(__pyx_k_F), 0, 0, 0, 0}, {&__pyx_kp_b_FQ_q, __pyx_k_FQ_q, sizeof(__pyx_k_FQ_q), 0, 0, 0, 0}, {&__pyx_kp_s_Field_s_not_supported, __pyx_k_Field_s_not_supported, sizeof(__pyx_k_Field_s_not_supported), 0, 0, 1, 0}, {&__pyx_kp_s_First_time_before_start_of_DST_i, __pyx_k_First_time_before_start_of_DST_i, sizeof(__pyx_k_First_time_before_start_of_DST_i), 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_kp_s_Frequency_conversion_failed, __pyx_k_Frequency_conversion_failed, sizeof(__pyx_k_Frequency_conversion_failed), 0, 0, 1, 0}, {&__pyx_kp_b_GH, __pyx_k_GH, sizeof(__pyx_k_GH), 0, 0, 0, 0}, {&__pyx_kp_s_GH, __pyx_k_GH, sizeof(__pyx_k_GH), 0, 0, 1, 0}, {&__pyx_kp_s_Given_date_string_not_likely_a_d, __pyx_k_Given_date_string_not_likely_a_d, sizeof(__pyx_k_Given_date_string_not_likely_a_d), 0, 0, 1, 0}, {&__pyx_n_s_H, __pyx_k_H, sizeof(__pyx_k_H), 0, 0, 1, 1}, {&__pyx_kp_s_H_2, __pyx_k_H_2, sizeof(__pyx_k_H_2), 0, 0, 1, 0}, {&__pyx_n_s_H_RESO, __pyx_k_H_RESO, sizeof(__pyx_k_H_RESO), 0, 0, 1, 1}, {&__pyx_kp_s_Handle_conversion_from_format_di, __pyx_k_Handle_conversion_from_format_di, sizeof(__pyx_k_Handle_conversion_from_format_di), 0, 0, 1, 0}, {&__pyx_n_s_I, __pyx_k_I, sizeof(__pyx_k_I), 0, 0, 1, 1}, {&__pyx_n_s_IGNORECASE, __pyx_k_IGNORECASE, sizeof(__pyx_k_IGNORECASE), 0, 0, 1, 1}, {&__pyx_kp_b_IJ, __pyx_k_IJ, sizeof(__pyx_k_IJ), 0, 0, 0, 0}, {&__pyx_kp_s_IJ, __pyx_k_IJ, sizeof(__pyx_k_IJ), 0, 0, 1, 0}, {&__pyx_kp_s_I_2, __pyx_k_I_2, sizeof(__pyx_k_I_2), 0, 0, 1, 0}, {&__pyx_n_s_IndexError, __pyx_k_IndexError, sizeof(__pyx_k_IndexError), 0, 0, 1, 1}, {&__pyx_kp_s_Invalid_type_for_timedelta_scala, __pyx_k_Invalid_type_for_timedelta_scala, sizeof(__pyx_k_Invalid_type_for_timedelta_scala), 0, 0, 1, 0}, {&__pyx_kp_b_KL, __pyx_k_KL, sizeof(__pyx_k_KL), 0, 0, 0, 0}, {&__pyx_kp_s_KL, __pyx_k_KL, sizeof(__pyx_k_KL), 0, 0, 1, 0}, {&__pyx_n_s_KeyError, __pyx_k_KeyError, sizeof(__pyx_k_KeyError), 0, 0, 1, 1}, {&__pyx_n_s_LC_TIME, __pyx_k_LC_TIME, sizeof(__pyx_k_LC_TIME), 0, 0, 1, 1}, {&__pyx_n_s_LC_date, __pyx_k_LC_date, sizeof(__pyx_k_LC_date), 0, 0, 1, 1}, {&__pyx_n_s_LC_date_time, __pyx_k_LC_date_time, sizeof(__pyx_k_LC_date_time), 0, 0, 1, 1}, {&__pyx_n_s_LC_time, __pyx_k_LC_time, sizeof(__pyx_k_LC_time), 0, 0, 1, 1}, {&__pyx_n_s_LocaleTime, __pyx_k_LocaleTime, sizeof(__pyx_k_LocaleTime), 0, 0, 1, 1}, {&__pyx_n_s_LocaleTime___calc_am_pm, __pyx_k_LocaleTime___calc_am_pm, sizeof(__pyx_k_LocaleTime___calc_am_pm), 0, 0, 1, 1}, {&__pyx_n_s_LocaleTime___calc_date_time, __pyx_k_LocaleTime___calc_date_time, sizeof(__pyx_k_LocaleTime___calc_date_time), 0, 0, 1, 1}, {&__pyx_n_s_LocaleTime___calc_month, __pyx_k_LocaleTime___calc_month, sizeof(__pyx_k_LocaleTime___calc_month), 0, 0, 1, 1}, {&__pyx_n_s_LocaleTime___calc_timezone, __pyx_k_LocaleTime___calc_timezone, sizeof(__pyx_k_LocaleTime___calc_timezone), 0, 0, 1, 1}, {&__pyx_n_s_LocaleTime___calc_weekday, __pyx_k_LocaleTime___calc_weekday, sizeof(__pyx_k_LocaleTime___calc_weekday), 0, 0, 1, 1}, {&__pyx_n_s_LocaleTime___init, __pyx_k_LocaleTime___init, sizeof(__pyx_k_LocaleTime___init), 0, 0, 1, 1}, {&__pyx_n_s_LocaleTime___pad, __pyx_k_LocaleTime___pad, sizeof(__pyx_k_LocaleTime___pad), 0, 0, 1, 1}, {&__pyx_n_s_LocaleTime__calc_am_pm, __pyx_k_LocaleTime__calc_am_pm, sizeof(__pyx_k_LocaleTime__calc_am_pm), 0, 0, 1, 1}, {&__pyx_n_s_LocaleTime__calc_date_time, __pyx_k_LocaleTime__calc_date_time, sizeof(__pyx_k_LocaleTime__calc_date_time), 0, 0, 1, 1}, {&__pyx_n_s_LocaleTime__calc_month, __pyx_k_LocaleTime__calc_month, sizeof(__pyx_k_LocaleTime__calc_month), 0, 0, 1, 1}, {&__pyx_n_s_LocaleTime__calc_timezone, __pyx_k_LocaleTime__calc_timezone, sizeof(__pyx_k_LocaleTime__calc_timezone), 0, 0, 1, 1}, {&__pyx_n_s_LocaleTime__calc_weekday, __pyx_k_LocaleTime__calc_weekday, sizeof(__pyx_k_LocaleTime__calc_weekday), 0, 0, 1, 1}, {&__pyx_n_s_LocaleTime__pad, __pyx_k_LocaleTime__pad, sizeof(__pyx_k_LocaleTime__pad), 0, 0, 1, 1}, {&__pyx_n_s_LooseVersion, __pyx_k_LooseVersion, sizeof(__pyx_k_LooseVersion), 0, 0, 1, 1}, {&__pyx_n_s_M, __pyx_k_M, sizeof(__pyx_k_M), 0, 0, 1, 1}, {&__pyx_n_s_M8, __pyx_k_M8, sizeof(__pyx_k_M8), 0, 0, 1, 1}, {&__pyx_kp_s_M8_ns, __pyx_k_M8_ns, sizeof(__pyx_k_M8_ns), 0, 0, 1, 0}, {&__pyx_kp_s_M_2, __pyx_k_M_2, sizeof(__pyx_k_M_2), 0, 0, 1, 0}, {&__pyx_n_s_NAN, __pyx_k_NAN, sizeof(__pyx_k_NAN), 0, 0, 1, 1}, {&__pyx_n_s_NAT, __pyx_k_NAT, sizeof(__pyx_k_NAT), 0, 0, 1, 1}, {&__pyx_kp_s_N_ot_A_T_ime_the_time_equivalen, __pyx_k_N_ot_A_T_ime_the_time_equivalen, sizeof(__pyx_k_N_ot_A_T_ime_the_time_equivalen), 0, 0, 1, 0}, {&__pyx_n_s_NaN, __pyx_k_NaN, sizeof(__pyx_k_NaN), 0, 0, 1, 1}, {&__pyx_n_s_NaT, __pyx_k_NaT, sizeof(__pyx_k_NaT), 0, 0, 1, 1}, {&__pyx_n_s_NaTType, __pyx_k_NaTType, sizeof(__pyx_k_NaTType), 0, 0, 1, 1}, {&__pyx_n_s_NaTType___hash, __pyx_k_NaTType___hash, sizeof(__pyx_k_NaTType___hash), 0, 0, 1, 1}, {&__pyx_n_s_NaTType___new, __pyx_k_NaTType___new, sizeof(__pyx_k_NaTType___new), 0, 0, 1, 1}, {&__pyx_n_s_NaTType___repr, __pyx_k_NaTType___repr, sizeof(__pyx_k_NaTType___repr), 0, 0, 1, 1}, {&__pyx_n_s_NaTType___str, __pyx_k_NaTType___str, sizeof(__pyx_k_NaTType___str), 0, 0, 1, 1}, {&__pyx_n_s_NaTType_toordinal, __pyx_k_NaTType_toordinal, sizeof(__pyx_k_NaTType_toordinal), 0, 0, 1, 1}, {&__pyx_n_s_NaTType_weekday, __pyx_k_NaTType_weekday, sizeof(__pyx_k_NaTType_weekday), 0, 0, 1, 1}, {&__pyx_n_s_NameError, __pyx_k_NameError, sizeof(__pyx_k_NameError), 0, 0, 1, 1}, {&__pyx_n_s_NonExistentTimeError, __pyx_k_NonExistentTimeError, sizeof(__pyx_k_NonExistentTimeError), 0, 0, 1, 1}, {&__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_None, __pyx_k_None, sizeof(__pyx_k_None), 0, 0, 1, 1}, {&__pyx_kp_s_NumPy_1_6_1_business_freq_not_su, __pyx_k_NumPy_1_6_1_business_freq_not_su, sizeof(__pyx_k_NumPy_1_6_1_business_freq_not_su), 0, 0, 1, 0}, {&__pyx_n_s_OutOfBoundsDatetime, __pyx_k_OutOfBoundsDatetime, sizeof(__pyx_k_OutOfBoundsDatetime), 0, 0, 1, 1}, {&__pyx_kp_s_Out_of_bounds_nanosecond_timesta, __pyx_k_Out_of_bounds_nanosecond_timesta, sizeof(__pyx_k_Out_of_bounds_nanosecond_timesta), 0, 0, 1, 0}, {&__pyx_n_s_P, __pyx_k_P, sizeof(__pyx_k_P), 0, 0, 1, 1}, {&__pyx_kp_s_P_H_2_0_3_0_1_d_d, __pyx_k_P_H_2_0_3_0_1_d_d, sizeof(__pyx_k_P_H_2_0_3_0_1_d_d), 0, 0, 1, 0}, {&__pyx_kp_s_P_I_1_0_2_0_1_9_1_9, __pyx_k_P_I_1_0_2_0_1_9_1_9, sizeof(__pyx_k_P_I_1_0_2_0_1_9_1_9), 0, 0, 1, 0}, {&__pyx_kp_s_P_M_0_5_d_d, __pyx_k_P_M_0_5_d_d, sizeof(__pyx_k_P_M_0_5_d_d), 0, 0, 1, 0}, {&__pyx_kp_s_P_S_6_0_1_0_5_d_d, __pyx_k_P_S_6_0_1_0_5_d_d, sizeof(__pyx_k_P_S_6_0_1_0_5_d_d), 0, 0, 1, 0}, {&__pyx_kp_s_P_U_5_0_3_0_4_d_d, __pyx_k_P_U_5_0_3_0_4_d_d, sizeof(__pyx_k_P_U_5_0_3_0_4_d_d), 0, 0, 1, 0}, {&__pyx_kp_s_P_Y_d_d_d_d, __pyx_k_P_Y_d_d_d_d, sizeof(__pyx_k_P_Y_d_d_d_d), 0, 0, 1, 0}, {&__pyx_kp_s_P_d_3_0_1_1_2_d_0_1_9_1_9_1_9, __pyx_k_P_d_3_0_1_1_2_d_0_1_9_1_9_1_9, sizeof(__pyx_k_P_d_3_0_1_1_2_d_0_1_9_1_9_1_9), 0, 0, 1, 0}, {&__pyx_kp_s_P_f_0_9_1_6, __pyx_k_P_f_0_9_1_6, sizeof(__pyx_k_P_f_0_9_1_6), 0, 0, 1, 0}, {&__pyx_kp_s_P_j_36_0_6_3_0_5_d_1_2_d_d_0_1, __pyx_k_P_j_36_0_6_3_0_5_d_1_2_d_d_0_1, sizeof(__pyx_k_P_j_36_0_6_3_0_5_d_1_2_d_d_0_1), 0, 0, 1, 0}, {&__pyx_kp_s_P_m_1_0_2_0_1_9_1_9, __pyx_k_P_m_1_0_2_0_1_9_1_9, sizeof(__pyx_k_P_m_1_0_2_0_1_9_1_9), 0, 0, 1, 0}, {&__pyx_kp_s_P_s_s, __pyx_k_P_s_s, sizeof(__pyx_k_P_s_s), 0, 0, 1, 0}, {&__pyx_kp_s_P_w_0_6, __pyx_k_P_w_0_6, sizeof(__pyx_k_P_w_0_6), 0, 0, 1, 0}, {&__pyx_kp_s_P_y_d_d, __pyx_k_P_y_d_d, sizeof(__pyx_k_P_y_d_d), 0, 0, 1, 0}, {&__pyx_n_s_Period, __pyx_k_Period, sizeof(__pyx_k_Period), 0, 0, 1, 1}, {&__pyx_n_s_RuntimeError, __pyx_k_RuntimeError, sizeof(__pyx_k_RuntimeError), 0, 0, 1, 1}, {&__pyx_n_s_S, __pyx_k_S, sizeof(__pyx_k_S), 0, 0, 1, 1}, {&__pyx_kp_s_S_2, __pyx_k_S_2, sizeof(__pyx_k_S_2), 0, 0, 1, 0}, {&__pyx_n_s_S_RESO, __pyx_k_S_RESO, sizeof(__pyx_k_S_RESO), 0, 0, 1, 1}, {&__pyx_kp_s_Stores_and_handles_locale_specif, __pyx_k_Stores_and_handles_locale_specif, sizeof(__pyx_k_Stores_and_handles_locale_specif), 0, 0, 1, 0}, {&__pyx_n_s_T, __pyx_k_T, sizeof(__pyx_k_T), 0, 0, 1, 1}, {&__pyx_n_s_T_RESO, __pyx_k_T_RESO, sizeof(__pyx_k_T_RESO), 0, 0, 1, 1}, {&__pyx_kp_s_There_are_i_dst_switches_when_th, __pyx_k_There_are_i_dst_switches_when_th, sizeof(__pyx_k_There_are_i_dst_switches_when_th), 0, 0, 1, 0}, {&__pyx_n_s_TimeRE, __pyx_k_TimeRE, sizeof(__pyx_k_TimeRE), 0, 0, 1, 1}, {&__pyx_n_s_TimeRE___init, __pyx_k_TimeRE___init, sizeof(__pyx_k_TimeRE___init), 0, 0, 1, 1}, {&__pyx_n_s_TimeRE___seqToRE, __pyx_k_TimeRE___seqToRE, sizeof(__pyx_k_TimeRE___seqToRE), 0, 0, 1, 1}, {&__pyx_n_s_TimeRE__seqToRE, __pyx_k_TimeRE__seqToRE, sizeof(__pyx_k_TimeRE__seqToRE), 0, 0, 1, 1}, {&__pyx_n_s_TimeRE_cache, __pyx_k_TimeRE_cache, sizeof(__pyx_k_TimeRE_cache), 0, 0, 1, 1}, {&__pyx_n_s_TimeRE_compile, __pyx_k_TimeRE_compile, sizeof(__pyx_k_TimeRE_compile), 0, 0, 1, 1}, {&__pyx_n_s_TimeRE_pattern, __pyx_k_TimeRE_pattern, sizeof(__pyx_k_TimeRE_pattern), 0, 0, 1, 1}, {&__pyx_kp_s_TimeStamp_is_the_pandas_equivale, __pyx_k_TimeStamp_is_the_pandas_equivale, sizeof(__pyx_k_TimeStamp_is_the_pandas_equivale), 0, 0, 1, 0}, {&__pyx_n_s_Timestamp, __pyx_k_Timestamp, sizeof(__pyx_k_Timestamp), 0, 0, 1, 1}, {&__pyx_n_s_Timestamp___new, __pyx_k_Timestamp___new, sizeof(__pyx_k_Timestamp___new), 0, 0, 1, 1}, {&__pyx_n_s_Timestamp___reduce, __pyx_k_Timestamp___reduce, sizeof(__pyx_k_Timestamp___reduce), 0, 0, 1, 1}, {&__pyx_n_s_Timestamp___repr, __pyx_k_Timestamp___repr, sizeof(__pyx_k_Timestamp___repr), 0, 0, 1, 1}, {&__pyx_n_s_Timestamp___setstate, __pyx_k_Timestamp___setstate, sizeof(__pyx_k_Timestamp___setstate), 0, 0, 1, 1}, {&__pyx_n_s_Timestamp__date_repr, __pyx_k_Timestamp__date_repr, sizeof(__pyx_k_Timestamp__date_repr), 0, 0, 1, 1}, {&__pyx_n_s_Timestamp__has_time_component, __pyx_k_Timestamp__has_time_component, sizeof(__pyx_k_Timestamp__has_time_component), 0, 0, 1, 1}, {&__pyx_n_s_Timestamp__repr_base, __pyx_k_Timestamp__repr_base, sizeof(__pyx_k_Timestamp__repr_base), 0, 0, 1, 1}, {&__pyx_n_s_Timestamp__time_repr, __pyx_k_Timestamp__time_repr, sizeof(__pyx_k_Timestamp__time_repr), 0, 0, 1, 1}, {&__pyx_n_s_Timestamp_asm8, __pyx_k_Timestamp_asm8, sizeof(__pyx_k_Timestamp_asm8), 0, 0, 1, 1}, {&__pyx_n_s_Timestamp_dayofweek, __pyx_k_Timestamp_dayofweek, sizeof(__pyx_k_Timestamp_dayofweek), 0, 0, 1, 1}, {&__pyx_n_s_Timestamp_dayofyear, __pyx_k_Timestamp_dayofyear, sizeof(__pyx_k_Timestamp_dayofyear), 0, 0, 1, 1}, {&__pyx_n_s_Timestamp_freq, __pyx_k_Timestamp_freq, sizeof(__pyx_k_Timestamp_freq), 0, 0, 1, 1}, {&__pyx_n_s_Timestamp_freqstr, __pyx_k_Timestamp_freqstr, sizeof(__pyx_k_Timestamp_freqstr), 0, 0, 1, 1}, {&__pyx_n_s_Timestamp_fromordinal, __pyx_k_Timestamp_fromordinal, sizeof(__pyx_k_Timestamp_fromordinal), 0, 0, 1, 1}, {&__pyx_n_s_Timestamp_isoformat, __pyx_k_Timestamp_isoformat, sizeof(__pyx_k_Timestamp_isoformat), 0, 0, 1, 1}, {&__pyx_n_s_Timestamp_now, __pyx_k_Timestamp_now, sizeof(__pyx_k_Timestamp_now), 0, 0, 1, 1}, {&__pyx_n_s_Timestamp_quarter, __pyx_k_Timestamp_quarter, sizeof(__pyx_k_Timestamp_quarter), 0, 0, 1, 1}, {&__pyx_n_s_Timestamp_replace, __pyx_k_Timestamp_replace, sizeof(__pyx_k_Timestamp_replace), 0, 0, 1, 1}, {&__pyx_kp_s_Timestamp_s_tz_s, __pyx_k_Timestamp_s_tz_s, sizeof(__pyx_k_Timestamp_s_tz_s), 0, 0, 1, 0}, {&__pyx_n_s_Timestamp_to_period, __pyx_k_Timestamp_to_period, sizeof(__pyx_k_Timestamp_to_period), 0, 0, 1, 1}, {&__pyx_n_s_Timestamp_to_pydatetime, __pyx_k_Timestamp_to_pydatetime, sizeof(__pyx_k_Timestamp_to_pydatetime), 0, 0, 1, 1}, {&__pyx_n_s_Timestamp_today, __pyx_k_Timestamp_today, sizeof(__pyx_k_Timestamp_today), 0, 0, 1, 1}, {&__pyx_n_s_Timestamp_tz, __pyx_k_Timestamp_tz, sizeof(__pyx_k_Timestamp_tz), 0, 0, 1, 1}, {&__pyx_n_s_Timestamp_tz_convert, __pyx_k_Timestamp_tz_convert, sizeof(__pyx_k_Timestamp_tz_convert), 0, 0, 1, 1}, {&__pyx_n_s_Timestamp_tz_localize, __pyx_k_Timestamp_tz_localize, sizeof(__pyx_k_Timestamp_tz_localize), 0, 0, 1, 1}, {&__pyx_n_s_Timestamp_utcnow, __pyx_k_Timestamp_utcnow, sizeof(__pyx_k_Timestamp_utcnow), 0, 0, 1, 1}, {&__pyx_n_s_Timestamp_week, __pyx_k_Timestamp_week, sizeof(__pyx_k_Timestamp_week), 0, 0, 1, 1}, {&__pyx_n_s_TypeError, __pyx_k_TypeError, sizeof(__pyx_k_TypeError), 0, 0, 1, 1}, {&__pyx_kp_s_Tz_aware_datetime_datetime_canno, __pyx_k_Tz_aware_datetime_datetime_canno, sizeof(__pyx_k_Tz_aware_datetime_datetime_canno), 0, 0, 1, 0}, {&__pyx_n_s_U, __pyx_k_U, sizeof(__pyx_k_U), 0, 0, 1, 1}, {&__pyx_n_s_US_RESO, __pyx_k_US_RESO, sizeof(__pyx_k_US_RESO), 0, 0, 1, 1}, {&__pyx_n_s_UTC, __pyx_k_UTC, sizeof(__pyx_k_UTC), 0, 0, 1, 1}, {&__pyx_kp_s_U_2, __pyx_k_U_2, sizeof(__pyx_k_U_2), 0, 0, 1, 0}, {&__pyx_n_s_U_W, __pyx_k_U_W, sizeof(__pyx_k_U_W), 0, 0, 1, 1}, {&__pyx_kp_s_Unable_to_convert_to_desired_fre, __pyx_k_Unable_to_convert_to_desired_fre, sizeof(__pyx_k_Unable_to_convert_to_desired_fre), 0, 0, 1, 0}, {&__pyx_kp_s_Unable_to_get_quarter_and_year, __pyx_k_Unable_to_get_quarter_and_year, sizeof(__pyx_k_Unable_to_get_quarter_and_year), 0, 0, 1, 0}, {&__pyx_kp_s_Unable_to_parse_s, __pyx_k_Unable_to_parse_s, sizeof(__pyx_k_Unable_to_parse_s), 0, 0, 1, 0}, {&__pyx_kp_s_Unknown_freq_d, __pyx_k_Unknown_freq_d, sizeof(__pyx_k_Unknown_freq_d), 0, 0, 1, 0}, {&__pyx_kp_s_Unrecognized_period_code_d, __pyx_k_Unrecognized_period_code_d, sizeof(__pyx_k_Unrecognized_period_code_d), 0, 0, 1, 0}, {&__pyx_kp_s_Unrecognized_type_s, __pyx_k_Unrecognized_type_s, sizeof(__pyx_k_Unrecognized_type_s), 0, 0, 1, 0}, {&__pyx_kp_s_Unrecognized_value_type_s, __pyx_k_Unrecognized_value_type_s, sizeof(__pyx_k_Unrecognized_value_type_s), 0, 0, 1, 0}, {&__pyx_n_s_ValueError, __pyx_k_ValueError, sizeof(__pyx_k_ValueError), 0, 0, 1, 1}, {&__pyx_n_s_W, __pyx_k_W, sizeof(__pyx_k_W), 0, 0, 1, 1}, {&__pyx_kp_s_W_2, __pyx_k_W_2, sizeof(__pyx_k_W_2), 0, 0, 1, 0}, {&__pyx_kp_s_Warning_discarding_nonzero_nanos, __pyx_k_Warning_discarding_nonzero_nanos, sizeof(__pyx_k_Warning_discarding_nonzero_nanos), 0, 0, 1, 0}, {&__pyx_kp_s_X, __pyx_k_X, sizeof(__pyx_k_X), 0, 0, 1, 0}, {&__pyx_n_s_X_2, __pyx_k_X_2, sizeof(__pyx_k_X_2), 0, 0, 1, 1}, {&__pyx_n_s_Y, __pyx_k_Y, sizeof(__pyx_k_Y), 0, 0, 1, 1}, {&__pyx_kp_b_Y_2, __pyx_k_Y_2, sizeof(__pyx_k_Y_2), 0, 0, 0, 0}, {&__pyx_kp_s_Y_2, __pyx_k_Y_2, sizeof(__pyx_k_Y_2), 0, 0, 1, 0}, {&__pyx_kp_b_Y_m, __pyx_k_Y_m, sizeof(__pyx_k_Y_m), 0, 0, 0, 0}, {&__pyx_kp_b_Y_m_d, __pyx_k_Y_m_d, sizeof(__pyx_k_Y_m_d), 0, 0, 0, 0}, {&__pyx_kp_b_Y_m_d_H_00, __pyx_k_Y_m_d_H_00, sizeof(__pyx_k_Y_m_d_H_00), 0, 0, 0, 0}, {&__pyx_kp_b_Y_m_d_H_M, __pyx_k_Y_m_d_H_M, sizeof(__pyx_k_Y_m_d_H_M), 0, 0, 0, 0}, {&__pyx_kp_b_Y_m_d_H_M_S, __pyx_k_Y_m_d_H_M_S, sizeof(__pyx_k_Y_m_d_H_M_S), 0, 0, 0, 0}, {&__pyx_kp_b_Y_m_d_H_M_S_l, __pyx_k_Y_m_d_H_M_S_l, sizeof(__pyx_k_Y_m_d_H_M_S_l), 0, 0, 0, 0}, {&__pyx_kp_b_Y_m_d_H_M_S_n, __pyx_k_Y_m_d_H_M_S_n, sizeof(__pyx_k_Y_m_d_H_M_S_n), 0, 0, 0, 0}, {&__pyx_kp_b_Y_m_d_H_M_S_u, __pyx_k_Y_m_d_H_M_S_u, sizeof(__pyx_k_Y_m_d_H_M_S_u), 0, 0, 0, 0}, {&__pyx_kp_s_Z, __pyx_k_Z, sizeof(__pyx_k_Z), 0, 0, 1, 0}, {&__pyx_n_s_Z_2, __pyx_k_Z_2, sizeof(__pyx_k_Z_2), 0, 0, 1, 1}, {&__pyx_kp_s_Z_3, __pyx_k_Z_3, sizeof(__pyx_k_Z_3), 0, 0, 1, 0}, {&__pyx_kp_s_Z_tz_s, __pyx_k_Z_tz_s, sizeof(__pyx_k_Z_tz_s), 0, 0, 1, 0}, {&__pyx_kp_s__13, __pyx_k__13, sizeof(__pyx_k__13), 0, 0, 1, 0}, {&__pyx_kp_s__34, __pyx_k__34, sizeof(__pyx_k__34), 0, 0, 1, 0}, {&__pyx_kp_s__35, __pyx_k__35, sizeof(__pyx_k__35), 0, 0, 1, 0}, {&__pyx_kp_s__36, __pyx_k__36, sizeof(__pyx_k__36), 0, 0, 1, 0}, {&__pyx_kp_s__67, __pyx_k__67, sizeof(__pyx_k__67), 0, 0, 1, 0}, {&__pyx_kp_s__90, __pyx_k__90, sizeof(__pyx_k__90), 0, 0, 1, 0}, {&__pyx_kp_s__91, __pyx_k__91, sizeof(__pyx_k__91), 0, 0, 1, 0}, {&__pyx_n_s_a, __pyx_k_a, sizeof(__pyx_k_a), 0, 0, 1, 1}, {&__pyx_kp_s_a_2, __pyx_k_a_2, sizeof(__pyx_k_a_2), 0, 0, 1, 0}, {&__pyx_n_s_a_idx, __pyx_k_a_idx, sizeof(__pyx_k_a_idx), 0, 0, 1, 1}, {&__pyx_n_s_a_month, __pyx_k_a_month, sizeof(__pyx_k_a_month), 0, 0, 1, 1}, {&__pyx_n_s_a_weekday, __pyx_k_a_weekday, sizeof(__pyx_k_a_weekday), 0, 0, 1, 1}, {&__pyx_n_s_abs, __pyx_k_abs, sizeof(__pyx_k_abs), 0, 0, 1, 1}, {&__pyx_n_s_add, __pyx_k_add, sizeof(__pyx_k_add), 0, 0, 1, 1}, {&__pyx_n_s_all, __pyx_k_all, sizeof(__pyx_k_all), 0, 0, 1, 1}, {&__pyx_n_s_all_2, __pyx_k_all_2, sizeof(__pyx_k_all_2), 0, 0, 1, 1}, {&__pyx_n_s_allocate_lock, __pyx_k_allocate_lock, sizeof(__pyx_k_allocate_lock), 0, 0, 1, 1}, {&__pyx_n_s_am_pm, __pyx_k_am_pm, sizeof(__pyx_k_am_pm), 0, 0, 1, 1}, {&__pyx_n_s_ampm, __pyx_k_ampm, sizeof(__pyx_k_ampm), 0, 0, 1, 1}, {&__pyx_n_s_append, __pyx_k_append, sizeof(__pyx_k_append), 0, 0, 1, 1}, {&__pyx_n_s_apply, __pyx_k_apply, sizeof(__pyx_k_apply), 0, 0, 1, 1}, {&__pyx_n_s_apply_offset, __pyx_k_apply_offset, sizeof(__pyx_k_apply_offset), 0, 0, 1, 1}, {&__pyx_n_s_args, __pyx_k_args, sizeof(__pyx_k_args), 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_split, __pyx_k_array_split, sizeof(__pyx_k_array_split), 0, 0, 1, 1}, {&__pyx_n_s_array_strptime, __pyx_k_array_strptime, sizeof(__pyx_k_array_strptime), 0, 0, 1, 1}, {&__pyx_n_s_array_to_datetime, __pyx_k_array_to_datetime, sizeof(__pyx_k_array_to_datetime), 0, 0, 1, 1}, {&__pyx_n_s_array_to_timedelta64, __pyx_k_array_to_timedelta64, sizeof(__pyx_k_array_to_timedelta64), 0, 0, 1, 1}, {&__pyx_n_s_asm8, __pyx_k_asm8, sizeof(__pyx_k_asm8), 0, 0, 1, 1}, {&__pyx_n_s_astimezone, __pyx_k_astimezone, sizeof(__pyx_k_astimezone), 0, 0, 1, 1}, {&__pyx_n_s_astype, __pyx_k_astype, sizeof(__pyx_k_astype), 0, 0, 1, 1}, {&__pyx_n_s_b, __pyx_k_b, sizeof(__pyx_k_b), 0, 0, 1, 1}, {&__pyx_kp_s_b_2, __pyx_k_b_2, sizeof(__pyx_k_b_2), 0, 0, 1, 0}, {&__pyx_n_s_b_idx, __pyx_k_b_idx, sizeof(__pyx_k_b_idx), 0, 0, 1, 1}, {&__pyx_n_s_bad_directive, __pyx_k_bad_directive, sizeof(__pyx_k_bad_directive), 0, 0, 1, 1}, {&__pyx_kp_s_bad_month_number_0_must_be_1_12, __pyx_k_bad_month_number_0_must_be_1_12, sizeof(__pyx_k_bad_month_number_0_must_be_1_12), 0, 0, 1, 0}, {&__pyx_n_s_base, __pyx_k_base, sizeof(__pyx_k_base), 0, 0, 1, 1}, {&__pyx_n_s_base1, __pyx_k_base1, sizeof(__pyx_k_base1), 0, 0, 1, 1}, {&__pyx_n_s_base2, __pyx_k_base2, sizeof(__pyx_k_base2), 0, 0, 1, 1}, {&__pyx_n_s_basestring, __pyx_k_basestring, sizeof(__pyx_k_basestring), 0, 0, 1, 1}, {&__pyx_n_s_both_eq, __pyx_k_both_eq, sizeof(__pyx_k_both_eq), 0, 0, 1, 1}, {&__pyx_n_s_both_nat, __pyx_k_both_nat, sizeof(__pyx_k_both_nat), 0, 0, 1, 1}, {&__pyx_n_s_boxed, __pyx_k_boxed, sizeof(__pyx_k_boxed), 0, 0, 1, 1}, {&__pyx_n_s_build_field_sarray, __pyx_k_build_field_sarray, sizeof(__pyx_k_build_field_sarray), 0, 0, 1, 1}, {&__pyx_kp_s_c, __pyx_k_c, sizeof(__pyx_k_c), 0, 0, 1, 0}, {&__pyx_n_s_c_2, __pyx_k_c_2, sizeof(__pyx_k_c_2), 0, 0, 1, 1}, {&__pyx_n_s_cache_lock, __pyx_k_cache_lock, sizeof(__pyx_k_cache_lock), 0, 0, 1, 1}, {&__pyx_n_s_calc_am_pm, __pyx_k_calc_am_pm, sizeof(__pyx_k_calc_am_pm), 0, 0, 1, 1}, {&__pyx_n_s_calc_date_time, __pyx_k_calc_date_time, sizeof(__pyx_k_calc_date_time), 0, 0, 1, 1}, {&__pyx_n_s_calc_julian_from_U_or_W, __pyx_k_calc_julian_from_U_or_W, sizeof(__pyx_k_calc_julian_from_U_or_W), 0, 0, 1, 1}, {&__pyx_n_s_calc_month, __pyx_k_calc_month, sizeof(__pyx_k_calc_month), 0, 0, 1, 1}, {&__pyx_n_s_calc_timezone, __pyx_k_calc_timezone, sizeof(__pyx_k_calc_timezone), 0, 0, 1, 1}, {&__pyx_n_s_calc_weekday, __pyx_k_calc_weekday, sizeof(__pyx_k_calc_weekday), 0, 0, 1, 1}, {&__pyx_n_s_calendar, __pyx_k_calendar, sizeof(__pyx_k_calendar), 0, 0, 1, 1}, {&__pyx_n_s_cast_to_nanoseconds, __pyx_k_cast_to_nanoseconds, sizeof(__pyx_k_cast_to_nanoseconds), 0, 0, 1, 1}, {&__pyx_n_s_clear, __pyx_k_clear, sizeof(__pyx_k_clear), 0, 0, 1, 1}, {&__pyx_n_s_close, __pyx_k_close, sizeof(__pyx_k_close), 0, 0, 1, 1}, {&__pyx_n_s_cls, __pyx_k_cls, sizeof(__pyx_k_cls), 0, 0, 1, 1}, {&__pyx_n_s_code, __pyx_k_code, sizeof(__pyx_k_code), 0, 0, 1, 1}, {&__pyx_n_s_coerce, __pyx_k_coerce, sizeof(__pyx_k_coerce), 0, 0, 1, 1}, {&__pyx_n_s_combine, __pyx_k_combine, sizeof(__pyx_k_combine), 0, 0, 1, 1}, {&__pyx_n_s_compat_NaT, __pyx_k_compat_NaT, sizeof(__pyx_k_compat_NaT), 0, 0, 1, 1}, {&__pyx_n_s_compile, __pyx_k_compile, sizeof(__pyx_k_compile), 0, 0, 1, 1}, {&__pyx_n_s_convert_to_timedelta, __pyx_k_convert_to_timedelta, sizeof(__pyx_k_convert_to_timedelta), 0, 0, 1, 1}, {&__pyx_n_s_count, __pyx_k_count, sizeof(__pyx_k_count), 0, 0, 1, 1}, {&__pyx_n_s_current_format, __pyx_k_current_format, sizeof(__pyx_k_current_format), 0, 0, 1, 1}, {&__pyx_n_s_d, __pyx_k_d, sizeof(__pyx_k_d), 0, 0, 1, 1}, {&__pyx_kp_s_d_2, __pyx_k_d_2, sizeof(__pyx_k_d_2), 0, 0, 1, 0}, {&__pyx_kp_s_d_2d_2d, __pyx_k_d_2d_2d, sizeof(__pyx_k_d_2d_2d), 0, 0, 1, 0}, {&__pyx_kp_s_d_2d_2d_2d_2d_2d, __pyx_k_d_2d_2d_2d_2d_2d, sizeof(__pyx_k_d_2d_2d_2d_2d_2d), 0, 0, 1, 0}, {&__pyx_n_s_date, __pyx_k_date, sizeof(__pyx_k_date), 0, 0, 1, 1}, {&__pyx_n_s_date_normalize, __pyx_k_date_normalize, sizeof(__pyx_k_date_normalize), 0, 0, 1, 1}, {&__pyx_n_s_date_repr, __pyx_k_date_repr, sizeof(__pyx_k_date_repr), 0, 0, 1, 1}, {&__pyx_n_s_date_string, __pyx_k_date_string, sizeof(__pyx_k_date_string), 0, 0, 1, 1}, {&__pyx_n_s_date_time, __pyx_k_date_time, sizeof(__pyx_k_date_time), 0, 0, 1, 1}, {&__pyx_n_s_dates_normalized, __pyx_k_dates_normalized, sizeof(__pyx_k_dates_normalized), 0, 0, 1, 1}, {&__pyx_n_s_datetime, __pyx_k_datetime, sizeof(__pyx_k_datetime), 0, 0, 1, 1}, {&__pyx_n_s_datetime64, __pyx_k_datetime64, sizeof(__pyx_k_datetime64), 0, 0, 1, 1}, {&__pyx_n_s_datetime_date, __pyx_k_datetime_date, sizeof(__pyx_k_datetime_date), 0, 0, 1, 1}, {&__pyx_n_s_datetime_result, __pyx_k_datetime_result, sizeof(__pyx_k_datetime_result), 0, 0, 1, 1}, {&__pyx_n_s_datetime_time, __pyx_k_datetime_time, sizeof(__pyx_k_datetime_time), 0, 0, 1, 1}, {&__pyx_n_s_datetime_to_datetime64, __pyx_k_datetime_to_datetime64, sizeof(__pyx_k_datetime_to_datetime64), 0, 0, 1, 1}, {&__pyx_n_s_dateutil_tz, __pyx_k_dateutil_tz, sizeof(__pyx_k_dateutil_tz), 0, 0, 1, 1}, {&__pyx_n_s_day, __pyx_k_day, sizeof(__pyx_k_day), 0, 0, 1, 1}, {&__pyx_n_s_day_abbr, __pyx_k_day_abbr, sizeof(__pyx_k_day_abbr), 0, 0, 1, 1}, {&__pyx_n_s_day_name, __pyx_k_day_name, sizeof(__pyx_k_day_name), 0, 0, 1, 1}, {&__pyx_n_s_day_of_week, __pyx_k_day_of_week, sizeof(__pyx_k_day_of_week), 0, 0, 1, 1}, {&__pyx_n_s_dayfirst, __pyx_k_dayfirst, sizeof(__pyx_k_dayfirst), 0, 0, 1, 1}, {&__pyx_n_s_daylight, __pyx_k_daylight, sizeof(__pyx_k_daylight), 0, 0, 1, 1}, {&__pyx_n_s_dayofweek, __pyx_k_dayofweek, sizeof(__pyx_k_dayofweek), 0, 0, 1, 1}, {&__pyx_n_s_dayofyear, __pyx_k_dayofyear, sizeof(__pyx_k_dayofyear), 0, 0, 1, 1}, {&__pyx_n_s_days, __pyx_k_days, sizeof(__pyx_k_days), 0, 0, 1, 1}, {&__pyx_n_s_days_to_week, __pyx_k_days_to_week, sizeof(__pyx_k_days_to_week), 0, 0, 1, 1}, {&__pyx_n_s_decode, __pyx_k_decode, sizeof(__pyx_k_decode), 0, 0, 1, 1}, {&__pyx_n_s_delta, __pyx_k_delta, sizeof(__pyx_k_delta), 0, 0, 1, 1}, {&__pyx_n_s_delta_to_nanoseconds, __pyx_k_delta_to_nanoseconds, sizeof(__pyx_k_delta_to_nanoseconds), 0, 0, 1, 1}, {&__pyx_n_s_deltas, __pyx_k_deltas, sizeof(__pyx_k_deltas), 0, 0, 1, 1}, {&__pyx_n_s_diff, __pyx_k_diff, sizeof(__pyx_k_diff), 0, 0, 1, 1}, {&__pyx_n_s_directive, __pyx_k_directive, sizeof(__pyx_k_directive), 0, 0, 1, 1}, {&__pyx_n_s_directive_index, __pyx_k_directive_index, sizeof(__pyx_k_directive_index), 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_doc, __pyx_k_doc, sizeof(__pyx_k_doc), 0, 0, 1, 1}, {&__pyx_n_s_does_string_look_like_datetime, __pyx_k_does_string_look_like_datetime, sizeof(__pyx_k_does_string_look_like_datetime), 0, 0, 1, 1}, {&__pyx_n_s_dow, __pyx_k_dow, sizeof(__pyx_k_dow), 0, 0, 1, 1}, {&__pyx_n_s_doy, __pyx_k_doy, sizeof(__pyx_k_doy), 0, 0, 1, 1}, {&__pyx_n_s_dst_hours, __pyx_k_dst_hours, sizeof(__pyx_k_dst_hours), 0, 0, 1, 1}, {&__pyx_n_s_dt, __pyx_k_dt, sizeof(__pyx_k_dt), 0, 0, 1, 1}, {&__pyx_n_s_dt64arr_to_periodarr, __pyx_k_dt64arr_to_periodarr, sizeof(__pyx_k_dt64arr_to_periodarr), 0, 0, 1, 1}, {&__pyx_n_s_dtarr, __pyx_k_dtarr, sizeof(__pyx_k_dtarr), 0, 0, 1, 1}, {&__pyx_n_s_dtindex, __pyx_k_dtindex, sizeof(__pyx_k_dtindex), 0, 0, 1, 1}, {&__pyx_n_s_dts, __pyx_k_dts, sizeof(__pyx_k_dts), 0, 0, 1, 1}, {&__pyx_n_s_dtype, __pyx_k_dtype, sizeof(__pyx_k_dtype), 0, 0, 1, 1}, {&__pyx_n_s_du_utc, __pyx_k_du_utc, sizeof(__pyx_k_du_utc), 0, 0, 1, 1}, {&__pyx_n_s_dummy_thread, __pyx_k_dummy_thread, sizeof(__pyx_k_dummy_thread), 0, 0, 1, 1}, {&__pyx_n_s_dummy_thread_2, __pyx_k_dummy_thread_2, sizeof(__pyx_k_dummy_thread_2), 0, 0, 1, 1}, {&__pyx_n_s_empty, __pyx_k_empty, sizeof(__pyx_k_empty), 0, 0, 1, 1}, {&__pyx_n_s_encode, __pyx_k_encode, sizeof(__pyx_k_encode), 0, 0, 1, 1}, {&__pyx_n_s_end, __pyx_k_end, sizeof(__pyx_k_end), 0, 0, 1, 1}, {&__pyx_n_s_enter, __pyx_k_enter, sizeof(__pyx_k_enter), 0, 0, 1, 1}, {&__pyx_n_s_enumerate, __pyx_k_enumerate, sizeof(__pyx_k_enumerate), 0, 0, 1, 1}, {&__pyx_n_s_err, __pyx_k_err, sizeof(__pyx_k_err), 0, 0, 1, 1}, {&__pyx_n_s_escape, __pyx_k_escape, sizeof(__pyx_k_escape), 0, 0, 1, 1}, {&__pyx_n_s_exit, __pyx_k_exit, sizeof(__pyx_k_exit), 0, 0, 1, 1}, {&__pyx_n_s_extract_ordinals, __pyx_k_extract_ordinals, sizeof(__pyx_k_extract_ordinals), 0, 0, 1, 1}, {&__pyx_n_s_f, __pyx_k_f, sizeof(__pyx_k_f), 0, 0, 1, 1}, {&__pyx_kp_b_f_2, __pyx_k_f_2, sizeof(__pyx_k_f_2), 0, 0, 0, 0}, {&__pyx_n_s_f_month, __pyx_k_f_month, sizeof(__pyx_k_f_month), 0, 0, 1, 1}, {&__pyx_n_s_f_weekday, __pyx_k_f_weekday, sizeof(__pyx_k_f_weekday), 0, 0, 1, 1}, {&__pyx_n_s_fget, __pyx_k_fget, sizeof(__pyx_k_fget), 0, 0, 1, 1}, {&__pyx_n_s_field, __pyx_k_field, sizeof(__pyx_k_field), 0, 0, 1, 1}, {&__pyx_n_s_fields, __pyx_k_fields, sizeof(__pyx_k_fields), 0, 0, 1, 1}, {&__pyx_n_s_file, __pyx_k_file, sizeof(__pyx_k_file), 0, 0, 1, 1}, {&__pyx_n_s_fill, __pyx_k_fill, sizeof(__pyx_k_fill), 0, 0, 1, 1}, {&__pyx_n_s_finfo, __pyx_k_finfo, sizeof(__pyx_k_finfo), 0, 0, 1, 1}, {&__pyx_n_s_first_weekday, __pyx_k_first_weekday, sizeof(__pyx_k_first_weekday), 0, 0, 1, 1}, {&__pyx_n_s_flat, __pyx_k_flat, sizeof(__pyx_k_flat), 0, 0, 1, 1}, {&__pyx_n_s_fmt, __pyx_k_fmt, sizeof(__pyx_k_fmt), 0, 0, 1, 1}, {&__pyx_n_s_format, __pyx_k_format, sizeof(__pyx_k_format), 0, 0, 1, 1}, {&__pyx_n_s_format_regex, __pyx_k_format_regex, sizeof(__pyx_k_format_regex), 0, 0, 1, 1}, {&__pyx_n_s_found, __pyx_k_found, sizeof(__pyx_k_found), 0, 0, 1, 1}, {&__pyx_n_s_found_dict, __pyx_k_found_dict, sizeof(__pyx_k_found_dict), 0, 0, 1, 1}, {&__pyx_n_s_found_zone, __pyx_k_found_zone, sizeof(__pyx_k_found_zone), 0, 0, 1, 1}, {&__pyx_n_s_frac, __pyx_k_frac, sizeof(__pyx_k_frac), 0, 0, 1, 1}, {&__pyx_n_s_fraction, __pyx_k_fraction, sizeof(__pyx_k_fraction), 0, 0, 1, 1}, {&__pyx_n_s_freq, __pyx_k_freq, sizeof(__pyx_k_freq), 0, 0, 1, 1}, {&__pyx_n_s_freq1, __pyx_k_freq1, sizeof(__pyx_k_freq1), 0, 0, 1, 1}, {&__pyx_n_s_freq2, __pyx_k_freq2, sizeof(__pyx_k_freq2), 0, 0, 1, 1}, {&__pyx_n_s_freq_group, __pyx_k_freq_group, sizeof(__pyx_k_freq_group), 0, 0, 1, 1}, {&__pyx_n_s_freqstr, __pyx_k_freqstr, sizeof(__pyx_k_freqstr), 0, 0, 1, 1}, {&__pyx_n_s_fromordinal, __pyx_k_fromordinal, sizeof(__pyx_k_fromordinal), 0, 0, 1, 1}, {&__pyx_n_s_front, __pyx_k_front, sizeof(__pyx_k_front), 0, 0, 1, 1}, {&__pyx_n_s_func, __pyx_k_func, sizeof(__pyx_k_func), 0, 0, 1, 1}, {&__pyx_n_s_genexpr, __pyx_k_genexpr, sizeof(__pyx_k_genexpr), 0, 0, 1, 1}, {&__pyx_n_s_get, __pyx_k_get, sizeof(__pyx_k_get), 0, 0, 1, 1}, {&__pyx_n_s_get_date_field, __pyx_k_get_date_field, sizeof(__pyx_k_get_date_field), 0, 0, 1, 1}, {&__pyx_n_s_get_deltas, __pyx_k_get_deltas, sizeof(__pyx_k_get_deltas), 0, 0, 1, 1}, {&__pyx_n_s_get_field, __pyx_k_get_field, sizeof(__pyx_k_get_field), 0, 0, 1, 1}, {&__pyx_n_s_get_period_field, __pyx_k_get_period_field, sizeof(__pyx_k_get_period_field), 0, 0, 1, 1}, {&__pyx_n_s_get_period_field_arr, __pyx_k_get_period_field_arr, sizeof(__pyx_k_get_period_field_arr), 0, 0, 1, 1}, {&__pyx_n_s_get_time_micros, __pyx_k_get_time_micros, sizeof(__pyx_k_get_time_micros), 0, 0, 1, 1}, {&__pyx_n_s_get_timezone, __pyx_k_get_timezone, sizeof(__pyx_k_get_timezone), 0, 0, 1, 1}, {&__pyx_n_s_get_transitions, __pyx_k_get_transitions, sizeof(__pyx_k_get_transitions), 0, 0, 1, 1}, {&__pyx_n_s_getitem, __pyx_k_getitem, sizeof(__pyx_k_getitem), 0, 0, 1, 1}, {&__pyx_n_s_getlang, __pyx_k_getlang, sizeof(__pyx_k_getlang), 0, 0, 1, 1}, {&__pyx_n_s_getlocale, __pyx_k_getlocale, sizeof(__pyx_k_getlocale), 0, 0, 1, 1}, {&__pyx_n_s_gmt, __pyx_k_gmt, sizeof(__pyx_k_gmt), 0, 0, 1, 1}, {&__pyx_n_s_group_key, __pyx_k_group_key, sizeof(__pyx_k_group_key), 0, 0, 1, 1}, {&__pyx_n_s_groupdict, __pyx_k_groupdict, sizeof(__pyx_k_groupdict), 0, 0, 1, 1}, {&__pyx_n_s_grp, __pyx_k_grp, sizeof(__pyx_k_grp), 0, 0, 1, 1}, {&__pyx_n_s_h, __pyx_k_h, sizeof(__pyx_k_h), 0, 0, 1, 1}, {&__pyx_n_s_has_saving, __pyx_k_has_saving, sizeof(__pyx_k_has_saving), 0, 0, 1, 1}, {&__pyx_n_s_has_time_component, __pyx_k_has_time_component, sizeof(__pyx_k_has_time_component), 0, 0, 1, 1}, {&__pyx_n_s_hash, __pyx_k_hash, sizeof(__pyx_k_hash), 0, 0, 1, 1}, {&__pyx_n_s_have_pytz, __pyx_k_have_pytz, sizeof(__pyx_k_have_pytz), 0, 0, 1, 1}, {&__pyx_kp_s_home_yoh_deb_gits_pkg_exppsy_pa, __pyx_k_home_yoh_deb_gits_pkg_exppsy_pa, sizeof(__pyx_k_home_yoh_deb_gits_pkg_exppsy_pa), 0, 0, 1, 0}, {&__pyx_n_s_hour, __pyx_k_hour, sizeof(__pyx_k_hour), 0, 0, 1, 1}, {&__pyx_n_s_hours, __pyx_k_hours, sizeof(__pyx_k_hours), 0, 0, 1, 1}, {&__pyx_n_s_hstack, __pyx_k_hstack, sizeof(__pyx_k_hstack), 0, 0, 1, 1}, {&__pyx_n_s_i, __pyx_k_i, sizeof(__pyx_k_i), 0, 0, 1, 1}, {&__pyx_n_s_i4, __pyx_k_i4, sizeof(__pyx_k_i4), 0, 0, 1, 1}, {&__pyx_n_s_i8, __pyx_k_i8, sizeof(__pyx_k_i8), 0, 0, 1, 1}, {&__pyx_n_s_i8_to_pydt, __pyx_k_i8_to_pydt, sizeof(__pyx_k_i8_to_pydt), 0, 0, 1, 1}, {&__pyx_n_s_iNaT, __pyx_k_iNaT, sizeof(__pyx_k_iNaT), 0, 0, 1, 1}, {&__pyx_n_s_idx, __pyx_k_idx, sizeof(__pyx_k_idx), 0, 0, 1, 1}, {&__pyx_n_s_idx_shifted, __pyx_k_idx_shifted, sizeof(__pyx_k_idx_shifted), 0, 0, 1, 1}, {&__pyx_n_s_ignore, __pyx_k_ignore, sizeof(__pyx_k_ignore), 0, 0, 1, 1}, {&__pyx_n_s_import, __pyx_k_import, sizeof(__pyx_k_import), 0, 0, 1, 1}, {&__pyx_n_s_index, __pyx_k_index, sizeof(__pyx_k_index), 0, 0, 1, 1}, {&__pyx_kp_s_index_out_of_bounds, __pyx_k_index_out_of_bounds, sizeof(__pyx_k_index_out_of_bounds), 0, 0, 1, 0}, {&__pyx_n_s_inf, __pyx_k_inf, sizeof(__pyx_k_inf), 0, 0, 1, 1}, {&__pyx_n_s_infer_dst, __pyx_k_infer_dst, sizeof(__pyx_k_infer_dst), 0, 0, 1, 1}, {&__pyx_n_s_inferred_tz, __pyx_k_inferred_tz, sizeof(__pyx_k_inferred_tz), 0, 0, 1, 1}, {&__pyx_n_s_init, __pyx_k_init, sizeof(__pyx_k_init), 0, 0, 1, 1}, {&__pyx_n_s_insert, __pyx_k_insert, sizeof(__pyx_k_insert), 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_ints_to_pydatetime, __pyx_k_ints_to_pydatetime, sizeof(__pyx_k_ints_to_pydatetime), 0, 0, 1, 1}, {&__pyx_n_s_iresult, __pyx_k_iresult, sizeof(__pyx_k_iresult), 0, 0, 1, 1}, {&__pyx_n_s_is_fixed_offset, __pyx_k_is_fixed_offset, sizeof(__pyx_k_is_fixed_offset), 0, 0, 1, 1}, {&__pyx_n_s_is_timestamp_array, __pyx_k_is_timestamp_array, sizeof(__pyx_k_is_timestamp_array), 0, 0, 1, 1}, {&__pyx_n_s_is_tzlocal, __pyx_k_is_tzlocal, sizeof(__pyx_k_is_tzlocal), 0, 0, 1, 1}, {&__pyx_n_s_isleap, __pyx_k_isleap, sizeof(__pyx_k_isleap), 0, 0, 1, 1}, {&__pyx_n_s_isleap_prev, __pyx_k_isleap_prev, sizeof(__pyx_k_isleap_prev), 0, 0, 1, 1}, {&__pyx_n_s_isleapyear, __pyx_k_isleapyear, sizeof(__pyx_k_isleapyear), 0, 0, 1, 1}, {&__pyx_n_s_isoformat, __pyx_k_isoformat, sizeof(__pyx_k_isoformat), 0, 0, 1, 1}, {&__pyx_n_s_item, __pyx_k_item, sizeof(__pyx_k_item), 0, 0, 1, 1}, {&__pyx_n_s_iterkeys, __pyx_k_iterkeys, sizeof(__pyx_k_iterkeys), 0, 0, 1, 1}, {&__pyx_n_s_ivalue, __pyx_k_ivalue, sizeof(__pyx_k_ivalue), 0, 0, 1, 1}, {&__pyx_n_s_ivalues, __pyx_k_ivalues, sizeof(__pyx_k_ivalues), 0, 0, 1, 1}, {&__pyx_n_s_j, __pyx_k_j, sizeof(__pyx_k_j), 0, 0, 1, 1}, {&__pyx_kp_s_j_2, __pyx_k_j_2, sizeof(__pyx_k_j_2), 0, 0, 1, 0}, {&__pyx_n_s_join, __pyx_k_join, sizeof(__pyx_k_join), 0, 0, 1, 1}, {&__pyx_n_s_julian, __pyx_k_julian, sizeof(__pyx_k_julian), 0, 0, 1, 1}, {&__pyx_n_s_k, __pyx_k_k, sizeof(__pyx_k_k), 0, 0, 1, 1}, {&__pyx_n_s_key, __pyx_k_key, sizeof(__pyx_k_key), 0, 0, 1, 1}, {&__pyx_n_s_kwargs, __pyx_k_kwargs, sizeof(__pyx_k_kwargs), 0, 0, 1, 1}, {&__pyx_n_s_kwds, __pyx_k_kwds, sizeof(__pyx_k_kwds), 0, 0, 1, 1}, {&__pyx_n_s_l, __pyx_k_l, sizeof(__pyx_k_l), 0, 0, 1, 1}, {&__pyx_kp_b_l_2, __pyx_k_l_2, sizeof(__pyx_k_l_2), 0, 0, 0, 0}, {&__pyx_n_s_lambda, __pyx_k_lambda, sizeof(__pyx_k_lambda), 0, 0, 1, 1}, {&__pyx_n_s_lang, __pyx_k_lang, sizeof(__pyx_k_lang), 0, 0, 1, 1}, {&__pyx_n_s_left, __pyx_k_left, sizeof(__pyx_k_left), 0, 0, 1, 1}, {&__pyx_n_s_len, __pyx_k_len, sizeof(__pyx_k_len), 0, 0, 1, 1}, {&__pyx_n_s_loc, __pyx_k_loc, sizeof(__pyx_k_loc), 0, 0, 1, 1}, {&__pyx_n_s_locale, __pyx_k_locale, sizeof(__pyx_k_locale), 0, 0, 1, 1}, {&__pyx_kp_s_locale_changed_during_initializa, __pyx_k_locale_changed_during_initializa, sizeof(__pyx_k_locale_changed_during_initializa), 0, 0, 1, 0}, {&__pyx_n_s_locale_time, __pyx_k_locale_time, sizeof(__pyx_k_locale_time), 0, 0, 1, 1}, {&__pyx_n_s_localize, __pyx_k_localize, sizeof(__pyx_k_localize), 0, 0, 1, 1}, {&__pyx_n_s_logical_and, __pyx_k_logical_and, sizeof(__pyx_k_logical_and), 0, 0, 1, 1}, {&__pyx_n_s_long, __pyx_k_long, sizeof(__pyx_k_long), 0, 0, 1, 1}, {&__pyx_n_s_lower, __pyx_k_lower, sizeof(__pyx_k_lower), 0, 0, 1, 1}, {&__pyx_n_s_m, __pyx_k_m, sizeof(__pyx_k_m), 0, 0, 1, 1}, {&__pyx_kp_s_m8_0, __pyx_k_m8_0, sizeof(__pyx_k_m8_0), 0, 0, 1, 0}, {&__pyx_kp_s_m8_ns, __pyx_k_m8_ns, sizeof(__pyx_k_m8_ns), 0, 0, 1, 0}, {&__pyx_kp_s_m_2, __pyx_k_m_2, sizeof(__pyx_k_m_2), 0, 0, 1, 0}, {&__pyx_n_s_main, __pyx_k_main, sizeof(__pyx_k_main), 0, 0, 1, 1}, {&__pyx_n_s_match, __pyx_k_match, sizeof(__pyx_k_match), 0, 0, 1, 1}, {&__pyx_n_s_max, __pyx_k_max, sizeof(__pyx_k_max), 0, 0, 1, 1}, {&__pyx_n_s_maximum, __pyx_k_maximum, sizeof(__pyx_k_maximum), 0, 0, 1, 1}, {&__pyx_n_s_metaclass, __pyx_k_metaclass, sizeof(__pyx_k_metaclass), 0, 0, 1, 1}, {&__pyx_n_s_micros, __pyx_k_micros, sizeof(__pyx_k_micros), 0, 0, 1, 1}, {&__pyx_n_s_microsecond, __pyx_k_microsecond, sizeof(__pyx_k_microsecond), 0, 0, 1, 1}, {&__pyx_n_s_microseconds, __pyx_k_microseconds, sizeof(__pyx_k_microseconds), 0, 0, 1, 1}, {&__pyx_n_s_min, __pyx_k_min, sizeof(__pyx_k_min), 0, 0, 1, 1}, {&__pyx_n_s_minute, __pyx_k_minute, sizeof(__pyx_k_minute), 0, 0, 1, 1}, {&__pyx_n_s_minutes, __pyx_k_minutes, sizeof(__pyx_k_minutes), 0, 0, 1, 1}, {&__pyx_kp_s_mixed_datetimes_and_integers_in, __pyx_k_mixed_datetimes_and_integers_in, sizeof(__pyx_k_mixed_datetimes_and_integers_in), 0, 0, 1, 0}, {&__pyx_n_s_mo_off, __pyx_k_mo_off, sizeof(__pyx_k_mo_off), 0, 0, 1, 1}, {&__pyx_n_s_module, __pyx_k_module, sizeof(__pyx_k_module), 0, 0, 1, 1}, {&__pyx_n_s_month, __pyx_k_month, sizeof(__pyx_k_month), 0, 0, 1, 1}, {&__pyx_n_s_month_abbr, __pyx_k_month_abbr, sizeof(__pyx_k_month_abbr), 0, 0, 1, 1}, {&__pyx_n_s_month_name, __pyx_k_month_name, sizeof(__pyx_k_month_name), 0, 0, 1, 1}, {&__pyx_n_s_month_offset, __pyx_k_month_offset, sizeof(__pyx_k_month_offset), 0, 0, 1, 1}, {&__pyx_n_s_monthrange, __pyx_k_monthrange, sizeof(__pyx_k_monthrange), 0, 0, 1, 1}, {&__pyx_n_s_months, __pyx_k_months, sizeof(__pyx_k_months), 0, 0, 1, 1}, {&__pyx_n_s_ms, __pyx_k_ms, sizeof(__pyx_k_ms), 0, 0, 1, 1}, {&__pyx_n_s_mus, __pyx_k_mus, sizeof(__pyx_k_mus), 0, 0, 1, 1}, {&__pyx_n_s_n, __pyx_k_n, sizeof(__pyx_k_n), 0, 0, 1, 1}, {&__pyx_kp_b_n_2, __pyx_k_n_2, sizeof(__pyx_k_n_2), 0, 0, 0, 0}, {&__pyx_n_s_name, __pyx_k_name, sizeof(__pyx_k_name), 0, 0, 1, 1}, {&__pyx_n_s_nan, __pyx_k_nan, sizeof(__pyx_k_nan), 0, 0, 1, 1}, {&__pyx_n_s_nanos, __pyx_k_nanos, sizeof(__pyx_k_nanos), 0, 0, 1, 1}, {&__pyx_n_s_nanosecond, __pyx_k_nanosecond, sizeof(__pyx_k_nanosecond), 0, 0, 1, 1}, {&__pyx_n_s_nat, __pyx_k_nat, sizeof(__pyx_k_nat), 0, 0, 1, 1}, {&__pyx_n_s_nat_strings, __pyx_k_nat_strings, sizeof(__pyx_k_nat_strings), 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_ndim, __pyx_k_ndim, sizeof(__pyx_k_ndim), 0, 0, 1, 1}, {&__pyx_n_s_new, __pyx_k_new, sizeof(__pyx_k_new), 0, 0, 1, 1}, {&__pyx_n_s_new_2, __pyx_k_new_2, sizeof(__pyx_k_new_2), 0, 0, 1, 1}, {&__pyx_n_s_new_values, __pyx_k_new_values, sizeof(__pyx_k_new_values), 0, 0, 1, 1}, {&__pyx_n_s_no_saving, __pyx_k_no_saving, sizeof(__pyx_k_no_saving), 0, 0, 1, 1}, {&__pyx_n_s_nonzero, __pyx_k_nonzero, sizeof(__pyx_k_nonzero), 0, 0, 1, 1}, {&__pyx_n_s_normalize, __pyx_k_normalize, sizeof(__pyx_k_normalize), 0, 0, 1, 1}, {&__pyx_n_s_not_datelike_strings, __pyx_k_not_datelike_strings, sizeof(__pyx_k_not_datelike_strings), 0, 0, 1, 1}, {&__pyx_n_s_now, __pyx_k_now, sizeof(__pyx_k_now), 0, 0, 1, 1}, {&__pyx_n_s_np, __pyx_k_np, sizeof(__pyx_k_np), 0, 0, 1, 1}, {&__pyx_n_s_np_NaT, __pyx_k_np_NaT, sizeof(__pyx_k_np_NaT), 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_under1p6, __pyx_k_np_version_under1p6, sizeof(__pyx_k_np_version_under1p6), 0, 0, 1, 1}, {&__pyx_n_s_np_version_under1p7, __pyx_k_np_version_under1p7, sizeof(__pyx_k_np_version_under1p7), 0, 0, 1, 1}, {&__pyx_n_s_ns, __pyx_k_ns, sizeof(__pyx_k_ns), 0, 0, 1, 1}, {&__pyx_n_s_ntrans, __pyx_k_ntrans, sizeof(__pyx_k_ntrans), 0, 0, 1, 1}, {&__pyx_n_s_num, __pyx_k_num, sizeof(__pyx_k_num), 0, 0, 1, 1}, {&__pyx_n_s_numpy, __pyx_k_numpy, sizeof(__pyx_k_numpy), 0, 0, 1, 1}, {&__pyx_n_s_obj, __pyx_k_obj, sizeof(__pyx_k_obj), 0, 0, 1, 1}, {&__pyx_n_s_object, __pyx_k_object, sizeof(__pyx_k_object), 0, 0, 1, 1}, {&__pyx_n_s_object_state, __pyx_k_object_state, sizeof(__pyx_k_object_state), 0, 0, 1, 1}, {&__pyx_n_s_offset, __pyx_k_offset, sizeof(__pyx_k_offset), 0, 0, 1, 1}, {&__pyx_n_s_old, __pyx_k_old, sizeof(__pyx_k_old), 0, 0, 1, 1}, {&__pyx_n_s_one_diff, __pyx_k_one_diff, sizeof(__pyx_k_one_diff), 0, 0, 1, 1}, {&__pyx_n_s_ordinal, __pyx_k_ordinal, sizeof(__pyx_k_ordinal), 0, 0, 1, 1}, {&__pyx_n_s_ordinals, __pyx_k_ordinals, sizeof(__pyx_k_ordinals), 0, 0, 1, 1}, {&__pyx_n_s_oresult, __pyx_k_oresult, sizeof(__pyx_k_oresult), 0, 0, 1, 1}, {&__pyx_n_s_out, __pyx_k_out, sizeof(__pyx_k_out), 0, 0, 1, 1}, {&__pyx_n_s_p, __pyx_k_p, sizeof(__pyx_k_p), 0, 0, 1, 1}, {&__pyx_kp_s_p_2, __pyx_k_p_2, sizeof(__pyx_k_p_2), 0, 0, 1, 0}, {&__pyx_n_s_pad, __pyx_k_pad, sizeof(__pyx_k_pad), 0, 0, 1, 1}, {&__pyx_n_s_pandas_compat, __pyx_k_pandas_compat, sizeof(__pyx_k_pandas_compat), 0, 0, 1, 1}, {&__pyx_n_s_pandas_tseries_period, __pyx_k_pandas_tseries_period, sizeof(__pyx_k_pandas_tseries_period), 0, 0, 1, 1}, {&__pyx_n_s_pandas_tslib, __pyx_k_pandas_tslib, sizeof(__pyx_k_pandas_tslib), 0, 0, 1, 1}, {&__pyx_n_s_parse_code, __pyx_k_parse_code, sizeof(__pyx_k_parse_code), 0, 0, 1, 1}, {&__pyx_n_s_parse_code_table, __pyx_k_parse_code_table, sizeof(__pyx_k_parse_code_table), 0, 0, 1, 1}, {&__pyx_n_s_parse_date, __pyx_k_parse_date, sizeof(__pyx_k_parse_date), 0, 0, 1, 1}, {&__pyx_n_s_parse_datetime_string, __pyx_k_parse_datetime_string, sizeof(__pyx_k_parse_datetime_string), 0, 0, 1, 1}, {&__pyx_n_s_pattern, __pyx_k_pattern, sizeof(__pyx_k_pattern), 0, 0, 1, 1}, {&__pyx_n_s_period_asfreq_arr, __pyx_k_period_asfreq_arr, sizeof(__pyx_k_period_asfreq_arr), 0, 0, 1, 1}, {&__pyx_n_s_period_format, __pyx_k_period_format, sizeof(__pyx_k_period_format), 0, 0, 1, 1}, {&__pyx_n_s_period_ordinal, __pyx_k_period_ordinal, sizeof(__pyx_k_period_ordinal), 0, 0, 1, 1}, {&__pyx_n_s_periodarr, __pyx_k_periodarr, sizeof(__pyx_k_periodarr), 0, 0, 1, 1}, {&__pyx_n_s_periodarr_to_dt64arr, __pyx_k_periodarr_to_dt64arr, sizeof(__pyx_k_periodarr_to_dt64arr), 0, 0, 1, 1}, {&__pyx_n_s_pos, __pyx_k_pos, sizeof(__pyx_k_pos), 0, 0, 1, 1}, {&__pyx_n_s_prepare, __pyx_k_prepare, sizeof(__pyx_k_prepare), 0, 0, 1, 1}, {&__pyx_n_s_print, __pyx_k_print, sizeof(__pyx_k_print), 0, 0, 1, 1}, {&__pyx_n_s_processed_format, __pyx_k_processed_format, sizeof(__pyx_k_processed_format), 0, 0, 1, 1}, {&__pyx_n_s_prop, __pyx_k_prop, sizeof(__pyx_k_prop), 0, 0, 1, 1}, {&__pyx_n_s_property, __pyx_k_property, sizeof(__pyx_k_property), 0, 0, 1, 1}, {&__pyx_n_s_ps, __pyx_k_ps, sizeof(__pyx_k_ps), 0, 0, 1, 1}, {&__pyx_n_s_pydt, __pyx_k_pydt, sizeof(__pyx_k_pydt), 0, 0, 1, 1}, {&__pyx_n_s_pydt_to_i8, __pyx_k_pydt_to_i8, sizeof(__pyx_k_pydt_to_i8), 0, 0, 1, 1}, {&__pyx_n_s_pytz, __pyx_k_pytz, sizeof(__pyx_k_pytz), 0, 0, 1, 1}, {&__pyx_n_s_pyx_getbuffer, __pyx_k_pyx_getbuffer, sizeof(__pyx_k_pyx_getbuffer), 0, 0, 1, 1}, {&__pyx_n_s_pyx_releasebuffer, __pyx_k_pyx_releasebuffer, sizeof(__pyx_k_pyx_releasebuffer), 0, 0, 1, 1}, {&__pyx_n_s_pyx_vtable, __pyx_k_pyx_vtable, sizeof(__pyx_k_pyx_vtable), 0, 0, 1, 1}, {&__pyx_n_s_q, __pyx_k_q, sizeof(__pyx_k_q), 0, 0, 1, 1}, {&__pyx_kp_b_q_2, __pyx_k_q_2, sizeof(__pyx_k_q_2), 0, 0, 0, 0}, {&__pyx_n_s_qualname, __pyx_k_qualname, sizeof(__pyx_k_qualname), 0, 0, 1, 1}, {&__pyx_n_s_quarter, __pyx_k_quarter, sizeof(__pyx_k_quarter), 0, 0, 1, 1}, {&__pyx_n_s_raise, __pyx_k_raise, sizeof(__pyx_k_raise), 0, 0, 1, 1}, {&__pyx_n_s_range, __pyx_k_range, sizeof(__pyx_k_range), 0, 0, 1, 1}, {&__pyx_n_s_ravel, __pyx_k_ravel, sizeof(__pyx_k_ravel), 0, 0, 1, 1}, {&__pyx_n_s_re, __pyx_k_re, sizeof(__pyx_k_re), 0, 0, 1, 1}, {&__pyx_n_s_re_compile, __pyx_k_re_compile, sizeof(__pyx_k_re_compile), 0, 0, 1, 1}, {&__pyx_n_s_re_escape, __pyx_k_re_escape, sizeof(__pyx_k_re_escape), 0, 0, 1, 1}, {&__pyx_n_s_reduce, __pyx_k_reduce, sizeof(__pyx_k_reduce), 0, 0, 1, 1}, {&__pyx_n_s_regex, __pyx_k_regex, sizeof(__pyx_k_regex), 0, 0, 1, 1}, {&__pyx_n_s_regex_cache, __pyx_k_regex_cache, sizeof(__pyx_k_regex_cache), 0, 0, 1, 1}, {&__pyx_n_s_regex_chars, __pyx_k_regex_chars, sizeof(__pyx_k_regex_chars), 0, 0, 1, 1}, {&__pyx_n_s_relation, __pyx_k_relation, sizeof(__pyx_k_relation), 0, 0, 1, 1}, {&__pyx_n_s_replace, __pyx_k_replace, sizeof(__pyx_k_replace), 0, 0, 1, 1}, {&__pyx_n_s_replacement_pairs, __pyx_k_replacement_pairs, sizeof(__pyx_k_replacement_pairs), 0, 0, 1, 1}, {&__pyx_n_s_repr, __pyx_k_repr, sizeof(__pyx_k_repr), 0, 0, 1, 1}, {&__pyx_n_s_repr_base, __pyx_k_repr_base, sizeof(__pyx_k_repr_base), 0, 0, 1, 1}, {&__pyx_n_s_repr_timedelta64, __pyx_k_repr_timedelta64, sizeof(__pyx_k_repr_timedelta64), 0, 0, 1, 1}, {&__pyx_n_s_result, __pyx_k_result, sizeof(__pyx_k_result), 0, 0, 1, 1}, {&__pyx_n_s_result_a, __pyx_k_result_a, sizeof(__pyx_k_result_a), 0, 0, 1, 1}, {&__pyx_n_s_result_b, __pyx_k_result_b, sizeof(__pyx_k_result_b), 0, 0, 1, 1}, {&__pyx_n_s_ret, __pyx_k_ret, sizeof(__pyx_k_ret), 0, 0, 1, 1}, {&__pyx_n_s_reverse, __pyx_k_reverse, sizeof(__pyx_k_reverse), 0, 0, 1, 1}, {&__pyx_n_s_right, __pyx_k_right, sizeof(__pyx_k_right), 0, 0, 1, 1}, {&__pyx_n_s_round, __pyx_k_round, sizeof(__pyx_k_round), 0, 0, 1, 1}, {&__pyx_kp_s_s, __pyx_k_s, sizeof(__pyx_k_s), 0, 0, 1, 0}, {&__pyx_kp_s_s_02d_02d_s, __pyx_k_s_02d_02d_s, sizeof(__pyx_k_s_02d_02d_s), 0, 0, 1, 0}, {&__pyx_n_s_s_2, __pyx_k_s_2, sizeof(__pyx_k_s_2), 0, 0, 1, 1}, {&__pyx_kp_s_s_3, __pyx_k_s_3, sizeof(__pyx_k_s_3), 0, 0, 1, 0}, {&__pyx_kp_s_s_4, __pyx_k_s_4, sizeof(__pyx_k_s_4), 0, 0, 1, 0}, {&__pyx_kp_s_s_d_days, __pyx_k_s_d_days, sizeof(__pyx_k_s_d_days), 0, 0, 1, 0}, {&__pyx_kp_s_s_d_days_02d_02d_s, __pyx_k_s_d_days_02d_02d_s, sizeof(__pyx_k_s_d_days_02d_02d_s), 0, 0, 1, 0}, {&__pyx_kp_s_s_is_a_bad_directive_in_format, __pyx_k_s_is_a_bad_directive_in_format, sizeof(__pyx_k_s_is_a_bad_directive_in_format), 0, 0, 1, 0}, {&__pyx_kp_s_s_is_wrong_freq, __pyx_k_s_is_wrong_freq, sizeof(__pyx_k_s_is_wrong_freq), 0, 0, 1, 0}, {&__pyx_kp_s_s_s, __pyx_k_s_s, sizeof(__pyx_k_s_s), 0, 0, 1, 0}, {&__pyx_kp_s_s_s_2, __pyx_k_s_s_2, sizeof(__pyx_k_s_s_2), 0, 0, 1, 0}, {&__pyx_kp_s_s_s_3, __pyx_k_s_s_3, sizeof(__pyx_k_s_s_3), 0, 0, 1, 0}, {&__pyx_kp_s_s_s_s, __pyx_k_s_s_s, sizeof(__pyx_k_s_s_s), 0, 0, 1, 0}, {&__pyx_n_s_sa_dtype, __pyx_k_sa_dtype, sizeof(__pyx_k_sa_dtype), 0, 0, 1, 1}, {&__pyx_n_s_searchsorted, __pyx_k_searchsorted, sizeof(__pyx_k_searchsorted), 0, 0, 1, 1}, {&__pyx_n_s_second, __pyx_k_second, sizeof(__pyx_k_second), 0, 0, 1, 1}, {&__pyx_n_s_seconds, __pyx_k_seconds, sizeof(__pyx_k_seconds), 0, 0, 1, 1}, {&__pyx_n_s_seconds_pretty, __pyx_k_seconds_pretty, sizeof(__pyx_k_seconds_pretty), 0, 0, 1, 1}, {&__pyx_n_s_seen_datetime, __pyx_k_seen_datetime, sizeof(__pyx_k_seen_datetime), 0, 0, 1, 1}, {&__pyx_n_s_seen_integer, __pyx_k_seen_integer, sizeof(__pyx_k_seen_integer), 0, 0, 1, 1}, {&__pyx_n_s_self, __pyx_k_self, sizeof(__pyx_k_self), 0, 0, 1, 1}, {&__pyx_n_s_send, __pyx_k_send, sizeof(__pyx_k_send), 0, 0, 1, 1}, {&__pyx_n_s_sep, __pyx_k_sep, sizeof(__pyx_k_sep), 0, 0, 1, 1}, {&__pyx_n_s_seq, __pyx_k_seq, sizeof(__pyx_k_seq), 0, 0, 1, 1}, {&__pyx_n_s_seqToRE, __pyx_k_seqToRE, sizeof(__pyx_k_seqToRE), 0, 0, 1, 1}, {&__pyx_n_s_setitem, __pyx_k_setitem, sizeof(__pyx_k_setitem), 0, 0, 1, 1}, {&__pyx_n_s_setstate, __pyx_k_setstate, sizeof(__pyx_k_setstate), 0, 0, 1, 1}, {&__pyx_n_s_shape, __pyx_k_shape, sizeof(__pyx_k_shape), 0, 0, 1, 1}, {&__pyx_n_s_short, __pyx_k_short, sizeof(__pyx_k_short), 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_side, __pyx_k_side, sizeof(__pyx_k_side), 0, 0, 1, 1}, {&__pyx_n_s_sign, __pyx_k_sign, sizeof(__pyx_k_sign), 0, 0, 1, 1}, {&__pyx_n_s_sign_pretty, __pyx_k_sign_pretty, sizeof(__pyx_k_sign_pretty), 0, 0, 1, 1}, {&__pyx_n_s_size, __pyx_k_size, sizeof(__pyx_k_size), 0, 0, 1, 1}, {&__pyx_n_s_sort, __pyx_k_sort, sizeof(__pyx_k_sort), 0, 0, 1, 1}, {&__pyx_n_s_sorted, __pyx_k_sorted, sizeof(__pyx_k_sorted), 0, 0, 1, 1}, {&__pyx_n_s_sp, __pyx_k_sp, sizeof(__pyx_k_sp), 0, 0, 1, 1}, {&__pyx_n_s_squeeze, __pyx_k_squeeze, sizeof(__pyx_k_squeeze), 0, 0, 1, 1}, {&__pyx_n_s_stamp, __pyx_k_stamp, sizeof(__pyx_k_stamp), 0, 0, 1, 1}, {&__pyx_n_s_stamps, __pyx_k_stamps, sizeof(__pyx_k_stamps), 0, 0, 1, 1}, {&__pyx_n_s_startswith, __pyx_k_startswith, sizeof(__pyx_k_startswith), 0, 0, 1, 1}, {&__pyx_n_s_state, __pyx_k_state, sizeof(__pyx_k_state), 0, 0, 1, 1}, {&__pyx_n_s_str, __pyx_k_str, sizeof(__pyx_k_str), 0, 0, 1, 1}, {&__pyx_kp_s_stray_in_format_s, __pyx_k_stray_in_format_s, sizeof(__pyx_k_stray_in_format_s), 0, 0, 1, 0}, {&__pyx_n_s_strftime, __pyx_k_strftime, sizeof(__pyx_k_strftime), 0, 0, 1, 1}, {&__pyx_n_s_struct_time, __pyx_k_struct_time, sizeof(__pyx_k_struct_time), 0, 0, 1, 1}, {&__pyx_n_s_sub, __pyx_k_sub, sizeof(__pyx_k_sub), 0, 0, 1, 1}, {&__pyx_n_s_sub_2, __pyx_k_sub_2, sizeof(__pyx_k_sub_2), 0, 0, 1, 1}, {&__pyx_n_s_super, __pyx_k_super, sizeof(__pyx_k_super), 0, 0, 1, 1}, {&__pyx_n_s_switch_idx, __pyx_k_switch_idx, sizeof(__pyx_k_switch_idx), 0, 0, 1, 1}, {&__pyx_n_s_sys, __pyx_k_sys, sizeof(__pyx_k_sys), 0, 0, 1, 1}, {&__pyx_n_s_sz, __pyx_k_sz, sizeof(__pyx_k_sz), 0, 0, 1, 1}, {&__pyx_n_s_t, __pyx_k_t, sizeof(__pyx_k_t), 0, 0, 1, 1}, {&__pyx_n_s_table, __pyx_k_table, sizeof(__pyx_k_table), 0, 0, 1, 1}, {&__pyx_n_s_td, __pyx_k_td, sizeof(__pyx_k_td), 0, 0, 1, 1}, {&__pyx_n_s_tdata, __pyx_k_tdata, sizeof(__pyx_k_tdata), 0, 0, 1, 1}, {&__pyx_n_s_test, __pyx_k_test, sizeof(__pyx_k_test), 0, 0, 1, 1}, {&__pyx_n_s_thread, __pyx_k_thread, sizeof(__pyx_k_thread), 0, 0, 1, 1}, {&__pyx_n_s_thread_2, __pyx_k_thread_2, sizeof(__pyx_k_thread_2), 0, 0, 1, 1}, {&__pyx_n_s_thread_allocate_lock, __pyx_k_thread_allocate_lock, sizeof(__pyx_k_thread_allocate_lock), 0, 0, 1, 1}, {&__pyx_n_s_throw, __pyx_k_throw, sizeof(__pyx_k_throw), 0, 0, 1, 1}, {&__pyx_n_s_time, __pyx_k_time, sizeof(__pyx_k_time), 0, 0, 1, 1}, {&__pyx_kp_s_time_data_r_does_not_match_forma, __pyx_k_time_data_r_does_not_match_forma, sizeof(__pyx_k_time_data_r_does_not_match_forma), 0, 0, 1, 0}, {&__pyx_n_s_time_repr, __pyx_k_time_repr, sizeof(__pyx_k_time_repr), 0, 0, 1, 1}, {&__pyx_n_s_time_tuple, __pyx_k_time_tuple, sizeof(__pyx_k_time_tuple), 0, 0, 1, 1}, {&__pyx_n_s_timedelta, __pyx_k_timedelta, sizeof(__pyx_k_timedelta), 0, 0, 1, 1}, {&__pyx_n_s_timedelta64, __pyx_k_timedelta64, sizeof(__pyx_k_timedelta64), 0, 0, 1, 1}, {&__pyx_kp_s_timedelta64_ns, __pyx_k_timedelta64_ns, sizeof(__pyx_k_timedelta64_ns), 0, 0, 1, 0}, {&__pyx_n_s_timezone, __pyx_k_timezone, sizeof(__pyx_k_timezone), 0, 0, 1, 1}, {&__pyx_n_s_to_convert, __pyx_k_to_convert, sizeof(__pyx_k_to_convert), 0, 0, 1, 1}, {&__pyx_n_s_to_datetime, __pyx_k_to_datetime, sizeof(__pyx_k_to_datetime), 0, 0, 1, 1}, {&__pyx_n_s_to_period, __pyx_k_to_period, sizeof(__pyx_k_to_period), 0, 0, 1, 1}, {&__pyx_n_s_to_pydatetime, __pyx_k_to_pydatetime, sizeof(__pyx_k_to_pydatetime), 0, 0, 1, 1}, {&__pyx_n_s_today, __pyx_k_today, sizeof(__pyx_k_today), 0, 0, 1, 1}, {&__pyx_n_s_toordinal, __pyx_k_toordinal, sizeof(__pyx_k_toordinal), 0, 0, 1, 1}, {&__pyx_n_s_tot_seconds, __pyx_k_tot_seconds, sizeof(__pyx_k_tot_seconds), 0, 0, 1, 1}, {&__pyx_n_s_total_seconds, __pyx_k_total_seconds, sizeof(__pyx_k_total_seconds), 0, 0, 1, 1}, {&__pyx_n_s_trans, __pyx_k_trans, sizeof(__pyx_k_trans), 0, 0, 1, 1}, {&__pyx_n_s_trans_cache, __pyx_k_trans_cache, sizeof(__pyx_k_trans_cache), 0, 0, 1, 1}, {&__pyx_n_s_trans_grp, __pyx_k_trans_grp, sizeof(__pyx_k_trans_grp), 0, 0, 1, 1}, {&__pyx_n_s_trans_idx, __pyx_k_trans_idx, sizeof(__pyx_k_trans_idx), 0, 0, 1, 1}, {&__pyx_n_s_trans_len, __pyx_k_trans_len, sizeof(__pyx_k_trans_len), 0, 0, 1, 1}, {&__pyx_n_s_transition_info, __pyx_k_transition_info, sizeof(__pyx_k_transition_info), 0, 0, 1, 1}, {&__pyx_n_s_ts, __pyx_k_ts, sizeof(__pyx_k_ts), 0, 0, 1, 1}, {&__pyx_n_s_ts_2, __pyx_k_ts_2, sizeof(__pyx_k_ts_2), 0, 0, 1, 1}, {&__pyx_n_s_ts_base, __pyx_k_ts_base, sizeof(__pyx_k_ts_base), 0, 0, 1, 1}, {&__pyx_n_s_ts_input, __pyx_k_ts_input, sizeof(__pyx_k_ts_input), 0, 0, 1, 1}, {&__pyx_n_s_tso, __pyx_k_tso, sizeof(__pyx_k_tso), 0, 0, 1, 1}, {&__pyx_n_s_tz, __pyx_k_tz, sizeof(__pyx_k_tz), 0, 0, 1, 1}, {&__pyx_n_s_tz1, __pyx_k_tz1, sizeof(__pyx_k_tz1), 0, 0, 1, 1}, {&__pyx_n_s_tz2, __pyx_k_tz2, sizeof(__pyx_k_tz2), 0, 0, 1, 1}, {&__pyx_n_s_tz_convert, __pyx_k_tz_convert, sizeof(__pyx_k_tz_convert), 0, 0, 1, 1}, {&__pyx_n_s_tz_convert_single, __pyx_k_tz_convert_single, sizeof(__pyx_k_tz_convert_single), 0, 0, 1, 1}, {&__pyx_n_s_tz_localize, __pyx_k_tz_localize, sizeof(__pyx_k_tz_localize), 0, 0, 1, 1}, {&__pyx_n_s_tz_localize_to_utc, __pyx_k_tz_localize_to_utc, sizeof(__pyx_k_tz_localize_to_utc), 0, 0, 1, 1}, {&__pyx_kp_s_tz_s, __pyx_k_tz_s, sizeof(__pyx_k_tz_s), 0, 0, 1, 0}, {&__pyx_n_s_tz_values, __pyx_k_tz_values, sizeof(__pyx_k_tz_values), 0, 0, 1, 1}, {&__pyx_n_s_tzinfo, __pyx_k_tzinfo, sizeof(__pyx_k_tzinfo), 0, 0, 1, 1}, {&__pyx_n_s_tzinfos, __pyx_k_tzinfos, sizeof(__pyx_k_tzinfos), 0, 0, 1, 1}, {&__pyx_n_s_tzlocal, __pyx_k_tzlocal, sizeof(__pyx_k_tzlocal), 0, 0, 1, 1}, {&__pyx_n_s_tzname, __pyx_k_tzname, sizeof(__pyx_k_tzname), 0, 0, 1, 1}, {&__pyx_n_s_tzset, __pyx_k_tzset, sizeof(__pyx_k_tzset), 0, 0, 1, 1}, {&__pyx_n_s_tzutc, __pyx_k_tzutc, sizeof(__pyx_k_tzutc), 0, 0, 1, 1}, {&__pyx_n_s_u, __pyx_k_u, sizeof(__pyx_k_u), 0, 0, 1, 1}, {&__pyx_kp_b_u_2, __pyx_k_u_2, sizeof(__pyx_k_u_2), 0, 0, 0, 0}, {&__pyx_kp_s_unconverted_data_remains_s, __pyx_k_unconverted_data_remains_s, sizeof(__pyx_k_unconverted_data_remains_s), 0, 0, 1, 0}, {&__pyx_n_s_unique_deltas, __pyx_k_unique_deltas, sizeof(__pyx_k_unique_deltas), 0, 0, 1, 1}, {&__pyx_n_s_uniques, __pyx_k_uniques, sizeof(__pyx_k_uniques), 0, 0, 1, 1}, {&__pyx_n_s_unit, __pyx_k_unit, sizeof(__pyx_k_unit), 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_us, __pyx_k_us, sizeof(__pyx_k_us), 0, 0, 1, 1}, {&__pyx_n_s_utc, __pyx_k_utc, sizeof(__pyx_k_utc), 0, 0, 1, 1}, {&__pyx_n_s_utc_convert, __pyx_k_utc_convert, sizeof(__pyx_k_utc_convert), 0, 0, 1, 1}, {&__pyx_n_s_utc_date, __pyx_k_utc_date, sizeof(__pyx_k_utc_date), 0, 0, 1, 1}, {&__pyx_n_s_utc_dates, __pyx_k_utc_dates, sizeof(__pyx_k_utc_dates), 0, 0, 1, 1}, {&__pyx_n_s_utc_offset_cache, __pyx_k_utc_offset_cache, sizeof(__pyx_k_utc_offset_cache), 0, 0, 1, 1}, {&__pyx_n_s_utc_transition_times, __pyx_k_utc_transition_times, sizeof(__pyx_k_utc_transition_times), 0, 0, 1, 1}, {&__pyx_n_s_utcnow, __pyx_k_utcnow, sizeof(__pyx_k_utcnow), 0, 0, 1, 1}, {&__pyx_n_s_utcoffset, __pyx_k_utcoffset, sizeof(__pyx_k_utcoffset), 0, 0, 1, 1}, {&__pyx_n_s_utcoffset_2, __pyx_k_utcoffset_2, sizeof(__pyx_k_utcoffset_2), 0, 0, 1, 1}, {&__pyx_kp_s_utf_8, __pyx_k_utf_8, sizeof(__pyx_k_utf_8), 0, 0, 1, 0}, {&__pyx_n_s_v, __pyx_k_v, sizeof(__pyx_k_v), 0, 0, 1, 1}, {&__pyx_n_s_val, __pyx_k_val, sizeof(__pyx_k_val), 0, 0, 1, 1}, {&__pyx_n_s_vals, __pyx_k_vals, sizeof(__pyx_k_vals), 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_version_info, __pyx_k_version_info, sizeof(__pyx_k_version_info), 0, 0, 1, 1}, {&__pyx_n_s_view, __pyx_k_view, sizeof(__pyx_k_view), 0, 0, 1, 1}, {&__pyx_n_s_w, __pyx_k_w, sizeof(__pyx_k_w), 0, 0, 1, 1}, {&__pyx_kp_s_w_2, __pyx_k_w_2, sizeof(__pyx_k_w_2), 0, 0, 1, 0}, {&__pyx_n_s_warn, __pyx_k_warn, sizeof(__pyx_k_warn), 0, 0, 1, 1}, {&__pyx_n_s_week, __pyx_k_week, sizeof(__pyx_k_week), 0, 0, 1, 1}, {&__pyx_n_s_week_0_length, __pyx_k_week_0_length, sizeof(__pyx_k_week_0_length), 0, 0, 1, 1}, {&__pyx_n_s_week_of_year, __pyx_k_week_of_year, sizeof(__pyx_k_week_of_year), 0, 0, 1, 1}, {&__pyx_n_s_week_of_year_start, __pyx_k_week_of_year_start, sizeof(__pyx_k_week_of_year_start), 0, 0, 1, 1}, {&__pyx_n_s_week_starts_Mon, __pyx_k_week_starts_Mon, sizeof(__pyx_k_week_starts_Mon), 0, 0, 1, 1}, {&__pyx_n_s_weekday, __pyx_k_weekday, sizeof(__pyx_k_weekday), 0, 0, 1, 1}, {&__pyx_n_s_weekofyear, __pyx_k_weekofyear, sizeof(__pyx_k_weekofyear), 0, 0, 1, 1}, {&__pyx_n_s_where, __pyx_k_where, sizeof(__pyx_k_where), 0, 0, 1, 1}, {&__pyx_n_s_whitespace_replacement, __pyx_k_whitespace_replacement, sizeof(__pyx_k_whitespace_replacement), 0, 0, 1, 1}, {&__pyx_n_s_woy, __pyx_k_woy, sizeof(__pyx_k_woy), 0, 0, 1, 1}, {&__pyx_kp_s_x, __pyx_k_x, sizeof(__pyx_k_x), 0, 0, 1, 0}, {&__pyx_n_s_x_2, __pyx_k_x_2, sizeof(__pyx_k_x_2), 0, 0, 1, 1}, {&__pyx_n_s_y, __pyx_k_y, sizeof(__pyx_k_y), 0, 0, 1, 1}, {&__pyx_kp_s_y_2, __pyx_k_y_2, sizeof(__pyx_k_y_2), 0, 0, 1, 0}, {&__pyx_n_s_year, __pyx_k_year, sizeof(__pyx_k_year), 0, 0, 1, 1}, {&__pyx_n_s_year2000, __pyx_k_year2000, sizeof(__pyx_k_year2000), 0, 0, 1, 1}, {&__pyx_n_s_years, __pyx_k_years, sizeof(__pyx_k_years), 0, 0, 1, 1}, {&__pyx_kp_s_z, __pyx_k_z, sizeof(__pyx_k_z), 0, 0, 1, 0}, {&__pyx_n_s_zero_time, __pyx_k_zero_time, sizeof(__pyx_k_zero_time), 0, 0, 1, 1}, {&__pyx_n_s_zone, __pyx_k_zone, sizeof(__pyx_k_zone), 0, 0, 1, 1}, {0, 0, 0, 0, 0, 0, 0} }; static int __Pyx_InitCachedBuiltins(void) { __pyx_builtin_NameError = __Pyx_GetBuiltinName(__pyx_n_s_NameError); if (!__pyx_builtin_NameError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_builtin_property = __Pyx_GetBuiltinName(__pyx_n_s_property); if (!__pyx_builtin_property) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 220; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_builtin_ValueError = __Pyx_GetBuiltinName(__pyx_n_s_ValueError); if (!__pyx_builtin_ValueError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 909; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_builtin_object = __Pyx_GetBuiltinName(__pyx_n_s_object); if (!__pyx_builtin_object) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2983; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_range) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_builtin_AttributeError = __Pyx_GetBuiltinName(__pyx_n_s_AttributeError); if (!__pyx_builtin_AttributeError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 135; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_builtin_Exception = __Pyx_GetBuiltinName(__pyx_n_s_Exception); if (!__pyx_builtin_Exception) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 178; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_builtin_super = __Pyx_GetBuiltinName(__pyx_n_s_super); if (!__pyx_builtin_super) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 362; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_builtin_IndexError = __Pyx_GetBuiltinName(__pyx_n_s_IndexError); if (!__pyx_builtin_IndexError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 469; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_builtin_TypeError = __Pyx_GetBuiltinName(__pyx_n_s_TypeError); if (!__pyx_builtin_TypeError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 599; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_builtin_round = __Pyx_GetBuiltinName(__pyx_n_s_round); if (!__pyx_builtin_round) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1294; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_builtin_KeyError = __Pyx_GetBuiltinName(__pyx_n_s_KeyError); if (!__pyx_builtin_KeyError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1335; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_builtin_enumerate = __Pyx_GetBuiltinName(__pyx_n_s_enumerate); if (!__pyx_builtin_enumerate) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1495; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_builtin_sorted = __Pyx_GetBuiltinName(__pyx_n_s_sorted); if (!__pyx_builtin_sorted) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3182; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_builtin_RuntimeError = __Pyx_GetBuiltinName(__pyx_n_s_RuntimeError); if (!__pyx_builtin_RuntimeError) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 803; __pyx_clineno = __LINE__; goto __pyx_L1_error;} return 0; __pyx_L1_error:; return -1; } static int __Pyx_InitCachedConstants(void) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0); /* "pandas/tslib.pyx":169 * @classmethod * def utcnow(cls): * return cls.now('UTC') # <<<<<<<<<<<<<< * * def __new__(cls, object ts_input, object offset=None, tz=None, unit=None): */ __pyx_tuple_ = PyTuple_Pack(1, __pyx_n_s_UTC); if (unlikely(!__pyx_tuple_)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 169; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple_); __Pyx_GIVEREF(__pyx_tuple_); /* "pandas/tslib.pyx":203 * * try: * result += self.strftime('%z') # <<<<<<<<<<<<<< * if self.tzinfo: * zone = _get_zone(self.tzinfo) */ __pyx_tuple__2 = PyTuple_Pack(1, __pyx_kp_s_z); if (unlikely(!__pyx_tuple__2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 203; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__2); __Pyx_GIVEREF(__pyx_tuple__2); /* "pandas/tslib.pyx":208 * except ValueError: * year2000 = self.replace(year=2000) * result += year2000.strftime('%z') # <<<<<<<<<<<<<< * if self.tzinfo: * zone = _get_zone(self.tzinfo) */ __pyx_tuple__3 = PyTuple_Pack(1, __pyx_kp_s_z); if (unlikely(!__pyx_tuple__3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 208; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__3); __Pyx_GIVEREF(__pyx_tuple__3); /* "pandas/tslib.pyx":213 * * try: * result += zone.strftime(' %%Z') # <<<<<<<<<<<<<< * except: * pass */ __pyx_tuple__4 = PyTuple_Pack(1, __pyx_kp_s_Z); if (unlikely(!__pyx_tuple__4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 213; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__4); __Pyx_GIVEREF(__pyx_tuple__4); /* "pandas/tslib.pyx":279 * @property * def dayofyear(self): * return self._get_field('doy') # <<<<<<<<<<<<<< * * @property */ __pyx_tuple__5 = PyTuple_Pack(1, __pyx_n_s_doy); if (unlikely(!__pyx_tuple__5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 279; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__5); __Pyx_GIVEREF(__pyx_tuple__5); /* "pandas/tslib.pyx":283 * @property * def week(self): * return self._get_field('woy') # <<<<<<<<<<<<<< * * weekofyear = week */ __pyx_tuple__6 = PyTuple_Pack(1, __pyx_n_s_woy); if (unlikely(!__pyx_tuple__6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 283; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__6); __Pyx_GIVEREF(__pyx_tuple__6); /* "pandas/tslib.pyx":289 * @property * def quarter(self): * return self._get_field('q') # <<<<<<<<<<<<<< * * @property */ __pyx_tuple__7 = PyTuple_Pack(1, __pyx_n_s_q); if (unlikely(!__pyx_tuple__7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 289; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__7); __Pyx_GIVEREF(__pyx_tuple__7); /* "pandas/tslib.pyx":297 * @property * def asm8(self): * return np.int64(self.value).view('M8[ns]') # <<<<<<<<<<<<<< * * def tz_localize(self, tz): */ __pyx_tuple__8 = PyTuple_Pack(1, __pyx_kp_s_M8_ns); if (unlikely(!__pyx_tuple__8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 297; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__8); __Pyx_GIVEREF(__pyx_tuple__8); /* "pandas/tslib.pyx":315 * return Timestamp(self.to_pydatetime(), tz=tz) * else: * raise Exception('Cannot localize tz-aware Timestamp, use ' # <<<<<<<<<<<<<< * 'tz_convert for conversions') * */ __pyx_tuple__9 = PyTuple_Pack(1, __pyx_kp_s_Cannot_localize_tz_aware_Timesta); if (unlikely(!__pyx_tuple__9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 315; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__9); __Pyx_GIVEREF(__pyx_tuple__9); /* "pandas/tslib.pyx":333 * if self.tzinfo is None: * # tz naive, use tz_localize * raise Exception('Cannot convert tz-naive Timestamp, use ' # <<<<<<<<<<<<<< * 'tz_localize to localize') * else: */ __pyx_tuple__10 = PyTuple_Pack(1, __pyx_kp_s_Cannot_convert_tz_naive_Timestam); if (unlikely(!__pyx_tuple__10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 333; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__10); __Pyx_GIVEREF(__pyx_tuple__10); /* "pandas/tslib.pyx":367 * * if self.tzinfo is not None: * base1, base2 = base[:-6], base[-6:] # <<<<<<<<<<<<<< * else: * base1, base2 = base, "" */ __pyx_slice__11 = PySlice_New(Py_None, __pyx_int_neg_6, Py_None); if (unlikely(!__pyx_slice__11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 367; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_slice__11); __Pyx_GIVEREF(__pyx_slice__11); __pyx_slice__12 = PySlice_New(__pyx_int_neg_6, Py_None, Py_None); if (unlikely(!__pyx_slice__12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 367; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_slice__12); __Pyx_GIVEREF(__pyx_slice__12); /* "pandas/tslib.pyx":469 * * if i >= sz or sz == 0 or i < 0: * raise IndexError('index out of bounds') # <<<<<<<<<<<<<< * * if arr.descr.type_num == NPY_DATETIME: */ __pyx_tuple__14 = PyTuple_Pack(1, __pyx_kp_s_index_out_of_bounds); if (unlikely(!__pyx_tuple__14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 469; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__14); __Pyx_GIVEREF(__pyx_tuple__14); /* "pandas/tslib.pyx":529 * * result = np.empty(n, dtype='M8[ns]') * new_values = result.view('i8') # <<<<<<<<<<<<<< * * */ __pyx_tuple__15 = PyTuple_Pack(1, __pyx_n_s_i8); if (unlikely(!__pyx_tuple__15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 529; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__15); __Pyx_GIVEREF(__pyx_tuple__15); /* "pandas/tslib.pyx":640 * if self.tzinfo is None: * if other.tzinfo is not None: * raise ValueError('Cannot compare tz-naive and tz-aware ' # <<<<<<<<<<<<<< * 'timestamps') * elif other.tzinfo is None: */ __pyx_tuple__16 = PyTuple_Pack(1, __pyx_kp_s_Cannot_compare_tz_naive_and_tz_a); if (unlikely(!__pyx_tuple__16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 640; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__16); __Pyx_GIVEREF(__pyx_tuple__16); /* "pandas/tslib.pyx":643 * 'timestamps') * elif other.tzinfo is None: * raise ValueError('Cannot compare tz-naive and tz-aware timestamps') # <<<<<<<<<<<<<< * * cpdef datetime to_datetime(_Timestamp self): */ __pyx_tuple__17 = PyTuple_Pack(1, __pyx_kp_s_Cannot_compare_tz_naive_and_tz_a); if (unlikely(!__pyx_tuple__17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 643; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__17); __Pyx_GIVEREF(__pyx_tuple__17); /* "pandas/tslib.pyx":659 * * if is_timedelta64_object(other): * other_int = other.astype('timedelta64[ns]').astype(int) # <<<<<<<<<<<<<< * return Timestamp(self.value + other_int, tz=self.tzinfo) * */ __pyx_tuple__18 = PyTuple_Pack(1, __pyx_kp_s_timedelta64_ns); if (unlikely(!__pyx_tuple__18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 659; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__18); __Pyx_GIVEREF(__pyx_tuple__18); /* "pandas/tslib.pyx":664 * if is_integer_object(other): * if self.offset is None: * raise ValueError("Cannot add integral value to Timestamp " # <<<<<<<<<<<<<< * "without offset.") * return Timestamp((self.offset * other).apply(self)) */ __pyx_tuple__19 = PyTuple_Pack(1, __pyx_kp_s_Cannot_add_integral_value_to_Tim); if (unlikely(!__pyx_tuple__19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 664; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__19); __Pyx_GIVEREF(__pyx_tuple__19); /* "pandas/tslib.pyx":732 * delta = delta.delta * if is_timedelta64_object(delta): * return delta.astype("timedelta64[ns]").item() # <<<<<<<<<<<<<< * if is_integer_object(delta): * return delta */ __pyx_tuple__20 = PyTuple_Pack(1, __pyx_kp_s_timedelta64_ns); if (unlikely(!__pyx_tuple__20)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 732; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__20); __Pyx_GIVEREF(__pyx_tuple__20); /* "pandas/tslib.pyx":948 * * result = np.empty(n, dtype='M8[ns]') * iresult = result.view('i8') # <<<<<<<<<<<<<< * for i in range(n): * val = values[i] */ __pyx_tuple__21 = PyTuple_Pack(1, __pyx_n_s_i8); if (unlikely(!__pyx_tuple__21)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 948; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__21); __Pyx_GIVEREF(__pyx_tuple__21); /* "pandas/tslib.pyx":957 * if inferred_tz is not None: * if _get_zone(val.tzinfo) != inferred_tz: * raise ValueError('Array must be all same time zone') # <<<<<<<<<<<<<< * else: * inferred_tz = _get_zone(val.tzinfo) */ __pyx_tuple__22 = PyTuple_Pack(1, __pyx_kp_s_Array_must_be_all_same_time_zone); if (unlikely(!__pyx_tuple__22)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 957; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__22); __Pyx_GIVEREF(__pyx_tuple__22); /* "pandas/tslib.pyx":966 * else: * if inferred_tz is not None: * raise ValueError('Cannot mix tz-aware with tz-naive values') # <<<<<<<<<<<<<< * iresult[i] = _pydatetime_to_dts(val, &dts) * _check_dts_bounds(&dts) */ __pyx_tuple__23 = PyTuple_Pack(1, __pyx_kp_s_Cannot_mix_tz_aware_with_tz_naiv); if (unlikely(!__pyx_tuple__23)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 966; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__23); __Pyx_GIVEREF(__pyx_tuple__23); /* "pandas/tslib.pyx":977 * * def _does_string_look_like_datetime(date_string): * if date_string.startswith('0'): # <<<<<<<<<<<<<< * # Strings starting with 0 are more consistent with a * # date-like string than a number */ __pyx_tuple__24 = PyTuple_Pack(1, __pyx_kp_s_0); if (unlikely(!__pyx_tuple__24)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 977; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__24); __Pyx_GIVEREF(__pyx_tuple__24); /* "pandas/tslib.pyx":995 * def parse_datetime_string(date_string, **kwargs): * if not _does_string_look_like_datetime(date_string): * raise ValueError('Given date string not likely a datetime.') # <<<<<<<<<<<<<< * * dt = parse_date(date_string, **kwargs) */ __pyx_tuple__25 = PyTuple_Pack(1, __pyx_kp_s_Given_date_string_not_likely_a_d); if (unlikely(!__pyx_tuple__25)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 995; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__25); __Pyx_GIVEREF(__pyx_tuple__25); /* "pandas/tslib.pyx":1014 * try: * result = np.empty(n, dtype='M8[ns]') * iresult = result.view('i8') # <<<<<<<<<<<<<< * for i in range(n): * val = values[i] */ __pyx_tuple__26 = PyTuple_Pack(1, __pyx_n_s_i8); if (unlikely(!__pyx_tuple__26)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1014; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__26); __Pyx_GIVEREF(__pyx_tuple__26); /* "pandas/tslib.pyx":1033 * raise * else: * raise ValueError('Tz-aware datetime.datetime cannot ' # <<<<<<<<<<<<<< * 'be converted to datetime64 unless ' * 'utc=True') */ __pyx_tuple__27 = PyTuple_Pack(1, __pyx_kp_s_Tz_aware_datetime_datetime_canno); if (unlikely(!__pyx_tuple__27)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1033; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__27); __Pyx_GIVEREF(__pyx_tuple__27); /* "pandas/tslib.pyx":1126 * # example * if seen_integer and seen_datetime: * raise ValueError("mixed datetimes and integers in passed array") # <<<<<<<<<<<<<< * * return result */ __pyx_tuple__28 = PyTuple_Pack(1, __pyx_kp_s_mixed_datetimes_and_integers_in); if (unlikely(!__pyx_tuple__28)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1126; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__28); __Pyx_GIVEREF(__pyx_tuple__28); /* "pandas/tslib.pyx":1179 * n = values.shape[0] * result = np.empty(n, dtype='m8[ns]') * iresult = result.view('i8') # <<<<<<<<<<<<<< * * for i in range(n): */ __pyx_tuple__29 = PyTuple_Pack(1, __pyx_n_s_i8); if (unlikely(!__pyx_tuple__29)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1179; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__29); __Pyx_GIVEREF(__pyx_tuple__29); /* "pandas/tslib.pyx":1209 * elif util.is_datetime64_object(ts): * # only accept a NaT here * if ts.astype('int64') == iNaT: # <<<<<<<<<<<<<< * ts = np.timedelta64(iNaT) * elif isinstance(ts, np.timedelta64): */ __pyx_tuple__30 = PyTuple_Pack(1, __pyx_n_s_int64); if (unlikely(!__pyx_tuple__30)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1209; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__30); __Pyx_GIVEREF(__pyx_tuple__30); /* "pandas/tslib.pyx":1218 * else: * if util.is_array(ts): * ts = ts.astype('int64').item() # <<<<<<<<<<<<<< * ts = cast_from_unit(ts, unit) * if _np_version_under1p7: */ __pyx_tuple__31 = PyTuple_Pack(1, __pyx_n_s_int64); if (unlikely(!__pyx_tuple__31)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1218; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__31); __Pyx_GIVEREF(__pyx_tuple__31); /* "pandas/tslib.pyx":1242 * return np.timedelta64(iNaT) * raise ValueError("Invalid type for timedelta scalar: %s" % type(ts)) * return ts.astype('timedelta64[ns]') # <<<<<<<<<<<<<< * * def repr_timedelta64(object value, format=None): */ __pyx_tuple__32 = PyTuple_Pack(1, __pyx_kp_s_timedelta64_ns); if (unlikely(!__pyx_tuple__32)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1242; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__32); __Pyx_GIVEREF(__pyx_tuple__32); /* "pandas/tslib.pyx":1260 * cdef object ivalue * * ivalue = value.view('i8') # <<<<<<<<<<<<<< * * # put frac in seconds */ __pyx_tuple__33 = PyTuple_Pack(1, __pyx_n_s_i8); if (unlikely(!__pyx_tuple__33)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1260; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__33); __Pyx_GIVEREF(__pyx_tuple__33); /* "pandas/tslib.pyx":1322 * * global _TimeRE_cache, _regex_cache * with _cache_lock: # <<<<<<<<<<<<<< * if _getlang() != _TimeRE_cache.locale_time.lang: * _TimeRE_cache = TimeRE() */ __pyx_tuple__37 = PyTuple_Pack(3, Py_None, Py_None, Py_None); if (unlikely(!__pyx_tuple__37)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1322; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__37); __Pyx_GIVEREF(__pyx_tuple__37); /* "pandas/tslib.pyx":1348 * * result = np.empty(n, dtype='M8[ns]') * iresult = result.view('i8') # <<<<<<<<<<<<<< * * dts.us = dts.ps = dts.as = 0 */ __pyx_tuple__38 = PyTuple_Pack(1, __pyx_n_s_i8); if (unlikely(!__pyx_tuple__38)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1348; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__38); __Pyx_GIVEREF(__pyx_tuple__38); /* "pandas/tslib.pyx":1448 * elif parse_code == 7: * hour = int(found_dict['I']) * ampm = found_dict.get('p', '').lower() # <<<<<<<<<<<<<< * # If there was no AM/PM indicator, we'll treat this like AM * if ampm in ('', locale_time.am_pm[0]): */ __pyx_tuple__39 = PyTuple_Pack(2, __pyx_n_s_p, __pyx_kp_s__13); if (unlikely(!__pyx_tuple__39)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1448; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__39); __Pyx_GIVEREF(__pyx_tuple__39); /* "pandas/tslib.pyx":1557 * unit = get_datetime64_unit(val) * if unit == 3: * raise ValueError('NumPy 1.6.1 business freq not supported') # <<<<<<<<<<<<<< * * ival = get_datetime64_value(val) */ __pyx_tuple__40 = PyTuple_Pack(1, __pyx_kp_s_NumPy_1_6_1_business_freq_not_su); if (unlikely(!__pyx_tuple__40)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1557; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__40); __Pyx_GIVEREF(__pyx_tuple__40); /* "pandas/tslib.pyx":1618 * unit = get_datetime64_unit(arr.flat[0]) * if unit == 3: * raise ValueError('NumPy 1.6.1 business freq not supported') # <<<<<<<<<<<<<< * * for i in range(n): */ __pyx_tuple__41 = PyTuple_Pack(1, __pyx_kp_s_NumPy_1_6_1_business_freq_not_su); if (unlikely(!__pyx_tuple__41)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1618; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__41); __Pyx_GIVEREF(__pyx_tuple__41); /* "pandas/tslib.pyx":1688 * pos = trans.searchsorted(vals[0]) - 1 * if pos < 0: * raise ValueError('First time before start of DST info') # <<<<<<<<<<<<<< * * offset = deltas[pos] */ __pyx_tuple__42 = PyTuple_Pack(1, __pyx_kp_s_First_time_before_start_of_DST_i); if (unlikely(!__pyx_tuple__42)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1688; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__42); __Pyx_GIVEREF(__pyx_tuple__42); /* "pandas/tslib.pyx":1719 * pos = trans.searchsorted(utc_dates[0]) * if pos == 0: * raise ValueError('First time before start of DST info') # <<<<<<<<<<<<<< * elif pos == len(trans): * return utc_dates + deltas[-1] */ __pyx_tuple__43 = PyTuple_Pack(1, __pyx_kp_s_First_time_before_start_of_DST_i); if (unlikely(!__pyx_tuple__43)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1719; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__43); __Pyx_GIVEREF(__pyx_tuple__43); /* "pandas/tslib.pyx":1760 * pos = trans.searchsorted(val) - 1 * if pos < 0: * raise ValueError('First time before start of DST info') # <<<<<<<<<<<<<< * offset = deltas[pos] * utc_date = val - offset */ __pyx_tuple__44 = PyTuple_Pack(1, __pyx_kp_s_First_time_before_start_of_DST_i); if (unlikely(!__pyx_tuple__44)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1760; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__44); __Pyx_GIVEREF(__pyx_tuple__44); /* "pandas/tslib.pyx":1779 * pos = trans.searchsorted(utc_date) - 1 * if pos < 0: * raise ValueError('First time before start of DST info') # <<<<<<<<<<<<<< * * offset = deltas[pos] */ __pyx_tuple__45 = PyTuple_Pack(1, __pyx_kp_s_First_time_before_start_of_DST_i); if (unlikely(!__pyx_tuple__45)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1779; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__45); __Pyx_GIVEREF(__pyx_tuple__45); /* "pandas/tslib.pyx":1801 * if hasattr(tz, '_utc_transition_times'): * arr = np.array(tz._utc_transition_times, dtype='M8[ns]') * arr = arr.view('i8') # <<<<<<<<<<<<<< * try: * if tz._utc_transition_times[0].year == 1: */ __pyx_tuple__46 = PyTuple_Pack(1, __pyx_n_s_i8); if (unlikely(!__pyx_tuple__46)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1801; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__46); __Pyx_GIVEREF(__pyx_tuple__46); /* "pandas/tslib.pyx":1876 * * if not have_pytz: * raise Exception("Could not find pytz module") # <<<<<<<<<<<<<< * * if tz == UTC or tz is None: */ __pyx_tuple__47 = PyTuple_Pack(1, __pyx_kp_s_Could_not_find_pytz_module); if (unlikely(!__pyx_tuple__47)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1876; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__47); __Pyx_GIVEREF(__pyx_tuple__47); /* "pandas/tslib.pyx":2040 * count = len(dtindex) * * sa_dtype = [('Y', 'i4'), # year # <<<<<<<<<<<<<< * ('M', 'i4'), # month * ('D', 'i4'), # day */ __pyx_tuple__48 = PyTuple_Pack(2, __pyx_n_s_Y, __pyx_n_s_i4); if (unlikely(!__pyx_tuple__48)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2040; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__48); __Pyx_GIVEREF(__pyx_tuple__48); /* "pandas/tslib.pyx":2041 * * sa_dtype = [('Y', 'i4'), # year * ('M', 'i4'), # month # <<<<<<<<<<<<<< * ('D', 'i4'), # day * ('h', 'i4'), # hour */ __pyx_tuple__49 = PyTuple_Pack(2, __pyx_n_s_M, __pyx_n_s_i4); if (unlikely(!__pyx_tuple__49)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2041; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__49); __Pyx_GIVEREF(__pyx_tuple__49); /* "pandas/tslib.pyx":2042 * sa_dtype = [('Y', 'i4'), # year * ('M', 'i4'), # month * ('D', 'i4'), # day # <<<<<<<<<<<<<< * ('h', 'i4'), # hour * ('m', 'i4'), # min */ __pyx_tuple__50 = PyTuple_Pack(2, __pyx_n_s_D, __pyx_n_s_i4); if (unlikely(!__pyx_tuple__50)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2042; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__50); __Pyx_GIVEREF(__pyx_tuple__50); /* "pandas/tslib.pyx":2043 * ('M', 'i4'), # month * ('D', 'i4'), # day * ('h', 'i4'), # hour # <<<<<<<<<<<<<< * ('m', 'i4'), # min * ('s', 'i4'), # second */ __pyx_tuple__51 = PyTuple_Pack(2, __pyx_n_s_h, __pyx_n_s_i4); if (unlikely(!__pyx_tuple__51)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2043; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__51); __Pyx_GIVEREF(__pyx_tuple__51); /* "pandas/tslib.pyx":2044 * ('D', 'i4'), # day * ('h', 'i4'), # hour * ('m', 'i4'), # min # <<<<<<<<<<<<<< * ('s', 'i4'), # second * ('u', 'i4')] # microsecond */ __pyx_tuple__52 = PyTuple_Pack(2, __pyx_n_s_m, __pyx_n_s_i4); if (unlikely(!__pyx_tuple__52)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2044; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__52); __Pyx_GIVEREF(__pyx_tuple__52); /* "pandas/tslib.pyx":2045 * ('h', 'i4'), # hour * ('m', 'i4'), # min * ('s', 'i4'), # second # <<<<<<<<<<<<<< * ('u', 'i4')] # microsecond * */ __pyx_tuple__53 = PyTuple_Pack(2, __pyx_n_s_s_2, __pyx_n_s_i4); if (unlikely(!__pyx_tuple__53)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2045; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__53); __Pyx_GIVEREF(__pyx_tuple__53); /* "pandas/tslib.pyx":2046 * ('m', 'i4'), # min * ('s', 'i4'), # second * ('u', 'i4')] # microsecond # <<<<<<<<<<<<<< * * out = np.empty(count, dtype=sa_dtype) */ __pyx_tuple__54 = PyTuple_Pack(2, __pyx_n_s_u, __pyx_n_s_i4); if (unlikely(!__pyx_tuple__54)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2046; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__54); __Pyx_GIVEREF(__pyx_tuple__54); /* "pandas/tslib.pyx":2381 * * if month < 1 or month > 12: * raise ValueError("bad month number 0; must be 1-12") # <<<<<<<<<<<<<< * * days = days_per_month_table[is_leapyear(year)][month-1] */ __pyx_tuple__55 = PyTuple_Pack(1, __pyx_kp_s_bad_month_number_0_must_be_1_12); if (unlikely(!__pyx_tuple__55)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2381; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__55); __Pyx_GIVEREF(__pyx_tuple__55); /* "pandas/tslib.pyx":2416 * * if not have_pytz: * raise Exception('Could not find pytz module') # <<<<<<<<<<<<<< * * if _is_utc(tz): */ __pyx_tuple__56 = PyTuple_Pack(1, __pyx_kp_s_Could_not_find_pytz_module); if (unlikely(!__pyx_tuple__56)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2416; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__56); __Pyx_GIVEREF(__pyx_tuple__56); /* "pandas/tslib.pyx":2613 * * if retval == INT32_MIN: * raise ValueError('Frequency conversion failed') # <<<<<<<<<<<<<< * * return retval */ __pyx_tuple__57 = PyTuple_Pack(1, __pyx_kp_s_Frequency_conversion_failed); if (unlikely(!__pyx_tuple__57)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2613; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__57); __Pyx_GIVEREF(__pyx_tuple__57); /* "pandas/tslib.pyx":2644 * val = func(arr[i], relation, &finfo) * if val == INT32_MIN: * raise ValueError("Unable to convert to desired frequency.") # <<<<<<<<<<<<<< * result[i] = val * */ __pyx_tuple__58 = PyTuple_Pack(1, __pyx_kp_s_Unable_to_convert_to_desired_fre); if (unlikely(!__pyx_tuple__58)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2644; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__58); __Pyx_GIVEREF(__pyx_tuple__58); /* "pandas/tslib.pyx":2735 * * if PyUnicode_Check(fmt): * fmt = fmt.encode('utf-8') # <<<<<<<<<<<<<< * * get_date_info(value, freq, &dinfo) */ __pyx_tuple__59 = PyTuple_Pack(1, __pyx_kp_s_utf_8); if (unlikely(!__pyx_tuple__59)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2735; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__59); __Pyx_GIVEREF(__pyx_tuple__59); /* "pandas/tslib.pyx":2753 * if found_pat[i]: * if get_yq(value, freq, &quarter, &year) < 0: * raise ValueError('Unable to get quarter and year') # <<<<<<<<<<<<<< * * if i == 0: */ __pyx_tuple__60 = PyTuple_Pack(1, __pyx_kp_s_Unable_to_get_quarter_and_year); if (unlikely(!__pyx_tuple__60)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2753; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__60); __Pyx_GIVEREF(__pyx_tuple__60); /* "pandas/tslib.pyx":2771 * * if PY2: * result = result.decode('utf-8', 'ignore') # <<<<<<<<<<<<<< * * return result */ __pyx_tuple__61 = PyTuple_Pack(2, __pyx_kp_s_utf_8, __pyx_n_s_ignore); if (unlikely(!__pyx_tuple__61)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2771; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__61); __Pyx_GIVEREF(__pyx_tuple__61); /* "pandas/tslib.pyx":3029 * self.__calc_date_time() * if _getlang() != self.lang: * raise ValueError("locale changed during initialization") # <<<<<<<<<<<<<< * * def __pad(self, seq, front): */ __pyx_tuple__62 = PyTuple_Pack(1, __pyx_kp_s_locale_changed_during_initializa); if (unlikely(!__pyx_tuple__62)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3029; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__62); __Pyx_GIVEREF(__pyx_tuple__62); /* "pandas/tslib.pyx":3035 * seq = list(seq) * if front: * seq.insert(0, '') # <<<<<<<<<<<<<< * else: * seq.append('') */ __pyx_tuple__63 = PyTuple_Pack(2, __pyx_int_0, __pyx_kp_s__13); if (unlikely(!__pyx_tuple__63)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3035; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__63); __Pyx_GIVEREF(__pyx_tuple__63); /* "pandas/tslib.pyx":3062 * # static date was needed. * am_pm = [] * for hour in (01,22): # <<<<<<<<<<<<<< * time_tuple = time.struct_time((1999,3,17,hour,44,55,2,76,0)) * am_pm.append(time.strftime("%p", time_tuple).lower()) */ __pyx_tuple__64 = PyTuple_Pack(2, __pyx_int_1, __pyx_int_22); if (unlikely(!__pyx_tuple__64)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3062; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__64); __Pyx_GIVEREF(__pyx_tuple__64); /* "pandas/tslib.pyx":3075 * # values within the format string is very important; it eliminates * # possible ambiguity for what something represents. * time_tuple = time.struct_time((1999,3,17,22,44,55,2,76,0)) # <<<<<<<<<<<<<< * date_time = [None, None, None] * date_time[0] = time.strftime("%c", time_tuple).lower() */ __pyx_tuple__65 = PyTuple_Pack(9, __pyx_int_1999, __pyx_int_3, __pyx_int_17, __pyx_int_22, __pyx_int_44, __pyx_int_55, __pyx_int_2, __pyx_int_76, __pyx_int_0); if (unlikely(!__pyx_tuple__65)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3075; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__65); __Pyx_GIVEREF(__pyx_tuple__65); __pyx_tuple__66 = PyTuple_Pack(1, __pyx_tuple__65); if (unlikely(!__pyx_tuple__66)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3075; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__66); __Pyx_GIVEREF(__pyx_tuple__66); /* "pandas/tslib.pyx":3080 * date_time[1] = time.strftime("%x", time_tuple).lower() * date_time[2] = time.strftime("%X", time_tuple).lower() * replacement_pairs = [('%', '%%'), (self.f_weekday[2], '%A'), # <<<<<<<<<<<<<< * (self.f_month[3], '%B'), (self.a_weekday[2], '%a'), * (self.a_month[3], '%b'), (self.am_pm[1], '%p'), */ __pyx_tuple__68 = PyTuple_Pack(2, __pyx_kp_s__36, __pyx_kp_s__67); if (unlikely(!__pyx_tuple__68)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3080; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__68); __Pyx_GIVEREF(__pyx_tuple__68); /* "pandas/tslib.pyx":3083 * (self.f_month[3], '%B'), (self.a_weekday[2], '%a'), * (self.a_month[3], '%b'), (self.am_pm[1], '%p'), * ('1999', '%Y'), ('99', '%y'), ('22', '%H'), # <<<<<<<<<<<<<< * ('44', '%M'), ('55', '%S'), ('76', '%j'), * ('17', '%d'), ('03', '%m'), ('3', '%m'), */ __pyx_tuple__69 = PyTuple_Pack(2, __pyx_kp_s_1999, __pyx_kp_s_Y_2); if (unlikely(!__pyx_tuple__69)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3083; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__69); __Pyx_GIVEREF(__pyx_tuple__69); __pyx_tuple__70 = PyTuple_Pack(2, __pyx_kp_s_99, __pyx_kp_s_y_2); if (unlikely(!__pyx_tuple__70)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3083; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__70); __Pyx_GIVEREF(__pyx_tuple__70); __pyx_tuple__71 = PyTuple_Pack(2, __pyx_kp_s_22, __pyx_kp_s_H_2); if (unlikely(!__pyx_tuple__71)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3083; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__71); __Pyx_GIVEREF(__pyx_tuple__71); /* "pandas/tslib.pyx":3084 * (self.a_month[3], '%b'), (self.am_pm[1], '%p'), * ('1999', '%Y'), ('99', '%y'), ('22', '%H'), * ('44', '%M'), ('55', '%S'), ('76', '%j'), # <<<<<<<<<<<<<< * ('17', '%d'), ('03', '%m'), ('3', '%m'), * # '3' needed for when no leading zero. */ __pyx_tuple__72 = PyTuple_Pack(2, __pyx_kp_s_44, __pyx_kp_s_M_2); if (unlikely(!__pyx_tuple__72)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3084; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__72); __Pyx_GIVEREF(__pyx_tuple__72); __pyx_tuple__73 = PyTuple_Pack(2, __pyx_kp_s_55, __pyx_kp_s_S_2); if (unlikely(!__pyx_tuple__73)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3084; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__73); __Pyx_GIVEREF(__pyx_tuple__73); __pyx_tuple__74 = PyTuple_Pack(2, __pyx_kp_s_76, __pyx_kp_s_j_2); if (unlikely(!__pyx_tuple__74)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3084; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__74); __Pyx_GIVEREF(__pyx_tuple__74); /* "pandas/tslib.pyx":3085 * ('1999', '%Y'), ('99', '%y'), ('22', '%H'), * ('44', '%M'), ('55', '%S'), ('76', '%j'), * ('17', '%d'), ('03', '%m'), ('3', '%m'), # <<<<<<<<<<<<<< * # '3' needed for when no leading zero. * ('2', '%w'), ('10', '%I')] */ __pyx_tuple__75 = PyTuple_Pack(2, __pyx_kp_s_17, __pyx_kp_s_d_2); if (unlikely(!__pyx_tuple__75)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3085; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__75); __Pyx_GIVEREF(__pyx_tuple__75); __pyx_tuple__76 = PyTuple_Pack(2, __pyx_kp_s_03, __pyx_kp_s_m_2); if (unlikely(!__pyx_tuple__76)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3085; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__76); __Pyx_GIVEREF(__pyx_tuple__76); __pyx_tuple__77 = PyTuple_Pack(2, __pyx_kp_s_3, __pyx_kp_s_m_2); if (unlikely(!__pyx_tuple__77)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3085; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__77); __Pyx_GIVEREF(__pyx_tuple__77); /* "pandas/tslib.pyx":3087 * ('17', '%d'), ('03', '%m'), ('3', '%m'), * # '3' needed for when no leading zero. * ('2', '%w'), ('10', '%I')] # <<<<<<<<<<<<<< * replacement_pairs.extend([(tz, "%Z") for tz_values in self.timezone * for tz in tz_values]) */ __pyx_tuple__78 = PyTuple_Pack(2, __pyx_kp_s_2, __pyx_kp_s_w_2); if (unlikely(!__pyx_tuple__78)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3087; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__78); __Pyx_GIVEREF(__pyx_tuple__78); __pyx_tuple__79 = PyTuple_Pack(2, __pyx_kp_s_10, __pyx_kp_s_I_2); if (unlikely(!__pyx_tuple__79)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3087; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__79); __Pyx_GIVEREF(__pyx_tuple__79); /* "pandas/tslib.pyx":3090 * replacement_pairs.extend([(tz, "%Z") for tz_values in self.timezone * for tz in tz_values]) * for offset,directive in ((0,'%c'), (1,'%x'), (2,'%X')): # <<<<<<<<<<<<<< * current_format = date_time[offset] * for old, new in replacement_pairs: */ __pyx_tuple__80 = PyTuple_Pack(2, __pyx_int_0, __pyx_kp_s_c); if (unlikely(!__pyx_tuple__80)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3090; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__80); __Pyx_GIVEREF(__pyx_tuple__80); __pyx_tuple__81 = PyTuple_Pack(2, __pyx_int_1, __pyx_kp_s_x); if (unlikely(!__pyx_tuple__81)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3090; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__81); __Pyx_GIVEREF(__pyx_tuple__81); __pyx_tuple__82 = PyTuple_Pack(2, __pyx_int_2, __pyx_kp_s_X); if (unlikely(!__pyx_tuple__82)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3090; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__82); __Pyx_GIVEREF(__pyx_tuple__82); __pyx_tuple__83 = PyTuple_Pack(3, __pyx_tuple__80, __pyx_tuple__81, __pyx_tuple__82); if (unlikely(!__pyx_tuple__83)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3090; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__83); __Pyx_GIVEREF(__pyx_tuple__83); /* "pandas/tslib.pyx":3102 * # 2005-01-03 occurs before the first Monday of the year. Otherwise * # %U is used. * time_tuple = time.struct_time((1999,1,3,1,1,1,6,3,0)) # <<<<<<<<<<<<<< * if '00' in time.strftime(directive, time_tuple): * U_W = '%W' */ __pyx_tuple__84 = PyTuple_Pack(9, __pyx_int_1999, __pyx_int_1, __pyx_int_3, __pyx_int_1, __pyx_int_1, __pyx_int_1, __pyx_int_6, __pyx_int_3, __pyx_int_0); if (unlikely(!__pyx_tuple__84)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3102; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__84); __Pyx_GIVEREF(__pyx_tuple__84); __pyx_tuple__85 = PyTuple_Pack(1, __pyx_tuple__84); if (unlikely(!__pyx_tuple__85)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3102; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__85); __Pyx_GIVEREF(__pyx_tuple__85); /* "pandas/tslib.pyx":3161 * 'A': self.__seqToRE(self.locale_time.f_weekday, 'A'), * 'a': self.__seqToRE(self.locale_time.a_weekday, 'a'), * 'B': self.__seqToRE(self.locale_time.f_month[1:], 'B'), # <<<<<<<<<<<<<< * 'b': self.__seqToRE(self.locale_time.a_month[1:], 'b'), * 'p': self.__seqToRE(self.locale_time.am_pm, 'p'), */ __pyx_slice__86 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__86)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3161; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_slice__86); __Pyx_GIVEREF(__pyx_slice__86); /* "pandas/tslib.pyx":3162 * 'a': self.__seqToRE(self.locale_time.a_weekday, 'a'), * 'B': self.__seqToRE(self.locale_time.f_month[1:], 'B'), * 'b': self.__seqToRE(self.locale_time.a_month[1:], 'b'), # <<<<<<<<<<<<<< * 'p': self.__seqToRE(self.locale_time.am_pm, 'p'), * 'Z': self.__seqToRE((tz for tz_names in self.locale_time.timezone */ __pyx_slice__87 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__87)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3162; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_slice__87); __Pyx_GIVEREF(__pyx_slice__87); /* "pandas/tslib.pyx":3168 * 'Z'), * '%': '%'}) * base.__setitem__('W', base.__getitem__('U').replace('U', 'W')) # <<<<<<<<<<<<<< * base.__setitem__('c', self.pattern(self.locale_time.LC_date_time)) * base.__setitem__('x', self.pattern(self.locale_time.LC_date)) */ __pyx_tuple__88 = PyTuple_Pack(1, __pyx_n_s_U); if (unlikely(!__pyx_tuple__88)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3168; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__88); __Pyx_GIVEREF(__pyx_tuple__88); __pyx_tuple__89 = PyTuple_Pack(2, __pyx_n_s_U, __pyx_n_s_W); if (unlikely(!__pyx_tuple__89)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3168; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__89); __Pyx_GIVEREF(__pyx_tuple__89); /* "pandas/tslib.pyx":3203 * # as regex syntax. Cannot use re.escape since we have to deal with * # format directives (%m, etc.). * regex_chars = re_compile(r"([\\.^$*+?\(\){}\[\]|])") # <<<<<<<<<<<<<< * format = regex_chars.sub(r"\\\1", format) * whitespace_replacement = re_compile('\s+') */ __pyx_tuple__92 = PyTuple_Pack(1, __pyx_kp_s__91); if (unlikely(!__pyx_tuple__92)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3203; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__92); __Pyx_GIVEREF(__pyx_tuple__92); /* "pandas/tslib.pyx":3205 * regex_chars = re_compile(r"([\\.^$*+?\(\){}\[\]|])") * format = regex_chars.sub(r"\\\1", format) * whitespace_replacement = re_compile('\s+') # <<<<<<<<<<<<<< * format = whitespace_replacement.sub('\s+', format) * while '%' in format: */ __pyx_tuple__93 = PyTuple_Pack(1, __pyx_kp_s_s_4); if (unlikely(!__pyx_tuple__93)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3205; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__93); __Pyx_GIVEREF(__pyx_tuple__93); /* "pandas/tslib.pyx":3208 * format = whitespace_replacement.sub('\s+', format) * while '%' in format: * directive_index = format.index('%')+1 # <<<<<<<<<<<<<< * processed_format = "%s%s%s" % (processed_format, * format[:directive_index-1], */ __pyx_tuple__94 = PyTuple_Pack(1, __pyx_kp_s__36); if (unlikely(!__pyx_tuple__94)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3208; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__94); __Pyx_GIVEREF(__pyx_tuple__94); /* "numpy.pxd":217 * 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__95 = PyTuple_Pack(1, __pyx_kp_u_ndarray_is_not_C_contiguous); if (unlikely(!__pyx_tuple__95)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 217; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__95); __Pyx_GIVEREF(__pyx_tuple__95); /* "numpy.pxd":221 * 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__96 = PyTuple_Pack(1, __pyx_kp_u_ndarray_is_not_Fortran_contiguou); if (unlikely(!__pyx_tuple__96)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 221; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__96); __Pyx_GIVEREF(__pyx_tuple__96); /* "numpy.pxd":259 * if ((descr.byteorder == '>' and little_endian) or * (descr.byteorder == '<' 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__97 = PyTuple_Pack(1, __pyx_kp_u_Non_native_byte_order_not_suppor); if (unlikely(!__pyx_tuple__97)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 259; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__97); __Pyx_GIVEREF(__pyx_tuple__97); /* "numpy.pxd":803 * * if (end - f) - (new_offset - offset[0]) < 15: * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") # <<<<<<<<<<<<<< * * if ((child.byteorder == '>' and little_endian) or */ __pyx_tuple__98 = PyTuple_Pack(1, __pyx_kp_u_Format_string_allocated_too_shor); if (unlikely(!__pyx_tuple__98)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 803; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__98); __Pyx_GIVEREF(__pyx_tuple__98); /* "numpy.pxd":807 * if ((child.byteorder == '>' and little_endian) or * (child.byteorder == '<' 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__99 = PyTuple_Pack(1, __pyx_kp_u_Non_native_byte_order_not_suppor); if (unlikely(!__pyx_tuple__99)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 807; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__99); __Pyx_GIVEREF(__pyx_tuple__99); /* "numpy.pxd":827 * 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__100 = PyTuple_Pack(1, __pyx_kp_u_Format_string_allocated_too_shor_2); if (unlikely(!__pyx_tuple__100)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 827; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__100); __Pyx_GIVEREF(__pyx_tuple__100); /* "util.pxd":40 * i += sz * elif i >= sz or sz == 0: * raise IndexError('index out of bounds') # <<<<<<<<<<<<<< * * return get_value_1d(arr, i) */ __pyx_tuple__101 = PyTuple_Pack(1, __pyx_kp_s_index_out_of_bounds); if (unlikely(!__pyx_tuple__101)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 40; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__101); __Pyx_GIVEREF(__pyx_tuple__101); /* "util.pxd":57 * i += sz * elif i >= sz: * raise IndexError('index out of bounds') # <<<<<<<<<<<<<< * * assign_value_1d(arr, i, value) */ __pyx_tuple__102 = PyTuple_Pack(1, __pyx_kp_s_index_out_of_bounds); if (unlikely(!__pyx_tuple__102)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 57; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__102); __Pyx_GIVEREF(__pyx_tuple__102); /* "pandas/tslib.pyx":63 * * # < numpy 1.7 compat for NaT * compat_NaT = np.array([NPY_NAT]).astype('m8[ns]').item() # <<<<<<<<<<<<<< * * # numpy actual nat object */ __pyx_tuple__103 = PyTuple_Pack(1, __pyx_kp_s_m8_ns); if (unlikely(!__pyx_tuple__103)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__103); __Pyx_GIVEREF(__pyx_tuple__103); /* "pandas/tslib.pyx":66 * * # numpy actual nat object * np_NaT = np.datetime64('NaT',dtype='M8') # <<<<<<<<<<<<<< * * try: */ __pyx_tuple__104 = PyTuple_Pack(1, __pyx_n_s_NaT); if (unlikely(!__pyx_tuple__104)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 66; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__104); __Pyx_GIVEREF(__pyx_tuple__104); /* "pandas/tslib.pyx":73 * basestring = str * * def ints_to_pydatetime(ndarray[int64_t] arr, tz=None): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = len(arr) */ __pyx_tuple__105 = PyTuple_Pack(11, __pyx_n_s_arr, __pyx_n_s_tz, __pyx_n_s_i, __pyx_n_s_n, __pyx_n_s_dts, __pyx_n_s_result, __pyx_n_s_dt, __pyx_n_s_trans, __pyx_n_s_deltas, __pyx_n_s_pos, __pyx_n_s_inf); if (unlikely(!__pyx_tuple__105)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 73; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__105); __Pyx_GIVEREF(__pyx_tuple__105); __pyx_codeobj__106 = (PyObject*)__Pyx_PyCode_New(2, 0, 11, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__105, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_yoh_deb_gits_pkg_exppsy_pa, __pyx_n_s_ints_to_pydatetime, 73, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__106)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 73; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/tslib.pyx":128 * from dateutil.tz import tzlocal * * def _is_tzlocal(tz): # <<<<<<<<<<<<<< * return isinstance(tz, tzlocal) * */ __pyx_tuple__107 = PyTuple_Pack(1, __pyx_n_s_tz); if (unlikely(!__pyx_tuple__107)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__107); __Pyx_GIVEREF(__pyx_tuple__107); __pyx_codeobj__108 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__107, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_yoh_deb_gits_pkg_exppsy_pa, __pyx_n_s_is_tzlocal, 128, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__108)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/tslib.pyx":131 * return isinstance(tz, tzlocal) * * def _is_fixed_offset(tz): # <<<<<<<<<<<<<< * try: * tz._transition_info */ __pyx_tuple__109 = PyTuple_Pack(1, __pyx_n_s_tz); if (unlikely(!__pyx_tuple__109)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 131; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__109); __Pyx_GIVEREF(__pyx_tuple__109); __pyx_codeobj__110 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__109, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_yoh_deb_gits_pkg_exppsy_pa, __pyx_n_s_is_fixed_offset, 131, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__110)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 131; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/tslib.pyx":138 * return True * * _zero_time = datetime_time(0, 0) # <<<<<<<<<<<<<< * * # Python front end to C extension type _Timestamp */ __pyx_tuple__111 = PyTuple_Pack(2, __pyx_int_0, __pyx_int_0); if (unlikely(!__pyx_tuple__111)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 138; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__111); __Pyx_GIVEREF(__pyx_tuple__111); /* "pandas/tslib.pyx":150 * * @classmethod * def fromordinal(cls, ordinal, offset=None, tz=None): # <<<<<<<<<<<<<< * """ passed an ordinal, translate and convert to a ts * note: by definition there cannot be any tz info on the ordinal itself """ */ __pyx_tuple__112 = PyTuple_Pack(4, __pyx_n_s_cls, __pyx_n_s_ordinal, __pyx_n_s_offset, __pyx_n_s_tz); if (unlikely(!__pyx_tuple__112)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 150; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__112); __Pyx_GIVEREF(__pyx_tuple__112); __pyx_codeobj__113 = (PyObject*)__Pyx_PyCode_New(4, 0, 4, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__112, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_yoh_deb_gits_pkg_exppsy_pa, __pyx_n_s_fromordinal, 150, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__113)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 150; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_tuple__114 = PyTuple_Pack(2, ((PyObject *)Py_None), ((PyObject *)Py_None)); if (unlikely(!__pyx_tuple__114)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 150; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__114); __Pyx_GIVEREF(__pyx_tuple__114); /* "pandas/tslib.pyx":156 * * @classmethod * def now(cls, tz=None): # <<<<<<<<<<<<<< * """ compat now with datetime """ * if isinstance(tz, basestring): */ __pyx_tuple__115 = PyTuple_Pack(2, __pyx_n_s_cls, __pyx_n_s_tz); if (unlikely(!__pyx_tuple__115)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 156; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__115); __Pyx_GIVEREF(__pyx_tuple__115); __pyx_codeobj__116 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__115, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_yoh_deb_gits_pkg_exppsy_pa, __pyx_n_s_now, 156, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__116)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 156; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_tuple__117 = PyTuple_Pack(1, ((PyObject *)Py_None)); if (unlikely(!__pyx_tuple__117)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 156; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__117); __Pyx_GIVEREF(__pyx_tuple__117); /* "pandas/tslib.pyx":163 * * @classmethod * def today(cls): # <<<<<<<<<<<<<< * """ compat today with datetime """ * return cls(datetime.today()) */ __pyx_tuple__118 = PyTuple_Pack(1, __pyx_n_s_cls); if (unlikely(!__pyx_tuple__118)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 163; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__118); __Pyx_GIVEREF(__pyx_tuple__118); __pyx_codeobj__119 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__118, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_yoh_deb_gits_pkg_exppsy_pa, __pyx_n_s_today, 163, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__119)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 163; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/tslib.pyx":168 * * @classmethod * def utcnow(cls): # <<<<<<<<<<<<<< * return cls.now('UTC') * */ __pyx_tuple__120 = PyTuple_Pack(1, __pyx_n_s_cls); if (unlikely(!__pyx_tuple__120)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__120); __Pyx_GIVEREF(__pyx_tuple__120); __pyx_codeobj__121 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__120, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_yoh_deb_gits_pkg_exppsy_pa, __pyx_n_s_utcnow, 168, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__121)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/tslib.pyx":171 * return cls.now('UTC') * * def __new__(cls, object ts_input, object offset=None, tz=None, unit=None): # <<<<<<<<<<<<<< * cdef _TSObject ts * cdef _Timestamp ts_base */ __pyx_tuple__122 = PyTuple_Pack(7, __pyx_n_s_cls, __pyx_n_s_ts_input, __pyx_n_s_offset, __pyx_n_s_tz, __pyx_n_s_unit, __pyx_n_s_ts, __pyx_n_s_ts_base); if (unlikely(!__pyx_tuple__122)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 171; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__122); __Pyx_GIVEREF(__pyx_tuple__122); __pyx_codeobj__123 = (PyObject*)__Pyx_PyCode_New(5, 0, 7, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__122, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_yoh_deb_gits_pkg_exppsy_pa, __pyx_n_s_new, 171, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__123)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 171; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_tuple__124 = PyTuple_Pack(3, ((PyObject *)Py_None), ((PyObject *)Py_None), ((PyObject *)Py_None)); if (unlikely(!__pyx_tuple__124)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 171; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__124); __Pyx_GIVEREF(__pyx_tuple__124); /* "pandas/tslib.pyx":198 * return ts_base * * def __repr__(self): # <<<<<<<<<<<<<< * result = self._repr_base * zone = None */ __pyx_tuple__125 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_result, __pyx_n_s_zone, __pyx_n_s_year2000); if (unlikely(!__pyx_tuple__125)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 198; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__125); __Pyx_GIVEREF(__pyx_tuple__125); __pyx_codeobj__126 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__125, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_yoh_deb_gits_pkg_exppsy_pa, __pyx_n_s_repr, 198, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__126)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 198; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/tslib.pyx":221 * * @property * def _date_repr(self): # <<<<<<<<<<<<<< * # Ideal here would be self.strftime("%Y-%m-%d"), but * # the datetime strftime() methods require year >= 1900 */ __pyx_tuple__127 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__127)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 221; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__127); __Pyx_GIVEREF(__pyx_tuple__127); __pyx_codeobj__128 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__127, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_yoh_deb_gits_pkg_exppsy_pa, __pyx_n_s_date_repr, 221, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__128)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 221; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/tslib.pyx":227 * * @property * def _time_repr(self): # <<<<<<<<<<<<<< * result = '%.2d:%.2d:%.2d' % (self.hour, self.minute, self.second) * */ __pyx_tuple__129 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_result, __pyx_n_s_nanos); if (unlikely(!__pyx_tuple__129)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 227; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__129); __Pyx_GIVEREF(__pyx_tuple__129); __pyx_codeobj__130 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__129, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_yoh_deb_gits_pkg_exppsy_pa, __pyx_n_s_time_repr, 227, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__130)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 227; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/tslib.pyx":239 * * @property * def _repr_base(self): # <<<<<<<<<<<<<< * return '%s %s' % (self._date_repr, self._time_repr) * */ __pyx_tuple__131 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__131)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 239; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__131); __Pyx_GIVEREF(__pyx_tuple__131); __pyx_codeobj__132 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__131, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_yoh_deb_gits_pkg_exppsy_pa, __pyx_n_s_repr_base, 239, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__132)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 239; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/tslib.pyx":243 * * @property * def tz(self): # <<<<<<<<<<<<<< * """ * Alias for tzinfo */ __pyx_tuple__133 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__133)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__133); __Pyx_GIVEREF(__pyx_tuple__133); __pyx_codeobj__134 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__133, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_yoh_deb_gits_pkg_exppsy_pa, __pyx_n_s_tz, 243, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__134)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/tslib.pyx":250 * * @property * def freq(self): # <<<<<<<<<<<<<< * return self.offset * */ __pyx_tuple__135 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__135)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 250; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__135); __Pyx_GIVEREF(__pyx_tuple__135); __pyx_codeobj__136 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__135, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_yoh_deb_gits_pkg_exppsy_pa, __pyx_n_s_freq, 250, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__136)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 250; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/tslib.pyx":253 * return self.offset * * def __setstate__(self, state): # <<<<<<<<<<<<<< * self.value = state[0] * self.offset = state[1] */ __pyx_tuple__137 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_state); if (unlikely(!__pyx_tuple__137)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 253; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__137); __Pyx_GIVEREF(__pyx_tuple__137); __pyx_codeobj__138 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__137, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_yoh_deb_gits_pkg_exppsy_pa, __pyx_n_s_setstate, 253, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__138)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 253; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/tslib.pyx":258 * self.tzinfo = state[2] * * def __reduce__(self): # <<<<<<<<<<<<<< * object_state = self.value, self.offset, self.tzinfo * return (Timestamp, object_state) */ __pyx_tuple__139 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_object_state); if (unlikely(!__pyx_tuple__139)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 258; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__139); __Pyx_GIVEREF(__pyx_tuple__139); __pyx_codeobj__140 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__139, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_yoh_deb_gits_pkg_exppsy_pa, __pyx_n_s_reduce, 258, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__140)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 258; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/tslib.pyx":262 * return (Timestamp, object_state) * * def to_period(self, freq=None): # <<<<<<<<<<<<<< * """ * Return an period of which this timestamp is an observation. */ __pyx_tuple__141 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_freq, __pyx_n_s_Period); if (unlikely(!__pyx_tuple__141)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 262; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__141); __Pyx_GIVEREF(__pyx_tuple__141); __pyx_codeobj__142 = (PyObject*)__Pyx_PyCode_New(2, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__141, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_yoh_deb_gits_pkg_exppsy_pa, __pyx_n_s_to_period, 262, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__142)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 262; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_tuple__143 = PyTuple_Pack(1, ((PyObject *)Py_None)); if (unlikely(!__pyx_tuple__143)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 262; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__143); __Pyx_GIVEREF(__pyx_tuple__143); /* "pandas/tslib.pyx":274 * * @property * def dayofweek(self): # <<<<<<<<<<<<<< * return self.weekday() * */ __pyx_tuple__144 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__144)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 274; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__144); __Pyx_GIVEREF(__pyx_tuple__144); __pyx_codeobj__145 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__144, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_yoh_deb_gits_pkg_exppsy_pa, __pyx_n_s_dayofweek, 274, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__145)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 274; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/tslib.pyx":278 * * @property * def dayofyear(self): # <<<<<<<<<<<<<< * return self._get_field('doy') * */ __pyx_tuple__146 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__146)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 278; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__146); __Pyx_GIVEREF(__pyx_tuple__146); __pyx_codeobj__147 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__146, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_yoh_deb_gits_pkg_exppsy_pa, __pyx_n_s_dayofyear, 278, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__147)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 278; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/tslib.pyx":282 * * @property * def week(self): # <<<<<<<<<<<<<< * return self._get_field('woy') * */ __pyx_tuple__148 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__148)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 282; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__148); __Pyx_GIVEREF(__pyx_tuple__148); __pyx_codeobj__149 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__148, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_yoh_deb_gits_pkg_exppsy_pa, __pyx_n_s_week, 282, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__149)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 282; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/tslib.pyx":288 * * @property * def quarter(self): # <<<<<<<<<<<<<< * return self._get_field('q') * */ __pyx_tuple__150 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__150)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 288; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__150); __Pyx_GIVEREF(__pyx_tuple__150); __pyx_codeobj__151 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__150, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_yoh_deb_gits_pkg_exppsy_pa, __pyx_n_s_quarter, 288, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__151)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 288; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/tslib.pyx":292 * * @property * def freqstr(self): # <<<<<<<<<<<<<< * return getattr(self.offset, 'freqstr', self.offset) * */ __pyx_tuple__152 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__152)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 292; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__152); __Pyx_GIVEREF(__pyx_tuple__152); __pyx_codeobj__153 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__152, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_yoh_deb_gits_pkg_exppsy_pa, __pyx_n_s_freqstr, 292, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__153)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 292; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/tslib.pyx":296 * * @property * def asm8(self): # <<<<<<<<<<<<<< * return np.int64(self.value).view('M8[ns]') * */ __pyx_tuple__154 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__154)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 296; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__154); __Pyx_GIVEREF(__pyx_tuple__154); __pyx_codeobj__155 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__154, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_yoh_deb_gits_pkg_exppsy_pa, __pyx_n_s_asm8, 296, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__155)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 296; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/tslib.pyx":299 * return np.int64(self.value).view('M8[ns]') * * def tz_localize(self, tz): # <<<<<<<<<<<<<< * """ * Convert naive Timestamp to local time zone */ __pyx_tuple__156 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_tz); if (unlikely(!__pyx_tuple__156)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 299; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__156); __Pyx_GIVEREF(__pyx_tuple__156); __pyx_codeobj__157 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__156, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_yoh_deb_gits_pkg_exppsy_pa, __pyx_n_s_tz_localize, 299, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__157)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 299; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/tslib.pyx":318 * 'tz_convert for conversions') * * def tz_convert(self, tz): # <<<<<<<<<<<<<< * """ * Convert Timestamp to another time zone or localize to requested time */ __pyx_tuple__158 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_tz); if (unlikely(!__pyx_tuple__158)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 318; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__158); __Pyx_GIVEREF(__pyx_tuple__158); __pyx_codeobj__159 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__158, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_yoh_deb_gits_pkg_exppsy_pa, __pyx_n_s_tz_convert, 318, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__159)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 318; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/tslib.pyx":341 * astimezone = tz_convert * * def replace(self, **kwds): # <<<<<<<<<<<<<< * return Timestamp(datetime.replace(self, **kwds), * offset=self.offset) */ __pyx_tuple__160 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_kwds, __pyx_n_s_kwds); if (unlikely(!__pyx_tuple__160)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 341; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__160); __Pyx_GIVEREF(__pyx_tuple__160); __pyx_codeobj__161 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__160, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_yoh_deb_gits_pkg_exppsy_pa, __pyx_n_s_replace, 341, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__161)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 341; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/tslib.pyx":345 * offset=self.offset) * * def to_pydatetime(self, warn=True): # <<<<<<<<<<<<<< * """ * If warn=True, issue warning if nanoseconds is nonzero */ __pyx_tuple__162 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_warn, __pyx_n_s_dts, __pyx_n_s_ts); if (unlikely(!__pyx_tuple__162)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 345; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__162); __Pyx_GIVEREF(__pyx_tuple__162); __pyx_codeobj__163 = (PyObject*)__Pyx_PyCode_New(2, 0, 4, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__162, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_yoh_deb_gits_pkg_exppsy_pa, __pyx_n_s_to_pydatetime, 345, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__163)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 345; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_tuple__164 = PyTuple_Pack(1, ((PyObject *)Py_True)); if (unlikely(!__pyx_tuple__164)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 345; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__164); __Pyx_GIVEREF(__pyx_tuple__164); /* "pandas/tslib.pyx":361 * ts.dts.us, ts.tzinfo) * * def isoformat(self, sep='T'): # <<<<<<<<<<<<<< * base = super(_Timestamp, self).isoformat(sep=sep) * if self.nanosecond == 0: */ __pyx_tuple__165 = PyTuple_Pack(5, __pyx_n_s_self, __pyx_n_s_sep, __pyx_n_s_base, __pyx_n_s_base1, __pyx_n_s_base2); if (unlikely(!__pyx_tuple__165)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 361; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__165); __Pyx_GIVEREF(__pyx_tuple__165); __pyx_codeobj__166 = (PyObject*)__Pyx_PyCode_New(2, 0, 5, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__165, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_yoh_deb_gits_pkg_exppsy_pa, __pyx_n_s_isoformat, 361, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__166)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 361; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_tuple__167 = PyTuple_Pack(1, ((PyObject*)__pyx_n_s_T)); if (unlikely(!__pyx_tuple__167)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 361; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__167); __Pyx_GIVEREF(__pyx_tuple__167); /* "pandas/tslib.pyx":378 * return base1 + base2 * * def _has_time_component(self): # <<<<<<<<<<<<<< * """ * Returns if the Timestamp has a time component */ __pyx_tuple__168 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__168)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 378; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__168); __Pyx_GIVEREF(__pyx_tuple__168); __pyx_codeobj__169 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__168, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_yoh_deb_gits_pkg_exppsy_pa, __pyx_n_s_has_time_component, 378, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__169)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 378; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/tslib.pyx":392 * """(N)ot-(A)-(T)ime, the time equivalent of NaN""" * * def __new__(cls): # <<<<<<<<<<<<<< * cdef _NaT base * */ __pyx_tuple__170 = PyTuple_Pack(2, __pyx_n_s_cls, __pyx_n_s_base); if (unlikely(!__pyx_tuple__170)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 392; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__170); __Pyx_GIVEREF(__pyx_tuple__170); __pyx_codeobj__171 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__170, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_yoh_deb_gits_pkg_exppsy_pa, __pyx_n_s_new, 392, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__171)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 392; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/tslib.pyx":401 * return base * * def __repr__(self): # <<<<<<<<<<<<<< * return 'NaT' * */ __pyx_tuple__172 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__172)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 401; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__172); __Pyx_GIVEREF(__pyx_tuple__172); __pyx_codeobj__173 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__172, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_yoh_deb_gits_pkg_exppsy_pa, __pyx_n_s_repr, 401, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__173)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 401; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/tslib.pyx":404 * return 'NaT' * * def __str__(self): # <<<<<<<<<<<<<< * return 'NaT' * */ __pyx_tuple__174 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__174)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 404; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__174); __Pyx_GIVEREF(__pyx_tuple__174); __pyx_codeobj__175 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__174, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_yoh_deb_gits_pkg_exppsy_pa, __pyx_n_s_str, 404, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__175)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 404; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/tslib.pyx":407 * return 'NaT' * * def __hash__(self): # <<<<<<<<<<<<<< * return iNaT * */ __pyx_tuple__176 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__176)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 407; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__176); __Pyx_GIVEREF(__pyx_tuple__176); __pyx_codeobj__177 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__176, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_yoh_deb_gits_pkg_exppsy_pa, __pyx_n_s_hash, 407, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__177)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 407; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/tslib.pyx":410 * return iNaT * * def weekday(self): # <<<<<<<<<<<<<< * return -1 * */ __pyx_tuple__178 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__178)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 410; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__178); __Pyx_GIVEREF(__pyx_tuple__178); __pyx_codeobj__179 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__178, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_yoh_deb_gits_pkg_exppsy_pa, __pyx_n_s_weekday, 410, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__179)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 410; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/tslib.pyx":413 * return -1 * * def toordinal(self): # <<<<<<<<<<<<<< * return -1 * */ __pyx_tuple__180 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__180)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 413; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__180); __Pyx_GIVEREF(__pyx_tuple__180); __pyx_codeobj__181 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__180, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_yoh_deb_gits_pkg_exppsy_pa, __pyx_n_s_toordinal, 413, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__181)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 413; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/tslib.pyx":444 * return ', tz=%s' % zone * * def is_timestamp_array(ndarray[object] values): # <<<<<<<<<<<<<< * cdef int i, n = len(values) * if n == 0: */ __pyx_tuple__182 = PyTuple_Pack(3, __pyx_n_s_values, __pyx_n_s_i, __pyx_n_s_n); if (unlikely(!__pyx_tuple__182)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 444; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__182); __Pyx_GIVEREF(__pyx_tuple__182); __pyx_codeobj__183 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__182, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_yoh_deb_gits_pkg_exppsy_pa, __pyx_n_s_is_timestamp_array, 444, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__183)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 444; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/tslib.pyx":494 * # Frequency inference * * def unique_deltas(ndarray[int64_t] arr): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = len(arr) */ __pyx_tuple__184 = PyTuple_Pack(9, __pyx_n_s_arr, __pyx_n_s_i, __pyx_n_s_n, __pyx_n_s_val, __pyx_n_s_k, __pyx_n_s_table, __pyx_n_s_ret, __pyx_n_s_uniques, __pyx_n_s_result); if (unlikely(!__pyx_tuple__184)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 494; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__184); __Pyx_GIVEREF(__pyx_tuple__184); __pyx_codeobj__185 = (PyObject*)__Pyx_PyCode_New(1, 0, 9, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__184, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_yoh_deb_gits_pkg_exppsy_pa, __pyx_n_s_unique_deltas, 494, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__185)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 494; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/tslib.pyx":522 * * * def apply_offset(ndarray[object] values, object offset): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = len(values) */ __pyx_tuple__186 = PyTuple_Pack(7, __pyx_n_s_values, __pyx_n_s_offset, __pyx_n_s_i, __pyx_n_s_n, __pyx_n_s_new_values, __pyx_n_s_boxed, __pyx_n_s_result); if (unlikely(!__pyx_tuple__186)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 522; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__186); __Pyx_GIVEREF(__pyx_tuple__186); __pyx_codeobj__187 = (PyObject*)__Pyx_PyCode_New(2, 0, 7, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__186, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_yoh_deb_gits_pkg_exppsy_pa, __pyx_n_s_apply_offset, 522, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__187)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 522; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/tslib.pyx":728 * * * def _delta_to_nanoseconds(delta): # <<<<<<<<<<<<<< * if hasattr(delta, 'delta'): * delta = delta.delta */ __pyx_tuple__188 = PyTuple_Pack(1, __pyx_n_s_delta); if (unlikely(!__pyx_tuple__188)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 728; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__188); __Pyx_GIVEREF(__pyx_tuple__188); __pyx_codeobj__189 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__188, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_yoh_deb_gits_pkg_exppsy_pa, __pyx_n_s_delta_to_nanoseconds, 728, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__189)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 728; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/tslib.pyx":890 * * * def get_timezone(tz): # <<<<<<<<<<<<<< * return _get_zone(tz) * */ __pyx_tuple__190 = PyTuple_Pack(1, __pyx_n_s_tz); if (unlikely(!__pyx_tuple__190)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 890; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__190); __Pyx_GIVEREF(__pyx_tuple__190); __pyx_codeobj__191 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__190, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_yoh_deb_gits_pkg_exppsy_pa, __pyx_n_s_get_timezone, 890, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__191)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 890; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/tslib.pyx":939 * # obj.dtval = _dts_to_pydatetime(&obj.dts) * * def datetime_to_datetime64(ndarray[object] values): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = len(values) */ __pyx_tuple__192 = PyTuple_Pack(9, __pyx_n_s_values, __pyx_n_s_i, __pyx_n_s_n, __pyx_n_s_val, __pyx_n_s_inferred_tz, __pyx_n_s_iresult, __pyx_n_s_dts, __pyx_n_s_ts_2, __pyx_n_s_result); if (unlikely(!__pyx_tuple__192)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 939; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__192); __Pyx_GIVEREF(__pyx_tuple__192); __pyx_codeobj__193 = (PyObject*)__Pyx_PyCode_New(1, 0, 9, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__192, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_yoh_deb_gits_pkg_exppsy_pa, __pyx_n_s_datetime_to_datetime64, 939, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__193)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 939; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/tslib.pyx":976 * _not_datelike_strings = set(['a','A','m','M','p','P','t','T']) * * def _does_string_look_like_datetime(date_string): # <<<<<<<<<<<<<< * if date_string.startswith('0'): * # Strings starting with 0 are more consistent with a */ __pyx_tuple__194 = PyTuple_Pack(1, __pyx_n_s_date_string); if (unlikely(!__pyx_tuple__194)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 976; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__194); __Pyx_GIVEREF(__pyx_tuple__194); __pyx_codeobj__195 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__194, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_yoh_deb_gits_pkg_exppsy_pa, __pyx_n_s_does_string_look_like_datetime, 976, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__195)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 976; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/tslib.pyx":993 * return True * * def parse_datetime_string(date_string, **kwargs): # <<<<<<<<<<<<<< * if not _does_string_look_like_datetime(date_string): * raise ValueError('Given date string not likely a datetime.') */ __pyx_tuple__196 = PyTuple_Pack(4, __pyx_n_s_date_string, __pyx_n_s_kwargs, __pyx_n_s_kwargs, __pyx_n_s_dt); if (unlikely(!__pyx_tuple__196)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 993; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__196); __Pyx_GIVEREF(__pyx_tuple__196); __pyx_codeobj__197 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__196, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_yoh_deb_gits_pkg_exppsy_pa, __pyx_n_s_parse_datetime_string, 993, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__197)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 993; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/tslib.pyx":1000 * return dt * * def array_to_datetime(ndarray[object] values, raise_=False, dayfirst=False, # <<<<<<<<<<<<<< * format=None, utc=None, coerce=False, unit=None): * cdef: */ __pyx_tuple__198 = PyTuple_Pack(19, __pyx_n_s_values, __pyx_n_s_raise, __pyx_n_s_dayfirst, __pyx_n_s_format, __pyx_n_s_utc, __pyx_n_s_coerce, __pyx_n_s_unit, __pyx_n_s_i, __pyx_n_s_n, __pyx_n_s_val, __pyx_n_s_iresult, __pyx_n_s_oresult, __pyx_n_s_dts, __pyx_n_s_utc_convert, __pyx_n_s_seen_integer, __pyx_n_s_seen_datetime, __pyx_n_s_ts_2, __pyx_n_s_m, __pyx_n_s_result); if (unlikely(!__pyx_tuple__198)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1000; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__198); __Pyx_GIVEREF(__pyx_tuple__198); __pyx_codeobj__199 = (PyObject*)__Pyx_PyCode_New(7, 0, 19, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__198, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_yoh_deb_gits_pkg_exppsy_pa, __pyx_n_s_array_to_datetime, 1000, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__199)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1000; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/tslib.pyx":1169 * return oresult * * def array_to_timedelta64(ndarray[object] values, coerce=False): # <<<<<<<<<<<<<< * """ convert an ndarray to an array of ints that are timedeltas * force conversion if coerce = True, */ __pyx_tuple__200 = PyTuple_Pack(6, __pyx_n_s_values, __pyx_n_s_coerce, __pyx_n_s_i, __pyx_n_s_n, __pyx_n_s_iresult, __pyx_n_s_result); if (unlikely(!__pyx_tuple__200)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1169; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__200); __Pyx_GIVEREF(__pyx_tuple__200); __pyx_codeobj__201 = (PyObject*)__Pyx_PyCode_New(2, 0, 6, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__200, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_yoh_deb_gits_pkg_exppsy_pa, __pyx_n_s_array_to_timedelta64, 1169, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__201)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1169; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/tslib.pyx":1185 * return iresult * * def convert_to_timedelta(object ts, object unit='ns', coerce=False): # <<<<<<<<<<<<<< * return convert_to_timedelta64(ts, unit, coerce) * */ __pyx_tuple__202 = PyTuple_Pack(3, __pyx_n_s_ts, __pyx_n_s_unit, __pyx_n_s_coerce); if (unlikely(!__pyx_tuple__202)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1185; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__202); __Pyx_GIVEREF(__pyx_tuple__202); __pyx_codeobj__203 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__202, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_yoh_deb_gits_pkg_exppsy_pa, __pyx_n_s_convert_to_timedelta, 1185, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__203)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1185; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/tslib.pyx":1244 * return ts.astype('timedelta64[ns]') * * def repr_timedelta64(object value, format=None): # <<<<<<<<<<<<<< * """ * provide repr for timedelta64 */ __pyx_tuple__204 = PyTuple_Pack(12, __pyx_n_s_value, __pyx_n_s_format, __pyx_n_s_ivalue, __pyx_n_s_frac, __pyx_n_s_sign, __pyx_n_s_days, __pyx_n_s_hours, __pyx_n_s_minutes, __pyx_n_s_seconds, __pyx_n_s_seconds_pretty, __pyx_n_s_sp, __pyx_n_s_sign_pretty); if (unlikely(!__pyx_tuple__204)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1244; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__204); __Pyx_GIVEREF(__pyx_tuple__204); __pyx_codeobj__205 = (PyObject*)__Pyx_PyCode_New(2, 0, 12, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__204, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_yoh_deb_gits_pkg_exppsy_pa, __pyx_n_s_repr_timedelta64, 1244, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__205)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1244; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/tslib.pyx":1313 * * * def array_strptime(ndarray[object] values, object fmt, coerce=False): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = len(values) */ __pyx_tuple__206 = PyTuple_Pack(37, __pyx_n_s_values, __pyx_n_s_fmt, __pyx_n_s_coerce, __pyx_n_s_i, __pyx_n_s_n, __pyx_n_s_dts, __pyx_n_s_iresult, __pyx_n_s_year, __pyx_n_s_month, __pyx_n_s_day, __pyx_n_s_minute, __pyx_n_s_hour, __pyx_n_s_second, __pyx_n_s_fraction, __pyx_n_s_weekday, __pyx_n_s_julian, __pyx_n_s_val, __pyx_n_s_locale_time, __pyx_n_s_format_regex, __pyx_n_s_err, __pyx_n_s_bad_directive, __pyx_n_s_result, __pyx_n_s_parse_code_table, __pyx_n_s_parse_code, __pyx_n_s_found, __pyx_n_s_tz, __pyx_n_s_week_of_year, __pyx_n_s_week_of_year_start, __pyx_n_s_found_dict, __pyx_n_s_group_key, __pyx_n_s_ampm, __pyx_n_s_s_2, __pyx_n_s_found_zone, __pyx_n_s_value, __pyx_n_s_tz_values, __pyx_n_s_week_starts_Mon, __pyx_n_s_datetime_result); if (unlikely(!__pyx_tuple__206)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1313; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__206); __Pyx_GIVEREF(__pyx_tuple__206); __pyx_codeobj__207 = (PyObject*)__Pyx_PyCode_New(3, 0, 37, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__206, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_yoh_deb_gits_pkg_exppsy_pa, __pyx_n_s_array_strptime, 1313, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__207)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1313; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/tslib.pyx":1599 * return (base*m) + (frac*m) * * def cast_to_nanoseconds(ndarray arr): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = arr.size */ __pyx_tuple__208 = PyTuple_Pack(9, __pyx_n_s_arr, __pyx_n_s_i, __pyx_n_s_n, __pyx_n_s_ivalues, __pyx_n_s_iresult, __pyx_n_s_unit, __pyx_n_s_dts, __pyx_n_s_shape, __pyx_n_s_result); if (unlikely(!__pyx_tuple__208)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1599; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__208); __Pyx_GIVEREF(__pyx_tuple__208); __pyx_codeobj__209 = (PyObject*)__Pyx_PyCode_New(1, 0, 9, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__208, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_yoh_deb_gits_pkg_exppsy_pa, __pyx_n_s_cast_to_nanoseconds, 1599, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__209)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1599; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/tslib.pyx":1631 * * * def pydt_to_i8(object pydt): # <<<<<<<<<<<<<< * ''' * Convert to int64 representation compatible with numpy datetime64; converts */ __pyx_tuple__210 = PyTuple_Pack(2, __pyx_n_s_pydt, __pyx_n_s_ts); if (unlikely(!__pyx_tuple__210)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1631; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__210); __Pyx_GIVEREF(__pyx_tuple__210); __pyx_codeobj__211 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__210, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_yoh_deb_gits_pkg_exppsy_pa, __pyx_n_s_pydt_to_i8, 1631, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__211)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1631; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/tslib.pyx":1643 * return ts.value * * def i8_to_pydt(int64_t i8, object tzinfo = None): # <<<<<<<<<<<<<< * ''' * Inverse of pydt_to_i8 */ __pyx_tuple__212 = PyTuple_Pack(2, __pyx_n_s_i8, __pyx_n_s_tzinfo); if (unlikely(!__pyx_tuple__212)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1643; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__212); __Pyx_GIVEREF(__pyx_tuple__212); __pyx_codeobj__213 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__212, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_yoh_deb_gits_pkg_exppsy_pa, __pyx_n_s_i8_to_pydt, 1643, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__213)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1643; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/tslib.pyx":1660 * have_pytz = False * * def tz_convert(ndarray[int64_t] vals, object tz1, object tz2): # <<<<<<<<<<<<<< * cdef: * ndarray[int64_t] utc_dates, result, trans, deltas */ __pyx_tuple__214 = PyTuple_Pack(17, __pyx_n_s_vals, __pyx_n_s_tz1, __pyx_n_s_tz2, __pyx_n_s_utc_dates, __pyx_n_s_result, __pyx_n_s_trans, __pyx_n_s_deltas, __pyx_n_s_i, __pyx_n_s_pos, __pyx_n_s_n, __pyx_n_s_v, __pyx_n_s_offset, __pyx_n_s_dts, __pyx_n_s_pytz, __pyx_n_s_dt, __pyx_n_s_delta, __pyx_n_s_trans_len); if (unlikely(!__pyx_tuple__214)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1660; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__214); __Pyx_GIVEREF(__pyx_tuple__214); __pyx_codeobj__215 = (PyObject*)__Pyx_PyCode_New(3, 0, 17, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__214, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_yoh_deb_gits_pkg_exppsy_pa, __pyx_n_s_tz_convert, 1660, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__215)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1660; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/tslib.pyx":1738 * return result * * def tz_convert_single(int64_t val, object tz1, object tz2): # <<<<<<<<<<<<<< * cdef: * ndarray[int64_t] trans, deltas */ __pyx_tuple__216 = PyTuple_Pack(13, __pyx_n_s_val, __pyx_n_s_tz1, __pyx_n_s_tz2, __pyx_n_s_trans, __pyx_n_s_deltas, __pyx_n_s_pos, __pyx_n_s_v, __pyx_n_s_offset, __pyx_n_s_utc_date, __pyx_n_s_dts, __pyx_n_s_pytz, __pyx_n_s_dt, __pyx_n_s_delta); if (unlikely(!__pyx_tuple__216)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1738; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__216); __Pyx_GIVEREF(__pyx_tuple__216); __pyx_codeobj__217 = (PyObject*)__Pyx_PyCode_New(3, 0, 13, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__216, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_yoh_deb_gits_pkg_exppsy_pa, __pyx_n_s_tz_convert_single, 1738, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__217)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1738; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/tslib.pyx":1788 * utc_offset_cache = {} * * def _get_transitions(tz): # <<<<<<<<<<<<<< * """ * Get UTC times of DST transitions */ __pyx_tuple__218 = PyTuple_Pack(2, __pyx_n_s_tz, __pyx_n_s_arr); if (unlikely(!__pyx_tuple__218)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1788; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__218); __Pyx_GIVEREF(__pyx_tuple__218); __pyx_codeobj__219 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__218, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_yoh_deb_gits_pkg_exppsy_pa, __pyx_n_s_get_transitions, 1788, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__219)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1788; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/tslib.pyx":1812 * return trans_cache[tz] * * def _get_deltas(tz): # <<<<<<<<<<<<<< * """ * Get UTC offsets in microseconds corresponding to DST transitions */ __pyx_tuple__220 = PyTuple_Pack(2, __pyx_n_s_tz, __pyx_n_s_num); if (unlikely(!__pyx_tuple__220)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1812; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__220); __Pyx_GIVEREF(__pyx_tuple__220); __pyx_codeobj__221 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__220, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_yoh_deb_gits_pkg_exppsy_pa, __pyx_n_s_get_deltas, 1812, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__221)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1812; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/tslib.pyx":1837 * 10**6) * * def tot_seconds(td): # <<<<<<<<<<<<<< * return total_seconds(td) * */ __pyx_tuple__222 = PyTuple_Pack(1, __pyx_n_s_td); if (unlikely(!__pyx_tuple__222)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1837; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__222); __Pyx_GIVEREF(__pyx_tuple__222); __pyx_codeobj__223 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__222, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_yoh_deb_gits_pkg_exppsy_pa, __pyx_n_s_tot_seconds, 1837, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__223)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1837; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/tslib.pyx":1856 * @cython.boundscheck(False) * @cython.wraparound(False) * def tz_localize_to_utc(ndarray[int64_t] vals, object tz, bint infer_dst=False): # <<<<<<<<<<<<<< * """ * Localize tzinfo-naive DateRange to given time zone (using pytz). If */ __pyx_tuple__224 = PyTuple_Pack(32, __pyx_n_s_vals, __pyx_n_s_tz, __pyx_n_s_infer_dst, __pyx_n_s_trans, __pyx_n_s_deltas, __pyx_n_s_idx_shifted, __pyx_n_s_i, __pyx_n_s_idx, __pyx_n_s_pos, __pyx_n_s_ntrans, __pyx_n_s_n, __pyx_n_s_tdata, __pyx_n_s_v, __pyx_n_s_left, __pyx_n_s_right, __pyx_n_s_result, __pyx_n_s_result_a, __pyx_n_s_result_b, __pyx_n_s_dst_hours, __pyx_n_s_dts, __pyx_n_s_dt, __pyx_n_s_delta, __pyx_n_s_both_nat, __pyx_n_s_both_eq, __pyx_n_s_trans_idx, __pyx_n_s_stamp, __pyx_n_s_one_diff, __pyx_n_s_trans_grp, __pyx_n_s_grp, __pyx_n_s_switch_idx, __pyx_n_s_a_idx, __pyx_n_s_b_idx); if (unlikely(!__pyx_tuple__224)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1856; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__224); __Pyx_GIVEREF(__pyx_tuple__224); __pyx_codeobj__225 = (PyObject*)__Pyx_PyCode_New(3, 0, 32, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__224, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_yoh_deb_gits_pkg_exppsy_pa, __pyx_n_s_tz_localize_to_utc, 1856, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__225)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1856; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/tslib.pyx":2028 * #---------------------------------------------------------------------- * * def build_field_sarray(ndarray[int64_t] dtindex): # <<<<<<<<<<<<<< * ''' * Datetime as int64 representation to a structured array of fields */ __pyx_tuple__226 = PyTuple_Pack(14, __pyx_n_s_dtindex, __pyx_n_s_i, __pyx_n_s_count, __pyx_n_s_isleap, __pyx_n_s_dts, __pyx_n_s_years, __pyx_n_s_months, __pyx_n_s_days, __pyx_n_s_hours, __pyx_n_s_minutes, __pyx_n_s_seconds, __pyx_n_s_mus, __pyx_n_s_sa_dtype, __pyx_n_s_out); if (unlikely(!__pyx_tuple__226)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2028; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__226); __Pyx_GIVEREF(__pyx_tuple__226); __pyx_codeobj__227 = (PyObject*)__Pyx_PyCode_New(1, 0, 14, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__226, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_yoh_deb_gits_pkg_exppsy_pa, __pyx_n_s_build_field_sarray, 2028, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__227)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2028; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/tslib.pyx":2070 * return out * * def get_time_micros(ndarray[int64_t] dtindex): # <<<<<<<<<<<<<< * ''' * Datetime as int64 representation to a structured array of fields */ __pyx_tuple__228 = PyTuple_Pack(5, __pyx_n_s_dtindex, __pyx_n_s_i, __pyx_n_s_n, __pyx_n_s_dts, __pyx_n_s_micros); if (unlikely(!__pyx_tuple__228)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2070; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__228); __Pyx_GIVEREF(__pyx_tuple__228); __pyx_codeobj__229 = (PyObject*)__Pyx_PyCode_New(1, 0, 5, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__228, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_yoh_deb_gits_pkg_exppsy_pa, __pyx_n_s_get_time_micros, 2070, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__229)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2070; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/tslib.pyx":2089 * * @cython.wraparound(False) * def get_date_field(ndarray[int64_t] dtindex, object field): # <<<<<<<<<<<<<< * ''' * Given a int64-based datetime index, extract the year, month, etc., */ __pyx_tuple__230 = PyTuple_Pack(14, __pyx_n_s_dtindex, __pyx_n_s_field, __pyx_n_s_ts, __pyx_n_s_i, __pyx_n_s_count, __pyx_n_s_out, __pyx_n_s_month_offset, __pyx_n_s_isleap, __pyx_n_s_isleap_prev, __pyx_n_s_dts, __pyx_n_s_mo_off, __pyx_n_s_doy, __pyx_n_s_dow, __pyx_n_s_woy); if (unlikely(!__pyx_tuple__230)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2089; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__230); __Pyx_GIVEREF(__pyx_tuple__230); __pyx_codeobj__231 = (PyObject*)__Pyx_PyCode_New(2, 0, 14, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__230, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_yoh_deb_gits_pkg_exppsy_pa, __pyx_n_s_get_date_field, 2089, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__231)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2089; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/tslib.pyx":2239 * * * def date_normalize(ndarray[int64_t] stamps, tz=None): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = len(stamps) */ __pyx_tuple__232 = PyTuple_Pack(7, __pyx_n_s_stamps, __pyx_n_s_tz, __pyx_n_s_i, __pyx_n_s_n, __pyx_n_s_dts, __pyx_n_s_tso, __pyx_n_s_result); if (unlikely(!__pyx_tuple__232)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2239; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__232); __Pyx_GIVEREF(__pyx_tuple__232); __pyx_codeobj__233 = (PyObject*)__Pyx_PyCode_New(2, 0, 7, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__232, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_yoh_deb_gits_pkg_exppsy_pa, __pyx_n_s_date_normalize, 2239, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__233)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2239; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/tslib.pyx":2334 * * * def dates_normalized(ndarray[int64_t] stamps, tz=None): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = len(stamps) */ __pyx_tuple__234 = PyTuple_Pack(10, __pyx_n_s_stamps, __pyx_n_s_tz, __pyx_n_s_i, __pyx_n_s_n, __pyx_n_s_dts, __pyx_n_s_dt, __pyx_n_s_trans, __pyx_n_s_deltas, __pyx_n_s_pos, __pyx_n_s_inf); if (unlikely(!__pyx_tuple__234)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2334; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__234); __Pyx_GIVEREF(__pyx_tuple__234); __pyx_codeobj__235 = (PyObject*)__Pyx_PyCode_New(2, 0, 10, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__234, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_yoh_deb_gits_pkg_exppsy_pa, __pyx_n_s_dates_normalized, 2334, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__235)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2334; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/tslib.pyx":2372 * #---------------------------------------------------------------------- * * def isleapyear(int64_t year): # <<<<<<<<<<<<<< * return is_leapyear(year) * */ __pyx_tuple__236 = PyTuple_Pack(2, __pyx_n_s_year, __pyx_n_s_year); if (unlikely(!__pyx_tuple__236)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2372; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__236); __Pyx_GIVEREF(__pyx_tuple__236); __pyx_codeobj__237 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__236, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_yoh_deb_gits_pkg_exppsy_pa, __pyx_n_s_isleapyear, 2372, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__237)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2372; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/tslib.pyx":2375 * return is_leapyear(year) * * def monthrange(int64_t year, int64_t month): # <<<<<<<<<<<<<< * cdef: * int64_t days */ __pyx_tuple__238 = PyTuple_Pack(4, __pyx_n_s_year, __pyx_n_s_month, __pyx_n_s_days, __pyx_n_s_day_of_week); if (unlikely(!__pyx_tuple__238)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2375; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__238); __Pyx_GIVEREF(__pyx_tuple__238); __pyx_codeobj__239 = (PyObject*)__Pyx_PyCode_New(2, 0, 4, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__238, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_yoh_deb_gits_pkg_exppsy_pa, __pyx_n_s_monthrange, 2375, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__239)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2375; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/tslib.pyx":2554 * return period_ord_w_mult * mult + 1; * * def dt64arr_to_periodarr(ndarray[int64_t] dtarr, int freq, tz=None): # <<<<<<<<<<<<<< * """ * Convert array of datetime64 values (passed in as 'i8' dtype) to a set of */ __pyx_tuple__240 = PyTuple_Pack(7, __pyx_n_s_dtarr, __pyx_n_s_freq, __pyx_n_s_tz, __pyx_n_s_out, __pyx_n_s_i, __pyx_n_s_l, __pyx_n_s_dts); if (unlikely(!__pyx_tuple__240)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2554; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__240); __Pyx_GIVEREF(__pyx_tuple__240); __pyx_codeobj__241 = (PyObject*)__Pyx_PyCode_New(3, 0, 7, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__240, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_yoh_deb_gits_pkg_exppsy_pa, __pyx_n_s_dt64arr_to_periodarr, 2554, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__241)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2554; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/tslib.pyx":2577 * return out * * def periodarr_to_dt64arr(ndarray[int64_t] periodarr, int freq): # <<<<<<<<<<<<<< * """ * Convert array to datetime64 values from a set of ordinals corresponding to */ __pyx_tuple__242 = PyTuple_Pack(5, __pyx_n_s_periodarr, __pyx_n_s_freq, __pyx_n_s_out, __pyx_n_s_i, __pyx_n_s_l); if (unlikely(!__pyx_tuple__242)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2577; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__242); __Pyx_GIVEREF(__pyx_tuple__242); __pyx_codeobj__243 = (PyObject*)__Pyx_PyCode_New(2, 0, 5, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__242, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_yoh_deb_gits_pkg_exppsy_pa, __pyx_n_s_periodarr_to_dt64arr, 2577, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__243)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2577; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/tslib.pyx":2617 * return retval * * def period_asfreq_arr(ndarray[int64_t] arr, int freq1, int freq2, bint end): # <<<<<<<<<<<<<< * """ * Convert int64-array of period ordinals from one frequency to another, and */ __pyx_tuple__244 = PyTuple_Pack(12, __pyx_n_s_arr, __pyx_n_s_freq1, __pyx_n_s_freq2, __pyx_n_s_end, __pyx_n_s_result, __pyx_n_s_i, __pyx_n_s_n, __pyx_n_s_func, __pyx_n_s_finfo, __pyx_n_s_val, __pyx_n_s_ordinal, __pyx_n_s_relation); if (unlikely(!__pyx_tuple__244)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2617; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__244); __Pyx_GIVEREF(__pyx_tuple__244); __pyx_codeobj__245 = (PyObject*)__Pyx_PyCode_New(4, 0, 12, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__244, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_yoh_deb_gits_pkg_exppsy_pa, __pyx_n_s_period_asfreq_arr, 2617, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__245)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2617; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/tslib.pyx":2649 * return result * * def period_ordinal(int y, int m, int d, int h, int min, int s, int us, int ps, int freq): # <<<<<<<<<<<<<< * cdef: * int64_t ordinal */ __pyx_tuple__246 = PyTuple_Pack(10, __pyx_n_s_y, __pyx_n_s_m, __pyx_n_s_d, __pyx_n_s_h, __pyx_n_s_min, __pyx_n_s_s_2, __pyx_n_s_us, __pyx_n_s_ps, __pyx_n_s_freq, __pyx_n_s_ordinal); if (unlikely(!__pyx_tuple__246)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2649; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__246); __Pyx_GIVEREF(__pyx_tuple__246); __pyx_codeobj__247 = (PyObject*)__Pyx_PyCode_New(9, 0, 10, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__246, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_yoh_deb_gits_pkg_exppsy_pa, __pyx_n_s_period_ordinal, 2649, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__247)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2649; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/tslib.pyx":2676 * return pandas_datetimestruct_to_datetime(PANDAS_FR_ns, &dts) * * def period_format(int64_t value, int freq, object fmt=None): # <<<<<<<<<<<<<< * cdef: * int freq_group */ __pyx_tuple__248 = PyTuple_Pack(6, __pyx_n_s_value, __pyx_n_s_freq, __pyx_n_s_fmt, __pyx_n_s_freq_group, __pyx_n_s_left, __pyx_n_s_right); if (unlikely(!__pyx_tuple__248)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2676; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__248); __Pyx_GIVEREF(__pyx_tuple__248); __pyx_codeobj__249 = (PyObject*)__Pyx_PyCode_New(3, 0, 6, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__248, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_yoh_deb_gits_pkg_exppsy_pa, __pyx_n_s_period_format, 2676, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__249)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2676; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/tslib.pyx":2714 * * * cdef list extra_fmts = [(b"%q", b"^`AB`^"), # <<<<<<<<<<<<<< * (b"%f", b"^`CD`^"), * (b"%F", b"^`EF`^"), */ __pyx_tuple__250 = PyTuple_Pack(2, __pyx_kp_b_q_2, __pyx_kp_b_AB); if (unlikely(!__pyx_tuple__250)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2714; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__250); __Pyx_GIVEREF(__pyx_tuple__250); /* "pandas/tslib.pyx":2715 * * cdef list extra_fmts = [(b"%q", b"^`AB`^"), * (b"%f", b"^`CD`^"), # <<<<<<<<<<<<<< * (b"%F", b"^`EF`^"), * (b"%l", b"^`GH`^"), */ __pyx_tuple__251 = PyTuple_Pack(2, __pyx_kp_b_f_2, __pyx_kp_b_CD); if (unlikely(!__pyx_tuple__251)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2715; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__251); __Pyx_GIVEREF(__pyx_tuple__251); /* "pandas/tslib.pyx":2716 * cdef list extra_fmts = [(b"%q", b"^`AB`^"), * (b"%f", b"^`CD`^"), * (b"%F", b"^`EF`^"), # <<<<<<<<<<<<<< * (b"%l", b"^`GH`^"), * (b"%u", b"^`IJ`^"), */ __pyx_tuple__252 = PyTuple_Pack(2, __pyx_kp_b_F, __pyx_kp_b_EF); if (unlikely(!__pyx_tuple__252)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2716; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__252); __Pyx_GIVEREF(__pyx_tuple__252); /* "pandas/tslib.pyx":2717 * (b"%f", b"^`CD`^"), * (b"%F", b"^`EF`^"), * (b"%l", b"^`GH`^"), # <<<<<<<<<<<<<< * (b"%u", b"^`IJ`^"), * (b"%n", b"^`KL`^")] */ __pyx_tuple__253 = PyTuple_Pack(2, __pyx_kp_b_l_2, __pyx_kp_b_GH); if (unlikely(!__pyx_tuple__253)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2717; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__253); __Pyx_GIVEREF(__pyx_tuple__253); /* "pandas/tslib.pyx":2718 * (b"%F", b"^`EF`^"), * (b"%l", b"^`GH`^"), * (b"%u", b"^`IJ`^"), # <<<<<<<<<<<<<< * (b"%n", b"^`KL`^")] * */ __pyx_tuple__254 = PyTuple_Pack(2, __pyx_kp_b_u_2, __pyx_kp_b_IJ); if (unlikely(!__pyx_tuple__254)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2718; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__254); __Pyx_GIVEREF(__pyx_tuple__254); /* "pandas/tslib.pyx":2719 * (b"%l", b"^`GH`^"), * (b"%u", b"^`IJ`^"), * (b"%n", b"^`KL`^")] # <<<<<<<<<<<<<< * * cdef list str_extra_fmts = ["^`AB`^", "^`CD`^", "^`EF`^", "^`GH`^", "^`IJ`^", "^`KL`^"] */ __pyx_tuple__255 = PyTuple_Pack(2, __pyx_kp_b_n_2, __pyx_kp_b_KL); if (unlikely(!__pyx_tuple__255)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2719; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__255); __Pyx_GIVEREF(__pyx_tuple__255); /* "pandas/tslib.pyx":2779 * ctypedef int (*accessor)(int64_t ordinal, int freq) except INT32_MIN * * def get_period_field(int code, int64_t value, int freq): # <<<<<<<<<<<<<< * cdef accessor f = _get_accessor_func(code) * if f is NULL: */ __pyx_tuple__256 = PyTuple_Pack(4, __pyx_n_s_code, __pyx_n_s_value, __pyx_n_s_freq, __pyx_n_s_f); if (unlikely(!__pyx_tuple__256)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2779; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__256); __Pyx_GIVEREF(__pyx_tuple__256); __pyx_codeobj__257 = (PyObject*)__Pyx_PyCode_New(3, 0, 4, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__256, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_yoh_deb_gits_pkg_exppsy_pa, __pyx_n_s_get_period_field, 2779, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__257)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2779; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/tslib.pyx":2785 * return f(value, freq) * * def get_period_field_arr(int code, ndarray[int64_t] arr, int freq): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, sz */ __pyx_tuple__258 = PyTuple_Pack(7, __pyx_n_s_code, __pyx_n_s_arr, __pyx_n_s_freq, __pyx_n_s_i, __pyx_n_s_sz, __pyx_n_s_out, __pyx_n_s_f); if (unlikely(!__pyx_tuple__258)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2785; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__258); __Pyx_GIVEREF(__pyx_tuple__258); __pyx_codeobj__259 = (PyObject*)__Pyx_PyCode_New(3, 0, 7, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__258, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_yoh_deb_gits_pkg_exppsy_pa, __pyx_n_s_get_period_field_arr, 2785, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__259)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2785; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/tslib.pyx":2831 * * * def extract_ordinals(ndarray[object] values, freq): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = len(values) */ __pyx_tuple__260 = PyTuple_Pack(6, __pyx_n_s_values, __pyx_n_s_freq, __pyx_n_s_i, __pyx_n_s_n, __pyx_n_s_ordinals, __pyx_n_s_p); if (unlikely(!__pyx_tuple__260)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2831; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__260); __Pyx_GIVEREF(__pyx_tuple__260); __pyx_codeobj__261 = (PyObject*)__Pyx_PyCode_New(2, 0, 6, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__260, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_yoh_deb_gits_pkg_exppsy_pa, __pyx_n_s_extract_ordinals, 2831, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__261)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2831; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/tslib.pyx":2979 * __all__ = [] * * def _getlang(): # <<<<<<<<<<<<<< * # Figure out what the current language is set to. * return locale.getlocale(locale.LC_TIME) */ __pyx_codeobj__262 = (PyObject*)__Pyx_PyCode_New(0, 0, 0, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_yoh_deb_gits_pkg_exppsy_pa, __pyx_n_s_getlang, 2979, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__262)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2979; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/tslib.pyx":3002 * """ * * def __init__(self): # <<<<<<<<<<<<<< * """Set all attributes. * */ __pyx_tuple__263 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__263)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3002; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__263); __Pyx_GIVEREF(__pyx_tuple__263); __pyx_codeobj__264 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__263, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_yoh_deb_gits_pkg_exppsy_pa, __pyx_n_s_init, 3002, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__264)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3002; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/tslib.pyx":3031 * raise ValueError("locale changed during initialization") * * def __pad(self, seq, front): # <<<<<<<<<<<<<< * # Add '' to seq to either the front (is True), else the back. * seq = list(seq) */ __pyx_tuple__265 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_seq, __pyx_n_s_front); if (unlikely(!__pyx_tuple__265)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3031; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__265); __Pyx_GIVEREF(__pyx_tuple__265); __pyx_codeobj__266 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__265, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_yoh_deb_gits_pkg_exppsy_pa, __pyx_n_s_pad, 3031, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__266)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3031; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/tslib.pyx":3040 * return seq * * def __calc_weekday(self): # <<<<<<<<<<<<<< * # Set self.a_weekday and self.f_weekday using the calendar * # module. */ __pyx_tuple__267 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_a_weekday, __pyx_n_s_f_weekday, __pyx_n_s_i); if (unlikely(!__pyx_tuple__267)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3040; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__267); __Pyx_GIVEREF(__pyx_tuple__267); __pyx_codeobj__268 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__267, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_yoh_deb_gits_pkg_exppsy_pa, __pyx_n_s_calc_weekday, 3040, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__268)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3040; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/tslib.pyx":3048 * self.f_weekday = f_weekday * * def __calc_month(self): # <<<<<<<<<<<<<< * # Set self.f_month and self.a_month using the calendar module. * a_month = [calendar.month_abbr[i].lower() for i in range(13)] */ __pyx_tuple__269 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_a_month, __pyx_n_s_f_month, __pyx_n_s_i); if (unlikely(!__pyx_tuple__269)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3048; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__269); __Pyx_GIVEREF(__pyx_tuple__269); __pyx_codeobj__270 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__269, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_yoh_deb_gits_pkg_exppsy_pa, __pyx_n_s_calc_month, 3048, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__270)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3048; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/tslib.pyx":3055 * self.f_month = f_month * * def __calc_am_pm(self): # <<<<<<<<<<<<<< * # Set self.am_pm by using time.strftime(). * */ __pyx_tuple__271 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_am_pm, __pyx_n_s_hour, __pyx_n_s_time_tuple); if (unlikely(!__pyx_tuple__271)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3055; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__271); __Pyx_GIVEREF(__pyx_tuple__271); __pyx_codeobj__272 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__271, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_yoh_deb_gits_pkg_exppsy_pa, __pyx_n_s_calc_am_pm, 3055, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__272)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3055; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/tslib.pyx":3067 * self.am_pm = am_pm * * def __calc_date_time(self): # <<<<<<<<<<<<<< * # Set self.date_time, self.date, & self.time by using * # time.strftime(). */ __pyx_tuple__273 = PyTuple_Pack(12, __pyx_n_s_self, __pyx_n_s_time_tuple, __pyx_n_s_date_time, __pyx_n_s_replacement_pairs, __pyx_n_s_offset, __pyx_n_s_directive, __pyx_n_s_current_format, __pyx_n_s_old, __pyx_n_s_new_2, __pyx_n_s_U_W, __pyx_n_s_tz_values, __pyx_n_s_tz); if (unlikely(!__pyx_tuple__273)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3067; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__273); __Pyx_GIVEREF(__pyx_tuple__273); __pyx_codeobj__274 = (PyObject*)__Pyx_PyCode_New(1, 0, 12, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__273, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_yoh_deb_gits_pkg_exppsy_pa, __pyx_n_s_calc_date_time, 3067, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__274)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3067; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/tslib.pyx":3112 * self.LC_time = date_time[2] * * def __calc_timezone(self): # <<<<<<<<<<<<<< * # Set self.timezone by using time.tzname. * # Do not worry about possibility of time.tzname[0] == timetzname[1] */ __pyx_tuple__275 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_no_saving, __pyx_n_s_has_saving); if (unlikely(!__pyx_tuple__275)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3112; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__275); __Pyx_GIVEREF(__pyx_tuple__275); __pyx_codeobj__276 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__275, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_yoh_deb_gits_pkg_exppsy_pa, __pyx_n_s_calc_timezone, 3112, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__276)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3112; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/tslib.pyx":3131 * """Handle conversion from format directives to regexes.""" * * def __init__(self, locale_time=None): # <<<<<<<<<<<<<< * """Create keys/values. * */ __pyx_tuple__277 = PyTuple_Pack(5, __pyx_n_s_self, __pyx_n_s_locale_time, __pyx_n_s_base, __pyx_n_s_genexpr, __pyx_n_s_genexpr); if (unlikely(!__pyx_tuple__277)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3131; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__277); __Pyx_GIVEREF(__pyx_tuple__277); __pyx_codeobj__278 = (PyObject*)__Pyx_PyCode_New(2, 0, 5, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__277, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_yoh_deb_gits_pkg_exppsy_pa, __pyx_n_s_init, 3131, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__278)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3131; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_tuple__279 = PyTuple_Pack(1, ((PyObject *)Py_None)); if (unlikely(!__pyx_tuple__279)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3131; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__279); __Pyx_GIVEREF(__pyx_tuple__279); /* "pandas/tslib.pyx":3173 * base.__setitem__('X', self.pattern(self.locale_time.LC_time)) * * def __seqToRE(self, to_convert, directive): # <<<<<<<<<<<<<< * """Convert a list to a regex string for matching a directive. * */ __pyx_tuple__280 = PyTuple_Pack(7, __pyx_n_s_self, __pyx_n_s_to_convert, __pyx_n_s_directive, __pyx_n_s_value, __pyx_n_s_regex, __pyx_n_s_genexpr, __pyx_n_s_genexpr); if (unlikely(!__pyx_tuple__280)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3173; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__280); __Pyx_GIVEREF(__pyx_tuple__280); __pyx_codeobj__281 = (PyObject*)__Pyx_PyCode_New(3, 0, 7, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__280, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_yoh_deb_gits_pkg_exppsy_pa, __pyx_n_s_seqToRE, 3173, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__281)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3173; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/tslib.pyx":3192 * return '%s)' % regex * * def pattern(self, format): # <<<<<<<<<<<<<< * """Return regex pattern for the format string. * */ __pyx_tuple__282 = PyTuple_Pack(6, __pyx_n_s_self, __pyx_n_s_format, __pyx_n_s_processed_format, __pyx_n_s_regex_chars, __pyx_n_s_whitespace_replacement, __pyx_n_s_directive_index); if (unlikely(!__pyx_tuple__282)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3192; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__282); __Pyx_GIVEREF(__pyx_tuple__282); __pyx_codeobj__283 = (PyObject*)__Pyx_PyCode_New(2, 0, 6, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__282, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_yoh_deb_gits_pkg_exppsy_pa, __pyx_n_s_pattern, 3192, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__283)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3192; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/tslib.pyx":3215 * return "%s%s" % (processed_format, format) * * def compile(self, format): # <<<<<<<<<<<<<< * """Return a compiled re object for the format string.""" * return re_compile(self.pattern(format), IGNORECASE) */ __pyx_tuple__284 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_format); if (unlikely(!__pyx_tuple__284)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3215; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__284); __Pyx_GIVEREF(__pyx_tuple__284); __pyx_codeobj__285 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__284, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_yoh_deb_gits_pkg_exppsy_pa, __pyx_n_s_compile, 3215, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__285)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3215; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/tslib.pyx":3226 * _regex_cache = {} * * def _calc_julian_from_U_or_W(year, week_of_year, day_of_week, week_starts_Mon): # <<<<<<<<<<<<<< * """Calculate the Julian day based on the year, week of the year, and day of * the week, with week_start_day representing whether the week of the year */ __pyx_tuple__286 = PyTuple_Pack(7, __pyx_n_s_year, __pyx_n_s_week_of_year, __pyx_n_s_day_of_week, __pyx_n_s_week_starts_Mon, __pyx_n_s_first_weekday, __pyx_n_s_week_0_length, __pyx_n_s_days_to_week); if (unlikely(!__pyx_tuple__286)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3226; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__286); __Pyx_GIVEREF(__pyx_tuple__286); __pyx_codeobj__287 = (PyObject*)__Pyx_PyCode_New(4, 0, 7, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__286, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_yoh_deb_gits_pkg_exppsy_pa, __pyx_n_s_calc_julian_from_U_or_W, 3226, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__287)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3226; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __pyx_float_1e6 = PyFloat_FromDouble(1e6); if (unlikely(!__pyx_float_1e6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_float_1e9 = PyFloat_FromDouble(1e9); if (unlikely(!__pyx_float_1e9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_float_1000_0 = PyFloat_FromDouble(1000.0); if (unlikely(!__pyx_float_1000_0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_int_0 = PyInt_FromLong(0); if (unlikely(!__pyx_int_0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_int_1 = PyInt_FromLong(1); if (unlikely(!__pyx_int_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_int_2 = PyInt_FromLong(2); if (unlikely(!__pyx_int_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_int_3 = PyInt_FromLong(3); if (unlikely(!__pyx_int_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_int_4 = PyInt_FromLong(4); if (unlikely(!__pyx_int_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_int_5 = PyInt_FromLong(5); if (unlikely(!__pyx_int_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_int_6 = PyInt_FromLong(6); if (unlikely(!__pyx_int_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_int_7 = PyInt_FromLong(7); if (unlikely(!__pyx_int_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_int_8 = PyInt_FromLong(8); if (unlikely(!__pyx_int_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_int_9 = PyInt_FromLong(9); if (unlikely(!__pyx_int_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_int_10 = PyInt_FromLong(10); if (unlikely(!__pyx_int_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_int_11 = PyInt_FromLong(11); if (unlikely(!__pyx_int_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_int_12 = PyInt_FromLong(12); if (unlikely(!__pyx_int_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_int_13 = PyInt_FromLong(13); if (unlikely(!__pyx_int_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_int_14 = PyInt_FromLong(14); if (unlikely(!__pyx_int_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_int_15 = PyInt_FromLong(15); if (unlikely(!__pyx_int_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_int_16 = PyInt_FromLong(16); if (unlikely(!__pyx_int_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_int_17 = PyInt_FromLong(17); if (unlikely(!__pyx_int_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_int_18 = PyInt_FromLong(18); if (unlikely(!__pyx_int_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_int_22 = PyInt_FromLong(22); if (unlikely(!__pyx_int_22)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_int_24 = PyInt_FromLong(24); if (unlikely(!__pyx_int_24)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_int_31 = PyInt_FromLong(31); if (unlikely(!__pyx_int_31)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_int_44 = PyInt_FromLong(44); if (unlikely(!__pyx_int_44)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_int_55 = PyInt_FromLong(55); if (unlikely(!__pyx_int_55)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_int_59 = PyInt_FromLong(59); if (unlikely(!__pyx_int_59)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_int_60 = PyInt_FromLong(60); if (unlikely(!__pyx_int_60)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_int_76 = PyInt_FromLong(76); if (unlikely(!__pyx_int_76)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_int_90 = PyInt_FromLong(90); if (unlikely(!__pyx_int_90)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_int_91 = PyInt_FromLong(91); if (unlikely(!__pyx_int_91)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_int_120 = PyInt_FromLong(120); if (unlikely(!__pyx_int_120)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_int_121 = PyInt_FromLong(121); if (unlikely(!__pyx_int_121)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_int_151 = PyInt_FromLong(151); if (unlikely(!__pyx_int_151)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_int_152 = PyInt_FromLong(152); if (unlikely(!__pyx_int_152)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_int_181 = PyInt_FromLong(181); if (unlikely(!__pyx_int_181)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_int_182 = PyInt_FromLong(182); if (unlikely(!__pyx_int_182)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_int_212 = PyInt_FromLong(212); if (unlikely(!__pyx_int_212)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_int_213 = PyInt_FromLong(213); if (unlikely(!__pyx_int_213)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_int_243 = PyInt_FromLong(243); if (unlikely(!__pyx_int_243)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_int_244 = PyInt_FromLong(244); if (unlikely(!__pyx_int_244)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_int_273 = PyInt_FromLong(273); if (unlikely(!__pyx_int_273)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_int_274 = PyInt_FromLong(274); if (unlikely(!__pyx_int_274)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_int_304 = PyInt_FromLong(304); if (unlikely(!__pyx_int_304)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_int_305 = PyInt_FromLong(305); if (unlikely(!__pyx_int_305)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_int_334 = PyInt_FromLong(334); if (unlikely(!__pyx_int_334)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_int_335 = PyInt_FromLong(335); if (unlikely(!__pyx_int_335)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_int_365 = PyInt_FromLong(365); if (unlikely(!__pyx_int_365)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_int_366 = PyInt_FromLong(366); if (unlikely(!__pyx_int_366)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_int_1000 = PyInt_FromLong(1000); if (unlikely(!__pyx_int_1000)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_int_1999 = PyInt_FromLong(1999); if (unlikely(!__pyx_int_1999)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_int_2000 = PyInt_FromLong(2000); if (unlikely(!__pyx_int_2000)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_int_3600 = PyInt_FromLong(3600); if (unlikely(!__pyx_int_3600)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_int_6000 = PyInt_FromLong(6000); if (unlikely(!__pyx_int_6000)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_int_86400 = PyInt_FromLong(86400L); if (unlikely(!__pyx_int_86400)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_int_1000000 = PyInt_FromLong(1000000L); if (unlikely(!__pyx_int_1000000)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_int_1000000000 = PyInt_FromLong(1000000000L); if (unlikely(!__pyx_int_1000000000)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_int_neg_1 = PyInt_FromLong(-1); if (unlikely(!__pyx_int_neg_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_int_neg_6 = PyInt_FromLong(-6); if (unlikely(!__pyx_int_neg_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_int_1L = PyLong_FromString((char *)"1", 0, 0); if (unlikely(!__pyx_int_1L)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_int_1000L = PyLong_FromString((char *)"1000", 0, 0); if (unlikely(!__pyx_int_1000L)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_int_1000000L = PyLong_FromString((char *)"1000000", 0, 0); if (unlikely(!__pyx_int_1000000L)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_int_1000000000L = PyLong_FromString((char *)"1000000000", 0, 0); if (unlikely(!__pyx_int_1000000000L)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_int_86400000000000L = PyLong_FromString((char *)"86400000000000", 0, 0); if (unlikely(!__pyx_int_86400000000000L)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} return 0; __pyx_L1_error:; return -1; } #if PY_MAJOR_VERSION < 3 PyMODINIT_FUNC inittslib(void); /*proto*/ PyMODINIT_FUNC inittslib(void) #else PyMODINIT_FUNC PyInit_tslib(void); /*proto*/ PyMODINIT_FUNC PyInit_tslib(void) #endif { 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; int __pyx_t_8; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; Py_ssize_t __pyx_t_11; PyObject *(*__pyx_t_12)(PyObject *); int __pyx_t_13; PyObject *__pyx_t_14 = NULL; PyObject *__pyx_t_15 = NULL; PyObject *__pyx_t_16 = NULL; PyObject *__pyx_t_17 = NULL; PyObject *__pyx_t_18 = NULL; PyObject *__pyx_t_19 = NULL; PyObject *__pyx_t_20 = NULL; PyObject *__pyx_t_21 = NULL; PyObject *__pyx_t_22 = NULL; PyObject *__pyx_t_23 = NULL; PyObject *__pyx_t_24 = NULL; PyObject *__pyx_t_25 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannyDeclarations #if CYTHON_REFNANNY __Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny"); if (!__Pyx_RefNanny) { PyErr_Clear(); __Pyx_RefNanny = __Pyx_RefNannyImportAPI("Cython.Runtime.refnanny"); if (!__Pyx_RefNanny) Py_FatalError("failed to import 'refnanny' module"); } #endif __Pyx_RefNannySetupContext("PyMODINIT_FUNC PyInit_tslib(void)", 0); if ( __Pyx_check_binary_version() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_empty_tuple)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_bytes)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #ifdef __Pyx_CyFunction_USED if (__Pyx_CyFunction_init() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif #ifdef __Pyx_FusedFunction_USED if (__pyx_FusedFunction_init() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif #ifdef __Pyx_Generator_USED if (__pyx_Generator_init() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif /*--- Library function declarations ---*/ /*--- Threads initialization code ---*/ #if defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS #ifdef WITH_THREAD /* Python build with threading support? */ PyEval_InitThreads(); #endif #endif /*--- Module creation code ---*/ #if PY_MAJOR_VERSION < 3 __pyx_m = Py_InitModule4(__Pyx_NAMESTR("tslib"), __pyx_methods, 0, 0, PYTHON_API_VERSION); Py_XINCREF(__pyx_m); #else __pyx_m = PyModule_Create(&__pyx_moduledef); #endif if (unlikely(!__pyx_m)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_d)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} Py_INCREF(__pyx_d); __pyx_b = PyImport_AddModule(__Pyx_NAMESTR(__Pyx_BUILTIN_MODULE_NAME)); if (unlikely(!__pyx_b)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #if CYTHON_COMPILING_IN_PYPY Py_INCREF(__pyx_b); #endif if (__Pyx_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; /*--- Initialize various global constants etc. ---*/ if (unlikely(__Pyx_InitGlobals() < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif if (__pyx_module_is_main_pandas__tslib) { if (__Pyx_SetAttrString(__pyx_m, "__name__", __pyx_n_s_main) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; } #if PY_MAJOR_VERSION >= 3 { PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (!PyDict_GetItemString(modules, "pandas.tslib")) { if (unlikely(PyDict_SetItemString(modules, "pandas.tslib", __pyx_m) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } } #endif /*--- Builtin init code ---*/ if (unlikely(__Pyx_InitCachedBuiltins() < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /*--- Constants init code ---*/ if (unlikely(__Pyx_InitCachedConstants() < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /*--- Global init code ---*/ __pyx_v_6pandas_5tslib__NDIM_STRING = ((PyObject*)Py_None); Py_INCREF(Py_None); __pyx_v_6pandas_5tslib_extra_fmts = ((PyObject*)Py_None); Py_INCREF(Py_None); __pyx_v_6pandas_5tslib_str_extra_fmts = ((PyObject*)Py_None); Py_INCREF(Py_None); /*--- Variable export code ---*/ /*--- Function export code ---*/ if (__Pyx_ExportFunction("convert_to_tsobject", (void (*)(void))__pyx_f_6pandas_5tslib_convert_to_tsobject, "PyObject *(PyObject *, PyObject *, PyObject *)") < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__Pyx_ExportFunction("convert_to_timedelta64", (void (*)(void))__pyx_f_6pandas_5tslib_convert_to_timedelta64, "PyObject *(PyObject *, PyObject *, PyObject *)") < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /*--- Type init code ---*/ if (PyType_Ready(&__pyx_type_6pandas_5tslib___pyx_scope_struct_3_genexpr) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3188; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_type_6pandas_5tslib___pyx_scope_struct_3_genexpr.tp_print = 0; __pyx_ptype_6pandas_5tslib___pyx_scope_struct_3_genexpr = &__pyx_type_6pandas_5tslib___pyx_scope_struct_3_genexpr; if (PyType_Ready(&__pyx_type_6pandas_5tslib__TSObject) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 741; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_type_6pandas_5tslib__TSObject.tp_print = 0; if (__Pyx_SetAttrString(__pyx_m, "_TSObject", (PyObject *)&__pyx_type_6pandas_5tslib__TSObject) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 741; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_6pandas_5tslib__TSObject = &__pyx_type_6pandas_5tslib__TSObject; if (PyType_Ready(&__pyx_type_6pandas_5tslib___pyx_scope_struct_2___seqToRE) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3173; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_type_6pandas_5tslib___pyx_scope_struct_2___seqToRE.tp_print = 0; __pyx_ptype_6pandas_5tslib___pyx_scope_struct_2___seqToRE = &__pyx_type_6pandas_5tslib___pyx_scope_struct_2___seqToRE; __pyx_ptype_8datetime_datetime = __Pyx_ImportType("datetime", "datetime", sizeof(PyDateTime_DateTime), 0); if (unlikely(!__pyx_ptype_8datetime_datetime)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_vtabptr_6pandas_5tslib__Timestamp = &__pyx_vtable_6pandas_5tslib__Timestamp; __pyx_vtable_6pandas_5tslib__Timestamp._compare_outside_nanorange = (int (*)(struct __pyx_obj_6pandas_5tslib__Timestamp *, PyDateTime_DateTime *, int))__pyx_f_6pandas_5tslib_10_Timestamp__compare_outside_nanorange; __pyx_vtable_6pandas_5tslib__Timestamp._assert_tzawareness_compat = (int (*)(struct __pyx_obj_6pandas_5tslib__Timestamp *, PyObject *))__pyx_f_6pandas_5tslib_10_Timestamp__assert_tzawareness_compat; __pyx_vtable_6pandas_5tslib__Timestamp.to_datetime = (PyDateTime_DateTime *(*)(struct __pyx_obj_6pandas_5tslib__Timestamp *, int __pyx_skip_dispatch))__pyx_f_6pandas_5tslib_10_Timestamp_to_datetime; __pyx_vtable_6pandas_5tslib__Timestamp._get_field = (PyObject *(*)(struct __pyx_obj_6pandas_5tslib__Timestamp *, PyObject *, int __pyx_skip_dispatch))__pyx_f_6pandas_5tslib_10_Timestamp__get_field; __pyx_type_6pandas_5tslib__Timestamp.tp_base = __pyx_ptype_8datetime_datetime; if (PyType_Ready(&__pyx_type_6pandas_5tslib__Timestamp) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 563; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_type_6pandas_5tslib__Timestamp.tp_print = 0; if (__Pyx_SetVtable(__pyx_type_6pandas_5tslib__Timestamp.tp_dict, __pyx_vtabptr_6pandas_5tslib__Timestamp) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 563; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__Pyx_SetAttrString(__pyx_m, "_Timestamp", (PyObject *)&__pyx_type_6pandas_5tslib__Timestamp) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 563; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_6pandas_5tslib__Timestamp = &__pyx_type_6pandas_5tslib__Timestamp; __pyx_vtabptr_6pandas_5tslib__NaT = &__pyx_vtable_6pandas_5tslib__NaT; __pyx_vtable_6pandas_5tslib__NaT.__pyx_base = *__pyx_vtabptr_6pandas_5tslib__Timestamp; __pyx_type_6pandas_5tslib__NaT.tp_base = __pyx_ptype_6pandas_5tslib__Timestamp; if (PyType_Ready(&__pyx_type_6pandas_5tslib__NaT) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 707; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_type_6pandas_5tslib__NaT.tp_print = 0; if (__Pyx_SetVtable(__pyx_type_6pandas_5tslib__NaT.tp_dict, __pyx_vtabptr_6pandas_5tslib__NaT) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 707; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__Pyx_SetAttrString(__pyx_m, "_NaT", (PyObject *)&__pyx_type_6pandas_5tslib__NaT) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 707; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_6pandas_5tslib__NaT = &__pyx_type_6pandas_5tslib__NaT; if (PyType_Ready(&__pyx_type_6pandas_5tslib___pyx_scope_struct____init__) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3131; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_type_6pandas_5tslib___pyx_scope_struct____init__.tp_print = 0; __pyx_ptype_6pandas_5tslib___pyx_scope_struct____init__ = &__pyx_type_6pandas_5tslib___pyx_scope_struct____init__; if (PyType_Ready(&__pyx_type_6pandas_5tslib___pyx_scope_struct_1_genexpr) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3164; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_type_6pandas_5tslib___pyx_scope_struct_1_genexpr.tp_print = 0; __pyx_ptype_6pandas_5tslib___pyx_scope_struct_1_genexpr = &__pyx_type_6pandas_5tslib___pyx_scope_struct_1_genexpr; /*--- Type import code ---*/ __pyx_ptype_5numpy_dtype = __Pyx_ImportType("numpy", "dtype", sizeof(PyArray_Descr), 0); if (unlikely(!__pyx_ptype_5numpy_dtype)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_5numpy_flatiter = __Pyx_ImportType("numpy", "flatiter", sizeof(PyArrayIterObject), 0); if (unlikely(!__pyx_ptype_5numpy_flatiter)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 167; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_5numpy_broadcast = __Pyx_ImportType("numpy", "broadcast", sizeof(PyArrayMultiIterObject), 0); if (unlikely(!__pyx_ptype_5numpy_broadcast)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 171; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_5numpy_ndarray = __Pyx_ImportType("numpy", "ndarray", sizeof(PyArrayObject), 0); if (unlikely(!__pyx_ptype_5numpy_ndarray)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_5numpy_ufunc = __Pyx_ImportType("numpy", "ufunc", sizeof(PyUFuncObject), 0); if (unlikely(!__pyx_ptype_5numpy_ufunc)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 865; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_7cpython_4type_type = __Pyx_ImportType(__Pyx_BUILTIN_MODULE_NAME, "type", #if CYTHON_COMPILING_IN_PYPY sizeof(PyTypeObject), #else sizeof(PyHeapTypeObject), #endif 0); if (unlikely(!__pyx_ptype_7cpython_4type_type)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 9; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_7cpython_4bool_bool = __Pyx_ImportType(__Pyx_BUILTIN_MODULE_NAME, "bool", sizeof(PyBoolObject), 0); if (unlikely(!__pyx_ptype_7cpython_4bool_bool)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 8; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_7cpython_7complex_complex = __Pyx_ImportType(__Pyx_BUILTIN_MODULE_NAME, "complex", sizeof(PyComplexObject), 0); if (unlikely(!__pyx_ptype_7cpython_7complex_complex)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 15; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_8datetime_date = __Pyx_ImportType("datetime", "date", sizeof(PyDateTime_Date), 0); if (unlikely(!__pyx_ptype_8datetime_date)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 15; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_8datetime_timedelta = __Pyx_ImportType("datetime", "timedelta", sizeof(PyDateTime_Delta), 0); if (unlikely(!__pyx_ptype_8datetime_timedelta)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 21; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /*--- Variable import code ---*/ /*--- Function import code ---*/ /*--- Execution code ---*/ /* "pandas/tslib.pyx":6 * from numpy cimport (int32_t, int64_t, import_array, ndarray, * NPY_INT64, NPY_DATETIME, NPY_TIMEDELTA) * import numpy as np # <<<<<<<<<<<<<< * * from cpython cimport ( */ __pyx_t_1 = __Pyx_Import(__pyx_n_s_numpy, 0, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 6; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_np, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 6; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pandas/tslib.pyx":35 * cimport cython * * from datetime import timedelta, datetime # <<<<<<<<<<<<<< * from datetime import time as datetime_time * from pandas.compat import parse_date */ __pyx_t_1 = PyList_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_n_s_timedelta); PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_timedelta); __Pyx_GIVEREF(__pyx_n_s_timedelta); __Pyx_INCREF(__pyx_n_s_datetime); PyList_SET_ITEM(__pyx_t_1, 1, __pyx_n_s_datetime); __Pyx_GIVEREF(__pyx_n_s_datetime); __pyx_t_2 = __Pyx_Import(__pyx_n_s_datetime, __pyx_t_1, -1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/tslib.pyx":36 * * from datetime import timedelta, datetime * from datetime import time as datetime_time # <<<<<<<<<<<<<< * from pandas.compat import parse_date * */ __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 36; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_n_s_time); PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_time); __Pyx_GIVEREF(__pyx_n_s_time); __pyx_t_1 = __Pyx_Import(__pyx_n_s_datetime, __pyx_t_2, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 36; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_time); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 36; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_datetime_time, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 36; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pandas/tslib.pyx":37 * from datetime import timedelta, datetime * from datetime import time as datetime_time * from pandas.compat import parse_date # <<<<<<<<<<<<<< * * from sys import version_info */ __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 37; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_n_s_parse_date); PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_parse_date); __Pyx_GIVEREF(__pyx_n_s_parse_date); __pyx_t_2 = __Pyx_Import(__pyx_n_s_pandas_compat, __pyx_t_1, -1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 37; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_parse_date); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 37; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_parse_date, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 37; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/tslib.pyx":39 * from pandas.compat import parse_date * * from sys import version_info # <<<<<<<<<<<<<< * * # numpy compat */ __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 39; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_n_s_version_info); PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_version_info); __Pyx_GIVEREF(__pyx_n_s_version_info); __pyx_t_1 = __Pyx_Import(__pyx_n_s_sys, __pyx_t_2, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 39; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_version_info); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 39; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_version_info, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 39; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pandas/tslib.pyx":42 * * # numpy compat * from distutils.version import LooseVersion # <<<<<<<<<<<<<< * _np_version = np.version.short_version * _np_version_under1p6 = LooseVersion(_np_version) < '1.6' */ __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 42; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_n_s_LooseVersion); PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_LooseVersion); __Pyx_GIVEREF(__pyx_n_s_LooseVersion); __pyx_t_2 = __Pyx_Import(__pyx_n_s_distutils_version, __pyx_t_1, -1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 42; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_LooseVersion); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 42; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_LooseVersion, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 42; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/tslib.pyx":43 * # numpy compat * from distutils.version import LooseVersion * _np_version = np.version.short_version # <<<<<<<<<<<<<< * _np_version_under1p6 = LooseVersion(_np_version) < '1.6' * _np_version_under1p7 = LooseVersion(_np_version) < '1.7' */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 43; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_version); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 43; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_short_version); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 43; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (PyDict_SetItem(__pyx_d, __pyx_n_s_np_version, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 43; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/tslib.pyx":44 * from distutils.version import LooseVersion * _np_version = np.version.short_version * _np_version_under1p6 = LooseVersion(_np_version) < '1.6' # <<<<<<<<<<<<<< * _np_version_under1p7 = LooseVersion(_np_version) < '1.7' * */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_LooseVersion); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 44; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_np_version); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 44; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 44; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyObject_Call(__pyx_t_2, __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 44; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyObject_RichCompare(__pyx_t_1, __pyx_kp_s_1_6, Py_LT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 44; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (PyDict_SetItem(__pyx_d, __pyx_n_s_np_version_under1p6, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 44; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/tslib.pyx":45 * _np_version = np.version.short_version * _np_version_under1p6 = LooseVersion(_np_version) < '1.6' * _np_version_under1p7 = LooseVersion(_np_version) < '1.7' # <<<<<<<<<<<<<< * * # GH3363 */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_LooseVersion); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 45; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_np_version); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 45; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 45; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyObject_Call(__pyx_t_3, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 45; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_RichCompare(__pyx_t_1, __pyx_kp_s_1_7, Py_LT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 45; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (PyDict_SetItem(__pyx_d, __pyx_n_s_np_version_under1p7, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 45; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/tslib.pyx":48 * * # GH3363 * cdef bint PY2 = version_info[0] == 2 # <<<<<<<<<<<<<< * * # initialize numpy */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_version_info); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_2, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_RichCompare(__pyx_t_1, __pyx_int_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_6pandas_5tslib_PY2 = __pyx_t_4; /* "pandas/tslib.pyx":51 * * # initialize numpy * import_array() # <<<<<<<<<<<<<< * #import_ufunc() * */ import_array(); /* "pandas/tslib.pyx":55 * * # import datetime C API * PyDateTime_IMPORT # <<<<<<<<<<<<<< * * # in numpy 1.7, will prob need the following: */ PyDateTime_IMPORT; /* "pandas/tslib.pyx":60 * # numpy_pydatetime_import * * cdef int64_t NPY_NAT = util.get_nat() # <<<<<<<<<<<<<< * * # < numpy 1.7 compat for NaT */ __pyx_v_6pandas_5tslib_NPY_NAT = get_nat(); /* "pandas/tslib.pyx":63 * * # < numpy 1.7 compat for NaT * compat_NaT = np.array([NPY_NAT]).astype('m8[ns]').item() # <<<<<<<<<<<<<< * * # numpy actual nat object */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_array); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyInt_From_npy_int64(__pyx_v_6pandas_5tslib_NPY_NAT); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_astype); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyObject_Call(__pyx_t_2, __pyx_tuple__103, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_item); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyObject_Call(__pyx_t_2, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (PyDict_SetItem(__pyx_d, __pyx_n_s_compat_NaT, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/tslib.pyx":66 * * # numpy actual nat object * np_NaT = np.datetime64('NaT',dtype='M8') # <<<<<<<<<<<<<< * * try: */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 66; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_datetime64); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 66; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 66; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dtype, __pyx_n_s_M8) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 66; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_1 = PyObject_Call(__pyx_t_2, __pyx_tuple__104, __pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 66; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (PyDict_SetItem(__pyx_d, __pyx_n_s_np_NaT, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 66; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pandas/tslib.pyx":68 * np_NaT = np.datetime64('NaT',dtype='M8') * * try: # <<<<<<<<<<<<<< * basestring * except NameError: # py3 */ { __Pyx_ExceptionSave(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7); __Pyx_XGOTREF(__pyx_t_5); __Pyx_XGOTREF(__pyx_t_6); __Pyx_XGOTREF(__pyx_t_7); /*try:*/ { /* "pandas/tslib.pyx":69 * * try: * basestring # <<<<<<<<<<<<<< * except NameError: # py3 * basestring = str */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_basestring); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L2_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; goto __pyx_L9_try_end; __pyx_L2_error:; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pandas/tslib.pyx":70 * try: * basestring * except NameError: # py3 # <<<<<<<<<<<<<< * basestring = str * */ __pyx_t_8 = PyErr_ExceptionMatches(__pyx_builtin_NameError); if (__pyx_t_8) { __Pyx_AddTraceback("pandas.tslib", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_3, &__pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L4_except_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_GOTREF(__pyx_t_3); __Pyx_GOTREF(__pyx_t_2); /* "pandas/tslib.pyx":71 * basestring * except NameError: # py3 * basestring = str # <<<<<<<<<<<<<< * * def ints_to_pydatetime(ndarray[int64_t] arr, tz=None): */ if (PyDict_SetItem(__pyx_d, __pyx_n_s_basestring, ((PyObject *)((PyObject*)(&PyString_Type)))) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 71; __pyx_clineno = __LINE__; goto __pyx_L4_except_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; goto __pyx_L3_exception_handled; } goto __pyx_L4_except_error; __pyx_L4_except_error:; __Pyx_XGIVEREF(__pyx_t_5); __Pyx_XGIVEREF(__pyx_t_6); __Pyx_XGIVEREF(__pyx_t_7); __Pyx_ExceptionReset(__pyx_t_5, __pyx_t_6, __pyx_t_7); goto __pyx_L1_error; __pyx_L3_exception_handled:; __Pyx_XGIVEREF(__pyx_t_5); __Pyx_XGIVEREF(__pyx_t_6); __Pyx_XGIVEREF(__pyx_t_7); __Pyx_ExceptionReset(__pyx_t_5, __pyx_t_6, __pyx_t_7); __pyx_L9_try_end:; } /* "pandas/tslib.pyx":73 * basestring = str * * def ints_to_pydatetime(ndarray[int64_t] arr, tz=None): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = len(arr) */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5tslib_1ints_to_pydatetime, NULL, __pyx_n_s_pandas_tslib); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 73; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_ints_to_pydatetime, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 73; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/tslib.pyx":126 * return result * * from dateutil.tz import tzlocal # <<<<<<<<<<<<<< * * def _is_tzlocal(tz): */ __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 126; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_n_s_tzlocal); PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_tzlocal); __Pyx_GIVEREF(__pyx_n_s_tzlocal); __pyx_t_3 = __Pyx_Import(__pyx_n_s_dateutil_tz, __pyx_t_2, -1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 126; __pyx_clineno = __LINE__; goto __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_tzlocal); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 126; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_tzlocal, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 126; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/tslib.pyx":128 * from dateutil.tz import tzlocal * * def _is_tzlocal(tz): # <<<<<<<<<<<<<< * return isinstance(tz, tzlocal) * */ __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5tslib_3_is_tzlocal, NULL, __pyx_n_s_pandas_tslib); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_is_tzlocal, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/tslib.pyx":131 * return isinstance(tz, tzlocal) * * def _is_fixed_offset(tz): # <<<<<<<<<<<<<< * try: * tz._transition_info */ __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5tslib_5_is_fixed_offset, NULL, __pyx_n_s_pandas_tslib); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 131; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_is_fixed_offset, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 131; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/tslib.pyx":138 * return True * * _zero_time = datetime_time(0, 0) # <<<<<<<<<<<<<< * * # Python front end to C extension type _Timestamp */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_datetime_time); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 138; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = PyObject_Call(__pyx_t_3, __pyx_tuple__111, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 138; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (PyDict_SetItem(__pyx_d, __pyx_n_s_zero_time, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 138; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/tslib.pyx":142 * # Python front end to C extension type _Timestamp * # This serves as the box for datetime64 * class Timestamp(_Timestamp): # <<<<<<<<<<<<<< * """TimeStamp is the pandas equivalent of python's Datetime * and is interchangable with it in most cases. It's the type used */ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 142; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(((PyObject *)((PyObject*)__pyx_ptype_6pandas_5tslib__Timestamp))); PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)((PyObject*)__pyx_ptype_6pandas_5tslib__Timestamp))); __Pyx_GIVEREF(((PyObject *)((PyObject*)__pyx_ptype_6pandas_5tslib__Timestamp))); __pyx_t_3 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 142; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = __Pyx_Py3MetaclassPrepare(__pyx_t_3, __pyx_t_2, __pyx_n_s_Timestamp, __pyx_n_s_Timestamp, (PyObject *) NULL, __pyx_n_s_pandas_tslib, __pyx_kp_s_TimeStamp_is_the_pandas_equivale); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 142; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); /* "pandas/tslib.pyx":150 * * @classmethod * def fromordinal(cls, ordinal, offset=None, tz=None): # <<<<<<<<<<<<<< * """ passed an ordinal, translate and convert to a ts * note: by definition there cannot be any tz info on the ordinal itself """ */ __pyx_t_9 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6pandas_5tslib_9Timestamp_1fromordinal, __Pyx_CYFUNCTION_CLASSMETHOD, __pyx_n_s_Timestamp_fromordinal, NULL, __pyx_n_s_pandas_tslib, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__113)); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 150; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_9, __pyx_tuple__114); /* "pandas/tslib.pyx":149 * """ * * @classmethod # <<<<<<<<<<<<<< * def fromordinal(cls, ordinal, offset=None, tz=None): * """ passed an ordinal, translate and convert to a ts */ __pyx_t_10 = __Pyx_Method_ClassMethod(__pyx_t_9); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 149; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_fromordinal, __pyx_t_10) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 150; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; /* "pandas/tslib.pyx":156 * * @classmethod * def now(cls, tz=None): # <<<<<<<<<<<<<< * """ compat now with datetime """ * if isinstance(tz, basestring): */ __pyx_t_10 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6pandas_5tslib_9Timestamp_3now, __Pyx_CYFUNCTION_CLASSMETHOD, __pyx_n_s_Timestamp_now, NULL, __pyx_n_s_pandas_tslib, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__116)); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 156; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_10, __pyx_tuple__117); /* "pandas/tslib.pyx":155 * return cls(datetime.fromordinal(ordinal),offset=offset,tz=tz) * * @classmethod # <<<<<<<<<<<<<< * def now(cls, tz=None): * """ compat now with datetime """ */ __pyx_t_9 = __Pyx_Method_ClassMethod(__pyx_t_10); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 155; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_now, __pyx_t_9) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 156; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; /* "pandas/tslib.pyx":163 * * @classmethod * def today(cls): # <<<<<<<<<<<<<< * """ compat today with datetime """ * return cls(datetime.today()) */ __pyx_t_9 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6pandas_5tslib_9Timestamp_5today, __Pyx_CYFUNCTION_CLASSMETHOD, __pyx_n_s_Timestamp_today, NULL, __pyx_n_s_pandas_tslib, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__119)); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 163; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); /* "pandas/tslib.pyx":162 * return cls(datetime.now(tz)) * * @classmethod # <<<<<<<<<<<<<< * def today(cls): * """ compat today with datetime """ */ __pyx_t_10 = __Pyx_Method_ClassMethod(__pyx_t_9); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 162; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_today, __pyx_t_10) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 163; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; /* "pandas/tslib.pyx":168 * * @classmethod * def utcnow(cls): # <<<<<<<<<<<<<< * return cls.now('UTC') * */ __pyx_t_10 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6pandas_5tslib_9Timestamp_7utcnow, __Pyx_CYFUNCTION_CLASSMETHOD, __pyx_n_s_Timestamp_utcnow, NULL, __pyx_n_s_pandas_tslib, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__121)); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); /* "pandas/tslib.pyx":167 * return cls(datetime.today()) * * @classmethod # <<<<<<<<<<<<<< * def utcnow(cls): * return cls.now('UTC') */ __pyx_t_9 = __Pyx_Method_ClassMethod(__pyx_t_10); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 167; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_utcnow, __pyx_t_9) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; /* "pandas/tslib.pyx":171 * return cls.now('UTC') * * def __new__(cls, object ts_input, object offset=None, tz=None, unit=None): # <<<<<<<<<<<<<< * cdef _TSObject ts * cdef _Timestamp ts_base */ __pyx_t_9 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6pandas_5tslib_9Timestamp_9__new__, __Pyx_CYFUNCTION_STATICMETHOD, __pyx_n_s_Timestamp___new, NULL, __pyx_n_s_pandas_tslib, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__123)); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 171; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_9, __pyx_tuple__124); if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_new, __pyx_t_9) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 171; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; /* "pandas/tslib.pyx":198 * return ts_base * * def __repr__(self): # <<<<<<<<<<<<<< * result = self._repr_base * zone = None */ __pyx_t_9 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6pandas_5tslib_9Timestamp_11__repr__, 0, __pyx_n_s_Timestamp___repr, NULL, __pyx_n_s_pandas_tslib, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__126)); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 198; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_repr, __pyx_t_9) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 198; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; /* "pandas/tslib.pyx":221 * * @property * def _date_repr(self): # <<<<<<<<<<<<<< * # Ideal here would be self.strftime("%Y-%m-%d"), but * # the datetime strftime() methods require year >= 1900 */ __pyx_t_9 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6pandas_5tslib_9Timestamp_13_date_repr, 0, __pyx_n_s_Timestamp__date_repr, NULL, __pyx_n_s_pandas_tslib, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__128)); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 221; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); /* "pandas/tslib.pyx":220 * return "Timestamp('%s', tz=%s)" % (result, zone) * * @property # <<<<<<<<<<<<<< * def _date_repr(self): * # Ideal here would be self.strftime("%Y-%m-%d"), but */ __pyx_t_10 = PyTuple_New(1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 220; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_9); __Pyx_GIVEREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_9 = PyObject_Call(__pyx_builtin_property, __pyx_t_10, NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 220; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_date_repr, __pyx_t_9) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 221; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; /* "pandas/tslib.pyx":227 * * @property * def _time_repr(self): # <<<<<<<<<<<<<< * result = '%.2d:%.2d:%.2d' % (self.hour, self.minute, self.second) * */ __pyx_t_9 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6pandas_5tslib_9Timestamp_15_time_repr, 0, __pyx_n_s_Timestamp__time_repr, NULL, __pyx_n_s_pandas_tslib, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__130)); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 227; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); /* "pandas/tslib.pyx":226 * return '%d-%.2d-%.2d' % (self.year, self.month, self.day) * * @property # <<<<<<<<<<<<<< * def _time_repr(self): * result = '%.2d:%.2d:%.2d' % (self.hour, self.minute, self.second) */ __pyx_t_10 = PyTuple_New(1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 226; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_9); __Pyx_GIVEREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_9 = PyObject_Call(__pyx_builtin_property, __pyx_t_10, NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 226; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_time_repr, __pyx_t_9) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 227; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; /* "pandas/tslib.pyx":239 * * @property * def _repr_base(self): # <<<<<<<<<<<<<< * return '%s %s' % (self._date_repr, self._time_repr) * */ __pyx_t_9 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6pandas_5tslib_9Timestamp_17_repr_base, 0, __pyx_n_s_Timestamp__repr_base, NULL, __pyx_n_s_pandas_tslib, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__132)); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 239; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); /* "pandas/tslib.pyx":238 * return result * * @property # <<<<<<<<<<<<<< * def _repr_base(self): * return '%s %s' % (self._date_repr, self._time_repr) */ __pyx_t_10 = PyTuple_New(1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 238; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_9); __Pyx_GIVEREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_9 = PyObject_Call(__pyx_builtin_property, __pyx_t_10, NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 238; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_repr_base, __pyx_t_9) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 239; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; /* "pandas/tslib.pyx":243 * * @property * def tz(self): # <<<<<<<<<<<<<< * """ * Alias for tzinfo */ __pyx_t_9 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6pandas_5tslib_9Timestamp_19tz, 0, __pyx_n_s_Timestamp_tz, NULL, __pyx_n_s_pandas_tslib, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__134)); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); /* "pandas/tslib.pyx":242 * return '%s %s' % (self._date_repr, self._time_repr) * * @property # <<<<<<<<<<<<<< * def tz(self): * """ */ __pyx_t_10 = PyTuple_New(1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 242; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_9); __Pyx_GIVEREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_9 = PyObject_Call(__pyx_builtin_property, __pyx_t_10, NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 242; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_tz, __pyx_t_9) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; /* "pandas/tslib.pyx":250 * * @property * def freq(self): # <<<<<<<<<<<<<< * return self.offset * */ __pyx_t_9 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6pandas_5tslib_9Timestamp_21freq, 0, __pyx_n_s_Timestamp_freq, NULL, __pyx_n_s_pandas_tslib, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__136)); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 250; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); /* "pandas/tslib.pyx":249 * return self.tzinfo * * @property # <<<<<<<<<<<<<< * def freq(self): * return self.offset */ __pyx_t_10 = PyTuple_New(1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 249; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_9); __Pyx_GIVEREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_9 = PyObject_Call(__pyx_builtin_property, __pyx_t_10, NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 249; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_freq, __pyx_t_9) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 250; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; /* "pandas/tslib.pyx":253 * return self.offset * * def __setstate__(self, state): # <<<<<<<<<<<<<< * self.value = state[0] * self.offset = state[1] */ __pyx_t_9 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6pandas_5tslib_9Timestamp_23__setstate__, 0, __pyx_n_s_Timestamp___setstate, NULL, __pyx_n_s_pandas_tslib, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__138)); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 253; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_setstate, __pyx_t_9) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 253; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; /* "pandas/tslib.pyx":258 * self.tzinfo = state[2] * * def __reduce__(self): # <<<<<<<<<<<<<< * object_state = self.value, self.offset, self.tzinfo * return (Timestamp, object_state) */ __pyx_t_9 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6pandas_5tslib_9Timestamp_25__reduce__, 0, __pyx_n_s_Timestamp___reduce, NULL, __pyx_n_s_pandas_tslib, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__140)); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 258; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_reduce, __pyx_t_9) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 258; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; /* "pandas/tslib.pyx":262 * return (Timestamp, object_state) * * def to_period(self, freq=None): # <<<<<<<<<<<<<< * """ * Return an period of which this timestamp is an observation. */ __pyx_t_9 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6pandas_5tslib_9Timestamp_27to_period, 0, __pyx_n_s_Timestamp_to_period, NULL, __pyx_n_s_pandas_tslib, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__142)); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 262; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_9, __pyx_tuple__143); if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_to_period, __pyx_t_9) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 262; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; /* "pandas/tslib.pyx":274 * * @property * def dayofweek(self): # <<<<<<<<<<<<<< * return self.weekday() * */ __pyx_t_9 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6pandas_5tslib_9Timestamp_29dayofweek, 0, __pyx_n_s_Timestamp_dayofweek, NULL, __pyx_n_s_pandas_tslib, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__145)); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 274; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); /* "pandas/tslib.pyx":273 * return Period(self, freq=freq) * * @property # <<<<<<<<<<<<<< * def dayofweek(self): * return self.weekday() */ __pyx_t_10 = PyTuple_New(1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 273; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_9); __Pyx_GIVEREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_9 = PyObject_Call(__pyx_builtin_property, __pyx_t_10, NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 273; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_dayofweek, __pyx_t_9) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 274; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; /* "pandas/tslib.pyx":278 * * @property * def dayofyear(self): # <<<<<<<<<<<<<< * return self._get_field('doy') * */ __pyx_t_9 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6pandas_5tslib_9Timestamp_31dayofyear, 0, __pyx_n_s_Timestamp_dayofyear, NULL, __pyx_n_s_pandas_tslib, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__147)); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 278; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); /* "pandas/tslib.pyx":277 * return self.weekday() * * @property # <<<<<<<<<<<<<< * def dayofyear(self): * return self._get_field('doy') */ __pyx_t_10 = PyTuple_New(1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 277; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_9); __Pyx_GIVEREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_9 = PyObject_Call(__pyx_builtin_property, __pyx_t_10, NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 277; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_dayofyear, __pyx_t_9) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 278; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; /* "pandas/tslib.pyx":282 * * @property * def week(self): # <<<<<<<<<<<<<< * return self._get_field('woy') * */ __pyx_t_9 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6pandas_5tslib_9Timestamp_33week, 0, __pyx_n_s_Timestamp_week, NULL, __pyx_n_s_pandas_tslib, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__149)); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 282; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); /* "pandas/tslib.pyx":281 * return self._get_field('doy') * * @property # <<<<<<<<<<<<<< * def week(self): * return self._get_field('woy') */ __pyx_t_10 = PyTuple_New(1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 281; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_9); __Pyx_GIVEREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_9 = PyObject_Call(__pyx_builtin_property, __pyx_t_10, NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 281; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_week, __pyx_t_9) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 282; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; /* "pandas/tslib.pyx":285 * return self._get_field('woy') * * weekofyear = week # <<<<<<<<<<<<<< * * @property */ __pyx_t_9 = PyObject_GetItem(__pyx_t_1, __pyx_n_s_week); if (unlikely(!__pyx_t_9)) { PyErr_Clear(); __pyx_t_9 = __Pyx_GetModuleGlobalName(__pyx_n_s_week); } if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 285; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_weekofyear, __pyx_t_9) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 285; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; /* "pandas/tslib.pyx":288 * * @property * def quarter(self): # <<<<<<<<<<<<<< * return self._get_field('q') * */ __pyx_t_9 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6pandas_5tslib_9Timestamp_35quarter, 0, __pyx_n_s_Timestamp_quarter, NULL, __pyx_n_s_pandas_tslib, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__151)); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 288; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); /* "pandas/tslib.pyx":287 * weekofyear = week * * @property # <<<<<<<<<<<<<< * def quarter(self): * return self._get_field('q') */ __pyx_t_10 = PyTuple_New(1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 287; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_9); __Pyx_GIVEREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_9 = PyObject_Call(__pyx_builtin_property, __pyx_t_10, NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 287; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_quarter, __pyx_t_9) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 288; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; /* "pandas/tslib.pyx":292 * * @property * def freqstr(self): # <<<<<<<<<<<<<< * return getattr(self.offset, 'freqstr', self.offset) * */ __pyx_t_9 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6pandas_5tslib_9Timestamp_37freqstr, 0, __pyx_n_s_Timestamp_freqstr, NULL, __pyx_n_s_pandas_tslib, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__153)); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 292; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); /* "pandas/tslib.pyx":291 * return self._get_field('q') * * @property # <<<<<<<<<<<<<< * def freqstr(self): * return getattr(self.offset, 'freqstr', self.offset) */ __pyx_t_10 = PyTuple_New(1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 291; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_9); __Pyx_GIVEREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_9 = PyObject_Call(__pyx_builtin_property, __pyx_t_10, NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 291; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_freqstr, __pyx_t_9) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 292; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; /* "pandas/tslib.pyx":296 * * @property * def asm8(self): # <<<<<<<<<<<<<< * return np.int64(self.value).view('M8[ns]') * */ __pyx_t_9 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6pandas_5tslib_9Timestamp_39asm8, 0, __pyx_n_s_Timestamp_asm8, NULL, __pyx_n_s_pandas_tslib, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__155)); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 296; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); /* "pandas/tslib.pyx":295 * return getattr(self.offset, 'freqstr', self.offset) * * @property # <<<<<<<<<<<<<< * def asm8(self): * return np.int64(self.value).view('M8[ns]') */ __pyx_t_10 = PyTuple_New(1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 295; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_9); __Pyx_GIVEREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_9 = PyObject_Call(__pyx_builtin_property, __pyx_t_10, NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 295; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_asm8, __pyx_t_9) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 296; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; /* "pandas/tslib.pyx":299 * return np.int64(self.value).view('M8[ns]') * * def tz_localize(self, tz): # <<<<<<<<<<<<<< * """ * Convert naive Timestamp to local time zone */ __pyx_t_9 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6pandas_5tslib_9Timestamp_41tz_localize, 0, __pyx_n_s_Timestamp_tz_localize, NULL, __pyx_n_s_pandas_tslib, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__157)); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 299; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_tz_localize, __pyx_t_9) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 299; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; /* "pandas/tslib.pyx":318 * 'tz_convert for conversions') * * def tz_convert(self, tz): # <<<<<<<<<<<<<< * """ * Convert Timestamp to another time zone or localize to requested time */ __pyx_t_9 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6pandas_5tslib_9Timestamp_43tz_convert, 0, __pyx_n_s_Timestamp_tz_convert, NULL, __pyx_n_s_pandas_tslib, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__159)); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 318; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_tz_convert, __pyx_t_9) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 318; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; /* "pandas/tslib.pyx":339 * return Timestamp(self.value, tz=tz) * * astimezone = tz_convert # <<<<<<<<<<<<<< * * def replace(self, **kwds): */ __pyx_t_9 = PyObject_GetItem(__pyx_t_1, __pyx_n_s_tz_convert); if (unlikely(!__pyx_t_9)) { PyErr_Clear(); __pyx_t_9 = __Pyx_GetModuleGlobalName(__pyx_n_s_tz_convert); } if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 339; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_astimezone, __pyx_t_9) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 339; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; /* "pandas/tslib.pyx":341 * astimezone = tz_convert * * def replace(self, **kwds): # <<<<<<<<<<<<<< * return Timestamp(datetime.replace(self, **kwds), * offset=self.offset) */ __pyx_t_9 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6pandas_5tslib_9Timestamp_45replace, 0, __pyx_n_s_Timestamp_replace, NULL, __pyx_n_s_pandas_tslib, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__161)); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 341; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_replace, __pyx_t_9) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 341; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; /* "pandas/tslib.pyx":345 * offset=self.offset) * * def to_pydatetime(self, warn=True): # <<<<<<<<<<<<<< * """ * If warn=True, issue warning if nanoseconds is nonzero */ __pyx_t_9 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6pandas_5tslib_9Timestamp_47to_pydatetime, 0, __pyx_n_s_Timestamp_to_pydatetime, NULL, __pyx_n_s_pandas_tslib, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__163)); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 345; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_9, __pyx_tuple__164); if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_to_pydatetime, __pyx_t_9) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 345; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; /* "pandas/tslib.pyx":361 * ts.dts.us, ts.tzinfo) * * def isoformat(self, sep='T'): # <<<<<<<<<<<<<< * base = super(_Timestamp, self).isoformat(sep=sep) * if self.nanosecond == 0: */ __pyx_t_9 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6pandas_5tslib_9Timestamp_49isoformat, 0, __pyx_n_s_Timestamp_isoformat, NULL, __pyx_n_s_pandas_tslib, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__166)); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 361; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_9, __pyx_tuple__167); if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_isoformat, __pyx_t_9) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 361; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; /* "pandas/tslib.pyx":378 * return base1 + base2 * * def _has_time_component(self): # <<<<<<<<<<<<<< * """ * Returns if the Timestamp has a time component */ __pyx_t_9 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6pandas_5tslib_9Timestamp_51_has_time_component, 0, __pyx_n_s_Timestamp__has_time_component, NULL, __pyx_n_s_pandas_tslib, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__169)); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 378; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_has_time_component, __pyx_t_9) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 378; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; /* "pandas/tslib.pyx":142 * # Python front end to C extension type _Timestamp * # This serves as the box for datetime64 * class Timestamp(_Timestamp): # <<<<<<<<<<<<<< * """TimeStamp is the pandas equivalent of python's Datetime * and is interchangable with it in most cases. It's the type used */ __pyx_t_9 = __Pyx_Py3ClassCreate(__pyx_t_3, __pyx_n_s_Timestamp, __pyx_t_2, __pyx_t_1, NULL, 0, 1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 142; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); if (PyDict_SetItem(__pyx_d, __pyx_n_s_Timestamp, __pyx_t_9) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 142; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/tslib.pyx":388 * * * _nat_strings = set(['NaT','nat','NAT','nan','NaN','NAN']) # <<<<<<<<<<<<<< * class NaTType(_NaT): * """(N)ot-(A)-(T)ime, the time equivalent of NaN""" */ __pyx_t_2 = PySet_New(0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 388; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PySet_Add(__pyx_t_2, __pyx_n_s_NaT) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 388; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (PySet_Add(__pyx_t_2, __pyx_n_s_nat) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 388; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (PySet_Add(__pyx_t_2, __pyx_n_s_NAT) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 388; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (PySet_Add(__pyx_t_2, __pyx_n_s_nan) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 388; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (PySet_Add(__pyx_t_2, __pyx_n_s_NaN) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 388; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (PySet_Add(__pyx_t_2, __pyx_n_s_NAN) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 388; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (PyDict_SetItem(__pyx_d, __pyx_n_s_nat_strings, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 388; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/tslib.pyx":389 * * _nat_strings = set(['NaT','nat','NAT','nan','NaN','NAN']) * class NaTType(_NaT): # <<<<<<<<<<<<<< * """(N)ot-(A)-(T)ime, the time equivalent of NaN""" * */ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 389; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(((PyObject *)((PyObject*)__pyx_ptype_6pandas_5tslib__NaT))); PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)((PyObject*)__pyx_ptype_6pandas_5tslib__NaT))); __Pyx_GIVEREF(((PyObject *)((PyObject*)__pyx_ptype_6pandas_5tslib__NaT))); __pyx_t_3 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 389; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = __Pyx_Py3MetaclassPrepare(__pyx_t_3, __pyx_t_2, __pyx_n_s_NaTType, __pyx_n_s_NaTType, (PyObject *) NULL, __pyx_n_s_pandas_tslib, __pyx_kp_s_N_ot_A_T_ime_the_time_equivalen); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 389; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); /* "pandas/tslib.pyx":392 * """(N)ot-(A)-(T)ime, the time equivalent of NaN""" * * def __new__(cls): # <<<<<<<<<<<<<< * cdef _NaT base * */ __pyx_t_9 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6pandas_5tslib_7NaTType_1__new__, __Pyx_CYFUNCTION_STATICMETHOD, __pyx_n_s_NaTType___new, NULL, __pyx_n_s_pandas_tslib, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__171)); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 392; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_new, __pyx_t_9) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 392; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; /* "pandas/tslib.pyx":401 * return base * * def __repr__(self): # <<<<<<<<<<<<<< * return 'NaT' * */ __pyx_t_9 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6pandas_5tslib_7NaTType_3__repr__, 0, __pyx_n_s_NaTType___repr, NULL, __pyx_n_s_pandas_tslib, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__173)); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 401; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_repr, __pyx_t_9) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 401; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; /* "pandas/tslib.pyx":404 * return 'NaT' * * def __str__(self): # <<<<<<<<<<<<<< * return 'NaT' * */ __pyx_t_9 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6pandas_5tslib_7NaTType_5__str__, 0, __pyx_n_s_NaTType___str, NULL, __pyx_n_s_pandas_tslib, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__175)); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 404; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_str, __pyx_t_9) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 404; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; /* "pandas/tslib.pyx":407 * return 'NaT' * * def __hash__(self): # <<<<<<<<<<<<<< * return iNaT * */ __pyx_t_9 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6pandas_5tslib_7NaTType_7__hash__, 0, __pyx_n_s_NaTType___hash, NULL, __pyx_n_s_pandas_tslib, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__177)); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 407; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_hash, __pyx_t_9) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 407; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; /* "pandas/tslib.pyx":410 * return iNaT * * def weekday(self): # <<<<<<<<<<<<<< * return -1 * */ __pyx_t_9 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6pandas_5tslib_7NaTType_9weekday, 0, __pyx_n_s_NaTType_weekday, NULL, __pyx_n_s_pandas_tslib, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__179)); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 410; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_weekday, __pyx_t_9) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 410; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; /* "pandas/tslib.pyx":413 * return -1 * * def toordinal(self): # <<<<<<<<<<<<<< * return -1 * */ __pyx_t_9 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6pandas_5tslib_7NaTType_11toordinal, 0, __pyx_n_s_NaTType_toordinal, NULL, __pyx_n_s_pandas_tslib, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__181)); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 413; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_toordinal, __pyx_t_9) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 413; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; /* "pandas/tslib.pyx":389 * * _nat_strings = set(['NaT','nat','NAT','nan','NaN','NAN']) * class NaTType(_NaT): # <<<<<<<<<<<<<< * """(N)ot-(A)-(T)ime, the time equivalent of NaN""" * */ __pyx_t_9 = __Pyx_Py3ClassCreate(__pyx_t_3, __pyx_n_s_NaTType, __pyx_t_2, __pyx_t_1, NULL, 0, 1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 389; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); if (PyDict_SetItem(__pyx_d, __pyx_n_s_NaTType, __pyx_t_9) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 389; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/tslib.pyx":416 * return -1 * * fields = ['year', 'quarter', 'month', 'day', 'hour', # <<<<<<<<<<<<<< * 'minute', 'second', 'microsecond', 'nanosecond', * 'week', 'dayofyear'] */ __pyx_t_2 = PyList_New(11); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 416; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_n_s_year); PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_year); __Pyx_GIVEREF(__pyx_n_s_year); __Pyx_INCREF(__pyx_n_s_quarter); PyList_SET_ITEM(__pyx_t_2, 1, __pyx_n_s_quarter); __Pyx_GIVEREF(__pyx_n_s_quarter); __Pyx_INCREF(__pyx_n_s_month); PyList_SET_ITEM(__pyx_t_2, 2, __pyx_n_s_month); __Pyx_GIVEREF(__pyx_n_s_month); __Pyx_INCREF(__pyx_n_s_day); PyList_SET_ITEM(__pyx_t_2, 3, __pyx_n_s_day); __Pyx_GIVEREF(__pyx_n_s_day); __Pyx_INCREF(__pyx_n_s_hour); PyList_SET_ITEM(__pyx_t_2, 4, __pyx_n_s_hour); __Pyx_GIVEREF(__pyx_n_s_hour); __Pyx_INCREF(__pyx_n_s_minute); PyList_SET_ITEM(__pyx_t_2, 5, __pyx_n_s_minute); __Pyx_GIVEREF(__pyx_n_s_minute); __Pyx_INCREF(__pyx_n_s_second); PyList_SET_ITEM(__pyx_t_2, 6, __pyx_n_s_second); __Pyx_GIVEREF(__pyx_n_s_second); __Pyx_INCREF(__pyx_n_s_microsecond); PyList_SET_ITEM(__pyx_t_2, 7, __pyx_n_s_microsecond); __Pyx_GIVEREF(__pyx_n_s_microsecond); __Pyx_INCREF(__pyx_n_s_nanosecond); PyList_SET_ITEM(__pyx_t_2, 8, __pyx_n_s_nanosecond); __Pyx_GIVEREF(__pyx_n_s_nanosecond); __Pyx_INCREF(__pyx_n_s_week); PyList_SET_ITEM(__pyx_t_2, 9, __pyx_n_s_week); __Pyx_GIVEREF(__pyx_n_s_week); __Pyx_INCREF(__pyx_n_s_dayofyear); PyList_SET_ITEM(__pyx_t_2, 10, __pyx_n_s_dayofyear); __Pyx_GIVEREF(__pyx_n_s_dayofyear); if (PyDict_SetItem(__pyx_d, __pyx_n_s_fields, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 416; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/tslib.pyx":419 * 'minute', 'second', 'microsecond', 'nanosecond', * 'week', 'dayofyear'] * for field in fields: # <<<<<<<<<<<<<< * prop = property(fget=lambda self: -1) * setattr(NaTType, field, prop) */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_fields); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 419; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyList_CheckExact(__pyx_t_2) || PyTuple_CheckExact(__pyx_t_2)) { __pyx_t_3 = __pyx_t_2; __Pyx_INCREF(__pyx_t_3); __pyx_t_11 = 0; __pyx_t_12 = NULL; } else { __pyx_t_11 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 419; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_12 = Py_TYPE(__pyx_t_3)->tp_iternext; } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; for (;;) { if (!__pyx_t_12 && PyList_CheckExact(__pyx_t_3)) { if (__pyx_t_11 >= PyList_GET_SIZE(__pyx_t_3)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_2 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_11); __Pyx_INCREF(__pyx_t_2); __pyx_t_11++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 419; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_2 = PySequence_ITEM(__pyx_t_3, __pyx_t_11); __pyx_t_11++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 419; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif } else if (!__pyx_t_12 && PyTuple_CheckExact(__pyx_t_3)) { if (__pyx_t_11 >= PyTuple_GET_SIZE(__pyx_t_3)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_11); __Pyx_INCREF(__pyx_t_2); __pyx_t_11++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 419; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_2 = PySequence_ITEM(__pyx_t_3, __pyx_t_11); __pyx_t_11++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 419; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif } else { __pyx_t_2 = __pyx_t_12(__pyx_t_3); if (unlikely(!__pyx_t_2)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 419; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } break; } __Pyx_GOTREF(__pyx_t_2); } if (PyDict_SetItem(__pyx_d, __pyx_n_s_field, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 419; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/tslib.pyx":420 * 'week', 'dayofyear'] * for field in fields: * prop = property(fget=lambda self: -1) # <<<<<<<<<<<<<< * setattr(NaTType, field, prop) * */ __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 420; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6pandas_5tslib_100lambda1, 0, __pyx_n_s_lambda, NULL, __pyx_n_s_pandas_tslib, PyModule_GetDict(__pyx_m), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 420; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_fget, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 420; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyObject_Call(__pyx_builtin_property, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 420; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (PyDict_SetItem(__pyx_d, __pyx_n_s_prop, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 420; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pandas/tslib.pyx":421 * for field in fields: * prop = property(fget=lambda self: -1) * setattr(NaTType, field, prop) # <<<<<<<<<<<<<< * * */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_NaTType); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 421; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_field); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 421; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_9 = __Pyx_GetModuleGlobalName(__pyx_n_s_prop); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 421; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_t_13 = PyObject_SetAttr(__pyx_t_1, __pyx_t_2, __pyx_t_9); if (unlikely(__pyx_t_13 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 421; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/tslib.pyx":424 * * * NaT = NaTType() # <<<<<<<<<<<<<< * * iNaT = util.get_nat() */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_NaTType); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 424; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_9 = PyObject_Call(__pyx_t_3, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 424; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (PyDict_SetItem(__pyx_d, __pyx_n_s_NaT, __pyx_t_9) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 424; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; /* "pandas/tslib.pyx":426 * NaT = NaTType() * * iNaT = util.get_nat() # <<<<<<<<<<<<<< * * */ __pyx_t_9 = __Pyx_PyInt_From_npy_int64(get_nat()); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 426; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); if (PyDict_SetItem(__pyx_d, __pyx_n_s_iNaT, __pyx_t_9) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 426; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; /* "pandas/tslib.pyx":444 * return ', tz=%s' % zone * * def is_timestamp_array(ndarray[object] values): # <<<<<<<<<<<<<< * cdef int i, n = len(values) * if n == 0: */ __pyx_t_9 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5tslib_7is_timestamp_array, NULL, __pyx_n_s_pandas_tslib); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 444; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); if (PyDict_SetItem(__pyx_d, __pyx_n_s_is_timestamp_array, __pyx_t_9) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 444; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; /* "pandas/tslib.pyx":480 * # These are defined as magic numbers due to strange * # wraparound behavior when using the true int64 lower boundary * cdef int64_t _NS_LOWER_BOUND = -9223285636854775000LL # <<<<<<<<<<<<<< * cdef int64_t _NS_UPPER_BOUND = 9223372036854775807LL * */ __pyx_v_6pandas_5tslib__NS_LOWER_BOUND = -9223285636854775000LL; /* "pandas/tslib.pyx":481 * # wraparound behavior when using the true int64 lower boundary * cdef int64_t _NS_LOWER_BOUND = -9223285636854775000LL * cdef int64_t _NS_UPPER_BOUND = 9223372036854775807LL # <<<<<<<<<<<<<< * * cdef pandas_datetimestruct _NS_MIN_DTS, _NS_MAX_DTS */ __pyx_v_6pandas_5tslib__NS_UPPER_BOUND = 9223372036854775807LL; /* "pandas/tslib.pyx":484 * * cdef pandas_datetimestruct _NS_MIN_DTS, _NS_MAX_DTS * pandas_datetime_to_datetimestruct(_NS_LOWER_BOUND, PANDAS_FR_ns, &_NS_MIN_DTS) # <<<<<<<<<<<<<< * pandas_datetime_to_datetimestruct(_NS_UPPER_BOUND, PANDAS_FR_ns, &_NS_MAX_DTS) * */ pandas_datetime_to_datetimestruct(__pyx_v_6pandas_5tslib__NS_LOWER_BOUND, PANDAS_FR_ns, (&__pyx_v_6pandas_5tslib__NS_MIN_DTS)); /* "pandas/tslib.pyx":485 * cdef pandas_datetimestruct _NS_MIN_DTS, _NS_MAX_DTS * pandas_datetime_to_datetimestruct(_NS_LOWER_BOUND, PANDAS_FR_ns, &_NS_MIN_DTS) * pandas_datetime_to_datetimestruct(_NS_UPPER_BOUND, PANDAS_FR_ns, &_NS_MAX_DTS) # <<<<<<<<<<<<<< * * Timestamp.min = Timestamp(_NS_LOWER_BOUND) */ pandas_datetime_to_datetimestruct(__pyx_v_6pandas_5tslib__NS_UPPER_BOUND, PANDAS_FR_ns, (&__pyx_v_6pandas_5tslib__NS_MAX_DTS)); /* "pandas/tslib.pyx":487 * pandas_datetime_to_datetimestruct(_NS_UPPER_BOUND, PANDAS_FR_ns, &_NS_MAX_DTS) * * Timestamp.min = Timestamp(_NS_LOWER_BOUND) # <<<<<<<<<<<<<< * Timestamp.max = Timestamp(_NS_UPPER_BOUND) * */ __pyx_t_9 = __Pyx_GetModuleGlobalName(__pyx_n_s_Timestamp); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 487; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_t_3 = __Pyx_PyInt_From_npy_int64(__pyx_v_6pandas_5tslib__NS_LOWER_BOUND); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 487; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 487; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyObject_Call(__pyx_t_9, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 487; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_Timestamp); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 487; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (__Pyx_PyObject_SetAttrStr(__pyx_t_2, __pyx_n_s_min, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 487; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/tslib.pyx":488 * * Timestamp.min = Timestamp(_NS_LOWER_BOUND) * Timestamp.max = Timestamp(_NS_UPPER_BOUND) # <<<<<<<<<<<<<< * * */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_Timestamp); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 488; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyInt_From_npy_int64(__pyx_v_6pandas_5tslib__NS_UPPER_BOUND); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 488; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 488; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyObject_Call(__pyx_t_2, __pyx_t_9, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 488; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_9 = __Pyx_GetModuleGlobalName(__pyx_n_s_Timestamp); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 488; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); if (__Pyx_PyObject_SetAttrStr(__pyx_t_9, __pyx_n_s_max, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 488; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; /* "pandas/tslib.pyx":494 * # Frequency inference * * def unique_deltas(ndarray[int64_t] arr): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = len(arr) */ __pyx_t_9 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5tslib_11unique_deltas, NULL, __pyx_n_s_pandas_tslib); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 494; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); if (PyDict_SetItem(__pyx_d, __pyx_n_s_unique_deltas, __pyx_t_9) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 494; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; /* "pandas/tslib.pyx":522 * * * def apply_offset(ndarray[object] values, object offset): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = len(values) */ __pyx_t_9 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5tslib_13apply_offset, NULL, __pyx_n_s_pandas_tslib); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 522; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); if (PyDict_SetItem(__pyx_d, __pyx_n_s_apply_offset, __pyx_t_9) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 522; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; /* "pandas/tslib.pyx":549 * cdef int _reverse_ops[6] * * _reverse_ops[Py_LT] = Py_GT # <<<<<<<<<<<<<< * _reverse_ops[Py_LE] = Py_GE * _reverse_ops[Py_EQ] = Py_EQ */ (__pyx_v_6pandas_5tslib__reverse_ops[Py_LT]) = Py_GT; /* "pandas/tslib.pyx":550 * * _reverse_ops[Py_LT] = Py_GT * _reverse_ops[Py_LE] = Py_GE # <<<<<<<<<<<<<< * _reverse_ops[Py_EQ] = Py_EQ * _reverse_ops[Py_NE] = Py_NE */ (__pyx_v_6pandas_5tslib__reverse_ops[Py_LE]) = Py_GE; /* "pandas/tslib.pyx":551 * _reverse_ops[Py_LT] = Py_GT * _reverse_ops[Py_LE] = Py_GE * _reverse_ops[Py_EQ] = Py_EQ # <<<<<<<<<<<<<< * _reverse_ops[Py_NE] = Py_NE * _reverse_ops[Py_GT] = Py_LT */ (__pyx_v_6pandas_5tslib__reverse_ops[Py_EQ]) = Py_EQ; /* "pandas/tslib.pyx":552 * _reverse_ops[Py_LE] = Py_GE * _reverse_ops[Py_EQ] = Py_EQ * _reverse_ops[Py_NE] = Py_NE # <<<<<<<<<<<<<< * _reverse_ops[Py_GT] = Py_LT * _reverse_ops[Py_GE] = Py_LE */ (__pyx_v_6pandas_5tslib__reverse_ops[Py_NE]) = Py_NE; /* "pandas/tslib.pyx":553 * _reverse_ops[Py_EQ] = Py_EQ * _reverse_ops[Py_NE] = Py_NE * _reverse_ops[Py_GT] = Py_LT # <<<<<<<<<<<<<< * _reverse_ops[Py_GE] = Py_LE * */ (__pyx_v_6pandas_5tslib__reverse_ops[Py_GT]) = Py_LT; /* "pandas/tslib.pyx":554 * _reverse_ops[Py_NE] = Py_NE * _reverse_ops[Py_GT] = Py_LT * _reverse_ops[Py_GE] = Py_LE # <<<<<<<<<<<<<< * * */ (__pyx_v_6pandas_5tslib__reverse_ops[Py_GE]) = Py_LE; /* "pandas/tslib.pyx":557 * * * cdef str _NDIM_STRING = "ndim" # <<<<<<<<<<<<<< * * # This is PITA. Because we inherit from datetime, which has very specific */ __Pyx_INCREF(__pyx_n_s_ndim); __Pyx_XGOTREF(__pyx_v_6pandas_5tslib__NDIM_STRING); __Pyx_DECREF_SET(__pyx_v_6pandas_5tslib__NDIM_STRING, __pyx_n_s_ndim); __Pyx_GIVEREF(__pyx_n_s_ndim); /* "pandas/tslib.pyx":690 * * * cdef PyTypeObject* ts_type = Timestamp # <<<<<<<<<<<<<< * * */ __pyx_t_9 = __Pyx_GetModuleGlobalName(__pyx_n_s_Timestamp); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 690; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_v_6pandas_5tslib_ts_type = ((PyTypeObject *)__pyx_t_9); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; /* "pandas/tslib.pyx":699 * cdef bint _nat_scalar_rules[6] * * _nat_scalar_rules[Py_EQ] = False # <<<<<<<<<<<<<< * _nat_scalar_rules[Py_NE] = True * _nat_scalar_rules[Py_LT] = False */ (__pyx_v_6pandas_5tslib__nat_scalar_rules[Py_EQ]) = 0; /* "pandas/tslib.pyx":700 * * _nat_scalar_rules[Py_EQ] = False * _nat_scalar_rules[Py_NE] = True # <<<<<<<<<<<<<< * _nat_scalar_rules[Py_LT] = False * _nat_scalar_rules[Py_LE] = False */ (__pyx_v_6pandas_5tslib__nat_scalar_rules[Py_NE]) = 1; /* "pandas/tslib.pyx":701 * _nat_scalar_rules[Py_EQ] = False * _nat_scalar_rules[Py_NE] = True * _nat_scalar_rules[Py_LT] = False # <<<<<<<<<<<<<< * _nat_scalar_rules[Py_LE] = False * _nat_scalar_rules[Py_GT] = False */ (__pyx_v_6pandas_5tslib__nat_scalar_rules[Py_LT]) = 0; /* "pandas/tslib.pyx":702 * _nat_scalar_rules[Py_NE] = True * _nat_scalar_rules[Py_LT] = False * _nat_scalar_rules[Py_LE] = False # <<<<<<<<<<<<<< * _nat_scalar_rules[Py_GT] = False * _nat_scalar_rules[Py_GE] = False */ (__pyx_v_6pandas_5tslib__nat_scalar_rules[Py_LE]) = 0; /* "pandas/tslib.pyx":703 * _nat_scalar_rules[Py_LT] = False * _nat_scalar_rules[Py_LE] = False * _nat_scalar_rules[Py_GT] = False # <<<<<<<<<<<<<< * _nat_scalar_rules[Py_GE] = False * */ (__pyx_v_6pandas_5tslib__nat_scalar_rules[Py_GT]) = 0; /* "pandas/tslib.pyx":704 * _nat_scalar_rules[Py_LE] = False * _nat_scalar_rules[Py_GT] = False * _nat_scalar_rules[Py_GE] = False # <<<<<<<<<<<<<< * * */ (__pyx_v_6pandas_5tslib__nat_scalar_rules[Py_GE]) = 0; /* "pandas/tslib.pyx":728 * * * def _delta_to_nanoseconds(delta): # <<<<<<<<<<<<<< * if hasattr(delta, 'delta'): * delta = delta.delta */ __pyx_t_9 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5tslib_15_delta_to_nanoseconds, NULL, __pyx_n_s_pandas_tslib); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 728; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); if (PyDict_SetItem(__pyx_d, __pyx_n_s_delta_to_nanoseconds, __pyx_t_9) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 728; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; /* "pandas/tslib.pyx":890 * * * def get_timezone(tz): # <<<<<<<<<<<<<< * return _get_zone(tz) * */ __pyx_t_9 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5tslib_19get_timezone, NULL, __pyx_n_s_pandas_tslib); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 890; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); if (PyDict_SetItem(__pyx_d, __pyx_n_s_get_timezone, __pyx_t_9) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 890; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; /* "pandas/tslib.pyx":909 * * * class OutOfBoundsDatetime(ValueError): # <<<<<<<<<<<<<< * pass * */ __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 909; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_INCREF(__pyx_builtin_ValueError); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_builtin_ValueError); __Pyx_GIVEREF(__pyx_builtin_ValueError); __pyx_t_3 = __Pyx_CalculateMetaclass(NULL, __pyx_t_9); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 909; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_Py3MetaclassPrepare(__pyx_t_3, __pyx_t_9, __pyx_n_s_OutOfBoundsDatetime, __pyx_n_s_OutOfBoundsDatetime, (PyObject *) NULL, __pyx_n_s_pandas_tslib, (PyObject *) NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 909; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __Pyx_Py3ClassCreate(__pyx_t_3, __pyx_n_s_OutOfBoundsDatetime, __pyx_t_9, __pyx_t_2, NULL, 0, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 909; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_OutOfBoundsDatetime, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 909; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; /* "pandas/tslib.pyx":939 * # obj.dtval = _dts_to_pydatetime(&obj.dts) * * def datetime_to_datetime64(ndarray[object] values): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = len(values) */ __pyx_t_9 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5tslib_21datetime_to_datetime64, NULL, __pyx_n_s_pandas_tslib); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 939; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); if (PyDict_SetItem(__pyx_d, __pyx_n_s_datetime_to_datetime64, __pyx_t_9) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 939; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; /* "pandas/tslib.pyx":974 * return result, inferred_tz * * _not_datelike_strings = set(['a','A','m','M','p','P','t','T']) # <<<<<<<<<<<<<< * * def _does_string_look_like_datetime(date_string): */ __pyx_t_9 = PySet_New(0); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 974; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); if (PySet_Add(__pyx_t_9, __pyx_n_s_a) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 974; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (PySet_Add(__pyx_t_9, __pyx_n_s_A) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 974; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (PySet_Add(__pyx_t_9, __pyx_n_s_m) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 974; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (PySet_Add(__pyx_t_9, __pyx_n_s_M) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 974; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (PySet_Add(__pyx_t_9, __pyx_n_s_p) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 974; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (PySet_Add(__pyx_t_9, __pyx_n_s_P) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 974; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (PySet_Add(__pyx_t_9, __pyx_n_s_t) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 974; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (PySet_Add(__pyx_t_9, __pyx_n_s_T) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 974; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (PyDict_SetItem(__pyx_d, __pyx_n_s_not_datelike_strings, __pyx_t_9) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 974; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; /* "pandas/tslib.pyx":976 * _not_datelike_strings = set(['a','A','m','M','p','P','t','T']) * * def _does_string_look_like_datetime(date_string): # <<<<<<<<<<<<<< * if date_string.startswith('0'): * # Strings starting with 0 are more consistent with a */ __pyx_t_9 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5tslib_23_does_string_look_like_datetime, NULL, __pyx_n_s_pandas_tslib); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 976; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); if (PyDict_SetItem(__pyx_d, __pyx_n_s_does_string_look_like_datetime, __pyx_t_9) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 976; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; /* "pandas/tslib.pyx":993 * return True * * def parse_datetime_string(date_string, **kwargs): # <<<<<<<<<<<<<< * if not _does_string_look_like_datetime(date_string): * raise ValueError('Given date string not likely a datetime.') */ __pyx_t_9 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5tslib_25parse_datetime_string, NULL, __pyx_n_s_pandas_tslib); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 993; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); if (PyDict_SetItem(__pyx_d, __pyx_n_s_parse_datetime_string, __pyx_t_9) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 993; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; /* "pandas/tslib.pyx":1000 * return dt * * def array_to_datetime(ndarray[object] values, raise_=False, dayfirst=False, # <<<<<<<<<<<<<< * format=None, utc=None, coerce=False, unit=None): * cdef: */ __pyx_t_9 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5tslib_27array_to_datetime, NULL, __pyx_n_s_pandas_tslib); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1000; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); if (PyDict_SetItem(__pyx_d, __pyx_n_s_array_to_datetime, __pyx_t_9) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1000; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; /* "pandas/tslib.pyx":1169 * return oresult * * def array_to_timedelta64(ndarray[object] values, coerce=False): # <<<<<<<<<<<<<< * """ convert an ndarray to an array of ints that are timedeltas * force conversion if coerce = True, */ __pyx_t_9 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5tslib_29array_to_timedelta64, NULL, __pyx_n_s_pandas_tslib); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1169; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); if (PyDict_SetItem(__pyx_d, __pyx_n_s_array_to_timedelta64, __pyx_t_9) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1169; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; /* "pandas/tslib.pyx":1185 * return iresult * * def convert_to_timedelta(object ts, object unit='ns', coerce=False): # <<<<<<<<<<<<<< * return convert_to_timedelta64(ts, unit, coerce) * */ __pyx_t_9 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5tslib_31convert_to_timedelta, NULL, __pyx_n_s_pandas_tslib); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1185; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); if (PyDict_SetItem(__pyx_d, __pyx_n_s_convert_to_timedelta, __pyx_t_9) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1185; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; /* "pandas/tslib.pyx":1244 * return ts.astype('timedelta64[ns]') * * def repr_timedelta64(object value, format=None): # <<<<<<<<<<<<<< * """ * provide repr for timedelta64 */ __pyx_t_9 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5tslib_33repr_timedelta64, NULL, __pyx_n_s_pandas_tslib); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1244; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); if (PyDict_SetItem(__pyx_d, __pyx_n_s_repr_timedelta64, __pyx_t_9) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1244; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; /* "pandas/tslib.pyx":1313 * * * def array_strptime(ndarray[object] values, object fmt, coerce=False): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = len(values) */ __pyx_t_9 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5tslib_35array_strptime, NULL, __pyx_n_s_pandas_tslib); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1313; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); if (PyDict_SetItem(__pyx_d, __pyx_n_s_array_strptime, __pyx_t_9) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1313; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; /* "pandas/tslib.pyx":1599 * return (base*m) + (frac*m) * * def cast_to_nanoseconds(ndarray arr): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = arr.size */ __pyx_t_9 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5tslib_39cast_to_nanoseconds, NULL, __pyx_n_s_pandas_tslib); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1599; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); if (PyDict_SetItem(__pyx_d, __pyx_n_s_cast_to_nanoseconds, __pyx_t_9) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1599; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; /* "pandas/tslib.pyx":1631 * * * def pydt_to_i8(object pydt): # <<<<<<<<<<<<<< * ''' * Convert to int64 representation compatible with numpy datetime64; converts */ __pyx_t_9 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5tslib_41pydt_to_i8, NULL, __pyx_n_s_pandas_tslib); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1631; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); if (PyDict_SetItem(__pyx_d, __pyx_n_s_pydt_to_i8, __pyx_t_9) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1631; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; /* "pandas/tslib.pyx":1643 * return ts.value * * def i8_to_pydt(int64_t i8, object tzinfo = None): # <<<<<<<<<<<<<< * ''' * Inverse of pydt_to_i8 */ __pyx_t_9 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5tslib_43i8_to_pydt, NULL, __pyx_n_s_pandas_tslib); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1643; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); if (PyDict_SetItem(__pyx_d, __pyx_n_s_i8_to_pydt, __pyx_t_9) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1643; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; /* "pandas/tslib.pyx":1652 * # time zone conversion helpers * * try: # <<<<<<<<<<<<<< * from dateutil.tz import tzutc as _du_utc * import pytz */ { __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_6, &__pyx_t_5); __Pyx_XGOTREF(__pyx_t_7); __Pyx_XGOTREF(__pyx_t_6); __Pyx_XGOTREF(__pyx_t_5); /*try:*/ { /* "pandas/tslib.pyx":1653 * * try: * from dateutil.tz import tzutc as _du_utc # <<<<<<<<<<<<<< * import pytz * UTC = pytz.utc */ __pyx_t_9 = PyList_New(1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1653; __pyx_clineno = __LINE__; goto __pyx_L14_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_INCREF(__pyx_n_s_tzutc); PyList_SET_ITEM(__pyx_t_9, 0, __pyx_n_s_tzutc); __Pyx_GIVEREF(__pyx_n_s_tzutc); __pyx_t_3 = __Pyx_Import(__pyx_n_s_dateutil_tz, __pyx_t_9, -1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1653; __pyx_clineno = __LINE__; goto __pyx_L14_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_9 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_tzutc); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1653; __pyx_clineno = __LINE__; goto __pyx_L14_error;} __Pyx_GOTREF(__pyx_t_9); if (PyDict_SetItem(__pyx_d, __pyx_n_s_du_utc, __pyx_t_9) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1653; __pyx_clineno = __LINE__; goto __pyx_L14_error;} __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/tslib.pyx":1654 * try: * from dateutil.tz import tzutc as _du_utc * import pytz # <<<<<<<<<<<<<< * UTC = pytz.utc * have_pytz = True */ __pyx_t_3 = __Pyx_Import(__pyx_n_s_pytz, 0, -1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1654; __pyx_clineno = __LINE__; goto __pyx_L14_error;} __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_pytz, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1654; __pyx_clineno = __LINE__; goto __pyx_L14_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/tslib.pyx":1655 * from dateutil.tz import tzutc as _du_utc * import pytz * UTC = pytz.utc # <<<<<<<<<<<<<< * have_pytz = True * except: */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_pytz); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1655; __pyx_clineno = __LINE__; goto __pyx_L14_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_utc); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1655; __pyx_clineno = __LINE__; goto __pyx_L14_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (PyDict_SetItem(__pyx_d, __pyx_n_s_UTC, __pyx_t_9) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1655; __pyx_clineno = __LINE__; goto __pyx_L14_error;} __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; /* "pandas/tslib.pyx":1656 * import pytz * UTC = pytz.utc * have_pytz = True # <<<<<<<<<<<<<< * except: * have_pytz = False */ if (PyDict_SetItem(__pyx_d, __pyx_n_s_have_pytz, Py_True) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1656; __pyx_clineno = __LINE__; goto __pyx_L14_error;} } __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; goto __pyx_L21_try_end; __pyx_L14_error:; __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __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; __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; /* "pandas/tslib.pyx":1657 * UTC = pytz.utc * have_pytz = True * except: # <<<<<<<<<<<<<< * have_pytz = False * */ /*except:*/ { __Pyx_AddTraceback("pandas.tslib", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_9, &__pyx_t_3, &__pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1657; __pyx_clineno = __LINE__; goto __pyx_L16_except_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_GOTREF(__pyx_t_3); __Pyx_GOTREF(__pyx_t_2); /* "pandas/tslib.pyx":1658 * have_pytz = True * except: * have_pytz = False # <<<<<<<<<<<<<< * * def tz_convert(ndarray[int64_t] vals, object tz1, object tz2): */ if (PyDict_SetItem(__pyx_d, __pyx_n_s_have_pytz, Py_False) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1658; __pyx_clineno = __LINE__; goto __pyx_L16_except_error;} __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; goto __pyx_L15_exception_handled; } __pyx_L16_except_error:; __Pyx_XGIVEREF(__pyx_t_7); __Pyx_XGIVEREF(__pyx_t_6); __Pyx_XGIVEREF(__pyx_t_5); __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_6, __pyx_t_5); goto __pyx_L1_error; __pyx_L15_exception_handled:; __Pyx_XGIVEREF(__pyx_t_7); __Pyx_XGIVEREF(__pyx_t_6); __Pyx_XGIVEREF(__pyx_t_5); __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_6, __pyx_t_5); __pyx_L21_try_end:; } /* "pandas/tslib.pyx":1660 * have_pytz = False * * def tz_convert(ndarray[int64_t] vals, object tz1, object tz2): # <<<<<<<<<<<<<< * cdef: * ndarray[int64_t] utc_dates, result, trans, deltas */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5tslib_45tz_convert, NULL, __pyx_n_s_pandas_tslib); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1660; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_tz_convert, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1660; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/tslib.pyx":1738 * return result * * def tz_convert_single(int64_t val, object tz1, object tz2): # <<<<<<<<<<<<<< * cdef: * ndarray[int64_t] trans, deltas */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5tslib_47tz_convert_single, NULL, __pyx_n_s_pandas_tslib); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1738; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_tz_convert_single, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1738; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/tslib.pyx":1785 * * * trans_cache = {} # <<<<<<<<<<<<<< * utc_offset_cache = {} * */ __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1785; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_trans_cache, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1785; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/tslib.pyx":1786 * * trans_cache = {} * utc_offset_cache = {} # <<<<<<<<<<<<<< * * def _get_transitions(tz): */ __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1786; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_utc_offset_cache, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1786; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/tslib.pyx":1788 * utc_offset_cache = {} * * def _get_transitions(tz): # <<<<<<<<<<<<<< * """ * Get UTC times of DST transitions */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5tslib_49_get_transitions, NULL, __pyx_n_s_pandas_tslib); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1788; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_get_transitions, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1788; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/tslib.pyx":1812 * return trans_cache[tz] * * def _get_deltas(tz): # <<<<<<<<<<<<<< * """ * Get UTC offsets in microseconds corresponding to DST transitions */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5tslib_51_get_deltas, NULL, __pyx_n_s_pandas_tslib); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1812; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_get_deltas, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1812; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/tslib.pyx":1837 * 10**6) * * def tot_seconds(td): # <<<<<<<<<<<<<< * return total_seconds(td) * */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5tslib_53tot_seconds, NULL, __pyx_n_s_pandas_tslib); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1837; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_tot_seconds, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1837; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/tslib.pyx":1856 * @cython.boundscheck(False) * @cython.wraparound(False) * def tz_localize_to_utc(ndarray[int64_t] vals, object tz, bint infer_dst=False): # <<<<<<<<<<<<<< * """ * Localize tzinfo-naive DateRange to given time zone (using pytz). If */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5tslib_57tz_localize_to_utc, NULL, __pyx_n_s_pandas_tslib); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1856; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_tz_localize_to_utc, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1856; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/tslib.pyx":2028 * #---------------------------------------------------------------------- * * def build_field_sarray(ndarray[int64_t] dtindex): # <<<<<<<<<<<<<< * ''' * Datetime as int64 representation to a structured array of fields */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5tslib_59build_field_sarray, NULL, __pyx_n_s_pandas_tslib); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2028; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_build_field_sarray, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2028; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/tslib.pyx":2070 * return out * * def get_time_micros(ndarray[int64_t] dtindex): # <<<<<<<<<<<<<< * ''' * Datetime as int64 representation to a structured array of fields */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5tslib_61get_time_micros, NULL, __pyx_n_s_pandas_tslib); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2070; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_get_time_micros, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2070; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/tslib.pyx":2089 * * @cython.wraparound(False) * def get_date_field(ndarray[int64_t] dtindex, object field): # <<<<<<<<<<<<<< * ''' * Given a int64-based datetime index, extract the year, month, etc., */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5tslib_63get_date_field, NULL, __pyx_n_s_pandas_tslib); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2089; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_get_date_field, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2089; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/tslib.pyx":2236 * return ts_dayofweek(ts) * * cdef int64_t DAY_NS = 86400000000000LL # <<<<<<<<<<<<<< * * */ __pyx_v_6pandas_5tslib_DAY_NS = 86400000000000LL; /* "pandas/tslib.pyx":2239 * * * def date_normalize(ndarray[int64_t] stamps, tz=None): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = len(stamps) */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5tslib_65date_normalize, NULL, __pyx_n_s_pandas_tslib); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2239; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_date_normalize, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2239; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/tslib.pyx":2334 * * * def dates_normalized(ndarray[int64_t] stamps, tz=None): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = len(stamps) */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5tslib_67dates_normalized, NULL, __pyx_n_s_pandas_tslib); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2334; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_dates_normalized, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2334; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/tslib.pyx":2372 * #---------------------------------------------------------------------- * * def isleapyear(int64_t year): # <<<<<<<<<<<<<< * return is_leapyear(year) * */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5tslib_69isleapyear, NULL, __pyx_n_s_pandas_tslib); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2372; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_isleapyear, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2372; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/tslib.pyx":2375 * return is_leapyear(year) * * def monthrange(int64_t year, int64_t month): # <<<<<<<<<<<<<< * cdef: * int64_t days */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5tslib_71monthrange, NULL, __pyx_n_s_pandas_tslib); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2375; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_monthrange, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2375; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/tslib.pyx":2529 * int get_yq(int64_t ordinal, int freq, int *quarter, int *year) * * initialize_daytime_conversion_factor_matrix() # <<<<<<<<<<<<<< * * # Period logic */ initialize_daytime_conversion_factor_matrix(); /* "pandas/tslib.pyx":2554 * return period_ord_w_mult * mult + 1; * * def dt64arr_to_periodarr(ndarray[int64_t] dtarr, int freq, tz=None): # <<<<<<<<<<<<<< * """ * Convert array of datetime64 values (passed in as 'i8' dtype) to a set of */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5tslib_75dt64arr_to_periodarr, NULL, __pyx_n_s_pandas_tslib); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2554; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_dt64arr_to_periodarr, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2554; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/tslib.pyx":2577 * return out * * def periodarr_to_dt64arr(ndarray[int64_t] periodarr, int freq): # <<<<<<<<<<<<<< * """ * Convert array to datetime64 values from a set of ordinals corresponding to */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5tslib_77periodarr_to_dt64arr, NULL, __pyx_n_s_pandas_tslib); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2577; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_periodarr_to_dt64arr, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2577; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/tslib.pyx":2595 * return out * * cdef char START = 'S' # <<<<<<<<<<<<<< * cdef char END = 'E' * */ __pyx_v_6pandas_5tslib_START = 'S'; /* "pandas/tslib.pyx":2596 * * cdef char START = 'S' * cdef char END = 'E' # <<<<<<<<<<<<<< * * cpdef int64_t period_asfreq(int64_t period_ordinal, int freq1, int freq2, */ __pyx_v_6pandas_5tslib_END = 'E'; /* "pandas/tslib.pyx":2617 * return retval * * def period_asfreq_arr(ndarray[int64_t] arr, int freq1, int freq2, bint end): # <<<<<<<<<<<<<< * """ * Convert int64-array of period ordinals from one frequency to another, and */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5tslib_81period_asfreq_arr, NULL, __pyx_n_s_pandas_tslib); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2617; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_period_asfreq_arr, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2617; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/tslib.pyx":2649 * return result * * def period_ordinal(int y, int m, int d, int h, int min, int s, int us, int ps, int freq): # <<<<<<<<<<<<<< * cdef: * int64_t ordinal */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5tslib_83period_ordinal, NULL, __pyx_n_s_pandas_tslib); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2649; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_period_ordinal, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2649; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/tslib.pyx":2676 * return pandas_datetimestruct_to_datetime(PANDAS_FR_ns, &dts) * * def period_format(int64_t value, int freq, object fmt=None): # <<<<<<<<<<<<<< * cdef: * int freq_group */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5tslib_87period_format, NULL, __pyx_n_s_pandas_tslib); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2676; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_period_format, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2676; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/tslib.pyx":2714 * * * cdef list extra_fmts = [(b"%q", b"^`AB`^"), # <<<<<<<<<<<<<< * (b"%f", b"^`CD`^"), * (b"%F", b"^`EF`^"), */ __pyx_t_2 = PyList_New(6); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2714; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_tuple__250); PyList_SET_ITEM(__pyx_t_2, 0, __pyx_tuple__250); __Pyx_GIVEREF(__pyx_tuple__250); __Pyx_INCREF(__pyx_tuple__251); PyList_SET_ITEM(__pyx_t_2, 1, __pyx_tuple__251); __Pyx_GIVEREF(__pyx_tuple__251); __Pyx_INCREF(__pyx_tuple__252); PyList_SET_ITEM(__pyx_t_2, 2, __pyx_tuple__252); __Pyx_GIVEREF(__pyx_tuple__252); __Pyx_INCREF(__pyx_tuple__253); PyList_SET_ITEM(__pyx_t_2, 3, __pyx_tuple__253); __Pyx_GIVEREF(__pyx_tuple__253); __Pyx_INCREF(__pyx_tuple__254); PyList_SET_ITEM(__pyx_t_2, 4, __pyx_tuple__254); __Pyx_GIVEREF(__pyx_tuple__254); __Pyx_INCREF(__pyx_tuple__255); PyList_SET_ITEM(__pyx_t_2, 5, __pyx_tuple__255); __Pyx_GIVEREF(__pyx_tuple__255); __Pyx_XGOTREF(__pyx_v_6pandas_5tslib_extra_fmts); __Pyx_DECREF_SET(__pyx_v_6pandas_5tslib_extra_fmts, ((PyObject*)__pyx_t_2)); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/tslib.pyx":2721 * (b"%n", b"^`KL`^")] * * cdef list str_extra_fmts = ["^`AB`^", "^`CD`^", "^`EF`^", "^`GH`^", "^`IJ`^", "^`KL`^"] # <<<<<<<<<<<<<< * * cdef object _period_strftime(int64_t value, int freq, object fmt): */ __pyx_t_2 = PyList_New(6); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2721; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_kp_s_AB); PyList_SET_ITEM(__pyx_t_2, 0, __pyx_kp_s_AB); __Pyx_GIVEREF(__pyx_kp_s_AB); __Pyx_INCREF(__pyx_kp_s_CD); PyList_SET_ITEM(__pyx_t_2, 1, __pyx_kp_s_CD); __Pyx_GIVEREF(__pyx_kp_s_CD); __Pyx_INCREF(__pyx_kp_s_EF); PyList_SET_ITEM(__pyx_t_2, 2, __pyx_kp_s_EF); __Pyx_GIVEREF(__pyx_kp_s_EF); __Pyx_INCREF(__pyx_kp_s_GH); PyList_SET_ITEM(__pyx_t_2, 3, __pyx_kp_s_GH); __Pyx_GIVEREF(__pyx_kp_s_GH); __Pyx_INCREF(__pyx_kp_s_IJ); PyList_SET_ITEM(__pyx_t_2, 4, __pyx_kp_s_IJ); __Pyx_GIVEREF(__pyx_kp_s_IJ); __Pyx_INCREF(__pyx_kp_s_KL); PyList_SET_ITEM(__pyx_t_2, 5, __pyx_kp_s_KL); __Pyx_GIVEREF(__pyx_kp_s_KL); __Pyx_XGOTREF(__pyx_v_6pandas_5tslib_str_extra_fmts); __Pyx_DECREF_SET(__pyx_v_6pandas_5tslib_str_extra_fmts, ((PyObject*)__pyx_t_2)); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/tslib.pyx":2779 * ctypedef int (*accessor)(int64_t ordinal, int freq) except INT32_MIN * * def get_period_field(int code, int64_t value, int freq): # <<<<<<<<<<<<<< * cdef accessor f = _get_accessor_func(code) * if f is NULL: */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5tslib_89get_period_field, NULL, __pyx_n_s_pandas_tslib); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2779; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_get_period_field, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2779; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/tslib.pyx":2785 * return f(value, freq) * * def get_period_field_arr(int code, ndarray[int64_t] arr, int freq): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, sz */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5tslib_91get_period_field_arr, NULL, __pyx_n_s_pandas_tslib); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2785; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_get_period_field_arr, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2785; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/tslib.pyx":2831 * * * def extract_ordinals(ndarray[object] values, freq): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = len(values) */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5tslib_93extract_ordinals, NULL, __pyx_n_s_pandas_tslib); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2831; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_extract_ordinals, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2831; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/tslib.pyx":2865 * return reso * * US_RESO = 0 # <<<<<<<<<<<<<< * S_RESO = 1 * T_RESO = 2 */ if (PyDict_SetItem(__pyx_d, __pyx_n_s_US_RESO, __pyx_int_0) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2865; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/tslib.pyx":2866 * * US_RESO = 0 * S_RESO = 1 # <<<<<<<<<<<<<< * T_RESO = 2 * H_RESO = 3 */ if (PyDict_SetItem(__pyx_d, __pyx_n_s_S_RESO, __pyx_int_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2866; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/tslib.pyx":2867 * US_RESO = 0 * S_RESO = 1 * T_RESO = 2 # <<<<<<<<<<<<<< * H_RESO = 3 * D_RESO = 4 */ if (PyDict_SetItem(__pyx_d, __pyx_n_s_T_RESO, __pyx_int_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2867; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/tslib.pyx":2868 * S_RESO = 1 * T_RESO = 2 * H_RESO = 3 # <<<<<<<<<<<<<< * D_RESO = 4 * */ if (PyDict_SetItem(__pyx_d, __pyx_n_s_H_RESO, __pyx_int_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2868; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/tslib.pyx":2869 * T_RESO = 2 * H_RESO = 3 * D_RESO = 4 # <<<<<<<<<<<<<< * * cdef inline int _reso_stamp(pandas_datetimestruct *dts): */ if (PyDict_SetItem(__pyx_d, __pyx_n_s_D_RESO, __pyx_int_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2869; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/tslib.pyx":2957 * * """ * import time # <<<<<<<<<<<<<< * import locale * import calendar */ __pyx_t_2 = __Pyx_Import(__pyx_n_s_time, 0, -1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2957; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_time, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2957; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/tslib.pyx":2958 * """ * import time * import locale # <<<<<<<<<<<<<< * import calendar * from re import compile as re_compile */ __pyx_t_2 = __Pyx_Import(__pyx_n_s_locale, 0, -1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2958; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_locale, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2958; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/tslib.pyx":2959 * import time * import locale * import calendar # <<<<<<<<<<<<<< * from re import compile as re_compile * from re import IGNORECASE */ __pyx_t_2 = __Pyx_Import(__pyx_n_s_calendar, 0, -1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2959; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_calendar, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2959; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/tslib.pyx":2960 * import locale * import calendar * from re import compile as re_compile # <<<<<<<<<<<<<< * from re import IGNORECASE * from re import escape as re_escape */ __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2960; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_n_s_compile); PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_compile); __Pyx_GIVEREF(__pyx_n_s_compile); __pyx_t_3 = __Pyx_Import(__pyx_n_s_re, __pyx_t_2, -1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2960; __pyx_clineno = __LINE__; goto __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_compile); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2960; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_re_compile, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2960; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/tslib.pyx":2961 * import calendar * from re import compile as re_compile * from re import IGNORECASE # <<<<<<<<<<<<<< * from re import escape as re_escape * from datetime import date as datetime_date */ __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2961; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_n_s_IGNORECASE); PyList_SET_ITEM(__pyx_t_3, 0, __pyx_n_s_IGNORECASE); __Pyx_GIVEREF(__pyx_n_s_IGNORECASE); __pyx_t_2 = __Pyx_Import(__pyx_n_s_re, __pyx_t_3, -1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2961; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_IGNORECASE); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2961; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_IGNORECASE, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2961; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/tslib.pyx":2962 * from re import compile as re_compile * from re import IGNORECASE * from re import escape as re_escape # <<<<<<<<<<<<<< * from datetime import date as datetime_date * */ __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2962; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_n_s_escape); PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_escape); __Pyx_GIVEREF(__pyx_n_s_escape); __pyx_t_3 = __Pyx_Import(__pyx_n_s_re, __pyx_t_2, -1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2962; __pyx_clineno = __LINE__; goto __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_escape); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2962; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_re_escape, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2962; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/tslib.pyx":2963 * from re import IGNORECASE * from re import escape as re_escape * from datetime import date as datetime_date # <<<<<<<<<<<<<< * * # Python 2 vs Python 3 */ __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2963; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_n_s_date); PyList_SET_ITEM(__pyx_t_3, 0, __pyx_n_s_date); __Pyx_GIVEREF(__pyx_n_s_date); __pyx_t_2 = __Pyx_Import(__pyx_n_s_datetime, __pyx_t_3, -1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2963; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_date); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2963; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_datetime_date, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2963; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/tslib.pyx":2966 * * # Python 2 vs Python 3 * try: # <<<<<<<<<<<<<< * from thread import allocate_lock as _thread_allocate_lock * except: */ { __Pyx_ExceptionSave(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7); __Pyx_XGOTREF(__pyx_t_5); __Pyx_XGOTREF(__pyx_t_6); __Pyx_XGOTREF(__pyx_t_7); /*try:*/ { /* "pandas/tslib.pyx":2967 * # Python 2 vs Python 3 * try: * from thread import allocate_lock as _thread_allocate_lock # <<<<<<<<<<<<<< * except: * try: */ __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2967; __pyx_clineno = __LINE__; goto __pyx_L24_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_n_s_allocate_lock); PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_allocate_lock); __Pyx_GIVEREF(__pyx_n_s_allocate_lock); __pyx_t_3 = __Pyx_Import(__pyx_n_s_thread, __pyx_t_2, -1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2967; __pyx_clineno = __LINE__; goto __pyx_L24_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_allocate_lock); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2967; __pyx_clineno = __LINE__; goto __pyx_L24_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_thread_allocate_lock, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2967; __pyx_clineno = __LINE__; goto __pyx_L24_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; goto __pyx_L31_try_end; __pyx_L24_error:; __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/tslib.pyx":2968 * try: * from thread import allocate_lock as _thread_allocate_lock * except: # <<<<<<<<<<<<<< * try: * from _thread import allocate_lock as _thread_allocate_lock */ /*except:*/ { __Pyx_AddTraceback("pandas.tslib", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_3, &__pyx_t_2, &__pyx_t_9) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2968; __pyx_clineno = __LINE__; goto __pyx_L26_except_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_GOTREF(__pyx_t_2); __Pyx_GOTREF(__pyx_t_9); /* "pandas/tslib.pyx":2969 * from thread import allocate_lock as _thread_allocate_lock * except: * try: # <<<<<<<<<<<<<< * from _thread import allocate_lock as _thread_allocate_lock * except: */ { __Pyx_ExceptionSave(&__pyx_t_14, &__pyx_t_15, &__pyx_t_16); __Pyx_XGOTREF(__pyx_t_14); __Pyx_XGOTREF(__pyx_t_15); __Pyx_XGOTREF(__pyx_t_16); /*try:*/ { /* "pandas/tslib.pyx":2970 * except: * try: * from _thread import allocate_lock as _thread_allocate_lock # <<<<<<<<<<<<<< * except: * try: */ __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2970; __pyx_clineno = __LINE__; goto __pyx_L34_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_n_s_allocate_lock); PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_allocate_lock); __Pyx_GIVEREF(__pyx_n_s_allocate_lock); __pyx_t_10 = __Pyx_Import(__pyx_n_s_thread_2, __pyx_t_1, -1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2970; __pyx_clineno = __LINE__; goto __pyx_L34_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_10, __pyx_n_s_allocate_lock); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2970; __pyx_clineno = __LINE__; goto __pyx_L34_error;} __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_thread_allocate_lock, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2970; __pyx_clineno = __LINE__; goto __pyx_L34_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; } __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0; __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0; goto __pyx_L41_try_end; __pyx_L34_error:; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; /* "pandas/tslib.pyx":2971 * try: * from _thread import allocate_lock as _thread_allocate_lock * except: # <<<<<<<<<<<<<< * try: * from dummy_thread import allocate_lock as _thread_allocate_lock */ /*except:*/ { __Pyx_AddTraceback("pandas.tslib", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_10, &__pyx_t_1, &__pyx_t_17) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2971; __pyx_clineno = __LINE__; goto __pyx_L36_except_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_GOTREF(__pyx_t_1); __Pyx_GOTREF(__pyx_t_17); /* "pandas/tslib.pyx":2972 * from _thread import allocate_lock as _thread_allocate_lock * except: * try: # <<<<<<<<<<<<<< * from dummy_thread import allocate_lock as _thread_allocate_lock * except: */ { __Pyx_ExceptionSave(&__pyx_t_18, &__pyx_t_19, &__pyx_t_20); __Pyx_XGOTREF(__pyx_t_18); __Pyx_XGOTREF(__pyx_t_19); __Pyx_XGOTREF(__pyx_t_20); /*try:*/ { /* "pandas/tslib.pyx":2973 * except: * try: * from dummy_thread import allocate_lock as _thread_allocate_lock # <<<<<<<<<<<<<< * except: * from _dummy_thread import allocate_lock as _thread_allocate_lock */ __pyx_t_21 = PyList_New(1); if (unlikely(!__pyx_t_21)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2973; __pyx_clineno = __LINE__; goto __pyx_L44_error;} __Pyx_GOTREF(__pyx_t_21); __Pyx_INCREF(__pyx_n_s_allocate_lock); PyList_SET_ITEM(__pyx_t_21, 0, __pyx_n_s_allocate_lock); __Pyx_GIVEREF(__pyx_n_s_allocate_lock); __pyx_t_22 = __Pyx_Import(__pyx_n_s_dummy_thread, __pyx_t_21, -1); if (unlikely(!__pyx_t_22)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2973; __pyx_clineno = __LINE__; goto __pyx_L44_error;} __Pyx_GOTREF(__pyx_t_22); __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0; __pyx_t_21 = __Pyx_ImportFrom(__pyx_t_22, __pyx_n_s_allocate_lock); if (unlikely(!__pyx_t_21)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2973; __pyx_clineno = __LINE__; goto __pyx_L44_error;} __Pyx_GOTREF(__pyx_t_21); if (PyDict_SetItem(__pyx_d, __pyx_n_s_thread_allocate_lock, __pyx_t_21) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2973; __pyx_clineno = __LINE__; goto __pyx_L44_error;} __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0; __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0; } __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0; __Pyx_XDECREF(__pyx_t_19); __pyx_t_19 = 0; __Pyx_XDECREF(__pyx_t_20); __pyx_t_20 = 0; goto __pyx_L51_try_end; __pyx_L44_error:; __Pyx_XDECREF(__pyx_t_21); __pyx_t_21 = 0; __Pyx_XDECREF(__pyx_t_22); __pyx_t_22 = 0; /* "pandas/tslib.pyx":2974 * try: * from dummy_thread import allocate_lock as _thread_allocate_lock * except: # <<<<<<<<<<<<<< * from _dummy_thread import allocate_lock as _thread_allocate_lock * */ /*except:*/ { __Pyx_AddTraceback("pandas.tslib", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_22, &__pyx_t_21, &__pyx_t_23) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2974; __pyx_clineno = __LINE__; goto __pyx_L46_except_error;} __Pyx_GOTREF(__pyx_t_22); __Pyx_GOTREF(__pyx_t_21); __Pyx_GOTREF(__pyx_t_23); /* "pandas/tslib.pyx":2975 * from dummy_thread import allocate_lock as _thread_allocate_lock * except: * from _dummy_thread import allocate_lock as _thread_allocate_lock # <<<<<<<<<<<<<< * * __all__ = [] */ __pyx_t_24 = PyList_New(1); if (unlikely(!__pyx_t_24)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2975; __pyx_clineno = __LINE__; goto __pyx_L46_except_error;} __Pyx_GOTREF(__pyx_t_24); __Pyx_INCREF(__pyx_n_s_allocate_lock); PyList_SET_ITEM(__pyx_t_24, 0, __pyx_n_s_allocate_lock); __Pyx_GIVEREF(__pyx_n_s_allocate_lock); __pyx_t_25 = __Pyx_Import(__pyx_n_s_dummy_thread_2, __pyx_t_24, -1); if (unlikely(!__pyx_t_25)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2975; __pyx_clineno = __LINE__; goto __pyx_L46_except_error;} __Pyx_GOTREF(__pyx_t_25); __Pyx_DECREF(__pyx_t_24); __pyx_t_24 = 0; __pyx_t_24 = __Pyx_ImportFrom(__pyx_t_25, __pyx_n_s_allocate_lock); if (unlikely(!__pyx_t_24)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2975; __pyx_clineno = __LINE__; goto __pyx_L46_except_error;} __Pyx_GOTREF(__pyx_t_24); if (PyDict_SetItem(__pyx_d, __pyx_n_s_thread_allocate_lock, __pyx_t_24) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2975; __pyx_clineno = __LINE__; goto __pyx_L46_except_error;} __Pyx_DECREF(__pyx_t_24); __pyx_t_24 = 0; __Pyx_DECREF(__pyx_t_25); __pyx_t_25 = 0; __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0; __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0; __Pyx_DECREF(__pyx_t_23); __pyx_t_23 = 0; goto __pyx_L45_exception_handled; } __pyx_L46_except_error:; __Pyx_XGIVEREF(__pyx_t_18); __Pyx_XGIVEREF(__pyx_t_19); __Pyx_XGIVEREF(__pyx_t_20); __Pyx_ExceptionReset(__pyx_t_18, __pyx_t_19, __pyx_t_20); goto __pyx_L36_except_error; __pyx_L45_exception_handled:; __Pyx_XGIVEREF(__pyx_t_18); __Pyx_XGIVEREF(__pyx_t_19); __Pyx_XGIVEREF(__pyx_t_20); __Pyx_ExceptionReset(__pyx_t_18, __pyx_t_19, __pyx_t_20); __pyx_L51_try_end:; } __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; goto __pyx_L35_exception_handled; } __pyx_L36_except_error:; __Pyx_XGIVEREF(__pyx_t_14); __Pyx_XGIVEREF(__pyx_t_15); __Pyx_XGIVEREF(__pyx_t_16); __Pyx_ExceptionReset(__pyx_t_14, __pyx_t_15, __pyx_t_16); goto __pyx_L26_except_error; __pyx_L35_exception_handled:; __Pyx_XGIVEREF(__pyx_t_14); __Pyx_XGIVEREF(__pyx_t_15); __Pyx_XGIVEREF(__pyx_t_16); __Pyx_ExceptionReset(__pyx_t_14, __pyx_t_15, __pyx_t_16); __pyx_L41_try_end:; } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; goto __pyx_L25_exception_handled; } __pyx_L26_except_error:; __Pyx_XGIVEREF(__pyx_t_5); __Pyx_XGIVEREF(__pyx_t_6); __Pyx_XGIVEREF(__pyx_t_7); __Pyx_ExceptionReset(__pyx_t_5, __pyx_t_6, __pyx_t_7); goto __pyx_L1_error; __pyx_L25_exception_handled:; __Pyx_XGIVEREF(__pyx_t_5); __Pyx_XGIVEREF(__pyx_t_6); __Pyx_XGIVEREF(__pyx_t_7); __Pyx_ExceptionReset(__pyx_t_5, __pyx_t_6, __pyx_t_7); __pyx_L31_try_end:; } /* "pandas/tslib.pyx":2977 * from _dummy_thread import allocate_lock as _thread_allocate_lock * * __all__ = [] # <<<<<<<<<<<<<< * * def _getlang(): */ __pyx_t_9 = PyList_New(0); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2977; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); if (PyDict_SetItem(__pyx_d, __pyx_n_s_all_2, __pyx_t_9) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2977; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; /* "pandas/tslib.pyx":2979 * __all__ = [] * * def _getlang(): # <<<<<<<<<<<<<< * # Figure out what the current language is set to. * return locale.getlocale(locale.LC_TIME) */ __pyx_t_9 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5tslib_97_getlang, NULL, __pyx_n_s_pandas_tslib); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2979; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); if (PyDict_SetItem(__pyx_d, __pyx_n_s_getlang, __pyx_t_9) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2979; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; /* "pandas/tslib.pyx":2983 * return locale.getlocale(locale.LC_TIME) * * class LocaleTime(object): # <<<<<<<<<<<<<< * """Stores and handles locale-specific information related to time. * */ __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2983; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_INCREF(__pyx_builtin_object); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_builtin_object); __Pyx_GIVEREF(__pyx_builtin_object); __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_9); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2983; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_9, __pyx_n_s_LocaleTime, __pyx_n_s_LocaleTime, (PyObject *) NULL, __pyx_n_s_pandas_tslib, __pyx_kp_s_Stores_and_handles_locale_specif); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2983; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); /* "pandas/tslib.pyx":3002 * """ * * def __init__(self): # <<<<<<<<<<<<<< * """Set all attributes. * */ __pyx_t_17 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6pandas_5tslib_10LocaleTime_1__init__, 0, __pyx_n_s_LocaleTime___init, NULL, __pyx_n_s_pandas_tslib, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__264)); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3002; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_17); if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_init, __pyx_t_17) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3002; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; /* "pandas/tslib.pyx":3031 * raise ValueError("locale changed during initialization") * * def __pad(self, seq, front): # <<<<<<<<<<<<<< * # Add '' to seq to either the front (is True), else the back. * seq = list(seq) */ __pyx_t_17 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6pandas_5tslib_10LocaleTime_3__pad, 0, __pyx_n_s_LocaleTime___pad, NULL, __pyx_n_s_pandas_tslib, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__266)); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3031; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_17); if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_LocaleTime__pad, __pyx_t_17) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3031; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; /* "pandas/tslib.pyx":3040 * return seq * * def __calc_weekday(self): # <<<<<<<<<<<<<< * # Set self.a_weekday and self.f_weekday using the calendar * # module. */ __pyx_t_17 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6pandas_5tslib_10LocaleTime_5__calc_weekday, 0, __pyx_n_s_LocaleTime___calc_weekday, NULL, __pyx_n_s_pandas_tslib, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__268)); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3040; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_17); if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_LocaleTime__calc_weekday, __pyx_t_17) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3040; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; /* "pandas/tslib.pyx":3048 * self.f_weekday = f_weekday * * def __calc_month(self): # <<<<<<<<<<<<<< * # Set self.f_month and self.a_month using the calendar module. * a_month = [calendar.month_abbr[i].lower() for i in range(13)] */ __pyx_t_17 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6pandas_5tslib_10LocaleTime_7__calc_month, 0, __pyx_n_s_LocaleTime___calc_month, NULL, __pyx_n_s_pandas_tslib, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__270)); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3048; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_17); if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_LocaleTime__calc_month, __pyx_t_17) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3048; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; /* "pandas/tslib.pyx":3055 * self.f_month = f_month * * def __calc_am_pm(self): # <<<<<<<<<<<<<< * # Set self.am_pm by using time.strftime(). * */ __pyx_t_17 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6pandas_5tslib_10LocaleTime_9__calc_am_pm, 0, __pyx_n_s_LocaleTime___calc_am_pm, NULL, __pyx_n_s_pandas_tslib, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__272)); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3055; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_17); if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_LocaleTime__calc_am_pm, __pyx_t_17) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3055; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; /* "pandas/tslib.pyx":3067 * self.am_pm = am_pm * * def __calc_date_time(self): # <<<<<<<<<<<<<< * # Set self.date_time, self.date, & self.time by using * # time.strftime(). */ __pyx_t_17 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6pandas_5tslib_10LocaleTime_11__calc_date_time, 0, __pyx_n_s_LocaleTime___calc_date_time, NULL, __pyx_n_s_pandas_tslib, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__274)); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3067; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_17); if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_LocaleTime__calc_date_time, __pyx_t_17) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3067; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; /* "pandas/tslib.pyx":3112 * self.LC_time = date_time[2] * * def __calc_timezone(self): # <<<<<<<<<<<<<< * # Set self.timezone by using time.tzname. * # Do not worry about possibility of time.tzname[0] == timetzname[1] */ __pyx_t_17 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6pandas_5tslib_10LocaleTime_13__calc_timezone, 0, __pyx_n_s_LocaleTime___calc_timezone, NULL, __pyx_n_s_pandas_tslib, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__276)); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3112; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_17); if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_LocaleTime__calc_timezone, __pyx_t_17) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3112; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; /* "pandas/tslib.pyx":2983 * return locale.getlocale(locale.LC_TIME) * * class LocaleTime(object): # <<<<<<<<<<<<<< * """Stores and handles locale-specific information related to time. * */ __pyx_t_17 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_LocaleTime, __pyx_t_9, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2983; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_17); if (PyDict_SetItem(__pyx_d, __pyx_n_s_LocaleTime, __pyx_t_17) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2983; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; /* "pandas/tslib.pyx":3128 * * * class TimeRE(dict): # <<<<<<<<<<<<<< * """Handle conversion from format directives to regexes.""" * */ __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3128; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_INCREF(((PyObject *)((PyObject*)(&PyDict_Type)))); PyTuple_SET_ITEM(__pyx_t_9, 0, ((PyObject *)((PyObject*)(&PyDict_Type)))); __Pyx_GIVEREF(((PyObject *)((PyObject*)(&PyDict_Type)))); __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_9); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3128; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_9, __pyx_n_s_TimeRE, __pyx_n_s_TimeRE, (PyObject *) NULL, __pyx_n_s_pandas_tslib, __pyx_kp_s_Handle_conversion_from_format_di); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3128; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); /* "pandas/tslib.pyx":3131 * """Handle conversion from format directives to regexes.""" * * def __init__(self, locale_time=None): # <<<<<<<<<<<<<< * """Create keys/values. * */ __pyx_t_17 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6pandas_5tslib_6TimeRE_1__init__, 0, __pyx_n_s_TimeRE___init, NULL, __pyx_n_s_pandas_tslib, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__278)); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3131; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_17); __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_17, __pyx_tuple__279); if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_init, __pyx_t_17) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3131; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; /* "pandas/tslib.pyx":3173 * base.__setitem__('X', self.pattern(self.locale_time.LC_time)) * * def __seqToRE(self, to_convert, directive): # <<<<<<<<<<<<<< * """Convert a list to a regex string for matching a directive. * */ __pyx_t_17 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6pandas_5tslib_6TimeRE_3__seqToRE, 0, __pyx_n_s_TimeRE___seqToRE, NULL, __pyx_n_s_pandas_tslib, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__281)); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3173; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_17); if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_TimeRE__seqToRE, __pyx_t_17) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3173; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; /* "pandas/tslib.pyx":3192 * return '%s)' % regex * * def pattern(self, format): # <<<<<<<<<<<<<< * """Return regex pattern for the format string. * */ __pyx_t_17 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6pandas_5tslib_6TimeRE_5pattern, 0, __pyx_n_s_TimeRE_pattern, NULL, __pyx_n_s_pandas_tslib, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__283)); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3192; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_17); if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_pattern, __pyx_t_17) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3192; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; /* "pandas/tslib.pyx":3215 * return "%s%s" % (processed_format, format) * * def compile(self, format): # <<<<<<<<<<<<<< * """Return a compiled re object for the format string.""" * return re_compile(self.pattern(format), IGNORECASE) */ __pyx_t_17 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6pandas_5tslib_6TimeRE_7compile, 0, __pyx_n_s_TimeRE_compile, NULL, __pyx_n_s_pandas_tslib, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__285)); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3215; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_17); if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_compile, __pyx_t_17) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3215; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; /* "pandas/tslib.pyx":3128 * * * class TimeRE(dict): # <<<<<<<<<<<<<< * """Handle conversion from format directives to regexes.""" * */ __pyx_t_17 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_TimeRE, __pyx_t_9, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3128; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_17); if (PyDict_SetItem(__pyx_d, __pyx_n_s_TimeRE, __pyx_t_17) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3128; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; /* "pandas/tslib.pyx":3219 * return re_compile(self.pattern(format), IGNORECASE) * * _cache_lock = _thread_allocate_lock() # <<<<<<<<<<<<<< * # DO NOT modify _TimeRE_cache or _regex_cache without acquiring the cache lock * # first! */ __pyx_t_9 = __Pyx_GetModuleGlobalName(__pyx_n_s_thread_allocate_lock); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3219; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_t_2 = PyObject_Call(__pyx_t_9, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3219; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; if (PyDict_SetItem(__pyx_d, __pyx_n_s_cache_lock, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3219; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/tslib.pyx":3222 * # DO NOT modify _TimeRE_cache or _regex_cache without acquiring the cache lock * # first! * _TimeRE_cache = TimeRE() # <<<<<<<<<<<<<< * _CACHE_MAX_SIZE = 5 # Max number of regexes stored in _regex_cache * _regex_cache = {} */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_TimeRE); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3222; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_9 = PyObject_Call(__pyx_t_2, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3222; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (PyDict_SetItem(__pyx_d, __pyx_n_s_TimeRE_cache, __pyx_t_9) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3222; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; /* "pandas/tslib.pyx":3223 * # first! * _TimeRE_cache = TimeRE() * _CACHE_MAX_SIZE = 5 # Max number of regexes stored in _regex_cache # <<<<<<<<<<<<<< * _regex_cache = {} * */ if (PyDict_SetItem(__pyx_d, __pyx_n_s_CACHE_MAX_SIZE, __pyx_int_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3223; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/tslib.pyx":3224 * _TimeRE_cache = TimeRE() * _CACHE_MAX_SIZE = 5 # Max number of regexes stored in _regex_cache * _regex_cache = {} # <<<<<<<<<<<<<< * * def _calc_julian_from_U_or_W(year, week_of_year, day_of_week, week_starts_Mon): */ __pyx_t_9 = PyDict_New(); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3224; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); if (PyDict_SetItem(__pyx_d, __pyx_n_s_regex_cache, __pyx_t_9) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3224; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; /* "pandas/tslib.pyx":3226 * _regex_cache = {} * * def _calc_julian_from_U_or_W(year, week_of_year, day_of_week, week_starts_Mon): # <<<<<<<<<<<<<< * """Calculate the Julian day based on the year, week of the year, and day of * the week, with week_start_day representing whether the week of the year */ __pyx_t_9 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5tslib_99_calc_julian_from_U_or_W, NULL, __pyx_n_s_pandas_tslib); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3226; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); if (PyDict_SetItem(__pyx_d, __pyx_n_s_calc_julian_from_U_or_W, __pyx_t_9) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3226; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; /* "pandas/tslib.pyx":1 * # cython: profile=False # <<<<<<<<<<<<<< * * cimport numpy as np */ __pyx_t_9 = PyDict_New(); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); if (PyDict_SetItem(__pyx_d, __pyx_n_s_test, __pyx_t_9) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; /* "util.pxd":84 * return False * * cdef inline bint _checknan(object val): # <<<<<<<<<<<<<< * return not cnp.PyArray_Check(val) and val != val */ 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_9); __Pyx_XDECREF(__pyx_t_10); __Pyx_XDECREF(__pyx_t_17); __Pyx_XDECREF(__pyx_t_21); __Pyx_XDECREF(__pyx_t_22); __Pyx_XDECREF(__pyx_t_23); __Pyx_XDECREF(__pyx_t_24); __Pyx_XDECREF(__pyx_t_25); if (__pyx_m) { __Pyx_AddTraceback("init pandas.tslib", __pyx_clineno, __pyx_lineno, __pyx_filename); Py_DECREF(__pyx_m); __pyx_m = 0; } else if (!PyErr_Occurred()) { PyErr_SetString(PyExc_ImportError, "init pandas.tslib"); } __pyx_L0:; __Pyx_RefNannyFinishContext(); #if PY_MAJOR_VERSION < 3 return; #else return __pyx_m; #endif } /* Runtime support code */ #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 /* CYTHON_REFNANNY */ 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; } 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 } 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; } 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); } static void __Pyx_RaiseArgumentTypeInvalid(const char* name, PyObject *obj, PyTypeObject *type) { PyErr_Format(PyExc_TypeError, "Argument '%.200s' has incorrect type (expected %.200s, got %.200s)", name, type->tp_name, Py_TYPE(obj)->tp_name); } static CYTHON_INLINE int __Pyx_ArgTypeTest(PyObject *obj, PyTypeObject *type, int none_allowed, const char *name, int exact) { if (unlikely(!type)) { PyErr_SetString(PyExc_SystemError, "Missing type object"); return 0; } if (none_allowed && obj == Py_None) return 1; else if (exact) { if (likely(Py_TYPE(obj) == type)) return 1; #if PY_MAJOR_VERSION == 2 else if ((type == &PyBaseString_Type) && likely(__Pyx_PyBaseString_CheckExact(obj))) return 1; #endif } else { if (likely(PyObject_TypeCheck(obj, type))) return 1; } __Pyx_RaiseArgumentTypeInvalid(name, obj, type); return 0; } static CYTHON_INLINE int __Pyx_IsLittleEndian(void) { unsigned int n = 1; return *(unsigned char*)(&n) != 0; } 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) /* First char was not a digit */ 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; /* Consume from buffer string */ while (1) { if (field == &ctx->root) { ctx->head = NULL; if (ctx->enc_count != 0) { __Pyx_BufFmt_RaiseExpected(ctx); return -1; } break; /* breaks both loops as ctx->enc_count == 0 */ } 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; /* empty struct */ 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 CYTHON_INLINE 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 != ')') { if (isspace(*ts)) continue; 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 10: case 13: ++ts; break; case '<': if (!__Pyx_IsLittleEndian()) { PyErr_SetString(PyExc_ValueError, "Little-endian buffer not supported on big-endian compiler"); return NULL; } ctx->new_packmode = '='; ++ts; break; case '>': case '!': if (__Pyx_IsLittleEndian()) { 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': /* substruct */ { 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; /* Erase processed last struct element */ 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 '}': /* end of substruct; either repeat or move on */ { size_t alignment = ctx->struct_alignment; ++ts; if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL; ctx->enc_type = 0; /* Erase processed last struct element */ 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; } /* fall through */ 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 's': case 'p': if (ctx->enc_type == *ts && got_Z == ctx->is_complex && ctx->enc_packmode == ctx->new_packmode) { ctx->enc_count += ctx->new_count; } else { 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; } } } } static CYTHON_INLINE 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 CYTHON_INLINE int __Pyx_GetBufferAndValidate( Py_buffer* buf, PyObject* obj, __Pyx_TypeInfo* dtype, int flags, int nd, int cast, __Pyx_BufFmt_StackElem* stack) { if (obj == Py_None || obj == NULL) { __Pyx_ZeroBuffer(buf); return 0; } buf->buf = NULL; if (__Pyx_GetBuffer(obj, buf, flags) == -1) goto fail; if (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 ((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_ZeroBuffer(buf); return -1; } static CYTHON_INLINE void __Pyx_SafeReleaseBuffer(Py_buffer* info) { if (info->buf == NULL) return; if (info->suboffsets == __Pyx_minusones) info->suboffsets = NULL; __Pyx_ReleaseBuffer(info); } static CYTHON_INLINE PyObject *__Pyx_GetModuleGlobalName(PyObject *name) { PyObject *result; #if CYTHON_COMPILING_IN_CPYTHON result = PyDict_GetItem(__pyx_d, name); if (result) { Py_INCREF(result); } else { #else result = PyObject_GetItem(__pyx_d, name); if (!result) { PyErr_Clear(); #endif result = __Pyx_GetBuiltinName(name); } return result; } static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type) { if (unlikely(!type)) { PyErr_SetString(PyExc_SystemError, "Missing type object"); return 0; } if (likely(PyObject_TypeCheck(obj, type))) return 1; PyErr_Format(PyExc_TypeError, "Cannot convert %.200s to %.200s", Py_TYPE(obj)->tp_name, type->tp_name); return 0; } static void __Pyx_RaiseBufferIndexError(int axis) { PyErr_Format(PyExc_IndexError, "Out of bounds on buffer access (axis %d)", axis); } static CYTHON_INLINE void __Pyx_ErrRestore(PyObject *type, PyObject *value, PyObject *tb) { #if CYTHON_COMPILING_IN_CPYTHON PyObject *tmp_type, *tmp_value, *tmp_tb; PyThreadState *tstate = PyThreadState_GET(); 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); #else PyErr_Restore(type, value, tb); #endif } static CYTHON_INLINE void __Pyx_ErrFetch(PyObject **type, PyObject **value, PyObject **tb) { #if CYTHON_COMPILING_IN_CPYTHON PyThreadState *tstate = PyThreadState_GET(); *type = tstate->curexc_type; *value = tstate->curexc_value; *tb = tstate->curexc_traceback; tstate->curexc_type = 0; tstate->curexc_value = 0; tstate->curexc_traceback = 0; #else PyErr_Fetch(type, value, tb); #endif } static CYTHON_INLINE void __Pyx_ExceptionSave(PyObject **type, PyObject **value, PyObject **tb) { #if CYTHON_COMPILING_IN_CPYTHON PyThreadState *tstate = PyThreadState_GET(); *type = tstate->exc_type; *value = tstate->exc_value; *tb = tstate->exc_traceback; Py_XINCREF(*type); Py_XINCREF(*value); Py_XINCREF(*tb); #else PyErr_GetExcInfo(type, value, tb); #endif } static void __Pyx_ExceptionReset(PyObject *type, PyObject *value, PyObject *tb) { #if CYTHON_COMPILING_IN_CPYTHON PyObject *tmp_type, *tmp_value, *tmp_tb; PyThreadState *tstate = PyThreadState_GET(); tmp_type = tstate->exc_type; tmp_value = tstate->exc_value; tmp_tb = tstate->exc_traceback; tstate->exc_type = type; tstate->exc_value = value; tstate->exc_traceback = tb; Py_XDECREF(tmp_type); Py_XDECREF(tmp_value); Py_XDECREF(tmp_tb); #else PyErr_SetExcInfo(type, value, tb); #endif } static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb) { PyObject *local_type, *local_value, *local_tb; #if CYTHON_COMPILING_IN_CPYTHON PyObject *tmp_type, *tmp_value, *tmp_tb; PyThreadState *tstate = PyThreadState_GET(); local_type = tstate->curexc_type; local_value = tstate->curexc_value; local_tb = tstate->curexc_traceback; tstate->curexc_type = 0; tstate->curexc_value = 0; tstate->curexc_traceback = 0; #else PyErr_Fetch(&local_type, &local_value, &local_tb); #endif PyErr_NormalizeException(&local_type, &local_value, &local_tb); #if CYTHON_COMPILING_IN_CPYTHON if (unlikely(tstate->curexc_type)) #else if (unlikely(PyErr_Occurred())) #endif goto bad; #if PY_MAJOR_VERSION >= 3 if (local_tb) { if (unlikely(PyException_SetTraceback(local_value, local_tb) < 0)) goto bad; } #endif Py_XINCREF(local_tb); Py_XINCREF(local_type); Py_XINCREF(local_value); *type = local_type; *value = local_value; *tb = local_tb; #if CYTHON_COMPILING_IN_CPYTHON tmp_type = tstate->exc_type; tmp_value = tstate->exc_value; tmp_tb = tstate->exc_traceback; tstate->exc_type = local_type; tstate->exc_value = local_value; tstate->exc_traceback = local_tb; Py_XDECREF(tmp_type); Py_XDECREF(tmp_value); Py_XDECREF(tmp_tb); #else PyErr_SetExcInfo(local_type, local_value, local_tb); #endif return 0; bad: *type = 0; *value = 0; *tb = 0; Py_XDECREF(local_type); Py_XDECREF(local_value); Py_XDECREF(local_tb); return -1; } 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; } static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j) { PyObject *r; if (!j) return NULL; r = PyObject_GetItem(o, j); Py_DECREF(j); return r; } static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i, int wraparound, int boundscheck) { #if CYTHON_COMPILING_IN_CPYTHON if (wraparound & unlikely(i < 0)) i += PyList_GET_SIZE(o); if ((!boundscheck) || likely((0 <= i) & (i < PyList_GET_SIZE(o)))) { PyObject *r = PyList_GET_ITEM(o, i); Py_INCREF(r); return r; } return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i)); #else return PySequence_GetItem(o, i); #endif } static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i, int wraparound, int boundscheck) { #if CYTHON_COMPILING_IN_CPYTHON if (wraparound & unlikely(i < 0)) i += PyTuple_GET_SIZE(o); if ((!boundscheck) || likely((0 <= i) & (i < PyTuple_GET_SIZE(o)))) { PyObject *r = PyTuple_GET_ITEM(o, i); Py_INCREF(r); return r; } return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i)); #else return PySequence_GetItem(o, i); #endif } static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, int is_list, int wraparound, int boundscheck) { #if CYTHON_COMPILING_IN_CPYTHON if (is_list || PyList_CheckExact(o)) { Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyList_GET_SIZE(o); if ((!boundscheck) || (likely((n >= 0) & (n < PyList_GET_SIZE(o))))) { PyObject *r = PyList_GET_ITEM(o, n); Py_INCREF(r); return r; } } else if (PyTuple_CheckExact(o)) { Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyTuple_GET_SIZE(o); if ((!boundscheck) || likely((n >= 0) & (n < PyTuple_GET_SIZE(o)))) { PyObject *r = PyTuple_GET_ITEM(o, n); Py_INCREF(r); return r; } } else { PySequenceMethods *m = Py_TYPE(o)->tp_as_sequence; if (likely(m && m->sq_item)) { if (wraparound && unlikely(i < 0) && likely(m->sq_length)) { Py_ssize_t l = m->sq_length(o); if (likely(l >= 0)) { i += l; } else { if (PyErr_ExceptionMatches(PyExc_OverflowError)) PyErr_Clear(); else return NULL; } } 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)); } 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; } static CYTHON_INLINE PyObject *__Pyx_GetAttr(PyObject *o, PyObject *n) { #if CYTHON_COMPILING_IN_CPYTHON #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); } static CYTHON_INLINE PyObject *__Pyx_GetAttr3(PyObject *o, PyObject *n, PyObject *d) { PyObject *r = __Pyx_GetAttr(o, n); if (unlikely(!r)) { if (!PyErr_ExceptionMatches(PyExc_AttributeError)) goto bad; PyErr_Clear(); r = d; Py_INCREF(d); } return r; bad: return NULL; } #if PY_MAJOR_VERSION < 3 static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, CYTHON_UNUSED PyObject *cause) { 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 PY_VERSION_HEX < 0x02050000 if (PyClass_Check(type)) { #else if (PyType_Check(type)) { #endif #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; #if PY_VERSION_HEX < 0x02050000 if (PyInstance_Check(type)) { type = (PyObject*) ((PyInstanceObject*)type)->in_class; Py_INCREF(type); } else { type = 0; PyErr_SetString(PyExc_TypeError, "raise: exception must be an old-style class or instance"); goto raise_error; } #else 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; } #endif } __Pyx_ErrRestore(type, value, tb); return; raise_error: Py_XDECREF(value); Py_XDECREF(type); Py_XDECREF(tb); return; } #else /* Python 3+ */ 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) { if (PyObject_IsSubclass(instance_class, type)) { type = instance_class; } else { instance_class = NULL; } } } if (!instance_class) { PyObject *args; if (!value) args = PyTuple_New(0); else if (PyTuple_Check(value)) { Py_INCREF(value); args = value; } else args = PyTuple_Pack(1, value); if (!args) goto bad; owned_instance = PyObject_Call(type, args, NULL); Py_DECREF(args); if (!owned_instance) goto bad; value = owned_instance; if (!PyExceptionInstance_Check(value)) { PyErr_Format(PyExc_TypeError, "calling %R should have returned an instance of " "BaseException, not %R", type, Py_TYPE(value)); goto bad; } } } else { PyErr_SetString(PyExc_TypeError, "raise: exception class must be a subclass of BaseException"); goto bad; } #if PY_VERSION_HEX >= 0x03030000 if (cause) { #else if (cause && cause != Py_None) { #endif PyObject *fixed_cause; if (cause == Py_None) { fixed_cause = NULL; } else if (PyExceptionClass_Check(cause)) { fixed_cause = PyObject_CallObject(cause, NULL); if (fixed_cause == NULL) goto bad; } else if (PyExceptionInstance_Check(cause)) { fixed_cause = cause; Py_INCREF(fixed_cause); } else { PyErr_SetString(PyExc_TypeError, "exception causes must derive from " "BaseException"); goto bad; } PyException_SetCause(value, fixed_cause); } PyErr_SetObject(type, value); if (tb) { PyThreadState *tstate = PyThreadState_GET(); PyObject* tmp_tb = tstate->curexc_traceback; if (tb != tmp_tb) { Py_INCREF(tb); tstate->curexc_traceback = tb; Py_XDECREF(tmp_tb); } } bad: Py_XDECREF(owned_instance); return; } #endif static CYTHON_INLINE PyObject* __Pyx_PyObject_GetSlice( PyObject* obj, Py_ssize_t cstart, Py_ssize_t cstop, PyObject** _py_start, PyObject** _py_stop, PyObject** _py_slice, int has_cstart, int has_cstop, CYTHON_UNUSED int wraparound) { #if CYTHON_COMPILING_IN_CPYTHON PyMappingMethods* mp; #if PY_MAJOR_VERSION < 3 PySequenceMethods* ms = Py_TYPE(obj)->tp_as_sequence; if (likely(ms && ms->sq_slice)) { if (!has_cstart) { if (_py_start && (*_py_start != Py_None)) { cstart = __Pyx_PyIndex_AsSsize_t(*_py_start); if ((cstart == (Py_ssize_t)-1) && PyErr_Occurred()) goto bad; } else cstart = 0; } if (!has_cstop) { if (_py_stop && (*_py_stop != Py_None)) { cstop = __Pyx_PyIndex_AsSsize_t(*_py_stop); if ((cstop == (Py_ssize_t)-1) && PyErr_Occurred()) goto bad; } else cstop = PY_SSIZE_T_MAX; } if (wraparound && unlikely((cstart < 0) | (cstop < 0)) && likely(ms->sq_length)) { Py_ssize_t l = ms->sq_length(obj); if (likely(l >= 0)) { if (cstop < 0) { cstop += l; if (cstop < 0) cstop = 0; } if (cstart < 0) { cstart += l; if (cstart < 0) cstart = 0; } } else { if (PyErr_ExceptionMatches(PyExc_OverflowError)) PyErr_Clear(); else goto bad; } } return ms->sq_slice(obj, cstart, cstop); } #endif mp = Py_TYPE(obj)->tp_as_mapping; if (likely(mp && mp->mp_subscript)) #endif { PyObject* result; PyObject *py_slice, *py_start, *py_stop; if (_py_slice) { py_slice = *_py_slice; } else { PyObject* owned_start = NULL; PyObject* owned_stop = NULL; if (_py_start) { py_start = *_py_start; } else { if (has_cstart) { owned_start = py_start = PyInt_FromSsize_t(cstart); if (unlikely(!py_start)) goto bad; } else py_start = Py_None; } if (_py_stop) { py_stop = *_py_stop; } else { if (has_cstop) { owned_stop = py_stop = PyInt_FromSsize_t(cstop); if (unlikely(!py_stop)) { Py_XDECREF(owned_start); goto bad; } } else py_stop = Py_None; } py_slice = PySlice_New(py_start, py_stop, Py_None); Py_XDECREF(owned_start); Py_XDECREF(owned_stop); if (unlikely(!py_slice)) goto bad; } #if CYTHON_COMPILING_IN_CPYTHON result = mp->mp_subscript(obj, py_slice); #else result = PyObject_GetItem(obj, py_slice); #endif if (!_py_slice) { Py_DECREF(py_slice); } return result; } PyErr_Format(PyExc_TypeError, "'%.200s' object is unsliceable", Py_TYPE(obj)->tp_name); bad: return NULL; } static void __Pyx_WriteUnraisable(const char *name, CYTHON_UNUSED int clineno, CYTHON_UNUSED int lineno, CYTHON_UNUSED const char *filename, int full_traceback) { PyObject *old_exc, *old_val, *old_tb; PyObject *ctx; __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); } } 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; } static void __Pyx_RaiseBufferFallbackError(void) { PyErr_SetString(PyExc_ValueError, "Buffer acquisition failed on assignment; and then reacquiring the old buffer failed too!"); } static double __Pyx__PyObject_AsDouble(PyObject* obj) { PyObject* float_value; #if CYTHON_COMPILING_IN_PYPY float_value = PyNumber_Float(obj); #else PyNumberMethods *nb = Py_TYPE(obj)->tp_as_number; if (likely(nb) && likely(nb->nb_float)) { float_value = nb->nb_float(obj); if (likely(float_value) && unlikely(!PyFloat_Check(float_value))) { PyErr_Format(PyExc_TypeError, "__float__ returned non-float (type %.200s)", Py_TYPE(float_value)->tp_name); Py_DECREF(float_value); goto bad; } } else if (PyUnicode_CheckExact(obj) || PyBytes_CheckExact(obj)) { #if PY_MAJOR_VERSION >= 3 float_value = PyFloat_FromString(obj); #else float_value = PyFloat_FromString(obj, 0); #endif } else { PyObject* args = PyTuple_New(1); if (unlikely(!args)) goto bad; PyTuple_SET_ITEM(args, 0, obj); float_value = PyObject_Call((PyObject*)&PyFloat_Type, args, 0); PyTuple_SET_ITEM(args, 0, 0); Py_DECREF(args); } #endif if (likely(float_value)) { double value = PyFloat_AS_DOUBLE(float_value); Py_DECREF(float_value); return value; } bad: return (double)-1; } static CYTHON_INLINE int __Pyx_SetItemInt_Generic(PyObject *o, PyObject *j, PyObject *v) { int r; if (!j) return -1; r = PyObject_SetItem(o, j, v); Py_DECREF(j); return r; } static CYTHON_INLINE int __Pyx_SetItemInt_Fast(PyObject *o, Py_ssize_t i, PyObject *v, int is_list, int wraparound, int boundscheck) { #if CYTHON_COMPILING_IN_CPYTHON if (is_list || PyList_CheckExact(o)) { Py_ssize_t n = (!wraparound) ? i : ((likely(i >= 0)) ? i : i + PyList_GET_SIZE(o)); if ((!boundscheck) || likely((n >= 0) & (n < PyList_GET_SIZE(o)))) { PyObject* old = PyList_GET_ITEM(o, n); Py_INCREF(v); PyList_SET_ITEM(o, n, v); Py_DECREF(old); return 1; } } else { PySequenceMethods *m = Py_TYPE(o)->tp_as_sequence; if (likely(m && m->sq_ass_item)) { if (wraparound && unlikely(i < 0) && likely(m->sq_length)) { Py_ssize_t l = m->sq_length(o); if (likely(l >= 0)) { i += l; } else { if (PyErr_ExceptionMatches(PyExc_OverflowError)) PyErr_Clear(); else return -1; } } return m->sq_ass_item(o, i, v); } } #else #if CYTHON_COMPILING_IN_PYPY if (is_list || (PySequence_Check(o) && !PyDict_Check(o))) { #else if (is_list || PySequence_Check(o)) { #endif return PySequence_SetItem(o, i, v); } #endif return __Pyx_SetItemInt_Generic(o, PyInt_FromSsize_t(i), v); } static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals) { #if CYTHON_COMPILING_IN_PYPY return PyObject_RichCompareBool(s1, s2, equals); #else if (s1 == s2) { return (equals == Py_EQ); } else if (PyBytes_CheckExact(s1) & PyBytes_CheckExact(s2)) { const char *ps1, *ps2; Py_ssize_t length = PyBytes_GET_SIZE(s1); if (length != PyBytes_GET_SIZE(s2)) return (equals == Py_NE); ps1 = PyBytes_AS_STRING(s1); ps2 = PyBytes_AS_STRING(s2); if (ps1[0] != ps2[0]) { return (equals == Py_NE); } else if (length == 1) { return (equals == Py_EQ); } else { int result = memcmp(ps1, ps2, (size_t)length); return (equals == Py_EQ) ? (result == 0) : (result != 0); } } else if ((s1 == Py_None) & PyBytes_CheckExact(s2)) { return (equals == Py_NE); } else if ((s2 == Py_None) & PyBytes_CheckExact(s1)) { return (equals == Py_NE); } else { int result; PyObject* py_result = PyObject_RichCompare(s1, s2, equals); if (!py_result) return -1; result = __Pyx_PyObject_IsTrue(py_result); Py_DECREF(py_result); return result; } #endif } static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals) { #if CYTHON_COMPILING_IN_PYPY return PyObject_RichCompareBool(s1, s2, equals); #else #if PY_MAJOR_VERSION < 3 PyObject* owned_ref = NULL; #endif int s1_is_unicode, s2_is_unicode; if (s1 == s2) { goto return_eq; } s1_is_unicode = PyUnicode_CheckExact(s1); s2_is_unicode = PyUnicode_CheckExact(s2); #if PY_MAJOR_VERSION < 3 if ((s1_is_unicode & (!s2_is_unicode)) && PyString_CheckExact(s2)) { owned_ref = PyUnicode_FromObject(s2); if (unlikely(!owned_ref)) return -1; s2 = owned_ref; s2_is_unicode = 1; } else if ((s2_is_unicode & (!s1_is_unicode)) && PyString_CheckExact(s1)) { owned_ref = PyUnicode_FromObject(s1); if (unlikely(!owned_ref)) return -1; s1 = owned_ref; s1_is_unicode = 1; } else if (((!s2_is_unicode) & (!s1_is_unicode))) { return __Pyx_PyBytes_Equals(s1, s2, equals); } #endif if (s1_is_unicode & s2_is_unicode) { Py_ssize_t length; int kind; void *data1, *data2; #if CYTHON_PEP393_ENABLED if (unlikely(PyUnicode_READY(s1) < 0) || unlikely(PyUnicode_READY(s2) < 0)) return -1; #endif length = __Pyx_PyUnicode_GET_LENGTH(s1); if (length != __Pyx_PyUnicode_GET_LENGTH(s2)) { goto return_ne; } kind = __Pyx_PyUnicode_KIND(s1); if (kind != __Pyx_PyUnicode_KIND(s2)) { goto return_ne; } data1 = __Pyx_PyUnicode_DATA(s1); data2 = __Pyx_PyUnicode_DATA(s2); if (__Pyx_PyUnicode_READ(kind, data1, 0) != __Pyx_PyUnicode_READ(kind, data2, 0)) { goto return_ne; } else if (length == 1) { goto return_eq; } else { int result = memcmp(data1, data2, length * kind); #if PY_MAJOR_VERSION < 3 Py_XDECREF(owned_ref); #endif return (equals == Py_EQ) ? (result == 0) : (result != 0); } } else if ((s1 == Py_None) & s2_is_unicode) { goto return_ne; } else if ((s2 == Py_None) & s1_is_unicode) { goto return_ne; } else { int result; PyObject* py_result = PyObject_RichCompare(s1, s2, equals); if (!py_result) return -1; result = __Pyx_PyObject_IsTrue(py_result); Py_DECREF(py_result); return result; } return_eq: #if PY_MAJOR_VERSION < 3 Py_XDECREF(owned_ref); #endif return (equals == Py_EQ); return_ne: #if PY_MAJOR_VERSION < 3 Py_XDECREF(owned_ref); #endif return (equals == Py_NE); #endif } static CYTHON_INLINE void __Pyx_RaiseUnboundLocalError(const char *varname) { PyErr_Format(PyExc_UnboundLocalError, "local variable '%s' referenced before assignment", varname); } static CYTHON_INLINE int __Pyx_IterFinish(void) { #if CYTHON_COMPILING_IN_CPYTHON PyThreadState *tstate = PyThreadState_GET(); PyObject* exc_type = tstate->curexc_type; if (unlikely(exc_type)) { if (likely(exc_type == PyExc_StopIteration) || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration)) { PyObject *exc_value, *exc_tb; exc_value = tstate->curexc_value; exc_tb = tstate->curexc_traceback; tstate->curexc_type = 0; tstate->curexc_value = 0; tstate->curexc_traceback = 0; Py_DECREF(exc_type); Py_XDECREF(exc_value); Py_XDECREF(exc_tb); return 0; } else { return -1; } } return 0; #else if (unlikely(PyErr_Occurred())) { if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) { PyErr_Clear(); return 0; } else { return -1; } } return 0; #endif } 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); } 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"); } static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); } static void __Pyx_UnpackTupleError(PyObject *t, Py_ssize_t index) { if (t == Py_None) { __Pyx_RaiseNoneNotIterableError(); } else if (PyTuple_GET_SIZE(t) < index) { __Pyx_RaiseNeedMoreValuesError(PyTuple_GET_SIZE(t)); } else { __Pyx_RaiseTooManyValuesError(index); } } 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; } static CYTHON_INLINE int __Pyx_unpack_tuple2(PyObject* tuple, PyObject** pvalue1, PyObject** pvalue2, int is_tuple, int has_known_size, int decref_tuple) { Py_ssize_t index; PyObject *value1 = NULL, *value2 = NULL, *iter = NULL; if (!is_tuple && unlikely(!PyTuple_Check(tuple))) { iternextfunc iternext; iter = PyObject_GetIter(tuple); if (unlikely(!iter)) goto bad; if (decref_tuple) { Py_DECREF(tuple); tuple = NULL; } iternext = Py_TYPE(iter)->tp_iternext; value1 = iternext(iter); if (unlikely(!value1)) { index = 0; goto unpacking_failed; } value2 = iternext(iter); if (unlikely(!value2)) { index = 1; goto unpacking_failed; } if (!has_known_size && unlikely(__Pyx_IternextUnpackEndCheck(iternext(iter), 2))) goto bad; Py_DECREF(iter); } else { if (!has_known_size && unlikely(PyTuple_GET_SIZE(tuple) != 2)) { __Pyx_UnpackTupleError(tuple, 2); goto bad; } #if CYTHON_COMPILING_IN_PYPY value1 = PySequence_ITEM(tuple, 0); if (unlikely(!value1)) goto bad; value2 = PySequence_ITEM(tuple, 1); if (unlikely(!value2)) goto bad; #else value1 = PyTuple_GET_ITEM(tuple, 0); value2 = PyTuple_GET_ITEM(tuple, 1); Py_INCREF(value1); Py_INCREF(value2); #endif if (decref_tuple) { Py_DECREF(tuple); } } *pvalue1 = value1; *pvalue2 = value2; return 0; unpacking_failed: if (!has_known_size && __Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); bad: Py_XDECREF(iter); Py_XDECREF(value1); Py_XDECREF(value2); if (decref_tuple) { Py_XDECREF(tuple); } return -1; } static CYTHON_INLINE PyObject* __Pyx_dict_iterator(PyObject* iterable, int is_dict, PyObject* method_name, Py_ssize_t* p_orig_length, int* p_source_is_dict) { is_dict = is_dict || likely(PyDict_CheckExact(iterable)); *p_source_is_dict = is_dict; #if !CYTHON_COMPILING_IN_PYPY if (is_dict) { *p_orig_length = PyDict_Size(iterable); Py_INCREF(iterable); return iterable; } #endif *p_orig_length = 0; if (method_name) { PyObject* iter; iterable = __Pyx_PyObject_CallMethod0(iterable, method_name); if (!iterable) return NULL; #if !CYTHON_COMPILING_IN_PYPY if (PyTuple_CheckExact(iterable) || PyList_CheckExact(iterable)) return iterable; #endif iter = PyObject_GetIter(iterable); Py_DECREF(iterable); return iter; } return PyObject_GetIter(iterable); } static CYTHON_INLINE int __Pyx_dict_iter_next(PyObject* iter_obj, Py_ssize_t orig_length, Py_ssize_t* ppos, PyObject** pkey, PyObject** pvalue, PyObject** pitem, int source_is_dict) { PyObject* next_item; #if !CYTHON_COMPILING_IN_PYPY if (source_is_dict) { PyObject *key, *value; if (unlikely(orig_length != PyDict_Size(iter_obj))) { PyErr_SetString(PyExc_RuntimeError, "dictionary changed size during iteration"); return -1; } if (unlikely(!PyDict_Next(iter_obj, ppos, &key, &value))) { return 0; } if (pitem) { PyObject* tuple = PyTuple_New(2); if (unlikely(!tuple)) { return -1; } Py_INCREF(key); Py_INCREF(value); PyTuple_SET_ITEM(tuple, 0, key); PyTuple_SET_ITEM(tuple, 1, value); *pitem = tuple; } else { if (pkey) { Py_INCREF(key); *pkey = key; } if (pvalue) { Py_INCREF(value); *pvalue = value; } } return 1; } else if (PyTuple_CheckExact(iter_obj)) { Py_ssize_t pos = *ppos; if (unlikely(pos >= PyTuple_GET_SIZE(iter_obj))) return 0; *ppos = pos + 1; next_item = PyTuple_GET_ITEM(iter_obj, pos); Py_INCREF(next_item); } else if (PyList_CheckExact(iter_obj)) { Py_ssize_t pos = *ppos; if (unlikely(pos >= PyList_GET_SIZE(iter_obj))) return 0; *ppos = pos + 1; next_item = PyList_GET_ITEM(iter_obj, pos); Py_INCREF(next_item); } else #endif { next_item = PyIter_Next(iter_obj); if (unlikely(!next_item)) { return __Pyx_IterFinish(); } } if (pitem) { *pitem = next_item; } else if (pkey && pvalue) { if (__Pyx_unpack_tuple2(next_item, pkey, pvalue, source_is_dict, source_is_dict, 1)) return -1; } else if (pkey) { *pkey = next_item; } else { *pvalue = next_item; } return 1; } static CYTHON_INLINE Py_ssize_t __Pyx_div_Py_ssize_t(Py_ssize_t a, Py_ssize_t b) { Py_ssize_t q = a / b; Py_ssize_t r = a - q*b; q -= ((r != 0) & ((r ^ b) < 0)); return q; } 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; } static CYTHON_INLINE long __Pyx_mod_long(long a, long b) { long r = a % b; r += ((r != 0) & ((r ^ b) < 0)) * b; return r; } static CYTHON_INLINE int __Pyx_PyObject_Append(PyObject* L, PyObject* x) { if (likely(PyList_CheckExact(L))) { if (unlikely(__Pyx_PyList_Append(L, x) < 0)) return -1; } else { PyObject* retval = __Pyx_PyObject_CallMethod1(L, __pyx_n_s_append, x); if (unlikely(!retval)) return -1; Py_DECREF(retval); } return 0; } static CYTHON_INLINE void __Pyx_RaiseClosureNameError(const char *varname) { PyErr_Format(PyExc_NameError, "free variable '%s' referenced before assignment in enclosing scope", varname); } #if !CYTHON_COMPILING_IN_CPYTHON static CYTHON_INLINE PyObject* __Pyx_PyBytes_Join(PyObject* sep, PyObject* values) { return PyObject_CallMethodObjArgs(sep, __pyx_n_s_join, values, NULL) } #endif static void __Pyx_call_next_tp_dealloc(PyObject* obj, destructor current_tp_dealloc) { PyTypeObject* type = Py_TYPE(obj); while (type && type->tp_dealloc != current_tp_dealloc) type = type->tp_base; while (type && type->tp_dealloc == current_tp_dealloc) type = type->tp_base; if (type) type->tp_dealloc(obj); } 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; } 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); } static int __Pyx_SetVtable(PyObject *dict, void *vtable) { #if PY_VERSION_HEX >= 0x02070000 && !(PY_MAJOR_VERSION==3&&PY_MINOR_VERSION==0) 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; } static PyObject *__Pyx_CalculateMetaclass(PyTypeObject *metaclass, PyObject *bases) { Py_ssize_t i, nbases = PyTuple_GET_SIZE(bases); for (i=0; i < nbases; i++) { PyTypeObject *tmptype; PyObject *tmp = PyTuple_GET_ITEM(bases, i); tmptype = Py_TYPE(tmp); #if PY_MAJOR_VERSION < 3 if (tmptype == &PyClass_Type) continue; #endif if (!metaclass) { metaclass = tmptype; continue; } if (PyType_IsSubtype(metaclass, tmptype)) continue; if (PyType_IsSubtype(tmptype, metaclass)) { metaclass = tmptype; continue; } PyErr_SetString(PyExc_TypeError, "metaclass conflict: " "the metaclass of a derived class " "must be a (non-strict) subclass " "of the metaclasses of all its bases"); return NULL; } if (!metaclass) { #if PY_MAJOR_VERSION < 3 metaclass = &PyClass_Type; #else metaclass = &PyType_Type; #endif } Py_INCREF((PyObject*) metaclass); return (PyObject*) metaclass; } static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type) { PyObject* fake_module; PyTypeObject* cached_type = NULL; fake_module = PyImport_AddModule((char*) "_cython_" CYTHON_ABI); if (!fake_module) return NULL; Py_INCREF(fake_module); cached_type = (PyTypeObject*) PyObject_GetAttrString(fake_module, type->tp_name); if (cached_type) { if (!PyType_Check((PyObject*)cached_type)) { PyErr_Format(PyExc_TypeError, "Shared Cython type %.200s is not a type object", type->tp_name); goto bad; } if (cached_type->tp_basicsize != type->tp_basicsize) { PyErr_Format(PyExc_TypeError, "Shared Cython type %.200s has the wrong size, try recompiling", type->tp_name); goto bad; } } else { if (!PyErr_ExceptionMatches(PyExc_AttributeError)) goto bad; PyErr_Clear(); if (PyType_Ready(type) < 0) goto bad; if (PyObject_SetAttrString(fake_module, type->tp_name, (PyObject*) type) < 0) goto bad; Py_INCREF(type); cached_type = type; } done: Py_DECREF(fake_module); return cached_type; bad: Py_XDECREF(cached_type); cached_type = NULL; goto done; } static PyObject * __Pyx_CyFunction_get_doc(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *closure) { if (unlikely(op->func_doc == NULL)) { if (op->func.m_ml->ml_doc) { #if PY_MAJOR_VERSION >= 3 op->func_doc = PyUnicode_FromString(op->func.m_ml->ml_doc); #else op->func_doc = PyString_FromString(op->func.m_ml->ml_doc); #endif if (unlikely(op->func_doc == NULL)) return NULL; } else { Py_INCREF(Py_None); return Py_None; } } Py_INCREF(op->func_doc); return op->func_doc; } static int __Pyx_CyFunction_set_doc(__pyx_CyFunctionObject *op, PyObject *value) { PyObject *tmp = op->func_doc; if (value == NULL) value = Py_None; /* Mark as deleted */ Py_INCREF(value); op->func_doc = value; Py_XDECREF(tmp); return 0; } static PyObject * __Pyx_CyFunction_get_name(__pyx_CyFunctionObject *op) { if (unlikely(op->func_name == NULL)) { #if PY_MAJOR_VERSION >= 3 op->func_name = PyUnicode_InternFromString(op->func.m_ml->ml_name); #else op->func_name = PyString_InternFromString(op->func.m_ml->ml_name); #endif if (unlikely(op->func_name == NULL)) return NULL; } Py_INCREF(op->func_name); return op->func_name; } static int __Pyx_CyFunction_set_name(__pyx_CyFunctionObject *op, PyObject *value) { PyObject *tmp; #if PY_MAJOR_VERSION >= 3 if (unlikely(value == NULL || !PyUnicode_Check(value))) { #else if (unlikely(value == NULL || !PyString_Check(value))) { #endif PyErr_SetString(PyExc_TypeError, "__name__ must be set to a string object"); return -1; } tmp = op->func_name; Py_INCREF(value); op->func_name = value; Py_XDECREF(tmp); return 0; } static PyObject * __Pyx_CyFunction_get_qualname(__pyx_CyFunctionObject *op) { Py_INCREF(op->func_qualname); return op->func_qualname; } static int __Pyx_CyFunction_set_qualname(__pyx_CyFunctionObject *op, PyObject *value) { PyObject *tmp; #if PY_MAJOR_VERSION >= 3 if (unlikely(value == NULL || !PyUnicode_Check(value))) { #else if (unlikely(value == NULL || !PyString_Check(value))) { #endif PyErr_SetString(PyExc_TypeError, "__qualname__ must be set to a string object"); return -1; } tmp = op->func_qualname; Py_INCREF(value); op->func_qualname = value; Py_XDECREF(tmp); return 0; } static PyObject * __Pyx_CyFunction_get_self(__pyx_CyFunctionObject *m, CYTHON_UNUSED void *closure) { PyObject *self; self = m->func_closure; if (self == NULL) self = Py_None; Py_INCREF(self); return self; } static PyObject * __Pyx_CyFunction_get_dict(__pyx_CyFunctionObject *op) { if (unlikely(op->func_dict == NULL)) { op->func_dict = PyDict_New(); if (unlikely(op->func_dict == NULL)) return NULL; } Py_INCREF(op->func_dict); return op->func_dict; } static int __Pyx_CyFunction_set_dict(__pyx_CyFunctionObject *op, PyObject *value) { PyObject *tmp; if (unlikely(value == NULL)) { PyErr_SetString(PyExc_TypeError, "function's dictionary may not be deleted"); return -1; } if (unlikely(!PyDict_Check(value))) { PyErr_SetString(PyExc_TypeError, "setting function's dictionary to a non-dict"); return -1; } tmp = op->func_dict; Py_INCREF(value); op->func_dict = value; Py_XDECREF(tmp); return 0; } static PyObject * __Pyx_CyFunction_get_globals(__pyx_CyFunctionObject *op) { Py_INCREF(op->func_globals); return op->func_globals; } static PyObject * __Pyx_CyFunction_get_closure(CYTHON_UNUSED __pyx_CyFunctionObject *op) { Py_INCREF(Py_None); return Py_None; } static PyObject * __Pyx_CyFunction_get_code(__pyx_CyFunctionObject *op) { PyObject* result = (op->func_code) ? op->func_code : Py_None; Py_INCREF(result); return result; } static int __Pyx_CyFunction_init_defaults(__pyx_CyFunctionObject *op) { PyObject *res = op->defaults_getter((PyObject *) op); if (unlikely(!res)) return -1; op->defaults_tuple = PyTuple_GET_ITEM(res, 0); Py_INCREF(op->defaults_tuple); op->defaults_kwdict = PyTuple_GET_ITEM(res, 1); Py_INCREF(op->defaults_kwdict); Py_DECREF(res); return 0; } static int __Pyx_CyFunction_set_defaults(__pyx_CyFunctionObject *op, PyObject* value) { PyObject* tmp; if (!value) { value = Py_None; } else if (value != Py_None && !PyTuple_Check(value)) { PyErr_SetString(PyExc_TypeError, "__defaults__ must be set to a tuple object"); return -1; } Py_INCREF(value); tmp = op->defaults_tuple; op->defaults_tuple = value; Py_XDECREF(tmp); return 0; } static PyObject * __Pyx_CyFunction_get_defaults(__pyx_CyFunctionObject *op) { PyObject* result = op->defaults_tuple; if (unlikely(!result)) { if (op->defaults_getter) { if (__Pyx_CyFunction_init_defaults(op) < 0) return NULL; result = op->defaults_tuple; } else { result = Py_None; } } Py_INCREF(result); return result; } static int __Pyx_CyFunction_set_kwdefaults(__pyx_CyFunctionObject *op, PyObject* value) { PyObject* tmp; if (!value) { value = Py_None; } else if (value != Py_None && !PyDict_Check(value)) { PyErr_SetString(PyExc_TypeError, "__kwdefaults__ must be set to a dict object"); return -1; } Py_INCREF(value); tmp = op->defaults_kwdict; op->defaults_kwdict = value; Py_XDECREF(tmp); return 0; } static PyObject * __Pyx_CyFunction_get_kwdefaults(__pyx_CyFunctionObject *op) { PyObject* result = op->defaults_kwdict; if (unlikely(!result)) { if (op->defaults_getter) { if (__Pyx_CyFunction_init_defaults(op) < 0) return NULL; result = op->defaults_kwdict; } else { result = Py_None; } } Py_INCREF(result); return result; } static int __Pyx_CyFunction_set_annotations(__pyx_CyFunctionObject *op, PyObject* value) { PyObject* tmp; if (!value || value == Py_None) { value = NULL; } else if (!PyDict_Check(value)) { PyErr_SetString(PyExc_TypeError, "__annotations__ must be set to a dict object"); return -1; } Py_XINCREF(value); tmp = op->func_annotations; op->func_annotations = value; Py_XDECREF(tmp); return 0; } static PyObject * __Pyx_CyFunction_get_annotations(__pyx_CyFunctionObject *op) { PyObject* result = op->func_annotations; if (unlikely(!result)) { result = PyDict_New(); if (unlikely(!result)) return NULL; op->func_annotations = result; } Py_INCREF(result); return result; } static PyGetSetDef __pyx_CyFunction_getsets[] = { {(char *) "func_doc", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0}, {(char *) "__doc__", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0}, {(char *) "func_name", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0}, {(char *) "__name__", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0}, {(char *) "__qualname__", (getter)__Pyx_CyFunction_get_qualname, (setter)__Pyx_CyFunction_set_qualname, 0, 0}, {(char *) "__self__", (getter)__Pyx_CyFunction_get_self, 0, 0, 0}, {(char *) "func_dict", (getter)__Pyx_CyFunction_get_dict, (setter)__Pyx_CyFunction_set_dict, 0, 0}, {(char *) "__dict__", (getter)__Pyx_CyFunction_get_dict, (setter)__Pyx_CyFunction_set_dict, 0, 0}, {(char *) "func_globals", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0}, {(char *) "__globals__", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0}, {(char *) "func_closure", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0}, {(char *) "__closure__", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0}, {(char *) "func_code", (getter)__Pyx_CyFunction_get_code, 0, 0, 0}, {(char *) "__code__", (getter)__Pyx_CyFunction_get_code, 0, 0, 0}, {(char *) "func_defaults", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0}, {(char *) "__defaults__", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0}, {(char *) "__kwdefaults__", (getter)__Pyx_CyFunction_get_kwdefaults, (setter)__Pyx_CyFunction_set_kwdefaults, 0, 0}, {(char *) "__annotations__", (getter)__Pyx_CyFunction_get_annotations, (setter)__Pyx_CyFunction_set_annotations, 0, 0}, {0, 0, 0, 0, 0} }; #ifndef PY_WRITE_RESTRICTED /* < Py2.5 */ #define PY_WRITE_RESTRICTED WRITE_RESTRICTED #endif static PyMemberDef __pyx_CyFunction_members[] = { {(char *) "__module__", T_OBJECT, offsetof(__pyx_CyFunctionObject, func.m_module), PY_WRITE_RESTRICTED, 0}, {0, 0, 0, 0, 0} }; static PyObject * __Pyx_CyFunction_reduce(__pyx_CyFunctionObject *m, CYTHON_UNUSED PyObject *args) { #if PY_MAJOR_VERSION >= 3 return PyUnicode_FromString(m->func.m_ml->ml_name); #else return PyString_FromString(m->func.m_ml->ml_name); #endif } static PyMethodDef __pyx_CyFunction_methods[] = { {__Pyx_NAMESTR("__reduce__"), (PyCFunction)__Pyx_CyFunction_reduce, METH_VARARGS, 0}, {0, 0, 0, 0} }; static PyObject *__Pyx_CyFunction_New(PyTypeObject *type, PyMethodDef *ml, int flags, PyObject* qualname, PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) { __pyx_CyFunctionObject *op = PyObject_GC_New(__pyx_CyFunctionObject, type); if (op == NULL) return NULL; op->flags = flags; op->func_weakreflist = NULL; op->func.m_ml = ml; op->func.m_self = (PyObject *) op; Py_XINCREF(closure); op->func_closure = closure; Py_XINCREF(module); op->func.m_module = module; op->func_dict = NULL; op->func_name = NULL; Py_INCREF(qualname); op->func_qualname = qualname; op->func_doc = NULL; op->func_classobj = NULL; op->func_globals = globals; Py_INCREF(op->func_globals); Py_XINCREF(code); op->func_code = code; op->defaults_pyobjects = 0; op->defaults = NULL; op->defaults_tuple = NULL; op->defaults_kwdict = NULL; op->defaults_getter = NULL; op->func_annotations = NULL; PyObject_GC_Track(op); return (PyObject *) op; } static int __Pyx_CyFunction_clear(__pyx_CyFunctionObject *m) { Py_CLEAR(m->func_closure); Py_CLEAR(m->func.m_module); Py_CLEAR(m->func_dict); Py_CLEAR(m->func_name); Py_CLEAR(m->func_qualname); Py_CLEAR(m->func_doc); Py_CLEAR(m->func_globals); Py_CLEAR(m->func_code); Py_CLEAR(m->func_classobj); Py_CLEAR(m->defaults_tuple); Py_CLEAR(m->defaults_kwdict); Py_CLEAR(m->func_annotations); if (m->defaults) { PyObject **pydefaults = __Pyx_CyFunction_Defaults(PyObject *, m); int i; for (i = 0; i < m->defaults_pyobjects; i++) Py_XDECREF(pydefaults[i]); PyMem_Free(m->defaults); m->defaults = NULL; } return 0; } static void __Pyx_CyFunction_dealloc(__pyx_CyFunctionObject *m) { PyObject_GC_UnTrack(m); if (m->func_weakreflist != NULL) PyObject_ClearWeakRefs((PyObject *) m); __Pyx_CyFunction_clear(m); PyObject_GC_Del(m); } static int __Pyx_CyFunction_traverse(__pyx_CyFunctionObject *m, visitproc visit, void *arg) { Py_VISIT(m->func_closure); Py_VISIT(m->func.m_module); Py_VISIT(m->func_dict); Py_VISIT(m->func_name); Py_VISIT(m->func_qualname); Py_VISIT(m->func_doc); Py_VISIT(m->func_globals); Py_VISIT(m->func_code); Py_VISIT(m->func_classobj); Py_VISIT(m->defaults_tuple); Py_VISIT(m->defaults_kwdict); if (m->defaults) { PyObject **pydefaults = __Pyx_CyFunction_Defaults(PyObject *, m); int i; for (i = 0; i < m->defaults_pyobjects; i++) Py_VISIT(pydefaults[i]); } return 0; } static PyObject *__Pyx_CyFunction_descr_get(PyObject *func, PyObject *obj, PyObject *type) { __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; if (m->flags & __Pyx_CYFUNCTION_STATICMETHOD) { Py_INCREF(func); return func; } if (m->flags & __Pyx_CYFUNCTION_CLASSMETHOD) { if (type == NULL) type = (PyObject *)(Py_TYPE(obj)); return PyMethod_New(func, type, (PyObject *)(Py_TYPE(type))); } if (obj == Py_None) obj = NULL; return PyMethod_New(func, obj, type); } static PyObject* __Pyx_CyFunction_repr(__pyx_CyFunctionObject *op) { #if PY_MAJOR_VERSION >= 3 return PyUnicode_FromFormat("", op->func_qualname, (void *)op); #else return PyString_FromFormat("", PyString_AsString(op->func_qualname), (void *)op); #endif } #if CYTHON_COMPILING_IN_PYPY static PyObject * __Pyx_CyFunction_Call(PyObject *func, PyObject *arg, PyObject *kw) { PyCFunctionObject* f = (PyCFunctionObject*)func; PyCFunction meth = PyCFunction_GET_FUNCTION(func); PyObject *self = PyCFunction_GET_SELF(func); Py_ssize_t size; switch (PyCFunction_GET_FLAGS(func) & ~(METH_CLASS | METH_STATIC | METH_COEXIST)) { case METH_VARARGS: if (likely(kw == NULL) || PyDict_Size(kw) == 0) return (*meth)(self, arg); break; case METH_VARARGS | METH_KEYWORDS: return (*(PyCFunctionWithKeywords)meth)(self, arg, kw); case METH_NOARGS: if (likely(kw == NULL) || PyDict_Size(kw) == 0) { size = PyTuple_GET_SIZE(arg); if (size == 0) return (*meth)(self, NULL); PyErr_Format(PyExc_TypeError, "%.200s() takes no arguments (%zd given)", f->m_ml->ml_name, size); return NULL; } break; case METH_O: if (likely(kw == NULL) || PyDict_Size(kw) == 0) { size = PyTuple_GET_SIZE(arg); if (size == 1) return (*meth)(self, PyTuple_GET_ITEM(arg, 0)); PyErr_Format(PyExc_TypeError, "%.200s() takes exactly one argument (%zd given)", f->m_ml->ml_name, size); return NULL; } break; default: PyErr_SetString(PyExc_SystemError, "Bad call flags in " "__Pyx_CyFunction_Call. METH_OLDARGS is no " "longer supported!"); return NULL; } PyErr_Format(PyExc_TypeError, "%.200s() takes no keyword arguments", f->m_ml->ml_name); return NULL; } #else static PyObject * __Pyx_CyFunction_Call(PyObject *func, PyObject *arg, PyObject *kw) { return PyCFunction_Call(func, arg, kw); } #endif static PyTypeObject __pyx_CyFunctionType_type = { PyVarObject_HEAD_INIT(0, 0) __Pyx_NAMESTR("cython_function_or_method"), /*tp_name*/ sizeof(__pyx_CyFunctionObject), /*tp_basicsize*/ 0, /*tp_itemsize*/ (destructor) __Pyx_CyFunction_dealloc, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #else 0, /*reserved*/ #endif (reprfunc) __Pyx_CyFunction_repr, /*tp_repr*/ 0, /*tp_as_number*/ 0, /*tp_as_sequence*/ 0, /*tp_as_mapping*/ 0, /*tp_hash*/ __Pyx_CyFunction_Call, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC, /* tp_flags*/ 0, /*tp_doc*/ (traverseproc) __Pyx_CyFunction_traverse, /*tp_traverse*/ (inquiry) __Pyx_CyFunction_clear, /*tp_clear*/ 0, /*tp_richcompare*/ offsetof(__pyx_CyFunctionObject, func_weakreflist), /* tp_weaklistoffse */ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_CyFunction_methods, /*tp_methods*/ __pyx_CyFunction_members, /*tp_members*/ __pyx_CyFunction_getsets, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ __Pyx_CyFunction_descr_get, /*tp_descr_get*/ 0, /*tp_descr_set*/ offsetof(__pyx_CyFunctionObject, func_dict),/*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ 0, /*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*/ #if PY_VERSION_HEX >= 0x02060000 0, /*tp_version_tag*/ #endif #if PY_VERSION_HEX >= 0x030400a1 0, /*tp_finalize*/ #endif }; static int __Pyx_CyFunction_init(void) { #if !CYTHON_COMPILING_IN_PYPY __pyx_CyFunctionType_type.tp_call = PyCFunction_Call; #endif __pyx_CyFunctionType = __Pyx_FetchCommonType(&__pyx_CyFunctionType_type); if (__pyx_CyFunctionType == NULL) { return -1; } return 0; } static CYTHON_INLINE void *__Pyx_CyFunction_InitDefaults(PyObject *func, size_t size, int pyobjects) { __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; m->defaults = PyMem_Malloc(size); if (!m->defaults) return PyErr_NoMemory(); memset(m->defaults, 0, size); m->defaults_pyobjects = pyobjects; return m->defaults; } static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *func, PyObject *tuple) { __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; m->defaults_tuple = tuple; Py_INCREF(tuple); } static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *func, PyObject *dict) { __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; m->defaults_kwdict = dict; Py_INCREF(dict); } static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *func, PyObject *dict) { __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; m->func_annotations = dict; Py_INCREF(dict); } static PyObject *__Pyx_Py3MetaclassPrepare(PyObject *metaclass, PyObject *bases, PyObject *name, PyObject *qualname, PyObject *mkw, PyObject *modname, PyObject *doc) { PyObject *ns; if (metaclass) { PyObject *prep = __Pyx_PyObject_GetAttrStr(metaclass, __pyx_n_s_prepare); if (prep) { PyObject *pargs = PyTuple_Pack(2, name, bases); if (unlikely(!pargs)) { Py_DECREF(prep); return NULL; } ns = PyObject_Call(prep, pargs, mkw); Py_DECREF(prep); Py_DECREF(pargs); } else { if (unlikely(!PyErr_ExceptionMatches(PyExc_AttributeError))) return NULL; PyErr_Clear(); ns = PyDict_New(); } } else { ns = PyDict_New(); } if (unlikely(!ns)) return NULL; if (unlikely(PyObject_SetItem(ns, __pyx_n_s_module, modname) < 0)) goto bad; if (unlikely(PyObject_SetItem(ns, __pyx_n_s_qualname, qualname) < 0)) goto bad; if (unlikely(doc && PyObject_SetItem(ns, __pyx_n_s_doc, doc) < 0)) goto bad; return ns; bad: Py_DECREF(ns); return NULL; } static PyObject *__Pyx_Py3ClassCreate(PyObject *metaclass, PyObject *name, PyObject *bases, PyObject *dict, PyObject *mkw, int calculate_metaclass, int allow_py2_metaclass) { PyObject *result, *margs; PyObject *owned_metaclass = NULL; if (allow_py2_metaclass) { owned_metaclass = PyObject_GetItem(dict, __pyx_n_s_metaclass); if (owned_metaclass) { metaclass = owned_metaclass; } else if (likely(PyErr_ExceptionMatches(PyExc_KeyError))) { PyErr_Clear(); } else { return NULL; } } if (calculate_metaclass && (!metaclass || PyType_Check(metaclass))) { metaclass = __Pyx_CalculateMetaclass((PyTypeObject*) metaclass, bases); Py_XDECREF(owned_metaclass); if (unlikely(!metaclass)) return NULL; owned_metaclass = metaclass; } margs = PyTuple_Pack(3, name, bases, dict); if (unlikely(!margs)) { result = NULL; } else { result = PyObject_Call(metaclass, margs, mkw); Py_DECREF(margs); } Py_XDECREF(owned_metaclass); return result; } static CYTHON_INLINE PyObject* __Pyx_PyInt_From_npy_int64(npy_int64 value) { const npy_int64 neg_one = (npy_int64) -1, const_zero = 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); } else if (sizeof(npy_int64) <= sizeof(unsigned long long)) { return PyLong_FromUnsignedLongLong((unsigned long long) value); } } else { if (sizeof(npy_int64) <= sizeof(long)) { return PyInt_FromLong((long) value); } else if (sizeof(npy_int64) <= sizeof(long long)) { return PyLong_FromLongLong((long long) value); } } { 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); } } #if PY_MAJOR_VERSION < 3 static int __Pyx_GetBuffer(PyObject *obj, Py_buffer *view, int flags) { #if PY_VERSION_HEX >= 0x02060000 if (PyObject_CheckBuffer(obj)) return PyObject_GetBuffer(obj, view, flags); #endif if (PyObject_TypeCheck(obj, __pyx_ptype_5numpy_ndarray)) return __pyx_pw_5numpy_7ndarray_1__getbuffer__(obj, view, flags); #if PY_VERSION_HEX < 0x02060000 if (obj->ob_type->tp_dict) { PyObject *getbuffer_cobj = PyObject_GetItem( obj->ob_type->tp_dict, __pyx_n_s_pyx_getbuffer); if (getbuffer_cobj) { getbufferproc func = (getbufferproc) PyCObject_AsVoidPtr(getbuffer_cobj); Py_DECREF(getbuffer_cobj); if (!func) goto fail; return func(obj, view, flags); } else { PyErr_Clear(); } } #endif PyErr_Format(PyExc_TypeError, "'%.200s' does not have the buffer interface", Py_TYPE(obj)->tp_name); #if PY_VERSION_HEX < 0x02060000 fail: #endif return -1; } static void __Pyx_ReleaseBuffer(Py_buffer *view) { PyObject *obj = view->obj; if (!obj) return; #if PY_VERSION_HEX >= 0x02060000 if (PyObject_CheckBuffer(obj)) { PyBuffer_Release(view); return; } #endif if (PyObject_TypeCheck(obj, __pyx_ptype_5numpy_ndarray)) { __pyx_pw_5numpy_7ndarray_3__releasebuffer__(obj, view); return; } #if PY_VERSION_HEX < 0x02060000 if (obj->ob_type->tp_dict) { PyObject *releasebuffer_cobj = PyObject_GetItem( obj->ob_type->tp_dict, __pyx_n_s_pyx_releasebuffer); if (releasebuffer_cobj) { releasebufferproc func = (releasebufferproc) PyCObject_AsVoidPtr(releasebuffer_cobj); Py_DECREF(releasebuffer_cobj); if (!func) goto fail; func(obj, view); return; } else { PyErr_Clear(); } } #endif goto nofail; #if PY_VERSION_HEX < 0x02060000 fail: #endif PyErr_WriteUnraisable(obj); nofail: Py_DECREF(obj); view->obj = NULL; } #endif /* PY_MAJOR_VERSION < 3 */ static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level) { PyObject *empty_list = 0; PyObject *module = 0; PyObject *global_dict = 0; PyObject *empty_dict = 0; PyObject *list; #if PY_VERSION_HEX < 0x03030000 PyObject *py_import; py_import = __Pyx_PyObject_GetAttrStr(__pyx_b, __pyx_n_s_import); if (!py_import) goto bad; #endif if (from_list) list = from_list; else { empty_list = PyList_New(0); if (!empty_list) goto bad; list = empty_list; } global_dict = PyModule_GetDict(__pyx_m); if (!global_dict) goto bad; empty_dict = PyDict_New(); if (!empty_dict) goto bad; #if PY_VERSION_HEX >= 0x02050000 { #if PY_MAJOR_VERSION >= 3 if (level == -1) { if (strchr(__Pyx_MODULE_NAME, '.')) { #if PY_VERSION_HEX < 0x03030000 PyObject *py_level = PyInt_FromLong(1); if (!py_level) goto bad; module = PyObject_CallFunctionObjArgs(py_import, name, global_dict, empty_dict, list, py_level, NULL); Py_DECREF(py_level); #else module = PyImport_ImportModuleLevelObject( name, global_dict, empty_dict, list, 1); #endif if (!module) { if (!PyErr_ExceptionMatches(PyExc_ImportError)) goto bad; PyErr_Clear(); } } level = 0; /* try absolute import on failure */ } #endif if (!module) { #if PY_VERSION_HEX < 0x03030000 PyObject *py_level = PyInt_FromLong(level); if (!py_level) goto bad; module = PyObject_CallFunctionObjArgs(py_import, name, global_dict, empty_dict, list, py_level, NULL); Py_DECREF(py_level); #else module = PyImport_ImportModuleLevelObject( name, global_dict, empty_dict, list, level); #endif } } #else if (level>0) { PyErr_SetString(PyExc_RuntimeError, "Relative import is not supported for Python <=2.4."); goto bad; } module = PyObject_CallFunctionObjArgs(py_import, name, global_dict, empty_dict, list, NULL); #endif bad: #if PY_VERSION_HEX < 0x03030000 Py_XDECREF(py_import); #endif Py_XDECREF(empty_list); Py_XDECREF(empty_dict); return module; } static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) { const long neg_one = (long) -1, const_zero = 0; const int is_unsigned = neg_one > const_zero; if (is_unsigned) { if (sizeof(long) < sizeof(long)) { return PyInt_FromLong((long) value); } else if (sizeof(long) <= sizeof(unsigned long)) { return PyLong_FromUnsignedLong((unsigned long) value); } else if (sizeof(long) <= sizeof(unsigned long long)) { return PyLong_FromUnsignedLongLong((unsigned long long) value); } } else { if (sizeof(long) <= sizeof(long)) { return PyInt_FromLong((long) value); } else if (sizeof(long) <= sizeof(long long)) { return PyLong_FromLongLong((long long) value); } } { int one = 1; int little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&value; return _PyLong_FromByteArray(bytes, sizeof(long), little, !is_unsigned); } } #define __PYX_VERIFY_RETURN_INT(target_type, func_type, func) \ { \ func_type value = func(x); \ if (sizeof(target_type) < sizeof(func_type)) { \ if (unlikely(value != (func_type) (target_type) value)) { \ func_type zero = 0; \ PyErr_SetString(PyExc_OverflowError, \ (is_unsigned && unlikely(value < zero)) ? \ "can't convert negative value to " #target_type : \ "value too large to convert to " #target_type); \ return (target_type) -1; \ } \ } \ return (target_type) value; \ } #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS #include "longintrepr.h" #endif #endif static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) { const int neg_one = (int) -1, const_zero = 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) } else { long val = PyInt_AS_LONG(x); if (is_unsigned && unlikely(val < 0)) { PyErr_SetString(PyExc_OverflowError, "can't convert negative value to int"); return (int) -1; } return (int) val; } } else #endif if (likely(PyLong_Check(x))) { if (is_unsigned) { #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS if (sizeof(digit) <= sizeof(int)) { switch (Py_SIZE(x)) { case 0: return 0; case 1: return (int) ((PyLongObject*)x)->ob_digit[0]; } } #endif #endif if (unlikely(Py_SIZE(x) < 0)) { PyErr_SetString(PyExc_OverflowError, "can't convert negative value to int"); return (int) -1; } if (sizeof(int) <= sizeof(unsigned long)) { __PYX_VERIFY_RETURN_INT(int, unsigned long, PyLong_AsUnsignedLong) } else if (sizeof(int) <= sizeof(unsigned long long)) { __PYX_VERIFY_RETURN_INT(int, unsigned long long, PyLong_AsUnsignedLongLong) } } else { #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS if (sizeof(digit) <= sizeof(int)) { switch (Py_SIZE(x)) { case 0: return 0; case 1: return +(int) ((PyLongObject*)x)->ob_digit[0]; case -1: return -(int) ((PyLongObject*)x)->ob_digit[0]; } } #endif #endif if (sizeof(int) <= sizeof(long)) { __PYX_VERIFY_RETURN_INT(int, long, PyLong_AsLong) } else if (sizeof(int) <= sizeof(long long)) { __PYX_VERIFY_RETURN_INT(int, long long, PyLong_AsLongLong) } } { #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_Int(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_Int(x); if (!tmp) return (int) -1; val = __Pyx_PyInt_As_int(tmp); Py_DECREF(tmp); return val; } } #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS #include "longintrepr.h" #endif #endif static CYTHON_INLINE npy_int64 __Pyx_PyInt_As_npy_int64(PyObject *x) { const npy_int64 neg_one = (npy_int64) -1, const_zero = 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) } else { long val = PyInt_AS_LONG(x); if (is_unsigned && unlikely(val < 0)) { PyErr_SetString(PyExc_OverflowError, "can't convert negative value to npy_int64"); return (npy_int64) -1; } return (npy_int64) val; } } else #endif if (likely(PyLong_Check(x))) { if (is_unsigned) { #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS if (sizeof(digit) <= sizeof(npy_int64)) { switch (Py_SIZE(x)) { case 0: return 0; case 1: return (npy_int64) ((PyLongObject*)x)->ob_digit[0]; } } #endif #endif if (unlikely(Py_SIZE(x) < 0)) { PyErr_SetString(PyExc_OverflowError, "can't convert negative value to npy_int64"); return (npy_int64) -1; } if (sizeof(npy_int64) <= sizeof(unsigned long)) { __PYX_VERIFY_RETURN_INT(npy_int64, unsigned long, PyLong_AsUnsignedLong) } else if (sizeof(npy_int64) <= sizeof(unsigned long long)) { __PYX_VERIFY_RETURN_INT(npy_int64, unsigned long long, PyLong_AsUnsignedLongLong) } } else { #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS if (sizeof(digit) <= sizeof(npy_int64)) { switch (Py_SIZE(x)) { case 0: return 0; case 1: return +(npy_int64) ((PyLongObject*)x)->ob_digit[0]; case -1: return -(npy_int64) ((PyLongObject*)x)->ob_digit[0]; } } #endif #endif if (sizeof(npy_int64) <= sizeof(long)) { __PYX_VERIFY_RETURN_INT(npy_int64, long, PyLong_AsLong) } else if (sizeof(npy_int64) <= sizeof(long long)) { __PYX_VERIFY_RETURN_INT(npy_int64, long long, PyLong_AsLongLong) } } { #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_Int(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_Int(x); if (!tmp) return (npy_int64) -1; val = __Pyx_PyInt_As_npy_int64(tmp); Py_DECREF(tmp); return val; } } static CYTHON_INLINE PyObject* __Pyx_PyInt_From_npy_int32(npy_int32 value) { const npy_int32 neg_one = (npy_int32) -1, const_zero = 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); } else if (sizeof(npy_int32) <= sizeof(unsigned long long)) { return PyLong_FromUnsignedLongLong((unsigned long long) value); } } else { if (sizeof(npy_int32) <= sizeof(long)) { return PyInt_FromLong((long) value); } else if (sizeof(npy_int32) <= sizeof(long long)) { return PyLong_FromLongLong((long long) value); } } { 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); } } #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION < 3 static PyObject *__Pyx_GetStdout(void) { PyObject *f = PySys_GetObject((char *)"stdout"); if (!f) { PyErr_SetString(PyExc_RuntimeError, "lost sys.stdout"); } return f; } static int __Pyx_Print(PyObject* f, PyObject *arg_tuple, int newline) { int i; if (!f) { if (!(f = __Pyx_GetStdout())) return -1; } Py_INCREF(f); for (i=0; i < PyTuple_GET_SIZE(arg_tuple); i++) { PyObject* v; if (PyFile_SoftSpace(f, 1)) { if (PyFile_WriteString(" ", f) < 0) goto error; } v = PyTuple_GET_ITEM(arg_tuple, i); if (PyFile_WriteObject(v, f, Py_PRINT_RAW) < 0) goto error; if (PyString_Check(v)) { char *s = PyString_AsString(v); Py_ssize_t len = PyString_Size(v); if (len > 0 && isspace(Py_CHARMASK(s[len-1])) && s[len-1] != ' ') PyFile_SoftSpace(f, 0); } } if (newline) { if (PyFile_WriteString("\n", f) < 0) goto error; PyFile_SoftSpace(f, 0); } Py_DECREF(f); return 0; error: Py_DECREF(f); return -1; } #else /* Python 3 has a print function */ static int __Pyx_Print(PyObject* stream, PyObject *arg_tuple, int newline) { PyObject* kwargs = 0; PyObject* result = 0; PyObject* end_string; if (unlikely(!__pyx_print)) { __pyx_print = PyObject_GetAttr(__pyx_b, __pyx_n_s_print); if (!__pyx_print) return -1; } if (stream) { kwargs = PyDict_New(); if (unlikely(!kwargs)) return -1; if (unlikely(PyDict_SetItem(kwargs, __pyx_n_s_file, stream) < 0)) goto bad; if (!newline) { end_string = PyUnicode_FromStringAndSize(" ", 1); if (unlikely(!end_string)) goto bad; if (PyDict_SetItem(kwargs, __pyx_n_s_end, end_string) < 0) { Py_DECREF(end_string); goto bad; } Py_DECREF(end_string); } } else if (!newline) { if (unlikely(!__pyx_print_kwargs)) { __pyx_print_kwargs = PyDict_New(); if (unlikely(!__pyx_print_kwargs)) return -1; end_string = PyUnicode_FromStringAndSize(" ", 1); if (unlikely(!end_string)) return -1; if (PyDict_SetItem(__pyx_print_kwargs, __pyx_n_s_end, end_string) < 0) { Py_DECREF(end_string); return -1; } Py_DECREF(end_string); } kwargs = __pyx_print_kwargs; } result = PyObject_Call(__pyx_print, arg_tuple, kwargs); if (unlikely(kwargs) && (kwargs != __pyx_print_kwargs)) Py_DECREF(kwargs); if (!result) return -1; Py_DECREF(result); return 0; bad: if (kwargs != __pyx_print_kwargs) Py_XDECREF(kwargs); return -1; } #endif #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION < 3 static int __Pyx_PrintOne(PyObject* f, PyObject *o) { if (!f) { if (!(f = __Pyx_GetStdout())) return -1; } Py_INCREF(f); if (PyFile_SoftSpace(f, 0)) { if (PyFile_WriteString(" ", f) < 0) goto error; } if (PyFile_WriteObject(o, f, Py_PRINT_RAW) < 0) goto error; if (PyFile_WriteString("\n", f) < 0) goto error; Py_DECREF(f); return 0; error: Py_DECREF(f); return -1; /* the line below is just to avoid C compiler * warnings about unused functions */ return __Pyx_Print(f, NULL, 0); } #else /* Python 3 has a print function */ static int __Pyx_PrintOne(PyObject* stream, PyObject *o) { int res; PyObject* arg_tuple = PyTuple_Pack(1, o); if (unlikely(!arg_tuple)) return -1; res = __Pyx_Print(stream, arg_tuple, 1); Py_DECREF(arg_tuple); return res; } #endif static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value) { const int neg_one = (int) -1, const_zero = 0; const int is_unsigned = neg_one > const_zero; if (is_unsigned) { if (sizeof(int) < sizeof(long)) { return PyInt_FromLong((long) value); } else if (sizeof(int) <= sizeof(unsigned long)) { return PyLong_FromUnsignedLong((unsigned long) value); } else if (sizeof(int) <= sizeof(unsigned long long)) { return PyLong_FromUnsignedLongLong((unsigned long long) value); } } else { if (sizeof(int) <= sizeof(long)) { return PyInt_FromLong((long) value); } else if (sizeof(int) <= sizeof(long long)) { return PyLong_FromLongLong((long long) value); } } { int one = 1; int little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&value; return _PyLong_FromByteArray(bytes, sizeof(int), little, !is_unsigned); } } #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS #include "longintrepr.h" #endif #endif static CYTHON_INLINE npy_int32 __Pyx_PyInt_As_npy_int32(PyObject *x) { const npy_int32 neg_one = (npy_int32) -1, const_zero = 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) } else { long val = PyInt_AS_LONG(x); if (is_unsigned && unlikely(val < 0)) { PyErr_SetString(PyExc_OverflowError, "can't convert negative value to npy_int32"); return (npy_int32) -1; } return (npy_int32) val; } } else #endif if (likely(PyLong_Check(x))) { if (is_unsigned) { #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS if (sizeof(digit) <= sizeof(npy_int32)) { switch (Py_SIZE(x)) { case 0: return 0; case 1: return (npy_int32) ((PyLongObject*)x)->ob_digit[0]; } } #endif #endif if (unlikely(Py_SIZE(x) < 0)) { PyErr_SetString(PyExc_OverflowError, "can't convert negative value to npy_int32"); return (npy_int32) -1; } if (sizeof(npy_int32) <= sizeof(unsigned long)) { __PYX_VERIFY_RETURN_INT(npy_int32, unsigned long, PyLong_AsUnsignedLong) } else if (sizeof(npy_int32) <= sizeof(unsigned long long)) { __PYX_VERIFY_RETURN_INT(npy_int32, unsigned long long, PyLong_AsUnsignedLongLong) } } else { #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS if (sizeof(digit) <= sizeof(npy_int32)) { switch (Py_SIZE(x)) { case 0: return 0; case 1: return +(npy_int32) ((PyLongObject*)x)->ob_digit[0]; case -1: return -(npy_int32) ((PyLongObject*)x)->ob_digit[0]; } } #endif #endif if (sizeof(npy_int32) <= sizeof(long)) { __PYX_VERIFY_RETURN_INT(npy_int32, long, PyLong_AsLong) } else if (sizeof(npy_int32) <= sizeof(long long)) { __PYX_VERIFY_RETURN_INT(npy_int32, long long, PyLong_AsLongLong) } } { #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_Int(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_Int(x); if (!tmp) return (npy_int32) -1; val = __Pyx_PyInt_As_npy_int32(tmp); Py_DECREF(tmp); return val; } } #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS #include "longintrepr.h" #endif #endif static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) { const long neg_one = (long) -1, const_zero = 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) } else { long val = PyInt_AS_LONG(x); if (is_unsigned && unlikely(val < 0)) { PyErr_SetString(PyExc_OverflowError, "can't convert negative value to long"); return (long) -1; } return (long) val; } } else #endif if (likely(PyLong_Check(x))) { if (is_unsigned) { #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS if (sizeof(digit) <= sizeof(long)) { switch (Py_SIZE(x)) { case 0: return 0; case 1: return (long) ((PyLongObject*)x)->ob_digit[0]; } } #endif #endif if (unlikely(Py_SIZE(x) < 0)) { PyErr_SetString(PyExc_OverflowError, "can't convert negative value to long"); return (long) -1; } if (sizeof(long) <= sizeof(unsigned long)) { __PYX_VERIFY_RETURN_INT(long, unsigned long, PyLong_AsUnsignedLong) } else if (sizeof(long) <= sizeof(unsigned long long)) { __PYX_VERIFY_RETURN_INT(long, unsigned long long, PyLong_AsUnsignedLongLong) } } else { #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS if (sizeof(digit) <= sizeof(long)) { switch (Py_SIZE(x)) { case 0: return 0; case 1: return +(long) ((PyLongObject*)x)->ob_digit[0]; case -1: return -(long) ((PyLongObject*)x)->ob_digit[0]; } } #endif #endif if (sizeof(long) <= sizeof(long)) { __PYX_VERIFY_RETURN_INT(long, long, PyLong_AsLong) } else if (sizeof(long) <= sizeof(long long)) { __PYX_VERIFY_RETURN_INT(long, long long, PyLong_AsLongLong) } } { #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_Int(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_Int(x); if (!tmp) return (long) -1; val = __Pyx_PyInt_As_long(tmp); Py_DECREF(tmp); return val; } } static PyObject* __Pyx_Method_ClassMethod(PyObject *method) { #if CYTHON_COMPILING_IN_PYPY if (PyObject_TypeCheck(method, &PyWrapperDescr_Type)) { /* cdef classes */ return PyClassMethod_New(method); } #else static PyTypeObject *methoddescr_type = NULL; if (methoddescr_type == NULL) { PyObject *meth = __Pyx_GetAttrString((PyObject*)&PyList_Type, "append"); if (!meth) return NULL; methoddescr_type = Py_TYPE(meth); Py_DECREF(meth); } if (PyObject_TypeCheck(method, methoddescr_type)) { /* cdef classes */ PyMethodDescrObject *descr = (PyMethodDescrObject *)method; #if PY_VERSION_HEX < 0x03020000 PyTypeObject *d_type = descr->d_type; #else PyTypeObject *d_type = descr->d_common.d_type; #endif return PyDescr_NewClassMethod(d_type, descr->d_method); } #endif else if (PyMethod_Check(method)) { /* python classes */ return PyClassMethod_New(PyMethod_GET_FUNCTION(method)); } else if (PyCFunction_Check(method)) { return PyClassMethod_New(method); } #ifdef __Pyx_CyFunction_USED else if (PyObject_TypeCheck(method, __pyx_CyFunctionType)) { return PyClassMethod_New(method); } #endif PyErr_SetString(PyExc_TypeError, "Class-level classmethod() can only be called on " "a method_descriptor or instance method."); return NULL; } #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 #if CYTHON_CCOMPLEX #else static CYTHON_INLINE int __Pyx_c_eqf(__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_sumf(__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_difff(__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_prodf(__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; } static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_quotf(__pyx_t_float_complex a, __pyx_t_float_complex b) { __pyx_t_float_complex z; float denom = b.real * b.real + b.imag * b.imag; z.real = (a.real * b.real + a.imag * b.imag) / denom; z.imag = (a.imag * b.real - a.real * b.imag) / denom; return z; } static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_negf(__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_zerof(__pyx_t_float_complex a) { return (a.real == 0) && (a.imag == 0); } static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_conjf(__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_absf(__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_powf(__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_prodf(a, a); return __Pyx_c_prodf(a, a); case 3: z = __Pyx_c_prodf(a, a); return __Pyx_c_prodf(z, a); case 4: z = __Pyx_c_prodf(a, a); return __Pyx_c_prodf(z, z); } } if (a.imag == 0) { if (a.real == 0) { return a; } r = a.real; theta = 0; } else { r = __Pyx_c_absf(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 #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 #if CYTHON_CCOMPLEX #else static CYTHON_INLINE int __Pyx_c_eq(__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(__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(__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(__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; } static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_quot(__pyx_t_double_complex a, __pyx_t_double_complex b) { __pyx_t_double_complex z; double denom = b.real * b.real + b.imag * b.imag; z.real = (a.real * b.real + a.imag * b.imag) / denom; z.imag = (a.imag * b.real - a.real * b.imag) / denom; return z; } static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_neg(__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(__pyx_t_double_complex a) { return (a.real == 0) && (a.imag == 0); } static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_conj(__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(__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(__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(a, a); return __Pyx_c_prod(a, a); case 3: z = __Pyx_c_prod(a, a); return __Pyx_c_prod(z, a); case 4: z = __Pyx_c_prod(a, a); return __Pyx_c_prod(z, z); } } if (a.imag == 0) { if (a.real == 0) { return a; } r = a.real; theta = 0; } else { r = __Pyx_c_abs(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 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_ptrdiff_t(ptrdiff_t value) { const ptrdiff_t neg_one = (ptrdiff_t) -1, const_zero = 0; const int is_unsigned = neg_one > const_zero; if (is_unsigned) { if (sizeof(ptrdiff_t) < sizeof(long)) { return PyInt_FromLong((long) value); } else if (sizeof(ptrdiff_t) <= sizeof(unsigned long)) { return PyLong_FromUnsignedLong((unsigned long) value); } else if (sizeof(ptrdiff_t) <= sizeof(unsigned long long)) { return PyLong_FromUnsignedLongLong((unsigned long long) value); } } else { if (sizeof(ptrdiff_t) <= sizeof(long)) { return PyInt_FromLong((long) value); } else if (sizeof(ptrdiff_t) <= sizeof(long long)) { return PyLong_FromLongLong((long long) value); } } { int one = 1; int little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&value; return _PyLong_FromByteArray(bytes, sizeof(ptrdiff_t), little, !is_unsigned); } } static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb) { PyObject *tmp_type, *tmp_value, *tmp_tb; #if CYTHON_COMPILING_IN_CPYTHON PyThreadState *tstate = PyThreadState_GET(); 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; #else PyErr_GetExcInfo(&tmp_type, &tmp_value, &tmp_tb); PyErr_SetExcInfo(*type, *value, *tb); #endif *type = tmp_type; *value = tmp_value; *tb = tmp_tb; } static PyObject *__Pyx_Generator_Next(PyObject *self); static PyObject *__Pyx_Generator_Send(PyObject *self, PyObject *value); static PyObject *__Pyx_Generator_Close(PyObject *self); static PyObject *__Pyx_Generator_Throw(PyObject *gen, PyObject *args); static PyTypeObject *__pyx_GeneratorType = 0; #define __Pyx_Generator_CheckExact(obj) (Py_TYPE(obj) == __pyx_GeneratorType) #define __Pyx_Generator_Undelegate(gen) Py_CLEAR((gen)->yieldfrom) #if 1 || PY_VERSION_HEX < 0x030300B0 static int __Pyx_PyGen_FetchStopIterationValue(PyObject **pvalue) { PyObject *et, *ev, *tb; PyObject *value = NULL; __Pyx_ErrFetch(&et, &ev, &tb); if (!et) { Py_XDECREF(tb); Py_XDECREF(ev); Py_INCREF(Py_None); *pvalue = Py_None; return 0; } if (unlikely(et != PyExc_StopIteration) && unlikely(!PyErr_GivenExceptionMatches(et, PyExc_StopIteration))) { __Pyx_ErrRestore(et, ev, tb); return -1; } if (likely(et == PyExc_StopIteration)) { if (likely(!ev) || !PyObject_IsInstance(ev, PyExc_StopIteration)) { if (!ev) { Py_INCREF(Py_None); ev = Py_None; } Py_XDECREF(tb); Py_DECREF(et); *pvalue = ev; return 0; } } PyErr_NormalizeException(&et, &ev, &tb); if (unlikely(!PyObject_IsInstance(ev, PyExc_StopIteration))) { __Pyx_ErrRestore(et, ev, tb); return -1; } Py_XDECREF(tb); Py_DECREF(et); #if PY_VERSION_HEX >= 0x030300A0 value = ((PyStopIterationObject *)ev)->value; Py_INCREF(value); Py_DECREF(ev); #else { PyObject* args = PyObject_GetAttr(ev, __pyx_n_s_args); Py_DECREF(ev); if (likely(args)) { value = PyObject_GetItem(args, 0); Py_DECREF(args); } if (unlikely(!value)) { __Pyx_ErrRestore(NULL, NULL, NULL); Py_INCREF(Py_None); value = Py_None; } } #endif *pvalue = value; return 0; } #endif static CYTHON_INLINE void __Pyx_Generator_ExceptionClear(__pyx_GeneratorObject *self) { PyObject *exc_type = self->exc_type; PyObject *exc_value = self->exc_value; PyObject *exc_traceback = self->exc_traceback; self->exc_type = NULL; self->exc_value = NULL; self->exc_traceback = NULL; Py_XDECREF(exc_type); Py_XDECREF(exc_value); Py_XDECREF(exc_traceback); } static CYTHON_INLINE int __Pyx_Generator_CheckRunning(__pyx_GeneratorObject *gen) { if (unlikely(gen->is_running)) { PyErr_SetString(PyExc_ValueError, "generator already executing"); return 1; } return 0; } static CYTHON_INLINE PyObject *__Pyx_Generator_SendEx(__pyx_GeneratorObject *self, PyObject *value) { PyObject *retval; assert(!self->is_running); if (unlikely(self->resume_label == 0)) { if (unlikely(value && value != Py_None)) { PyErr_SetString(PyExc_TypeError, "can't send non-None value to a " "just-started generator"); return NULL; } } if (unlikely(self->resume_label == -1)) { PyErr_SetNone(PyExc_StopIteration); return NULL; } if (value) { #if CYTHON_COMPILING_IN_PYPY #else /* Generators always return to their most recent caller, not * necessarily their creator. */ if (self->exc_traceback) { PyThreadState *tstate = PyThreadState_GET(); PyTracebackObject *tb = (PyTracebackObject *) self->exc_traceback; PyFrameObject *f = tb->tb_frame; Py_XINCREF(tstate->frame); assert(f->f_back == NULL); f->f_back = tstate->frame; } #endif __Pyx_ExceptionSwap(&self->exc_type, &self->exc_value, &self->exc_traceback); } else { __Pyx_Generator_ExceptionClear(self); } self->is_running = 1; retval = self->body((PyObject *) self, value); self->is_running = 0; if (retval) { __Pyx_ExceptionSwap(&self->exc_type, &self->exc_value, &self->exc_traceback); #if CYTHON_COMPILING_IN_PYPY #else /* Don't keep the reference to f_back any longer than necessary. It * may keep a chain of frames alive or it could create a reference * cycle. */ if (self->exc_traceback) { PyTracebackObject *tb = (PyTracebackObject *) self->exc_traceback; PyFrameObject *f = tb->tb_frame; Py_CLEAR(f->f_back); } #endif } else { __Pyx_Generator_ExceptionClear(self); } return retval; } static CYTHON_INLINE PyObject *__Pyx_Generator_FinishDelegation(__pyx_GeneratorObject *gen) { PyObject *ret; PyObject *val = NULL; __Pyx_Generator_Undelegate(gen); __Pyx_PyGen_FetchStopIterationValue(&val); ret = __Pyx_Generator_SendEx(gen, val); Py_XDECREF(val); return ret; } static PyObject *__Pyx_Generator_Next(PyObject *self) { __pyx_GeneratorObject *gen = (__pyx_GeneratorObject*) self; PyObject *yf = gen->yieldfrom; if (unlikely(__Pyx_Generator_CheckRunning(gen))) return NULL; if (yf) { PyObject *ret; gen->is_running = 1; ret = Py_TYPE(yf)->tp_iternext(yf); gen->is_running = 0; if (likely(ret)) { return ret; } return __Pyx_Generator_FinishDelegation(gen); } return __Pyx_Generator_SendEx(gen, Py_None); } static PyObject *__Pyx_Generator_Send(PyObject *self, PyObject *value) { __pyx_GeneratorObject *gen = (__pyx_GeneratorObject*) self; PyObject *yf = gen->yieldfrom; if (unlikely(__Pyx_Generator_CheckRunning(gen))) return NULL; if (yf) { PyObject *ret; gen->is_running = 1; if (__Pyx_Generator_CheckExact(yf)) { ret = __Pyx_Generator_Send(yf, value); } else { if (value == Py_None) ret = PyIter_Next(yf); else ret = __Pyx_PyObject_CallMethod1(yf, __pyx_n_s_send, value); } gen->is_running = 0; if (likely(ret)) { return ret; } return __Pyx_Generator_FinishDelegation(gen); } return __Pyx_Generator_SendEx(gen, value); } static int __Pyx_Generator_CloseIter(__pyx_GeneratorObject *gen, PyObject *yf) { PyObject *retval = NULL; int err = 0; if (__Pyx_Generator_CheckExact(yf)) { retval = __Pyx_Generator_Close(yf); if (!retval) return -1; } else { PyObject *meth; gen->is_running = 1; meth = PyObject_GetAttr(yf, __pyx_n_s_close); if (unlikely(!meth)) { if (!PyErr_ExceptionMatches(PyExc_AttributeError)) { PyErr_WriteUnraisable(yf); } PyErr_Clear(); } else { retval = PyObject_CallFunction(meth, NULL); Py_DECREF(meth); if (!retval) err = -1; } gen->is_running = 0; } Py_XDECREF(retval); return err; } static PyObject *__Pyx_Generator_Close(PyObject *self) { __pyx_GeneratorObject *gen = (__pyx_GeneratorObject *) self; PyObject *retval, *raised_exception; PyObject *yf = gen->yieldfrom; int err = 0; if (unlikely(__Pyx_Generator_CheckRunning(gen))) return NULL; if (yf) { Py_INCREF(yf); err = __Pyx_Generator_CloseIter(gen, yf); __Pyx_Generator_Undelegate(gen); Py_DECREF(yf); } if (err == 0) #if PY_VERSION_HEX < 0x02050000 PyErr_SetNone(PyExc_StopIteration); #else PyErr_SetNone(PyExc_GeneratorExit); #endif retval = __Pyx_Generator_SendEx(gen, NULL); if (retval) { Py_DECREF(retval); PyErr_SetString(PyExc_RuntimeError, "generator ignored GeneratorExit"); return NULL; } raised_exception = PyErr_Occurred(); if (!raised_exception || raised_exception == PyExc_StopIteration #if PY_VERSION_HEX >= 0x02050000 || raised_exception == PyExc_GeneratorExit || PyErr_GivenExceptionMatches(raised_exception, PyExc_GeneratorExit) #endif || PyErr_GivenExceptionMatches(raised_exception, PyExc_StopIteration)) { if (raised_exception) PyErr_Clear(); /* ignore these errors */ Py_INCREF(Py_None); return Py_None; } return NULL; } static PyObject *__Pyx_Generator_Throw(PyObject *self, PyObject *args) { __pyx_GeneratorObject *gen = (__pyx_GeneratorObject *) self; PyObject *typ; PyObject *tb = NULL; PyObject *val = NULL; PyObject *yf = gen->yieldfrom; if (!PyArg_UnpackTuple(args, (char *)"throw", 1, 3, &typ, &val, &tb)) return NULL; if (unlikely(__Pyx_Generator_CheckRunning(gen))) return NULL; if (yf) { PyObject *ret; Py_INCREF(yf); #if PY_VERSION_HEX >= 0x02050000 if (PyErr_GivenExceptionMatches(typ, PyExc_GeneratorExit)) { int err = __Pyx_Generator_CloseIter(gen, yf); Py_DECREF(yf); __Pyx_Generator_Undelegate(gen); if (err < 0) return __Pyx_Generator_SendEx(gen, NULL); goto throw_here; } #endif gen->is_running = 1; if (__Pyx_Generator_CheckExact(yf)) { ret = __Pyx_Generator_Throw(yf, args); } else { PyObject *meth = PyObject_GetAttr(yf, __pyx_n_s_throw); if (unlikely(!meth)) { Py_DECREF(yf); if (!PyErr_ExceptionMatches(PyExc_AttributeError)) { gen->is_running = 0; return NULL; } PyErr_Clear(); __Pyx_Generator_Undelegate(gen); gen->is_running = 0; goto throw_here; } ret = PyObject_CallObject(meth, args); Py_DECREF(meth); } gen->is_running = 0; Py_DECREF(yf); if (!ret) { ret = __Pyx_Generator_FinishDelegation(gen); } return ret; } throw_here: __Pyx_Raise(typ, val, tb, NULL); return __Pyx_Generator_SendEx(gen, NULL); } static int __Pyx_Generator_traverse(PyObject *self, visitproc visit, void *arg) { __pyx_GeneratorObject *gen = (__pyx_GeneratorObject *) self; Py_VISIT(gen->closure); Py_VISIT(gen->classobj); Py_VISIT(gen->yieldfrom); Py_VISIT(gen->exc_type); Py_VISIT(gen->exc_value); Py_VISIT(gen->exc_traceback); return 0; } static int __Pyx_Generator_clear(PyObject *self) { __pyx_GeneratorObject *gen = (__pyx_GeneratorObject *) self; Py_CLEAR(gen->closure); Py_CLEAR(gen->classobj); Py_CLEAR(gen->yieldfrom); Py_CLEAR(gen->exc_type); Py_CLEAR(gen->exc_value); Py_CLEAR(gen->exc_traceback); return 0; } static void __Pyx_Generator_dealloc(PyObject *self) { __pyx_GeneratorObject *gen = (__pyx_GeneratorObject *) self; PyObject_GC_UnTrack(gen); if (gen->gi_weakreflist != NULL) PyObject_ClearWeakRefs(self); if (gen->resume_label > 0) { PyObject_GC_Track(self); #if PY_VERSION_HEX >= 0x030400a1 if (PyObject_CallFinalizerFromDealloc(self)) #else Py_TYPE(gen)->tp_del(self); if (self->ob_refcnt > 0) #endif return; /* resurrected. :( */ PyObject_GC_UnTrack(self); } __Pyx_Generator_clear(self); PyObject_GC_Del(gen); } static void __Pyx_Generator_del(PyObject *self) { PyObject *res; PyObject *error_type, *error_value, *error_traceback; __pyx_GeneratorObject *gen = (__pyx_GeneratorObject *) self; if (gen->resume_label <= 0) return ; #if PY_VERSION_HEX < 0x030400a1 assert(self->ob_refcnt == 0); self->ob_refcnt = 1; #endif __Pyx_ErrFetch(&error_type, &error_value, &error_traceback); res = __Pyx_Generator_Close(self); if (res == NULL) PyErr_WriteUnraisable(self); else Py_DECREF(res); __Pyx_ErrRestore(error_type, error_value, error_traceback); #if PY_VERSION_HEX < 0x030400a1 /* Undo the temporary resurrection; can't use DECREF here, it would * cause a recursive call. */ assert(self->ob_refcnt > 0); if (--self->ob_refcnt == 0) return; /* this is the normal path out */ /* close() resurrected it! Make it look like the original Py_DECREF * never happened. */ { Py_ssize_t refcnt = self->ob_refcnt; _Py_NewReference(self); self->ob_refcnt = refcnt; } #if CYTHON_COMPILING_IN_CPYTHON assert(PyType_IS_GC(self->ob_type) && _Py_AS_GC(self)->gc.gc_refs != _PyGC_REFS_UNTRACKED); /* If Py_REF_DEBUG, _Py_NewReference bumped _Py_RefTotal, so * we need to undo that. */ _Py_DEC_REFTOTAL; #endif /* If Py_TRACE_REFS, _Py_NewReference re-added self to the object * chain, so no more to do there. * If COUNT_ALLOCS, the original decref bumped tp_frees, and * _Py_NewReference bumped tp_allocs: both of those need to be * undone. */ #ifdef COUNT_ALLOCS --Py_TYPE(self)->tp_frees; --Py_TYPE(self)->tp_allocs; #endif #endif } static PyMemberDef __pyx_Generator_memberlist[] = { {(char *) "gi_running", #if PY_VERSION_HEX >= 0x02060000 T_BOOL, #else T_BYTE, #endif offsetof(__pyx_GeneratorObject, is_running), READONLY, NULL}, {0, 0, 0, 0, 0} }; static PyMethodDef __pyx_Generator_methods[] = { {__Pyx_NAMESTR("send"), (PyCFunction) __Pyx_Generator_Send, METH_O, 0}, {__Pyx_NAMESTR("throw"), (PyCFunction) __Pyx_Generator_Throw, METH_VARARGS, 0}, {__Pyx_NAMESTR("close"), (PyCFunction) __Pyx_Generator_Close, METH_NOARGS, 0}, {0, 0, 0, 0} }; static PyTypeObject __pyx_GeneratorType_type = { PyVarObject_HEAD_INIT(0, 0) __Pyx_NAMESTR("generator"), /*tp_name*/ sizeof(__pyx_GeneratorObject), /*tp_basicsize*/ 0, /*tp_itemsize*/ (destructor) __Pyx_Generator_dealloc,/*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #else 0, /*reserved*/ #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_GC | Py_TPFLAGS_HAVE_FINALIZE, /* tp_flags*/ 0, /*tp_doc*/ (traverseproc) __Pyx_Generator_traverse, /*tp_traverse*/ 0, /*tp_clear*/ 0, /*tp_richcompare*/ offsetof(__pyx_GeneratorObject, gi_weakreflist), /* tp_weaklistoffse */ 0, /*tp_iter*/ (iternextfunc) __Pyx_Generator_Next, /*tp_iternext*/ __pyx_Generator_methods, /*tp_methods*/ __pyx_Generator_memberlist, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ 0, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ #if PY_VERSION_HEX >= 0x030400a1 0, /*tp_del*/ #else __Pyx_Generator_del, /*tp_del*/ #endif #if PY_VERSION_HEX >= 0x02060000 0, /*tp_version_tag*/ #endif #if PY_VERSION_HEX >= 0x030400a1 __Pyx_Generator_del, /*tp_finalize*/ #endif }; static __pyx_GeneratorObject *__Pyx_Generator_New(__pyx_generator_body_t body, PyObject *closure) { __pyx_GeneratorObject *gen = PyObject_GC_New(__pyx_GeneratorObject, &__pyx_GeneratorType_type); if (gen == NULL) return NULL; gen->body = body; gen->closure = closure; Py_XINCREF(closure); gen->is_running = 0; gen->resume_label = 0; gen->classobj = NULL; gen->yieldfrom = NULL; gen->exc_type = NULL; gen->exc_value = NULL; gen->exc_traceback = NULL; gen->gi_weakreflist = NULL; PyObject_GC_Track(gen); return gen; } static int __pyx_Generator_init(void) { __pyx_GeneratorType_type.tp_getattro = PyObject_GenericGetAttr; __pyx_GeneratorType_type.tp_iter = PyObject_SelfIter; __pyx_GeneratorType = __Pyx_FetchCommonType(&__pyx_GeneratorType_type); if (__pyx_GeneratorType == NULL) { return -1; } return 0; } 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); #if PY_VERSION_HEX < 0x02050000 return PyErr_Warn(NULL, message); #else return PyErr_WarnEx(NULL, message, 1); #endif } return 0; } static int __Pyx_ExportFunction(const char *name, void (*f)(void), const char *sig) { PyObject *d = 0; PyObject *cobj = 0; union { void (*fp)(void); void *p; } tmp; d = PyObject_GetAttrString(__pyx_m, (char *)"__pyx_capi__"); if (!d) { PyErr_Clear(); d = PyDict_New(); if (!d) goto bad; Py_INCREF(d); if (PyModule_AddObject(__pyx_m, (char *)"__pyx_capi__", d) < 0) goto bad; } tmp.fp = f; #if PY_VERSION_HEX >= 0x02070000 && !(PY_MAJOR_VERSION==3&&PY_MINOR_VERSION==0) cobj = PyCapsule_New(tmp.p, sig, 0); #else cobj = PyCObject_FromVoidPtrAndDesc(tmp.p, (void *)sig, 0); #endif if (!cobj) goto bad; if (PyDict_SetItemString(d, name, cobj) < 0) goto bad; Py_DECREF(cobj); Py_DECREF(d); return 0; bad: Py_XDECREF(cobj); Py_XDECREF(d); return -1; } #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 #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", module_name, class_name); #if PY_VERSION_HEX < 0x02050000 if (PyErr_Warn(NULL, warning) < 0) goto bad; #else if (PyErr_WarnEx(NULL, warning, 0) < 0) goto bad; #endif } else if ((size_t)basicsize != size) { PyErr_Format(PyExc_ValueError, "%.200s.%.200s has the wrong size, try recompiling", module_name, class_name); goto bad; } return (PyTypeObject *)result; bad: Py_XDECREF(py_module); Py_XDECREF(result); return NULL; } #endif 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) / 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, 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); } #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, /*int argcount,*/ 0, /*int kwonlyargcount,*/ 0, /*int nlocals,*/ 0, /*int stacksize,*/ 0, /*int flags,*/ __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, /*int firstlineno,*/ __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; PyObject *py_globals = 0; PyFrameObject *py_frame = 0; py_code = __pyx_find_code_object(c_line ? c_line : py_line); if (!py_code) { py_code = __Pyx_CreateCodeObjectForTraceback( funcname, c_line, py_line, filename); if (!py_code) goto bad; __pyx_insert_code_object(c_line ? c_line : py_line, py_code); } py_globals = PyModule_GetDict(__pyx_m); if (!py_globals) goto bad; py_frame = PyFrame_New( PyThreadState_GET(), /*PyThreadState *tstate,*/ py_code, /*PyCodeObject *code,*/ py_globals, /*PyObject *globals,*/ 0 /*PyObject *locals*/ ); if (!py_frame) goto bad; py_frame->f_lineno = py_line; PyTraceBack_Here(py_frame); bad: Py_XDECREF(py_code); Py_XDECREF(py_frame); } 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 /* Python 3+ has unicode identifiers */ if (t->is_unicode | t->is_str) { if (t->intern) { *t->p = PyUnicode_InternFromString(t->s); } else if (t->encoding) { *t->p = PyUnicode_Decode(t->s, t->n - 1, t->encoding, NULL); } else { *t->p = PyUnicode_FromStringAndSize(t->s, t->n - 1); } } else { *t->p = PyBytes_FromStringAndSize(t->s, t->n - 1); } #endif if (!*t->p) return -1; ++t; } return 0; } static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(char* c_str) { return __Pyx_PyUnicode_FromStringAndSize(c_str, strlen(c_str)); } static CYTHON_INLINE char* __Pyx_PyObject_AsString(PyObject* o) { Py_ssize_t ignore; return __Pyx_PyObject_AsStringAndSize(o, &ignore); } static CYTHON_INLINE char* __Pyx_PyObject_AsStringAndSize(PyObject* o, Py_ssize_t *length) { #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT if ( #if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII __Pyx_sys_getdefaultencoding_not_ascii && #endif PyUnicode_Check(o)) { #if PY_VERSION_HEX < 0x03030000 char* defenc_c; PyObject* defenc = _PyUnicode_AsDefaultEncodedString(o, NULL); if (!defenc) return NULL; defenc_c = PyBytes_AS_STRING(defenc); #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII { char* end = defenc_c + PyBytes_GET_SIZE(defenc); char* c; for (c = defenc_c; c < end; c++) { if ((unsigned char) (*c) >= 128) { PyUnicode_AsASCIIString(o); return NULL; } } } #endif /*__PYX_DEFAULT_STRING_ENCODING_IS_ASCII*/ *length = PyBytes_GET_SIZE(defenc); return defenc_c; #else /* PY_VERSION_HEX < 0x03030000 */ if (PyUnicode_READY(o) == -1) return NULL; #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII if (PyUnicode_IS_ASCII(o)) { *length = PyUnicode_GET_DATA_SIZE(o); return PyUnicode_AsUTF8(o); } else { PyUnicode_AsASCIIString(o); return NULL; } #else /* __PYX_DEFAULT_STRING_ENCODING_IS_ASCII */ return PyUnicode_AsUTF8AndSize(o, length); #endif /* __PYX_DEFAULT_STRING_ENCODING_IS_ASCII */ #endif /* PY_VERSION_HEX < 0x03030000 */ } else #endif /* __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT */ #if PY_VERSION_HEX >= 0x02060000 if (PyByteArray_Check(o)) { *length = PyByteArray_GET_SIZE(o); return PyByteArray_AS_STRING(o); } else #endif { char* result; int r = PyBytes_AsStringAndSize(o, &result, length); if (unlikely(r < 0)) { return NULL; } else { return result; } } } static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject* x) { int is_true = x == Py_True; if (is_true | (x == Py_False) | (x == Py_None)) return is_true; else return PyObject_IsTrue(x); } static CYTHON_INLINE PyObject* __Pyx_PyNumber_Int(PyObject* x) { PyNumberMethods *m; const char *name = NULL; PyObject *res = NULL; #if PY_MAJOR_VERSION < 3 if (PyInt_Check(x) || PyLong_Check(x)) #else if (PyLong_Check(x)) #endif return Py_INCREF(x), x; m = Py_TYPE(x)->tp_as_number; #if PY_MAJOR_VERSION < 3 if (m && m->nb_int) { name = "int"; res = PyNumber_Int(x); } else if (m && m->nb_long) { name = "long"; res = PyNumber_Long(x); } #else if (m && m->nb_int) { name = "int"; res = PyNumber_Long(x); } #endif if (res) { #if PY_MAJOR_VERSION < 3 if (!PyInt_Check(res) && !PyLong_Check(res)) { #else if (!PyLong_Check(res)) { #endif PyErr_Format(PyExc_TypeError, "__%.4s__ returned non-%.4s (type %.200s)", name, name, Py_TYPE(res)->tp_name); Py_DECREF(res); return NULL; } } else if (!PyErr_Occurred()) { PyErr_SetString(PyExc_TypeError, "an integer is required"); } return res; } #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS #include "longintrepr.h" #endif #endif 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))) return PyInt_AS_LONG(b); #endif if (likely(PyLong_CheckExact(b))) { #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS switch (Py_SIZE(b)) { case -1: return -(sdigit)((PyLongObject*)b)->ob_digit[0]; case 0: return 0; case 1: return ((PyLongObject*)b)->ob_digit[0]; } #endif #endif #if PY_VERSION_HEX < 0x02060000 return PyInt_AsSsize_t(b); #else return PyLong_AsSsize_t(b); #endif } 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) { #if PY_VERSION_HEX < 0x02050000 if (ival <= LONG_MAX) return PyInt_FromLong((long)ival); else { unsigned char *bytes = (unsigned char *) &ival; int one = 1; int little = (int)*(unsigned char*)&one; return _PyLong_FromByteArray(bytes, sizeof(size_t), little, 0); } #else return PyInt_FromSize_t(ival); #endif } #endif /* Py_PYTHON_H */ debian/cythonized-files/pandas/hashtable.c0000664000000000000000000373622012275603610016034 0ustar /* Generated by Cython 0.20 on Mon Feb 3 08:41:48 2014 */ #define PY_SSIZE_T_CLEAN #ifndef CYTHON_USE_PYLONG_INTERNALS #ifdef PYLONG_BITS_IN_DIGIT #define CYTHON_USE_PYLONG_INTERNALS 0 #else #include "pyconfig.h" #ifdef PYLONG_BITS_IN_DIGIT #define CYTHON_USE_PYLONG_INTERNALS 1 #else #define CYTHON_USE_PYLONG_INTERNALS 0 #endif #endif #endif #include "Python.h" #ifndef Py_PYTHON_H #error Python headers needed to compile C extensions, please install development version of Python. #elif PY_VERSION_HEX < 0x02040000 #error Cython requires Python 2.4+. #else #define CYTHON_ABI "0_20" #include /* For offsetof */ #ifndef offsetof #define offsetof(type, member) ( (size_t) & ((type*)0) -> member ) #endif #if !defined(WIN32) && !defined(MS_WINDOWS) #ifndef __stdcall #define __stdcall #endif #ifndef __cdecl #define __cdecl #endif #ifndef __fastcall #define __fastcall #endif #endif #ifndef DL_IMPORT #define DL_IMPORT(t) t #endif #ifndef DL_EXPORT #define DL_EXPORT(t) t #endif #ifndef PY_LONG_LONG #define PY_LONG_LONG LONG_LONG #endif #ifndef Py_HUGE_VAL #define Py_HUGE_VAL HUGE_VAL #endif #ifdef PYPY_VERSION #define CYTHON_COMPILING_IN_PYPY 1 #define CYTHON_COMPILING_IN_CPYTHON 0 #else #define CYTHON_COMPILING_IN_PYPY 0 #define CYTHON_COMPILING_IN_CPYTHON 1 #endif #if CYTHON_COMPILING_IN_PYPY #define Py_OptimizeFlag 0 #endif #if PY_VERSION_HEX < 0x02050000 typedef int Py_ssize_t; #define PY_SSIZE_T_MAX INT_MAX #define PY_SSIZE_T_MIN INT_MIN #define PY_FORMAT_SIZE_T "" #define CYTHON_FORMAT_SSIZE_T "" #define PyInt_FromSsize_t(z) PyInt_FromLong(z) #define PyInt_AsSsize_t(o) __Pyx_PyInt_As_int(o) #define PyNumber_Index(o) ((PyNumber_Check(o) && !PyFloat_Check(o)) ? PyNumber_Int(o) : \ (PyErr_Format(PyExc_TypeError, \ "expected index value, got %.200s", Py_TYPE(o)->tp_name), \ (PyObject*)0)) #define __Pyx_PyIndex_Check(o) (PyNumber_Check(o) && !PyFloat_Check(o) && \ !PyComplex_Check(o)) #define PyIndex_Check __Pyx_PyIndex_Check #define PyErr_WarnEx(category, message, stacklevel) PyErr_Warn(category, message) #define __PYX_BUILD_PY_SSIZE_T "i" #else #define __PYX_BUILD_PY_SSIZE_T "n" #define CYTHON_FORMAT_SSIZE_T "z" #define __Pyx_PyIndex_Check PyIndex_Check #endif #if PY_VERSION_HEX < 0x02060000 #define Py_REFCNT(ob) (((PyObject*)(ob))->ob_refcnt) #define Py_TYPE(ob) (((PyObject*)(ob))->ob_type) #define Py_SIZE(ob) (((PyVarObject*)(ob))->ob_size) #define PyVarObject_HEAD_INIT(type, size) \ PyObject_HEAD_INIT(type) size, #define PyType_Modified(t) typedef struct { void *buf; PyObject *obj; Py_ssize_t len; Py_ssize_t itemsize; int readonly; int ndim; char *format; Py_ssize_t *shape; Py_ssize_t *strides; Py_ssize_t *suboffsets; void *internal; } Py_buffer; #define PyBUF_SIMPLE 0 #define PyBUF_WRITABLE 0x0001 #define PyBUF_FORMAT 0x0004 #define PyBUF_ND 0x0008 #define PyBUF_STRIDES (0x0010 | PyBUF_ND) #define PyBUF_C_CONTIGUOUS (0x0020 | PyBUF_STRIDES) #define PyBUF_F_CONTIGUOUS (0x0040 | PyBUF_STRIDES) #define PyBUF_ANY_CONTIGUOUS (0x0080 | PyBUF_STRIDES) #define PyBUF_INDIRECT (0x0100 | PyBUF_STRIDES) #define PyBUF_RECORDS (PyBUF_STRIDES | PyBUF_FORMAT | PyBUF_WRITABLE) #define PyBUF_FULL (PyBUF_INDIRECT | PyBUF_FORMAT | PyBUF_WRITABLE) typedef int (*getbufferproc)(PyObject *, Py_buffer *, int); typedef void (*releasebufferproc)(PyObject *, Py_buffer *); #endif #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, 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 #if PY_VERSION_HEX < 0x02060000 #define PyUnicode_FromString(s) PyUnicode_Decode(s, strlen(s), "UTF-8", "strict") #endif #if PY_MAJOR_VERSION >= 3 #define Py_TPFLAGS_CHECKTYPES 0 #define Py_TPFLAGS_HAVE_INDEX 0 #endif #if (PY_VERSION_HEX < 0x02060000) || (PY_MAJOR_VERSION >= 3) #define Py_TPFLAGS_HAVE_NEWBUFFER 0 #endif #if PY_VERSION_HEX < 0x02060000 #define Py_TPFLAGS_HAVE_VERSION_TAG 0 #endif #if PY_VERSION_HEX < 0x02060000 && !defined(Py_TPFLAGS_IS_ABSTRACT) #define Py_TPFLAGS_IS_ABSTRACT 0 #endif #if PY_VERSION_HEX < 0x030400a1 && !defined(Py_TPFLAGS_HAVE_FINALIZE) #define Py_TPFLAGS_HAVE_FINALIZE 0 #endif #if PY_VERSION_HEX > 0x03030000 && defined(PyUnicode_KIND) #define CYTHON_PEP393_ENABLED 1 #define __Pyx_PyUnicode_READY(op) (likely(PyUnicode_IS_READY(op)) ? \ 0 : _PyUnicode_Ready((PyObject *)(op))) #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_LENGTH(u) #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i) #define __Pyx_PyUnicode_KIND(u) PyUnicode_KIND(u) #define __Pyx_PyUnicode_DATA(u) PyUnicode_DATA(u) #define __Pyx_PyUnicode_READ(k, d, i) PyUnicode_READ(k, d, i) #else #define CYTHON_PEP393_ENABLED 0 #define __Pyx_PyUnicode_READY(op) (0) #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_SIZE(u) #define __Pyx_PyUnicode_READ_CHAR(u, i) ((Py_UCS4)(PyUnicode_AS_UNICODE(u)[i])) #define __Pyx_PyUnicode_KIND(u) (sizeof(Py_UNICODE)) #define __Pyx_PyUnicode_DATA(u) ((void*)PyUnicode_AS_UNICODE(u)) #define __Pyx_PyUnicode_READ(k, d, i) ((void)(k), (Py_UCS4)(((Py_UNICODE*)d)[i])) #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)) #define __Pyx_PyUnicode_Concat(a, b) ((unlikely((a) == Py_None) || unlikely((b) == Py_None)) ? \ PyNumber_Add(a, b) : PyUnicode_Concat(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 #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_VERSION_HEX < 0x02060000 #define PyBytesObject PyStringObject #define PyBytes_Type PyString_Type #define PyBytes_Check PyString_Check #define PyBytes_CheckExact PyString_CheckExact #define PyBytes_FromString PyString_FromString #define PyBytes_FromStringAndSize PyString_FromStringAndSize #define PyBytes_FromFormat PyString_FromFormat #define PyBytes_DecodeEscape PyString_DecodeEscape #define PyBytes_AsString PyString_AsString #define PyBytes_AsStringAndSize PyString_AsStringAndSize #define PyBytes_Size PyString_Size #define PyBytes_AS_STRING PyString_AS_STRING #define PyBytes_GET_SIZE PyString_GET_SIZE #define PyBytes_Repr PyString_Repr #define PyBytes_Concat PyString_Concat #define PyBytes_ConcatAndDel PyString_ConcatAndDel #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_CheckExact(obj) || PyUnicode_CheckExact(obj) || \ PyString_Check(obj) || PyUnicode_Check(obj)) #define __Pyx_PyBaseString_CheckExact(obj) (PyString_CheckExact(obj) || PyUnicode_CheckExact(obj)) #endif #if PY_VERSION_HEX < 0x02060000 #define PySet_Check(obj) PyObject_TypeCheck(obj, &PySet_Type) #define PyFrozenSet_Check(obj) PyObject_TypeCheck(obj, &PyFrozenSet_Type) #endif #ifndef PySet_CheckExact #define PySet_CheckExact(obj) (Py_TYPE(obj) == &PySet_Type) #endif #define __Pyx_TypeCheck(obj, type) PyObject_TypeCheck(obj, (PyTypeObject *)type) #if PY_MAJOR_VERSION >= 3 #define PyIntObject PyLongObject #define PyInt_Type PyLong_Type #define PyInt_Check(op) PyLong_Check(op) #define PyInt_CheckExact(op) PyLong_CheckExact(op) #define PyInt_FromString PyLong_FromString #define PyInt_FromUnicode PyLong_FromUnicode #define PyInt_FromLong PyLong_FromLong #define PyInt_FromSize_t PyLong_FromSize_t #define PyInt_FromSsize_t PyLong_FromSsize_t #define PyInt_AsLong PyLong_AsLong #define PyInt_AS_LONG PyLong_AS_LONG #define PyInt_AsSsize_t PyLong_AsSsize_t #define PyInt_AsUnsignedLongMask PyLong_AsUnsignedLongMask #define PyInt_AsUnsignedLongLongMask PyLong_AsUnsignedLongLongMask #define PyNumber_Int PyNumber_Long #endif #if PY_MAJOR_VERSION >= 3 #define PyBoolObject PyLongObject #endif #if PY_VERSION_HEX < 0x03020000 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) || (PY_VERSION_HEX >= 0x03010300) #define __Pyx_PySequence_GetSlice(obj, a, b) PySequence_GetSlice(obj, a, b) #define __Pyx_PySequence_SetSlice(obj, a, b, value) PySequence_SetSlice(obj, a, b, value) #define __Pyx_PySequence_DelSlice(obj, a, b) PySequence_DelSlice(obj, a, b) #else #define __Pyx_PySequence_GetSlice(obj, a, b) (unlikely(!(obj)) ? \ (PyErr_SetString(PyExc_SystemError, "null argument to internal routine"), (PyObject*)0) : \ (likely((obj)->ob_type->tp_as_mapping) ? (PySequence_GetSlice(obj, a, b)) : \ (PyErr_Format(PyExc_TypeError, "'%.200s' object is unsliceable", (obj)->ob_type->tp_name), (PyObject*)0))) #define __Pyx_PySequence_SetSlice(obj, a, b, value) (unlikely(!(obj)) ? \ (PyErr_SetString(PyExc_SystemError, "null argument to internal routine"), -1) : \ (likely((obj)->ob_type->tp_as_mapping) ? (PySequence_SetSlice(obj, a, b, value)) : \ (PyErr_Format(PyExc_TypeError, "'%.200s' object doesn't support slice assignment", (obj)->ob_type->tp_name), -1))) #define __Pyx_PySequence_DelSlice(obj, a, b) (unlikely(!(obj)) ? \ (PyErr_SetString(PyExc_SystemError, "null argument to internal routine"), -1) : \ (likely((obj)->ob_type->tp_as_mapping) ? (PySequence_DelSlice(obj, a, b)) : \ (PyErr_Format(PyExc_TypeError, "'%.200s' object doesn't support slice deletion", (obj)->ob_type->tp_name), -1))) #endif #if PY_MAJOR_VERSION >= 3 #define PyMethod_New(func, self, klass) ((self) ? PyMethod_New(func, self) : PyInstanceMethod_New(func)) #endif #if PY_VERSION_HEX < 0x02050000 #define __Pyx_GetAttrString(o,n) PyObject_GetAttrString((o),((char *)(n))) #define __Pyx_SetAttrString(o,n,a) PyObject_SetAttrString((o),((char *)(n)),(a)) #define __Pyx_DelAttrString(o,n) PyObject_DelAttrString((o),((char *)(n))) #else #define __Pyx_GetAttrString(o,n) PyObject_GetAttrString((o),(n)) #define __Pyx_SetAttrString(o,n,a) PyObject_SetAttrString((o),(n),(a)) #define __Pyx_DelAttrString(o,n) PyObject_DelAttrString((o),(n)) #endif #if PY_VERSION_HEX < 0x02050000 #define __Pyx_NAMESTR(n) ((char *)(n)) #define __Pyx_DOCSTR(n) ((char *)(n)) #else #define __Pyx_NAMESTR(n) (n) #define __Pyx_DOCSTR(n) (n) #endif #ifndef CYTHON_INLINE #if defined(__GNUC__) #define CYTHON_INLINE __inline__ #elif defined(_MSC_VER) #define CYTHON_INLINE __inline #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L #define CYTHON_INLINE inline #else #define CYTHON_INLINE #endif #endif #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 #ifdef NAN #define __PYX_NAN() ((float) NAN) #else static CYTHON_INLINE float __PYX_NAN() { /* Initialize NaN. The sign is irrelevant, an exponent with all bits 1 and a nonzero mantissa means NaN. If the first bit in the mantissa is 1, it is a quiet NaN. */ float value; memset(&value, 0xFF, sizeof(value)); return value; } #endif #if PY_MAJOR_VERSION >= 3 #define __Pyx_PyNumber_Divide(x,y) PyNumber_TrueDivide(x,y) #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceTrueDivide(x,y) #else #define __Pyx_PyNumber_Divide(x,y) PyNumber_Divide(x,y) #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceDivide(x,y) #endif #ifndef __PYX_EXTERN_C #ifdef __cplusplus #define __PYX_EXTERN_C extern "C" #else #define __PYX_EXTERN_C extern #endif #endif #if defined(WIN32) || defined(MS_WINDOWS) #define _USE_MATH_DEFINES #endif #include #define __PYX_HAVE__pandas__hashtable #define __PYX_HAVE_API__pandas__hashtable #include "string.h" #include "stdio.h" #include "pythread.h" #include "stdlib.h" #include "numpy/arrayobject.h" #include "numpy/ufuncobject.h" #include "khash_python.h" #include "numpy_helper.h" #include "datetime.h" #ifdef _OPENMP #include #endif /* _OPENMP */ #ifdef PYREX_WITHOUT_ASSERTIONS #define CYTHON_WITHOUT_ASSERTIONS #endif #ifndef CYTHON_UNUSED # if defined(__GNUC__) # if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)) # define CYTHON_UNUSED __attribute__ ((__unused__)) # else # define CYTHON_UNUSED # endif # elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER)) # define CYTHON_UNUSED __attribute__ ((__unused__)) # else # define CYTHON_UNUSED # endif #endif typedef struct {PyObject **p; char *s; const Py_ssize_t n; const char* encoding; const char is_unicode; const char is_str; const char intern; } __Pyx_StringTabEntry; /*proto*/ #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_fits_Py_ssize_t(v, type, is_signed) ( \ (sizeof(type) < sizeof(Py_ssize_t)) || \ (sizeof(type) > sizeof(Py_ssize_t) && \ likely(v < (type)PY_SSIZE_T_MAX || \ v == (type)PY_SSIZE_T_MAX) && \ (!is_signed || likely(v > (type)PY_SSIZE_T_MIN || \ v == (type)PY_SSIZE_T_MIN))) || \ (sizeof(type) == sizeof(Py_ssize_t) && \ (is_signed || likely(v < (type)PY_SSIZE_T_MAX || \ v == (type)PY_SSIZE_T_MAX))) ) static CYTHON_INLINE char* __Pyx_PyObject_AsString(PyObject*); static CYTHON_INLINE char* __Pyx_PyObject_AsStringAndSize(PyObject*, Py_ssize_t* length); #define __Pyx_PyByteArray_FromString(s) PyByteArray_FromStringAndSize((const char*)s, strlen((const char*)s)) #define __Pyx_PyByteArray_FromStringAndSize(s, l) PyByteArray_FromStringAndSize((const char*)s, l) #define __Pyx_PyBytes_FromString PyBytes_FromString #define __Pyx_PyBytes_FromStringAndSize PyBytes_FromStringAndSize static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(char*); #if PY_MAJOR_VERSION < 3 #define __Pyx_PyStr_FromString __Pyx_PyBytes_FromString #define __Pyx_PyStr_FromStringAndSize __Pyx_PyBytes_FromStringAndSize #else #define __Pyx_PyStr_FromString __Pyx_PyUnicode_FromString #define __Pyx_PyStr_FromStringAndSize __Pyx_PyUnicode_FromStringAndSize #endif #define __Pyx_PyObject_AsSString(s) ((signed char*) __Pyx_PyObject_AsString(s)) #define __Pyx_PyObject_AsUString(s) ((unsigned char*) __Pyx_PyObject_AsString(s)) #define __Pyx_PyObject_FromUString(s) __Pyx_PyObject_FromString((char*)s) #define __Pyx_PyBytes_FromUString(s) __Pyx_PyBytes_FromString((char*)s) #define __Pyx_PyByteArray_FromUString(s) __Pyx_PyByteArray_FromString((char*)s) #define __Pyx_PyStr_FromUString(s) __Pyx_PyStr_FromString((char*)s) #define __Pyx_PyUnicode_FromUString(s) __Pyx_PyUnicode_FromString((char*)s) #if PY_MAJOR_VERSION < 3 static CYTHON_INLINE size_t __Pyx_Py_UNICODE_strlen(const Py_UNICODE *u) { const Py_UNICODE *u_end = u; while (*u_end++) ; return u_end - u - 1; } #else #define __Pyx_Py_UNICODE_strlen Py_UNICODE_strlen #endif #define __Pyx_PyUnicode_FromUnicode(u) PyUnicode_FromUnicode(u, __Pyx_Py_UNICODE_strlen(u)) #define __Pyx_PyUnicode_FromUnicodeAndLength PyUnicode_FromUnicode #define __Pyx_PyUnicode_AsUnicode PyUnicode_AsUnicode #define __Pyx_Owned_Py_None(b) (Py_INCREF(Py_None), Py_None) #define __Pyx_PyBool_FromLong(b) ((b) ? (Py_INCREF(Py_True), Py_True) : (Py_INCREF(Py_False), Py_False)) static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*); static CYTHON_INLINE PyObject* __Pyx_PyNumber_Int(PyObject* x); static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*); static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t); #if CYTHON_COMPILING_IN_CPYTHON #define __pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x)) #else #define __pyx_PyFloat_AsDouble(x) PyFloat_AsDouble(x) #endif #define __pyx_PyFloat_AsFloat(x) ((float) __pyx_PyFloat_AsDouble(x)) #if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII static int __Pyx_sys_getdefaultencoding_not_ascii; static int __Pyx_init_sys_getdefaultencoding_params(void) { PyObject* sys = NULL; PyObject* default_encoding = NULL; PyObject* ascii_chars_u = NULL; PyObject* ascii_chars_b = NULL; sys = PyImport_ImportModule("sys"); if (sys == NULL) goto bad; default_encoding = PyObject_CallMethod(sys, (char*) (const char*) "getdefaultencoding", NULL); if (default_encoding == NULL) goto bad; if (strcmp(PyBytes_AsString(default_encoding), "ascii") == 0) { __Pyx_sys_getdefaultencoding_not_ascii = 0; } else { const char* default_encoding_c = PyBytes_AS_STRING(default_encoding); 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 == NULL) goto bad; ascii_chars_b = PyUnicode_AsEncodedString(ascii_chars_u, default_encoding_c, NULL); if (ascii_chars_b == NULL || strncmp(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_XDECREF(sys); Py_XDECREF(default_encoding); Py_XDECREF(ascii_chars_u); Py_XDECREF(ascii_chars_b); return 0; bad: Py_XDECREF(sys); 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 = NULL; PyObject* default_encoding = NULL; char* default_encoding_c; sys = PyImport_ImportModule("sys"); if (sys == NULL) goto bad; default_encoding = PyObject_CallMethod(sys, (char*) (const char*) "getdefaultencoding", NULL); if (default_encoding == NULL) goto bad; default_encoding_c = PyBytes_AS_STRING(default_encoding); __PYX_DEFAULT_STRING_ENCODING = (char*) malloc(strlen(default_encoding_c)); strcpy(__PYX_DEFAULT_STRING_ENCODING, default_encoding_c); Py_DECREF(sys); Py_DECREF(default_encoding); return 0; bad: Py_XDECREF(sys); Py_XDECREF(default_encoding); return -1; } #endif #endif #ifdef __GNUC__ /* Test for GCC > 2.95 */ #if __GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95)) #define likely(x) __builtin_expect(!!(x), 1) #define unlikely(x) __builtin_expect(!!(x), 0) #else /* __GNUC__ > 2 ... */ #define likely(x) (x) #define unlikely(x) (x) #endif /* __GNUC__ > 2 ... */ #else /* __GNUC__ */ #define likely(x) (x) #define unlikely(x) (x) #endif /* __GNUC__ */ static PyObject *__pyx_m; static PyObject *__pyx_d; static PyObject *__pyx_b; static PyObject *__pyx_empty_tuple; static PyObject *__pyx_empty_bytes; static int __pyx_lineno; static int __pyx_clineno = 0; static const char * __pyx_cfilenm= __FILE__; static const char *__pyx_filename; #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[] = { "hashtable.pyx", "util.pxd", "numpy.pxd", "type.pxd", "bool.pxd", "complex.pxd", }; #define IS_UNSIGNED(type) (((type) -1) > 0) struct __Pyx_StructField_; #define __PYX_BUF_FLAGS_PACKED_STRUCT (1 << 0) typedef struct { const char* name; /* for error messages only */ struct __Pyx_StructField_* fields; size_t size; /* sizeof(type) */ size_t arraysize[8]; /* length of array in each dimension */ int ndim; char typegroup; /* _R_eal, _C_omplex, Signed _I_nt, _U_nsigned int, _S_truct, _P_ointer, _O_bject, c_H_ar */ 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; /* "numpy.pxd":726 * # 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; /* "numpy.pxd":727 * * 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; /* "numpy.pxd":728 * 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; /* "numpy.pxd":729 * 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; /* "numpy.pxd":733 * #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; /* "numpy.pxd":734 * * 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; /* "numpy.pxd":735 * 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; /* "numpy.pxd":736 * 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; /* "numpy.pxd":740 * #ctypedef npy_uint128 uint128_t * * ctypedef npy_float16 float16_t # <<<<<<<<<<<<<< * ctypedef npy_float32 float32_t * ctypedef npy_float64 float64_t */ typedef npy_float16 __pyx_t_5numpy_float16_t; /* "numpy.pxd":741 * * ctypedef npy_float16 float16_t * ctypedef npy_float32 float32_t # <<<<<<<<<<<<<< * ctypedef npy_float64 float64_t * #ctypedef npy_float80 float80_t */ typedef npy_float32 __pyx_t_5numpy_float32_t; /* "numpy.pxd":742 * ctypedef npy_float16 float16_t * 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; /* "numpy.pxd":751 * # 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; /* "numpy.pxd":752 * # 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; /* "numpy.pxd":753 * 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; /* "numpy.pxd":755 * 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; /* "numpy.pxd":756 * * ctypedef npy_ulong uint_t * ctypedef npy_ulonglong ulong_t # <<<<<<<<<<<<<< * ctypedef npy_ulonglong ulonglong_t * */ typedef npy_ulonglong __pyx_t_5numpy_ulong_t; /* "numpy.pxd":757 * 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; /* "numpy.pxd":759 * ctypedef npy_ulonglong ulonglong_t * * ctypedef npy_intp intp_t # <<<<<<<<<<<<<< * ctypedef npy_uintp uintp_t * */ typedef npy_intp __pyx_t_5numpy_intp_t; /* "numpy.pxd":760 * * ctypedef npy_intp intp_t * ctypedef npy_uintp uintp_t # <<<<<<<<<<<<<< * * ctypedef npy_double float_t */ typedef npy_uintp __pyx_t_5numpy_uintp_t; /* "numpy.pxd":762 * 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; /* "numpy.pxd":763 * * ctypedef npy_double float_t * ctypedef npy_double double_t # <<<<<<<<<<<<<< * ctypedef npy_longdouble longdouble_t * */ typedef npy_double __pyx_t_5numpy_double_t; /* "numpy.pxd":764 * 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; #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 #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 /*--- Type declarations ---*/ struct __pyx_obj_6pandas_9hashtable_Int64Vector; struct __pyx_obj_6pandas_9hashtable_HashTable; struct __pyx_obj_6pandas_9hashtable_Float64HashTable; struct __pyx_obj_6pandas_9hashtable_Int32HashTable; struct __pyx_obj_6pandas_9hashtable_StringHashTable; struct __pyx_obj_6pandas_9hashtable_ObjectVector; struct __pyx_obj_6pandas_9hashtable_PyObjectHashTable; struct __pyx_obj_6pandas_9hashtable_Int64HashTable; struct __pyx_obj_6pandas_9hashtable_Int64Factorizer; struct __pyx_obj_6pandas_9hashtable_Factorizer; struct __pyx_obj_6pandas_9hashtable_Float64Vector; /* "numpy.pxd":766 * 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; /* "numpy.pxd":767 * * ctypedef npy_cfloat cfloat_t * ctypedef npy_cdouble cdouble_t # <<<<<<<<<<<<<< * ctypedef npy_clongdouble clongdouble_t * */ typedef npy_cdouble __pyx_t_5numpy_cdouble_t; /* "numpy.pxd":768 * 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; /* "numpy.pxd":770 * 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/hashtable.pyx":82 * * * cdef class Int64Vector: # <<<<<<<<<<<<<< * * cdef: */ struct __pyx_obj_6pandas_9hashtable_Int64Vector { PyObject_HEAD struct __pyx_vtabstruct_6pandas_9hashtable_Int64Vector *__pyx_vtab; size_t n; size_t m; PyArrayObject *ao; __pyx_t_5numpy_int64_t *data; }; /* "pandas/hashtable.pxd":5 * # prototypes for sharing * * cdef class HashTable: # <<<<<<<<<<<<<< * pass * */ struct __pyx_obj_6pandas_9hashtable_HashTable { PyObject_HEAD }; /* "pandas/hashtable.pxd":15 * * * cdef class Float64HashTable(HashTable): # <<<<<<<<<<<<<< * cdef kh_float64_t *table * */ struct __pyx_obj_6pandas_9hashtable_Float64HashTable { struct __pyx_obj_6pandas_9hashtable_HashTable __pyx_base; kh_float64_t *table; }; /* "pandas/hashtable.pyx":264 * return reverse, labels * * cdef class Int32HashTable(HashTable): # <<<<<<<<<<<<<< * cdef kh_int32_t *table * */ struct __pyx_obj_6pandas_9hashtable_Int32HashTable { struct __pyx_obj_6pandas_9hashtable_HashTable __pyx_base; struct __pyx_vtabstruct_6pandas_9hashtable_Int32HashTable *__pyx_vtab; kh_int32_t *table; }; /* "pandas/hashtable.pyx":145 * * * cdef class StringHashTable(HashTable): # <<<<<<<<<<<<<< * cdef kh_str_t *table * */ struct __pyx_obj_6pandas_9hashtable_StringHashTable { struct __pyx_obj_6pandas_9hashtable_HashTable __pyx_base; struct __pyx_vtabstruct_6pandas_9hashtable_StringHashTable *__pyx_vtab; kh_str_t *table; }; /* "pandas/hashtable.pyx":51 * cdef size_t _INIT_VEC_CAP = 32 * * cdef class ObjectVector: # <<<<<<<<<<<<<< * * cdef: */ struct __pyx_obj_6pandas_9hashtable_ObjectVector { PyObject_HEAD struct __pyx_vtabstruct_6pandas_9hashtable_ObjectVector *__pyx_vtab; size_t n; size_t m; PyArrayObject *ao; PyObject **data; }; /* "pandas/hashtable.pxd":21 * # cpdef set_item(self, float64_t key, Py_ssize_t val) * * cdef class PyObjectHashTable(HashTable): # <<<<<<<<<<<<<< * cdef kh_pymap_t *table * */ struct __pyx_obj_6pandas_9hashtable_PyObjectHashTable { struct __pyx_obj_6pandas_9hashtable_HashTable __pyx_base; struct __pyx_vtabstruct_6pandas_9hashtable_PyObjectHashTable *__pyx_vtab; kh_pymap_t *table; }; /* "pandas/hashtable.pxd":8 * pass * * cdef class Int64HashTable(HashTable): # <<<<<<<<<<<<<< * cdef kh_int64_t *table * */ struct __pyx_obj_6pandas_9hashtable_Int64HashTable { struct __pyx_obj_6pandas_9hashtable_HashTable __pyx_base; struct __pyx_vtabstruct_6pandas_9hashtable_Int64HashTable *__pyx_vtab; kh_int64_t *table; }; /* "pandas/hashtable.pyx":860 * * * cdef class Int64Factorizer: # <<<<<<<<<<<<<< * cdef public Int64HashTable table * cdef public Int64Vector uniques */ struct __pyx_obj_6pandas_9hashtable_Int64Factorizer { PyObject_HEAD struct __pyx_obj_6pandas_9hashtable_Int64HashTable *table; struct __pyx_obj_6pandas_9hashtable_Int64Vector *uniques; Py_ssize_t count; }; /* "pandas/hashtable.pyx":824 * * * cdef class Factorizer: # <<<<<<<<<<<<<< * cdef public PyObjectHashTable table * cdef public ObjectVector uniques */ struct __pyx_obj_6pandas_9hashtable_Factorizer { PyObject_HEAD struct __pyx_obj_6pandas_9hashtable_PyObjectHashTable *table; struct __pyx_obj_6pandas_9hashtable_ObjectVector *uniques; Py_ssize_t count; }; /* "pandas/hashtable.pyx":111 * self.n += 1 * * cdef class Float64Vector: # <<<<<<<<<<<<<< * * cdef: */ struct __pyx_obj_6pandas_9hashtable_Float64Vector { PyObject_HEAD struct __pyx_vtabstruct_6pandas_9hashtable_Float64Vector *__pyx_vtab; size_t n; size_t m; PyArrayObject *ao; __pyx_t_5numpy_float64_t *data; }; /* "pandas/hashtable.pyx":82 * * * cdef class Int64Vector: # <<<<<<<<<<<<<< * * cdef: */ struct __pyx_vtabstruct_6pandas_9hashtable_Int64Vector { PyObject *(*append)(struct __pyx_obj_6pandas_9hashtable_Int64Vector *, __pyx_t_5numpy_int64_t); }; static struct __pyx_vtabstruct_6pandas_9hashtable_Int64Vector *__pyx_vtabptr_6pandas_9hashtable_Int64Vector; static CYTHON_INLINE PyObject *__pyx_f_6pandas_9hashtable_11Int64Vector_append(struct __pyx_obj_6pandas_9hashtable_Int64Vector *, __pyx_t_5numpy_int64_t); /* "pandas/hashtable.pyx":145 * * * cdef class StringHashTable(HashTable): # <<<<<<<<<<<<<< * cdef kh_str_t *table * */ struct __pyx_vtabstruct_6pandas_9hashtable_StringHashTable { int (*check_type)(struct __pyx_obj_6pandas_9hashtable_StringHashTable *, PyObject *); PyObject *(*get_item)(struct __pyx_obj_6pandas_9hashtable_StringHashTable *, PyObject *, int __pyx_skip_dispatch); PyObject *(*set_item)(struct __pyx_obj_6pandas_9hashtable_StringHashTable *, PyObject *, Py_ssize_t, int __pyx_skip_dispatch); }; static struct __pyx_vtabstruct_6pandas_9hashtable_StringHashTable *__pyx_vtabptr_6pandas_9hashtable_StringHashTable; static CYTHON_INLINE int __pyx_f_6pandas_9hashtable_15StringHashTable_check_type(struct __pyx_obj_6pandas_9hashtable_StringHashTable *, PyObject *); /* "pandas/hashtable.pyx":111 * self.n += 1 * * cdef class Float64Vector: # <<<<<<<<<<<<<< * * cdef: */ struct __pyx_vtabstruct_6pandas_9hashtable_Float64Vector { PyObject *(*append)(struct __pyx_obj_6pandas_9hashtable_Float64Vector *, __pyx_t_5numpy_float64_t); }; static struct __pyx_vtabstruct_6pandas_9hashtable_Float64Vector *__pyx_vtabptr_6pandas_9hashtable_Float64Vector; static CYTHON_INLINE PyObject *__pyx_f_6pandas_9hashtable_13Float64Vector_append(struct __pyx_obj_6pandas_9hashtable_Float64Vector *, __pyx_t_5numpy_float64_t); /* "pandas/hashtable.pyx":648 * na_sentinel = object * * cdef class PyObjectHashTable(HashTable): # <<<<<<<<<<<<<< * # cdef kh_pymap_t *table * */ struct __pyx_vtabstruct_6pandas_9hashtable_PyObjectHashTable { PyObject *(*get_item)(struct __pyx_obj_6pandas_9hashtable_PyObjectHashTable *, PyObject *, int __pyx_skip_dispatch); PyObject *(*set_item)(struct __pyx_obj_6pandas_9hashtable_PyObjectHashTable *, PyObject *, Py_ssize_t, int __pyx_skip_dispatch); }; static struct __pyx_vtabstruct_6pandas_9hashtable_PyObjectHashTable *__pyx_vtabptr_6pandas_9hashtable_PyObjectHashTable; /* "pandas/hashtable.pyx":264 * return reverse, labels * * cdef class Int32HashTable(HashTable): # <<<<<<<<<<<<<< * cdef kh_int32_t *table * */ struct __pyx_vtabstruct_6pandas_9hashtable_Int32HashTable { int (*check_type)(struct __pyx_obj_6pandas_9hashtable_Int32HashTable *, PyObject *); PyObject *(*get_item)(struct __pyx_obj_6pandas_9hashtable_Int32HashTable *, __pyx_t_5numpy_int32_t, int __pyx_skip_dispatch); PyObject *(*set_item)(struct __pyx_obj_6pandas_9hashtable_Int32HashTable *, __pyx_t_5numpy_int32_t, Py_ssize_t, int __pyx_skip_dispatch); }; static struct __pyx_vtabstruct_6pandas_9hashtable_Int32HashTable *__pyx_vtabptr_6pandas_9hashtable_Int32HashTable; static CYTHON_INLINE int __pyx_f_6pandas_9hashtable_14Int32HashTable_check_type(struct __pyx_obj_6pandas_9hashtable_Int32HashTable *, PyObject *); /* "pandas/hashtable.pyx":363 * return reverse, labels * * cdef class Int64HashTable: #(HashTable): # <<<<<<<<<<<<<< * # cdef kh_int64_t *table * */ struct __pyx_vtabstruct_6pandas_9hashtable_Int64HashTable { PyObject *(*get_item)(struct __pyx_obj_6pandas_9hashtable_Int64HashTable *, __pyx_t_5numpy_int64_t, int __pyx_skip_dispatch); PyObject *(*set_item)(struct __pyx_obj_6pandas_9hashtable_Int64HashTable *, __pyx_t_5numpy_int64_t, Py_ssize_t, int __pyx_skip_dispatch); }; static struct __pyx_vtabstruct_6pandas_9hashtable_Int64HashTable *__pyx_vtabptr_6pandas_9hashtable_Int64HashTable; /* "pandas/hashtable.pyx":51 * cdef size_t _INIT_VEC_CAP = 32 * * cdef class ObjectVector: # <<<<<<<<<<<<<< * * cdef: */ struct __pyx_vtabstruct_6pandas_9hashtable_ObjectVector { PyObject *(*append)(struct __pyx_obj_6pandas_9hashtable_ObjectVector *, PyObject *); }; static struct __pyx_vtabstruct_6pandas_9hashtable_ObjectVector *__pyx_vtabptr_6pandas_9hashtable_ObjectVector; static CYTHON_INLINE PyObject *__pyx_f_6pandas_9hashtable_12ObjectVector_append(struct __pyx_obj_6pandas_9hashtable_ObjectVector *, PyObject *); #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); /*proto*/ #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 /* CYTHON_REFNANNY */ #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) #if CYTHON_COMPILING_IN_CPYTHON static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name) { PyTypeObject* tp = Py_TYPE(obj); if (likely(tp->tp_getattro)) return tp->tp_getattro(obj, attr_name); #if PY_MAJOR_VERSION < 3 if (likely(tp->tp_getattr)) return tp->tp_getattr(obj, PyString_AS_STRING(attr_name)); #endif return PyObject_GetAttr(obj, attr_name); } #else #define __Pyx_PyObject_GetAttrStr(o,n) PyObject_GetAttr(o,n) #endif static PyObject *__Pyx_GetBuiltinName(PyObject *name); /*proto*/ static CYTHON_INLINE int __Pyx_ArgTypeTest(PyObject *obj, PyTypeObject *type, int none_allowed, const char *name, int exact); /*proto*/ static CYTHON_INLINE PyObject *__Pyx_GetModuleGlobalName(PyObject *name); /*proto*/ static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type); /*proto*/ static CYTHON_INLINE int __Pyx_GetBufferAndValidate(Py_buffer* buf, PyObject* obj, __Pyx_TypeInfo* dtype, int flags, int nd, int cast, __Pyx_BufFmt_StackElem* stack); static CYTHON_INLINE void __Pyx_SafeReleaseBuffer(Py_buffer* info); static void __Pyx_RaiseBufferFallbackError(void); /*proto*/ #define __Pyx_GetItemInt(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck) \ (__Pyx_fits_Py_ssize_t(i, type, is_signed) ? \ __Pyx_GetItemInt_Fast(o, (Py_ssize_t)i, is_list, wraparound, boundscheck) : \ (is_list ? (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL) : \ __Pyx_GetItemInt_Generic(o, to_py_func(i)))) #define __Pyx_GetItemInt_List(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck) \ (__Pyx_fits_Py_ssize_t(i, type, is_signed) ? \ __Pyx_GetItemInt_List_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) : \ (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL)) static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i, int wraparound, int boundscheck); #define __Pyx_GetItemInt_Tuple(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck) \ (__Pyx_fits_Py_ssize_t(i, type, is_signed) ? \ __Pyx_GetItemInt_Tuple_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) : \ (PyErr_SetString(PyExc_IndexError, "tuple index out of range"), (PyObject*)NULL)) static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i, int wraparound, int boundscheck); static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j); static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, int is_list, int wraparound, int boundscheck); static void __Pyx_RaiseBufferIndexError(int axis); /*proto*/ #define __Pyx_BufPtrStrided1d(type, buf, i0, s0) (type)((char*)buf + i0 * s0) static CYTHON_INLINE void __Pyx_ErrRestore(PyObject *type, PyObject *value, PyObject *tb); /*proto*/ static CYTHON_INLINE void __Pyx_ErrFetch(PyObject **type, PyObject **value, PyObject **tb); /*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); /*proto*/ static CYTHON_INLINE int __Pyx_CheckKeywordStrings(PyObject *kwdict, const char* function_name, int kw_allowed); /*proto*/ static void __Pyx_RaiseDoubleKeywordsError(const char* func_name, PyObject* kw_name); /*proto*/ static int __Pyx_ParseOptionalKeywords(PyObject *kwds, PyObject **argnames[], \ PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args, \ const char* function_name); /*proto*/ static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause); /*proto*/ static void __Pyx_WriteUnraisable(const char *name, int clineno, int lineno, const char *filename, int full_traceback); /*proto*/ #define __Pyx_SetItemInt(o, i, v, type, is_signed, to_py_func, is_list, wraparound, boundscheck) \ (__Pyx_fits_Py_ssize_t(i, type, is_signed) ? \ __Pyx_SetItemInt_Fast(o, (Py_ssize_t)i, v, is_list, wraparound, boundscheck) : \ (is_list ? (PyErr_SetString(PyExc_IndexError, "list assignment index out of range"), -1) : \ __Pyx_SetItemInt_Generic(o, to_py_func(i), v))) static CYTHON_INLINE int __Pyx_SetItemInt_Generic(PyObject *o, PyObject *j, PyObject *v); static CYTHON_INLINE int __Pyx_SetItemInt_Fast(PyObject *o, Py_ssize_t i, PyObject *v, int is_list, int wraparound, int boundscheck); static CYTHON_INLINE Py_ssize_t __Pyx_div_Py_ssize_t(Py_ssize_t, Py_ssize_t); /* proto */ static CYTHON_INLINE PyObject* __Pyx_PyObject_GetSlice( PyObject* obj, Py_ssize_t cstart, Py_ssize_t cstop, PyObject** py_start, PyObject** py_stop, PyObject** py_slice, int has_cstart, int has_cstop, int wraparound); static CYTHON_INLINE void __Pyx_ExceptionSave(PyObject **type, PyObject **value, PyObject **tb); /*proto*/ static void __Pyx_ExceptionReset(PyObject *type, PyObject *value, PyObject *tb); /*proto*/ static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb); /*proto*/ static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected); static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index); static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void); static int __Pyx_SetVtable(PyObject *dict, void *vtable); /*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 static Py_ssize_t __Pyx_zeros[] = {0, 0, 0, 0, 0, 0, 0, 0}; static Py_ssize_t __Pyx_minusones[] = {-1, -1, -1, -1, -1, -1, -1, -1}; static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level); /*proto*/ static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *); static CYTHON_INLINE npy_int32 __Pyx_PyInt_As_npy_int32(PyObject *); static CYTHON_INLINE npy_int64 __Pyx_PyInt_As_npy_int64(PyObject *); static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value); static CYTHON_INLINE npy_uint32 __Pyx_PyInt_As_npy_uint32(PyObject *); static CYTHON_INLINE PyObject* __Pyx_PyInt_From_npy_int32(npy_int32 value); static CYTHON_INLINE PyObject* __Pyx_PyInt_From_npy_int64(npy_int64 value); static CYTHON_INLINE PyObject* __Pyx_PyInt_From_npy_uint32(npy_uint32 value); #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(_WIN32) || defined(__clang__)) && defined(__cplusplus) && CYTHON_CCOMPLEX #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 static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float, float); #if CYTHON_CCOMPLEX #define __Pyx_c_eqf(a, b) ((a)==(b)) #define __Pyx_c_sumf(a, b) ((a)+(b)) #define __Pyx_c_difff(a, b) ((a)-(b)) #define __Pyx_c_prodf(a, b) ((a)*(b)) #define __Pyx_c_quotf(a, b) ((a)/(b)) #define __Pyx_c_negf(a) (-(a)) #ifdef __cplusplus #define __Pyx_c_is_zerof(z) ((z)==(float)0) #define __Pyx_c_conjf(z) (::std::conj(z)) #if 1 #define __Pyx_c_absf(z) (::std::abs(z)) #define __Pyx_c_powf(a, b) (::std::pow(a, b)) #endif #else #define __Pyx_c_is_zerof(z) ((z)==0) #define __Pyx_c_conjf(z) (conjf(z)) #if 1 #define __Pyx_c_absf(z) (cabsf(z)) #define __Pyx_c_powf(a, b) (cpowf(a, b)) #endif #endif #else static CYTHON_INLINE int __Pyx_c_eqf(__pyx_t_float_complex, __pyx_t_float_complex); static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_sumf(__pyx_t_float_complex, __pyx_t_float_complex); static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_difff(__pyx_t_float_complex, __pyx_t_float_complex); static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_prodf(__pyx_t_float_complex, __pyx_t_float_complex); static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_quotf(__pyx_t_float_complex, __pyx_t_float_complex); static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_negf(__pyx_t_float_complex); static CYTHON_INLINE int __Pyx_c_is_zerof(__pyx_t_float_complex); static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_conjf(__pyx_t_float_complex); #if 1 static CYTHON_INLINE float __Pyx_c_absf(__pyx_t_float_complex); static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_powf(__pyx_t_float_complex, __pyx_t_float_complex); #endif #endif static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double, double); #if CYTHON_CCOMPLEX #define __Pyx_c_eq(a, b) ((a)==(b)) #define __Pyx_c_sum(a, b) ((a)+(b)) #define __Pyx_c_diff(a, b) ((a)-(b)) #define __Pyx_c_prod(a, b) ((a)*(b)) #define __Pyx_c_quot(a, b) ((a)/(b)) #define __Pyx_c_neg(a) (-(a)) #ifdef __cplusplus #define __Pyx_c_is_zero(z) ((z)==(double)0) #define __Pyx_c_conj(z) (::std::conj(z)) #if 1 #define __Pyx_c_abs(z) (::std::abs(z)) #define __Pyx_c_pow(a, b) (::std::pow(a, b)) #endif #else #define __Pyx_c_is_zero(z) ((z)==0) #define __Pyx_c_conj(z) (conj(z)) #if 1 #define __Pyx_c_abs(z) (cabs(z)) #define __Pyx_c_pow(a, b) (cpow(a, b)) #endif #endif #else static CYTHON_INLINE int __Pyx_c_eq(__pyx_t_double_complex, __pyx_t_double_complex); static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_sum(__pyx_t_double_complex, __pyx_t_double_complex); static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_diff(__pyx_t_double_complex, __pyx_t_double_complex); static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_prod(__pyx_t_double_complex, __pyx_t_double_complex); static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_quot(__pyx_t_double_complex, __pyx_t_double_complex); static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_neg(__pyx_t_double_complex); static CYTHON_INLINE int __Pyx_c_is_zero(__pyx_t_double_complex); static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_conj(__pyx_t_double_complex); #if 1 static CYTHON_INLINE double __Pyx_c_abs(__pyx_t_double_complex); static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_pow(__pyx_t_double_complex, __pyx_t_double_complex); #endif #endif static CYTHON_INLINE PyObject* __Pyx_PyInt_From_ptrdiff_t(ptrdiff_t value); static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value); static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *); static int __Pyx_check_binary_version(void); #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 static PyObject *__Pyx_ImportModule(const char *name); /*proto*/ static PyTypeObject *__Pyx_ImportType(const char *module_name, const char *class_name, size_t size, int strict); /*proto*/ typedef struct { int code_line; PyCodeObject* code_object; } __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); static void __Pyx_AddTraceback(const char *funcname, int c_line, int py_line, const char *filename); /*proto*/ static int __Pyx_InitStrings(__Pyx_StringTabEntry *t); /*proto*/ /* Module declarations from 'cpython.version' */ /* Module declarations from 'cpython.ref' */ /* Module declarations from 'cpython.exc' */ /* Module declarations from 'cpython.module' */ /* Module declarations from 'cpython.mem' */ /* Module declarations from 'cpython.tuple' */ /* Module declarations from 'cpython.list' */ /* Module declarations from 'libc.string' */ /* Module declarations from 'libc.stdio' */ /* Module declarations from 'cpython.object' */ /* Module declarations from 'cpython.sequence' */ /* Module declarations from 'cpython.mapping' */ /* Module declarations from 'cpython.iterator' */ /* Module declarations from '__builtin__' */ /* Module declarations from 'cpython.type' */ static PyTypeObject *__pyx_ptype_7cpython_4type_type = 0; /* Module declarations from 'cpython.number' */ /* Module declarations from 'cpython.int' */ /* Module declarations from '__builtin__' */ /* Module declarations from 'cpython.bool' */ static PyTypeObject *__pyx_ptype_7cpython_4bool_bool = 0; /* Module declarations from 'cpython.long' */ /* Module declarations from 'cpython.float' */ /* Module declarations from '__builtin__' */ /* Module declarations from 'cpython.complex' */ static PyTypeObject *__pyx_ptype_7cpython_7complex_complex = 0; /* Module declarations from 'cpython.string' */ /* Module declarations from 'cpython.unicode' */ /* Module declarations from 'cpython.dict' */ /* Module declarations from 'cpython.instance' */ /* Module declarations from 'cpython.function' */ /* Module declarations from 'cpython.method' */ /* Module declarations from 'cpython.weakref' */ /* Module declarations from 'cpython.getargs' */ /* Module declarations from 'cpython.pythread' */ /* Module declarations from 'cpython.pystate' */ /* Module declarations from 'cpython.cobject' */ /* Module declarations from 'cpython.oldbuffer' */ /* Module declarations from 'cpython.set' */ /* Module declarations from 'cpython.buffer' */ /* Module declarations from 'cpython.bytes' */ /* Module declarations from 'cpython.pycapsule' */ /* Module declarations from 'cpython' */ /* Module declarations from 'libc.stdlib' */ /* 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*/ /* Module declarations from 'khash' */ /* Module declarations from 'util' */ static CYTHON_INLINE int __pyx_f_4util__checknan(PyObject *); /*proto*/ /* Module declarations from 'cython' */ /* Module declarations from 'pandas.hashtable' */ static PyTypeObject *__pyx_ptype_6pandas_9hashtable_Int64Vector = 0; static PyTypeObject *__pyx_ptype_6pandas_9hashtable_HashTable = 0; static PyTypeObject *__pyx_ptype_6pandas_9hashtable_Float64HashTable = 0; static PyTypeObject *__pyx_ptype_6pandas_9hashtable_Int32HashTable = 0; static PyTypeObject *__pyx_ptype_6pandas_9hashtable_StringHashTable = 0; static PyTypeObject *__pyx_ptype_6pandas_9hashtable_ObjectVector = 0; static PyTypeObject *__pyx_ptype_6pandas_9hashtable_PyObjectHashTable = 0; static PyTypeObject *__pyx_ptype_6pandas_9hashtable_Int64HashTable = 0; static PyTypeObject *__pyx_ptype_6pandas_9hashtable_Int64Factorizer = 0; static PyTypeObject *__pyx_ptype_6pandas_9hashtable_Factorizer = 0; static PyTypeObject *__pyx_ptype_6pandas_9hashtable_Float64Vector = 0; static __pyx_t_5numpy_int64_t __pyx_v_6pandas_9hashtable_iNaT; static size_t __pyx_v_6pandas_9hashtable__INIT_VEC_CAP; static PyObject *__pyx_f_6pandas_9hashtable_build_count_table_int64(PyArrayObject *, kh_int64_t *); /*proto*/ static PyObject *__pyx_f_6pandas_9hashtable_value_count_int64(PyArrayObject *, int __pyx_skip_dispatch); /*proto*/ static PyObject *__pyx_f_6pandas_9hashtable_build_count_table_object(PyArrayObject *, PyArrayObject *, kh_pymap_t *); /*proto*/ static PyObject *__pyx_f_6pandas_9hashtable_value_count_object(PyArrayObject *, PyArrayObject *, int __pyx_skip_dispatch); /*proto*/ 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_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_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_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_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 }; #define __Pyx_MODULE_NAME "pandas.hashtable" int __pyx_module_is_main_pandas__hashtable = 0; /* Implementation of 'pandas.hashtable' */ static PyObject *__pyx_builtin_object; static PyObject *__pyx_builtin_KeyError; static PyObject *__pyx_builtin_range; static PyObject *__pyx_builtin_IndexError; static PyObject *__pyx_builtin_ValueError; static PyObject *__pyx_builtin_RuntimeError; static PyObject *__pyx_pf_6pandas_9hashtable_list_to_object_array(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */ static int __pyx_pf_6pandas_9hashtable_12ObjectVector___cinit__(struct __pyx_obj_6pandas_9hashtable_ObjectVector *__pyx_v_self); /* proto */ static Py_ssize_t __pyx_pf_6pandas_9hashtable_12ObjectVector_2__len__(struct __pyx_obj_6pandas_9hashtable_ObjectVector *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_9hashtable_12ObjectVector_4to_array(struct __pyx_obj_6pandas_9hashtable_ObjectVector *__pyx_v_self); /* proto */ static int __pyx_pf_6pandas_9hashtable_11Int64Vector___cinit__(struct __pyx_obj_6pandas_9hashtable_Int64Vector *__pyx_v_self); /* proto */ static Py_ssize_t __pyx_pf_6pandas_9hashtable_11Int64Vector_2__len__(struct __pyx_obj_6pandas_9hashtable_Int64Vector *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_9hashtable_11Int64Vector_4to_array(struct __pyx_obj_6pandas_9hashtable_Int64Vector *__pyx_v_self); /* proto */ static int __pyx_pf_6pandas_9hashtable_13Float64Vector___cinit__(struct __pyx_obj_6pandas_9hashtable_Float64Vector *__pyx_v_self); /* proto */ static Py_ssize_t __pyx_pf_6pandas_9hashtable_13Float64Vector_2__len__(struct __pyx_obj_6pandas_9hashtable_Float64Vector *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_9hashtable_13Float64Vector_4to_array(struct __pyx_obj_6pandas_9hashtable_Float64Vector *__pyx_v_self); /* proto */ static int __pyx_pf_6pandas_9hashtable_15StringHashTable___cinit__(struct __pyx_obj_6pandas_9hashtable_StringHashTable *__pyx_v_self, int __pyx_v_size_hint); /* proto */ static void __pyx_pf_6pandas_9hashtable_15StringHashTable_2__dealloc__(struct __pyx_obj_6pandas_9hashtable_StringHashTable *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_9hashtable_15StringHashTable_4get_item(struct __pyx_obj_6pandas_9hashtable_StringHashTable *__pyx_v_self, PyObject *__pyx_v_val); /* proto */ static PyObject *__pyx_pf_6pandas_9hashtable_15StringHashTable_6get_iter_test(struct __pyx_obj_6pandas_9hashtable_StringHashTable *__pyx_v_self, PyObject *__pyx_v_key, Py_ssize_t __pyx_v_iterations); /* proto */ static PyObject *__pyx_pf_6pandas_9hashtable_15StringHashTable_8set_item(struct __pyx_obj_6pandas_9hashtable_StringHashTable *__pyx_v_self, PyObject *__pyx_v_key, Py_ssize_t __pyx_v_val); /* proto */ static PyObject *__pyx_pf_6pandas_9hashtable_15StringHashTable_10get_indexer(struct __pyx_obj_6pandas_9hashtable_StringHashTable *__pyx_v_self, PyArrayObject *__pyx_v_values); /* proto */ static PyObject *__pyx_pf_6pandas_9hashtable_15StringHashTable_12unique(struct __pyx_obj_6pandas_9hashtable_StringHashTable *__pyx_v_self, PyArrayObject *__pyx_v_values); /* proto */ static PyObject *__pyx_pf_6pandas_9hashtable_15StringHashTable_14factorize(struct __pyx_obj_6pandas_9hashtable_StringHashTable *__pyx_v_self, PyArrayObject *__pyx_v_values); /* proto */ static int __pyx_pf_6pandas_9hashtable_14Int32HashTable___init__(struct __pyx_obj_6pandas_9hashtable_Int32HashTable *__pyx_v_self, PyObject *__pyx_v_size_hint); /* proto */ static int __pyx_pf_6pandas_9hashtable_14Int32HashTable_2__cinit__(struct __pyx_obj_6pandas_9hashtable_Int32HashTable *__pyx_v_self); /* proto */ static void __pyx_pf_6pandas_9hashtable_14Int32HashTable_4__dealloc__(struct __pyx_obj_6pandas_9hashtable_Int32HashTable *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_9hashtable_14Int32HashTable_6get_item(struct __pyx_obj_6pandas_9hashtable_Int32HashTable *__pyx_v_self, __pyx_t_5numpy_int32_t __pyx_v_val); /* proto */ static PyObject *__pyx_pf_6pandas_9hashtable_14Int32HashTable_8get_iter_test(struct __pyx_obj_6pandas_9hashtable_Int32HashTable *__pyx_v_self, CYTHON_UNUSED __pyx_t_5numpy_int32_t __pyx_v_key, Py_ssize_t __pyx_v_iterations); /* proto */ static PyObject *__pyx_pf_6pandas_9hashtable_14Int32HashTable_10set_item(struct __pyx_obj_6pandas_9hashtable_Int32HashTable *__pyx_v_self, __pyx_t_5numpy_int32_t __pyx_v_key, Py_ssize_t __pyx_v_val); /* proto */ static PyObject *__pyx_pf_6pandas_9hashtable_14Int32HashTable_12map_locations(struct __pyx_obj_6pandas_9hashtable_Int32HashTable *__pyx_v_self, PyArrayObject *__pyx_v_values); /* proto */ static PyObject *__pyx_pf_6pandas_9hashtable_14Int32HashTable_14lookup(struct __pyx_obj_6pandas_9hashtable_Int32HashTable *__pyx_v_self, PyArrayObject *__pyx_v_values); /* proto */ static PyObject *__pyx_pf_6pandas_9hashtable_14Int32HashTable_16factorize(struct __pyx_obj_6pandas_9hashtable_Int32HashTable *__pyx_v_self, PyArrayObject *__pyx_v_values); /* proto */ static int __pyx_pf_6pandas_9hashtable_14Int64HashTable___cinit__(struct __pyx_obj_6pandas_9hashtable_Int64HashTable *__pyx_v_self, PyObject *__pyx_v_size_hint); /* proto */ static void __pyx_pf_6pandas_9hashtable_14Int64HashTable_2__dealloc__(struct __pyx_obj_6pandas_9hashtable_Int64HashTable *__pyx_v_self); /* proto */ static int __pyx_pf_6pandas_9hashtable_14Int64HashTable_4__contains__(struct __pyx_obj_6pandas_9hashtable_Int64HashTable *__pyx_v_self, PyObject *__pyx_v_key); /* proto */ static Py_ssize_t __pyx_pf_6pandas_9hashtable_14Int64HashTable_6__len__(struct __pyx_obj_6pandas_9hashtable_Int64HashTable *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_9hashtable_14Int64HashTable_8get_item(struct __pyx_obj_6pandas_9hashtable_Int64HashTable *__pyx_v_self, __pyx_t_5numpy_int64_t __pyx_v_val); /* proto */ static PyObject *__pyx_pf_6pandas_9hashtable_14Int64HashTable_10get_iter_test(struct __pyx_obj_6pandas_9hashtable_Int64HashTable *__pyx_v_self, CYTHON_UNUSED __pyx_t_5numpy_int64_t __pyx_v_key, Py_ssize_t __pyx_v_iterations); /* proto */ static PyObject *__pyx_pf_6pandas_9hashtable_14Int64HashTable_12set_item(struct __pyx_obj_6pandas_9hashtable_Int64HashTable *__pyx_v_self, __pyx_t_5numpy_int64_t __pyx_v_key, Py_ssize_t __pyx_v_val); /* proto */ static PyObject *__pyx_pf_6pandas_9hashtable_14Int64HashTable_14map(struct __pyx_obj_6pandas_9hashtable_Int64HashTable *__pyx_v_self, PyArrayObject *__pyx_v_keys, PyArrayObject *__pyx_v_values); /* proto */ static PyObject *__pyx_pf_6pandas_9hashtable_14Int64HashTable_16map_locations(struct __pyx_obj_6pandas_9hashtable_Int64HashTable *__pyx_v_self, PyArrayObject *__pyx_v_values); /* proto */ static PyObject *__pyx_pf_6pandas_9hashtable_14Int64HashTable_18lookup(struct __pyx_obj_6pandas_9hashtable_Int64HashTable *__pyx_v_self, PyArrayObject *__pyx_v_values); /* proto */ static PyObject *__pyx_pf_6pandas_9hashtable_14Int64HashTable_20factorize(struct __pyx_obj_6pandas_9hashtable_Int64HashTable *__pyx_v_self, PyArrayObject *__pyx_v_values); /* proto */ static PyObject *__pyx_pf_6pandas_9hashtable_14Int64HashTable_22get_labels(struct __pyx_obj_6pandas_9hashtable_Int64HashTable *__pyx_v_self, PyArrayObject *__pyx_v_values, struct __pyx_obj_6pandas_9hashtable_Int64Vector *__pyx_v_uniques, Py_ssize_t __pyx_v_count_prior, CYTHON_UNUSED Py_ssize_t __pyx_v_na_sentinel); /* proto */ static PyObject *__pyx_pf_6pandas_9hashtable_14Int64HashTable_24get_labels_groupby(struct __pyx_obj_6pandas_9hashtable_Int64HashTable *__pyx_v_self, PyArrayObject *__pyx_v_values); /* proto */ static PyObject *__pyx_pf_6pandas_9hashtable_14Int64HashTable_26unique(struct __pyx_obj_6pandas_9hashtable_Int64HashTable *__pyx_v_self, PyArrayObject *__pyx_v_values); /* proto */ static int __pyx_pf_6pandas_9hashtable_16Float64HashTable___cinit__(struct __pyx_obj_6pandas_9hashtable_Float64HashTable *__pyx_v_self, PyObject *__pyx_v_size_hint); /* proto */ static Py_ssize_t __pyx_pf_6pandas_9hashtable_16Float64HashTable_2__len__(struct __pyx_obj_6pandas_9hashtable_Float64HashTable *__pyx_v_self); /* proto */ static void __pyx_pf_6pandas_9hashtable_16Float64HashTable_4__dealloc__(struct __pyx_obj_6pandas_9hashtable_Float64HashTable *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_9hashtable_16Float64HashTable_6factorize(struct __pyx_obj_6pandas_9hashtable_Float64HashTable *__pyx_v_self, PyArrayObject *__pyx_v_values); /* proto */ static PyObject *__pyx_pf_6pandas_9hashtable_16Float64HashTable_8get_labels(struct __pyx_obj_6pandas_9hashtable_Float64HashTable *__pyx_v_self, PyArrayObject *__pyx_v_values, struct __pyx_obj_6pandas_9hashtable_Float64Vector *__pyx_v_uniques, Py_ssize_t __pyx_v_count_prior, __pyx_t_5numpy_int64_t __pyx_v_na_sentinel); /* proto */ static PyObject *__pyx_pf_6pandas_9hashtable_16Float64HashTable_10map_locations(struct __pyx_obj_6pandas_9hashtable_Float64HashTable *__pyx_v_self, PyArrayObject *__pyx_v_values); /* proto */ static PyObject *__pyx_pf_6pandas_9hashtable_16Float64HashTable_12lookup(struct __pyx_obj_6pandas_9hashtable_Float64HashTable *__pyx_v_self, PyArrayObject *__pyx_v_values); /* proto */ static PyObject *__pyx_pf_6pandas_9hashtable_16Float64HashTable_14unique(struct __pyx_obj_6pandas_9hashtable_Float64HashTable *__pyx_v_self, PyArrayObject *__pyx_v_values); /* proto */ static int __pyx_pf_6pandas_9hashtable_17PyObjectHashTable___init__(struct __pyx_obj_6pandas_9hashtable_PyObjectHashTable *__pyx_v_self, PyObject *__pyx_v_size_hint); /* proto */ static void __pyx_pf_6pandas_9hashtable_17PyObjectHashTable_2__dealloc__(struct __pyx_obj_6pandas_9hashtable_PyObjectHashTable *__pyx_v_self); /* proto */ static Py_ssize_t __pyx_pf_6pandas_9hashtable_17PyObjectHashTable_4__len__(struct __pyx_obj_6pandas_9hashtable_PyObjectHashTable *__pyx_v_self); /* proto */ static int __pyx_pf_6pandas_9hashtable_17PyObjectHashTable_6__contains__(struct __pyx_obj_6pandas_9hashtable_PyObjectHashTable *__pyx_v_self, PyObject *__pyx_v_key); /* proto */ static PyObject *__pyx_pf_6pandas_9hashtable_17PyObjectHashTable_8destroy(struct __pyx_obj_6pandas_9hashtable_PyObjectHashTable *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_9hashtable_17PyObjectHashTable_10get_item(struct __pyx_obj_6pandas_9hashtable_PyObjectHashTable *__pyx_v_self, PyObject *__pyx_v_val); /* proto */ static PyObject *__pyx_pf_6pandas_9hashtable_17PyObjectHashTable_12get_iter_test(struct __pyx_obj_6pandas_9hashtable_PyObjectHashTable *__pyx_v_self, PyObject *__pyx_v_key, Py_ssize_t __pyx_v_iterations); /* proto */ static PyObject *__pyx_pf_6pandas_9hashtable_17PyObjectHashTable_14set_item(struct __pyx_obj_6pandas_9hashtable_PyObjectHashTable *__pyx_v_self, PyObject *__pyx_v_key, Py_ssize_t __pyx_v_val); /* proto */ static PyObject *__pyx_pf_6pandas_9hashtable_17PyObjectHashTable_16map_locations(struct __pyx_obj_6pandas_9hashtable_PyObjectHashTable *__pyx_v_self, PyArrayObject *__pyx_v_values); /* proto */ static PyObject *__pyx_pf_6pandas_9hashtable_17PyObjectHashTable_18lookup(struct __pyx_obj_6pandas_9hashtable_PyObjectHashTable *__pyx_v_self, PyArrayObject *__pyx_v_values); /* proto */ static PyObject *__pyx_pf_6pandas_9hashtable_17PyObjectHashTable_20lookup2(CYTHON_UNUSED struct __pyx_obj_6pandas_9hashtable_PyObjectHashTable *__pyx_v_self, PyArrayObject *__pyx_v_values); /* proto */ static PyObject *__pyx_pf_6pandas_9hashtable_17PyObjectHashTable_22unique(struct __pyx_obj_6pandas_9hashtable_PyObjectHashTable *__pyx_v_self, PyArrayObject *__pyx_v_values); /* proto */ static PyObject *__pyx_pf_6pandas_9hashtable_17PyObjectHashTable_24get_labels(struct __pyx_obj_6pandas_9hashtable_PyObjectHashTable *__pyx_v_self, PyArrayObject *__pyx_v_values, struct __pyx_obj_6pandas_9hashtable_ObjectVector *__pyx_v_uniques, Py_ssize_t __pyx_v_count_prior, __pyx_t_5numpy_int64_t __pyx_v_na_sentinel); /* proto */ static int __pyx_pf_6pandas_9hashtable_10Factorizer___init__(struct __pyx_obj_6pandas_9hashtable_Factorizer *__pyx_v_self, PyObject *__pyx_v_size_hint); /* proto */ static PyObject *__pyx_pf_6pandas_9hashtable_10Factorizer_2get_count(struct __pyx_obj_6pandas_9hashtable_Factorizer *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_9hashtable_10Factorizer_4factorize(struct __pyx_obj_6pandas_9hashtable_Factorizer *__pyx_v_self, PyArrayObject *__pyx_v_values, PyObject *__pyx_v_sort, PyObject *__pyx_v_na_sentinel); /* proto */ static PyObject *__pyx_pf_6pandas_9hashtable_10Factorizer_6unique(struct __pyx_obj_6pandas_9hashtable_Factorizer *__pyx_v_self, PyArrayObject *__pyx_v_values); /* proto */ static PyObject *__pyx_pf_6pandas_9hashtable_10Factorizer_5table___get__(struct __pyx_obj_6pandas_9hashtable_Factorizer *__pyx_v_self); /* proto */ static int __pyx_pf_6pandas_9hashtable_10Factorizer_5table_2__set__(struct __pyx_obj_6pandas_9hashtable_Factorizer *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ static int __pyx_pf_6pandas_9hashtable_10Factorizer_5table_4__del__(struct __pyx_obj_6pandas_9hashtable_Factorizer *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_9hashtable_10Factorizer_7uniques___get__(struct __pyx_obj_6pandas_9hashtable_Factorizer *__pyx_v_self); /* proto */ static int __pyx_pf_6pandas_9hashtable_10Factorizer_7uniques_2__set__(struct __pyx_obj_6pandas_9hashtable_Factorizer *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ static int __pyx_pf_6pandas_9hashtable_10Factorizer_7uniques_4__del__(struct __pyx_obj_6pandas_9hashtable_Factorizer *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_9hashtable_10Factorizer_5count___get__(struct __pyx_obj_6pandas_9hashtable_Factorizer *__pyx_v_self); /* proto */ static int __pyx_pf_6pandas_9hashtable_10Factorizer_5count_2__set__(struct __pyx_obj_6pandas_9hashtable_Factorizer *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ static int __pyx_pf_6pandas_9hashtable_15Int64Factorizer___init__(struct __pyx_obj_6pandas_9hashtable_Int64Factorizer *__pyx_v_self, PyObject *__pyx_v_size_hint); /* proto */ static PyObject *__pyx_pf_6pandas_9hashtable_15Int64Factorizer_2get_count(struct __pyx_obj_6pandas_9hashtable_Int64Factorizer *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_9hashtable_15Int64Factorizer_4factorize(struct __pyx_obj_6pandas_9hashtable_Int64Factorizer *__pyx_v_self, PyArrayObject *__pyx_v_values, PyObject *__pyx_v_sort, PyObject *__pyx_v_na_sentinel); /* proto */ static PyObject *__pyx_pf_6pandas_9hashtable_15Int64Factorizer_5table___get__(struct __pyx_obj_6pandas_9hashtable_Int64Factorizer *__pyx_v_self); /* proto */ static int __pyx_pf_6pandas_9hashtable_15Int64Factorizer_5table_2__set__(struct __pyx_obj_6pandas_9hashtable_Int64Factorizer *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ static int __pyx_pf_6pandas_9hashtable_15Int64Factorizer_5table_4__del__(struct __pyx_obj_6pandas_9hashtable_Int64Factorizer *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_9hashtable_15Int64Factorizer_7uniques___get__(struct __pyx_obj_6pandas_9hashtable_Int64Factorizer *__pyx_v_self); /* proto */ static int __pyx_pf_6pandas_9hashtable_15Int64Factorizer_7uniques_2__set__(struct __pyx_obj_6pandas_9hashtable_Int64Factorizer *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ static int __pyx_pf_6pandas_9hashtable_15Int64Factorizer_7uniques_4__del__(struct __pyx_obj_6pandas_9hashtable_Int64Factorizer *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_9hashtable_15Int64Factorizer_5count___get__(struct __pyx_obj_6pandas_9hashtable_Int64Factorizer *__pyx_v_self); /* proto */ static int __pyx_pf_6pandas_9hashtable_15Int64Factorizer_5count_2__set__(struct __pyx_obj_6pandas_9hashtable_Int64Factorizer *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ static PyObject *__pyx_pf_6pandas_9hashtable_2value_count_int64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values); /* proto */ static PyObject *__pyx_pf_6pandas_9hashtable_4value_count_object(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_mask); /* proto */ static PyObject *__pyx_pf_6pandas_9hashtable_6mode_object(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_mask); /* proto */ static PyObject *__pyx_pf_6pandas_9hashtable_8mode_int64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values); /* 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_9hashtable_Int64Vector(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_6pandas_9hashtable_HashTable(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_6pandas_9hashtable_Float64HashTable(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_6pandas_9hashtable_Int32HashTable(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_6pandas_9hashtable_StringHashTable(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_6pandas_9hashtable_ObjectVector(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_6pandas_9hashtable_PyObjectHashTable(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_6pandas_9hashtable_Int64HashTable(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_6pandas_9hashtable_Int64Factorizer(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_6pandas_9hashtable_Factorizer(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_6pandas_9hashtable_Float64Vector(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static char __pyx_k_B[] = "B"; static char __pyx_k_H[] = "H"; static char __pyx_k_I[] = "I"; static char __pyx_k_L[] = "L"; static char __pyx_k_O[] = "O"; static char __pyx_k_Q[] = "Q"; static char __pyx_k_b[] = "b"; static char __pyx_k_d[] = "d"; static char __pyx_k_f[] = "f"; static char __pyx_k_g[] = "g"; static char __pyx_k_h[] = "h"; static char __pyx_k_i[] = "i"; static char __pyx_k_j[] = "j"; static char __pyx_k_k[] = "k"; static char __pyx_k_l[] = "l"; static char __pyx_k_n[] = "n"; static char __pyx_k_q[] = "q"; static char __pyx_k_Zd[] = "Zd"; static char __pyx_k_Zf[] = "Zf"; static char __pyx_k_Zg[] = "Zg"; static char __pyx_k_np[] = "np"; static char __pyx_k_arr[] = "arr"; static char __pyx_k_inf[] = "inf"; static char __pyx_k_int[] = "int_"; static char __pyx_k_key[] = "key"; static char __pyx_k_nan[] = "nan"; static char __pyx_k_obj[] = "obj"; static char __pyx_k_put[] = "put"; static char __pyx_k_ret[] = "ret"; static char __pyx_k_val[] = "val"; static char __pyx_k_ONAN[] = "ONAN"; static char __pyx_k_keys[] = "keys"; static char __pyx_k_main[] = "__main__"; static char __pyx_k_mask[] = "mask"; static char __pyx_k_sort[] = "sort"; static char __pyx_k_take[] = "take"; static char __pyx_k_test[] = "__test__"; static char __pyx_k_count[] = "count"; static char __pyx_k_dtype[] = "dtype"; static char __pyx_k_empty[] = "empty"; static char __pyx_k_int64[] = "int64"; static char __pyx_k_modes[] = "modes"; static char __pyx_k_numpy[] = "numpy"; static char __pyx_k_range[] = "range"; static char __pyx_k_table[] = "table"; static char __pyx_k_zeros[] = "zeros"; static char __pyx_k_arange[] = "arange"; static char __pyx_k_astype[] = "astype"; static char __pyx_k_import[] = "__import__"; static char __pyx_k_object[] = "object"; static char __pyx_k_resize[] = "resize"; static char __pyx_k_unique[] = "unique"; static char __pyx_k_values[] = "values"; static char __pyx_k_argsort[] = "argsort"; static char __pyx_k_destroy[] = "destroy"; static char __pyx_k_float64[] = "float64"; static char __pyx_k_max_val[] = "max_val"; static char __pyx_k_uniques[] = "uniques"; static char __pyx_k_KeyError[] = "KeyError"; static char __pyx_k_get_item[] = "get_item"; static char __pyx_k_object_2[] = "object_"; static char __pyx_k_set_item[] = "set_item"; static char __pyx_k_to_array[] = "to_array"; static char __pyx_k_max_count[] = "max_count"; static char __pyx_k_size_hint[] = "size_hint"; static char __pyx_k_IndexError[] = "IndexError"; static char __pyx_k_ValueError[] = "ValueError"; static char __pyx_k_get_labels[] = "get_labels"; static char __pyx_k_iterations[] = "iterations"; static char __pyx_k_mode_int64[] = "mode_int64"; static char __pyx_k_pyx_vtable[] = "__pyx_vtable__"; static char __pyx_k_count_prior[] = "count_prior"; static char __pyx_k_mode_object[] = "mode_object"; static char __pyx_k_na_sentinel[] = "na_sentinel"; static char __pyx_k_RuntimeError[] = "RuntimeError"; static char __pyx_k_pyx_getbuffer[] = "__pyx_getbuffer"; static char __pyx_k_pandas_hashtable[] = "pandas.hashtable"; static char __pyx_k_pyx_releasebuffer[] = "__pyx_releasebuffer"; static char __pyx_k_index_out_of_bounds[] = "index out of bounds"; static char __pyx_k_list_to_object_array[] = "list_to_object_array"; static char __pyx_k_ndarray_is_not_C_contiguous[] = "ndarray is not C contiguous"; static char __pyx_k_home_yoh_deb_gits_pkg_exppsy_pa[] = "/home/yoh/deb/gits/pkg-exppsy/pandas/pandas/hashtable.pyx"; static char __pyx_k_unknown_dtype_code_in_numpy_pxd[] = "unknown dtype code in numpy.pxd (%d)"; static char __pyx_k_Format_string_allocated_too_shor[] = "Format string allocated too short, see comment in numpy.pxd"; static char __pyx_k_Non_native_byte_order_not_suppor[] = "Non-native byte order not supported"; static char __pyx_k_ndarray_is_not_Fortran_contiguou[] = "ndarray is not Fortran contiguous"; static char __pyx_k_Format_string_allocated_too_shor_2[] = "Format string allocated too short."; 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_IndexError; static PyObject *__pyx_n_s_KeyError; static PyObject *__pyx_kp_u_Non_native_byte_order_not_suppor; static PyObject *__pyx_n_s_ONAN; static PyObject *__pyx_n_s_RuntimeError; static PyObject *__pyx_n_s_ValueError; static PyObject *__pyx_n_s_arange; static PyObject *__pyx_n_s_argsort; static PyObject *__pyx_n_s_arr; static PyObject *__pyx_n_s_astype; static PyObject *__pyx_n_s_count; static PyObject *__pyx_n_s_count_prior; static PyObject *__pyx_n_s_destroy; static PyObject *__pyx_n_s_dtype; static PyObject *__pyx_n_s_empty; static PyObject *__pyx_n_s_float64; static PyObject *__pyx_n_s_get_item; static PyObject *__pyx_n_s_get_labels; static PyObject *__pyx_kp_s_home_yoh_deb_gits_pkg_exppsy_pa; static PyObject *__pyx_n_s_i; static PyObject *__pyx_n_s_import; static PyObject *__pyx_kp_s_index_out_of_bounds; static PyObject *__pyx_n_s_inf; static PyObject *__pyx_n_s_int; static PyObject *__pyx_n_s_int64; static PyObject *__pyx_n_s_iterations; static PyObject *__pyx_n_s_j; static PyObject *__pyx_n_s_k; static PyObject *__pyx_n_s_key; static PyObject *__pyx_n_s_keys; static PyObject *__pyx_n_s_list_to_object_array; static PyObject *__pyx_n_s_main; static PyObject *__pyx_n_s_mask; static PyObject *__pyx_n_s_max_count; static PyObject *__pyx_n_s_max_val; static PyObject *__pyx_n_s_mode_int64; static PyObject *__pyx_n_s_mode_object; static PyObject *__pyx_n_s_modes; static PyObject *__pyx_n_s_n; static PyObject *__pyx_n_s_na_sentinel; static PyObject *__pyx_n_s_nan; 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_np; static PyObject *__pyx_n_s_numpy; static PyObject *__pyx_n_s_obj; static PyObject *__pyx_n_s_object; static PyObject *__pyx_n_s_object_2; static PyObject *__pyx_n_s_pandas_hashtable; static PyObject *__pyx_n_s_put; static PyObject *__pyx_n_s_pyx_getbuffer; static PyObject *__pyx_n_s_pyx_releasebuffer; static PyObject *__pyx_n_s_pyx_vtable; static PyObject *__pyx_n_s_range; static PyObject *__pyx_n_s_resize; static PyObject *__pyx_n_s_ret; static PyObject *__pyx_n_s_set_item; static PyObject *__pyx_n_s_size_hint; static PyObject *__pyx_n_s_sort; static PyObject *__pyx_n_s_table; static PyObject *__pyx_n_s_take; static PyObject *__pyx_n_s_test; static PyObject *__pyx_n_s_to_array; static PyObject *__pyx_n_s_unique; static PyObject *__pyx_n_s_uniques; static PyObject *__pyx_kp_u_unknown_dtype_code_in_numpy_pxd; static PyObject *__pyx_n_s_val; static PyObject *__pyx_n_s_values; static PyObject *__pyx_n_s_zeros; static PyObject *__pyx_int_0; static PyObject *__pyx_int_1; static PyObject *__pyx_int_15; 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__11; static PyObject *__pyx_tuple__13; static PyObject *__pyx_codeobj__10; static PyObject *__pyx_codeobj__12; static PyObject *__pyx_codeobj__14; /* "pandas/hashtable.pyx":31 * * * def list_to_object_array(list obj): # <<<<<<<<<<<<<< * ''' * Convert list to object ndarray. Seriously can't believe I had to write this */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_9hashtable_1list_to_object_array(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/ static char __pyx_doc_6pandas_9hashtable_list_to_object_array[] = "\n Convert list to object ndarray. Seriously can't believe I had to write this\n function\n "; static PyMethodDef __pyx_mdef_6pandas_9hashtable_1list_to_object_array = {__Pyx_NAMESTR("list_to_object_array"), (PyCFunction)__pyx_pw_6pandas_9hashtable_1list_to_object_array, METH_O, __Pyx_DOCSTR(__pyx_doc_6pandas_9hashtable_list_to_object_array)}; static PyObject *__pyx_pw_6pandas_9hashtable_1list_to_object_array(PyObject *__pyx_self, PyObject *__pyx_v_obj) { CYTHON_UNUSED int __pyx_lineno = 0; CYTHON_UNUSED const char *__pyx_filename = NULL; CYTHON_UNUSED int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("list_to_object_array (wrapper)", 0); if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_obj), (&PyList_Type), 1, "obj", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 31; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_9hashtable_list_to_object_array(__pyx_self, ((PyObject*)__pyx_v_obj)); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_9hashtable_list_to_object_array(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_n; PyArrayObject *__pyx_v_arr = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_arr; __Pyx_Buffer __pyx_pybuffer_arr; 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; PyArrayObject *__pyx_t_6 = NULL; 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; PyObject **__pyx_t_12; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("list_to_object_array", 0); __pyx_pybuffer_arr.pybuffer.buf = NULL; __pyx_pybuffer_arr.refcount = 0; __pyx_pybuffernd_arr.data = NULL; __pyx_pybuffernd_arr.rcbuffer = &__pyx_pybuffer_arr; /* "pandas/hashtable.pyx":40 * ndarray[object] arr * * n = len(obj) # <<<<<<<<<<<<<< * arr = np.empty(n, dtype=object) * */ if (unlikely(__pyx_v_obj == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 40; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_1 = PyList_GET_SIZE(__pyx_v_obj); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 40; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/hashtable.pyx":41 * * n = len(obj) * arr = np.empty(n, dtype=object) # <<<<<<<<<<<<<< * * for i from 0 <= i < n: */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 41; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 41; __pyx_clineno = __LINE__; goto __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_n); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 41; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 41; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 41; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_dtype, __pyx_builtin_object) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 41; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_5 = PyObject_Call(__pyx_t_3, __pyx_t_4, __pyx_t_2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 41; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 41; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_6 = ((PyArrayObject *)__pyx_t_5); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_arr.rcbuffer->pybuffer); __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_arr.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_object, 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_arr.rcbuffer->pybuffer, (PyObject*)__pyx_v_arr, &__Pyx_TypeInfo_object, 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_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]; if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 41; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_6 = 0; __pyx_v_arr = ((PyArrayObject *)__pyx_t_5); __pyx_t_5 = 0; /* "pandas/hashtable.pyx":43 * arr = np.empty(n, dtype=object) * * for i from 0 <= i < n: # <<<<<<<<<<<<<< * arr[i] = obj[i] * */ __pyx_t_1 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_1; __pyx_v_i++) { /* "pandas/hashtable.pyx":44 * * for i from 0 <= i < n: * arr[i] = obj[i] # <<<<<<<<<<<<<< * * return arr */ if (unlikely(__pyx_v_obj == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 44; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_5 = __Pyx_GetItemInt_List(__pyx_v_obj, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1); if (unlikely(__pyx_t_5 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 44; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_5); __pyx_t_11 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_11 < 0) { __pyx_t_11 += __pyx_pybuffernd_arr.diminfo[0].shape; if (unlikely(__pyx_t_11 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_11 >= __pyx_pybuffernd_arr.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 44; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_12 = __Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_arr.rcbuffer->pybuffer.buf, __pyx_t_11, __pyx_pybuffernd_arr.diminfo[0].strides); __Pyx_GOTREF(*__pyx_t_12); __Pyx_INCREF(__pyx_t_5); __Pyx_DECREF(*__pyx_t_12); *__pyx_t_12 = __pyx_t_5; __Pyx_GIVEREF(*__pyx_t_12); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } /* "pandas/hashtable.pyx":46 * arr[i] = obj[i] * * return arr # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_arr)); __pyx_r = ((PyObject *)__pyx_v_arr); goto __pyx_L0; /* "pandas/hashtable.pyx":31 * * * def list_to_object_array(list obj): # <<<<<<<<<<<<<< * ''' * Convert list to object ndarray. Seriously can't believe I had to write this */ /* 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); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_arr.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.hashtable.list_to_object_array", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_arr.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_arr); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/hashtable.pyx":58 * PyObject **data * * def __cinit__(self): # <<<<<<<<<<<<<< * self.n = 0 * self.m = _INIT_VEC_CAP */ /* Python wrapper */ static int __pyx_pw_6pandas_9hashtable_12ObjectVector_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_pw_6pandas_9hashtable_12ObjectVector_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return -1;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__cinit__", 0))) return -1; __pyx_r = __pyx_pf_6pandas_9hashtable_12ObjectVector___cinit__(((struct __pyx_obj_6pandas_9hashtable_ObjectVector *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pandas_9hashtable_12ObjectVector___cinit__(struct __pyx_obj_6pandas_9hashtable_ObjectVector *__pyx_v_self) { 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__cinit__", 0); /* "pandas/hashtable.pyx":59 * * def __cinit__(self): * self.n = 0 # <<<<<<<<<<<<<< * self.m = _INIT_VEC_CAP * self.ao = np.empty(_INIT_VEC_CAP, dtype=object) */ __pyx_v_self->n = 0; /* "pandas/hashtable.pyx":60 * def __cinit__(self): * self.n = 0 * self.m = _INIT_VEC_CAP # <<<<<<<<<<<<<< * self.ao = np.empty(_INIT_VEC_CAP, dtype=object) * self.data = self.ao.data */ __pyx_v_self->m = __pyx_v_6pandas_9hashtable__INIT_VEC_CAP; /* "pandas/hashtable.pyx":61 * self.n = 0 * self.m = _INIT_VEC_CAP * self.ao = np.empty(_INIT_VEC_CAP, dtype=object) # <<<<<<<<<<<<<< * self.data = self.ao.data * */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 61; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 61; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_PyInt_FromSize_t(__pyx_v_6pandas_9hashtable__INIT_VEC_CAP); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 61; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 61; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 61; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_dtype, __pyx_builtin_object) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 61; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_4 = PyObject_Call(__pyx_t_2, __pyx_t_3, __pyx_t_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 61; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 61; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GIVEREF(__pyx_t_4); __Pyx_GOTREF(__pyx_v_self->ao); __Pyx_DECREF(((PyObject *)__pyx_v_self->ao)); __pyx_v_self->ao = ((PyArrayObject *)__pyx_t_4); __pyx_t_4 = 0; /* "pandas/hashtable.pyx":62 * self.m = _INIT_VEC_CAP * self.ao = np.empty(_INIT_VEC_CAP, dtype=object) * self.data = self.ao.data # <<<<<<<<<<<<<< * * def __len__(self): */ __pyx_v_self->data = ((PyObject **)__pyx_v_self->ao->data); /* "pandas/hashtable.pyx":58 * PyObject **data * * def __cinit__(self): # <<<<<<<<<<<<<< * self.n = 0 * self.m = _INIT_VEC_CAP */ /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("pandas.hashtable.ObjectVector.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/hashtable.pyx":64 * self.data = self.ao.data * * def __len__(self): # <<<<<<<<<<<<<< * return self.n * */ /* Python wrapper */ static Py_ssize_t __pyx_pw_6pandas_9hashtable_12ObjectVector_3__len__(PyObject *__pyx_v_self); /*proto*/ static Py_ssize_t __pyx_pw_6pandas_9hashtable_12ObjectVector_3__len__(PyObject *__pyx_v_self) { Py_ssize_t __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__len__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_9hashtable_12ObjectVector_2__len__(((struct __pyx_obj_6pandas_9hashtable_ObjectVector *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static Py_ssize_t __pyx_pf_6pandas_9hashtable_12ObjectVector_2__len__(struct __pyx_obj_6pandas_9hashtable_ObjectVector *__pyx_v_self) { Py_ssize_t __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__len__", 0); /* "pandas/hashtable.pyx":65 * * def __len__(self): * return self.n # <<<<<<<<<<<<<< * * def to_array(self): */ __pyx_r = __pyx_v_self->n; goto __pyx_L0; /* "pandas/hashtable.pyx":64 * self.data = self.ao.data * * def __len__(self): # <<<<<<<<<<<<<< * return self.n * */ /* function exit code */ __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/hashtable.pyx":67 * return self.n * * def to_array(self): # <<<<<<<<<<<<<< * self.ao.resize(self.n) * return self.ao */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_9hashtable_12ObjectVector_5to_array(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static PyObject *__pyx_pw_6pandas_9hashtable_12ObjectVector_5to_array(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("to_array (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_9hashtable_12ObjectVector_4to_array(((struct __pyx_obj_6pandas_9hashtable_ObjectVector *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_9hashtable_12ObjectVector_4to_array(struct __pyx_obj_6pandas_9hashtable_ObjectVector *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("to_array", 0); /* "pandas/hashtable.pyx":68 * * def to_array(self): * self.ao.resize(self.n) # <<<<<<<<<<<<<< * return self.ao * */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->ao), __pyx_n_s_resize); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 68; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyInt_FromSize_t(__pyx_v_self->n); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 68; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 68; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_Call(__pyx_t_1, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 68; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/hashtable.pyx":69 * def to_array(self): * self.ao.resize(self.n) * return self.ao # <<<<<<<<<<<<<< * * cdef inline append(self, object o): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_self->ao)); __pyx_r = ((PyObject *)__pyx_v_self->ao); goto __pyx_L0; /* "pandas/hashtable.pyx":67 * return self.n * * def to_array(self): # <<<<<<<<<<<<<< * self.ao.resize(self.n) * return self.ao */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("pandas.hashtable.ObjectVector.to_array", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/hashtable.pyx":71 * return self.ao * * cdef inline append(self, object o): # <<<<<<<<<<<<<< * if self.n == self.m: * self.m = self.m * 2 */ static CYTHON_INLINE PyObject *__pyx_f_6pandas_9hashtable_12ObjectVector_append(struct __pyx_obj_6pandas_9hashtable_ObjectVector *__pyx_v_self, PyObject *__pyx_v_o) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("append", 0); /* "pandas/hashtable.pyx":72 * * cdef inline append(self, object o): * if self.n == self.m: # <<<<<<<<<<<<<< * self.m = self.m * 2 * self.ao.resize(self.m) */ __pyx_t_1 = ((__pyx_v_self->n == __pyx_v_self->m) != 0); if (__pyx_t_1) { /* "pandas/hashtable.pyx":73 * cdef inline append(self, object o): * if self.n == self.m: * self.m = self.m * 2 # <<<<<<<<<<<<<< * self.ao.resize(self.m) * self.data = self.ao.data */ __pyx_v_self->m = (__pyx_v_self->m * 2); /* "pandas/hashtable.pyx":74 * if self.n == self.m: * self.m = self.m * 2 * self.ao.resize(self.m) # <<<<<<<<<<<<<< * self.data = self.ao.data * */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->ao), __pyx_n_s_resize); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 74; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyInt_FromSize_t(__pyx_v_self->m); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 74; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 74; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 74; __pyx_clineno = __LINE__; goto __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_3); __pyx_t_3 = 0; /* "pandas/hashtable.pyx":75 * self.m = self.m * 2 * self.ao.resize(self.m) * self.data = self.ao.data # <<<<<<<<<<<<<< * * Py_INCREF(o) */ __pyx_v_self->data = ((PyObject **)__pyx_v_self->ao->data); goto __pyx_L3; } __pyx_L3:; /* "pandas/hashtable.pyx":77 * self.data = self.ao.data * * Py_INCREF(o) # <<<<<<<<<<<<<< * self.data[self.n] = o * self.n += 1 */ Py_INCREF(__pyx_v_o); /* "pandas/hashtable.pyx":78 * * Py_INCREF(o) * self.data[self.n] = o # <<<<<<<<<<<<<< * self.n += 1 * */ (__pyx_v_self->data[__pyx_v_self->n]) = ((PyObject *)__pyx_v_o); /* "pandas/hashtable.pyx":79 * Py_INCREF(o) * self.data[self.n] = o * self.n += 1 # <<<<<<<<<<<<<< * * */ __pyx_v_self->n = (__pyx_v_self->n + 1); /* "pandas/hashtable.pyx":71 * return self.ao * * cdef inline append(self, object o): # <<<<<<<<<<<<<< * if self.n == self.m: * self.m = self.m * 2 */ /* 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.hashtable.ObjectVector.append", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/hashtable.pyx":89 * int64_t *data * * def __cinit__(self): # <<<<<<<<<<<<<< * self.n = 0 * self.m = _INIT_VEC_CAP */ /* Python wrapper */ static int __pyx_pw_6pandas_9hashtable_11Int64Vector_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_pw_6pandas_9hashtable_11Int64Vector_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return -1;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__cinit__", 0))) return -1; __pyx_r = __pyx_pf_6pandas_9hashtable_11Int64Vector___cinit__(((struct __pyx_obj_6pandas_9hashtable_Int64Vector *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pandas_9hashtable_11Int64Vector___cinit__(struct __pyx_obj_6pandas_9hashtable_Int64Vector *__pyx_v_self) { 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__cinit__", 0); /* "pandas/hashtable.pyx":90 * * def __cinit__(self): * self.n = 0 # <<<<<<<<<<<<<< * self.m = _INIT_VEC_CAP * self.ao = np.empty(_INIT_VEC_CAP, dtype=np.int64) */ __pyx_v_self->n = 0; /* "pandas/hashtable.pyx":91 * def __cinit__(self): * self.n = 0 * self.m = _INIT_VEC_CAP # <<<<<<<<<<<<<< * self.ao = np.empty(_INIT_VEC_CAP, dtype=np.int64) * self.data = self.ao.data */ __pyx_v_self->m = __pyx_v_6pandas_9hashtable__INIT_VEC_CAP; /* "pandas/hashtable.pyx":92 * self.n = 0 * self.m = _INIT_VEC_CAP * self.ao = np.empty(_INIT_VEC_CAP, dtype=np.int64) # <<<<<<<<<<<<<< * self.data = self.ao.data * */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 92; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 92; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_PyInt_FromSize_t(__pyx_v_6pandas_9hashtable__INIT_VEC_CAP); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 92; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 92; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 92; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 92; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_int64); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 92; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 92; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyObject_Call(__pyx_t_2, __pyx_t_3, __pyx_t_1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 92; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 92; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GIVEREF(__pyx_t_5); __Pyx_GOTREF(__pyx_v_self->ao); __Pyx_DECREF(((PyObject *)__pyx_v_self->ao)); __pyx_v_self->ao = ((PyArrayObject *)__pyx_t_5); __pyx_t_5 = 0; /* "pandas/hashtable.pyx":93 * self.m = _INIT_VEC_CAP * self.ao = np.empty(_INIT_VEC_CAP, dtype=np.int64) * self.data = self.ao.data # <<<<<<<<<<<<<< * * def __len__(self): */ __pyx_v_self->data = ((__pyx_t_5numpy_int64_t *)__pyx_v_self->ao->data); /* "pandas/hashtable.pyx":89 * int64_t *data * * def __cinit__(self): # <<<<<<<<<<<<<< * self.n = 0 * self.m = _INIT_VEC_CAP */ /* 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.hashtable.Int64Vector.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/hashtable.pyx":95 * self.data = self.ao.data * * def __len__(self): # <<<<<<<<<<<<<< * return self.n * */ /* Python wrapper */ static Py_ssize_t __pyx_pw_6pandas_9hashtable_11Int64Vector_3__len__(PyObject *__pyx_v_self); /*proto*/ static Py_ssize_t __pyx_pw_6pandas_9hashtable_11Int64Vector_3__len__(PyObject *__pyx_v_self) { Py_ssize_t __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__len__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_9hashtable_11Int64Vector_2__len__(((struct __pyx_obj_6pandas_9hashtable_Int64Vector *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static Py_ssize_t __pyx_pf_6pandas_9hashtable_11Int64Vector_2__len__(struct __pyx_obj_6pandas_9hashtable_Int64Vector *__pyx_v_self) { Py_ssize_t __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__len__", 0); /* "pandas/hashtable.pyx":96 * * def __len__(self): * return self.n # <<<<<<<<<<<<<< * * def to_array(self): */ __pyx_r = __pyx_v_self->n; goto __pyx_L0; /* "pandas/hashtable.pyx":95 * self.data = self.ao.data * * def __len__(self): # <<<<<<<<<<<<<< * return self.n * */ /* function exit code */ __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/hashtable.pyx":98 * return self.n * * def to_array(self): # <<<<<<<<<<<<<< * self.ao.resize(self.n) * return self.ao */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_9hashtable_11Int64Vector_5to_array(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static PyObject *__pyx_pw_6pandas_9hashtable_11Int64Vector_5to_array(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("to_array (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_9hashtable_11Int64Vector_4to_array(((struct __pyx_obj_6pandas_9hashtable_Int64Vector *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_9hashtable_11Int64Vector_4to_array(struct __pyx_obj_6pandas_9hashtable_Int64Vector *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("to_array", 0); /* "pandas/hashtable.pyx":99 * * def to_array(self): * self.ao.resize(self.n) # <<<<<<<<<<<<<< * return self.ao * */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->ao), __pyx_n_s_resize); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 99; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyInt_FromSize_t(__pyx_v_self->n); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 99; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 99; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_Call(__pyx_t_1, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 99; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/hashtable.pyx":100 * def to_array(self): * self.ao.resize(self.n) * return self.ao # <<<<<<<<<<<<<< * * cdef inline append(self, int64_t x): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_self->ao)); __pyx_r = ((PyObject *)__pyx_v_self->ao); goto __pyx_L0; /* "pandas/hashtable.pyx":98 * return self.n * * def to_array(self): # <<<<<<<<<<<<<< * self.ao.resize(self.n) * return self.ao */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("pandas.hashtable.Int64Vector.to_array", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/hashtable.pyx":102 * return self.ao * * cdef inline append(self, int64_t x): # <<<<<<<<<<<<<< * if self.n == self.m: * self.m = self.m * 2 */ static CYTHON_INLINE PyObject *__pyx_f_6pandas_9hashtable_11Int64Vector_append(struct __pyx_obj_6pandas_9hashtable_Int64Vector *__pyx_v_self, __pyx_t_5numpy_int64_t __pyx_v_x) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("append", 0); /* "pandas/hashtable.pyx":103 * * cdef inline append(self, int64_t x): * if self.n == self.m: # <<<<<<<<<<<<<< * self.m = self.m * 2 * self.ao.resize(self.m) */ __pyx_t_1 = ((__pyx_v_self->n == __pyx_v_self->m) != 0); if (__pyx_t_1) { /* "pandas/hashtable.pyx":104 * cdef inline append(self, int64_t x): * if self.n == self.m: * self.m = self.m * 2 # <<<<<<<<<<<<<< * self.ao.resize(self.m) * self.data = self.ao.data */ __pyx_v_self->m = (__pyx_v_self->m * 2); /* "pandas/hashtable.pyx":105 * if self.n == self.m: * self.m = self.m * 2 * self.ao.resize(self.m) # <<<<<<<<<<<<<< * self.data = self.ao.data * */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->ao), __pyx_n_s_resize); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 105; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyInt_FromSize_t(__pyx_v_self->m); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 105; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 105; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 105; __pyx_clineno = __LINE__; goto __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_3); __pyx_t_3 = 0; /* "pandas/hashtable.pyx":106 * self.m = self.m * 2 * self.ao.resize(self.m) * self.data = self.ao.data # <<<<<<<<<<<<<< * * self.data[self.n] = x */ __pyx_v_self->data = ((__pyx_t_5numpy_int64_t *)__pyx_v_self->ao->data); goto __pyx_L3; } __pyx_L3:; /* "pandas/hashtable.pyx":108 * self.data = self.ao.data * * self.data[self.n] = x # <<<<<<<<<<<<<< * self.n += 1 * */ (__pyx_v_self->data[__pyx_v_self->n]) = __pyx_v_x; /* "pandas/hashtable.pyx":109 * * self.data[self.n] = x * self.n += 1 # <<<<<<<<<<<<<< * * cdef class Float64Vector: */ __pyx_v_self->n = (__pyx_v_self->n + 1); /* "pandas/hashtable.pyx":102 * return self.ao * * cdef inline append(self, int64_t x): # <<<<<<<<<<<<<< * if self.n == self.m: * self.m = self.m * 2 */ /* 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.hashtable.Int64Vector.append", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/hashtable.pyx":118 * float64_t *data * * def __cinit__(self): # <<<<<<<<<<<<<< * self.n = 0 * self.m = _INIT_VEC_CAP */ /* Python wrapper */ static int __pyx_pw_6pandas_9hashtable_13Float64Vector_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_pw_6pandas_9hashtable_13Float64Vector_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return -1;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__cinit__", 0))) return -1; __pyx_r = __pyx_pf_6pandas_9hashtable_13Float64Vector___cinit__(((struct __pyx_obj_6pandas_9hashtable_Float64Vector *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pandas_9hashtable_13Float64Vector___cinit__(struct __pyx_obj_6pandas_9hashtable_Float64Vector *__pyx_v_self) { 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__cinit__", 0); /* "pandas/hashtable.pyx":119 * * def __cinit__(self): * self.n = 0 # <<<<<<<<<<<<<< * self.m = _INIT_VEC_CAP * self.ao = np.empty(_INIT_VEC_CAP, dtype=np.float64) */ __pyx_v_self->n = 0; /* "pandas/hashtable.pyx":120 * def __cinit__(self): * self.n = 0 * self.m = _INIT_VEC_CAP # <<<<<<<<<<<<<< * self.ao = np.empty(_INIT_VEC_CAP, dtype=np.float64) * self.data = self.ao.data */ __pyx_v_self->m = __pyx_v_6pandas_9hashtable__INIT_VEC_CAP; /* "pandas/hashtable.pyx":121 * self.n = 0 * self.m = _INIT_VEC_CAP * self.ao = np.empty(_INIT_VEC_CAP, dtype=np.float64) # <<<<<<<<<<<<<< * self.data = self.ao.data * */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 121; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 121; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_PyInt_FromSize_t(__pyx_v_6pandas_9hashtable__INIT_VEC_CAP); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 121; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 121; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 121; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 121; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_float64); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 121; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 121; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyObject_Call(__pyx_t_2, __pyx_t_3, __pyx_t_1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 121; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 121; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GIVEREF(__pyx_t_5); __Pyx_GOTREF(__pyx_v_self->ao); __Pyx_DECREF(((PyObject *)__pyx_v_self->ao)); __pyx_v_self->ao = ((PyArrayObject *)__pyx_t_5); __pyx_t_5 = 0; /* "pandas/hashtable.pyx":122 * self.m = _INIT_VEC_CAP * self.ao = np.empty(_INIT_VEC_CAP, dtype=np.float64) * self.data = self.ao.data # <<<<<<<<<<<<<< * * def __len__(self): */ __pyx_v_self->data = ((__pyx_t_5numpy_float64_t *)__pyx_v_self->ao->data); /* "pandas/hashtable.pyx":118 * float64_t *data * * def __cinit__(self): # <<<<<<<<<<<<<< * self.n = 0 * self.m = _INIT_VEC_CAP */ /* 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.hashtable.Float64Vector.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/hashtable.pyx":124 * self.data = self.ao.data * * def __len__(self): # <<<<<<<<<<<<<< * return self.n * */ /* Python wrapper */ static Py_ssize_t __pyx_pw_6pandas_9hashtable_13Float64Vector_3__len__(PyObject *__pyx_v_self); /*proto*/ static Py_ssize_t __pyx_pw_6pandas_9hashtable_13Float64Vector_3__len__(PyObject *__pyx_v_self) { Py_ssize_t __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__len__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_9hashtable_13Float64Vector_2__len__(((struct __pyx_obj_6pandas_9hashtable_Float64Vector *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static Py_ssize_t __pyx_pf_6pandas_9hashtable_13Float64Vector_2__len__(struct __pyx_obj_6pandas_9hashtable_Float64Vector *__pyx_v_self) { Py_ssize_t __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__len__", 0); /* "pandas/hashtable.pyx":125 * * def __len__(self): * return self.n # <<<<<<<<<<<<<< * * def to_array(self): */ __pyx_r = __pyx_v_self->n; goto __pyx_L0; /* "pandas/hashtable.pyx":124 * self.data = self.ao.data * * def __len__(self): # <<<<<<<<<<<<<< * return self.n * */ /* function exit code */ __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/hashtable.pyx":127 * return self.n * * def to_array(self): # <<<<<<<<<<<<<< * self.ao.resize(self.n) * return self.ao */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_9hashtable_13Float64Vector_5to_array(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static PyObject *__pyx_pw_6pandas_9hashtable_13Float64Vector_5to_array(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("to_array (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_9hashtable_13Float64Vector_4to_array(((struct __pyx_obj_6pandas_9hashtable_Float64Vector *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_9hashtable_13Float64Vector_4to_array(struct __pyx_obj_6pandas_9hashtable_Float64Vector *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("to_array", 0); /* "pandas/hashtable.pyx":128 * * def to_array(self): * self.ao.resize(self.n) # <<<<<<<<<<<<<< * return self.ao * */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->ao), __pyx_n_s_resize); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyInt_FromSize_t(__pyx_v_self->n); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_Call(__pyx_t_1, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/hashtable.pyx":129 * def to_array(self): * self.ao.resize(self.n) * return self.ao # <<<<<<<<<<<<<< * * cdef inline append(self, float64_t x): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_self->ao)); __pyx_r = ((PyObject *)__pyx_v_self->ao); goto __pyx_L0; /* "pandas/hashtable.pyx":127 * return self.n * * def to_array(self): # <<<<<<<<<<<<<< * self.ao.resize(self.n) * return self.ao */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("pandas.hashtable.Float64Vector.to_array", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/hashtable.pyx":131 * return self.ao * * cdef inline append(self, float64_t x): # <<<<<<<<<<<<<< * if self.n == self.m: * self.m = self.m * 2 */ static CYTHON_INLINE PyObject *__pyx_f_6pandas_9hashtable_13Float64Vector_append(struct __pyx_obj_6pandas_9hashtable_Float64Vector *__pyx_v_self, __pyx_t_5numpy_float64_t __pyx_v_x) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("append", 0); /* "pandas/hashtable.pyx":132 * * cdef inline append(self, float64_t x): * if self.n == self.m: # <<<<<<<<<<<<<< * self.m = self.m * 2 * self.ao.resize(self.m) */ __pyx_t_1 = ((__pyx_v_self->n == __pyx_v_self->m) != 0); if (__pyx_t_1) { /* "pandas/hashtable.pyx":133 * cdef inline append(self, float64_t x): * if self.n == self.m: * self.m = self.m * 2 # <<<<<<<<<<<<<< * self.ao.resize(self.m) * self.data = self.ao.data */ __pyx_v_self->m = (__pyx_v_self->m * 2); /* "pandas/hashtable.pyx":134 * if self.n == self.m: * self.m = self.m * 2 * self.ao.resize(self.m) # <<<<<<<<<<<<<< * self.data = self.ao.data * */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->ao), __pyx_n_s_resize); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 134; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyInt_FromSize_t(__pyx_v_self->m); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 134; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 134; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 134; __pyx_clineno = __LINE__; goto __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_3); __pyx_t_3 = 0; /* "pandas/hashtable.pyx":135 * self.m = self.m * 2 * self.ao.resize(self.m) * self.data = self.ao.data # <<<<<<<<<<<<<< * * self.data[self.n] = x */ __pyx_v_self->data = ((__pyx_t_5numpy_float64_t *)__pyx_v_self->ao->data); goto __pyx_L3; } __pyx_L3:; /* "pandas/hashtable.pyx":137 * self.data = self.ao.data * * self.data[self.n] = x # <<<<<<<<<<<<<< * self.n += 1 * */ (__pyx_v_self->data[__pyx_v_self->n]) = __pyx_v_x; /* "pandas/hashtable.pyx":138 * * self.data[self.n] = x * self.n += 1 # <<<<<<<<<<<<<< * * */ __pyx_v_self->n = (__pyx_v_self->n + 1); /* "pandas/hashtable.pyx":131 * return self.ao * * cdef inline append(self, float64_t x): # <<<<<<<<<<<<<< * if self.n == self.m: * self.m = self.m * 2 */ /* 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.hashtable.Float64Vector.append", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/hashtable.pyx":152 * # kh_resize_str(self.table, size_hint) * * def __cinit__(self, int size_hint=1): # <<<<<<<<<<<<<< * self.table = kh_init_str() * if size_hint is not None: */ /* Python wrapper */ static int __pyx_pw_6pandas_9hashtable_15StringHashTable_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_pw_6pandas_9hashtable_15StringHashTable_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { int __pyx_v_size_hint; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_size_hint,0}; PyObject* values[1] = {0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_size_hint); if (value) { values[0] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 152; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } } if (values[0]) { __pyx_v_size_hint = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_size_hint == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 152; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } else { __pyx_v_size_hint = ((int)1); } } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 152; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.hashtable.StringHashTable.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return -1; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pandas_9hashtable_15StringHashTable___cinit__(((struct __pyx_obj_6pandas_9hashtable_StringHashTable *)__pyx_v_self), __pyx_v_size_hint); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pandas_9hashtable_15StringHashTable___cinit__(struct __pyx_obj_6pandas_9hashtable_StringHashTable *__pyx_v_self, int __pyx_v_size_hint) { int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; int __pyx_t_3; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__cinit__", 0); /* "pandas/hashtable.pyx":153 * * def __cinit__(self, int size_hint=1): * self.table = kh_init_str() # <<<<<<<<<<<<<< * if size_hint is not None: * kh_resize_str(self.table, size_hint) */ __pyx_v_self->table = kh_init_str(); /* "pandas/hashtable.pyx":154 * def __cinit__(self, int size_hint=1): * self.table = kh_init_str() * if size_hint is not None: # <<<<<<<<<<<<<< * kh_resize_str(self.table, size_hint) * */ __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_size_hint); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 154; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = (__pyx_t_1 != Py_None); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { /* "pandas/hashtable.pyx":155 * self.table = kh_init_str() * if size_hint is not None: * kh_resize_str(self.table, size_hint) # <<<<<<<<<<<<<< * * def __dealloc__(self): */ kh_resize_str(__pyx_v_self->table, __pyx_v_size_hint); goto __pyx_L3; } __pyx_L3:; /* "pandas/hashtable.pyx":152 * # kh_resize_str(self.table, size_hint) * * def __cinit__(self, int size_hint=1): # <<<<<<<<<<<<<< * self.table = kh_init_str() * if size_hint is not None: */ /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas.hashtable.StringHashTable.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/hashtable.pyx":157 * kh_resize_str(self.table, size_hint) * * def __dealloc__(self): # <<<<<<<<<<<<<< * kh_destroy_str(self.table) * */ /* Python wrapper */ static void __pyx_pw_6pandas_9hashtable_15StringHashTable_3__dealloc__(PyObject *__pyx_v_self); /*proto*/ static void __pyx_pw_6pandas_9hashtable_15StringHashTable_3__dealloc__(PyObject *__pyx_v_self) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0); __pyx_pf_6pandas_9hashtable_15StringHashTable_2__dealloc__(((struct __pyx_obj_6pandas_9hashtable_StringHashTable *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); } static void __pyx_pf_6pandas_9hashtable_15StringHashTable_2__dealloc__(struct __pyx_obj_6pandas_9hashtable_StringHashTable *__pyx_v_self) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__dealloc__", 0); /* "pandas/hashtable.pyx":158 * * def __dealloc__(self): * kh_destroy_str(self.table) # <<<<<<<<<<<<<< * * cdef inline int check_type(self, object val): */ kh_destroy_str(__pyx_v_self->table); /* "pandas/hashtable.pyx":157 * kh_resize_str(self.table, size_hint) * * def __dealloc__(self): # <<<<<<<<<<<<<< * kh_destroy_str(self.table) * */ /* function exit code */ __Pyx_RefNannyFinishContext(); } /* "pandas/hashtable.pyx":160 * kh_destroy_str(self.table) * * cdef inline int check_type(self, object val): # <<<<<<<<<<<<<< * return util.is_string_object(val) * */ static CYTHON_INLINE int __pyx_f_6pandas_9hashtable_15StringHashTable_check_type(CYTHON_UNUSED struct __pyx_obj_6pandas_9hashtable_StringHashTable *__pyx_v_self, PyObject *__pyx_v_val) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("check_type", 0); /* "pandas/hashtable.pyx":161 * * cdef inline int check_type(self, object val): * return util.is_string_object(val) # <<<<<<<<<<<<<< * * cpdef get_item(self, object val): */ __pyx_r = is_string_object(__pyx_v_val); goto __pyx_L0; /* "pandas/hashtable.pyx":160 * kh_destroy_str(self.table) * * cdef inline int check_type(self, object val): # <<<<<<<<<<<<<< * return util.is_string_object(val) * */ /* function exit code */ __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/hashtable.pyx":163 * return util.is_string_object(val) * * cpdef get_item(self, object val): # <<<<<<<<<<<<<< * cdef khiter_t k * k = kh_get_str(self.table, util.get_c_string(val)) */ static PyObject *__pyx_pw_6pandas_9hashtable_15StringHashTable_5get_item(PyObject *__pyx_v_self, PyObject *__pyx_v_val); /*proto*/ static PyObject *__pyx_f_6pandas_9hashtable_15StringHashTable_get_item(struct __pyx_obj_6pandas_9hashtable_StringHashTable *__pyx_v_self, PyObject *__pyx_v_val, int __pyx_skip_dispatch) { khiter_t __pyx_v_k; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_t_4; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_item", 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_get_item); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 163; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_6pandas_9hashtable_15StringHashTable_5get_item)) { __Pyx_XDECREF(__pyx_r); __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 163; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_val); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_val); __Pyx_GIVEREF(__pyx_v_val); __pyx_t_3 = PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 163; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_3; __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } /* "pandas/hashtable.pyx":165 * cpdef get_item(self, object val): * cdef khiter_t k * k = kh_get_str(self.table, util.get_c_string(val)) # <<<<<<<<<<<<<< * if k != self.table.n_buckets: * return self.table.vals[k] */ __pyx_v_k = kh_get_str(__pyx_v_self->table, get_c_string(__pyx_v_val)); /* "pandas/hashtable.pyx":166 * cdef khiter_t k * k = kh_get_str(self.table, util.get_c_string(val)) * if k != self.table.n_buckets: # <<<<<<<<<<<<<< * return self.table.vals[k] * else: */ __pyx_t_4 = ((__pyx_v_k != __pyx_v_self->table->n_buckets) != 0); if (__pyx_t_4) { /* "pandas/hashtable.pyx":167 * k = kh_get_str(self.table, util.get_c_string(val)) * if k != self.table.n_buckets: * return self.table.vals[k] # <<<<<<<<<<<<<< * else: * raise KeyError(val) */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyInt_FromSize_t((__pyx_v_self->table->vals[__pyx_v_k])); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 167; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; } /*else*/ { /* "pandas/hashtable.pyx":169 * return self.table.vals[k] * else: * raise KeyError(val) # <<<<<<<<<<<<<< * * def get_iter_test(self, object key, Py_ssize_t iterations): */ __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 169; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_val); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_val); __Pyx_GIVEREF(__pyx_v_val); __pyx_t_3 = PyObject_Call(__pyx_builtin_KeyError, __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 169; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 169; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } /* "pandas/hashtable.pyx":163 * return util.is_string_object(val) * * cpdef get_item(self, object val): # <<<<<<<<<<<<<< * cdef khiter_t k * k = kh_get_str(self.table, util.get_c_string(val)) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("pandas.hashtable.StringHashTable.get_item", __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_9hashtable_15StringHashTable_5get_item(PyObject *__pyx_v_self, PyObject *__pyx_v_val); /*proto*/ static PyObject *__pyx_pw_6pandas_9hashtable_15StringHashTable_5get_item(PyObject *__pyx_v_self, PyObject *__pyx_v_val) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("get_item (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_9hashtable_15StringHashTable_4get_item(((struct __pyx_obj_6pandas_9hashtable_StringHashTable *)__pyx_v_self), ((PyObject *)__pyx_v_val)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_9hashtable_15StringHashTable_4get_item(struct __pyx_obj_6pandas_9hashtable_StringHashTable *__pyx_v_self, PyObject *__pyx_v_val) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_item", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = ((struct __pyx_vtabstruct_6pandas_9hashtable_StringHashTable *)__pyx_v_self->__pyx_vtab)->get_item(__pyx_v_self, __pyx_v_val, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 163; __pyx_clineno = __LINE__; goto __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.hashtable.StringHashTable.get_item", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/hashtable.pyx":171 * raise KeyError(val) * * def get_iter_test(self, object key, Py_ssize_t iterations): # <<<<<<<<<<<<<< * cdef Py_ssize_t i, val * for i in range(iterations): */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_9hashtable_15StringHashTable_7get_iter_test(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_6pandas_9hashtable_15StringHashTable_7get_iter_test(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_key = 0; Py_ssize_t __pyx_v_iterations; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("get_iter_test (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_key,&__pyx_n_s_iterations,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_key)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_iterations)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("get_iter_test", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 171; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "get_iter_test") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 171; __pyx_clineno = __LINE__; goto __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_key = values[0]; __pyx_v_iterations = __Pyx_PyIndex_AsSsize_t(values[1]); if (unlikely((__pyx_v_iterations == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 171; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("get_iter_test", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 171; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.hashtable.StringHashTable.get_iter_test", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pandas_9hashtable_15StringHashTable_6get_iter_test(((struct __pyx_obj_6pandas_9hashtable_StringHashTable *)__pyx_v_self), __pyx_v_key, __pyx_v_iterations); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_9hashtable_15StringHashTable_6get_iter_test(struct __pyx_obj_6pandas_9hashtable_StringHashTable *__pyx_v_self, PyObject *__pyx_v_key, Py_ssize_t __pyx_v_iterations) { CYTHON_UNUSED Py_ssize_t __pyx_v_i; CYTHON_UNUSED Py_ssize_t __pyx_v_val; khint_t __pyx_v_k; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; Py_ssize_t __pyx_t_2; int __pyx_t_3; __Pyx_RefNannySetupContext("get_iter_test", 0); /* "pandas/hashtable.pyx":173 * def get_iter_test(self, object key, Py_ssize_t iterations): * cdef Py_ssize_t i, val * for i in range(iterations): # <<<<<<<<<<<<<< * k = kh_get_str(self.table, util.get_c_string(key)) * if k != self.table.n_buckets: */ __pyx_t_1 = __pyx_v_iterations; for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) { __pyx_v_i = __pyx_t_2; /* "pandas/hashtable.pyx":174 * cdef Py_ssize_t i, val * for i in range(iterations): * k = kh_get_str(self.table, util.get_c_string(key)) # <<<<<<<<<<<<<< * if k != self.table.n_buckets: * val = self.table.vals[k] */ __pyx_v_k = kh_get_str(__pyx_v_self->table, get_c_string(__pyx_v_key)); /* "pandas/hashtable.pyx":175 * for i in range(iterations): * k = kh_get_str(self.table, util.get_c_string(key)) * if k != self.table.n_buckets: # <<<<<<<<<<<<<< * val = self.table.vals[k] * */ __pyx_t_3 = ((__pyx_v_k != __pyx_v_self->table->n_buckets) != 0); if (__pyx_t_3) { /* "pandas/hashtable.pyx":176 * k = kh_get_str(self.table, util.get_c_string(key)) * if k != self.table.n_buckets: * val = self.table.vals[k] # <<<<<<<<<<<<<< * * cpdef set_item(self, object key, Py_ssize_t val): */ __pyx_v_val = (__pyx_v_self->table->vals[__pyx_v_k]); goto __pyx_L5; } __pyx_L5:; } /* "pandas/hashtable.pyx":171 * raise KeyError(val) * * def get_iter_test(self, object key, Py_ssize_t iterations): # <<<<<<<<<<<<<< * cdef Py_ssize_t i, val * for i in range(iterations): */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/hashtable.pyx":178 * val = self.table.vals[k] * * cpdef set_item(self, object key, Py_ssize_t val): # <<<<<<<<<<<<<< * cdef: * khiter_t k */ static PyObject *__pyx_pw_6pandas_9hashtable_15StringHashTable_9set_item(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_6pandas_9hashtable_15StringHashTable_set_item(struct __pyx_obj_6pandas_9hashtable_StringHashTable *__pyx_v_self, PyObject *__pyx_v_key, Py_ssize_t __pyx_v_val, int __pyx_skip_dispatch) { khiter_t __pyx_v_k; int __pyx_v_ret; char *__pyx_v_buf; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; kh_cstr_t __pyx_t_4; int __pyx_t_5; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("set_item", 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_set_item); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 178; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_6pandas_9hashtable_15StringHashTable_9set_item)) { __Pyx_XDECREF(__pyx_r); __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_val); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 178; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 178; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_v_key); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_key); __Pyx_GIVEREF(__pyx_v_key); PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_Call(__pyx_t_1, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 178; __pyx_clineno = __LINE__; goto __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/hashtable.pyx":181 * cdef: * khiter_t k * int ret = 0 # <<<<<<<<<<<<<< * char* buf * */ __pyx_v_ret = 0; /* "pandas/hashtable.pyx":184 * char* buf * * buf = util.get_c_string(key) # <<<<<<<<<<<<<< * * k = kh_put_str(self.table, buf, &ret) */ __pyx_v_buf = get_c_string(__pyx_v_key); /* "pandas/hashtable.pyx":186 * buf = util.get_c_string(key) * * k = kh_put_str(self.table, buf, &ret) # <<<<<<<<<<<<<< * self.table.keys[k] = key * if kh_exist_str(self.table, k): */ __pyx_v_k = kh_put_str(__pyx_v_self->table, __pyx_v_buf, (&__pyx_v_ret)); /* "pandas/hashtable.pyx":187 * * k = kh_put_str(self.table, buf, &ret) * self.table.keys[k] = key # <<<<<<<<<<<<<< * if kh_exist_str(self.table, k): * self.table.vals[k] = val */ __pyx_t_4 = __Pyx_PyObject_AsString(__pyx_v_key); if (unlikely((__pyx_t_4 == (kh_cstr_t)NULL) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 187; __pyx_clineno = __LINE__; goto __pyx_L1_error;} (__pyx_v_self->table->keys[__pyx_v_k]) = __pyx_t_4; /* "pandas/hashtable.pyx":188 * k = kh_put_str(self.table, buf, &ret) * self.table.keys[k] = key * if kh_exist_str(self.table, k): # <<<<<<<<<<<<<< * self.table.vals[k] = val * else: */ __pyx_t_5 = (kh_exist_str(__pyx_v_self->table, __pyx_v_k) != 0); if (__pyx_t_5) { /* "pandas/hashtable.pyx":189 * self.table.keys[k] = key * if kh_exist_str(self.table, k): * self.table.vals[k] = val # <<<<<<<<<<<<<< * else: * raise KeyError(key) */ (__pyx_v_self->table->vals[__pyx_v_k]) = __pyx_v_val; goto __pyx_L3; } /*else*/ { /* "pandas/hashtable.pyx":191 * self.table.vals[k] = val * else: * raise KeyError(key) # <<<<<<<<<<<<<< * * def get_indexer(self, ndarray[object] values): */ __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 191; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_key); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_key); __Pyx_GIVEREF(__pyx_v_key); __pyx_t_2 = PyObject_Call(__pyx_builtin_KeyError, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 191; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 191; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_L3:; /* "pandas/hashtable.pyx":178 * val = self.table.vals[k] * * cpdef set_item(self, object key, Py_ssize_t val): # <<<<<<<<<<<<<< * cdef: * khiter_t k */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("pandas.hashtable.StringHashTable.set_item", __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_9hashtable_15StringHashTable_9set_item(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_6pandas_9hashtable_15StringHashTable_9set_item(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_key = 0; Py_ssize_t __pyx_v_val; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("set_item (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_key,&__pyx_n_s_val,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_key)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_val)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("set_item", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 178; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "set_item") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 178; __pyx_clineno = __LINE__; goto __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_key = values[0]; __pyx_v_val = __Pyx_PyIndex_AsSsize_t(values[1]); if (unlikely((__pyx_v_val == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 178; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("set_item", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 178; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.hashtable.StringHashTable.set_item", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pandas_9hashtable_15StringHashTable_8set_item(((struct __pyx_obj_6pandas_9hashtable_StringHashTable *)__pyx_v_self), __pyx_v_key, __pyx_v_val); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_9hashtable_15StringHashTable_8set_item(struct __pyx_obj_6pandas_9hashtable_StringHashTable *__pyx_v_self, PyObject *__pyx_v_key, Py_ssize_t __pyx_v_val) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("set_item", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = ((struct __pyx_vtabstruct_6pandas_9hashtable_StringHashTable *)__pyx_v_self->__pyx_vtab)->set_item(__pyx_v_self, __pyx_v_key, __pyx_v_val, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 178; __pyx_clineno = __LINE__; goto __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.hashtable.StringHashTable.set_item", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/hashtable.pyx":193 * raise KeyError(key) * * def get_indexer(self, ndarray[object] values): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = len(values) */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_9hashtable_15StringHashTable_11get_indexer(PyObject *__pyx_v_self, PyObject *__pyx_v_values); /*proto*/ static PyObject *__pyx_pw_6pandas_9hashtable_15StringHashTable_11get_indexer(PyObject *__pyx_v_self, PyObject *__pyx_v_values) { CYTHON_UNUSED int __pyx_lineno = 0; CYTHON_UNUSED const char *__pyx_filename = NULL; CYTHON_UNUSED int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("get_indexer (wrapper)", 0); if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 193; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_9hashtable_15StringHashTable_10get_indexer(((struct __pyx_obj_6pandas_9hashtable_StringHashTable *)__pyx_v_self), ((PyArrayObject *)__pyx_v_values)); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_9hashtable_15StringHashTable_10get_indexer(struct __pyx_obj_6pandas_9hashtable_StringHashTable *__pyx_v_self, PyArrayObject *__pyx_v_values) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_n; PyArrayObject *__pyx_v_labels = 0; char *__pyx_v_buf; __pyx_t_5numpy_int64_t *__pyx_v_resbuf; khiter_t __pyx_v_k; kh_str_t *__pyx_v_table; __Pyx_LocalBuf_ND __pyx_pybuffernd_labels; __Pyx_Buffer __pyx_pybuffer_labels; __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; kh_str_t *__pyx_t_8; Py_ssize_t __pyx_t_9; Py_ssize_t __pyx_t_10; int __pyx_t_11; int __pyx_t_12; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_indexer", 0); __pyx_pybuffer_labels.pybuffer.buf = NULL; __pyx_pybuffer_labels.refcount = 0; __pyx_pybuffernd_labels.data = NULL; __pyx_pybuffernd_labels.rcbuffer = &__pyx_pybuffer_labels; __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_filename = __pyx_f[0]; __pyx_lineno = 193; __pyx_clineno = __LINE__; goto __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/hashtable.pyx":195 * def get_indexer(self, ndarray[object] values): * cdef: * Py_ssize_t i, n = len(values) # <<<<<<<<<<<<<< * ndarray[int64_t] labels = np.empty(n, dtype=np.int64) * char *buf */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 195; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/hashtable.pyx":196 * cdef: * Py_ssize_t i, n = len(values) * ndarray[int64_t] labels = np.empty(n, dtype=np.int64) # <<<<<<<<<<<<<< * char *buf * int64_t *resbuf = labels.data */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 196; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 196; __pyx_clineno = __LINE__; goto __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_n); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 196; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 196; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 196; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 196; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_int64); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 196; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 196; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyObject_Call(__pyx_t_3, __pyx_t_4, __pyx_t_2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 196; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 196; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_7 = ((PyArrayObject *)__pyx_t_6); { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_labels.rcbuffer->pybuffer, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { __pyx_v_labels = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_labels.rcbuffer->pybuffer.buf = NULL; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 196; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } else {__pyx_pybuffernd_labels.diminfo[0].strides = __pyx_pybuffernd_labels.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_labels.diminfo[0].shape = __pyx_pybuffernd_labels.rcbuffer->pybuffer.shape[0]; } } __pyx_t_7 = 0; __pyx_v_labels = ((PyArrayObject *)__pyx_t_6); __pyx_t_6 = 0; /* "pandas/hashtable.pyx":198 * ndarray[int64_t] labels = np.empty(n, dtype=np.int64) * char *buf * int64_t *resbuf = labels.data # <<<<<<<<<<<<<< * khiter_t k * kh_str_t *table = self.table */ __pyx_v_resbuf = ((__pyx_t_5numpy_int64_t *)__pyx_v_labels->data); /* "pandas/hashtable.pyx":200 * int64_t *resbuf = labels.data * khiter_t k * kh_str_t *table = self.table # <<<<<<<<<<<<<< * * for i in range(n): */ __pyx_t_8 = __pyx_v_self->table; __pyx_v_table = __pyx_t_8; /* "pandas/hashtable.pyx":202 * kh_str_t *table = self.table * * for i in range(n): # <<<<<<<<<<<<<< * buf = util.get_c_string(values[i]) * k = kh_get_str(table, buf) */ __pyx_t_1 = __pyx_v_n; for (__pyx_t_9 = 0; __pyx_t_9 < __pyx_t_1; __pyx_t_9+=1) { __pyx_v_i = __pyx_t_9; /* "pandas/hashtable.pyx":203 * * for i in range(n): * buf = util.get_c_string(values[i]) # <<<<<<<<<<<<<< * k = kh_get_str(table, buf) * if k != table.n_buckets: */ __pyx_t_10 = __pyx_v_i; __pyx_t_11 = -1; if (__pyx_t_10 < 0) { __pyx_t_10 += __pyx_pybuffernd_values.diminfo[0].shape; if (unlikely(__pyx_t_10 < 0)) __pyx_t_11 = 0; } else if (unlikely(__pyx_t_10 >= __pyx_pybuffernd_values.diminfo[0].shape)) __pyx_t_11 = 0; if (unlikely(__pyx_t_11 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_11); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 203; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_6 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_10, __pyx_pybuffernd_values.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_6); __pyx_v_buf = get_c_string(__pyx_t_6); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; /* "pandas/hashtable.pyx":204 * for i in range(n): * buf = util.get_c_string(values[i]) * k = kh_get_str(table, buf) # <<<<<<<<<<<<<< * if k != table.n_buckets: * resbuf[i] = table.vals[k] */ __pyx_v_k = kh_get_str(__pyx_v_table, __pyx_v_buf); /* "pandas/hashtable.pyx":205 * buf = util.get_c_string(values[i]) * k = kh_get_str(table, buf) * if k != table.n_buckets: # <<<<<<<<<<<<<< * resbuf[i] = table.vals[k] * else: */ __pyx_t_12 = ((__pyx_v_k != __pyx_v_table->n_buckets) != 0); if (__pyx_t_12) { /* "pandas/hashtable.pyx":206 * k = kh_get_str(table, buf) * if k != table.n_buckets: * resbuf[i] = table.vals[k] # <<<<<<<<<<<<<< * else: * resbuf[i] = -1 */ (__pyx_v_resbuf[__pyx_v_i]) = (__pyx_v_table->vals[__pyx_v_k]); goto __pyx_L5; } /*else*/ { /* "pandas/hashtable.pyx":208 * resbuf[i] = table.vals[k] * else: * resbuf[i] = -1 # <<<<<<<<<<<<<< * return labels * */ (__pyx_v_resbuf[__pyx_v_i]) = -1; } __pyx_L5:; } /* "pandas/hashtable.pyx":209 * else: * resbuf[i] = -1 * return labels # <<<<<<<<<<<<<< * * def unique(self, ndarray[object] values): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_labels)); __pyx_r = ((PyObject *)__pyx_v_labels); goto __pyx_L0; /* "pandas/hashtable.pyx":193 * raise KeyError(key) * * def get_indexer(self, ndarray[object] values): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = len(values) */ /* 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_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_labels.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.hashtable.StringHashTable.get_indexer", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_labels.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_labels); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/hashtable.pyx":211 * return labels * * def unique(self, ndarray[object] values): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = len(values) */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_9hashtable_15StringHashTable_13unique(PyObject *__pyx_v_self, PyObject *__pyx_v_values); /*proto*/ static PyObject *__pyx_pw_6pandas_9hashtable_15StringHashTable_13unique(PyObject *__pyx_v_self, PyObject *__pyx_v_values) { CYTHON_UNUSED int __pyx_lineno = 0; CYTHON_UNUSED const char *__pyx_filename = NULL; CYTHON_UNUSED int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("unique (wrapper)", 0); if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 211; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_9hashtable_15StringHashTable_12unique(((struct __pyx_obj_6pandas_9hashtable_StringHashTable *)__pyx_v_self), ((PyArrayObject *)__pyx_v_values)); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_9hashtable_15StringHashTable_12unique(struct __pyx_obj_6pandas_9hashtable_StringHashTable *__pyx_v_self, PyArrayObject *__pyx_v_values) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_n; Py_ssize_t __pyx_v_count; int __pyx_v_ret; PyObject *__pyx_v_val = 0; char *__pyx_v_buf; khiter_t __pyx_v_k; struct __pyx_obj_6pandas_9hashtable_ObjectVector *__pyx_v_uniques = 0; __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; Py_ssize_t __pyx_t_3; Py_ssize_t __pyx_t_4; int __pyx_t_5; int __pyx_t_6; PyObject *__pyx_t_7 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("unique", 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_object, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 211; __pyx_clineno = __LINE__; goto __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/hashtable.pyx":213 * def unique(self, ndarray[object] values): * cdef: * Py_ssize_t i, n = len(values) # <<<<<<<<<<<<<< * Py_ssize_t idx, count = 0 * int ret = 0 */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 213; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/hashtable.pyx":214 * cdef: * Py_ssize_t i, n = len(values) * Py_ssize_t idx, count = 0 # <<<<<<<<<<<<<< * int ret = 0 * object val */ __pyx_v_count = 0; /* "pandas/hashtable.pyx":215 * Py_ssize_t i, n = len(values) * Py_ssize_t idx, count = 0 * int ret = 0 # <<<<<<<<<<<<<< * object val * char *buf */ __pyx_v_ret = 0; /* "pandas/hashtable.pyx":219 * char *buf * khiter_t k * ObjectVector uniques = ObjectVector() # <<<<<<<<<<<<<< * * for i in range(n): */ __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_6pandas_9hashtable_ObjectVector)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 219; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_v_uniques = ((struct __pyx_obj_6pandas_9hashtable_ObjectVector *)__pyx_t_2); __pyx_t_2 = 0; /* "pandas/hashtable.pyx":221 * ObjectVector uniques = ObjectVector() * * for i in range(n): # <<<<<<<<<<<<<< * val = values[i] * buf = util.get_c_string(val) */ __pyx_t_1 = __pyx_v_n; for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_1; __pyx_t_3+=1) { __pyx_v_i = __pyx_t_3; /* "pandas/hashtable.pyx":222 * * for i in range(n): * val = values[i] # <<<<<<<<<<<<<< * buf = util.get_c_string(val) * k = kh_get_str(self.table, buf) */ __pyx_t_4 = __pyx_v_i; __pyx_t_5 = -1; if (__pyx_t_4 < 0) { __pyx_t_4 += __pyx_pybuffernd_values.diminfo[0].shape; if (unlikely(__pyx_t_4 < 0)) __pyx_t_5 = 0; } else if (unlikely(__pyx_t_4 >= __pyx_pybuffernd_values.diminfo[0].shape)) __pyx_t_5 = 0; if (unlikely(__pyx_t_5 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_5); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 222; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_2 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_4, __pyx_pybuffernd_values.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_2); __Pyx_XDECREF_SET(__pyx_v_val, __pyx_t_2); __pyx_t_2 = 0; /* "pandas/hashtable.pyx":223 * for i in range(n): * val = values[i] * buf = util.get_c_string(val) # <<<<<<<<<<<<<< * k = kh_get_str(self.table, buf) * if k == self.table.n_buckets: */ __pyx_v_buf = get_c_string(__pyx_v_val); /* "pandas/hashtable.pyx":224 * val = values[i] * buf = util.get_c_string(val) * k = kh_get_str(self.table, buf) # <<<<<<<<<<<<<< * if k == self.table.n_buckets: * k = kh_put_str(self.table, buf, &ret) */ __pyx_v_k = kh_get_str(__pyx_v_self->table, __pyx_v_buf); /* "pandas/hashtable.pyx":225 * buf = util.get_c_string(val) * k = kh_get_str(self.table, buf) * if k == self.table.n_buckets: # <<<<<<<<<<<<<< * k = kh_put_str(self.table, buf, &ret) * # print 'putting %s, %s' % (val, count) */ __pyx_t_6 = ((__pyx_v_k == __pyx_v_self->table->n_buckets) != 0); if (__pyx_t_6) { /* "pandas/hashtable.pyx":226 * k = kh_get_str(self.table, buf) * if k == self.table.n_buckets: * k = kh_put_str(self.table, buf, &ret) # <<<<<<<<<<<<<< * # print 'putting %s, %s' % (val, count) * count += 1 */ __pyx_v_k = kh_put_str(__pyx_v_self->table, __pyx_v_buf, (&__pyx_v_ret)); /* "pandas/hashtable.pyx":228 * k = kh_put_str(self.table, buf, &ret) * # print 'putting %s, %s' % (val, count) * count += 1 # <<<<<<<<<<<<<< * uniques.append(val) * */ __pyx_v_count = (__pyx_v_count + 1); /* "pandas/hashtable.pyx":229 * # print 'putting %s, %s' % (val, count) * count += 1 * uniques.append(val) # <<<<<<<<<<<<<< * * # return None */ __pyx_t_2 = __pyx_f_6pandas_9hashtable_12ObjectVector_append(__pyx_v_uniques, __pyx_v_val); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 229; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; goto __pyx_L5; } __pyx_L5:; } /* "pandas/hashtable.pyx":232 * * # return None * return uniques.to_array() # <<<<<<<<<<<<<< * * def factorize(self, ndarray[object] values): */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_uniques), __pyx_n_s_to_array); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 232; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_7 = PyObject_Call(__pyx_t_2, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 232; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_7; __pyx_t_7 = 0; goto __pyx_L0; /* "pandas/hashtable.pyx":211 * return labels * * def unique(self, ndarray[object] values): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = len(values) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_7); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __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.hashtable.StringHashTable.unique", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF(__pyx_v_val); __Pyx_XDECREF((PyObject *)__pyx_v_uniques); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/hashtable.pyx":234 * return uniques.to_array() * * def factorize(self, ndarray[object] values): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = len(values) */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_9hashtable_15StringHashTable_15factorize(PyObject *__pyx_v_self, PyObject *__pyx_v_values); /*proto*/ static PyObject *__pyx_pw_6pandas_9hashtable_15StringHashTable_15factorize(PyObject *__pyx_v_self, PyObject *__pyx_v_values) { CYTHON_UNUSED int __pyx_lineno = 0; CYTHON_UNUSED const char *__pyx_filename = NULL; CYTHON_UNUSED int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("factorize (wrapper)", 0); if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 234; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_9hashtable_15StringHashTable_14factorize(((struct __pyx_obj_6pandas_9hashtable_StringHashTable *)__pyx_v_self), ((PyArrayObject *)__pyx_v_values)); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_9hashtable_15StringHashTable_14factorize(struct __pyx_obj_6pandas_9hashtable_StringHashTable *__pyx_v_self, PyArrayObject *__pyx_v_values) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_n; PyArrayObject *__pyx_v_labels = 0; PyObject *__pyx_v_reverse = 0; Py_ssize_t __pyx_v_idx; Py_ssize_t __pyx_v_count; int __pyx_v_ret; PyObject *__pyx_v_val = 0; char *__pyx_v_buf; khiter_t __pyx_v_k; __Pyx_LocalBuf_ND __pyx_pybuffernd_labels; __Pyx_Buffer __pyx_pybuffer_labels; __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; Py_ssize_t __pyx_t_8; Py_ssize_t __pyx_t_9; int __pyx_t_10; int __pyx_t_11; Py_ssize_t __pyx_t_12; Py_ssize_t __pyx_t_13; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("factorize", 0); __pyx_pybuffer_labels.pybuffer.buf = NULL; __pyx_pybuffer_labels.refcount = 0; __pyx_pybuffernd_labels.data = NULL; __pyx_pybuffernd_labels.rcbuffer = &__pyx_pybuffer_labels; __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_filename = __pyx_f[0]; __pyx_lineno = 234; __pyx_clineno = __LINE__; goto __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/hashtable.pyx":236 * def factorize(self, ndarray[object] values): * cdef: * Py_ssize_t i, n = len(values) # <<<<<<<<<<<<<< * ndarray[int64_t] labels = np.empty(n, dtype=np.int64) * dict reverse = {} */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 236; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/hashtable.pyx":237 * cdef: * Py_ssize_t i, n = len(values) * ndarray[int64_t] labels = np.empty(n, dtype=np.int64) # <<<<<<<<<<<<<< * dict reverse = {} * Py_ssize_t idx, count = 0 */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 237; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 237; __pyx_clineno = __LINE__; goto __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_n); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 237; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 237; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 237; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 237; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_int64); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 237; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 237; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyObject_Call(__pyx_t_3, __pyx_t_4, __pyx_t_2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 237; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 237; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_7 = ((PyArrayObject *)__pyx_t_6); { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_labels.rcbuffer->pybuffer, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { __pyx_v_labels = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_labels.rcbuffer->pybuffer.buf = NULL; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 237; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } else {__pyx_pybuffernd_labels.diminfo[0].strides = __pyx_pybuffernd_labels.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_labels.diminfo[0].shape = __pyx_pybuffernd_labels.rcbuffer->pybuffer.shape[0]; } } __pyx_t_7 = 0; __pyx_v_labels = ((PyArrayObject *)__pyx_t_6); __pyx_t_6 = 0; /* "pandas/hashtable.pyx":238 * Py_ssize_t i, n = len(values) * ndarray[int64_t] labels = np.empty(n, dtype=np.int64) * dict reverse = {} # <<<<<<<<<<<<<< * Py_ssize_t idx, count = 0 * int ret = 0 */ __pyx_t_6 = PyDict_New(); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 238; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_v_reverse = ((PyObject*)__pyx_t_6); __pyx_t_6 = 0; /* "pandas/hashtable.pyx":239 * ndarray[int64_t] labels = np.empty(n, dtype=np.int64) * dict reverse = {} * Py_ssize_t idx, count = 0 # <<<<<<<<<<<<<< * int ret = 0 * object val */ __pyx_v_count = 0; /* "pandas/hashtable.pyx":240 * dict reverse = {} * Py_ssize_t idx, count = 0 * int ret = 0 # <<<<<<<<<<<<<< * object val * char *buf */ __pyx_v_ret = 0; /* "pandas/hashtable.pyx":245 * khiter_t k * * for i in range(n): # <<<<<<<<<<<<<< * val = values[i] * buf = util.get_c_string(val) */ __pyx_t_1 = __pyx_v_n; for (__pyx_t_8 = 0; __pyx_t_8 < __pyx_t_1; __pyx_t_8+=1) { __pyx_v_i = __pyx_t_8; /* "pandas/hashtable.pyx":246 * * for i in range(n): * val = values[i] # <<<<<<<<<<<<<< * buf = util.get_c_string(val) * k = kh_get_str(self.table, buf) */ __pyx_t_9 = __pyx_v_i; __pyx_t_10 = -1; if (__pyx_t_9 < 0) { __pyx_t_9 += __pyx_pybuffernd_values.diminfo[0].shape; if (unlikely(__pyx_t_9 < 0)) __pyx_t_10 = 0; } else if (unlikely(__pyx_t_9 >= __pyx_pybuffernd_values.diminfo[0].shape)) __pyx_t_10 = 0; if (unlikely(__pyx_t_10 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_10); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 246; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_6 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_9, __pyx_pybuffernd_values.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_6); __Pyx_XDECREF_SET(__pyx_v_val, __pyx_t_6); __pyx_t_6 = 0; /* "pandas/hashtable.pyx":247 * for i in range(n): * val = values[i] * buf = util.get_c_string(val) # <<<<<<<<<<<<<< * k = kh_get_str(self.table, buf) * if k != self.table.n_buckets: */ __pyx_v_buf = get_c_string(__pyx_v_val); /* "pandas/hashtable.pyx":248 * val = values[i] * buf = util.get_c_string(val) * k = kh_get_str(self.table, buf) # <<<<<<<<<<<<<< * if k != self.table.n_buckets: * idx = self.table.vals[k] */ __pyx_v_k = kh_get_str(__pyx_v_self->table, __pyx_v_buf); /* "pandas/hashtable.pyx":249 * buf = util.get_c_string(val) * k = kh_get_str(self.table, buf) * if k != self.table.n_buckets: # <<<<<<<<<<<<<< * idx = self.table.vals[k] * labels[i] = idx */ __pyx_t_11 = ((__pyx_v_k != __pyx_v_self->table->n_buckets) != 0); if (__pyx_t_11) { /* "pandas/hashtable.pyx":250 * k = kh_get_str(self.table, buf) * if k != self.table.n_buckets: * idx = self.table.vals[k] # <<<<<<<<<<<<<< * labels[i] = idx * else: */ __pyx_v_idx = (__pyx_v_self->table->vals[__pyx_v_k]); /* "pandas/hashtable.pyx":251 * if k != self.table.n_buckets: * idx = self.table.vals[k] * labels[i] = idx # <<<<<<<<<<<<<< * else: * k = kh_put_str(self.table, buf, &ret) */ __pyx_t_12 = __pyx_v_i; __pyx_t_10 = -1; if (__pyx_t_12 < 0) { __pyx_t_12 += __pyx_pybuffernd_labels.diminfo[0].shape; if (unlikely(__pyx_t_12 < 0)) __pyx_t_10 = 0; } else if (unlikely(__pyx_t_12 >= __pyx_pybuffernd_labels.diminfo[0].shape)) __pyx_t_10 = 0; if (unlikely(__pyx_t_10 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_10); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 251; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_labels.rcbuffer->pybuffer.buf, __pyx_t_12, __pyx_pybuffernd_labels.diminfo[0].strides) = __pyx_v_idx; goto __pyx_L5; } /*else*/ { /* "pandas/hashtable.pyx":253 * labels[i] = idx * else: * k = kh_put_str(self.table, buf, &ret) # <<<<<<<<<<<<<< * # print 'putting %s, %s' % (val, count) * */ __pyx_v_k = kh_put_str(__pyx_v_self->table, __pyx_v_buf, (&__pyx_v_ret)); /* "pandas/hashtable.pyx":256 * # print 'putting %s, %s' % (val, count) * * self.table.vals[k] = count # <<<<<<<<<<<<<< * reverse[count] = val * labels[i] = count */ (__pyx_v_self->table->vals[__pyx_v_k]) = __pyx_v_count; /* "pandas/hashtable.pyx":257 * * self.table.vals[k] = count * reverse[count] = val # <<<<<<<<<<<<<< * labels[i] = count * count += 1 */ __pyx_t_6 = PyInt_FromSsize_t(__pyx_v_count); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 257; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); if (unlikely(PyDict_SetItem(__pyx_v_reverse, __pyx_t_6, __pyx_v_val) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 257; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; /* "pandas/hashtable.pyx":258 * self.table.vals[k] = count * reverse[count] = val * labels[i] = count # <<<<<<<<<<<<<< * count += 1 * */ __pyx_t_13 = __pyx_v_i; __pyx_t_10 = -1; if (__pyx_t_13 < 0) { __pyx_t_13 += __pyx_pybuffernd_labels.diminfo[0].shape; if (unlikely(__pyx_t_13 < 0)) __pyx_t_10 = 0; } else if (unlikely(__pyx_t_13 >= __pyx_pybuffernd_labels.diminfo[0].shape)) __pyx_t_10 = 0; if (unlikely(__pyx_t_10 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_10); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 258; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_labels.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_labels.diminfo[0].strides) = __pyx_v_count; /* "pandas/hashtable.pyx":259 * reverse[count] = val * labels[i] = count * count += 1 # <<<<<<<<<<<<<< * * # return None */ __pyx_v_count = (__pyx_v_count + 1); } __pyx_L5:; } /* "pandas/hashtable.pyx":262 * * # return None * return reverse, labels # <<<<<<<<<<<<<< * * cdef class Int32HashTable(HashTable): */ __Pyx_XDECREF(__pyx_r); __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 262; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(__pyx_v_reverse); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_reverse); __Pyx_GIVEREF(__pyx_v_reverse); __Pyx_INCREF(((PyObject *)__pyx_v_labels)); PyTuple_SET_ITEM(__pyx_t_6, 1, ((PyObject *)__pyx_v_labels)); __Pyx_GIVEREF(((PyObject *)__pyx_v_labels)); __pyx_r = __pyx_t_6; __pyx_t_6 = 0; goto __pyx_L0; /* "pandas/hashtable.pyx":234 * return uniques.to_array() * * def factorize(self, ndarray[object] values): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = len(values) */ /* 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_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_labels.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.hashtable.StringHashTable.factorize", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_labels.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_labels); __Pyx_XDECREF(__pyx_v_reverse); __Pyx_XDECREF(__pyx_v_val); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/hashtable.pyx":267 * cdef kh_int32_t *table * * def __init__(self, size_hint=1): # <<<<<<<<<<<<<< * if size_hint is not None: * kh_resize_int32(self.table, size_hint) */ /* Python wrapper */ static int __pyx_pw_6pandas_9hashtable_14Int32HashTable_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_pw_6pandas_9hashtable_14Int32HashTable_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_size_hint = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_size_hint,0}; PyObject* values[1] = {0}; values[0] = ((PyObject *)__pyx_int_1); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_size_hint); if (value) { values[0] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 267; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_size_hint = values[0]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("__init__", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 267; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.hashtable.Int32HashTable.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return -1; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pandas_9hashtable_14Int32HashTable___init__(((struct __pyx_obj_6pandas_9hashtable_Int32HashTable *)__pyx_v_self), __pyx_v_size_hint); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pandas_9hashtable_14Int32HashTable___init__(struct __pyx_obj_6pandas_9hashtable_Int32HashTable *__pyx_v_self, PyObject *__pyx_v_size_hint) { int __pyx_r; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; khint_t __pyx_t_3; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__init__", 0); /* "pandas/hashtable.pyx":268 * * def __init__(self, size_hint=1): * if size_hint is not None: # <<<<<<<<<<<<<< * kh_resize_int32(self.table, size_hint) * */ __pyx_t_1 = (__pyx_v_size_hint != Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { /* "pandas/hashtable.pyx":269 * def __init__(self, size_hint=1): * if size_hint is not None: * kh_resize_int32(self.table, size_hint) # <<<<<<<<<<<<<< * * def __cinit__(self): */ __pyx_t_3 = __Pyx_PyInt_As_npy_uint32(__pyx_v_size_hint); if (unlikely((__pyx_t_3 == (khint_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 269; __pyx_clineno = __LINE__; goto __pyx_L1_error;} kh_resize_int32(__pyx_v_self->table, __pyx_t_3); goto __pyx_L3; } __pyx_L3:; /* "pandas/hashtable.pyx":267 * cdef kh_int32_t *table * * def __init__(self, size_hint=1): # <<<<<<<<<<<<<< * if size_hint is not None: * kh_resize_int32(self.table, size_hint) */ /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("pandas.hashtable.Int32HashTable.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/hashtable.pyx":271 * kh_resize_int32(self.table, size_hint) * * def __cinit__(self): # <<<<<<<<<<<<<< * self.table = kh_init_int32() * */ /* Python wrapper */ static int __pyx_pw_6pandas_9hashtable_14Int32HashTable_3__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_pw_6pandas_9hashtable_14Int32HashTable_3__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return -1;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__cinit__", 0))) return -1; __pyx_r = __pyx_pf_6pandas_9hashtable_14Int32HashTable_2__cinit__(((struct __pyx_obj_6pandas_9hashtable_Int32HashTable *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pandas_9hashtable_14Int32HashTable_2__cinit__(struct __pyx_obj_6pandas_9hashtable_Int32HashTable *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__cinit__", 0); /* "pandas/hashtable.pyx":272 * * def __cinit__(self): * self.table = kh_init_int32() # <<<<<<<<<<<<<< * * def __dealloc__(self): */ __pyx_v_self->table = kh_init_int32(); /* "pandas/hashtable.pyx":271 * kh_resize_int32(self.table, size_hint) * * def __cinit__(self): # <<<<<<<<<<<<<< * self.table = kh_init_int32() * */ /* function exit code */ __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/hashtable.pyx":274 * self.table = kh_init_int32() * * def __dealloc__(self): # <<<<<<<<<<<<<< * kh_destroy_int32(self.table) * */ /* Python wrapper */ static void __pyx_pw_6pandas_9hashtable_14Int32HashTable_5__dealloc__(PyObject *__pyx_v_self); /*proto*/ static void __pyx_pw_6pandas_9hashtable_14Int32HashTable_5__dealloc__(PyObject *__pyx_v_self) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0); __pyx_pf_6pandas_9hashtable_14Int32HashTable_4__dealloc__(((struct __pyx_obj_6pandas_9hashtable_Int32HashTable *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); } static void __pyx_pf_6pandas_9hashtable_14Int32HashTable_4__dealloc__(struct __pyx_obj_6pandas_9hashtable_Int32HashTable *__pyx_v_self) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__dealloc__", 0); /* "pandas/hashtable.pyx":275 * * def __dealloc__(self): * kh_destroy_int32(self.table) # <<<<<<<<<<<<<< * * cdef inline int check_type(self, object val): */ kh_destroy_int32(__pyx_v_self->table); /* "pandas/hashtable.pyx":274 * self.table = kh_init_int32() * * def __dealloc__(self): # <<<<<<<<<<<<<< * kh_destroy_int32(self.table) * */ /* function exit code */ __Pyx_RefNannyFinishContext(); } /* "pandas/hashtable.pyx":277 * kh_destroy_int32(self.table) * * cdef inline int check_type(self, object val): # <<<<<<<<<<<<<< * return util.is_string_object(val) * */ static CYTHON_INLINE int __pyx_f_6pandas_9hashtable_14Int32HashTable_check_type(CYTHON_UNUSED struct __pyx_obj_6pandas_9hashtable_Int32HashTable *__pyx_v_self, PyObject *__pyx_v_val) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("check_type", 0); /* "pandas/hashtable.pyx":278 * * cdef inline int check_type(self, object val): * return util.is_string_object(val) # <<<<<<<<<<<<<< * * cpdef get_item(self, int32_t val): */ __pyx_r = is_string_object(__pyx_v_val); goto __pyx_L0; /* "pandas/hashtable.pyx":277 * kh_destroy_int32(self.table) * * cdef inline int check_type(self, object val): # <<<<<<<<<<<<<< * return util.is_string_object(val) * */ /* function exit code */ __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/hashtable.pyx":280 * return util.is_string_object(val) * * cpdef get_item(self, int32_t val): # <<<<<<<<<<<<<< * cdef khiter_t k * k = kh_get_int32(self.table, val) */ static PyObject *__pyx_pw_6pandas_9hashtable_14Int32HashTable_7get_item(PyObject *__pyx_v_self, PyObject *__pyx_arg_val); /*proto*/ static PyObject *__pyx_f_6pandas_9hashtable_14Int32HashTable_get_item(struct __pyx_obj_6pandas_9hashtable_Int32HashTable *__pyx_v_self, __pyx_t_5numpy_int32_t __pyx_v_val, int __pyx_skip_dispatch) { khiter_t __pyx_v_k; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_t_4; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_item", 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_get_item); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 280; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_6pandas_9hashtable_14Int32HashTable_7get_item)) { __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyInt_From_npy_int32(__pyx_v_val); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 280; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 280; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_Call(__pyx_t_1, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 280; __pyx_clineno = __LINE__; goto __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/hashtable.pyx":282 * cpdef get_item(self, int32_t val): * cdef khiter_t k * k = kh_get_int32(self.table, val) # <<<<<<<<<<<<<< * if k != self.table.n_buckets: * return self.table.vals[k] */ __pyx_v_k = kh_get_int32(__pyx_v_self->table, __pyx_v_val); /* "pandas/hashtable.pyx":283 * cdef khiter_t k * k = kh_get_int32(self.table, val) * if k != self.table.n_buckets: # <<<<<<<<<<<<<< * return self.table.vals[k] * else: */ __pyx_t_4 = ((__pyx_v_k != __pyx_v_self->table->n_buckets) != 0); if (__pyx_t_4) { /* "pandas/hashtable.pyx":284 * k = kh_get_int32(self.table, val) * if k != self.table.n_buckets: * return self.table.vals[k] # <<<<<<<<<<<<<< * else: * raise KeyError(val) */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyInt_FromSize_t((__pyx_v_self->table->vals[__pyx_v_k])); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 284; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; } /*else*/ { /* "pandas/hashtable.pyx":286 * return self.table.vals[k] * else: * raise KeyError(val) # <<<<<<<<<<<<<< * * def get_iter_test(self, int32_t key, Py_ssize_t iterations): */ __pyx_t_1 = __Pyx_PyInt_From_npy_int32(__pyx_v_val); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 286; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 286; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyObject_Call(__pyx_builtin_KeyError, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 286; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 286; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } /* "pandas/hashtable.pyx":280 * return util.is_string_object(val) * * cpdef get_item(self, int32_t val): # <<<<<<<<<<<<<< * cdef khiter_t k * k = kh_get_int32(self.table, val) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("pandas.hashtable.Int32HashTable.get_item", __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_9hashtable_14Int32HashTable_7get_item(PyObject *__pyx_v_self, PyObject *__pyx_arg_val); /*proto*/ static PyObject *__pyx_pw_6pandas_9hashtable_14Int32HashTable_7get_item(PyObject *__pyx_v_self, PyObject *__pyx_arg_val) { __pyx_t_5numpy_int32_t __pyx_v_val; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("get_item (wrapper)", 0); assert(__pyx_arg_val); { __pyx_v_val = __Pyx_PyInt_As_npy_int32(__pyx_arg_val); if (unlikely((__pyx_v_val == (npy_int32)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 280; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; __Pyx_AddTraceback("pandas.hashtable.Int32HashTable.get_item", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pandas_9hashtable_14Int32HashTable_6get_item(((struct __pyx_obj_6pandas_9hashtable_Int32HashTable *)__pyx_v_self), ((__pyx_t_5numpy_int32_t)__pyx_v_val)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_9hashtable_14Int32HashTable_6get_item(struct __pyx_obj_6pandas_9hashtable_Int32HashTable *__pyx_v_self, __pyx_t_5numpy_int32_t __pyx_v_val) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_item", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = ((struct __pyx_vtabstruct_6pandas_9hashtable_Int32HashTable *)__pyx_v_self->__pyx_vtab)->get_item(__pyx_v_self, __pyx_v_val, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 280; __pyx_clineno = __LINE__; goto __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.hashtable.Int32HashTable.get_item", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/hashtable.pyx":288 * raise KeyError(val) * * def get_iter_test(self, int32_t key, Py_ssize_t iterations): # <<<<<<<<<<<<<< * cdef Py_ssize_t i, val=0 * for i in range(iterations): */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_9hashtable_14Int32HashTable_9get_iter_test(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_6pandas_9hashtable_14Int32HashTable_9get_iter_test(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { CYTHON_UNUSED __pyx_t_5numpy_int32_t __pyx_v_key; Py_ssize_t __pyx_v_iterations; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("get_iter_test (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_key,&__pyx_n_s_iterations,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_key)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_iterations)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("get_iter_test", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 288; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "get_iter_test") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 288; __pyx_clineno = __LINE__; goto __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_key = __Pyx_PyInt_As_npy_int32(values[0]); if (unlikely((__pyx_v_key == (npy_int32)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 288; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_iterations = __Pyx_PyIndex_AsSsize_t(values[1]); if (unlikely((__pyx_v_iterations == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 288; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("get_iter_test", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 288; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.hashtable.Int32HashTable.get_iter_test", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pandas_9hashtable_14Int32HashTable_8get_iter_test(((struct __pyx_obj_6pandas_9hashtable_Int32HashTable *)__pyx_v_self), __pyx_v_key, __pyx_v_iterations); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_9hashtable_14Int32HashTable_8get_iter_test(struct __pyx_obj_6pandas_9hashtable_Int32HashTable *__pyx_v_self, CYTHON_UNUSED __pyx_t_5numpy_int32_t __pyx_v_key, Py_ssize_t __pyx_v_iterations) { CYTHON_UNUSED Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_val; khint_t __pyx_v_k; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; Py_ssize_t __pyx_t_2; int __pyx_t_3; __Pyx_RefNannySetupContext("get_iter_test", 0); /* "pandas/hashtable.pyx":289 * * def get_iter_test(self, int32_t key, Py_ssize_t iterations): * cdef Py_ssize_t i, val=0 # <<<<<<<<<<<<<< * for i in range(iterations): * k = kh_get_int32(self.table, val) */ __pyx_v_val = 0; /* "pandas/hashtable.pyx":290 * def get_iter_test(self, int32_t key, Py_ssize_t iterations): * cdef Py_ssize_t i, val=0 * for i in range(iterations): # <<<<<<<<<<<<<< * k = kh_get_int32(self.table, val) * if k != self.table.n_buckets: */ __pyx_t_1 = __pyx_v_iterations; for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) { __pyx_v_i = __pyx_t_2; /* "pandas/hashtable.pyx":291 * cdef Py_ssize_t i, val=0 * for i in range(iterations): * k = kh_get_int32(self.table, val) # <<<<<<<<<<<<<< * if k != self.table.n_buckets: * val = self.table.vals[k] */ __pyx_v_k = kh_get_int32(__pyx_v_self->table, __pyx_v_val); /* "pandas/hashtable.pyx":292 * for i in range(iterations): * k = kh_get_int32(self.table, val) * if k != self.table.n_buckets: # <<<<<<<<<<<<<< * val = self.table.vals[k] * */ __pyx_t_3 = ((__pyx_v_k != __pyx_v_self->table->n_buckets) != 0); if (__pyx_t_3) { /* "pandas/hashtable.pyx":293 * k = kh_get_int32(self.table, val) * if k != self.table.n_buckets: * val = self.table.vals[k] # <<<<<<<<<<<<<< * * cpdef set_item(self, int32_t key, Py_ssize_t val): */ __pyx_v_val = (__pyx_v_self->table->vals[__pyx_v_k]); goto __pyx_L5; } __pyx_L5:; } /* "pandas/hashtable.pyx":288 * raise KeyError(val) * * def get_iter_test(self, int32_t key, Py_ssize_t iterations): # <<<<<<<<<<<<<< * cdef Py_ssize_t i, val=0 * for i in range(iterations): */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/hashtable.pyx":295 * val = self.table.vals[k] * * cpdef set_item(self, int32_t key, Py_ssize_t val): # <<<<<<<<<<<<<< * cdef: * khiter_t k */ static PyObject *__pyx_pw_6pandas_9hashtable_14Int32HashTable_11set_item(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_6pandas_9hashtable_14Int32HashTable_set_item(struct __pyx_obj_6pandas_9hashtable_Int32HashTable *__pyx_v_self, __pyx_t_5numpy_int32_t __pyx_v_key, Py_ssize_t __pyx_v_val, int __pyx_skip_dispatch) { khiter_t __pyx_v_k; int __pyx_v_ret; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; int __pyx_t_5; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("set_item", 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_set_item); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 295; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_6pandas_9hashtable_14Int32HashTable_11set_item)) { __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyInt_From_npy_int32(__pyx_v_key); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 295; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyInt_FromSsize_t(__pyx_v_val); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 295; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 295; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_2 = 0; __pyx_t_3 = 0; __pyx_t_3 = PyObject_Call(__pyx_t_1, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 295; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_r = __pyx_t_3; __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } /* "pandas/hashtable.pyx":298 * cdef: * khiter_t k * int ret = 0 # <<<<<<<<<<<<<< * * k = kh_put_int32(self.table, key, &ret) */ __pyx_v_ret = 0; /* "pandas/hashtable.pyx":300 * int ret = 0 * * k = kh_put_int32(self.table, key, &ret) # <<<<<<<<<<<<<< * self.table.keys[k] = key * if kh_exist_int32(self.table, k): */ __pyx_v_k = kh_put_int32(__pyx_v_self->table, __pyx_v_key, (&__pyx_v_ret)); /* "pandas/hashtable.pyx":301 * * k = kh_put_int32(self.table, key, &ret) * self.table.keys[k] = key # <<<<<<<<<<<<<< * if kh_exist_int32(self.table, k): * self.table.vals[k] = val */ (__pyx_v_self->table->keys[__pyx_v_k]) = __pyx_v_key; /* "pandas/hashtable.pyx":302 * k = kh_put_int32(self.table, key, &ret) * self.table.keys[k] = key * if kh_exist_int32(self.table, k): # <<<<<<<<<<<<<< * self.table.vals[k] = val * else: */ __pyx_t_5 = (kh_exist_int32(__pyx_v_self->table, __pyx_v_k) != 0); if (__pyx_t_5) { /* "pandas/hashtable.pyx":303 * self.table.keys[k] = key * if kh_exist_int32(self.table, k): * self.table.vals[k] = val # <<<<<<<<<<<<<< * else: * raise KeyError(key) */ (__pyx_v_self->table->vals[__pyx_v_k]) = __pyx_v_val; goto __pyx_L3; } /*else*/ { /* "pandas/hashtable.pyx":305 * self.table.vals[k] = val * else: * raise KeyError(key) # <<<<<<<<<<<<<< * * def map_locations(self, ndarray[int32_t] values): */ __pyx_t_1 = __Pyx_PyInt_From_npy_int32(__pyx_v_key); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 305; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 305; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyObject_Call(__pyx_builtin_KeyError, __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 305; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 305; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_L3:; /* "pandas/hashtable.pyx":295 * val = self.table.vals[k] * * cpdef set_item(self, int32_t key, Py_ssize_t val): # <<<<<<<<<<<<<< * cdef: * khiter_t k */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("pandas.hashtable.Int32HashTable.set_item", __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_9hashtable_14Int32HashTable_11set_item(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_6pandas_9hashtable_14Int32HashTable_11set_item(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { __pyx_t_5numpy_int32_t __pyx_v_key; Py_ssize_t __pyx_v_val; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("set_item (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_key,&__pyx_n_s_val,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_key)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_val)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("set_item", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 295; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "set_item") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 295; __pyx_clineno = __LINE__; goto __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_key = __Pyx_PyInt_As_npy_int32(values[0]); if (unlikely((__pyx_v_key == (npy_int32)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 295; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_val = __Pyx_PyIndex_AsSsize_t(values[1]); if (unlikely((__pyx_v_val == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 295; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("set_item", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 295; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.hashtable.Int32HashTable.set_item", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pandas_9hashtable_14Int32HashTable_10set_item(((struct __pyx_obj_6pandas_9hashtable_Int32HashTable *)__pyx_v_self), __pyx_v_key, __pyx_v_val); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_9hashtable_14Int32HashTable_10set_item(struct __pyx_obj_6pandas_9hashtable_Int32HashTable *__pyx_v_self, __pyx_t_5numpy_int32_t __pyx_v_key, Py_ssize_t __pyx_v_val) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("set_item", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = ((struct __pyx_vtabstruct_6pandas_9hashtable_Int32HashTable *)__pyx_v_self->__pyx_vtab)->set_item(__pyx_v_self, __pyx_v_key, __pyx_v_val, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 295; __pyx_clineno = __LINE__; goto __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.hashtable.Int32HashTable.set_item", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/hashtable.pyx":307 * raise KeyError(key) * * def map_locations(self, ndarray[int32_t] values): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = len(values) */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_9hashtable_14Int32HashTable_13map_locations(PyObject *__pyx_v_self, PyObject *__pyx_v_values); /*proto*/ static PyObject *__pyx_pw_6pandas_9hashtable_14Int32HashTable_13map_locations(PyObject *__pyx_v_self, PyObject *__pyx_v_values) { CYTHON_UNUSED int __pyx_lineno = 0; CYTHON_UNUSED const char *__pyx_filename = NULL; CYTHON_UNUSED int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("map_locations (wrapper)", 0); if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 307; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_9hashtable_14Int32HashTable_12map_locations(((struct __pyx_obj_6pandas_9hashtable_Int32HashTable *)__pyx_v_self), ((PyArrayObject *)__pyx_v_values)); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_9hashtable_14Int32HashTable_12map_locations(struct __pyx_obj_6pandas_9hashtable_Int32HashTable *__pyx_v_self, PyArrayObject *__pyx_v_values) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_n; int __pyx_v_ret; __pyx_t_5numpy_int32_t __pyx_v_val; khiter_t __pyx_v_k; __Pyx_LocalBuf_ND __pyx_pybuffernd_values; __Pyx_Buffer __pyx_pybuffer_values; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; Py_ssize_t __pyx_t_2; Py_ssize_t __pyx_t_3; int __pyx_t_4; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("map_locations", 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_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 307; __pyx_clineno = __LINE__; goto __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/hashtable.pyx":309 * def map_locations(self, ndarray[int32_t] values): * cdef: * Py_ssize_t i, n = len(values) # <<<<<<<<<<<<<< * int ret = 0 * int32_t val */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 309; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/hashtable.pyx":310 * cdef: * Py_ssize_t i, n = len(values) * int ret = 0 # <<<<<<<<<<<<<< * int32_t val * khiter_t k */ __pyx_v_ret = 0; /* "pandas/hashtable.pyx":314 * khiter_t k * * for i in range(n): # <<<<<<<<<<<<<< * val = values[i] * k = kh_put_int32(self.table, val, &ret) */ __pyx_t_1 = __pyx_v_n; for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) { __pyx_v_i = __pyx_t_2; /* "pandas/hashtable.pyx":315 * * for i in range(n): * val = values[i] # <<<<<<<<<<<<<< * k = kh_put_int32(self.table, val, &ret) * self.table.vals[k] = i */ __pyx_t_3 = __pyx_v_i; __pyx_t_4 = -1; if (__pyx_t_3 < 0) { __pyx_t_3 += __pyx_pybuffernd_values.diminfo[0].shape; if (unlikely(__pyx_t_3 < 0)) __pyx_t_4 = 0; } else if (unlikely(__pyx_t_3 >= __pyx_pybuffernd_values.diminfo[0].shape)) __pyx_t_4 = 0; if (unlikely(__pyx_t_4 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_4); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 315; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_val = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_3, __pyx_pybuffernd_values.diminfo[0].strides)); /* "pandas/hashtable.pyx":316 * for i in range(n): * val = values[i] * k = kh_put_int32(self.table, val, &ret) # <<<<<<<<<<<<<< * self.table.vals[k] = i * */ __pyx_v_k = kh_put_int32(__pyx_v_self->table, __pyx_v_val, (&__pyx_v_ret)); /* "pandas/hashtable.pyx":317 * val = values[i] * k = kh_put_int32(self.table, val, &ret) * self.table.vals[k] = i # <<<<<<<<<<<<<< * * def lookup(self, ndarray[int32_t] values): */ (__pyx_v_self->table->vals[__pyx_v_k]) = __pyx_v_i; } /* "pandas/hashtable.pyx":307 * raise KeyError(key) * * def map_locations(self, ndarray[int32_t] values): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = len(values) */ /* 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_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.hashtable.Int32HashTable.map_locations", __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/hashtable.pyx":319 * self.table.vals[k] = i * * def lookup(self, ndarray[int32_t] values): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = len(values) */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_9hashtable_14Int32HashTable_15lookup(PyObject *__pyx_v_self, PyObject *__pyx_v_values); /*proto*/ static PyObject *__pyx_pw_6pandas_9hashtable_14Int32HashTable_15lookup(PyObject *__pyx_v_self, PyObject *__pyx_v_values) { CYTHON_UNUSED int __pyx_lineno = 0; CYTHON_UNUSED const char *__pyx_filename = NULL; CYTHON_UNUSED int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("lookup (wrapper)", 0); if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 319; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_9hashtable_14Int32HashTable_14lookup(((struct __pyx_obj_6pandas_9hashtable_Int32HashTable *)__pyx_v_self), ((PyArrayObject *)__pyx_v_values)); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_9hashtable_14Int32HashTable_14lookup(struct __pyx_obj_6pandas_9hashtable_Int32HashTable *__pyx_v_self, PyArrayObject *__pyx_v_values) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_n; CYTHON_UNUSED int __pyx_v_ret; __pyx_t_5numpy_int32_t __pyx_v_val; khiter_t __pyx_v_k; PyArrayObject *__pyx_v_locs = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_locs; __Pyx_Buffer __pyx_pybuffer_locs; __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; Py_ssize_t __pyx_t_8; Py_ssize_t __pyx_t_9; int __pyx_t_10; int __pyx_t_11; Py_ssize_t __pyx_t_12; Py_ssize_t __pyx_t_13; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __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_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_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 319; __pyx_clineno = __LINE__; goto __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/hashtable.pyx":321 * def lookup(self, ndarray[int32_t] values): * cdef: * Py_ssize_t i, n = len(values) # <<<<<<<<<<<<<< * int ret = 0 * int32_t val */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 321; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/hashtable.pyx":322 * cdef: * Py_ssize_t i, n = len(values) * int ret = 0 # <<<<<<<<<<<<<< * int32_t val * khiter_t k */ __pyx_v_ret = 0; /* "pandas/hashtable.pyx":325 * int32_t val * khiter_t k * ndarray[int32_t] locs = np.empty(n, dtype=np.int64) # <<<<<<<<<<<<<< * * for i in range(n): */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 325; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 325; __pyx_clineno = __LINE__; goto __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_n); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 325; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 325; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 325; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 325; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_int64); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 325; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 325; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyObject_Call(__pyx_t_3, __pyx_t_4, __pyx_t_2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 325; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 325; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_7 = ((PyArrayObject *)__pyx_t_6); { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_locs.rcbuffer->pybuffer, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { __pyx_v_locs = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_locs.rcbuffer->pybuffer.buf = NULL; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 325; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } else {__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]; } } __pyx_t_7 = 0; __pyx_v_locs = ((PyArrayObject *)__pyx_t_6); __pyx_t_6 = 0; /* "pandas/hashtable.pyx":327 * ndarray[int32_t] locs = np.empty(n, dtype=np.int64) * * for i in range(n): # <<<<<<<<<<<<<< * val = values[i] * k = kh_get_int32(self.table, val) */ __pyx_t_1 = __pyx_v_n; for (__pyx_t_8 = 0; __pyx_t_8 < __pyx_t_1; __pyx_t_8+=1) { __pyx_v_i = __pyx_t_8; /* "pandas/hashtable.pyx":328 * * for i in range(n): * val = values[i] # <<<<<<<<<<<<<< * k = kh_get_int32(self.table, val) * if k != self.table.n_buckets: */ __pyx_t_9 = __pyx_v_i; __pyx_t_10 = -1; if (__pyx_t_9 < 0) { __pyx_t_9 += __pyx_pybuffernd_values.diminfo[0].shape; if (unlikely(__pyx_t_9 < 0)) __pyx_t_10 = 0; } else if (unlikely(__pyx_t_9 >= __pyx_pybuffernd_values.diminfo[0].shape)) __pyx_t_10 = 0; if (unlikely(__pyx_t_10 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_10); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 328; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_val = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_9, __pyx_pybuffernd_values.diminfo[0].strides)); /* "pandas/hashtable.pyx":329 * for i in range(n): * val = values[i] * k = kh_get_int32(self.table, val) # <<<<<<<<<<<<<< * if k != self.table.n_buckets: * locs[i] = self.table.vals[k] */ __pyx_v_k = kh_get_int32(__pyx_v_self->table, __pyx_v_val); /* "pandas/hashtable.pyx":330 * val = values[i] * k = kh_get_int32(self.table, val) * if k != self.table.n_buckets: # <<<<<<<<<<<<<< * locs[i] = self.table.vals[k] * else: */ __pyx_t_11 = ((__pyx_v_k != __pyx_v_self->table->n_buckets) != 0); if (__pyx_t_11) { /* "pandas/hashtable.pyx":331 * k = kh_get_int32(self.table, val) * if k != self.table.n_buckets: * locs[i] = self.table.vals[k] # <<<<<<<<<<<<<< * else: * locs[i] = -1 */ __pyx_t_12 = __pyx_v_i; __pyx_t_10 = -1; if (__pyx_t_12 < 0) { __pyx_t_12 += __pyx_pybuffernd_locs.diminfo[0].shape; if (unlikely(__pyx_t_12 < 0)) __pyx_t_10 = 0; } else if (unlikely(__pyx_t_12 >= __pyx_pybuffernd_locs.diminfo[0].shape)) __pyx_t_10 = 0; if (unlikely(__pyx_t_10 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_10); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 331; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_locs.rcbuffer->pybuffer.buf, __pyx_t_12, __pyx_pybuffernd_locs.diminfo[0].strides) = (__pyx_v_self->table->vals[__pyx_v_k]); goto __pyx_L5; } /*else*/ { /* "pandas/hashtable.pyx":333 * locs[i] = self.table.vals[k] * else: * locs[i] = -1 # <<<<<<<<<<<<<< * * return locs */ __pyx_t_13 = __pyx_v_i; __pyx_t_10 = -1; if (__pyx_t_13 < 0) { __pyx_t_13 += __pyx_pybuffernd_locs.diminfo[0].shape; if (unlikely(__pyx_t_13 < 0)) __pyx_t_10 = 0; } else if (unlikely(__pyx_t_13 >= __pyx_pybuffernd_locs.diminfo[0].shape)) __pyx_t_10 = 0; if (unlikely(__pyx_t_10 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_10); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 333; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_locs.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_locs.diminfo[0].strides) = -1; } __pyx_L5:; } /* "pandas/hashtable.pyx":335 * locs[i] = -1 * * return locs # <<<<<<<<<<<<<< * * def factorize(self, ndarray[int32_t] values): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_locs)); __pyx_r = ((PyObject *)__pyx_v_locs); goto __pyx_L0; /* "pandas/hashtable.pyx":319 * self.table.vals[k] = i * * def lookup(self, ndarray[int32_t] values): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = len(values) */ /* 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_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_locs.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.hashtable.Int32HashTable.lookup", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_locs.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_locs); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/hashtable.pyx":337 * return locs * * def factorize(self, ndarray[int32_t] values): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = len(values) */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_9hashtable_14Int32HashTable_17factorize(PyObject *__pyx_v_self, PyObject *__pyx_v_values); /*proto*/ static PyObject *__pyx_pw_6pandas_9hashtable_14Int32HashTable_17factorize(PyObject *__pyx_v_self, PyObject *__pyx_v_values) { CYTHON_UNUSED int __pyx_lineno = 0; CYTHON_UNUSED const char *__pyx_filename = NULL; CYTHON_UNUSED int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("factorize (wrapper)", 0); if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 337; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_9hashtable_14Int32HashTable_16factorize(((struct __pyx_obj_6pandas_9hashtable_Int32HashTable *)__pyx_v_self), ((PyArrayObject *)__pyx_v_values)); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_9hashtable_14Int32HashTable_16factorize(struct __pyx_obj_6pandas_9hashtable_Int32HashTable *__pyx_v_self, PyArrayObject *__pyx_v_values) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_n; PyArrayObject *__pyx_v_labels = 0; PyObject *__pyx_v_reverse = 0; Py_ssize_t __pyx_v_idx; Py_ssize_t __pyx_v_count; int __pyx_v_ret; __pyx_t_5numpy_int32_t __pyx_v_val; khiter_t __pyx_v_k; __Pyx_LocalBuf_ND __pyx_pybuffernd_labels; __Pyx_Buffer __pyx_pybuffer_labels; __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; Py_ssize_t __pyx_t_8; Py_ssize_t __pyx_t_9; int __pyx_t_10; int __pyx_t_11; Py_ssize_t __pyx_t_12; Py_ssize_t __pyx_t_13; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("factorize", 0); __pyx_pybuffer_labels.pybuffer.buf = NULL; __pyx_pybuffer_labels.refcount = 0; __pyx_pybuffernd_labels.data = NULL; __pyx_pybuffernd_labels.rcbuffer = &__pyx_pybuffer_labels; __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_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 337; __pyx_clineno = __LINE__; goto __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/hashtable.pyx":339 * def factorize(self, ndarray[int32_t] values): * cdef: * Py_ssize_t i, n = len(values) # <<<<<<<<<<<<<< * ndarray[int64_t] labels = np.empty(n, dtype=np.int64) * dict reverse = {} */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 339; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/hashtable.pyx":340 * cdef: * Py_ssize_t i, n = len(values) * ndarray[int64_t] labels = np.empty(n, dtype=np.int64) # <<<<<<<<<<<<<< * dict reverse = {} * Py_ssize_t idx, count = 0 */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 340; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 340; __pyx_clineno = __LINE__; goto __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_n); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 340; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 340; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 340; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 340; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_int64); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 340; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 340; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyObject_Call(__pyx_t_3, __pyx_t_4, __pyx_t_2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 340; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 340; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_7 = ((PyArrayObject *)__pyx_t_6); { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_labels.rcbuffer->pybuffer, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { __pyx_v_labels = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_labels.rcbuffer->pybuffer.buf = NULL; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 340; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } else {__pyx_pybuffernd_labels.diminfo[0].strides = __pyx_pybuffernd_labels.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_labels.diminfo[0].shape = __pyx_pybuffernd_labels.rcbuffer->pybuffer.shape[0]; } } __pyx_t_7 = 0; __pyx_v_labels = ((PyArrayObject *)__pyx_t_6); __pyx_t_6 = 0; /* "pandas/hashtable.pyx":341 * Py_ssize_t i, n = len(values) * ndarray[int64_t] labels = np.empty(n, dtype=np.int64) * dict reverse = {} # <<<<<<<<<<<<<< * Py_ssize_t idx, count = 0 * int ret = 0 */ __pyx_t_6 = PyDict_New(); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 341; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_v_reverse = ((PyObject*)__pyx_t_6); __pyx_t_6 = 0; /* "pandas/hashtable.pyx":342 * ndarray[int64_t] labels = np.empty(n, dtype=np.int64) * dict reverse = {} * Py_ssize_t idx, count = 0 # <<<<<<<<<<<<<< * int ret = 0 * int32_t val */ __pyx_v_count = 0; /* "pandas/hashtable.pyx":343 * dict reverse = {} * Py_ssize_t idx, count = 0 * int ret = 0 # <<<<<<<<<<<<<< * int32_t val * khiter_t k */ __pyx_v_ret = 0; /* "pandas/hashtable.pyx":347 * khiter_t k * * for i in range(n): # <<<<<<<<<<<<<< * val = values[i] * k = kh_get_int32(self.table, val) */ __pyx_t_1 = __pyx_v_n; for (__pyx_t_8 = 0; __pyx_t_8 < __pyx_t_1; __pyx_t_8+=1) { __pyx_v_i = __pyx_t_8; /* "pandas/hashtable.pyx":348 * * for i in range(n): * val = values[i] # <<<<<<<<<<<<<< * k = kh_get_int32(self.table, val) * if k != self.table.n_buckets: */ __pyx_t_9 = __pyx_v_i; __pyx_t_10 = -1; if (__pyx_t_9 < 0) { __pyx_t_9 += __pyx_pybuffernd_values.diminfo[0].shape; if (unlikely(__pyx_t_9 < 0)) __pyx_t_10 = 0; } else if (unlikely(__pyx_t_9 >= __pyx_pybuffernd_values.diminfo[0].shape)) __pyx_t_10 = 0; if (unlikely(__pyx_t_10 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_10); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 348; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_val = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_9, __pyx_pybuffernd_values.diminfo[0].strides)); /* "pandas/hashtable.pyx":349 * for i in range(n): * val = values[i] * k = kh_get_int32(self.table, val) # <<<<<<<<<<<<<< * if k != self.table.n_buckets: * idx = self.table.vals[k] */ __pyx_v_k = kh_get_int32(__pyx_v_self->table, __pyx_v_val); /* "pandas/hashtable.pyx":350 * val = values[i] * k = kh_get_int32(self.table, val) * if k != self.table.n_buckets: # <<<<<<<<<<<<<< * idx = self.table.vals[k] * labels[i] = idx */ __pyx_t_11 = ((__pyx_v_k != __pyx_v_self->table->n_buckets) != 0); if (__pyx_t_11) { /* "pandas/hashtable.pyx":351 * k = kh_get_int32(self.table, val) * if k != self.table.n_buckets: * idx = self.table.vals[k] # <<<<<<<<<<<<<< * labels[i] = idx * else: */ __pyx_v_idx = (__pyx_v_self->table->vals[__pyx_v_k]); /* "pandas/hashtable.pyx":352 * if k != self.table.n_buckets: * idx = self.table.vals[k] * labels[i] = idx # <<<<<<<<<<<<<< * else: * k = kh_put_int32(self.table, val, &ret) */ __pyx_t_12 = __pyx_v_i; __pyx_t_10 = -1; if (__pyx_t_12 < 0) { __pyx_t_12 += __pyx_pybuffernd_labels.diminfo[0].shape; if (unlikely(__pyx_t_12 < 0)) __pyx_t_10 = 0; } else if (unlikely(__pyx_t_12 >= __pyx_pybuffernd_labels.diminfo[0].shape)) __pyx_t_10 = 0; if (unlikely(__pyx_t_10 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_10); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 352; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_labels.rcbuffer->pybuffer.buf, __pyx_t_12, __pyx_pybuffernd_labels.diminfo[0].strides) = __pyx_v_idx; goto __pyx_L5; } /*else*/ { /* "pandas/hashtable.pyx":354 * labels[i] = idx * else: * k = kh_put_int32(self.table, val, &ret) # <<<<<<<<<<<<<< * self.table.vals[k] = count * reverse[count] = val */ __pyx_v_k = kh_put_int32(__pyx_v_self->table, __pyx_v_val, (&__pyx_v_ret)); /* "pandas/hashtable.pyx":355 * else: * k = kh_put_int32(self.table, val, &ret) * self.table.vals[k] = count # <<<<<<<<<<<<<< * reverse[count] = val * labels[i] = count */ (__pyx_v_self->table->vals[__pyx_v_k]) = __pyx_v_count; /* "pandas/hashtable.pyx":356 * k = kh_put_int32(self.table, val, &ret) * self.table.vals[k] = count * reverse[count] = val # <<<<<<<<<<<<<< * labels[i] = count * count += 1 */ __pyx_t_6 = __Pyx_PyInt_From_npy_int32(__pyx_v_val); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 356; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_count); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 356; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (unlikely(PyDict_SetItem(__pyx_v_reverse, __pyx_t_2, __pyx_t_6) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 356; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; /* "pandas/hashtable.pyx":357 * self.table.vals[k] = count * reverse[count] = val * labels[i] = count # <<<<<<<<<<<<<< * count += 1 * */ __pyx_t_13 = __pyx_v_i; __pyx_t_10 = -1; if (__pyx_t_13 < 0) { __pyx_t_13 += __pyx_pybuffernd_labels.diminfo[0].shape; if (unlikely(__pyx_t_13 < 0)) __pyx_t_10 = 0; } else if (unlikely(__pyx_t_13 >= __pyx_pybuffernd_labels.diminfo[0].shape)) __pyx_t_10 = 0; if (unlikely(__pyx_t_10 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_10); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 357; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_labels.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_labels.diminfo[0].strides) = __pyx_v_count; /* "pandas/hashtable.pyx":358 * reverse[count] = val * labels[i] = count * count += 1 # <<<<<<<<<<<<<< * * # return None */ __pyx_v_count = (__pyx_v_count + 1); } __pyx_L5:; } /* "pandas/hashtable.pyx":361 * * # return None * return reverse, labels # <<<<<<<<<<<<<< * * cdef class Int64HashTable: #(HashTable): */ __Pyx_XDECREF(__pyx_r); __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 361; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(__pyx_v_reverse); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_reverse); __Pyx_GIVEREF(__pyx_v_reverse); __Pyx_INCREF(((PyObject *)__pyx_v_labels)); PyTuple_SET_ITEM(__pyx_t_6, 1, ((PyObject *)__pyx_v_labels)); __Pyx_GIVEREF(((PyObject *)__pyx_v_labels)); __pyx_r = __pyx_t_6; __pyx_t_6 = 0; goto __pyx_L0; /* "pandas/hashtable.pyx":337 * return locs * * def factorize(self, ndarray[int32_t] values): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = len(values) */ /* 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_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_labels.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.hashtable.Int32HashTable.factorize", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_labels.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_labels); __Pyx_XDECREF(__pyx_v_reverse); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/hashtable.pyx":366 * # cdef kh_int64_t *table * * def __cinit__(self, size_hint=1): # <<<<<<<<<<<<<< * self.table = kh_init_int64() * if size_hint is not None: */ /* Python wrapper */ static int __pyx_pw_6pandas_9hashtable_14Int64HashTable_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_pw_6pandas_9hashtable_14Int64HashTable_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_size_hint = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_size_hint,0}; PyObject* values[1] = {0}; values[0] = ((PyObject *)__pyx_int_1); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_size_hint); if (value) { values[0] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 366; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_size_hint = values[0]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 366; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.hashtable.Int64HashTable.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return -1; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pandas_9hashtable_14Int64HashTable___cinit__(((struct __pyx_obj_6pandas_9hashtable_Int64HashTable *)__pyx_v_self), __pyx_v_size_hint); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pandas_9hashtable_14Int64HashTable___cinit__(struct __pyx_obj_6pandas_9hashtable_Int64HashTable *__pyx_v_self, PyObject *__pyx_v_size_hint) { int __pyx_r; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; khint_t __pyx_t_3; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__cinit__", 0); /* "pandas/hashtable.pyx":367 * * def __cinit__(self, size_hint=1): * self.table = kh_init_int64() # <<<<<<<<<<<<<< * if size_hint is not None: * kh_resize_int64(self.table, size_hint) */ __pyx_v_self->table = kh_init_int64(); /* "pandas/hashtable.pyx":368 * def __cinit__(self, size_hint=1): * self.table = kh_init_int64() * if size_hint is not None: # <<<<<<<<<<<<<< * kh_resize_int64(self.table, size_hint) * */ __pyx_t_1 = (__pyx_v_size_hint != Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { /* "pandas/hashtable.pyx":369 * self.table = kh_init_int64() * if size_hint is not None: * kh_resize_int64(self.table, size_hint) # <<<<<<<<<<<<<< * * def __dealloc__(self): */ __pyx_t_3 = __Pyx_PyInt_As_npy_uint32(__pyx_v_size_hint); if (unlikely((__pyx_t_3 == (khint_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 369; __pyx_clineno = __LINE__; goto __pyx_L1_error;} kh_resize_int64(__pyx_v_self->table, __pyx_t_3); goto __pyx_L3; } __pyx_L3:; /* "pandas/hashtable.pyx":366 * # cdef kh_int64_t *table * * def __cinit__(self, size_hint=1): # <<<<<<<<<<<<<< * self.table = kh_init_int64() * if size_hint is not None: */ /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("pandas.hashtable.Int64HashTable.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/hashtable.pyx":371 * kh_resize_int64(self.table, size_hint) * * def __dealloc__(self): # <<<<<<<<<<<<<< * kh_destroy_int64(self.table) * */ /* Python wrapper */ static void __pyx_pw_6pandas_9hashtable_14Int64HashTable_3__dealloc__(PyObject *__pyx_v_self); /*proto*/ static void __pyx_pw_6pandas_9hashtable_14Int64HashTable_3__dealloc__(PyObject *__pyx_v_self) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0); __pyx_pf_6pandas_9hashtable_14Int64HashTable_2__dealloc__(((struct __pyx_obj_6pandas_9hashtable_Int64HashTable *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); } static void __pyx_pf_6pandas_9hashtable_14Int64HashTable_2__dealloc__(struct __pyx_obj_6pandas_9hashtable_Int64HashTable *__pyx_v_self) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__dealloc__", 0); /* "pandas/hashtable.pyx":372 * * def __dealloc__(self): * kh_destroy_int64(self.table) # <<<<<<<<<<<<<< * * def __contains__(self, object key): */ kh_destroy_int64(__pyx_v_self->table); /* "pandas/hashtable.pyx":371 * kh_resize_int64(self.table, size_hint) * * def __dealloc__(self): # <<<<<<<<<<<<<< * kh_destroy_int64(self.table) * */ /* function exit code */ __Pyx_RefNannyFinishContext(); } /* "pandas/hashtable.pyx":374 * kh_destroy_int64(self.table) * * def __contains__(self, object key): # <<<<<<<<<<<<<< * cdef khiter_t k * k = kh_get_int64(self.table, key) */ /* Python wrapper */ static int __pyx_pw_6pandas_9hashtable_14Int64HashTable_5__contains__(PyObject *__pyx_v_self, PyObject *__pyx_v_key); /*proto*/ static int __pyx_pw_6pandas_9hashtable_14Int64HashTable_5__contains__(PyObject *__pyx_v_self, PyObject *__pyx_v_key) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__contains__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_9hashtable_14Int64HashTable_4__contains__(((struct __pyx_obj_6pandas_9hashtable_Int64HashTable *)__pyx_v_self), ((PyObject *)__pyx_v_key)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pandas_9hashtable_14Int64HashTable_4__contains__(struct __pyx_obj_6pandas_9hashtable_Int64HashTable *__pyx_v_self, PyObject *__pyx_v_key) { khiter_t __pyx_v_k; int __pyx_r; __Pyx_RefNannyDeclarations __pyx_t_5numpy_int64_t __pyx_t_1; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__contains__", 0); /* "pandas/hashtable.pyx":376 * def __contains__(self, object key): * cdef khiter_t k * k = kh_get_int64(self.table, key) # <<<<<<<<<<<<<< * return k != self.table.n_buckets * */ __pyx_t_1 = __Pyx_PyInt_As_npy_int64(__pyx_v_key); if (unlikely((__pyx_t_1 == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 376; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_k = kh_get_int64(__pyx_v_self->table, __pyx_t_1); /* "pandas/hashtable.pyx":377 * cdef khiter_t k * k = kh_get_int64(self.table, key) * return k != self.table.n_buckets # <<<<<<<<<<<<<< * * def __len__(self): */ __pyx_r = (__pyx_v_k != __pyx_v_self->table->n_buckets); goto __pyx_L0; /* "pandas/hashtable.pyx":374 * kh_destroy_int64(self.table) * * def __contains__(self, object key): # <<<<<<<<<<<<<< * cdef khiter_t k * k = kh_get_int64(self.table, key) */ /* function exit code */ __pyx_L1_error:; __Pyx_AddTraceback("pandas.hashtable.Int64HashTable.__contains__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/hashtable.pyx":379 * return k != self.table.n_buckets * * def __len__(self): # <<<<<<<<<<<<<< * return self.table.size * */ /* Python wrapper */ static Py_ssize_t __pyx_pw_6pandas_9hashtable_14Int64HashTable_7__len__(PyObject *__pyx_v_self); /*proto*/ static Py_ssize_t __pyx_pw_6pandas_9hashtable_14Int64HashTable_7__len__(PyObject *__pyx_v_self) { Py_ssize_t __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__len__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_9hashtable_14Int64HashTable_6__len__(((struct __pyx_obj_6pandas_9hashtable_Int64HashTable *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static Py_ssize_t __pyx_pf_6pandas_9hashtable_14Int64HashTable_6__len__(struct __pyx_obj_6pandas_9hashtable_Int64HashTable *__pyx_v_self) { Py_ssize_t __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__len__", 0); /* "pandas/hashtable.pyx":380 * * def __len__(self): * return self.table.size # <<<<<<<<<<<<<< * * cpdef get_item(self, int64_t val): */ __pyx_r = __pyx_v_self->table->size; goto __pyx_L0; /* "pandas/hashtable.pyx":379 * return k != self.table.n_buckets * * def __len__(self): # <<<<<<<<<<<<<< * return self.table.size * */ /* function exit code */ __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/hashtable.pyx":382 * return self.table.size * * cpdef get_item(self, int64_t val): # <<<<<<<<<<<<<< * cdef khiter_t k * k = kh_get_int64(self.table, val) */ static PyObject *__pyx_pw_6pandas_9hashtable_14Int64HashTable_9get_item(PyObject *__pyx_v_self, PyObject *__pyx_arg_val); /*proto*/ static PyObject *__pyx_f_6pandas_9hashtable_14Int64HashTable_get_item(struct __pyx_obj_6pandas_9hashtable_Int64HashTable *__pyx_v_self, __pyx_t_5numpy_int64_t __pyx_v_val, int __pyx_skip_dispatch) { khiter_t __pyx_v_k; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_t_4; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_item", 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_get_item); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 382; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_6pandas_9hashtable_14Int64HashTable_9get_item)) { __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyInt_From_npy_int64(__pyx_v_val); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 382; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 382; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_Call(__pyx_t_1, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 382; __pyx_clineno = __LINE__; goto __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/hashtable.pyx":384 * cpdef get_item(self, int64_t val): * cdef khiter_t k * k = kh_get_int64(self.table, val) # <<<<<<<<<<<<<< * if k != self.table.n_buckets: * return self.table.vals[k] */ __pyx_v_k = kh_get_int64(__pyx_v_self->table, __pyx_v_val); /* "pandas/hashtable.pyx":385 * cdef khiter_t k * k = kh_get_int64(self.table, val) * if k != self.table.n_buckets: # <<<<<<<<<<<<<< * return self.table.vals[k] * else: */ __pyx_t_4 = ((__pyx_v_k != __pyx_v_self->table->n_buckets) != 0); if (__pyx_t_4) { /* "pandas/hashtable.pyx":386 * k = kh_get_int64(self.table, val) * if k != self.table.n_buckets: * return self.table.vals[k] # <<<<<<<<<<<<<< * else: * raise KeyError(val) */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyInt_FromSize_t((__pyx_v_self->table->vals[__pyx_v_k])); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 386; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; } /*else*/ { /* "pandas/hashtable.pyx":388 * return self.table.vals[k] * else: * raise KeyError(val) # <<<<<<<<<<<<<< * * def get_iter_test(self, int64_t key, Py_ssize_t iterations): */ __pyx_t_1 = __Pyx_PyInt_From_npy_int64(__pyx_v_val); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 388; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 388; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyObject_Call(__pyx_builtin_KeyError, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 388; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 388; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } /* "pandas/hashtable.pyx":382 * return self.table.size * * cpdef get_item(self, int64_t val): # <<<<<<<<<<<<<< * cdef khiter_t k * k = kh_get_int64(self.table, val) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("pandas.hashtable.Int64HashTable.get_item", __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_9hashtable_14Int64HashTable_9get_item(PyObject *__pyx_v_self, PyObject *__pyx_arg_val); /*proto*/ static PyObject *__pyx_pw_6pandas_9hashtable_14Int64HashTable_9get_item(PyObject *__pyx_v_self, PyObject *__pyx_arg_val) { __pyx_t_5numpy_int64_t __pyx_v_val; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("get_item (wrapper)", 0); assert(__pyx_arg_val); { __pyx_v_val = __Pyx_PyInt_As_npy_int64(__pyx_arg_val); if (unlikely((__pyx_v_val == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 382; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; __Pyx_AddTraceback("pandas.hashtable.Int64HashTable.get_item", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pandas_9hashtable_14Int64HashTable_8get_item(((struct __pyx_obj_6pandas_9hashtable_Int64HashTable *)__pyx_v_self), ((__pyx_t_5numpy_int64_t)__pyx_v_val)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_9hashtable_14Int64HashTable_8get_item(struct __pyx_obj_6pandas_9hashtable_Int64HashTable *__pyx_v_self, __pyx_t_5numpy_int64_t __pyx_v_val) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_item", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = ((struct __pyx_vtabstruct_6pandas_9hashtable_Int64HashTable *)__pyx_v_self->__pyx_vtab)->get_item(__pyx_v_self, __pyx_v_val, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 382; __pyx_clineno = __LINE__; goto __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.hashtable.Int64HashTable.get_item", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/hashtable.pyx":390 * raise KeyError(val) * * def get_iter_test(self, int64_t key, Py_ssize_t iterations): # <<<<<<<<<<<<<< * cdef Py_ssize_t i, val=0 * for i in range(iterations): */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_9hashtable_14Int64HashTable_11get_iter_test(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_6pandas_9hashtable_14Int64HashTable_11get_iter_test(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { CYTHON_UNUSED __pyx_t_5numpy_int64_t __pyx_v_key; Py_ssize_t __pyx_v_iterations; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("get_iter_test (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_key,&__pyx_n_s_iterations,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_key)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_iterations)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("get_iter_test", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 390; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "get_iter_test") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 390; __pyx_clineno = __LINE__; goto __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_key = __Pyx_PyInt_As_npy_int64(values[0]); if (unlikely((__pyx_v_key == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 390; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_iterations = __Pyx_PyIndex_AsSsize_t(values[1]); if (unlikely((__pyx_v_iterations == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 390; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("get_iter_test", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 390; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.hashtable.Int64HashTable.get_iter_test", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pandas_9hashtable_14Int64HashTable_10get_iter_test(((struct __pyx_obj_6pandas_9hashtable_Int64HashTable *)__pyx_v_self), __pyx_v_key, __pyx_v_iterations); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_9hashtable_14Int64HashTable_10get_iter_test(struct __pyx_obj_6pandas_9hashtable_Int64HashTable *__pyx_v_self, CYTHON_UNUSED __pyx_t_5numpy_int64_t __pyx_v_key, Py_ssize_t __pyx_v_iterations) { CYTHON_UNUSED Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_val; khint_t __pyx_v_k; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; Py_ssize_t __pyx_t_2; int __pyx_t_3; __Pyx_RefNannySetupContext("get_iter_test", 0); /* "pandas/hashtable.pyx":391 * * def get_iter_test(self, int64_t key, Py_ssize_t iterations): * cdef Py_ssize_t i, val=0 # <<<<<<<<<<<<<< * for i in range(iterations): * k = kh_get_int64(self.table, val) */ __pyx_v_val = 0; /* "pandas/hashtable.pyx":392 * def get_iter_test(self, int64_t key, Py_ssize_t iterations): * cdef Py_ssize_t i, val=0 * for i in range(iterations): # <<<<<<<<<<<<<< * k = kh_get_int64(self.table, val) * if k != self.table.n_buckets: */ __pyx_t_1 = __pyx_v_iterations; for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) { __pyx_v_i = __pyx_t_2; /* "pandas/hashtable.pyx":393 * cdef Py_ssize_t i, val=0 * for i in range(iterations): * k = kh_get_int64(self.table, val) # <<<<<<<<<<<<<< * if k != self.table.n_buckets: * val = self.table.vals[k] */ __pyx_v_k = kh_get_int64(__pyx_v_self->table, __pyx_v_val); /* "pandas/hashtable.pyx":394 * for i in range(iterations): * k = kh_get_int64(self.table, val) * if k != self.table.n_buckets: # <<<<<<<<<<<<<< * val = self.table.vals[k] * */ __pyx_t_3 = ((__pyx_v_k != __pyx_v_self->table->n_buckets) != 0); if (__pyx_t_3) { /* "pandas/hashtable.pyx":395 * k = kh_get_int64(self.table, val) * if k != self.table.n_buckets: * val = self.table.vals[k] # <<<<<<<<<<<<<< * * cpdef set_item(self, int64_t key, Py_ssize_t val): */ __pyx_v_val = (__pyx_v_self->table->vals[__pyx_v_k]); goto __pyx_L5; } __pyx_L5:; } /* "pandas/hashtable.pyx":390 * raise KeyError(val) * * def get_iter_test(self, int64_t key, Py_ssize_t iterations): # <<<<<<<<<<<<<< * cdef Py_ssize_t i, val=0 * for i in range(iterations): */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/hashtable.pyx":397 * val = self.table.vals[k] * * cpdef set_item(self, int64_t key, Py_ssize_t val): # <<<<<<<<<<<<<< * cdef: * khiter_t k */ static PyObject *__pyx_pw_6pandas_9hashtable_14Int64HashTable_13set_item(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_6pandas_9hashtable_14Int64HashTable_set_item(struct __pyx_obj_6pandas_9hashtable_Int64HashTable *__pyx_v_self, __pyx_t_5numpy_int64_t __pyx_v_key, Py_ssize_t __pyx_v_val, int __pyx_skip_dispatch) { khiter_t __pyx_v_k; int __pyx_v_ret; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; int __pyx_t_5; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("set_item", 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_set_item); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 397; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_6pandas_9hashtable_14Int64HashTable_13set_item)) { __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyInt_From_npy_int64(__pyx_v_key); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 397; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyInt_FromSsize_t(__pyx_v_val); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 397; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 397; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_2 = 0; __pyx_t_3 = 0; __pyx_t_3 = PyObject_Call(__pyx_t_1, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 397; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_r = __pyx_t_3; __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } /* "pandas/hashtable.pyx":400 * cdef: * khiter_t k * int ret = 0 # <<<<<<<<<<<<<< * * k = kh_put_int64(self.table, key, &ret) */ __pyx_v_ret = 0; /* "pandas/hashtable.pyx":402 * int ret = 0 * * k = kh_put_int64(self.table, key, &ret) # <<<<<<<<<<<<<< * self.table.keys[k] = key * if kh_exist_int64(self.table, k): */ __pyx_v_k = kh_put_int64(__pyx_v_self->table, __pyx_v_key, (&__pyx_v_ret)); /* "pandas/hashtable.pyx":403 * * k = kh_put_int64(self.table, key, &ret) * self.table.keys[k] = key # <<<<<<<<<<<<<< * if kh_exist_int64(self.table, k): * self.table.vals[k] = val */ (__pyx_v_self->table->keys[__pyx_v_k]) = __pyx_v_key; /* "pandas/hashtable.pyx":404 * k = kh_put_int64(self.table, key, &ret) * self.table.keys[k] = key * if kh_exist_int64(self.table, k): # <<<<<<<<<<<<<< * self.table.vals[k] = val * else: */ __pyx_t_5 = (kh_exist_int64(__pyx_v_self->table, __pyx_v_k) != 0); if (__pyx_t_5) { /* "pandas/hashtable.pyx":405 * self.table.keys[k] = key * if kh_exist_int64(self.table, k): * self.table.vals[k] = val # <<<<<<<<<<<<<< * else: * raise KeyError(key) */ (__pyx_v_self->table->vals[__pyx_v_k]) = __pyx_v_val; goto __pyx_L3; } /*else*/ { /* "pandas/hashtable.pyx":407 * self.table.vals[k] = val * else: * raise KeyError(key) # <<<<<<<<<<<<<< * * def map(self, ndarray[int64_t] keys, ndarray[int64_t] values): */ __pyx_t_1 = __Pyx_PyInt_From_npy_int64(__pyx_v_key); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 407; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 407; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyObject_Call(__pyx_builtin_KeyError, __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 407; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 407; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_L3:; /* "pandas/hashtable.pyx":397 * val = self.table.vals[k] * * cpdef set_item(self, int64_t key, Py_ssize_t val): # <<<<<<<<<<<<<< * cdef: * khiter_t k */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("pandas.hashtable.Int64HashTable.set_item", __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_9hashtable_14Int64HashTable_13set_item(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_6pandas_9hashtable_14Int64HashTable_13set_item(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { __pyx_t_5numpy_int64_t __pyx_v_key; Py_ssize_t __pyx_v_val; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("set_item (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_key,&__pyx_n_s_val,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_key)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_val)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("set_item", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 397; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "set_item") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 397; __pyx_clineno = __LINE__; goto __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_key = __Pyx_PyInt_As_npy_int64(values[0]); if (unlikely((__pyx_v_key == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 397; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_val = __Pyx_PyIndex_AsSsize_t(values[1]); if (unlikely((__pyx_v_val == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 397; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("set_item", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 397; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.hashtable.Int64HashTable.set_item", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pandas_9hashtable_14Int64HashTable_12set_item(((struct __pyx_obj_6pandas_9hashtable_Int64HashTable *)__pyx_v_self), __pyx_v_key, __pyx_v_val); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_9hashtable_14Int64HashTable_12set_item(struct __pyx_obj_6pandas_9hashtable_Int64HashTable *__pyx_v_self, __pyx_t_5numpy_int64_t __pyx_v_key, Py_ssize_t __pyx_v_val) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("set_item", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = ((struct __pyx_vtabstruct_6pandas_9hashtable_Int64HashTable *)__pyx_v_self->__pyx_vtab)->set_item(__pyx_v_self, __pyx_v_key, __pyx_v_val, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 397; __pyx_clineno = __LINE__; goto __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.hashtable.Int64HashTable.set_item", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/hashtable.pyx":409 * raise KeyError(key) * * def map(self, ndarray[int64_t] keys, ndarray[int64_t] values): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = len(values) */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_9hashtable_14Int64HashTable_15map(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_6pandas_9hashtable_14Int64HashTable_15map(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_keys = 0; PyArrayObject *__pyx_v_values = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("map (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_keys,&__pyx_n_s_values,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_keys)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_values)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("map", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 409; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "map") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 409; __pyx_clineno = __LINE__; goto __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_keys = ((PyArrayObject *)values[0]); __pyx_v_values = ((PyArrayObject *)values[1]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("map", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 409; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.hashtable.Int64HashTable.map", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_keys), __pyx_ptype_5numpy_ndarray, 1, "keys", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 409; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 409; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_9hashtable_14Int64HashTable_14map(((struct __pyx_obj_6pandas_9hashtable_Int64HashTable *)__pyx_v_self), __pyx_v_keys, __pyx_v_values); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_9hashtable_14Int64HashTable_14map(struct __pyx_obj_6pandas_9hashtable_Int64HashTable *__pyx_v_self, PyArrayObject *__pyx_v_keys, PyArrayObject *__pyx_v_values) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_n; int __pyx_v_ret; __pyx_t_5numpy_int64_t __pyx_v_key; khiter_t __pyx_v_k; __Pyx_LocalBuf_ND __pyx_pybuffernd_keys; __Pyx_Buffer __pyx_pybuffer_keys; __Pyx_LocalBuf_ND __pyx_pybuffernd_values; __Pyx_Buffer __pyx_pybuffer_values; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; Py_ssize_t __pyx_t_2; Py_ssize_t __pyx_t_3; int __pyx_t_4; Py_ssize_t __pyx_t_5; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("map", 0); __pyx_pybuffer_keys.pybuffer.buf = NULL; __pyx_pybuffer_keys.refcount = 0; __pyx_pybuffernd_keys.data = NULL; __pyx_pybuffernd_keys.rcbuffer = &__pyx_pybuffer_keys; __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_keys.rcbuffer->pybuffer, (PyObject*)__pyx_v_keys, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 409; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_keys.diminfo[0].strides = __pyx_pybuffernd_keys.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_keys.diminfo[0].shape = __pyx_pybuffernd_keys.rcbuffer->pybuffer.shape[0]; { __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_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 409; __pyx_clineno = __LINE__; goto __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/hashtable.pyx":411 * def map(self, ndarray[int64_t] keys, ndarray[int64_t] values): * cdef: * Py_ssize_t i, n = len(values) # <<<<<<<<<<<<<< * int ret = 0 * int64_t key */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 411; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/hashtable.pyx":412 * cdef: * Py_ssize_t i, n = len(values) * int ret = 0 # <<<<<<<<<<<<<< * int64_t key * khiter_t k */ __pyx_v_ret = 0; /* "pandas/hashtable.pyx":416 * khiter_t k * * for i in range(n): # <<<<<<<<<<<<<< * key = keys[i] * k = kh_put_int64(self.table, key, &ret) */ __pyx_t_1 = __pyx_v_n; for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) { __pyx_v_i = __pyx_t_2; /* "pandas/hashtable.pyx":417 * * for i in range(n): * key = keys[i] # <<<<<<<<<<<<<< * k = kh_put_int64(self.table, key, &ret) * self.table.vals[k] = values[i] */ __pyx_t_3 = __pyx_v_i; __pyx_t_4 = -1; if (__pyx_t_3 < 0) { __pyx_t_3 += __pyx_pybuffernd_keys.diminfo[0].shape; if (unlikely(__pyx_t_3 < 0)) __pyx_t_4 = 0; } else if (unlikely(__pyx_t_3 >= __pyx_pybuffernd_keys.diminfo[0].shape)) __pyx_t_4 = 0; if (unlikely(__pyx_t_4 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_4); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 417; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_key = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_keys.rcbuffer->pybuffer.buf, __pyx_t_3, __pyx_pybuffernd_keys.diminfo[0].strides)); /* "pandas/hashtable.pyx":418 * for i in range(n): * key = keys[i] * k = kh_put_int64(self.table, key, &ret) # <<<<<<<<<<<<<< * self.table.vals[k] = values[i] * */ __pyx_v_k = kh_put_int64(__pyx_v_self->table, __pyx_v_key, (&__pyx_v_ret)); /* "pandas/hashtable.pyx":419 * key = keys[i] * k = kh_put_int64(self.table, key, &ret) * self.table.vals[k] = values[i] # <<<<<<<<<<<<<< * * def map_locations(self, ndarray[int64_t] values): */ __pyx_t_5 = __pyx_v_i; __pyx_t_4 = -1; if (__pyx_t_5 < 0) { __pyx_t_5 += __pyx_pybuffernd_values.diminfo[0].shape; if (unlikely(__pyx_t_5 < 0)) __pyx_t_4 = 0; } else if (unlikely(__pyx_t_5 >= __pyx_pybuffernd_values.diminfo[0].shape)) __pyx_t_4 = 0; if (unlikely(__pyx_t_4 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_4); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 419; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } (__pyx_v_self->table->vals[__pyx_v_k]) = ((Py_ssize_t)(*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_5, __pyx_pybuffernd_values.diminfo[0].strides))); } /* "pandas/hashtable.pyx":409 * raise KeyError(key) * * def map(self, ndarray[int64_t] keys, ndarray[int64_t] values): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = len(values) */ /* 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_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_keys.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.hashtable.Int64HashTable.map", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_keys.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/hashtable.pyx":421 * self.table.vals[k] = values[i] * * def map_locations(self, ndarray[int64_t] values): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = len(values) */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_9hashtable_14Int64HashTable_17map_locations(PyObject *__pyx_v_self, PyObject *__pyx_v_values); /*proto*/ static PyObject *__pyx_pw_6pandas_9hashtable_14Int64HashTable_17map_locations(PyObject *__pyx_v_self, PyObject *__pyx_v_values) { CYTHON_UNUSED int __pyx_lineno = 0; CYTHON_UNUSED const char *__pyx_filename = NULL; CYTHON_UNUSED int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("map_locations (wrapper)", 0); if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 421; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_9hashtable_14Int64HashTable_16map_locations(((struct __pyx_obj_6pandas_9hashtable_Int64HashTable *)__pyx_v_self), ((PyArrayObject *)__pyx_v_values)); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_9hashtable_14Int64HashTable_16map_locations(struct __pyx_obj_6pandas_9hashtable_Int64HashTable *__pyx_v_self, PyArrayObject *__pyx_v_values) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_n; int __pyx_v_ret; __pyx_t_5numpy_int64_t __pyx_v_val; khiter_t __pyx_v_k; __Pyx_LocalBuf_ND __pyx_pybuffernd_values; __Pyx_Buffer __pyx_pybuffer_values; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; Py_ssize_t __pyx_t_2; Py_ssize_t __pyx_t_3; int __pyx_t_4; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("map_locations", 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_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 421; __pyx_clineno = __LINE__; goto __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/hashtable.pyx":423 * def map_locations(self, ndarray[int64_t] values): * cdef: * Py_ssize_t i, n = len(values) # <<<<<<<<<<<<<< * int ret = 0 * int64_t val */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 423; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/hashtable.pyx":424 * cdef: * Py_ssize_t i, n = len(values) * int ret = 0 # <<<<<<<<<<<<<< * int64_t val * khiter_t k */ __pyx_v_ret = 0; /* "pandas/hashtable.pyx":428 * khiter_t k * * for i in range(n): # <<<<<<<<<<<<<< * val = values[i] * k = kh_put_int64(self.table, val, &ret) */ __pyx_t_1 = __pyx_v_n; for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) { __pyx_v_i = __pyx_t_2; /* "pandas/hashtable.pyx":429 * * for i in range(n): * val = values[i] # <<<<<<<<<<<<<< * k = kh_put_int64(self.table, val, &ret) * self.table.vals[k] = i */ __pyx_t_3 = __pyx_v_i; __pyx_t_4 = -1; if (__pyx_t_3 < 0) { __pyx_t_3 += __pyx_pybuffernd_values.diminfo[0].shape; if (unlikely(__pyx_t_3 < 0)) __pyx_t_4 = 0; } else if (unlikely(__pyx_t_3 >= __pyx_pybuffernd_values.diminfo[0].shape)) __pyx_t_4 = 0; if (unlikely(__pyx_t_4 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_4); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 429; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_val = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_3, __pyx_pybuffernd_values.diminfo[0].strides)); /* "pandas/hashtable.pyx":430 * for i in range(n): * val = values[i] * k = kh_put_int64(self.table, val, &ret) # <<<<<<<<<<<<<< * self.table.vals[k] = i * */ __pyx_v_k = kh_put_int64(__pyx_v_self->table, __pyx_v_val, (&__pyx_v_ret)); /* "pandas/hashtable.pyx":431 * val = values[i] * k = kh_put_int64(self.table, val, &ret) * self.table.vals[k] = i # <<<<<<<<<<<<<< * * def lookup(self, ndarray[int64_t] values): */ (__pyx_v_self->table->vals[__pyx_v_k]) = __pyx_v_i; } /* "pandas/hashtable.pyx":421 * self.table.vals[k] = values[i] * * def map_locations(self, ndarray[int64_t] values): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = len(values) */ /* 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_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.hashtable.Int64HashTable.map_locations", __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/hashtable.pyx":433 * self.table.vals[k] = i * * def lookup(self, ndarray[int64_t] values): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = len(values) */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_9hashtable_14Int64HashTable_19lookup(PyObject *__pyx_v_self, PyObject *__pyx_v_values); /*proto*/ static PyObject *__pyx_pw_6pandas_9hashtable_14Int64HashTable_19lookup(PyObject *__pyx_v_self, PyObject *__pyx_v_values) { CYTHON_UNUSED int __pyx_lineno = 0; CYTHON_UNUSED const char *__pyx_filename = NULL; CYTHON_UNUSED int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("lookup (wrapper)", 0); if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 433; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_9hashtable_14Int64HashTable_18lookup(((struct __pyx_obj_6pandas_9hashtable_Int64HashTable *)__pyx_v_self), ((PyArrayObject *)__pyx_v_values)); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_9hashtable_14Int64HashTable_18lookup(struct __pyx_obj_6pandas_9hashtable_Int64HashTable *__pyx_v_self, PyArrayObject *__pyx_v_values) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_n; CYTHON_UNUSED int __pyx_v_ret; __pyx_t_5numpy_int64_t __pyx_v_val; khiter_t __pyx_v_k; PyArrayObject *__pyx_v_locs = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_locs; __Pyx_Buffer __pyx_pybuffer_locs; __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; Py_ssize_t __pyx_t_8; Py_ssize_t __pyx_t_9; int __pyx_t_10; int __pyx_t_11; Py_ssize_t __pyx_t_12; Py_ssize_t __pyx_t_13; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __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_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_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 433; __pyx_clineno = __LINE__; goto __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/hashtable.pyx":435 * def lookup(self, ndarray[int64_t] values): * cdef: * Py_ssize_t i, n = len(values) # <<<<<<<<<<<<<< * int ret = 0 * int64_t val */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 435; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/hashtable.pyx":436 * cdef: * Py_ssize_t i, n = len(values) * int ret = 0 # <<<<<<<<<<<<<< * int64_t val * khiter_t k */ __pyx_v_ret = 0; /* "pandas/hashtable.pyx":439 * int64_t val * khiter_t k * ndarray[int64_t] locs = np.empty(n, dtype=np.int64) # <<<<<<<<<<<<<< * * for i in range(n): */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 439; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 439; __pyx_clineno = __LINE__; goto __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_n); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 439; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 439; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 439; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 439; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_int64); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 439; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 439; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyObject_Call(__pyx_t_3, __pyx_t_4, __pyx_t_2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 439; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 439; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_7 = ((PyArrayObject *)__pyx_t_6); { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_locs.rcbuffer->pybuffer, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { __pyx_v_locs = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_locs.rcbuffer->pybuffer.buf = NULL; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 439; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } else {__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]; } } __pyx_t_7 = 0; __pyx_v_locs = ((PyArrayObject *)__pyx_t_6); __pyx_t_6 = 0; /* "pandas/hashtable.pyx":441 * ndarray[int64_t] locs = np.empty(n, dtype=np.int64) * * for i in range(n): # <<<<<<<<<<<<<< * val = values[i] * k = kh_get_int64(self.table, val) */ __pyx_t_1 = __pyx_v_n; for (__pyx_t_8 = 0; __pyx_t_8 < __pyx_t_1; __pyx_t_8+=1) { __pyx_v_i = __pyx_t_8; /* "pandas/hashtable.pyx":442 * * for i in range(n): * val = values[i] # <<<<<<<<<<<<<< * k = kh_get_int64(self.table, val) * if k != self.table.n_buckets: */ __pyx_t_9 = __pyx_v_i; __pyx_t_10 = -1; if (__pyx_t_9 < 0) { __pyx_t_9 += __pyx_pybuffernd_values.diminfo[0].shape; if (unlikely(__pyx_t_9 < 0)) __pyx_t_10 = 0; } else if (unlikely(__pyx_t_9 >= __pyx_pybuffernd_values.diminfo[0].shape)) __pyx_t_10 = 0; if (unlikely(__pyx_t_10 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_10); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 442; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_val = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_9, __pyx_pybuffernd_values.diminfo[0].strides)); /* "pandas/hashtable.pyx":443 * for i in range(n): * val = values[i] * k = kh_get_int64(self.table, val) # <<<<<<<<<<<<<< * if k != self.table.n_buckets: * locs[i] = self.table.vals[k] */ __pyx_v_k = kh_get_int64(__pyx_v_self->table, __pyx_v_val); /* "pandas/hashtable.pyx":444 * val = values[i] * k = kh_get_int64(self.table, val) * if k != self.table.n_buckets: # <<<<<<<<<<<<<< * locs[i] = self.table.vals[k] * else: */ __pyx_t_11 = ((__pyx_v_k != __pyx_v_self->table->n_buckets) != 0); if (__pyx_t_11) { /* "pandas/hashtable.pyx":445 * k = kh_get_int64(self.table, val) * if k != self.table.n_buckets: * locs[i] = self.table.vals[k] # <<<<<<<<<<<<<< * else: * locs[i] = -1 */ __pyx_t_12 = __pyx_v_i; __pyx_t_10 = -1; if (__pyx_t_12 < 0) { __pyx_t_12 += __pyx_pybuffernd_locs.diminfo[0].shape; if (unlikely(__pyx_t_12 < 0)) __pyx_t_10 = 0; } else if (unlikely(__pyx_t_12 >= __pyx_pybuffernd_locs.diminfo[0].shape)) __pyx_t_10 = 0; if (unlikely(__pyx_t_10 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_10); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 445; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_locs.rcbuffer->pybuffer.buf, __pyx_t_12, __pyx_pybuffernd_locs.diminfo[0].strides) = (__pyx_v_self->table->vals[__pyx_v_k]); goto __pyx_L5; } /*else*/ { /* "pandas/hashtable.pyx":447 * locs[i] = self.table.vals[k] * else: * locs[i] = -1 # <<<<<<<<<<<<<< * * return locs */ __pyx_t_13 = __pyx_v_i; __pyx_t_10 = -1; if (__pyx_t_13 < 0) { __pyx_t_13 += __pyx_pybuffernd_locs.diminfo[0].shape; if (unlikely(__pyx_t_13 < 0)) __pyx_t_10 = 0; } else if (unlikely(__pyx_t_13 >= __pyx_pybuffernd_locs.diminfo[0].shape)) __pyx_t_10 = 0; if (unlikely(__pyx_t_10 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_10); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 447; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_locs.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_locs.diminfo[0].strides) = -1; } __pyx_L5:; } /* "pandas/hashtable.pyx":449 * locs[i] = -1 * * return locs # <<<<<<<<<<<<<< * * def factorize(self, ndarray[object] values): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_locs)); __pyx_r = ((PyObject *)__pyx_v_locs); goto __pyx_L0; /* "pandas/hashtable.pyx":433 * self.table.vals[k] = i * * def lookup(self, ndarray[int64_t] values): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = len(values) */ /* 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_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_locs.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.hashtable.Int64HashTable.lookup", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_locs.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_locs); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/hashtable.pyx":451 * return locs * * def factorize(self, ndarray[object] values): # <<<<<<<<<<<<<< * reverse = {} * labels = self.get_labels(values, reverse, 0) */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_9hashtable_14Int64HashTable_21factorize(PyObject *__pyx_v_self, PyObject *__pyx_v_values); /*proto*/ static PyObject *__pyx_pw_6pandas_9hashtable_14Int64HashTable_21factorize(PyObject *__pyx_v_self, PyObject *__pyx_v_values) { CYTHON_UNUSED int __pyx_lineno = 0; CYTHON_UNUSED const char *__pyx_filename = NULL; CYTHON_UNUSED int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("factorize (wrapper)", 0); if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 451; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_9hashtable_14Int64HashTable_20factorize(((struct __pyx_obj_6pandas_9hashtable_Int64HashTable *)__pyx_v_self), ((PyArrayObject *)__pyx_v_values)); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_9hashtable_14Int64HashTable_20factorize(struct __pyx_obj_6pandas_9hashtable_Int64HashTable *__pyx_v_self, PyArrayObject *__pyx_v_values) { PyObject *__pyx_v_reverse = NULL; PyObject *__pyx_v_labels = NULL; __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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("factorize", 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_object, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 451; __pyx_clineno = __LINE__; goto __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/hashtable.pyx":452 * * def factorize(self, ndarray[object] values): * reverse = {} # <<<<<<<<<<<<<< * labels = self.get_labels(values, reverse, 0) * return reverse, labels */ __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 452; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_v_reverse = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/hashtable.pyx":453 * def factorize(self, ndarray[object] values): * reverse = {} * labels = self.get_labels(values, reverse, 0) # <<<<<<<<<<<<<< * return reverse, labels * */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get_labels); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 453; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 453; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(((PyObject *)__pyx_v_values)); PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_values)); __Pyx_GIVEREF(((PyObject *)__pyx_v_values)); __Pyx_INCREF(__pyx_v_reverse); PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_reverse); __Pyx_GIVEREF(__pyx_v_reverse); __Pyx_INCREF(__pyx_int_0); PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_int_0); __Pyx_GIVEREF(__pyx_int_0); __pyx_t_3 = PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 453; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_labels = __pyx_t_3; __pyx_t_3 = 0; /* "pandas/hashtable.pyx":454 * reverse = {} * labels = self.get_labels(values, reverse, 0) * return reverse, labels # <<<<<<<<<<<<<< * * def get_labels(self, ndarray[int64_t] values, Int64Vector uniques, */ __Pyx_XDECREF(__pyx_r); __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 454; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_v_reverse); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_reverse); __Pyx_GIVEREF(__pyx_v_reverse); __Pyx_INCREF(__pyx_v_labels); PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_labels); __Pyx_GIVEREF(__pyx_v_labels); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; /* "pandas/hashtable.pyx":451 * return locs * * def factorize(self, ndarray[object] values): # <<<<<<<<<<<<<< * reverse = {} * labels = self.get_labels(values, reverse, 0) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __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.hashtable.Int64HashTable.factorize", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF(__pyx_v_reverse); __Pyx_XDECREF(__pyx_v_labels); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/hashtable.pyx":456 * return reverse, labels * * def get_labels(self, ndarray[int64_t] values, Int64Vector uniques, # <<<<<<<<<<<<<< * Py_ssize_t count_prior, Py_ssize_t na_sentinel): * cdef: */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_9hashtable_14Int64HashTable_23get_labels(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_6pandas_9hashtable_14Int64HashTable_23get_labels(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_values = 0; struct __pyx_obj_6pandas_9hashtable_Int64Vector *__pyx_v_uniques = 0; Py_ssize_t __pyx_v_count_prior; CYTHON_UNUSED Py_ssize_t __pyx_v_na_sentinel; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("get_labels (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_values,&__pyx_n_s_uniques,&__pyx_n_s_count_prior,&__pyx_n_s_na_sentinel,0}; PyObject* values[4] = {0,0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_values)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_uniques)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("get_labels", 1, 4, 4, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 456; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_count_prior)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("get_labels", 1, 4, 4, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 456; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_na_sentinel)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("get_labels", 1, 4, 4, 3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 456; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "get_labels") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 456; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 4) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[3] = PyTuple_GET_ITEM(__pyx_args, 3); } __pyx_v_values = ((PyArrayObject *)values[0]); __pyx_v_uniques = ((struct __pyx_obj_6pandas_9hashtable_Int64Vector *)values[1]); __pyx_v_count_prior = __Pyx_PyIndex_AsSsize_t(values[2]); if (unlikely((__pyx_v_count_prior == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 457; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_na_sentinel = __Pyx_PyIndex_AsSsize_t(values[3]); if (unlikely((__pyx_v_na_sentinel == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 457; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("get_labels", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 456; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.hashtable.Int64HashTable.get_labels", __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_filename = __pyx_f[0]; __pyx_lineno = 456; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_uniques), __pyx_ptype_6pandas_9hashtable_Int64Vector, 1, "uniques", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 456; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_9hashtable_14Int64HashTable_22get_labels(((struct __pyx_obj_6pandas_9hashtable_Int64HashTable *)__pyx_v_self), __pyx_v_values, __pyx_v_uniques, __pyx_v_count_prior, __pyx_v_na_sentinel); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_9hashtable_14Int64HashTable_22get_labels(struct __pyx_obj_6pandas_9hashtable_Int64HashTable *__pyx_v_self, PyArrayObject *__pyx_v_values, struct __pyx_obj_6pandas_9hashtable_Int64Vector *__pyx_v_uniques, Py_ssize_t __pyx_v_count_prior, CYTHON_UNUSED Py_ssize_t __pyx_v_na_sentinel) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_n; PyArrayObject *__pyx_v_labels = 0; Py_ssize_t __pyx_v_idx; Py_ssize_t __pyx_v_count; int __pyx_v_ret; __pyx_t_5numpy_int64_t __pyx_v_val; khiter_t __pyx_v_k; __Pyx_LocalBuf_ND __pyx_pybuffernd_labels; __Pyx_Buffer __pyx_pybuffer_labels; __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; int __pyx_t_14; Py_ssize_t __pyx_t_15; Py_ssize_t __pyx_t_16; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_labels", 0); __pyx_pybuffer_labels.pybuffer.buf = NULL; __pyx_pybuffer_labels.refcount = 0; __pyx_pybuffernd_labels.data = NULL; __pyx_pybuffernd_labels.rcbuffer = &__pyx_pybuffer_labels; __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_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 456; __pyx_clineno = __LINE__; goto __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/hashtable.pyx":459 * Py_ssize_t count_prior, Py_ssize_t na_sentinel): * cdef: * Py_ssize_t i, n = len(values) # <<<<<<<<<<<<<< * ndarray[int64_t] labels * Py_ssize_t idx, count = count_prior */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 459; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/hashtable.pyx":461 * Py_ssize_t i, n = len(values) * ndarray[int64_t] labels * Py_ssize_t idx, count = count_prior # <<<<<<<<<<<<<< * int ret = 0 * int64_t val */ __pyx_v_count = __pyx_v_count_prior; /* "pandas/hashtable.pyx":462 * ndarray[int64_t] labels * Py_ssize_t idx, count = count_prior * int ret = 0 # <<<<<<<<<<<<<< * int64_t val * khiter_t k */ __pyx_v_ret = 0; /* "pandas/hashtable.pyx":466 * khiter_t k * * labels = np.empty(n, dtype=np.int64) # <<<<<<<<<<<<<< * * for i in range(n): */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 466; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 466; __pyx_clineno = __LINE__; goto __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_n); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 466; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 466; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 466; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 466; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_int64); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 466; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 466; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyObject_Call(__pyx_t_3, __pyx_t_4, __pyx_t_2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 466; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 466; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_7 = ((PyArrayObject *)__pyx_t_6); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_labels.rcbuffer->pybuffer); __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_labels.rcbuffer->pybuffer, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_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_labels.rcbuffer->pybuffer, (PyObject*)__pyx_v_labels, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_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_pybuffernd_labels.diminfo[0].strides = __pyx_pybuffernd_labels.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_labels.diminfo[0].shape = __pyx_pybuffernd_labels.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 466; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_7 = 0; __pyx_v_labels = ((PyArrayObject *)__pyx_t_6); __pyx_t_6 = 0; /* "pandas/hashtable.pyx":468 * labels = np.empty(n, dtype=np.int64) * * for i in range(n): # <<<<<<<<<<<<<< * val = values[i] * k = kh_get_int64(self.table, val) */ __pyx_t_1 = __pyx_v_n; for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_1; __pyx_t_12+=1) { __pyx_v_i = __pyx_t_12; /* "pandas/hashtable.pyx":469 * * for i in range(n): * val = values[i] # <<<<<<<<<<<<<< * k = kh_get_int64(self.table, val) * if k != self.table.n_buckets: */ __pyx_t_13 = __pyx_v_i; __pyx_t_8 = -1; if (__pyx_t_13 < 0) { __pyx_t_13 += __pyx_pybuffernd_values.diminfo[0].shape; if (unlikely(__pyx_t_13 < 0)) __pyx_t_8 = 0; } else if (unlikely(__pyx_t_13 >= __pyx_pybuffernd_values.diminfo[0].shape)) __pyx_t_8 = 0; if (unlikely(__pyx_t_8 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_8); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 469; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_val = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_values.diminfo[0].strides)); /* "pandas/hashtable.pyx":470 * for i in range(n): * val = values[i] * k = kh_get_int64(self.table, val) # <<<<<<<<<<<<<< * if k != self.table.n_buckets: * idx = self.table.vals[k] */ __pyx_v_k = kh_get_int64(__pyx_v_self->table, __pyx_v_val); /* "pandas/hashtable.pyx":471 * val = values[i] * k = kh_get_int64(self.table, val) * if k != self.table.n_buckets: # <<<<<<<<<<<<<< * idx = self.table.vals[k] * labels[i] = idx */ __pyx_t_14 = ((__pyx_v_k != __pyx_v_self->table->n_buckets) != 0); if (__pyx_t_14) { /* "pandas/hashtable.pyx":472 * k = kh_get_int64(self.table, val) * if k != self.table.n_buckets: * idx = self.table.vals[k] # <<<<<<<<<<<<<< * labels[i] = idx * else: */ __pyx_v_idx = (__pyx_v_self->table->vals[__pyx_v_k]); /* "pandas/hashtable.pyx":473 * if k != self.table.n_buckets: * idx = self.table.vals[k] * labels[i] = idx # <<<<<<<<<<<<<< * else: * k = kh_put_int64(self.table, val, &ret) */ __pyx_t_15 = __pyx_v_i; __pyx_t_8 = -1; if (__pyx_t_15 < 0) { __pyx_t_15 += __pyx_pybuffernd_labels.diminfo[0].shape; if (unlikely(__pyx_t_15 < 0)) __pyx_t_8 = 0; } else if (unlikely(__pyx_t_15 >= __pyx_pybuffernd_labels.diminfo[0].shape)) __pyx_t_8 = 0; if (unlikely(__pyx_t_8 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_8); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 473; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_labels.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_labels.diminfo[0].strides) = __pyx_v_idx; goto __pyx_L5; } /*else*/ { /* "pandas/hashtable.pyx":475 * labels[i] = idx * else: * k = kh_put_int64(self.table, val, &ret) # <<<<<<<<<<<<<< * self.table.vals[k] = count * uniques.append(val) */ __pyx_v_k = kh_put_int64(__pyx_v_self->table, __pyx_v_val, (&__pyx_v_ret)); /* "pandas/hashtable.pyx":476 * else: * k = kh_put_int64(self.table, val, &ret) * self.table.vals[k] = count # <<<<<<<<<<<<<< * uniques.append(val) * labels[i] = count */ (__pyx_v_self->table->vals[__pyx_v_k]) = __pyx_v_count; /* "pandas/hashtable.pyx":477 * k = kh_put_int64(self.table, val, &ret) * self.table.vals[k] = count * uniques.append(val) # <<<<<<<<<<<<<< * labels[i] = count * count += 1 */ __pyx_t_6 = __pyx_f_6pandas_9hashtable_11Int64Vector_append(__pyx_v_uniques, __pyx_v_val); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 477; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; /* "pandas/hashtable.pyx":478 * self.table.vals[k] = count * uniques.append(val) * labels[i] = count # <<<<<<<<<<<<<< * count += 1 * */ __pyx_t_16 = __pyx_v_i; __pyx_t_8 = -1; if (__pyx_t_16 < 0) { __pyx_t_16 += __pyx_pybuffernd_labels.diminfo[0].shape; if (unlikely(__pyx_t_16 < 0)) __pyx_t_8 = 0; } else if (unlikely(__pyx_t_16 >= __pyx_pybuffernd_labels.diminfo[0].shape)) __pyx_t_8 = 0; if (unlikely(__pyx_t_8 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_8); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 478; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_labels.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_labels.diminfo[0].strides) = __pyx_v_count; /* "pandas/hashtable.pyx":479 * uniques.append(val) * labels[i] = count * count += 1 # <<<<<<<<<<<<<< * * return labels */ __pyx_v_count = (__pyx_v_count + 1); } __pyx_L5:; } /* "pandas/hashtable.pyx":481 * count += 1 * * return labels # <<<<<<<<<<<<<< * * def get_labels_groupby(self, ndarray[int64_t] values): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_labels)); __pyx_r = ((PyObject *)__pyx_v_labels); goto __pyx_L0; /* "pandas/hashtable.pyx":456 * return reverse, labels * * def get_labels(self, ndarray[int64_t] values, Int64Vector uniques, # <<<<<<<<<<<<<< * Py_ssize_t count_prior, Py_ssize_t na_sentinel): * cdef: */ /* 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_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_labels.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.hashtable.Int64HashTable.get_labels", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_labels.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_labels); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/hashtable.pyx":483 * return labels * * def get_labels_groupby(self, ndarray[int64_t] values): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = len(values) */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_9hashtable_14Int64HashTable_25get_labels_groupby(PyObject *__pyx_v_self, PyObject *__pyx_v_values); /*proto*/ static PyObject *__pyx_pw_6pandas_9hashtable_14Int64HashTable_25get_labels_groupby(PyObject *__pyx_v_self, PyObject *__pyx_v_values) { CYTHON_UNUSED int __pyx_lineno = 0; CYTHON_UNUSED const char *__pyx_filename = NULL; CYTHON_UNUSED int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("get_labels_groupby (wrapper)", 0); if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 483; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_9hashtable_14Int64HashTable_24get_labels_groupby(((struct __pyx_obj_6pandas_9hashtable_Int64HashTable *)__pyx_v_self), ((PyArrayObject *)__pyx_v_values)); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_9hashtable_14Int64HashTable_24get_labels_groupby(struct __pyx_obj_6pandas_9hashtable_Int64HashTable *__pyx_v_self, PyArrayObject *__pyx_v_values) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_n; PyArrayObject *__pyx_v_labels = 0; Py_ssize_t __pyx_v_idx; Py_ssize_t __pyx_v_count; int __pyx_v_ret; __pyx_t_5numpy_int64_t __pyx_v_val; khiter_t __pyx_v_k; struct __pyx_obj_6pandas_9hashtable_Int64Vector *__pyx_v_uniques = 0; PyObject *__pyx_v_arr_uniques = NULL; __Pyx_LocalBuf_ND __pyx_pybuffernd_labels; __Pyx_Buffer __pyx_pybuffer_labels; __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; int __pyx_t_14; Py_ssize_t __pyx_t_15; Py_ssize_t __pyx_t_16; Py_ssize_t __pyx_t_17; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_labels_groupby", 0); __pyx_pybuffer_labels.pybuffer.buf = NULL; __pyx_pybuffer_labels.refcount = 0; __pyx_pybuffernd_labels.data = NULL; __pyx_pybuffernd_labels.rcbuffer = &__pyx_pybuffer_labels; __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_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 483; __pyx_clineno = __LINE__; goto __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/hashtable.pyx":485 * def get_labels_groupby(self, ndarray[int64_t] values): * cdef: * Py_ssize_t i, n = len(values) # <<<<<<<<<<<<<< * ndarray[int64_t] labels * Py_ssize_t idx, count = 0 */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 485; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/hashtable.pyx":487 * Py_ssize_t i, n = len(values) * ndarray[int64_t] labels * Py_ssize_t idx, count = 0 # <<<<<<<<<<<<<< * int ret = 0 * int64_t val */ __pyx_v_count = 0; /* "pandas/hashtable.pyx":488 * ndarray[int64_t] labels * Py_ssize_t idx, count = 0 * int ret = 0 # <<<<<<<<<<<<<< * int64_t val * khiter_t k */ __pyx_v_ret = 0; /* "pandas/hashtable.pyx":491 * int64_t val * khiter_t k * Int64Vector uniques = Int64Vector() # <<<<<<<<<<<<<< * * labels = np.empty(n, dtype=np.int64) */ __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_6pandas_9hashtable_Int64Vector)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 491; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_v_uniques = ((struct __pyx_obj_6pandas_9hashtable_Int64Vector *)__pyx_t_2); __pyx_t_2 = 0; /* "pandas/hashtable.pyx":493 * Int64Vector uniques = Int64Vector() * * labels = np.empty(n, dtype=np.int64) # <<<<<<<<<<<<<< * * for i in range(n): */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 493; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 493; __pyx_clineno = __LINE__; goto __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_n); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 493; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 493; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 493; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 493; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_int64); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 493; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 493; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyObject_Call(__pyx_t_3, __pyx_t_4, __pyx_t_2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 493; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 493; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_7 = ((PyArrayObject *)__pyx_t_6); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_labels.rcbuffer->pybuffer); __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_labels.rcbuffer->pybuffer, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_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_labels.rcbuffer->pybuffer, (PyObject*)__pyx_v_labels, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_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_pybuffernd_labels.diminfo[0].strides = __pyx_pybuffernd_labels.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_labels.diminfo[0].shape = __pyx_pybuffernd_labels.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 493; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_7 = 0; __pyx_v_labels = ((PyArrayObject *)__pyx_t_6); __pyx_t_6 = 0; /* "pandas/hashtable.pyx":495 * labels = np.empty(n, dtype=np.int64) * * for i in range(n): # <<<<<<<<<<<<<< * val = values[i] * */ __pyx_t_1 = __pyx_v_n; for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_1; __pyx_t_12+=1) { __pyx_v_i = __pyx_t_12; /* "pandas/hashtable.pyx":496 * * for i in range(n): * val = values[i] # <<<<<<<<<<<<<< * * # specific for groupby */ __pyx_t_13 = __pyx_v_i; __pyx_t_8 = -1; if (__pyx_t_13 < 0) { __pyx_t_13 += __pyx_pybuffernd_values.diminfo[0].shape; if (unlikely(__pyx_t_13 < 0)) __pyx_t_8 = 0; } else if (unlikely(__pyx_t_13 >= __pyx_pybuffernd_values.diminfo[0].shape)) __pyx_t_8 = 0; if (unlikely(__pyx_t_8 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_8); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 496; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_val = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_values.diminfo[0].strides)); /* "pandas/hashtable.pyx":499 * * # specific for groupby * if val < 0: # <<<<<<<<<<<<<< * labels[i] = -1 * continue */ __pyx_t_14 = ((__pyx_v_val < 0) != 0); if (__pyx_t_14) { /* "pandas/hashtable.pyx":500 * # specific for groupby * if val < 0: * labels[i] = -1 # <<<<<<<<<<<<<< * continue * */ __pyx_t_15 = __pyx_v_i; __pyx_t_8 = -1; if (__pyx_t_15 < 0) { __pyx_t_15 += __pyx_pybuffernd_labels.diminfo[0].shape; if (unlikely(__pyx_t_15 < 0)) __pyx_t_8 = 0; } else if (unlikely(__pyx_t_15 >= __pyx_pybuffernd_labels.diminfo[0].shape)) __pyx_t_8 = 0; if (unlikely(__pyx_t_8 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_8); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 500; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_labels.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_labels.diminfo[0].strides) = -1; /* "pandas/hashtable.pyx":501 * if val < 0: * labels[i] = -1 * continue # <<<<<<<<<<<<<< * * k = kh_get_int64(self.table, val) */ goto __pyx_L3_continue; } /* "pandas/hashtable.pyx":503 * continue * * k = kh_get_int64(self.table, val) # <<<<<<<<<<<<<< * if k != self.table.n_buckets: * idx = self.table.vals[k] */ __pyx_v_k = kh_get_int64(__pyx_v_self->table, __pyx_v_val); /* "pandas/hashtable.pyx":504 * * k = kh_get_int64(self.table, val) * if k != self.table.n_buckets: # <<<<<<<<<<<<<< * idx = self.table.vals[k] * labels[i] = idx */ __pyx_t_14 = ((__pyx_v_k != __pyx_v_self->table->n_buckets) != 0); if (__pyx_t_14) { /* "pandas/hashtable.pyx":505 * k = kh_get_int64(self.table, val) * if k != self.table.n_buckets: * idx = self.table.vals[k] # <<<<<<<<<<<<<< * labels[i] = idx * else: */ __pyx_v_idx = (__pyx_v_self->table->vals[__pyx_v_k]); /* "pandas/hashtable.pyx":506 * if k != self.table.n_buckets: * idx = self.table.vals[k] * labels[i] = idx # <<<<<<<<<<<<<< * else: * k = kh_put_int64(self.table, val, &ret) */ __pyx_t_16 = __pyx_v_i; __pyx_t_8 = -1; if (__pyx_t_16 < 0) { __pyx_t_16 += __pyx_pybuffernd_labels.diminfo[0].shape; if (unlikely(__pyx_t_16 < 0)) __pyx_t_8 = 0; } else if (unlikely(__pyx_t_16 >= __pyx_pybuffernd_labels.diminfo[0].shape)) __pyx_t_8 = 0; if (unlikely(__pyx_t_8 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_8); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 506; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_labels.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_labels.diminfo[0].strides) = __pyx_v_idx; goto __pyx_L6; } /*else*/ { /* "pandas/hashtable.pyx":508 * labels[i] = idx * else: * k = kh_put_int64(self.table, val, &ret) # <<<<<<<<<<<<<< * self.table.vals[k] = count * uniques.append(val) */ __pyx_v_k = kh_put_int64(__pyx_v_self->table, __pyx_v_val, (&__pyx_v_ret)); /* "pandas/hashtable.pyx":509 * else: * k = kh_put_int64(self.table, val, &ret) * self.table.vals[k] = count # <<<<<<<<<<<<<< * uniques.append(val) * labels[i] = count */ (__pyx_v_self->table->vals[__pyx_v_k]) = __pyx_v_count; /* "pandas/hashtable.pyx":510 * k = kh_put_int64(self.table, val, &ret) * self.table.vals[k] = count * uniques.append(val) # <<<<<<<<<<<<<< * labels[i] = count * count += 1 */ __pyx_t_6 = __pyx_f_6pandas_9hashtable_11Int64Vector_append(__pyx_v_uniques, __pyx_v_val); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 510; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; /* "pandas/hashtable.pyx":511 * self.table.vals[k] = count * uniques.append(val) * labels[i] = count # <<<<<<<<<<<<<< * count += 1 * */ __pyx_t_17 = __pyx_v_i; __pyx_t_8 = -1; if (__pyx_t_17 < 0) { __pyx_t_17 += __pyx_pybuffernd_labels.diminfo[0].shape; if (unlikely(__pyx_t_17 < 0)) __pyx_t_8 = 0; } else if (unlikely(__pyx_t_17 >= __pyx_pybuffernd_labels.diminfo[0].shape)) __pyx_t_8 = 0; if (unlikely(__pyx_t_8 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_8); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 511; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_labels.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_labels.diminfo[0].strides) = __pyx_v_count; /* "pandas/hashtable.pyx":512 * uniques.append(val) * labels[i] = count * count += 1 # <<<<<<<<<<<<<< * * arr_uniques = uniques.to_array() */ __pyx_v_count = (__pyx_v_count + 1); } __pyx_L6:; __pyx_L3_continue:; } /* "pandas/hashtable.pyx":514 * count += 1 * * arr_uniques = uniques.to_array() # <<<<<<<<<<<<<< * * return labels, arr_uniques */ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_uniques), __pyx_n_s_to_array); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 514; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_2 = PyObject_Call(__pyx_t_6, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 514; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_v_arr_uniques = __pyx_t_2; __pyx_t_2 = 0; /* "pandas/hashtable.pyx":516 * arr_uniques = uniques.to_array() * * return labels, arr_uniques # <<<<<<<<<<<<<< * * def unique(self, ndarray[int64_t] values): */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 516; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(((PyObject *)__pyx_v_labels)); PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_labels)); __Pyx_GIVEREF(((PyObject *)__pyx_v_labels)); __Pyx_INCREF(__pyx_v_arr_uniques); PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_arr_uniques); __Pyx_GIVEREF(__pyx_v_arr_uniques); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "pandas/hashtable.pyx":483 * return labels * * def get_labels_groupby(self, ndarray[int64_t] values): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = len(values) */ /* 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_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_labels.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.hashtable.Int64HashTable.get_labels_groupby", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_labels.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_labels); __Pyx_XDECREF((PyObject *)__pyx_v_uniques); __Pyx_XDECREF(__pyx_v_arr_uniques); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/hashtable.pyx":518 * return labels, arr_uniques * * def unique(self, ndarray[int64_t] values): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = len(values) */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_9hashtable_14Int64HashTable_27unique(PyObject *__pyx_v_self, PyObject *__pyx_v_values); /*proto*/ static PyObject *__pyx_pw_6pandas_9hashtable_14Int64HashTable_27unique(PyObject *__pyx_v_self, PyObject *__pyx_v_values) { CYTHON_UNUSED int __pyx_lineno = 0; CYTHON_UNUSED const char *__pyx_filename = NULL; CYTHON_UNUSED int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("unique (wrapper)", 0); if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 518; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_9hashtable_14Int64HashTable_26unique(((struct __pyx_obj_6pandas_9hashtable_Int64HashTable *)__pyx_v_self), ((PyArrayObject *)__pyx_v_values)); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_9hashtable_14Int64HashTable_26unique(struct __pyx_obj_6pandas_9hashtable_Int64HashTable *__pyx_v_self, PyArrayObject *__pyx_v_values) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_n; Py_ssize_t __pyx_v_count; int __pyx_v_ret; PyArrayObject *__pyx_v_result = 0; __pyx_t_5numpy_int64_t __pyx_v_val; khiter_t __pyx_v_k; struct __pyx_obj_6pandas_9hashtable_Int64Vector *__pyx_v_uniques = 0; __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; Py_ssize_t __pyx_t_3; Py_ssize_t __pyx_t_4; int __pyx_t_5; int __pyx_t_6; PyObject *__pyx_t_7 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("unique", 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_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 518; __pyx_clineno = __LINE__; goto __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/hashtable.pyx":520 * def unique(self, ndarray[int64_t] values): * cdef: * Py_ssize_t i, n = len(values) # <<<<<<<<<<<<<< * Py_ssize_t idx, count = 0 * int ret = 0 */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 520; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/hashtable.pyx":521 * cdef: * Py_ssize_t i, n = len(values) * Py_ssize_t idx, count = 0 # <<<<<<<<<<<<<< * int ret = 0 * ndarray result */ __pyx_v_count = 0; /* "pandas/hashtable.pyx":522 * Py_ssize_t i, n = len(values) * Py_ssize_t idx, count = 0 * int ret = 0 # <<<<<<<<<<<<<< * ndarray result * int64_t val */ __pyx_v_ret = 0; /* "pandas/hashtable.pyx":526 * int64_t val * khiter_t k * Int64Vector uniques = Int64Vector() # <<<<<<<<<<<<<< * * for i in range(n): */ __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_6pandas_9hashtable_Int64Vector)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 526; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_v_uniques = ((struct __pyx_obj_6pandas_9hashtable_Int64Vector *)__pyx_t_2); __pyx_t_2 = 0; /* "pandas/hashtable.pyx":528 * Int64Vector uniques = Int64Vector() * * for i in range(n): # <<<<<<<<<<<<<< * val = values[i] * k = kh_get_int64(self.table, val) */ __pyx_t_1 = __pyx_v_n; for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_1; __pyx_t_3+=1) { __pyx_v_i = __pyx_t_3; /* "pandas/hashtable.pyx":529 * * for i in range(n): * val = values[i] # <<<<<<<<<<<<<< * k = kh_get_int64(self.table, val) * if k == self.table.n_buckets: */ __pyx_t_4 = __pyx_v_i; __pyx_t_5 = -1; if (__pyx_t_4 < 0) { __pyx_t_4 += __pyx_pybuffernd_values.diminfo[0].shape; if (unlikely(__pyx_t_4 < 0)) __pyx_t_5 = 0; } else if (unlikely(__pyx_t_4 >= __pyx_pybuffernd_values.diminfo[0].shape)) __pyx_t_5 = 0; if (unlikely(__pyx_t_5 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_5); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 529; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_val = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_4, __pyx_pybuffernd_values.diminfo[0].strides)); /* "pandas/hashtable.pyx":530 * for i in range(n): * val = values[i] * k = kh_get_int64(self.table, val) # <<<<<<<<<<<<<< * if k == self.table.n_buckets: * k = kh_put_int64(self.table, val, &ret) */ __pyx_v_k = kh_get_int64(__pyx_v_self->table, __pyx_v_val); /* "pandas/hashtable.pyx":531 * val = values[i] * k = kh_get_int64(self.table, val) * if k == self.table.n_buckets: # <<<<<<<<<<<<<< * k = kh_put_int64(self.table, val, &ret) * uniques.append(val) */ __pyx_t_6 = ((__pyx_v_k == __pyx_v_self->table->n_buckets) != 0); if (__pyx_t_6) { /* "pandas/hashtable.pyx":532 * k = kh_get_int64(self.table, val) * if k == self.table.n_buckets: * k = kh_put_int64(self.table, val, &ret) # <<<<<<<<<<<<<< * uniques.append(val) * count += 1 */ __pyx_v_k = kh_put_int64(__pyx_v_self->table, __pyx_v_val, (&__pyx_v_ret)); /* "pandas/hashtable.pyx":533 * if k == self.table.n_buckets: * k = kh_put_int64(self.table, val, &ret) * uniques.append(val) # <<<<<<<<<<<<<< * count += 1 * */ __pyx_t_2 = __pyx_f_6pandas_9hashtable_11Int64Vector_append(__pyx_v_uniques, __pyx_v_val); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 533; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/hashtable.pyx":534 * k = kh_put_int64(self.table, val, &ret) * uniques.append(val) * count += 1 # <<<<<<<<<<<<<< * * result = uniques.to_array() */ __pyx_v_count = (__pyx_v_count + 1); goto __pyx_L5; } __pyx_L5:; } /* "pandas/hashtable.pyx":536 * count += 1 * * result = uniques.to_array() # <<<<<<<<<<<<<< * * return result */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_uniques), __pyx_n_s_to_array); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 536; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_7 = PyObject_Call(__pyx_t_2, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 536; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (!(likely(((__pyx_t_7) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_7, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 536; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_result = ((PyArrayObject *)__pyx_t_7); __pyx_t_7 = 0; /* "pandas/hashtable.pyx":538 * result = uniques.to_array() * * return result # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_result)); __pyx_r = ((PyObject *)__pyx_v_result); goto __pyx_L0; /* "pandas/hashtable.pyx":518 * return labels, arr_uniques * * def unique(self, ndarray[int64_t] values): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = len(values) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_7); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __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.hashtable.Int64HashTable.unique", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_result); __Pyx_XDECREF((PyObject *)__pyx_v_uniques); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/hashtable.pyx":544 * # cdef kh_float64_t *table * * def __cinit__(self, size_hint=1): # <<<<<<<<<<<<<< * self.table = kh_init_float64() * if size_hint is not None: */ /* Python wrapper */ static int __pyx_pw_6pandas_9hashtable_16Float64HashTable_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_pw_6pandas_9hashtable_16Float64HashTable_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_size_hint = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_size_hint,0}; PyObject* values[1] = {0}; values[0] = ((PyObject *)__pyx_int_1); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_size_hint); if (value) { values[0] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 544; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_size_hint = values[0]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 544; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.hashtable.Float64HashTable.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return -1; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pandas_9hashtable_16Float64HashTable___cinit__(((struct __pyx_obj_6pandas_9hashtable_Float64HashTable *)__pyx_v_self), __pyx_v_size_hint); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pandas_9hashtable_16Float64HashTable___cinit__(struct __pyx_obj_6pandas_9hashtable_Float64HashTable *__pyx_v_self, PyObject *__pyx_v_size_hint) { int __pyx_r; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; khint_t __pyx_t_3; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__cinit__", 0); /* "pandas/hashtable.pyx":545 * * def __cinit__(self, size_hint=1): * self.table = kh_init_float64() # <<<<<<<<<<<<<< * if size_hint is not None: * kh_resize_float64(self.table, size_hint) */ __pyx_v_self->table = kh_init_float64(); /* "pandas/hashtable.pyx":546 * def __cinit__(self, size_hint=1): * self.table = kh_init_float64() * if size_hint is not None: # <<<<<<<<<<<<<< * kh_resize_float64(self.table, size_hint) * */ __pyx_t_1 = (__pyx_v_size_hint != Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { /* "pandas/hashtable.pyx":547 * self.table = kh_init_float64() * if size_hint is not None: * kh_resize_float64(self.table, size_hint) # <<<<<<<<<<<<<< * * def __len__(self): */ __pyx_t_3 = __Pyx_PyInt_As_npy_uint32(__pyx_v_size_hint); if (unlikely((__pyx_t_3 == (khint_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 547; __pyx_clineno = __LINE__; goto __pyx_L1_error;} kh_resize_float64(__pyx_v_self->table, __pyx_t_3); goto __pyx_L3; } __pyx_L3:; /* "pandas/hashtable.pyx":544 * # cdef kh_float64_t *table * * def __cinit__(self, size_hint=1): # <<<<<<<<<<<<<< * self.table = kh_init_float64() * if size_hint is not None: */ /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("pandas.hashtable.Float64HashTable.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/hashtable.pyx":549 * kh_resize_float64(self.table, size_hint) * * def __len__(self): # <<<<<<<<<<<<<< * return self.table.size * */ /* Python wrapper */ static Py_ssize_t __pyx_pw_6pandas_9hashtable_16Float64HashTable_3__len__(PyObject *__pyx_v_self); /*proto*/ static Py_ssize_t __pyx_pw_6pandas_9hashtable_16Float64HashTable_3__len__(PyObject *__pyx_v_self) { Py_ssize_t __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__len__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_9hashtable_16Float64HashTable_2__len__(((struct __pyx_obj_6pandas_9hashtable_Float64HashTable *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static Py_ssize_t __pyx_pf_6pandas_9hashtable_16Float64HashTable_2__len__(struct __pyx_obj_6pandas_9hashtable_Float64HashTable *__pyx_v_self) { Py_ssize_t __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__len__", 0); /* "pandas/hashtable.pyx":550 * * def __len__(self): * return self.table.size # <<<<<<<<<<<<<< * * def __dealloc__(self): */ __pyx_r = __pyx_v_self->table->size; goto __pyx_L0; /* "pandas/hashtable.pyx":549 * kh_resize_float64(self.table, size_hint) * * def __len__(self): # <<<<<<<<<<<<<< * return self.table.size * */ /* function exit code */ __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/hashtable.pyx":552 * return self.table.size * * def __dealloc__(self): # <<<<<<<<<<<<<< * kh_destroy_float64(self.table) * */ /* Python wrapper */ static void __pyx_pw_6pandas_9hashtable_16Float64HashTable_5__dealloc__(PyObject *__pyx_v_self); /*proto*/ static void __pyx_pw_6pandas_9hashtable_16Float64HashTable_5__dealloc__(PyObject *__pyx_v_self) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0); __pyx_pf_6pandas_9hashtable_16Float64HashTable_4__dealloc__(((struct __pyx_obj_6pandas_9hashtable_Float64HashTable *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); } static void __pyx_pf_6pandas_9hashtable_16Float64HashTable_4__dealloc__(struct __pyx_obj_6pandas_9hashtable_Float64HashTable *__pyx_v_self) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__dealloc__", 0); /* "pandas/hashtable.pyx":553 * * def __dealloc__(self): * kh_destroy_float64(self.table) # <<<<<<<<<<<<<< * * def factorize(self, ndarray[float64_t] values): */ kh_destroy_float64(__pyx_v_self->table); /* "pandas/hashtable.pyx":552 * return self.table.size * * def __dealloc__(self): # <<<<<<<<<<<<<< * kh_destroy_float64(self.table) * */ /* function exit code */ __Pyx_RefNannyFinishContext(); } /* "pandas/hashtable.pyx":555 * kh_destroy_float64(self.table) * * def factorize(self, ndarray[float64_t] values): # <<<<<<<<<<<<<< * uniques = Float64Vector() * labels = self.get_labels(values, uniques, 0, -1) */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_9hashtable_16Float64HashTable_7factorize(PyObject *__pyx_v_self, PyObject *__pyx_v_values); /*proto*/ static PyObject *__pyx_pw_6pandas_9hashtable_16Float64HashTable_7factorize(PyObject *__pyx_v_self, PyObject *__pyx_v_values) { CYTHON_UNUSED int __pyx_lineno = 0; CYTHON_UNUSED const char *__pyx_filename = NULL; CYTHON_UNUSED int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("factorize (wrapper)", 0); if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 555; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_9hashtable_16Float64HashTable_6factorize(((struct __pyx_obj_6pandas_9hashtable_Float64HashTable *)__pyx_v_self), ((PyArrayObject *)__pyx_v_values)); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_9hashtable_16Float64HashTable_6factorize(struct __pyx_obj_6pandas_9hashtable_Float64HashTable *__pyx_v_self, PyArrayObject *__pyx_v_values) { struct __pyx_obj_6pandas_9hashtable_Float64Vector *__pyx_v_uniques = NULL; PyObject *__pyx_v_labels = NULL; __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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("factorize", 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_filename = __pyx_f[0]; __pyx_lineno = 555; __pyx_clineno = __LINE__; goto __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/hashtable.pyx":556 * * def factorize(self, ndarray[float64_t] values): * uniques = Float64Vector() # <<<<<<<<<<<<<< * labels = self.get_labels(values, uniques, 0, -1) * return uniques.to_array(), labels */ __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_6pandas_9hashtable_Float64Vector)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 556; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_v_uniques = ((struct __pyx_obj_6pandas_9hashtable_Float64Vector *)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/hashtable.pyx":557 * def factorize(self, ndarray[float64_t] values): * uniques = Float64Vector() * labels = self.get_labels(values, uniques, 0, -1) # <<<<<<<<<<<<<< * return uniques.to_array(), labels * */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get_labels); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 557; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyTuple_New(4); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 557; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(((PyObject *)__pyx_v_values)); PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_values)); __Pyx_GIVEREF(((PyObject *)__pyx_v_values)); __Pyx_INCREF(((PyObject *)__pyx_v_uniques)); PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)__pyx_v_uniques)); __Pyx_GIVEREF(((PyObject *)__pyx_v_uniques)); __Pyx_INCREF(__pyx_int_0); PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_int_0); __Pyx_GIVEREF(__pyx_int_0); __Pyx_INCREF(__pyx_int_neg_1); PyTuple_SET_ITEM(__pyx_t_2, 3, __pyx_int_neg_1); __Pyx_GIVEREF(__pyx_int_neg_1); __pyx_t_3 = PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 557; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_labels = __pyx_t_3; __pyx_t_3 = 0; /* "pandas/hashtable.pyx":558 * uniques = Float64Vector() * labels = self.get_labels(values, uniques, 0, -1) * return uniques.to_array(), labels # <<<<<<<<<<<<<< * * def get_labels(self, ndarray[float64_t] values, */ __Pyx_XDECREF(__pyx_r); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_uniques), __pyx_n_s_to_array); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 558; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = PyObject_Call(__pyx_t_3, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 558; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 558; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_labels); PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_labels); __Pyx_GIVEREF(__pyx_v_labels); __pyx_t_2 = 0; __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; /* "pandas/hashtable.pyx":555 * kh_destroy_float64(self.table) * * def factorize(self, ndarray[float64_t] values): # <<<<<<<<<<<<<< * uniques = Float64Vector() * labels = self.get_labels(values, uniques, 0, -1) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __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.hashtable.Float64HashTable.factorize", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_uniques); __Pyx_XDECREF(__pyx_v_labels); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/hashtable.pyx":560 * return uniques.to_array(), labels * * def get_labels(self, ndarray[float64_t] values, # <<<<<<<<<<<<<< * Float64Vector uniques, * Py_ssize_t count_prior, int64_t na_sentinel): */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_9hashtable_16Float64HashTable_9get_labels(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_6pandas_9hashtable_16Float64HashTable_9get_labels(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_values = 0; struct __pyx_obj_6pandas_9hashtable_Float64Vector *__pyx_v_uniques = 0; Py_ssize_t __pyx_v_count_prior; __pyx_t_5numpy_int64_t __pyx_v_na_sentinel; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("get_labels (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_values,&__pyx_n_s_uniques,&__pyx_n_s_count_prior,&__pyx_n_s_na_sentinel,0}; PyObject* values[4] = {0,0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_values)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_uniques)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("get_labels", 1, 4, 4, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 560; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_count_prior)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("get_labels", 1, 4, 4, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 560; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_na_sentinel)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("get_labels", 1, 4, 4, 3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 560; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "get_labels") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 560; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 4) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[3] = PyTuple_GET_ITEM(__pyx_args, 3); } __pyx_v_values = ((PyArrayObject *)values[0]); __pyx_v_uniques = ((struct __pyx_obj_6pandas_9hashtable_Float64Vector *)values[1]); __pyx_v_count_prior = __Pyx_PyIndex_AsSsize_t(values[2]); if (unlikely((__pyx_v_count_prior == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 562; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_na_sentinel = __Pyx_PyInt_As_npy_int64(values[3]); if (unlikely((__pyx_v_na_sentinel == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 562; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("get_labels", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 560; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.hashtable.Float64HashTable.get_labels", __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_filename = __pyx_f[0]; __pyx_lineno = 560; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_uniques), __pyx_ptype_6pandas_9hashtable_Float64Vector, 1, "uniques", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 561; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_9hashtable_16Float64HashTable_8get_labels(((struct __pyx_obj_6pandas_9hashtable_Float64HashTable *)__pyx_v_self), __pyx_v_values, __pyx_v_uniques, __pyx_v_count_prior, __pyx_v_na_sentinel); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_9hashtable_16Float64HashTable_8get_labels(struct __pyx_obj_6pandas_9hashtable_Float64HashTable *__pyx_v_self, PyArrayObject *__pyx_v_values, struct __pyx_obj_6pandas_9hashtable_Float64Vector *__pyx_v_uniques, Py_ssize_t __pyx_v_count_prior, __pyx_t_5numpy_int64_t __pyx_v_na_sentinel) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_n; PyArrayObject *__pyx_v_labels = 0; Py_ssize_t __pyx_v_idx; Py_ssize_t __pyx_v_count; int __pyx_v_ret; __pyx_t_5numpy_float64_t __pyx_v_val; khiter_t __pyx_v_k; __Pyx_LocalBuf_ND __pyx_pybuffernd_labels; __Pyx_Buffer __pyx_pybuffer_labels; __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; int __pyx_t_14; Py_ssize_t __pyx_t_15; Py_ssize_t __pyx_t_16; Py_ssize_t __pyx_t_17; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_labels", 0); __pyx_pybuffer_labels.pybuffer.buf = NULL; __pyx_pybuffer_labels.refcount = 0; __pyx_pybuffernd_labels.data = NULL; __pyx_pybuffernd_labels.rcbuffer = &__pyx_pybuffer_labels; __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_filename = __pyx_f[0]; __pyx_lineno = 560; __pyx_clineno = __LINE__; goto __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/hashtable.pyx":564 * Py_ssize_t count_prior, int64_t na_sentinel): * cdef: * Py_ssize_t i, n = len(values) # <<<<<<<<<<<<<< * ndarray[int64_t] labels * Py_ssize_t idx, count = count_prior */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 564; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/hashtable.pyx":566 * Py_ssize_t i, n = len(values) * ndarray[int64_t] labels * Py_ssize_t idx, count = count_prior # <<<<<<<<<<<<<< * int ret = 0 * float64_t val */ __pyx_v_count = __pyx_v_count_prior; /* "pandas/hashtable.pyx":567 * ndarray[int64_t] labels * Py_ssize_t idx, count = count_prior * int ret = 0 # <<<<<<<<<<<<<< * float64_t val * khiter_t k */ __pyx_v_ret = 0; /* "pandas/hashtable.pyx":571 * khiter_t k * * labels = np.empty(n, dtype=np.int64) # <<<<<<<<<<<<<< * * for i in range(n): */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 571; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 571; __pyx_clineno = __LINE__; goto __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_n); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 571; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 571; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 571; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 571; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_int64); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 571; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 571; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyObject_Call(__pyx_t_3, __pyx_t_4, __pyx_t_2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 571; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 571; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_7 = ((PyArrayObject *)__pyx_t_6); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_labels.rcbuffer->pybuffer); __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_labels.rcbuffer->pybuffer, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_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_labels.rcbuffer->pybuffer, (PyObject*)__pyx_v_labels, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_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_pybuffernd_labels.diminfo[0].strides = __pyx_pybuffernd_labels.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_labels.diminfo[0].shape = __pyx_pybuffernd_labels.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 571; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_7 = 0; __pyx_v_labels = ((PyArrayObject *)__pyx_t_6); __pyx_t_6 = 0; /* "pandas/hashtable.pyx":573 * labels = np.empty(n, dtype=np.int64) * * for i in range(n): # <<<<<<<<<<<<<< * val = values[i] * */ __pyx_t_1 = __pyx_v_n; for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_1; __pyx_t_12+=1) { __pyx_v_i = __pyx_t_12; /* "pandas/hashtable.pyx":574 * * for i in range(n): * val = values[i] # <<<<<<<<<<<<<< * * if val != val: */ __pyx_t_13 = __pyx_v_i; __pyx_t_8 = -1; if (__pyx_t_13 < 0) { __pyx_t_13 += __pyx_pybuffernd_values.diminfo[0].shape; if (unlikely(__pyx_t_13 < 0)) __pyx_t_8 = 0; } else if (unlikely(__pyx_t_13 >= __pyx_pybuffernd_values.diminfo[0].shape)) __pyx_t_8 = 0; if (unlikely(__pyx_t_8 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_8); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 574; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_val = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_values.diminfo[0].strides)); /* "pandas/hashtable.pyx":576 * val = values[i] * * if val != val: # <<<<<<<<<<<<<< * labels[i] = na_sentinel * continue */ __pyx_t_14 = ((__pyx_v_val != __pyx_v_val) != 0); if (__pyx_t_14) { /* "pandas/hashtable.pyx":577 * * if val != val: * labels[i] = na_sentinel # <<<<<<<<<<<<<< * continue * */ __pyx_t_15 = __pyx_v_i; __pyx_t_8 = -1; if (__pyx_t_15 < 0) { __pyx_t_15 += __pyx_pybuffernd_labels.diminfo[0].shape; if (unlikely(__pyx_t_15 < 0)) __pyx_t_8 = 0; } else if (unlikely(__pyx_t_15 >= __pyx_pybuffernd_labels.diminfo[0].shape)) __pyx_t_8 = 0; if (unlikely(__pyx_t_8 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_8); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 577; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_labels.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_labels.diminfo[0].strides) = __pyx_v_na_sentinel; /* "pandas/hashtable.pyx":578 * if val != val: * labels[i] = na_sentinel * continue # <<<<<<<<<<<<<< * * k = kh_get_float64(self.table, val) */ goto __pyx_L3_continue; } /* "pandas/hashtable.pyx":580 * continue * * k = kh_get_float64(self.table, val) # <<<<<<<<<<<<<< * if k != self.table.n_buckets: * idx = self.table.vals[k] */ __pyx_v_k = kh_get_float64(__pyx_v_self->table, __pyx_v_val); /* "pandas/hashtable.pyx":581 * * k = kh_get_float64(self.table, val) * if k != self.table.n_buckets: # <<<<<<<<<<<<<< * idx = self.table.vals[k] * labels[i] = idx */ __pyx_t_14 = ((__pyx_v_k != __pyx_v_self->table->n_buckets) != 0); if (__pyx_t_14) { /* "pandas/hashtable.pyx":582 * k = kh_get_float64(self.table, val) * if k != self.table.n_buckets: * idx = self.table.vals[k] # <<<<<<<<<<<<<< * labels[i] = idx * else: */ __pyx_v_idx = (__pyx_v_self->table->vals[__pyx_v_k]); /* "pandas/hashtable.pyx":583 * if k != self.table.n_buckets: * idx = self.table.vals[k] * labels[i] = idx # <<<<<<<<<<<<<< * else: * k = kh_put_float64(self.table, val, &ret) */ __pyx_t_16 = __pyx_v_i; __pyx_t_8 = -1; if (__pyx_t_16 < 0) { __pyx_t_16 += __pyx_pybuffernd_labels.diminfo[0].shape; if (unlikely(__pyx_t_16 < 0)) __pyx_t_8 = 0; } else if (unlikely(__pyx_t_16 >= __pyx_pybuffernd_labels.diminfo[0].shape)) __pyx_t_8 = 0; if (unlikely(__pyx_t_8 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_8); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 583; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_labels.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_labels.diminfo[0].strides) = __pyx_v_idx; goto __pyx_L6; } /*else*/ { /* "pandas/hashtable.pyx":585 * labels[i] = idx * else: * k = kh_put_float64(self.table, val, &ret) # <<<<<<<<<<<<<< * self.table.vals[k] = count * uniques.append(val) */ __pyx_v_k = kh_put_float64(__pyx_v_self->table, __pyx_v_val, (&__pyx_v_ret)); /* "pandas/hashtable.pyx":586 * else: * k = kh_put_float64(self.table, val, &ret) * self.table.vals[k] = count # <<<<<<<<<<<<<< * uniques.append(val) * labels[i] = count */ (__pyx_v_self->table->vals[__pyx_v_k]) = __pyx_v_count; /* "pandas/hashtable.pyx":587 * k = kh_put_float64(self.table, val, &ret) * self.table.vals[k] = count * uniques.append(val) # <<<<<<<<<<<<<< * labels[i] = count * count += 1 */ __pyx_t_6 = __pyx_f_6pandas_9hashtable_13Float64Vector_append(__pyx_v_uniques, __pyx_v_val); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 587; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; /* "pandas/hashtable.pyx":588 * self.table.vals[k] = count * uniques.append(val) * labels[i] = count # <<<<<<<<<<<<<< * count += 1 * */ __pyx_t_17 = __pyx_v_i; __pyx_t_8 = -1; if (__pyx_t_17 < 0) { __pyx_t_17 += __pyx_pybuffernd_labels.diminfo[0].shape; if (unlikely(__pyx_t_17 < 0)) __pyx_t_8 = 0; } else if (unlikely(__pyx_t_17 >= __pyx_pybuffernd_labels.diminfo[0].shape)) __pyx_t_8 = 0; if (unlikely(__pyx_t_8 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_8); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 588; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_labels.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_labels.diminfo[0].strides) = __pyx_v_count; /* "pandas/hashtable.pyx":589 * uniques.append(val) * labels[i] = count * count += 1 # <<<<<<<<<<<<<< * * return labels */ __pyx_v_count = (__pyx_v_count + 1); } __pyx_L6:; __pyx_L3_continue:; } /* "pandas/hashtable.pyx":591 * count += 1 * * return labels # <<<<<<<<<<<<<< * * def map_locations(self, ndarray[float64_t] values): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_labels)); __pyx_r = ((PyObject *)__pyx_v_labels); goto __pyx_L0; /* "pandas/hashtable.pyx":560 * return uniques.to_array(), labels * * def get_labels(self, ndarray[float64_t] values, # <<<<<<<<<<<<<< * Float64Vector uniques, * Py_ssize_t count_prior, int64_t na_sentinel): */ /* 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_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_labels.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.hashtable.Float64HashTable.get_labels", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_labels.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_labels); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/hashtable.pyx":593 * return labels * * def map_locations(self, ndarray[float64_t] values): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = len(values) */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_9hashtable_16Float64HashTable_11map_locations(PyObject *__pyx_v_self, PyObject *__pyx_v_values); /*proto*/ static PyObject *__pyx_pw_6pandas_9hashtable_16Float64HashTable_11map_locations(PyObject *__pyx_v_self, PyObject *__pyx_v_values) { CYTHON_UNUSED int __pyx_lineno = 0; CYTHON_UNUSED const char *__pyx_filename = NULL; CYTHON_UNUSED int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("map_locations (wrapper)", 0); if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 593; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_9hashtable_16Float64HashTable_10map_locations(((struct __pyx_obj_6pandas_9hashtable_Float64HashTable *)__pyx_v_self), ((PyArrayObject *)__pyx_v_values)); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_9hashtable_16Float64HashTable_10map_locations(struct __pyx_obj_6pandas_9hashtable_Float64HashTable *__pyx_v_self, PyArrayObject *__pyx_v_values) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_n; int __pyx_v_ret; khiter_t __pyx_v_k; __Pyx_LocalBuf_ND __pyx_pybuffernd_values; __Pyx_Buffer __pyx_pybuffer_values; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; Py_ssize_t __pyx_t_2; Py_ssize_t __pyx_t_3; int __pyx_t_4; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("map_locations", 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_filename = __pyx_f[0]; __pyx_lineno = 593; __pyx_clineno = __LINE__; goto __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/hashtable.pyx":595 * def map_locations(self, ndarray[float64_t] values): * cdef: * Py_ssize_t i, n = len(values) # <<<<<<<<<<<<<< * int ret = 0 * khiter_t k */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 595; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/hashtable.pyx":596 * cdef: * Py_ssize_t i, n = len(values) * int ret = 0 # <<<<<<<<<<<<<< * khiter_t k * */ __pyx_v_ret = 0; /* "pandas/hashtable.pyx":599 * khiter_t k * * for i in range(n): # <<<<<<<<<<<<<< * k = kh_put_float64(self.table, values[i], &ret) * self.table.vals[k] = i */ __pyx_t_1 = __pyx_v_n; for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) { __pyx_v_i = __pyx_t_2; /* "pandas/hashtable.pyx":600 * * for i in range(n): * k = kh_put_float64(self.table, values[i], &ret) # <<<<<<<<<<<<<< * self.table.vals[k] = i * */ __pyx_t_3 = __pyx_v_i; __pyx_t_4 = -1; if (__pyx_t_3 < 0) { __pyx_t_3 += __pyx_pybuffernd_values.diminfo[0].shape; if (unlikely(__pyx_t_3 < 0)) __pyx_t_4 = 0; } else if (unlikely(__pyx_t_3 >= __pyx_pybuffernd_values.diminfo[0].shape)) __pyx_t_4 = 0; if (unlikely(__pyx_t_4 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_4); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 600; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_k = kh_put_float64(__pyx_v_self->table, (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_3, __pyx_pybuffernd_values.diminfo[0].strides)), (&__pyx_v_ret)); /* "pandas/hashtable.pyx":601 * for i in range(n): * k = kh_put_float64(self.table, values[i], &ret) * self.table.vals[k] = i # <<<<<<<<<<<<<< * * def lookup(self, ndarray[float64_t] values): */ (__pyx_v_self->table->vals[__pyx_v_k]) = __pyx_v_i; } /* "pandas/hashtable.pyx":593 * return labels * * def map_locations(self, ndarray[float64_t] values): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = len(values) */ /* 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_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.hashtable.Float64HashTable.map_locations", __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/hashtable.pyx":603 * self.table.vals[k] = i * * def lookup(self, ndarray[float64_t] values): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = len(values) */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_9hashtable_16Float64HashTable_13lookup(PyObject *__pyx_v_self, PyObject *__pyx_v_values); /*proto*/ static PyObject *__pyx_pw_6pandas_9hashtable_16Float64HashTable_13lookup(PyObject *__pyx_v_self, PyObject *__pyx_v_values) { CYTHON_UNUSED int __pyx_lineno = 0; CYTHON_UNUSED const char *__pyx_filename = NULL; CYTHON_UNUSED int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("lookup (wrapper)", 0); if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 603; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_9hashtable_16Float64HashTable_12lookup(((struct __pyx_obj_6pandas_9hashtable_Float64HashTable *)__pyx_v_self), ((PyArrayObject *)__pyx_v_values)); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_9hashtable_16Float64HashTable_12lookup(struct __pyx_obj_6pandas_9hashtable_Float64HashTable *__pyx_v_self, PyArrayObject *__pyx_v_values) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_n; CYTHON_UNUSED int __pyx_v_ret; __pyx_t_5numpy_float64_t __pyx_v_val; khiter_t __pyx_v_k; PyArrayObject *__pyx_v_locs = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_locs; __Pyx_Buffer __pyx_pybuffer_locs; __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; Py_ssize_t __pyx_t_8; Py_ssize_t __pyx_t_9; int __pyx_t_10; int __pyx_t_11; Py_ssize_t __pyx_t_12; Py_ssize_t __pyx_t_13; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __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_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_filename = __pyx_f[0]; __pyx_lineno = 603; __pyx_clineno = __LINE__; goto __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/hashtable.pyx":605 * def lookup(self, ndarray[float64_t] values): * cdef: * Py_ssize_t i, n = len(values) # <<<<<<<<<<<<<< * int ret = 0 * float64_t val */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 605; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/hashtable.pyx":606 * cdef: * Py_ssize_t i, n = len(values) * int ret = 0 # <<<<<<<<<<<<<< * float64_t val * khiter_t k */ __pyx_v_ret = 0; /* "pandas/hashtable.pyx":609 * float64_t val * khiter_t k * ndarray[int64_t] locs = np.empty(n, dtype=np.int64) # <<<<<<<<<<<<<< * * for i in range(n): */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 609; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 609; __pyx_clineno = __LINE__; goto __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_n); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 609; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 609; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 609; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 609; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_int64); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 609; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 609; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyObject_Call(__pyx_t_3, __pyx_t_4, __pyx_t_2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 609; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 609; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_7 = ((PyArrayObject *)__pyx_t_6); { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_locs.rcbuffer->pybuffer, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { __pyx_v_locs = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_locs.rcbuffer->pybuffer.buf = NULL; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 609; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } else {__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]; } } __pyx_t_7 = 0; __pyx_v_locs = ((PyArrayObject *)__pyx_t_6); __pyx_t_6 = 0; /* "pandas/hashtable.pyx":611 * ndarray[int64_t] locs = np.empty(n, dtype=np.int64) * * for i in range(n): # <<<<<<<<<<<<<< * val = values[i] * k = kh_get_float64(self.table, val) */ __pyx_t_1 = __pyx_v_n; for (__pyx_t_8 = 0; __pyx_t_8 < __pyx_t_1; __pyx_t_8+=1) { __pyx_v_i = __pyx_t_8; /* "pandas/hashtable.pyx":612 * * for i in range(n): * val = values[i] # <<<<<<<<<<<<<< * k = kh_get_float64(self.table, val) * if k != self.table.n_buckets: */ __pyx_t_9 = __pyx_v_i; __pyx_t_10 = -1; if (__pyx_t_9 < 0) { __pyx_t_9 += __pyx_pybuffernd_values.diminfo[0].shape; if (unlikely(__pyx_t_9 < 0)) __pyx_t_10 = 0; } else if (unlikely(__pyx_t_9 >= __pyx_pybuffernd_values.diminfo[0].shape)) __pyx_t_10 = 0; if (unlikely(__pyx_t_10 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_10); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 612; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_val = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_9, __pyx_pybuffernd_values.diminfo[0].strides)); /* "pandas/hashtable.pyx":613 * for i in range(n): * val = values[i] * k = kh_get_float64(self.table, val) # <<<<<<<<<<<<<< * if k != self.table.n_buckets: * locs[i] = self.table.vals[k] */ __pyx_v_k = kh_get_float64(__pyx_v_self->table, __pyx_v_val); /* "pandas/hashtable.pyx":614 * val = values[i] * k = kh_get_float64(self.table, val) * if k != self.table.n_buckets: # <<<<<<<<<<<<<< * locs[i] = self.table.vals[k] * else: */ __pyx_t_11 = ((__pyx_v_k != __pyx_v_self->table->n_buckets) != 0); if (__pyx_t_11) { /* "pandas/hashtable.pyx":615 * k = kh_get_float64(self.table, val) * if k != self.table.n_buckets: * locs[i] = self.table.vals[k] # <<<<<<<<<<<<<< * else: * locs[i] = -1 */ __pyx_t_12 = __pyx_v_i; __pyx_t_10 = -1; if (__pyx_t_12 < 0) { __pyx_t_12 += __pyx_pybuffernd_locs.diminfo[0].shape; if (unlikely(__pyx_t_12 < 0)) __pyx_t_10 = 0; } else if (unlikely(__pyx_t_12 >= __pyx_pybuffernd_locs.diminfo[0].shape)) __pyx_t_10 = 0; if (unlikely(__pyx_t_10 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_10); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 615; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_locs.rcbuffer->pybuffer.buf, __pyx_t_12, __pyx_pybuffernd_locs.diminfo[0].strides) = (__pyx_v_self->table->vals[__pyx_v_k]); goto __pyx_L5; } /*else*/ { /* "pandas/hashtable.pyx":617 * locs[i] = self.table.vals[k] * else: * locs[i] = -1 # <<<<<<<<<<<<<< * * return locs */ __pyx_t_13 = __pyx_v_i; __pyx_t_10 = -1; if (__pyx_t_13 < 0) { __pyx_t_13 += __pyx_pybuffernd_locs.diminfo[0].shape; if (unlikely(__pyx_t_13 < 0)) __pyx_t_10 = 0; } else if (unlikely(__pyx_t_13 >= __pyx_pybuffernd_locs.diminfo[0].shape)) __pyx_t_10 = 0; if (unlikely(__pyx_t_10 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_10); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 617; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_locs.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_locs.diminfo[0].strides) = -1; } __pyx_L5:; } /* "pandas/hashtable.pyx":619 * locs[i] = -1 * * return locs # <<<<<<<<<<<<<< * * def unique(self, ndarray[float64_t] values): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_locs)); __pyx_r = ((PyObject *)__pyx_v_locs); goto __pyx_L0; /* "pandas/hashtable.pyx":603 * self.table.vals[k] = i * * def lookup(self, ndarray[float64_t] values): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = len(values) */ /* 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_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_locs.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.hashtable.Float64HashTable.lookup", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_locs.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_locs); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/hashtable.pyx":621 * return locs * * def unique(self, ndarray[float64_t] values): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = len(values) */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_9hashtable_16Float64HashTable_15unique(PyObject *__pyx_v_self, PyObject *__pyx_v_values); /*proto*/ static PyObject *__pyx_pw_6pandas_9hashtable_16Float64HashTable_15unique(PyObject *__pyx_v_self, PyObject *__pyx_v_values) { CYTHON_UNUSED int __pyx_lineno = 0; CYTHON_UNUSED const char *__pyx_filename = NULL; CYTHON_UNUSED int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("unique (wrapper)", 0); if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 621; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_9hashtable_16Float64HashTable_14unique(((struct __pyx_obj_6pandas_9hashtable_Float64HashTable *)__pyx_v_self), ((PyArrayObject *)__pyx_v_values)); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_9hashtable_16Float64HashTable_14unique(struct __pyx_obj_6pandas_9hashtable_Float64HashTable *__pyx_v_self, PyArrayObject *__pyx_v_values) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_n; Py_ssize_t __pyx_v_count; int __pyx_v_ret; __pyx_t_5numpy_float64_t __pyx_v_val; khiter_t __pyx_v_k; struct __pyx_obj_6pandas_9hashtable_Float64Vector *__pyx_v_uniques = 0; int __pyx_v_seen_na; __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; Py_ssize_t __pyx_t_3; Py_ssize_t __pyx_t_4; int __pyx_t_5; int __pyx_t_6; __pyx_t_5numpy_float64_t __pyx_t_7; PyObject *__pyx_t_8 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("unique", 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_filename = __pyx_f[0]; __pyx_lineno = 621; __pyx_clineno = __LINE__; goto __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/hashtable.pyx":623 * def unique(self, ndarray[float64_t] values): * cdef: * Py_ssize_t i, n = len(values) # <<<<<<<<<<<<<< * Py_ssize_t idx, count = 0 * int ret = 0 */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 623; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/hashtable.pyx":624 * cdef: * Py_ssize_t i, n = len(values) * Py_ssize_t idx, count = 0 # <<<<<<<<<<<<<< * int ret = 0 * float64_t val */ __pyx_v_count = 0; /* "pandas/hashtable.pyx":625 * Py_ssize_t i, n = len(values) * Py_ssize_t idx, count = 0 * int ret = 0 # <<<<<<<<<<<<<< * float64_t val * khiter_t k */ __pyx_v_ret = 0; /* "pandas/hashtable.pyx":628 * float64_t val * khiter_t k * Float64Vector uniques = Float64Vector() # <<<<<<<<<<<<<< * bint seen_na = 0 * */ __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_6pandas_9hashtable_Float64Vector)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 628; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_v_uniques = ((struct __pyx_obj_6pandas_9hashtable_Float64Vector *)__pyx_t_2); __pyx_t_2 = 0; /* "pandas/hashtable.pyx":629 * khiter_t k * Float64Vector uniques = Float64Vector() * bint seen_na = 0 # <<<<<<<<<<<<<< * * for i in range(n): */ __pyx_v_seen_na = 0; /* "pandas/hashtable.pyx":631 * bint seen_na = 0 * * for i in range(n): # <<<<<<<<<<<<<< * val = values[i] * */ __pyx_t_1 = __pyx_v_n; for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_1; __pyx_t_3+=1) { __pyx_v_i = __pyx_t_3; /* "pandas/hashtable.pyx":632 * * for i in range(n): * val = values[i] # <<<<<<<<<<<<<< * * if val == val: */ __pyx_t_4 = __pyx_v_i; __pyx_t_5 = -1; if (__pyx_t_4 < 0) { __pyx_t_4 += __pyx_pybuffernd_values.diminfo[0].shape; if (unlikely(__pyx_t_4 < 0)) __pyx_t_5 = 0; } else if (unlikely(__pyx_t_4 >= __pyx_pybuffernd_values.diminfo[0].shape)) __pyx_t_5 = 0; if (unlikely(__pyx_t_5 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_5); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 632; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_val = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_4, __pyx_pybuffernd_values.diminfo[0].strides)); /* "pandas/hashtable.pyx":634 * val = values[i] * * if val == val: # <<<<<<<<<<<<<< * k = kh_get_float64(self.table, val) * if k == self.table.n_buckets: */ __pyx_t_6 = ((__pyx_v_val == __pyx_v_val) != 0); if (__pyx_t_6) { /* "pandas/hashtable.pyx":635 * * if val == val: * k = kh_get_float64(self.table, val) # <<<<<<<<<<<<<< * if k == self.table.n_buckets: * k = kh_put_float64(self.table, val, &ret) */ __pyx_v_k = kh_get_float64(__pyx_v_self->table, __pyx_v_val); /* "pandas/hashtable.pyx":636 * if val == val: * k = kh_get_float64(self.table, val) * if k == self.table.n_buckets: # <<<<<<<<<<<<<< * k = kh_put_float64(self.table, val, &ret) * uniques.append(val) */ __pyx_t_6 = ((__pyx_v_k == __pyx_v_self->table->n_buckets) != 0); if (__pyx_t_6) { /* "pandas/hashtable.pyx":637 * k = kh_get_float64(self.table, val) * if k == self.table.n_buckets: * k = kh_put_float64(self.table, val, &ret) # <<<<<<<<<<<<<< * uniques.append(val) * count += 1 */ __pyx_v_k = kh_put_float64(__pyx_v_self->table, __pyx_v_val, (&__pyx_v_ret)); /* "pandas/hashtable.pyx":638 * if k == self.table.n_buckets: * k = kh_put_float64(self.table, val, &ret) * uniques.append(val) # <<<<<<<<<<<<<< * count += 1 * elif not seen_na: */ __pyx_t_2 = __pyx_f_6pandas_9hashtable_13Float64Vector_append(__pyx_v_uniques, __pyx_v_val); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 638; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/hashtable.pyx":639 * k = kh_put_float64(self.table, val, &ret) * uniques.append(val) * count += 1 # <<<<<<<<<<<<<< * elif not seen_na: * seen_na = 1 */ __pyx_v_count = (__pyx_v_count + 1); goto __pyx_L6; } __pyx_L6:; goto __pyx_L5; } /* "pandas/hashtable.pyx":640 * uniques.append(val) * count += 1 * elif not seen_na: # <<<<<<<<<<<<<< * seen_na = 1 * uniques.append(ONAN) */ __pyx_t_6 = ((!(__pyx_v_seen_na != 0)) != 0); if (__pyx_t_6) { /* "pandas/hashtable.pyx":641 * count += 1 * elif not seen_na: * seen_na = 1 # <<<<<<<<<<<<<< * uniques.append(ONAN) * */ __pyx_v_seen_na = 1; /* "pandas/hashtable.pyx":642 * elif not seen_na: * seen_na = 1 * uniques.append(ONAN) # <<<<<<<<<<<<<< * * return uniques.to_array() */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_ONAN); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 642; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_7 = __pyx_PyFloat_AsDouble(__pyx_t_2); if (unlikely((__pyx_t_7 == (npy_float64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 642; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __pyx_f_6pandas_9hashtable_13Float64Vector_append(__pyx_v_uniques, __pyx_t_7); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 642; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; goto __pyx_L5; } __pyx_L5:; } /* "pandas/hashtable.pyx":644 * uniques.append(ONAN) * * return uniques.to_array() # <<<<<<<<<<<<<< * * na_sentinel = object */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_uniques), __pyx_n_s_to_array); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 644; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_8 = PyObject_Call(__pyx_t_2, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 644; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_8; __pyx_t_8 = 0; goto __pyx_L0; /* "pandas/hashtable.pyx":621 * return locs * * def unique(self, ndarray[float64_t] values): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = len(values) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_8); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __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.hashtable.Float64HashTable.unique", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_uniques); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/hashtable.pyx":651 * # cdef kh_pymap_t *table * * def __init__(self, size_hint=1): # <<<<<<<<<<<<<< * self.table = kh_init_pymap() * kh_resize_pymap(self.table, size_hint) */ /* Python wrapper */ static int __pyx_pw_6pandas_9hashtable_17PyObjectHashTable_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_pw_6pandas_9hashtable_17PyObjectHashTable_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_size_hint = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_size_hint,0}; PyObject* values[1] = {0}; values[0] = ((PyObject *)__pyx_int_1); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_size_hint); if (value) { values[0] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 651; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_size_hint = values[0]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("__init__", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 651; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.hashtable.PyObjectHashTable.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return -1; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pandas_9hashtable_17PyObjectHashTable___init__(((struct __pyx_obj_6pandas_9hashtable_PyObjectHashTable *)__pyx_v_self), __pyx_v_size_hint); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pandas_9hashtable_17PyObjectHashTable___init__(struct __pyx_obj_6pandas_9hashtable_PyObjectHashTable *__pyx_v_self, PyObject *__pyx_v_size_hint) { int __pyx_r; __Pyx_RefNannyDeclarations khint_t __pyx_t_1; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__init__", 0); /* "pandas/hashtable.pyx":652 * * def __init__(self, size_hint=1): * self.table = kh_init_pymap() # <<<<<<<<<<<<<< * kh_resize_pymap(self.table, size_hint) * */ __pyx_v_self->table = kh_init_pymap(); /* "pandas/hashtable.pyx":653 * def __init__(self, size_hint=1): * self.table = kh_init_pymap() * kh_resize_pymap(self.table, size_hint) # <<<<<<<<<<<<<< * * def __dealloc__(self): */ __pyx_t_1 = __Pyx_PyInt_As_npy_uint32(__pyx_v_size_hint); if (unlikely((__pyx_t_1 == (khint_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 653; __pyx_clineno = __LINE__; goto __pyx_L1_error;} kh_resize_pymap(__pyx_v_self->table, __pyx_t_1); /* "pandas/hashtable.pyx":651 * # cdef kh_pymap_t *table * * def __init__(self, size_hint=1): # <<<<<<<<<<<<<< * self.table = kh_init_pymap() * kh_resize_pymap(self.table, size_hint) */ /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("pandas.hashtable.PyObjectHashTable.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/hashtable.pyx":655 * kh_resize_pymap(self.table, size_hint) * * def __dealloc__(self): # <<<<<<<<<<<<<< * if self.table is not NULL: * self.destroy() */ /* Python wrapper */ static void __pyx_pw_6pandas_9hashtable_17PyObjectHashTable_3__dealloc__(PyObject *__pyx_v_self); /*proto*/ static void __pyx_pw_6pandas_9hashtable_17PyObjectHashTable_3__dealloc__(PyObject *__pyx_v_self) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0); __pyx_pf_6pandas_9hashtable_17PyObjectHashTable_2__dealloc__(((struct __pyx_obj_6pandas_9hashtable_PyObjectHashTable *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); } static void __pyx_pf_6pandas_9hashtable_17PyObjectHashTable_2__dealloc__(struct __pyx_obj_6pandas_9hashtable_PyObjectHashTable *__pyx_v_self) { __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__dealloc__", 0); /* "pandas/hashtable.pyx":656 * * def __dealloc__(self): * if self.table is not NULL: # <<<<<<<<<<<<<< * self.destroy() * */ __pyx_t_1 = ((__pyx_v_self->table != NULL) != 0); if (__pyx_t_1) { /* "pandas/hashtable.pyx":657 * def __dealloc__(self): * if self.table is not NULL: * self.destroy() # <<<<<<<<<<<<<< * * def __len__(self): */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_destroy); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 657; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyObject_Call(__pyx_t_2, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 657; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L3; } __pyx_L3:; /* "pandas/hashtable.pyx":655 * kh_resize_pymap(self.table, size_hint) * * def __dealloc__(self): # <<<<<<<<<<<<<< * if self.table is not NULL: * self.destroy() */ /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_WriteUnraisable("pandas.hashtable.PyObjectHashTable.__dealloc__", __pyx_clineno, __pyx_lineno, __pyx_filename, 0); __pyx_L0:; __Pyx_RefNannyFinishContext(); } /* "pandas/hashtable.pyx":659 * self.destroy() * * def __len__(self): # <<<<<<<<<<<<<< * return self.table.size * */ /* Python wrapper */ static Py_ssize_t __pyx_pw_6pandas_9hashtable_17PyObjectHashTable_5__len__(PyObject *__pyx_v_self); /*proto*/ static Py_ssize_t __pyx_pw_6pandas_9hashtable_17PyObjectHashTable_5__len__(PyObject *__pyx_v_self) { Py_ssize_t __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__len__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_9hashtable_17PyObjectHashTable_4__len__(((struct __pyx_obj_6pandas_9hashtable_PyObjectHashTable *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static Py_ssize_t __pyx_pf_6pandas_9hashtable_17PyObjectHashTable_4__len__(struct __pyx_obj_6pandas_9hashtable_PyObjectHashTable *__pyx_v_self) { Py_ssize_t __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__len__", 0); /* "pandas/hashtable.pyx":660 * * def __len__(self): * return self.table.size # <<<<<<<<<<<<<< * * def __contains__(self, object key): */ __pyx_r = __pyx_v_self->table->size; goto __pyx_L0; /* "pandas/hashtable.pyx":659 * self.destroy() * * def __len__(self): # <<<<<<<<<<<<<< * return self.table.size * */ /* function exit code */ __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/hashtable.pyx":662 * return self.table.size * * def __contains__(self, object key): # <<<<<<<<<<<<<< * cdef khiter_t k * hash(key) */ /* Python wrapper */ static int __pyx_pw_6pandas_9hashtable_17PyObjectHashTable_7__contains__(PyObject *__pyx_v_self, PyObject *__pyx_v_key); /*proto*/ static int __pyx_pw_6pandas_9hashtable_17PyObjectHashTable_7__contains__(PyObject *__pyx_v_self, PyObject *__pyx_v_key) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__contains__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_9hashtable_17PyObjectHashTable_6__contains__(((struct __pyx_obj_6pandas_9hashtable_PyObjectHashTable *)__pyx_v_self), ((PyObject *)__pyx_v_key)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pandas_9hashtable_17PyObjectHashTable_6__contains__(struct __pyx_obj_6pandas_9hashtable_PyObjectHashTable *__pyx_v_self, PyObject *__pyx_v_key) { khiter_t __pyx_v_k; int __pyx_r; __Pyx_RefNannyDeclarations Py_hash_t __pyx_t_1; PyObject *__pyx_t_2 = NULL; int __pyx_t_3; int __pyx_t_4; int __pyx_t_5; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__contains__", 0); __Pyx_INCREF(__pyx_v_key); /* "pandas/hashtable.pyx":664 * def __contains__(self, object key): * cdef khiter_t k * hash(key) # <<<<<<<<<<<<<< * if key != key or key is None: * key = na_sentinel */ __pyx_t_1 = PyObject_Hash(__pyx_v_key); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 664; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/hashtable.pyx":665 * cdef khiter_t k * hash(key) * if key != key or key is None: # <<<<<<<<<<<<<< * key = na_sentinel * k = kh_get_pymap(self.table, key) */ __pyx_t_2 = PyObject_RichCompare(__pyx_v_key, __pyx_v_key, Py_NE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 665; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 665; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (!__pyx_t_3) { __pyx_t_4 = (__pyx_v_key == Py_None); __pyx_t_5 = __pyx_t_4; } else { __pyx_t_5 = __pyx_t_3; } if (__pyx_t_5) { /* "pandas/hashtable.pyx":666 * hash(key) * if key != key or key is None: * key = na_sentinel # <<<<<<<<<<<<<< * k = kh_get_pymap(self.table, key) * return k != self.table.n_buckets */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_na_sentinel); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 666; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF_SET(__pyx_v_key, __pyx_t_2); __pyx_t_2 = 0; goto __pyx_L3; } __pyx_L3:; /* "pandas/hashtable.pyx":667 * if key != key or key is None: * key = na_sentinel * k = kh_get_pymap(self.table, key) # <<<<<<<<<<<<<< * return k != self.table.n_buckets * */ __pyx_v_k = kh_get_pymap(__pyx_v_self->table, ((PyObject *)__pyx_v_key)); /* "pandas/hashtable.pyx":668 * key = na_sentinel * k = kh_get_pymap(self.table, key) * return k != self.table.n_buckets # <<<<<<<<<<<<<< * * def destroy(self): */ __pyx_r = (__pyx_v_k != __pyx_v_self->table->n_buckets); goto __pyx_L0; /* "pandas/hashtable.pyx":662 * return self.table.size * * def __contains__(self, object key): # <<<<<<<<<<<<<< * cdef khiter_t k * hash(key) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("pandas.hashtable.PyObjectHashTable.__contains__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_XDECREF(__pyx_v_key); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/hashtable.pyx":670 * return k != self.table.n_buckets * * def destroy(self): # <<<<<<<<<<<<<< * kh_destroy_pymap(self.table) * self.table = NULL */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_9hashtable_17PyObjectHashTable_9destroy(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static PyObject *__pyx_pw_6pandas_9hashtable_17PyObjectHashTable_9destroy(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("destroy (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_9hashtable_17PyObjectHashTable_8destroy(((struct __pyx_obj_6pandas_9hashtable_PyObjectHashTable *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_9hashtable_17PyObjectHashTable_8destroy(struct __pyx_obj_6pandas_9hashtable_PyObjectHashTable *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("destroy", 0); /* "pandas/hashtable.pyx":671 * * def destroy(self): * kh_destroy_pymap(self.table) # <<<<<<<<<<<<<< * self.table = NULL * */ kh_destroy_pymap(__pyx_v_self->table); /* "pandas/hashtable.pyx":672 * def destroy(self): * kh_destroy_pymap(self.table) * self.table = NULL # <<<<<<<<<<<<<< * * cpdef get_item(self, object val): */ __pyx_v_self->table = NULL; /* "pandas/hashtable.pyx":670 * return k != self.table.n_buckets * * def destroy(self): # <<<<<<<<<<<<<< * kh_destroy_pymap(self.table) * self.table = NULL */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/hashtable.pyx":674 * self.table = NULL * * cpdef get_item(self, object val): # <<<<<<<<<<<<<< * cdef khiter_t k * if val != val or val is None: */ static PyObject *__pyx_pw_6pandas_9hashtable_17PyObjectHashTable_11get_item(PyObject *__pyx_v_self, PyObject *__pyx_v_val); /*proto*/ static PyObject *__pyx_f_6pandas_9hashtable_17PyObjectHashTable_get_item(struct __pyx_obj_6pandas_9hashtable_PyObjectHashTable *__pyx_v_self, PyObject *__pyx_v_val, int __pyx_skip_dispatch) { khiter_t __pyx_v_k; 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_item", 0); __Pyx_INCREF(__pyx_v_val); /* 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_get_item); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 674; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_6pandas_9hashtable_17PyObjectHashTable_11get_item)) { __Pyx_XDECREF(__pyx_r); __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 674; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_val); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_val); __Pyx_GIVEREF(__pyx_v_val); __pyx_t_3 = PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 674; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_3; __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } /* "pandas/hashtable.pyx":676 * cpdef get_item(self, object val): * cdef khiter_t k * if val != val or val is None: # <<<<<<<<<<<<<< * val = na_sentinel * k = kh_get_pymap(self.table, val) */ __pyx_t_1 = PyObject_RichCompare(__pyx_v_val, __pyx_v_val, Py_NE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 676; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 676; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (!__pyx_t_4) { __pyx_t_5 = (__pyx_v_val == Py_None); __pyx_t_6 = __pyx_t_5; } else { __pyx_t_6 = __pyx_t_4; } if (__pyx_t_6) { /* "pandas/hashtable.pyx":677 * cdef khiter_t k * if val != val or val is None: * val = na_sentinel # <<<<<<<<<<<<<< * k = kh_get_pymap(self.table, val) * if k != self.table.n_buckets: */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_na_sentinel); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 677; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF_SET(__pyx_v_val, __pyx_t_1); __pyx_t_1 = 0; goto __pyx_L3; } __pyx_L3:; /* "pandas/hashtable.pyx":678 * if val != val or val is None: * val = na_sentinel * k = kh_get_pymap(self.table, val) # <<<<<<<<<<<<<< * if k != self.table.n_buckets: * return self.table.vals[k] */ __pyx_v_k = kh_get_pymap(__pyx_v_self->table, ((PyObject *)__pyx_v_val)); /* "pandas/hashtable.pyx":679 * val = na_sentinel * k = kh_get_pymap(self.table, val) * if k != self.table.n_buckets: # <<<<<<<<<<<<<< * return self.table.vals[k] * else: */ __pyx_t_6 = ((__pyx_v_k != __pyx_v_self->table->n_buckets) != 0); if (__pyx_t_6) { /* "pandas/hashtable.pyx":680 * k = kh_get_pymap(self.table, val) * if k != self.table.n_buckets: * return self.table.vals[k] # <<<<<<<<<<<<<< * else: * raise KeyError(val) */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyInt_FromSize_t((__pyx_v_self->table->vals[__pyx_v_k])); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 680; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; } /*else*/ { /* "pandas/hashtable.pyx":682 * return self.table.vals[k] * else: * raise KeyError(val) # <<<<<<<<<<<<<< * * def get_iter_test(self, object key, Py_ssize_t iterations): */ __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 682; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_val); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_val); __Pyx_GIVEREF(__pyx_v_val); __pyx_t_3 = PyObject_Call(__pyx_builtin_KeyError, __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 682; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 682; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } /* "pandas/hashtable.pyx":674 * self.table = NULL * * cpdef get_item(self, object val): # <<<<<<<<<<<<<< * cdef khiter_t k * if val != val or val is None: */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("pandas.hashtable.PyObjectHashTable.get_item", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_val); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_9hashtable_17PyObjectHashTable_11get_item(PyObject *__pyx_v_self, PyObject *__pyx_v_val); /*proto*/ static PyObject *__pyx_pw_6pandas_9hashtable_17PyObjectHashTable_11get_item(PyObject *__pyx_v_self, PyObject *__pyx_v_val) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("get_item (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_9hashtable_17PyObjectHashTable_10get_item(((struct __pyx_obj_6pandas_9hashtable_PyObjectHashTable *)__pyx_v_self), ((PyObject *)__pyx_v_val)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_9hashtable_17PyObjectHashTable_10get_item(struct __pyx_obj_6pandas_9hashtable_PyObjectHashTable *__pyx_v_self, PyObject *__pyx_v_val) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_item", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = ((struct __pyx_vtabstruct_6pandas_9hashtable_PyObjectHashTable *)__pyx_v_self->__pyx_vtab)->get_item(__pyx_v_self, __pyx_v_val, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 674; __pyx_clineno = __LINE__; goto __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.hashtable.PyObjectHashTable.get_item", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/hashtable.pyx":684 * raise KeyError(val) * * def get_iter_test(self, object key, Py_ssize_t iterations): # <<<<<<<<<<<<<< * cdef Py_ssize_t i, val * if key != key or key is None: */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_9hashtable_17PyObjectHashTable_13get_iter_test(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_6pandas_9hashtable_17PyObjectHashTable_13get_iter_test(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_key = 0; Py_ssize_t __pyx_v_iterations; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("get_iter_test (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_key,&__pyx_n_s_iterations,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_key)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_iterations)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("get_iter_test", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 684; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "get_iter_test") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 684; __pyx_clineno = __LINE__; goto __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_key = values[0]; __pyx_v_iterations = __Pyx_PyIndex_AsSsize_t(values[1]); if (unlikely((__pyx_v_iterations == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 684; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("get_iter_test", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 684; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.hashtable.PyObjectHashTable.get_iter_test", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pandas_9hashtable_17PyObjectHashTable_12get_iter_test(((struct __pyx_obj_6pandas_9hashtable_PyObjectHashTable *)__pyx_v_self), __pyx_v_key, __pyx_v_iterations); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_9hashtable_17PyObjectHashTable_12get_iter_test(struct __pyx_obj_6pandas_9hashtable_PyObjectHashTable *__pyx_v_self, PyObject *__pyx_v_key, Py_ssize_t __pyx_v_iterations) { CYTHON_UNUSED Py_ssize_t __pyx_v_i; CYTHON_UNUSED Py_ssize_t __pyx_v_val; khint_t __pyx_v_k; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; int __pyx_t_3; int __pyx_t_4; Py_ssize_t __pyx_t_5; Py_ssize_t __pyx_t_6; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_iter_test", 0); __Pyx_INCREF(__pyx_v_key); /* "pandas/hashtable.pyx":686 * def get_iter_test(self, object key, Py_ssize_t iterations): * cdef Py_ssize_t i, val * if key != key or key is None: # <<<<<<<<<<<<<< * key = na_sentinel * for i in range(iterations): */ __pyx_t_1 = PyObject_RichCompare(__pyx_v_key, __pyx_v_key, Py_NE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 686; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 686; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (!__pyx_t_2) { __pyx_t_3 = (__pyx_v_key == Py_None); __pyx_t_4 = __pyx_t_3; } else { __pyx_t_4 = __pyx_t_2; } if (__pyx_t_4) { /* "pandas/hashtable.pyx":687 * cdef Py_ssize_t i, val * if key != key or key is None: * key = na_sentinel # <<<<<<<<<<<<<< * for i in range(iterations): * k = kh_get_pymap(self.table, key) */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_na_sentinel); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 687; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF_SET(__pyx_v_key, __pyx_t_1); __pyx_t_1 = 0; goto __pyx_L3; } __pyx_L3:; /* "pandas/hashtable.pyx":688 * if key != key or key is None: * key = na_sentinel * for i in range(iterations): # <<<<<<<<<<<<<< * k = kh_get_pymap(self.table, key) * if k != self.table.n_buckets: */ __pyx_t_5 = __pyx_v_iterations; for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) { __pyx_v_i = __pyx_t_6; /* "pandas/hashtable.pyx":689 * key = na_sentinel * for i in range(iterations): * k = kh_get_pymap(self.table, key) # <<<<<<<<<<<<<< * if k != self.table.n_buckets: * val = self.table.vals[k] */ __pyx_v_k = kh_get_pymap(__pyx_v_self->table, ((PyObject *)__pyx_v_key)); /* "pandas/hashtable.pyx":690 * for i in range(iterations): * k = kh_get_pymap(self.table, key) * if k != self.table.n_buckets: # <<<<<<<<<<<<<< * val = self.table.vals[k] * */ __pyx_t_4 = ((__pyx_v_k != __pyx_v_self->table->n_buckets) != 0); if (__pyx_t_4) { /* "pandas/hashtable.pyx":691 * k = kh_get_pymap(self.table, key) * if k != self.table.n_buckets: * val = self.table.vals[k] # <<<<<<<<<<<<<< * * cpdef set_item(self, object key, Py_ssize_t val): */ __pyx_v_val = (__pyx_v_self->table->vals[__pyx_v_k]); goto __pyx_L6; } __pyx_L6:; } /* "pandas/hashtable.pyx":684 * raise KeyError(val) * * def get_iter_test(self, object key, Py_ssize_t iterations): # <<<<<<<<<<<<<< * cdef Py_ssize_t i, val * if key != key or key is None: */ /* 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.hashtable.PyObjectHashTable.get_iter_test", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_key); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/hashtable.pyx":693 * val = self.table.vals[k] * * cpdef set_item(self, object key, Py_ssize_t val): # <<<<<<<<<<<<<< * cdef: * khiter_t k */ static PyObject *__pyx_pw_6pandas_9hashtable_17PyObjectHashTable_15set_item(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_6pandas_9hashtable_17PyObjectHashTable_set_item(struct __pyx_obj_6pandas_9hashtable_PyObjectHashTable *__pyx_v_self, PyObject *__pyx_v_key, Py_ssize_t __pyx_v_val, int __pyx_skip_dispatch) { khiter_t __pyx_v_k; int __pyx_v_ret; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; Py_hash_t __pyx_t_4; int __pyx_t_5; int __pyx_t_6; int __pyx_t_7; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("set_item", 0); __Pyx_INCREF(__pyx_v_key); /* 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_set_item); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 693; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_6pandas_9hashtable_17PyObjectHashTable_15set_item)) { __Pyx_XDECREF(__pyx_r); __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_val); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 693; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 693; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_v_key); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_key); __Pyx_GIVEREF(__pyx_v_key); PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_Call(__pyx_t_1, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 693; __pyx_clineno = __LINE__; goto __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/hashtable.pyx":696 * cdef: * khiter_t k * int ret = 0 # <<<<<<<<<<<<<< * char* buf * */ __pyx_v_ret = 0; /* "pandas/hashtable.pyx":699 * char* buf * * hash(key) # <<<<<<<<<<<<<< * if key != key or key is None: * key = na_sentinel */ __pyx_t_4 = PyObject_Hash(__pyx_v_key); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 699; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/hashtable.pyx":700 * * hash(key) * if key != key or key is None: # <<<<<<<<<<<<<< * key = na_sentinel * k = kh_put_pymap(self.table, key, &ret) */ __pyx_t_1 = PyObject_RichCompare(__pyx_v_key, __pyx_v_key, Py_NE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 700; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 700; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (!__pyx_t_5) { __pyx_t_6 = (__pyx_v_key == Py_None); __pyx_t_7 = __pyx_t_6; } else { __pyx_t_7 = __pyx_t_5; } if (__pyx_t_7) { /* "pandas/hashtable.pyx":701 * hash(key) * if key != key or key is None: * key = na_sentinel # <<<<<<<<<<<<<< * k = kh_put_pymap(self.table, key, &ret) * # self.table.keys[k] = key */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_na_sentinel); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 701; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF_SET(__pyx_v_key, __pyx_t_1); __pyx_t_1 = 0; goto __pyx_L3; } __pyx_L3:; /* "pandas/hashtable.pyx":702 * if key != key or key is None: * key = na_sentinel * k = kh_put_pymap(self.table, key, &ret) # <<<<<<<<<<<<<< * # self.table.keys[k] = key * if kh_exist_pymap(self.table, k): */ __pyx_v_k = kh_put_pymap(__pyx_v_self->table, ((PyObject *)__pyx_v_key), (&__pyx_v_ret)); /* "pandas/hashtable.pyx":704 * k = kh_put_pymap(self.table, key, &ret) * # self.table.keys[k] = key * if kh_exist_pymap(self.table, k): # <<<<<<<<<<<<<< * self.table.vals[k] = val * else: */ __pyx_t_7 = (kh_exist_pymap(__pyx_v_self->table, __pyx_v_k) != 0); if (__pyx_t_7) { /* "pandas/hashtable.pyx":705 * # self.table.keys[k] = key * if kh_exist_pymap(self.table, k): * self.table.vals[k] = val # <<<<<<<<<<<<<< * else: * raise KeyError(key) */ (__pyx_v_self->table->vals[__pyx_v_k]) = __pyx_v_val; goto __pyx_L4; } /*else*/ { /* "pandas/hashtable.pyx":707 * self.table.vals[k] = val * else: * raise KeyError(key) # <<<<<<<<<<<<<< * * def map_locations(self, ndarray[object] values): */ __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 707; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_key); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_key); __Pyx_GIVEREF(__pyx_v_key); __pyx_t_2 = PyObject_Call(__pyx_builtin_KeyError, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 707; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 707; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_L4:; /* "pandas/hashtable.pyx":693 * val = self.table.vals[k] * * cpdef set_item(self, object key, Py_ssize_t val): # <<<<<<<<<<<<<< * cdef: * khiter_t k */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("pandas.hashtable.PyObjectHashTable.set_item", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_key); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_9hashtable_17PyObjectHashTable_15set_item(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_6pandas_9hashtable_17PyObjectHashTable_15set_item(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_key = 0; Py_ssize_t __pyx_v_val; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("set_item (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_key,&__pyx_n_s_val,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_key)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_val)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("set_item", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 693; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "set_item") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 693; __pyx_clineno = __LINE__; goto __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_key = values[0]; __pyx_v_val = __Pyx_PyIndex_AsSsize_t(values[1]); if (unlikely((__pyx_v_val == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 693; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("set_item", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 693; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.hashtable.PyObjectHashTable.set_item", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pandas_9hashtable_17PyObjectHashTable_14set_item(((struct __pyx_obj_6pandas_9hashtable_PyObjectHashTable *)__pyx_v_self), __pyx_v_key, __pyx_v_val); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_9hashtable_17PyObjectHashTable_14set_item(struct __pyx_obj_6pandas_9hashtable_PyObjectHashTable *__pyx_v_self, PyObject *__pyx_v_key, Py_ssize_t __pyx_v_val) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("set_item", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = ((struct __pyx_vtabstruct_6pandas_9hashtable_PyObjectHashTable *)__pyx_v_self->__pyx_vtab)->set_item(__pyx_v_self, __pyx_v_key, __pyx_v_val, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 693; __pyx_clineno = __LINE__; goto __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.hashtable.PyObjectHashTable.set_item", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/hashtable.pyx":709 * raise KeyError(key) * * def map_locations(self, ndarray[object] values): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = len(values) */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_9hashtable_17PyObjectHashTable_17map_locations(PyObject *__pyx_v_self, PyObject *__pyx_v_values); /*proto*/ static PyObject *__pyx_pw_6pandas_9hashtable_17PyObjectHashTable_17map_locations(PyObject *__pyx_v_self, PyObject *__pyx_v_values) { CYTHON_UNUSED int __pyx_lineno = 0; CYTHON_UNUSED const char *__pyx_filename = NULL; CYTHON_UNUSED int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("map_locations (wrapper)", 0); if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 709; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_9hashtable_17PyObjectHashTable_16map_locations(((struct __pyx_obj_6pandas_9hashtable_PyObjectHashTable *)__pyx_v_self), ((PyArrayObject *)__pyx_v_values)); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_9hashtable_17PyObjectHashTable_16map_locations(struct __pyx_obj_6pandas_9hashtable_PyObjectHashTable *__pyx_v_self, PyArrayObject *__pyx_v_values) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_n; int __pyx_v_ret; PyObject *__pyx_v_val = 0; khiter_t __pyx_v_k; __Pyx_LocalBuf_ND __pyx_pybuffernd_values; __Pyx_Buffer __pyx_pybuffer_values; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; Py_ssize_t __pyx_t_2; PyObject *__pyx_t_3 = NULL; Py_ssize_t __pyx_t_4; int __pyx_t_5; Py_hash_t __pyx_t_6; int __pyx_t_7; int __pyx_t_8; int __pyx_t_9; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("map_locations", 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_object, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 709; __pyx_clineno = __LINE__; goto __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/hashtable.pyx":711 * def map_locations(self, ndarray[object] values): * cdef: * Py_ssize_t i, n = len(values) # <<<<<<<<<<<<<< * int ret = 0 * object val */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 711; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/hashtable.pyx":712 * cdef: * Py_ssize_t i, n = len(values) * int ret = 0 # <<<<<<<<<<<<<< * object val * khiter_t k */ __pyx_v_ret = 0; /* "pandas/hashtable.pyx":716 * khiter_t k * * for i in range(n): # <<<<<<<<<<<<<< * val = values[i] * hash(val) */ __pyx_t_1 = __pyx_v_n; for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) { __pyx_v_i = __pyx_t_2; /* "pandas/hashtable.pyx":717 * * for i in range(n): * val = values[i] # <<<<<<<<<<<<<< * hash(val) * if val != val or val is None: */ __pyx_t_4 = __pyx_v_i; __pyx_t_5 = -1; if (__pyx_t_4 < 0) { __pyx_t_4 += __pyx_pybuffernd_values.diminfo[0].shape; if (unlikely(__pyx_t_4 < 0)) __pyx_t_5 = 0; } else if (unlikely(__pyx_t_4 >= __pyx_pybuffernd_values.diminfo[0].shape)) __pyx_t_5 = 0; if (unlikely(__pyx_t_5 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_5); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 717; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_3 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_4, __pyx_pybuffernd_values.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_3); __Pyx_XDECREF_SET(__pyx_v_val, __pyx_t_3); __pyx_t_3 = 0; /* "pandas/hashtable.pyx":718 * for i in range(n): * val = values[i] * hash(val) # <<<<<<<<<<<<<< * if val != val or val is None: * val = na_sentinel */ __pyx_t_6 = PyObject_Hash(__pyx_v_val); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 718; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/hashtable.pyx":719 * val = values[i] * hash(val) * if val != val or val is None: # <<<<<<<<<<<<<< * val = na_sentinel * */ __pyx_t_3 = PyObject_RichCompare(__pyx_v_val, __pyx_v_val, Py_NE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 719; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 719; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (!__pyx_t_7) { __pyx_t_8 = (__pyx_v_val == Py_None); __pyx_t_9 = __pyx_t_8; } else { __pyx_t_9 = __pyx_t_7; } if (__pyx_t_9) { /* "pandas/hashtable.pyx":720 * hash(val) * if val != val or val is None: * val = na_sentinel # <<<<<<<<<<<<<< * * k = kh_put_pymap(self.table, val, &ret) */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_na_sentinel); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 720; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF_SET(__pyx_v_val, __pyx_t_3); __pyx_t_3 = 0; goto __pyx_L5; } __pyx_L5:; /* "pandas/hashtable.pyx":722 * val = na_sentinel * * k = kh_put_pymap(self.table, val, &ret) # <<<<<<<<<<<<<< * self.table.vals[k] = i * */ __pyx_v_k = kh_put_pymap(__pyx_v_self->table, ((PyObject *)__pyx_v_val), (&__pyx_v_ret)); /* "pandas/hashtable.pyx":723 * * k = kh_put_pymap(self.table, val, &ret) * self.table.vals[k] = i # <<<<<<<<<<<<<< * * def lookup(self, ndarray[object] values): */ (__pyx_v_self->table->vals[__pyx_v_k]) = __pyx_v_i; } /* "pandas/hashtable.pyx":709 * raise KeyError(key) * * def map_locations(self, ndarray[object] values): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = len(values) */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __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.hashtable.PyObjectHashTable.map_locations", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF(__pyx_v_val); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/hashtable.pyx":725 * self.table.vals[k] = i * * def lookup(self, ndarray[object] values): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = len(values) */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_9hashtable_17PyObjectHashTable_19lookup(PyObject *__pyx_v_self, PyObject *__pyx_v_values); /*proto*/ static PyObject *__pyx_pw_6pandas_9hashtable_17PyObjectHashTable_19lookup(PyObject *__pyx_v_self, PyObject *__pyx_v_values) { CYTHON_UNUSED int __pyx_lineno = 0; CYTHON_UNUSED const char *__pyx_filename = NULL; CYTHON_UNUSED int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("lookup (wrapper)", 0); if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 725; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_9hashtable_17PyObjectHashTable_18lookup(((struct __pyx_obj_6pandas_9hashtable_PyObjectHashTable *)__pyx_v_self), ((PyArrayObject *)__pyx_v_values)); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_9hashtable_17PyObjectHashTable_18lookup(struct __pyx_obj_6pandas_9hashtable_PyObjectHashTable *__pyx_v_self, PyArrayObject *__pyx_v_values) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_n; CYTHON_UNUSED int __pyx_v_ret; PyObject *__pyx_v_val = 0; khiter_t __pyx_v_k; PyArrayObject *__pyx_v_locs = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_locs; __Pyx_Buffer __pyx_pybuffer_locs; __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; Py_ssize_t __pyx_t_8; Py_ssize_t __pyx_t_9; int __pyx_t_10; Py_hash_t __pyx_t_11; int __pyx_t_12; int __pyx_t_13; int __pyx_t_14; Py_ssize_t __pyx_t_15; Py_ssize_t __pyx_t_16; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __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_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_filename = __pyx_f[0]; __pyx_lineno = 725; __pyx_clineno = __LINE__; goto __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/hashtable.pyx":727 * def lookup(self, ndarray[object] values): * cdef: * Py_ssize_t i, n = len(values) # <<<<<<<<<<<<<< * int ret = 0 * object val */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 727; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/hashtable.pyx":728 * cdef: * Py_ssize_t i, n = len(values) * int ret = 0 # <<<<<<<<<<<<<< * object val * khiter_t k */ __pyx_v_ret = 0; /* "pandas/hashtable.pyx":731 * object val * khiter_t k * ndarray[int64_t] locs = np.empty(n, dtype=np.int64) # <<<<<<<<<<<<<< * * for i in range(n): */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 731; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 731; __pyx_clineno = __LINE__; goto __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_n); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 731; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 731; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 731; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 731; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_int64); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 731; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 731; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyObject_Call(__pyx_t_3, __pyx_t_4, __pyx_t_2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 731; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 731; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_7 = ((PyArrayObject *)__pyx_t_6); { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_locs.rcbuffer->pybuffer, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { __pyx_v_locs = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_locs.rcbuffer->pybuffer.buf = NULL; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 731; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } else {__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]; } } __pyx_t_7 = 0; __pyx_v_locs = ((PyArrayObject *)__pyx_t_6); __pyx_t_6 = 0; /* "pandas/hashtable.pyx":733 * ndarray[int64_t] locs = np.empty(n, dtype=np.int64) * * for i in range(n): # <<<<<<<<<<<<<< * val = values[i] * hash(val) */ __pyx_t_1 = __pyx_v_n; for (__pyx_t_8 = 0; __pyx_t_8 < __pyx_t_1; __pyx_t_8+=1) { __pyx_v_i = __pyx_t_8; /* "pandas/hashtable.pyx":734 * * for i in range(n): * val = values[i] # <<<<<<<<<<<<<< * hash(val) * if val != val or val is None: */ __pyx_t_9 = __pyx_v_i; __pyx_t_10 = -1; if (__pyx_t_9 < 0) { __pyx_t_9 += __pyx_pybuffernd_values.diminfo[0].shape; if (unlikely(__pyx_t_9 < 0)) __pyx_t_10 = 0; } else if (unlikely(__pyx_t_9 >= __pyx_pybuffernd_values.diminfo[0].shape)) __pyx_t_10 = 0; if (unlikely(__pyx_t_10 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_10); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 734; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_6 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_9, __pyx_pybuffernd_values.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_6); __Pyx_XDECREF_SET(__pyx_v_val, __pyx_t_6); __pyx_t_6 = 0; /* "pandas/hashtable.pyx":735 * for i in range(n): * val = values[i] * hash(val) # <<<<<<<<<<<<<< * if val != val or val is None: * val = na_sentinel */ __pyx_t_11 = PyObject_Hash(__pyx_v_val); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 735; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/hashtable.pyx":736 * val = values[i] * hash(val) * if val != val or val is None: # <<<<<<<<<<<<<< * val = na_sentinel * */ __pyx_t_6 = PyObject_RichCompare(__pyx_v_val, __pyx_v_val, Py_NE); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 736; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_12 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 736; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (!__pyx_t_12) { __pyx_t_13 = (__pyx_v_val == Py_None); __pyx_t_14 = __pyx_t_13; } else { __pyx_t_14 = __pyx_t_12; } if (__pyx_t_14) { /* "pandas/hashtable.pyx":737 * hash(val) * if val != val or val is None: * val = na_sentinel # <<<<<<<<<<<<<< * * k = kh_get_pymap(self.table, val) */ __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_na_sentinel); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 737; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF_SET(__pyx_v_val, __pyx_t_6); __pyx_t_6 = 0; goto __pyx_L5; } __pyx_L5:; /* "pandas/hashtable.pyx":739 * val = na_sentinel * * k = kh_get_pymap(self.table, val) # <<<<<<<<<<<<<< * if k != self.table.n_buckets: * locs[i] = self.table.vals[k] */ __pyx_v_k = kh_get_pymap(__pyx_v_self->table, ((PyObject *)__pyx_v_val)); /* "pandas/hashtable.pyx":740 * * k = kh_get_pymap(self.table, val) * if k != self.table.n_buckets: # <<<<<<<<<<<<<< * locs[i] = self.table.vals[k] * else: */ __pyx_t_14 = ((__pyx_v_k != __pyx_v_self->table->n_buckets) != 0); if (__pyx_t_14) { /* "pandas/hashtable.pyx":741 * k = kh_get_pymap(self.table, val) * if k != self.table.n_buckets: * locs[i] = self.table.vals[k] # <<<<<<<<<<<<<< * else: * locs[i] = -1 */ __pyx_t_15 = __pyx_v_i; __pyx_t_10 = -1; if (__pyx_t_15 < 0) { __pyx_t_15 += __pyx_pybuffernd_locs.diminfo[0].shape; if (unlikely(__pyx_t_15 < 0)) __pyx_t_10 = 0; } else if (unlikely(__pyx_t_15 >= __pyx_pybuffernd_locs.diminfo[0].shape)) __pyx_t_10 = 0; if (unlikely(__pyx_t_10 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_10); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 741; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_locs.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_locs.diminfo[0].strides) = (__pyx_v_self->table->vals[__pyx_v_k]); goto __pyx_L6; } /*else*/ { /* "pandas/hashtable.pyx":743 * locs[i] = self.table.vals[k] * else: * locs[i] = -1 # <<<<<<<<<<<<<< * * return locs */ __pyx_t_16 = __pyx_v_i; __pyx_t_10 = -1; if (__pyx_t_16 < 0) { __pyx_t_16 += __pyx_pybuffernd_locs.diminfo[0].shape; if (unlikely(__pyx_t_16 < 0)) __pyx_t_10 = 0; } else if (unlikely(__pyx_t_16 >= __pyx_pybuffernd_locs.diminfo[0].shape)) __pyx_t_10 = 0; if (unlikely(__pyx_t_10 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_10); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 743; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_locs.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_locs.diminfo[0].strides) = -1; } __pyx_L6:; } /* "pandas/hashtable.pyx":745 * locs[i] = -1 * * return locs # <<<<<<<<<<<<<< * * def lookup2(self, ndarray[object] values): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_locs)); __pyx_r = ((PyObject *)__pyx_v_locs); goto __pyx_L0; /* "pandas/hashtable.pyx":725 * self.table.vals[k] = i * * def lookup(self, ndarray[object] values): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = len(values) */ /* 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_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_locs.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.hashtable.PyObjectHashTable.lookup", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_locs.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF(__pyx_v_val); __Pyx_XDECREF((PyObject *)__pyx_v_locs); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/hashtable.pyx":747 * return locs * * def lookup2(self, ndarray[object] values): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = len(values) */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_9hashtable_17PyObjectHashTable_21lookup2(PyObject *__pyx_v_self, PyObject *__pyx_v_values); /*proto*/ static PyObject *__pyx_pw_6pandas_9hashtable_17PyObjectHashTable_21lookup2(PyObject *__pyx_v_self, PyObject *__pyx_v_values) { CYTHON_UNUSED int __pyx_lineno = 0; CYTHON_UNUSED const char *__pyx_filename = NULL; CYTHON_UNUSED int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("lookup2 (wrapper)", 0); if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 747; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_9hashtable_17PyObjectHashTable_20lookup2(((struct __pyx_obj_6pandas_9hashtable_PyObjectHashTable *)__pyx_v_self), ((PyArrayObject *)__pyx_v_values)); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_9hashtable_17PyObjectHashTable_20lookup2(CYTHON_UNUSED struct __pyx_obj_6pandas_9hashtable_PyObjectHashTable *__pyx_v_self, PyArrayObject *__pyx_v_values) { Py_ssize_t __pyx_v_n; CYTHON_UNUSED int __pyx_v_ret; PyArrayObject *__pyx_v_locs = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_locs; __Pyx_Buffer __pyx_pybuffer_locs; __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_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("lookup2", 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_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_filename = __pyx_f[0]; __pyx_lineno = 747; __pyx_clineno = __LINE__; goto __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/hashtable.pyx":749 * def lookup2(self, ndarray[object] values): * cdef: * Py_ssize_t i, n = len(values) # <<<<<<<<<<<<<< * int ret = 0 * object val */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 749; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/hashtable.pyx":750 * cdef: * Py_ssize_t i, n = len(values) * int ret = 0 # <<<<<<<<<<<<<< * object val * khiter_t k */ __pyx_v_ret = 0; /* "pandas/hashtable.pyx":754 * khiter_t k * long hval * ndarray[int64_t] locs = np.empty(n, dtype=np.int64) # <<<<<<<<<<<<<< * * # for i in range(n): */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 754; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 754; __pyx_clineno = __LINE__; goto __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_n); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 754; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 754; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 754; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 754; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_int64); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 754; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 754; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyObject_Call(__pyx_t_3, __pyx_t_4, __pyx_t_2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 754; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 754; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_7 = ((PyArrayObject *)__pyx_t_6); { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_locs.rcbuffer->pybuffer, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { __pyx_v_locs = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_locs.rcbuffer->pybuffer.buf = NULL; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 754; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } else {__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]; } } __pyx_t_7 = 0; __pyx_v_locs = ((PyArrayObject *)__pyx_t_6); __pyx_t_6 = 0; /* "pandas/hashtable.pyx":761 * # k = kh_get_pymap(self.table, val) * * return locs # <<<<<<<<<<<<<< * * def unique(self, ndarray[object] values): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_locs)); __pyx_r = ((PyObject *)__pyx_v_locs); goto __pyx_L0; /* "pandas/hashtable.pyx":747 * return locs * * def lookup2(self, ndarray[object] values): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = len(values) */ /* 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_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_locs.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.hashtable.PyObjectHashTable.lookup2", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_locs.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_locs); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/hashtable.pyx":763 * return locs * * def unique(self, ndarray[object] values): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = len(values) */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_9hashtable_17PyObjectHashTable_23unique(PyObject *__pyx_v_self, PyObject *__pyx_v_values); /*proto*/ static PyObject *__pyx_pw_6pandas_9hashtable_17PyObjectHashTable_23unique(PyObject *__pyx_v_self, PyObject *__pyx_v_values) { CYTHON_UNUSED int __pyx_lineno = 0; CYTHON_UNUSED const char *__pyx_filename = NULL; CYTHON_UNUSED int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("unique (wrapper)", 0); if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 763; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_9hashtable_17PyObjectHashTable_22unique(((struct __pyx_obj_6pandas_9hashtable_PyObjectHashTable *)__pyx_v_self), ((PyArrayObject *)__pyx_v_values)); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_9hashtable_17PyObjectHashTable_22unique(struct __pyx_obj_6pandas_9hashtable_PyObjectHashTable *__pyx_v_self, PyArrayObject *__pyx_v_values) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_n; CYTHON_UNUSED Py_ssize_t __pyx_v_count; int __pyx_v_ret; PyObject *__pyx_v_val = 0; PyArrayObject *__pyx_v_result = 0; khiter_t __pyx_v_k; struct __pyx_obj_6pandas_9hashtable_ObjectVector *__pyx_v_uniques = 0; int __pyx_v_seen_na; __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; Py_ssize_t __pyx_t_3; Py_ssize_t __pyx_t_4; int __pyx_t_5; Py_hash_t __pyx_t_6; int __pyx_t_7; PyObject *__pyx_t_8 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("unique", 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_object, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 763; __pyx_clineno = __LINE__; goto __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/hashtable.pyx":765 * def unique(self, ndarray[object] values): * cdef: * Py_ssize_t i, n = len(values) # <<<<<<<<<<<<<< * Py_ssize_t idx, count = 0 * int ret = 0 */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 765; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/hashtable.pyx":766 * cdef: * Py_ssize_t i, n = len(values) * Py_ssize_t idx, count = 0 # <<<<<<<<<<<<<< * int ret = 0 * object val */ __pyx_v_count = 0; /* "pandas/hashtable.pyx":767 * Py_ssize_t i, n = len(values) * Py_ssize_t idx, count = 0 * int ret = 0 # <<<<<<<<<<<<<< * object val * ndarray result */ __pyx_v_ret = 0; /* "pandas/hashtable.pyx":771 * ndarray result * khiter_t k * ObjectVector uniques = ObjectVector() # <<<<<<<<<<<<<< * bint seen_na = 0 * */ __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_6pandas_9hashtable_ObjectVector)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 771; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_v_uniques = ((struct __pyx_obj_6pandas_9hashtable_ObjectVector *)__pyx_t_2); __pyx_t_2 = 0; /* "pandas/hashtable.pyx":772 * khiter_t k * ObjectVector uniques = ObjectVector() * bint seen_na = 0 # <<<<<<<<<<<<<< * * for i in range(n): */ __pyx_v_seen_na = 0; /* "pandas/hashtable.pyx":774 * bint seen_na = 0 * * for i in range(n): # <<<<<<<<<<<<<< * val = values[i] * hash(val) */ __pyx_t_1 = __pyx_v_n; for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_1; __pyx_t_3+=1) { __pyx_v_i = __pyx_t_3; /* "pandas/hashtable.pyx":775 * * for i in range(n): * val = values[i] # <<<<<<<<<<<<<< * hash(val) * if not _checknan(val): */ __pyx_t_4 = __pyx_v_i; __pyx_t_5 = -1; if (__pyx_t_4 < 0) { __pyx_t_4 += __pyx_pybuffernd_values.diminfo[0].shape; if (unlikely(__pyx_t_4 < 0)) __pyx_t_5 = 0; } else if (unlikely(__pyx_t_4 >= __pyx_pybuffernd_values.diminfo[0].shape)) __pyx_t_5 = 0; if (unlikely(__pyx_t_5 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_5); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 775; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_2 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_4, __pyx_pybuffernd_values.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_2); __Pyx_XDECREF_SET(__pyx_v_val, __pyx_t_2); __pyx_t_2 = 0; /* "pandas/hashtable.pyx":776 * for i in range(n): * val = values[i] * hash(val) # <<<<<<<<<<<<<< * if not _checknan(val): * k = kh_get_pymap(self.table, val) */ __pyx_t_6 = PyObject_Hash(__pyx_v_val); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 776; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/hashtable.pyx":777 * val = values[i] * hash(val) * if not _checknan(val): # <<<<<<<<<<<<<< * k = kh_get_pymap(self.table, val) * if k == self.table.n_buckets: */ __pyx_t_7 = ((!(__pyx_f_4util__checknan(__pyx_v_val) != 0)) != 0); if (__pyx_t_7) { /* "pandas/hashtable.pyx":778 * hash(val) * if not _checknan(val): * k = kh_get_pymap(self.table, val) # <<<<<<<<<<<<<< * if k == self.table.n_buckets: * k = kh_put_pymap(self.table, val, &ret) */ __pyx_v_k = kh_get_pymap(__pyx_v_self->table, ((PyObject *)__pyx_v_val)); /* "pandas/hashtable.pyx":779 * if not _checknan(val): * k = kh_get_pymap(self.table, val) * if k == self.table.n_buckets: # <<<<<<<<<<<<<< * k = kh_put_pymap(self.table, val, &ret) * uniques.append(val) */ __pyx_t_7 = ((__pyx_v_k == __pyx_v_self->table->n_buckets) != 0); if (__pyx_t_7) { /* "pandas/hashtable.pyx":780 * k = kh_get_pymap(self.table, val) * if k == self.table.n_buckets: * k = kh_put_pymap(self.table, val, &ret) # <<<<<<<<<<<<<< * uniques.append(val) * elif not seen_na: */ __pyx_v_k = kh_put_pymap(__pyx_v_self->table, ((PyObject *)__pyx_v_val), (&__pyx_v_ret)); /* "pandas/hashtable.pyx":781 * if k == self.table.n_buckets: * k = kh_put_pymap(self.table, val, &ret) * uniques.append(val) # <<<<<<<<<<<<<< * elif not seen_na: * seen_na = 1 */ __pyx_t_2 = __pyx_f_6pandas_9hashtable_12ObjectVector_append(__pyx_v_uniques, __pyx_v_val); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 781; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; goto __pyx_L6; } __pyx_L6:; goto __pyx_L5; } /* "pandas/hashtable.pyx":782 * k = kh_put_pymap(self.table, val, &ret) * uniques.append(val) * elif not seen_na: # <<<<<<<<<<<<<< * seen_na = 1 * uniques.append(ONAN) */ __pyx_t_7 = ((!(__pyx_v_seen_na != 0)) != 0); if (__pyx_t_7) { /* "pandas/hashtable.pyx":783 * uniques.append(val) * elif not seen_na: * seen_na = 1 # <<<<<<<<<<<<<< * uniques.append(ONAN) * */ __pyx_v_seen_na = 1; /* "pandas/hashtable.pyx":784 * elif not seen_na: * seen_na = 1 * uniques.append(ONAN) # <<<<<<<<<<<<<< * * result = uniques.to_array() */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_ONAN); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 784; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_8 = __pyx_f_6pandas_9hashtable_12ObjectVector_append(__pyx_v_uniques, __pyx_t_2); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 784; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; goto __pyx_L5; } __pyx_L5:; } /* "pandas/hashtable.pyx":786 * uniques.append(ONAN) * * result = uniques.to_array() # <<<<<<<<<<<<<< * * return result */ __pyx_t_8 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_uniques), __pyx_n_s_to_array); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 786; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_2 = PyObject_Call(__pyx_t_8, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 786; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 786; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_result = ((PyArrayObject *)__pyx_t_2); __pyx_t_2 = 0; /* "pandas/hashtable.pyx":788 * result = uniques.to_array() * * return result # <<<<<<<<<<<<<< * * def get_labels(self, ndarray[object] values, ObjectVector uniques, */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_result)); __pyx_r = ((PyObject *)__pyx_v_result); goto __pyx_L0; /* "pandas/hashtable.pyx":763 * return locs * * def unique(self, ndarray[object] values): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = len(values) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_8); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __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.hashtable.PyObjectHashTable.unique", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF(__pyx_v_val); __Pyx_XDECREF((PyObject *)__pyx_v_result); __Pyx_XDECREF((PyObject *)__pyx_v_uniques); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/hashtable.pyx":790 * return result * * def get_labels(self, ndarray[object] values, ObjectVector uniques, # <<<<<<<<<<<<<< * Py_ssize_t count_prior, int64_t na_sentinel): * cdef: */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_9hashtable_17PyObjectHashTable_25get_labels(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_6pandas_9hashtable_17PyObjectHashTable_25get_labels(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_values = 0; struct __pyx_obj_6pandas_9hashtable_ObjectVector *__pyx_v_uniques = 0; Py_ssize_t __pyx_v_count_prior; __pyx_t_5numpy_int64_t __pyx_v_na_sentinel; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("get_labels (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_values,&__pyx_n_s_uniques,&__pyx_n_s_count_prior,&__pyx_n_s_na_sentinel,0}; PyObject* values[4] = {0,0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_values)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_uniques)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("get_labels", 1, 4, 4, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 790; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_count_prior)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("get_labels", 1, 4, 4, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 790; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_na_sentinel)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("get_labels", 1, 4, 4, 3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 790; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "get_labels") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 790; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 4) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[3] = PyTuple_GET_ITEM(__pyx_args, 3); } __pyx_v_values = ((PyArrayObject *)values[0]); __pyx_v_uniques = ((struct __pyx_obj_6pandas_9hashtable_ObjectVector *)values[1]); __pyx_v_count_prior = __Pyx_PyIndex_AsSsize_t(values[2]); if (unlikely((__pyx_v_count_prior == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 791; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_na_sentinel = __Pyx_PyInt_As_npy_int64(values[3]); if (unlikely((__pyx_v_na_sentinel == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 791; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("get_labels", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 790; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.hashtable.PyObjectHashTable.get_labels", __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_filename = __pyx_f[0]; __pyx_lineno = 790; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_uniques), __pyx_ptype_6pandas_9hashtable_ObjectVector, 1, "uniques", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 790; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_9hashtable_17PyObjectHashTable_24get_labels(((struct __pyx_obj_6pandas_9hashtable_PyObjectHashTable *)__pyx_v_self), __pyx_v_values, __pyx_v_uniques, __pyx_v_count_prior, __pyx_v_na_sentinel); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_9hashtable_17PyObjectHashTable_24get_labels(struct __pyx_obj_6pandas_9hashtable_PyObjectHashTable *__pyx_v_self, PyArrayObject *__pyx_v_values, struct __pyx_obj_6pandas_9hashtable_ObjectVector *__pyx_v_uniques, Py_ssize_t __pyx_v_count_prior, __pyx_t_5numpy_int64_t __pyx_v_na_sentinel) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_n; PyArrayObject *__pyx_v_labels = 0; Py_ssize_t __pyx_v_idx; Py_ssize_t __pyx_v_count; int __pyx_v_ret; PyObject *__pyx_v_val = 0; khiter_t __pyx_v_k; __Pyx_LocalBuf_ND __pyx_pybuffernd_labels; __Pyx_Buffer __pyx_pybuffer_labels; __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_hash_t __pyx_t_14; int __pyx_t_15; int __pyx_t_16; int __pyx_t_17; Py_ssize_t __pyx_t_18; Py_ssize_t __pyx_t_19; Py_ssize_t __pyx_t_20; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_labels", 0); __pyx_pybuffer_labels.pybuffer.buf = NULL; __pyx_pybuffer_labels.refcount = 0; __pyx_pybuffernd_labels.data = NULL; __pyx_pybuffernd_labels.rcbuffer = &__pyx_pybuffer_labels; __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_filename = __pyx_f[0]; __pyx_lineno = 790; __pyx_clineno = __LINE__; goto __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/hashtable.pyx":793 * Py_ssize_t count_prior, int64_t na_sentinel): * cdef: * Py_ssize_t i, n = len(values) # <<<<<<<<<<<<<< * ndarray[int64_t] labels * Py_ssize_t idx, count = count_prior */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 793; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/hashtable.pyx":795 * Py_ssize_t i, n = len(values) * ndarray[int64_t] labels * Py_ssize_t idx, count = count_prior # <<<<<<<<<<<<<< * int ret = 0 * object val */ __pyx_v_count = __pyx_v_count_prior; /* "pandas/hashtable.pyx":796 * ndarray[int64_t] labels * Py_ssize_t idx, count = count_prior * int ret = 0 # <<<<<<<<<<<<<< * object val * khiter_t k */ __pyx_v_ret = 0; /* "pandas/hashtable.pyx":800 * khiter_t k * * labels = np.empty(n, dtype=np.int64) # <<<<<<<<<<<<<< * * for i in range(n): */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 800; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 800; __pyx_clineno = __LINE__; goto __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_n); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 800; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 800; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 800; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 800; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_int64); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 800; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 800; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyObject_Call(__pyx_t_3, __pyx_t_4, __pyx_t_2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 800; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 800; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_7 = ((PyArrayObject *)__pyx_t_6); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_labels.rcbuffer->pybuffer); __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_labels.rcbuffer->pybuffer, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_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_labels.rcbuffer->pybuffer, (PyObject*)__pyx_v_labels, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_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_pybuffernd_labels.diminfo[0].strides = __pyx_pybuffernd_labels.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_labels.diminfo[0].shape = __pyx_pybuffernd_labels.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 800; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_7 = 0; __pyx_v_labels = ((PyArrayObject *)__pyx_t_6); __pyx_t_6 = 0; /* "pandas/hashtable.pyx":802 * labels = np.empty(n, dtype=np.int64) * * for i in range(n): # <<<<<<<<<<<<<< * val = values[i] * hash(val) */ __pyx_t_1 = __pyx_v_n; for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_1; __pyx_t_12+=1) { __pyx_v_i = __pyx_t_12; /* "pandas/hashtable.pyx":803 * * for i in range(n): * val = values[i] # <<<<<<<<<<<<<< * hash(val) * */ __pyx_t_13 = __pyx_v_i; __pyx_t_8 = -1; if (__pyx_t_13 < 0) { __pyx_t_13 += __pyx_pybuffernd_values.diminfo[0].shape; if (unlikely(__pyx_t_13 < 0)) __pyx_t_8 = 0; } else if (unlikely(__pyx_t_13 >= __pyx_pybuffernd_values.diminfo[0].shape)) __pyx_t_8 = 0; if (unlikely(__pyx_t_8 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_8); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 803; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_6 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_values.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_6); __Pyx_XDECREF_SET(__pyx_v_val, __pyx_t_6); __pyx_t_6 = 0; /* "pandas/hashtable.pyx":804 * for i in range(n): * val = values[i] * hash(val) # <<<<<<<<<<<<<< * * if val != val or val is None: */ __pyx_t_14 = PyObject_Hash(__pyx_v_val); if (unlikely(__pyx_t_14 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 804; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/hashtable.pyx":806 * hash(val) * * if val != val or val is None: # <<<<<<<<<<<<<< * labels[i] = na_sentinel * continue */ __pyx_t_6 = PyObject_RichCompare(__pyx_v_val, __pyx_v_val, Py_NE); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 806; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_15 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_15 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 806; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (!__pyx_t_15) { __pyx_t_16 = (__pyx_v_val == Py_None); __pyx_t_17 = __pyx_t_16; } else { __pyx_t_17 = __pyx_t_15; } if (__pyx_t_17) { /* "pandas/hashtable.pyx":807 * * if val != val or val is None: * labels[i] = na_sentinel # <<<<<<<<<<<<<< * continue * */ __pyx_t_18 = __pyx_v_i; __pyx_t_8 = -1; if (__pyx_t_18 < 0) { __pyx_t_18 += __pyx_pybuffernd_labels.diminfo[0].shape; if (unlikely(__pyx_t_18 < 0)) __pyx_t_8 = 0; } else if (unlikely(__pyx_t_18 >= __pyx_pybuffernd_labels.diminfo[0].shape)) __pyx_t_8 = 0; if (unlikely(__pyx_t_8 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_8); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 807; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_labels.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_labels.diminfo[0].strides) = __pyx_v_na_sentinel; /* "pandas/hashtable.pyx":808 * if val != val or val is None: * labels[i] = na_sentinel * continue # <<<<<<<<<<<<<< * * k = kh_get_pymap(self.table, val) */ goto __pyx_L3_continue; } /* "pandas/hashtable.pyx":810 * continue * * k = kh_get_pymap(self.table, val) # <<<<<<<<<<<<<< * if k != self.table.n_buckets: * idx = self.table.vals[k] */ __pyx_v_k = kh_get_pymap(__pyx_v_self->table, ((PyObject *)__pyx_v_val)); /* "pandas/hashtable.pyx":811 * * k = kh_get_pymap(self.table, val) * if k != self.table.n_buckets: # <<<<<<<<<<<<<< * idx = self.table.vals[k] * labels[i] = idx */ __pyx_t_17 = ((__pyx_v_k != __pyx_v_self->table->n_buckets) != 0); if (__pyx_t_17) { /* "pandas/hashtable.pyx":812 * k = kh_get_pymap(self.table, val) * if k != self.table.n_buckets: * idx = self.table.vals[k] # <<<<<<<<<<<<<< * labels[i] = idx * else: */ __pyx_v_idx = (__pyx_v_self->table->vals[__pyx_v_k]); /* "pandas/hashtable.pyx":813 * if k != self.table.n_buckets: * idx = self.table.vals[k] * labels[i] = idx # <<<<<<<<<<<<<< * else: * k = kh_put_pymap(self.table, val, &ret) */ __pyx_t_19 = __pyx_v_i; __pyx_t_8 = -1; if (__pyx_t_19 < 0) { __pyx_t_19 += __pyx_pybuffernd_labels.diminfo[0].shape; if (unlikely(__pyx_t_19 < 0)) __pyx_t_8 = 0; } else if (unlikely(__pyx_t_19 >= __pyx_pybuffernd_labels.diminfo[0].shape)) __pyx_t_8 = 0; if (unlikely(__pyx_t_8 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_8); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 813; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_labels.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_labels.diminfo[0].strides) = __pyx_v_idx; goto __pyx_L6; } /*else*/ { /* "pandas/hashtable.pyx":815 * labels[i] = idx * else: * k = kh_put_pymap(self.table, val, &ret) # <<<<<<<<<<<<<< * self.table.vals[k] = count * uniques.append(val) */ __pyx_v_k = kh_put_pymap(__pyx_v_self->table, ((PyObject *)__pyx_v_val), (&__pyx_v_ret)); /* "pandas/hashtable.pyx":816 * else: * k = kh_put_pymap(self.table, val, &ret) * self.table.vals[k] = count # <<<<<<<<<<<<<< * uniques.append(val) * labels[i] = count */ (__pyx_v_self->table->vals[__pyx_v_k]) = __pyx_v_count; /* "pandas/hashtable.pyx":817 * k = kh_put_pymap(self.table, val, &ret) * self.table.vals[k] = count * uniques.append(val) # <<<<<<<<<<<<<< * labels[i] = count * count += 1 */ __pyx_t_6 = __pyx_f_6pandas_9hashtable_12ObjectVector_append(__pyx_v_uniques, __pyx_v_val); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 817; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; /* "pandas/hashtable.pyx":818 * self.table.vals[k] = count * uniques.append(val) * labels[i] = count # <<<<<<<<<<<<<< * count += 1 * */ __pyx_t_20 = __pyx_v_i; __pyx_t_8 = -1; if (__pyx_t_20 < 0) { __pyx_t_20 += __pyx_pybuffernd_labels.diminfo[0].shape; if (unlikely(__pyx_t_20 < 0)) __pyx_t_8 = 0; } else if (unlikely(__pyx_t_20 >= __pyx_pybuffernd_labels.diminfo[0].shape)) __pyx_t_8 = 0; if (unlikely(__pyx_t_8 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_8); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 818; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_labels.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_labels.diminfo[0].strides) = __pyx_v_count; /* "pandas/hashtable.pyx":819 * uniques.append(val) * labels[i] = count * count += 1 # <<<<<<<<<<<<<< * * return labels */ __pyx_v_count = (__pyx_v_count + 1); } __pyx_L6:; __pyx_L3_continue:; } /* "pandas/hashtable.pyx":821 * count += 1 * * return labels # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_labels)); __pyx_r = ((PyObject *)__pyx_v_labels); goto __pyx_L0; /* "pandas/hashtable.pyx":790 * return result * * def get_labels(self, ndarray[object] values, ObjectVector uniques, # <<<<<<<<<<<<<< * Py_ssize_t count_prior, int64_t na_sentinel): * cdef: */ /* 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_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_labels.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.hashtable.PyObjectHashTable.get_labels", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_labels.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_labels); __Pyx_XDECREF(__pyx_v_val); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/hashtable.pyx":829 * cdef public Py_ssize_t count * * def __init__(self, size_hint): # <<<<<<<<<<<<<< * self.table = PyObjectHashTable(size_hint) * self.uniques = ObjectVector() */ /* Python wrapper */ static int __pyx_pw_6pandas_9hashtable_10Factorizer_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_pw_6pandas_9hashtable_10Factorizer_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_size_hint = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_size_hint,0}; PyObject* values[1] = {0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_size_hint)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 829; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); } __pyx_v_size_hint = values[0]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 829; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.hashtable.Factorizer.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return -1; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pandas_9hashtable_10Factorizer___init__(((struct __pyx_obj_6pandas_9hashtable_Factorizer *)__pyx_v_self), __pyx_v_size_hint); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pandas_9hashtable_10Factorizer___init__(struct __pyx_obj_6pandas_9hashtable_Factorizer *__pyx_v_self, PyObject *__pyx_v_size_hint) { int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__init__", 0); /* "pandas/hashtable.pyx":830 * * def __init__(self, size_hint): * self.table = PyObjectHashTable(size_hint) # <<<<<<<<<<<<<< * self.uniques = ObjectVector() * self.count = 0 */ __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 830; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_size_hint); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_size_hint); __Pyx_GIVEREF(__pyx_v_size_hint); __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_6pandas_9hashtable_PyObjectHashTable)), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 830; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_GIVEREF(__pyx_t_2); __Pyx_GOTREF(__pyx_v_self->table); __Pyx_DECREF(((PyObject *)__pyx_v_self->table)); __pyx_v_self->table = ((struct __pyx_obj_6pandas_9hashtable_PyObjectHashTable *)__pyx_t_2); __pyx_t_2 = 0; /* "pandas/hashtable.pyx":831 * def __init__(self, size_hint): * self.table = PyObjectHashTable(size_hint) * self.uniques = ObjectVector() # <<<<<<<<<<<<<< * self.count = 0 * */ __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_6pandas_9hashtable_ObjectVector)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 831; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __Pyx_GOTREF(__pyx_v_self->uniques); __Pyx_DECREF(((PyObject *)__pyx_v_self->uniques)); __pyx_v_self->uniques = ((struct __pyx_obj_6pandas_9hashtable_ObjectVector *)__pyx_t_2); __pyx_t_2 = 0; /* "pandas/hashtable.pyx":832 * self.table = PyObjectHashTable(size_hint) * self.uniques = ObjectVector() * self.count = 0 # <<<<<<<<<<<<<< * * def get_count(self): */ __pyx_v_self->count = 0; /* "pandas/hashtable.pyx":829 * cdef public Py_ssize_t count * * def __init__(self, size_hint): # <<<<<<<<<<<<<< * self.table = PyObjectHashTable(size_hint) * self.uniques = ObjectVector() */ /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("pandas.hashtable.Factorizer.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/hashtable.pyx":834 * self.count = 0 * * def get_count(self): # <<<<<<<<<<<<<< * return self.count * */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_9hashtable_10Factorizer_3get_count(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static PyObject *__pyx_pw_6pandas_9hashtable_10Factorizer_3get_count(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("get_count (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_9hashtable_10Factorizer_2get_count(((struct __pyx_obj_6pandas_9hashtable_Factorizer *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_9hashtable_10Factorizer_2get_count(struct __pyx_obj_6pandas_9hashtable_Factorizer *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_count", 0); /* "pandas/hashtable.pyx":835 * * def get_count(self): * return self.count # <<<<<<<<<<<<<< * * def factorize(self, ndarray[object] values, sort=False, na_sentinel=-1): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_self->count); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 835; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "pandas/hashtable.pyx":834 * self.count = 0 * * def get_count(self): # <<<<<<<<<<<<<< * return self.count * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas.hashtable.Factorizer.get_count", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/hashtable.pyx":837 * return self.count * * def factorize(self, ndarray[object] values, sort=False, na_sentinel=-1): # <<<<<<<<<<<<<< * labels = self.table.get_labels(values, self.uniques, * self.count, na_sentinel) */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_9hashtable_10Factorizer_5factorize(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_6pandas_9hashtable_10Factorizer_5factorize(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_values = 0; PyObject *__pyx_v_sort = 0; PyObject *__pyx_v_na_sentinel = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("factorize (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_values,&__pyx_n_s_sort,&__pyx_n_s_na_sentinel,0}; PyObject* values[3] = {0,0,0}; values[1] = ((PyObject *)Py_False); values[2] = ((PyObject *)__pyx_int_neg_1); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_values)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_sort); if (value) { values[1] = value; kw_args--; } } case 2: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_na_sentinel); if (value) { values[2] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "factorize") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 837; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_values = ((PyArrayObject *)values[0]); __pyx_v_sort = values[1]; __pyx_v_na_sentinel = values[2]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("factorize", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 837; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.hashtable.Factorizer.factorize", __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_filename = __pyx_f[0]; __pyx_lineno = 837; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_9hashtable_10Factorizer_4factorize(((struct __pyx_obj_6pandas_9hashtable_Factorizer *)__pyx_v_self), __pyx_v_values, __pyx_v_sort, __pyx_v_na_sentinel); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_9hashtable_10Factorizer_4factorize(struct __pyx_obj_6pandas_9hashtable_Factorizer *__pyx_v_self, PyArrayObject *__pyx_v_values, PyObject *__pyx_v_sort, PyObject *__pyx_v_na_sentinel) { PyObject *__pyx_v_labels = NULL; PyObject *__pyx_v_sorter = NULL; PyObject *__pyx_v_reverse_indexer = NULL; __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; int __pyx_t_4; Py_ssize_t __pyx_t_5; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("factorize", 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_object, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 837; __pyx_clineno = __LINE__; goto __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/hashtable.pyx":838 * * def factorize(self, ndarray[object] values, sort=False, na_sentinel=-1): * labels = self.table.get_labels(values, self.uniques, # <<<<<<<<<<<<<< * self.count, na_sentinel) * */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->table), __pyx_n_s_get_labels); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 838; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); /* "pandas/hashtable.pyx":839 * def factorize(self, ndarray[object] values, sort=False, na_sentinel=-1): * labels = self.table.get_labels(values, self.uniques, * self.count, na_sentinel) # <<<<<<<<<<<<<< * * # sort on */ __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_self->count); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 839; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); /* "pandas/hashtable.pyx":838 * * def factorize(self, ndarray[object] values, sort=False, na_sentinel=-1): * labels = self.table.get_labels(values, self.uniques, # <<<<<<<<<<<<<< * self.count, na_sentinel) * */ __pyx_t_3 = PyTuple_New(4); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 838; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(((PyObject *)__pyx_v_values)); PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_v_values)); __Pyx_GIVEREF(((PyObject *)__pyx_v_values)); __Pyx_INCREF(((PyObject *)__pyx_v_self->uniques)); PyTuple_SET_ITEM(__pyx_t_3, 1, ((PyObject *)__pyx_v_self->uniques)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self->uniques)); PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_na_sentinel); PyTuple_SET_ITEM(__pyx_t_3, 3, __pyx_v_na_sentinel); __Pyx_GIVEREF(__pyx_v_na_sentinel); __pyx_t_2 = 0; __pyx_t_2 = PyObject_Call(__pyx_t_1, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 838; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_labels = __pyx_t_2; __pyx_t_2 = 0; /* "pandas/hashtable.pyx":842 * * # sort on * if sort: # <<<<<<<<<<<<<< * if labels.dtype != np.int_: * labels = labels.astype(np.int_) */ __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_sort); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 842; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__pyx_t_4) { /* "pandas/hashtable.pyx":843 * # sort on * if sort: * if labels.dtype != np.int_: # <<<<<<<<<<<<<< * labels = labels.astype(np.int_) * */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_labels, __pyx_n_s_dtype); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 843; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 843; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_int); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 843; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyObject_RichCompare(__pyx_t_2, __pyx_t_1, Py_NE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 843; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 843; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_4) { /* "pandas/hashtable.pyx":844 * if sort: * if labels.dtype != np.int_: * labels = labels.astype(np.int_) # <<<<<<<<<<<<<< * * sorter = self.uniques.to_array().argsort() */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_labels, __pyx_n_s_astype); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 844; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 844; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_int); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 844; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 844; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_Call(__pyx_t_3, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 844; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF_SET(__pyx_v_labels, __pyx_t_2); __pyx_t_2 = 0; goto __pyx_L4; } __pyx_L4:; /* "pandas/hashtable.pyx":846 * labels = labels.astype(np.int_) * * sorter = self.uniques.to_array().argsort() # <<<<<<<<<<<<<< * reverse_indexer = np.empty(len(sorter), dtype=np.int_) * reverse_indexer.put(sorter, np.arange(len(sorter))) */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->uniques), __pyx_n_s_to_array); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 846; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = PyObject_Call(__pyx_t_2, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 846; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_argsort); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 846; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyObject_Call(__pyx_t_2, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 846; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_sorter = __pyx_t_1; __pyx_t_1 = 0; /* "pandas/hashtable.pyx":847 * * sorter = self.uniques.to_array().argsort() * reverse_indexer = np.empty(len(sorter), dtype=np.int_) # <<<<<<<<<<<<<< * reverse_indexer.put(sorter, np.arange(len(sorter))) * */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 847; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 847; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_5 = PyObject_Length(__pyx_v_sorter); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 847; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_5); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 847; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 847; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 847; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 847; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_int); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 847; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_dtype, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 847; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_7 = PyObject_Call(__pyx_t_2, __pyx_t_3, __pyx_t_1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 847; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __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; __pyx_v_reverse_indexer = __pyx_t_7; __pyx_t_7 = 0; /* "pandas/hashtable.pyx":848 * sorter = self.uniques.to_array().argsort() * reverse_indexer = np.empty(len(sorter), dtype=np.int_) * reverse_indexer.put(sorter, np.arange(len(sorter))) # <<<<<<<<<<<<<< * * labels = reverse_indexer.take(labels) */ __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_reverse_indexer, __pyx_n_s_put); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 848; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 848; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_arange); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 848; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_5 = PyObject_Length(__pyx_v_sorter); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 848; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_5); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 848; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 848; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyObject_Call(__pyx_t_3, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 848; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 848; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_sorter); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_sorter); __Pyx_GIVEREF(__pyx_v_sorter); PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyObject_Call(__pyx_t_7, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 848; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pandas/hashtable.pyx":850 * reverse_indexer.put(sorter, np.arange(len(sorter))) * * labels = reverse_indexer.take(labels) # <<<<<<<<<<<<<< * * self.count = len(self.uniques) */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_reverse_indexer, __pyx_n_s_take); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 850; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 850; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_labels); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_labels); __Pyx_GIVEREF(__pyx_v_labels); __pyx_t_7 = PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 850; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF_SET(__pyx_v_labels, __pyx_t_7); __pyx_t_7 = 0; goto __pyx_L3; } __pyx_L3:; /* "pandas/hashtable.pyx":852 * labels = reverse_indexer.take(labels) * * self.count = len(self.uniques) # <<<<<<<<<<<<<< * return labels * */ __pyx_t_7 = ((PyObject *)__pyx_v_self->uniques); __Pyx_INCREF(__pyx_t_7); __pyx_t_5 = PyObject_Length(__pyx_t_7); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 852; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_v_self->count = __pyx_t_5; /* "pandas/hashtable.pyx":853 * * self.count = len(self.uniques) * return labels # <<<<<<<<<<<<<< * * def unique(self, ndarray[object] values): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_labels); __pyx_r = __pyx_v_labels; goto __pyx_L0; /* "pandas/hashtable.pyx":837 * return self.count * * def factorize(self, ndarray[object] values, sort=False, na_sentinel=-1): # <<<<<<<<<<<<<< * labels = self.table.get_labels(values, self.uniques, * self.count, na_sentinel) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __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.hashtable.Factorizer.factorize", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF(__pyx_v_labels); __Pyx_XDECREF(__pyx_v_sorter); __Pyx_XDECREF(__pyx_v_reverse_indexer); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/hashtable.pyx":855 * return labels * * def unique(self, ndarray[object] values): # <<<<<<<<<<<<<< * # just for fun * return self.table.unique(values) */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_9hashtable_10Factorizer_7unique(PyObject *__pyx_v_self, PyObject *__pyx_v_values); /*proto*/ static PyObject *__pyx_pw_6pandas_9hashtable_10Factorizer_7unique(PyObject *__pyx_v_self, PyObject *__pyx_v_values) { CYTHON_UNUSED int __pyx_lineno = 0; CYTHON_UNUSED const char *__pyx_filename = NULL; CYTHON_UNUSED int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("unique (wrapper)", 0); if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 855; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_9hashtable_10Factorizer_6unique(((struct __pyx_obj_6pandas_9hashtable_Factorizer *)__pyx_v_self), ((PyArrayObject *)__pyx_v_values)); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_9hashtable_10Factorizer_6unique(struct __pyx_obj_6pandas_9hashtable_Factorizer *__pyx_v_self, PyArrayObject *__pyx_v_values) { __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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("unique", 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_object, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 855; __pyx_clineno = __LINE__; goto __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/hashtable.pyx":857 * def unique(self, ndarray[object] values): * # just for fun * return self.table.unique(values) # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->table), __pyx_n_s_unique); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 857; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 857; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(((PyObject *)__pyx_v_values)); PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_values)); __Pyx_GIVEREF(((PyObject *)__pyx_v_values)); __pyx_t_3 = PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 857; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; /* "pandas/hashtable.pyx":855 * return labels * * def unique(self, ndarray[object] values): # <<<<<<<<<<<<<< * # just for fun * return self.table.unique(values) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __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.hashtable.Factorizer.unique", __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/hashtable.pyx":825 * * cdef class Factorizer: * cdef public PyObjectHashTable table # <<<<<<<<<<<<<< * cdef public ObjectVector uniques * cdef public Py_ssize_t count */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_9hashtable_10Factorizer_5table_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6pandas_9hashtable_10Factorizer_5table_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_9hashtable_10Factorizer_5table___get__(((struct __pyx_obj_6pandas_9hashtable_Factorizer *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_9hashtable_10Factorizer_5table___get__(struct __pyx_obj_6pandas_9hashtable_Factorizer *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_self->table)); __pyx_r = ((PyObject *)__pyx_v_self->table); goto __pyx_L0; /* function exit code */ __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pandas_9hashtable_10Factorizer_5table_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ static int __pyx_pw_6pandas_9hashtable_10Factorizer_5table_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_9hashtable_10Factorizer_5table_2__set__(((struct __pyx_obj_6pandas_9hashtable_Factorizer *)__pyx_v_self), ((PyObject *)__pyx_v_value)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pandas_9hashtable_10Factorizer_5table_2__set__(struct __pyx_obj_6pandas_9hashtable_Factorizer *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__set__", 0); if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_6pandas_9hashtable_PyObjectHashTable))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 825; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_1 = __pyx_v_value; __Pyx_INCREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->table); __Pyx_DECREF(((PyObject *)__pyx_v_self->table)); __pyx_v_self->table = ((struct __pyx_obj_6pandas_9hashtable_PyObjectHashTable *)__pyx_t_1); __pyx_t_1 = 0; /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas.hashtable.Factorizer.table.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pandas_9hashtable_10Factorizer_5table_5__del__(PyObject *__pyx_v_self); /*proto*/ static int __pyx_pw_6pandas_9hashtable_10Factorizer_5table_5__del__(PyObject *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_9hashtable_10Factorizer_5table_4__del__(((struct __pyx_obj_6pandas_9hashtable_Factorizer *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pandas_9hashtable_10Factorizer_5table_4__del__(struct __pyx_obj_6pandas_9hashtable_Factorizer *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__", 0); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->table); __Pyx_DECREF(((PyObject *)__pyx_v_self->table)); __pyx_v_self->table = ((struct __pyx_obj_6pandas_9hashtable_PyObjectHashTable *)Py_None); /* function exit code */ __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/hashtable.pyx":826 * cdef class Factorizer: * cdef public PyObjectHashTable table * cdef public ObjectVector uniques # <<<<<<<<<<<<<< * cdef public Py_ssize_t count * */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_9hashtable_10Factorizer_7uniques_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6pandas_9hashtable_10Factorizer_7uniques_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_9hashtable_10Factorizer_7uniques___get__(((struct __pyx_obj_6pandas_9hashtable_Factorizer *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_9hashtable_10Factorizer_7uniques___get__(struct __pyx_obj_6pandas_9hashtable_Factorizer *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_self->uniques)); __pyx_r = ((PyObject *)__pyx_v_self->uniques); goto __pyx_L0; /* function exit code */ __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pandas_9hashtable_10Factorizer_7uniques_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ static int __pyx_pw_6pandas_9hashtable_10Factorizer_7uniques_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_9hashtable_10Factorizer_7uniques_2__set__(((struct __pyx_obj_6pandas_9hashtable_Factorizer *)__pyx_v_self), ((PyObject *)__pyx_v_value)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pandas_9hashtable_10Factorizer_7uniques_2__set__(struct __pyx_obj_6pandas_9hashtable_Factorizer *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__set__", 0); if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_6pandas_9hashtable_ObjectVector))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 826; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_1 = __pyx_v_value; __Pyx_INCREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->uniques); __Pyx_DECREF(((PyObject *)__pyx_v_self->uniques)); __pyx_v_self->uniques = ((struct __pyx_obj_6pandas_9hashtable_ObjectVector *)__pyx_t_1); __pyx_t_1 = 0; /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas.hashtable.Factorizer.uniques.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pandas_9hashtable_10Factorizer_7uniques_5__del__(PyObject *__pyx_v_self); /*proto*/ static int __pyx_pw_6pandas_9hashtable_10Factorizer_7uniques_5__del__(PyObject *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_9hashtable_10Factorizer_7uniques_4__del__(((struct __pyx_obj_6pandas_9hashtable_Factorizer *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pandas_9hashtable_10Factorizer_7uniques_4__del__(struct __pyx_obj_6pandas_9hashtable_Factorizer *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__", 0); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->uniques); __Pyx_DECREF(((PyObject *)__pyx_v_self->uniques)); __pyx_v_self->uniques = ((struct __pyx_obj_6pandas_9hashtable_ObjectVector *)Py_None); /* function exit code */ __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/hashtable.pyx":827 * cdef public PyObjectHashTable table * cdef public ObjectVector uniques * cdef public Py_ssize_t count # <<<<<<<<<<<<<< * * def __init__(self, size_hint): */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_9hashtable_10Factorizer_5count_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6pandas_9hashtable_10Factorizer_5count_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_9hashtable_10Factorizer_5count___get__(((struct __pyx_obj_6pandas_9hashtable_Factorizer *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_9hashtable_10Factorizer_5count___get__(struct __pyx_obj_6pandas_9hashtable_Factorizer *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_self->count); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 827; __pyx_clineno = __LINE__; goto __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.hashtable.Factorizer.count.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pandas_9hashtable_10Factorizer_5count_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ static int __pyx_pw_6pandas_9hashtable_10Factorizer_5count_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_9hashtable_10Factorizer_5count_2__set__(((struct __pyx_obj_6pandas_9hashtable_Factorizer *)__pyx_v_self), ((PyObject *)__pyx_v_value)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pandas_9hashtable_10Factorizer_5count_2__set__(struct __pyx_obj_6pandas_9hashtable_Factorizer *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__set__", 0); __pyx_t_1 = __Pyx_PyIndex_AsSsize_t(__pyx_v_value); if (unlikely((__pyx_t_1 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 827; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_self->count = __pyx_t_1; /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("pandas.hashtable.Factorizer.count.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/hashtable.pyx":865 * cdef public Py_ssize_t count * * def __init__(self, size_hint): # <<<<<<<<<<<<<< * self.table = Int64HashTable(size_hint) * self.uniques = Int64Vector() */ /* Python wrapper */ static int __pyx_pw_6pandas_9hashtable_15Int64Factorizer_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_pw_6pandas_9hashtable_15Int64Factorizer_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_size_hint = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_size_hint,0}; PyObject* values[1] = {0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_size_hint)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 865; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); } __pyx_v_size_hint = values[0]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 865; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.hashtable.Int64Factorizer.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return -1; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pandas_9hashtable_15Int64Factorizer___init__(((struct __pyx_obj_6pandas_9hashtable_Int64Factorizer *)__pyx_v_self), __pyx_v_size_hint); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pandas_9hashtable_15Int64Factorizer___init__(struct __pyx_obj_6pandas_9hashtable_Int64Factorizer *__pyx_v_self, PyObject *__pyx_v_size_hint) { int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__init__", 0); /* "pandas/hashtable.pyx":866 * * def __init__(self, size_hint): * self.table = Int64HashTable(size_hint) # <<<<<<<<<<<<<< * self.uniques = Int64Vector() * self.count = 0 */ __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 866; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_size_hint); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_size_hint); __Pyx_GIVEREF(__pyx_v_size_hint); __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_6pandas_9hashtable_Int64HashTable)), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 866; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_GIVEREF(__pyx_t_2); __Pyx_GOTREF(__pyx_v_self->table); __Pyx_DECREF(((PyObject *)__pyx_v_self->table)); __pyx_v_self->table = ((struct __pyx_obj_6pandas_9hashtable_Int64HashTable *)__pyx_t_2); __pyx_t_2 = 0; /* "pandas/hashtable.pyx":867 * def __init__(self, size_hint): * self.table = Int64HashTable(size_hint) * self.uniques = Int64Vector() # <<<<<<<<<<<<<< * self.count = 0 * */ __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_6pandas_9hashtable_Int64Vector)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 867; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __Pyx_GOTREF(__pyx_v_self->uniques); __Pyx_DECREF(((PyObject *)__pyx_v_self->uniques)); __pyx_v_self->uniques = ((struct __pyx_obj_6pandas_9hashtable_Int64Vector *)__pyx_t_2); __pyx_t_2 = 0; /* "pandas/hashtable.pyx":868 * self.table = Int64HashTable(size_hint) * self.uniques = Int64Vector() * self.count = 0 # <<<<<<<<<<<<<< * * def get_count(self): */ __pyx_v_self->count = 0; /* "pandas/hashtable.pyx":865 * cdef public Py_ssize_t count * * def __init__(self, size_hint): # <<<<<<<<<<<<<< * self.table = Int64HashTable(size_hint) * self.uniques = Int64Vector() */ /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("pandas.hashtable.Int64Factorizer.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/hashtable.pyx":870 * self.count = 0 * * def get_count(self): # <<<<<<<<<<<<<< * return self.count * */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_9hashtable_15Int64Factorizer_3get_count(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static PyObject *__pyx_pw_6pandas_9hashtable_15Int64Factorizer_3get_count(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("get_count (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_9hashtable_15Int64Factorizer_2get_count(((struct __pyx_obj_6pandas_9hashtable_Int64Factorizer *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_9hashtable_15Int64Factorizer_2get_count(struct __pyx_obj_6pandas_9hashtable_Int64Factorizer *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_count", 0); /* "pandas/hashtable.pyx":871 * * def get_count(self): * return self.count # <<<<<<<<<<<<<< * * def factorize(self, ndarray[int64_t] values, sort=False, */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_self->count); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 871; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "pandas/hashtable.pyx":870 * self.count = 0 * * def get_count(self): # <<<<<<<<<<<<<< * return self.count * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas.hashtable.Int64Factorizer.get_count", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/hashtable.pyx":873 * return self.count * * def factorize(self, ndarray[int64_t] values, sort=False, # <<<<<<<<<<<<<< * na_sentinel=-1): * labels = self.table.get_labels(values, self.uniques, */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_9hashtable_15Int64Factorizer_5factorize(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_6pandas_9hashtable_15Int64Factorizer_5factorize(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_values = 0; PyObject *__pyx_v_sort = 0; PyObject *__pyx_v_na_sentinel = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("factorize (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_values,&__pyx_n_s_sort,&__pyx_n_s_na_sentinel,0}; PyObject* values[3] = {0,0,0}; values[1] = ((PyObject *)Py_False); values[2] = ((PyObject *)__pyx_int_neg_1); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_values)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_sort); if (value) { values[1] = value; kw_args--; } } case 2: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_na_sentinel); if (value) { values[2] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "factorize") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 873; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_values = ((PyArrayObject *)values[0]); __pyx_v_sort = values[1]; __pyx_v_na_sentinel = values[2]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("factorize", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 873; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.hashtable.Int64Factorizer.factorize", __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_filename = __pyx_f[0]; __pyx_lineno = 873; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_9hashtable_15Int64Factorizer_4factorize(((struct __pyx_obj_6pandas_9hashtable_Int64Factorizer *)__pyx_v_self), __pyx_v_values, __pyx_v_sort, __pyx_v_na_sentinel); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_9hashtable_15Int64Factorizer_4factorize(struct __pyx_obj_6pandas_9hashtable_Int64Factorizer *__pyx_v_self, PyArrayObject *__pyx_v_values, PyObject *__pyx_v_sort, PyObject *__pyx_v_na_sentinel) { PyObject *__pyx_v_labels = NULL; PyObject *__pyx_v_sorter = NULL; PyObject *__pyx_v_reverse_indexer = NULL; __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; int __pyx_t_4; Py_ssize_t __pyx_t_5; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("factorize", 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_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 873; __pyx_clineno = __LINE__; goto __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/hashtable.pyx":875 * def factorize(self, ndarray[int64_t] values, sort=False, * na_sentinel=-1): * labels = self.table.get_labels(values, self.uniques, # <<<<<<<<<<<<<< * self.count, na_sentinel) * */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->table), __pyx_n_s_get_labels); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 875; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); /* "pandas/hashtable.pyx":876 * na_sentinel=-1): * labels = self.table.get_labels(values, self.uniques, * self.count, na_sentinel) # <<<<<<<<<<<<<< * * # sort on */ __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_self->count); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 876; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); /* "pandas/hashtable.pyx":875 * def factorize(self, ndarray[int64_t] values, sort=False, * na_sentinel=-1): * labels = self.table.get_labels(values, self.uniques, # <<<<<<<<<<<<<< * self.count, na_sentinel) * */ __pyx_t_3 = PyTuple_New(4); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 875; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(((PyObject *)__pyx_v_values)); PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_v_values)); __Pyx_GIVEREF(((PyObject *)__pyx_v_values)); __Pyx_INCREF(((PyObject *)__pyx_v_self->uniques)); PyTuple_SET_ITEM(__pyx_t_3, 1, ((PyObject *)__pyx_v_self->uniques)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self->uniques)); PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_na_sentinel); PyTuple_SET_ITEM(__pyx_t_3, 3, __pyx_v_na_sentinel); __Pyx_GIVEREF(__pyx_v_na_sentinel); __pyx_t_2 = 0; __pyx_t_2 = PyObject_Call(__pyx_t_1, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 875; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_labels = __pyx_t_2; __pyx_t_2 = 0; /* "pandas/hashtable.pyx":879 * * # sort on * if sort: # <<<<<<<<<<<<<< * if labels.dtype != np.int_: * labels = labels.astype(np.int_) */ __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_sort); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 879; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__pyx_t_4) { /* "pandas/hashtable.pyx":880 * # sort on * if sort: * if labels.dtype != np.int_: # <<<<<<<<<<<<<< * labels = labels.astype(np.int_) * */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_labels, __pyx_n_s_dtype); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 880; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 880; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_int); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 880; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyObject_RichCompare(__pyx_t_2, __pyx_t_1, Py_NE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 880; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 880; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_4) { /* "pandas/hashtable.pyx":881 * if sort: * if labels.dtype != np.int_: * labels = labels.astype(np.int_) # <<<<<<<<<<<<<< * * sorter = self.uniques.to_array().argsort() */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_labels, __pyx_n_s_astype); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 881; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 881; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_int); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 881; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 881; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_Call(__pyx_t_3, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 881; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF_SET(__pyx_v_labels, __pyx_t_2); __pyx_t_2 = 0; goto __pyx_L4; } __pyx_L4:; /* "pandas/hashtable.pyx":883 * labels = labels.astype(np.int_) * * sorter = self.uniques.to_array().argsort() # <<<<<<<<<<<<<< * reverse_indexer = np.empty(len(sorter), dtype=np.int_) * reverse_indexer.put(sorter, np.arange(len(sorter))) */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->uniques), __pyx_n_s_to_array); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 883; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = PyObject_Call(__pyx_t_2, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 883; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_argsort); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 883; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyObject_Call(__pyx_t_2, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 883; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_sorter = __pyx_t_1; __pyx_t_1 = 0; /* "pandas/hashtable.pyx":884 * * sorter = self.uniques.to_array().argsort() * reverse_indexer = np.empty(len(sorter), dtype=np.int_) # <<<<<<<<<<<<<< * reverse_indexer.put(sorter, np.arange(len(sorter))) * */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 884; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 884; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_5 = PyObject_Length(__pyx_v_sorter); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 884; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_5); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 884; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 884; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 884; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 884; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_int); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 884; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_dtype, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 884; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_7 = PyObject_Call(__pyx_t_2, __pyx_t_3, __pyx_t_1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 884; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __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; __pyx_v_reverse_indexer = __pyx_t_7; __pyx_t_7 = 0; /* "pandas/hashtable.pyx":885 * sorter = self.uniques.to_array().argsort() * reverse_indexer = np.empty(len(sorter), dtype=np.int_) * reverse_indexer.put(sorter, np.arange(len(sorter))) # <<<<<<<<<<<<<< * * labels = reverse_indexer.take(labels) */ __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_reverse_indexer, __pyx_n_s_put); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 885; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 885; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_arange); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 885; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_5 = PyObject_Length(__pyx_v_sorter); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 885; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_5); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 885; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 885; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyObject_Call(__pyx_t_3, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 885; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 885; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_sorter); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_sorter); __Pyx_GIVEREF(__pyx_v_sorter); PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyObject_Call(__pyx_t_7, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 885; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pandas/hashtable.pyx":887 * reverse_indexer.put(sorter, np.arange(len(sorter))) * * labels = reverse_indexer.take(labels) # <<<<<<<<<<<<<< * * self.count = len(self.uniques) */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_reverse_indexer, __pyx_n_s_take); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 887; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 887; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_labels); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_labels); __Pyx_GIVEREF(__pyx_v_labels); __pyx_t_7 = PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 887; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF_SET(__pyx_v_labels, __pyx_t_7); __pyx_t_7 = 0; goto __pyx_L3; } __pyx_L3:; /* "pandas/hashtable.pyx":889 * labels = reverse_indexer.take(labels) * * self.count = len(self.uniques) # <<<<<<<<<<<<<< * return labels * */ __pyx_t_7 = ((PyObject *)__pyx_v_self->uniques); __Pyx_INCREF(__pyx_t_7); __pyx_t_5 = PyObject_Length(__pyx_t_7); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 889; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_v_self->count = __pyx_t_5; /* "pandas/hashtable.pyx":890 * * self.count = len(self.uniques) * return labels # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_labels); __pyx_r = __pyx_v_labels; goto __pyx_L0; /* "pandas/hashtable.pyx":873 * return self.count * * def factorize(self, ndarray[int64_t] values, sort=False, # <<<<<<<<<<<<<< * na_sentinel=-1): * labels = self.table.get_labels(values, self.uniques, */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __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.hashtable.Int64Factorizer.factorize", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF(__pyx_v_labels); __Pyx_XDECREF(__pyx_v_sorter); __Pyx_XDECREF(__pyx_v_reverse_indexer); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/hashtable.pyx":861 * * cdef class Int64Factorizer: * cdef public Int64HashTable table # <<<<<<<<<<<<<< * cdef public Int64Vector uniques * cdef public Py_ssize_t count */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_9hashtable_15Int64Factorizer_5table_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6pandas_9hashtable_15Int64Factorizer_5table_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_9hashtable_15Int64Factorizer_5table___get__(((struct __pyx_obj_6pandas_9hashtable_Int64Factorizer *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_9hashtable_15Int64Factorizer_5table___get__(struct __pyx_obj_6pandas_9hashtable_Int64Factorizer *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_self->table)); __pyx_r = ((PyObject *)__pyx_v_self->table); goto __pyx_L0; /* function exit code */ __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pandas_9hashtable_15Int64Factorizer_5table_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ static int __pyx_pw_6pandas_9hashtable_15Int64Factorizer_5table_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_9hashtable_15Int64Factorizer_5table_2__set__(((struct __pyx_obj_6pandas_9hashtable_Int64Factorizer *)__pyx_v_self), ((PyObject *)__pyx_v_value)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pandas_9hashtable_15Int64Factorizer_5table_2__set__(struct __pyx_obj_6pandas_9hashtable_Int64Factorizer *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__set__", 0); if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_6pandas_9hashtable_Int64HashTable))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 861; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_1 = __pyx_v_value; __Pyx_INCREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->table); __Pyx_DECREF(((PyObject *)__pyx_v_self->table)); __pyx_v_self->table = ((struct __pyx_obj_6pandas_9hashtable_Int64HashTable *)__pyx_t_1); __pyx_t_1 = 0; /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas.hashtable.Int64Factorizer.table.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pandas_9hashtable_15Int64Factorizer_5table_5__del__(PyObject *__pyx_v_self); /*proto*/ static int __pyx_pw_6pandas_9hashtable_15Int64Factorizer_5table_5__del__(PyObject *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_9hashtable_15Int64Factorizer_5table_4__del__(((struct __pyx_obj_6pandas_9hashtable_Int64Factorizer *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pandas_9hashtable_15Int64Factorizer_5table_4__del__(struct __pyx_obj_6pandas_9hashtable_Int64Factorizer *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__", 0); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->table); __Pyx_DECREF(((PyObject *)__pyx_v_self->table)); __pyx_v_self->table = ((struct __pyx_obj_6pandas_9hashtable_Int64HashTable *)Py_None); /* function exit code */ __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/hashtable.pyx":862 * cdef class Int64Factorizer: * cdef public Int64HashTable table * cdef public Int64Vector uniques # <<<<<<<<<<<<<< * cdef public Py_ssize_t count * */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_9hashtable_15Int64Factorizer_7uniques_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6pandas_9hashtable_15Int64Factorizer_7uniques_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_9hashtable_15Int64Factorizer_7uniques___get__(((struct __pyx_obj_6pandas_9hashtable_Int64Factorizer *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_9hashtable_15Int64Factorizer_7uniques___get__(struct __pyx_obj_6pandas_9hashtable_Int64Factorizer *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_self->uniques)); __pyx_r = ((PyObject *)__pyx_v_self->uniques); goto __pyx_L0; /* function exit code */ __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pandas_9hashtable_15Int64Factorizer_7uniques_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ static int __pyx_pw_6pandas_9hashtable_15Int64Factorizer_7uniques_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_9hashtable_15Int64Factorizer_7uniques_2__set__(((struct __pyx_obj_6pandas_9hashtable_Int64Factorizer *)__pyx_v_self), ((PyObject *)__pyx_v_value)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pandas_9hashtable_15Int64Factorizer_7uniques_2__set__(struct __pyx_obj_6pandas_9hashtable_Int64Factorizer *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__set__", 0); if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_6pandas_9hashtable_Int64Vector))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 862; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_1 = __pyx_v_value; __Pyx_INCREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->uniques); __Pyx_DECREF(((PyObject *)__pyx_v_self->uniques)); __pyx_v_self->uniques = ((struct __pyx_obj_6pandas_9hashtable_Int64Vector *)__pyx_t_1); __pyx_t_1 = 0; /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas.hashtable.Int64Factorizer.uniques.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pandas_9hashtable_15Int64Factorizer_7uniques_5__del__(PyObject *__pyx_v_self); /*proto*/ static int __pyx_pw_6pandas_9hashtable_15Int64Factorizer_7uniques_5__del__(PyObject *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_9hashtable_15Int64Factorizer_7uniques_4__del__(((struct __pyx_obj_6pandas_9hashtable_Int64Factorizer *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pandas_9hashtable_15Int64Factorizer_7uniques_4__del__(struct __pyx_obj_6pandas_9hashtable_Int64Factorizer *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__", 0); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->uniques); __Pyx_DECREF(((PyObject *)__pyx_v_self->uniques)); __pyx_v_self->uniques = ((struct __pyx_obj_6pandas_9hashtable_Int64Vector *)Py_None); /* function exit code */ __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/hashtable.pyx":863 * cdef public Int64HashTable table * cdef public Int64Vector uniques * cdef public Py_ssize_t count # <<<<<<<<<<<<<< * * def __init__(self, size_hint): */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_9hashtable_15Int64Factorizer_5count_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6pandas_9hashtable_15Int64Factorizer_5count_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_9hashtable_15Int64Factorizer_5count___get__(((struct __pyx_obj_6pandas_9hashtable_Int64Factorizer *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_9hashtable_15Int64Factorizer_5count___get__(struct __pyx_obj_6pandas_9hashtable_Int64Factorizer *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_self->count); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 863; __pyx_clineno = __LINE__; goto __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.hashtable.Int64Factorizer.count.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pandas_9hashtable_15Int64Factorizer_5count_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ static int __pyx_pw_6pandas_9hashtable_15Int64Factorizer_5count_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_9hashtable_15Int64Factorizer_5count_2__set__(((struct __pyx_obj_6pandas_9hashtable_Int64Factorizer *)__pyx_v_self), ((PyObject *)__pyx_v_value)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pandas_9hashtable_15Int64Factorizer_5count_2__set__(struct __pyx_obj_6pandas_9hashtable_Int64Factorizer *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__set__", 0); __pyx_t_1 = __Pyx_PyIndex_AsSsize_t(__pyx_v_value); if (unlikely((__pyx_t_1 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 863; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_self->count = __pyx_t_1; /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("pandas.hashtable.Int64Factorizer.count.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/hashtable.pyx":893 * * * cdef build_count_table_int64(ndarray[int64_t] values, kh_int64_t *table): # <<<<<<<<<<<<<< * cdef: * int k */ static PyObject *__pyx_f_6pandas_9hashtable_build_count_table_int64(PyArrayObject *__pyx_v_values, kh_int64_t *__pyx_v_table) { int __pyx_v_k; Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_n; int __pyx_v_ret; PyObject *__pyx_v_val = NULL; __Pyx_LocalBuf_ND __pyx_pybuffernd_values; __Pyx_Buffer __pyx_pybuffer_values; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; Py_ssize_t __pyx_t_2; Py_ssize_t __pyx_t_3; int __pyx_t_4; PyObject *__pyx_t_5 = NULL; __pyx_t_5numpy_int64_t __pyx_t_6; int __pyx_t_7; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("build_count_table_int64", 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_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 893; __pyx_clineno = __LINE__; goto __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/hashtable.pyx":896 * cdef: * int k * Py_ssize_t i, n = len(values) # <<<<<<<<<<<<<< * int ret = 0 * */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 896; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/hashtable.pyx":897 * int k * Py_ssize_t i, n = len(values) * int ret = 0 # <<<<<<<<<<<<<< * * kh_resize_int64(table, n) */ __pyx_v_ret = 0; /* "pandas/hashtable.pyx":899 * int ret = 0 * * kh_resize_int64(table, n) # <<<<<<<<<<<<<< * * for i in range(n): */ kh_resize_int64(__pyx_v_table, __pyx_v_n); /* "pandas/hashtable.pyx":901 * kh_resize_int64(table, n) * * for i in range(n): # <<<<<<<<<<<<<< * val = values[i] * k = kh_get_int64(table, val) */ __pyx_t_1 = __pyx_v_n; for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) { __pyx_v_i = __pyx_t_2; /* "pandas/hashtable.pyx":902 * * for i in range(n): * val = values[i] # <<<<<<<<<<<<<< * k = kh_get_int64(table, val) * if k != table.n_buckets: */ __pyx_t_3 = __pyx_v_i; __pyx_t_4 = -1; if (__pyx_t_3 < 0) { __pyx_t_3 += __pyx_pybuffernd_values.diminfo[0].shape; if (unlikely(__pyx_t_3 < 0)) __pyx_t_4 = 0; } else if (unlikely(__pyx_t_3 >= __pyx_pybuffernd_values.diminfo[0].shape)) __pyx_t_4 = 0; if (unlikely(__pyx_t_4 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_4); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 902; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_5 = __Pyx_PyInt_From_npy_int64((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_3, __pyx_pybuffernd_values.diminfo[0].strides))); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 902; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_XDECREF_SET(__pyx_v_val, __pyx_t_5); __pyx_t_5 = 0; /* "pandas/hashtable.pyx":903 * for i in range(n): * val = values[i] * k = kh_get_int64(table, val) # <<<<<<<<<<<<<< * if k != table.n_buckets: * table.vals[k] += 1 */ __pyx_t_6 = __Pyx_PyInt_As_npy_int64(__pyx_v_val); if (unlikely((__pyx_t_6 == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 903; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_k = kh_get_int64(__pyx_v_table, __pyx_t_6); /* "pandas/hashtable.pyx":904 * val = values[i] * k = kh_get_int64(table, val) * if k != table.n_buckets: # <<<<<<<<<<<<<< * table.vals[k] += 1 * else: */ __pyx_t_7 = ((__pyx_v_k != __pyx_v_table->n_buckets) != 0); if (__pyx_t_7) { /* "pandas/hashtable.pyx":905 * k = kh_get_int64(table, val) * if k != table.n_buckets: * table.vals[k] += 1 # <<<<<<<<<<<<<< * else: * k = kh_put_int64(table, val, &ret) */ __pyx_t_4 = __pyx_v_k; (__pyx_v_table->vals[__pyx_t_4]) = ((__pyx_v_table->vals[__pyx_t_4]) + 1); goto __pyx_L5; } /*else*/ { /* "pandas/hashtable.pyx":907 * table.vals[k] += 1 * else: * k = kh_put_int64(table, val, &ret) # <<<<<<<<<<<<<< * table.vals[k] = 1 * */ __pyx_t_6 = __Pyx_PyInt_As_npy_int64(__pyx_v_val); if (unlikely((__pyx_t_6 == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 907; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_k = kh_put_int64(__pyx_v_table, __pyx_t_6, (&__pyx_v_ret)); /* "pandas/hashtable.pyx":908 * else: * k = kh_put_int64(table, val, &ret) * table.vals[k] = 1 # <<<<<<<<<<<<<< * * */ (__pyx_v_table->vals[__pyx_v_k]) = 1; } __pyx_L5:; } /* "pandas/hashtable.pyx":893 * * * cdef build_count_table_int64(ndarray[int64_t] values, kh_int64_t *table): # <<<<<<<<<<<<<< * cdef: * int k */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_5); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __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.hashtable.build_count_table_int64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF(__pyx_v_val); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/hashtable.pyx":911 * * * cpdef value_count_int64(ndarray[int64_t] values): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i */ static PyObject *__pyx_pw_6pandas_9hashtable_3value_count_int64(PyObject *__pyx_self, PyObject *__pyx_v_values); /*proto*/ static PyObject *__pyx_f_6pandas_9hashtable_value_count_int64(PyArrayObject *__pyx_v_values, CYTHON_UNUSED int __pyx_skip_dispatch) { Py_ssize_t __pyx_v_i; kh_int64_t *__pyx_v_table; CYTHON_UNUSED int __pyx_v_ret; int __pyx_v_k; PyObject *__pyx_v_result_keys = NULL; PyObject *__pyx_v_result_counts = NULL; __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; PyObject *__pyx_t_5 = NULL; khint_t __pyx_t_6; int __pyx_t_7; int __pyx_t_8; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("value_count_int64", 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_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 911; __pyx_clineno = __LINE__; goto __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/hashtable.pyx":915 * Py_ssize_t i * kh_int64_t *table * int ret = 0 # <<<<<<<<<<<<<< * int k * */ __pyx_v_ret = 0; /* "pandas/hashtable.pyx":918 * int k * * table = kh_init_int64() # <<<<<<<<<<<<<< * build_count_table_int64(values, table) * */ __pyx_v_table = kh_init_int64(); /* "pandas/hashtable.pyx":919 * * table = kh_init_int64() * build_count_table_int64(values, table) # <<<<<<<<<<<<<< * * i = 0 */ __pyx_t_1 = __pyx_f_6pandas_9hashtable_build_count_table_int64(((PyArrayObject *)__pyx_v_values), __pyx_v_table); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 919; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pandas/hashtable.pyx":921 * build_count_table_int64(values, table) * * i = 0 # <<<<<<<<<<<<<< * result_keys = np.empty(table.n_occupied, dtype=np.int64) * result_counts = np.zeros(table.n_occupied, dtype=np.int64) */ __pyx_v_i = 0; /* "pandas/hashtable.pyx":922 * * i = 0 * result_keys = np.empty(table.n_occupied, dtype=np.int64) # <<<<<<<<<<<<<< * result_counts = np.zeros(table.n_occupied, dtype=np.int64) * for k in range(table.n_buckets): */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 922; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 922; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_PyInt_From_npy_uint32(__pyx_v_table->n_occupied); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 922; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 922; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 922; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 922; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_int64); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 922; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 922; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyObject_Call(__pyx_t_2, __pyx_t_3, __pyx_t_1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 922; __pyx_clineno = __LINE__; goto __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; __pyx_v_result_keys = __pyx_t_5; __pyx_t_5 = 0; /* "pandas/hashtable.pyx":923 * i = 0 * result_keys = np.empty(table.n_occupied, dtype=np.int64) * result_counts = np.zeros(table.n_occupied, dtype=np.int64) # <<<<<<<<<<<<<< * for k in range(table.n_buckets): * if kh_exist_int64(table, k): */ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 923; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_zeros); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 923; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyInt_From_npy_uint32(__pyx_v_table->n_occupied); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 923; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 923; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyDict_New(); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 923; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 923; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_int64); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 923; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_dtype, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 923; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyObject_Call(__pyx_t_1, __pyx_t_3, __pyx_t_5); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 923; __pyx_clineno = __LINE__; goto __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_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_v_result_counts = __pyx_t_4; __pyx_t_4 = 0; /* "pandas/hashtable.pyx":924 * result_keys = np.empty(table.n_occupied, dtype=np.int64) * result_counts = np.zeros(table.n_occupied, dtype=np.int64) * for k in range(table.n_buckets): # <<<<<<<<<<<<<< * if kh_exist_int64(table, k): * result_keys[i] = table.keys[k] */ __pyx_t_6 = __pyx_v_table->n_buckets; for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_6; __pyx_t_7+=1) { __pyx_v_k = __pyx_t_7; /* "pandas/hashtable.pyx":925 * result_counts = np.zeros(table.n_occupied, dtype=np.int64) * for k in range(table.n_buckets): * if kh_exist_int64(table, k): # <<<<<<<<<<<<<< * result_keys[i] = table.keys[k] * result_counts[i] = table.vals[k] */ __pyx_t_8 = (kh_exist_int64(__pyx_v_table, __pyx_v_k) != 0); if (__pyx_t_8) { /* "pandas/hashtable.pyx":926 * for k in range(table.n_buckets): * if kh_exist_int64(table, k): * result_keys[i] = table.keys[k] # <<<<<<<<<<<<<< * result_counts[i] = table.vals[k] * i += 1 */ __pyx_t_4 = __Pyx_PyInt_From_npy_int64((__pyx_v_table->keys[__pyx_v_k])); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 926; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); if (unlikely(__Pyx_SetItemInt(__pyx_v_result_keys, __pyx_v_i, __pyx_t_4, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 926; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "pandas/hashtable.pyx":927 * if kh_exist_int64(table, k): * result_keys[i] = table.keys[k] * result_counts[i] = table.vals[k] # <<<<<<<<<<<<<< * i += 1 * kh_destroy_int64(table) */ __pyx_t_4 = __Pyx_PyInt_FromSize_t((__pyx_v_table->vals[__pyx_v_k])); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 927; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); if (unlikely(__Pyx_SetItemInt(__pyx_v_result_counts, __pyx_v_i, __pyx_t_4, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 927; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "pandas/hashtable.pyx":928 * result_keys[i] = table.keys[k] * result_counts[i] = table.vals[k] * i += 1 # <<<<<<<<<<<<<< * kh_destroy_int64(table) * */ __pyx_v_i = (__pyx_v_i + 1); goto __pyx_L5; } __pyx_L5:; } /* "pandas/hashtable.pyx":929 * result_counts[i] = table.vals[k] * i += 1 * kh_destroy_int64(table) # <<<<<<<<<<<<<< * * return result_keys, result_counts */ kh_destroy_int64(__pyx_v_table); /* "pandas/hashtable.pyx":931 * kh_destroy_int64(table) * * return result_keys, result_counts # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 931; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_v_result_keys); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_result_keys); __Pyx_GIVEREF(__pyx_v_result_keys); __Pyx_INCREF(__pyx_v_result_counts); PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_result_counts); __Pyx_GIVEREF(__pyx_v_result_counts); __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; /* "pandas/hashtable.pyx":911 * * * cpdef value_count_int64(ndarray[int64_t] values): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i */ /* 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_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.hashtable.value_count_int64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF(__pyx_v_result_keys); __Pyx_XDECREF(__pyx_v_result_counts); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_9hashtable_3value_count_int64(PyObject *__pyx_self, PyObject *__pyx_v_values); /*proto*/ static PyObject *__pyx_pw_6pandas_9hashtable_3value_count_int64(PyObject *__pyx_self, PyObject *__pyx_v_values) { CYTHON_UNUSED int __pyx_lineno = 0; CYTHON_UNUSED const char *__pyx_filename = NULL; CYTHON_UNUSED int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("value_count_int64 (wrapper)", 0); if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 911; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_9hashtable_2value_count_int64(__pyx_self, ((PyArrayObject *)__pyx_v_values)); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_9hashtable_2value_count_int64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values) { __Pyx_LocalBuf_ND __pyx_pybuffernd_values; __Pyx_Buffer __pyx_pybuffer_values; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("value_count_int64", 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_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 911; __pyx_clineno = __LINE__; goto __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 = __pyx_f_6pandas_9hashtable_value_count_int64(__pyx_v_values, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 911; __pyx_clineno = __LINE__; goto __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_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.hashtable.value_count_int64", __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/hashtable.pyx":934 * * * cdef build_count_table_object(ndarray[object] values, # <<<<<<<<<<<<<< * ndarray[uint8_t, cast=True] mask, * kh_pymap_t *table): */ static PyObject *__pyx_f_6pandas_9hashtable_build_count_table_object(PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_mask, kh_pymap_t *__pyx_v_table) { int __pyx_v_k; Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_n; int __pyx_v_ret; PyObject *__pyx_v_val = NULL; __Pyx_LocalBuf_ND __pyx_pybuffernd_mask; __Pyx_Buffer __pyx_pybuffer_mask; __Pyx_LocalBuf_ND __pyx_pybuffernd_values; __Pyx_Buffer __pyx_pybuffer_values; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; Py_ssize_t __pyx_t_2; Py_ssize_t __pyx_t_3; int __pyx_t_4; int __pyx_t_5; PyObject *__pyx_t_6 = NULL; Py_ssize_t __pyx_t_7; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("build_count_table_object", 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_mask.pybuffer.buf = NULL; __pyx_pybuffer_mask.refcount = 0; __pyx_pybuffernd_mask.data = NULL; __pyx_pybuffernd_mask.rcbuffer = &__pyx_pybuffer_mask; { __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_filename = __pyx_f[0]; __pyx_lineno = 934; __pyx_clineno = __LINE__; goto __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_mask.rcbuffer->pybuffer, (PyObject*)__pyx_v_mask, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 1, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 934; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; /* "pandas/hashtable.pyx":939 * cdef: * int k * Py_ssize_t i, n = len(values) # <<<<<<<<<<<<<< * int ret = 0 * */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 939; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/hashtable.pyx":940 * int k * Py_ssize_t i, n = len(values) * int ret = 0 # <<<<<<<<<<<<<< * * kh_resize_pymap(table, n // 10) */ __pyx_v_ret = 0; /* "pandas/hashtable.pyx":942 * int ret = 0 * * kh_resize_pymap(table, n // 10) # <<<<<<<<<<<<<< * * for i in range(n): */ kh_resize_pymap(__pyx_v_table, __Pyx_div_Py_ssize_t(__pyx_v_n, 10)); /* "pandas/hashtable.pyx":944 * kh_resize_pymap(table, n // 10) * * for i in range(n): # <<<<<<<<<<<<<< * if mask[i]: * continue */ __pyx_t_1 = __pyx_v_n; for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) { __pyx_v_i = __pyx_t_2; /* "pandas/hashtable.pyx":945 * * for i in range(n): * if mask[i]: # <<<<<<<<<<<<<< * continue * */ __pyx_t_3 = __pyx_v_i; __pyx_t_4 = -1; if (__pyx_t_3 < 0) { __pyx_t_3 += __pyx_pybuffernd_mask.diminfo[0].shape; if (unlikely(__pyx_t_3 < 0)) __pyx_t_4 = 0; } else if (unlikely(__pyx_t_3 >= __pyx_pybuffernd_mask.diminfo[0].shape)) __pyx_t_4 = 0; if (unlikely(__pyx_t_4 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_4); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 945; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_5 = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_mask.rcbuffer->pybuffer.buf, __pyx_t_3, __pyx_pybuffernd_mask.diminfo[0].strides)) != 0); if (__pyx_t_5) { /* "pandas/hashtable.pyx":946 * for i in range(n): * if mask[i]: * continue # <<<<<<<<<<<<<< * * val = values[i] */ goto __pyx_L3_continue; } /* "pandas/hashtable.pyx":948 * continue * * val = values[i] # <<<<<<<<<<<<<< * k = kh_get_pymap(table, val) * if k != table.n_buckets: */ __pyx_t_7 = __pyx_v_i; __pyx_t_4 = -1; if (__pyx_t_7 < 0) { __pyx_t_7 += __pyx_pybuffernd_values.diminfo[0].shape; if (unlikely(__pyx_t_7 < 0)) __pyx_t_4 = 0; } else if (unlikely(__pyx_t_7 >= __pyx_pybuffernd_values.diminfo[0].shape)) __pyx_t_4 = 0; if (unlikely(__pyx_t_4 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_4); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 948; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_6 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_7, __pyx_pybuffernd_values.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_6); __Pyx_XDECREF_SET(__pyx_v_val, __pyx_t_6); __pyx_t_6 = 0; /* "pandas/hashtable.pyx":949 * * val = values[i] * k = kh_get_pymap(table, val) # <<<<<<<<<<<<<< * if k != table.n_buckets: * table.vals[k] += 1 */ __pyx_v_k = kh_get_pymap(__pyx_v_table, ((PyObject *)__pyx_v_val)); /* "pandas/hashtable.pyx":950 * val = values[i] * k = kh_get_pymap(table, val) * if k != table.n_buckets: # <<<<<<<<<<<<<< * table.vals[k] += 1 * else: */ __pyx_t_5 = ((__pyx_v_k != __pyx_v_table->n_buckets) != 0); if (__pyx_t_5) { /* "pandas/hashtable.pyx":951 * k = kh_get_pymap(table, val) * if k != table.n_buckets: * table.vals[k] += 1 # <<<<<<<<<<<<<< * else: * k = kh_put_pymap(table, val, &ret) */ __pyx_t_4 = __pyx_v_k; (__pyx_v_table->vals[__pyx_t_4]) = ((__pyx_v_table->vals[__pyx_t_4]) + 1); goto __pyx_L6; } /*else*/ { /* "pandas/hashtable.pyx":953 * table.vals[k] += 1 * else: * k = kh_put_pymap(table, val, &ret) # <<<<<<<<<<<<<< * table.vals[k] = 1 * */ __pyx_v_k = kh_put_pymap(__pyx_v_table, ((PyObject *)__pyx_v_val), (&__pyx_v_ret)); /* "pandas/hashtable.pyx":954 * else: * k = kh_put_pymap(table, val, &ret) * table.vals[k] = 1 # <<<<<<<<<<<<<< * * */ (__pyx_v_table->vals[__pyx_v_k]) = 1; } __pyx_L6:; __pyx_L3_continue:; } /* "pandas/hashtable.pyx":934 * * * cdef build_count_table_object(ndarray[object] values, # <<<<<<<<<<<<<< * ndarray[uint8_t, cast=True] mask, * kh_pymap_t *table): */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_6); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_mask.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.hashtable.build_count_table_object", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_mask.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF(__pyx_v_val); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/hashtable.pyx":957 * * * cpdef value_count_object(ndarray[object] values, # <<<<<<<<<<<<<< * ndarray[uint8_t, cast=True] mask): * cdef: */ static PyObject *__pyx_pw_6pandas_9hashtable_5value_count_object(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_6pandas_9hashtable_value_count_object(PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_mask, CYTHON_UNUSED int __pyx_skip_dispatch) { Py_ssize_t __pyx_v_i; kh_pymap_t *__pyx_v_table; int __pyx_v_k; PyObject *__pyx_v_result_keys = NULL; PyObject *__pyx_v_result_counts = NULL; __Pyx_LocalBuf_ND __pyx_pybuffernd_mask; __Pyx_Buffer __pyx_pybuffer_mask; __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; khint_t __pyx_t_7; int __pyx_t_8; int __pyx_t_9; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("value_count_object", 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_mask.pybuffer.buf = NULL; __pyx_pybuffer_mask.refcount = 0; __pyx_pybuffernd_mask.data = NULL; __pyx_pybuffernd_mask.rcbuffer = &__pyx_pybuffer_mask; { __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_filename = __pyx_f[0]; __pyx_lineno = 957; __pyx_clineno = __LINE__; goto __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_mask.rcbuffer->pybuffer, (PyObject*)__pyx_v_mask, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 1, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 957; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; /* "pandas/hashtable.pyx":960 * ndarray[uint8_t, cast=True] mask): * cdef: * Py_ssize_t i = len(values) # <<<<<<<<<<<<<< * kh_pymap_t *table * int k */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 960; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_i = __pyx_t_1; /* "pandas/hashtable.pyx":964 * int k * * table = kh_init_pymap() # <<<<<<<<<<<<<< * build_count_table_object(values, mask, table) * */ __pyx_v_table = kh_init_pymap(); /* "pandas/hashtable.pyx":965 * * table = kh_init_pymap() * build_count_table_object(values, mask, table) # <<<<<<<<<<<<<< * * i = 0 */ __pyx_t_2 = __pyx_f_6pandas_9hashtable_build_count_table_object(((PyArrayObject *)__pyx_v_values), ((PyArrayObject *)__pyx_v_mask), __pyx_v_table); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 965; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/hashtable.pyx":967 * build_count_table_object(values, mask, table) * * i = 0 # <<<<<<<<<<<<<< * result_keys = np.empty(table.n_occupied, dtype=object) * result_counts = np.zeros(table.n_occupied, dtype=np.int64) */ __pyx_v_i = 0; /* "pandas/hashtable.pyx":968 * * i = 0 * result_keys = np.empty(table.n_occupied, dtype=object) # <<<<<<<<<<<<<< * result_counts = np.zeros(table.n_occupied, dtype=np.int64) * for k in range(table.n_buckets): */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 968; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 968; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyInt_From_npy_uint32(__pyx_v_table->n_occupied); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 968; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 968; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 968; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_dtype, __pyx_builtin_object) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 968; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_5 = PyObject_Call(__pyx_t_3, __pyx_t_4, __pyx_t_2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 968; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_result_keys = __pyx_t_5; __pyx_t_5 = 0; /* "pandas/hashtable.pyx":969 * i = 0 * result_keys = np.empty(table.n_occupied, dtype=object) * result_counts = np.zeros(table.n_occupied, dtype=np.int64) # <<<<<<<<<<<<<< * for k in range(table.n_buckets): * if kh_exist_pymap(table, k): */ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 969; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_zeros); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 969; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyInt_From_npy_uint32(__pyx_v_table->n_occupied); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 969; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 969; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyDict_New(); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 969; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 969; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_int64); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 969; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_dtype, __pyx_t_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 969; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyObject_Call(__pyx_t_2, __pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 969; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_v_result_counts = __pyx_t_6; __pyx_t_6 = 0; /* "pandas/hashtable.pyx":970 * result_keys = np.empty(table.n_occupied, dtype=object) * result_counts = np.zeros(table.n_occupied, dtype=np.int64) * for k in range(table.n_buckets): # <<<<<<<<<<<<<< * if kh_exist_pymap(table, k): * result_keys[i] = table.keys[k] */ __pyx_t_7 = __pyx_v_table->n_buckets; for (__pyx_t_8 = 0; __pyx_t_8 < __pyx_t_7; __pyx_t_8+=1) { __pyx_v_k = __pyx_t_8; /* "pandas/hashtable.pyx":971 * result_counts = np.zeros(table.n_occupied, dtype=np.int64) * for k in range(table.n_buckets): * if kh_exist_pymap(table, k): # <<<<<<<<<<<<<< * result_keys[i] = table.keys[k] * result_counts[i] = table.vals[k] */ __pyx_t_9 = (kh_exist_pymap(__pyx_v_table, __pyx_v_k) != 0); if (__pyx_t_9) { /* "pandas/hashtable.pyx":972 * for k in range(table.n_buckets): * if kh_exist_pymap(table, k): * result_keys[i] = table.keys[k] # <<<<<<<<<<<<<< * result_counts[i] = table.vals[k] * i += 1 */ __pyx_t_6 = ((PyObject *)(__pyx_v_table->keys[__pyx_v_k])); __Pyx_INCREF(__pyx_t_6); if (unlikely(__Pyx_SetItemInt(__pyx_v_result_keys, __pyx_v_i, __pyx_t_6, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 972; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; /* "pandas/hashtable.pyx":973 * if kh_exist_pymap(table, k): * result_keys[i] = table.keys[k] * result_counts[i] = table.vals[k] # <<<<<<<<<<<<<< * i += 1 * kh_destroy_pymap(table) */ __pyx_t_6 = __Pyx_PyInt_FromSize_t((__pyx_v_table->vals[__pyx_v_k])); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 973; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); if (unlikely(__Pyx_SetItemInt(__pyx_v_result_counts, __pyx_v_i, __pyx_t_6, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 973; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; /* "pandas/hashtable.pyx":974 * result_keys[i] = table.keys[k] * result_counts[i] = table.vals[k] * i += 1 # <<<<<<<<<<<<<< * kh_destroy_pymap(table) * */ __pyx_v_i = (__pyx_v_i + 1); goto __pyx_L5; } __pyx_L5:; } /* "pandas/hashtable.pyx":975 * result_counts[i] = table.vals[k] * i += 1 * kh_destroy_pymap(table) # <<<<<<<<<<<<<< * * return result_keys, result_counts */ kh_destroy_pymap(__pyx_v_table); /* "pandas/hashtable.pyx":977 * kh_destroy_pymap(table) * * return result_keys, result_counts # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 977; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(__pyx_v_result_keys); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_result_keys); __Pyx_GIVEREF(__pyx_v_result_keys); __Pyx_INCREF(__pyx_v_result_counts); PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_v_result_counts); __Pyx_GIVEREF(__pyx_v_result_counts); __pyx_r = __pyx_t_6; __pyx_t_6 = 0; goto __pyx_L0; /* "pandas/hashtable.pyx":957 * * * cpdef value_count_object(ndarray[object] values, # <<<<<<<<<<<<<< * ndarray[uint8_t, cast=True] mask): * cdef: */ /* 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_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_mask.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.hashtable.value_count_object", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_mask.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF(__pyx_v_result_keys); __Pyx_XDECREF(__pyx_v_result_counts); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_9hashtable_5value_count_object(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_6pandas_9hashtable_5value_count_object(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_values = 0; PyArrayObject *__pyx_v_mask = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("value_count_object (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_values,&__pyx_n_s_mask,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_values)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_mask)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("value_count_object", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 957; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "value_count_object") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 957; __pyx_clineno = __LINE__; goto __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_mask = ((PyArrayObject *)values[1]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("value_count_object", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 957; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.hashtable.value_count_object", __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_filename = __pyx_f[0]; __pyx_lineno = 957; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_mask), __pyx_ptype_5numpy_ndarray, 1, "mask", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 958; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_9hashtable_4value_count_object(__pyx_self, __pyx_v_values, __pyx_v_mask); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_9hashtable_4value_count_object(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_mask) { __Pyx_LocalBuf_ND __pyx_pybuffernd_mask; __Pyx_Buffer __pyx_pybuffer_mask; __Pyx_LocalBuf_ND __pyx_pybuffernd_values; __Pyx_Buffer __pyx_pybuffer_values; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("value_count_object", 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_mask.pybuffer.buf = NULL; __pyx_pybuffer_mask.refcount = 0; __pyx_pybuffernd_mask.data = NULL; __pyx_pybuffernd_mask.rcbuffer = &__pyx_pybuffer_mask; { __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_filename = __pyx_f[0]; __pyx_lineno = 957; __pyx_clineno = __LINE__; goto __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_mask.rcbuffer->pybuffer, (PyObject*)__pyx_v_mask, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 1, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 957; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_6pandas_9hashtable_value_count_object(__pyx_v_values, __pyx_v_mask, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 957; __pyx_clineno = __LINE__; goto __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_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_mask.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.hashtable.value_count_object", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_mask.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/hashtable.pyx":980 * * * def mode_object(ndarray[object] values, ndarray[uint8_t, cast=True] mask): # <<<<<<<<<<<<<< * cdef: * int count, max_count = 2 */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_9hashtable_7mode_object(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_9hashtable_7mode_object = {__Pyx_NAMESTR("mode_object"), (PyCFunction)__pyx_pw_6pandas_9hashtable_7mode_object, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_9hashtable_7mode_object(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_values = 0; PyArrayObject *__pyx_v_mask = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("mode_object (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_values,&__pyx_n_s_mask,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_values)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_mask)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("mode_object", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 980; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "mode_object") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 980; __pyx_clineno = __LINE__; goto __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_mask = ((PyArrayObject *)values[1]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("mode_object", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 980; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.hashtable.mode_object", __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_filename = __pyx_f[0]; __pyx_lineno = 980; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_mask), __pyx_ptype_5numpy_ndarray, 1, "mask", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 980; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_9hashtable_6mode_object(__pyx_self, __pyx_v_values, __pyx_v_mask); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_9hashtable_6mode_object(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_mask) { int __pyx_v_count; int __pyx_v_max_count; int __pyx_v_j; int __pyx_v_k; CYTHON_UNUSED Py_ssize_t __pyx_v_n; kh_pymap_t *__pyx_v_table; CYTHON_UNUSED int __pyx_v_ret; PyObject *__pyx_v_modes = NULL; __Pyx_LocalBuf_ND __pyx_pybuffernd_mask; __Pyx_Buffer __pyx_pybuffer_mask; __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; khint_t __pyx_t_7; int __pyx_t_8; int __pyx_t_9; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("mode_object", 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_mask.pybuffer.buf = NULL; __pyx_pybuffer_mask.refcount = 0; __pyx_pybuffernd_mask.data = NULL; __pyx_pybuffernd_mask.rcbuffer = &__pyx_pybuffer_mask; { __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_filename = __pyx_f[0]; __pyx_lineno = 980; __pyx_clineno = __LINE__; goto __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_mask.rcbuffer->pybuffer, (PyObject*)__pyx_v_mask, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 1, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 980; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; /* "pandas/hashtable.pyx":982 * def mode_object(ndarray[object] values, ndarray[uint8_t, cast=True] mask): * cdef: * int count, max_count = 2 # <<<<<<<<<<<<<< * int j = -1 # so you can do += * int k */ __pyx_v_max_count = 2; /* "pandas/hashtable.pyx":983 * cdef: * int count, max_count = 2 * int j = -1 # so you can do += # <<<<<<<<<<<<<< * int k * Py_ssize_t i, n = len(values) */ __pyx_v_j = -1; /* "pandas/hashtable.pyx":985 * int j = -1 # so you can do += * int k * Py_ssize_t i, n = len(values) # <<<<<<<<<<<<<< * kh_pymap_t *table * int ret = 0 */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 985; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/hashtable.pyx":987 * Py_ssize_t i, n = len(values) * kh_pymap_t *table * int ret = 0 # <<<<<<<<<<<<<< * * table = kh_init_pymap() */ __pyx_v_ret = 0; /* "pandas/hashtable.pyx":989 * int ret = 0 * * table = kh_init_pymap() # <<<<<<<<<<<<<< * build_count_table_object(values, mask, table) * */ __pyx_v_table = kh_init_pymap(); /* "pandas/hashtable.pyx":990 * * table = kh_init_pymap() * build_count_table_object(values, mask, table) # <<<<<<<<<<<<<< * * modes = np.empty(table.n_buckets, dtype=np.object_) */ __pyx_t_2 = __pyx_f_6pandas_9hashtable_build_count_table_object(((PyArrayObject *)__pyx_v_values), ((PyArrayObject *)__pyx_v_mask), __pyx_v_table); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 990; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/hashtable.pyx":992 * build_count_table_object(values, mask, table) * * modes = np.empty(table.n_buckets, dtype=np.object_) # <<<<<<<<<<<<<< * for k in range(table.n_buckets): * if kh_exist_pymap(table, k): */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 992; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 992; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyInt_From_npy_uint32(__pyx_v_table->n_buckets); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 992; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 992; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 992; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 992; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_object_2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 992; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 992; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyObject_Call(__pyx_t_3, __pyx_t_4, __pyx_t_2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 992; __pyx_clineno = __LINE__; goto __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; __pyx_v_modes = __pyx_t_6; __pyx_t_6 = 0; /* "pandas/hashtable.pyx":993 * * modes = np.empty(table.n_buckets, dtype=np.object_) * for k in range(table.n_buckets): # <<<<<<<<<<<<<< * if kh_exist_pymap(table, k): * count = table.vals[k] */ __pyx_t_7 = __pyx_v_table->n_buckets; for (__pyx_t_8 = 0; __pyx_t_8 < __pyx_t_7; __pyx_t_8+=1) { __pyx_v_k = __pyx_t_8; /* "pandas/hashtable.pyx":994 * modes = np.empty(table.n_buckets, dtype=np.object_) * for k in range(table.n_buckets): * if kh_exist_pymap(table, k): # <<<<<<<<<<<<<< * count = table.vals[k] * */ __pyx_t_9 = (kh_exist_pymap(__pyx_v_table, __pyx_v_k) != 0); if (__pyx_t_9) { /* "pandas/hashtable.pyx":995 * for k in range(table.n_buckets): * if kh_exist_pymap(table, k): * count = table.vals[k] # <<<<<<<<<<<<<< * * if count == max_count: */ __pyx_v_count = (__pyx_v_table->vals[__pyx_v_k]); /* "pandas/hashtable.pyx":997 * count = table.vals[k] * * if count == max_count: # <<<<<<<<<<<<<< * j += 1 * elif count > max_count: */ __pyx_t_9 = ((__pyx_v_count == __pyx_v_max_count) != 0); if (__pyx_t_9) { /* "pandas/hashtable.pyx":998 * * if count == max_count: * j += 1 # <<<<<<<<<<<<<< * elif count > max_count: * max_count = count */ __pyx_v_j = (__pyx_v_j + 1); goto __pyx_L6; } /* "pandas/hashtable.pyx":999 * if count == max_count: * j += 1 * elif count > max_count: # <<<<<<<<<<<<<< * max_count = count * j = 0 */ __pyx_t_9 = ((__pyx_v_count > __pyx_v_max_count) != 0); if (__pyx_t_9) { /* "pandas/hashtable.pyx":1000 * j += 1 * elif count > max_count: * max_count = count # <<<<<<<<<<<<<< * j = 0 * else: */ __pyx_v_max_count = __pyx_v_count; /* "pandas/hashtable.pyx":1001 * elif count > max_count: * max_count = count * j = 0 # <<<<<<<<<<<<<< * else: * continue */ __pyx_v_j = 0; goto __pyx_L6; } /*else*/ { /* "pandas/hashtable.pyx":1003 * j = 0 * else: * continue # <<<<<<<<<<<<<< * modes[j] = table.keys[k] * */ goto __pyx_L3_continue; } __pyx_L6:; /* "pandas/hashtable.pyx":1004 * else: * continue * modes[j] = table.keys[k] # <<<<<<<<<<<<<< * * kh_destroy_pymap(table) */ __pyx_t_6 = ((PyObject *)(__pyx_v_table->keys[__pyx_v_k])); __Pyx_INCREF(__pyx_t_6); if (unlikely(__Pyx_SetItemInt(__pyx_v_modes, __pyx_v_j, __pyx_t_6, int, 1, __Pyx_PyInt_From_int, 0, 1, 1) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1004; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; goto __pyx_L5; } __pyx_L5:; __pyx_L3_continue:; } /* "pandas/hashtable.pyx":1006 * modes[j] = table.keys[k] * * kh_destroy_pymap(table) # <<<<<<<<<<<<<< * * return modes[:j+1] */ kh_destroy_pymap(__pyx_v_table); /* "pandas/hashtable.pyx":1008 * kh_destroy_pymap(table) * * return modes[:j+1] # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_6 = __Pyx_PyObject_GetSlice(__pyx_v_modes, 0, (__pyx_v_j + 1), NULL, NULL, NULL, 0, 1, 1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1008; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_r = __pyx_t_6; __pyx_t_6 = 0; goto __pyx_L0; /* "pandas/hashtable.pyx":980 * * * def mode_object(ndarray[object] values, ndarray[uint8_t, cast=True] mask): # <<<<<<<<<<<<<< * cdef: * int count, max_count = 2 */ /* 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_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_mask.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.hashtable.mode_object", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_mask.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF(__pyx_v_modes); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/hashtable.pyx":1011 * * * def mode_int64(ndarray[int64_t] values): # <<<<<<<<<<<<<< * cdef: * int val, max_val = 2 */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_9hashtable_9mode_int64(PyObject *__pyx_self, PyObject *__pyx_v_values); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_9hashtable_9mode_int64 = {__Pyx_NAMESTR("mode_int64"), (PyCFunction)__pyx_pw_6pandas_9hashtable_9mode_int64, METH_O, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_9hashtable_9mode_int64(PyObject *__pyx_self, PyObject *__pyx_v_values) { CYTHON_UNUSED int __pyx_lineno = 0; CYTHON_UNUSED const char *__pyx_filename = NULL; CYTHON_UNUSED int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("mode_int64 (wrapper)", 0); if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1011; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_9hashtable_8mode_int64(__pyx_self, ((PyArrayObject *)__pyx_v_values)); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_9hashtable_8mode_int64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values) { int __pyx_v_val; int __pyx_v_max_val; int __pyx_v_j; int __pyx_v_k; kh_int64_t *__pyx_v_table; CYTHON_UNUSED PyObject *__pyx_v_uniques = 0; PyObject *__pyx_v_modes = NULL; __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; PyObject *__pyx_t_5 = NULL; khint_t __pyx_t_6; int __pyx_t_7; int __pyx_t_8; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("mode_int64", 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_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1011; __pyx_clineno = __LINE__; goto __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/hashtable.pyx":1013 * def mode_int64(ndarray[int64_t] values): * cdef: * int val, max_val = 2 # <<<<<<<<<<<<<< * int j = -1 # so you can do += * int k */ __pyx_v_max_val = 2; /* "pandas/hashtable.pyx":1014 * cdef: * int val, max_val = 2 * int j = -1 # so you can do += # <<<<<<<<<<<<<< * int k * kh_int64_t *table */ __pyx_v_j = -1; /* "pandas/hashtable.pyx":1017 * int k * kh_int64_t *table * list uniques = [] # <<<<<<<<<<<<<< * * table = kh_init_int64() */ __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1017; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_v_uniques = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/hashtable.pyx":1019 * list uniques = [] * * table = kh_init_int64() # <<<<<<<<<<<<<< * * build_count_table_int64(values, table) */ __pyx_v_table = kh_init_int64(); /* "pandas/hashtable.pyx":1021 * table = kh_init_int64() * * build_count_table_int64(values, table) # <<<<<<<<<<<<<< * * modes = np.empty(table.n_buckets, dtype=np.int64) */ __pyx_t_1 = __pyx_f_6pandas_9hashtable_build_count_table_int64(((PyArrayObject *)__pyx_v_values), __pyx_v_table); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1021; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pandas/hashtable.pyx":1023 * build_count_table_int64(values, table) * * modes = np.empty(table.n_buckets, dtype=np.int64) # <<<<<<<<<<<<<< * for k in range(table.n_buckets): * if kh_exist_int64(table, k): */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1023; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 1023; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_PyInt_From_npy_uint32(__pyx_v_table->n_buckets); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1023; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1023; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1023; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1023; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_int64); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1023; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 1023; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyObject_Call(__pyx_t_2, __pyx_t_3, __pyx_t_1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1023; __pyx_clineno = __LINE__; goto __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; __pyx_v_modes = __pyx_t_5; __pyx_t_5 = 0; /* "pandas/hashtable.pyx":1024 * * modes = np.empty(table.n_buckets, dtype=np.int64) * for k in range(table.n_buckets): # <<<<<<<<<<<<<< * if kh_exist_int64(table, k): * val = table.vals[k] */ __pyx_t_6 = __pyx_v_table->n_buckets; for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_6; __pyx_t_7+=1) { __pyx_v_k = __pyx_t_7; /* "pandas/hashtable.pyx":1025 * modes = np.empty(table.n_buckets, dtype=np.int64) * for k in range(table.n_buckets): * if kh_exist_int64(table, k): # <<<<<<<<<<<<<< * val = table.vals[k] * */ __pyx_t_8 = (kh_exist_int64(__pyx_v_table, __pyx_v_k) != 0); if (__pyx_t_8) { /* "pandas/hashtable.pyx":1026 * for k in range(table.n_buckets): * if kh_exist_int64(table, k): * val = table.vals[k] # <<<<<<<<<<<<<< * * if val == max_val: */ __pyx_v_val = (__pyx_v_table->vals[__pyx_v_k]); /* "pandas/hashtable.pyx":1028 * val = table.vals[k] * * if val == max_val: # <<<<<<<<<<<<<< * j += 1 * elif val > max_val: */ __pyx_t_8 = ((__pyx_v_val == __pyx_v_max_val) != 0); if (__pyx_t_8) { /* "pandas/hashtable.pyx":1029 * * if val == max_val: * j += 1 # <<<<<<<<<<<<<< * elif val > max_val: * max_val = val */ __pyx_v_j = (__pyx_v_j + 1); goto __pyx_L6; } /* "pandas/hashtable.pyx":1030 * if val == max_val: * j += 1 * elif val > max_val: # <<<<<<<<<<<<<< * max_val = val * j = 0 */ __pyx_t_8 = ((__pyx_v_val > __pyx_v_max_val) != 0); if (__pyx_t_8) { /* "pandas/hashtable.pyx":1031 * j += 1 * elif val > max_val: * max_val = val # <<<<<<<<<<<<<< * j = 0 * else: */ __pyx_v_max_val = __pyx_v_val; /* "pandas/hashtable.pyx":1032 * elif val > max_val: * max_val = val * j = 0 # <<<<<<<<<<<<<< * else: * continue */ __pyx_v_j = 0; goto __pyx_L6; } /*else*/ { /* "pandas/hashtable.pyx":1034 * j = 0 * else: * continue # <<<<<<<<<<<<<< * modes[j] = table.keys[k] * */ goto __pyx_L3_continue; } __pyx_L6:; /* "pandas/hashtable.pyx":1035 * else: * continue * modes[j] = table.keys[k] # <<<<<<<<<<<<<< * * kh_destroy_int64(table) */ __pyx_t_5 = __Pyx_PyInt_From_npy_int64((__pyx_v_table->keys[__pyx_v_k])); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1035; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); if (unlikely(__Pyx_SetItemInt(__pyx_v_modes, __pyx_v_j, __pyx_t_5, int, 1, __Pyx_PyInt_From_int, 0, 1, 1) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1035; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; goto __pyx_L5; } __pyx_L5:; __pyx_L3_continue:; } /* "pandas/hashtable.pyx":1037 * modes[j] = table.keys[k] * * kh_destroy_int64(table) # <<<<<<<<<<<<<< * * return modes[:j+1] */ kh_destroy_int64(__pyx_v_table); /* "pandas/hashtable.pyx":1039 * kh_destroy_int64(table) * * return modes[:j+1] # <<<<<<<<<<<<<< */ __Pyx_XDECREF(__pyx_r); __pyx_t_5 = __Pyx_PyObject_GetSlice(__pyx_v_modes, 0, (__pyx_v_j + 1), NULL, NULL, NULL, 0, 1, 1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1039; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_r = __pyx_t_5; __pyx_t_5 = 0; goto __pyx_L0; /* "pandas/hashtable.pyx":1011 * * * def mode_int64(ndarray[int64_t] values): # <<<<<<<<<<<<<< * cdef: * int val, max_val = 2 */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __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.hashtable.mode_int64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF(__pyx_v_uniques); __Pyx_XDECREF(__pyx_v_modes); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "util.pxd":26 * object sarr_from_data(cnp.dtype, int length, void* data) * * cdef inline object get_value_at(ndarray arr, object loc): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, sz */ static CYTHON_INLINE PyObject *__pyx_f_4util_get_value_at(PyArrayObject *__pyx_v_arr, PyObject *__pyx_v_loc) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_sz; PyObject *__pyx_v_casted = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; Py_ssize_t __pyx_t_3; int __pyx_t_4; int __pyx_t_5; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_value_at", 0); __Pyx_INCREF(__pyx_v_loc); /* "util.pxd":30 * Py_ssize_t i, sz * void* data_ptr * if is_float_object(loc): # <<<<<<<<<<<<<< * casted = int(loc) * if casted == loc: */ __pyx_t_1 = (is_float_object(__pyx_v_loc) != 0); if (__pyx_t_1) { /* "util.pxd":31 * void* data_ptr * if is_float_object(loc): * casted = int(loc) # <<<<<<<<<<<<<< * if casted == loc: * loc = casted */ __pyx_t_2 = PyNumber_Int(__pyx_v_loc); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 31; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_v_casted = __pyx_t_2; __pyx_t_2 = 0; /* "util.pxd":32 * if is_float_object(loc): * casted = int(loc) * if casted == loc: # <<<<<<<<<<<<<< * loc = casted * i = loc */ __pyx_t_2 = PyObject_RichCompare(__pyx_v_casted, __pyx_v_loc, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 32; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 32; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_1) { /* "util.pxd":33 * casted = int(loc) * if casted == loc: * loc = casted # <<<<<<<<<<<<<< * i = loc * sz = cnp.PyArray_SIZE(arr) */ __Pyx_INCREF(__pyx_v_casted); __Pyx_DECREF_SET(__pyx_v_loc, __pyx_v_casted); goto __pyx_L4; } __pyx_L4:; goto __pyx_L3; } __pyx_L3:; /* "util.pxd":34 * if casted == loc: * loc = casted * i = loc # <<<<<<<<<<<<<< * sz = cnp.PyArray_SIZE(arr) * */ __pyx_t_3 = __Pyx_PyIndex_AsSsize_t(__pyx_v_loc); if (unlikely((__pyx_t_3 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 34; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_i = ((Py_ssize_t)__pyx_t_3); /* "util.pxd":35 * loc = casted * i = loc * sz = cnp.PyArray_SIZE(arr) # <<<<<<<<<<<<<< * * if i < 0 and sz > 0: */ __pyx_v_sz = PyArray_SIZE(__pyx_v_arr); /* "util.pxd":37 * sz = cnp.PyArray_SIZE(arr) * * if i < 0 and sz > 0: # <<<<<<<<<<<<<< * i += sz * elif i >= sz or sz == 0: */ __pyx_t_1 = ((__pyx_v_i < 0) != 0); if (__pyx_t_1) { __pyx_t_4 = ((__pyx_v_sz > 0) != 0); __pyx_t_5 = __pyx_t_4; } else { __pyx_t_5 = __pyx_t_1; } if (__pyx_t_5) { /* "util.pxd":38 * * if i < 0 and sz > 0: * i += sz # <<<<<<<<<<<<<< * elif i >= sz or sz == 0: * raise IndexError('index out of bounds') */ __pyx_v_i = (__pyx_v_i + __pyx_v_sz); goto __pyx_L5; } /* "util.pxd":39 * if i < 0 and sz > 0: * i += sz * elif i >= sz or sz == 0: # <<<<<<<<<<<<<< * raise IndexError('index out of bounds') * */ __pyx_t_5 = ((__pyx_v_i >= __pyx_v_sz) != 0); if (!__pyx_t_5) { __pyx_t_1 = ((__pyx_v_sz == 0) != 0); __pyx_t_4 = __pyx_t_1; } else { __pyx_t_4 = __pyx_t_5; } if (__pyx_t_4) { /* "util.pxd":40 * i += sz * elif i >= sz or sz == 0: * raise IndexError('index out of bounds') # <<<<<<<<<<<<<< * * return get_value_1d(arr, i) */ __pyx_t_2 = PyObject_Call(__pyx_builtin_IndexError, __pyx_tuple_, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 40; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 40; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_L5:; /* "util.pxd":42 * raise IndexError('index out of bounds') * * return get_value_1d(arr, i) # <<<<<<<<<<<<<< * * cdef inline set_value_at(ndarray arr, object loc, object value): */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = get_value_1d(__pyx_v_arr, __pyx_v_i); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 42; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "util.pxd":26 * object sarr_from_data(cnp.dtype, int length, void* data) * * cdef inline object get_value_at(ndarray arr, object loc): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, sz */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("util.get_value_at", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_casted); __Pyx_XDECREF(__pyx_v_loc); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "util.pxd":44 * return get_value_1d(arr, i) * * cdef inline set_value_at(ndarray arr, object loc, object value): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, sz */ static CYTHON_INLINE PyObject *__pyx_f_4util_set_value_at(PyArrayObject *__pyx_v_arr, PyObject *__pyx_v_loc, PyObject *__pyx_v_value) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_sz; PyObject *__pyx_v_casted = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; Py_ssize_t __pyx_t_3; int __pyx_t_4; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("set_value_at", 0); __Pyx_INCREF(__pyx_v_loc); /* "util.pxd":47 * cdef: * Py_ssize_t i, sz * if is_float_object(loc): # <<<<<<<<<<<<<< * casted = int(loc) * if casted == loc: */ __pyx_t_1 = (is_float_object(__pyx_v_loc) != 0); if (__pyx_t_1) { /* "util.pxd":48 * Py_ssize_t i, sz * if is_float_object(loc): * casted = int(loc) # <<<<<<<<<<<<<< * if casted == loc: * loc = casted */ __pyx_t_2 = PyNumber_Int(__pyx_v_loc); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_v_casted = __pyx_t_2; __pyx_t_2 = 0; /* "util.pxd":49 * if is_float_object(loc): * casted = int(loc) * if casted == loc: # <<<<<<<<<<<<<< * loc = casted * i = loc */ __pyx_t_2 = PyObject_RichCompare(__pyx_v_casted, __pyx_v_loc, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_1) { /* "util.pxd":50 * casted = int(loc) * if casted == loc: * loc = casted # <<<<<<<<<<<<<< * i = loc * sz = cnp.PyArray_SIZE(arr) */ __Pyx_INCREF(__pyx_v_casted); __Pyx_DECREF_SET(__pyx_v_loc, __pyx_v_casted); goto __pyx_L4; } __pyx_L4:; goto __pyx_L3; } __pyx_L3:; /* "util.pxd":51 * if casted == loc: * loc = casted * i = loc # <<<<<<<<<<<<<< * sz = cnp.PyArray_SIZE(arr) * */ __pyx_t_3 = __Pyx_PyIndex_AsSsize_t(__pyx_v_loc); if (unlikely((__pyx_t_3 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_i = ((Py_ssize_t)__pyx_t_3); /* "util.pxd":52 * loc = casted * i = loc * sz = cnp.PyArray_SIZE(arr) # <<<<<<<<<<<<<< * * if i < 0: */ __pyx_v_sz = PyArray_SIZE(__pyx_v_arr); /* "util.pxd":54 * sz = cnp.PyArray_SIZE(arr) * * if i < 0: # <<<<<<<<<<<<<< * i += sz * elif i >= sz: */ __pyx_t_1 = ((__pyx_v_i < 0) != 0); if (__pyx_t_1) { /* "util.pxd":55 * * if i < 0: * i += sz # <<<<<<<<<<<<<< * elif i >= sz: * raise IndexError('index out of bounds') */ __pyx_v_i = (__pyx_v_i + __pyx_v_sz); goto __pyx_L5; } /* "util.pxd":56 * if i < 0: * i += sz * elif i >= sz: # <<<<<<<<<<<<<< * raise IndexError('index out of bounds') * */ __pyx_t_1 = ((__pyx_v_i >= __pyx_v_sz) != 0); if (__pyx_t_1) { /* "util.pxd":57 * i += sz * elif i >= sz: * raise IndexError('index out of bounds') # <<<<<<<<<<<<<< * * assign_value_1d(arr, i, value) */ __pyx_t_2 = PyObject_Call(__pyx_builtin_IndexError, __pyx_tuple__2, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 57; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 57; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_L5:; /* "util.pxd":59 * raise IndexError('index out of bounds') * * assign_value_1d(arr, i, value) # <<<<<<<<<<<<<< * * cdef inline int is_contiguous(ndarray arr): */ __pyx_t_4 = assign_value_1d(__pyx_v_arr, __pyx_v_i, __pyx_v_value); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 59; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "util.pxd":44 * return get_value_1d(arr, i) * * cdef inline set_value_at(ndarray arr, object loc, object value): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, sz */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("util.set_value_at", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_casted); __Pyx_XDECREF(__pyx_v_loc); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "util.pxd":61 * assign_value_1d(arr, i, value) * * cdef inline int is_contiguous(ndarray arr): # <<<<<<<<<<<<<< * return cnp.PyArray_CHKFLAGS(arr, cnp.NPY_C_CONTIGUOUS) * */ static CYTHON_INLINE int __pyx_f_4util_is_contiguous(PyArrayObject *__pyx_v_arr) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("is_contiguous", 0); /* "util.pxd":62 * * cdef inline int is_contiguous(ndarray arr): * return cnp.PyArray_CHKFLAGS(arr, cnp.NPY_C_CONTIGUOUS) # <<<<<<<<<<<<<< * * cdef inline is_array(object o): */ __pyx_r = PyArray_CHKFLAGS(__pyx_v_arr, NPY_C_CONTIGUOUS); goto __pyx_L0; /* "util.pxd":61 * assign_value_1d(arr, i, value) * * cdef inline int is_contiguous(ndarray arr): # <<<<<<<<<<<<<< * return cnp.PyArray_CHKFLAGS(arr, cnp.NPY_C_CONTIGUOUS) * */ /* function exit code */ __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "util.pxd":64 * return cnp.PyArray_CHKFLAGS(arr, cnp.NPY_C_CONTIGUOUS) * * cdef inline is_array(object o): # <<<<<<<<<<<<<< * return cnp.PyArray_Check(o) * */ static CYTHON_INLINE PyObject *__pyx_f_4util_is_array(PyObject *__pyx_v_o) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("is_array", 0); /* "util.pxd":65 * * cdef inline is_array(object o): * return cnp.PyArray_Check(o) # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyBool_FromLong(PyArray_Check(__pyx_v_o)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 65; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "util.pxd":64 * return cnp.PyArray_CHKFLAGS(arr, cnp.NPY_C_CONTIGUOUS) * * cdef inline is_array(object o): # <<<<<<<<<<<<<< * return cnp.PyArray_Check(o) * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("util.is_array", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "util.pxd":68 * * * cdef inline bint _checknull(object val): # <<<<<<<<<<<<<< * try: * return val is None or (cpython.PyFloat_Check(val) and val != val) */ static CYTHON_INLINE int __pyx_f_4util__checknull(PyObject *__pyx_v_val) { 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; int __pyx_t_9; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_checknull", 0); /* "util.pxd":69 * * cdef inline bint _checknull(object val): * try: # <<<<<<<<<<<<<< * return val is None or (cpython.PyFloat_Check(val) and val != val) * except ValueError: */ { __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:*/ { /* "util.pxd":70 * cdef inline bint _checknull(object val): * try: * return val is None or (cpython.PyFloat_Check(val) and val != val) # <<<<<<<<<<<<<< * except ValueError: * return False */ __pyx_t_4 = (__pyx_v_val == Py_None); __pyx_t_5 = __Pyx_PyBool_FromLong(__pyx_t_4); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L3_error;} if (!__pyx_t_4) { __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_6 = __Pyx_PyBool_FromLong(PyFloat_Check(__pyx_v_val)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L3_error;} if (__pyx_t_4) { __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_7 = PyObject_RichCompare(__pyx_v_val, __pyx_v_val, Py_NE); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_t_8 = __pyx_t_7; __pyx_t_7 = 0; } else { __pyx_t_8 = __pyx_t_6; __pyx_t_6 = 0; } __pyx_t_6 = __pyx_t_8; __pyx_t_8 = 0; } else { __pyx_t_6 = __pyx_t_5; __pyx_t_5 = 0; } __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_r = __pyx_t_4; goto __pyx_L7_try_return; } __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L10_try_end; __pyx_L3_error:; __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; /* "util.pxd":71 * try: * return val is None or (cpython.PyFloat_Check(val) and val != val) * except ValueError: # <<<<<<<<<<<<<< * return False * */ __pyx_t_9 = PyErr_ExceptionMatches(__pyx_builtin_ValueError); if (__pyx_t_9) { __Pyx_AddTraceback("util._checknull", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_5, &__pyx_t_8) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 71; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_GOTREF(__pyx_t_5); __Pyx_GOTREF(__pyx_t_8); /* "util.pxd":72 * return val is None or (cpython.PyFloat_Check(val) and val != val) * except ValueError: * return False # <<<<<<<<<<<<<< * * cdef inline bint _checknull_old(object val): */ __pyx_r = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; goto __pyx_L6_except_return; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; goto __pyx_L4_exception_handled; } goto __pyx_L5_except_error; __pyx_L5_except_error:; __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); goto __pyx_L1_error; __pyx_L7_try_return:; __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); goto __pyx_L0; __pyx_L6_except_return:; __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); goto __pyx_L0; __pyx_L4_exception_handled:; __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); __pyx_L10_try_end:; } /* "util.pxd":68 * * * cdef inline bint _checknull(object val): # <<<<<<<<<<<<<< * try: * return val is None or (cpython.PyFloat_Check(val) and val != val) */ /* 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_WriteUnraisable("util._checknull", __pyx_clineno, __pyx_lineno, __pyx_filename, 0); __pyx_r = 0; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "util.pxd":74 * return False * * cdef inline bint _checknull_old(object val): # <<<<<<<<<<<<<< * import numpy as np * cdef double INF = np.inf */ static CYTHON_INLINE int __pyx_f_4util__checknull_old(PyObject *__pyx_v_val) { PyObject *__pyx_v_np = NULL; double __pyx_v_INF; double __pyx_v_NEGINF; int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; double __pyx_t_2; 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; int __pyx_t_9; int __pyx_t_10; int __pyx_t_11; int __pyx_t_12; PyObject *__pyx_t_13 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_checknull_old", 0); /* "util.pxd":75 * * cdef inline bint _checknull_old(object val): * import numpy as np # <<<<<<<<<<<<<< * cdef double INF = np.inf * cdef double NEGINF = -INF */ __pyx_t_1 = __Pyx_Import(__pyx_n_s_numpy, 0, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 75; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_v_np = __pyx_t_1; __pyx_t_1 = 0; /* "util.pxd":76 * cdef inline bint _checknull_old(object val): * import numpy as np * cdef double INF = np.inf # <<<<<<<<<<<<<< * cdef double NEGINF = -INF * try: */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_np, __pyx_n_s_inf); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 76; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __pyx_PyFloat_AsDouble(__pyx_t_1); if (unlikely((__pyx_t_2 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 76; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_INF = ((double)__pyx_t_2); /* "util.pxd":77 * import numpy as np * cdef double INF = np.inf * cdef double NEGINF = -INF # <<<<<<<<<<<<<< * try: * return bool(val is None or val != val and val != INF */ __pyx_v_NEGINF = (-__pyx_v_INF); /* "util.pxd":78 * cdef double INF = np.inf * cdef double NEGINF = -INF * try: # <<<<<<<<<<<<<< * return bool(val is None or val != val and val != INF * and val != NEGINF) */ { __Pyx_ExceptionSave(&__pyx_t_3, &__pyx_t_4, &__pyx_t_5); __Pyx_XGOTREF(__pyx_t_3); __Pyx_XGOTREF(__pyx_t_4); __Pyx_XGOTREF(__pyx_t_5); /*try:*/ { /* "util.pxd":79 * cdef double NEGINF = -INF * try: * return bool(val is None or val != val and val != INF # <<<<<<<<<<<<<< * and val != NEGINF) * except ValueError: */ __pyx_t_6 = (__pyx_v_val == Py_None); if (!__pyx_t_6) { __pyx_t_1 = PyObject_RichCompare(__pyx_v_val, __pyx_v_val, Py_NE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_7) { /* "util.pxd":80 * try: * return bool(val is None or val != val and val != INF * and val != NEGINF) # <<<<<<<<<<<<<< * except ValueError: * return False */ __pyx_t_1 = PyFloat_FromDouble(__pyx_v_INF); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 80; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_8 = PyObject_RichCompare(__pyx_v_val, __pyx_t_1, Py_NE); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "util.pxd":79 * cdef double NEGINF = -INF * try: * return bool(val is None or val != val and val != INF # <<<<<<<<<<<<<< * and val != NEGINF) * except ValueError: */ __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (__pyx_t_9) { /* "util.pxd":80 * try: * return bool(val is None or val != val and val != INF * and val != NEGINF) # <<<<<<<<<<<<<< * except ValueError: * return False */ __pyx_t_8 = PyFloat_FromDouble(__pyx_v_NEGINF); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 80; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_1 = PyObject_RichCompare(__pyx_v_val, __pyx_t_8, Py_NE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 80; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 80; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_11 = __pyx_t_10; } else { __pyx_t_11 = __pyx_t_9; } __pyx_t_9 = __pyx_t_11; } else { __pyx_t_9 = __pyx_t_7; } __pyx_t_7 = __pyx_t_9; } else { __pyx_t_7 = __pyx_t_6; } /* "util.pxd":79 * cdef double NEGINF = -INF * try: * return bool(val is None or val != val and val != INF # <<<<<<<<<<<<<< * and val != NEGINF) * except ValueError: */ __pyx_r = (!(!__pyx_t_7)); goto __pyx_L7_try_return; } __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; goto __pyx_L10_try_end; __pyx_L3_error:; __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; /* "util.pxd":81 * return bool(val is None or val != val and val != INF * and val != NEGINF) * except ValueError: # <<<<<<<<<<<<<< * return False * */ __pyx_t_12 = PyErr_ExceptionMatches(__pyx_builtin_ValueError); if (__pyx_t_12) { __Pyx_AddTraceback("util._checknull_old", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_8, &__pyx_t_13) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_GOTREF(__pyx_t_8); __Pyx_GOTREF(__pyx_t_13); /* "util.pxd":82 * and val != NEGINF) * except ValueError: * return False # <<<<<<<<<<<<<< * * cdef inline bint _checknan(object val): */ __pyx_r = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; goto __pyx_L6_except_return; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; goto __pyx_L4_exception_handled; } goto __pyx_L5_except_error; __pyx_L5_except_error:; __Pyx_XGIVEREF(__pyx_t_3); __Pyx_XGIVEREF(__pyx_t_4); __Pyx_XGIVEREF(__pyx_t_5); __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5); goto __pyx_L1_error; __pyx_L7_try_return:; __Pyx_XGIVEREF(__pyx_t_3); __Pyx_XGIVEREF(__pyx_t_4); __Pyx_XGIVEREF(__pyx_t_5); __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5); goto __pyx_L0; __pyx_L6_except_return:; __Pyx_XGIVEREF(__pyx_t_3); __Pyx_XGIVEREF(__pyx_t_4); __Pyx_XGIVEREF(__pyx_t_5); __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5); goto __pyx_L0; __pyx_L4_exception_handled:; __Pyx_XGIVEREF(__pyx_t_3); __Pyx_XGIVEREF(__pyx_t_4); __Pyx_XGIVEREF(__pyx_t_5); __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5); __pyx_L10_try_end:; } /* "util.pxd":74 * return False * * cdef inline bint _checknull_old(object val): # <<<<<<<<<<<<<< * import numpy as np * cdef double INF = np.inf */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_13); __Pyx_WriteUnraisable("util._checknull_old", __pyx_clineno, __pyx_lineno, __pyx_filename, 0); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_np); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "util.pxd":84 * return False * * cdef inline bint _checknan(object val): # <<<<<<<<<<<<<< * return not cnp.PyArray_Check(val) and val != val */ static CYTHON_INLINE int __pyx_f_4util__checknan(PyObject *__pyx_v_val) { int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_checknan", 0); /* "util.pxd":85 * * cdef inline bint _checknan(object val): * return not cnp.PyArray_Check(val) and val != val # <<<<<<<<<<<<<< */ __pyx_t_1 = __Pyx_PyBool_FromLong((!(PyArray_Check(__pyx_v_val) != 0))); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__pyx_t_2) { __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_3 = PyObject_RichCompare(__pyx_v_val, __pyx_v_val, Py_NE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_4 = __pyx_t_3; __pyx_t_3 = 0; } else { __pyx_t_4 = __pyx_t_1; __pyx_t_1 = 0; } __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_r = __pyx_t_2; goto __pyx_L0; /* "util.pxd":84 * return False * * cdef inline bint _checknan(object val): # <<<<<<<<<<<<<< * return not cnp.PyArray_Check(val) and val != val */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_WriteUnraisable("util._checknan", __pyx_clineno, __pyx_lineno, __pyx_filename, 0); __pyx_r = 0; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "numpy.pxd":196 * # 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 fullfill 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_copy_shape; 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_v_hasfields; int __pyx_r; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; int __pyx_t_5; int __pyx_t_6; int __pyx_t_7; PyObject *__pyx_t_8 = NULL; char *__pyx_t_9; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__getbuffer__", 0); if (__pyx_v_info != NULL) { __pyx_v_info->obj = Py_None; __Pyx_INCREF(Py_None); __Pyx_GIVEREF(__pyx_v_info->obj); } /* "numpy.pxd":202 * # of flags * * if info == NULL: return # <<<<<<<<<<<<<< * * cdef int copy_shape, i, ndim */ __pyx_t_1 = ((__pyx_v_info == NULL) != 0); if (__pyx_t_1) { __pyx_r = 0; goto __pyx_L0; } /* "numpy.pxd":205 * * cdef int copy_shape, i, ndim * cdef int endian_detector = 1 # <<<<<<<<<<<<<< * cdef bint little_endian = ((&endian_detector)[0] != 0) * */ __pyx_v_endian_detector = 1; /* "numpy.pxd":206 * cdef int copy_shape, 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); /* "numpy.pxd":208 * cdef bint little_endian = ((&endian_detector)[0] != 0) * * ndim = PyArray_NDIM(self) # <<<<<<<<<<<<<< * * if sizeof(npy_intp) != sizeof(Py_ssize_t): */ __pyx_v_ndim = PyArray_NDIM(__pyx_v_self); /* "numpy.pxd":210 * ndim = PyArray_NDIM(self) * * if sizeof(npy_intp) != sizeof(Py_ssize_t): # <<<<<<<<<<<<<< * copy_shape = 1 * else: */ __pyx_t_1 = (((sizeof(npy_intp)) != (sizeof(Py_ssize_t))) != 0); if (__pyx_t_1) { /* "numpy.pxd":211 * * if sizeof(npy_intp) != sizeof(Py_ssize_t): * copy_shape = 1 # <<<<<<<<<<<<<< * else: * copy_shape = 0 */ __pyx_v_copy_shape = 1; goto __pyx_L4; } /*else*/ { /* "numpy.pxd":213 * copy_shape = 1 * else: * copy_shape = 0 # <<<<<<<<<<<<<< * * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) */ __pyx_v_copy_shape = 0; } __pyx_L4:; /* "numpy.pxd":215 * copy_shape = 0 * * 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_1 = (((__pyx_v_flags & PyBUF_C_CONTIGUOUS) == PyBUF_C_CONTIGUOUS) != 0); if (__pyx_t_1) { /* "numpy.pxd":216 * * 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_3 = __pyx_t_2; } else { __pyx_t_3 = __pyx_t_1; } if (__pyx_t_3) { /* "numpy.pxd":217 * 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_4 = PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__3, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 217; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 217; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } /* "numpy.pxd":219 * 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_3 = (((__pyx_v_flags & PyBUF_F_CONTIGUOUS) == PyBUF_F_CONTIGUOUS) != 0); if (__pyx_t_3) { /* "numpy.pxd":220 * * 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_1 = ((!(PyArray_CHKFLAGS(__pyx_v_self, NPY_F_CONTIGUOUS) != 0)) != 0); __pyx_t_2 = __pyx_t_1; } else { __pyx_t_2 = __pyx_t_3; } if (__pyx_t_2) { /* "numpy.pxd":221 * 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_4 = PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__4, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 221; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 221; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } /* "numpy.pxd":223 * raise ValueError(u"ndarray is not Fortran contiguous") * * info.buf = PyArray_DATA(self) # <<<<<<<<<<<<<< * info.ndim = ndim * if copy_shape: */ __pyx_v_info->buf = PyArray_DATA(__pyx_v_self); /* "numpy.pxd":224 * * info.buf = PyArray_DATA(self) * info.ndim = ndim # <<<<<<<<<<<<<< * if copy_shape: * # Allocate new buffer for strides and shape info. */ __pyx_v_info->ndim = __pyx_v_ndim; /* "numpy.pxd":225 * info.buf = PyArray_DATA(self) * info.ndim = ndim * if copy_shape: # <<<<<<<<<<<<<< * # Allocate new buffer for strides and shape info. * # This is allocated as one block, strides first. */ __pyx_t_2 = (__pyx_v_copy_shape != 0); if (__pyx_t_2) { /* "numpy.pxd":228 * # Allocate new buffer for strides and shape info. * # This is allocated as one block, strides first. * info.strides = stdlib.malloc(sizeof(Py_ssize_t) * ndim * 2) # <<<<<<<<<<<<<< * info.shape = info.strides + ndim * for i in range(ndim): */ __pyx_v_info->strides = ((Py_ssize_t *)malloc((((sizeof(Py_ssize_t)) * ((size_t)__pyx_v_ndim)) * 2))); /* "numpy.pxd":229 * # This is allocated as one block, strides first. * info.strides = stdlib.malloc(sizeof(Py_ssize_t) * ndim * 2) * 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); /* "numpy.pxd":230 * info.strides = stdlib.malloc(sizeof(Py_ssize_t) * ndim * 2) * 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_5 = __pyx_v_ndim; for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) { __pyx_v_i = __pyx_t_6; /* "numpy.pxd":231 * 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]); /* "numpy.pxd":232 * 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]); } goto __pyx_L7; } /*else*/ { /* "numpy.pxd":234 * info.shape[i] = PyArray_DIMS(self)[i] * else: * info.strides = PyArray_STRIDES(self) # <<<<<<<<<<<<<< * info.shape = PyArray_DIMS(self) * info.suboffsets = NULL */ __pyx_v_info->strides = ((Py_ssize_t *)PyArray_STRIDES(__pyx_v_self)); /* "numpy.pxd":235 * 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_L7:; /* "numpy.pxd":236 * 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; /* "numpy.pxd":237 * 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); /* "numpy.pxd":238 * 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)); /* "numpy.pxd":241 * * cdef int t * cdef char* f = NULL # <<<<<<<<<<<<<< * cdef dtype descr = self.descr * cdef list stack */ __pyx_v_f = NULL; /* "numpy.pxd":242 * cdef int t * cdef char* f = NULL * cdef dtype descr = self.descr # <<<<<<<<<<<<<< * cdef list stack * cdef int offset */ __pyx_t_4 = ((PyObject *)__pyx_v_self->descr); __Pyx_INCREF(__pyx_t_4); __pyx_v_descr = ((PyArray_Descr *)__pyx_t_4); __pyx_t_4 = 0; /* "numpy.pxd":246 * cdef int offset * * cdef bint hasfields = PyDataType_HASFIELDS(descr) # <<<<<<<<<<<<<< * * if not hasfields and not copy_shape: */ __pyx_v_hasfields = PyDataType_HASFIELDS(__pyx_v_descr); /* "numpy.pxd":248 * cdef bint hasfields = PyDataType_HASFIELDS(descr) * * if not hasfields and not copy_shape: # <<<<<<<<<<<<<< * # do not call releasebuffer * info.obj = None */ __pyx_t_2 = ((!(__pyx_v_hasfields != 0)) != 0); if (__pyx_t_2) { __pyx_t_3 = ((!(__pyx_v_copy_shape != 0)) != 0); __pyx_t_1 = __pyx_t_3; } else { __pyx_t_1 = __pyx_t_2; } if (__pyx_t_1) { /* "numpy.pxd":250 * if not hasfields and not copy_shape: * # do not call releasebuffer * info.obj = None # <<<<<<<<<<<<<< * else: * # need to call releasebuffer */ __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_info->obj); __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = Py_None; goto __pyx_L10; } /*else*/ { /* "numpy.pxd":253 * else: * # need to call releasebuffer * info.obj = self # <<<<<<<<<<<<<< * * if not hasfields: */ __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); } __pyx_L10:; /* "numpy.pxd":255 * info.obj = self * * if not hasfields: # <<<<<<<<<<<<<< * t = descr.type_num * if ((descr.byteorder == '>' and little_endian) or */ __pyx_t_1 = ((!(__pyx_v_hasfields != 0)) != 0); if (__pyx_t_1) { /* "numpy.pxd":256 * * if not hasfields: * t = descr.type_num # <<<<<<<<<<<<<< * if ((descr.byteorder == '>' and little_endian) or * (descr.byteorder == '<' and not little_endian)): */ __pyx_t_5 = __pyx_v_descr->type_num; __pyx_v_t = __pyx_t_5; /* "numpy.pxd":257 * if not hasfields: * t = descr.type_num * if ((descr.byteorder == '>' and little_endian) or # <<<<<<<<<<<<<< * (descr.byteorder == '<' and not little_endian)): * raise ValueError(u"Non-native byte order not supported") */ __pyx_t_1 = ((__pyx_v_descr->byteorder == '>') != 0); if (__pyx_t_1) { __pyx_t_2 = (__pyx_v_little_endian != 0); } else { __pyx_t_2 = __pyx_t_1; } if (!__pyx_t_2) { /* "numpy.pxd":258 * t = descr.type_num * if ((descr.byteorder == '>' and little_endian) or * (descr.byteorder == '<' and not little_endian)): # <<<<<<<<<<<<<< * raise ValueError(u"Non-native byte order not supported") * if t == NPY_BYTE: f = "b" */ __pyx_t_1 = ((__pyx_v_descr->byteorder == '<') != 0); if (__pyx_t_1) { __pyx_t_3 = ((!(__pyx_v_little_endian != 0)) != 0); __pyx_t_7 = __pyx_t_3; } else { __pyx_t_7 = __pyx_t_1; } __pyx_t_1 = __pyx_t_7; } else { __pyx_t_1 = __pyx_t_2; } if (__pyx_t_1) { /* "numpy.pxd":259 * if ((descr.byteorder == '>' and little_endian) or * (descr.byteorder == '<' 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_4 = PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__5, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 259; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 259; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } /* "numpy.pxd":276 * 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) */ switch (__pyx_v_t) { /* "numpy.pxd":260 * (descr.byteorder == '<' 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" */ case NPY_BYTE: __pyx_v_f = __pyx_k_b; break; /* "numpy.pxd":261 * 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 = __pyx_k_B; break; /* "numpy.pxd":262 * 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 = __pyx_k_h; break; /* "numpy.pxd":263 * 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 = __pyx_k_H; break; /* "numpy.pxd":264 * 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 = __pyx_k_i; break; /* "numpy.pxd":265 * 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 = __pyx_k_I; break; /* "numpy.pxd":266 * 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 = __pyx_k_l; break; /* "numpy.pxd":267 * 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 = __pyx_k_L; break; /* "numpy.pxd":268 * 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 = __pyx_k_q; break; /* "numpy.pxd":269 * 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 = __pyx_k_Q; break; /* "numpy.pxd":270 * 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 = __pyx_k_f; break; /* "numpy.pxd":271 * 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 = __pyx_k_d; break; /* "numpy.pxd":272 * 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 = __pyx_k_g; break; /* "numpy.pxd":273 * 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 = __pyx_k_Zf; break; /* "numpy.pxd":274 * 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 = __pyx_k_Zd; break; /* "numpy.pxd":275 * 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 = __pyx_k_Zg; break; /* "numpy.pxd":276 * 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 = __pyx_k_O; break; default: /* "numpy.pxd":278 * elif t == NPY_OBJECT: f = "O" * else: * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) # <<<<<<<<<<<<<< * info.format = f * return */ __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_t); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 278; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_8 = PyUnicode_Format(__pyx_kp_u_unknown_dtype_code_in_numpy_pxd, __pyx_t_4); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 278; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 278; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_8); __Pyx_GIVEREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_8 = PyObject_Call(__pyx_builtin_ValueError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 278; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_Raise(__pyx_t_8, 0, 0, 0); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; {__pyx_filename = __pyx_f[2]; __pyx_lineno = 278; __pyx_clineno = __LINE__; goto __pyx_L1_error;} break; } /* "numpy.pxd":279 * else: * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) * info.format = f # <<<<<<<<<<<<<< * return * else: */ __pyx_v_info->format = __pyx_v_f; /* "numpy.pxd":280 * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) * info.format = f * return # <<<<<<<<<<<<<< * else: * info.format = stdlib.malloc(_buffer_format_string_len) */ __pyx_r = 0; goto __pyx_L0; } /*else*/ { /* "numpy.pxd":282 * return * else: * info.format = stdlib.malloc(_buffer_format_string_len) # <<<<<<<<<<<<<< * info.format[0] = '^' # Native data types, manual alignment * offset = 0 */ __pyx_v_info->format = ((char *)malloc(255)); /* "numpy.pxd":283 * else: * info.format = stdlib.malloc(_buffer_format_string_len) * info.format[0] = '^' # Native data types, manual alignment # <<<<<<<<<<<<<< * offset = 0 * f = _util_dtypestring(descr, info.format + 1, */ (__pyx_v_info->format[0]) = '^'; /* "numpy.pxd":284 * info.format = stdlib.malloc(_buffer_format_string_len) * info.format[0] = '^' # Native data types, manual alignment * offset = 0 # <<<<<<<<<<<<<< * f = _util_dtypestring(descr, info.format + 1, * info.format + _buffer_format_string_len, */ __pyx_v_offset = 0; /* "numpy.pxd":285 * info.format[0] = '^' # Native data types, manual alignment * offset = 0 * f = _util_dtypestring(descr, info.format + 1, # <<<<<<<<<<<<<< * info.format + _buffer_format_string_len, * &offset) */ __pyx_t_9 = __pyx_f_5numpy__util_dtypestring(__pyx_v_descr, (__pyx_v_info->format + 1), (__pyx_v_info->format + 255), (&__pyx_v_offset)); if (unlikely(__pyx_t_9 == NULL)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 285; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_f = __pyx_t_9; /* "numpy.pxd":288 * info.format + _buffer_format_string_len, * &offset) * f[0] = 0 # Terminate format string # <<<<<<<<<<<<<< * * def __releasebuffer__(ndarray self, Py_buffer* info): */ (__pyx_v_f[0]) = 0; } /* "numpy.pxd":196 * # 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 fullfill the PEP. */ /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_8); __Pyx_AddTraceback("numpy.ndarray.__getbuffer__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; if (__pyx_v_info != NULL && __pyx_v_info->obj != NULL) { __Pyx_GOTREF(__pyx_v_info->obj); __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = NULL; } goto __pyx_L2; __pyx_L0:; if (__pyx_v_info != NULL && __pyx_v_info->obj == Py_None) { __Pyx_GOTREF(Py_None); __Pyx_DECREF(Py_None); __pyx_v_info->obj = NULL; } __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_descr); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "numpy.pxd":290 * f[0] = 0 # Terminate format string * * def __releasebuffer__(ndarray self, Py_buffer* info): # <<<<<<<<<<<<<< * if PyArray_HASFIELDS(self): * stdlib.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); /* "numpy.pxd":291 * * def __releasebuffer__(ndarray self, Py_buffer* info): * if PyArray_HASFIELDS(self): # <<<<<<<<<<<<<< * stdlib.free(info.format) * if sizeof(npy_intp) != sizeof(Py_ssize_t): */ __pyx_t_1 = (PyArray_HASFIELDS(__pyx_v_self) != 0); if (__pyx_t_1) { /* "numpy.pxd":292 * def __releasebuffer__(ndarray self, Py_buffer* info): * if PyArray_HASFIELDS(self): * stdlib.free(info.format) # <<<<<<<<<<<<<< * if sizeof(npy_intp) != sizeof(Py_ssize_t): * stdlib.free(info.strides) */ free(__pyx_v_info->format); goto __pyx_L3; } __pyx_L3:; /* "numpy.pxd":293 * if PyArray_HASFIELDS(self): * stdlib.free(info.format) * if sizeof(npy_intp) != sizeof(Py_ssize_t): # <<<<<<<<<<<<<< * stdlib.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) { /* "numpy.pxd":294 * stdlib.free(info.format) * if sizeof(npy_intp) != sizeof(Py_ssize_t): * stdlib.free(info.strides) # <<<<<<<<<<<<<< * # info.shape was stored after info.strides in the same block * */ free(__pyx_v_info->strides); goto __pyx_L4; } __pyx_L4:; /* "numpy.pxd":290 * f[0] = 0 # Terminate format string * * def __releasebuffer__(ndarray self, Py_buffer* info): # <<<<<<<<<<<<<< * if PyArray_HASFIELDS(self): * stdlib.free(info.format) */ /* function exit code */ __Pyx_RefNannyFinishContext(); } /* "numpy.pxd":772 * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PyArray_MultiIterNew1", 0); /* "numpy.pxd":773 * * 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_filename = __pyx_f[2]; __pyx_lineno = 773; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "numpy.pxd":772 * 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; } /* "numpy.pxd":775 * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PyArray_MultiIterNew2", 0); /* "numpy.pxd":776 * * 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_filename = __pyx_f[2]; __pyx_lineno = 776; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "numpy.pxd":775 * 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; } /* "numpy.pxd":778 * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PyArray_MultiIterNew3", 0); /* "numpy.pxd":779 * * 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_filename = __pyx_f[2]; __pyx_lineno = 779; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "numpy.pxd":778 * 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; } /* "numpy.pxd":781 * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PyArray_MultiIterNew4", 0); /* "numpy.pxd":782 * * 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_filename = __pyx_f[2]; __pyx_lineno = 782; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "numpy.pxd":781 * 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; } /* "numpy.pxd":784 * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PyArray_MultiIterNew5", 0); /* "numpy.pxd":785 * * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): * return PyArray_MultiIterNew(5, a, b, c, d, e) # <<<<<<<<<<<<<< * * cdef inline char* _util_dtypestring(dtype descr, char* f, char* end, int* offset) except NULL: */ __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_filename = __pyx_f[2]; __pyx_lineno = 785; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "numpy.pxd":784 * 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; } /* "numpy.pxd":787 * return PyArray_MultiIterNew(5, a, b, c, d, e) * * 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; PyObject *__pyx_t_5 = NULL; int __pyx_t_6; int __pyx_t_7; int __pyx_t_8; int __pyx_t_9; long __pyx_t_10; char *__pyx_t_11; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_util_dtypestring", 0); /* "numpy.pxd":794 * cdef int delta_offset * cdef tuple i * cdef int endian_detector = 1 # <<<<<<<<<<<<<< * cdef bint little_endian = ((&endian_detector)[0] != 0) * cdef tuple fields */ __pyx_v_endian_detector = 1; /* "numpy.pxd":795 * cdef tuple i * 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); /* "numpy.pxd":798 * 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_filename = __pyx_f[2]; __pyx_lineno = 798; __pyx_clineno = __LINE__; goto __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_COMPILING_IN_CPYTHON __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_filename = __pyx_f[2]; __pyx_lineno = 798; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 798; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif __Pyx_XDECREF_SET(__pyx_v_childname, __pyx_t_3); __pyx_t_3 = 0; /* "numpy.pxd":799 * * for childname in descr.names: * fields = descr.fields[childname] # <<<<<<<<<<<<<< * child, new_offset = fields * */ __pyx_t_3 = PyObject_GetItem(__pyx_v_descr->fields, __pyx_v_childname); if (unlikely(__pyx_t_3 == NULL)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 799; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 799; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_XDECREF_SET(__pyx_v_fields, ((PyObject*)__pyx_t_3)); __pyx_t_3 = 0; /* "numpy.pxd":800 * 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; #if CYTHON_COMPILING_IN_CPYTHON Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 800; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON __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_filename = __pyx_f[2]; __pyx_lineno = 800; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 800; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); #endif } else { __Pyx_RaiseNoneNotIterableError(); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 800; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_dtype))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 800; __pyx_clineno = __LINE__; goto __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; /* "numpy.pxd":802 * 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_ptrdiff_t((__pyx_v_end - __pyx_v_f)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 802; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = __Pyx_PyInt_From_int((__pyx_v_offset[0])); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 802; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = PyNumber_Subtract(__pyx_v_new_offset, __pyx_t_3); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 802; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyNumber_Subtract(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 802; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyObject_RichCompare(__pyx_t_3, __pyx_int_15, Py_LT); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 802; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 802; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_6) { /* "numpy.pxd":803 * * if (end - f) - (new_offset - offset[0]) < 15: * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") # <<<<<<<<<<<<<< * * if ((child.byteorder == '>' and little_endian) or */ __pyx_t_5 = PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__6, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 803; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_Raise(__pyx_t_5, 0, 0, 0); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; {__pyx_filename = __pyx_f[2]; __pyx_lineno = 803; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } /* "numpy.pxd":805 * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") * * if ((child.byteorder == '>' and little_endian) or # <<<<<<<<<<<<<< * (child.byteorder == '<' and not little_endian)): * raise ValueError(u"Non-native byte order not supported") */ __pyx_t_6 = ((__pyx_v_child->byteorder == '>') != 0); if (__pyx_t_6) { __pyx_t_7 = (__pyx_v_little_endian != 0); } else { __pyx_t_7 = __pyx_t_6; } if (!__pyx_t_7) { /* "numpy.pxd":806 * * if ((child.byteorder == '>' and little_endian) or * (child.byteorder == '<' 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_6 = ((__pyx_v_child->byteorder == '<') != 0); if (__pyx_t_6) { __pyx_t_8 = ((!(__pyx_v_little_endian != 0)) != 0); __pyx_t_9 = __pyx_t_8; } else { __pyx_t_9 = __pyx_t_6; } __pyx_t_6 = __pyx_t_9; } else { __pyx_t_6 = __pyx_t_7; } if (__pyx_t_6) { /* "numpy.pxd":807 * if ((child.byteorder == '>' and little_endian) or * (child.byteorder == '<' 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_5 = PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__7, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 807; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_Raise(__pyx_t_5, 0, 0, 0); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; {__pyx_filename = __pyx_f[2]; __pyx_lineno = 807; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } /* "numpy.pxd":817 * * # Output padding bytes * while offset[0] < new_offset: # <<<<<<<<<<<<<< * f[0] = 120 # "x"; pad byte * f += 1 */ while (1) { __pyx_t_5 = __Pyx_PyInt_From_int((__pyx_v_offset[0])); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 817; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = PyObject_RichCompare(__pyx_t_5, __pyx_v_new_offset, Py_LT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 817; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 817; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (!__pyx_t_6) break; /* "numpy.pxd":818 * # Output padding bytes * while offset[0] < new_offset: * f[0] = 120 # "x"; pad byte # <<<<<<<<<<<<<< * f += 1 * offset[0] += 1 */ (__pyx_v_f[0]) = 120; /* "numpy.pxd":819 * while offset[0] < new_offset: * f[0] = 120 # "x"; pad byte * f += 1 # <<<<<<<<<<<<<< * offset[0] += 1 * */ __pyx_v_f = (__pyx_v_f + 1); /* "numpy.pxd":820 * f[0] = 120 # "x"; pad byte * f += 1 * offset[0] += 1 # <<<<<<<<<<<<<< * * offset[0] += child.itemsize */ __pyx_t_10 = 0; (__pyx_v_offset[__pyx_t_10]) = ((__pyx_v_offset[__pyx_t_10]) + 1); } /* "numpy.pxd":822 * offset[0] += 1 * * offset[0] += child.itemsize # <<<<<<<<<<<<<< * * if not PyDataType_HASFIELDS(child): */ __pyx_t_10 = 0; (__pyx_v_offset[__pyx_t_10]) = ((__pyx_v_offset[__pyx_t_10]) + __pyx_v_child->elsize); /* "numpy.pxd":824 * 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) { /* "numpy.pxd":825 * * if not PyDataType_HASFIELDS(child): * t = child.type_num # <<<<<<<<<<<<<< * if end - f < 5: * raise RuntimeError(u"Format string allocated too short.") */ __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_child->type_num); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 825; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_XDECREF_SET(__pyx_v_t, __pyx_t_3); __pyx_t_3 = 0; /* "numpy.pxd":826 * 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 (__pyx_t_6) { /* "numpy.pxd":827 * 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_3 = PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__8, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 827; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 827; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } /* "numpy.pxd":830 * * # 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_3 = PyInt_FromLong(NPY_BYTE); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 830; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 830; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 830; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_6) { (__pyx_v_f[0]) = 98; goto __pyx_L11; } /* "numpy.pxd":831 * # 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_5 = PyInt_FromLong(NPY_UBYTE); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 831; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 831; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 831; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_6) { (__pyx_v_f[0]) = 66; goto __pyx_L11; } /* "numpy.pxd":832 * 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_3 = PyInt_FromLong(NPY_SHORT); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 832; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 832; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 832; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_6) { (__pyx_v_f[0]) = 104; goto __pyx_L11; } /* "numpy.pxd":833 * 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_5 = PyInt_FromLong(NPY_USHORT); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 833; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 833; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 833; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_6) { (__pyx_v_f[0]) = 72; goto __pyx_L11; } /* "numpy.pxd":834 * 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_3 = PyInt_FromLong(NPY_INT); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 834; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 834; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 834; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_6) { (__pyx_v_f[0]) = 105; goto __pyx_L11; } /* "numpy.pxd":835 * 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_5 = PyInt_FromLong(NPY_UINT); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 835; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 835; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 835; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_6) { (__pyx_v_f[0]) = 73; goto __pyx_L11; } /* "numpy.pxd":836 * 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_3 = PyInt_FromLong(NPY_LONG); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 836; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 836; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 836; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_6) { (__pyx_v_f[0]) = 108; goto __pyx_L11; } /* "numpy.pxd":837 * 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_5 = PyInt_FromLong(NPY_ULONG); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 837; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 837; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 837; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_6) { (__pyx_v_f[0]) = 76; goto __pyx_L11; } /* "numpy.pxd":838 * 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_3 = PyInt_FromLong(NPY_LONGLONG); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 838; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 838; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 838; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_6) { (__pyx_v_f[0]) = 113; goto __pyx_L11; } /* "numpy.pxd":839 * 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_5 = PyInt_FromLong(NPY_ULONGLONG); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 839; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 839; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 839; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_6) { (__pyx_v_f[0]) = 81; goto __pyx_L11; } /* "numpy.pxd":840 * 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_3 = PyInt_FromLong(NPY_FLOAT); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 840; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 840; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 840; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_6) { (__pyx_v_f[0]) = 102; goto __pyx_L11; } /* "numpy.pxd":841 * 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_5 = PyInt_FromLong(NPY_DOUBLE); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 841; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 841; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 841; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_6) { (__pyx_v_f[0]) = 100; goto __pyx_L11; } /* "numpy.pxd":842 * 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_3 = PyInt_FromLong(NPY_LONGDOUBLE); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 842; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 842; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 842; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_6) { (__pyx_v_f[0]) = 103; goto __pyx_L11; } /* "numpy.pxd":843 * 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_5 = PyInt_FromLong(NPY_CFLOAT); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 843; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 843; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 843; __pyx_clineno = __LINE__; goto __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]) = 102; __pyx_v_f = (__pyx_v_f + 1); goto __pyx_L11; } /* "numpy.pxd":844 * 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_3 = PyInt_FromLong(NPY_CDOUBLE); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 844; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 844; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 844; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_6) { (__pyx_v_f[0]) = 90; (__pyx_v_f[1]) = 100; __pyx_v_f = (__pyx_v_f + 1); goto __pyx_L11; } /* "numpy.pxd":845 * 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_5 = PyInt_FromLong(NPY_CLONGDOUBLE); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 845; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 845; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 845; __pyx_clineno = __LINE__; goto __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]) = 103; __pyx_v_f = (__pyx_v_f + 1); goto __pyx_L11; } /* "numpy.pxd":846 * 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_3 = PyInt_FromLong(NPY_OBJECT); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 846; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 846; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 846; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_6) { (__pyx_v_f[0]) = 79; goto __pyx_L11; } /*else*/ { /* "numpy.pxd":848 * elif t == NPY_OBJECT: f[0] = 79 #"O" * else: * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) # <<<<<<<<<<<<<< * f += 1 * else: */ __pyx_t_5 = PyUnicode_Format(__pyx_kp_u_unknown_dtype_code_in_numpy_pxd, __pyx_v_t); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 848; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 848; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyObject_Call(__pyx_builtin_ValueError, __pyx_t_3, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 848; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_Raise(__pyx_t_5, 0, 0, 0); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; {__pyx_filename = __pyx_f[2]; __pyx_lineno = 848; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_L11:; /* "numpy.pxd":849 * 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); goto __pyx_L9; } /*else*/ { /* "numpy.pxd":853 * # Cython ignores struct boundary information ("T{...}"), * # so don't output it * f = _util_dtypestring(child, f, end, offset) # <<<<<<<<<<<<<< * return f * */ __pyx_t_11 = __pyx_f_5numpy__util_dtypestring(__pyx_v_child, __pyx_v_f, __pyx_v_end, __pyx_v_offset); if (unlikely(__pyx_t_11 == NULL)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 853; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_f = __pyx_t_11; } __pyx_L9:; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "numpy.pxd":854 * # so don't output it * f = _util_dtypestring(child, f, end, offset) * return f # <<<<<<<<<<<<<< * * */ __pyx_r = __pyx_v_f; goto __pyx_L0; /* "numpy.pxd":787 * return PyArray_MultiIterNew(5, a, b, c, d, e) * * 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_XDECREF(__pyx_t_5); __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; } /* "numpy.pxd":969 * * * 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); /* "numpy.pxd":971 * 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) { /* "numpy.pxd":972 * cdef PyObject* baseptr * if base is None: * baseptr = NULL # <<<<<<<<<<<<<< * else: * Py_INCREF(base) # important to do this before decref below! */ __pyx_v_baseptr = NULL; goto __pyx_L3; } /*else*/ { /* "numpy.pxd":974 * baseptr = NULL * else: * Py_INCREF(base) # important to do this before decref below! # <<<<<<<<<<<<<< * baseptr = base * Py_XDECREF(arr.base) */ Py_INCREF(__pyx_v_base); /* "numpy.pxd":975 * 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:; /* "numpy.pxd":976 * 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); /* "numpy.pxd":977 * baseptr = base * Py_XDECREF(arr.base) * arr.base = baseptr # <<<<<<<<<<<<<< * * cdef inline object get_array_base(ndarray arr): */ __pyx_v_arr->base = __pyx_v_baseptr; /* "numpy.pxd":969 * * * cdef inline void set_array_base(ndarray arr, object base): # <<<<<<<<<<<<<< * cdef PyObject* baseptr * if base is None: */ /* function exit code */ __Pyx_RefNannyFinishContext(); } /* "numpy.pxd":979 * 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); /* "numpy.pxd":980 * * 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) { /* "numpy.pxd":981 * cdef inline object get_array_base(ndarray arr): * if arr.base is NULL: * return None # <<<<<<<<<<<<<< * else: * return arr.base */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(Py_None); __pyx_r = Py_None; goto __pyx_L0; } /*else*/ { /* "numpy.pxd":983 * return None * else: * return arr.base # <<<<<<<<<<<<<< */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_arr->base)); __pyx_r = ((PyObject *)__pyx_v_arr->base); goto __pyx_L0; } /* "numpy.pxd":979 * 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; } static struct __pyx_vtabstruct_6pandas_9hashtable_Int64Vector __pyx_vtable_6pandas_9hashtable_Int64Vector; static PyObject *__pyx_tp_new_6pandas_9hashtable_Int64Vector(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { struct __pyx_obj_6pandas_9hashtable_Int64Vector *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_9hashtable_Int64Vector *)o); p->__pyx_vtab = __pyx_vtabptr_6pandas_9hashtable_Int64Vector; p->ao = ((PyArrayObject *)Py_None); Py_INCREF(Py_None); if (unlikely(__pyx_pw_6pandas_9hashtable_11Int64Vector_1__cinit__(o, __pyx_empty_tuple, NULL) < 0)) { Py_DECREF(o); o = 0; } return o; } static void __pyx_tp_dealloc_6pandas_9hashtable_Int64Vector(PyObject *o) { struct __pyx_obj_6pandas_9hashtable_Int64Vector *p = (struct __pyx_obj_6pandas_9hashtable_Int64Vector *)o; #if PY_VERSION_HEX >= 0x030400a1 if (unlikely(Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) { if (PyObject_CallFinalizerFromDealloc(o)) return; } #endif PyObject_GC_UnTrack(o); Py_CLEAR(p->ao); (*Py_TYPE(o)->tp_free)(o); } static int __pyx_tp_traverse_6pandas_9hashtable_Int64Vector(PyObject *o, visitproc v, void *a) { int e; struct __pyx_obj_6pandas_9hashtable_Int64Vector *p = (struct __pyx_obj_6pandas_9hashtable_Int64Vector *)o; if (p->ao) { e = (*v)(((PyObject*)p->ao), a); if (e) return e; } return 0; } static int __pyx_tp_clear_6pandas_9hashtable_Int64Vector(PyObject *o) { PyObject* tmp; struct __pyx_obj_6pandas_9hashtable_Int64Vector *p = (struct __pyx_obj_6pandas_9hashtable_Int64Vector *)o; tmp = ((PyObject*)p->ao); p->ao = ((PyArrayObject *)Py_None); Py_INCREF(Py_None); Py_XDECREF(tmp); return 0; } static PyMethodDef __pyx_methods_6pandas_9hashtable_Int64Vector[] = { {__Pyx_NAMESTR("to_array"), (PyCFunction)__pyx_pw_6pandas_9hashtable_11Int64Vector_5to_array, METH_NOARGS, __Pyx_DOCSTR(0)}, {0, 0, 0, 0} }; static PySequenceMethods __pyx_tp_as_sequence_Int64Vector = { __pyx_pw_6pandas_9hashtable_11Int64Vector_3__len__, /*sq_length*/ 0, /*sq_concat*/ 0, /*sq_repeat*/ 0, /*sq_item*/ 0, /*sq_slice*/ 0, /*sq_ass_item*/ 0, /*sq_ass_slice*/ 0, /*sq_contains*/ 0, /*sq_inplace_concat*/ 0, /*sq_inplace_repeat*/ }; static PyMappingMethods __pyx_tp_as_mapping_Int64Vector = { __pyx_pw_6pandas_9hashtable_11Int64Vector_3__len__, /*mp_length*/ 0, /*mp_subscript*/ 0, /*mp_ass_subscript*/ }; static PyTypeObject __pyx_type_6pandas_9hashtable_Int64Vector = { PyVarObject_HEAD_INIT(0, 0) __Pyx_NAMESTR("pandas.hashtable.Int64Vector"), /*tp_name*/ sizeof(struct __pyx_obj_6pandas_9hashtable_Int64Vector), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_6pandas_9hashtable_Int64Vector, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #else 0, /*reserved*/ #endif 0, /*tp_repr*/ 0, /*tp_as_number*/ &__pyx_tp_as_sequence_Int64Vector, /*tp_as_sequence*/ &__pyx_tp_as_mapping_Int64Vector, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ 0, /*tp_doc*/ __pyx_tp_traverse_6pandas_9hashtable_Int64Vector, /*tp_traverse*/ __pyx_tp_clear_6pandas_9hashtable_Int64Vector, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_6pandas_9hashtable_Int64Vector, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_6pandas_9hashtable_Int64Vector, /*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*/ #if PY_VERSION_HEX >= 0x02060000 0, /*tp_version_tag*/ #endif #if PY_VERSION_HEX >= 0x030400a1 0, /*tp_finalize*/ #endif }; static PyObject *__pyx_tp_new_6pandas_9hashtable_HashTable(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_9hashtable_HashTable(PyObject *o) { #if PY_VERSION_HEX >= 0x030400a1 if (unlikely(Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) { if (PyObject_CallFinalizerFromDealloc(o)) return; } #endif (*Py_TYPE(o)->tp_free)(o); } static PyTypeObject __pyx_type_6pandas_9hashtable_HashTable = { PyVarObject_HEAD_INIT(0, 0) __Pyx_NAMESTR("pandas.hashtable.HashTable"), /*tp_name*/ sizeof(struct __pyx_obj_6pandas_9hashtable_HashTable), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_6pandas_9hashtable_HashTable, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #else 0, /*reserved*/ #endif 0, /*tp_repr*/ 0, /*tp_as_number*/ 0, /*tp_as_sequence*/ 0, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/ 0, /*tp_doc*/ 0, /*tp_traverse*/ 0, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ 0, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_6pandas_9hashtable_HashTable, /*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*/ #if PY_VERSION_HEX >= 0x02060000 0, /*tp_version_tag*/ #endif #if PY_VERSION_HEX >= 0x030400a1 0, /*tp_finalize*/ #endif }; static PyObject *__pyx_tp_new_6pandas_9hashtable_Float64HashTable(PyTypeObject *t, PyObject *a, PyObject *k) { PyObject *o = __pyx_tp_new_6pandas_9hashtable_HashTable(t, a, k); if (unlikely(!o)) return 0; if (unlikely(__pyx_pw_6pandas_9hashtable_16Float64HashTable_1__cinit__(o, a, k) < 0)) { Py_DECREF(o); o = 0; } return o; } static void __pyx_tp_dealloc_6pandas_9hashtable_Float64HashTable(PyObject *o) { #if PY_VERSION_HEX >= 0x030400a1 if (unlikely(Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) { if (PyObject_CallFinalizerFromDealloc(o)) return; } #endif { PyObject *etype, *eval, *etb; PyErr_Fetch(&etype, &eval, &etb); ++Py_REFCNT(o); __pyx_pw_6pandas_9hashtable_16Float64HashTable_5__dealloc__(o); --Py_REFCNT(o); PyErr_Restore(etype, eval, etb); } __pyx_tp_dealloc_6pandas_9hashtable_HashTable(o); } static PyMethodDef __pyx_methods_6pandas_9hashtable_Float64HashTable[] = { {__Pyx_NAMESTR("factorize"), (PyCFunction)__pyx_pw_6pandas_9hashtable_16Float64HashTable_7factorize, METH_O, __Pyx_DOCSTR(0)}, {__Pyx_NAMESTR("get_labels"), (PyCFunction)__pyx_pw_6pandas_9hashtable_16Float64HashTable_9get_labels, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}, {__Pyx_NAMESTR("map_locations"), (PyCFunction)__pyx_pw_6pandas_9hashtable_16Float64HashTable_11map_locations, METH_O, __Pyx_DOCSTR(0)}, {__Pyx_NAMESTR("lookup"), (PyCFunction)__pyx_pw_6pandas_9hashtable_16Float64HashTable_13lookup, METH_O, __Pyx_DOCSTR(0)}, {__Pyx_NAMESTR("unique"), (PyCFunction)__pyx_pw_6pandas_9hashtable_16Float64HashTable_15unique, METH_O, __Pyx_DOCSTR(0)}, {0, 0, 0, 0} }; static PySequenceMethods __pyx_tp_as_sequence_Float64HashTable = { __pyx_pw_6pandas_9hashtable_16Float64HashTable_3__len__, /*sq_length*/ 0, /*sq_concat*/ 0, /*sq_repeat*/ 0, /*sq_item*/ 0, /*sq_slice*/ 0, /*sq_ass_item*/ 0, /*sq_ass_slice*/ 0, /*sq_contains*/ 0, /*sq_inplace_concat*/ 0, /*sq_inplace_repeat*/ }; static PyMappingMethods __pyx_tp_as_mapping_Float64HashTable = { __pyx_pw_6pandas_9hashtable_16Float64HashTable_3__len__, /*mp_length*/ 0, /*mp_subscript*/ 0, /*mp_ass_subscript*/ }; static PyTypeObject __pyx_type_6pandas_9hashtable_Float64HashTable = { PyVarObject_HEAD_INIT(0, 0) __Pyx_NAMESTR("pandas.hashtable.Float64HashTable"), /*tp_name*/ sizeof(struct __pyx_obj_6pandas_9hashtable_Float64HashTable), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_6pandas_9hashtable_Float64HashTable, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #else 0, /*reserved*/ #endif 0, /*tp_repr*/ 0, /*tp_as_number*/ &__pyx_tp_as_sequence_Float64HashTable, /*tp_as_sequence*/ &__pyx_tp_as_mapping_Float64HashTable, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/ 0, /*tp_doc*/ 0, /*tp_traverse*/ 0, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_6pandas_9hashtable_Float64HashTable, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_6pandas_9hashtable_Float64HashTable, /*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*/ #if PY_VERSION_HEX >= 0x02060000 0, /*tp_version_tag*/ #endif #if PY_VERSION_HEX >= 0x030400a1 0, /*tp_finalize*/ #endif }; static struct __pyx_vtabstruct_6pandas_9hashtable_Int32HashTable __pyx_vtable_6pandas_9hashtable_Int32HashTable; static PyObject *__pyx_tp_new_6pandas_9hashtable_Int32HashTable(PyTypeObject *t, PyObject *a, PyObject *k) { struct __pyx_obj_6pandas_9hashtable_Int32HashTable *p; PyObject *o = __pyx_tp_new_6pandas_9hashtable_HashTable(t, a, k); if (unlikely(!o)) return 0; p = ((struct __pyx_obj_6pandas_9hashtable_Int32HashTable *)o); p->__pyx_vtab = __pyx_vtabptr_6pandas_9hashtable_Int32HashTable; if (unlikely(__pyx_pw_6pandas_9hashtable_14Int32HashTable_3__cinit__(o, __pyx_empty_tuple, NULL) < 0)) { Py_DECREF(o); o = 0; } return o; } static void __pyx_tp_dealloc_6pandas_9hashtable_Int32HashTable(PyObject *o) { #if PY_VERSION_HEX >= 0x030400a1 if (unlikely(Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) { if (PyObject_CallFinalizerFromDealloc(o)) return; } #endif { PyObject *etype, *eval, *etb; PyErr_Fetch(&etype, &eval, &etb); ++Py_REFCNT(o); __pyx_pw_6pandas_9hashtable_14Int32HashTable_5__dealloc__(o); --Py_REFCNT(o); PyErr_Restore(etype, eval, etb); } __pyx_tp_dealloc_6pandas_9hashtable_HashTable(o); } static PyMethodDef __pyx_methods_6pandas_9hashtable_Int32HashTable[] = { {__Pyx_NAMESTR("get_item"), (PyCFunction)__pyx_pw_6pandas_9hashtable_14Int32HashTable_7get_item, METH_O, __Pyx_DOCSTR(0)}, {__Pyx_NAMESTR("get_iter_test"), (PyCFunction)__pyx_pw_6pandas_9hashtable_14Int32HashTable_9get_iter_test, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}, {__Pyx_NAMESTR("set_item"), (PyCFunction)__pyx_pw_6pandas_9hashtable_14Int32HashTable_11set_item, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}, {__Pyx_NAMESTR("map_locations"), (PyCFunction)__pyx_pw_6pandas_9hashtable_14Int32HashTable_13map_locations, METH_O, __Pyx_DOCSTR(0)}, {__Pyx_NAMESTR("lookup"), (PyCFunction)__pyx_pw_6pandas_9hashtable_14Int32HashTable_15lookup, METH_O, __Pyx_DOCSTR(0)}, {__Pyx_NAMESTR("factorize"), (PyCFunction)__pyx_pw_6pandas_9hashtable_14Int32HashTable_17factorize, METH_O, __Pyx_DOCSTR(0)}, {0, 0, 0, 0} }; static PyTypeObject __pyx_type_6pandas_9hashtable_Int32HashTable = { PyVarObject_HEAD_INIT(0, 0) __Pyx_NAMESTR("pandas.hashtable.Int32HashTable"), /*tp_name*/ sizeof(struct __pyx_obj_6pandas_9hashtable_Int32HashTable), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_6pandas_9hashtable_Int32HashTable, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #else 0, /*reserved*/ #endif 0, /*tp_repr*/ 0, /*tp_as_number*/ 0, /*tp_as_sequence*/ 0, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/ 0, /*tp_doc*/ 0, /*tp_traverse*/ 0, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_6pandas_9hashtable_Int32HashTable, /*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_9hashtable_14Int32HashTable_1__init__, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_6pandas_9hashtable_Int32HashTable, /*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*/ #if PY_VERSION_HEX >= 0x02060000 0, /*tp_version_tag*/ #endif #if PY_VERSION_HEX >= 0x030400a1 0, /*tp_finalize*/ #endif }; static struct __pyx_vtabstruct_6pandas_9hashtable_StringHashTable __pyx_vtable_6pandas_9hashtable_StringHashTable; static PyObject *__pyx_tp_new_6pandas_9hashtable_StringHashTable(PyTypeObject *t, PyObject *a, PyObject *k) { struct __pyx_obj_6pandas_9hashtable_StringHashTable *p; PyObject *o = __pyx_tp_new_6pandas_9hashtable_HashTable(t, a, k); if (unlikely(!o)) return 0; p = ((struct __pyx_obj_6pandas_9hashtable_StringHashTable *)o); p->__pyx_vtab = __pyx_vtabptr_6pandas_9hashtable_StringHashTable; if (unlikely(__pyx_pw_6pandas_9hashtable_15StringHashTable_1__cinit__(o, a, k) < 0)) { Py_DECREF(o); o = 0; } return o; } static void __pyx_tp_dealloc_6pandas_9hashtable_StringHashTable(PyObject *o) { #if PY_VERSION_HEX >= 0x030400a1 if (unlikely(Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) { if (PyObject_CallFinalizerFromDealloc(o)) return; } #endif { PyObject *etype, *eval, *etb; PyErr_Fetch(&etype, &eval, &etb); ++Py_REFCNT(o); __pyx_pw_6pandas_9hashtable_15StringHashTable_3__dealloc__(o); --Py_REFCNT(o); PyErr_Restore(etype, eval, etb); } __pyx_tp_dealloc_6pandas_9hashtable_HashTable(o); } static PyMethodDef __pyx_methods_6pandas_9hashtable_StringHashTable[] = { {__Pyx_NAMESTR("get_item"), (PyCFunction)__pyx_pw_6pandas_9hashtable_15StringHashTable_5get_item, METH_O, __Pyx_DOCSTR(0)}, {__Pyx_NAMESTR("get_iter_test"), (PyCFunction)__pyx_pw_6pandas_9hashtable_15StringHashTable_7get_iter_test, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}, {__Pyx_NAMESTR("set_item"), (PyCFunction)__pyx_pw_6pandas_9hashtable_15StringHashTable_9set_item, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}, {__Pyx_NAMESTR("get_indexer"), (PyCFunction)__pyx_pw_6pandas_9hashtable_15StringHashTable_11get_indexer, METH_O, __Pyx_DOCSTR(0)}, {__Pyx_NAMESTR("unique"), (PyCFunction)__pyx_pw_6pandas_9hashtable_15StringHashTable_13unique, METH_O, __Pyx_DOCSTR(0)}, {__Pyx_NAMESTR("factorize"), (PyCFunction)__pyx_pw_6pandas_9hashtable_15StringHashTable_15factorize, METH_O, __Pyx_DOCSTR(0)}, {0, 0, 0, 0} }; static PyTypeObject __pyx_type_6pandas_9hashtable_StringHashTable = { PyVarObject_HEAD_INIT(0, 0) __Pyx_NAMESTR("pandas.hashtable.StringHashTable"), /*tp_name*/ sizeof(struct __pyx_obj_6pandas_9hashtable_StringHashTable), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_6pandas_9hashtable_StringHashTable, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #else 0, /*reserved*/ #endif 0, /*tp_repr*/ 0, /*tp_as_number*/ 0, /*tp_as_sequence*/ 0, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/ 0, /*tp_doc*/ 0, /*tp_traverse*/ 0, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_6pandas_9hashtable_StringHashTable, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_6pandas_9hashtable_StringHashTable, /*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*/ #if PY_VERSION_HEX >= 0x02060000 0, /*tp_version_tag*/ #endif #if PY_VERSION_HEX >= 0x030400a1 0, /*tp_finalize*/ #endif }; static struct __pyx_vtabstruct_6pandas_9hashtable_ObjectVector __pyx_vtable_6pandas_9hashtable_ObjectVector; static PyObject *__pyx_tp_new_6pandas_9hashtable_ObjectVector(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { struct __pyx_obj_6pandas_9hashtable_ObjectVector *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_9hashtable_ObjectVector *)o); p->__pyx_vtab = __pyx_vtabptr_6pandas_9hashtable_ObjectVector; p->ao = ((PyArrayObject *)Py_None); Py_INCREF(Py_None); if (unlikely(__pyx_pw_6pandas_9hashtable_12ObjectVector_1__cinit__(o, __pyx_empty_tuple, NULL) < 0)) { Py_DECREF(o); o = 0; } return o; } static void __pyx_tp_dealloc_6pandas_9hashtable_ObjectVector(PyObject *o) { struct __pyx_obj_6pandas_9hashtable_ObjectVector *p = (struct __pyx_obj_6pandas_9hashtable_ObjectVector *)o; #if PY_VERSION_HEX >= 0x030400a1 if (unlikely(Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) { if (PyObject_CallFinalizerFromDealloc(o)) return; } #endif PyObject_GC_UnTrack(o); Py_CLEAR(p->ao); (*Py_TYPE(o)->tp_free)(o); } static int __pyx_tp_traverse_6pandas_9hashtable_ObjectVector(PyObject *o, visitproc v, void *a) { int e; struct __pyx_obj_6pandas_9hashtable_ObjectVector *p = (struct __pyx_obj_6pandas_9hashtable_ObjectVector *)o; if (p->ao) { e = (*v)(((PyObject*)p->ao), a); if (e) return e; } return 0; } static int __pyx_tp_clear_6pandas_9hashtable_ObjectVector(PyObject *o) { PyObject* tmp; struct __pyx_obj_6pandas_9hashtable_ObjectVector *p = (struct __pyx_obj_6pandas_9hashtable_ObjectVector *)o; tmp = ((PyObject*)p->ao); p->ao = ((PyArrayObject *)Py_None); Py_INCREF(Py_None); Py_XDECREF(tmp); return 0; } static PyMethodDef __pyx_methods_6pandas_9hashtable_ObjectVector[] = { {__Pyx_NAMESTR("to_array"), (PyCFunction)__pyx_pw_6pandas_9hashtable_12ObjectVector_5to_array, METH_NOARGS, __Pyx_DOCSTR(0)}, {0, 0, 0, 0} }; static PySequenceMethods __pyx_tp_as_sequence_ObjectVector = { __pyx_pw_6pandas_9hashtable_12ObjectVector_3__len__, /*sq_length*/ 0, /*sq_concat*/ 0, /*sq_repeat*/ 0, /*sq_item*/ 0, /*sq_slice*/ 0, /*sq_ass_item*/ 0, /*sq_ass_slice*/ 0, /*sq_contains*/ 0, /*sq_inplace_concat*/ 0, /*sq_inplace_repeat*/ }; static PyMappingMethods __pyx_tp_as_mapping_ObjectVector = { __pyx_pw_6pandas_9hashtable_12ObjectVector_3__len__, /*mp_length*/ 0, /*mp_subscript*/ 0, /*mp_ass_subscript*/ }; static PyTypeObject __pyx_type_6pandas_9hashtable_ObjectVector = { PyVarObject_HEAD_INIT(0, 0) __Pyx_NAMESTR("pandas.hashtable.ObjectVector"), /*tp_name*/ sizeof(struct __pyx_obj_6pandas_9hashtable_ObjectVector), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_6pandas_9hashtable_ObjectVector, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #else 0, /*reserved*/ #endif 0, /*tp_repr*/ 0, /*tp_as_number*/ &__pyx_tp_as_sequence_ObjectVector, /*tp_as_sequence*/ &__pyx_tp_as_mapping_ObjectVector, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ 0, /*tp_doc*/ __pyx_tp_traverse_6pandas_9hashtable_ObjectVector, /*tp_traverse*/ __pyx_tp_clear_6pandas_9hashtable_ObjectVector, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_6pandas_9hashtable_ObjectVector, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_6pandas_9hashtable_ObjectVector, /*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*/ #if PY_VERSION_HEX >= 0x02060000 0, /*tp_version_tag*/ #endif #if PY_VERSION_HEX >= 0x030400a1 0, /*tp_finalize*/ #endif }; static struct __pyx_vtabstruct_6pandas_9hashtable_PyObjectHashTable __pyx_vtable_6pandas_9hashtable_PyObjectHashTable; static PyObject *__pyx_tp_new_6pandas_9hashtable_PyObjectHashTable(PyTypeObject *t, PyObject *a, PyObject *k) { struct __pyx_obj_6pandas_9hashtable_PyObjectHashTable *p; PyObject *o = __pyx_tp_new_6pandas_9hashtable_HashTable(t, a, k); if (unlikely(!o)) return 0; p = ((struct __pyx_obj_6pandas_9hashtable_PyObjectHashTable *)o); p->__pyx_vtab = __pyx_vtabptr_6pandas_9hashtable_PyObjectHashTable; return o; } static void __pyx_tp_dealloc_6pandas_9hashtable_PyObjectHashTable(PyObject *o) { #if PY_VERSION_HEX >= 0x030400a1 if (unlikely(Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) { if (PyObject_CallFinalizerFromDealloc(o)) return; } #endif { PyObject *etype, *eval, *etb; PyErr_Fetch(&etype, &eval, &etb); ++Py_REFCNT(o); __pyx_pw_6pandas_9hashtable_17PyObjectHashTable_3__dealloc__(o); --Py_REFCNT(o); PyErr_Restore(etype, eval, etb); } __pyx_tp_dealloc_6pandas_9hashtable_HashTable(o); } static PyMethodDef __pyx_methods_6pandas_9hashtable_PyObjectHashTable[] = { {__Pyx_NAMESTR("destroy"), (PyCFunction)__pyx_pw_6pandas_9hashtable_17PyObjectHashTable_9destroy, METH_NOARGS, __Pyx_DOCSTR(0)}, {__Pyx_NAMESTR("get_item"), (PyCFunction)__pyx_pw_6pandas_9hashtable_17PyObjectHashTable_11get_item, METH_O, __Pyx_DOCSTR(0)}, {__Pyx_NAMESTR("get_iter_test"), (PyCFunction)__pyx_pw_6pandas_9hashtable_17PyObjectHashTable_13get_iter_test, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}, {__Pyx_NAMESTR("set_item"), (PyCFunction)__pyx_pw_6pandas_9hashtable_17PyObjectHashTable_15set_item, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}, {__Pyx_NAMESTR("map_locations"), (PyCFunction)__pyx_pw_6pandas_9hashtable_17PyObjectHashTable_17map_locations, METH_O, __Pyx_DOCSTR(0)}, {__Pyx_NAMESTR("lookup"), (PyCFunction)__pyx_pw_6pandas_9hashtable_17PyObjectHashTable_19lookup, METH_O, __Pyx_DOCSTR(0)}, {__Pyx_NAMESTR("lookup2"), (PyCFunction)__pyx_pw_6pandas_9hashtable_17PyObjectHashTable_21lookup2, METH_O, __Pyx_DOCSTR(0)}, {__Pyx_NAMESTR("unique"), (PyCFunction)__pyx_pw_6pandas_9hashtable_17PyObjectHashTable_23unique, METH_O, __Pyx_DOCSTR(0)}, {__Pyx_NAMESTR("get_labels"), (PyCFunction)__pyx_pw_6pandas_9hashtable_17PyObjectHashTable_25get_labels, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}, {0, 0, 0, 0} }; static PySequenceMethods __pyx_tp_as_sequence_PyObjectHashTable = { __pyx_pw_6pandas_9hashtable_17PyObjectHashTable_5__len__, /*sq_length*/ 0, /*sq_concat*/ 0, /*sq_repeat*/ 0, /*sq_item*/ 0, /*sq_slice*/ 0, /*sq_ass_item*/ 0, /*sq_ass_slice*/ __pyx_pw_6pandas_9hashtable_17PyObjectHashTable_7__contains__, /*sq_contains*/ 0, /*sq_inplace_concat*/ 0, /*sq_inplace_repeat*/ }; static PyMappingMethods __pyx_tp_as_mapping_PyObjectHashTable = { __pyx_pw_6pandas_9hashtable_17PyObjectHashTable_5__len__, /*mp_length*/ 0, /*mp_subscript*/ 0, /*mp_ass_subscript*/ }; static PyTypeObject __pyx_type_6pandas_9hashtable_PyObjectHashTable = { PyVarObject_HEAD_INIT(0, 0) __Pyx_NAMESTR("pandas.hashtable.PyObjectHashTable"), /*tp_name*/ sizeof(struct __pyx_obj_6pandas_9hashtable_PyObjectHashTable), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_6pandas_9hashtable_PyObjectHashTable, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #else 0, /*reserved*/ #endif 0, /*tp_repr*/ 0, /*tp_as_number*/ &__pyx_tp_as_sequence_PyObjectHashTable, /*tp_as_sequence*/ &__pyx_tp_as_mapping_PyObjectHashTable, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/ 0, /*tp_doc*/ 0, /*tp_traverse*/ 0, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_6pandas_9hashtable_PyObjectHashTable, /*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_9hashtable_17PyObjectHashTable_1__init__, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_6pandas_9hashtable_PyObjectHashTable, /*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*/ #if PY_VERSION_HEX >= 0x02060000 0, /*tp_version_tag*/ #endif #if PY_VERSION_HEX >= 0x030400a1 0, /*tp_finalize*/ #endif }; static struct __pyx_vtabstruct_6pandas_9hashtable_Int64HashTable __pyx_vtable_6pandas_9hashtable_Int64HashTable; static PyObject *__pyx_tp_new_6pandas_9hashtable_Int64HashTable(PyTypeObject *t, PyObject *a, PyObject *k) { struct __pyx_obj_6pandas_9hashtable_Int64HashTable *p; PyObject *o = __pyx_tp_new_6pandas_9hashtable_HashTable(t, a, k); if (unlikely(!o)) return 0; p = ((struct __pyx_obj_6pandas_9hashtable_Int64HashTable *)o); p->__pyx_vtab = __pyx_vtabptr_6pandas_9hashtable_Int64HashTable; if (unlikely(__pyx_pw_6pandas_9hashtable_14Int64HashTable_1__cinit__(o, a, k) < 0)) { Py_DECREF(o); o = 0; } return o; } static void __pyx_tp_dealloc_6pandas_9hashtable_Int64HashTable(PyObject *o) { #if PY_VERSION_HEX >= 0x030400a1 if (unlikely(Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) { if (PyObject_CallFinalizerFromDealloc(o)) return; } #endif { PyObject *etype, *eval, *etb; PyErr_Fetch(&etype, &eval, &etb); ++Py_REFCNT(o); __pyx_pw_6pandas_9hashtable_14Int64HashTable_3__dealloc__(o); --Py_REFCNT(o); PyErr_Restore(etype, eval, etb); } __pyx_tp_dealloc_6pandas_9hashtable_HashTable(o); } static PyMethodDef __pyx_methods_6pandas_9hashtable_Int64HashTable[] = { {__Pyx_NAMESTR("get_item"), (PyCFunction)__pyx_pw_6pandas_9hashtable_14Int64HashTable_9get_item, METH_O, __Pyx_DOCSTR(0)}, {__Pyx_NAMESTR("get_iter_test"), (PyCFunction)__pyx_pw_6pandas_9hashtable_14Int64HashTable_11get_iter_test, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}, {__Pyx_NAMESTR("set_item"), (PyCFunction)__pyx_pw_6pandas_9hashtable_14Int64HashTable_13set_item, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}, {__Pyx_NAMESTR("map"), (PyCFunction)__pyx_pw_6pandas_9hashtable_14Int64HashTable_15map, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}, {__Pyx_NAMESTR("map_locations"), (PyCFunction)__pyx_pw_6pandas_9hashtable_14Int64HashTable_17map_locations, METH_O, __Pyx_DOCSTR(0)}, {__Pyx_NAMESTR("lookup"), (PyCFunction)__pyx_pw_6pandas_9hashtable_14Int64HashTable_19lookup, METH_O, __Pyx_DOCSTR(0)}, {__Pyx_NAMESTR("factorize"), (PyCFunction)__pyx_pw_6pandas_9hashtable_14Int64HashTable_21factorize, METH_O, __Pyx_DOCSTR(0)}, {__Pyx_NAMESTR("get_labels"), (PyCFunction)__pyx_pw_6pandas_9hashtable_14Int64HashTable_23get_labels, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}, {__Pyx_NAMESTR("get_labels_groupby"), (PyCFunction)__pyx_pw_6pandas_9hashtable_14Int64HashTable_25get_labels_groupby, METH_O, __Pyx_DOCSTR(0)}, {__Pyx_NAMESTR("unique"), (PyCFunction)__pyx_pw_6pandas_9hashtable_14Int64HashTable_27unique, METH_O, __Pyx_DOCSTR(0)}, {0, 0, 0, 0} }; static PySequenceMethods __pyx_tp_as_sequence_Int64HashTable = { __pyx_pw_6pandas_9hashtable_14Int64HashTable_7__len__, /*sq_length*/ 0, /*sq_concat*/ 0, /*sq_repeat*/ 0, /*sq_item*/ 0, /*sq_slice*/ 0, /*sq_ass_item*/ 0, /*sq_ass_slice*/ __pyx_pw_6pandas_9hashtable_14Int64HashTable_5__contains__, /*sq_contains*/ 0, /*sq_inplace_concat*/ 0, /*sq_inplace_repeat*/ }; static PyMappingMethods __pyx_tp_as_mapping_Int64HashTable = { __pyx_pw_6pandas_9hashtable_14Int64HashTable_7__len__, /*mp_length*/ 0, /*mp_subscript*/ 0, /*mp_ass_subscript*/ }; static PyTypeObject __pyx_type_6pandas_9hashtable_Int64HashTable = { PyVarObject_HEAD_INIT(0, 0) __Pyx_NAMESTR("pandas.hashtable.Int64HashTable"), /*tp_name*/ sizeof(struct __pyx_obj_6pandas_9hashtable_Int64HashTable), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_6pandas_9hashtable_Int64HashTable, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #else 0, /*reserved*/ #endif 0, /*tp_repr*/ 0, /*tp_as_number*/ &__pyx_tp_as_sequence_Int64HashTable, /*tp_as_sequence*/ &__pyx_tp_as_mapping_Int64HashTable, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/ 0, /*tp_doc*/ 0, /*tp_traverse*/ 0, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_6pandas_9hashtable_Int64HashTable, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_6pandas_9hashtable_Int64HashTable, /*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*/ #if PY_VERSION_HEX >= 0x02060000 0, /*tp_version_tag*/ #endif #if PY_VERSION_HEX >= 0x030400a1 0, /*tp_finalize*/ #endif }; static PyObject *__pyx_tp_new_6pandas_9hashtable_Int64Factorizer(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { struct __pyx_obj_6pandas_9hashtable_Int64Factorizer *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_9hashtable_Int64Factorizer *)o); p->table = ((struct __pyx_obj_6pandas_9hashtable_Int64HashTable *)Py_None); Py_INCREF(Py_None); p->uniques = ((struct __pyx_obj_6pandas_9hashtable_Int64Vector *)Py_None); Py_INCREF(Py_None); return o; } static void __pyx_tp_dealloc_6pandas_9hashtable_Int64Factorizer(PyObject *o) { struct __pyx_obj_6pandas_9hashtable_Int64Factorizer *p = (struct __pyx_obj_6pandas_9hashtable_Int64Factorizer *)o; #if PY_VERSION_HEX >= 0x030400a1 if (unlikely(Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) { if (PyObject_CallFinalizerFromDealloc(o)) return; } #endif PyObject_GC_UnTrack(o); Py_CLEAR(p->table); Py_CLEAR(p->uniques); (*Py_TYPE(o)->tp_free)(o); } static int __pyx_tp_traverse_6pandas_9hashtable_Int64Factorizer(PyObject *o, visitproc v, void *a) { int e; struct __pyx_obj_6pandas_9hashtable_Int64Factorizer *p = (struct __pyx_obj_6pandas_9hashtable_Int64Factorizer *)o; if (p->table) { e = (*v)(((PyObject*)p->table), a); if (e) return e; } if (p->uniques) { e = (*v)(((PyObject*)p->uniques), a); if (e) return e; } return 0; } static int __pyx_tp_clear_6pandas_9hashtable_Int64Factorizer(PyObject *o) { PyObject* tmp; struct __pyx_obj_6pandas_9hashtable_Int64Factorizer *p = (struct __pyx_obj_6pandas_9hashtable_Int64Factorizer *)o; tmp = ((PyObject*)p->table); p->table = ((struct __pyx_obj_6pandas_9hashtable_Int64HashTable *)Py_None); Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->uniques); p->uniques = ((struct __pyx_obj_6pandas_9hashtable_Int64Vector *)Py_None); Py_INCREF(Py_None); Py_XDECREF(tmp); return 0; } static PyObject *__pyx_getprop_6pandas_9hashtable_15Int64Factorizer_table(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6pandas_9hashtable_15Int64Factorizer_5table_1__get__(o); } static int __pyx_setprop_6pandas_9hashtable_15Int64Factorizer_table(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { return __pyx_pw_6pandas_9hashtable_15Int64Factorizer_5table_3__set__(o, v); } else { return __pyx_pw_6pandas_9hashtable_15Int64Factorizer_5table_5__del__(o); } } static PyObject *__pyx_getprop_6pandas_9hashtable_15Int64Factorizer_uniques(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6pandas_9hashtable_15Int64Factorizer_7uniques_1__get__(o); } static int __pyx_setprop_6pandas_9hashtable_15Int64Factorizer_uniques(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { return __pyx_pw_6pandas_9hashtable_15Int64Factorizer_7uniques_3__set__(o, v); } else { return __pyx_pw_6pandas_9hashtable_15Int64Factorizer_7uniques_5__del__(o); } } static PyObject *__pyx_getprop_6pandas_9hashtable_15Int64Factorizer_count(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6pandas_9hashtable_15Int64Factorizer_5count_1__get__(o); } static int __pyx_setprop_6pandas_9hashtable_15Int64Factorizer_count(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { return __pyx_pw_6pandas_9hashtable_15Int64Factorizer_5count_3__set__(o, v); } else { PyErr_SetString(PyExc_NotImplementedError, "__del__"); return -1; } } static PyMethodDef __pyx_methods_6pandas_9hashtable_Int64Factorizer[] = { {__Pyx_NAMESTR("get_count"), (PyCFunction)__pyx_pw_6pandas_9hashtable_15Int64Factorizer_3get_count, METH_NOARGS, __Pyx_DOCSTR(0)}, {__Pyx_NAMESTR("factorize"), (PyCFunction)__pyx_pw_6pandas_9hashtable_15Int64Factorizer_5factorize, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}, {0, 0, 0, 0} }; static struct PyGetSetDef __pyx_getsets_6pandas_9hashtable_Int64Factorizer[] = { {(char *)"table", __pyx_getprop_6pandas_9hashtable_15Int64Factorizer_table, __pyx_setprop_6pandas_9hashtable_15Int64Factorizer_table, 0, 0}, {(char *)"uniques", __pyx_getprop_6pandas_9hashtable_15Int64Factorizer_uniques, __pyx_setprop_6pandas_9hashtable_15Int64Factorizer_uniques, 0, 0}, {(char *)"count", __pyx_getprop_6pandas_9hashtable_15Int64Factorizer_count, __pyx_setprop_6pandas_9hashtable_15Int64Factorizer_count, 0, 0}, {0, 0, 0, 0, 0} }; static PyTypeObject __pyx_type_6pandas_9hashtable_Int64Factorizer = { PyVarObject_HEAD_INIT(0, 0) __Pyx_NAMESTR("pandas.hashtable.Int64Factorizer"), /*tp_name*/ sizeof(struct __pyx_obj_6pandas_9hashtable_Int64Factorizer), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_6pandas_9hashtable_Int64Factorizer, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #else 0, /*reserved*/ #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*/ 0, /*tp_doc*/ __pyx_tp_traverse_6pandas_9hashtable_Int64Factorizer, /*tp_traverse*/ __pyx_tp_clear_6pandas_9hashtable_Int64Factorizer, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_6pandas_9hashtable_Int64Factorizer, /*tp_methods*/ 0, /*tp_members*/ __pyx_getsets_6pandas_9hashtable_Int64Factorizer, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ __pyx_pw_6pandas_9hashtable_15Int64Factorizer_1__init__, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_6pandas_9hashtable_Int64Factorizer, /*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*/ #if PY_VERSION_HEX >= 0x02060000 0, /*tp_version_tag*/ #endif #if PY_VERSION_HEX >= 0x030400a1 0, /*tp_finalize*/ #endif }; static PyObject *__pyx_tp_new_6pandas_9hashtable_Factorizer(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { struct __pyx_obj_6pandas_9hashtable_Factorizer *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_9hashtable_Factorizer *)o); p->table = ((struct __pyx_obj_6pandas_9hashtable_PyObjectHashTable *)Py_None); Py_INCREF(Py_None); p->uniques = ((struct __pyx_obj_6pandas_9hashtable_ObjectVector *)Py_None); Py_INCREF(Py_None); return o; } static void __pyx_tp_dealloc_6pandas_9hashtable_Factorizer(PyObject *o) { struct __pyx_obj_6pandas_9hashtable_Factorizer *p = (struct __pyx_obj_6pandas_9hashtable_Factorizer *)o; #if PY_VERSION_HEX >= 0x030400a1 if (unlikely(Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) { if (PyObject_CallFinalizerFromDealloc(o)) return; } #endif PyObject_GC_UnTrack(o); Py_CLEAR(p->table); Py_CLEAR(p->uniques); (*Py_TYPE(o)->tp_free)(o); } static int __pyx_tp_traverse_6pandas_9hashtable_Factorizer(PyObject *o, visitproc v, void *a) { int e; struct __pyx_obj_6pandas_9hashtable_Factorizer *p = (struct __pyx_obj_6pandas_9hashtable_Factorizer *)o; if (p->table) { e = (*v)(((PyObject*)p->table), a); if (e) return e; } if (p->uniques) { e = (*v)(((PyObject*)p->uniques), a); if (e) return e; } return 0; } static int __pyx_tp_clear_6pandas_9hashtable_Factorizer(PyObject *o) { PyObject* tmp; struct __pyx_obj_6pandas_9hashtable_Factorizer *p = (struct __pyx_obj_6pandas_9hashtable_Factorizer *)o; tmp = ((PyObject*)p->table); p->table = ((struct __pyx_obj_6pandas_9hashtable_PyObjectHashTable *)Py_None); Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->uniques); p->uniques = ((struct __pyx_obj_6pandas_9hashtable_ObjectVector *)Py_None); Py_INCREF(Py_None); Py_XDECREF(tmp); return 0; } static PyObject *__pyx_getprop_6pandas_9hashtable_10Factorizer_table(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6pandas_9hashtable_10Factorizer_5table_1__get__(o); } static int __pyx_setprop_6pandas_9hashtable_10Factorizer_table(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { return __pyx_pw_6pandas_9hashtable_10Factorizer_5table_3__set__(o, v); } else { return __pyx_pw_6pandas_9hashtable_10Factorizer_5table_5__del__(o); } } static PyObject *__pyx_getprop_6pandas_9hashtable_10Factorizer_uniques(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6pandas_9hashtable_10Factorizer_7uniques_1__get__(o); } static int __pyx_setprop_6pandas_9hashtable_10Factorizer_uniques(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { return __pyx_pw_6pandas_9hashtable_10Factorizer_7uniques_3__set__(o, v); } else { return __pyx_pw_6pandas_9hashtable_10Factorizer_7uniques_5__del__(o); } } static PyObject *__pyx_getprop_6pandas_9hashtable_10Factorizer_count(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6pandas_9hashtable_10Factorizer_5count_1__get__(o); } static int __pyx_setprop_6pandas_9hashtable_10Factorizer_count(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { return __pyx_pw_6pandas_9hashtable_10Factorizer_5count_3__set__(o, v); } else { PyErr_SetString(PyExc_NotImplementedError, "__del__"); return -1; } } static PyMethodDef __pyx_methods_6pandas_9hashtable_Factorizer[] = { {__Pyx_NAMESTR("get_count"), (PyCFunction)__pyx_pw_6pandas_9hashtable_10Factorizer_3get_count, METH_NOARGS, __Pyx_DOCSTR(0)}, {__Pyx_NAMESTR("factorize"), (PyCFunction)__pyx_pw_6pandas_9hashtable_10Factorizer_5factorize, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}, {__Pyx_NAMESTR("unique"), (PyCFunction)__pyx_pw_6pandas_9hashtable_10Factorizer_7unique, METH_O, __Pyx_DOCSTR(0)}, {0, 0, 0, 0} }; static struct PyGetSetDef __pyx_getsets_6pandas_9hashtable_Factorizer[] = { {(char *)"table", __pyx_getprop_6pandas_9hashtable_10Factorizer_table, __pyx_setprop_6pandas_9hashtable_10Factorizer_table, 0, 0}, {(char *)"uniques", __pyx_getprop_6pandas_9hashtable_10Factorizer_uniques, __pyx_setprop_6pandas_9hashtable_10Factorizer_uniques, 0, 0}, {(char *)"count", __pyx_getprop_6pandas_9hashtable_10Factorizer_count, __pyx_setprop_6pandas_9hashtable_10Factorizer_count, 0, 0}, {0, 0, 0, 0, 0} }; static PyTypeObject __pyx_type_6pandas_9hashtable_Factorizer = { PyVarObject_HEAD_INIT(0, 0) __Pyx_NAMESTR("pandas.hashtable.Factorizer"), /*tp_name*/ sizeof(struct __pyx_obj_6pandas_9hashtable_Factorizer), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_6pandas_9hashtable_Factorizer, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #else 0, /*reserved*/ #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*/ 0, /*tp_doc*/ __pyx_tp_traverse_6pandas_9hashtable_Factorizer, /*tp_traverse*/ __pyx_tp_clear_6pandas_9hashtable_Factorizer, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_6pandas_9hashtable_Factorizer, /*tp_methods*/ 0, /*tp_members*/ __pyx_getsets_6pandas_9hashtable_Factorizer, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ __pyx_pw_6pandas_9hashtable_10Factorizer_1__init__, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_6pandas_9hashtable_Factorizer, /*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*/ #if PY_VERSION_HEX >= 0x02060000 0, /*tp_version_tag*/ #endif #if PY_VERSION_HEX >= 0x030400a1 0, /*tp_finalize*/ #endif }; static struct __pyx_vtabstruct_6pandas_9hashtable_Float64Vector __pyx_vtable_6pandas_9hashtable_Float64Vector; static PyObject *__pyx_tp_new_6pandas_9hashtable_Float64Vector(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { struct __pyx_obj_6pandas_9hashtable_Float64Vector *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_9hashtable_Float64Vector *)o); p->__pyx_vtab = __pyx_vtabptr_6pandas_9hashtable_Float64Vector; p->ao = ((PyArrayObject *)Py_None); Py_INCREF(Py_None); if (unlikely(__pyx_pw_6pandas_9hashtable_13Float64Vector_1__cinit__(o, __pyx_empty_tuple, NULL) < 0)) { Py_DECREF(o); o = 0; } return o; } static void __pyx_tp_dealloc_6pandas_9hashtable_Float64Vector(PyObject *o) { struct __pyx_obj_6pandas_9hashtable_Float64Vector *p = (struct __pyx_obj_6pandas_9hashtable_Float64Vector *)o; #if PY_VERSION_HEX >= 0x030400a1 if (unlikely(Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) { if (PyObject_CallFinalizerFromDealloc(o)) return; } #endif PyObject_GC_UnTrack(o); Py_CLEAR(p->ao); (*Py_TYPE(o)->tp_free)(o); } static int __pyx_tp_traverse_6pandas_9hashtable_Float64Vector(PyObject *o, visitproc v, void *a) { int e; struct __pyx_obj_6pandas_9hashtable_Float64Vector *p = (struct __pyx_obj_6pandas_9hashtable_Float64Vector *)o; if (p->ao) { e = (*v)(((PyObject*)p->ao), a); if (e) return e; } return 0; } static int __pyx_tp_clear_6pandas_9hashtable_Float64Vector(PyObject *o) { PyObject* tmp; struct __pyx_obj_6pandas_9hashtable_Float64Vector *p = (struct __pyx_obj_6pandas_9hashtable_Float64Vector *)o; tmp = ((PyObject*)p->ao); p->ao = ((PyArrayObject *)Py_None); Py_INCREF(Py_None); Py_XDECREF(tmp); return 0; } static PyMethodDef __pyx_methods_6pandas_9hashtable_Float64Vector[] = { {__Pyx_NAMESTR("to_array"), (PyCFunction)__pyx_pw_6pandas_9hashtable_13Float64Vector_5to_array, METH_NOARGS, __Pyx_DOCSTR(0)}, {0, 0, 0, 0} }; static PySequenceMethods __pyx_tp_as_sequence_Float64Vector = { __pyx_pw_6pandas_9hashtable_13Float64Vector_3__len__, /*sq_length*/ 0, /*sq_concat*/ 0, /*sq_repeat*/ 0, /*sq_item*/ 0, /*sq_slice*/ 0, /*sq_ass_item*/ 0, /*sq_ass_slice*/ 0, /*sq_contains*/ 0, /*sq_inplace_concat*/ 0, /*sq_inplace_repeat*/ }; static PyMappingMethods __pyx_tp_as_mapping_Float64Vector = { __pyx_pw_6pandas_9hashtable_13Float64Vector_3__len__, /*mp_length*/ 0, /*mp_subscript*/ 0, /*mp_ass_subscript*/ }; static PyTypeObject __pyx_type_6pandas_9hashtable_Float64Vector = { PyVarObject_HEAD_INIT(0, 0) __Pyx_NAMESTR("pandas.hashtable.Float64Vector"), /*tp_name*/ sizeof(struct __pyx_obj_6pandas_9hashtable_Float64Vector), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_6pandas_9hashtable_Float64Vector, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #else 0, /*reserved*/ #endif 0, /*tp_repr*/ 0, /*tp_as_number*/ &__pyx_tp_as_sequence_Float64Vector, /*tp_as_sequence*/ &__pyx_tp_as_mapping_Float64Vector, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ 0, /*tp_doc*/ __pyx_tp_traverse_6pandas_9hashtable_Float64Vector, /*tp_traverse*/ __pyx_tp_clear_6pandas_9hashtable_Float64Vector, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_6pandas_9hashtable_Float64Vector, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_6pandas_9hashtable_Float64Vector, /*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*/ #if PY_VERSION_HEX >= 0x02060000 0, /*tp_version_tag*/ #endif #if PY_VERSION_HEX >= 0x030400a1 0, /*tp_finalize*/ #endif }; static PyMethodDef __pyx_methods[] = { {__Pyx_NAMESTR("value_count_int64"), (PyCFunction)__pyx_pw_6pandas_9hashtable_3value_count_int64, METH_O, __Pyx_DOCSTR(0)}, {__Pyx_NAMESTR("value_count_object"), (PyCFunction)__pyx_pw_6pandas_9hashtable_5value_count_object, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}, {0, 0, 0, 0} }; #if PY_MAJOR_VERSION >= 3 static struct PyModuleDef __pyx_moduledef = { #if PY_VERSION_HEX < 0x03020000 { PyObject_HEAD_INIT(NULL) NULL, 0, NULL }, #else PyModuleDef_HEAD_INIT, #endif __Pyx_NAMESTR("hashtable"), 0, /* m_doc */ -1, /* m_size */ __pyx_methods /* m_methods */, NULL, /* m_reload */ NULL, /* m_traverse */ NULL, /* m_clear */ NULL /* m_free */ }; #endif static __Pyx_StringTabEntry __pyx_string_tab[] = { {&__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_IndexError, __pyx_k_IndexError, sizeof(__pyx_k_IndexError), 0, 0, 1, 1}, {&__pyx_n_s_KeyError, __pyx_k_KeyError, sizeof(__pyx_k_KeyError), 0, 0, 1, 1}, {&__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_ONAN, __pyx_k_ONAN, sizeof(__pyx_k_ONAN), 0, 0, 1, 1}, {&__pyx_n_s_RuntimeError, __pyx_k_RuntimeError, sizeof(__pyx_k_RuntimeError), 0, 0, 1, 1}, {&__pyx_n_s_ValueError, __pyx_k_ValueError, sizeof(__pyx_k_ValueError), 0, 0, 1, 1}, {&__pyx_n_s_arange, __pyx_k_arange, sizeof(__pyx_k_arange), 0, 0, 1, 1}, {&__pyx_n_s_argsort, __pyx_k_argsort, sizeof(__pyx_k_argsort), 0, 0, 1, 1}, {&__pyx_n_s_arr, __pyx_k_arr, sizeof(__pyx_k_arr), 0, 0, 1, 1}, {&__pyx_n_s_astype, __pyx_k_astype, sizeof(__pyx_k_astype), 0, 0, 1, 1}, {&__pyx_n_s_count, __pyx_k_count, sizeof(__pyx_k_count), 0, 0, 1, 1}, {&__pyx_n_s_count_prior, __pyx_k_count_prior, sizeof(__pyx_k_count_prior), 0, 0, 1, 1}, {&__pyx_n_s_destroy, __pyx_k_destroy, sizeof(__pyx_k_destroy), 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_float64, __pyx_k_float64, sizeof(__pyx_k_float64), 0, 0, 1, 1}, {&__pyx_n_s_get_item, __pyx_k_get_item, sizeof(__pyx_k_get_item), 0, 0, 1, 1}, {&__pyx_n_s_get_labels, __pyx_k_get_labels, sizeof(__pyx_k_get_labels), 0, 0, 1, 1}, {&__pyx_kp_s_home_yoh_deb_gits_pkg_exppsy_pa, __pyx_k_home_yoh_deb_gits_pkg_exppsy_pa, sizeof(__pyx_k_home_yoh_deb_gits_pkg_exppsy_pa), 0, 0, 1, 0}, {&__pyx_n_s_i, __pyx_k_i, sizeof(__pyx_k_i), 0, 0, 1, 1}, {&__pyx_n_s_import, __pyx_k_import, sizeof(__pyx_k_import), 0, 0, 1, 1}, {&__pyx_kp_s_index_out_of_bounds, __pyx_k_index_out_of_bounds, sizeof(__pyx_k_index_out_of_bounds), 0, 0, 1, 0}, {&__pyx_n_s_inf, __pyx_k_inf, sizeof(__pyx_k_inf), 0, 0, 1, 1}, {&__pyx_n_s_int, __pyx_k_int, sizeof(__pyx_k_int), 0, 0, 1, 1}, {&__pyx_n_s_int64, __pyx_k_int64, sizeof(__pyx_k_int64), 0, 0, 1, 1}, {&__pyx_n_s_iterations, __pyx_k_iterations, sizeof(__pyx_k_iterations), 0, 0, 1, 1}, {&__pyx_n_s_j, __pyx_k_j, sizeof(__pyx_k_j), 0, 0, 1, 1}, {&__pyx_n_s_k, __pyx_k_k, sizeof(__pyx_k_k), 0, 0, 1, 1}, {&__pyx_n_s_key, __pyx_k_key, sizeof(__pyx_k_key), 0, 0, 1, 1}, {&__pyx_n_s_keys, __pyx_k_keys, sizeof(__pyx_k_keys), 0, 0, 1, 1}, {&__pyx_n_s_list_to_object_array, __pyx_k_list_to_object_array, sizeof(__pyx_k_list_to_object_array), 0, 0, 1, 1}, {&__pyx_n_s_main, __pyx_k_main, sizeof(__pyx_k_main), 0, 0, 1, 1}, {&__pyx_n_s_mask, __pyx_k_mask, sizeof(__pyx_k_mask), 0, 0, 1, 1}, {&__pyx_n_s_max_count, __pyx_k_max_count, sizeof(__pyx_k_max_count), 0, 0, 1, 1}, {&__pyx_n_s_max_val, __pyx_k_max_val, sizeof(__pyx_k_max_val), 0, 0, 1, 1}, {&__pyx_n_s_mode_int64, __pyx_k_mode_int64, sizeof(__pyx_k_mode_int64), 0, 0, 1, 1}, {&__pyx_n_s_mode_object, __pyx_k_mode_object, sizeof(__pyx_k_mode_object), 0, 0, 1, 1}, {&__pyx_n_s_modes, __pyx_k_modes, sizeof(__pyx_k_modes), 0, 0, 1, 1}, {&__pyx_n_s_n, __pyx_k_n, sizeof(__pyx_k_n), 0, 0, 1, 1}, {&__pyx_n_s_na_sentinel, __pyx_k_na_sentinel, sizeof(__pyx_k_na_sentinel), 0, 0, 1, 1}, {&__pyx_n_s_nan, __pyx_k_nan, sizeof(__pyx_k_nan), 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_np, __pyx_k_np, sizeof(__pyx_k_np), 0, 0, 1, 1}, {&__pyx_n_s_numpy, __pyx_k_numpy, sizeof(__pyx_k_numpy), 0, 0, 1, 1}, {&__pyx_n_s_obj, __pyx_k_obj, sizeof(__pyx_k_obj), 0, 0, 1, 1}, {&__pyx_n_s_object, __pyx_k_object, sizeof(__pyx_k_object), 0, 0, 1, 1}, {&__pyx_n_s_object_2, __pyx_k_object_2, sizeof(__pyx_k_object_2), 0, 0, 1, 1}, {&__pyx_n_s_pandas_hashtable, __pyx_k_pandas_hashtable, sizeof(__pyx_k_pandas_hashtable), 0, 0, 1, 1}, {&__pyx_n_s_put, __pyx_k_put, sizeof(__pyx_k_put), 0, 0, 1, 1}, {&__pyx_n_s_pyx_getbuffer, __pyx_k_pyx_getbuffer, sizeof(__pyx_k_pyx_getbuffer), 0, 0, 1, 1}, {&__pyx_n_s_pyx_releasebuffer, __pyx_k_pyx_releasebuffer, sizeof(__pyx_k_pyx_releasebuffer), 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_resize, __pyx_k_resize, sizeof(__pyx_k_resize), 0, 0, 1, 1}, {&__pyx_n_s_ret, __pyx_k_ret, sizeof(__pyx_k_ret), 0, 0, 1, 1}, {&__pyx_n_s_set_item, __pyx_k_set_item, sizeof(__pyx_k_set_item), 0, 0, 1, 1}, {&__pyx_n_s_size_hint, __pyx_k_size_hint, sizeof(__pyx_k_size_hint), 0, 0, 1, 1}, {&__pyx_n_s_sort, __pyx_k_sort, sizeof(__pyx_k_sort), 0, 0, 1, 1}, {&__pyx_n_s_table, __pyx_k_table, sizeof(__pyx_k_table), 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_array, __pyx_k_to_array, sizeof(__pyx_k_to_array), 0, 0, 1, 1}, {&__pyx_n_s_unique, __pyx_k_unique, sizeof(__pyx_k_unique), 0, 0, 1, 1}, {&__pyx_n_s_uniques, __pyx_k_uniques, sizeof(__pyx_k_uniques), 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_val, __pyx_k_val, sizeof(__pyx_k_val), 0, 0, 1, 1}, {&__pyx_n_s_values, __pyx_k_values, sizeof(__pyx_k_values), 0, 0, 1, 1}, {&__pyx_n_s_zeros, __pyx_k_zeros, sizeof(__pyx_k_zeros), 0, 0, 1, 1}, {0, 0, 0, 0, 0, 0, 0} }; static int __Pyx_InitCachedBuiltins(void) { __pyx_builtin_object = __Pyx_GetBuiltinName(__pyx_n_s_object); if (!__pyx_builtin_object) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 646; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_builtin_KeyError = __Pyx_GetBuiltinName(__pyx_n_s_KeyError); if (!__pyx_builtin_KeyError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 169; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_range) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 173; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_builtin_IndexError = __Pyx_GetBuiltinName(__pyx_n_s_IndexError); if (!__pyx_builtin_IndexError) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 40; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_builtin_ValueError = __Pyx_GetBuiltinName(__pyx_n_s_ValueError); if (!__pyx_builtin_ValueError) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 71; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_builtin_RuntimeError = __Pyx_GetBuiltinName(__pyx_n_s_RuntimeError); if (!__pyx_builtin_RuntimeError) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 803; __pyx_clineno = __LINE__; goto __pyx_L1_error;} return 0; __pyx_L1_error:; return -1; } static int __Pyx_InitCachedConstants(void) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0); /* "util.pxd":40 * i += sz * elif i >= sz or sz == 0: * raise IndexError('index out of bounds') # <<<<<<<<<<<<<< * * return get_value_1d(arr, i) */ __pyx_tuple_ = PyTuple_Pack(1, __pyx_kp_s_index_out_of_bounds); if (unlikely(!__pyx_tuple_)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 40; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple_); __Pyx_GIVEREF(__pyx_tuple_); /* "util.pxd":57 * i += sz * elif i >= sz: * raise IndexError('index out of bounds') # <<<<<<<<<<<<<< * * assign_value_1d(arr, i, value) */ __pyx_tuple__2 = PyTuple_Pack(1, __pyx_kp_s_index_out_of_bounds); if (unlikely(!__pyx_tuple__2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 57; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__2); __Pyx_GIVEREF(__pyx_tuple__2); /* "numpy.pxd":217 * 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__3 = PyTuple_Pack(1, __pyx_kp_u_ndarray_is_not_C_contiguous); if (unlikely(!__pyx_tuple__3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 217; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__3); __Pyx_GIVEREF(__pyx_tuple__3); /* "numpy.pxd":221 * 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__4 = PyTuple_Pack(1, __pyx_kp_u_ndarray_is_not_Fortran_contiguou); if (unlikely(!__pyx_tuple__4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 221; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__4); __Pyx_GIVEREF(__pyx_tuple__4); /* "numpy.pxd":259 * if ((descr.byteorder == '>' and little_endian) or * (descr.byteorder == '<' 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__5 = PyTuple_Pack(1, __pyx_kp_u_Non_native_byte_order_not_suppor); if (unlikely(!__pyx_tuple__5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 259; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__5); __Pyx_GIVEREF(__pyx_tuple__5); /* "numpy.pxd":803 * * if (end - f) - (new_offset - offset[0]) < 15: * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") # <<<<<<<<<<<<<< * * if ((child.byteorder == '>' and little_endian) or */ __pyx_tuple__6 = PyTuple_Pack(1, __pyx_kp_u_Format_string_allocated_too_shor); if (unlikely(!__pyx_tuple__6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 803; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__6); __Pyx_GIVEREF(__pyx_tuple__6); /* "numpy.pxd":807 * if ((child.byteorder == '>' and little_endian) or * (child.byteorder == '<' 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__7 = PyTuple_Pack(1, __pyx_kp_u_Non_native_byte_order_not_suppor); if (unlikely(!__pyx_tuple__7)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 807; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__7); __Pyx_GIVEREF(__pyx_tuple__7); /* "numpy.pxd":827 * 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__8 = PyTuple_Pack(1, __pyx_kp_u_Format_string_allocated_too_shor_2); if (unlikely(!__pyx_tuple__8)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 827; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__8); __Pyx_GIVEREF(__pyx_tuple__8); /* "pandas/hashtable.pyx":31 * * * def list_to_object_array(list obj): # <<<<<<<<<<<<<< * ''' * Convert list to object ndarray. Seriously can't believe I had to write this */ __pyx_tuple__9 = PyTuple_Pack(4, __pyx_n_s_obj, __pyx_n_s_i, __pyx_n_s_n, __pyx_n_s_arr); if (unlikely(!__pyx_tuple__9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 31; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__9); __Pyx_GIVEREF(__pyx_tuple__9); __pyx_codeobj__10 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__9, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_yoh_deb_gits_pkg_exppsy_pa, __pyx_n_s_list_to_object_array, 31, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 31; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/hashtable.pyx":980 * * * def mode_object(ndarray[object] values, ndarray[uint8_t, cast=True] mask): # <<<<<<<<<<<<<< * cdef: * int count, max_count = 2 */ __pyx_tuple__11 = PyTuple_Pack(11, __pyx_n_s_values, __pyx_n_s_mask, __pyx_n_s_count, __pyx_n_s_max_count, __pyx_n_s_j, __pyx_n_s_k, __pyx_n_s_i, __pyx_n_s_n, __pyx_n_s_table, __pyx_n_s_ret, __pyx_n_s_modes); if (unlikely(!__pyx_tuple__11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 980; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__11); __Pyx_GIVEREF(__pyx_tuple__11); __pyx_codeobj__12 = (PyObject*)__Pyx_PyCode_New(2, 0, 11, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__11, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_yoh_deb_gits_pkg_exppsy_pa, __pyx_n_s_mode_object, 980, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 980; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/hashtable.pyx":1011 * * * def mode_int64(ndarray[int64_t] values): # <<<<<<<<<<<<<< * cdef: * int val, max_val = 2 */ __pyx_tuple__13 = PyTuple_Pack(8, __pyx_n_s_values, __pyx_n_s_val, __pyx_n_s_max_val, __pyx_n_s_j, __pyx_n_s_k, __pyx_n_s_table, __pyx_n_s_uniques, __pyx_n_s_modes); if (unlikely(!__pyx_tuple__13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1011; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__13); __Pyx_GIVEREF(__pyx_tuple__13); __pyx_codeobj__14 = (PyObject*)__Pyx_PyCode_New(1, 0, 8, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__13, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_yoh_deb_gits_pkg_exppsy_pa, __pyx_n_s_mode_int64, 1011, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1011; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __pyx_int_0 = PyInt_FromLong(0); if (unlikely(!__pyx_int_0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_int_1 = PyInt_FromLong(1); if (unlikely(!__pyx_int_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_int_15 = PyInt_FromLong(15); if (unlikely(!__pyx_int_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_int_neg_1 = PyInt_FromLong(-1); if (unlikely(!__pyx_int_neg_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} return 0; __pyx_L1_error:; return -1; } #if PY_MAJOR_VERSION < 3 PyMODINIT_FUNC inithashtable(void); /*proto*/ PyMODINIT_FUNC inithashtable(void) #else PyMODINIT_FUNC PyInit_hashtable(void); /*proto*/ PyMODINIT_FUNC PyInit_hashtable(void) #endif { PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannyDeclarations #if CYTHON_REFNANNY __Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny"); if (!__Pyx_RefNanny) { PyErr_Clear(); __Pyx_RefNanny = __Pyx_RefNannyImportAPI("Cython.Runtime.refnanny"); if (!__Pyx_RefNanny) Py_FatalError("failed to import 'refnanny' module"); } #endif __Pyx_RefNannySetupContext("PyMODINIT_FUNC PyInit_hashtable(void)", 0); if ( __Pyx_check_binary_version() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_empty_tuple)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_bytes)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #ifdef __Pyx_CyFunction_USED if (__Pyx_CyFunction_init() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif #ifdef __Pyx_FusedFunction_USED if (__pyx_FusedFunction_init() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif #ifdef __Pyx_Generator_USED if (__pyx_Generator_init() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif /*--- Library function declarations ---*/ /*--- Threads initialization code ---*/ #if defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS #ifdef WITH_THREAD /* Python build with threading support? */ PyEval_InitThreads(); #endif #endif /*--- Module creation code ---*/ #if PY_MAJOR_VERSION < 3 __pyx_m = Py_InitModule4(__Pyx_NAMESTR("hashtable"), __pyx_methods, 0, 0, PYTHON_API_VERSION); Py_XINCREF(__pyx_m); #else __pyx_m = PyModule_Create(&__pyx_moduledef); #endif if (unlikely(!__pyx_m)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_d)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} Py_INCREF(__pyx_d); __pyx_b = PyImport_AddModule(__Pyx_NAMESTR(__Pyx_BUILTIN_MODULE_NAME)); if (unlikely(!__pyx_b)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #if CYTHON_COMPILING_IN_PYPY Py_INCREF(__pyx_b); #endif if (__Pyx_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; /*--- Initialize various global constants etc. ---*/ if (unlikely(__Pyx_InitGlobals() < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif if (__pyx_module_is_main_pandas__hashtable) { if (__Pyx_SetAttrString(__pyx_m, "__name__", __pyx_n_s_main) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; } #if PY_MAJOR_VERSION >= 3 { PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (!PyDict_GetItemString(modules, "pandas.hashtable")) { if (unlikely(PyDict_SetItemString(modules, "pandas.hashtable", __pyx_m) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } } #endif /*--- Builtin init code ---*/ if (unlikely(__Pyx_InitCachedBuiltins() < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /*--- Constants init code ---*/ if (unlikely(__Pyx_InitCachedConstants() < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /*--- Global init code ---*/ /*--- Variable export code ---*/ /*--- Function export code ---*/ /*--- Type init code ---*/ __pyx_vtabptr_6pandas_9hashtable_Int64Vector = &__pyx_vtable_6pandas_9hashtable_Int64Vector; __pyx_vtable_6pandas_9hashtable_Int64Vector.append = (PyObject *(*)(struct __pyx_obj_6pandas_9hashtable_Int64Vector *, __pyx_t_5numpy_int64_t))__pyx_f_6pandas_9hashtable_11Int64Vector_append; if (PyType_Ready(&__pyx_type_6pandas_9hashtable_Int64Vector) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_type_6pandas_9hashtable_Int64Vector.tp_print = 0; if (__Pyx_SetVtable(__pyx_type_6pandas_9hashtable_Int64Vector.tp_dict, __pyx_vtabptr_6pandas_9hashtable_Int64Vector) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__Pyx_SetAttrString(__pyx_m, "Int64Vector", (PyObject *)&__pyx_type_6pandas_9hashtable_Int64Vector) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_6pandas_9hashtable_Int64Vector = &__pyx_type_6pandas_9hashtable_Int64Vector; if (PyType_Ready(&__pyx_type_6pandas_9hashtable_HashTable) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 141; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_type_6pandas_9hashtable_HashTable.tp_print = 0; if (__Pyx_SetAttrString(__pyx_m, "HashTable", (PyObject *)&__pyx_type_6pandas_9hashtable_HashTable) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 141; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_6pandas_9hashtable_HashTable = &__pyx_type_6pandas_9hashtable_HashTable; __pyx_type_6pandas_9hashtable_Float64HashTable.tp_base = __pyx_ptype_6pandas_9hashtable_HashTable; if (PyType_Ready(&__pyx_type_6pandas_9hashtable_Float64HashTable) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 541; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_type_6pandas_9hashtable_Float64HashTable.tp_print = 0; if (__Pyx_SetAttrString(__pyx_m, "Float64HashTable", (PyObject *)&__pyx_type_6pandas_9hashtable_Float64HashTable) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 541; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_6pandas_9hashtable_Float64HashTable = &__pyx_type_6pandas_9hashtable_Float64HashTable; __pyx_vtabptr_6pandas_9hashtable_Int32HashTable = &__pyx_vtable_6pandas_9hashtable_Int32HashTable; __pyx_vtable_6pandas_9hashtable_Int32HashTable.check_type = (int (*)(struct __pyx_obj_6pandas_9hashtable_Int32HashTable *, PyObject *))__pyx_f_6pandas_9hashtable_14Int32HashTable_check_type; __pyx_vtable_6pandas_9hashtable_Int32HashTable.get_item = (PyObject *(*)(struct __pyx_obj_6pandas_9hashtable_Int32HashTable *, __pyx_t_5numpy_int32_t, int __pyx_skip_dispatch))__pyx_f_6pandas_9hashtable_14Int32HashTable_get_item; __pyx_vtable_6pandas_9hashtable_Int32HashTable.set_item = (PyObject *(*)(struct __pyx_obj_6pandas_9hashtable_Int32HashTable *, __pyx_t_5numpy_int32_t, Py_ssize_t, int __pyx_skip_dispatch))__pyx_f_6pandas_9hashtable_14Int32HashTable_set_item; __pyx_type_6pandas_9hashtable_Int32HashTable.tp_base = __pyx_ptype_6pandas_9hashtable_HashTable; if (PyType_Ready(&__pyx_type_6pandas_9hashtable_Int32HashTable) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 264; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_type_6pandas_9hashtable_Int32HashTable.tp_print = 0; if (__Pyx_SetVtable(__pyx_type_6pandas_9hashtable_Int32HashTable.tp_dict, __pyx_vtabptr_6pandas_9hashtable_Int32HashTable) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 264; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__Pyx_SetAttrString(__pyx_m, "Int32HashTable", (PyObject *)&__pyx_type_6pandas_9hashtable_Int32HashTable) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 264; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_6pandas_9hashtable_Int32HashTable = &__pyx_type_6pandas_9hashtable_Int32HashTable; __pyx_vtabptr_6pandas_9hashtable_StringHashTable = &__pyx_vtable_6pandas_9hashtable_StringHashTable; __pyx_vtable_6pandas_9hashtable_StringHashTable.check_type = (int (*)(struct __pyx_obj_6pandas_9hashtable_StringHashTable *, PyObject *))__pyx_f_6pandas_9hashtable_15StringHashTable_check_type; __pyx_vtable_6pandas_9hashtable_StringHashTable.get_item = (PyObject *(*)(struct __pyx_obj_6pandas_9hashtable_StringHashTable *, PyObject *, int __pyx_skip_dispatch))__pyx_f_6pandas_9hashtable_15StringHashTable_get_item; __pyx_vtable_6pandas_9hashtable_StringHashTable.set_item = (PyObject *(*)(struct __pyx_obj_6pandas_9hashtable_StringHashTable *, PyObject *, Py_ssize_t, int __pyx_skip_dispatch))__pyx_f_6pandas_9hashtable_15StringHashTable_set_item; __pyx_type_6pandas_9hashtable_StringHashTable.tp_base = __pyx_ptype_6pandas_9hashtable_HashTable; if (PyType_Ready(&__pyx_type_6pandas_9hashtable_StringHashTable) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 145; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_type_6pandas_9hashtable_StringHashTable.tp_print = 0; if (__Pyx_SetVtable(__pyx_type_6pandas_9hashtable_StringHashTable.tp_dict, __pyx_vtabptr_6pandas_9hashtable_StringHashTable) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 145; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__Pyx_SetAttrString(__pyx_m, "StringHashTable", (PyObject *)&__pyx_type_6pandas_9hashtable_StringHashTable) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 145; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_6pandas_9hashtable_StringHashTable = &__pyx_type_6pandas_9hashtable_StringHashTable; __pyx_vtabptr_6pandas_9hashtable_ObjectVector = &__pyx_vtable_6pandas_9hashtable_ObjectVector; __pyx_vtable_6pandas_9hashtable_ObjectVector.append = (PyObject *(*)(struct __pyx_obj_6pandas_9hashtable_ObjectVector *, PyObject *))__pyx_f_6pandas_9hashtable_12ObjectVector_append; if (PyType_Ready(&__pyx_type_6pandas_9hashtable_ObjectVector) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_type_6pandas_9hashtable_ObjectVector.tp_print = 0; if (__Pyx_SetVtable(__pyx_type_6pandas_9hashtable_ObjectVector.tp_dict, __pyx_vtabptr_6pandas_9hashtable_ObjectVector) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__Pyx_SetAttrString(__pyx_m, "ObjectVector", (PyObject *)&__pyx_type_6pandas_9hashtable_ObjectVector) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_6pandas_9hashtable_ObjectVector = &__pyx_type_6pandas_9hashtable_ObjectVector; __pyx_vtabptr_6pandas_9hashtable_PyObjectHashTable = &__pyx_vtable_6pandas_9hashtable_PyObjectHashTable; __pyx_vtable_6pandas_9hashtable_PyObjectHashTable.get_item = (PyObject *(*)(struct __pyx_obj_6pandas_9hashtable_PyObjectHashTable *, PyObject *, int __pyx_skip_dispatch))__pyx_f_6pandas_9hashtable_17PyObjectHashTable_get_item; __pyx_vtable_6pandas_9hashtable_PyObjectHashTable.set_item = (PyObject *(*)(struct __pyx_obj_6pandas_9hashtable_PyObjectHashTable *, PyObject *, Py_ssize_t, int __pyx_skip_dispatch))__pyx_f_6pandas_9hashtable_17PyObjectHashTable_set_item; __pyx_type_6pandas_9hashtable_PyObjectHashTable.tp_base = __pyx_ptype_6pandas_9hashtable_HashTable; if (PyType_Ready(&__pyx_type_6pandas_9hashtable_PyObjectHashTable) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 648; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_type_6pandas_9hashtable_PyObjectHashTable.tp_print = 0; if (__Pyx_SetVtable(__pyx_type_6pandas_9hashtable_PyObjectHashTable.tp_dict, __pyx_vtabptr_6pandas_9hashtable_PyObjectHashTable) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 648; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__Pyx_SetAttrString(__pyx_m, "PyObjectHashTable", (PyObject *)&__pyx_type_6pandas_9hashtable_PyObjectHashTable) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 648; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_6pandas_9hashtable_PyObjectHashTable = &__pyx_type_6pandas_9hashtable_PyObjectHashTable; __pyx_vtabptr_6pandas_9hashtable_Int64HashTable = &__pyx_vtable_6pandas_9hashtable_Int64HashTable; __pyx_vtable_6pandas_9hashtable_Int64HashTable.get_item = (PyObject *(*)(struct __pyx_obj_6pandas_9hashtable_Int64HashTable *, __pyx_t_5numpy_int64_t, int __pyx_skip_dispatch))__pyx_f_6pandas_9hashtable_14Int64HashTable_get_item; __pyx_vtable_6pandas_9hashtable_Int64HashTable.set_item = (PyObject *(*)(struct __pyx_obj_6pandas_9hashtable_Int64HashTable *, __pyx_t_5numpy_int64_t, Py_ssize_t, int __pyx_skip_dispatch))__pyx_f_6pandas_9hashtable_14Int64HashTable_set_item; __pyx_type_6pandas_9hashtable_Int64HashTable.tp_base = __pyx_ptype_6pandas_9hashtable_HashTable; if (PyType_Ready(&__pyx_type_6pandas_9hashtable_Int64HashTable) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 363; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_type_6pandas_9hashtable_Int64HashTable.tp_print = 0; if (__Pyx_SetVtable(__pyx_type_6pandas_9hashtable_Int64HashTable.tp_dict, __pyx_vtabptr_6pandas_9hashtable_Int64HashTable) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 363; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__Pyx_SetAttrString(__pyx_m, "Int64HashTable", (PyObject *)&__pyx_type_6pandas_9hashtable_Int64HashTable) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 363; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_6pandas_9hashtable_Int64HashTable = &__pyx_type_6pandas_9hashtable_Int64HashTable; if (PyType_Ready(&__pyx_type_6pandas_9hashtable_Int64Factorizer) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 860; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_type_6pandas_9hashtable_Int64Factorizer.tp_print = 0; if (__Pyx_SetAttrString(__pyx_m, "Int64Factorizer", (PyObject *)&__pyx_type_6pandas_9hashtable_Int64Factorizer) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 860; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_6pandas_9hashtable_Int64Factorizer = &__pyx_type_6pandas_9hashtable_Int64Factorizer; if (PyType_Ready(&__pyx_type_6pandas_9hashtable_Factorizer) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 824; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_type_6pandas_9hashtable_Factorizer.tp_print = 0; if (__Pyx_SetAttrString(__pyx_m, "Factorizer", (PyObject *)&__pyx_type_6pandas_9hashtable_Factorizer) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 824; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_6pandas_9hashtable_Factorizer = &__pyx_type_6pandas_9hashtable_Factorizer; __pyx_vtabptr_6pandas_9hashtable_Float64Vector = &__pyx_vtable_6pandas_9hashtable_Float64Vector; __pyx_vtable_6pandas_9hashtable_Float64Vector.append = (PyObject *(*)(struct __pyx_obj_6pandas_9hashtable_Float64Vector *, __pyx_t_5numpy_float64_t))__pyx_f_6pandas_9hashtable_13Float64Vector_append; if (PyType_Ready(&__pyx_type_6pandas_9hashtable_Float64Vector) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 111; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_type_6pandas_9hashtable_Float64Vector.tp_print = 0; if (__Pyx_SetVtable(__pyx_type_6pandas_9hashtable_Float64Vector.tp_dict, __pyx_vtabptr_6pandas_9hashtable_Float64Vector) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 111; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__Pyx_SetAttrString(__pyx_m, "Float64Vector", (PyObject *)&__pyx_type_6pandas_9hashtable_Float64Vector) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 111; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_6pandas_9hashtable_Float64Vector = &__pyx_type_6pandas_9hashtable_Float64Vector; /*--- Type import code ---*/ __pyx_ptype_7cpython_4type_type = __Pyx_ImportType(__Pyx_BUILTIN_MODULE_NAME, "type", #if CYTHON_COMPILING_IN_PYPY sizeof(PyTypeObject), #else sizeof(PyHeapTypeObject), #endif 0); if (unlikely(!__pyx_ptype_7cpython_4type_type)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 9; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_7cpython_4bool_bool = __Pyx_ImportType(__Pyx_BUILTIN_MODULE_NAME, "bool", sizeof(PyBoolObject), 0); if (unlikely(!__pyx_ptype_7cpython_4bool_bool)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 8; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_7cpython_7complex_complex = __Pyx_ImportType(__Pyx_BUILTIN_MODULE_NAME, "complex", sizeof(PyComplexObject), 0); if (unlikely(!__pyx_ptype_7cpython_7complex_complex)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 15; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_5numpy_dtype = __Pyx_ImportType("numpy", "dtype", sizeof(PyArray_Descr), 0); if (unlikely(!__pyx_ptype_5numpy_dtype)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_5numpy_flatiter = __Pyx_ImportType("numpy", "flatiter", sizeof(PyArrayIterObject), 0); if (unlikely(!__pyx_ptype_5numpy_flatiter)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 167; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_5numpy_broadcast = __Pyx_ImportType("numpy", "broadcast", sizeof(PyArrayMultiIterObject), 0); if (unlikely(!__pyx_ptype_5numpy_broadcast)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 171; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_5numpy_ndarray = __Pyx_ImportType("numpy", "ndarray", sizeof(PyArrayObject), 0); if (unlikely(!__pyx_ptype_5numpy_ndarray)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_5numpy_ufunc = __Pyx_ImportType("numpy", "ufunc", sizeof(PyUFuncObject), 0); if (unlikely(!__pyx_ptype_5numpy_ufunc)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 865; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /*--- Variable import code ---*/ /*--- Function import code ---*/ /*--- Execution code ---*/ /* "pandas/hashtable.pyx":9 * cimport util * * import numpy as np # <<<<<<<<<<<<<< * * ONAN = np.nan */ __pyx_t_1 = __Pyx_Import(__pyx_n_s_numpy, 0, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 9; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_np, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 9; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pandas/hashtable.pyx":11 * import numpy as np * * ONAN = np.nan # <<<<<<<<<<<<<< * * cimport cython */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 11; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_nan); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 11; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (PyDict_SetItem(__pyx_d, __pyx_n_s_ONAN, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 11; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/hashtable.pyx":16 * cimport numpy as cnp * * cnp.import_array() # <<<<<<<<<<<<<< * cnp.import_ufunc() * */ import_array(); /* "pandas/hashtable.pyx":17 * * cnp.import_array() * cnp.import_ufunc() # <<<<<<<<<<<<<< * * cdef int64_t iNaT = util.get_nat() */ import_ufunc(); /* "pandas/hashtable.pyx":19 * cnp.import_ufunc() * * cdef int64_t iNaT = util.get_nat() # <<<<<<<<<<<<<< * * cdef extern from "datetime.h": */ __pyx_v_6pandas_9hashtable_iNaT = get_nat(); /* "pandas/hashtable.pyx":25 * void PyDateTime_IMPORT() * * PyDateTime_IMPORT # <<<<<<<<<<<<<< * * cdef extern from "Python.h": */ PyDateTime_IMPORT; /* "pandas/hashtable.pyx":31 * * * def list_to_object_array(list obj): # <<<<<<<<<<<<<< * ''' * Convert list to object ndarray. Seriously can't believe I had to write this */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_9hashtable_1list_to_object_array, NULL, __pyx_n_s_pandas_hashtable); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 31; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_list_to_object_array, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 31; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/hashtable.pyx":49 * * * cdef size_t _INIT_VEC_CAP = 32 # <<<<<<<<<<<<<< * * cdef class ObjectVector: */ __pyx_v_6pandas_9hashtable__INIT_VEC_CAP = 32; /* "pandas/hashtable.pyx":646 * return uniques.to_array() * * na_sentinel = object # <<<<<<<<<<<<<< * * cdef class PyObjectHashTable(HashTable): */ if (PyDict_SetItem(__pyx_d, __pyx_n_s_na_sentinel, __pyx_builtin_object) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 646; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/hashtable.pyx":980 * * * def mode_object(ndarray[object] values, ndarray[uint8_t, cast=True] mask): # <<<<<<<<<<<<<< * cdef: * int count, max_count = 2 */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_9hashtable_7mode_object, NULL, __pyx_n_s_pandas_hashtable); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 980; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_mode_object, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 980; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/hashtable.pyx":1011 * * * def mode_int64(ndarray[int64_t] values): # <<<<<<<<<<<<<< * cdef: * int val, max_val = 2 */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_9hashtable_9mode_int64, NULL, __pyx_n_s_pandas_hashtable); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1011; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_mode_int64, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1011; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/hashtable.pyx":1 * from cpython cimport PyObject, Py_INCREF, PyList_Check, PyTuple_Check # <<<<<<<<<<<<<< * * from khash cimport * */ __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_test, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "numpy.pxd":979 * arr.base = baseptr * * cdef inline object get_array_base(ndarray arr): # <<<<<<<<<<<<<< * if arr.base is NULL: * return None */ goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); if (__pyx_m) { __Pyx_AddTraceback("init pandas.hashtable", __pyx_clineno, __pyx_lineno, __pyx_filename); Py_DECREF(__pyx_m); __pyx_m = 0; } else if (!PyErr_Occurred()) { PyErr_SetString(PyExc_ImportError, "init pandas.hashtable"); } __pyx_L0:; __Pyx_RefNannyFinishContext(); #if PY_MAJOR_VERSION < 3 return; #else return __pyx_m; #endif } /* Runtime support code */ #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 /* CYTHON_REFNANNY */ 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; } static void __Pyx_RaiseArgumentTypeInvalid(const char* name, PyObject *obj, PyTypeObject *type) { PyErr_Format(PyExc_TypeError, "Argument '%.200s' has incorrect type (expected %.200s, got %.200s)", name, type->tp_name, Py_TYPE(obj)->tp_name); } static CYTHON_INLINE int __Pyx_ArgTypeTest(PyObject *obj, PyTypeObject *type, int none_allowed, const char *name, int exact) { if (unlikely(!type)) { PyErr_SetString(PyExc_SystemError, "Missing type object"); return 0; } if (none_allowed && obj == Py_None) return 1; else if (exact) { if (likely(Py_TYPE(obj) == type)) return 1; #if PY_MAJOR_VERSION == 2 else if ((type == &PyBaseString_Type) && likely(__Pyx_PyBaseString_CheckExact(obj))) return 1; #endif } else { if (likely(PyObject_TypeCheck(obj, type))) return 1; } __Pyx_RaiseArgumentTypeInvalid(name, obj, type); return 0; } static CYTHON_INLINE PyObject *__Pyx_GetModuleGlobalName(PyObject *name) { PyObject *result; #if CYTHON_COMPILING_IN_CPYTHON result = PyDict_GetItem(__pyx_d, name); if (result) { Py_INCREF(result); } else { #else result = PyObject_GetItem(__pyx_d, name); if (!result) { PyErr_Clear(); #endif result = __Pyx_GetBuiltinName(name); } return result; } static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type) { if (unlikely(!type)) { PyErr_SetString(PyExc_SystemError, "Missing type object"); return 0; } if (likely(PyObject_TypeCheck(obj, type))) return 1; PyErr_Format(PyExc_TypeError, "Cannot convert %.200s to %.200s", Py_TYPE(obj)->tp_name, type->tp_name); return 0; } static CYTHON_INLINE int __Pyx_IsLittleEndian(void) { unsigned int n = 1; return *(unsigned char*)(&n) != 0; } 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) /* First char was not a digit */ 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; /* Consume from buffer string */ while (1) { if (field == &ctx->root) { ctx->head = NULL; if (ctx->enc_count != 0) { __Pyx_BufFmt_RaiseExpected(ctx); return -1; } break; /* breaks both loops as ctx->enc_count == 0 */ } 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; /* empty struct */ 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 CYTHON_INLINE 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 != ')') { if (isspace(*ts)) continue; 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 10: case 13: ++ts; break; case '<': if (!__Pyx_IsLittleEndian()) { PyErr_SetString(PyExc_ValueError, "Little-endian buffer not supported on big-endian compiler"); return NULL; } ctx->new_packmode = '='; ++ts; break; case '>': case '!': if (__Pyx_IsLittleEndian()) { 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': /* substruct */ { 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; /* Erase processed last struct element */ 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 '}': /* end of substruct; either repeat or move on */ { size_t alignment = ctx->struct_alignment; ++ts; if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL; ctx->enc_type = 0; /* Erase processed last struct element */ 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; } /* fall through */ 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 's': case 'p': if (ctx->enc_type == *ts && got_Z == ctx->is_complex && ctx->enc_packmode == ctx->new_packmode) { ctx->enc_count += ctx->new_count; } else { 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; } } } } static CYTHON_INLINE 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 CYTHON_INLINE int __Pyx_GetBufferAndValidate( Py_buffer* buf, PyObject* obj, __Pyx_TypeInfo* dtype, int flags, int nd, int cast, __Pyx_BufFmt_StackElem* stack) { if (obj == Py_None || obj == NULL) { __Pyx_ZeroBuffer(buf); return 0; } buf->buf = NULL; if (__Pyx_GetBuffer(obj, buf, flags) == -1) goto fail; if (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 ((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_ZeroBuffer(buf); return -1; } static CYTHON_INLINE void __Pyx_SafeReleaseBuffer(Py_buffer* info) { if (info->buf == NULL) return; if (info->suboffsets == __Pyx_minusones) info->suboffsets = NULL; __Pyx_ReleaseBuffer(info); } static void __Pyx_RaiseBufferFallbackError(void) { PyErr_SetString(PyExc_ValueError, "Buffer acquisition failed on assignment; and then reacquiring the old buffer failed too!"); } static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j) { PyObject *r; if (!j) return NULL; r = PyObject_GetItem(o, j); Py_DECREF(j); return r; } static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i, int wraparound, int boundscheck) { #if CYTHON_COMPILING_IN_CPYTHON if (wraparound & unlikely(i < 0)) i += PyList_GET_SIZE(o); if ((!boundscheck) || likely((0 <= i) & (i < PyList_GET_SIZE(o)))) { PyObject *r = PyList_GET_ITEM(o, i); Py_INCREF(r); return r; } return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i)); #else return PySequence_GetItem(o, i); #endif } static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i, int wraparound, int boundscheck) { #if CYTHON_COMPILING_IN_CPYTHON if (wraparound & unlikely(i < 0)) i += PyTuple_GET_SIZE(o); if ((!boundscheck) || likely((0 <= i) & (i < PyTuple_GET_SIZE(o)))) { PyObject *r = PyTuple_GET_ITEM(o, i); Py_INCREF(r); return r; } return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i)); #else return PySequence_GetItem(o, i); #endif } static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, int is_list, int wraparound, int boundscheck) { #if CYTHON_COMPILING_IN_CPYTHON if (is_list || PyList_CheckExact(o)) { Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyList_GET_SIZE(o); if ((!boundscheck) || (likely((n >= 0) & (n < PyList_GET_SIZE(o))))) { PyObject *r = PyList_GET_ITEM(o, n); Py_INCREF(r); return r; } } else if (PyTuple_CheckExact(o)) { Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyTuple_GET_SIZE(o); if ((!boundscheck) || likely((n >= 0) & (n < PyTuple_GET_SIZE(o)))) { PyObject *r = PyTuple_GET_ITEM(o, n); Py_INCREF(r); return r; } } else { PySequenceMethods *m = Py_TYPE(o)->tp_as_sequence; if (likely(m && m->sq_item)) { if (wraparound && unlikely(i < 0) && likely(m->sq_length)) { Py_ssize_t l = m->sq_length(o); if (likely(l >= 0)) { i += l; } else { if (PyErr_ExceptionMatches(PyExc_OverflowError)) PyErr_Clear(); else return NULL; } } 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)); } static void __Pyx_RaiseBufferIndexError(int axis) { PyErr_Format(PyExc_IndexError, "Out of bounds on buffer access (axis %d)", axis); } static CYTHON_INLINE void __Pyx_ErrRestore(PyObject *type, PyObject *value, PyObject *tb) { #if CYTHON_COMPILING_IN_CPYTHON PyObject *tmp_type, *tmp_value, *tmp_tb; PyThreadState *tstate = PyThreadState_GET(); 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); #else PyErr_Restore(type, value, tb); #endif } static CYTHON_INLINE void __Pyx_ErrFetch(PyObject **type, PyObject **value, PyObject **tb) { #if CYTHON_COMPILING_IN_CPYTHON PyThreadState *tstate = PyThreadState_GET(); *type = tstate->curexc_type; *value = tstate->curexc_value; *tb = tstate->curexc_traceback; tstate->curexc_type = 0; tstate->curexc_value = 0; tstate->curexc_traceback = 0; #else PyErr_Fetch(type, value, tb); #endif } 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); } static CYTHON_INLINE int __Pyx_CheckKeywordStrings( PyObject *kwdict, const char* function_name, int kw_allowed) { PyObject* key = 0; Py_ssize_t pos = 0; #if CPYTHON_COMPILING_IN_PYPY if (!kw_allowed && PyDict_Next(kwdict, &pos, &key, 0)) goto invalid_keyword; return 1; #else while (PyDict_Next(kwdict, &pos, &key, 0)) { #if PY_MAJOR_VERSION < 3 if (unlikely(!PyString_CheckExact(key)) && unlikely(!PyString_Check(key))) #endif if (unlikely(!PyUnicode_Check(key))) goto invalid_keyword_type; } if ((!kw_allowed) && unlikely(key)) goto invalid_keyword; return 1; invalid_keyword_type: PyErr_Format(PyExc_TypeError, "%.200s() keywords must be strings", function_name); return 0; #endif invalid_keyword: PyErr_Format(PyExc_TypeError, #if PY_MAJOR_VERSION < 3 "%.200s() got an unexpected keyword argument '%.200s'", function_name, PyString_AsString(key)); #else "%s() got an unexpected keyword argument '%U'", function_name, key); #endif return 0; } 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 } 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; } #if PY_MAJOR_VERSION < 3 static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, CYTHON_UNUSED PyObject *cause) { 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 PY_VERSION_HEX < 0x02050000 if (PyClass_Check(type)) { #else if (PyType_Check(type)) { #endif #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; #if PY_VERSION_HEX < 0x02050000 if (PyInstance_Check(type)) { type = (PyObject*) ((PyInstanceObject*)type)->in_class; Py_INCREF(type); } else { type = 0; PyErr_SetString(PyExc_TypeError, "raise: exception must be an old-style class or instance"); goto raise_error; } #else 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; } #endif } __Pyx_ErrRestore(type, value, tb); return; raise_error: Py_XDECREF(value); Py_XDECREF(type); Py_XDECREF(tb); return; } #else /* Python 3+ */ 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) { if (PyObject_IsSubclass(instance_class, type)) { type = instance_class; } else { instance_class = NULL; } } } if (!instance_class) { PyObject *args; if (!value) args = PyTuple_New(0); else if (PyTuple_Check(value)) { Py_INCREF(value); args = value; } else args = PyTuple_Pack(1, value); if (!args) goto bad; owned_instance = PyObject_Call(type, args, NULL); Py_DECREF(args); if (!owned_instance) goto bad; value = owned_instance; if (!PyExceptionInstance_Check(value)) { PyErr_Format(PyExc_TypeError, "calling %R should have returned an instance of " "BaseException, not %R", type, Py_TYPE(value)); goto bad; } } } else { PyErr_SetString(PyExc_TypeError, "raise: exception class must be a subclass of BaseException"); goto bad; } #if PY_VERSION_HEX >= 0x03030000 if (cause) { #else if (cause && cause != Py_None) { #endif PyObject *fixed_cause; if (cause == Py_None) { fixed_cause = NULL; } else if (PyExceptionClass_Check(cause)) { fixed_cause = PyObject_CallObject(cause, NULL); if (fixed_cause == NULL) goto bad; } else if (PyExceptionInstance_Check(cause)) { fixed_cause = cause; Py_INCREF(fixed_cause); } else { PyErr_SetString(PyExc_TypeError, "exception causes must derive from " "BaseException"); goto bad; } PyException_SetCause(value, fixed_cause); } PyErr_SetObject(type, value); if (tb) { PyThreadState *tstate = PyThreadState_GET(); PyObject* tmp_tb = tstate->curexc_traceback; if (tb != tmp_tb) { Py_INCREF(tb); tstate->curexc_traceback = tb; Py_XDECREF(tmp_tb); } } bad: Py_XDECREF(owned_instance); return; } #endif static void __Pyx_WriteUnraisable(const char *name, CYTHON_UNUSED int clineno, CYTHON_UNUSED int lineno, CYTHON_UNUSED const char *filename, int full_traceback) { PyObject *old_exc, *old_val, *old_tb; PyObject *ctx; __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); } } static CYTHON_INLINE int __Pyx_SetItemInt_Generic(PyObject *o, PyObject *j, PyObject *v) { int r; if (!j) return -1; r = PyObject_SetItem(o, j, v); Py_DECREF(j); return r; } static CYTHON_INLINE int __Pyx_SetItemInt_Fast(PyObject *o, Py_ssize_t i, PyObject *v, int is_list, int wraparound, int boundscheck) { #if CYTHON_COMPILING_IN_CPYTHON if (is_list || PyList_CheckExact(o)) { Py_ssize_t n = (!wraparound) ? i : ((likely(i >= 0)) ? i : i + PyList_GET_SIZE(o)); if ((!boundscheck) || likely((n >= 0) & (n < PyList_GET_SIZE(o)))) { PyObject* old = PyList_GET_ITEM(o, n); Py_INCREF(v); PyList_SET_ITEM(o, n, v); Py_DECREF(old); return 1; } } else { PySequenceMethods *m = Py_TYPE(o)->tp_as_sequence; if (likely(m && m->sq_ass_item)) { if (wraparound && unlikely(i < 0) && likely(m->sq_length)) { Py_ssize_t l = m->sq_length(o); if (likely(l >= 0)) { i += l; } else { if (PyErr_ExceptionMatches(PyExc_OverflowError)) PyErr_Clear(); else return -1; } } return m->sq_ass_item(o, i, v); } } #else #if CYTHON_COMPILING_IN_PYPY if (is_list || (PySequence_Check(o) && !PyDict_Check(o))) { #else if (is_list || PySequence_Check(o)) { #endif return PySequence_SetItem(o, i, v); } #endif return __Pyx_SetItemInt_Generic(o, PyInt_FromSsize_t(i), v); } static CYTHON_INLINE Py_ssize_t __Pyx_div_Py_ssize_t(Py_ssize_t a, Py_ssize_t b) { Py_ssize_t q = a / b; Py_ssize_t r = a - q*b; q -= ((r != 0) & ((r ^ b) < 0)); return q; } static CYTHON_INLINE PyObject* __Pyx_PyObject_GetSlice( PyObject* obj, Py_ssize_t cstart, Py_ssize_t cstop, PyObject** _py_start, PyObject** _py_stop, PyObject** _py_slice, int has_cstart, int has_cstop, CYTHON_UNUSED int wraparound) { #if CYTHON_COMPILING_IN_CPYTHON PyMappingMethods* mp; #if PY_MAJOR_VERSION < 3 PySequenceMethods* ms = Py_TYPE(obj)->tp_as_sequence; if (likely(ms && ms->sq_slice)) { if (!has_cstart) { if (_py_start && (*_py_start != Py_None)) { cstart = __Pyx_PyIndex_AsSsize_t(*_py_start); if ((cstart == (Py_ssize_t)-1) && PyErr_Occurred()) goto bad; } else cstart = 0; } if (!has_cstop) { if (_py_stop && (*_py_stop != Py_None)) { cstop = __Pyx_PyIndex_AsSsize_t(*_py_stop); if ((cstop == (Py_ssize_t)-1) && PyErr_Occurred()) goto bad; } else cstop = PY_SSIZE_T_MAX; } if (wraparound && unlikely((cstart < 0) | (cstop < 0)) && likely(ms->sq_length)) { Py_ssize_t l = ms->sq_length(obj); if (likely(l >= 0)) { if (cstop < 0) { cstop += l; if (cstop < 0) cstop = 0; } if (cstart < 0) { cstart += l; if (cstart < 0) cstart = 0; } } else { if (PyErr_ExceptionMatches(PyExc_OverflowError)) PyErr_Clear(); else goto bad; } } return ms->sq_slice(obj, cstart, cstop); } #endif mp = Py_TYPE(obj)->tp_as_mapping; if (likely(mp && mp->mp_subscript)) #endif { PyObject* result; PyObject *py_slice, *py_start, *py_stop; if (_py_slice) { py_slice = *_py_slice; } else { PyObject* owned_start = NULL; PyObject* owned_stop = NULL; if (_py_start) { py_start = *_py_start; } else { if (has_cstart) { owned_start = py_start = PyInt_FromSsize_t(cstart); if (unlikely(!py_start)) goto bad; } else py_start = Py_None; } if (_py_stop) { py_stop = *_py_stop; } else { if (has_cstop) { owned_stop = py_stop = PyInt_FromSsize_t(cstop); if (unlikely(!py_stop)) { Py_XDECREF(owned_start); goto bad; } } else py_stop = Py_None; } py_slice = PySlice_New(py_start, py_stop, Py_None); Py_XDECREF(owned_start); Py_XDECREF(owned_stop); if (unlikely(!py_slice)) goto bad; } #if CYTHON_COMPILING_IN_CPYTHON result = mp->mp_subscript(obj, py_slice); #else result = PyObject_GetItem(obj, py_slice); #endif if (!_py_slice) { Py_DECREF(py_slice); } return result; } PyErr_Format(PyExc_TypeError, "'%.200s' object is unsliceable", Py_TYPE(obj)->tp_name); bad: return NULL; } static CYTHON_INLINE void __Pyx_ExceptionSave(PyObject **type, PyObject **value, PyObject **tb) { #if CYTHON_COMPILING_IN_CPYTHON PyThreadState *tstate = PyThreadState_GET(); *type = tstate->exc_type; *value = tstate->exc_value; *tb = tstate->exc_traceback; Py_XINCREF(*type); Py_XINCREF(*value); Py_XINCREF(*tb); #else PyErr_GetExcInfo(type, value, tb); #endif } static void __Pyx_ExceptionReset(PyObject *type, PyObject *value, PyObject *tb) { #if CYTHON_COMPILING_IN_CPYTHON PyObject *tmp_type, *tmp_value, *tmp_tb; PyThreadState *tstate = PyThreadState_GET(); tmp_type = tstate->exc_type; tmp_value = tstate->exc_value; tmp_tb = tstate->exc_traceback; tstate->exc_type = type; tstate->exc_value = value; tstate->exc_traceback = tb; Py_XDECREF(tmp_type); Py_XDECREF(tmp_value); Py_XDECREF(tmp_tb); #else PyErr_SetExcInfo(type, value, tb); #endif } static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb) { PyObject *local_type, *local_value, *local_tb; #if CYTHON_COMPILING_IN_CPYTHON PyObject *tmp_type, *tmp_value, *tmp_tb; PyThreadState *tstate = PyThreadState_GET(); local_type = tstate->curexc_type; local_value = tstate->curexc_value; local_tb = tstate->curexc_traceback; tstate->curexc_type = 0; tstate->curexc_value = 0; tstate->curexc_traceback = 0; #else PyErr_Fetch(&local_type, &local_value, &local_tb); #endif PyErr_NormalizeException(&local_type, &local_value, &local_tb); #if CYTHON_COMPILING_IN_CPYTHON if (unlikely(tstate->curexc_type)) #else if (unlikely(PyErr_Occurred())) #endif goto bad; #if PY_MAJOR_VERSION >= 3 if (local_tb) { if (unlikely(PyException_SetTraceback(local_value, local_tb) < 0)) goto bad; } #endif Py_XINCREF(local_tb); Py_XINCREF(local_type); Py_XINCREF(local_value); *type = local_type; *value = local_value; *tb = local_tb; #if CYTHON_COMPILING_IN_CPYTHON tmp_type = tstate->exc_type; tmp_value = tstate->exc_value; tmp_tb = tstate->exc_traceback; tstate->exc_type = local_type; tstate->exc_value = local_value; tstate->exc_traceback = local_tb; Py_XDECREF(tmp_type); Py_XDECREF(tmp_value); Py_XDECREF(tmp_tb); #else PyErr_SetExcInfo(local_type, local_value, local_tb); #endif return 0; bad: *type = 0; *value = 0; *tb = 0; Py_XDECREF(local_type); Py_XDECREF(local_value); Py_XDECREF(local_tb); return -1; } 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); } 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"); } static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); } static int __Pyx_SetVtable(PyObject *dict, void *vtable) { #if PY_VERSION_HEX >= 0x02070000 && !(PY_MAJOR_VERSION==3&&PY_MINOR_VERSION==0) 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; } #if PY_MAJOR_VERSION < 3 static int __Pyx_GetBuffer(PyObject *obj, Py_buffer *view, int flags) { #if PY_VERSION_HEX >= 0x02060000 if (PyObject_CheckBuffer(obj)) return PyObject_GetBuffer(obj, view, flags); #endif if (PyObject_TypeCheck(obj, __pyx_ptype_5numpy_ndarray)) return __pyx_pw_5numpy_7ndarray_1__getbuffer__(obj, view, flags); #if PY_VERSION_HEX < 0x02060000 if (obj->ob_type->tp_dict) { PyObject *getbuffer_cobj = PyObject_GetItem( obj->ob_type->tp_dict, __pyx_n_s_pyx_getbuffer); if (getbuffer_cobj) { getbufferproc func = (getbufferproc) PyCObject_AsVoidPtr(getbuffer_cobj); Py_DECREF(getbuffer_cobj); if (!func) goto fail; return func(obj, view, flags); } else { PyErr_Clear(); } } #endif PyErr_Format(PyExc_TypeError, "'%.200s' does not have the buffer interface", Py_TYPE(obj)->tp_name); #if PY_VERSION_HEX < 0x02060000 fail: #endif return -1; } static void __Pyx_ReleaseBuffer(Py_buffer *view) { PyObject *obj = view->obj; if (!obj) return; #if PY_VERSION_HEX >= 0x02060000 if (PyObject_CheckBuffer(obj)) { PyBuffer_Release(view); return; } #endif if (PyObject_TypeCheck(obj, __pyx_ptype_5numpy_ndarray)) { __pyx_pw_5numpy_7ndarray_3__releasebuffer__(obj, view); return; } #if PY_VERSION_HEX < 0x02060000 if (obj->ob_type->tp_dict) { PyObject *releasebuffer_cobj = PyObject_GetItem( obj->ob_type->tp_dict, __pyx_n_s_pyx_releasebuffer); if (releasebuffer_cobj) { releasebufferproc func = (releasebufferproc) PyCObject_AsVoidPtr(releasebuffer_cobj); Py_DECREF(releasebuffer_cobj); if (!func) goto fail; func(obj, view); return; } else { PyErr_Clear(); } } #endif goto nofail; #if PY_VERSION_HEX < 0x02060000 fail: #endif PyErr_WriteUnraisable(obj); nofail: Py_DECREF(obj); view->obj = NULL; } #endif /* PY_MAJOR_VERSION < 3 */ static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level) { PyObject *empty_list = 0; PyObject *module = 0; PyObject *global_dict = 0; PyObject *empty_dict = 0; PyObject *list; #if PY_VERSION_HEX < 0x03030000 PyObject *py_import; py_import = __Pyx_PyObject_GetAttrStr(__pyx_b, __pyx_n_s_import); if (!py_import) goto bad; #endif if (from_list) list = from_list; else { empty_list = PyList_New(0); if (!empty_list) goto bad; list = empty_list; } global_dict = PyModule_GetDict(__pyx_m); if (!global_dict) goto bad; empty_dict = PyDict_New(); if (!empty_dict) goto bad; #if PY_VERSION_HEX >= 0x02050000 { #if PY_MAJOR_VERSION >= 3 if (level == -1) { if (strchr(__Pyx_MODULE_NAME, '.')) { #if PY_VERSION_HEX < 0x03030000 PyObject *py_level = PyInt_FromLong(1); if (!py_level) goto bad; module = PyObject_CallFunctionObjArgs(py_import, name, global_dict, empty_dict, list, py_level, NULL); Py_DECREF(py_level); #else module = PyImport_ImportModuleLevelObject( name, global_dict, empty_dict, list, 1); #endif if (!module) { if (!PyErr_ExceptionMatches(PyExc_ImportError)) goto bad; PyErr_Clear(); } } level = 0; /* try absolute import on failure */ } #endif if (!module) { #if PY_VERSION_HEX < 0x03030000 PyObject *py_level = PyInt_FromLong(level); if (!py_level) goto bad; module = PyObject_CallFunctionObjArgs(py_import, name, global_dict, empty_dict, list, py_level, NULL); Py_DECREF(py_level); #else module = PyImport_ImportModuleLevelObject( name, global_dict, empty_dict, list, level); #endif } } #else if (level>0) { PyErr_SetString(PyExc_RuntimeError, "Relative import is not supported for Python <=2.4."); goto bad; } module = PyObject_CallFunctionObjArgs(py_import, name, global_dict, empty_dict, list, NULL); #endif bad: #if PY_VERSION_HEX < 0x03030000 Py_XDECREF(py_import); #endif Py_XDECREF(empty_list); Py_XDECREF(empty_dict); return module; } #define __PYX_VERIFY_RETURN_INT(target_type, func_type, func) \ { \ func_type value = func(x); \ if (sizeof(target_type) < sizeof(func_type)) { \ if (unlikely(value != (func_type) (target_type) value)) { \ func_type zero = 0; \ PyErr_SetString(PyExc_OverflowError, \ (is_unsigned && unlikely(value < zero)) ? \ "can't convert negative value to " #target_type : \ "value too large to convert to " #target_type); \ return (target_type) -1; \ } \ } \ return (target_type) value; \ } #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS #include "longintrepr.h" #endif #endif static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) { const int neg_one = (int) -1, const_zero = 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) } else { long val = PyInt_AS_LONG(x); if (is_unsigned && unlikely(val < 0)) { PyErr_SetString(PyExc_OverflowError, "can't convert negative value to int"); return (int) -1; } return (int) val; } } else #endif if (likely(PyLong_Check(x))) { if (is_unsigned) { #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS if (sizeof(digit) <= sizeof(int)) { switch (Py_SIZE(x)) { case 0: return 0; case 1: return (int) ((PyLongObject*)x)->ob_digit[0]; } } #endif #endif if (unlikely(Py_SIZE(x) < 0)) { PyErr_SetString(PyExc_OverflowError, "can't convert negative value to int"); return (int) -1; } if (sizeof(int) <= sizeof(unsigned long)) { __PYX_VERIFY_RETURN_INT(int, unsigned long, PyLong_AsUnsignedLong) } else if (sizeof(int) <= sizeof(unsigned long long)) { __PYX_VERIFY_RETURN_INT(int, unsigned long long, PyLong_AsUnsignedLongLong) } } else { #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS if (sizeof(digit) <= sizeof(int)) { switch (Py_SIZE(x)) { case 0: return 0; case 1: return +(int) ((PyLongObject*)x)->ob_digit[0]; case -1: return -(int) ((PyLongObject*)x)->ob_digit[0]; } } #endif #endif if (sizeof(int) <= sizeof(long)) { __PYX_VERIFY_RETURN_INT(int, long, PyLong_AsLong) } else if (sizeof(int) <= sizeof(long long)) { __PYX_VERIFY_RETURN_INT(int, long long, PyLong_AsLongLong) } } { #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_Int(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_Int(x); if (!tmp) return (int) -1; val = __Pyx_PyInt_As_int(tmp); Py_DECREF(tmp); return val; } } #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS #include "longintrepr.h" #endif #endif static CYTHON_INLINE npy_int32 __Pyx_PyInt_As_npy_int32(PyObject *x) { const npy_int32 neg_one = (npy_int32) -1, const_zero = 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) } else { long val = PyInt_AS_LONG(x); if (is_unsigned && unlikely(val < 0)) { PyErr_SetString(PyExc_OverflowError, "can't convert negative value to npy_int32"); return (npy_int32) -1; } return (npy_int32) val; } } else #endif if (likely(PyLong_Check(x))) { if (is_unsigned) { #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS if (sizeof(digit) <= sizeof(npy_int32)) { switch (Py_SIZE(x)) { case 0: return 0; case 1: return (npy_int32) ((PyLongObject*)x)->ob_digit[0]; } } #endif #endif if (unlikely(Py_SIZE(x) < 0)) { PyErr_SetString(PyExc_OverflowError, "can't convert negative value to npy_int32"); return (npy_int32) -1; } if (sizeof(npy_int32) <= sizeof(unsigned long)) { __PYX_VERIFY_RETURN_INT(npy_int32, unsigned long, PyLong_AsUnsignedLong) } else if (sizeof(npy_int32) <= sizeof(unsigned long long)) { __PYX_VERIFY_RETURN_INT(npy_int32, unsigned long long, PyLong_AsUnsignedLongLong) } } else { #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS if (sizeof(digit) <= sizeof(npy_int32)) { switch (Py_SIZE(x)) { case 0: return 0; case 1: return +(npy_int32) ((PyLongObject*)x)->ob_digit[0]; case -1: return -(npy_int32) ((PyLongObject*)x)->ob_digit[0]; } } #endif #endif if (sizeof(npy_int32) <= sizeof(long)) { __PYX_VERIFY_RETURN_INT(npy_int32, long, PyLong_AsLong) } else if (sizeof(npy_int32) <= sizeof(long long)) { __PYX_VERIFY_RETURN_INT(npy_int32, long long, PyLong_AsLongLong) } } { #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_Int(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_Int(x); if (!tmp) return (npy_int32) -1; val = __Pyx_PyInt_As_npy_int32(tmp); Py_DECREF(tmp); return val; } } #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS #include "longintrepr.h" #endif #endif static CYTHON_INLINE npy_int64 __Pyx_PyInt_As_npy_int64(PyObject *x) { const npy_int64 neg_one = (npy_int64) -1, const_zero = 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) } else { long val = PyInt_AS_LONG(x); if (is_unsigned && unlikely(val < 0)) { PyErr_SetString(PyExc_OverflowError, "can't convert negative value to npy_int64"); return (npy_int64) -1; } return (npy_int64) val; } } else #endif if (likely(PyLong_Check(x))) { if (is_unsigned) { #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS if (sizeof(digit) <= sizeof(npy_int64)) { switch (Py_SIZE(x)) { case 0: return 0; case 1: return (npy_int64) ((PyLongObject*)x)->ob_digit[0]; } } #endif #endif if (unlikely(Py_SIZE(x) < 0)) { PyErr_SetString(PyExc_OverflowError, "can't convert negative value to npy_int64"); return (npy_int64) -1; } if (sizeof(npy_int64) <= sizeof(unsigned long)) { __PYX_VERIFY_RETURN_INT(npy_int64, unsigned long, PyLong_AsUnsignedLong) } else if (sizeof(npy_int64) <= sizeof(unsigned long long)) { __PYX_VERIFY_RETURN_INT(npy_int64, unsigned long long, PyLong_AsUnsignedLongLong) } } else { #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS if (sizeof(digit) <= sizeof(npy_int64)) { switch (Py_SIZE(x)) { case 0: return 0; case 1: return +(npy_int64) ((PyLongObject*)x)->ob_digit[0]; case -1: return -(npy_int64) ((PyLongObject*)x)->ob_digit[0]; } } #endif #endif if (sizeof(npy_int64) <= sizeof(long)) { __PYX_VERIFY_RETURN_INT(npy_int64, long, PyLong_AsLong) } else if (sizeof(npy_int64) <= sizeof(long long)) { __PYX_VERIFY_RETURN_INT(npy_int64, long long, PyLong_AsLongLong) } } { #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_Int(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_Int(x); if (!tmp) return (npy_int64) -1; val = __Pyx_PyInt_As_npy_int64(tmp); Py_DECREF(tmp); return val; } } static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value) { const int neg_one = (int) -1, const_zero = 0; const int is_unsigned = neg_one > const_zero; if (is_unsigned) { if (sizeof(int) < sizeof(long)) { return PyInt_FromLong((long) value); } else if (sizeof(int) <= sizeof(unsigned long)) { return PyLong_FromUnsignedLong((unsigned long) value); } else if (sizeof(int) <= sizeof(unsigned long long)) { return PyLong_FromUnsignedLongLong((unsigned long long) value); } } else { if (sizeof(int) <= sizeof(long)) { return PyInt_FromLong((long) value); } else if (sizeof(int) <= sizeof(long long)) { return PyLong_FromLongLong((long long) value); } } { int one = 1; int little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&value; return _PyLong_FromByteArray(bytes, sizeof(int), little, !is_unsigned); } } #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS #include "longintrepr.h" #endif #endif static CYTHON_INLINE npy_uint32 __Pyx_PyInt_As_npy_uint32(PyObject *x) { const npy_uint32 neg_one = (npy_uint32) -1, const_zero = 0; const int is_unsigned = neg_one > const_zero; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_Check(x))) { if (sizeof(npy_uint32) < sizeof(long)) { __PYX_VERIFY_RETURN_INT(npy_uint32, long, PyInt_AS_LONG) } else { long val = PyInt_AS_LONG(x); if (is_unsigned && unlikely(val < 0)) { PyErr_SetString(PyExc_OverflowError, "can't convert negative value to npy_uint32"); return (npy_uint32) -1; } return (npy_uint32) val; } } else #endif if (likely(PyLong_Check(x))) { if (is_unsigned) { #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS if (sizeof(digit) <= sizeof(npy_uint32)) { switch (Py_SIZE(x)) { case 0: return 0; case 1: return (npy_uint32) ((PyLongObject*)x)->ob_digit[0]; } } #endif #endif if (unlikely(Py_SIZE(x) < 0)) { PyErr_SetString(PyExc_OverflowError, "can't convert negative value to npy_uint32"); return (npy_uint32) -1; } if (sizeof(npy_uint32) <= sizeof(unsigned long)) { __PYX_VERIFY_RETURN_INT(npy_uint32, unsigned long, PyLong_AsUnsignedLong) } else if (sizeof(npy_uint32) <= sizeof(unsigned long long)) { __PYX_VERIFY_RETURN_INT(npy_uint32, unsigned long long, PyLong_AsUnsignedLongLong) } } else { #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS if (sizeof(digit) <= sizeof(npy_uint32)) { switch (Py_SIZE(x)) { case 0: return 0; case 1: return +(npy_uint32) ((PyLongObject*)x)->ob_digit[0]; case -1: return -(npy_uint32) ((PyLongObject*)x)->ob_digit[0]; } } #endif #endif if (sizeof(npy_uint32) <= sizeof(long)) { __PYX_VERIFY_RETURN_INT(npy_uint32, long, PyLong_AsLong) } else if (sizeof(npy_uint32) <= sizeof(long long)) { __PYX_VERIFY_RETURN_INT(npy_uint32, long long, PyLong_AsLongLong) } } { #if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray) PyErr_SetString(PyExc_RuntimeError, "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers"); #else npy_uint32 val; PyObject *v = __Pyx_PyNumber_Int(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_uint32) -1; } } else { npy_uint32 val; PyObject *tmp = __Pyx_PyNumber_Int(x); if (!tmp) return (npy_uint32) -1; val = __Pyx_PyInt_As_npy_uint32(tmp); Py_DECREF(tmp); return val; } } static CYTHON_INLINE PyObject* __Pyx_PyInt_From_npy_int32(npy_int32 value) { const npy_int32 neg_one = (npy_int32) -1, const_zero = 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); } else if (sizeof(npy_int32) <= sizeof(unsigned long long)) { return PyLong_FromUnsignedLongLong((unsigned long long) value); } } else { if (sizeof(npy_int32) <= sizeof(long)) { return PyInt_FromLong((long) value); } else if (sizeof(npy_int32) <= sizeof(long long)) { return PyLong_FromLongLong((long long) value); } } { 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); } } static CYTHON_INLINE PyObject* __Pyx_PyInt_From_npy_int64(npy_int64 value) { const npy_int64 neg_one = (npy_int64) -1, const_zero = 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); } else if (sizeof(npy_int64) <= sizeof(unsigned long long)) { return PyLong_FromUnsignedLongLong((unsigned long long) value); } } else { if (sizeof(npy_int64) <= sizeof(long)) { return PyInt_FromLong((long) value); } else if (sizeof(npy_int64) <= sizeof(long long)) { return PyLong_FromLongLong((long long) value); } } { 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); } } static CYTHON_INLINE PyObject* __Pyx_PyInt_From_npy_uint32(npy_uint32 value) { const npy_uint32 neg_one = (npy_uint32) -1, const_zero = 0; const int is_unsigned = neg_one > const_zero; if (is_unsigned) { if (sizeof(npy_uint32) < sizeof(long)) { return PyInt_FromLong((long) value); } else if (sizeof(npy_uint32) <= sizeof(unsigned long)) { return PyLong_FromUnsignedLong((unsigned long) value); } else if (sizeof(npy_uint32) <= sizeof(unsigned long long)) { return PyLong_FromUnsignedLongLong((unsigned long long) value); } } else { if (sizeof(npy_uint32) <= sizeof(long)) { return PyInt_FromLong((long) value); } else if (sizeof(npy_uint32) <= sizeof(long long)) { return PyLong_FromLongLong((long long) value); } } { int one = 1; int little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&value; return _PyLong_FromByteArray(bytes, sizeof(npy_uint32), little, !is_unsigned); } } #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 #if CYTHON_CCOMPLEX #else static CYTHON_INLINE int __Pyx_c_eqf(__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_sumf(__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_difff(__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_prodf(__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; } static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_quotf(__pyx_t_float_complex a, __pyx_t_float_complex b) { __pyx_t_float_complex z; float denom = b.real * b.real + b.imag * b.imag; z.real = (a.real * b.real + a.imag * b.imag) / denom; z.imag = (a.imag * b.real - a.real * b.imag) / denom; return z; } static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_negf(__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_zerof(__pyx_t_float_complex a) { return (a.real == 0) && (a.imag == 0); } static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_conjf(__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_absf(__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_powf(__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_prodf(a, a); return __Pyx_c_prodf(a, a); case 3: z = __Pyx_c_prodf(a, a); return __Pyx_c_prodf(z, a); case 4: z = __Pyx_c_prodf(a, a); return __Pyx_c_prodf(z, z); } } if (a.imag == 0) { if (a.real == 0) { return a; } r = a.real; theta = 0; } else { r = __Pyx_c_absf(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 #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 #if CYTHON_CCOMPLEX #else static CYTHON_INLINE int __Pyx_c_eq(__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(__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(__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(__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; } static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_quot(__pyx_t_double_complex a, __pyx_t_double_complex b) { __pyx_t_double_complex z; double denom = b.real * b.real + b.imag * b.imag; z.real = (a.real * b.real + a.imag * b.imag) / denom; z.imag = (a.imag * b.real - a.real * b.imag) / denom; return z; } static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_neg(__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(__pyx_t_double_complex a) { return (a.real == 0) && (a.imag == 0); } static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_conj(__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(__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(__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(a, a); return __Pyx_c_prod(a, a); case 3: z = __Pyx_c_prod(a, a); return __Pyx_c_prod(z, a); case 4: z = __Pyx_c_prod(a, a); return __Pyx_c_prod(z, z); } } if (a.imag == 0) { if (a.real == 0) { return a; } r = a.real; theta = 0; } else { r = __Pyx_c_abs(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 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_ptrdiff_t(ptrdiff_t value) { const ptrdiff_t neg_one = (ptrdiff_t) -1, const_zero = 0; const int is_unsigned = neg_one > const_zero; if (is_unsigned) { if (sizeof(ptrdiff_t) < sizeof(long)) { return PyInt_FromLong((long) value); } else if (sizeof(ptrdiff_t) <= sizeof(unsigned long)) { return PyLong_FromUnsignedLong((unsigned long) value); } else if (sizeof(ptrdiff_t) <= sizeof(unsigned long long)) { return PyLong_FromUnsignedLongLong((unsigned long long) value); } } else { if (sizeof(ptrdiff_t) <= sizeof(long)) { return PyInt_FromLong((long) value); } else if (sizeof(ptrdiff_t) <= sizeof(long long)) { return PyLong_FromLongLong((long long) value); } } { int one = 1; int little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&value; return _PyLong_FromByteArray(bytes, sizeof(ptrdiff_t), little, !is_unsigned); } } static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) { const long neg_one = (long) -1, const_zero = 0; const int is_unsigned = neg_one > const_zero; if (is_unsigned) { if (sizeof(long) < sizeof(long)) { return PyInt_FromLong((long) value); } else if (sizeof(long) <= sizeof(unsigned long)) { return PyLong_FromUnsignedLong((unsigned long) value); } else if (sizeof(long) <= sizeof(unsigned long long)) { return PyLong_FromUnsignedLongLong((unsigned long long) value); } } else { if (sizeof(long) <= sizeof(long)) { return PyInt_FromLong((long) value); } else if (sizeof(long) <= sizeof(long long)) { return PyLong_FromLongLong((long long) value); } } { int one = 1; int little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&value; return _PyLong_FromByteArray(bytes, sizeof(long), little, !is_unsigned); } } #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS #include "longintrepr.h" #endif #endif static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) { const long neg_one = (long) -1, const_zero = 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) } else { long val = PyInt_AS_LONG(x); if (is_unsigned && unlikely(val < 0)) { PyErr_SetString(PyExc_OverflowError, "can't convert negative value to long"); return (long) -1; } return (long) val; } } else #endif if (likely(PyLong_Check(x))) { if (is_unsigned) { #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS if (sizeof(digit) <= sizeof(long)) { switch (Py_SIZE(x)) { case 0: return 0; case 1: return (long) ((PyLongObject*)x)->ob_digit[0]; } } #endif #endif if (unlikely(Py_SIZE(x) < 0)) { PyErr_SetString(PyExc_OverflowError, "can't convert negative value to long"); return (long) -1; } if (sizeof(long) <= sizeof(unsigned long)) { __PYX_VERIFY_RETURN_INT(long, unsigned long, PyLong_AsUnsignedLong) } else if (sizeof(long) <= sizeof(unsigned long long)) { __PYX_VERIFY_RETURN_INT(long, unsigned long long, PyLong_AsUnsignedLongLong) } } else { #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS if (sizeof(digit) <= sizeof(long)) { switch (Py_SIZE(x)) { case 0: return 0; case 1: return +(long) ((PyLongObject*)x)->ob_digit[0]; case -1: return -(long) ((PyLongObject*)x)->ob_digit[0]; } } #endif #endif if (sizeof(long) <= sizeof(long)) { __PYX_VERIFY_RETURN_INT(long, long, PyLong_AsLong) } else if (sizeof(long) <= sizeof(long long)) { __PYX_VERIFY_RETURN_INT(long, long long, PyLong_AsLongLong) } } { #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_Int(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_Int(x); if (!tmp) return (long) -1; val = __Pyx_PyInt_As_long(tmp); Py_DECREF(tmp); return val; } } 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); #if PY_VERSION_HEX < 0x02050000 return PyErr_Warn(NULL, message); #else return PyErr_WarnEx(NULL, message, 1); #endif } return 0; } #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 #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", module_name, class_name); #if PY_VERSION_HEX < 0x02050000 if (PyErr_Warn(NULL, warning) < 0) goto bad; #else if (PyErr_WarnEx(NULL, warning, 0) < 0) goto bad; #endif } else if ((size_t)basicsize != size) { PyErr_Format(PyExc_ValueError, "%.200s.%.200s has the wrong size, try recompiling", module_name, class_name); goto bad; } return (PyTypeObject *)result; bad: Py_XDECREF(py_module); Py_XDECREF(result); return NULL; } #endif 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) / 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, 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); } #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, /*int argcount,*/ 0, /*int kwonlyargcount,*/ 0, /*int nlocals,*/ 0, /*int stacksize,*/ 0, /*int flags,*/ __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, /*int firstlineno,*/ __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; PyObject *py_globals = 0; PyFrameObject *py_frame = 0; py_code = __pyx_find_code_object(c_line ? c_line : py_line); if (!py_code) { py_code = __Pyx_CreateCodeObjectForTraceback( funcname, c_line, py_line, filename); if (!py_code) goto bad; __pyx_insert_code_object(c_line ? c_line : py_line, py_code); } py_globals = PyModule_GetDict(__pyx_m); if (!py_globals) goto bad; py_frame = PyFrame_New( PyThreadState_GET(), /*PyThreadState *tstate,*/ py_code, /*PyCodeObject *code,*/ py_globals, /*PyObject *globals,*/ 0 /*PyObject *locals*/ ); if (!py_frame) goto bad; py_frame->f_lineno = py_line; PyTraceBack_Here(py_frame); bad: Py_XDECREF(py_code); Py_XDECREF(py_frame); } 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 /* Python 3+ has unicode identifiers */ if (t->is_unicode | t->is_str) { if (t->intern) { *t->p = PyUnicode_InternFromString(t->s); } else if (t->encoding) { *t->p = PyUnicode_Decode(t->s, t->n - 1, t->encoding, NULL); } else { *t->p = PyUnicode_FromStringAndSize(t->s, t->n - 1); } } else { *t->p = PyBytes_FromStringAndSize(t->s, t->n - 1); } #endif if (!*t->p) return -1; ++t; } return 0; } static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(char* c_str) { return __Pyx_PyUnicode_FromStringAndSize(c_str, strlen(c_str)); } static CYTHON_INLINE char* __Pyx_PyObject_AsString(PyObject* o) { Py_ssize_t ignore; return __Pyx_PyObject_AsStringAndSize(o, &ignore); } static CYTHON_INLINE char* __Pyx_PyObject_AsStringAndSize(PyObject* o, Py_ssize_t *length) { #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT if ( #if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII __Pyx_sys_getdefaultencoding_not_ascii && #endif PyUnicode_Check(o)) { #if PY_VERSION_HEX < 0x03030000 char* defenc_c; PyObject* defenc = _PyUnicode_AsDefaultEncodedString(o, NULL); if (!defenc) return NULL; defenc_c = PyBytes_AS_STRING(defenc); #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII { char* end = defenc_c + PyBytes_GET_SIZE(defenc); char* c; for (c = defenc_c; c < end; c++) { if ((unsigned char) (*c) >= 128) { PyUnicode_AsASCIIString(o); return NULL; } } } #endif /*__PYX_DEFAULT_STRING_ENCODING_IS_ASCII*/ *length = PyBytes_GET_SIZE(defenc); return defenc_c; #else /* PY_VERSION_HEX < 0x03030000 */ if (PyUnicode_READY(o) == -1) return NULL; #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII if (PyUnicode_IS_ASCII(o)) { *length = PyUnicode_GET_DATA_SIZE(o); return PyUnicode_AsUTF8(o); } else { PyUnicode_AsASCIIString(o); return NULL; } #else /* __PYX_DEFAULT_STRING_ENCODING_IS_ASCII */ return PyUnicode_AsUTF8AndSize(o, length); #endif /* __PYX_DEFAULT_STRING_ENCODING_IS_ASCII */ #endif /* PY_VERSION_HEX < 0x03030000 */ } else #endif /* __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT */ #if PY_VERSION_HEX >= 0x02060000 if (PyByteArray_Check(o)) { *length = PyByteArray_GET_SIZE(o); return PyByteArray_AS_STRING(o); } else #endif { char* result; int r = PyBytes_AsStringAndSize(o, &result, length); if (unlikely(r < 0)) { return NULL; } else { return result; } } } static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject* x) { int is_true = x == Py_True; if (is_true | (x == Py_False) | (x == Py_None)) return is_true; else return PyObject_IsTrue(x); } static CYTHON_INLINE PyObject* __Pyx_PyNumber_Int(PyObject* x) { PyNumberMethods *m; const char *name = NULL; PyObject *res = NULL; #if PY_MAJOR_VERSION < 3 if (PyInt_Check(x) || PyLong_Check(x)) #else if (PyLong_Check(x)) #endif return Py_INCREF(x), x; m = Py_TYPE(x)->tp_as_number; #if PY_MAJOR_VERSION < 3 if (m && m->nb_int) { name = "int"; res = PyNumber_Int(x); } else if (m && m->nb_long) { name = "long"; res = PyNumber_Long(x); } #else if (m && m->nb_int) { name = "int"; res = PyNumber_Long(x); } #endif if (res) { #if PY_MAJOR_VERSION < 3 if (!PyInt_Check(res) && !PyLong_Check(res)) { #else if (!PyLong_Check(res)) { #endif PyErr_Format(PyExc_TypeError, "__%.4s__ returned non-%.4s (type %.200s)", name, name, Py_TYPE(res)->tp_name); Py_DECREF(res); return NULL; } } else if (!PyErr_Occurred()) { PyErr_SetString(PyExc_TypeError, "an integer is required"); } return res; } #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS #include "longintrepr.h" #endif #endif 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))) return PyInt_AS_LONG(b); #endif if (likely(PyLong_CheckExact(b))) { #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS switch (Py_SIZE(b)) { case -1: return -(sdigit)((PyLongObject*)b)->ob_digit[0]; case 0: return 0; case 1: return ((PyLongObject*)b)->ob_digit[0]; } #endif #endif #if PY_VERSION_HEX < 0x02060000 return PyInt_AsSsize_t(b); #else return PyLong_AsSsize_t(b); #endif } 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) { #if PY_VERSION_HEX < 0x02050000 if (ival <= LONG_MAX) return PyInt_FromLong((long)ival); else { unsigned char *bytes = (unsigned char *) &ival; int one = 1; int little = (int)*(unsigned char*)&one; return _PyLong_FromByteArray(bytes, sizeof(size_t), little, 0); } #else return PyInt_FromSize_t(ival); #endif } #endif /* Py_PYTHON_H */ debian/cythonized-files/pandas/index.c0000664000000000000000000276460012275603610015212 0ustar /* Generated by Cython 0.20 on Mon Feb 3 08:41:48 2014 */ #define PY_SSIZE_T_CLEAN #ifndef CYTHON_USE_PYLONG_INTERNALS #ifdef PYLONG_BITS_IN_DIGIT #define CYTHON_USE_PYLONG_INTERNALS 0 #else #include "pyconfig.h" #ifdef PYLONG_BITS_IN_DIGIT #define CYTHON_USE_PYLONG_INTERNALS 1 #else #define CYTHON_USE_PYLONG_INTERNALS 0 #endif #endif #endif #include "Python.h" #ifndef Py_PYTHON_H #error Python headers needed to compile C extensions, please install development version of Python. #elif PY_VERSION_HEX < 0x02040000 #error Cython requires Python 2.4+. #else #define CYTHON_ABI "0_20" #include /* For offsetof */ #ifndef offsetof #define offsetof(type, member) ( (size_t) & ((type*)0) -> member ) #endif #if !defined(WIN32) && !defined(MS_WINDOWS) #ifndef __stdcall #define __stdcall #endif #ifndef __cdecl #define __cdecl #endif #ifndef __fastcall #define __fastcall #endif #endif #ifndef DL_IMPORT #define DL_IMPORT(t) t #endif #ifndef DL_EXPORT #define DL_EXPORT(t) t #endif #ifndef PY_LONG_LONG #define PY_LONG_LONG LONG_LONG #endif #ifndef Py_HUGE_VAL #define Py_HUGE_VAL HUGE_VAL #endif #ifdef PYPY_VERSION #define CYTHON_COMPILING_IN_PYPY 1 #define CYTHON_COMPILING_IN_CPYTHON 0 #else #define CYTHON_COMPILING_IN_PYPY 0 #define CYTHON_COMPILING_IN_CPYTHON 1 #endif #if CYTHON_COMPILING_IN_PYPY #define Py_OptimizeFlag 0 #endif #if PY_VERSION_HEX < 0x02050000 typedef int Py_ssize_t; #define PY_SSIZE_T_MAX INT_MAX #define PY_SSIZE_T_MIN INT_MIN #define PY_FORMAT_SIZE_T "" #define CYTHON_FORMAT_SSIZE_T "" #define PyInt_FromSsize_t(z) PyInt_FromLong(z) #define PyInt_AsSsize_t(o) __Pyx_PyInt_As_int(o) #define PyNumber_Index(o) ((PyNumber_Check(o) && !PyFloat_Check(o)) ? PyNumber_Int(o) : \ (PyErr_Format(PyExc_TypeError, \ "expected index value, got %.200s", Py_TYPE(o)->tp_name), \ (PyObject*)0)) #define __Pyx_PyIndex_Check(o) (PyNumber_Check(o) && !PyFloat_Check(o) && \ !PyComplex_Check(o)) #define PyIndex_Check __Pyx_PyIndex_Check #define PyErr_WarnEx(category, message, stacklevel) PyErr_Warn(category, message) #define __PYX_BUILD_PY_SSIZE_T "i" #else #define __PYX_BUILD_PY_SSIZE_T "n" #define CYTHON_FORMAT_SSIZE_T "z" #define __Pyx_PyIndex_Check PyIndex_Check #endif #if PY_VERSION_HEX < 0x02060000 #define Py_REFCNT(ob) (((PyObject*)(ob))->ob_refcnt) #define Py_TYPE(ob) (((PyObject*)(ob))->ob_type) #define Py_SIZE(ob) (((PyVarObject*)(ob))->ob_size) #define PyVarObject_HEAD_INIT(type, size) \ PyObject_HEAD_INIT(type) size, #define PyType_Modified(t) typedef struct { void *buf; PyObject *obj; Py_ssize_t len; Py_ssize_t itemsize; int readonly; int ndim; char *format; Py_ssize_t *shape; Py_ssize_t *strides; Py_ssize_t *suboffsets; void *internal; } Py_buffer; #define PyBUF_SIMPLE 0 #define PyBUF_WRITABLE 0x0001 #define PyBUF_FORMAT 0x0004 #define PyBUF_ND 0x0008 #define PyBUF_STRIDES (0x0010 | PyBUF_ND) #define PyBUF_C_CONTIGUOUS (0x0020 | PyBUF_STRIDES) #define PyBUF_F_CONTIGUOUS (0x0040 | PyBUF_STRIDES) #define PyBUF_ANY_CONTIGUOUS (0x0080 | PyBUF_STRIDES) #define PyBUF_INDIRECT (0x0100 | PyBUF_STRIDES) #define PyBUF_RECORDS (PyBUF_STRIDES | PyBUF_FORMAT | PyBUF_WRITABLE) #define PyBUF_FULL (PyBUF_INDIRECT | PyBUF_FORMAT | PyBUF_WRITABLE) typedef int (*getbufferproc)(PyObject *, Py_buffer *, int); typedef void (*releasebufferproc)(PyObject *, Py_buffer *); #endif #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, 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 #if PY_VERSION_HEX < 0x02060000 #define PyUnicode_FromString(s) PyUnicode_Decode(s, strlen(s), "UTF-8", "strict") #endif #if PY_MAJOR_VERSION >= 3 #define Py_TPFLAGS_CHECKTYPES 0 #define Py_TPFLAGS_HAVE_INDEX 0 #endif #if (PY_VERSION_HEX < 0x02060000) || (PY_MAJOR_VERSION >= 3) #define Py_TPFLAGS_HAVE_NEWBUFFER 0 #endif #if PY_VERSION_HEX < 0x02060000 #define Py_TPFLAGS_HAVE_VERSION_TAG 0 #endif #if PY_VERSION_HEX < 0x02060000 && !defined(Py_TPFLAGS_IS_ABSTRACT) #define Py_TPFLAGS_IS_ABSTRACT 0 #endif #if PY_VERSION_HEX < 0x030400a1 && !defined(Py_TPFLAGS_HAVE_FINALIZE) #define Py_TPFLAGS_HAVE_FINALIZE 0 #endif #if PY_VERSION_HEX > 0x03030000 && defined(PyUnicode_KIND) #define CYTHON_PEP393_ENABLED 1 #define __Pyx_PyUnicode_READY(op) (likely(PyUnicode_IS_READY(op)) ? \ 0 : _PyUnicode_Ready((PyObject *)(op))) #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_LENGTH(u) #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i) #define __Pyx_PyUnicode_KIND(u) PyUnicode_KIND(u) #define __Pyx_PyUnicode_DATA(u) PyUnicode_DATA(u) #define __Pyx_PyUnicode_READ(k, d, i) PyUnicode_READ(k, d, i) #else #define CYTHON_PEP393_ENABLED 0 #define __Pyx_PyUnicode_READY(op) (0) #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_SIZE(u) #define __Pyx_PyUnicode_READ_CHAR(u, i) ((Py_UCS4)(PyUnicode_AS_UNICODE(u)[i])) #define __Pyx_PyUnicode_KIND(u) (sizeof(Py_UNICODE)) #define __Pyx_PyUnicode_DATA(u) ((void*)PyUnicode_AS_UNICODE(u)) #define __Pyx_PyUnicode_READ(k, d, i) ((void)(k), (Py_UCS4)(((Py_UNICODE*)d)[i])) #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)) #define __Pyx_PyUnicode_Concat(a, b) ((unlikely((a) == Py_None) || unlikely((b) == Py_None)) ? \ PyNumber_Add(a, b) : PyUnicode_Concat(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 #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_VERSION_HEX < 0x02060000 #define PyBytesObject PyStringObject #define PyBytes_Type PyString_Type #define PyBytes_Check PyString_Check #define PyBytes_CheckExact PyString_CheckExact #define PyBytes_FromString PyString_FromString #define PyBytes_FromStringAndSize PyString_FromStringAndSize #define PyBytes_FromFormat PyString_FromFormat #define PyBytes_DecodeEscape PyString_DecodeEscape #define PyBytes_AsString PyString_AsString #define PyBytes_AsStringAndSize PyString_AsStringAndSize #define PyBytes_Size PyString_Size #define PyBytes_AS_STRING PyString_AS_STRING #define PyBytes_GET_SIZE PyString_GET_SIZE #define PyBytes_Repr PyString_Repr #define PyBytes_Concat PyString_Concat #define PyBytes_ConcatAndDel PyString_ConcatAndDel #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_CheckExact(obj) || PyUnicode_CheckExact(obj) || \ PyString_Check(obj) || PyUnicode_Check(obj)) #define __Pyx_PyBaseString_CheckExact(obj) (PyString_CheckExact(obj) || PyUnicode_CheckExact(obj)) #endif #if PY_VERSION_HEX < 0x02060000 #define PySet_Check(obj) PyObject_TypeCheck(obj, &PySet_Type) #define PyFrozenSet_Check(obj) PyObject_TypeCheck(obj, &PyFrozenSet_Type) #endif #ifndef PySet_CheckExact #define PySet_CheckExact(obj) (Py_TYPE(obj) == &PySet_Type) #endif #define __Pyx_TypeCheck(obj, type) PyObject_TypeCheck(obj, (PyTypeObject *)type) #if PY_MAJOR_VERSION >= 3 #define PyIntObject PyLongObject #define PyInt_Type PyLong_Type #define PyInt_Check(op) PyLong_Check(op) #define PyInt_CheckExact(op) PyLong_CheckExact(op) #define PyInt_FromString PyLong_FromString #define PyInt_FromUnicode PyLong_FromUnicode #define PyInt_FromLong PyLong_FromLong #define PyInt_FromSize_t PyLong_FromSize_t #define PyInt_FromSsize_t PyLong_FromSsize_t #define PyInt_AsLong PyLong_AsLong #define PyInt_AS_LONG PyLong_AS_LONG #define PyInt_AsSsize_t PyLong_AsSsize_t #define PyInt_AsUnsignedLongMask PyLong_AsUnsignedLongMask #define PyInt_AsUnsignedLongLongMask PyLong_AsUnsignedLongLongMask #define PyNumber_Int PyNumber_Long #endif #if PY_MAJOR_VERSION >= 3 #define PyBoolObject PyLongObject #endif #if PY_VERSION_HEX < 0x03020000 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) || (PY_VERSION_HEX >= 0x03010300) #define __Pyx_PySequence_GetSlice(obj, a, b) PySequence_GetSlice(obj, a, b) #define __Pyx_PySequence_SetSlice(obj, a, b, value) PySequence_SetSlice(obj, a, b, value) #define __Pyx_PySequence_DelSlice(obj, a, b) PySequence_DelSlice(obj, a, b) #else #define __Pyx_PySequence_GetSlice(obj, a, b) (unlikely(!(obj)) ? \ (PyErr_SetString(PyExc_SystemError, "null argument to internal routine"), (PyObject*)0) : \ (likely((obj)->ob_type->tp_as_mapping) ? (PySequence_GetSlice(obj, a, b)) : \ (PyErr_Format(PyExc_TypeError, "'%.200s' object is unsliceable", (obj)->ob_type->tp_name), (PyObject*)0))) #define __Pyx_PySequence_SetSlice(obj, a, b, value) (unlikely(!(obj)) ? \ (PyErr_SetString(PyExc_SystemError, "null argument to internal routine"), -1) : \ (likely((obj)->ob_type->tp_as_mapping) ? (PySequence_SetSlice(obj, a, b, value)) : \ (PyErr_Format(PyExc_TypeError, "'%.200s' object doesn't support slice assignment", (obj)->ob_type->tp_name), -1))) #define __Pyx_PySequence_DelSlice(obj, a, b) (unlikely(!(obj)) ? \ (PyErr_SetString(PyExc_SystemError, "null argument to internal routine"), -1) : \ (likely((obj)->ob_type->tp_as_mapping) ? (PySequence_DelSlice(obj, a, b)) : \ (PyErr_Format(PyExc_TypeError, "'%.200s' object doesn't support slice deletion", (obj)->ob_type->tp_name), -1))) #endif #if PY_MAJOR_VERSION >= 3 #define PyMethod_New(func, self, klass) ((self) ? PyMethod_New(func, self) : PyInstanceMethod_New(func)) #endif #if PY_VERSION_HEX < 0x02050000 #define __Pyx_GetAttrString(o,n) PyObject_GetAttrString((o),((char *)(n))) #define __Pyx_SetAttrString(o,n,a) PyObject_SetAttrString((o),((char *)(n)),(a)) #define __Pyx_DelAttrString(o,n) PyObject_DelAttrString((o),((char *)(n))) #else #define __Pyx_GetAttrString(o,n) PyObject_GetAttrString((o),(n)) #define __Pyx_SetAttrString(o,n,a) PyObject_SetAttrString((o),(n),(a)) #define __Pyx_DelAttrString(o,n) PyObject_DelAttrString((o),(n)) #endif #if PY_VERSION_HEX < 0x02050000 #define __Pyx_NAMESTR(n) ((char *)(n)) #define __Pyx_DOCSTR(n) ((char *)(n)) #else #define __Pyx_NAMESTR(n) (n) #define __Pyx_DOCSTR(n) (n) #endif #ifndef CYTHON_INLINE #if defined(__GNUC__) #define CYTHON_INLINE __inline__ #elif defined(_MSC_VER) #define CYTHON_INLINE __inline #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L #define CYTHON_INLINE inline #else #define CYTHON_INLINE #endif #endif #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 #ifdef NAN #define __PYX_NAN() ((float) NAN) #else static CYTHON_INLINE float __PYX_NAN() { /* Initialize NaN. The sign is irrelevant, an exponent with all bits 1 and a nonzero mantissa means NaN. If the first bit in the mantissa is 1, it is a quiet NaN. */ float value; memset(&value, 0xFF, sizeof(value)); return value; } #endif #if PY_MAJOR_VERSION >= 3 #define __Pyx_PyNumber_Divide(x,y) PyNumber_TrueDivide(x,y) #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceTrueDivide(x,y) #else #define __Pyx_PyNumber_Divide(x,y) PyNumber_Divide(x,y) #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceDivide(x,y) #endif #ifndef __PYX_EXTERN_C #ifdef __cplusplus #define __PYX_EXTERN_C extern "C" #else #define __PYX_EXTERN_C extern #endif #endif #if defined(WIN32) || defined(MS_WINDOWS) #define _USE_MATH_DEFINES #endif #include #define __PYX_HAVE__pandas__index #define __PYX_HAVE_API__pandas__index #include "string.h" #include "stdio.h" #include "stdlib.h" #include "numpy/arrayobject.h" #include "numpy/ufuncobject.h" #include "pythread.h" #include "numpy_helper.h" #include "khash_python.h" #include "headers/stdint.h" #include "datetime.h" #include "datetime_helper.h" #include "numpy/ndarrayobject.h" #include "numpy/npy_common.h" #include "datetime/np_datetime.h" #include "datetime/np_datetime_strings.h" #ifdef _OPENMP #include #endif /* _OPENMP */ #ifdef PYREX_WITHOUT_ASSERTIONS #define CYTHON_WITHOUT_ASSERTIONS #endif #ifndef CYTHON_UNUSED # if defined(__GNUC__) # if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)) # define CYTHON_UNUSED __attribute__ ((__unused__)) # else # define CYTHON_UNUSED # endif # elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER)) # define CYTHON_UNUSED __attribute__ ((__unused__)) # else # define CYTHON_UNUSED # endif #endif typedef struct {PyObject **p; char *s; const Py_ssize_t n; const char* encoding; const char is_unicode; const char is_str; const char intern; } __Pyx_StringTabEntry; /*proto*/ #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_fits_Py_ssize_t(v, type, is_signed) ( \ (sizeof(type) < sizeof(Py_ssize_t)) || \ (sizeof(type) > sizeof(Py_ssize_t) && \ likely(v < (type)PY_SSIZE_T_MAX || \ v == (type)PY_SSIZE_T_MAX) && \ (!is_signed || likely(v > (type)PY_SSIZE_T_MIN || \ v == (type)PY_SSIZE_T_MIN))) || \ (sizeof(type) == sizeof(Py_ssize_t) && \ (is_signed || likely(v < (type)PY_SSIZE_T_MAX || \ v == (type)PY_SSIZE_T_MAX))) ) static CYTHON_INLINE char* __Pyx_PyObject_AsString(PyObject*); static CYTHON_INLINE char* __Pyx_PyObject_AsStringAndSize(PyObject*, Py_ssize_t* length); #define __Pyx_PyByteArray_FromString(s) PyByteArray_FromStringAndSize((const char*)s, strlen((const char*)s)) #define __Pyx_PyByteArray_FromStringAndSize(s, l) PyByteArray_FromStringAndSize((const char*)s, l) #define __Pyx_PyBytes_FromString PyBytes_FromString #define __Pyx_PyBytes_FromStringAndSize PyBytes_FromStringAndSize static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(char*); #if PY_MAJOR_VERSION < 3 #define __Pyx_PyStr_FromString __Pyx_PyBytes_FromString #define __Pyx_PyStr_FromStringAndSize __Pyx_PyBytes_FromStringAndSize #else #define __Pyx_PyStr_FromString __Pyx_PyUnicode_FromString #define __Pyx_PyStr_FromStringAndSize __Pyx_PyUnicode_FromStringAndSize #endif #define __Pyx_PyObject_AsSString(s) ((signed char*) __Pyx_PyObject_AsString(s)) #define __Pyx_PyObject_AsUString(s) ((unsigned char*) __Pyx_PyObject_AsString(s)) #define __Pyx_PyObject_FromUString(s) __Pyx_PyObject_FromString((char*)s) #define __Pyx_PyBytes_FromUString(s) __Pyx_PyBytes_FromString((char*)s) #define __Pyx_PyByteArray_FromUString(s) __Pyx_PyByteArray_FromString((char*)s) #define __Pyx_PyStr_FromUString(s) __Pyx_PyStr_FromString((char*)s) #define __Pyx_PyUnicode_FromUString(s) __Pyx_PyUnicode_FromString((char*)s) #if PY_MAJOR_VERSION < 3 static CYTHON_INLINE size_t __Pyx_Py_UNICODE_strlen(const Py_UNICODE *u) { const Py_UNICODE *u_end = u; while (*u_end++) ; return u_end - u - 1; } #else #define __Pyx_Py_UNICODE_strlen Py_UNICODE_strlen #endif #define __Pyx_PyUnicode_FromUnicode(u) PyUnicode_FromUnicode(u, __Pyx_Py_UNICODE_strlen(u)) #define __Pyx_PyUnicode_FromUnicodeAndLength PyUnicode_FromUnicode #define __Pyx_PyUnicode_AsUnicode PyUnicode_AsUnicode #define __Pyx_Owned_Py_None(b) (Py_INCREF(Py_None), Py_None) #define __Pyx_PyBool_FromLong(b) ((b) ? (Py_INCREF(Py_True), Py_True) : (Py_INCREF(Py_False), Py_False)) static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*); static CYTHON_INLINE PyObject* __Pyx_PyNumber_Int(PyObject* x); static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*); static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t); #if CYTHON_COMPILING_IN_CPYTHON #define __pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x)) #else #define __pyx_PyFloat_AsDouble(x) PyFloat_AsDouble(x) #endif #define __pyx_PyFloat_AsFloat(x) ((float) __pyx_PyFloat_AsDouble(x)) #if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII static int __Pyx_sys_getdefaultencoding_not_ascii; static int __Pyx_init_sys_getdefaultencoding_params(void) { PyObject* sys = NULL; PyObject* default_encoding = NULL; PyObject* ascii_chars_u = NULL; PyObject* ascii_chars_b = NULL; sys = PyImport_ImportModule("sys"); if (sys == NULL) goto bad; default_encoding = PyObject_CallMethod(sys, (char*) (const char*) "getdefaultencoding", NULL); if (default_encoding == NULL) goto bad; if (strcmp(PyBytes_AsString(default_encoding), "ascii") == 0) { __Pyx_sys_getdefaultencoding_not_ascii = 0; } else { const char* default_encoding_c = PyBytes_AS_STRING(default_encoding); 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 == NULL) goto bad; ascii_chars_b = PyUnicode_AsEncodedString(ascii_chars_u, default_encoding_c, NULL); if (ascii_chars_b == NULL || strncmp(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_XDECREF(sys); Py_XDECREF(default_encoding); Py_XDECREF(ascii_chars_u); Py_XDECREF(ascii_chars_b); return 0; bad: Py_XDECREF(sys); 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 = NULL; PyObject* default_encoding = NULL; char* default_encoding_c; sys = PyImport_ImportModule("sys"); if (sys == NULL) goto bad; default_encoding = PyObject_CallMethod(sys, (char*) (const char*) "getdefaultencoding", NULL); if (default_encoding == NULL) goto bad; default_encoding_c = PyBytes_AS_STRING(default_encoding); __PYX_DEFAULT_STRING_ENCODING = (char*) malloc(strlen(default_encoding_c)); strcpy(__PYX_DEFAULT_STRING_ENCODING, default_encoding_c); Py_DECREF(sys); Py_DECREF(default_encoding); return 0; bad: Py_XDECREF(sys); Py_XDECREF(default_encoding); return -1; } #endif #endif #ifdef __GNUC__ /* Test for GCC > 2.95 */ #if __GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95)) #define likely(x) __builtin_expect(!!(x), 1) #define unlikely(x) __builtin_expect(!!(x), 0) #else /* __GNUC__ > 2 ... */ #define likely(x) (x) #define unlikely(x) (x) #endif /* __GNUC__ > 2 ... */ #else /* __GNUC__ */ #define likely(x) (x) #define unlikely(x) (x) #endif /* __GNUC__ */ static PyObject *__pyx_m; static PyObject *__pyx_d; static PyObject *__pyx_b; static PyObject *__pyx_empty_tuple; static PyObject *__pyx_empty_bytes; static int __pyx_lineno; static int __pyx_clineno = 0; static const char * __pyx_cfilenm= __FILE__; static const char *__pyx_filename; #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[] = { "index.pyx", "datetime.pxd", "numpy.pxd", "util.pxd", "type.pxd", "bool.pxd", "complex.pxd", "hashtable.pxd", }; #define IS_UNSIGNED(type) (((type) -1) > 0) struct __Pyx_StructField_; #define __PYX_BUF_FLAGS_PACKED_STRUCT (1 << 0) typedef struct { const char* name; /* for error messages only */ struct __Pyx_StructField_* fields; size_t size; /* sizeof(type) */ size_t arraysize[8]; /* length of array in each dimension */ int ndim; char typegroup; /* _R_eal, _C_omplex, Signed _I_nt, _U_nsigned int, _S_truct, _P_ointer, _O_bject, c_H_ar */ 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; /* "numpy.pxd":726 * # 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; /* "numpy.pxd":727 * * 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; /* "numpy.pxd":728 * 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; /* "numpy.pxd":729 * 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; /* "numpy.pxd":733 * #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; /* "numpy.pxd":734 * * 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; /* "numpy.pxd":735 * 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; /* "numpy.pxd":736 * 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; /* "numpy.pxd":740 * #ctypedef npy_uint128 uint128_t * * ctypedef npy_float16 float16_t # <<<<<<<<<<<<<< * ctypedef npy_float32 float32_t * ctypedef npy_float64 float64_t */ typedef npy_float16 __pyx_t_5numpy_float16_t; /* "numpy.pxd":741 * * ctypedef npy_float16 float16_t * ctypedef npy_float32 float32_t # <<<<<<<<<<<<<< * ctypedef npy_float64 float64_t * #ctypedef npy_float80 float80_t */ typedef npy_float32 __pyx_t_5numpy_float32_t; /* "numpy.pxd":742 * ctypedef npy_float16 float16_t * 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; /* "numpy.pxd":751 * # 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; /* "numpy.pxd":752 * # 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; /* "numpy.pxd":753 * 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; /* "numpy.pxd":755 * 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; /* "numpy.pxd":756 * * ctypedef npy_ulong uint_t * ctypedef npy_ulonglong ulong_t # <<<<<<<<<<<<<< * ctypedef npy_ulonglong ulonglong_t * */ typedef npy_ulonglong __pyx_t_5numpy_ulong_t; /* "numpy.pxd":757 * 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; /* "numpy.pxd":759 * ctypedef npy_ulonglong ulonglong_t * * ctypedef npy_intp intp_t # <<<<<<<<<<<<<< * ctypedef npy_uintp uintp_t * */ typedef npy_intp __pyx_t_5numpy_intp_t; /* "numpy.pxd":760 * * ctypedef npy_intp intp_t * ctypedef npy_uintp uintp_t # <<<<<<<<<<<<<< * * ctypedef npy_double float_t */ typedef npy_uintp __pyx_t_5numpy_uintp_t; /* "numpy.pxd":762 * 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; /* "numpy.pxd":763 * * ctypedef npy_double float_t * ctypedef npy_double double_t # <<<<<<<<<<<<<< * ctypedef npy_longdouble longdouble_t * */ typedef npy_double __pyx_t_5numpy_double_t; /* "numpy.pxd":764 * 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; #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 #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 /*--- Type declarations ---*/ struct __pyx_obj_6pandas_5index_IndexEngine; struct __pyx_obj_6pandas_5index_Int64Engine; struct __pyx_obj_6pandas_9hashtable_HashTable; struct __pyx_obj_6pandas_9hashtable_Float64HashTable; struct __pyx_obj_6pandas_5index_Float64Engine; struct __pyx_obj_6pandas_5index_DatetimeEngine; struct __pyx_obj_6pandas_9hashtable_PyObjectHashTable; struct __pyx_obj_6pandas_9hashtable_Int64HashTable; struct __pyx_obj_6pandas_5index_ObjectEngine; /* "numpy.pxd":766 * 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; /* "numpy.pxd":767 * * ctypedef npy_cfloat cfloat_t * ctypedef npy_cdouble cdouble_t # <<<<<<<<<<<<<< * ctypedef npy_clongdouble clongdouble_t * */ typedef npy_cdouble __pyx_t_5numpy_cdouble_t; /* "numpy.pxd":768 * 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; /* "numpy.pxd":770 * 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/index.pyx":70 * * * cdef class IndexEngine: # <<<<<<<<<<<<<< * * cdef readonly: */ struct __pyx_obj_6pandas_5index_IndexEngine { PyObject_HEAD struct __pyx_vtabstruct_6pandas_5index_IndexEngine *__pyx_vtab; PyObject *vgetter; struct __pyx_obj_6pandas_9hashtable_HashTable *mapping; int over_size_threshold; int unique; int monotonic; int initialized; int monotonic_check; int unique_check; }; /* "pandas/index.pyx":335 * return result[0:count], missing[0:count_missing] * * cdef class Int64Engine(IndexEngine): # <<<<<<<<<<<<<< * * cdef _get_index_values(self): */ struct __pyx_obj_6pandas_5index_Int64Engine { struct __pyx_obj_6pandas_5index_IndexEngine __pyx_base; }; /* "hashtable.pxd":5 * # prototypes for sharing * * cdef class HashTable: # <<<<<<<<<<<<<< * pass * */ struct __pyx_obj_6pandas_9hashtable_HashTable { PyObject_HEAD }; /* "hashtable.pxd":15 * * * cdef class Float64HashTable(HashTable): # <<<<<<<<<<<<<< * cdef kh_float64_t *table * */ struct __pyx_obj_6pandas_9hashtable_Float64HashTable { struct __pyx_obj_6pandas_9hashtable_HashTable __pyx_base; kh_float64_t *table; }; /* "pandas/index.pyx":394 * return result * * cdef class Float64Engine(IndexEngine): # <<<<<<<<<<<<<< * * cdef _make_hash_table(self, n): */ struct __pyx_obj_6pandas_5index_Float64Engine { struct __pyx_obj_6pandas_5index_IndexEngine __pyx_base; }; /* "pandas/index.pyx":465 * * * cdef class DatetimeEngine(Int64Engine): # <<<<<<<<<<<<<< * * def __contains__(self, object val): */ struct __pyx_obj_6pandas_5index_DatetimeEngine { struct __pyx_obj_6pandas_5index_Int64Engine __pyx_base; }; /* "hashtable.pxd":21 * # cpdef set_item(self, float64_t key, Py_ssize_t val) * * cdef class PyObjectHashTable(HashTable): # <<<<<<<<<<<<<< * cdef kh_pymap_t *table * */ struct __pyx_obj_6pandas_9hashtable_PyObjectHashTable { struct __pyx_obj_6pandas_9hashtable_HashTable __pyx_base; struct __pyx_vtabstruct_6pandas_9hashtable_PyObjectHashTable *__pyx_vtab; kh_pymap_t *table; }; /* "hashtable.pxd":8 * pass * * cdef class Int64HashTable(HashTable): # <<<<<<<<<<<<<< * cdef kh_int64_t *table * */ struct __pyx_obj_6pandas_9hashtable_Int64HashTable { struct __pyx_obj_6pandas_9hashtable_HashTable __pyx_base; struct __pyx_vtabstruct_6pandas_9hashtable_Int64HashTable *__pyx_vtab; kh_int64_t *table; }; /* "pandas/index.pyx":448 * } * * cdef class ObjectEngine(IndexEngine): # <<<<<<<<<<<<<< * * cdef _make_hash_table(self, n): */ struct __pyx_obj_6pandas_5index_ObjectEngine { struct __pyx_obj_6pandas_5index_IndexEngine __pyx_base; }; /* "pandas/index.pyx":70 * * * cdef class IndexEngine: # <<<<<<<<<<<<<< * * cdef readonly: */ struct __pyx_vtabstruct_6pandas_5index_IndexEngine { PyObject *(*get_value)(struct __pyx_obj_6pandas_5index_IndexEngine *, PyArrayObject *, PyObject *, int __pyx_skip_dispatch); PyObject *(*set_value)(struct __pyx_obj_6pandas_5index_IndexEngine *, PyArrayObject *, PyObject *, PyObject *, int __pyx_skip_dispatch); PyObject *(*get_loc)(struct __pyx_obj_6pandas_5index_IndexEngine *, PyObject *, int __pyx_skip_dispatch); PyObject *(*_get_loc_duplicates)(struct __pyx_obj_6pandas_5index_IndexEngine *, PyObject *); PyObject *(*_maybe_get_bool_indexer)(struct __pyx_obj_6pandas_5index_IndexEngine *, PyObject *); PyObject *(*_do_monotonic_check)(struct __pyx_obj_6pandas_5index_IndexEngine *); PyObject *(*_get_index_values)(struct __pyx_obj_6pandas_5index_IndexEngine *); PyObject *(*_do_unique_check)(struct __pyx_obj_6pandas_5index_IndexEngine *); PyObject *(*_make_hash_table)(struct __pyx_obj_6pandas_5index_IndexEngine *, PyObject *); PyObject *(*_check_type)(struct __pyx_obj_6pandas_5index_IndexEngine *, PyObject *); PyObject *(*_ensure_mapping_populated)(struct __pyx_obj_6pandas_5index_IndexEngine *); PyObject *(*initialize)(struct __pyx_obj_6pandas_5index_IndexEngine *); }; static struct __pyx_vtabstruct_6pandas_5index_IndexEngine *__pyx_vtabptr_6pandas_5index_IndexEngine; static CYTHON_INLINE PyObject *__pyx_f_6pandas_5index_11IndexEngine__get_loc_duplicates(struct __pyx_obj_6pandas_5index_IndexEngine *, PyObject *); static CYTHON_INLINE PyObject *__pyx_f_6pandas_5index_11IndexEngine__do_monotonic_check(struct __pyx_obj_6pandas_5index_IndexEngine *); static CYTHON_INLINE PyObject *__pyx_f_6pandas_5index_11IndexEngine__do_unique_check(struct __pyx_obj_6pandas_5index_IndexEngine *); static CYTHON_INLINE PyObject *__pyx_f_6pandas_5index_11IndexEngine__ensure_mapping_populated(struct __pyx_obj_6pandas_5index_IndexEngine *); /* "pandas/index.pyx":394 * return result * * cdef class Float64Engine(IndexEngine): # <<<<<<<<<<<<<< * * cdef _make_hash_table(self, n): */ struct __pyx_vtabstruct_6pandas_5index_Float64Engine { struct __pyx_vtabstruct_6pandas_5index_IndexEngine __pyx_base; }; static struct __pyx_vtabstruct_6pandas_5index_Float64Engine *__pyx_vtabptr_6pandas_5index_Float64Engine; /* "pandas/index.pyx":335 * return result[0:count], missing[0:count_missing] * * cdef class Int64Engine(IndexEngine): # <<<<<<<<<<<<<< * * cdef _get_index_values(self): */ struct __pyx_vtabstruct_6pandas_5index_Int64Engine { struct __pyx_vtabstruct_6pandas_5index_IndexEngine __pyx_base; }; static struct __pyx_vtabstruct_6pandas_5index_Int64Engine *__pyx_vtabptr_6pandas_5index_Int64Engine; /* "pandas/index.pyx":465 * * * cdef class DatetimeEngine(Int64Engine): # <<<<<<<<<<<<<< * * def __contains__(self, object val): */ struct __pyx_vtabstruct_6pandas_5index_DatetimeEngine { struct __pyx_vtabstruct_6pandas_5index_Int64Engine __pyx_base; PyObject *(*_date_check_type)(struct __pyx_obj_6pandas_5index_DatetimeEngine *, PyObject *); }; static struct __pyx_vtabstruct_6pandas_5index_DatetimeEngine *__pyx_vtabptr_6pandas_5index_DatetimeEngine; static CYTHON_INLINE PyObject *__pyx_f_6pandas_5index_14DatetimeEngine__date_check_type(struct __pyx_obj_6pandas_5index_DatetimeEngine *, PyObject *); /* "pandas/index.pyx":448 * } * * cdef class ObjectEngine(IndexEngine): # <<<<<<<<<<<<<< * * cdef _make_hash_table(self, n): */ struct __pyx_vtabstruct_6pandas_5index_ObjectEngine { struct __pyx_vtabstruct_6pandas_5index_IndexEngine __pyx_base; }; static struct __pyx_vtabstruct_6pandas_5index_ObjectEngine *__pyx_vtabptr_6pandas_5index_ObjectEngine; /* "hashtable.pxd":8 * pass * * cdef class Int64HashTable(HashTable): # <<<<<<<<<<<<<< * cdef kh_int64_t *table * */ struct __pyx_vtabstruct_6pandas_9hashtable_Int64HashTable { PyObject *(*get_item)(struct __pyx_obj_6pandas_9hashtable_Int64HashTable *, __pyx_t_5numpy_int64_t, int __pyx_skip_dispatch); PyObject *(*set_item)(struct __pyx_obj_6pandas_9hashtable_Int64HashTable *, __pyx_t_5numpy_int64_t, Py_ssize_t, int __pyx_skip_dispatch); }; static struct __pyx_vtabstruct_6pandas_9hashtable_Int64HashTable *__pyx_vtabptr_6pandas_9hashtable_Int64HashTable; /* "hashtable.pxd":21 * # cpdef set_item(self, float64_t key, Py_ssize_t val) * * cdef class PyObjectHashTable(HashTable): # <<<<<<<<<<<<<< * cdef kh_pymap_t *table * */ struct __pyx_vtabstruct_6pandas_9hashtable_PyObjectHashTable { PyObject *(*get_item)(struct __pyx_obj_6pandas_9hashtable_PyObjectHashTable *, PyObject *, int __pyx_skip_dispatch); PyObject *(*set_item)(struct __pyx_obj_6pandas_9hashtable_PyObjectHashTable *, PyObject *, Py_ssize_t, int __pyx_skip_dispatch); }; static struct __pyx_vtabstruct_6pandas_9hashtable_PyObjectHashTable *__pyx_vtabptr_6pandas_9hashtable_PyObjectHashTable; #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); /*proto*/ #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 /* CYTHON_REFNANNY */ #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) #if CYTHON_COMPILING_IN_CPYTHON static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name) { PyTypeObject* tp = Py_TYPE(obj); if (likely(tp->tp_getattro)) return tp->tp_getattro(obj, attr_name); #if PY_MAJOR_VERSION < 3 if (likely(tp->tp_getattr)) return tp->tp_getattr(obj, PyString_AS_STRING(attr_name)); #endif return PyObject_GetAttr(obj, attr_name); } #else #define __Pyx_PyObject_GetAttrStr(o,n) PyObject_GetAttr(o,n) #endif static PyObject *__Pyx_GetBuiltinName(PyObject *name); /*proto*/ static CYTHON_INLINE void __Pyx_ExceptionSave(PyObject **type, PyObject **value, PyObject **tb); /*proto*/ static void __Pyx_ExceptionReset(PyObject *type, PyObject *value, PyObject *tb); /*proto*/ static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb); /*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); /*proto*/ static void __Pyx_RaiseDoubleKeywordsError(const char* func_name, PyObject* kw_name); /*proto*/ static int __Pyx_ParseOptionalKeywords(PyObject *kwds, PyObject **argnames[], \ PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args, \ const char* function_name); /*proto*/ static CYTHON_INLINE int __Pyx_ArgTypeTest(PyObject *obj, PyTypeObject *type, int none_allowed, const char *name, int exact); /*proto*/ static CYTHON_INLINE PyObject *__Pyx_GetModuleGlobalName(PyObject *name); /*proto*/ static CYTHON_INLINE int __Pyx_PySequence_Contains(PyObject* item, PyObject* seq, int eq) { int result = PySequence_Contains(seq, item); return unlikely(result < 0) ? result : (result == (eq == Py_EQ)); } static CYTHON_INLINE void __Pyx_ErrRestore(PyObject *type, PyObject *value, PyObject *tb); /*proto*/ static CYTHON_INLINE void __Pyx_ErrFetch(PyObject **type, PyObject **value, PyObject **tb); /*proto*/ static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause); /*proto*/ static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type); /*proto*/ static CYTHON_INLINE int __Pyx_GetBufferAndValidate(Py_buffer* buf, PyObject* obj, __Pyx_TypeInfo* dtype, int flags, int nd, int cast, __Pyx_BufFmt_StackElem* stack); static CYTHON_INLINE void __Pyx_SafeReleaseBuffer(Py_buffer* info); static void __Pyx_RaiseBufferFallbackError(void); /*proto*/ static void __Pyx_RaiseBufferIndexError(int axis); /*proto*/ #define __Pyx_BufPtrStrided1d(type, buf, i0, s0) (type)((char*)buf + i0 * s0) static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected); static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index); static CYTHON_INLINE int __Pyx_IterFinish(void); /*proto*/ static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected); /*proto*/ #if PY_VERSION_HEX < 0x02050000 #ifndef PyAnySet_CheckExact #define PyAnySet_CheckExact(ob) \ ((ob)->ob_type == &PySet_Type || \ (ob)->ob_type == &PyFrozenSet_Type) #define PySet_New(iterable) \ PyObject_CallFunctionObjArgs((PyObject *)&PySet_Type, (iterable), NULL) #define Pyx_PyFrozenSet_New(iterable) \ PyObject_CallFunctionObjArgs((PyObject *)&PyFrozenSet_Type, (iterable), NULL) #define PySet_Size(anyset) \ PyObject_Size((anyset)) #define PySet_Contains(anyset, key) \ PySequence_Contains((anyset), (key)) #define PySet_Pop(set) \ PyObject_CallMethod((set), (char*)"pop", NULL) static CYTHON_INLINE int PySet_Clear(PyObject *set) { PyObject *ret = PyObject_CallMethod(set, (char*)"clear", NULL); if (!ret) return -1; Py_DECREF(ret); return 0; } static CYTHON_INLINE int PySet_Discard(PyObject *set, PyObject *key) { PyObject *ret = PyObject_CallMethod(set, (char*)"discard", (char*)"(O)", key); if (!ret) return -1; Py_DECREF(ret); return 0; } static CYTHON_INLINE int PySet_Add(PyObject *set, PyObject *key) { PyObject *ret = PyObject_CallMethod(set, (char*)"add", (char*)"(O)", key); if (!ret) return -1; Py_DECREF(ret); return 0; } #endif /* PyAnySet_CheckExact (<= Py2.4) */ #endif /* < Py2.5 */ static CYTHON_INLINE int __Pyx_PyDict_Contains(PyObject* item, PyObject* dict, int eq) { int result = PyDict_Contains(dict, item); return unlikely(result < 0) ? result : (result == (eq == Py_EQ)); } #if CYTHON_COMPILING_IN_CPYTHON static CYTHON_INLINE int __Pyx_PyList_Append(PyObject* list, PyObject* x) { PyListObject* L = (PyListObject*) list; Py_ssize_t len = Py_SIZE(list); if (likely(L->allocated > len) & likely(len > (L->allocated >> 1))) { Py_INCREF(x); PyList_SET_ITEM(list, len, x); Py_SIZE(list) = len+1; return 0; } return PyList_Append(list, x); } #else #define __Pyx_PyList_Append(L,x) PyList_Append(L,x) #endif static PyObject* __Pyx_PyObject_CallMethodTuple(PyObject* obj, PyObject* method_name, PyObject* args) { PyObject *method, *result = NULL; if (unlikely(!args)) return NULL; method = __Pyx_PyObject_GetAttrStr(obj, method_name); if (unlikely(!method)) goto bad; result = PyObject_Call(method, args, NULL); Py_DECREF(method); bad: Py_DECREF(args); return result; } #define __Pyx_PyObject_CallMethod3(obj, name, arg1, arg2, arg3) \ __Pyx_PyObject_CallMethodTuple(obj, name, PyTuple_Pack(3, arg1, arg2, arg3)) #define __Pyx_PyObject_CallMethod2(obj, name, arg1, arg2) \ __Pyx_PyObject_CallMethodTuple(obj, name, PyTuple_Pack(2, arg1, arg2)) #define __Pyx_PyObject_CallMethod1(obj, name, arg1) \ __Pyx_PyObject_CallMethodTuple(obj, name, PyTuple_Pack(1, arg1)) #define __Pyx_PyObject_CallMethod0(obj, name) \ __Pyx_PyObject_CallMethodTuple(obj, name, (Py_INCREF(__pyx_empty_tuple), __pyx_empty_tuple)) static CYTHON_INLINE int __Pyx_PyObject_Append(PyObject* L, PyObject* x); /*proto*/ #if PY_MAJOR_VERSION >= 3 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; } #else #define __Pyx_PyDict_GetItem(d, key) PyObject_GetItem(d, key) #endif static CYTHON_INLINE PyObject* __Pyx_PyObject_GetSlice( PyObject* obj, Py_ssize_t cstart, Py_ssize_t cstop, PyObject** py_start, PyObject** py_stop, PyObject** py_slice, int has_cstart, int has_cstop, int wraparound); static CYTHON_INLINE Py_ssize_t __Pyx_div_Py_ssize_t(Py_ssize_t, Py_ssize_t); /* proto */ #include static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals); /*proto*/ static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals); /*proto*/ #if PY_MAJOR_VERSION >= 3 #define __Pyx_PyString_Equals __Pyx_PyUnicode_Equals #else #define __Pyx_PyString_Equals __Pyx_PyBytes_Equals #endif static CYTHON_INLINE PyObject *__Pyx_GetAttr(PyObject *, PyObject *); /*proto*/ static CYTHON_INLINE PyObject *__Pyx_GetAttr3(PyObject *, PyObject *, PyObject *); /*proto*/ static void __Pyx_WriteUnraisable(const char *name, int clineno, int lineno, const char *filename, int full_traceback); /*proto*/ static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void); static int __Pyx_SetVtable(PyObject *dict, void *vtable); /*proto*/ static void* __Pyx_GetVtable(PyObject *dict); /*proto*/ static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name); /*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 static Py_ssize_t __Pyx_zeros[] = {0, 0, 0, 0, 0, 0, 0, 0}; static Py_ssize_t __Pyx_minusones[] = {-1, -1, -1, -1, -1, -1, -1, -1}; static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level); /*proto*/ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value); static CYTHON_INLINE npy_int64 __Pyx_PyInt_As_npy_int64(PyObject *); static CYTHON_INLINE PyObject* __Pyx_PyInt_From_npy_int64(npy_int64 value); static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *); static CYTHON_INLINE npy_int32 __Pyx_PyInt_As_npy_int32(PyObject *); #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(_WIN32) || defined(__clang__)) && defined(__cplusplus) && CYTHON_CCOMPLEX #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 static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float, float); #if CYTHON_CCOMPLEX #define __Pyx_c_eqf(a, b) ((a)==(b)) #define __Pyx_c_sumf(a, b) ((a)+(b)) #define __Pyx_c_difff(a, b) ((a)-(b)) #define __Pyx_c_prodf(a, b) ((a)*(b)) #define __Pyx_c_quotf(a, b) ((a)/(b)) #define __Pyx_c_negf(a) (-(a)) #ifdef __cplusplus #define __Pyx_c_is_zerof(z) ((z)==(float)0) #define __Pyx_c_conjf(z) (::std::conj(z)) #if 1 #define __Pyx_c_absf(z) (::std::abs(z)) #define __Pyx_c_powf(a, b) (::std::pow(a, b)) #endif #else #define __Pyx_c_is_zerof(z) ((z)==0) #define __Pyx_c_conjf(z) (conjf(z)) #if 1 #define __Pyx_c_absf(z) (cabsf(z)) #define __Pyx_c_powf(a, b) (cpowf(a, b)) #endif #endif #else static CYTHON_INLINE int __Pyx_c_eqf(__pyx_t_float_complex, __pyx_t_float_complex); static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_sumf(__pyx_t_float_complex, __pyx_t_float_complex); static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_difff(__pyx_t_float_complex, __pyx_t_float_complex); static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_prodf(__pyx_t_float_complex, __pyx_t_float_complex); static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_quotf(__pyx_t_float_complex, __pyx_t_float_complex); static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_negf(__pyx_t_float_complex); static CYTHON_INLINE int __Pyx_c_is_zerof(__pyx_t_float_complex); static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_conjf(__pyx_t_float_complex); #if 1 static CYTHON_INLINE float __Pyx_c_absf(__pyx_t_float_complex); static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_powf(__pyx_t_float_complex, __pyx_t_float_complex); #endif #endif static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double, double); #if CYTHON_CCOMPLEX #define __Pyx_c_eq(a, b) ((a)==(b)) #define __Pyx_c_sum(a, b) ((a)+(b)) #define __Pyx_c_diff(a, b) ((a)-(b)) #define __Pyx_c_prod(a, b) ((a)*(b)) #define __Pyx_c_quot(a, b) ((a)/(b)) #define __Pyx_c_neg(a) (-(a)) #ifdef __cplusplus #define __Pyx_c_is_zero(z) ((z)==(double)0) #define __Pyx_c_conj(z) (::std::conj(z)) #if 1 #define __Pyx_c_abs(z) (::std::abs(z)) #define __Pyx_c_pow(a, b) (::std::pow(a, b)) #endif #else #define __Pyx_c_is_zero(z) ((z)==0) #define __Pyx_c_conj(z) (conj(z)) #if 1 #define __Pyx_c_abs(z) (cabs(z)) #define __Pyx_c_pow(a, b) (cpow(a, b)) #endif #endif #else static CYTHON_INLINE int __Pyx_c_eq(__pyx_t_double_complex, __pyx_t_double_complex); static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_sum(__pyx_t_double_complex, __pyx_t_double_complex); static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_diff(__pyx_t_double_complex, __pyx_t_double_complex); static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_prod(__pyx_t_double_complex, __pyx_t_double_complex); static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_quot(__pyx_t_double_complex, __pyx_t_double_complex); static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_neg(__pyx_t_double_complex); static CYTHON_INLINE int __Pyx_c_is_zero(__pyx_t_double_complex); static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_conj(__pyx_t_double_complex); #if 1 static CYTHON_INLINE double __Pyx_c_abs(__pyx_t_double_complex); static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_pow(__pyx_t_double_complex, __pyx_t_double_complex); #endif #endif static CYTHON_INLINE PyObject* __Pyx_PyInt_From_ptrdiff_t(ptrdiff_t value); static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value); static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *); static int __Pyx_check_binary_version(void); #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 static PyObject *__Pyx_ImportModule(const char *name); /*proto*/ static PyTypeObject *__Pyx_ImportType(const char *module_name, const char *class_name, size_t size, int strict); /*proto*/ typedef struct { int code_line; PyCodeObject* code_object; } __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); static void __Pyx_AddTraceback(const char *funcname, int c_line, int py_line, const char *filename); /*proto*/ static int __Pyx_InitStrings(__Pyx_StringTabEntry *t); /*proto*/ /* Module declarations from 'cpython.buffer' */ /* Module declarations from 'cpython.ref' */ /* Module declarations from 'libc.string' */ /* Module declarations from 'libc.stdio' */ /* Module declarations from 'cpython.object' */ /* Module declarations from 'libc.stdlib' */ /* 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*/ /* Module declarations from 'cython' */ /* Module declarations from 'cpython.version' */ /* Module declarations from 'cpython.exc' */ /* Module declarations from 'cpython.module' */ /* Module declarations from 'cpython.mem' */ /* Module declarations from 'cpython.tuple' */ /* Module declarations from 'cpython.list' */ /* Module declarations from 'cpython.sequence' */ /* Module declarations from 'cpython.mapping' */ /* Module declarations from 'cpython.iterator' */ /* Module declarations from '__builtin__' */ /* Module declarations from 'cpython.type' */ static PyTypeObject *__pyx_ptype_7cpython_4type_type = 0; /* Module declarations from 'cpython.number' */ /* Module declarations from 'cpython.int' */ /* Module declarations from '__builtin__' */ /* Module declarations from 'cpython.bool' */ static PyTypeObject *__pyx_ptype_7cpython_4bool_bool = 0; /* Module declarations from 'cpython.long' */ /* Module declarations from 'cpython.float' */ /* Module declarations from '__builtin__' */ /* Module declarations from 'cpython.complex' */ static PyTypeObject *__pyx_ptype_7cpython_7complex_complex = 0; /* Module declarations from 'cpython.string' */ /* Module declarations from 'cpython.unicode' */ /* Module declarations from 'cpython.dict' */ /* Module declarations from 'cpython.instance' */ /* Module declarations from 'cpython.function' */ /* Module declarations from 'cpython.method' */ /* Module declarations from 'cpython.weakref' */ /* Module declarations from 'cpython.getargs' */ /* Module declarations from 'cpython.pythread' */ /* Module declarations from 'cpython.pystate' */ /* Module declarations from 'cpython.cobject' */ /* Module declarations from 'cpython.oldbuffer' */ /* Module declarations from 'cpython.set' */ /* Module declarations from 'cpython.bytes' */ /* Module declarations from 'cpython.pycapsule' */ /* Module declarations from 'cpython' */ /* Module declarations from 'util' */ static CYTHON_INLINE PyObject *__pyx_f_4util_get_value_at(PyArrayObject *, PyObject *); /*proto*/ static CYTHON_INLINE PyObject *__pyx_f_4util_set_value_at(PyArrayObject *, PyObject *, PyObject *); /*proto*/ /* Module declarations from 'pandas.tslib' */ /* Module declarations from 'khash' */ /* Module declarations from 'pandas.hashtable' */ static PyTypeObject *__pyx_ptype_6pandas_9hashtable_HashTable = 0; static PyTypeObject *__pyx_ptype_6pandas_9hashtable_Int64HashTable = 0; static PyTypeObject *__pyx_ptype_6pandas_9hashtable_Float64HashTable = 0; static PyTypeObject *__pyx_ptype_6pandas_9hashtable_PyObjectHashTable = 0; /* Module declarations from 'datetime' */ /* Module declarations from 'datetime' */ static PyTypeObject *__pyx_ptype_8datetime_date = 0; static PyTypeObject *__pyx_ptype_8datetime_datetime = 0; static PyTypeObject *__pyx_ptype_8datetime_timedelta = 0; static CYTHON_INLINE int __pyx_f_8datetime__cstring_to_dts(char *, int, pandas_datetimestruct *); /*proto*/ static CYTHON_INLINE PyObject *__pyx_f_8datetime__dts_to_pydatetime(pandas_datetimestruct *); /*proto*/ static CYTHON_INLINE __pyx_t_5numpy_int64_t __pyx_f_8datetime__pydatetime_to_dts(PyObject *, pandas_datetimestruct *); /*proto*/ /* Module declarations from 'pandas.index' */ static PyTypeObject *__pyx_ptype_6pandas_5index_IndexEngine = 0; static PyTypeObject *__pyx_ptype_6pandas_5index_Float64Engine = 0; static PyTypeObject *__pyx_ptype_6pandas_5index_Int64Engine = 0; static PyTypeObject *__pyx_ptype_6pandas_5index_ObjectEngine = 0; static PyTypeObject *__pyx_ptype_6pandas_5index_DatetimeEngine = 0; static __pyx_t_5numpy_int64_t __pyx_v_6pandas_5index_iNaT; static CYTHON_INLINE PyObject *__pyx_f_6pandas_5index_is_definitely_invalid_key(PyObject *); /*proto*/ static Py_ssize_t __pyx_f_6pandas_5index__bin_search(PyArrayObject *, PyObject *); /*proto*/ static PyObject *__pyx_f_6pandas_5index_convert_scalar(PyArrayObject *, PyObject *, int __pyx_skip_dispatch); /*proto*/ static CYTHON_INLINE PyObject *__pyx_f_6pandas_5index__to_i8(PyObject *); /*proto*/ static CYTHON_INLINE int __pyx_f_6pandas_5index__is_utc(PyObject *); /*proto*/ 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_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_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 }; #define __Pyx_MODULE_NAME "pandas.index" int __pyx_module_is_main_pandas__index = 0; /* Implementation of 'pandas.index' */ static PyObject *__pyx_builtin_ImportError; static PyObject *__pyx_builtin_TypeError; static PyObject *__pyx_builtin_KeyError; static PyObject *__pyx_builtin_range; static PyObject *__pyx_builtin_NotImplementedError; static PyObject *__pyx_builtin_AttributeError; static PyObject *__pyx_builtin_ValueError; static PyObject *__pyx_builtin_RuntimeError; static PyObject *__pyx_builtin_IndexError; static PyObject *__pyx_pf_6pandas_5index_get_value_at(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_arr, PyObject *__pyx_v_loc); /* proto */ static PyObject *__pyx_pf_6pandas_5index_2set_value_at(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_arr, PyObject *__pyx_v_loc, PyObject *__pyx_v_val); /* proto */ static int __pyx_pf_6pandas_5index_11IndexEngine___init__(struct __pyx_obj_6pandas_5index_IndexEngine *__pyx_v_self, PyObject *__pyx_v_vgetter, PyObject *__pyx_v_n); /* proto */ static int __pyx_pf_6pandas_5index_11IndexEngine_2__contains__(struct __pyx_obj_6pandas_5index_IndexEngine *__pyx_v_self, PyObject *__pyx_v_val); /* proto */ static PyObject *__pyx_pf_6pandas_5index_11IndexEngine_4get_value(struct __pyx_obj_6pandas_5index_IndexEngine *__pyx_v_self, PyArrayObject *__pyx_v_arr, PyObject *__pyx_v_key); /* proto */ static PyObject *__pyx_pf_6pandas_5index_11IndexEngine_6set_value(struct __pyx_obj_6pandas_5index_IndexEngine *__pyx_v_self, PyArrayObject *__pyx_v_arr, PyObject *__pyx_v_key, PyObject *__pyx_v_value); /* proto */ static PyObject *__pyx_pf_6pandas_5index_11IndexEngine_8get_loc(struct __pyx_obj_6pandas_5index_IndexEngine *__pyx_v_self, PyObject *__pyx_v_val); /* proto */ static PyObject *__pyx_pf_6pandas_5index_11IndexEngine_9is_unique___get__(struct __pyx_obj_6pandas_5index_IndexEngine *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_5index_11IndexEngine_12is_monotonic___get__(struct __pyx_obj_6pandas_5index_IndexEngine *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_5index_11IndexEngine_10_call_monotonic(CYTHON_UNUSED struct __pyx_obj_6pandas_5index_IndexEngine *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_values); /* proto */ static PyObject *__pyx_pf_6pandas_5index_11IndexEngine_12clear_mapping(struct __pyx_obj_6pandas_5index_IndexEngine *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_5index_11IndexEngine_14get_indexer(struct __pyx_obj_6pandas_5index_IndexEngine *__pyx_v_self, PyObject *__pyx_v_values); /* proto */ static PyObject *__pyx_pf_6pandas_5index_11IndexEngine_16get_indexer_non_unique(struct __pyx_obj_6pandas_5index_IndexEngine *__pyx_v_self, PyObject *__pyx_v_targets); /* proto */ static PyObject *__pyx_pf_6pandas_5index_11IndexEngine_7vgetter___get__(struct __pyx_obj_6pandas_5index_IndexEngine *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_5index_11IndexEngine_7mapping___get__(struct __pyx_obj_6pandas_5index_IndexEngine *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_5index_11IndexEngine_19over_size_threshold___get__(struct __pyx_obj_6pandas_5index_IndexEngine *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_5index_11Int64Engine__call_monotonic(CYTHON_UNUSED struct __pyx_obj_6pandas_5index_Int64Engine *__pyx_v_self, PyObject *__pyx_v_values); /* proto */ static PyObject *__pyx_pf_6pandas_5index_11Int64Engine_2get_pad_indexer(struct __pyx_obj_6pandas_5index_Int64Engine *__pyx_v_self, PyObject *__pyx_v_other, PyObject *__pyx_v_limit); /* proto */ static PyObject *__pyx_pf_6pandas_5index_11Int64Engine_4get_backfill_indexer(struct __pyx_obj_6pandas_5index_Int64Engine *__pyx_v_self, PyObject *__pyx_v_other, PyObject *__pyx_v_limit); /* proto */ static PyObject *__pyx_pf_6pandas_5index_13Float64Engine__call_monotonic(CYTHON_UNUSED struct __pyx_obj_6pandas_5index_Float64Engine *__pyx_v_self, PyObject *__pyx_v_values); /* proto */ static PyObject *__pyx_pf_6pandas_5index_13Float64Engine_2get_pad_indexer(struct __pyx_obj_6pandas_5index_Float64Engine *__pyx_v_self, PyObject *__pyx_v_other, PyObject *__pyx_v_limit); /* proto */ static PyObject *__pyx_pf_6pandas_5index_13Float64Engine_4get_backfill_indexer(struct __pyx_obj_6pandas_5index_Float64Engine *__pyx_v_self, PyObject *__pyx_v_other, PyObject *__pyx_v_limit); /* proto */ static PyObject *__pyx_pf_6pandas_5index_12ObjectEngine__call_monotonic(CYTHON_UNUSED struct __pyx_obj_6pandas_5index_ObjectEngine *__pyx_v_self, PyObject *__pyx_v_values); /* proto */ static PyObject *__pyx_pf_6pandas_5index_12ObjectEngine_2get_pad_indexer(struct __pyx_obj_6pandas_5index_ObjectEngine *__pyx_v_self, PyObject *__pyx_v_other, PyObject *__pyx_v_limit); /* proto */ static PyObject *__pyx_pf_6pandas_5index_12ObjectEngine_4get_backfill_indexer(struct __pyx_obj_6pandas_5index_ObjectEngine *__pyx_v_self, PyObject *__pyx_v_other, PyObject *__pyx_v_limit); /* proto */ static int __pyx_pf_6pandas_5index_14DatetimeEngine___contains__(struct __pyx_obj_6pandas_5index_DatetimeEngine *__pyx_v_self, PyObject *__pyx_v_val); /* proto */ static PyObject *__pyx_pf_6pandas_5index_14DatetimeEngine_2_call_monotonic(CYTHON_UNUSED struct __pyx_obj_6pandas_5index_DatetimeEngine *__pyx_v_self, PyObject *__pyx_v_values); /* proto */ static PyObject *__pyx_pf_6pandas_5index_14DatetimeEngine_4get_loc(struct __pyx_obj_6pandas_5index_DatetimeEngine *__pyx_v_self, PyObject *__pyx_v_val); /* proto */ static PyObject *__pyx_pf_6pandas_5index_14DatetimeEngine_6get_indexer(struct __pyx_obj_6pandas_5index_DatetimeEngine *__pyx_v_self, PyObject *__pyx_v_values); /* proto */ static PyObject *__pyx_pf_6pandas_5index_14DatetimeEngine_8get_pad_indexer(struct __pyx_obj_6pandas_5index_DatetimeEngine *__pyx_v_self, PyObject *__pyx_v_other, PyObject *__pyx_v_limit); /* proto */ static PyObject *__pyx_pf_6pandas_5index_14DatetimeEngine_10get_backfill_indexer(struct __pyx_obj_6pandas_5index_DatetimeEngine *__pyx_v_self, PyObject *__pyx_v_other, PyObject *__pyx_v_limit); /* proto */ static PyObject *__pyx_pf_6pandas_5index_4convert_scalar(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_arr, PyObject *__pyx_v_value); /* 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_5index_IndexEngine(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_6pandas_5index_Float64Engine(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_6pandas_5index_Int64Engine(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_6pandas_5index_ObjectEngine(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_6pandas_5index_DatetimeEngine(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static char __pyx_k_B[] = "B"; static char __pyx_k_H[] = "H"; static char __pyx_k_I[] = "I"; static char __pyx_k_L[] = "L"; static char __pyx_k_O[] = "O"; static char __pyx_k_Q[] = "Q"; static char __pyx_k_b[] = "b"; static char __pyx_k_d[] = "d"; static char __pyx_k_f[] = "f"; static char __pyx_k_g[] = "g"; static char __pyx_k_h[] = "h"; static char __pyx_k_i[] = "i"; static char __pyx_k_l[] = "l"; static char __pyx_k_n[] = "n"; static char __pyx_k_q[] = "q"; static char __pyx_k_Zd[] = "Zd"; static char __pyx_k_Zf[] = "Zf"; static char __pyx_k_Zg[] = "Zg"; static char __pyx_k_i4[] = "i4"; static char __pyx_k_i8[] = "i8"; static char __pyx_k_np[] = "np"; static char __pyx_k_UTC[] = "UTC"; static char __pyx_k_arr[] = "arr"; static char __pyx_k_day[] = "day"; static char __pyx_k_inf[] = "inf"; static char __pyx_k_key[] = "key"; static char __pyx_k_loc[] = "loc"; static char __pyx_k_utc[] = "utc"; static char __pyx_k_val[] = "val"; static char __pyx_k_bool[] = "bool_"; static char __pyx_k_data[] = "_data"; static char __pyx_k_hash[] = "_hash"; static char __pyx_k_hour[] = "hour"; static char __pyx_k_left[] = "left"; static char __pyx_k_main[] = "__main__"; static char __pyx_k_pytz[] = "pytz"; static char __pyx_k_side[] = "side"; static char __pyx_k_test[] = "__test__"; static char __pyx_k_type[] = "type"; static char __pyx_k_view[] = "view"; static char __pyx_k_year[] = "year"; static char __pyx_k_M8_ns[] = "M8[ns]"; static char __pyx_k_algos[] = "algos"; static char __pyx_k_dtype[] = "dtype"; static char __pyx_k_empty[] = "empty"; static char __pyx_k_int64[] = "int64"; static char __pyx_k_limit[] = "limit"; static char __pyx_k_month[] = "month"; static char __pyx_k_numpy[] = "numpy"; static char __pyx_k_other[] = "other"; static char __pyx_k_range[] = "range"; static char __pyx_k_right[] = "right"; static char __pyx_k_tslib[] = "tslib"; static char __pyx_k_tzutc[] = "tzutc"; static char __pyx_k_uint8[] = "uint8"; static char __pyx_k_value[] = "value"; static char __pyx_k_append[] = "append"; static char __pyx_k_astype[] = "astype"; static char __pyx_k_du_utc[] = "_du_utc"; static char __pyx_k_import[] = "__import__"; static char __pyx_k_lookup[] = "lookup"; static char __pyx_k_minute[] = "minute"; static char __pyx_k_object[] = "object"; static char __pyx_k_pandas[] = "pandas"; static char __pyx_k_repeat[] = "repeat"; static char __pyx_k_resize[] = "resize"; static char __pyx_k_second[] = "second"; static char __pyx_k_tzinfo[] = "tzinfo"; static char __pyx_k_asarray[] = "asarray"; static char __pyx_k_float64[] = "float64"; static char __pyx_k_get_loc[] = "get_loc"; static char __pyx_k_integer[] = "integer"; static char __pyx_k_ndarray[] = "ndarray"; static char __pyx_k_vgetter[] = "vgetter"; static char __pyx_k_KeyError[] = "KeyError"; static char __pyx_k_get_item[] = "get_item"; static char __pyx_k_Timestamp[] = "Timestamp"; static char __pyx_k_TypeError[] = "TypeError"; static char __pyx_k_get_value[] = "get_value"; static char __pyx_k_hashtable[] = "hashtable"; static char __pyx_k_have_pytz[] = "have_pytz"; static char __pyx_k_is_unique[] = "is_unique"; static char __pyx_k_pad_int64[] = "pad_int64"; static char __pyx_k_set_value[] = "set_value"; static char __pyx_k_IndexError[] = "IndexError"; static char __pyx_k_ValueError[] = "ValueError"; static char __pyx_k_pad_object[] = "pad_object"; static char __pyx_k_pyx_vtable[] = "__pyx_vtable__"; static char __pyx_k_ImportError[] = "ImportError"; static char __pyx_k_SIZE_CUTOFF[] = "_SIZE_CUTOFF"; static char __pyx_k_dateutil_tz[] = "dateutil.tz"; static char __pyx_k_microsecond[] = "microsecond"; static char __pyx_k_pad_float64[] = "pad_float64"; static char __pyx_k_RuntimeError[] = "RuntimeError"; static char __pyx_k_ensure_int64[] = "ensure_int64"; static char __pyx_k_get_value_at[] = "get_value_at"; static char __pyx_k_is_monotonic[] = "is_monotonic"; static char __pyx_k_pandas_index[] = "pandas.index"; static char __pyx_k_pandas_tslib[] = "pandas.tslib"; static char __pyx_k_searchsorted[] = "searchsorted"; static char __pyx_k_set_value_at[] = "set_value_at"; static char __pyx_k_get_utcoffset[] = "_get_utcoffset"; static char __pyx_k_map_locations[] = "map_locations"; static char __pyx_k_pad_functions[] = "_pad_functions"; static char __pyx_k_pyx_getbuffer[] = "__pyx_getbuffer"; static char __pyx_k_AttributeError[] = "AttributeError"; static char __pyx_k_Int64HashTable[] = "Int64HashTable"; static char __pyx_k_backfill_int64[] = "backfill_int64"; static char __pyx_k_call_monotonic[] = "_call_monotonic"; static char __pyx_k_backfill_object[] = "backfill_object"; static char __pyx_k_Float64HashTable[] = "Float64HashTable"; static char __pyx_k_backfill_float64[] = "backfill_float64"; static char __pyx_k_PyObjectHashTable[] = "PyObjectHashTable"; static char __pyx_k_Unable_to_parse_s[] = "Unable to parse %s"; static char __pyx_k_pyx_releasebuffer[] = "__pyx_releasebuffer"; static char __pyx_k_backfill_functions[] = "_backfill_functions"; static char __pyx_k_is_monotonic_int64[] = "is_monotonic_int64"; static char __pyx_k_NotImplementedError[] = "NotImplementedError"; static char __pyx_k_index_out_of_bounds[] = "index out of bounds"; static char __pyx_k_is_monotonic_object[] = "is_monotonic_object"; static char __pyx_k_delta_to_nanoseconds[] = "_delta_to_nanoseconds"; static char __pyx_k_is_monotonic_float64[] = "is_monotonic_float64"; static char __pyx_k_ndarray_is_not_C_contiguous[] = "ndarray is not C contiguous"; static char __pyx_k_home_yoh_deb_gits_pkg_exppsy_pa[] = "/home/yoh/deb/gits/pkg-exppsy/pandas/pandas/index.pyx"; static char __pyx_k_unknown_dtype_code_in_numpy_pxd[] = "unknown dtype code in numpy.pxd (%d)"; static char __pyx_k_Cannot_assign_nan_to_integer_ser[] = "Cannot assign nan to integer series"; static char __pyx_k_Format_string_allocated_too_shor[] = "Format string allocated too short, see comment in numpy.pxd"; static char __pyx_k_Non_native_byte_order_not_suppor[] = "Non-native byte order not supported"; static char __pyx_k_ndarray_is_not_Fortran_contiguou[] = "ndarray is not Fortran contiguous"; static char __pyx_k_Format_string_allocated_too_shor_2[] = "Format string allocated too short."; static PyObject *__pyx_n_s_AttributeError; static PyObject *__pyx_kp_s_Cannot_assign_nan_to_integer_ser; static PyObject *__pyx_n_s_Float64HashTable; 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_n_s_IndexError; static PyObject *__pyx_n_s_Int64HashTable; static PyObject *__pyx_n_s_KeyError; static PyObject *__pyx_kp_s_M8_ns; static PyObject *__pyx_kp_u_Non_native_byte_order_not_suppor; static PyObject *__pyx_n_s_NotImplementedError; static PyObject *__pyx_n_s_PyObjectHashTable; static PyObject *__pyx_n_s_RuntimeError; static PyObject *__pyx_n_s_SIZE_CUTOFF; static PyObject *__pyx_n_s_Timestamp; static PyObject *__pyx_n_s_TypeError; static PyObject *__pyx_n_s_UTC; static PyObject *__pyx_kp_s_Unable_to_parse_s; static PyObject *__pyx_n_s_ValueError; static PyObject *__pyx_n_s_algos; static PyObject *__pyx_n_s_append; static PyObject *__pyx_n_s_arr; static PyObject *__pyx_n_s_asarray; static PyObject *__pyx_n_s_astype; static PyObject *__pyx_n_s_backfill_float64; static PyObject *__pyx_n_s_backfill_functions; static PyObject *__pyx_n_s_backfill_int64; static PyObject *__pyx_n_s_backfill_object; static PyObject *__pyx_n_s_bool; static PyObject *__pyx_n_s_call_monotonic; static PyObject *__pyx_n_s_data; static PyObject *__pyx_n_s_dateutil_tz; static PyObject *__pyx_n_s_day; static PyObject *__pyx_n_s_delta_to_nanoseconds; static PyObject *__pyx_n_s_dtype; static PyObject *__pyx_n_s_du_utc; static PyObject *__pyx_n_s_empty; static PyObject *__pyx_n_s_ensure_int64; static PyObject *__pyx_n_s_float64; static PyObject *__pyx_n_s_get_item; static PyObject *__pyx_n_s_get_loc; static PyObject *__pyx_n_s_get_utcoffset; static PyObject *__pyx_n_s_get_value; static PyObject *__pyx_n_s_get_value_at; static PyObject *__pyx_n_s_hash; static PyObject *__pyx_n_s_hashtable; static PyObject *__pyx_n_s_have_pytz; static PyObject *__pyx_kp_s_home_yoh_deb_gits_pkg_exppsy_pa; static PyObject *__pyx_n_s_hour; static PyObject *__pyx_n_s_i4; static PyObject *__pyx_n_s_i8; static PyObject *__pyx_n_s_import; static PyObject *__pyx_kp_s_index_out_of_bounds; static PyObject *__pyx_n_s_inf; static PyObject *__pyx_n_s_int64; static PyObject *__pyx_n_s_integer; static PyObject *__pyx_n_s_is_monotonic; static PyObject *__pyx_n_s_is_monotonic_float64; static PyObject *__pyx_n_s_is_monotonic_int64; static PyObject *__pyx_n_s_is_monotonic_object; static PyObject *__pyx_n_s_is_unique; static PyObject *__pyx_n_s_key; static PyObject *__pyx_n_s_left; static PyObject *__pyx_n_s_limit; static PyObject *__pyx_n_s_loc; static PyObject *__pyx_n_s_lookup; static PyObject *__pyx_n_s_main; static PyObject *__pyx_n_s_map_locations; static PyObject *__pyx_n_s_microsecond; static PyObject *__pyx_n_s_minute; static PyObject *__pyx_n_s_month; static PyObject *__pyx_n_s_n; static PyObject *__pyx_n_s_ndarray; 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_np; static PyObject *__pyx_n_s_numpy; static PyObject *__pyx_n_s_object; static PyObject *__pyx_n_s_other; static PyObject *__pyx_n_s_pad_float64; static PyObject *__pyx_n_s_pad_functions; static PyObject *__pyx_n_s_pad_int64; static PyObject *__pyx_n_s_pad_object; static PyObject *__pyx_n_s_pandas; static PyObject *__pyx_n_s_pandas_index; static PyObject *__pyx_n_s_pandas_tslib; static PyObject *__pyx_n_s_pytz; static PyObject *__pyx_n_s_pyx_getbuffer; static PyObject *__pyx_n_s_pyx_releasebuffer; static PyObject *__pyx_n_s_pyx_vtable; static PyObject *__pyx_n_s_range; static PyObject *__pyx_n_s_repeat; static PyObject *__pyx_n_s_resize; static PyObject *__pyx_n_s_right; static PyObject *__pyx_n_s_searchsorted; static PyObject *__pyx_n_s_second; static PyObject *__pyx_n_s_set_value; static PyObject *__pyx_n_s_set_value_at; static PyObject *__pyx_n_s_side; static PyObject *__pyx_n_s_test; static PyObject *__pyx_n_s_tslib; static PyObject *__pyx_n_s_type; static PyObject *__pyx_n_s_tzinfo; static PyObject *__pyx_n_s_tzutc; static PyObject *__pyx_n_s_uint8; static PyObject *__pyx_kp_u_unknown_dtype_code_in_numpy_pxd; static PyObject *__pyx_n_s_utc; static PyObject *__pyx_n_s_val; static PyObject *__pyx_n_s_value; static PyObject *__pyx_n_s_vgetter; static PyObject *__pyx_n_s_view; static PyObject *__pyx_n_s_year; static PyObject *__pyx_int_15; static PyObject *__pyx_int_1000000; 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__19; static PyObject *__pyx_codeobj__18; static PyObject *__pyx_codeobj__20; /* "pandas/index.pyx":46 * * * cdef inline is_definitely_invalid_key(object val): # <<<<<<<<<<<<<< * if PyTuple_Check(val): * try: */ static CYTHON_INLINE PyObject *__pyx_f_6pandas_5index_is_definitely_invalid_key(PyObject *__pyx_v_val) { 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_hash_t __pyx_t_5; int __pyx_t_6; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; int __pyx_t_10; int __pyx_t_11; int __pyx_t_12; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("is_definitely_invalid_key", 0); /* "pandas/index.pyx":47 * * cdef inline is_definitely_invalid_key(object val): * if PyTuple_Check(val): # <<<<<<<<<<<<<< * try: * hash(val) */ __pyx_t_1 = (PyTuple_Check(__pyx_v_val) != 0); if (__pyx_t_1) { /* "pandas/index.pyx":48 * cdef inline is_definitely_invalid_key(object val): * if PyTuple_Check(val): * try: # <<<<<<<<<<<<<< * hash(val) * except TypeError: */ { __Pyx_ExceptionSave(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4); __Pyx_XGOTREF(__pyx_t_2); __Pyx_XGOTREF(__pyx_t_3); __Pyx_XGOTREF(__pyx_t_4); /*try:*/ { /* "pandas/index.pyx":49 * if PyTuple_Check(val): * try: * hash(val) # <<<<<<<<<<<<<< * except TypeError: * return True */ __pyx_t_5 = PyObject_Hash(__pyx_v_val); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __pyx_L4_error;} } __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; goto __pyx_L11_try_end; __pyx_L4_error:; /* "pandas/index.pyx":50 * try: * hash(val) * except TypeError: # <<<<<<<<<<<<<< * return True * */ __pyx_t_6 = PyErr_ExceptionMatches(__pyx_builtin_TypeError); if (__pyx_t_6) { __Pyx_AddTraceback("pandas.index.is_definitely_invalid_key", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 50; __pyx_clineno = __LINE__; goto __pyx_L6_except_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_GOTREF(__pyx_t_8); __Pyx_GOTREF(__pyx_t_9); /* "pandas/index.pyx":51 * hash(val) * except TypeError: * return True # <<<<<<<<<<<<<< * * # we have a _data, means we are a NDFrame */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(Py_True); __pyx_r = Py_True; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; goto __pyx_L7_except_return; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; goto __pyx_L5_exception_handled; } goto __pyx_L6_except_error; __pyx_L6_except_error:; __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_XGIVEREF(__pyx_t_4); __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4); goto __pyx_L1_error; __pyx_L7_except_return:; __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_XGIVEREF(__pyx_t_4); __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4); goto __pyx_L0; __pyx_L5_exception_handled:; __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_XGIVEREF(__pyx_t_4); __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4); __pyx_L11_try_end:; } goto __pyx_L3; } __pyx_L3:; /* "pandas/index.pyx":54 * * # we have a _data, means we are a NDFrame * return (PySlice_Check(val) or cnp.PyArray_Check(val) # <<<<<<<<<<<<<< * or PyList_Check(val) or hasattr(val,'_data')) * */ __Pyx_XDECREF(__pyx_r); __pyx_t_9 = __Pyx_PyInt_From_int(PySlice_Check(__pyx_v_val)); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 54; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 54; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (!__pyx_t_1) { __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; /* "pandas/index.pyx":55 * # we have a _data, means we are a NDFrame * return (PySlice_Check(val) or cnp.PyArray_Check(val) * or PyList_Check(val) or hasattr(val,'_data')) # <<<<<<<<<<<<<< * * def get_value_at(ndarray arr, object loc): */ __pyx_t_1 = PyArray_Check(__pyx_v_val); if (!__pyx_t_1) { __pyx_t_10 = PyList_Check(__pyx_v_val); if (!__pyx_t_10) { __pyx_t_11 = PyObject_HasAttr(__pyx_v_val, __pyx_n_s_data); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 55; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_12 = __pyx_t_11; } else { __pyx_t_12 = __pyx_t_10; } __pyx_t_10 = __pyx_t_12; } else { __pyx_t_10 = __pyx_t_1; } __pyx_t_8 = __Pyx_PyBool_FromLong(__pyx_t_10); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 55; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_7 = __pyx_t_8; __pyx_t_8 = 0; } else { __pyx_t_7 = __pyx_t_9; __pyx_t_9 = 0; } __pyx_r = __pyx_t_7; __pyx_t_7 = 0; goto __pyx_L0; /* "pandas/index.pyx":46 * * * cdef inline is_definitely_invalid_key(object val): # <<<<<<<<<<<<<< * if PyTuple_Check(val): * try: */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); __Pyx_AddTraceback("pandas.index.is_definitely_invalid_key", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/index.pyx":57 * or PyList_Check(val) or hasattr(val,'_data')) * * def get_value_at(ndarray arr, object loc): # <<<<<<<<<<<<<< * if arr.descr.type_num == NPY_DATETIME: * return Timestamp(util.get_value_at(arr, loc)) */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5index_1get_value_at(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5index_1get_value_at = {__Pyx_NAMESTR("get_value_at"), (PyCFunction)__pyx_pw_6pandas_5index_1get_value_at, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5index_1get_value_at(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_arr = 0; PyObject *__pyx_v_loc = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("get_value_at (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_arr,&__pyx_n_s_loc,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_arr)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_loc)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("get_value_at", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 57; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "get_value_at") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 57; __pyx_clineno = __LINE__; goto __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_loc = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("get_value_at", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 57; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.index.get_value_at", __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_filename = __pyx_f[0]; __pyx_lineno = 57; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5index_get_value_at(__pyx_self, __pyx_v_arr, __pyx_v_loc); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5index_get_value_at(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_arr, PyObject *__pyx_v_loc) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_value_at", 0); /* "pandas/index.pyx":58 * * def get_value_at(ndarray arr, object loc): * if arr.descr.type_num == NPY_DATETIME: # <<<<<<<<<<<<<< * return Timestamp(util.get_value_at(arr, loc)) * return util.get_value_at(arr, loc) */ __pyx_t_1 = ((__pyx_v_arr->descr->type_num == NPY_DATETIME) != 0); if (__pyx_t_1) { /* "pandas/index.pyx":59 * def get_value_at(ndarray arr, object loc): * if arr.descr.type_num == NPY_DATETIME: * return Timestamp(util.get_value_at(arr, loc)) # <<<<<<<<<<<<<< * return util.get_value_at(arr, loc) * */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_Timestamp); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 59; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __pyx_f_4util_get_value_at(__pyx_v_arr, __pyx_v_loc); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 59; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 59; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 59; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; } /* "pandas/index.pyx":60 * if arr.descr.type_num == NPY_DATETIME: * return Timestamp(util.get_value_at(arr, loc)) * return util.get_value_at(arr, loc) # <<<<<<<<<<<<<< * * def set_value_at(ndarray arr, object loc, object val): */ __Pyx_XDECREF(__pyx_r); __pyx_t_3 = __pyx_f_4util_get_value_at(__pyx_v_arr, __pyx_v_loc); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 60; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; /* "pandas/index.pyx":57 * or PyList_Check(val) or hasattr(val,'_data')) * * def get_value_at(ndarray arr, object loc): # <<<<<<<<<<<<<< * if arr.descr.type_num == NPY_DATETIME: * return Timestamp(util.get_value_at(arr, loc)) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("pandas.index.get_value_at", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/index.pyx":62 * return util.get_value_at(arr, loc) * * def set_value_at(ndarray arr, object loc, object val): # <<<<<<<<<<<<<< * return util.set_value_at(arr, loc, val) * */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5index_3set_value_at(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5index_3set_value_at = {__Pyx_NAMESTR("set_value_at"), (PyCFunction)__pyx_pw_6pandas_5index_3set_value_at, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5index_3set_value_at(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_arr = 0; PyObject *__pyx_v_loc = 0; PyObject *__pyx_v_val = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("set_value_at (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_arr,&__pyx_n_s_loc,&__pyx_n_s_val,0}; PyObject* values[3] = {0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_arr)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_loc)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("set_value_at", 1, 3, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_val)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("set_value_at", 1, 3, 3, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "set_value_at") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __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_arr = ((PyArrayObject *)values[0]); __pyx_v_loc = values[1]; __pyx_v_val = values[2]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("set_value_at", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.index.set_value_at", __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_filename = __pyx_f[0]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5index_2set_value_at(__pyx_self, __pyx_v_arr, __pyx_v_loc, __pyx_v_val); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5index_2set_value_at(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_arr, PyObject *__pyx_v_loc, PyObject *__pyx_v_val) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("set_value_at", 0); /* "pandas/index.pyx":63 * * def set_value_at(ndarray arr, object loc, object val): * return util.set_value_at(arr, loc, val) # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_4util_set_value_at(__pyx_v_arr, __pyx_v_loc, __pyx_v_val); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "pandas/index.pyx":62 * return util.get_value_at(arr, loc) * * def set_value_at(ndarray arr, object loc, object val): # <<<<<<<<<<<<<< * return util.set_value_at(arr, loc, val) * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas.index.set_value_at", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/index.pyx":81 * bint initialized, monotonic_check, unique_check * * def __init__(self, vgetter, n): # <<<<<<<<<<<<<< * self.vgetter = vgetter * */ /* Python wrapper */ static int __pyx_pw_6pandas_5index_11IndexEngine_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_pw_6pandas_5index_11IndexEngine_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_vgetter = 0; PyObject *__pyx_v_n = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_vgetter,&__pyx_n_s_n,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_vgetter)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_n)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __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_vgetter = values[0]; __pyx_v_n = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.index.IndexEngine.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return -1; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pandas_5index_11IndexEngine___init__(((struct __pyx_obj_6pandas_5index_IndexEngine *)__pyx_v_self), __pyx_v_vgetter, __pyx_v_n); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pandas_5index_11IndexEngine___init__(struct __pyx_obj_6pandas_5index_IndexEngine *__pyx_v_self, PyObject *__pyx_v_vgetter, PyObject *__pyx_v_n) { int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_t_3; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__init__", 0); /* "pandas/index.pyx":82 * * def __init__(self, vgetter, n): * self.vgetter = vgetter # <<<<<<<<<<<<<< * * self.over_size_threshold = n >= _SIZE_CUTOFF */ __Pyx_INCREF(__pyx_v_vgetter); __Pyx_GIVEREF(__pyx_v_vgetter); __Pyx_GOTREF(__pyx_v_self->vgetter); __Pyx_DECREF(__pyx_v_self->vgetter); __pyx_v_self->vgetter = __pyx_v_vgetter; /* "pandas/index.pyx":84 * self.vgetter = vgetter * * self.over_size_threshold = n >= _SIZE_CUTOFF # <<<<<<<<<<<<<< * * self.initialized = 0 */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_SIZE_CUTOFF); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 84; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyObject_RichCompare(__pyx_v_n, __pyx_t_1, Py_GE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 84; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 84; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_self->over_size_threshold = __pyx_t_3; /* "pandas/index.pyx":86 * self.over_size_threshold = n >= _SIZE_CUTOFF * * self.initialized = 0 # <<<<<<<<<<<<<< * self.monotonic_check = 0 * */ __pyx_v_self->initialized = 0; /* "pandas/index.pyx":87 * * self.initialized = 0 * self.monotonic_check = 0 # <<<<<<<<<<<<<< * * self.unique = 0 */ __pyx_v_self->monotonic_check = 0; /* "pandas/index.pyx":89 * self.monotonic_check = 0 * * self.unique = 0 # <<<<<<<<<<<<<< * self.monotonic = 0 * */ __pyx_v_self->unique = 0; /* "pandas/index.pyx":90 * * self.unique = 0 * self.monotonic = 0 # <<<<<<<<<<<<<< * * def __contains__(self, object val): */ __pyx_v_self->monotonic = 0; /* "pandas/index.pyx":81 * bint initialized, monotonic_check, unique_check * * def __init__(self, vgetter, n): # <<<<<<<<<<<<<< * self.vgetter = vgetter * */ /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("pandas.index.IndexEngine.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/index.pyx":92 * self.monotonic = 0 * * def __contains__(self, object val): # <<<<<<<<<<<<<< * self._ensure_mapping_populated() * hash(val) */ /* Python wrapper */ static int __pyx_pw_6pandas_5index_11IndexEngine_3__contains__(PyObject *__pyx_v_self, PyObject *__pyx_v_val); /*proto*/ static int __pyx_pw_6pandas_5index_11IndexEngine_3__contains__(PyObject *__pyx_v_self, PyObject *__pyx_v_val) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__contains__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_5index_11IndexEngine_2__contains__(((struct __pyx_obj_6pandas_5index_IndexEngine *)__pyx_v_self), ((PyObject *)__pyx_v_val)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pandas_5index_11IndexEngine_2__contains__(struct __pyx_obj_6pandas_5index_IndexEngine *__pyx_v_self, PyObject *__pyx_v_val) { int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; Py_hash_t __pyx_t_2; int __pyx_t_3; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__contains__", 0); /* "pandas/index.pyx":93 * * def __contains__(self, object val): * self._ensure_mapping_populated() # <<<<<<<<<<<<<< * hash(val) * return val in self.mapping */ __pyx_t_1 = __pyx_f_6pandas_5index_11IndexEngine__ensure_mapping_populated(__pyx_v_self); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 93; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pandas/index.pyx":94 * def __contains__(self, object val): * self._ensure_mapping_populated() * hash(val) # <<<<<<<<<<<<<< * return val in self.mapping * */ __pyx_t_2 = PyObject_Hash(__pyx_v_val); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 94; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/index.pyx":95 * self._ensure_mapping_populated() * hash(val) * return val in self.mapping # <<<<<<<<<<<<<< * * cpdef get_value(self, ndarray arr, object key): */ __pyx_t_3 = (__Pyx_PySequence_Contains(__pyx_v_val, ((PyObject *)__pyx_v_self->mapping), Py_EQ)); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 95; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_t_3; goto __pyx_L0; /* "pandas/index.pyx":92 * self.monotonic = 0 * * def __contains__(self, object val): # <<<<<<<<<<<<<< * self._ensure_mapping_populated() * hash(val) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas.index.IndexEngine.__contains__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/index.pyx":97 * return val in self.mapping * * cpdef get_value(self, ndarray arr, object key): # <<<<<<<<<<<<<< * ''' * arr : 1-dimensional ndarray */ static PyObject *__pyx_pw_6pandas_5index_11IndexEngine_5get_value(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_6pandas_5index_11IndexEngine_get_value(struct __pyx_obj_6pandas_5index_IndexEngine *__pyx_v_self, PyArrayObject *__pyx_v_arr, PyObject *__pyx_v_key, int __pyx_skip_dispatch) { PyObject *__pyx_v_loc = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_t_4; int __pyx_t_5; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_value", 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_get_value); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 97; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_6pandas_5index_11IndexEngine_5get_value)) { __Pyx_XDECREF(__pyx_r); __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 97; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(((PyObject *)__pyx_v_arr)); PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_arr)); __Pyx_GIVEREF(((PyObject *)__pyx_v_arr)); __Pyx_INCREF(__pyx_v_key); PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_key); __Pyx_GIVEREF(__pyx_v_key); __pyx_t_3 = PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 97; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_3; __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } /* "pandas/index.pyx":105 * void* data_ptr * * loc = self.get_loc(key) # <<<<<<<<<<<<<< * if PySlice_Check(loc) or cnp.PyArray_Check(loc): * return arr[loc] */ __pyx_t_1 = ((struct __pyx_vtabstruct_6pandas_5index_IndexEngine *)__pyx_v_self->__pyx_vtab)->get_loc(__pyx_v_self, __pyx_v_key, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 105; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_v_loc = __pyx_t_1; __pyx_t_1 = 0; /* "pandas/index.pyx":106 * * loc = self.get_loc(key) * if PySlice_Check(loc) or cnp.PyArray_Check(loc): # <<<<<<<<<<<<<< * return arr[loc] * else: */ if (!(PySlice_Check(__pyx_v_loc) != 0)) { __pyx_t_4 = PyArray_Check(__pyx_v_loc); __pyx_t_5 = __pyx_t_4; } else { __pyx_t_5 = (PySlice_Check(__pyx_v_loc) != 0); } if (__pyx_t_5) { /* "pandas/index.pyx":107 * loc = self.get_loc(key) * if PySlice_Check(loc) or cnp.PyArray_Check(loc): * return arr[loc] # <<<<<<<<<<<<<< * else: * if arr.descr.type_num == NPY_DATETIME: */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyObject_GetItem(((PyObject *)__pyx_v_arr), __pyx_v_loc); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; } /*else*/ { /* "pandas/index.pyx":109 * return arr[loc] * else: * if arr.descr.type_num == NPY_DATETIME: # <<<<<<<<<<<<<< * return Timestamp(util.get_value_at(arr, loc)) * return util.get_value_at(arr, loc) */ __pyx_t_5 = ((__pyx_v_arr->descr->type_num == NPY_DATETIME) != 0); if (__pyx_t_5) { /* "pandas/index.pyx":110 * else: * if arr.descr.type_num == NPY_DATETIME: * return Timestamp(util.get_value_at(arr, loc)) # <<<<<<<<<<<<<< * return util.get_value_at(arr, loc) * */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_Timestamp); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 110; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __pyx_f_4util_get_value_at(__pyx_v_arr, __pyx_v_loc); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 110; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 110; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 110; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; } /* "pandas/index.pyx":111 * if arr.descr.type_num == NPY_DATETIME: * return Timestamp(util.get_value_at(arr, loc)) * return util.get_value_at(arr, loc) # <<<<<<<<<<<<<< * * cpdef set_value(self, ndarray arr, object key, object value): */ __Pyx_XDECREF(__pyx_r); __pyx_t_3 = __pyx_f_4util_get_value_at(__pyx_v_arr, __pyx_v_loc); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 111; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; } /* "pandas/index.pyx":97 * return val in self.mapping * * cpdef get_value(self, ndarray arr, object key): # <<<<<<<<<<<<<< * ''' * arr : 1-dimensional ndarray */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("pandas.index.IndexEngine.get_value", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_loc); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5index_11IndexEngine_5get_value(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6pandas_5index_11IndexEngine_4get_value[] = "\n arr : 1-dimensional ndarray\n "; static PyObject *__pyx_pw_6pandas_5index_11IndexEngine_5get_value(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_arr = 0; PyObject *__pyx_v_key = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("get_value (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_arr,&__pyx_n_s_key,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_arr)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_key)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("get_value", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 97; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "get_value") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 97; __pyx_clineno = __LINE__; goto __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_key = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("get_value", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 97; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.index.IndexEngine.get_value", __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_filename = __pyx_f[0]; __pyx_lineno = 97; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5index_11IndexEngine_4get_value(((struct __pyx_obj_6pandas_5index_IndexEngine *)__pyx_v_self), __pyx_v_arr, __pyx_v_key); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5index_11IndexEngine_4get_value(struct __pyx_obj_6pandas_5index_IndexEngine *__pyx_v_self, PyArrayObject *__pyx_v_arr, PyObject *__pyx_v_key) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_value", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = ((struct __pyx_vtabstruct_6pandas_5index_IndexEngine *)__pyx_v_self->__pyx_vtab)->get_value(__pyx_v_self, __pyx_v_arr, __pyx_v_key, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 97; __pyx_clineno = __LINE__; goto __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.index.IndexEngine.get_value", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/index.pyx":113 * return util.get_value_at(arr, loc) * * cpdef set_value(self, ndarray arr, object key, object value): # <<<<<<<<<<<<<< * ''' * arr : 1-dimensional ndarray */ static PyObject *__pyx_pw_6pandas_5index_11IndexEngine_7set_value(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_6pandas_5index_11IndexEngine_set_value(struct __pyx_obj_6pandas_5index_IndexEngine *__pyx_v_self, PyArrayObject *__pyx_v_arr, PyObject *__pyx_v_key, PyObject *__pyx_v_value, int __pyx_skip_dispatch) { PyObject *__pyx_v_loc = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_t_4; int __pyx_t_5; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("set_value", 0); __Pyx_INCREF(__pyx_v_value); /* 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_set_value); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 113; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_6pandas_5index_11IndexEngine_7set_value)) { __Pyx_XDECREF(__pyx_r); __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 113; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(((PyObject *)__pyx_v_arr)); PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_arr)); __Pyx_GIVEREF(((PyObject *)__pyx_v_arr)); __Pyx_INCREF(__pyx_v_key); PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_key); __Pyx_GIVEREF(__pyx_v_key); __Pyx_INCREF(__pyx_v_value); PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_value); __Pyx_GIVEREF(__pyx_v_value); __pyx_t_3 = PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 113; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_3; __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } /* "pandas/index.pyx":121 * void* data_ptr * * loc = self.get_loc(key) # <<<<<<<<<<<<<< * value = convert_scalar(arr, value) * */ __pyx_t_1 = ((struct __pyx_vtabstruct_6pandas_5index_IndexEngine *)__pyx_v_self->__pyx_vtab)->get_loc(__pyx_v_self, __pyx_v_key, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 121; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_v_loc = __pyx_t_1; __pyx_t_1 = 0; /* "pandas/index.pyx":122 * * loc = self.get_loc(key) * value = convert_scalar(arr, value) # <<<<<<<<<<<<<< * * if PySlice_Check(loc) or cnp.PyArray_Check(loc): */ __pyx_t_1 = __pyx_f_6pandas_5index_convert_scalar(__pyx_v_arr, __pyx_v_value, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 122; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF_SET(__pyx_v_value, __pyx_t_1); __pyx_t_1 = 0; /* "pandas/index.pyx":124 * value = convert_scalar(arr, value) * * if PySlice_Check(loc) or cnp.PyArray_Check(loc): # <<<<<<<<<<<<<< * arr[loc] = value * else: */ if (!(PySlice_Check(__pyx_v_loc) != 0)) { __pyx_t_4 = PyArray_Check(__pyx_v_loc); __pyx_t_5 = __pyx_t_4; } else { __pyx_t_5 = (PySlice_Check(__pyx_v_loc) != 0); } if (__pyx_t_5) { /* "pandas/index.pyx":125 * * if PySlice_Check(loc) or cnp.PyArray_Check(loc): * arr[loc] = value # <<<<<<<<<<<<<< * else: * util.set_value_at(arr, loc, value) */ if (unlikely(PyObject_SetItem(((PyObject *)__pyx_v_arr), __pyx_v_loc, __pyx_v_value) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 125; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L3; } /*else*/ { /* "pandas/index.pyx":127 * arr[loc] = value * else: * util.set_value_at(arr, loc, value) # <<<<<<<<<<<<<< * * cpdef get_loc(self, object val): */ __pyx_t_1 = __pyx_f_4util_set_value_at(__pyx_v_arr, __pyx_v_loc, __pyx_v_value); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 127; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } __pyx_L3:; /* "pandas/index.pyx":113 * return util.get_value_at(arr, loc) * * cpdef set_value(self, ndarray arr, object key, object value): # <<<<<<<<<<<<<< * ''' * arr : 1-dimensional ndarray */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("pandas.index.IndexEngine.set_value", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_loc); __Pyx_XDECREF(__pyx_v_value); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5index_11IndexEngine_7set_value(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6pandas_5index_11IndexEngine_6set_value[] = "\n arr : 1-dimensional ndarray\n "; static PyObject *__pyx_pw_6pandas_5index_11IndexEngine_7set_value(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_arr = 0; PyObject *__pyx_v_key = 0; PyObject *__pyx_v_value = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("set_value (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_arr,&__pyx_n_s_key,&__pyx_n_s_value,0}; PyObject* values[3] = {0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_arr)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_key)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("set_value", 1, 3, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 113; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_value)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("set_value", 1, 3, 3, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 113; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "set_value") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 113; __pyx_clineno = __LINE__; goto __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_arr = ((PyArrayObject *)values[0]); __pyx_v_key = values[1]; __pyx_v_value = values[2]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("set_value", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 113; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.index.IndexEngine.set_value", __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_filename = __pyx_f[0]; __pyx_lineno = 113; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5index_11IndexEngine_6set_value(((struct __pyx_obj_6pandas_5index_IndexEngine *)__pyx_v_self), __pyx_v_arr, __pyx_v_key, __pyx_v_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_5index_11IndexEngine_6set_value(struct __pyx_obj_6pandas_5index_IndexEngine *__pyx_v_self, PyArrayObject *__pyx_v_arr, PyObject *__pyx_v_key, PyObject *__pyx_v_value) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("set_value", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = ((struct __pyx_vtabstruct_6pandas_5index_IndexEngine *)__pyx_v_self->__pyx_vtab)->set_value(__pyx_v_self, __pyx_v_arr, __pyx_v_key, __pyx_v_value, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 113; __pyx_clineno = __LINE__; goto __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.index.IndexEngine.set_value", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/index.pyx":129 * util.set_value_at(arr, loc, value) * * cpdef get_loc(self, object val): # <<<<<<<<<<<<<< * if is_definitely_invalid_key(val): * raise TypeError */ static PyObject *__pyx_pw_6pandas_5index_11IndexEngine_9get_loc(PyObject *__pyx_v_self, PyObject *__pyx_v_val); /*proto*/ static PyObject *__pyx_f_6pandas_5index_11IndexEngine_get_loc(struct __pyx_obj_6pandas_5index_IndexEngine *__pyx_v_self, PyObject *__pyx_v_val, int __pyx_skip_dispatch) { PyObject *__pyx_v_values = NULL; Py_ssize_t __pyx_v_loc; 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; Py_ssize_t __pyx_t_7; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; int __pyx_t_11; PyObject *__pyx_t_12 = NULL; PyObject *__pyx_t_13 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_loc", 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_get_loc); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 129; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_6pandas_5index_11IndexEngine_9get_loc)) { __Pyx_XDECREF(__pyx_r); __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 129; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_val); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_val); __Pyx_GIVEREF(__pyx_v_val); __pyx_t_3 = PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 129; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_3; __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } /* "pandas/index.pyx":130 * * cpdef get_loc(self, object val): * if is_definitely_invalid_key(val): # <<<<<<<<<<<<<< * raise TypeError * */ __pyx_t_1 = __pyx_f_6pandas_5index_is_definitely_invalid_key(__pyx_v_val); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 130; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 130; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_4) { /* "pandas/index.pyx":131 * cpdef get_loc(self, object val): * if is_definitely_invalid_key(val): * raise TypeError # <<<<<<<<<<<<<< * * if self.over_size_threshold and self.is_monotonic: */ __Pyx_Raise(__pyx_builtin_TypeError, 0, 0, 0); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 131; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } /* "pandas/index.pyx":133 * raise TypeError * * if self.over_size_threshold and self.is_monotonic: # <<<<<<<<<<<<<< * if not self.is_unique: * return self._get_loc_duplicates(val) */ __pyx_t_4 = __pyx_v_self->over_size_threshold; if (__pyx_t_4) { __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_is_monotonic); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 133; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 133; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_6 = __pyx_t_5; } else { __pyx_t_6 = __pyx_t_4; } if (__pyx_t_6) { /* "pandas/index.pyx":134 * * if self.over_size_threshold and self.is_monotonic: * if not self.is_unique: # <<<<<<<<<<<<<< * return self._get_loc_duplicates(val) * values = self._get_index_values() */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_is_unique); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 134; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 134; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_4 = ((!__pyx_t_6) != 0); if (__pyx_t_4) { /* "pandas/index.pyx":135 * if self.over_size_threshold and self.is_monotonic: * if not self.is_unique: * return self._get_loc_duplicates(val) # <<<<<<<<<<<<<< * values = self._get_index_values() * loc = _bin_search(values, val) # .searchsorted(val, side='left') */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_6pandas_5index_11IndexEngine__get_loc_duplicates(__pyx_v_self, __pyx_v_val); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 135; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; } /* "pandas/index.pyx":136 * if not self.is_unique: * return self._get_loc_duplicates(val) * values = self._get_index_values() # <<<<<<<<<<<<<< * loc = _bin_search(values, val) # .searchsorted(val, side='left') * if util.get_value_at(values, loc) != val: */ __pyx_t_1 = ((struct __pyx_vtabstruct_6pandas_5index_IndexEngine *)__pyx_v_self->__pyx_vtab)->_get_index_values(__pyx_v_self); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 136; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_v_values = __pyx_t_1; __pyx_t_1 = 0; /* "pandas/index.pyx":137 * return self._get_loc_duplicates(val) * values = self._get_index_values() * loc = _bin_search(values, val) # .searchsorted(val, side='left') # <<<<<<<<<<<<<< * if util.get_value_at(values, loc) != val: * raise KeyError(val) */ if (!(likely(((__pyx_v_values) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_values, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 137; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_7 = __pyx_f_6pandas_5index__bin_search(((PyArrayObject *)__pyx_v_values), __pyx_v_val); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 137; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_loc = __pyx_t_7; /* "pandas/index.pyx":138 * values = self._get_index_values() * loc = _bin_search(values, val) # .searchsorted(val, side='left') * if util.get_value_at(values, loc) != val: # <<<<<<<<<<<<<< * raise KeyError(val) * return loc */ if (!(likely(((__pyx_v_values) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_values, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 138; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_loc); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 138; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __pyx_f_4util_get_value_at(((PyArrayObject *)__pyx_v_values), __pyx_t_1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 138; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyObject_RichCompare(__pyx_t_3, __pyx_v_val, Py_NE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 138; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 138; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_4) { /* "pandas/index.pyx":139 * loc = _bin_search(values, val) # .searchsorted(val, side='left') * if util.get_value_at(values, loc) != val: * raise KeyError(val) # <<<<<<<<<<<<<< * return loc * */ __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 139; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_val); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_val); __Pyx_GIVEREF(__pyx_v_val); __pyx_t_3 = PyObject_Call(__pyx_builtin_KeyError, __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 139; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 139; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } /* "pandas/index.pyx":140 * if util.get_value_at(values, loc) != val: * raise KeyError(val) * return loc # <<<<<<<<<<<<<< * * self._ensure_mapping_populated() */ __Pyx_XDECREF(__pyx_r); __pyx_t_3 = PyInt_FromSsize_t(__pyx_v_loc); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 140; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; } /* "pandas/index.pyx":142 * return loc * * self._ensure_mapping_populated() # <<<<<<<<<<<<<< * if not self.unique: * return self._get_loc_duplicates(val) */ __pyx_t_3 = __pyx_f_6pandas_5index_11IndexEngine__ensure_mapping_populated(__pyx_v_self); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 142; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/index.pyx":143 * * self._ensure_mapping_populated() * if not self.unique: # <<<<<<<<<<<<<< * return self._get_loc_duplicates(val) * */ __pyx_t_4 = ((!(__pyx_v_self->unique != 0)) != 0); if (__pyx_t_4) { /* "pandas/index.pyx":144 * self._ensure_mapping_populated() * if not self.unique: * return self._get_loc_duplicates(val) # <<<<<<<<<<<<<< * * self._check_type(val) */ __Pyx_XDECREF(__pyx_r); __pyx_t_3 = __pyx_f_6pandas_5index_11IndexEngine__get_loc_duplicates(__pyx_v_self, __pyx_v_val); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 144; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; } /* "pandas/index.pyx":146 * return self._get_loc_duplicates(val) * * self._check_type(val) # <<<<<<<<<<<<<< * * try: */ __pyx_t_3 = ((struct __pyx_vtabstruct_6pandas_5index_IndexEngine *)__pyx_v_self->__pyx_vtab)->_check_type(__pyx_v_self, __pyx_v_val); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 146; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/index.pyx":148 * self._check_type(val) * * try: # <<<<<<<<<<<<<< * return self.mapping.get_item(val) * except TypeError: */ { __Pyx_ExceptionSave(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10); __Pyx_XGOTREF(__pyx_t_8); __Pyx_XGOTREF(__pyx_t_9); __Pyx_XGOTREF(__pyx_t_10); /*try:*/ { /* "pandas/index.pyx":149 * * try: * return self.mapping.get_item(val) # <<<<<<<<<<<<<< * except TypeError: * raise KeyError(val) */ __Pyx_XDECREF(__pyx_r); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->mapping), __pyx_n_s_get_item); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 149; __pyx_clineno = __LINE__; goto __pyx_L8_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 149; __pyx_clineno = __LINE__; goto __pyx_L8_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_val); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_val); __Pyx_GIVEREF(__pyx_v_val); __pyx_t_2 = PyObject_Call(__pyx_t_3, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 149; __pyx_clineno = __LINE__; goto __pyx_L8_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L12_try_return; } __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; goto __pyx_L15_try_end; __pyx_L8_error:; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/index.pyx":150 * try: * return self.mapping.get_item(val) * except TypeError: # <<<<<<<<<<<<<< * raise KeyError(val) * */ __pyx_t_11 = PyErr_ExceptionMatches(__pyx_builtin_TypeError); if (__pyx_t_11) { __Pyx_AddTraceback("pandas.index.IndexEngine.get_loc", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_1, &__pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 150; __pyx_clineno = __LINE__; goto __pyx_L10_except_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_GOTREF(__pyx_t_1); __Pyx_GOTREF(__pyx_t_3); /* "pandas/index.pyx":151 * return self.mapping.get_item(val) * except TypeError: * raise KeyError(val) # <<<<<<<<<<<<<< * * cdef inline _get_loc_duplicates(self, object val): */ __pyx_t_12 = PyTuple_New(1); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 151; __pyx_clineno = __LINE__; goto __pyx_L10_except_error;} __Pyx_GOTREF(__pyx_t_12); __Pyx_INCREF(__pyx_v_val); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_v_val); __Pyx_GIVEREF(__pyx_v_val); __pyx_t_13 = PyObject_Call(__pyx_builtin_KeyError, __pyx_t_12, NULL); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 151; __pyx_clineno = __LINE__; goto __pyx_L10_except_error;} __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_Raise(__pyx_t_13, 0, 0, 0); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 151; __pyx_clineno = __LINE__; goto __pyx_L10_except_error;} __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; goto __pyx_L9_exception_handled; } goto __pyx_L10_except_error; __pyx_L10_except_error:; __Pyx_XGIVEREF(__pyx_t_8); __Pyx_XGIVEREF(__pyx_t_9); __Pyx_XGIVEREF(__pyx_t_10); __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_9, __pyx_t_10); goto __pyx_L1_error; __pyx_L12_try_return:; __Pyx_XGIVEREF(__pyx_t_8); __Pyx_XGIVEREF(__pyx_t_9); __Pyx_XGIVEREF(__pyx_t_10); __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_9, __pyx_t_10); goto __pyx_L0; __pyx_L9_exception_handled:; __Pyx_XGIVEREF(__pyx_t_8); __Pyx_XGIVEREF(__pyx_t_9); __Pyx_XGIVEREF(__pyx_t_10); __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_9, __pyx_t_10); __pyx_L15_try_end:; } /* "pandas/index.pyx":129 * util.set_value_at(arr, loc, value) * * cpdef get_loc(self, object val): # <<<<<<<<<<<<<< * if is_definitely_invalid_key(val): * raise TypeError */ /* 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_12); __Pyx_XDECREF(__pyx_t_13); __Pyx_AddTraceback("pandas.index.IndexEngine.get_loc", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_values); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5index_11IndexEngine_9get_loc(PyObject *__pyx_v_self, PyObject *__pyx_v_val); /*proto*/ static PyObject *__pyx_pw_6pandas_5index_11IndexEngine_9get_loc(PyObject *__pyx_v_self, PyObject *__pyx_v_val) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("get_loc (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_5index_11IndexEngine_8get_loc(((struct __pyx_obj_6pandas_5index_IndexEngine *)__pyx_v_self), ((PyObject *)__pyx_v_val)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5index_11IndexEngine_8get_loc(struct __pyx_obj_6pandas_5index_IndexEngine *__pyx_v_self, PyObject *__pyx_v_val) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_loc", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = ((struct __pyx_vtabstruct_6pandas_5index_IndexEngine *)__pyx_v_self->__pyx_vtab)->get_loc(__pyx_v_self, __pyx_v_val, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 129; __pyx_clineno = __LINE__; goto __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.index.IndexEngine.get_loc", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/index.pyx":153 * raise KeyError(val) * * cdef inline _get_loc_duplicates(self, object val): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t diff */ static CYTHON_INLINE PyObject *__pyx_f_6pandas_5index_11IndexEngine__get_loc_duplicates(struct __pyx_obj_6pandas_5index_IndexEngine *__pyx_v_self, PyObject *__pyx_v_val) { Py_ssize_t __pyx_v_diff; PyObject *__pyx_v_values = NULL; PyObject *__pyx_v_left = NULL; PyObject *__pyx_v_right = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; Py_ssize_t __pyx_t_6; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_get_loc_duplicates", 0); /* "pandas/index.pyx":157 * Py_ssize_t diff * * if self.is_monotonic: # <<<<<<<<<<<<<< * values = self._get_index_values() * left = values.searchsorted(val, side='left') */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_is_monotonic); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_2) { /* "pandas/index.pyx":158 * * if self.is_monotonic: * values = self._get_index_values() # <<<<<<<<<<<<<< * left = values.searchsorted(val, side='left') * right = values.searchsorted(val, side='right') */ __pyx_t_1 = ((struct __pyx_vtabstruct_6pandas_5index_IndexEngine *)__pyx_v_self->__pyx_vtab)->_get_index_values(__pyx_v_self); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 158; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_v_values = __pyx_t_1; __pyx_t_1 = 0; /* "pandas/index.pyx":159 * if self.is_monotonic: * values = self._get_index_values() * left = values.searchsorted(val, side='left') # <<<<<<<<<<<<<< * right = values.searchsorted(val, side='right') * */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_values, __pyx_n_s_searchsorted); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 159; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 159; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_v_val); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_val); __Pyx_GIVEREF(__pyx_v_val); __pyx_t_4 = PyDict_New(); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 159; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_side, __pyx_n_s_left) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 159; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_5 = PyObject_Call(__pyx_t_1, __pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 159; __pyx_clineno = __LINE__; goto __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; __pyx_v_left = __pyx_t_5; __pyx_t_5 = 0; /* "pandas/index.pyx":160 * values = self._get_index_values() * left = values.searchsorted(val, side='left') * right = values.searchsorted(val, side='right') # <<<<<<<<<<<<<< * * diff = right - left */ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_values, __pyx_n_s_searchsorted); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 160; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 160; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_v_val); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_val); __Pyx_GIVEREF(__pyx_v_val); __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 160; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_side, __pyx_n_s_right) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 160; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_1 = PyObject_Call(__pyx_t_5, __pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 160; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_right = __pyx_t_1; __pyx_t_1 = 0; /* "pandas/index.pyx":162 * right = values.searchsorted(val, side='right') * * diff = right - left # <<<<<<<<<<<<<< * if diff == 0: * raise KeyError(val) */ __pyx_t_1 = PyNumber_Subtract(__pyx_v_right, __pyx_v_left); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 162; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_6 = __Pyx_PyIndex_AsSsize_t(__pyx_t_1); if (unlikely((__pyx_t_6 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 162; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_diff = __pyx_t_6; /* "pandas/index.pyx":165 * if diff == 0: * raise KeyError(val) * elif diff == 1: # <<<<<<<<<<<<<< * return left * else: */ switch (__pyx_v_diff) { /* "pandas/index.pyx":163 * * diff = right - left * if diff == 0: # <<<<<<<<<<<<<< * raise KeyError(val) * elif diff == 1: */ case 0: /* "pandas/index.pyx":164 * diff = right - left * if diff == 0: * raise KeyError(val) # <<<<<<<<<<<<<< * elif diff == 1: * return left */ __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 164; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_val); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_val); __Pyx_GIVEREF(__pyx_v_val); __pyx_t_3 = PyObject_Call(__pyx_builtin_KeyError, __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 164; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 164; __pyx_clineno = __LINE__; goto __pyx_L1_error;} break; /* "pandas/index.pyx":165 * if diff == 0: * raise KeyError(val) * elif diff == 1: # <<<<<<<<<<<<<< * return left * else: */ case 1: /* "pandas/index.pyx":166 * raise KeyError(val) * elif diff == 1: * return left # <<<<<<<<<<<<<< * else: * return slice(left, right) */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_left); __pyx_r = __pyx_v_left; goto __pyx_L0; break; default: /* "pandas/index.pyx":168 * return left * else: * return slice(left, right) # <<<<<<<<<<<<<< * else: * return self._maybe_get_bool_indexer(val) */ __Pyx_XDECREF(__pyx_r); __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_v_left); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_left); __Pyx_GIVEREF(__pyx_v_left); __Pyx_INCREF(__pyx_v_right); PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_right); __Pyx_GIVEREF(__pyx_v_right); __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)(&PySlice_Type))), __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; break; } } /*else*/ { /* "pandas/index.pyx":170 * return slice(left, right) * else: * return self._maybe_get_bool_indexer(val) # <<<<<<<<<<<<<< * * cdef _maybe_get_bool_indexer(self, object val): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = ((struct __pyx_vtabstruct_6pandas_5index_IndexEngine *)__pyx_v_self->__pyx_vtab)->_maybe_get_bool_indexer(__pyx_v_self, __pyx_v_val); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 170; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; } /* "pandas/index.pyx":153 * raise KeyError(val) * * cdef inline _get_loc_duplicates(self, object val): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t diff */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("pandas.index.IndexEngine._get_loc_duplicates", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_values); __Pyx_XDECREF(__pyx_v_left); __Pyx_XDECREF(__pyx_v_right); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/index.pyx":172 * return self._maybe_get_bool_indexer(val) * * cdef _maybe_get_bool_indexer(self, object val): # <<<<<<<<<<<<<< * cdef: * ndarray[uint8_t] indexer */ static PyObject *__pyx_f_6pandas_5index_11IndexEngine__maybe_get_bool_indexer(struct __pyx_obj_6pandas_5index_IndexEngine *__pyx_v_self, PyObject *__pyx_v_val) { PyArrayObject *__pyx_v_indexer = 0; PyArrayObject *__pyx_v_values = 0; int __pyx_v_count; Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_n; int __pyx_v_last_true; PyObject *__pyx_v_result = NULL; __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 PyObject *__pyx_t_1 = NULL; PyArrayObject *__pyx_t_2 = NULL; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; Py_ssize_t __pyx_t_7; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; PyArrayObject *__pyx_t_11 = NULL; Py_ssize_t __pyx_t_12; Py_ssize_t __pyx_t_13; int __pyx_t_14; Py_ssize_t __pyx_t_15; Py_ssize_t __pyx_t_16; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_maybe_get_bool_indexer", 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; /* "pandas/index.pyx":176 * ndarray[uint8_t] indexer * ndarray[object] values * int count = 0 # <<<<<<<<<<<<<< * Py_ssize_t i, n * int last_true */ __pyx_v_count = 0; /* "pandas/index.pyx":180 * int last_true * * values = self._get_index_values() # <<<<<<<<<<<<<< * n = len(values) * */ __pyx_t_1 = ((struct __pyx_vtabstruct_6pandas_5index_IndexEngine *)__pyx_v_self->__pyx_vtab)->_get_index_values(__pyx_v_self); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_2 = ((PyArrayObject *)__pyx_t_1); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_t_3 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_values.rcbuffer->pybuffer, (PyObject*)__pyx_t_2, &__Pyx_TypeInfo_object, 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_values.rcbuffer->pybuffer, (PyObject*)__pyx_v_values, &__Pyx_TypeInfo_object, 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_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]; if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_2 = 0; __pyx_v_values = ((PyArrayObject *)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/index.pyx":181 * * values = self._get_index_values() * n = len(values) # <<<<<<<<<<<<<< * * result = np.empty(n, dtype=bool) */ __pyx_t_7 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 181; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_7; /* "pandas/index.pyx":183 * n = len(values) * * result = np.empty(n, dtype=bool) # <<<<<<<<<<<<<< * indexer = result.view(np.uint8) * */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 183; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_empty); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 183; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_n); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 183; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 183; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 183; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_dtype, ((PyObject*)&PyBool_Type)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 183; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_10 = PyObject_Call(__pyx_t_8, __pyx_t_9, __pyx_t_1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 183; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_result = __pyx_t_10; __pyx_t_10 = 0; /* "pandas/index.pyx":184 * * result = np.empty(n, dtype=bool) * indexer = result.view(np.uint8) # <<<<<<<<<<<<<< * * for i in range(n): */ __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_result, __pyx_n_s_view); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 184; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 184; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_uint8); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 184; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 184; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_9); __Pyx_GIVEREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_9 = PyObject_Call(__pyx_t_10, __pyx_t_1, NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 184; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (!(likely(((__pyx_t_9) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_9, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 184; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_11 = ((PyArrayObject *)__pyx_t_9); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer); __pyx_t_3 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer, (PyObject*)__pyx_t_11, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 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_indexer.rcbuffer->pybuffer, (PyObject*)__pyx_v_indexer, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 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_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_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 184; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_11 = 0; __pyx_v_indexer = ((PyArrayObject *)__pyx_t_9); __pyx_t_9 = 0; /* "pandas/index.pyx":186 * indexer = result.view(np.uint8) * * for i in range(n): # <<<<<<<<<<<<<< * if values[i] == val: * count += 1 */ __pyx_t_7 = __pyx_v_n; for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_7; __pyx_t_12+=1) { __pyx_v_i = __pyx_t_12; /* "pandas/index.pyx":187 * * for i in range(n): * if values[i] == val: # <<<<<<<<<<<<<< * count += 1 * indexer[i] = 1 */ __pyx_t_13 = __pyx_v_i; __pyx_t_3 = -1; if (__pyx_t_13 < 0) { __pyx_t_13 += __pyx_pybuffernd_values.diminfo[0].shape; if (unlikely(__pyx_t_13 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_13 >= __pyx_pybuffernd_values.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 187; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_9 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_values.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_9); __pyx_t_1 = PyObject_RichCompare(__pyx_t_9, __pyx_v_val, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 187; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_14 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_14 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 187; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_14) { /* "pandas/index.pyx":188 * for i in range(n): * if values[i] == val: * count += 1 # <<<<<<<<<<<<<< * indexer[i] = 1 * last_true = i */ __pyx_v_count = (__pyx_v_count + 1); /* "pandas/index.pyx":189 * if values[i] == val: * count += 1 * indexer[i] = 1 # <<<<<<<<<<<<<< * last_true = i * else: */ __pyx_t_15 = __pyx_v_i; __pyx_t_3 = -1; if (__pyx_t_15 < 0) { __pyx_t_15 += __pyx_pybuffernd_indexer.diminfo[0].shape; if (unlikely(__pyx_t_15 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_15 >= __pyx_pybuffernd_indexer.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 189; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_indexer.diminfo[0].strides) = 1; /* "pandas/index.pyx":190 * count += 1 * indexer[i] = 1 * last_true = i # <<<<<<<<<<<<<< * else: * indexer[i] = 0 */ __pyx_v_last_true = __pyx_v_i; goto __pyx_L5; } /*else*/ { /* "pandas/index.pyx":192 * last_true = i * else: * indexer[i] = 0 # <<<<<<<<<<<<<< * * if count == 0: */ __pyx_t_16 = __pyx_v_i; __pyx_t_3 = -1; if (__pyx_t_16 < 0) { __pyx_t_16 += __pyx_pybuffernd_indexer.diminfo[0].shape; if (unlikely(__pyx_t_16 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_16 >= __pyx_pybuffernd_indexer.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 192; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_indexer.diminfo[0].strides) = 0; } __pyx_L5:; } /* "pandas/index.pyx":194 * indexer[i] = 0 * * if count == 0: # <<<<<<<<<<<<<< * raise KeyError(val) * if count == 1: */ __pyx_t_14 = ((__pyx_v_count == 0) != 0); if (__pyx_t_14) { /* "pandas/index.pyx":195 * * if count == 0: * raise KeyError(val) # <<<<<<<<<<<<<< * if count == 1: * return last_true */ __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 195; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_val); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_val); __Pyx_GIVEREF(__pyx_v_val); __pyx_t_9 = PyObject_Call(__pyx_builtin_KeyError, __pyx_t_1, NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 195; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_Raise(__pyx_t_9, 0, 0, 0); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 195; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } /* "pandas/index.pyx":196 * if count == 0: * raise KeyError(val) * if count == 1: # <<<<<<<<<<<<<< * return last_true * */ __pyx_t_14 = ((__pyx_v_count == 1) != 0); if (__pyx_t_14) { /* "pandas/index.pyx":197 * raise KeyError(val) * if count == 1: * return last_true # <<<<<<<<<<<<<< * * return result */ __Pyx_XDECREF(__pyx_r); __pyx_t_9 = __Pyx_PyInt_From_int(__pyx_v_last_true); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 197; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_r = __pyx_t_9; __pyx_t_9 = 0; goto __pyx_L0; } /* "pandas/index.pyx":199 * return last_true * * return result # <<<<<<<<<<<<<< * * property is_unique: */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_result); __pyx_r = __pyx_v_result; goto __pyx_L0; /* "pandas/index.pyx":172 * return self._maybe_get_bool_indexer(val) * * cdef _maybe_get_bool_indexer(self, object val): # <<<<<<<<<<<<<< * cdef: * ndarray[uint8_t] indexer */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); __Pyx_XDECREF(__pyx_t_10); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __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.index.IndexEngine._maybe_get_bool_indexer", __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_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_indexer); __Pyx_XDECREF((PyObject *)__pyx_v_values); __Pyx_XDECREF(__pyx_v_result); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/index.pyx":203 * property is_unique: * * def __get__(self): # <<<<<<<<<<<<<< * if not self.unique_check: * self._do_unique_check() */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5index_11IndexEngine_9is_unique_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6pandas_5index_11IndexEngine_9is_unique_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_5index_11IndexEngine_9is_unique___get__(((struct __pyx_obj_6pandas_5index_IndexEngine *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5index_11IndexEngine_9is_unique___get__(struct __pyx_obj_6pandas_5index_IndexEngine *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); /* "pandas/index.pyx":204 * * def __get__(self): * if not self.unique_check: # <<<<<<<<<<<<<< * self._do_unique_check() * */ __pyx_t_1 = ((!(__pyx_v_self->unique_check != 0)) != 0); if (__pyx_t_1) { /* "pandas/index.pyx":205 * def __get__(self): * if not self.unique_check: * self._do_unique_check() # <<<<<<<<<<<<<< * * return self.unique == 1 */ __pyx_t_2 = __pyx_f_6pandas_5index_11IndexEngine__do_unique_check(__pyx_v_self); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 205; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; goto __pyx_L3; } __pyx_L3:; /* "pandas/index.pyx":207 * self._do_unique_check() * * return self.unique == 1 # <<<<<<<<<<<<<< * * property is_monotonic: */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyBool_FromLong((__pyx_v_self->unique == 1)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 207; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "pandas/index.pyx":203 * property is_unique: * * def __get__(self): # <<<<<<<<<<<<<< * if not self.unique_check: * self._do_unique_check() */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("pandas.index.IndexEngine.is_unique.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/index.pyx":211 * property is_monotonic: * * def __get__(self): # <<<<<<<<<<<<<< * if not self.monotonic_check: * self._do_monotonic_check() */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5index_11IndexEngine_12is_monotonic_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6pandas_5index_11IndexEngine_12is_monotonic_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_5index_11IndexEngine_12is_monotonic___get__(((struct __pyx_obj_6pandas_5index_IndexEngine *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5index_11IndexEngine_12is_monotonic___get__(struct __pyx_obj_6pandas_5index_IndexEngine *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); /* "pandas/index.pyx":212 * * def __get__(self): * if not self.monotonic_check: # <<<<<<<<<<<<<< * self._do_monotonic_check() * */ __pyx_t_1 = ((!(__pyx_v_self->monotonic_check != 0)) != 0); if (__pyx_t_1) { /* "pandas/index.pyx":213 * def __get__(self): * if not self.monotonic_check: * self._do_monotonic_check() # <<<<<<<<<<<<<< * * return self.monotonic == 1 */ __pyx_t_2 = __pyx_f_6pandas_5index_11IndexEngine__do_monotonic_check(__pyx_v_self); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 213; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; goto __pyx_L3; } __pyx_L3:; /* "pandas/index.pyx":215 * self._do_monotonic_check() * * return self.monotonic == 1 # <<<<<<<<<<<<<< * * cdef inline _do_monotonic_check(self): */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyBool_FromLong((__pyx_v_self->monotonic == 1)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 215; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "pandas/index.pyx":211 * property is_monotonic: * * def __get__(self): # <<<<<<<<<<<<<< * if not self.monotonic_check: * self._do_monotonic_check() */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("pandas.index.IndexEngine.is_monotonic.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/index.pyx":217 * return self.monotonic == 1 * * cdef inline _do_monotonic_check(self): # <<<<<<<<<<<<<< * try: * values = self._get_index_values() */ static CYTHON_INLINE PyObject *__pyx_f_6pandas_5index_11IndexEngine__do_monotonic_check(struct __pyx_obj_6pandas_5index_IndexEngine *__pyx_v_self) { PyObject *__pyx_v_values = NULL; PyObject *__pyx_v_unique = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *(*__pyx_t_8)(PyObject *); int __pyx_t_9; int __pyx_t_10; int __pyx_t_11; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_do_monotonic_check", 0); /* "pandas/index.pyx":218 * * cdef inline _do_monotonic_check(self): * try: # <<<<<<<<<<<<<< * values = self._get_index_values() * self.monotonic, unique = self._call_monotonic(values) */ { __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:*/ { /* "pandas/index.pyx":219 * cdef inline _do_monotonic_check(self): * try: * values = self._get_index_values() # <<<<<<<<<<<<<< * self.monotonic, unique = self._call_monotonic(values) * */ __pyx_t_4 = ((struct __pyx_vtabstruct_6pandas_5index_IndexEngine *)__pyx_v_self->__pyx_vtab)->_get_index_values(__pyx_v_self); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 219; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_v_values = __pyx_t_4; __pyx_t_4 = 0; /* "pandas/index.pyx":220 * try: * values = self._get_index_values() * self.monotonic, unique = self._call_monotonic(values) # <<<<<<<<<<<<<< * * if unique is not None: */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_call_monotonic); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 220; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 220; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_v_values); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_values); __Pyx_GIVEREF(__pyx_v_values); __pyx_t_6 = PyObject_Call(__pyx_t_4, __pyx_t_5, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 220; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if ((likely(PyTuple_CheckExact(__pyx_t_6))) || (PyList_CheckExact(__pyx_t_6))) { PyObject* sequence = __pyx_t_6; #if CYTHON_COMPILING_IN_CPYTHON Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 220; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_5 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_4 = PyTuple_GET_ITEM(sequence, 1); } else { __pyx_t_5 = PyList_GET_ITEM(sequence, 0); __pyx_t_4 = PyList_GET_ITEM(sequence, 1); } __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(__pyx_t_4); #else __pyx_t_5 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 220; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 220; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_4); #endif __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } else { Py_ssize_t index = -1; __pyx_t_7 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 220; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_8 = Py_TYPE(__pyx_t_7)->tp_iternext; index = 0; __pyx_t_5 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_5)) goto __pyx_L11_unpacking_failed; __Pyx_GOTREF(__pyx_t_5); index = 1; __pyx_t_4 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_4)) goto __pyx_L11_unpacking_failed; __Pyx_GOTREF(__pyx_t_4); if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_7), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 220; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_t_8 = NULL; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; goto __pyx_L12_unpacking_done; __pyx_L11_unpacking_failed:; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_8 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 220; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L12_unpacking_done:; } __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_9 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 220; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_v_self->monotonic = __pyx_t_9; __pyx_v_unique = __pyx_t_4; __pyx_t_4 = 0; /* "pandas/index.pyx":222 * self.monotonic, unique = self._call_monotonic(values) * * if unique is not None: # <<<<<<<<<<<<<< * self.unique = unique * self.unique_check = 1 */ __pyx_t_9 = (__pyx_v_unique != Py_None); __pyx_t_10 = (__pyx_t_9 != 0); if (__pyx_t_10) { /* "pandas/index.pyx":223 * * if unique is not None: * self.unique = unique # <<<<<<<<<<<<<< * self.unique_check = 1 * */ __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_v_unique); if (unlikely((__pyx_t_10 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 223; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_self->unique = __pyx_t_10; /* "pandas/index.pyx":224 * if unique is not None: * self.unique = unique * self.unique_check = 1 # <<<<<<<<<<<<<< * * except TypeError: */ __pyx_v_self->unique_check = 1; goto __pyx_L13; } __pyx_L13:; } __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L10_try_end; __pyx_L3_error:; __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; /* "pandas/index.pyx":226 * self.unique_check = 1 * * except TypeError: # <<<<<<<<<<<<<< * self.monotonic = 0 * self.monotonic_check = 1 */ __pyx_t_11 = PyErr_ExceptionMatches(__pyx_builtin_TypeError); if (__pyx_t_11) { __Pyx_AddTraceback("pandas.index.IndexEngine._do_monotonic_check", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_4, &__pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 226; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_GOTREF(__pyx_t_4); __Pyx_GOTREF(__pyx_t_5); /* "pandas/index.pyx":227 * * except TypeError: * self.monotonic = 0 # <<<<<<<<<<<<<< * self.monotonic_check = 1 * */ __pyx_v_self->monotonic = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; goto __pyx_L4_exception_handled; } goto __pyx_L5_except_error; __pyx_L5_except_error:; __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); goto __pyx_L1_error; __pyx_L4_exception_handled:; __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); __pyx_L10_try_end:; } /* "pandas/index.pyx":228 * except TypeError: * self.monotonic = 0 * self.monotonic_check = 1 # <<<<<<<<<<<<<< * * cdef _get_index_values(self): */ __pyx_v_self->monotonic_check = 1; /* "pandas/index.pyx":217 * return self.monotonic == 1 * * cdef inline _do_monotonic_check(self): # <<<<<<<<<<<<<< * try: * values = self._get_index_values() */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_AddTraceback("pandas.index.IndexEngine._do_monotonic_check", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_values); __Pyx_XDECREF(__pyx_v_unique); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/index.pyx":230 * self.monotonic_check = 1 * * cdef _get_index_values(self): # <<<<<<<<<<<<<< * return self.vgetter() * */ static PyObject *__pyx_f_6pandas_5index_11IndexEngine__get_index_values(struct __pyx_obj_6pandas_5index_IndexEngine *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_get_index_values", 0); /* "pandas/index.pyx":231 * * cdef _get_index_values(self): * return self.vgetter() # <<<<<<<<<<<<<< * * cdef inline _do_unique_check(self): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyObject_Call(__pyx_v_self->vgetter, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 231; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "pandas/index.pyx":230 * self.monotonic_check = 1 * * cdef _get_index_values(self): # <<<<<<<<<<<<<< * return self.vgetter() * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas.index.IndexEngine._get_index_values", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/index.pyx":233 * return self.vgetter() * * cdef inline _do_unique_check(self): # <<<<<<<<<<<<<< * self._ensure_mapping_populated() * */ static CYTHON_INLINE PyObject *__pyx_f_6pandas_5index_11IndexEngine__do_unique_check(struct __pyx_obj_6pandas_5index_IndexEngine *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_do_unique_check", 0); /* "pandas/index.pyx":234 * * cdef inline _do_unique_check(self): * self._ensure_mapping_populated() # <<<<<<<<<<<<<< * * def _call_monotonic(self, values): */ __pyx_t_1 = __pyx_f_6pandas_5index_11IndexEngine__ensure_mapping_populated(__pyx_v_self); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 234; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pandas/index.pyx":233 * return self.vgetter() * * cdef inline _do_unique_check(self): # <<<<<<<<<<<<<< * self._ensure_mapping_populated() * */ /* 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.index.IndexEngine._do_unique_check", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/index.pyx":236 * self._ensure_mapping_populated() * * def _call_monotonic(self, values): # <<<<<<<<<<<<<< * raise NotImplementedError * */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5index_11IndexEngine_11_call_monotonic(PyObject *__pyx_v_self, PyObject *__pyx_v_values); /*proto*/ static PyObject *__pyx_pw_6pandas_5index_11IndexEngine_11_call_monotonic(PyObject *__pyx_v_self, PyObject *__pyx_v_values) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_call_monotonic (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_5index_11IndexEngine_10_call_monotonic(((struct __pyx_obj_6pandas_5index_IndexEngine *)__pyx_v_self), ((PyObject *)__pyx_v_values)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5index_11IndexEngine_10_call_monotonic(CYTHON_UNUSED struct __pyx_obj_6pandas_5index_IndexEngine *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_values) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_call_monotonic", 0); /* "pandas/index.pyx":237 * * def _call_monotonic(self, values): * raise NotImplementedError # <<<<<<<<<<<<<< * * cdef _make_hash_table(self, n): */ __Pyx_Raise(__pyx_builtin_NotImplementedError, 0, 0, 0); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 237; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/index.pyx":236 * self._ensure_mapping_populated() * * def _call_monotonic(self, values): # <<<<<<<<<<<<<< * raise NotImplementedError * */ /* function exit code */ __pyx_L1_error:; __Pyx_AddTraceback("pandas.index.IndexEngine._call_monotonic", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/index.pyx":239 * raise NotImplementedError * * cdef _make_hash_table(self, n): # <<<<<<<<<<<<<< * raise NotImplementedError * */ static PyObject *__pyx_f_6pandas_5index_11IndexEngine__make_hash_table(CYTHON_UNUSED struct __pyx_obj_6pandas_5index_IndexEngine *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_n) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_make_hash_table", 0); /* "pandas/index.pyx":240 * * cdef _make_hash_table(self, n): * raise NotImplementedError # <<<<<<<<<<<<<< * * cdef _check_type(self, object val): */ __Pyx_Raise(__pyx_builtin_NotImplementedError, 0, 0, 0); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 240; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/index.pyx":239 * raise NotImplementedError * * cdef _make_hash_table(self, n): # <<<<<<<<<<<<<< * raise NotImplementedError * */ /* function exit code */ __pyx_L1_error:; __Pyx_AddTraceback("pandas.index.IndexEngine._make_hash_table", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/index.pyx":242 * raise NotImplementedError * * cdef _check_type(self, object val): # <<<<<<<<<<<<<< * hash(val) * */ static PyObject *__pyx_f_6pandas_5index_11IndexEngine__check_type(CYTHON_UNUSED struct __pyx_obj_6pandas_5index_IndexEngine *__pyx_v_self, PyObject *__pyx_v_val) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_hash_t __pyx_t_1; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_check_type", 0); /* "pandas/index.pyx":243 * * cdef _check_type(self, object val): * hash(val) # <<<<<<<<<<<<<< * * cdef inline _ensure_mapping_populated(self): */ __pyx_t_1 = PyObject_Hash(__pyx_v_val); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/index.pyx":242 * raise NotImplementedError * * cdef _check_type(self, object val): # <<<<<<<<<<<<<< * hash(val) * */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("pandas.index.IndexEngine._check_type", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/index.pyx":245 * hash(val) * * cdef inline _ensure_mapping_populated(self): # <<<<<<<<<<<<<< * if not self.initialized: * self.initialize() */ static CYTHON_INLINE PyObject *__pyx_f_6pandas_5index_11IndexEngine__ensure_mapping_populated(struct __pyx_obj_6pandas_5index_IndexEngine *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_ensure_mapping_populated", 0); /* "pandas/index.pyx":246 * * cdef inline _ensure_mapping_populated(self): * if not self.initialized: # <<<<<<<<<<<<<< * self.initialize() * */ __pyx_t_1 = ((!(__pyx_v_self->initialized != 0)) != 0); if (__pyx_t_1) { /* "pandas/index.pyx":247 * cdef inline _ensure_mapping_populated(self): * if not self.initialized: * self.initialize() # <<<<<<<<<<<<<< * * cdef initialize(self): */ __pyx_t_2 = ((struct __pyx_vtabstruct_6pandas_5index_IndexEngine *)__pyx_v_self->__pyx_vtab)->initialize(__pyx_v_self); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 247; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; goto __pyx_L3; } __pyx_L3:; /* "pandas/index.pyx":245 * hash(val) * * cdef inline _ensure_mapping_populated(self): # <<<<<<<<<<<<<< * if not self.initialized: * self.initialize() */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("pandas.index.IndexEngine._ensure_mapping_populated", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/index.pyx":249 * self.initialize() * * cdef initialize(self): # <<<<<<<<<<<<<< * values = self._get_index_values() * */ static PyObject *__pyx_f_6pandas_5index_11IndexEngine_initialize(struct __pyx_obj_6pandas_5index_IndexEngine *__pyx_v_self) { PyObject *__pyx_v_values = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; Py_ssize_t __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; Py_ssize_t __pyx_t_5; int __pyx_t_6; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("initialize", 0); /* "pandas/index.pyx":250 * * cdef initialize(self): * values = self._get_index_values() # <<<<<<<<<<<<<< * * self.mapping = self._make_hash_table(len(values)) */ __pyx_t_1 = ((struct __pyx_vtabstruct_6pandas_5index_IndexEngine *)__pyx_v_self->__pyx_vtab)->_get_index_values(__pyx_v_self); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 250; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_v_values = __pyx_t_1; __pyx_t_1 = 0; /* "pandas/index.pyx":252 * values = self._get_index_values() * * self.mapping = self._make_hash_table(len(values)) # <<<<<<<<<<<<<< * self.mapping.map_locations(values) * */ __pyx_t_2 = PyObject_Length(__pyx_v_values); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 252; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 252; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = ((struct __pyx_vtabstruct_6pandas_5index_IndexEngine *)__pyx_v_self->__pyx_vtab)->_make_hash_table(__pyx_v_self, __pyx_t_1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 252; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_6pandas_9hashtable_HashTable))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 252; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GIVEREF(__pyx_t_3); __Pyx_GOTREF(__pyx_v_self->mapping); __Pyx_DECREF(((PyObject *)__pyx_v_self->mapping)); __pyx_v_self->mapping = ((struct __pyx_obj_6pandas_9hashtable_HashTable *)__pyx_t_3); __pyx_t_3 = 0; /* "pandas/index.pyx":253 * * self.mapping = self._make_hash_table(len(values)) * self.mapping.map_locations(values) # <<<<<<<<<<<<<< * * if len(self.mapping) == len(values): */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->mapping), __pyx_n_s_map_locations); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 253; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 253; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_values); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_values); __Pyx_GIVEREF(__pyx_v_values); __pyx_t_4 = PyObject_Call(__pyx_t_3, __pyx_t_1, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 253; __pyx_clineno = __LINE__; goto __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_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "pandas/index.pyx":255 * self.mapping.map_locations(values) * * if len(self.mapping) == len(values): # <<<<<<<<<<<<<< * self.unique = 1 * self.unique_check = 1 */ __pyx_t_4 = ((PyObject *)__pyx_v_self->mapping); __Pyx_INCREF(__pyx_t_4); __pyx_t_2 = PyObject_Length(__pyx_t_4); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 255; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_5 = PyObject_Length(__pyx_v_values); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 255; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_6 = ((__pyx_t_2 == __pyx_t_5) != 0); if (__pyx_t_6) { /* "pandas/index.pyx":256 * * if len(self.mapping) == len(values): * self.unique = 1 # <<<<<<<<<<<<<< * self.unique_check = 1 * */ __pyx_v_self->unique = 1; /* "pandas/index.pyx":257 * if len(self.mapping) == len(values): * self.unique = 1 * self.unique_check = 1 # <<<<<<<<<<<<<< * * self.initialized = 1 */ __pyx_v_self->unique_check = 1; goto __pyx_L3; } __pyx_L3:; /* "pandas/index.pyx":259 * self.unique_check = 1 * * self.initialized = 1 # <<<<<<<<<<<<<< * * def clear_mapping(self): */ __pyx_v_self->initialized = 1; /* "pandas/index.pyx":249 * self.initialize() * * cdef initialize(self): # <<<<<<<<<<<<<< * values = self._get_index_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_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("pandas.index.IndexEngine.initialize", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_values); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/index.pyx":261 * self.initialized = 1 * * def clear_mapping(self): # <<<<<<<<<<<<<< * self.mapping = None * self.initialized = 0 */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5index_11IndexEngine_13clear_mapping(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static PyObject *__pyx_pw_6pandas_5index_11IndexEngine_13clear_mapping(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("clear_mapping (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_5index_11IndexEngine_12clear_mapping(((struct __pyx_obj_6pandas_5index_IndexEngine *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5index_11IndexEngine_12clear_mapping(struct __pyx_obj_6pandas_5index_IndexEngine *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("clear_mapping", 0); /* "pandas/index.pyx":262 * * def clear_mapping(self): * self.mapping = None # <<<<<<<<<<<<<< * self.initialized = 0 * */ __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->mapping); __Pyx_DECREF(((PyObject *)__pyx_v_self->mapping)); __pyx_v_self->mapping = ((struct __pyx_obj_6pandas_9hashtable_HashTable *)Py_None); /* "pandas/index.pyx":263 * def clear_mapping(self): * self.mapping = None * self.initialized = 0 # <<<<<<<<<<<<<< * * def get_indexer(self, values): */ __pyx_v_self->initialized = 0; /* "pandas/index.pyx":261 * self.initialized = 1 * * def clear_mapping(self): # <<<<<<<<<<<<<< * self.mapping = None * self.initialized = 0 */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/index.pyx":265 * self.initialized = 0 * * def get_indexer(self, values): # <<<<<<<<<<<<<< * self._ensure_mapping_populated() * return self.mapping.lookup(values) */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5index_11IndexEngine_15get_indexer(PyObject *__pyx_v_self, PyObject *__pyx_v_values); /*proto*/ static PyObject *__pyx_pw_6pandas_5index_11IndexEngine_15get_indexer(PyObject *__pyx_v_self, PyObject *__pyx_v_values) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("get_indexer (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_5index_11IndexEngine_14get_indexer(((struct __pyx_obj_6pandas_5index_IndexEngine *)__pyx_v_self), ((PyObject *)__pyx_v_values)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5index_11IndexEngine_14get_indexer(struct __pyx_obj_6pandas_5index_IndexEngine *__pyx_v_self, PyObject *__pyx_v_values) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_indexer", 0); /* "pandas/index.pyx":266 * * def get_indexer(self, values): * self._ensure_mapping_populated() # <<<<<<<<<<<<<< * return self.mapping.lookup(values) * */ __pyx_t_1 = __pyx_f_6pandas_5index_11IndexEngine__ensure_mapping_populated(__pyx_v_self); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 266; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pandas/index.pyx":267 * def get_indexer(self, values): * self._ensure_mapping_populated() * return self.mapping.lookup(values) # <<<<<<<<<<<<<< * * def get_indexer_non_unique(self, targets): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->mapping), __pyx_n_s_lookup); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 267; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 267; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_values); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_values); __Pyx_GIVEREF(__pyx_v_values); __pyx_t_3 = PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 267; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; /* "pandas/index.pyx":265 * self.initialized = 0 * * def get_indexer(self, values): # <<<<<<<<<<<<<< * self._ensure_mapping_populated() * return self.mapping.lookup(values) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("pandas.index.IndexEngine.get_indexer", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/index.pyx":269 * return self.mapping.lookup(values) * * def get_indexer_non_unique(self, targets): # <<<<<<<<<<<<<< * """ return an indexer suitable for takng from a non unique index * return the labels in the same order ast the target */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5index_11IndexEngine_17get_indexer_non_unique(PyObject *__pyx_v_self, PyObject *__pyx_v_targets); /*proto*/ static char __pyx_doc_6pandas_5index_11IndexEngine_16get_indexer_non_unique[] = " return an indexer suitable for takng from a non unique index\n return the labels in the same order ast the target\n and a missing indexer into the targets (which correspond\n to the -1 indicies in the results "; static PyObject *__pyx_pw_6pandas_5index_11IndexEngine_17get_indexer_non_unique(PyObject *__pyx_v_self, PyObject *__pyx_v_targets) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("get_indexer_non_unique (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_5index_11IndexEngine_16get_indexer_non_unique(((struct __pyx_obj_6pandas_5index_IndexEngine *)__pyx_v_self), ((PyObject *)__pyx_v_targets)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5index_11IndexEngine_16get_indexer_non_unique(struct __pyx_obj_6pandas_5index_IndexEngine *__pyx_v_self, PyObject *__pyx_v_targets) { PyArrayObject *__pyx_v_values = 0; PyArrayObject *__pyx_v_result = 0; PyArrayObject *__pyx_v_missing = 0; PyObject *__pyx_v_stargets = 0; PyObject *__pyx_v_d = 0; PyObject *__pyx_v_val = 0; int __pyx_v_count; int __pyx_v_count_missing; Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_n; Py_ssize_t __pyx_v_n_t; Py_ssize_t __pyx_v_n_alloc; CYTHON_UNUSED PyObject *__pyx_v_members = NULL; __Pyx_LocalBuf_ND __pyx_pybuffernd_missing; __Pyx_Buffer __pyx_pybuffer_missing; __Pyx_LocalBuf_ND __pyx_pybuffernd_result; __Pyx_Buffer __pyx_pybuffer_result; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; Py_ssize_t __pyx_t_3; int __pyx_t_4; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyArrayObject *__pyx_t_8 = NULL; int __pyx_t_9; PyObject *__pyx_t_10 = NULL; PyObject *__pyx_t_11 = NULL; PyObject *__pyx_t_12 = NULL; Py_ssize_t __pyx_t_13; int __pyx_t_14; int __pyx_t_15; Py_ssize_t __pyx_t_16; PyObject *(*__pyx_t_17)(PyObject *); Py_ssize_t __pyx_t_18; int __pyx_t_19; int __pyx_t_20; int __pyx_t_21; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_indexer_non_unique", 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_missing.pybuffer.buf = NULL; __pyx_pybuffer_missing.refcount = 0; __pyx_pybuffernd_missing.data = NULL; __pyx_pybuffernd_missing.rcbuffer = &__pyx_pybuffer_missing; /* "pandas/index.pyx":279 * ndarray[int64_t] result, missing * set stargets * dict d = {} # <<<<<<<<<<<<<< * object val * int count = 0, count_missing = 0 */ __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 279; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_v_d = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/index.pyx":281 * dict d = {} * object val * int count = 0, count_missing = 0 # <<<<<<<<<<<<<< * Py_ssize_t i, j, n, n_t, n_alloc * */ __pyx_v_count = 0; __pyx_v_count_missing = 0; /* "pandas/index.pyx":284 * Py_ssize_t i, j, n, n_t, n_alloc * * self._ensure_mapping_populated() # <<<<<<<<<<<<<< * values = self._get_index_values() * stargets = set(targets) */ __pyx_t_1 = __pyx_f_6pandas_5index_11IndexEngine__ensure_mapping_populated(__pyx_v_self); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 284; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pandas/index.pyx":285 * * self._ensure_mapping_populated() * values = self._get_index_values() # <<<<<<<<<<<<<< * stargets = set(targets) * n = len(values) */ __pyx_t_1 = ((struct __pyx_vtabstruct_6pandas_5index_IndexEngine *)__pyx_v_self->__pyx_vtab)->_get_index_values(__pyx_v_self); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 285; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 285; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_values = ((PyArrayObject *)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/index.pyx":286 * self._ensure_mapping_populated() * values = self._get_index_values() * stargets = set(targets) # <<<<<<<<<<<<<< * n = len(values) * n_t = len(targets) */ __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 286; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_targets); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_targets); __Pyx_GIVEREF(__pyx_v_targets); __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)(&PySet_Type))), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 286; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_stargets = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; /* "pandas/index.pyx":287 * values = self._get_index_values() * stargets = set(targets) * n = len(values) # <<<<<<<<<<<<<< * n_t = len(targets) * if n > 10000: */ __pyx_t_3 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 287; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_3; /* "pandas/index.pyx":288 * stargets = set(targets) * n = len(values) * n_t = len(targets) # <<<<<<<<<<<<<< * if n > 10000: * n_alloc = 10000 */ __pyx_t_3 = PyObject_Length(__pyx_v_targets); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 288; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n_t = __pyx_t_3; /* "pandas/index.pyx":289 * n = len(values) * n_t = len(targets) * if n > 10000: # <<<<<<<<<<<<<< * n_alloc = 10000 * else: */ __pyx_t_4 = ((__pyx_v_n > 10000) != 0); if (__pyx_t_4) { /* "pandas/index.pyx":290 * n_t = len(targets) * if n > 10000: * n_alloc = 10000 # <<<<<<<<<<<<<< * else: * n_alloc = n */ __pyx_v_n_alloc = 10000; goto __pyx_L3; } /*else*/ { /* "pandas/index.pyx":292 * n_alloc = 10000 * else: * n_alloc = n # <<<<<<<<<<<<<< * * result = np.empty(n_alloc, dtype=np.int64) */ __pyx_v_n_alloc = __pyx_v_n; } __pyx_L3:; /* "pandas/index.pyx":294 * n_alloc = n * * result = np.empty(n_alloc, dtype=np.int64) # <<<<<<<<<<<<<< * missing = np.empty(n_t, dtype=np.int64) * */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 294; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_empty); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 294; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_n_alloc); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 294; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 294; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 294; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 294; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_int64); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 294; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_dtype, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 294; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_7 = PyObject_Call(__pyx_t_1, __pyx_t_5, __pyx_t_2); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 294; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (!(likely(((__pyx_t_7) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_7, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 294; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_8 = ((PyArrayObject *)__pyx_t_7); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __pyx_t_9 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_t_8, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_9 < 0)) { PyErr_Fetch(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_v_result, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_11); Py_XDECREF(__pyx_t_12); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_10, __pyx_t_11, __pyx_t_12); } } __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_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 294; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_8 = 0; __pyx_v_result = ((PyArrayObject *)__pyx_t_7); __pyx_t_7 = 0; /* "pandas/index.pyx":295 * * result = np.empty(n_alloc, dtype=np.int64) * missing = np.empty(n_t, dtype=np.int64) # <<<<<<<<<<<<<< * * # form the set of the results (like ismember) */ __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 295; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_empty); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 295; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_7 = PyInt_FromSsize_t(__pyx_v_n_t); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 295; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 295; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_7); __Pyx_GIVEREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_7 = PyDict_New(); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 295; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 295; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_int64); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 295; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_dtype, __pyx_t_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 295; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyObject_Call(__pyx_t_2, __pyx_t_5, __pyx_t_7); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 295; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 295; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_8 = ((PyArrayObject *)__pyx_t_6); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_missing.rcbuffer->pybuffer); __pyx_t_9 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_missing.rcbuffer->pybuffer, (PyObject*)__pyx_t_8, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_9 < 0)) { PyErr_Fetch(&__pyx_t_12, &__pyx_t_11, &__pyx_t_10); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_missing.rcbuffer->pybuffer, (PyObject*)__pyx_v_missing, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_12); Py_XDECREF(__pyx_t_11); Py_XDECREF(__pyx_t_10); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_12, __pyx_t_11, __pyx_t_10); } } __pyx_pybuffernd_missing.diminfo[0].strides = __pyx_pybuffernd_missing.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_missing.diminfo[0].shape = __pyx_pybuffernd_missing.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 295; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_8 = 0; __pyx_v_missing = ((PyArrayObject *)__pyx_t_6); __pyx_t_6 = 0; /* "pandas/index.pyx":298 * * # form the set of the results (like ismember) * members = np.empty(n, dtype=np.uint8) # <<<<<<<<<<<<<< * for i in range(n): * val = util.get_value_1d(values, i) */ __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 298; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_empty); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 298; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyInt_FromSsize_t(__pyx_v_n); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 298; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 298; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyDict_New(); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 298; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 298; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_uint8); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 298; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_dtype, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 298; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyObject_Call(__pyx_t_7, __pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 298; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_v_members = __pyx_t_1; __pyx_t_1 = 0; /* "pandas/index.pyx":299 * # form the set of the results (like ismember) * members = np.empty(n, dtype=np.uint8) * for i in range(n): # <<<<<<<<<<<<<< * val = util.get_value_1d(values, i) * if val in stargets: */ __pyx_t_3 = __pyx_v_n; for (__pyx_t_13 = 0; __pyx_t_13 < __pyx_t_3; __pyx_t_13+=1) { __pyx_v_i = __pyx_t_13; /* "pandas/index.pyx":300 * members = np.empty(n, dtype=np.uint8) * for i in range(n): * val = util.get_value_1d(values, i) # <<<<<<<<<<<<<< * if val in stargets: * if val not in d: */ __pyx_t_1 = get_value_1d(__pyx_v_values, __pyx_v_i); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 300; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_XDECREF_SET(__pyx_v_val, __pyx_t_1); __pyx_t_1 = 0; /* "pandas/index.pyx":301 * for i in range(n): * val = util.get_value_1d(values, i) * if val in stargets: # <<<<<<<<<<<<<< * if val not in d: * d[val] = [] */ __pyx_t_4 = (__Pyx_PySequence_Contains(__pyx_v_val, __pyx_v_stargets, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 301; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_14 = (__pyx_t_4 != 0); if (__pyx_t_14) { /* "pandas/index.pyx":302 * val = util.get_value_1d(values, i) * if val in stargets: * if val not in d: # <<<<<<<<<<<<<< * d[val] = [] * d[val].append(i) */ __pyx_t_14 = (__Pyx_PyDict_Contains(__pyx_v_val, __pyx_v_d, Py_NE)); if (unlikely(__pyx_t_14 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 302; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_4 = (__pyx_t_14 != 0); if (__pyx_t_4) { /* "pandas/index.pyx":303 * if val in stargets: * if val not in d: * d[val] = [] # <<<<<<<<<<<<<< * d[val].append(i) * */ __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 303; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (unlikely(PyDict_SetItem(__pyx_v_d, __pyx_v_val, __pyx_t_1) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 303; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L7; } __pyx_L7:; /* "pandas/index.pyx":304 * if val not in d: * d[val] = [] * d[val].append(i) # <<<<<<<<<<<<<< * * for i in range(n_t): */ __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_d, __pyx_v_val); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 304; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_1); __pyx_t_6 = PyInt_FromSsize_t(__pyx_v_i); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 304; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_15 = __Pyx_PyObject_Append(__pyx_t_1, __pyx_t_6); if (unlikely(__pyx_t_15 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 304; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; goto __pyx_L6; } __pyx_L6:; } /* "pandas/index.pyx":306 * d[val].append(i) * * for i in range(n_t): # <<<<<<<<<<<<<< * * val = util.get_value_1d(targets, i) */ __pyx_t_3 = __pyx_v_n_t; for (__pyx_t_13 = 0; __pyx_t_13 < __pyx_t_3; __pyx_t_13+=1) { __pyx_v_i = __pyx_t_13; /* "pandas/index.pyx":308 * for i in range(n_t): * * val = util.get_value_1d(targets, i) # <<<<<<<<<<<<<< * * # found */ if (!(likely(((__pyx_v_targets) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_targets, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 308; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_6 = get_value_1d(((PyArrayObject *)__pyx_v_targets), __pyx_v_i); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 308; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_XDECREF_SET(__pyx_v_val, __pyx_t_6); __pyx_t_6 = 0; /* "pandas/index.pyx":311 * * # found * if val in d: # <<<<<<<<<<<<<< * for j in d[val]: * */ __pyx_t_4 = (__Pyx_PyDict_Contains(__pyx_v_val, __pyx_v_d, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 311; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_14 = (__pyx_t_4 != 0); if (__pyx_t_14) { /* "pandas/index.pyx":312 * # found * if val in d: * for j in d[val]: # <<<<<<<<<<<<<< * * # realloc if needed */ __pyx_t_6 = __Pyx_PyDict_GetItem(__pyx_v_d, __pyx_v_val); if (unlikely(__pyx_t_6 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 312; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_6); if (PyList_CheckExact(__pyx_t_6) || PyTuple_CheckExact(__pyx_t_6)) { __pyx_t_1 = __pyx_t_6; __Pyx_INCREF(__pyx_t_1); __pyx_t_16 = 0; __pyx_t_17 = NULL; } else { __pyx_t_16 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 312; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_17 = Py_TYPE(__pyx_t_1)->tp_iternext; } __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; for (;;) { if (!__pyx_t_17 && PyList_CheckExact(__pyx_t_1)) { if (__pyx_t_16 >= PyList_GET_SIZE(__pyx_t_1)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_6 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_16); __Pyx_INCREF(__pyx_t_6); __pyx_t_16++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 312; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_6 = PySequence_ITEM(__pyx_t_1, __pyx_t_16); __pyx_t_16++; if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 312; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif } else if (!__pyx_t_17 && PyTuple_CheckExact(__pyx_t_1)) { if (__pyx_t_16 >= PyTuple_GET_SIZE(__pyx_t_1)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_16); __Pyx_INCREF(__pyx_t_6); __pyx_t_16++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 312; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_6 = PySequence_ITEM(__pyx_t_1, __pyx_t_16); __pyx_t_16++; if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 312; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif } else { __pyx_t_6 = __pyx_t_17(__pyx_t_1); if (unlikely(!__pyx_t_6)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 312; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } break; } __Pyx_GOTREF(__pyx_t_6); } __pyx_t_18 = __Pyx_PyIndex_AsSsize_t(__pyx_t_6); if (unlikely((__pyx_t_18 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 312; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_v_j = __pyx_t_18; /* "pandas/index.pyx":315 * * # realloc if needed * if count >= n_alloc: # <<<<<<<<<<<<<< * n_alloc += 10000 * result = np.resize(result, n_alloc) */ __pyx_t_14 = ((__pyx_v_count >= __pyx_v_n_alloc) != 0); if (__pyx_t_14) { /* "pandas/index.pyx":316 * # realloc if needed * if count >= n_alloc: * n_alloc += 10000 # <<<<<<<<<<<<<< * result = np.resize(result, n_alloc) * */ __pyx_v_n_alloc = (__pyx_v_n_alloc + 10000); /* "pandas/index.pyx":317 * if count >= n_alloc: * n_alloc += 10000 * result = np.resize(result, n_alloc) # <<<<<<<<<<<<<< * * result[count] = j */ __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 317; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_resize); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 317; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyInt_FromSsize_t(__pyx_v_n_alloc); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 317; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 317; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_INCREF(((PyObject *)__pyx_v_result)); PyTuple_SET_ITEM(__pyx_t_7, 0, ((PyObject *)__pyx_v_result)); __Pyx_GIVEREF(((PyObject *)__pyx_v_result)); PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyObject_Call(__pyx_t_5, __pyx_t_7, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 317; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 317; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_8 = ((PyArrayObject *)__pyx_t_6); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __pyx_t_9 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_t_8, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_9 < 0)) { PyErr_Fetch(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_v_result, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_11); Py_XDECREF(__pyx_t_12); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_10, __pyx_t_11, __pyx_t_12); } } __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_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 317; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_8 = 0; __Pyx_DECREF_SET(__pyx_v_result, ((PyArrayObject *)__pyx_t_6)); __pyx_t_6 = 0; goto __pyx_L13; } __pyx_L13:; /* "pandas/index.pyx":319 * result = np.resize(result, n_alloc) * * result[count] = j # <<<<<<<<<<<<<< * count += 1 * */ __pyx_t_9 = __pyx_v_count; __pyx_t_19 = -1; if (__pyx_t_9 < 0) { __pyx_t_9 += __pyx_pybuffernd_result.diminfo[0].shape; if (unlikely(__pyx_t_9 < 0)) __pyx_t_19 = 0; } else if (unlikely(__pyx_t_9 >= __pyx_pybuffernd_result.diminfo[0].shape)) __pyx_t_19 = 0; if (unlikely(__pyx_t_19 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_19); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 319; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_9, __pyx_pybuffernd_result.diminfo[0].strides) = __pyx_v_j; /* "pandas/index.pyx":320 * * result[count] = j * count += 1 # <<<<<<<<<<<<<< * * # value not found */ __pyx_v_count = (__pyx_v_count + 1); } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L10; } /*else*/ { /* "pandas/index.pyx":325 * else: * * if count >= n_alloc: # <<<<<<<<<<<<<< * n_alloc += 10000 * result = np.resize(result, n_alloc) */ __pyx_t_14 = ((__pyx_v_count >= __pyx_v_n_alloc) != 0); if (__pyx_t_14) { /* "pandas/index.pyx":326 * * if count >= n_alloc: * n_alloc += 10000 # <<<<<<<<<<<<<< * result = np.resize(result, n_alloc) * result[count] = -1 */ __pyx_v_n_alloc = (__pyx_v_n_alloc + 10000); /* "pandas/index.pyx":327 * if count >= n_alloc: * n_alloc += 10000 * result = np.resize(result, n_alloc) # <<<<<<<<<<<<<< * result[count] = -1 * count += 1 */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 327; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_resize); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 327; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_n_alloc); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 327; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 327; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_INCREF(((PyObject *)__pyx_v_result)); PyTuple_SET_ITEM(__pyx_t_7, 0, ((PyObject *)__pyx_v_result)); __Pyx_GIVEREF(((PyObject *)__pyx_v_result)); PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyObject_Call(__pyx_t_6, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 327; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 327; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_8 = ((PyArrayObject *)__pyx_t_1); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __pyx_t_19 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_t_8, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_19 < 0)) { PyErr_Fetch(&__pyx_t_12, &__pyx_t_11, &__pyx_t_10); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_v_result, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_12); Py_XDECREF(__pyx_t_11); Py_XDECREF(__pyx_t_10); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_12, __pyx_t_11, __pyx_t_10); } } __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_19 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 327; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_8 = 0; __Pyx_DECREF_SET(__pyx_v_result, ((PyArrayObject *)__pyx_t_1)); __pyx_t_1 = 0; goto __pyx_L14; } __pyx_L14:; /* "pandas/index.pyx":328 * n_alloc += 10000 * result = np.resize(result, n_alloc) * result[count] = -1 # <<<<<<<<<<<<<< * count += 1 * missing[count_missing] = i */ __pyx_t_19 = __pyx_v_count; __pyx_t_20 = -1; if (__pyx_t_19 < 0) { __pyx_t_19 += __pyx_pybuffernd_result.diminfo[0].shape; if (unlikely(__pyx_t_19 < 0)) __pyx_t_20 = 0; } else if (unlikely(__pyx_t_19 >= __pyx_pybuffernd_result.diminfo[0].shape)) __pyx_t_20 = 0; if (unlikely(__pyx_t_20 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_20); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 328; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_result.diminfo[0].strides) = -1; /* "pandas/index.pyx":329 * result = np.resize(result, n_alloc) * result[count] = -1 * count += 1 # <<<<<<<<<<<<<< * missing[count_missing] = i * count_missing += 1 */ __pyx_v_count = (__pyx_v_count + 1); /* "pandas/index.pyx":330 * result[count] = -1 * count += 1 * missing[count_missing] = i # <<<<<<<<<<<<<< * count_missing += 1 * */ __pyx_t_20 = __pyx_v_count_missing; __pyx_t_21 = -1; if (__pyx_t_20 < 0) { __pyx_t_20 += __pyx_pybuffernd_missing.diminfo[0].shape; if (unlikely(__pyx_t_20 < 0)) __pyx_t_21 = 0; } else if (unlikely(__pyx_t_20 >= __pyx_pybuffernd_missing.diminfo[0].shape)) __pyx_t_21 = 0; if (unlikely(__pyx_t_21 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_21); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 330; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_missing.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_missing.diminfo[0].strides) = __pyx_v_i; /* "pandas/index.pyx":331 * count += 1 * missing[count_missing] = i * count_missing += 1 # <<<<<<<<<<<<<< * * return result[0:count], missing[0:count_missing] */ __pyx_v_count_missing = (__pyx_v_count_missing + 1); } __pyx_L10:; } /* "pandas/index.pyx":333 * count_missing += 1 * * return result[0:count], missing[0:count_missing] # <<<<<<<<<<<<<< * * cdef class Int64Engine(IndexEngine): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyObject_GetSlice(((PyObject *)__pyx_v_result), 0, __pyx_v_count, NULL, NULL, NULL, 1, 1, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 333; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_7 = __Pyx_PyObject_GetSlice(((PyObject *)__pyx_v_missing), 0, __pyx_v_count_missing, NULL, NULL, NULL, 1, 1, 1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 333; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 333; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_7); __Pyx_GIVEREF(__pyx_t_7); __pyx_t_1 = 0; __pyx_t_7 = 0; __pyx_r = __pyx_t_6; __pyx_t_6 = 0; goto __pyx_L0; /* "pandas/index.pyx":269 * return self.mapping.lookup(values) * * def get_indexer_non_unique(self, targets): # <<<<<<<<<<<<<< * """ return an indexer suitable for takng from a non unique index * return the labels in the same order ast the target */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_missing.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.index.IndexEngine.get_indexer_non_unique", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_missing.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_values); __Pyx_XDECREF((PyObject *)__pyx_v_result); __Pyx_XDECREF((PyObject *)__pyx_v_missing); __Pyx_XDECREF(__pyx_v_stargets); __Pyx_XDECREF(__pyx_v_d); __Pyx_XDECREF(__pyx_v_val); __Pyx_XDECREF(__pyx_v_members); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/index.pyx":73 * * cdef readonly: * object vgetter # <<<<<<<<<<<<<< * HashTable mapping * bint over_size_threshold */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5index_11IndexEngine_7vgetter_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6pandas_5index_11IndexEngine_7vgetter_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_5index_11IndexEngine_7vgetter___get__(((struct __pyx_obj_6pandas_5index_IndexEngine *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5index_11IndexEngine_7vgetter___get__(struct __pyx_obj_6pandas_5index_IndexEngine *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_self->vgetter); __pyx_r = __pyx_v_self->vgetter; goto __pyx_L0; /* function exit code */ __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/index.pyx":74 * cdef readonly: * object vgetter * HashTable mapping # <<<<<<<<<<<<<< * bint over_size_threshold * */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5index_11IndexEngine_7mapping_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6pandas_5index_11IndexEngine_7mapping_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_5index_11IndexEngine_7mapping___get__(((struct __pyx_obj_6pandas_5index_IndexEngine *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5index_11IndexEngine_7mapping___get__(struct __pyx_obj_6pandas_5index_IndexEngine *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_self->mapping)); __pyx_r = ((PyObject *)__pyx_v_self->mapping); goto __pyx_L0; /* function exit code */ __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/index.pyx":75 * object vgetter * HashTable mapping * bint over_size_threshold # <<<<<<<<<<<<<< * * cdef: */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5index_11IndexEngine_19over_size_threshold_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6pandas_5index_11IndexEngine_19over_size_threshold_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_5index_11IndexEngine_19over_size_threshold___get__(((struct __pyx_obj_6pandas_5index_IndexEngine *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5index_11IndexEngine_19over_size_threshold___get__(struct __pyx_obj_6pandas_5index_IndexEngine *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->over_size_threshold); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 75; __pyx_clineno = __LINE__; goto __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.index.IndexEngine.over_size_threshold.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/index.pyx":337 * cdef class Int64Engine(IndexEngine): * * cdef _get_index_values(self): # <<<<<<<<<<<<<< * return algos.ensure_int64(self.vgetter()) * */ static PyObject *__pyx_f_6pandas_5index_11Int64Engine__get_index_values(struct __pyx_obj_6pandas_5index_Int64Engine *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_get_index_values", 0); /* "pandas/index.pyx":338 * * cdef _get_index_values(self): * return algos.ensure_int64(self.vgetter()) # <<<<<<<<<<<<<< * * cdef _make_hash_table(self, n): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_algos); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 338; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_ensure_int64); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 338; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyObject_Call(__pyx_v_self->__pyx_base.vgetter, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 338; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 338; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyObject_Call(__pyx_t_2, __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 338; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "pandas/index.pyx":337 * cdef class Int64Engine(IndexEngine): * * cdef _get_index_values(self): # <<<<<<<<<<<<<< * return algos.ensure_int64(self.vgetter()) * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("pandas.index.Int64Engine._get_index_values", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/index.pyx":340 * return algos.ensure_int64(self.vgetter()) * * cdef _make_hash_table(self, n): # <<<<<<<<<<<<<< * return _hash.Int64HashTable(n) * */ static PyObject *__pyx_f_6pandas_5index_11Int64Engine__make_hash_table(CYTHON_UNUSED struct __pyx_obj_6pandas_5index_Int64Engine *__pyx_v_self, PyObject *__pyx_v_n) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_make_hash_table", 0); /* "pandas/index.pyx":341 * * cdef _make_hash_table(self, n): * return _hash.Int64HashTable(n) # <<<<<<<<<<<<<< * * def _call_monotonic(self, values): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_hash); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 341; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_Int64HashTable); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 341; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 341; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_n); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_n); __Pyx_GIVEREF(__pyx_v_n); __pyx_t_3 = PyObject_Call(__pyx_t_2, __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 341; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; /* "pandas/index.pyx":340 * return algos.ensure_int64(self.vgetter()) * * cdef _make_hash_table(self, n): # <<<<<<<<<<<<<< * return _hash.Int64HashTable(n) * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("pandas.index.Int64Engine._make_hash_table", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/index.pyx":343 * return _hash.Int64HashTable(n) * * def _call_monotonic(self, values): # <<<<<<<<<<<<<< * return algos.is_monotonic_int64(values) * */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5index_11Int64Engine_1_call_monotonic(PyObject *__pyx_v_self, PyObject *__pyx_v_values); /*proto*/ static PyObject *__pyx_pw_6pandas_5index_11Int64Engine_1_call_monotonic(PyObject *__pyx_v_self, PyObject *__pyx_v_values) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_call_monotonic (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_5index_11Int64Engine__call_monotonic(((struct __pyx_obj_6pandas_5index_Int64Engine *)__pyx_v_self), ((PyObject *)__pyx_v_values)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5index_11Int64Engine__call_monotonic(CYTHON_UNUSED struct __pyx_obj_6pandas_5index_Int64Engine *__pyx_v_self, PyObject *__pyx_v_values) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_call_monotonic", 0); /* "pandas/index.pyx":344 * * def _call_monotonic(self, values): * return algos.is_monotonic_int64(values) # <<<<<<<<<<<<<< * * def get_pad_indexer(self, other, limit=None): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_algos); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 344; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_is_monotonic_int64); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 344; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 344; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_values); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_values); __Pyx_GIVEREF(__pyx_v_values); __pyx_t_3 = PyObject_Call(__pyx_t_2, __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 344; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; /* "pandas/index.pyx":343 * return _hash.Int64HashTable(n) * * def _call_monotonic(self, values): # <<<<<<<<<<<<<< * return algos.is_monotonic_int64(values) * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("pandas.index.Int64Engine._call_monotonic", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/index.pyx":346 * return algos.is_monotonic_int64(values) * * def get_pad_indexer(self, other, limit=None): # <<<<<<<<<<<<<< * return algos.pad_int64(self._get_index_values(), other, * limit=limit) */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5index_11Int64Engine_3get_pad_indexer(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_6pandas_5index_11Int64Engine_3get_pad_indexer(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_other = 0; PyObject *__pyx_v_limit = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("get_pad_indexer (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_other,&__pyx_n_s_limit,0}; PyObject* values[2] = {0,0}; values[1] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_other)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_limit); if (value) { values[1] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "get_pad_indexer") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 346; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_other = values[0]; __pyx_v_limit = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("get_pad_indexer", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 346; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.index.Int64Engine.get_pad_indexer", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pandas_5index_11Int64Engine_2get_pad_indexer(((struct __pyx_obj_6pandas_5index_Int64Engine *)__pyx_v_self), __pyx_v_other, __pyx_v_limit); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5index_11Int64Engine_2get_pad_indexer(struct __pyx_obj_6pandas_5index_Int64Engine *__pyx_v_self, PyObject *__pyx_v_other, PyObject *__pyx_v_limit) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_pad_indexer", 0); /* "pandas/index.pyx":347 * * def get_pad_indexer(self, other, limit=None): * return algos.pad_int64(self._get_index_values(), other, # <<<<<<<<<<<<<< * limit=limit) * */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_algos); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 347; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_pad_int64); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 347; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = ((struct __pyx_vtabstruct_6pandas_5index_Int64Engine *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base._get_index_values(((struct __pyx_obj_6pandas_5index_IndexEngine *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 347; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 347; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_other); PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_other); __Pyx_GIVEREF(__pyx_v_other); __pyx_t_1 = 0; __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 347; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); /* "pandas/index.pyx":348 * def get_pad_indexer(self, other, limit=None): * return algos.pad_int64(self._get_index_values(), other, * limit=limit) # <<<<<<<<<<<<<< * * def get_backfill_indexer(self, other, limit=None): */ if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_limit, __pyx_v_limit) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 347; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/index.pyx":347 * * def get_pad_indexer(self, other, limit=None): * return algos.pad_int64(self._get_index_values(), other, # <<<<<<<<<<<<<< * limit=limit) * */ __pyx_t_4 = PyObject_Call(__pyx_t_2, __pyx_t_3, __pyx_t_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 347; __pyx_clineno = __LINE__; goto __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; __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; /* "pandas/index.pyx":346 * return algos.is_monotonic_int64(values) * * def get_pad_indexer(self, other, limit=None): # <<<<<<<<<<<<<< * return algos.pad_int64(self._get_index_values(), other, * limit=limit) */ /* 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.index.Int64Engine.get_pad_indexer", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/index.pyx":350 * limit=limit) * * def get_backfill_indexer(self, other, limit=None): # <<<<<<<<<<<<<< * return algos.backfill_int64(self._get_index_values(), other, * limit=limit) */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5index_11Int64Engine_5get_backfill_indexer(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_6pandas_5index_11Int64Engine_5get_backfill_indexer(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_other = 0; PyObject *__pyx_v_limit = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("get_backfill_indexer (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_other,&__pyx_n_s_limit,0}; PyObject* values[2] = {0,0}; values[1] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_other)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_limit); if (value) { values[1] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "get_backfill_indexer") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 350; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_other = values[0]; __pyx_v_limit = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("get_backfill_indexer", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 350; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.index.Int64Engine.get_backfill_indexer", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pandas_5index_11Int64Engine_4get_backfill_indexer(((struct __pyx_obj_6pandas_5index_Int64Engine *)__pyx_v_self), __pyx_v_other, __pyx_v_limit); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5index_11Int64Engine_4get_backfill_indexer(struct __pyx_obj_6pandas_5index_Int64Engine *__pyx_v_self, PyObject *__pyx_v_other, PyObject *__pyx_v_limit) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_backfill_indexer", 0); /* "pandas/index.pyx":351 * * def get_backfill_indexer(self, other, limit=None): * return algos.backfill_int64(self._get_index_values(), other, # <<<<<<<<<<<<<< * limit=limit) * */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_algos); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 351; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_backfill_int64); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 351; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = ((struct __pyx_vtabstruct_6pandas_5index_Int64Engine *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base._get_index_values(((struct __pyx_obj_6pandas_5index_IndexEngine *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 351; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 351; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_other); PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_other); __Pyx_GIVEREF(__pyx_v_other); __pyx_t_1 = 0; __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 351; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); /* "pandas/index.pyx":352 * def get_backfill_indexer(self, other, limit=None): * return algos.backfill_int64(self._get_index_values(), other, * limit=limit) # <<<<<<<<<<<<<< * * cdef _check_type(self, object val): */ if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_limit, __pyx_v_limit) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 351; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/index.pyx":351 * * def get_backfill_indexer(self, other, limit=None): * return algos.backfill_int64(self._get_index_values(), other, # <<<<<<<<<<<<<< * limit=limit) * */ __pyx_t_4 = PyObject_Call(__pyx_t_2, __pyx_t_3, __pyx_t_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 351; __pyx_clineno = __LINE__; goto __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; __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; /* "pandas/index.pyx":350 * limit=limit) * * def get_backfill_indexer(self, other, limit=None): # <<<<<<<<<<<<<< * return algos.backfill_int64(self._get_index_values(), other, * limit=limit) */ /* 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.index.Int64Engine.get_backfill_indexer", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/index.pyx":354 * limit=limit) * * cdef _check_type(self, object val): # <<<<<<<<<<<<<< * hash(val) * if util.is_bool_object(val): */ static PyObject *__pyx_f_6pandas_5index_11Int64Engine__check_type(CYTHON_UNUSED struct __pyx_obj_6pandas_5index_Int64Engine *__pyx_v_self, PyObject *__pyx_v_val) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_hash_t __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_check_type", 0); /* "pandas/index.pyx":355 * * cdef _check_type(self, object val): * hash(val) # <<<<<<<<<<<<<< * if util.is_bool_object(val): * raise KeyError(val) */ __pyx_t_1 = PyObject_Hash(__pyx_v_val); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 355; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/index.pyx":356 * cdef _check_type(self, object val): * hash(val) * if util.is_bool_object(val): # <<<<<<<<<<<<<< * raise KeyError(val) * */ __pyx_t_2 = (is_bool_object(__pyx_v_val) != 0); if (__pyx_t_2) { /* "pandas/index.pyx":357 * hash(val) * if util.is_bool_object(val): * raise KeyError(val) # <<<<<<<<<<<<<< * * cdef _maybe_get_bool_indexer(self, object val): */ __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 357; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_v_val); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_val); __Pyx_GIVEREF(__pyx_v_val); __pyx_t_4 = PyObject_Call(__pyx_builtin_KeyError, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 357; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 357; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } /* "pandas/index.pyx":354 * limit=limit) * * cdef _check_type(self, object val): # <<<<<<<<<<<<<< * hash(val) * if util.is_bool_object(val): */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("pandas.index.Int64Engine._check_type", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/index.pyx":359 * raise KeyError(val) * * cdef _maybe_get_bool_indexer(self, object val): # <<<<<<<<<<<<<< * cdef: * ndarray[uint8_t, cast=True] indexer */ static PyObject *__pyx_f_6pandas_5index_11Int64Engine__maybe_get_bool_indexer(struct __pyx_obj_6pandas_5index_Int64Engine *__pyx_v_self, PyObject *__pyx_v_val) { PyArrayObject *__pyx_v_indexer = 0; PyArrayObject *__pyx_v_values = 0; int __pyx_v_count; Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_n; CYTHON_UNUSED __pyx_t_5numpy_int64_t __pyx_v_ival; int __pyx_v_last_true; PyObject *__pyx_v_result = NULL; __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 int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; __pyx_t_5numpy_int64_t __pyx_t_4; PyArrayObject *__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; PyObject *__pyx_t_11 = NULL; PyObject *__pyx_t_12 = NULL; PyArrayObject *__pyx_t_13 = NULL; Py_ssize_t __pyx_t_14; Py_ssize_t __pyx_t_15; Py_ssize_t __pyx_t_16; Py_ssize_t __pyx_t_17; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_maybe_get_bool_indexer", 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; /* "pandas/index.pyx":363 * ndarray[uint8_t, cast=True] indexer * ndarray[int64_t] values * int count = 0 # <<<<<<<<<<<<<< * Py_ssize_t i, n * int64_t ival */ __pyx_v_count = 0; /* "pandas/index.pyx":368 * int last_true * * if not util.is_integer_object(val): # <<<<<<<<<<<<<< * raise KeyError(val) * */ __pyx_t_1 = ((!(is_integer_object(__pyx_v_val) != 0)) != 0); if (__pyx_t_1) { /* "pandas/index.pyx":369 * * if not util.is_integer_object(val): * raise KeyError(val) # <<<<<<<<<<<<<< * * ival = val */ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 369; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_val); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_val); __Pyx_GIVEREF(__pyx_v_val); __pyx_t_3 = PyObject_Call(__pyx_builtin_KeyError, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 369; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __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_filename = __pyx_f[0]; __pyx_lineno = 369; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } /* "pandas/index.pyx":371 * raise KeyError(val) * * ival = val # <<<<<<<<<<<<<< * * values = self._get_index_values() */ __pyx_t_4 = __Pyx_PyInt_As_npy_int64(__pyx_v_val); if (unlikely((__pyx_t_4 == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 371; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_ival = __pyx_t_4; /* "pandas/index.pyx":373 * ival = val * * values = self._get_index_values() # <<<<<<<<<<<<<< * n = len(values) * */ __pyx_t_3 = ((struct __pyx_vtabstruct_6pandas_5index_Int64Engine *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base._get_index_values(((struct __pyx_obj_6pandas_5index_IndexEngine *)__pyx_v_self)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 373; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 373; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_5 = ((PyArrayObject *)__pyx_t_3); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_t_6 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_values.rcbuffer->pybuffer, (PyObject*)__pyx_t_5, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_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_values.rcbuffer->pybuffer, (PyObject*)__pyx_v_values, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_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_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]; if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 373; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_5 = 0; __pyx_v_values = ((PyArrayObject *)__pyx_t_3); __pyx_t_3 = 0; /* "pandas/index.pyx":374 * * values = self._get_index_values() * n = len(values) # <<<<<<<<<<<<<< * * result = np.empty(n, dtype=bool) */ __pyx_t_10 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_10 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 374; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_10; /* "pandas/index.pyx":376 * n = len(values) * * result = np.empty(n, dtype=bool) # <<<<<<<<<<<<<< * indexer = result.view(np.uint8) * */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 376; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_empty); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 376; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyInt_FromSsize_t(__pyx_v_n); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 376; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_11 = PyTuple_New(1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 376; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 376; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dtype, ((PyObject*)&PyBool_Type)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 376; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_12 = PyObject_Call(__pyx_t_2, __pyx_t_11, __pyx_t_3); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 376; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_result = __pyx_t_12; __pyx_t_12 = 0; /* "pandas/index.pyx":377 * * result = np.empty(n, dtype=bool) * indexer = result.view(np.uint8) # <<<<<<<<<<<<<< * * for i in range(n): */ __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_result, __pyx_n_s_view); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 377; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 377; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_uint8); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 377; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 377; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_11); __Pyx_GIVEREF(__pyx_t_11); __pyx_t_11 = 0; __pyx_t_11 = PyObject_Call(__pyx_t_12, __pyx_t_3, NULL); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 377; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (!(likely(((__pyx_t_11) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_11, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 377; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_13 = ((PyArrayObject *)__pyx_t_11); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer); __pyx_t_6 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer, (PyObject*)__pyx_t_13, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 1, __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_indexer.rcbuffer->pybuffer, (PyObject*)__pyx_v_indexer, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 1, __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_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_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 377; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_13 = 0; __pyx_v_indexer = ((PyArrayObject *)__pyx_t_11); __pyx_t_11 = 0; /* "pandas/index.pyx":379 * indexer = result.view(np.uint8) * * for i in range(n): # <<<<<<<<<<<<<< * if values[i] == val: * count += 1 */ __pyx_t_10 = __pyx_v_n; for (__pyx_t_14 = 0; __pyx_t_14 < __pyx_t_10; __pyx_t_14+=1) { __pyx_v_i = __pyx_t_14; /* "pandas/index.pyx":380 * * for i in range(n): * if values[i] == val: # <<<<<<<<<<<<<< * count += 1 * indexer[i] = 1 */ __pyx_t_15 = __pyx_v_i; __pyx_t_6 = -1; if (__pyx_t_15 < 0) { __pyx_t_15 += __pyx_pybuffernd_values.diminfo[0].shape; if (unlikely(__pyx_t_15 < 0)) __pyx_t_6 = 0; } else if (unlikely(__pyx_t_15 >= __pyx_pybuffernd_values.diminfo[0].shape)) __pyx_t_6 = 0; if (unlikely(__pyx_t_6 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_6); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 380; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_11 = __Pyx_PyInt_From_npy_int64((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_values.diminfo[0].strides))); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 380; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __pyx_t_3 = PyObject_RichCompare(__pyx_t_11, __pyx_v_val, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 380; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 380; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_1) { /* "pandas/index.pyx":381 * for i in range(n): * if values[i] == val: * count += 1 # <<<<<<<<<<<<<< * indexer[i] = 1 * last_true = i */ __pyx_v_count = (__pyx_v_count + 1); /* "pandas/index.pyx":382 * if values[i] == val: * count += 1 * indexer[i] = 1 # <<<<<<<<<<<<<< * last_true = i * else: */ __pyx_t_16 = __pyx_v_i; __pyx_t_6 = -1; if (__pyx_t_16 < 0) { __pyx_t_16 += __pyx_pybuffernd_indexer.diminfo[0].shape; if (unlikely(__pyx_t_16 < 0)) __pyx_t_6 = 0; } else if (unlikely(__pyx_t_16 >= __pyx_pybuffernd_indexer.diminfo[0].shape)) __pyx_t_6 = 0; if (unlikely(__pyx_t_6 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_6); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 382; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_indexer.diminfo[0].strides) = 1; /* "pandas/index.pyx":383 * count += 1 * indexer[i] = 1 * last_true = i # <<<<<<<<<<<<<< * else: * indexer[i] = 0 */ __pyx_v_last_true = __pyx_v_i; goto __pyx_L6; } /*else*/ { /* "pandas/index.pyx":385 * last_true = i * else: * indexer[i] = 0 # <<<<<<<<<<<<<< * * if count == 0: */ __pyx_t_17 = __pyx_v_i; __pyx_t_6 = -1; if (__pyx_t_17 < 0) { __pyx_t_17 += __pyx_pybuffernd_indexer.diminfo[0].shape; if (unlikely(__pyx_t_17 < 0)) __pyx_t_6 = 0; } else if (unlikely(__pyx_t_17 >= __pyx_pybuffernd_indexer.diminfo[0].shape)) __pyx_t_6 = 0; if (unlikely(__pyx_t_6 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_6); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 385; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_indexer.diminfo[0].strides) = 0; } __pyx_L6:; } /* "pandas/index.pyx":387 * indexer[i] = 0 * * if count == 0: # <<<<<<<<<<<<<< * raise KeyError(val) * if count == 1: */ __pyx_t_1 = ((__pyx_v_count == 0) != 0); if (__pyx_t_1) { /* "pandas/index.pyx":388 * * if count == 0: * raise KeyError(val) # <<<<<<<<<<<<<< * if count == 1: * return last_true */ __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 388; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_v_val); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_val); __Pyx_GIVEREF(__pyx_v_val); __pyx_t_11 = PyObject_Call(__pyx_builtin_KeyError, __pyx_t_3, NULL); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 388; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_Raise(__pyx_t_11, 0, 0, 0); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 388; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } /* "pandas/index.pyx":389 * if count == 0: * raise KeyError(val) * if count == 1: # <<<<<<<<<<<<<< * return last_true * */ __pyx_t_1 = ((__pyx_v_count == 1) != 0); if (__pyx_t_1) { /* "pandas/index.pyx":390 * raise KeyError(val) * if count == 1: * return last_true # <<<<<<<<<<<<<< * * return result */ __Pyx_XDECREF(__pyx_r); __pyx_t_11 = __Pyx_PyInt_From_int(__pyx_v_last_true); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 390; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __pyx_r = __pyx_t_11; __pyx_t_11 = 0; goto __pyx_L0; } /* "pandas/index.pyx":392 * return last_true * * return result # <<<<<<<<<<<<<< * * cdef class Float64Engine(IndexEngine): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_result); __pyx_r = __pyx_v_result; goto __pyx_L0; /* "pandas/index.pyx":359 * raise KeyError(val) * * cdef _maybe_get_bool_indexer(self, object val): # <<<<<<<<<<<<<< * cdef: * ndarray[uint8_t, cast=True] indexer */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_11); __Pyx_XDECREF(__pyx_t_12); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __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.index.Int64Engine._maybe_get_bool_indexer", __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_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_indexer); __Pyx_XDECREF((PyObject *)__pyx_v_values); __Pyx_XDECREF(__pyx_v_result); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/index.pyx":396 * cdef class Float64Engine(IndexEngine): * * cdef _make_hash_table(self, n): # <<<<<<<<<<<<<< * return _hash.Float64HashTable(n) * */ static PyObject *__pyx_f_6pandas_5index_13Float64Engine__make_hash_table(CYTHON_UNUSED struct __pyx_obj_6pandas_5index_Float64Engine *__pyx_v_self, PyObject *__pyx_v_n) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_make_hash_table", 0); /* "pandas/index.pyx":397 * * cdef _make_hash_table(self, n): * return _hash.Float64HashTable(n) # <<<<<<<<<<<<<< * * def _call_monotonic(self, values): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_hash); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 397; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_Float64HashTable); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 397; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 397; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_n); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_n); __Pyx_GIVEREF(__pyx_v_n); __pyx_t_3 = PyObject_Call(__pyx_t_2, __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 397; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; /* "pandas/index.pyx":396 * cdef class Float64Engine(IndexEngine): * * cdef _make_hash_table(self, n): # <<<<<<<<<<<<<< * return _hash.Float64HashTable(n) * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("pandas.index.Float64Engine._make_hash_table", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/index.pyx":399 * return _hash.Float64HashTable(n) * * def _call_monotonic(self, values): # <<<<<<<<<<<<<< * return algos.is_monotonic_float64(values) * */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5index_13Float64Engine_1_call_monotonic(PyObject *__pyx_v_self, PyObject *__pyx_v_values); /*proto*/ static PyObject *__pyx_pw_6pandas_5index_13Float64Engine_1_call_monotonic(PyObject *__pyx_v_self, PyObject *__pyx_v_values) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_call_monotonic (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_5index_13Float64Engine__call_monotonic(((struct __pyx_obj_6pandas_5index_Float64Engine *)__pyx_v_self), ((PyObject *)__pyx_v_values)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5index_13Float64Engine__call_monotonic(CYTHON_UNUSED struct __pyx_obj_6pandas_5index_Float64Engine *__pyx_v_self, PyObject *__pyx_v_values) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_call_monotonic", 0); /* "pandas/index.pyx":400 * * def _call_monotonic(self, values): * return algos.is_monotonic_float64(values) # <<<<<<<<<<<<<< * * def get_pad_indexer(self, other, limit=None): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_algos); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 400; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_is_monotonic_float64); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 400; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 400; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_values); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_values); __Pyx_GIVEREF(__pyx_v_values); __pyx_t_3 = PyObject_Call(__pyx_t_2, __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 400; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; /* "pandas/index.pyx":399 * return _hash.Float64HashTable(n) * * def _call_monotonic(self, values): # <<<<<<<<<<<<<< * return algos.is_monotonic_float64(values) * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("pandas.index.Float64Engine._call_monotonic", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/index.pyx":402 * return algos.is_monotonic_float64(values) * * def get_pad_indexer(self, other, limit=None): # <<<<<<<<<<<<<< * return algos.pad_float64(self._get_index_values(), other, * limit=limit) */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5index_13Float64Engine_3get_pad_indexer(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_6pandas_5index_13Float64Engine_3get_pad_indexer(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_other = 0; PyObject *__pyx_v_limit = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("get_pad_indexer (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_other,&__pyx_n_s_limit,0}; PyObject* values[2] = {0,0}; values[1] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_other)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_limit); if (value) { values[1] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "get_pad_indexer") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 402; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_other = values[0]; __pyx_v_limit = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("get_pad_indexer", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 402; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.index.Float64Engine.get_pad_indexer", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pandas_5index_13Float64Engine_2get_pad_indexer(((struct __pyx_obj_6pandas_5index_Float64Engine *)__pyx_v_self), __pyx_v_other, __pyx_v_limit); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5index_13Float64Engine_2get_pad_indexer(struct __pyx_obj_6pandas_5index_Float64Engine *__pyx_v_self, PyObject *__pyx_v_other, PyObject *__pyx_v_limit) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_pad_indexer", 0); /* "pandas/index.pyx":403 * * def get_pad_indexer(self, other, limit=None): * return algos.pad_float64(self._get_index_values(), other, # <<<<<<<<<<<<<< * limit=limit) * */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_algos); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 403; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_pad_float64); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 403; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = ((struct __pyx_vtabstruct_6pandas_5index_Float64Engine *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base._get_index_values(((struct __pyx_obj_6pandas_5index_IndexEngine *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 403; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 403; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_other); PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_other); __Pyx_GIVEREF(__pyx_v_other); __pyx_t_1 = 0; __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 403; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); /* "pandas/index.pyx":404 * def get_pad_indexer(self, other, limit=None): * return algos.pad_float64(self._get_index_values(), other, * limit=limit) # <<<<<<<<<<<<<< * * def get_backfill_indexer(self, other, limit=None): */ if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_limit, __pyx_v_limit) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 403; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/index.pyx":403 * * def get_pad_indexer(self, other, limit=None): * return algos.pad_float64(self._get_index_values(), other, # <<<<<<<<<<<<<< * limit=limit) * */ __pyx_t_4 = PyObject_Call(__pyx_t_2, __pyx_t_3, __pyx_t_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 403; __pyx_clineno = __LINE__; goto __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; __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; /* "pandas/index.pyx":402 * return algos.is_monotonic_float64(values) * * def get_pad_indexer(self, other, limit=None): # <<<<<<<<<<<<<< * return algos.pad_float64(self._get_index_values(), other, * limit=limit) */ /* 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.index.Float64Engine.get_pad_indexer", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/index.pyx":406 * limit=limit) * * def get_backfill_indexer(self, other, limit=None): # <<<<<<<<<<<<<< * return algos.backfill_float64(self._get_index_values(), other, * limit=limit) */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5index_13Float64Engine_5get_backfill_indexer(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_6pandas_5index_13Float64Engine_5get_backfill_indexer(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_other = 0; PyObject *__pyx_v_limit = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("get_backfill_indexer (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_other,&__pyx_n_s_limit,0}; PyObject* values[2] = {0,0}; values[1] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_other)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_limit); if (value) { values[1] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "get_backfill_indexer") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 406; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_other = values[0]; __pyx_v_limit = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("get_backfill_indexer", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 406; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.index.Float64Engine.get_backfill_indexer", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pandas_5index_13Float64Engine_4get_backfill_indexer(((struct __pyx_obj_6pandas_5index_Float64Engine *)__pyx_v_self), __pyx_v_other, __pyx_v_limit); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5index_13Float64Engine_4get_backfill_indexer(struct __pyx_obj_6pandas_5index_Float64Engine *__pyx_v_self, PyObject *__pyx_v_other, PyObject *__pyx_v_limit) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_backfill_indexer", 0); /* "pandas/index.pyx":407 * * def get_backfill_indexer(self, other, limit=None): * return algos.backfill_float64(self._get_index_values(), other, # <<<<<<<<<<<<<< * limit=limit) * */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_algos); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 407; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_backfill_float64); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 407; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = ((struct __pyx_vtabstruct_6pandas_5index_Float64Engine *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base._get_index_values(((struct __pyx_obj_6pandas_5index_IndexEngine *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 407; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 407; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_other); PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_other); __Pyx_GIVEREF(__pyx_v_other); __pyx_t_1 = 0; __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 407; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); /* "pandas/index.pyx":408 * def get_backfill_indexer(self, other, limit=None): * return algos.backfill_float64(self._get_index_values(), other, * limit=limit) # <<<<<<<<<<<<<< * * */ if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_limit, __pyx_v_limit) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 407; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/index.pyx":407 * * def get_backfill_indexer(self, other, limit=None): * return algos.backfill_float64(self._get_index_values(), other, # <<<<<<<<<<<<<< * limit=limit) * */ __pyx_t_4 = PyObject_Call(__pyx_t_2, __pyx_t_3, __pyx_t_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 407; __pyx_clineno = __LINE__; goto __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; __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; /* "pandas/index.pyx":406 * limit=limit) * * def get_backfill_indexer(self, other, limit=None): # <<<<<<<<<<<<<< * return algos.backfill_float64(self._get_index_values(), other, * limit=limit) */ /* 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.index.Float64Engine.get_backfill_indexer", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/index.pyx":411 * * * cdef Py_ssize_t _bin_search(ndarray values, object val) except -1: # <<<<<<<<<<<<<< * cdef: * Py_ssize_t mid, lo = 0, hi = len(values) - 1 */ static Py_ssize_t __pyx_f_6pandas_5index__bin_search(PyArrayObject *__pyx_v_values, PyObject *__pyx_v_val) { Py_ssize_t __pyx_v_mid; Py_ssize_t __pyx_v_lo; Py_ssize_t __pyx_v_hi; PyObject *__pyx_v_pval = 0; Py_ssize_t __pyx_r; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; int __pyx_t_5; int __pyx_t_6; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_bin_search", 0); /* "pandas/index.pyx":413 * cdef Py_ssize_t _bin_search(ndarray values, object val) except -1: * cdef: * Py_ssize_t mid, lo = 0, hi = len(values) - 1 # <<<<<<<<<<<<<< * object pval * */ __pyx_v_lo = 0; __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 413; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_hi = (__pyx_t_1 - 1); /* "pandas/index.pyx":416 * object pval * * if hi >= 0 and val > util.get_value_at(values, hi): # <<<<<<<<<<<<<< * return len(values) * */ __pyx_t_2 = (__pyx_v_hi >= 0); if (__pyx_t_2) { __pyx_t_3 = PyInt_FromSsize_t(__pyx_v_hi); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 416; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __pyx_f_4util_get_value_at(__pyx_v_values, __pyx_t_3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 416; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyObject_RichCompare(__pyx_v_val, __pyx_t_4, Py_GT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 416; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 416; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_6 = __pyx_t_5; } else { __pyx_t_6 = __pyx_t_2; } if (__pyx_t_6) { /* "pandas/index.pyx":417 * * if hi >= 0 and val > util.get_value_at(values, hi): * return len(values) # <<<<<<<<<<<<<< * * while lo < hi: */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 417; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_t_1; goto __pyx_L0; } /* "pandas/index.pyx":419 * return len(values) * * while lo < hi: # <<<<<<<<<<<<<< * mid = (lo + hi) // 2 * pval = util.get_value_at(values, mid) */ while (1) { __pyx_t_6 = ((__pyx_v_lo < __pyx_v_hi) != 0); if (!__pyx_t_6) break; /* "pandas/index.pyx":420 * * while lo < hi: * mid = (lo + hi) // 2 # <<<<<<<<<<<<<< * pval = util.get_value_at(values, mid) * if val < pval: */ __pyx_v_mid = __Pyx_div_Py_ssize_t((__pyx_v_lo + __pyx_v_hi), 2); /* "pandas/index.pyx":421 * while lo < hi: * mid = (lo + hi) // 2 * pval = util.get_value_at(values, mid) # <<<<<<<<<<<<<< * if val < pval: * hi = mid */ __pyx_t_3 = PyInt_FromSsize_t(__pyx_v_mid); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 421; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __pyx_f_4util_get_value_at(__pyx_v_values, __pyx_t_3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 421; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF_SET(__pyx_v_pval, __pyx_t_4); __pyx_t_4 = 0; /* "pandas/index.pyx":422 * mid = (lo + hi) // 2 * pval = util.get_value_at(values, mid) * if val < pval: # <<<<<<<<<<<<<< * hi = mid * elif val > pval: */ __pyx_t_4 = PyObject_RichCompare(__pyx_v_val, __pyx_v_pval, Py_LT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 422; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 422; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_6) { /* "pandas/index.pyx":423 * pval = util.get_value_at(values, mid) * if val < pval: * hi = mid # <<<<<<<<<<<<<< * elif val > pval: * lo = mid + 1 */ __pyx_v_hi = __pyx_v_mid; goto __pyx_L6; } /* "pandas/index.pyx":424 * if val < pval: * hi = mid * elif val > pval: # <<<<<<<<<<<<<< * lo = mid + 1 * else: */ __pyx_t_4 = PyObject_RichCompare(__pyx_v_val, __pyx_v_pval, Py_GT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 424; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 424; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_6) { /* "pandas/index.pyx":425 * hi = mid * elif val > pval: * lo = mid + 1 # <<<<<<<<<<<<<< * else: * while mid > 0 and val == util.get_value_at(values, mid - 1): */ __pyx_v_lo = (__pyx_v_mid + 1); goto __pyx_L6; } /*else*/ { /* "pandas/index.pyx":427 * lo = mid + 1 * else: * while mid > 0 and val == util.get_value_at(values, mid - 1): # <<<<<<<<<<<<<< * mid -= 1 * return mid */ while (1) { __pyx_t_6 = (__pyx_v_mid > 0); if (__pyx_t_6) { __pyx_t_4 = PyInt_FromSsize_t((__pyx_v_mid - 1)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 427; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = __pyx_f_4util_get_value_at(__pyx_v_values, __pyx_t_4); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 427; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyObject_RichCompare(__pyx_v_val, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 427; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 427; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_5 = __pyx_t_2; } else { __pyx_t_5 = __pyx_t_6; } if (!__pyx_t_5) break; /* "pandas/index.pyx":428 * else: * while mid > 0 and val == util.get_value_at(values, mid - 1): * mid -= 1 # <<<<<<<<<<<<<< * return mid * */ __pyx_v_mid = (__pyx_v_mid - 1); } /* "pandas/index.pyx":429 * while mid > 0 and val == util.get_value_at(values, mid - 1): * mid -= 1 * return mid # <<<<<<<<<<<<<< * * if val <= util.get_value_at(values, mid): */ __pyx_r = __pyx_v_mid; goto __pyx_L0; } __pyx_L6:; } /* "pandas/index.pyx":431 * return mid * * if val <= util.get_value_at(values, mid): # <<<<<<<<<<<<<< * return mid * else: */ __pyx_t_4 = PyInt_FromSsize_t(__pyx_v_mid); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 431; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = __pyx_f_4util_get_value_at(__pyx_v_values, __pyx_t_4); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 431; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyObject_RichCompare(__pyx_v_val, __pyx_t_3, Py_LE); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 431; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 431; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_5) { /* "pandas/index.pyx":432 * * if val <= util.get_value_at(values, mid): * return mid # <<<<<<<<<<<<<< * else: * return mid + 1 */ __pyx_r = __pyx_v_mid; goto __pyx_L0; } /*else*/ { /* "pandas/index.pyx":434 * return mid * else: * return mid + 1 # <<<<<<<<<<<<<< * * _pad_functions = { */ __pyx_r = (__pyx_v_mid + 1); goto __pyx_L0; } /* "pandas/index.pyx":411 * * * cdef Py_ssize_t _bin_search(ndarray values, object val) except -1: # <<<<<<<<<<<<<< * cdef: * Py_ssize_t mid, lo = 0, hi = len(values) - 1 */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("pandas.index._bin_search", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_XDECREF(__pyx_v_pval); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/index.pyx":450 * cdef class ObjectEngine(IndexEngine): * * cdef _make_hash_table(self, n): # <<<<<<<<<<<<<< * return _hash.PyObjectHashTable(n) * */ static PyObject *__pyx_f_6pandas_5index_12ObjectEngine__make_hash_table(CYTHON_UNUSED struct __pyx_obj_6pandas_5index_ObjectEngine *__pyx_v_self, PyObject *__pyx_v_n) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_make_hash_table", 0); /* "pandas/index.pyx":451 * * cdef _make_hash_table(self, n): * return _hash.PyObjectHashTable(n) # <<<<<<<<<<<<<< * * def _call_monotonic(self, values): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_hash); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 451; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_PyObjectHashTable); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 451; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 451; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_n); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_n); __Pyx_GIVEREF(__pyx_v_n); __pyx_t_3 = PyObject_Call(__pyx_t_2, __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 451; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; /* "pandas/index.pyx":450 * cdef class ObjectEngine(IndexEngine): * * cdef _make_hash_table(self, n): # <<<<<<<<<<<<<< * return _hash.PyObjectHashTable(n) * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("pandas.index.ObjectEngine._make_hash_table", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/index.pyx":453 * return _hash.PyObjectHashTable(n) * * def _call_monotonic(self, values): # <<<<<<<<<<<<<< * return algos.is_monotonic_object(values) * */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5index_12ObjectEngine_1_call_monotonic(PyObject *__pyx_v_self, PyObject *__pyx_v_values); /*proto*/ static PyObject *__pyx_pw_6pandas_5index_12ObjectEngine_1_call_monotonic(PyObject *__pyx_v_self, PyObject *__pyx_v_values) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_call_monotonic (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_5index_12ObjectEngine__call_monotonic(((struct __pyx_obj_6pandas_5index_ObjectEngine *)__pyx_v_self), ((PyObject *)__pyx_v_values)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5index_12ObjectEngine__call_monotonic(CYTHON_UNUSED struct __pyx_obj_6pandas_5index_ObjectEngine *__pyx_v_self, PyObject *__pyx_v_values) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_call_monotonic", 0); /* "pandas/index.pyx":454 * * def _call_monotonic(self, values): * return algos.is_monotonic_object(values) # <<<<<<<<<<<<<< * * def get_pad_indexer(self, other, limit=None): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_algos); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 454; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_is_monotonic_object); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 454; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 454; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_values); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_values); __Pyx_GIVEREF(__pyx_v_values); __pyx_t_3 = PyObject_Call(__pyx_t_2, __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 454; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; /* "pandas/index.pyx":453 * return _hash.PyObjectHashTable(n) * * def _call_monotonic(self, values): # <<<<<<<<<<<<<< * return algos.is_monotonic_object(values) * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("pandas.index.ObjectEngine._call_monotonic", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/index.pyx":456 * return algos.is_monotonic_object(values) * * def get_pad_indexer(self, other, limit=None): # <<<<<<<<<<<<<< * return algos.pad_object(self._get_index_values(), other, * limit=limit) */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5index_12ObjectEngine_3get_pad_indexer(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_6pandas_5index_12ObjectEngine_3get_pad_indexer(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_other = 0; PyObject *__pyx_v_limit = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("get_pad_indexer (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_other,&__pyx_n_s_limit,0}; PyObject* values[2] = {0,0}; values[1] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_other)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_limit); if (value) { values[1] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "get_pad_indexer") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 456; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_other = values[0]; __pyx_v_limit = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("get_pad_indexer", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 456; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.index.ObjectEngine.get_pad_indexer", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pandas_5index_12ObjectEngine_2get_pad_indexer(((struct __pyx_obj_6pandas_5index_ObjectEngine *)__pyx_v_self), __pyx_v_other, __pyx_v_limit); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5index_12ObjectEngine_2get_pad_indexer(struct __pyx_obj_6pandas_5index_ObjectEngine *__pyx_v_self, PyObject *__pyx_v_other, PyObject *__pyx_v_limit) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_pad_indexer", 0); /* "pandas/index.pyx":457 * * def get_pad_indexer(self, other, limit=None): * return algos.pad_object(self._get_index_values(), other, # <<<<<<<<<<<<<< * limit=limit) * */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_algos); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 457; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_pad_object); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 457; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = ((struct __pyx_vtabstruct_6pandas_5index_ObjectEngine *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base._get_index_values(((struct __pyx_obj_6pandas_5index_IndexEngine *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 457; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 457; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_other); PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_other); __Pyx_GIVEREF(__pyx_v_other); __pyx_t_1 = 0; __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 457; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); /* "pandas/index.pyx":458 * def get_pad_indexer(self, other, limit=None): * return algos.pad_object(self._get_index_values(), other, * limit=limit) # <<<<<<<<<<<<<< * * def get_backfill_indexer(self, other, limit=None): */ if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_limit, __pyx_v_limit) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 457; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/index.pyx":457 * * def get_pad_indexer(self, other, limit=None): * return algos.pad_object(self._get_index_values(), other, # <<<<<<<<<<<<<< * limit=limit) * */ __pyx_t_4 = PyObject_Call(__pyx_t_2, __pyx_t_3, __pyx_t_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 457; __pyx_clineno = __LINE__; goto __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; __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; /* "pandas/index.pyx":456 * return algos.is_monotonic_object(values) * * def get_pad_indexer(self, other, limit=None): # <<<<<<<<<<<<<< * return algos.pad_object(self._get_index_values(), other, * limit=limit) */ /* 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.index.ObjectEngine.get_pad_indexer", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/index.pyx":460 * limit=limit) * * def get_backfill_indexer(self, other, limit=None): # <<<<<<<<<<<<<< * return algos.backfill_object(self._get_index_values(), other, * limit=limit) */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5index_12ObjectEngine_5get_backfill_indexer(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_6pandas_5index_12ObjectEngine_5get_backfill_indexer(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_other = 0; PyObject *__pyx_v_limit = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("get_backfill_indexer (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_other,&__pyx_n_s_limit,0}; PyObject* values[2] = {0,0}; values[1] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_other)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_limit); if (value) { values[1] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "get_backfill_indexer") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 460; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_other = values[0]; __pyx_v_limit = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("get_backfill_indexer", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 460; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.index.ObjectEngine.get_backfill_indexer", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pandas_5index_12ObjectEngine_4get_backfill_indexer(((struct __pyx_obj_6pandas_5index_ObjectEngine *)__pyx_v_self), __pyx_v_other, __pyx_v_limit); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5index_12ObjectEngine_4get_backfill_indexer(struct __pyx_obj_6pandas_5index_ObjectEngine *__pyx_v_self, PyObject *__pyx_v_other, PyObject *__pyx_v_limit) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_backfill_indexer", 0); /* "pandas/index.pyx":461 * * def get_backfill_indexer(self, other, limit=None): * return algos.backfill_object(self._get_index_values(), other, # <<<<<<<<<<<<<< * limit=limit) * */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_algos); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 461; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_backfill_object); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 461; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = ((struct __pyx_vtabstruct_6pandas_5index_ObjectEngine *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base._get_index_values(((struct __pyx_obj_6pandas_5index_IndexEngine *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 461; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 461; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_other); PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_other); __Pyx_GIVEREF(__pyx_v_other); __pyx_t_1 = 0; __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 461; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); /* "pandas/index.pyx":462 * def get_backfill_indexer(self, other, limit=None): * return algos.backfill_object(self._get_index_values(), other, * limit=limit) # <<<<<<<<<<<<<< * * */ if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_limit, __pyx_v_limit) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 461; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/index.pyx":461 * * def get_backfill_indexer(self, other, limit=None): * return algos.backfill_object(self._get_index_values(), other, # <<<<<<<<<<<<<< * limit=limit) * */ __pyx_t_4 = PyObject_Call(__pyx_t_2, __pyx_t_3, __pyx_t_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 461; __pyx_clineno = __LINE__; goto __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; __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; /* "pandas/index.pyx":460 * limit=limit) * * def get_backfill_indexer(self, other, limit=None): # <<<<<<<<<<<<<< * return algos.backfill_object(self._get_index_values(), other, * limit=limit) */ /* 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.index.ObjectEngine.get_backfill_indexer", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/index.pyx":467 * cdef class DatetimeEngine(Int64Engine): * * def __contains__(self, object val): # <<<<<<<<<<<<<< * if self.over_size_threshold and self.is_monotonic: * if not self.is_unique: */ /* Python wrapper */ static int __pyx_pw_6pandas_5index_14DatetimeEngine_1__contains__(PyObject *__pyx_v_self, PyObject *__pyx_v_val); /*proto*/ static int __pyx_pw_6pandas_5index_14DatetimeEngine_1__contains__(PyObject *__pyx_v_self, PyObject *__pyx_v_val) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__contains__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_5index_14DatetimeEngine___contains__(((struct __pyx_obj_6pandas_5index_DatetimeEngine *)__pyx_v_self), ((PyObject *)__pyx_v_val)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pandas_5index_14DatetimeEngine___contains__(struct __pyx_obj_6pandas_5index_DatetimeEngine *__pyx_v_self, PyObject *__pyx_v_val) { PyObject *__pyx_v_values = NULL; PyObject *__pyx_v_conv = NULL; PyObject *__pyx_v_loc = NULL; int __pyx_r; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; int __pyx_t_3; int __pyx_t_4; int __pyx_t_5; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__contains__", 0); /* "pandas/index.pyx":468 * * def __contains__(self, object val): * if self.over_size_threshold and self.is_monotonic: # <<<<<<<<<<<<<< * if not self.is_unique: * return self._get_loc_duplicates(val) */ __pyx_t_1 = __pyx_v_self->__pyx_base.__pyx_base.over_size_threshold; if (__pyx_t_1) { __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_is_monotonic); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 468; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 468; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_4 = __pyx_t_3; } else { __pyx_t_4 = __pyx_t_1; } if (__pyx_t_4) { /* "pandas/index.pyx":469 * def __contains__(self, object val): * if self.over_size_threshold and self.is_monotonic: * if not self.is_unique: # <<<<<<<<<<<<<< * return self._get_loc_duplicates(val) * values = self._get_index_values() */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_is_unique); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 469; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 469; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_1 = ((!__pyx_t_4) != 0); if (__pyx_t_1) { /* "pandas/index.pyx":470 * if self.over_size_threshold and self.is_monotonic: * if not self.is_unique: * return self._get_loc_duplicates(val) # <<<<<<<<<<<<<< * values = self._get_index_values() * conv = _to_i8(val) */ __pyx_t_2 = __pyx_f_6pandas_5index_11IndexEngine__get_loc_duplicates(((struct __pyx_obj_6pandas_5index_IndexEngine *)__pyx_v_self), __pyx_v_val); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 470; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 470; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_5; goto __pyx_L0; } /* "pandas/index.pyx":471 * if not self.is_unique: * return self._get_loc_duplicates(val) * values = self._get_index_values() # <<<<<<<<<<<<<< * conv = _to_i8(val) * loc = values.searchsorted(conv, side='left') */ __pyx_t_2 = ((struct __pyx_vtabstruct_6pandas_5index_DatetimeEngine *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base._get_index_values(((struct __pyx_obj_6pandas_5index_IndexEngine *)__pyx_v_self)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 471; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_v_values = __pyx_t_2; __pyx_t_2 = 0; /* "pandas/index.pyx":472 * return self._get_loc_duplicates(val) * values = self._get_index_values() * conv = _to_i8(val) # <<<<<<<<<<<<<< * loc = values.searchsorted(conv, side='left') * return util.get_value_at(values, loc) == conv */ __pyx_t_2 = __pyx_f_6pandas_5index__to_i8(__pyx_v_val); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 472; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_v_conv = __pyx_t_2; __pyx_t_2 = 0; /* "pandas/index.pyx":473 * values = self._get_index_values() * conv = _to_i8(val) * loc = values.searchsorted(conv, side='left') # <<<<<<<<<<<<<< * return util.get_value_at(values, loc) == conv * */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_values, __pyx_n_s_searchsorted); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 473; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 473; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(__pyx_v_conv); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_conv); __Pyx_GIVEREF(__pyx_v_conv); __pyx_t_7 = PyDict_New(); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 473; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_side, __pyx_n_s_left) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 473; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_8 = PyObject_Call(__pyx_t_2, __pyx_t_6, __pyx_t_7); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 473; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_v_loc = __pyx_t_8; __pyx_t_8 = 0; /* "pandas/index.pyx":474 * conv = _to_i8(val) * loc = values.searchsorted(conv, side='left') * return util.get_value_at(values, loc) == conv # <<<<<<<<<<<<<< * * self._ensure_mapping_populated() */ if (!(likely(((__pyx_v_values) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_values, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 474; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_8 = __pyx_f_4util_get_value_at(((PyArrayObject *)__pyx_v_values), __pyx_v_loc); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 474; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_7 = PyObject_RichCompare(__pyx_t_8, __pyx_v_conv, Py_EQ); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 474; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_t_7); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 474; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_r = __pyx_t_5; goto __pyx_L0; } /* "pandas/index.pyx":476 * return util.get_value_at(values, loc) == conv * * self._ensure_mapping_populated() # <<<<<<<<<<<<<< * return _to_i8(val) in self.mapping * */ __pyx_t_7 = __pyx_f_6pandas_5index_11IndexEngine__ensure_mapping_populated(((struct __pyx_obj_6pandas_5index_IndexEngine *)__pyx_v_self)); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 476; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; /* "pandas/index.pyx":477 * * self._ensure_mapping_populated() * return _to_i8(val) in self.mapping # <<<<<<<<<<<<<< * * cdef _get_index_values(self): */ __pyx_t_7 = __pyx_f_6pandas_5index__to_i8(__pyx_v_val); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 477; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_t_1 = (__Pyx_PySequence_Contains(__pyx_t_7, ((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.mapping), Py_EQ)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 477; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_r = __pyx_t_1; goto __pyx_L0; /* "pandas/index.pyx":467 * cdef class DatetimeEngine(Int64Engine): * * def __contains__(self, object val): # <<<<<<<<<<<<<< * if self.over_size_threshold and self.is_monotonic: * if not self.is_unique: */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_AddTraceback("pandas.index.DatetimeEngine.__contains__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_XDECREF(__pyx_v_values); __Pyx_XDECREF(__pyx_v_conv); __Pyx_XDECREF(__pyx_v_loc); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/index.pyx":479 * return _to_i8(val) in self.mapping * * cdef _get_index_values(self): # <<<<<<<<<<<<<< * return self.vgetter().view('i8') * */ static PyObject *__pyx_f_6pandas_5index_14DatetimeEngine__get_index_values(struct __pyx_obj_6pandas_5index_DatetimeEngine *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_get_index_values", 0); /* "pandas/index.pyx":480 * * cdef _get_index_values(self): * return self.vgetter().view('i8') # <<<<<<<<<<<<<< * * def _call_monotonic(self, values): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyObject_Call(__pyx_v_self->__pyx_base.__pyx_base.vgetter, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 480; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_view); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 480; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyObject_Call(__pyx_t_2, __pyx_tuple_, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 480; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "pandas/index.pyx":479 * return _to_i8(val) in self.mapping * * cdef _get_index_values(self): # <<<<<<<<<<<<<< * return self.vgetter().view('i8') * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("pandas.index.DatetimeEngine._get_index_values", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/index.pyx":482 * return self.vgetter().view('i8') * * def _call_monotonic(self, values): # <<<<<<<<<<<<<< * return algos.is_monotonic_int64(values) * */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5index_14DatetimeEngine_3_call_monotonic(PyObject *__pyx_v_self, PyObject *__pyx_v_values); /*proto*/ static PyObject *__pyx_pw_6pandas_5index_14DatetimeEngine_3_call_monotonic(PyObject *__pyx_v_self, PyObject *__pyx_v_values) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_call_monotonic (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_5index_14DatetimeEngine_2_call_monotonic(((struct __pyx_obj_6pandas_5index_DatetimeEngine *)__pyx_v_self), ((PyObject *)__pyx_v_values)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5index_14DatetimeEngine_2_call_monotonic(CYTHON_UNUSED struct __pyx_obj_6pandas_5index_DatetimeEngine *__pyx_v_self, PyObject *__pyx_v_values) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_call_monotonic", 0); /* "pandas/index.pyx":483 * * def _call_monotonic(self, values): * return algos.is_monotonic_int64(values) # <<<<<<<<<<<<<< * * cpdef get_loc(self, object val): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_algos); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 483; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_is_monotonic_int64); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 483; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 483; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_values); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_values); __Pyx_GIVEREF(__pyx_v_values); __pyx_t_3 = PyObject_Call(__pyx_t_2, __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 483; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; /* "pandas/index.pyx":482 * return self.vgetter().view('i8') * * def _call_monotonic(self, values): # <<<<<<<<<<<<<< * return algos.is_monotonic_int64(values) * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("pandas.index.DatetimeEngine._call_monotonic", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/index.pyx":485 * return algos.is_monotonic_int64(values) * * cpdef get_loc(self, object val): # <<<<<<<<<<<<<< * if is_definitely_invalid_key(val): * raise TypeError */ static PyObject *__pyx_pw_6pandas_5index_14DatetimeEngine_5get_loc(PyObject *__pyx_v_self, PyObject *__pyx_v_val); /*proto*/ static PyObject *__pyx_f_6pandas_5index_14DatetimeEngine_get_loc(struct __pyx_obj_6pandas_5index_DatetimeEngine *__pyx_v_self, PyObject *__pyx_v_val, int __pyx_skip_dispatch) { PyObject *__pyx_v_values = NULL; PyObject *__pyx_v_conv = NULL; PyObject *__pyx_v_loc = 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; PyObject *__pyx_t_7 = NULL; Py_ssize_t __pyx_t_8; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; PyObject *__pyx_t_11 = NULL; int __pyx_t_12; PyObject *__pyx_t_13 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_loc", 0); __Pyx_INCREF(__pyx_v_val); /* 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_get_loc); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 485; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_6pandas_5index_14DatetimeEngine_5get_loc)) { __Pyx_XDECREF(__pyx_r); __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 485; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_val); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_val); __Pyx_GIVEREF(__pyx_v_val); __pyx_t_3 = PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 485; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_3; __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } /* "pandas/index.pyx":486 * * cpdef get_loc(self, object val): * if is_definitely_invalid_key(val): # <<<<<<<<<<<<<< * raise TypeError * */ __pyx_t_1 = __pyx_f_6pandas_5index_is_definitely_invalid_key(__pyx_v_val); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 486; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 486; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_4) { /* "pandas/index.pyx":487 * cpdef get_loc(self, object val): * if is_definitely_invalid_key(val): * raise TypeError # <<<<<<<<<<<<<< * * # Welcome to the spaghetti factory */ __Pyx_Raise(__pyx_builtin_TypeError, 0, 0, 0); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 487; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } /* "pandas/index.pyx":491 * # Welcome to the spaghetti factory * * if self.over_size_threshold and self.is_monotonic: # <<<<<<<<<<<<<< * if not self.is_unique: * val = _to_i8(val) */ __pyx_t_4 = __pyx_v_self->__pyx_base.__pyx_base.over_size_threshold; if (__pyx_t_4) { __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_is_monotonic); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 491; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 491; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_6 = __pyx_t_5; } else { __pyx_t_6 = __pyx_t_4; } if (__pyx_t_6) { /* "pandas/index.pyx":492 * * if self.over_size_threshold and self.is_monotonic: * if not self.is_unique: # <<<<<<<<<<<<<< * val = _to_i8(val) * return self._get_loc_duplicates(val) */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_is_unique); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 492; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 492; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_4 = ((!__pyx_t_6) != 0); if (__pyx_t_4) { /* "pandas/index.pyx":493 * if self.over_size_threshold and self.is_monotonic: * if not self.is_unique: * val = _to_i8(val) # <<<<<<<<<<<<<< * return self._get_loc_duplicates(val) * values = self._get_index_values() */ __pyx_t_1 = __pyx_f_6pandas_5index__to_i8(__pyx_v_val); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 493; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF_SET(__pyx_v_val, __pyx_t_1); __pyx_t_1 = 0; /* "pandas/index.pyx":494 * if not self.is_unique: * val = _to_i8(val) * return self._get_loc_duplicates(val) # <<<<<<<<<<<<<< * values = self._get_index_values() * conv = _to_i8(val) */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_6pandas_5index_11IndexEngine__get_loc_duplicates(((struct __pyx_obj_6pandas_5index_IndexEngine *)__pyx_v_self), __pyx_v_val); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 494; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; } /* "pandas/index.pyx":495 * val = _to_i8(val) * return self._get_loc_duplicates(val) * values = self._get_index_values() # <<<<<<<<<<<<<< * conv = _to_i8(val) * loc = values.searchsorted(conv, side='left') */ __pyx_t_1 = ((struct __pyx_vtabstruct_6pandas_5index_DatetimeEngine *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base._get_index_values(((struct __pyx_obj_6pandas_5index_IndexEngine *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 495; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_v_values = __pyx_t_1; __pyx_t_1 = 0; /* "pandas/index.pyx":496 * return self._get_loc_duplicates(val) * values = self._get_index_values() * conv = _to_i8(val) # <<<<<<<<<<<<<< * loc = values.searchsorted(conv, side='left') * if loc == len(values) or util.get_value_at(values, loc) != conv: */ __pyx_t_1 = __pyx_f_6pandas_5index__to_i8(__pyx_v_val); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 496; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_v_conv = __pyx_t_1; __pyx_t_1 = 0; /* "pandas/index.pyx":497 * values = self._get_index_values() * conv = _to_i8(val) * loc = values.searchsorted(conv, side='left') # <<<<<<<<<<<<<< * if loc == len(values) or util.get_value_at(values, loc) != conv: * raise KeyError(val) */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_values, __pyx_n_s_searchsorted); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 497; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 497; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_v_conv); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_conv); __Pyx_GIVEREF(__pyx_v_conv); __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 497; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_side, __pyx_n_s_left) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 497; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_7 = PyObject_Call(__pyx_t_1, __pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 497; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_loc = __pyx_t_7; __pyx_t_7 = 0; /* "pandas/index.pyx":498 * conv = _to_i8(val) * loc = values.searchsorted(conv, side='left') * if loc == len(values) or util.get_value_at(values, loc) != conv: # <<<<<<<<<<<<<< * raise KeyError(val) * return loc */ __pyx_t_8 = PyObject_Length(__pyx_v_values); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 498; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_7 = PyInt_FromSsize_t(__pyx_t_8); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 498; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_t_2 = PyObject_RichCompare(__pyx_v_loc, __pyx_t_7, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 498; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 498; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (!__pyx_t_4) { if (!(likely(((__pyx_v_values) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_values, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 498; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_2 = __pyx_f_4util_get_value_at(((PyArrayObject *)__pyx_v_values), __pyx_v_loc); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 498; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_7 = PyObject_RichCompare(__pyx_t_2, __pyx_v_conv, Py_NE); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 498; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 498; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_5 = __pyx_t_6; } else { __pyx_t_5 = __pyx_t_4; } if (__pyx_t_5) { /* "pandas/index.pyx":499 * loc = values.searchsorted(conv, side='left') * if loc == len(values) or util.get_value_at(values, loc) != conv: * raise KeyError(val) # <<<<<<<<<<<<<< * return loc * */ __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 499; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_INCREF(__pyx_v_val); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_v_val); __Pyx_GIVEREF(__pyx_v_val); __pyx_t_2 = PyObject_Call(__pyx_builtin_KeyError, __pyx_t_7, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 499; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 499; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } /* "pandas/index.pyx":500 * if loc == len(values) or util.get_value_at(values, loc) != conv: * raise KeyError(val) * return loc # <<<<<<<<<<<<<< * * self._ensure_mapping_populated() */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_loc); __pyx_r = __pyx_v_loc; goto __pyx_L0; } /* "pandas/index.pyx":502 * return loc * * self._ensure_mapping_populated() # <<<<<<<<<<<<<< * if not self.unique: * val = _to_i8(val) */ __pyx_t_2 = __pyx_f_6pandas_5index_11IndexEngine__ensure_mapping_populated(((struct __pyx_obj_6pandas_5index_IndexEngine *)__pyx_v_self)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 502; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/index.pyx":503 * * self._ensure_mapping_populated() * if not self.unique: # <<<<<<<<<<<<<< * val = _to_i8(val) * return self._get_loc_duplicates(val) */ __pyx_t_5 = ((!(__pyx_v_self->__pyx_base.__pyx_base.unique != 0)) != 0); if (__pyx_t_5) { /* "pandas/index.pyx":504 * self._ensure_mapping_populated() * if not self.unique: * val = _to_i8(val) # <<<<<<<<<<<<<< * return self._get_loc_duplicates(val) * */ __pyx_t_2 = __pyx_f_6pandas_5index__to_i8(__pyx_v_val); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 504; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF_SET(__pyx_v_val, __pyx_t_2); __pyx_t_2 = 0; /* "pandas/index.pyx":505 * if not self.unique: * val = _to_i8(val) * return self._get_loc_duplicates(val) # <<<<<<<<<<<<<< * * try: */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __pyx_f_6pandas_5index_11IndexEngine__get_loc_duplicates(((struct __pyx_obj_6pandas_5index_IndexEngine *)__pyx_v_self), __pyx_v_val); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 505; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; } /* "pandas/index.pyx":507 * return self._get_loc_duplicates(val) * * try: # <<<<<<<<<<<<<< * return self.mapping.get_item(val.value) * except KeyError: */ { __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11); __Pyx_XGOTREF(__pyx_t_9); __Pyx_XGOTREF(__pyx_t_10); __Pyx_XGOTREF(__pyx_t_11); /*try:*/ { /* "pandas/index.pyx":508 * * try: * return self.mapping.get_item(val.value) # <<<<<<<<<<<<<< * except KeyError: * raise KeyError(val) */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.mapping), __pyx_n_s_get_item); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 508; __pyx_clineno = __LINE__; goto __pyx_L8_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_val, __pyx_n_s_value); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 508; __pyx_clineno = __LINE__; goto __pyx_L8_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 508; __pyx_clineno = __LINE__; goto __pyx_L8_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_7); __Pyx_GIVEREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_7 = PyObject_Call(__pyx_t_2, __pyx_t_3, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 508; __pyx_clineno = __LINE__; goto __pyx_L8_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_r = __pyx_t_7; __pyx_t_7 = 0; goto __pyx_L12_try_return; } __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; goto __pyx_L15_try_end; __pyx_L8_error:; __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; __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; /* "pandas/index.pyx":509 * try: * return self.mapping.get_item(val.value) * except KeyError: # <<<<<<<<<<<<<< * raise KeyError(val) * except AttributeError: */ __pyx_t_12 = PyErr_ExceptionMatches(__pyx_builtin_KeyError); if (__pyx_t_12) { __Pyx_AddTraceback("pandas.index.DatetimeEngine.get_loc", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_7, &__pyx_t_3, &__pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 509; __pyx_clineno = __LINE__; goto __pyx_L10_except_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_GOTREF(__pyx_t_3); __Pyx_GOTREF(__pyx_t_2); /* "pandas/index.pyx":510 * return self.mapping.get_item(val.value) * except KeyError: * raise KeyError(val) # <<<<<<<<<<<<<< * except AttributeError: * pass */ __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 510; __pyx_clineno = __LINE__; goto __pyx_L10_except_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_val); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_val); __Pyx_GIVEREF(__pyx_v_val); __pyx_t_13 = PyObject_Call(__pyx_builtin_KeyError, __pyx_t_1, NULL); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 510; __pyx_clineno = __LINE__; goto __pyx_L10_except_error;} __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_Raise(__pyx_t_13, 0, 0, 0); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 510; __pyx_clineno = __LINE__; goto __pyx_L10_except_error;} __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; goto __pyx_L9_exception_handled; } /* "pandas/index.pyx":511 * except KeyError: * raise KeyError(val) * except AttributeError: # <<<<<<<<<<<<<< * pass * */ __pyx_t_12 = PyErr_ExceptionMatches(__pyx_builtin_AttributeError); if (__pyx_t_12) { PyErr_Restore(0,0,0); goto __pyx_L9_exception_handled; } goto __pyx_L10_except_error; __pyx_L10_except_error:; __Pyx_XGIVEREF(__pyx_t_9); __Pyx_XGIVEREF(__pyx_t_10); __Pyx_XGIVEREF(__pyx_t_11); __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_10, __pyx_t_11); goto __pyx_L1_error; __pyx_L12_try_return:; __Pyx_XGIVEREF(__pyx_t_9); __Pyx_XGIVEREF(__pyx_t_10); __Pyx_XGIVEREF(__pyx_t_11); __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_10, __pyx_t_11); goto __pyx_L0; __pyx_L9_exception_handled:; __Pyx_XGIVEREF(__pyx_t_9); __Pyx_XGIVEREF(__pyx_t_10); __Pyx_XGIVEREF(__pyx_t_11); __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_10, __pyx_t_11); __pyx_L15_try_end:; } /* "pandas/index.pyx":514 * pass * * try: # <<<<<<<<<<<<<< * val = _to_i8(val) * return self.mapping.get_item(val) */ { __Pyx_ExceptionSave(&__pyx_t_11, &__pyx_t_10, &__pyx_t_9); __Pyx_XGOTREF(__pyx_t_11); __Pyx_XGOTREF(__pyx_t_10); __Pyx_XGOTREF(__pyx_t_9); /*try:*/ { /* "pandas/index.pyx":515 * * try: * val = _to_i8(val) # <<<<<<<<<<<<<< * return self.mapping.get_item(val) * except TypeError: */ __pyx_t_2 = __pyx_f_6pandas_5index__to_i8(__pyx_v_val); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 515; __pyx_clineno = __LINE__; goto __pyx_L18_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF_SET(__pyx_v_val, __pyx_t_2); __pyx_t_2 = 0; /* "pandas/index.pyx":516 * try: * val = _to_i8(val) * return self.mapping.get_item(val) # <<<<<<<<<<<<<< * except TypeError: * self._date_check_type(val) */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.mapping), __pyx_n_s_get_item); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 516; __pyx_clineno = __LINE__; goto __pyx_L18_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 516; __pyx_clineno = __LINE__; goto __pyx_L18_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_v_val); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_val); __Pyx_GIVEREF(__pyx_v_val); __pyx_t_7 = PyObject_Call(__pyx_t_2, __pyx_t_3, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 516; __pyx_clineno = __LINE__; goto __pyx_L18_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_r = __pyx_t_7; __pyx_t_7 = 0; goto __pyx_L22_try_return; } __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; goto __pyx_L25_try_end; __pyx_L18_error:; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; /* "pandas/index.pyx":517 * val = _to_i8(val) * return self.mapping.get_item(val) * except TypeError: # <<<<<<<<<<<<<< * self._date_check_type(val) * raise KeyError(val) */ __pyx_t_12 = PyErr_ExceptionMatches(__pyx_builtin_TypeError); if (__pyx_t_12) { __Pyx_AddTraceback("pandas.index.DatetimeEngine.get_loc", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_7, &__pyx_t_3, &__pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 517; __pyx_clineno = __LINE__; goto __pyx_L20_except_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_GOTREF(__pyx_t_3); __Pyx_GOTREF(__pyx_t_2); /* "pandas/index.pyx":518 * return self.mapping.get_item(val) * except TypeError: * self._date_check_type(val) # <<<<<<<<<<<<<< * raise KeyError(val) * */ __pyx_t_13 = __pyx_f_6pandas_5index_14DatetimeEngine__date_check_type(__pyx_v_self, __pyx_v_val); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 518; __pyx_clineno = __LINE__; goto __pyx_L20_except_error;} __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; /* "pandas/index.pyx":519 * except TypeError: * self._date_check_type(val) * raise KeyError(val) # <<<<<<<<<<<<<< * * cdef inline _date_check_type(self, object val): */ __pyx_t_13 = PyTuple_New(1); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 519; __pyx_clineno = __LINE__; goto __pyx_L20_except_error;} __Pyx_GOTREF(__pyx_t_13); __Pyx_INCREF(__pyx_v_val); PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_v_val); __Pyx_GIVEREF(__pyx_v_val); __pyx_t_1 = PyObject_Call(__pyx_builtin_KeyError, __pyx_t_13, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 519; __pyx_clineno = __LINE__; goto __pyx_L20_except_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 519; __pyx_clineno = __LINE__; goto __pyx_L20_except_error;} __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; goto __pyx_L19_exception_handled; } goto __pyx_L20_except_error; __pyx_L20_except_error:; __Pyx_XGIVEREF(__pyx_t_11); __Pyx_XGIVEREF(__pyx_t_10); __Pyx_XGIVEREF(__pyx_t_9); __Pyx_ExceptionReset(__pyx_t_11, __pyx_t_10, __pyx_t_9); goto __pyx_L1_error; __pyx_L22_try_return:; __Pyx_XGIVEREF(__pyx_t_11); __Pyx_XGIVEREF(__pyx_t_10); __Pyx_XGIVEREF(__pyx_t_9); __Pyx_ExceptionReset(__pyx_t_11, __pyx_t_10, __pyx_t_9); goto __pyx_L0; __pyx_L19_exception_handled:; __Pyx_XGIVEREF(__pyx_t_11); __Pyx_XGIVEREF(__pyx_t_10); __Pyx_XGIVEREF(__pyx_t_9); __Pyx_ExceptionReset(__pyx_t_11, __pyx_t_10, __pyx_t_9); __pyx_L25_try_end:; } /* "pandas/index.pyx":485 * return algos.is_monotonic_int64(values) * * cpdef get_loc(self, object val): # <<<<<<<<<<<<<< * if is_definitely_invalid_key(val): * raise TypeError */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_13); __Pyx_AddTraceback("pandas.index.DatetimeEngine.get_loc", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_values); __Pyx_XDECREF(__pyx_v_conv); __Pyx_XDECREF(__pyx_v_loc); __Pyx_XDECREF(__pyx_v_val); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5index_14DatetimeEngine_5get_loc(PyObject *__pyx_v_self, PyObject *__pyx_v_val); /*proto*/ static PyObject *__pyx_pw_6pandas_5index_14DatetimeEngine_5get_loc(PyObject *__pyx_v_self, PyObject *__pyx_v_val) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("get_loc (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_5index_14DatetimeEngine_4get_loc(((struct __pyx_obj_6pandas_5index_DatetimeEngine *)__pyx_v_self), ((PyObject *)__pyx_v_val)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5index_14DatetimeEngine_4get_loc(struct __pyx_obj_6pandas_5index_DatetimeEngine *__pyx_v_self, PyObject *__pyx_v_val) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_loc", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = ((struct __pyx_vtabstruct_6pandas_5index_DatetimeEngine *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.get_loc(((struct __pyx_obj_6pandas_5index_IndexEngine *)__pyx_v_self), __pyx_v_val, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 485; __pyx_clineno = __LINE__; goto __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.index.DatetimeEngine.get_loc", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/index.pyx":521 * raise KeyError(val) * * cdef inline _date_check_type(self, object val): # <<<<<<<<<<<<<< * hash(val) * if not util.is_integer_object(val): */ static CYTHON_INLINE PyObject *__pyx_f_6pandas_5index_14DatetimeEngine__date_check_type(CYTHON_UNUSED struct __pyx_obj_6pandas_5index_DatetimeEngine *__pyx_v_self, PyObject *__pyx_v_val) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_hash_t __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_date_check_type", 0); /* "pandas/index.pyx":522 * * cdef inline _date_check_type(self, object val): * hash(val) # <<<<<<<<<<<<<< * if not util.is_integer_object(val): * raise KeyError(val) */ __pyx_t_1 = PyObject_Hash(__pyx_v_val); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 522; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/index.pyx":523 * cdef inline _date_check_type(self, object val): * hash(val) * if not util.is_integer_object(val): # <<<<<<<<<<<<<< * raise KeyError(val) * */ __pyx_t_2 = ((!(is_integer_object(__pyx_v_val) != 0)) != 0); if (__pyx_t_2) { /* "pandas/index.pyx":524 * hash(val) * if not util.is_integer_object(val): * raise KeyError(val) # <<<<<<<<<<<<<< * * def get_indexer(self, values): */ __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 524; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_v_val); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_val); __Pyx_GIVEREF(__pyx_v_val); __pyx_t_4 = PyObject_Call(__pyx_builtin_KeyError, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 524; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 524; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } /* "pandas/index.pyx":521 * raise KeyError(val) * * cdef inline _date_check_type(self, object val): # <<<<<<<<<<<<<< * hash(val) * if not util.is_integer_object(val): */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("pandas.index.DatetimeEngine._date_check_type", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/index.pyx":526 * raise KeyError(val) * * def get_indexer(self, values): # <<<<<<<<<<<<<< * self._ensure_mapping_populated() * if values.dtype != 'M8[ns]': */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5index_14DatetimeEngine_7get_indexer(PyObject *__pyx_v_self, PyObject *__pyx_v_values); /*proto*/ static PyObject *__pyx_pw_6pandas_5index_14DatetimeEngine_7get_indexer(PyObject *__pyx_v_self, PyObject *__pyx_v_values) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("get_indexer (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_5index_14DatetimeEngine_6get_indexer(((struct __pyx_obj_6pandas_5index_DatetimeEngine *)__pyx_v_self), ((PyObject *)__pyx_v_values)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5index_14DatetimeEngine_6get_indexer(struct __pyx_obj_6pandas_5index_DatetimeEngine *__pyx_v_self, PyObject *__pyx_v_values) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; Py_ssize_t __pyx_t_4; PyObject *__pyx_t_5 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_indexer", 0); __Pyx_INCREF(__pyx_v_values); /* "pandas/index.pyx":527 * * def get_indexer(self, values): * self._ensure_mapping_populated() # <<<<<<<<<<<<<< * if values.dtype != 'M8[ns]': * return np.repeat(-1, len(values)).astype('i4') */ __pyx_t_1 = __pyx_f_6pandas_5index_11IndexEngine__ensure_mapping_populated(((struct __pyx_obj_6pandas_5index_IndexEngine *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 527; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pandas/index.pyx":528 * def get_indexer(self, values): * self._ensure_mapping_populated() * if values.dtype != 'M8[ns]': # <<<<<<<<<<<<<< * return np.repeat(-1, len(values)).astype('i4') * values = np.asarray(values).view('i8') */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_values, __pyx_n_s_dtype); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 528; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_kp_s_M8_ns, Py_NE)); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 528; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_2) { /* "pandas/index.pyx":529 * self._ensure_mapping_populated() * if values.dtype != 'M8[ns]': * return np.repeat(-1, len(values)).astype('i4') # <<<<<<<<<<<<<< * values = np.asarray(values).view('i8') * return self.mapping.lookup(values) */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 529; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_repeat); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 529; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_4 = PyObject_Length(__pyx_v_values); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 529; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 529; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 529; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_int_neg_1); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_int_neg_1); __Pyx_GIVEREF(__pyx_int_neg_1); PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 529; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_astype); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 529; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyObject_Call(__pyx_t_5, __pyx_tuple__2, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 529; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; } /* "pandas/index.pyx":530 * if values.dtype != 'M8[ns]': * return np.repeat(-1, len(values)).astype('i4') * values = np.asarray(values).view('i8') # <<<<<<<<<<<<<< * return self.mapping.lookup(values) * */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 530; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_asarray); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 530; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 530; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_values); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_values); __Pyx_GIVEREF(__pyx_v_values); __pyx_t_3 = PyObject_Call(__pyx_t_5, __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 530; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_view); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 530; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyObject_Call(__pyx_t_1, __pyx_tuple__3, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 530; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF_SET(__pyx_v_values, __pyx_t_3); __pyx_t_3 = 0; /* "pandas/index.pyx":531 * return np.repeat(-1, len(values)).astype('i4') * values = np.asarray(values).view('i8') * return self.mapping.lookup(values) # <<<<<<<<<<<<<< * * def get_pad_indexer(self, other, limit=None): */ __Pyx_XDECREF(__pyx_r); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.mapping), __pyx_n_s_lookup); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 531; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 531; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_values); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_values); __Pyx_GIVEREF(__pyx_v_values); __pyx_t_5 = PyObject_Call(__pyx_t_3, __pyx_t_1, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 531; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_5; __pyx_t_5 = 0; goto __pyx_L0; /* "pandas/index.pyx":526 * raise KeyError(val) * * def get_indexer(self, values): # <<<<<<<<<<<<<< * self._ensure_mapping_populated() * if values.dtype != 'M8[ns]': */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("pandas.index.DatetimeEngine.get_indexer", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_values); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/index.pyx":533 * return self.mapping.lookup(values) * * def get_pad_indexer(self, other, limit=None): # <<<<<<<<<<<<<< * if other.dtype != 'M8[ns]': * return np.repeat(-1, len(other)).astype('i4') */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5index_14DatetimeEngine_9get_pad_indexer(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_6pandas_5index_14DatetimeEngine_9get_pad_indexer(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_other = 0; PyObject *__pyx_v_limit = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("get_pad_indexer (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_other,&__pyx_n_s_limit,0}; PyObject* values[2] = {0,0}; values[1] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_other)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_limit); if (value) { values[1] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "get_pad_indexer") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 533; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_other = values[0]; __pyx_v_limit = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("get_pad_indexer", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 533; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.index.DatetimeEngine.get_pad_indexer", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pandas_5index_14DatetimeEngine_8get_pad_indexer(((struct __pyx_obj_6pandas_5index_DatetimeEngine *)__pyx_v_self), __pyx_v_other, __pyx_v_limit); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5index_14DatetimeEngine_8get_pad_indexer(struct __pyx_obj_6pandas_5index_DatetimeEngine *__pyx_v_self, PyObject *__pyx_v_other, PyObject *__pyx_v_limit) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; Py_ssize_t __pyx_t_4; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_pad_indexer", 0); __Pyx_INCREF(__pyx_v_other); /* "pandas/index.pyx":534 * * def get_pad_indexer(self, other, limit=None): * if other.dtype != 'M8[ns]': # <<<<<<<<<<<<<< * return np.repeat(-1, len(other)).astype('i4') * other = np.asarray(other).view('i8') */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_other, __pyx_n_s_dtype); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 534; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_kp_s_M8_ns, Py_NE)); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 534; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_2) { /* "pandas/index.pyx":535 * def get_pad_indexer(self, other, limit=None): * if other.dtype != 'M8[ns]': * return np.repeat(-1, len(other)).astype('i4') # <<<<<<<<<<<<<< * other = np.asarray(other).view('i8') * return algos.pad_int64(self._get_index_values(), other, */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 535; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_repeat); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 535; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_4 = PyObject_Length(__pyx_v_other); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 535; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 535; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 535; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_int_neg_1); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_int_neg_1); __Pyx_GIVEREF(__pyx_int_neg_1); PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 535; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_astype); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 535; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyObject_Call(__pyx_t_5, __pyx_tuple__4, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 535; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; } /* "pandas/index.pyx":536 * if other.dtype != 'M8[ns]': * return np.repeat(-1, len(other)).astype('i4') * other = np.asarray(other).view('i8') # <<<<<<<<<<<<<< * return algos.pad_int64(self._get_index_values(), other, * limit=limit) */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 536; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_asarray); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 536; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 536; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_other); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_other); __Pyx_GIVEREF(__pyx_v_other); __pyx_t_3 = PyObject_Call(__pyx_t_5, __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 536; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_view); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 536; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyObject_Call(__pyx_t_1, __pyx_tuple__5, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 536; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF_SET(__pyx_v_other, __pyx_t_3); __pyx_t_3 = 0; /* "pandas/index.pyx":537 * return np.repeat(-1, len(other)).astype('i4') * other = np.asarray(other).view('i8') * return algos.pad_int64(self._get_index_values(), other, # <<<<<<<<<<<<<< * limit=limit) * */ __Pyx_XDECREF(__pyx_r); __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_algos); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 537; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_pad_int64); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 537; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = ((struct __pyx_vtabstruct_6pandas_5index_DatetimeEngine *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base._get_index_values(((struct __pyx_obj_6pandas_5index_IndexEngine *)__pyx_v_self)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 537; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 537; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __Pyx_INCREF(__pyx_v_other); PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_v_other); __Pyx_GIVEREF(__pyx_v_other); __pyx_t_3 = 0; __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 537; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); /* "pandas/index.pyx":538 * other = np.asarray(other).view('i8') * return algos.pad_int64(self._get_index_values(), other, * limit=limit) # <<<<<<<<<<<<<< * * def get_backfill_indexer(self, other, limit=None): */ if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_limit, __pyx_v_limit) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 537; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/index.pyx":537 * return np.repeat(-1, len(other)).astype('i4') * other = np.asarray(other).view('i8') * return algos.pad_int64(self._get_index_values(), other, # <<<<<<<<<<<<<< * limit=limit) * */ __pyx_t_6 = PyObject_Call(__pyx_t_1, __pyx_t_5, __pyx_t_3); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 537; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_r = __pyx_t_6; __pyx_t_6 = 0; goto __pyx_L0; /* "pandas/index.pyx":533 * return self.mapping.lookup(values) * * def get_pad_indexer(self, other, limit=None): # <<<<<<<<<<<<<< * if other.dtype != 'M8[ns]': * return np.repeat(-1, len(other)).astype('i4') */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("pandas.index.DatetimeEngine.get_pad_indexer", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_other); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/index.pyx":540 * limit=limit) * * def get_backfill_indexer(self, other, limit=None): # <<<<<<<<<<<<<< * if other.dtype != 'M8[ns]': * return np.repeat(-1, len(other)).astype('i4') */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5index_14DatetimeEngine_11get_backfill_indexer(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_6pandas_5index_14DatetimeEngine_11get_backfill_indexer(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_other = 0; PyObject *__pyx_v_limit = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("get_backfill_indexer (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_other,&__pyx_n_s_limit,0}; PyObject* values[2] = {0,0}; values[1] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_other)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_limit); if (value) { values[1] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "get_backfill_indexer") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 540; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_other = values[0]; __pyx_v_limit = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("get_backfill_indexer", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 540; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.index.DatetimeEngine.get_backfill_indexer", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pandas_5index_14DatetimeEngine_10get_backfill_indexer(((struct __pyx_obj_6pandas_5index_DatetimeEngine *)__pyx_v_self), __pyx_v_other, __pyx_v_limit); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5index_14DatetimeEngine_10get_backfill_indexer(struct __pyx_obj_6pandas_5index_DatetimeEngine *__pyx_v_self, PyObject *__pyx_v_other, PyObject *__pyx_v_limit) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; Py_ssize_t __pyx_t_4; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_backfill_indexer", 0); __Pyx_INCREF(__pyx_v_other); /* "pandas/index.pyx":541 * * def get_backfill_indexer(self, other, limit=None): * if other.dtype != 'M8[ns]': # <<<<<<<<<<<<<< * return np.repeat(-1, len(other)).astype('i4') * other = np.asarray(other).view('i8') */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_other, __pyx_n_s_dtype); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 541; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_kp_s_M8_ns, Py_NE)); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 541; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_2) { /* "pandas/index.pyx":542 * def get_backfill_indexer(self, other, limit=None): * if other.dtype != 'M8[ns]': * return np.repeat(-1, len(other)).astype('i4') # <<<<<<<<<<<<<< * other = np.asarray(other).view('i8') * return algos.backfill_int64(self._get_index_values(), other, */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 542; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_repeat); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 542; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_4 = PyObject_Length(__pyx_v_other); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 542; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 542; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 542; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_int_neg_1); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_int_neg_1); __Pyx_GIVEREF(__pyx_int_neg_1); PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 542; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_astype); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 542; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyObject_Call(__pyx_t_5, __pyx_tuple__6, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 542; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; } /* "pandas/index.pyx":543 * if other.dtype != 'M8[ns]': * return np.repeat(-1, len(other)).astype('i4') * other = np.asarray(other).view('i8') # <<<<<<<<<<<<<< * return algos.backfill_int64(self._get_index_values(), other, * limit=limit) */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 543; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_asarray); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 543; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 543; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_other); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_other); __Pyx_GIVEREF(__pyx_v_other); __pyx_t_3 = PyObject_Call(__pyx_t_5, __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 543; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_view); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 543; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyObject_Call(__pyx_t_1, __pyx_tuple__7, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 543; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF_SET(__pyx_v_other, __pyx_t_3); __pyx_t_3 = 0; /* "pandas/index.pyx":544 * return np.repeat(-1, len(other)).astype('i4') * other = np.asarray(other).view('i8') * return algos.backfill_int64(self._get_index_values(), other, # <<<<<<<<<<<<<< * limit=limit) * */ __Pyx_XDECREF(__pyx_r); __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_algos); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 544; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_backfill_int64); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 544; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = ((struct __pyx_vtabstruct_6pandas_5index_DatetimeEngine *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base._get_index_values(((struct __pyx_obj_6pandas_5index_IndexEngine *)__pyx_v_self)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 544; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 544; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __Pyx_INCREF(__pyx_v_other); PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_v_other); __Pyx_GIVEREF(__pyx_v_other); __pyx_t_3 = 0; __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 544; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); /* "pandas/index.pyx":545 * other = np.asarray(other).view('i8') * return algos.backfill_int64(self._get_index_values(), other, * limit=limit) # <<<<<<<<<<<<<< * * */ if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_limit, __pyx_v_limit) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 544; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/index.pyx":544 * return np.repeat(-1, len(other)).astype('i4') * other = np.asarray(other).view('i8') * return algos.backfill_int64(self._get_index_values(), other, # <<<<<<<<<<<<<< * limit=limit) * */ __pyx_t_6 = PyObject_Call(__pyx_t_1, __pyx_t_5, __pyx_t_3); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 544; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_r = __pyx_t_6; __pyx_t_6 = 0; goto __pyx_L0; /* "pandas/index.pyx":540 * limit=limit) * * def get_backfill_indexer(self, other, limit=None): # <<<<<<<<<<<<<< * if other.dtype != 'M8[ns]': * return np.repeat(-1, len(other)).astype('i4') */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("pandas.index.DatetimeEngine.get_backfill_indexer", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_other); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/index.pyx":548 * * * cpdef convert_scalar(ndarray arr, object value): # <<<<<<<<<<<<<< * if arr.descr.type_num == NPY_DATETIME: * if isinstance(value,np.ndarray): */ static PyObject *__pyx_pw_6pandas_5index_5convert_scalar(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_6pandas_5index_convert_scalar(PyArrayObject *__pyx_v_arr, PyObject *__pyx_v_value, CYTHON_UNUSED int __pyx_skip_dispatch) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_t_4; int __pyx_t_5; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("convert_scalar", 0); /* "pandas/index.pyx":549 * * cpdef convert_scalar(ndarray arr, object value): * if arr.descr.type_num == NPY_DATETIME: # <<<<<<<<<<<<<< * if isinstance(value,np.ndarray): * pass */ __pyx_t_1 = ((__pyx_v_arr->descr->type_num == NPY_DATETIME) != 0); if (__pyx_t_1) { /* "pandas/index.pyx":550 * cpdef convert_scalar(ndarray arr, object value): * if arr.descr.type_num == NPY_DATETIME: * if isinstance(value,np.ndarray): # <<<<<<<<<<<<<< * pass * elif isinstance(value, Timestamp): */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 550; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_ndarray); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 550; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_1 = PyObject_IsInstance(__pyx_v_value, __pyx_t_3); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 550; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_4 = (__pyx_t_1 != 0); if (__pyx_t_4) { goto __pyx_L4; } /* "pandas/index.pyx":552 * if isinstance(value,np.ndarray): * pass * elif isinstance(value, Timestamp): # <<<<<<<<<<<<<< * return value.value * elif value is None or value != value: */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_Timestamp); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 552; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PyObject_IsInstance(__pyx_v_value, __pyx_t_3); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 552; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_1 = (__pyx_t_4 != 0); if (__pyx_t_1) { /* "pandas/index.pyx":553 * pass * elif isinstance(value, Timestamp): * return value.value # <<<<<<<<<<<<<< * elif value is None or value != value: * return iNaT */ __Pyx_XDECREF(__pyx_r); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_value, __pyx_n_s_value); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 553; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; } /* "pandas/index.pyx":554 * elif isinstance(value, Timestamp): * return value.value * elif value is None or value != value: # <<<<<<<<<<<<<< * return iNaT * else: */ __pyx_t_1 = (__pyx_v_value == Py_None); if (!__pyx_t_1) { __pyx_t_3 = PyObject_RichCompare(__pyx_v_value, __pyx_v_value, Py_NE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 554; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 554; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_5 = __pyx_t_4; } else { __pyx_t_5 = __pyx_t_1; } if (__pyx_t_5) { /* "pandas/index.pyx":555 * return value.value * elif value is None or value != value: * return iNaT # <<<<<<<<<<<<<< * else: * return Timestamp(value).value */ __Pyx_XDECREF(__pyx_r); __pyx_t_3 = __Pyx_PyInt_From_npy_int64(__pyx_v_6pandas_5index_iNaT); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 555; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; } /*else*/ { /* "pandas/index.pyx":557 * return iNaT * else: * return Timestamp(value).value # <<<<<<<<<<<<<< * * if issubclass(arr.dtype.type, (np.integer, np.bool_)): */ __Pyx_XDECREF(__pyx_r); __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_Timestamp); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 557; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 557; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_value); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_value); __Pyx_GIVEREF(__pyx_v_value); __pyx_t_6 = PyObject_Call(__pyx_t_3, __pyx_t_2, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 557; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_value); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 557; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; } __pyx_L4:; goto __pyx_L3; } __pyx_L3:; /* "pandas/index.pyx":559 * return Timestamp(value).value * * if issubclass(arr.dtype.type, (np.integer, np.bool_)): # <<<<<<<<<<<<<< * if util.is_float_object(value) and value != value: * raise ValueError('Cannot assign nan to integer series') */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_arr), __pyx_n_s_dtype); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 559; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_type); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 559; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 559; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_integer); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 559; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 559; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_bool); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 559; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 559; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_7); __Pyx_GIVEREF(__pyx_t_7); __pyx_t_3 = 0; __pyx_t_7 = 0; __pyx_t_5 = PyObject_IsSubclass(__pyx_t_6, __pyx_t_2); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 559; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_1 = (__pyx_t_5 != 0); if (__pyx_t_1) { /* "pandas/index.pyx":560 * * if issubclass(arr.dtype.type, (np.integer, np.bool_)): * if util.is_float_object(value) and value != value: # <<<<<<<<<<<<<< * raise ValueError('Cannot assign nan to integer series') * */ if ((is_float_object(__pyx_v_value) != 0)) { __pyx_t_2 = PyObject_RichCompare(__pyx_v_value, __pyx_v_value, Py_NE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 560; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 560; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_5 = __pyx_t_1; } else { __pyx_t_5 = (is_float_object(__pyx_v_value) != 0); } if (__pyx_t_5) { /* "pandas/index.pyx":561 * if issubclass(arr.dtype.type, (np.integer, np.bool_)): * if util.is_float_object(value) and value != value: * raise ValueError('Cannot assign nan to integer series') # <<<<<<<<<<<<<< * * return value */ __pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__8, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 561; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 561; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } goto __pyx_L5; } __pyx_L5:; /* "pandas/index.pyx":563 * raise ValueError('Cannot assign nan to integer series') * * return value # <<<<<<<<<<<<<< * * cdef inline _to_i8(object val): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_value); __pyx_r = __pyx_v_value; goto __pyx_L0; /* "pandas/index.pyx":548 * * * cpdef convert_scalar(ndarray arr, object value): # <<<<<<<<<<<<<< * if arr.descr.type_num == NPY_DATETIME: * if isinstance(value,np.ndarray): */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_AddTraceback("pandas.index.convert_scalar", __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_5index_5convert_scalar(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_6pandas_5index_5convert_scalar(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_arr = 0; PyObject *__pyx_v_value = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("convert_scalar (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_arr,&__pyx_n_s_value,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_arr)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_value)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("convert_scalar", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 548; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "convert_scalar") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 548; __pyx_clineno = __LINE__; goto __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_value = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("convert_scalar", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 548; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.index.convert_scalar", __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_filename = __pyx_f[0]; __pyx_lineno = 548; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5index_4convert_scalar(__pyx_self, __pyx_v_arr, __pyx_v_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_5index_4convert_scalar(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_arr, PyObject *__pyx_v_value) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("convert_scalar", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_6pandas_5index_convert_scalar(__pyx_v_arr, __pyx_v_value, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 548; __pyx_clineno = __LINE__; goto __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.index.convert_scalar", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/index.pyx":565 * return value * * cdef inline _to_i8(object val): # <<<<<<<<<<<<<< * cdef pandas_datetimestruct dts * try: */ static CYTHON_INLINE PyObject *__pyx_f_6pandas_5index__to_i8(PyObject *__pyx_v_val) { pandas_datetimestruct __pyx_v_dts; PyObject *__pyx_v_tzinfo = NULL; PyObject *__pyx_v_offset = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; int __pyx_t_5; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; int __pyx_t_8; PyObject *__pyx_t_9 = NULL; int __pyx_t_10; int __pyx_t_11; PyObject *__pyx_t_12 = NULL; PyObject *__pyx_t_13 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_to_i8", 0); __Pyx_INCREF(__pyx_v_val); /* "pandas/index.pyx":567 * cdef inline _to_i8(object val): * cdef pandas_datetimestruct dts * try: # <<<<<<<<<<<<<< * return val.value * except AttributeError: */ { __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:*/ { /* "pandas/index.pyx":568 * cdef pandas_datetimestruct dts * try: * return val.value # <<<<<<<<<<<<<< * except AttributeError: * if util.is_datetime64_object(val): */ __Pyx_XDECREF(__pyx_r); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_val, __pyx_n_s_value); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 568; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L7_try_return; } __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L10_try_end; __pyx_L3_error:; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; /* "pandas/index.pyx":569 * try: * return val.value * except AttributeError: # <<<<<<<<<<<<<< * if util.is_datetime64_object(val): * return get_datetime64_value(val) */ __pyx_t_5 = PyErr_ExceptionMatches(__pyx_builtin_AttributeError); if (__pyx_t_5) { __Pyx_AddTraceback("pandas.index._to_i8", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_6, &__pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 569; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_GOTREF(__pyx_t_6); __Pyx_GOTREF(__pyx_t_7); /* "pandas/index.pyx":570 * return val.value * except AttributeError: * if util.is_datetime64_object(val): # <<<<<<<<<<<<<< * return get_datetime64_value(val) * elif PyDateTime_Check(val): */ __pyx_t_8 = (is_datetime64_object(__pyx_v_val) != 0); if (__pyx_t_8) { /* "pandas/index.pyx":571 * except AttributeError: * if util.is_datetime64_object(val): * return get_datetime64_value(val) # <<<<<<<<<<<<<< * elif PyDateTime_Check(val): * tzinfo = getattr(val, 'tzinfo', None) */ __Pyx_XDECREF(__pyx_r); __pyx_t_9 = __Pyx_PyInt_From_npy_int64(get_datetime64_value(__pyx_v_val)); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 571; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_r = __pyx_t_9; __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; goto __pyx_L6_except_return; } /* "pandas/index.pyx":572 * if util.is_datetime64_object(val): * return get_datetime64_value(val) * elif PyDateTime_Check(val): # <<<<<<<<<<<<<< * tzinfo = getattr(val, 'tzinfo', None) * val = _pydatetime_to_dts(val, &dts) */ __pyx_t_8 = (PyDateTime_Check(__pyx_v_val) != 0); if (__pyx_t_8) { /* "pandas/index.pyx":573 * return get_datetime64_value(val) * elif PyDateTime_Check(val): * tzinfo = getattr(val, 'tzinfo', None) # <<<<<<<<<<<<<< * val = _pydatetime_to_dts(val, &dts) * if tzinfo is not None and not _is_utc(tzinfo): */ __pyx_t_9 = __Pyx_GetAttr3(__pyx_v_val, __pyx_n_s_tzinfo, Py_None); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 573; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_v_tzinfo = __pyx_t_9; __pyx_t_9 = 0; /* "pandas/index.pyx":574 * elif PyDateTime_Check(val): * tzinfo = getattr(val, 'tzinfo', None) * val = _pydatetime_to_dts(val, &dts) # <<<<<<<<<<<<<< * if tzinfo is not None and not _is_utc(tzinfo): * offset = tslib._get_utcoffset(tzinfo, val) */ __pyx_t_9 = __Pyx_PyInt_From_npy_int64(__pyx_f_8datetime__pydatetime_to_dts(__pyx_v_val, (&__pyx_v_dts))); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 574; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF_SET(__pyx_v_val, __pyx_t_9); __pyx_t_9 = 0; /* "pandas/index.pyx":575 * tzinfo = getattr(val, 'tzinfo', None) * val = _pydatetime_to_dts(val, &dts) * if tzinfo is not None and not _is_utc(tzinfo): # <<<<<<<<<<<<<< * offset = tslib._get_utcoffset(tzinfo, val) * val -= tslib._delta_to_nanoseconds(offset) */ __pyx_t_8 = (__pyx_v_tzinfo != Py_None); if ((__pyx_t_8 != 0)) { __pyx_t_10 = ((!(__pyx_f_6pandas_5index__is_utc(__pyx_v_tzinfo) != 0)) != 0); __pyx_t_11 = __pyx_t_10; } else { __pyx_t_11 = (__pyx_t_8 != 0); } if (__pyx_t_11) { /* "pandas/index.pyx":576 * val = _pydatetime_to_dts(val, &dts) * if tzinfo is not None and not _is_utc(tzinfo): * offset = tslib._get_utcoffset(tzinfo, val) # <<<<<<<<<<<<<< * val -= tslib._delta_to_nanoseconds(offset) * */ __pyx_t_9 = __Pyx_GetModuleGlobalName(__pyx_n_s_tslib); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 576; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_get_utcoffset); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 576; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_9 = PyTuple_New(2); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 576; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_INCREF(__pyx_v_tzinfo); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_v_tzinfo); __Pyx_GIVEREF(__pyx_v_tzinfo); __Pyx_INCREF(__pyx_v_val); PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_v_val); __Pyx_GIVEREF(__pyx_v_val); __pyx_t_13 = PyObject_Call(__pyx_t_12, __pyx_t_9, NULL); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 576; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_v_offset = __pyx_t_13; __pyx_t_13 = 0; /* "pandas/index.pyx":577 * if tzinfo is not None and not _is_utc(tzinfo): * offset = tslib._get_utcoffset(tzinfo, val) * val -= tslib._delta_to_nanoseconds(offset) # <<<<<<<<<<<<<< * * return val */ __pyx_t_13 = __Pyx_GetModuleGlobalName(__pyx_n_s_tslib); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 577; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} __Pyx_GOTREF(__pyx_t_13); __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_13, __pyx_n_s_delta_to_nanoseconds); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 577; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_13 = PyTuple_New(1); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 577; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} __Pyx_GOTREF(__pyx_t_13); __Pyx_INCREF(__pyx_v_offset); PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_v_offset); __Pyx_GIVEREF(__pyx_v_offset); __pyx_t_12 = PyObject_Call(__pyx_t_9, __pyx_t_13, NULL); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 577; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_13 = PyNumber_InPlaceSubtract(__pyx_v_val, __pyx_t_12); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 577; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_DECREF_SET(__pyx_v_val, __pyx_t_13); __pyx_t_13 = 0; goto __pyx_L14; } __pyx_L14:; goto __pyx_L13; } __pyx_L13:; /* "pandas/index.pyx":579 * val -= tslib._delta_to_nanoseconds(offset) * * return val # <<<<<<<<<<<<<< * * cdef inline bint _is_utc(object tz): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_val); __pyx_r = __pyx_v_val; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; goto __pyx_L6_except_return; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; goto __pyx_L4_exception_handled; } goto __pyx_L5_except_error; __pyx_L5_except_error:; __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); goto __pyx_L1_error; __pyx_L7_try_return:; __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); goto __pyx_L0; __pyx_L6_except_return:; __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); goto __pyx_L0; __pyx_L4_exception_handled:; __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); __pyx_L10_try_end:; } /* "pandas/index.pyx":565 * return value * * cdef inline _to_i8(object val): # <<<<<<<<<<<<<< * cdef pandas_datetimestruct dts * try: */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_9); __Pyx_XDECREF(__pyx_t_12); __Pyx_XDECREF(__pyx_t_13); __Pyx_AddTraceback("pandas.index._to_i8", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_tzinfo); __Pyx_XDECREF(__pyx_v_offset); __Pyx_XDECREF(__pyx_v_val); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/index.pyx":581 * return val * * cdef inline bint _is_utc(object tz): # <<<<<<<<<<<<<< * return tz is UTC or isinstance(tz, _du_utc) */ static CYTHON_INLINE int __pyx_f_6pandas_5index__is_utc(PyObject *__pyx_v_tz) { int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; int __pyx_t_3; int __pyx_t_4; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_is_utc", 0); /* "pandas/index.pyx":582 * * cdef inline bint _is_utc(object tz): * return tz is UTC or isinstance(tz, _du_utc) # <<<<<<<<<<<<<< */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_UTC); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 582; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = (__pyx_v_tz == __pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (!__pyx_t_2) { __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_du_utc); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 582; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = PyObject_IsInstance(__pyx_v_tz, __pyx_t_1); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 582; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_4 = __pyx_t_3; } else { __pyx_t_4 = __pyx_t_2; } __pyx_r = __pyx_t_4; goto __pyx_L0; /* "pandas/index.pyx":581 * return val * * cdef inline bint _is_utc(object tz): # <<<<<<<<<<<<<< * return tz is UTC or isinstance(tz, _du_utc) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_WriteUnraisable("pandas.index._is_utc", __pyx_clineno, __pyx_lineno, __pyx_filename, 0); __pyx_r = 0; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "datetime.pxd":126 * * * cdef inline _string_to_dts(object val, pandas_datetimestruct* dts): # <<<<<<<<<<<<<< * cdef int result * cdef char *tmp */ static CYTHON_INLINE PyObject *__pyx_f_8datetime__string_to_dts(PyObject *__pyx_v_val, pandas_datetimestruct *__pyx_v_dts) { int __pyx_v_result; char *__pyx_v_tmp; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; char *__pyx_t_3; Py_ssize_t __pyx_t_4; PyObject *__pyx_t_5 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_string_to_dts", 0); __Pyx_INCREF(__pyx_v_val); /* "datetime.pxd":130 * cdef char *tmp * * if PyUnicode_Check(val): # <<<<<<<<<<<<<< * val = PyUnicode_AsASCIIString(val); * */ __pyx_t_1 = (PyUnicode_Check(__pyx_v_val) != 0); if (__pyx_t_1) { /* "datetime.pxd":131 * * if PyUnicode_Check(val): * val = PyUnicode_AsASCIIString(val); # <<<<<<<<<<<<<< * * tmp = val */ __pyx_t_2 = PyUnicode_AsASCIIString(__pyx_v_val); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 131; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF_SET(__pyx_v_val, __pyx_t_2); __pyx_t_2 = 0; goto __pyx_L3; } __pyx_L3:; /* "datetime.pxd":133 * val = PyUnicode_AsASCIIString(val); * * tmp = val # <<<<<<<<<<<<<< * result = _cstring_to_dts(tmp, len(val), dts) * */ __pyx_t_3 = __Pyx_PyObject_AsString(__pyx_v_val); if (unlikely((!__pyx_t_3) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 133; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_tmp = __pyx_t_3; /* "datetime.pxd":134 * * tmp = val * result = _cstring_to_dts(tmp, len(val), dts) # <<<<<<<<<<<<<< * * if result == -1: */ __pyx_t_4 = PyObject_Length(__pyx_v_val); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 134; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_result = __pyx_f_8datetime__cstring_to_dts(__pyx_v_tmp, __pyx_t_4, __pyx_v_dts); /* "datetime.pxd":136 * result = _cstring_to_dts(tmp, len(val), dts) * * if result == -1: # <<<<<<<<<<<<<< * raise ValueError('Unable to parse %s' % str(val)) * */ __pyx_t_1 = ((__pyx_v_result == -1) != 0); if (__pyx_t_1) { /* "datetime.pxd":137 * * if result == -1: * raise ValueError('Unable to parse %s' % str(val)) # <<<<<<<<<<<<<< * * cdef inline int _cstring_to_dts(char *val, int length, */ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 137; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_val); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_val); __Pyx_GIVEREF(__pyx_v_val); __pyx_t_5 = PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), __pyx_t_2, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 137; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_Unable_to_parse_s, __pyx_t_5); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 137; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 137; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 137; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; {__pyx_filename = __pyx_f[1]; __pyx_lineno = 137; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } /* "datetime.pxd":126 * * * cdef inline _string_to_dts(object val, pandas_datetimestruct* dts): # <<<<<<<<<<<<<< * cdef int result * cdef char *tmp */ /* 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_5); __Pyx_AddTraceback("datetime._string_to_dts", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_val); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "datetime.pxd":139 * raise ValueError('Unable to parse %s' % str(val)) * * cdef inline int _cstring_to_dts(char *val, int length, # <<<<<<<<<<<<<< * pandas_datetimestruct* dts): * cdef: */ static CYTHON_INLINE int __pyx_f_8datetime__cstring_to_dts(char *__pyx_v_val, int __pyx_v_length, pandas_datetimestruct *__pyx_v_dts) { npy_bool __pyx_v_islocal; npy_bool __pyx_v_special; PANDAS_DATETIMEUNIT __pyx_v_out_bestunit; int __pyx_v_result; int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_cstring_to_dts", 0); /* "datetime.pxd":146 * int result * * result = parse_iso_8601_datetime(val, length, PANDAS_FR_ns, # <<<<<<<<<<<<<< * NPY_UNSAFE_CASTING, * dts, &islocal, &out_bestunit, &special) */ __pyx_v_result = parse_iso_8601_datetime(__pyx_v_val, __pyx_v_length, PANDAS_FR_ns, NPY_UNSAFE_CASTING, __pyx_v_dts, (&__pyx_v_islocal), (&__pyx_v_out_bestunit), (&__pyx_v_special)); /* "datetime.pxd":149 * NPY_UNSAFE_CASTING, * dts, &islocal, &out_bestunit, &special) * return result # <<<<<<<<<<<<<< * * */ __pyx_r = __pyx_v_result; goto __pyx_L0; /* "datetime.pxd":139 * raise ValueError('Unable to parse %s' % str(val)) * * cdef inline int _cstring_to_dts(char *val, int length, # <<<<<<<<<<<<<< * pandas_datetimestruct* dts): * cdef: */ /* function exit code */ __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "datetime.pxd":152 * * * cdef inline object _datetime64_to_datetime(int64_t val): # <<<<<<<<<<<<<< * cdef pandas_datetimestruct dts * pandas_datetime_to_datetimestruct(val, PANDAS_FR_ns, &dts) */ static CYTHON_INLINE PyObject *__pyx_f_8datetime__datetime64_to_datetime(__pyx_t_5numpy_int64_t __pyx_v_val) { pandas_datetimestruct __pyx_v_dts; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_datetime64_to_datetime", 0); /* "datetime.pxd":154 * cdef inline object _datetime64_to_datetime(int64_t val): * cdef pandas_datetimestruct dts * pandas_datetime_to_datetimestruct(val, PANDAS_FR_ns, &dts) # <<<<<<<<<<<<<< * return _dts_to_pydatetime(&dts) * */ pandas_datetime_to_datetimestruct(__pyx_v_val, PANDAS_FR_ns, (&__pyx_v_dts)); /* "datetime.pxd":155 * cdef pandas_datetimestruct dts * pandas_datetime_to_datetimestruct(val, PANDAS_FR_ns, &dts) * return _dts_to_pydatetime(&dts) # <<<<<<<<<<<<<< * * cdef inline object _dts_to_pydatetime(pandas_datetimestruct *dts): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_8datetime__dts_to_pydatetime((&__pyx_v_dts)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 155; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "datetime.pxd":152 * * * cdef inline object _datetime64_to_datetime(int64_t val): # <<<<<<<<<<<<<< * cdef pandas_datetimestruct dts * pandas_datetime_to_datetimestruct(val, PANDAS_FR_ns, &dts) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("datetime._datetime64_to_datetime", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "datetime.pxd":157 * return _dts_to_pydatetime(&dts) * * cdef inline object _dts_to_pydatetime(pandas_datetimestruct *dts): # <<<<<<<<<<<<<< * return PyDateTime_FromDateAndTime(dts.year, dts.month, * dts.day, dts.hour, */ static CYTHON_INLINE PyObject *__pyx_f_8datetime__dts_to_pydatetime(pandas_datetimestruct *__pyx_v_dts) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_dts_to_pydatetime", 0); /* "datetime.pxd":158 * * cdef inline object _dts_to_pydatetime(pandas_datetimestruct *dts): * return PyDateTime_FromDateAndTime(dts.year, dts.month, # <<<<<<<<<<<<<< * dts.day, dts.hour, * dts.min, dts.sec, dts.us) */ __Pyx_XDECREF(__pyx_r); /* "datetime.pxd":160 * return PyDateTime_FromDateAndTime(dts.year, dts.month, * dts.day, dts.hour, * dts.min, dts.sec, dts.us) # <<<<<<<<<<<<<< * * cdef inline int64_t _pydatetime_to_dts(object val, pandas_datetimestruct *dts): */ __pyx_t_1 = PyDateTime_FromDateAndTime(__pyx_v_dts->year, __pyx_v_dts->month, __pyx_v_dts->day, __pyx_v_dts->hour, __pyx_v_dts->min, __pyx_v_dts->sec, __pyx_v_dts->us); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 158; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); /* "datetime.pxd":158 * * cdef inline object _dts_to_pydatetime(pandas_datetimestruct *dts): * return PyDateTime_FromDateAndTime(dts.year, dts.month, # <<<<<<<<<<<<<< * dts.day, dts.hour, * dts.min, dts.sec, dts.us) */ __Pyx_INCREF(((PyObject *)__pyx_t_1)); __pyx_r = __pyx_t_1; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; /* "datetime.pxd":157 * return _dts_to_pydatetime(&dts) * * cdef inline object _dts_to_pydatetime(pandas_datetimestruct *dts): # <<<<<<<<<<<<<< * return PyDateTime_FromDateAndTime(dts.year, dts.month, * dts.day, dts.hour, */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("datetime._dts_to_pydatetime", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "datetime.pxd":162 * dts.min, dts.sec, dts.us) * * cdef inline int64_t _pydatetime_to_dts(object val, pandas_datetimestruct *dts): # <<<<<<<<<<<<<< * dts.year = PyDateTime_GET_YEAR(val) * dts.month = PyDateTime_GET_MONTH(val) */ static CYTHON_INLINE __pyx_t_5numpy_int64_t __pyx_f_8datetime__pydatetime_to_dts(PyObject *__pyx_v_val, pandas_datetimestruct *__pyx_v_dts) { __pyx_t_5numpy_int64_t __pyx_r; __Pyx_RefNannyDeclarations int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_pydatetime_to_dts", 0); /* "datetime.pxd":163 * * cdef inline int64_t _pydatetime_to_dts(object val, pandas_datetimestruct *dts): * dts.year = PyDateTime_GET_YEAR(val) # <<<<<<<<<<<<<< * dts.month = PyDateTime_GET_MONTH(val) * dts.day = PyDateTime_GET_DAY(val) */ if (!(likely(((__pyx_v_val) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_val, __pyx_ptype_8datetime_date))))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 163; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_dts->year = PyDateTime_GET_YEAR(((PyDateTime_Date *)__pyx_v_val)); /* "datetime.pxd":164 * cdef inline int64_t _pydatetime_to_dts(object val, pandas_datetimestruct *dts): * dts.year = PyDateTime_GET_YEAR(val) * dts.month = PyDateTime_GET_MONTH(val) # <<<<<<<<<<<<<< * dts.day = PyDateTime_GET_DAY(val) * dts.hour = PyDateTime_DATE_GET_HOUR(val) */ if (!(likely(((__pyx_v_val) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_val, __pyx_ptype_8datetime_date))))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 164; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_dts->month = PyDateTime_GET_MONTH(((PyDateTime_Date *)__pyx_v_val)); /* "datetime.pxd":165 * dts.year = PyDateTime_GET_YEAR(val) * dts.month = PyDateTime_GET_MONTH(val) * dts.day = PyDateTime_GET_DAY(val) # <<<<<<<<<<<<<< * dts.hour = PyDateTime_DATE_GET_HOUR(val) * dts.min = PyDateTime_DATE_GET_MINUTE(val) */ if (!(likely(((__pyx_v_val) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_val, __pyx_ptype_8datetime_date))))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 165; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_dts->day = PyDateTime_GET_DAY(((PyDateTime_Date *)__pyx_v_val)); /* "datetime.pxd":166 * dts.month = PyDateTime_GET_MONTH(val) * dts.day = PyDateTime_GET_DAY(val) * dts.hour = PyDateTime_DATE_GET_HOUR(val) # <<<<<<<<<<<<<< * dts.min = PyDateTime_DATE_GET_MINUTE(val) * dts.sec = PyDateTime_DATE_GET_SECOND(val) */ __pyx_v_dts->hour = PyDateTime_DATE_GET_HOUR(__pyx_v_val); /* "datetime.pxd":167 * dts.day = PyDateTime_GET_DAY(val) * dts.hour = PyDateTime_DATE_GET_HOUR(val) * dts.min = PyDateTime_DATE_GET_MINUTE(val) # <<<<<<<<<<<<<< * dts.sec = PyDateTime_DATE_GET_SECOND(val) * dts.us = PyDateTime_DATE_GET_MICROSECOND(val) */ __pyx_v_dts->min = PyDateTime_DATE_GET_MINUTE(__pyx_v_val); /* "datetime.pxd":168 * dts.hour = PyDateTime_DATE_GET_HOUR(val) * dts.min = PyDateTime_DATE_GET_MINUTE(val) * dts.sec = PyDateTime_DATE_GET_SECOND(val) # <<<<<<<<<<<<<< * dts.us = PyDateTime_DATE_GET_MICROSECOND(val) * dts.ps = dts.as = 0 */ __pyx_v_dts->sec = PyDateTime_DATE_GET_SECOND(__pyx_v_val); /* "datetime.pxd":169 * dts.min = PyDateTime_DATE_GET_MINUTE(val) * dts.sec = PyDateTime_DATE_GET_SECOND(val) * dts.us = PyDateTime_DATE_GET_MICROSECOND(val) # <<<<<<<<<<<<<< * dts.ps = dts.as = 0 * return pandas_datetimestruct_to_datetime(PANDAS_FR_ns, dts) */ __pyx_v_dts->us = PyDateTime_DATE_GET_MICROSECOND(__pyx_v_val); /* "datetime.pxd":170 * dts.sec = PyDateTime_DATE_GET_SECOND(val) * dts.us = PyDateTime_DATE_GET_MICROSECOND(val) * dts.ps = dts.as = 0 # <<<<<<<<<<<<<< * return pandas_datetimestruct_to_datetime(PANDAS_FR_ns, dts) * */ __pyx_v_dts->ps = 0; __pyx_v_dts->as = 0; /* "datetime.pxd":171 * dts.us = PyDateTime_DATE_GET_MICROSECOND(val) * dts.ps = dts.as = 0 * return pandas_datetimestruct_to_datetime(PANDAS_FR_ns, dts) # <<<<<<<<<<<<<< * * cdef inline int64_t _dtlike_to_datetime64(object val, */ __pyx_r = pandas_datetimestruct_to_datetime(PANDAS_FR_ns, __pyx_v_dts); goto __pyx_L0; /* "datetime.pxd":162 * dts.min, dts.sec, dts.us) * * cdef inline int64_t _pydatetime_to_dts(object val, pandas_datetimestruct *dts): # <<<<<<<<<<<<<< * dts.year = PyDateTime_GET_YEAR(val) * dts.month = PyDateTime_GET_MONTH(val) */ /* function exit code */ __pyx_L1_error:; __Pyx_WriteUnraisable("datetime._pydatetime_to_dts", __pyx_clineno, __pyx_lineno, __pyx_filename, 0); __pyx_r = 0; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "datetime.pxd":173 * return pandas_datetimestruct_to_datetime(PANDAS_FR_ns, dts) * * cdef inline int64_t _dtlike_to_datetime64(object val, # <<<<<<<<<<<<<< * pandas_datetimestruct *dts): * dts.year = val.year */ static CYTHON_INLINE __pyx_t_5numpy_int64_t __pyx_f_8datetime__dtlike_to_datetime64(PyObject *__pyx_v_val, pandas_datetimestruct *__pyx_v_dts) { __pyx_t_5numpy_int64_t __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; npy_int64 __pyx_t_2; npy_int32 __pyx_t_3; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_dtlike_to_datetime64", 0); /* "datetime.pxd":175 * cdef inline int64_t _dtlike_to_datetime64(object val, * pandas_datetimestruct *dts): * dts.year = val.year # <<<<<<<<<<<<<< * dts.month = val.month * dts.day = val.day */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_val, __pyx_n_s_year); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 175; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyInt_As_npy_int64(__pyx_t_1); if (unlikely((__pyx_t_2 == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 175; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_dts->year = __pyx_t_2; /* "datetime.pxd":176 * pandas_datetimestruct *dts): * dts.year = val.year * dts.month = val.month # <<<<<<<<<<<<<< * dts.day = val.day * dts.hour = val.hour */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_val, __pyx_n_s_month); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 176; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __Pyx_PyInt_As_npy_int32(__pyx_t_1); if (unlikely((__pyx_t_3 == (npy_int32)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 176; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_dts->month = __pyx_t_3; /* "datetime.pxd":177 * dts.year = val.year * dts.month = val.month * dts.day = val.day # <<<<<<<<<<<<<< * dts.hour = val.hour * dts.min = val.minute */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_val, __pyx_n_s_day); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 177; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __Pyx_PyInt_As_npy_int32(__pyx_t_1); if (unlikely((__pyx_t_3 == (npy_int32)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 177; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_dts->day = __pyx_t_3; /* "datetime.pxd":178 * dts.month = val.month * dts.day = val.day * dts.hour = val.hour # <<<<<<<<<<<<<< * dts.min = val.minute * dts.sec = val.second */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_val, __pyx_n_s_hour); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 178; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __Pyx_PyInt_As_npy_int32(__pyx_t_1); if (unlikely((__pyx_t_3 == (npy_int32)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 178; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_dts->hour = __pyx_t_3; /* "datetime.pxd":179 * dts.day = val.day * dts.hour = val.hour * dts.min = val.minute # <<<<<<<<<<<<<< * dts.sec = val.second * dts.us = val.microsecond */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_val, __pyx_n_s_minute); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 179; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __Pyx_PyInt_As_npy_int32(__pyx_t_1); if (unlikely((__pyx_t_3 == (npy_int32)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 179; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_dts->min = __pyx_t_3; /* "datetime.pxd":180 * dts.hour = val.hour * dts.min = val.minute * dts.sec = val.second # <<<<<<<<<<<<<< * dts.us = val.microsecond * dts.ps = dts.as = 0 */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_val, __pyx_n_s_second); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __Pyx_PyInt_As_npy_int32(__pyx_t_1); if (unlikely((__pyx_t_3 == (npy_int32)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_dts->sec = __pyx_t_3; /* "datetime.pxd":181 * dts.min = val.minute * dts.sec = val.second * dts.us = val.microsecond # <<<<<<<<<<<<<< * dts.ps = dts.as = 0 * return pandas_datetimestruct_to_datetime(PANDAS_FR_ns, dts) */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_val, __pyx_n_s_microsecond); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 181; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __Pyx_PyInt_As_npy_int32(__pyx_t_1); if (unlikely((__pyx_t_3 == (npy_int32)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 181; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_dts->us = __pyx_t_3; /* "datetime.pxd":182 * dts.sec = val.second * dts.us = val.microsecond * dts.ps = dts.as = 0 # <<<<<<<<<<<<<< * return pandas_datetimestruct_to_datetime(PANDAS_FR_ns, dts) * */ __pyx_v_dts->ps = 0; __pyx_v_dts->as = 0; /* "datetime.pxd":183 * dts.us = val.microsecond * dts.ps = dts.as = 0 * return pandas_datetimestruct_to_datetime(PANDAS_FR_ns, dts) # <<<<<<<<<<<<<< * * cdef inline int64_t _date_to_datetime64(object val, */ __pyx_r = pandas_datetimestruct_to_datetime(PANDAS_FR_ns, __pyx_v_dts); goto __pyx_L0; /* "datetime.pxd":173 * return pandas_datetimestruct_to_datetime(PANDAS_FR_ns, dts) * * cdef inline int64_t _dtlike_to_datetime64(object val, # <<<<<<<<<<<<<< * pandas_datetimestruct *dts): * dts.year = val.year */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_WriteUnraisable("datetime._dtlike_to_datetime64", __pyx_clineno, __pyx_lineno, __pyx_filename, 0); __pyx_r = 0; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "datetime.pxd":185 * return pandas_datetimestruct_to_datetime(PANDAS_FR_ns, dts) * * cdef inline int64_t _date_to_datetime64(object val, # <<<<<<<<<<<<<< * pandas_datetimestruct *dts): * dts.year = PyDateTime_GET_YEAR(val) */ static CYTHON_INLINE __pyx_t_5numpy_int64_t __pyx_f_8datetime__date_to_datetime64(PyObject *__pyx_v_val, pandas_datetimestruct *__pyx_v_dts) { __pyx_t_5numpy_int64_t __pyx_r; __Pyx_RefNannyDeclarations int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_date_to_datetime64", 0); /* "datetime.pxd":187 * cdef inline int64_t _date_to_datetime64(object val, * pandas_datetimestruct *dts): * dts.year = PyDateTime_GET_YEAR(val) # <<<<<<<<<<<<<< * dts.month = PyDateTime_GET_MONTH(val) * dts.day = PyDateTime_GET_DAY(val) */ if (!(likely(((__pyx_v_val) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_val, __pyx_ptype_8datetime_date))))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 187; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_dts->year = PyDateTime_GET_YEAR(((PyDateTime_Date *)__pyx_v_val)); /* "datetime.pxd":188 * pandas_datetimestruct *dts): * dts.year = PyDateTime_GET_YEAR(val) * dts.month = PyDateTime_GET_MONTH(val) # <<<<<<<<<<<<<< * dts.day = PyDateTime_GET_DAY(val) * dts.hour = dts.min = dts.sec = dts.us = 0 */ if (!(likely(((__pyx_v_val) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_val, __pyx_ptype_8datetime_date))))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 188; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_dts->month = PyDateTime_GET_MONTH(((PyDateTime_Date *)__pyx_v_val)); /* "datetime.pxd":189 * dts.year = PyDateTime_GET_YEAR(val) * dts.month = PyDateTime_GET_MONTH(val) * dts.day = PyDateTime_GET_DAY(val) # <<<<<<<<<<<<<< * dts.hour = dts.min = dts.sec = dts.us = 0 * dts.ps = dts.as = 0 */ if (!(likely(((__pyx_v_val) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_val, __pyx_ptype_8datetime_date))))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 189; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_dts->day = PyDateTime_GET_DAY(((PyDateTime_Date *)__pyx_v_val)); /* "datetime.pxd":190 * dts.month = PyDateTime_GET_MONTH(val) * dts.day = PyDateTime_GET_DAY(val) * dts.hour = dts.min = dts.sec = dts.us = 0 # <<<<<<<<<<<<<< * dts.ps = dts.as = 0 * return pandas_datetimestruct_to_datetime(PANDAS_FR_ns, dts) */ __pyx_v_dts->hour = 0; __pyx_v_dts->min = 0; __pyx_v_dts->sec = 0; __pyx_v_dts->us = 0; /* "datetime.pxd":191 * dts.day = PyDateTime_GET_DAY(val) * dts.hour = dts.min = dts.sec = dts.us = 0 * dts.ps = dts.as = 0 # <<<<<<<<<<<<<< * return pandas_datetimestruct_to_datetime(PANDAS_FR_ns, dts) * */ __pyx_v_dts->ps = 0; __pyx_v_dts->as = 0; /* "datetime.pxd":192 * dts.hour = dts.min = dts.sec = dts.us = 0 * dts.ps = dts.as = 0 * return pandas_datetimestruct_to_datetime(PANDAS_FR_ns, dts) # <<<<<<<<<<<<<< * */ __pyx_r = pandas_datetimestruct_to_datetime(PANDAS_FR_ns, __pyx_v_dts); goto __pyx_L0; /* "datetime.pxd":185 * return pandas_datetimestruct_to_datetime(PANDAS_FR_ns, dts) * * cdef inline int64_t _date_to_datetime64(object val, # <<<<<<<<<<<<<< * pandas_datetimestruct *dts): * dts.year = PyDateTime_GET_YEAR(val) */ /* function exit code */ __pyx_L1_error:; __Pyx_WriteUnraisable("datetime._date_to_datetime64", __pyx_clineno, __pyx_lineno, __pyx_filename, 0); __pyx_r = 0; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "numpy.pxd":196 * # 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 fullfill 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_copy_shape; 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_v_hasfields; int __pyx_r; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; int __pyx_t_5; int __pyx_t_6; int __pyx_t_7; PyObject *__pyx_t_8 = NULL; char *__pyx_t_9; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__getbuffer__", 0); if (__pyx_v_info != NULL) { __pyx_v_info->obj = Py_None; __Pyx_INCREF(Py_None); __Pyx_GIVEREF(__pyx_v_info->obj); } /* "numpy.pxd":202 * # of flags * * if info == NULL: return # <<<<<<<<<<<<<< * * cdef int copy_shape, i, ndim */ __pyx_t_1 = ((__pyx_v_info == NULL) != 0); if (__pyx_t_1) { __pyx_r = 0; goto __pyx_L0; } /* "numpy.pxd":205 * * cdef int copy_shape, i, ndim * cdef int endian_detector = 1 # <<<<<<<<<<<<<< * cdef bint little_endian = ((&endian_detector)[0] != 0) * */ __pyx_v_endian_detector = 1; /* "numpy.pxd":206 * cdef int copy_shape, 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); /* "numpy.pxd":208 * cdef bint little_endian = ((&endian_detector)[0] != 0) * * ndim = PyArray_NDIM(self) # <<<<<<<<<<<<<< * * if sizeof(npy_intp) != sizeof(Py_ssize_t): */ __pyx_v_ndim = PyArray_NDIM(__pyx_v_self); /* "numpy.pxd":210 * ndim = PyArray_NDIM(self) * * if sizeof(npy_intp) != sizeof(Py_ssize_t): # <<<<<<<<<<<<<< * copy_shape = 1 * else: */ __pyx_t_1 = (((sizeof(npy_intp)) != (sizeof(Py_ssize_t))) != 0); if (__pyx_t_1) { /* "numpy.pxd":211 * * if sizeof(npy_intp) != sizeof(Py_ssize_t): * copy_shape = 1 # <<<<<<<<<<<<<< * else: * copy_shape = 0 */ __pyx_v_copy_shape = 1; goto __pyx_L4; } /*else*/ { /* "numpy.pxd":213 * copy_shape = 1 * else: * copy_shape = 0 # <<<<<<<<<<<<<< * * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) */ __pyx_v_copy_shape = 0; } __pyx_L4:; /* "numpy.pxd":215 * copy_shape = 0 * * 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_1 = (((__pyx_v_flags & PyBUF_C_CONTIGUOUS) == PyBUF_C_CONTIGUOUS) != 0); if (__pyx_t_1) { /* "numpy.pxd":216 * * 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_3 = __pyx_t_2; } else { __pyx_t_3 = __pyx_t_1; } if (__pyx_t_3) { /* "numpy.pxd":217 * 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_4 = PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__9, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 217; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 217; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } /* "numpy.pxd":219 * 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_3 = (((__pyx_v_flags & PyBUF_F_CONTIGUOUS) == PyBUF_F_CONTIGUOUS) != 0); if (__pyx_t_3) { /* "numpy.pxd":220 * * 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_1 = ((!(PyArray_CHKFLAGS(__pyx_v_self, NPY_F_CONTIGUOUS) != 0)) != 0); __pyx_t_2 = __pyx_t_1; } else { __pyx_t_2 = __pyx_t_3; } if (__pyx_t_2) { /* "numpy.pxd":221 * 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_4 = PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__10, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 221; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 221; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } /* "numpy.pxd":223 * raise ValueError(u"ndarray is not Fortran contiguous") * * info.buf = PyArray_DATA(self) # <<<<<<<<<<<<<< * info.ndim = ndim * if copy_shape: */ __pyx_v_info->buf = PyArray_DATA(__pyx_v_self); /* "numpy.pxd":224 * * info.buf = PyArray_DATA(self) * info.ndim = ndim # <<<<<<<<<<<<<< * if copy_shape: * # Allocate new buffer for strides and shape info. */ __pyx_v_info->ndim = __pyx_v_ndim; /* "numpy.pxd":225 * info.buf = PyArray_DATA(self) * info.ndim = ndim * if copy_shape: # <<<<<<<<<<<<<< * # Allocate new buffer for strides and shape info. * # This is allocated as one block, strides first. */ __pyx_t_2 = (__pyx_v_copy_shape != 0); if (__pyx_t_2) { /* "numpy.pxd":228 * # Allocate new buffer for strides and shape info. * # This is allocated as one block, strides first. * info.strides = stdlib.malloc(sizeof(Py_ssize_t) * ndim * 2) # <<<<<<<<<<<<<< * info.shape = info.strides + ndim * for i in range(ndim): */ __pyx_v_info->strides = ((Py_ssize_t *)malloc((((sizeof(Py_ssize_t)) * ((size_t)__pyx_v_ndim)) * 2))); /* "numpy.pxd":229 * # This is allocated as one block, strides first. * info.strides = stdlib.malloc(sizeof(Py_ssize_t) * ndim * 2) * 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); /* "numpy.pxd":230 * info.strides = stdlib.malloc(sizeof(Py_ssize_t) * ndim * 2) * 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_5 = __pyx_v_ndim; for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) { __pyx_v_i = __pyx_t_6; /* "numpy.pxd":231 * 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]); /* "numpy.pxd":232 * 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]); } goto __pyx_L7; } /*else*/ { /* "numpy.pxd":234 * info.shape[i] = PyArray_DIMS(self)[i] * else: * info.strides = PyArray_STRIDES(self) # <<<<<<<<<<<<<< * info.shape = PyArray_DIMS(self) * info.suboffsets = NULL */ __pyx_v_info->strides = ((Py_ssize_t *)PyArray_STRIDES(__pyx_v_self)); /* "numpy.pxd":235 * 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_L7:; /* "numpy.pxd":236 * 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; /* "numpy.pxd":237 * 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); /* "numpy.pxd":238 * 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)); /* "numpy.pxd":241 * * cdef int t * cdef char* f = NULL # <<<<<<<<<<<<<< * cdef dtype descr = self.descr * cdef list stack */ __pyx_v_f = NULL; /* "numpy.pxd":242 * cdef int t * cdef char* f = NULL * cdef dtype descr = self.descr # <<<<<<<<<<<<<< * cdef list stack * cdef int offset */ __pyx_t_4 = ((PyObject *)__pyx_v_self->descr); __Pyx_INCREF(__pyx_t_4); __pyx_v_descr = ((PyArray_Descr *)__pyx_t_4); __pyx_t_4 = 0; /* "numpy.pxd":246 * cdef int offset * * cdef bint hasfields = PyDataType_HASFIELDS(descr) # <<<<<<<<<<<<<< * * if not hasfields and not copy_shape: */ __pyx_v_hasfields = PyDataType_HASFIELDS(__pyx_v_descr); /* "numpy.pxd":248 * cdef bint hasfields = PyDataType_HASFIELDS(descr) * * if not hasfields and not copy_shape: # <<<<<<<<<<<<<< * # do not call releasebuffer * info.obj = None */ __pyx_t_2 = ((!(__pyx_v_hasfields != 0)) != 0); if (__pyx_t_2) { __pyx_t_3 = ((!(__pyx_v_copy_shape != 0)) != 0); __pyx_t_1 = __pyx_t_3; } else { __pyx_t_1 = __pyx_t_2; } if (__pyx_t_1) { /* "numpy.pxd":250 * if not hasfields and not copy_shape: * # do not call releasebuffer * info.obj = None # <<<<<<<<<<<<<< * else: * # need to call releasebuffer */ __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_info->obj); __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = Py_None; goto __pyx_L10; } /*else*/ { /* "numpy.pxd":253 * else: * # need to call releasebuffer * info.obj = self # <<<<<<<<<<<<<< * * if not hasfields: */ __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); } __pyx_L10:; /* "numpy.pxd":255 * info.obj = self * * if not hasfields: # <<<<<<<<<<<<<< * t = descr.type_num * if ((descr.byteorder == '>' and little_endian) or */ __pyx_t_1 = ((!(__pyx_v_hasfields != 0)) != 0); if (__pyx_t_1) { /* "numpy.pxd":256 * * if not hasfields: * t = descr.type_num # <<<<<<<<<<<<<< * if ((descr.byteorder == '>' and little_endian) or * (descr.byteorder == '<' and not little_endian)): */ __pyx_t_5 = __pyx_v_descr->type_num; __pyx_v_t = __pyx_t_5; /* "numpy.pxd":257 * if not hasfields: * t = descr.type_num * if ((descr.byteorder == '>' and little_endian) or # <<<<<<<<<<<<<< * (descr.byteorder == '<' and not little_endian)): * raise ValueError(u"Non-native byte order not supported") */ __pyx_t_1 = ((__pyx_v_descr->byteorder == '>') != 0); if (__pyx_t_1) { __pyx_t_2 = (__pyx_v_little_endian != 0); } else { __pyx_t_2 = __pyx_t_1; } if (!__pyx_t_2) { /* "numpy.pxd":258 * t = descr.type_num * if ((descr.byteorder == '>' and little_endian) or * (descr.byteorder == '<' and not little_endian)): # <<<<<<<<<<<<<< * raise ValueError(u"Non-native byte order not supported") * if t == NPY_BYTE: f = "b" */ __pyx_t_1 = ((__pyx_v_descr->byteorder == '<') != 0); if (__pyx_t_1) { __pyx_t_3 = ((!(__pyx_v_little_endian != 0)) != 0); __pyx_t_7 = __pyx_t_3; } else { __pyx_t_7 = __pyx_t_1; } __pyx_t_1 = __pyx_t_7; } else { __pyx_t_1 = __pyx_t_2; } if (__pyx_t_1) { /* "numpy.pxd":259 * if ((descr.byteorder == '>' and little_endian) or * (descr.byteorder == '<' 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_4 = PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__11, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 259; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 259; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } /* "numpy.pxd":276 * 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) */ switch (__pyx_v_t) { /* "numpy.pxd":260 * (descr.byteorder == '<' 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" */ case NPY_BYTE: __pyx_v_f = __pyx_k_b; break; /* "numpy.pxd":261 * 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 = __pyx_k_B; break; /* "numpy.pxd":262 * 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 = __pyx_k_h; break; /* "numpy.pxd":263 * 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 = __pyx_k_H; break; /* "numpy.pxd":264 * 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 = __pyx_k_i; break; /* "numpy.pxd":265 * 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 = __pyx_k_I; break; /* "numpy.pxd":266 * 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 = __pyx_k_l; break; /* "numpy.pxd":267 * 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 = __pyx_k_L; break; /* "numpy.pxd":268 * 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 = __pyx_k_q; break; /* "numpy.pxd":269 * 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 = __pyx_k_Q; break; /* "numpy.pxd":270 * 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 = __pyx_k_f; break; /* "numpy.pxd":271 * 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 = __pyx_k_d; break; /* "numpy.pxd":272 * 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 = __pyx_k_g; break; /* "numpy.pxd":273 * 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 = __pyx_k_Zf; break; /* "numpy.pxd":274 * 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 = __pyx_k_Zd; break; /* "numpy.pxd":275 * 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 = __pyx_k_Zg; break; /* "numpy.pxd":276 * 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 = __pyx_k_O; break; default: /* "numpy.pxd":278 * elif t == NPY_OBJECT: f = "O" * else: * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) # <<<<<<<<<<<<<< * info.format = f * return */ __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_t); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 278; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_8 = PyUnicode_Format(__pyx_kp_u_unknown_dtype_code_in_numpy_pxd, __pyx_t_4); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 278; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 278; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_8); __Pyx_GIVEREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_8 = PyObject_Call(__pyx_builtin_ValueError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 278; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_Raise(__pyx_t_8, 0, 0, 0); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; {__pyx_filename = __pyx_f[2]; __pyx_lineno = 278; __pyx_clineno = __LINE__; goto __pyx_L1_error;} break; } /* "numpy.pxd":279 * else: * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) * info.format = f # <<<<<<<<<<<<<< * return * else: */ __pyx_v_info->format = __pyx_v_f; /* "numpy.pxd":280 * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) * info.format = f * return # <<<<<<<<<<<<<< * else: * info.format = stdlib.malloc(_buffer_format_string_len) */ __pyx_r = 0; goto __pyx_L0; } /*else*/ { /* "numpy.pxd":282 * return * else: * info.format = stdlib.malloc(_buffer_format_string_len) # <<<<<<<<<<<<<< * info.format[0] = '^' # Native data types, manual alignment * offset = 0 */ __pyx_v_info->format = ((char *)malloc(255)); /* "numpy.pxd":283 * else: * info.format = stdlib.malloc(_buffer_format_string_len) * info.format[0] = '^' # Native data types, manual alignment # <<<<<<<<<<<<<< * offset = 0 * f = _util_dtypestring(descr, info.format + 1, */ (__pyx_v_info->format[0]) = '^'; /* "numpy.pxd":284 * info.format = stdlib.malloc(_buffer_format_string_len) * info.format[0] = '^' # Native data types, manual alignment * offset = 0 # <<<<<<<<<<<<<< * f = _util_dtypestring(descr, info.format + 1, * info.format + _buffer_format_string_len, */ __pyx_v_offset = 0; /* "numpy.pxd":285 * info.format[0] = '^' # Native data types, manual alignment * offset = 0 * f = _util_dtypestring(descr, info.format + 1, # <<<<<<<<<<<<<< * info.format + _buffer_format_string_len, * &offset) */ __pyx_t_9 = __pyx_f_5numpy__util_dtypestring(__pyx_v_descr, (__pyx_v_info->format + 1), (__pyx_v_info->format + 255), (&__pyx_v_offset)); if (unlikely(__pyx_t_9 == NULL)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 285; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_f = __pyx_t_9; /* "numpy.pxd":288 * info.format + _buffer_format_string_len, * &offset) * f[0] = 0 # Terminate format string # <<<<<<<<<<<<<< * * def __releasebuffer__(ndarray self, Py_buffer* info): */ (__pyx_v_f[0]) = 0; } /* "numpy.pxd":196 * # 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 fullfill the PEP. */ /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_8); __Pyx_AddTraceback("numpy.ndarray.__getbuffer__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; if (__pyx_v_info != NULL && __pyx_v_info->obj != NULL) { __Pyx_GOTREF(__pyx_v_info->obj); __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = NULL; } goto __pyx_L2; __pyx_L0:; if (__pyx_v_info != NULL && __pyx_v_info->obj == Py_None) { __Pyx_GOTREF(Py_None); __Pyx_DECREF(Py_None); __pyx_v_info->obj = NULL; } __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_descr); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "numpy.pxd":290 * f[0] = 0 # Terminate format string * * def __releasebuffer__(ndarray self, Py_buffer* info): # <<<<<<<<<<<<<< * if PyArray_HASFIELDS(self): * stdlib.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); /* "numpy.pxd":291 * * def __releasebuffer__(ndarray self, Py_buffer* info): * if PyArray_HASFIELDS(self): # <<<<<<<<<<<<<< * stdlib.free(info.format) * if sizeof(npy_intp) != sizeof(Py_ssize_t): */ __pyx_t_1 = (PyArray_HASFIELDS(__pyx_v_self) != 0); if (__pyx_t_1) { /* "numpy.pxd":292 * def __releasebuffer__(ndarray self, Py_buffer* info): * if PyArray_HASFIELDS(self): * stdlib.free(info.format) # <<<<<<<<<<<<<< * if sizeof(npy_intp) != sizeof(Py_ssize_t): * stdlib.free(info.strides) */ free(__pyx_v_info->format); goto __pyx_L3; } __pyx_L3:; /* "numpy.pxd":293 * if PyArray_HASFIELDS(self): * stdlib.free(info.format) * if sizeof(npy_intp) != sizeof(Py_ssize_t): # <<<<<<<<<<<<<< * stdlib.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) { /* "numpy.pxd":294 * stdlib.free(info.format) * if sizeof(npy_intp) != sizeof(Py_ssize_t): * stdlib.free(info.strides) # <<<<<<<<<<<<<< * # info.shape was stored after info.strides in the same block * */ free(__pyx_v_info->strides); goto __pyx_L4; } __pyx_L4:; /* "numpy.pxd":290 * f[0] = 0 # Terminate format string * * def __releasebuffer__(ndarray self, Py_buffer* info): # <<<<<<<<<<<<<< * if PyArray_HASFIELDS(self): * stdlib.free(info.format) */ /* function exit code */ __Pyx_RefNannyFinishContext(); } /* "numpy.pxd":772 * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PyArray_MultiIterNew1", 0); /* "numpy.pxd":773 * * 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_filename = __pyx_f[2]; __pyx_lineno = 773; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "numpy.pxd":772 * 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; } /* "numpy.pxd":775 * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PyArray_MultiIterNew2", 0); /* "numpy.pxd":776 * * 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_filename = __pyx_f[2]; __pyx_lineno = 776; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "numpy.pxd":775 * 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; } /* "numpy.pxd":778 * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PyArray_MultiIterNew3", 0); /* "numpy.pxd":779 * * 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_filename = __pyx_f[2]; __pyx_lineno = 779; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "numpy.pxd":778 * 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; } /* "numpy.pxd":781 * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PyArray_MultiIterNew4", 0); /* "numpy.pxd":782 * * 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_filename = __pyx_f[2]; __pyx_lineno = 782; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "numpy.pxd":781 * 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; } /* "numpy.pxd":784 * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PyArray_MultiIterNew5", 0); /* "numpy.pxd":785 * * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): * return PyArray_MultiIterNew(5, a, b, c, d, e) # <<<<<<<<<<<<<< * * cdef inline char* _util_dtypestring(dtype descr, char* f, char* end, int* offset) except NULL: */ __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_filename = __pyx_f[2]; __pyx_lineno = 785; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "numpy.pxd":784 * 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; } /* "numpy.pxd":787 * return PyArray_MultiIterNew(5, a, b, c, d, e) * * 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; PyObject *__pyx_t_5 = NULL; int __pyx_t_6; int __pyx_t_7; int __pyx_t_8; int __pyx_t_9; long __pyx_t_10; char *__pyx_t_11; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_util_dtypestring", 0); /* "numpy.pxd":794 * cdef int delta_offset * cdef tuple i * cdef int endian_detector = 1 # <<<<<<<<<<<<<< * cdef bint little_endian = ((&endian_detector)[0] != 0) * cdef tuple fields */ __pyx_v_endian_detector = 1; /* "numpy.pxd":795 * cdef tuple i * 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); /* "numpy.pxd":798 * 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_filename = __pyx_f[2]; __pyx_lineno = 798; __pyx_clineno = __LINE__; goto __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_COMPILING_IN_CPYTHON __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_filename = __pyx_f[2]; __pyx_lineno = 798; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 798; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif __Pyx_XDECREF_SET(__pyx_v_childname, __pyx_t_3); __pyx_t_3 = 0; /* "numpy.pxd":799 * * for childname in descr.names: * fields = descr.fields[childname] # <<<<<<<<<<<<<< * child, new_offset = fields * */ __pyx_t_3 = PyObject_GetItem(__pyx_v_descr->fields, __pyx_v_childname); if (unlikely(__pyx_t_3 == NULL)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 799; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 799; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_XDECREF_SET(__pyx_v_fields, ((PyObject*)__pyx_t_3)); __pyx_t_3 = 0; /* "numpy.pxd":800 * 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; #if CYTHON_COMPILING_IN_CPYTHON Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 800; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON __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_filename = __pyx_f[2]; __pyx_lineno = 800; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 800; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); #endif } else { __Pyx_RaiseNoneNotIterableError(); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 800; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_dtype))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 800; __pyx_clineno = __LINE__; goto __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; /* "numpy.pxd":802 * 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_ptrdiff_t((__pyx_v_end - __pyx_v_f)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 802; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = __Pyx_PyInt_From_int((__pyx_v_offset[0])); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 802; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = PyNumber_Subtract(__pyx_v_new_offset, __pyx_t_3); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 802; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyNumber_Subtract(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 802; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyObject_RichCompare(__pyx_t_3, __pyx_int_15, Py_LT); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 802; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 802; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_6) { /* "numpy.pxd":803 * * if (end - f) - (new_offset - offset[0]) < 15: * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") # <<<<<<<<<<<<<< * * if ((child.byteorder == '>' and little_endian) or */ __pyx_t_5 = PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__12, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 803; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_Raise(__pyx_t_5, 0, 0, 0); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; {__pyx_filename = __pyx_f[2]; __pyx_lineno = 803; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } /* "numpy.pxd":805 * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") * * if ((child.byteorder == '>' and little_endian) or # <<<<<<<<<<<<<< * (child.byteorder == '<' and not little_endian)): * raise ValueError(u"Non-native byte order not supported") */ __pyx_t_6 = ((__pyx_v_child->byteorder == '>') != 0); if (__pyx_t_6) { __pyx_t_7 = (__pyx_v_little_endian != 0); } else { __pyx_t_7 = __pyx_t_6; } if (!__pyx_t_7) { /* "numpy.pxd":806 * * if ((child.byteorder == '>' and little_endian) or * (child.byteorder == '<' 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_6 = ((__pyx_v_child->byteorder == '<') != 0); if (__pyx_t_6) { __pyx_t_8 = ((!(__pyx_v_little_endian != 0)) != 0); __pyx_t_9 = __pyx_t_8; } else { __pyx_t_9 = __pyx_t_6; } __pyx_t_6 = __pyx_t_9; } else { __pyx_t_6 = __pyx_t_7; } if (__pyx_t_6) { /* "numpy.pxd":807 * if ((child.byteorder == '>' and little_endian) or * (child.byteorder == '<' 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_5 = PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__13, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 807; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_Raise(__pyx_t_5, 0, 0, 0); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; {__pyx_filename = __pyx_f[2]; __pyx_lineno = 807; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } /* "numpy.pxd":817 * * # Output padding bytes * while offset[0] < new_offset: # <<<<<<<<<<<<<< * f[0] = 120 # "x"; pad byte * f += 1 */ while (1) { __pyx_t_5 = __Pyx_PyInt_From_int((__pyx_v_offset[0])); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 817; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = PyObject_RichCompare(__pyx_t_5, __pyx_v_new_offset, Py_LT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 817; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 817; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (!__pyx_t_6) break; /* "numpy.pxd":818 * # Output padding bytes * while offset[0] < new_offset: * f[0] = 120 # "x"; pad byte # <<<<<<<<<<<<<< * f += 1 * offset[0] += 1 */ (__pyx_v_f[0]) = 120; /* "numpy.pxd":819 * while offset[0] < new_offset: * f[0] = 120 # "x"; pad byte * f += 1 # <<<<<<<<<<<<<< * offset[0] += 1 * */ __pyx_v_f = (__pyx_v_f + 1); /* "numpy.pxd":820 * f[0] = 120 # "x"; pad byte * f += 1 * offset[0] += 1 # <<<<<<<<<<<<<< * * offset[0] += child.itemsize */ __pyx_t_10 = 0; (__pyx_v_offset[__pyx_t_10]) = ((__pyx_v_offset[__pyx_t_10]) + 1); } /* "numpy.pxd":822 * offset[0] += 1 * * offset[0] += child.itemsize # <<<<<<<<<<<<<< * * if not PyDataType_HASFIELDS(child): */ __pyx_t_10 = 0; (__pyx_v_offset[__pyx_t_10]) = ((__pyx_v_offset[__pyx_t_10]) + __pyx_v_child->elsize); /* "numpy.pxd":824 * 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) { /* "numpy.pxd":825 * * if not PyDataType_HASFIELDS(child): * t = child.type_num # <<<<<<<<<<<<<< * if end - f < 5: * raise RuntimeError(u"Format string allocated too short.") */ __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_child->type_num); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 825; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_XDECREF_SET(__pyx_v_t, __pyx_t_3); __pyx_t_3 = 0; /* "numpy.pxd":826 * 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 (__pyx_t_6) { /* "numpy.pxd":827 * 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_3 = PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__14, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 827; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 827; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } /* "numpy.pxd":830 * * # 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_3 = PyInt_FromLong(NPY_BYTE); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 830; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 830; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 830; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_6) { (__pyx_v_f[0]) = 98; goto __pyx_L11; } /* "numpy.pxd":831 * # 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_5 = PyInt_FromLong(NPY_UBYTE); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 831; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 831; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 831; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_6) { (__pyx_v_f[0]) = 66; goto __pyx_L11; } /* "numpy.pxd":832 * 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_3 = PyInt_FromLong(NPY_SHORT); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 832; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 832; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 832; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_6) { (__pyx_v_f[0]) = 104; goto __pyx_L11; } /* "numpy.pxd":833 * 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_5 = PyInt_FromLong(NPY_USHORT); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 833; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 833; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 833; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_6) { (__pyx_v_f[0]) = 72; goto __pyx_L11; } /* "numpy.pxd":834 * 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_3 = PyInt_FromLong(NPY_INT); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 834; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 834; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 834; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_6) { (__pyx_v_f[0]) = 105; goto __pyx_L11; } /* "numpy.pxd":835 * 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_5 = PyInt_FromLong(NPY_UINT); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 835; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 835; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 835; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_6) { (__pyx_v_f[0]) = 73; goto __pyx_L11; } /* "numpy.pxd":836 * 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_3 = PyInt_FromLong(NPY_LONG); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 836; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 836; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 836; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_6) { (__pyx_v_f[0]) = 108; goto __pyx_L11; } /* "numpy.pxd":837 * 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_5 = PyInt_FromLong(NPY_ULONG); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 837; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 837; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 837; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_6) { (__pyx_v_f[0]) = 76; goto __pyx_L11; } /* "numpy.pxd":838 * 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_3 = PyInt_FromLong(NPY_LONGLONG); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 838; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 838; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 838; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_6) { (__pyx_v_f[0]) = 113; goto __pyx_L11; } /* "numpy.pxd":839 * 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_5 = PyInt_FromLong(NPY_ULONGLONG); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 839; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 839; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 839; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_6) { (__pyx_v_f[0]) = 81; goto __pyx_L11; } /* "numpy.pxd":840 * 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_3 = PyInt_FromLong(NPY_FLOAT); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 840; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 840; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 840; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_6) { (__pyx_v_f[0]) = 102; goto __pyx_L11; } /* "numpy.pxd":841 * 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_5 = PyInt_FromLong(NPY_DOUBLE); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 841; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 841; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 841; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_6) { (__pyx_v_f[0]) = 100; goto __pyx_L11; } /* "numpy.pxd":842 * 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_3 = PyInt_FromLong(NPY_LONGDOUBLE); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 842; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 842; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 842; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_6) { (__pyx_v_f[0]) = 103; goto __pyx_L11; } /* "numpy.pxd":843 * 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_5 = PyInt_FromLong(NPY_CFLOAT); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 843; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 843; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 843; __pyx_clineno = __LINE__; goto __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]) = 102; __pyx_v_f = (__pyx_v_f + 1); goto __pyx_L11; } /* "numpy.pxd":844 * 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_3 = PyInt_FromLong(NPY_CDOUBLE); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 844; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 844; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 844; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_6) { (__pyx_v_f[0]) = 90; (__pyx_v_f[1]) = 100; __pyx_v_f = (__pyx_v_f + 1); goto __pyx_L11; } /* "numpy.pxd":845 * 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_5 = PyInt_FromLong(NPY_CLONGDOUBLE); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 845; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 845; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 845; __pyx_clineno = __LINE__; goto __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]) = 103; __pyx_v_f = (__pyx_v_f + 1); goto __pyx_L11; } /* "numpy.pxd":846 * 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_3 = PyInt_FromLong(NPY_OBJECT); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 846; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 846; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 846; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_6) { (__pyx_v_f[0]) = 79; goto __pyx_L11; } /*else*/ { /* "numpy.pxd":848 * elif t == NPY_OBJECT: f[0] = 79 #"O" * else: * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) # <<<<<<<<<<<<<< * f += 1 * else: */ __pyx_t_5 = PyUnicode_Format(__pyx_kp_u_unknown_dtype_code_in_numpy_pxd, __pyx_v_t); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 848; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 848; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyObject_Call(__pyx_builtin_ValueError, __pyx_t_3, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 848; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_Raise(__pyx_t_5, 0, 0, 0); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; {__pyx_filename = __pyx_f[2]; __pyx_lineno = 848; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_L11:; /* "numpy.pxd":849 * 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); goto __pyx_L9; } /*else*/ { /* "numpy.pxd":853 * # Cython ignores struct boundary information ("T{...}"), * # so don't output it * f = _util_dtypestring(child, f, end, offset) # <<<<<<<<<<<<<< * return f * */ __pyx_t_11 = __pyx_f_5numpy__util_dtypestring(__pyx_v_child, __pyx_v_f, __pyx_v_end, __pyx_v_offset); if (unlikely(__pyx_t_11 == NULL)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 853; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_f = __pyx_t_11; } __pyx_L9:; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "numpy.pxd":854 * # so don't output it * f = _util_dtypestring(child, f, end, offset) * return f # <<<<<<<<<<<<<< * * */ __pyx_r = __pyx_v_f; goto __pyx_L0; /* "numpy.pxd":787 * return PyArray_MultiIterNew(5, a, b, c, d, e) * * 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_XDECREF(__pyx_t_5); __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; } /* "numpy.pxd":969 * * * 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); /* "numpy.pxd":971 * 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) { /* "numpy.pxd":972 * cdef PyObject* baseptr * if base is None: * baseptr = NULL # <<<<<<<<<<<<<< * else: * Py_INCREF(base) # important to do this before decref below! */ __pyx_v_baseptr = NULL; goto __pyx_L3; } /*else*/ { /* "numpy.pxd":974 * baseptr = NULL * else: * Py_INCREF(base) # important to do this before decref below! # <<<<<<<<<<<<<< * baseptr = base * Py_XDECREF(arr.base) */ Py_INCREF(__pyx_v_base); /* "numpy.pxd":975 * 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:; /* "numpy.pxd":976 * 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); /* "numpy.pxd":977 * baseptr = base * Py_XDECREF(arr.base) * arr.base = baseptr # <<<<<<<<<<<<<< * * cdef inline object get_array_base(ndarray arr): */ __pyx_v_arr->base = __pyx_v_baseptr; /* "numpy.pxd":969 * * * cdef inline void set_array_base(ndarray arr, object base): # <<<<<<<<<<<<<< * cdef PyObject* baseptr * if base is None: */ /* function exit code */ __Pyx_RefNannyFinishContext(); } /* "numpy.pxd":979 * 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); /* "numpy.pxd":980 * * 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) { /* "numpy.pxd":981 * cdef inline object get_array_base(ndarray arr): * if arr.base is NULL: * return None # <<<<<<<<<<<<<< * else: * return arr.base */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(Py_None); __pyx_r = Py_None; goto __pyx_L0; } /*else*/ { /* "numpy.pxd":983 * return None * else: * return arr.base # <<<<<<<<<<<<<< */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_arr->base)); __pyx_r = ((PyObject *)__pyx_v_arr->base); goto __pyx_L0; } /* "numpy.pxd":979 * 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; } /* "util.pxd":26 * object sarr_from_data(cnp.dtype, int length, void* data) * * cdef inline object get_value_at(ndarray arr, object loc): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, sz */ static CYTHON_INLINE PyObject *__pyx_f_4util_get_value_at(PyArrayObject *__pyx_v_arr, PyObject *__pyx_v_loc) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_sz; PyObject *__pyx_v_casted = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; Py_ssize_t __pyx_t_3; int __pyx_t_4; int __pyx_t_5; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_value_at", 0); __Pyx_INCREF(__pyx_v_loc); /* "util.pxd":30 * Py_ssize_t i, sz * void* data_ptr * if is_float_object(loc): # <<<<<<<<<<<<<< * casted = int(loc) * if casted == loc: */ __pyx_t_1 = (is_float_object(__pyx_v_loc) != 0); if (__pyx_t_1) { /* "util.pxd":31 * void* data_ptr * if is_float_object(loc): * casted = int(loc) # <<<<<<<<<<<<<< * if casted == loc: * loc = casted */ __pyx_t_2 = PyNumber_Int(__pyx_v_loc); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 31; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_v_casted = __pyx_t_2; __pyx_t_2 = 0; /* "util.pxd":32 * if is_float_object(loc): * casted = int(loc) * if casted == loc: # <<<<<<<<<<<<<< * loc = casted * i = loc */ __pyx_t_2 = PyObject_RichCompare(__pyx_v_casted, __pyx_v_loc, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 32; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 32; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_1) { /* "util.pxd":33 * casted = int(loc) * if casted == loc: * loc = casted # <<<<<<<<<<<<<< * i = loc * sz = cnp.PyArray_SIZE(arr) */ __Pyx_INCREF(__pyx_v_casted); __Pyx_DECREF_SET(__pyx_v_loc, __pyx_v_casted); goto __pyx_L4; } __pyx_L4:; goto __pyx_L3; } __pyx_L3:; /* "util.pxd":34 * if casted == loc: * loc = casted * i = loc # <<<<<<<<<<<<<< * sz = cnp.PyArray_SIZE(arr) * */ __pyx_t_3 = __Pyx_PyIndex_AsSsize_t(__pyx_v_loc); if (unlikely((__pyx_t_3 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 34; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_i = ((Py_ssize_t)__pyx_t_3); /* "util.pxd":35 * loc = casted * i = loc * sz = cnp.PyArray_SIZE(arr) # <<<<<<<<<<<<<< * * if i < 0 and sz > 0: */ __pyx_v_sz = PyArray_SIZE(__pyx_v_arr); /* "util.pxd":37 * sz = cnp.PyArray_SIZE(arr) * * if i < 0 and sz > 0: # <<<<<<<<<<<<<< * i += sz * elif i >= sz or sz == 0: */ __pyx_t_1 = ((__pyx_v_i < 0) != 0); if (__pyx_t_1) { __pyx_t_4 = ((__pyx_v_sz > 0) != 0); __pyx_t_5 = __pyx_t_4; } else { __pyx_t_5 = __pyx_t_1; } if (__pyx_t_5) { /* "util.pxd":38 * * if i < 0 and sz > 0: * i += sz # <<<<<<<<<<<<<< * elif i >= sz or sz == 0: * raise IndexError('index out of bounds') */ __pyx_v_i = (__pyx_v_i + __pyx_v_sz); goto __pyx_L5; } /* "util.pxd":39 * if i < 0 and sz > 0: * i += sz * elif i >= sz or sz == 0: # <<<<<<<<<<<<<< * raise IndexError('index out of bounds') * */ __pyx_t_5 = ((__pyx_v_i >= __pyx_v_sz) != 0); if (!__pyx_t_5) { __pyx_t_1 = ((__pyx_v_sz == 0) != 0); __pyx_t_4 = __pyx_t_1; } else { __pyx_t_4 = __pyx_t_5; } if (__pyx_t_4) { /* "util.pxd":40 * i += sz * elif i >= sz or sz == 0: * raise IndexError('index out of bounds') # <<<<<<<<<<<<<< * * return get_value_1d(arr, i) */ __pyx_t_2 = PyObject_Call(__pyx_builtin_IndexError, __pyx_tuple__15, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 40; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[3]; __pyx_lineno = 40; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_L5:; /* "util.pxd":42 * raise IndexError('index out of bounds') * * return get_value_1d(arr, i) # <<<<<<<<<<<<<< * * cdef inline set_value_at(ndarray arr, object loc, object value): */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = get_value_1d(__pyx_v_arr, __pyx_v_i); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 42; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "util.pxd":26 * object sarr_from_data(cnp.dtype, int length, void* data) * * cdef inline object get_value_at(ndarray arr, object loc): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, sz */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("util.get_value_at", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_casted); __Pyx_XDECREF(__pyx_v_loc); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "util.pxd":44 * return get_value_1d(arr, i) * * cdef inline set_value_at(ndarray arr, object loc, object value): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, sz */ static CYTHON_INLINE PyObject *__pyx_f_4util_set_value_at(PyArrayObject *__pyx_v_arr, PyObject *__pyx_v_loc, PyObject *__pyx_v_value) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_sz; PyObject *__pyx_v_casted = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; Py_ssize_t __pyx_t_3; int __pyx_t_4; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("set_value_at", 0); __Pyx_INCREF(__pyx_v_loc); /* "util.pxd":47 * cdef: * Py_ssize_t i, sz * if is_float_object(loc): # <<<<<<<<<<<<<< * casted = int(loc) * if casted == loc: */ __pyx_t_1 = (is_float_object(__pyx_v_loc) != 0); if (__pyx_t_1) { /* "util.pxd":48 * Py_ssize_t i, sz * if is_float_object(loc): * casted = int(loc) # <<<<<<<<<<<<<< * if casted == loc: * loc = casted */ __pyx_t_2 = PyNumber_Int(__pyx_v_loc); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_v_casted = __pyx_t_2; __pyx_t_2 = 0; /* "util.pxd":49 * if is_float_object(loc): * casted = int(loc) * if casted == loc: # <<<<<<<<<<<<<< * loc = casted * i = loc */ __pyx_t_2 = PyObject_RichCompare(__pyx_v_casted, __pyx_v_loc, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_1) { /* "util.pxd":50 * casted = int(loc) * if casted == loc: * loc = casted # <<<<<<<<<<<<<< * i = loc * sz = cnp.PyArray_SIZE(arr) */ __Pyx_INCREF(__pyx_v_casted); __Pyx_DECREF_SET(__pyx_v_loc, __pyx_v_casted); goto __pyx_L4; } __pyx_L4:; goto __pyx_L3; } __pyx_L3:; /* "util.pxd":51 * if casted == loc: * loc = casted * i = loc # <<<<<<<<<<<<<< * sz = cnp.PyArray_SIZE(arr) * */ __pyx_t_3 = __Pyx_PyIndex_AsSsize_t(__pyx_v_loc); if (unlikely((__pyx_t_3 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_i = ((Py_ssize_t)__pyx_t_3); /* "util.pxd":52 * loc = casted * i = loc * sz = cnp.PyArray_SIZE(arr) # <<<<<<<<<<<<<< * * if i < 0: */ __pyx_v_sz = PyArray_SIZE(__pyx_v_arr); /* "util.pxd":54 * sz = cnp.PyArray_SIZE(arr) * * if i < 0: # <<<<<<<<<<<<<< * i += sz * elif i >= sz: */ __pyx_t_1 = ((__pyx_v_i < 0) != 0); if (__pyx_t_1) { /* "util.pxd":55 * * if i < 0: * i += sz # <<<<<<<<<<<<<< * elif i >= sz: * raise IndexError('index out of bounds') */ __pyx_v_i = (__pyx_v_i + __pyx_v_sz); goto __pyx_L5; } /* "util.pxd":56 * if i < 0: * i += sz * elif i >= sz: # <<<<<<<<<<<<<< * raise IndexError('index out of bounds') * */ __pyx_t_1 = ((__pyx_v_i >= __pyx_v_sz) != 0); if (__pyx_t_1) { /* "util.pxd":57 * i += sz * elif i >= sz: * raise IndexError('index out of bounds') # <<<<<<<<<<<<<< * * assign_value_1d(arr, i, value) */ __pyx_t_2 = PyObject_Call(__pyx_builtin_IndexError, __pyx_tuple__16, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 57; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[3]; __pyx_lineno = 57; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_L5:; /* "util.pxd":59 * raise IndexError('index out of bounds') * * assign_value_1d(arr, i, value) # <<<<<<<<<<<<<< * * cdef inline int is_contiguous(ndarray arr): */ __pyx_t_4 = assign_value_1d(__pyx_v_arr, __pyx_v_i, __pyx_v_value); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 59; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "util.pxd":44 * return get_value_1d(arr, i) * * cdef inline set_value_at(ndarray arr, object loc, object value): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, sz */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("util.set_value_at", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_casted); __Pyx_XDECREF(__pyx_v_loc); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "util.pxd":61 * assign_value_1d(arr, i, value) * * cdef inline int is_contiguous(ndarray arr): # <<<<<<<<<<<<<< * return cnp.PyArray_CHKFLAGS(arr, cnp.NPY_C_CONTIGUOUS) * */ static CYTHON_INLINE int __pyx_f_4util_is_contiguous(PyArrayObject *__pyx_v_arr) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("is_contiguous", 0); /* "util.pxd":62 * * cdef inline int is_contiguous(ndarray arr): * return cnp.PyArray_CHKFLAGS(arr, cnp.NPY_C_CONTIGUOUS) # <<<<<<<<<<<<<< * * cdef inline is_array(object o): */ __pyx_r = PyArray_CHKFLAGS(__pyx_v_arr, NPY_C_CONTIGUOUS); goto __pyx_L0; /* "util.pxd":61 * assign_value_1d(arr, i, value) * * cdef inline int is_contiguous(ndarray arr): # <<<<<<<<<<<<<< * return cnp.PyArray_CHKFLAGS(arr, cnp.NPY_C_CONTIGUOUS) * */ /* function exit code */ __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "util.pxd":64 * return cnp.PyArray_CHKFLAGS(arr, cnp.NPY_C_CONTIGUOUS) * * cdef inline is_array(object o): # <<<<<<<<<<<<<< * return cnp.PyArray_Check(o) * */ static CYTHON_INLINE PyObject *__pyx_f_4util_is_array(PyObject *__pyx_v_o) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("is_array", 0); /* "util.pxd":65 * * cdef inline is_array(object o): * return cnp.PyArray_Check(o) # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyBool_FromLong(PyArray_Check(__pyx_v_o)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 65; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "util.pxd":64 * return cnp.PyArray_CHKFLAGS(arr, cnp.NPY_C_CONTIGUOUS) * * cdef inline is_array(object o): # <<<<<<<<<<<<<< * return cnp.PyArray_Check(o) * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("util.is_array", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "util.pxd":68 * * * cdef inline bint _checknull(object val): # <<<<<<<<<<<<<< * try: * return val is None or (cpython.PyFloat_Check(val) and val != val) */ static CYTHON_INLINE int __pyx_f_4util__checknull(PyObject *__pyx_v_val) { 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; int __pyx_t_9; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_checknull", 0); /* "util.pxd":69 * * cdef inline bint _checknull(object val): * try: # <<<<<<<<<<<<<< * return val is None or (cpython.PyFloat_Check(val) and val != val) * except ValueError: */ { __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:*/ { /* "util.pxd":70 * cdef inline bint _checknull(object val): * try: * return val is None or (cpython.PyFloat_Check(val) and val != val) # <<<<<<<<<<<<<< * except ValueError: * return False */ __pyx_t_4 = (__pyx_v_val == Py_None); __pyx_t_5 = __Pyx_PyBool_FromLong(__pyx_t_4); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L3_error;} if (!__pyx_t_4) { __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_6 = __Pyx_PyBool_FromLong(PyFloat_Check(__pyx_v_val)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L3_error;} if (__pyx_t_4) { __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_7 = PyObject_RichCompare(__pyx_v_val, __pyx_v_val, Py_NE); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_t_8 = __pyx_t_7; __pyx_t_7 = 0; } else { __pyx_t_8 = __pyx_t_6; __pyx_t_6 = 0; } __pyx_t_6 = __pyx_t_8; __pyx_t_8 = 0; } else { __pyx_t_6 = __pyx_t_5; __pyx_t_5 = 0; } __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_r = __pyx_t_4; goto __pyx_L7_try_return; } __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L10_try_end; __pyx_L3_error:; __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; /* "util.pxd":71 * try: * return val is None or (cpython.PyFloat_Check(val) and val != val) * except ValueError: # <<<<<<<<<<<<<< * return False * */ __pyx_t_9 = PyErr_ExceptionMatches(__pyx_builtin_ValueError); if (__pyx_t_9) { __Pyx_AddTraceback("util._checknull", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_5, &__pyx_t_8) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 71; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_GOTREF(__pyx_t_5); __Pyx_GOTREF(__pyx_t_8); /* "util.pxd":72 * return val is None or (cpython.PyFloat_Check(val) and val != val) * except ValueError: * return False # <<<<<<<<<<<<<< * * cdef inline bint _checknull_old(object val): */ __pyx_r = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; goto __pyx_L6_except_return; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; goto __pyx_L4_exception_handled; } goto __pyx_L5_except_error; __pyx_L5_except_error:; __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); goto __pyx_L1_error; __pyx_L7_try_return:; __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); goto __pyx_L0; __pyx_L6_except_return:; __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); goto __pyx_L0; __pyx_L4_exception_handled:; __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); __pyx_L10_try_end:; } /* "util.pxd":68 * * * cdef inline bint _checknull(object val): # <<<<<<<<<<<<<< * try: * return val is None or (cpython.PyFloat_Check(val) and val != val) */ /* 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_WriteUnraisable("util._checknull", __pyx_clineno, __pyx_lineno, __pyx_filename, 0); __pyx_r = 0; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "util.pxd":74 * return False * * cdef inline bint _checknull_old(object val): # <<<<<<<<<<<<<< * import numpy as np * cdef double INF = np.inf */ static CYTHON_INLINE int __pyx_f_4util__checknull_old(PyObject *__pyx_v_val) { PyObject *__pyx_v_np = NULL; double __pyx_v_INF; double __pyx_v_NEGINF; int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; double __pyx_t_2; 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; int __pyx_t_9; int __pyx_t_10; int __pyx_t_11; int __pyx_t_12; PyObject *__pyx_t_13 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_checknull_old", 0); /* "util.pxd":75 * * cdef inline bint _checknull_old(object val): * import numpy as np # <<<<<<<<<<<<<< * cdef double INF = np.inf * cdef double NEGINF = -INF */ __pyx_t_1 = __Pyx_Import(__pyx_n_s_numpy, 0, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 75; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_v_np = __pyx_t_1; __pyx_t_1 = 0; /* "util.pxd":76 * cdef inline bint _checknull_old(object val): * import numpy as np * cdef double INF = np.inf # <<<<<<<<<<<<<< * cdef double NEGINF = -INF * try: */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_np, __pyx_n_s_inf); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 76; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __pyx_PyFloat_AsDouble(__pyx_t_1); if (unlikely((__pyx_t_2 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 76; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_INF = ((double)__pyx_t_2); /* "util.pxd":77 * import numpy as np * cdef double INF = np.inf * cdef double NEGINF = -INF # <<<<<<<<<<<<<< * try: * return bool(val is None or val != val and val != INF */ __pyx_v_NEGINF = (-__pyx_v_INF); /* "util.pxd":78 * cdef double INF = np.inf * cdef double NEGINF = -INF * try: # <<<<<<<<<<<<<< * return bool(val is None or val != val and val != INF * and val != NEGINF) */ { __Pyx_ExceptionSave(&__pyx_t_3, &__pyx_t_4, &__pyx_t_5); __Pyx_XGOTREF(__pyx_t_3); __Pyx_XGOTREF(__pyx_t_4); __Pyx_XGOTREF(__pyx_t_5); /*try:*/ { /* "util.pxd":79 * cdef double NEGINF = -INF * try: * return bool(val is None or val != val and val != INF # <<<<<<<<<<<<<< * and val != NEGINF) * except ValueError: */ __pyx_t_6 = (__pyx_v_val == Py_None); if (!__pyx_t_6) { __pyx_t_1 = PyObject_RichCompare(__pyx_v_val, __pyx_v_val, Py_NE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_7) { /* "util.pxd":80 * try: * return bool(val is None or val != val and val != INF * and val != NEGINF) # <<<<<<<<<<<<<< * except ValueError: * return False */ __pyx_t_1 = PyFloat_FromDouble(__pyx_v_INF); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 80; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_8 = PyObject_RichCompare(__pyx_v_val, __pyx_t_1, Py_NE); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "util.pxd":79 * cdef double NEGINF = -INF * try: * return bool(val is None or val != val and val != INF # <<<<<<<<<<<<<< * and val != NEGINF) * except ValueError: */ __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (__pyx_t_9) { /* "util.pxd":80 * try: * return bool(val is None or val != val and val != INF * and val != NEGINF) # <<<<<<<<<<<<<< * except ValueError: * return False */ __pyx_t_8 = PyFloat_FromDouble(__pyx_v_NEGINF); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 80; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_1 = PyObject_RichCompare(__pyx_v_val, __pyx_t_8, Py_NE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 80; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 80; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_11 = __pyx_t_10; } else { __pyx_t_11 = __pyx_t_9; } __pyx_t_9 = __pyx_t_11; } else { __pyx_t_9 = __pyx_t_7; } __pyx_t_7 = __pyx_t_9; } else { __pyx_t_7 = __pyx_t_6; } /* "util.pxd":79 * cdef double NEGINF = -INF * try: * return bool(val is None or val != val and val != INF # <<<<<<<<<<<<<< * and val != NEGINF) * except ValueError: */ __pyx_r = (!(!__pyx_t_7)); goto __pyx_L7_try_return; } __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; goto __pyx_L10_try_end; __pyx_L3_error:; __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; /* "util.pxd":81 * return bool(val is None or val != val and val != INF * and val != NEGINF) * except ValueError: # <<<<<<<<<<<<<< * return False * */ __pyx_t_12 = PyErr_ExceptionMatches(__pyx_builtin_ValueError); if (__pyx_t_12) { __Pyx_AddTraceback("util._checknull_old", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_8, &__pyx_t_13) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_GOTREF(__pyx_t_8); __Pyx_GOTREF(__pyx_t_13); /* "util.pxd":82 * and val != NEGINF) * except ValueError: * return False # <<<<<<<<<<<<<< * * cdef inline bint _checknan(object val): */ __pyx_r = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; goto __pyx_L6_except_return; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; goto __pyx_L4_exception_handled; } goto __pyx_L5_except_error; __pyx_L5_except_error:; __Pyx_XGIVEREF(__pyx_t_3); __Pyx_XGIVEREF(__pyx_t_4); __Pyx_XGIVEREF(__pyx_t_5); __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5); goto __pyx_L1_error; __pyx_L7_try_return:; __Pyx_XGIVEREF(__pyx_t_3); __Pyx_XGIVEREF(__pyx_t_4); __Pyx_XGIVEREF(__pyx_t_5); __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5); goto __pyx_L0; __pyx_L6_except_return:; __Pyx_XGIVEREF(__pyx_t_3); __Pyx_XGIVEREF(__pyx_t_4); __Pyx_XGIVEREF(__pyx_t_5); __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5); goto __pyx_L0; __pyx_L4_exception_handled:; __Pyx_XGIVEREF(__pyx_t_3); __Pyx_XGIVEREF(__pyx_t_4); __Pyx_XGIVEREF(__pyx_t_5); __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5); __pyx_L10_try_end:; } /* "util.pxd":74 * return False * * cdef inline bint _checknull_old(object val): # <<<<<<<<<<<<<< * import numpy as np * cdef double INF = np.inf */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_13); __Pyx_WriteUnraisable("util._checknull_old", __pyx_clineno, __pyx_lineno, __pyx_filename, 0); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_np); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "util.pxd":84 * return False * * cdef inline bint _checknan(object val): # <<<<<<<<<<<<<< * return not cnp.PyArray_Check(val) and val != val */ static CYTHON_INLINE int __pyx_f_4util__checknan(PyObject *__pyx_v_val) { int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_checknan", 0); /* "util.pxd":85 * * cdef inline bint _checknan(object val): * return not cnp.PyArray_Check(val) and val != val # <<<<<<<<<<<<<< */ __pyx_t_1 = __Pyx_PyBool_FromLong((!(PyArray_Check(__pyx_v_val) != 0))); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__pyx_t_2) { __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_3 = PyObject_RichCompare(__pyx_v_val, __pyx_v_val, Py_NE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_4 = __pyx_t_3; __pyx_t_3 = 0; } else { __pyx_t_4 = __pyx_t_1; __pyx_t_1 = 0; } __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_r = __pyx_t_2; goto __pyx_L0; /* "util.pxd":84 * return False * * cdef inline bint _checknan(object val): # <<<<<<<<<<<<<< * return not cnp.PyArray_Check(val) and val != val */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_WriteUnraisable("util._checknan", __pyx_clineno, __pyx_lineno, __pyx_filename, 0); __pyx_r = 0; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static struct __pyx_vtabstruct_6pandas_5index_IndexEngine __pyx_vtable_6pandas_5index_IndexEngine; static PyObject *__pyx_tp_new_6pandas_5index_IndexEngine(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { struct __pyx_obj_6pandas_5index_IndexEngine *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_5index_IndexEngine *)o); p->__pyx_vtab = __pyx_vtabptr_6pandas_5index_IndexEngine; p->vgetter = Py_None; Py_INCREF(Py_None); p->mapping = ((struct __pyx_obj_6pandas_9hashtable_HashTable *)Py_None); Py_INCREF(Py_None); return o; } static void __pyx_tp_dealloc_6pandas_5index_IndexEngine(PyObject *o) { struct __pyx_obj_6pandas_5index_IndexEngine *p = (struct __pyx_obj_6pandas_5index_IndexEngine *)o; #if PY_VERSION_HEX >= 0x030400a1 if (unlikely(Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) { if (PyObject_CallFinalizerFromDealloc(o)) return; } #endif PyObject_GC_UnTrack(o); Py_CLEAR(p->vgetter); Py_CLEAR(p->mapping); (*Py_TYPE(o)->tp_free)(o); } static int __pyx_tp_traverse_6pandas_5index_IndexEngine(PyObject *o, visitproc v, void *a) { int e; struct __pyx_obj_6pandas_5index_IndexEngine *p = (struct __pyx_obj_6pandas_5index_IndexEngine *)o; if (p->vgetter) { e = (*v)(p->vgetter, a); if (e) return e; } if (p->mapping) { e = (*v)(((PyObject*)p->mapping), a); if (e) return e; } return 0; } static int __pyx_tp_clear_6pandas_5index_IndexEngine(PyObject *o) { PyObject* tmp; struct __pyx_obj_6pandas_5index_IndexEngine *p = (struct __pyx_obj_6pandas_5index_IndexEngine *)o; tmp = ((PyObject*)p->vgetter); p->vgetter = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->mapping); p->mapping = ((struct __pyx_obj_6pandas_9hashtable_HashTable *)Py_None); Py_INCREF(Py_None); Py_XDECREF(tmp); return 0; } static PyObject *__pyx_getprop_6pandas_5index_11IndexEngine_is_unique(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6pandas_5index_11IndexEngine_9is_unique_1__get__(o); } static PyObject *__pyx_getprop_6pandas_5index_11IndexEngine_is_monotonic(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6pandas_5index_11IndexEngine_12is_monotonic_1__get__(o); } static PyObject *__pyx_getprop_6pandas_5index_11IndexEngine_vgetter(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6pandas_5index_11IndexEngine_7vgetter_1__get__(o); } static PyObject *__pyx_getprop_6pandas_5index_11IndexEngine_mapping(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6pandas_5index_11IndexEngine_7mapping_1__get__(o); } static PyObject *__pyx_getprop_6pandas_5index_11IndexEngine_over_size_threshold(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6pandas_5index_11IndexEngine_19over_size_threshold_1__get__(o); } static PyMethodDef __pyx_methods_6pandas_5index_IndexEngine[] = { {__Pyx_NAMESTR("get_value"), (PyCFunction)__pyx_pw_6pandas_5index_11IndexEngine_5get_value, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_5index_11IndexEngine_4get_value)}, {__Pyx_NAMESTR("set_value"), (PyCFunction)__pyx_pw_6pandas_5index_11IndexEngine_7set_value, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_5index_11IndexEngine_6set_value)}, {__Pyx_NAMESTR("get_loc"), (PyCFunction)__pyx_pw_6pandas_5index_11IndexEngine_9get_loc, METH_O, __Pyx_DOCSTR(0)}, {__Pyx_NAMESTR("_call_monotonic"), (PyCFunction)__pyx_pw_6pandas_5index_11IndexEngine_11_call_monotonic, METH_O, __Pyx_DOCSTR(0)}, {__Pyx_NAMESTR("clear_mapping"), (PyCFunction)__pyx_pw_6pandas_5index_11IndexEngine_13clear_mapping, METH_NOARGS, __Pyx_DOCSTR(0)}, {__Pyx_NAMESTR("get_indexer"), (PyCFunction)__pyx_pw_6pandas_5index_11IndexEngine_15get_indexer, METH_O, __Pyx_DOCSTR(0)}, {__Pyx_NAMESTR("get_indexer_non_unique"), (PyCFunction)__pyx_pw_6pandas_5index_11IndexEngine_17get_indexer_non_unique, METH_O, __Pyx_DOCSTR(__pyx_doc_6pandas_5index_11IndexEngine_16get_indexer_non_unique)}, {0, 0, 0, 0} }; static struct PyGetSetDef __pyx_getsets_6pandas_5index_IndexEngine[] = { {(char *)"is_unique", __pyx_getprop_6pandas_5index_11IndexEngine_is_unique, 0, 0, 0}, {(char *)"is_monotonic", __pyx_getprop_6pandas_5index_11IndexEngine_is_monotonic, 0, 0, 0}, {(char *)"vgetter", __pyx_getprop_6pandas_5index_11IndexEngine_vgetter, 0, 0, 0}, {(char *)"mapping", __pyx_getprop_6pandas_5index_11IndexEngine_mapping, 0, 0, 0}, {(char *)"over_size_threshold", __pyx_getprop_6pandas_5index_11IndexEngine_over_size_threshold, 0, 0, 0}, {0, 0, 0, 0, 0} }; static PySequenceMethods __pyx_tp_as_sequence_IndexEngine = { 0, /*sq_length*/ 0, /*sq_concat*/ 0, /*sq_repeat*/ 0, /*sq_item*/ 0, /*sq_slice*/ 0, /*sq_ass_item*/ 0, /*sq_ass_slice*/ __pyx_pw_6pandas_5index_11IndexEngine_3__contains__, /*sq_contains*/ 0, /*sq_inplace_concat*/ 0, /*sq_inplace_repeat*/ }; static PyTypeObject __pyx_type_6pandas_5index_IndexEngine = { PyVarObject_HEAD_INIT(0, 0) __Pyx_NAMESTR("pandas.index.IndexEngine"), /*tp_name*/ sizeof(struct __pyx_obj_6pandas_5index_IndexEngine), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_6pandas_5index_IndexEngine, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #else 0, /*reserved*/ #endif 0, /*tp_repr*/ 0, /*tp_as_number*/ &__pyx_tp_as_sequence_IndexEngine, /*tp_as_sequence*/ 0, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ 0, /*tp_doc*/ __pyx_tp_traverse_6pandas_5index_IndexEngine, /*tp_traverse*/ __pyx_tp_clear_6pandas_5index_IndexEngine, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_6pandas_5index_IndexEngine, /*tp_methods*/ 0, /*tp_members*/ __pyx_getsets_6pandas_5index_IndexEngine, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ __pyx_pw_6pandas_5index_11IndexEngine_1__init__, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_6pandas_5index_IndexEngine, /*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*/ #if PY_VERSION_HEX >= 0x02060000 0, /*tp_version_tag*/ #endif #if PY_VERSION_HEX >= 0x030400a1 0, /*tp_finalize*/ #endif }; static struct __pyx_vtabstruct_6pandas_5index_Float64Engine __pyx_vtable_6pandas_5index_Float64Engine; static PyObject *__pyx_tp_new_6pandas_5index_Float64Engine(PyTypeObject *t, PyObject *a, PyObject *k) { struct __pyx_obj_6pandas_5index_Float64Engine *p; PyObject *o = __pyx_tp_new_6pandas_5index_IndexEngine(t, a, k); if (unlikely(!o)) return 0; p = ((struct __pyx_obj_6pandas_5index_Float64Engine *)o); p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_6pandas_5index_IndexEngine*)__pyx_vtabptr_6pandas_5index_Float64Engine; return o; } static PyMethodDef __pyx_methods_6pandas_5index_Float64Engine[] = { {__Pyx_NAMESTR("_call_monotonic"), (PyCFunction)__pyx_pw_6pandas_5index_13Float64Engine_1_call_monotonic, METH_O, __Pyx_DOCSTR(0)}, {__Pyx_NAMESTR("get_pad_indexer"), (PyCFunction)__pyx_pw_6pandas_5index_13Float64Engine_3get_pad_indexer, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}, {__Pyx_NAMESTR("get_backfill_indexer"), (PyCFunction)__pyx_pw_6pandas_5index_13Float64Engine_5get_backfill_indexer, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}, {0, 0, 0, 0} }; static PyTypeObject __pyx_type_6pandas_5index_Float64Engine = { PyVarObject_HEAD_INIT(0, 0) __Pyx_NAMESTR("pandas.index.Float64Engine"), /*tp_name*/ sizeof(struct __pyx_obj_6pandas_5index_Float64Engine), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_6pandas_5index_IndexEngine, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #else 0, /*reserved*/ #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*/ 0, /*tp_doc*/ __pyx_tp_traverse_6pandas_5index_IndexEngine, /*tp_traverse*/ __pyx_tp_clear_6pandas_5index_IndexEngine, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_6pandas_5index_Float64Engine, /*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_5index_11IndexEngine_1__init__, /*tp_init*/ #else 0, /*tp_init*/ #endif 0, /*tp_alloc*/ __pyx_tp_new_6pandas_5index_Float64Engine, /*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*/ #if PY_VERSION_HEX >= 0x02060000 0, /*tp_version_tag*/ #endif #if PY_VERSION_HEX >= 0x030400a1 0, /*tp_finalize*/ #endif }; static struct __pyx_vtabstruct_6pandas_5index_Int64Engine __pyx_vtable_6pandas_5index_Int64Engine; static PyObject *__pyx_tp_new_6pandas_5index_Int64Engine(PyTypeObject *t, PyObject *a, PyObject *k) { struct __pyx_obj_6pandas_5index_Int64Engine *p; PyObject *o = __pyx_tp_new_6pandas_5index_IndexEngine(t, a, k); if (unlikely(!o)) return 0; p = ((struct __pyx_obj_6pandas_5index_Int64Engine *)o); p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_6pandas_5index_IndexEngine*)__pyx_vtabptr_6pandas_5index_Int64Engine; return o; } static PyMethodDef __pyx_methods_6pandas_5index_Int64Engine[] = { {__Pyx_NAMESTR("_call_monotonic"), (PyCFunction)__pyx_pw_6pandas_5index_11Int64Engine_1_call_monotonic, METH_O, __Pyx_DOCSTR(0)}, {__Pyx_NAMESTR("get_pad_indexer"), (PyCFunction)__pyx_pw_6pandas_5index_11Int64Engine_3get_pad_indexer, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}, {__Pyx_NAMESTR("get_backfill_indexer"), (PyCFunction)__pyx_pw_6pandas_5index_11Int64Engine_5get_backfill_indexer, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}, {0, 0, 0, 0} }; static PyTypeObject __pyx_type_6pandas_5index_Int64Engine = { PyVarObject_HEAD_INIT(0, 0) __Pyx_NAMESTR("pandas.index.Int64Engine"), /*tp_name*/ sizeof(struct __pyx_obj_6pandas_5index_Int64Engine), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_6pandas_5index_IndexEngine, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #else 0, /*reserved*/ #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*/ 0, /*tp_doc*/ __pyx_tp_traverse_6pandas_5index_IndexEngine, /*tp_traverse*/ __pyx_tp_clear_6pandas_5index_IndexEngine, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_6pandas_5index_Int64Engine, /*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_5index_11IndexEngine_1__init__, /*tp_init*/ #else 0, /*tp_init*/ #endif 0, /*tp_alloc*/ __pyx_tp_new_6pandas_5index_Int64Engine, /*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*/ #if PY_VERSION_HEX >= 0x02060000 0, /*tp_version_tag*/ #endif #if PY_VERSION_HEX >= 0x030400a1 0, /*tp_finalize*/ #endif }; static struct __pyx_vtabstruct_6pandas_5index_ObjectEngine __pyx_vtable_6pandas_5index_ObjectEngine; static PyObject *__pyx_tp_new_6pandas_5index_ObjectEngine(PyTypeObject *t, PyObject *a, PyObject *k) { struct __pyx_obj_6pandas_5index_ObjectEngine *p; PyObject *o = __pyx_tp_new_6pandas_5index_IndexEngine(t, a, k); if (unlikely(!o)) return 0; p = ((struct __pyx_obj_6pandas_5index_ObjectEngine *)o); p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_6pandas_5index_IndexEngine*)__pyx_vtabptr_6pandas_5index_ObjectEngine; return o; } static PyMethodDef __pyx_methods_6pandas_5index_ObjectEngine[] = { {__Pyx_NAMESTR("_call_monotonic"), (PyCFunction)__pyx_pw_6pandas_5index_12ObjectEngine_1_call_monotonic, METH_O, __Pyx_DOCSTR(0)}, {__Pyx_NAMESTR("get_pad_indexer"), (PyCFunction)__pyx_pw_6pandas_5index_12ObjectEngine_3get_pad_indexer, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}, {__Pyx_NAMESTR("get_backfill_indexer"), (PyCFunction)__pyx_pw_6pandas_5index_12ObjectEngine_5get_backfill_indexer, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}, {0, 0, 0, 0} }; static PyTypeObject __pyx_type_6pandas_5index_ObjectEngine = { PyVarObject_HEAD_INIT(0, 0) __Pyx_NAMESTR("pandas.index.ObjectEngine"), /*tp_name*/ sizeof(struct __pyx_obj_6pandas_5index_ObjectEngine), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_6pandas_5index_IndexEngine, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #else 0, /*reserved*/ #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*/ 0, /*tp_doc*/ __pyx_tp_traverse_6pandas_5index_IndexEngine, /*tp_traverse*/ __pyx_tp_clear_6pandas_5index_IndexEngine, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_6pandas_5index_ObjectEngine, /*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_5index_11IndexEngine_1__init__, /*tp_init*/ #else 0, /*tp_init*/ #endif 0, /*tp_alloc*/ __pyx_tp_new_6pandas_5index_ObjectEngine, /*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*/ #if PY_VERSION_HEX >= 0x02060000 0, /*tp_version_tag*/ #endif #if PY_VERSION_HEX >= 0x030400a1 0, /*tp_finalize*/ #endif }; static struct __pyx_vtabstruct_6pandas_5index_DatetimeEngine __pyx_vtable_6pandas_5index_DatetimeEngine; static PyObject *__pyx_tp_new_6pandas_5index_DatetimeEngine(PyTypeObject *t, PyObject *a, PyObject *k) { struct __pyx_obj_6pandas_5index_DatetimeEngine *p; PyObject *o = __pyx_tp_new_6pandas_5index_Int64Engine(t, a, k); if (unlikely(!o)) return 0; p = ((struct __pyx_obj_6pandas_5index_DatetimeEngine *)o); p->__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_6pandas_5index_IndexEngine*)__pyx_vtabptr_6pandas_5index_DatetimeEngine; return o; } static PyMethodDef __pyx_methods_6pandas_5index_DatetimeEngine[] = { {__Pyx_NAMESTR("_call_monotonic"), (PyCFunction)__pyx_pw_6pandas_5index_14DatetimeEngine_3_call_monotonic, METH_O, __Pyx_DOCSTR(0)}, {__Pyx_NAMESTR("get_loc"), (PyCFunction)__pyx_pw_6pandas_5index_14DatetimeEngine_5get_loc, METH_O, __Pyx_DOCSTR(0)}, {__Pyx_NAMESTR("get_indexer"), (PyCFunction)__pyx_pw_6pandas_5index_14DatetimeEngine_7get_indexer, METH_O, __Pyx_DOCSTR(0)}, {__Pyx_NAMESTR("get_pad_indexer"), (PyCFunction)__pyx_pw_6pandas_5index_14DatetimeEngine_9get_pad_indexer, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}, {__Pyx_NAMESTR("get_backfill_indexer"), (PyCFunction)__pyx_pw_6pandas_5index_14DatetimeEngine_11get_backfill_indexer, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}, {0, 0, 0, 0} }; static PySequenceMethods __pyx_tp_as_sequence_DatetimeEngine = { 0, /*sq_length*/ 0, /*sq_concat*/ 0, /*sq_repeat*/ 0, /*sq_item*/ 0, /*sq_slice*/ 0, /*sq_ass_item*/ 0, /*sq_ass_slice*/ __pyx_pw_6pandas_5index_14DatetimeEngine_1__contains__, /*sq_contains*/ 0, /*sq_inplace_concat*/ 0, /*sq_inplace_repeat*/ }; static PyTypeObject __pyx_type_6pandas_5index_DatetimeEngine = { PyVarObject_HEAD_INIT(0, 0) __Pyx_NAMESTR("pandas.index.DatetimeEngine"), /*tp_name*/ sizeof(struct __pyx_obj_6pandas_5index_DatetimeEngine), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_6pandas_5index_IndexEngine, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #else 0, /*reserved*/ #endif 0, /*tp_repr*/ 0, /*tp_as_number*/ &__pyx_tp_as_sequence_DatetimeEngine, /*tp_as_sequence*/ 0, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ 0, /*tp_doc*/ __pyx_tp_traverse_6pandas_5index_IndexEngine, /*tp_traverse*/ __pyx_tp_clear_6pandas_5index_IndexEngine, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_6pandas_5index_DatetimeEngine, /*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_5index_11IndexEngine_1__init__, /*tp_init*/ #else 0, /*tp_init*/ #endif 0, /*tp_alloc*/ __pyx_tp_new_6pandas_5index_DatetimeEngine, /*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*/ #if PY_VERSION_HEX >= 0x02060000 0, /*tp_version_tag*/ #endif #if PY_VERSION_HEX >= 0x030400a1 0, /*tp_finalize*/ #endif }; static PyMethodDef __pyx_methods[] = { {__Pyx_NAMESTR("convert_scalar"), (PyCFunction)__pyx_pw_6pandas_5index_5convert_scalar, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}, {0, 0, 0, 0} }; #if PY_MAJOR_VERSION >= 3 static struct PyModuleDef __pyx_moduledef = { #if PY_VERSION_HEX < 0x03020000 { PyObject_HEAD_INIT(NULL) NULL, 0, NULL }, #else PyModuleDef_HEAD_INIT, #endif __Pyx_NAMESTR("index"), 0, /* m_doc */ -1, /* m_size */ __pyx_methods /* m_methods */, NULL, /* m_reload */ NULL, /* m_traverse */ NULL, /* m_clear */ NULL /* m_free */ }; #endif static __Pyx_StringTabEntry __pyx_string_tab[] = { {&__pyx_n_s_AttributeError, __pyx_k_AttributeError, sizeof(__pyx_k_AttributeError), 0, 0, 1, 1}, {&__pyx_kp_s_Cannot_assign_nan_to_integer_ser, __pyx_k_Cannot_assign_nan_to_integer_ser, sizeof(__pyx_k_Cannot_assign_nan_to_integer_ser), 0, 0, 1, 0}, {&__pyx_n_s_Float64HashTable, __pyx_k_Float64HashTable, sizeof(__pyx_k_Float64HashTable), 0, 0, 1, 1}, {&__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_n_s_IndexError, __pyx_k_IndexError, sizeof(__pyx_k_IndexError), 0, 0, 1, 1}, {&__pyx_n_s_Int64HashTable, __pyx_k_Int64HashTable, sizeof(__pyx_k_Int64HashTable), 0, 0, 1, 1}, {&__pyx_n_s_KeyError, __pyx_k_KeyError, sizeof(__pyx_k_KeyError), 0, 0, 1, 1}, {&__pyx_kp_s_M8_ns, __pyx_k_M8_ns, sizeof(__pyx_k_M8_ns), 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_PyObjectHashTable, __pyx_k_PyObjectHashTable, sizeof(__pyx_k_PyObjectHashTable), 0, 0, 1, 1}, {&__pyx_n_s_RuntimeError, __pyx_k_RuntimeError, sizeof(__pyx_k_RuntimeError), 0, 0, 1, 1}, {&__pyx_n_s_SIZE_CUTOFF, __pyx_k_SIZE_CUTOFF, sizeof(__pyx_k_SIZE_CUTOFF), 0, 0, 1, 1}, {&__pyx_n_s_Timestamp, __pyx_k_Timestamp, sizeof(__pyx_k_Timestamp), 0, 0, 1, 1}, {&__pyx_n_s_TypeError, __pyx_k_TypeError, sizeof(__pyx_k_TypeError), 0, 0, 1, 1}, {&__pyx_n_s_UTC, __pyx_k_UTC, sizeof(__pyx_k_UTC), 0, 0, 1, 1}, {&__pyx_kp_s_Unable_to_parse_s, __pyx_k_Unable_to_parse_s, sizeof(__pyx_k_Unable_to_parse_s), 0, 0, 1, 0}, {&__pyx_n_s_ValueError, __pyx_k_ValueError, sizeof(__pyx_k_ValueError), 0, 0, 1, 1}, {&__pyx_n_s_algos, __pyx_k_algos, sizeof(__pyx_k_algos), 0, 0, 1, 1}, {&__pyx_n_s_append, __pyx_k_append, sizeof(__pyx_k_append), 0, 0, 1, 1}, {&__pyx_n_s_arr, __pyx_k_arr, sizeof(__pyx_k_arr), 0, 0, 1, 1}, {&__pyx_n_s_asarray, __pyx_k_asarray, sizeof(__pyx_k_asarray), 0, 0, 1, 1}, {&__pyx_n_s_astype, __pyx_k_astype, sizeof(__pyx_k_astype), 0, 0, 1, 1}, {&__pyx_n_s_backfill_float64, __pyx_k_backfill_float64, sizeof(__pyx_k_backfill_float64), 0, 0, 1, 1}, {&__pyx_n_s_backfill_functions, __pyx_k_backfill_functions, sizeof(__pyx_k_backfill_functions), 0, 0, 1, 1}, {&__pyx_n_s_backfill_int64, __pyx_k_backfill_int64, sizeof(__pyx_k_backfill_int64), 0, 0, 1, 1}, {&__pyx_n_s_backfill_object, __pyx_k_backfill_object, sizeof(__pyx_k_backfill_object), 0, 0, 1, 1}, {&__pyx_n_s_bool, __pyx_k_bool, sizeof(__pyx_k_bool), 0, 0, 1, 1}, {&__pyx_n_s_call_monotonic, __pyx_k_call_monotonic, sizeof(__pyx_k_call_monotonic), 0, 0, 1, 1}, {&__pyx_n_s_data, __pyx_k_data, sizeof(__pyx_k_data), 0, 0, 1, 1}, {&__pyx_n_s_dateutil_tz, __pyx_k_dateutil_tz, sizeof(__pyx_k_dateutil_tz), 0, 0, 1, 1}, {&__pyx_n_s_day, __pyx_k_day, sizeof(__pyx_k_day), 0, 0, 1, 1}, {&__pyx_n_s_delta_to_nanoseconds, __pyx_k_delta_to_nanoseconds, sizeof(__pyx_k_delta_to_nanoseconds), 0, 0, 1, 1}, {&__pyx_n_s_dtype, __pyx_k_dtype, sizeof(__pyx_k_dtype), 0, 0, 1, 1}, {&__pyx_n_s_du_utc, __pyx_k_du_utc, sizeof(__pyx_k_du_utc), 0, 0, 1, 1}, {&__pyx_n_s_empty, __pyx_k_empty, sizeof(__pyx_k_empty), 0, 0, 1, 1}, {&__pyx_n_s_ensure_int64, __pyx_k_ensure_int64, sizeof(__pyx_k_ensure_int64), 0, 0, 1, 1}, {&__pyx_n_s_float64, __pyx_k_float64, sizeof(__pyx_k_float64), 0, 0, 1, 1}, {&__pyx_n_s_get_item, __pyx_k_get_item, sizeof(__pyx_k_get_item), 0, 0, 1, 1}, {&__pyx_n_s_get_loc, __pyx_k_get_loc, sizeof(__pyx_k_get_loc), 0, 0, 1, 1}, {&__pyx_n_s_get_utcoffset, __pyx_k_get_utcoffset, sizeof(__pyx_k_get_utcoffset), 0, 0, 1, 1}, {&__pyx_n_s_get_value, __pyx_k_get_value, sizeof(__pyx_k_get_value), 0, 0, 1, 1}, {&__pyx_n_s_get_value_at, __pyx_k_get_value_at, sizeof(__pyx_k_get_value_at), 0, 0, 1, 1}, {&__pyx_n_s_hash, __pyx_k_hash, sizeof(__pyx_k_hash), 0, 0, 1, 1}, {&__pyx_n_s_hashtable, __pyx_k_hashtable, sizeof(__pyx_k_hashtable), 0, 0, 1, 1}, {&__pyx_n_s_have_pytz, __pyx_k_have_pytz, sizeof(__pyx_k_have_pytz), 0, 0, 1, 1}, {&__pyx_kp_s_home_yoh_deb_gits_pkg_exppsy_pa, __pyx_k_home_yoh_deb_gits_pkg_exppsy_pa, sizeof(__pyx_k_home_yoh_deb_gits_pkg_exppsy_pa), 0, 0, 1, 0}, {&__pyx_n_s_hour, __pyx_k_hour, sizeof(__pyx_k_hour), 0, 0, 1, 1}, {&__pyx_n_s_i4, __pyx_k_i4, sizeof(__pyx_k_i4), 0, 0, 1, 1}, {&__pyx_n_s_i8, __pyx_k_i8, sizeof(__pyx_k_i8), 0, 0, 1, 1}, {&__pyx_n_s_import, __pyx_k_import, sizeof(__pyx_k_import), 0, 0, 1, 1}, {&__pyx_kp_s_index_out_of_bounds, __pyx_k_index_out_of_bounds, sizeof(__pyx_k_index_out_of_bounds), 0, 0, 1, 0}, {&__pyx_n_s_inf, __pyx_k_inf, sizeof(__pyx_k_inf), 0, 0, 1, 1}, {&__pyx_n_s_int64, __pyx_k_int64, sizeof(__pyx_k_int64), 0, 0, 1, 1}, {&__pyx_n_s_integer, __pyx_k_integer, sizeof(__pyx_k_integer), 0, 0, 1, 1}, {&__pyx_n_s_is_monotonic, __pyx_k_is_monotonic, sizeof(__pyx_k_is_monotonic), 0, 0, 1, 1}, {&__pyx_n_s_is_monotonic_float64, __pyx_k_is_monotonic_float64, sizeof(__pyx_k_is_monotonic_float64), 0, 0, 1, 1}, {&__pyx_n_s_is_monotonic_int64, __pyx_k_is_monotonic_int64, sizeof(__pyx_k_is_monotonic_int64), 0, 0, 1, 1}, {&__pyx_n_s_is_monotonic_object, __pyx_k_is_monotonic_object, sizeof(__pyx_k_is_monotonic_object), 0, 0, 1, 1}, {&__pyx_n_s_is_unique, __pyx_k_is_unique, sizeof(__pyx_k_is_unique), 0, 0, 1, 1}, {&__pyx_n_s_key, __pyx_k_key, sizeof(__pyx_k_key), 0, 0, 1, 1}, {&__pyx_n_s_left, __pyx_k_left, sizeof(__pyx_k_left), 0, 0, 1, 1}, {&__pyx_n_s_limit, __pyx_k_limit, sizeof(__pyx_k_limit), 0, 0, 1, 1}, {&__pyx_n_s_loc, __pyx_k_loc, sizeof(__pyx_k_loc), 0, 0, 1, 1}, {&__pyx_n_s_lookup, __pyx_k_lookup, sizeof(__pyx_k_lookup), 0, 0, 1, 1}, {&__pyx_n_s_main, __pyx_k_main, sizeof(__pyx_k_main), 0, 0, 1, 1}, {&__pyx_n_s_map_locations, __pyx_k_map_locations, sizeof(__pyx_k_map_locations), 0, 0, 1, 1}, {&__pyx_n_s_microsecond, __pyx_k_microsecond, sizeof(__pyx_k_microsecond), 0, 0, 1, 1}, {&__pyx_n_s_minute, __pyx_k_minute, sizeof(__pyx_k_minute), 0, 0, 1, 1}, {&__pyx_n_s_month, __pyx_k_month, sizeof(__pyx_k_month), 0, 0, 1, 1}, {&__pyx_n_s_n, __pyx_k_n, sizeof(__pyx_k_n), 0, 0, 1, 1}, {&__pyx_n_s_ndarray, __pyx_k_ndarray, sizeof(__pyx_k_ndarray), 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_np, __pyx_k_np, sizeof(__pyx_k_np), 0, 0, 1, 1}, {&__pyx_n_s_numpy, __pyx_k_numpy, sizeof(__pyx_k_numpy), 0, 0, 1, 1}, {&__pyx_n_s_object, __pyx_k_object, sizeof(__pyx_k_object), 0, 0, 1, 1}, {&__pyx_n_s_other, __pyx_k_other, sizeof(__pyx_k_other), 0, 0, 1, 1}, {&__pyx_n_s_pad_float64, __pyx_k_pad_float64, sizeof(__pyx_k_pad_float64), 0, 0, 1, 1}, {&__pyx_n_s_pad_functions, __pyx_k_pad_functions, sizeof(__pyx_k_pad_functions), 0, 0, 1, 1}, {&__pyx_n_s_pad_int64, __pyx_k_pad_int64, sizeof(__pyx_k_pad_int64), 0, 0, 1, 1}, {&__pyx_n_s_pad_object, __pyx_k_pad_object, sizeof(__pyx_k_pad_object), 0, 0, 1, 1}, {&__pyx_n_s_pandas, __pyx_k_pandas, sizeof(__pyx_k_pandas), 0, 0, 1, 1}, {&__pyx_n_s_pandas_index, __pyx_k_pandas_index, sizeof(__pyx_k_pandas_index), 0, 0, 1, 1}, {&__pyx_n_s_pandas_tslib, __pyx_k_pandas_tslib, sizeof(__pyx_k_pandas_tslib), 0, 0, 1, 1}, {&__pyx_n_s_pytz, __pyx_k_pytz, sizeof(__pyx_k_pytz), 0, 0, 1, 1}, {&__pyx_n_s_pyx_getbuffer, __pyx_k_pyx_getbuffer, sizeof(__pyx_k_pyx_getbuffer), 0, 0, 1, 1}, {&__pyx_n_s_pyx_releasebuffer, __pyx_k_pyx_releasebuffer, sizeof(__pyx_k_pyx_releasebuffer), 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_repeat, __pyx_k_repeat, sizeof(__pyx_k_repeat), 0, 0, 1, 1}, {&__pyx_n_s_resize, __pyx_k_resize, sizeof(__pyx_k_resize), 0, 0, 1, 1}, {&__pyx_n_s_right, __pyx_k_right, sizeof(__pyx_k_right), 0, 0, 1, 1}, {&__pyx_n_s_searchsorted, __pyx_k_searchsorted, sizeof(__pyx_k_searchsorted), 0, 0, 1, 1}, {&__pyx_n_s_second, __pyx_k_second, sizeof(__pyx_k_second), 0, 0, 1, 1}, {&__pyx_n_s_set_value, __pyx_k_set_value, sizeof(__pyx_k_set_value), 0, 0, 1, 1}, {&__pyx_n_s_set_value_at, __pyx_k_set_value_at, sizeof(__pyx_k_set_value_at), 0, 0, 1, 1}, {&__pyx_n_s_side, __pyx_k_side, sizeof(__pyx_k_side), 0, 0, 1, 1}, {&__pyx_n_s_test, __pyx_k_test, sizeof(__pyx_k_test), 0, 0, 1, 1}, {&__pyx_n_s_tslib, __pyx_k_tslib, sizeof(__pyx_k_tslib), 0, 0, 1, 1}, {&__pyx_n_s_type, __pyx_k_type, sizeof(__pyx_k_type), 0, 0, 1, 1}, {&__pyx_n_s_tzinfo, __pyx_k_tzinfo, sizeof(__pyx_k_tzinfo), 0, 0, 1, 1}, {&__pyx_n_s_tzutc, __pyx_k_tzutc, sizeof(__pyx_k_tzutc), 0, 0, 1, 1}, {&__pyx_n_s_uint8, __pyx_k_uint8, sizeof(__pyx_k_uint8), 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_utc, __pyx_k_utc, sizeof(__pyx_k_utc), 0, 0, 1, 1}, {&__pyx_n_s_val, __pyx_k_val, sizeof(__pyx_k_val), 0, 0, 1, 1}, {&__pyx_n_s_value, __pyx_k_value, sizeof(__pyx_k_value), 0, 0, 1, 1}, {&__pyx_n_s_vgetter, __pyx_k_vgetter, sizeof(__pyx_k_vgetter), 0, 0, 1, 1}, {&__pyx_n_s_view, __pyx_k_view, sizeof(__pyx_k_view), 0, 0, 1, 1}, {&__pyx_n_s_year, __pyx_k_year, sizeof(__pyx_k_year), 0, 0, 1, 1}, {0, 0, 0, 0, 0, 0, 0} }; static int __Pyx_InitCachedBuiltins(void) { __pyx_builtin_ImportError = __Pyx_GetBuiltinName(__pyx_n_s_ImportError); if (!__pyx_builtin_ImportError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 37; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_builtin_TypeError = __Pyx_GetBuiltinName(__pyx_n_s_TypeError); if (!__pyx_builtin_TypeError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 50; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_builtin_KeyError = __Pyx_GetBuiltinName(__pyx_n_s_KeyError); if (!__pyx_builtin_KeyError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 139; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_range) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 186; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_builtin_NotImplementedError = __Pyx_GetBuiltinName(__pyx_n_s_NotImplementedError); if (!__pyx_builtin_NotImplementedError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 237; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_builtin_AttributeError = __Pyx_GetBuiltinName(__pyx_n_s_AttributeError); if (!__pyx_builtin_AttributeError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 511; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_builtin_ValueError = __Pyx_GetBuiltinName(__pyx_n_s_ValueError); if (!__pyx_builtin_ValueError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 561; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_builtin_RuntimeError = __Pyx_GetBuiltinName(__pyx_n_s_RuntimeError); if (!__pyx_builtin_RuntimeError) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 803; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_builtin_IndexError = __Pyx_GetBuiltinName(__pyx_n_s_IndexError); if (!__pyx_builtin_IndexError) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 40; __pyx_clineno = __LINE__; goto __pyx_L1_error;} return 0; __pyx_L1_error:; return -1; } static int __Pyx_InitCachedConstants(void) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0); /* "pandas/index.pyx":480 * * cdef _get_index_values(self): * return self.vgetter().view('i8') # <<<<<<<<<<<<<< * * def _call_monotonic(self, values): */ __pyx_tuple_ = PyTuple_Pack(1, __pyx_n_s_i8); if (unlikely(!__pyx_tuple_)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 480; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple_); __Pyx_GIVEREF(__pyx_tuple_); /* "pandas/index.pyx":529 * self._ensure_mapping_populated() * if values.dtype != 'M8[ns]': * return np.repeat(-1, len(values)).astype('i4') # <<<<<<<<<<<<<< * values = np.asarray(values).view('i8') * return self.mapping.lookup(values) */ __pyx_tuple__2 = PyTuple_Pack(1, __pyx_n_s_i4); if (unlikely(!__pyx_tuple__2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 529; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__2); __Pyx_GIVEREF(__pyx_tuple__2); /* "pandas/index.pyx":530 * if values.dtype != 'M8[ns]': * return np.repeat(-1, len(values)).astype('i4') * values = np.asarray(values).view('i8') # <<<<<<<<<<<<<< * return self.mapping.lookup(values) * */ __pyx_tuple__3 = PyTuple_Pack(1, __pyx_n_s_i8); if (unlikely(!__pyx_tuple__3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 530; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__3); __Pyx_GIVEREF(__pyx_tuple__3); /* "pandas/index.pyx":535 * def get_pad_indexer(self, other, limit=None): * if other.dtype != 'M8[ns]': * return np.repeat(-1, len(other)).astype('i4') # <<<<<<<<<<<<<< * other = np.asarray(other).view('i8') * return algos.pad_int64(self._get_index_values(), other, */ __pyx_tuple__4 = PyTuple_Pack(1, __pyx_n_s_i4); if (unlikely(!__pyx_tuple__4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 535; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__4); __Pyx_GIVEREF(__pyx_tuple__4); /* "pandas/index.pyx":536 * if other.dtype != 'M8[ns]': * return np.repeat(-1, len(other)).astype('i4') * other = np.asarray(other).view('i8') # <<<<<<<<<<<<<< * return algos.pad_int64(self._get_index_values(), other, * limit=limit) */ __pyx_tuple__5 = PyTuple_Pack(1, __pyx_n_s_i8); if (unlikely(!__pyx_tuple__5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 536; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__5); __Pyx_GIVEREF(__pyx_tuple__5); /* "pandas/index.pyx":542 * def get_backfill_indexer(self, other, limit=None): * if other.dtype != 'M8[ns]': * return np.repeat(-1, len(other)).astype('i4') # <<<<<<<<<<<<<< * other = np.asarray(other).view('i8') * return algos.backfill_int64(self._get_index_values(), other, */ __pyx_tuple__6 = PyTuple_Pack(1, __pyx_n_s_i4); if (unlikely(!__pyx_tuple__6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 542; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__6); __Pyx_GIVEREF(__pyx_tuple__6); /* "pandas/index.pyx":543 * if other.dtype != 'M8[ns]': * return np.repeat(-1, len(other)).astype('i4') * other = np.asarray(other).view('i8') # <<<<<<<<<<<<<< * return algos.backfill_int64(self._get_index_values(), other, * limit=limit) */ __pyx_tuple__7 = PyTuple_Pack(1, __pyx_n_s_i8); if (unlikely(!__pyx_tuple__7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 543; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__7); __Pyx_GIVEREF(__pyx_tuple__7); /* "pandas/index.pyx":561 * if issubclass(arr.dtype.type, (np.integer, np.bool_)): * if util.is_float_object(value) and value != value: * raise ValueError('Cannot assign nan to integer series') # <<<<<<<<<<<<<< * * return value */ __pyx_tuple__8 = PyTuple_Pack(1, __pyx_kp_s_Cannot_assign_nan_to_integer_ser); if (unlikely(!__pyx_tuple__8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 561; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__8); __Pyx_GIVEREF(__pyx_tuple__8); /* "numpy.pxd":217 * 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__9 = PyTuple_Pack(1, __pyx_kp_u_ndarray_is_not_C_contiguous); if (unlikely(!__pyx_tuple__9)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 217; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__9); __Pyx_GIVEREF(__pyx_tuple__9); /* "numpy.pxd":221 * 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__10 = PyTuple_Pack(1, __pyx_kp_u_ndarray_is_not_Fortran_contiguou); if (unlikely(!__pyx_tuple__10)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 221; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__10); __Pyx_GIVEREF(__pyx_tuple__10); /* "numpy.pxd":259 * if ((descr.byteorder == '>' and little_endian) or * (descr.byteorder == '<' 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__11 = PyTuple_Pack(1, __pyx_kp_u_Non_native_byte_order_not_suppor); if (unlikely(!__pyx_tuple__11)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 259; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__11); __Pyx_GIVEREF(__pyx_tuple__11); /* "numpy.pxd":803 * * if (end - f) - (new_offset - offset[0]) < 15: * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") # <<<<<<<<<<<<<< * * if ((child.byteorder == '>' and little_endian) or */ __pyx_tuple__12 = PyTuple_Pack(1, __pyx_kp_u_Format_string_allocated_too_shor); if (unlikely(!__pyx_tuple__12)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 803; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__12); __Pyx_GIVEREF(__pyx_tuple__12); /* "numpy.pxd":807 * if ((child.byteorder == '>' and little_endian) or * (child.byteorder == '<' 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__13 = PyTuple_Pack(1, __pyx_kp_u_Non_native_byte_order_not_suppor); if (unlikely(!__pyx_tuple__13)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 807; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__13); __Pyx_GIVEREF(__pyx_tuple__13); /* "numpy.pxd":827 * 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__14 = PyTuple_Pack(1, __pyx_kp_u_Format_string_allocated_too_shor_2); if (unlikely(!__pyx_tuple__14)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 827; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__14); __Pyx_GIVEREF(__pyx_tuple__14); /* "util.pxd":40 * i += sz * elif i >= sz or sz == 0: * raise IndexError('index out of bounds') # <<<<<<<<<<<<<< * * return get_value_1d(arr, i) */ __pyx_tuple__15 = PyTuple_Pack(1, __pyx_kp_s_index_out_of_bounds); if (unlikely(!__pyx_tuple__15)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 40; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__15); __Pyx_GIVEREF(__pyx_tuple__15); /* "util.pxd":57 * i += sz * elif i >= sz: * raise IndexError('index out of bounds') # <<<<<<<<<<<<<< * * assign_value_1d(arr, i, value) */ __pyx_tuple__16 = PyTuple_Pack(1, __pyx_kp_s_index_out_of_bounds); if (unlikely(!__pyx_tuple__16)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 57; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__16); __Pyx_GIVEREF(__pyx_tuple__16); __pyx_tuple__17 = PyTuple_Pack(2, __pyx_n_s_arr, __pyx_n_s_loc); if (unlikely(!__pyx_tuple__17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 57; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__17); __Pyx_GIVEREF(__pyx_tuple__17); __pyx_codeobj__18 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__17, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_yoh_deb_gits_pkg_exppsy_pa, __pyx_n_s_get_value_at, 57, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 57; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/index.pyx":62 * return util.get_value_at(arr, loc) * * def set_value_at(ndarray arr, object loc, object val): # <<<<<<<<<<<<<< * return util.set_value_at(arr, loc, val) * */ __pyx_tuple__19 = PyTuple_Pack(3, __pyx_n_s_arr, __pyx_n_s_loc, __pyx_n_s_val); if (unlikely(!__pyx_tuple__19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__19); __Pyx_GIVEREF(__pyx_tuple__19); __pyx_codeobj__20 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__19, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_yoh_deb_gits_pkg_exppsy_pa, __pyx_n_s_set_value_at, 62, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__20)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __pyx_int_15 = PyInt_FromLong(15); if (unlikely(!__pyx_int_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_int_1000000 = PyInt_FromLong(1000000L); if (unlikely(!__pyx_int_1000000)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_int_neg_1 = PyInt_FromLong(-1); if (unlikely(!__pyx_int_neg_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} return 0; __pyx_L1_error:; return -1; } #if PY_MAJOR_VERSION < 3 PyMODINIT_FUNC initindex(void); /*proto*/ PyMODINIT_FUNC initindex(void) #else PyMODINIT_FUNC PyInit_index(void); /*proto*/ PyMODINIT_FUNC PyInit_index(void) #endif { PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; int __pyx_t_6; PyObject *__pyx_t_7 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannyDeclarations #if CYTHON_REFNANNY __Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny"); if (!__Pyx_RefNanny) { PyErr_Clear(); __Pyx_RefNanny = __Pyx_RefNannyImportAPI("Cython.Runtime.refnanny"); if (!__Pyx_RefNanny) Py_FatalError("failed to import 'refnanny' module"); } #endif __Pyx_RefNannySetupContext("PyMODINIT_FUNC PyInit_index(void)", 0); if ( __Pyx_check_binary_version() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_empty_tuple)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_bytes)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #ifdef __Pyx_CyFunction_USED if (__Pyx_CyFunction_init() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif #ifdef __Pyx_FusedFunction_USED if (__pyx_FusedFunction_init() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif #ifdef __Pyx_Generator_USED if (__pyx_Generator_init() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif /*--- Library function declarations ---*/ /*--- Threads initialization code ---*/ #if defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS #ifdef WITH_THREAD /* Python build with threading support? */ PyEval_InitThreads(); #endif #endif /*--- Module creation code ---*/ #if PY_MAJOR_VERSION < 3 __pyx_m = Py_InitModule4(__Pyx_NAMESTR("index"), __pyx_methods, 0, 0, PYTHON_API_VERSION); Py_XINCREF(__pyx_m); #else __pyx_m = PyModule_Create(&__pyx_moduledef); #endif if (unlikely(!__pyx_m)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_d)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} Py_INCREF(__pyx_d); __pyx_b = PyImport_AddModule(__Pyx_NAMESTR(__Pyx_BUILTIN_MODULE_NAME)); if (unlikely(!__pyx_b)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #if CYTHON_COMPILING_IN_PYPY Py_INCREF(__pyx_b); #endif if (__Pyx_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; /*--- Initialize various global constants etc. ---*/ if (unlikely(__Pyx_InitGlobals() < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif if (__pyx_module_is_main_pandas__index) { if (__Pyx_SetAttrString(__pyx_m, "__name__", __pyx_n_s_main) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; } #if PY_MAJOR_VERSION >= 3 { PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (!PyDict_GetItemString(modules, "pandas.index")) { if (unlikely(PyDict_SetItemString(modules, "pandas.index", __pyx_m) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } } #endif /*--- Builtin init code ---*/ if (unlikely(__Pyx_InitCachedBuiltins() < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /*--- Constants init code ---*/ if (unlikely(__Pyx_InitCachedConstants() < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /*--- Global init code ---*/ /*--- Variable export code ---*/ /*--- Function export code ---*/ /*--- Type init code ---*/ __pyx_vtabptr_6pandas_5index_IndexEngine = &__pyx_vtable_6pandas_5index_IndexEngine; __pyx_vtable_6pandas_5index_IndexEngine.get_value = (PyObject *(*)(struct __pyx_obj_6pandas_5index_IndexEngine *, PyArrayObject *, PyObject *, int __pyx_skip_dispatch))__pyx_f_6pandas_5index_11IndexEngine_get_value; __pyx_vtable_6pandas_5index_IndexEngine.set_value = (PyObject *(*)(struct __pyx_obj_6pandas_5index_IndexEngine *, PyArrayObject *, PyObject *, PyObject *, int __pyx_skip_dispatch))__pyx_f_6pandas_5index_11IndexEngine_set_value; __pyx_vtable_6pandas_5index_IndexEngine.get_loc = (PyObject *(*)(struct __pyx_obj_6pandas_5index_IndexEngine *, PyObject *, int __pyx_skip_dispatch))__pyx_f_6pandas_5index_11IndexEngine_get_loc; __pyx_vtable_6pandas_5index_IndexEngine._get_loc_duplicates = (PyObject *(*)(struct __pyx_obj_6pandas_5index_IndexEngine *, PyObject *))__pyx_f_6pandas_5index_11IndexEngine__get_loc_duplicates; __pyx_vtable_6pandas_5index_IndexEngine._maybe_get_bool_indexer = (PyObject *(*)(struct __pyx_obj_6pandas_5index_IndexEngine *, PyObject *))__pyx_f_6pandas_5index_11IndexEngine__maybe_get_bool_indexer; __pyx_vtable_6pandas_5index_IndexEngine._do_monotonic_check = (PyObject *(*)(struct __pyx_obj_6pandas_5index_IndexEngine *))__pyx_f_6pandas_5index_11IndexEngine__do_monotonic_check; __pyx_vtable_6pandas_5index_IndexEngine._get_index_values = (PyObject *(*)(struct __pyx_obj_6pandas_5index_IndexEngine *))__pyx_f_6pandas_5index_11IndexEngine__get_index_values; __pyx_vtable_6pandas_5index_IndexEngine._do_unique_check = (PyObject *(*)(struct __pyx_obj_6pandas_5index_IndexEngine *))__pyx_f_6pandas_5index_11IndexEngine__do_unique_check; __pyx_vtable_6pandas_5index_IndexEngine._make_hash_table = (PyObject *(*)(struct __pyx_obj_6pandas_5index_IndexEngine *, PyObject *))__pyx_f_6pandas_5index_11IndexEngine__make_hash_table; __pyx_vtable_6pandas_5index_IndexEngine._check_type = (PyObject *(*)(struct __pyx_obj_6pandas_5index_IndexEngine *, PyObject *))__pyx_f_6pandas_5index_11IndexEngine__check_type; __pyx_vtable_6pandas_5index_IndexEngine._ensure_mapping_populated = (PyObject *(*)(struct __pyx_obj_6pandas_5index_IndexEngine *))__pyx_f_6pandas_5index_11IndexEngine__ensure_mapping_populated; __pyx_vtable_6pandas_5index_IndexEngine.initialize = (PyObject *(*)(struct __pyx_obj_6pandas_5index_IndexEngine *))__pyx_f_6pandas_5index_11IndexEngine_initialize; if (PyType_Ready(&__pyx_type_6pandas_5index_IndexEngine) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_type_6pandas_5index_IndexEngine.tp_print = 0; if (__Pyx_SetVtable(__pyx_type_6pandas_5index_IndexEngine.tp_dict, __pyx_vtabptr_6pandas_5index_IndexEngine) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__Pyx_SetAttrString(__pyx_m, "IndexEngine", (PyObject *)&__pyx_type_6pandas_5index_IndexEngine) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_6pandas_5index_IndexEngine = &__pyx_type_6pandas_5index_IndexEngine; __pyx_vtabptr_6pandas_5index_Float64Engine = &__pyx_vtable_6pandas_5index_Float64Engine; __pyx_vtable_6pandas_5index_Float64Engine.__pyx_base = *__pyx_vtabptr_6pandas_5index_IndexEngine; __pyx_vtable_6pandas_5index_Float64Engine.__pyx_base._make_hash_table = (PyObject *(*)(struct __pyx_obj_6pandas_5index_IndexEngine *, PyObject *))__pyx_f_6pandas_5index_13Float64Engine__make_hash_table; __pyx_type_6pandas_5index_Float64Engine.tp_base = __pyx_ptype_6pandas_5index_IndexEngine; if (PyType_Ready(&__pyx_type_6pandas_5index_Float64Engine) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 394; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_type_6pandas_5index_Float64Engine.tp_print = 0; if (__Pyx_SetVtable(__pyx_type_6pandas_5index_Float64Engine.tp_dict, __pyx_vtabptr_6pandas_5index_Float64Engine) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 394; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__Pyx_SetAttrString(__pyx_m, "Float64Engine", (PyObject *)&__pyx_type_6pandas_5index_Float64Engine) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 394; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_6pandas_5index_Float64Engine = &__pyx_type_6pandas_5index_Float64Engine; __pyx_vtabptr_6pandas_5index_Int64Engine = &__pyx_vtable_6pandas_5index_Int64Engine; __pyx_vtable_6pandas_5index_Int64Engine.__pyx_base = *__pyx_vtabptr_6pandas_5index_IndexEngine; __pyx_vtable_6pandas_5index_Int64Engine.__pyx_base._maybe_get_bool_indexer = (PyObject *(*)(struct __pyx_obj_6pandas_5index_IndexEngine *, PyObject *))__pyx_f_6pandas_5index_11Int64Engine__maybe_get_bool_indexer; __pyx_vtable_6pandas_5index_Int64Engine.__pyx_base._get_index_values = (PyObject *(*)(struct __pyx_obj_6pandas_5index_IndexEngine *))__pyx_f_6pandas_5index_11Int64Engine__get_index_values; __pyx_vtable_6pandas_5index_Int64Engine.__pyx_base._make_hash_table = (PyObject *(*)(struct __pyx_obj_6pandas_5index_IndexEngine *, PyObject *))__pyx_f_6pandas_5index_11Int64Engine__make_hash_table; __pyx_vtable_6pandas_5index_Int64Engine.__pyx_base._check_type = (PyObject *(*)(struct __pyx_obj_6pandas_5index_IndexEngine *, PyObject *))__pyx_f_6pandas_5index_11Int64Engine__check_type; __pyx_type_6pandas_5index_Int64Engine.tp_base = __pyx_ptype_6pandas_5index_IndexEngine; if (PyType_Ready(&__pyx_type_6pandas_5index_Int64Engine) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 335; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_type_6pandas_5index_Int64Engine.tp_print = 0; if (__Pyx_SetVtable(__pyx_type_6pandas_5index_Int64Engine.tp_dict, __pyx_vtabptr_6pandas_5index_Int64Engine) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 335; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__Pyx_SetAttrString(__pyx_m, "Int64Engine", (PyObject *)&__pyx_type_6pandas_5index_Int64Engine) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 335; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_6pandas_5index_Int64Engine = &__pyx_type_6pandas_5index_Int64Engine; __pyx_vtabptr_6pandas_5index_ObjectEngine = &__pyx_vtable_6pandas_5index_ObjectEngine; __pyx_vtable_6pandas_5index_ObjectEngine.__pyx_base = *__pyx_vtabptr_6pandas_5index_IndexEngine; __pyx_vtable_6pandas_5index_ObjectEngine.__pyx_base._make_hash_table = (PyObject *(*)(struct __pyx_obj_6pandas_5index_IndexEngine *, PyObject *))__pyx_f_6pandas_5index_12ObjectEngine__make_hash_table; __pyx_type_6pandas_5index_ObjectEngine.tp_base = __pyx_ptype_6pandas_5index_IndexEngine; if (PyType_Ready(&__pyx_type_6pandas_5index_ObjectEngine) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 448; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_type_6pandas_5index_ObjectEngine.tp_print = 0; if (__Pyx_SetVtable(__pyx_type_6pandas_5index_ObjectEngine.tp_dict, __pyx_vtabptr_6pandas_5index_ObjectEngine) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 448; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__Pyx_SetAttrString(__pyx_m, "ObjectEngine", (PyObject *)&__pyx_type_6pandas_5index_ObjectEngine) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 448; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_6pandas_5index_ObjectEngine = &__pyx_type_6pandas_5index_ObjectEngine; __pyx_vtabptr_6pandas_5index_DatetimeEngine = &__pyx_vtable_6pandas_5index_DatetimeEngine; __pyx_vtable_6pandas_5index_DatetimeEngine.__pyx_base = *__pyx_vtabptr_6pandas_5index_Int64Engine; __pyx_vtable_6pandas_5index_DatetimeEngine.__pyx_base.__pyx_base.get_loc = (PyObject *(*)(struct __pyx_obj_6pandas_5index_IndexEngine *, PyObject *, int __pyx_skip_dispatch))__pyx_f_6pandas_5index_14DatetimeEngine_get_loc; __pyx_vtable_6pandas_5index_DatetimeEngine.__pyx_base.__pyx_base._get_index_values = (PyObject *(*)(struct __pyx_obj_6pandas_5index_IndexEngine *))__pyx_f_6pandas_5index_14DatetimeEngine__get_index_values; __pyx_vtable_6pandas_5index_DatetimeEngine._date_check_type = (PyObject *(*)(struct __pyx_obj_6pandas_5index_DatetimeEngine *, PyObject *))__pyx_f_6pandas_5index_14DatetimeEngine__date_check_type; __pyx_type_6pandas_5index_DatetimeEngine.tp_base = __pyx_ptype_6pandas_5index_Int64Engine; if (PyType_Ready(&__pyx_type_6pandas_5index_DatetimeEngine) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 465; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_type_6pandas_5index_DatetimeEngine.tp_print = 0; if (__Pyx_SetVtable(__pyx_type_6pandas_5index_DatetimeEngine.tp_dict, __pyx_vtabptr_6pandas_5index_DatetimeEngine) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 465; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__Pyx_SetAttrString(__pyx_m, "DatetimeEngine", (PyObject *)&__pyx_type_6pandas_5index_DatetimeEngine) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 465; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_6pandas_5index_DatetimeEngine = &__pyx_type_6pandas_5index_DatetimeEngine; /*--- Type import code ---*/ __pyx_ptype_5numpy_dtype = __Pyx_ImportType("numpy", "dtype", sizeof(PyArray_Descr), 0); if (unlikely(!__pyx_ptype_5numpy_dtype)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_5numpy_flatiter = __Pyx_ImportType("numpy", "flatiter", sizeof(PyArrayIterObject), 0); if (unlikely(!__pyx_ptype_5numpy_flatiter)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 167; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_5numpy_broadcast = __Pyx_ImportType("numpy", "broadcast", sizeof(PyArrayMultiIterObject), 0); if (unlikely(!__pyx_ptype_5numpy_broadcast)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 171; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_5numpy_ndarray = __Pyx_ImportType("numpy", "ndarray", sizeof(PyArrayObject), 0); if (unlikely(!__pyx_ptype_5numpy_ndarray)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_5numpy_ufunc = __Pyx_ImportType("numpy", "ufunc", sizeof(PyUFuncObject), 0); if (unlikely(!__pyx_ptype_5numpy_ufunc)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 865; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_7cpython_4type_type = __Pyx_ImportType(__Pyx_BUILTIN_MODULE_NAME, "type", #if CYTHON_COMPILING_IN_PYPY sizeof(PyTypeObject), #else sizeof(PyHeapTypeObject), #endif 0); if (unlikely(!__pyx_ptype_7cpython_4type_type)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 9; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_7cpython_4bool_bool = __Pyx_ImportType(__Pyx_BUILTIN_MODULE_NAME, "bool", sizeof(PyBoolObject), 0); if (unlikely(!__pyx_ptype_7cpython_4bool_bool)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 8; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_7cpython_7complex_complex = __Pyx_ImportType(__Pyx_BUILTIN_MODULE_NAME, "complex", sizeof(PyComplexObject), 0); if (unlikely(!__pyx_ptype_7cpython_7complex_complex)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 15; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_6pandas_9hashtable_HashTable = __Pyx_ImportType("pandas.hashtable", "HashTable", sizeof(struct __pyx_obj_6pandas_9hashtable_HashTable), 1); if (unlikely(!__pyx_ptype_6pandas_9hashtable_HashTable)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 5; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_6pandas_9hashtable_Int64HashTable = __Pyx_ImportType("pandas.hashtable", "Int64HashTable", sizeof(struct __pyx_obj_6pandas_9hashtable_Int64HashTable), 1); if (unlikely(!__pyx_ptype_6pandas_9hashtable_Int64HashTable)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 8; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_vtabptr_6pandas_9hashtable_Int64HashTable = (struct __pyx_vtabstruct_6pandas_9hashtable_Int64HashTable*)__Pyx_GetVtable(__pyx_ptype_6pandas_9hashtable_Int64HashTable->tp_dict); if (unlikely(!__pyx_vtabptr_6pandas_9hashtable_Int64HashTable)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 8; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_6pandas_9hashtable_Float64HashTable = __Pyx_ImportType("pandas.hashtable", "Float64HashTable", sizeof(struct __pyx_obj_6pandas_9hashtable_Float64HashTable), 1); if (unlikely(!__pyx_ptype_6pandas_9hashtable_Float64HashTable)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 15; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_6pandas_9hashtable_PyObjectHashTable = __Pyx_ImportType("pandas.hashtable", "PyObjectHashTable", sizeof(struct __pyx_obj_6pandas_9hashtable_PyObjectHashTable), 1); if (unlikely(!__pyx_ptype_6pandas_9hashtable_PyObjectHashTable)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 21; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_vtabptr_6pandas_9hashtable_PyObjectHashTable = (struct __pyx_vtabstruct_6pandas_9hashtable_PyObjectHashTable*)__Pyx_GetVtable(__pyx_ptype_6pandas_9hashtable_PyObjectHashTable->tp_dict); if (unlikely(!__pyx_vtabptr_6pandas_9hashtable_PyObjectHashTable)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 21; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_8datetime_date = __Pyx_ImportType("datetime", "date", sizeof(PyDateTime_Date), 0); if (unlikely(!__pyx_ptype_8datetime_date)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 15; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_8datetime_datetime = __Pyx_ImportType("datetime", "datetime", sizeof(PyDateTime_DateTime), 0); if (unlikely(!__pyx_ptype_8datetime_datetime)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 18; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_8datetime_timedelta = __Pyx_ImportType("datetime", "timedelta", sizeof(PyDateTime_Delta), 0); if (unlikely(!__pyx_ptype_8datetime_timedelta)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 21; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /*--- Variable import code ---*/ /*--- Function import code ---*/ /*--- Execution code ---*/ /* "pandas/index.pyx":9 * cimport numpy as cnp * * cnp.import_array() # <<<<<<<<<<<<<< * cnp.import_ufunc() * */ import_array(); /* "pandas/index.pyx":10 * * cnp.import_array() * cnp.import_ufunc() # <<<<<<<<<<<<<< * * cimport util */ import_ufunc(); /* "pandas/index.pyx":14 * cimport util * * import numpy as np # <<<<<<<<<<<<<< * * cimport tslib */ __pyx_t_1 = __Pyx_Import(__pyx_n_s_numpy, 0, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 14; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_np, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 14; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pandas/index.pyx":18 * cimport tslib * from hashtable cimport * * from pandas import algos, tslib, hashtable as _hash # <<<<<<<<<<<<<< * from pandas.tslib import Timestamp * */ __pyx_t_1 = PyList_New(3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 18; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_n_s_algos); PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_algos); __Pyx_GIVEREF(__pyx_n_s_algos); __Pyx_INCREF(__pyx_n_s_tslib); PyList_SET_ITEM(__pyx_t_1, 1, __pyx_n_s_tslib); __Pyx_GIVEREF(__pyx_n_s_tslib); __Pyx_INCREF(__pyx_n_s_hashtable); PyList_SET_ITEM(__pyx_t_1, 2, __pyx_n_s_hashtable); __Pyx_GIVEREF(__pyx_n_s_hashtable); __pyx_t_2 = __Pyx_Import(__pyx_n_s_pandas, __pyx_t_1, -1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 18; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_algos); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 18; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_algos, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 18; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_tslib); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 18; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_tslib, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 18; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_hashtable); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 18; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_hash, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 18; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/index.pyx":19 * from hashtable cimport * * from pandas import algos, tslib, hashtable as _hash * from pandas.tslib import Timestamp # <<<<<<<<<<<<<< * * from datetime cimport (get_datetime64_value, _pydatetime_to_dts, */ __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 19; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_n_s_Timestamp); PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_Timestamp); __Pyx_GIVEREF(__pyx_n_s_Timestamp); __pyx_t_1 = __Pyx_Import(__pyx_n_s_pandas_tslib, __pyx_t_2, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 19; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_Timestamp); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 19; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_Timestamp, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 19; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pandas/index.pyx":30 * void PyDateTime_IMPORT() * * cdef int64_t iNaT = util.get_nat() # <<<<<<<<<<<<<< * * try: */ __pyx_v_6pandas_5index_iNaT = get_nat(); /* "pandas/index.pyx":32 * cdef int64_t iNaT = util.get_nat() * * try: # <<<<<<<<<<<<<< * from dateutil.tz import tzutc as _du_utc * import pytz */ { __Pyx_ExceptionSave(&__pyx_t_3, &__pyx_t_4, &__pyx_t_5); __Pyx_XGOTREF(__pyx_t_3); __Pyx_XGOTREF(__pyx_t_4); __Pyx_XGOTREF(__pyx_t_5); /*try:*/ { /* "pandas/index.pyx":33 * * try: * from dateutil.tz import tzutc as _du_utc # <<<<<<<<<<<<<< * import pytz * UTC = pytz.utc */ __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 33; __pyx_clineno = __LINE__; goto __pyx_L2_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_n_s_tzutc); PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_tzutc); __Pyx_GIVEREF(__pyx_n_s_tzutc); __pyx_t_2 = __Pyx_Import(__pyx_n_s_dateutil_tz, __pyx_t_1, -1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 33; __pyx_clineno = __LINE__; goto __pyx_L2_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_tzutc); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 33; __pyx_clineno = __LINE__; goto __pyx_L2_error;} __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_du_utc, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 33; __pyx_clineno = __LINE__; goto __pyx_L2_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/index.pyx":34 * try: * from dateutil.tz import tzutc as _du_utc * import pytz # <<<<<<<<<<<<<< * UTC = pytz.utc * have_pytz = True */ __pyx_t_2 = __Pyx_Import(__pyx_n_s_pytz, 0, -1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 34; __pyx_clineno = __LINE__; goto __pyx_L2_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_pytz, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 34; __pyx_clineno = __LINE__; goto __pyx_L2_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/index.pyx":35 * from dateutil.tz import tzutc as _du_utc * import pytz * UTC = pytz.utc # <<<<<<<<<<<<<< * have_pytz = True * except ImportError: */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_pytz); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L2_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_utc); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L2_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (PyDict_SetItem(__pyx_d, __pyx_n_s_UTC, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L2_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pandas/index.pyx":36 * import pytz * UTC = pytz.utc * have_pytz = True # <<<<<<<<<<<<<< * except ImportError: * have_pytz = False */ if (PyDict_SetItem(__pyx_d, __pyx_n_s_have_pytz, Py_True) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 36; __pyx_clineno = __LINE__; goto __pyx_L2_error;} } __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; goto __pyx_L9_try_end; __pyx_L2_error:; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pandas/index.pyx":37 * UTC = pytz.utc * have_pytz = True * except ImportError: # <<<<<<<<<<<<<< * have_pytz = False * */ __pyx_t_6 = PyErr_ExceptionMatches(__pyx_builtin_ImportError); if (__pyx_t_6) { __Pyx_AddTraceback("pandas.index", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_2, &__pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 37; __pyx_clineno = __LINE__; goto __pyx_L4_except_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_GOTREF(__pyx_t_2); __Pyx_GOTREF(__pyx_t_7); /* "pandas/index.pyx":38 * have_pytz = True * except ImportError: * have_pytz = False # <<<<<<<<<<<<<< * * PyDateTime_IMPORT */ if (PyDict_SetItem(__pyx_d, __pyx_n_s_have_pytz, Py_False) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 38; __pyx_clineno = __LINE__; goto __pyx_L4_except_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; goto __pyx_L3_exception_handled; } goto __pyx_L4_except_error; __pyx_L4_except_error:; __Pyx_XGIVEREF(__pyx_t_3); __Pyx_XGIVEREF(__pyx_t_4); __Pyx_XGIVEREF(__pyx_t_5); __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5); goto __pyx_L1_error; __pyx_L3_exception_handled:; __Pyx_XGIVEREF(__pyx_t_3); __Pyx_XGIVEREF(__pyx_t_4); __Pyx_XGIVEREF(__pyx_t_5); __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5); __pyx_L9_try_end:; } /* "pandas/index.pyx":40 * have_pytz = False * * PyDateTime_IMPORT # <<<<<<<<<<<<<< * * cdef extern from "Python.h": */ PyDateTime_IMPORT; /* "pandas/index.pyx":57 * or PyList_Check(val) or hasattr(val,'_data')) * * def get_value_at(ndarray arr, object loc): # <<<<<<<<<<<<<< * if arr.descr.type_num == NPY_DATETIME: * return Timestamp(util.get_value_at(arr, loc)) */ __pyx_t_7 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5index_1get_value_at, NULL, __pyx_n_s_pandas_index); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 57; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); if (PyDict_SetItem(__pyx_d, __pyx_n_s_get_value_at, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 57; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; /* "pandas/index.pyx":62 * return util.get_value_at(arr, loc) * * def set_value_at(ndarray arr, object loc, object val): # <<<<<<<<<<<<<< * return util.set_value_at(arr, loc, val) * */ __pyx_t_7 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5index_3set_value_at, NULL, __pyx_n_s_pandas_index); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); if (PyDict_SetItem(__pyx_d, __pyx_n_s_set_value_at, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; /* "pandas/index.pyx":67 * * # Don't populate hash tables in monotonic indexes larger than this * _SIZE_CUTOFF = 1000000 # <<<<<<<<<<<<<< * * */ if (PyDict_SetItem(__pyx_d, __pyx_n_s_SIZE_CUTOFF, __pyx_int_1000000) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 67; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/index.pyx":436 * return mid + 1 * * _pad_functions = { # <<<<<<<<<<<<<< * 'object' : algos.pad_object, * 'int64' : algos.pad_int64, */ __pyx_t_7 = PyDict_New(); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 436; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); /* "pandas/index.pyx":437 * * _pad_functions = { * 'object' : algos.pad_object, # <<<<<<<<<<<<<< * 'int64' : algos.pad_int64, * 'float64' : algos.pad_float64 */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_algos); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 437; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_pad_object); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 437; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_object, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 436; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pandas/index.pyx":438 * _pad_functions = { * 'object' : algos.pad_object, * 'int64' : algos.pad_int64, # <<<<<<<<<<<<<< * 'float64' : algos.pad_float64 * } */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_algos); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 438; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_pad_int64); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 438; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_int64, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 436; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/index.pyx":439 * 'object' : algos.pad_object, * 'int64' : algos.pad_int64, * 'float64' : algos.pad_float64 # <<<<<<<<<<<<<< * } * */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_algos); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 439; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_pad_float64); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 439; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_float64, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 436; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (PyDict_SetItem(__pyx_d, __pyx_n_s_pad_functions, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 436; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; /* "pandas/index.pyx":442 * } * * _backfill_functions = { # <<<<<<<<<<<<<< * 'object': algos.backfill_object, * 'int64': algos.backfill_int64, */ __pyx_t_7 = PyDict_New(); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 442; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); /* "pandas/index.pyx":443 * * _backfill_functions = { * 'object': algos.backfill_object, # <<<<<<<<<<<<<< * 'int64': algos.backfill_int64, * 'float64': algos.backfill_float64 */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_algos); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 443; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_backfill_object); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 443; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_object, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 442; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/index.pyx":444 * _backfill_functions = { * 'object': algos.backfill_object, * 'int64': algos.backfill_int64, # <<<<<<<<<<<<<< * 'float64': algos.backfill_float64 * } */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_algos); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 444; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_backfill_int64); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 444; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_int64, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 442; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pandas/index.pyx":445 * 'object': algos.backfill_object, * 'int64': algos.backfill_int64, * 'float64': algos.backfill_float64 # <<<<<<<<<<<<<< * } * */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_algos); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 445; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_backfill_float64); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 445; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_float64, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 442; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (PyDict_SetItem(__pyx_d, __pyx_n_s_backfill_functions, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 442; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; /* "pandas/index.pyx":1 * from numpy cimport ndarray # <<<<<<<<<<<<<< * * from numpy cimport (float64_t, int32_t, int64_t, uint8_t, */ __pyx_t_7 = PyDict_New(); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); if (PyDict_SetItem(__pyx_d, __pyx_n_s_test, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; /* "util.pxd":84 * return False * * cdef inline bint _checknan(object val): # <<<<<<<<<<<<<< * return not cnp.PyArray_Check(val) and val != val */ goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_7); if (__pyx_m) { __Pyx_AddTraceback("init pandas.index", __pyx_clineno, __pyx_lineno, __pyx_filename); Py_DECREF(__pyx_m); __pyx_m = 0; } else if (!PyErr_Occurred()) { PyErr_SetString(PyExc_ImportError, "init pandas.index"); } __pyx_L0:; __Pyx_RefNannyFinishContext(); #if PY_MAJOR_VERSION < 3 return; #else return __pyx_m; #endif } /* Runtime support code */ #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 /* CYTHON_REFNANNY */ 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; } static CYTHON_INLINE void __Pyx_ExceptionSave(PyObject **type, PyObject **value, PyObject **tb) { #if CYTHON_COMPILING_IN_CPYTHON PyThreadState *tstate = PyThreadState_GET(); *type = tstate->exc_type; *value = tstate->exc_value; *tb = tstate->exc_traceback; Py_XINCREF(*type); Py_XINCREF(*value); Py_XINCREF(*tb); #else PyErr_GetExcInfo(type, value, tb); #endif } static void __Pyx_ExceptionReset(PyObject *type, PyObject *value, PyObject *tb) { #if CYTHON_COMPILING_IN_CPYTHON PyObject *tmp_type, *tmp_value, *tmp_tb; PyThreadState *tstate = PyThreadState_GET(); tmp_type = tstate->exc_type; tmp_value = tstate->exc_value; tmp_tb = tstate->exc_traceback; tstate->exc_type = type; tstate->exc_value = value; tstate->exc_traceback = tb; Py_XDECREF(tmp_type); Py_XDECREF(tmp_value); Py_XDECREF(tmp_tb); #else PyErr_SetExcInfo(type, value, tb); #endif } static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb) { PyObject *local_type, *local_value, *local_tb; #if CYTHON_COMPILING_IN_CPYTHON PyObject *tmp_type, *tmp_value, *tmp_tb; PyThreadState *tstate = PyThreadState_GET(); local_type = tstate->curexc_type; local_value = tstate->curexc_value; local_tb = tstate->curexc_traceback; tstate->curexc_type = 0; tstate->curexc_value = 0; tstate->curexc_traceback = 0; #else PyErr_Fetch(&local_type, &local_value, &local_tb); #endif PyErr_NormalizeException(&local_type, &local_value, &local_tb); #if CYTHON_COMPILING_IN_CPYTHON if (unlikely(tstate->curexc_type)) #else if (unlikely(PyErr_Occurred())) #endif goto bad; #if PY_MAJOR_VERSION >= 3 if (local_tb) { if (unlikely(PyException_SetTraceback(local_value, local_tb) < 0)) goto bad; } #endif Py_XINCREF(local_tb); Py_XINCREF(local_type); Py_XINCREF(local_value); *type = local_type; *value = local_value; *tb = local_tb; #if CYTHON_COMPILING_IN_CPYTHON tmp_type = tstate->exc_type; tmp_value = tstate->exc_value; tmp_tb = tstate->exc_traceback; tstate->exc_type = local_type; tstate->exc_value = local_value; tstate->exc_traceback = local_tb; Py_XDECREF(tmp_type); Py_XDECREF(tmp_value); Py_XDECREF(tmp_tb); #else PyErr_SetExcInfo(local_type, local_value, local_tb); #endif return 0; bad: *type = 0; *value = 0; *tb = 0; Py_XDECREF(local_type); Py_XDECREF(local_value); Py_XDECREF(local_tb); return -1; } 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); } 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 } 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; } static void __Pyx_RaiseArgumentTypeInvalid(const char* name, PyObject *obj, PyTypeObject *type) { PyErr_Format(PyExc_TypeError, "Argument '%.200s' has incorrect type (expected %.200s, got %.200s)", name, type->tp_name, Py_TYPE(obj)->tp_name); } static CYTHON_INLINE int __Pyx_ArgTypeTest(PyObject *obj, PyTypeObject *type, int none_allowed, const char *name, int exact) { if (unlikely(!type)) { PyErr_SetString(PyExc_SystemError, "Missing type object"); return 0; } if (none_allowed && obj == Py_None) return 1; else if (exact) { if (likely(Py_TYPE(obj) == type)) return 1; #if PY_MAJOR_VERSION == 2 else if ((type == &PyBaseString_Type) && likely(__Pyx_PyBaseString_CheckExact(obj))) return 1; #endif } else { if (likely(PyObject_TypeCheck(obj, type))) return 1; } __Pyx_RaiseArgumentTypeInvalid(name, obj, type); return 0; } static CYTHON_INLINE PyObject *__Pyx_GetModuleGlobalName(PyObject *name) { PyObject *result; #if CYTHON_COMPILING_IN_CPYTHON result = PyDict_GetItem(__pyx_d, name); if (result) { Py_INCREF(result); } else { #else result = PyObject_GetItem(__pyx_d, name); if (!result) { PyErr_Clear(); #endif result = __Pyx_GetBuiltinName(name); } return result; } static CYTHON_INLINE void __Pyx_ErrRestore(PyObject *type, PyObject *value, PyObject *tb) { #if CYTHON_COMPILING_IN_CPYTHON PyObject *tmp_type, *tmp_value, *tmp_tb; PyThreadState *tstate = PyThreadState_GET(); 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); #else PyErr_Restore(type, value, tb); #endif } static CYTHON_INLINE void __Pyx_ErrFetch(PyObject **type, PyObject **value, PyObject **tb) { #if CYTHON_COMPILING_IN_CPYTHON PyThreadState *tstate = PyThreadState_GET(); *type = tstate->curexc_type; *value = tstate->curexc_value; *tb = tstate->curexc_traceback; tstate->curexc_type = 0; tstate->curexc_value = 0; tstate->curexc_traceback = 0; #else PyErr_Fetch(type, value, tb); #endif } #if PY_MAJOR_VERSION < 3 static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, CYTHON_UNUSED PyObject *cause) { 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 PY_VERSION_HEX < 0x02050000 if (PyClass_Check(type)) { #else if (PyType_Check(type)) { #endif #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; #if PY_VERSION_HEX < 0x02050000 if (PyInstance_Check(type)) { type = (PyObject*) ((PyInstanceObject*)type)->in_class; Py_INCREF(type); } else { type = 0; PyErr_SetString(PyExc_TypeError, "raise: exception must be an old-style class or instance"); goto raise_error; } #else 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; } #endif } __Pyx_ErrRestore(type, value, tb); return; raise_error: Py_XDECREF(value); Py_XDECREF(type); Py_XDECREF(tb); return; } #else /* Python 3+ */ 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) { if (PyObject_IsSubclass(instance_class, type)) { type = instance_class; } else { instance_class = NULL; } } } if (!instance_class) { PyObject *args; if (!value) args = PyTuple_New(0); else if (PyTuple_Check(value)) { Py_INCREF(value); args = value; } else args = PyTuple_Pack(1, value); if (!args) goto bad; owned_instance = PyObject_Call(type, args, NULL); Py_DECREF(args); if (!owned_instance) goto bad; value = owned_instance; if (!PyExceptionInstance_Check(value)) { PyErr_Format(PyExc_TypeError, "calling %R should have returned an instance of " "BaseException, not %R", type, Py_TYPE(value)); goto bad; } } } else { PyErr_SetString(PyExc_TypeError, "raise: exception class must be a subclass of BaseException"); goto bad; } #if PY_VERSION_HEX >= 0x03030000 if (cause) { #else if (cause && cause != Py_None) { #endif PyObject *fixed_cause; if (cause == Py_None) { fixed_cause = NULL; } else if (PyExceptionClass_Check(cause)) { fixed_cause = PyObject_CallObject(cause, NULL); if (fixed_cause == NULL) goto bad; } else if (PyExceptionInstance_Check(cause)) { fixed_cause = cause; Py_INCREF(fixed_cause); } else { PyErr_SetString(PyExc_TypeError, "exception causes must derive from " "BaseException"); goto bad; } PyException_SetCause(value, fixed_cause); } PyErr_SetObject(type, value); if (tb) { PyThreadState *tstate = PyThreadState_GET(); PyObject* tmp_tb = tstate->curexc_traceback; if (tb != tmp_tb) { Py_INCREF(tb); tstate->curexc_traceback = tb; Py_XDECREF(tmp_tb); } } bad: Py_XDECREF(owned_instance); return; } #endif static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type) { if (unlikely(!type)) { PyErr_SetString(PyExc_SystemError, "Missing type object"); return 0; } if (likely(PyObject_TypeCheck(obj, type))) return 1; PyErr_Format(PyExc_TypeError, "Cannot convert %.200s to %.200s", Py_TYPE(obj)->tp_name, type->tp_name); return 0; } static CYTHON_INLINE int __Pyx_IsLittleEndian(void) { unsigned int n = 1; return *(unsigned char*)(&n) != 0; } 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) /* First char was not a digit */ 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; /* Consume from buffer string */ while (1) { if (field == &ctx->root) { ctx->head = NULL; if (ctx->enc_count != 0) { __Pyx_BufFmt_RaiseExpected(ctx); return -1; } break; /* breaks both loops as ctx->enc_count == 0 */ } 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; /* empty struct */ 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 CYTHON_INLINE 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 != ')') { if (isspace(*ts)) continue; 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 10: case 13: ++ts; break; case '<': if (!__Pyx_IsLittleEndian()) { PyErr_SetString(PyExc_ValueError, "Little-endian buffer not supported on big-endian compiler"); return NULL; } ctx->new_packmode = '='; ++ts; break; case '>': case '!': if (__Pyx_IsLittleEndian()) { 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': /* substruct */ { 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; /* Erase processed last struct element */ 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 '}': /* end of substruct; either repeat or move on */ { size_t alignment = ctx->struct_alignment; ++ts; if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL; ctx->enc_type = 0; /* Erase processed last struct element */ 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; } /* fall through */ 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 's': case 'p': if (ctx->enc_type == *ts && got_Z == ctx->is_complex && ctx->enc_packmode == ctx->new_packmode) { ctx->enc_count += ctx->new_count; } else { 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; } } } } static CYTHON_INLINE 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 CYTHON_INLINE int __Pyx_GetBufferAndValidate( Py_buffer* buf, PyObject* obj, __Pyx_TypeInfo* dtype, int flags, int nd, int cast, __Pyx_BufFmt_StackElem* stack) { if (obj == Py_None || obj == NULL) { __Pyx_ZeroBuffer(buf); return 0; } buf->buf = NULL; if (__Pyx_GetBuffer(obj, buf, flags) == -1) goto fail; if (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 ((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_ZeroBuffer(buf); return -1; } static CYTHON_INLINE void __Pyx_SafeReleaseBuffer(Py_buffer* info) { if (info->buf == NULL) return; if (info->suboffsets == __Pyx_minusones) info->suboffsets = NULL; __Pyx_ReleaseBuffer(info); } static void __Pyx_RaiseBufferFallbackError(void) { PyErr_SetString(PyExc_ValueError, "Buffer acquisition failed on assignment; and then reacquiring the old buffer failed too!"); } static void __Pyx_RaiseBufferIndexError(int axis) { PyErr_Format(PyExc_IndexError, "Out of bounds on buffer access (axis %d)", axis); } 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); } 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"); } static CYTHON_INLINE int __Pyx_IterFinish(void) { #if CYTHON_COMPILING_IN_CPYTHON PyThreadState *tstate = PyThreadState_GET(); PyObject* exc_type = tstate->curexc_type; if (unlikely(exc_type)) { if (likely(exc_type == PyExc_StopIteration) || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration)) { PyObject *exc_value, *exc_tb; exc_value = tstate->curexc_value; exc_tb = tstate->curexc_traceback; tstate->curexc_type = 0; tstate->curexc_value = 0; tstate->curexc_traceback = 0; Py_DECREF(exc_type); Py_XDECREF(exc_value); Py_XDECREF(exc_tb); return 0; } else { return -1; } } return 0; #else if (unlikely(PyErr_Occurred())) { if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) { PyErr_Clear(); return 0; } else { return -1; } } return 0; #endif } 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; } static CYTHON_INLINE int __Pyx_PyObject_Append(PyObject* L, PyObject* x) { if (likely(PyList_CheckExact(L))) { if (unlikely(__Pyx_PyList_Append(L, x) < 0)) return -1; } else { PyObject* retval = __Pyx_PyObject_CallMethod1(L, __pyx_n_s_append, x); if (unlikely(!retval)) return -1; Py_DECREF(retval); } return 0; } static CYTHON_INLINE PyObject* __Pyx_PyObject_GetSlice( PyObject* obj, Py_ssize_t cstart, Py_ssize_t cstop, PyObject** _py_start, PyObject** _py_stop, PyObject** _py_slice, int has_cstart, int has_cstop, CYTHON_UNUSED int wraparound) { #if CYTHON_COMPILING_IN_CPYTHON PyMappingMethods* mp; #if PY_MAJOR_VERSION < 3 PySequenceMethods* ms = Py_TYPE(obj)->tp_as_sequence; if (likely(ms && ms->sq_slice)) { if (!has_cstart) { if (_py_start && (*_py_start != Py_None)) { cstart = __Pyx_PyIndex_AsSsize_t(*_py_start); if ((cstart == (Py_ssize_t)-1) && PyErr_Occurred()) goto bad; } else cstart = 0; } if (!has_cstop) { if (_py_stop && (*_py_stop != Py_None)) { cstop = __Pyx_PyIndex_AsSsize_t(*_py_stop); if ((cstop == (Py_ssize_t)-1) && PyErr_Occurred()) goto bad; } else cstop = PY_SSIZE_T_MAX; } if (wraparound && unlikely((cstart < 0) | (cstop < 0)) && likely(ms->sq_length)) { Py_ssize_t l = ms->sq_length(obj); if (likely(l >= 0)) { if (cstop < 0) { cstop += l; if (cstop < 0) cstop = 0; } if (cstart < 0) { cstart += l; if (cstart < 0) cstart = 0; } } else { if (PyErr_ExceptionMatches(PyExc_OverflowError)) PyErr_Clear(); else goto bad; } } return ms->sq_slice(obj, cstart, cstop); } #endif mp = Py_TYPE(obj)->tp_as_mapping; if (likely(mp && mp->mp_subscript)) #endif { PyObject* result; PyObject *py_slice, *py_start, *py_stop; if (_py_slice) { py_slice = *_py_slice; } else { PyObject* owned_start = NULL; PyObject* owned_stop = NULL; if (_py_start) { py_start = *_py_start; } else { if (has_cstart) { owned_start = py_start = PyInt_FromSsize_t(cstart); if (unlikely(!py_start)) goto bad; } else py_start = Py_None; } if (_py_stop) { py_stop = *_py_stop; } else { if (has_cstop) { owned_stop = py_stop = PyInt_FromSsize_t(cstop); if (unlikely(!py_stop)) { Py_XDECREF(owned_start); goto bad; } } else py_stop = Py_None; } py_slice = PySlice_New(py_start, py_stop, Py_None); Py_XDECREF(owned_start); Py_XDECREF(owned_stop); if (unlikely(!py_slice)) goto bad; } #if CYTHON_COMPILING_IN_CPYTHON result = mp->mp_subscript(obj, py_slice); #else result = PyObject_GetItem(obj, py_slice); #endif if (!_py_slice) { Py_DECREF(py_slice); } return result; } PyErr_Format(PyExc_TypeError, "'%.200s' object is unsliceable", Py_TYPE(obj)->tp_name); bad: return NULL; } static CYTHON_INLINE Py_ssize_t __Pyx_div_Py_ssize_t(Py_ssize_t a, Py_ssize_t b) { Py_ssize_t q = a / b; Py_ssize_t r = a - q*b; q -= ((r != 0) & ((r ^ b) < 0)); return q; } static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals) { #if CYTHON_COMPILING_IN_PYPY return PyObject_RichCompareBool(s1, s2, equals); #else if (s1 == s2) { return (equals == Py_EQ); } else if (PyBytes_CheckExact(s1) & PyBytes_CheckExact(s2)) { const char *ps1, *ps2; Py_ssize_t length = PyBytes_GET_SIZE(s1); if (length != PyBytes_GET_SIZE(s2)) return (equals == Py_NE); ps1 = PyBytes_AS_STRING(s1); ps2 = PyBytes_AS_STRING(s2); if (ps1[0] != ps2[0]) { return (equals == Py_NE); } else if (length == 1) { return (equals == Py_EQ); } else { int result = memcmp(ps1, ps2, (size_t)length); return (equals == Py_EQ) ? (result == 0) : (result != 0); } } else if ((s1 == Py_None) & PyBytes_CheckExact(s2)) { return (equals == Py_NE); } else if ((s2 == Py_None) & PyBytes_CheckExact(s1)) { return (equals == Py_NE); } else { int result; PyObject* py_result = PyObject_RichCompare(s1, s2, equals); if (!py_result) return -1; result = __Pyx_PyObject_IsTrue(py_result); Py_DECREF(py_result); return result; } #endif } static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals) { #if CYTHON_COMPILING_IN_PYPY return PyObject_RichCompareBool(s1, s2, equals); #else #if PY_MAJOR_VERSION < 3 PyObject* owned_ref = NULL; #endif int s1_is_unicode, s2_is_unicode; if (s1 == s2) { goto return_eq; } s1_is_unicode = PyUnicode_CheckExact(s1); s2_is_unicode = PyUnicode_CheckExact(s2); #if PY_MAJOR_VERSION < 3 if ((s1_is_unicode & (!s2_is_unicode)) && PyString_CheckExact(s2)) { owned_ref = PyUnicode_FromObject(s2); if (unlikely(!owned_ref)) return -1; s2 = owned_ref; s2_is_unicode = 1; } else if ((s2_is_unicode & (!s1_is_unicode)) && PyString_CheckExact(s1)) { owned_ref = PyUnicode_FromObject(s1); if (unlikely(!owned_ref)) return -1; s1 = owned_ref; s1_is_unicode = 1; } else if (((!s2_is_unicode) & (!s1_is_unicode))) { return __Pyx_PyBytes_Equals(s1, s2, equals); } #endif if (s1_is_unicode & s2_is_unicode) { Py_ssize_t length; int kind; void *data1, *data2; #if CYTHON_PEP393_ENABLED if (unlikely(PyUnicode_READY(s1) < 0) || unlikely(PyUnicode_READY(s2) < 0)) return -1; #endif length = __Pyx_PyUnicode_GET_LENGTH(s1); if (length != __Pyx_PyUnicode_GET_LENGTH(s2)) { goto return_ne; } kind = __Pyx_PyUnicode_KIND(s1); if (kind != __Pyx_PyUnicode_KIND(s2)) { goto return_ne; } data1 = __Pyx_PyUnicode_DATA(s1); data2 = __Pyx_PyUnicode_DATA(s2); if (__Pyx_PyUnicode_READ(kind, data1, 0) != __Pyx_PyUnicode_READ(kind, data2, 0)) { goto return_ne; } else if (length == 1) { goto return_eq; } else { int result = memcmp(data1, data2, length * kind); #if PY_MAJOR_VERSION < 3 Py_XDECREF(owned_ref); #endif return (equals == Py_EQ) ? (result == 0) : (result != 0); } } else if ((s1 == Py_None) & s2_is_unicode) { goto return_ne; } else if ((s2 == Py_None) & s1_is_unicode) { goto return_ne; } else { int result; PyObject* py_result = PyObject_RichCompare(s1, s2, equals); if (!py_result) return -1; result = __Pyx_PyObject_IsTrue(py_result); Py_DECREF(py_result); return result; } return_eq: #if PY_MAJOR_VERSION < 3 Py_XDECREF(owned_ref); #endif return (equals == Py_EQ); return_ne: #if PY_MAJOR_VERSION < 3 Py_XDECREF(owned_ref); #endif return (equals == Py_NE); #endif } static CYTHON_INLINE PyObject *__Pyx_GetAttr(PyObject *o, PyObject *n) { #if CYTHON_COMPILING_IN_CPYTHON #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); } static CYTHON_INLINE PyObject *__Pyx_GetAttr3(PyObject *o, PyObject *n, PyObject *d) { PyObject *r = __Pyx_GetAttr(o, n); if (unlikely(!r)) { if (!PyErr_ExceptionMatches(PyExc_AttributeError)) goto bad; PyErr_Clear(); r = d; Py_INCREF(d); } return r; bad: return NULL; } static void __Pyx_WriteUnraisable(const char *name, CYTHON_UNUSED int clineno, CYTHON_UNUSED int lineno, CYTHON_UNUSED const char *filename, int full_traceback) { PyObject *old_exc, *old_val, *old_tb; PyObject *ctx; __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); } } static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); } static int __Pyx_SetVtable(PyObject *dict, void *vtable) { #if PY_VERSION_HEX >= 0x02070000 && !(PY_MAJOR_VERSION==3&&PY_MINOR_VERSION==0) 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; } static void* __Pyx_GetVtable(PyObject *dict) { void* ptr; PyObject *ob = PyObject_GetItem(dict, __pyx_n_s_pyx_vtable); if (!ob) goto bad; #if PY_VERSION_HEX >= 0x02070000 && !(PY_MAJOR_VERSION==3&&PY_MINOR_VERSION==0) ptr = PyCapsule_GetPointer(ob, 0); #else ptr = PyCObject_AsVoidPtr(ob); #endif if (!ptr && !PyErr_Occurred()) PyErr_SetString(PyExc_RuntimeError, "invalid vtable found for imported type"); Py_DECREF(ob); return ptr; bad: Py_XDECREF(ob); return NULL; } 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; } #if PY_MAJOR_VERSION < 3 static int __Pyx_GetBuffer(PyObject *obj, Py_buffer *view, int flags) { #if PY_VERSION_HEX >= 0x02060000 if (PyObject_CheckBuffer(obj)) return PyObject_GetBuffer(obj, view, flags); #endif if (PyObject_TypeCheck(obj, __pyx_ptype_5numpy_ndarray)) return __pyx_pw_5numpy_7ndarray_1__getbuffer__(obj, view, flags); #if PY_VERSION_HEX < 0x02060000 if (obj->ob_type->tp_dict) { PyObject *getbuffer_cobj = PyObject_GetItem( obj->ob_type->tp_dict, __pyx_n_s_pyx_getbuffer); if (getbuffer_cobj) { getbufferproc func = (getbufferproc) PyCObject_AsVoidPtr(getbuffer_cobj); Py_DECREF(getbuffer_cobj); if (!func) goto fail; return func(obj, view, flags); } else { PyErr_Clear(); } } #endif PyErr_Format(PyExc_TypeError, "'%.200s' does not have the buffer interface", Py_TYPE(obj)->tp_name); #if PY_VERSION_HEX < 0x02060000 fail: #endif return -1; } static void __Pyx_ReleaseBuffer(Py_buffer *view) { PyObject *obj = view->obj; if (!obj) return; #if PY_VERSION_HEX >= 0x02060000 if (PyObject_CheckBuffer(obj)) { PyBuffer_Release(view); return; } #endif if (PyObject_TypeCheck(obj, __pyx_ptype_5numpy_ndarray)) { __pyx_pw_5numpy_7ndarray_3__releasebuffer__(obj, view); return; } #if PY_VERSION_HEX < 0x02060000 if (obj->ob_type->tp_dict) { PyObject *releasebuffer_cobj = PyObject_GetItem( obj->ob_type->tp_dict, __pyx_n_s_pyx_releasebuffer); if (releasebuffer_cobj) { releasebufferproc func = (releasebufferproc) PyCObject_AsVoidPtr(releasebuffer_cobj); Py_DECREF(releasebuffer_cobj); if (!func) goto fail; func(obj, view); return; } else { PyErr_Clear(); } } #endif goto nofail; #if PY_VERSION_HEX < 0x02060000 fail: #endif PyErr_WriteUnraisable(obj); nofail: Py_DECREF(obj); view->obj = NULL; } #endif /* PY_MAJOR_VERSION < 3 */ static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level) { PyObject *empty_list = 0; PyObject *module = 0; PyObject *global_dict = 0; PyObject *empty_dict = 0; PyObject *list; #if PY_VERSION_HEX < 0x03030000 PyObject *py_import; py_import = __Pyx_PyObject_GetAttrStr(__pyx_b, __pyx_n_s_import); if (!py_import) goto bad; #endif if (from_list) list = from_list; else { empty_list = PyList_New(0); if (!empty_list) goto bad; list = empty_list; } global_dict = PyModule_GetDict(__pyx_m); if (!global_dict) goto bad; empty_dict = PyDict_New(); if (!empty_dict) goto bad; #if PY_VERSION_HEX >= 0x02050000 { #if PY_MAJOR_VERSION >= 3 if (level == -1) { if (strchr(__Pyx_MODULE_NAME, '.')) { #if PY_VERSION_HEX < 0x03030000 PyObject *py_level = PyInt_FromLong(1); if (!py_level) goto bad; module = PyObject_CallFunctionObjArgs(py_import, name, global_dict, empty_dict, list, py_level, NULL); Py_DECREF(py_level); #else module = PyImport_ImportModuleLevelObject( name, global_dict, empty_dict, list, 1); #endif if (!module) { if (!PyErr_ExceptionMatches(PyExc_ImportError)) goto bad; PyErr_Clear(); } } level = 0; /* try absolute import on failure */ } #endif if (!module) { #if PY_VERSION_HEX < 0x03030000 PyObject *py_level = PyInt_FromLong(level); if (!py_level) goto bad; module = PyObject_CallFunctionObjArgs(py_import, name, global_dict, empty_dict, list, py_level, NULL); Py_DECREF(py_level); #else module = PyImport_ImportModuleLevelObject( name, global_dict, empty_dict, list, level); #endif } } #else if (level>0) { PyErr_SetString(PyExc_RuntimeError, "Relative import is not supported for Python <=2.4."); goto bad; } module = PyObject_CallFunctionObjArgs(py_import, name, global_dict, empty_dict, list, NULL); #endif bad: #if PY_VERSION_HEX < 0x03030000 Py_XDECREF(py_import); #endif Py_XDECREF(empty_list); Py_XDECREF(empty_dict); return module; } static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value) { const int neg_one = (int) -1, const_zero = 0; const int is_unsigned = neg_one > const_zero; if (is_unsigned) { if (sizeof(int) < sizeof(long)) { return PyInt_FromLong((long) value); } else if (sizeof(int) <= sizeof(unsigned long)) { return PyLong_FromUnsignedLong((unsigned long) value); } else if (sizeof(int) <= sizeof(unsigned long long)) { return PyLong_FromUnsignedLongLong((unsigned long long) value); } } else { if (sizeof(int) <= sizeof(long)) { return PyInt_FromLong((long) value); } else if (sizeof(int) <= sizeof(long long)) { return PyLong_FromLongLong((long long) value); } } { int one = 1; int little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&value; return _PyLong_FromByteArray(bytes, sizeof(int), little, !is_unsigned); } } #define __PYX_VERIFY_RETURN_INT(target_type, func_type, func) \ { \ func_type value = func(x); \ if (sizeof(target_type) < sizeof(func_type)) { \ if (unlikely(value != (func_type) (target_type) value)) { \ func_type zero = 0; \ PyErr_SetString(PyExc_OverflowError, \ (is_unsigned && unlikely(value < zero)) ? \ "can't convert negative value to " #target_type : \ "value too large to convert to " #target_type); \ return (target_type) -1; \ } \ } \ return (target_type) value; \ } #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS #include "longintrepr.h" #endif #endif static CYTHON_INLINE npy_int64 __Pyx_PyInt_As_npy_int64(PyObject *x) { const npy_int64 neg_one = (npy_int64) -1, const_zero = 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) } else { long val = PyInt_AS_LONG(x); if (is_unsigned && unlikely(val < 0)) { PyErr_SetString(PyExc_OverflowError, "can't convert negative value to npy_int64"); return (npy_int64) -1; } return (npy_int64) val; } } else #endif if (likely(PyLong_Check(x))) { if (is_unsigned) { #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS if (sizeof(digit) <= sizeof(npy_int64)) { switch (Py_SIZE(x)) { case 0: return 0; case 1: return (npy_int64) ((PyLongObject*)x)->ob_digit[0]; } } #endif #endif if (unlikely(Py_SIZE(x) < 0)) { PyErr_SetString(PyExc_OverflowError, "can't convert negative value to npy_int64"); return (npy_int64) -1; } if (sizeof(npy_int64) <= sizeof(unsigned long)) { __PYX_VERIFY_RETURN_INT(npy_int64, unsigned long, PyLong_AsUnsignedLong) } else if (sizeof(npy_int64) <= sizeof(unsigned long long)) { __PYX_VERIFY_RETURN_INT(npy_int64, unsigned long long, PyLong_AsUnsignedLongLong) } } else { #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS if (sizeof(digit) <= sizeof(npy_int64)) { switch (Py_SIZE(x)) { case 0: return 0; case 1: return +(npy_int64) ((PyLongObject*)x)->ob_digit[0]; case -1: return -(npy_int64) ((PyLongObject*)x)->ob_digit[0]; } } #endif #endif if (sizeof(npy_int64) <= sizeof(long)) { __PYX_VERIFY_RETURN_INT(npy_int64, long, PyLong_AsLong) } else if (sizeof(npy_int64) <= sizeof(long long)) { __PYX_VERIFY_RETURN_INT(npy_int64, long long, PyLong_AsLongLong) } } { #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_Int(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_Int(x); if (!tmp) return (npy_int64) -1; val = __Pyx_PyInt_As_npy_int64(tmp); Py_DECREF(tmp); return val; } } static CYTHON_INLINE PyObject* __Pyx_PyInt_From_npy_int64(npy_int64 value) { const npy_int64 neg_one = (npy_int64) -1, const_zero = 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); } else if (sizeof(npy_int64) <= sizeof(unsigned long long)) { return PyLong_FromUnsignedLongLong((unsigned long long) value); } } else { if (sizeof(npy_int64) <= sizeof(long)) { return PyInt_FromLong((long) value); } else if (sizeof(npy_int64) <= sizeof(long long)) { return PyLong_FromLongLong((long long) value); } } { 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); } } #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS #include "longintrepr.h" #endif #endif static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) { const int neg_one = (int) -1, const_zero = 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) } else { long val = PyInt_AS_LONG(x); if (is_unsigned && unlikely(val < 0)) { PyErr_SetString(PyExc_OverflowError, "can't convert negative value to int"); return (int) -1; } return (int) val; } } else #endif if (likely(PyLong_Check(x))) { if (is_unsigned) { #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS if (sizeof(digit) <= sizeof(int)) { switch (Py_SIZE(x)) { case 0: return 0; case 1: return (int) ((PyLongObject*)x)->ob_digit[0]; } } #endif #endif if (unlikely(Py_SIZE(x) < 0)) { PyErr_SetString(PyExc_OverflowError, "can't convert negative value to int"); return (int) -1; } if (sizeof(int) <= sizeof(unsigned long)) { __PYX_VERIFY_RETURN_INT(int, unsigned long, PyLong_AsUnsignedLong) } else if (sizeof(int) <= sizeof(unsigned long long)) { __PYX_VERIFY_RETURN_INT(int, unsigned long long, PyLong_AsUnsignedLongLong) } } else { #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS if (sizeof(digit) <= sizeof(int)) { switch (Py_SIZE(x)) { case 0: return 0; case 1: return +(int) ((PyLongObject*)x)->ob_digit[0]; case -1: return -(int) ((PyLongObject*)x)->ob_digit[0]; } } #endif #endif if (sizeof(int) <= sizeof(long)) { __PYX_VERIFY_RETURN_INT(int, long, PyLong_AsLong) } else if (sizeof(int) <= sizeof(long long)) { __PYX_VERIFY_RETURN_INT(int, long long, PyLong_AsLongLong) } } { #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_Int(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_Int(x); if (!tmp) return (int) -1; val = __Pyx_PyInt_As_int(tmp); Py_DECREF(tmp); return val; } } #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS #include "longintrepr.h" #endif #endif static CYTHON_INLINE npy_int32 __Pyx_PyInt_As_npy_int32(PyObject *x) { const npy_int32 neg_one = (npy_int32) -1, const_zero = 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) } else { long val = PyInt_AS_LONG(x); if (is_unsigned && unlikely(val < 0)) { PyErr_SetString(PyExc_OverflowError, "can't convert negative value to npy_int32"); return (npy_int32) -1; } return (npy_int32) val; } } else #endif if (likely(PyLong_Check(x))) { if (is_unsigned) { #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS if (sizeof(digit) <= sizeof(npy_int32)) { switch (Py_SIZE(x)) { case 0: return 0; case 1: return (npy_int32) ((PyLongObject*)x)->ob_digit[0]; } } #endif #endif if (unlikely(Py_SIZE(x) < 0)) { PyErr_SetString(PyExc_OverflowError, "can't convert negative value to npy_int32"); return (npy_int32) -1; } if (sizeof(npy_int32) <= sizeof(unsigned long)) { __PYX_VERIFY_RETURN_INT(npy_int32, unsigned long, PyLong_AsUnsignedLong) } else if (sizeof(npy_int32) <= sizeof(unsigned long long)) { __PYX_VERIFY_RETURN_INT(npy_int32, unsigned long long, PyLong_AsUnsignedLongLong) } } else { #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS if (sizeof(digit) <= sizeof(npy_int32)) { switch (Py_SIZE(x)) { case 0: return 0; case 1: return +(npy_int32) ((PyLongObject*)x)->ob_digit[0]; case -1: return -(npy_int32) ((PyLongObject*)x)->ob_digit[0]; } } #endif #endif if (sizeof(npy_int32) <= sizeof(long)) { __PYX_VERIFY_RETURN_INT(npy_int32, long, PyLong_AsLong) } else if (sizeof(npy_int32) <= sizeof(long long)) { __PYX_VERIFY_RETURN_INT(npy_int32, long long, PyLong_AsLongLong) } } { #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_Int(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_Int(x); if (!tmp) return (npy_int32) -1; val = __Pyx_PyInt_As_npy_int32(tmp); Py_DECREF(tmp); return val; } } #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 #if CYTHON_CCOMPLEX #else static CYTHON_INLINE int __Pyx_c_eqf(__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_sumf(__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_difff(__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_prodf(__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; } static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_quotf(__pyx_t_float_complex a, __pyx_t_float_complex b) { __pyx_t_float_complex z; float denom = b.real * b.real + b.imag * b.imag; z.real = (a.real * b.real + a.imag * b.imag) / denom; z.imag = (a.imag * b.real - a.real * b.imag) / denom; return z; } static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_negf(__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_zerof(__pyx_t_float_complex a) { return (a.real == 0) && (a.imag == 0); } static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_conjf(__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_absf(__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_powf(__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_prodf(a, a); return __Pyx_c_prodf(a, a); case 3: z = __Pyx_c_prodf(a, a); return __Pyx_c_prodf(z, a); case 4: z = __Pyx_c_prodf(a, a); return __Pyx_c_prodf(z, z); } } if (a.imag == 0) { if (a.real == 0) { return a; } r = a.real; theta = 0; } else { r = __Pyx_c_absf(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 #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 #if CYTHON_CCOMPLEX #else static CYTHON_INLINE int __Pyx_c_eq(__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(__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(__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(__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; } static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_quot(__pyx_t_double_complex a, __pyx_t_double_complex b) { __pyx_t_double_complex z; double denom = b.real * b.real + b.imag * b.imag; z.real = (a.real * b.real + a.imag * b.imag) / denom; z.imag = (a.imag * b.real - a.real * b.imag) / denom; return z; } static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_neg(__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(__pyx_t_double_complex a) { return (a.real == 0) && (a.imag == 0); } static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_conj(__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(__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(__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(a, a); return __Pyx_c_prod(a, a); case 3: z = __Pyx_c_prod(a, a); return __Pyx_c_prod(z, a); case 4: z = __Pyx_c_prod(a, a); return __Pyx_c_prod(z, z); } } if (a.imag == 0) { if (a.real == 0) { return a; } r = a.real; theta = 0; } else { r = __Pyx_c_abs(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 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_ptrdiff_t(ptrdiff_t value) { const ptrdiff_t neg_one = (ptrdiff_t) -1, const_zero = 0; const int is_unsigned = neg_one > const_zero; if (is_unsigned) { if (sizeof(ptrdiff_t) < sizeof(long)) { return PyInt_FromLong((long) value); } else if (sizeof(ptrdiff_t) <= sizeof(unsigned long)) { return PyLong_FromUnsignedLong((unsigned long) value); } else if (sizeof(ptrdiff_t) <= sizeof(unsigned long long)) { return PyLong_FromUnsignedLongLong((unsigned long long) value); } } else { if (sizeof(ptrdiff_t) <= sizeof(long)) { return PyInt_FromLong((long) value); } else if (sizeof(ptrdiff_t) <= sizeof(long long)) { return PyLong_FromLongLong((long long) value); } } { int one = 1; int little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&value; return _PyLong_FromByteArray(bytes, sizeof(ptrdiff_t), little, !is_unsigned); } } static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) { const long neg_one = (long) -1, const_zero = 0; const int is_unsigned = neg_one > const_zero; if (is_unsigned) { if (sizeof(long) < sizeof(long)) { return PyInt_FromLong((long) value); } else if (sizeof(long) <= sizeof(unsigned long)) { return PyLong_FromUnsignedLong((unsigned long) value); } else if (sizeof(long) <= sizeof(unsigned long long)) { return PyLong_FromUnsignedLongLong((unsigned long long) value); } } else { if (sizeof(long) <= sizeof(long)) { return PyInt_FromLong((long) value); } else if (sizeof(long) <= sizeof(long long)) { return PyLong_FromLongLong((long long) value); } } { int one = 1; int little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&value; return _PyLong_FromByteArray(bytes, sizeof(long), little, !is_unsigned); } } #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS #include "longintrepr.h" #endif #endif static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) { const long neg_one = (long) -1, const_zero = 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) } else { long val = PyInt_AS_LONG(x); if (is_unsigned && unlikely(val < 0)) { PyErr_SetString(PyExc_OverflowError, "can't convert negative value to long"); return (long) -1; } return (long) val; } } else #endif if (likely(PyLong_Check(x))) { if (is_unsigned) { #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS if (sizeof(digit) <= sizeof(long)) { switch (Py_SIZE(x)) { case 0: return 0; case 1: return (long) ((PyLongObject*)x)->ob_digit[0]; } } #endif #endif if (unlikely(Py_SIZE(x) < 0)) { PyErr_SetString(PyExc_OverflowError, "can't convert negative value to long"); return (long) -1; } if (sizeof(long) <= sizeof(unsigned long)) { __PYX_VERIFY_RETURN_INT(long, unsigned long, PyLong_AsUnsignedLong) } else if (sizeof(long) <= sizeof(unsigned long long)) { __PYX_VERIFY_RETURN_INT(long, unsigned long long, PyLong_AsUnsignedLongLong) } } else { #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS if (sizeof(digit) <= sizeof(long)) { switch (Py_SIZE(x)) { case 0: return 0; case 1: return +(long) ((PyLongObject*)x)->ob_digit[0]; case -1: return -(long) ((PyLongObject*)x)->ob_digit[0]; } } #endif #endif if (sizeof(long) <= sizeof(long)) { __PYX_VERIFY_RETURN_INT(long, long, PyLong_AsLong) } else if (sizeof(long) <= sizeof(long long)) { __PYX_VERIFY_RETURN_INT(long, long long, PyLong_AsLongLong) } } { #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_Int(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_Int(x); if (!tmp) return (long) -1; val = __Pyx_PyInt_As_long(tmp); Py_DECREF(tmp); return val; } } 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); #if PY_VERSION_HEX < 0x02050000 return PyErr_Warn(NULL, message); #else return PyErr_WarnEx(NULL, message, 1); #endif } return 0; } #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 #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", module_name, class_name); #if PY_VERSION_HEX < 0x02050000 if (PyErr_Warn(NULL, warning) < 0) goto bad; #else if (PyErr_WarnEx(NULL, warning, 0) < 0) goto bad; #endif } else if ((size_t)basicsize != size) { PyErr_Format(PyExc_ValueError, "%.200s.%.200s has the wrong size, try recompiling", module_name, class_name); goto bad; } return (PyTypeObject *)result; bad: Py_XDECREF(py_module); Py_XDECREF(result); return NULL; } #endif 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) / 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, 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); } #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, /*int argcount,*/ 0, /*int kwonlyargcount,*/ 0, /*int nlocals,*/ 0, /*int stacksize,*/ 0, /*int flags,*/ __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, /*int firstlineno,*/ __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; PyObject *py_globals = 0; PyFrameObject *py_frame = 0; py_code = __pyx_find_code_object(c_line ? c_line : py_line); if (!py_code) { py_code = __Pyx_CreateCodeObjectForTraceback( funcname, c_line, py_line, filename); if (!py_code) goto bad; __pyx_insert_code_object(c_line ? c_line : py_line, py_code); } py_globals = PyModule_GetDict(__pyx_m); if (!py_globals) goto bad; py_frame = PyFrame_New( PyThreadState_GET(), /*PyThreadState *tstate,*/ py_code, /*PyCodeObject *code,*/ py_globals, /*PyObject *globals,*/ 0 /*PyObject *locals*/ ); if (!py_frame) goto bad; py_frame->f_lineno = py_line; PyTraceBack_Here(py_frame); bad: Py_XDECREF(py_code); Py_XDECREF(py_frame); } 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 /* Python 3+ has unicode identifiers */ if (t->is_unicode | t->is_str) { if (t->intern) { *t->p = PyUnicode_InternFromString(t->s); } else if (t->encoding) { *t->p = PyUnicode_Decode(t->s, t->n - 1, t->encoding, NULL); } else { *t->p = PyUnicode_FromStringAndSize(t->s, t->n - 1); } } else { *t->p = PyBytes_FromStringAndSize(t->s, t->n - 1); } #endif if (!*t->p) return -1; ++t; } return 0; } static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(char* c_str) { return __Pyx_PyUnicode_FromStringAndSize(c_str, strlen(c_str)); } static CYTHON_INLINE char* __Pyx_PyObject_AsString(PyObject* o) { Py_ssize_t ignore; return __Pyx_PyObject_AsStringAndSize(o, &ignore); } static CYTHON_INLINE char* __Pyx_PyObject_AsStringAndSize(PyObject* o, Py_ssize_t *length) { #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT if ( #if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII __Pyx_sys_getdefaultencoding_not_ascii && #endif PyUnicode_Check(o)) { #if PY_VERSION_HEX < 0x03030000 char* defenc_c; PyObject* defenc = _PyUnicode_AsDefaultEncodedString(o, NULL); if (!defenc) return NULL; defenc_c = PyBytes_AS_STRING(defenc); #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII { char* end = defenc_c + PyBytes_GET_SIZE(defenc); char* c; for (c = defenc_c; c < end; c++) { if ((unsigned char) (*c) >= 128) { PyUnicode_AsASCIIString(o); return NULL; } } } #endif /*__PYX_DEFAULT_STRING_ENCODING_IS_ASCII*/ *length = PyBytes_GET_SIZE(defenc); return defenc_c; #else /* PY_VERSION_HEX < 0x03030000 */ if (PyUnicode_READY(o) == -1) return NULL; #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII if (PyUnicode_IS_ASCII(o)) { *length = PyUnicode_GET_DATA_SIZE(o); return PyUnicode_AsUTF8(o); } else { PyUnicode_AsASCIIString(o); return NULL; } #else /* __PYX_DEFAULT_STRING_ENCODING_IS_ASCII */ return PyUnicode_AsUTF8AndSize(o, length); #endif /* __PYX_DEFAULT_STRING_ENCODING_IS_ASCII */ #endif /* PY_VERSION_HEX < 0x03030000 */ } else #endif /* __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT */ #if PY_VERSION_HEX >= 0x02060000 if (PyByteArray_Check(o)) { *length = PyByteArray_GET_SIZE(o); return PyByteArray_AS_STRING(o); } else #endif { char* result; int r = PyBytes_AsStringAndSize(o, &result, length); if (unlikely(r < 0)) { return NULL; } else { return result; } } } static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject* x) { int is_true = x == Py_True; if (is_true | (x == Py_False) | (x == Py_None)) return is_true; else return PyObject_IsTrue(x); } static CYTHON_INLINE PyObject* __Pyx_PyNumber_Int(PyObject* x) { PyNumberMethods *m; const char *name = NULL; PyObject *res = NULL; #if PY_MAJOR_VERSION < 3 if (PyInt_Check(x) || PyLong_Check(x)) #else if (PyLong_Check(x)) #endif return Py_INCREF(x), x; m = Py_TYPE(x)->tp_as_number; #if PY_MAJOR_VERSION < 3 if (m && m->nb_int) { name = "int"; res = PyNumber_Int(x); } else if (m && m->nb_long) { name = "long"; res = PyNumber_Long(x); } #else if (m && m->nb_int) { name = "int"; res = PyNumber_Long(x); } #endif if (res) { #if PY_MAJOR_VERSION < 3 if (!PyInt_Check(res) && !PyLong_Check(res)) { #else if (!PyLong_Check(res)) { #endif PyErr_Format(PyExc_TypeError, "__%.4s__ returned non-%.4s (type %.200s)", name, name, Py_TYPE(res)->tp_name); Py_DECREF(res); return NULL; } } else if (!PyErr_Occurred()) { PyErr_SetString(PyExc_TypeError, "an integer is required"); } return res; } #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS #include "longintrepr.h" #endif #endif 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))) return PyInt_AS_LONG(b); #endif if (likely(PyLong_CheckExact(b))) { #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS switch (Py_SIZE(b)) { case -1: return -(sdigit)((PyLongObject*)b)->ob_digit[0]; case 0: return 0; case 1: return ((PyLongObject*)b)->ob_digit[0]; } #endif #endif #if PY_VERSION_HEX < 0x02060000 return PyInt_AsSsize_t(b); #else return PyLong_AsSsize_t(b); #endif } 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) { #if PY_VERSION_HEX < 0x02050000 if (ival <= LONG_MAX) return PyInt_FromLong((long)ival); else { unsigned char *bytes = (unsigned char *) &ival; int one = 1; int little = (int)*(unsigned char*)&one; return _PyLong_FromByteArray(bytes, sizeof(size_t), little, 0); } #else return PyInt_FromSize_t(ival); #endif } #endif /* Py_PYTHON_H */ debian/control0000664000000000000000000001254012276221714010601 0ustar Source: pandas Section: python Priority: optional Maintainer: Ubuntu Developers XSBC-Original-Maintainer: NeuroDebian Team Uploaders: Yaroslav Halchenko , Michael Hanke Build-Depends: debhelper (>= 7.0.50), python-all-dev (>= 2.5), python-setuptools, cython (>= 0.17.1~), python-numpy (>= 1:1.6.1~), python-dateutil, python-scipy, python-tz, python-tables, python-sphinx (>= 1.0~), python-nose, python-matplotlib, python-tk, python-openpyxl, python-xlwt, python-xlrd, python-bs4, python-html5lib, python-six, python3-all-dev, python3-setuptools, cython3 (>= 0.17.1~) | cython (<< 0.17.1~), python3-numpy (>= 1:1.6.1~), python3-dateutil, python3-scipy, python3-tz, python3-sphinx (>= 1.0~), python3-nose, python3-matplotlib | python-matplotlib (<< 1.2.0~), python3-tk, python3-bs4, python3-six, xvfb, xauth, xclip, X-Python-Version: >= 2.7 X-Python3-Version: >= 3.2 Standards-Version: 3.9.3 Homepage: http://pandas.sourceforge.net Vcs-Browser: http://github.com/neurodebian/pandas Vcs-Git: git://github.com/neurodebian/pandas.git XS-Testsuite: autopkgtest Package: python-pandas Architecture: all Depends: ${misc:Depends}, ${python:Depends}, python-numpy (>= 1:1.6~), python-dateutil, python-pandas-lib(>= ${source:Version}), python-six, Recommends: python-scipy, python-matplotlib, python-tables, python-numexpr, python-tz, python-xlrd, python-statsmodels, python-openpyxl, python-xlwt, python-xlrd, python-bs4, python-html5lib, Provides: ${python:Provides} Suggests: python-pandas-doc Description: data structures for "relational" or "labeled" data pandas is a Python package providing fast, flexible, and expressive data structures designed to make working with "relational" or "labeled" data both easy and intuitive. It aims to be the fundamental high-level building block for doing practical, real world data analysis in Python. pandas is well suited for many different kinds of data: . - Tabular data with heterogeneously-typed columns, as in an SQL table or Excel spreadsheet - Ordered and unordered (not necessarily fixed-frequency) time series data. - Arbitrary matrix data (homogeneously typed or heterogeneous) with row and column labels - Any other form of observational / statistical data sets. The data actually need not be labeled at all to be placed into a pandas data structure . This package contains the Python 2 version. Package: python3-pandas Architecture: all Depends: ${misc:Depends}, ${python3:Depends}, python3-numpy (>= 1:1.6~), python3-dateutil, python3-pandas-lib(>= ${source:Version}) Recommends: python3-scipy, python3-matplotlib, python3-numexpr, python3-tables, python3-tz, python3-bs4, python3-html5lib, python3-six, Suggests: python-pandas-doc Description: data structures for "relational" or "labeled" data - Python 3 pandas is a Python package providing fast, flexible, and expressive data structures designed to make working with "relational" or "labeled" data both easy and intuitive. It aims to be the fundamental high-level building block for doing practical, real world data analysis in Python. pandas is well suited for many different kinds of data: . - Tabular data with heterogeneously-typed columns, as in an SQL table or Excel spreadsheet - Ordered and unordered (not necessarily fixed-frequency) time series data. - Arbitrary matrix data (homogeneously typed or heterogeneous) with row and column labels - Any other form of observational / statistical data sets. The data actually need not be labeled at all to be placed into a pandas data structure . This package contains the Python 3 version. # No doc package built due to dependency on ipython 0.11 - only experimental # Package: python-pandas-doc # Architecture: all # Section: doc # Depends: ${misc:Depends}, libjs-jquery # Suggests: python-pandas # Description: documentation and examples for pandas # This package contains documentation and example scripts for # python-pandas. Package: python-pandas-lib Architecture: any Depends: ${misc:Depends}, ${shlibs:Depends}, ${python:Depends}, python-numpy Provides: ${python:Provides} XB-Python-Version: ${python:Versions} Description: low-level implementations and bindings for pandas This is an add-on package for python-pandas providing architecture-dependent extensions. . This package contains the Python 2 version. Package: python3-pandas-lib Architecture: any Depends: ${misc:Depends}, ${shlibs:Depends}, ${python3:Depends}, python3-numpy Description: low-level implementations and bindings for pandas - Python 3 This is an add-on package for python-pandas providing architecture-dependent extensions. . This package contains the Python 3 version. debian/python3-pandas-lib.install0000664000000000000000000000005212275603610014173 0ustar usr/lib/python3/dist-packages/pandas/*.so debian/python-pandas-lib.install0000664000000000000000000000005312275603610014111 0ustar usr/lib/python2*/dist-packages/pandas/*.so debian/python-pandas-doc.links0000664000000000000000000000014412275603610013563 0ustar usr/share/javascript/jquery/jquery.js usr/share/doc/python-scikits-learn-doc/html/_static/jquery.js debian/python-pandas.install0000664000000000000000000000002212275603610013341 0ustar usr/lib/python2*/ debian/rules0000775000000000000000000001166312275603610010261 0ustar #!/usr/bin/make -f # -*- mode: makefile; coding: utf-8 -*- export DEB_BUILD_HARDENING=1 # Pass hardening flags into distutils CFLAGS = $(shell dpkg-buildflags --get CFLAGS) export CFLAGS PACKAGE2_NAME = python-pandas PACKAGE3_NAME = python3-pandas PACKAGE2_ROOT_DIR = debian/${PACKAGE2_NAME} PACKAGE3_ROOT_DIR = debian/${PACKAGE3_NAME} PYVERS = $(shell pyversions -vr) PYVER = $(shell pyversions -vd) PY3VERS = $(shell py3versions -vr) PY3VER = $(shell py3versions -vd) UVER := $(shell LC_ALL=C dpkg-parsechangelog | awk '/^Version:/{print $$2;}' | sed -e 's,-[^-]*$$,,g') MIN_CYTHONVER = 0.17.3 # Some unittests might need to be excluded for different Python versions EXCLUDE_TESTS := --exclude test_bar_log EXCLUDE_TESTS2 := EXCLUDE_TESTS3.2 := #--exclude "test_bootstrap_plot" EXCLUDE_TESTS3.3 := #--exclude "test_(bootstrap_plot|quoting|cant_compare_tz_naive_w_aware|more_flexible_frame_multi_function|yahoo)" # MPLVER := $(shell dpkg -l python-matplotlib | awk '/^ii/{print $$3;}' || echo 0) # $(shell dpkg --compare-versions $(MPLVER) lt 1.0 && echo '|test_hist|test_plot|test_boxplot|test_corr_rank' || echo '') # try to prevent unsunctioned downloads export http_proxy=http://127.0.0.1:9/ export https_proxy=http://127.0.0.1:9/ # Mega rule %: : # Explicit build system to avoid use of all-in-1 Makefile dh $@ --buildsystem=python_distutils --with python2,python3 clean_generated: find pandas/ -regex '.*\.c\(\|pp\)' | xargs grep -l -e 'Generated by Cython' | xargs -r rm -f _cythonize%: debian/rules clean_generated # force removal of previous copies python$(*:2=) setup.py cython D=debian/cythonized-files$(*:2=) && \ git rm -rf $$D; \ find pandas/ -regex '.*\.c\(\|pp\)' | while read f; do \ grep -q 'Generated by Cython' "$$f" || continue; \ mkdir -p "$$D/$$(dirname $$f)"; \ cp "$$f" "$$D/$$(dirname $$f)"; \ git add -f "$$D/$$f"; \ done; \ echo "$(UVER)" >| $$D/VERSION; git add $$D/VERSION _uncythonize%: echo "$*" | grep -q '^3' && PY=3 || PY= ; \ CYTHONVER=$$(dpkg -l cython$$PY 2>/dev/null | awk '/^ii/{print $$3;}' || echo 0); \ dpkg --compare-versions "$$CYTHONVER" lt "$(MIN_CYTHONVER)" && { \ echo "I: Using pre-Cython-ed files for Python $*"; \ cd debian/cythonized-files$$PY/ ; \ find . -regex '.*\.c\(\|pp\)' | while read f; do cp $$f ../../$$f; done; } || : cythonize: _cythonize2 _cythonize3 override_dh_clean: clean_generated : # Make sure that cythonized sources are up-to-date [ "$(UVER)" = "`cat debian/cythonized-files/VERSION`" ] rm -rf build doc/_build *-stamp # pandas.egg-info pandas/datasets/__config__.py dh_clean : # prune auto-generated version.py -- will be generated during build again rm -f pandas/version.py override_dh_auto_build: # Override default build operation which --force's re-cythonization # on elderly ubuntus : override_dh_auto_install: ${PYVERS:%=python-install%} ${PY3VERS:%=python-install%} ${PYVERS:%=python-test%} ${PY3VERS:%=python-test%} # Per Python version logic -- install, test, remomove .so (installed into -lib) python-install%: _uncythonize% python$* setup.py install --install-layout=deb --root=$(CURDIR)/debian/tmp python-test%: python-install% ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS))) echo "backend : Agg" >| $(CURDIR)/build/matplotlibrc : # Run unittests here against installed pandas echo "$*" | grep -q '^3' && PY=3 || PY=$*; \ export PYTHONPATH=`/bin/ls -d $$PWD/debian/tmp/usr/lib/python$$PY/*/`; \ export MPLCONFIGDIR=$(CURDIR)/build HOME=$(CURDIR)/build; \ python$* ci/print_versions.py; \ cd build/; xvfb-run -a -s "-screen 0 1280x1024x24 -noreset" \ python$* /usr/bin/nosetests -s -v -a '!network' $(EXCLUDE_TESTS) $(EXCLUDE_TESTS$*) pandas; else : # Skip unittests due to nocheck endif override_dh_installdocs: : # Build Documentation using installed pandas ifeq (,$(filter nodoc,$(DEB_BUILD_OPTIONS))) ifneq (,$(findstring -a,$(DH_INTERNAL_OPTIONS))) : # not building documentation in -a else : # not building documentation ATM since requires ipython 0.11 # export PYTHONPATH=`/bin/ls -d $$PWD/$(PACKAGE2_ROOT_DIR)/usr/lib/python$(PYVER)/*`; \ # export MPLCONFIGDIR=$(CURDIR)/build HOME=$(CURDIR)/build; \ # cd doc; python make.py html endif endif : # Use jquery from Debian package, so prune shipped one #TODO -rm doc/_build/html/_static/jquery.js dh_installdocs -A *.md #override_dh_installchangelogs: # dh_installchangelogs doc/whats_new.rst ## remove .so libraries from main package, and call dh_numpy* ## while removing 2 if not present _dh_python%: if [ -d debian/$(PACKAGE$*_NAME)/usr/lib ]; then \ find debian/$(PACKAGE$*_NAME)/usr/lib -name "*.so" -delete; \ fi [ -e /usr/bin/dh_numpy$(*:2=) ] && dh_numpy$(*:2=) -p$(PACKAGE$*_NAME)-lib || : dh_python$* ## "Instantiate" both rules so dh sees them override_dh_python2: _dh_python2 override_dh_python3: _dh_python3 ## immediately useable documentation and exemplar scripts/data override_dh_compress: dh_compress -X.py -X.html -X.pdf -X.css -X.jpg -X.txt -X.js -X.json -X.rtc -Xobjects.inv debian/watch0000664000000000000000000000026512275603610010226 0ustar version=3 opts="dversionmangle=s/.dfsg$//,uversionmangle=s/v//,filenamemangle=s/.*\/(.*)/pandas-$1\.tar\.gz/" \ http://github.com/pydata/pandas/tags .*archive/v?([\d\.rc]+).tar.gz debian/cythonized-files3/0000775000000000000000000000000012275603610012535 5ustar debian/cythonized-files3/VERSION0000664000000000000000000000000712275603610013602 0ustar 0.13.1 debian/cythonized-files3/pandas/0000775000000000000000000000000012275603610014003 5ustar debian/cythonized-files3/pandas/lib.c0000664000000000000000001200252212275603610014721 0ustar /* Generated by Cython 0.19.2 on Mon Feb 3 08:42:29 2014 */ #define PY_SSIZE_T_CLEAN #ifndef CYTHON_USE_PYLONG_INTERNALS #ifdef PYLONG_BITS_IN_DIGIT #define CYTHON_USE_PYLONG_INTERNALS 0 #else #include "pyconfig.h" #ifdef PYLONG_BITS_IN_DIGIT #define CYTHON_USE_PYLONG_INTERNALS 1 #else #define CYTHON_USE_PYLONG_INTERNALS 0 #endif #endif #endif #include "Python.h" #ifndef Py_PYTHON_H #error Python headers needed to compile C extensions, please install development version of Python. #elif PY_VERSION_HEX < 0x02040000 #error Cython requires Python 2.4+. #else #include /* For offsetof */ #ifndef offsetof #define offsetof(type, member) ( (size_t) & ((type*)0) -> member ) #endif #if !defined(WIN32) && !defined(MS_WINDOWS) #ifndef __stdcall #define __stdcall #endif #ifndef __cdecl #define __cdecl #endif #ifndef __fastcall #define __fastcall #endif #endif #ifndef DL_IMPORT #define DL_IMPORT(t) t #endif #ifndef DL_EXPORT #define DL_EXPORT(t) t #endif #ifndef PY_LONG_LONG #define PY_LONG_LONG LONG_LONG #endif #ifndef Py_HUGE_VAL #define Py_HUGE_VAL HUGE_VAL #endif #ifdef PYPY_VERSION #define CYTHON_COMPILING_IN_PYPY 1 #define CYTHON_COMPILING_IN_CPYTHON 0 #else #define CYTHON_COMPILING_IN_PYPY 0 #define CYTHON_COMPILING_IN_CPYTHON 1 #endif #if PY_VERSION_HEX < 0x02050000 typedef int Py_ssize_t; #define PY_SSIZE_T_MAX INT_MAX #define PY_SSIZE_T_MIN INT_MIN #define PY_FORMAT_SIZE_T "" #define CYTHON_FORMAT_SSIZE_T "" #define PyInt_FromSsize_t(z) PyInt_FromLong(z) #define PyInt_AsSsize_t(o) __Pyx_PyInt_AsInt(o) #define PyNumber_Index(o) ((PyNumber_Check(o) && !PyFloat_Check(o)) ? PyNumber_Int(o) : \ (PyErr_Format(PyExc_TypeError, \ "expected index value, got %.200s", Py_TYPE(o)->tp_name), \ (PyObject*)0)) #define __Pyx_PyIndex_Check(o) (PyNumber_Check(o) && !PyFloat_Check(o) && \ !PyComplex_Check(o)) #define PyIndex_Check __Pyx_PyIndex_Check #define PyErr_WarnEx(category, message, stacklevel) PyErr_Warn(category, message) #define __PYX_BUILD_PY_SSIZE_T "i" #else #define __PYX_BUILD_PY_SSIZE_T "n" #define CYTHON_FORMAT_SSIZE_T "z" #define __Pyx_PyIndex_Check PyIndex_Check #endif #if PY_VERSION_HEX < 0x02060000 #define Py_REFCNT(ob) (((PyObject*)(ob))->ob_refcnt) #define Py_TYPE(ob) (((PyObject*)(ob))->ob_type) #define Py_SIZE(ob) (((PyVarObject*)(ob))->ob_size) #define PyVarObject_HEAD_INIT(type, size) \ PyObject_HEAD_INIT(type) size, #define PyType_Modified(t) typedef struct { void *buf; PyObject *obj; Py_ssize_t len; Py_ssize_t itemsize; int readonly; int ndim; char *format; Py_ssize_t *shape; Py_ssize_t *strides; Py_ssize_t *suboffsets; void *internal; } Py_buffer; #define PyBUF_SIMPLE 0 #define PyBUF_WRITABLE 0x0001 #define PyBUF_FORMAT 0x0004 #define PyBUF_ND 0x0008 #define PyBUF_STRIDES (0x0010 | PyBUF_ND) #define PyBUF_C_CONTIGUOUS (0x0020 | PyBUF_STRIDES) #define PyBUF_F_CONTIGUOUS (0x0040 | PyBUF_STRIDES) #define PyBUF_ANY_CONTIGUOUS (0x0080 | PyBUF_STRIDES) #define PyBUF_INDIRECT (0x0100 | PyBUF_STRIDES) #define PyBUF_RECORDS (PyBUF_STRIDES | PyBUF_FORMAT | PyBUF_WRITABLE) #define PyBUF_FULL (PyBUF_INDIRECT | PyBUF_FORMAT | PyBUF_WRITABLE) typedef int (*getbufferproc)(PyObject *, Py_buffer *, int); typedef void (*releasebufferproc)(PyObject *, Py_buffer *); #endif #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, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) #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) #endif #if PY_MAJOR_VERSION < 3 && PY_MINOR_VERSION < 6 #define PyUnicode_FromString(s) PyUnicode_Decode(s, strlen(s), "UTF-8", "strict") #endif #if PY_MAJOR_VERSION >= 3 #define Py_TPFLAGS_CHECKTYPES 0 #define Py_TPFLAGS_HAVE_INDEX 0 #endif #if (PY_VERSION_HEX < 0x02060000) || (PY_MAJOR_VERSION >= 3) #define Py_TPFLAGS_HAVE_NEWBUFFER 0 #endif #if PY_VERSION_HEX < 0x02060000 #define Py_TPFLAGS_HAVE_VERSION_TAG 0 #endif #if PY_VERSION_HEX > 0x03030000 && defined(PyUnicode_KIND) #define CYTHON_PEP393_ENABLED 1 #define __Pyx_PyUnicode_READY(op) (likely(PyUnicode_IS_READY(op)) ? \ 0 : _PyUnicode_Ready((PyObject *)(op))) #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_LENGTH(u) #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i) #define __Pyx_PyUnicode_READ(k, d, i) PyUnicode_READ(k, d, i) #else #define CYTHON_PEP393_ENABLED 0 #define __Pyx_PyUnicode_READY(op) (0) #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_SIZE(u) #define __Pyx_PyUnicode_READ_CHAR(u, i) ((Py_UCS4)(PyUnicode_AS_UNICODE(u)[i])) #define __Pyx_PyUnicode_READ(k, d, i) ((k=k), (Py_UCS4)(((Py_UNICODE*)d)[i])) #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_VERSION_HEX < 0x02060000 #define PyBytesObject PyStringObject #define PyBytes_Type PyString_Type #define PyBytes_Check PyString_Check #define PyBytes_CheckExact PyString_CheckExact #define PyBytes_FromString PyString_FromString #define PyBytes_FromStringAndSize PyString_FromStringAndSize #define PyBytes_FromFormat PyString_FromFormat #define PyBytes_DecodeEscape PyString_DecodeEscape #define PyBytes_AsString PyString_AsString #define PyBytes_AsStringAndSize PyString_AsStringAndSize #define PyBytes_Size PyString_Size #define PyBytes_AS_STRING PyString_AS_STRING #define PyBytes_GET_SIZE PyString_GET_SIZE #define PyBytes_Repr PyString_Repr #define PyBytes_Concat PyString_Concat #define PyBytes_ConcatAndDel PyString_ConcatAndDel #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_CheckExact(obj) || PyUnicode_CheckExact(obj) || \ PyString_Check(obj) || PyUnicode_Check(obj)) #define __Pyx_PyBaseString_CheckExact(obj) (Py_TYPE(obj) == &PyBaseString_Type) #endif #if PY_VERSION_HEX < 0x02060000 #define PySet_Check(obj) PyObject_TypeCheck(obj, &PySet_Type) #define PyFrozenSet_Check(obj) PyObject_TypeCheck(obj, &PyFrozenSet_Type) #endif #ifndef PySet_CheckExact #define PySet_CheckExact(obj) (Py_TYPE(obj) == &PySet_Type) #endif #define __Pyx_TypeCheck(obj, type) PyObject_TypeCheck(obj, (PyTypeObject *)type) #if PY_MAJOR_VERSION >= 3 #define PyIntObject PyLongObject #define PyInt_Type PyLong_Type #define PyInt_Check(op) PyLong_Check(op) #define PyInt_CheckExact(op) PyLong_CheckExact(op) #define PyInt_FromString PyLong_FromString #define PyInt_FromUnicode PyLong_FromUnicode #define PyInt_FromLong PyLong_FromLong #define PyInt_FromSize_t PyLong_FromSize_t #define PyInt_FromSsize_t PyLong_FromSsize_t #define PyInt_AsLong PyLong_AsLong #define PyInt_AS_LONG PyLong_AS_LONG #define PyInt_AsSsize_t PyLong_AsSsize_t #define PyInt_AsUnsignedLongMask PyLong_AsUnsignedLongMask #define PyInt_AsUnsignedLongLongMask PyLong_AsUnsignedLongLongMask #endif #if PY_MAJOR_VERSION >= 3 #define PyBoolObject PyLongObject #endif #if PY_VERSION_HEX < 0x03020000 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) || (PY_VERSION_HEX >= 0x03010300) #define __Pyx_PySequence_GetSlice(obj, a, b) PySequence_GetSlice(obj, a, b) #define __Pyx_PySequence_SetSlice(obj, a, b, value) PySequence_SetSlice(obj, a, b, value) #define __Pyx_PySequence_DelSlice(obj, a, b) PySequence_DelSlice(obj, a, b) #else #define __Pyx_PySequence_GetSlice(obj, a, b) (unlikely(!(obj)) ? \ (PyErr_SetString(PyExc_SystemError, "null argument to internal routine"), (PyObject*)0) : \ (likely((obj)->ob_type->tp_as_mapping) ? (PySequence_GetSlice(obj, a, b)) : \ (PyErr_Format(PyExc_TypeError, "'%.200s' object is unsliceable", (obj)->ob_type->tp_name), (PyObject*)0))) #define __Pyx_PySequence_SetSlice(obj, a, b, value) (unlikely(!(obj)) ? \ (PyErr_SetString(PyExc_SystemError, "null argument to internal routine"), -1) : \ (likely((obj)->ob_type->tp_as_mapping) ? (PySequence_SetSlice(obj, a, b, value)) : \ (PyErr_Format(PyExc_TypeError, "'%.200s' object doesn't support slice assignment", (obj)->ob_type->tp_name), -1))) #define __Pyx_PySequence_DelSlice(obj, a, b) (unlikely(!(obj)) ? \ (PyErr_SetString(PyExc_SystemError, "null argument to internal routine"), -1) : \ (likely((obj)->ob_type->tp_as_mapping) ? (PySequence_DelSlice(obj, a, b)) : \ (PyErr_Format(PyExc_TypeError, "'%.200s' object doesn't support slice deletion", (obj)->ob_type->tp_name), -1))) #endif #if PY_MAJOR_VERSION >= 3 #define PyMethod_New(func, self, klass) ((self) ? PyMethod_New(func, self) : PyInstanceMethod_New(func)) #endif #if PY_VERSION_HEX < 0x02050000 #define __Pyx_GetAttrString(o,n) PyObject_GetAttrString((o),((char *)(n))) #define __Pyx_SetAttrString(o,n,a) PyObject_SetAttrString((o),((char *)(n)),(a)) #define __Pyx_DelAttrString(o,n) PyObject_DelAttrString((o),((char *)(n))) #else #define __Pyx_GetAttrString(o,n) PyObject_GetAttrString((o),(n)) #define __Pyx_SetAttrString(o,n,a) PyObject_SetAttrString((o),(n),(a)) #define __Pyx_DelAttrString(o,n) PyObject_DelAttrString((o),(n)) #endif #if PY_VERSION_HEX < 0x02050000 #define __Pyx_NAMESTR(n) ((char *)(n)) #define __Pyx_DOCSTR(n) ((char *)(n)) #else #define __Pyx_NAMESTR(n) (n) #define __Pyx_DOCSTR(n) (n) #endif #ifndef CYTHON_INLINE #if defined(__GNUC__) #define CYTHON_INLINE __inline__ #elif defined(_MSC_VER) #define CYTHON_INLINE __inline #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L #define CYTHON_INLINE inline #else #define CYTHON_INLINE #endif #endif #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 #ifdef NAN #define __PYX_NAN() ((float) NAN) #else static CYTHON_INLINE float __PYX_NAN() { /* Initialize NaN. The sign is irrelevant, an exponent with all bits 1 and a nonzero mantissa means NaN. If the first bit in the mantissa is 1, it is a quiet NaN. */ float value; memset(&value, 0xFF, sizeof(value)); return value; } #endif #if PY_MAJOR_VERSION >= 3 #define __Pyx_PyNumber_Divide(x,y) PyNumber_TrueDivide(x,y) #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceTrueDivide(x,y) #else #define __Pyx_PyNumber_Divide(x,y) PyNumber_Divide(x,y) #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceDivide(x,y) #endif #ifndef __PYX_EXTERN_C #ifdef __cplusplus #define __PYX_EXTERN_C extern "C" #else #define __PYX_EXTERN_C extern #endif #endif #if defined(WIN32) || defined(MS_WINDOWS) #define _USE_MATH_DEFINES #endif #include #define __PYX_HAVE__pandas__lib #define __PYX_HAVE_API__pandas__lib #include "string.h" #include "stdio.h" #include "stdlib.h" #include "numpy/arrayobject.h" #include "numpy/ufuncobject.h" #include "pythread.h" #include "headers/stdint.h" #include "datetime.h" #include "datetime_helper.h" #include "numpy/ndarrayobject.h" #include "numpy_helper.h" #include "numpy/npy_common.h" #include "datetime/np_datetime.h" #include "datetime/np_datetime_strings.h" #include "math.h" #include "parse_helper.h" #ifdef _OPENMP #include #endif /* _OPENMP */ #ifdef PYREX_WITHOUT_ASSERTIONS #define CYTHON_WITHOUT_ASSERTIONS #endif #ifndef CYTHON_UNUSED # if defined(__GNUC__) # if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)) # define CYTHON_UNUSED __attribute__ ((__unused__)) # else # define CYTHON_UNUSED # endif # elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER)) # define CYTHON_UNUSED __attribute__ ((__unused__)) # else # define CYTHON_UNUSED # endif #endif typedef struct {PyObject **p; char *s; const Py_ssize_t n; const char* encoding; const char is_unicode; const char is_str; const char intern; } __Pyx_StringTabEntry; /*proto*/ #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 static CYTHON_INLINE char* __Pyx_PyObject_AsString(PyObject*); static CYTHON_INLINE char* __Pyx_PyObject_AsStringAndSize(PyObject*, Py_ssize_t* length); #define __Pyx_PyBytes_FromString PyBytes_FromString #define __Pyx_PyBytes_FromStringAndSize PyBytes_FromStringAndSize static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(char*); #if PY_MAJOR_VERSION < 3 #define __Pyx_PyStr_FromString __Pyx_PyBytes_FromString #define __Pyx_PyStr_FromStringAndSize __Pyx_PyBytes_FromStringAndSize #else #define __Pyx_PyStr_FromString __Pyx_PyUnicode_FromString #define __Pyx_PyStr_FromStringAndSize __Pyx_PyUnicode_FromStringAndSize #endif #define __Pyx_PyObject_AsUString(s) ((unsigned char*) __Pyx_PyObject_AsString(s)) #define __Pyx_PyObject_FromUString(s) __Pyx_PyObject_FromString((char*)s) #define __Pyx_PyBytes_FromUString(s) __Pyx_PyBytes_FromString((char*)s) #define __Pyx_PyStr_FromUString(s) __Pyx_PyStr_FromString((char*)s) #define __Pyx_PyUnicode_FromUString(s) __Pyx_PyUnicode_FromString((char*)s) #if PY_MAJOR_VERSION < 3 static CYTHON_INLINE size_t __Pyx_Py_UNICODE_strlen(const Py_UNICODE *u) { const Py_UNICODE *u_end = u; while (*u_end++) ; return u_end - u - 1; } #else #define __Pyx_Py_UNICODE_strlen Py_UNICODE_strlen #endif #define __Pyx_PyUnicode_FromUnicode(u) PyUnicode_FromUnicode(u, __Pyx_Py_UNICODE_strlen(u)) #define __Pyx_PyUnicode_FromUnicodeAndLength PyUnicode_FromUnicode #define __Pyx_PyUnicode_AsUnicode PyUnicode_AsUnicode #define __Pyx_Owned_Py_None(b) (Py_INCREF(Py_None), Py_None) #define __Pyx_PyBool_FromLong(b) ((b) ? (Py_INCREF(Py_True), Py_True) : (Py_INCREF(Py_False), Py_False)) static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*); static CYTHON_INLINE PyObject* __Pyx_PyNumber_Int(PyObject* x); static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*); static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t); static CYTHON_INLINE size_t __Pyx_PyInt_AsSize_t(PyObject*); #if CYTHON_COMPILING_IN_CPYTHON #define __pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x)) #else #define __pyx_PyFloat_AsDouble(x) PyFloat_AsDouble(x) #endif #define __pyx_PyFloat_AsFloat(x) ((float) __pyx_PyFloat_AsDouble(x)) #if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII static int __Pyx_sys_getdefaultencoding_not_ascii; static int __Pyx_init_sys_getdefaultencoding_params() { PyObject* sys = NULL; PyObject* default_encoding = NULL; PyObject* ascii_chars_u = NULL; PyObject* ascii_chars_b = NULL; sys = PyImport_ImportModule("sys"); if (sys == NULL) goto bad; default_encoding = PyObject_CallMethod(sys, (char*) (const char*) "getdefaultencoding", NULL); if (default_encoding == NULL) goto bad; if (strcmp(PyBytes_AsString(default_encoding), "ascii") == 0) { __Pyx_sys_getdefaultencoding_not_ascii = 0; } else { const char* default_encoding_c = PyBytes_AS_STRING(default_encoding); 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 == NULL) goto bad; ascii_chars_b = PyUnicode_AsEncodedString(ascii_chars_u, default_encoding_c, NULL); if (ascii_chars_b == NULL || strncmp(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 '%s' is not a superset of ascii.", default_encoding_c); goto bad; } } Py_XDECREF(sys); Py_XDECREF(default_encoding); Py_XDECREF(ascii_chars_u); Py_XDECREF(ascii_chars_b); return 0; bad: Py_XDECREF(sys); 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() { PyObject* sys = NULL; PyObject* default_encoding = NULL; char* default_encoding_c; sys = PyImport_ImportModule("sys"); if (sys == NULL) goto bad; default_encoding = PyObject_CallMethod(sys, (char*) (const char*) "getdefaultencoding", NULL); if (default_encoding == NULL) goto bad; default_encoding_c = PyBytes_AS_STRING(default_encoding); __PYX_DEFAULT_STRING_ENCODING = (char*) malloc(strlen(default_encoding_c)); strcpy(__PYX_DEFAULT_STRING_ENCODING, default_encoding_c); Py_DECREF(sys); Py_DECREF(default_encoding); return 0; bad: Py_XDECREF(sys); Py_XDECREF(default_encoding); return -1; } #endif #endif #ifdef __GNUC__ /* Test for GCC > 2.95 */ #if __GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95)) #define likely(x) __builtin_expect(!!(x), 1) #define unlikely(x) __builtin_expect(!!(x), 0) #else /* __GNUC__ > 2 ... */ #define likely(x) (x) #define unlikely(x) (x) #endif /* __GNUC__ > 2 ... */ #else /* __GNUC__ */ #define likely(x) (x) #define unlikely(x) (x) #endif /* __GNUC__ */ static PyObject *__pyx_m; static PyObject *__pyx_d; static PyObject *__pyx_b; static PyObject *__pyx_empty_tuple; static PyObject *__pyx_empty_bytes; static int __pyx_lineno; static int __pyx_clineno = 0; static const char * __pyx_cfilenm= __FILE__; static const char *__pyx_filename; #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[] = { "reduce.pyx", "inference.pyx", "lib.pyx", "properties.pyx", "datetime.pxd", "util.pxd", "numpy.pxd", "type.pxd", "bool.pxd", "complex.pxd", }; #define IS_UNSIGNED(type) (((type) -1) > 0) struct __Pyx_StructField_; #define __PYX_BUF_FLAGS_PACKED_STRUCT (1 << 0) typedef struct { const char* name; /* for error messages only */ struct __Pyx_StructField_* fields; size_t size; /* sizeof(type) */ size_t arraysize[8]; /* length of array in each dimension */ int ndim; char typegroup; /* _R_eal, _C_omplex, Signed _I_nt, _U_nsigned int, _S_truct, _P_ointer, _O_bject, c_H_ar */ 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; /* "numpy.pxd":726 * # 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; /* "numpy.pxd":727 * * 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; /* "numpy.pxd":728 * 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; /* "numpy.pxd":729 * 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; /* "numpy.pxd":733 * #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; /* "numpy.pxd":734 * * 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; /* "numpy.pxd":735 * 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; /* "numpy.pxd":736 * 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; /* "numpy.pxd":740 * #ctypedef npy_uint128 uint128_t * * ctypedef npy_float16 float16_t # <<<<<<<<<<<<<< * ctypedef npy_float32 float32_t * ctypedef npy_float64 float64_t */ typedef npy_float16 __pyx_t_5numpy_float16_t; /* "numpy.pxd":741 * * ctypedef npy_float16 float16_t * ctypedef npy_float32 float32_t # <<<<<<<<<<<<<< * ctypedef npy_float64 float64_t * #ctypedef npy_float80 float80_t */ typedef npy_float32 __pyx_t_5numpy_float32_t; /* "numpy.pxd":742 * ctypedef npy_float16 float16_t * 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; /* "numpy.pxd":751 * # 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; /* "numpy.pxd":752 * # 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; /* "numpy.pxd":753 * 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; /* "numpy.pxd":755 * 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; /* "numpy.pxd":756 * * ctypedef npy_ulong uint_t * ctypedef npy_ulonglong ulong_t # <<<<<<<<<<<<<< * ctypedef npy_ulonglong ulonglong_t * */ typedef npy_ulonglong __pyx_t_5numpy_ulong_t; /* "numpy.pxd":757 * 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; /* "numpy.pxd":759 * ctypedef npy_ulonglong ulonglong_t * * ctypedef npy_intp intp_t # <<<<<<<<<<<<<< * ctypedef npy_uintp uintp_t * */ typedef npy_intp __pyx_t_5numpy_intp_t; /* "numpy.pxd":760 * * ctypedef npy_intp intp_t * ctypedef npy_uintp uintp_t # <<<<<<<<<<<<<< * * ctypedef npy_double float_t */ typedef npy_uintp __pyx_t_5numpy_uintp_t; /* "numpy.pxd":762 * 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; /* "numpy.pxd":763 * * ctypedef npy_double float_t * ctypedef npy_double double_t # <<<<<<<<<<<<<< * ctypedef npy_longdouble longdouble_t * */ typedef npy_double __pyx_t_5numpy_double_t; /* "numpy.pxd":764 * 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; /* "pandas/lib.pyx":40 * cdef int64_t NPY_NAT = util.get_nat() * * ctypedef unsigned char UChar # <<<<<<<<<<<<<< * * cimport util */ typedef unsigned char __pyx_t_6pandas_3lib_UChar; #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 #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 /*--- Type declarations ---*/ struct __pyx_obj_6pandas_3lib___pyx_scope_struct_1_try_parse_date_and_time; struct __pyx_obj_6pandas_3lib_Reducer; struct __pyx_obj_6pandas_3lib_AxisProperty; struct __pyx_obj_6pandas_3lib__PandasNull; struct __pyx_obj_6pandas_3lib___pyx_scope_struct__try_parse_dates; struct __pyx_obj_6pandas_3lib_SeriesBinGrouper; struct __pyx_obj_6pandas_3lib_BlockSlider; struct __pyx_obj_6pandas_3lib_cache_readonly; struct __pyx_obj_6pandas_3lib_SeriesGrouper; struct __pyx_obj_6pandas_3lib_Slider; /* "numpy.pxd":766 * 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; /* "numpy.pxd":767 * * ctypedef npy_cfloat cfloat_t * ctypedef npy_cdouble cdouble_t # <<<<<<<<<<<<<< * ctypedef npy_clongdouble clongdouble_t * */ typedef npy_cdouble __pyx_t_5numpy_cdouble_t; /* "numpy.pxd":768 * 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; /* "numpy.pxd":770 * 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/src/inference.pyx":677 * return result * * def try_parse_date_and_time(ndarray[object] dates, ndarray[object] times, # <<<<<<<<<<<<<< * date_parser=None, time_parser=None, * dayfirst=False,default=None): */ struct __pyx_obj_6pandas_3lib___pyx_scope_struct_1_try_parse_date_and_time { PyObject_HEAD PyObject *__pyx_v_date; PyObject *__pyx_v_dayfirst; PyObject *__pyx_v_default; PyObject *__pyx_v_parse; PyObject *__pyx_v_time; }; /* "pandas/src/reduce.pyx":9 * is_numpy_prior_1_6_2 = LooseVersion(np.__version__) < '1.6.2' * * cdef class Reducer: # <<<<<<<<<<<<<< * ''' * Performs generic reduction operation on a C or Fortran-contiguous ndarray */ struct __pyx_obj_6pandas_3lib_Reducer { PyObject_HEAD Py_ssize_t increment; Py_ssize_t chunksize; Py_ssize_t nresults; PyObject *arr; PyObject *dummy; PyObject *f; PyObject *labels; PyObject *typ; PyObject *index; }; /* "pandas/src/properties.pyx":53 * PyDict_SetItem(cache, self.name, value) * * cdef class AxisProperty(object): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t axis */ struct __pyx_obj_6pandas_3lib_AxisProperty { PyObject_HEAD Py_ssize_t axis; }; /* "pandas/lib.pyx":1056 * return counts * * cdef class _PandasNull: # <<<<<<<<<<<<<< * * def __richcmp__(_PandasNull self, object other, int op): */ struct __pyx_obj_6pandas_3lib__PandasNull { PyObject_HEAD }; /* "pandas/src/inference.pyx":629 * return maybe_convert_objects(x, try_float=1) * * def try_parse_dates(ndarray[object] values, parser=None, # <<<<<<<<<<<<<< * dayfirst=False,default=None): * cdef: */ struct __pyx_obj_6pandas_3lib___pyx_scope_struct__try_parse_dates { PyObject_HEAD PyObject *__pyx_v_dayfirst; PyObject *__pyx_v_default; PyObject *__pyx_v_parse; }; /* "pandas/src/reduce.pyx":157 * * * cdef class SeriesBinGrouper: # <<<<<<<<<<<<<< * ''' * Performs grouping operation according to bin edges, rather than labels */ struct __pyx_obj_6pandas_3lib_SeriesBinGrouper { PyObject_HEAD Py_ssize_t nresults; Py_ssize_t ngroups; int passed_dummy; PyObject *arr; PyObject *index; PyObject *dummy_arr; PyObject *dummy_index; PyObject *values; PyObject *f; PyObject *bins; PyObject *typ; PyObject *name; }; /* "pandas/src/reduce.pyx":529 * return results, mutated * * cdef class BlockSlider: # <<<<<<<<<<<<<< * ''' * Only capable of sliding on axis=0 */ struct __pyx_obj_6pandas_3lib_BlockSlider { PyObject_HEAD struct __pyx_vtabstruct_6pandas_3lib_BlockSlider *__pyx_vtab; PyObject *frame; PyObject *dummy; int nblocks; struct __pyx_obj_6pandas_3lib_Slider *idx_slider; PyObject *blocks; char **base_ptrs; }; /* "pandas/src/properties.pyx":4 * * * cdef class cache_readonly(object): # <<<<<<<<<<<<<< * * cdef readonly: */ struct __pyx_obj_6pandas_3lib_cache_readonly { PyObject_HEAD PyObject *func; PyObject *name; PyObject *allow_setting; }; /* "pandas/src/reduce.pyx":285 * * * cdef class SeriesGrouper: # <<<<<<<<<<<<<< * ''' * Performs generic grouping operation while avoiding ndarray construction */ struct __pyx_obj_6pandas_3lib_SeriesGrouper { PyObject_HEAD Py_ssize_t nresults; Py_ssize_t ngroups; int passed_dummy; PyObject *arr; PyObject *index; PyObject *dummy_arr; PyObject *dummy_index; PyObject *f; PyObject *labels; PyObject *values; PyObject *typ; PyObject *name; }; /* "pandas/src/reduce.pyx":426 * return res * * cdef class Slider: # <<<<<<<<<<<<<< * ''' * Only handles contiguous data for now */ struct __pyx_obj_6pandas_3lib_Slider { PyObject_HEAD struct __pyx_vtabstruct_6pandas_3lib_Slider *__pyx_vtab; PyArrayObject *values; PyArrayObject *buf; Py_ssize_t stride; Py_ssize_t orig_len; Py_ssize_t orig_stride; char *orig_data; }; struct __pyx_vtabstruct_6pandas_3lib_Slider { PyObject *(*advance)(struct __pyx_obj_6pandas_3lib_Slider *, Py_ssize_t, int __pyx_skip_dispatch); PyObject *(*move)(struct __pyx_obj_6pandas_3lib_Slider *, int, int); PyObject *(*set_length)(struct __pyx_obj_6pandas_3lib_Slider *, Py_ssize_t, int __pyx_skip_dispatch); PyObject *(*reset)(struct __pyx_obj_6pandas_3lib_Slider *, int __pyx_skip_dispatch); }; static struct __pyx_vtabstruct_6pandas_3lib_Slider *__pyx_vtabptr_6pandas_3lib_Slider; /* "pandas/src/reduce.pyx":529 * return results, mutated * * cdef class BlockSlider: # <<<<<<<<<<<<<< * ''' * Only capable of sliding on axis=0 */ struct __pyx_vtabstruct_6pandas_3lib_BlockSlider { PyObject *(*move)(struct __pyx_obj_6pandas_3lib_BlockSlider *, int, int, int __pyx_skip_dispatch); PyObject *(*reset)(struct __pyx_obj_6pandas_3lib_BlockSlider *); }; static struct __pyx_vtabstruct_6pandas_3lib_BlockSlider *__pyx_vtabptr_6pandas_3lib_BlockSlider; #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); /*proto*/ #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 /* CYTHON_REFNANNY */ #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) #if CYTHON_COMPILING_IN_CPYTHON static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name) { PyTypeObject* tp = Py_TYPE(obj); if (likely(tp->tp_getattro)) return tp->tp_getattro(obj, attr_name); #if PY_MAJOR_VERSION < 3 if (likely(tp->tp_getattr)) return tp->tp_getattr(obj, PyString_AS_STRING(attr_name)); #endif return PyObject_GetAttr(obj, attr_name); } #else #define __Pyx_PyObject_GetAttrStr(o,n) PyObject_GetAttr(o,n) #endif static PyObject *__Pyx_GetBuiltinName(PyObject *name); /*proto*/ #define __Pyx_GetItemInt(o, i, size, to_py_func, is_list, wraparound, boundscheck) \ (((size) <= sizeof(Py_ssize_t)) ? \ __Pyx_GetItemInt_Fast(o, i, is_list, wraparound, boundscheck) : \ __Pyx_GetItemInt_Generic(o, to_py_func(i))) #define __Pyx_GetItemInt_List(o, i, size, to_py_func, is_list, wraparound, boundscheck) \ (((size) <= sizeof(Py_ssize_t)) ? \ __Pyx_GetItemInt_List_Fast(o, i, wraparound, boundscheck) : \ __Pyx_GetItemInt_Generic(o, to_py_func(i))) static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i, int wraparound, int boundscheck); #define __Pyx_GetItemInt_Tuple(o, i, size, to_py_func, is_list, wraparound, boundscheck) \ (((size) <= sizeof(Py_ssize_t)) ? \ __Pyx_GetItemInt_Tuple_Fast(o, i, wraparound, boundscheck) : \ __Pyx_GetItemInt_Generic(o, to_py_func(i))) static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i, int wraparound, int boundscheck); static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j); static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, int is_list, int wraparound, int boundscheck); static int __Pyx_ArgTypeTest(PyObject *obj, PyTypeObject *type, int none_allowed, const char *name, int exact); /*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); /*proto*/ static void __Pyx_RaiseDoubleKeywordsError(const char* func_name, PyObject* kw_name); /*proto*/ static int __Pyx_ParseOptionalKeywords(PyObject *kwds, PyObject **argnames[], \ PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args, \ const char* function_name); /*proto*/ static CYTHON_INLINE PyObject *__Pyx_GetModuleGlobalName(PyObject *name); /*proto*/ static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type); /*proto*/ static CYTHON_INLINE int __Pyx_GetBufferAndValidate(Py_buffer* buf, PyObject* obj, __Pyx_TypeInfo* dtype, int flags, int nd, int cast, __Pyx_BufFmt_StackElem* stack); static CYTHON_INLINE void __Pyx_SafeReleaseBuffer(Py_buffer* info); static void __Pyx_RaiseBufferFallbackError(void); /*proto*/ static CYTHON_INLINE int __Pyx_PySequence_Contains(PyObject* item, PyObject* seq, int eq) { int result = PySequence_Contains(seq, item); return unlikely(result < 0) ? result : (result == (eq == Py_EQ)); } static void __Pyx_RaiseBufferIndexError(int axis); /*proto*/ #define __Pyx_BufPtrStrided1d(type, buf, i0, s0) (type)((char*)buf + i0 * s0) static CYTHON_INLINE void __Pyx_ErrRestore(PyObject *type, PyObject *value, PyObject *tb); /*proto*/ static CYTHON_INLINE void __Pyx_ErrFetch(PyObject **type, PyObject **value, PyObject **tb); /*proto*/ static void __Pyx_WriteUnraisable(const char *name, int clineno, int lineno, const char *filename); /*proto*/ static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected); static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index); static CYTHON_INLINE int __Pyx_IterFinish(void); /*proto*/ static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected); /*proto*/ #define __Pyx_BufPtrStrided2d(type, buf, i0, s0, i1, s1) (type)((char*)buf + i0 * s0 + i1 * s1) static CYTHON_INLINE int __Pyx_PyDict_Contains(PyObject* item, PyObject* dict, int eq) { int result = PyDict_Contains(dict, item); return unlikely(result < 0) ? result : (result == (eq == Py_EQ)); } #if CYTHON_COMPILING_IN_CPYTHON static CYTHON_INLINE int __Pyx_PyList_Append(PyObject* list, PyObject* x) { PyListObject* L = (PyListObject*) list; Py_ssize_t len = Py_SIZE(list); if (likely(L->allocated > len) & likely(len > (L->allocated >> 1))) { Py_INCREF(x); PyList_SET_ITEM(list, len, x); Py_SIZE(list) = len+1; return 0; } return PyList_Append(list, x); } #else #define __Pyx_PyList_Append(L,x) PyList_Append(L,x) #endif #if PY_MAJOR_VERSION >= 3 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; } #else #define __Pyx_PyDict_GetItem(d, key) PyObject_GetItem(d, key) #endif static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause); /*proto*/ static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name); /*proto*/ static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb); /*proto*/ #define __Pyx_SetItemInt(o, i, v, size, to_py_func, is_list, wraparound, boundscheck) \ (((size) <= sizeof(Py_ssize_t)) ? \ __Pyx_SetItemInt_Fast(o, i, v, is_list, wraparound, boundscheck) : \ __Pyx_SetItemInt_Generic(o, to_py_func(i), v)) static CYTHON_INLINE int __Pyx_SetItemInt_Generic(PyObject *o, PyObject *j, PyObject *v); static CYTHON_INLINE int __Pyx_SetItemInt_Fast(PyObject *o, Py_ssize_t i, PyObject *v, int is_list, int wraparound, int boundscheck); #if CYTHON_COMPILING_IN_CPYTHON static CYTHON_INLINE int __Pyx_ListComp_Append(PyObject* list, PyObject* x) { PyListObject* L = (PyListObject*) list; Py_ssize_t len = Py_SIZE(list); if (likely(L->allocated > len)) { Py_INCREF(x); PyList_SET_ITEM(list, len, x); Py_SIZE(list) = len+1; return 0; } return PyList_Append(list, x); } #else #define __Pyx_ListComp_Append(L,x) PyList_Append(L,x) #endif static CYTHON_INLINE int __Pyx_mod_int(int, int); /* proto */ #ifndef __PYX_FORCE_INIT_THREADS #define __PYX_FORCE_INIT_THREADS 0 #endif #define __Pyx_PyObject_DelSlice(obj, cstart, cstop, py_start, py_stop, py_slice, has_cstart, has_cstop, wraparound) \ __Pyx_PyObject_SetSlice(obj, (PyObject*)NULL, cstart, cstop, py_start, py_stop, py_slice, has_cstart, has_cstop, wraparound) static CYTHON_INLINE int __Pyx_PyObject_SetSlice( PyObject* obj, PyObject* value, Py_ssize_t cstart, Py_ssize_t cstop, PyObject** py_start, PyObject** py_stop, PyObject** py_slice, int has_cstart, int has_cstop, int wraparound); static CYTHON_INLINE long __Pyx_mod_long(long, long); /* proto */ #if CYTHON_COMPILING_IN_CPYTHON static CYTHON_INLINE PyObject* __Pyx_PyList_GetSlice(PyObject* src, Py_ssize_t start, Py_ssize_t stop); static CYTHON_INLINE PyObject* __Pyx_PyTuple_GetSlice(PyObject* src, Py_ssize_t start, Py_ssize_t stop); #else #define __Pyx_PyList_GetSlice(seq, start, stop) PySequence_GetSlice(seq, start, stop) #define __Pyx_PyTuple_GetSlice(seq, start, stop) PySequence_GetSlice(seq, start, stop) #endif static CYTHON_INLINE PyObject* __Pyx_PyObject_GetSlice( PyObject* obj, Py_ssize_t cstart, Py_ssize_t cstop, PyObject** py_start, PyObject** py_stop, PyObject** py_slice, int has_cstart, int has_cstop, int wraparound); static CYTHON_INLINE PyObject *__Pyx_GetAttr(PyObject *, PyObject *); /*proto*/ static CYTHON_INLINE PyObject *__Pyx_GetAttr3(PyObject *, PyObject *, PyObject *); /*proto*/ static CYTHON_INLINE void __Pyx_RaiseUnboundLocalError(const char *varname); #if CYTHON_COMPILING_IN_CPYTHON #define __Pyx_PyObject_DelAttrStr(o,n) __Pyx_PyObject_SetAttrStr(o,n,NULL) static CYTHON_INLINE int __Pyx_PyObject_SetAttrStr(PyObject* obj, PyObject* attr_name, PyObject* value) { PyTypeObject* tp = Py_TYPE(obj); if (likely(tp->tp_setattro)) return tp->tp_setattro(obj, attr_name, value); #if PY_MAJOR_VERSION < 3 if (likely(tp->tp_setattr)) return tp->tp_setattr(obj, PyString_AS_STRING(attr_name), value); #endif return PyObject_SetAttr(obj, attr_name, value); } #else #define __Pyx_PyObject_DelAttrStr(o,n) PyObject_DelAttr(o,n) #define __Pyx_PyObject_SetAttrStr(o,n,v) PyObject_SetAttr(o,n,v) #endif #define __Pyx_PyDict_Clear(d) (PyDict_Clear(d), 0) static double __Pyx__PyObject_AsDouble(PyObject* obj); /* proto */ #if CYTHON_COMPILING_IN_PYPY #define __Pyx_PyObject_AsDouble(obj) \ (likely(PyFloat_CheckExact(obj)) ? PyFloat_AS_DOUBLE(obj) : \ likely(PyInt_CheckExact(obj)) ? \ PyFloat_AsDouble(obj) : __Pyx__PyObject_AsDouble(obj)) #else #define __Pyx_PyObject_AsDouble(obj) \ ((likely(PyFloat_CheckExact(obj))) ? \ PyFloat_AS_DOUBLE(obj) : __Pyx__PyObject_AsDouble(obj)) #endif static CYTHON_INLINE void __Pyx_RaiseClosureNameError(const char *varname); #define __Pyx_CyFunction_USED 1 #include #define __Pyx_CYFUNCTION_STATICMETHOD 0x01 #define __Pyx_CYFUNCTION_CLASSMETHOD 0x02 #define __Pyx_CYFUNCTION_CCLASS 0x04 #define __Pyx_CyFunction_GetClosure(f) \ (((__pyx_CyFunctionObject *) (f))->func_closure) #define __Pyx_CyFunction_GetClassObj(f) \ (((__pyx_CyFunctionObject *) (f))->func_classobj) #define __Pyx_CyFunction_Defaults(type, f) \ ((type *)(((__pyx_CyFunctionObject *) (f))->defaults)) #define __Pyx_CyFunction_SetDefaultsGetter(f, g) \ ((__pyx_CyFunctionObject *) (f))->defaults_getter = (g) typedef struct { PyCFunctionObject func; int flags; PyObject *func_dict; PyObject *func_weakreflist; PyObject *func_name; PyObject *func_qualname; PyObject *func_doc; PyObject *func_code; PyObject *func_closure; PyObject *func_classobj; /* No-args super() class cell */ void *defaults; int defaults_pyobjects; PyObject *defaults_tuple; /* Const defaults tuple */ PyObject *defaults_kwdict; /* Const kwonly defaults dict */ PyObject *(*defaults_getter)(PyObject *); PyObject *func_annotations; /* function annotations dict */ } __pyx_CyFunctionObject; static PyTypeObject *__pyx_CyFunctionType = 0; #define __Pyx_CyFunction_NewEx(ml, flags, qualname, self, module, code) \ __Pyx_CyFunction_New(__pyx_CyFunctionType, ml, flags, qualname, self, module, code) static PyObject *__Pyx_CyFunction_New(PyTypeObject *, PyMethodDef *ml, int flags, PyObject* qualname, PyObject *self, PyObject *module, PyObject* code); static CYTHON_INLINE void *__Pyx_CyFunction_InitDefaults(PyObject *m, size_t size, int pyobjects); static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *m, PyObject *tuple); static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *m, PyObject *dict); static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *m, PyObject *dict); static int __Pyx_CyFunction_init(void); #if PY_VERSION_HEX < 0x02050000 #ifndef PyAnySet_CheckExact #define PyAnySet_CheckExact(ob) \ ((ob)->ob_type == &PySet_Type || \ (ob)->ob_type == &PyFrozenSet_Type) #define PySet_New(iterable) \ PyObject_CallFunctionObjArgs((PyObject *)&PySet_Type, (iterable), NULL) #define Pyx_PyFrozenSet_New(iterable) \ PyObject_CallFunctionObjArgs((PyObject *)&PyFrozenSet_Type, (iterable), NULL) #define PySet_Size(anyset) \ PyObject_Size((anyset)) #define PySet_Contains(anyset, key) \ PySequence_Contains((anyset), (key)) #define PySet_Pop(set) \ PyObject_CallMethod(set, (char *)"pop", NULL) static CYTHON_INLINE int PySet_Clear(PyObject *set) { PyObject *ret = PyObject_CallMethod(set, (char *)"clear", NULL); if (!ret) return -1; Py_DECREF(ret); return 0; } static CYTHON_INLINE int PySet_Discard(PyObject *set, PyObject *key) { PyObject *ret = PyObject_CallMethod(set, (char *)"discard", (char *)"O", key); if (!ret) return -1; Py_DECREF(ret); return 0; } static CYTHON_INLINE int PySet_Add(PyObject *set, PyObject *key) { PyObject *ret = PyObject_CallMethod(set, (char *)"add", (char *)"O", key); if (!ret) return -1; Py_DECREF(ret); return 0; } #endif /* PyAnySet_CheckExact (<= Py2.4) */ #endif /* < Py2.5 */ static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void); #include static int __Pyx_SetVtable(PyObject *dict, void *vtable); /*proto*/ static CYTHON_INLINE void __Pyx_ExceptionSave(PyObject **type, PyObject **value, PyObject **tb); /*proto*/ static void __Pyx_ExceptionReset(PyObject *type, PyObject *value, PyObject *tb); /*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 static Py_ssize_t __Pyx_zeros[] = {0, 0, 0, 0, 0, 0, 0, 0}; static Py_ssize_t __Pyx_minusones[] = {-1, -1, -1, -1, -1, -1, -1, -1}; static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level); /*proto*/ static CYTHON_INLINE npy_int64 __Pyx_PyInt_from_py_npy_int64(PyObject *); static PyObject *__Pyx_FindPy2Metaclass(PyObject *bases); /*proto*/ static PyObject *__Pyx_CreateClass(PyObject *bases, PyObject *dict, PyObject *name, PyObject *qualname, PyObject *modname); /*proto*/ static CYTHON_INLINE PyObject *__Pyx_PyInt_to_py_npy_int64(npy_int64); static CYTHON_INLINE PyObject *__Pyx_PyInt_to_py_Py_intptr_t(Py_intptr_t); #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(_WIN32) && defined(__cplusplus) && CYTHON_CCOMPLEX #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 static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double, double); #if CYTHON_CCOMPLEX #define __Pyx_c_eq(a, b) ((a)==(b)) #define __Pyx_c_sum(a, b) ((a)+(b)) #define __Pyx_c_diff(a, b) ((a)-(b)) #define __Pyx_c_prod(a, b) ((a)*(b)) #define __Pyx_c_quot(a, b) ((a)/(b)) #define __Pyx_c_neg(a) (-(a)) #ifdef __cplusplus #define __Pyx_c_is_zero(z) ((z)==(double)0) #define __Pyx_c_conj(z) (::std::conj(z)) #if 1 #define __Pyx_c_abs(z) (::std::abs(z)) #define __Pyx_c_pow(a, b) (::std::pow(a, b)) #endif #else #define __Pyx_c_is_zero(z) ((z)==0) #define __Pyx_c_conj(z) (conj(z)) #if 1 #define __Pyx_c_abs(z) (cabs(z)) #define __Pyx_c_pow(a, b) (cpow(a, b)) #endif #endif #else static CYTHON_INLINE int __Pyx_c_eq(__pyx_t_double_complex, __pyx_t_double_complex); static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_sum(__pyx_t_double_complex, __pyx_t_double_complex); static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_diff(__pyx_t_double_complex, __pyx_t_double_complex); static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_prod(__pyx_t_double_complex, __pyx_t_double_complex); static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_quot(__pyx_t_double_complex, __pyx_t_double_complex); static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_neg(__pyx_t_double_complex); static CYTHON_INLINE int __Pyx_c_is_zero(__pyx_t_double_complex); static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_conj(__pyx_t_double_complex); #if 1 static CYTHON_INLINE double __Pyx_c_abs(__pyx_t_double_complex); static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_pow(__pyx_t_double_complex, __pyx_t_double_complex); #endif #endif static __pyx_t_double_complex __Pyx_PyComplex_As___pyx_t_double_complex(PyObject*); static CYTHON_INLINE npy_uint8 __Pyx_PyInt_from_py_npy_uint8(PyObject *); static CYTHON_INLINE npy_int32 __Pyx_PyInt_from_py_npy_int32(PyObject *); static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float, float); #if CYTHON_CCOMPLEX #define __Pyx_c_eqf(a, b) ((a)==(b)) #define __Pyx_c_sumf(a, b) ((a)+(b)) #define __Pyx_c_difff(a, b) ((a)-(b)) #define __Pyx_c_prodf(a, b) ((a)*(b)) #define __Pyx_c_quotf(a, b) ((a)/(b)) #define __Pyx_c_negf(a) (-(a)) #ifdef __cplusplus #define __Pyx_c_is_zerof(z) ((z)==(float)0) #define __Pyx_c_conjf(z) (::std::conj(z)) #if 1 #define __Pyx_c_absf(z) (::std::abs(z)) #define __Pyx_c_powf(a, b) (::std::pow(a, b)) #endif #else #define __Pyx_c_is_zerof(z) ((z)==0) #define __Pyx_c_conjf(z) (conjf(z)) #if 1 #define __Pyx_c_absf(z) (cabsf(z)) #define __Pyx_c_powf(a, b) (cpowf(a, b)) #endif #endif #else static CYTHON_INLINE int __Pyx_c_eqf(__pyx_t_float_complex, __pyx_t_float_complex); static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_sumf(__pyx_t_float_complex, __pyx_t_float_complex); static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_difff(__pyx_t_float_complex, __pyx_t_float_complex); static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_prodf(__pyx_t_float_complex, __pyx_t_float_complex); static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_quotf(__pyx_t_float_complex, __pyx_t_float_complex); static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_negf(__pyx_t_float_complex); static CYTHON_INLINE int __Pyx_c_is_zerof(__pyx_t_float_complex); static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_conjf(__pyx_t_float_complex); #if 1 static CYTHON_INLINE float __Pyx_c_absf(__pyx_t_float_complex); static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_powf(__pyx_t_float_complex, __pyx_t_float_complex); #endif #endif static CYTHON_INLINE unsigned char __Pyx_PyInt_AsUnsignedChar(PyObject *); static CYTHON_INLINE unsigned short __Pyx_PyInt_AsUnsignedShort(PyObject *); static CYTHON_INLINE unsigned int __Pyx_PyInt_AsUnsignedInt(PyObject *); static CYTHON_INLINE char __Pyx_PyInt_AsChar(PyObject *); static CYTHON_INLINE short __Pyx_PyInt_AsShort(PyObject *); static CYTHON_INLINE int __Pyx_PyInt_AsInt(PyObject *); static CYTHON_INLINE signed char __Pyx_PyInt_AsSignedChar(PyObject *); static CYTHON_INLINE signed short __Pyx_PyInt_AsSignedShort(PyObject *); static CYTHON_INLINE signed int __Pyx_PyInt_AsSignedInt(PyObject *); static CYTHON_INLINE int __Pyx_PyInt_AsLongDouble(PyObject *); static CYTHON_INLINE unsigned long __Pyx_PyInt_AsUnsignedLong(PyObject *); static CYTHON_INLINE unsigned PY_LONG_LONG __Pyx_PyInt_AsUnsignedLongLong(PyObject *); static CYTHON_INLINE long __Pyx_PyInt_AsLong(PyObject *); static CYTHON_INLINE PY_LONG_LONG __Pyx_PyInt_AsLongLong(PyObject *); static CYTHON_INLINE signed long __Pyx_PyInt_AsSignedLong(PyObject *); static CYTHON_INLINE signed PY_LONG_LONG __Pyx_PyInt_AsSignedLongLong(PyObject *); static int __Pyx_check_binary_version(void); #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 static PyObject *__Pyx_ImportModule(const char *name); /*proto*/ static PyTypeObject *__Pyx_ImportType(const char *module_name, const char *class_name, size_t size, int strict); /*proto*/ static int __Pyx_ImportFunction(PyObject *module, const char *funcname, void (**f)(void), const char *sig); /*proto*/ typedef struct { int code_line; PyCodeObject* code_object; } __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); static void __Pyx_AddTraceback(const char *funcname, int c_line, int py_line, const char *filename); /*proto*/ static int __Pyx_InitStrings(__Pyx_StringTabEntry *t); /*proto*/ /* Module declarations from 'cpython.buffer' */ /* Module declarations from 'cpython.ref' */ /* Module declarations from 'libc.string' */ /* Module declarations from 'libc.stdio' */ /* Module declarations from 'cpython.object' */ /* Module declarations from 'libc.stdlib' */ /* 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*/ /* Module declarations from 'cython' */ /* Module declarations from 'cpython.version' */ /* Module declarations from 'cpython.exc' */ /* Module declarations from 'cpython.module' */ /* Module declarations from 'cpython.mem' */ /* Module declarations from 'cpython.tuple' */ /* Module declarations from 'cpython.list' */ /* Module declarations from 'cpython.sequence' */ /* Module declarations from 'cpython.mapping' */ /* Module declarations from 'cpython.iterator' */ /* Module declarations from '__builtin__' */ /* Module declarations from 'cpython.type' */ static PyTypeObject *__pyx_ptype_7cpython_4type_type = 0; /* Module declarations from 'cpython.number' */ /* Module declarations from 'cpython.int' */ /* Module declarations from '__builtin__' */ /* Module declarations from 'cpython.bool' */ static PyTypeObject *__pyx_ptype_7cpython_4bool_bool = 0; /* Module declarations from 'cpython.long' */ /* Module declarations from 'cpython.float' */ /* Module declarations from '__builtin__' */ /* Module declarations from 'cpython.complex' */ static PyTypeObject *__pyx_ptype_7cpython_7complex_complex = 0; /* Module declarations from 'cpython.string' */ /* Module declarations from 'cpython.unicode' */ /* Module declarations from 'cpython.dict' */ /* Module declarations from 'cpython.instance' */ /* Module declarations from 'cpython.function' */ /* Module declarations from 'cpython.method' */ /* Module declarations from 'cpython.weakref' */ /* Module declarations from 'cpython.getargs' */ /* Module declarations from 'cpython.pythread' */ /* Module declarations from 'cpython.pystate' */ /* Module declarations from 'cpython.cobject' */ /* Module declarations from 'cpython.oldbuffer' */ /* Module declarations from 'cpython.set' */ /* Module declarations from 'cpython.bytes' */ /* Module declarations from 'cpython.pycapsule' */ /* Module declarations from 'cpython' */ /* Module declarations from 'datetime' */ /* Module declarations from 'datetime' */ static PyTypeObject *__pyx_ptype_8datetime_date = 0; static PyTypeObject *__pyx_ptype_8datetime_datetime = 0; static PyTypeObject *__pyx_ptype_8datetime_timedelta = 0; static CYTHON_INLINE int __pyx_f_8datetime__cstring_to_dts(char *, int, pandas_datetimestruct *); /*proto*/ static CYTHON_INLINE PyObject *__pyx_f_8datetime__dts_to_pydatetime(pandas_datetimestruct *); /*proto*/ /* Module declarations from 'pandas.tslib' */ static PyObject *(*__pyx_f_6pandas_5tslib_convert_to_tsobject)(PyObject *, PyObject *, PyObject *); /*proto*/ static PyObject *(*__pyx_f_6pandas_5tslib_convert_to_timedelta64)(PyObject *, PyObject *, PyObject *); /*proto*/ /* Module declarations from 'util' */ static CYTHON_INLINE PyObject *__pyx_f_4util_get_value_at(PyArrayObject *, PyObject *); /*proto*/ static CYTHON_INLINE PyObject *__pyx_f_4util_set_value_at(PyArrayObject *, PyObject *, PyObject *); /*proto*/ static CYTHON_INLINE PyObject *__pyx_f_4util_is_array(PyObject *); /*proto*/ static CYTHON_INLINE int __pyx_f_4util__checknull(PyObject *); /*proto*/ static CYTHON_INLINE int __pyx_f_4util__checknull_old(PyObject *); /*proto*/ static CYTHON_INLINE int __pyx_f_4util__checknan(PyObject *); /*proto*/ /* Module declarations from 'pandas.lib' */ static PyTypeObject *__pyx_ptype_6pandas_3lib___pyx_scope_struct_1_try_parse_date_and_time = 0; static PyTypeObject *__pyx_ptype_6pandas_3lib_Reducer = 0; static PyTypeObject *__pyx_ptype_6pandas_3lib_AxisProperty = 0; static PyTypeObject *__pyx_ptype_6pandas_3lib__PandasNull = 0; static PyTypeObject *__pyx_ptype_6pandas_3lib___pyx_scope_struct__try_parse_dates = 0; static PyTypeObject *__pyx_ptype_6pandas_3lib_SeriesBinGrouper = 0; static PyTypeObject *__pyx_ptype_6pandas_3lib_BlockSlider = 0; static PyTypeObject *__pyx_ptype_6pandas_3lib_cache_readonly = 0; static PyTypeObject *__pyx_ptype_6pandas_3lib_SeriesGrouper = 0; static PyTypeObject *__pyx_ptype_6pandas_3lib_Slider = 0; static double __pyx_v_6pandas_3lib_NaN; static double __pyx_v_6pandas_3lib_nan; static double __pyx_v_6pandas_3lib_NAN; static __pyx_t_5numpy_int64_t __pyx_v_6pandas_3lib_NPY_NAT; static int __pyx_v_6pandas_3lib__EPOCH_ORD; static double __pyx_v_6pandas_3lib_INF; static double __pyx_v_6pandas_3lib_NEGINF; static double __pyx_v_6pandas_3lib_fINT64_MAX; static double __pyx_v_6pandas_3lib_fINT64_MIN; static PyObject *__pyx_f_6pandas_3lib_map_indices_list(PyObject *, int __pyx_skip_dispatch); /*proto*/ static CYTHON_INLINE __pyx_t_5numpy_int64_t __pyx_f_6pandas_3lib_gmtime(PyObject *); /*proto*/ static PyObject *__pyx_f_6pandas_3lib_to_datetime(__pyx_t_5numpy_int64_t, int __pyx_skip_dispatch); /*proto*/ static PyObject *__pyx_f_6pandas_3lib_to_timestamp(PyObject *, int __pyx_skip_dispatch); /*proto*/ static CYTHON_INLINE __pyx_t_5numpy_int64_t __pyx_f_6pandas_3lib_get_timedelta64_value(PyObject *); /*proto*/ static PyObject *__pyx_f_6pandas_3lib_checknull(PyObject *, int __pyx_skip_dispatch); /*proto*/ static PyObject *__pyx_f_6pandas_3lib_checknull_old(PyObject *, int __pyx_skip_dispatch); /*proto*/ static PyArrayObject *__pyx_f_6pandas_3lib_astype_str(PyArrayObject *, int __pyx_skip_dispatch); /*proto*/ static CYTHON_INLINE PyObject *__pyx_f_6pandas_3lib__extract_result(PyObject *); /*proto*/ static CYTHON_INLINE int __pyx_f_6pandas_3lib_is_null_datetimelike(PyObject *); /*proto*/ static CYTHON_INLINE int __pyx_f_6pandas_3lib_is_datetime(PyObject *); /*proto*/ static CYTHON_INLINE int __pyx_f_6pandas_3lib_is_date(PyObject *); /*proto*/ static CYTHON_INLINE int __pyx_f_6pandas_3lib_is_time(PyObject *); /*proto*/ static CYTHON_INLINE int __pyx_f_6pandas_3lib_is_timedelta(PyObject *); /*proto*/ 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_object = { "Python object", NULL, sizeof(PyObject *), { 0 }, 0, 'O', 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_nn___pyx_t_5numpy_float32_t = { "float32_t", NULL, sizeof(__pyx_t_5numpy_float32_t), { 0 }, 0, 'R', 0, 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___pyx_t_double_complex = { "double complex", NULL, sizeof(__pyx_t_double_complex), { 0 }, 0, 'C', 0, 0 }; #define __Pyx_MODULE_NAME "pandas.lib" int __pyx_module_is_main_pandas__lib = 0; /* Implementation of 'pandas.lib' */ static PyObject *__pyx_builtin_Exception; static PyObject *__pyx_builtin_AttributeError; static PyObject *__pyx_builtin_range; static PyObject *__pyx_builtin_object; static PyObject *__pyx_builtin_ValueError; static PyObject *__pyx_builtin_TypeError; static PyObject *__pyx_builtin_enumerate; static PyObject *__pyx_builtin_OverflowError; static PyObject *__pyx_builtin_ImportError; static PyObject *__pyx_builtin_IndexError; static PyObject *__pyx_builtin_RuntimeError; static PyObject *__pyx_pf_6pandas_3lib_map_indices_list(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_index); /* proto */ static PyObject *__pyx_pf_6pandas_3lib_2ismember(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_arr, PyObject *__pyx_v_values); /* proto */ static PyObject *__pyx_pf_6pandas_3lib_4to_datetime(CYTHON_UNUSED PyObject *__pyx_self, __pyx_t_5numpy_int64_t __pyx_v_timestamp); /* proto */ static PyObject *__pyx_pf_6pandas_3lib_6to_timestamp(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_dt); /* proto */ static PyObject *__pyx_pf_6pandas_3lib_8array_to_timestamp(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_arr); /* proto */ static PyObject *__pyx_pf_6pandas_3lib_10time64_to_datetime(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_arr); /* proto */ static PyObject *__pyx_pf_6pandas_3lib_12checknull(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_val); /* proto */ static PyObject *__pyx_pf_6pandas_3lib_14checknull_old(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_val); /* proto */ static PyObject *__pyx_pf_6pandas_3lib_16isscalar(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_val); /* proto */ static PyObject *__pyx_pf_6pandas_3lib_18isnullobj(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_arr); /* proto */ static PyObject *__pyx_pf_6pandas_3lib_20isnullobj_old(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_arr); /* proto */ static PyObject *__pyx_pf_6pandas_3lib_22isnullobj2d(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_arr); /* proto */ static PyObject *__pyx_pf_6pandas_3lib_24isnullobj_old(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_arr); /* proto */ static PyObject *__pyx_pf_6pandas_3lib_26isnullobj2d_old(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_arr); /* proto */ static PyObject *__pyx_pf_6pandas_3lib_28list_to_object_array(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */ static PyObject *__pyx_pf_6pandas_3lib_30fast_unique(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values); /* proto */ static PyObject *__pyx_pf_6pandas_3lib_32fast_unique_multiple(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_arrays); /* proto */ static PyObject *__pyx_pf_6pandas_3lib_34fast_unique_multiple_list(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_lists); /* proto */ static PyObject *__pyx_pf_6pandas_3lib_36fast_unique_multiple_list_gen(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_gen); /* proto */ static PyObject *__pyx_pf_6pandas_3lib_38dicts_to_array(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_dicts, PyObject *__pyx_v_columns); /* proto */ static PyObject *__pyx_pf_6pandas_3lib_40fast_zip(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_ndarrays); /* proto */ static PyObject *__pyx_pf_6pandas_3lib_42get_reverse_indexer(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_indexer, Py_ssize_t __pyx_v_length); /* proto */ static PyObject *__pyx_pf_6pandas_3lib_44has_infs_f4(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_arr); /* proto */ static PyObject *__pyx_pf_6pandas_3lib_46has_infs_f8(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_arr); /* proto */ static PyObject *__pyx_pf_6pandas_3lib_48convert_timestamps(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values); /* proto */ static PyObject *__pyx_pf_6pandas_3lib_50maybe_indices_to_slice(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_indices); /* proto */ static PyObject *__pyx_pf_6pandas_3lib_52maybe_booleans_to_slice(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_mask); /* proto */ static PyObject *__pyx_pf_6pandas_3lib_54scalar_compare(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyObject *__pyx_v_val, PyObject *__pyx_v_op); /* proto */ static PyObject *__pyx_pf_6pandas_3lib_56vec_compare(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_left, PyArrayObject *__pyx_v_right, PyObject *__pyx_v_op); /* proto */ static PyObject *__pyx_pf_6pandas_3lib_58scalar_binop(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyObject *__pyx_v_val, PyObject *__pyx_v_op); /* proto */ static PyObject *__pyx_pf_6pandas_3lib_60vec_binop(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_left, PyArrayObject *__pyx_v_right, PyObject *__pyx_v_op); /* proto */ static PyObject *__pyx_pf_6pandas_3lib_62astype_intsafe(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_arr, PyObject *__pyx_v_new_dtype); /* proto */ static PyObject *__pyx_pf_6pandas_3lib_64astype_str(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_arr); /* proto */ static PyObject *__pyx_pf_6pandas_3lib_66clean_index_list(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */ static PyObject *__pyx_pf_6pandas_3lib_68max_len_string_array(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_arr); /* proto */ static PyObject *__pyx_pf_6pandas_3lib_70string_array_replace_from_nan_rep(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_arr, PyObject *__pyx_v_nan_rep, PyObject *__pyx_v_replace); /* proto */ static PyObject *__pyx_pf_6pandas_3lib_72write_csv_rows(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_data, PyObject *__pyx_v_data_index, int __pyx_v_nlevels, PyObject *__pyx_v_cols, PyObject *__pyx_v_writer); /* proto */ static PyObject *__pyx_pf_6pandas_3lib_74arrmap(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_index, PyObject *__pyx_v_func); /* proto */ static PyObject *__pyx_pf_6pandas_3lib_76is_lexsorted(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_list_of_arrays); /* proto */ static PyObject *__pyx_pf_6pandas_3lib_78generate_bins_dt64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_binner, PyObject *__pyx_v_closed); /* proto */ static PyObject *__pyx_pf_6pandas_3lib_80row_bool_subset(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_mask); /* proto */ static PyObject *__pyx_pf_6pandas_3lib_82row_bool_subset_object(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_mask); /* proto */ static PyObject *__pyx_pf_6pandas_3lib_84group_count(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, Py_ssize_t __pyx_v_size); /* proto */ static PyObject *__pyx_pf_6pandas_3lib_86lookup_values(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyObject *__pyx_v_mapping); /* proto */ static PyObject *__pyx_pf_6pandas_3lib_88count_level_1d(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_mask, PyArrayObject *__pyx_v_labels, Py_ssize_t __pyx_v_max_bin); /* proto */ static PyObject *__pyx_pf_6pandas_3lib_90count_level_2d(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_mask, PyArrayObject *__pyx_v_labels, Py_ssize_t __pyx_v_max_bin); /* proto */ static PyObject *__pyx_pf_6pandas_3lib_11_PandasNull___richcmp__(CYTHON_UNUSED struct __pyx_obj_6pandas_3lib__PandasNull *__pyx_v_self, PyObject *__pyx_v_other, int __pyx_v_op); /* proto */ static Py_hash_t __pyx_pf_6pandas_3lib_11_PandasNull_2__hash__(CYTHON_UNUSED struct __pyx_obj_6pandas_3lib__PandasNull *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_3lib_92fast_zip_fillna(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_ndarrays, PyObject *__pyx_v_fill_value); /* proto */ static PyObject *__pyx_pf_6pandas_3lib_94duplicated(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyObject *__pyx_v_take_last); /* proto */ static PyObject *__pyx_pf_6pandas_3lib_96generate_slices(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_labels, Py_ssize_t __pyx_v_ngroups); /* proto */ static PyObject *__pyx_pf_6pandas_3lib_98indices_fast(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_index, PyArrayObject *__pyx_v_labels, PyObject *__pyx_v_keys, PyObject *__pyx_v_sorted_labels); /* proto */ static int __pyx_pf_6pandas_3lib_7Reducer___init__(struct __pyx_obj_6pandas_3lib_Reducer *__pyx_v_self, PyObject *__pyx_v_arr, PyObject *__pyx_v_f, PyObject *__pyx_v_axis, PyObject *__pyx_v_dummy, PyObject *__pyx_v_labels); /* proto */ static PyObject *__pyx_pf_6pandas_3lib_7Reducer_2_check_dummy(struct __pyx_obj_6pandas_3lib_Reducer *__pyx_v_self, PyObject *__pyx_v_dummy); /* proto */ static PyObject *__pyx_pf_6pandas_3lib_7Reducer_4get_result(struct __pyx_obj_6pandas_3lib_Reducer *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_3lib_7Reducer_6_get_result_array(struct __pyx_obj_6pandas_3lib_Reducer *__pyx_v_self, PyObject *__pyx_v_res); /* proto */ static int __pyx_pf_6pandas_3lib_16SeriesBinGrouper___init__(struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *__pyx_v_self, PyObject *__pyx_v_series, PyObject *__pyx_v_f, PyObject *__pyx_v_bins, PyObject *__pyx_v_dummy); /* proto */ static PyObject *__pyx_pf_6pandas_3lib_16SeriesBinGrouper_2_check_dummy(struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *__pyx_v_self, PyObject *__pyx_v_dummy); /* proto */ static PyObject *__pyx_pf_6pandas_3lib_16SeriesBinGrouper_4get_result(struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_3lib_16SeriesBinGrouper_6_get_result_array(struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *__pyx_v_self, PyObject *__pyx_v_res); /* proto */ static PyObject *__pyx_pf_6pandas_3lib_16SeriesBinGrouper_3arr___get__(struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *__pyx_v_self); /* proto */ static int __pyx_pf_6pandas_3lib_16SeriesBinGrouper_3arr_2__set__(struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ static int __pyx_pf_6pandas_3lib_16SeriesBinGrouper_3arr_4__del__(struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_3lib_16SeriesBinGrouper_5index___get__(struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *__pyx_v_self); /* proto */ static int __pyx_pf_6pandas_3lib_16SeriesBinGrouper_5index_2__set__(struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ static int __pyx_pf_6pandas_3lib_16SeriesBinGrouper_5index_4__del__(struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_3lib_16SeriesBinGrouper_9dummy_arr___get__(struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *__pyx_v_self); /* proto */ static int __pyx_pf_6pandas_3lib_16SeriesBinGrouper_9dummy_arr_2__set__(struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ static int __pyx_pf_6pandas_3lib_16SeriesBinGrouper_9dummy_arr_4__del__(struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_3lib_16SeriesBinGrouper_11dummy_index___get__(struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *__pyx_v_self); /* proto */ static int __pyx_pf_6pandas_3lib_16SeriesBinGrouper_11dummy_index_2__set__(struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ static int __pyx_pf_6pandas_3lib_16SeriesBinGrouper_11dummy_index_4__del__(struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_3lib_16SeriesBinGrouper_6values___get__(struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *__pyx_v_self); /* proto */ static int __pyx_pf_6pandas_3lib_16SeriesBinGrouper_6values_2__set__(struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ static int __pyx_pf_6pandas_3lib_16SeriesBinGrouper_6values_4__del__(struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_3lib_16SeriesBinGrouper_1f___get__(struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *__pyx_v_self); /* proto */ static int __pyx_pf_6pandas_3lib_16SeriesBinGrouper_1f_2__set__(struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ static int __pyx_pf_6pandas_3lib_16SeriesBinGrouper_1f_4__del__(struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_3lib_16SeriesBinGrouper_4bins___get__(struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *__pyx_v_self); /* proto */ static int __pyx_pf_6pandas_3lib_16SeriesBinGrouper_4bins_2__set__(struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ static int __pyx_pf_6pandas_3lib_16SeriesBinGrouper_4bins_4__del__(struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_3lib_16SeriesBinGrouper_3typ___get__(struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *__pyx_v_self); /* proto */ static int __pyx_pf_6pandas_3lib_16SeriesBinGrouper_3typ_2__set__(struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ static int __pyx_pf_6pandas_3lib_16SeriesBinGrouper_3typ_4__del__(struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_3lib_16SeriesBinGrouper_4name___get__(struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *__pyx_v_self); /* proto */ static int __pyx_pf_6pandas_3lib_16SeriesBinGrouper_4name_2__set__(struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ static int __pyx_pf_6pandas_3lib_16SeriesBinGrouper_4name_4__del__(struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *__pyx_v_self); /* proto */ static int __pyx_pf_6pandas_3lib_13SeriesGrouper___init__(struct __pyx_obj_6pandas_3lib_SeriesGrouper *__pyx_v_self, PyObject *__pyx_v_series, PyObject *__pyx_v_f, PyObject *__pyx_v_labels, Py_ssize_t __pyx_v_ngroups, PyObject *__pyx_v_dummy); /* proto */ static PyObject *__pyx_pf_6pandas_3lib_13SeriesGrouper_2_check_dummy(struct __pyx_obj_6pandas_3lib_SeriesGrouper *__pyx_v_self, PyObject *__pyx_v_dummy); /* proto */ static PyObject *__pyx_pf_6pandas_3lib_13SeriesGrouper_4get_result(struct __pyx_obj_6pandas_3lib_SeriesGrouper *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_3lib_13SeriesGrouper_6_get_result_array(struct __pyx_obj_6pandas_3lib_SeriesGrouper *__pyx_v_self, PyObject *__pyx_v_res); /* proto */ static PyObject *__pyx_pf_6pandas_3lib_13SeriesGrouper_3arr___get__(struct __pyx_obj_6pandas_3lib_SeriesGrouper *__pyx_v_self); /* proto */ static int __pyx_pf_6pandas_3lib_13SeriesGrouper_3arr_2__set__(struct __pyx_obj_6pandas_3lib_SeriesGrouper *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ static int __pyx_pf_6pandas_3lib_13SeriesGrouper_3arr_4__del__(struct __pyx_obj_6pandas_3lib_SeriesGrouper *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_3lib_13SeriesGrouper_5index___get__(struct __pyx_obj_6pandas_3lib_SeriesGrouper *__pyx_v_self); /* proto */ static int __pyx_pf_6pandas_3lib_13SeriesGrouper_5index_2__set__(struct __pyx_obj_6pandas_3lib_SeriesGrouper *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ static int __pyx_pf_6pandas_3lib_13SeriesGrouper_5index_4__del__(struct __pyx_obj_6pandas_3lib_SeriesGrouper *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_3lib_13SeriesGrouper_9dummy_arr___get__(struct __pyx_obj_6pandas_3lib_SeriesGrouper *__pyx_v_self); /* proto */ static int __pyx_pf_6pandas_3lib_13SeriesGrouper_9dummy_arr_2__set__(struct __pyx_obj_6pandas_3lib_SeriesGrouper *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ static int __pyx_pf_6pandas_3lib_13SeriesGrouper_9dummy_arr_4__del__(struct __pyx_obj_6pandas_3lib_SeriesGrouper *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_3lib_13SeriesGrouper_11dummy_index___get__(struct __pyx_obj_6pandas_3lib_SeriesGrouper *__pyx_v_self); /* proto */ static int __pyx_pf_6pandas_3lib_13SeriesGrouper_11dummy_index_2__set__(struct __pyx_obj_6pandas_3lib_SeriesGrouper *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ static int __pyx_pf_6pandas_3lib_13SeriesGrouper_11dummy_index_4__del__(struct __pyx_obj_6pandas_3lib_SeriesGrouper *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_3lib_13SeriesGrouper_1f___get__(struct __pyx_obj_6pandas_3lib_SeriesGrouper *__pyx_v_self); /* proto */ static int __pyx_pf_6pandas_3lib_13SeriesGrouper_1f_2__set__(struct __pyx_obj_6pandas_3lib_SeriesGrouper *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ static int __pyx_pf_6pandas_3lib_13SeriesGrouper_1f_4__del__(struct __pyx_obj_6pandas_3lib_SeriesGrouper *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_3lib_13SeriesGrouper_6labels___get__(struct __pyx_obj_6pandas_3lib_SeriesGrouper *__pyx_v_self); /* proto */ static int __pyx_pf_6pandas_3lib_13SeriesGrouper_6labels_2__set__(struct __pyx_obj_6pandas_3lib_SeriesGrouper *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ static int __pyx_pf_6pandas_3lib_13SeriesGrouper_6labels_4__del__(struct __pyx_obj_6pandas_3lib_SeriesGrouper *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_3lib_13SeriesGrouper_6values___get__(struct __pyx_obj_6pandas_3lib_SeriesGrouper *__pyx_v_self); /* proto */ static int __pyx_pf_6pandas_3lib_13SeriesGrouper_6values_2__set__(struct __pyx_obj_6pandas_3lib_SeriesGrouper *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ static int __pyx_pf_6pandas_3lib_13SeriesGrouper_6values_4__del__(struct __pyx_obj_6pandas_3lib_SeriesGrouper *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_3lib_13SeriesGrouper_3typ___get__(struct __pyx_obj_6pandas_3lib_SeriesGrouper *__pyx_v_self); /* proto */ static int __pyx_pf_6pandas_3lib_13SeriesGrouper_3typ_2__set__(struct __pyx_obj_6pandas_3lib_SeriesGrouper *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ static int __pyx_pf_6pandas_3lib_13SeriesGrouper_3typ_4__del__(struct __pyx_obj_6pandas_3lib_SeriesGrouper *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_3lib_13SeriesGrouper_4name___get__(struct __pyx_obj_6pandas_3lib_SeriesGrouper *__pyx_v_self); /* proto */ static int __pyx_pf_6pandas_3lib_13SeriesGrouper_4name_2__set__(struct __pyx_obj_6pandas_3lib_SeriesGrouper *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ static int __pyx_pf_6pandas_3lib_13SeriesGrouper_4name_4__del__(struct __pyx_obj_6pandas_3lib_SeriesGrouper *__pyx_v_self); /* proto */ static int __pyx_pf_6pandas_3lib_6Slider___init__(struct __pyx_obj_6pandas_3lib_Slider *__pyx_v_self, PyObject *__pyx_v_values, PyObject *__pyx_v_buf); /* proto */ static PyObject *__pyx_pf_6pandas_3lib_6Slider_2advance(struct __pyx_obj_6pandas_3lib_Slider *__pyx_v_self, Py_ssize_t __pyx_v_k); /* proto */ static PyObject *__pyx_pf_6pandas_3lib_6Slider_4set_length(struct __pyx_obj_6pandas_3lib_Slider *__pyx_v_self, Py_ssize_t __pyx_v_length); /* proto */ static PyObject *__pyx_pf_6pandas_3lib_6Slider_6reset(struct __pyx_obj_6pandas_3lib_Slider *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_3lib_100apply_frame_axis0(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_frame, PyObject *__pyx_v_f, PyObject *__pyx_v_names, PyArrayObject *__pyx_v_starts, PyArrayObject *__pyx_v_ends); /* proto */ static int __pyx_pf_6pandas_3lib_11BlockSlider___init__(struct __pyx_obj_6pandas_3lib_BlockSlider *__pyx_v_self, PyObject *__pyx_v_frame); /* proto */ static void __pyx_pf_6pandas_3lib_11BlockSlider_2__dealloc__(struct __pyx_obj_6pandas_3lib_BlockSlider *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_3lib_11BlockSlider_4move(struct __pyx_obj_6pandas_3lib_BlockSlider *__pyx_v_self, int __pyx_v_start, int __pyx_v_end); /* proto */ static PyObject *__pyx_pf_6pandas_3lib_11BlockSlider_5frame___get__(struct __pyx_obj_6pandas_3lib_BlockSlider *__pyx_v_self); /* proto */ static int __pyx_pf_6pandas_3lib_11BlockSlider_5frame_2__set__(struct __pyx_obj_6pandas_3lib_BlockSlider *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ static int __pyx_pf_6pandas_3lib_11BlockSlider_5frame_4__del__(struct __pyx_obj_6pandas_3lib_BlockSlider *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_3lib_11BlockSlider_5dummy___get__(struct __pyx_obj_6pandas_3lib_BlockSlider *__pyx_v_self); /* proto */ static int __pyx_pf_6pandas_3lib_11BlockSlider_5dummy_2__set__(struct __pyx_obj_6pandas_3lib_BlockSlider *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ static int __pyx_pf_6pandas_3lib_11BlockSlider_5dummy_4__del__(struct __pyx_obj_6pandas_3lib_BlockSlider *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_3lib_11BlockSlider_7nblocks___get__(struct __pyx_obj_6pandas_3lib_BlockSlider *__pyx_v_self); /* proto */ static int __pyx_pf_6pandas_3lib_11BlockSlider_7nblocks_2__set__(struct __pyx_obj_6pandas_3lib_BlockSlider *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ static PyObject *__pyx_pf_6pandas_3lib_11BlockSlider_10idx_slider___get__(struct __pyx_obj_6pandas_3lib_BlockSlider *__pyx_v_self); /* proto */ static int __pyx_pf_6pandas_3lib_11BlockSlider_10idx_slider_2__set__(struct __pyx_obj_6pandas_3lib_BlockSlider *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ static int __pyx_pf_6pandas_3lib_11BlockSlider_10idx_slider_4__del__(struct __pyx_obj_6pandas_3lib_BlockSlider *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_3lib_11BlockSlider_6blocks___get__(struct __pyx_obj_6pandas_3lib_BlockSlider *__pyx_v_self); /* proto */ static int __pyx_pf_6pandas_3lib_11BlockSlider_6blocks_2__set__(struct __pyx_obj_6pandas_3lib_BlockSlider *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ static int __pyx_pf_6pandas_3lib_11BlockSlider_6blocks_4__del__(struct __pyx_obj_6pandas_3lib_BlockSlider *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_3lib_102reduce(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_arr, PyObject *__pyx_v_f, PyObject *__pyx_v_axis, PyObject *__pyx_v_dummy, PyObject *__pyx_v_labels); /* proto */ static int __pyx_pf_6pandas_3lib_14cache_readonly___init__(struct __pyx_obj_6pandas_3lib_cache_readonly *__pyx_v_self, PyObject *__pyx_v_func, PyObject *__pyx_v_allow_setting); /* proto */ static PyObject *__pyx_pf_6pandas_3lib_14cache_readonly_2__call__(struct __pyx_obj_6pandas_3lib_cache_readonly *__pyx_v_self, PyObject *__pyx_v_func, CYTHON_UNUSED PyObject *__pyx_v_doc); /* proto */ static PyObject *__pyx_pf_6pandas_3lib_14cache_readonly_4__get__(struct __pyx_obj_6pandas_3lib_cache_readonly *__pyx_v_self, PyObject *__pyx_v_obj, CYTHON_UNUSED PyObject *__pyx_v_typ); /* proto */ static int __pyx_pf_6pandas_3lib_14cache_readonly_6__set__(struct __pyx_obj_6pandas_3lib_cache_readonly *__pyx_v_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_value); /* proto */ static PyObject *__pyx_pf_6pandas_3lib_14cache_readonly_4func___get__(struct __pyx_obj_6pandas_3lib_cache_readonly *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_3lib_14cache_readonly_4name___get__(struct __pyx_obj_6pandas_3lib_cache_readonly *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_3lib_14cache_readonly_13allow_setting___get__(struct __pyx_obj_6pandas_3lib_cache_readonly *__pyx_v_self); /* proto */ static int __pyx_pf_6pandas_3lib_12AxisProperty___init__(struct __pyx_obj_6pandas_3lib_AxisProperty *__pyx_v_self, PyObject *__pyx_v_axis); /* proto */ static PyObject *__pyx_pf_6pandas_3lib_12AxisProperty_2__get__(struct __pyx_obj_6pandas_3lib_AxisProperty *__pyx_v_self, PyObject *__pyx_v_obj, CYTHON_UNUSED PyObject *__pyx_v_type); /* proto */ static int __pyx_pf_6pandas_3lib_12AxisProperty_4__set__(struct __pyx_obj_6pandas_3lib_AxisProperty *__pyx_v_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_value); /* proto */ static PyObject *__pyx_pf_6pandas_3lib_104infer_dtype(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v__values); /* proto */ static PyObject *__pyx_pf_6pandas_3lib_106infer_dtype_list(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_values); /* proto */ static PyObject *__pyx_pf_6pandas_3lib_108is_bool_array(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values); /* proto */ static PyObject *__pyx_pf_6pandas_3lib_110is_integer(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_o); /* proto */ static PyObject *__pyx_pf_6pandas_3lib_112is_integer_array(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values); /* proto */ static PyObject *__pyx_pf_6pandas_3lib_114is_integer_float_array(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values); /* proto */ static PyObject *__pyx_pf_6pandas_3lib_116is_float_array(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values); /* proto */ static PyObject *__pyx_pf_6pandas_3lib_118is_string_array(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values); /* proto */ static PyObject *__pyx_pf_6pandas_3lib_120is_unicode_array(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values); /* proto */ static PyObject *__pyx_pf_6pandas_3lib_122is_datetime_array(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values); /* proto */ static PyObject *__pyx_pf_6pandas_3lib_124is_datetime64_array(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values); /* proto */ static PyObject *__pyx_pf_6pandas_3lib_126is_timedelta_array(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values); /* proto */ static PyObject *__pyx_pf_6pandas_3lib_128is_timedelta64_array(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values); /* proto */ static PyObject *__pyx_pf_6pandas_3lib_130is_timedelta_or_timedelta64_array(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values); /* proto */ static PyObject *__pyx_pf_6pandas_3lib_132is_date_array(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values); /* proto */ static PyObject *__pyx_pf_6pandas_3lib_134is_time_array(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values); /* proto */ static PyObject *__pyx_pf_6pandas_3lib_136is_period(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_o); /* proto */ static PyObject *__pyx_pf_6pandas_3lib_138is_period_array(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values); /* proto */ static PyObject *__pyx_pf_6pandas_3lib_140maybe_convert_numeric(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyObject *__pyx_v_na_values, PyObject *__pyx_v_convert_empty, PyObject *__pyx_v_coerce_numeric); /* proto */ static PyObject *__pyx_pf_6pandas_3lib_142maybe_convert_objects(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_objects, int __pyx_v_try_float, int __pyx_v_safe, int __pyx_v_convert_datetime, int __pyx_v_convert_timedelta); /* proto */ static PyObject *__pyx_pf_6pandas_3lib_144convert_sql_column(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_x); /* proto */ static PyObject *__pyx_pf_6pandas_3lib_15try_parse_dates_parse_date(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_s); /* proto */ static PyObject *__pyx_lambda_funcdef_lambda1(PyObject *__pyx_self, PyObject *__pyx_v_x); /* proto */ static PyObject *__pyx_pf_6pandas_3lib_146try_parse_dates(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyObject *__pyx_v_parser, PyObject *__pyx_v_dayfirst, PyObject *__pyx_v_default); /* proto */ static PyObject *__pyx_pf_6pandas_3lib_23try_parse_date_and_time_parse_date(PyObject *__pyx_self, PyObject *__pyx_v_s); /* proto */ static PyObject *__pyx_pf_6pandas_3lib_23try_parse_date_and_time_2parse_time(PyObject *__pyx_self, PyObject *__pyx_v_s); /* proto */ static PyObject *__pyx_lambda_funcdef_lambda2(PyObject *__pyx_self, PyObject *__pyx_v_x); /* proto */ static PyObject *__pyx_lambda_funcdef_lambda3(PyObject *__pyx_self, PyObject *__pyx_v_x); /* proto */ static PyObject *__pyx_pf_6pandas_3lib_148try_parse_date_and_time(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_dates, PyArrayObject *__pyx_v_times, PyObject *__pyx_v_date_parser, PyObject *__pyx_v_time_parser, PyObject *__pyx_v_dayfirst, PyObject *__pyx_v_default); /* proto */ static PyObject *__pyx_pf_6pandas_3lib_150try_parse_year_month_day(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_years, PyArrayObject *__pyx_v_months, PyArrayObject *__pyx_v_days); /* proto */ static PyObject *__pyx_pf_6pandas_3lib_152try_parse_datetime_components(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_years, PyArrayObject *__pyx_v_months, PyArrayObject *__pyx_v_days, PyArrayObject *__pyx_v_hours, PyArrayObject *__pyx_v_minutes, PyArrayObject *__pyx_v_seconds); /* proto */ static PyObject *__pyx_pf_6pandas_3lib_154sanitize_objects(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyObject *__pyx_v_na_values, PyObject *__pyx_v_convert_empty); /* proto */ static PyObject *__pyx_pf_6pandas_3lib_156maybe_convert_bool(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_arr, PyObject *__pyx_v_true_values, PyObject *__pyx_v_false_values); /* proto */ static PyObject *__pyx_pf_6pandas_3lib_158map_infer_mask(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_arr, PyObject *__pyx_v_f, PyArrayObject *__pyx_v_mask, int __pyx_v_convert); /* proto */ static PyObject *__pyx_pf_6pandas_3lib_160map_infer(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_arr, PyObject *__pyx_v_f, int __pyx_v_convert); /* proto */ static PyObject *__pyx_pf_6pandas_3lib_162to_object_array(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_rows); /* proto */ static PyObject *__pyx_pf_6pandas_3lib_164tuples_to_object_array(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_tuples); /* proto */ static PyObject *__pyx_pf_6pandas_3lib_166to_object_array_tuples(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_rows); /* proto */ static PyObject *__pyx_pf_6pandas_3lib_168fast_multiget(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_mapping, PyArrayObject *__pyx_v_keys, PyObject *__pyx_v_default); /* 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_3lib___pyx_scope_struct_1_try_parse_date_and_time(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_6pandas_3lib_Reducer(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_6pandas_3lib_AxisProperty(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_6pandas_3lib__PandasNull(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_6pandas_3lib___pyx_scope_struct__try_parse_dates(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_6pandas_3lib_SeriesBinGrouper(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_6pandas_3lib_BlockSlider(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_6pandas_3lib_cache_readonly(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_6pandas_3lib_SeriesGrouper(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_6pandas_3lib_Slider(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static char __pyx_k_2[] = "all arrays must be same length"; static char __pyx_k_6[] = "Unrecognized operator"; static char __pyx_k_8[] = "Arrays were different lengths: %d vs %d"; static char __pyx_k_10[] = "M8[ns]"; static char __pyx_k_11[] = "m8[ns]"; static char __pyx_k_12[] = "maybe_convert_objects"; static char __pyx_k_13[] = "Invalid length for values or for binner"; static char __pyx_k_15[] = "Values falls before first bin"; static char __pyx_k_17[] = "Values falls after last bin"; static char __pyx_k_24[] = "Dummy array must be same dtype"; static char __pyx_k_26[] = "Dummy array must be length %d"; static char __pyx_k_27[] = "function does not reduce"; static char __pyx_k_37[] = "_has_complex_internals"; static char __pyx_k_38[] = "Cannot modify frame index internals"; static char __pyx_k_40[] = "Function unsafe for fast apply"; static char __pyx_k_42[] = "Let this error raise above us"; static char __pyx_k_45[] = "Cannot use shortcut"; static char __pyx_k_48[] = "cannot set values for [%s]"; static char __pyx_k_49[] = "list_to_object_array"; static char __pyx_k_51[] = "is_timedelta_or_timedelta64_array"; static char __pyx_k_52[] = "is_integer_float_array"; static char __pyx_k_53[] = "mixed-integer-float"; static char __pyx_k_54[] = "mixed-integer"; static char __pyx_k_55[] = "pandas.tseries.period"; static char __pyx_k_58[] = "Empty string encountered"; static char __pyx_k_60[] = "."; static char __pyx_k_62[] = "%m/%d/%Y"; static char __pyx_k_63[] = "dateutil.parser"; static char __pyx_k_64[] = "try_parse_dates.."; static char __pyx_k_65[] = "pandas.lib"; static char __pyx_k_68[] = "pandas/src/inference.pyx"; static char __pyx_k_69[] = "try_parse_dates..parse_date"; static char __pyx_k_70[] = ""; static char __pyx_k_72[] = "%H:%M:%S"; static char __pyx_k_73[] = "Length of dates and times must be equal"; static char __pyx_k_75[] = "try_parse_date_and_time.."; static char __pyx_k_78[] = "try_parse_date_and_time..parse_date"; static char __pyx_k_81[] = "try_parse_date_and_time..parse_time"; static char __pyx_k_82[] = "Length of years/months/days must all be equal"; static char __pyx_k_84[] = "Length of all datetime components must be equal"; static char __pyx_k_89[] = "Unable to parse %s"; static char __pyx_k_90[] = "index out of bounds"; static char __pyx_k_93[] = "ndarray is not C contiguous"; static char __pyx_k_95[] = "ndarray is not Fortran contiguous"; static char __pyx_k_97[] = "Non-native byte order not supported"; static char __pyx_k_99[] = "unknown dtype code in numpy.pxd (%d)"; static char __pyx_k__B[] = "B"; static char __pyx_k__C[] = "C"; static char __pyx_k__F[] = "F"; static char __pyx_k__H[] = "H"; static char __pyx_k__I[] = "I"; static char __pyx_k__L[] = "L"; static char __pyx_k__N[] = "N"; static char __pyx_k__O[] = "O"; static char __pyx_k__Q[] = "Q"; static char __pyx_k__b[] = "b"; static char __pyx_k__d[] = "d"; static char __pyx_k__f[] = "f"; static char __pyx_k__g[] = "g"; static char __pyx_k__h[] = "h"; static char __pyx_k__i[] = "i"; static char __pyx_k__j[] = "j"; static char __pyx_k__k[] = "k"; static char __pyx_k__l[] = "l"; static char __pyx_k__m[] = "m"; static char __pyx_k__n[] = "n"; static char __pyx_k__o[] = "o"; static char __pyx_k__q[] = "q"; static char __pyx_k__s[] = "s"; static char __pyx_k__t[] = "t"; static char __pyx_k__v[] = "v"; static char __pyx_k__x[] = "x"; static char __pyx_k__y[] = "y"; static char __pyx_k_100[] = "Format string allocated too short, see comment in numpy.pxd"; static char __pyx_k_103[] = "Format string allocated too short."; static char __pyx_k_107[] = "/home/yoh/deb/gits/pkg-exppsy/pandas/pandas/lib.pyx"; static char __pyx_k_130[] = "fast_unique_multiple"; static char __pyx_k_133[] = "fast_unique_multiple_list"; static char __pyx_k_136[] = "fast_unique_multiple_list_gen"; static char __pyx_k_151[] = "maybe_indices_to_slice"; static char __pyx_k_154[] = "maybe_booleans_to_slice"; static char __pyx_k_169[] = "max_len_string_array"; static char __pyx_k_172[] = "string_array_replace_from_nan_rep"; static char __pyx_k_185[] = "row_bool_subset_object"; static char __pyx_k_202[] = "distutils.version"; static char __pyx_k_203[] = "1.6.2"; static char __pyx_k_204[] = "is_numpy_prior_1_6_2"; static char __pyx_k_207[] = "pandas/src/reduce.pyx"; static char __pyx_k_236[] = "is_timedelta64_array"; static char __pyx_k_249[] = "maybe_convert_numeric"; static char __pyx_k_258[] = "try_parse_date_and_time"; static char __pyx_k_261[] = "try_parse_year_month_day"; static char __pyx_k_264[] = "try_parse_datetime_components"; static char __pyx_k_277[] = "tuples_to_object_array"; static char __pyx_k_280[] = "to_object_array_tuples"; static char __pyx_k__Zd[] = "Zd"; static char __pyx_k__Zf[] = "Zf"; static char __pyx_k__Zg[] = "Zg"; static char __pyx_k__bc[] = "bc"; static char __pyx_k__eq[] = "eq"; static char __pyx_k__f8[] = "f8"; static char __pyx_k__ge[] = "ge"; static char __pyx_k__gt[] = "gt"; static char __pyx_k__i8[] = "i8"; static char __pyx_k__it[] = "it"; static char __pyx_k__le[] = "le"; static char __pyx_k__lt[] = "lt"; static char __pyx_k__ne[] = "ne"; static char __pyx_k__np[] = "np"; static char __pyx_k__ns[] = "ns"; static char __pyx_k__op[] = "op"; static char __pyx_k__vc[] = "vc"; static char __pyx_k__NaN[] = "NaN"; static char __pyx_k__NaT[] = "NaT"; static char __pyx_k__arr[] = "arr"; static char __pyx_k__buf[] = "buf"; static char __pyx_k__c16[] = "c16"; static char __pyx_k__col[] = "col"; static char __pyx_k__cur[] = "cur"; static char __pyx_k__day[] = "day"; static char __pyx_k__doc[] = "doc"; static char __pyx_k__end[] = "end"; static char __pyx_k__gen[] = "gen"; static char __pyx_k__gin[] = "gin"; static char __pyx_k__idx[] = "idx"; static char __pyx_k__inf[] = "inf"; static char __pyx_k__lab[] = "lab"; static char __pyx_k__nan[] = "nan"; static char __pyx_k__now[] = "now"; static char __pyx_k__obj[] = "obj"; static char __pyx_k__out[] = "out"; static char __pyx_k__pos[] = "pos"; static char __pyx_k__pre[] = "pre"; static char __pyx_k__row[] = "row"; static char __pyx_k__sum[] = "sum"; static char __pyx_k__tmp[] = "tmp"; static char __pyx_k__tup[] = "tup"; static char __pyx_k__val[] = "val"; static char __pyx_k__TRUE[] = "TRUE"; static char __pyx_k__True[] = "True"; static char __pyx_k__args[] = "args"; static char __pyx_k__axes[] = "axes"; static char __pyx_k__axis[] = "axis"; static char __pyx_k__bins[] = "bins"; static char __pyx_k__cols[] = "cols"; static char __pyx_k__copy[] = "copy"; static char __pyx_k__data[] = "data"; static char __pyx_k__date[] = "date"; static char __pyx_k__days[] = "days"; static char __pyx_k__ends[] = "ends"; static char __pyx_k__fill[] = "fill"; static char __pyx_k__flag[] = "flag"; static char __pyx_k__fnan[] = "fnan"; static char __pyx_k__func[] = "func"; static char __pyx_k__fval[] = "fval"; static char __pyx_k__hour[] = "hour"; static char __pyx_k__iNaT[] = "iNaT"; static char __pyx_k__int8[] = "int8"; static char __pyx_k__ints[] = "ints"; static char __pyx_k__item[] = "item"; static char __pyx_k__keys[] = "keys"; static char __pyx_k__left[] = "left"; static char __pyx_k__mask[] = "mask"; static char __pyx_k__memo[] = "memo"; static char __pyx_k__move[] = "move"; static char __pyx_k__name[] = "name"; static char __pyx_k__ndim[] = "ndim"; static char __pyx_k__onan[] = "onan"; static char __pyx_k__rows[] = "rows"; static char __pyx_k__safe[] = "safe"; static char __pyx_k__secs[] = "secs"; static char __pyx_k__seen[] = "seen"; static char __pyx_k__size[] = "size"; static char __pyx_k__stub[] = "stub"; static char __pyx_k__time[] = "time"; static char __pyx_k__true[] = "true"; static char __pyx_k__type[] = "type"; static char __pyx_k__vecs[] = "vecs"; static char __pyx_k__view[] = "view"; static char __pyx_k__year[] = "year"; static char __pyx_k__FALSE[] = "FALSE"; static char __pyx_k__False[] = "False"; static char __pyx_k___data[] = "_data"; static char __pyx_k__arobj[] = "arobj"; static char __pyx_k__bool_[] = "bool_"; static char __pyx_k__bools[] = "bools"; static char __pyx_k__cache[] = "cache"; static char __pyx_k__chunk[] = "chunk"; static char __pyx_k__dates[] = "dates"; static char __pyx_k__dicts[] = "dicts"; static char __pyx_k__dtype[] = "dtype"; static char __pyx_k__dummy[] = "dummy"; static char __pyx_k__empty[] = "empty"; static char __pyx_k__false[] = "false"; static char __pyx_k__flags[] = "flags"; static char __pyx_k__frame[] = "frame"; static char __pyx_k__hours[] = "hours"; static char __pyx_k__index[] = "index"; static char __pyx_k__int16[] = "int16"; static char __pyx_k__int32[] = "int32"; static char __pyx_k__int64[] = "int64"; static char __pyx_k__isnan[] = "isnan"; static char __pyx_k__l_bin[] = "l_bin"; static char __pyx_k__lists[] = "lists"; static char __pyx_k__mixed[] = "mixed"; static char __pyx_k__month[] = "month"; static char __pyx_k__names[] = "names"; static char __pyx_k__ncols[] = "ncols"; static char __pyx_k__numpy[] = "numpy"; static char __pyx_k__parse[] = "parse"; static char __pyx_k__piece[] = "piece"; static char __pyx_k__r_bin[] = "r_bin"; static char __pyx_k__range[] = "range"; static char __pyx_k__ravel[] = "ravel"; static char __pyx_k__reset[] = "reset"; static char __pyx_k__right[] = "right"; static char __pyx_k__shape[] = "shape"; static char __pyx_k__slobj[] = "slobj"; static char __pyx_k__start[] = "start"; static char __pyx_k__table[] = "table"; static char __pyx_k__times[] = "times"; static char __pyx_k__tslib[] = "tslib"; static char __pyx_k__uint8[] = "uint8"; static char __pyx_k__value[] = "value"; static char __pyx_k__years[] = "years"; static char __pyx_k__zeros[] = "zeros"; static char __pyx_k__Period[] = "Period"; static char __pyx_k___block[] = "_block"; static char __pyx_k___cache[] = "_cache"; static char __pyx_k___index[] = "_index"; static char __pyx_k__arrays[] = "arrays"; static char __pyx_k__arrmap[] = "arrmap"; static char __pyx_k__astype[] = "astype"; static char __pyx_k__binner[] = "binner"; static char __pyx_k__blocks[] = "blocks"; static char __pyx_k__closed[] = "closed"; static char __pyx_k__counts[] = "counts"; static char __pyx_k__floats[] = "floats"; static char __pyx_k__labels[] = "labels"; static char __pyx_k__lenbin[] = "lenbin"; static char __pyx_k__length[] = "length"; static char __pyx_k__lenidx[] = "lenidx"; static char __pyx_k__micros[] = "micros"; static char __pyx_k__minute[] = "minute"; static char __pyx_k__months[] = "months"; static char __pyx_k__neginf[] = "neginf"; static char __pyx_k__objbuf[] = "objbuf"; static char __pyx_k__object[] = "object"; static char __pyx_k__output[] = "output"; static char __pyx_k__pandas[] = "pandas"; static char __pyx_k__parser[] = "parser"; static char __pyx_k__period[] = "period"; static char __pyx_k__pydate[] = "pydate"; static char __pyx_k__reduce[] = "reduce"; static char __pyx_k__result[] = "result"; static char __pyx_k__second[] = "second"; static char __pyx_k__series[] = "series"; static char __pyx_k__slider[] = "slider"; static char __pyx_k__starts[] = "starts"; static char __pyx_k__status[] = "status"; static char __pyx_k__string[] = "string"; static char __pyx_k__tuples[] = "tuples"; static char __pyx_k__uint16[] = "uint16"; static char __pyx_k__uint32[] = "uint32"; static char __pyx_k__uint64[] = "uint64"; static char __pyx_k__values[] = "values"; static char __pyx_k__writer[] = "writer"; static char __pyx_k____len__[] = "__len__"; static char __pyx_k___engine[] = "_engine"; static char __pyx_k___values[] = "_values"; static char __pyx_k__advance[] = "advance"; static char __pyx_k__boolean[] = "boolean"; static char __pyx_k__columns[] = "columns"; static char __pyx_k__complex[] = "complex"; static char __pyx_k__convert[] = "convert"; static char __pyx_k__default[] = "default"; static char __pyx_k__float16[] = "float16"; static char __pyx_k__float32[] = "float32"; static char __pyx_k__float64[] = "float64"; static char __pyx_k__indexer[] = "indexer"; static char __pyx_k__indices[] = "indices"; static char __pyx_k__integer[] = "integer"; static char __pyx_k__mapping[] = "mapping"; static char __pyx_k__max_bin[] = "max_bin"; static char __pyx_k__minutes[] = "minutes"; static char __pyx_k__mutated[] = "mutated"; static char __pyx_k__nan_rep[] = "nan_rep"; static char __pyx_k__ngroups[] = "ngroups"; static char __pyx_k__nlevels[] = "nlevels"; static char __pyx_k__object_[] = "object_"; static char __pyx_k__objects[] = "objects"; static char __pyx_k__putmask[] = "putmask"; static char __pyx_k__reducer[] = "reducer"; static char __pyx_k__replace[] = "replace"; static char __pyx_k__results[] = "results"; static char __pyx_k__seconds[] = "seconds"; static char __pyx_k__started[] = "started"; static char __pyx_k__strides[] = "strides"; static char __pyx_k__string_[] = "string_"; static char __pyx_k__unicode[] = "unicode"; static char __pyx_k__uniques[] = "uniques"; static char __pyx_k____main__[] = "__main__"; static char __pyx_k____name__[] = "__name__"; static char __pyx_k____test__[] = "__test__"; static char __pyx_k__datetime[] = "datetime"; static char __pyx_k__dayfirst[] = "dayfirst"; static char __pyx_k__fast_zip[] = "fast_zip"; static char __pyx_k__finished[] = "finished"; static char __pyx_k__float128[] = "float128"; static char __pyx_k__floating[] = "floating"; static char __pyx_k__ismember[] = "ismember"; static char __pyx_k__isscalar[] = "isscalar"; static char __pyx_k__itemsize[] = "itemsize"; static char __pyx_k__na_count[] = "na_count"; static char __pyx_k__ndarrays[] = "ndarrays"; static char __pyx_k__operator[] = "operator"; static char __pyx_k__seen_int[] = "seen_int"; static char __pyx_k__strptime[] = "strptime"; static char __pyx_k__unicode_[] = "unicode_"; static char __pyx_k__val_kind[] = "val_kind"; static char __pyx_k__Exception[] = "Exception"; static char __pyx_k__Timestamp[] = "Timestamp"; static char __pyx_k__TypeError[] = "TypeError"; static char __pyx_k___TYPE_MAP[] = "_TYPE_MAP"; static char __pyx_k____class__[] = "__class__"; static char __pyx_k___set_axis[] = "_set_axis"; static char __pyx_k__complexes[] = "complexes"; static char __pyx_k__converted[] = "converted"; static char __pyx_k__datetimes[] = "datetimes"; static char __pyx_k__enumerate[] = "enumerate"; static char __pyx_k__is_period[] = "is_period"; static char __pyx_k__isnullobj[] = "isnullobj"; static char __pyx_k__map_infer[] = "map_infer"; static char __pyx_k__na_values[] = "na_values"; static char __pyx_k__new_dtype[] = "new_dtype"; static char __pyx_k__seen_bool[] = "seen_bool"; static char __pyx_k__seen_null[] = "seen_null"; static char __pyx_k__take_last[] = "take_last"; static char __pyx_k__timedelta[] = "timedelta"; static char __pyx_k__toordinal[] = "toordinal"; static char __pyx_k__true_vals[] = "true_vals"; static char __pyx_k__try_float[] = "try_float"; static char __pyx_k__vec_binop[] = "vec_binop"; static char __pyx_k__writerows[] = "writerows"; static char __pyx_k__IndexError[] = "IndexError"; static char __pyx_k__ValueError[] = "ValueError"; static char __pyx_k____import__[] = "__import__"; static char __pyx_k____module__[] = "__module__"; static char __pyx_k__all_arrays[] = "all_arrays"; static char __pyx_k__complex128[] = "complex128"; static char __pyx_k__complex256[] = "complex256"; static char __pyx_k__contiguous[] = "contiguous"; static char __pyx_k__data_index[] = "data_index"; static char __pyx_k__datetime64[] = "datetime64"; static char __pyx_k__duplicated[] = "duplicated"; static char __pyx_k__false_vals[] = "false_vals"; static char __pyx_k__fill_value[] = "fill_value"; static char __pyx_k__float_secs[] = "float_secs"; static char __pyx_k__get_result[] = "get_result"; static char __pyx_k__group_size[] = "group_size"; static char __pyx_k__idatetimes[] = "idatetimes"; static char __pyx_k__is_integer[] = "is_integer"; static char __pyx_k__item_cache[] = "item_cache"; static char __pyx_k__parse_date[] = "parse_date"; static char __pyx_k__parse_time[] = "parse_time"; static char __pyx_k__pydatetime[] = "pydatetime"; static char __pyx_k__seen_float[] = "seen_float"; static char __pyx_k__set_length[] = "set_length"; static char __pyx_k__timedeltas[] = "timedeltas"; static char __pyx_k__ImportError[] = "ImportError"; static char __pyx_k____setattr__[] = "__setattr__"; static char __pyx_k____version__[] = "__version__"; static char __pyx_k___item_cache[] = "_item_cache"; static char __pyx_k__date_parser[] = "date_parser"; static char __pyx_k__fast_unique[] = "fast_unique"; static char __pyx_k__group_count[] = "group_count"; static char __pyx_k__has_infs_f4[] = "has_infs_f4"; static char __pyx_k__has_infs_f8[] = "has_infs_f8"; static char __pyx_k__infer_dtype[] = "infer_dtype"; static char __pyx_k__is_datelike[] = "is_datelike"; static char __pyx_k__isnullobj2d[] = "isnullobj2d"; static char __pyx_k__itimedeltas[] = "itimedeltas"; static char __pyx_k__microsecond[] = "microsecond"; static char __pyx_k__pandas_null[] = "pandas_null"; static char __pyx_k__rev_indexer[] = "rev_indexer"; static char __pyx_k__seen_object[] = "seen_object"; static char __pyx_k__time_parser[] = "time_parser"; static char __pyx_k__timedelta64[] = "timedelta64"; static char __pyx_k__true_values[] = "true_values"; static char __pyx_k__vec_compare[] = "vec_compare"; static char __pyx_k__InvalidApply[] = "InvalidApply"; static char __pyx_k__LooseVersion[] = "LooseVersion"; static char __pyx_k__RuntimeError[] = "RuntimeError"; static char __pyx_k____qualname__[] = "__qualname__"; static char __pyx_k___check_dummy[] = "_check_dummy"; static char __pyx_k__c_contiguous[] = "c_contiguous"; static char __pyx_k__f_contiguous[] = "f_contiguous"; static char __pyx_k__false_values[] = "false_values"; static char __pyx_k__indices_fast[] = "indices_fast"; static char __pyx_k__is_lexsorted[] = "is_lexsorted"; static char __pyx_k__right_closed[] = "right_closed"; static char __pyx_k__scalar_binop[] = "scalar_binop"; static char __pyx_k__seen_complex[] = "seen_complex"; static char __pyx_k__seen_numeric[] = "seen_numeric"; static char __pyx_k__shape_before[] = "shape_before"; static char __pyx_k__OverflowError[] = "OverflowError"; static char __pyx_k____metaclass__[] = "__metaclass__"; static char __pyx_k__allow_setting[] = "allow_setting"; static char __pyx_k__clear_mapping[] = "clear_mapping"; static char __pyx_k__convert_empty[] = "convert_empty"; static char __pyx_k__fast_multiget[] = "fast_multiget"; static char __pyx_k__fromtimestamp[] = "fromtimestamp"; static char __pyx_k__is_bool_array[] = "is_bool_array"; static char __pyx_k__is_date_array[] = "is_date_array"; static char __pyx_k__is_time_array[] = "is_time_array"; static char __pyx_k__isnullobj_old[] = "isnullobj_old"; static char __pyx_k__lookup_values[] = "lookup_values"; static char __pyx_k__seen_datetime[] = "seen_datetime"; static char __pyx_k__sorted_labels[] = "sorted_labels"; static char __pyx_k__AttributeError[] = "AttributeError"; static char __pyx_k____pyx_vtable__[] = "__pyx_vtable__"; static char __pyx_k__astype_intsafe[] = "astype_intsafe"; static char __pyx_k__coerce_numeric[] = "coerce_numeric"; static char __pyx_k__count_level_1d[] = "count_level_1d"; static char __pyx_k__count_level_2d[] = "count_level_2d"; static char __pyx_k__dicts_to_array[] = "dicts_to_array"; static char __pyx_k__is_float_array[] = "is_float_array"; static char __pyx_k__list_of_arrays[] = "list_of_arrays"; static char __pyx_k__map_infer_mask[] = "map_infer_mask"; static char __pyx_k__scalar_compare[] = "scalar_compare"; static char __pyx_k__seen_timedelta[] = "seen_timedelta"; static char __pyx_k__write_csv_rows[] = "write_csv_rows"; static char __pyx_k____pyx_getbuffer[] = "__pyx_getbuffer"; static char __pyx_k__fast_zip_fillna[] = "fast_zip_fillna"; static char __pyx_k__generate_slices[] = "generate_slices"; static char __pyx_k__is_period_array[] = "is_period_array"; static char __pyx_k__is_string_array[] = "is_string_array"; static char __pyx_k__isnullobj2d_old[] = "isnullobj2d_old"; static char __pyx_k__row_bool_subset[] = "row_bool_subset"; static char __pyx_k__to_object_array[] = "to_object_array"; static char __pyx_k__try_parse_dates[] = "try_parse_dates"; static char __pyx_k__clean_index_list[] = "clean_index_list"; static char __pyx_k__convert_datetime[] = "convert_datetime"; static char __pyx_k__infer_dtype_list[] = "infer_dtype_list"; static char __pyx_k__is_integer_array[] = "is_integer_array"; static char __pyx_k__is_unicode_array[] = "is_unicode_array"; static char __pyx_k__repr_timedelta64[] = "repr_timedelta64"; static char __pyx_k__sanitize_objects[] = "sanitize_objects"; static char __pyx_k__utcfromtimestamp[] = "utcfromtimestamp"; static char __pyx_k___get_result_array[] = "_get_result_array"; static char __pyx_k__apply_frame_axis0[] = "apply_frame_axis0"; static char __pyx_k__convert_timedelta[] = "convert_timedelta"; static char __pyx_k__is_datetime_array[] = "is_datetime_array"; static char __pyx_k__array_to_timestamp[] = "array_to_timestamp"; static char __pyx_k__convert_sql_column[] = "convert_sql_column"; static char __pyx_k__convert_timestamps[] = "convert_timestamps"; static char __pyx_k__generate_bins_dt64[] = "generate_bins_dt64"; static char __pyx_k__is_timedelta_array[] = "is_timedelta_array"; static char __pyx_k__maybe_convert_bool[] = "maybe_convert_bool"; static char __pyx_k__time64_to_datetime[] = "time64_to_datetime"; static char __pyx_k____pyx_releasebuffer[] = "__pyx_releasebuffer"; static char __pyx_k__get_reverse_indexer[] = "get_reverse_indexer"; static char __pyx_k__is_datetime64_array[] = "is_datetime64_array"; static PyObject *__pyx_kp_s_10; static PyObject *__pyx_kp_u_100; static PyObject *__pyx_kp_u_103; static PyObject *__pyx_kp_s_107; static PyObject *__pyx_kp_s_11; static PyObject *__pyx_n_s_12; static PyObject *__pyx_kp_s_13; static PyObject *__pyx_n_s_130; static PyObject *__pyx_n_s_133; static PyObject *__pyx_n_s_136; static PyObject *__pyx_kp_s_15; static PyObject *__pyx_n_s_151; static PyObject *__pyx_n_s_154; static PyObject *__pyx_n_s_169; static PyObject *__pyx_kp_s_17; static PyObject *__pyx_n_s_172; static PyObject *__pyx_n_s_185; static PyObject *__pyx_kp_s_2; static PyObject *__pyx_n_s_202; static PyObject *__pyx_kp_s_203; static PyObject *__pyx_n_s_204; static PyObject *__pyx_kp_s_207; static PyObject *__pyx_n_s_236; static PyObject *__pyx_kp_s_24; static PyObject *__pyx_n_s_249; static PyObject *__pyx_n_s_258; static PyObject *__pyx_kp_s_26; static PyObject *__pyx_n_s_261; static PyObject *__pyx_n_s_264; static PyObject *__pyx_kp_s_27; static PyObject *__pyx_n_s_277; static PyObject *__pyx_n_s_280; static PyObject *__pyx_n_s_37; static PyObject *__pyx_kp_s_38; static PyObject *__pyx_kp_s_40; static PyObject *__pyx_kp_s_42; static PyObject *__pyx_kp_s_45; static PyObject *__pyx_kp_s_48; static PyObject *__pyx_n_s_49; static PyObject *__pyx_n_s_51; static PyObject *__pyx_n_s_52; static PyObject *__pyx_kp_s_53; static PyObject *__pyx_kp_s_54; static PyObject *__pyx_n_s_55; static PyObject *__pyx_kp_s_58; static PyObject *__pyx_kp_s_6; static PyObject *__pyx_kp_s_60; static PyObject *__pyx_kp_s_62; static PyObject *__pyx_n_s_63; static PyObject *__pyx_n_s_64; static PyObject *__pyx_n_s_65; static PyObject *__pyx_kp_s_68; static PyObject *__pyx_n_s_69; static PyObject *__pyx_kp_s_70; static PyObject *__pyx_kp_s_72; static PyObject *__pyx_kp_s_73; static PyObject *__pyx_n_s_75; static PyObject *__pyx_n_s_78; static PyObject *__pyx_kp_s_8; static PyObject *__pyx_n_s_81; static PyObject *__pyx_kp_s_82; static PyObject *__pyx_kp_s_84; static PyObject *__pyx_kp_s_89; static PyObject *__pyx_kp_s_90; static PyObject *__pyx_kp_u_93; static PyObject *__pyx_kp_u_95; static PyObject *__pyx_kp_u_97; static PyObject *__pyx_kp_u_99; static PyObject *__pyx_n_s__AttributeError; static PyObject *__pyx_n_s__C; static PyObject *__pyx_n_s__Exception; static PyObject *__pyx_n_s__F; static PyObject *__pyx_n_s__FALSE; static PyObject *__pyx_n_s__False; static PyObject *__pyx_n_s__ImportError; static PyObject *__pyx_n_s__IndexError; static PyObject *__pyx_n_s__InvalidApply; static PyObject *__pyx_n_s__LooseVersion; static PyObject *__pyx_n_s__N; static PyObject *__pyx_n_s__NaN; static PyObject *__pyx_n_s__NaT; static PyObject *__pyx_n_s__O; static PyObject *__pyx_n_s__OverflowError; static PyObject *__pyx_n_s__Period; static PyObject *__pyx_n_s__RuntimeError; static PyObject *__pyx_n_s__TRUE; static PyObject *__pyx_n_s__Timestamp; static PyObject *__pyx_n_s__True; static PyObject *__pyx_n_s__TypeError; static PyObject *__pyx_n_s__ValueError; static PyObject *__pyx_n_s___TYPE_MAP; static PyObject *__pyx_n_s____class__; static PyObject *__pyx_n_s____import__; static PyObject *__pyx_n_s____len__; static PyObject *__pyx_n_s____main__; static PyObject *__pyx_n_s____metaclass__; static PyObject *__pyx_n_s____module__; static PyObject *__pyx_n_s____name__; static PyObject *__pyx_n_s____pyx_getbuffer; static PyObject *__pyx_n_s____pyx_releasebuffer; static PyObject *__pyx_n_s____pyx_vtable__; static PyObject *__pyx_n_s____qualname__; static PyObject *__pyx_n_s____setattr__; static PyObject *__pyx_n_s____test__; static PyObject *__pyx_n_s____version__; static PyObject *__pyx_n_s___block; static PyObject *__pyx_n_s___cache; static PyObject *__pyx_n_s___check_dummy; static PyObject *__pyx_n_s___data; static PyObject *__pyx_n_s___engine; static PyObject *__pyx_n_s___get_result_array; static PyObject *__pyx_n_s___index; static PyObject *__pyx_n_s___item_cache; static PyObject *__pyx_n_s___set_axis; static PyObject *__pyx_n_s___values; static PyObject *__pyx_n_s__advance; static PyObject *__pyx_n_s__all_arrays; static PyObject *__pyx_n_s__allow_setting; static PyObject *__pyx_n_s__apply_frame_axis0; static PyObject *__pyx_n_s__args; static PyObject *__pyx_n_s__arobj; static PyObject *__pyx_n_s__arr; static PyObject *__pyx_n_s__array_to_timestamp; static PyObject *__pyx_n_s__arrays; static PyObject *__pyx_n_s__arrmap; static PyObject *__pyx_n_s__astype; static PyObject *__pyx_n_s__astype_intsafe; static PyObject *__pyx_n_s__axes; static PyObject *__pyx_n_s__axis; static PyObject *__pyx_n_s__bc; static PyObject *__pyx_n_s__binner; static PyObject *__pyx_n_s__bins; static PyObject *__pyx_n_s__blocks; static PyObject *__pyx_n_s__bool_; static PyObject *__pyx_n_s__boolean; static PyObject *__pyx_n_s__bools; static PyObject *__pyx_n_s__buf; static PyObject *__pyx_n_s__c16; static PyObject *__pyx_n_s__c_contiguous; static PyObject *__pyx_n_s__cache; static PyObject *__pyx_n_s__chunk; static PyObject *__pyx_n_s__clean_index_list; static PyObject *__pyx_n_s__clear_mapping; static PyObject *__pyx_n_s__closed; static PyObject *__pyx_n_s__coerce_numeric; static PyObject *__pyx_n_s__col; static PyObject *__pyx_n_s__cols; static PyObject *__pyx_n_s__columns; static PyObject *__pyx_n_s__complex; static PyObject *__pyx_n_s__complex128; static PyObject *__pyx_n_s__complex256; static PyObject *__pyx_n_s__complexes; static PyObject *__pyx_n_s__contiguous; static PyObject *__pyx_n_s__convert; static PyObject *__pyx_n_s__convert_datetime; static PyObject *__pyx_n_s__convert_empty; static PyObject *__pyx_n_s__convert_sql_column; static PyObject *__pyx_n_s__convert_timedelta; static PyObject *__pyx_n_s__convert_timestamps; static PyObject *__pyx_n_s__converted; static PyObject *__pyx_n_s__copy; static PyObject *__pyx_n_s__count_level_1d; static PyObject *__pyx_n_s__count_level_2d; static PyObject *__pyx_n_s__counts; static PyObject *__pyx_n_s__cur; static PyObject *__pyx_n_s__d; static PyObject *__pyx_n_s__data; static PyObject *__pyx_n_s__data_index; static PyObject *__pyx_n_s__date; static PyObject *__pyx_n_s__date_parser; static PyObject *__pyx_n_s__dates; static PyObject *__pyx_n_s__datetime; static PyObject *__pyx_n_s__datetime64; static PyObject *__pyx_n_s__datetimes; static PyObject *__pyx_n_s__day; static PyObject *__pyx_n_s__dayfirst; static PyObject *__pyx_n_s__days; static PyObject *__pyx_n_s__default; static PyObject *__pyx_n_s__dicts; static PyObject *__pyx_n_s__dicts_to_array; static PyObject *__pyx_n_s__doc; static PyObject *__pyx_n_s__dtype; static PyObject *__pyx_n_s__dummy; static PyObject *__pyx_n_s__duplicated; static PyObject *__pyx_n_s__empty; static PyObject *__pyx_n_s__end; static PyObject *__pyx_n_s__ends; static PyObject *__pyx_n_s__enumerate; static PyObject *__pyx_n_s__eq; static PyObject *__pyx_n_s__f; static PyObject *__pyx_n_s__f8; static PyObject *__pyx_n_s__f_contiguous; static PyObject *__pyx_n_s__false; static PyObject *__pyx_n_s__false_vals; static PyObject *__pyx_n_s__false_values; static PyObject *__pyx_n_s__fast_multiget; static PyObject *__pyx_n_s__fast_unique; static PyObject *__pyx_n_s__fast_zip; static PyObject *__pyx_n_s__fast_zip_fillna; static PyObject *__pyx_n_s__fill; static PyObject *__pyx_n_s__fill_value; static PyObject *__pyx_n_s__finished; static PyObject *__pyx_n_s__flag; static PyObject *__pyx_n_s__flags; static PyObject *__pyx_n_s__float128; static PyObject *__pyx_n_s__float16; static PyObject *__pyx_n_s__float32; static PyObject *__pyx_n_s__float64; static PyObject *__pyx_n_s__float_secs; static PyObject *__pyx_n_s__floating; static PyObject *__pyx_n_s__floats; static PyObject *__pyx_n_s__fnan; static PyObject *__pyx_n_s__frame; static PyObject *__pyx_n_s__fromtimestamp; static PyObject *__pyx_n_s__func; static PyObject *__pyx_n_s__fval; static PyObject *__pyx_n_s__ge; static PyObject *__pyx_n_s__gen; static PyObject *__pyx_n_s__generate_bins_dt64; static PyObject *__pyx_n_s__generate_slices; static PyObject *__pyx_n_s__get_result; static PyObject *__pyx_n_s__get_reverse_indexer; static PyObject *__pyx_n_s__gin; static PyObject *__pyx_n_s__group_count; static PyObject *__pyx_n_s__group_size; static PyObject *__pyx_n_s__gt; static PyObject *__pyx_n_s__has_infs_f4; static PyObject *__pyx_n_s__has_infs_f8; static PyObject *__pyx_n_s__hour; static PyObject *__pyx_n_s__hours; static PyObject *__pyx_n_s__i; static PyObject *__pyx_n_s__i8; static PyObject *__pyx_n_s__iNaT; static PyObject *__pyx_n_s__idatetimes; static PyObject *__pyx_n_s__idx; static PyObject *__pyx_n_s__index; static PyObject *__pyx_n_s__indexer; static PyObject *__pyx_n_s__indices; static PyObject *__pyx_n_s__indices_fast; static PyObject *__pyx_n_s__inf; static PyObject *__pyx_n_s__infer_dtype; static PyObject *__pyx_n_s__infer_dtype_list; static PyObject *__pyx_n_s__int16; static PyObject *__pyx_n_s__int32; static PyObject *__pyx_n_s__int64; static PyObject *__pyx_n_s__int8; static PyObject *__pyx_n_s__integer; static PyObject *__pyx_n_s__ints; static PyObject *__pyx_n_s__is_bool_array; static PyObject *__pyx_n_s__is_date_array; static PyObject *__pyx_n_s__is_datelike; static PyObject *__pyx_n_s__is_datetime64_array; static PyObject *__pyx_n_s__is_datetime_array; static PyObject *__pyx_n_s__is_float_array; static PyObject *__pyx_n_s__is_integer; static PyObject *__pyx_n_s__is_integer_array; static PyObject *__pyx_n_s__is_lexsorted; static PyObject *__pyx_n_s__is_period; static PyObject *__pyx_n_s__is_period_array; static PyObject *__pyx_n_s__is_string_array; static PyObject *__pyx_n_s__is_time_array; static PyObject *__pyx_n_s__is_timedelta_array; static PyObject *__pyx_n_s__is_unicode_array; static PyObject *__pyx_n_s__ismember; static PyObject *__pyx_n_s__isnan; static PyObject *__pyx_n_s__isnullobj; static PyObject *__pyx_n_s__isnullobj2d; static PyObject *__pyx_n_s__isnullobj2d_old; static PyObject *__pyx_n_s__isnullobj_old; static PyObject *__pyx_n_s__isscalar; static PyObject *__pyx_n_s__it; static PyObject *__pyx_n_s__item; static PyObject *__pyx_n_s__item_cache; static PyObject *__pyx_n_s__itemsize; static PyObject *__pyx_n_s__itimedeltas; static PyObject *__pyx_n_s__j; static PyObject *__pyx_n_s__k; static PyObject *__pyx_n_s__keys; static PyObject *__pyx_n_s__l; static PyObject *__pyx_n_s__l_bin; static PyObject *__pyx_n_s__lab; static PyObject *__pyx_n_s__labels; static PyObject *__pyx_n_s__le; static PyObject *__pyx_n_s__left; static PyObject *__pyx_n_s__lenbin; static PyObject *__pyx_n_s__length; static PyObject *__pyx_n_s__lenidx; static PyObject *__pyx_n_s__list_of_arrays; static PyObject *__pyx_n_s__lists; static PyObject *__pyx_n_s__lookup_values; static PyObject *__pyx_n_s__lt; static PyObject *__pyx_n_s__m; static PyObject *__pyx_n_s__map_infer; static PyObject *__pyx_n_s__map_infer_mask; static PyObject *__pyx_n_s__mapping; static PyObject *__pyx_n_s__mask; static PyObject *__pyx_n_s__max_bin; static PyObject *__pyx_n_s__maybe_convert_bool; static PyObject *__pyx_n_s__memo; static PyObject *__pyx_n_s__micros; static PyObject *__pyx_n_s__microsecond; static PyObject *__pyx_n_s__minute; static PyObject *__pyx_n_s__minutes; static PyObject *__pyx_n_s__mixed; static PyObject *__pyx_n_s__month; static PyObject *__pyx_n_s__months; static PyObject *__pyx_n_s__move; static PyObject *__pyx_n_s__mutated; static PyObject *__pyx_n_s__n; static PyObject *__pyx_n_s__na_count; static PyObject *__pyx_n_s__na_values; static PyObject *__pyx_n_s__name; static PyObject *__pyx_n_s__names; static PyObject *__pyx_n_s__nan; static PyObject *__pyx_n_s__nan_rep; static PyObject *__pyx_n_s__ncols; static PyObject *__pyx_n_s__ndarrays; static PyObject *__pyx_n_s__ndim; static PyObject *__pyx_n_s__ne; static PyObject *__pyx_n_s__neginf; static PyObject *__pyx_n_s__new_dtype; static PyObject *__pyx_n_s__ngroups; static PyObject *__pyx_n_s__nlevels; static PyObject *__pyx_n_s__now; static PyObject *__pyx_n_s__np; static PyObject *__pyx_n_s__ns; static PyObject *__pyx_n_s__numpy; static PyObject *__pyx_n_s__o; static PyObject *__pyx_n_s__obj; static PyObject *__pyx_n_s__objbuf; static PyObject *__pyx_n_s__object; static PyObject *__pyx_n_s__object_; static PyObject *__pyx_n_s__objects; static PyObject *__pyx_n_s__onan; static PyObject *__pyx_n_s__op; static PyObject *__pyx_n_s__operator; static PyObject *__pyx_n_s__out; static PyObject *__pyx_n_s__output; static PyObject *__pyx_n_s__pandas; static PyObject *__pyx_n_s__pandas_null; static PyObject *__pyx_n_s__parse; static PyObject *__pyx_n_s__parse_date; static PyObject *__pyx_n_s__parse_time; static PyObject *__pyx_n_s__parser; static PyObject *__pyx_n_s__period; static PyObject *__pyx_n_s__piece; static PyObject *__pyx_n_s__pos; static PyObject *__pyx_n_s__pre; static PyObject *__pyx_n_s__putmask; static PyObject *__pyx_n_s__pydate; static PyObject *__pyx_n_s__pydatetime; static PyObject *__pyx_n_s__r_bin; static PyObject *__pyx_n_s__range; static PyObject *__pyx_n_s__ravel; static PyObject *__pyx_n_s__reduce; static PyObject *__pyx_n_s__reducer; static PyObject *__pyx_n_s__replace; static PyObject *__pyx_n_s__repr_timedelta64; static PyObject *__pyx_n_s__reset; static PyObject *__pyx_n_s__result; static PyObject *__pyx_n_s__results; static PyObject *__pyx_n_s__rev_indexer; static PyObject *__pyx_n_s__right; static PyObject *__pyx_n_s__right_closed; static PyObject *__pyx_n_s__row; static PyObject *__pyx_n_s__row_bool_subset; static PyObject *__pyx_n_s__rows; static PyObject *__pyx_n_s__s; static PyObject *__pyx_n_s__safe; static PyObject *__pyx_n_s__sanitize_objects; static PyObject *__pyx_n_s__scalar_binop; static PyObject *__pyx_n_s__scalar_compare; static PyObject *__pyx_n_s__second; static PyObject *__pyx_n_s__seconds; static PyObject *__pyx_n_s__secs; static PyObject *__pyx_n_s__seen; static PyObject *__pyx_n_s__seen_bool; static PyObject *__pyx_n_s__seen_complex; static PyObject *__pyx_n_s__seen_datetime; static PyObject *__pyx_n_s__seen_float; static PyObject *__pyx_n_s__seen_int; static PyObject *__pyx_n_s__seen_null; static PyObject *__pyx_n_s__seen_numeric; static PyObject *__pyx_n_s__seen_object; static PyObject *__pyx_n_s__seen_timedelta; static PyObject *__pyx_n_s__series; static PyObject *__pyx_n_s__set_length; static PyObject *__pyx_n_s__shape; static PyObject *__pyx_n_s__shape_before; static PyObject *__pyx_n_s__size; static PyObject *__pyx_n_s__slider; static PyObject *__pyx_n_s__slobj; static PyObject *__pyx_n_s__sorted_labels; static PyObject *__pyx_n_s__start; static PyObject *__pyx_n_s__started; static PyObject *__pyx_n_s__starts; static PyObject *__pyx_n_s__status; static PyObject *__pyx_n_s__strides; static PyObject *__pyx_n_s__string; static PyObject *__pyx_n_s__string_; static PyObject *__pyx_n_s__strptime; static PyObject *__pyx_n_s__stub; static PyObject *__pyx_n_s__sum; static PyObject *__pyx_n_s__t; static PyObject *__pyx_n_s__table; static PyObject *__pyx_n_s__take_last; static PyObject *__pyx_n_s__time; static PyObject *__pyx_n_s__time64_to_datetime; static PyObject *__pyx_n_s__time_parser; static PyObject *__pyx_n_s__timedelta; static PyObject *__pyx_n_s__timedelta64; static PyObject *__pyx_n_s__timedeltas; static PyObject *__pyx_n_s__times; static PyObject *__pyx_n_s__tmp; static PyObject *__pyx_n_s__to_object_array; static PyObject *__pyx_n_s__toordinal; static PyObject *__pyx_n_s__true; static PyObject *__pyx_n_s__true_vals; static PyObject *__pyx_n_s__true_values; static PyObject *__pyx_n_s__try_float; static PyObject *__pyx_n_s__try_parse_dates; static PyObject *__pyx_n_s__tslib; static PyObject *__pyx_n_s__tup; static PyObject *__pyx_n_s__tuples; static PyObject *__pyx_n_s__type; static PyObject *__pyx_n_s__uint16; static PyObject *__pyx_n_s__uint32; static PyObject *__pyx_n_s__uint64; static PyObject *__pyx_n_s__uint8; static PyObject *__pyx_n_s__unicode; static PyObject *__pyx_n_s__unicode_; static PyObject *__pyx_n_s__uniques; static PyObject *__pyx_n_s__utcfromtimestamp; static PyObject *__pyx_n_s__v; static PyObject *__pyx_n_s__val; static PyObject *__pyx_n_s__val_kind; static PyObject *__pyx_n_s__value; static PyObject *__pyx_n_s__values; static PyObject *__pyx_n_s__vc; static PyObject *__pyx_n_s__vec_binop; static PyObject *__pyx_n_s__vec_compare; static PyObject *__pyx_n_s__vecs; static PyObject *__pyx_n_s__view; static PyObject *__pyx_n_s__write_csv_rows; static PyObject *__pyx_n_s__writer; static PyObject *__pyx_n_s__writerows; static PyObject *__pyx_n_s__x; static PyObject *__pyx_n_s__y; static PyObject *__pyx_n_s__year; static PyObject *__pyx_n_s__years; static PyObject *__pyx_n_s__zeros; static PyObject *__pyx_int_0; static PyObject *__pyx_int_1; static PyObject *__pyx_int_neg_1; static PyObject *__pyx_int_15; static PyObject *__pyx_k_19; static PyObject *__pyx_k_21; static PyObject *__pyx_k_47; static PyObject *__pyx_k_56; static PyObject *__pyx_k_57; static PyObject *__pyx_k_61; static PyObject *__pyx_k_71; static PyObject *__pyx_k_86; static PyObject *__pyx_k_87; static PyObject *__pyx_k_tuple_1; static PyObject *__pyx_k_tuple_3; static PyObject *__pyx_k_tuple_4; static PyObject *__pyx_k_tuple_5; static PyObject *__pyx_k_tuple_7; static PyObject *__pyx_k_tuple_9; static PyObject *__pyx_k_slice_44; static PyObject *__pyx_k_tuple_14; static PyObject *__pyx_k_tuple_16; static PyObject *__pyx_k_tuple_18; static PyObject *__pyx_k_tuple_20; static PyObject *__pyx_k_tuple_22; static PyObject *__pyx_k_tuple_23; static PyObject *__pyx_k_tuple_25; static PyObject *__pyx_k_tuple_28; static PyObject *__pyx_k_tuple_29; static PyObject *__pyx_k_tuple_30; static PyObject *__pyx_k_tuple_31; static PyObject *__pyx_k_tuple_32; static PyObject *__pyx_k_tuple_33; static PyObject *__pyx_k_tuple_34; static PyObject *__pyx_k_tuple_35; static PyObject *__pyx_k_tuple_36; static PyObject *__pyx_k_tuple_39; static PyObject *__pyx_k_tuple_41; static PyObject *__pyx_k_tuple_43; static PyObject *__pyx_k_tuple_46; static PyObject *__pyx_k_tuple_50; static PyObject *__pyx_k_tuple_59; static PyObject *__pyx_k_tuple_66; static PyObject *__pyx_k_tuple_74; static PyObject *__pyx_k_tuple_76; static PyObject *__pyx_k_tuple_79; static PyObject *__pyx_k_tuple_83; static PyObject *__pyx_k_tuple_85; static PyObject *__pyx_k_tuple_88; static PyObject *__pyx_k_tuple_91; static PyObject *__pyx_k_tuple_92; static PyObject *__pyx_k_tuple_94; static PyObject *__pyx_k_tuple_96; static PyObject *__pyx_k_tuple_98; static PyObject *__pyx_k_tuple_101; static PyObject *__pyx_k_tuple_102; static PyObject *__pyx_k_tuple_104; static PyObject *__pyx_k_tuple_105; static PyObject *__pyx_k_tuple_108; static PyObject *__pyx_k_tuple_110; static PyObject *__pyx_k_tuple_112; static PyObject *__pyx_k_tuple_114; static PyObject *__pyx_k_tuple_116; static PyObject *__pyx_k_tuple_118; static PyObject *__pyx_k_tuple_120; static PyObject *__pyx_k_tuple_122; static PyObject *__pyx_k_tuple_124; static PyObject *__pyx_k_tuple_126; static PyObject *__pyx_k_tuple_128; static PyObject *__pyx_k_tuple_131; static PyObject *__pyx_k_tuple_134; static PyObject *__pyx_k_tuple_137; static PyObject *__pyx_k_tuple_139; static PyObject *__pyx_k_tuple_141; static PyObject *__pyx_k_tuple_143; static PyObject *__pyx_k_tuple_145; static PyObject *__pyx_k_tuple_147; static PyObject *__pyx_k_tuple_149; static PyObject *__pyx_k_tuple_152; static PyObject *__pyx_k_tuple_155; static PyObject *__pyx_k_tuple_157; static PyObject *__pyx_k_tuple_159; static PyObject *__pyx_k_tuple_161; static PyObject *__pyx_k_tuple_163; static PyObject *__pyx_k_tuple_165; static PyObject *__pyx_k_tuple_167; static PyObject *__pyx_k_tuple_170; static PyObject *__pyx_k_tuple_173; static PyObject *__pyx_k_tuple_175; static PyObject *__pyx_k_tuple_177; static PyObject *__pyx_k_tuple_179; static PyObject *__pyx_k_tuple_181; static PyObject *__pyx_k_tuple_183; static PyObject *__pyx_k_tuple_186; static PyObject *__pyx_k_tuple_188; static PyObject *__pyx_k_tuple_190; static PyObject *__pyx_k_tuple_192; static PyObject *__pyx_k_tuple_194; static PyObject *__pyx_k_tuple_196; static PyObject *__pyx_k_tuple_198; static PyObject *__pyx_k_tuple_200; static PyObject *__pyx_k_tuple_205; static PyObject *__pyx_k_tuple_208; static PyObject *__pyx_k_tuple_210; static PyObject *__pyx_k_tuple_212; static PyObject *__pyx_k_tuple_214; static PyObject *__pyx_k_tuple_216; static PyObject *__pyx_k_tuple_218; static PyObject *__pyx_k_tuple_220; static PyObject *__pyx_k_tuple_222; static PyObject *__pyx_k_tuple_224; static PyObject *__pyx_k_tuple_226; static PyObject *__pyx_k_tuple_228; static PyObject *__pyx_k_tuple_230; static PyObject *__pyx_k_tuple_232; static PyObject *__pyx_k_tuple_234; static PyObject *__pyx_k_tuple_237; static PyObject *__pyx_k_tuple_239; static PyObject *__pyx_k_tuple_241; static PyObject *__pyx_k_tuple_243; static PyObject *__pyx_k_tuple_245; static PyObject *__pyx_k_tuple_247; static PyObject *__pyx_k_tuple_250; static PyObject *__pyx_k_tuple_252; static PyObject *__pyx_k_tuple_254; static PyObject *__pyx_k_tuple_256; static PyObject *__pyx_k_tuple_259; static PyObject *__pyx_k_tuple_262; static PyObject *__pyx_k_tuple_265; static PyObject *__pyx_k_tuple_267; static PyObject *__pyx_k_tuple_269; static PyObject *__pyx_k_tuple_271; static PyObject *__pyx_k_tuple_273; static PyObject *__pyx_k_tuple_275; static PyObject *__pyx_k_tuple_278; static PyObject *__pyx_k_tuple_281; static PyObject *__pyx_k_codeobj_67; static PyObject *__pyx_k_codeobj_77; static PyObject *__pyx_k_codeobj_80; static PyObject *__pyx_k_codeobj_106; static PyObject *__pyx_k_codeobj_109; static PyObject *__pyx_k_codeobj_111; static PyObject *__pyx_k_codeobj_113; static PyObject *__pyx_k_codeobj_115; static PyObject *__pyx_k_codeobj_117; static PyObject *__pyx_k_codeobj_119; static PyObject *__pyx_k_codeobj_121; static PyObject *__pyx_k_codeobj_123; static PyObject *__pyx_k_codeobj_125; static PyObject *__pyx_k_codeobj_127; static PyObject *__pyx_k_codeobj_129; static PyObject *__pyx_k_codeobj_132; static PyObject *__pyx_k_codeobj_135; static PyObject *__pyx_k_codeobj_138; static PyObject *__pyx_k_codeobj_140; static PyObject *__pyx_k_codeobj_142; static PyObject *__pyx_k_codeobj_144; static PyObject *__pyx_k_codeobj_146; static PyObject *__pyx_k_codeobj_148; static PyObject *__pyx_k_codeobj_150; static PyObject *__pyx_k_codeobj_153; static PyObject *__pyx_k_codeobj_156; static PyObject *__pyx_k_codeobj_158; static PyObject *__pyx_k_codeobj_160; static PyObject *__pyx_k_codeobj_162; static PyObject *__pyx_k_codeobj_164; static PyObject *__pyx_k_codeobj_166; static PyObject *__pyx_k_codeobj_168; static PyObject *__pyx_k_codeobj_171; static PyObject *__pyx_k_codeobj_174; static PyObject *__pyx_k_codeobj_176; static PyObject *__pyx_k_codeobj_178; static PyObject *__pyx_k_codeobj_180; static PyObject *__pyx_k_codeobj_182; static PyObject *__pyx_k_codeobj_184; static PyObject *__pyx_k_codeobj_187; static PyObject *__pyx_k_codeobj_189; static PyObject *__pyx_k_codeobj_191; static PyObject *__pyx_k_codeobj_193; static PyObject *__pyx_k_codeobj_195; static PyObject *__pyx_k_codeobj_197; static PyObject *__pyx_k_codeobj_199; static PyObject *__pyx_k_codeobj_201; static PyObject *__pyx_k_codeobj_206; static PyObject *__pyx_k_codeobj_209; static PyObject *__pyx_k_codeobj_211; static PyObject *__pyx_k_codeobj_213; static PyObject *__pyx_k_codeobj_215; static PyObject *__pyx_k_codeobj_217; static PyObject *__pyx_k_codeobj_219; static PyObject *__pyx_k_codeobj_221; static PyObject *__pyx_k_codeobj_223; static PyObject *__pyx_k_codeobj_225; static PyObject *__pyx_k_codeobj_227; static PyObject *__pyx_k_codeobj_229; static PyObject *__pyx_k_codeobj_231; static PyObject *__pyx_k_codeobj_233; static PyObject *__pyx_k_codeobj_235; static PyObject *__pyx_k_codeobj_238; static PyObject *__pyx_k_codeobj_240; static PyObject *__pyx_k_codeobj_242; static PyObject *__pyx_k_codeobj_244; static PyObject *__pyx_k_codeobj_246; static PyObject *__pyx_k_codeobj_248; static PyObject *__pyx_k_codeobj_251; static PyObject *__pyx_k_codeobj_253; static PyObject *__pyx_k_codeobj_255; static PyObject *__pyx_k_codeobj_257; static PyObject *__pyx_k_codeobj_260; static PyObject *__pyx_k_codeobj_263; static PyObject *__pyx_k_codeobj_266; static PyObject *__pyx_k_codeobj_268; static PyObject *__pyx_k_codeobj_270; static PyObject *__pyx_k_codeobj_272; static PyObject *__pyx_k_codeobj_274; static PyObject *__pyx_k_codeobj_276; static PyObject *__pyx_k_codeobj_279; static PyObject *__pyx_k_codeobj_282; /* "pandas/lib.pyx":62 * import_ufunc() * * cpdef map_indices_list(list index): # <<<<<<<<<<<<<< * ''' * Produce a dict mapping the values of the input array to their respective */ static PyObject *__pyx_pw_6pandas_3lib_1map_indices_list(PyObject *__pyx_self, PyObject *__pyx_v_index); /*proto*/ static PyObject *__pyx_f_6pandas_3lib_map_indices_list(PyObject *__pyx_v_index, CYTHON_UNUSED int __pyx_skip_dispatch) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_length; PyObject *__pyx_v_result = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; Py_ssize_t __pyx_t_2; PyObject *__pyx_t_3 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("map_indices_list", 0); /* "pandas/lib.pyx":73 * ''' * cdef Py_ssize_t i, length * cdef dict result = {} # <<<<<<<<<<<<<< * * length = len(index) */ __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 73; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_v_result = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/lib.pyx":75 * cdef dict result = {} * * length = len(index) # <<<<<<<<<<<<<< * * for i from 0 <= i < length: */ if (unlikely(((PyObject *)__pyx_v_index) == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 75; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_2 = PyList_GET_SIZE(((PyObject *)__pyx_v_index)); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 75; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_length = __pyx_t_2; /* "pandas/lib.pyx":77 * length = len(index) * * for i from 0 <= i < length: # <<<<<<<<<<<<<< * result[index[i]] = i * */ __pyx_t_2 = __pyx_v_length; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_2; __pyx_v_i++) { /* "pandas/lib.pyx":78 * * for i from 0 <= i < length: * result[index[i]] = i # <<<<<<<<<<<<<< * * return result */ __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_i); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 78; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (unlikely(((PyObject *)__pyx_v_index) == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 78; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_3 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_index), __pyx_v_i, sizeof(Py_ssize_t), PyInt_FromSsize_t, 1, 1, 1); if (!__pyx_t_3) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 78; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(((PyObject *)__pyx_v_result), __pyx_t_3, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 78; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } /* "pandas/lib.pyx":80 * result[index[i]] = i * * return result # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_result)); __pyx_r = ((PyObject *)__pyx_v_result); goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("pandas.lib.map_indices_list", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_result); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_3lib_1map_indices_list(PyObject *__pyx_self, PyObject *__pyx_v_index); /*proto*/ static char __pyx_doc_6pandas_3lib_map_indices_list[] = "\n Produce a dict mapping the values of the input array to their respective\n locations.\n\n Example:\n array(['hi', 'there']) --> {'hi' : 0 , 'there' : 1}\n\n Better to do this with Cython because of the enormous speed boost.\n "; static PyObject *__pyx_pw_6pandas_3lib_1map_indices_list(PyObject *__pyx_self, PyObject *__pyx_v_index) { CYTHON_UNUSED int __pyx_lineno = 0; CYTHON_UNUSED const char *__pyx_filename = NULL; CYTHON_UNUSED int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("map_indices_list (wrapper)", 0); if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_index), (&PyList_Type), 1, "index", 1))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_3lib_map_indices_list(__pyx_self, ((PyObject*)__pyx_v_index)); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/lib.pyx":62 * import_ufunc() * * cpdef map_indices_list(list index): # <<<<<<<<<<<<<< * ''' * Produce a dict mapping the values of the input array to their respective */ static PyObject *__pyx_pf_6pandas_3lib_map_indices_list(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_index) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("map_indices_list", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_6pandas_3lib_map_indices_list(__pyx_v_index, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas.lib.map_indices_list", __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_3lib_3ismember(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6pandas_3lib_2ismember[] = "\n Checks whether\n\n Parameters\n ----------\n arr : ndarray\n values : set\n\n Returns\n -------\n ismember : ndarray (boolean dtype)\n "; static PyMethodDef __pyx_mdef_6pandas_3lib_3ismember = {__Pyx_NAMESTR("ismember"), (PyCFunction)__pyx_pw_6pandas_3lib_3ismember, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_3lib_2ismember)}; static PyObject *__pyx_pw_6pandas_3lib_3ismember(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_arr = 0; PyObject *__pyx_v_values = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("ismember (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__arr,&__pyx_n_s__values,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__arr)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__values)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("ismember", 1, 2, 2, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "ismember") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __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_values = ((PyObject*)values[1]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("ismember", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.lib.ismember", __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_filename = __pyx_f[2]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), (&PySet_Type), 1, "values", 1))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_3lib_2ismember(__pyx_self, __pyx_v_arr, __pyx_v_values); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/lib.pyx":85 * from libc.stdlib cimport malloc, free * * def ismember(ndarray arr, set values): # <<<<<<<<<<<<<< * ''' * Checks whether */ static PyObject *__pyx_pf_6pandas_3lib_2ismember(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_arr, PyObject *__pyx_v_values) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_n; PyArrayObject *__pyx_v_result = 0; PyObject *__pyx_v_val = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_result; __Pyx_Buffer __pyx_pybuffer_result; 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; int __pyx_t_13; int __pyx_t_14; Py_ssize_t __pyx_t_15; Py_ssize_t __pyx_t_16; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("ismember", 0); __pyx_pybuffer_result.pybuffer.buf = NULL; __pyx_pybuffer_result.refcount = 0; __pyx_pybuffernd_result.data = NULL; __pyx_pybuffernd_result.rcbuffer = &__pyx_pybuffer_result; /* "pandas/lib.pyx":103 * object val * * n = len(arr) # <<<<<<<<<<<<<< * result = np.empty(n, dtype=np.uint8) * for i in range(n): */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_arr)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/lib.pyx":104 * * n = len(arr) * result = np.empty(n, dtype=np.uint8) # <<<<<<<<<<<<<< * for i in range(n): * val = util.get_value_at(arr, i) */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __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_n); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_2)); __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s__uint8); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__dtype), __pyx_t_6) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __Pyx_DECREF(((PyObject *)__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_filename = __pyx_f[2]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_7 = ((PyArrayObject *)__pyx_t_6); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_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_result.rcbuffer->pybuffer, (PyObject*)__pyx_v_result, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_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_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_8 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_7 = 0; __pyx_v_result = ((PyArrayObject *)__pyx_t_6); __pyx_t_6 = 0; /* "pandas/lib.pyx":105 * n = len(arr) * result = np.empty(n, dtype=np.uint8) * for i in range(n): # <<<<<<<<<<<<<< * val = util.get_value_at(arr, i) * if val in values: */ __pyx_t_1 = __pyx_v_n; for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_1; __pyx_t_12+=1) { __pyx_v_i = __pyx_t_12; /* "pandas/lib.pyx":106 * result = np.empty(n, dtype=np.uint8) * for i in range(n): * val = util.get_value_at(arr, i) # <<<<<<<<<<<<<< * if val in values: * result[i] = 1 */ __pyx_t_6 = PyInt_FromSsize_t(__pyx_v_i); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 106; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_2 = __pyx_f_4util_get_value_at(__pyx_v_arr, __pyx_t_6); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 106; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF_SET(__pyx_v_val, __pyx_t_2); __pyx_t_2 = 0; /* "pandas/lib.pyx":107 * for i in range(n): * val = util.get_value_at(arr, i) * if val in values: # <<<<<<<<<<<<<< * result[i] = 1 * else: */ __pyx_t_13 = (__Pyx_PySequence_Contains(__pyx_v_val, ((PyObject *)__pyx_v_values), Py_EQ)); if (unlikely(__pyx_t_13 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_14 = (__pyx_t_13 != 0); if (__pyx_t_14) { /* "pandas/lib.pyx":108 * val = util.get_value_at(arr, i) * if val in values: * result[i] = 1 # <<<<<<<<<<<<<< * else: * result[i] = 0 */ __pyx_t_15 = __pyx_v_i; __pyx_t_8 = -1; if (__pyx_t_15 < 0) { __pyx_t_15 += __pyx_pybuffernd_result.diminfo[0].shape; if (unlikely(__pyx_t_15 < 0)) __pyx_t_8 = 0; } else if (unlikely(__pyx_t_15 >= __pyx_pybuffernd_result.diminfo[0].shape)) __pyx_t_8 = 0; if (unlikely(__pyx_t_8 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_8); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 108; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_result.diminfo[0].strides) = 1; goto __pyx_L5; } /*else*/ { /* "pandas/lib.pyx":110 * result[i] = 1 * else: * result[i] = 0 # <<<<<<<<<<<<<< * * return result.view(np.bool_) */ __pyx_t_16 = __pyx_v_i; __pyx_t_8 = -1; if (__pyx_t_16 < 0) { __pyx_t_16 += __pyx_pybuffernd_result.diminfo[0].shape; if (unlikely(__pyx_t_16 < 0)) __pyx_t_8 = 0; } else if (unlikely(__pyx_t_16 >= __pyx_pybuffernd_result.diminfo[0].shape)) __pyx_t_8 = 0; if (unlikely(__pyx_t_8 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_8); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 110; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_result.diminfo[0].strides) = 0; } __pyx_L5:; } /* "pandas/lib.pyx":112 * result[i] = 0 * * return result.view(np.bool_) # <<<<<<<<<<<<<< * * #---------------------------------------------------------------------- */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_result), __pyx_n_s__view); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 112; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 112; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s__bool_); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 112; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 112; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 112; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0; __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; __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_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.lib.ismember", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_result); __Pyx_XDECREF(__pyx_v_val); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/lib.pyx":121 * from datetime import date as pydate * * cdef inline int64_t gmtime(object date): # <<<<<<<<<<<<<< * cdef int y, m, d, h, mn, s, days * */ static CYTHON_INLINE __pyx_t_5numpy_int64_t __pyx_f_6pandas_3lib_gmtime(PyObject *__pyx_v_date) { int __pyx_v_y; int __pyx_v_m; int __pyx_v_d; int __pyx_v_h; int __pyx_v_mn; int __pyx_v_s; int __pyx_v_days; __pyx_t_5numpy_int64_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; int __pyx_t_5; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("gmtime", 0); /* "pandas/lib.pyx":124 * cdef int y, m, d, h, mn, s, days * * y = PyDateTime_GET_YEAR(date) # <<<<<<<<<<<<<< * m = PyDateTime_GET_MONTH(date) * d = PyDateTime_GET_DAY(date) */ if (!(likely(((__pyx_v_date) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_date, __pyx_ptype_8datetime_date))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 124; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_y = PyDateTime_GET_YEAR(((PyDateTime_Date *)__pyx_v_date)); /* "pandas/lib.pyx":125 * * y = PyDateTime_GET_YEAR(date) * m = PyDateTime_GET_MONTH(date) # <<<<<<<<<<<<<< * d = PyDateTime_GET_DAY(date) * h = PyDateTime_DATE_GET_HOUR(date) */ if (!(likely(((__pyx_v_date) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_date, __pyx_ptype_8datetime_date))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 125; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_m = PyDateTime_GET_MONTH(((PyDateTime_Date *)__pyx_v_date)); /* "pandas/lib.pyx":126 * y = PyDateTime_GET_YEAR(date) * m = PyDateTime_GET_MONTH(date) * d = PyDateTime_GET_DAY(date) # <<<<<<<<<<<<<< * h = PyDateTime_DATE_GET_HOUR(date) * mn = PyDateTime_DATE_GET_MINUTE(date) */ if (!(likely(((__pyx_v_date) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_date, __pyx_ptype_8datetime_date))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 126; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_d = PyDateTime_GET_DAY(((PyDateTime_Date *)__pyx_v_date)); /* "pandas/lib.pyx":127 * m = PyDateTime_GET_MONTH(date) * d = PyDateTime_GET_DAY(date) * h = PyDateTime_DATE_GET_HOUR(date) # <<<<<<<<<<<<<< * mn = PyDateTime_DATE_GET_MINUTE(date) * s = PyDateTime_DATE_GET_SECOND(date) */ __pyx_v_h = PyDateTime_DATE_GET_HOUR(__pyx_v_date); /* "pandas/lib.pyx":128 * d = PyDateTime_GET_DAY(date) * h = PyDateTime_DATE_GET_HOUR(date) * mn = PyDateTime_DATE_GET_MINUTE(date) # <<<<<<<<<<<<<< * s = PyDateTime_DATE_GET_SECOND(date) * */ __pyx_v_mn = PyDateTime_DATE_GET_MINUTE(__pyx_v_date); /* "pandas/lib.pyx":129 * h = PyDateTime_DATE_GET_HOUR(date) * mn = PyDateTime_DATE_GET_MINUTE(date) * s = PyDateTime_DATE_GET_SECOND(date) # <<<<<<<<<<<<<< * * days = pydate(y, m, 1).toordinal() - _EPOCH_ORD + d - 1 */ __pyx_v_s = PyDateTime_DATE_GET_SECOND(__pyx_v_date); /* "pandas/lib.pyx":131 * s = PyDateTime_DATE_GET_SECOND(date) * * days = pydate(y, m, 1).toordinal() - _EPOCH_ORD + d - 1 # <<<<<<<<<<<<<< * return (( (((days * 24 + h) * 60 + mn))) * 60 + s) * 1000 * */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__pydate); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 131; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyInt_FromLong(__pyx_v_y); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 131; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyInt_FromLong(__pyx_v_m); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 131; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 131; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __Pyx_INCREF(__pyx_int_1); PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_int_1); __Pyx_GIVEREF(__pyx_int_1); __pyx_t_2 = 0; __pyx_t_3 = 0; __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 131; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s__toordinal); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 131; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 131; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyInt_FromLong(__pyx_v_6pandas_3lib__EPOCH_ORD); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 131; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_1 = PyNumber_Subtract(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 131; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyInt_FromLong(__pyx_v_d); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 131; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = PyNumber_Add(__pyx_t_1, __pyx_t_4); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 131; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyNumber_Subtract(__pyx_t_3, __pyx_int_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 131; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_5 = __Pyx_PyInt_AsInt(__pyx_t_4); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 131; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_days = __pyx_t_5; /* "pandas/lib.pyx":132 * * days = pydate(y, m, 1).toordinal() - _EPOCH_ORD + d - 1 * return (( (((days * 24 + h) * 60 + mn))) * 60 + s) * 1000 # <<<<<<<<<<<<<< * * cpdef object to_datetime(int64_t timestamp): */ __pyx_r = (((((__pyx_t_5numpy_int64_t)((((__pyx_v_days * 24) + __pyx_v_h) * 60) + __pyx_v_mn)) * 60) + __pyx_v_s) * 1000); goto __pyx_L0; __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_WriteUnraisable("pandas.lib.gmtime", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/lib.pyx":134 * return (( (((days * 24 + h) * 60 + mn))) * 60 + s) * 1000 * * cpdef object to_datetime(int64_t timestamp): # <<<<<<<<<<<<<< * return pydatetime.utcfromtimestamp(timestamp / 1000.0) * */ static PyObject *__pyx_pw_6pandas_3lib_5to_datetime(PyObject *__pyx_self, PyObject *__pyx_arg_timestamp); /*proto*/ static PyObject *__pyx_f_6pandas_3lib_to_datetime(__pyx_t_5numpy_int64_t __pyx_v_timestamp, CYTHON_UNUSED int __pyx_skip_dispatch) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("to_datetime", 0); /* "pandas/lib.pyx":135 * * cpdef object to_datetime(int64_t timestamp): * return pydatetime.utcfromtimestamp(timestamp / 1000.0) # <<<<<<<<<<<<<< * * cpdef object to_timestamp(object dt): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__pydatetime); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 135; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s__utcfromtimestamp); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 135; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyFloat_FromDouble((__pyx_v_timestamp / 1000.0)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 135; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 135; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 135; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("pandas.lib.to_datetime", __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_3lib_5to_datetime(PyObject *__pyx_self, PyObject *__pyx_arg_timestamp); /*proto*/ static PyObject *__pyx_pw_6pandas_3lib_5to_datetime(PyObject *__pyx_self, PyObject *__pyx_arg_timestamp) { __pyx_t_5numpy_int64_t __pyx_v_timestamp; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("to_datetime (wrapper)", 0); assert(__pyx_arg_timestamp); { __pyx_v_timestamp = __Pyx_PyInt_from_py_npy_int64(__pyx_arg_timestamp); if (unlikely((__pyx_v_timestamp == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 134; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; __Pyx_AddTraceback("pandas.lib.to_datetime", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pandas_3lib_4to_datetime(__pyx_self, ((__pyx_t_5numpy_int64_t)__pyx_v_timestamp)); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/lib.pyx":134 * return (( (((days * 24 + h) * 60 + mn))) * 60 + s) * 1000 * * cpdef object to_datetime(int64_t timestamp): # <<<<<<<<<<<<<< * return pydatetime.utcfromtimestamp(timestamp / 1000.0) * */ static PyObject *__pyx_pf_6pandas_3lib_4to_datetime(CYTHON_UNUSED PyObject *__pyx_self, __pyx_t_5numpy_int64_t __pyx_v_timestamp) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("to_datetime", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_6pandas_3lib_to_datetime(__pyx_v_timestamp, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 134; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas.lib.to_datetime", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/lib.pyx":137 * return pydatetime.utcfromtimestamp(timestamp / 1000.0) * * cpdef object to_timestamp(object dt): # <<<<<<<<<<<<<< * return gmtime(dt) * */ static PyObject *__pyx_pw_6pandas_3lib_7to_timestamp(PyObject *__pyx_self, PyObject *__pyx_v_dt); /*proto*/ static PyObject *__pyx_f_6pandas_3lib_to_timestamp(PyObject *__pyx_v_dt, CYTHON_UNUSED int __pyx_skip_dispatch) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("to_timestamp", 0); /* "pandas/lib.pyx":138 * * cpdef object to_timestamp(object dt): * return gmtime(dt) # <<<<<<<<<<<<<< * * def array_to_timestamp(ndarray[object, ndim=1] arr): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyInt_to_py_npy_int64(__pyx_f_6pandas_3lib_gmtime(__pyx_v_dt)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 138; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas.lib.to_timestamp", __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_3lib_7to_timestamp(PyObject *__pyx_self, PyObject *__pyx_v_dt); /*proto*/ static PyObject *__pyx_pw_6pandas_3lib_7to_timestamp(PyObject *__pyx_self, PyObject *__pyx_v_dt) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("to_timestamp (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_3lib_6to_timestamp(__pyx_self, ((PyObject *)__pyx_v_dt)); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/lib.pyx":137 * return pydatetime.utcfromtimestamp(timestamp / 1000.0) * * cpdef object to_timestamp(object dt): # <<<<<<<<<<<<<< * return gmtime(dt) * */ static PyObject *__pyx_pf_6pandas_3lib_6to_timestamp(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_dt) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("to_timestamp", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_6pandas_3lib_to_timestamp(__pyx_v_dt, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 137; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas.lib.to_timestamp", __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_3lib_9array_to_timestamp(PyObject *__pyx_self, PyObject *__pyx_v_arr); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_3lib_9array_to_timestamp = {__Pyx_NAMESTR("array_to_timestamp"), (PyCFunction)__pyx_pw_6pandas_3lib_9array_to_timestamp, METH_O, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_3lib_9array_to_timestamp(PyObject *__pyx_self, PyObject *__pyx_v_arr) { CYTHON_UNUSED int __pyx_lineno = 0; CYTHON_UNUSED const char *__pyx_filename = NULL; CYTHON_UNUSED int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("array_to_timestamp (wrapper)", 0); if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_arr), __pyx_ptype_5numpy_ndarray, 1, "arr", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 140; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_3lib_8array_to_timestamp(__pyx_self, ((PyArrayObject *)__pyx_v_arr)); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/lib.pyx":140 * return gmtime(dt) * * def array_to_timestamp(ndarray[object, ndim=1] arr): # <<<<<<<<<<<<<< * cdef int i, n * cdef ndarray[int64_t, ndim=1] result */ static PyObject *__pyx_pf_6pandas_3lib_8array_to_timestamp(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_arr) { int __pyx_v_i; int __pyx_v_n; PyArrayObject *__pyx_v_result = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_arr; __Pyx_Buffer __pyx_pybuffer_arr; __Pyx_LocalBuf_ND __pyx_pybuffernd_result; __Pyx_Buffer __pyx_pybuffer_result; 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; int __pyx_t_12; int __pyx_t_13; int __pyx_t_14; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("array_to_timestamp", 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_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_filename = __pyx_f[2]; __pyx_lineno = 140; __pyx_clineno = __LINE__; goto __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/lib.pyx":144 * cdef ndarray[int64_t, ndim=1] result * * n = len(arr) # <<<<<<<<<<<<<< * result = np.empty(n, dtype=np.int64) * */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_arr)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 144; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/lib.pyx":145 * * n = len(arr) * result = np.empty(n, dtype=np.int64) # <<<<<<<<<<<<<< * * for i from 0 <= i < n: */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 145; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 145; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyInt_FromLong(__pyx_v_n); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 145; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 145; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 145; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_2)); __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 145; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s__int64); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 145; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__dtype), __pyx_t_6) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 145; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 145; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __Pyx_DECREF(((PyObject *)__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_filename = __pyx_f[2]; __pyx_lineno = 145; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_7 = ((PyArrayObject *)__pyx_t_6); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_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_result.rcbuffer->pybuffer, (PyObject*)__pyx_v_result, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_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_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_8 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 145; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_7 = 0; __pyx_v_result = ((PyArrayObject *)__pyx_t_6); __pyx_t_6 = 0; /* "pandas/lib.pyx":147 * result = np.empty(n, dtype=np.int64) * * for i from 0 <= i < n: # <<<<<<<<<<<<<< * result[i] = gmtime(arr[i]) * */ __pyx_t_8 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_8; __pyx_v_i++) { /* "pandas/lib.pyx":148 * * for i from 0 <= i < n: * result[i] = gmtime(arr[i]) # <<<<<<<<<<<<<< * * return result */ __pyx_t_12 = __pyx_v_i; __pyx_t_13 = -1; if (__pyx_t_12 < 0) { __pyx_t_12 += __pyx_pybuffernd_arr.diminfo[0].shape; if (unlikely(__pyx_t_12 < 0)) __pyx_t_13 = 0; } else if (unlikely(__pyx_t_12 >= __pyx_pybuffernd_arr.diminfo[0].shape)) __pyx_t_13 = 0; if (unlikely(__pyx_t_13 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_13); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 148; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_6 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_arr.rcbuffer->pybuffer.buf, __pyx_t_12, __pyx_pybuffernd_arr.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_6); __pyx_t_13 = __pyx_v_i; __pyx_t_14 = -1; if (__pyx_t_13 < 0) { __pyx_t_13 += __pyx_pybuffernd_result.diminfo[0].shape; if (unlikely(__pyx_t_13 < 0)) __pyx_t_14 = 0; } else if (unlikely(__pyx_t_13 >= __pyx_pybuffernd_result.diminfo[0].shape)) __pyx_t_14 = 0; if (unlikely(__pyx_t_14 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_14); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 148; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_result.diminfo[0].strides) = __pyx_f_6pandas_3lib_gmtime(__pyx_t_6); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } /* "pandas/lib.pyx":150 * result[i] = gmtime(arr[i]) * * return result # <<<<<<<<<<<<<< * * def time64_to_datetime(ndarray[int64_t, ndim=1] arr): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_result)); __pyx_r = ((PyObject *)__pyx_v_result); goto __pyx_L0; __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_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_arr.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.lib.array_to_timestamp", __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_result.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_result); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_3lib_11time64_to_datetime(PyObject *__pyx_self, PyObject *__pyx_v_arr); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_3lib_11time64_to_datetime = {__Pyx_NAMESTR("time64_to_datetime"), (PyCFunction)__pyx_pw_6pandas_3lib_11time64_to_datetime, METH_O, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_3lib_11time64_to_datetime(PyObject *__pyx_self, PyObject *__pyx_v_arr) { CYTHON_UNUSED int __pyx_lineno = 0; CYTHON_UNUSED const char *__pyx_filename = NULL; CYTHON_UNUSED int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("time64_to_datetime (wrapper)", 0); if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_arr), __pyx_ptype_5numpy_ndarray, 1, "arr", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 152; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_3lib_10time64_to_datetime(__pyx_self, ((PyArrayObject *)__pyx_v_arr)); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/lib.pyx":152 * return result * * def time64_to_datetime(ndarray[int64_t, ndim=1] arr): # <<<<<<<<<<<<<< * cdef int i, n * cdef ndarray[object, ndim=1] result */ static PyObject *__pyx_pf_6pandas_3lib_10time64_to_datetime(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_arr) { int __pyx_v_i; int __pyx_v_n; PyArrayObject *__pyx_v_result = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_arr; __Pyx_Buffer __pyx_pybuffer_arr; __Pyx_LocalBuf_ND __pyx_pybuffernd_result; __Pyx_Buffer __pyx_pybuffer_result; 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; PyArrayObject *__pyx_t_6 = NULL; int __pyx_t_7; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; int __pyx_t_11; int __pyx_t_12; int __pyx_t_13; PyObject **__pyx_t_14; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("time64_to_datetime", 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_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_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 152; __pyx_clineno = __LINE__; goto __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/lib.pyx":156 * cdef ndarray[object, ndim=1] result * * n = len(arr) # <<<<<<<<<<<<<< * result = np.empty(n, dtype=object) * */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_arr)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 156; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/lib.pyx":157 * * n = len(arr) * result = np.empty(n, dtype=object) # <<<<<<<<<<<<<< * * for i from 0 <= i < n: */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyInt_FromLong(__pyx_v_n); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_2)); if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__dtype), __pyx_builtin_object) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_5 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_6 = ((PyArrayObject *)__pyx_t_5); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_object, 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_result.rcbuffer->pybuffer, (PyObject*)__pyx_v_result, &__Pyx_TypeInfo_object, 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_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_7 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_6 = 0; __pyx_v_result = ((PyArrayObject *)__pyx_t_5); __pyx_t_5 = 0; /* "pandas/lib.pyx":159 * result = np.empty(n, dtype=object) * * for i from 0 <= i < n: # <<<<<<<<<<<<<< * result[i] = to_datetime(arr[i]) * */ __pyx_t_7 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_7; __pyx_v_i++) { /* "pandas/lib.pyx":160 * * for i from 0 <= i < n: * result[i] = to_datetime(arr[i]) # <<<<<<<<<<<<<< * * return result */ __pyx_t_11 = __pyx_v_i; __pyx_t_12 = -1; if (__pyx_t_11 < 0) { __pyx_t_11 += __pyx_pybuffernd_arr.diminfo[0].shape; if (unlikely(__pyx_t_11 < 0)) __pyx_t_12 = 0; } else if (unlikely(__pyx_t_11 >= __pyx_pybuffernd_arr.diminfo[0].shape)) __pyx_t_12 = 0; if (unlikely(__pyx_t_12 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_12); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 160; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_5 = __pyx_f_6pandas_3lib_to_datetime((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_arr.rcbuffer->pybuffer.buf, __pyx_t_11, __pyx_pybuffernd_arr.diminfo[0].strides)), 0); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 160; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_12 = __pyx_v_i; __pyx_t_13 = -1; if (__pyx_t_12 < 0) { __pyx_t_12 += __pyx_pybuffernd_result.diminfo[0].shape; if (unlikely(__pyx_t_12 < 0)) __pyx_t_13 = 0; } else if (unlikely(__pyx_t_12 >= __pyx_pybuffernd_result.diminfo[0].shape)) __pyx_t_13 = 0; if (unlikely(__pyx_t_13 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_13); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 160; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_14 = __Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_12, __pyx_pybuffernd_result.diminfo[0].strides); __Pyx_GOTREF(*__pyx_t_14); __Pyx_INCREF(__pyx_t_5); __Pyx_DECREF(*__pyx_t_14); *__pyx_t_14 = __pyx_t_5; __Pyx_GIVEREF(*__pyx_t_14); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } /* "pandas/lib.pyx":162 * result[i] = to_datetime(arr[i]) * * return result # <<<<<<<<<<<<<< * * cdef inline int64_t get_timedelta64_value(val): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_result)); __pyx_r = ((PyObject *)__pyx_v_result); goto __pyx_L0; __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_XDECREF(__pyx_t_5); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_arr.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.lib.time64_to_datetime", __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_result.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_result); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/lib.pyx":164 * return result * * cdef inline int64_t get_timedelta64_value(val): # <<<<<<<<<<<<<< * return val.view('i8') * */ static CYTHON_INLINE __pyx_t_5numpy_int64_t __pyx_f_6pandas_3lib_get_timedelta64_value(PyObject *__pyx_v_val) { __pyx_t_5numpy_int64_t __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; __pyx_t_5numpy_int64_t __pyx_t_3; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_timedelta64_value", 0); /* "pandas/lib.pyx":165 * * cdef inline int64_t get_timedelta64_value(val): * return val.view('i8') # <<<<<<<<<<<<<< * * #---------------------------------------------------------------------- */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_val, __pyx_n_s__view); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 165; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_k_tuple_1), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 165; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_3 = __Pyx_PyInt_from_py_npy_int64(__pyx_t_2); if (unlikely((__pyx_t_3 == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 165; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_3; goto __pyx_L0; __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_WriteUnraisable("pandas.lib.get_timedelta64_value", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/lib.pyx":173 * cdef double NEGINF = -INF * * cpdef checknull(object val): # <<<<<<<<<<<<<< * if util.is_float_object(val) or util.is_complex_object(val): * return val != val # and val != INF and val != NEGINF */ static PyObject *__pyx_pw_6pandas_3lib_13checknull(PyObject *__pyx_self, PyObject *__pyx_v_val); /*proto*/ static PyObject *__pyx_f_6pandas_3lib_checknull(PyObject *__pyx_v_val, CYTHON_UNUSED int __pyx_skip_dispatch) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("checknull", 0); /* "pandas/lib.pyx":174 * * cpdef checknull(object val): * if util.is_float_object(val) or util.is_complex_object(val): # <<<<<<<<<<<<<< * return val != val # and val != INF and val != NEGINF * elif util.is_datetime64_object(val): */ __pyx_t_1 = (is_float_object(__pyx_v_val) != 0); if (!__pyx_t_1) { __pyx_t_2 = (is_complex_object(__pyx_v_val) != 0); __pyx_t_3 = __pyx_t_2; } else { __pyx_t_3 = __pyx_t_1; } if (__pyx_t_3) { /* "pandas/lib.pyx":175 * cpdef checknull(object val): * if util.is_float_object(val) or util.is_complex_object(val): * return val != val # and val != INF and val != NEGINF # <<<<<<<<<<<<<< * elif util.is_datetime64_object(val): * return get_datetime64_value(val) == NPY_NAT */ __Pyx_XDECREF(__pyx_r); __pyx_t_4 = PyObject_RichCompare(__pyx_v_val, __pyx_v_val, Py_NE); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 175; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; goto __pyx_L3; } /* "pandas/lib.pyx":176 * if util.is_float_object(val) or util.is_complex_object(val): * return val != val # and val != INF and val != NEGINF * elif util.is_datetime64_object(val): # <<<<<<<<<<<<<< * return get_datetime64_value(val) == NPY_NAT * elif val is NaT: */ __pyx_t_3 = (is_datetime64_object(__pyx_v_val) != 0); if (__pyx_t_3) { /* "pandas/lib.pyx":177 * return val != val # and val != INF and val != NEGINF * elif util.is_datetime64_object(val): * return get_datetime64_value(val) == NPY_NAT # <<<<<<<<<<<<<< * elif val is NaT: * return True */ __Pyx_XDECREF(__pyx_r); __pyx_t_4 = __Pyx_PyBool_FromLong((get_datetime64_value(__pyx_v_val) == __pyx_v_6pandas_3lib_NPY_NAT)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 177; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; goto __pyx_L3; } /* "pandas/lib.pyx":178 * elif util.is_datetime64_object(val): * return get_datetime64_value(val) == NPY_NAT * elif val is NaT: # <<<<<<<<<<<<<< * return True * elif util.is_timedelta64_object(val): */ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s__NaT); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 178; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = (__pyx_v_val == __pyx_t_4); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_1 = (__pyx_t_3 != 0); if (__pyx_t_1) { /* "pandas/lib.pyx":179 * return get_datetime64_value(val) == NPY_NAT * elif val is NaT: * return True # <<<<<<<<<<<<<< * elif util.is_timedelta64_object(val): * return get_timedelta64_value(val) == NPY_NAT */ __Pyx_XDECREF(__pyx_r); __pyx_t_4 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 179; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; goto __pyx_L3; } /* "pandas/lib.pyx":180 * elif val is NaT: * return True * elif util.is_timedelta64_object(val): # <<<<<<<<<<<<<< * return get_timedelta64_value(val) == NPY_NAT * elif is_array(val): */ __pyx_t_1 = (is_timedelta64_object(__pyx_v_val) != 0); if (__pyx_t_1) { /* "pandas/lib.pyx":181 * return True * elif util.is_timedelta64_object(val): * return get_timedelta64_value(val) == NPY_NAT # <<<<<<<<<<<<<< * elif is_array(val): * return False */ __Pyx_XDECREF(__pyx_r); __pyx_t_4 = __Pyx_PyBool_FromLong((__pyx_f_6pandas_3lib_get_timedelta64_value(__pyx_v_val) == __pyx_v_6pandas_3lib_NPY_NAT)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 181; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; goto __pyx_L3; } /* "pandas/lib.pyx":182 * elif util.is_timedelta64_object(val): * return get_timedelta64_value(val) == NPY_NAT * elif is_array(val): # <<<<<<<<<<<<<< * return False * else: */ __pyx_t_4 = __pyx_f_4util_is_array(__pyx_v_val); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 182; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 182; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_1) { /* "pandas/lib.pyx":183 * return get_timedelta64_value(val) == NPY_NAT * elif is_array(val): * return False # <<<<<<<<<<<<<< * else: * return _checknull(val) */ __Pyx_XDECREF(__pyx_r); __pyx_t_4 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 183; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; goto __pyx_L3; } /*else*/ { /* "pandas/lib.pyx":185 * return False * else: * return _checknull(val) # <<<<<<<<<<<<<< * * cpdef checknull_old(object val): */ __Pyx_XDECREF(__pyx_r); __pyx_t_4 = __Pyx_PyBool_FromLong(__pyx_f_4util__checknull(__pyx_v_val)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 185; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; } __pyx_L3:; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("pandas.lib.checknull", __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_3lib_13checknull(PyObject *__pyx_self, PyObject *__pyx_v_val); /*proto*/ static PyObject *__pyx_pw_6pandas_3lib_13checknull(PyObject *__pyx_self, PyObject *__pyx_v_val) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("checknull (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_3lib_12checknull(__pyx_self, ((PyObject *)__pyx_v_val)); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/lib.pyx":173 * cdef double NEGINF = -INF * * cpdef checknull(object val): # <<<<<<<<<<<<<< * if util.is_float_object(val) or util.is_complex_object(val): * return val != val # and val != INF and val != NEGINF */ static PyObject *__pyx_pf_6pandas_3lib_12checknull(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_val) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("checknull", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_6pandas_3lib_checknull(__pyx_v_val, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 173; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas.lib.checknull", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/lib.pyx":187 * return _checknull(val) * * cpdef checknull_old(object val): # <<<<<<<<<<<<<< * if util.is_float_object(val) or util.is_complex_object(val): * return val != val or val == INF or val == NEGINF */ static PyObject *__pyx_pw_6pandas_3lib_15checknull_old(PyObject *__pyx_self, PyObject *__pyx_v_val); /*proto*/ static PyObject *__pyx_f_6pandas_3lib_checknull_old(PyObject *__pyx_v_val, CYTHON_UNUSED int __pyx_skip_dispatch) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("checknull_old", 0); /* "pandas/lib.pyx":188 * * cpdef checknull_old(object val): * if util.is_float_object(val) or util.is_complex_object(val): # <<<<<<<<<<<<<< * return val != val or val == INF or val == NEGINF * elif util.is_datetime64_object(val): */ __pyx_t_1 = (is_float_object(__pyx_v_val) != 0); if (!__pyx_t_1) { __pyx_t_2 = (is_complex_object(__pyx_v_val) != 0); __pyx_t_3 = __pyx_t_2; } else { __pyx_t_3 = __pyx_t_1; } if (__pyx_t_3) { /* "pandas/lib.pyx":189 * cpdef checknull_old(object val): * if util.is_float_object(val) or util.is_complex_object(val): * return val != val or val == INF or val == NEGINF # <<<<<<<<<<<<<< * elif util.is_datetime64_object(val): * return get_datetime64_value(val) == NPY_NAT */ __Pyx_XDECREF(__pyx_r); __pyx_t_4 = PyObject_RichCompare(__pyx_v_val, __pyx_v_val, Py_NE); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 189; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 189; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (!__pyx_t_3) { __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_5 = PyFloat_FromDouble(__pyx_v_6pandas_3lib_INF); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 189; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = PyObject_RichCompare(__pyx_v_val, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 189; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 189; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (!__pyx_t_3) { __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_5 = PyFloat_FromDouble(__pyx_v_6pandas_3lib_NEGINF); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 189; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_7 = PyObject_RichCompare(__pyx_v_val, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 189; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __pyx_t_7; __pyx_t_7 = 0; } else { __pyx_t_5 = __pyx_t_6; __pyx_t_6 = 0; } __pyx_t_6 = __pyx_t_5; __pyx_t_5 = 0; } else { __pyx_t_6 = __pyx_t_4; __pyx_t_4 = 0; } __pyx_r = __pyx_t_6; __pyx_t_6 = 0; goto __pyx_L0; goto __pyx_L3; } /* "pandas/lib.pyx":190 * if util.is_float_object(val) or util.is_complex_object(val): * return val != val or val == INF or val == NEGINF * elif util.is_datetime64_object(val): # <<<<<<<<<<<<<< * return get_datetime64_value(val) == NPY_NAT * elif val is NaT: */ __pyx_t_3 = (is_datetime64_object(__pyx_v_val) != 0); if (__pyx_t_3) { /* "pandas/lib.pyx":191 * return val != val or val == INF or val == NEGINF * elif util.is_datetime64_object(val): * return get_datetime64_value(val) == NPY_NAT # <<<<<<<<<<<<<< * elif val is NaT: * return True */ __Pyx_XDECREF(__pyx_r); __pyx_t_6 = __Pyx_PyBool_FromLong((get_datetime64_value(__pyx_v_val) == __pyx_v_6pandas_3lib_NPY_NAT)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 191; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_r = __pyx_t_6; __pyx_t_6 = 0; goto __pyx_L0; goto __pyx_L3; } /* "pandas/lib.pyx":192 * elif util.is_datetime64_object(val): * return get_datetime64_value(val) == NPY_NAT * elif val is NaT: # <<<<<<<<<<<<<< * return True * elif util.is_timedelta64_object(val): */ __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s__NaT); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 192; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_3 = (__pyx_v_val == __pyx_t_6); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_1 = (__pyx_t_3 != 0); if (__pyx_t_1) { /* "pandas/lib.pyx":193 * return get_datetime64_value(val) == NPY_NAT * elif val is NaT: * return True # <<<<<<<<<<<<<< * elif util.is_timedelta64_object(val): * return get_timedelta64_value(val) == NPY_NAT */ __Pyx_XDECREF(__pyx_r); __pyx_t_6 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 193; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_r = __pyx_t_6; __pyx_t_6 = 0; goto __pyx_L0; goto __pyx_L3; } /* "pandas/lib.pyx":194 * elif val is NaT: * return True * elif util.is_timedelta64_object(val): # <<<<<<<<<<<<<< * return get_timedelta64_value(val) == NPY_NAT * elif is_array(val): */ __pyx_t_1 = (is_timedelta64_object(__pyx_v_val) != 0); if (__pyx_t_1) { /* "pandas/lib.pyx":195 * return True * elif util.is_timedelta64_object(val): * return get_timedelta64_value(val) == NPY_NAT # <<<<<<<<<<<<<< * elif is_array(val): * return False */ __Pyx_XDECREF(__pyx_r); __pyx_t_6 = __Pyx_PyBool_FromLong((__pyx_f_6pandas_3lib_get_timedelta64_value(__pyx_v_val) == __pyx_v_6pandas_3lib_NPY_NAT)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 195; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_r = __pyx_t_6; __pyx_t_6 = 0; goto __pyx_L0; goto __pyx_L3; } /* "pandas/lib.pyx":196 * elif util.is_timedelta64_object(val): * return get_timedelta64_value(val) == NPY_NAT * elif is_array(val): # <<<<<<<<<<<<<< * return False * else: */ __pyx_t_6 = __pyx_f_4util_is_array(__pyx_v_val); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 196; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 196; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (__pyx_t_1) { /* "pandas/lib.pyx":197 * return get_timedelta64_value(val) == NPY_NAT * elif is_array(val): * return False # <<<<<<<<<<<<<< * else: * return util._checknull(val) */ __Pyx_XDECREF(__pyx_r); __pyx_t_6 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 197; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_r = __pyx_t_6; __pyx_t_6 = 0; goto __pyx_L0; goto __pyx_L3; } /*else*/ { /* "pandas/lib.pyx":199 * return False * else: * return util._checknull(val) # <<<<<<<<<<<<<< * * def isscalar(object val): */ __Pyx_XDECREF(__pyx_r); __pyx_t_6 = __Pyx_PyBool_FromLong(__pyx_f_4util__checknull(__pyx_v_val)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 199; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_r = __pyx_t_6; __pyx_t_6 = 0; goto __pyx_L0; } __pyx_L3:; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_AddTraceback("pandas.lib.checknull_old", __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_3lib_15checknull_old(PyObject *__pyx_self, PyObject *__pyx_v_val); /*proto*/ static PyObject *__pyx_pw_6pandas_3lib_15checknull_old(PyObject *__pyx_self, PyObject *__pyx_v_val) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("checknull_old (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_3lib_14checknull_old(__pyx_self, ((PyObject *)__pyx_v_val)); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/lib.pyx":187 * return _checknull(val) * * cpdef checknull_old(object val): # <<<<<<<<<<<<<< * if util.is_float_object(val) or util.is_complex_object(val): * return val != val or val == INF or val == NEGINF */ static PyObject *__pyx_pf_6pandas_3lib_14checknull_old(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_val) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("checknull_old", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_6pandas_3lib_checknull_old(__pyx_v_val, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 187; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas.lib.checknull_old", __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_3lib_17isscalar(PyObject *__pyx_self, PyObject *__pyx_v_val); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_3lib_17isscalar = {__Pyx_NAMESTR("isscalar"), (PyCFunction)__pyx_pw_6pandas_3lib_17isscalar, METH_O, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_3lib_17isscalar(PyObject *__pyx_self, PyObject *__pyx_v_val) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("isscalar (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_3lib_16isscalar(__pyx_self, ((PyObject *)__pyx_v_val)); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/lib.pyx":201 * return util._checknull(val) * * def isscalar(object val): # <<<<<<<<<<<<<< * return np.isscalar(val) or val is None or PyDateTime_Check(val) * */ static PyObject *__pyx_pf_6pandas_3lib_16isscalar(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_val) { 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("isscalar", 0); /* "pandas/lib.pyx":202 * * def isscalar(object val): * return np.isscalar(val) or val is None or PyDateTime_Check(val) # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 202; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s__isscalar); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 202; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 202; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_val); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_val); __Pyx_GIVEREF(__pyx_v_val); __pyx_t_3 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 202; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 202; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (!__pyx_t_4) { __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_4 = (__pyx_v_val == Py_None); if (!__pyx_t_4) { __pyx_t_5 = PyDateTime_Check(__pyx_v_val); __pyx_t_6 = __pyx_t_5; } else { __pyx_t_6 = __pyx_t_4; } __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_t_6); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 202; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __pyx_t_1; __pyx_t_1 = 0; } else { __pyx_t_2 = __pyx_t_3; __pyx_t_3 = 0; } __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("pandas.lib.isscalar", __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_3lib_19isnullobj(PyObject *__pyx_self, PyObject *__pyx_v_arr); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_3lib_19isnullobj = {__Pyx_NAMESTR("isnullobj"), (PyCFunction)__pyx_pw_6pandas_3lib_19isnullobj, METH_O, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_3lib_19isnullobj(PyObject *__pyx_self, PyObject *__pyx_v_arr) { CYTHON_UNUSED int __pyx_lineno = 0; CYTHON_UNUSED const char *__pyx_filename = NULL; CYTHON_UNUSED int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("isnullobj (wrapper)", 0); if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_arr), __pyx_ptype_5numpy_ndarray, 1, "arr", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 207; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_3lib_18isnullobj(__pyx_self, ((PyArrayObject *)__pyx_v_arr)); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/lib.pyx":207 * @cython.wraparound(False) * @cython.boundscheck(False) * def isnullobj(ndarray[object] arr): # <<<<<<<<<<<<<< * cdef Py_ssize_t i, n * cdef object val */ static PyObject *__pyx_pf_6pandas_3lib_18isnullobj(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_arr) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_n; PyArrayObject *__pyx_v_result = 0; PyObject *__pyx_v_arobj = NULL; __Pyx_LocalBuf_ND __pyx_pybuffernd_arr; __Pyx_Buffer __pyx_pybuffer_arr; __Pyx_LocalBuf_ND __pyx_pybuffernd_result; __Pyx_Buffer __pyx_pybuffer_result; 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; int __pyx_t_13; int __pyx_t_14; int __pyx_t_15; Py_ssize_t __pyx_t_16; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("isnullobj", 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_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_filename = __pyx_f[2]; __pyx_lineno = 207; __pyx_clineno = __LINE__; goto __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/lib.pyx":212 * cdef ndarray[uint8_t] result * * n = len(arr) # <<<<<<<<<<<<<< * result = np.zeros(n, dtype=np.uint8) * for i from 0 <= i < n: */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_arr)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 212; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/lib.pyx":213 * * n = len(arr) * result = np.zeros(n, dtype=np.uint8) # <<<<<<<<<<<<<< * for i from 0 <= i < n: * arobj = arr[i] */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 213; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__zeros); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 213; __pyx_clineno = __LINE__; goto __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_n); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 213; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 213; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 213; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_2)); __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 213; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s__uint8); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 213; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__dtype), __pyx_t_6) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 213; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 213; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __Pyx_DECREF(((PyObject *)__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_filename = __pyx_f[2]; __pyx_lineno = 213; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_7 = ((PyArrayObject *)__pyx_t_6); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_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_result.rcbuffer->pybuffer, (PyObject*)__pyx_v_result, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_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_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_8 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 213; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_7 = 0; __pyx_v_result = ((PyArrayObject *)__pyx_t_6); __pyx_t_6 = 0; /* "pandas/lib.pyx":214 * n = len(arr) * result = np.zeros(n, dtype=np.uint8) * for i from 0 <= i < n: # <<<<<<<<<<<<<< * arobj = arr[i] * result[i] = arobj is NaT or _checknull(arobj) */ __pyx_t_1 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_1; __pyx_v_i++) { /* "pandas/lib.pyx":215 * result = np.zeros(n, dtype=np.uint8) * for i from 0 <= i < n: * arobj = arr[i] # <<<<<<<<<<<<<< * result[i] = arobj is NaT or _checknull(arobj) * return result.view(np.bool_) */ __pyx_t_12 = __pyx_v_i; __pyx_t_6 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_arr.rcbuffer->pybuffer.buf, __pyx_t_12, __pyx_pybuffernd_arr.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_6); __Pyx_XDECREF_SET(__pyx_v_arobj, __pyx_t_6); __pyx_t_6 = 0; /* "pandas/lib.pyx":216 * for i from 0 <= i < n: * arobj = arr[i] * result[i] = arobj is NaT or _checknull(arobj) # <<<<<<<<<<<<<< * return result.view(np.bool_) * */ __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s__NaT); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 216; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_13 = (__pyx_v_arobj == __pyx_t_6); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (!__pyx_t_13) { __pyx_t_14 = __pyx_f_4util__checknull(__pyx_v_arobj); __pyx_t_15 = __pyx_t_14; } else { __pyx_t_15 = __pyx_t_13; } __pyx_t_16 = __pyx_v_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_result.diminfo[0].strides) = __pyx_t_15; } /* "pandas/lib.pyx":217 * arobj = arr[i] * result[i] = arobj is NaT or _checknull(arobj) * return result.view(np.bool_) # <<<<<<<<<<<<<< * * @cython.wraparound(False) */ __Pyx_XDECREF(__pyx_r); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_result), __pyx_n_s__view); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 217; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 217; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__bool_); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 217; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 217; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 217; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; __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_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_arr.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.lib.isnullobj", __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_result.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_result); __Pyx_XDECREF(__pyx_v_arobj); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_3lib_21isnullobj_old(PyObject *__pyx_self, PyObject *__pyx_v_arr); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_3lib_21isnullobj_old = {__Pyx_NAMESTR("isnullobj_old"), (PyCFunction)__pyx_pw_6pandas_3lib_21isnullobj_old, METH_O, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_3lib_21isnullobj_old(PyObject *__pyx_self, PyObject *__pyx_v_arr) { CYTHON_UNUSED int __pyx_lineno = 0; CYTHON_UNUSED const char *__pyx_filename = NULL; CYTHON_UNUSED int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("isnullobj_old (wrapper)", 0); if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_arr), __pyx_ptype_5numpy_ndarray, 1, "arr", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 221; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_3lib_20isnullobj_old(__pyx_self, ((PyArrayObject *)__pyx_v_arr)); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/lib.pyx":221 * @cython.wraparound(False) * @cython.boundscheck(False) * def isnullobj_old(ndarray[object] arr): # <<<<<<<<<<<<<< * cdef Py_ssize_t i, n * cdef object val */ static PyObject *__pyx_pf_6pandas_3lib_20isnullobj_old(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_arr) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_n; PyArrayObject *__pyx_v_result = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_arr; __Pyx_Buffer __pyx_pybuffer_arr; __Pyx_LocalBuf_ND __pyx_pybuffernd_result; __Pyx_Buffer __pyx_pybuffer_result; 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("isnullobj_old", 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_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_filename = __pyx_f[2]; __pyx_lineno = 221; __pyx_clineno = __LINE__; goto __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/lib.pyx":226 * cdef ndarray[uint8_t] result * * n = len(arr) # <<<<<<<<<<<<<< * result = np.zeros(n, dtype=np.uint8) * for i from 0 <= i < n: */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_arr)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 226; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/lib.pyx":227 * * n = len(arr) * result = np.zeros(n, dtype=np.uint8) # <<<<<<<<<<<<<< * for i from 0 <= i < n: * result[i] = util._checknull_old(arr[i]) */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 227; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__zeros); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 227; __pyx_clineno = __LINE__; goto __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_n); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 227; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 227; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 227; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_2)); __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 227; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s__uint8); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 227; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__dtype), __pyx_t_6) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 227; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 227; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __Pyx_DECREF(((PyObject *)__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_filename = __pyx_f[2]; __pyx_lineno = 227; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_7 = ((PyArrayObject *)__pyx_t_6); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_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_result.rcbuffer->pybuffer, (PyObject*)__pyx_v_result, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_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_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_8 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 227; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_7 = 0; __pyx_v_result = ((PyArrayObject *)__pyx_t_6); __pyx_t_6 = 0; /* "pandas/lib.pyx":228 * n = len(arr) * result = np.zeros(n, dtype=np.uint8) * for i from 0 <= i < n: # <<<<<<<<<<<<<< * result[i] = util._checknull_old(arr[i]) * return result.view(np.bool_) */ __pyx_t_1 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_1; __pyx_v_i++) { /* "pandas/lib.pyx":229 * result = np.zeros(n, dtype=np.uint8) * for i from 0 <= i < n: * result[i] = util._checknull_old(arr[i]) # <<<<<<<<<<<<<< * return result.view(np.bool_) * */ __pyx_t_12 = __pyx_v_i; __pyx_t_6 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_arr.rcbuffer->pybuffer.buf, __pyx_t_12, __pyx_pybuffernd_arr.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_6); __pyx_t_13 = __pyx_v_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_result.diminfo[0].strides) = __pyx_f_4util__checknull_old(__pyx_t_6); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } /* "pandas/lib.pyx":230 * for i from 0 <= i < n: * result[i] = util._checknull_old(arr[i]) * return result.view(np.bool_) # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_result), __pyx_n_s__view); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 230; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 230; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__bool_); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 230; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 230; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 230; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; __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_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_arr.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.lib.isnullobj_old", __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_result.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_result); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_3lib_23isnullobj2d(PyObject *__pyx_self, PyObject *__pyx_v_arr); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_3lib_23isnullobj2d = {__Pyx_NAMESTR("isnullobj2d"), (PyCFunction)__pyx_pw_6pandas_3lib_23isnullobj2d, METH_O, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_3lib_23isnullobj2d(PyObject *__pyx_self, PyObject *__pyx_v_arr) { CYTHON_UNUSED int __pyx_lineno = 0; CYTHON_UNUSED const char *__pyx_filename = NULL; CYTHON_UNUSED int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("isnullobj2d (wrapper)", 0); if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_arr), __pyx_ptype_5numpy_ndarray, 1, "arr", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 235; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_3lib_22isnullobj2d(__pyx_self, ((PyArrayObject *)__pyx_v_arr)); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/lib.pyx":235 * @cython.wraparound(False) * @cython.boundscheck(False) * def isnullobj2d(ndarray[object, ndim=2] arr): # <<<<<<<<<<<<<< * cdef Py_ssize_t i, j, n, m * cdef object val */ static PyObject *__pyx_pf_6pandas_3lib_22isnullobj2d(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_arr) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_n; Py_ssize_t __pyx_v_m; PyObject *__pyx_v_val = 0; PyArrayObject *__pyx_v_result = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_arr; __Pyx_Buffer __pyx_pybuffer_arr; __Pyx_LocalBuf_ND __pyx_pybuffernd_result; __Pyx_Buffer __pyx_pybuffer_result; 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 *); Py_ssize_t __pyx_t_6; Py_ssize_t __pyx_t_7; 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; Py_ssize_t __pyx_t_15; int __pyx_t_16; Py_ssize_t __pyx_t_17; Py_ssize_t __pyx_t_18; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("isnullobj2d", 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_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, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 235; __pyx_clineno = __LINE__; goto __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]; __pyx_pybuffernd_arr.diminfo[1].strides = __pyx_pybuffernd_arr.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_arr.diminfo[1].shape = __pyx_pybuffernd_arr.rcbuffer->pybuffer.shape[1]; /* "pandas/lib.pyx":240 * cdef ndarray[uint8_t, ndim=2] result * * n, m = ( arr).shape # <<<<<<<<<<<<<< * result = np.zeros((n, m), dtype=np.uint8) * for i from 0 <= i < n: */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_arr), __pyx_n_s__shape); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 240; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) { PyObject* sequence = __pyx_t_1; #if CYTHON_COMPILING_IN_CPYTHON Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 240; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1); } else { __pyx_t_2 = PyList_GET_ITEM(sequence, 0); __pyx_t_3 = PyList_GET_ITEM(sequence, 1); } __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); #else __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 240; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 240; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } else { Py_ssize_t index = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 240; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_5 = Py_TYPE(__pyx_t_4)->tp_iternext; index = 0; __pyx_t_2 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_2)) goto __pyx_L3_unpacking_failed; __Pyx_GOTREF(__pyx_t_2); index = 1; __pyx_t_3 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_3)) goto __pyx_L3_unpacking_failed; __Pyx_GOTREF(__pyx_t_3); if (__Pyx_IternextUnpackEndCheck(__pyx_t_5(__pyx_t_4), 2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 240; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 240; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_L4_unpacking_done:; } __pyx_t_6 = __Pyx_PyIndex_AsSsize_t(__pyx_t_2); if (unlikely((__pyx_t_6 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 240; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_7 = __Pyx_PyIndex_AsSsize_t(__pyx_t_3); if (unlikely((__pyx_t_7 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 240; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_n = __pyx_t_6; __pyx_v_m = __pyx_t_7; /* "pandas/lib.pyx":241 * * n, m = ( arr).shape * result = np.zeros((n, m), dtype=np.uint8) # <<<<<<<<<<<<<< * for i from 0 <= i < n: * for j from 0 <= j < m: */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 241; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s__zeros); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 241; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_n); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 241; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_m); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 241; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 241; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_1 = 0; __pyx_t_2 = 0; __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 241; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_t_4)); __Pyx_GIVEREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __pyx_t_4 = PyDict_New(); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 241; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_4)); __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 241; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s__uint8); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 241; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (PyDict_SetItem(__pyx_t_4, ((PyObject *)__pyx_n_s__dtype), __pyx_t_8) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 241; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_8 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_2), ((PyObject *)__pyx_t_4)); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 241; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; if (!(likely(((__pyx_t_8) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_8, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 241; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_9 = ((PyArrayObject *)__pyx_t_8); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __pyx_t_10 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_t_9, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_result.rcbuffer->pybuffer, (PyObject*)__pyx_v_result, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_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]; __pyx_pybuffernd_result.diminfo[1].strides = __pyx_pybuffernd_result.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_result.diminfo[1].shape = __pyx_pybuffernd_result.rcbuffer->pybuffer.shape[1]; if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 241; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_9 = 0; __pyx_v_result = ((PyArrayObject *)__pyx_t_8); __pyx_t_8 = 0; /* "pandas/lib.pyx":242 * n, m = ( arr).shape * result = np.zeros((n, m), dtype=np.uint8) * for i from 0 <= i < n: # <<<<<<<<<<<<<< * for j from 0 <= j < m: * val = arr[i, j] */ __pyx_t_7 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_7; __pyx_v_i++) { /* "pandas/lib.pyx":243 * result = np.zeros((n, m), dtype=np.uint8) * for i from 0 <= i < n: * for j from 0 <= j < m: # <<<<<<<<<<<<<< * val = arr[i, j] * if checknull(val): */ __pyx_t_6 = __pyx_v_m; for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_6; __pyx_v_j++) { /* "pandas/lib.pyx":244 * for i from 0 <= i < n: * for j from 0 <= j < m: * val = arr[i, j] # <<<<<<<<<<<<<< * if checknull(val): * result[i, j] = 1 */ __pyx_t_14 = __pyx_v_i; __pyx_t_15 = __pyx_v_j; __pyx_t_8 = (PyObject *) *__Pyx_BufPtrStrided2d(PyObject **, __pyx_pybuffernd_arr.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_arr.diminfo[0].strides, __pyx_t_15, __pyx_pybuffernd_arr.diminfo[1].strides); __Pyx_INCREF((PyObject*)__pyx_t_8); __Pyx_XDECREF_SET(__pyx_v_val, __pyx_t_8); __pyx_t_8 = 0; /* "pandas/lib.pyx":245 * for j from 0 <= j < m: * val = arr[i, j] * if checknull(val): # <<<<<<<<<<<<<< * result[i, j] = 1 * return result.view(np.bool_) */ __pyx_t_8 = __pyx_f_6pandas_3lib_checknull(__pyx_v_val, 0); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 245; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_16 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_16 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 245; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (__pyx_t_16) { /* "pandas/lib.pyx":246 * val = arr[i, j] * if checknull(val): * result[i, j] = 1 # <<<<<<<<<<<<<< * return result.view(np.bool_) * */ __pyx_t_17 = __pyx_v_i; __pyx_t_18 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_result.diminfo[0].strides, __pyx_t_18, __pyx_pybuffernd_result.diminfo[1].strides) = 1; goto __pyx_L9; } __pyx_L9:; } } /* "pandas/lib.pyx":247 * if checknull(val): * result[i, j] = 1 * return result.view(np.bool_) # <<<<<<<<<<<<<< * * @cython.wraparound(False) */ __Pyx_XDECREF(__pyx_r); __pyx_t_8 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_result), __pyx_n_s__view); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 247; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 247; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s__bool_); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 247; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 247; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_Call(__pyx_t_8, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 247; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; __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_8); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_arr.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.lib.isnullobj2d", __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_result.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF(__pyx_v_val); __Pyx_XDECREF((PyObject *)__pyx_v_result); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_3lib_25isnullobj_old(PyObject *__pyx_self, PyObject *__pyx_v_arr); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_3lib_25isnullobj_old = {__Pyx_NAMESTR("isnullobj_old"), (PyCFunction)__pyx_pw_6pandas_3lib_25isnullobj_old, METH_O, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_3lib_25isnullobj_old(PyObject *__pyx_self, PyObject *__pyx_v_arr) { CYTHON_UNUSED int __pyx_lineno = 0; CYTHON_UNUSED const char *__pyx_filename = NULL; CYTHON_UNUSED int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("isnullobj_old (wrapper)", 0); if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_arr), __pyx_ptype_5numpy_ndarray, 1, "arr", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 251; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_3lib_24isnullobj_old(__pyx_self, ((PyArrayObject *)__pyx_v_arr)); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/lib.pyx":251 * @cython.wraparound(False) * @cython.boundscheck(False) * def isnullobj_old(ndarray[object] arr): # <<<<<<<<<<<<<< * cdef Py_ssize_t i, n * cdef object val */ static PyObject *__pyx_pf_6pandas_3lib_24isnullobj_old(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_arr) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_n; PyArrayObject *__pyx_v_result = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_arr; __Pyx_Buffer __pyx_pybuffer_arr; __Pyx_LocalBuf_ND __pyx_pybuffernd_result; __Pyx_Buffer __pyx_pybuffer_result; 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("isnullobj_old", 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_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_filename = __pyx_f[2]; __pyx_lineno = 251; __pyx_clineno = __LINE__; goto __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/lib.pyx":256 * cdef ndarray[uint8_t] result * * n = len(arr) # <<<<<<<<<<<<<< * result = np.zeros(n, dtype=np.uint8) * for i from 0 <= i < n: */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_arr)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 256; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/lib.pyx":257 * * n = len(arr) * result = np.zeros(n, dtype=np.uint8) # <<<<<<<<<<<<<< * for i from 0 <= i < n: * result[i] = util._checknull_old(arr[i]) */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 257; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__zeros); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 257; __pyx_clineno = __LINE__; goto __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_n); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 257; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 257; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 257; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_2)); __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 257; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s__uint8); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 257; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__dtype), __pyx_t_6) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 257; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 257; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __Pyx_DECREF(((PyObject *)__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_filename = __pyx_f[2]; __pyx_lineno = 257; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_7 = ((PyArrayObject *)__pyx_t_6); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_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_result.rcbuffer->pybuffer, (PyObject*)__pyx_v_result, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_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_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_8 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 257; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_7 = 0; __pyx_v_result = ((PyArrayObject *)__pyx_t_6); __pyx_t_6 = 0; /* "pandas/lib.pyx":258 * n = len(arr) * result = np.zeros(n, dtype=np.uint8) * for i from 0 <= i < n: # <<<<<<<<<<<<<< * result[i] = util._checknull_old(arr[i]) * return result.view(np.bool_) */ __pyx_t_1 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_1; __pyx_v_i++) { /* "pandas/lib.pyx":259 * result = np.zeros(n, dtype=np.uint8) * for i from 0 <= i < n: * result[i] = util._checknull_old(arr[i]) # <<<<<<<<<<<<<< * return result.view(np.bool_) * */ __pyx_t_12 = __pyx_v_i; __pyx_t_6 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_arr.rcbuffer->pybuffer.buf, __pyx_t_12, __pyx_pybuffernd_arr.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_6); __pyx_t_13 = __pyx_v_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_result.diminfo[0].strides) = __pyx_f_4util__checknull_old(__pyx_t_6); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } /* "pandas/lib.pyx":260 * for i from 0 <= i < n: * result[i] = util._checknull_old(arr[i]) * return result.view(np.bool_) # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_result), __pyx_n_s__view); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 260; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 260; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__bool_); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 260; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 260; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 260; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; __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_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_arr.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.lib.isnullobj_old", __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_result.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_result); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_3lib_27isnullobj2d_old(PyObject *__pyx_self, PyObject *__pyx_v_arr); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_3lib_27isnullobj2d_old = {__Pyx_NAMESTR("isnullobj2d_old"), (PyCFunction)__pyx_pw_6pandas_3lib_27isnullobj2d_old, METH_O, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_3lib_27isnullobj2d_old(PyObject *__pyx_self, PyObject *__pyx_v_arr) { CYTHON_UNUSED int __pyx_lineno = 0; CYTHON_UNUSED const char *__pyx_filename = NULL; CYTHON_UNUSED int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("isnullobj2d_old (wrapper)", 0); if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_arr), __pyx_ptype_5numpy_ndarray, 1, "arr", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 265; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_3lib_26isnullobj2d_old(__pyx_self, ((PyArrayObject *)__pyx_v_arr)); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/lib.pyx":265 * @cython.wraparound(False) * @cython.boundscheck(False) * def isnullobj2d_old(ndarray[object, ndim=2] arr): # <<<<<<<<<<<<<< * cdef Py_ssize_t i, j, n, m * cdef object val */ static PyObject *__pyx_pf_6pandas_3lib_26isnullobj2d_old(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_arr) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_n; Py_ssize_t __pyx_v_m; PyObject *__pyx_v_val = 0; PyArrayObject *__pyx_v_result = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_arr; __Pyx_Buffer __pyx_pybuffer_arr; __Pyx_LocalBuf_ND __pyx_pybuffernd_result; __Pyx_Buffer __pyx_pybuffer_result; 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 *); Py_ssize_t __pyx_t_6; Py_ssize_t __pyx_t_7; 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; Py_ssize_t __pyx_t_15; int __pyx_t_16; Py_ssize_t __pyx_t_17; Py_ssize_t __pyx_t_18; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("isnullobj2d_old", 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_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, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 265; __pyx_clineno = __LINE__; goto __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]; __pyx_pybuffernd_arr.diminfo[1].strides = __pyx_pybuffernd_arr.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_arr.diminfo[1].shape = __pyx_pybuffernd_arr.rcbuffer->pybuffer.shape[1]; /* "pandas/lib.pyx":270 * cdef ndarray[uint8_t, ndim=2] result * * n, m = ( arr).shape # <<<<<<<<<<<<<< * result = np.zeros((n, m), dtype=np.uint8) * for i from 0 <= i < n: */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_arr), __pyx_n_s__shape); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 270; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) { PyObject* sequence = __pyx_t_1; #if CYTHON_COMPILING_IN_CPYTHON Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 270; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1); } else { __pyx_t_2 = PyList_GET_ITEM(sequence, 0); __pyx_t_3 = PyList_GET_ITEM(sequence, 1); } __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); #else __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 270; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 270; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } else { Py_ssize_t index = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 270; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_5 = Py_TYPE(__pyx_t_4)->tp_iternext; index = 0; __pyx_t_2 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_2)) goto __pyx_L3_unpacking_failed; __Pyx_GOTREF(__pyx_t_2); index = 1; __pyx_t_3 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_3)) goto __pyx_L3_unpacking_failed; __Pyx_GOTREF(__pyx_t_3); if (__Pyx_IternextUnpackEndCheck(__pyx_t_5(__pyx_t_4), 2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 270; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 270; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_L4_unpacking_done:; } __pyx_t_6 = __Pyx_PyIndex_AsSsize_t(__pyx_t_2); if (unlikely((__pyx_t_6 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 270; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_7 = __Pyx_PyIndex_AsSsize_t(__pyx_t_3); if (unlikely((__pyx_t_7 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 270; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_n = __pyx_t_6; __pyx_v_m = __pyx_t_7; /* "pandas/lib.pyx":271 * * n, m = ( arr).shape * result = np.zeros((n, m), dtype=np.uint8) # <<<<<<<<<<<<<< * for i from 0 <= i < n: * for j from 0 <= j < m: */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 271; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s__zeros); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 271; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_n); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 271; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_m); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 271; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 271; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_1 = 0; __pyx_t_2 = 0; __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 271; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_t_4)); __Pyx_GIVEREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __pyx_t_4 = PyDict_New(); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 271; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_4)); __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 271; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s__uint8); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 271; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (PyDict_SetItem(__pyx_t_4, ((PyObject *)__pyx_n_s__dtype), __pyx_t_8) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 271; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_8 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_2), ((PyObject *)__pyx_t_4)); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 271; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; if (!(likely(((__pyx_t_8) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_8, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 271; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_9 = ((PyArrayObject *)__pyx_t_8); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __pyx_t_10 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_t_9, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_result.rcbuffer->pybuffer, (PyObject*)__pyx_v_result, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_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]; __pyx_pybuffernd_result.diminfo[1].strides = __pyx_pybuffernd_result.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_result.diminfo[1].shape = __pyx_pybuffernd_result.rcbuffer->pybuffer.shape[1]; if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 271; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_9 = 0; __pyx_v_result = ((PyArrayObject *)__pyx_t_8); __pyx_t_8 = 0; /* "pandas/lib.pyx":272 * n, m = ( arr).shape * result = np.zeros((n, m), dtype=np.uint8) * for i from 0 <= i < n: # <<<<<<<<<<<<<< * for j from 0 <= j < m: * val = arr[i, j] */ __pyx_t_7 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_7; __pyx_v_i++) { /* "pandas/lib.pyx":273 * result = np.zeros((n, m), dtype=np.uint8) * for i from 0 <= i < n: * for j from 0 <= j < m: # <<<<<<<<<<<<<< * val = arr[i, j] * if checknull_old(val): */ __pyx_t_6 = __pyx_v_m; for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_6; __pyx_v_j++) { /* "pandas/lib.pyx":274 * for i from 0 <= i < n: * for j from 0 <= j < m: * val = arr[i, j] # <<<<<<<<<<<<<< * if checknull_old(val): * result[i, j] = 1 */ __pyx_t_14 = __pyx_v_i; __pyx_t_15 = __pyx_v_j; __pyx_t_8 = (PyObject *) *__Pyx_BufPtrStrided2d(PyObject **, __pyx_pybuffernd_arr.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_arr.diminfo[0].strides, __pyx_t_15, __pyx_pybuffernd_arr.diminfo[1].strides); __Pyx_INCREF((PyObject*)__pyx_t_8); __Pyx_XDECREF_SET(__pyx_v_val, __pyx_t_8); __pyx_t_8 = 0; /* "pandas/lib.pyx":275 * for j from 0 <= j < m: * val = arr[i, j] * if checknull_old(val): # <<<<<<<<<<<<<< * result[i, j] = 1 * return result.view(np.bool_) */ __pyx_t_8 = __pyx_f_6pandas_3lib_checknull_old(__pyx_v_val, 0); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 275; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_16 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_16 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 275; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (__pyx_t_16) { /* "pandas/lib.pyx":276 * val = arr[i, j] * if checknull_old(val): * result[i, j] = 1 # <<<<<<<<<<<<<< * return result.view(np.bool_) * */ __pyx_t_17 = __pyx_v_i; __pyx_t_18 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_result.diminfo[0].strides, __pyx_t_18, __pyx_pybuffernd_result.diminfo[1].strides) = 1; goto __pyx_L9; } __pyx_L9:; } } /* "pandas/lib.pyx":277 * if checknull_old(val): * result[i, j] = 1 * return result.view(np.bool_) # <<<<<<<<<<<<<< * * def list_to_object_array(list obj): */ __Pyx_XDECREF(__pyx_r); __pyx_t_8 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_result), __pyx_n_s__view); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 277; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 277; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s__bool_); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 277; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 277; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_Call(__pyx_t_8, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 277; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; __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_8); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_arr.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.lib.isnullobj2d_old", __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_result.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF(__pyx_v_val); __Pyx_XDECREF((PyObject *)__pyx_v_result); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_3lib_29list_to_object_array(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/ static char __pyx_doc_6pandas_3lib_28list_to_object_array[] = "\n Convert list to object ndarray. Seriously can't believe I had to write this\n function\n "; static PyMethodDef __pyx_mdef_6pandas_3lib_29list_to_object_array = {__Pyx_NAMESTR("list_to_object_array"), (PyCFunction)__pyx_pw_6pandas_3lib_29list_to_object_array, METH_O, __Pyx_DOCSTR(__pyx_doc_6pandas_3lib_28list_to_object_array)}; static PyObject *__pyx_pw_6pandas_3lib_29list_to_object_array(PyObject *__pyx_self, PyObject *__pyx_v_obj) { CYTHON_UNUSED int __pyx_lineno = 0; CYTHON_UNUSED const char *__pyx_filename = NULL; CYTHON_UNUSED int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("list_to_object_array (wrapper)", 0); if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_obj), (&PyList_Type), 1, "obj", 1))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 279; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_3lib_28list_to_object_array(__pyx_self, ((PyObject*)__pyx_v_obj)); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/lib.pyx":279 * return result.view(np.bool_) * * def list_to_object_array(list obj): # <<<<<<<<<<<<<< * ''' * Convert list to object ndarray. Seriously can't believe I had to write this */ static PyObject *__pyx_pf_6pandas_3lib_28list_to_object_array(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_n; PyArrayObject *__pyx_v_arr = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_arr; __Pyx_Buffer __pyx_pybuffer_arr; 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; PyArrayObject *__pyx_t_6 = NULL; 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; PyObject **__pyx_t_12; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("list_to_object_array", 0); __pyx_pybuffer_arr.pybuffer.buf = NULL; __pyx_pybuffer_arr.refcount = 0; __pyx_pybuffernd_arr.data = NULL; __pyx_pybuffernd_arr.rcbuffer = &__pyx_pybuffer_arr; /* "pandas/lib.pyx":288 * ndarray[object] arr * * n = len(obj) # <<<<<<<<<<<<<< * arr = np.empty(n, dtype=object) * */ if (unlikely(((PyObject *)__pyx_v_obj) == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 288; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_1 = PyList_GET_SIZE(((PyObject *)__pyx_v_obj)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 288; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/lib.pyx":289 * * n = len(obj) * arr = np.empty(n, dtype=object) # <<<<<<<<<<<<<< * * for i from 0 <= i < n: */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 289; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 289; __pyx_clineno = __LINE__; goto __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_n); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 289; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 289; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 289; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_2)); if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__dtype), __pyx_builtin_object) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 289; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_5 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 289; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 289; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_6 = ((PyArrayObject *)__pyx_t_5); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_arr.rcbuffer->pybuffer); __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_arr.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_object, 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_arr.rcbuffer->pybuffer, (PyObject*)__pyx_v_arr, &__Pyx_TypeInfo_object, 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_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]; if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 289; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_6 = 0; __pyx_v_arr = ((PyArrayObject *)__pyx_t_5); __pyx_t_5 = 0; /* "pandas/lib.pyx":291 * arr = np.empty(n, dtype=object) * * for i from 0 <= i < n: # <<<<<<<<<<<<<< * arr[i] = obj[i] * */ __pyx_t_1 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_1; __pyx_v_i++) { /* "pandas/lib.pyx":292 * * for i from 0 <= i < n: * arr[i] = obj[i] # <<<<<<<<<<<<<< * * return arr */ if (unlikely(((PyObject *)__pyx_v_obj) == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 292; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_5 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_obj), __pyx_v_i, sizeof(Py_ssize_t), PyInt_FromSsize_t, 1, 1, 1); if (!__pyx_t_5) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 292; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_11 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_11 < 0) { __pyx_t_11 += __pyx_pybuffernd_arr.diminfo[0].shape; if (unlikely(__pyx_t_11 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_11 >= __pyx_pybuffernd_arr.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 292; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_12 = __Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_arr.rcbuffer->pybuffer.buf, __pyx_t_11, __pyx_pybuffernd_arr.diminfo[0].strides); __Pyx_GOTREF(*__pyx_t_12); __Pyx_INCREF(__pyx_t_5); __Pyx_DECREF(*__pyx_t_12); *__pyx_t_12 = __pyx_t_5; __Pyx_GIVEREF(*__pyx_t_12); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } /* "pandas/lib.pyx":294 * arr[i] = obj[i] * * return arr # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_arr)); __pyx_r = ((PyObject *)__pyx_v_arr); goto __pyx_L0; __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_XDECREF(__pyx_t_5); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_arr.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.lib.list_to_object_array", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_arr.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_arr); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_3lib_31fast_unique(PyObject *__pyx_self, PyObject *__pyx_v_values); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_3lib_31fast_unique = {__Pyx_NAMESTR("fast_unique"), (PyCFunction)__pyx_pw_6pandas_3lib_31fast_unique, METH_O, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_3lib_31fast_unique(PyObject *__pyx_self, PyObject *__pyx_v_values) { CYTHON_UNUSED int __pyx_lineno = 0; CYTHON_UNUSED const char *__pyx_filename = NULL; CYTHON_UNUSED int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("fast_unique (wrapper)", 0); if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 299; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_3lib_30fast_unique(__pyx_self, ((PyArrayObject *)__pyx_v_values)); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/lib.pyx":299 * @cython.wraparound(False) * @cython.boundscheck(False) * def fast_unique(ndarray[object] values): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = len(values) */ static PyObject *__pyx_pf_6pandas_3lib_30fast_unique(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_n; PyObject *__pyx_v_uniques = 0; PyObject *__pyx_v_table = 0; PyObject *__pyx_v_val = 0; PyObject *__pyx_v_stub = 0; __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; Py_ssize_t __pyx_t_3; int __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; int __pyx_t_10; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("fast_unique", 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_object, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 299; __pyx_clineno = __LINE__; goto __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/lib.pyx":301 * def fast_unique(ndarray[object] values): * cdef: * Py_ssize_t i, n = len(values) # <<<<<<<<<<<<<< * list uniques = [] * dict table = {} */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 301; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/lib.pyx":302 * cdef: * Py_ssize_t i, n = len(values) * list uniques = [] # <<<<<<<<<<<<<< * dict table = {} * object val, stub = 0 */ __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 302; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_v_uniques = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; /* "pandas/lib.pyx":303 * Py_ssize_t i, n = len(values) * list uniques = [] * dict table = {} # <<<<<<<<<<<<<< * object val, stub = 0 * */ __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 303; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_2)); __pyx_v_table = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; /* "pandas/lib.pyx":304 * list uniques = [] * dict table = {} * object val, stub = 0 # <<<<<<<<<<<<<< * * for i from 0 <= i < n: */ __Pyx_INCREF(__pyx_int_0); __pyx_v_stub = __pyx_int_0; /* "pandas/lib.pyx":306 * object val, stub = 0 * * for i from 0 <= i < n: # <<<<<<<<<<<<<< * val = values[i] * if val not in table: */ __pyx_t_1 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_1; __pyx_v_i++) { /* "pandas/lib.pyx":307 * * for i from 0 <= i < n: * val = values[i] # <<<<<<<<<<<<<< * if val not in table: * table[val] = stub */ __pyx_t_3 = __pyx_v_i; __pyx_t_2 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_3, __pyx_pybuffernd_values.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_2); __Pyx_XDECREF_SET(__pyx_v_val, __pyx_t_2); __pyx_t_2 = 0; /* "pandas/lib.pyx":308 * for i from 0 <= i < n: * val = values[i] * if val not in table: # <<<<<<<<<<<<<< * table[val] = stub * uniques.append(val) */ __pyx_t_4 = (__Pyx_PyDict_Contains(__pyx_v_val, ((PyObject *)__pyx_v_table), Py_NE)); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 308; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_5 = (__pyx_t_4 != 0); if (__pyx_t_5) { /* "pandas/lib.pyx":309 * val = values[i] * if val not in table: * table[val] = stub # <<<<<<<<<<<<<< * uniques.append(val) * try: */ if (PyDict_SetItem(((PyObject *)__pyx_v_table), __pyx_v_val, __pyx_v_stub) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 309; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/lib.pyx":310 * if val not in table: * table[val] = stub * uniques.append(val) # <<<<<<<<<<<<<< * try: * uniques.sort() */ __pyx_t_6 = __Pyx_PyList_Append(__pyx_v_uniques, __pyx_v_val); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 310; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L5; } __pyx_L5:; } /* "pandas/lib.pyx":311 * table[val] = stub * uniques.append(val) * try: # <<<<<<<<<<<<<< * uniques.sort() * except Exception: */ { __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9); __Pyx_XGOTREF(__pyx_t_7); __Pyx_XGOTREF(__pyx_t_8); __Pyx_XGOTREF(__pyx_t_9); /*try:*/ { /* "pandas/lib.pyx":312 * uniques.append(val) * try: * uniques.sort() # <<<<<<<<<<<<<< * except Exception: * pass */ __pyx_t_6 = PyList_Sort(((PyObject *)__pyx_v_uniques)); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 312; __pyx_clineno = __LINE__; goto __pyx_L6_error;} } __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; goto __pyx_L13_try_end; __pyx_L6_error:; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/lib.pyx":313 * try: * uniques.sort() * except Exception: # <<<<<<<<<<<<<< * pass * */ __pyx_t_10 = PyErr_ExceptionMatches(__pyx_builtin_Exception); if (__pyx_t_10) { PyErr_Restore(0,0,0); goto __pyx_L7_exception_handled; } __Pyx_XGIVEREF(__pyx_t_7); __Pyx_XGIVEREF(__pyx_t_8); __Pyx_XGIVEREF(__pyx_t_9); __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9); goto __pyx_L1_error; __pyx_L7_exception_handled:; __Pyx_XGIVEREF(__pyx_t_7); __Pyx_XGIVEREF(__pyx_t_8); __Pyx_XGIVEREF(__pyx_t_9); __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9); __pyx_L13_try_end:; } /* "pandas/lib.pyx":316 * pass * * return uniques # <<<<<<<<<<<<<< * * @cython.wraparound(False) */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_uniques)); __pyx_r = ((PyObject *)__pyx_v_uniques); goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __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.lib.fast_unique", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF(__pyx_v_uniques); __Pyx_XDECREF(__pyx_v_table); __Pyx_XDECREF(__pyx_v_val); __Pyx_XDECREF(__pyx_v_stub); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_3lib_33fast_unique_multiple(PyObject *__pyx_self, PyObject *__pyx_v_arrays); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_3lib_33fast_unique_multiple = {__Pyx_NAMESTR("fast_unique_multiple"), (PyCFunction)__pyx_pw_6pandas_3lib_33fast_unique_multiple, METH_O, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_3lib_33fast_unique_multiple(PyObject *__pyx_self, PyObject *__pyx_v_arrays) { CYTHON_UNUSED int __pyx_lineno = 0; CYTHON_UNUSED const char *__pyx_filename = NULL; CYTHON_UNUSED int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("fast_unique_multiple (wrapper)", 0); if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_arrays), (&PyList_Type), 1, "arrays", 1))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 320; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_3lib_32fast_unique_multiple(__pyx_self, ((PyObject*)__pyx_v_arrays)); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/lib.pyx":320 * @cython.wraparound(False) * @cython.boundscheck(False) * def fast_unique_multiple(list arrays): # <<<<<<<<<<<<<< * cdef: * ndarray[object] buf */ static PyObject *__pyx_pf_6pandas_3lib_32fast_unique_multiple(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_arrays) { PyArrayObject *__pyx_v_buf = 0; Py_ssize_t __pyx_v_k; Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_n; PyObject *__pyx_v_uniques = 0; PyObject *__pyx_v_table = 0; PyObject *__pyx_v_val = 0; PyObject *__pyx_v_stub = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_buf; __Pyx_Buffer __pyx_pybuffer_buf; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __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; Py_ssize_t __pyx_t_7; Py_ssize_t __pyx_t_8; int __pyx_t_9; int __pyx_t_10; int __pyx_t_11; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("fast_unique_multiple", 0); __pyx_pybuffer_buf.pybuffer.buf = NULL; __pyx_pybuffer_buf.refcount = 0; __pyx_pybuffernd_buf.data = NULL; __pyx_pybuffernd_buf.rcbuffer = &__pyx_pybuffer_buf; /* "pandas/lib.pyx":323 * cdef: * ndarray[object] buf * Py_ssize_t k = len(arrays) # <<<<<<<<<<<<<< * Py_ssize_t i, j, n * list uniques = [] */ if (unlikely(((PyObject *)__pyx_v_arrays) == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 323; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_1 = PyList_GET_SIZE(((PyObject *)__pyx_v_arrays)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 323; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_k = __pyx_t_1; /* "pandas/lib.pyx":325 * Py_ssize_t k = len(arrays) * Py_ssize_t i, j, n * list uniques = [] # <<<<<<<<<<<<<< * dict table = {} * object val, stub = 0 */ __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 325; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_v_uniques = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; /* "pandas/lib.pyx":326 * Py_ssize_t i, j, n * list uniques = [] * dict table = {} # <<<<<<<<<<<<<< * object val, stub = 0 * */ __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 326; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_2)); __pyx_v_table = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; /* "pandas/lib.pyx":327 * list uniques = [] * dict table = {} * object val, stub = 0 # <<<<<<<<<<<<<< * * for i from 0 <= i < k: */ __Pyx_INCREF(__pyx_int_0); __pyx_v_stub = __pyx_int_0; /* "pandas/lib.pyx":329 * object val, stub = 0 * * for i from 0 <= i < k: # <<<<<<<<<<<<<< * buf = arrays[i] * n = len(buf) */ __pyx_t_1 = __pyx_v_k; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_1; __pyx_v_i++) { /* "pandas/lib.pyx":330 * * for i from 0 <= i < k: * buf = arrays[i] # <<<<<<<<<<<<<< * n = len(buf) * for j from 0 <= j < n: */ if (unlikely(((PyObject *)__pyx_v_arrays) == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 330; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } if (!(likely(((PyList_GET_ITEM(__pyx_v_arrays, __pyx_v_i)) == Py_None) || likely(__Pyx_TypeTest(PyList_GET_ITEM(__pyx_v_arrays, __pyx_v_i), __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 330; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_2 = PyList_GET_ITEM(__pyx_v_arrays, __pyx_v_i); __Pyx_INCREF(__pyx_t_2); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_buf.rcbuffer->pybuffer); __pyx_t_3 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_buf.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_2), &__Pyx_TypeInfo_object, 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_buf.rcbuffer->pybuffer, (PyObject*)__pyx_v_buf, &__Pyx_TypeInfo_object, 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_pybuffernd_buf.diminfo[0].strides = __pyx_pybuffernd_buf.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_buf.diminfo[0].shape = __pyx_pybuffernd_buf.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 330; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __Pyx_XDECREF_SET(__pyx_v_buf, ((PyArrayObject *)__pyx_t_2)); __pyx_t_2 = 0; /* "pandas/lib.pyx":331 * for i from 0 <= i < k: * buf = arrays[i] * n = len(buf) # <<<<<<<<<<<<<< * for j from 0 <= j < n: * val = buf[j] */ __pyx_t_7 = PyObject_Length(((PyObject *)__pyx_v_buf)); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 331; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_7; /* "pandas/lib.pyx":332 * buf = arrays[i] * n = len(buf) * for j from 0 <= j < n: # <<<<<<<<<<<<<< * val = buf[j] * if val not in table: */ __pyx_t_7 = __pyx_v_n; for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_7; __pyx_v_j++) { /* "pandas/lib.pyx":333 * n = len(buf) * for j from 0 <= j < n: * val = buf[j] # <<<<<<<<<<<<<< * if val not in table: * table[val] = stub */ __pyx_t_8 = __pyx_v_j; __pyx_t_2 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_buf.rcbuffer->pybuffer.buf, __pyx_t_8, __pyx_pybuffernd_buf.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_2); __Pyx_XDECREF_SET(__pyx_v_val, __pyx_t_2); __pyx_t_2 = 0; /* "pandas/lib.pyx":334 * for j from 0 <= j < n: * val = buf[j] * if val not in table: # <<<<<<<<<<<<<< * table[val] = stub * uniques.append(val) */ __pyx_t_9 = (__Pyx_PyDict_Contains(__pyx_v_val, ((PyObject *)__pyx_v_table), Py_NE)); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 334; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_10 = (__pyx_t_9 != 0); if (__pyx_t_10) { /* "pandas/lib.pyx":335 * val = buf[j] * if val not in table: * table[val] = stub # <<<<<<<<<<<<<< * uniques.append(val) * try: */ if (PyDict_SetItem(((PyObject *)__pyx_v_table), __pyx_v_val, __pyx_v_stub) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 335; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/lib.pyx":336 * if val not in table: * table[val] = stub * uniques.append(val) # <<<<<<<<<<<<<< * try: * uniques.sort() */ __pyx_t_11 = __Pyx_PyList_Append(__pyx_v_uniques, __pyx_v_val); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 336; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L7; } __pyx_L7:; } } /* "pandas/lib.pyx":337 * table[val] = stub * uniques.append(val) * try: # <<<<<<<<<<<<<< * uniques.sort() * except Exception: */ { __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_5, &__pyx_t_4); __Pyx_XGOTREF(__pyx_t_6); __Pyx_XGOTREF(__pyx_t_5); __Pyx_XGOTREF(__pyx_t_4); /*try:*/ { /* "pandas/lib.pyx":338 * uniques.append(val) * try: * uniques.sort() # <<<<<<<<<<<<<< * except Exception: * pass */ __pyx_t_11 = PyList_Sort(((PyObject *)__pyx_v_uniques)); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 338; __pyx_clineno = __LINE__; goto __pyx_L8_error;} } __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; goto __pyx_L15_try_end; __pyx_L8_error:; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/lib.pyx":339 * try: * uniques.sort() * except Exception: # <<<<<<<<<<<<<< * pass * */ __pyx_t_3 = PyErr_ExceptionMatches(__pyx_builtin_Exception); if (__pyx_t_3) { PyErr_Restore(0,0,0); goto __pyx_L9_exception_handled; } __Pyx_XGIVEREF(__pyx_t_6); __Pyx_XGIVEREF(__pyx_t_5); __Pyx_XGIVEREF(__pyx_t_4); __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_5, __pyx_t_4); goto __pyx_L1_error; __pyx_L9_exception_handled:; __Pyx_XGIVEREF(__pyx_t_6); __Pyx_XGIVEREF(__pyx_t_5); __Pyx_XGIVEREF(__pyx_t_4); __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_5, __pyx_t_4); __pyx_L15_try_end:; } /* "pandas/lib.pyx":342 * pass * * return uniques # <<<<<<<<<<<<<< * * @cython.wraparound(False) */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_uniques)); __pyx_r = ((PyObject *)__pyx_v_uniques); goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_buf.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.lib.fast_unique_multiple", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_buf.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_buf); __Pyx_XDECREF(__pyx_v_uniques); __Pyx_XDECREF(__pyx_v_table); __Pyx_XDECREF(__pyx_v_val); __Pyx_XDECREF(__pyx_v_stub); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_3lib_35fast_unique_multiple_list(PyObject *__pyx_self, PyObject *__pyx_v_lists); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_3lib_35fast_unique_multiple_list = {__Pyx_NAMESTR("fast_unique_multiple_list"), (PyCFunction)__pyx_pw_6pandas_3lib_35fast_unique_multiple_list, METH_O, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_3lib_35fast_unique_multiple_list(PyObject *__pyx_self, PyObject *__pyx_v_lists) { CYTHON_UNUSED int __pyx_lineno = 0; CYTHON_UNUSED const char *__pyx_filename = NULL; CYTHON_UNUSED int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("fast_unique_multiple_list (wrapper)", 0); if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_lists), (&PyList_Type), 1, "lists", 1))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 346; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_3lib_34fast_unique_multiple_list(__pyx_self, ((PyObject*)__pyx_v_lists)); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/lib.pyx":346 * @cython.wraparound(False) * @cython.boundscheck(False) * def fast_unique_multiple_list(list lists): # <<<<<<<<<<<<<< * cdef: * list buf */ static PyObject *__pyx_pf_6pandas_3lib_34fast_unique_multiple_list(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_lists) { PyObject *__pyx_v_buf = 0; Py_ssize_t __pyx_v_k; Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_n; PyObject *__pyx_v_uniques = 0; PyObject *__pyx_v_table = 0; PyObject *__pyx_v_val = 0; PyObject *__pyx_v_stub = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; PyObject *__pyx_t_2 = NULL; Py_ssize_t __pyx_t_3; int __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; int __pyx_t_10; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("fast_unique_multiple_list", 0); /* "pandas/lib.pyx":349 * cdef: * list buf * Py_ssize_t k = len(lists) # <<<<<<<<<<<<<< * Py_ssize_t i, j, n * list uniques = [] */ if (unlikely(((PyObject *)__pyx_v_lists) == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 349; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_1 = PyList_GET_SIZE(((PyObject *)__pyx_v_lists)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 349; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_k = __pyx_t_1; /* "pandas/lib.pyx":351 * Py_ssize_t k = len(lists) * Py_ssize_t i, j, n * list uniques = [] # <<<<<<<<<<<<<< * dict table = {} * object val, stub = 0 */ __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 351; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_v_uniques = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; /* "pandas/lib.pyx":352 * Py_ssize_t i, j, n * list uniques = [] * dict table = {} # <<<<<<<<<<<<<< * object val, stub = 0 * */ __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 352; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_2)); __pyx_v_table = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; /* "pandas/lib.pyx":353 * list uniques = [] * dict table = {} * object val, stub = 0 # <<<<<<<<<<<<<< * * for i from 0 <= i < k: */ __Pyx_INCREF(__pyx_int_0); __pyx_v_stub = __pyx_int_0; /* "pandas/lib.pyx":355 * object val, stub = 0 * * for i from 0 <= i < k: # <<<<<<<<<<<<<< * buf = lists[i] * n = len(buf) */ __pyx_t_1 = __pyx_v_k; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_1; __pyx_v_i++) { /* "pandas/lib.pyx":356 * * for i from 0 <= i < k: * buf = lists[i] # <<<<<<<<<<<<<< * n = len(buf) * for j from 0 <= j < n: */ if (unlikely(((PyObject *)__pyx_v_lists) == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 356; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } if (!(likely(PyList_CheckExact(PyList_GET_ITEM(__pyx_v_lists, __pyx_v_i)))||((PyList_GET_ITEM(__pyx_v_lists, __pyx_v_i)) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected list, got %.200s", Py_TYPE(PyList_GET_ITEM(__pyx_v_lists, __pyx_v_i))->tp_name), 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 356; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_2 = PyList_GET_ITEM(__pyx_v_lists, __pyx_v_i); __Pyx_INCREF(__pyx_t_2); __Pyx_XDECREF_SET(__pyx_v_buf, ((PyObject*)__pyx_t_2)); __pyx_t_2 = 0; /* "pandas/lib.pyx":357 * for i from 0 <= i < k: * buf = lists[i] * n = len(buf) # <<<<<<<<<<<<<< * for j from 0 <= j < n: * val = buf[j] */ if (unlikely(((PyObject *)__pyx_v_buf) == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 357; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_3 = PyList_GET_SIZE(((PyObject *)__pyx_v_buf)); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 357; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_3; /* "pandas/lib.pyx":358 * buf = lists[i] * n = len(buf) * for j from 0 <= j < n: # <<<<<<<<<<<<<< * val = buf[j] * if val not in table: */ __pyx_t_3 = __pyx_v_n; for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_3; __pyx_v_j++) { /* "pandas/lib.pyx":359 * n = len(buf) * for j from 0 <= j < n: * val = buf[j] # <<<<<<<<<<<<<< * if val not in table: * table[val] = stub */ if (unlikely(((PyObject *)__pyx_v_buf) == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 359; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_2 = PyList_GET_ITEM(__pyx_v_buf, __pyx_v_j); __Pyx_INCREF(__pyx_t_2); __Pyx_XDECREF_SET(__pyx_v_val, __pyx_t_2); __pyx_t_2 = 0; /* "pandas/lib.pyx":360 * for j from 0 <= j < n: * val = buf[j] * if val not in table: # <<<<<<<<<<<<<< * table[val] = stub * uniques.append(val) */ __pyx_t_4 = (__Pyx_PyDict_Contains(__pyx_v_val, ((PyObject *)__pyx_v_table), Py_NE)); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 360; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_5 = (__pyx_t_4 != 0); if (__pyx_t_5) { /* "pandas/lib.pyx":361 * val = buf[j] * if val not in table: * table[val] = stub # <<<<<<<<<<<<<< * uniques.append(val) * try: */ if (PyDict_SetItem(((PyObject *)__pyx_v_table), __pyx_v_val, __pyx_v_stub) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 361; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/lib.pyx":362 * if val not in table: * table[val] = stub * uniques.append(val) # <<<<<<<<<<<<<< * try: * uniques.sort() */ __pyx_t_6 = __Pyx_PyList_Append(__pyx_v_uniques, __pyx_v_val); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 362; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L7; } __pyx_L7:; } } /* "pandas/lib.pyx":363 * table[val] = stub * uniques.append(val) * try: # <<<<<<<<<<<<<< * uniques.sort() * except Exception: */ { __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9); __Pyx_XGOTREF(__pyx_t_7); __Pyx_XGOTREF(__pyx_t_8); __Pyx_XGOTREF(__pyx_t_9); /*try:*/ { /* "pandas/lib.pyx":364 * uniques.append(val) * try: * uniques.sort() # <<<<<<<<<<<<<< * except Exception: * pass */ __pyx_t_6 = PyList_Sort(((PyObject *)__pyx_v_uniques)); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 364; __pyx_clineno = __LINE__; goto __pyx_L8_error;} } __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; goto __pyx_L15_try_end; __pyx_L8_error:; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/lib.pyx":365 * try: * uniques.sort() * except Exception: # <<<<<<<<<<<<<< * pass * */ __pyx_t_10 = PyErr_ExceptionMatches(__pyx_builtin_Exception); if (__pyx_t_10) { PyErr_Restore(0,0,0); goto __pyx_L9_exception_handled; } __Pyx_XGIVEREF(__pyx_t_7); __Pyx_XGIVEREF(__pyx_t_8); __Pyx_XGIVEREF(__pyx_t_9); __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9); goto __pyx_L1_error; __pyx_L9_exception_handled:; __Pyx_XGIVEREF(__pyx_t_7); __Pyx_XGIVEREF(__pyx_t_8); __Pyx_XGIVEREF(__pyx_t_9); __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9); __pyx_L15_try_end:; } /* "pandas/lib.pyx":368 * pass * * return uniques # <<<<<<<<<<<<<< * * @cython.wraparound(False) */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_uniques)); __pyx_r = ((PyObject *)__pyx_v_uniques); goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("pandas.lib.fast_unique_multiple_list", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_buf); __Pyx_XDECREF(__pyx_v_uniques); __Pyx_XDECREF(__pyx_v_table); __Pyx_XDECREF(__pyx_v_val); __Pyx_XDECREF(__pyx_v_stub); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_3lib_37fast_unique_multiple_list_gen(PyObject *__pyx_self, PyObject *__pyx_v_gen); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_3lib_37fast_unique_multiple_list_gen = {__Pyx_NAMESTR("fast_unique_multiple_list_gen"), (PyCFunction)__pyx_pw_6pandas_3lib_37fast_unique_multiple_list_gen, METH_O, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_3lib_37fast_unique_multiple_list_gen(PyObject *__pyx_self, PyObject *__pyx_v_gen) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("fast_unique_multiple_list_gen (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_3lib_36fast_unique_multiple_list_gen(__pyx_self, ((PyObject *)__pyx_v_gen)); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/lib.pyx":372 * @cython.wraparound(False) * @cython.boundscheck(False) * def fast_unique_multiple_list_gen(object gen): # <<<<<<<<<<<<<< * cdef: * list buf */ static PyObject *__pyx_pf_6pandas_3lib_36fast_unique_multiple_list_gen(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_gen) { PyObject *__pyx_v_buf = 0; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_n; PyObject *__pyx_v_uniques = 0; PyObject *__pyx_v_table = 0; PyObject *__pyx_v_val = 0; PyObject *__pyx_v_stub = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; Py_ssize_t __pyx_t_2; PyObject *(*__pyx_t_3)(PyObject *); PyObject *__pyx_t_4 = NULL; Py_ssize_t __pyx_t_5; int __pyx_t_6; int __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_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("fast_unique_multiple_list_gen", 0); /* "pandas/lib.pyx":376 * list buf * Py_ssize_t j, n * list uniques = [] # <<<<<<<<<<<<<< * dict table = {} * object val, stub = 0 */ __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 376; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_v_uniques = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/lib.pyx":377 * Py_ssize_t j, n * list uniques = [] * dict table = {} # <<<<<<<<<<<<<< * object val, stub = 0 * */ __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 377; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_v_table = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/lib.pyx":378 * list uniques = [] * dict table = {} * object val, stub = 0 # <<<<<<<<<<<<<< * * for buf in gen: */ __Pyx_INCREF(__pyx_int_0); __pyx_v_stub = __pyx_int_0; /* "pandas/lib.pyx":380 * object val, stub = 0 * * for buf in gen: # <<<<<<<<<<<<<< * n = len(buf) * for j from 0 <= j < n: */ if (PyList_CheckExact(__pyx_v_gen) || PyTuple_CheckExact(__pyx_v_gen)) { __pyx_t_1 = __pyx_v_gen; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0; __pyx_t_3 = NULL; } else { __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_gen); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 380; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = Py_TYPE(__pyx_t_1)->tp_iternext; } for (;;) { if (!__pyx_t_3 && PyList_CheckExact(__pyx_t_1)) { if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 380; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 380; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif } else if (!__pyx_t_3 && PyTuple_CheckExact(__pyx_t_1)) { if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 380; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 380; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif } else { __pyx_t_4 = __pyx_t_3(__pyx_t_1); if (unlikely(!__pyx_t_4)) { if (PyErr_Occurred()) { if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear(); else {__pyx_filename = __pyx_f[2]; __pyx_lineno = 380; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } break; } __Pyx_GOTREF(__pyx_t_4); } if (!(likely(PyList_CheckExact(__pyx_t_4))||((__pyx_t_4) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected list, got %.200s", Py_TYPE(__pyx_t_4)->tp_name), 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 380; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_XDECREF_SET(__pyx_v_buf, ((PyObject*)__pyx_t_4)); __pyx_t_4 = 0; /* "pandas/lib.pyx":381 * * for buf in gen: * n = len(buf) # <<<<<<<<<<<<<< * for j from 0 <= j < n: * val = buf[j] */ if (unlikely(((PyObject *)__pyx_v_buf) == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 381; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_5 = PyList_GET_SIZE(((PyObject *)__pyx_v_buf)); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 381; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_5; /* "pandas/lib.pyx":382 * for buf in gen: * n = len(buf) * for j from 0 <= j < n: # <<<<<<<<<<<<<< * val = buf[j] * if val not in table: */ __pyx_t_5 = __pyx_v_n; for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_5; __pyx_v_j++) { /* "pandas/lib.pyx":383 * n = len(buf) * for j from 0 <= j < n: * val = buf[j] # <<<<<<<<<<<<<< * if val not in table: * table[val] = stub */ if (unlikely(((PyObject *)__pyx_v_buf) == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 383; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_4 = PyList_GET_ITEM(__pyx_v_buf, __pyx_v_j); __Pyx_INCREF(__pyx_t_4); __Pyx_XDECREF_SET(__pyx_v_val, __pyx_t_4); __pyx_t_4 = 0; /* "pandas/lib.pyx":384 * for j from 0 <= j < n: * val = buf[j] * if val not in table: # <<<<<<<<<<<<<< * table[val] = stub * uniques.append(val) */ __pyx_t_6 = (__Pyx_PyDict_Contains(__pyx_v_val, ((PyObject *)__pyx_v_table), Py_NE)); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 384; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_7 = (__pyx_t_6 != 0); if (__pyx_t_7) { /* "pandas/lib.pyx":385 * val = buf[j] * if val not in table: * table[val] = stub # <<<<<<<<<<<<<< * uniques.append(val) * */ if (PyDict_SetItem(((PyObject *)__pyx_v_table), __pyx_v_val, __pyx_v_stub) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 385; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/lib.pyx":386 * if val not in table: * table[val] = stub * uniques.append(val) # <<<<<<<<<<<<<< * * try: */ __pyx_t_8 = __Pyx_PyList_Append(__pyx_v_uniques, __pyx_v_val); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 386; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L7; } __pyx_L7:; } } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pandas/lib.pyx":388 * uniques.append(val) * * try: # <<<<<<<<<<<<<< * uniques.sort() * except Exception: */ { __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11); __Pyx_XGOTREF(__pyx_t_9); __Pyx_XGOTREF(__pyx_t_10); __Pyx_XGOTREF(__pyx_t_11); /*try:*/ { /* "pandas/lib.pyx":389 * * try: * uniques.sort() # <<<<<<<<<<<<<< * except Exception: * pass */ __pyx_t_8 = PyList_Sort(((PyObject *)__pyx_v_uniques)); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 389; __pyx_clineno = __LINE__; goto __pyx_L8_error;} } __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; goto __pyx_L15_try_end; __pyx_L8_error:; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pandas/lib.pyx":390 * try: * uniques.sort() * except Exception: # <<<<<<<<<<<<<< * pass * */ __pyx_t_12 = PyErr_ExceptionMatches(__pyx_builtin_Exception); if (__pyx_t_12) { PyErr_Restore(0,0,0); goto __pyx_L9_exception_handled; } __Pyx_XGIVEREF(__pyx_t_9); __Pyx_XGIVEREF(__pyx_t_10); __Pyx_XGIVEREF(__pyx_t_11); __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_10, __pyx_t_11); goto __pyx_L1_error; __pyx_L9_exception_handled:; __Pyx_XGIVEREF(__pyx_t_9); __Pyx_XGIVEREF(__pyx_t_10); __Pyx_XGIVEREF(__pyx_t_11); __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_10, __pyx_t_11); __pyx_L15_try_end:; } /* "pandas/lib.pyx":393 * pass * * return uniques # <<<<<<<<<<<<<< * * @cython.wraparound(False) */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_uniques)); __pyx_r = ((PyObject *)__pyx_v_uniques); goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("pandas.lib.fast_unique_multiple_list_gen", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_buf); __Pyx_XDECREF(__pyx_v_uniques); __Pyx_XDECREF(__pyx_v_table); __Pyx_XDECREF(__pyx_v_val); __Pyx_XDECREF(__pyx_v_stub); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_3lib_39dicts_to_array(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_3lib_39dicts_to_array = {__Pyx_NAMESTR("dicts_to_array"), (PyCFunction)__pyx_pw_6pandas_3lib_39dicts_to_array, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_3lib_39dicts_to_array(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_dicts = 0; PyObject *__pyx_v_columns = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("dicts_to_array (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__dicts,&__pyx_n_s__columns,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__dicts)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__columns)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("dicts_to_array", 1, 2, 2, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 397; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "dicts_to_array") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 397; __pyx_clineno = __LINE__; goto __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_dicts = ((PyObject*)values[0]); __pyx_v_columns = ((PyObject*)values[1]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("dicts_to_array", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 397; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.lib.dicts_to_array", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dicts), (&PyList_Type), 1, "dicts", 1))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 397; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_columns), (&PyList_Type), 1, "columns", 1))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 397; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_3lib_38dicts_to_array(__pyx_self, __pyx_v_dicts, __pyx_v_columns); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/lib.pyx":397 * @cython.wraparound(False) * @cython.boundscheck(False) * def dicts_to_array(list dicts, list columns): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, j, k, n */ static PyObject *__pyx_pf_6pandas_3lib_38dicts_to_array(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_dicts, PyObject *__pyx_v_columns) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_k; Py_ssize_t __pyx_v_n; PyArrayObject *__pyx_v_result = 0; PyObject *__pyx_v_row = 0; PyObject *__pyx_v_col = 0; PyObject *__pyx_v_onan = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_result; __Pyx_Buffer __pyx_pybuffer_result; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; Py_ssize_t __pyx_t_3; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyArrayObject *__pyx_t_6 = NULL; 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; int __pyx_t_14; int __pyx_t_15; Py_ssize_t __pyx_t_16; Py_ssize_t __pyx_t_17; PyObject **__pyx_t_18; Py_ssize_t __pyx_t_19; Py_ssize_t __pyx_t_20; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("dicts_to_array", 0); __pyx_pybuffer_result.pybuffer.buf = NULL; __pyx_pybuffer_result.refcount = 0; __pyx_pybuffernd_result.data = NULL; __pyx_pybuffernd_result.rcbuffer = &__pyx_pybuffer_result; /* "pandas/lib.pyx":402 * ndarray[object, ndim=2] result * dict row * object col, onan = np.nan # <<<<<<<<<<<<<< * * k = len(columns) */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 402; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s__nan); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 402; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_onan = __pyx_t_2; __pyx_t_2 = 0; /* "pandas/lib.pyx":404 * object col, onan = np.nan * * k = len(columns) # <<<<<<<<<<<<<< * n = len(dicts) * */ if (unlikely(((PyObject *)__pyx_v_columns) == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 404; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_3 = PyList_GET_SIZE(((PyObject *)__pyx_v_columns)); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 404; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_k = __pyx_t_3; /* "pandas/lib.pyx":405 * * k = len(columns) * n = len(dicts) # <<<<<<<<<<<<<< * * result = np.empty((n, k), dtype='O') */ if (unlikely(((PyObject *)__pyx_v_dicts) == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 405; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_3 = PyList_GET_SIZE(((PyObject *)__pyx_v_dicts)); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 405; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_3; /* "pandas/lib.pyx":407 * n = len(dicts) * * result = np.empty((n, k), dtype='O') # <<<<<<<<<<<<<< * * for i in range(n): */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 407; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__empty); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 407; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_n); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 407; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = PyInt_FromSsize_t(__pyx_v_k); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 407; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 407; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_2 = 0; __pyx_t_4 = 0; __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 407; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_t_5)); __Pyx_GIVEREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; __pyx_t_5 = PyDict_New(); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 407; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_5)); if (PyDict_SetItem(__pyx_t_5, ((PyObject *)__pyx_n_s__dtype), ((PyObject *)__pyx_n_s__O)) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 407; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_5)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 407; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 407; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_6 = ((PyArrayObject *)__pyx_t_2); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_result.rcbuffer->pybuffer, (PyObject*)__pyx_v_result, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_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]; __pyx_pybuffernd_result.diminfo[1].strides = __pyx_pybuffernd_result.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_result.diminfo[1].shape = __pyx_pybuffernd_result.rcbuffer->pybuffer.shape[1]; if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 407; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_6 = 0; __pyx_v_result = ((PyArrayObject *)__pyx_t_2); __pyx_t_2 = 0; /* "pandas/lib.pyx":409 * result = np.empty((n, k), dtype='O') * * for i in range(n): # <<<<<<<<<<<<<< * row = dicts[i] * for j in range(k): */ __pyx_t_3 = __pyx_v_n; for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_3; __pyx_t_11+=1) { __pyx_v_i = __pyx_t_11; /* "pandas/lib.pyx":410 * * for i in range(n): * row = dicts[i] # <<<<<<<<<<<<<< * for j in range(k): * col = columns[j] */ if (unlikely(((PyObject *)__pyx_v_dicts) == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 410; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } if (!(likely(PyDict_CheckExact(PyList_GET_ITEM(__pyx_v_dicts, __pyx_v_i)))||((PyList_GET_ITEM(__pyx_v_dicts, __pyx_v_i)) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected dict, got %.200s", Py_TYPE(PyList_GET_ITEM(__pyx_v_dicts, __pyx_v_i))->tp_name), 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 410; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_2 = PyList_GET_ITEM(__pyx_v_dicts, __pyx_v_i); __Pyx_INCREF(__pyx_t_2); __Pyx_XDECREF_SET(__pyx_v_row, ((PyObject*)__pyx_t_2)); __pyx_t_2 = 0; /* "pandas/lib.pyx":411 * for i in range(n): * row = dicts[i] * for j in range(k): # <<<<<<<<<<<<<< * col = columns[j] * if col in row: */ __pyx_t_12 = __pyx_v_k; for (__pyx_t_13 = 0; __pyx_t_13 < __pyx_t_12; __pyx_t_13+=1) { __pyx_v_j = __pyx_t_13; /* "pandas/lib.pyx":412 * row = dicts[i] * for j in range(k): * col = columns[j] # <<<<<<<<<<<<<< * if col in row: * result[i, j] = row[col] */ if (unlikely(((PyObject *)__pyx_v_columns) == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 412; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_2 = PyList_GET_ITEM(__pyx_v_columns, __pyx_v_j); __Pyx_INCREF(__pyx_t_2); __Pyx_XDECREF_SET(__pyx_v_col, __pyx_t_2); __pyx_t_2 = 0; /* "pandas/lib.pyx":413 * for j in range(k): * col = columns[j] * if col in row: # <<<<<<<<<<<<<< * result[i, j] = row[col] * else: */ if (unlikely(((PyObject *)__pyx_v_row) == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 413; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_14 = (__Pyx_PyDict_Contains(__pyx_v_col, ((PyObject *)__pyx_v_row), Py_EQ)); if (unlikely(__pyx_t_14 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 413; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_15 = (__pyx_t_14 != 0); if (__pyx_t_15) { /* "pandas/lib.pyx":414 * col = columns[j] * if col in row: * result[i, j] = row[col] # <<<<<<<<<<<<<< * else: * result[i, j] = onan */ if (unlikely(((PyObject *)__pyx_v_row) == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 414; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_2 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_row), __pyx_v_col); if (!__pyx_t_2) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 414; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_16 = __pyx_v_i; __pyx_t_17 = __pyx_v_j; __pyx_t_18 = __Pyx_BufPtrStrided2d(PyObject **, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_result.diminfo[0].strides, __pyx_t_17, __pyx_pybuffernd_result.diminfo[1].strides); __Pyx_GOTREF(*__pyx_t_18); __Pyx_INCREF(__pyx_t_2); __Pyx_DECREF(*__pyx_t_18); *__pyx_t_18 = __pyx_t_2; __Pyx_GIVEREF(*__pyx_t_18); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; goto __pyx_L7; } /*else*/ { /* "pandas/lib.pyx":416 * result[i, j] = row[col] * else: * result[i, j] = onan # <<<<<<<<<<<<<< * * return result */ __pyx_t_19 = __pyx_v_i; __pyx_t_20 = __pyx_v_j; __pyx_t_18 = __Pyx_BufPtrStrided2d(PyObject **, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_result.diminfo[0].strides, __pyx_t_20, __pyx_pybuffernd_result.diminfo[1].strides); __Pyx_GOTREF(*__pyx_t_18); __Pyx_INCREF(__pyx_v_onan); __Pyx_DECREF(*__pyx_t_18); *__pyx_t_18 = __pyx_v_onan; __Pyx_GIVEREF(*__pyx_t_18); } __pyx_L7:; } } /* "pandas/lib.pyx":418 * result[i, j] = onan * * return result # <<<<<<<<<<<<<< * * def fast_zip(list ndarrays): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_result)); __pyx_r = ((PyObject *)__pyx_v_result); goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.lib.dicts_to_array", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_result); __Pyx_XDECREF(__pyx_v_row); __Pyx_XDECREF(__pyx_v_col); __Pyx_XDECREF(__pyx_v_onan); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_3lib_41fast_zip(PyObject *__pyx_self, PyObject *__pyx_v_ndarrays); /*proto*/ static char __pyx_doc_6pandas_3lib_40fast_zip[] = "\n For zipping multiple ndarrays into an ndarray of tuples\n "; static PyMethodDef __pyx_mdef_6pandas_3lib_41fast_zip = {__Pyx_NAMESTR("fast_zip"), (PyCFunction)__pyx_pw_6pandas_3lib_41fast_zip, METH_O, __Pyx_DOCSTR(__pyx_doc_6pandas_3lib_40fast_zip)}; static PyObject *__pyx_pw_6pandas_3lib_41fast_zip(PyObject *__pyx_self, PyObject *__pyx_v_ndarrays) { CYTHON_UNUSED int __pyx_lineno = 0; CYTHON_UNUSED const char *__pyx_filename = NULL; CYTHON_UNUSED int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("fast_zip (wrapper)", 0); if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ndarrays), (&PyList_Type), 1, "ndarrays", 1))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 420; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_3lib_40fast_zip(__pyx_self, ((PyObject*)__pyx_v_ndarrays)); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/lib.pyx":420 * return result * * def fast_zip(list ndarrays): # <<<<<<<<<<<<<< * ''' * For zipping multiple ndarrays into an ndarray of tuples */ static PyObject *__pyx_pf_6pandas_3lib_40fast_zip(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_ndarrays) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_k; Py_ssize_t __pyx_v_n; PyArrayObject *__pyx_v_result = 0; PyArrayIterObject *__pyx_v_it = 0; PyObject *__pyx_v_val = 0; PyObject *__pyx_v_tup = 0; PyObject *__pyx_v_arr = NULL; __Pyx_LocalBuf_ND __pyx_pybuffernd_result; __Pyx_Buffer __pyx_pybuffer_result; 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; PyArrayObject *__pyx_t_6 = NULL; 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; PyObject **__pyx_t_13; Py_ssize_t __pyx_t_14; int __pyx_t_15; Py_ssize_t __pyx_t_16; Py_ssize_t __pyx_t_17; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("fast_zip", 0); __pyx_pybuffer_result.pybuffer.buf = NULL; __pyx_pybuffer_result.refcount = 0; __pyx_pybuffernd_result.data = NULL; __pyx_pybuffernd_result.rcbuffer = &__pyx_pybuffer_result; /* "pandas/lib.pyx":430 * object val, tup * * k = len(ndarrays) # <<<<<<<<<<<<<< * n = len(ndarrays[0]) * */ if (unlikely(((PyObject *)__pyx_v_ndarrays) == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 430; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_1 = PyList_GET_SIZE(((PyObject *)__pyx_v_ndarrays)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 430; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_k = __pyx_t_1; /* "pandas/lib.pyx":431 * * k = len(ndarrays) * n = len(ndarrays[0]) # <<<<<<<<<<<<<< * * result = np.empty(n, dtype=object) */ if (unlikely(((PyObject *)__pyx_v_ndarrays) == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 431; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_2 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_ndarrays), 0, sizeof(long), PyInt_FromLong, 1, 0, 1); if (!__pyx_t_2) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 431; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = PyObject_Length(__pyx_t_2); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 431; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_n = __pyx_t_1; /* "pandas/lib.pyx":433 * n = len(ndarrays[0]) * * result = np.empty(n, dtype=object) # <<<<<<<<<<<<<< * * # initialize tuples on first pass */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 433; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 433; __pyx_clineno = __LINE__; goto __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_n); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 433; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 433; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 433; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_2)); if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__dtype), __pyx_builtin_object) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 433; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_5 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 433; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 433; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_6 = ((PyArrayObject *)__pyx_t_5); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_object, 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_result.rcbuffer->pybuffer, (PyObject*)__pyx_v_result, &__Pyx_TypeInfo_object, 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_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_7 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 433; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_6 = 0; __pyx_v_result = ((PyArrayObject *)__pyx_t_5); __pyx_t_5 = 0; /* "pandas/lib.pyx":436 * * # initialize tuples on first pass * arr = ndarrays[0] # <<<<<<<<<<<<<< * it = PyArray_IterNew(arr) * for i in range(n): */ if (unlikely(((PyObject *)__pyx_v_ndarrays) == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 436; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_5 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_ndarrays), 0, sizeof(long), PyInt_FromLong, 1, 0, 1); if (!__pyx_t_5) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 436; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_v_arr = __pyx_t_5; __pyx_t_5 = 0; /* "pandas/lib.pyx":437 * # initialize tuples on first pass * arr = ndarrays[0] * it = PyArray_IterNew(arr) # <<<<<<<<<<<<<< * for i in range(n): * val = PyArray_GETITEM(arr, PyArray_ITER_DATA(it)) */ __pyx_t_5 = PyArray_IterNew(__pyx_v_arr); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 437; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_2 = __pyx_t_5; __Pyx_INCREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_v_it = ((PyArrayIterObject *)__pyx_t_2); __pyx_t_2 = 0; /* "pandas/lib.pyx":438 * arr = ndarrays[0] * it = PyArray_IterNew(arr) * for i in range(n): # <<<<<<<<<<<<<< * val = PyArray_GETITEM(arr, PyArray_ITER_DATA(it)) * tup = PyTuple_New(k) */ __pyx_t_1 = __pyx_v_n; for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_1; __pyx_t_11+=1) { __pyx_v_i = __pyx_t_11; /* "pandas/lib.pyx":439 * it = PyArray_IterNew(arr) * for i in range(n): * val = PyArray_GETITEM(arr, PyArray_ITER_DATA(it)) # <<<<<<<<<<<<<< * tup = PyTuple_New(k) * */ if (!(likely(((__pyx_v_arr) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_arr, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 439; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_2 = PyArray_GETITEM(((PyArrayObject *)__pyx_v_arr), PyArray_ITER_DATA(__pyx_v_it)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 439; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_XDECREF_SET(__pyx_v_val, __pyx_t_2); __pyx_t_2 = 0; /* "pandas/lib.pyx":440 * for i in range(n): * val = PyArray_GETITEM(arr, PyArray_ITER_DATA(it)) * tup = PyTuple_New(k) # <<<<<<<<<<<<<< * * PyTuple_SET_ITEM(tup, 0, val) */ __pyx_t_2 = ((PyObject *)PyTuple_New(__pyx_v_k)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 440; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_XDECREF_SET(__pyx_v_tup, __pyx_t_2); __pyx_t_2 = 0; /* "pandas/lib.pyx":442 * tup = PyTuple_New(k) * * PyTuple_SET_ITEM(tup, 0, val) # <<<<<<<<<<<<<< * Py_INCREF(val) * result[i] = tup */ PyTuple_SET_ITEM(__pyx_v_tup, 0, __pyx_v_val); /* "pandas/lib.pyx":443 * * PyTuple_SET_ITEM(tup, 0, val) * Py_INCREF(val) # <<<<<<<<<<<<<< * result[i] = tup * PyArray_ITER_NEXT(it) */ Py_INCREF(__pyx_v_val); /* "pandas/lib.pyx":444 * PyTuple_SET_ITEM(tup, 0, val) * Py_INCREF(val) * result[i] = tup # <<<<<<<<<<<<<< * PyArray_ITER_NEXT(it) * */ __pyx_t_12 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_12 < 0) { __pyx_t_12 += __pyx_pybuffernd_result.diminfo[0].shape; if (unlikely(__pyx_t_12 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_12 >= __pyx_pybuffernd_result.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 444; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_13 = __Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_12, __pyx_pybuffernd_result.diminfo[0].strides); __Pyx_GOTREF(*__pyx_t_13); __Pyx_INCREF(__pyx_v_tup); __Pyx_DECREF(*__pyx_t_13); *__pyx_t_13 = __pyx_v_tup; __Pyx_GIVEREF(*__pyx_t_13); /* "pandas/lib.pyx":445 * Py_INCREF(val) * result[i] = tup * PyArray_ITER_NEXT(it) # <<<<<<<<<<<<<< * * for j in range(1, k): */ PyArray_ITER_NEXT(__pyx_v_it); } /* "pandas/lib.pyx":447 * PyArray_ITER_NEXT(it) * * for j in range(1, k): # <<<<<<<<<<<<<< * arr = ndarrays[j] * it = PyArray_IterNew(arr) */ __pyx_t_1 = __pyx_v_k; for (__pyx_t_11 = 1; __pyx_t_11 < __pyx_t_1; __pyx_t_11+=1) { __pyx_v_j = __pyx_t_11; /* "pandas/lib.pyx":448 * * for j in range(1, k): * arr = ndarrays[j] # <<<<<<<<<<<<<< * it = PyArray_IterNew(arr) * if len(arr) != n: */ if (unlikely(((PyObject *)__pyx_v_ndarrays) == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 448; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_2 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_ndarrays), __pyx_v_j, sizeof(Py_ssize_t), PyInt_FromSsize_t, 1, 1, 1); if (!__pyx_t_2) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 448; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF_SET(__pyx_v_arr, __pyx_t_2); __pyx_t_2 = 0; /* "pandas/lib.pyx":449 * for j in range(1, k): * arr = ndarrays[j] * it = PyArray_IterNew(arr) # <<<<<<<<<<<<<< * if len(arr) != n: * raise ValueError('all arrays must be same length') */ __pyx_t_2 = PyArray_IterNew(__pyx_v_arr); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 449; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = __pyx_t_2; __Pyx_INCREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF_SET(__pyx_v_it, ((PyArrayIterObject *)__pyx_t_5)); __pyx_t_5 = 0; /* "pandas/lib.pyx":450 * arr = ndarrays[j] * it = PyArray_IterNew(arr) * if len(arr) != n: # <<<<<<<<<<<<<< * raise ValueError('all arrays must be same length') * */ __pyx_t_14 = PyObject_Length(__pyx_v_arr); if (unlikely(__pyx_t_14 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 450; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_15 = ((__pyx_t_14 != __pyx_v_n) != 0); if (__pyx_t_15) { /* "pandas/lib.pyx":451 * it = PyArray_IterNew(arr) * if len(arr) != n: * raise ValueError('all arrays must be same length') # <<<<<<<<<<<<<< * * for i in range(n): */ __pyx_t_5 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_3), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 451; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_Raise(__pyx_t_5, 0, 0, 0); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; {__pyx_filename = __pyx_f[2]; __pyx_lineno = 451; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L7; } __pyx_L7:; /* "pandas/lib.pyx":453 * raise ValueError('all arrays must be same length') * * for i in range(n): # <<<<<<<<<<<<<< * val = PyArray_GETITEM(arr, PyArray_ITER_DATA(it)) * PyTuple_SET_ITEM(result[i], j, val) */ __pyx_t_14 = __pyx_v_n; for (__pyx_t_16 = 0; __pyx_t_16 < __pyx_t_14; __pyx_t_16+=1) { __pyx_v_i = __pyx_t_16; /* "pandas/lib.pyx":454 * * for i in range(n): * val = PyArray_GETITEM(arr, PyArray_ITER_DATA(it)) # <<<<<<<<<<<<<< * PyTuple_SET_ITEM(result[i], j, val) * Py_INCREF(val) */ if (!(likely(((__pyx_v_arr) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_arr, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 454; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_5 = PyArray_GETITEM(((PyArrayObject *)__pyx_v_arr), PyArray_ITER_DATA(__pyx_v_it)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 454; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_XDECREF_SET(__pyx_v_val, __pyx_t_5); __pyx_t_5 = 0; /* "pandas/lib.pyx":455 * for i in range(n): * val = PyArray_GETITEM(arr, PyArray_ITER_DATA(it)) * PyTuple_SET_ITEM(result[i], j, val) # <<<<<<<<<<<<<< * Py_INCREF(val) * PyArray_ITER_NEXT(it) */ __pyx_t_17 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_17 < 0) { __pyx_t_17 += __pyx_pybuffernd_result.diminfo[0].shape; if (unlikely(__pyx_t_17 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_17 >= __pyx_pybuffernd_result.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 455; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_5 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_result.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_5, __pyx_v_j, __pyx_v_val); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "pandas/lib.pyx":456 * val = PyArray_GETITEM(arr, PyArray_ITER_DATA(it)) * PyTuple_SET_ITEM(result[i], j, val) * Py_INCREF(val) # <<<<<<<<<<<<<< * PyArray_ITER_NEXT(it) * */ Py_INCREF(__pyx_v_val); /* "pandas/lib.pyx":457 * PyTuple_SET_ITEM(result[i], j, val) * Py_INCREF(val) * PyArray_ITER_NEXT(it) # <<<<<<<<<<<<<< * * return result */ PyArray_ITER_NEXT(__pyx_v_it); } } /* "pandas/lib.pyx":459 * PyArray_ITER_NEXT(it) * * return result # <<<<<<<<<<<<<< * * def get_reverse_indexer(ndarray[int64_t] indexer, Py_ssize_t length): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_result)); __pyx_r = ((PyObject *)__pyx_v_result); goto __pyx_L0; __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_XDECREF(__pyx_t_5); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.lib.fast_zip", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_result); __Pyx_XDECREF((PyObject *)__pyx_v_it); __Pyx_XDECREF(__pyx_v_val); __Pyx_XDECREF(__pyx_v_tup); __Pyx_XDECREF(__pyx_v_arr); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_3lib_43get_reverse_indexer(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_3lib_43get_reverse_indexer = {__Pyx_NAMESTR("get_reverse_indexer"), (PyCFunction)__pyx_pw_6pandas_3lib_43get_reverse_indexer, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_3lib_43get_reverse_indexer(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_indexer = 0; Py_ssize_t __pyx_v_length; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("get_reverse_indexer (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__indexer,&__pyx_n_s__length,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__indexer)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__length)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("get_reverse_indexer", 1, 2, 2, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 461; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "get_reverse_indexer") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 461; __pyx_clineno = __LINE__; goto __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_indexer = ((PyArrayObject *)values[0]); __pyx_v_length = __Pyx_PyIndex_AsSsize_t(values[1]); if (unlikely((__pyx_v_length == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 461; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("get_reverse_indexer", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 461; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.lib.get_reverse_indexer", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_indexer), __pyx_ptype_5numpy_ndarray, 1, "indexer", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 461; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_3lib_42get_reverse_indexer(__pyx_self, __pyx_v_indexer, __pyx_v_length); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/lib.pyx":461 * return result * * def get_reverse_indexer(ndarray[int64_t] indexer, Py_ssize_t length): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = len(indexer) */ static PyObject *__pyx_pf_6pandas_3lib_42get_reverse_indexer(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_indexer, Py_ssize_t __pyx_v_length) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_n; PyArrayObject *__pyx_v_rev_indexer = 0; __pyx_t_5numpy_int64_t __pyx_v_idx; __Pyx_LocalBuf_ND __pyx_pybuffernd_indexer; __Pyx_Buffer __pyx_pybuffer_indexer; __Pyx_LocalBuf_ND __pyx_pybuffernd_rev_indexer; __Pyx_Buffer __pyx_pybuffer_rev_indexer; 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; int __pyx_t_14; __pyx_t_5numpy_int64_t __pyx_t_15; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_reverse_indexer", 0); __pyx_pybuffer_rev_indexer.pybuffer.buf = NULL; __pyx_pybuffer_rev_indexer.refcount = 0; __pyx_pybuffernd_rev_indexer.data = NULL; __pyx_pybuffernd_rev_indexer.rcbuffer = &__pyx_pybuffer_rev_indexer; __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_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 461; __pyx_clineno = __LINE__; goto __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]; /* "pandas/lib.pyx":463 * def get_reverse_indexer(ndarray[int64_t] indexer, Py_ssize_t length): * cdef: * Py_ssize_t i, n = len(indexer) # <<<<<<<<<<<<<< * ndarray[int64_t] rev_indexer * int64_t idx */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_indexer)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 463; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/lib.pyx":467 * int64_t idx * * rev_indexer = np.empty(length, dtype=np.int64) # <<<<<<<<<<<<<< * rev_indexer.fill(-1) * for i in range(n): */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 467; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 467; __pyx_clineno = __LINE__; goto __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_length); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 467; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 467; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 467; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_2)); __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 467; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s__int64); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 467; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__dtype), __pyx_t_6) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 467; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 467; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __Pyx_DECREF(((PyObject *)__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_filename = __pyx_f[2]; __pyx_lineno = 467; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_7 = ((PyArrayObject *)__pyx_t_6); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_rev_indexer.rcbuffer->pybuffer); __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_rev_indexer.rcbuffer->pybuffer, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_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_rev_indexer.rcbuffer->pybuffer, (PyObject*)__pyx_v_rev_indexer, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_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_pybuffernd_rev_indexer.diminfo[0].strides = __pyx_pybuffernd_rev_indexer.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_rev_indexer.diminfo[0].shape = __pyx_pybuffernd_rev_indexer.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 467; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_7 = 0; __pyx_v_rev_indexer = ((PyArrayObject *)__pyx_t_6); __pyx_t_6 = 0; /* "pandas/lib.pyx":468 * * rev_indexer = np.empty(length, dtype=np.int64) * rev_indexer.fill(-1) # <<<<<<<<<<<<<< * for i in range(n): * idx = indexer[i] */ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_rev_indexer), __pyx_n_s__fill); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 468; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_2 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_k_tuple_4), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 468; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/lib.pyx":469 * rev_indexer = np.empty(length, dtype=np.int64) * rev_indexer.fill(-1) * for i in range(n): # <<<<<<<<<<<<<< * idx = indexer[i] * if idx != -1: */ __pyx_t_1 = __pyx_v_n; for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_1; __pyx_t_12+=1) { __pyx_v_i = __pyx_t_12; /* "pandas/lib.pyx":470 * rev_indexer.fill(-1) * for i in range(n): * idx = indexer[i] # <<<<<<<<<<<<<< * if idx != -1: * rev_indexer[idx] = i */ __pyx_t_13 = __pyx_v_i; __pyx_t_8 = -1; if (__pyx_t_13 < 0) { __pyx_t_13 += __pyx_pybuffernd_indexer.diminfo[0].shape; if (unlikely(__pyx_t_13 < 0)) __pyx_t_8 = 0; } else if (unlikely(__pyx_t_13 >= __pyx_pybuffernd_indexer.diminfo[0].shape)) __pyx_t_8 = 0; if (unlikely(__pyx_t_8 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_8); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 470; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_idx = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_indexer.diminfo[0].strides)); /* "pandas/lib.pyx":471 * for i in range(n): * idx = indexer[i] * if idx != -1: # <<<<<<<<<<<<<< * rev_indexer[idx] = i * */ __pyx_t_14 = ((__pyx_v_idx != -1) != 0); if (__pyx_t_14) { /* "pandas/lib.pyx":472 * idx = indexer[i] * if idx != -1: * rev_indexer[idx] = i # <<<<<<<<<<<<<< * * return rev_indexer */ __pyx_t_15 = __pyx_v_idx; __pyx_t_8 = -1; if (__pyx_t_15 < 0) { __pyx_t_15 += __pyx_pybuffernd_rev_indexer.diminfo[0].shape; if (unlikely(__pyx_t_15 < 0)) __pyx_t_8 = 0; } else if (unlikely(__pyx_t_15 >= __pyx_pybuffernd_rev_indexer.diminfo[0].shape)) __pyx_t_8 = 0; if (unlikely(__pyx_t_8 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_8); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 472; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_rev_indexer.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_rev_indexer.diminfo[0].strides) = __pyx_v_i; goto __pyx_L5; } __pyx_L5:; } /* "pandas/lib.pyx":474 * rev_indexer[idx] = i * * return rev_indexer # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_rev_indexer)); __pyx_r = ((PyObject *)__pyx_v_rev_indexer); goto __pyx_L0; __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_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_rev_indexer.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.lib.get_reverse_indexer", __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_rev_indexer.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_rev_indexer); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_3lib_45has_infs_f4(PyObject *__pyx_self, PyObject *__pyx_v_arr); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_3lib_45has_infs_f4 = {__Pyx_NAMESTR("has_infs_f4"), (PyCFunction)__pyx_pw_6pandas_3lib_45has_infs_f4, METH_O, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_3lib_45has_infs_f4(PyObject *__pyx_self, PyObject *__pyx_v_arr) { CYTHON_UNUSED int __pyx_lineno = 0; CYTHON_UNUSED const char *__pyx_filename = NULL; CYTHON_UNUSED int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("has_infs_f4 (wrapper)", 0); if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_arr), __pyx_ptype_5numpy_ndarray, 1, "arr", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 477; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_3lib_44has_infs_f4(__pyx_self, ((PyArrayObject *)__pyx_v_arr)); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/lib.pyx":477 * * * def has_infs_f4(ndarray[float32_t] arr): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = len(arr) */ static PyObject *__pyx_pf_6pandas_3lib_44has_infs_f4(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_arr) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_n; __pyx_t_5numpy_float32_t __pyx_v_inf; __pyx_t_5numpy_float32_t __pyx_v_neginf; __pyx_t_5numpy_float32_t __pyx_v_val; __Pyx_LocalBuf_ND __pyx_pybuffernd_arr; __Pyx_Buffer __pyx_pybuffer_arr; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; __pyx_t_5numpy_float32_t __pyx_t_4; Py_ssize_t __pyx_t_5; Py_ssize_t __pyx_t_6; int __pyx_t_7; int __pyx_t_8; int __pyx_t_9; int __pyx_t_10; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("has_infs_f4", 0); __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_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 477; __pyx_clineno = __LINE__; goto __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/lib.pyx":479 * def has_infs_f4(ndarray[float32_t] arr): * cdef: * Py_ssize_t i, n = len(arr) # <<<<<<<<<<<<<< * float32_t inf, neginf, val * */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_arr)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 479; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/lib.pyx":482 * float32_t inf, neginf, val * * inf = np.inf # <<<<<<<<<<<<<< * neginf = -inf * */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 482; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__inf); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 482; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_4 = __pyx_PyFloat_AsFloat(__pyx_t_3); if (unlikely((__pyx_t_4 == (npy_float32)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 482; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_inf = __pyx_t_4; /* "pandas/lib.pyx":483 * * inf = np.inf * neginf = -inf # <<<<<<<<<<<<<< * * for i in range(n): */ __pyx_v_neginf = (-__pyx_v_inf); /* "pandas/lib.pyx":485 * neginf = -inf * * for i in range(n): # <<<<<<<<<<<<<< * val = arr[i] * if val == inf or val == neginf: */ __pyx_t_1 = __pyx_v_n; for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_1; __pyx_t_5+=1) { __pyx_v_i = __pyx_t_5; /* "pandas/lib.pyx":486 * * for i in range(n): * val = arr[i] # <<<<<<<<<<<<<< * if val == inf or val == neginf: * return True */ __pyx_t_6 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_6 < 0) { __pyx_t_6 += __pyx_pybuffernd_arr.diminfo[0].shape; if (unlikely(__pyx_t_6 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_6 >= __pyx_pybuffernd_arr.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 486; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_val = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_arr.rcbuffer->pybuffer.buf, __pyx_t_6, __pyx_pybuffernd_arr.diminfo[0].strides)); /* "pandas/lib.pyx":487 * for i in range(n): * val = arr[i] * if val == inf or val == neginf: # <<<<<<<<<<<<<< * return True * return False */ __pyx_t_8 = ((__pyx_v_val == __pyx_v_inf) != 0); if (!__pyx_t_8) { __pyx_t_9 = ((__pyx_v_val == __pyx_v_neginf) != 0); __pyx_t_10 = __pyx_t_9; } else { __pyx_t_10 = __pyx_t_8; } if (__pyx_t_10) { /* "pandas/lib.pyx":488 * val = arr[i] * if val == inf or val == neginf: * return True # <<<<<<<<<<<<<< * return False * */ __Pyx_XDECREF(__pyx_r); __pyx_t_3 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 488; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; goto __pyx_L5; } __pyx_L5:; } /* "pandas/lib.pyx":489 * if val == inf or val == neginf: * return True * return False # <<<<<<<<<<<<<< * * def has_infs_f8(ndarray[float64_t] arr): */ __Pyx_XDECREF(__pyx_r); __pyx_t_3 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 489; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_arr.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.lib.has_infs_f4", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_arr.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_3lib_47has_infs_f8(PyObject *__pyx_self, PyObject *__pyx_v_arr); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_3lib_47has_infs_f8 = {__Pyx_NAMESTR("has_infs_f8"), (PyCFunction)__pyx_pw_6pandas_3lib_47has_infs_f8, METH_O, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_3lib_47has_infs_f8(PyObject *__pyx_self, PyObject *__pyx_v_arr) { CYTHON_UNUSED int __pyx_lineno = 0; CYTHON_UNUSED const char *__pyx_filename = NULL; CYTHON_UNUSED int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("has_infs_f8 (wrapper)", 0); if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_arr), __pyx_ptype_5numpy_ndarray, 1, "arr", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 491; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_3lib_46has_infs_f8(__pyx_self, ((PyArrayObject *)__pyx_v_arr)); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/lib.pyx":491 * return False * * def has_infs_f8(ndarray[float64_t] arr): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = len(arr) */ static PyObject *__pyx_pf_6pandas_3lib_46has_infs_f8(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_arr) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_n; __pyx_t_5numpy_float64_t __pyx_v_inf; __pyx_t_5numpy_float64_t __pyx_v_neginf; __pyx_t_5numpy_float64_t __pyx_v_val; __Pyx_LocalBuf_ND __pyx_pybuffernd_arr; __Pyx_Buffer __pyx_pybuffer_arr; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; __pyx_t_5numpy_float64_t __pyx_t_4; Py_ssize_t __pyx_t_5; Py_ssize_t __pyx_t_6; int __pyx_t_7; int __pyx_t_8; int __pyx_t_9; int __pyx_t_10; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("has_infs_f8", 0); __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_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 491; __pyx_clineno = __LINE__; goto __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/lib.pyx":493 * def has_infs_f8(ndarray[float64_t] arr): * cdef: * Py_ssize_t i, n = len(arr) # <<<<<<<<<<<<<< * float64_t inf, neginf, val * */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_arr)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 493; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/lib.pyx":496 * float64_t inf, neginf, val * * inf = np.inf # <<<<<<<<<<<<<< * neginf = -inf * */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 496; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__inf); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 496; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_4 = __pyx_PyFloat_AsDouble(__pyx_t_3); if (unlikely((__pyx_t_4 == (npy_float64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 496; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_inf = __pyx_t_4; /* "pandas/lib.pyx":497 * * inf = np.inf * neginf = -inf # <<<<<<<<<<<<<< * * for i in range(n): */ __pyx_v_neginf = (-__pyx_v_inf); /* "pandas/lib.pyx":499 * neginf = -inf * * for i in range(n): # <<<<<<<<<<<<<< * val = arr[i] * if val == inf or val == neginf: */ __pyx_t_1 = __pyx_v_n; for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_1; __pyx_t_5+=1) { __pyx_v_i = __pyx_t_5; /* "pandas/lib.pyx":500 * * for i in range(n): * val = arr[i] # <<<<<<<<<<<<<< * if val == inf or val == neginf: * return True */ __pyx_t_6 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_6 < 0) { __pyx_t_6 += __pyx_pybuffernd_arr.diminfo[0].shape; if (unlikely(__pyx_t_6 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_6 >= __pyx_pybuffernd_arr.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 500; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_val = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_arr.rcbuffer->pybuffer.buf, __pyx_t_6, __pyx_pybuffernd_arr.diminfo[0].strides)); /* "pandas/lib.pyx":501 * for i in range(n): * val = arr[i] * if val == inf or val == neginf: # <<<<<<<<<<<<<< * return True * return False */ __pyx_t_8 = ((__pyx_v_val == __pyx_v_inf) != 0); if (!__pyx_t_8) { __pyx_t_9 = ((__pyx_v_val == __pyx_v_neginf) != 0); __pyx_t_10 = __pyx_t_9; } else { __pyx_t_10 = __pyx_t_8; } if (__pyx_t_10) { /* "pandas/lib.pyx":502 * val = arr[i] * if val == inf or val == neginf: * return True # <<<<<<<<<<<<<< * return False * */ __Pyx_XDECREF(__pyx_r); __pyx_t_3 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 502; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; goto __pyx_L5; } __pyx_L5:; } /* "pandas/lib.pyx":503 * if val == inf or val == neginf: * return True * return False # <<<<<<<<<<<<<< * * def convert_timestamps(ndarray values): */ __Pyx_XDECREF(__pyx_r); __pyx_t_3 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 503; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_arr.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.lib.has_infs_f8", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_arr.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_3lib_49convert_timestamps(PyObject *__pyx_self, PyObject *__pyx_v_values); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_3lib_49convert_timestamps = {__Pyx_NAMESTR("convert_timestamps"), (PyCFunction)__pyx_pw_6pandas_3lib_49convert_timestamps, METH_O, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_3lib_49convert_timestamps(PyObject *__pyx_self, PyObject *__pyx_v_values) { CYTHON_UNUSED int __pyx_lineno = 0; CYTHON_UNUSED const char *__pyx_filename = NULL; CYTHON_UNUSED int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("convert_timestamps (wrapper)", 0); if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 505; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_3lib_48convert_timestamps(__pyx_self, ((PyArrayObject *)__pyx_v_values)); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/lib.pyx":505 * return False * * def convert_timestamps(ndarray values): # <<<<<<<<<<<<<< * cdef: * object val, f, result */ static PyObject *__pyx_pf_6pandas_3lib_48convert_timestamps(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values) { PyObject *__pyx_v_val = 0; PyObject *__pyx_v_f = 0; PyObject *__pyx_v_cache = 0; Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_n; PyArrayObject *__pyx_v_out = 0; PyObject *__pyx_v_datetime = NULL; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; Py_ssize_t __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyArrayObject *__pyx_t_6 = NULL; 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; int __pyx_t_12; int __pyx_t_13; Py_ssize_t __pyx_t_14; PyObject **__pyx_t_15; Py_ssize_t __pyx_t_16; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("convert_timestamps", 0); __pyx_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; /* "pandas/lib.pyx":508 * cdef: * object val, f, result * dict cache = {} # <<<<<<<<<<<<<< * Py_ssize_t i, n = len(values) * ndarray[object] out */ __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 508; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_v_cache = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/lib.pyx":509 * object val, f, result * dict cache = {} * Py_ssize_t i, n = len(values) # <<<<<<<<<<<<<< * ndarray[object] out * */ __pyx_t_2 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 509; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_2; /* "pandas/lib.pyx":514 * # for HDFStore, a bit temporary but... * * from datetime import datetime # <<<<<<<<<<<<<< * f = datetime.fromtimestamp * */ __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 514; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)__pyx_n_s__datetime)); PyList_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_n_s__datetime)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__datetime)); __pyx_t_3 = __Pyx_Import(((PyObject *)__pyx_n_s__datetime), ((PyObject *)__pyx_t_1), -1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 514; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s__datetime); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 514; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_t_1); __pyx_v_datetime = __pyx_t_1; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/lib.pyx":515 * * from datetime import datetime * f = datetime.fromtimestamp # <<<<<<<<<<<<<< * * out = np.empty(n, dtype='O') */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_datetime, __pyx_n_s__fromtimestamp); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 515; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_v_f = __pyx_t_3; __pyx_t_3 = 0; /* "pandas/lib.pyx":517 * f = datetime.fromtimestamp * * out = np.empty(n, dtype='O') # <<<<<<<<<<<<<< * * for i in range(n): */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 517; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s__empty); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 517; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyInt_FromSsize_t(__pyx_v_n); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 517; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 517; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 517; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_3)); if (PyDict_SetItem(__pyx_t_3, ((PyObject *)__pyx_n_s__dtype), ((PyObject *)__pyx_n_s__O)) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 517; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_5 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_3)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 517; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __Pyx_DECREF(((PyObject *)__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_filename = __pyx_f[2]; __pyx_lineno = 517; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_6 = ((PyArrayObject *)__pyx_t_5); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_object, 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.rcbuffer->pybuffer, (PyObject*)__pyx_v_out, &__Pyx_TypeInfo_object, 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_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_7 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 517; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_6 = 0; __pyx_v_out = ((PyArrayObject *)__pyx_t_5); __pyx_t_5 = 0; /* "pandas/lib.pyx":519 * out = np.empty(n, dtype='O') * * for i in range(n): # <<<<<<<<<<<<<< * val = util.get_value_1d(values, i) * if val in cache: */ __pyx_t_2 = __pyx_v_n; for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_2; __pyx_t_11+=1) { __pyx_v_i = __pyx_t_11; /* "pandas/lib.pyx":520 * * for i in range(n): * val = util.get_value_1d(values, i) # <<<<<<<<<<<<<< * if val in cache: * out[i] = cache[val] */ __pyx_t_5 = get_value_1d(__pyx_v_values, __pyx_v_i); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 520; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_XDECREF_SET(__pyx_v_val, __pyx_t_5); __pyx_t_5 = 0; /* "pandas/lib.pyx":521 * for i in range(n): * val = util.get_value_1d(values, i) * if val in cache: # <<<<<<<<<<<<<< * out[i] = cache[val] * else: */ __pyx_t_12 = (__Pyx_PyDict_Contains(__pyx_v_val, ((PyObject *)__pyx_v_cache), Py_EQ)); if (unlikely(__pyx_t_12 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 521; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_13 = (__pyx_t_12 != 0); if (__pyx_t_13) { /* "pandas/lib.pyx":522 * val = util.get_value_1d(values, i) * if val in cache: * out[i] = cache[val] # <<<<<<<<<<<<<< * else: * cache[val] = out[i] = f(val) */ __pyx_t_5 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_cache), __pyx_v_val); if (!__pyx_t_5) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 522; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_14 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_14 < 0) { __pyx_t_14 += __pyx_pybuffernd_out.diminfo[0].shape; if (unlikely(__pyx_t_14 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_14 >= __pyx_pybuffernd_out.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 522; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_15 = __Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_out.diminfo[0].strides); __Pyx_GOTREF(*__pyx_t_15); __Pyx_INCREF(__pyx_t_5); __Pyx_DECREF(*__pyx_t_15); *__pyx_t_15 = __pyx_t_5; __Pyx_GIVEREF(*__pyx_t_15); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; goto __pyx_L5; } /*else*/ { /* "pandas/lib.pyx":524 * out[i] = cache[val] * else: * cache[val] = out[i] = f(val) # <<<<<<<<<<<<<< * * return out */ __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 524; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_v_val); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_val); __Pyx_GIVEREF(__pyx_v_val); __pyx_t_3 = PyObject_Call(__pyx_v_f, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 524; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; if (PyDict_SetItem(((PyObject *)__pyx_v_cache), __pyx_v_val, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 524; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_16 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_16 < 0) { __pyx_t_16 += __pyx_pybuffernd_out.diminfo[0].shape; if (unlikely(__pyx_t_16 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_16 >= __pyx_pybuffernd_out.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 524; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_15 = __Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_out.diminfo[0].strides); __Pyx_GOTREF(*__pyx_t_15); __Pyx_INCREF(__pyx_t_3); __Pyx_DECREF(*__pyx_t_15); *__pyx_t_15 = __pyx_t_3; __Pyx_GIVEREF(*__pyx_t_15); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } __pyx_L5:; } /* "pandas/lib.pyx":526 * cache[val] = out[i] = f(val) * * return out # <<<<<<<<<<<<<< * * def maybe_indices_to_slice(ndarray[int64_t] indices): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_out)); __pyx_r = ((PyObject *)__pyx_v_out); goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.lib.convert_timestamps", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF(__pyx_v_val); __Pyx_XDECREF(__pyx_v_f); __Pyx_XDECREF(__pyx_v_cache); __Pyx_XDECREF((PyObject *)__pyx_v_out); __Pyx_XDECREF(__pyx_v_datetime); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_3lib_51maybe_indices_to_slice(PyObject *__pyx_self, PyObject *__pyx_v_indices); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_3lib_51maybe_indices_to_slice = {__Pyx_NAMESTR("maybe_indices_to_slice"), (PyCFunction)__pyx_pw_6pandas_3lib_51maybe_indices_to_slice, METH_O, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_3lib_51maybe_indices_to_slice(PyObject *__pyx_self, PyObject *__pyx_v_indices) { CYTHON_UNUSED int __pyx_lineno = 0; CYTHON_UNUSED const char *__pyx_filename = NULL; CYTHON_UNUSED int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("maybe_indices_to_slice (wrapper)", 0); if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_indices), __pyx_ptype_5numpy_ndarray, 1, "indices", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 528; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_3lib_50maybe_indices_to_slice(__pyx_self, ((PyArrayObject *)__pyx_v_indices)); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/lib.pyx":528 * return out * * def maybe_indices_to_slice(ndarray[int64_t] indices): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = len(indices) */ static PyObject *__pyx_pf_6pandas_3lib_50maybe_indices_to_slice(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_indices) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_n; __Pyx_LocalBuf_ND __pyx_pybuffernd_indices; __Pyx_Buffer __pyx_pybuffer_indices; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; int __pyx_t_2; Py_ssize_t __pyx_t_3; Py_ssize_t __pyx_t_4; int __pyx_t_5; Py_ssize_t __pyx_t_6; long __pyx_t_7; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("maybe_indices_to_slice", 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_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 528; __pyx_clineno = __LINE__; goto __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/lib.pyx":530 * def maybe_indices_to_slice(ndarray[int64_t] indices): * cdef: * Py_ssize_t i, n = len(indices) # <<<<<<<<<<<<<< * * if n == 0: */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_indices)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 530; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/lib.pyx":532 * Py_ssize_t i, n = len(indices) * * if n == 0: # <<<<<<<<<<<<<< * return indices * */ __pyx_t_2 = ((__pyx_v_n == 0) != 0); if (__pyx_t_2) { /* "pandas/lib.pyx":533 * * if n == 0: * return indices # <<<<<<<<<<<<<< * * for i in range(1, n): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_indices)); __pyx_r = ((PyObject *)__pyx_v_indices); goto __pyx_L0; goto __pyx_L3; } __pyx_L3:; /* "pandas/lib.pyx":535 * return indices * * for i in range(1, n): # <<<<<<<<<<<<<< * if indices[i] - indices[i - 1] != 1: * return indices */ __pyx_t_1 = __pyx_v_n; for (__pyx_t_3 = 1; __pyx_t_3 < __pyx_t_1; __pyx_t_3+=1) { __pyx_v_i = __pyx_t_3; /* "pandas/lib.pyx":536 * * for i in range(1, n): * if indices[i] - indices[i - 1] != 1: # <<<<<<<<<<<<<< * return indices * return slice(indices[0], indices[n - 1] + 1) */ __pyx_t_4 = __pyx_v_i; __pyx_t_5 = -1; if (__pyx_t_4 < 0) { __pyx_t_4 += __pyx_pybuffernd_indices.diminfo[0].shape; if (unlikely(__pyx_t_4 < 0)) __pyx_t_5 = 0; } else if (unlikely(__pyx_t_4 >= __pyx_pybuffernd_indices.diminfo[0].shape)) __pyx_t_5 = 0; if (unlikely(__pyx_t_5 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_5); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 536; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_6 = (__pyx_v_i - 1); __pyx_t_5 = -1; if (__pyx_t_6 < 0) { __pyx_t_6 += __pyx_pybuffernd_indices.diminfo[0].shape; if (unlikely(__pyx_t_6 < 0)) __pyx_t_5 = 0; } else if (unlikely(__pyx_t_6 >= __pyx_pybuffernd_indices.diminfo[0].shape)) __pyx_t_5 = 0; if (unlikely(__pyx_t_5 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_5); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 536; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_2 = ((((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indices.rcbuffer->pybuffer.buf, __pyx_t_4, __pyx_pybuffernd_indices.diminfo[0].strides)) - (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indices.rcbuffer->pybuffer.buf, __pyx_t_6, __pyx_pybuffernd_indices.diminfo[0].strides))) != 1) != 0); if (__pyx_t_2) { /* "pandas/lib.pyx":537 * for i in range(1, n): * if indices[i] - indices[i - 1] != 1: * return indices # <<<<<<<<<<<<<< * return slice(indices[0], indices[n - 1] + 1) * */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_indices)); __pyx_r = ((PyObject *)__pyx_v_indices); goto __pyx_L0; goto __pyx_L6; } __pyx_L6:; } /* "pandas/lib.pyx":538 * if indices[i] - indices[i - 1] != 1: * return indices * return slice(indices[0], indices[n - 1] + 1) # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_7 = 0; __pyx_t_5 = -1; if (__pyx_t_7 < 0) { __pyx_t_7 += __pyx_pybuffernd_indices.diminfo[0].shape; if (unlikely(__pyx_t_7 < 0)) __pyx_t_5 = 0; } else if (unlikely(__pyx_t_7 >= __pyx_pybuffernd_indices.diminfo[0].shape)) __pyx_t_5 = 0; if (unlikely(__pyx_t_5 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_5); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 538; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_8 = __Pyx_PyInt_to_py_npy_int64((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indices.rcbuffer->pybuffer.buf, __pyx_t_7, __pyx_pybuffernd_indices.diminfo[0].strides))); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 538; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_1 = (__pyx_v_n - 1); __pyx_t_5 = -1; if (__pyx_t_1 < 0) { __pyx_t_1 += __pyx_pybuffernd_indices.diminfo[0].shape; if (unlikely(__pyx_t_1 < 0)) __pyx_t_5 = 0; } else if (unlikely(__pyx_t_1 >= __pyx_pybuffernd_indices.diminfo[0].shape)) __pyx_t_5 = 0; if (unlikely(__pyx_t_5 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_5); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 538; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_9 = __Pyx_PyInt_to_py_npy_int64(((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indices.rcbuffer->pybuffer.buf, __pyx_t_1, __pyx_pybuffernd_indices.diminfo[0].strides)) + 1)); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 538; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_t_10 = PyTuple_New(2); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 538; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_8); __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_t_9); __Pyx_GIVEREF(__pyx_t_9); __pyx_t_8 = 0; __pyx_t_9 = 0; __pyx_t_9 = PyObject_Call(((PyObject *)((PyObject*)(&PySlice_Type))), ((PyObject *)__pyx_t_10), NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 538; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(((PyObject *)__pyx_t_10)); __pyx_t_10 = 0; __pyx_r = __pyx_t_9; __pyx_t_9 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); __Pyx_XDECREF(__pyx_t_10); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __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.lib.maybe_indices_to_slice", __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; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_3lib_53maybe_booleans_to_slice(PyObject *__pyx_self, PyObject *__pyx_v_mask); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_3lib_53maybe_booleans_to_slice = {__Pyx_NAMESTR("maybe_booleans_to_slice"), (PyCFunction)__pyx_pw_6pandas_3lib_53maybe_booleans_to_slice, METH_O, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_3lib_53maybe_booleans_to_slice(PyObject *__pyx_self, PyObject *__pyx_v_mask) { CYTHON_UNUSED int __pyx_lineno = 0; CYTHON_UNUSED const char *__pyx_filename = NULL; CYTHON_UNUSED int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("maybe_booleans_to_slice (wrapper)", 0); if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_mask), __pyx_ptype_5numpy_ndarray, 1, "mask", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 541; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_3lib_52maybe_booleans_to_slice(__pyx_self, ((PyArrayObject *)__pyx_v_mask)); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/lib.pyx":541 * * * def maybe_booleans_to_slice(ndarray[uint8_t] mask): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = len(mask) */ static PyObject *__pyx_pf_6pandas_3lib_52maybe_booleans_to_slice(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_mask) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_n; Py_ssize_t __pyx_v_start; Py_ssize_t __pyx_v_end; int __pyx_v_started; int __pyx_v_finished; __Pyx_LocalBuf_ND __pyx_pybuffernd_mask; __Pyx_Buffer __pyx_pybuffer_mask; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; Py_ssize_t __pyx_t_2; Py_ssize_t __pyx_t_3; int __pyx_t_4; int __pyx_t_5; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("maybe_booleans_to_slice", 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_BufFmt_StackElem __pyx_stack[1]; 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, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 541; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; /* "pandas/lib.pyx":543 * def maybe_booleans_to_slice(ndarray[uint8_t] mask): * cdef: * Py_ssize_t i, n = len(mask) # <<<<<<<<<<<<<< * Py_ssize_t start, end * bint started = 0, finished = 0 */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_mask)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 543; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/lib.pyx":545 * Py_ssize_t i, n = len(mask) * Py_ssize_t start, end * bint started = 0, finished = 0 # <<<<<<<<<<<<<< * * for i in range(n): */ __pyx_v_started = 0; __pyx_v_finished = 0; /* "pandas/lib.pyx":547 * bint started = 0, finished = 0 * * for i in range(n): # <<<<<<<<<<<<<< * if mask[i]: * if finished: */ __pyx_t_1 = __pyx_v_n; for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) { __pyx_v_i = __pyx_t_2; /* "pandas/lib.pyx":548 * * for i in range(n): * if mask[i]: # <<<<<<<<<<<<<< * if finished: * return mask.view(np.bool_) */ __pyx_t_3 = __pyx_v_i; __pyx_t_4 = -1; if (__pyx_t_3 < 0) { __pyx_t_3 += __pyx_pybuffernd_mask.diminfo[0].shape; if (unlikely(__pyx_t_3 < 0)) __pyx_t_4 = 0; } else if (unlikely(__pyx_t_3 >= __pyx_pybuffernd_mask.diminfo[0].shape)) __pyx_t_4 = 0; if (unlikely(__pyx_t_4 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_4); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 548; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_5 = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_mask.rcbuffer->pybuffer.buf, __pyx_t_3, __pyx_pybuffernd_mask.diminfo[0].strides)) != 0); if (__pyx_t_5) { /* "pandas/lib.pyx":549 * for i in range(n): * if mask[i]: * if finished: # <<<<<<<<<<<<<< * return mask.view(np.bool_) * if not started: */ __pyx_t_5 = (__pyx_v_finished != 0); if (__pyx_t_5) { /* "pandas/lib.pyx":550 * if mask[i]: * if finished: * return mask.view(np.bool_) # <<<<<<<<<<<<<< * if not started: * started = 1 */ __Pyx_XDECREF(__pyx_r); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_mask), __pyx_n_s__view); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 550; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 550; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s__bool_); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 550; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 550; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_8); __Pyx_GIVEREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_8 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_t_7), NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 550; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0; __pyx_r = __pyx_t_8; __pyx_t_8 = 0; goto __pyx_L0; goto __pyx_L6; } __pyx_L6:; /* "pandas/lib.pyx":551 * if finished: * return mask.view(np.bool_) * if not started: # <<<<<<<<<<<<<< * started = 1 * start = i */ __pyx_t_5 = ((!(__pyx_v_started != 0)) != 0); if (__pyx_t_5) { /* "pandas/lib.pyx":552 * return mask.view(np.bool_) * if not started: * started = 1 # <<<<<<<<<<<<<< * start = i * else: */ __pyx_v_started = 1; /* "pandas/lib.pyx":553 * if not started: * started = 1 * start = i # <<<<<<<<<<<<<< * else: * if finished: */ __pyx_v_start = __pyx_v_i; goto __pyx_L7; } __pyx_L7:; goto __pyx_L5; } /*else*/ { /* "pandas/lib.pyx":555 * start = i * else: * if finished: # <<<<<<<<<<<<<< * continue * */ __pyx_t_5 = (__pyx_v_finished != 0); if (__pyx_t_5) { /* "pandas/lib.pyx":556 * else: * if finished: * continue # <<<<<<<<<<<<<< * * if started: */ goto __pyx_L3_continue; goto __pyx_L8; } __pyx_L8:; /* "pandas/lib.pyx":558 * continue * * if started: # <<<<<<<<<<<<<< * end = i * finished = 1 */ __pyx_t_5 = (__pyx_v_started != 0); if (__pyx_t_5) { /* "pandas/lib.pyx":559 * * if started: * end = i # <<<<<<<<<<<<<< * finished = 1 * */ __pyx_v_end = __pyx_v_i; /* "pandas/lib.pyx":560 * if started: * end = i * finished = 1 # <<<<<<<<<<<<<< * * if not started: */ __pyx_v_finished = 1; goto __pyx_L9; } __pyx_L9:; } __pyx_L5:; __pyx_L3_continue:; } /* "pandas/lib.pyx":562 * finished = 1 * * if not started: # <<<<<<<<<<<<<< * return slice(0, 0) * if not finished: */ __pyx_t_5 = ((!(__pyx_v_started != 0)) != 0); if (__pyx_t_5) { /* "pandas/lib.pyx":563 * * if not started: * return slice(0, 0) # <<<<<<<<<<<<<< * if not finished: * return slice(start, None) */ __Pyx_XDECREF(__pyx_r); __pyx_t_8 = PyObject_Call(((PyObject *)((PyObject*)(&PySlice_Type))), ((PyObject *)__pyx_k_tuple_5), NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 563; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_r = __pyx_t_8; __pyx_t_8 = 0; goto __pyx_L0; goto __pyx_L10; } __pyx_L10:; /* "pandas/lib.pyx":564 * if not started: * return slice(0, 0) * if not finished: # <<<<<<<<<<<<<< * return slice(start, None) * else: */ __pyx_t_5 = ((!(__pyx_v_finished != 0)) != 0); if (__pyx_t_5) { /* "pandas/lib.pyx":565 * return slice(0, 0) * if not finished: * return slice(start, None) # <<<<<<<<<<<<<< * else: * return slice(start, end) */ __Pyx_XDECREF(__pyx_r); __pyx_t_8 = PyInt_FromSsize_t(__pyx_v_start); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 565; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 565; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_8); __Pyx_GIVEREF(__pyx_t_8); __Pyx_INCREF(Py_None); PyTuple_SET_ITEM(__pyx_t_7, 1, Py_None); __Pyx_GIVEREF(Py_None); __pyx_t_8 = 0; __pyx_t_8 = PyObject_Call(((PyObject *)((PyObject*)(&PySlice_Type))), ((PyObject *)__pyx_t_7), NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 565; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0; __pyx_r = __pyx_t_8; __pyx_t_8 = 0; goto __pyx_L0; goto __pyx_L11; } /*else*/ { /* "pandas/lib.pyx":567 * return slice(start, None) * else: * return slice(start, end) # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_8 = PyInt_FromSsize_t(__pyx_v_start); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 567; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_7 = PyInt_FromSsize_t(__pyx_v_end); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 567; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 567; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_8); __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_7); __Pyx_GIVEREF(__pyx_t_7); __pyx_t_8 = 0; __pyx_t_7 = 0; __pyx_t_7 = PyObject_Call(((PyObject *)((PyObject*)(&PySlice_Type))), ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 567; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0; __pyx_r = __pyx_t_7; __pyx_t_7 = 0; goto __pyx_L0; } __pyx_L11:; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_mask.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.lib.maybe_booleans_to_slice", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_mask.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_3lib_55scalar_compare(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_3lib_55scalar_compare = {__Pyx_NAMESTR("scalar_compare"), (PyCFunction)__pyx_pw_6pandas_3lib_55scalar_compare, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_3lib_55scalar_compare(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_values = 0; PyObject *__pyx_v_val = 0; PyObject *__pyx_v_op = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("scalar_compare (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__values,&__pyx_n_s__val,&__pyx_n_s__op,0}; PyObject* values[3] = {0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__values)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__val)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("scalar_compare", 1, 3, 3, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 572; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__op)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("scalar_compare", 1, 3, 3, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 572; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "scalar_compare") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 572; __pyx_clineno = __LINE__; goto __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_val = values[1]; __pyx_v_op = values[2]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("scalar_compare", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 572; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.lib.scalar_compare", __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_filename = __pyx_f[2]; __pyx_lineno = 572; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_3lib_54scalar_compare(__pyx_self, __pyx_v_values, __pyx_v_val, __pyx_v_op); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/lib.pyx":572 * @cython.wraparound(False) * @cython.boundscheck(False) * def scalar_compare(ndarray[object] values, object val, object op): # <<<<<<<<<<<<<< * import operator * cdef: */ static PyObject *__pyx_pf_6pandas_3lib_54scalar_compare(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyObject *__pyx_v_val, PyObject *__pyx_v_op) { PyObject *__pyx_v_operator = NULL; Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_n; PyArrayObject *__pyx_v_result = 0; int __pyx_v_flag; PyObject *__pyx_v_x = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_result; __Pyx_Buffer __pyx_pybuffer_result; __Pyx_LocalBuf_ND __pyx_pybuffernd_values; __Pyx_Buffer __pyx_pybuffer_values; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; 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; PyArrayObject *__pyx_t_8 = NULL; int __pyx_t_9; PyObject *__pyx_t_10 = NULL; PyObject *__pyx_t_11 = NULL; PyObject *__pyx_t_12 = NULL; 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("scalar_compare", 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_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_filename = __pyx_f[2]; __pyx_lineno = 572; __pyx_clineno = __LINE__; goto __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/lib.pyx":573 * @cython.boundscheck(False) * def scalar_compare(ndarray[object] values, object val, object op): * import operator # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = len(values) */ __pyx_t_1 = __Pyx_Import(((PyObject *)__pyx_n_s__operator), 0, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 573; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_v_operator = __pyx_t_1; __pyx_t_1 = 0; /* "pandas/lib.pyx":575 * import operator * cdef: * Py_ssize_t i, n = len(values) # <<<<<<<<<<<<<< * ndarray[uint8_t, cast=True] result * int flag */ __pyx_t_2 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 575; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_2; /* "pandas/lib.pyx":580 * object x * * if op is operator.lt: # <<<<<<<<<<<<<< * flag = cpython.Py_LT * elif op is operator.le: */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_operator, __pyx_n_s__lt); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 580; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = (__pyx_v_op == __pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_4 = (__pyx_t_3 != 0); if (__pyx_t_4) { /* "pandas/lib.pyx":581 * * if op is operator.lt: * flag = cpython.Py_LT # <<<<<<<<<<<<<< * elif op is operator.le: * flag = cpython.Py_LE */ __pyx_v_flag = Py_LT; goto __pyx_L3; } /* "pandas/lib.pyx":582 * if op is operator.lt: * flag = cpython.Py_LT * elif op is operator.le: # <<<<<<<<<<<<<< * flag = cpython.Py_LE * elif op is operator.gt: */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_operator, __pyx_n_s__le); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 582; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = (__pyx_v_op == __pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_3 = (__pyx_t_4 != 0); if (__pyx_t_3) { /* "pandas/lib.pyx":583 * flag = cpython.Py_LT * elif op is operator.le: * flag = cpython.Py_LE # <<<<<<<<<<<<<< * elif op is operator.gt: * flag = cpython.Py_GT */ __pyx_v_flag = Py_LE; goto __pyx_L3; } /* "pandas/lib.pyx":584 * elif op is operator.le: * flag = cpython.Py_LE * elif op is operator.gt: # <<<<<<<<<<<<<< * flag = cpython.Py_GT * elif op is operator.ge: */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_operator, __pyx_n_s__gt); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 584; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = (__pyx_v_op == __pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_4 = (__pyx_t_3 != 0); if (__pyx_t_4) { /* "pandas/lib.pyx":585 * flag = cpython.Py_LE * elif op is operator.gt: * flag = cpython.Py_GT # <<<<<<<<<<<<<< * elif op is operator.ge: * flag = cpython.Py_GE */ __pyx_v_flag = Py_GT; goto __pyx_L3; } /* "pandas/lib.pyx":586 * elif op is operator.gt: * flag = cpython.Py_GT * elif op is operator.ge: # <<<<<<<<<<<<<< * flag = cpython.Py_GE * elif op is operator.eq: */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_operator, __pyx_n_s__ge); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 586; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = (__pyx_v_op == __pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_3 = (__pyx_t_4 != 0); if (__pyx_t_3) { /* "pandas/lib.pyx":587 * flag = cpython.Py_GT * elif op is operator.ge: * flag = cpython.Py_GE # <<<<<<<<<<<<<< * elif op is operator.eq: * flag = cpython.Py_EQ */ __pyx_v_flag = Py_GE; goto __pyx_L3; } /* "pandas/lib.pyx":588 * elif op is operator.ge: * flag = cpython.Py_GE * elif op is operator.eq: # <<<<<<<<<<<<<< * flag = cpython.Py_EQ * elif op is operator.ne: */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_operator, __pyx_n_s__eq); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 588; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = (__pyx_v_op == __pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_4 = (__pyx_t_3 != 0); if (__pyx_t_4) { /* "pandas/lib.pyx":589 * flag = cpython.Py_GE * elif op is operator.eq: * flag = cpython.Py_EQ # <<<<<<<<<<<<<< * elif op is operator.ne: * flag = cpython.Py_NE */ __pyx_v_flag = Py_EQ; goto __pyx_L3; } /* "pandas/lib.pyx":590 * elif op is operator.eq: * flag = cpython.Py_EQ * elif op is operator.ne: # <<<<<<<<<<<<<< * flag = cpython.Py_NE * else: */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_operator, __pyx_n_s__ne); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 590; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = (__pyx_v_op == __pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_3 = (__pyx_t_4 != 0); if (__pyx_t_3) { /* "pandas/lib.pyx":591 * flag = cpython.Py_EQ * elif op is operator.ne: * flag = cpython.Py_NE # <<<<<<<<<<<<<< * else: * raise ValueError('Unrecognized operator') */ __pyx_v_flag = Py_NE; goto __pyx_L3; } /*else*/ { /* "pandas/lib.pyx":593 * flag = cpython.Py_NE * else: * raise ValueError('Unrecognized operator') # <<<<<<<<<<<<<< * * result = np.empty(n, dtype=bool).view(np.uint8) */ __pyx_t_1 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_7), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 593; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 593; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_L3:; /* "pandas/lib.pyx":595 * raise ValueError('Unrecognized operator') * * result = np.empty(n, dtype=bool).view(np.uint8) # <<<<<<<<<<<<<< * * if flag == cpython.Py_NE: */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 595; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s__empty); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 595; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_n); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 595; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 595; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 595; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_1)); if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__dtype), ((PyObject*)&PyBool_Type)) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 595; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_7 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_6), ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 595; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s__view); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 595; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 595; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s__uint8); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 595; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 595; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_7), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 595; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0; if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 595; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_8 = ((PyArrayObject *)__pyx_t_6); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __pyx_t_9 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_t_8, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 1, __pyx_stack); if (unlikely(__pyx_t_9 < 0)) { PyErr_Fetch(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_v_result, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 1, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_11); Py_XDECREF(__pyx_t_12); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_10, __pyx_t_11, __pyx_t_12); } } __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_9 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 595; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_8 = 0; __pyx_v_result = ((PyArrayObject *)__pyx_t_6); __pyx_t_6 = 0; /* "pandas/lib.pyx":597 * result = np.empty(n, dtype=bool).view(np.uint8) * * if flag == cpython.Py_NE: # <<<<<<<<<<<<<< * for i in range(n): * x = values[i] */ __pyx_t_3 = ((__pyx_v_flag == Py_NE) != 0); if (__pyx_t_3) { /* "pandas/lib.pyx":598 * * if flag == cpython.Py_NE: * for i in range(n): # <<<<<<<<<<<<<< * x = values[i] * if _checknull(x): */ __pyx_t_2 = __pyx_v_n; for (__pyx_t_13 = 0; __pyx_t_13 < __pyx_t_2; __pyx_t_13+=1) { __pyx_v_i = __pyx_t_13; /* "pandas/lib.pyx":599 * if flag == cpython.Py_NE: * for i in range(n): * x = values[i] # <<<<<<<<<<<<<< * if _checknull(x): * result[i] = True */ __pyx_t_14 = __pyx_v_i; __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_x, __pyx_t_6); __pyx_t_6 = 0; /* "pandas/lib.pyx":600 * for i in range(n): * x = values[i] * if _checknull(x): # <<<<<<<<<<<<<< * result[i] = True * else: */ __pyx_t_3 = (__pyx_f_4util__checknull(__pyx_v_x) != 0); if (__pyx_t_3) { /* "pandas/lib.pyx":601 * x = values[i] * if _checknull(x): * result[i] = True # <<<<<<<<<<<<<< * else: * result[i] = cpython.PyObject_RichCompareBool(x, val, flag) */ __pyx_t_15 = __pyx_v_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_result.diminfo[0].strides) = 1; goto __pyx_L7; } /*else*/ { /* "pandas/lib.pyx":603 * result[i] = True * else: * result[i] = cpython.PyObject_RichCompareBool(x, val, flag) # <<<<<<<<<<<<<< * else: * for i in range(n): */ __pyx_t_3 = PyObject_RichCompareBool(__pyx_v_x, __pyx_v_val, __pyx_v_flag); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 603; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_16 = __pyx_v_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_result.diminfo[0].strides) = __pyx_t_3; } __pyx_L7:; } goto __pyx_L4; } /*else*/ { /* "pandas/lib.pyx":605 * result[i] = cpython.PyObject_RichCompareBool(x, val, flag) * else: * for i in range(n): # <<<<<<<<<<<<<< * x = values[i] * if _checknull(x): */ __pyx_t_2 = __pyx_v_n; for (__pyx_t_13 = 0; __pyx_t_13 < __pyx_t_2; __pyx_t_13+=1) { __pyx_v_i = __pyx_t_13; /* "pandas/lib.pyx":606 * else: * for i in range(n): * x = values[i] # <<<<<<<<<<<<<< * if _checknull(x): * result[i] = False */ __pyx_t_17 = __pyx_v_i; __pyx_t_6 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_values.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_6); __Pyx_XDECREF_SET(__pyx_v_x, __pyx_t_6); __pyx_t_6 = 0; /* "pandas/lib.pyx":607 * for i in range(n): * x = values[i] * if _checknull(x): # <<<<<<<<<<<<<< * result[i] = False * else: */ __pyx_t_3 = (__pyx_f_4util__checknull(__pyx_v_x) != 0); if (__pyx_t_3) { /* "pandas/lib.pyx":608 * x = values[i] * if _checknull(x): * result[i] = False # <<<<<<<<<<<<<< * else: * result[i] = cpython.PyObject_RichCompareBool(x, val, flag) */ __pyx_t_18 = __pyx_v_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_result.diminfo[0].strides) = 0; goto __pyx_L10; } /*else*/ { /* "pandas/lib.pyx":610 * result[i] = False * else: * result[i] = cpython.PyObject_RichCompareBool(x, val, flag) # <<<<<<<<<<<<<< * * return result.view(bool) */ __pyx_t_3 = PyObject_RichCompareBool(__pyx_v_x, __pyx_v_val, __pyx_v_flag); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 610; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_19 = __pyx_v_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_result.diminfo[0].strides) = __pyx_t_3; } __pyx_L10:; } } __pyx_L4:; /* "pandas/lib.pyx":612 * result[i] = cpython.PyObject_RichCompareBool(x, val, flag) * * return result.view(bool) # <<<<<<<<<<<<<< * * @cython.wraparound(False) */ __Pyx_XDECREF(__pyx_r); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_result), __pyx_n_s__view); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 612; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 612; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_INCREF(((PyObject*)&PyBool_Type)); PyTuple_SET_ITEM(__pyx_t_7, 0, ((PyObject*)&PyBool_Type)); __Pyx_GIVEREF(((PyObject*)&PyBool_Type)); __pyx_t_1 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_t_7), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 612; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0; __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.lib.scalar_compare", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF(__pyx_v_operator); __Pyx_XDECREF((PyObject *)__pyx_v_result); __Pyx_XDECREF(__pyx_v_x); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_3lib_57vec_compare(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_3lib_57vec_compare = {__Pyx_NAMESTR("vec_compare"), (PyCFunction)__pyx_pw_6pandas_3lib_57vec_compare, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_3lib_57vec_compare(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_left = 0; PyArrayObject *__pyx_v_right = 0; PyObject *__pyx_v_op = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("vec_compare (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__left,&__pyx_n_s__right,&__pyx_n_s__op,0}; PyObject* values[3] = {0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__left)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__right)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("vec_compare", 1, 3, 3, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 616; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__op)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("vec_compare", 1, 3, 3, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 616; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "vec_compare") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 616; __pyx_clineno = __LINE__; goto __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_left = ((PyArrayObject *)values[0]); __pyx_v_right = ((PyArrayObject *)values[1]); __pyx_v_op = values[2]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("vec_compare", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 616; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.lib.vec_compare", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_left), __pyx_ptype_5numpy_ndarray, 1, "left", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 616; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_right), __pyx_ptype_5numpy_ndarray, 1, "right", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 616; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_3lib_56vec_compare(__pyx_self, __pyx_v_left, __pyx_v_right, __pyx_v_op); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/lib.pyx":616 * @cython.wraparound(False) * @cython.boundscheck(False) * def vec_compare(ndarray[object] left, ndarray[object] right, object op): # <<<<<<<<<<<<<< * import operator * cdef: */ static PyObject *__pyx_pf_6pandas_3lib_56vec_compare(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_left, PyArrayObject *__pyx_v_right, PyObject *__pyx_v_op) { PyObject *__pyx_v_operator = NULL; Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_n; PyArrayObject *__pyx_v_result = 0; int __pyx_v_flag; PyObject *__pyx_v_x = NULL; PyObject *__pyx_v_y = NULL; __Pyx_LocalBuf_ND __pyx_pybuffernd_left; __Pyx_Buffer __pyx_pybuffer_left; __Pyx_LocalBuf_ND __pyx_pybuffernd_result; __Pyx_Buffer __pyx_pybuffer_result; __Pyx_LocalBuf_ND __pyx_pybuffernd_right; __Pyx_Buffer __pyx_pybuffer_right; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; Py_ssize_t __pyx_t_2; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; int __pyx_t_6; PyObject *__pyx_t_7 = NULL; PyArrayObject *__pyx_t_8 = NULL; int __pyx_t_9; PyObject *__pyx_t_10 = NULL; PyObject *__pyx_t_11 = NULL; PyObject *__pyx_t_12 = NULL; Py_ssize_t __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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("vec_compare", 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_left.pybuffer.buf = NULL; __pyx_pybuffer_left.refcount = 0; __pyx_pybuffernd_left.data = NULL; __pyx_pybuffernd_left.rcbuffer = &__pyx_pybuffer_left; __pyx_pybuffer_right.pybuffer.buf = NULL; __pyx_pybuffer_right.refcount = 0; __pyx_pybuffernd_right.data = NULL; __pyx_pybuffernd_right.rcbuffer = &__pyx_pybuffer_right; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_left.rcbuffer->pybuffer, (PyObject*)__pyx_v_left, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 616; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_left.diminfo[0].strides = __pyx_pybuffernd_left.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_left.diminfo[0].shape = __pyx_pybuffernd_left.rcbuffer->pybuffer.shape[0]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_right.rcbuffer->pybuffer, (PyObject*)__pyx_v_right, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 616; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_right.diminfo[0].strides = __pyx_pybuffernd_right.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_right.diminfo[0].shape = __pyx_pybuffernd_right.rcbuffer->pybuffer.shape[0]; /* "pandas/lib.pyx":617 * @cython.boundscheck(False) * def vec_compare(ndarray[object] left, ndarray[object] right, object op): * import operator # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = len(left) */ __pyx_t_1 = __Pyx_Import(((PyObject *)__pyx_n_s__operator), 0, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 617; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_v_operator = __pyx_t_1; __pyx_t_1 = 0; /* "pandas/lib.pyx":619 * import operator * cdef: * Py_ssize_t i, n = len(left) # <<<<<<<<<<<<<< * ndarray[uint8_t, cast=True] result * int flag */ __pyx_t_2 = PyObject_Length(((PyObject *)__pyx_v_left)); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 619; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_2; /* "pandas/lib.pyx":623 * int flag * * if n != len(right): # <<<<<<<<<<<<<< * raise ValueError('Arrays were different lengths: %d vs %d' * % (n, len(right))) */ __pyx_t_2 = PyObject_Length(((PyObject *)__pyx_v_right)); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 623; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_3 = ((__pyx_v_n != __pyx_t_2) != 0); if (__pyx_t_3) { /* "pandas/lib.pyx":625 * if n != len(right): * raise ValueError('Arrays were different lengths: %d vs %d' * % (n, len(right))) # <<<<<<<<<<<<<< * * if op is operator.lt: */ __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_n); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 625; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyObject_Length(((PyObject *)__pyx_v_right)); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 625; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_4 = PyInt_FromSsize_t(__pyx_t_2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 625; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 625; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_1 = 0; __pyx_t_4 = 0; __pyx_t_4 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_8), ((PyObject *)__pyx_t_5)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 625; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_4)); __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 624; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_t_4)); __Pyx_GIVEREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __pyx_t_4 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 624; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; __Pyx_Raise(__pyx_t_4, 0, 0, 0); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; {__pyx_filename = __pyx_f[2]; __pyx_lineno = 624; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L3; } __pyx_L3:; /* "pandas/lib.pyx":627 * % (n, len(right))) * * if op is operator.lt: # <<<<<<<<<<<<<< * flag = cpython.Py_LT * elif op is operator.le: */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_operator, __pyx_n_s__lt); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 627; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = (__pyx_v_op == __pyx_t_4); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_6 = (__pyx_t_3 != 0); if (__pyx_t_6) { /* "pandas/lib.pyx":628 * * if op is operator.lt: * flag = cpython.Py_LT # <<<<<<<<<<<<<< * elif op is operator.le: * flag = cpython.Py_LE */ __pyx_v_flag = Py_LT; goto __pyx_L4; } /* "pandas/lib.pyx":629 * if op is operator.lt: * flag = cpython.Py_LT * elif op is operator.le: # <<<<<<<<<<<<<< * flag = cpython.Py_LE * elif op is operator.gt: */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_operator, __pyx_n_s__le); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 629; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_6 = (__pyx_v_op == __pyx_t_4); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_3 = (__pyx_t_6 != 0); if (__pyx_t_3) { /* "pandas/lib.pyx":630 * flag = cpython.Py_LT * elif op is operator.le: * flag = cpython.Py_LE # <<<<<<<<<<<<<< * elif op is operator.gt: * flag = cpython.Py_GT */ __pyx_v_flag = Py_LE; goto __pyx_L4; } /* "pandas/lib.pyx":631 * elif op is operator.le: * flag = cpython.Py_LE * elif op is operator.gt: # <<<<<<<<<<<<<< * flag = cpython.Py_GT * elif op is operator.ge: */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_operator, __pyx_n_s__gt); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 631; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = (__pyx_v_op == __pyx_t_4); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_6 = (__pyx_t_3 != 0); if (__pyx_t_6) { /* "pandas/lib.pyx":632 * flag = cpython.Py_LE * elif op is operator.gt: * flag = cpython.Py_GT # <<<<<<<<<<<<<< * elif op is operator.ge: * flag = cpython.Py_GE */ __pyx_v_flag = Py_GT; goto __pyx_L4; } /* "pandas/lib.pyx":633 * elif op is operator.gt: * flag = cpython.Py_GT * elif op is operator.ge: # <<<<<<<<<<<<<< * flag = cpython.Py_GE * elif op is operator.eq: */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_operator, __pyx_n_s__ge); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 633; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_6 = (__pyx_v_op == __pyx_t_4); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_3 = (__pyx_t_6 != 0); if (__pyx_t_3) { /* "pandas/lib.pyx":634 * flag = cpython.Py_GT * elif op is operator.ge: * flag = cpython.Py_GE # <<<<<<<<<<<<<< * elif op is operator.eq: * flag = cpython.Py_EQ */ __pyx_v_flag = Py_GE; goto __pyx_L4; } /* "pandas/lib.pyx":635 * elif op is operator.ge: * flag = cpython.Py_GE * elif op is operator.eq: # <<<<<<<<<<<<<< * flag = cpython.Py_EQ * elif op is operator.ne: */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_operator, __pyx_n_s__eq); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 635; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = (__pyx_v_op == __pyx_t_4); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_6 = (__pyx_t_3 != 0); if (__pyx_t_6) { /* "pandas/lib.pyx":636 * flag = cpython.Py_GE * elif op is operator.eq: * flag = cpython.Py_EQ # <<<<<<<<<<<<<< * elif op is operator.ne: * flag = cpython.Py_NE */ __pyx_v_flag = Py_EQ; goto __pyx_L4; } /* "pandas/lib.pyx":637 * elif op is operator.eq: * flag = cpython.Py_EQ * elif op is operator.ne: # <<<<<<<<<<<<<< * flag = cpython.Py_NE * else: */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_operator, __pyx_n_s__ne); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 637; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_6 = (__pyx_v_op == __pyx_t_4); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_3 = (__pyx_t_6 != 0); if (__pyx_t_3) { /* "pandas/lib.pyx":638 * flag = cpython.Py_EQ * elif op is operator.ne: * flag = cpython.Py_NE # <<<<<<<<<<<<<< * else: * raise ValueError('Unrecognized operator') */ __pyx_v_flag = Py_NE; goto __pyx_L4; } /*else*/ { /* "pandas/lib.pyx":640 * flag = cpython.Py_NE * else: * raise ValueError('Unrecognized operator') # <<<<<<<<<<<<<< * * result = np.empty(n, dtype=bool).view(np.uint8) */ __pyx_t_4 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_9), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 640; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 640; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_L4:; /* "pandas/lib.pyx":642 * raise ValueError('Unrecognized operator') * * result = np.empty(n, dtype=bool).view(np.uint8) # <<<<<<<<<<<<<< * * if flag == cpython.Py_NE: */ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 642; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s__empty); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 642; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyInt_FromSsize_t(__pyx_v_n); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 642; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 642; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyDict_New(); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 642; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_4)); if (PyDict_SetItem(__pyx_t_4, ((PyObject *)__pyx_n_s__dtype), ((PyObject*)&PyBool_Type)) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 642; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_7 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_1), ((PyObject *)__pyx_t_4)); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 642; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s__view); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 642; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 642; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s__uint8); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 642; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 642; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_7), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 642; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0; if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 642; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_8 = ((PyArrayObject *)__pyx_t_1); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __pyx_t_9 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_t_8, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 1, __pyx_stack); if (unlikely(__pyx_t_9 < 0)) { PyErr_Fetch(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_v_result, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 1, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_11); Py_XDECREF(__pyx_t_12); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_10, __pyx_t_11, __pyx_t_12); } } __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_9 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 642; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_8 = 0; __pyx_v_result = ((PyArrayObject *)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/lib.pyx":644 * result = np.empty(n, dtype=bool).view(np.uint8) * * if flag == cpython.Py_NE: # <<<<<<<<<<<<<< * for i in range(n): * x = left[i] */ __pyx_t_3 = ((__pyx_v_flag == Py_NE) != 0); if (__pyx_t_3) { /* "pandas/lib.pyx":645 * * if flag == cpython.Py_NE: * for i in range(n): # <<<<<<<<<<<<<< * x = left[i] * y = right[i] */ __pyx_t_2 = __pyx_v_n; for (__pyx_t_13 = 0; __pyx_t_13 < __pyx_t_2; __pyx_t_13+=1) { __pyx_v_i = __pyx_t_13; /* "pandas/lib.pyx":646 * if flag == cpython.Py_NE: * for i in range(n): * x = left[i] # <<<<<<<<<<<<<< * y = right[i] * */ __pyx_t_14 = __pyx_v_i; __pyx_t_1 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_left.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_left.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_1); __Pyx_XDECREF_SET(__pyx_v_x, __pyx_t_1); __pyx_t_1 = 0; /* "pandas/lib.pyx":647 * for i in range(n): * x = left[i] * y = right[i] # <<<<<<<<<<<<<< * * if _checknull(x) or _checknull(y): */ __pyx_t_15 = __pyx_v_i; __pyx_t_1 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_right.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_right.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_1); __Pyx_XDECREF_SET(__pyx_v_y, __pyx_t_1); __pyx_t_1 = 0; /* "pandas/lib.pyx":649 * y = right[i] * * if _checknull(x) or _checknull(y): # <<<<<<<<<<<<<< * result[i] = True * else: */ __pyx_t_3 = (__pyx_f_4util__checknull(__pyx_v_x) != 0); if (!__pyx_t_3) { __pyx_t_6 = (__pyx_f_4util__checknull(__pyx_v_y) != 0); __pyx_t_16 = __pyx_t_6; } else { __pyx_t_16 = __pyx_t_3; } if (__pyx_t_16) { /* "pandas/lib.pyx":650 * * if _checknull(x) or _checknull(y): * result[i] = True # <<<<<<<<<<<<<< * else: * result[i] = cpython.PyObject_RichCompareBool(x, y, flag) */ __pyx_t_17 = __pyx_v_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_result.diminfo[0].strides) = 1; goto __pyx_L8; } /*else*/ { /* "pandas/lib.pyx":652 * result[i] = True * else: * result[i] = cpython.PyObject_RichCompareBool(x, y, flag) # <<<<<<<<<<<<<< * else: * for i in range(n): */ __pyx_t_16 = PyObject_RichCompareBool(__pyx_v_x, __pyx_v_y, __pyx_v_flag); if (unlikely(__pyx_t_16 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 652; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_18 = __pyx_v_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_result.diminfo[0].strides) = __pyx_t_16; } __pyx_L8:; } goto __pyx_L5; } /*else*/ { /* "pandas/lib.pyx":654 * result[i] = cpython.PyObject_RichCompareBool(x, y, flag) * else: * for i in range(n): # <<<<<<<<<<<<<< * x = left[i] * y = right[i] */ __pyx_t_2 = __pyx_v_n; for (__pyx_t_13 = 0; __pyx_t_13 < __pyx_t_2; __pyx_t_13+=1) { __pyx_v_i = __pyx_t_13; /* "pandas/lib.pyx":655 * else: * for i in range(n): * x = left[i] # <<<<<<<<<<<<<< * y = right[i] * */ __pyx_t_19 = __pyx_v_i; __pyx_t_1 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_left.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_left.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_1); __Pyx_XDECREF_SET(__pyx_v_x, __pyx_t_1); __pyx_t_1 = 0; /* "pandas/lib.pyx":656 * for i in range(n): * x = left[i] * y = right[i] # <<<<<<<<<<<<<< * * if _checknull(x) or _checknull(y): */ __pyx_t_20 = __pyx_v_i; __pyx_t_1 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_right.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_right.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_1); __Pyx_XDECREF_SET(__pyx_v_y, __pyx_t_1); __pyx_t_1 = 0; /* "pandas/lib.pyx":658 * y = right[i] * * if _checknull(x) or _checknull(y): # <<<<<<<<<<<<<< * result[i] = False * else: */ __pyx_t_16 = (__pyx_f_4util__checknull(__pyx_v_x) != 0); if (!__pyx_t_16) { __pyx_t_3 = (__pyx_f_4util__checknull(__pyx_v_y) != 0); __pyx_t_6 = __pyx_t_3; } else { __pyx_t_6 = __pyx_t_16; } if (__pyx_t_6) { /* "pandas/lib.pyx":659 * * if _checknull(x) or _checknull(y): * result[i] = False # <<<<<<<<<<<<<< * else: * result[i] = cpython.PyObject_RichCompareBool(x, y, flag) */ __pyx_t_21 = __pyx_v_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_result.diminfo[0].strides) = 0; goto __pyx_L11; } /*else*/ { /* "pandas/lib.pyx":661 * result[i] = False * else: * result[i] = cpython.PyObject_RichCompareBool(x, y, flag) # <<<<<<<<<<<<<< * * return result.view(bool) */ __pyx_t_6 = PyObject_RichCompareBool(__pyx_v_x, __pyx_v_y, __pyx_v_flag); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 661; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_22 = __pyx_v_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_22, __pyx_pybuffernd_result.diminfo[0].strides) = __pyx_t_6; } __pyx_L11:; } } __pyx_L5:; /* "pandas/lib.pyx":663 * result[i] = cpython.PyObject_RichCompareBool(x, y, flag) * * return result.view(bool) # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_result), __pyx_n_s__view); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 663; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 663; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_INCREF(((PyObject*)&PyBool_Type)); PyTuple_SET_ITEM(__pyx_t_7, 0, ((PyObject*)&PyBool_Type)); __Pyx_GIVEREF(((PyObject*)&PyBool_Type)); __pyx_t_4 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_7), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 663; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0; __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_7); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_left.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_right.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.lib.vec_compare", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_left.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_right.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF(__pyx_v_operator); __Pyx_XDECREF((PyObject *)__pyx_v_result); __Pyx_XDECREF(__pyx_v_x); __Pyx_XDECREF(__pyx_v_y); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_3lib_59scalar_binop(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_3lib_59scalar_binop = {__Pyx_NAMESTR("scalar_binop"), (PyCFunction)__pyx_pw_6pandas_3lib_59scalar_binop, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_3lib_59scalar_binop(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_values = 0; PyObject *__pyx_v_val = 0; PyObject *__pyx_v_op = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("scalar_binop (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__values,&__pyx_n_s__val,&__pyx_n_s__op,0}; PyObject* values[3] = {0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__values)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__val)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("scalar_binop", 1, 3, 3, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 668; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__op)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("scalar_binop", 1, 3, 3, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 668; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "scalar_binop") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 668; __pyx_clineno = __LINE__; goto __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_val = values[1]; __pyx_v_op = values[2]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("scalar_binop", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 668; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.lib.scalar_binop", __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_filename = __pyx_f[2]; __pyx_lineno = 668; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_3lib_58scalar_binop(__pyx_self, __pyx_v_values, __pyx_v_val, __pyx_v_op); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/lib.pyx":668 * @cython.wraparound(False) * @cython.boundscheck(False) * def scalar_binop(ndarray[object] values, object val, object op): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = len(values) */ static PyObject *__pyx_pf_6pandas_3lib_58scalar_binop(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyObject *__pyx_v_val, PyObject *__pyx_v_op) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_n; PyArrayObject *__pyx_v_result = 0; PyObject *__pyx_v_x = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_result; __Pyx_Buffer __pyx_pybuffer_result; __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; PyArrayObject *__pyx_t_6 = NULL; int __pyx_t_7; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; int __pyx_t_11; Py_ssize_t __pyx_t_12; Py_ssize_t __pyx_t_13; Py_ssize_t __pyx_t_14; PyObject **__pyx_t_15; Py_ssize_t __pyx_t_16; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("scalar_binop", 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_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_filename = __pyx_f[2]; __pyx_lineno = 668; __pyx_clineno = __LINE__; goto __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/lib.pyx":670 * def scalar_binop(ndarray[object] values, object val, object op): * cdef: * Py_ssize_t i, n = len(values) # <<<<<<<<<<<<<< * ndarray[object] result * object x */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 670; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/lib.pyx":674 * object x * * result = np.empty(n, dtype=object) # <<<<<<<<<<<<<< * if util._checknull(val): * result.fill(val) */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 674; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 674; __pyx_clineno = __LINE__; goto __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_n); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 674; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 674; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 674; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_2)); if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__dtype), __pyx_builtin_object) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 674; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_5 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 674; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 674; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_6 = ((PyArrayObject *)__pyx_t_5); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_object, 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_result.rcbuffer->pybuffer, (PyObject*)__pyx_v_result, &__Pyx_TypeInfo_object, 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_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_7 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 674; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_6 = 0; __pyx_v_result = ((PyArrayObject *)__pyx_t_5); __pyx_t_5 = 0; /* "pandas/lib.pyx":675 * * result = np.empty(n, dtype=object) * if util._checknull(val): # <<<<<<<<<<<<<< * result.fill(val) * return result */ __pyx_t_11 = (__pyx_f_4util__checknull(__pyx_v_val) != 0); if (__pyx_t_11) { /* "pandas/lib.pyx":676 * result = np.empty(n, dtype=object) * if util._checknull(val): * result.fill(val) # <<<<<<<<<<<<<< * return result * */ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_result), __pyx_n_s__fill); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 676; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 676; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_val); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_val); __Pyx_GIVEREF(__pyx_v_val); __pyx_t_4 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 676; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "pandas/lib.pyx":677 * if util._checknull(val): * result.fill(val) * return result # <<<<<<<<<<<<<< * * for i in range(n): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_result)); __pyx_r = ((PyObject *)__pyx_v_result); goto __pyx_L0; goto __pyx_L3; } __pyx_L3:; /* "pandas/lib.pyx":679 * return result * * for i in range(n): # <<<<<<<<<<<<<< * x = values[i] * if util._checknull(x): */ __pyx_t_1 = __pyx_v_n; for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_1; __pyx_t_12+=1) { __pyx_v_i = __pyx_t_12; /* "pandas/lib.pyx":680 * * for i in range(n): * x = values[i] # <<<<<<<<<<<<<< * if util._checknull(x): * result[i] = x */ __pyx_t_13 = __pyx_v_i; __pyx_t_4 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_values.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_4); __Pyx_XDECREF_SET(__pyx_v_x, __pyx_t_4); __pyx_t_4 = 0; /* "pandas/lib.pyx":681 * for i in range(n): * x = values[i] * if util._checknull(x): # <<<<<<<<<<<<<< * result[i] = x * else: */ __pyx_t_11 = (__pyx_f_4util__checknull(__pyx_v_x) != 0); if (__pyx_t_11) { /* "pandas/lib.pyx":682 * x = values[i] * if util._checknull(x): * result[i] = x # <<<<<<<<<<<<<< * else: * result[i] = op(x, val) */ __pyx_t_14 = __pyx_v_i; __pyx_t_15 = __Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_result.diminfo[0].strides); __Pyx_GOTREF(*__pyx_t_15); __Pyx_INCREF(__pyx_v_x); __Pyx_DECREF(*__pyx_t_15); *__pyx_t_15 = __pyx_v_x; __Pyx_GIVEREF(*__pyx_t_15); goto __pyx_L6; } /*else*/ { /* "pandas/lib.pyx":684 * result[i] = x * else: * result[i] = op(x, val) # <<<<<<<<<<<<<< * * return maybe_convert_bool(result) */ __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 684; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_v_x); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_x); __Pyx_GIVEREF(__pyx_v_x); __Pyx_INCREF(__pyx_v_val); PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_val); __Pyx_GIVEREF(__pyx_v_val); __pyx_t_2 = PyObject_Call(__pyx_v_op, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 684; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __pyx_t_16 = __pyx_v_i; __pyx_t_15 = __Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_result.diminfo[0].strides); __Pyx_GOTREF(*__pyx_t_15); __Pyx_INCREF(__pyx_t_2); __Pyx_DECREF(*__pyx_t_15); *__pyx_t_15 = __pyx_t_2; __Pyx_GIVEREF(*__pyx_t_15); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } __pyx_L6:; } /* "pandas/lib.pyx":686 * result[i] = op(x, val) * * return maybe_convert_bool(result) # <<<<<<<<<<<<<< * * @cython.wraparound(False) */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__maybe_convert_bool); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 686; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 686; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(((PyObject *)__pyx_v_result)); PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_v_result)); __Pyx_GIVEREF(((PyObject *)__pyx_v_result)); __pyx_t_5 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 686; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __pyx_r = __pyx_t_5; __pyx_t_5 = 0; goto __pyx_L0; __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_XDECREF(__pyx_t_5); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.lib.scalar_binop", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_result); __Pyx_XDECREF(__pyx_v_x); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_3lib_61vec_binop(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_3lib_61vec_binop = {__Pyx_NAMESTR("vec_binop"), (PyCFunction)__pyx_pw_6pandas_3lib_61vec_binop, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_3lib_61vec_binop(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_left = 0; PyArrayObject *__pyx_v_right = 0; PyObject *__pyx_v_op = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("vec_binop (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__left,&__pyx_n_s__right,&__pyx_n_s__op,0}; PyObject* values[3] = {0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__left)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__right)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("vec_binop", 1, 3, 3, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 690; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__op)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("vec_binop", 1, 3, 3, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 690; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "vec_binop") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 690; __pyx_clineno = __LINE__; goto __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_left = ((PyArrayObject *)values[0]); __pyx_v_right = ((PyArrayObject *)values[1]); __pyx_v_op = values[2]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("vec_binop", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 690; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.lib.vec_binop", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_left), __pyx_ptype_5numpy_ndarray, 1, "left", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 690; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_right), __pyx_ptype_5numpy_ndarray, 1, "right", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 690; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_3lib_60vec_binop(__pyx_self, __pyx_v_left, __pyx_v_right, __pyx_v_op); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/lib.pyx":690 * @cython.wraparound(False) * @cython.boundscheck(False) * def vec_binop(ndarray[object] left, ndarray[object] right, object op): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = len(left) */ static PyObject *__pyx_pf_6pandas_3lib_60vec_binop(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_left, PyArrayObject *__pyx_v_right, PyObject *__pyx_v_op) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_n; PyArrayObject *__pyx_v_result = 0; PyObject *__pyx_v_x = NULL; PyObject *__pyx_v_y = NULL; __Pyx_LocalBuf_ND __pyx_pybuffernd_left; __Pyx_Buffer __pyx_pybuffer_left; __Pyx_LocalBuf_ND __pyx_pybuffernd_result; __Pyx_Buffer __pyx_pybuffer_result; __Pyx_LocalBuf_ND __pyx_pybuffernd_right; __Pyx_Buffer __pyx_pybuffer_right; 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; 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; Py_ssize_t __pyx_t_15; PyObject **__pyx_t_16; Py_ssize_t __pyx_t_17; Py_ssize_t __pyx_t_18; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("vec_binop", 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_left.pybuffer.buf = NULL; __pyx_pybuffer_left.refcount = 0; __pyx_pybuffernd_left.data = NULL; __pyx_pybuffernd_left.rcbuffer = &__pyx_pybuffer_left; __pyx_pybuffer_right.pybuffer.buf = NULL; __pyx_pybuffer_right.refcount = 0; __pyx_pybuffernd_right.data = NULL; __pyx_pybuffernd_right.rcbuffer = &__pyx_pybuffer_right; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_left.rcbuffer->pybuffer, (PyObject*)__pyx_v_left, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 690; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_left.diminfo[0].strides = __pyx_pybuffernd_left.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_left.diminfo[0].shape = __pyx_pybuffernd_left.rcbuffer->pybuffer.shape[0]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_right.rcbuffer->pybuffer, (PyObject*)__pyx_v_right, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 690; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_right.diminfo[0].strides = __pyx_pybuffernd_right.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_right.diminfo[0].shape = __pyx_pybuffernd_right.rcbuffer->pybuffer.shape[0]; /* "pandas/lib.pyx":692 * def vec_binop(ndarray[object] left, ndarray[object] right, object op): * cdef: * Py_ssize_t i, n = len(left) # <<<<<<<<<<<<<< * ndarray[object] result * */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_left)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 692; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/lib.pyx":695 * ndarray[object] result * * if n != len(right): # <<<<<<<<<<<<<< * raise ValueError('Arrays were different lengths: %d vs %d' * % (n, len(right))) */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_right)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 695; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_2 = ((__pyx_v_n != __pyx_t_1) != 0); if (__pyx_t_2) { /* "pandas/lib.pyx":697 * if n != len(right): * raise ValueError('Arrays were different lengths: %d vs %d' * % (n, len(right))) # <<<<<<<<<<<<<< * * result = np.empty(n, dtype=object) */ __pyx_t_3 = PyInt_FromSsize_t(__pyx_v_n); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 697; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_right)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 697; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_4 = PyInt_FromSsize_t(__pyx_t_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 697; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 697; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_3 = 0; __pyx_t_4 = 0; __pyx_t_4 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_8), ((PyObject *)__pyx_t_5)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 697; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_4)); __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 696; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_t_4)); __Pyx_GIVEREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __pyx_t_4 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 696; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; __Pyx_Raise(__pyx_t_4, 0, 0, 0); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; {__pyx_filename = __pyx_f[2]; __pyx_lineno = 696; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L3; } __pyx_L3:; /* "pandas/lib.pyx":699 * % (n, len(right))) * * result = np.empty(n, dtype=object) # <<<<<<<<<<<<<< * * for i in range(n): */ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 699; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s__empty); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 699; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyInt_FromSsize_t(__pyx_v_n); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 699; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 699; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyDict_New(); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 699; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_4)); if (PyDict_SetItem(__pyx_t_4, ((PyObject *)__pyx_n_s__dtype), __pyx_builtin_object) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 699; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_6 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_3), ((PyObject *)__pyx_t_4)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 699; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 699; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_7 = ((PyArrayObject *)__pyx_t_6); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_object, 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_result.rcbuffer->pybuffer, (PyObject*)__pyx_v_result, &__Pyx_TypeInfo_object, 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_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_8 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 699; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_7 = 0; __pyx_v_result = ((PyArrayObject *)__pyx_t_6); __pyx_t_6 = 0; /* "pandas/lib.pyx":701 * result = np.empty(n, dtype=object) * * for i in range(n): # <<<<<<<<<<<<<< * x = left[i] * y = right[i] */ __pyx_t_1 = __pyx_v_n; for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_1; __pyx_t_12+=1) { __pyx_v_i = __pyx_t_12; /* "pandas/lib.pyx":702 * * for i in range(n): * x = left[i] # <<<<<<<<<<<<<< * y = right[i] * try: */ __pyx_t_13 = __pyx_v_i; __pyx_t_6 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_left.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_left.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_6); __Pyx_XDECREF_SET(__pyx_v_x, __pyx_t_6); __pyx_t_6 = 0; /* "pandas/lib.pyx":703 * for i in range(n): * x = left[i] * y = right[i] # <<<<<<<<<<<<<< * try: * result[i] = op(x, y) */ __pyx_t_14 = __pyx_v_i; __pyx_t_6 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_right.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_right.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_6); __Pyx_XDECREF_SET(__pyx_v_y, __pyx_t_6); __pyx_t_6 = 0; /* "pandas/lib.pyx":704 * x = left[i] * y = right[i] * try: # <<<<<<<<<<<<<< * result[i] = op(x, y) * except TypeError: */ { __Pyx_ExceptionSave(&__pyx_t_11, &__pyx_t_10, &__pyx_t_9); __Pyx_XGOTREF(__pyx_t_11); __Pyx_XGOTREF(__pyx_t_10); __Pyx_XGOTREF(__pyx_t_9); /*try:*/ { /* "pandas/lib.pyx":705 * y = right[i] * try: * result[i] = op(x, y) # <<<<<<<<<<<<<< * except TypeError: * if util._checknull(x): */ __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 705; __pyx_clineno = __LINE__; goto __pyx_L6_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(__pyx_v_x); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_x); __Pyx_GIVEREF(__pyx_v_x); __Pyx_INCREF(__pyx_v_y); PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_v_y); __Pyx_GIVEREF(__pyx_v_y); __pyx_t_4 = PyObject_Call(__pyx_v_op, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 705; __pyx_clineno = __LINE__; goto __pyx_L6_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0; __pyx_t_15 = __pyx_v_i; __pyx_t_16 = __Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_result.diminfo[0].strides); __Pyx_GOTREF(*__pyx_t_16); __Pyx_INCREF(__pyx_t_4); __Pyx_DECREF(*__pyx_t_16); *__pyx_t_16 = __pyx_t_4; __Pyx_GIVEREF(*__pyx_t_16); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; goto __pyx_L13_try_end; __pyx_L6_error:; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; /* "pandas/lib.pyx":706 * try: * result[i] = op(x, y) * except TypeError: # <<<<<<<<<<<<<< * if util._checknull(x): * result[i] = x */ __pyx_t_8 = PyErr_ExceptionMatches(__pyx_builtin_TypeError); if (__pyx_t_8) { __Pyx_AddTraceback("pandas.lib.vec_binop", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_6, &__pyx_t_3) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 706; __pyx_clineno = __LINE__; goto __pyx_L8_except_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_GOTREF(__pyx_t_6); __Pyx_GOTREF(__pyx_t_3); /* "pandas/lib.pyx":707 * result[i] = op(x, y) * except TypeError: * if util._checknull(x): # <<<<<<<<<<<<<< * result[i] = x * elif util._checknull(y): */ __pyx_t_2 = (__pyx_f_4util__checknull(__pyx_v_x) != 0); if (__pyx_t_2) { /* "pandas/lib.pyx":708 * except TypeError: * if util._checknull(x): * result[i] = x # <<<<<<<<<<<<<< * elif util._checknull(y): * result[i] = y */ __pyx_t_17 = __pyx_v_i; __pyx_t_16 = __Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_result.diminfo[0].strides); __Pyx_GOTREF(*__pyx_t_16); __Pyx_INCREF(__pyx_v_x); __Pyx_DECREF(*__pyx_t_16); *__pyx_t_16 = __pyx_v_x; __Pyx_GIVEREF(*__pyx_t_16); goto __pyx_L16; } /* "pandas/lib.pyx":709 * if util._checknull(x): * result[i] = x * elif util._checknull(y): # <<<<<<<<<<<<<< * result[i] = y * else: */ __pyx_t_2 = (__pyx_f_4util__checknull(__pyx_v_y) != 0); if (__pyx_t_2) { /* "pandas/lib.pyx":710 * result[i] = x * elif util._checknull(y): * result[i] = y # <<<<<<<<<<<<<< * else: * raise */ __pyx_t_18 = __pyx_v_i; __pyx_t_16 = __Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_result.diminfo[0].strides); __Pyx_GOTREF(*__pyx_t_16); __Pyx_INCREF(__pyx_v_y); __Pyx_DECREF(*__pyx_t_16); *__pyx_t_16 = __pyx_v_y; __Pyx_GIVEREF(*__pyx_t_16); goto __pyx_L16; } /*else*/ { /* "pandas/lib.pyx":712 * result[i] = y * else: * raise # <<<<<<<<<<<<<< * * return maybe_convert_bool(result) */ __Pyx_GIVEREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_3); __Pyx_ErrRestore(__pyx_t_4, __pyx_t_6, __pyx_t_3); __pyx_t_4 = 0; __pyx_t_6 = 0; __pyx_t_3 = 0; {__pyx_filename = __pyx_f[2]; __pyx_lineno = 712; __pyx_clineno = __LINE__; goto __pyx_L8_except_error;} } __pyx_L16:; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L7_exception_handled; } __pyx_L8_except_error:; __Pyx_XGIVEREF(__pyx_t_11); __Pyx_XGIVEREF(__pyx_t_10); __Pyx_XGIVEREF(__pyx_t_9); __Pyx_ExceptionReset(__pyx_t_11, __pyx_t_10, __pyx_t_9); goto __pyx_L1_error; __pyx_L7_exception_handled:; __Pyx_XGIVEREF(__pyx_t_11); __Pyx_XGIVEREF(__pyx_t_10); __Pyx_XGIVEREF(__pyx_t_9); __Pyx_ExceptionReset(__pyx_t_11, __pyx_t_10, __pyx_t_9); __pyx_L13_try_end:; } } /* "pandas/lib.pyx":714 * raise * * return maybe_convert_bool(result) # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s__maybe_convert_bool); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 714; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 714; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(((PyObject *)__pyx_v_result)); PyTuple_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_v_result)); __Pyx_GIVEREF(((PyObject *)__pyx_v_result)); __pyx_t_4 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 714; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0; __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_left.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_right.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.lib.vec_binop", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_left.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_right.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_result); __Pyx_XDECREF(__pyx_v_x); __Pyx_XDECREF(__pyx_v_y); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_3lib_63astype_intsafe(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_3lib_63astype_intsafe = {__Pyx_NAMESTR("astype_intsafe"), (PyCFunction)__pyx_pw_6pandas_3lib_63astype_intsafe, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_3lib_63astype_intsafe(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_arr = 0; PyObject *__pyx_v_new_dtype = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("astype_intsafe (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__arr,&__pyx_n_s__new_dtype,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__arr)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__new_dtype)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("astype_intsafe", 1, 2, 2, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 717; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "astype_intsafe") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 717; __pyx_clineno = __LINE__; goto __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_new_dtype = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("astype_intsafe", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 717; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.lib.astype_intsafe", __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_filename = __pyx_f[2]; __pyx_lineno = 717; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_3lib_62astype_intsafe(__pyx_self, __pyx_v_arr, __pyx_v_new_dtype); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/lib.pyx":717 * * * def astype_intsafe(ndarray[object] arr, new_dtype): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = len(arr) */ static PyObject *__pyx_pf_6pandas_3lib_62astype_intsafe(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_arr, PyObject *__pyx_v_new_dtype) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_n; PyObject *__pyx_v_v = 0; int __pyx_v_is_datelike; PyArrayObject *__pyx_v_result = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_arr; __Pyx_Buffer __pyx_pybuffer_arr; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_t_4; int __pyx_t_5; int __pyx_t_6; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; Py_ssize_t __pyx_t_9; Py_ssize_t __pyx_t_10; int __pyx_t_11; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("astype_intsafe", 0); __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_filename = __pyx_f[2]; __pyx_lineno = 717; __pyx_clineno = __LINE__; goto __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/lib.pyx":719 * def astype_intsafe(ndarray[object] arr, new_dtype): * cdef: * Py_ssize_t i, n = len(arr) # <<<<<<<<<<<<<< * object v * bint is_datelike */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_arr)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 719; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/lib.pyx":725 * * # on 32-bit, 1.6.2 numpy M8[ns] is a subdtype of integer, which is weird * is_datelike = new_dtype in ['M8[ns]','m8[ns]'] # <<<<<<<<<<<<<< * * result = np.empty(n, dtype=new_dtype) */ __Pyx_INCREF(__pyx_v_new_dtype); __pyx_t_2 = __pyx_v_new_dtype; __pyx_t_3 = PyObject_RichCompare(__pyx_t_2, ((PyObject *)__pyx_kp_s_10), Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 725; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 725; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (!((int)__pyx_t_4)) { __pyx_t_3 = PyObject_RichCompare(__pyx_t_2, ((PyObject *)__pyx_kp_s_11), Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 725; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 725; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_6 = ((int)__pyx_t_5); } else { __pyx_t_6 = ((int)__pyx_t_4); } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_is_datelike = __pyx_t_6; /* "pandas/lib.pyx":727 * is_datelike = new_dtype in ['M8[ns]','m8[ns]'] * * result = np.empty(n, dtype=new_dtype) # <<<<<<<<<<<<<< * for i in range(n): * v = arr[i] */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 727; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 727; __pyx_clineno = __LINE__; goto __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_n); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 727; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 727; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 727; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_2)); if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__dtype), __pyx_v_new_dtype) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 727; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_8 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_7), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 727; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; if (!(likely(((__pyx_t_8) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_8, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 727; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_result = ((PyArrayObject *)__pyx_t_8); __pyx_t_8 = 0; /* "pandas/lib.pyx":728 * * result = np.empty(n, dtype=new_dtype) * for i in range(n): # <<<<<<<<<<<<<< * v = arr[i] * if is_datelike and checknull(v): */ __pyx_t_1 = __pyx_v_n; for (__pyx_t_9 = 0; __pyx_t_9 < __pyx_t_1; __pyx_t_9+=1) { __pyx_v_i = __pyx_t_9; /* "pandas/lib.pyx":729 * result = np.empty(n, dtype=new_dtype) * for i in range(n): * v = arr[i] # <<<<<<<<<<<<<< * if is_datelike and checknull(v): * result[i] = NPY_NAT */ __pyx_t_10 = __pyx_v_i; __pyx_t_11 = -1; if (__pyx_t_10 < 0) { __pyx_t_10 += __pyx_pybuffernd_arr.diminfo[0].shape; if (unlikely(__pyx_t_10 < 0)) __pyx_t_11 = 0; } else if (unlikely(__pyx_t_10 >= __pyx_pybuffernd_arr.diminfo[0].shape)) __pyx_t_11 = 0; if (unlikely(__pyx_t_11 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_11); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 729; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_8 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_arr.rcbuffer->pybuffer.buf, __pyx_t_10, __pyx_pybuffernd_arr.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_8); __Pyx_XDECREF_SET(__pyx_v_v, __pyx_t_8); __pyx_t_8 = 0; /* "pandas/lib.pyx":730 * for i in range(n): * v = arr[i] * if is_datelike and checknull(v): # <<<<<<<<<<<<<< * result[i] = NPY_NAT * else: */ __pyx_t_6 = __pyx_v_is_datelike; if (__pyx_t_6) { __pyx_t_8 = __pyx_f_6pandas_3lib_checknull(__pyx_v_v, 0); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 730; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 730; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_5 = __pyx_t_4; } else { __pyx_t_5 = __pyx_t_6; } if (__pyx_t_5) { /* "pandas/lib.pyx":731 * v = arr[i] * if is_datelike and checknull(v): * result[i] = NPY_NAT # <<<<<<<<<<<<<< * else: * util.set_value_at(result, i, v) */ __pyx_t_8 = __Pyx_PyInt_to_py_npy_int64(__pyx_v_6pandas_3lib_NPY_NAT); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 731; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); if (__Pyx_SetItemInt(((PyObject *)__pyx_v_result), __pyx_v_i, __pyx_t_8, sizeof(Py_ssize_t), PyInt_FromSsize_t, 0, 1, 1) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 731; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; goto __pyx_L5; } /*else*/ { /* "pandas/lib.pyx":733 * result[i] = NPY_NAT * else: * util.set_value_at(result, i, v) # <<<<<<<<<<<<<< * * return result */ __pyx_t_8 = PyInt_FromSsize_t(__pyx_v_i); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 733; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_2 = __pyx_f_4util_set_value_at(__pyx_v_result, __pyx_t_8, __pyx_v_v); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 733; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } __pyx_L5:; } /* "pandas/lib.pyx":735 * util.set_value_at(result, i, v) * * return result # <<<<<<<<<<<<<< * * cpdef ndarray[object] astype_str(ndarray arr): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_result)); __pyx_r = ((PyObject *)__pyx_v_result); goto __pyx_L0; __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_7); __Pyx_XDECREF(__pyx_t_8); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_arr.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.lib.astype_intsafe", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_arr.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF(__pyx_v_v); __Pyx_XDECREF((PyObject *)__pyx_v_result); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/lib.pyx":737 * return result * * cpdef ndarray[object] astype_str(ndarray arr): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = arr.size */ static PyObject *__pyx_pw_6pandas_3lib_65astype_str(PyObject *__pyx_self, PyObject *__pyx_v_arr); /*proto*/ static PyArrayObject *__pyx_f_6pandas_3lib_astype_str(PyArrayObject *__pyx_v_arr, CYTHON_UNUSED int __pyx_skip_dispatch) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_n; PyArrayObject *__pyx_v_result = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_result; __Pyx_Buffer __pyx_pybuffer_result; PyArrayObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; Py_ssize_t __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyArrayObject *__pyx_t_6 = NULL; Py_ssize_t __pyx_t_7; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("astype_str", 0); __pyx_pybuffer_result.pybuffer.buf = NULL; __pyx_pybuffer_result.refcount = 0; __pyx_pybuffernd_result.data = NULL; __pyx_pybuffernd_result.rcbuffer = &__pyx_pybuffer_result; /* "pandas/lib.pyx":739 * cpdef ndarray[object] astype_str(ndarray arr): * cdef: * Py_ssize_t i, n = arr.size # <<<<<<<<<<<<<< * ndarray[object] result = np.empty(n, dtype=object) * */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_arr), __pyx_n_s__size); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 739; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyIndex_AsSsize_t(__pyx_t_1); if (unlikely((__pyx_t_2 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 739; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_n = __pyx_t_2; /* "pandas/lib.pyx":740 * cdef: * Py_ssize_t i, n = arr.size * ndarray[object] result = np.empty(n, dtype=object) # <<<<<<<<<<<<<< * * for i in range(n): */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 740; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s__empty); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 740; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_n); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 740; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 740; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 740; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_1)); if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__dtype), __pyx_builtin_object) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 740; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_5 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 740; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __Pyx_DECREF(((PyObject *)__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_filename = __pyx_f[2]; __pyx_lineno = 740; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_6 = ((PyArrayObject *)__pyx_t_5); { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { __pyx_v_result = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_result.rcbuffer->pybuffer.buf = NULL; {__pyx_filename = __pyx_f[2]; __pyx_lineno = 740; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } else {__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]; } } __pyx_t_6 = 0; __pyx_v_result = ((PyArrayObject *)__pyx_t_5); __pyx_t_5 = 0; /* "pandas/lib.pyx":742 * ndarray[object] result = np.empty(n, dtype=object) * * for i in range(n): # <<<<<<<<<<<<<< * util.set_value_at(result, i, str(arr[i])) * */ __pyx_t_2 = __pyx_v_n; for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_2; __pyx_t_7+=1) { __pyx_v_i = __pyx_t_7; /* "pandas/lib.pyx":743 * * for i in range(n): * util.set_value_at(result, i, str(arr[i])) # <<<<<<<<<<<<<< * * return result */ __pyx_t_5 = PyInt_FromSsize_t(__pyx_v_i); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 743; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_1 = __Pyx_GetItemInt(((PyObject *)__pyx_v_arr), __pyx_v_i, sizeof(Py_ssize_t), PyInt_FromSsize_t, 0, 1, 1); if (!__pyx_t_1) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 743; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 743; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 743; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __pyx_t_4 = __pyx_f_4util_set_value_at(((PyArrayObject *)__pyx_v_result), __pyx_t_5, __pyx_t_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 743; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } /* "pandas/lib.pyx":745 * util.set_value_at(result, i, str(arr[i])) * * return result # <<<<<<<<<<<<<< * * def clean_index_list(list obj): */ __Pyx_XDECREF(((PyObject *)__pyx_r)); __Pyx_INCREF(((PyObject *)__pyx_v_result)); __pyx_r = ((PyArrayObject *)__pyx_v_result); goto __pyx_L0; __pyx_r = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.lib.astype_str", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_result); __Pyx_XGIVEREF((PyObject *)__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_3lib_65astype_str(PyObject *__pyx_self, PyObject *__pyx_v_arr); /*proto*/ static PyObject *__pyx_pw_6pandas_3lib_65astype_str(PyObject *__pyx_self, PyObject *__pyx_v_arr) { CYTHON_UNUSED int __pyx_lineno = 0; CYTHON_UNUSED const char *__pyx_filename = NULL; CYTHON_UNUSED int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("astype_str (wrapper)", 0); if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_arr), __pyx_ptype_5numpy_ndarray, 1, "arr", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 737; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_3lib_64astype_str(__pyx_self, ((PyArrayObject *)__pyx_v_arr)); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/lib.pyx":737 * return result * * cpdef ndarray[object] astype_str(ndarray arr): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = arr.size */ static PyObject *__pyx_pf_6pandas_3lib_64astype_str(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_arr) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("astype_str", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = ((PyObject *)__pyx_f_6pandas_3lib_astype_str(__pyx_v_arr, 0)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 737; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas.lib.astype_str", __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_3lib_67clean_index_list(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/ static char __pyx_doc_6pandas_3lib_66clean_index_list[] = "\n Utility used in pandas.core.index._ensure_index\n "; static PyMethodDef __pyx_mdef_6pandas_3lib_67clean_index_list = {__Pyx_NAMESTR("clean_index_list"), (PyCFunction)__pyx_pw_6pandas_3lib_67clean_index_list, METH_O, __Pyx_DOCSTR(__pyx_doc_6pandas_3lib_66clean_index_list)}; static PyObject *__pyx_pw_6pandas_3lib_67clean_index_list(PyObject *__pyx_self, PyObject *__pyx_v_obj) { CYTHON_UNUSED int __pyx_lineno = 0; CYTHON_UNUSED const char *__pyx_filename = NULL; CYTHON_UNUSED int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("clean_index_list (wrapper)", 0); if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_obj), (&PyList_Type), 1, "obj", 1))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 747; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_3lib_66clean_index_list(__pyx_self, ((PyObject*)__pyx_v_obj)); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/lib.pyx":747 * return result * * def clean_index_list(list obj): # <<<<<<<<<<<<<< * ''' * Utility used in pandas.core.index._ensure_index */ static PyObject *__pyx_pf_6pandas_3lib_66clean_index_list(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) { PyArrayObject *__pyx_v_converted = 0; Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_n; PyObject *__pyx_v_v = 0; int __pyx_v_all_arrays; __Pyx_LocalBuf_ND __pyx_pybuffernd_converted; __Pyx_Buffer __pyx_pybuffer_converted; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; Py_ssize_t __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; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; PyArrayObject *__pyx_t_10 = NULL; int __pyx_t_11; PyObject *__pyx_t_12 = NULL; PyObject *__pyx_t_13 = NULL; PyObject *__pyx_t_14 = NULL; Py_ssize_t __pyx_t_15; PyObject **__pyx_t_16; Py_ssize_t __pyx_t_17; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("clean_index_list", 0); __pyx_pybuffer_converted.pybuffer.buf = NULL; __pyx_pybuffer_converted.refcount = 0; __pyx_pybuffernd_converted.data = NULL; __pyx_pybuffernd_converted.rcbuffer = &__pyx_pybuffer_converted; /* "pandas/lib.pyx":753 * cdef: * ndarray[object] converted * Py_ssize_t i, n = len(obj) # <<<<<<<<<<<<<< * object v * bint all_arrays = 1 */ if (unlikely(((PyObject *)__pyx_v_obj) == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 753; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_1 = PyList_GET_SIZE(((PyObject *)__pyx_v_obj)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 753; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/lib.pyx":755 * Py_ssize_t i, n = len(obj) * object v * bint all_arrays = 1 # <<<<<<<<<<<<<< * * for i in range(n): */ __pyx_v_all_arrays = 1; /* "pandas/lib.pyx":757 * bint all_arrays = 1 * * for i in range(n): # <<<<<<<<<<<<<< * v = obj[i] * if not (PyList_Check(v) or np.PyArray_Check(v)): */ __pyx_t_1 = __pyx_v_n; for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) { __pyx_v_i = __pyx_t_2; /* "pandas/lib.pyx":758 * * for i in range(n): * v = obj[i] # <<<<<<<<<<<<<< * if not (PyList_Check(v) or np.PyArray_Check(v)): * all_arrays = 0 */ if (unlikely(((PyObject *)__pyx_v_obj) == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 758; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_3 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_obj), __pyx_v_i, sizeof(Py_ssize_t), PyInt_FromSsize_t, 1, 1, 1); if (!__pyx_t_3) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 758; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_XDECREF_SET(__pyx_v_v, __pyx_t_3); __pyx_t_3 = 0; /* "pandas/lib.pyx":759 * for i in range(n): * v = obj[i] * if not (PyList_Check(v) or np.PyArray_Check(v)): # <<<<<<<<<<<<<< * all_arrays = 0 * break */ __pyx_t_4 = (PyList_Check(__pyx_v_v) != 0); if (!__pyx_t_4) { __pyx_t_5 = (PyArray_Check(__pyx_v_v) != 0); __pyx_t_6 = __pyx_t_5; } else { __pyx_t_6 = __pyx_t_4; } __pyx_t_4 = ((!__pyx_t_6) != 0); if (__pyx_t_4) { /* "pandas/lib.pyx":760 * v = obj[i] * if not (PyList_Check(v) or np.PyArray_Check(v)): * all_arrays = 0 # <<<<<<<<<<<<<< * break * */ __pyx_v_all_arrays = 0; /* "pandas/lib.pyx":761 * if not (PyList_Check(v) or np.PyArray_Check(v)): * all_arrays = 0 * break # <<<<<<<<<<<<<< * * if all_arrays: */ goto __pyx_L4_break; goto __pyx_L5; } __pyx_L5:; } __pyx_L4_break:; /* "pandas/lib.pyx":763 * break * * if all_arrays: # <<<<<<<<<<<<<< * return obj, all_arrays * */ __pyx_t_4 = (__pyx_v_all_arrays != 0); if (__pyx_t_4) { /* "pandas/lib.pyx":764 * * if all_arrays: * return obj, all_arrays # <<<<<<<<<<<<<< * * converted = np.empty(n, dtype=object) */ __Pyx_XDECREF(__pyx_r); __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_all_arrays); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 764; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 764; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_INCREF(((PyObject *)__pyx_v_obj)); PyTuple_SET_ITEM(__pyx_t_7, 0, ((PyObject *)__pyx_v_obj)); __Pyx_GIVEREF(((PyObject *)__pyx_v_obj)); PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_r = ((PyObject *)__pyx_t_7); __pyx_t_7 = 0; goto __pyx_L0; goto __pyx_L6; } __pyx_L6:; /* "pandas/lib.pyx":766 * return obj, all_arrays * * converted = np.empty(n, dtype=object) # <<<<<<<<<<<<<< * for i in range(n): * v = obj[i] */ __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 766; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s__empty); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 766; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_7 = PyInt_FromSsize_t(__pyx_v_n); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 766; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 766; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_7); __Pyx_GIVEREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_7 = PyDict_New(); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 766; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_7)); if (PyDict_SetItem(__pyx_t_7, ((PyObject *)__pyx_n_s__dtype), __pyx_builtin_object) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 766; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_9 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_8), ((PyObject *)__pyx_t_7)); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 766; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0; if (!(likely(((__pyx_t_9) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_9, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 766; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_10 = ((PyArrayObject *)__pyx_t_9); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_converted.rcbuffer->pybuffer); __pyx_t_11 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_converted.rcbuffer->pybuffer, (PyObject*)__pyx_t_10, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_11 < 0)) { PyErr_Fetch(&__pyx_t_12, &__pyx_t_13, &__pyx_t_14); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_converted.rcbuffer->pybuffer, (PyObject*)__pyx_v_converted, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_12); Py_XDECREF(__pyx_t_13); Py_XDECREF(__pyx_t_14); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_12, __pyx_t_13, __pyx_t_14); } } __pyx_pybuffernd_converted.diminfo[0].strides = __pyx_pybuffernd_converted.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_converted.diminfo[0].shape = __pyx_pybuffernd_converted.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_11 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 766; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_10 = 0; __pyx_v_converted = ((PyArrayObject *)__pyx_t_9); __pyx_t_9 = 0; /* "pandas/lib.pyx":767 * * converted = np.empty(n, dtype=object) * for i in range(n): # <<<<<<<<<<<<<< * v = obj[i] * if PyList_Check(v) or np.PyArray_Check(v): */ __pyx_t_1 = __pyx_v_n; for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) { __pyx_v_i = __pyx_t_2; /* "pandas/lib.pyx":768 * converted = np.empty(n, dtype=object) * for i in range(n): * v = obj[i] # <<<<<<<<<<<<<< * if PyList_Check(v) or np.PyArray_Check(v): * converted[i] = tuple(v) */ if (unlikely(((PyObject *)__pyx_v_obj) == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 768; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_9 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_obj), __pyx_v_i, sizeof(Py_ssize_t), PyInt_FromSsize_t, 1, 1, 1); if (!__pyx_t_9) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 768; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_XDECREF_SET(__pyx_v_v, __pyx_t_9); __pyx_t_9 = 0; /* "pandas/lib.pyx":769 * for i in range(n): * v = obj[i] * if PyList_Check(v) or np.PyArray_Check(v): # <<<<<<<<<<<<<< * converted[i] = tuple(v) * else: */ __pyx_t_4 = (PyList_Check(__pyx_v_v) != 0); if (!__pyx_t_4) { __pyx_t_6 = (PyArray_Check(__pyx_v_v) != 0); __pyx_t_5 = __pyx_t_6; } else { __pyx_t_5 = __pyx_t_4; } if (__pyx_t_5) { /* "pandas/lib.pyx":770 * v = obj[i] * if PyList_Check(v) or np.PyArray_Check(v): * converted[i] = tuple(v) # <<<<<<<<<<<<<< * else: * converted[i] = v */ __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 770; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_INCREF(__pyx_v_v); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_v_v); __Pyx_GIVEREF(__pyx_v_v); __pyx_t_7 = PyObject_Call(((PyObject *)((PyObject*)(&PyTuple_Type))), ((PyObject *)__pyx_t_9), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 770; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(((PyObject *)__pyx_t_9)); __pyx_t_9 = 0; __pyx_t_15 = __pyx_v_i; __pyx_t_11 = -1; if (__pyx_t_15 < 0) { __pyx_t_15 += __pyx_pybuffernd_converted.diminfo[0].shape; if (unlikely(__pyx_t_15 < 0)) __pyx_t_11 = 0; } else if (unlikely(__pyx_t_15 >= __pyx_pybuffernd_converted.diminfo[0].shape)) __pyx_t_11 = 0; if (unlikely(__pyx_t_11 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_11); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 770; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_16 = __Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_converted.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_converted.diminfo[0].strides); __Pyx_GOTREF(*__pyx_t_16); __Pyx_INCREF(__pyx_t_7); __Pyx_DECREF(*__pyx_t_16); *__pyx_t_16 = __pyx_t_7; __Pyx_GIVEREF(*__pyx_t_16); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; goto __pyx_L9; } /*else*/ { /* "pandas/lib.pyx":772 * converted[i] = tuple(v) * else: * converted[i] = v # <<<<<<<<<<<<<< * * return maybe_convert_objects(converted), 0 */ __pyx_t_17 = __pyx_v_i; __pyx_t_11 = -1; if (__pyx_t_17 < 0) { __pyx_t_17 += __pyx_pybuffernd_converted.diminfo[0].shape; if (unlikely(__pyx_t_17 < 0)) __pyx_t_11 = 0; } else if (unlikely(__pyx_t_17 >= __pyx_pybuffernd_converted.diminfo[0].shape)) __pyx_t_11 = 0; if (unlikely(__pyx_t_11 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_11); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 772; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_16 = __Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_converted.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_converted.diminfo[0].strides); __Pyx_GOTREF(*__pyx_t_16); __Pyx_INCREF(__pyx_v_v); __Pyx_DECREF(*__pyx_t_16); *__pyx_t_16 = __pyx_v_v; __Pyx_GIVEREF(*__pyx_t_16); } __pyx_L9:; } /* "pandas/lib.pyx":774 * converted[i] = v * * return maybe_convert_objects(converted), 0 # <<<<<<<<<<<<<< * * @cython.boundscheck(False) */ __Pyx_XDECREF(__pyx_r); __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_12); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 774; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 774; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_INCREF(((PyObject *)__pyx_v_converted)); PyTuple_SET_ITEM(__pyx_t_9, 0, ((PyObject *)__pyx_v_converted)); __Pyx_GIVEREF(((PyObject *)__pyx_v_converted)); __pyx_t_8 = PyObject_Call(__pyx_t_7, ((PyObject *)__pyx_t_9), NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 774; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_9)); __pyx_t_9 = 0; __pyx_t_9 = PyTuple_New(2); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 774; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_8); __Pyx_GIVEREF(__pyx_t_8); __Pyx_INCREF(__pyx_int_0); PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_int_0); __Pyx_GIVEREF(__pyx_int_0); __pyx_t_8 = 0; __pyx_r = ((PyObject *)__pyx_t_9); __pyx_t_9 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_converted.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.lib.clean_index_list", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_converted.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_converted); __Pyx_XDECREF(__pyx_v_v); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_3lib_69max_len_string_array(PyObject *__pyx_self, PyObject *__pyx_v_arr); /*proto*/ static char __pyx_doc_6pandas_3lib_68max_len_string_array[] = " return the maximum size of elements in a 1-dim string array "; static PyMethodDef __pyx_mdef_6pandas_3lib_69max_len_string_array = {__Pyx_NAMESTR("max_len_string_array"), (PyCFunction)__pyx_pw_6pandas_3lib_69max_len_string_array, METH_O, __Pyx_DOCSTR(__pyx_doc_6pandas_3lib_68max_len_string_array)}; static PyObject *__pyx_pw_6pandas_3lib_69max_len_string_array(PyObject *__pyx_self, PyObject *__pyx_v_arr) { CYTHON_UNUSED int __pyx_lineno = 0; CYTHON_UNUSED const char *__pyx_filename = NULL; CYTHON_UNUSED int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("max_len_string_array (wrapper)", 0); if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_arr), __pyx_ptype_5numpy_ndarray, 1, "arr", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 778; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_3lib_68max_len_string_array(__pyx_self, ((PyArrayObject *)__pyx_v_arr)); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/lib.pyx":778 * @cython.boundscheck(False) * @cython.wraparound(False) * def max_len_string_array(ndarray[object, ndim=1] arr): # <<<<<<<<<<<<<< * """ return the maximum size of elements in a 1-dim string array """ * cdef: */ static PyObject *__pyx_pf_6pandas_3lib_68max_len_string_array(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_arr) { int __pyx_v_i; int __pyx_v_m; int __pyx_v_l; PyObject *__pyx_v_length = 0; PyObject *__pyx_v_v = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_arr; __Pyx_Buffer __pyx_pybuffer_arr; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; int __pyx_t_3; int __pyx_t_4; int __pyx_t_5; int __pyx_t_6; Py_ssize_t __pyx_t_7; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("max_len_string_array", 0); __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_filename = __pyx_f[2]; __pyx_lineno = 778; __pyx_clineno = __LINE__; goto __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/lib.pyx":782 * cdef: * int i, m, l * length = arr.shape[0] # <<<<<<<<<<<<<< * object v * */ __pyx_t_1 = __Pyx_PyInt_to_py_Py_intptr_t((__pyx_v_arr->dimensions[0])); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 782; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_v_length = __pyx_t_1; __pyx_t_1 = 0; /* "pandas/lib.pyx":785 * object v * * m = 0 # <<<<<<<<<<<<<< * for i from 0 <= i < length: * v = arr[i] */ __pyx_v_m = 0; /* "pandas/lib.pyx":786 * * m = 0 * for i from 0 <= i < length: # <<<<<<<<<<<<<< * v = arr[i] * if PyString_Check(v) or PyBytes_Check(v): */ __pyx_t_2 = __Pyx_PyInt_AsInt(__pyx_v_length); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 786; __pyx_clineno = __LINE__; goto __pyx_L1_error;} for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_2; __pyx_v_i++) { /* "pandas/lib.pyx":787 * m = 0 * for i from 0 <= i < length: * v = arr[i] # <<<<<<<<<<<<<< * if PyString_Check(v) or PyBytes_Check(v): * l = len(v) */ __pyx_t_3 = __pyx_v_i; __pyx_t_1 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_arr.rcbuffer->pybuffer.buf, __pyx_t_3, __pyx_pybuffernd_arr.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_1); __Pyx_XDECREF_SET(__pyx_v_v, __pyx_t_1); __pyx_t_1 = 0; /* "pandas/lib.pyx":788 * for i from 0 <= i < length: * v = arr[i] * if PyString_Check(v) or PyBytes_Check(v): # <<<<<<<<<<<<<< * l = len(v) * */ __pyx_t_4 = (PyString_Check(__pyx_v_v) != 0); if (!__pyx_t_4) { __pyx_t_5 = (PyBytes_Check(__pyx_v_v) != 0); __pyx_t_6 = __pyx_t_5; } else { __pyx_t_6 = __pyx_t_4; } if (__pyx_t_6) { /* "pandas/lib.pyx":789 * v = arr[i] * if PyString_Check(v) or PyBytes_Check(v): * l = len(v) # <<<<<<<<<<<<<< * * if l > m: */ __pyx_t_7 = PyObject_Length(__pyx_v_v); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 789; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_l = __pyx_t_7; /* "pandas/lib.pyx":791 * l = len(v) * * if l > m: # <<<<<<<<<<<<<< * m = l * */ __pyx_t_6 = ((__pyx_v_l > __pyx_v_m) != 0); if (__pyx_t_6) { /* "pandas/lib.pyx":792 * * if l > m: * m = l # <<<<<<<<<<<<<< * * return m */ __pyx_v_m = __pyx_v_l; goto __pyx_L6; } __pyx_L6:; goto __pyx_L5; } __pyx_L5:; } /* "pandas/lib.pyx":794 * m = l * * return m # <<<<<<<<<<<<<< * * @cython.boundscheck(False) */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyInt_FromLong(__pyx_v_m); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 794; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_arr.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.lib.max_len_string_array", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_arr.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF(__pyx_v_length); __Pyx_XDECREF(__pyx_v_v); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_3lib_71string_array_replace_from_nan_rep(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6pandas_3lib_70string_array_replace_from_nan_rep[] = " replace the values in the array with replacement if they are nan_rep; return the same array "; static PyMethodDef __pyx_mdef_6pandas_3lib_71string_array_replace_from_nan_rep = {__Pyx_NAMESTR("string_array_replace_from_nan_rep"), (PyCFunction)__pyx_pw_6pandas_3lib_71string_array_replace_from_nan_rep, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_3lib_70string_array_replace_from_nan_rep)}; static PyObject *__pyx_pw_6pandas_3lib_71string_array_replace_from_nan_rep(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_arr = 0; PyObject *__pyx_v_nan_rep = 0; PyObject *__pyx_v_replace = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("string_array_replace_from_nan_rep (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__arr,&__pyx_n_s__nan_rep,&__pyx_n_s__replace,0}; PyObject* values[3] = {0,0,0}; /* "pandas/lib.pyx":798 * @cython.boundscheck(False) * @cython.wraparound(False) * def string_array_replace_from_nan_rep(ndarray[object, ndim=1] arr, object nan_rep, object replace = None): # <<<<<<<<<<<<<< * """ replace the values in the array with replacement if they are nan_rep; return the same array """ * */ values[2] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__arr)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__nan_rep)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("string_array_replace_from_nan_rep", 0, 2, 3, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 798; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__replace); if (value) { values[2] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "string_array_replace_from_nan_rep") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 798; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_arr = ((PyArrayObject *)values[0]); __pyx_v_nan_rep = values[1]; __pyx_v_replace = values[2]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("string_array_replace_from_nan_rep", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 798; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.lib.string_array_replace_from_nan_rep", __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_filename = __pyx_f[2]; __pyx_lineno = 798; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_3lib_70string_array_replace_from_nan_rep(__pyx_self, __pyx_v_arr, __pyx_v_nan_rep, __pyx_v_replace); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_3lib_70string_array_replace_from_nan_rep(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_arr, PyObject *__pyx_v_nan_rep, PyObject *__pyx_v_replace) { int __pyx_v_length; int __pyx_v_i; __Pyx_LocalBuf_ND __pyx_pybuffernd_arr; __Pyx_Buffer __pyx_pybuffer_arr; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; int __pyx_t_5; int __pyx_t_6; int __pyx_t_7; PyObject **__pyx_t_8; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("string_array_replace_from_nan_rep", 0); __Pyx_INCREF(__pyx_v_replace); __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| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 798; __pyx_clineno = __LINE__; goto __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/lib.pyx":801 * """ replace the values in the array with replacement if they are nan_rep; return the same array """ * * cdef int length = arr.shape[0], i = 0 # <<<<<<<<<<<<<< * if replace is None: * replace = np.nan */ __pyx_v_length = (__pyx_v_arr->dimensions[0]); __pyx_v_i = 0; /* "pandas/lib.pyx":802 * * cdef int length = arr.shape[0], i = 0 * if replace is None: # <<<<<<<<<<<<<< * replace = np.nan * */ __pyx_t_1 = (__pyx_v_replace == Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { /* "pandas/lib.pyx":803 * cdef int length = arr.shape[0], i = 0 * if replace is None: * replace = np.nan # <<<<<<<<<<<<<< * * for i from 0 <= i < length: */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 803; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s__nan); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 803; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF_SET(__pyx_v_replace, __pyx_t_4); __pyx_t_4 = 0; goto __pyx_L3; } __pyx_L3:; /* "pandas/lib.pyx":805 * replace = np.nan * * for i from 0 <= i < length: # <<<<<<<<<<<<<< * if arr[i] == nan_rep: * arr[i] = replace */ __pyx_t_5 = __pyx_v_length; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_5; __pyx_v_i++) { /* "pandas/lib.pyx":806 * * for i from 0 <= i < length: * if arr[i] == nan_rep: # <<<<<<<<<<<<<< * arr[i] = replace * */ __pyx_t_6 = __pyx_v_i; __pyx_t_4 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_arr.rcbuffer->pybuffer.buf, __pyx_t_6, __pyx_pybuffernd_arr.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_4); __pyx_t_3 = PyObject_RichCompare(__pyx_t_4, __pyx_v_nan_rep, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 806; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 806; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_2) { /* "pandas/lib.pyx":807 * for i from 0 <= i < length: * if arr[i] == nan_rep: * arr[i] = replace # <<<<<<<<<<<<<< * * return arr */ __pyx_t_7 = __pyx_v_i; __pyx_t_8 = __Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_arr.rcbuffer->pybuffer.buf, __pyx_t_7, __pyx_pybuffernd_arr.diminfo[0].strides); __Pyx_GOTREF(*__pyx_t_8); __Pyx_INCREF(__pyx_v_replace); __Pyx_DECREF(*__pyx_t_8); *__pyx_t_8 = __pyx_v_replace; __Pyx_GIVEREF(*__pyx_t_8); goto __pyx_L6; } __pyx_L6:; } /* "pandas/lib.pyx":809 * arr[i] = replace * * return arr # <<<<<<<<<<<<<< * * @cython.boundscheck(False) */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_arr)); __pyx_r = ((PyObject *)__pyx_v_arr); goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_arr.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.lib.string_array_replace_from_nan_rep", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_arr.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF(__pyx_v_replace); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_3lib_73write_csv_rows(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_3lib_73write_csv_rows = {__Pyx_NAMESTR("write_csv_rows"), (PyCFunction)__pyx_pw_6pandas_3lib_73write_csv_rows, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_3lib_73write_csv_rows(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_data = 0; PyObject *__pyx_v_data_index = 0; int __pyx_v_nlevels; PyObject *__pyx_v_cols = 0; PyObject *__pyx_v_writer = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("write_csv_rows (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__data,&__pyx_n_s__data_index,&__pyx_n_s__nlevels,&__pyx_n_s__cols,&__pyx_n_s__writer,0}; PyObject* values[5] = {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 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__data)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__data_index)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("write_csv_rows", 1, 5, 5, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 813; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__nlevels)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("write_csv_rows", 1, 5, 5, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 813; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__cols)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("write_csv_rows", 1, 5, 5, 3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 813; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 4: if (likely((values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__writer)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("write_csv_rows", 1, 5, 5, 4); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 813; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "write_csv_rows") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 813; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 5) { 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); } __pyx_v_data = ((PyObject*)values[0]); __pyx_v_data_index = ((PyObject*)values[1]); __pyx_v_nlevels = __Pyx_PyInt_AsInt(values[2]); if (unlikely((__pyx_v_nlevels == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 813; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_cols = ((PyObject*)values[3]); __pyx_v_writer = values[4]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("write_csv_rows", 1, 5, 5, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 813; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.lib.write_csv_rows", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_data), (&PyList_Type), 1, "data", 1))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 813; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_data_index), (&PyList_Type), 1, "data_index", 1))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 813; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_cols), (&PyList_Type), 1, "cols", 1))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 813; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_3lib_72write_csv_rows(__pyx_self, __pyx_v_data, __pyx_v_data_index, __pyx_v_nlevels, __pyx_v_cols, __pyx_v_writer); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/lib.pyx":813 * @cython.boundscheck(False) * @cython.wraparound(False) * def write_csv_rows(list data, list data_index, int nlevels, list cols, object writer): # <<<<<<<<<<<<<< * * cdef int N, j, i, ncols */ static PyObject *__pyx_pf_6pandas_3lib_72write_csv_rows(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_data, PyObject *__pyx_v_data_index, int __pyx_v_nlevels, PyObject *__pyx_v_cols, PyObject *__pyx_v_writer) { int __pyx_v_N; int __pyx_v_j; int __pyx_v_i; int __pyx_v_ncols; PyObject *__pyx_v_rows = 0; PyObject *__pyx_v_row = NULL; CYTHON_UNUSED int __pyx_v_x; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; PyObject *__pyx_t_2 = NULL; int __pyx_t_3; int __pyx_t_4; PyObject *__pyx_t_5 = NULL; int __pyx_t_6; int __pyx_t_7; long __pyx_t_8; int __pyx_t_9; int __pyx_t_10; PyObject *__pyx_t_11 = NULL; int __pyx_t_12; int __pyx_t_13; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("write_csv_rows", 0); /* "pandas/lib.pyx":820 * * # In crude testing, N>100 yields little marginal improvement * N=100 # <<<<<<<<<<<<<< * * # pre-allocate rows */ __pyx_v_N = 100; /* "pandas/lib.pyx":823 * * # pre-allocate rows * ncols = len(cols) # <<<<<<<<<<<<<< * rows = [[None]*(nlevels+ncols) for x in range(N)] * */ if (unlikely(((PyObject *)__pyx_v_cols) == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 823; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_1 = PyList_GET_SIZE(((PyObject *)__pyx_v_cols)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 823; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_ncols = __pyx_t_1; /* "pandas/lib.pyx":824 * # pre-allocate rows * ncols = len(cols) * rows = [[None]*(nlevels+ncols) for x in range(N)] # <<<<<<<<<<<<<< * * j = -1 */ __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 824; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __pyx_v_N; for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) { __pyx_v_x = __pyx_t_4; __pyx_t_5 = PyList_New(1 * (((__pyx_v_nlevels + __pyx_v_ncols)<0) ? 0:(__pyx_v_nlevels + __pyx_v_ncols))); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 824; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (__pyx_v_nlevels + __pyx_v_ncols); __pyx_temp++) { __Pyx_INCREF(Py_None); PyList_SET_ITEM(__pyx_t_5, __pyx_temp, Py_None); __Pyx_GIVEREF(Py_None); } } if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_5))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 824; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; } __pyx_v_rows = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; /* "pandas/lib.pyx":826 * rows = [[None]*(nlevels+ncols) for x in range(N)] * * j = -1 # <<<<<<<<<<<<<< * if nlevels == 1: * for j in range(len(data_index)): */ __pyx_v_j = -1; /* "pandas/lib.pyx":827 * * j = -1 * if nlevels == 1: # <<<<<<<<<<<<<< * for j in range(len(data_index)): * row = rows[j % N] */ __pyx_t_6 = ((__pyx_v_nlevels == 1) != 0); if (__pyx_t_6) { /* "pandas/lib.pyx":828 * j = -1 * if nlevels == 1: * for j in range(len(data_index)): # <<<<<<<<<<<<<< * row = rows[j % N] * row[0] = data_index[j] */ if (unlikely(((PyObject *)__pyx_v_data_index) == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 828; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_1 = PyList_GET_SIZE(((PyObject *)__pyx_v_data_index)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 828; __pyx_clineno = __LINE__; goto __pyx_L1_error;} for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_1; __pyx_t_3+=1) { __pyx_v_j = __pyx_t_3; /* "pandas/lib.pyx":829 * if nlevels == 1: * for j in range(len(data_index)): * row = rows[j % N] # <<<<<<<<<<<<<< * row[0] = data_index[j] * for i in range(ncols): */ if (unlikely(__pyx_v_N == 0)) { #ifdef WITH_THREAD PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure(); #endif PyErr_Format(PyExc_ZeroDivisionError, "integer division or modulo by zero"); #ifdef WITH_THREAD PyGILState_Release(__pyx_gilstate_save); #endif {__pyx_filename = __pyx_f[2]; __pyx_lineno = 829; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_4 = __Pyx_mod_int(__pyx_v_j, __pyx_v_N); __pyx_t_2 = PyList_GET_ITEM(__pyx_v_rows, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __Pyx_XDECREF_SET(__pyx_v_row, __pyx_t_2); __pyx_t_2 = 0; /* "pandas/lib.pyx":830 * for j in range(len(data_index)): * row = rows[j % N] * row[0] = data_index[j] # <<<<<<<<<<<<<< * for i in range(ncols): * row[1+i] = data[i][j] */ if (unlikely(((PyObject *)__pyx_v_data_index) == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 830; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_2 = PyList_GET_ITEM(__pyx_v_data_index, __pyx_v_j); __Pyx_INCREF(__pyx_t_2); if (__Pyx_SetItemInt(__pyx_v_row, 0, __pyx_t_2, sizeof(long), PyInt_FromLong, 0, 0, 0) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 830; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/lib.pyx":831 * row = rows[j % N] * row[0] = data_index[j] * for i in range(ncols): # <<<<<<<<<<<<<< * row[1+i] = data[i][j] * */ __pyx_t_4 = __pyx_v_ncols; for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_4; __pyx_t_7+=1) { __pyx_v_i = __pyx_t_7; /* "pandas/lib.pyx":832 * row[0] = data_index[j] * for i in range(ncols): * row[1+i] = data[i][j] # <<<<<<<<<<<<<< * * if j >= N-1 and j % N == N-1: */ if (unlikely(((PyObject *)__pyx_v_data) == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 832; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_2 = __Pyx_GetItemInt(PyList_GET_ITEM(__pyx_v_data, __pyx_v_i), __pyx_v_j, sizeof(int), PyInt_FromLong, 0, 0, 0); if (!__pyx_t_2) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 832; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_8 = (1 + __pyx_v_i); if (__Pyx_SetItemInt(__pyx_v_row, __pyx_t_8, __pyx_t_2, sizeof(long), PyInt_FromLong, 0, 0, 0) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 832; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } /* "pandas/lib.pyx":834 * row[1+i] = data[i][j] * * if j >= N-1 and j % N == N-1: # <<<<<<<<<<<<<< * writer.writerows(rows) * elif nlevels > 1: */ __pyx_t_6 = ((__pyx_v_j >= (__pyx_v_N - 1)) != 0); if (__pyx_t_6) { if (unlikely(__pyx_v_N == 0)) { #ifdef WITH_THREAD PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure(); #endif PyErr_Format(PyExc_ZeroDivisionError, "integer division or modulo by zero"); #ifdef WITH_THREAD PyGILState_Release(__pyx_gilstate_save); #endif {__pyx_filename = __pyx_f[2]; __pyx_lineno = 834; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_9 = ((__Pyx_mod_int(__pyx_v_j, __pyx_v_N) == (__pyx_v_N - 1)) != 0); __pyx_t_10 = __pyx_t_9; } else { __pyx_t_10 = __pyx_t_6; } if (__pyx_t_10) { /* "pandas/lib.pyx":835 * * if j >= N-1 and j % N == N-1: * writer.writerows(rows) # <<<<<<<<<<<<<< * elif nlevels > 1: * for j in range(len(data_index)): */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_writer, __pyx_n_s__writerows); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 835; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 835; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(((PyObject *)__pyx_v_rows)); PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_v_rows)); __Pyx_GIVEREF(((PyObject *)__pyx_v_rows)); __pyx_t_11 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 835; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; goto __pyx_L10; } __pyx_L10:; } goto __pyx_L5; } /* "pandas/lib.pyx":836 * if j >= N-1 and j % N == N-1: * writer.writerows(rows) * elif nlevels > 1: # <<<<<<<<<<<<<< * for j in range(len(data_index)): * row = rows[j % N] */ __pyx_t_10 = ((__pyx_v_nlevels > 1) != 0); if (__pyx_t_10) { /* "pandas/lib.pyx":837 * writer.writerows(rows) * elif nlevels > 1: * for j in range(len(data_index)): # <<<<<<<<<<<<<< * row = rows[j % N] * row[:nlevels] = list(data_index[j]) */ if (unlikely(((PyObject *)__pyx_v_data_index) == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 837; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_1 = PyList_GET_SIZE(((PyObject *)__pyx_v_data_index)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 837; __pyx_clineno = __LINE__; goto __pyx_L1_error;} for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_1; __pyx_t_3+=1) { __pyx_v_j = __pyx_t_3; /* "pandas/lib.pyx":838 * elif nlevels > 1: * for j in range(len(data_index)): * row = rows[j % N] # <<<<<<<<<<<<<< * row[:nlevels] = list(data_index[j]) * for i in range(ncols): */ if (unlikely(__pyx_v_N == 0)) { #ifdef WITH_THREAD PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure(); #endif PyErr_Format(PyExc_ZeroDivisionError, "integer division or modulo by zero"); #ifdef WITH_THREAD PyGILState_Release(__pyx_gilstate_save); #endif {__pyx_filename = __pyx_f[2]; __pyx_lineno = 838; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_4 = __Pyx_mod_int(__pyx_v_j, __pyx_v_N); __pyx_t_11 = PyList_GET_ITEM(__pyx_v_rows, __pyx_t_4); __Pyx_INCREF(__pyx_t_11); __Pyx_XDECREF_SET(__pyx_v_row, __pyx_t_11); __pyx_t_11 = 0; /* "pandas/lib.pyx":839 * for j in range(len(data_index)): * row = rows[j % N] * row[:nlevels] = list(data_index[j]) # <<<<<<<<<<<<<< * for i in range(ncols): * row[nlevels+i] = data[i][j] */ if (unlikely(((PyObject *)__pyx_v_data_index) == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 839; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_11 = PyTuple_New(1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 839; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __Pyx_INCREF(PyList_GET_ITEM(__pyx_v_data_index, __pyx_v_j)); PyTuple_SET_ITEM(__pyx_t_11, 0, PyList_GET_ITEM(__pyx_v_data_index, __pyx_v_j)); __Pyx_GIVEREF(PyList_GET_ITEM(__pyx_v_data_index, __pyx_v_j)); __pyx_t_5 = PyObject_Call(((PyObject *)((PyObject*)(&PyList_Type))), ((PyObject *)__pyx_t_11), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 839; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(((PyObject *)__pyx_t_11)); __pyx_t_11 = 0; if (__Pyx_PyObject_SetSlice(__pyx_v_row, __pyx_t_5, 0, __pyx_v_nlevels, NULL, NULL, NULL, 0, 1, 0) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 839; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "pandas/lib.pyx":840 * row = rows[j % N] * row[:nlevels] = list(data_index[j]) * for i in range(ncols): # <<<<<<<<<<<<<< * row[nlevels+i] = data[i][j] * */ __pyx_t_4 = __pyx_v_ncols; for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_4; __pyx_t_7+=1) { __pyx_v_i = __pyx_t_7; /* "pandas/lib.pyx":841 * row[:nlevels] = list(data_index[j]) * for i in range(ncols): * row[nlevels+i] = data[i][j] # <<<<<<<<<<<<<< * * if j >= N-1 and j % N == N-1: */ if (unlikely(((PyObject *)__pyx_v_data) == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 841; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_5 = __Pyx_GetItemInt(PyList_GET_ITEM(__pyx_v_data, __pyx_v_i), __pyx_v_j, sizeof(int), PyInt_FromLong, 0, 0, 0); if (!__pyx_t_5) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 841; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_12 = (__pyx_v_nlevels + __pyx_v_i); if (__Pyx_SetItemInt(__pyx_v_row, __pyx_t_12, __pyx_t_5, sizeof(int), PyInt_FromLong, 0, 0, 0) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 841; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } /* "pandas/lib.pyx":843 * row[nlevels+i] = data[i][j] * * if j >= N-1 and j % N == N-1: # <<<<<<<<<<<<<< * writer.writerows(rows) * else: */ __pyx_t_10 = ((__pyx_v_j >= (__pyx_v_N - 1)) != 0); if (__pyx_t_10) { if (unlikely(__pyx_v_N == 0)) { #ifdef WITH_THREAD PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure(); #endif PyErr_Format(PyExc_ZeroDivisionError, "integer division or modulo by zero"); #ifdef WITH_THREAD PyGILState_Release(__pyx_gilstate_save); #endif {__pyx_filename = __pyx_f[2]; __pyx_lineno = 843; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_6 = ((__Pyx_mod_int(__pyx_v_j, __pyx_v_N) == (__pyx_v_N - 1)) != 0); __pyx_t_9 = __pyx_t_6; } else { __pyx_t_9 = __pyx_t_10; } if (__pyx_t_9) { /* "pandas/lib.pyx":844 * * if j >= N-1 and j % N == N-1: * writer.writerows(rows) # <<<<<<<<<<<<<< * else: * for j in range(len(data_index)): */ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_writer, __pyx_n_s__writerows); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 844; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_11 = PyTuple_New(1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 844; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __Pyx_INCREF(((PyObject *)__pyx_v_rows)); PyTuple_SET_ITEM(__pyx_t_11, 0, ((PyObject *)__pyx_v_rows)); __Pyx_GIVEREF(((PyObject *)__pyx_v_rows)); __pyx_t_2 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_11), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 844; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_11)); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; goto __pyx_L15; } __pyx_L15:; } goto __pyx_L5; } /*else*/ { /* "pandas/lib.pyx":846 * writer.writerows(rows) * else: * for j in range(len(data_index)): # <<<<<<<<<<<<<< * row = rows[j % N] * for i in range(ncols): */ if (unlikely(((PyObject *)__pyx_v_data_index) == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 846; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_1 = PyList_GET_SIZE(((PyObject *)__pyx_v_data_index)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 846; __pyx_clineno = __LINE__; goto __pyx_L1_error;} for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_1; __pyx_t_3+=1) { __pyx_v_j = __pyx_t_3; /* "pandas/lib.pyx":847 * else: * for j in range(len(data_index)): * row = rows[j % N] # <<<<<<<<<<<<<< * for i in range(ncols): * row[i] = data[i][j] */ if (unlikely(__pyx_v_N == 0)) { #ifdef WITH_THREAD PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure(); #endif PyErr_Format(PyExc_ZeroDivisionError, "integer division or modulo by zero"); #ifdef WITH_THREAD PyGILState_Release(__pyx_gilstate_save); #endif {__pyx_filename = __pyx_f[2]; __pyx_lineno = 847; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_4 = __Pyx_mod_int(__pyx_v_j, __pyx_v_N); __pyx_t_2 = PyList_GET_ITEM(__pyx_v_rows, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __Pyx_XDECREF_SET(__pyx_v_row, __pyx_t_2); __pyx_t_2 = 0; /* "pandas/lib.pyx":848 * for j in range(len(data_index)): * row = rows[j % N] * for i in range(ncols): # <<<<<<<<<<<<<< * row[i] = data[i][j] * */ __pyx_t_4 = __pyx_v_ncols; for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_4; __pyx_t_7+=1) { __pyx_v_i = __pyx_t_7; /* "pandas/lib.pyx":849 * row = rows[j % N] * for i in range(ncols): * row[i] = data[i][j] # <<<<<<<<<<<<<< * * if j >= N-1 and j % N == N-1: */ if (unlikely(((PyObject *)__pyx_v_data) == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 849; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_2 = __Pyx_GetItemInt(PyList_GET_ITEM(__pyx_v_data, __pyx_v_i), __pyx_v_j, sizeof(int), PyInt_FromLong, 0, 0, 0); if (!__pyx_t_2) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 849; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (__Pyx_SetItemInt(__pyx_v_row, __pyx_v_i, __pyx_t_2, sizeof(int), PyInt_FromLong, 0, 0, 0) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 849; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } /* "pandas/lib.pyx":851 * row[i] = data[i][j] * * if j >= N-1 and j % N == N-1: # <<<<<<<<<<<<<< * writer.writerows(rows) * */ __pyx_t_9 = ((__pyx_v_j >= (__pyx_v_N - 1)) != 0); if (__pyx_t_9) { if (unlikely(__pyx_v_N == 0)) { #ifdef WITH_THREAD PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure(); #endif PyErr_Format(PyExc_ZeroDivisionError, "integer division or modulo by zero"); #ifdef WITH_THREAD PyGILState_Release(__pyx_gilstate_save); #endif {__pyx_filename = __pyx_f[2]; __pyx_lineno = 851; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_10 = ((__Pyx_mod_int(__pyx_v_j, __pyx_v_N) == (__pyx_v_N - 1)) != 0); __pyx_t_6 = __pyx_t_10; } else { __pyx_t_6 = __pyx_t_9; } if (__pyx_t_6) { /* "pandas/lib.pyx":852 * * if j >= N-1 and j % N == N-1: * writer.writerows(rows) # <<<<<<<<<<<<<< * * if j >= 0 and (j < N-1 or (j % N) != N-1 ): */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_writer, __pyx_n_s__writerows); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 852; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_11 = PyTuple_New(1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 852; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __Pyx_INCREF(((PyObject *)__pyx_v_rows)); PyTuple_SET_ITEM(__pyx_t_11, 0, ((PyObject *)__pyx_v_rows)); __Pyx_GIVEREF(((PyObject *)__pyx_v_rows)); __pyx_t_5 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_11), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 852; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_11)); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; goto __pyx_L20; } __pyx_L20:; } } __pyx_L5:; /* "pandas/lib.pyx":854 * writer.writerows(rows) * * if j >= 0 and (j < N-1 or (j % N) != N-1 ): # <<<<<<<<<<<<<< * writer.writerows(rows[:((j+1) % N)]) * */ __pyx_t_6 = ((__pyx_v_j >= 0) != 0); if (__pyx_t_6) { __pyx_t_9 = ((__pyx_v_j < (__pyx_v_N - 1)) != 0); if (!__pyx_t_9) { if (unlikely(__pyx_v_N == 0)) { #ifdef WITH_THREAD PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure(); #endif PyErr_Format(PyExc_ZeroDivisionError, "integer division or modulo by zero"); #ifdef WITH_THREAD PyGILState_Release(__pyx_gilstate_save); #endif {__pyx_filename = __pyx_f[2]; __pyx_lineno = 854; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_10 = ((__Pyx_mod_int(__pyx_v_j, __pyx_v_N) != (__pyx_v_N - 1)) != 0); __pyx_t_13 = __pyx_t_10; } else { __pyx_t_13 = __pyx_t_9; } __pyx_t_9 = __pyx_t_13; } else { __pyx_t_9 = __pyx_t_6; } if (__pyx_t_9) { /* "pandas/lib.pyx":855 * * if j >= 0 and (j < N-1 or (j % N) != N-1 ): * writer.writerows(rows[:((j+1) % N)]) # <<<<<<<<<<<<<< * * #------------------------------------------------------------------------------- */ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_writer, __pyx_n_s__writerows); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 855; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_8 = (__pyx_v_j + 1); if (unlikely(__pyx_v_N == 0)) { #ifdef WITH_THREAD PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure(); #endif PyErr_Format(PyExc_ZeroDivisionError, "integer division or modulo by zero"); #ifdef WITH_THREAD PyGILState_Release(__pyx_gilstate_save); #endif {__pyx_filename = __pyx_f[2]; __pyx_lineno = 855; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_11 = __Pyx_PyList_GetSlice(((PyObject *)__pyx_v_rows), 0, __Pyx_mod_long(__pyx_t_8, __pyx_v_N)); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 855; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_11)); __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 855; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_t_11)); __Pyx_GIVEREF(((PyObject *)__pyx_t_11)); __pyx_t_11 = 0; __pyx_t_11 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 855; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; goto __pyx_L21; } __pyx_L21:; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_11); __Pyx_AddTraceback("pandas.lib.write_csv_rows", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_rows); __Pyx_XDECREF(__pyx_v_row); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_3lib_75arrmap(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_3lib_75arrmap = {__Pyx_NAMESTR("arrmap"), (PyCFunction)__pyx_pw_6pandas_3lib_75arrmap, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_3lib_75arrmap(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_index = 0; PyObject *__pyx_v_func = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("arrmap (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__index,&__pyx_n_s__func,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__index)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__func)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("arrmap", 1, 2, 2, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 861; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "arrmap") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 861; __pyx_clineno = __LINE__; goto __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_index = ((PyArrayObject *)values[0]); __pyx_v_func = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("arrmap", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 861; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.lib.arrmap", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_index), __pyx_ptype_5numpy_ndarray, 1, "index", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 861; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_3lib_74arrmap(__pyx_self, __pyx_v_index, __pyx_v_func); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/lib.pyx":861 * * @cython.boundscheck(False) * def arrmap(ndarray[object] index, object func): # <<<<<<<<<<<<<< * cdef int length = index.shape[0] * cdef int i = 0 */ static PyObject *__pyx_pf_6pandas_3lib_74arrmap(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_index, PyObject *__pyx_v_func) { int __pyx_v_length; int __pyx_v_i; PyArrayObject *__pyx_v_result = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_index; __Pyx_Buffer __pyx_pybuffer_index; __Pyx_LocalBuf_ND __pyx_pybuffernd_result; __Pyx_Buffer __pyx_pybuffer_result; 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; int __pyx_t_8; int __pyx_t_9; PyObject **__pyx_t_10; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("arrmap", 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_index.pybuffer.buf = NULL; __pyx_pybuffer_index.refcount = 0; __pyx_pybuffernd_index.data = NULL; __pyx_pybuffernd_index.rcbuffer = &__pyx_pybuffer_index; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_index.rcbuffer->pybuffer, (PyObject*)__pyx_v_index, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 861; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_index.diminfo[0].strides = __pyx_pybuffernd_index.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_index.diminfo[0].shape = __pyx_pybuffernd_index.rcbuffer->pybuffer.shape[0]; /* "pandas/lib.pyx":862 * @cython.boundscheck(False) * def arrmap(ndarray[object] index, object func): * cdef int length = index.shape[0] # <<<<<<<<<<<<<< * cdef int i = 0 * */ __pyx_v_length = (__pyx_v_index->dimensions[0]); /* "pandas/lib.pyx":863 * def arrmap(ndarray[object] index, object func): * cdef int length = index.shape[0] * cdef int i = 0 # <<<<<<<<<<<<<< * * cdef ndarray[object] result = np.empty(length, dtype=np.object_) */ __pyx_v_i = 0; /* "pandas/lib.pyx":865 * cdef int i = 0 * * cdef ndarray[object] result = np.empty(length, dtype=np.object_) # <<<<<<<<<<<<<< * * for i from 0 <= i < length: */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 865; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 865; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyInt_FromLong(__pyx_v_length); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 865; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 865; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 865; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 865; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s__object_); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 865; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__dtype), __pyx_t_5) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 865; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_3), ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 865; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__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_filename = __pyx_f[2]; __pyx_lineno = 865; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_6 = ((PyArrayObject *)__pyx_t_5); { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { __pyx_v_result = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_result.rcbuffer->pybuffer.buf = NULL; {__pyx_filename = __pyx_f[2]; __pyx_lineno = 865; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } else {__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]; } } __pyx_t_6 = 0; __pyx_v_result = ((PyArrayObject *)__pyx_t_5); __pyx_t_5 = 0; /* "pandas/lib.pyx":867 * cdef ndarray[object] result = np.empty(length, dtype=np.object_) * * for i from 0 <= i < length: # <<<<<<<<<<<<<< * result[i] = func(index[i]) * */ __pyx_t_7 = __pyx_v_length; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_7; __pyx_v_i++) { /* "pandas/lib.pyx":868 * * for i from 0 <= i < length: * result[i] = func(index[i]) # <<<<<<<<<<<<<< * * return result */ __pyx_t_8 = __pyx_v_i; if (__pyx_t_8 < 0) __pyx_t_8 += __pyx_pybuffernd_index.diminfo[0].shape; __pyx_t_5 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_index.rcbuffer->pybuffer.buf, __pyx_t_8, __pyx_pybuffernd_index.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_5); __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 868; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyObject_Call(__pyx_v_func, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 868; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_t_9 = __pyx_v_i; if (__pyx_t_9 < 0) __pyx_t_9 += __pyx_pybuffernd_result.diminfo[0].shape; __pyx_t_10 = __Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_9, __pyx_pybuffernd_result.diminfo[0].strides); __Pyx_GOTREF(*__pyx_t_10); __Pyx_INCREF(__pyx_t_5); __Pyx_DECREF(*__pyx_t_10); *__pyx_t_10 = __pyx_t_5; __Pyx_GIVEREF(*__pyx_t_10); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } /* "pandas/lib.pyx":870 * result[i] = func(index[i]) * * return result # <<<<<<<<<<<<<< * * @cython.wraparound(False) */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_result)); __pyx_r = ((PyObject *)__pyx_v_result); goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_index.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.lib.arrmap", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_index.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_result); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_3lib_77is_lexsorted(PyObject *__pyx_self, PyObject *__pyx_v_list_of_arrays); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_3lib_77is_lexsorted = {__Pyx_NAMESTR("is_lexsorted"), (PyCFunction)__pyx_pw_6pandas_3lib_77is_lexsorted, METH_O, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_3lib_77is_lexsorted(PyObject *__pyx_self, PyObject *__pyx_v_list_of_arrays) { CYTHON_UNUSED int __pyx_lineno = 0; CYTHON_UNUSED const char *__pyx_filename = NULL; CYTHON_UNUSED int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("is_lexsorted (wrapper)", 0); if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_list_of_arrays), (&PyList_Type), 1, "list_of_arrays", 1))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 874; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_3lib_76is_lexsorted(__pyx_self, ((PyObject*)__pyx_v_list_of_arrays)); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/lib.pyx":874 * @cython.wraparound(False) * @cython.boundscheck(False) * def is_lexsorted(list list_of_arrays): # <<<<<<<<<<<<<< * cdef: * int i */ static PyObject *__pyx_pf_6pandas_3lib_76is_lexsorted(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_list_of_arrays) { int __pyx_v_i; Py_ssize_t __pyx_v_n; Py_ssize_t __pyx_v_nlevels; __pyx_t_5numpy_int64_t __pyx_v_k; __pyx_t_5numpy_int64_t __pyx_v_cur; __pyx_t_5numpy_int64_t __pyx_v_pre; PyArrayObject *__pyx_v_arr = 0; __pyx_t_5numpy_int64_t **__pyx_v_vecs; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; PyObject *__pyx_t_2 = NULL; Py_ssize_t __pyx_t_3; int __pyx_t_4; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("is_lexsorted", 0); /* "pandas/lib.pyx":881 * ndarray arr * * nlevels = len(list_of_arrays) # <<<<<<<<<<<<<< * n = len(list_of_arrays[0]) * */ if (unlikely(((PyObject *)__pyx_v_list_of_arrays) == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 881; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_1 = PyList_GET_SIZE(((PyObject *)__pyx_v_list_of_arrays)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 881; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_nlevels = __pyx_t_1; /* "pandas/lib.pyx":882 * * nlevels = len(list_of_arrays) * n = len(list_of_arrays[0]) # <<<<<<<<<<<<<< * * cdef int64_t **vecs = malloc(nlevels * sizeof(int64_t*)) */ if (unlikely(((PyObject *)__pyx_v_list_of_arrays) == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 882; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_2 = PyList_GET_ITEM(__pyx_v_list_of_arrays, 0); __Pyx_INCREF(__pyx_t_2); __pyx_t_1 = PyObject_Length(__pyx_t_2); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 882; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_n = __pyx_t_1; /* "pandas/lib.pyx":884 * n = len(list_of_arrays[0]) * * cdef int64_t **vecs = malloc(nlevels * sizeof(int64_t*)) # <<<<<<<<<<<<<< * for i from 0 <= i < nlevels: * # vecs[i] = ( list_of_arrays[i]).data */ __pyx_v_vecs = ((__pyx_t_5numpy_int64_t **)malloc((__pyx_v_nlevels * (sizeof(__pyx_t_5numpy_int64_t *))))); /* "pandas/lib.pyx":885 * * cdef int64_t **vecs = malloc(nlevels * sizeof(int64_t*)) * for i from 0 <= i < nlevels: # <<<<<<<<<<<<<< * # vecs[i] = ( list_of_arrays[i]).data * */ __pyx_t_1 = __pyx_v_nlevels; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_1; __pyx_v_i++) { /* "pandas/lib.pyx":888 * # vecs[i] = ( list_of_arrays[i]).data * * arr = list_of_arrays[i] # <<<<<<<<<<<<<< * vecs[i] = arr.data * # assume uniqueness?? */ if (unlikely(((PyObject *)__pyx_v_list_of_arrays) == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 888; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } if (!(likely(((PyList_GET_ITEM(__pyx_v_list_of_arrays, __pyx_v_i)) == Py_None) || likely(__Pyx_TypeTest(PyList_GET_ITEM(__pyx_v_list_of_arrays, __pyx_v_i), __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 888; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_2 = PyList_GET_ITEM(__pyx_v_list_of_arrays, __pyx_v_i); __Pyx_INCREF(__pyx_t_2); __Pyx_XDECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_2)); __pyx_t_2 = 0; /* "pandas/lib.pyx":889 * * arr = list_of_arrays[i] * vecs[i] = arr.data # <<<<<<<<<<<<<< * # assume uniqueness?? * */ (__pyx_v_vecs[__pyx_v_i]) = ((__pyx_t_5numpy_int64_t *)__pyx_v_arr->data); } /* "pandas/lib.pyx":892 * # assume uniqueness?? * * for i from 1 <= i < n: # <<<<<<<<<<<<<< * for k from 0 <= k < nlevels: * cur = vecs[k][i] */ __pyx_t_1 = __pyx_v_n; for (__pyx_v_i = 1; __pyx_v_i < __pyx_t_1; __pyx_v_i++) { /* "pandas/lib.pyx":893 * * for i from 1 <= i < n: * for k from 0 <= k < nlevels: # <<<<<<<<<<<<<< * cur = vecs[k][i] * pre = vecs[k][i-1] */ __pyx_t_3 = __pyx_v_nlevels; for (__pyx_v_k = 0; __pyx_v_k < __pyx_t_3; __pyx_v_k++) { /* "pandas/lib.pyx":894 * for i from 1 <= i < n: * for k from 0 <= k < nlevels: * cur = vecs[k][i] # <<<<<<<<<<<<<< * pre = vecs[k][i-1] * if cur == pre: */ __pyx_v_cur = ((__pyx_v_vecs[__pyx_v_k])[__pyx_v_i]); /* "pandas/lib.pyx":895 * for k from 0 <= k < nlevels: * cur = vecs[k][i] * pre = vecs[k][i-1] # <<<<<<<<<<<<<< * if cur == pre: * continue */ __pyx_v_pre = ((__pyx_v_vecs[__pyx_v_k])[(__pyx_v_i - 1)]); /* "pandas/lib.pyx":896 * cur = vecs[k][i] * pre = vecs[k][i-1] * if cur == pre: # <<<<<<<<<<<<<< * continue * elif cur > pre: */ __pyx_t_4 = ((__pyx_v_cur == __pyx_v_pre) != 0); if (__pyx_t_4) { /* "pandas/lib.pyx":897 * pre = vecs[k][i-1] * if cur == pre: * continue # <<<<<<<<<<<<<< * elif cur > pre: * break */ goto __pyx_L7_continue; goto __pyx_L9; } /* "pandas/lib.pyx":898 * if cur == pre: * continue * elif cur > pre: # <<<<<<<<<<<<<< * break * else: */ __pyx_t_4 = ((__pyx_v_cur > __pyx_v_pre) != 0); if (__pyx_t_4) { /* "pandas/lib.pyx":899 * continue * elif cur > pre: * break # <<<<<<<<<<<<<< * else: * return False */ goto __pyx_L8_break; goto __pyx_L9; } /*else*/ { /* "pandas/lib.pyx":901 * break * else: * return False # <<<<<<<<<<<<<< * free(vecs) * return True */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 901; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; } __pyx_L9:; __pyx_L7_continue:; } __pyx_L8_break:; } /* "pandas/lib.pyx":902 * else: * return False * free(vecs) # <<<<<<<<<<<<<< * return True * */ free(__pyx_v_vecs); /* "pandas/lib.pyx":903 * return False * free(vecs) * return True # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 903; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("pandas.lib.is_lexsorted", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_arr); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_3lib_79generate_bins_dt64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6pandas_3lib_78generate_bins_dt64[] = "\n Int64 (datetime64) version of generic python version in groupby.py\n "; static PyMethodDef __pyx_mdef_6pandas_3lib_79generate_bins_dt64 = {__Pyx_NAMESTR("generate_bins_dt64"), (PyCFunction)__pyx_pw_6pandas_3lib_79generate_bins_dt64, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_3lib_78generate_bins_dt64)}; static PyObject *__pyx_pw_6pandas_3lib_79generate_bins_dt64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_values = 0; PyArrayObject *__pyx_v_binner = 0; PyObject *__pyx_v_closed = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("generate_bins_dt64 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__values,&__pyx_n_s__binner,&__pyx_n_s__closed,0}; PyObject* values[3] = {0,0,0}; values[2] = ((PyObject *)__pyx_n_s__left); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__values)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__binner)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("generate_bins_dt64", 0, 2, 3, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 913; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__closed); if (value) { values[2] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "generate_bins_dt64") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 913; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_values = ((PyArrayObject *)values[0]); __pyx_v_binner = ((PyArrayObject *)values[1]); __pyx_v_closed = values[2]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("generate_bins_dt64", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 913; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.lib.generate_bins_dt64", __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_filename = __pyx_f[2]; __pyx_lineno = 913; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_binner), __pyx_ptype_5numpy_ndarray, 1, "binner", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 913; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_3lib_78generate_bins_dt64(__pyx_self, __pyx_v_values, __pyx_v_binner, __pyx_v_closed); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/lib.pyx":913 * @cython.boundscheck(False) * @cython.wraparound(False) * def generate_bins_dt64(ndarray[int64_t] values, ndarray[int64_t] binner, # <<<<<<<<<<<<<< * object closed='left'): * """ */ static PyObject *__pyx_pf_6pandas_3lib_78generate_bins_dt64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_binner, PyObject *__pyx_v_closed) { Py_ssize_t __pyx_v_lenidx; Py_ssize_t __pyx_v_lenbin; Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_bc; PyArrayObject *__pyx_v_bins = 0; CYTHON_UNUSED __pyx_t_5numpy_int64_t __pyx_v_l_bin; __pyx_t_5numpy_int64_t __pyx_v_r_bin; int __pyx_v_right_closed; __Pyx_LocalBuf_ND __pyx_pybuffernd_binner; __Pyx_Buffer __pyx_pybuffer_binner; __Pyx_LocalBuf_ND __pyx_pybuffernd_bins; __Pyx_Buffer __pyx_pybuffer_bins; __Pyx_LocalBuf_ND __pyx_pybuffernd_values; __Pyx_Buffer __pyx_pybuffer_values; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; Py_ssize_t __pyx_t_3; int __pyx_t_4; int __pyx_t_5; long __pyx_t_6; long __pyx_t_7; Py_ssize_t __pyx_t_8; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; PyObject *__pyx_t_11 = NULL; PyObject *__pyx_t_12 = NULL; PyArrayObject *__pyx_t_13 = NULL; int __pyx_t_14; PyObject *__pyx_t_15 = NULL; PyObject *__pyx_t_16 = NULL; PyObject *__pyx_t_17 = NULL; 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; int __pyx_t_24; Py_ssize_t __pyx_t_25; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("generate_bins_dt64", 0); __pyx_pybuffer_bins.pybuffer.buf = NULL; __pyx_pybuffer_bins.refcount = 0; __pyx_pybuffernd_bins.data = NULL; __pyx_pybuffernd_bins.rcbuffer = &__pyx_pybuffer_bins; __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_binner.pybuffer.buf = NULL; __pyx_pybuffer_binner.refcount = 0; __pyx_pybuffernd_binner.data = NULL; __pyx_pybuffernd_binner.rcbuffer = &__pyx_pybuffer_binner; { __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_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 913; __pyx_clineno = __LINE__; goto __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_binner.rcbuffer->pybuffer, (PyObject*)__pyx_v_binner, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 913; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_binner.diminfo[0].strides = __pyx_pybuffernd_binner.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_binner.diminfo[0].shape = __pyx_pybuffernd_binner.rcbuffer->pybuffer.shape[0]; /* "pandas/lib.pyx":922 * ndarray[int64_t] bins * int64_t l_bin, r_bin * bint right_closed = closed == 'right' # <<<<<<<<<<<<<< * * lenidx = len(values) */ __pyx_t_1 = PyObject_RichCompare(__pyx_v_closed, ((PyObject *)__pyx_n_s__right), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 922; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 922; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_right_closed = __pyx_t_2; /* "pandas/lib.pyx":924 * bint right_closed = closed == 'right' * * lenidx = len(values) # <<<<<<<<<<<<<< * lenbin = len(binner) * */ __pyx_t_3 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 924; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_lenidx = __pyx_t_3; /* "pandas/lib.pyx":925 * * lenidx = len(values) * lenbin = len(binner) # <<<<<<<<<<<<<< * * if lenidx <= 0 or lenbin <= 0: */ __pyx_t_3 = PyObject_Length(((PyObject *)__pyx_v_binner)); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 925; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_lenbin = __pyx_t_3; /* "pandas/lib.pyx":927 * lenbin = len(binner) * * if lenidx <= 0 or lenbin <= 0: # <<<<<<<<<<<<<< * raise ValueError("Invalid length for values or for binner") * */ __pyx_t_2 = ((__pyx_v_lenidx <= 0) != 0); if (!__pyx_t_2) { __pyx_t_4 = ((__pyx_v_lenbin <= 0) != 0); __pyx_t_5 = __pyx_t_4; } else { __pyx_t_5 = __pyx_t_2; } if (__pyx_t_5) { /* "pandas/lib.pyx":928 * * if lenidx <= 0 or lenbin <= 0: * raise ValueError("Invalid length for values or for binner") # <<<<<<<<<<<<<< * * # check binner fits data */ __pyx_t_1 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_14), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 928; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 928; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L3; } __pyx_L3:; /* "pandas/lib.pyx":931 * * # check binner fits data * if values[0] < binner[0]: # <<<<<<<<<<<<<< * raise ValueError("Values falls before first bin") * */ __pyx_t_6 = 0; __pyx_t_7 = 0; __pyx_t_5 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_6, __pyx_pybuffernd_values.diminfo[0].strides)) < (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_binner.rcbuffer->pybuffer.buf, __pyx_t_7, __pyx_pybuffernd_binner.diminfo[0].strides))) != 0); if (__pyx_t_5) { /* "pandas/lib.pyx":932 * # check binner fits data * if values[0] < binner[0]: * raise ValueError("Values falls before first bin") # <<<<<<<<<<<<<< * * if values[lenidx-1] > binner[lenbin-1]: */ __pyx_t_1 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_16), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 932; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 932; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L4; } __pyx_L4:; /* "pandas/lib.pyx":934 * raise ValueError("Values falls before first bin") * * if values[lenidx-1] > binner[lenbin-1]: # <<<<<<<<<<<<<< * raise ValueError("Values falls after last bin") * */ __pyx_t_3 = (__pyx_v_lenidx - 1); __pyx_t_8 = (__pyx_v_lenbin - 1); __pyx_t_5 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_3, __pyx_pybuffernd_values.diminfo[0].strides)) > (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_binner.rcbuffer->pybuffer.buf, __pyx_t_8, __pyx_pybuffernd_binner.diminfo[0].strides))) != 0); if (__pyx_t_5) { /* "pandas/lib.pyx":935 * * if values[lenidx-1] > binner[lenbin-1]: * raise ValueError("Values falls after last bin") # <<<<<<<<<<<<<< * * bins = np.empty(lenbin - 1, dtype=np.int64) */ __pyx_t_1 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_18), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 935; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 935; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L5; } __pyx_L5:; /* "pandas/lib.pyx":937 * raise ValueError("Values falls after last bin") * * bins = np.empty(lenbin - 1, dtype=np.int64) # <<<<<<<<<<<<<< * * j = 0 # index into values */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 937; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 937; __pyx_clineno = __LINE__; goto __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_lenbin - 1)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 937; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_10 = PyTuple_New(1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 937; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 937; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_t_11 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 937; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s__int64); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 937; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__dtype), __pyx_t_12) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 937; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __pyx_t_12 = PyObject_Call(__pyx_t_9, ((PyObject *)__pyx_t_10), ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 937; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_10)); __pyx_t_10 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; if (!(likely(((__pyx_t_12) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_12, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 937; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_13 = ((PyArrayObject *)__pyx_t_12); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_bins.rcbuffer->pybuffer); __pyx_t_14 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_bins.rcbuffer->pybuffer, (PyObject*)__pyx_t_13, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_14 < 0)) { PyErr_Fetch(&__pyx_t_15, &__pyx_t_16, &__pyx_t_17); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_bins.rcbuffer->pybuffer, (PyObject*)__pyx_v_bins, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_15); Py_XDECREF(__pyx_t_16); Py_XDECREF(__pyx_t_17); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_15, __pyx_t_16, __pyx_t_17); } } __pyx_pybuffernd_bins.diminfo[0].strides = __pyx_pybuffernd_bins.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_bins.diminfo[0].shape = __pyx_pybuffernd_bins.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_14 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 937; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_13 = 0; __pyx_v_bins = ((PyArrayObject *)__pyx_t_12); __pyx_t_12 = 0; /* "pandas/lib.pyx":939 * bins = np.empty(lenbin - 1, dtype=np.int64) * * j = 0 # index into values # <<<<<<<<<<<<<< * bc = 0 # bin count * */ __pyx_v_j = 0; /* "pandas/lib.pyx":940 * * j = 0 # index into values * bc = 0 # bin count # <<<<<<<<<<<<<< * * # linear scan */ __pyx_v_bc = 0; /* "pandas/lib.pyx":943 * * # linear scan * for i in range(0, lenbin - 1): # <<<<<<<<<<<<<< * l_bin = binner[i] * r_bin = binner[i+1] */ __pyx_t_18 = (__pyx_v_lenbin - 1); for (__pyx_t_19 = 0; __pyx_t_19 < __pyx_t_18; __pyx_t_19+=1) { __pyx_v_i = __pyx_t_19; /* "pandas/lib.pyx":944 * # linear scan * for i in range(0, lenbin - 1): * l_bin = binner[i] # <<<<<<<<<<<<<< * r_bin = binner[i+1] * */ __pyx_t_20 = __pyx_v_i; __pyx_v_l_bin = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_binner.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_binner.diminfo[0].strides)); /* "pandas/lib.pyx":945 * for i in range(0, lenbin - 1): * l_bin = binner[i] * r_bin = binner[i+1] # <<<<<<<<<<<<<< * * # count values in current bin, advance to next bin */ __pyx_t_21 = (__pyx_v_i + 1); __pyx_v_r_bin = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_binner.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_binner.diminfo[0].strides)); /* "pandas/lib.pyx":948 * * # count values in current bin, advance to next bin * while j < lenidx and (values[j] < r_bin or # <<<<<<<<<<<<<< * (right_closed and values[j] == r_bin)): * j += 1 */ while (1) { __pyx_t_5 = ((__pyx_v_j < __pyx_v_lenidx) != 0); if (__pyx_t_5) { __pyx_t_22 = __pyx_v_j; __pyx_t_2 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_22, __pyx_pybuffernd_values.diminfo[0].strides)) < __pyx_v_r_bin) != 0); if (!__pyx_t_2) { /* "pandas/lib.pyx":949 * # count values in current bin, advance to next bin * while j < lenidx and (values[j] < r_bin or * (right_closed and values[j] == r_bin)): # <<<<<<<<<<<<<< * j += 1 * */ if ((__pyx_v_right_closed != 0)) { __pyx_t_23 = __pyx_v_j; __pyx_t_4 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_23, __pyx_pybuffernd_values.diminfo[0].strides)) == __pyx_v_r_bin) != 0); __pyx_t_24 = __pyx_t_4; } else { __pyx_t_24 = (__pyx_v_right_closed != 0); } __pyx_t_4 = __pyx_t_24; } else { __pyx_t_4 = __pyx_t_2; } __pyx_t_2 = __pyx_t_4; } else { __pyx_t_2 = __pyx_t_5; } if (!__pyx_t_2) break; /* "pandas/lib.pyx":950 * while j < lenidx and (values[j] < r_bin or * (right_closed and values[j] == r_bin)): * j += 1 # <<<<<<<<<<<<<< * * bins[bc] = j */ __pyx_v_j = (__pyx_v_j + 1); } /* "pandas/lib.pyx":952 * j += 1 * * bins[bc] = j # <<<<<<<<<<<<<< * bc += 1 * */ __pyx_t_25 = __pyx_v_bc; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_bins.rcbuffer->pybuffer.buf, __pyx_t_25, __pyx_pybuffernd_bins.diminfo[0].strides) = __pyx_v_j; /* "pandas/lib.pyx":953 * * bins[bc] = j * bc += 1 # <<<<<<<<<<<<<< * * return bins */ __pyx_v_bc = (__pyx_v_bc + 1); } /* "pandas/lib.pyx":955 * bc += 1 * * return bins # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_bins)); __pyx_r = ((PyObject *)__pyx_v_bins); goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_9); __Pyx_XDECREF(__pyx_t_10); __Pyx_XDECREF(__pyx_t_11); __Pyx_XDECREF(__pyx_t_12); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_binner.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_bins.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.lib.generate_bins_dt64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_binner.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_bins.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_bins); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_3lib_81row_bool_subset(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_3lib_81row_bool_subset = {__Pyx_NAMESTR("row_bool_subset"), (PyCFunction)__pyx_pw_6pandas_3lib_81row_bool_subset, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_3lib_81row_bool_subset(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_values = 0; PyArrayObject *__pyx_v_mask = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("row_bool_subset (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__values,&__pyx_n_s__mask,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__values)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__mask)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("row_bool_subset", 1, 2, 2, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 962; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "row_bool_subset") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 962; __pyx_clineno = __LINE__; goto __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_mask = ((PyArrayObject *)values[1]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("row_bool_subset", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 962; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.lib.row_bool_subset", __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_filename = __pyx_f[2]; __pyx_lineno = 962; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_mask), __pyx_ptype_5numpy_ndarray, 1, "mask", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 963; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_3lib_80row_bool_subset(__pyx_self, __pyx_v_values, __pyx_v_mask); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/lib.pyx":962 * @cython.boundscheck(False) * @cython.wraparound(False) * def row_bool_subset(ndarray[float64_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[uint8_t, cast=True] mask): * cdef: */ static PyObject *__pyx_pf_6pandas_3lib_80row_bool_subset(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_mask) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_n; Py_ssize_t __pyx_v_k; Py_ssize_t __pyx_v_pos; PyArrayObject *__pyx_v_out = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_mask; __Pyx_Buffer __pyx_pybuffer_mask; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __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; PyObject *(*__pyx_t_5)(PyObject *); Py_ssize_t __pyx_t_6; Py_ssize_t __pyx_t_7; 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; int __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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("row_bool_subset", 0); __pyx_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; __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_mask.pybuffer.buf = NULL; __pyx_pybuffer_mask.refcount = 0; __pyx_pybuffernd_mask.data = NULL; __pyx_pybuffernd_mask.rcbuffer = &__pyx_pybuffer_mask; { __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, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 962; __pyx_clineno = __LINE__; goto __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_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; 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)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 962; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; /* "pandas/lib.pyx":965 * ndarray[uint8_t, cast=True] mask): * cdef: * Py_ssize_t i, j, n, k, pos = 0 # <<<<<<<<<<<<<< * ndarray[float64_t, ndim=2] out * */ __pyx_v_pos = 0; /* "pandas/lib.pyx":968 * ndarray[float64_t, ndim=2] out * * n, k = ( values).shape # <<<<<<<<<<<<<< * assert(n == len(mask)) * */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_values), __pyx_n_s__shape); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 968; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) { PyObject* sequence = __pyx_t_1; #if CYTHON_COMPILING_IN_CPYTHON Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 968; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1); } else { __pyx_t_2 = PyList_GET_ITEM(sequence, 0); __pyx_t_3 = PyList_GET_ITEM(sequence, 1); } __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); #else __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 968; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 968; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } else { Py_ssize_t index = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 968; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_5 = Py_TYPE(__pyx_t_4)->tp_iternext; index = 0; __pyx_t_2 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_2)) goto __pyx_L3_unpacking_failed; __Pyx_GOTREF(__pyx_t_2); index = 1; __pyx_t_3 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_3)) goto __pyx_L3_unpacking_failed; __Pyx_GOTREF(__pyx_t_3); if (__Pyx_IternextUnpackEndCheck(__pyx_t_5(__pyx_t_4), 2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 968; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 968; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_L4_unpacking_done:; } __pyx_t_6 = __Pyx_PyIndex_AsSsize_t(__pyx_t_2); if (unlikely((__pyx_t_6 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 968; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_7 = __Pyx_PyIndex_AsSsize_t(__pyx_t_3); if (unlikely((__pyx_t_7 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 968; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_n = __pyx_t_6; __pyx_v_k = __pyx_t_7; /* "pandas/lib.pyx":969 * * n, k = ( values).shape * assert(n == len(mask)) # <<<<<<<<<<<<<< * * out = np.empty((mask.sum(), k), dtype=np.float64) */ #ifndef CYTHON_WITHOUT_ASSERTIONS __pyx_t_7 = PyObject_Length(((PyObject *)__pyx_v_mask)); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 969; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!((__pyx_v_n == __pyx_t_7) != 0))) { PyErr_SetNone(PyExc_AssertionError); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 969; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #endif /* "pandas/lib.pyx":971 * assert(n == len(mask)) * * out = np.empty((mask.sum(), k), dtype=np.float64) # <<<<<<<<<<<<<< * * for i in range(n): */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 971; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s__empty); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 971; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_mask), __pyx_n_s__sum); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 971; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 971; __pyx_clineno = __LINE__; goto __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_k); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 971; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 971; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_2 = 0; __pyx_t_1 = 0; __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 971; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_t_4)); __Pyx_GIVEREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __pyx_t_4 = PyDict_New(); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 971; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_4)); __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 971; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__float64); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 971; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (PyDict_SetItem(__pyx_t_4, ((PyObject *)__pyx_n_s__dtype), __pyx_t_8) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 971; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_8 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_1), ((PyObject *)__pyx_t_4)); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 971; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; if (!(likely(((__pyx_t_8) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_8, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 971; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_9 = ((PyArrayObject *)__pyx_t_8); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __pyx_t_10 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_t_9, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_out.rcbuffer->pybuffer, (PyObject*)__pyx_v_out, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_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]; __pyx_pybuffernd_out.diminfo[1].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_out.diminfo[1].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[1]; if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 971; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_9 = 0; __pyx_v_out = ((PyArrayObject *)__pyx_t_8); __pyx_t_8 = 0; /* "pandas/lib.pyx":973 * out = np.empty((mask.sum(), k), dtype=np.float64) * * for i in range(n): # <<<<<<<<<<<<<< * if mask[i]: * for j in range(k): */ __pyx_t_7 = __pyx_v_n; for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_7; __pyx_t_6+=1) { __pyx_v_i = __pyx_t_6; /* "pandas/lib.pyx":974 * * for i in range(n): * if mask[i]: # <<<<<<<<<<<<<< * for j in range(k): * out[pos, j] = values[i, j] */ __pyx_t_14 = __pyx_v_i; __pyx_t_15 = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_mask.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_mask.diminfo[0].strides)) != 0); if (__pyx_t_15) { /* "pandas/lib.pyx":975 * for i in range(n): * if mask[i]: * for j in range(k): # <<<<<<<<<<<<<< * out[pos, j] = values[i, j] * pos += 1 */ __pyx_t_16 = __pyx_v_k; for (__pyx_t_17 = 0; __pyx_t_17 < __pyx_t_16; __pyx_t_17+=1) { __pyx_v_j = __pyx_t_17; /* "pandas/lib.pyx":976 * if mask[i]: * for j in range(k): * out[pos, j] = values[i, j] # <<<<<<<<<<<<<< * pos += 1 * */ __pyx_t_18 = __pyx_v_i; __pyx_t_19 = __pyx_v_j; __pyx_t_20 = __pyx_v_pos; __pyx_t_21 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_21, __pyx_pybuffernd_out.diminfo[1].strides) = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_19, __pyx_pybuffernd_values.diminfo[1].strides)); } /* "pandas/lib.pyx":977 * for j in range(k): * out[pos, j] = values[i, j] * pos += 1 # <<<<<<<<<<<<<< * * return out */ __pyx_v_pos = (__pyx_v_pos + 1); goto __pyx_L7; } __pyx_L7:; } /* "pandas/lib.pyx":979 * pos += 1 * * return out # <<<<<<<<<<<<<< * * @cython.boundscheck(False) */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_out)); __pyx_r = ((PyObject *)__pyx_v_out); goto __pyx_L0; __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_8); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_mask.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.lib.row_bool_subset", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_mask.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_out); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_3lib_83row_bool_subset_object(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_3lib_83row_bool_subset_object = {__Pyx_NAMESTR("row_bool_subset_object"), (PyCFunction)__pyx_pw_6pandas_3lib_83row_bool_subset_object, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_3lib_83row_bool_subset_object(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_values = 0; PyArrayObject *__pyx_v_mask = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("row_bool_subset_object (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__values,&__pyx_n_s__mask,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__values)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__mask)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("row_bool_subset_object", 1, 2, 2, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 983; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "row_bool_subset_object") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 983; __pyx_clineno = __LINE__; goto __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_mask = ((PyArrayObject *)values[1]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("row_bool_subset_object", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 983; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.lib.row_bool_subset_object", __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_filename = __pyx_f[2]; __pyx_lineno = 983; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_mask), __pyx_ptype_5numpy_ndarray, 1, "mask", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 984; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_3lib_82row_bool_subset_object(__pyx_self, __pyx_v_values, __pyx_v_mask); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/lib.pyx":983 * @cython.boundscheck(False) * @cython.wraparound(False) * def row_bool_subset_object(ndarray[object, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[uint8_t, cast=True] mask): * cdef: */ static PyObject *__pyx_pf_6pandas_3lib_82row_bool_subset_object(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_mask) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_n; Py_ssize_t __pyx_v_k; Py_ssize_t __pyx_v_pos; PyArrayObject *__pyx_v_out = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_mask; __Pyx_Buffer __pyx_pybuffer_mask; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __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; PyObject *(*__pyx_t_5)(PyObject *); Py_ssize_t __pyx_t_6; Py_ssize_t __pyx_t_7; PyArrayObject *__pyx_t_8 = NULL; int __pyx_t_9; PyObject *__pyx_t_10 = NULL; PyObject *__pyx_t_11 = NULL; PyObject *__pyx_t_12 = NULL; Py_ssize_t __pyx_t_13; int __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; PyObject **__pyx_t_21; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("row_bool_subset_object", 0); __pyx_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; __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_mask.pybuffer.buf = NULL; __pyx_pybuffer_mask.refcount = 0; __pyx_pybuffernd_mask.data = NULL; __pyx_pybuffernd_mask.rcbuffer = &__pyx_pybuffer_mask; { __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, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 983; __pyx_clineno = __LINE__; goto __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_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; 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)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 983; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; /* "pandas/lib.pyx":986 * ndarray[uint8_t, cast=True] mask): * cdef: * Py_ssize_t i, j, n, k, pos = 0 # <<<<<<<<<<<<<< * ndarray[object, ndim=2] out * */ __pyx_v_pos = 0; /* "pandas/lib.pyx":989 * ndarray[object, ndim=2] out * * n, k = ( values).shape # <<<<<<<<<<<<<< * assert(n == len(mask)) * */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_values), __pyx_n_s__shape); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 989; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) { PyObject* sequence = __pyx_t_1; #if CYTHON_COMPILING_IN_CPYTHON Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 989; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1); } else { __pyx_t_2 = PyList_GET_ITEM(sequence, 0); __pyx_t_3 = PyList_GET_ITEM(sequence, 1); } __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); #else __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 989; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 989; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } else { Py_ssize_t index = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 989; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_5 = Py_TYPE(__pyx_t_4)->tp_iternext; index = 0; __pyx_t_2 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_2)) goto __pyx_L3_unpacking_failed; __Pyx_GOTREF(__pyx_t_2); index = 1; __pyx_t_3 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_3)) goto __pyx_L3_unpacking_failed; __Pyx_GOTREF(__pyx_t_3); if (__Pyx_IternextUnpackEndCheck(__pyx_t_5(__pyx_t_4), 2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 989; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 989; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_L4_unpacking_done:; } __pyx_t_6 = __Pyx_PyIndex_AsSsize_t(__pyx_t_2); if (unlikely((__pyx_t_6 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 989; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_7 = __Pyx_PyIndex_AsSsize_t(__pyx_t_3); if (unlikely((__pyx_t_7 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 989; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_n = __pyx_t_6; __pyx_v_k = __pyx_t_7; /* "pandas/lib.pyx":990 * * n, k = ( values).shape * assert(n == len(mask)) # <<<<<<<<<<<<<< * * out = np.empty((mask.sum(), k), dtype=object) */ #ifndef CYTHON_WITHOUT_ASSERTIONS __pyx_t_7 = PyObject_Length(((PyObject *)__pyx_v_mask)); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 990; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!((__pyx_v_n == __pyx_t_7) != 0))) { PyErr_SetNone(PyExc_AssertionError); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 990; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #endif /* "pandas/lib.pyx":992 * assert(n == len(mask)) * * out = np.empty((mask.sum(), k), dtype=object) # <<<<<<<<<<<<<< * * for i in range(n): */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 992; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s__empty); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 992; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_mask), __pyx_n_s__sum); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 992; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 992; __pyx_clineno = __LINE__; goto __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_k); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 992; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 992; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_2 = 0; __pyx_t_1 = 0; __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 992; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_t_4)); __Pyx_GIVEREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __pyx_t_4 = PyDict_New(); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 992; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_4)); if (PyDict_SetItem(__pyx_t_4, ((PyObject *)__pyx_n_s__dtype), __pyx_builtin_object) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 992; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_2 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_1), ((PyObject *)__pyx_t_4)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 992; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __Pyx_DECREF(((PyObject *)__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_filename = __pyx_f[2]; __pyx_lineno = 992; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_8 = ((PyArrayObject *)__pyx_t_2); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __pyx_t_9 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_t_8, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack); if (unlikely(__pyx_t_9 < 0)) { PyErr_Fetch(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_v_out, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_11); Py_XDECREF(__pyx_t_12); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_10, __pyx_t_11, __pyx_t_12); } } __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]; __pyx_pybuffernd_out.diminfo[1].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_out.diminfo[1].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[1]; if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 992; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_8 = 0; __pyx_v_out = ((PyArrayObject *)__pyx_t_2); __pyx_t_2 = 0; /* "pandas/lib.pyx":994 * out = np.empty((mask.sum(), k), dtype=object) * * for i in range(n): # <<<<<<<<<<<<<< * if mask[i]: * for j in range(k): */ __pyx_t_7 = __pyx_v_n; for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_7; __pyx_t_6+=1) { __pyx_v_i = __pyx_t_6; /* "pandas/lib.pyx":995 * * for i in range(n): * if mask[i]: # <<<<<<<<<<<<<< * for j in range(k): * out[pos, j] = values[i, j] */ __pyx_t_13 = __pyx_v_i; __pyx_t_14 = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_mask.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_mask.diminfo[0].strides)) != 0); if (__pyx_t_14) { /* "pandas/lib.pyx":996 * for i in range(n): * if mask[i]: * for j in range(k): # <<<<<<<<<<<<<< * out[pos, j] = values[i, j] * pos += 1 */ __pyx_t_15 = __pyx_v_k; for (__pyx_t_16 = 0; __pyx_t_16 < __pyx_t_15; __pyx_t_16+=1) { __pyx_v_j = __pyx_t_16; /* "pandas/lib.pyx":997 * if mask[i]: * for j in range(k): * out[pos, j] = values[i, j] # <<<<<<<<<<<<<< * pos += 1 * */ __pyx_t_17 = __pyx_v_i; __pyx_t_18 = __pyx_v_j; __pyx_t_2 = (PyObject *) *__Pyx_BufPtrStrided2d(PyObject **, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_18, __pyx_pybuffernd_values.diminfo[1].strides); __Pyx_INCREF((PyObject*)__pyx_t_2); __pyx_t_19 = __pyx_v_pos; __pyx_t_20 = __pyx_v_j; __pyx_t_21 = __Pyx_BufPtrStrided2d(PyObject **, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_20, __pyx_pybuffernd_out.diminfo[1].strides); __Pyx_GOTREF(*__pyx_t_21); __Pyx_INCREF(__pyx_t_2); __Pyx_DECREF(*__pyx_t_21); *__pyx_t_21 = __pyx_t_2; __Pyx_GIVEREF(*__pyx_t_21); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } /* "pandas/lib.pyx":998 * for j in range(k): * out[pos, j] = values[i, j] * pos += 1 # <<<<<<<<<<<<<< * * return out */ __pyx_v_pos = (__pyx_v_pos + 1); goto __pyx_L7; } __pyx_L7:; } /* "pandas/lib.pyx":1000 * pos += 1 * * return out # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_out)); __pyx_r = ((PyObject *)__pyx_v_out); goto __pyx_L0; __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_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_mask.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.lib.row_bool_subset_object", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_mask.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_out); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_3lib_85group_count(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_3lib_85group_count = {__Pyx_NAMESTR("group_count"), (PyCFunction)__pyx_pw_6pandas_3lib_85group_count, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_3lib_85group_count(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_values = 0; Py_ssize_t __pyx_v_size; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("group_count (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__values,&__pyx_n_s__size,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__values)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__size)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("group_count", 1, 2, 2, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1003; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "group_count") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1003; __pyx_clineno = __LINE__; goto __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_size = __Pyx_PyIndex_AsSsize_t(values[1]); if (unlikely((__pyx_v_size == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1003; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("group_count", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1003; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.lib.group_count", __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_filename = __pyx_f[2]; __pyx_lineno = 1003; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_3lib_84group_count(__pyx_self, __pyx_v_values, __pyx_v_size); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/lib.pyx":1003 * * * def group_count(ndarray[int64_t] values, Py_ssize_t size): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = len(values) */ static PyObject *__pyx_pf_6pandas_3lib_84group_count(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, Py_ssize_t __pyx_v_size) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_n; PyArrayObject *__pyx_v_counts = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_counts; __Pyx_Buffer __pyx_pybuffer_counts; __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; __pyx_t_5numpy_int64_t __pyx_t_14; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("group_count", 0); __pyx_pybuffer_counts.pybuffer.buf = NULL; __pyx_pybuffer_counts.refcount = 0; __pyx_pybuffernd_counts.data = NULL; __pyx_pybuffernd_counts.rcbuffer = &__pyx_pybuffer_counts; __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_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1003; __pyx_clineno = __LINE__; goto __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/lib.pyx":1005 * def group_count(ndarray[int64_t] values, Py_ssize_t size): * cdef: * Py_ssize_t i, n = len(values) # <<<<<<<<<<<<<< * ndarray[int64_t] counts * */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1005; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/lib.pyx":1008 * ndarray[int64_t] counts * * counts = np.zeros(size, dtype=np.int64) # <<<<<<<<<<<<<< * for i in range(n): * counts[values[i]] += 1 */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1008; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__zeros); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1008; __pyx_clineno = __LINE__; goto __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_size); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1008; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1008; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1008; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_2)); __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1008; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s__int64); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1008; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__dtype), __pyx_t_6) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1008; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1008; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __Pyx_DECREF(((PyObject *)__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_filename = __pyx_f[2]; __pyx_lineno = 1008; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_7 = ((PyArrayObject *)__pyx_t_6); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_counts.rcbuffer->pybuffer); __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_counts.rcbuffer->pybuffer, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_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_counts.rcbuffer->pybuffer, (PyObject*)__pyx_v_counts, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_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_pybuffernd_counts.diminfo[0].strides = __pyx_pybuffernd_counts.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_counts.diminfo[0].shape = __pyx_pybuffernd_counts.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1008; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_7 = 0; __pyx_v_counts = ((PyArrayObject *)__pyx_t_6); __pyx_t_6 = 0; /* "pandas/lib.pyx":1009 * * counts = np.zeros(size, dtype=np.int64) * for i in range(n): # <<<<<<<<<<<<<< * counts[values[i]] += 1 * return counts */ __pyx_t_1 = __pyx_v_n; for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_1; __pyx_t_12+=1) { __pyx_v_i = __pyx_t_12; /* "pandas/lib.pyx":1010 * counts = np.zeros(size, dtype=np.int64) * for i in range(n): * counts[values[i]] += 1 # <<<<<<<<<<<<<< * return counts * */ __pyx_t_13 = __pyx_v_i; __pyx_t_8 = -1; if (__pyx_t_13 < 0) { __pyx_t_13 += __pyx_pybuffernd_values.diminfo[0].shape; if (unlikely(__pyx_t_13 < 0)) __pyx_t_8 = 0; } else if (unlikely(__pyx_t_13 >= __pyx_pybuffernd_values.diminfo[0].shape)) __pyx_t_8 = 0; if (unlikely(__pyx_t_8 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_8); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1010; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_14 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_values.diminfo[0].strides)); __pyx_t_8 = -1; if (__pyx_t_14 < 0) { __pyx_t_14 += __pyx_pybuffernd_counts.diminfo[0].shape; if (unlikely(__pyx_t_14 < 0)) __pyx_t_8 = 0; } else if (unlikely(__pyx_t_14 >= __pyx_pybuffernd_counts.diminfo[0].shape)) __pyx_t_8 = 0; if (unlikely(__pyx_t_8 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_8); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1010; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_counts.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_counts.diminfo[0].strides) += 1; } /* "pandas/lib.pyx":1011 * for i in range(n): * counts[values[i]] += 1 * return counts # <<<<<<<<<<<<<< * * def lookup_values(ndarray[object] values, dict mapping): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_counts)); __pyx_r = ((PyObject *)__pyx_v_counts); goto __pyx_L0; __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_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_counts.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.lib.group_count", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_counts.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_counts); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_3lib_87lookup_values(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_3lib_87lookup_values = {__Pyx_NAMESTR("lookup_values"), (PyCFunction)__pyx_pw_6pandas_3lib_87lookup_values, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_3lib_87lookup_values(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_values = 0; PyObject *__pyx_v_mapping = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("lookup_values (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__values,&__pyx_n_s__mapping,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__values)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__mapping)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("lookup_values", 1, 2, 2, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1013; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "lookup_values") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1013; __pyx_clineno = __LINE__; goto __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_mapping = ((PyObject*)values[1]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("lookup_values", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1013; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.lib.lookup_values", __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_filename = __pyx_f[2]; __pyx_lineno = 1013; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_mapping), (&PyDict_Type), 1, "mapping", 1))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1013; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_3lib_86lookup_values(__pyx_self, __pyx_v_values, __pyx_v_mapping); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/lib.pyx":1013 * return counts * * def lookup_values(ndarray[object] values, dict mapping): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = len(values) */ static PyObject *__pyx_pf_6pandas_3lib_86lookup_values(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyObject *__pyx_v_mapping) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_n; PyObject *__pyx_v_result = NULL; __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; Py_ssize_t __pyx_t_6; Py_ssize_t __pyx_t_7; int __pyx_t_8; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("lookup_values", 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_object, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1013; __pyx_clineno = __LINE__; goto __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/lib.pyx":1015 * def lookup_values(ndarray[object] values, dict mapping): * cdef: * Py_ssize_t i, n = len(values) # <<<<<<<<<<<<<< * * result = np.empty(n, dtype='O') */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1015; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/lib.pyx":1017 * Py_ssize_t i, n = len(values) * * result = np.empty(n, dtype='O') # <<<<<<<<<<<<<< * for i in range(n): * result[i] = mapping[values[i]] */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1017; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 1017; __pyx_clineno = __LINE__; goto __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_n); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1017; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1017; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1017; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_2)); if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__dtype), ((PyObject *)__pyx_n_s__O)) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1017; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_5 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1017; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __pyx_v_result = __pyx_t_5; __pyx_t_5 = 0; /* "pandas/lib.pyx":1018 * * result = np.empty(n, dtype='O') * for i in range(n): # <<<<<<<<<<<<<< * result[i] = mapping[values[i]] * return maybe_convert_objects(result) */ __pyx_t_1 = __pyx_v_n; for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_1; __pyx_t_6+=1) { __pyx_v_i = __pyx_t_6; /* "pandas/lib.pyx":1019 * result = np.empty(n, dtype='O') * for i in range(n): * result[i] = mapping[values[i]] # <<<<<<<<<<<<<< * return maybe_convert_objects(result) * */ if (unlikely(((PyObject *)__pyx_v_mapping) == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1019; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_7 = __pyx_v_i; __pyx_t_8 = -1; if (__pyx_t_7 < 0) { __pyx_t_7 += __pyx_pybuffernd_values.diminfo[0].shape; if (unlikely(__pyx_t_7 < 0)) __pyx_t_8 = 0; } else if (unlikely(__pyx_t_7 >= __pyx_pybuffernd_values.diminfo[0].shape)) __pyx_t_8 = 0; if (unlikely(__pyx_t_8 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_8); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1019; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_5 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_7, __pyx_pybuffernd_values.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_5); __pyx_t_2 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_mapping), __pyx_t_5); if (!__pyx_t_2) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1019; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__Pyx_SetItemInt(__pyx_v_result, __pyx_v_i, __pyx_t_2, sizeof(Py_ssize_t), PyInt_FromSsize_t, 0, 1, 1) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1019; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } /* "pandas/lib.pyx":1020 * for i in range(n): * result[i] = mapping[values[i]] * return maybe_convert_objects(result) # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_12); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1020; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1020; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_v_result); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_result); __Pyx_GIVEREF(__pyx_v_result); __pyx_t_4 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1020; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; __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_XDECREF(__pyx_t_5); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __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.lib.lookup_values", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF(__pyx_v_result); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_3lib_89count_level_1d(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_3lib_89count_level_1d = {__Pyx_NAMESTR("count_level_1d"), (PyCFunction)__pyx_pw_6pandas_3lib_89count_level_1d, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_3lib_89count_level_1d(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_mask = 0; PyArrayObject *__pyx_v_labels = 0; Py_ssize_t __pyx_v_max_bin; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("count_level_1d (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__mask,&__pyx_n_s__labels,&__pyx_n_s__max_bin,0}; PyObject* values[3] = {0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__mask)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__labels)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("count_level_1d", 1, 3, 3, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1023; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__max_bin)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("count_level_1d", 1, 3, 3, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1023; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "count_level_1d") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1023; __pyx_clineno = __LINE__; goto __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_mask = ((PyArrayObject *)values[0]); __pyx_v_labels = ((PyArrayObject *)values[1]); __pyx_v_max_bin = __Pyx_PyIndex_AsSsize_t(values[2]); if (unlikely((__pyx_v_max_bin == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1024; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("count_level_1d", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1023; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.lib.count_level_1d", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_mask), __pyx_ptype_5numpy_ndarray, 1, "mask", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1023; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_labels), __pyx_ptype_5numpy_ndarray, 1, "labels", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1024; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_3lib_88count_level_1d(__pyx_self, __pyx_v_mask, __pyx_v_labels, __pyx_v_max_bin); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/lib.pyx":1023 * * * def count_level_1d(ndarray[uint8_t, cast=True] mask, # <<<<<<<<<<<<<< * ndarray[int64_t] labels, Py_ssize_t max_bin): * cdef: */ static PyObject *__pyx_pf_6pandas_3lib_88count_level_1d(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_mask, PyArrayObject *__pyx_v_labels, Py_ssize_t __pyx_v_max_bin) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_n; PyArrayObject *__pyx_v_counts = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_counts; __Pyx_Buffer __pyx_pybuffer_counts; __Pyx_LocalBuf_ND __pyx_pybuffernd_labels; __Pyx_Buffer __pyx_pybuffer_labels; __Pyx_LocalBuf_ND __pyx_pybuffernd_mask; __Pyx_Buffer __pyx_pybuffer_mask; 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; PyArrayObject *__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; Py_ssize_t __pyx_t_11; int __pyx_t_12; Py_ssize_t __pyx_t_13; __pyx_t_5numpy_int64_t __pyx_t_14; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("count_level_1d", 0); __pyx_pybuffer_counts.pybuffer.buf = NULL; __pyx_pybuffer_counts.refcount = 0; __pyx_pybuffernd_counts.data = NULL; __pyx_pybuffernd_counts.rcbuffer = &__pyx_pybuffer_counts; __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_labels.pybuffer.buf = NULL; __pyx_pybuffer_labels.refcount = 0; __pyx_pybuffernd_labels.data = NULL; __pyx_pybuffernd_labels.rcbuffer = &__pyx_pybuffer_labels; { __Pyx_BufFmt_StackElem __pyx_stack[1]; 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)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1023; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_labels.rcbuffer->pybuffer, (PyObject*)__pyx_v_labels, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1023; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_labels.diminfo[0].strides = __pyx_pybuffernd_labels.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_labels.diminfo[0].shape = __pyx_pybuffernd_labels.rcbuffer->pybuffer.shape[0]; /* "pandas/lib.pyx":1029 * ndarray[int64_t] counts * * counts = np.zeros(max_bin, dtype='i8') # <<<<<<<<<<<<<< * * n = len(mask) */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1029; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s__zeros); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1029; __pyx_clineno = __LINE__; goto __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_bin); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1029; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1029; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1029; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_1)); if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__dtype), ((PyObject *)__pyx_n_s__i8)) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1029; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_4 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_3), ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1029; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__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_filename = __pyx_f[2]; __pyx_lineno = 1029; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_5 = ((PyArrayObject *)__pyx_t_4); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_counts.rcbuffer->pybuffer); __pyx_t_6 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_counts.rcbuffer->pybuffer, (PyObject*)__pyx_t_5, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_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_counts.rcbuffer->pybuffer, (PyObject*)__pyx_v_counts, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_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_pybuffernd_counts.diminfo[0].strides = __pyx_pybuffernd_counts.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_counts.diminfo[0].shape = __pyx_pybuffernd_counts.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1029; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_5 = 0; __pyx_v_counts = ((PyArrayObject *)__pyx_t_4); __pyx_t_4 = 0; /* "pandas/lib.pyx":1031 * counts = np.zeros(max_bin, dtype='i8') * * n = len(mask) # <<<<<<<<<<<<<< * * for i from 0 <= i < n: */ __pyx_t_10 = PyObject_Length(((PyObject *)__pyx_v_mask)); if (unlikely(__pyx_t_10 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1031; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_10; /* "pandas/lib.pyx":1033 * n = len(mask) * * for i from 0 <= i < n: # <<<<<<<<<<<<<< * if mask[i]: * counts[labels[i]] += 1 */ __pyx_t_10 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_10; __pyx_v_i++) { /* "pandas/lib.pyx":1034 * * for i from 0 <= i < n: * if mask[i]: # <<<<<<<<<<<<<< * counts[labels[i]] += 1 * */ __pyx_t_11 = __pyx_v_i; __pyx_t_6 = -1; if (__pyx_t_11 < 0) { __pyx_t_11 += __pyx_pybuffernd_mask.diminfo[0].shape; if (unlikely(__pyx_t_11 < 0)) __pyx_t_6 = 0; } else if (unlikely(__pyx_t_11 >= __pyx_pybuffernd_mask.diminfo[0].shape)) __pyx_t_6 = 0; if (unlikely(__pyx_t_6 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_6); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1034; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_12 = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_mask.rcbuffer->pybuffer.buf, __pyx_t_11, __pyx_pybuffernd_mask.diminfo[0].strides)) != 0); if (__pyx_t_12) { /* "pandas/lib.pyx":1035 * for i from 0 <= i < n: * if mask[i]: * counts[labels[i]] += 1 # <<<<<<<<<<<<<< * * return counts */ __pyx_t_13 = __pyx_v_i; __pyx_t_6 = -1; if (__pyx_t_13 < 0) { __pyx_t_13 += __pyx_pybuffernd_labels.diminfo[0].shape; if (unlikely(__pyx_t_13 < 0)) __pyx_t_6 = 0; } else if (unlikely(__pyx_t_13 >= __pyx_pybuffernd_labels.diminfo[0].shape)) __pyx_t_6 = 0; if (unlikely(__pyx_t_6 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_6); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1035; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_14 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_labels.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_labels.diminfo[0].strides)); __pyx_t_6 = -1; if (__pyx_t_14 < 0) { __pyx_t_14 += __pyx_pybuffernd_counts.diminfo[0].shape; if (unlikely(__pyx_t_14 < 0)) __pyx_t_6 = 0; } else if (unlikely(__pyx_t_14 >= __pyx_pybuffernd_counts.diminfo[0].shape)) __pyx_t_6 = 0; if (unlikely(__pyx_t_6 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_6); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1035; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_counts.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_counts.diminfo[0].strides) += 1; goto __pyx_L5; } __pyx_L5:; } /* "pandas/lib.pyx":1037 * counts[labels[i]] += 1 * * return counts # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_counts)); __pyx_r = ((PyObject *)__pyx_v_counts); goto __pyx_L0; __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_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_counts.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_labels.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_mask.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.lib.count_level_1d", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_counts.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_labels.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_mask.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_counts); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_3lib_91count_level_2d(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_3lib_91count_level_2d = {__Pyx_NAMESTR("count_level_2d"), (PyCFunction)__pyx_pw_6pandas_3lib_91count_level_2d, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_3lib_91count_level_2d(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_mask = 0; PyArrayObject *__pyx_v_labels = 0; Py_ssize_t __pyx_v_max_bin; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("count_level_2d (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__mask,&__pyx_n_s__labels,&__pyx_n_s__max_bin,0}; PyObject* values[3] = {0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__mask)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__labels)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("count_level_2d", 1, 3, 3, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1040; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__max_bin)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("count_level_2d", 1, 3, 3, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1040; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "count_level_2d") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1040; __pyx_clineno = __LINE__; goto __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_mask = ((PyArrayObject *)values[0]); __pyx_v_labels = ((PyArrayObject *)values[1]); __pyx_v_max_bin = __Pyx_PyIndex_AsSsize_t(values[2]); if (unlikely((__pyx_v_max_bin == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1041; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("count_level_2d", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1040; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.lib.count_level_2d", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_mask), __pyx_ptype_5numpy_ndarray, 1, "mask", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1040; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_labels), __pyx_ptype_5numpy_ndarray, 1, "labels", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1041; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_3lib_90count_level_2d(__pyx_self, __pyx_v_mask, __pyx_v_labels, __pyx_v_max_bin); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/lib.pyx":1040 * * * def count_level_2d(ndarray[uint8_t, ndim=2, cast=True] mask, # <<<<<<<<<<<<<< * ndarray[int64_t] labels, Py_ssize_t max_bin): * cdef: */ static PyObject *__pyx_pf_6pandas_3lib_90count_level_2d(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_mask, PyArrayObject *__pyx_v_labels, Py_ssize_t __pyx_v_max_bin) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_k; Py_ssize_t __pyx_v_n; PyArrayObject *__pyx_v_counts = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_counts; __Pyx_Buffer __pyx_pybuffer_counts; __Pyx_LocalBuf_ND __pyx_pybuffernd_labels; __Pyx_Buffer __pyx_pybuffer_labels; __Pyx_LocalBuf_ND __pyx_pybuffernd_mask; __Pyx_Buffer __pyx_pybuffer_mask; 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 *); Py_ssize_t __pyx_t_6; Py_ssize_t __pyx_t_7; PyArrayObject *__pyx_t_8 = NULL; int __pyx_t_9; PyObject *__pyx_t_10 = NULL; PyObject *__pyx_t_11 = NULL; PyObject *__pyx_t_12 = NULL; Py_ssize_t __pyx_t_13; Py_ssize_t __pyx_t_14; int __pyx_t_15; Py_ssize_t __pyx_t_16; __pyx_t_5numpy_int64_t __pyx_t_17; Py_ssize_t __pyx_t_18; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("count_level_2d", 0); __pyx_pybuffer_counts.pybuffer.buf = NULL; __pyx_pybuffer_counts.refcount = 0; __pyx_pybuffernd_counts.data = NULL; __pyx_pybuffernd_counts.rcbuffer = &__pyx_pybuffer_counts; __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_labels.pybuffer.buf = NULL; __pyx_pybuffer_labels.refcount = 0; __pyx_pybuffernd_labels.data = NULL; __pyx_pybuffernd_labels.rcbuffer = &__pyx_pybuffer_labels; { __Pyx_BufFmt_StackElem __pyx_stack[1]; 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, 2, 1, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1040; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; __pyx_pybuffernd_mask.diminfo[1].strides = __pyx_pybuffernd_mask.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_mask.diminfo[1].shape = __pyx_pybuffernd_mask.rcbuffer->pybuffer.shape[1]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_labels.rcbuffer->pybuffer, (PyObject*)__pyx_v_labels, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1040; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_labels.diminfo[0].strides = __pyx_pybuffernd_labels.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_labels.diminfo[0].shape = __pyx_pybuffernd_labels.rcbuffer->pybuffer.shape[0]; /* "pandas/lib.pyx":1046 * ndarray[int64_t, ndim=2] counts * * n, k = ( mask).shape # <<<<<<<<<<<<<< * counts = np.zeros((max_bin, k), dtype='i8') * */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_mask), __pyx_n_s__shape); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1046; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) { PyObject* sequence = __pyx_t_1; #if CYTHON_COMPILING_IN_CPYTHON Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1046; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1); } else { __pyx_t_2 = PyList_GET_ITEM(sequence, 0); __pyx_t_3 = PyList_GET_ITEM(sequence, 1); } __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); #else __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1046; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1046; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } else { Py_ssize_t index = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1046; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_5 = Py_TYPE(__pyx_t_4)->tp_iternext; index = 0; __pyx_t_2 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_2)) goto __pyx_L3_unpacking_failed; __Pyx_GOTREF(__pyx_t_2); index = 1; __pyx_t_3 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_3)) goto __pyx_L3_unpacking_failed; __Pyx_GOTREF(__pyx_t_3); if (__Pyx_IternextUnpackEndCheck(__pyx_t_5(__pyx_t_4), 2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1046; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 1046; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_L4_unpacking_done:; } __pyx_t_6 = __Pyx_PyIndex_AsSsize_t(__pyx_t_2); if (unlikely((__pyx_t_6 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1046; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_7 = __Pyx_PyIndex_AsSsize_t(__pyx_t_3); if (unlikely((__pyx_t_7 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1046; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_n = __pyx_t_6; __pyx_v_k = __pyx_t_7; /* "pandas/lib.pyx":1047 * * n, k = ( mask).shape * counts = np.zeros((max_bin, k), dtype='i8') # <<<<<<<<<<<<<< * * for i from 0 <= i < n: */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1047; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s__zeros); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1047; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_max_bin); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1047; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_k); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1047; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1047; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_1 = 0; __pyx_t_2 = 0; __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1047; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_t_4)); __Pyx_GIVEREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __pyx_t_4 = PyDict_New(); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1047; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_4)); if (PyDict_SetItem(__pyx_t_4, ((PyObject *)__pyx_n_s__dtype), ((PyObject *)__pyx_n_s__i8)) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1047; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_1 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_2), ((PyObject *)__pyx_t_4)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1047; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __Pyx_DECREF(((PyObject *)__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_filename = __pyx_f[2]; __pyx_lineno = 1047; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_8 = ((PyArrayObject *)__pyx_t_1); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_counts.rcbuffer->pybuffer); __pyx_t_9 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_counts.rcbuffer->pybuffer, (PyObject*)__pyx_t_8, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack); if (unlikely(__pyx_t_9 < 0)) { PyErr_Fetch(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_counts.rcbuffer->pybuffer, (PyObject*)__pyx_v_counts, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_11); Py_XDECREF(__pyx_t_12); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_10, __pyx_t_11, __pyx_t_12); } } __pyx_pybuffernd_counts.diminfo[0].strides = __pyx_pybuffernd_counts.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_counts.diminfo[0].shape = __pyx_pybuffernd_counts.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_counts.diminfo[1].strides = __pyx_pybuffernd_counts.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_counts.diminfo[1].shape = __pyx_pybuffernd_counts.rcbuffer->pybuffer.shape[1]; if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1047; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_8 = 0; __pyx_v_counts = ((PyArrayObject *)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/lib.pyx":1049 * counts = np.zeros((max_bin, k), dtype='i8') * * for i from 0 <= i < n: # <<<<<<<<<<<<<< * for j from 0 <= j < k: * if mask[i, j]: */ __pyx_t_7 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_7; __pyx_v_i++) { /* "pandas/lib.pyx":1050 * * for i from 0 <= i < n: * for j from 0 <= j < k: # <<<<<<<<<<<<<< * if mask[i, j]: * counts[labels[i], j] += 1 */ __pyx_t_6 = __pyx_v_k; for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_6; __pyx_v_j++) { /* "pandas/lib.pyx":1051 * for i from 0 <= i < n: * for j from 0 <= j < k: * if mask[i, j]: # <<<<<<<<<<<<<< * counts[labels[i], j] += 1 * */ __pyx_t_13 = __pyx_v_i; __pyx_t_14 = __pyx_v_j; __pyx_t_9 = -1; if (__pyx_t_13 < 0) { __pyx_t_13 += __pyx_pybuffernd_mask.diminfo[0].shape; if (unlikely(__pyx_t_13 < 0)) __pyx_t_9 = 0; } else if (unlikely(__pyx_t_13 >= __pyx_pybuffernd_mask.diminfo[0].shape)) __pyx_t_9 = 0; if (__pyx_t_14 < 0) { __pyx_t_14 += __pyx_pybuffernd_mask.diminfo[1].shape; if (unlikely(__pyx_t_14 < 0)) __pyx_t_9 = 1; } else if (unlikely(__pyx_t_14 >= __pyx_pybuffernd_mask.diminfo[1].shape)) __pyx_t_9 = 1; if (unlikely(__pyx_t_9 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_9); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1051; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_15 = ((*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_mask.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_mask.diminfo[0].strides, __pyx_t_14, __pyx_pybuffernd_mask.diminfo[1].strides)) != 0); if (__pyx_t_15) { /* "pandas/lib.pyx":1052 * for j from 0 <= j < k: * if mask[i, j]: * counts[labels[i], j] += 1 # <<<<<<<<<<<<<< * * return counts */ __pyx_t_16 = __pyx_v_i; __pyx_t_9 = -1; if (__pyx_t_16 < 0) { __pyx_t_16 += __pyx_pybuffernd_labels.diminfo[0].shape; if (unlikely(__pyx_t_16 < 0)) __pyx_t_9 = 0; } else if (unlikely(__pyx_t_16 >= __pyx_pybuffernd_labels.diminfo[0].shape)) __pyx_t_9 = 0; if (unlikely(__pyx_t_9 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_9); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1052; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_17 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_labels.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_labels.diminfo[0].strides)); __pyx_t_18 = __pyx_v_j; __pyx_t_9 = -1; if (__pyx_t_17 < 0) { __pyx_t_17 += __pyx_pybuffernd_counts.diminfo[0].shape; if (unlikely(__pyx_t_17 < 0)) __pyx_t_9 = 0; } else if (unlikely(__pyx_t_17 >= __pyx_pybuffernd_counts.diminfo[0].shape)) __pyx_t_9 = 0; if (__pyx_t_18 < 0) { __pyx_t_18 += __pyx_pybuffernd_counts.diminfo[1].shape; if (unlikely(__pyx_t_18 < 0)) __pyx_t_9 = 1; } else if (unlikely(__pyx_t_18 >= __pyx_pybuffernd_counts.diminfo[1].shape)) __pyx_t_9 = 1; if (unlikely(__pyx_t_9 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_9); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1052; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_counts.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_counts.diminfo[0].strides, __pyx_t_18, __pyx_pybuffernd_counts.diminfo[1].strides) += 1; goto __pyx_L9; } __pyx_L9:; } } /* "pandas/lib.pyx":1054 * counts[labels[i], j] += 1 * * return counts # <<<<<<<<<<<<<< * * cdef class _PandasNull: */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_counts)); __pyx_r = ((PyObject *)__pyx_v_counts); goto __pyx_L0; __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_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_counts.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_labels.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_mask.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.lib.count_level_2d", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_counts.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_labels.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_mask.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_counts); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_3lib_11_PandasNull_1__richcmp__(PyObject *__pyx_v_self, PyObject *__pyx_v_other, int __pyx_v_op); /*proto*/ static PyObject *__pyx_pw_6pandas_3lib_11_PandasNull_1__richcmp__(PyObject *__pyx_v_self, PyObject *__pyx_v_other, int __pyx_v_op) { CYTHON_UNUSED int __pyx_lineno = 0; CYTHON_UNUSED const char *__pyx_filename = NULL; CYTHON_UNUSED int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__richcmp__ (wrapper)", 0); if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_self), __pyx_ptype_6pandas_3lib__PandasNull, 1, "self", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1058; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_3lib_11_PandasNull___richcmp__(((struct __pyx_obj_6pandas_3lib__PandasNull *)__pyx_v_self), ((PyObject *)__pyx_v_other), ((int)__pyx_v_op)); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/lib.pyx":1058 * cdef class _PandasNull: * * def __richcmp__(_PandasNull self, object other, int op): # <<<<<<<<<<<<<< * if op == 2: # == * return isinstance(other, _PandasNull) */ static PyObject *__pyx_pf_6pandas_3lib_11_PandasNull___richcmp__(CYTHON_UNUSED struct __pyx_obj_6pandas_3lib__PandasNull *__pyx_v_self, PyObject *__pyx_v_other, int __pyx_v_op) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__richcmp__", 0); /* "pandas/lib.pyx":1061 * if op == 2: # == * return isinstance(other, _PandasNull) * elif op == 3: # != # <<<<<<<<<<<<<< * return not isinstance(other, _PandasNull) * else: */ switch (__pyx_v_op) { /* "pandas/lib.pyx":1059 * * def __richcmp__(_PandasNull self, object other, int op): * if op == 2: # == # <<<<<<<<<<<<<< * return isinstance(other, _PandasNull) * elif op == 3: # != */ case 2: /* "pandas/lib.pyx":1060 * def __richcmp__(_PandasNull self, object other, int op): * if op == 2: # == * return isinstance(other, _PandasNull) # <<<<<<<<<<<<<< * elif op == 3: # != * return not isinstance(other, _PandasNull) */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_other, ((PyObject*)__pyx_ptype_6pandas_3lib__PandasNull)); __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1060; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; break; /* "pandas/lib.pyx":1061 * if op == 2: # == * return isinstance(other, _PandasNull) * elif op == 3: # != # <<<<<<<<<<<<<< * return not isinstance(other, _PandasNull) * else: */ case 3: /* "pandas/lib.pyx":1062 * return isinstance(other, _PandasNull) * elif op == 3: # != * return not isinstance(other, _PandasNull) # <<<<<<<<<<<<<< * else: * return False */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_other, ((PyObject*)__pyx_ptype_6pandas_3lib__PandasNull)); __pyx_t_2 = __Pyx_PyBool_FromLong((!(__pyx_t_1 != 0))); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1062; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; break; default: /* "pandas/lib.pyx":1064 * return not isinstance(other, _PandasNull) * else: * return False # <<<<<<<<<<<<<< * * def __hash__(self): */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1064; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; break; } __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("pandas.lib._PandasNull.__richcmp__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static Py_hash_t __pyx_pw_6pandas_3lib_11_PandasNull_3__hash__(PyObject *__pyx_v_self); /*proto*/ static Py_hash_t __pyx_pw_6pandas_3lib_11_PandasNull_3__hash__(PyObject *__pyx_v_self) { Py_hash_t __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__hash__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_3lib_11_PandasNull_2__hash__(((struct __pyx_obj_6pandas_3lib__PandasNull *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/lib.pyx":1066 * return False * * def __hash__(self): # <<<<<<<<<<<<<< * return 0 * */ static Py_hash_t __pyx_pf_6pandas_3lib_11_PandasNull_2__hash__(CYTHON_UNUSED struct __pyx_obj_6pandas_3lib__PandasNull *__pyx_v_self) { Py_hash_t __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__hash__", 0); /* "pandas/lib.pyx":1067 * * def __hash__(self): * return 0 # <<<<<<<<<<<<<< * * pandas_null = _PandasNull() */ __pyx_r = 0; goto __pyx_L0; __pyx_r = 0; __pyx_L0:; if (unlikely(__pyx_r == -1) && !PyErr_Occurred()) __pyx_r = -2; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_3lib_93fast_zip_fillna(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6pandas_3lib_92fast_zip_fillna[] = "\n For zipping multiple ndarrays into an ndarray of tuples\n "; static PyMethodDef __pyx_mdef_6pandas_3lib_93fast_zip_fillna = {__Pyx_NAMESTR("fast_zip_fillna"), (PyCFunction)__pyx_pw_6pandas_3lib_93fast_zip_fillna, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_3lib_92fast_zip_fillna)}; static PyObject *__pyx_pw_6pandas_3lib_93fast_zip_fillna(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_ndarrays = 0; PyObject *__pyx_v_fill_value = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("fast_zip_fillna (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__ndarrays,&__pyx_n_s__fill_value,0}; PyObject* values[2] = {0,0}; values[1] = __pyx_k_19; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__ndarrays)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__fill_value); if (value) { values[1] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "fast_zip_fillna") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1071; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_ndarrays = ((PyObject*)values[0]); __pyx_v_fill_value = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("fast_zip_fillna", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1071; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.lib.fast_zip_fillna", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ndarrays), (&PyList_Type), 1, "ndarrays", 1))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1071; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_3lib_92fast_zip_fillna(__pyx_self, __pyx_v_ndarrays, __pyx_v_fill_value); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/lib.pyx":1071 * pandas_null = _PandasNull() * * def fast_zip_fillna(list ndarrays, fill_value=pandas_null): # <<<<<<<<<<<<<< * ''' * For zipping multiple ndarrays into an ndarray of tuples */ static PyObject *__pyx_pf_6pandas_3lib_92fast_zip_fillna(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_ndarrays, PyObject *__pyx_v_fill_value) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_k; Py_ssize_t __pyx_v_n; PyArrayObject *__pyx_v_result = 0; PyArrayIterObject *__pyx_v_it = 0; PyObject *__pyx_v_val = 0; PyObject *__pyx_v_tup = 0; PyObject *__pyx_v_arr = NULL; __Pyx_LocalBuf_ND __pyx_pybuffernd_result; __Pyx_Buffer __pyx_pybuffer_result; 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; PyArrayObject *__pyx_t_6 = NULL; 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; int __pyx_t_12; Py_ssize_t __pyx_t_13; PyObject **__pyx_t_14; Py_ssize_t __pyx_t_15; Py_ssize_t __pyx_t_16; Py_ssize_t __pyx_t_17; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("fast_zip_fillna", 0); __pyx_pybuffer_result.pybuffer.buf = NULL; __pyx_pybuffer_result.refcount = 0; __pyx_pybuffernd_result.data = NULL; __pyx_pybuffernd_result.rcbuffer = &__pyx_pybuffer_result; /* "pandas/lib.pyx":1081 * object val, tup * * k = len(ndarrays) # <<<<<<<<<<<<<< * n = len(ndarrays[0]) * */ if (unlikely(((PyObject *)__pyx_v_ndarrays) == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1081; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_1 = PyList_GET_SIZE(((PyObject *)__pyx_v_ndarrays)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1081; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_k = __pyx_t_1; /* "pandas/lib.pyx":1082 * * k = len(ndarrays) * n = len(ndarrays[0]) # <<<<<<<<<<<<<< * * result = np.empty(n, dtype=object) */ if (unlikely(((PyObject *)__pyx_v_ndarrays) == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1082; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_2 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_ndarrays), 0, sizeof(long), PyInt_FromLong, 1, 0, 1); if (!__pyx_t_2) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1082; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = PyObject_Length(__pyx_t_2); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1082; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_n = __pyx_t_1; /* "pandas/lib.pyx":1084 * n = len(ndarrays[0]) * * result = np.empty(n, dtype=object) # <<<<<<<<<<<<<< * * # initialize tuples on first pass */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1084; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 1084; __pyx_clineno = __LINE__; goto __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_n); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1084; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1084; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1084; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_2)); if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__dtype), __pyx_builtin_object) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1084; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_5 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1084; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1084; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_6 = ((PyArrayObject *)__pyx_t_5); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_object, 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_result.rcbuffer->pybuffer, (PyObject*)__pyx_v_result, &__Pyx_TypeInfo_object, 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_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_7 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1084; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_6 = 0; __pyx_v_result = ((PyArrayObject *)__pyx_t_5); __pyx_t_5 = 0; /* "pandas/lib.pyx":1087 * * # initialize tuples on first pass * arr = ndarrays[0] # <<<<<<<<<<<<<< * it = PyArray_IterNew(arr) * for i in range(n): */ if (unlikely(((PyObject *)__pyx_v_ndarrays) == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1087; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_5 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_ndarrays), 0, sizeof(long), PyInt_FromLong, 1, 0, 1); if (!__pyx_t_5) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1087; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_v_arr = __pyx_t_5; __pyx_t_5 = 0; /* "pandas/lib.pyx":1088 * # initialize tuples on first pass * arr = ndarrays[0] * it = PyArray_IterNew(arr) # <<<<<<<<<<<<<< * for i in range(n): * val = PyArray_GETITEM(arr, PyArray_ITER_DATA(it)) */ __pyx_t_5 = PyArray_IterNew(__pyx_v_arr); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1088; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_2 = __pyx_t_5; __Pyx_INCREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_v_it = ((PyArrayIterObject *)__pyx_t_2); __pyx_t_2 = 0; /* "pandas/lib.pyx":1089 * arr = ndarrays[0] * it = PyArray_IterNew(arr) * for i in range(n): # <<<<<<<<<<<<<< * val = PyArray_GETITEM(arr, PyArray_ITER_DATA(it)) * tup = PyTuple_New(k) */ __pyx_t_1 = __pyx_v_n; for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_1; __pyx_t_11+=1) { __pyx_v_i = __pyx_t_11; /* "pandas/lib.pyx":1090 * it = PyArray_IterNew(arr) * for i in range(n): * val = PyArray_GETITEM(arr, PyArray_ITER_DATA(it)) # <<<<<<<<<<<<<< * tup = PyTuple_New(k) * */ if (!(likely(((__pyx_v_arr) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_arr, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1090; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_2 = PyArray_GETITEM(((PyArrayObject *)__pyx_v_arr), PyArray_ITER_DATA(__pyx_v_it)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1090; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_XDECREF_SET(__pyx_v_val, __pyx_t_2); __pyx_t_2 = 0; /* "pandas/lib.pyx":1091 * for i in range(n): * val = PyArray_GETITEM(arr, PyArray_ITER_DATA(it)) * tup = PyTuple_New(k) # <<<<<<<<<<<<<< * * if val != val: */ __pyx_t_2 = ((PyObject *)PyTuple_New(__pyx_v_k)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1091; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_XDECREF_SET(__pyx_v_tup, __pyx_t_2); __pyx_t_2 = 0; /* "pandas/lib.pyx":1093 * tup = PyTuple_New(k) * * if val != val: # <<<<<<<<<<<<<< * val = fill_value * */ __pyx_t_2 = PyObject_RichCompare(__pyx_v_val, __pyx_v_val, Py_NE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1093; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_12 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1093; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_12) { /* "pandas/lib.pyx":1094 * * if val != val: * val = fill_value # <<<<<<<<<<<<<< * * PyTuple_SET_ITEM(tup, 0, val) */ __Pyx_INCREF(__pyx_v_fill_value); __Pyx_DECREF_SET(__pyx_v_val, __pyx_v_fill_value); goto __pyx_L5; } __pyx_L5:; /* "pandas/lib.pyx":1096 * val = fill_value * * PyTuple_SET_ITEM(tup, 0, val) # <<<<<<<<<<<<<< * Py_INCREF(val) * result[i] = tup */ PyTuple_SET_ITEM(__pyx_v_tup, 0, __pyx_v_val); /* "pandas/lib.pyx":1097 * * PyTuple_SET_ITEM(tup, 0, val) * Py_INCREF(val) # <<<<<<<<<<<<<< * result[i] = tup * PyArray_ITER_NEXT(it) */ Py_INCREF(__pyx_v_val); /* "pandas/lib.pyx":1098 * PyTuple_SET_ITEM(tup, 0, val) * Py_INCREF(val) * result[i] = tup # <<<<<<<<<<<<<< * PyArray_ITER_NEXT(it) * */ __pyx_t_13 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_13 < 0) { __pyx_t_13 += __pyx_pybuffernd_result.diminfo[0].shape; if (unlikely(__pyx_t_13 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_13 >= __pyx_pybuffernd_result.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1098; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_14 = __Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_result.diminfo[0].strides); __Pyx_GOTREF(*__pyx_t_14); __Pyx_INCREF(__pyx_v_tup); __Pyx_DECREF(*__pyx_t_14); *__pyx_t_14 = __pyx_v_tup; __Pyx_GIVEREF(*__pyx_t_14); /* "pandas/lib.pyx":1099 * Py_INCREF(val) * result[i] = tup * PyArray_ITER_NEXT(it) # <<<<<<<<<<<<<< * * for j in range(1, k): */ PyArray_ITER_NEXT(__pyx_v_it); } /* "pandas/lib.pyx":1101 * PyArray_ITER_NEXT(it) * * for j in range(1, k): # <<<<<<<<<<<<<< * arr = ndarrays[j] * it = PyArray_IterNew(arr) */ __pyx_t_1 = __pyx_v_k; for (__pyx_t_11 = 1; __pyx_t_11 < __pyx_t_1; __pyx_t_11+=1) { __pyx_v_j = __pyx_t_11; /* "pandas/lib.pyx":1102 * * for j in range(1, k): * arr = ndarrays[j] # <<<<<<<<<<<<<< * it = PyArray_IterNew(arr) * if len(arr) != n: */ if (unlikely(((PyObject *)__pyx_v_ndarrays) == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1102; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_2 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_ndarrays), __pyx_v_j, sizeof(Py_ssize_t), PyInt_FromSsize_t, 1, 1, 1); if (!__pyx_t_2) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1102; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF_SET(__pyx_v_arr, __pyx_t_2); __pyx_t_2 = 0; /* "pandas/lib.pyx":1103 * for j in range(1, k): * arr = ndarrays[j] * it = PyArray_IterNew(arr) # <<<<<<<<<<<<<< * if len(arr) != n: * raise ValueError('all arrays must be same length') */ __pyx_t_2 = PyArray_IterNew(__pyx_v_arr); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1103; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = __pyx_t_2; __Pyx_INCREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF_SET(__pyx_v_it, ((PyArrayIterObject *)__pyx_t_5)); __pyx_t_5 = 0; /* "pandas/lib.pyx":1104 * arr = ndarrays[j] * it = PyArray_IterNew(arr) * if len(arr) != n: # <<<<<<<<<<<<<< * raise ValueError('all arrays must be same length') * */ __pyx_t_15 = PyObject_Length(__pyx_v_arr); if (unlikely(__pyx_t_15 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1104; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_12 = ((__pyx_t_15 != __pyx_v_n) != 0); if (__pyx_t_12) { /* "pandas/lib.pyx":1105 * it = PyArray_IterNew(arr) * if len(arr) != n: * raise ValueError('all arrays must be same length') # <<<<<<<<<<<<<< * * for i in range(n): */ __pyx_t_5 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_20), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1105; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_Raise(__pyx_t_5, 0, 0, 0); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1105; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L8; } __pyx_L8:; /* "pandas/lib.pyx":1107 * raise ValueError('all arrays must be same length') * * for i in range(n): # <<<<<<<<<<<<<< * val = PyArray_GETITEM(arr, PyArray_ITER_DATA(it)) * if val != val: */ __pyx_t_15 = __pyx_v_n; for (__pyx_t_16 = 0; __pyx_t_16 < __pyx_t_15; __pyx_t_16+=1) { __pyx_v_i = __pyx_t_16; /* "pandas/lib.pyx":1108 * * for i in range(n): * val = PyArray_GETITEM(arr, PyArray_ITER_DATA(it)) # <<<<<<<<<<<<<< * if val != val: * val = fill_value */ if (!(likely(((__pyx_v_arr) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_arr, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1108; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_5 = PyArray_GETITEM(((PyArrayObject *)__pyx_v_arr), PyArray_ITER_DATA(__pyx_v_it)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1108; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_XDECREF_SET(__pyx_v_val, __pyx_t_5); __pyx_t_5 = 0; /* "pandas/lib.pyx":1109 * for i in range(n): * val = PyArray_GETITEM(arr, PyArray_ITER_DATA(it)) * if val != val: # <<<<<<<<<<<<<< * val = fill_value * */ __pyx_t_5 = PyObject_RichCompare(__pyx_v_val, __pyx_v_val, Py_NE); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1109; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_12 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1109; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_12) { /* "pandas/lib.pyx":1110 * val = PyArray_GETITEM(arr, PyArray_ITER_DATA(it)) * if val != val: * val = fill_value # <<<<<<<<<<<<<< * * PyTuple_SET_ITEM(result[i], j, val) */ __Pyx_INCREF(__pyx_v_fill_value); __Pyx_DECREF_SET(__pyx_v_val, __pyx_v_fill_value); goto __pyx_L11; } __pyx_L11:; /* "pandas/lib.pyx":1112 * val = fill_value * * PyTuple_SET_ITEM(result[i], j, val) # <<<<<<<<<<<<<< * Py_INCREF(val) * PyArray_ITER_NEXT(it) */ __pyx_t_17 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_17 < 0) { __pyx_t_17 += __pyx_pybuffernd_result.diminfo[0].shape; if (unlikely(__pyx_t_17 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_17 >= __pyx_pybuffernd_result.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1112; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_5 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_result.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_5, __pyx_v_j, __pyx_v_val); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "pandas/lib.pyx":1113 * * PyTuple_SET_ITEM(result[i], j, val) * Py_INCREF(val) # <<<<<<<<<<<<<< * PyArray_ITER_NEXT(it) * */ Py_INCREF(__pyx_v_val); /* "pandas/lib.pyx":1114 * PyTuple_SET_ITEM(result[i], j, val) * Py_INCREF(val) * PyArray_ITER_NEXT(it) # <<<<<<<<<<<<<< * * return result */ PyArray_ITER_NEXT(__pyx_v_it); } } /* "pandas/lib.pyx":1116 * PyArray_ITER_NEXT(it) * * return result # <<<<<<<<<<<<<< * * def duplicated(ndarray[object] values, take_last=False): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_result)); __pyx_r = ((PyObject *)__pyx_v_result); goto __pyx_L0; __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_XDECREF(__pyx_t_5); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.lib.fast_zip_fillna", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_result); __Pyx_XDECREF((PyObject *)__pyx_v_it); __Pyx_XDECREF(__pyx_v_val); __Pyx_XDECREF(__pyx_v_tup); __Pyx_XDECREF(__pyx_v_arr); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_3lib_95duplicated(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_3lib_95duplicated = {__Pyx_NAMESTR("duplicated"), (PyCFunction)__pyx_pw_6pandas_3lib_95duplicated, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_3lib_95duplicated(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_values = 0; PyObject *__pyx_v_take_last = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("duplicated (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__values,&__pyx_n_s__take_last,0}; PyObject* values[2] = {0,0}; values[1] = __pyx_k_21; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__values)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__take_last); if (value) { values[1] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "duplicated") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1118; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_values = ((PyArrayObject *)values[0]); __pyx_v_take_last = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("duplicated", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1118; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.lib.duplicated", __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_filename = __pyx_f[2]; __pyx_lineno = 1118; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_3lib_94duplicated(__pyx_self, __pyx_v_values, __pyx_v_take_last); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/lib.pyx":1118 * return result * * def duplicated(ndarray[object] values, take_last=False): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n */ static PyObject *__pyx_pf_6pandas_3lib_94duplicated(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyObject *__pyx_v_take_last) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_n; PyObject *__pyx_v_seen = 0; PyObject *__pyx_v_row = 0; PyArrayObject *__pyx_v_result = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_result; __Pyx_Buffer __pyx_pybuffer_result; __Pyx_LocalBuf_ND __pyx_pybuffernd_values; __Pyx_Buffer __pyx_pybuffer_values; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; Py_ssize_t __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyArrayObject *__pyx_t_7 = NULL; int __pyx_t_8; int __pyx_t_9; int __pyx_t_10; Py_ssize_t __pyx_t_11; Py_ssize_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_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("duplicated", 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_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_filename = __pyx_f[2]; __pyx_lineno = 1118; __pyx_clineno = __LINE__; goto __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/lib.pyx":1121 * cdef: * Py_ssize_t i, n * dict seen = {} # <<<<<<<<<<<<<< * object row * */ __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1121; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_v_seen = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/lib.pyx":1124 * object row * * n = len(values) # <<<<<<<<<<<<<< * cdef ndarray[uint8_t] result = np.zeros(n, dtype=np.uint8) * */ __pyx_t_2 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1124; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_2; /* "pandas/lib.pyx":1125 * * n = len(values) * cdef ndarray[uint8_t] result = np.zeros(n, dtype=np.uint8) # <<<<<<<<<<<<<< * * if take_last: */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1125; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s__zeros); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1125; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_n); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1125; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1125; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1125; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1125; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s__uint8); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1125; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__dtype), __pyx_t_6) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1125; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1125; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1125; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_7 = ((PyArrayObject *)__pyx_t_6); { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { __pyx_v_result = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_result.rcbuffer->pybuffer.buf = NULL; {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1125; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } else {__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]; } } __pyx_t_7 = 0; __pyx_v_result = ((PyArrayObject *)__pyx_t_6); __pyx_t_6 = 0; /* "pandas/lib.pyx":1127 * cdef ndarray[uint8_t] result = np.zeros(n, dtype=np.uint8) * * if take_last: # <<<<<<<<<<<<<< * for i from n > i >= 0: * row = values[i] */ __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_v_take_last); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1127; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__pyx_t_8) { /* "pandas/lib.pyx":1128 * * if take_last: * for i from n > i >= 0: # <<<<<<<<<<<<<< * row = values[i] * */ for (__pyx_v_i = __pyx_v_n-1; __pyx_v_i >= 0; __pyx_v_i--) { /* "pandas/lib.pyx":1129 * if take_last: * for i from n > i >= 0: * row = values[i] # <<<<<<<<<<<<<< * * if row in seen: */ __pyx_t_2 = __pyx_v_i; __pyx_t_9 = -1; if (__pyx_t_2 < 0) { __pyx_t_2 += __pyx_pybuffernd_values.diminfo[0].shape; if (unlikely(__pyx_t_2 < 0)) __pyx_t_9 = 0; } else if (unlikely(__pyx_t_2 >= __pyx_pybuffernd_values.diminfo[0].shape)) __pyx_t_9 = 0; if (unlikely(__pyx_t_9 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_9); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1129; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_6 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_2, __pyx_pybuffernd_values.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_6); __Pyx_XDECREF_SET(__pyx_v_row, __pyx_t_6); __pyx_t_6 = 0; /* "pandas/lib.pyx":1131 * row = values[i] * * if row in seen: # <<<<<<<<<<<<<< * result[i] = 1 * else: */ __pyx_t_8 = (__Pyx_PyDict_Contains(__pyx_v_row, ((PyObject *)__pyx_v_seen), Py_EQ)); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1131; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_10 = (__pyx_t_8 != 0); if (__pyx_t_10) { /* "pandas/lib.pyx":1132 * * if row in seen: * result[i] = 1 # <<<<<<<<<<<<<< * else: * seen[row] = None */ __pyx_t_11 = __pyx_v_i; __pyx_t_9 = -1; if (__pyx_t_11 < 0) { __pyx_t_11 += __pyx_pybuffernd_result.diminfo[0].shape; if (unlikely(__pyx_t_11 < 0)) __pyx_t_9 = 0; } else if (unlikely(__pyx_t_11 >= __pyx_pybuffernd_result.diminfo[0].shape)) __pyx_t_9 = 0; if (unlikely(__pyx_t_9 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_9); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1132; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_11, __pyx_pybuffernd_result.diminfo[0].strides) = 1; goto __pyx_L6; } /*else*/ { /* "pandas/lib.pyx":1134 * result[i] = 1 * else: * seen[row] = None # <<<<<<<<<<<<<< * result[i] = 0 * else: */ if (PyDict_SetItem(((PyObject *)__pyx_v_seen), __pyx_v_row, Py_None) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1134; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/lib.pyx":1135 * else: * seen[row] = None * result[i] = 0 # <<<<<<<<<<<<<< * else: * for i from 0 <= i < n: */ __pyx_t_12 = __pyx_v_i; __pyx_t_9 = -1; if (__pyx_t_12 < 0) { __pyx_t_12 += __pyx_pybuffernd_result.diminfo[0].shape; if (unlikely(__pyx_t_12 < 0)) __pyx_t_9 = 0; } else if (unlikely(__pyx_t_12 >= __pyx_pybuffernd_result.diminfo[0].shape)) __pyx_t_9 = 0; if (unlikely(__pyx_t_9 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_9); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1135; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_12, __pyx_pybuffernd_result.diminfo[0].strides) = 0; } __pyx_L6:; } goto __pyx_L3; } /*else*/ { /* "pandas/lib.pyx":1137 * result[i] = 0 * else: * for i from 0 <= i < n: # <<<<<<<<<<<<<< * row = values[i] * if row in seen: */ __pyx_t_13 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_13; __pyx_v_i++) { /* "pandas/lib.pyx":1138 * else: * for i from 0 <= i < n: * row = values[i] # <<<<<<<<<<<<<< * if row in seen: * result[i] = 1 */ __pyx_t_14 = __pyx_v_i; __pyx_t_9 = -1; if (__pyx_t_14 < 0) { __pyx_t_14 += __pyx_pybuffernd_values.diminfo[0].shape; if (unlikely(__pyx_t_14 < 0)) __pyx_t_9 = 0; } else if (unlikely(__pyx_t_14 >= __pyx_pybuffernd_values.diminfo[0].shape)) __pyx_t_9 = 0; if (unlikely(__pyx_t_9 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_9); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1138; __pyx_clineno = __LINE__; goto __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_row, __pyx_t_6); __pyx_t_6 = 0; /* "pandas/lib.pyx":1139 * for i from 0 <= i < n: * row = values[i] * if row in seen: # <<<<<<<<<<<<<< * result[i] = 1 * else: */ __pyx_t_10 = (__Pyx_PyDict_Contains(__pyx_v_row, ((PyObject *)__pyx_v_seen), Py_EQ)); if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1139; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_8 = (__pyx_t_10 != 0); if (__pyx_t_8) { /* "pandas/lib.pyx":1140 * row = values[i] * if row in seen: * result[i] = 1 # <<<<<<<<<<<<<< * else: * seen[row] = None */ __pyx_t_15 = __pyx_v_i; __pyx_t_9 = -1; if (__pyx_t_15 < 0) { __pyx_t_15 += __pyx_pybuffernd_result.diminfo[0].shape; if (unlikely(__pyx_t_15 < 0)) __pyx_t_9 = 0; } else if (unlikely(__pyx_t_15 >= __pyx_pybuffernd_result.diminfo[0].shape)) __pyx_t_9 = 0; if (unlikely(__pyx_t_9 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_9); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1140; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_result.diminfo[0].strides) = 1; goto __pyx_L9; } /*else*/ { /* "pandas/lib.pyx":1142 * result[i] = 1 * else: * seen[row] = None # <<<<<<<<<<<<<< * result[i] = 0 * */ if (PyDict_SetItem(((PyObject *)__pyx_v_seen), __pyx_v_row, Py_None) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1142; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/lib.pyx":1143 * else: * seen[row] = None * result[i] = 0 # <<<<<<<<<<<<<< * * return result.view(np.bool_) */ __pyx_t_16 = __pyx_v_i; __pyx_t_9 = -1; if (__pyx_t_16 < 0) { __pyx_t_16 += __pyx_pybuffernd_result.diminfo[0].shape; if (unlikely(__pyx_t_16 < 0)) __pyx_t_9 = 0; } else if (unlikely(__pyx_t_16 >= __pyx_pybuffernd_result.diminfo[0].shape)) __pyx_t_9 = 0; if (unlikely(__pyx_t_9 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_9); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1143; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_result.diminfo[0].strides) = 0; } __pyx_L9:; } } __pyx_L3:; /* "pandas/lib.pyx":1145 * result[i] = 0 * * return result.view(np.bool_) # <<<<<<<<<<<<<< * * def generate_slices(ndarray[int64_t] labels, Py_ssize_t ngroups): */ __Pyx_XDECREF(__pyx_r); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_result), __pyx_n_s__view); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1145; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1145; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s__bool_); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1145; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1145; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1145; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.lib.duplicated", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF(__pyx_v_seen); __Pyx_XDECREF(__pyx_v_row); __Pyx_XDECREF((PyObject *)__pyx_v_result); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_3lib_97generate_slices(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_3lib_97generate_slices = {__Pyx_NAMESTR("generate_slices"), (PyCFunction)__pyx_pw_6pandas_3lib_97generate_slices, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_3lib_97generate_slices(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_labels = 0; Py_ssize_t __pyx_v_ngroups; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("generate_slices (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__labels,&__pyx_n_s__ngroups,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__labels)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__ngroups)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("generate_slices", 1, 2, 2, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1147; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "generate_slices") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1147; __pyx_clineno = __LINE__; goto __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_labels = ((PyArrayObject *)values[0]); __pyx_v_ngroups = __Pyx_PyIndex_AsSsize_t(values[1]); if (unlikely((__pyx_v_ngroups == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1147; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("generate_slices", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1147; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.lib.generate_slices", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_labels), __pyx_ptype_5numpy_ndarray, 1, "labels", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1147; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_3lib_96generate_slices(__pyx_self, __pyx_v_labels, __pyx_v_ngroups); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/lib.pyx":1147 * return result.view(np.bool_) * * def generate_slices(ndarray[int64_t] labels, Py_ssize_t ngroups): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, group_size, n, lab, start */ static PyObject *__pyx_pf_6pandas_3lib_96generate_slices(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_labels, Py_ssize_t __pyx_v_ngroups) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_group_size; Py_ssize_t __pyx_v_n; Py_ssize_t __pyx_v_lab; Py_ssize_t __pyx_v_start; PyArrayObject *__pyx_v_starts = 0; PyObject *__pyx_v_ends = NULL; __Pyx_LocalBuf_ND __pyx_pybuffernd_labels; __Pyx_Buffer __pyx_pybuffer_labels; __Pyx_LocalBuf_ND __pyx_pybuffernd_starts; __Pyx_Buffer __pyx_pybuffer_starts; 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; int __pyx_t_14; Py_ssize_t __pyx_t_15; int __pyx_t_16; int __pyx_t_17; Py_ssize_t __pyx_t_18; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("generate_slices", 0); __pyx_pybuffer_starts.pybuffer.buf = NULL; __pyx_pybuffer_starts.refcount = 0; __pyx_pybuffernd_starts.data = NULL; __pyx_pybuffernd_starts.rcbuffer = &__pyx_pybuffer_starts; __pyx_pybuffer_labels.pybuffer.buf = NULL; __pyx_pybuffer_labels.refcount = 0; __pyx_pybuffernd_labels.data = NULL; __pyx_pybuffernd_labels.rcbuffer = &__pyx_pybuffer_labels; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_labels.rcbuffer->pybuffer, (PyObject*)__pyx_v_labels, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1147; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_labels.diminfo[0].strides = __pyx_pybuffernd_labels.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_labels.diminfo[0].shape = __pyx_pybuffernd_labels.rcbuffer->pybuffer.shape[0]; /* "pandas/lib.pyx":1153 * ndarray[int64_t] starts * * n = len(labels) # <<<<<<<<<<<<<< * * starts = np.zeros(ngroups, dtype=np.int64) */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_labels)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1153; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/lib.pyx":1155 * n = len(labels) * * starts = np.zeros(ngroups, dtype=np.int64) # <<<<<<<<<<<<<< * ends = np.zeros(ngroups, dtype=np.int64) * */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1155; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__zeros); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1155; __pyx_clineno = __LINE__; goto __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_ngroups); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1155; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1155; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1155; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_2)); __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1155; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s__int64); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1155; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__dtype), __pyx_t_6) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1155; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1155; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __Pyx_DECREF(((PyObject *)__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_filename = __pyx_f[2]; __pyx_lineno = 1155; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_7 = ((PyArrayObject *)__pyx_t_6); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_starts.rcbuffer->pybuffer); __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_starts.rcbuffer->pybuffer, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_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_starts.rcbuffer->pybuffer, (PyObject*)__pyx_v_starts, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_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_pybuffernd_starts.diminfo[0].strides = __pyx_pybuffernd_starts.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_starts.diminfo[0].shape = __pyx_pybuffernd_starts.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1155; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_7 = 0; __pyx_v_starts = ((PyArrayObject *)__pyx_t_6); __pyx_t_6 = 0; /* "pandas/lib.pyx":1156 * * starts = np.zeros(ngroups, dtype=np.int64) * ends = np.zeros(ngroups, dtype=np.int64) # <<<<<<<<<<<<<< * * start = 0 */ __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1156; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s__zeros); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1156; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyInt_FromSsize_t(__pyx_v_ngroups); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1156; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1156; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyDict_New(); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1156; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_6)); __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1156; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s__int64); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1156; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (PyDict_SetItem(__pyx_t_6, ((PyObject *)__pyx_n_s__dtype), __pyx_t_5) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1156; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_6)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1156; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0; __pyx_v_ends = __pyx_t_5; __pyx_t_5 = 0; /* "pandas/lib.pyx":1158 * ends = np.zeros(ngroups, dtype=np.int64) * * start = 0 # <<<<<<<<<<<<<< * group_size = 0 * for i in range(n): */ __pyx_v_start = 0; /* "pandas/lib.pyx":1159 * * start = 0 * group_size = 0 # <<<<<<<<<<<<<< * for i in range(n): * group_size += 1 */ __pyx_v_group_size = 0; /* "pandas/lib.pyx":1160 * start = 0 * group_size = 0 * for i in range(n): # <<<<<<<<<<<<<< * group_size += 1 * lab = labels[i] */ __pyx_t_1 = __pyx_v_n; for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_1; __pyx_t_12+=1) { __pyx_v_i = __pyx_t_12; /* "pandas/lib.pyx":1161 * group_size = 0 * for i in range(n): * group_size += 1 # <<<<<<<<<<<<<< * lab = labels[i] * if i == n - 1 or lab != labels[i + 1]: */ __pyx_v_group_size = (__pyx_v_group_size + 1); /* "pandas/lib.pyx":1162 * for i in range(n): * group_size += 1 * lab = labels[i] # <<<<<<<<<<<<<< * if i == n - 1 or lab != labels[i + 1]: * starts[lab] = start */ __pyx_t_13 = __pyx_v_i; __pyx_t_8 = -1; if (__pyx_t_13 < 0) { __pyx_t_13 += __pyx_pybuffernd_labels.diminfo[0].shape; if (unlikely(__pyx_t_13 < 0)) __pyx_t_8 = 0; } else if (unlikely(__pyx_t_13 >= __pyx_pybuffernd_labels.diminfo[0].shape)) __pyx_t_8 = 0; if (unlikely(__pyx_t_8 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_8); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1162; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_lab = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_labels.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_labels.diminfo[0].strides)); /* "pandas/lib.pyx":1163 * group_size += 1 * lab = labels[i] * if i == n - 1 or lab != labels[i + 1]: # <<<<<<<<<<<<<< * starts[lab] = start * ends[lab] = start + group_size */ __pyx_t_14 = ((__pyx_v_i == (__pyx_v_n - 1)) != 0); if (!__pyx_t_14) { __pyx_t_15 = (__pyx_v_i + 1); __pyx_t_8 = -1; if (__pyx_t_15 < 0) { __pyx_t_15 += __pyx_pybuffernd_labels.diminfo[0].shape; if (unlikely(__pyx_t_15 < 0)) __pyx_t_8 = 0; } else if (unlikely(__pyx_t_15 >= __pyx_pybuffernd_labels.diminfo[0].shape)) __pyx_t_8 = 0; if (unlikely(__pyx_t_8 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_8); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1163; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_16 = ((__pyx_v_lab != (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_labels.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_labels.diminfo[0].strides))) != 0); __pyx_t_17 = __pyx_t_16; } else { __pyx_t_17 = __pyx_t_14; } if (__pyx_t_17) { /* "pandas/lib.pyx":1164 * lab = labels[i] * if i == n - 1 or lab != labels[i + 1]: * starts[lab] = start # <<<<<<<<<<<<<< * ends[lab] = start + group_size * start += group_size */ __pyx_t_18 = __pyx_v_lab; __pyx_t_8 = -1; if (__pyx_t_18 < 0) { __pyx_t_18 += __pyx_pybuffernd_starts.diminfo[0].shape; if (unlikely(__pyx_t_18 < 0)) __pyx_t_8 = 0; } else if (unlikely(__pyx_t_18 >= __pyx_pybuffernd_starts.diminfo[0].shape)) __pyx_t_8 = 0; if (unlikely(__pyx_t_8 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_8); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1164; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_starts.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_starts.diminfo[0].strides) = __pyx_v_start; /* "pandas/lib.pyx":1165 * if i == n - 1 or lab != labels[i + 1]: * starts[lab] = start * ends[lab] = start + group_size # <<<<<<<<<<<<<< * start += group_size * group_size = 0 */ __pyx_t_5 = PyInt_FromSsize_t((__pyx_v_start + __pyx_v_group_size)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1165; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); if (__Pyx_SetItemInt(__pyx_v_ends, __pyx_v_lab, __pyx_t_5, sizeof(Py_ssize_t), PyInt_FromSsize_t, 0, 1, 1) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1165; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "pandas/lib.pyx":1166 * starts[lab] = start * ends[lab] = start + group_size * start += group_size # <<<<<<<<<<<<<< * group_size = 0 * */ __pyx_v_start = (__pyx_v_start + __pyx_v_group_size); /* "pandas/lib.pyx":1167 * ends[lab] = start + group_size * start += group_size * group_size = 0 # <<<<<<<<<<<<<< * * return starts, ends */ __pyx_v_group_size = 0; goto __pyx_L5; } __pyx_L5:; } /* "pandas/lib.pyx":1169 * group_size = 0 * * return starts, ends # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1169; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(((PyObject *)__pyx_v_starts)); PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_v_starts)); __Pyx_GIVEREF(((PyObject *)__pyx_v_starts)); __Pyx_INCREF(__pyx_v_ends); PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_v_ends); __Pyx_GIVEREF(__pyx_v_ends); __pyx_r = ((PyObject *)__pyx_t_5); __pyx_t_5 = 0; goto __pyx_L0; __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_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_labels.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_starts.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.lib.generate_slices", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_labels.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_starts.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_starts); __Pyx_XDECREF(__pyx_v_ends); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_3lib_99indices_fast(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_3lib_99indices_fast = {__Pyx_NAMESTR("indices_fast"), (PyCFunction)__pyx_pw_6pandas_3lib_99indices_fast, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_3lib_99indices_fast(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_index = 0; PyArrayObject *__pyx_v_labels = 0; PyObject *__pyx_v_keys = 0; PyObject *__pyx_v_sorted_labels = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("indices_fast (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__index,&__pyx_n_s__labels,&__pyx_n_s__keys,&__pyx_n_s__sorted_labels,0}; PyObject* values[4] = {0,0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__index)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__labels)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("indices_fast", 1, 4, 4, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1172; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__keys)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("indices_fast", 1, 4, 4, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1172; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__sorted_labels)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("indices_fast", 1, 4, 4, 3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1172; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "indices_fast") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1172; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 4) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[3] = PyTuple_GET_ITEM(__pyx_args, 3); } __pyx_v_index = values[0]; __pyx_v_labels = ((PyArrayObject *)values[1]); __pyx_v_keys = ((PyObject*)values[2]); __pyx_v_sorted_labels = ((PyObject*)values[3]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("indices_fast", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1172; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.lib.indices_fast", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_labels), __pyx_ptype_5numpy_ndarray, 1, "labels", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1172; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_keys), (&PyList_Type), 1, "keys", 1))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1172; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_sorted_labels), (&PyList_Type), 1, "sorted_labels", 1))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1173; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_3lib_98indices_fast(__pyx_self, __pyx_v_index, __pyx_v_labels, __pyx_v_keys, __pyx_v_sorted_labels); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/lib.pyx":1172 * * * def indices_fast(object index, ndarray[int64_t] labels, list keys, # <<<<<<<<<<<<<< * list sorted_labels): * cdef: */ static PyObject *__pyx_pf_6pandas_3lib_98indices_fast(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_index, PyArrayObject *__pyx_v_labels, PyObject *__pyx_v_keys, PyObject *__pyx_v_sorted_labels) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_k; Py_ssize_t __pyx_v_lab; Py_ssize_t __pyx_v_cur; Py_ssize_t __pyx_v_start; Py_ssize_t __pyx_v_n; PyObject *__pyx_v_result = 0; PyObject *__pyx_v_tup = 0; PyObject *__pyx_v_val = NULL; __Pyx_LocalBuf_ND __pyx_pybuffernd_labels; __Pyx_Buffer __pyx_pybuffer_labels; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; PyObject *__pyx_t_2 = NULL; int __pyx_t_3; long __pyx_t_4; int __pyx_t_5; Py_ssize_t __pyx_t_6; Py_ssize_t __pyx_t_7; Py_ssize_t __pyx_t_8; Py_ssize_t __pyx_t_9; PyObject *__pyx_t_10 = NULL; Py_ssize_t __pyx_t_11; PyObject *__pyx_t_12 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("indices_fast", 0); __pyx_pybuffer_labels.pybuffer.buf = NULL; __pyx_pybuffer_labels.refcount = 0; __pyx_pybuffernd_labels.data = NULL; __pyx_pybuffernd_labels.rcbuffer = &__pyx_pybuffer_labels; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_labels.rcbuffer->pybuffer, (PyObject*)__pyx_v_labels, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1172; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_labels.diminfo[0].strides = __pyx_pybuffernd_labels.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_labels.diminfo[0].shape = __pyx_pybuffernd_labels.rcbuffer->pybuffer.shape[0]; /* "pandas/lib.pyx":1175 * list sorted_labels): * cdef: * Py_ssize_t i, j, k, lab, cur, start, n = len(labels) # <<<<<<<<<<<<<< * dict result = {} * object tup */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_labels)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1175; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/lib.pyx":1176 * cdef: * Py_ssize_t i, j, k, lab, cur, start, n = len(labels) * dict result = {} # <<<<<<<<<<<<<< * object tup * */ __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1176; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_2)); __pyx_v_result = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; /* "pandas/lib.pyx":1179 * object tup * * k = len(keys) # <<<<<<<<<<<<<< * * if n == 0: */ if (unlikely(((PyObject *)__pyx_v_keys) == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1179; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_1 = PyList_GET_SIZE(((PyObject *)__pyx_v_keys)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1179; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_k = __pyx_t_1; /* "pandas/lib.pyx":1181 * k = len(keys) * * if n == 0: # <<<<<<<<<<<<<< * return result * */ __pyx_t_3 = ((__pyx_v_n == 0) != 0); if (__pyx_t_3) { /* "pandas/lib.pyx":1182 * * if n == 0: * return result # <<<<<<<<<<<<<< * * start = 0 */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_result)); __pyx_r = ((PyObject *)__pyx_v_result); goto __pyx_L0; goto __pyx_L3; } __pyx_L3:; /* "pandas/lib.pyx":1184 * return result * * start = 0 # <<<<<<<<<<<<<< * cur = labels[0] * for i in range(1, n): */ __pyx_v_start = 0; /* "pandas/lib.pyx":1185 * * start = 0 * cur = labels[0] # <<<<<<<<<<<<<< * for i in range(1, n): * lab = labels[i] */ __pyx_t_4 = 0; __pyx_t_5 = -1; if (__pyx_t_4 < 0) { __pyx_t_4 += __pyx_pybuffernd_labels.diminfo[0].shape; if (unlikely(__pyx_t_4 < 0)) __pyx_t_5 = 0; } else if (unlikely(__pyx_t_4 >= __pyx_pybuffernd_labels.diminfo[0].shape)) __pyx_t_5 = 0; if (unlikely(__pyx_t_5 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_5); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1185; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_cur = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_labels.rcbuffer->pybuffer.buf, __pyx_t_4, __pyx_pybuffernd_labels.diminfo[0].strides)); /* "pandas/lib.pyx":1186 * start = 0 * cur = labels[0] * for i in range(1, n): # <<<<<<<<<<<<<< * lab = labels[i] * */ __pyx_t_1 = __pyx_v_n; for (__pyx_t_6 = 1; __pyx_t_6 < __pyx_t_1; __pyx_t_6+=1) { __pyx_v_i = __pyx_t_6; /* "pandas/lib.pyx":1187 * cur = labels[0] * for i in range(1, n): * lab = labels[i] # <<<<<<<<<<<<<< * * if lab != cur: */ __pyx_t_7 = __pyx_v_i; __pyx_t_5 = -1; if (__pyx_t_7 < 0) { __pyx_t_7 += __pyx_pybuffernd_labels.diminfo[0].shape; if (unlikely(__pyx_t_7 < 0)) __pyx_t_5 = 0; } else if (unlikely(__pyx_t_7 >= __pyx_pybuffernd_labels.diminfo[0].shape)) __pyx_t_5 = 0; if (unlikely(__pyx_t_5 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_5); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1187; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_lab = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_labels.rcbuffer->pybuffer.buf, __pyx_t_7, __pyx_pybuffernd_labels.diminfo[0].strides)); /* "pandas/lib.pyx":1189 * lab = labels[i] * * if lab != cur: # <<<<<<<<<<<<<< * if lab != -1: * tup = PyTuple_New(k) */ __pyx_t_3 = ((__pyx_v_lab != __pyx_v_cur) != 0); if (__pyx_t_3) { /* "pandas/lib.pyx":1190 * * if lab != cur: * if lab != -1: # <<<<<<<<<<<<<< * tup = PyTuple_New(k) * for j in range(k): */ __pyx_t_3 = ((__pyx_v_lab != -1) != 0); if (__pyx_t_3) { /* "pandas/lib.pyx":1191 * if lab != cur: * if lab != -1: * tup = PyTuple_New(k) # <<<<<<<<<<<<<< * for j in range(k): * val = util.get_value_at(keys[j], */ __pyx_t_2 = ((PyObject *)PyTuple_New(__pyx_v_k)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1191; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_XDECREF_SET(__pyx_v_tup, __pyx_t_2); __pyx_t_2 = 0; /* "pandas/lib.pyx":1192 * if lab != -1: * tup = PyTuple_New(k) * for j in range(k): # <<<<<<<<<<<<<< * val = util.get_value_at(keys[j], * sorted_labels[j][i-1]) */ __pyx_t_8 = __pyx_v_k; for (__pyx_t_9 = 0; __pyx_t_9 < __pyx_t_8; __pyx_t_9+=1) { __pyx_v_j = __pyx_t_9; /* "pandas/lib.pyx":1193 * tup = PyTuple_New(k) * for j in range(k): * val = util.get_value_at(keys[j], # <<<<<<<<<<<<<< * sorted_labels[j][i-1]) * PyTuple_SET_ITEM(tup, j, val) */ if (unlikely(((PyObject *)__pyx_v_keys) == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1193; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_2 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_keys), __pyx_v_j, sizeof(Py_ssize_t), PyInt_FromSsize_t, 1, 1, 1); if (!__pyx_t_2) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1193; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 1193; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/lib.pyx":1194 * for j in range(k): * val = util.get_value_at(keys[j], * sorted_labels[j][i-1]) # <<<<<<<<<<<<<< * PyTuple_SET_ITEM(tup, j, val) * Py_INCREF(val) */ if (unlikely(((PyObject *)__pyx_v_sorted_labels) == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1194; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_10 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_sorted_labels), __pyx_v_j, sizeof(Py_ssize_t), PyInt_FromSsize_t, 1, 1, 1); if (!__pyx_t_10) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1194; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __pyx_t_11 = (__pyx_v_i - 1); __pyx_t_12 = __Pyx_GetItemInt(__pyx_t_10, __pyx_t_11, sizeof(Py_ssize_t), PyInt_FromSsize_t, 0, 1, 1); if (!__pyx_t_12) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1194; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_t_10 = __pyx_f_4util_get_value_at(((PyArrayObject *)__pyx_t_2), __pyx_t_12); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1193; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_XDECREF_SET(__pyx_v_val, __pyx_t_10); __pyx_t_10 = 0; /* "pandas/lib.pyx":1195 * val = util.get_value_at(keys[j], * sorted_labels[j][i-1]) * PyTuple_SET_ITEM(tup, j, val) # <<<<<<<<<<<<<< * Py_INCREF(val) * */ PyTuple_SET_ITEM(__pyx_v_tup, __pyx_v_j, __pyx_v_val); /* "pandas/lib.pyx":1196 * sorted_labels[j][i-1]) * PyTuple_SET_ITEM(tup, j, val) * Py_INCREF(val) # <<<<<<<<<<<<<< * * result[tup] = index[start:i] */ Py_INCREF(__pyx_v_val); } /* "pandas/lib.pyx":1198 * Py_INCREF(val) * * result[tup] = index[start:i] # <<<<<<<<<<<<<< * start = i * cur = lab */ __pyx_t_10 = __Pyx_PyObject_GetSlice(__pyx_v_index, __pyx_v_start, __pyx_v_i, NULL, NULL, NULL, 1, 1, 1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1198; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); if (PyDict_SetItem(((PyObject *)__pyx_v_result), __pyx_v_tup, __pyx_t_10) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1198; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; goto __pyx_L7; } __pyx_L7:; /* "pandas/lib.pyx":1199 * * result[tup] = index[start:i] * start = i # <<<<<<<<<<<<<< * cur = lab * */ __pyx_v_start = __pyx_v_i; goto __pyx_L6; } __pyx_L6:; /* "pandas/lib.pyx":1200 * result[tup] = index[start:i] * start = i * cur = lab # <<<<<<<<<<<<<< * * tup = PyTuple_New(k) */ __pyx_v_cur = __pyx_v_lab; } /* "pandas/lib.pyx":1202 * cur = lab * * tup = PyTuple_New(k) # <<<<<<<<<<<<<< * for j in range(k): * val = util.get_value_at(keys[j], */ __pyx_t_10 = ((PyObject *)PyTuple_New(__pyx_v_k)); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1202; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_XDECREF_SET(__pyx_v_tup, __pyx_t_10); __pyx_t_10 = 0; /* "pandas/lib.pyx":1203 * * tup = PyTuple_New(k) * for j in range(k): # <<<<<<<<<<<<<< * val = util.get_value_at(keys[j], * sorted_labels[j][n - 1]) */ __pyx_t_1 = __pyx_v_k; for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_1; __pyx_t_6+=1) { __pyx_v_j = __pyx_t_6; /* "pandas/lib.pyx":1204 * tup = PyTuple_New(k) * for j in range(k): * val = util.get_value_at(keys[j], # <<<<<<<<<<<<<< * sorted_labels[j][n - 1]) * PyTuple_SET_ITEM(tup, j, val) */ if (unlikely(((PyObject *)__pyx_v_keys) == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1204; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_10 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_keys), __pyx_v_j, sizeof(Py_ssize_t), PyInt_FromSsize_t, 1, 1, 1); if (!__pyx_t_10) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1204; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); if (!(likely(((__pyx_t_10) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_10, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1204; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/lib.pyx":1205 * for j in range(k): * val = util.get_value_at(keys[j], * sorted_labels[j][n - 1]) # <<<<<<<<<<<<<< * PyTuple_SET_ITEM(tup, j, val) * Py_INCREF(val) */ if (unlikely(((PyObject *)__pyx_v_sorted_labels) == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1205; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_12 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_sorted_labels), __pyx_v_j, sizeof(Py_ssize_t), PyInt_FromSsize_t, 1, 1, 1); if (!__pyx_t_12) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1205; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __pyx_t_8 = (__pyx_v_n - 1); __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_12, __pyx_t_8, sizeof(Py_ssize_t), PyInt_FromSsize_t, 0, 1, 1); if (!__pyx_t_2) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1205; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __pyx_t_12 = __pyx_f_4util_get_value_at(((PyArrayObject *)__pyx_t_10), __pyx_t_2); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1204; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF_SET(__pyx_v_val, __pyx_t_12); __pyx_t_12 = 0; /* "pandas/lib.pyx":1206 * val = util.get_value_at(keys[j], * sorted_labels[j][n - 1]) * PyTuple_SET_ITEM(tup, j, val) # <<<<<<<<<<<<<< * Py_INCREF(val) * result[tup] = index[start:] */ PyTuple_SET_ITEM(__pyx_v_tup, __pyx_v_j, __pyx_v_val); /* "pandas/lib.pyx":1207 * sorted_labels[j][n - 1]) * PyTuple_SET_ITEM(tup, j, val) * Py_INCREF(val) # <<<<<<<<<<<<<< * result[tup] = index[start:] * */ Py_INCREF(__pyx_v_val); } /* "pandas/lib.pyx":1208 * PyTuple_SET_ITEM(tup, j, val) * Py_INCREF(val) * result[tup] = index[start:] # <<<<<<<<<<<<<< * * return result */ __pyx_t_12 = __Pyx_PyObject_GetSlice(__pyx_v_index, __pyx_v_start, 0, NULL, NULL, NULL, 1, 0, 1); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1208; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); if (PyDict_SetItem(((PyObject *)__pyx_v_result), __pyx_v_tup, __pyx_t_12) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1208; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; /* "pandas/lib.pyx":1210 * result[tup] = index[start:] * * return result # <<<<<<<<<<<<<< * * include "reduce.pyx" */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_result)); __pyx_r = ((PyObject *)__pyx_v_result); goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_10); __Pyx_XDECREF(__pyx_t_12); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_labels.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.lib.indices_fast", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_labels.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF(__pyx_v_result); __Pyx_XDECREF(__pyx_v_tup); __Pyx_XDECREF(__pyx_v_val); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pandas_3lib_7Reducer_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_pw_6pandas_3lib_7Reducer_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_arr = 0; PyObject *__pyx_v_f = 0; PyObject *__pyx_v_axis = 0; PyObject *__pyx_v_dummy = 0; PyObject *__pyx_v_labels = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__arr,&__pyx_n_s__f,&__pyx_n_s__axis,&__pyx_n_s__dummy,&__pyx_n_s__labels,0}; PyObject* values[5] = {0,0,0,0,0}; values[2] = ((PyObject *)__pyx_int_1); /* "pandas/src/reduce.pyx":18 * object arr, dummy, f, labels, typ, index * * def __init__(self, object arr, object f, axis=1, dummy=None, # <<<<<<<<<<<<<< * labels=None): * n, k = arr.shape */ values[3] = ((PyObject *)Py_None); /* "pandas/src/reduce.pyx":19 * * def __init__(self, object arr, object f, axis=1, dummy=None, * labels=None): # <<<<<<<<<<<<<< * n, k = arr.shape * */ values[4] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__arr)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__f)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 5, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 18; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__axis); if (value) { values[2] = value; kw_args--; } } case 3: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__dummy); if (value) { values[3] = value; kw_args--; } } case 4: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__labels); if (value) { values[4] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 18; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_arr = values[0]; __pyx_v_f = values[1]; __pyx_v_axis = values[2]; __pyx_v_dummy = values[3]; __pyx_v_labels = values[4]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 5, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 18; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.lib.Reducer.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return -1; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pandas_3lib_7Reducer___init__(((struct __pyx_obj_6pandas_3lib_Reducer *)__pyx_v_self), __pyx_v_arr, __pyx_v_f, __pyx_v_axis, __pyx_v_dummy, __pyx_v_labels); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/reduce.pyx":18 * object arr, dummy, f, labels, typ, index * * def __init__(self, object arr, object f, axis=1, dummy=None, # <<<<<<<<<<<<<< * labels=None): * n, k = arr.shape */ static int __pyx_pf_6pandas_3lib_7Reducer___init__(struct __pyx_obj_6pandas_3lib_Reducer *__pyx_v_self, PyObject *__pyx_v_arr, PyObject *__pyx_v_f, PyObject *__pyx_v_axis, PyObject *__pyx_v_dummy, PyObject *__pyx_v_labels) { PyObject *__pyx_v_n = NULL; PyObject *__pyx_v_k = NULL; PyObject *__pyx_v_index = NULL; 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)(PyObject *); int __pyx_t_6; int __pyx_t_7; Py_ssize_t __pyx_t_8; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__init__", 0); __Pyx_INCREF(__pyx_v_arr); /* "pandas/src/reduce.pyx":20 * def __init__(self, object arr, object f, axis=1, dummy=None, * labels=None): * n, k = arr.shape # <<<<<<<<<<<<<< * * if axis == 0: */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_arr, __pyx_n_s__shape); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 20; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) { PyObject* sequence = __pyx_t_1; #if CYTHON_COMPILING_IN_CPYTHON Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 20; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1); } else { __pyx_t_2 = PyList_GET_ITEM(sequence, 0); __pyx_t_3 = PyList_GET_ITEM(sequence, 1); } __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); #else __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 20; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 20; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } else { Py_ssize_t index = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 20; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_5 = Py_TYPE(__pyx_t_4)->tp_iternext; index = 0; __pyx_t_2 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_2)) goto __pyx_L3_unpacking_failed; __Pyx_GOTREF(__pyx_t_2); index = 1; __pyx_t_3 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_3)) goto __pyx_L3_unpacking_failed; __Pyx_GOTREF(__pyx_t_3); if (__Pyx_IternextUnpackEndCheck(__pyx_t_5(__pyx_t_4), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 20; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 20; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_L4_unpacking_done:; } __pyx_v_n = __pyx_t_2; __pyx_t_2 = 0; __pyx_v_k = __pyx_t_3; __pyx_t_3 = 0; /* "pandas/src/reduce.pyx":22 * n, k = arr.shape * * if axis == 0: # <<<<<<<<<<<<<< * if not arr.flags.f_contiguous: * arr = arr.copy('F') */ __pyx_t_1 = PyObject_RichCompare(__pyx_v_axis, __pyx_int_0, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 22; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 22; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_6) { /* "pandas/src/reduce.pyx":23 * * if axis == 0: * if not arr.flags.f_contiguous: # <<<<<<<<<<<<<< * arr = arr.copy('F') * */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_arr, __pyx_n_s__flags); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 23; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s__f_contiguous); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 23; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 23; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_7 = ((!__pyx_t_6) != 0); if (__pyx_t_7) { /* "pandas/src/reduce.pyx":24 * if axis == 0: * if not arr.flags.f_contiguous: * arr = arr.copy('F') # <<<<<<<<<<<<<< * * self.nresults = k */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_arr, __pyx_n_s__copy); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 24; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_k_tuple_22), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 24; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF_SET(__pyx_v_arr, __pyx_t_1); __pyx_t_1 = 0; goto __pyx_L6; } __pyx_L6:; /* "pandas/src/reduce.pyx":26 * arr = arr.copy('F') * * self.nresults = k # <<<<<<<<<<<<<< * self.chunksize = n * self.increment = n * arr.dtype.itemsize */ __pyx_t_8 = __Pyx_PyIndex_AsSsize_t(__pyx_v_k); if (unlikely((__pyx_t_8 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 26; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_self->nresults = __pyx_t_8; /* "pandas/src/reduce.pyx":27 * * self.nresults = k * self.chunksize = n # <<<<<<<<<<<<<< * self.increment = n * arr.dtype.itemsize * else: */ __pyx_t_8 = __Pyx_PyIndex_AsSsize_t(__pyx_v_n); if (unlikely((__pyx_t_8 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 27; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_self->chunksize = __pyx_t_8; /* "pandas/src/reduce.pyx":28 * self.nresults = k * self.chunksize = n * self.increment = n * arr.dtype.itemsize # <<<<<<<<<<<<<< * else: * if not arr.flags.c_contiguous: */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_arr, __pyx_n_s__dtype); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 28; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s__itemsize); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 28; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyNumber_Multiply(__pyx_v_n, __pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 28; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_8 = __Pyx_PyIndex_AsSsize_t(__pyx_t_1); if (unlikely((__pyx_t_8 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 28; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_self->increment = __pyx_t_8; goto __pyx_L5; } /*else*/ { /* "pandas/src/reduce.pyx":30 * self.increment = n * arr.dtype.itemsize * else: * if not arr.flags.c_contiguous: # <<<<<<<<<<<<<< * arr = arr.copy('C') * */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_arr, __pyx_n_s__flags); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 30; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s__c_contiguous); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 30; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 30; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_6 = ((!__pyx_t_7) != 0); if (__pyx_t_6) { /* "pandas/src/reduce.pyx":31 * else: * if not arr.flags.c_contiguous: * arr = arr.copy('C') # <<<<<<<<<<<<<< * * self.nresults = n */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_arr, __pyx_n_s__copy); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 31; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_k_tuple_23), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 31; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF_SET(__pyx_v_arr, __pyx_t_1); __pyx_t_1 = 0; goto __pyx_L7; } __pyx_L7:; /* "pandas/src/reduce.pyx":33 * arr = arr.copy('C') * * self.nresults = n # <<<<<<<<<<<<<< * self.chunksize = k * self.increment = k * arr.dtype.itemsize */ __pyx_t_8 = __Pyx_PyIndex_AsSsize_t(__pyx_v_n); if (unlikely((__pyx_t_8 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 33; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_self->nresults = __pyx_t_8; /* "pandas/src/reduce.pyx":34 * * self.nresults = n * self.chunksize = k # <<<<<<<<<<<<<< * self.increment = k * arr.dtype.itemsize * */ __pyx_t_8 = __Pyx_PyIndex_AsSsize_t(__pyx_v_k); if (unlikely((__pyx_t_8 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 34; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_self->chunksize = __pyx_t_8; /* "pandas/src/reduce.pyx":35 * self.nresults = n * self.chunksize = k * self.increment = k * arr.dtype.itemsize # <<<<<<<<<<<<<< * * */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_arr, __pyx_n_s__dtype); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s__itemsize); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyNumber_Multiply(__pyx_v_k, __pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_8 = __Pyx_PyIndex_AsSsize_t(__pyx_t_1); if (unlikely((__pyx_t_8 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_self->increment = __pyx_t_8; } __pyx_L5:; /* "pandas/src/reduce.pyx":38 * * * self.f = f # <<<<<<<<<<<<<< * self.arr = arr * self.typ = None */ __Pyx_INCREF(__pyx_v_f); __Pyx_GIVEREF(__pyx_v_f); __Pyx_GOTREF(__pyx_v_self->f); __Pyx_DECREF(__pyx_v_self->f); __pyx_v_self->f = __pyx_v_f; /* "pandas/src/reduce.pyx":39 * * self.f = f * self.arr = arr # <<<<<<<<<<<<<< * self.typ = None * self.labels = labels */ __Pyx_INCREF(__pyx_v_arr); __Pyx_GIVEREF(__pyx_v_arr); __Pyx_GOTREF(__pyx_v_self->arr); __Pyx_DECREF(__pyx_v_self->arr); __pyx_v_self->arr = __pyx_v_arr; /* "pandas/src/reduce.pyx":40 * self.f = f * self.arr = arr * self.typ = None # <<<<<<<<<<<<<< * self.labels = labels * self.dummy, index = self._check_dummy(dummy=dummy) */ __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->typ); __Pyx_DECREF(__pyx_v_self->typ); __pyx_v_self->typ = Py_None; /* "pandas/src/reduce.pyx":41 * self.arr = arr * self.typ = None * self.labels = labels # <<<<<<<<<<<<<< * self.dummy, index = self._check_dummy(dummy=dummy) * */ __Pyx_INCREF(__pyx_v_labels); __Pyx_GIVEREF(__pyx_v_labels); __Pyx_GOTREF(__pyx_v_self->labels); __Pyx_DECREF(__pyx_v_self->labels); __pyx_v_self->labels = __pyx_v_labels; /* "pandas/src/reduce.pyx":42 * self.typ = None * self.labels = labels * self.dummy, index = self._check_dummy(dummy=dummy) # <<<<<<<<<<<<<< * * self.labels = labels */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s___check_dummy); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 42; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 42; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_3)); if (PyDict_SetItem(__pyx_t_3, ((PyObject *)__pyx_n_s__dummy), __pyx_v_dummy) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 42; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), ((PyObject *)__pyx_t_3)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 42; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; if ((likely(PyTuple_CheckExact(__pyx_t_2))) || (PyList_CheckExact(__pyx_t_2))) { PyObject* sequence = __pyx_t_2; #if CYTHON_COMPILING_IN_CPYTHON Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 42; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_1 = PyTuple_GET_ITEM(sequence, 1); } else { __pyx_t_3 = PyList_GET_ITEM(sequence, 0); __pyx_t_1 = PyList_GET_ITEM(sequence, 1); } __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(__pyx_t_1); #else __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 42; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 42; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); #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_filename = __pyx_f[0]; __pyx_lineno = 42; __pyx_clineno = __LINE__; goto __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_3 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_3)) goto __pyx_L8_unpacking_failed; __Pyx_GOTREF(__pyx_t_3); index = 1; __pyx_t_1 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_1)) goto __pyx_L8_unpacking_failed; __Pyx_GOTREF(__pyx_t_1); if (__Pyx_IternextUnpackEndCheck(__pyx_t_5(__pyx_t_4), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 42; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_5 = NULL; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; goto __pyx_L9_unpacking_done; __pyx_L8_unpacking_failed:; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_5 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 42; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_L9_unpacking_done:; } __Pyx_GIVEREF(__pyx_t_3); __Pyx_GOTREF(__pyx_v_self->dummy); __Pyx_DECREF(__pyx_v_self->dummy); __pyx_v_self->dummy = __pyx_t_3; __pyx_t_3 = 0; __pyx_v_index = __pyx_t_1; __pyx_t_1 = 0; /* "pandas/src/reduce.pyx":44 * self.dummy, index = self._check_dummy(dummy=dummy) * * self.labels = labels # <<<<<<<<<<<<<< * self.index = index * */ __Pyx_INCREF(__pyx_v_labels); __Pyx_GIVEREF(__pyx_v_labels); __Pyx_GOTREF(__pyx_v_self->labels); __Pyx_DECREF(__pyx_v_self->labels); __pyx_v_self->labels = __pyx_v_labels; /* "pandas/src/reduce.pyx":45 * * self.labels = labels * self.index = index # <<<<<<<<<<<<<< * * def _check_dummy(self, dummy=None): */ __Pyx_INCREF(__pyx_v_index); __Pyx_GIVEREF(__pyx_v_index); __Pyx_GOTREF(__pyx_v_self->index); __Pyx_DECREF(__pyx_v_self->index); __pyx_v_self->index = __pyx_v_index; __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("pandas.lib.Reducer.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_XDECREF(__pyx_v_n); __Pyx_XDECREF(__pyx_v_k); __Pyx_XDECREF(__pyx_v_index); __Pyx_XDECREF(__pyx_v_arr); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_3lib_7Reducer_3_check_dummy(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_6pandas_3lib_7Reducer_3_check_dummy(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_dummy = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_check_dummy (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__dummy,0}; PyObject* values[1] = {0}; /* "pandas/src/reduce.pyx":47 * self.index = index * * def _check_dummy(self, dummy=None): # <<<<<<<<<<<<<< * cdef object index * */ values[0] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__dummy); if (value) { values[0] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_check_dummy") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 47; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_dummy = values[0]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("_check_dummy", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 47; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.lib.Reducer._check_dummy", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pandas_3lib_7Reducer_2_check_dummy(((struct __pyx_obj_6pandas_3lib_Reducer *)__pyx_v_self), __pyx_v_dummy); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_3lib_7Reducer_2_check_dummy(struct __pyx_obj_6pandas_3lib_Reducer *__pyx_v_self, PyObject *__pyx_v_dummy) { PyObject *__pyx_v_index = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; Py_ssize_t __pyx_t_7; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_check_dummy", 0); __Pyx_INCREF(__pyx_v_dummy); /* "pandas/src/reduce.pyx":50 * cdef object index * * if dummy is None: # <<<<<<<<<<<<<< * dummy = np.empty(self.chunksize, dtype=self.arr.dtype) * index = None */ __pyx_t_1 = (__pyx_v_dummy == Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { /* "pandas/src/reduce.pyx":51 * * if dummy is None: * dummy = np.empty(self.chunksize, dtype=self.arr.dtype) # <<<<<<<<<<<<<< * index = None * */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s__empty); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyInt_FromSsize_t(__pyx_v_self->chunksize); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_3)); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->arr, __pyx_n_s__dtype); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); if (PyDict_SetItem(__pyx_t_3, ((PyObject *)__pyx_n_s__dtype), __pyx_t_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_5), ((PyObject *)__pyx_t_3)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; __Pyx_DECREF_SET(__pyx_v_dummy, __pyx_t_6); __pyx_t_6 = 0; /* "pandas/src/reduce.pyx":52 * if dummy is None: * dummy = np.empty(self.chunksize, dtype=self.arr.dtype) * index = None # <<<<<<<<<<<<<< * * # our ref is stolen later since we are creating this array */ __Pyx_INCREF(Py_None); __pyx_v_index = Py_None; /* "pandas/src/reduce.pyx":56 * # our ref is stolen later since we are creating this array * # in cython, so increment first * Py_INCREF(dummy) # <<<<<<<<<<<<<< * else: * if dummy.dtype != self.arr.dtype: */ Py_INCREF(__pyx_v_dummy); goto __pyx_L3; } /*else*/ { /* "pandas/src/reduce.pyx":58 * Py_INCREF(dummy) * else: * if dummy.dtype != self.arr.dtype: # <<<<<<<<<<<<<< * raise ValueError('Dummy array must be same dtype') * if len(dummy) != self.chunksize: */ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_dummy, __pyx_n_s__dtype); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 58; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->arr, __pyx_n_s__dtype); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 58; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = PyObject_RichCompare(__pyx_t_6, __pyx_t_3, Py_NE); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 58; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 58; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_2) { /* "pandas/src/reduce.pyx":59 * else: * if dummy.dtype != self.arr.dtype: * raise ValueError('Dummy array must be same dtype') # <<<<<<<<<<<<<< * if len(dummy) != self.chunksize: * raise ValueError('Dummy array must be length %d' % */ __pyx_t_5 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_25), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 59; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_Raise(__pyx_t_5, 0, 0, 0); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 59; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L4; } __pyx_L4:; /* "pandas/src/reduce.pyx":60 * if dummy.dtype != self.arr.dtype: * raise ValueError('Dummy array must be same dtype') * if len(dummy) != self.chunksize: # <<<<<<<<<<<<<< * raise ValueError('Dummy array must be length %d' % * self.chunksize) */ __pyx_t_7 = PyObject_Length(__pyx_v_dummy); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 60; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_2 = ((__pyx_t_7 != __pyx_v_self->chunksize) != 0); if (__pyx_t_2) { /* "pandas/src/reduce.pyx":62 * if len(dummy) != self.chunksize: * raise ValueError('Dummy array must be length %d' % * self.chunksize) # <<<<<<<<<<<<<< * * # we passed a series-like */ __pyx_t_5 = PyInt_FromSsize_t(__pyx_v_self->chunksize); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_26), __pyx_t_5); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 61; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_3)); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 61; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_t_3)); __Pyx_GIVEREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; __pyx_t_3 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 61; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 61; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L5; } __pyx_L5:; /* "pandas/src/reduce.pyx":65 * * # we passed a series-like * if hasattr(dummy,'values'): # <<<<<<<<<<<<<< * * self.typ = type(dummy) */ __pyx_t_2 = PyObject_HasAttr(__pyx_v_dummy, ((PyObject *)__pyx_n_s__values)); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 65; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_1 = (__pyx_t_2 != 0); if (__pyx_t_1) { /* "pandas/src/reduce.pyx":67 * if hasattr(dummy,'values'): * * self.typ = type(dummy) # <<<<<<<<<<<<<< * index = getattr(dummy,'index',None) * dummy = dummy.values */ __Pyx_INCREF(((PyObject *)Py_TYPE(__pyx_v_dummy))); __Pyx_GIVEREF(((PyObject *)Py_TYPE(__pyx_v_dummy))); __Pyx_GOTREF(__pyx_v_self->typ); __Pyx_DECREF(__pyx_v_self->typ); __pyx_v_self->typ = ((PyObject *)Py_TYPE(__pyx_v_dummy)); /* "pandas/src/reduce.pyx":68 * * self.typ = type(dummy) * index = getattr(dummy,'index',None) # <<<<<<<<<<<<<< * dummy = dummy.values * */ __pyx_t_3 = __Pyx_GetAttr3(__pyx_v_dummy, ((PyObject *)__pyx_n_s__index), Py_None); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 68; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_v_index = __pyx_t_3; __pyx_t_3 = 0; /* "pandas/src/reduce.pyx":69 * self.typ = type(dummy) * index = getattr(dummy,'index',None) * dummy = dummy.values # <<<<<<<<<<<<<< * * return dummy, index */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_dummy, __pyx_n_s__values); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF_SET(__pyx_v_dummy, __pyx_t_3); __pyx_t_3 = 0; goto __pyx_L6; } __pyx_L6:; } __pyx_L3:; /* "pandas/src/reduce.pyx":71 * dummy = dummy.values * * return dummy, index # <<<<<<<<<<<<<< * * def get_result(self): */ __Pyx_XDECREF(__pyx_r); if (unlikely(!__pyx_v_index)) { __Pyx_RaiseUnboundLocalError("index"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 71; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 71; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_v_dummy); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_dummy); __Pyx_GIVEREF(__pyx_v_dummy); __Pyx_INCREF(__pyx_v_index); PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_index); __Pyx_GIVEREF(__pyx_v_index); __pyx_r = ((PyObject *)__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("pandas.lib.Reducer._check_dummy", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_index); __Pyx_XDECREF(__pyx_v_dummy); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_3lib_7Reducer_5get_result(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static PyObject *__pyx_pw_6pandas_3lib_7Reducer_5get_result(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("get_result (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_3lib_7Reducer_4get_result(((struct __pyx_obj_6pandas_3lib_Reducer *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/reduce.pyx":73 * return dummy, index * * def get_result(self): # <<<<<<<<<<<<<< * cdef: * char* dummy_buf */ static PyObject *__pyx_pf_6pandas_3lib_7Reducer_4get_result(struct __pyx_obj_6pandas_3lib_Reducer *__pyx_v_self) { char *__pyx_v_dummy_buf; PyArrayObject *__pyx_v_arr = 0; PyArrayObject *__pyx_v_result = 0; PyArrayObject *__pyx_v_chunk = 0; Py_ssize_t __pyx_v_i; CYTHON_UNUSED Py_ssize_t __pyx_v_incr; PyArrayIterObject *__pyx_v_it = 0; PyObject *__pyx_v_res = 0; PyObject *__pyx_v_name = 0; PyObject *__pyx_v_labels = 0; PyObject *__pyx_v_index = 0; PyObject *__pyx_v_cached_typ = 0; PyObject *__pyx_v_e = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations char *__pyx_t_1; PyObject *__pyx_t_2 = NULL; Py_ssize_t __pyx_t_3; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; Py_ssize_t __pyx_t_7; int __pyx_t_8; int __pyx_t_9; PyObject *__pyx_t_10 = NULL; PyObject *__pyx_t_11 = NULL; int __pyx_t_12; PyObject *__pyx_t_13 = NULL; PyObject *__pyx_t_14 = NULL; PyObject *__pyx_t_15 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_result", 0); /* "pandas/src/reduce.pyx":80 * flatiter it * object res, name, labels, index * object cached_typ = None # <<<<<<<<<<<<<< * * arr = self.arr */ __Pyx_INCREF(Py_None); __pyx_v_cached_typ = Py_None; /* "pandas/src/reduce.pyx":82 * object cached_typ = None * * arr = self.arr # <<<<<<<<<<<<<< * chunk = self.dummy * dummy_buf = chunk.data */ if (!(likely(((__pyx_v_self->arr) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_self->arr, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_INCREF(__pyx_v_self->arr); __pyx_v_arr = ((PyArrayObject *)__pyx_v_self->arr); /* "pandas/src/reduce.pyx":83 * * arr = self.arr * chunk = self.dummy # <<<<<<<<<<<<<< * dummy_buf = chunk.data * chunk.data = arr.data */ if (!(likely(((__pyx_v_self->dummy) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_self->dummy, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_INCREF(__pyx_v_self->dummy); __pyx_v_chunk = ((PyArrayObject *)__pyx_v_self->dummy); /* "pandas/src/reduce.pyx":84 * arr = self.arr * chunk = self.dummy * dummy_buf = chunk.data # <<<<<<<<<<<<<< * chunk.data = arr.data * labels = self.labels */ __pyx_t_1 = __pyx_v_chunk->data; __pyx_v_dummy_buf = __pyx_t_1; /* "pandas/src/reduce.pyx":85 * chunk = self.dummy * dummy_buf = chunk.data * chunk.data = arr.data # <<<<<<<<<<<<<< * labels = self.labels * index = self.index */ __pyx_t_1 = __pyx_v_arr->data; __pyx_v_chunk->data = __pyx_t_1; /* "pandas/src/reduce.pyx":86 * dummy_buf = chunk.data * chunk.data = arr.data * labels = self.labels # <<<<<<<<<<<<<< * index = self.index * incr = self.increment */ __pyx_t_2 = __pyx_v_self->labels; __Pyx_INCREF(__pyx_t_2); __pyx_v_labels = __pyx_t_2; __pyx_t_2 = 0; /* "pandas/src/reduce.pyx":87 * chunk.data = arr.data * labels = self.labels * index = self.index # <<<<<<<<<<<<<< * incr = self.increment * */ __pyx_t_2 = __pyx_v_self->index; __Pyx_INCREF(__pyx_t_2); __pyx_v_index = __pyx_t_2; __pyx_t_2 = 0; /* "pandas/src/reduce.pyx":88 * labels = self.labels * index = self.index * incr = self.increment # <<<<<<<<<<<<<< * * try: */ __pyx_t_3 = __pyx_v_self->increment; __pyx_v_incr = __pyx_t_3; /* "pandas/src/reduce.pyx":90 * incr = self.increment * * try: # <<<<<<<<<<<<<< * for i in range(self.nresults): * */ /*try:*/ { { __Pyx_ExceptionSave(&__pyx_t_4, &__pyx_t_5, &__pyx_t_6); __Pyx_XGOTREF(__pyx_t_4); __Pyx_XGOTREF(__pyx_t_5); __Pyx_XGOTREF(__pyx_t_6); /*try:*/ { /* "pandas/src/reduce.pyx":91 * * try: * for i in range(self.nresults): # <<<<<<<<<<<<<< * * if labels is not None: */ __pyx_t_3 = __pyx_v_self->nresults; for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_3; __pyx_t_7+=1) { __pyx_v_i = __pyx_t_7; /* "pandas/src/reduce.pyx":93 * for i in range(self.nresults): * * if labels is not None: # <<<<<<<<<<<<<< * name = util.get_value_at(labels, i) * else: */ __pyx_t_8 = (__pyx_v_labels != Py_None); __pyx_t_9 = (__pyx_t_8 != 0); if (__pyx_t_9) { /* "pandas/src/reduce.pyx":94 * * if labels is not None: * name = util.get_value_at(labels, i) # <<<<<<<<<<<<<< * else: * name = None */ if (!(likely(((__pyx_v_labels) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_labels, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 94; __pyx_clineno = __LINE__; goto __pyx_L6_error;} __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_i); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 94; __pyx_clineno = __LINE__; goto __pyx_L6_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_10 = __pyx_f_4util_get_value_at(((PyArrayObject *)__pyx_v_labels), __pyx_t_2); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 94; __pyx_clineno = __LINE__; goto __pyx_L6_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF_SET(__pyx_v_name, __pyx_t_10); __pyx_t_10 = 0; goto __pyx_L16; } /*else*/ { /* "pandas/src/reduce.pyx":96 * name = util.get_value_at(labels, i) * else: * name = None # <<<<<<<<<<<<<< * * # create the cached type */ __Pyx_INCREF(Py_None); __Pyx_XDECREF_SET(__pyx_v_name, Py_None); } __pyx_L16:; /* "pandas/src/reduce.pyx":100 * # create the cached type * # each time just reassign the data * if i == 0: # <<<<<<<<<<<<<< * * if self.typ is not None: */ __pyx_t_9 = ((__pyx_v_i == 0) != 0); if (__pyx_t_9) { /* "pandas/src/reduce.pyx":102 * if i == 0: * * if self.typ is not None: # <<<<<<<<<<<<<< * * # recreate with the index if supplied */ __pyx_t_9 = (__pyx_v_self->typ != Py_None); __pyx_t_8 = (__pyx_t_9 != 0); if (__pyx_t_8) { /* "pandas/src/reduce.pyx":105 * * # recreate with the index if supplied * if index is not None: # <<<<<<<<<<<<<< * * cached_typ = self.typ(chunk, index=index, name=name) */ __pyx_t_8 = (__pyx_v_index != Py_None); __pyx_t_9 = (__pyx_t_8 != 0); if (__pyx_t_9) { /* "pandas/src/reduce.pyx":107 * if index is not None: * * cached_typ = self.typ(chunk, index=index, name=name) # <<<<<<<<<<<<<< * * else: */ __pyx_t_10 = PyTuple_New(1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L6_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_INCREF(((PyObject *)__pyx_v_chunk)); PyTuple_SET_ITEM(__pyx_t_10, 0, ((PyObject *)__pyx_v_chunk)); __Pyx_GIVEREF(((PyObject *)__pyx_v_chunk)); __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L6_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_2)); if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__index), __pyx_v_index) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L6_error;} if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__name), __pyx_v_name) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L6_error;} __pyx_t_11 = PyObject_Call(__pyx_v_self->typ, ((PyObject *)__pyx_t_10), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L6_error;} __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(((PyObject *)__pyx_t_10)); __pyx_t_10 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __Pyx_DECREF_SET(__pyx_v_cached_typ, __pyx_t_11); __pyx_t_11 = 0; goto __pyx_L19; } /*else*/ { /* "pandas/src/reduce.pyx":112 * * # use the passsed typ, sans index * cached_typ = self.typ(chunk, name=name) # <<<<<<<<<<<<<< * * # use the cached_typ if possible */ __pyx_t_11 = PyTuple_New(1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 112; __pyx_clineno = __LINE__; goto __pyx_L6_error;} __Pyx_GOTREF(__pyx_t_11); __Pyx_INCREF(((PyObject *)__pyx_v_chunk)); PyTuple_SET_ITEM(__pyx_t_11, 0, ((PyObject *)__pyx_v_chunk)); __Pyx_GIVEREF(((PyObject *)__pyx_v_chunk)); __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 112; __pyx_clineno = __LINE__; goto __pyx_L6_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_2)); if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__name), __pyx_v_name) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 112; __pyx_clineno = __LINE__; goto __pyx_L6_error;} __pyx_t_10 = PyObject_Call(__pyx_v_self->typ, ((PyObject *)__pyx_t_11), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 112; __pyx_clineno = __LINE__; goto __pyx_L6_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(((PyObject *)__pyx_t_11)); __pyx_t_11 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __Pyx_DECREF_SET(__pyx_v_cached_typ, __pyx_t_10); __pyx_t_10 = 0; } __pyx_L19:; goto __pyx_L18; } __pyx_L18:; goto __pyx_L17; } __pyx_L17:; /* "pandas/src/reduce.pyx":115 * * # use the cached_typ if possible * if cached_typ is not None: # <<<<<<<<<<<<<< * object.__setattr__(cached_typ._data._block, 'values', chunk) * object.__setattr__(cached_typ, 'name', name) */ __pyx_t_9 = (__pyx_v_cached_typ != Py_None); __pyx_t_8 = (__pyx_t_9 != 0); if (__pyx_t_8) { /* "pandas/src/reduce.pyx":116 * # use the cached_typ if possible * if cached_typ is not None: * object.__setattr__(cached_typ._data._block, 'values', chunk) # <<<<<<<<<<<<<< * object.__setattr__(cached_typ, 'name', name) * res = self.f(cached_typ) */ __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_builtin_object, __pyx_n_s____setattr__); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 116; __pyx_clineno = __LINE__; goto __pyx_L6_error;} __Pyx_GOTREF(__pyx_t_10); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_cached_typ, __pyx_n_s___data); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 116; __pyx_clineno = __LINE__; goto __pyx_L6_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s___block); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 116; __pyx_clineno = __LINE__; goto __pyx_L6_error;} __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 116; __pyx_clineno = __LINE__; goto __pyx_L6_error;} __Pyx_GOTREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_11); __Pyx_GIVEREF(__pyx_t_11); __Pyx_INCREF(((PyObject *)__pyx_n_s__values)); PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)__pyx_n_s__values)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__values)); __Pyx_INCREF(((PyObject *)__pyx_v_chunk)); PyTuple_SET_ITEM(__pyx_t_2, 2, ((PyObject *)__pyx_v_chunk)); __Pyx_GIVEREF(((PyObject *)__pyx_v_chunk)); __pyx_t_11 = 0; __pyx_t_11 = PyObject_Call(__pyx_t_10, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 116; __pyx_clineno = __LINE__; goto __pyx_L6_error;} __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; /* "pandas/src/reduce.pyx":117 * if cached_typ is not None: * object.__setattr__(cached_typ._data._block, 'values', chunk) * object.__setattr__(cached_typ, 'name', name) # <<<<<<<<<<<<<< * res = self.f(cached_typ) * else: */ __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_builtin_object, __pyx_n_s____setattr__); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 117; __pyx_clineno = __LINE__; goto __pyx_L6_error;} __Pyx_GOTREF(__pyx_t_11); __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 117; __pyx_clineno = __LINE__; goto __pyx_L6_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_cached_typ); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_cached_typ); __Pyx_GIVEREF(__pyx_v_cached_typ); __Pyx_INCREF(((PyObject *)__pyx_n_s__name)); PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)__pyx_n_s__name)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__name)); __Pyx_INCREF(__pyx_v_name); PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_name); __Pyx_GIVEREF(__pyx_v_name); __pyx_t_10 = PyObject_Call(__pyx_t_11, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 117; __pyx_clineno = __LINE__; goto __pyx_L6_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; /* "pandas/src/reduce.pyx":118 * object.__setattr__(cached_typ._data._block, 'values', chunk) * object.__setattr__(cached_typ, 'name', name) * res = self.f(cached_typ) # <<<<<<<<<<<<<< * else: * res = self.f(chunk) */ __pyx_t_10 = PyTuple_New(1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 118; __pyx_clineno = __LINE__; goto __pyx_L6_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_INCREF(__pyx_v_cached_typ); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_v_cached_typ); __Pyx_GIVEREF(__pyx_v_cached_typ); __pyx_t_2 = PyObject_Call(__pyx_v_self->f, ((PyObject *)__pyx_t_10), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 118; __pyx_clineno = __LINE__; goto __pyx_L6_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(((PyObject *)__pyx_t_10)); __pyx_t_10 = 0; __Pyx_XDECREF_SET(__pyx_v_res, __pyx_t_2); __pyx_t_2 = 0; goto __pyx_L20; } /*else*/ { /* "pandas/src/reduce.pyx":120 * res = self.f(cached_typ) * else: * res = self.f(chunk) # <<<<<<<<<<<<<< * * if hasattr(res,'values'): */ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 120; __pyx_clineno = __LINE__; goto __pyx_L6_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(((PyObject *)__pyx_v_chunk)); PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_chunk)); __Pyx_GIVEREF(((PyObject *)__pyx_v_chunk)); __pyx_t_10 = PyObject_Call(__pyx_v_self->f, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 120; __pyx_clineno = __LINE__; goto __pyx_L6_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __Pyx_XDECREF_SET(__pyx_v_res, __pyx_t_10); __pyx_t_10 = 0; } __pyx_L20:; /* "pandas/src/reduce.pyx":122 * res = self.f(chunk) * * if hasattr(res,'values'): # <<<<<<<<<<<<<< * res = res.values * */ __pyx_t_8 = PyObject_HasAttr(__pyx_v_res, ((PyObject *)__pyx_n_s__values)); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 122; __pyx_clineno = __LINE__; goto __pyx_L6_error;} __pyx_t_9 = (__pyx_t_8 != 0); if (__pyx_t_9) { /* "pandas/src/reduce.pyx":123 * * if hasattr(res,'values'): * res = res.values # <<<<<<<<<<<<<< * * if i == 0: */ __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_res, __pyx_n_s__values); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 123; __pyx_clineno = __LINE__; goto __pyx_L6_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF_SET(__pyx_v_res, __pyx_t_10); __pyx_t_10 = 0; goto __pyx_L21; } __pyx_L21:; /* "pandas/src/reduce.pyx":125 * res = res.values * * if i == 0: # <<<<<<<<<<<<<< * result = self._get_result_array(res) * it = PyArray_IterNew(result) */ __pyx_t_9 = ((__pyx_v_i == 0) != 0); if (__pyx_t_9) { /* "pandas/src/reduce.pyx":126 * * if i == 0: * result = self._get_result_array(res) # <<<<<<<<<<<<<< * it = PyArray_IterNew(result) * */ __pyx_t_10 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s___get_result_array); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 126; __pyx_clineno = __LINE__; goto __pyx_L6_error;} __Pyx_GOTREF(__pyx_t_10); __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 126; __pyx_clineno = __LINE__; goto __pyx_L6_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_res); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_res); __Pyx_GIVEREF(__pyx_v_res); __pyx_t_11 = PyObject_Call(__pyx_t_10, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 126; __pyx_clineno = __LINE__; goto __pyx_L6_error;} __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; if (!(likely(((__pyx_t_11) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_11, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 126; __pyx_clineno = __LINE__; goto __pyx_L6_error;} __Pyx_XDECREF_SET(__pyx_v_result, ((PyArrayObject *)__pyx_t_11)); __pyx_t_11 = 0; /* "pandas/src/reduce.pyx":127 * if i == 0: * result = self._get_result_array(res) * it = PyArray_IterNew(result) # <<<<<<<<<<<<<< * * PyArray_SETITEM(result, PyArray_ITER_DATA(it), res) */ __pyx_t_11 = PyArray_IterNew(((PyObject *)__pyx_v_result)); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 127; __pyx_clineno = __LINE__; goto __pyx_L6_error;} __Pyx_GOTREF(__pyx_t_11); __pyx_t_2 = __pyx_t_11; __Pyx_INCREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_XDECREF_SET(__pyx_v_it, ((PyArrayIterObject *)__pyx_t_2)); __pyx_t_2 = 0; goto __pyx_L22; } __pyx_L22:; /* "pandas/src/reduce.pyx":129 * it = PyArray_IterNew(result) * * PyArray_SETITEM(result, PyArray_ITER_DATA(it), res) # <<<<<<<<<<<<<< * chunk.data = chunk.data + self.increment * PyArray_ITER_NEXT(it) */ if (unlikely(!__pyx_v_result)) { __Pyx_RaiseUnboundLocalError("result"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 129; __pyx_clineno = __LINE__; goto __pyx_L6_error;} } if (unlikely(!__pyx_v_it)) { __Pyx_RaiseUnboundLocalError("it"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 129; __pyx_clineno = __LINE__; goto __pyx_L6_error;} } PyArray_SETITEM(__pyx_v_result, PyArray_ITER_DATA(__pyx_v_it), __pyx_v_res); /* "pandas/src/reduce.pyx":130 * * PyArray_SETITEM(result, PyArray_ITER_DATA(it), res) * chunk.data = chunk.data + self.increment # <<<<<<<<<<<<<< * PyArray_ITER_NEXT(it) * except Exception, e: */ __pyx_v_chunk->data = (__pyx_v_chunk->data + __pyx_v_self->increment); /* "pandas/src/reduce.pyx":131 * PyArray_SETITEM(result, PyArray_ITER_DATA(it), res) * chunk.data = chunk.data + self.increment * PyArray_ITER_NEXT(it) # <<<<<<<<<<<<<< * except Exception, e: * if hasattr(e, 'args'): */ PyArray_ITER_NEXT(__pyx_v_it); } } __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; goto __pyx_L13_try_end; __pyx_L6_error:; __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/reduce.pyx":132 * chunk.data = chunk.data + self.increment * PyArray_ITER_NEXT(it) * except Exception, e: # <<<<<<<<<<<<<< * if hasattr(e, 'args'): * e.args = e.args + (i,) */ __pyx_t_12 = PyErr_ExceptionMatches(__pyx_builtin_Exception); if (__pyx_t_12) { __Pyx_AddTraceback("pandas.lib.Reducer.get_result", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_11, &__pyx_t_10) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 132; __pyx_clineno = __LINE__; goto __pyx_L8_except_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_GOTREF(__pyx_t_11); __Pyx_GOTREF(__pyx_t_10); __Pyx_INCREF(__pyx_t_11); __pyx_v_e = __pyx_t_11; /* "pandas/src/reduce.pyx":133 * PyArray_ITER_NEXT(it) * except Exception, e: * if hasattr(e, 'args'): # <<<<<<<<<<<<<< * e.args = e.args + (i,) * raise */ __pyx_t_9 = PyObject_HasAttr(__pyx_v_e, ((PyObject *)__pyx_n_s__args)); if (unlikely(__pyx_t_9 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 133; __pyx_clineno = __LINE__; goto __pyx_L8_except_error;} __pyx_t_8 = (__pyx_t_9 != 0); if (__pyx_t_8) { /* "pandas/src/reduce.pyx":134 * except Exception, e: * if hasattr(e, 'args'): * e.args = e.args + (i,) # <<<<<<<<<<<<<< * raise * finally: */ __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_v_e, __pyx_n_s__args); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 134; __pyx_clineno = __LINE__; goto __pyx_L8_except_error;} __Pyx_GOTREF(__pyx_t_13); __pyx_t_14 = PyInt_FromSsize_t(__pyx_v_i); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 134; __pyx_clineno = __LINE__; goto __pyx_L8_except_error;} __Pyx_GOTREF(__pyx_t_14); __pyx_t_15 = PyTuple_New(1); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 134; __pyx_clineno = __LINE__; goto __pyx_L8_except_error;} __Pyx_GOTREF(__pyx_t_15); PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_t_14); __Pyx_GIVEREF(__pyx_t_14); __pyx_t_14 = 0; __pyx_t_14 = PyNumber_Add(__pyx_t_13, ((PyObject *)__pyx_t_15)); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 134; __pyx_clineno = __LINE__; goto __pyx_L8_except_error;} __Pyx_GOTREF(__pyx_t_14); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_15)); __pyx_t_15 = 0; if (__Pyx_PyObject_SetAttrStr(__pyx_v_e, __pyx_n_s__args, __pyx_t_14) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 134; __pyx_clineno = __LINE__; goto __pyx_L8_except_error;} __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; goto __pyx_L25; } __pyx_L25:; /* "pandas/src/reduce.pyx":135 * if hasattr(e, 'args'): * e.args = e.args + (i,) * raise # <<<<<<<<<<<<<< * finally: * # so we don't free the wrong memory */ __Pyx_GIVEREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_11); __Pyx_GIVEREF(__pyx_t_10); __Pyx_ErrRestore(__pyx_t_2, __pyx_t_11, __pyx_t_10); __pyx_t_2 = 0; __pyx_t_11 = 0; __pyx_t_10 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 135; __pyx_clineno = __LINE__; goto __pyx_L8_except_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; goto __pyx_L7_exception_handled; } __pyx_L8_except_error:; __Pyx_XGIVEREF(__pyx_t_4); __Pyx_XGIVEREF(__pyx_t_5); __Pyx_XGIVEREF(__pyx_t_6); __Pyx_ExceptionReset(__pyx_t_4, __pyx_t_5, __pyx_t_6); goto __pyx_L4; __pyx_L7_exception_handled:; __Pyx_XGIVEREF(__pyx_t_4); __Pyx_XGIVEREF(__pyx_t_5); __Pyx_XGIVEREF(__pyx_t_6); __Pyx_ExceptionReset(__pyx_t_4, __pyx_t_5, __pyx_t_6); __pyx_L13_try_end:; } } /* "pandas/src/reduce.pyx":138 * finally: * # so we don't free the wrong memory * chunk.data = dummy_buf # <<<<<<<<<<<<<< * * if result.dtype == np.object_: */ /*finally:*/ { int __pyx_why; PyObject *__pyx_exc_type, *__pyx_exc_value, *__pyx_exc_tb; int __pyx_exc_lineno; __pyx_exc_type = 0; __pyx_exc_value = 0; __pyx_exc_tb = 0; __pyx_exc_lineno = 0; __pyx_why = 0; goto __pyx_L5; __pyx_L4: { __pyx_why = 4; __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0; __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_ErrFetch(&__pyx_exc_type, &__pyx_exc_value, &__pyx_exc_tb); __pyx_exc_lineno = __pyx_lineno; goto __pyx_L5; } __pyx_L5:; __pyx_v_chunk->data = __pyx_v_dummy_buf; switch (__pyx_why) { case 4: { __Pyx_ErrRestore(__pyx_exc_type, __pyx_exc_value, __pyx_exc_tb); __pyx_lineno = __pyx_exc_lineno; __pyx_exc_type = 0; __pyx_exc_value = 0; __pyx_exc_tb = 0; goto __pyx_L1_error; } } } /* "pandas/src/reduce.pyx":140 * chunk.data = dummy_buf * * if result.dtype == np.object_: # <<<<<<<<<<<<<< * result = maybe_convert_objects(result) * */ if (unlikely(!__pyx_v_result)) { __Pyx_RaiseUnboundLocalError("result"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 140; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_10 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_result), __pyx_n_s__dtype); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 140; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __pyx_t_11 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 140; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s__object_); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 140; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __pyx_t_11 = PyObject_RichCompare(__pyx_t_10, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_11); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 140; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_11); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 140; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; if (__pyx_t_8) { /* "pandas/src/reduce.pyx":141 * * if result.dtype == np.object_: * result = maybe_convert_objects(result) # <<<<<<<<<<<<<< * * return result */ __pyx_t_11 = __Pyx_GetModuleGlobalName(__pyx_n_s_12); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 141; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 141; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(((PyObject *)__pyx_v_result)); PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_result)); __Pyx_GIVEREF(((PyObject *)__pyx_v_result)); __pyx_t_10 = PyObject_Call(__pyx_t_11, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 141; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; if (!(likely(((__pyx_t_10) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_10, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 141; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF_SET(__pyx_v_result, ((PyArrayObject *)__pyx_t_10)); __pyx_t_10 = 0; goto __pyx_L27; } __pyx_L27:; /* "pandas/src/reduce.pyx":143 * result = maybe_convert_objects(result) * * return result # <<<<<<<<<<<<<< * * def _get_result_array(self, object res): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_result)); __pyx_r = ((PyObject *)__pyx_v_result); goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_10); __Pyx_XDECREF(__pyx_t_11); __Pyx_XDECREF(__pyx_t_13); __Pyx_XDECREF(__pyx_t_14); __Pyx_XDECREF(__pyx_t_15); __Pyx_AddTraceback("pandas.lib.Reducer.get_result", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_arr); __Pyx_XDECREF((PyObject *)__pyx_v_result); __Pyx_XDECREF((PyObject *)__pyx_v_chunk); __Pyx_XDECREF((PyObject *)__pyx_v_it); __Pyx_XDECREF(__pyx_v_res); __Pyx_XDECREF(__pyx_v_name); __Pyx_XDECREF(__pyx_v_labels); __Pyx_XDECREF(__pyx_v_index); __Pyx_XDECREF(__pyx_v_cached_typ); __Pyx_XDECREF(__pyx_v_e); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_3lib_7Reducer_7_get_result_array(PyObject *__pyx_v_self, PyObject *__pyx_v_res); /*proto*/ static PyObject *__pyx_pw_6pandas_3lib_7Reducer_7_get_result_array(PyObject *__pyx_v_self, PyObject *__pyx_v_res) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_get_result_array (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_3lib_7Reducer_6_get_result_array(((struct __pyx_obj_6pandas_3lib_Reducer *)__pyx_v_self), ((PyObject *)__pyx_v_res)); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/reduce.pyx":145 * return result * * def _get_result_array(self, object res): # <<<<<<<<<<<<<< * try: * assert(not isinstance(res, np.ndarray)) */ static PyObject *__pyx_pf_6pandas_3lib_7Reducer_6_get_result_array(struct __pyx_obj_6pandas_3lib_Reducer *__pyx_v_self, PyObject *__pyx_v_res) { PyObject *__pyx_v_result = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_t_4; Py_ssize_t __pyx_t_5; PyObject *__pyx_t_6 = NULL; Py_ssize_t __pyx_t_7; int __pyx_t_8; int __pyx_t_9; PyObject *__pyx_t_10 = NULL; PyObject *__pyx_t_11 = NULL; PyObject *__pyx_t_12 = NULL; int __pyx_t_13; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_get_result_array", 0); /* "pandas/src/reduce.pyx":146 * * def _get_result_array(self, object res): * try: # <<<<<<<<<<<<<< * assert(not isinstance(res, np.ndarray)) * assert(not (isinstance(res, list) and len(res) == len(self.dummy))) */ { __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:*/ { /* "pandas/src/reduce.pyx":147 * def _get_result_array(self, object res): * try: * assert(not isinstance(res, np.ndarray)) # <<<<<<<<<<<<<< * assert(not (isinstance(res, list) and len(res) == len(self.dummy))) * */ #ifndef CYTHON_WITHOUT_ASSERTIONS __pyx_t_4 = __Pyx_TypeCheck(__pyx_v_res, ((PyObject*)__pyx_ptype_5numpy_ndarray)); if (unlikely(!((!(__pyx_t_4 != 0)) != 0))) { PyErr_SetNone(PyExc_AssertionError); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 147; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } #endif /* "pandas/src/reduce.pyx":148 * try: * assert(not isinstance(res, np.ndarray)) * assert(not (isinstance(res, list) and len(res) == len(self.dummy))) # <<<<<<<<<<<<<< * * result = np.empty(self.nresults, dtype='O') */ #ifndef CYTHON_WITHOUT_ASSERTIONS __pyx_t_4 = PyList_Check(__pyx_v_res); if ((__pyx_t_4 != 0)) { __pyx_t_5 = PyObject_Length(__pyx_v_res); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 148; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_t_6 = __pyx_v_self->dummy; __Pyx_INCREF(__pyx_t_6); __pyx_t_7 = PyObject_Length(__pyx_t_6); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 148; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_8 = ((__pyx_t_5 == __pyx_t_7) != 0); __pyx_t_9 = __pyx_t_8; } else { __pyx_t_9 = (__pyx_t_4 != 0); } if (unlikely(!((!__pyx_t_9) != 0))) { PyErr_SetNone(PyExc_AssertionError); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 148; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } #endif /* "pandas/src/reduce.pyx":150 * assert(not (isinstance(res, list) and len(res) == len(self.dummy))) * * result = np.empty(self.nresults, dtype='O') # <<<<<<<<<<<<<< * result[0] = res * except Exception: */ __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 150; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s__empty); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 150; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyInt_FromSsize_t(__pyx_v_self->nresults); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 150; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_11 = PyTuple_New(1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 150; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyDict_New(); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 150; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_6)); if (PyDict_SetItem(__pyx_t_6, ((PyObject *)__pyx_n_s__dtype), ((PyObject *)__pyx_n_s__O)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 150; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_t_12 = PyObject_Call(__pyx_t_10, ((PyObject *)__pyx_t_11), ((PyObject *)__pyx_t_6)); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 150; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_11)); __pyx_t_11 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0; __pyx_v_result = __pyx_t_12; __pyx_t_12 = 0; /* "pandas/src/reduce.pyx":151 * * result = np.empty(self.nresults, dtype='O') * result[0] = res # <<<<<<<<<<<<<< * except Exception: * raise ValueError('function does not reduce') */ if (__Pyx_SetItemInt(__pyx_v_result, 0, __pyx_v_res, sizeof(long), PyInt_FromLong, 0, 0, 1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 151; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L10_try_end; __pyx_L3_error:; __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; /* "pandas/src/reduce.pyx":152 * result = np.empty(self.nresults, dtype='O') * result[0] = res * except Exception: # <<<<<<<<<<<<<< * raise ValueError('function does not reduce') * return result */ __pyx_t_13 = PyErr_ExceptionMatches(__pyx_builtin_Exception); if (__pyx_t_13) { __Pyx_AddTraceback("pandas.lib.Reducer._get_result_array", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_12, &__pyx_t_6, &__pyx_t_11) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 152; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} __Pyx_GOTREF(__pyx_t_12); __Pyx_GOTREF(__pyx_t_6); __Pyx_GOTREF(__pyx_t_11); /* "pandas/src/reduce.pyx":153 * result[0] = res * except Exception: * raise ValueError('function does not reduce') # <<<<<<<<<<<<<< * return result * */ __pyx_t_10 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_28), NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 153; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_Raise(__pyx_t_10, 0, 0, 0); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 153; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; goto __pyx_L4_exception_handled; } __pyx_L5_except_error:; __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); goto __pyx_L1_error; __pyx_L4_exception_handled:; __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); __pyx_L10_try_end:; } /* "pandas/src/reduce.pyx":154 * except Exception: * raise ValueError('function does not reduce') * return result # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_result); __pyx_r = __pyx_v_result; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_10); __Pyx_XDECREF(__pyx_t_11); __Pyx_XDECREF(__pyx_t_12); __Pyx_AddTraceback("pandas.lib.Reducer._get_result_array", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_result); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pandas_3lib_16SeriesBinGrouper_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_pw_6pandas_3lib_16SeriesBinGrouper_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_series = 0; PyObject *__pyx_v_f = 0; PyObject *__pyx_v_bins = 0; PyObject *__pyx_v_dummy = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__series,&__pyx_n_s__f,&__pyx_n_s__bins,&__pyx_n_s__dummy,0}; PyObject* values[4] = {0,0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__series)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__f)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("__init__", 1, 4, 4, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__bins)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("__init__", 1, 4, 4, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__dummy)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("__init__", 1, 4, 4, 3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 4) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[3] = PyTuple_GET_ITEM(__pyx_args, 3); } __pyx_v_series = values[0]; __pyx_v_f = values[1]; __pyx_v_bins = values[2]; __pyx_v_dummy = values[3]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("__init__", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.lib.SeriesBinGrouper.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return -1; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pandas_3lib_16SeriesBinGrouper___init__(((struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *)__pyx_v_self), __pyx_v_series, __pyx_v_f, __pyx_v_bins, __pyx_v_dummy); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/reduce.pyx":168 * object arr, index, dummy_arr, dummy_index, values, f, bins, typ, name * * def __init__(self, object series, object f, object bins, object dummy): # <<<<<<<<<<<<<< * n = len(series) * */ static int __pyx_pf_6pandas_3lib_16SeriesBinGrouper___init__(struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *__pyx_v_self, PyObject *__pyx_v_series, PyObject *__pyx_v_f, PyObject *__pyx_v_bins, PyObject *__pyx_v_dummy) { CYTHON_UNUSED PyObject *__pyx_v_n = NULL; PyObject *__pyx_v_values = NULL; int __pyx_r; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_t_4; int __pyx_t_5; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *(*__pyx_t_8)(PyObject *); int __pyx_t_9; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__init__", 0); /* "pandas/src/reduce.pyx":169 * * def __init__(self, object series, object f, object bins, object dummy): * n = len(series) # <<<<<<<<<<<<<< * * self.bins = bins */ __pyx_t_1 = PyObject_Length(__pyx_v_series); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 169; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_2 = PyInt_FromSsize_t(__pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 169; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_v_n = __pyx_t_2; __pyx_t_2 = 0; /* "pandas/src/reduce.pyx":171 * n = len(series) * * self.bins = bins # <<<<<<<<<<<<<< * self.f = f * */ __Pyx_INCREF(__pyx_v_bins); __Pyx_GIVEREF(__pyx_v_bins); __Pyx_GOTREF(__pyx_v_self->bins); __Pyx_DECREF(__pyx_v_self->bins); __pyx_v_self->bins = __pyx_v_bins; /* "pandas/src/reduce.pyx":172 * * self.bins = bins * self.f = f # <<<<<<<<<<<<<< * * values = series.values */ __Pyx_INCREF(__pyx_v_f); __Pyx_GIVEREF(__pyx_v_f); __Pyx_GOTREF(__pyx_v_self->f); __Pyx_DECREF(__pyx_v_self->f); __pyx_v_self->f = __pyx_v_f; /* "pandas/src/reduce.pyx":174 * self.f = f * * values = series.values # <<<<<<<<<<<<<< * if not values.flags.c_contiguous: * values = values.copy('C') */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_series, __pyx_n_s__values); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 174; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_v_values = __pyx_t_2; __pyx_t_2 = 0; /* "pandas/src/reduce.pyx":175 * * values = series.values * if not values.flags.c_contiguous: # <<<<<<<<<<<<<< * values = values.copy('C') * self.arr = values */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_values, __pyx_n_s__flags); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 175; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__c_contiguous); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 175; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 175; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_5 = ((!__pyx_t_4) != 0); if (__pyx_t_5) { /* "pandas/src/reduce.pyx":176 * values = series.values * if not values.flags.c_contiguous: * values = values.copy('C') # <<<<<<<<<<<<<< * self.arr = values * self.index = series.index */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_values, __pyx_n_s__copy); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 176; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_k_tuple_29), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 176; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF_SET(__pyx_v_values, __pyx_t_2); __pyx_t_2 = 0; goto __pyx_L3; } __pyx_L3:; /* "pandas/src/reduce.pyx":177 * if not values.flags.c_contiguous: * values = values.copy('C') * self.arr = values # <<<<<<<<<<<<<< * self.index = series.index * self.typ = type(series) */ __Pyx_INCREF(__pyx_v_values); __Pyx_GIVEREF(__pyx_v_values); __Pyx_GOTREF(__pyx_v_self->arr); __Pyx_DECREF(__pyx_v_self->arr); __pyx_v_self->arr = __pyx_v_values; /* "pandas/src/reduce.pyx":178 * values = values.copy('C') * self.arr = values * self.index = series.index # <<<<<<<<<<<<<< * self.typ = type(series) * self.name = getattr(series,'name',None) */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_series, __pyx_n_s__index); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 178; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __Pyx_GOTREF(__pyx_v_self->index); __Pyx_DECREF(__pyx_v_self->index); __pyx_v_self->index = __pyx_t_2; __pyx_t_2 = 0; /* "pandas/src/reduce.pyx":179 * self.arr = values * self.index = series.index * self.typ = type(series) # <<<<<<<<<<<<<< * self.name = getattr(series,'name',None) * */ __Pyx_INCREF(((PyObject *)Py_TYPE(__pyx_v_series))); __Pyx_GIVEREF(((PyObject *)Py_TYPE(__pyx_v_series))); __Pyx_GOTREF(__pyx_v_self->typ); __Pyx_DECREF(__pyx_v_self->typ); __pyx_v_self->typ = ((PyObject *)Py_TYPE(__pyx_v_series)); /* "pandas/src/reduce.pyx":180 * self.index = series.index * self.typ = type(series) * self.name = getattr(series,'name',None) # <<<<<<<<<<<<<< * * self.dummy_arr, self.dummy_index = self._check_dummy(dummy) */ __pyx_t_2 = __Pyx_GetAttr3(__pyx_v_series, ((PyObject *)__pyx_n_s__name), Py_None); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __Pyx_GOTREF(__pyx_v_self->name); __Pyx_DECREF(__pyx_v_self->name); __pyx_v_self->name = __pyx_t_2; __pyx_t_2 = 0; /* "pandas/src/reduce.pyx":182 * self.name = getattr(series,'name',None) * * self.dummy_arr, self.dummy_index = self._check_dummy(dummy) # <<<<<<<<<<<<<< * self.passed_dummy = dummy is not None * */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s___check_dummy); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 182; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 182; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_v_dummy); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_dummy); __Pyx_GIVEREF(__pyx_v_dummy); __pyx_t_6 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 182; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; if ((likely(PyTuple_CheckExact(__pyx_t_6))) || (PyList_CheckExact(__pyx_t_6))) { PyObject* sequence = __pyx_t_6; #if CYTHON_COMPILING_IN_CPYTHON Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 182; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_2 = PyTuple_GET_ITEM(sequence, 1); } else { __pyx_t_3 = PyList_GET_ITEM(sequence, 0); __pyx_t_2 = PyList_GET_ITEM(sequence, 1); } __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(__pyx_t_2); #else __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 182; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 182; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); #endif __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } else { Py_ssize_t index = -1; __pyx_t_7 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 182; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_8 = Py_TYPE(__pyx_t_7)->tp_iternext; index = 0; __pyx_t_3 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_3)) goto __pyx_L4_unpacking_failed; __Pyx_GOTREF(__pyx_t_3); index = 1; __pyx_t_2 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_2)) goto __pyx_L4_unpacking_failed; __Pyx_GOTREF(__pyx_t_2); if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_7), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 182; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_8 = NULL; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; goto __pyx_L5_unpacking_done; __pyx_L4_unpacking_failed:; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_8 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 182; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_L5_unpacking_done:; } __Pyx_GIVEREF(__pyx_t_3); __Pyx_GOTREF(__pyx_v_self->dummy_arr); __Pyx_DECREF(__pyx_v_self->dummy_arr); __pyx_v_self->dummy_arr = __pyx_t_3; __pyx_t_3 = 0; __Pyx_GIVEREF(__pyx_t_2); __Pyx_GOTREF(__pyx_v_self->dummy_index); __Pyx_DECREF(__pyx_v_self->dummy_index); __pyx_v_self->dummy_index = __pyx_t_2; __pyx_t_2 = 0; /* "pandas/src/reduce.pyx":183 * * self.dummy_arr, self.dummy_index = self._check_dummy(dummy) * self.passed_dummy = dummy is not None # <<<<<<<<<<<<<< * * # kludge for #1688 */ __pyx_t_5 = (__pyx_v_dummy != Py_None); __pyx_v_self->passed_dummy = __pyx_t_5; /* "pandas/src/reduce.pyx":186 * * # kludge for #1688 * if len(bins) > 0 and bins[-1] == len(series): # <<<<<<<<<<<<<< * self.ngroups = len(bins) * else: */ __pyx_t_1 = PyObject_Length(__pyx_v_bins); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 186; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_5 = (__pyx_t_1 > 0); if (__pyx_t_5) { __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_bins, -1, sizeof(long), PyInt_FromLong, 0, 1, 1); if (!__pyx_t_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 186; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_1 = PyObject_Length(__pyx_v_series); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 186; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_2 = PyInt_FromSsize_t(__pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 186; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyObject_RichCompare(__pyx_t_6, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 186; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 186; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_9 = __pyx_t_4; } else { __pyx_t_9 = __pyx_t_5; } if (__pyx_t_9) { /* "pandas/src/reduce.pyx":187 * # kludge for #1688 * if len(bins) > 0 and bins[-1] == len(series): * self.ngroups = len(bins) # <<<<<<<<<<<<<< * else: * self.ngroups = len(bins) + 1 */ __pyx_t_1 = PyObject_Length(__pyx_v_bins); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 187; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_self->ngroups = __pyx_t_1; goto __pyx_L6; } /*else*/ { /* "pandas/src/reduce.pyx":189 * self.ngroups = len(bins) * else: * self.ngroups = len(bins) + 1 # <<<<<<<<<<<<<< * * def _check_dummy(self, dummy=None): */ __pyx_t_1 = PyObject_Length(__pyx_v_bins); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 189; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_self->ngroups = (__pyx_t_1 + 1); } __pyx_L6:; __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_AddTraceback("pandas.lib.SeriesBinGrouper.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_XDECREF(__pyx_v_n); __Pyx_XDECREF(__pyx_v_values); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_3lib_16SeriesBinGrouper_3_check_dummy(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_6pandas_3lib_16SeriesBinGrouper_3_check_dummy(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_dummy = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_check_dummy (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__dummy,0}; PyObject* values[1] = {0}; /* "pandas/src/reduce.pyx":191 * self.ngroups = len(bins) + 1 * * def _check_dummy(self, dummy=None): # <<<<<<<<<<<<<< * if dummy is None: * values = np.empty(0, dtype=self.arr.dtype) */ values[0] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__dummy); if (value) { values[0] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_check_dummy") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 191; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_dummy = values[0]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("_check_dummy", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 191; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.lib.SeriesBinGrouper._check_dummy", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pandas_3lib_16SeriesBinGrouper_2_check_dummy(((struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *)__pyx_v_self), __pyx_v_dummy); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_3lib_16SeriesBinGrouper_2_check_dummy(struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *__pyx_v_self, PyObject *__pyx_v_dummy) { PyObject *__pyx_v_values = NULL; PyObject *__pyx_v_index = 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_check_dummy", 0); /* "pandas/src/reduce.pyx":192 * * def _check_dummy(self, dummy=None): * if dummy is None: # <<<<<<<<<<<<<< * values = np.empty(0, dtype=self.arr.dtype) * index = None */ __pyx_t_1 = (__pyx_v_dummy == Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { /* "pandas/src/reduce.pyx":193 * def _check_dummy(self, dummy=None): * if dummy is None: * values = np.empty(0, dtype=self.arr.dtype) # <<<<<<<<<<<<<< * index = None * else: */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 193; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s__empty); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 193; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 193; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_3)); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->arr, __pyx_n_s__dtype); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 193; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); if (PyDict_SetItem(__pyx_t_3, ((PyObject *)__pyx_n_s__dtype), __pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 193; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_k_tuple_30), ((PyObject *)__pyx_t_3)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 193; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; __pyx_v_values = __pyx_t_5; __pyx_t_5 = 0; /* "pandas/src/reduce.pyx":194 * if dummy is None: * values = np.empty(0, dtype=self.arr.dtype) * index = None # <<<<<<<<<<<<<< * else: * if dummy.dtype != self.arr.dtype: */ __Pyx_INCREF(Py_None); __pyx_v_index = Py_None; goto __pyx_L3; } /*else*/ { /* "pandas/src/reduce.pyx":196 * index = None * else: * if dummy.dtype != self.arr.dtype: # <<<<<<<<<<<<<< * raise ValueError('Dummy array must be same dtype') * values = dummy.values */ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_dummy, __pyx_n_s__dtype); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 196; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->arr, __pyx_n_s__dtype); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 196; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PyObject_RichCompare(__pyx_t_5, __pyx_t_3, Py_NE); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 196; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 196; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_2) { /* "pandas/src/reduce.pyx":197 * else: * if dummy.dtype != self.arr.dtype: * raise ValueError('Dummy array must be same dtype') # <<<<<<<<<<<<<< * values = dummy.values * if not values.flags.contiguous: */ __pyx_t_4 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_31), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 197; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 197; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L4; } __pyx_L4:; /* "pandas/src/reduce.pyx":198 * if dummy.dtype != self.arr.dtype: * raise ValueError('Dummy array must be same dtype') * values = dummy.values # <<<<<<<<<<<<<< * if not values.flags.contiguous: * values = values.copy() */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_dummy, __pyx_n_s__values); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 198; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_v_values = __pyx_t_4; __pyx_t_4 = 0; /* "pandas/src/reduce.pyx":199 * raise ValueError('Dummy array must be same dtype') * values = dummy.values * if not values.flags.contiguous: # <<<<<<<<<<<<<< * values = values.copy() * index = dummy.index */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_values, __pyx_n_s__flags); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 199; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s__contiguous); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 199; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 199; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_1 = ((!__pyx_t_2) != 0); if (__pyx_t_1) { /* "pandas/src/reduce.pyx":200 * values = dummy.values * if not values.flags.contiguous: * values = values.copy() # <<<<<<<<<<<<<< * index = dummy.index * */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_values, __pyx_n_s__copy); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 200; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 200; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF_SET(__pyx_v_values, __pyx_t_4); __pyx_t_4 = 0; goto __pyx_L5; } __pyx_L5:; /* "pandas/src/reduce.pyx":201 * if not values.flags.contiguous: * values = values.copy() * index = dummy.index # <<<<<<<<<<<<<< * * return values, index */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_dummy, __pyx_n_s__index); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 201; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_v_index = __pyx_t_4; __pyx_t_4 = 0; } __pyx_L3:; /* "pandas/src/reduce.pyx":203 * index = dummy.index * * return values, index # <<<<<<<<<<<<<< * * def get_result(self): */ __Pyx_XDECREF(__pyx_r); __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 203; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_v_values); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_values); __Pyx_GIVEREF(__pyx_v_values); __Pyx_INCREF(__pyx_v_index); PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_index); __Pyx_GIVEREF(__pyx_v_index); __pyx_r = ((PyObject *)__pyx_t_4); __pyx_t_4 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("pandas.lib.SeriesBinGrouper._check_dummy", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_values); __Pyx_XDECREF(__pyx_v_index); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_3lib_16SeriesBinGrouper_5get_result(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static PyObject *__pyx_pw_6pandas_3lib_16SeriesBinGrouper_5get_result(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("get_result (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_3lib_16SeriesBinGrouper_4get_result(((struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/reduce.pyx":205 * return values, index * * def get_result(self): # <<<<<<<<<<<<<< * cdef: * ndarray arr, result */ static PyObject *__pyx_pf_6pandas_3lib_16SeriesBinGrouper_4get_result(struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *__pyx_v_self) { PyArrayObject *__pyx_v_result = 0; PyArrayObject *__pyx_v_counts = 0; Py_ssize_t __pyx_v_i; CYTHON_UNUSED Py_ssize_t __pyx_v_n; Py_ssize_t __pyx_v_group_size; PyObject *__pyx_v_res = 0; int __pyx_v_initialized; struct __pyx_obj_6pandas_3lib_Slider *__pyx_v_vslider = 0; struct __pyx_obj_6pandas_3lib_Slider *__pyx_v_islider = 0; PyObject *__pyx_v_gin = 0; PyObject *__pyx_v_name = 0; PyObject *__pyx_v_cached_typ = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_counts; __Pyx_Buffer __pyx_pybuffer_counts; 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; int __pyx_t_11; __pyx_t_5numpy_int64_t __pyx_t_12; long __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; int __pyx_t_19; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_result", 0); __pyx_pybuffer_counts.pybuffer.buf = NULL; __pyx_pybuffer_counts.refcount = 0; __pyx_pybuffernd_counts.data = NULL; __pyx_pybuffernd_counts.rcbuffer = &__pyx_pybuffer_counts; /* "pandas/src/reduce.pyx":211 * Py_ssize_t i, n, group_size * object res * bint initialized = 0 # <<<<<<<<<<<<<< * Slider vslider, islider * object gin, typ, name */ __pyx_v_initialized = 0; /* "pandas/src/reduce.pyx":214 * Slider vslider, islider * object gin, typ, name * object cached_typ = None # <<<<<<<<<<<<<< * * counts = np.zeros(self.ngroups, dtype=np.int64) */ __Pyx_INCREF(Py_None); __pyx_v_cached_typ = Py_None; /* "pandas/src/reduce.pyx":216 * object cached_typ = None * * counts = np.zeros(self.ngroups, dtype=np.int64) # <<<<<<<<<<<<<< * * if self.ngroups > 0: */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 216; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s__zeros); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 216; __pyx_clineno = __LINE__; goto __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_self->ngroups); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 216; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 216; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 216; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 216; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s__int64); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 216; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__dtype), __pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 216; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_3), ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 216; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__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_filename = __pyx_f[0]; __pyx_lineno = 216; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_6 = ((PyArrayObject *)__pyx_t_5); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_counts.rcbuffer->pybuffer); __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_counts.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_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_counts.rcbuffer->pybuffer, (PyObject*)__pyx_v_counts, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_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_pybuffernd_counts.diminfo[0].strides = __pyx_pybuffernd_counts.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_counts.diminfo[0].shape = __pyx_pybuffernd_counts.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 216; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_6 = 0; __pyx_v_counts = ((PyArrayObject *)__pyx_t_5); __pyx_t_5 = 0; /* "pandas/src/reduce.pyx":218 * counts = np.zeros(self.ngroups, dtype=np.int64) * * if self.ngroups > 0: # <<<<<<<<<<<<<< * counts[0] = self.bins[0] * for i in range(1, self.ngroups): */ __pyx_t_11 = ((__pyx_v_self->ngroups > 0) != 0); if (__pyx_t_11) { /* "pandas/src/reduce.pyx":219 * * if self.ngroups > 0: * counts[0] = self.bins[0] # <<<<<<<<<<<<<< * for i in range(1, self.ngroups): * if i == self.ngroups - 1: */ __pyx_t_5 = __Pyx_GetItemInt(__pyx_v_self->bins, 0, sizeof(long), PyInt_FromLong, 0, 0, 1); if (!__pyx_t_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 219; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_12 = __Pyx_PyInt_from_py_npy_int64(__pyx_t_5); if (unlikely((__pyx_t_12 == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 219; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_13 = 0; __pyx_t_7 = -1; if (__pyx_t_13 < 0) { __pyx_t_13 += __pyx_pybuffernd_counts.diminfo[0].shape; if (unlikely(__pyx_t_13 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_13 >= __pyx_pybuffernd_counts.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 219; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_counts.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_counts.diminfo[0].strides) = __pyx_t_12; /* "pandas/src/reduce.pyx":220 * if self.ngroups > 0: * counts[0] = self.bins[0] * for i in range(1, self.ngroups): # <<<<<<<<<<<<<< * if i == self.ngroups - 1: * counts[i] = len(self.arr) - self.bins[i-1] */ __pyx_t_14 = __pyx_v_self->ngroups; for (__pyx_t_15 = 1; __pyx_t_15 < __pyx_t_14; __pyx_t_15+=1) { __pyx_v_i = __pyx_t_15; /* "pandas/src/reduce.pyx":221 * counts[0] = self.bins[0] * for i in range(1, self.ngroups): * if i == self.ngroups - 1: # <<<<<<<<<<<<<< * counts[i] = len(self.arr) - self.bins[i-1] * else: */ __pyx_t_11 = ((__pyx_v_i == (__pyx_v_self->ngroups - 1)) != 0); if (__pyx_t_11) { /* "pandas/src/reduce.pyx":222 * for i in range(1, self.ngroups): * if i == self.ngroups - 1: * counts[i] = len(self.arr) - self.bins[i-1] # <<<<<<<<<<<<<< * else: * counts[i] = self.bins[i] - self.bins[i-1] */ __pyx_t_5 = __pyx_v_self->arr; __Pyx_INCREF(__pyx_t_5); __pyx_t_16 = PyObject_Length(__pyx_t_5); if (unlikely(__pyx_t_16 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 222; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyInt_FromSsize_t(__pyx_t_16); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 222; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_16 = (__pyx_v_i - 1); __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_self->bins, __pyx_t_16, sizeof(Py_ssize_t), PyInt_FromSsize_t, 0, 1, 1); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 222; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = PyNumber_Subtract(__pyx_t_5, __pyx_t_1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 222; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_12 = __Pyx_PyInt_from_py_npy_int64(__pyx_t_3); if (unlikely((__pyx_t_12 == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 222; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_16 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_16 < 0) { __pyx_t_16 += __pyx_pybuffernd_counts.diminfo[0].shape; if (unlikely(__pyx_t_16 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_16 >= __pyx_pybuffernd_counts.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 222; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_counts.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_counts.diminfo[0].strides) = __pyx_t_12; goto __pyx_L6; } /*else*/ { /* "pandas/src/reduce.pyx":224 * counts[i] = len(self.arr) - self.bins[i-1] * else: * counts[i] = self.bins[i] - self.bins[i-1] # <<<<<<<<<<<<<< * * group_size = 0 */ __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_self->bins, __pyx_v_i, sizeof(Py_ssize_t), PyInt_FromSsize_t, 0, 1, 1); if (!__pyx_t_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 224; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_17 = (__pyx_v_i - 1); __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_self->bins, __pyx_t_17, sizeof(Py_ssize_t), PyInt_FromSsize_t, 0, 1, 1); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 224; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_5 = PyNumber_Subtract(__pyx_t_3, __pyx_t_1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 224; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_12 = __Pyx_PyInt_from_py_npy_int64(__pyx_t_5); if (unlikely((__pyx_t_12 == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 224; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_17 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_17 < 0) { __pyx_t_17 += __pyx_pybuffernd_counts.diminfo[0].shape; if (unlikely(__pyx_t_17 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_17 >= __pyx_pybuffernd_counts.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 224; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_counts.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_counts.diminfo[0].strides) = __pyx_t_12; } __pyx_L6:; } goto __pyx_L3; } __pyx_L3:; /* "pandas/src/reduce.pyx":226 * counts[i] = self.bins[i] - self.bins[i-1] * * group_size = 0 # <<<<<<<<<<<<<< * n = len(self.arr) * name = self.name */ __pyx_v_group_size = 0; /* "pandas/src/reduce.pyx":227 * * group_size = 0 * n = len(self.arr) # <<<<<<<<<<<<<< * name = self.name * */ __pyx_t_5 = __pyx_v_self->arr; __Pyx_INCREF(__pyx_t_5); __pyx_t_14 = PyObject_Length(__pyx_t_5); if (unlikely(__pyx_t_14 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 227; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_v_n = __pyx_t_14; /* "pandas/src/reduce.pyx":228 * group_size = 0 * n = len(self.arr) * name = self.name # <<<<<<<<<<<<<< * * vslider = Slider(self.arr, self.dummy_arr) */ __pyx_t_5 = __pyx_v_self->name; __Pyx_INCREF(__pyx_t_5); __pyx_v_name = __pyx_t_5; __pyx_t_5 = 0; /* "pandas/src/reduce.pyx":230 * name = self.name * * vslider = Slider(self.arr, self.dummy_arr) # <<<<<<<<<<<<<< * islider = Slider(self.index, self.dummy_index) * */ __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 230; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_v_self->arr); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_self->arr); __Pyx_GIVEREF(__pyx_v_self->arr); __Pyx_INCREF(__pyx_v_self->dummy_arr); PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_v_self->dummy_arr); __Pyx_GIVEREF(__pyx_v_self->dummy_arr); __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_6pandas_3lib_Slider)), ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 230; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; __pyx_v_vslider = ((struct __pyx_obj_6pandas_3lib_Slider *)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/reduce.pyx":231 * * vslider = Slider(self.arr, self.dummy_arr) * islider = Slider(self.index, self.dummy_index) # <<<<<<<<<<<<<< * * gin = self.dummy_index._engine */ __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 231; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_self->index); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_self->index); __Pyx_GIVEREF(__pyx_v_self->index); __Pyx_INCREF(__pyx_v_self->dummy_index); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_self->dummy_index); __Pyx_GIVEREF(__pyx_v_self->dummy_index); __pyx_t_5 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_6pandas_3lib_Slider)), ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 231; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_v_islider = ((struct __pyx_obj_6pandas_3lib_Slider *)__pyx_t_5); __pyx_t_5 = 0; /* "pandas/src/reduce.pyx":233 * islider = Slider(self.index, self.dummy_index) * * gin = self.dummy_index._engine # <<<<<<<<<<<<<< * * try: */ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->dummy_index, __pyx_n_s___engine); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 233; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_v_gin = __pyx_t_5; __pyx_t_5 = 0; /* "pandas/src/reduce.pyx":235 * gin = self.dummy_index._engine * * try: # <<<<<<<<<<<<<< * for i in range(self.ngroups): * group_size = counts[i] */ /*try:*/ { { __Pyx_ExceptionSave(&__pyx_t_10, &__pyx_t_9, &__pyx_t_8); __Pyx_XGOTREF(__pyx_t_10); __Pyx_XGOTREF(__pyx_t_9); __Pyx_XGOTREF(__pyx_t_8); /*try:*/ { /* "pandas/src/reduce.pyx":236 * * try: * for i in range(self.ngroups): # <<<<<<<<<<<<<< * group_size = counts[i] * */ __pyx_t_14 = __pyx_v_self->ngroups; for (__pyx_t_15 = 0; __pyx_t_15 < __pyx_t_14; __pyx_t_15+=1) { __pyx_v_i = __pyx_t_15; /* "pandas/src/reduce.pyx":237 * try: * for i in range(self.ngroups): * group_size = counts[i] # <<<<<<<<<<<<<< * * islider.set_length(group_size) */ __pyx_t_18 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_18 < 0) { __pyx_t_18 += __pyx_pybuffernd_counts.diminfo[0].shape; if (unlikely(__pyx_t_18 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_18 >= __pyx_pybuffernd_counts.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 237; __pyx_clineno = __LINE__; goto __pyx_L10_error;} } __pyx_v_group_size = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_counts.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_counts.diminfo[0].strides)); /* "pandas/src/reduce.pyx":239 * group_size = counts[i] * * islider.set_length(group_size) # <<<<<<<<<<<<<< * vslider.set_length(group_size) * */ __pyx_t_5 = ((struct __pyx_vtabstruct_6pandas_3lib_Slider *)__pyx_v_islider->__pyx_vtab)->set_length(__pyx_v_islider, __pyx_v_group_size, 0); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 239; __pyx_clineno = __LINE__; goto __pyx_L10_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "pandas/src/reduce.pyx":240 * * islider.set_length(group_size) * vslider.set_length(group_size) # <<<<<<<<<<<<<< * * if cached_typ is None: */ __pyx_t_5 = ((struct __pyx_vtabstruct_6pandas_3lib_Slider *)__pyx_v_vslider->__pyx_vtab)->set_length(__pyx_v_vslider, __pyx_v_group_size, 0); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 240; __pyx_clineno = __LINE__; goto __pyx_L10_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "pandas/src/reduce.pyx":242 * vslider.set_length(group_size) * * if cached_typ is None: # <<<<<<<<<<<<<< * cached_typ = self.typ(vslider.buf, index=islider.buf, * name=name) */ __pyx_t_11 = (__pyx_v_cached_typ == Py_None); __pyx_t_19 = (__pyx_t_11 != 0); if (__pyx_t_19) { /* "pandas/src/reduce.pyx":243 * * if cached_typ is None: * cached_typ = self.typ(vslider.buf, index=islider.buf, # <<<<<<<<<<<<<< * name=name) * else: */ __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L10_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(((PyObject *)__pyx_v_vslider->buf)); PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_v_vslider->buf)); __Pyx_GIVEREF(((PyObject *)__pyx_v_vslider->buf)); __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L10_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_1)); if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__index), ((PyObject *)__pyx_v_islider->buf)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L10_error;} /* "pandas/src/reduce.pyx":244 * if cached_typ is None: * cached_typ = self.typ(vslider.buf, index=islider.buf, * name=name) # <<<<<<<<<<<<<< * else: * object.__setattr__(cached_typ._data._block, 'values', vslider.buf) */ if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__name), __pyx_v_name) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L10_error;} __pyx_t_3 = PyObject_Call(__pyx_v_self->typ, ((PyObject *)__pyx_t_5), ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L10_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __Pyx_DECREF_SET(__pyx_v_cached_typ, __pyx_t_3); __pyx_t_3 = 0; goto __pyx_L20; } /*else*/ { /* "pandas/src/reduce.pyx":246 * name=name) * else: * object.__setattr__(cached_typ._data._block, 'values', vslider.buf) # <<<<<<<<<<<<<< * object.__setattr__(cached_typ, '_index', islider.buf) * object.__setattr__(cached_typ, 'name', name) */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_builtin_object, __pyx_n_s____setattr__); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 246; __pyx_clineno = __LINE__; goto __pyx_L10_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_cached_typ, __pyx_n_s___data); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 246; __pyx_clineno = __LINE__; goto __pyx_L10_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s___block); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 246; __pyx_clineno = __LINE__; goto __pyx_L10_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 246; __pyx_clineno = __LINE__; goto __pyx_L10_error;} __Pyx_GOTREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __Pyx_INCREF(((PyObject *)__pyx_n_s__values)); PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject *)__pyx_n_s__values)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__values)); __Pyx_INCREF(((PyObject *)__pyx_v_vslider->buf)); PyTuple_SET_ITEM(__pyx_t_1, 2, ((PyObject *)__pyx_v_vslider->buf)); __Pyx_GIVEREF(((PyObject *)__pyx_v_vslider->buf)); __pyx_t_5 = 0; __pyx_t_5 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 246; __pyx_clineno = __LINE__; goto __pyx_L10_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "pandas/src/reduce.pyx":247 * else: * object.__setattr__(cached_typ._data._block, 'values', vslider.buf) * object.__setattr__(cached_typ, '_index', islider.buf) # <<<<<<<<<<<<<< * object.__setattr__(cached_typ, 'name', name) * */ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_builtin_object, __pyx_n_s____setattr__); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 247; __pyx_clineno = __LINE__; goto __pyx_L10_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 247; __pyx_clineno = __LINE__; goto __pyx_L10_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_cached_typ); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_cached_typ); __Pyx_GIVEREF(__pyx_v_cached_typ); __Pyx_INCREF(((PyObject *)__pyx_n_s___index)); PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject *)__pyx_n_s___index)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s___index)); __Pyx_INCREF(((PyObject *)__pyx_v_islider->buf)); PyTuple_SET_ITEM(__pyx_t_1, 2, ((PyObject *)__pyx_v_islider->buf)); __Pyx_GIVEREF(((PyObject *)__pyx_v_islider->buf)); __pyx_t_3 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 247; __pyx_clineno = __LINE__; goto __pyx_L10_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/reduce.pyx":248 * object.__setattr__(cached_typ._data._block, 'values', vslider.buf) * object.__setattr__(cached_typ, '_index', islider.buf) * object.__setattr__(cached_typ, 'name', name) # <<<<<<<<<<<<<< * * res = self.f(cached_typ) */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_builtin_object, __pyx_n_s____setattr__); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 248; __pyx_clineno = __LINE__; goto __pyx_L10_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 248; __pyx_clineno = __LINE__; goto __pyx_L10_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_cached_typ); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_cached_typ); __Pyx_GIVEREF(__pyx_v_cached_typ); __Pyx_INCREF(((PyObject *)__pyx_n_s__name)); PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject *)__pyx_n_s__name)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__name)); __Pyx_INCREF(__pyx_v_name); PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_name); __Pyx_GIVEREF(__pyx_v_name); __pyx_t_5 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 248; __pyx_clineno = __LINE__; goto __pyx_L10_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } __pyx_L20:; /* "pandas/src/reduce.pyx":250 * object.__setattr__(cached_typ, 'name', name) * * res = self.f(cached_typ) # <<<<<<<<<<<<<< * res = _extract_result(res) * if not initialized: */ __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 250; __pyx_clineno = __LINE__; goto __pyx_L10_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_v_cached_typ); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_cached_typ); __Pyx_GIVEREF(__pyx_v_cached_typ); __pyx_t_1 = PyObject_Call(__pyx_v_self->f, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 250; __pyx_clineno = __LINE__; goto __pyx_L10_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; __Pyx_XDECREF_SET(__pyx_v_res, __pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/reduce.pyx":251 * * res = self.f(cached_typ) * res = _extract_result(res) # <<<<<<<<<<<<<< * if not initialized: * result = self._get_result_array(res) */ __pyx_t_1 = __pyx_f_6pandas_3lib__extract_result(__pyx_v_res); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 251; __pyx_clineno = __LINE__; goto __pyx_L10_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF_SET(__pyx_v_res, __pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/reduce.pyx":252 * res = self.f(cached_typ) * res = _extract_result(res) * if not initialized: # <<<<<<<<<<<<<< * result = self._get_result_array(res) * initialized = 1 */ __pyx_t_19 = ((!(__pyx_v_initialized != 0)) != 0); if (__pyx_t_19) { /* "pandas/src/reduce.pyx":253 * res = _extract_result(res) * if not initialized: * result = self._get_result_array(res) # <<<<<<<<<<<<<< * initialized = 1 * */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s___get_result_array); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 253; __pyx_clineno = __LINE__; goto __pyx_L10_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 253; __pyx_clineno = __LINE__; goto __pyx_L10_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_v_res); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_res); __Pyx_GIVEREF(__pyx_v_res); __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 253; __pyx_clineno = __LINE__; goto __pyx_L10_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 253; __pyx_clineno = __LINE__; goto __pyx_L10_error;} __Pyx_XDECREF_SET(__pyx_v_result, ((PyArrayObject *)__pyx_t_3)); __pyx_t_3 = 0; /* "pandas/src/reduce.pyx":254 * if not initialized: * result = self._get_result_array(res) * initialized = 1 # <<<<<<<<<<<<<< * * util.assign_value_1d(result, i, res) */ __pyx_v_initialized = 1; goto __pyx_L21; } __pyx_L21:; /* "pandas/src/reduce.pyx":256 * initialized = 1 * * util.assign_value_1d(result, i, res) # <<<<<<<<<<<<<< * * islider.advance(group_size) */ if (unlikely(!__pyx_v_result)) { __Pyx_RaiseUnboundLocalError("result"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 256; __pyx_clineno = __LINE__; goto __pyx_L10_error;} } __pyx_t_7 = assign_value_1d(__pyx_v_result, __pyx_v_i, __pyx_v_res); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 256; __pyx_clineno = __LINE__; goto __pyx_L10_error;} /* "pandas/src/reduce.pyx":258 * util.assign_value_1d(result, i, res) * * islider.advance(group_size) # <<<<<<<<<<<<<< * vslider.advance(group_size) * */ __pyx_t_3 = ((struct __pyx_vtabstruct_6pandas_3lib_Slider *)__pyx_v_islider->__pyx_vtab)->advance(__pyx_v_islider, __pyx_v_group_size, 0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 258; __pyx_clineno = __LINE__; goto __pyx_L10_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/reduce.pyx":259 * * islider.advance(group_size) * vslider.advance(group_size) # <<<<<<<<<<<<<< * * gin.clear_mapping() */ __pyx_t_3 = ((struct __pyx_vtabstruct_6pandas_3lib_Slider *)__pyx_v_vslider->__pyx_vtab)->advance(__pyx_v_vslider, __pyx_v_group_size, 0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 259; __pyx_clineno = __LINE__; goto __pyx_L10_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/reduce.pyx":261 * vslider.advance(group_size) * * gin.clear_mapping() # <<<<<<<<<<<<<< * except: * raise */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_gin, __pyx_n_s__clear_mapping); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 261; __pyx_clineno = __LINE__; goto __pyx_L10_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 261; __pyx_clineno = __LINE__; goto __pyx_L10_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } } __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; goto __pyx_L17_try_end; __pyx_L10_error:; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; /* "pandas/src/reduce.pyx":262 * * gin.clear_mapping() * except: # <<<<<<<<<<<<<< * raise * finally: */ /*except:*/ { __Pyx_AddTraceback("pandas.lib.SeriesBinGrouper.get_result", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_3, &__pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 262; __pyx_clineno = __LINE__; goto __pyx_L12_except_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_GOTREF(__pyx_t_3); __Pyx_GOTREF(__pyx_t_1); /* "pandas/src/reduce.pyx":263 * gin.clear_mapping() * except: * raise # <<<<<<<<<<<<<< * finally: * # so we don't free the wrong memory */ __Pyx_GIVEREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_1); __Pyx_ErrRestore(__pyx_t_5, __pyx_t_3, __pyx_t_1); __pyx_t_5 = 0; __pyx_t_3 = 0; __pyx_t_1 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 263; __pyx_clineno = __LINE__; goto __pyx_L12_except_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L11_exception_handled; } __pyx_L12_except_error:; __Pyx_XGIVEREF(__pyx_t_10); __Pyx_XGIVEREF(__pyx_t_9); __Pyx_XGIVEREF(__pyx_t_8); __Pyx_ExceptionReset(__pyx_t_10, __pyx_t_9, __pyx_t_8); goto __pyx_L8; __pyx_L11_exception_handled:; __Pyx_XGIVEREF(__pyx_t_10); __Pyx_XGIVEREF(__pyx_t_9); __Pyx_XGIVEREF(__pyx_t_8); __Pyx_ExceptionReset(__pyx_t_10, __pyx_t_9, __pyx_t_8); __pyx_L17_try_end:; } } /* "pandas/src/reduce.pyx":266 * finally: * # so we don't free the wrong memory * islider.reset() # <<<<<<<<<<<<<< * vslider.reset() * */ /*finally:*/ { int __pyx_why; PyObject *__pyx_exc_type, *__pyx_exc_value, *__pyx_exc_tb; int __pyx_exc_lineno; __pyx_exc_type = 0; __pyx_exc_value = 0; __pyx_exc_tb = 0; __pyx_exc_lineno = 0; __pyx_why = 0; goto __pyx_L9; __pyx_L8: { __pyx_why = 4; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_ErrFetch(&__pyx_exc_type, &__pyx_exc_value, &__pyx_exc_tb); __pyx_exc_lineno = __pyx_lineno; goto __pyx_L9; } __pyx_L9:; __pyx_t_1 = ((struct __pyx_vtabstruct_6pandas_3lib_Slider *)__pyx_v_islider->__pyx_vtab)->reset(__pyx_v_islider, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 266; __pyx_clineno = __LINE__; goto __pyx_L24_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/reduce.pyx":267 * # so we don't free the wrong memory * islider.reset() * vslider.reset() # <<<<<<<<<<<<<< * * if result.dtype == np.object_: */ __pyx_t_1 = ((struct __pyx_vtabstruct_6pandas_3lib_Slider *)__pyx_v_vslider->__pyx_vtab)->reset(__pyx_v_vslider, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 267; __pyx_clineno = __LINE__; goto __pyx_L24_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L25; __pyx_L24_error:; if (__pyx_why == 4) { Py_XDECREF(__pyx_exc_type); Py_XDECREF(__pyx_exc_value); Py_XDECREF(__pyx_exc_tb); } goto __pyx_L1_error; __pyx_L25:; switch (__pyx_why) { case 4: { __Pyx_ErrRestore(__pyx_exc_type, __pyx_exc_value, __pyx_exc_tb); __pyx_lineno = __pyx_exc_lineno; __pyx_exc_type = 0; __pyx_exc_value = 0; __pyx_exc_tb = 0; goto __pyx_L1_error; } } } /* "pandas/src/reduce.pyx":269 * vslider.reset() * * if result.dtype == np.object_: # <<<<<<<<<<<<<< * result = maybe_convert_objects(result) * */ if (unlikely(!__pyx_v_result)) { __Pyx_RaiseUnboundLocalError("result"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 269; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_result), __pyx_n_s__dtype); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 269; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 269; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s__object_); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 269; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyObject_RichCompare(__pyx_t_1, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 269; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_19 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_19 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 269; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_19) { /* "pandas/src/reduce.pyx":270 * * if result.dtype == np.object_: * result = maybe_convert_objects(result) # <<<<<<<<<<<<<< * * return result, counts */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_12); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 270; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 270; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(((PyObject *)__pyx_v_result)); PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_v_result)); __Pyx_GIVEREF(((PyObject *)__pyx_v_result)); __pyx_t_1 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 270; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 270; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF_SET(__pyx_v_result, ((PyArrayObject *)__pyx_t_1)); __pyx_t_1 = 0; goto __pyx_L26; } __pyx_L26:; /* "pandas/src/reduce.pyx":272 * result = maybe_convert_objects(result) * * return result, counts # <<<<<<<<<<<<<< * * def _get_result_array(self, object res): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 272; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)__pyx_v_result)); PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_result)); __Pyx_GIVEREF(((PyObject *)__pyx_v_result)); __Pyx_INCREF(((PyObject *)__pyx_v_counts)); PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject *)__pyx_v_counts)); __Pyx_GIVEREF(((PyObject *)__pyx_v_counts)); __pyx_r = ((PyObject *)__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_counts.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.lib.SeriesBinGrouper.get_result", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_counts.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_result); __Pyx_XDECREF((PyObject *)__pyx_v_counts); __Pyx_XDECREF(__pyx_v_res); __Pyx_XDECREF((PyObject *)__pyx_v_vslider); __Pyx_XDECREF((PyObject *)__pyx_v_islider); __Pyx_XDECREF(__pyx_v_gin); __Pyx_XDECREF(__pyx_v_name); __Pyx_XDECREF(__pyx_v_cached_typ); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_3lib_16SeriesBinGrouper_7_get_result_array(PyObject *__pyx_v_self, PyObject *__pyx_v_res); /*proto*/ static PyObject *__pyx_pw_6pandas_3lib_16SeriesBinGrouper_7_get_result_array(PyObject *__pyx_v_self, PyObject *__pyx_v_res) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_get_result_array (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_3lib_16SeriesBinGrouper_6_get_result_array(((struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *)__pyx_v_self), ((PyObject *)__pyx_v_res)); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/reduce.pyx":274 * return result, counts * * def _get_result_array(self, object res): # <<<<<<<<<<<<<< * try: * assert(not isinstance(res, np.ndarray)) */ static PyObject *__pyx_pf_6pandas_3lib_16SeriesBinGrouper_6_get_result_array(struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *__pyx_v_self, PyObject *__pyx_v_res) { PyObject *__pyx_v_result = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_t_4; Py_ssize_t __pyx_t_5; PyObject *__pyx_t_6 = NULL; Py_ssize_t __pyx_t_7; int __pyx_t_8; int __pyx_t_9; PyObject *__pyx_t_10 = NULL; PyObject *__pyx_t_11 = NULL; PyObject *__pyx_t_12 = NULL; int __pyx_t_13; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_get_result_array", 0); /* "pandas/src/reduce.pyx":275 * * def _get_result_array(self, object res): * try: # <<<<<<<<<<<<<< * assert(not isinstance(res, np.ndarray)) * assert(not (isinstance(res, list) and len(res) == len(self.dummy_arr))) */ { __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:*/ { /* "pandas/src/reduce.pyx":276 * def _get_result_array(self, object res): * try: * assert(not isinstance(res, np.ndarray)) # <<<<<<<<<<<<<< * assert(not (isinstance(res, list) and len(res) == len(self.dummy_arr))) * */ #ifndef CYTHON_WITHOUT_ASSERTIONS __pyx_t_4 = __Pyx_TypeCheck(__pyx_v_res, ((PyObject*)__pyx_ptype_5numpy_ndarray)); if (unlikely(!((!(__pyx_t_4 != 0)) != 0))) { PyErr_SetNone(PyExc_AssertionError); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 276; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } #endif /* "pandas/src/reduce.pyx":277 * try: * assert(not isinstance(res, np.ndarray)) * assert(not (isinstance(res, list) and len(res) == len(self.dummy_arr))) # <<<<<<<<<<<<<< * * result = np.empty(self.ngroups, dtype='O') */ #ifndef CYTHON_WITHOUT_ASSERTIONS __pyx_t_4 = PyList_Check(__pyx_v_res); if ((__pyx_t_4 != 0)) { __pyx_t_5 = PyObject_Length(__pyx_v_res); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 277; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_t_6 = __pyx_v_self->dummy_arr; __Pyx_INCREF(__pyx_t_6); __pyx_t_7 = PyObject_Length(__pyx_t_6); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 277; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_8 = ((__pyx_t_5 == __pyx_t_7) != 0); __pyx_t_9 = __pyx_t_8; } else { __pyx_t_9 = (__pyx_t_4 != 0); } if (unlikely(!((!__pyx_t_9) != 0))) { PyErr_SetNone(PyExc_AssertionError); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 277; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } #endif /* "pandas/src/reduce.pyx":279 * assert(not (isinstance(res, list) and len(res) == len(self.dummy_arr))) * * result = np.empty(self.ngroups, dtype='O') # <<<<<<<<<<<<<< * except Exception: * raise ValueError('function does not reduce') */ __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 279; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s__empty); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 279; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyInt_FromSsize_t(__pyx_v_self->ngroups); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 279; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_11 = PyTuple_New(1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 279; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyDict_New(); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 279; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_6)); if (PyDict_SetItem(__pyx_t_6, ((PyObject *)__pyx_n_s__dtype), ((PyObject *)__pyx_n_s__O)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 279; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_t_12 = PyObject_Call(__pyx_t_10, ((PyObject *)__pyx_t_11), ((PyObject *)__pyx_t_6)); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 279; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_11)); __pyx_t_11 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0; __pyx_v_result = __pyx_t_12; __pyx_t_12 = 0; } __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L10_try_end; __pyx_L3_error:; __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; /* "pandas/src/reduce.pyx":280 * * result = np.empty(self.ngroups, dtype='O') * except Exception: # <<<<<<<<<<<<<< * raise ValueError('function does not reduce') * return result */ __pyx_t_13 = PyErr_ExceptionMatches(__pyx_builtin_Exception); if (__pyx_t_13) { __Pyx_AddTraceback("pandas.lib.SeriesBinGrouper._get_result_array", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_12, &__pyx_t_6, &__pyx_t_11) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 280; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} __Pyx_GOTREF(__pyx_t_12); __Pyx_GOTREF(__pyx_t_6); __Pyx_GOTREF(__pyx_t_11); /* "pandas/src/reduce.pyx":281 * result = np.empty(self.ngroups, dtype='O') * except Exception: * raise ValueError('function does not reduce') # <<<<<<<<<<<<<< * return result * */ __pyx_t_10 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_32), NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 281; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_Raise(__pyx_t_10, 0, 0, 0); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 281; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; goto __pyx_L4_exception_handled; } __pyx_L5_except_error:; __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); goto __pyx_L1_error; __pyx_L4_exception_handled:; __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); __pyx_L10_try_end:; } /* "pandas/src/reduce.pyx":282 * except Exception: * raise ValueError('function does not reduce') * return result # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_result); __pyx_r = __pyx_v_result; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_10); __Pyx_XDECREF(__pyx_t_11); __Pyx_XDECREF(__pyx_t_12); __Pyx_AddTraceback("pandas.lib.SeriesBinGrouper._get_result_array", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_result); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_3lib_16SeriesBinGrouper_3arr_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6pandas_3lib_16SeriesBinGrouper_3arr_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_3lib_16SeriesBinGrouper_3arr___get__(((struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/reduce.pyx":166 * * cdef public: * object arr, index, dummy_arr, dummy_index, values, f, bins, typ, name # <<<<<<<<<<<<<< * * def __init__(self, object series, object f, object bins, object dummy): */ static PyObject *__pyx_pf_6pandas_3lib_16SeriesBinGrouper_3arr___get__(struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_self->arr); __pyx_r = __pyx_v_self->arr; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pandas_3lib_16SeriesBinGrouper_3arr_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ static int __pyx_pw_6pandas_3lib_16SeriesBinGrouper_3arr_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_3lib_16SeriesBinGrouper_3arr_2__set__(((struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *)__pyx_v_self), ((PyObject *)__pyx_v_value)); __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pandas_3lib_16SeriesBinGrouper_3arr_2__set__(struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__", 0); __Pyx_INCREF(__pyx_v_value); __Pyx_GIVEREF(__pyx_v_value); __Pyx_GOTREF(__pyx_v_self->arr); __Pyx_DECREF(__pyx_v_self->arr); __pyx_v_self->arr = __pyx_v_value; __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pandas_3lib_16SeriesBinGrouper_3arr_5__del__(PyObject *__pyx_v_self); /*proto*/ static int __pyx_pw_6pandas_3lib_16SeriesBinGrouper_3arr_5__del__(PyObject *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_3lib_16SeriesBinGrouper_3arr_4__del__(((struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pandas_3lib_16SeriesBinGrouper_3arr_4__del__(struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__", 0); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->arr); __Pyx_DECREF(__pyx_v_self->arr); __pyx_v_self->arr = Py_None; __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_3lib_16SeriesBinGrouper_5index_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6pandas_3lib_16SeriesBinGrouper_5index_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_3lib_16SeriesBinGrouper_5index___get__(((struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_3lib_16SeriesBinGrouper_5index___get__(struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_self->index); __pyx_r = __pyx_v_self->index; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pandas_3lib_16SeriesBinGrouper_5index_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ static int __pyx_pw_6pandas_3lib_16SeriesBinGrouper_5index_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_3lib_16SeriesBinGrouper_5index_2__set__(((struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *)__pyx_v_self), ((PyObject *)__pyx_v_value)); __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pandas_3lib_16SeriesBinGrouper_5index_2__set__(struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__", 0); __Pyx_INCREF(__pyx_v_value); __Pyx_GIVEREF(__pyx_v_value); __Pyx_GOTREF(__pyx_v_self->index); __Pyx_DECREF(__pyx_v_self->index); __pyx_v_self->index = __pyx_v_value; __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pandas_3lib_16SeriesBinGrouper_5index_5__del__(PyObject *__pyx_v_self); /*proto*/ static int __pyx_pw_6pandas_3lib_16SeriesBinGrouper_5index_5__del__(PyObject *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_3lib_16SeriesBinGrouper_5index_4__del__(((struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pandas_3lib_16SeriesBinGrouper_5index_4__del__(struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__", 0); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->index); __Pyx_DECREF(__pyx_v_self->index); __pyx_v_self->index = Py_None; __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_3lib_16SeriesBinGrouper_9dummy_arr_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6pandas_3lib_16SeriesBinGrouper_9dummy_arr_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_3lib_16SeriesBinGrouper_9dummy_arr___get__(((struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_3lib_16SeriesBinGrouper_9dummy_arr___get__(struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_self->dummy_arr); __pyx_r = __pyx_v_self->dummy_arr; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pandas_3lib_16SeriesBinGrouper_9dummy_arr_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ static int __pyx_pw_6pandas_3lib_16SeriesBinGrouper_9dummy_arr_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_3lib_16SeriesBinGrouper_9dummy_arr_2__set__(((struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *)__pyx_v_self), ((PyObject *)__pyx_v_value)); __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pandas_3lib_16SeriesBinGrouper_9dummy_arr_2__set__(struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__", 0); __Pyx_INCREF(__pyx_v_value); __Pyx_GIVEREF(__pyx_v_value); __Pyx_GOTREF(__pyx_v_self->dummy_arr); __Pyx_DECREF(__pyx_v_self->dummy_arr); __pyx_v_self->dummy_arr = __pyx_v_value; __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pandas_3lib_16SeriesBinGrouper_9dummy_arr_5__del__(PyObject *__pyx_v_self); /*proto*/ static int __pyx_pw_6pandas_3lib_16SeriesBinGrouper_9dummy_arr_5__del__(PyObject *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_3lib_16SeriesBinGrouper_9dummy_arr_4__del__(((struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pandas_3lib_16SeriesBinGrouper_9dummy_arr_4__del__(struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__", 0); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->dummy_arr); __Pyx_DECREF(__pyx_v_self->dummy_arr); __pyx_v_self->dummy_arr = Py_None; __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_3lib_16SeriesBinGrouper_11dummy_index_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6pandas_3lib_16SeriesBinGrouper_11dummy_index_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_3lib_16SeriesBinGrouper_11dummy_index___get__(((struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_3lib_16SeriesBinGrouper_11dummy_index___get__(struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_self->dummy_index); __pyx_r = __pyx_v_self->dummy_index; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pandas_3lib_16SeriesBinGrouper_11dummy_index_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ static int __pyx_pw_6pandas_3lib_16SeriesBinGrouper_11dummy_index_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_3lib_16SeriesBinGrouper_11dummy_index_2__set__(((struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *)__pyx_v_self), ((PyObject *)__pyx_v_value)); __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pandas_3lib_16SeriesBinGrouper_11dummy_index_2__set__(struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__", 0); __Pyx_INCREF(__pyx_v_value); __Pyx_GIVEREF(__pyx_v_value); __Pyx_GOTREF(__pyx_v_self->dummy_index); __Pyx_DECREF(__pyx_v_self->dummy_index); __pyx_v_self->dummy_index = __pyx_v_value; __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pandas_3lib_16SeriesBinGrouper_11dummy_index_5__del__(PyObject *__pyx_v_self); /*proto*/ static int __pyx_pw_6pandas_3lib_16SeriesBinGrouper_11dummy_index_5__del__(PyObject *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_3lib_16SeriesBinGrouper_11dummy_index_4__del__(((struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pandas_3lib_16SeriesBinGrouper_11dummy_index_4__del__(struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__", 0); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->dummy_index); __Pyx_DECREF(__pyx_v_self->dummy_index); __pyx_v_self->dummy_index = Py_None; __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_3lib_16SeriesBinGrouper_6values_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6pandas_3lib_16SeriesBinGrouper_6values_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_3lib_16SeriesBinGrouper_6values___get__(((struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_3lib_16SeriesBinGrouper_6values___get__(struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_self->values); __pyx_r = __pyx_v_self->values; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pandas_3lib_16SeriesBinGrouper_6values_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ static int __pyx_pw_6pandas_3lib_16SeriesBinGrouper_6values_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_3lib_16SeriesBinGrouper_6values_2__set__(((struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *)__pyx_v_self), ((PyObject *)__pyx_v_value)); __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pandas_3lib_16SeriesBinGrouper_6values_2__set__(struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__", 0); __Pyx_INCREF(__pyx_v_value); __Pyx_GIVEREF(__pyx_v_value); __Pyx_GOTREF(__pyx_v_self->values); __Pyx_DECREF(__pyx_v_self->values); __pyx_v_self->values = __pyx_v_value; __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pandas_3lib_16SeriesBinGrouper_6values_5__del__(PyObject *__pyx_v_self); /*proto*/ static int __pyx_pw_6pandas_3lib_16SeriesBinGrouper_6values_5__del__(PyObject *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_3lib_16SeriesBinGrouper_6values_4__del__(((struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pandas_3lib_16SeriesBinGrouper_6values_4__del__(struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__", 0); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->values); __Pyx_DECREF(__pyx_v_self->values); __pyx_v_self->values = Py_None; __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_3lib_16SeriesBinGrouper_1f_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6pandas_3lib_16SeriesBinGrouper_1f_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_3lib_16SeriesBinGrouper_1f___get__(((struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_3lib_16SeriesBinGrouper_1f___get__(struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_self->f); __pyx_r = __pyx_v_self->f; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pandas_3lib_16SeriesBinGrouper_1f_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ static int __pyx_pw_6pandas_3lib_16SeriesBinGrouper_1f_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_3lib_16SeriesBinGrouper_1f_2__set__(((struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *)__pyx_v_self), ((PyObject *)__pyx_v_value)); __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pandas_3lib_16SeriesBinGrouper_1f_2__set__(struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__", 0); __Pyx_INCREF(__pyx_v_value); __Pyx_GIVEREF(__pyx_v_value); __Pyx_GOTREF(__pyx_v_self->f); __Pyx_DECREF(__pyx_v_self->f); __pyx_v_self->f = __pyx_v_value; __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pandas_3lib_16SeriesBinGrouper_1f_5__del__(PyObject *__pyx_v_self); /*proto*/ static int __pyx_pw_6pandas_3lib_16SeriesBinGrouper_1f_5__del__(PyObject *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_3lib_16SeriesBinGrouper_1f_4__del__(((struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pandas_3lib_16SeriesBinGrouper_1f_4__del__(struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__", 0); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->f); __Pyx_DECREF(__pyx_v_self->f); __pyx_v_self->f = Py_None; __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_3lib_16SeriesBinGrouper_4bins_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6pandas_3lib_16SeriesBinGrouper_4bins_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_3lib_16SeriesBinGrouper_4bins___get__(((struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_3lib_16SeriesBinGrouper_4bins___get__(struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_self->bins); __pyx_r = __pyx_v_self->bins; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pandas_3lib_16SeriesBinGrouper_4bins_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ static int __pyx_pw_6pandas_3lib_16SeriesBinGrouper_4bins_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_3lib_16SeriesBinGrouper_4bins_2__set__(((struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *)__pyx_v_self), ((PyObject *)__pyx_v_value)); __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pandas_3lib_16SeriesBinGrouper_4bins_2__set__(struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__", 0); __Pyx_INCREF(__pyx_v_value); __Pyx_GIVEREF(__pyx_v_value); __Pyx_GOTREF(__pyx_v_self->bins); __Pyx_DECREF(__pyx_v_self->bins); __pyx_v_self->bins = __pyx_v_value; __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pandas_3lib_16SeriesBinGrouper_4bins_5__del__(PyObject *__pyx_v_self); /*proto*/ static int __pyx_pw_6pandas_3lib_16SeriesBinGrouper_4bins_5__del__(PyObject *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_3lib_16SeriesBinGrouper_4bins_4__del__(((struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pandas_3lib_16SeriesBinGrouper_4bins_4__del__(struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__", 0); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->bins); __Pyx_DECREF(__pyx_v_self->bins); __pyx_v_self->bins = Py_None; __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_3lib_16SeriesBinGrouper_3typ_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6pandas_3lib_16SeriesBinGrouper_3typ_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_3lib_16SeriesBinGrouper_3typ___get__(((struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_3lib_16SeriesBinGrouper_3typ___get__(struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_self->typ); __pyx_r = __pyx_v_self->typ; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pandas_3lib_16SeriesBinGrouper_3typ_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ static int __pyx_pw_6pandas_3lib_16SeriesBinGrouper_3typ_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_3lib_16SeriesBinGrouper_3typ_2__set__(((struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *)__pyx_v_self), ((PyObject *)__pyx_v_value)); __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pandas_3lib_16SeriesBinGrouper_3typ_2__set__(struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__", 0); __Pyx_INCREF(__pyx_v_value); __Pyx_GIVEREF(__pyx_v_value); __Pyx_GOTREF(__pyx_v_self->typ); __Pyx_DECREF(__pyx_v_self->typ); __pyx_v_self->typ = __pyx_v_value; __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pandas_3lib_16SeriesBinGrouper_3typ_5__del__(PyObject *__pyx_v_self); /*proto*/ static int __pyx_pw_6pandas_3lib_16SeriesBinGrouper_3typ_5__del__(PyObject *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_3lib_16SeriesBinGrouper_3typ_4__del__(((struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pandas_3lib_16SeriesBinGrouper_3typ_4__del__(struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__", 0); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->typ); __Pyx_DECREF(__pyx_v_self->typ); __pyx_v_self->typ = Py_None; __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_3lib_16SeriesBinGrouper_4name_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6pandas_3lib_16SeriesBinGrouper_4name_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_3lib_16SeriesBinGrouper_4name___get__(((struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_3lib_16SeriesBinGrouper_4name___get__(struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_self->name); __pyx_r = __pyx_v_self->name; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pandas_3lib_16SeriesBinGrouper_4name_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ static int __pyx_pw_6pandas_3lib_16SeriesBinGrouper_4name_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_3lib_16SeriesBinGrouper_4name_2__set__(((struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *)__pyx_v_self), ((PyObject *)__pyx_v_value)); __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pandas_3lib_16SeriesBinGrouper_4name_2__set__(struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__", 0); __Pyx_INCREF(__pyx_v_value); __Pyx_GIVEREF(__pyx_v_value); __Pyx_GOTREF(__pyx_v_self->name); __Pyx_DECREF(__pyx_v_self->name); __pyx_v_self->name = __pyx_v_value; __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pandas_3lib_16SeriesBinGrouper_4name_5__del__(PyObject *__pyx_v_self); /*proto*/ static int __pyx_pw_6pandas_3lib_16SeriesBinGrouper_4name_5__del__(PyObject *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_3lib_16SeriesBinGrouper_4name_4__del__(((struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pandas_3lib_16SeriesBinGrouper_4name_4__del__(struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__", 0); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->name); __Pyx_DECREF(__pyx_v_self->name); __pyx_v_self->name = Py_None; __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pandas_3lib_13SeriesGrouper_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_pw_6pandas_3lib_13SeriesGrouper_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_series = 0; PyObject *__pyx_v_f = 0; PyObject *__pyx_v_labels = 0; Py_ssize_t __pyx_v_ngroups; PyObject *__pyx_v_dummy = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__series,&__pyx_n_s__f,&__pyx_n_s__labels,&__pyx_n_s__ngroups,&__pyx_n_s__dummy,0}; PyObject* values[5] = {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 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__series)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__f)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("__init__", 1, 5, 5, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 297; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__labels)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("__init__", 1, 5, 5, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 297; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__ngroups)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("__init__", 1, 5, 5, 3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 297; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 4: if (likely((values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__dummy)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("__init__", 1, 5, 5, 4); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 297; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 297; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 5) { 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); } __pyx_v_series = values[0]; __pyx_v_f = values[1]; __pyx_v_labels = values[2]; __pyx_v_ngroups = __Pyx_PyIndex_AsSsize_t(values[3]); if (unlikely((__pyx_v_ngroups == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 298; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_dummy = values[4]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("__init__", 1, 5, 5, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 297; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.lib.SeriesGrouper.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return -1; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pandas_3lib_13SeriesGrouper___init__(((struct __pyx_obj_6pandas_3lib_SeriesGrouper *)__pyx_v_self), __pyx_v_series, __pyx_v_f, __pyx_v_labels, __pyx_v_ngroups, __pyx_v_dummy); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/reduce.pyx":297 * object arr, index, dummy_arr, dummy_index, f, labels, values, typ, name * * def __init__(self, object series, object f, object labels, # <<<<<<<<<<<<<< * Py_ssize_t ngroups, object dummy): * n = len(series) */ static int __pyx_pf_6pandas_3lib_13SeriesGrouper___init__(struct __pyx_obj_6pandas_3lib_SeriesGrouper *__pyx_v_self, PyObject *__pyx_v_series, PyObject *__pyx_v_f, PyObject *__pyx_v_labels, Py_ssize_t __pyx_v_ngroups, PyObject *__pyx_v_dummy) { CYTHON_UNUSED PyObject *__pyx_v_n = NULL; PyObject *__pyx_v_values = NULL; int __pyx_r; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_t_4; int __pyx_t_5; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *(*__pyx_t_8)(PyObject *); int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__init__", 0); /* "pandas/src/reduce.pyx":299 * def __init__(self, object series, object f, object labels, * Py_ssize_t ngroups, object dummy): * n = len(series) # <<<<<<<<<<<<<< * * self.labels = labels */ __pyx_t_1 = PyObject_Length(__pyx_v_series); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 299; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_2 = PyInt_FromSsize_t(__pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 299; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_v_n = __pyx_t_2; __pyx_t_2 = 0; /* "pandas/src/reduce.pyx":301 * n = len(series) * * self.labels = labels # <<<<<<<<<<<<<< * self.f = f * */ __Pyx_INCREF(__pyx_v_labels); __Pyx_GIVEREF(__pyx_v_labels); __Pyx_GOTREF(__pyx_v_self->labels); __Pyx_DECREF(__pyx_v_self->labels); __pyx_v_self->labels = __pyx_v_labels; /* "pandas/src/reduce.pyx":302 * * self.labels = labels * self.f = f # <<<<<<<<<<<<<< * * values = series.values */ __Pyx_INCREF(__pyx_v_f); __Pyx_GIVEREF(__pyx_v_f); __Pyx_GOTREF(__pyx_v_self->f); __Pyx_DECREF(__pyx_v_self->f); __pyx_v_self->f = __pyx_v_f; /* "pandas/src/reduce.pyx":304 * self.f = f * * values = series.values # <<<<<<<<<<<<<< * if not values.flags.c_contiguous: * values = values.copy('C') */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_series, __pyx_n_s__values); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 304; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_v_values = __pyx_t_2; __pyx_t_2 = 0; /* "pandas/src/reduce.pyx":305 * * values = series.values * if not values.flags.c_contiguous: # <<<<<<<<<<<<<< * values = values.copy('C') * self.arr = values */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_values, __pyx_n_s__flags); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 305; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__c_contiguous); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 305; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 305; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_5 = ((!__pyx_t_4) != 0); if (__pyx_t_5) { /* "pandas/src/reduce.pyx":306 * values = series.values * if not values.flags.c_contiguous: * values = values.copy('C') # <<<<<<<<<<<<<< * self.arr = values * self.index = series.index */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_values, __pyx_n_s__copy); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 306; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_k_tuple_33), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 306; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF_SET(__pyx_v_values, __pyx_t_2); __pyx_t_2 = 0; goto __pyx_L3; } __pyx_L3:; /* "pandas/src/reduce.pyx":307 * if not values.flags.c_contiguous: * values = values.copy('C') * self.arr = values # <<<<<<<<<<<<<< * self.index = series.index * self.typ = type(series) */ __Pyx_INCREF(__pyx_v_values); __Pyx_GIVEREF(__pyx_v_values); __Pyx_GOTREF(__pyx_v_self->arr); __Pyx_DECREF(__pyx_v_self->arr); __pyx_v_self->arr = __pyx_v_values; /* "pandas/src/reduce.pyx":308 * values = values.copy('C') * self.arr = values * self.index = series.index # <<<<<<<<<<<<<< * self.typ = type(series) * self.name = getattr(series,'name',None) */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_series, __pyx_n_s__index); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 308; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __Pyx_GOTREF(__pyx_v_self->index); __Pyx_DECREF(__pyx_v_self->index); __pyx_v_self->index = __pyx_t_2; __pyx_t_2 = 0; /* "pandas/src/reduce.pyx":309 * self.arr = values * self.index = series.index * self.typ = type(series) # <<<<<<<<<<<<<< * self.name = getattr(series,'name',None) * */ __Pyx_INCREF(((PyObject *)Py_TYPE(__pyx_v_series))); __Pyx_GIVEREF(((PyObject *)Py_TYPE(__pyx_v_series))); __Pyx_GOTREF(__pyx_v_self->typ); __Pyx_DECREF(__pyx_v_self->typ); __pyx_v_self->typ = ((PyObject *)Py_TYPE(__pyx_v_series)); /* "pandas/src/reduce.pyx":310 * self.index = series.index * self.typ = type(series) * self.name = getattr(series,'name',None) # <<<<<<<<<<<<<< * * self.dummy_arr, self.dummy_index = self._check_dummy(dummy) */ __pyx_t_2 = __Pyx_GetAttr3(__pyx_v_series, ((PyObject *)__pyx_n_s__name), Py_None); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 310; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __Pyx_GOTREF(__pyx_v_self->name); __Pyx_DECREF(__pyx_v_self->name); __pyx_v_self->name = __pyx_t_2; __pyx_t_2 = 0; /* "pandas/src/reduce.pyx":312 * self.name = getattr(series,'name',None) * * self.dummy_arr, self.dummy_index = self._check_dummy(dummy) # <<<<<<<<<<<<<< * self.passed_dummy = dummy is not None * self.ngroups = ngroups */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s___check_dummy); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 312; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 312; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_v_dummy); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_dummy); __Pyx_GIVEREF(__pyx_v_dummy); __pyx_t_6 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 312; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; if ((likely(PyTuple_CheckExact(__pyx_t_6))) || (PyList_CheckExact(__pyx_t_6))) { PyObject* sequence = __pyx_t_6; #if CYTHON_COMPILING_IN_CPYTHON Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 312; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_2 = PyTuple_GET_ITEM(sequence, 1); } else { __pyx_t_3 = PyList_GET_ITEM(sequence, 0); __pyx_t_2 = PyList_GET_ITEM(sequence, 1); } __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(__pyx_t_2); #else __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 312; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 312; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); #endif __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } else { Py_ssize_t index = -1; __pyx_t_7 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 312; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_8 = Py_TYPE(__pyx_t_7)->tp_iternext; index = 0; __pyx_t_3 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_3)) goto __pyx_L4_unpacking_failed; __Pyx_GOTREF(__pyx_t_3); index = 1; __pyx_t_2 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_2)) goto __pyx_L4_unpacking_failed; __Pyx_GOTREF(__pyx_t_2); if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_7), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 312; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_8 = NULL; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; goto __pyx_L5_unpacking_done; __pyx_L4_unpacking_failed:; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_8 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 312; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_L5_unpacking_done:; } __Pyx_GIVEREF(__pyx_t_3); __Pyx_GOTREF(__pyx_v_self->dummy_arr); __Pyx_DECREF(__pyx_v_self->dummy_arr); __pyx_v_self->dummy_arr = __pyx_t_3; __pyx_t_3 = 0; __Pyx_GIVEREF(__pyx_t_2); __Pyx_GOTREF(__pyx_v_self->dummy_index); __Pyx_DECREF(__pyx_v_self->dummy_index); __pyx_v_self->dummy_index = __pyx_t_2; __pyx_t_2 = 0; /* "pandas/src/reduce.pyx":313 * * self.dummy_arr, self.dummy_index = self._check_dummy(dummy) * self.passed_dummy = dummy is not None # <<<<<<<<<<<<<< * self.ngroups = ngroups * */ __pyx_t_5 = (__pyx_v_dummy != Py_None); __pyx_v_self->passed_dummy = __pyx_t_5; /* "pandas/src/reduce.pyx":314 * self.dummy_arr, self.dummy_index = self._check_dummy(dummy) * self.passed_dummy = dummy is not None * self.ngroups = ngroups # <<<<<<<<<<<<<< * * def _check_dummy(self, dummy=None): */ __pyx_v_self->ngroups = __pyx_v_ngroups; __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_AddTraceback("pandas.lib.SeriesGrouper.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_XDECREF(__pyx_v_n); __Pyx_XDECREF(__pyx_v_values); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_3lib_13SeriesGrouper_3_check_dummy(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_6pandas_3lib_13SeriesGrouper_3_check_dummy(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_dummy = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_check_dummy (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__dummy,0}; PyObject* values[1] = {0}; /* "pandas/src/reduce.pyx":316 * self.ngroups = ngroups * * def _check_dummy(self, dummy=None): # <<<<<<<<<<<<<< * if dummy is None: * values = np.empty(0, dtype=self.arr.dtype) */ values[0] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__dummy); if (value) { values[0] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_check_dummy") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 316; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_dummy = values[0]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("_check_dummy", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 316; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.lib.SeriesGrouper._check_dummy", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pandas_3lib_13SeriesGrouper_2_check_dummy(((struct __pyx_obj_6pandas_3lib_SeriesGrouper *)__pyx_v_self), __pyx_v_dummy); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_3lib_13SeriesGrouper_2_check_dummy(struct __pyx_obj_6pandas_3lib_SeriesGrouper *__pyx_v_self, PyObject *__pyx_v_dummy) { PyObject *__pyx_v_values = NULL; PyObject *__pyx_v_index = 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_check_dummy", 0); /* "pandas/src/reduce.pyx":317 * * def _check_dummy(self, dummy=None): * if dummy is None: # <<<<<<<<<<<<<< * values = np.empty(0, dtype=self.arr.dtype) * index = None */ __pyx_t_1 = (__pyx_v_dummy == Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { /* "pandas/src/reduce.pyx":318 * def _check_dummy(self, dummy=None): * if dummy is None: * values = np.empty(0, dtype=self.arr.dtype) # <<<<<<<<<<<<<< * index = None * else: */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 318; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s__empty); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 318; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 318; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_3)); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->arr, __pyx_n_s__dtype); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 318; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); if (PyDict_SetItem(__pyx_t_3, ((PyObject *)__pyx_n_s__dtype), __pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 318; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_k_tuple_34), ((PyObject *)__pyx_t_3)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 318; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; __pyx_v_values = __pyx_t_5; __pyx_t_5 = 0; /* "pandas/src/reduce.pyx":319 * if dummy is None: * values = np.empty(0, dtype=self.arr.dtype) * index = None # <<<<<<<<<<<<<< * else: * if dummy.dtype != self.arr.dtype: */ __Pyx_INCREF(Py_None); __pyx_v_index = Py_None; goto __pyx_L3; } /*else*/ { /* "pandas/src/reduce.pyx":321 * index = None * else: * if dummy.dtype != self.arr.dtype: # <<<<<<<<<<<<<< * raise ValueError('Dummy array must be same dtype') * values = dummy.values */ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_dummy, __pyx_n_s__dtype); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 321; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->arr, __pyx_n_s__dtype); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 321; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PyObject_RichCompare(__pyx_t_5, __pyx_t_3, Py_NE); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 321; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 321; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_2) { /* "pandas/src/reduce.pyx":322 * else: * if dummy.dtype != self.arr.dtype: * raise ValueError('Dummy array must be same dtype') # <<<<<<<<<<<<<< * values = dummy.values * if not values.flags.contiguous: */ __pyx_t_4 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_35), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 322; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 322; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L4; } __pyx_L4:; /* "pandas/src/reduce.pyx":323 * if dummy.dtype != self.arr.dtype: * raise ValueError('Dummy array must be same dtype') * values = dummy.values # <<<<<<<<<<<<<< * if not values.flags.contiguous: * values = values.copy() */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_dummy, __pyx_n_s__values); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 323; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_v_values = __pyx_t_4; __pyx_t_4 = 0; /* "pandas/src/reduce.pyx":324 * raise ValueError('Dummy array must be same dtype') * values = dummy.values * if not values.flags.contiguous: # <<<<<<<<<<<<<< * values = values.copy() * index = dummy.index */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_values, __pyx_n_s__flags); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 324; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s__contiguous); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 324; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 324; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_1 = ((!__pyx_t_2) != 0); if (__pyx_t_1) { /* "pandas/src/reduce.pyx":325 * values = dummy.values * if not values.flags.contiguous: * values = values.copy() # <<<<<<<<<<<<<< * index = dummy.index * */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_values, __pyx_n_s__copy); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 325; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 325; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF_SET(__pyx_v_values, __pyx_t_4); __pyx_t_4 = 0; goto __pyx_L5; } __pyx_L5:; /* "pandas/src/reduce.pyx":326 * if not values.flags.contiguous: * values = values.copy() * index = dummy.index # <<<<<<<<<<<<<< * * return values, index */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_dummy, __pyx_n_s__index); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 326; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_v_index = __pyx_t_4; __pyx_t_4 = 0; } __pyx_L3:; /* "pandas/src/reduce.pyx":328 * index = dummy.index * * return values, index # <<<<<<<<<<<<<< * * def get_result(self): */ __Pyx_XDECREF(__pyx_r); __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 328; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_v_values); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_values); __Pyx_GIVEREF(__pyx_v_values); __Pyx_INCREF(__pyx_v_index); PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_index); __Pyx_GIVEREF(__pyx_v_index); __pyx_r = ((PyObject *)__pyx_t_4); __pyx_t_4 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("pandas.lib.SeriesGrouper._check_dummy", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_values); __Pyx_XDECREF(__pyx_v_index); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_3lib_13SeriesGrouper_5get_result(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static PyObject *__pyx_pw_6pandas_3lib_13SeriesGrouper_5get_result(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("get_result (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_3lib_13SeriesGrouper_4get_result(((struct __pyx_obj_6pandas_3lib_SeriesGrouper *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/reduce.pyx":330 * return values, index * * def get_result(self): # <<<<<<<<<<<<<< * cdef: * ndarray arr, result */ static PyObject *__pyx_pf_6pandas_3lib_13SeriesGrouper_4get_result(struct __pyx_obj_6pandas_3lib_SeriesGrouper *__pyx_v_self) { PyArrayObject *__pyx_v_result = 0; PyArrayObject *__pyx_v_labels = 0; PyArrayObject *__pyx_v_counts = 0; Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_n; Py_ssize_t __pyx_v_group_size; Py_ssize_t __pyx_v_lab; PyObject *__pyx_v_res = 0; int __pyx_v_initialized; struct __pyx_obj_6pandas_3lib_Slider *__pyx_v_vslider = 0; struct __pyx_obj_6pandas_3lib_Slider *__pyx_v_islider = 0; PyObject *__pyx_v_gin = 0; PyObject *__pyx_v_name = 0; PyObject *__pyx_v_cached_typ = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_counts; __Pyx_Buffer __pyx_pybuffer_counts; __Pyx_LocalBuf_ND __pyx_pybuffernd_labels; __Pyx_Buffer __pyx_pybuffer_labels; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyArrayObject *__pyx_t_1 = NULL; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; Py_ssize_t __pyx_t_11; Py_ssize_t __pyx_t_12; Py_ssize_t __pyx_t_13; int __pyx_t_14; Py_ssize_t __pyx_t_15; int __pyx_t_16; int __pyx_t_17; Py_ssize_t __pyx_t_18; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_result", 0); __pyx_pybuffer_labels.pybuffer.buf = NULL; __pyx_pybuffer_labels.refcount = 0; __pyx_pybuffernd_labels.data = NULL; __pyx_pybuffernd_labels.rcbuffer = &__pyx_pybuffer_labels; __pyx_pybuffer_counts.pybuffer.buf = NULL; __pyx_pybuffer_counts.refcount = 0; __pyx_pybuffernd_counts.data = NULL; __pyx_pybuffernd_counts.rcbuffer = &__pyx_pybuffer_counts; /* "pandas/src/reduce.pyx":336 * Py_ssize_t i, n, group_size, lab * object res * bint initialized = 0 # <<<<<<<<<<<<<< * Slider vslider, islider * object gin, typ, name */ __pyx_v_initialized = 0; /* "pandas/src/reduce.pyx":339 * Slider vslider, islider * object gin, typ, name * object cached_typ = None # <<<<<<<<<<<<<< * * labels = self.labels */ __Pyx_INCREF(Py_None); __pyx_v_cached_typ = Py_None; /* "pandas/src/reduce.pyx":341 * object cached_typ = None * * labels = self.labels # <<<<<<<<<<<<<< * counts = np.zeros(self.ngroups, dtype=np.int64) * group_size = 0 */ if (!(likely(((__pyx_v_self->labels) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_self->labels, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 341; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_1 = ((PyArrayObject *)__pyx_v_self->labels); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_labels.rcbuffer->pybuffer); __pyx_t_2 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_labels.rcbuffer->pybuffer, (PyObject*)__pyx_t_1, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_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_labels.rcbuffer->pybuffer, (PyObject*)__pyx_v_labels, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_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_pybuffernd_labels.diminfo[0].strides = __pyx_pybuffernd_labels.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_labels.diminfo[0].shape = __pyx_pybuffernd_labels.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 341; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_1 = 0; __Pyx_INCREF(__pyx_v_self->labels); __pyx_v_labels = ((PyArrayObject *)__pyx_v_self->labels); /* "pandas/src/reduce.pyx":342 * * labels = self.labels * counts = np.zeros(self.ngroups, dtype=np.int64) # <<<<<<<<<<<<<< * group_size = 0 * n = len(self.arr) */ __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 342; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s__zeros); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 342; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyInt_FromSsize_t(__pyx_v_self->ngroups); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 342; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 342; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyDict_New(); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 342; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_6)); __pyx_t_9 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 342; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s__int64); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 342; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; if (PyDict_SetItem(__pyx_t_6, ((PyObject *)__pyx_n_s__dtype), __pyx_t_10) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 342; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_t_10 = PyObject_Call(__pyx_t_7, ((PyObject *)__pyx_t_8), ((PyObject *)__pyx_t_6)); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 342; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0; if (!(likely(((__pyx_t_10) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_10, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 342; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_1 = ((PyArrayObject *)__pyx_t_10); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_counts.rcbuffer->pybuffer); __pyx_t_2 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_counts.rcbuffer->pybuffer, (PyObject*)__pyx_t_1, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_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_counts.rcbuffer->pybuffer, (PyObject*)__pyx_v_counts, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_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_pybuffernd_counts.diminfo[0].strides = __pyx_pybuffernd_counts.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_counts.diminfo[0].shape = __pyx_pybuffernd_counts.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 342; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_1 = 0; __pyx_v_counts = ((PyArrayObject *)__pyx_t_10); __pyx_t_10 = 0; /* "pandas/src/reduce.pyx":343 * labels = self.labels * counts = np.zeros(self.ngroups, dtype=np.int64) * group_size = 0 # <<<<<<<<<<<<<< * n = len(self.arr) * name = self.name */ __pyx_v_group_size = 0; /* "pandas/src/reduce.pyx":344 * counts = np.zeros(self.ngroups, dtype=np.int64) * group_size = 0 * n = len(self.arr) # <<<<<<<<<<<<<< * name = self.name * */ __pyx_t_10 = __pyx_v_self->arr; __Pyx_INCREF(__pyx_t_10); __pyx_t_11 = PyObject_Length(__pyx_t_10); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 344; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_v_n = __pyx_t_11; /* "pandas/src/reduce.pyx":345 * group_size = 0 * n = len(self.arr) * name = self.name # <<<<<<<<<<<<<< * * vslider = Slider(self.arr, self.dummy_arr) */ __pyx_t_10 = __pyx_v_self->name; __Pyx_INCREF(__pyx_t_10); __pyx_v_name = __pyx_t_10; __pyx_t_10 = 0; /* "pandas/src/reduce.pyx":347 * name = self.name * * vslider = Slider(self.arr, self.dummy_arr) # <<<<<<<<<<<<<< * islider = Slider(self.index, self.dummy_index) * */ __pyx_t_10 = PyTuple_New(2); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 347; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_INCREF(__pyx_v_self->arr); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_v_self->arr); __Pyx_GIVEREF(__pyx_v_self->arr); __Pyx_INCREF(__pyx_v_self->dummy_arr); PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_v_self->dummy_arr); __Pyx_GIVEREF(__pyx_v_self->dummy_arr); __pyx_t_6 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_6pandas_3lib_Slider)), ((PyObject *)__pyx_t_10), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 347; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(((PyObject *)__pyx_t_10)); __pyx_t_10 = 0; __pyx_v_vslider = ((struct __pyx_obj_6pandas_3lib_Slider *)__pyx_t_6); __pyx_t_6 = 0; /* "pandas/src/reduce.pyx":348 * * vslider = Slider(self.arr, self.dummy_arr) * islider = Slider(self.index, self.dummy_index) # <<<<<<<<<<<<<< * * gin = self.dummy_index._engine */ __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 348; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(__pyx_v_self->index); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_self->index); __Pyx_GIVEREF(__pyx_v_self->index); __Pyx_INCREF(__pyx_v_self->dummy_index); PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_v_self->dummy_index); __Pyx_GIVEREF(__pyx_v_self->dummy_index); __pyx_t_10 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_6pandas_3lib_Slider)), ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 348; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0; __pyx_v_islider = ((struct __pyx_obj_6pandas_3lib_Slider *)__pyx_t_10); __pyx_t_10 = 0; /* "pandas/src/reduce.pyx":350 * islider = Slider(self.index, self.dummy_index) * * gin = self.dummy_index._engine # <<<<<<<<<<<<<< * * try: */ __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->dummy_index, __pyx_n_s___engine); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 350; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __pyx_v_gin = __pyx_t_10; __pyx_t_10 = 0; /* "pandas/src/reduce.pyx":352 * gin = self.dummy_index._engine * * try: # <<<<<<<<<<<<<< * for i in range(n): * group_size += 1 */ /*try:*/ { { __Pyx_ExceptionSave(&__pyx_t_3, &__pyx_t_4, &__pyx_t_5); __Pyx_XGOTREF(__pyx_t_3); __Pyx_XGOTREF(__pyx_t_4); __Pyx_XGOTREF(__pyx_t_5); /*try:*/ { /* "pandas/src/reduce.pyx":353 * * try: * for i in range(n): # <<<<<<<<<<<<<< * group_size += 1 * */ __pyx_t_11 = __pyx_v_n; for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_11; __pyx_t_12+=1) { __pyx_v_i = __pyx_t_12; /* "pandas/src/reduce.pyx":354 * try: * for i in range(n): * group_size += 1 # <<<<<<<<<<<<<< * * lab = labels[i] */ __pyx_v_group_size = (__pyx_v_group_size + 1); /* "pandas/src/reduce.pyx":356 * group_size += 1 * * lab = labels[i] # <<<<<<<<<<<<<< * * if i == n - 1 or lab != labels[i + 1]: */ __pyx_t_13 = __pyx_v_i; __pyx_t_2 = -1; if (__pyx_t_13 < 0) { __pyx_t_13 += __pyx_pybuffernd_labels.diminfo[0].shape; if (unlikely(__pyx_t_13 < 0)) __pyx_t_2 = 0; } else if (unlikely(__pyx_t_13 >= __pyx_pybuffernd_labels.diminfo[0].shape)) __pyx_t_2 = 0; if (unlikely(__pyx_t_2 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 356; __pyx_clineno = __LINE__; goto __pyx_L6_error;} } __pyx_v_lab = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_labels.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_labels.diminfo[0].strides)); /* "pandas/src/reduce.pyx":358 * lab = labels[i] * * if i == n - 1 or lab != labels[i + 1]: # <<<<<<<<<<<<<< * if lab == -1: * islider.advance(group_size) */ __pyx_t_14 = ((__pyx_v_i == (__pyx_v_n - 1)) != 0); if (!__pyx_t_14) { __pyx_t_15 = (__pyx_v_i + 1); __pyx_t_2 = -1; if (__pyx_t_15 < 0) { __pyx_t_15 += __pyx_pybuffernd_labels.diminfo[0].shape; if (unlikely(__pyx_t_15 < 0)) __pyx_t_2 = 0; } else if (unlikely(__pyx_t_15 >= __pyx_pybuffernd_labels.diminfo[0].shape)) __pyx_t_2 = 0; if (unlikely(__pyx_t_2 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 358; __pyx_clineno = __LINE__; goto __pyx_L6_error;} } __pyx_t_16 = ((__pyx_v_lab != (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_labels.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_labels.diminfo[0].strides))) != 0); __pyx_t_17 = __pyx_t_16; } else { __pyx_t_17 = __pyx_t_14; } if (__pyx_t_17) { /* "pandas/src/reduce.pyx":359 * * if i == n - 1 or lab != labels[i + 1]: * if lab == -1: # <<<<<<<<<<<<<< * islider.advance(group_size) * vslider.advance(group_size) */ __pyx_t_17 = ((__pyx_v_lab == -1) != 0); if (__pyx_t_17) { /* "pandas/src/reduce.pyx":360 * if i == n - 1 or lab != labels[i + 1]: * if lab == -1: * islider.advance(group_size) # <<<<<<<<<<<<<< * vslider.advance(group_size) * group_size = 0 */ __pyx_t_10 = ((struct __pyx_vtabstruct_6pandas_3lib_Slider *)__pyx_v_islider->__pyx_vtab)->advance(__pyx_v_islider, __pyx_v_group_size, 0); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 360; __pyx_clineno = __LINE__; goto __pyx_L6_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; /* "pandas/src/reduce.pyx":361 * if lab == -1: * islider.advance(group_size) * vslider.advance(group_size) # <<<<<<<<<<<<<< * group_size = 0 * continue */ __pyx_t_10 = ((struct __pyx_vtabstruct_6pandas_3lib_Slider *)__pyx_v_vslider->__pyx_vtab)->advance(__pyx_v_vslider, __pyx_v_group_size, 0); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 361; __pyx_clineno = __LINE__; goto __pyx_L6_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; /* "pandas/src/reduce.pyx":362 * islider.advance(group_size) * vslider.advance(group_size) * group_size = 0 # <<<<<<<<<<<<<< * continue * */ __pyx_v_group_size = 0; /* "pandas/src/reduce.pyx":363 * vslider.advance(group_size) * group_size = 0 * continue # <<<<<<<<<<<<<< * * islider.set_length(group_size) */ goto __pyx_L14_continue; goto __pyx_L17; } __pyx_L17:; /* "pandas/src/reduce.pyx":365 * continue * * islider.set_length(group_size) # <<<<<<<<<<<<<< * vslider.set_length(group_size) * */ __pyx_t_10 = ((struct __pyx_vtabstruct_6pandas_3lib_Slider *)__pyx_v_islider->__pyx_vtab)->set_length(__pyx_v_islider, __pyx_v_group_size, 0); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 365; __pyx_clineno = __LINE__; goto __pyx_L6_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; /* "pandas/src/reduce.pyx":366 * * islider.set_length(group_size) * vslider.set_length(group_size) # <<<<<<<<<<<<<< * * if cached_typ is None: */ __pyx_t_10 = ((struct __pyx_vtabstruct_6pandas_3lib_Slider *)__pyx_v_vslider->__pyx_vtab)->set_length(__pyx_v_vslider, __pyx_v_group_size, 0); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 366; __pyx_clineno = __LINE__; goto __pyx_L6_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; /* "pandas/src/reduce.pyx":368 * vslider.set_length(group_size) * * if cached_typ is None: # <<<<<<<<<<<<<< * cached_typ = self.typ(vslider.buf, index=islider.buf, * name=name) */ __pyx_t_17 = (__pyx_v_cached_typ == Py_None); __pyx_t_14 = (__pyx_t_17 != 0); if (__pyx_t_14) { /* "pandas/src/reduce.pyx":369 * * if cached_typ is None: * cached_typ = self.typ(vslider.buf, index=islider.buf, # <<<<<<<<<<<<<< * name=name) * else: */ __pyx_t_10 = PyTuple_New(1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 369; __pyx_clineno = __LINE__; goto __pyx_L6_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_INCREF(((PyObject *)__pyx_v_vslider->buf)); PyTuple_SET_ITEM(__pyx_t_10, 0, ((PyObject *)__pyx_v_vslider->buf)); __Pyx_GIVEREF(((PyObject *)__pyx_v_vslider->buf)); __pyx_t_6 = PyDict_New(); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 369; __pyx_clineno = __LINE__; goto __pyx_L6_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_6)); if (PyDict_SetItem(__pyx_t_6, ((PyObject *)__pyx_n_s__index), ((PyObject *)__pyx_v_islider->buf)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 369; __pyx_clineno = __LINE__; goto __pyx_L6_error;} /* "pandas/src/reduce.pyx":370 * if cached_typ is None: * cached_typ = self.typ(vslider.buf, index=islider.buf, * name=name) # <<<<<<<<<<<<<< * else: * object.__setattr__(cached_typ._data._block, 'values', vslider.buf) */ if (PyDict_SetItem(__pyx_t_6, ((PyObject *)__pyx_n_s__name), __pyx_v_name) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 369; __pyx_clineno = __LINE__; goto __pyx_L6_error;} __pyx_t_8 = PyObject_Call(__pyx_v_self->typ, ((PyObject *)__pyx_t_10), ((PyObject *)__pyx_t_6)); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 369; __pyx_clineno = __LINE__; goto __pyx_L6_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(((PyObject *)__pyx_t_10)); __pyx_t_10 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0; __Pyx_DECREF_SET(__pyx_v_cached_typ, __pyx_t_8); __pyx_t_8 = 0; goto __pyx_L18; } /*else*/ { /* "pandas/src/reduce.pyx":372 * name=name) * else: * object.__setattr__(cached_typ._data._block, 'values', vslider.buf) # <<<<<<<<<<<<<< * object.__setattr__(cached_typ, '_index', islider.buf) * object.__setattr__(cached_typ, 'name', name) */ __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_builtin_object, __pyx_n_s____setattr__); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 372; __pyx_clineno = __LINE__; goto __pyx_L6_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_cached_typ, __pyx_n_s___data); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 372; __pyx_clineno = __LINE__; goto __pyx_L6_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s___block); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 372; __pyx_clineno = __LINE__; goto __pyx_L6_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 372; __pyx_clineno = __LINE__; goto __pyx_L6_error;} __Pyx_GOTREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_10); __Pyx_GIVEREF(__pyx_t_10); __Pyx_INCREF(((PyObject *)__pyx_n_s__values)); PyTuple_SET_ITEM(__pyx_t_6, 1, ((PyObject *)__pyx_n_s__values)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__values)); __Pyx_INCREF(((PyObject *)__pyx_v_vslider->buf)); PyTuple_SET_ITEM(__pyx_t_6, 2, ((PyObject *)__pyx_v_vslider->buf)); __Pyx_GIVEREF(((PyObject *)__pyx_v_vslider->buf)); __pyx_t_10 = 0; __pyx_t_10 = PyObject_Call(__pyx_t_8, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 372; __pyx_clineno = __LINE__; goto __pyx_L6_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; /* "pandas/src/reduce.pyx":373 * else: * object.__setattr__(cached_typ._data._block, 'values', vslider.buf) * object.__setattr__(cached_typ, '_index', islider.buf) # <<<<<<<<<<<<<< * object.__setattr__(cached_typ, 'name', name) * */ __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_builtin_object, __pyx_n_s____setattr__); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 373; __pyx_clineno = __LINE__; goto __pyx_L6_error;} __Pyx_GOTREF(__pyx_t_10); __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 373; __pyx_clineno = __LINE__; goto __pyx_L6_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(__pyx_v_cached_typ); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_cached_typ); __Pyx_GIVEREF(__pyx_v_cached_typ); __Pyx_INCREF(((PyObject *)__pyx_n_s___index)); PyTuple_SET_ITEM(__pyx_t_6, 1, ((PyObject *)__pyx_n_s___index)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s___index)); __Pyx_INCREF(((PyObject *)__pyx_v_islider->buf)); PyTuple_SET_ITEM(__pyx_t_6, 2, ((PyObject *)__pyx_v_islider->buf)); __Pyx_GIVEREF(((PyObject *)__pyx_v_islider->buf)); __pyx_t_8 = PyObject_Call(__pyx_t_10, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 373; __pyx_clineno = __LINE__; goto __pyx_L6_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; /* "pandas/src/reduce.pyx":374 * object.__setattr__(cached_typ._data._block, 'values', vslider.buf) * object.__setattr__(cached_typ, '_index', islider.buf) * object.__setattr__(cached_typ, 'name', name) # <<<<<<<<<<<<<< * * res = self.f(cached_typ) */ __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_builtin_object, __pyx_n_s____setattr__); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 374; __pyx_clineno = __LINE__; goto __pyx_L6_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 374; __pyx_clineno = __LINE__; goto __pyx_L6_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(__pyx_v_cached_typ); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_cached_typ); __Pyx_GIVEREF(__pyx_v_cached_typ); __Pyx_INCREF(((PyObject *)__pyx_n_s__name)); PyTuple_SET_ITEM(__pyx_t_6, 1, ((PyObject *)__pyx_n_s__name)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__name)); __Pyx_INCREF(__pyx_v_name); PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_v_name); __Pyx_GIVEREF(__pyx_v_name); __pyx_t_10 = PyObject_Call(__pyx_t_8, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 374; __pyx_clineno = __LINE__; goto __pyx_L6_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; } __pyx_L18:; /* "pandas/src/reduce.pyx":376 * object.__setattr__(cached_typ, 'name', name) * * res = self.f(cached_typ) # <<<<<<<<<<<<<< * res = _extract_result(res) * if not initialized: */ __pyx_t_10 = PyTuple_New(1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 376; __pyx_clineno = __LINE__; goto __pyx_L6_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_INCREF(__pyx_v_cached_typ); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_v_cached_typ); __Pyx_GIVEREF(__pyx_v_cached_typ); __pyx_t_6 = PyObject_Call(__pyx_v_self->f, ((PyObject *)__pyx_t_10), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 376; __pyx_clineno = __LINE__; goto __pyx_L6_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(((PyObject *)__pyx_t_10)); __pyx_t_10 = 0; __Pyx_XDECREF_SET(__pyx_v_res, __pyx_t_6); __pyx_t_6 = 0; /* "pandas/src/reduce.pyx":377 * * res = self.f(cached_typ) * res = _extract_result(res) # <<<<<<<<<<<<<< * if not initialized: * result = self._get_result_array(res) */ __pyx_t_6 = __pyx_f_6pandas_3lib__extract_result(__pyx_v_res); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 377; __pyx_clineno = __LINE__; goto __pyx_L6_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF_SET(__pyx_v_res, __pyx_t_6); __pyx_t_6 = 0; /* "pandas/src/reduce.pyx":378 * res = self.f(cached_typ) * res = _extract_result(res) * if not initialized: # <<<<<<<<<<<<<< * result = self._get_result_array(res) * initialized = 1 */ __pyx_t_14 = ((!(__pyx_v_initialized != 0)) != 0); if (__pyx_t_14) { /* "pandas/src/reduce.pyx":379 * res = _extract_result(res) * if not initialized: * result = self._get_result_array(res) # <<<<<<<<<<<<<< * initialized = 1 * */ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s___get_result_array); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 379; __pyx_clineno = __LINE__; goto __pyx_L6_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_10 = PyTuple_New(1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 379; __pyx_clineno = __LINE__; goto __pyx_L6_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_INCREF(__pyx_v_res); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_v_res); __Pyx_GIVEREF(__pyx_v_res); __pyx_t_8 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_t_10), NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 379; __pyx_clineno = __LINE__; goto __pyx_L6_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_10)); __pyx_t_10 = 0; if (!(likely(((__pyx_t_8) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_8, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 379; __pyx_clineno = __LINE__; goto __pyx_L6_error;} __Pyx_XDECREF_SET(__pyx_v_result, ((PyArrayObject *)__pyx_t_8)); __pyx_t_8 = 0; /* "pandas/src/reduce.pyx":380 * if not initialized: * result = self._get_result_array(res) * initialized = 1 # <<<<<<<<<<<<<< * * util.assign_value_1d(result, lab, res) */ __pyx_v_initialized = 1; goto __pyx_L19; } __pyx_L19:; /* "pandas/src/reduce.pyx":382 * initialized = 1 * * util.assign_value_1d(result, lab, res) # <<<<<<<<<<<<<< * counts[lab] = group_size * islider.advance(group_size) */ if (unlikely(!__pyx_v_result)) { __Pyx_RaiseUnboundLocalError("result"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 382; __pyx_clineno = __LINE__; goto __pyx_L6_error;} } __pyx_t_2 = assign_value_1d(__pyx_v_result, __pyx_v_lab, __pyx_v_res); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 382; __pyx_clineno = __LINE__; goto __pyx_L6_error;} /* "pandas/src/reduce.pyx":383 * * util.assign_value_1d(result, lab, res) * counts[lab] = group_size # <<<<<<<<<<<<<< * islider.advance(group_size) * vslider.advance(group_size) */ __pyx_t_18 = __pyx_v_lab; __pyx_t_2 = -1; if (__pyx_t_18 < 0) { __pyx_t_18 += __pyx_pybuffernd_counts.diminfo[0].shape; if (unlikely(__pyx_t_18 < 0)) __pyx_t_2 = 0; } else if (unlikely(__pyx_t_18 >= __pyx_pybuffernd_counts.diminfo[0].shape)) __pyx_t_2 = 0; if (unlikely(__pyx_t_2 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 383; __pyx_clineno = __LINE__; goto __pyx_L6_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_counts.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_counts.diminfo[0].strides) = __pyx_v_group_size; /* "pandas/src/reduce.pyx":384 * util.assign_value_1d(result, lab, res) * counts[lab] = group_size * islider.advance(group_size) # <<<<<<<<<<<<<< * vslider.advance(group_size) * */ __pyx_t_8 = ((struct __pyx_vtabstruct_6pandas_3lib_Slider *)__pyx_v_islider->__pyx_vtab)->advance(__pyx_v_islider, __pyx_v_group_size, 0); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 384; __pyx_clineno = __LINE__; goto __pyx_L6_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; /* "pandas/src/reduce.pyx":385 * counts[lab] = group_size * islider.advance(group_size) * vslider.advance(group_size) # <<<<<<<<<<<<<< * * group_size = 0 */ __pyx_t_8 = ((struct __pyx_vtabstruct_6pandas_3lib_Slider *)__pyx_v_vslider->__pyx_vtab)->advance(__pyx_v_vslider, __pyx_v_group_size, 0); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 385; __pyx_clineno = __LINE__; goto __pyx_L6_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; /* "pandas/src/reduce.pyx":387 * vslider.advance(group_size) * * group_size = 0 # <<<<<<<<<<<<<< * * gin.clear_mapping() */ __pyx_v_group_size = 0; /* "pandas/src/reduce.pyx":389 * group_size = 0 * * gin.clear_mapping() # <<<<<<<<<<<<<< * * except: */ __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_gin, __pyx_n_s__clear_mapping); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 389; __pyx_clineno = __LINE__; goto __pyx_L6_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_10 = PyObject_Call(__pyx_t_8, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 389; __pyx_clineno = __LINE__; goto __pyx_L6_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; goto __pyx_L16; } __pyx_L16:; __pyx_L14_continue:; } } __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; goto __pyx_L13_try_end; __pyx_L6_error:; __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; /* "pandas/src/reduce.pyx":391 * gin.clear_mapping() * * except: # <<<<<<<<<<<<<< * raise * finally: */ /*except:*/ { __Pyx_AddTraceback("pandas.lib.SeriesGrouper.get_result", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_10, &__pyx_t_8, &__pyx_t_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 391; __pyx_clineno = __LINE__; goto __pyx_L8_except_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_GOTREF(__pyx_t_8); __Pyx_GOTREF(__pyx_t_6); /* "pandas/src/reduce.pyx":392 * * except: * raise # <<<<<<<<<<<<<< * finally: * # so we don't free the wrong memory */ __Pyx_GIVEREF(__pyx_t_10); __Pyx_GIVEREF(__pyx_t_8); __Pyx_GIVEREF(__pyx_t_6); __Pyx_ErrRestore(__pyx_t_10, __pyx_t_8, __pyx_t_6); __pyx_t_10 = 0; __pyx_t_8 = 0; __pyx_t_6 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 392; __pyx_clineno = __LINE__; goto __pyx_L8_except_error;} __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; goto __pyx_L7_exception_handled; } __pyx_L8_except_error:; __Pyx_XGIVEREF(__pyx_t_3); __Pyx_XGIVEREF(__pyx_t_4); __Pyx_XGIVEREF(__pyx_t_5); __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5); goto __pyx_L4; __pyx_L7_exception_handled:; __Pyx_XGIVEREF(__pyx_t_3); __Pyx_XGIVEREF(__pyx_t_4); __Pyx_XGIVEREF(__pyx_t_5); __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5); __pyx_L13_try_end:; } } /* "pandas/src/reduce.pyx":395 * finally: * # so we don't free the wrong memory * islider.reset() # <<<<<<<<<<<<<< * vslider.reset() * */ /*finally:*/ { int __pyx_why; PyObject *__pyx_exc_type, *__pyx_exc_value, *__pyx_exc_tb; int __pyx_exc_lineno; __pyx_exc_type = 0; __pyx_exc_value = 0; __pyx_exc_tb = 0; __pyx_exc_lineno = 0; __pyx_why = 0; goto __pyx_L5; __pyx_L4: { __pyx_why = 4; __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_ErrFetch(&__pyx_exc_type, &__pyx_exc_value, &__pyx_exc_tb); __pyx_exc_lineno = __pyx_lineno; goto __pyx_L5; } __pyx_L5:; __pyx_t_6 = ((struct __pyx_vtabstruct_6pandas_3lib_Slider *)__pyx_v_islider->__pyx_vtab)->reset(__pyx_v_islider, 0); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 395; __pyx_clineno = __LINE__; goto __pyx_L22_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; /* "pandas/src/reduce.pyx":396 * # so we don't free the wrong memory * islider.reset() * vslider.reset() # <<<<<<<<<<<<<< * * if result.dtype == np.object_: */ __pyx_t_6 = ((struct __pyx_vtabstruct_6pandas_3lib_Slider *)__pyx_v_vslider->__pyx_vtab)->reset(__pyx_v_vslider, 0); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 396; __pyx_clineno = __LINE__; goto __pyx_L22_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; goto __pyx_L23; __pyx_L22_error:; if (__pyx_why == 4) { Py_XDECREF(__pyx_exc_type); Py_XDECREF(__pyx_exc_value); Py_XDECREF(__pyx_exc_tb); } goto __pyx_L1_error; __pyx_L23:; switch (__pyx_why) { case 4: { __Pyx_ErrRestore(__pyx_exc_type, __pyx_exc_value, __pyx_exc_tb); __pyx_lineno = __pyx_exc_lineno; __pyx_exc_type = 0; __pyx_exc_value = 0; __pyx_exc_tb = 0; goto __pyx_L1_error; } } } /* "pandas/src/reduce.pyx":398 * vslider.reset() * * if result.dtype == np.object_: # <<<<<<<<<<<<<< * result = maybe_convert_objects(result) * */ if (unlikely(!__pyx_v_result)) { __Pyx_RaiseUnboundLocalError("result"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 398; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_result), __pyx_n_s__dtype); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 398; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 398; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s__object_); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 398; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_8 = PyObject_RichCompare(__pyx_t_6, __pyx_t_10, Py_EQ); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 398; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_t_14 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_14 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 398; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (__pyx_t_14) { /* "pandas/src/reduce.pyx":399 * * if result.dtype == np.object_: * result = maybe_convert_objects(result) # <<<<<<<<<<<<<< * * return result, counts */ __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_12); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 399; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_10 = PyTuple_New(1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 399; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_INCREF(((PyObject *)__pyx_v_result)); PyTuple_SET_ITEM(__pyx_t_10, 0, ((PyObject *)__pyx_v_result)); __Pyx_GIVEREF(((PyObject *)__pyx_v_result)); __pyx_t_6 = PyObject_Call(__pyx_t_8, ((PyObject *)__pyx_t_10), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 399; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_10)); __pyx_t_10 = 0; if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 399; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF_SET(__pyx_v_result, ((PyArrayObject *)__pyx_t_6)); __pyx_t_6 = 0; goto __pyx_L24; } __pyx_L24:; /* "pandas/src/reduce.pyx":401 * result = maybe_convert_objects(result) * * return result, counts # <<<<<<<<<<<<<< * * def _get_result_array(self, object res): */ __Pyx_XDECREF(__pyx_r); __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 401; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(((PyObject *)__pyx_v_result)); PyTuple_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_v_result)); __Pyx_GIVEREF(((PyObject *)__pyx_v_result)); __Pyx_INCREF(((PyObject *)__pyx_v_counts)); PyTuple_SET_ITEM(__pyx_t_6, 1, ((PyObject *)__pyx_v_counts)); __Pyx_GIVEREF(((PyObject *)__pyx_v_counts)); __pyx_r = ((PyObject *)__pyx_t_6); __pyx_t_6 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); __Pyx_XDECREF(__pyx_t_10); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_counts.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_labels.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.lib.SeriesGrouper.get_result", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_counts.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_labels.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_result); __Pyx_XDECREF((PyObject *)__pyx_v_labels); __Pyx_XDECREF((PyObject *)__pyx_v_counts); __Pyx_XDECREF(__pyx_v_res); __Pyx_XDECREF((PyObject *)__pyx_v_vslider); __Pyx_XDECREF((PyObject *)__pyx_v_islider); __Pyx_XDECREF(__pyx_v_gin); __Pyx_XDECREF(__pyx_v_name); __Pyx_XDECREF(__pyx_v_cached_typ); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_3lib_13SeriesGrouper_7_get_result_array(PyObject *__pyx_v_self, PyObject *__pyx_v_res); /*proto*/ static PyObject *__pyx_pw_6pandas_3lib_13SeriesGrouper_7_get_result_array(PyObject *__pyx_v_self, PyObject *__pyx_v_res) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_get_result_array (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_3lib_13SeriesGrouper_6_get_result_array(((struct __pyx_obj_6pandas_3lib_SeriesGrouper *)__pyx_v_self), ((PyObject *)__pyx_v_res)); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/reduce.pyx":403 * return result, counts * * def _get_result_array(self, object res): # <<<<<<<<<<<<<< * try: * assert(not isinstance(res, np.ndarray)) */ static PyObject *__pyx_pf_6pandas_3lib_13SeriesGrouper_6_get_result_array(struct __pyx_obj_6pandas_3lib_SeriesGrouper *__pyx_v_self, PyObject *__pyx_v_res) { PyObject *__pyx_v_result = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_t_4; Py_ssize_t __pyx_t_5; PyObject *__pyx_t_6 = NULL; Py_ssize_t __pyx_t_7; int __pyx_t_8; int __pyx_t_9; PyObject *__pyx_t_10 = NULL; PyObject *__pyx_t_11 = NULL; PyObject *__pyx_t_12 = NULL; int __pyx_t_13; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_get_result_array", 0); /* "pandas/src/reduce.pyx":404 * * def _get_result_array(self, object res): * try: # <<<<<<<<<<<<<< * assert(not isinstance(res, np.ndarray)) * assert(not (isinstance(res, list) and len(res) == len(self.dummy_arr))) */ { __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:*/ { /* "pandas/src/reduce.pyx":405 * def _get_result_array(self, object res): * try: * assert(not isinstance(res, np.ndarray)) # <<<<<<<<<<<<<< * assert(not (isinstance(res, list) and len(res) == len(self.dummy_arr))) * */ #ifndef CYTHON_WITHOUT_ASSERTIONS __pyx_t_4 = __Pyx_TypeCheck(__pyx_v_res, ((PyObject*)__pyx_ptype_5numpy_ndarray)); if (unlikely(!((!(__pyx_t_4 != 0)) != 0))) { PyErr_SetNone(PyExc_AssertionError); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 405; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } #endif /* "pandas/src/reduce.pyx":406 * try: * assert(not isinstance(res, np.ndarray)) * assert(not (isinstance(res, list) and len(res) == len(self.dummy_arr))) # <<<<<<<<<<<<<< * * result = np.empty(self.ngroups, dtype='O') */ #ifndef CYTHON_WITHOUT_ASSERTIONS __pyx_t_4 = PyList_Check(__pyx_v_res); if ((__pyx_t_4 != 0)) { __pyx_t_5 = PyObject_Length(__pyx_v_res); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 406; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_t_6 = __pyx_v_self->dummy_arr; __Pyx_INCREF(__pyx_t_6); __pyx_t_7 = PyObject_Length(__pyx_t_6); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 406; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_8 = ((__pyx_t_5 == __pyx_t_7) != 0); __pyx_t_9 = __pyx_t_8; } else { __pyx_t_9 = (__pyx_t_4 != 0); } if (unlikely(!((!__pyx_t_9) != 0))) { PyErr_SetNone(PyExc_AssertionError); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 406; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } #endif /* "pandas/src/reduce.pyx":408 * assert(not (isinstance(res, list) and len(res) == len(self.dummy_arr))) * * result = np.empty(self.ngroups, dtype='O') # <<<<<<<<<<<<<< * except Exception: * raise ValueError('function does not reduce') */ __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 408; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s__empty); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 408; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyInt_FromSsize_t(__pyx_v_self->ngroups); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 408; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_11 = PyTuple_New(1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 408; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyDict_New(); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 408; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_6)); if (PyDict_SetItem(__pyx_t_6, ((PyObject *)__pyx_n_s__dtype), ((PyObject *)__pyx_n_s__O)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 408; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_t_12 = PyObject_Call(__pyx_t_10, ((PyObject *)__pyx_t_11), ((PyObject *)__pyx_t_6)); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 408; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_11)); __pyx_t_11 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0; __pyx_v_result = __pyx_t_12; __pyx_t_12 = 0; } __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L10_try_end; __pyx_L3_error:; __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; /* "pandas/src/reduce.pyx":409 * * result = np.empty(self.ngroups, dtype='O') * except Exception: # <<<<<<<<<<<<<< * raise ValueError('function does not reduce') * return result */ __pyx_t_13 = PyErr_ExceptionMatches(__pyx_builtin_Exception); if (__pyx_t_13) { __Pyx_AddTraceback("pandas.lib.SeriesGrouper._get_result_array", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_12, &__pyx_t_6, &__pyx_t_11) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 409; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} __Pyx_GOTREF(__pyx_t_12); __Pyx_GOTREF(__pyx_t_6); __Pyx_GOTREF(__pyx_t_11); /* "pandas/src/reduce.pyx":410 * result = np.empty(self.ngroups, dtype='O') * except Exception: * raise ValueError('function does not reduce') # <<<<<<<<<<<<<< * return result * */ __pyx_t_10 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_36), NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 410; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_Raise(__pyx_t_10, 0, 0, 0); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 410; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; goto __pyx_L4_exception_handled; } __pyx_L5_except_error:; __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); goto __pyx_L1_error; __pyx_L4_exception_handled:; __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); __pyx_L10_try_end:; } /* "pandas/src/reduce.pyx":411 * except Exception: * raise ValueError('function does not reduce') * return result # <<<<<<<<<<<<<< * * cdef inline _extract_result(object res): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_result); __pyx_r = __pyx_v_result; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_10); __Pyx_XDECREF(__pyx_t_11); __Pyx_XDECREF(__pyx_t_12); __Pyx_AddTraceback("pandas.lib.SeriesGrouper._get_result_array", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_result); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_3lib_13SeriesGrouper_3arr_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6pandas_3lib_13SeriesGrouper_3arr_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_3lib_13SeriesGrouper_3arr___get__(((struct __pyx_obj_6pandas_3lib_SeriesGrouper *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/reduce.pyx":295 * * cdef public: * object arr, index, dummy_arr, dummy_index, f, labels, values, typ, name # <<<<<<<<<<<<<< * * def __init__(self, object series, object f, object labels, */ static PyObject *__pyx_pf_6pandas_3lib_13SeriesGrouper_3arr___get__(struct __pyx_obj_6pandas_3lib_SeriesGrouper *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_self->arr); __pyx_r = __pyx_v_self->arr; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pandas_3lib_13SeriesGrouper_3arr_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ static int __pyx_pw_6pandas_3lib_13SeriesGrouper_3arr_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_3lib_13SeriesGrouper_3arr_2__set__(((struct __pyx_obj_6pandas_3lib_SeriesGrouper *)__pyx_v_self), ((PyObject *)__pyx_v_value)); __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pandas_3lib_13SeriesGrouper_3arr_2__set__(struct __pyx_obj_6pandas_3lib_SeriesGrouper *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__", 0); __Pyx_INCREF(__pyx_v_value); __Pyx_GIVEREF(__pyx_v_value); __Pyx_GOTREF(__pyx_v_self->arr); __Pyx_DECREF(__pyx_v_self->arr); __pyx_v_self->arr = __pyx_v_value; __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pandas_3lib_13SeriesGrouper_3arr_5__del__(PyObject *__pyx_v_self); /*proto*/ static int __pyx_pw_6pandas_3lib_13SeriesGrouper_3arr_5__del__(PyObject *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_3lib_13SeriesGrouper_3arr_4__del__(((struct __pyx_obj_6pandas_3lib_SeriesGrouper *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pandas_3lib_13SeriesGrouper_3arr_4__del__(struct __pyx_obj_6pandas_3lib_SeriesGrouper *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__", 0); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->arr); __Pyx_DECREF(__pyx_v_self->arr); __pyx_v_self->arr = Py_None; __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_3lib_13SeriesGrouper_5index_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6pandas_3lib_13SeriesGrouper_5index_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_3lib_13SeriesGrouper_5index___get__(((struct __pyx_obj_6pandas_3lib_SeriesGrouper *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_3lib_13SeriesGrouper_5index___get__(struct __pyx_obj_6pandas_3lib_SeriesGrouper *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_self->index); __pyx_r = __pyx_v_self->index; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pandas_3lib_13SeriesGrouper_5index_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ static int __pyx_pw_6pandas_3lib_13SeriesGrouper_5index_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_3lib_13SeriesGrouper_5index_2__set__(((struct __pyx_obj_6pandas_3lib_SeriesGrouper *)__pyx_v_self), ((PyObject *)__pyx_v_value)); __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pandas_3lib_13SeriesGrouper_5index_2__set__(struct __pyx_obj_6pandas_3lib_SeriesGrouper *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__", 0); __Pyx_INCREF(__pyx_v_value); __Pyx_GIVEREF(__pyx_v_value); __Pyx_GOTREF(__pyx_v_self->index); __Pyx_DECREF(__pyx_v_self->index); __pyx_v_self->index = __pyx_v_value; __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pandas_3lib_13SeriesGrouper_5index_5__del__(PyObject *__pyx_v_self); /*proto*/ static int __pyx_pw_6pandas_3lib_13SeriesGrouper_5index_5__del__(PyObject *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_3lib_13SeriesGrouper_5index_4__del__(((struct __pyx_obj_6pandas_3lib_SeriesGrouper *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pandas_3lib_13SeriesGrouper_5index_4__del__(struct __pyx_obj_6pandas_3lib_SeriesGrouper *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__", 0); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->index); __Pyx_DECREF(__pyx_v_self->index); __pyx_v_self->index = Py_None; __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_3lib_13SeriesGrouper_9dummy_arr_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6pandas_3lib_13SeriesGrouper_9dummy_arr_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_3lib_13SeriesGrouper_9dummy_arr___get__(((struct __pyx_obj_6pandas_3lib_SeriesGrouper *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_3lib_13SeriesGrouper_9dummy_arr___get__(struct __pyx_obj_6pandas_3lib_SeriesGrouper *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_self->dummy_arr); __pyx_r = __pyx_v_self->dummy_arr; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pandas_3lib_13SeriesGrouper_9dummy_arr_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ static int __pyx_pw_6pandas_3lib_13SeriesGrouper_9dummy_arr_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_3lib_13SeriesGrouper_9dummy_arr_2__set__(((struct __pyx_obj_6pandas_3lib_SeriesGrouper *)__pyx_v_self), ((PyObject *)__pyx_v_value)); __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pandas_3lib_13SeriesGrouper_9dummy_arr_2__set__(struct __pyx_obj_6pandas_3lib_SeriesGrouper *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__", 0); __Pyx_INCREF(__pyx_v_value); __Pyx_GIVEREF(__pyx_v_value); __Pyx_GOTREF(__pyx_v_self->dummy_arr); __Pyx_DECREF(__pyx_v_self->dummy_arr); __pyx_v_self->dummy_arr = __pyx_v_value; __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pandas_3lib_13SeriesGrouper_9dummy_arr_5__del__(PyObject *__pyx_v_self); /*proto*/ static int __pyx_pw_6pandas_3lib_13SeriesGrouper_9dummy_arr_5__del__(PyObject *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_3lib_13SeriesGrouper_9dummy_arr_4__del__(((struct __pyx_obj_6pandas_3lib_SeriesGrouper *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pandas_3lib_13SeriesGrouper_9dummy_arr_4__del__(struct __pyx_obj_6pandas_3lib_SeriesGrouper *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__", 0); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->dummy_arr); __Pyx_DECREF(__pyx_v_self->dummy_arr); __pyx_v_self->dummy_arr = Py_None; __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_3lib_13SeriesGrouper_11dummy_index_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6pandas_3lib_13SeriesGrouper_11dummy_index_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_3lib_13SeriesGrouper_11dummy_index___get__(((struct __pyx_obj_6pandas_3lib_SeriesGrouper *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_3lib_13SeriesGrouper_11dummy_index___get__(struct __pyx_obj_6pandas_3lib_SeriesGrouper *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_self->dummy_index); __pyx_r = __pyx_v_self->dummy_index; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pandas_3lib_13SeriesGrouper_11dummy_index_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ static int __pyx_pw_6pandas_3lib_13SeriesGrouper_11dummy_index_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_3lib_13SeriesGrouper_11dummy_index_2__set__(((struct __pyx_obj_6pandas_3lib_SeriesGrouper *)__pyx_v_self), ((PyObject *)__pyx_v_value)); __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pandas_3lib_13SeriesGrouper_11dummy_index_2__set__(struct __pyx_obj_6pandas_3lib_SeriesGrouper *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__", 0); __Pyx_INCREF(__pyx_v_value); __Pyx_GIVEREF(__pyx_v_value); __Pyx_GOTREF(__pyx_v_self->dummy_index); __Pyx_DECREF(__pyx_v_self->dummy_index); __pyx_v_self->dummy_index = __pyx_v_value; __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pandas_3lib_13SeriesGrouper_11dummy_index_5__del__(PyObject *__pyx_v_self); /*proto*/ static int __pyx_pw_6pandas_3lib_13SeriesGrouper_11dummy_index_5__del__(PyObject *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_3lib_13SeriesGrouper_11dummy_index_4__del__(((struct __pyx_obj_6pandas_3lib_SeriesGrouper *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pandas_3lib_13SeriesGrouper_11dummy_index_4__del__(struct __pyx_obj_6pandas_3lib_SeriesGrouper *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__", 0); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->dummy_index); __Pyx_DECREF(__pyx_v_self->dummy_index); __pyx_v_self->dummy_index = Py_None; __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_3lib_13SeriesGrouper_1f_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6pandas_3lib_13SeriesGrouper_1f_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_3lib_13SeriesGrouper_1f___get__(((struct __pyx_obj_6pandas_3lib_SeriesGrouper *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_3lib_13SeriesGrouper_1f___get__(struct __pyx_obj_6pandas_3lib_SeriesGrouper *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_self->f); __pyx_r = __pyx_v_self->f; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pandas_3lib_13SeriesGrouper_1f_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ static int __pyx_pw_6pandas_3lib_13SeriesGrouper_1f_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_3lib_13SeriesGrouper_1f_2__set__(((struct __pyx_obj_6pandas_3lib_SeriesGrouper *)__pyx_v_self), ((PyObject *)__pyx_v_value)); __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pandas_3lib_13SeriesGrouper_1f_2__set__(struct __pyx_obj_6pandas_3lib_SeriesGrouper *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__", 0); __Pyx_INCREF(__pyx_v_value); __Pyx_GIVEREF(__pyx_v_value); __Pyx_GOTREF(__pyx_v_self->f); __Pyx_DECREF(__pyx_v_self->f); __pyx_v_self->f = __pyx_v_value; __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pandas_3lib_13SeriesGrouper_1f_5__del__(PyObject *__pyx_v_self); /*proto*/ static int __pyx_pw_6pandas_3lib_13SeriesGrouper_1f_5__del__(PyObject *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_3lib_13SeriesGrouper_1f_4__del__(((struct __pyx_obj_6pandas_3lib_SeriesGrouper *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pandas_3lib_13SeriesGrouper_1f_4__del__(struct __pyx_obj_6pandas_3lib_SeriesGrouper *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__", 0); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->f); __Pyx_DECREF(__pyx_v_self->f); __pyx_v_self->f = Py_None; __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_3lib_13SeriesGrouper_6labels_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6pandas_3lib_13SeriesGrouper_6labels_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_3lib_13SeriesGrouper_6labels___get__(((struct __pyx_obj_6pandas_3lib_SeriesGrouper *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_3lib_13SeriesGrouper_6labels___get__(struct __pyx_obj_6pandas_3lib_SeriesGrouper *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_self->labels); __pyx_r = __pyx_v_self->labels; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pandas_3lib_13SeriesGrouper_6labels_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ static int __pyx_pw_6pandas_3lib_13SeriesGrouper_6labels_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_3lib_13SeriesGrouper_6labels_2__set__(((struct __pyx_obj_6pandas_3lib_SeriesGrouper *)__pyx_v_self), ((PyObject *)__pyx_v_value)); __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pandas_3lib_13SeriesGrouper_6labels_2__set__(struct __pyx_obj_6pandas_3lib_SeriesGrouper *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__", 0); __Pyx_INCREF(__pyx_v_value); __Pyx_GIVEREF(__pyx_v_value); __Pyx_GOTREF(__pyx_v_self->labels); __Pyx_DECREF(__pyx_v_self->labels); __pyx_v_self->labels = __pyx_v_value; __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pandas_3lib_13SeriesGrouper_6labels_5__del__(PyObject *__pyx_v_self); /*proto*/ static int __pyx_pw_6pandas_3lib_13SeriesGrouper_6labels_5__del__(PyObject *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_3lib_13SeriesGrouper_6labels_4__del__(((struct __pyx_obj_6pandas_3lib_SeriesGrouper *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pandas_3lib_13SeriesGrouper_6labels_4__del__(struct __pyx_obj_6pandas_3lib_SeriesGrouper *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__", 0); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->labels); __Pyx_DECREF(__pyx_v_self->labels); __pyx_v_self->labels = Py_None; __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_3lib_13SeriesGrouper_6values_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6pandas_3lib_13SeriesGrouper_6values_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_3lib_13SeriesGrouper_6values___get__(((struct __pyx_obj_6pandas_3lib_SeriesGrouper *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_3lib_13SeriesGrouper_6values___get__(struct __pyx_obj_6pandas_3lib_SeriesGrouper *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_self->values); __pyx_r = __pyx_v_self->values; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pandas_3lib_13SeriesGrouper_6values_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ static int __pyx_pw_6pandas_3lib_13SeriesGrouper_6values_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_3lib_13SeriesGrouper_6values_2__set__(((struct __pyx_obj_6pandas_3lib_SeriesGrouper *)__pyx_v_self), ((PyObject *)__pyx_v_value)); __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pandas_3lib_13SeriesGrouper_6values_2__set__(struct __pyx_obj_6pandas_3lib_SeriesGrouper *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__", 0); __Pyx_INCREF(__pyx_v_value); __Pyx_GIVEREF(__pyx_v_value); __Pyx_GOTREF(__pyx_v_self->values); __Pyx_DECREF(__pyx_v_self->values); __pyx_v_self->values = __pyx_v_value; __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pandas_3lib_13SeriesGrouper_6values_5__del__(PyObject *__pyx_v_self); /*proto*/ static int __pyx_pw_6pandas_3lib_13SeriesGrouper_6values_5__del__(PyObject *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_3lib_13SeriesGrouper_6values_4__del__(((struct __pyx_obj_6pandas_3lib_SeriesGrouper *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pandas_3lib_13SeriesGrouper_6values_4__del__(struct __pyx_obj_6pandas_3lib_SeriesGrouper *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__", 0); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->values); __Pyx_DECREF(__pyx_v_self->values); __pyx_v_self->values = Py_None; __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_3lib_13SeriesGrouper_3typ_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6pandas_3lib_13SeriesGrouper_3typ_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_3lib_13SeriesGrouper_3typ___get__(((struct __pyx_obj_6pandas_3lib_SeriesGrouper *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_3lib_13SeriesGrouper_3typ___get__(struct __pyx_obj_6pandas_3lib_SeriesGrouper *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_self->typ); __pyx_r = __pyx_v_self->typ; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pandas_3lib_13SeriesGrouper_3typ_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ static int __pyx_pw_6pandas_3lib_13SeriesGrouper_3typ_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_3lib_13SeriesGrouper_3typ_2__set__(((struct __pyx_obj_6pandas_3lib_SeriesGrouper *)__pyx_v_self), ((PyObject *)__pyx_v_value)); __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pandas_3lib_13SeriesGrouper_3typ_2__set__(struct __pyx_obj_6pandas_3lib_SeriesGrouper *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__", 0); __Pyx_INCREF(__pyx_v_value); __Pyx_GIVEREF(__pyx_v_value); __Pyx_GOTREF(__pyx_v_self->typ); __Pyx_DECREF(__pyx_v_self->typ); __pyx_v_self->typ = __pyx_v_value; __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pandas_3lib_13SeriesGrouper_3typ_5__del__(PyObject *__pyx_v_self); /*proto*/ static int __pyx_pw_6pandas_3lib_13SeriesGrouper_3typ_5__del__(PyObject *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_3lib_13SeriesGrouper_3typ_4__del__(((struct __pyx_obj_6pandas_3lib_SeriesGrouper *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pandas_3lib_13SeriesGrouper_3typ_4__del__(struct __pyx_obj_6pandas_3lib_SeriesGrouper *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__", 0); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->typ); __Pyx_DECREF(__pyx_v_self->typ); __pyx_v_self->typ = Py_None; __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_3lib_13SeriesGrouper_4name_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6pandas_3lib_13SeriesGrouper_4name_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_3lib_13SeriesGrouper_4name___get__(((struct __pyx_obj_6pandas_3lib_SeriesGrouper *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_3lib_13SeriesGrouper_4name___get__(struct __pyx_obj_6pandas_3lib_SeriesGrouper *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_self->name); __pyx_r = __pyx_v_self->name; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pandas_3lib_13SeriesGrouper_4name_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ static int __pyx_pw_6pandas_3lib_13SeriesGrouper_4name_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_3lib_13SeriesGrouper_4name_2__set__(((struct __pyx_obj_6pandas_3lib_SeriesGrouper *)__pyx_v_self), ((PyObject *)__pyx_v_value)); __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pandas_3lib_13SeriesGrouper_4name_2__set__(struct __pyx_obj_6pandas_3lib_SeriesGrouper *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__", 0); __Pyx_INCREF(__pyx_v_value); __Pyx_GIVEREF(__pyx_v_value); __Pyx_GOTREF(__pyx_v_self->name); __Pyx_DECREF(__pyx_v_self->name); __pyx_v_self->name = __pyx_v_value; __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pandas_3lib_13SeriesGrouper_4name_5__del__(PyObject *__pyx_v_self); /*proto*/ static int __pyx_pw_6pandas_3lib_13SeriesGrouper_4name_5__del__(PyObject *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_3lib_13SeriesGrouper_4name_4__del__(((struct __pyx_obj_6pandas_3lib_SeriesGrouper *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pandas_3lib_13SeriesGrouper_4name_4__del__(struct __pyx_obj_6pandas_3lib_SeriesGrouper *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__", 0); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->name); __Pyx_DECREF(__pyx_v_self->name); __pyx_v_self->name = Py_None; __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/reduce.pyx":413 * return result * * cdef inline _extract_result(object res): # <<<<<<<<<<<<<< * ''' extract the result object, it might be a 0-dim ndarray * or a len-1 0-dim, or a scalar ''' */ static CYTHON_INLINE PyObject *__pyx_f_6pandas_3lib__extract_result(PyObject *__pyx_v_res) { 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; Py_ssize_t __pyx_t_6; int __pyx_t_7; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_extract_result", 0); __Pyx_INCREF(__pyx_v_res); /* "pandas/src/reduce.pyx":416 * ''' extract the result object, it might be a 0-dim ndarray * or a len-1 0-dim, or a scalar ''' * if hasattr(res,'values'): # <<<<<<<<<<<<<< * res = res.values * if not np.isscalar(res): */ __pyx_t_1 = PyObject_HasAttr(__pyx_v_res, ((PyObject *)__pyx_n_s__values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 416; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { /* "pandas/src/reduce.pyx":417 * or a len-1 0-dim, or a scalar ''' * if hasattr(res,'values'): * res = res.values # <<<<<<<<<<<<<< * if not np.isscalar(res): * if isinstance(res, np.ndarray): */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_res, __pyx_n_s__values); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 417; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF_SET(__pyx_v_res, __pyx_t_3); __pyx_t_3 = 0; goto __pyx_L3; } __pyx_L3:; /* "pandas/src/reduce.pyx":418 * if hasattr(res,'values'): * res = res.values * if not np.isscalar(res): # <<<<<<<<<<<<<< * if isinstance(res, np.ndarray): * if res.ndim == 0: */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 418; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s__isscalar); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 418; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 418; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_v_res); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_res); __Pyx_GIVEREF(__pyx_v_res); __pyx_t_5 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 418; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 418; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_1 = ((!__pyx_t_2) != 0); if (__pyx_t_1) { /* "pandas/src/reduce.pyx":419 * res = res.values * if not np.isscalar(res): * if isinstance(res, np.ndarray): # <<<<<<<<<<<<<< * if res.ndim == 0: * res = res.item() */ __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_res, ((PyObject*)__pyx_ptype_5numpy_ndarray)); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { /* "pandas/src/reduce.pyx":420 * if not np.isscalar(res): * if isinstance(res, np.ndarray): * if res.ndim == 0: # <<<<<<<<<<<<<< * res = res.item() * elif res.ndim == 1 and len(res) == 1: */ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_res, __pyx_n_s__ndim); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 420; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = PyObject_RichCompare(__pyx_t_5, __pyx_int_0, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 420; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 420; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_2) { /* "pandas/src/reduce.pyx":421 * if isinstance(res, np.ndarray): * if res.ndim == 0: * res = res.item() # <<<<<<<<<<<<<< * elif res.ndim == 1 and len(res) == 1: * res = res[0] */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_res, __pyx_n_s__item); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 421; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 421; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF_SET(__pyx_v_res, __pyx_t_5); __pyx_t_5 = 0; goto __pyx_L6; } /* "pandas/src/reduce.pyx":422 * if res.ndim == 0: * res = res.item() * elif res.ndim == 1 and len(res) == 1: # <<<<<<<<<<<<<< * res = res[0] * return res */ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_res, __pyx_n_s__ndim); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 422; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = PyObject_RichCompare(__pyx_t_5, __pyx_int_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 422; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 422; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_2) { __pyx_t_6 = PyObject_Length(__pyx_v_res); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 422; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_1 = (__pyx_t_6 == 1); __pyx_t_7 = __pyx_t_1; } else { __pyx_t_7 = __pyx_t_2; } if (__pyx_t_7) { /* "pandas/src/reduce.pyx":423 * res = res.item() * elif res.ndim == 1 and len(res) == 1: * res = res[0] # <<<<<<<<<<<<<< * return res * */ __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_res, 0, sizeof(long), PyInt_FromLong, 0, 0, 1); if (!__pyx_t_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 423; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF_SET(__pyx_v_res, __pyx_t_3); __pyx_t_3 = 0; goto __pyx_L6; } __pyx_L6:; goto __pyx_L5; } __pyx_L5:; goto __pyx_L4; } __pyx_L4:; /* "pandas/src/reduce.pyx":424 * elif res.ndim == 1 and len(res) == 1: * res = res[0] * return res # <<<<<<<<<<<<<< * * cdef class Slider: */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_res); __pyx_r = __pyx_v_res; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("pandas.lib._extract_result", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_res); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pandas_3lib_6Slider_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_pw_6pandas_3lib_6Slider_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_values = 0; PyObject *__pyx_v_buf = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__values,&__pyx_n_s__buf,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__values)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__buf)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 435; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 435; __pyx_clineno = __LINE__; goto __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 = values[0]; __pyx_v_buf = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 435; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.lib.Slider.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return -1; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pandas_3lib_6Slider___init__(((struct __pyx_obj_6pandas_3lib_Slider *)__pyx_v_self), __pyx_v_values, __pyx_v_buf); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/reduce.pyx":435 * char *orig_data * * def __init__(self, object values, object buf): # <<<<<<<<<<<<<< * assert(values.ndim == 1) * if not values.flags.contiguous: */ static int __pyx_pf_6pandas_3lib_6Slider___init__(struct __pyx_obj_6pandas_3lib_Slider *__pyx_v_self, PyObject *__pyx_v_values, PyObject *__pyx_v_buf) { int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_t_3; int __pyx_t_4; PyObject *__pyx_t_5 = NULL; Py_ssize_t __pyx_t_6; char *__pyx_t_7; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__init__", 0); __Pyx_INCREF(__pyx_v_values); /* "pandas/src/reduce.pyx":436 * * def __init__(self, object values, object buf): * assert(values.ndim == 1) # <<<<<<<<<<<<<< * if not values.flags.contiguous: * values = values.copy() */ #ifndef CYTHON_WITHOUT_ASSERTIONS __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_values, __pyx_n_s__ndim); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 436; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyObject_RichCompare(__pyx_t_1, __pyx_int_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 436; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 436; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_3)) { PyErr_SetNone(PyExc_AssertionError); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 436; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #endif /* "pandas/src/reduce.pyx":437 * def __init__(self, object values, object buf): * assert(values.ndim == 1) * if not values.flags.contiguous: # <<<<<<<<<<<<<< * values = values.copy() * */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_values, __pyx_n_s__flags); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 437; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__contiguous); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 437; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 437; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_4 = ((!__pyx_t_3) != 0); if (__pyx_t_4) { /* "pandas/src/reduce.pyx":438 * assert(values.ndim == 1) * if not values.flags.contiguous: * values = values.copy() # <<<<<<<<<<<<<< * * assert(values.dtype == buf.dtype) */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_values, __pyx_n_s__copy); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 438; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 438; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF_SET(__pyx_v_values, __pyx_t_2); __pyx_t_2 = 0; goto __pyx_L3; } __pyx_L3:; /* "pandas/src/reduce.pyx":440 * values = values.copy() * * assert(values.dtype == buf.dtype) # <<<<<<<<<<<<<< * self.values = values * self.buf = buf */ #ifndef CYTHON_WITHOUT_ASSERTIONS __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_values, __pyx_n_s__dtype); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 440; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_buf, __pyx_n_s__dtype); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 440; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_5 = PyObject_RichCompare(__pyx_t_2, __pyx_t_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 440; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 440; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_4)) { PyErr_SetNone(PyExc_AssertionError); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 440; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #endif /* "pandas/src/reduce.pyx":441 * * assert(values.dtype == buf.dtype) * self.values = values # <<<<<<<<<<<<<< * self.buf = buf * self.stride = values.strides[0] */ if (!(likely(((__pyx_v_values) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_values, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 441; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_INCREF(__pyx_v_values); __Pyx_GIVEREF(__pyx_v_values); __Pyx_GOTREF(__pyx_v_self->values); __Pyx_DECREF(((PyObject *)__pyx_v_self->values)); __pyx_v_self->values = ((PyArrayObject *)__pyx_v_values); /* "pandas/src/reduce.pyx":442 * assert(values.dtype == buf.dtype) * self.values = values * self.buf = buf # <<<<<<<<<<<<<< * self.stride = values.strides[0] * */ if (!(likely(((__pyx_v_buf) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_buf, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 442; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_INCREF(__pyx_v_buf); __Pyx_GIVEREF(__pyx_v_buf); __Pyx_GOTREF(__pyx_v_self->buf); __Pyx_DECREF(((PyObject *)__pyx_v_self->buf)); __pyx_v_self->buf = ((PyArrayObject *)__pyx_v_buf); /* "pandas/src/reduce.pyx":443 * self.values = values * self.buf = buf * self.stride = values.strides[0] # <<<<<<<<<<<<<< * * self.orig_data = self.buf.data */ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_values, __pyx_n_s__strides); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 443; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_5, 0, sizeof(long), PyInt_FromLong, 0, 0, 1); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 443; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_6 = __Pyx_PyIndex_AsSsize_t(__pyx_t_1); if (unlikely((__pyx_t_6 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 443; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_self->stride = __pyx_t_6; /* "pandas/src/reduce.pyx":445 * self.stride = values.strides[0] * * self.orig_data = self.buf.data # <<<<<<<<<<<<<< * self.orig_len = self.buf.shape[0] * self.orig_stride = self.buf.strides[0] */ __pyx_t_7 = __pyx_v_self->buf->data; __pyx_v_self->orig_data = __pyx_t_7; /* "pandas/src/reduce.pyx":446 * * self.orig_data = self.buf.data * self.orig_len = self.buf.shape[0] # <<<<<<<<<<<<<< * self.orig_stride = self.buf.strides[0] * */ __pyx_v_self->orig_len = (__pyx_v_self->buf->dimensions[0]); /* "pandas/src/reduce.pyx":447 * self.orig_data = self.buf.data * self.orig_len = self.buf.shape[0] * self.orig_stride = self.buf.strides[0] # <<<<<<<<<<<<<< * * self.buf.data = self.values.data */ __pyx_v_self->orig_stride = (__pyx_v_self->buf->strides[0]); /* "pandas/src/reduce.pyx":449 * self.orig_stride = self.buf.strides[0] * * self.buf.data = self.values.data # <<<<<<<<<<<<<< * self.buf.strides[0] = self.stride * */ __pyx_t_7 = __pyx_v_self->values->data; __pyx_v_self->buf->data = __pyx_t_7; /* "pandas/src/reduce.pyx":450 * * self.buf.data = self.values.data * self.buf.strides[0] = self.stride # <<<<<<<<<<<<<< * * cpdef advance(self, Py_ssize_t k): */ __pyx_t_6 = __pyx_v_self->stride; (__pyx_v_self->buf->strides[0]) = __pyx_t_6; __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("pandas.lib.Slider.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_XDECREF(__pyx_v_values); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/reduce.pyx":452 * self.buf.strides[0] = self.stride * * cpdef advance(self, Py_ssize_t k): # <<<<<<<<<<<<<< * self.buf.data = self.buf.data + self.stride * k * */ static PyObject *__pyx_pw_6pandas_3lib_6Slider_3advance(PyObject *__pyx_v_self, PyObject *__pyx_arg_k); /*proto*/ static PyObject *__pyx_f_6pandas_3lib_6Slider_advance(struct __pyx_obj_6pandas_3lib_Slider *__pyx_v_self, Py_ssize_t __pyx_v_k, int __pyx_skip_dispatch) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("advance", 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__advance); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 452; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_6pandas_3lib_6Slider_3advance)) { __Pyx_XDECREF(__pyx_r); __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_k); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 452; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 452; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 452; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(((PyObject *)__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/src/reduce.pyx":453 * * cpdef advance(self, Py_ssize_t k): * self.buf.data = self.buf.data + self.stride * k # <<<<<<<<<<<<<< * * cdef move(self, int start, int end): */ __pyx_v_self->buf->data = (((char *)__pyx_v_self->buf->data) + (__pyx_v_self->stride * __pyx_v_k)); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("pandas.lib.Slider.advance", __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_3lib_6Slider_3advance(PyObject *__pyx_v_self, PyObject *__pyx_arg_k); /*proto*/ static PyObject *__pyx_pw_6pandas_3lib_6Slider_3advance(PyObject *__pyx_v_self, PyObject *__pyx_arg_k) { Py_ssize_t __pyx_v_k; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("advance (wrapper)", 0); assert(__pyx_arg_k); { __pyx_v_k = __Pyx_PyIndex_AsSsize_t(__pyx_arg_k); if (unlikely((__pyx_v_k == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 452; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; __Pyx_AddTraceback("pandas.lib.Slider.advance", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pandas_3lib_6Slider_2advance(((struct __pyx_obj_6pandas_3lib_Slider *)__pyx_v_self), ((Py_ssize_t)__pyx_v_k)); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/reduce.pyx":452 * self.buf.strides[0] = self.stride * * cpdef advance(self, Py_ssize_t k): # <<<<<<<<<<<<<< * self.buf.data = self.buf.data + self.stride * k * */ static PyObject *__pyx_pf_6pandas_3lib_6Slider_2advance(struct __pyx_obj_6pandas_3lib_Slider *__pyx_v_self, Py_ssize_t __pyx_v_k) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("advance", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = ((struct __pyx_vtabstruct_6pandas_3lib_Slider *)__pyx_v_self->__pyx_vtab)->advance(__pyx_v_self, __pyx_v_k, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 452; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas.lib.Slider.advance", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/reduce.pyx":455 * self.buf.data = self.buf.data + self.stride * k * * cdef move(self, int start, int end): # <<<<<<<<<<<<<< * ''' * For slicing */ static PyObject *__pyx_f_6pandas_3lib_6Slider_move(struct __pyx_obj_6pandas_3lib_Slider *__pyx_v_self, int __pyx_v_start, int __pyx_v_end) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("move", 0); /* "pandas/src/reduce.pyx":459 * For slicing * ''' * self.buf.data = self.values.data + self.stride * start # <<<<<<<<<<<<<< * self.buf.shape[0] = end - start * */ __pyx_v_self->buf->data = (__pyx_v_self->values->data + (__pyx_v_self->stride * __pyx_v_start)); /* "pandas/src/reduce.pyx":460 * ''' * self.buf.data = self.values.data + self.stride * start * self.buf.shape[0] = end - start # <<<<<<<<<<<<<< * * cpdef set_length(self, Py_ssize_t length): */ (__pyx_v_self->buf->dimensions[0]) = (__pyx_v_end - __pyx_v_start); __pyx_r = Py_None; __Pyx_INCREF(Py_None); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/reduce.pyx":462 * self.buf.shape[0] = end - start * * cpdef set_length(self, Py_ssize_t length): # <<<<<<<<<<<<<< * self.buf.shape[0] = length * */ static PyObject *__pyx_pw_6pandas_3lib_6Slider_5set_length(PyObject *__pyx_v_self, PyObject *__pyx_arg_length); /*proto*/ static PyObject *__pyx_f_6pandas_3lib_6Slider_set_length(struct __pyx_obj_6pandas_3lib_Slider *__pyx_v_self, Py_ssize_t __pyx_v_length, int __pyx_skip_dispatch) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("set_length", 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__set_length); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 462; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_6pandas_3lib_6Slider_5set_length)) { __Pyx_XDECREF(__pyx_r); __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_length); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 462; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 462; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 462; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(((PyObject *)__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/src/reduce.pyx":463 * * cpdef set_length(self, Py_ssize_t length): * self.buf.shape[0] = length # <<<<<<<<<<<<<< * * cpdef reset(self): */ (__pyx_v_self->buf->dimensions[0]) = __pyx_v_length; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("pandas.lib.Slider.set_length", __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_3lib_6Slider_5set_length(PyObject *__pyx_v_self, PyObject *__pyx_arg_length); /*proto*/ static PyObject *__pyx_pw_6pandas_3lib_6Slider_5set_length(PyObject *__pyx_v_self, PyObject *__pyx_arg_length) { Py_ssize_t __pyx_v_length; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("set_length (wrapper)", 0); assert(__pyx_arg_length); { __pyx_v_length = __Pyx_PyIndex_AsSsize_t(__pyx_arg_length); if (unlikely((__pyx_v_length == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 462; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; __Pyx_AddTraceback("pandas.lib.Slider.set_length", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pandas_3lib_6Slider_4set_length(((struct __pyx_obj_6pandas_3lib_Slider *)__pyx_v_self), ((Py_ssize_t)__pyx_v_length)); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/reduce.pyx":462 * self.buf.shape[0] = end - start * * cpdef set_length(self, Py_ssize_t length): # <<<<<<<<<<<<<< * self.buf.shape[0] = length * */ static PyObject *__pyx_pf_6pandas_3lib_6Slider_4set_length(struct __pyx_obj_6pandas_3lib_Slider *__pyx_v_self, Py_ssize_t __pyx_v_length) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("set_length", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = ((struct __pyx_vtabstruct_6pandas_3lib_Slider *)__pyx_v_self->__pyx_vtab)->set_length(__pyx_v_self, __pyx_v_length, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 462; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas.lib.Slider.set_length", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/reduce.pyx":465 * self.buf.shape[0] = length * * cpdef reset(self): # <<<<<<<<<<<<<< * self.buf.shape[0] = self.orig_len * self.buf.data = self.orig_data */ static PyObject *__pyx_pw_6pandas_3lib_6Slider_7reset(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static PyObject *__pyx_f_6pandas_3lib_6Slider_reset(struct __pyx_obj_6pandas_3lib_Slider *__pyx_v_self, int __pyx_skip_dispatch) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; Py_ssize_t __pyx_t_3; char *__pyx_t_4; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("reset", 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__reset); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 465; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_6pandas_3lib_6Slider_7reset)) { __Pyx_XDECREF(__pyx_r); __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 465; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } /* "pandas/src/reduce.pyx":466 * * cpdef reset(self): * self.buf.shape[0] = self.orig_len # <<<<<<<<<<<<<< * self.buf.data = self.orig_data * self.buf.strides[0] = self.orig_stride */ __pyx_t_3 = __pyx_v_self->orig_len; (__pyx_v_self->buf->dimensions[0]) = __pyx_t_3; /* "pandas/src/reduce.pyx":467 * cpdef reset(self): * self.buf.shape[0] = self.orig_len * self.buf.data = self.orig_data # <<<<<<<<<<<<<< * self.buf.strides[0] = self.orig_stride * */ __pyx_t_4 = __pyx_v_self->orig_data; __pyx_v_self->buf->data = __pyx_t_4; /* "pandas/src/reduce.pyx":468 * self.buf.shape[0] = self.orig_len * self.buf.data = self.orig_data * self.buf.strides[0] = self.orig_stride # <<<<<<<<<<<<<< * * */ __pyx_t_3 = __pyx_v_self->orig_stride; (__pyx_v_self->buf->strides[0]) = __pyx_t_3; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("pandas.lib.Slider.reset", __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_3lib_6Slider_7reset(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static PyObject *__pyx_pw_6pandas_3lib_6Slider_7reset(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("reset (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_3lib_6Slider_6reset(((struct __pyx_obj_6pandas_3lib_Slider *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/reduce.pyx":465 * self.buf.shape[0] = length * * cpdef reset(self): # <<<<<<<<<<<<<< * self.buf.shape[0] = self.orig_len * self.buf.data = self.orig_data */ static PyObject *__pyx_pf_6pandas_3lib_6Slider_6reset(struct __pyx_obj_6pandas_3lib_Slider *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("reset", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = ((struct __pyx_vtabstruct_6pandas_3lib_Slider *)__pyx_v_self->__pyx_vtab)->reset(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 465; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas.lib.Slider.reset", __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_3lib_101apply_frame_axis0(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_3lib_101apply_frame_axis0 = {__Pyx_NAMESTR("apply_frame_axis0"), (PyCFunction)__pyx_pw_6pandas_3lib_101apply_frame_axis0, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_3lib_101apply_frame_axis0(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_frame = 0; PyObject *__pyx_v_f = 0; PyObject *__pyx_v_names = 0; PyArrayObject *__pyx_v_starts = 0; PyArrayObject *__pyx_v_ends = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("apply_frame_axis0 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__frame,&__pyx_n_s__f,&__pyx_n_s__names,&__pyx_n_s__starts,&__pyx_n_s__ends,0}; PyObject* values[5] = {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 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__frame)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__f)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("apply_frame_axis0", 1, 5, 5, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 474; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__names)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("apply_frame_axis0", 1, 5, 5, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 474; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__starts)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("apply_frame_axis0", 1, 5, 5, 3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 474; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 4: if (likely((values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__ends)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("apply_frame_axis0", 1, 5, 5, 4); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 474; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "apply_frame_axis0") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 474; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 5) { 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); } __pyx_v_frame = values[0]; __pyx_v_f = values[1]; __pyx_v_names = values[2]; __pyx_v_starts = ((PyArrayObject *)values[3]); __pyx_v_ends = ((PyArrayObject *)values[4]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("apply_frame_axis0", 1, 5, 5, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 474; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.lib.apply_frame_axis0", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_starts), __pyx_ptype_5numpy_ndarray, 1, "starts", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 475; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ends), __pyx_ptype_5numpy_ndarray, 1, "ends", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 475; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_3lib_100apply_frame_axis0(__pyx_self, __pyx_v_frame, __pyx_v_f, __pyx_v_names, __pyx_v_starts, __pyx_v_ends); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/reduce.pyx":474 * pass * * def apply_frame_axis0(object frame, object f, object names, # <<<<<<<<<<<<<< * ndarray[int64_t] starts, ndarray[int64_t] ends): * cdef: */ static PyObject *__pyx_pf_6pandas_3lib_100apply_frame_axis0(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_frame, PyObject *__pyx_v_f, PyObject *__pyx_v_names, PyArrayObject *__pyx_v_starts, PyArrayObject *__pyx_v_ends) { struct __pyx_obj_6pandas_3lib_BlockSlider *__pyx_v_slider = 0; Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_n; PyObject *__pyx_v_results = 0; PyObject *__pyx_v_piece = 0; PyObject *__pyx_v_item_cache = 0; PyObject *__pyx_v_chunk = NULL; CYTHON_UNUSED PyObject *__pyx_v_shape_before = NULL; PyObject *__pyx_v_result = NULL; int __pyx_v_mutated; PyObject *__pyx_v_gin = NULL; __Pyx_LocalBuf_ND __pyx_pybuffernd_ends; __Pyx_Buffer __pyx_pybuffer_ends; __Pyx_LocalBuf_ND __pyx_pybuffernd_starts; __Pyx_Buffer __pyx_pybuffer_starts; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_t_4; long __pyx_t_5; int __pyx_t_6; long __pyx_t_7; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; int __pyx_t_11; PyObject *__pyx_t_12 = NULL; PyObject *__pyx_t_13 = NULL; PyObject *__pyx_t_14 = NULL; Py_ssize_t __pyx_t_15; Py_ssize_t __pyx_t_16; Py_ssize_t __pyx_t_17; int __pyx_t_18; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("apply_frame_axis0", 0); __pyx_pybuffer_starts.pybuffer.buf = NULL; __pyx_pybuffer_starts.refcount = 0; __pyx_pybuffernd_starts.data = NULL; __pyx_pybuffernd_starts.rcbuffer = &__pyx_pybuffer_starts; __pyx_pybuffer_ends.pybuffer.buf = NULL; __pyx_pybuffer_ends.refcount = 0; __pyx_pybuffernd_ends.data = NULL; __pyx_pybuffernd_ends.rcbuffer = &__pyx_pybuffer_ends; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_starts.rcbuffer->pybuffer, (PyObject*)__pyx_v_starts, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 474; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_starts.diminfo[0].strides = __pyx_pybuffernd_starts.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_starts.diminfo[0].shape = __pyx_pybuffernd_starts.rcbuffer->pybuffer.shape[0]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_ends.rcbuffer->pybuffer, (PyObject*)__pyx_v_ends, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 474; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_ends.diminfo[0].strides = __pyx_pybuffernd_ends.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_ends.diminfo[0].shape = __pyx_pybuffernd_ends.rcbuffer->pybuffer.shape[0]; /* "pandas/src/reduce.pyx":478 * cdef: * BlockSlider slider * Py_ssize_t i, n = len(starts) # <<<<<<<<<<<<<< * list results * object piece */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_starts)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 478; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/src/reduce.pyx":483 * dict item_cache * * if frame.index._has_complex_internals: # <<<<<<<<<<<<<< * raise InvalidApply('Cannot modify frame index internals') * */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_frame, __pyx_n_s__index); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 483; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_37); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 483; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 483; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_4) { /* "pandas/src/reduce.pyx":484 * * if frame.index._has_complex_internals: * raise InvalidApply('Cannot modify frame index internals') # <<<<<<<<<<<<<< * * */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s__InvalidApply); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 484; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_k_tuple_39), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 484; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 484; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L3; } __pyx_L3:; /* "pandas/src/reduce.pyx":487 * * * results = [] # <<<<<<<<<<<<<< * * # Need to infer if our low-level mucking is going to cause a segfault */ __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 487; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_v_results = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/reduce.pyx":490 * * # Need to infer if our low-level mucking is going to cause a segfault * if n > 0: # <<<<<<<<<<<<<< * chunk = frame[starts[0]:ends[0]] * shape_before = chunk.shape */ __pyx_t_4 = ((__pyx_v_n > 0) != 0); if (__pyx_t_4) { /* "pandas/src/reduce.pyx":491 * # Need to infer if our low-level mucking is going to cause a segfault * if n > 0: * chunk = frame[starts[0]:ends[0]] # <<<<<<<<<<<<<< * shape_before = chunk.shape * try: */ __pyx_t_5 = 0; __pyx_t_6 = -1; if (__pyx_t_5 < 0) { __pyx_t_5 += __pyx_pybuffernd_starts.diminfo[0].shape; if (unlikely(__pyx_t_5 < 0)) __pyx_t_6 = 0; } else if (unlikely(__pyx_t_5 >= __pyx_pybuffernd_starts.diminfo[0].shape)) __pyx_t_6 = 0; if (unlikely(__pyx_t_6 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_6); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 491; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_7 = 0; __pyx_t_6 = -1; if (__pyx_t_7 < 0) { __pyx_t_7 += __pyx_pybuffernd_ends.diminfo[0].shape; if (unlikely(__pyx_t_7 < 0)) __pyx_t_6 = 0; } else if (unlikely(__pyx_t_7 >= __pyx_pybuffernd_ends.diminfo[0].shape)) __pyx_t_6 = 0; if (unlikely(__pyx_t_6 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_6); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 491; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_2 = __Pyx_PyObject_GetSlice(__pyx_v_frame, (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_starts.rcbuffer->pybuffer.buf, __pyx_t_5, __pyx_pybuffernd_starts.diminfo[0].strides)), (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_ends.rcbuffer->pybuffer.buf, __pyx_t_7, __pyx_pybuffernd_ends.diminfo[0].strides)), NULL, NULL, NULL, 1, 1, 1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 491; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_v_chunk = __pyx_t_2; __pyx_t_2 = 0; /* "pandas/src/reduce.pyx":492 * if n > 0: * chunk = frame[starts[0]:ends[0]] * shape_before = chunk.shape # <<<<<<<<<<<<<< * try: * result = f(chunk) */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_chunk, __pyx_n_s__shape); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 492; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_v_shape_before = __pyx_t_2; __pyx_t_2 = 0; /* "pandas/src/reduce.pyx":493 * chunk = frame[starts[0]:ends[0]] * shape_before = chunk.shape * try: # <<<<<<<<<<<<<< * result = f(chunk) * if result is chunk: */ { __Pyx_ExceptionSave(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10); __Pyx_XGOTREF(__pyx_t_8); __Pyx_XGOTREF(__pyx_t_9); __Pyx_XGOTREF(__pyx_t_10); /*try:*/ { /* "pandas/src/reduce.pyx":494 * shape_before = chunk.shape * try: * result = f(chunk) # <<<<<<<<<<<<<< * if result is chunk: * raise InvalidApply('Function unsafe for fast apply') */ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 494; __pyx_clineno = __LINE__; goto __pyx_L5_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_chunk); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_chunk); __Pyx_GIVEREF(__pyx_v_chunk); __pyx_t_3 = PyObject_Call(__pyx_v_f, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 494; __pyx_clineno = __LINE__; goto __pyx_L5_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __pyx_v_result = __pyx_t_3; __pyx_t_3 = 0; /* "pandas/src/reduce.pyx":495 * try: * result = f(chunk) * if result is chunk: # <<<<<<<<<<<<<< * raise InvalidApply('Function unsafe for fast apply') * except: */ __pyx_t_4 = (__pyx_v_result == __pyx_v_chunk); __pyx_t_11 = (__pyx_t_4 != 0); if (__pyx_t_11) { /* "pandas/src/reduce.pyx":496 * result = f(chunk) * if result is chunk: * raise InvalidApply('Function unsafe for fast apply') # <<<<<<<<<<<<<< * except: * raise InvalidApply('Let this error raise above us') */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s__InvalidApply); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 496; __pyx_clineno = __LINE__; goto __pyx_L5_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_k_tuple_41), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 496; __pyx_clineno = __LINE__; goto __pyx_L5_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 496; __pyx_clineno = __LINE__; goto __pyx_L5_error;} goto __pyx_L13; } __pyx_L13:; } __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; goto __pyx_L12_try_end; __pyx_L5_error:; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/reduce.pyx":497 * if result is chunk: * raise InvalidApply('Function unsafe for fast apply') * except: # <<<<<<<<<<<<<< * raise InvalidApply('Let this error raise above us') * */ /*except:*/ { __Pyx_AddTraceback("pandas.lib.apply_frame_axis0", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_3, &__pyx_t_12) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 497; __pyx_clineno = __LINE__; goto __pyx_L7_except_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_GOTREF(__pyx_t_3); __Pyx_GOTREF(__pyx_t_12); /* "pandas/src/reduce.pyx":498 * raise InvalidApply('Function unsafe for fast apply') * except: * raise InvalidApply('Let this error raise above us') # <<<<<<<<<<<<<< * * slider = BlockSlider(frame) */ __pyx_t_13 = __Pyx_GetModuleGlobalName(__pyx_n_s__InvalidApply); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 498; __pyx_clineno = __LINE__; goto __pyx_L7_except_error;} __Pyx_GOTREF(__pyx_t_13); __pyx_t_14 = PyObject_Call(__pyx_t_13, ((PyObject *)__pyx_k_tuple_43), NULL); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 498; __pyx_clineno = __LINE__; goto __pyx_L7_except_error;} __Pyx_GOTREF(__pyx_t_14); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_Raise(__pyx_t_14, 0, 0, 0); __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 498; __pyx_clineno = __LINE__; goto __pyx_L7_except_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; goto __pyx_L6_exception_handled; } __pyx_L7_except_error:; __Pyx_XGIVEREF(__pyx_t_8); __Pyx_XGIVEREF(__pyx_t_9); __Pyx_XGIVEREF(__pyx_t_10); __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_9, __pyx_t_10); goto __pyx_L1_error; __pyx_L6_exception_handled:; __Pyx_XGIVEREF(__pyx_t_8); __Pyx_XGIVEREF(__pyx_t_9); __Pyx_XGIVEREF(__pyx_t_10); __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_9, __pyx_t_10); __pyx_L12_try_end:; } goto __pyx_L4; } __pyx_L4:; /* "pandas/src/reduce.pyx":500 * raise InvalidApply('Let this error raise above us') * * slider = BlockSlider(frame) # <<<<<<<<<<<<<< * * mutated = False */ __pyx_t_12 = PyTuple_New(1); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 500; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __Pyx_INCREF(__pyx_v_frame); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_v_frame); __Pyx_GIVEREF(__pyx_v_frame); __pyx_t_3 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_6pandas_3lib_BlockSlider)), ((PyObject *)__pyx_t_12), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 500; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(((PyObject *)__pyx_t_12)); __pyx_t_12 = 0; __pyx_v_slider = ((struct __pyx_obj_6pandas_3lib_BlockSlider *)__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/reduce.pyx":502 * slider = BlockSlider(frame) * * mutated = False # <<<<<<<<<<<<<< * item_cache = slider.dummy._item_cache * gin = slider.dummy.index._engine # f7u12 */ __pyx_v_mutated = 0; /* "pandas/src/reduce.pyx":503 * * mutated = False * item_cache = slider.dummy._item_cache # <<<<<<<<<<<<<< * gin = slider.dummy.index._engine # f7u12 * try: */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_slider->dummy, __pyx_n_s___item_cache); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 503; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (!(likely(PyDict_CheckExact(__pyx_t_3))||((__pyx_t_3) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected dict, got %.200s", Py_TYPE(__pyx_t_3)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 503; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_item_cache = ((PyObject*)__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/reduce.pyx":504 * mutated = False * item_cache = slider.dummy._item_cache * gin = slider.dummy.index._engine # f7u12 # <<<<<<<<<<<<<< * try: * for i in range(n): */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_slider->dummy, __pyx_n_s__index); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 504; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s___engine); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 504; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_gin = __pyx_t_12; __pyx_t_12 = 0; /* "pandas/src/reduce.pyx":505 * item_cache = slider.dummy._item_cache * gin = slider.dummy.index._engine # f7u12 * try: # <<<<<<<<<<<<<< * for i in range(n): * slider.move(starts[i], ends[i]) */ /*try:*/ { /* "pandas/src/reduce.pyx":506 * gin = slider.dummy.index._engine # f7u12 * try: * for i in range(n): # <<<<<<<<<<<<<< * slider.move(starts[i], ends[i]) * */ __pyx_t_1 = __pyx_v_n; for (__pyx_t_15 = 0; __pyx_t_15 < __pyx_t_1; __pyx_t_15+=1) { __pyx_v_i = __pyx_t_15; /* "pandas/src/reduce.pyx":507 * try: * for i in range(n): * slider.move(starts[i], ends[i]) # <<<<<<<<<<<<<< * * item_cache.clear() # ugh */ __pyx_t_16 = __pyx_v_i; __pyx_t_6 = -1; if (__pyx_t_16 < 0) { __pyx_t_16 += __pyx_pybuffernd_starts.diminfo[0].shape; if (unlikely(__pyx_t_16 < 0)) __pyx_t_6 = 0; } else if (unlikely(__pyx_t_16 >= __pyx_pybuffernd_starts.diminfo[0].shape)) __pyx_t_6 = 0; if (unlikely(__pyx_t_6 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_6); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 507; __pyx_clineno = __LINE__; goto __pyx_L17;} } __pyx_t_17 = __pyx_v_i; __pyx_t_6 = -1; if (__pyx_t_17 < 0) { __pyx_t_17 += __pyx_pybuffernd_ends.diminfo[0].shape; if (unlikely(__pyx_t_17 < 0)) __pyx_t_6 = 0; } else if (unlikely(__pyx_t_17 >= __pyx_pybuffernd_ends.diminfo[0].shape)) __pyx_t_6 = 0; if (unlikely(__pyx_t_6 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_6); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 507; __pyx_clineno = __LINE__; goto __pyx_L17;} } __pyx_t_12 = ((struct __pyx_vtabstruct_6pandas_3lib_BlockSlider *)__pyx_v_slider->__pyx_vtab)->move(__pyx_v_slider, (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_starts.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_starts.diminfo[0].strides)), (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_ends.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_ends.diminfo[0].strides)), 0); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 507; __pyx_clineno = __LINE__; goto __pyx_L17;} __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; /* "pandas/src/reduce.pyx":509 * slider.move(starts[i], ends[i]) * * item_cache.clear() # ugh # <<<<<<<<<<<<<< * gin.clear_mapping() * */ if (unlikely(((PyObject *)__pyx_v_item_cache) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "clear"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 509; __pyx_clineno = __LINE__; goto __pyx_L17;} } __pyx_t_18 = __Pyx_PyDict_Clear(__pyx_v_item_cache); if (unlikely(__pyx_t_18 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 509; __pyx_clineno = __LINE__; goto __pyx_L17;} /* "pandas/src/reduce.pyx":510 * * item_cache.clear() # ugh * gin.clear_mapping() # <<<<<<<<<<<<<< * * object.__setattr__(slider.dummy, 'name', names[i]) */ __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_gin, __pyx_n_s__clear_mapping); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 510; __pyx_clineno = __LINE__; goto __pyx_L17;} __Pyx_GOTREF(__pyx_t_12); __pyx_t_3 = PyObject_Call(__pyx_t_12, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 510; __pyx_clineno = __LINE__; goto __pyx_L17;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/reduce.pyx":512 * gin.clear_mapping() * * object.__setattr__(slider.dummy, 'name', names[i]) # <<<<<<<<<<<<<< * piece = f(slider.dummy) * */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_builtin_object, __pyx_n_s____setattr__); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 512; __pyx_clineno = __LINE__; goto __pyx_L17;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_12 = __Pyx_GetItemInt(__pyx_v_names, __pyx_v_i, sizeof(Py_ssize_t), PyInt_FromSsize_t, 0, 1, 1); if (!__pyx_t_12) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 512; __pyx_clineno = __LINE__; goto __pyx_L17;} __Pyx_GOTREF(__pyx_t_12); __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 512; __pyx_clineno = __LINE__; goto __pyx_L17;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_slider->dummy); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_slider->dummy); __Pyx_GIVEREF(__pyx_v_slider->dummy); __Pyx_INCREF(((PyObject *)__pyx_n_s__name)); PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)__pyx_n_s__name)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__name)); PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_t_12); __Pyx_GIVEREF(__pyx_t_12); __pyx_t_12 = 0; __pyx_t_12 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 512; __pyx_clineno = __LINE__; goto __pyx_L17;} __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; /* "pandas/src/reduce.pyx":513 * * object.__setattr__(slider.dummy, 'name', names[i]) * piece = f(slider.dummy) # <<<<<<<<<<<<<< * * # I'm paying the price for index-sharing, ugh */ __pyx_t_12 = PyTuple_New(1); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 513; __pyx_clineno = __LINE__; goto __pyx_L17;} __Pyx_GOTREF(__pyx_t_12); __Pyx_INCREF(__pyx_v_slider->dummy); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_v_slider->dummy); __Pyx_GIVEREF(__pyx_v_slider->dummy); __pyx_t_2 = PyObject_Call(__pyx_v_f, ((PyObject *)__pyx_t_12), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 513; __pyx_clineno = __LINE__; goto __pyx_L17;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(((PyObject *)__pyx_t_12)); __pyx_t_12 = 0; __Pyx_XDECREF_SET(__pyx_v_piece, __pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/reduce.pyx":516 * * # I'm paying the price for index-sharing, ugh * try: # <<<<<<<<<<<<<< * if piece.index is slider.dummy.index: * piece = piece.copy() */ { __Pyx_ExceptionSave(&__pyx_t_10, &__pyx_t_9, &__pyx_t_8); __Pyx_XGOTREF(__pyx_t_10); __Pyx_XGOTREF(__pyx_t_9); __Pyx_XGOTREF(__pyx_t_8); /*try:*/ { /* "pandas/src/reduce.pyx":517 * # I'm paying the price for index-sharing, ugh * try: * if piece.index is slider.dummy.index: # <<<<<<<<<<<<<< * piece = piece.copy() * else: */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_piece, __pyx_n_s__index); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 517; __pyx_clineno = __LINE__; goto __pyx_L21_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_slider->dummy, __pyx_n_s__index); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 517; __pyx_clineno = __LINE__; goto __pyx_L21_error;} __Pyx_GOTREF(__pyx_t_12); __pyx_t_11 = (__pyx_t_2 == __pyx_t_12); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __pyx_t_4 = (__pyx_t_11 != 0); if (__pyx_t_4) { /* "pandas/src/reduce.pyx":518 * try: * if piece.index is slider.dummy.index: * piece = piece.copy() # <<<<<<<<<<<<<< * else: * mutated = True */ __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_piece, __pyx_n_s__copy); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 518; __pyx_clineno = __LINE__; goto __pyx_L21_error;} __Pyx_GOTREF(__pyx_t_12); __pyx_t_2 = PyObject_Call(__pyx_t_12, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 518; __pyx_clineno = __LINE__; goto __pyx_L21_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_DECREF_SET(__pyx_v_piece, __pyx_t_2); __pyx_t_2 = 0; goto __pyx_L29; } /*else*/ { /* "pandas/src/reduce.pyx":520 * piece = piece.copy() * else: * mutated = True # <<<<<<<<<<<<<< * except AttributeError: * pass */ __pyx_v_mutated = 1; } __pyx_L29:; } __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; goto __pyx_L28_try_end; __pyx_L21_error:; __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/reduce.pyx":521 * else: * mutated = True * except AttributeError: # <<<<<<<<<<<<<< * pass * results.append(piece) */ __pyx_t_6 = PyErr_ExceptionMatches(__pyx_builtin_AttributeError); if (__pyx_t_6) { PyErr_Restore(0,0,0); goto __pyx_L22_exception_handled; } __Pyx_XGIVEREF(__pyx_t_10); __Pyx_XGIVEREF(__pyx_t_9); __Pyx_XGIVEREF(__pyx_t_8); __Pyx_ExceptionReset(__pyx_t_10, __pyx_t_9, __pyx_t_8); goto __pyx_L17; __pyx_L22_exception_handled:; __Pyx_XGIVEREF(__pyx_t_10); __Pyx_XGIVEREF(__pyx_t_9); __Pyx_XGIVEREF(__pyx_t_8); __Pyx_ExceptionReset(__pyx_t_10, __pyx_t_9, __pyx_t_8); __pyx_L28_try_end:; } /* "pandas/src/reduce.pyx":523 * except AttributeError: * pass * results.append(piece) # <<<<<<<<<<<<<< * finally: * slider.reset() */ __pyx_t_18 = __Pyx_PyList_Append(__pyx_v_results, __pyx_v_piece); if (unlikely(__pyx_t_18 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 523; __pyx_clineno = __LINE__; goto __pyx_L17;} } } /* "pandas/src/reduce.pyx":525 * results.append(piece) * finally: * slider.reset() # <<<<<<<<<<<<<< * * return results, mutated */ /*finally:*/ { int __pyx_why; PyObject *__pyx_exc_type, *__pyx_exc_value, *__pyx_exc_tb; int __pyx_exc_lineno; __pyx_exc_type = 0; __pyx_exc_value = 0; __pyx_exc_tb = 0; __pyx_exc_lineno = 0; __pyx_why = 0; goto __pyx_L18; __pyx_L17: { __pyx_why = 4; __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_ErrFetch(&__pyx_exc_type, &__pyx_exc_value, &__pyx_exc_tb); __pyx_exc_lineno = __pyx_lineno; goto __pyx_L18; } __pyx_L18:; __pyx_t_2 = ((struct __pyx_vtabstruct_6pandas_3lib_BlockSlider *)__pyx_v_slider->__pyx_vtab)->reset(__pyx_v_slider); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 525; __pyx_clineno = __LINE__; goto __pyx_L30_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; goto __pyx_L31; __pyx_L30_error:; if (__pyx_why == 4) { Py_XDECREF(__pyx_exc_type); Py_XDECREF(__pyx_exc_value); Py_XDECREF(__pyx_exc_tb); } goto __pyx_L1_error; __pyx_L31:; switch (__pyx_why) { case 4: { __Pyx_ErrRestore(__pyx_exc_type, __pyx_exc_value, __pyx_exc_tb); __pyx_lineno = __pyx_exc_lineno; __pyx_exc_type = 0; __pyx_exc_value = 0; __pyx_exc_tb = 0; goto __pyx_L1_error; } } } /* "pandas/src/reduce.pyx":527 * slider.reset() * * return results, mutated # <<<<<<<<<<<<<< * * cdef class BlockSlider: */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_v_mutated); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 527; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_12 = PyTuple_New(2); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 527; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __Pyx_INCREF(((PyObject *)__pyx_v_results)); PyTuple_SET_ITEM(__pyx_t_12, 0, ((PyObject *)__pyx_v_results)); __Pyx_GIVEREF(((PyObject *)__pyx_v_results)); PyTuple_SET_ITEM(__pyx_t_12, 1, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = ((PyObject *)__pyx_t_12); __pyx_t_12 = 0; goto __pyx_L0; __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_12); __Pyx_XDECREF(__pyx_t_13); __Pyx_XDECREF(__pyx_t_14); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_ends.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_starts.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.lib.apply_frame_axis0", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_ends.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_starts.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_slider); __Pyx_XDECREF(__pyx_v_results); __Pyx_XDECREF(__pyx_v_piece); __Pyx_XDECREF(__pyx_v_item_cache); __Pyx_XDECREF(__pyx_v_chunk); __Pyx_XDECREF(__pyx_v_shape_before); __Pyx_XDECREF(__pyx_v_result); __Pyx_XDECREF(__pyx_v_gin); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pandas_3lib_11BlockSlider_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_pw_6pandas_3lib_11BlockSlider_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_frame = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__frame,0}; PyObject* values[1] = {0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__frame)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 543; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); } __pyx_v_frame = values[0]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 543; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.lib.BlockSlider.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return -1; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pandas_3lib_11BlockSlider___init__(((struct __pyx_obj_6pandas_3lib_BlockSlider *)__pyx_v_self), __pyx_v_frame); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/reduce.pyx":543 * char **base_ptrs * * def __init__(self, frame): # <<<<<<<<<<<<<< * self.frame = frame * self.dummy = frame[:0] */ static int __pyx_pf_6pandas_3lib_11BlockSlider___init__(struct __pyx_obj_6pandas_3lib_BlockSlider *__pyx_v_self, PyObject *__pyx_v_frame) { PyObject *__pyx_v_x = NULL; PyObject *__pyx_v_i = NULL; PyObject *__pyx_v_block = NULL; PyObject *__pyx_v_b = NULL; int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; Py_ssize_t __pyx_t_4; PyObject *(*__pyx_t_5)(PyObject *); char *__pyx_t_6; Py_ssize_t __pyx_t_7; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__init__", 0); /* "pandas/src/reduce.pyx":544 * * def __init__(self, frame): * self.frame = frame # <<<<<<<<<<<<<< * self.dummy = frame[:0] * */ __Pyx_INCREF(__pyx_v_frame); __Pyx_GIVEREF(__pyx_v_frame); __Pyx_GOTREF(__pyx_v_self->frame); __Pyx_DECREF(__pyx_v_self->frame); __pyx_v_self->frame = __pyx_v_frame; /* "pandas/src/reduce.pyx":545 * def __init__(self, frame): * self.frame = frame * self.dummy = frame[:0] # <<<<<<<<<<<<<< * * self.blocks = [b.values for b in self.dummy._data.blocks] */ __pyx_t_1 = __Pyx_PyObject_GetSlice(__pyx_v_frame, 0, 0, NULL, NULL, &__pyx_k_slice_44, 0, 1, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 545; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->dummy); __Pyx_DECREF(__pyx_v_self->dummy); __pyx_v_self->dummy = __pyx_t_1; __pyx_t_1 = 0; /* "pandas/src/reduce.pyx":547 * self.dummy = frame[:0] * * self.blocks = [b.values for b in self.dummy._data.blocks] # <<<<<<<<<<<<<< * * for x in self.blocks: */ __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 547; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->dummy, __pyx_n_s___data); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 547; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__blocks); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 547; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (PyList_CheckExact(__pyx_t_3) || PyTuple_CheckExact(__pyx_t_3)) { __pyx_t_2 = __pyx_t_3; __Pyx_INCREF(__pyx_t_2); __pyx_t_4 = 0; __pyx_t_5 = NULL; } else { __pyx_t_4 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 547; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = Py_TYPE(__pyx_t_2)->tp_iternext; } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; for (;;) { if (!__pyx_t_5 && PyList_CheckExact(__pyx_t_2)) { if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_2)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_3 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_3); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 547; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_3 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 547; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif } else if (!__pyx_t_5 && PyTuple_CheckExact(__pyx_t_2)) { if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_2)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_3); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 547; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_3 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 547; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif } else { __pyx_t_3 = __pyx_t_5(__pyx_t_2); if (unlikely(!__pyx_t_3)) { if (PyErr_Occurred()) { if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear(); else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 547; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } break; } __Pyx_GOTREF(__pyx_t_3); } __Pyx_XDECREF_SET(__pyx_v_b, __pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_b, __pyx_n_s__values); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 547; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_3))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 547; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_GIVEREF(((PyObject *)__pyx_t_1)); __Pyx_GOTREF(__pyx_v_self->blocks); __Pyx_DECREF(((PyObject *)__pyx_v_self->blocks)); __pyx_v_self->blocks = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/reduce.pyx":549 * self.blocks = [b.values for b in self.dummy._data.blocks] * * for x in self.blocks: # <<<<<<<<<<<<<< * util.set_array_not_contiguous(x) * */ if (unlikely(((PyObject *)__pyx_v_self->blocks) == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 549; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_1 = ((PyObject *)__pyx_v_self->blocks); __Pyx_INCREF(__pyx_t_1); __pyx_t_4 = 0; for (;;) { if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_1)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 549; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 549; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif __Pyx_XDECREF_SET(__pyx_v_x, __pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/reduce.pyx":550 * * for x in self.blocks: * util.set_array_not_contiguous(x) # <<<<<<<<<<<<<< * * self.nblocks = len(self.blocks) */ if (!(likely(((__pyx_v_x) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_x, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 550; __pyx_clineno = __LINE__; goto __pyx_L1_error;} set_array_not_contiguous(((PyArrayObject *)__pyx_v_x)); } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/reduce.pyx":552 * util.set_array_not_contiguous(x) * * self.nblocks = len(self.blocks) # <<<<<<<<<<<<<< * self.idx_slider = Slider(self.frame.index, self.dummy.index) * */ __pyx_t_1 = ((PyObject *)__pyx_v_self->blocks); __Pyx_INCREF(__pyx_t_1); if (unlikely(__pyx_t_1 == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 552; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_4 = PyList_GET_SIZE(__pyx_t_1); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 552; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_self->nblocks = __pyx_t_4; /* "pandas/src/reduce.pyx":553 * * self.nblocks = len(self.blocks) * self.idx_slider = Slider(self.frame.index, self.dummy.index) # <<<<<<<<<<<<<< * * self.base_ptrs = malloc(sizeof(char*) * len(self.blocks)) */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->frame, __pyx_n_s__index); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 553; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->dummy, __pyx_n_s__index); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 553; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 553; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_1 = 0; __pyx_t_2 = 0; __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_6pandas_3lib_Slider)), ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 553; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; __Pyx_GIVEREF(__pyx_t_2); __Pyx_GOTREF(__pyx_v_self->idx_slider); __Pyx_DECREF(((PyObject *)__pyx_v_self->idx_slider)); __pyx_v_self->idx_slider = ((struct __pyx_obj_6pandas_3lib_Slider *)__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/reduce.pyx":555 * self.idx_slider = Slider(self.frame.index, self.dummy.index) * * self.base_ptrs = malloc(sizeof(char*) * len(self.blocks)) # <<<<<<<<<<<<<< * for i, block in enumerate(self.blocks): * self.base_ptrs[i] = ( block).data */ __pyx_t_2 = ((PyObject *)__pyx_v_self->blocks); __Pyx_INCREF(__pyx_t_2); if (unlikely(__pyx_t_2 == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 555; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_4 = PyList_GET_SIZE(__pyx_t_2); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 555; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_self->base_ptrs = ((char **)malloc(((sizeof(char *)) * __pyx_t_4))); /* "pandas/src/reduce.pyx":556 * * self.base_ptrs = malloc(sizeof(char*) * len(self.blocks)) * for i, block in enumerate(self.blocks): # <<<<<<<<<<<<<< * self.base_ptrs[i] = ( block).data * */ __Pyx_INCREF(__pyx_int_0); __pyx_t_2 = __pyx_int_0; __pyx_t_3 = ((PyObject *)__pyx_v_self->blocks); __Pyx_INCREF(__pyx_t_3); __pyx_t_4 = 0; for (;;) { if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_3)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_1 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 556; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_1 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 556; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif __Pyx_XDECREF_SET(__pyx_v_block, __pyx_t_1); __pyx_t_1 = 0; __Pyx_INCREF(__pyx_t_2); __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_2); __pyx_t_1 = PyNumber_Add(__pyx_t_2, __pyx_int_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 556; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = __pyx_t_1; __pyx_t_1 = 0; /* "pandas/src/reduce.pyx":557 * self.base_ptrs = malloc(sizeof(char*) * len(self.blocks)) * for i, block in enumerate(self.blocks): * self.base_ptrs[i] = ( block).data # <<<<<<<<<<<<<< * * def __dealloc__(self): */ __pyx_t_6 = ((PyArrayObject *)__pyx_v_block)->data; __pyx_t_7 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_7 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 557; __pyx_clineno = __LINE__; goto __pyx_L1_error;} (__pyx_v_self->base_ptrs[__pyx_t_7]) = __pyx_t_6; } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("pandas.lib.BlockSlider.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_XDECREF(__pyx_v_x); __Pyx_XDECREF(__pyx_v_i); __Pyx_XDECREF(__pyx_v_block); __Pyx_XDECREF(__pyx_v_b); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static void __pyx_pw_6pandas_3lib_11BlockSlider_3__dealloc__(PyObject *__pyx_v_self); /*proto*/ static void __pyx_pw_6pandas_3lib_11BlockSlider_3__dealloc__(PyObject *__pyx_v_self) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0); __pyx_pf_6pandas_3lib_11BlockSlider_2__dealloc__(((struct __pyx_obj_6pandas_3lib_BlockSlider *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); } /* "pandas/src/reduce.pyx":559 * self.base_ptrs[i] = ( block).data * * def __dealloc__(self): # <<<<<<<<<<<<<< * free(self.base_ptrs) * */ static void __pyx_pf_6pandas_3lib_11BlockSlider_2__dealloc__(struct __pyx_obj_6pandas_3lib_BlockSlider *__pyx_v_self) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__dealloc__", 0); /* "pandas/src/reduce.pyx":560 * * def __dealloc__(self): * free(self.base_ptrs) # <<<<<<<<<<<<<< * * cpdef move(self, int start, int end): */ free(__pyx_v_self->base_ptrs); __Pyx_RefNannyFinishContext(); } /* "pandas/src/reduce.pyx":562 * free(self.base_ptrs) * * cpdef move(self, int start, int end): # <<<<<<<<<<<<<< * cdef: * ndarray arr */ static PyObject *__pyx_pw_6pandas_3lib_11BlockSlider_5move(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_6pandas_3lib_11BlockSlider_move(struct __pyx_obj_6pandas_3lib_BlockSlider *__pyx_v_self, int __pyx_v_start, int __pyx_v_end, int __pyx_skip_dispatch) { PyArrayObject *__pyx_v_arr = 0; int __pyx_v_i; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; int __pyx_t_5; int __pyx_t_6; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("move", 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__move); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 562; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_6pandas_3lib_11BlockSlider_5move)) { __Pyx_XDECREF(__pyx_r); __pyx_t_2 = PyInt_FromLong(__pyx_v_start); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 562; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyInt_FromLong(__pyx_v_end); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 562; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 562; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_2 = 0; __pyx_t_3 = 0; __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 562; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __pyx_r = __pyx_t_3; __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } /* "pandas/src/reduce.pyx":567 * * # move blocks * for i in range(self.nblocks): # <<<<<<<<<<<<<< * arr = self.blocks[i] * */ __pyx_t_5 = __pyx_v_self->nblocks; for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) { __pyx_v_i = __pyx_t_6; /* "pandas/src/reduce.pyx":568 * # move blocks * for i in range(self.nblocks): * arr = self.blocks[i] # <<<<<<<<<<<<<< * * # axis=1 is the frame's axis=0 */ if (unlikely(((PyObject *)__pyx_v_self->blocks) == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 568; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_1 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_self->blocks), __pyx_v_i, sizeof(int), PyInt_FromLong, 1, 1, 1); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 568; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 568; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_XDECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_1)); __pyx_t_1 = 0; /* "pandas/src/reduce.pyx":571 * * # axis=1 is the frame's axis=0 * arr.data = self.base_ptrs[i] + arr.strides[1] * start # <<<<<<<<<<<<<< * arr.shape[1] = end - start * */ __pyx_v_arr->data = ((__pyx_v_self->base_ptrs[__pyx_v_i]) + ((__pyx_v_arr->strides[1]) * __pyx_v_start)); /* "pandas/src/reduce.pyx":572 * # axis=1 is the frame's axis=0 * arr.data = self.base_ptrs[i] + arr.strides[1] * start * arr.shape[1] = end - start # <<<<<<<<<<<<<< * * self.idx_slider.move(start, end) */ (__pyx_v_arr->dimensions[1]) = (__pyx_v_end - __pyx_v_start); } /* "pandas/src/reduce.pyx":574 * arr.shape[1] = end - start * * self.idx_slider.move(start, end) # <<<<<<<<<<<<<< * * cdef reset(self): */ __pyx_t_1 = ((struct __pyx_vtabstruct_6pandas_3lib_Slider *)__pyx_v_self->idx_slider->__pyx_vtab)->move(__pyx_v_self->idx_slider, __pyx_v_start, __pyx_v_end); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 574; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("pandas.lib.BlockSlider.move", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_arr); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_3lib_11BlockSlider_5move(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_6pandas_3lib_11BlockSlider_5move(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { int __pyx_v_start; int __pyx_v_end; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("move (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__start,&__pyx_n_s__end,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__start)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__end)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("move", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 562; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "move") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 562; __pyx_clineno = __LINE__; goto __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_start = __Pyx_PyInt_AsInt(values[0]); if (unlikely((__pyx_v_start == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 562; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_end = __Pyx_PyInt_AsInt(values[1]); if (unlikely((__pyx_v_end == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 562; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("move", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 562; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.lib.BlockSlider.move", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pandas_3lib_11BlockSlider_4move(((struct __pyx_obj_6pandas_3lib_BlockSlider *)__pyx_v_self), __pyx_v_start, __pyx_v_end); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/reduce.pyx":562 * free(self.base_ptrs) * * cpdef move(self, int start, int end): # <<<<<<<<<<<<<< * cdef: * ndarray arr */ static PyObject *__pyx_pf_6pandas_3lib_11BlockSlider_4move(struct __pyx_obj_6pandas_3lib_BlockSlider *__pyx_v_self, int __pyx_v_start, int __pyx_v_end) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("move", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = ((struct __pyx_vtabstruct_6pandas_3lib_BlockSlider *)__pyx_v_self->__pyx_vtab)->move(__pyx_v_self, __pyx_v_start, __pyx_v_end, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 562; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas.lib.BlockSlider.move", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/reduce.pyx":576 * self.idx_slider.move(start, end) * * cdef reset(self): # <<<<<<<<<<<<<< * cdef: * ndarray arr */ static PyObject *__pyx_f_6pandas_3lib_11BlockSlider_reset(struct __pyx_obj_6pandas_3lib_BlockSlider *__pyx_v_self) { PyArrayObject *__pyx_v_arr = 0; int __pyx_v_i; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("reset", 0); /* "pandas/src/reduce.pyx":581 * * # move blocks * for i in range(self.nblocks): # <<<<<<<<<<<<<< * arr = self.blocks[i] * */ __pyx_t_1 = __pyx_v_self->nblocks; for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) { __pyx_v_i = __pyx_t_2; /* "pandas/src/reduce.pyx":582 * # move blocks * for i in range(self.nblocks): * arr = self.blocks[i] # <<<<<<<<<<<<<< * * # axis=1 is the frame's axis=0 */ if (unlikely(((PyObject *)__pyx_v_self->blocks) == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 582; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_3 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_self->blocks), __pyx_v_i, sizeof(int), PyInt_FromLong, 1, 1, 1); if (!__pyx_t_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 582; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 582; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_XDECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_3)); __pyx_t_3 = 0; /* "pandas/src/reduce.pyx":585 * * # axis=1 is the frame's axis=0 * arr.data = self.base_ptrs[i] # <<<<<<<<<<<<<< * arr.shape[1] = 0 * */ __pyx_v_arr->data = (__pyx_v_self->base_ptrs[__pyx_v_i]); /* "pandas/src/reduce.pyx":586 * # axis=1 is the frame's axis=0 * arr.data = self.base_ptrs[i] * arr.shape[1] = 0 # <<<<<<<<<<<<<< * * self.idx_slider.reset() */ (__pyx_v_arr->dimensions[1]) = 0; } /* "pandas/src/reduce.pyx":588 * arr.shape[1] = 0 * * self.idx_slider.reset() # <<<<<<<<<<<<<< * * */ __pyx_t_3 = ((struct __pyx_vtabstruct_6pandas_3lib_Slider *)__pyx_v_self->idx_slider->__pyx_vtab)->reset(__pyx_v_self->idx_slider, 0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 588; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("pandas.lib.BlockSlider.reset", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_arr); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_3lib_11BlockSlider_5frame_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6pandas_3lib_11BlockSlider_5frame_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_3lib_11BlockSlider_5frame___get__(((struct __pyx_obj_6pandas_3lib_BlockSlider *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/reduce.pyx":535 * * cdef public: * object frame, dummy # <<<<<<<<<<<<<< * int nblocks * Slider idx_slider */ static PyObject *__pyx_pf_6pandas_3lib_11BlockSlider_5frame___get__(struct __pyx_obj_6pandas_3lib_BlockSlider *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_self->frame); __pyx_r = __pyx_v_self->frame; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pandas_3lib_11BlockSlider_5frame_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ static int __pyx_pw_6pandas_3lib_11BlockSlider_5frame_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_3lib_11BlockSlider_5frame_2__set__(((struct __pyx_obj_6pandas_3lib_BlockSlider *)__pyx_v_self), ((PyObject *)__pyx_v_value)); __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pandas_3lib_11BlockSlider_5frame_2__set__(struct __pyx_obj_6pandas_3lib_BlockSlider *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__", 0); __Pyx_INCREF(__pyx_v_value); __Pyx_GIVEREF(__pyx_v_value); __Pyx_GOTREF(__pyx_v_self->frame); __Pyx_DECREF(__pyx_v_self->frame); __pyx_v_self->frame = __pyx_v_value; __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pandas_3lib_11BlockSlider_5frame_5__del__(PyObject *__pyx_v_self); /*proto*/ static int __pyx_pw_6pandas_3lib_11BlockSlider_5frame_5__del__(PyObject *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_3lib_11BlockSlider_5frame_4__del__(((struct __pyx_obj_6pandas_3lib_BlockSlider *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pandas_3lib_11BlockSlider_5frame_4__del__(struct __pyx_obj_6pandas_3lib_BlockSlider *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__", 0); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->frame); __Pyx_DECREF(__pyx_v_self->frame); __pyx_v_self->frame = Py_None; __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_3lib_11BlockSlider_5dummy_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6pandas_3lib_11BlockSlider_5dummy_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_3lib_11BlockSlider_5dummy___get__(((struct __pyx_obj_6pandas_3lib_BlockSlider *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_3lib_11BlockSlider_5dummy___get__(struct __pyx_obj_6pandas_3lib_BlockSlider *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_self->dummy); __pyx_r = __pyx_v_self->dummy; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pandas_3lib_11BlockSlider_5dummy_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ static int __pyx_pw_6pandas_3lib_11BlockSlider_5dummy_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_3lib_11BlockSlider_5dummy_2__set__(((struct __pyx_obj_6pandas_3lib_BlockSlider *)__pyx_v_self), ((PyObject *)__pyx_v_value)); __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pandas_3lib_11BlockSlider_5dummy_2__set__(struct __pyx_obj_6pandas_3lib_BlockSlider *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__", 0); __Pyx_INCREF(__pyx_v_value); __Pyx_GIVEREF(__pyx_v_value); __Pyx_GOTREF(__pyx_v_self->dummy); __Pyx_DECREF(__pyx_v_self->dummy); __pyx_v_self->dummy = __pyx_v_value; __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pandas_3lib_11BlockSlider_5dummy_5__del__(PyObject *__pyx_v_self); /*proto*/ static int __pyx_pw_6pandas_3lib_11BlockSlider_5dummy_5__del__(PyObject *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_3lib_11BlockSlider_5dummy_4__del__(((struct __pyx_obj_6pandas_3lib_BlockSlider *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pandas_3lib_11BlockSlider_5dummy_4__del__(struct __pyx_obj_6pandas_3lib_BlockSlider *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__", 0); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->dummy); __Pyx_DECREF(__pyx_v_self->dummy); __pyx_v_self->dummy = Py_None; __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_3lib_11BlockSlider_7nblocks_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6pandas_3lib_11BlockSlider_7nblocks_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_3lib_11BlockSlider_7nblocks___get__(((struct __pyx_obj_6pandas_3lib_BlockSlider *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/reduce.pyx":536 * cdef public: * object frame, dummy * int nblocks # <<<<<<<<<<<<<< * Slider idx_slider * list blocks */ static PyObject *__pyx_pf_6pandas_3lib_11BlockSlider_7nblocks___get__(struct __pyx_obj_6pandas_3lib_BlockSlider *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyInt_FromLong(__pyx_v_self->nblocks); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 536; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas.lib.BlockSlider.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 int __pyx_pw_6pandas_3lib_11BlockSlider_7nblocks_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ static int __pyx_pw_6pandas_3lib_11BlockSlider_7nblocks_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_3lib_11BlockSlider_7nblocks_2__set__(((struct __pyx_obj_6pandas_3lib_BlockSlider *)__pyx_v_self), ((PyObject *)__pyx_v_value)); __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pandas_3lib_11BlockSlider_7nblocks_2__set__(struct __pyx_obj_6pandas_3lib_BlockSlider *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__set__", 0); __pyx_t_1 = __Pyx_PyInt_AsInt(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 536; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_self->nblocks = __pyx_t_1; __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("pandas.lib.BlockSlider.nblocks.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_3lib_11BlockSlider_10idx_slider_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6pandas_3lib_11BlockSlider_10idx_slider_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_3lib_11BlockSlider_10idx_slider___get__(((struct __pyx_obj_6pandas_3lib_BlockSlider *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/reduce.pyx":537 * object frame, dummy * int nblocks * Slider idx_slider # <<<<<<<<<<<<<< * list blocks * */ static PyObject *__pyx_pf_6pandas_3lib_11BlockSlider_10idx_slider___get__(struct __pyx_obj_6pandas_3lib_BlockSlider *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_self->idx_slider)); __pyx_r = ((PyObject *)__pyx_v_self->idx_slider); goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pandas_3lib_11BlockSlider_10idx_slider_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ static int __pyx_pw_6pandas_3lib_11BlockSlider_10idx_slider_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_3lib_11BlockSlider_10idx_slider_2__set__(((struct __pyx_obj_6pandas_3lib_BlockSlider *)__pyx_v_self), ((PyObject *)__pyx_v_value)); __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pandas_3lib_11BlockSlider_10idx_slider_2__set__(struct __pyx_obj_6pandas_3lib_BlockSlider *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__set__", 0); if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_6pandas_3lib_Slider))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 537; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_INCREF(__pyx_v_value); __Pyx_GIVEREF(__pyx_v_value); __Pyx_GOTREF(__pyx_v_self->idx_slider); __Pyx_DECREF(((PyObject *)__pyx_v_self->idx_slider)); __pyx_v_self->idx_slider = ((struct __pyx_obj_6pandas_3lib_Slider *)__pyx_v_value); __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("pandas.lib.BlockSlider.idx_slider.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pandas_3lib_11BlockSlider_10idx_slider_5__del__(PyObject *__pyx_v_self); /*proto*/ static int __pyx_pw_6pandas_3lib_11BlockSlider_10idx_slider_5__del__(PyObject *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_3lib_11BlockSlider_10idx_slider_4__del__(((struct __pyx_obj_6pandas_3lib_BlockSlider *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pandas_3lib_11BlockSlider_10idx_slider_4__del__(struct __pyx_obj_6pandas_3lib_BlockSlider *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__", 0); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->idx_slider); __Pyx_DECREF(((PyObject *)__pyx_v_self->idx_slider)); __pyx_v_self->idx_slider = ((struct __pyx_obj_6pandas_3lib_Slider *)Py_None); __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_3lib_11BlockSlider_6blocks_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6pandas_3lib_11BlockSlider_6blocks_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_3lib_11BlockSlider_6blocks___get__(((struct __pyx_obj_6pandas_3lib_BlockSlider *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/reduce.pyx":538 * int nblocks * Slider idx_slider * list blocks # <<<<<<<<<<<<<< * * cdef: */ static PyObject *__pyx_pf_6pandas_3lib_11BlockSlider_6blocks___get__(struct __pyx_obj_6pandas_3lib_BlockSlider *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_self->blocks)); __pyx_r = ((PyObject *)__pyx_v_self->blocks); goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pandas_3lib_11BlockSlider_6blocks_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ static int __pyx_pw_6pandas_3lib_11BlockSlider_6blocks_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_3lib_11BlockSlider_6blocks_2__set__(((struct __pyx_obj_6pandas_3lib_BlockSlider *)__pyx_v_self), ((PyObject *)__pyx_v_value)); __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pandas_3lib_11BlockSlider_6blocks_2__set__(struct __pyx_obj_6pandas_3lib_BlockSlider *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__set__", 0); if (!(likely(PyList_CheckExact(__pyx_v_value))||((__pyx_v_value) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected list, got %.200s", Py_TYPE(__pyx_v_value)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 538; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_INCREF(__pyx_v_value); __Pyx_GIVEREF(__pyx_v_value); __Pyx_GOTREF(__pyx_v_self->blocks); __Pyx_DECREF(((PyObject *)__pyx_v_self->blocks)); __pyx_v_self->blocks = ((PyObject*)__pyx_v_value); __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("pandas.lib.BlockSlider.blocks.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pandas_3lib_11BlockSlider_6blocks_5__del__(PyObject *__pyx_v_self); /*proto*/ static int __pyx_pw_6pandas_3lib_11BlockSlider_6blocks_5__del__(PyObject *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_3lib_11BlockSlider_6blocks_4__del__(((struct __pyx_obj_6pandas_3lib_BlockSlider *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pandas_3lib_11BlockSlider_6blocks_4__del__(struct __pyx_obj_6pandas_3lib_BlockSlider *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__", 0); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->blocks); __Pyx_DECREF(((PyObject *)__pyx_v_self->blocks)); __pyx_v_self->blocks = ((PyObject*)Py_None); __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_3lib_103reduce(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_3lib_103reduce = {__Pyx_NAMESTR("reduce"), (PyCFunction)__pyx_pw_6pandas_3lib_103reduce, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_3lib_103reduce(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_arr = 0; PyObject *__pyx_v_f = 0; PyObject *__pyx_v_axis = 0; PyObject *__pyx_v_dummy = 0; PyObject *__pyx_v_labels = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("reduce (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__arr,&__pyx_n_s__f,&__pyx_n_s__axis,&__pyx_n_s__dummy,&__pyx_n_s__labels,0}; PyObject* values[5] = {0,0,0,0,0}; values[2] = ((PyObject *)__pyx_int_0); /* "pandas/src/reduce.pyx":591 * * * def reduce(arr, f, axis=0, dummy=None, labels=None): # <<<<<<<<<<<<<< * if labels._has_complex_internals: * raise Exception('Cannot use shortcut') */ values[3] = ((PyObject *)Py_None); values[4] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__arr)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__f)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("reduce", 0, 2, 5, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 591; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__axis); if (value) { values[2] = value; kw_args--; } } case 3: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__dummy); if (value) { values[3] = value; kw_args--; } } case 4: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__labels); if (value) { values[4] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "reduce") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 591; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_arr = values[0]; __pyx_v_f = values[1]; __pyx_v_axis = values[2]; __pyx_v_dummy = values[3]; __pyx_v_labels = values[4]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("reduce", 0, 2, 5, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 591; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.lib.reduce", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pandas_3lib_102reduce(__pyx_self, __pyx_v_arr, __pyx_v_f, __pyx_v_axis, __pyx_v_dummy, __pyx_v_labels); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_3lib_102reduce(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_arr, PyObject *__pyx_v_f, PyObject *__pyx_v_axis, PyObject *__pyx_v_dummy, PyObject *__pyx_v_labels) { struct __pyx_obj_6pandas_3lib_Reducer *__pyx_v_reducer = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("reduce", 0); /* "pandas/src/reduce.pyx":592 * * def reduce(arr, f, axis=0, dummy=None, labels=None): * if labels._has_complex_internals: # <<<<<<<<<<<<<< * raise Exception('Cannot use shortcut') * */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_labels, __pyx_n_s_37); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 592; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 592; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_2) { /* "pandas/src/reduce.pyx":593 * def reduce(arr, f, axis=0, dummy=None, labels=None): * if labels._has_complex_internals: * raise Exception('Cannot use shortcut') # <<<<<<<<<<<<<< * * reducer = Reducer(arr, f, axis=axis, dummy=dummy, labels=labels) */ __pyx_t_1 = PyObject_Call(__pyx_builtin_Exception, ((PyObject *)__pyx_k_tuple_46), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 593; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 593; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L3; } __pyx_L3:; /* "pandas/src/reduce.pyx":595 * raise Exception('Cannot use shortcut') * * reducer = Reducer(arr, f, axis=axis, dummy=dummy, labels=labels) # <<<<<<<<<<<<<< * return reducer.get_result() */ __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 595; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_arr); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_arr); __Pyx_GIVEREF(__pyx_v_arr); __Pyx_INCREF(__pyx_v_f); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_f); __Pyx_GIVEREF(__pyx_v_f); __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 595; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_3)); if (PyDict_SetItem(__pyx_t_3, ((PyObject *)__pyx_n_s__axis), __pyx_v_axis) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 595; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (PyDict_SetItem(__pyx_t_3, ((PyObject *)__pyx_n_s__dummy), __pyx_v_dummy) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 595; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (PyDict_SetItem(__pyx_t_3, ((PyObject *)__pyx_n_s__labels), __pyx_v_labels) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 595; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_4 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_6pandas_3lib_Reducer)), ((PyObject *)__pyx_t_1), ((PyObject *)__pyx_t_3)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 595; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; __pyx_v_reducer = ((struct __pyx_obj_6pandas_3lib_Reducer *)__pyx_t_4); __pyx_t_4 = 0; /* "pandas/src/reduce.pyx":596 * * reducer = Reducer(arr, f, axis=axis, dummy=dummy, labels=labels) * return reducer.get_result() # <<<<<<<<<<<<<< */ __Pyx_XDECREF(__pyx_r); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_reducer), __pyx_n_s__get_result); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 596; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 596; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("pandas.lib.reduce", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_reducer); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pandas_3lib_14cache_readonly_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_pw_6pandas_3lib_14cache_readonly_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_func = 0; PyObject *__pyx_v_allow_setting = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__func,&__pyx_n_s__allow_setting,0}; PyObject* values[2] = {0,0}; /* "pandas/src/properties.pyx":9 * object func, name, allow_setting * * def __init__(self, func=None, allow_setting=False): # <<<<<<<<<<<<<< * if func is not None: * self.func = func */ values[0] = ((PyObject *)Py_None); values[1] = __pyx_k_47; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__func); if (value) { values[0] = value; kw_args--; } } case 1: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__allow_setting); if (value) { values[1] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 9; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_func = values[0]; __pyx_v_allow_setting = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("__init__", 0, 0, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[3]; __pyx_lineno = 9; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.lib.cache_readonly.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return -1; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pandas_3lib_14cache_readonly___init__(((struct __pyx_obj_6pandas_3lib_cache_readonly *)__pyx_v_self), __pyx_v_func, __pyx_v_allow_setting); __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pandas_3lib_14cache_readonly___init__(struct __pyx_obj_6pandas_3lib_cache_readonly *__pyx_v_self, PyObject *__pyx_v_func, PyObject *__pyx_v_allow_setting) { int __pyx_r; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__init__", 0); /* "pandas/src/properties.pyx":10 * * def __init__(self, func=None, allow_setting=False): * if func is not None: # <<<<<<<<<<<<<< * self.func = func * self.name = func.__name__ */ __pyx_t_1 = (__pyx_v_func != Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { /* "pandas/src/properties.pyx":11 * def __init__(self, func=None, allow_setting=False): * if func is not None: * self.func = func # <<<<<<<<<<<<<< * self.name = func.__name__ * self.allow_setting = allow_setting */ __Pyx_INCREF(__pyx_v_func); __Pyx_GIVEREF(__pyx_v_func); __Pyx_GOTREF(__pyx_v_self->func); __Pyx_DECREF(__pyx_v_self->func); __pyx_v_self->func = __pyx_v_func; /* "pandas/src/properties.pyx":12 * if func is not None: * self.func = func * self.name = func.__name__ # <<<<<<<<<<<<<< * self.allow_setting = allow_setting * */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_func, __pyx_n_s____name__); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 12; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __Pyx_GOTREF(__pyx_v_self->name); __Pyx_DECREF(__pyx_v_self->name); __pyx_v_self->name = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L3; } __pyx_L3:; /* "pandas/src/properties.pyx":13 * self.func = func * self.name = func.__name__ * self.allow_setting = allow_setting # <<<<<<<<<<<<<< * * def __call__(self, func, doc=None): */ __Pyx_INCREF(__pyx_v_allow_setting); __Pyx_GIVEREF(__pyx_v_allow_setting); __Pyx_GOTREF(__pyx_v_self->allow_setting); __Pyx_DECREF(__pyx_v_self->allow_setting); __pyx_v_self->allow_setting = __pyx_v_allow_setting; __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("pandas.lib.cache_readonly.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_3lib_14cache_readonly_3__call__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_6pandas_3lib_14cache_readonly_3__call__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_func = 0; CYTHON_UNUSED PyObject *__pyx_v_doc = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__call__ (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__func,&__pyx_n_s__doc,0}; PyObject* values[2] = {0,0}; /* "pandas/src/properties.pyx":15 * self.allow_setting = allow_setting * * def __call__(self, func, doc=None): # <<<<<<<<<<<<<< * self.func = func * self.name = func.__name__ */ values[1] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__func)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__doc); if (value) { values[1] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__call__") < 0)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 15; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_func = values[0]; __pyx_v_doc = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("__call__", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[3]; __pyx_lineno = 15; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.lib.cache_readonly.__call__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pandas_3lib_14cache_readonly_2__call__(((struct __pyx_obj_6pandas_3lib_cache_readonly *)__pyx_v_self), __pyx_v_func, __pyx_v_doc); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_3lib_14cache_readonly_2__call__(struct __pyx_obj_6pandas_3lib_cache_readonly *__pyx_v_self, PyObject *__pyx_v_func, CYTHON_UNUSED PyObject *__pyx_v_doc) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__call__", 0); /* "pandas/src/properties.pyx":16 * * def __call__(self, func, doc=None): * self.func = func # <<<<<<<<<<<<<< * self.name = func.__name__ * return self */ __Pyx_INCREF(__pyx_v_func); __Pyx_GIVEREF(__pyx_v_func); __Pyx_GOTREF(__pyx_v_self->func); __Pyx_DECREF(__pyx_v_self->func); __pyx_v_self->func = __pyx_v_func; /* "pandas/src/properties.pyx":17 * def __call__(self, func, doc=None): * self.func = func * self.name = func.__name__ # <<<<<<<<<<<<<< * return self * */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_func, __pyx_n_s____name__); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 17; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->name); __Pyx_DECREF(__pyx_v_self->name); __pyx_v_self->name = __pyx_t_1; __pyx_t_1 = 0; /* "pandas/src/properties.pyx":18 * self.func = func * self.name = func.__name__ * return self # <<<<<<<<<<<<<< * * def __get__(self, obj, typ): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_self)); __pyx_r = ((PyObject *)__pyx_v_self); goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas.lib.cache_readonly.__call__", __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_3lib_14cache_readonly_5__get__(PyObject *__pyx_v_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_typ); /*proto*/ static PyObject *__pyx_pw_6pandas_3lib_14cache_readonly_5__get__(PyObject *__pyx_v_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_typ) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_3lib_14cache_readonly_4__get__(((struct __pyx_obj_6pandas_3lib_cache_readonly *)__pyx_v_self), ((PyObject *)__pyx_v_obj), ((PyObject *)__pyx_v_typ)); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/properties.pyx":20 * return self * * def __get__(self, obj, typ): # <<<<<<<<<<<<<< * # Get the cache or set a default one if needed * */ static PyObject *__pyx_pf_6pandas_3lib_14cache_readonly_4__get__(struct __pyx_obj_6pandas_3lib_cache_readonly *__pyx_v_self, PyObject *__pyx_v_obj, CYTHON_UNUSED PyObject *__pyx_v_typ) { PyObject *__pyx_v_cache = NULL; PyObject *__pyx_v_val = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; int __pyx_t_7; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); /* "pandas/src/properties.pyx":23 * # Get the cache or set a default one if needed * * cache = getattr(obj, '_cache', None) # <<<<<<<<<<<<<< * if cache is None: * try: */ __pyx_t_1 = __Pyx_GetAttr3(__pyx_v_obj, ((PyObject *)__pyx_n_s___cache), Py_None); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 23; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_v_cache = __pyx_t_1; __pyx_t_1 = 0; /* "pandas/src/properties.pyx":24 * * cache = getattr(obj, '_cache', None) * if cache is None: # <<<<<<<<<<<<<< * try: * cache = obj._cache = {} */ __pyx_t_2 = (__pyx_v_cache == Py_None); __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { /* "pandas/src/properties.pyx":25 * cache = getattr(obj, '_cache', None) * if cache is None: * try: # <<<<<<<<<<<<<< * cache = obj._cache = {} * except (AttributeError): */ { __Pyx_ExceptionSave(&__pyx_t_4, &__pyx_t_5, &__pyx_t_6); __Pyx_XGOTREF(__pyx_t_4); __Pyx_XGOTREF(__pyx_t_5); __Pyx_XGOTREF(__pyx_t_6); /*try:*/ { /* "pandas/src/properties.pyx":26 * if cache is None: * try: * cache = obj._cache = {} # <<<<<<<<<<<<<< * except (AttributeError): * return */ __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 26; __pyx_clineno = __LINE__; goto __pyx_L4_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __Pyx_INCREF(((PyObject *)__pyx_t_1)); __Pyx_DECREF_SET(__pyx_v_cache, ((PyObject *)__pyx_t_1)); if (__Pyx_PyObject_SetAttrStr(__pyx_v_obj, __pyx_n_s___cache, ((PyObject *)__pyx_t_1)) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 26; __pyx_clineno = __LINE__; goto __pyx_L4_error;} __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; } __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; goto __pyx_L11_try_end; __pyx_L4_error:; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/properties.pyx":27 * try: * cache = obj._cache = {} * except (AttributeError): # <<<<<<<<<<<<<< * return * */ __pyx_t_7 = PyErr_ExceptionMatches(__pyx_builtin_AttributeError); if (__pyx_t_7) { __Pyx_AddTraceback("pandas.lib.cache_readonly.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_8, &__pyx_t_9) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 27; __pyx_clineno = __LINE__; goto __pyx_L6_except_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_GOTREF(__pyx_t_8); __Pyx_GOTREF(__pyx_t_9); /* "pandas/src/properties.pyx":28 * cache = obj._cache = {} * except (AttributeError): * return # <<<<<<<<<<<<<< * * if PyDict_Contains(cache, self.name): */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; goto __pyx_L7_except_return; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; goto __pyx_L5_exception_handled; } __pyx_L6_except_error:; __Pyx_XGIVEREF(__pyx_t_4); __Pyx_XGIVEREF(__pyx_t_5); __Pyx_XGIVEREF(__pyx_t_6); __Pyx_ExceptionReset(__pyx_t_4, __pyx_t_5, __pyx_t_6); goto __pyx_L1_error; __pyx_L7_except_return:; __Pyx_XGIVEREF(__pyx_t_4); __Pyx_XGIVEREF(__pyx_t_5); __Pyx_XGIVEREF(__pyx_t_6); __Pyx_ExceptionReset(__pyx_t_4, __pyx_t_5, __pyx_t_6); goto __pyx_L0; __pyx_L5_exception_handled:; __Pyx_XGIVEREF(__pyx_t_4); __Pyx_XGIVEREF(__pyx_t_5); __Pyx_XGIVEREF(__pyx_t_6); __Pyx_ExceptionReset(__pyx_t_4, __pyx_t_5, __pyx_t_6); __pyx_L11_try_end:; } goto __pyx_L3; } __pyx_L3:; /* "pandas/src/properties.pyx":30 * return * * if PyDict_Contains(cache, self.name): # <<<<<<<<<<<<<< * # not necessary to Py_INCREF * val = PyDict_GetItem(cache, self.name) */ __pyx_t_9 = __pyx_v_self->name; __Pyx_INCREF(__pyx_t_9); __pyx_t_7 = PyDict_Contains(__pyx_v_cache, __pyx_t_9); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 30; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_3 = (__pyx_t_7 != 0); if (__pyx_t_3) { /* "pandas/src/properties.pyx":32 * if PyDict_Contains(cache, self.name): * # not necessary to Py_INCREF * val = PyDict_GetItem(cache, self.name) # <<<<<<<<<<<<<< * else: * val = self.func(obj) */ __pyx_t_9 = __pyx_v_self->name; __Pyx_INCREF(__pyx_t_9); __pyx_t_10 = PyDict_GetItem(__pyx_v_cache, __pyx_t_9); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_INCREF(((PyObject *)__pyx_t_10)); __pyx_v_val = ((PyObject *)__pyx_t_10); goto __pyx_L14; } /*else*/ { /* "pandas/src/properties.pyx":34 * val = PyDict_GetItem(cache, self.name) * else: * val = self.func(obj) # <<<<<<<<<<<<<< * PyDict_SetItem(cache, self.name, val) * return val */ __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 34; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_INCREF(__pyx_v_obj); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_v_obj); __Pyx_GIVEREF(__pyx_v_obj); __pyx_t_8 = PyObject_Call(__pyx_v_self->func, ((PyObject *)__pyx_t_9), NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 34; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(((PyObject *)__pyx_t_9)); __pyx_t_9 = 0; __pyx_v_val = __pyx_t_8; __pyx_t_8 = 0; /* "pandas/src/properties.pyx":35 * else: * val = self.func(obj) * PyDict_SetItem(cache, self.name, val) # <<<<<<<<<<<<<< * return val * */ __pyx_t_8 = __pyx_v_self->name; __Pyx_INCREF(__pyx_t_8); __pyx_t_7 = PyDict_SetItem(__pyx_v_cache, __pyx_t_8, __pyx_v_val); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } __pyx_L14:; /* "pandas/src/properties.pyx":36 * val = self.func(obj) * PyDict_SetItem(cache, self.name, val) * return val # <<<<<<<<<<<<<< * * def __set__(self, obj, value): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_val); __pyx_r = __pyx_v_val; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); __Pyx_AddTraceback("pandas.lib.cache_readonly.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_cache); __Pyx_XDECREF(__pyx_v_val); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pandas_3lib_14cache_readonly_7__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_value); /*proto*/ static int __pyx_pw_6pandas_3lib_14cache_readonly_7__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_3lib_14cache_readonly_6__set__(((struct __pyx_obj_6pandas_3lib_cache_readonly *)__pyx_v_self), ((PyObject *)__pyx_v_obj), ((PyObject *)__pyx_v_value)); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/properties.pyx":38 * return val * * def __set__(self, obj, value): # <<<<<<<<<<<<<< * * if not self.allow_setting: */ static int __pyx_pf_6pandas_3lib_14cache_readonly_6__set__(struct __pyx_obj_6pandas_3lib_cache_readonly *__pyx_v_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_value) { PyObject *__pyx_v_cache = NULL; int __pyx_r; __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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__set__", 0); /* "pandas/src/properties.pyx":40 * def __set__(self, obj, value): * * if not self.allow_setting: # <<<<<<<<<<<<<< * raise Exception("cannot set values for [%s]" % self.name) * */ __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_self->allow_setting); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 40; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_2 = ((!__pyx_t_1) != 0); if (__pyx_t_2) { /* "pandas/src/properties.pyx":41 * * if not self.allow_setting: * raise Exception("cannot set values for [%s]" % self.name) # <<<<<<<<<<<<<< * * # Get the cache or set a default one if needed */ __pyx_t_3 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_48), __pyx_v_self->name); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 41; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_3)); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 41; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_t_3)); __Pyx_GIVEREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; __pyx_t_3 = PyObject_Call(__pyx_builtin_Exception, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 41; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; {__pyx_filename = __pyx_f[3]; __pyx_lineno = 41; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L3; } __pyx_L3:; /* "pandas/src/properties.pyx":44 * * # Get the cache or set a default one if needed * cache = getattr(obj, '_cache', None) # <<<<<<<<<<<<<< * if cache is None: * try: */ __pyx_t_3 = __Pyx_GetAttr3(__pyx_v_obj, ((PyObject *)__pyx_n_s___cache), Py_None); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 44; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_v_cache = __pyx_t_3; __pyx_t_3 = 0; /* "pandas/src/properties.pyx":45 * # Get the cache or set a default one if needed * cache = getattr(obj, '_cache', None) * if cache is None: # <<<<<<<<<<<<<< * try: * cache = obj._cache = {} */ __pyx_t_2 = (__pyx_v_cache == Py_None); __pyx_t_1 = (__pyx_t_2 != 0); if (__pyx_t_1) { /* "pandas/src/properties.pyx":46 * cache = getattr(obj, '_cache', None) * if cache is None: * try: # <<<<<<<<<<<<<< * cache = obj._cache = {} * except (AttributeError): */ { __Pyx_ExceptionSave(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7); __Pyx_XGOTREF(__pyx_t_5); __Pyx_XGOTREF(__pyx_t_6); __Pyx_XGOTREF(__pyx_t_7); /*try:*/ { /* "pandas/src/properties.pyx":47 * if cache is None: * try: * cache = obj._cache = {} # <<<<<<<<<<<<<< * except (AttributeError): * return */ __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 47; __pyx_clineno = __LINE__; goto __pyx_L5_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_3)); __Pyx_INCREF(((PyObject *)__pyx_t_3)); __Pyx_DECREF_SET(__pyx_v_cache, ((PyObject *)__pyx_t_3)); if (__Pyx_PyObject_SetAttrStr(__pyx_v_obj, __pyx_n_s___cache, ((PyObject *)__pyx_t_3)) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 47; __pyx_clineno = __LINE__; goto __pyx_L5_error;} __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; } __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; goto __pyx_L12_try_end; __pyx_L5_error:; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/properties.pyx":48 * try: * cache = obj._cache = {} * except (AttributeError): # <<<<<<<<<<<<<< * return * */ __pyx_t_8 = PyErr_ExceptionMatches(__pyx_builtin_AttributeError); if (__pyx_t_8) { __Pyx_AddTraceback("pandas.lib.cache_readonly.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_3, &__pyx_t_4, &__pyx_t_9) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L7_except_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_GOTREF(__pyx_t_4); __Pyx_GOTREF(__pyx_t_9); /* "pandas/src/properties.pyx":49 * cache = obj._cache = {} * except (AttributeError): * return # <<<<<<<<<<<<<< * * PyDict_SetItem(cache, self.name, value) */ __pyx_r = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; goto __pyx_L8_except_return; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; goto __pyx_L6_exception_handled; } __pyx_L7_except_error:; __Pyx_XGIVEREF(__pyx_t_5); __Pyx_XGIVEREF(__pyx_t_6); __Pyx_XGIVEREF(__pyx_t_7); __Pyx_ExceptionReset(__pyx_t_5, __pyx_t_6, __pyx_t_7); goto __pyx_L1_error; __pyx_L8_except_return:; __Pyx_XGIVEREF(__pyx_t_5); __Pyx_XGIVEREF(__pyx_t_6); __Pyx_XGIVEREF(__pyx_t_7); __Pyx_ExceptionReset(__pyx_t_5, __pyx_t_6, __pyx_t_7); goto __pyx_L0; __pyx_L6_exception_handled:; __Pyx_XGIVEREF(__pyx_t_5); __Pyx_XGIVEREF(__pyx_t_6); __Pyx_XGIVEREF(__pyx_t_7); __Pyx_ExceptionReset(__pyx_t_5, __pyx_t_6, __pyx_t_7); __pyx_L12_try_end:; } goto __pyx_L4; } __pyx_L4:; /* "pandas/src/properties.pyx":51 * return * * PyDict_SetItem(cache, self.name, value) # <<<<<<<<<<<<<< * * cdef class AxisProperty(object): */ __pyx_t_9 = __pyx_v_self->name; __Pyx_INCREF(__pyx_t_9); __pyx_t_8 = PyDict_SetItem(__pyx_v_cache, __pyx_t_9, __pyx_v_value); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_9); __Pyx_AddTraceback("pandas.lib.cache_readonly.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_XDECREF(__pyx_v_cache); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_3lib_14cache_readonly_4func_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6pandas_3lib_14cache_readonly_4func_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_3lib_14cache_readonly_4func___get__(((struct __pyx_obj_6pandas_3lib_cache_readonly *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/properties.pyx":7 * * cdef readonly: * object func, name, allow_setting # <<<<<<<<<<<<<< * * def __init__(self, func=None, allow_setting=False): */ static PyObject *__pyx_pf_6pandas_3lib_14cache_readonly_4func___get__(struct __pyx_obj_6pandas_3lib_cache_readonly *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_self->func); __pyx_r = __pyx_v_self->func; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_3lib_14cache_readonly_4name_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6pandas_3lib_14cache_readonly_4name_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_3lib_14cache_readonly_4name___get__(((struct __pyx_obj_6pandas_3lib_cache_readonly *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_3lib_14cache_readonly_4name___get__(struct __pyx_obj_6pandas_3lib_cache_readonly *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_self->name); __pyx_r = __pyx_v_self->name; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_3lib_14cache_readonly_13allow_setting_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6pandas_3lib_14cache_readonly_13allow_setting_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_3lib_14cache_readonly_13allow_setting___get__(((struct __pyx_obj_6pandas_3lib_cache_readonly *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_3lib_14cache_readonly_13allow_setting___get__(struct __pyx_obj_6pandas_3lib_cache_readonly *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_self->allow_setting); __pyx_r = __pyx_v_self->allow_setting; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pandas_3lib_12AxisProperty_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_pw_6pandas_3lib_12AxisProperty_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_axis = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__axis,0}; PyObject* values[1] = {0}; values[0] = ((PyObject *)__pyx_int_0); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__axis); if (value) { values[0] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 57; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_axis = values[0]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("__init__", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[3]; __pyx_lineno = 57; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.lib.AxisProperty.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return -1; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pandas_3lib_12AxisProperty___init__(((struct __pyx_obj_6pandas_3lib_AxisProperty *)__pyx_v_self), __pyx_v_axis); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/properties.pyx":57 * Py_ssize_t axis * * def __init__(self, axis=0): # <<<<<<<<<<<<<< * self.axis = axis * */ static int __pyx_pf_6pandas_3lib_12AxisProperty___init__(struct __pyx_obj_6pandas_3lib_AxisProperty *__pyx_v_self, PyObject *__pyx_v_axis) { int __pyx_r; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__init__", 0); /* "pandas/src/properties.pyx":58 * * def __init__(self, axis=0): * self.axis = axis # <<<<<<<<<<<<<< * * def __get__(self, obj, type): */ __pyx_t_1 = __Pyx_PyIndex_AsSsize_t(__pyx_v_axis); if (unlikely((__pyx_t_1 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 58; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_self->axis = __pyx_t_1; __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("pandas.lib.AxisProperty.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_3lib_12AxisProperty_3__get__(PyObject *__pyx_v_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_type); /*proto*/ static PyObject *__pyx_pw_6pandas_3lib_12AxisProperty_3__get__(PyObject *__pyx_v_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_type) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_3lib_12AxisProperty_2__get__(((struct __pyx_obj_6pandas_3lib_AxisProperty *)__pyx_v_self), ((PyObject *)__pyx_v_obj), ((PyObject *)__pyx_v_type)); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/properties.pyx":60 * self.axis = axis * * def __get__(self, obj, type): # <<<<<<<<<<<<<< * cdef list axes = obj._data.axes * return axes[self.axis] */ static PyObject *__pyx_pf_6pandas_3lib_12AxisProperty_2__get__(struct __pyx_obj_6pandas_3lib_AxisProperty *__pyx_v_self, PyObject *__pyx_v_obj, CYTHON_UNUSED PyObject *__pyx_v_type) { PyObject *__pyx_v_axes = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); /* "pandas/src/properties.pyx":61 * * def __get__(self, obj, type): * cdef list axes = obj._data.axes # <<<<<<<<<<<<<< * return axes[self.axis] * */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_obj, __pyx_n_s___data); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 61; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s__axes); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 61; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (!(likely(PyList_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected list, got %.200s", Py_TYPE(__pyx_t_2)->tp_name), 0))) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 61; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_axes = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/properties.pyx":62 * def __get__(self, obj, type): * cdef list axes = obj._data.axes * return axes[self.axis] # <<<<<<<<<<<<<< * * def __set__(self, obj, value): */ __Pyx_XDECREF(__pyx_r); if (unlikely(((PyObject *)__pyx_v_axes) == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[3]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_2 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_axes), __pyx_v_self->axis, sizeof(Py_ssize_t), PyInt_FromSsize_t, 1, 1, 1); if (!__pyx_t_2) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("pandas.lib.AxisProperty.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_axes); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pandas_3lib_12AxisProperty_5__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_value); /*proto*/ static int __pyx_pw_6pandas_3lib_12AxisProperty_5__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_3lib_12AxisProperty_4__set__(((struct __pyx_obj_6pandas_3lib_AxisProperty *)__pyx_v_self), ((PyObject *)__pyx_v_obj), ((PyObject *)__pyx_v_value)); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/properties.pyx":64 * return axes[self.axis] * * def __set__(self, obj, value): # <<<<<<<<<<<<<< * obj._set_axis(self.axis, value) */ static int __pyx_pf_6pandas_3lib_12AxisProperty_4__set__(struct __pyx_obj_6pandas_3lib_AxisProperty *__pyx_v_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__set__", 0); /* "pandas/src/properties.pyx":65 * * def __set__(self, obj, value): * obj._set_axis(self.axis, value) # <<<<<<<<<<<<<< */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_obj, __pyx_n_s___set_axis); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 65; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_self->axis); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 65; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 65; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_value); PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_value); __Pyx_GIVEREF(__pyx_v_value); __pyx_t_2 = 0; __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 65; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("pandas.lib.AxisProperty.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_3lib_105infer_dtype(PyObject *__pyx_self, PyObject *__pyx_v__values); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_3lib_105infer_dtype = {__Pyx_NAMESTR("infer_dtype"), (PyCFunction)__pyx_pw_6pandas_3lib_105infer_dtype, METH_O, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_3lib_105infer_dtype(PyObject *__pyx_self, PyObject *__pyx_v__values) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("infer_dtype (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_3lib_104infer_dtype(__pyx_self, ((PyObject *)__pyx_v__values)); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/inference.pyx":33 * pass * * def infer_dtype(object _values): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n */ static PyObject *__pyx_pf_6pandas_3lib_104infer_dtype(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v__values) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_n; PyObject *__pyx_v_val = 0; PyArrayObject *__pyx_v_values = 0; PyObject *__pyx_v_val_kind = 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; Py_ssize_t __pyx_t_6; Py_ssize_t __pyx_t_7; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("infer_dtype", 0); __Pyx_INCREF(__pyx_v__values); /* "pandas/src/inference.pyx":39 * ndarray values * * if isinstance(_values, np.ndarray): # <<<<<<<<<<<<<< * values = _values * elif hasattr(_values,'values'): */ __pyx_t_1 = __Pyx_TypeCheck(__pyx_v__values, ((PyObject*)__pyx_ptype_5numpy_ndarray)); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { /* "pandas/src/inference.pyx":40 * * if isinstance(_values, np.ndarray): * values = _values # <<<<<<<<<<<<<< * elif hasattr(_values,'values'): * values = _values.values */ if (!(likely(((__pyx_v__values) == Py_None) || likely(__Pyx_TypeTest(__pyx_v__values, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 40; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_INCREF(__pyx_v__values); __pyx_v_values = ((PyArrayObject *)__pyx_v__values); goto __pyx_L3; } /* "pandas/src/inference.pyx":41 * if isinstance(_values, np.ndarray): * values = _values * elif hasattr(_values,'values'): # <<<<<<<<<<<<<< * values = _values.values * else: */ __pyx_t_2 = PyObject_HasAttr(__pyx_v__values, ((PyObject *)__pyx_n_s__values)); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 41; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_1 = (__pyx_t_2 != 0); if (__pyx_t_1) { /* "pandas/src/inference.pyx":42 * values = _values * elif hasattr(_values,'values'): * values = _values.values # <<<<<<<<<<<<<< * else: * if not isinstance(_values, list): */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v__values, __pyx_n_s__values); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 42; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 42; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_values = ((PyArrayObject *)__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L3; } /*else*/ { /* "pandas/src/inference.pyx":44 * values = _values.values * else: * if not isinstance(_values, list): # <<<<<<<<<<<<<< * _values = list(_values) * values = list_to_object_array(_values) */ __pyx_t_1 = PyList_Check(__pyx_v__values); __pyx_t_2 = ((!(__pyx_t_1 != 0)) != 0); if (__pyx_t_2) { /* "pandas/src/inference.pyx":45 * else: * if not isinstance(_values, list): * _values = list(_values) # <<<<<<<<<<<<<< * values = list_to_object_array(_values) * */ __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 45; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_v__values); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v__values); __Pyx_GIVEREF(__pyx_v__values); __pyx_t_4 = PyObject_Call(((PyObject *)((PyObject*)(&PyList_Type))), ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 45; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; __Pyx_DECREF_SET(__pyx_v__values, __pyx_t_4); __pyx_t_4 = 0; goto __pyx_L4; } __pyx_L4:; /* "pandas/src/inference.pyx":46 * if not isinstance(_values, list): * _values = list(_values) * values = list_to_object_array(_values) # <<<<<<<<<<<<<< * * val_kind = values.dtype.type */ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_49); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 46; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 46; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_v__values); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v__values); __Pyx_GIVEREF(__pyx_v__values); __pyx_t_5 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 46; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(((PyObject *)__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_filename = __pyx_f[1]; __pyx_lineno = 46; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_values = ((PyArrayObject *)__pyx_t_5); __pyx_t_5 = 0; } __pyx_L3:; /* "pandas/src/inference.pyx":48 * values = list_to_object_array(_values) * * val_kind = values.dtype.type # <<<<<<<<<<<<<< * if val_kind in _TYPE_MAP: * return _TYPE_MAP[val_kind] */ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_values), __pyx_n_s__dtype); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s__type); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_v_val_kind = __pyx_t_3; __pyx_t_3 = 0; /* "pandas/src/inference.pyx":49 * * val_kind = values.dtype.type * if val_kind in _TYPE_MAP: # <<<<<<<<<<<<<< * return _TYPE_MAP[val_kind] * */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s___TYPE_MAP); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = (__Pyx_PySequence_Contains(__pyx_v_val_kind, __pyx_t_3, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_1 = (__pyx_t_2 != 0); if (__pyx_t_1) { /* "pandas/src/inference.pyx":50 * val_kind = values.dtype.type * if val_kind in _TYPE_MAP: * return _TYPE_MAP[val_kind] # <<<<<<<<<<<<<< * * if values.dtype != np.object_: */ __Pyx_XDECREF(__pyx_r); __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s___TYPE_MAP); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 50; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = PyObject_GetItem(__pyx_t_3, __pyx_v_val_kind); if (!__pyx_t_5) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 50; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_r = __pyx_t_5; __pyx_t_5 = 0; goto __pyx_L0; goto __pyx_L5; } __pyx_L5:; /* "pandas/src/inference.pyx":52 * return _TYPE_MAP[val_kind] * * if values.dtype != np.object_: # <<<<<<<<<<<<<< * values = values.astype('O') * */ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_values), __pyx_n_s__dtype); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 52; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 52; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s__object_); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 52; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyObject_RichCompare(__pyx_t_5, __pyx_t_4, Py_NE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 52; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 52; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_1) { /* "pandas/src/inference.pyx":53 * * if values.dtype != np.object_: * values = values.astype('O') # <<<<<<<<<<<<<< * * n = len(values) */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_values), __pyx_n_s__astype); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 53; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_k_tuple_50), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 53; __pyx_clineno = __LINE__; goto __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_5numpy_ndarray))))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 53; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF_SET(__pyx_v_values, ((PyArrayObject *)__pyx_t_4)); __pyx_t_4 = 0; goto __pyx_L6; } __pyx_L6:; /* "pandas/src/inference.pyx":55 * values = values.astype('O') * * n = len(values) # <<<<<<<<<<<<<< * if n == 0: * return 'empty' */ __pyx_t_6 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 55; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_6; /* "pandas/src/inference.pyx":56 * * n = len(values) * if n == 0: # <<<<<<<<<<<<<< * return 'empty' * */ __pyx_t_1 = ((__pyx_v_n == 0) != 0); if (__pyx_t_1) { /* "pandas/src/inference.pyx":57 * n = len(values) * if n == 0: * return 'empty' # <<<<<<<<<<<<<< * * # make contiguous */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_n_s__empty)); __pyx_r = ((PyObject *)__pyx_n_s__empty); goto __pyx_L0; goto __pyx_L7; } __pyx_L7:; /* "pandas/src/inference.pyx":60 * * # make contiguous * values = values.ravel() # <<<<<<<<<<<<<< * * # try to use a valid value */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_values), __pyx_n_s__ravel); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 60; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 60; __pyx_clineno = __LINE__; goto __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_5numpy_ndarray))))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 60; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF_SET(__pyx_v_values, ((PyArrayObject *)__pyx_t_3)); __pyx_t_3 = 0; /* "pandas/src/inference.pyx":63 * * # try to use a valid value * for i in range(n): # <<<<<<<<<<<<<< * val = util.get_value_1d(values, i) * if not is_null_datetimelike(val): */ __pyx_t_6 = __pyx_v_n; for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_6; __pyx_t_7+=1) { __pyx_v_i = __pyx_t_7; /* "pandas/src/inference.pyx":64 * # try to use a valid value * for i in range(n): * val = util.get_value_1d(values, i) # <<<<<<<<<<<<<< * if not is_null_datetimelike(val): * break */ __pyx_t_3 = get_value_1d(__pyx_v_values, __pyx_v_i); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 64; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_XDECREF_SET(__pyx_v_val, __pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/inference.pyx":65 * for i in range(n): * val = util.get_value_1d(values, i) * if not is_null_datetimelike(val): # <<<<<<<<<<<<<< * break * */ __pyx_t_1 = ((!(__pyx_f_6pandas_3lib_is_null_datetimelike(__pyx_v_val) != 0)) != 0); if (__pyx_t_1) { /* "pandas/src/inference.pyx":66 * val = util.get_value_1d(values, i) * if not is_null_datetimelike(val): * break # <<<<<<<<<<<<<< * * if util.is_datetime64_object(val) or val is NaT: */ goto __pyx_L9_break; goto __pyx_L10; } __pyx_L10:; } __pyx_L9_break:; /* "pandas/src/inference.pyx":68 * break * * if util.is_datetime64_object(val) or val is NaT: # <<<<<<<<<<<<<< * if is_datetime64_array(values): * return 'datetime64' */ if (unlikely(!__pyx_v_val)) { __Pyx_RaiseUnboundLocalError("val"); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 68; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } if (!(is_datetime64_object(__pyx_v_val) != 0)) { __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s__NaT); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 68; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = (__pyx_v_val == __pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_2 = __pyx_t_1; } else { __pyx_t_2 = (is_datetime64_object(__pyx_v_val) != 0); } if (__pyx_t_2) { /* "pandas/src/inference.pyx":69 * * if util.is_datetime64_object(val) or val is NaT: * if is_datetime64_array(values): # <<<<<<<<<<<<<< * return 'datetime64' * elif is_timedelta_or_timedelta64_array(values): */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s__is_datetime64_array); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(((PyObject *)__pyx_v_values)); PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_v_values)); __Pyx_GIVEREF(((PyObject *)__pyx_v_values)); __pyx_t_5 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_2) { /* "pandas/src/inference.pyx":70 * if util.is_datetime64_object(val) or val is NaT: * if is_datetime64_array(values): * return 'datetime64' # <<<<<<<<<<<<<< * elif is_timedelta_or_timedelta64_array(values): * return 'timedelta' */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_n_s__datetime64)); __pyx_r = ((PyObject *)__pyx_n_s__datetime64); goto __pyx_L0; goto __pyx_L12; } /* "pandas/src/inference.pyx":71 * if is_datetime64_array(values): * return 'datetime64' * elif is_timedelta_or_timedelta64_array(values): # <<<<<<<<<<<<<< * return 'timedelta' * */ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_51); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 71; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 71; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(((PyObject *)__pyx_v_values)); PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_v_values)); __Pyx_GIVEREF(((PyObject *)__pyx_v_values)); __pyx_t_3 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 71; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 71; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_2) { /* "pandas/src/inference.pyx":72 * return 'datetime64' * elif is_timedelta_or_timedelta64_array(values): * return 'timedelta' # <<<<<<<<<<<<<< * * elif util.is_integer_object(val): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_n_s__timedelta)); __pyx_r = ((PyObject *)__pyx_n_s__timedelta); goto __pyx_L0; goto __pyx_L12; } __pyx_L12:; goto __pyx_L11; } /* "pandas/src/inference.pyx":74 * return 'timedelta' * * elif util.is_integer_object(val): # <<<<<<<<<<<<<< * # a timedelta will show true here as well * if is_timedelta(val): */ __pyx_t_2 = (is_integer_object(__pyx_v_val) != 0); if (__pyx_t_2) { /* "pandas/src/inference.pyx":76 * elif util.is_integer_object(val): * # a timedelta will show true here as well * if is_timedelta(val): # <<<<<<<<<<<<<< * if is_timedelta_or_timedelta64_array(values): * return 'timedelta' */ __pyx_t_2 = (__pyx_f_6pandas_3lib_is_timedelta(__pyx_v_val) != 0); if (__pyx_t_2) { /* "pandas/src/inference.pyx":77 * # a timedelta will show true here as well * if is_timedelta(val): * if is_timedelta_or_timedelta64_array(values): # <<<<<<<<<<<<<< * return 'timedelta' * */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_51); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 77; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 77; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(((PyObject *)__pyx_v_values)); PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_v_values)); __Pyx_GIVEREF(((PyObject *)__pyx_v_values)); __pyx_t_5 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 77; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 77; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_2) { /* "pandas/src/inference.pyx":78 * if is_timedelta(val): * if is_timedelta_or_timedelta64_array(values): * return 'timedelta' # <<<<<<<<<<<<<< * * if is_integer_array(values): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_n_s__timedelta)); __pyx_r = ((PyObject *)__pyx_n_s__timedelta); goto __pyx_L0; goto __pyx_L14; } __pyx_L14:; goto __pyx_L13; } __pyx_L13:; /* "pandas/src/inference.pyx":80 * return 'timedelta' * * if is_integer_array(values): # <<<<<<<<<<<<<< * return 'integer' * elif is_integer_float_array(values): */ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s__is_integer_array); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 80; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 80; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(((PyObject *)__pyx_v_values)); PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_v_values)); __Pyx_GIVEREF(((PyObject *)__pyx_v_values)); __pyx_t_3 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 80; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 80; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_2) { /* "pandas/src/inference.pyx":81 * * if is_integer_array(values): * return 'integer' # <<<<<<<<<<<<<< * elif is_integer_float_array(values): * return 'mixed-integer-float' */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_n_s__integer)); __pyx_r = ((PyObject *)__pyx_n_s__integer); goto __pyx_L0; goto __pyx_L15; } /* "pandas/src/inference.pyx":82 * if is_integer_array(values): * return 'integer' * elif is_integer_float_array(values): # <<<<<<<<<<<<<< * return 'mixed-integer-float' * elif is_timedelta_or_timedelta64_array(values): */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_52); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(((PyObject *)__pyx_v_values)); PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_v_values)); __Pyx_GIVEREF(((PyObject *)__pyx_v_values)); __pyx_t_5 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_2) { /* "pandas/src/inference.pyx":83 * return 'integer' * elif is_integer_float_array(values): * return 'mixed-integer-float' # <<<<<<<<<<<<<< * elif is_timedelta_or_timedelta64_array(values): * return 'timedelta' */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_kp_s_53)); __pyx_r = ((PyObject *)__pyx_kp_s_53); goto __pyx_L0; goto __pyx_L15; } /* "pandas/src/inference.pyx":84 * elif is_integer_float_array(values): * return 'mixed-integer-float' * elif is_timedelta_or_timedelta64_array(values): # <<<<<<<<<<<<<< * return 'timedelta' * return 'mixed-integer' */ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_51); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 84; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 84; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(((PyObject *)__pyx_v_values)); PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_v_values)); __Pyx_GIVEREF(((PyObject *)__pyx_v_values)); __pyx_t_3 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 84; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 84; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_2) { /* "pandas/src/inference.pyx":85 * return 'mixed-integer-float' * elif is_timedelta_or_timedelta64_array(values): * return 'timedelta' # <<<<<<<<<<<<<< * return 'mixed-integer' * */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_n_s__timedelta)); __pyx_r = ((PyObject *)__pyx_n_s__timedelta); goto __pyx_L0; goto __pyx_L15; } __pyx_L15:; /* "pandas/src/inference.pyx":86 * elif is_timedelta_or_timedelta64_array(values): * return 'timedelta' * return 'mixed-integer' # <<<<<<<<<<<<<< * * elif is_datetime(val): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_kp_s_54)); __pyx_r = ((PyObject *)__pyx_kp_s_54); goto __pyx_L0; goto __pyx_L11; } /* "pandas/src/inference.pyx":88 * return 'mixed-integer' * * elif is_datetime(val): # <<<<<<<<<<<<<< * if is_datetime_array(values): * return 'datetime' */ __pyx_t_2 = (__pyx_f_6pandas_3lib_is_datetime(__pyx_v_val) != 0); if (__pyx_t_2) { /* "pandas/src/inference.pyx":89 * * elif is_datetime(val): * if is_datetime_array(values): # <<<<<<<<<<<<<< * return 'datetime' * */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s__is_datetime_array); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 89; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 89; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(((PyObject *)__pyx_v_values)); PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_v_values)); __Pyx_GIVEREF(((PyObject *)__pyx_v_values)); __pyx_t_5 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 89; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 89; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_2) { /* "pandas/src/inference.pyx":90 * elif is_datetime(val): * if is_datetime_array(values): * return 'datetime' # <<<<<<<<<<<<<< * * elif is_date(val): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_n_s__datetime)); __pyx_r = ((PyObject *)__pyx_n_s__datetime); goto __pyx_L0; goto __pyx_L16; } __pyx_L16:; goto __pyx_L11; } /* "pandas/src/inference.pyx":92 * return 'datetime' * * elif is_date(val): # <<<<<<<<<<<<<< * if is_date_array(values): * return 'date' */ __pyx_t_2 = (__pyx_f_6pandas_3lib_is_date(__pyx_v_val) != 0); if (__pyx_t_2) { /* "pandas/src/inference.pyx":93 * * elif is_date(val): * if is_date_array(values): # <<<<<<<<<<<<<< * return 'date' * */ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s__is_date_array); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 93; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 93; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(((PyObject *)__pyx_v_values)); PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_v_values)); __Pyx_GIVEREF(((PyObject *)__pyx_v_values)); __pyx_t_3 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 93; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 93; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_2) { /* "pandas/src/inference.pyx":94 * elif is_date(val): * if is_date_array(values): * return 'date' # <<<<<<<<<<<<<< * * elif is_time(val): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_n_s__date)); __pyx_r = ((PyObject *)__pyx_n_s__date); goto __pyx_L0; goto __pyx_L17; } __pyx_L17:; goto __pyx_L11; } /* "pandas/src/inference.pyx":96 * return 'date' * * elif is_time(val): # <<<<<<<<<<<<<< * if is_time_array(values): * return 'time' */ __pyx_t_2 = (__pyx_f_6pandas_3lib_is_time(__pyx_v_val) != 0); if (__pyx_t_2) { /* "pandas/src/inference.pyx":97 * * elif is_time(val): * if is_time_array(values): # <<<<<<<<<<<<<< * return 'time' * */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s__is_time_array); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 97; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 97; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(((PyObject *)__pyx_v_values)); PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_v_values)); __Pyx_GIVEREF(((PyObject *)__pyx_v_values)); __pyx_t_5 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 97; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 97; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_2) { /* "pandas/src/inference.pyx":98 * elif is_time(val): * if is_time_array(values): * return 'time' # <<<<<<<<<<<<<< * * elif util.is_float_object(val): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_n_s__time)); __pyx_r = ((PyObject *)__pyx_n_s__time); goto __pyx_L0; goto __pyx_L18; } __pyx_L18:; goto __pyx_L11; } /* "pandas/src/inference.pyx":100 * return 'time' * * elif util.is_float_object(val): # <<<<<<<<<<<<<< * if is_float_array(values): * return 'floating' */ __pyx_t_2 = (is_float_object(__pyx_v_val) != 0); if (__pyx_t_2) { /* "pandas/src/inference.pyx":101 * * elif util.is_float_object(val): * if is_float_array(values): # <<<<<<<<<<<<<< * return 'floating' * elif is_integer_float_array(values): */ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s__is_float_array); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 101; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 101; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(((PyObject *)__pyx_v_values)); PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_v_values)); __Pyx_GIVEREF(((PyObject *)__pyx_v_values)); __pyx_t_3 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 101; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 101; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_2) { /* "pandas/src/inference.pyx":102 * elif util.is_float_object(val): * if is_float_array(values): * return 'floating' # <<<<<<<<<<<<<< * elif is_integer_float_array(values): * return 'mixed-integer-float' */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_n_s__floating)); __pyx_r = ((PyObject *)__pyx_n_s__floating); goto __pyx_L0; goto __pyx_L19; } /* "pandas/src/inference.pyx":103 * if is_float_array(values): * return 'floating' * elif is_integer_float_array(values): # <<<<<<<<<<<<<< * return 'mixed-integer-float' * */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_52); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(((PyObject *)__pyx_v_values)); PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_v_values)); __Pyx_GIVEREF(((PyObject *)__pyx_v_values)); __pyx_t_5 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_2) { /* "pandas/src/inference.pyx":104 * return 'floating' * elif is_integer_float_array(values): * return 'mixed-integer-float' # <<<<<<<<<<<<<< * * elif util.is_bool_object(val): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_kp_s_53)); __pyx_r = ((PyObject *)__pyx_kp_s_53); goto __pyx_L0; goto __pyx_L19; } __pyx_L19:; goto __pyx_L11; } /* "pandas/src/inference.pyx":106 * return 'mixed-integer-float' * * elif util.is_bool_object(val): # <<<<<<<<<<<<<< * if is_bool_array(values): * return 'boolean' */ __pyx_t_2 = (is_bool_object(__pyx_v_val) != 0); if (__pyx_t_2) { /* "pandas/src/inference.pyx":107 * * elif util.is_bool_object(val): * if is_bool_array(values): # <<<<<<<<<<<<<< * return 'boolean' * */ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s__is_bool_array); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(((PyObject *)__pyx_v_values)); PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_v_values)); __Pyx_GIVEREF(((PyObject *)__pyx_v_values)); __pyx_t_3 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_2) { /* "pandas/src/inference.pyx":108 * elif util.is_bool_object(val): * if is_bool_array(values): * return 'boolean' # <<<<<<<<<<<<<< * * elif PyString_Check(val): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_n_s__boolean)); __pyx_r = ((PyObject *)__pyx_n_s__boolean); goto __pyx_L0; goto __pyx_L20; } __pyx_L20:; goto __pyx_L11; } /* "pandas/src/inference.pyx":110 * return 'boolean' * * elif PyString_Check(val): # <<<<<<<<<<<<<< * if is_string_array(values): * return 'string' */ __pyx_t_2 = (PyString_Check(__pyx_v_val) != 0); if (__pyx_t_2) { /* "pandas/src/inference.pyx":111 * * elif PyString_Check(val): * if is_string_array(values): # <<<<<<<<<<<<<< * return 'string' * */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s__is_string_array); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 111; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 111; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(((PyObject *)__pyx_v_values)); PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_v_values)); __Pyx_GIVEREF(((PyObject *)__pyx_v_values)); __pyx_t_5 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 111; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 111; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_2) { /* "pandas/src/inference.pyx":112 * elif PyString_Check(val): * if is_string_array(values): * return 'string' # <<<<<<<<<<<<<< * * elif PyUnicode_Check(val): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_n_s__string)); __pyx_r = ((PyObject *)__pyx_n_s__string); goto __pyx_L0; goto __pyx_L21; } __pyx_L21:; goto __pyx_L11; } /* "pandas/src/inference.pyx":114 * return 'string' * * elif PyUnicode_Check(val): # <<<<<<<<<<<<<< * if is_unicode_array(values): * return 'unicode' */ __pyx_t_2 = (PyUnicode_Check(__pyx_v_val) != 0); if (__pyx_t_2) { /* "pandas/src/inference.pyx":115 * * elif PyUnicode_Check(val): * if is_unicode_array(values): # <<<<<<<<<<<<<< * return 'unicode' * */ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s__is_unicode_array); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 115; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 115; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(((PyObject *)__pyx_v_values)); PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_v_values)); __Pyx_GIVEREF(((PyObject *)__pyx_v_values)); __pyx_t_3 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 115; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 115; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_2) { /* "pandas/src/inference.pyx":116 * elif PyUnicode_Check(val): * if is_unicode_array(values): * return 'unicode' # <<<<<<<<<<<<<< * * elif is_timedelta(val): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_n_s__unicode)); __pyx_r = ((PyObject *)__pyx_n_s__unicode); goto __pyx_L0; goto __pyx_L22; } __pyx_L22:; goto __pyx_L11; } /* "pandas/src/inference.pyx":118 * return 'unicode' * * elif is_timedelta(val): # <<<<<<<<<<<<<< * if is_timedelta_or_timedelta64_array(values): * return 'timedelta' */ __pyx_t_2 = (__pyx_f_6pandas_3lib_is_timedelta(__pyx_v_val) != 0); if (__pyx_t_2) { /* "pandas/src/inference.pyx":119 * * elif is_timedelta(val): * if is_timedelta_or_timedelta64_array(values): # <<<<<<<<<<<<<< * return 'timedelta' * */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_51); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 119; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 119; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(((PyObject *)__pyx_v_values)); PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_v_values)); __Pyx_GIVEREF(((PyObject *)__pyx_v_values)); __pyx_t_5 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 119; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 119; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_2) { /* "pandas/src/inference.pyx":120 * elif is_timedelta(val): * if is_timedelta_or_timedelta64_array(values): * return 'timedelta' # <<<<<<<<<<<<<< * * elif is_period(val): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_n_s__timedelta)); __pyx_r = ((PyObject *)__pyx_n_s__timedelta); goto __pyx_L0; goto __pyx_L23; } __pyx_L23:; goto __pyx_L11; } /* "pandas/src/inference.pyx":122 * return 'timedelta' * * elif is_period(val): # <<<<<<<<<<<<<< * if is_period_array(values): * return 'period' */ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s__is_period); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 122; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 122; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_v_val); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_val); __Pyx_GIVEREF(__pyx_v_val); __pyx_t_3 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 122; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 122; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_2) { /* "pandas/src/inference.pyx":123 * * elif is_period(val): * if is_period_array(values): # <<<<<<<<<<<<<< * return 'period' * */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s__is_period_array); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 123; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 123; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(((PyObject *)__pyx_v_values)); PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_v_values)); __Pyx_GIVEREF(((PyObject *)__pyx_v_values)); __pyx_t_5 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 123; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 123; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_2) { /* "pandas/src/inference.pyx":124 * elif is_period(val): * if is_period_array(values): * return 'period' # <<<<<<<<<<<<<< * * for i in range(n): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_n_s__period)); __pyx_r = ((PyObject *)__pyx_n_s__period); goto __pyx_L0; goto __pyx_L24; } __pyx_L24:; goto __pyx_L11; } __pyx_L11:; /* "pandas/src/inference.pyx":126 * return 'period' * * for i in range(n): # <<<<<<<<<<<<<< * val = util.get_value_1d(values, i) * if util.is_integer_object(val): */ __pyx_t_6 = __pyx_v_n; for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_6; __pyx_t_7+=1) { __pyx_v_i = __pyx_t_7; /* "pandas/src/inference.pyx":127 * * for i in range(n): * val = util.get_value_1d(values, i) # <<<<<<<<<<<<<< * if util.is_integer_object(val): * return 'mixed-integer' */ __pyx_t_5 = get_value_1d(__pyx_v_values, __pyx_v_i); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 127; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF_SET(__pyx_v_val, __pyx_t_5); __pyx_t_5 = 0; /* "pandas/src/inference.pyx":128 * for i in range(n): * val = util.get_value_1d(values, i) * if util.is_integer_object(val): # <<<<<<<<<<<<<< * return 'mixed-integer' * */ __pyx_t_2 = (is_integer_object(__pyx_v_val) != 0); if (__pyx_t_2) { /* "pandas/src/inference.pyx":129 * val = util.get_value_1d(values, i) * if util.is_integer_object(val): * return 'mixed-integer' # <<<<<<<<<<<<<< * * return 'mixed' */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_kp_s_54)); __pyx_r = ((PyObject *)__pyx_kp_s_54); goto __pyx_L0; goto __pyx_L27; } __pyx_L27:; } /* "pandas/src/inference.pyx":131 * return 'mixed-integer' * * return 'mixed' # <<<<<<<<<<<<<< * * def infer_dtype_list(list values): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_n_s__mixed)); __pyx_r = ((PyObject *)__pyx_n_s__mixed); goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("pandas.lib.infer_dtype", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_val); __Pyx_XDECREF((PyObject *)__pyx_v_values); __Pyx_XDECREF(__pyx_v_val_kind); __Pyx_XDECREF(__pyx_v__values); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_3lib_107infer_dtype_list(PyObject *__pyx_self, PyObject *__pyx_v_values); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_3lib_107infer_dtype_list = {__Pyx_NAMESTR("infer_dtype_list"), (PyCFunction)__pyx_pw_6pandas_3lib_107infer_dtype_list, METH_O, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_3lib_107infer_dtype_list(PyObject *__pyx_self, PyObject *__pyx_v_values) { CYTHON_UNUSED int __pyx_lineno = 0; CYTHON_UNUSED const char *__pyx_filename = NULL; CYTHON_UNUSED int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("infer_dtype_list (wrapper)", 0); if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), (&PyList_Type), 1, "values", 1))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 133; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_3lib_106infer_dtype_list(__pyx_self, ((PyObject*)__pyx_v_values)); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/inference.pyx":133 * return 'mixed' * * def infer_dtype_list(list values): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = len(values) */ static PyObject *__pyx_pf_6pandas_3lib_106infer_dtype_list(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_values) { CYTHON_UNUSED Py_ssize_t __pyx_v_n; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("infer_dtype_list", 0); /* "pandas/src/inference.pyx":135 * def infer_dtype_list(list values): * cdef: * Py_ssize_t i, n = len(values) # <<<<<<<<<<<<<< * pass * */ if (unlikely(((PyObject *)__pyx_v_values) == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 135; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_1 = PyList_GET_SIZE(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 135; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("pandas.lib.infer_dtype_list", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/inference.pyx":139 * * * cdef inline bint is_null_datetimelike(v): # <<<<<<<<<<<<<< * return util._checknull(v) or (util.is_integer_object(v) and v == iNaT) or v is NaT * */ static CYTHON_INLINE int __pyx_f_6pandas_3lib_is_null_datetimelike(PyObject *__pyx_v_v) { int __pyx_r; __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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("is_null_datetimelike", 0); /* "pandas/src/inference.pyx":140 * * cdef inline bint is_null_datetimelike(v): * return util._checknull(v) or (util.is_integer_object(v) and v == iNaT) or v is NaT # <<<<<<<<<<<<<< * * cdef inline bint is_datetime(object o): */ __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_f_4util__checknull(__pyx_v_v)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 140; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 140; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (!__pyx_t_2) { __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_3 = PyInt_FromLong(is_integer_object(__pyx_v_v)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 140; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 140; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__pyx_t_2) { __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s__iNaT); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 140; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = PyObject_RichCompare(__pyx_v_v, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 140; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __pyx_t_5; __pyx_t_5 = 0; } else { __pyx_t_4 = __pyx_t_3; __pyx_t_3 = 0; } __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 140; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (!__pyx_t_2) { __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s__NaT); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 140; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = (__pyx_v_v == __pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 140; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = __pyx_t_3; __pyx_t_3 = 0; } else { __pyx_t_5 = __pyx_t_4; __pyx_t_4 = 0; } __pyx_t_4 = __pyx_t_5; __pyx_t_5 = 0; } else { __pyx_t_4 = __pyx_t_1; __pyx_t_1 = 0; } __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 140; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_r = __pyx_t_2; goto __pyx_L0; __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_WriteUnraisable("pandas.lib.is_null_datetimelike", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/inference.pyx":142 * return util._checknull(v) or (util.is_integer_object(v) and v == iNaT) or v is NaT * * cdef inline bint is_datetime(object o): # <<<<<<<<<<<<<< * return PyDateTime_Check(o) * */ static CYTHON_INLINE int __pyx_f_6pandas_3lib_is_datetime(PyObject *__pyx_v_o) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("is_datetime", 0); /* "pandas/src/inference.pyx":143 * * cdef inline bint is_datetime(object o): * return PyDateTime_Check(o) # <<<<<<<<<<<<<< * * cdef inline bint is_date(object o): */ __pyx_r = PyDateTime_Check(__pyx_v_o); goto __pyx_L0; __pyx_r = 0; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/inference.pyx":145 * return PyDateTime_Check(o) * * cdef inline bint is_date(object o): # <<<<<<<<<<<<<< * return PyDate_Check(o) * */ static CYTHON_INLINE int __pyx_f_6pandas_3lib_is_date(PyObject *__pyx_v_o) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("is_date", 0); /* "pandas/src/inference.pyx":146 * * cdef inline bint is_date(object o): * return PyDate_Check(o) # <<<<<<<<<<<<<< * * cdef inline bint is_time(object o): */ __pyx_r = PyDate_Check(__pyx_v_o); goto __pyx_L0; __pyx_r = 0; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/inference.pyx":148 * return PyDate_Check(o) * * cdef inline bint is_time(object o): # <<<<<<<<<<<<<< * return PyTime_Check(o) * */ static CYTHON_INLINE int __pyx_f_6pandas_3lib_is_time(PyObject *__pyx_v_o) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("is_time", 0); /* "pandas/src/inference.pyx":149 * * cdef inline bint is_time(object o): * return PyTime_Check(o) # <<<<<<<<<<<<<< * * cdef inline bint is_timedelta(object o): */ __pyx_r = PyTime_Check(__pyx_v_o); goto __pyx_L0; __pyx_r = 0; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/inference.pyx":151 * return PyTime_Check(o) * * cdef inline bint is_timedelta(object o): # <<<<<<<<<<<<<< * return PyDelta_Check(o) or util.is_timedelta64_object(o) * */ static CYTHON_INLINE int __pyx_f_6pandas_3lib_is_timedelta(PyObject *__pyx_v_o) { int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("is_timedelta", 0); /* "pandas/src/inference.pyx":152 * * cdef inline bint is_timedelta(object o): * return PyDelta_Check(o) or util.is_timedelta64_object(o) # <<<<<<<<<<<<<< * * def is_bool_array(ndarray values): */ __pyx_t_1 = __Pyx_PyBool_FromLong(PyDelta_Check(__pyx_v_o)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 152; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 152; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (!__pyx_t_2) { __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_3 = PyInt_FromLong(is_timedelta64_object(__pyx_v_o)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 152; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __pyx_t_3; __pyx_t_3 = 0; } else { __pyx_t_4 = __pyx_t_1; __pyx_t_1 = 0; } __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 152; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_r = __pyx_t_2; goto __pyx_L0; __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_WriteUnraisable("pandas.lib.is_timedelta", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_3lib_109is_bool_array(PyObject *__pyx_self, PyObject *__pyx_v_values); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_3lib_109is_bool_array = {__Pyx_NAMESTR("is_bool_array"), (PyCFunction)__pyx_pw_6pandas_3lib_109is_bool_array, METH_O, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_3lib_109is_bool_array(PyObject *__pyx_self, PyObject *__pyx_v_values) { CYTHON_UNUSED int __pyx_lineno = 0; CYTHON_UNUSED const char *__pyx_filename = NULL; CYTHON_UNUSED int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("is_bool_array (wrapper)", 0); if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 154; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_3lib_108is_bool_array(__pyx_self, ((PyArrayObject *)__pyx_v_values)); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/inference.pyx":154 * return PyDelta_Check(o) or util.is_timedelta64_object(o) * * def is_bool_array(ndarray values): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = len(values) */ static PyObject *__pyx_pf_6pandas_3lib_108is_bool_array(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_n; PyArrayObject *__pyx_v_objbuf = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_objbuf; __Pyx_Buffer __pyx_pybuffer_objbuf; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; int __pyx_t_5; 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("is_bool_array", 0); __pyx_pybuffer_objbuf.pybuffer.buf = NULL; __pyx_pybuffer_objbuf.refcount = 0; __pyx_pybuffernd_objbuf.data = NULL; __pyx_pybuffernd_objbuf.rcbuffer = &__pyx_pybuffer_objbuf; /* "pandas/src/inference.pyx":156 * def is_bool_array(ndarray values): * cdef: * Py_ssize_t i, n = len(values) # <<<<<<<<<<<<<< * ndarray[object] objbuf * object obj */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 156; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/src/inference.pyx":160 * object obj * * if issubclass(values.dtype.type, np.bool_): # <<<<<<<<<<<<<< * return True * elif values.dtype == np.object_: */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_values), __pyx_n_s__dtype); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 160; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__type); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 160; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 160; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__bool_); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 160; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_5 = PyObject_IsSubclass(__pyx_t_3, __pyx_t_4); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 160; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_6 = (__pyx_t_5 != 0); if (__pyx_t_6) { /* "pandas/src/inference.pyx":161 * * if issubclass(values.dtype.type, np.bool_): * return True # <<<<<<<<<<<<<< * elif values.dtype == np.object_: * objbuf = values */ __Pyx_XDECREF(__pyx_r); __pyx_t_4 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 161; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; goto __pyx_L3; } /* "pandas/src/inference.pyx":162 * if issubclass(values.dtype.type, np.bool_): * return True * elif values.dtype == np.object_: # <<<<<<<<<<<<<< * objbuf = values * */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_values), __pyx_n_s__dtype); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 162; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 162; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s__object_); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 162; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyObject_RichCompare(__pyx_t_4, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 162; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 162; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_6) { /* "pandas/src/inference.pyx":163 * return True * elif values.dtype == np.object_: * objbuf = values # <<<<<<<<<<<<<< * * if n == 0: */ { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_objbuf.rcbuffer->pybuffer); __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_objbuf.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_v_values), &__Pyx_TypeInfo_object, 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_objbuf.rcbuffer->pybuffer, (PyObject*)__pyx_v_objbuf, &__Pyx_TypeInfo_object, 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_pybuffernd_objbuf.diminfo[0].strides = __pyx_pybuffernd_objbuf.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_objbuf.diminfo[0].shape = __pyx_pybuffernd_objbuf.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 163; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __Pyx_INCREF(((PyObject *)__pyx_v_values)); __pyx_v_objbuf = ((PyArrayObject *)__pyx_v_values); /* "pandas/src/inference.pyx":165 * objbuf = values * * if n == 0: # <<<<<<<<<<<<<< * return False * */ __pyx_t_6 = ((__pyx_v_n == 0) != 0); if (__pyx_t_6) { /* "pandas/src/inference.pyx":166 * * if n == 0: * return False # <<<<<<<<<<<<<< * * for i in range(n): */ __Pyx_XDECREF(__pyx_r); __pyx_t_3 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 166; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; goto __pyx_L4; } __pyx_L4:; /* "pandas/src/inference.pyx":168 * return False * * for i in range(n): # <<<<<<<<<<<<<< * if not util.is_bool_object(objbuf[i]): * return False */ __pyx_t_1 = __pyx_v_n; for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_1; __pyx_t_11+=1) { __pyx_v_i = __pyx_t_11; /* "pandas/src/inference.pyx":169 * * for i in range(n): * if not util.is_bool_object(objbuf[i]): # <<<<<<<<<<<<<< * return False * return True */ __pyx_t_12 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_12 < 0) { __pyx_t_12 += __pyx_pybuffernd_objbuf.diminfo[0].shape; if (unlikely(__pyx_t_12 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_12 >= __pyx_pybuffernd_objbuf.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 169; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_3 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_objbuf.rcbuffer->pybuffer.buf, __pyx_t_12, __pyx_pybuffernd_objbuf.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_3); __pyx_t_6 = ((!(is_bool_object(__pyx_t_3) != 0)) != 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_6) { /* "pandas/src/inference.pyx":170 * for i in range(n): * if not util.is_bool_object(objbuf[i]): * return False # <<<<<<<<<<<<<< * return True * else: */ __Pyx_XDECREF(__pyx_r); __pyx_t_3 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 170; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; goto __pyx_L7; } __pyx_L7:; } /* "pandas/src/inference.pyx":171 * if not util.is_bool_object(objbuf[i]): * return False * return True # <<<<<<<<<<<<<< * else: * return False */ __Pyx_XDECREF(__pyx_r); __pyx_t_3 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 171; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; goto __pyx_L3; } /*else*/ { /* "pandas/src/inference.pyx":173 * return True * else: * return False # <<<<<<<<<<<<<< * * def is_integer(object o): */ __Pyx_XDECREF(__pyx_r); __pyx_t_3 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 173; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; } __pyx_L3:; __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); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_objbuf.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.lib.is_bool_array", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_objbuf.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_objbuf); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_3lib_111is_integer(PyObject *__pyx_self, PyObject *__pyx_v_o); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_3lib_111is_integer = {__Pyx_NAMESTR("is_integer"), (PyCFunction)__pyx_pw_6pandas_3lib_111is_integer, METH_O, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_3lib_111is_integer(PyObject *__pyx_self, PyObject *__pyx_v_o) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("is_integer (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_3lib_110is_integer(__pyx_self, ((PyObject *)__pyx_v_o)); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/inference.pyx":175 * return False * * def is_integer(object o): # <<<<<<<<<<<<<< * return util.is_integer_object(o) * */ static PyObject *__pyx_pf_6pandas_3lib_110is_integer(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_o) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("is_integer", 0); /* "pandas/src/inference.pyx":176 * * def is_integer(object o): * return util.is_integer_object(o) # <<<<<<<<<<<<<< * * def is_integer_array(ndarray values): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyInt_FromLong(is_integer_object(__pyx_v_o)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 176; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas.lib.is_integer", __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_3lib_113is_integer_array(PyObject *__pyx_self, PyObject *__pyx_v_values); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_3lib_113is_integer_array = {__Pyx_NAMESTR("is_integer_array"), (PyCFunction)__pyx_pw_6pandas_3lib_113is_integer_array, METH_O, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_3lib_113is_integer_array(PyObject *__pyx_self, PyObject *__pyx_v_values) { CYTHON_UNUSED int __pyx_lineno = 0; CYTHON_UNUSED const char *__pyx_filename = NULL; CYTHON_UNUSED int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("is_integer_array (wrapper)", 0); if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 178; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_3lib_112is_integer_array(__pyx_self, ((PyArrayObject *)__pyx_v_values)); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/inference.pyx":178 * return util.is_integer_object(o) * * def is_integer_array(ndarray values): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = len(values) */ static PyObject *__pyx_pf_6pandas_3lib_112is_integer_array(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_n; PyArrayObject *__pyx_v_objbuf = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_objbuf; __Pyx_Buffer __pyx_pybuffer_objbuf; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; int __pyx_t_5; 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("is_integer_array", 0); __pyx_pybuffer_objbuf.pybuffer.buf = NULL; __pyx_pybuffer_objbuf.refcount = 0; __pyx_pybuffernd_objbuf.data = NULL; __pyx_pybuffernd_objbuf.rcbuffer = &__pyx_pybuffer_objbuf; /* "pandas/src/inference.pyx":180 * def is_integer_array(ndarray values): * cdef: * Py_ssize_t i, n = len(values) # <<<<<<<<<<<<<< * ndarray[object] objbuf * object obj */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/src/inference.pyx":184 * object obj * * if issubclass(values.dtype.type, np.integer): # <<<<<<<<<<<<<< * return True * elif values.dtype == np.object_: */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_values), __pyx_n_s__dtype); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 184; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__type); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 184; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 184; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__integer); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 184; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_5 = PyObject_IsSubclass(__pyx_t_3, __pyx_t_4); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 184; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_6 = (__pyx_t_5 != 0); if (__pyx_t_6) { /* "pandas/src/inference.pyx":185 * * if issubclass(values.dtype.type, np.integer): * return True # <<<<<<<<<<<<<< * elif values.dtype == np.object_: * objbuf = values */ __Pyx_XDECREF(__pyx_r); __pyx_t_4 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 185; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; goto __pyx_L3; } /* "pandas/src/inference.pyx":186 * if issubclass(values.dtype.type, np.integer): * return True * elif values.dtype == np.object_: # <<<<<<<<<<<<<< * objbuf = values * */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_values), __pyx_n_s__dtype); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 186; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 186; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s__object_); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 186; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyObject_RichCompare(__pyx_t_4, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 186; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 186; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_6) { /* "pandas/src/inference.pyx":187 * return True * elif values.dtype == np.object_: * objbuf = values # <<<<<<<<<<<<<< * * if n == 0: */ { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_objbuf.rcbuffer->pybuffer); __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_objbuf.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_v_values), &__Pyx_TypeInfo_object, 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_objbuf.rcbuffer->pybuffer, (PyObject*)__pyx_v_objbuf, &__Pyx_TypeInfo_object, 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_pybuffernd_objbuf.diminfo[0].strides = __pyx_pybuffernd_objbuf.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_objbuf.diminfo[0].shape = __pyx_pybuffernd_objbuf.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 187; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __Pyx_INCREF(((PyObject *)__pyx_v_values)); __pyx_v_objbuf = ((PyArrayObject *)__pyx_v_values); /* "pandas/src/inference.pyx":189 * objbuf = values * * if n == 0: # <<<<<<<<<<<<<< * return False * */ __pyx_t_6 = ((__pyx_v_n == 0) != 0); if (__pyx_t_6) { /* "pandas/src/inference.pyx":190 * * if n == 0: * return False # <<<<<<<<<<<<<< * * for i in range(n): */ __Pyx_XDECREF(__pyx_r); __pyx_t_3 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 190; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; goto __pyx_L4; } __pyx_L4:; /* "pandas/src/inference.pyx":192 * return False * * for i in range(n): # <<<<<<<<<<<<<< * if not util.is_integer_object(objbuf[i]): * return False */ __pyx_t_1 = __pyx_v_n; for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_1; __pyx_t_11+=1) { __pyx_v_i = __pyx_t_11; /* "pandas/src/inference.pyx":193 * * for i in range(n): * if not util.is_integer_object(objbuf[i]): # <<<<<<<<<<<<<< * return False * return True */ __pyx_t_12 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_12 < 0) { __pyx_t_12 += __pyx_pybuffernd_objbuf.diminfo[0].shape; if (unlikely(__pyx_t_12 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_12 >= __pyx_pybuffernd_objbuf.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 193; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_3 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_objbuf.rcbuffer->pybuffer.buf, __pyx_t_12, __pyx_pybuffernd_objbuf.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_3); __pyx_t_6 = ((!(is_integer_object(__pyx_t_3) != 0)) != 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_6) { /* "pandas/src/inference.pyx":194 * for i in range(n): * if not util.is_integer_object(objbuf[i]): * return False # <<<<<<<<<<<<<< * return True * else: */ __Pyx_XDECREF(__pyx_r); __pyx_t_3 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 194; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; goto __pyx_L7; } __pyx_L7:; } /* "pandas/src/inference.pyx":195 * if not util.is_integer_object(objbuf[i]): * return False * return True # <<<<<<<<<<<<<< * else: * return False */ __Pyx_XDECREF(__pyx_r); __pyx_t_3 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 195; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; goto __pyx_L3; } /*else*/ { /* "pandas/src/inference.pyx":197 * return True * else: * return False # <<<<<<<<<<<<<< * * def is_integer_float_array(ndarray values): */ __Pyx_XDECREF(__pyx_r); __pyx_t_3 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 197; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; } __pyx_L3:; __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); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_objbuf.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.lib.is_integer_array", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_objbuf.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_objbuf); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_3lib_115is_integer_float_array(PyObject *__pyx_self, PyObject *__pyx_v_values); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_3lib_115is_integer_float_array = {__Pyx_NAMESTR("is_integer_float_array"), (PyCFunction)__pyx_pw_6pandas_3lib_115is_integer_float_array, METH_O, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_3lib_115is_integer_float_array(PyObject *__pyx_self, PyObject *__pyx_v_values) { CYTHON_UNUSED int __pyx_lineno = 0; CYTHON_UNUSED const char *__pyx_filename = NULL; CYTHON_UNUSED int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("is_integer_float_array (wrapper)", 0); if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 199; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_3lib_114is_integer_float_array(__pyx_self, ((PyArrayObject *)__pyx_v_values)); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/inference.pyx":199 * return False * * def is_integer_float_array(ndarray values): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = len(values) */ static PyObject *__pyx_pf_6pandas_3lib_114is_integer_float_array(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_n; PyArrayObject *__pyx_v_objbuf = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_objbuf; __Pyx_Buffer __pyx_pybuffer_objbuf; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; int __pyx_t_5; 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; int __pyx_t_14; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("is_integer_float_array", 0); __pyx_pybuffer_objbuf.pybuffer.buf = NULL; __pyx_pybuffer_objbuf.refcount = 0; __pyx_pybuffernd_objbuf.data = NULL; __pyx_pybuffernd_objbuf.rcbuffer = &__pyx_pybuffer_objbuf; /* "pandas/src/inference.pyx":201 * def is_integer_float_array(ndarray values): * cdef: * Py_ssize_t i, n = len(values) # <<<<<<<<<<<<<< * ndarray[object] objbuf * object obj */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 201; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/src/inference.pyx":205 * object obj * * if issubclass(values.dtype.type, np.integer): # <<<<<<<<<<<<<< * return True * elif values.dtype == np.object_: */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_values), __pyx_n_s__dtype); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 205; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__type); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 205; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 205; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__integer); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 205; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_5 = PyObject_IsSubclass(__pyx_t_3, __pyx_t_4); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 205; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_6 = (__pyx_t_5 != 0); if (__pyx_t_6) { /* "pandas/src/inference.pyx":206 * * if issubclass(values.dtype.type, np.integer): * return True # <<<<<<<<<<<<<< * elif values.dtype == np.object_: * objbuf = values */ __Pyx_XDECREF(__pyx_r); __pyx_t_4 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 206; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; goto __pyx_L3; } /* "pandas/src/inference.pyx":207 * if issubclass(values.dtype.type, np.integer): * return True * elif values.dtype == np.object_: # <<<<<<<<<<<<<< * objbuf = values * */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_values), __pyx_n_s__dtype); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 207; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 207; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s__object_); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 207; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyObject_RichCompare(__pyx_t_4, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 207; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 207; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_6) { /* "pandas/src/inference.pyx":208 * return True * elif values.dtype == np.object_: * objbuf = values # <<<<<<<<<<<<<< * * if n == 0: */ { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_objbuf.rcbuffer->pybuffer); __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_objbuf.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_v_values), &__Pyx_TypeInfo_object, 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_objbuf.rcbuffer->pybuffer, (PyObject*)__pyx_v_objbuf, &__Pyx_TypeInfo_object, 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_pybuffernd_objbuf.diminfo[0].strides = __pyx_pybuffernd_objbuf.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_objbuf.diminfo[0].shape = __pyx_pybuffernd_objbuf.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 208; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __Pyx_INCREF(((PyObject *)__pyx_v_values)); __pyx_v_objbuf = ((PyArrayObject *)__pyx_v_values); /* "pandas/src/inference.pyx":210 * objbuf = values * * if n == 0: # <<<<<<<<<<<<<< * return False * */ __pyx_t_6 = ((__pyx_v_n == 0) != 0); if (__pyx_t_6) { /* "pandas/src/inference.pyx":211 * * if n == 0: * return False # <<<<<<<<<<<<<< * * for i in range(n): */ __Pyx_XDECREF(__pyx_r); __pyx_t_3 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 211; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; goto __pyx_L4; } __pyx_L4:; /* "pandas/src/inference.pyx":213 * return False * * for i in range(n): # <<<<<<<<<<<<<< * if not (util.is_integer_object(objbuf[i]) or * util.is_float_object(objbuf[i])): */ __pyx_t_1 = __pyx_v_n; for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_1; __pyx_t_11+=1) { __pyx_v_i = __pyx_t_11; /* "pandas/src/inference.pyx":214 * * for i in range(n): * if not (util.is_integer_object(objbuf[i]) or # <<<<<<<<<<<<<< * util.is_float_object(objbuf[i])): * */ __pyx_t_12 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_12 < 0) { __pyx_t_12 += __pyx_pybuffernd_objbuf.diminfo[0].shape; if (unlikely(__pyx_t_12 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_12 >= __pyx_pybuffernd_objbuf.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 214; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_3 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_objbuf.rcbuffer->pybuffer.buf, __pyx_t_12, __pyx_pybuffernd_objbuf.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_3); __pyx_t_6 = (is_integer_object(__pyx_t_3) != 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (!__pyx_t_6) { /* "pandas/src/inference.pyx":215 * for i in range(n): * if not (util.is_integer_object(objbuf[i]) or * util.is_float_object(objbuf[i])): # <<<<<<<<<<<<<< * * return False */ __pyx_t_13 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_13 < 0) { __pyx_t_13 += __pyx_pybuffernd_objbuf.diminfo[0].shape; if (unlikely(__pyx_t_13 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_13 >= __pyx_pybuffernd_objbuf.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 215; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_3 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_objbuf.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_objbuf.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_3); __pyx_t_5 = (is_float_object(__pyx_t_3) != 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_14 = __pyx_t_5; } else { __pyx_t_14 = __pyx_t_6; } __pyx_t_6 = ((!__pyx_t_14) != 0); if (__pyx_t_6) { /* "pandas/src/inference.pyx":217 * util.is_float_object(objbuf[i])): * * return False # <<<<<<<<<<<<<< * return True * else: */ __Pyx_XDECREF(__pyx_r); __pyx_t_3 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 217; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; goto __pyx_L7; } __pyx_L7:; } /* "pandas/src/inference.pyx":218 * * return False * return True # <<<<<<<<<<<<<< * else: * return False */ __Pyx_XDECREF(__pyx_r); __pyx_t_3 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 218; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; goto __pyx_L3; } /*else*/ { /* "pandas/src/inference.pyx":220 * return True * else: * return False # <<<<<<<<<<<<<< * * def is_float_array(ndarray values): */ __Pyx_XDECREF(__pyx_r); __pyx_t_3 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 220; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; } __pyx_L3:; __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); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_objbuf.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.lib.is_integer_float_array", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_objbuf.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_objbuf); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_3lib_117is_float_array(PyObject *__pyx_self, PyObject *__pyx_v_values); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_3lib_117is_float_array = {__Pyx_NAMESTR("is_float_array"), (PyCFunction)__pyx_pw_6pandas_3lib_117is_float_array, METH_O, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_3lib_117is_float_array(PyObject *__pyx_self, PyObject *__pyx_v_values) { CYTHON_UNUSED int __pyx_lineno = 0; CYTHON_UNUSED const char *__pyx_filename = NULL; CYTHON_UNUSED int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("is_float_array (wrapper)", 0); if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 222; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_3lib_116is_float_array(__pyx_self, ((PyArrayObject *)__pyx_v_values)); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/inference.pyx":222 * return False * * def is_float_array(ndarray values): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = len(values) */ static PyObject *__pyx_pf_6pandas_3lib_116is_float_array(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_n; PyArrayObject *__pyx_v_objbuf = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_objbuf; __Pyx_Buffer __pyx_pybuffer_objbuf; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; int __pyx_t_5; 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("is_float_array", 0); __pyx_pybuffer_objbuf.pybuffer.buf = NULL; __pyx_pybuffer_objbuf.refcount = 0; __pyx_pybuffernd_objbuf.data = NULL; __pyx_pybuffernd_objbuf.rcbuffer = &__pyx_pybuffer_objbuf; /* "pandas/src/inference.pyx":224 * def is_float_array(ndarray values): * cdef: * Py_ssize_t i, n = len(values) # <<<<<<<<<<<<<< * ndarray[object] objbuf * object obj */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 224; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/src/inference.pyx":228 * object obj * * if issubclass(values.dtype.type, np.floating): # <<<<<<<<<<<<<< * return True * elif values.dtype == np.object_: */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_values), __pyx_n_s__dtype); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 228; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__type); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 228; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 228; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__floating); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 228; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_5 = PyObject_IsSubclass(__pyx_t_3, __pyx_t_4); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 228; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_6 = (__pyx_t_5 != 0); if (__pyx_t_6) { /* "pandas/src/inference.pyx":229 * * if issubclass(values.dtype.type, np.floating): * return True # <<<<<<<<<<<<<< * elif values.dtype == np.object_: * objbuf = values */ __Pyx_XDECREF(__pyx_r); __pyx_t_4 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 229; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; goto __pyx_L3; } /* "pandas/src/inference.pyx":230 * if issubclass(values.dtype.type, np.floating): * return True * elif values.dtype == np.object_: # <<<<<<<<<<<<<< * objbuf = values * */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_values), __pyx_n_s__dtype); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 230; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 230; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s__object_); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 230; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyObject_RichCompare(__pyx_t_4, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 230; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 230; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_6) { /* "pandas/src/inference.pyx":231 * return True * elif values.dtype == np.object_: * objbuf = values # <<<<<<<<<<<<<< * * if n == 0: */ { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_objbuf.rcbuffer->pybuffer); __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_objbuf.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_v_values), &__Pyx_TypeInfo_object, 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_objbuf.rcbuffer->pybuffer, (PyObject*)__pyx_v_objbuf, &__Pyx_TypeInfo_object, 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_pybuffernd_objbuf.diminfo[0].strides = __pyx_pybuffernd_objbuf.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_objbuf.diminfo[0].shape = __pyx_pybuffernd_objbuf.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 231; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __Pyx_INCREF(((PyObject *)__pyx_v_values)); __pyx_v_objbuf = ((PyArrayObject *)__pyx_v_values); /* "pandas/src/inference.pyx":233 * objbuf = values * * if n == 0: # <<<<<<<<<<<<<< * return False * */ __pyx_t_6 = ((__pyx_v_n == 0) != 0); if (__pyx_t_6) { /* "pandas/src/inference.pyx":234 * * if n == 0: * return False # <<<<<<<<<<<<<< * * for i in range(n): */ __Pyx_XDECREF(__pyx_r); __pyx_t_3 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 234; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; goto __pyx_L4; } __pyx_L4:; /* "pandas/src/inference.pyx":236 * return False * * for i in range(n): # <<<<<<<<<<<<<< * if not util.is_float_object(objbuf[i]): * return False */ __pyx_t_1 = __pyx_v_n; for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_1; __pyx_t_11+=1) { __pyx_v_i = __pyx_t_11; /* "pandas/src/inference.pyx":237 * * for i in range(n): * if not util.is_float_object(objbuf[i]): # <<<<<<<<<<<<<< * return False * return True */ __pyx_t_12 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_12 < 0) { __pyx_t_12 += __pyx_pybuffernd_objbuf.diminfo[0].shape; if (unlikely(__pyx_t_12 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_12 >= __pyx_pybuffernd_objbuf.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 237; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_3 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_objbuf.rcbuffer->pybuffer.buf, __pyx_t_12, __pyx_pybuffernd_objbuf.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_3); __pyx_t_6 = ((!(is_float_object(__pyx_t_3) != 0)) != 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_6) { /* "pandas/src/inference.pyx":238 * for i in range(n): * if not util.is_float_object(objbuf[i]): * return False # <<<<<<<<<<<<<< * return True * else: */ __Pyx_XDECREF(__pyx_r); __pyx_t_3 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 238; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; goto __pyx_L7; } __pyx_L7:; } /* "pandas/src/inference.pyx":239 * if not util.is_float_object(objbuf[i]): * return False * return True # <<<<<<<<<<<<<< * else: * return False */ __Pyx_XDECREF(__pyx_r); __pyx_t_3 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 239; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; goto __pyx_L3; } /*else*/ { /* "pandas/src/inference.pyx":241 * return True * else: * return False # <<<<<<<<<<<<<< * * def is_string_array(ndarray values): */ __Pyx_XDECREF(__pyx_r); __pyx_t_3 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 241; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; } __pyx_L3:; __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); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_objbuf.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.lib.is_float_array", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_objbuf.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_objbuf); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_3lib_119is_string_array(PyObject *__pyx_self, PyObject *__pyx_v_values); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_3lib_119is_string_array = {__Pyx_NAMESTR("is_string_array"), (PyCFunction)__pyx_pw_6pandas_3lib_119is_string_array, METH_O, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_3lib_119is_string_array(PyObject *__pyx_self, PyObject *__pyx_v_values) { CYTHON_UNUSED int __pyx_lineno = 0; CYTHON_UNUSED const char *__pyx_filename = NULL; CYTHON_UNUSED int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("is_string_array (wrapper)", 0); if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_3lib_118is_string_array(__pyx_self, ((PyArrayObject *)__pyx_v_values)); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/inference.pyx":243 * return False * * def is_string_array(ndarray values): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = len(values) */ static PyObject *__pyx_pf_6pandas_3lib_118is_string_array(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_n; PyArrayObject *__pyx_v_objbuf = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_objbuf; __Pyx_Buffer __pyx_pybuffer_objbuf; 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; int __pyx_t_6; int __pyx_t_7; 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("is_string_array", 0); __pyx_pybuffer_objbuf.pybuffer.buf = NULL; __pyx_pybuffer_objbuf.refcount = 0; __pyx_pybuffernd_objbuf.data = NULL; __pyx_pybuffernd_objbuf.rcbuffer = &__pyx_pybuffer_objbuf; /* "pandas/src/inference.pyx":245 * def is_string_array(ndarray values): * cdef: * Py_ssize_t i, n = len(values) # <<<<<<<<<<<<<< * ndarray[object] objbuf * object obj */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 245; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/src/inference.pyx":249 * object obj * * if issubclass(values.dtype.type, (np.string_, np.unicode_)): # <<<<<<<<<<<<<< * return True * elif values.dtype == np.object_: */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_values), __pyx_n_s__dtype); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 249; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__type); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 249; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 249; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__string_); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 249; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 249; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__unicode_); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 249; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 249; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __pyx_t_4 = 0; __pyx_t_5 = 0; __pyx_t_6 = PyObject_IsSubclass(__pyx_t_3, ((PyObject *)__pyx_t_2)); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 249; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __pyx_t_7 = (__pyx_t_6 != 0); if (__pyx_t_7) { /* "pandas/src/inference.pyx":250 * * if issubclass(values.dtype.type, (np.string_, np.unicode_)): * return True # <<<<<<<<<<<<<< * elif values.dtype == np.object_: * objbuf = values */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 250; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; goto __pyx_L3; } /* "pandas/src/inference.pyx":251 * if issubclass(values.dtype.type, (np.string_, np.unicode_)): * return True * elif values.dtype == np.object_: # <<<<<<<<<<<<<< * objbuf = values * */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_values), __pyx_n_s__dtype); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 251; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 251; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s__object_); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 251; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyObject_RichCompare(__pyx_t_2, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 251; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 251; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_7) { /* "pandas/src/inference.pyx":252 * return True * elif values.dtype == np.object_: * objbuf = values # <<<<<<<<<<<<<< * * if n == 0: */ { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_objbuf.rcbuffer->pybuffer); __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_objbuf.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_v_values), &__Pyx_TypeInfo_object, 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_objbuf.rcbuffer->pybuffer, (PyObject*)__pyx_v_objbuf, &__Pyx_TypeInfo_object, 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_pybuffernd_objbuf.diminfo[0].strides = __pyx_pybuffernd_objbuf.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_objbuf.diminfo[0].shape = __pyx_pybuffernd_objbuf.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 252; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __Pyx_INCREF(((PyObject *)__pyx_v_values)); __pyx_v_objbuf = ((PyArrayObject *)__pyx_v_values); /* "pandas/src/inference.pyx":254 * objbuf = values * * if n == 0: # <<<<<<<<<<<<<< * return False * */ __pyx_t_7 = ((__pyx_v_n == 0) != 0); if (__pyx_t_7) { /* "pandas/src/inference.pyx":255 * * if n == 0: * return False # <<<<<<<<<<<<<< * * for i in range(n): */ __Pyx_XDECREF(__pyx_r); __pyx_t_3 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 255; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; goto __pyx_L4; } __pyx_L4:; /* "pandas/src/inference.pyx":257 * return False * * for i in range(n): # <<<<<<<<<<<<<< * if not PyString_Check(objbuf[i]): * return False */ __pyx_t_1 = __pyx_v_n; for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_1; __pyx_t_12+=1) { __pyx_v_i = __pyx_t_12; /* "pandas/src/inference.pyx":258 * * for i in range(n): * if not PyString_Check(objbuf[i]): # <<<<<<<<<<<<<< * return False * return True */ __pyx_t_13 = __pyx_v_i; __pyx_t_8 = -1; if (__pyx_t_13 < 0) { __pyx_t_13 += __pyx_pybuffernd_objbuf.diminfo[0].shape; if (unlikely(__pyx_t_13 < 0)) __pyx_t_8 = 0; } else if (unlikely(__pyx_t_13 >= __pyx_pybuffernd_objbuf.diminfo[0].shape)) __pyx_t_8 = 0; if (unlikely(__pyx_t_8 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_8); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 258; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_3 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_objbuf.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_objbuf.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_3); __pyx_t_7 = ((!(PyString_Check(__pyx_t_3) != 0)) != 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_7) { /* "pandas/src/inference.pyx":259 * for i in range(n): * if not PyString_Check(objbuf[i]): * return False # <<<<<<<<<<<<<< * return True * else: */ __Pyx_XDECREF(__pyx_r); __pyx_t_3 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 259; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; goto __pyx_L7; } __pyx_L7:; } /* "pandas/src/inference.pyx":260 * if not PyString_Check(objbuf[i]): * return False * return True # <<<<<<<<<<<<<< * else: * return False */ __Pyx_XDECREF(__pyx_r); __pyx_t_3 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 260; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; goto __pyx_L3; } /*else*/ { /* "pandas/src/inference.pyx":262 * return True * else: * return False # <<<<<<<<<<<<<< * * def is_unicode_array(ndarray values): */ __Pyx_XDECREF(__pyx_r); __pyx_t_3 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 262; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; } __pyx_L3:; __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_XDECREF(__pyx_t_5); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_objbuf.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.lib.is_string_array", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_objbuf.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_objbuf); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_3lib_121is_unicode_array(PyObject *__pyx_self, PyObject *__pyx_v_values); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_3lib_121is_unicode_array = {__Pyx_NAMESTR("is_unicode_array"), (PyCFunction)__pyx_pw_6pandas_3lib_121is_unicode_array, METH_O, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_3lib_121is_unicode_array(PyObject *__pyx_self, PyObject *__pyx_v_values) { CYTHON_UNUSED int __pyx_lineno = 0; CYTHON_UNUSED const char *__pyx_filename = NULL; CYTHON_UNUSED int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("is_unicode_array (wrapper)", 0); if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 264; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_3lib_120is_unicode_array(__pyx_self, ((PyArrayObject *)__pyx_v_values)); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/inference.pyx":264 * return False * * def is_unicode_array(ndarray values): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = len(values) */ static PyObject *__pyx_pf_6pandas_3lib_120is_unicode_array(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_n; PyArrayObject *__pyx_v_objbuf = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_objbuf; __Pyx_Buffer __pyx_pybuffer_objbuf; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; int __pyx_t_5; 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("is_unicode_array", 0); __pyx_pybuffer_objbuf.pybuffer.buf = NULL; __pyx_pybuffer_objbuf.refcount = 0; __pyx_pybuffernd_objbuf.data = NULL; __pyx_pybuffernd_objbuf.rcbuffer = &__pyx_pybuffer_objbuf; /* "pandas/src/inference.pyx":266 * def is_unicode_array(ndarray values): * cdef: * Py_ssize_t i, n = len(values) # <<<<<<<<<<<<<< * ndarray[object] objbuf * object obj */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 266; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/src/inference.pyx":270 * object obj * * if issubclass(values.dtype.type, np.unicode_): # <<<<<<<<<<<<<< * return True * elif values.dtype == np.object_: */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_values), __pyx_n_s__dtype); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 270; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__type); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 270; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 270; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__unicode_); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 270; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_5 = PyObject_IsSubclass(__pyx_t_3, __pyx_t_4); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 270; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_6 = (__pyx_t_5 != 0); if (__pyx_t_6) { /* "pandas/src/inference.pyx":271 * * if issubclass(values.dtype.type, np.unicode_): * return True # <<<<<<<<<<<<<< * elif values.dtype == np.object_: * objbuf = values */ __Pyx_XDECREF(__pyx_r); __pyx_t_4 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 271; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; goto __pyx_L3; } /* "pandas/src/inference.pyx":272 * if issubclass(values.dtype.type, np.unicode_): * return True * elif values.dtype == np.object_: # <<<<<<<<<<<<<< * objbuf = values * */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_values), __pyx_n_s__dtype); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 272; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 272; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s__object_); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 272; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyObject_RichCompare(__pyx_t_4, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 272; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 272; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_6) { /* "pandas/src/inference.pyx":273 * return True * elif values.dtype == np.object_: * objbuf = values # <<<<<<<<<<<<<< * * if n == 0: */ { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_objbuf.rcbuffer->pybuffer); __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_objbuf.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_v_values), &__Pyx_TypeInfo_object, 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_objbuf.rcbuffer->pybuffer, (PyObject*)__pyx_v_objbuf, &__Pyx_TypeInfo_object, 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_pybuffernd_objbuf.diminfo[0].strides = __pyx_pybuffernd_objbuf.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_objbuf.diminfo[0].shape = __pyx_pybuffernd_objbuf.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 273; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __Pyx_INCREF(((PyObject *)__pyx_v_values)); __pyx_v_objbuf = ((PyArrayObject *)__pyx_v_values); /* "pandas/src/inference.pyx":275 * objbuf = values * * if n == 0: # <<<<<<<<<<<<<< * return False * */ __pyx_t_6 = ((__pyx_v_n == 0) != 0); if (__pyx_t_6) { /* "pandas/src/inference.pyx":276 * * if n == 0: * return False # <<<<<<<<<<<<<< * * for i in range(n): */ __Pyx_XDECREF(__pyx_r); __pyx_t_3 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 276; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; goto __pyx_L4; } __pyx_L4:; /* "pandas/src/inference.pyx":278 * return False * * for i in range(n): # <<<<<<<<<<<<<< * if not PyUnicode_Check(objbuf[i]): * return False */ __pyx_t_1 = __pyx_v_n; for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_1; __pyx_t_11+=1) { __pyx_v_i = __pyx_t_11; /* "pandas/src/inference.pyx":279 * * for i in range(n): * if not PyUnicode_Check(objbuf[i]): # <<<<<<<<<<<<<< * return False * return True */ __pyx_t_12 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_12 < 0) { __pyx_t_12 += __pyx_pybuffernd_objbuf.diminfo[0].shape; if (unlikely(__pyx_t_12 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_12 >= __pyx_pybuffernd_objbuf.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 279; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_3 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_objbuf.rcbuffer->pybuffer.buf, __pyx_t_12, __pyx_pybuffernd_objbuf.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_3); __pyx_t_6 = ((!(PyUnicode_Check(__pyx_t_3) != 0)) != 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_6) { /* "pandas/src/inference.pyx":280 * for i in range(n): * if not PyUnicode_Check(objbuf[i]): * return False # <<<<<<<<<<<<<< * return True * else: */ __Pyx_XDECREF(__pyx_r); __pyx_t_3 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 280; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; goto __pyx_L7; } __pyx_L7:; } /* "pandas/src/inference.pyx":281 * if not PyUnicode_Check(objbuf[i]): * return False * return True # <<<<<<<<<<<<<< * else: * return False */ __Pyx_XDECREF(__pyx_r); __pyx_t_3 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 281; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; goto __pyx_L3; } /*else*/ { /* "pandas/src/inference.pyx":283 * return True * else: * return False # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_3 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 283; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; } __pyx_L3:; __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); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_objbuf.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.lib.is_unicode_array", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_objbuf.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_objbuf); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_3lib_123is_datetime_array(PyObject *__pyx_self, PyObject *__pyx_v_values); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_3lib_123is_datetime_array = {__Pyx_NAMESTR("is_datetime_array"), (PyCFunction)__pyx_pw_6pandas_3lib_123is_datetime_array, METH_O, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_3lib_123is_datetime_array(PyObject *__pyx_self, PyObject *__pyx_v_values) { CYTHON_UNUSED int __pyx_lineno = 0; CYTHON_UNUSED const char *__pyx_filename = NULL; CYTHON_UNUSED int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("is_datetime_array (wrapper)", 0); if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 286; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_3lib_122is_datetime_array(__pyx_self, ((PyArrayObject *)__pyx_v_values)); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/inference.pyx":286 * * * def is_datetime_array(ndarray[object] values): # <<<<<<<<<<<<<< * cdef int i, n = len(values) * cdef object v */ static PyObject *__pyx_pf_6pandas_3lib_122is_datetime_array(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values) { int __pyx_v_i; int __pyx_v_n; PyObject *__pyx_v_v = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_values; __Pyx_Buffer __pyx_pybuffer_values; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; int __pyx_t_4; int __pyx_t_5; int __pyx_t_6; int __pyx_t_7; int __pyx_t_8; int __pyx_t_9; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("is_datetime_array", 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_object, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 286; __pyx_clineno = __LINE__; goto __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/src/inference.pyx":287 * * def is_datetime_array(ndarray[object] values): * cdef int i, n = len(values) # <<<<<<<<<<<<<< * cdef object v * if n == 0: */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 287; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/src/inference.pyx":289 * cdef int i, n = len(values) * cdef object v * if n == 0: # <<<<<<<<<<<<<< * return False * for i in range(n): */ __pyx_t_2 = ((__pyx_v_n == 0) != 0); if (__pyx_t_2) { /* "pandas/src/inference.pyx":290 * cdef object v * if n == 0: * return False # <<<<<<<<<<<<<< * for i in range(n): * v = values[i] */ __Pyx_XDECREF(__pyx_r); __pyx_t_3 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 290; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; goto __pyx_L3; } __pyx_L3:; /* "pandas/src/inference.pyx":291 * if n == 0: * return False * for i in range(n): # <<<<<<<<<<<<<< * v = values[i] * if not (is_datetime(v) or is_null_datetimelike(v)): */ __pyx_t_4 = __pyx_v_n; for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) { __pyx_v_i = __pyx_t_5; /* "pandas/src/inference.pyx":292 * return False * for i in range(n): * v = values[i] # <<<<<<<<<<<<<< * if not (is_datetime(v) or is_null_datetimelike(v)): * return False */ __pyx_t_6 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_6 < 0) { __pyx_t_6 += __pyx_pybuffernd_values.diminfo[0].shape; if (unlikely(__pyx_t_6 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_6 >= __pyx_pybuffernd_values.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 292; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_3 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_6, __pyx_pybuffernd_values.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_3); __Pyx_XDECREF_SET(__pyx_v_v, __pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/inference.pyx":293 * for i in range(n): * v = values[i] * if not (is_datetime(v) or is_null_datetimelike(v)): # <<<<<<<<<<<<<< * return False * return True */ __pyx_t_2 = (__pyx_f_6pandas_3lib_is_datetime(__pyx_v_v) != 0); if (!__pyx_t_2) { __pyx_t_8 = (__pyx_f_6pandas_3lib_is_null_datetimelike(__pyx_v_v) != 0); __pyx_t_9 = __pyx_t_8; } else { __pyx_t_9 = __pyx_t_2; } __pyx_t_2 = ((!__pyx_t_9) != 0); if (__pyx_t_2) { /* "pandas/src/inference.pyx":294 * v = values[i] * if not (is_datetime(v) or is_null_datetimelike(v)): * return False # <<<<<<<<<<<<<< * return True * */ __Pyx_XDECREF(__pyx_r); __pyx_t_3 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 294; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; goto __pyx_L6; } __pyx_L6:; } /* "pandas/src/inference.pyx":295 * if not (is_datetime(v) or is_null_datetimelike(v)): * return False * return True # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_3 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 295; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __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.lib.is_datetime_array", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF(__pyx_v_v); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_3lib_125is_datetime64_array(PyObject *__pyx_self, PyObject *__pyx_v_values); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_3lib_125is_datetime64_array = {__Pyx_NAMESTR("is_datetime64_array"), (PyCFunction)__pyx_pw_6pandas_3lib_125is_datetime64_array, METH_O, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_3lib_125is_datetime64_array(PyObject *__pyx_self, PyObject *__pyx_v_values) { CYTHON_UNUSED int __pyx_lineno = 0; CYTHON_UNUSED const char *__pyx_filename = NULL; CYTHON_UNUSED int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("is_datetime64_array (wrapper)", 0); if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 298; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_3lib_124is_datetime64_array(__pyx_self, ((PyArrayObject *)__pyx_v_values)); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/inference.pyx":298 * * * def is_datetime64_array(ndarray values): # <<<<<<<<<<<<<< * cdef int i, n = len(values) * cdef object v */ static PyObject *__pyx_pf_6pandas_3lib_124is_datetime64_array(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values) { int __pyx_v_i; int __pyx_v_n; PyObject *__pyx_v_v = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; int __pyx_t_4; int __pyx_t_5; int __pyx_t_6; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("is_datetime64_array", 0); /* "pandas/src/inference.pyx":299 * * def is_datetime64_array(ndarray values): * cdef int i, n = len(values) # <<<<<<<<<<<<<< * cdef object v * if n == 0: */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 299; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/src/inference.pyx":301 * cdef int i, n = len(values) * cdef object v * if n == 0: # <<<<<<<<<<<<<< * return False * for i in range(n): */ __pyx_t_2 = ((__pyx_v_n == 0) != 0); if (__pyx_t_2) { /* "pandas/src/inference.pyx":302 * cdef object v * if n == 0: * return False # <<<<<<<<<<<<<< * for i in range(n): * v = values[i] */ __Pyx_XDECREF(__pyx_r); __pyx_t_3 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 302; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; goto __pyx_L3; } __pyx_L3:; /* "pandas/src/inference.pyx":303 * if n == 0: * return False * for i in range(n): # <<<<<<<<<<<<<< * v = values[i] * if not (util.is_datetime64_object(v) or is_null_datetimelike(v)): */ __pyx_t_4 = __pyx_v_n; for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) { __pyx_v_i = __pyx_t_5; /* "pandas/src/inference.pyx":304 * return False * for i in range(n): * v = values[i] # <<<<<<<<<<<<<< * if not (util.is_datetime64_object(v) or is_null_datetimelike(v)): * return False */ __pyx_t_3 = __Pyx_GetItemInt(((PyObject *)__pyx_v_values), __pyx_v_i, sizeof(int), PyInt_FromLong, 0, 1, 1); if (!__pyx_t_3) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 304; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_XDECREF_SET(__pyx_v_v, __pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/inference.pyx":305 * for i in range(n): * v = values[i] * if not (util.is_datetime64_object(v) or is_null_datetimelike(v)): # <<<<<<<<<<<<<< * return False * return True */ if (!(is_datetime64_object(__pyx_v_v) != 0)) { __pyx_t_2 = __pyx_f_6pandas_3lib_is_null_datetimelike(__pyx_v_v); __pyx_t_6 = __pyx_t_2; } else { __pyx_t_6 = (is_datetime64_object(__pyx_v_v) != 0); } __pyx_t_2 = ((!__pyx_t_6) != 0); if (__pyx_t_2) { /* "pandas/src/inference.pyx":306 * v = values[i] * if not (util.is_datetime64_object(v) or is_null_datetimelike(v)): * return False # <<<<<<<<<<<<<< * return True * */ __Pyx_XDECREF(__pyx_r); __pyx_t_3 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 306; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; goto __pyx_L6; } __pyx_L6:; } /* "pandas/src/inference.pyx":307 * if not (util.is_datetime64_object(v) or is_null_datetimelike(v)): * return False * return True # <<<<<<<<<<<<<< * * def is_timedelta_array(ndarray values): */ __Pyx_XDECREF(__pyx_r); __pyx_t_3 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 307; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("pandas.lib.is_datetime64_array", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_v); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_3lib_127is_timedelta_array(PyObject *__pyx_self, PyObject *__pyx_v_values); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_3lib_127is_timedelta_array = {__Pyx_NAMESTR("is_timedelta_array"), (PyCFunction)__pyx_pw_6pandas_3lib_127is_timedelta_array, METH_O, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_3lib_127is_timedelta_array(PyObject *__pyx_self, PyObject *__pyx_v_values) { CYTHON_UNUSED int __pyx_lineno = 0; CYTHON_UNUSED const char *__pyx_filename = NULL; CYTHON_UNUSED int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("is_timedelta_array (wrapper)", 0); if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 309; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_3lib_126is_timedelta_array(__pyx_self, ((PyArrayObject *)__pyx_v_values)); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/inference.pyx":309 * return True * * def is_timedelta_array(ndarray values): # <<<<<<<<<<<<<< * cdef int i, n = len(values) * cdef object v */ static PyObject *__pyx_pf_6pandas_3lib_126is_timedelta_array(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values) { int __pyx_v_i; int __pyx_v_n; PyObject *__pyx_v_v = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; int __pyx_t_4; int __pyx_t_5; int __pyx_t_6; int __pyx_t_7; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("is_timedelta_array", 0); /* "pandas/src/inference.pyx":310 * * def is_timedelta_array(ndarray values): * cdef int i, n = len(values) # <<<<<<<<<<<<<< * cdef object v * if n == 0: */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 310; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/src/inference.pyx":312 * cdef int i, n = len(values) * cdef object v * if n == 0: # <<<<<<<<<<<<<< * return False * for i in range(n): */ __pyx_t_2 = ((__pyx_v_n == 0) != 0); if (__pyx_t_2) { /* "pandas/src/inference.pyx":313 * cdef object v * if n == 0: * return False # <<<<<<<<<<<<<< * for i in range(n): * v = values[i] */ __Pyx_XDECREF(__pyx_r); __pyx_t_3 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 313; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; goto __pyx_L3; } __pyx_L3:; /* "pandas/src/inference.pyx":314 * if n == 0: * return False * for i in range(n): # <<<<<<<<<<<<<< * v = values[i] * if not (PyDelta_Check(v) or is_null_datetimelike(v)): */ __pyx_t_4 = __pyx_v_n; for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) { __pyx_v_i = __pyx_t_5; /* "pandas/src/inference.pyx":315 * return False * for i in range(n): * v = values[i] # <<<<<<<<<<<<<< * if not (PyDelta_Check(v) or is_null_datetimelike(v)): * return False */ __pyx_t_3 = __Pyx_GetItemInt(((PyObject *)__pyx_v_values), __pyx_v_i, sizeof(int), PyInt_FromLong, 0, 1, 1); if (!__pyx_t_3) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 315; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_XDECREF_SET(__pyx_v_v, __pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/inference.pyx":316 * for i in range(n): * v = values[i] * if not (PyDelta_Check(v) or is_null_datetimelike(v)): # <<<<<<<<<<<<<< * return False * return True */ __pyx_t_2 = (PyDelta_Check(__pyx_v_v) != 0); if (!__pyx_t_2) { __pyx_t_6 = (__pyx_f_6pandas_3lib_is_null_datetimelike(__pyx_v_v) != 0); __pyx_t_7 = __pyx_t_6; } else { __pyx_t_7 = __pyx_t_2; } __pyx_t_2 = ((!__pyx_t_7) != 0); if (__pyx_t_2) { /* "pandas/src/inference.pyx":317 * v = values[i] * if not (PyDelta_Check(v) or is_null_datetimelike(v)): * return False # <<<<<<<<<<<<<< * return True * */ __Pyx_XDECREF(__pyx_r); __pyx_t_3 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 317; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; goto __pyx_L6; } __pyx_L6:; } /* "pandas/src/inference.pyx":318 * if not (PyDelta_Check(v) or is_null_datetimelike(v)): * return False * return True # <<<<<<<<<<<<<< * * def is_timedelta64_array(ndarray values): */ __Pyx_XDECREF(__pyx_r); __pyx_t_3 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 318; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("pandas.lib.is_timedelta_array", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_v); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_3lib_129is_timedelta64_array(PyObject *__pyx_self, PyObject *__pyx_v_values); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_3lib_129is_timedelta64_array = {__Pyx_NAMESTR("is_timedelta64_array"), (PyCFunction)__pyx_pw_6pandas_3lib_129is_timedelta64_array, METH_O, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_3lib_129is_timedelta64_array(PyObject *__pyx_self, PyObject *__pyx_v_values) { CYTHON_UNUSED int __pyx_lineno = 0; CYTHON_UNUSED const char *__pyx_filename = NULL; CYTHON_UNUSED int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("is_timedelta64_array (wrapper)", 0); if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 320; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_3lib_128is_timedelta64_array(__pyx_self, ((PyArrayObject *)__pyx_v_values)); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/inference.pyx":320 * return True * * def is_timedelta64_array(ndarray values): # <<<<<<<<<<<<<< * cdef int i, n = len(values) * cdef object v */ static PyObject *__pyx_pf_6pandas_3lib_128is_timedelta64_array(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values) { int __pyx_v_i; int __pyx_v_n; PyObject *__pyx_v_v = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; int __pyx_t_4; int __pyx_t_5; int __pyx_t_6; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("is_timedelta64_array", 0); /* "pandas/src/inference.pyx":321 * * def is_timedelta64_array(ndarray values): * cdef int i, n = len(values) # <<<<<<<<<<<<<< * cdef object v * if n == 0: */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 321; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/src/inference.pyx":323 * cdef int i, n = len(values) * cdef object v * if n == 0: # <<<<<<<<<<<<<< * return False * for i in range(n): */ __pyx_t_2 = ((__pyx_v_n == 0) != 0); if (__pyx_t_2) { /* "pandas/src/inference.pyx":324 * cdef object v * if n == 0: * return False # <<<<<<<<<<<<<< * for i in range(n): * v = values[i] */ __Pyx_XDECREF(__pyx_r); __pyx_t_3 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 324; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; goto __pyx_L3; } __pyx_L3:; /* "pandas/src/inference.pyx":325 * if n == 0: * return False * for i in range(n): # <<<<<<<<<<<<<< * v = values[i] * if not (util.is_timedelta64_object(v) or is_null_datetimelike(v)): */ __pyx_t_4 = __pyx_v_n; for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) { __pyx_v_i = __pyx_t_5; /* "pandas/src/inference.pyx":326 * return False * for i in range(n): * v = values[i] # <<<<<<<<<<<<<< * if not (util.is_timedelta64_object(v) or is_null_datetimelike(v)): * return False */ __pyx_t_3 = __Pyx_GetItemInt(((PyObject *)__pyx_v_values), __pyx_v_i, sizeof(int), PyInt_FromLong, 0, 1, 1); if (!__pyx_t_3) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 326; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_XDECREF_SET(__pyx_v_v, __pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/inference.pyx":327 * for i in range(n): * v = values[i] * if not (util.is_timedelta64_object(v) or is_null_datetimelike(v)): # <<<<<<<<<<<<<< * return False * return True */ if (!(is_timedelta64_object(__pyx_v_v) != 0)) { __pyx_t_2 = __pyx_f_6pandas_3lib_is_null_datetimelike(__pyx_v_v); __pyx_t_6 = __pyx_t_2; } else { __pyx_t_6 = (is_timedelta64_object(__pyx_v_v) != 0); } __pyx_t_2 = ((!__pyx_t_6) != 0); if (__pyx_t_2) { /* "pandas/src/inference.pyx":328 * v = values[i] * if not (util.is_timedelta64_object(v) or is_null_datetimelike(v)): * return False # <<<<<<<<<<<<<< * return True * */ __Pyx_XDECREF(__pyx_r); __pyx_t_3 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 328; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; goto __pyx_L6; } __pyx_L6:; } /* "pandas/src/inference.pyx":329 * if not (util.is_timedelta64_object(v) or is_null_datetimelike(v)): * return False * return True # <<<<<<<<<<<<<< * * def is_timedelta_or_timedelta64_array(ndarray values): */ __Pyx_XDECREF(__pyx_r); __pyx_t_3 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 329; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("pandas.lib.is_timedelta64_array", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_v); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_3lib_131is_timedelta_or_timedelta64_array(PyObject *__pyx_self, PyObject *__pyx_v_values); /*proto*/ static char __pyx_doc_6pandas_3lib_130is_timedelta_or_timedelta64_array[] = " infer with timedeltas and/or nat/none "; static PyMethodDef __pyx_mdef_6pandas_3lib_131is_timedelta_or_timedelta64_array = {__Pyx_NAMESTR("is_timedelta_or_timedelta64_array"), (PyCFunction)__pyx_pw_6pandas_3lib_131is_timedelta_or_timedelta64_array, METH_O, __Pyx_DOCSTR(__pyx_doc_6pandas_3lib_130is_timedelta_or_timedelta64_array)}; static PyObject *__pyx_pw_6pandas_3lib_131is_timedelta_or_timedelta64_array(PyObject *__pyx_self, PyObject *__pyx_v_values) { CYTHON_UNUSED int __pyx_lineno = 0; CYTHON_UNUSED const char *__pyx_filename = NULL; CYTHON_UNUSED int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("is_timedelta_or_timedelta64_array (wrapper)", 0); if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 331; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_3lib_130is_timedelta_or_timedelta64_array(__pyx_self, ((PyArrayObject *)__pyx_v_values)); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/inference.pyx":331 * return True * * def is_timedelta_or_timedelta64_array(ndarray values): # <<<<<<<<<<<<<< * """ infer with timedeltas and/or nat/none """ * cdef int i, n = len(values) */ static PyObject *__pyx_pf_6pandas_3lib_130is_timedelta_or_timedelta64_array(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values) { int __pyx_v_i; int __pyx_v_n; PyObject *__pyx_v_v = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; int __pyx_t_4; int __pyx_t_5; int __pyx_t_6; int __pyx_t_7; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("is_timedelta_or_timedelta64_array", 0); /* "pandas/src/inference.pyx":333 * def is_timedelta_or_timedelta64_array(ndarray values): * """ infer with timedeltas and/or nat/none """ * cdef int i, n = len(values) # <<<<<<<<<<<<<< * cdef object v * if n == 0: */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 333; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/src/inference.pyx":335 * cdef int i, n = len(values) * cdef object v * if n == 0: # <<<<<<<<<<<<<< * return False * for i in range(n): */ __pyx_t_2 = ((__pyx_v_n == 0) != 0); if (__pyx_t_2) { /* "pandas/src/inference.pyx":336 * cdef object v * if n == 0: * return False # <<<<<<<<<<<<<< * for i in range(n): * v = values[i] */ __Pyx_XDECREF(__pyx_r); __pyx_t_3 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 336; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; goto __pyx_L3; } __pyx_L3:; /* "pandas/src/inference.pyx":337 * if n == 0: * return False * for i in range(n): # <<<<<<<<<<<<<< * v = values[i] * if not (is_timedelta(v) or is_null_datetimelike(v)): */ __pyx_t_4 = __pyx_v_n; for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) { __pyx_v_i = __pyx_t_5; /* "pandas/src/inference.pyx":338 * return False * for i in range(n): * v = values[i] # <<<<<<<<<<<<<< * if not (is_timedelta(v) or is_null_datetimelike(v)): * return False */ __pyx_t_3 = __Pyx_GetItemInt(((PyObject *)__pyx_v_values), __pyx_v_i, sizeof(int), PyInt_FromLong, 0, 1, 1); if (!__pyx_t_3) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 338; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_XDECREF_SET(__pyx_v_v, __pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/inference.pyx":339 * for i in range(n): * v = values[i] * if not (is_timedelta(v) or is_null_datetimelike(v)): # <<<<<<<<<<<<<< * return False * return True */ __pyx_t_2 = (__pyx_f_6pandas_3lib_is_timedelta(__pyx_v_v) != 0); if (!__pyx_t_2) { __pyx_t_6 = (__pyx_f_6pandas_3lib_is_null_datetimelike(__pyx_v_v) != 0); __pyx_t_7 = __pyx_t_6; } else { __pyx_t_7 = __pyx_t_2; } __pyx_t_2 = ((!__pyx_t_7) != 0); if (__pyx_t_2) { /* "pandas/src/inference.pyx":340 * v = values[i] * if not (is_timedelta(v) or is_null_datetimelike(v)): * return False # <<<<<<<<<<<<<< * return True * */ __Pyx_XDECREF(__pyx_r); __pyx_t_3 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 340; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; goto __pyx_L6; } __pyx_L6:; } /* "pandas/src/inference.pyx":341 * if not (is_timedelta(v) or is_null_datetimelike(v)): * return False * return True # <<<<<<<<<<<<<< * * def is_date_array(ndarray[object] values): */ __Pyx_XDECREF(__pyx_r); __pyx_t_3 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 341; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("pandas.lib.is_timedelta_or_timedelta64_array", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_v); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_3lib_133is_date_array(PyObject *__pyx_self, PyObject *__pyx_v_values); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_3lib_133is_date_array = {__Pyx_NAMESTR("is_date_array"), (PyCFunction)__pyx_pw_6pandas_3lib_133is_date_array, METH_O, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_3lib_133is_date_array(PyObject *__pyx_self, PyObject *__pyx_v_values) { CYTHON_UNUSED int __pyx_lineno = 0; CYTHON_UNUSED const char *__pyx_filename = NULL; CYTHON_UNUSED int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("is_date_array (wrapper)", 0); if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 343; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_3lib_132is_date_array(__pyx_self, ((PyArrayObject *)__pyx_v_values)); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/inference.pyx":343 * return True * * def is_date_array(ndarray[object] values): # <<<<<<<<<<<<<< * cdef int i, n = len(values) * if n == 0: */ static PyObject *__pyx_pf_6pandas_3lib_132is_date_array(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values) { int __pyx_v_i; int __pyx_v_n; __Pyx_LocalBuf_ND __pyx_pybuffernd_values; __Pyx_Buffer __pyx_pybuffer_values; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; int __pyx_t_4; int __pyx_t_5; int __pyx_t_6; int __pyx_t_7; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("is_date_array", 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_object, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 343; __pyx_clineno = __LINE__; goto __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/src/inference.pyx":344 * * def is_date_array(ndarray[object] values): * cdef int i, n = len(values) # <<<<<<<<<<<<<< * if n == 0: * return False */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 344; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/src/inference.pyx":345 * def is_date_array(ndarray[object] values): * cdef int i, n = len(values) * if n == 0: # <<<<<<<<<<<<<< * return False * for i in range(n): */ __pyx_t_2 = ((__pyx_v_n == 0) != 0); if (__pyx_t_2) { /* "pandas/src/inference.pyx":346 * cdef int i, n = len(values) * if n == 0: * return False # <<<<<<<<<<<<<< * for i in range(n): * if not is_date(values[i]): */ __Pyx_XDECREF(__pyx_r); __pyx_t_3 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 346; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; goto __pyx_L3; } __pyx_L3:; /* "pandas/src/inference.pyx":347 * if n == 0: * return False * for i in range(n): # <<<<<<<<<<<<<< * if not is_date(values[i]): * return False */ __pyx_t_4 = __pyx_v_n; for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) { __pyx_v_i = __pyx_t_5; /* "pandas/src/inference.pyx":348 * return False * for i in range(n): * if not is_date(values[i]): # <<<<<<<<<<<<<< * return False * return True */ __pyx_t_6 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_6 < 0) { __pyx_t_6 += __pyx_pybuffernd_values.diminfo[0].shape; if (unlikely(__pyx_t_6 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_6 >= __pyx_pybuffernd_values.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 348; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_3 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_6, __pyx_pybuffernd_values.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_3); __pyx_t_2 = ((!(__pyx_f_6pandas_3lib_is_date(__pyx_t_3) != 0)) != 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_2) { /* "pandas/src/inference.pyx":349 * for i in range(n): * if not is_date(values[i]): * return False # <<<<<<<<<<<<<< * return True * */ __Pyx_XDECREF(__pyx_r); __pyx_t_3 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 349; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; goto __pyx_L6; } __pyx_L6:; } /* "pandas/src/inference.pyx":350 * if not is_date(values[i]): * return False * return True # <<<<<<<<<<<<<< * * def is_time_array(ndarray[object] values): */ __Pyx_XDECREF(__pyx_r); __pyx_t_3 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 350; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __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.lib.is_date_array", __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; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_3lib_135is_time_array(PyObject *__pyx_self, PyObject *__pyx_v_values); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_3lib_135is_time_array = {__Pyx_NAMESTR("is_time_array"), (PyCFunction)__pyx_pw_6pandas_3lib_135is_time_array, METH_O, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_3lib_135is_time_array(PyObject *__pyx_self, PyObject *__pyx_v_values) { CYTHON_UNUSED int __pyx_lineno = 0; CYTHON_UNUSED const char *__pyx_filename = NULL; CYTHON_UNUSED int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("is_time_array (wrapper)", 0); if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 352; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_3lib_134is_time_array(__pyx_self, ((PyArrayObject *)__pyx_v_values)); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/inference.pyx":352 * return True * * def is_time_array(ndarray[object] values): # <<<<<<<<<<<<<< * cdef int i, n = len(values) * if n == 0: */ static PyObject *__pyx_pf_6pandas_3lib_134is_time_array(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values) { int __pyx_v_i; int __pyx_v_n; __Pyx_LocalBuf_ND __pyx_pybuffernd_values; __Pyx_Buffer __pyx_pybuffer_values; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; int __pyx_t_4; int __pyx_t_5; int __pyx_t_6; int __pyx_t_7; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("is_time_array", 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_object, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 352; __pyx_clineno = __LINE__; goto __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/src/inference.pyx":353 * * def is_time_array(ndarray[object] values): * cdef int i, n = len(values) # <<<<<<<<<<<<<< * if n == 0: * return False */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 353; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/src/inference.pyx":354 * def is_time_array(ndarray[object] values): * cdef int i, n = len(values) * if n == 0: # <<<<<<<<<<<<<< * return False * for i in range(n): */ __pyx_t_2 = ((__pyx_v_n == 0) != 0); if (__pyx_t_2) { /* "pandas/src/inference.pyx":355 * cdef int i, n = len(values) * if n == 0: * return False # <<<<<<<<<<<<<< * for i in range(n): * if not is_time(values[i]): */ __Pyx_XDECREF(__pyx_r); __pyx_t_3 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 355; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; goto __pyx_L3; } __pyx_L3:; /* "pandas/src/inference.pyx":356 * if n == 0: * return False * for i in range(n): # <<<<<<<<<<<<<< * if not is_time(values[i]): * return False */ __pyx_t_4 = __pyx_v_n; for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) { __pyx_v_i = __pyx_t_5; /* "pandas/src/inference.pyx":357 * return False * for i in range(n): * if not is_time(values[i]): # <<<<<<<<<<<<<< * return False * return True */ __pyx_t_6 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_6 < 0) { __pyx_t_6 += __pyx_pybuffernd_values.diminfo[0].shape; if (unlikely(__pyx_t_6 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_6 >= __pyx_pybuffernd_values.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 357; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_3 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_6, __pyx_pybuffernd_values.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_3); __pyx_t_2 = ((!(__pyx_f_6pandas_3lib_is_time(__pyx_t_3) != 0)) != 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_2) { /* "pandas/src/inference.pyx":358 * for i in range(n): * if not is_time(values[i]): * return False # <<<<<<<<<<<<<< * return True * */ __Pyx_XDECREF(__pyx_r); __pyx_t_3 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 358; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; goto __pyx_L6; } __pyx_L6:; } /* "pandas/src/inference.pyx":359 * if not is_time(values[i]): * return False * return True # <<<<<<<<<<<<<< * * def is_period(object o): */ __Pyx_XDECREF(__pyx_r); __pyx_t_3 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 359; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __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.lib.is_time_array", __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; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_3lib_137is_period(PyObject *__pyx_self, PyObject *__pyx_v_o); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_3lib_137is_period = {__Pyx_NAMESTR("is_period"), (PyCFunction)__pyx_pw_6pandas_3lib_137is_period, METH_O, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_3lib_137is_period(PyObject *__pyx_self, PyObject *__pyx_v_o) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("is_period (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_3lib_136is_period(__pyx_self, ((PyObject *)__pyx_v_o)); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/inference.pyx":361 * return True * * def is_period(object o): # <<<<<<<<<<<<<< * from pandas import Period * return isinstance(o,Period) */ static PyObject *__pyx_pf_6pandas_3lib_136is_period(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_o) { PyObject *__pyx_v_Period = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_t_3; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("is_period", 0); /* "pandas/src/inference.pyx":362 * * def is_period(object o): * from pandas import Period # <<<<<<<<<<<<<< * return isinstance(o,Period) * */ __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 362; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)__pyx_n_s__Period)); PyList_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_n_s__Period)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__Period)); __pyx_t_2 = __Pyx_Import(((PyObject *)__pyx_n_s__pandas), ((PyObject *)__pyx_t_1), -1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 362; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s__Period); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 362; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_t_1); __pyx_v_Period = __pyx_t_1; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/inference.pyx":363 * def is_period(object o): * from pandas import Period * return isinstance(o,Period) # <<<<<<<<<<<<<< * * def is_period_array(ndarray[object] values): */ __Pyx_XDECREF(__pyx_r); __pyx_t_3 = PyObject_IsInstance(__pyx_v_o, __pyx_v_Period); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 363; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 363; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("pandas.lib.is_period", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_Period); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_3lib_139is_period_array(PyObject *__pyx_self, PyObject *__pyx_v_values); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_3lib_139is_period_array = {__Pyx_NAMESTR("is_period_array"), (PyCFunction)__pyx_pw_6pandas_3lib_139is_period_array, METH_O, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_3lib_139is_period_array(PyObject *__pyx_self, PyObject *__pyx_v_values) { CYTHON_UNUSED int __pyx_lineno = 0; CYTHON_UNUSED const char *__pyx_filename = NULL; CYTHON_UNUSED int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("is_period_array (wrapper)", 0); if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 365; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_3lib_138is_period_array(__pyx_self, ((PyArrayObject *)__pyx_v_values)); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/inference.pyx":365 * return isinstance(o,Period) * * def is_period_array(ndarray[object] values): # <<<<<<<<<<<<<< * cdef int i, n = len(values) * from pandas.tseries.period import Period */ static PyObject *__pyx_pf_6pandas_3lib_138is_period_array(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values) { int __pyx_v_i; int __pyx_v_n; PyObject *__pyx_v_Period = NULL; __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; int __pyx_t_4; int __pyx_t_5; int __pyx_t_6; int __pyx_t_7; int __pyx_t_8; int __pyx_t_9; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("is_period_array", 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_object, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 365; __pyx_clineno = __LINE__; goto __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/src/inference.pyx":366 * * def is_period_array(ndarray[object] values): * cdef int i, n = len(values) # <<<<<<<<<<<<<< * from pandas.tseries.period import Period * */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 366; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/src/inference.pyx":367 * def is_period_array(ndarray[object] values): * cdef int i, n = len(values) * from pandas.tseries.period import Period # <<<<<<<<<<<<<< * * if n == 0: */ __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 367; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(((PyObject *)__pyx_n_s__Period)); PyList_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_n_s__Period)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__Period)); __pyx_t_3 = __Pyx_Import(((PyObject *)__pyx_n_s_55), ((PyObject *)__pyx_t_2), -1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 367; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s__Period); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 367; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_t_2); __pyx_v_Period = __pyx_t_2; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/inference.pyx":369 * from pandas.tseries.period import Period * * if n == 0: # <<<<<<<<<<<<<< * return False * for i in range(n): */ __pyx_t_4 = ((__pyx_v_n == 0) != 0); if (__pyx_t_4) { /* "pandas/src/inference.pyx":370 * * if n == 0: * return False # <<<<<<<<<<<<<< * for i in range(n): * if not isinstance(values[i], Period): */ __Pyx_XDECREF(__pyx_r); __pyx_t_3 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 370; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; goto __pyx_L3; } __pyx_L3:; /* "pandas/src/inference.pyx":371 * if n == 0: * return False * for i in range(n): # <<<<<<<<<<<<<< * if not isinstance(values[i], Period): * return False */ __pyx_t_5 = __pyx_v_n; for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) { __pyx_v_i = __pyx_t_6; /* "pandas/src/inference.pyx":372 * return False * for i in range(n): * if not isinstance(values[i], Period): # <<<<<<<<<<<<<< * return False * return True */ __pyx_t_7 = __pyx_v_i; __pyx_t_8 = -1; if (__pyx_t_7 < 0) { __pyx_t_7 += __pyx_pybuffernd_values.diminfo[0].shape; if (unlikely(__pyx_t_7 < 0)) __pyx_t_8 = 0; } else if (unlikely(__pyx_t_7 >= __pyx_pybuffernd_values.diminfo[0].shape)) __pyx_t_8 = 0; if (unlikely(__pyx_t_8 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_8); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 372; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_3 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_7, __pyx_pybuffernd_values.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_3); __pyx_t_4 = PyObject_IsInstance(__pyx_t_3, __pyx_v_Period); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 372; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_9 = ((!(__pyx_t_4 != 0)) != 0); if (__pyx_t_9) { /* "pandas/src/inference.pyx":373 * for i in range(n): * if not isinstance(values[i], Period): * return False # <<<<<<<<<<<<<< * return True * */ __Pyx_XDECREF(__pyx_r); __pyx_t_3 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 373; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; goto __pyx_L6; } __pyx_L6:; } /* "pandas/src/inference.pyx":374 * if not isinstance(values[i], Period): * return False * return True # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_3 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 374; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __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.lib.is_period_array", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF(__pyx_v_Period); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_3lib_141maybe_convert_numeric(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6pandas_3lib_140maybe_convert_numeric[] = "\n Type inference function-- convert strings to numeric (potentially) and\n convert to proper dtype array\n "; static PyMethodDef __pyx_mdef_6pandas_3lib_141maybe_convert_numeric = {__Pyx_NAMESTR("maybe_convert_numeric"), (PyCFunction)__pyx_pw_6pandas_3lib_141maybe_convert_numeric, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_3lib_140maybe_convert_numeric)}; static PyObject *__pyx_pw_6pandas_3lib_141maybe_convert_numeric(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_values = 0; PyObject *__pyx_v_na_values = 0; PyObject *__pyx_v_convert_empty = 0; PyObject *__pyx_v_coerce_numeric = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("maybe_convert_numeric (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__values,&__pyx_n_s__na_values,&__pyx_n_s__convert_empty,&__pyx_n_s__coerce_numeric,0}; PyObject* values[4] = {0,0,0,0}; values[2] = __pyx_k_56; values[3] = __pyx_k_57; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__values)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__na_values)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("maybe_convert_numeric", 0, 2, 4, 1); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 383; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__convert_empty); if (value) { values[2] = value; kw_args--; } } case 3: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__coerce_numeric); if (value) { values[3] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "maybe_convert_numeric") < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 383; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_values = ((PyArrayObject *)values[0]); __pyx_v_na_values = ((PyObject*)values[1]); __pyx_v_convert_empty = values[2]; __pyx_v_coerce_numeric = values[3]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("maybe_convert_numeric", 0, 2, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 383; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.lib.maybe_convert_numeric", __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_filename = __pyx_f[1]; __pyx_lineno = 383; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_na_values), (&PySet_Type), 1, "na_values", 1))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 383; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_3lib_140maybe_convert_numeric(__pyx_self, __pyx_v_values, __pyx_v_na_values, __pyx_v_convert_empty, __pyx_v_coerce_numeric); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/inference.pyx":383 * cdef double fINT64_MIN = INT64_MIN * * def maybe_convert_numeric(ndarray[object] values, set na_values, # <<<<<<<<<<<<<< * convert_empty=True, coerce_numeric=False): * ''' */ static PyObject *__pyx_pf_6pandas_3lib_140maybe_convert_numeric(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyObject *__pyx_v_na_values, PyObject *__pyx_v_convert_empty, PyObject *__pyx_v_coerce_numeric) { CYTHON_UNUSED int __pyx_v_status; Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_n; PyArrayObject *__pyx_v_floats = 0; PyArrayObject *__pyx_v_complexes = 0; PyArrayObject *__pyx_v_ints = 0; int __pyx_v_seen_float; int __pyx_v_seen_complex; PyObject *__pyx_v_val = 0; __pyx_t_5numpy_float64_t __pyx_v_fval; CYTHON_UNUSED long __pyx_v_seen_int; __Pyx_LocalBuf_ND __pyx_pybuffernd_complexes; __Pyx_Buffer __pyx_pybuffer_complexes; __Pyx_LocalBuf_ND __pyx_pybuffernd_floats; __Pyx_Buffer __pyx_pybuffer_floats; __Pyx_LocalBuf_ND __pyx_pybuffernd_ints; __Pyx_Buffer __pyx_pybuffer_ints; __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; PyArrayObject *__pyx_t_6 = NULL; int __pyx_t_7; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; PyArrayObject *__pyx_t_11 = NULL; PyArrayObject *__pyx_t_12 = NULL; Py_ssize_t __pyx_t_13; int __pyx_t_14; int __pyx_t_15; Py_ssize_t __pyx_t_16; Py_ssize_t __pyx_t_17; __pyx_t_5numpy_float64_t __pyx_t_18; Py_ssize_t __pyx_t_19; __pyx_t_double_complex __pyx_t_20; Py_ssize_t __pyx_t_21; Py_ssize_t __pyx_t_22; __pyx_t_5numpy_int64_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; int __pyx_t_28; Py_ssize_t __pyx_t_29; Py_ssize_t __pyx_t_30; Py_ssize_t __pyx_t_31; int __pyx_t_32; PyObject *__pyx_t_33 = NULL; PyObject *__pyx_t_34 = NULL; PyObject *__pyx_t_35 = NULL; Py_ssize_t __pyx_t_36; Py_ssize_t __pyx_t_37; Py_ssize_t __pyx_t_38; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("maybe_convert_numeric", 0); __pyx_pybuffer_floats.pybuffer.buf = NULL; __pyx_pybuffer_floats.refcount = 0; __pyx_pybuffernd_floats.data = NULL; __pyx_pybuffernd_floats.rcbuffer = &__pyx_pybuffer_floats; __pyx_pybuffer_complexes.pybuffer.buf = NULL; __pyx_pybuffer_complexes.refcount = 0; __pyx_pybuffernd_complexes.data = NULL; __pyx_pybuffernd_complexes.rcbuffer = &__pyx_pybuffer_complexes; __pyx_pybuffer_ints.pybuffer.buf = NULL; __pyx_pybuffer_ints.refcount = 0; __pyx_pybuffernd_ints.data = NULL; __pyx_pybuffernd_ints.rcbuffer = &__pyx_pybuffer_ints; __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_filename = __pyx_f[1]; __pyx_lineno = 383; __pyx_clineno = __LINE__; goto __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/src/inference.pyx":395 * ndarray[complex128_t] complexes * ndarray[int64_t] ints * bint seen_float = 0 # <<<<<<<<<<<<<< * bint seen_complex = 0 * object val */ __pyx_v_seen_float = 0; /* "pandas/src/inference.pyx":396 * ndarray[int64_t] ints * bint seen_float = 0 * bint seen_complex = 0 # <<<<<<<<<<<<<< * object val * float64_t fval */ __pyx_v_seen_complex = 0; /* "pandas/src/inference.pyx":400 * float64_t fval * * n = len(values) # <<<<<<<<<<<<<< * * floats = np.empty(n, dtype='f8') */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 400; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/src/inference.pyx":402 * n = len(values) * * floats = np.empty(n, dtype='f8') # <<<<<<<<<<<<<< * complexes = np.empty(n, dtype='c16') * ints = np.empty(n, dtype='i8') */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 402; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 402; __pyx_clineno = __LINE__; goto __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_n); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 402; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 402; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 402; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_2)); if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__dtype), ((PyObject *)__pyx_n_s__f8)) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 402; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_5 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 402; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 402; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_6 = ((PyArrayObject *)__pyx_t_5); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_floats.rcbuffer->pybuffer); __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_floats.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_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_floats.rcbuffer->pybuffer, (PyObject*)__pyx_v_floats, &__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_pybuffernd_floats.diminfo[0].strides = __pyx_pybuffernd_floats.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_floats.diminfo[0].shape = __pyx_pybuffernd_floats.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 402; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_6 = 0; __pyx_v_floats = ((PyArrayObject *)__pyx_t_5); __pyx_t_5 = 0; /* "pandas/src/inference.pyx":403 * * floats = np.empty(n, dtype='f8') * complexes = np.empty(n, dtype='c16') # <<<<<<<<<<<<<< * ints = np.empty(n, dtype='i8') * */ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 403; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s__empty); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 403; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyInt_FromSsize_t(__pyx_v_n); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 403; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 403; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyDict_New(); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 403; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_5)); if (PyDict_SetItem(__pyx_t_5, ((PyObject *)__pyx_n_s__dtype), ((PyObject *)__pyx_n_s__c16)) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 403; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_3 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_5)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 403; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 403; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_11 = ((PyArrayObject *)__pyx_t_3); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_complexes.rcbuffer->pybuffer); __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_complexes.rcbuffer->pybuffer, (PyObject*)__pyx_t_11, &__Pyx_TypeInfo___pyx_t_double_complex, 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_complexes.rcbuffer->pybuffer, (PyObject*)__pyx_v_complexes, &__Pyx_TypeInfo___pyx_t_double_complex, 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_pybuffernd_complexes.diminfo[0].strides = __pyx_pybuffernd_complexes.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_complexes.diminfo[0].shape = __pyx_pybuffernd_complexes.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 403; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_11 = 0; __pyx_v_complexes = ((PyArrayObject *)__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/inference.pyx":404 * floats = np.empty(n, dtype='f8') * complexes = np.empty(n, dtype='c16') * ints = np.empty(n, dtype='i8') # <<<<<<<<<<<<<< * * for i from 0 <= i < n: */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 404; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s__empty); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 404; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyInt_FromSsize_t(__pyx_v_n); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 404; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 404; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 404; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_3)); if (PyDict_SetItem(__pyx_t_3, ((PyObject *)__pyx_n_s__dtype), ((PyObject *)__pyx_n_s__i8)) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 404; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_2 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_3)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 404; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __Pyx_DECREF(((PyObject *)__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_filename = __pyx_f[1]; __pyx_lineno = 404; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_12 = ((PyArrayObject *)__pyx_t_2); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_ints.rcbuffer->pybuffer); __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_ints.rcbuffer->pybuffer, (PyObject*)__pyx_t_12, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_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_ints.rcbuffer->pybuffer, (PyObject*)__pyx_v_ints, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_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_pybuffernd_ints.diminfo[0].strides = __pyx_pybuffernd_ints.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_ints.diminfo[0].shape = __pyx_pybuffernd_ints.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 404; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_12 = 0; __pyx_v_ints = ((PyArrayObject *)__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/inference.pyx":406 * ints = np.empty(n, dtype='i8') * * for i from 0 <= i < n: # <<<<<<<<<<<<<< * val = values[i] * */ __pyx_t_1 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_1; __pyx_v_i++) { /* "pandas/src/inference.pyx":407 * * for i from 0 <= i < n: * val = values[i] # <<<<<<<<<<<<<< * * if val in na_values: */ __pyx_t_13 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_13 < 0) { __pyx_t_13 += __pyx_pybuffernd_values.diminfo[0].shape; if (unlikely(__pyx_t_13 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_13 >= __pyx_pybuffernd_values.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 407; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_2 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_values.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_2); __Pyx_XDECREF_SET(__pyx_v_val, __pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/inference.pyx":409 * val = values[i] * * if val in na_values: # <<<<<<<<<<<<<< * floats[i] = complexes[i] = nan * seen_float = 1 */ __pyx_t_14 = (__Pyx_PySequence_Contains(__pyx_v_val, ((PyObject *)__pyx_v_na_values), Py_EQ)); if (unlikely(__pyx_t_14 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 409; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_15 = (__pyx_t_14 != 0); if (__pyx_t_15) { /* "pandas/src/inference.pyx":410 * * if val in na_values: * floats[i] = complexes[i] = nan # <<<<<<<<<<<<<< * seen_float = 1 * elif util.is_float_object(val): */ __pyx_t_16 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_16 < 0) { __pyx_t_16 += __pyx_pybuffernd_floats.diminfo[0].shape; if (unlikely(__pyx_t_16 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_16 >= __pyx_pybuffernd_floats.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 410; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_floats.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_floats.diminfo[0].strides) = __pyx_v_6pandas_3lib_nan; __pyx_t_17 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_17 < 0) { __pyx_t_17 += __pyx_pybuffernd_complexes.diminfo[0].shape; if (unlikely(__pyx_t_17 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_17 >= __pyx_pybuffernd_complexes.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 410; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_double_complex *, __pyx_pybuffernd_complexes.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_complexes.diminfo[0].strides) = __pyx_t_double_complex_from_parts(__pyx_v_6pandas_3lib_nan, 0); /* "pandas/src/inference.pyx":411 * if val in na_values: * floats[i] = complexes[i] = nan * seen_float = 1 # <<<<<<<<<<<<<< * elif util.is_float_object(val): * floats[i] = complexes[i] = val */ __pyx_v_seen_float = 1; goto __pyx_L5; } /* "pandas/src/inference.pyx":412 * floats[i] = complexes[i] = nan * seen_float = 1 * elif util.is_float_object(val): # <<<<<<<<<<<<<< * floats[i] = complexes[i] = val * seen_float = 1 */ __pyx_t_15 = (is_float_object(__pyx_v_val) != 0); if (__pyx_t_15) { /* "pandas/src/inference.pyx":413 * seen_float = 1 * elif util.is_float_object(val): * floats[i] = complexes[i] = val # <<<<<<<<<<<<<< * seen_float = 1 * elif util.is_integer_object(val): */ __pyx_t_18 = __pyx_PyFloat_AsDouble(__pyx_v_val); if (unlikely((__pyx_t_18 == (npy_float64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 413; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_19 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_19 < 0) { __pyx_t_19 += __pyx_pybuffernd_floats.diminfo[0].shape; if (unlikely(__pyx_t_19 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_19 >= __pyx_pybuffernd_floats.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 413; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_floats.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_floats.diminfo[0].strides) = __pyx_t_18; __pyx_t_20 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_v_val); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 413; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_21 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_21 < 0) { __pyx_t_21 += __pyx_pybuffernd_complexes.diminfo[0].shape; if (unlikely(__pyx_t_21 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_21 >= __pyx_pybuffernd_complexes.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 413; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_double_complex *, __pyx_pybuffernd_complexes.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_complexes.diminfo[0].strides) = __pyx_t_20; /* "pandas/src/inference.pyx":414 * elif util.is_float_object(val): * floats[i] = complexes[i] = val * seen_float = 1 # <<<<<<<<<<<<<< * elif util.is_integer_object(val): * floats[i] = ints[i] = val */ __pyx_v_seen_float = 1; goto __pyx_L5; } /* "pandas/src/inference.pyx":415 * floats[i] = complexes[i] = val * seen_float = 1 * elif util.is_integer_object(val): # <<<<<<<<<<<<<< * floats[i] = ints[i] = val * seen_int = 1 */ __pyx_t_15 = (is_integer_object(__pyx_v_val) != 0); if (__pyx_t_15) { /* "pandas/src/inference.pyx":416 * seen_float = 1 * elif util.is_integer_object(val): * floats[i] = ints[i] = val # <<<<<<<<<<<<<< * seen_int = 1 * elif val is None: */ __pyx_t_18 = __pyx_PyFloat_AsDouble(__pyx_v_val); if (unlikely((__pyx_t_18 == (npy_float64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 416; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_22 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_22 < 0) { __pyx_t_22 += __pyx_pybuffernd_floats.diminfo[0].shape; if (unlikely(__pyx_t_22 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_22 >= __pyx_pybuffernd_floats.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 416; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_floats.rcbuffer->pybuffer.buf, __pyx_t_22, __pyx_pybuffernd_floats.diminfo[0].strides) = __pyx_t_18; __pyx_t_23 = __Pyx_PyInt_from_py_npy_int64(__pyx_v_val); if (unlikely((__pyx_t_23 == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 416; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_24 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_24 < 0) { __pyx_t_24 += __pyx_pybuffernd_ints.diminfo[0].shape; if (unlikely(__pyx_t_24 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_24 >= __pyx_pybuffernd_ints.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 416; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_ints.rcbuffer->pybuffer.buf, __pyx_t_24, __pyx_pybuffernd_ints.diminfo[0].strides) = __pyx_t_23; /* "pandas/src/inference.pyx":417 * elif util.is_integer_object(val): * floats[i] = ints[i] = val * seen_int = 1 # <<<<<<<<<<<<<< * elif val is None: * floats[i] = complexes[i] = nan */ __pyx_v_seen_int = 1; goto __pyx_L5; } /* "pandas/src/inference.pyx":418 * floats[i] = ints[i] = val * seen_int = 1 * elif val is None: # <<<<<<<<<<<<<< * floats[i] = complexes[i] = nan * seen_float = 1 */ __pyx_t_15 = (__pyx_v_val == Py_None); __pyx_t_14 = (__pyx_t_15 != 0); if (__pyx_t_14) { /* "pandas/src/inference.pyx":419 * seen_int = 1 * elif val is None: * floats[i] = complexes[i] = nan # <<<<<<<<<<<<<< * seen_float = 1 * elif hasattr(val,'__len__') and len(val) == 0: */ __pyx_t_25 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_25 < 0) { __pyx_t_25 += __pyx_pybuffernd_floats.diminfo[0].shape; if (unlikely(__pyx_t_25 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_25 >= __pyx_pybuffernd_floats.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 419; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_floats.rcbuffer->pybuffer.buf, __pyx_t_25, __pyx_pybuffernd_floats.diminfo[0].strides) = __pyx_v_6pandas_3lib_nan; __pyx_t_26 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_26 < 0) { __pyx_t_26 += __pyx_pybuffernd_complexes.diminfo[0].shape; if (unlikely(__pyx_t_26 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_26 >= __pyx_pybuffernd_complexes.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 419; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_double_complex *, __pyx_pybuffernd_complexes.rcbuffer->pybuffer.buf, __pyx_t_26, __pyx_pybuffernd_complexes.diminfo[0].strides) = __pyx_t_double_complex_from_parts(__pyx_v_6pandas_3lib_nan, 0); /* "pandas/src/inference.pyx":420 * elif val is None: * floats[i] = complexes[i] = nan * seen_float = 1 # <<<<<<<<<<<<<< * elif hasattr(val,'__len__') and len(val) == 0: * if convert_empty or coerce_numeric: */ __pyx_v_seen_float = 1; goto __pyx_L5; } /* "pandas/src/inference.pyx":421 * floats[i] = complexes[i] = nan * seen_float = 1 * elif hasattr(val,'__len__') and len(val) == 0: # <<<<<<<<<<<<<< * if convert_empty or coerce_numeric: * floats[i] = complexes[i] = nan */ __pyx_t_14 = PyObject_HasAttr(__pyx_v_val, ((PyObject *)__pyx_n_s____len__)); if (unlikely(__pyx_t_14 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 421; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if ((__pyx_t_14 != 0)) { __pyx_t_27 = PyObject_Length(__pyx_v_val); if (unlikely(__pyx_t_27 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 421; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_15 = ((__pyx_t_27 == 0) != 0); __pyx_t_28 = __pyx_t_15; } else { __pyx_t_28 = (__pyx_t_14 != 0); } if (__pyx_t_28) { /* "pandas/src/inference.pyx":422 * seen_float = 1 * elif hasattr(val,'__len__') and len(val) == 0: * if convert_empty or coerce_numeric: # <<<<<<<<<<<<<< * floats[i] = complexes[i] = nan * seen_float = 1 */ __pyx_t_28 = __Pyx_PyObject_IsTrue(__pyx_v_convert_empty); if (unlikely(__pyx_t_28 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 422; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (!__pyx_t_28) { __pyx_t_14 = __Pyx_PyObject_IsTrue(__pyx_v_coerce_numeric); if (unlikely(__pyx_t_14 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 422; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_15 = __pyx_t_14; } else { __pyx_t_15 = __pyx_t_28; } if (__pyx_t_15) { /* "pandas/src/inference.pyx":423 * elif hasattr(val,'__len__') and len(val) == 0: * if convert_empty or coerce_numeric: * floats[i] = complexes[i] = nan # <<<<<<<<<<<<<< * seen_float = 1 * else: */ __pyx_t_27 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_27 < 0) { __pyx_t_27 += __pyx_pybuffernd_floats.diminfo[0].shape; if (unlikely(__pyx_t_27 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_27 >= __pyx_pybuffernd_floats.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 423; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_floats.rcbuffer->pybuffer.buf, __pyx_t_27, __pyx_pybuffernd_floats.diminfo[0].strides) = __pyx_v_6pandas_3lib_nan; __pyx_t_29 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_29 < 0) { __pyx_t_29 += __pyx_pybuffernd_complexes.diminfo[0].shape; if (unlikely(__pyx_t_29 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_29 >= __pyx_pybuffernd_complexes.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 423; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_double_complex *, __pyx_pybuffernd_complexes.rcbuffer->pybuffer.buf, __pyx_t_29, __pyx_pybuffernd_complexes.diminfo[0].strides) = __pyx_t_double_complex_from_parts(__pyx_v_6pandas_3lib_nan, 0); /* "pandas/src/inference.pyx":424 * if convert_empty or coerce_numeric: * floats[i] = complexes[i] = nan * seen_float = 1 # <<<<<<<<<<<<<< * else: * raise ValueError('Empty string encountered') */ __pyx_v_seen_float = 1; goto __pyx_L6; } /*else*/ { /* "pandas/src/inference.pyx":426 * seen_float = 1 * else: * raise ValueError('Empty string encountered') # <<<<<<<<<<<<<< * elif util.is_complex_object(val): * complexes[i] = val */ __pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_59), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 426; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 426; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_L6:; goto __pyx_L5; } /* "pandas/src/inference.pyx":427 * else: * raise ValueError('Empty string encountered') * elif util.is_complex_object(val): # <<<<<<<<<<<<<< * complexes[i] = val * seen_complex = 1 */ __pyx_t_15 = (is_complex_object(__pyx_v_val) != 0); if (__pyx_t_15) { /* "pandas/src/inference.pyx":428 * raise ValueError('Empty string encountered') * elif util.is_complex_object(val): * complexes[i] = val # <<<<<<<<<<<<<< * seen_complex = 1 * else: */ __pyx_t_20 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_v_val); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 428; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_30 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_30 < 0) { __pyx_t_30 += __pyx_pybuffernd_complexes.diminfo[0].shape; if (unlikely(__pyx_t_30 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_30 >= __pyx_pybuffernd_complexes.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 428; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_double_complex *, __pyx_pybuffernd_complexes.rcbuffer->pybuffer.buf, __pyx_t_30, __pyx_pybuffernd_complexes.diminfo[0].strides) = __pyx_t_20; /* "pandas/src/inference.pyx":429 * elif util.is_complex_object(val): * complexes[i] = val * seen_complex = 1 # <<<<<<<<<<<<<< * else: * try: */ __pyx_v_seen_complex = 1; goto __pyx_L5; } /*else*/ { /* "pandas/src/inference.pyx":431 * seen_complex = 1 * else: * try: # <<<<<<<<<<<<<< * status = floatify(val, &fval) * floats[i] = fval */ { __Pyx_ExceptionSave(&__pyx_t_10, &__pyx_t_9, &__pyx_t_8); __Pyx_XGOTREF(__pyx_t_10); __Pyx_XGOTREF(__pyx_t_9); __Pyx_XGOTREF(__pyx_t_8); /*try:*/ { /* "pandas/src/inference.pyx":432 * else: * try: * status = floatify(val, &fval) # <<<<<<<<<<<<<< * floats[i] = fval * if not seen_float: */ __pyx_t_7 = floatify(__pyx_v_val, (&__pyx_v_fval)); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 432; __pyx_clineno = __LINE__; goto __pyx_L7_error;} __pyx_v_status = __pyx_t_7; /* "pandas/src/inference.pyx":433 * try: * status = floatify(val, &fval) * floats[i] = fval # <<<<<<<<<<<<<< * if not seen_float: * if '.' in val or fval == INF or fval == NEGINF: */ __pyx_t_31 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_31 < 0) { __pyx_t_31 += __pyx_pybuffernd_floats.diminfo[0].shape; if (unlikely(__pyx_t_31 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_31 >= __pyx_pybuffernd_floats.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 433; __pyx_clineno = __LINE__; goto __pyx_L7_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_floats.rcbuffer->pybuffer.buf, __pyx_t_31, __pyx_pybuffernd_floats.diminfo[0].strides) = __pyx_v_fval; /* "pandas/src/inference.pyx":434 * status = floatify(val, &fval) * floats[i] = fval * if not seen_float: # <<<<<<<<<<<<<< * if '.' in val or fval == INF or fval == NEGINF: * seen_float = 1 */ __pyx_t_15 = ((!(__pyx_v_seen_float != 0)) != 0); if (__pyx_t_15) { /* "pandas/src/inference.pyx":435 * floats[i] = fval * if not seen_float: * if '.' in val or fval == INF or fval == NEGINF: # <<<<<<<<<<<<<< * seen_float = 1 * elif 'inf' in val: # special case to handle +/-inf */ __pyx_t_15 = (__Pyx_PySequence_Contains(((PyObject *)__pyx_kp_s_60), __pyx_v_val, Py_EQ)); if (unlikely(__pyx_t_15 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 435; __pyx_clineno = __LINE__; goto __pyx_L7_error;} if (!(__pyx_t_15 != 0)) { __pyx_t_28 = ((__pyx_v_fval == __pyx_v_6pandas_3lib_INF) != 0); if (!__pyx_t_28) { __pyx_t_14 = ((__pyx_v_fval == __pyx_v_6pandas_3lib_NEGINF) != 0); __pyx_t_32 = __pyx_t_14; } else { __pyx_t_32 = __pyx_t_28; } __pyx_t_28 = __pyx_t_32; } else { __pyx_t_28 = (__pyx_t_15 != 0); } if (__pyx_t_28) { /* "pandas/src/inference.pyx":436 * if not seen_float: * if '.' in val or fval == INF or fval == NEGINF: * seen_float = 1 # <<<<<<<<<<<<<< * elif 'inf' in val: # special case to handle +/-inf * seen_float = 1 */ __pyx_v_seen_float = 1; goto __pyx_L16; } /* "pandas/src/inference.pyx":437 * if '.' in val or fval == INF or fval == NEGINF: * seen_float = 1 * elif 'inf' in val: # special case to handle +/-inf # <<<<<<<<<<<<<< * seen_float = 1 * elif fval < fINT64_MAX and fval > fINT64_MIN: */ __pyx_t_28 = (__Pyx_PySequence_Contains(((PyObject *)__pyx_n_s__inf), __pyx_v_val, Py_EQ)); if (unlikely(__pyx_t_28 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 437; __pyx_clineno = __LINE__; goto __pyx_L7_error;} __pyx_t_15 = (__pyx_t_28 != 0); if (__pyx_t_15) { /* "pandas/src/inference.pyx":438 * seen_float = 1 * elif 'inf' in val: # special case to handle +/-inf * seen_float = 1 # <<<<<<<<<<<<<< * elif fval < fINT64_MAX and fval > fINT64_MIN: * try: */ __pyx_v_seen_float = 1; goto __pyx_L16; } /* "pandas/src/inference.pyx":439 * elif 'inf' in val: # special case to handle +/-inf * seen_float = 1 * elif fval < fINT64_MAX and fval > fINT64_MIN: # <<<<<<<<<<<<<< * try: * ints[i] = int(val) */ __pyx_t_15 = ((__pyx_v_fval < __pyx_v_6pandas_3lib_fINT64_MAX) != 0); if (__pyx_t_15) { __pyx_t_28 = ((__pyx_v_fval > __pyx_v_6pandas_3lib_fINT64_MIN) != 0); __pyx_t_32 = __pyx_t_28; } else { __pyx_t_32 = __pyx_t_15; } if (__pyx_t_32) { /* "pandas/src/inference.pyx":440 * seen_float = 1 * elif fval < fINT64_MAX and fval > fINT64_MIN: * try: # <<<<<<<<<<<<<< * ints[i] = int(val) * except ValueError: */ { __Pyx_ExceptionSave(&__pyx_t_33, &__pyx_t_34, &__pyx_t_35); __Pyx_XGOTREF(__pyx_t_33); __Pyx_XGOTREF(__pyx_t_34); __Pyx_XGOTREF(__pyx_t_35); /*try:*/ { /* "pandas/src/inference.pyx":441 * elif fval < fINT64_MAX and fval > fINT64_MIN: * try: * ints[i] = int(val) # <<<<<<<<<<<<<< * except ValueError: * ints[i] = fval */ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 441; __pyx_clineno = __LINE__; goto __pyx_L17_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_val); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_val); __Pyx_GIVEREF(__pyx_v_val); __pyx_t_3 = PyObject_Call(((PyObject *)((PyObject*)(&PyInt_Type))), ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 441; __pyx_clineno = __LINE__; goto __pyx_L17_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __pyx_t_23 = __Pyx_PyInt_from_py_npy_int64(__pyx_t_3); if (unlikely((__pyx_t_23 == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 441; __pyx_clineno = __LINE__; goto __pyx_L17_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_36 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_36 < 0) { __pyx_t_36 += __pyx_pybuffernd_ints.diminfo[0].shape; if (unlikely(__pyx_t_36 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_36 >= __pyx_pybuffernd_ints.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 441; __pyx_clineno = __LINE__; goto __pyx_L17_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_ints.rcbuffer->pybuffer.buf, __pyx_t_36, __pyx_pybuffernd_ints.diminfo[0].strides) = __pyx_t_23; } __Pyx_XDECREF(__pyx_t_33); __pyx_t_33 = 0; __Pyx_XDECREF(__pyx_t_34); __pyx_t_34 = 0; __Pyx_XDECREF(__pyx_t_35); __pyx_t_35 = 0; goto __pyx_L24_try_end; __pyx_L17_error:; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/inference.pyx":442 * try: * ints[i] = int(val) * except ValueError: # <<<<<<<<<<<<<< * ints[i] = fval * else: */ __pyx_t_7 = PyErr_ExceptionMatches(__pyx_builtin_ValueError); if (__pyx_t_7) { __Pyx_AddTraceback("pandas.lib.maybe_convert_numeric", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_3, &__pyx_t_2, &__pyx_t_4) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 442; __pyx_clineno = __LINE__; goto __pyx_L19_except_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_GOTREF(__pyx_t_2); __Pyx_GOTREF(__pyx_t_4); /* "pandas/src/inference.pyx":443 * ints[i] = int(val) * except ValueError: * ints[i] = fval # <<<<<<<<<<<<<< * else: * seen_float = 1 */ __pyx_t_37 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_37 < 0) { __pyx_t_37 += __pyx_pybuffernd_ints.diminfo[0].shape; if (unlikely(__pyx_t_37 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_37 >= __pyx_pybuffernd_ints.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 443; __pyx_clineno = __LINE__; goto __pyx_L19_except_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_ints.rcbuffer->pybuffer.buf, __pyx_t_37, __pyx_pybuffernd_ints.diminfo[0].strides) = ((__pyx_t_5numpy_int64_t)__pyx_v_fval); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; goto __pyx_L18_exception_handled; } __pyx_L19_except_error:; __Pyx_XGIVEREF(__pyx_t_33); __Pyx_XGIVEREF(__pyx_t_34); __Pyx_XGIVEREF(__pyx_t_35); __Pyx_ExceptionReset(__pyx_t_33, __pyx_t_34, __pyx_t_35); goto __pyx_L7_error; __pyx_L18_exception_handled:; __Pyx_XGIVEREF(__pyx_t_33); __Pyx_XGIVEREF(__pyx_t_34); __Pyx_XGIVEREF(__pyx_t_35); __Pyx_ExceptionReset(__pyx_t_33, __pyx_t_34, __pyx_t_35); __pyx_L24_try_end:; } goto __pyx_L16; } /*else*/ { /* "pandas/src/inference.pyx":445 * ints[i] = fval * else: * seen_float = 1 # <<<<<<<<<<<<<< * except: * if not coerce_numeric: */ __pyx_v_seen_float = 1; } __pyx_L16:; goto __pyx_L15; } __pyx_L15:; } __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; goto __pyx_L14_try_end; __pyx_L7_error:; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; /* "pandas/src/inference.pyx":446 * else: * seen_float = 1 * except: # <<<<<<<<<<<<<< * if not coerce_numeric: * raise */ /*except:*/ { __Pyx_AddTraceback("pandas.lib.maybe_convert_numeric", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_2, &__pyx_t_3) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 446; __pyx_clineno = __LINE__; goto __pyx_L9_except_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_GOTREF(__pyx_t_2); __Pyx_GOTREF(__pyx_t_3); /* "pandas/src/inference.pyx":447 * seen_float = 1 * except: * if not coerce_numeric: # <<<<<<<<<<<<<< * raise * */ __pyx_t_32 = __Pyx_PyObject_IsTrue(__pyx_v_coerce_numeric); if (unlikely(__pyx_t_32 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 447; __pyx_clineno = __LINE__; goto __pyx_L9_except_error;} __pyx_t_15 = ((!__pyx_t_32) != 0); if (__pyx_t_15) { /* "pandas/src/inference.pyx":448 * except: * if not coerce_numeric: * raise # <<<<<<<<<<<<<< * * floats[i] = nan */ __Pyx_GIVEREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_3); __Pyx_ErrRestore(__pyx_t_4, __pyx_t_2, __pyx_t_3); __pyx_t_4 = 0; __pyx_t_2 = 0; __pyx_t_3 = 0; {__pyx_filename = __pyx_f[1]; __pyx_lineno = 448; __pyx_clineno = __LINE__; goto __pyx_L9_except_error;} goto __pyx_L29; } __pyx_L29:; /* "pandas/src/inference.pyx":450 * raise * * floats[i] = nan # <<<<<<<<<<<<<< * seen_float = 1 * */ __pyx_t_38 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_38 < 0) { __pyx_t_38 += __pyx_pybuffernd_floats.diminfo[0].shape; if (unlikely(__pyx_t_38 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_38 >= __pyx_pybuffernd_floats.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 450; __pyx_clineno = __LINE__; goto __pyx_L9_except_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_floats.rcbuffer->pybuffer.buf, __pyx_t_38, __pyx_pybuffernd_floats.diminfo[0].strides) = __pyx_v_6pandas_3lib_nan; /* "pandas/src/inference.pyx":451 * * floats[i] = nan * seen_float = 1 # <<<<<<<<<<<<<< * * */ __pyx_v_seen_float = 1; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L8_exception_handled; } __pyx_L9_except_error:; __Pyx_XGIVEREF(__pyx_t_10); __Pyx_XGIVEREF(__pyx_t_9); __Pyx_XGIVEREF(__pyx_t_8); __Pyx_ExceptionReset(__pyx_t_10, __pyx_t_9, __pyx_t_8); goto __pyx_L1_error; __pyx_L8_exception_handled:; __Pyx_XGIVEREF(__pyx_t_10); __Pyx_XGIVEREF(__pyx_t_9); __Pyx_XGIVEREF(__pyx_t_8); __Pyx_ExceptionReset(__pyx_t_10, __pyx_t_9, __pyx_t_8); __pyx_L14_try_end:; } } __pyx_L5:; } /* "pandas/src/inference.pyx":454 * * * if seen_complex: # <<<<<<<<<<<<<< * return complexes * elif seen_float: */ __pyx_t_15 = (__pyx_v_seen_complex != 0); if (__pyx_t_15) { /* "pandas/src/inference.pyx":455 * * if seen_complex: * return complexes # <<<<<<<<<<<<<< * elif seen_float: * return floats */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_complexes)); __pyx_r = ((PyObject *)__pyx_v_complexes); goto __pyx_L0; goto __pyx_L30; } /* "pandas/src/inference.pyx":456 * if seen_complex: * return complexes * elif seen_float: # <<<<<<<<<<<<<< * return floats * else: */ __pyx_t_15 = (__pyx_v_seen_float != 0); if (__pyx_t_15) { /* "pandas/src/inference.pyx":457 * return complexes * elif seen_float: * return floats # <<<<<<<<<<<<<< * else: * return ints */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_floats)); __pyx_r = ((PyObject *)__pyx_v_floats); goto __pyx_L0; goto __pyx_L30; } /*else*/ { /* "pandas/src/inference.pyx":459 * return floats * else: * return ints # <<<<<<<<<<<<<< * * def maybe_convert_objects(ndarray[object] objects, bint try_float=0, */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_ints)); __pyx_r = ((PyObject *)__pyx_v_ints); goto __pyx_L0; } __pyx_L30:; __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_XDECREF(__pyx_t_5); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_complexes.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_floats.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_ints.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.lib.maybe_convert_numeric", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_complexes.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_floats.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_ints.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_floats); __Pyx_XDECREF((PyObject *)__pyx_v_complexes); __Pyx_XDECREF((PyObject *)__pyx_v_ints); __Pyx_XDECREF(__pyx_v_val); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_3lib_143maybe_convert_objects(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6pandas_3lib_142maybe_convert_objects[] = "\n Type inference function-- convert object array to proper dtype\n "; static PyMethodDef __pyx_mdef_6pandas_3lib_143maybe_convert_objects = {__Pyx_NAMESTR("maybe_convert_objects"), (PyCFunction)__pyx_pw_6pandas_3lib_143maybe_convert_objects, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_3lib_142maybe_convert_objects)}; static PyObject *__pyx_pw_6pandas_3lib_143maybe_convert_objects(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_objects = 0; int __pyx_v_try_float; int __pyx_v_safe; int __pyx_v_convert_datetime; int __pyx_v_convert_timedelta; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("maybe_convert_objects (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__objects,&__pyx_n_s__try_float,&__pyx_n_s__safe,&__pyx_n_s__convert_datetime,&__pyx_n_s__convert_timedelta,0}; PyObject* values[5] = {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 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__objects)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__try_float); if (value) { values[1] = value; kw_args--; } } case 2: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__safe); if (value) { values[2] = value; kw_args--; } } case 3: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__convert_datetime); if (value) { values[3] = value; kw_args--; } } case 4: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__convert_timedelta); if (value) { values[4] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "maybe_convert_objects") < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 461; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_objects = ((PyArrayObject *)values[0]); if (values[1]) { __pyx_v_try_float = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_try_float == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 461; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } else { __pyx_v_try_float = ((int)0); } if (values[2]) { __pyx_v_safe = __Pyx_PyObject_IsTrue(values[2]); if (unlikely((__pyx_v_safe == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 462; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } else { __pyx_v_safe = ((int)0); } if (values[3]) { __pyx_v_convert_datetime = __Pyx_PyObject_IsTrue(values[3]); if (unlikely((__pyx_v_convert_datetime == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 462; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } else { __pyx_v_convert_datetime = ((int)0); } if (values[4]) { __pyx_v_convert_timedelta = __Pyx_PyObject_IsTrue(values[4]); if (unlikely((__pyx_v_convert_timedelta == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 462; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } else { __pyx_v_convert_timedelta = ((int)0); } } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("maybe_convert_objects", 0, 1, 5, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 461; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.lib.maybe_convert_objects", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_objects), __pyx_ptype_5numpy_ndarray, 1, "objects", 0))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 461; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_3lib_142maybe_convert_objects(__pyx_self, __pyx_v_objects, __pyx_v_try_float, __pyx_v_safe, __pyx_v_convert_datetime, __pyx_v_convert_timedelta); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/inference.pyx":461 * return ints * * def maybe_convert_objects(ndarray[object] objects, bint try_float=0, # <<<<<<<<<<<<<< * bint safe=0, bint convert_datetime=0, bint convert_timedelta=0): * ''' */ static PyObject *__pyx_pf_6pandas_3lib_142maybe_convert_objects(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_objects, int __pyx_v_try_float, int __pyx_v_safe, int __pyx_v_convert_datetime, int __pyx_v_convert_timedelta) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_n; PyArrayObject *__pyx_v_floats = 0; PyArrayObject *__pyx_v_complexes = 0; PyArrayObject *__pyx_v_ints = 0; PyArrayObject *__pyx_v_bools = 0; PyArrayObject *__pyx_v_idatetimes = 0; PyArrayObject *__pyx_v_itimedeltas = 0; int __pyx_v_seen_float; int __pyx_v_seen_complex; int __pyx_v_seen_datetime; int __pyx_v_seen_timedelta; int __pyx_v_seen_int; int __pyx_v_seen_bool; int __pyx_v_seen_object; int __pyx_v_seen_null; int __pyx_v_seen_numeric; PyObject *__pyx_v_val = 0; CYTHON_UNUSED PyObject *__pyx_v_onan = 0; __pyx_t_5numpy_float64_t __pyx_v_fnan; PyObject *__pyx_v_datetimes = NULL; PyObject *__pyx_v_timedeltas = NULL; __Pyx_LocalBuf_ND __pyx_pybuffernd_bools; __Pyx_Buffer __pyx_pybuffer_bools; __Pyx_LocalBuf_ND __pyx_pybuffernd_complexes; __Pyx_Buffer __pyx_pybuffer_complexes; __Pyx_LocalBuf_ND __pyx_pybuffernd_floats; __Pyx_Buffer __pyx_pybuffer_floats; __Pyx_LocalBuf_ND __pyx_pybuffernd_idatetimes; __Pyx_Buffer __pyx_pybuffer_idatetimes; __Pyx_LocalBuf_ND __pyx_pybuffernd_ints; __Pyx_Buffer __pyx_pybuffer_ints; __Pyx_LocalBuf_ND __pyx_pybuffernd_itimedeltas; __Pyx_Buffer __pyx_pybuffer_itimedeltas; __Pyx_LocalBuf_ND __pyx_pybuffernd_objects; __Pyx_Buffer __pyx_pybuffer_objects; 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; PyArrayObject *__pyx_t_6 = NULL; int __pyx_t_7; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; PyArrayObject *__pyx_t_11 = NULL; PyArrayObject *__pyx_t_12 = NULL; PyObject *__pyx_t_13 = NULL; PyArrayObject *__pyx_t_14 = NULL; int __pyx_t_15; PyArrayObject *__pyx_t_16 = NULL; PyArrayObject *__pyx_t_17 = NULL; __pyx_t_5numpy_float64_t __pyx_t_18; Py_ssize_t __pyx_t_19; int __pyx_t_20; Py_ssize_t __pyx_t_21; Py_ssize_t __pyx_t_22; __pyx_t_5numpy_uint8_t __pyx_t_23; Py_ssize_t __pyx_t_24; Py_ssize_t __pyx_t_25; __pyx_t_double_complex __pyx_t_26; Py_ssize_t __pyx_t_27; __pyx_t_5numpy_int64_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; double __pyx_t_36; Py_ssize_t __pyx_t_37; Py_ssize_t __pyx_t_38; int __pyx_t_39; int __pyx_t_40; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("maybe_convert_objects", 0); __pyx_pybuffer_floats.pybuffer.buf = NULL; __pyx_pybuffer_floats.refcount = 0; __pyx_pybuffernd_floats.data = NULL; __pyx_pybuffernd_floats.rcbuffer = &__pyx_pybuffer_floats; __pyx_pybuffer_complexes.pybuffer.buf = NULL; __pyx_pybuffer_complexes.refcount = 0; __pyx_pybuffernd_complexes.data = NULL; __pyx_pybuffernd_complexes.rcbuffer = &__pyx_pybuffer_complexes; __pyx_pybuffer_ints.pybuffer.buf = NULL; __pyx_pybuffer_ints.refcount = 0; __pyx_pybuffernd_ints.data = NULL; __pyx_pybuffernd_ints.rcbuffer = &__pyx_pybuffer_ints; __pyx_pybuffer_bools.pybuffer.buf = NULL; __pyx_pybuffer_bools.refcount = 0; __pyx_pybuffernd_bools.data = NULL; __pyx_pybuffernd_bools.rcbuffer = &__pyx_pybuffer_bools; __pyx_pybuffer_idatetimes.pybuffer.buf = NULL; __pyx_pybuffer_idatetimes.refcount = 0; __pyx_pybuffernd_idatetimes.data = NULL; __pyx_pybuffernd_idatetimes.rcbuffer = &__pyx_pybuffer_idatetimes; __pyx_pybuffer_itimedeltas.pybuffer.buf = NULL; __pyx_pybuffer_itimedeltas.refcount = 0; __pyx_pybuffernd_itimedeltas.data = NULL; __pyx_pybuffernd_itimedeltas.rcbuffer = &__pyx_pybuffer_itimedeltas; __pyx_pybuffer_objects.pybuffer.buf = NULL; __pyx_pybuffer_objects.refcount = 0; __pyx_pybuffernd_objects.data = NULL; __pyx_pybuffernd_objects.rcbuffer = &__pyx_pybuffer_objects; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_objects.rcbuffer->pybuffer, (PyObject*)__pyx_v_objects, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 461; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_objects.diminfo[0].strides = __pyx_pybuffernd_objects.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_objects.diminfo[0].shape = __pyx_pybuffernd_objects.rcbuffer->pybuffer.shape[0]; /* "pandas/src/inference.pyx":474 * ndarray[int64_t] idatetimes * ndarray[int64_t] itimedeltas * bint seen_float = 0 # <<<<<<<<<<<<<< * bint seen_complex = 0 * bint seen_datetime = 0 */ __pyx_v_seen_float = 0; /* "pandas/src/inference.pyx":475 * ndarray[int64_t] itimedeltas * bint seen_float = 0 * bint seen_complex = 0 # <<<<<<<<<<<<<< * bint seen_datetime = 0 * bint seen_timedelta = 0 */ __pyx_v_seen_complex = 0; /* "pandas/src/inference.pyx":476 * bint seen_float = 0 * bint seen_complex = 0 * bint seen_datetime = 0 # <<<<<<<<<<<<<< * bint seen_timedelta = 0 * bint seen_int = 0 */ __pyx_v_seen_datetime = 0; /* "pandas/src/inference.pyx":477 * bint seen_complex = 0 * bint seen_datetime = 0 * bint seen_timedelta = 0 # <<<<<<<<<<<<<< * bint seen_int = 0 * bint seen_bool = 0 */ __pyx_v_seen_timedelta = 0; /* "pandas/src/inference.pyx":478 * bint seen_datetime = 0 * bint seen_timedelta = 0 * bint seen_int = 0 # <<<<<<<<<<<<<< * bint seen_bool = 0 * bint seen_object = 0 */ __pyx_v_seen_int = 0; /* "pandas/src/inference.pyx":479 * bint seen_timedelta = 0 * bint seen_int = 0 * bint seen_bool = 0 # <<<<<<<<<<<<<< * bint seen_object = 0 * bint seen_null = 0 */ __pyx_v_seen_bool = 0; /* "pandas/src/inference.pyx":480 * bint seen_int = 0 * bint seen_bool = 0 * bint seen_object = 0 # <<<<<<<<<<<<<< * bint seen_null = 0 * bint seen_numeric = 0 */ __pyx_v_seen_object = 0; /* "pandas/src/inference.pyx":481 * bint seen_bool = 0 * bint seen_object = 0 * bint seen_null = 0 # <<<<<<<<<<<<<< * bint seen_numeric = 0 * object val, onan */ __pyx_v_seen_null = 0; /* "pandas/src/inference.pyx":482 * bint seen_object = 0 * bint seen_null = 0 * bint seen_numeric = 0 # <<<<<<<<<<<<<< * object val, onan * float64_t fval, fnan */ __pyx_v_seen_numeric = 0; /* "pandas/src/inference.pyx":486 * float64_t fval, fnan * * n = len(objects) # <<<<<<<<<<<<<< * * floats = np.empty(n, dtype='f8') */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_objects)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 486; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/src/inference.pyx":488 * n = len(objects) * * floats = np.empty(n, dtype='f8') # <<<<<<<<<<<<<< * complexes = np.empty(n, dtype='c16') * ints = np.empty(n, dtype='i8') */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 488; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 488; __pyx_clineno = __LINE__; goto __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_n); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 488; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 488; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 488; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_2)); if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__dtype), ((PyObject *)__pyx_n_s__f8)) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 488; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_5 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 488; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 488; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_6 = ((PyArrayObject *)__pyx_t_5); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_floats.rcbuffer->pybuffer); __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_floats.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_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_floats.rcbuffer->pybuffer, (PyObject*)__pyx_v_floats, &__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_pybuffernd_floats.diminfo[0].strides = __pyx_pybuffernd_floats.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_floats.diminfo[0].shape = __pyx_pybuffernd_floats.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 488; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_6 = 0; __pyx_v_floats = ((PyArrayObject *)__pyx_t_5); __pyx_t_5 = 0; /* "pandas/src/inference.pyx":489 * * floats = np.empty(n, dtype='f8') * complexes = np.empty(n, dtype='c16') # <<<<<<<<<<<<<< * ints = np.empty(n, dtype='i8') * bools = np.empty(n, dtype=np.uint8) */ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 489; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s__empty); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 489; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyInt_FromSsize_t(__pyx_v_n); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 489; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 489; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyDict_New(); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 489; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_5)); if (PyDict_SetItem(__pyx_t_5, ((PyObject *)__pyx_n_s__dtype), ((PyObject *)__pyx_n_s__c16)) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 489; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_3 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_5)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 489; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 489; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_11 = ((PyArrayObject *)__pyx_t_3); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_complexes.rcbuffer->pybuffer); __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_complexes.rcbuffer->pybuffer, (PyObject*)__pyx_t_11, &__Pyx_TypeInfo___pyx_t_double_complex, 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_complexes.rcbuffer->pybuffer, (PyObject*)__pyx_v_complexes, &__Pyx_TypeInfo___pyx_t_double_complex, 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_pybuffernd_complexes.diminfo[0].strides = __pyx_pybuffernd_complexes.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_complexes.diminfo[0].shape = __pyx_pybuffernd_complexes.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 489; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_11 = 0; __pyx_v_complexes = ((PyArrayObject *)__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/inference.pyx":490 * floats = np.empty(n, dtype='f8') * complexes = np.empty(n, dtype='c16') * ints = np.empty(n, dtype='i8') # <<<<<<<<<<<<<< * bools = np.empty(n, dtype=np.uint8) * */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 490; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s__empty); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 490; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyInt_FromSsize_t(__pyx_v_n); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 490; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 490; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 490; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_3)); if (PyDict_SetItem(__pyx_t_3, ((PyObject *)__pyx_n_s__dtype), ((PyObject *)__pyx_n_s__i8)) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 490; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_2 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_3)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 490; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __Pyx_DECREF(((PyObject *)__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_filename = __pyx_f[1]; __pyx_lineno = 490; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_12 = ((PyArrayObject *)__pyx_t_2); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_ints.rcbuffer->pybuffer); __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_ints.rcbuffer->pybuffer, (PyObject*)__pyx_t_12, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_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_ints.rcbuffer->pybuffer, (PyObject*)__pyx_v_ints, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_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_pybuffernd_ints.diminfo[0].strides = __pyx_pybuffernd_ints.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_ints.diminfo[0].shape = __pyx_pybuffernd_ints.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 490; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_12 = 0; __pyx_v_ints = ((PyArrayObject *)__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/inference.pyx":491 * complexes = np.empty(n, dtype='c16') * ints = np.empty(n, dtype='i8') * bools = np.empty(n, dtype=np.uint8) # <<<<<<<<<<<<<< * * if convert_datetime: */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 491; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 491; __pyx_clineno = __LINE__; goto __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_n); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 491; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 491; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 491; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_2)); __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 491; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s__uint8); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 491; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__dtype), __pyx_t_13) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 491; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_13 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 491; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; if (!(likely(((__pyx_t_13) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_13, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 491; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_14 = ((PyArrayObject *)__pyx_t_13); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_bools.rcbuffer->pybuffer); __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_bools.rcbuffer->pybuffer, (PyObject*)__pyx_t_14, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_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_bools.rcbuffer->pybuffer, (PyObject*)__pyx_v_bools, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_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_pybuffernd_bools.diminfo[0].strides = __pyx_pybuffernd_bools.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_bools.diminfo[0].shape = __pyx_pybuffernd_bools.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 491; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_14 = 0; __pyx_v_bools = ((PyArrayObject *)__pyx_t_13); __pyx_t_13 = 0; /* "pandas/src/inference.pyx":493 * bools = np.empty(n, dtype=np.uint8) * * if convert_datetime: # <<<<<<<<<<<<<< * datetimes = np.empty(n, dtype='M8[ns]') * idatetimes = datetimes.view(np.int64) */ __pyx_t_15 = (__pyx_v_convert_datetime != 0); if (__pyx_t_15) { /* "pandas/src/inference.pyx":494 * * if convert_datetime: * datetimes = np.empty(n, dtype='M8[ns]') # <<<<<<<<<<<<<< * idatetimes = datetimes.view(np.int64) * */ __pyx_t_13 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 494; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_13, __pyx_n_s__empty); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 494; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_13 = PyInt_FromSsize_t(__pyx_v_n); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 494; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 494; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_13); __Pyx_GIVEREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_13 = PyDict_New(); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 494; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_13)); if (PyDict_SetItem(__pyx_t_13, ((PyObject *)__pyx_n_s__dtype), ((PyObject *)__pyx_kp_s_10)) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 494; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_3 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_13)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 494; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_13)); __pyx_t_13 = 0; __pyx_v_datetimes = __pyx_t_3; __pyx_t_3 = 0; /* "pandas/src/inference.pyx":495 * if convert_datetime: * datetimes = np.empty(n, dtype='M8[ns]') * idatetimes = datetimes.view(np.int64) # <<<<<<<<<<<<<< * * if convert_timedelta: */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_datetimes, __pyx_n_s__view); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 495; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_13 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 495; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_13, __pyx_n_s__int64); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 495; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_13 = PyTuple_New(1); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 495; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_13), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 495; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_13)); __pyx_t_13 = 0; if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 495; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_16 = ((PyArrayObject *)__pyx_t_4); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_idatetimes.rcbuffer->pybuffer); __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_idatetimes.rcbuffer->pybuffer, (PyObject*)__pyx_t_16, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_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_idatetimes.rcbuffer->pybuffer, (PyObject*)__pyx_v_idatetimes, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_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_pybuffernd_idatetimes.diminfo[0].strides = __pyx_pybuffernd_idatetimes.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_idatetimes.diminfo[0].shape = __pyx_pybuffernd_idatetimes.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 495; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_16 = 0; __pyx_v_idatetimes = ((PyArrayObject *)__pyx_t_4); __pyx_t_4 = 0; goto __pyx_L3; } __pyx_L3:; /* "pandas/src/inference.pyx":497 * idatetimes = datetimes.view(np.int64) * * if convert_timedelta: # <<<<<<<<<<<<<< * timedeltas = np.empty(n, dtype='m8[ns]') * itimedeltas = timedeltas.view(np.int64) */ __pyx_t_15 = (__pyx_v_convert_timedelta != 0); if (__pyx_t_15) { /* "pandas/src/inference.pyx":498 * * if convert_timedelta: * timedeltas = np.empty(n, dtype='m8[ns]') # <<<<<<<<<<<<<< * itimedeltas = timedeltas.view(np.int64) * */ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 498; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s__empty); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 498; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyInt_FromSsize_t(__pyx_v_n); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 498; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 498; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyDict_New(); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 498; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_4)); if (PyDict_SetItem(__pyx_t_4, ((PyObject *)__pyx_n_s__dtype), ((PyObject *)__pyx_kp_s_11)) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 498; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_2 = PyObject_Call(__pyx_t_13, ((PyObject *)__pyx_t_3), ((PyObject *)__pyx_t_4)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 498; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __pyx_v_timedeltas = __pyx_t_2; __pyx_t_2 = 0; /* "pandas/src/inference.pyx":499 * if convert_timedelta: * timedeltas = np.empty(n, dtype='m8[ns]') * itimedeltas = timedeltas.view(np.int64) # <<<<<<<<<<<<<< * * onan = np.nan */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_timedeltas, __pyx_n_s__view); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 499; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 499; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s__int64); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 499; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 499; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 499; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 499; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_17 = ((PyArrayObject *)__pyx_t_3); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_itimedeltas.rcbuffer->pybuffer); __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_itimedeltas.rcbuffer->pybuffer, (PyObject*)__pyx_t_17, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_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_itimedeltas.rcbuffer->pybuffer, (PyObject*)__pyx_v_itimedeltas, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_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_pybuffernd_itimedeltas.diminfo[0].strides = __pyx_pybuffernd_itimedeltas.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_itimedeltas.diminfo[0].shape = __pyx_pybuffernd_itimedeltas.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 499; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_17 = 0; __pyx_v_itimedeltas = ((PyArrayObject *)__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L4; } __pyx_L4:; /* "pandas/src/inference.pyx":501 * itimedeltas = timedeltas.view(np.int64) * * onan = np.nan # <<<<<<<<<<<<<< * fnan = np.nan * */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 501; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s__nan); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 501; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_onan = __pyx_t_4; __pyx_t_4 = 0; /* "pandas/src/inference.pyx":502 * * onan = np.nan * fnan = np.nan # <<<<<<<<<<<<<< * * for i from 0 <= i < n: */ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 502; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s__nan); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 502; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_18 = __pyx_PyFloat_AsDouble(__pyx_t_3); if (unlikely((__pyx_t_18 == (npy_float64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 502; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_fnan = __pyx_t_18; /* "pandas/src/inference.pyx":504 * fnan = np.nan * * for i from 0 <= i < n: # <<<<<<<<<<<<<< * val = objects[i] * */ __pyx_t_1 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_1; __pyx_v_i++) { /* "pandas/src/inference.pyx":505 * * for i from 0 <= i < n: * val = objects[i] # <<<<<<<<<<<<<< * * if val is None: */ __pyx_t_19 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_19 < 0) { __pyx_t_19 += __pyx_pybuffernd_objects.diminfo[0].shape; if (unlikely(__pyx_t_19 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_19 >= __pyx_pybuffernd_objects.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 505; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_3 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_objects.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_objects.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_3); __Pyx_XDECREF_SET(__pyx_v_val, __pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/inference.pyx":507 * val = objects[i] * * if val is None: # <<<<<<<<<<<<<< * seen_null = 1 * floats[i] = complexes[i] = fnan */ __pyx_t_15 = (__pyx_v_val == Py_None); __pyx_t_20 = (__pyx_t_15 != 0); if (__pyx_t_20) { /* "pandas/src/inference.pyx":508 * * if val is None: * seen_null = 1 # <<<<<<<<<<<<<< * floats[i] = complexes[i] = fnan * elif util.is_bool_object(val): */ __pyx_v_seen_null = 1; /* "pandas/src/inference.pyx":509 * if val is None: * seen_null = 1 * floats[i] = complexes[i] = fnan # <<<<<<<<<<<<<< * elif util.is_bool_object(val): * seen_bool = 1 */ __pyx_t_21 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_21 < 0) { __pyx_t_21 += __pyx_pybuffernd_floats.diminfo[0].shape; if (unlikely(__pyx_t_21 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_21 >= __pyx_pybuffernd_floats.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 509; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_floats.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_floats.diminfo[0].strides) = __pyx_v_fnan; __pyx_t_22 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_22 < 0) { __pyx_t_22 += __pyx_pybuffernd_complexes.diminfo[0].shape; if (unlikely(__pyx_t_22 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_22 >= __pyx_pybuffernd_complexes.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 509; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_double_complex *, __pyx_pybuffernd_complexes.rcbuffer->pybuffer.buf, __pyx_t_22, __pyx_pybuffernd_complexes.diminfo[0].strides) = __pyx_t_double_complex_from_parts(__pyx_v_fnan, 0); goto __pyx_L7; } /* "pandas/src/inference.pyx":510 * seen_null = 1 * floats[i] = complexes[i] = fnan * elif util.is_bool_object(val): # <<<<<<<<<<<<<< * seen_bool = 1 * bools[i] = val */ __pyx_t_20 = (is_bool_object(__pyx_v_val) != 0); if (__pyx_t_20) { /* "pandas/src/inference.pyx":511 * floats[i] = complexes[i] = fnan * elif util.is_bool_object(val): * seen_bool = 1 # <<<<<<<<<<<<<< * bools[i] = val * elif util.is_float_object(val): */ __pyx_v_seen_bool = 1; /* "pandas/src/inference.pyx":512 * elif util.is_bool_object(val): * seen_bool = 1 * bools[i] = val # <<<<<<<<<<<<<< * elif util.is_float_object(val): * floats[i] = complexes[i] = val */ __pyx_t_23 = __Pyx_PyInt_from_py_npy_uint8(__pyx_v_val); if (unlikely((__pyx_t_23 == (npy_uint8)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 512; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_24 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_24 < 0) { __pyx_t_24 += __pyx_pybuffernd_bools.diminfo[0].shape; if (unlikely(__pyx_t_24 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_24 >= __pyx_pybuffernd_bools.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 512; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_bools.rcbuffer->pybuffer.buf, __pyx_t_24, __pyx_pybuffernd_bools.diminfo[0].strides) = __pyx_t_23; goto __pyx_L7; } /* "pandas/src/inference.pyx":513 * seen_bool = 1 * bools[i] = val * elif util.is_float_object(val): # <<<<<<<<<<<<<< * floats[i] = complexes[i] = val * seen_float = 1 */ __pyx_t_20 = (is_float_object(__pyx_v_val) != 0); if (__pyx_t_20) { /* "pandas/src/inference.pyx":514 * bools[i] = val * elif util.is_float_object(val): * floats[i] = complexes[i] = val # <<<<<<<<<<<<<< * seen_float = 1 * elif util.is_datetime64_object(val): */ __pyx_t_18 = __pyx_PyFloat_AsDouble(__pyx_v_val); if (unlikely((__pyx_t_18 == (npy_float64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 514; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_25 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_25 < 0) { __pyx_t_25 += __pyx_pybuffernd_floats.diminfo[0].shape; if (unlikely(__pyx_t_25 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_25 >= __pyx_pybuffernd_floats.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 514; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_floats.rcbuffer->pybuffer.buf, __pyx_t_25, __pyx_pybuffernd_floats.diminfo[0].strides) = __pyx_t_18; __pyx_t_26 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_v_val); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 514; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_27 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_27 < 0) { __pyx_t_27 += __pyx_pybuffernd_complexes.diminfo[0].shape; if (unlikely(__pyx_t_27 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_27 >= __pyx_pybuffernd_complexes.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 514; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_double_complex *, __pyx_pybuffernd_complexes.rcbuffer->pybuffer.buf, __pyx_t_27, __pyx_pybuffernd_complexes.diminfo[0].strides) = __pyx_t_26; /* "pandas/src/inference.pyx":515 * elif util.is_float_object(val): * floats[i] = complexes[i] = val * seen_float = 1 # <<<<<<<<<<<<<< * elif util.is_datetime64_object(val): * if convert_datetime: */ __pyx_v_seen_float = 1; goto __pyx_L7; } /* "pandas/src/inference.pyx":516 * floats[i] = complexes[i] = val * seen_float = 1 * elif util.is_datetime64_object(val): # <<<<<<<<<<<<<< * if convert_datetime: * idatetimes[i] = convert_to_tsobject(val, None, None).value */ __pyx_t_20 = (is_datetime64_object(__pyx_v_val) != 0); if (__pyx_t_20) { /* "pandas/src/inference.pyx":517 * seen_float = 1 * elif util.is_datetime64_object(val): * if convert_datetime: # <<<<<<<<<<<<<< * idatetimes[i] = convert_to_tsobject(val, None, None).value * seen_datetime = 1 */ __pyx_t_20 = (__pyx_v_convert_datetime != 0); if (__pyx_t_20) { /* "pandas/src/inference.pyx":518 * elif util.is_datetime64_object(val): * if convert_datetime: * idatetimes[i] = convert_to_tsobject(val, None, None).value # <<<<<<<<<<<<<< * seen_datetime = 1 * else: */ __pyx_t_3 = __pyx_f_6pandas_5tslib_convert_to_tsobject(__pyx_v_val, Py_None, Py_None); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 518; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s__value); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 518; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_28 = __Pyx_PyInt_from_py_npy_int64(__pyx_t_4); if (unlikely((__pyx_t_28 == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 518; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_29 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_29 < 0) { __pyx_t_29 += __pyx_pybuffernd_idatetimes.diminfo[0].shape; if (unlikely(__pyx_t_29 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_29 >= __pyx_pybuffernd_idatetimes.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 518; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_idatetimes.rcbuffer->pybuffer.buf, __pyx_t_29, __pyx_pybuffernd_idatetimes.diminfo[0].strides) = __pyx_t_28; /* "pandas/src/inference.pyx":519 * if convert_datetime: * idatetimes[i] = convert_to_tsobject(val, None, None).value * seen_datetime = 1 # <<<<<<<<<<<<<< * else: * seen_object = 1 */ __pyx_v_seen_datetime = 1; goto __pyx_L8; } /*else*/ { /* "pandas/src/inference.pyx":521 * seen_datetime = 1 * else: * seen_object = 1 # <<<<<<<<<<<<<< * # objects[i] = val.astype('O') * break */ __pyx_v_seen_object = 1; /* "pandas/src/inference.pyx":523 * seen_object = 1 * # objects[i] = val.astype('O') * break # <<<<<<<<<<<<<< * elif is_timedelta(val): * if convert_timedelta: */ goto __pyx_L6_break; } __pyx_L8:; goto __pyx_L7; } /* "pandas/src/inference.pyx":524 * # objects[i] = val.astype('O') * break * elif is_timedelta(val): # <<<<<<<<<<<<<< * if convert_timedelta: * itimedeltas[i] = convert_to_timedelta64(val, 'ns', False) */ __pyx_t_20 = (__pyx_f_6pandas_3lib_is_timedelta(__pyx_v_val) != 0); if (__pyx_t_20) { /* "pandas/src/inference.pyx":525 * break * elif is_timedelta(val): * if convert_timedelta: # <<<<<<<<<<<<<< * itimedeltas[i] = convert_to_timedelta64(val, 'ns', False) * seen_timedelta = 1 */ __pyx_t_20 = (__pyx_v_convert_timedelta != 0); if (__pyx_t_20) { /* "pandas/src/inference.pyx":526 * elif is_timedelta(val): * if convert_timedelta: * itimedeltas[i] = convert_to_timedelta64(val, 'ns', False) # <<<<<<<<<<<<<< * seen_timedelta = 1 * else: */ __pyx_t_4 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 526; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = __pyx_f_6pandas_5tslib_convert_to_timedelta64(__pyx_v_val, ((PyObject *)__pyx_n_s__ns), __pyx_t_4); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 526; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_28 = __Pyx_PyInt_from_py_npy_int64(__pyx_t_3); if (unlikely((__pyx_t_28 == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 526; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_30 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_30 < 0) { __pyx_t_30 += __pyx_pybuffernd_itimedeltas.diminfo[0].shape; if (unlikely(__pyx_t_30 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_30 >= __pyx_pybuffernd_itimedeltas.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 526; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_itimedeltas.rcbuffer->pybuffer.buf, __pyx_t_30, __pyx_pybuffernd_itimedeltas.diminfo[0].strides) = __pyx_t_28; /* "pandas/src/inference.pyx":527 * if convert_timedelta: * itimedeltas[i] = convert_to_timedelta64(val, 'ns', False) * seen_timedelta = 1 # <<<<<<<<<<<<<< * else: * seen_object = 1 */ __pyx_v_seen_timedelta = 1; goto __pyx_L9; } /*else*/ { /* "pandas/src/inference.pyx":529 * seen_timedelta = 1 * else: * seen_object = 1 # <<<<<<<<<<<<<< * break * elif util.is_integer_object(val): */ __pyx_v_seen_object = 1; /* "pandas/src/inference.pyx":530 * else: * seen_object = 1 * break # <<<<<<<<<<<<<< * elif util.is_integer_object(val): * seen_int = 1 */ goto __pyx_L6_break; } __pyx_L9:; goto __pyx_L7; } /* "pandas/src/inference.pyx":531 * seen_object = 1 * break * elif util.is_integer_object(val): # <<<<<<<<<<<<<< * seen_int = 1 * floats[i] = val */ __pyx_t_20 = (is_integer_object(__pyx_v_val) != 0); if (__pyx_t_20) { /* "pandas/src/inference.pyx":532 * break * elif util.is_integer_object(val): * seen_int = 1 # <<<<<<<<<<<<<< * floats[i] = val * complexes[i] = val */ __pyx_v_seen_int = 1; /* "pandas/src/inference.pyx":533 * elif util.is_integer_object(val): * seen_int = 1 * floats[i] = val # <<<<<<<<<<<<<< * complexes[i] = val * if not seen_null: */ __pyx_t_18 = __pyx_PyFloat_AsDouble(__pyx_v_val); if (unlikely((__pyx_t_18 == (npy_float64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 533; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_31 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_31 < 0) { __pyx_t_31 += __pyx_pybuffernd_floats.diminfo[0].shape; if (unlikely(__pyx_t_31 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_31 >= __pyx_pybuffernd_floats.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 533; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_floats.rcbuffer->pybuffer.buf, __pyx_t_31, __pyx_pybuffernd_floats.diminfo[0].strides) = ((__pyx_t_5numpy_float64_t)__pyx_t_18); /* "pandas/src/inference.pyx":534 * seen_int = 1 * floats[i] = val * complexes[i] = val # <<<<<<<<<<<<<< * if not seen_null: * try: */ __pyx_t_26 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_v_val); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 534; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_32 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_32 < 0) { __pyx_t_32 += __pyx_pybuffernd_complexes.diminfo[0].shape; if (unlikely(__pyx_t_32 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_32 >= __pyx_pybuffernd_complexes.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 534; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_double_complex *, __pyx_pybuffernd_complexes.rcbuffer->pybuffer.buf, __pyx_t_32, __pyx_pybuffernd_complexes.diminfo[0].strides) = __pyx_t_double_complex_from_parts(((double)__Pyx_CREAL(__pyx_t_26)), ((double)__Pyx_CIMAG(__pyx_t_26))); /* "pandas/src/inference.pyx":535 * floats[i] = val * complexes[i] = val * if not seen_null: # <<<<<<<<<<<<<< * try: * ints[i] = val */ __pyx_t_20 = ((!(__pyx_v_seen_null != 0)) != 0); if (__pyx_t_20) { /* "pandas/src/inference.pyx":536 * complexes[i] = val * if not seen_null: * try: # <<<<<<<<<<<<<< * ints[i] = val * except OverflowError: */ { __Pyx_ExceptionSave(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10); __Pyx_XGOTREF(__pyx_t_8); __Pyx_XGOTREF(__pyx_t_9); __Pyx_XGOTREF(__pyx_t_10); /*try:*/ { /* "pandas/src/inference.pyx":537 * if not seen_null: * try: * ints[i] = val # <<<<<<<<<<<<<< * except OverflowError: * seen_object = 1 */ __pyx_t_28 = __Pyx_PyInt_from_py_npy_int64(__pyx_v_val); if (unlikely((__pyx_t_28 == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 537; __pyx_clineno = __LINE__; goto __pyx_L11_error;} __pyx_t_33 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_33 < 0) { __pyx_t_33 += __pyx_pybuffernd_ints.diminfo[0].shape; if (unlikely(__pyx_t_33 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_33 >= __pyx_pybuffernd_ints.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 537; __pyx_clineno = __LINE__; goto __pyx_L11_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_ints.rcbuffer->pybuffer.buf, __pyx_t_33, __pyx_pybuffernd_ints.diminfo[0].strides) = __pyx_t_28; } __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; goto __pyx_L18_try_end; __pyx_L11_error:; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/inference.pyx":538 * try: * ints[i] = val * except OverflowError: # <<<<<<<<<<<<<< * seen_object = 1 * break */ __pyx_t_7 = PyErr_ExceptionMatches(__pyx_builtin_OverflowError); if (__pyx_t_7) { __Pyx_AddTraceback("pandas.lib.maybe_convert_objects", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_3, &__pyx_t_4, &__pyx_t_2) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 538; __pyx_clineno = __LINE__; goto __pyx_L13_except_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_GOTREF(__pyx_t_4); __Pyx_GOTREF(__pyx_t_2); /* "pandas/src/inference.pyx":539 * ints[i] = val * except OverflowError: * seen_object = 1 # <<<<<<<<<<<<<< * break * elif util.is_complex_object(val): */ __pyx_v_seen_object = 1; /* "pandas/src/inference.pyx":540 * except OverflowError: * seen_object = 1 * break # <<<<<<<<<<<<<< * elif util.is_complex_object(val): * complexes[i] = val */ goto __pyx_L19_except_break; __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; goto __pyx_L12_exception_handled; __pyx_L19_except_break:; __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; goto __pyx_L16_try_break; } __pyx_L13_except_error:; __Pyx_XGIVEREF(__pyx_t_8); __Pyx_XGIVEREF(__pyx_t_9); __Pyx_XGIVEREF(__pyx_t_10); __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_9, __pyx_t_10); goto __pyx_L1_error; __pyx_L16_try_break:; __Pyx_XGIVEREF(__pyx_t_8); __Pyx_XGIVEREF(__pyx_t_9); __Pyx_XGIVEREF(__pyx_t_10); __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_9, __pyx_t_10); goto __pyx_L6_break; __pyx_L12_exception_handled:; __Pyx_XGIVEREF(__pyx_t_8); __Pyx_XGIVEREF(__pyx_t_9); __Pyx_XGIVEREF(__pyx_t_10); __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_9, __pyx_t_10); __pyx_L18_try_end:; } goto __pyx_L10; } __pyx_L10:; goto __pyx_L7; } /* "pandas/src/inference.pyx":541 * seen_object = 1 * break * elif util.is_complex_object(val): # <<<<<<<<<<<<<< * complexes[i] = val * seen_complex = 1 */ __pyx_t_20 = (is_complex_object(__pyx_v_val) != 0); if (__pyx_t_20) { /* "pandas/src/inference.pyx":542 * break * elif util.is_complex_object(val): * complexes[i] = val # <<<<<<<<<<<<<< * seen_complex = 1 * elif PyDateTime_Check(val) or util.is_datetime64_object(val): */ __pyx_t_26 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_v_val); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 542; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_34 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_34 < 0) { __pyx_t_34 += __pyx_pybuffernd_complexes.diminfo[0].shape; if (unlikely(__pyx_t_34 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_34 >= __pyx_pybuffernd_complexes.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 542; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_double_complex *, __pyx_pybuffernd_complexes.rcbuffer->pybuffer.buf, __pyx_t_34, __pyx_pybuffernd_complexes.diminfo[0].strides) = __pyx_t_26; /* "pandas/src/inference.pyx":543 * elif util.is_complex_object(val): * complexes[i] = val * seen_complex = 1 # <<<<<<<<<<<<<< * elif PyDateTime_Check(val) or util.is_datetime64_object(val): * if convert_datetime: */ __pyx_v_seen_complex = 1; goto __pyx_L7; } /* "pandas/src/inference.pyx":544 * complexes[i] = val * seen_complex = 1 * elif PyDateTime_Check(val) or util.is_datetime64_object(val): # <<<<<<<<<<<<<< * if convert_datetime: * seen_datetime = 1 */ __pyx_t_20 = PyDateTime_Check(__pyx_v_val); if (!__pyx_t_20) { __pyx_t_15 = (is_datetime64_object(__pyx_v_val) != 0); } else { __pyx_t_15 = __pyx_t_20; } if (__pyx_t_15) { /* "pandas/src/inference.pyx":545 * seen_complex = 1 * elif PyDateTime_Check(val) or util.is_datetime64_object(val): * if convert_datetime: # <<<<<<<<<<<<<< * seen_datetime = 1 * idatetimes[i] = convert_to_tsobject(val, None, None).value */ __pyx_t_15 = (__pyx_v_convert_datetime != 0); if (__pyx_t_15) { /* "pandas/src/inference.pyx":546 * elif PyDateTime_Check(val) or util.is_datetime64_object(val): * if convert_datetime: * seen_datetime = 1 # <<<<<<<<<<<<<< * idatetimes[i] = convert_to_tsobject(val, None, None).value * else: */ __pyx_v_seen_datetime = 1; /* "pandas/src/inference.pyx":547 * if convert_datetime: * seen_datetime = 1 * idatetimes[i] = convert_to_tsobject(val, None, None).value # <<<<<<<<<<<<<< * else: * seen_object = 1 */ __pyx_t_2 = __pyx_f_6pandas_5tslib_convert_to_tsobject(__pyx_v_val, Py_None, Py_None); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 547; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__value); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 547; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_28 = __Pyx_PyInt_from_py_npy_int64(__pyx_t_4); if (unlikely((__pyx_t_28 == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 547; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_35 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_35 < 0) { __pyx_t_35 += __pyx_pybuffernd_idatetimes.diminfo[0].shape; if (unlikely(__pyx_t_35 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_35 >= __pyx_pybuffernd_idatetimes.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 547; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_idatetimes.rcbuffer->pybuffer.buf, __pyx_t_35, __pyx_pybuffernd_idatetimes.diminfo[0].strides) = __pyx_t_28; goto __pyx_L21; } /*else*/ { /* "pandas/src/inference.pyx":549 * idatetimes[i] = convert_to_tsobject(val, None, None).value * else: * seen_object = 1 # <<<<<<<<<<<<<< * break * elif try_float and not util.is_string_object(val): */ __pyx_v_seen_object = 1; /* "pandas/src/inference.pyx":550 * else: * seen_object = 1 * break # <<<<<<<<<<<<<< * elif try_float and not util.is_string_object(val): * # this will convert Decimal objects */ goto __pyx_L6_break; } __pyx_L21:; goto __pyx_L7; } /* "pandas/src/inference.pyx":551 * seen_object = 1 * break * elif try_float and not util.is_string_object(val): # <<<<<<<<<<<<<< * # this will convert Decimal objects * try: */ if ((__pyx_v_try_float != 0)) { __pyx_t_15 = ((!(is_string_object(__pyx_v_val) != 0)) != 0); __pyx_t_20 = __pyx_t_15; } else { __pyx_t_20 = (__pyx_v_try_float != 0); } if (__pyx_t_20) { /* "pandas/src/inference.pyx":553 * elif try_float and not util.is_string_object(val): * # this will convert Decimal objects * try: # <<<<<<<<<<<<<< * floats[i] = float(val) * complexes[i] = complex(val) */ { __Pyx_ExceptionSave(&__pyx_t_10, &__pyx_t_9, &__pyx_t_8); __Pyx_XGOTREF(__pyx_t_10); __Pyx_XGOTREF(__pyx_t_9); __Pyx_XGOTREF(__pyx_t_8); /*try:*/ { /* "pandas/src/inference.pyx":554 * # this will convert Decimal objects * try: * floats[i] = float(val) # <<<<<<<<<<<<<< * complexes[i] = complex(val) * seen_float = 1 */ __pyx_t_36 = __Pyx_PyObject_AsDouble(__pyx_v_val); if (unlikely(__pyx_t_36 == ((double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 554; __pyx_clineno = __LINE__; goto __pyx_L22_error;} __pyx_t_37 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_37 < 0) { __pyx_t_37 += __pyx_pybuffernd_floats.diminfo[0].shape; if (unlikely(__pyx_t_37 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_37 >= __pyx_pybuffernd_floats.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 554; __pyx_clineno = __LINE__; goto __pyx_L22_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_floats.rcbuffer->pybuffer.buf, __pyx_t_37, __pyx_pybuffernd_floats.diminfo[0].strides) = __pyx_t_36; /* "pandas/src/inference.pyx":555 * try: * floats[i] = float(val) * complexes[i] = complex(val) # <<<<<<<<<<<<<< * seen_float = 1 * except Exception: */ __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 555; __pyx_clineno = __LINE__; goto __pyx_L22_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_v_val); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_val); __Pyx_GIVEREF(__pyx_v_val); __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)(&PyComplex_Type))), ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 555; __pyx_clineno = __LINE__; goto __pyx_L22_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __pyx_t_26 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_2); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 555; __pyx_clineno = __LINE__; goto __pyx_L22_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_38 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_38 < 0) { __pyx_t_38 += __pyx_pybuffernd_complexes.diminfo[0].shape; if (unlikely(__pyx_t_38 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_38 >= __pyx_pybuffernd_complexes.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 555; __pyx_clineno = __LINE__; goto __pyx_L22_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_double_complex *, __pyx_pybuffernd_complexes.rcbuffer->pybuffer.buf, __pyx_t_38, __pyx_pybuffernd_complexes.diminfo[0].strides) = __pyx_t_26; /* "pandas/src/inference.pyx":556 * floats[i] = float(val) * complexes[i] = complex(val) * seen_float = 1 # <<<<<<<<<<<<<< * except Exception: * seen_object = 1 */ __pyx_v_seen_float = 1; } __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; goto __pyx_L29_try_end; __pyx_L22_error:; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/inference.pyx":557 * complexes[i] = complex(val) * seen_float = 1 * except Exception: # <<<<<<<<<<<<<< * seen_object = 1 * break */ __pyx_t_7 = PyErr_ExceptionMatches(__pyx_builtin_Exception); if (__pyx_t_7) { __Pyx_AddTraceback("pandas.lib.maybe_convert_objects", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_4, &__pyx_t_3) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 557; __pyx_clineno = __LINE__; goto __pyx_L24_except_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_GOTREF(__pyx_t_4); __Pyx_GOTREF(__pyx_t_3); /* "pandas/src/inference.pyx":558 * seen_float = 1 * except Exception: * seen_object = 1 # <<<<<<<<<<<<<< * break * else: */ __pyx_v_seen_object = 1; /* "pandas/src/inference.pyx":559 * except Exception: * seen_object = 1 * break # <<<<<<<<<<<<<< * else: * seen_object = 1 */ goto __pyx_L30_except_break; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L23_exception_handled; __pyx_L30_except_break:; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L27_try_break; } __pyx_L24_except_error:; __Pyx_XGIVEREF(__pyx_t_10); __Pyx_XGIVEREF(__pyx_t_9); __Pyx_XGIVEREF(__pyx_t_8); __Pyx_ExceptionReset(__pyx_t_10, __pyx_t_9, __pyx_t_8); goto __pyx_L1_error; __pyx_L27_try_break:; __Pyx_XGIVEREF(__pyx_t_10); __Pyx_XGIVEREF(__pyx_t_9); __Pyx_XGIVEREF(__pyx_t_8); __Pyx_ExceptionReset(__pyx_t_10, __pyx_t_9, __pyx_t_8); goto __pyx_L6_break; __pyx_L23_exception_handled:; __Pyx_XGIVEREF(__pyx_t_10); __Pyx_XGIVEREF(__pyx_t_9); __Pyx_XGIVEREF(__pyx_t_8); __Pyx_ExceptionReset(__pyx_t_10, __pyx_t_9, __pyx_t_8); __pyx_L29_try_end:; } goto __pyx_L7; } /*else*/ { /* "pandas/src/inference.pyx":561 * break * else: * seen_object = 1 # <<<<<<<<<<<<<< * break * */ __pyx_v_seen_object = 1; /* "pandas/src/inference.pyx":562 * else: * seen_object = 1 * break # <<<<<<<<<<<<<< * * seen_numeric = seen_complex or seen_float or seen_int */ goto __pyx_L6_break; } __pyx_L7:; } __pyx_L6_break:; /* "pandas/src/inference.pyx":564 * break * * seen_numeric = seen_complex or seen_float or seen_int # <<<<<<<<<<<<<< * * if not seen_object: */ if (!__pyx_v_seen_complex) { if (!__pyx_v_seen_float) { __pyx_t_20 = __pyx_v_seen_int; } else { __pyx_t_20 = __pyx_v_seen_float; } __pyx_t_15 = __pyx_t_20; } else { __pyx_t_15 = __pyx_v_seen_complex; } __pyx_v_seen_numeric = __pyx_t_15; /* "pandas/src/inference.pyx":566 * seen_numeric = seen_complex or seen_float or seen_int * * if not seen_object: # <<<<<<<<<<<<<< * * if not safe: */ __pyx_t_15 = ((!(__pyx_v_seen_object != 0)) != 0); if (__pyx_t_15) { /* "pandas/src/inference.pyx":568 * if not seen_object: * * if not safe: # <<<<<<<<<<<<<< * if seen_null: * if not seen_bool and not seen_datetime and not seen_timedelta: */ __pyx_t_15 = ((!(__pyx_v_safe != 0)) != 0); if (__pyx_t_15) { /* "pandas/src/inference.pyx":569 * * if not safe: * if seen_null: # <<<<<<<<<<<<<< * if not seen_bool and not seen_datetime and not seen_timedelta: * if seen_complex: */ __pyx_t_15 = (__pyx_v_seen_null != 0); if (__pyx_t_15) { /* "pandas/src/inference.pyx":570 * if not safe: * if seen_null: * if not seen_bool and not seen_datetime and not seen_timedelta: # <<<<<<<<<<<<<< * if seen_complex: * return complexes */ __pyx_t_15 = ((!(__pyx_v_seen_bool != 0)) != 0); if (__pyx_t_15) { __pyx_t_20 = ((!(__pyx_v_seen_datetime != 0)) != 0); if (__pyx_t_20) { __pyx_t_39 = ((!(__pyx_v_seen_timedelta != 0)) != 0); __pyx_t_40 = __pyx_t_39; } else { __pyx_t_40 = __pyx_t_20; } __pyx_t_20 = __pyx_t_40; } else { __pyx_t_20 = __pyx_t_15; } if (__pyx_t_20) { /* "pandas/src/inference.pyx":571 * if seen_null: * if not seen_bool and not seen_datetime and not seen_timedelta: * if seen_complex: # <<<<<<<<<<<<<< * return complexes * elif seen_float or seen_int: */ __pyx_t_20 = (__pyx_v_seen_complex != 0); if (__pyx_t_20) { /* "pandas/src/inference.pyx":572 * if not seen_bool and not seen_datetime and not seen_timedelta: * if seen_complex: * return complexes # <<<<<<<<<<<<<< * elif seen_float or seen_int: * return floats */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_complexes)); __pyx_r = ((PyObject *)__pyx_v_complexes); goto __pyx_L0; goto __pyx_L36; } /* "pandas/src/inference.pyx":573 * if seen_complex: * return complexes * elif seen_float or seen_int: # <<<<<<<<<<<<<< * return floats * else: */ if (!(__pyx_v_seen_float != 0)) { __pyx_t_20 = (__pyx_v_seen_int != 0); } else { __pyx_t_20 = (__pyx_v_seen_float != 0); } if (__pyx_t_20) { /* "pandas/src/inference.pyx":574 * return complexes * elif seen_float or seen_int: * return floats # <<<<<<<<<<<<<< * else: * if not seen_bool: */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_floats)); __pyx_r = ((PyObject *)__pyx_v_floats); goto __pyx_L0; goto __pyx_L36; } __pyx_L36:; goto __pyx_L35; } __pyx_L35:; goto __pyx_L34; } /*else*/ { /* "pandas/src/inference.pyx":576 * return floats * else: * if not seen_bool: # <<<<<<<<<<<<<< * if seen_datetime: * if not seen_numeric: */ __pyx_t_20 = ((!(__pyx_v_seen_bool != 0)) != 0); if (__pyx_t_20) { /* "pandas/src/inference.pyx":577 * else: * if not seen_bool: * if seen_datetime: # <<<<<<<<<<<<<< * if not seen_numeric: * return datetimes */ __pyx_t_20 = (__pyx_v_seen_datetime != 0); if (__pyx_t_20) { /* "pandas/src/inference.pyx":578 * if not seen_bool: * if seen_datetime: * if not seen_numeric: # <<<<<<<<<<<<<< * return datetimes * elif seen_timedelta: */ __pyx_t_20 = ((!(__pyx_v_seen_numeric != 0)) != 0); if (__pyx_t_20) { /* "pandas/src/inference.pyx":579 * if seen_datetime: * if not seen_numeric: * return datetimes # <<<<<<<<<<<<<< * elif seen_timedelta: * if not seen_numeric: */ __Pyx_XDECREF(__pyx_r); if (unlikely(!__pyx_v_datetimes)) { __Pyx_RaiseUnboundLocalError("datetimes"); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 579; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __Pyx_INCREF(__pyx_v_datetimes); __pyx_r = __pyx_v_datetimes; goto __pyx_L0; goto __pyx_L39; } __pyx_L39:; goto __pyx_L38; } /* "pandas/src/inference.pyx":580 * if not seen_numeric: * return datetimes * elif seen_timedelta: # <<<<<<<<<<<<<< * if not seen_numeric: * return timedeltas */ __pyx_t_20 = (__pyx_v_seen_timedelta != 0); if (__pyx_t_20) { /* "pandas/src/inference.pyx":581 * return datetimes * elif seen_timedelta: * if not seen_numeric: # <<<<<<<<<<<<<< * return timedeltas * else: */ __pyx_t_20 = ((!(__pyx_v_seen_numeric != 0)) != 0); if (__pyx_t_20) { /* "pandas/src/inference.pyx":582 * elif seen_timedelta: * if not seen_numeric: * return timedeltas # <<<<<<<<<<<<<< * else: * if seen_complex: */ __Pyx_XDECREF(__pyx_r); if (unlikely(!__pyx_v_timedeltas)) { __Pyx_RaiseUnboundLocalError("timedeltas"); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 582; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __Pyx_INCREF(__pyx_v_timedeltas); __pyx_r = __pyx_v_timedeltas; goto __pyx_L0; goto __pyx_L40; } __pyx_L40:; goto __pyx_L38; } /*else*/ { /* "pandas/src/inference.pyx":584 * return timedeltas * else: * if seen_complex: # <<<<<<<<<<<<<< * return complexes * elif seen_float: */ __pyx_t_20 = (__pyx_v_seen_complex != 0); if (__pyx_t_20) { /* "pandas/src/inference.pyx":585 * else: * if seen_complex: * return complexes # <<<<<<<<<<<<<< * elif seen_float: * return floats */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_complexes)); __pyx_r = ((PyObject *)__pyx_v_complexes); goto __pyx_L0; goto __pyx_L41; } /* "pandas/src/inference.pyx":586 * if seen_complex: * return complexes * elif seen_float: # <<<<<<<<<<<<<< * return floats * elif seen_int: */ __pyx_t_20 = (__pyx_v_seen_float != 0); if (__pyx_t_20) { /* "pandas/src/inference.pyx":587 * return complexes * elif seen_float: * return floats # <<<<<<<<<<<<<< * elif seen_int: * return ints */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_floats)); __pyx_r = ((PyObject *)__pyx_v_floats); goto __pyx_L0; goto __pyx_L41; } /* "pandas/src/inference.pyx":588 * elif seen_float: * return floats * elif seen_int: # <<<<<<<<<<<<<< * return ints * elif not seen_datetime and not seen_numeric and not seen_timedelta: */ __pyx_t_20 = (__pyx_v_seen_int != 0); if (__pyx_t_20) { /* "pandas/src/inference.pyx":589 * return floats * elif seen_int: * return ints # <<<<<<<<<<<<<< * elif not seen_datetime and not seen_numeric and not seen_timedelta: * return bools.view(np.bool_) */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_ints)); __pyx_r = ((PyObject *)__pyx_v_ints); goto __pyx_L0; goto __pyx_L41; } __pyx_L41:; } __pyx_L38:; goto __pyx_L37; } /* "pandas/src/inference.pyx":590 * elif seen_int: * return ints * elif not seen_datetime and not seen_numeric and not seen_timedelta: # <<<<<<<<<<<<<< * return bools.view(np.bool_) * */ __pyx_t_20 = ((!(__pyx_v_seen_datetime != 0)) != 0); if (__pyx_t_20) { __pyx_t_15 = ((!(__pyx_v_seen_numeric != 0)) != 0); if (__pyx_t_15) { __pyx_t_40 = ((!(__pyx_v_seen_timedelta != 0)) != 0); __pyx_t_39 = __pyx_t_40; } else { __pyx_t_39 = __pyx_t_15; } __pyx_t_15 = __pyx_t_39; } else { __pyx_t_15 = __pyx_t_20; } if (__pyx_t_15) { /* "pandas/src/inference.pyx":591 * return ints * elif not seen_datetime and not seen_numeric and not seen_timedelta: * return bools.view(np.bool_) # <<<<<<<<<<<<<< * * else: */ __Pyx_XDECREF(__pyx_r); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_bools), __pyx_n_s__view); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 591; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 591; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s__bool_); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 591; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 591; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 591; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; goto __pyx_L37; } __pyx_L37:; } __pyx_L34:; goto __pyx_L33; } /*else*/ { /* "pandas/src/inference.pyx":595 * else: * # don't cast int to float, etc. * if seen_null: # <<<<<<<<<<<<<< * if not seen_bool and not seen_datetime and not seen_timedelta: * if seen_complex: */ __pyx_t_15 = (__pyx_v_seen_null != 0); if (__pyx_t_15) { /* "pandas/src/inference.pyx":596 * # don't cast int to float, etc. * if seen_null: * if not seen_bool and not seen_datetime and not seen_timedelta: # <<<<<<<<<<<<<< * if seen_complex: * if not seen_int: */ __pyx_t_15 = ((!(__pyx_v_seen_bool != 0)) != 0); if (__pyx_t_15) { __pyx_t_20 = ((!(__pyx_v_seen_datetime != 0)) != 0); if (__pyx_t_20) { __pyx_t_39 = ((!(__pyx_v_seen_timedelta != 0)) != 0); __pyx_t_40 = __pyx_t_39; } else { __pyx_t_40 = __pyx_t_20; } __pyx_t_20 = __pyx_t_40; } else { __pyx_t_20 = __pyx_t_15; } if (__pyx_t_20) { /* "pandas/src/inference.pyx":597 * if seen_null: * if not seen_bool and not seen_datetime and not seen_timedelta: * if seen_complex: # <<<<<<<<<<<<<< * if not seen_int: * return complexes */ __pyx_t_20 = (__pyx_v_seen_complex != 0); if (__pyx_t_20) { /* "pandas/src/inference.pyx":598 * if not seen_bool and not seen_datetime and not seen_timedelta: * if seen_complex: * if not seen_int: # <<<<<<<<<<<<<< * return complexes * elif seen_float: */ __pyx_t_20 = ((!(__pyx_v_seen_int != 0)) != 0); if (__pyx_t_20) { /* "pandas/src/inference.pyx":599 * if seen_complex: * if not seen_int: * return complexes # <<<<<<<<<<<<<< * elif seen_float: * if not seen_int: */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_complexes)); __pyx_r = ((PyObject *)__pyx_v_complexes); goto __pyx_L0; goto __pyx_L45; } __pyx_L45:; goto __pyx_L44; } /* "pandas/src/inference.pyx":600 * if not seen_int: * return complexes * elif seen_float: # <<<<<<<<<<<<<< * if not seen_int: * return floats */ __pyx_t_20 = (__pyx_v_seen_float != 0); if (__pyx_t_20) { /* "pandas/src/inference.pyx":601 * return complexes * elif seen_float: * if not seen_int: # <<<<<<<<<<<<<< * return floats * else: */ __pyx_t_20 = ((!(__pyx_v_seen_int != 0)) != 0); if (__pyx_t_20) { /* "pandas/src/inference.pyx":602 * elif seen_float: * if not seen_int: * return floats # <<<<<<<<<<<<<< * else: * if not seen_bool: */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_floats)); __pyx_r = ((PyObject *)__pyx_v_floats); goto __pyx_L0; goto __pyx_L46; } __pyx_L46:; goto __pyx_L44; } __pyx_L44:; goto __pyx_L43; } __pyx_L43:; goto __pyx_L42; } /*else*/ { /* "pandas/src/inference.pyx":604 * return floats * else: * if not seen_bool: # <<<<<<<<<<<<<< * if seen_datetime: * if not seen_numeric: */ __pyx_t_20 = ((!(__pyx_v_seen_bool != 0)) != 0); if (__pyx_t_20) { /* "pandas/src/inference.pyx":605 * else: * if not seen_bool: * if seen_datetime: # <<<<<<<<<<<<<< * if not seen_numeric: * return datetimes */ __pyx_t_20 = (__pyx_v_seen_datetime != 0); if (__pyx_t_20) { /* "pandas/src/inference.pyx":606 * if not seen_bool: * if seen_datetime: * if not seen_numeric: # <<<<<<<<<<<<<< * return datetimes * elif seen_timedelta: */ __pyx_t_20 = ((!(__pyx_v_seen_numeric != 0)) != 0); if (__pyx_t_20) { /* "pandas/src/inference.pyx":607 * if seen_datetime: * if not seen_numeric: * return datetimes # <<<<<<<<<<<<<< * elif seen_timedelta: * if not seen_numeric: */ __Pyx_XDECREF(__pyx_r); if (unlikely(!__pyx_v_datetimes)) { __Pyx_RaiseUnboundLocalError("datetimes"); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 607; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __Pyx_INCREF(__pyx_v_datetimes); __pyx_r = __pyx_v_datetimes; goto __pyx_L0; goto __pyx_L49; } __pyx_L49:; goto __pyx_L48; } /* "pandas/src/inference.pyx":608 * if not seen_numeric: * return datetimes * elif seen_timedelta: # <<<<<<<<<<<<<< * if not seen_numeric: * return timedeltas */ __pyx_t_20 = (__pyx_v_seen_timedelta != 0); if (__pyx_t_20) { /* "pandas/src/inference.pyx":609 * return datetimes * elif seen_timedelta: * if not seen_numeric: # <<<<<<<<<<<<<< * return timedeltas * else: */ __pyx_t_20 = ((!(__pyx_v_seen_numeric != 0)) != 0); if (__pyx_t_20) { /* "pandas/src/inference.pyx":610 * elif seen_timedelta: * if not seen_numeric: * return timedeltas # <<<<<<<<<<<<<< * else: * if seen_complex: */ __Pyx_XDECREF(__pyx_r); if (unlikely(!__pyx_v_timedeltas)) { __Pyx_RaiseUnboundLocalError("timedeltas"); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 610; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __Pyx_INCREF(__pyx_v_timedeltas); __pyx_r = __pyx_v_timedeltas; goto __pyx_L0; goto __pyx_L50; } __pyx_L50:; goto __pyx_L48; } /*else*/ { /* "pandas/src/inference.pyx":612 * return timedeltas * else: * if seen_complex: # <<<<<<<<<<<<<< * if not seen_int: * return complexes */ __pyx_t_20 = (__pyx_v_seen_complex != 0); if (__pyx_t_20) { /* "pandas/src/inference.pyx":613 * else: * if seen_complex: * if not seen_int: # <<<<<<<<<<<<<< * return complexes * elif seen_float: */ __pyx_t_20 = ((!(__pyx_v_seen_int != 0)) != 0); if (__pyx_t_20) { /* "pandas/src/inference.pyx":614 * if seen_complex: * if not seen_int: * return complexes # <<<<<<<<<<<<<< * elif seen_float: * if not seen_int: */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_complexes)); __pyx_r = ((PyObject *)__pyx_v_complexes); goto __pyx_L0; goto __pyx_L52; } __pyx_L52:; goto __pyx_L51; } /* "pandas/src/inference.pyx":615 * if not seen_int: * return complexes * elif seen_float: # <<<<<<<<<<<<<< * if not seen_int: * return floats */ __pyx_t_20 = (__pyx_v_seen_float != 0); if (__pyx_t_20) { /* "pandas/src/inference.pyx":616 * return complexes * elif seen_float: * if not seen_int: # <<<<<<<<<<<<<< * return floats * elif seen_int: */ __pyx_t_20 = ((!(__pyx_v_seen_int != 0)) != 0); if (__pyx_t_20) { /* "pandas/src/inference.pyx":617 * elif seen_float: * if not seen_int: * return floats # <<<<<<<<<<<<<< * elif seen_int: * return ints */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_floats)); __pyx_r = ((PyObject *)__pyx_v_floats); goto __pyx_L0; goto __pyx_L53; } __pyx_L53:; goto __pyx_L51; } /* "pandas/src/inference.pyx":618 * if not seen_int: * return floats * elif seen_int: # <<<<<<<<<<<<<< * return ints * elif not seen_datetime and not seen_numeric and not seen_timedelta: */ __pyx_t_20 = (__pyx_v_seen_int != 0); if (__pyx_t_20) { /* "pandas/src/inference.pyx":619 * return floats * elif seen_int: * return ints # <<<<<<<<<<<<<< * elif not seen_datetime and not seen_numeric and not seen_timedelta: * return bools.view(np.bool_) */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_ints)); __pyx_r = ((PyObject *)__pyx_v_ints); goto __pyx_L0; goto __pyx_L51; } __pyx_L51:; } __pyx_L48:; goto __pyx_L47; } /* "pandas/src/inference.pyx":620 * elif seen_int: * return ints * elif not seen_datetime and not seen_numeric and not seen_timedelta: # <<<<<<<<<<<<<< * return bools.view(np.bool_) * */ __pyx_t_20 = ((!(__pyx_v_seen_datetime != 0)) != 0); if (__pyx_t_20) { __pyx_t_15 = ((!(__pyx_v_seen_numeric != 0)) != 0); if (__pyx_t_15) { __pyx_t_40 = ((!(__pyx_v_seen_timedelta != 0)) != 0); __pyx_t_39 = __pyx_t_40; } else { __pyx_t_39 = __pyx_t_15; } __pyx_t_15 = __pyx_t_39; } else { __pyx_t_15 = __pyx_t_20; } if (__pyx_t_15) { /* "pandas/src/inference.pyx":621 * return ints * elif not seen_datetime and not seen_numeric and not seen_timedelta: * return bools.view(np.bool_) # <<<<<<<<<<<<<< * * return objects */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_bools), __pyx_n_s__view); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 621; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 621; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 621; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 621; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 621; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; goto __pyx_L47; } __pyx_L47:; } __pyx_L42:; } __pyx_L33:; goto __pyx_L32; } __pyx_L32:; /* "pandas/src/inference.pyx":623 * return bools.view(np.bool_) * * return objects # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_objects)); __pyx_r = ((PyObject *)__pyx_v_objects); goto __pyx_L0; __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_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_13); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_bools.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_complexes.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_floats.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_idatetimes.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_ints.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_itimedeltas.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_objects.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.lib.maybe_convert_objects", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_bools.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_complexes.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_floats.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_idatetimes.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_ints.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_itimedeltas.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_objects.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_floats); __Pyx_XDECREF((PyObject *)__pyx_v_complexes); __Pyx_XDECREF((PyObject *)__pyx_v_ints); __Pyx_XDECREF((PyObject *)__pyx_v_bools); __Pyx_XDECREF((PyObject *)__pyx_v_idatetimes); __Pyx_XDECREF((PyObject *)__pyx_v_itimedeltas); __Pyx_XDECREF(__pyx_v_val); __Pyx_XDECREF(__pyx_v_onan); __Pyx_XDECREF(__pyx_v_datetimes); __Pyx_XDECREF(__pyx_v_timedeltas); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_3lib_145convert_sql_column(PyObject *__pyx_self, PyObject *__pyx_v_x); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_3lib_145convert_sql_column = {__Pyx_NAMESTR("convert_sql_column"), (PyCFunction)__pyx_pw_6pandas_3lib_145convert_sql_column, METH_O, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_3lib_145convert_sql_column(PyObject *__pyx_self, PyObject *__pyx_v_x) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("convert_sql_column (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_3lib_144convert_sql_column(__pyx_self, ((PyObject *)__pyx_v_x)); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/inference.pyx":626 * * * def convert_sql_column(x): # <<<<<<<<<<<<<< * return maybe_convert_objects(x, try_float=1) * */ static PyObject *__pyx_pf_6pandas_3lib_144convert_sql_column(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_x) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("convert_sql_column", 0); /* "pandas/src/inference.pyx":627 * * def convert_sql_column(x): * return maybe_convert_objects(x, try_float=1) # <<<<<<<<<<<<<< * * def try_parse_dates(ndarray[object] values, parser=None, */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_12); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 627; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 627; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_x); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_x); __Pyx_GIVEREF(__pyx_v_x); __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 627; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_3)); if (PyDict_SetItem(__pyx_t_3, ((PyObject *)__pyx_n_s__try_float), __pyx_int_1) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 627; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_4 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), ((PyObject *)__pyx_t_3)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 627; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("pandas.lib.convert_sql_column", __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_3lib_147try_parse_dates(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_3lib_147try_parse_dates = {__Pyx_NAMESTR("try_parse_dates"), (PyCFunction)__pyx_pw_6pandas_3lib_147try_parse_dates, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_3lib_147try_parse_dates(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_values = 0; PyObject *__pyx_v_parser = 0; PyObject *__pyx_v_dayfirst = 0; PyObject *__pyx_v_default = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("try_parse_dates (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__values,&__pyx_n_s__parser,&__pyx_n_s__dayfirst,&__pyx_n_s__default,0}; PyObject* values[4] = {0,0,0,0}; /* "pandas/src/inference.pyx":629 * return maybe_convert_objects(x, try_float=1) * * def try_parse_dates(ndarray[object] values, parser=None, # <<<<<<<<<<<<<< * dayfirst=False,default=None): * cdef: */ values[1] = ((PyObject *)Py_None); values[2] = __pyx_k_61; /* "pandas/src/inference.pyx":630 * * def try_parse_dates(ndarray[object] values, parser=None, * dayfirst=False,default=None): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n */ values[3] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__values)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__parser); if (value) { values[1] = value; kw_args--; } } case 2: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__dayfirst); if (value) { values[2] = value; kw_args--; } } case 3: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__default); if (value) { values[3] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "try_parse_dates") < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 629; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_values = ((PyArrayObject *)values[0]); __pyx_v_parser = values[1]; __pyx_v_dayfirst = values[2]; __pyx_v_default = values[3]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("try_parse_dates", 0, 1, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 629; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.lib.try_parse_dates", __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_filename = __pyx_f[1]; __pyx_lineno = 629; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_3lib_146try_parse_dates(__pyx_self, __pyx_v_values, __pyx_v_parser, __pyx_v_dayfirst, __pyx_v_default); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_3lib_15try_parse_dates_1parse_date(PyObject *__pyx_self, PyObject *__pyx_v_s); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_3lib_15try_parse_dates_1parse_date = {__Pyx_NAMESTR("parse_date"), (PyCFunction)__pyx_pw_6pandas_3lib_15try_parse_dates_1parse_date, METH_O, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_3lib_15try_parse_dates_1parse_date(PyObject *__pyx_self, PyObject *__pyx_v_s) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("parse_date (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_3lib_15try_parse_dates_parse_date(__pyx_self, ((PyObject *)__pyx_v_s)); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/inference.pyx":647 * parse_date = lambda x: parse(x, dayfirst=dayfirst,default=default) * except ImportError: # pragma: no cover * def parse_date(s): # <<<<<<<<<<<<<< * try: * return datetime.strptime(s, '%m/%d/%Y') */ static PyObject *__pyx_pf_6pandas_3lib_15try_parse_dates_parse_date(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_s) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; int __pyx_t_7; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("parse_date", 0); /* "pandas/src/inference.pyx":648 * except ImportError: # pragma: no cover * def parse_date(s): * try: # <<<<<<<<<<<<<< * return datetime.strptime(s, '%m/%d/%Y') * except Exception: */ { __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:*/ { /* "pandas/src/inference.pyx":649 * def parse_date(s): * try: * return datetime.strptime(s, '%m/%d/%Y') # <<<<<<<<<<<<<< * except Exception: * return s */ __Pyx_XDECREF(__pyx_r); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)((PyObject*)__pyx_ptype_8datetime_datetime)), __pyx_n_s__strptime); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 649; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 649; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_v_s); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_s); __Pyx_GIVEREF(__pyx_v_s); __Pyx_INCREF(((PyObject *)__pyx_kp_s_62)); PyTuple_SET_ITEM(__pyx_t_5, 1, ((PyObject *)__pyx_kp_s_62)); __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_62)); __pyx_t_6 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 649; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; __pyx_r = __pyx_t_6; __pyx_t_6 = 0; goto __pyx_L7_try_return; } __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L10_try_end; __pyx_L7_try_return:; __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); goto __pyx_L0; __pyx_L3_error:; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; /* "pandas/src/inference.pyx":650 * try: * return datetime.strptime(s, '%m/%d/%Y') * except Exception: # <<<<<<<<<<<<<< * return s * # EAFP here */ __pyx_t_7 = PyErr_ExceptionMatches(__pyx_builtin_Exception); if (__pyx_t_7) { __Pyx_AddTraceback("pandas.lib.try_parse_dates.parse_date", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_5, &__pyx_t_4) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 650; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_GOTREF(__pyx_t_5); __Pyx_GOTREF(__pyx_t_4); /* "pandas/src/inference.pyx":651 * return datetime.strptime(s, '%m/%d/%Y') * except Exception: * return s # <<<<<<<<<<<<<< * # EAFP here * try: */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_s); __pyx_r = __pyx_v_s; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; goto __pyx_L6_except_return; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; goto __pyx_L4_exception_handled; } __pyx_L5_except_error:; __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); goto __pyx_L1_error; __pyx_L6_except_return:; __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); goto __pyx_L0; __pyx_L4_exception_handled:; __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); __pyx_L10_try_end:; } __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("pandas.lib.try_parse_dates.parse_date", __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_3lib_15try_parse_dates_2lambda1(PyObject *__pyx_self, PyObject *__pyx_v_x); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_3lib_15try_parse_dates_2lambda1 = {__Pyx_NAMESTR("lambda1"), (PyCFunction)__pyx_pw_6pandas_3lib_15try_parse_dates_2lambda1, METH_O, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_3lib_15try_parse_dates_2lambda1(PyObject *__pyx_self, PyObject *__pyx_v_x) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("lambda1 (wrapper)", 0); __pyx_r = __pyx_lambda_funcdef_lambda1(__pyx_self, ((PyObject *)__pyx_v_x)); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/inference.pyx":645 * try: * from dateutil.parser import parse * parse_date = lambda x: parse(x, dayfirst=dayfirst,default=default) # <<<<<<<<<<<<<< * except ImportError: # pragma: no cover * def parse_date(s): */ static PyObject *__pyx_lambda_funcdef_lambda1(PyObject *__pyx_self, PyObject *__pyx_v_x) { struct __pyx_obj_6pandas_3lib___pyx_scope_struct__try_parse_dates *__pyx_cur_scope; struct __pyx_obj_6pandas_3lib___pyx_scope_struct__try_parse_dates *__pyx_outer_scope; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("lambda1", 0); __pyx_outer_scope = (struct __pyx_obj_6pandas_3lib___pyx_scope_struct__try_parse_dates *) __Pyx_CyFunction_GetClosure(__pyx_self); __pyx_cur_scope = __pyx_outer_scope; __Pyx_XDECREF(__pyx_r); if (unlikely(!__pyx_cur_scope->__pyx_v_parse)) { __Pyx_RaiseClosureNameError("parse"); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 645; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 645; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_x); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_x); __Pyx_GIVEREF(__pyx_v_x); __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 645; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_cur_scope->__pyx_v_dayfirst)) { __Pyx_RaiseClosureNameError("dayfirst"); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 645; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__dayfirst), __pyx_cur_scope->__pyx_v_dayfirst) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 645; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__pyx_cur_scope->__pyx_v_default)) { __Pyx_RaiseClosureNameError("default"); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 645; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__default), __pyx_cur_scope->__pyx_v_default) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 645; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_3 = PyObject_Call(__pyx_cur_scope->__pyx_v_parse, ((PyObject *)__pyx_t_1), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 645; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("pandas.lib.try_parse_dates.lambda1", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/inference.pyx":629 * return maybe_convert_objects(x, try_float=1) * * def try_parse_dates(ndarray[object] values, parser=None, # <<<<<<<<<<<<<< * dayfirst=False,default=None): * cdef: */ static PyObject *__pyx_pf_6pandas_3lib_146try_parse_dates(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyObject *__pyx_v_parser, PyObject *__pyx_v_dayfirst, PyObject *__pyx_v_default) { struct __pyx_obj_6pandas_3lib___pyx_scope_struct__try_parse_dates *__pyx_cur_scope; Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_n; PyArrayObject *__pyx_v_result = 0; PyObject *__pyx_v_date = NULL; PyObject *__pyx_v_parse_date = NULL; __Pyx_LocalBuf_ND __pyx_pybuffernd_result; __Pyx_Buffer __pyx_pybuffer_result; __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; PyArrayObject *__pyx_t_6 = NULL; int __pyx_t_7; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; int __pyx_t_11; int __pyx_t_12; Py_ssize_t __pyx_t_13; Py_ssize_t __pyx_t_14; PyObject **__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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("try_parse_dates", 0); __pyx_cur_scope = (struct __pyx_obj_6pandas_3lib___pyx_scope_struct__try_parse_dates *)__pyx_tp_new_6pandas_3lib___pyx_scope_struct__try_parse_dates(__pyx_ptype_6pandas_3lib___pyx_scope_struct__try_parse_dates, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_cur_scope)) { __Pyx_RefNannyFinishContext(); return NULL; } __Pyx_GOTREF(__pyx_cur_scope); __pyx_cur_scope->__pyx_v_dayfirst = __pyx_v_dayfirst; __Pyx_INCREF(__pyx_cur_scope->__pyx_v_dayfirst); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_dayfirst); __pyx_cur_scope->__pyx_v_default = __pyx_v_default; __Pyx_INCREF(__pyx_cur_scope->__pyx_v_default); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_default); __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_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_filename = __pyx_f[1]; __pyx_lineno = 629; __pyx_clineno = __LINE__; goto __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/src/inference.pyx":635 * ndarray[object] result * * n = len(values) # <<<<<<<<<<<<<< * result = np.empty(n, dtype='O') * */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 635; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/src/inference.pyx":636 * * n = len(values) * result = np.empty(n, dtype='O') # <<<<<<<<<<<<<< * * if parser is None: */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 636; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 636; __pyx_clineno = __LINE__; goto __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_n); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 636; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 636; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 636; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_2)); if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__dtype), ((PyObject *)__pyx_n_s__O)) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 636; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_5 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 636; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 636; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_6 = ((PyArrayObject *)__pyx_t_5); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_object, 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_result.rcbuffer->pybuffer, (PyObject*)__pyx_v_result, &__Pyx_TypeInfo_object, 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_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_7 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 636; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_6 = 0; __pyx_v_result = ((PyArrayObject *)__pyx_t_5); __pyx_t_5 = 0; /* "pandas/src/inference.pyx":638 * result = np.empty(n, dtype='O') * * if parser is None: # <<<<<<<<<<<<<< * if default is None: # GH2618 * date=datetime.now() */ __pyx_t_11 = (__pyx_v_parser == Py_None); __pyx_t_12 = (__pyx_t_11 != 0); if (__pyx_t_12) { /* "pandas/src/inference.pyx":639 * * if parser is None: * if default is None: # GH2618 # <<<<<<<<<<<<<< * date=datetime.now() * default=datetime(date.year,date.month,1) */ __pyx_t_12 = (__pyx_cur_scope->__pyx_v_default == Py_None); __pyx_t_11 = (__pyx_t_12 != 0); if (__pyx_t_11) { /* "pandas/src/inference.pyx":640 * if parser is None: * if default is None: # GH2618 * date=datetime.now() # <<<<<<<<<<<<<< * default=datetime(date.year,date.month,1) * */ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)((PyObject*)__pyx_ptype_8datetime_datetime)), __pyx_n_s__now); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 640; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_2 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 640; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_v_date = __pyx_t_2; __pyx_t_2 = 0; /* "pandas/src/inference.pyx":641 * if default is None: # GH2618 * date=datetime.now() * default=datetime(date.year,date.month,1) # <<<<<<<<<<<<<< * * try: */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_date, __pyx_n_s__year); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 641; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_date, __pyx_n_s__month); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 641; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 641; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __Pyx_INCREF(__pyx_int_1); PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_int_1); __Pyx_GIVEREF(__pyx_int_1); __pyx_t_2 = 0; __pyx_t_5 = 0; __pyx_t_5 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_8datetime_datetime)), ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 641; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_default); __Pyx_DECREF_SET(__pyx_cur_scope->__pyx_v_default, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __pyx_t_5 = 0; goto __pyx_L4; } __pyx_L4:; /* "pandas/src/inference.pyx":643 * default=datetime(date.year,date.month,1) * * try: # <<<<<<<<<<<<<< * from dateutil.parser import parse * parse_date = lambda x: parse(x, dayfirst=dayfirst,default=default) */ { __Pyx_ExceptionSave(&__pyx_t_10, &__pyx_t_9, &__pyx_t_8); __Pyx_XGOTREF(__pyx_t_10); __Pyx_XGOTREF(__pyx_t_9); __Pyx_XGOTREF(__pyx_t_8); /*try:*/ { /* "pandas/src/inference.pyx":644 * * try: * from dateutil.parser import parse # <<<<<<<<<<<<<< * parse_date = lambda x: parse(x, dayfirst=dayfirst,default=default) * except ImportError: # pragma: no cover */ __pyx_t_5 = PyList_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 644; __pyx_clineno = __LINE__; goto __pyx_L5_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(((PyObject *)__pyx_n_s__parse)); PyList_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_n_s__parse)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__parse)); __pyx_t_4 = __Pyx_Import(((PyObject *)__pyx_n_s_63), ((PyObject *)__pyx_t_5), -1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 644; __pyx_clineno = __LINE__; goto __pyx_L5_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_ImportFrom(__pyx_t_4, __pyx_n_s__parse); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 644; __pyx_clineno = __LINE__; goto __pyx_L5_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __pyx_cur_scope->__pyx_v_parse = __pyx_t_5; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "pandas/src/inference.pyx":645 * try: * from dateutil.parser import parse * parse_date = lambda x: parse(x, dayfirst=dayfirst,default=default) # <<<<<<<<<<<<<< * except ImportError: # pragma: no cover * def parse_date(s): */ __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6pandas_3lib_15try_parse_dates_2lambda1, 0, __pyx_n_s_64, ((PyObject*)__pyx_cur_scope), __pyx_n_s_65, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 645; __pyx_clineno = __LINE__; goto __pyx_L5_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_v_parse_date = __pyx_t_4; __pyx_t_4 = 0; } __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; goto __pyx_L12_try_end; __pyx_L5_error:; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; /* "pandas/src/inference.pyx":646 * from dateutil.parser import parse * parse_date = lambda x: parse(x, dayfirst=dayfirst,default=default) * except ImportError: # pragma: no cover # <<<<<<<<<<<<<< * def parse_date(s): * try: */ __pyx_t_7 = PyErr_ExceptionMatches(__pyx_builtin_ImportError); if (__pyx_t_7) { __Pyx_AddTraceback("pandas.lib.try_parse_dates", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_5, &__pyx_t_2) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 646; __pyx_clineno = __LINE__; goto __pyx_L7_except_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_GOTREF(__pyx_t_5); __Pyx_GOTREF(__pyx_t_2); /* "pandas/src/inference.pyx":647 * parse_date = lambda x: parse(x, dayfirst=dayfirst,default=default) * except ImportError: # pragma: no cover * def parse_date(s): # <<<<<<<<<<<<<< * try: * return datetime.strptime(s, '%m/%d/%Y') */ __pyx_t_3 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6pandas_3lib_15try_parse_dates_1parse_date, 0, __pyx_n_s_69, NULL, __pyx_n_s_65, ((PyObject *)__pyx_k_codeobj_67)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 647; __pyx_clineno = __LINE__; goto __pyx_L7_except_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_XDECREF_SET(__pyx_v_parse_date, __pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; goto __pyx_L6_exception_handled; } __pyx_L7_except_error:; __Pyx_XGIVEREF(__pyx_t_10); __Pyx_XGIVEREF(__pyx_t_9); __Pyx_XGIVEREF(__pyx_t_8); __Pyx_ExceptionReset(__pyx_t_10, __pyx_t_9, __pyx_t_8); goto __pyx_L1_error; __pyx_L6_exception_handled:; __Pyx_XGIVEREF(__pyx_t_10); __Pyx_XGIVEREF(__pyx_t_9); __Pyx_XGIVEREF(__pyx_t_8); __Pyx_ExceptionReset(__pyx_t_10, __pyx_t_9, __pyx_t_8); __pyx_L12_try_end:; } /* "pandas/src/inference.pyx":653 * return s * # EAFP here * try: # <<<<<<<<<<<<<< * for i from 0 <= i < n: * if values[i] == '': */ { __Pyx_ExceptionSave(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10); __Pyx_XGOTREF(__pyx_t_8); __Pyx_XGOTREF(__pyx_t_9); __Pyx_XGOTREF(__pyx_t_10); /*try:*/ { /* "pandas/src/inference.pyx":654 * # EAFP here * try: * for i from 0 <= i < n: # <<<<<<<<<<<<<< * if values[i] == '': * result[i] = np.nan */ __pyx_t_1 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_1; __pyx_v_i++) { /* "pandas/src/inference.pyx":655 * try: * for i from 0 <= i < n: * if values[i] == '': # <<<<<<<<<<<<<< * result[i] = np.nan * else: */ __pyx_t_13 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_13 < 0) { __pyx_t_13 += __pyx_pybuffernd_values.diminfo[0].shape; if (unlikely(__pyx_t_13 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_13 >= __pyx_pybuffernd_values.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 655; __pyx_clineno = __LINE__; goto __pyx_L15_error;} } __pyx_t_2 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_values.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_2); __pyx_t_5 = PyObject_RichCompare(__pyx_t_2, ((PyObject *)__pyx_kp_s_70), Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 655; __pyx_clineno = __LINE__; goto __pyx_L15_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_11 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 655; __pyx_clineno = __LINE__; goto __pyx_L15_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_11) { /* "pandas/src/inference.pyx":656 * for i from 0 <= i < n: * if values[i] == '': * result[i] = np.nan # <<<<<<<<<<<<<< * else: * result[i] = parse_date(values[i]) */ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 656; __pyx_clineno = __LINE__; goto __pyx_L15_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s__nan); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 656; __pyx_clineno = __LINE__; goto __pyx_L15_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_14 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_14 < 0) { __pyx_t_14 += __pyx_pybuffernd_result.diminfo[0].shape; if (unlikely(__pyx_t_14 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_14 >= __pyx_pybuffernd_result.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 656; __pyx_clineno = __LINE__; goto __pyx_L15_error;} } __pyx_t_15 = __Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_result.diminfo[0].strides); __Pyx_GOTREF(*__pyx_t_15); __Pyx_INCREF(__pyx_t_2); __Pyx_DECREF(*__pyx_t_15); *__pyx_t_15 = __pyx_t_2; __Pyx_GIVEREF(*__pyx_t_15); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; goto __pyx_L25; } /*else*/ { /* "pandas/src/inference.pyx":658 * result[i] = np.nan * else: * result[i] = parse_date(values[i]) # <<<<<<<<<<<<<< * except Exception: * # failed */ __pyx_t_16 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_16 < 0) { __pyx_t_16 += __pyx_pybuffernd_values.diminfo[0].shape; if (unlikely(__pyx_t_16 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_16 >= __pyx_pybuffernd_values.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 658; __pyx_clineno = __LINE__; goto __pyx_L15_error;} } __pyx_t_2 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_values.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_2); __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 658; __pyx_clineno = __LINE__; goto __pyx_L15_error;} __Pyx_GOTREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_Call(__pyx_v_parse_date, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 658; __pyx_clineno = __LINE__; goto __pyx_L15_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; __pyx_t_17 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_17 < 0) { __pyx_t_17 += __pyx_pybuffernd_result.diminfo[0].shape; if (unlikely(__pyx_t_17 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_17 >= __pyx_pybuffernd_result.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 658; __pyx_clineno = __LINE__; goto __pyx_L15_error;} } __pyx_t_15 = __Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_result.diminfo[0].strides); __Pyx_GOTREF(*__pyx_t_15); __Pyx_INCREF(__pyx_t_2); __Pyx_DECREF(*__pyx_t_15); *__pyx_t_15 = __pyx_t_2; __Pyx_GIVEREF(*__pyx_t_15); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } __pyx_L25:; } } __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; goto __pyx_L22_try_end; __pyx_L15_error:; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/inference.pyx":659 * else: * result[i] = parse_date(values[i]) * except Exception: # <<<<<<<<<<<<<< * # failed * return values */ __pyx_t_7 = PyErr_ExceptionMatches(__pyx_builtin_Exception); if (__pyx_t_7) { __Pyx_AddTraceback("pandas.lib.try_parse_dates", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_5, &__pyx_t_4) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 659; __pyx_clineno = __LINE__; goto __pyx_L17_except_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_GOTREF(__pyx_t_5); __Pyx_GOTREF(__pyx_t_4); /* "pandas/src/inference.pyx":661 * except Exception: * # failed * return values # <<<<<<<<<<<<<< * else: * parse_date = parser */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_values)); __pyx_r = ((PyObject *)__pyx_v_values); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; goto __pyx_L18_except_return; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; goto __pyx_L16_exception_handled; } __pyx_L17_except_error:; __Pyx_XGIVEREF(__pyx_t_8); __Pyx_XGIVEREF(__pyx_t_9); __Pyx_XGIVEREF(__pyx_t_10); __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_9, __pyx_t_10); goto __pyx_L1_error; __pyx_L18_except_return:; __Pyx_XGIVEREF(__pyx_t_8); __Pyx_XGIVEREF(__pyx_t_9); __Pyx_XGIVEREF(__pyx_t_10); __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_9, __pyx_t_10); goto __pyx_L0; __pyx_L16_exception_handled:; __Pyx_XGIVEREF(__pyx_t_8); __Pyx_XGIVEREF(__pyx_t_9); __Pyx_XGIVEREF(__pyx_t_10); __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_9, __pyx_t_10); __pyx_L22_try_end:; } goto __pyx_L3; } /*else*/ { /* "pandas/src/inference.pyx":663 * return values * else: * parse_date = parser # <<<<<<<<<<<<<< * * try: */ __Pyx_INCREF(__pyx_v_parser); __pyx_v_parse_date = __pyx_v_parser; /* "pandas/src/inference.pyx":665 * parse_date = parser * * try: # <<<<<<<<<<<<<< * for i from 0 <= i < n: * if values[i] == '': */ { __Pyx_ExceptionSave(&__pyx_t_10, &__pyx_t_9, &__pyx_t_8); __Pyx_XGOTREF(__pyx_t_10); __Pyx_XGOTREF(__pyx_t_9); __Pyx_XGOTREF(__pyx_t_8); /*try:*/ { /* "pandas/src/inference.pyx":666 * * try: * for i from 0 <= i < n: # <<<<<<<<<<<<<< * if values[i] == '': * result[i] = np.nan */ __pyx_t_1 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_1; __pyx_v_i++) { /* "pandas/src/inference.pyx":667 * try: * for i from 0 <= i < n: * if values[i] == '': # <<<<<<<<<<<<<< * result[i] = np.nan * else: */ __pyx_t_18 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_18 < 0) { __pyx_t_18 += __pyx_pybuffernd_values.diminfo[0].shape; if (unlikely(__pyx_t_18 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_18 >= __pyx_pybuffernd_values.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 667; __pyx_clineno = __LINE__; goto __pyx_L28_error;} } __pyx_t_4 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_values.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_4); __pyx_t_5 = PyObject_RichCompare(__pyx_t_4, ((PyObject *)__pyx_kp_s_70), Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 667; __pyx_clineno = __LINE__; goto __pyx_L28_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_11 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 667; __pyx_clineno = __LINE__; goto __pyx_L28_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_11) { /* "pandas/src/inference.pyx":668 * for i from 0 <= i < n: * if values[i] == '': * result[i] = np.nan # <<<<<<<<<<<<<< * else: * result[i] = parse_date(values[i]) */ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 668; __pyx_clineno = __LINE__; goto __pyx_L28_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s__nan); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 668; __pyx_clineno = __LINE__; goto __pyx_L28_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_19 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_19 < 0) { __pyx_t_19 += __pyx_pybuffernd_result.diminfo[0].shape; if (unlikely(__pyx_t_19 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_19 >= __pyx_pybuffernd_result.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 668; __pyx_clineno = __LINE__; goto __pyx_L28_error;} } __pyx_t_15 = __Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_result.diminfo[0].strides); __Pyx_GOTREF(*__pyx_t_15); __Pyx_INCREF(__pyx_t_4); __Pyx_DECREF(*__pyx_t_15); *__pyx_t_15 = __pyx_t_4; __Pyx_GIVEREF(*__pyx_t_15); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; goto __pyx_L38; } /*else*/ { /* "pandas/src/inference.pyx":670 * result[i] = np.nan * else: * result[i] = parse_date(values[i]) # <<<<<<<<<<<<<< * except Exception: * # raise if passed parser and it failed */ __pyx_t_20 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_20 < 0) { __pyx_t_20 += __pyx_pybuffernd_values.diminfo[0].shape; if (unlikely(__pyx_t_20 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_20 >= __pyx_pybuffernd_values.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 670; __pyx_clineno = __LINE__; goto __pyx_L28_error;} } __pyx_t_4 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_values.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_4); __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 670; __pyx_clineno = __LINE__; goto __pyx_L28_error;} __Pyx_GOTREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyObject_Call(__pyx_v_parse_date, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 670; __pyx_clineno = __LINE__; goto __pyx_L28_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; __pyx_t_21 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_21 < 0) { __pyx_t_21 += __pyx_pybuffernd_result.diminfo[0].shape; if (unlikely(__pyx_t_21 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_21 >= __pyx_pybuffernd_result.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 670; __pyx_clineno = __LINE__; goto __pyx_L28_error;} } __pyx_t_15 = __Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_result.diminfo[0].strides); __Pyx_GOTREF(*__pyx_t_15); __Pyx_INCREF(__pyx_t_4); __Pyx_DECREF(*__pyx_t_15); *__pyx_t_15 = __pyx_t_4; __Pyx_GIVEREF(*__pyx_t_15); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } __pyx_L38:; } } __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; goto __pyx_L35_try_end; __pyx_L28_error:; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; /* "pandas/src/inference.pyx":671 * else: * result[i] = parse_date(values[i]) * except Exception: # <<<<<<<<<<<<<< * # raise if passed parser and it failed * raise */ __pyx_t_7 = PyErr_ExceptionMatches(__pyx_builtin_Exception); if (__pyx_t_7) { __Pyx_AddTraceback("pandas.lib.try_parse_dates", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_5, &__pyx_t_2) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 671; __pyx_clineno = __LINE__; goto __pyx_L30_except_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_GOTREF(__pyx_t_5); __Pyx_GOTREF(__pyx_t_2); /* "pandas/src/inference.pyx":673 * except Exception: * # raise if passed parser and it failed * raise # <<<<<<<<<<<<<< * * return result */ __Pyx_GIVEREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_2); __Pyx_ErrRestore(__pyx_t_4, __pyx_t_5, __pyx_t_2); __pyx_t_4 = 0; __pyx_t_5 = 0; __pyx_t_2 = 0; {__pyx_filename = __pyx_f[1]; __pyx_lineno = 673; __pyx_clineno = __LINE__; goto __pyx_L30_except_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; goto __pyx_L29_exception_handled; } __pyx_L30_except_error:; __Pyx_XGIVEREF(__pyx_t_10); __Pyx_XGIVEREF(__pyx_t_9); __Pyx_XGIVEREF(__pyx_t_8); __Pyx_ExceptionReset(__pyx_t_10, __pyx_t_9, __pyx_t_8); goto __pyx_L1_error; __pyx_L29_exception_handled:; __Pyx_XGIVEREF(__pyx_t_10); __Pyx_XGIVEREF(__pyx_t_9); __Pyx_XGIVEREF(__pyx_t_8); __Pyx_ExceptionReset(__pyx_t_10, __pyx_t_9, __pyx_t_8); __pyx_L35_try_end:; } } __pyx_L3:; /* "pandas/src/inference.pyx":675 * raise * * return result # <<<<<<<<<<<<<< * * def try_parse_date_and_time(ndarray[object] dates, ndarray[object] times, */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_result)); __pyx_r = ((PyObject *)__pyx_v_result); goto __pyx_L0; __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_XDECREF(__pyx_t_5); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.lib.try_parse_dates", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_result); __Pyx_XDECREF(__pyx_v_date); __Pyx_XDECREF(__pyx_v_parse_date); __Pyx_DECREF(((PyObject *)__pyx_cur_scope)); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_3lib_149try_parse_date_and_time(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_3lib_149try_parse_date_and_time = {__Pyx_NAMESTR("try_parse_date_and_time"), (PyCFunction)__pyx_pw_6pandas_3lib_149try_parse_date_and_time, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_3lib_149try_parse_date_and_time(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_dates = 0; PyArrayObject *__pyx_v_times = 0; PyObject *__pyx_v_date_parser = 0; PyObject *__pyx_v_time_parser = 0; PyObject *__pyx_v_dayfirst = 0; PyObject *__pyx_v_default = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("try_parse_date_and_time (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__dates,&__pyx_n_s__times,&__pyx_n_s__date_parser,&__pyx_n_s__time_parser,&__pyx_n_s__dayfirst,&__pyx_n_s__default,0}; PyObject* values[6] = {0,0,0,0,0,0}; /* "pandas/src/inference.pyx":678 * * def try_parse_date_and_time(ndarray[object] dates, ndarray[object] times, * date_parser=None, time_parser=None, # <<<<<<<<<<<<<< * dayfirst=False,default=None): * cdef: */ values[2] = ((PyObject *)Py_None); values[3] = ((PyObject *)Py_None); values[4] = __pyx_k_71; /* "pandas/src/inference.pyx":679 * def try_parse_date_and_time(ndarray[object] dates, ndarray[object] times, * date_parser=None, time_parser=None, * dayfirst=False,default=None): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n */ values[5] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5); case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__dates)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__times)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("try_parse_date_and_time", 0, 2, 6, 1); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 677; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__date_parser); if (value) { values[2] = value; kw_args--; } } case 3: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__time_parser); if (value) { values[3] = value; kw_args--; } } case 4: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__dayfirst); if (value) { values[4] = value; kw_args--; } } case 5: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__default); if (value) { values[5] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "try_parse_date_and_time") < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 677; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5); case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_dates = ((PyArrayObject *)values[0]); __pyx_v_times = ((PyArrayObject *)values[1]); __pyx_v_date_parser = values[2]; __pyx_v_time_parser = values[3]; __pyx_v_dayfirst = values[4]; __pyx_v_default = values[5]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("try_parse_date_and_time", 0, 2, 6, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 677; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.lib.try_parse_date_and_time", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dates), __pyx_ptype_5numpy_ndarray, 1, "dates", 0))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 677; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_times), __pyx_ptype_5numpy_ndarray, 1, "times", 0))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 677; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_3lib_148try_parse_date_and_time(__pyx_self, __pyx_v_dates, __pyx_v_times, __pyx_v_date_parser, __pyx_v_time_parser, __pyx_v_dayfirst, __pyx_v_default); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_3lib_23try_parse_date_and_time_1parse_date(PyObject *__pyx_self, PyObject *__pyx_v_s); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_3lib_23try_parse_date_and_time_1parse_date = {__Pyx_NAMESTR("parse_date"), (PyCFunction)__pyx_pw_6pandas_3lib_23try_parse_date_and_time_1parse_date, METH_O, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_3lib_23try_parse_date_and_time_1parse_date(PyObject *__pyx_self, PyObject *__pyx_v_s) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("parse_date (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_3lib_23try_parse_date_and_time_parse_date(__pyx_self, ((PyObject *)__pyx_v_s)); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/inference.pyx":700 * parse_date = lambda x: parse(x, dayfirst=dayfirst, default=default) * except ImportError: # pragma: no cover * def parse_date(s): # <<<<<<<<<<<<<< * try: * return date.strptime(s, '%m/%d/%Y') */ static PyObject *__pyx_pf_6pandas_3lib_23try_parse_date_and_time_parse_date(PyObject *__pyx_self, PyObject *__pyx_v_s) { struct __pyx_obj_6pandas_3lib___pyx_scope_struct_1_try_parse_date_and_time *__pyx_cur_scope; struct __pyx_obj_6pandas_3lib___pyx_scope_struct_1_try_parse_date_and_time *__pyx_outer_scope; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; int __pyx_t_7; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("parse_date", 0); __pyx_outer_scope = (struct __pyx_obj_6pandas_3lib___pyx_scope_struct_1_try_parse_date_and_time *) __Pyx_CyFunction_GetClosure(__pyx_self); __pyx_cur_scope = __pyx_outer_scope; /* "pandas/src/inference.pyx":701 * except ImportError: # pragma: no cover * def parse_date(s): * try: # <<<<<<<<<<<<<< * return date.strptime(s, '%m/%d/%Y') * except Exception: */ { __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:*/ { /* "pandas/src/inference.pyx":702 * def parse_date(s): * try: * return date.strptime(s, '%m/%d/%Y') # <<<<<<<<<<<<<< * except Exception: * return s */ __Pyx_XDECREF(__pyx_r); if (unlikely(!__pyx_cur_scope->__pyx_v_date)) { __Pyx_RaiseClosureNameError("date"); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 702; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_date, __pyx_n_s__strptime); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 702; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 702; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_v_s); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_s); __Pyx_GIVEREF(__pyx_v_s); __Pyx_INCREF(((PyObject *)__pyx_kp_s_62)); PyTuple_SET_ITEM(__pyx_t_5, 1, ((PyObject *)__pyx_kp_s_62)); __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_62)); __pyx_t_6 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 702; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; __pyx_r = __pyx_t_6; __pyx_t_6 = 0; goto __pyx_L7_try_return; } __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L10_try_end; __pyx_L7_try_return:; __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); goto __pyx_L0; __pyx_L3_error:; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; /* "pandas/src/inference.pyx":703 * try: * return date.strptime(s, '%m/%d/%Y') * except Exception: # <<<<<<<<<<<<<< * return s * else: */ __pyx_t_7 = PyErr_ExceptionMatches(__pyx_builtin_Exception); if (__pyx_t_7) { __Pyx_AddTraceback("pandas.lib.try_parse_date_and_time.parse_date", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_5, &__pyx_t_4) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 703; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_GOTREF(__pyx_t_5); __Pyx_GOTREF(__pyx_t_4); /* "pandas/src/inference.pyx":704 * return date.strptime(s, '%m/%d/%Y') * except Exception: * return s # <<<<<<<<<<<<<< * else: * parse_date = date_parser */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_s); __pyx_r = __pyx_v_s; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; goto __pyx_L6_except_return; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; goto __pyx_L4_exception_handled; } __pyx_L5_except_error:; __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); goto __pyx_L1_error; __pyx_L6_except_return:; __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); goto __pyx_L0; __pyx_L4_exception_handled:; __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); __pyx_L10_try_end:; } __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("pandas.lib.try_parse_date_and_time.parse_date", __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_3lib_23try_parse_date_and_time_3parse_time(PyObject *__pyx_self, PyObject *__pyx_v_s); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_3lib_23try_parse_date_and_time_3parse_time = {__Pyx_NAMESTR("parse_time"), (PyCFunction)__pyx_pw_6pandas_3lib_23try_parse_date_and_time_3parse_time, METH_O, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_3lib_23try_parse_date_and_time_3parse_time(PyObject *__pyx_self, PyObject *__pyx_v_s) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("parse_time (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_3lib_23try_parse_date_and_time_2parse_time(__pyx_self, ((PyObject *)__pyx_v_s)); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/inference.pyx":713 * parse_time = lambda x: parse(x) * except ImportError: # pragma: no cover * def parse_time(s): # <<<<<<<<<<<<<< * try: * return time.strptime(s, '%H:%M:%S') */ static PyObject *__pyx_pf_6pandas_3lib_23try_parse_date_and_time_2parse_time(PyObject *__pyx_self, PyObject *__pyx_v_s) { struct __pyx_obj_6pandas_3lib___pyx_scope_struct_1_try_parse_date_and_time *__pyx_cur_scope; struct __pyx_obj_6pandas_3lib___pyx_scope_struct_1_try_parse_date_and_time *__pyx_outer_scope; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; int __pyx_t_7; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("parse_time", 0); __pyx_outer_scope = (struct __pyx_obj_6pandas_3lib___pyx_scope_struct_1_try_parse_date_and_time *) __Pyx_CyFunction_GetClosure(__pyx_self); __pyx_cur_scope = __pyx_outer_scope; /* "pandas/src/inference.pyx":714 * except ImportError: # pragma: no cover * def parse_time(s): * try: # <<<<<<<<<<<<<< * return time.strptime(s, '%H:%M:%S') * except Exception: */ { __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:*/ { /* "pandas/src/inference.pyx":715 * def parse_time(s): * try: * return time.strptime(s, '%H:%M:%S') # <<<<<<<<<<<<<< * except Exception: * return s */ __Pyx_XDECREF(__pyx_r); if (unlikely(!__pyx_cur_scope->__pyx_v_time)) { __Pyx_RaiseClosureNameError("time"); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 715; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_time, __pyx_n_s__strptime); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 715; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 715; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_v_s); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_s); __Pyx_GIVEREF(__pyx_v_s); __Pyx_INCREF(((PyObject *)__pyx_kp_s_72)); PyTuple_SET_ITEM(__pyx_t_5, 1, ((PyObject *)__pyx_kp_s_72)); __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_72)); __pyx_t_6 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 715; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; __pyx_r = __pyx_t_6; __pyx_t_6 = 0; goto __pyx_L7_try_return; } __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L10_try_end; __pyx_L7_try_return:; __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); goto __pyx_L0; __pyx_L3_error:; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; /* "pandas/src/inference.pyx":716 * try: * return time.strptime(s, '%H:%M:%S') * except Exception: # <<<<<<<<<<<<<< * return s * */ __pyx_t_7 = PyErr_ExceptionMatches(__pyx_builtin_Exception); if (__pyx_t_7) { __Pyx_AddTraceback("pandas.lib.try_parse_date_and_time.parse_time", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_5, &__pyx_t_4) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 716; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_GOTREF(__pyx_t_5); __Pyx_GOTREF(__pyx_t_4); /* "pandas/src/inference.pyx":717 * return time.strptime(s, '%H:%M:%S') * except Exception: * return s # <<<<<<<<<<<<<< * * else: */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_s); __pyx_r = __pyx_v_s; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; goto __pyx_L6_except_return; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; goto __pyx_L4_exception_handled; } __pyx_L5_except_error:; __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); goto __pyx_L1_error; __pyx_L6_except_return:; __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); goto __pyx_L0; __pyx_L4_exception_handled:; __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); __pyx_L10_try_end:; } __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("pandas.lib.try_parse_date_and_time.parse_time", __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_3lib_23try_parse_date_and_time_4lambda2(PyObject *__pyx_self, PyObject *__pyx_v_x); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_3lib_23try_parse_date_and_time_4lambda2 = {__Pyx_NAMESTR("lambda2"), (PyCFunction)__pyx_pw_6pandas_3lib_23try_parse_date_and_time_4lambda2, METH_O, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_3lib_23try_parse_date_and_time_4lambda2(PyObject *__pyx_self, PyObject *__pyx_v_x) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("lambda2 (wrapper)", 0); __pyx_r = __pyx_lambda_funcdef_lambda2(__pyx_self, ((PyObject *)__pyx_v_x)); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/inference.pyx":698 * try: * from dateutil.parser import parse * parse_date = lambda x: parse(x, dayfirst=dayfirst, default=default) # <<<<<<<<<<<<<< * except ImportError: # pragma: no cover * def parse_date(s): */ static PyObject *__pyx_lambda_funcdef_lambda2(PyObject *__pyx_self, PyObject *__pyx_v_x) { struct __pyx_obj_6pandas_3lib___pyx_scope_struct_1_try_parse_date_and_time *__pyx_cur_scope; struct __pyx_obj_6pandas_3lib___pyx_scope_struct_1_try_parse_date_and_time *__pyx_outer_scope; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("lambda2", 0); __pyx_outer_scope = (struct __pyx_obj_6pandas_3lib___pyx_scope_struct_1_try_parse_date_and_time *) __Pyx_CyFunction_GetClosure(__pyx_self); __pyx_cur_scope = __pyx_outer_scope; __Pyx_XDECREF(__pyx_r); if (unlikely(!__pyx_cur_scope->__pyx_v_parse)) { __Pyx_RaiseClosureNameError("parse"); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 698; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 698; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_x); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_x); __Pyx_GIVEREF(__pyx_v_x); __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 698; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_cur_scope->__pyx_v_dayfirst)) { __Pyx_RaiseClosureNameError("dayfirst"); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 698; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__dayfirst), __pyx_cur_scope->__pyx_v_dayfirst) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 698; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__pyx_cur_scope->__pyx_v_default)) { __Pyx_RaiseClosureNameError("default"); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 698; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__default), __pyx_cur_scope->__pyx_v_default) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 698; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_3 = PyObject_Call(__pyx_cur_scope->__pyx_v_parse, ((PyObject *)__pyx_t_1), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 698; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("pandas.lib.try_parse_date_and_time.lambda2", __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_3lib_23try_parse_date_and_time_5lambda3(PyObject *__pyx_self, PyObject *__pyx_v_x); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_3lib_23try_parse_date_and_time_5lambda3 = {__Pyx_NAMESTR("lambda3"), (PyCFunction)__pyx_pw_6pandas_3lib_23try_parse_date_and_time_5lambda3, METH_O, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_3lib_23try_parse_date_and_time_5lambda3(PyObject *__pyx_self, PyObject *__pyx_v_x) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("lambda3 (wrapper)", 0); __pyx_r = __pyx_lambda_funcdef_lambda3(__pyx_self, ((PyObject *)__pyx_v_x)); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/inference.pyx":711 * try: * from dateutil.parser import parse * parse_time = lambda x: parse(x) # <<<<<<<<<<<<<< * except ImportError: # pragma: no cover * def parse_time(s): */ static PyObject *__pyx_lambda_funcdef_lambda3(PyObject *__pyx_self, PyObject *__pyx_v_x) { struct __pyx_obj_6pandas_3lib___pyx_scope_struct_1_try_parse_date_and_time *__pyx_cur_scope; struct __pyx_obj_6pandas_3lib___pyx_scope_struct_1_try_parse_date_and_time *__pyx_outer_scope; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("lambda3", 0); __pyx_outer_scope = (struct __pyx_obj_6pandas_3lib___pyx_scope_struct_1_try_parse_date_and_time *) __Pyx_CyFunction_GetClosure(__pyx_self); __pyx_cur_scope = __pyx_outer_scope; __Pyx_XDECREF(__pyx_r); if (unlikely(!__pyx_cur_scope->__pyx_v_parse)) { __Pyx_RaiseClosureNameError("parse"); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 711; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 711; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_x); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_x); __Pyx_GIVEREF(__pyx_v_x); __pyx_t_2 = PyObject_Call(__pyx_cur_scope->__pyx_v_parse, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 711; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("pandas.lib.try_parse_date_and_time.lambda3", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/inference.pyx":677 * return result * * def try_parse_date_and_time(ndarray[object] dates, ndarray[object] times, # <<<<<<<<<<<<<< * date_parser=None, time_parser=None, * dayfirst=False,default=None): */ static PyObject *__pyx_pf_6pandas_3lib_148try_parse_date_and_time(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_dates, PyArrayObject *__pyx_v_times, PyObject *__pyx_v_date_parser, PyObject *__pyx_v_time_parser, PyObject *__pyx_v_dayfirst, PyObject *__pyx_v_default) { struct __pyx_obj_6pandas_3lib___pyx_scope_struct_1_try_parse_date_and_time *__pyx_cur_scope; Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_n; PyArrayObject *__pyx_v_result = 0; PyObject *__pyx_v_datetime = NULL; CYTHON_UNUSED PyObject *__pyx_v_timedelta = NULL; PyObject *__pyx_v_parse_date = NULL; PyObject *__pyx_v_parse_time = NULL; PyObject *__pyx_v_d = NULL; PyObject *__pyx_v_t = NULL; __Pyx_LocalBuf_ND __pyx_pybuffernd_dates; __Pyx_Buffer __pyx_pybuffer_dates; __Pyx_LocalBuf_ND __pyx_pybuffernd_result; __Pyx_Buffer __pyx_pybuffer_result; __Pyx_LocalBuf_ND __pyx_pybuffernd_times; __Pyx_Buffer __pyx_pybuffer_times; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; Py_ssize_t __pyx_t_3; int __pyx_t_4; 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; int __pyx_t_12; Py_ssize_t __pyx_t_13; Py_ssize_t __pyx_t_14; PyObject *__pyx_t_15 = NULL; PyObject *__pyx_t_16 = NULL; PyObject *__pyx_t_17 = NULL; Py_ssize_t __pyx_t_18; PyObject **__pyx_t_19; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("try_parse_date_and_time", 0); __pyx_cur_scope = (struct __pyx_obj_6pandas_3lib___pyx_scope_struct_1_try_parse_date_and_time *)__pyx_tp_new_6pandas_3lib___pyx_scope_struct_1_try_parse_date_and_time(__pyx_ptype_6pandas_3lib___pyx_scope_struct_1_try_parse_date_and_time, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_cur_scope)) { __Pyx_RefNannyFinishContext(); return NULL; } __Pyx_GOTREF(__pyx_cur_scope); __pyx_cur_scope->__pyx_v_dayfirst = __pyx_v_dayfirst; __Pyx_INCREF(__pyx_cur_scope->__pyx_v_dayfirst); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_dayfirst); __pyx_cur_scope->__pyx_v_default = __pyx_v_default; __Pyx_INCREF(__pyx_cur_scope->__pyx_v_default); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_default); __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_dates.pybuffer.buf = NULL; __pyx_pybuffer_dates.refcount = 0; __pyx_pybuffernd_dates.data = NULL; __pyx_pybuffernd_dates.rcbuffer = &__pyx_pybuffer_dates; __pyx_pybuffer_times.pybuffer.buf = NULL; __pyx_pybuffer_times.refcount = 0; __pyx_pybuffernd_times.data = NULL; __pyx_pybuffernd_times.rcbuffer = &__pyx_pybuffer_times; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_dates.rcbuffer->pybuffer, (PyObject*)__pyx_v_dates, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 677; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_dates.diminfo[0].strides = __pyx_pybuffernd_dates.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_dates.diminfo[0].shape = __pyx_pybuffernd_dates.rcbuffer->pybuffer.shape[0]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_times.rcbuffer->pybuffer, (PyObject*)__pyx_v_times, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 677; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_times.diminfo[0].strides = __pyx_pybuffernd_times.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_times.diminfo[0].shape = __pyx_pybuffernd_times.rcbuffer->pybuffer.shape[0]; /* "pandas/src/inference.pyx":684 * ndarray[object] result * * from datetime import date, time, datetime, timedelta # <<<<<<<<<<<<<< * * n = len(dates) */ __pyx_t_1 = PyList_New(4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 684; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)__pyx_n_s__date)); PyList_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_n_s__date)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__date)); __Pyx_INCREF(((PyObject *)__pyx_n_s__time)); PyList_SET_ITEM(__pyx_t_1, 1, ((PyObject *)__pyx_n_s__time)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__time)); __Pyx_INCREF(((PyObject *)__pyx_n_s__datetime)); PyList_SET_ITEM(__pyx_t_1, 2, ((PyObject *)__pyx_n_s__datetime)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__datetime)); __Pyx_INCREF(((PyObject *)__pyx_n_s__timedelta)); PyList_SET_ITEM(__pyx_t_1, 3, ((PyObject *)__pyx_n_s__timedelta)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__timedelta)); __pyx_t_2 = __Pyx_Import(((PyObject *)__pyx_n_s__datetime), ((PyObject *)__pyx_t_1), -1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 684; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s__date); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 684; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_cur_scope->__pyx_v_date = __pyx_t_1; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s__time); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 684; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_cur_scope->__pyx_v_time = __pyx_t_1; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s__datetime); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 684; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_t_1); __pyx_v_datetime = __pyx_t_1; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s__timedelta); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 684; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_t_1); __pyx_v_timedelta = __pyx_t_1; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/inference.pyx":686 * from datetime import date, time, datetime, timedelta * * n = len(dates) # <<<<<<<<<<<<<< * if len(times) != n: * raise ValueError('Length of dates and times must be equal') */ __pyx_t_3 = PyObject_Length(((PyObject *)__pyx_v_dates)); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 686; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_3; /* "pandas/src/inference.pyx":687 * * n = len(dates) * if len(times) != n: # <<<<<<<<<<<<<< * raise ValueError('Length of dates and times must be equal') * result = np.empty(n, dtype='O') */ __pyx_t_3 = PyObject_Length(((PyObject *)__pyx_v_times)); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 687; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_4 = ((__pyx_t_3 != __pyx_v_n) != 0); if (__pyx_t_4) { /* "pandas/src/inference.pyx":688 * n = len(dates) * if len(times) != n: * raise ValueError('Length of dates and times must be equal') # <<<<<<<<<<<<<< * result = np.empty(n, dtype='O') * */ __pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_74), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 688; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 688; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L3; } __pyx_L3:; /* "pandas/src/inference.pyx":689 * if len(times) != n: * raise ValueError('Length of dates and times must be equal') * result = np.empty(n, dtype='O') # <<<<<<<<<<<<<< * * if date_parser is None: */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 689; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__empty); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 689; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_n); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 689; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 689; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 689; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_2)); if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__dtype), ((PyObject *)__pyx_n_s__O)) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 689; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_6 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_5), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 689; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; __Pyx_DECREF(((PyObject *)__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_filename = __pyx_f[1]; __pyx_lineno = 689; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_7 = ((PyArrayObject *)__pyx_t_6); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_object, 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_result.rcbuffer->pybuffer, (PyObject*)__pyx_v_result, &__Pyx_TypeInfo_object, 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_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_8 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 689; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_7 = 0; __pyx_v_result = ((PyArrayObject *)__pyx_t_6); __pyx_t_6 = 0; /* "pandas/src/inference.pyx":691 * result = np.empty(n, dtype='O') * * if date_parser is None: # <<<<<<<<<<<<<< * if default is None: # GH2618 * date=datetime.now() */ __pyx_t_4 = (__pyx_v_date_parser == Py_None); __pyx_t_12 = (__pyx_t_4 != 0); if (__pyx_t_12) { /* "pandas/src/inference.pyx":692 * * if date_parser is None: * if default is None: # GH2618 # <<<<<<<<<<<<<< * date=datetime.now() * default=datetime(date.year,date.month,1) */ __pyx_t_12 = (__pyx_cur_scope->__pyx_v_default == Py_None); __pyx_t_4 = (__pyx_t_12 != 0); if (__pyx_t_4) { /* "pandas/src/inference.pyx":693 * if date_parser is None: * if default is None: # GH2618 * date=datetime.now() # <<<<<<<<<<<<<< * default=datetime(date.year,date.month,1) * */ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_datetime, __pyx_n_s__now); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 693; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_2 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 693; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_date); __Pyx_DECREF_SET(__pyx_cur_scope->__pyx_v_date, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/inference.pyx":694 * if default is None: # GH2618 * date=datetime.now() * default=datetime(date.year,date.month,1) # <<<<<<<<<<<<<< * * try: */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_date, __pyx_n_s__year); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 694; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_date, __pyx_n_s__month); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 694; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 694; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_6); __Pyx_INCREF(__pyx_int_1); PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_int_1); __Pyx_GIVEREF(__pyx_int_1); __pyx_t_2 = 0; __pyx_t_6 = 0; __pyx_t_6 = PyObject_Call(__pyx_v_datetime, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 694; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_default); __Pyx_DECREF_SET(__pyx_cur_scope->__pyx_v_default, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_6); __pyx_t_6 = 0; goto __pyx_L5; } __pyx_L5:; /* "pandas/src/inference.pyx":696 * default=datetime(date.year,date.month,1) * * try: # <<<<<<<<<<<<<< * from dateutil.parser import parse * parse_date = lambda x: parse(x, dayfirst=dayfirst, default=default) */ { __Pyx_ExceptionSave(&__pyx_t_11, &__pyx_t_10, &__pyx_t_9); __Pyx_XGOTREF(__pyx_t_11); __Pyx_XGOTREF(__pyx_t_10); __Pyx_XGOTREF(__pyx_t_9); /*try:*/ { /* "pandas/src/inference.pyx":697 * * try: * from dateutil.parser import parse # <<<<<<<<<<<<<< * parse_date = lambda x: parse(x, dayfirst=dayfirst, default=default) * except ImportError: # pragma: no cover */ __pyx_t_6 = PyList_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 697; __pyx_clineno = __LINE__; goto __pyx_L6_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(((PyObject *)__pyx_n_s__parse)); PyList_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_n_s__parse)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__parse)); __pyx_t_5 = __Pyx_Import(((PyObject *)__pyx_n_s_63), ((PyObject *)__pyx_t_6), -1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 697; __pyx_clineno = __LINE__; goto __pyx_L6_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0; __pyx_t_6 = __Pyx_ImportFrom(__pyx_t_5, __pyx_n_s__parse); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 697; __pyx_clineno = __LINE__; goto __pyx_L6_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_6); __pyx_cur_scope->__pyx_v_parse = __pyx_t_6; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "pandas/src/inference.pyx":698 * try: * from dateutil.parser import parse * parse_date = lambda x: parse(x, dayfirst=dayfirst, default=default) # <<<<<<<<<<<<<< * except ImportError: # pragma: no cover * def parse_date(s): */ __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6pandas_3lib_23try_parse_date_and_time_4lambda2, 0, __pyx_n_s_75, ((PyObject*)__pyx_cur_scope), __pyx_n_s_65, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 698; __pyx_clineno = __LINE__; goto __pyx_L6_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_v_parse_date = __pyx_t_5; __pyx_t_5 = 0; } __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; goto __pyx_L13_try_end; __pyx_L6_error:; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; /* "pandas/src/inference.pyx":699 * from dateutil.parser import parse * parse_date = lambda x: parse(x, dayfirst=dayfirst, default=default) * except ImportError: # pragma: no cover # <<<<<<<<<<<<<< * def parse_date(s): * try: */ __pyx_t_8 = PyErr_ExceptionMatches(__pyx_builtin_ImportError); if (__pyx_t_8) { __Pyx_AddTraceback("pandas.lib.try_parse_date_and_time", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_2) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 699; __pyx_clineno = __LINE__; goto __pyx_L8_except_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_GOTREF(__pyx_t_6); __Pyx_GOTREF(__pyx_t_2); /* "pandas/src/inference.pyx":700 * parse_date = lambda x: parse(x, dayfirst=dayfirst, default=default) * except ImportError: # pragma: no cover * def parse_date(s): # <<<<<<<<<<<<<< * try: * return date.strptime(s, '%m/%d/%Y') */ __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6pandas_3lib_23try_parse_date_and_time_1parse_date, 0, __pyx_n_s_78, ((PyObject*)__pyx_cur_scope), __pyx_n_s_65, ((PyObject *)__pyx_k_codeobj_77)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 700; __pyx_clineno = __LINE__; goto __pyx_L8_except_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_XDECREF_SET(__pyx_v_parse_date, __pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; goto __pyx_L7_exception_handled; } __pyx_L8_except_error:; __Pyx_XGIVEREF(__pyx_t_11); __Pyx_XGIVEREF(__pyx_t_10); __Pyx_XGIVEREF(__pyx_t_9); __Pyx_ExceptionReset(__pyx_t_11, __pyx_t_10, __pyx_t_9); goto __pyx_L1_error; __pyx_L7_exception_handled:; __Pyx_XGIVEREF(__pyx_t_11); __Pyx_XGIVEREF(__pyx_t_10); __Pyx_XGIVEREF(__pyx_t_9); __Pyx_ExceptionReset(__pyx_t_11, __pyx_t_10, __pyx_t_9); __pyx_L13_try_end:; } goto __pyx_L4; } /*else*/ { /* "pandas/src/inference.pyx":706 * return s * else: * parse_date = date_parser # <<<<<<<<<<<<<< * * if time_parser is None: */ __Pyx_INCREF(__pyx_v_date_parser); __pyx_v_parse_date = __pyx_v_date_parser; } __pyx_L4:; /* "pandas/src/inference.pyx":708 * parse_date = date_parser * * if time_parser is None: # <<<<<<<<<<<<<< * try: * from dateutil.parser import parse */ __pyx_t_4 = (__pyx_v_time_parser == Py_None); __pyx_t_12 = (__pyx_t_4 != 0); if (__pyx_t_12) { /* "pandas/src/inference.pyx":709 * * if time_parser is None: * try: # <<<<<<<<<<<<<< * from dateutil.parser import parse * parse_time = lambda x: parse(x) */ { __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11); __Pyx_XGOTREF(__pyx_t_9); __Pyx_XGOTREF(__pyx_t_10); __Pyx_XGOTREF(__pyx_t_11); /*try:*/ { /* "pandas/src/inference.pyx":710 * if time_parser is None: * try: * from dateutil.parser import parse # <<<<<<<<<<<<<< * parse_time = lambda x: parse(x) * except ImportError: # pragma: no cover */ __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 710; __pyx_clineno = __LINE__; goto __pyx_L17_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(((PyObject *)__pyx_n_s__parse)); PyList_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_n_s__parse)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__parse)); __pyx_t_6 = __Pyx_Import(((PyObject *)__pyx_n_s_63), ((PyObject *)__pyx_t_2), -1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 710; __pyx_clineno = __LINE__; goto __pyx_L17_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_6, __pyx_n_s__parse); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 710; __pyx_clineno = __LINE__; goto __pyx_L17_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_t_2); __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_parse); __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_parse, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; /* "pandas/src/inference.pyx":711 * try: * from dateutil.parser import parse * parse_time = lambda x: parse(x) # <<<<<<<<<<<<<< * except ImportError: # pragma: no cover * def parse_time(s): */ __pyx_t_6 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6pandas_3lib_23try_parse_date_and_time_5lambda3, 0, __pyx_n_s_75, ((PyObject*)__pyx_cur_scope), __pyx_n_s_65, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 711; __pyx_clineno = __LINE__; goto __pyx_L17_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_v_parse_time = __pyx_t_6; __pyx_t_6 = 0; } __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; goto __pyx_L24_try_end; __pyx_L17_error:; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; /* "pandas/src/inference.pyx":712 * from dateutil.parser import parse * parse_time = lambda x: parse(x) * except ImportError: # pragma: no cover # <<<<<<<<<<<<<< * def parse_time(s): * try: */ __pyx_t_8 = PyErr_ExceptionMatches(__pyx_builtin_ImportError); if (__pyx_t_8) { __Pyx_AddTraceback("pandas.lib.try_parse_date_and_time", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_2, &__pyx_t_5) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 712; __pyx_clineno = __LINE__; goto __pyx_L19_except_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_GOTREF(__pyx_t_2); __Pyx_GOTREF(__pyx_t_5); /* "pandas/src/inference.pyx":713 * parse_time = lambda x: parse(x) * except ImportError: # pragma: no cover * def parse_time(s): # <<<<<<<<<<<<<< * try: * return time.strptime(s, '%H:%M:%S') */ __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6pandas_3lib_23try_parse_date_and_time_3parse_time, 0, __pyx_n_s_81, ((PyObject*)__pyx_cur_scope), __pyx_n_s_65, ((PyObject *)__pyx_k_codeobj_80)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 713; __pyx_clineno = __LINE__; goto __pyx_L19_except_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_XDECREF_SET(__pyx_v_parse_time, __pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; goto __pyx_L18_exception_handled; } __pyx_L19_except_error:; __Pyx_XGIVEREF(__pyx_t_9); __Pyx_XGIVEREF(__pyx_t_10); __Pyx_XGIVEREF(__pyx_t_11); __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_10, __pyx_t_11); goto __pyx_L1_error; __pyx_L18_exception_handled:; __Pyx_XGIVEREF(__pyx_t_9); __Pyx_XGIVEREF(__pyx_t_10); __Pyx_XGIVEREF(__pyx_t_11); __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_10, __pyx_t_11); __pyx_L24_try_end:; } goto __pyx_L16; } /*else*/ { /* "pandas/src/inference.pyx":720 * * else: * parse_time = time_parser # <<<<<<<<<<<<<< * * for i from 0 <= i < n: */ __Pyx_INCREF(__pyx_v_time_parser); __pyx_v_parse_time = __pyx_v_time_parser; } __pyx_L16:; /* "pandas/src/inference.pyx":722 * parse_time = time_parser * * for i from 0 <= i < n: # <<<<<<<<<<<<<< * d = parse_date(str(dates[i])) * t = parse_time(str(times[i])) */ __pyx_t_3 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_3; __pyx_v_i++) { /* "pandas/src/inference.pyx":723 * * for i from 0 <= i < n: * d = parse_date(str(dates[i])) # <<<<<<<<<<<<<< * t = parse_time(str(times[i])) * result[i] = datetime(d.year, d.month, d.day, */ __pyx_t_13 = __pyx_v_i; __pyx_t_8 = -1; if (__pyx_t_13 < 0) { __pyx_t_13 += __pyx_pybuffernd_dates.diminfo[0].shape; if (unlikely(__pyx_t_13 < 0)) __pyx_t_8 = 0; } else if (unlikely(__pyx_t_13 >= __pyx_pybuffernd_dates.diminfo[0].shape)) __pyx_t_8 = 0; if (unlikely(__pyx_t_8 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_8); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 723; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_5 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_dates.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_dates.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_5); __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 723; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 723; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 723; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyObject_Call(__pyx_v_parse_date, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 723; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __Pyx_XDECREF_SET(__pyx_v_d, __pyx_t_5); __pyx_t_5 = 0; /* "pandas/src/inference.pyx":724 * for i from 0 <= i < n: * d = parse_date(str(dates[i])) * t = parse_time(str(times[i])) # <<<<<<<<<<<<<< * result[i] = datetime(d.year, d.month, d.day, * t.hour, t.minute, t.second) */ __pyx_t_14 = __pyx_v_i; __pyx_t_8 = -1; if (__pyx_t_14 < 0) { __pyx_t_14 += __pyx_pybuffernd_times.diminfo[0].shape; if (unlikely(__pyx_t_14 < 0)) __pyx_t_8 = 0; } else if (unlikely(__pyx_t_14 >= __pyx_pybuffernd_times.diminfo[0].shape)) __pyx_t_8 = 0; if (unlikely(__pyx_t_8 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_8); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 724; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_5 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_times.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_times.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_5); __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 724; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 724; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 724; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyObject_Call(__pyx_v_parse_time, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 724; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __Pyx_XDECREF_SET(__pyx_v_t, __pyx_t_5); __pyx_t_5 = 0; /* "pandas/src/inference.pyx":725 * d = parse_date(str(dates[i])) * t = parse_time(str(times[i])) * result[i] = datetime(d.year, d.month, d.day, # <<<<<<<<<<<<<< * t.hour, t.minute, t.second) * */ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_d, __pyx_n_s__year); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 725; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_d, __pyx_n_s__month); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 725; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_d, __pyx_n_s__day); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 725; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); /* "pandas/src/inference.pyx":726 * t = parse_time(str(times[i])) * result[i] = datetime(d.year, d.month, d.day, * t.hour, t.minute, t.second) # <<<<<<<<<<<<<< * * return result */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_t, __pyx_n_s__hour); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 726; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_v_t, __pyx_n_s__minute); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 726; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_15); __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_v_t, __pyx_n_s__second); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 726; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_16); __pyx_t_17 = PyTuple_New(6); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 725; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_17); PyTuple_SET_ITEM(__pyx_t_17, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_17, 1, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_17, 2, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_17, 3, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_17, 4, __pyx_t_15); __Pyx_GIVEREF(__pyx_t_15); PyTuple_SET_ITEM(__pyx_t_17, 5, __pyx_t_16); __Pyx_GIVEREF(__pyx_t_16); __pyx_t_5 = 0; __pyx_t_2 = 0; __pyx_t_6 = 0; __pyx_t_1 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_16 = PyObject_Call(__pyx_v_datetime, ((PyObject *)__pyx_t_17), NULL); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 725; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_16); __Pyx_DECREF(((PyObject *)__pyx_t_17)); __pyx_t_17 = 0; /* "pandas/src/inference.pyx":725 * d = parse_date(str(dates[i])) * t = parse_time(str(times[i])) * result[i] = datetime(d.year, d.month, d.day, # <<<<<<<<<<<<<< * t.hour, t.minute, t.second) * */ __pyx_t_18 = __pyx_v_i; __pyx_t_8 = -1; if (__pyx_t_18 < 0) { __pyx_t_18 += __pyx_pybuffernd_result.diminfo[0].shape; if (unlikely(__pyx_t_18 < 0)) __pyx_t_8 = 0; } else if (unlikely(__pyx_t_18 >= __pyx_pybuffernd_result.diminfo[0].shape)) __pyx_t_8 = 0; if (unlikely(__pyx_t_8 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_8); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 725; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_19 = __Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_result.diminfo[0].strides); __Pyx_GOTREF(*__pyx_t_19); __Pyx_INCREF(__pyx_t_16); __Pyx_DECREF(*__pyx_t_19); *__pyx_t_19 = __pyx_t_16; __Pyx_GIVEREF(*__pyx_t_19); __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; } /* "pandas/src/inference.pyx":728 * t.hour, t.minute, t.second) * * return result # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_result)); __pyx_r = ((PyObject *)__pyx_v_result); goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_15); __Pyx_XDECREF(__pyx_t_16); __Pyx_XDECREF(__pyx_t_17); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_dates.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_times.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.lib.try_parse_date_and_time", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_dates.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_times.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_result); __Pyx_XDECREF(__pyx_v_datetime); __Pyx_XDECREF(__pyx_v_timedelta); __Pyx_XDECREF(__pyx_v_parse_date); __Pyx_XDECREF(__pyx_v_parse_time); __Pyx_XDECREF(__pyx_v_d); __Pyx_XDECREF(__pyx_v_t); __Pyx_DECREF(((PyObject *)__pyx_cur_scope)); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_3lib_151try_parse_year_month_day(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_3lib_151try_parse_year_month_day = {__Pyx_NAMESTR("try_parse_year_month_day"), (PyCFunction)__pyx_pw_6pandas_3lib_151try_parse_year_month_day, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_3lib_151try_parse_year_month_day(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_years = 0; PyArrayObject *__pyx_v_months = 0; PyArrayObject *__pyx_v_days = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("try_parse_year_month_day (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__years,&__pyx_n_s__months,&__pyx_n_s__days,0}; PyObject* values[3] = {0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__years)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__months)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("try_parse_year_month_day", 1, 3, 3, 1); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 731; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__days)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("try_parse_year_month_day", 1, 3, 3, 2); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 731; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "try_parse_year_month_day") < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 731; __pyx_clineno = __LINE__; goto __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_years = ((PyArrayObject *)values[0]); __pyx_v_months = ((PyArrayObject *)values[1]); __pyx_v_days = ((PyArrayObject *)values[2]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("try_parse_year_month_day", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 731; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.lib.try_parse_year_month_day", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_years), __pyx_ptype_5numpy_ndarray, 1, "years", 0))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 731; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_months), __pyx_ptype_5numpy_ndarray, 1, "months", 0))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 731; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_days), __pyx_ptype_5numpy_ndarray, 1, "days", 0))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 732; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_3lib_150try_parse_year_month_day(__pyx_self, __pyx_v_years, __pyx_v_months, __pyx_v_days); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/inference.pyx":731 * * * def try_parse_year_month_day(ndarray[object] years, ndarray[object] months, # <<<<<<<<<<<<<< * ndarray[object] days): * cdef: */ static PyObject *__pyx_pf_6pandas_3lib_150try_parse_year_month_day(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_years, PyArrayObject *__pyx_v_months, PyArrayObject *__pyx_v_days) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_n; PyArrayObject *__pyx_v_result = 0; PyObject *__pyx_v_datetime = NULL; __Pyx_LocalBuf_ND __pyx_pybuffernd_days; __Pyx_Buffer __pyx_pybuffer_days; __Pyx_LocalBuf_ND __pyx_pybuffernd_months; __Pyx_Buffer __pyx_pybuffer_months; __Pyx_LocalBuf_ND __pyx_pybuffernd_result; __Pyx_Buffer __pyx_pybuffer_result; __Pyx_LocalBuf_ND __pyx_pybuffernd_years; __Pyx_Buffer __pyx_pybuffer_years; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; Py_ssize_t __pyx_t_3; int __pyx_t_4; int __pyx_t_5; int __pyx_t_6; 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; Py_ssize_t __pyx_t_15; Py_ssize_t __pyx_t_16; Py_ssize_t __pyx_t_17; PyObject **__pyx_t_18; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("try_parse_year_month_day", 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_years.pybuffer.buf = NULL; __pyx_pybuffer_years.refcount = 0; __pyx_pybuffernd_years.data = NULL; __pyx_pybuffernd_years.rcbuffer = &__pyx_pybuffer_years; __pyx_pybuffer_months.pybuffer.buf = NULL; __pyx_pybuffer_months.refcount = 0; __pyx_pybuffernd_months.data = NULL; __pyx_pybuffernd_months.rcbuffer = &__pyx_pybuffer_months; __pyx_pybuffer_days.pybuffer.buf = NULL; __pyx_pybuffer_days.refcount = 0; __pyx_pybuffernd_days.data = NULL; __pyx_pybuffernd_days.rcbuffer = &__pyx_pybuffer_days; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_years.rcbuffer->pybuffer, (PyObject*)__pyx_v_years, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 731; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_years.diminfo[0].strides = __pyx_pybuffernd_years.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_years.diminfo[0].shape = __pyx_pybuffernd_years.rcbuffer->pybuffer.shape[0]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_months.rcbuffer->pybuffer, (PyObject*)__pyx_v_months, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 731; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_months.diminfo[0].strides = __pyx_pybuffernd_months.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_months.diminfo[0].shape = __pyx_pybuffernd_months.rcbuffer->pybuffer.shape[0]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_days.rcbuffer->pybuffer, (PyObject*)__pyx_v_days, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 731; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_days.diminfo[0].strides = __pyx_pybuffernd_days.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_days.diminfo[0].shape = __pyx_pybuffernd_days.rcbuffer->pybuffer.shape[0]; /* "pandas/src/inference.pyx":737 * ndarray[object] result * * from datetime import datetime # <<<<<<<<<<<<<< * * n = len(years) */ __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 737; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)__pyx_n_s__datetime)); PyList_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_n_s__datetime)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__datetime)); __pyx_t_2 = __Pyx_Import(((PyObject *)__pyx_n_s__datetime), ((PyObject *)__pyx_t_1), -1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 737; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s__datetime); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 737; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_t_1); __pyx_v_datetime = __pyx_t_1; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/inference.pyx":739 * from datetime import datetime * * n = len(years) # <<<<<<<<<<<<<< * if len(months) != n or len(days) != n: * raise ValueError('Length of years/months/days must all be equal') */ __pyx_t_3 = PyObject_Length(((PyObject *)__pyx_v_years)); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 739; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_3; /* "pandas/src/inference.pyx":740 * * n = len(years) * if len(months) != n or len(days) != n: # <<<<<<<<<<<<<< * raise ValueError('Length of years/months/days must all be equal') * result = np.empty(n, dtype='O') */ __pyx_t_3 = PyObject_Length(((PyObject *)__pyx_v_months)); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 740; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_4 = ((__pyx_t_3 != __pyx_v_n) != 0); if (!__pyx_t_4) { __pyx_t_3 = PyObject_Length(((PyObject *)__pyx_v_days)); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 740; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_5 = ((__pyx_t_3 != __pyx_v_n) != 0); __pyx_t_6 = __pyx_t_5; } else { __pyx_t_6 = __pyx_t_4; } if (__pyx_t_6) { /* "pandas/src/inference.pyx":741 * n = len(years) * if len(months) != n or len(days) != n: * raise ValueError('Length of years/months/days must all be equal') # <<<<<<<<<<<<<< * result = np.empty(n, dtype='O') * */ __pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_83), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 741; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 741; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L3; } __pyx_L3:; /* "pandas/src/inference.pyx":742 * if len(months) != n or len(days) != n: * raise ValueError('Length of years/months/days must all be equal') * result = np.empty(n, dtype='O') # <<<<<<<<<<<<<< * * for i from 0 <= i < n: */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 742; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__empty); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 742; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_n); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 742; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 742; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 742; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_2)); if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__dtype), ((PyObject *)__pyx_n_s__O)) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 742; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_8 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_7), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 742; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; if (!(likely(((__pyx_t_8) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_8, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 742; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_9 = ((PyArrayObject *)__pyx_t_8); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __pyx_t_10 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_t_9, &__Pyx_TypeInfo_object, 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_result.rcbuffer->pybuffer, (PyObject*)__pyx_v_result, &__Pyx_TypeInfo_object, 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_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_10 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 742; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_9 = 0; __pyx_v_result = ((PyArrayObject *)__pyx_t_8); __pyx_t_8 = 0; /* "pandas/src/inference.pyx":744 * result = np.empty(n, dtype='O') * * for i from 0 <= i < n: # <<<<<<<<<<<<<< * result[i] = datetime(int(years[i]), int(months[i]), int(days[i])) * */ __pyx_t_3 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_3; __pyx_v_i++) { /* "pandas/src/inference.pyx":745 * * for i from 0 <= i < n: * result[i] = datetime(int(years[i]), int(months[i]), int(days[i])) # <<<<<<<<<<<<<< * * return result */ __pyx_t_14 = __pyx_v_i; __pyx_t_10 = -1; if (__pyx_t_14 < 0) { __pyx_t_14 += __pyx_pybuffernd_years.diminfo[0].shape; if (unlikely(__pyx_t_14 < 0)) __pyx_t_10 = 0; } else if (unlikely(__pyx_t_14 >= __pyx_pybuffernd_years.diminfo[0].shape)) __pyx_t_10 = 0; if (unlikely(__pyx_t_10 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_10); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 745; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_8 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_years.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_years.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_8); __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 745; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_8); __Pyx_GIVEREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_8 = PyObject_Call(((PyObject *)((PyObject*)(&PyInt_Type))), ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 745; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __pyx_t_15 = __pyx_v_i; __pyx_t_10 = -1; if (__pyx_t_15 < 0) { __pyx_t_15 += __pyx_pybuffernd_months.diminfo[0].shape; if (unlikely(__pyx_t_15 < 0)) __pyx_t_10 = 0; } else if (unlikely(__pyx_t_15 >= __pyx_pybuffernd_months.diminfo[0].shape)) __pyx_t_10 = 0; if (unlikely(__pyx_t_10 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_10); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 745; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_2 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_months.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_months.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_2); __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 745; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)(&PyInt_Type))), ((PyObject *)__pyx_t_7), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 745; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0; __pyx_t_16 = __pyx_v_i; __pyx_t_10 = -1; if (__pyx_t_16 < 0) { __pyx_t_16 += __pyx_pybuffernd_days.diminfo[0].shape; if (unlikely(__pyx_t_16 < 0)) __pyx_t_10 = 0; } else if (unlikely(__pyx_t_16 >= __pyx_pybuffernd_days.diminfo[0].shape)) __pyx_t_10 = 0; if (unlikely(__pyx_t_10 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_10); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 745; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_7 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_days.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_days.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_7); __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 745; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_7); __Pyx_GIVEREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_7 = PyObject_Call(((PyObject *)((PyObject*)(&PyInt_Type))), ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 745; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 745; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_8); __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_t_7); __Pyx_GIVEREF(__pyx_t_7); __pyx_t_8 = 0; __pyx_t_2 = 0; __pyx_t_7 = 0; __pyx_t_7 = PyObject_Call(__pyx_v_datetime, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 745; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_t_17 = __pyx_v_i; __pyx_t_10 = -1; if (__pyx_t_17 < 0) { __pyx_t_17 += __pyx_pybuffernd_result.diminfo[0].shape; if (unlikely(__pyx_t_17 < 0)) __pyx_t_10 = 0; } else if (unlikely(__pyx_t_17 >= __pyx_pybuffernd_result.diminfo[0].shape)) __pyx_t_10 = 0; if (unlikely(__pyx_t_10 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_10); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 745; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_18 = __Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_result.diminfo[0].strides); __Pyx_GOTREF(*__pyx_t_18); __Pyx_INCREF(__pyx_t_7); __Pyx_DECREF(*__pyx_t_18); *__pyx_t_18 = __pyx_t_7; __Pyx_GIVEREF(*__pyx_t_18); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } /* "pandas/src/inference.pyx":747 * result[i] = datetime(int(years[i]), int(months[i]), int(days[i])) * * return result # <<<<<<<<<<<<<< * * def try_parse_datetime_components(ndarray[object] years, */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_result)); __pyx_r = ((PyObject *)__pyx_v_result); goto __pyx_L0; __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_7); __Pyx_XDECREF(__pyx_t_8); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_days.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_months.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_years.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.lib.try_parse_year_month_day", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_days.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_months.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_years.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_result); __Pyx_XDECREF(__pyx_v_datetime); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_3lib_153try_parse_datetime_components(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_3lib_153try_parse_datetime_components = {__Pyx_NAMESTR("try_parse_datetime_components"), (PyCFunction)__pyx_pw_6pandas_3lib_153try_parse_datetime_components, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_3lib_153try_parse_datetime_components(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_years = 0; PyArrayObject *__pyx_v_months = 0; PyArrayObject *__pyx_v_days = 0; PyArrayObject *__pyx_v_hours = 0; PyArrayObject *__pyx_v_minutes = 0; PyArrayObject *__pyx_v_seconds = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("try_parse_datetime_components (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__years,&__pyx_n_s__months,&__pyx_n_s__days,&__pyx_n_s__hours,&__pyx_n_s__minutes,&__pyx_n_s__seconds,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); case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__years)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__months)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("try_parse_datetime_components", 1, 6, 6, 1); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 749; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__days)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("try_parse_datetime_components", 1, 6, 6, 2); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 749; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__hours)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("try_parse_datetime_components", 1, 6, 6, 3); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 749; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 4: if (likely((values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__minutes)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("try_parse_datetime_components", 1, 6, 6, 4); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 749; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 5: if (likely((values[5] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__seconds)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("try_parse_datetime_components", 1, 6, 6, 5); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 749; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "try_parse_datetime_components") < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 749; __pyx_clineno = __LINE__; goto __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_years = ((PyArrayObject *)values[0]); __pyx_v_months = ((PyArrayObject *)values[1]); __pyx_v_days = ((PyArrayObject *)values[2]); __pyx_v_hours = ((PyArrayObject *)values[3]); __pyx_v_minutes = ((PyArrayObject *)values[4]); __pyx_v_seconds = ((PyArrayObject *)values[5]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("try_parse_datetime_components", 1, 6, 6, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 749; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.lib.try_parse_datetime_components", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_years), __pyx_ptype_5numpy_ndarray, 1, "years", 0))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 749; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_months), __pyx_ptype_5numpy_ndarray, 1, "months", 0))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 750; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_days), __pyx_ptype_5numpy_ndarray, 1, "days", 0))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 751; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_hours), __pyx_ptype_5numpy_ndarray, 1, "hours", 0))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 752; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_minutes), __pyx_ptype_5numpy_ndarray, 1, "minutes", 0))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 753; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_seconds), __pyx_ptype_5numpy_ndarray, 1, "seconds", 0))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 754; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_3lib_152try_parse_datetime_components(__pyx_self, __pyx_v_years, __pyx_v_months, __pyx_v_days, __pyx_v_hours, __pyx_v_minutes, __pyx_v_seconds); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/inference.pyx":749 * return result * * def try_parse_datetime_components(ndarray[object] years, # <<<<<<<<<<<<<< * ndarray[object] months, * ndarray[object] days, */ static PyObject *__pyx_pf_6pandas_3lib_152try_parse_datetime_components(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_years, PyArrayObject *__pyx_v_months, PyArrayObject *__pyx_v_days, PyArrayObject *__pyx_v_hours, PyArrayObject *__pyx_v_minutes, PyArrayObject *__pyx_v_seconds) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_n; PyArrayObject *__pyx_v_result = 0; int __pyx_v_secs; double __pyx_v_float_secs; double __pyx_v_micros; PyObject *__pyx_v_datetime = NULL; __Pyx_LocalBuf_ND __pyx_pybuffernd_days; __Pyx_Buffer __pyx_pybuffer_days; __Pyx_LocalBuf_ND __pyx_pybuffernd_hours; __Pyx_Buffer __pyx_pybuffer_hours; __Pyx_LocalBuf_ND __pyx_pybuffernd_minutes; __Pyx_Buffer __pyx_pybuffer_minutes; __Pyx_LocalBuf_ND __pyx_pybuffernd_months; __Pyx_Buffer __pyx_pybuffer_months; __Pyx_LocalBuf_ND __pyx_pybuffernd_result; __Pyx_Buffer __pyx_pybuffer_result; __Pyx_LocalBuf_ND __pyx_pybuffernd_seconds; __Pyx_Buffer __pyx_pybuffer_seconds; __Pyx_LocalBuf_ND __pyx_pybuffernd_years; __Pyx_Buffer __pyx_pybuffer_years; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; Py_ssize_t __pyx_t_3; int __pyx_t_4; int __pyx_t_5; int __pyx_t_6; int __pyx_t_7; int __pyx_t_8; int __pyx_t_9; PyObject *__pyx_t_10 = NULL; PyObject *__pyx_t_11 = NULL; PyArrayObject *__pyx_t_12 = NULL; int __pyx_t_13; PyObject *__pyx_t_14 = NULL; PyObject *__pyx_t_15 = NULL; PyObject *__pyx_t_16 = NULL; Py_ssize_t __pyx_t_17; double __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; PyObject *__pyx_t_23 = NULL; Py_ssize_t __pyx_t_24; PyObject *__pyx_t_25 = NULL; PyObject *__pyx_t_26 = NULL; PyObject *__pyx_t_27 = NULL; Py_ssize_t __pyx_t_28; PyObject **__pyx_t_29; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("try_parse_datetime_components", 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_years.pybuffer.buf = NULL; __pyx_pybuffer_years.refcount = 0; __pyx_pybuffernd_years.data = NULL; __pyx_pybuffernd_years.rcbuffer = &__pyx_pybuffer_years; __pyx_pybuffer_months.pybuffer.buf = NULL; __pyx_pybuffer_months.refcount = 0; __pyx_pybuffernd_months.data = NULL; __pyx_pybuffernd_months.rcbuffer = &__pyx_pybuffer_months; __pyx_pybuffer_days.pybuffer.buf = NULL; __pyx_pybuffer_days.refcount = 0; __pyx_pybuffernd_days.data = NULL; __pyx_pybuffernd_days.rcbuffer = &__pyx_pybuffer_days; __pyx_pybuffer_hours.pybuffer.buf = NULL; __pyx_pybuffer_hours.refcount = 0; __pyx_pybuffernd_hours.data = NULL; __pyx_pybuffernd_hours.rcbuffer = &__pyx_pybuffer_hours; __pyx_pybuffer_minutes.pybuffer.buf = NULL; __pyx_pybuffer_minutes.refcount = 0; __pyx_pybuffernd_minutes.data = NULL; __pyx_pybuffernd_minutes.rcbuffer = &__pyx_pybuffer_minutes; __pyx_pybuffer_seconds.pybuffer.buf = NULL; __pyx_pybuffer_seconds.refcount = 0; __pyx_pybuffernd_seconds.data = NULL; __pyx_pybuffernd_seconds.rcbuffer = &__pyx_pybuffer_seconds; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_years.rcbuffer->pybuffer, (PyObject*)__pyx_v_years, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 749; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_years.diminfo[0].strides = __pyx_pybuffernd_years.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_years.diminfo[0].shape = __pyx_pybuffernd_years.rcbuffer->pybuffer.shape[0]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_months.rcbuffer->pybuffer, (PyObject*)__pyx_v_months, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 749; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_months.diminfo[0].strides = __pyx_pybuffernd_months.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_months.diminfo[0].shape = __pyx_pybuffernd_months.rcbuffer->pybuffer.shape[0]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_days.rcbuffer->pybuffer, (PyObject*)__pyx_v_days, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 749; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_days.diminfo[0].strides = __pyx_pybuffernd_days.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_days.diminfo[0].shape = __pyx_pybuffernd_days.rcbuffer->pybuffer.shape[0]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_hours.rcbuffer->pybuffer, (PyObject*)__pyx_v_hours, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 749; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_hours.diminfo[0].strides = __pyx_pybuffernd_hours.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_hours.diminfo[0].shape = __pyx_pybuffernd_hours.rcbuffer->pybuffer.shape[0]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_minutes.rcbuffer->pybuffer, (PyObject*)__pyx_v_minutes, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 749; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_minutes.diminfo[0].strides = __pyx_pybuffernd_minutes.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_minutes.diminfo[0].shape = __pyx_pybuffernd_minutes.rcbuffer->pybuffer.shape[0]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_seconds.rcbuffer->pybuffer, (PyObject*)__pyx_v_seconds, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 749; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_seconds.diminfo[0].strides = __pyx_pybuffernd_seconds.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_seconds.diminfo[0].shape = __pyx_pybuffernd_seconds.rcbuffer->pybuffer.shape[0]; /* "pandas/src/inference.pyx":763 * double micros * * from datetime import datetime # <<<<<<<<<<<<<< * * n = len(years) */ __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 763; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)__pyx_n_s__datetime)); PyList_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_n_s__datetime)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__datetime)); __pyx_t_2 = __Pyx_Import(((PyObject *)__pyx_n_s__datetime), ((PyObject *)__pyx_t_1), -1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 763; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s__datetime); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 763; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_t_1); __pyx_v_datetime = __pyx_t_1; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/inference.pyx":765 * from datetime import datetime * * n = len(years) # <<<<<<<<<<<<<< * if (len(months) != n or len(days) != n or len(hours) != n or * len(minutes) != n or len(seconds) != n): */ __pyx_t_3 = PyObject_Length(((PyObject *)__pyx_v_years)); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 765; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_3; /* "pandas/src/inference.pyx":766 * * n = len(years) * if (len(months) != n or len(days) != n or len(hours) != n or # <<<<<<<<<<<<<< * len(minutes) != n or len(seconds) != n): * raise ValueError('Length of all datetime components must be equal') */ __pyx_t_3 = PyObject_Length(((PyObject *)__pyx_v_months)); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 766; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_4 = ((__pyx_t_3 != __pyx_v_n) != 0); if (!__pyx_t_4) { __pyx_t_3 = PyObject_Length(((PyObject *)__pyx_v_days)); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 766; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_5 = ((__pyx_t_3 != __pyx_v_n) != 0); if (!__pyx_t_5) { __pyx_t_3 = PyObject_Length(((PyObject *)__pyx_v_hours)); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 766; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_6 = ((__pyx_t_3 != __pyx_v_n) != 0); if (!__pyx_t_6) { /* "pandas/src/inference.pyx":767 * n = len(years) * if (len(months) != n or len(days) != n or len(hours) != n or * len(minutes) != n or len(seconds) != n): # <<<<<<<<<<<<<< * raise ValueError('Length of all datetime components must be equal') * result = np.empty(n, dtype='O') */ __pyx_t_3 = PyObject_Length(((PyObject *)__pyx_v_minutes)); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 767; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_7 = ((__pyx_t_3 != __pyx_v_n) != 0); if (!__pyx_t_7) { __pyx_t_3 = PyObject_Length(((PyObject *)__pyx_v_seconds)); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 767; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_8 = ((__pyx_t_3 != __pyx_v_n) != 0); __pyx_t_9 = __pyx_t_8; } else { __pyx_t_9 = __pyx_t_7; } __pyx_t_7 = __pyx_t_9; } else { __pyx_t_7 = __pyx_t_6; } __pyx_t_6 = __pyx_t_7; } else { __pyx_t_6 = __pyx_t_5; } __pyx_t_5 = __pyx_t_6; } else { __pyx_t_5 = __pyx_t_4; } if (__pyx_t_5) { /* "pandas/src/inference.pyx":768 * if (len(months) != n or len(days) != n or len(hours) != n or * len(minutes) != n or len(seconds) != n): * raise ValueError('Length of all datetime components must be equal') # <<<<<<<<<<<<<< * result = np.empty(n, dtype='O') * */ __pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_85), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 768; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 768; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L3; } __pyx_L3:; /* "pandas/src/inference.pyx":769 * len(minutes) != n or len(seconds) != n): * raise ValueError('Length of all datetime components must be equal') * result = np.empty(n, dtype='O') # <<<<<<<<<<<<<< * * for i from 0 <= i < n: */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 769; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__empty); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 769; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_n); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 769; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_10 = PyTuple_New(1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 769; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 769; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_2)); if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__dtype), ((PyObject *)__pyx_n_s__O)) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 769; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_11 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_10), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 769; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_10)); __pyx_t_10 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; if (!(likely(((__pyx_t_11) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_11, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 769; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_12 = ((PyArrayObject *)__pyx_t_11); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __pyx_t_13 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_t_12, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_13 < 0)) { PyErr_Fetch(&__pyx_t_14, &__pyx_t_15, &__pyx_t_16); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_v_result, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_14); Py_XDECREF(__pyx_t_15); Py_XDECREF(__pyx_t_16); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_14, __pyx_t_15, __pyx_t_16); } } __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_13 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 769; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_12 = 0; __pyx_v_result = ((PyArrayObject *)__pyx_t_11); __pyx_t_11 = 0; /* "pandas/src/inference.pyx":771 * result = np.empty(n, dtype='O') * * for i from 0 <= i < n: # <<<<<<<<<<<<<< * float_secs = float(seconds[i]) * secs = int(float_secs) */ __pyx_t_3 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_3; __pyx_v_i++) { /* "pandas/src/inference.pyx":772 * * for i from 0 <= i < n: * float_secs = float(seconds[i]) # <<<<<<<<<<<<<< * secs = int(float_secs) * */ __pyx_t_17 = __pyx_v_i; __pyx_t_13 = -1; if (__pyx_t_17 < 0) { __pyx_t_17 += __pyx_pybuffernd_seconds.diminfo[0].shape; if (unlikely(__pyx_t_17 < 0)) __pyx_t_13 = 0; } else if (unlikely(__pyx_t_17 >= __pyx_pybuffernd_seconds.diminfo[0].shape)) __pyx_t_13 = 0; if (unlikely(__pyx_t_13 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_13); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 772; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_11 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_seconds.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_seconds.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_11); __pyx_t_18 = __Pyx_PyObject_AsDouble(__pyx_t_11); if (unlikely(__pyx_t_18 == ((double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 772; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __pyx_v_float_secs = __pyx_t_18; /* "pandas/src/inference.pyx":773 * for i from 0 <= i < n: * float_secs = float(seconds[i]) * secs = int(float_secs) # <<<<<<<<<<<<<< * * micros = float_secs - secs */ __pyx_v_secs = ((int)__pyx_v_float_secs); /* "pandas/src/inference.pyx":775 * secs = int(float_secs) * * micros = float_secs - secs # <<<<<<<<<<<<<< * if micros > 0: * micros = micros * 1000000 */ __pyx_v_micros = (__pyx_v_float_secs - __pyx_v_secs); /* "pandas/src/inference.pyx":776 * * micros = float_secs - secs * if micros > 0: # <<<<<<<<<<<<<< * micros = micros * 1000000 * */ __pyx_t_5 = ((__pyx_v_micros > 0.0) != 0); if (__pyx_t_5) { /* "pandas/src/inference.pyx":777 * micros = float_secs - secs * if micros > 0: * micros = micros * 1000000 # <<<<<<<<<<<<<< * * result[i] = datetime(int(years[i]), int(months[i]), int(days[i]), */ __pyx_v_micros = (__pyx_v_micros * 1000000.0); goto __pyx_L6; } __pyx_L6:; /* "pandas/src/inference.pyx":779 * micros = micros * 1000000 * * result[i] = datetime(int(years[i]), int(months[i]), int(days[i]), # <<<<<<<<<<<<<< * int(hours[i]), int(minutes[i]), secs, * int(micros)) */ __pyx_t_19 = __pyx_v_i; __pyx_t_13 = -1; if (__pyx_t_19 < 0) { __pyx_t_19 += __pyx_pybuffernd_years.diminfo[0].shape; if (unlikely(__pyx_t_19 < 0)) __pyx_t_13 = 0; } else if (unlikely(__pyx_t_19 >= __pyx_pybuffernd_years.diminfo[0].shape)) __pyx_t_13 = 0; if (unlikely(__pyx_t_13 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_13); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 779; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_11 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_years.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_years.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_11); __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 779; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_11); __Pyx_GIVEREF(__pyx_t_11); __pyx_t_11 = 0; __pyx_t_11 = PyObject_Call(((PyObject *)((PyObject*)(&PyInt_Type))), ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 779; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __pyx_t_20 = __pyx_v_i; __pyx_t_13 = -1; if (__pyx_t_20 < 0) { __pyx_t_20 += __pyx_pybuffernd_months.diminfo[0].shape; if (unlikely(__pyx_t_20 < 0)) __pyx_t_13 = 0; } else if (unlikely(__pyx_t_20 >= __pyx_pybuffernd_months.diminfo[0].shape)) __pyx_t_13 = 0; if (unlikely(__pyx_t_13 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_13); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 779; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_2 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_months.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_months.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_2); __pyx_t_10 = PyTuple_New(1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 779; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)(&PyInt_Type))), ((PyObject *)__pyx_t_10), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 779; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(((PyObject *)__pyx_t_10)); __pyx_t_10 = 0; __pyx_t_21 = __pyx_v_i; __pyx_t_13 = -1; if (__pyx_t_21 < 0) { __pyx_t_21 += __pyx_pybuffernd_days.diminfo[0].shape; if (unlikely(__pyx_t_21 < 0)) __pyx_t_13 = 0; } else if (unlikely(__pyx_t_21 >= __pyx_pybuffernd_days.diminfo[0].shape)) __pyx_t_13 = 0; if (unlikely(__pyx_t_13 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_13); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 779; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_10 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_days.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_days.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_10); __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 779; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_10); __Pyx_GIVEREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_t_10 = PyObject_Call(((PyObject *)((PyObject*)(&PyInt_Type))), ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 779; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; /* "pandas/src/inference.pyx":780 * * result[i] = datetime(int(years[i]), int(months[i]), int(days[i]), * int(hours[i]), int(minutes[i]), secs, # <<<<<<<<<<<<<< * int(micros)) * */ __pyx_t_22 = __pyx_v_i; __pyx_t_13 = -1; if (__pyx_t_22 < 0) { __pyx_t_22 += __pyx_pybuffernd_hours.diminfo[0].shape; if (unlikely(__pyx_t_22 < 0)) __pyx_t_13 = 0; } else if (unlikely(__pyx_t_22 >= __pyx_pybuffernd_hours.diminfo[0].shape)) __pyx_t_13 = 0; if (unlikely(__pyx_t_13 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_13); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 780; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_1 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_hours.rcbuffer->pybuffer.buf, __pyx_t_22, __pyx_pybuffernd_hours.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_1); __pyx_t_23 = PyTuple_New(1); if (unlikely(!__pyx_t_23)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 780; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_23); PyTuple_SET_ITEM(__pyx_t_23, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)(&PyInt_Type))), ((PyObject *)__pyx_t_23), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 780; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(((PyObject *)__pyx_t_23)); __pyx_t_23 = 0; __pyx_t_24 = __pyx_v_i; __pyx_t_13 = -1; if (__pyx_t_24 < 0) { __pyx_t_24 += __pyx_pybuffernd_minutes.diminfo[0].shape; if (unlikely(__pyx_t_24 < 0)) __pyx_t_13 = 0; } else if (unlikely(__pyx_t_24 >= __pyx_pybuffernd_minutes.diminfo[0].shape)) __pyx_t_13 = 0; if (unlikely(__pyx_t_13 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_13); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 780; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_23 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_minutes.rcbuffer->pybuffer.buf, __pyx_t_24, __pyx_pybuffernd_minutes.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_23); __pyx_t_25 = PyTuple_New(1); if (unlikely(!__pyx_t_25)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 780; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_25); PyTuple_SET_ITEM(__pyx_t_25, 0, __pyx_t_23); __Pyx_GIVEREF(__pyx_t_23); __pyx_t_23 = 0; __pyx_t_23 = PyObject_Call(((PyObject *)((PyObject*)(&PyInt_Type))), ((PyObject *)__pyx_t_25), NULL); if (unlikely(!__pyx_t_23)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 780; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_23); __Pyx_DECREF(((PyObject *)__pyx_t_25)); __pyx_t_25 = 0; __pyx_t_25 = PyInt_FromLong(__pyx_v_secs); if (unlikely(!__pyx_t_25)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 780; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_25); /* "pandas/src/inference.pyx":781 * result[i] = datetime(int(years[i]), int(months[i]), int(days[i]), * int(hours[i]), int(minutes[i]), secs, * int(micros)) # <<<<<<<<<<<<<< * * return result */ __pyx_t_26 = PyFloat_FromDouble(__pyx_v_micros); if (unlikely(!__pyx_t_26)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 781; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_26); __pyx_t_27 = PyTuple_New(1); if (unlikely(!__pyx_t_27)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 781; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_27); PyTuple_SET_ITEM(__pyx_t_27, 0, __pyx_t_26); __Pyx_GIVEREF(__pyx_t_26); __pyx_t_26 = 0; __pyx_t_26 = PyObject_Call(((PyObject *)((PyObject*)(&PyInt_Type))), ((PyObject *)__pyx_t_27), NULL); if (unlikely(!__pyx_t_26)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 781; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_26); __Pyx_DECREF(((PyObject *)__pyx_t_27)); __pyx_t_27 = 0; __pyx_t_27 = PyTuple_New(7); if (unlikely(!__pyx_t_27)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 779; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_27); PyTuple_SET_ITEM(__pyx_t_27, 0, __pyx_t_11); __Pyx_GIVEREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_27, 1, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_27, 2, __pyx_t_10); __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_27, 3, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_27, 4, __pyx_t_23); __Pyx_GIVEREF(__pyx_t_23); PyTuple_SET_ITEM(__pyx_t_27, 5, __pyx_t_25); __Pyx_GIVEREF(__pyx_t_25); PyTuple_SET_ITEM(__pyx_t_27, 6, __pyx_t_26); __Pyx_GIVEREF(__pyx_t_26); __pyx_t_11 = 0; __pyx_t_2 = 0; __pyx_t_10 = 0; __pyx_t_1 = 0; __pyx_t_23 = 0; __pyx_t_25 = 0; __pyx_t_26 = 0; __pyx_t_26 = PyObject_Call(__pyx_v_datetime, ((PyObject *)__pyx_t_27), NULL); if (unlikely(!__pyx_t_26)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 779; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_26); __Pyx_DECREF(((PyObject *)__pyx_t_27)); __pyx_t_27 = 0; /* "pandas/src/inference.pyx":779 * micros = micros * 1000000 * * result[i] = datetime(int(years[i]), int(months[i]), int(days[i]), # <<<<<<<<<<<<<< * int(hours[i]), int(minutes[i]), secs, * int(micros)) */ __pyx_t_28 = __pyx_v_i; __pyx_t_13 = -1; if (__pyx_t_28 < 0) { __pyx_t_28 += __pyx_pybuffernd_result.diminfo[0].shape; if (unlikely(__pyx_t_28 < 0)) __pyx_t_13 = 0; } else if (unlikely(__pyx_t_28 >= __pyx_pybuffernd_result.diminfo[0].shape)) __pyx_t_13 = 0; if (unlikely(__pyx_t_13 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_13); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 779; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_29 = __Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_28, __pyx_pybuffernd_result.diminfo[0].strides); __Pyx_GOTREF(*__pyx_t_29); __Pyx_INCREF(__pyx_t_26); __Pyx_DECREF(*__pyx_t_29); *__pyx_t_29 = __pyx_t_26; __Pyx_GIVEREF(*__pyx_t_29); __Pyx_DECREF(__pyx_t_26); __pyx_t_26 = 0; } /* "pandas/src/inference.pyx":783 * int(micros)) * * return result # <<<<<<<<<<<<<< * * def sanitize_objects(ndarray[object] values, set na_values, */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_result)); __pyx_r = ((PyObject *)__pyx_v_result); goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_10); __Pyx_XDECREF(__pyx_t_11); __Pyx_XDECREF(__pyx_t_23); __Pyx_XDECREF(__pyx_t_25); __Pyx_XDECREF(__pyx_t_26); __Pyx_XDECREF(__pyx_t_27); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_days.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_hours.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_minutes.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_months.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_seconds.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_years.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.lib.try_parse_datetime_components", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_days.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_hours.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_minutes.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_months.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_seconds.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_years.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_result); __Pyx_XDECREF(__pyx_v_datetime); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_3lib_155sanitize_objects(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_3lib_155sanitize_objects = {__Pyx_NAMESTR("sanitize_objects"), (PyCFunction)__pyx_pw_6pandas_3lib_155sanitize_objects, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_3lib_155sanitize_objects(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_values = 0; PyObject *__pyx_v_na_values = 0; PyObject *__pyx_v_convert_empty = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("sanitize_objects (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__values,&__pyx_n_s__na_values,&__pyx_n_s__convert_empty,0}; PyObject* values[3] = {0,0,0}; values[2] = __pyx_k_86; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__values)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__na_values)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sanitize_objects", 0, 2, 3, 1); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 785; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__convert_empty); if (value) { values[2] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "sanitize_objects") < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 785; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_values = ((PyArrayObject *)values[0]); __pyx_v_na_values = ((PyObject*)values[1]); __pyx_v_convert_empty = values[2]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("sanitize_objects", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 785; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.lib.sanitize_objects", __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_filename = __pyx_f[1]; __pyx_lineno = 785; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_na_values), (&PySet_Type), 1, "na_values", 1))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 785; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_3lib_154sanitize_objects(__pyx_self, __pyx_v_values, __pyx_v_na_values, __pyx_v_convert_empty); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/inference.pyx":785 * return result * * def sanitize_objects(ndarray[object] values, set na_values, # <<<<<<<<<<<<<< * convert_empty=True): * cdef: */ static PyObject *__pyx_pf_6pandas_3lib_154sanitize_objects(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyObject *__pyx_v_na_values, PyObject *__pyx_v_convert_empty) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_n; PyObject *__pyx_v_val = 0; PyObject *__pyx_v_onan = 0; Py_ssize_t __pyx_v_na_count; PyObject *__pyx_v_memo = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_values; __Pyx_Buffer __pyx_pybuffer_values; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; Py_ssize_t __pyx_t_2; PyObject *__pyx_t_3 = NULL; Py_ssize_t __pyx_t_4; int __pyx_t_5; int __pyx_t_6; int __pyx_t_7; int __pyx_t_8; Py_ssize_t __pyx_t_9; PyObject **__pyx_t_10; Py_ssize_t __pyx_t_11; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("sanitize_objects", 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_object, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 785; __pyx_clineno = __LINE__; goto __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/src/inference.pyx":790 * Py_ssize_t i, n * object val, onan * Py_ssize_t na_count = 0 # <<<<<<<<<<<<<< * dict memo = {} * */ __pyx_v_na_count = 0; /* "pandas/src/inference.pyx":791 * object val, onan * Py_ssize_t na_count = 0 * dict memo = {} # <<<<<<<<<<<<<< * * n = len(values) */ __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 791; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_v_memo = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/inference.pyx":793 * dict memo = {} * * n = len(values) # <<<<<<<<<<<<<< * onan = np.nan * */ __pyx_t_2 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 793; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_2; /* "pandas/src/inference.pyx":794 * * n = len(values) * onan = np.nan # <<<<<<<<<<<<<< * * for i from 0 <= i < n: */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 794; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s__nan); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 794; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_onan = __pyx_t_3; __pyx_t_3 = 0; /* "pandas/src/inference.pyx":796 * onan = np.nan * * for i from 0 <= i < n: # <<<<<<<<<<<<<< * val = values[i] * if (convert_empty and val == '') or (val in na_values): */ __pyx_t_2 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_2; __pyx_v_i++) { /* "pandas/src/inference.pyx":797 * * for i from 0 <= i < n: * val = values[i] # <<<<<<<<<<<<<< * if (convert_empty and val == '') or (val in na_values): * values[i] = onan */ __pyx_t_4 = __pyx_v_i; __pyx_t_5 = -1; if (__pyx_t_4 < 0) { __pyx_t_4 += __pyx_pybuffernd_values.diminfo[0].shape; if (unlikely(__pyx_t_4 < 0)) __pyx_t_5 = 0; } else if (unlikely(__pyx_t_4 >= __pyx_pybuffernd_values.diminfo[0].shape)) __pyx_t_5 = 0; if (unlikely(__pyx_t_5 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_5); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 797; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_3 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_4, __pyx_pybuffernd_values.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_3); __Pyx_XDECREF_SET(__pyx_v_val, __pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/inference.pyx":798 * for i from 0 <= i < n: * val = values[i] * if (convert_empty and val == '') or (val in na_values): # <<<<<<<<<<<<<< * values[i] = onan * na_count += 1 */ __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_convert_empty); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 798; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__pyx_t_6) { __pyx_t_3 = PyObject_RichCompare(__pyx_v_val, ((PyObject *)__pyx_kp_s_70), Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 798; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 798; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_8 = __pyx_t_7; } else { __pyx_t_8 = __pyx_t_6; } if (!__pyx_t_8) { __pyx_t_6 = (__Pyx_PySequence_Contains(__pyx_v_val, ((PyObject *)__pyx_v_na_values), Py_EQ)); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 798; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_7 = __pyx_t_6; } else { __pyx_t_7 = __pyx_t_8; } if (__pyx_t_7) { /* "pandas/src/inference.pyx":799 * val = values[i] * if (convert_empty and val == '') or (val in na_values): * values[i] = onan # <<<<<<<<<<<<<< * na_count += 1 * elif val in memo: */ __pyx_t_9 = __pyx_v_i; __pyx_t_5 = -1; if (__pyx_t_9 < 0) { __pyx_t_9 += __pyx_pybuffernd_values.diminfo[0].shape; if (unlikely(__pyx_t_9 < 0)) __pyx_t_5 = 0; } else if (unlikely(__pyx_t_9 >= __pyx_pybuffernd_values.diminfo[0].shape)) __pyx_t_5 = 0; if (unlikely(__pyx_t_5 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_5); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 799; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_10 = __Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_9, __pyx_pybuffernd_values.diminfo[0].strides); __Pyx_GOTREF(*__pyx_t_10); __Pyx_INCREF(__pyx_v_onan); __Pyx_DECREF(*__pyx_t_10); *__pyx_t_10 = __pyx_v_onan; __Pyx_GIVEREF(*__pyx_t_10); /* "pandas/src/inference.pyx":800 * if (convert_empty and val == '') or (val in na_values): * values[i] = onan * na_count += 1 # <<<<<<<<<<<<<< * elif val in memo: * values[i] = memo[val] */ __pyx_v_na_count = (__pyx_v_na_count + 1); goto __pyx_L5; } /* "pandas/src/inference.pyx":801 * values[i] = onan * na_count += 1 * elif val in memo: # <<<<<<<<<<<<<< * values[i] = memo[val] * else: */ __pyx_t_7 = (__Pyx_PyDict_Contains(__pyx_v_val, ((PyObject *)__pyx_v_memo), Py_EQ)); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 801; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_8 = (__pyx_t_7 != 0); if (__pyx_t_8) { /* "pandas/src/inference.pyx":802 * na_count += 1 * elif val in memo: * values[i] = memo[val] # <<<<<<<<<<<<<< * else: * memo[val] = val */ __pyx_t_3 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_memo), __pyx_v_val); if (!__pyx_t_3) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 802; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_11 = __pyx_v_i; __pyx_t_5 = -1; if (__pyx_t_11 < 0) { __pyx_t_11 += __pyx_pybuffernd_values.diminfo[0].shape; if (unlikely(__pyx_t_11 < 0)) __pyx_t_5 = 0; } else if (unlikely(__pyx_t_11 >= __pyx_pybuffernd_values.diminfo[0].shape)) __pyx_t_5 = 0; if (unlikely(__pyx_t_5 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_5); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 802; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_10 = __Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_11, __pyx_pybuffernd_values.diminfo[0].strides); __Pyx_GOTREF(*__pyx_t_10); __Pyx_INCREF(__pyx_t_3); __Pyx_DECREF(*__pyx_t_10); *__pyx_t_10 = __pyx_t_3; __Pyx_GIVEREF(*__pyx_t_10); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L5; } /*else*/ { /* "pandas/src/inference.pyx":804 * values[i] = memo[val] * else: * memo[val] = val # <<<<<<<<<<<<<< * * return na_count */ if (PyDict_SetItem(((PyObject *)__pyx_v_memo), __pyx_v_val, __pyx_v_val) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 804; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_L5:; } /* "pandas/src/inference.pyx":806 * memo[val] = val * * return na_count # <<<<<<<<<<<<<< * * def maybe_convert_bool(ndarray[object] arr, */ __Pyx_XDECREF(__pyx_r); __pyx_t_3 = PyInt_FromSsize_t(__pyx_v_na_count); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 806; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_3); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __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.lib.sanitize_objects", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF(__pyx_v_val); __Pyx_XDECREF(__pyx_v_onan); __Pyx_XDECREF(__pyx_v_memo); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_3lib_157maybe_convert_bool(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_3lib_157maybe_convert_bool = {__Pyx_NAMESTR("maybe_convert_bool"), (PyCFunction)__pyx_pw_6pandas_3lib_157maybe_convert_bool, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_3lib_157maybe_convert_bool(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_arr = 0; PyObject *__pyx_v_true_values = 0; PyObject *__pyx_v_false_values = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("maybe_convert_bool (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__arr,&__pyx_n_s__true_values,&__pyx_n_s__false_values,0}; PyObject* values[3] = {0,0,0}; /* "pandas/src/inference.pyx":809 * * def maybe_convert_bool(ndarray[object] arr, * true_values=None, false_values=None): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n */ values[1] = ((PyObject *)Py_None); values[2] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__arr)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__true_values); if (value) { values[1] = value; kw_args--; } } case 2: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__false_values); if (value) { values[2] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "maybe_convert_bool") < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 808; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_arr = ((PyArrayObject *)values[0]); __pyx_v_true_values = values[1]; __pyx_v_false_values = values[2]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("maybe_convert_bool", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 808; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.lib.maybe_convert_bool", __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_filename = __pyx_f[1]; __pyx_lineno = 808; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_3lib_156maybe_convert_bool(__pyx_self, __pyx_v_arr, __pyx_v_true_values, __pyx_v_false_values); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/inference.pyx":808 * return na_count * * def maybe_convert_bool(ndarray[object] arr, # <<<<<<<<<<<<<< * true_values=None, false_values=None): * cdef: */ static PyObject *__pyx_pf_6pandas_3lib_156maybe_convert_bool(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_arr, PyObject *__pyx_v_true_values, PyObject *__pyx_v_false_values) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_n; PyArrayObject *__pyx_v_result = 0; PyObject *__pyx_v_val = 0; PyObject *__pyx_v_true_vals = 0; PyObject *__pyx_v_false_vals = 0; int __pyx_v_na_count; PyObject *__pyx_v_mask = NULL; __Pyx_LocalBuf_ND __pyx_pybuffernd_arr; __Pyx_Buffer __pyx_pybuffer_arr; __Pyx_LocalBuf_ND __pyx_pybuffernd_result; __Pyx_Buffer __pyx_pybuffer_result; 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; int __pyx_t_12; int __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; PyArrayObject *__pyx_t_20 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("maybe_convert_bool", 0); __Pyx_INCREF((PyObject *)__pyx_v_arr); __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_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_filename = __pyx_f[1]; __pyx_lineno = 808; __pyx_clineno = __LINE__; goto __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/src/inference.pyx":815 * object val * set true_vals, false_vals * int na_count = 0 # <<<<<<<<<<<<<< * * n = len(arr) */ __pyx_v_na_count = 0; /* "pandas/src/inference.pyx":817 * int na_count = 0 * * n = len(arr) # <<<<<<<<<<<<<< * result = np.empty(n, dtype=np.uint8) * */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_arr)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 817; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/src/inference.pyx":818 * * n = len(arr) * result = np.empty(n, dtype=np.uint8) # <<<<<<<<<<<<<< * * # the defaults */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 818; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 818; __pyx_clineno = __LINE__; goto __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_n); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 818; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 818; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 818; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_2)); __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 818; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s__uint8); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 818; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__dtype), __pyx_t_6) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 818; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 818; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __Pyx_DECREF(((PyObject *)__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_filename = __pyx_f[1]; __pyx_lineno = 818; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_7 = ((PyArrayObject *)__pyx_t_6); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_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_result.rcbuffer->pybuffer, (PyObject*)__pyx_v_result, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_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_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_8 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 818; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_7 = 0; __pyx_v_result = ((PyArrayObject *)__pyx_t_6); __pyx_t_6 = 0; /* "pandas/src/inference.pyx":821 * * # the defaults * true_vals = set(('True', 'TRUE', 'true')) # <<<<<<<<<<<<<< * false_vals = set(('False', 'FALSE', 'false')) * */ __pyx_t_6 = PySet_New(0); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 821; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_6)); if (PySet_Add(__pyx_t_6, ((PyObject *)__pyx_n_s__True)) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 821; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (PySet_Add(__pyx_t_6, ((PyObject *)__pyx_n_s__TRUE)) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 821; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (PySet_Add(__pyx_t_6, ((PyObject *)__pyx_n_s__true)) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 821; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_true_vals = ((PyObject*)__pyx_t_6); __pyx_t_6 = 0; /* "pandas/src/inference.pyx":822 * # the defaults * true_vals = set(('True', 'TRUE', 'true')) * false_vals = set(('False', 'FALSE', 'false')) # <<<<<<<<<<<<<< * * if true_values is not None: */ __pyx_t_6 = PySet_New(0); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 822; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_6)); if (PySet_Add(__pyx_t_6, ((PyObject *)__pyx_n_s__False)) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 822; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (PySet_Add(__pyx_t_6, ((PyObject *)__pyx_n_s__FALSE)) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 822; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (PySet_Add(__pyx_t_6, ((PyObject *)__pyx_n_s__false)) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 822; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_false_vals = ((PyObject*)__pyx_t_6); __pyx_t_6 = 0; /* "pandas/src/inference.pyx":824 * false_vals = set(('False', 'FALSE', 'false')) * * if true_values is not None: # <<<<<<<<<<<<<< * true_vals = true_vals | set(true_values) * */ __pyx_t_12 = (__pyx_v_true_values != Py_None); __pyx_t_13 = (__pyx_t_12 != 0); if (__pyx_t_13) { /* "pandas/src/inference.pyx":825 * * if true_values is not None: * true_vals = true_vals | set(true_values) # <<<<<<<<<<<<<< * * if false_values is not None: */ __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 825; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(__pyx_v_true_values); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_true_values); __Pyx_GIVEREF(__pyx_v_true_values); __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)(&PySet_Type))), ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 825; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0; __pyx_t_6 = PyNumber_Or(((PyObject *)__pyx_v_true_vals), __pyx_t_2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 825; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_6)); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF_SET(__pyx_v_true_vals, ((PyObject*)__pyx_t_6)); __pyx_t_6 = 0; goto __pyx_L3; } __pyx_L3:; /* "pandas/src/inference.pyx":827 * true_vals = true_vals | set(true_values) * * if false_values is not None: # <<<<<<<<<<<<<< * false_vals = false_vals | set(false_values) * */ __pyx_t_13 = (__pyx_v_false_values != Py_None); __pyx_t_12 = (__pyx_t_13 != 0); if (__pyx_t_12) { /* "pandas/src/inference.pyx":828 * * if false_values is not None: * false_vals = false_vals | set(false_values) # <<<<<<<<<<<<<< * * for i from 0 <= i < n: */ __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 828; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(__pyx_v_false_values); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_false_values); __Pyx_GIVEREF(__pyx_v_false_values); __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)(&PySet_Type))), ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 828; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0; __pyx_t_6 = PyNumber_Or(((PyObject *)__pyx_v_false_vals), __pyx_t_2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 828; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_6)); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF_SET(__pyx_v_false_vals, ((PyObject*)__pyx_t_6)); __pyx_t_6 = 0; goto __pyx_L4; } __pyx_L4:; /* "pandas/src/inference.pyx":830 * false_vals = false_vals | set(false_values) * * for i from 0 <= i < n: # <<<<<<<<<<<<<< * val = arr[i] * */ __pyx_t_1 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_1; __pyx_v_i++) { /* "pandas/src/inference.pyx":831 * * for i from 0 <= i < n: * val = arr[i] # <<<<<<<<<<<<<< * * if cpython.PyBool_Check(val): */ __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_filename = __pyx_f[1]; __pyx_lineno = 831; __pyx_clineno = __LINE__; goto __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_val, __pyx_t_6); __pyx_t_6 = 0; /* "pandas/src/inference.pyx":833 * val = arr[i] * * if cpython.PyBool_Check(val): # <<<<<<<<<<<<<< * if val is True: * result[i] = 1 */ __pyx_t_12 = (PyBool_Check(__pyx_v_val) != 0); if (__pyx_t_12) { /* "pandas/src/inference.pyx":834 * * if cpython.PyBool_Check(val): * if val is True: # <<<<<<<<<<<<<< * result[i] = 1 * else: */ __pyx_t_6 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 834; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_12 = (__pyx_v_val == __pyx_t_6); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_13 = (__pyx_t_12 != 0); if (__pyx_t_13) { /* "pandas/src/inference.pyx":835 * if cpython.PyBool_Check(val): * if val is True: * result[i] = 1 # <<<<<<<<<<<<<< * else: * result[i] = 0 */ __pyx_t_15 = __pyx_v_i; __pyx_t_8 = -1; if (__pyx_t_15 < 0) { __pyx_t_15 += __pyx_pybuffernd_result.diminfo[0].shape; if (unlikely(__pyx_t_15 < 0)) __pyx_t_8 = 0; } else if (unlikely(__pyx_t_15 >= __pyx_pybuffernd_result.diminfo[0].shape)) __pyx_t_8 = 0; if (unlikely(__pyx_t_8 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_8); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 835; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_result.diminfo[0].strides) = 1; goto __pyx_L8; } /*else*/ { /* "pandas/src/inference.pyx":837 * result[i] = 1 * else: * result[i] = 0 # <<<<<<<<<<<<<< * elif val in true_vals: * result[i] = 1 */ __pyx_t_16 = __pyx_v_i; __pyx_t_8 = -1; if (__pyx_t_16 < 0) { __pyx_t_16 += __pyx_pybuffernd_result.diminfo[0].shape; if (unlikely(__pyx_t_16 < 0)) __pyx_t_8 = 0; } else if (unlikely(__pyx_t_16 >= __pyx_pybuffernd_result.diminfo[0].shape)) __pyx_t_8 = 0; if (unlikely(__pyx_t_8 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_8); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 837; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_result.diminfo[0].strides) = 0; } __pyx_L8:; goto __pyx_L7; } /* "pandas/src/inference.pyx":838 * else: * result[i] = 0 * elif val in true_vals: # <<<<<<<<<<<<<< * result[i] = 1 * elif val in false_vals: */ __pyx_t_13 = (__Pyx_PySequence_Contains(__pyx_v_val, ((PyObject *)__pyx_v_true_vals), Py_EQ)); if (unlikely(__pyx_t_13 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 838; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_12 = (__pyx_t_13 != 0); if (__pyx_t_12) { /* "pandas/src/inference.pyx":839 * result[i] = 0 * elif val in true_vals: * result[i] = 1 # <<<<<<<<<<<<<< * elif val in false_vals: * result[i] = 0 */ __pyx_t_17 = __pyx_v_i; __pyx_t_8 = -1; if (__pyx_t_17 < 0) { __pyx_t_17 += __pyx_pybuffernd_result.diminfo[0].shape; if (unlikely(__pyx_t_17 < 0)) __pyx_t_8 = 0; } else if (unlikely(__pyx_t_17 >= __pyx_pybuffernd_result.diminfo[0].shape)) __pyx_t_8 = 0; if (unlikely(__pyx_t_8 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_8); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 839; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_result.diminfo[0].strides) = 1; goto __pyx_L7; } /* "pandas/src/inference.pyx":840 * elif val in true_vals: * result[i] = 1 * elif val in false_vals: # <<<<<<<<<<<<<< * result[i] = 0 * elif PyFloat_Check(val): */ __pyx_t_12 = (__Pyx_PySequence_Contains(__pyx_v_val, ((PyObject *)__pyx_v_false_vals), Py_EQ)); if (unlikely(__pyx_t_12 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 840; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_13 = (__pyx_t_12 != 0); if (__pyx_t_13) { /* "pandas/src/inference.pyx":841 * result[i] = 1 * elif val in false_vals: * result[i] = 0 # <<<<<<<<<<<<<< * elif PyFloat_Check(val): * result[i] = UINT8_MAX */ __pyx_t_18 = __pyx_v_i; __pyx_t_8 = -1; if (__pyx_t_18 < 0) { __pyx_t_18 += __pyx_pybuffernd_result.diminfo[0].shape; if (unlikely(__pyx_t_18 < 0)) __pyx_t_8 = 0; } else if (unlikely(__pyx_t_18 >= __pyx_pybuffernd_result.diminfo[0].shape)) __pyx_t_8 = 0; if (unlikely(__pyx_t_8 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_8); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 841; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_result.diminfo[0].strides) = 0; goto __pyx_L7; } /* "pandas/src/inference.pyx":842 * elif val in false_vals: * result[i] = 0 * elif PyFloat_Check(val): # <<<<<<<<<<<<<< * result[i] = UINT8_MAX * na_count += 1 */ __pyx_t_13 = (PyFloat_Check(__pyx_v_val) != 0); if (__pyx_t_13) { /* "pandas/src/inference.pyx":843 * result[i] = 0 * elif PyFloat_Check(val): * result[i] = UINT8_MAX # <<<<<<<<<<<<<< * na_count += 1 * else: */ __pyx_t_19 = __pyx_v_i; __pyx_t_8 = -1; if (__pyx_t_19 < 0) { __pyx_t_19 += __pyx_pybuffernd_result.diminfo[0].shape; if (unlikely(__pyx_t_19 < 0)) __pyx_t_8 = 0; } else if (unlikely(__pyx_t_19 >= __pyx_pybuffernd_result.diminfo[0].shape)) __pyx_t_8 = 0; if (unlikely(__pyx_t_8 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_8); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 843; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_result.diminfo[0].strides) = UINT8_MAX; /* "pandas/src/inference.pyx":844 * elif PyFloat_Check(val): * result[i] = UINT8_MAX * na_count += 1 # <<<<<<<<<<<<<< * else: * return arr */ __pyx_v_na_count = (__pyx_v_na_count + 1); goto __pyx_L7; } /*else*/ { /* "pandas/src/inference.pyx":846 * na_count += 1 * else: * return arr # <<<<<<<<<<<<<< * * if na_count > 0: */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_arr)); __pyx_r = ((PyObject *)__pyx_v_arr); goto __pyx_L0; } __pyx_L7:; } /* "pandas/src/inference.pyx":848 * return arr * * if na_count > 0: # <<<<<<<<<<<<<< * mask = result == UINT8_MAX * arr = result.view(np.bool_).astype(object) */ __pyx_t_13 = ((__pyx_v_na_count > 0) != 0); if (__pyx_t_13) { /* "pandas/src/inference.pyx":849 * * if na_count > 0: * mask = result == UINT8_MAX # <<<<<<<<<<<<<< * arr = result.view(np.bool_).astype(object) * np.putmask(arr, mask, np.nan) */ __pyx_t_6 = PyInt_FromLong(UINT8_MAX); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 849; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_2 = PyObject_RichCompare(((PyObject *)__pyx_v_result), __pyx_t_6, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 849; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_v_mask = __pyx_t_2; __pyx_t_2 = 0; /* "pandas/src/inference.pyx":850 * if na_count > 0: * mask = result == UINT8_MAX * arr = result.view(np.bool_).astype(object) # <<<<<<<<<<<<<< * np.putmask(arr, mask, np.nan) * return arr */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_result), __pyx_n_s__view); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 850; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 850; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s__bool_); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 850; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 850; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 850; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0; __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s__astype); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 850; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 850; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_builtin_object); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_builtin_object); __Pyx_GIVEREF(__pyx_builtin_object); __pyx_t_2 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 850; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(((PyObject *)__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_filename = __pyx_f[1]; __pyx_lineno = 850; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_20 = ((PyArrayObject *)__pyx_t_2); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_arr.rcbuffer->pybuffer); __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_arr.rcbuffer->pybuffer, (PyObject*)__pyx_t_20, &__Pyx_TypeInfo_object, 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_arr.rcbuffer->pybuffer, (PyObject*)__pyx_v_arr, &__Pyx_TypeInfo_object, 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_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]; if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 850; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_20 = 0; __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_2)); __pyx_t_2 = 0; /* "pandas/src/inference.pyx":851 * mask = result == UINT8_MAX * arr = result.view(np.bool_).astype(object) * np.putmask(arr, mask, np.nan) # <<<<<<<<<<<<<< * return arr * else: */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 851; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__putmask); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 851; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 851; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__nan); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 851; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 851; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(((PyObject *)__pyx_v_arr)); PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_arr)); __Pyx_GIVEREF(((PyObject *)__pyx_v_arr)); __Pyx_INCREF(__pyx_v_mask); PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_mask); __Pyx_GIVEREF(__pyx_v_mask); PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 851; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; /* "pandas/src/inference.pyx":852 * arr = result.view(np.bool_).astype(object) * np.putmask(arr, mask, np.nan) * return arr # <<<<<<<<<<<<<< * else: * return result.view(np.bool_) */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_arr)); __pyx_r = ((PyObject *)__pyx_v_arr); goto __pyx_L0; goto __pyx_L9; } /*else*/ { /* "pandas/src/inference.pyx":854 * return arr * else: * return result.view(np.bool_) # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_result), __pyx_n_s__view); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 854; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 854; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__bool_); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 854; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 854; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 854; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; } __pyx_L9:; __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_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_arr.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.lib.maybe_convert_bool", __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_result.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_result); __Pyx_XDECREF(__pyx_v_val); __Pyx_XDECREF(__pyx_v_true_vals); __Pyx_XDECREF(__pyx_v_false_vals); __Pyx_XDECREF(__pyx_v_mask); __Pyx_XDECREF((PyObject *)__pyx_v_arr); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_3lib_159map_infer_mask(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6pandas_3lib_158map_infer_mask[] = "\n Substitute for np.vectorize with pandas-friendly dtype inference\n\n Parameters\n ----------\n arr : ndarray\n f : function\n\n Returns\n -------\n mapped : ndarray\n "; static PyMethodDef __pyx_mdef_6pandas_3lib_159map_infer_mask = {__Pyx_NAMESTR("map_infer_mask"), (PyCFunction)__pyx_pw_6pandas_3lib_159map_infer_mask, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_3lib_158map_infer_mask)}; static PyObject *__pyx_pw_6pandas_3lib_159map_infer_mask(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_arr = 0; PyObject *__pyx_v_f = 0; PyArrayObject *__pyx_v_mask = 0; int __pyx_v_convert; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("map_infer_mask (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__arr,&__pyx_n_s__f,&__pyx_n_s__mask,&__pyx_n_s__convert,0}; PyObject* values[4] = {0,0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__arr)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__f)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("map_infer_mask", 0, 3, 4, 1); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 857; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__mask)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("map_infer_mask", 0, 3, 4, 2); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 857; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__convert); if (value) { values[3] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "map_infer_mask") < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 857; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_arr = ((PyArrayObject *)values[0]); __pyx_v_f = values[1]; __pyx_v_mask = ((PyArrayObject *)values[2]); if (values[3]) { __pyx_v_convert = __Pyx_PyObject_IsTrue(values[3]); if (unlikely((__pyx_v_convert == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 858; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } else { __pyx_v_convert = ((int)1); } } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("map_infer_mask", 0, 3, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 857; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.lib.map_infer_mask", __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_filename = __pyx_f[1]; __pyx_lineno = 857; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_mask), __pyx_ptype_5numpy_ndarray, 1, "mask", 0))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 857; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_3lib_158map_infer_mask(__pyx_self, __pyx_v_arr, __pyx_v_f, __pyx_v_mask, __pyx_v_convert); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/inference.pyx":857 * * * def map_infer_mask(ndarray arr, object f, ndarray[uint8_t] mask, # <<<<<<<<<<<<<< * bint convert=1): * ''' */ static PyObject *__pyx_pf_6pandas_3lib_158map_infer_mask(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_arr, PyObject *__pyx_v_f, PyArrayObject *__pyx_v_mask, int __pyx_v_convert) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_n; PyArrayObject *__pyx_v_result = 0; PyObject *__pyx_v_val = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_mask; __Pyx_Buffer __pyx_pybuffer_mask; __Pyx_LocalBuf_ND __pyx_pybuffernd_result; __Pyx_Buffer __pyx_pybuffer_result; 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; PyArrayObject *__pyx_t_6 = NULL; 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; int __pyx_t_13; int __pyx_t_14; int __pyx_t_15; Py_ssize_t __pyx_t_16; PyObject **__pyx_t_17; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("map_infer_mask", 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_mask.pybuffer.buf = NULL; __pyx_pybuffer_mask.refcount = 0; __pyx_pybuffernd_mask.data = NULL; __pyx_pybuffernd_mask.rcbuffer = &__pyx_pybuffer_mask; { __Pyx_BufFmt_StackElem __pyx_stack[1]; 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, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 857; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; /* "pandas/src/inference.pyx":876 * object val * * n = len(arr) # <<<<<<<<<<<<<< * result = np.empty(n, dtype=object) * for i in range(n): */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_arr)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 876; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/src/inference.pyx":877 * * n = len(arr) * result = np.empty(n, dtype=object) # <<<<<<<<<<<<<< * for i in range(n): * if mask[i]: */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 877; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 877; __pyx_clineno = __LINE__; goto __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_n); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 877; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 877; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 877; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_2)); if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__dtype), __pyx_builtin_object) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 877; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_5 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 877; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 877; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_6 = ((PyArrayObject *)__pyx_t_5); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_object, 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_result.rcbuffer->pybuffer, (PyObject*)__pyx_v_result, &__Pyx_TypeInfo_object, 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_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_7 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 877; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_6 = 0; __pyx_v_result = ((PyArrayObject *)__pyx_t_5); __pyx_t_5 = 0; /* "pandas/src/inference.pyx":878 * n = len(arr) * result = np.empty(n, dtype=object) * for i in range(n): # <<<<<<<<<<<<<< * if mask[i]: * val = util.get_value_at(arr, i) */ __pyx_t_1 = __pyx_v_n; for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_1; __pyx_t_11+=1) { __pyx_v_i = __pyx_t_11; /* "pandas/src/inference.pyx":879 * result = np.empty(n, dtype=object) * for i in range(n): * if mask[i]: # <<<<<<<<<<<<<< * val = util.get_value_at(arr, i) * else: */ __pyx_t_12 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_12 < 0) { __pyx_t_12 += __pyx_pybuffernd_mask.diminfo[0].shape; if (unlikely(__pyx_t_12 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_12 >= __pyx_pybuffernd_mask.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 879; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_13 = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_mask.rcbuffer->pybuffer.buf, __pyx_t_12, __pyx_pybuffernd_mask.diminfo[0].strides)) != 0); if (__pyx_t_13) { /* "pandas/src/inference.pyx":880 * for i in range(n): * if mask[i]: * val = util.get_value_at(arr, i) # <<<<<<<<<<<<<< * else: * val = f(util.get_value_at(arr, i)) */ __pyx_t_5 = PyInt_FromSsize_t(__pyx_v_i); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 880; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_2 = __pyx_f_4util_get_value_at(__pyx_v_arr, __pyx_t_5); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 880; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF_SET(__pyx_v_val, __pyx_t_2); __pyx_t_2 = 0; goto __pyx_L5; } /*else*/ { /* "pandas/src/inference.pyx":882 * val = util.get_value_at(arr, i) * else: * val = f(util.get_value_at(arr, i)) # <<<<<<<<<<<<<< * * # unbox 0-dim arrays, GH #690 */ __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_i); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 882; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = __pyx_f_4util_get_value_at(__pyx_v_arr, __pyx_t_2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 882; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 882; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyObject_Call(__pyx_v_f, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 882; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __Pyx_XDECREF_SET(__pyx_v_val, __pyx_t_5); __pyx_t_5 = 0; /* "pandas/src/inference.pyx":885 * * # unbox 0-dim arrays, GH #690 * if is_array(val) and PyArray_NDIM(val) == 0: # <<<<<<<<<<<<<< * # is there a faster way to unbox? * val = val.item() */ __pyx_t_5 = __pyx_f_4util_is_array(__pyx_v_val); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 885; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_13 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 885; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_13) { if (!(likely(((__pyx_v_val) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_val, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 885; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_14 = (PyArray_NDIM(((PyArrayObject *)__pyx_v_val)) == 0); __pyx_t_15 = __pyx_t_14; } else { __pyx_t_15 = __pyx_t_13; } if (__pyx_t_15) { /* "pandas/src/inference.pyx":887 * if is_array(val) and PyArray_NDIM(val) == 0: * # is there a faster way to unbox? * val = val.item() # <<<<<<<<<<<<<< * * result[i] = val */ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_val, __pyx_n_s__item); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 887; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_2 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 887; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF_SET(__pyx_v_val, __pyx_t_2); __pyx_t_2 = 0; goto __pyx_L6; } __pyx_L6:; } __pyx_L5:; /* "pandas/src/inference.pyx":889 * val = val.item() * * result[i] = val # <<<<<<<<<<<<<< * * if convert: */ __pyx_t_16 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_16 < 0) { __pyx_t_16 += __pyx_pybuffernd_result.diminfo[0].shape; if (unlikely(__pyx_t_16 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_16 >= __pyx_pybuffernd_result.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 889; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_17 = __Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_result.diminfo[0].strides); __Pyx_GOTREF(*__pyx_t_17); __Pyx_INCREF(__pyx_v_val); __Pyx_DECREF(*__pyx_t_17); *__pyx_t_17 = __pyx_v_val; __Pyx_GIVEREF(*__pyx_t_17); } /* "pandas/src/inference.pyx":891 * result[i] = val * * if convert: # <<<<<<<<<<<<<< * return maybe_convert_objects(result, * try_float=0, */ __pyx_t_15 = (__pyx_v_convert != 0); if (__pyx_t_15) { /* "pandas/src/inference.pyx":892 * * if convert: * return maybe_convert_objects(result, # <<<<<<<<<<<<<< * try_float=0, * convert_datetime=0, */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_12); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 892; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 892; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(((PyObject *)__pyx_v_result)); PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_v_result)); __Pyx_GIVEREF(((PyObject *)__pyx_v_result)); __pyx_t_4 = PyDict_New(); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 892; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_4)); if (PyDict_SetItem(__pyx_t_4, ((PyObject *)__pyx_n_s__try_float), __pyx_int_0) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 892; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (PyDict_SetItem(__pyx_t_4, ((PyObject *)__pyx_n_s__convert_datetime), __pyx_int_0) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 892; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (PyDict_SetItem(__pyx_t_4, ((PyObject *)__pyx_n_s__convert_timedelta), __pyx_int_0) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 892; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_3 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_5), ((PyObject *)__pyx_t_4)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 892; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; goto __pyx_L7; } __pyx_L7:; /* "pandas/src/inference.pyx":897 * convert_timedelta=0) * * return result # <<<<<<<<<<<<<< * * def map_infer(ndarray arr, object f, bint convert=1): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_result)); __pyx_r = ((PyObject *)__pyx_v_result); goto __pyx_L0; __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_XDECREF(__pyx_t_5); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_mask.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.lib.map_infer_mask", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_mask.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_result); __Pyx_XDECREF(__pyx_v_val); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_3lib_161map_infer(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6pandas_3lib_160map_infer[] = "\n Substitute for np.vectorize with pandas-friendly dtype inference\n\n Parameters\n ----------\n arr : ndarray\n f : function\n\n Returns\n -------\n mapped : ndarray\n "; static PyMethodDef __pyx_mdef_6pandas_3lib_161map_infer = {__Pyx_NAMESTR("map_infer"), (PyCFunction)__pyx_pw_6pandas_3lib_161map_infer, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_3lib_160map_infer)}; static PyObject *__pyx_pw_6pandas_3lib_161map_infer(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_arr = 0; PyObject *__pyx_v_f = 0; int __pyx_v_convert; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("map_infer (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__arr,&__pyx_n_s__f,&__pyx_n_s__convert,0}; PyObject* values[3] = {0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__arr)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__f)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("map_infer", 0, 2, 3, 1); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 899; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__convert); if (value) { values[2] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "map_infer") < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 899; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_arr = ((PyArrayObject *)values[0]); __pyx_v_f = values[1]; if (values[2]) { __pyx_v_convert = __Pyx_PyObject_IsTrue(values[2]); if (unlikely((__pyx_v_convert == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 899; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } else { __pyx_v_convert = ((int)1); } } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("map_infer", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 899; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.lib.map_infer", __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_filename = __pyx_f[1]; __pyx_lineno = 899; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_3lib_160map_infer(__pyx_self, __pyx_v_arr, __pyx_v_f, __pyx_v_convert); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/inference.pyx":899 * return result * * def map_infer(ndarray arr, object f, bint convert=1): # <<<<<<<<<<<<<< * ''' * Substitute for np.vectorize with pandas-friendly dtype inference */ static PyObject *__pyx_pf_6pandas_3lib_160map_infer(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_arr, PyObject *__pyx_v_f, int __pyx_v_convert) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_n; PyArrayObject *__pyx_v_result = 0; PyObject *__pyx_v_val = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_result; __Pyx_Buffer __pyx_pybuffer_result; 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; PyArrayObject *__pyx_t_6 = NULL; 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; int __pyx_t_12; int __pyx_t_13; int __pyx_t_14; Py_ssize_t __pyx_t_15; PyObject **__pyx_t_16; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("map_infer", 0); __pyx_pybuffer_result.pybuffer.buf = NULL; __pyx_pybuffer_result.refcount = 0; __pyx_pybuffernd_result.data = NULL; __pyx_pybuffernd_result.rcbuffer = &__pyx_pybuffer_result; /* "pandas/src/inference.pyx":917 * object val * * n = len(arr) # <<<<<<<<<<<<<< * result = np.empty(n, dtype=object) * for i in range(n): */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_arr)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 917; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/src/inference.pyx":918 * * n = len(arr) * result = np.empty(n, dtype=object) # <<<<<<<<<<<<<< * for i in range(n): * val = f(util.get_value_at(arr, i)) */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 918; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 918; __pyx_clineno = __LINE__; goto __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_n); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 918; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 918; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 918; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_2)); if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__dtype), __pyx_builtin_object) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 918; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_5 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 918; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 918; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_6 = ((PyArrayObject *)__pyx_t_5); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_object, 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_result.rcbuffer->pybuffer, (PyObject*)__pyx_v_result, &__Pyx_TypeInfo_object, 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_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_7 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 918; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_6 = 0; __pyx_v_result = ((PyArrayObject *)__pyx_t_5); __pyx_t_5 = 0; /* "pandas/src/inference.pyx":919 * n = len(arr) * result = np.empty(n, dtype=object) * for i in range(n): # <<<<<<<<<<<<<< * val = f(util.get_value_at(arr, i)) * */ __pyx_t_1 = __pyx_v_n; for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_1; __pyx_t_11+=1) { __pyx_v_i = __pyx_t_11; /* "pandas/src/inference.pyx":920 * result = np.empty(n, dtype=object) * for i in range(n): * val = f(util.get_value_at(arr, i)) # <<<<<<<<<<<<<< * * # unbox 0-dim arrays, GH #690 */ __pyx_t_5 = PyInt_FromSsize_t(__pyx_v_i); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 920; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_2 = __pyx_f_4util_get_value_at(__pyx_v_arr, __pyx_t_5); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 920; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 920; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_Call(__pyx_v_f, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 920; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; __Pyx_XDECREF_SET(__pyx_v_val, __pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/inference.pyx":923 * * # unbox 0-dim arrays, GH #690 * if is_array(val) and PyArray_NDIM(val) == 0: # <<<<<<<<<<<<<< * # is there a faster way to unbox? * val = val.item() */ __pyx_t_2 = __pyx_f_4util_is_array(__pyx_v_val); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 923; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_12 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 923; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_12) { if (!(likely(((__pyx_v_val) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_val, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 923; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_13 = (PyArray_NDIM(((PyArrayObject *)__pyx_v_val)) == 0); __pyx_t_14 = __pyx_t_13; } else { __pyx_t_14 = __pyx_t_12; } if (__pyx_t_14) { /* "pandas/src/inference.pyx":925 * if is_array(val) and PyArray_NDIM(val) == 0: * # is there a faster way to unbox? * val = val.item() # <<<<<<<<<<<<<< * * result[i] = val */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_val, __pyx_n_s__item); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 925; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 925; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF_SET(__pyx_v_val, __pyx_t_5); __pyx_t_5 = 0; goto __pyx_L5; } __pyx_L5:; /* "pandas/src/inference.pyx":927 * val = val.item() * * result[i] = val # <<<<<<<<<<<<<< * * if convert: */ __pyx_t_15 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_15 < 0) { __pyx_t_15 += __pyx_pybuffernd_result.diminfo[0].shape; if (unlikely(__pyx_t_15 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_15 >= __pyx_pybuffernd_result.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 927; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_16 = __Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_result.diminfo[0].strides); __Pyx_GOTREF(*__pyx_t_16); __Pyx_INCREF(__pyx_v_val); __Pyx_DECREF(*__pyx_t_16); *__pyx_t_16 = __pyx_v_val; __Pyx_GIVEREF(*__pyx_t_16); } /* "pandas/src/inference.pyx":929 * result[i] = val * * if convert: # <<<<<<<<<<<<<< * return maybe_convert_objects(result, * try_float=0, */ __pyx_t_14 = (__pyx_v_convert != 0); if (__pyx_t_14) { /* "pandas/src/inference.pyx":930 * * if convert: * return maybe_convert_objects(result, # <<<<<<<<<<<<<< * try_float=0, * convert_datetime=0, */ __Pyx_XDECREF(__pyx_r); __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_12); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 930; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 930; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(((PyObject *)__pyx_v_result)); PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_result)); __Pyx_GIVEREF(((PyObject *)__pyx_v_result)); __pyx_t_4 = PyDict_New(); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 930; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_4)); if (PyDict_SetItem(__pyx_t_4, ((PyObject *)__pyx_n_s__try_float), __pyx_int_0) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 930; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (PyDict_SetItem(__pyx_t_4, ((PyObject *)__pyx_n_s__convert_datetime), __pyx_int_0) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 930; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (PyDict_SetItem(__pyx_t_4, ((PyObject *)__pyx_n_s__convert_timedelta), __pyx_int_0) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 930; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_3 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_2), ((PyObject *)__pyx_t_4)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 930; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; goto __pyx_L6; } __pyx_L6:; /* "pandas/src/inference.pyx":935 * convert_timedelta=0) * * return result # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_result)); __pyx_r = ((PyObject *)__pyx_v_result); goto __pyx_L0; __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_XDECREF(__pyx_t_5); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.lib.map_infer", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_result); __Pyx_XDECREF(__pyx_v_val); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_3lib_163to_object_array(PyObject *__pyx_self, PyObject *__pyx_v_rows); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_3lib_163to_object_array = {__Pyx_NAMESTR("to_object_array"), (PyCFunction)__pyx_pw_6pandas_3lib_163to_object_array, METH_O, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_3lib_163to_object_array(PyObject *__pyx_self, PyObject *__pyx_v_rows) { CYTHON_UNUSED int __pyx_lineno = 0; CYTHON_UNUSED const char *__pyx_filename = NULL; CYTHON_UNUSED int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("to_object_array (wrapper)", 0); if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_rows), (&PyList_Type), 1, "rows", 1))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 938; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_3lib_162to_object_array(__pyx_self, ((PyObject*)__pyx_v_rows)); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/inference.pyx":938 * * * def to_object_array(list rows): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, j, n, k, tmp */ static PyObject *__pyx_pf_6pandas_3lib_162to_object_array(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_rows) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_n; Py_ssize_t __pyx_v_k; Py_ssize_t __pyx_v_tmp; PyArrayObject *__pyx_v_result = 0; PyObject *__pyx_v_row = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_result; __Pyx_Buffer __pyx_pybuffer_result; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; PyObject *__pyx_t_2 = NULL; Py_ssize_t __pyx_t_3; int __pyx_t_4; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyArrayObject *__pyx_t_8 = NULL; int __pyx_t_9; PyObject *__pyx_t_10 = NULL; PyObject *__pyx_t_11 = NULL; PyObject *__pyx_t_12 = NULL; Py_ssize_t __pyx_t_13; Py_ssize_t __pyx_t_14; PyObject **__pyx_t_15; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("to_object_array", 0); __pyx_pybuffer_result.pybuffer.buf = NULL; __pyx_pybuffer_result.refcount = 0; __pyx_pybuffernd_result.data = NULL; __pyx_pybuffernd_result.rcbuffer = &__pyx_pybuffer_result; /* "pandas/src/inference.pyx":944 * list row * * n = len(rows) # <<<<<<<<<<<<<< * * k = 0 */ if (unlikely(((PyObject *)__pyx_v_rows) == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 944; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_1 = PyList_GET_SIZE(((PyObject *)__pyx_v_rows)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 944; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/src/inference.pyx":946 * n = len(rows) * * k = 0 # <<<<<<<<<<<<<< * for i from 0 <= i < n: * tmp = len(rows[i]) */ __pyx_v_k = 0; /* "pandas/src/inference.pyx":947 * * k = 0 * for i from 0 <= i < n: # <<<<<<<<<<<<<< * tmp = len(rows[i]) * if tmp > k: */ __pyx_t_1 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_1; __pyx_v_i++) { /* "pandas/src/inference.pyx":948 * k = 0 * for i from 0 <= i < n: * tmp = len(rows[i]) # <<<<<<<<<<<<<< * if tmp > k: * k = tmp */ if (unlikely(((PyObject *)__pyx_v_rows) == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 948; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_2 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_rows), __pyx_v_i, sizeof(Py_ssize_t), PyInt_FromSsize_t, 1, 1, 1); if (!__pyx_t_2) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 948; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyObject_Length(__pyx_t_2); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 948; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_tmp = __pyx_t_3; /* "pandas/src/inference.pyx":949 * for i from 0 <= i < n: * tmp = len(rows[i]) * if tmp > k: # <<<<<<<<<<<<<< * k = tmp * */ __pyx_t_4 = ((__pyx_v_tmp > __pyx_v_k) != 0); if (__pyx_t_4) { /* "pandas/src/inference.pyx":950 * tmp = len(rows[i]) * if tmp > k: * k = tmp # <<<<<<<<<<<<<< * * result = np.empty((n, k), dtype=object) */ __pyx_v_k = __pyx_v_tmp; goto __pyx_L5; } __pyx_L5:; } /* "pandas/src/inference.pyx":952 * k = tmp * * result = np.empty((n, k), dtype=object) # <<<<<<<<<<<<<< * * for i from 0 <= i < n: */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 952; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__empty); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 952; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_n); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 952; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_6 = PyInt_FromSsize_t(__pyx_v_k); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 952; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 952; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_6); __pyx_t_2 = 0; __pyx_t_6 = 0; __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 952; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_t_7)); __Pyx_GIVEREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0; __pyx_t_7 = PyDict_New(); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 952; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_7)); if (PyDict_SetItem(__pyx_t_7, ((PyObject *)__pyx_n_s__dtype), __pyx_builtin_object) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 952; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_2 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_6), ((PyObject *)__pyx_t_7)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 952; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0; if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 952; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_8 = ((PyArrayObject *)__pyx_t_2); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __pyx_t_9 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_t_8, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack); if (unlikely(__pyx_t_9 < 0)) { PyErr_Fetch(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_v_result, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_11); Py_XDECREF(__pyx_t_12); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_10, __pyx_t_11, __pyx_t_12); } } __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]; __pyx_pybuffernd_result.diminfo[1].strides = __pyx_pybuffernd_result.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_result.diminfo[1].shape = __pyx_pybuffernd_result.rcbuffer->pybuffer.shape[1]; if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 952; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_8 = 0; __pyx_v_result = ((PyArrayObject *)__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/inference.pyx":954 * result = np.empty((n, k), dtype=object) * * for i from 0 <= i < n: # <<<<<<<<<<<<<< * row = rows[i] * */ __pyx_t_1 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_1; __pyx_v_i++) { /* "pandas/src/inference.pyx":955 * * for i from 0 <= i < n: * row = rows[i] # <<<<<<<<<<<<<< * * for j from 0 <= j < len(row): */ if (unlikely(((PyObject *)__pyx_v_rows) == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 955; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_2 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_rows), __pyx_v_i, sizeof(Py_ssize_t), PyInt_FromSsize_t, 1, 1, 1); if (!__pyx_t_2) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 955; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (!(likely(PyList_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected list, got %.200s", Py_TYPE(__pyx_t_2)->tp_name), 0))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 955; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_XDECREF_SET(__pyx_v_row, ((PyObject*)__pyx_t_2)); __pyx_t_2 = 0; /* "pandas/src/inference.pyx":957 * row = rows[i] * * for j from 0 <= j < len(row): # <<<<<<<<<<<<<< * result[i, j] = row[j] * */ if (unlikely(((PyObject *)__pyx_v_row) == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 957; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_3 = PyList_GET_SIZE(((PyObject *)__pyx_v_row)); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 957; __pyx_clineno = __LINE__; goto __pyx_L1_error;} for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_3; __pyx_v_j++) { /* "pandas/src/inference.pyx":958 * * for j from 0 <= j < len(row): * result[i, j] = row[j] # <<<<<<<<<<<<<< * * return result */ if (unlikely(((PyObject *)__pyx_v_row) == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 958; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_2 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_row), __pyx_v_j, sizeof(Py_ssize_t), PyInt_FromSsize_t, 1, 1, 1); if (!__pyx_t_2) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 958; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_13 = __pyx_v_i; __pyx_t_14 = __pyx_v_j; __pyx_t_9 = -1; if (__pyx_t_13 < 0) { __pyx_t_13 += __pyx_pybuffernd_result.diminfo[0].shape; if (unlikely(__pyx_t_13 < 0)) __pyx_t_9 = 0; } else if (unlikely(__pyx_t_13 >= __pyx_pybuffernd_result.diminfo[0].shape)) __pyx_t_9 = 0; if (__pyx_t_14 < 0) { __pyx_t_14 += __pyx_pybuffernd_result.diminfo[1].shape; if (unlikely(__pyx_t_14 < 0)) __pyx_t_9 = 1; } else if (unlikely(__pyx_t_14 >= __pyx_pybuffernd_result.diminfo[1].shape)) __pyx_t_9 = 1; if (unlikely(__pyx_t_9 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_9); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 958; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_15 = __Pyx_BufPtrStrided2d(PyObject **, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_result.diminfo[0].strides, __pyx_t_14, __pyx_pybuffernd_result.diminfo[1].strides); __Pyx_GOTREF(*__pyx_t_15); __Pyx_INCREF(__pyx_t_2); __Pyx_DECREF(*__pyx_t_15); *__pyx_t_15 = __pyx_t_2; __Pyx_GIVEREF(*__pyx_t_15); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } } /* "pandas/src/inference.pyx":960 * result[i, j] = row[j] * * return result # <<<<<<<<<<<<<< * * def tuples_to_object_array(ndarray[object] tuples): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_result)); __pyx_r = ((PyObject *)__pyx_v_result); goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.lib.to_object_array", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_result); __Pyx_XDECREF(__pyx_v_row); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_3lib_165tuples_to_object_array(PyObject *__pyx_self, PyObject *__pyx_v_tuples); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_3lib_165tuples_to_object_array = {__Pyx_NAMESTR("tuples_to_object_array"), (PyCFunction)__pyx_pw_6pandas_3lib_165tuples_to_object_array, METH_O, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_3lib_165tuples_to_object_array(PyObject *__pyx_self, PyObject *__pyx_v_tuples) { CYTHON_UNUSED int __pyx_lineno = 0; CYTHON_UNUSED const char *__pyx_filename = NULL; CYTHON_UNUSED int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("tuples_to_object_array (wrapper)", 0); if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_tuples), __pyx_ptype_5numpy_ndarray, 1, "tuples", 0))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 962; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_3lib_164tuples_to_object_array(__pyx_self, ((PyArrayObject *)__pyx_v_tuples)); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/inference.pyx":962 * return result * * def tuples_to_object_array(ndarray[object] tuples): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, j, n, k, tmp */ static PyObject *__pyx_pf_6pandas_3lib_164tuples_to_object_array(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_tuples) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_n; Py_ssize_t __pyx_v_k; PyArrayObject *__pyx_v_result = 0; PyObject *__pyx_v_tup = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_result; __Pyx_Buffer __pyx_pybuffer_result; __Pyx_LocalBuf_ND __pyx_pybuffernd_tuples; __Pyx_Buffer __pyx_pybuffer_tuples; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; PyObject *__pyx_t_2 = NULL; long __pyx_t_3; int __pyx_t_4; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyArrayObject *__pyx_t_8 = NULL; 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; Py_ssize_t __pyx_t_15; Py_ssize_t __pyx_t_16; Py_ssize_t __pyx_t_17; PyObject **__pyx_t_18; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("tuples_to_object_array", 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_tuples.pybuffer.buf = NULL; __pyx_pybuffer_tuples.refcount = 0; __pyx_pybuffernd_tuples.data = NULL; __pyx_pybuffernd_tuples.rcbuffer = &__pyx_pybuffer_tuples; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tuples.rcbuffer->pybuffer, (PyObject*)__pyx_v_tuples, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 962; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_tuples.diminfo[0].strides = __pyx_pybuffernd_tuples.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_tuples.diminfo[0].shape = __pyx_pybuffernd_tuples.rcbuffer->pybuffer.shape[0]; /* "pandas/src/inference.pyx":968 * tuple tup * * n = len(tuples) # <<<<<<<<<<<<<< * k = len(tuples[0]) * result = np.empty((n, k), dtype=object) */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_tuples)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 968; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/src/inference.pyx":969 * * n = len(tuples) * k = len(tuples[0]) # <<<<<<<<<<<<<< * result = np.empty((n, k), dtype=object) * for i in range(n): */ __pyx_t_3 = 0; __pyx_t_4 = -1; if (__pyx_t_3 < 0) { __pyx_t_3 += __pyx_pybuffernd_tuples.diminfo[0].shape; if (unlikely(__pyx_t_3 < 0)) __pyx_t_4 = 0; } else if (unlikely(__pyx_t_3 >= __pyx_pybuffernd_tuples.diminfo[0].shape)) __pyx_t_4 = 0; if (unlikely(__pyx_t_4 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_4); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 969; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_2 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_tuples.rcbuffer->pybuffer.buf, __pyx_t_3, __pyx_pybuffernd_tuples.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_2); __pyx_t_1 = PyObject_Length(__pyx_t_2); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 969; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_k = __pyx_t_1; /* "pandas/src/inference.pyx":970 * n = len(tuples) * k = len(tuples[0]) * result = np.empty((n, k), dtype=object) # <<<<<<<<<<<<<< * for i in range(n): * tup = tuples[i] */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 970; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__empty); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 970; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_n); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 970; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_6 = PyInt_FromSsize_t(__pyx_v_k); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 970; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 970; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_6); __pyx_t_2 = 0; __pyx_t_6 = 0; __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 970; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_t_7)); __Pyx_GIVEREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0; __pyx_t_7 = PyDict_New(); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 970; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_7)); if (PyDict_SetItem(__pyx_t_7, ((PyObject *)__pyx_n_s__dtype), __pyx_builtin_object) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 970; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_2 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_6), ((PyObject *)__pyx_t_7)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 970; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0; if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 970; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_8 = ((PyArrayObject *)__pyx_t_2); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __pyx_t_4 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_t_8, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack); if (unlikely(__pyx_t_4 < 0)) { PyErr_Fetch(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_v_result, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_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]; __pyx_pybuffernd_result.diminfo[1].strides = __pyx_pybuffernd_result.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_result.diminfo[1].shape = __pyx_pybuffernd_result.rcbuffer->pybuffer.shape[1]; if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 970; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_8 = 0; __pyx_v_result = ((PyArrayObject *)__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/inference.pyx":971 * k = len(tuples[0]) * result = np.empty((n, k), dtype=object) * for i in range(n): # <<<<<<<<<<<<<< * tup = tuples[i] * for j in range(k): */ __pyx_t_1 = __pyx_v_n; for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_1; __pyx_t_12+=1) { __pyx_v_i = __pyx_t_12; /* "pandas/src/inference.pyx":972 * result = np.empty((n, k), dtype=object) * for i in range(n): * tup = tuples[i] # <<<<<<<<<<<<<< * for j in range(k): * result[i, j] = tup[j] */ __pyx_t_13 = __pyx_v_i; __pyx_t_4 = -1; if (__pyx_t_13 < 0) { __pyx_t_13 += __pyx_pybuffernd_tuples.diminfo[0].shape; if (unlikely(__pyx_t_13 < 0)) __pyx_t_4 = 0; } else if (unlikely(__pyx_t_13 >= __pyx_pybuffernd_tuples.diminfo[0].shape)) __pyx_t_4 = 0; if (unlikely(__pyx_t_4 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_4); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 972; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_2 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_tuples.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_tuples.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_2); if (!(likely(PyTuple_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected tuple, got %.200s", Py_TYPE(__pyx_t_2)->tp_name), 0))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 972; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_XDECREF_SET(__pyx_v_tup, ((PyObject*)__pyx_t_2)); __pyx_t_2 = 0; /* "pandas/src/inference.pyx":973 * for i in range(n): * tup = tuples[i] * for j in range(k): # <<<<<<<<<<<<<< * result[i, j] = tup[j] * */ __pyx_t_14 = __pyx_v_k; for (__pyx_t_15 = 0; __pyx_t_15 < __pyx_t_14; __pyx_t_15+=1) { __pyx_v_j = __pyx_t_15; /* "pandas/src/inference.pyx":974 * tup = tuples[i] * for j in range(k): * result[i, j] = tup[j] # <<<<<<<<<<<<<< * * return result */ if (unlikely(((PyObject *)__pyx_v_tup) == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 974; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_2 = __Pyx_GetItemInt_Tuple(((PyObject *)__pyx_v_tup), __pyx_v_j, sizeof(Py_ssize_t), PyInt_FromSsize_t, 0, 1, 1); if (!__pyx_t_2) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 974; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_16 = __pyx_v_i; __pyx_t_17 = __pyx_v_j; __pyx_t_4 = -1; if (__pyx_t_16 < 0) { __pyx_t_16 += __pyx_pybuffernd_result.diminfo[0].shape; if (unlikely(__pyx_t_16 < 0)) __pyx_t_4 = 0; } else if (unlikely(__pyx_t_16 >= __pyx_pybuffernd_result.diminfo[0].shape)) __pyx_t_4 = 0; if (__pyx_t_17 < 0) { __pyx_t_17 += __pyx_pybuffernd_result.diminfo[1].shape; if (unlikely(__pyx_t_17 < 0)) __pyx_t_4 = 1; } else if (unlikely(__pyx_t_17 >= __pyx_pybuffernd_result.diminfo[1].shape)) __pyx_t_4 = 1; if (unlikely(__pyx_t_4 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_4); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 974; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_18 = __Pyx_BufPtrStrided2d(PyObject **, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_result.diminfo[0].strides, __pyx_t_17, __pyx_pybuffernd_result.diminfo[1].strides); __Pyx_GOTREF(*__pyx_t_18); __Pyx_INCREF(__pyx_t_2); __Pyx_DECREF(*__pyx_t_18); *__pyx_t_18 = __pyx_t_2; __Pyx_GIVEREF(*__pyx_t_18); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } } /* "pandas/src/inference.pyx":976 * result[i, j] = tup[j] * * return result # <<<<<<<<<<<<<< * * def to_object_array_tuples(list rows): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_result)); __pyx_r = ((PyObject *)__pyx_v_result); goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tuples.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.lib.tuples_to_object_array", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tuples.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_result); __Pyx_XDECREF(__pyx_v_tup); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_3lib_167to_object_array_tuples(PyObject *__pyx_self, PyObject *__pyx_v_rows); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_3lib_167to_object_array_tuples = {__Pyx_NAMESTR("to_object_array_tuples"), (PyCFunction)__pyx_pw_6pandas_3lib_167to_object_array_tuples, METH_O, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_3lib_167to_object_array_tuples(PyObject *__pyx_self, PyObject *__pyx_v_rows) { CYTHON_UNUSED int __pyx_lineno = 0; CYTHON_UNUSED const char *__pyx_filename = NULL; CYTHON_UNUSED int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("to_object_array_tuples (wrapper)", 0); if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_rows), (&PyList_Type), 1, "rows", 1))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 978; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_3lib_166to_object_array_tuples(__pyx_self, ((PyObject*)__pyx_v_rows)); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/inference.pyx":978 * return result * * def to_object_array_tuples(list rows): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, j, n, k, tmp */ static PyObject *__pyx_pf_6pandas_3lib_166to_object_array_tuples(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_rows) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_n; Py_ssize_t __pyx_v_k; Py_ssize_t __pyx_v_tmp; PyArrayObject *__pyx_v_result = 0; PyObject *__pyx_v_row = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_result; __Pyx_Buffer __pyx_pybuffer_result; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; PyObject *__pyx_t_2 = NULL; Py_ssize_t __pyx_t_3; int __pyx_t_4; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyArrayObject *__pyx_t_8 = NULL; int __pyx_t_9; PyObject *__pyx_t_10 = NULL; PyObject *__pyx_t_11 = NULL; PyObject *__pyx_t_12 = NULL; Py_ssize_t __pyx_t_13; Py_ssize_t __pyx_t_14; Py_ssize_t __pyx_t_15; PyObject **__pyx_t_16; PyObject *__pyx_t_17 = NULL; Py_ssize_t __pyx_t_18; Py_ssize_t __pyx_t_19; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("to_object_array_tuples", 0); __pyx_pybuffer_result.pybuffer.buf = NULL; __pyx_pybuffer_result.refcount = 0; __pyx_pybuffernd_result.data = NULL; __pyx_pybuffernd_result.rcbuffer = &__pyx_pybuffer_result; /* "pandas/src/inference.pyx":984 * tuple row * * n = len(rows) # <<<<<<<<<<<<<< * * k = 0 */ if (unlikely(((PyObject *)__pyx_v_rows) == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 984; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_1 = PyList_GET_SIZE(((PyObject *)__pyx_v_rows)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 984; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/src/inference.pyx":986 * n = len(rows) * * k = 0 # <<<<<<<<<<<<<< * for i from 0 <= i < n: * tmp = len(rows[i]) */ __pyx_v_k = 0; /* "pandas/src/inference.pyx":987 * * k = 0 * for i from 0 <= i < n: # <<<<<<<<<<<<<< * tmp = len(rows[i]) * if tmp > k: */ __pyx_t_1 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_1; __pyx_v_i++) { /* "pandas/src/inference.pyx":988 * k = 0 * for i from 0 <= i < n: * tmp = len(rows[i]) # <<<<<<<<<<<<<< * if tmp > k: * k = tmp */ if (unlikely(((PyObject *)__pyx_v_rows) == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 988; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_2 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_rows), __pyx_v_i, sizeof(Py_ssize_t), PyInt_FromSsize_t, 1, 1, 1); if (!__pyx_t_2) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 988; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyObject_Length(__pyx_t_2); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 988; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_tmp = __pyx_t_3; /* "pandas/src/inference.pyx":989 * for i from 0 <= i < n: * tmp = len(rows[i]) * if tmp > k: # <<<<<<<<<<<<<< * k = tmp * */ __pyx_t_4 = ((__pyx_v_tmp > __pyx_v_k) != 0); if (__pyx_t_4) { /* "pandas/src/inference.pyx":990 * tmp = len(rows[i]) * if tmp > k: * k = tmp # <<<<<<<<<<<<<< * * result = np.empty((n, k), dtype=object) */ __pyx_v_k = __pyx_v_tmp; goto __pyx_L5; } __pyx_L5:; } /* "pandas/src/inference.pyx":992 * k = tmp * * result = np.empty((n, k), dtype=object) # <<<<<<<<<<<<<< * * try: */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 992; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__empty); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 992; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_n); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 992; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_6 = PyInt_FromSsize_t(__pyx_v_k); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 992; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 992; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_6); __pyx_t_2 = 0; __pyx_t_6 = 0; __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 992; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_t_7)); __Pyx_GIVEREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0; __pyx_t_7 = PyDict_New(); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 992; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_7)); if (PyDict_SetItem(__pyx_t_7, ((PyObject *)__pyx_n_s__dtype), __pyx_builtin_object) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 992; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_2 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_6), ((PyObject *)__pyx_t_7)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 992; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0; if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 992; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_8 = ((PyArrayObject *)__pyx_t_2); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __pyx_t_9 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_t_8, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack); if (unlikely(__pyx_t_9 < 0)) { PyErr_Fetch(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_v_result, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_11); Py_XDECREF(__pyx_t_12); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_10, __pyx_t_11, __pyx_t_12); } } __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]; __pyx_pybuffernd_result.diminfo[1].strides = __pyx_pybuffernd_result.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_result.diminfo[1].shape = __pyx_pybuffernd_result.rcbuffer->pybuffer.shape[1]; if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 992; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_8 = 0; __pyx_v_result = ((PyArrayObject *)__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/inference.pyx":994 * result = np.empty((n, k), dtype=object) * * try: # <<<<<<<<<<<<<< * for i in range(n): * row = rows[i] */ { __Pyx_ExceptionSave(&__pyx_t_12, &__pyx_t_11, &__pyx_t_10); __Pyx_XGOTREF(__pyx_t_12); __Pyx_XGOTREF(__pyx_t_11); __Pyx_XGOTREF(__pyx_t_10); /*try:*/ { /* "pandas/src/inference.pyx":995 * * try: * for i in range(n): # <<<<<<<<<<<<<< * row = rows[i] * for j from 0 <= j < len(row): */ __pyx_t_1 = __pyx_v_n; for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_1; __pyx_t_3+=1) { __pyx_v_i = __pyx_t_3; /* "pandas/src/inference.pyx":996 * try: * for i in range(n): * row = rows[i] # <<<<<<<<<<<<<< * for j from 0 <= j < len(row): * result[i, j] = row[j] */ if (unlikely(((PyObject *)__pyx_v_rows) == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 996; __pyx_clineno = __LINE__; goto __pyx_L6_error;} } __pyx_t_2 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_rows), __pyx_v_i, sizeof(Py_ssize_t), PyInt_FromSsize_t, 1, 1, 1); if (!__pyx_t_2) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 996; __pyx_clineno = __LINE__; goto __pyx_L6_error;} __Pyx_GOTREF(__pyx_t_2); if (!(likely(PyTuple_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected tuple, got %.200s", Py_TYPE(__pyx_t_2)->tp_name), 0))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 996; __pyx_clineno = __LINE__; goto __pyx_L6_error;} __Pyx_XDECREF_SET(__pyx_v_row, ((PyObject*)__pyx_t_2)); __pyx_t_2 = 0; /* "pandas/src/inference.pyx":997 * for i in range(n): * row = rows[i] * for j from 0 <= j < len(row): # <<<<<<<<<<<<<< * result[i, j] = row[j] * except Exception: */ if (unlikely(((PyObject *)__pyx_v_row) == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 997; __pyx_clineno = __LINE__; goto __pyx_L6_error;} } __pyx_t_13 = PyTuple_GET_SIZE(((PyObject *)__pyx_v_row)); if (unlikely(__pyx_t_13 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 997; __pyx_clineno = __LINE__; goto __pyx_L6_error;} for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_13; __pyx_v_j++) { /* "pandas/src/inference.pyx":998 * row = rows[i] * for j from 0 <= j < len(row): * result[i, j] = row[j] # <<<<<<<<<<<<<< * except Exception: * # upcast any subclasses to tuple */ if (unlikely(((PyObject *)__pyx_v_row) == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 998; __pyx_clineno = __LINE__; goto __pyx_L6_error;} } __pyx_t_2 = __Pyx_GetItemInt_Tuple(((PyObject *)__pyx_v_row), __pyx_v_j, sizeof(Py_ssize_t), PyInt_FromSsize_t, 0, 1, 1); if (!__pyx_t_2) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 998; __pyx_clineno = __LINE__; goto __pyx_L6_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_14 = __pyx_v_i; __pyx_t_15 = __pyx_v_j; __pyx_t_9 = -1; if (__pyx_t_14 < 0) { __pyx_t_14 += __pyx_pybuffernd_result.diminfo[0].shape; if (unlikely(__pyx_t_14 < 0)) __pyx_t_9 = 0; } else if (unlikely(__pyx_t_14 >= __pyx_pybuffernd_result.diminfo[0].shape)) __pyx_t_9 = 0; if (__pyx_t_15 < 0) { __pyx_t_15 += __pyx_pybuffernd_result.diminfo[1].shape; if (unlikely(__pyx_t_15 < 0)) __pyx_t_9 = 1; } else if (unlikely(__pyx_t_15 >= __pyx_pybuffernd_result.diminfo[1].shape)) __pyx_t_9 = 1; if (unlikely(__pyx_t_9 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_9); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 998; __pyx_clineno = __LINE__; goto __pyx_L6_error;} } __pyx_t_16 = __Pyx_BufPtrStrided2d(PyObject **, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_result.diminfo[0].strides, __pyx_t_15, __pyx_pybuffernd_result.diminfo[1].strides); __Pyx_GOTREF(*__pyx_t_16); __Pyx_INCREF(__pyx_t_2); __Pyx_DECREF(*__pyx_t_16); *__pyx_t_16 = __pyx_t_2; __Pyx_GIVEREF(*__pyx_t_16); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } } } __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; goto __pyx_L13_try_end; __pyx_L6_error:; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/inference.pyx":999 * for j from 0 <= j < len(row): * result[i, j] = row[j] * except Exception: # <<<<<<<<<<<<<< * # upcast any subclasses to tuple * for i in range(n): */ __pyx_t_9 = PyErr_ExceptionMatches(__pyx_builtin_Exception); if (__pyx_t_9) { __Pyx_AddTraceback("pandas.lib.to_object_array_tuples", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_7, &__pyx_t_6) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 999; __pyx_clineno = __LINE__; goto __pyx_L8_except_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_GOTREF(__pyx_t_7); __Pyx_GOTREF(__pyx_t_6); /* "pandas/src/inference.pyx":1001 * except Exception: * # upcast any subclasses to tuple * for i in range(n): # <<<<<<<<<<<<<< * row = tuple(rows[i]) * for j from 0 <= j < len(row): */ __pyx_t_1 = __pyx_v_n; for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_1; __pyx_t_3+=1) { __pyx_v_i = __pyx_t_3; /* "pandas/src/inference.pyx":1002 * # upcast any subclasses to tuple * for i in range(n): * row = tuple(rows[i]) # <<<<<<<<<<<<<< * for j from 0 <= j < len(row): * result[i, j] = row[j] */ if (unlikely(((PyObject *)__pyx_v_rows) == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1002; __pyx_clineno = __LINE__; goto __pyx_L8_except_error;} } __pyx_t_5 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_rows), __pyx_v_i, sizeof(Py_ssize_t), PyInt_FromSsize_t, 1, 1, 1); if (!__pyx_t_5) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1002; __pyx_clineno = __LINE__; goto __pyx_L8_except_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_17 = PyTuple_New(1); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1002; __pyx_clineno = __LINE__; goto __pyx_L8_except_error;} __Pyx_GOTREF(__pyx_t_17); PyTuple_SET_ITEM(__pyx_t_17, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyObject_Call(((PyObject *)((PyObject*)(&PyTuple_Type))), ((PyObject *)__pyx_t_17), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1002; __pyx_clineno = __LINE__; goto __pyx_L8_except_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(((PyObject *)__pyx_t_17)); __pyx_t_17 = 0; __Pyx_XDECREF_SET(__pyx_v_row, ((PyObject*)__pyx_t_5)); __pyx_t_5 = 0; /* "pandas/src/inference.pyx":1003 * for i in range(n): * row = tuple(rows[i]) * for j from 0 <= j < len(row): # <<<<<<<<<<<<<< * result[i, j] = row[j] * */ __pyx_t_13 = PyTuple_GET_SIZE(((PyObject *)__pyx_v_row)); if (unlikely(__pyx_t_13 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1003; __pyx_clineno = __LINE__; goto __pyx_L8_except_error;} for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_13; __pyx_v_j++) { /* "pandas/src/inference.pyx":1004 * row = tuple(rows[i]) * for j from 0 <= j < len(row): * result[i, j] = row[j] # <<<<<<<<<<<<<< * * return result */ __pyx_t_5 = __Pyx_GetItemInt_Tuple(((PyObject *)__pyx_v_row), __pyx_v_j, sizeof(Py_ssize_t), PyInt_FromSsize_t, 0, 1, 1); if (!__pyx_t_5) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1004; __pyx_clineno = __LINE__; goto __pyx_L8_except_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_18 = __pyx_v_i; __pyx_t_19 = __pyx_v_j; __pyx_t_9 = -1; if (__pyx_t_18 < 0) { __pyx_t_18 += __pyx_pybuffernd_result.diminfo[0].shape; if (unlikely(__pyx_t_18 < 0)) __pyx_t_9 = 0; } else if (unlikely(__pyx_t_18 >= __pyx_pybuffernd_result.diminfo[0].shape)) __pyx_t_9 = 0; if (__pyx_t_19 < 0) { __pyx_t_19 += __pyx_pybuffernd_result.diminfo[1].shape; if (unlikely(__pyx_t_19 < 0)) __pyx_t_9 = 1; } else if (unlikely(__pyx_t_19 >= __pyx_pybuffernd_result.diminfo[1].shape)) __pyx_t_9 = 1; if (unlikely(__pyx_t_9 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_9); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1004; __pyx_clineno = __LINE__; goto __pyx_L8_except_error;} } __pyx_t_16 = __Pyx_BufPtrStrided2d(PyObject **, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_result.diminfo[0].strides, __pyx_t_19, __pyx_pybuffernd_result.diminfo[1].strides); __Pyx_GOTREF(*__pyx_t_16); __Pyx_INCREF(__pyx_t_5); __Pyx_DECREF(*__pyx_t_16); *__pyx_t_16 = __pyx_t_5; __Pyx_GIVEREF(*__pyx_t_16); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; goto __pyx_L7_exception_handled; } __pyx_L8_except_error:; __Pyx_XGIVEREF(__pyx_t_12); __Pyx_XGIVEREF(__pyx_t_11); __Pyx_XGIVEREF(__pyx_t_10); __Pyx_ExceptionReset(__pyx_t_12, __pyx_t_11, __pyx_t_10); goto __pyx_L1_error; __pyx_L7_exception_handled:; __Pyx_XGIVEREF(__pyx_t_12); __Pyx_XGIVEREF(__pyx_t_11); __Pyx_XGIVEREF(__pyx_t_10); __Pyx_ExceptionReset(__pyx_t_12, __pyx_t_11, __pyx_t_10); __pyx_L13_try_end:; } /* "pandas/src/inference.pyx":1006 * result[i, j] = row[j] * * return result # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_result)); __pyx_r = ((PyObject *)__pyx_v_result); goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_17); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.lib.to_object_array_tuples", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_result); __Pyx_XDECREF(__pyx_v_row); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_3lib_169fast_multiget(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_3lib_169fast_multiget = {__Pyx_NAMESTR("fast_multiget"), (PyCFunction)__pyx_pw_6pandas_3lib_169fast_multiget, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_3lib_169fast_multiget(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_mapping = 0; PyArrayObject *__pyx_v_keys = 0; PyObject *__pyx_v_default = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("fast_multiget (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__mapping,&__pyx_n_s__keys,&__pyx_n_s__default,0}; PyObject* values[3] = {0,0,0}; values[2] = __pyx_k_87; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__mapping)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__keys)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("fast_multiget", 0, 2, 3, 1); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1009; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__default); if (value) { values[2] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "fast_multiget") < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1009; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_mapping = ((PyObject*)values[0]); __pyx_v_keys = ((PyArrayObject *)values[1]); __pyx_v_default = values[2]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("fast_multiget", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1009; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.lib.fast_multiget", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_mapping), (&PyDict_Type), 1, "mapping", 1))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1009; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_keys), __pyx_ptype_5numpy_ndarray, 1, "keys", 0))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1009; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_3lib_168fast_multiget(__pyx_self, __pyx_v_mapping, __pyx_v_keys, __pyx_v_default); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/inference.pyx":1009 * * * def fast_multiget(dict mapping, ndarray keys, default=np.nan): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = len(keys) */ static PyObject *__pyx_pf_6pandas_3lib_168fast_multiget(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_mapping, PyArrayObject *__pyx_v_keys, PyObject *__pyx_v_default) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_n; PyObject *__pyx_v_val = 0; PyArrayObject *__pyx_v_output = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_output; __Pyx_Buffer __pyx_pybuffer_output; 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; PyArrayObject *__pyx_t_6 = NULL; int __pyx_t_7; Py_ssize_t __pyx_t_8; int __pyx_t_9; Py_ssize_t __pyx_t_10; int __pyx_t_11; PyObject **__pyx_t_12; Py_ssize_t __pyx_t_13; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("fast_multiget", 0); __pyx_pybuffer_output.pybuffer.buf = NULL; __pyx_pybuffer_output.refcount = 0; __pyx_pybuffernd_output.data = NULL; __pyx_pybuffernd_output.rcbuffer = &__pyx_pybuffer_output; /* "pandas/src/inference.pyx":1011 * def fast_multiget(dict mapping, ndarray keys, default=np.nan): * cdef: * Py_ssize_t i, n = len(keys) # <<<<<<<<<<<<<< * object val * ndarray[object] output = np.empty(n, dtype='O') */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_keys)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1011; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/src/inference.pyx":1013 * Py_ssize_t i, n = len(keys) * object val * ndarray[object] output = np.empty(n, dtype='O') # <<<<<<<<<<<<<< * * if n == 0: */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1013; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 1013; __pyx_clineno = __LINE__; goto __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_n); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1013; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1013; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1013; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_2)); if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__dtype), ((PyObject *)__pyx_n_s__O)) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1013; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_5 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1013; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1013; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_6 = ((PyArrayObject *)__pyx_t_5); { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_output.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { __pyx_v_output = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_output.rcbuffer->pybuffer.buf = NULL; {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1013; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } else {__pyx_pybuffernd_output.diminfo[0].strides = __pyx_pybuffernd_output.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_output.diminfo[0].shape = __pyx_pybuffernd_output.rcbuffer->pybuffer.shape[0]; } } __pyx_t_6 = 0; __pyx_v_output = ((PyArrayObject *)__pyx_t_5); __pyx_t_5 = 0; /* "pandas/src/inference.pyx":1015 * ndarray[object] output = np.empty(n, dtype='O') * * if n == 0: # <<<<<<<<<<<<<< * # kludge, for Series * return np.empty(0, dtype='f8') */ __pyx_t_7 = ((__pyx_v_n == 0) != 0); if (__pyx_t_7) { /* "pandas/src/inference.pyx":1017 * if n == 0: * # kludge, for Series * return np.empty(0, dtype='f8') # <<<<<<<<<<<<<< * * for i in range(n): */ __Pyx_XDECREF(__pyx_r); __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1017; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s__empty); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1017; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyDict_New(); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1017; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_5)); if (PyDict_SetItem(__pyx_t_5, ((PyObject *)__pyx_n_s__dtype), ((PyObject *)__pyx_n_s__f8)) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1017; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_4 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_k_tuple_88), ((PyObject *)__pyx_t_5)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1017; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; goto __pyx_L3; } __pyx_L3:; /* "pandas/src/inference.pyx":1019 * return np.empty(0, dtype='f8') * * for i in range(n): # <<<<<<<<<<<<<< * val = util.get_value_1d(keys, i) * if val in mapping: */ __pyx_t_1 = __pyx_v_n; for (__pyx_t_8 = 0; __pyx_t_8 < __pyx_t_1; __pyx_t_8+=1) { __pyx_v_i = __pyx_t_8; /* "pandas/src/inference.pyx":1020 * * for i in range(n): * val = util.get_value_1d(keys, i) # <<<<<<<<<<<<<< * if val in mapping: * output[i] = mapping[val] */ __pyx_t_4 = get_value_1d(__pyx_v_keys, __pyx_v_i); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1020; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_XDECREF_SET(__pyx_v_val, __pyx_t_4); __pyx_t_4 = 0; /* "pandas/src/inference.pyx":1021 * for i in range(n): * val = util.get_value_1d(keys, i) * if val in mapping: # <<<<<<<<<<<<<< * output[i] = mapping[val] * else: */ if (unlikely(((PyObject *)__pyx_v_mapping) == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1021; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_7 = (__Pyx_PyDict_Contains(__pyx_v_val, ((PyObject *)__pyx_v_mapping), Py_EQ)); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1021; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_9 = (__pyx_t_7 != 0); if (__pyx_t_9) { /* "pandas/src/inference.pyx":1022 * val = util.get_value_1d(keys, i) * if val in mapping: * output[i] = mapping[val] # <<<<<<<<<<<<<< * else: * output[i] = default */ if (unlikely(((PyObject *)__pyx_v_mapping) == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1022; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_4 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_mapping), __pyx_v_val); if (!__pyx_t_4) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1022; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_10 = __pyx_v_i; __pyx_t_11 = -1; if (__pyx_t_10 < 0) { __pyx_t_10 += __pyx_pybuffernd_output.diminfo[0].shape; if (unlikely(__pyx_t_10 < 0)) __pyx_t_11 = 0; } else if (unlikely(__pyx_t_10 >= __pyx_pybuffernd_output.diminfo[0].shape)) __pyx_t_11 = 0; if (unlikely(__pyx_t_11 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_11); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1022; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_12 = __Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_output.rcbuffer->pybuffer.buf, __pyx_t_10, __pyx_pybuffernd_output.diminfo[0].strides); __Pyx_GOTREF(*__pyx_t_12); __Pyx_INCREF(__pyx_t_4); __Pyx_DECREF(*__pyx_t_12); *__pyx_t_12 = __pyx_t_4; __Pyx_GIVEREF(*__pyx_t_12); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; goto __pyx_L6; } /*else*/ { /* "pandas/src/inference.pyx":1024 * output[i] = mapping[val] * else: * output[i] = default # <<<<<<<<<<<<<< * * return maybe_convert_objects(output) */ __pyx_t_13 = __pyx_v_i; __pyx_t_11 = -1; if (__pyx_t_13 < 0) { __pyx_t_13 += __pyx_pybuffernd_output.diminfo[0].shape; if (unlikely(__pyx_t_13 < 0)) __pyx_t_11 = 0; } else if (unlikely(__pyx_t_13 >= __pyx_pybuffernd_output.diminfo[0].shape)) __pyx_t_11 = 0; if (unlikely(__pyx_t_11 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_11); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1024; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_12 = __Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_output.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_output.diminfo[0].strides); __Pyx_GOTREF(*__pyx_t_12); __Pyx_INCREF(__pyx_v_default); __Pyx_DECREF(*__pyx_t_12); *__pyx_t_12 = __pyx_v_default; __Pyx_GIVEREF(*__pyx_t_12); } __pyx_L6:; } /* "pandas/src/inference.pyx":1026 * output[i] = default * * return maybe_convert_objects(output) # <<<<<<<<<<<<<< */ __Pyx_XDECREF(__pyx_r); __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_12); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1026; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1026; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(((PyObject *)__pyx_v_output)); PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_v_output)); __Pyx_GIVEREF(((PyObject *)__pyx_v_output)); __pyx_t_2 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1026; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; __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_XDECREF(__pyx_t_5); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_output.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.lib.fast_multiget", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_output.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF(__pyx_v_val); __Pyx_XDECREF((PyObject *)__pyx_v_output); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "datetime.pxd":126 * * * cdef inline _string_to_dts(object val, pandas_datetimestruct* dts): # <<<<<<<<<<<<<< * cdef int result * cdef char *tmp */ static CYTHON_INLINE PyObject *__pyx_f_8datetime__string_to_dts(PyObject *__pyx_v_val, pandas_datetimestruct *__pyx_v_dts) { int __pyx_v_result; char *__pyx_v_tmp; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; char *__pyx_t_3; Py_ssize_t __pyx_t_4; PyObject *__pyx_t_5 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_string_to_dts", 0); __Pyx_INCREF(__pyx_v_val); /* "datetime.pxd":130 * cdef char *tmp * * if PyUnicode_Check(val): # <<<<<<<<<<<<<< * val = PyUnicode_AsASCIIString(val); * */ __pyx_t_1 = (PyUnicode_Check(__pyx_v_val) != 0); if (__pyx_t_1) { /* "datetime.pxd":131 * * if PyUnicode_Check(val): * val = PyUnicode_AsASCIIString(val); # <<<<<<<<<<<<<< * * tmp = val */ __pyx_t_2 = PyUnicode_AsASCIIString(__pyx_v_val); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 131; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF_SET(__pyx_v_val, __pyx_t_2); __pyx_t_2 = 0; goto __pyx_L3; } __pyx_L3:; /* "datetime.pxd":133 * val = PyUnicode_AsASCIIString(val); * * tmp = val # <<<<<<<<<<<<<< * result = _cstring_to_dts(tmp, len(val), dts) * */ __pyx_t_3 = __Pyx_PyObject_AsString(__pyx_v_val); if (unlikely((!__pyx_t_3) && PyErr_Occurred())) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 133; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_tmp = __pyx_t_3; /* "datetime.pxd":134 * * tmp = val * result = _cstring_to_dts(tmp, len(val), dts) # <<<<<<<<<<<<<< * * if result == -1: */ __pyx_t_4 = PyObject_Length(__pyx_v_val); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 134; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_result = __pyx_f_8datetime__cstring_to_dts(__pyx_v_tmp, __pyx_t_4, __pyx_v_dts); /* "datetime.pxd":136 * result = _cstring_to_dts(tmp, len(val), dts) * * if result == -1: # <<<<<<<<<<<<<< * raise ValueError('Unable to parse %s' % str(val)) * */ __pyx_t_1 = ((__pyx_v_result == -1) != 0); if (__pyx_t_1) { /* "datetime.pxd":137 * * if result == -1: * raise ValueError('Unable to parse %s' % str(val)) # <<<<<<<<<<<<<< * * cdef inline int _cstring_to_dts(char *val, int length, */ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 137; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_val); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_val); __Pyx_GIVEREF(__pyx_v_val); __pyx_t_5 = PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 137; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __pyx_t_2 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_89), __pyx_t_5); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 137; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_2)); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 137; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_t_2)); __Pyx_GIVEREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 137; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; {__pyx_filename = __pyx_f[4]; __pyx_lineno = 137; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L4; } __pyx_L4:; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("datetime._string_to_dts", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_val); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "datetime.pxd":139 * raise ValueError('Unable to parse %s' % str(val)) * * cdef inline int _cstring_to_dts(char *val, int length, # <<<<<<<<<<<<<< * pandas_datetimestruct* dts): * cdef: */ static CYTHON_INLINE int __pyx_f_8datetime__cstring_to_dts(char *__pyx_v_val, int __pyx_v_length, pandas_datetimestruct *__pyx_v_dts) { npy_bool __pyx_v_islocal; npy_bool __pyx_v_special; PANDAS_DATETIMEUNIT __pyx_v_out_bestunit; int __pyx_v_result; int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_cstring_to_dts", 0); /* "datetime.pxd":148 * result = parse_iso_8601_datetime(val, length, PANDAS_FR_ns, * NPY_UNSAFE_CASTING, * dts, &islocal, &out_bestunit, &special) # <<<<<<<<<<<<<< * return result * */ __pyx_v_result = parse_iso_8601_datetime(__pyx_v_val, __pyx_v_length, PANDAS_FR_ns, NPY_UNSAFE_CASTING, __pyx_v_dts, (&__pyx_v_islocal), (&__pyx_v_out_bestunit), (&__pyx_v_special)); /* "datetime.pxd":149 * NPY_UNSAFE_CASTING, * dts, &islocal, &out_bestunit, &special) * return result # <<<<<<<<<<<<<< * * */ __pyx_r = __pyx_v_result; goto __pyx_L0; __pyx_r = 0; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "datetime.pxd":152 * * * cdef inline object _datetime64_to_datetime(int64_t val): # <<<<<<<<<<<<<< * cdef pandas_datetimestruct dts * pandas_datetime_to_datetimestruct(val, PANDAS_FR_ns, &dts) */ static CYTHON_INLINE PyObject *__pyx_f_8datetime__datetime64_to_datetime(__pyx_t_5numpy_int64_t __pyx_v_val) { pandas_datetimestruct __pyx_v_dts; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_datetime64_to_datetime", 0); /* "datetime.pxd":154 * cdef inline object _datetime64_to_datetime(int64_t val): * cdef pandas_datetimestruct dts * pandas_datetime_to_datetimestruct(val, PANDAS_FR_ns, &dts) # <<<<<<<<<<<<<< * return _dts_to_pydatetime(&dts) * */ pandas_datetime_to_datetimestruct(__pyx_v_val, PANDAS_FR_ns, (&__pyx_v_dts)); /* "datetime.pxd":155 * cdef pandas_datetimestruct dts * pandas_datetime_to_datetimestruct(val, PANDAS_FR_ns, &dts) * return _dts_to_pydatetime(&dts) # <<<<<<<<<<<<<< * * cdef inline object _dts_to_pydatetime(pandas_datetimestruct *dts): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_8datetime__dts_to_pydatetime((&__pyx_v_dts)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 155; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("datetime._datetime64_to_datetime", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "datetime.pxd":157 * return _dts_to_pydatetime(&dts) * * cdef inline object _dts_to_pydatetime(pandas_datetimestruct *dts): # <<<<<<<<<<<<<< * return PyDateTime_FromDateAndTime(dts.year, dts.month, * dts.day, dts.hour, */ static CYTHON_INLINE PyObject *__pyx_f_8datetime__dts_to_pydatetime(pandas_datetimestruct *__pyx_v_dts) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_dts_to_pydatetime", 0); /* "datetime.pxd":158 * * cdef inline object _dts_to_pydatetime(pandas_datetimestruct *dts): * return PyDateTime_FromDateAndTime(dts.year, dts.month, # <<<<<<<<<<<<<< * dts.day, dts.hour, * dts.min, dts.sec, dts.us) */ __Pyx_XDECREF(__pyx_r); /* "datetime.pxd":160 * return PyDateTime_FromDateAndTime(dts.year, dts.month, * dts.day, dts.hour, * dts.min, dts.sec, dts.us) # <<<<<<<<<<<<<< * * cdef inline int64_t _pydatetime_to_dts(object val, pandas_datetimestruct *dts): */ __pyx_t_1 = PyDateTime_FromDateAndTime(__pyx_v_dts->year, __pyx_v_dts->month, __pyx_v_dts->day, __pyx_v_dts->hour, __pyx_v_dts->min, __pyx_v_dts->sec, __pyx_v_dts->us); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 158; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)__pyx_t_1)); __pyx_r = __pyx_t_1; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("datetime._dts_to_pydatetime", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "datetime.pxd":162 * dts.min, dts.sec, dts.us) * * cdef inline int64_t _pydatetime_to_dts(object val, pandas_datetimestruct *dts): # <<<<<<<<<<<<<< * dts.year = PyDateTime_GET_YEAR(val) * dts.month = PyDateTime_GET_MONTH(val) */ static CYTHON_INLINE __pyx_t_5numpy_int64_t __pyx_f_8datetime__pydatetime_to_dts(PyObject *__pyx_v_val, pandas_datetimestruct *__pyx_v_dts) { __pyx_t_5numpy_int64_t __pyx_r; __Pyx_RefNannyDeclarations int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_pydatetime_to_dts", 0); /* "datetime.pxd":163 * * cdef inline int64_t _pydatetime_to_dts(object val, pandas_datetimestruct *dts): * dts.year = PyDateTime_GET_YEAR(val) # <<<<<<<<<<<<<< * dts.month = PyDateTime_GET_MONTH(val) * dts.day = PyDateTime_GET_DAY(val) */ if (!(likely(((__pyx_v_val) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_val, __pyx_ptype_8datetime_date))))) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 163; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_dts->year = PyDateTime_GET_YEAR(((PyDateTime_Date *)__pyx_v_val)); /* "datetime.pxd":164 * cdef inline int64_t _pydatetime_to_dts(object val, pandas_datetimestruct *dts): * dts.year = PyDateTime_GET_YEAR(val) * dts.month = PyDateTime_GET_MONTH(val) # <<<<<<<<<<<<<< * dts.day = PyDateTime_GET_DAY(val) * dts.hour = PyDateTime_DATE_GET_HOUR(val) */ if (!(likely(((__pyx_v_val) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_val, __pyx_ptype_8datetime_date))))) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 164; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_dts->month = PyDateTime_GET_MONTH(((PyDateTime_Date *)__pyx_v_val)); /* "datetime.pxd":165 * dts.year = PyDateTime_GET_YEAR(val) * dts.month = PyDateTime_GET_MONTH(val) * dts.day = PyDateTime_GET_DAY(val) # <<<<<<<<<<<<<< * dts.hour = PyDateTime_DATE_GET_HOUR(val) * dts.min = PyDateTime_DATE_GET_MINUTE(val) */ if (!(likely(((__pyx_v_val) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_val, __pyx_ptype_8datetime_date))))) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 165; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_dts->day = PyDateTime_GET_DAY(((PyDateTime_Date *)__pyx_v_val)); /* "datetime.pxd":166 * dts.month = PyDateTime_GET_MONTH(val) * dts.day = PyDateTime_GET_DAY(val) * dts.hour = PyDateTime_DATE_GET_HOUR(val) # <<<<<<<<<<<<<< * dts.min = PyDateTime_DATE_GET_MINUTE(val) * dts.sec = PyDateTime_DATE_GET_SECOND(val) */ __pyx_v_dts->hour = PyDateTime_DATE_GET_HOUR(__pyx_v_val); /* "datetime.pxd":167 * dts.day = PyDateTime_GET_DAY(val) * dts.hour = PyDateTime_DATE_GET_HOUR(val) * dts.min = PyDateTime_DATE_GET_MINUTE(val) # <<<<<<<<<<<<<< * dts.sec = PyDateTime_DATE_GET_SECOND(val) * dts.us = PyDateTime_DATE_GET_MICROSECOND(val) */ __pyx_v_dts->min = PyDateTime_DATE_GET_MINUTE(__pyx_v_val); /* "datetime.pxd":168 * dts.hour = PyDateTime_DATE_GET_HOUR(val) * dts.min = PyDateTime_DATE_GET_MINUTE(val) * dts.sec = PyDateTime_DATE_GET_SECOND(val) # <<<<<<<<<<<<<< * dts.us = PyDateTime_DATE_GET_MICROSECOND(val) * dts.ps = dts.as = 0 */ __pyx_v_dts->sec = PyDateTime_DATE_GET_SECOND(__pyx_v_val); /* "datetime.pxd":169 * dts.min = PyDateTime_DATE_GET_MINUTE(val) * dts.sec = PyDateTime_DATE_GET_SECOND(val) * dts.us = PyDateTime_DATE_GET_MICROSECOND(val) # <<<<<<<<<<<<<< * dts.ps = dts.as = 0 * return pandas_datetimestruct_to_datetime(PANDAS_FR_ns, dts) */ __pyx_v_dts->us = PyDateTime_DATE_GET_MICROSECOND(__pyx_v_val); /* "datetime.pxd":170 * dts.sec = PyDateTime_DATE_GET_SECOND(val) * dts.us = PyDateTime_DATE_GET_MICROSECOND(val) * dts.ps = dts.as = 0 # <<<<<<<<<<<<<< * return pandas_datetimestruct_to_datetime(PANDAS_FR_ns, dts) * */ __pyx_v_dts->ps = 0; __pyx_v_dts->as = 0; /* "datetime.pxd":171 * dts.us = PyDateTime_DATE_GET_MICROSECOND(val) * dts.ps = dts.as = 0 * return pandas_datetimestruct_to_datetime(PANDAS_FR_ns, dts) # <<<<<<<<<<<<<< * * cdef inline int64_t _dtlike_to_datetime64(object val, */ __pyx_r = pandas_datetimestruct_to_datetime(PANDAS_FR_ns, __pyx_v_dts); goto __pyx_L0; __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_WriteUnraisable("datetime._pydatetime_to_dts", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "datetime.pxd":173 * return pandas_datetimestruct_to_datetime(PANDAS_FR_ns, dts) * * cdef inline int64_t _dtlike_to_datetime64(object val, # <<<<<<<<<<<<<< * pandas_datetimestruct *dts): * dts.year = val.year */ static CYTHON_INLINE __pyx_t_5numpy_int64_t __pyx_f_8datetime__dtlike_to_datetime64(PyObject *__pyx_v_val, pandas_datetimestruct *__pyx_v_dts) { __pyx_t_5numpy_int64_t __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; npy_int64 __pyx_t_2; npy_int32 __pyx_t_3; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_dtlike_to_datetime64", 0); /* "datetime.pxd":175 * cdef inline int64_t _dtlike_to_datetime64(object val, * pandas_datetimestruct *dts): * dts.year = val.year # <<<<<<<<<<<<<< * dts.month = val.month * dts.day = val.day */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_val, __pyx_n_s__year); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 175; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyInt_from_py_npy_int64(__pyx_t_1); if (unlikely((__pyx_t_2 == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 175; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_dts->year = __pyx_t_2; /* "datetime.pxd":176 * pandas_datetimestruct *dts): * dts.year = val.year * dts.month = val.month # <<<<<<<<<<<<<< * dts.day = val.day * dts.hour = val.hour */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_val, __pyx_n_s__month); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 176; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __Pyx_PyInt_from_py_npy_int32(__pyx_t_1); if (unlikely((__pyx_t_3 == (npy_int32)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 176; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_dts->month = __pyx_t_3; /* "datetime.pxd":177 * dts.year = val.year * dts.month = val.month * dts.day = val.day # <<<<<<<<<<<<<< * dts.hour = val.hour * dts.min = val.minute */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_val, __pyx_n_s__day); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 177; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __Pyx_PyInt_from_py_npy_int32(__pyx_t_1); if (unlikely((__pyx_t_3 == (npy_int32)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 177; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_dts->day = __pyx_t_3; /* "datetime.pxd":178 * dts.month = val.month * dts.day = val.day * dts.hour = val.hour # <<<<<<<<<<<<<< * dts.min = val.minute * dts.sec = val.second */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_val, __pyx_n_s__hour); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 178; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __Pyx_PyInt_from_py_npy_int32(__pyx_t_1); if (unlikely((__pyx_t_3 == (npy_int32)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 178; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_dts->hour = __pyx_t_3; /* "datetime.pxd":179 * dts.day = val.day * dts.hour = val.hour * dts.min = val.minute # <<<<<<<<<<<<<< * dts.sec = val.second * dts.us = val.microsecond */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_val, __pyx_n_s__minute); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 179; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __Pyx_PyInt_from_py_npy_int32(__pyx_t_1); if (unlikely((__pyx_t_3 == (npy_int32)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 179; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_dts->min = __pyx_t_3; /* "datetime.pxd":180 * dts.hour = val.hour * dts.min = val.minute * dts.sec = val.second # <<<<<<<<<<<<<< * dts.us = val.microsecond * dts.ps = dts.as = 0 */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_val, __pyx_n_s__second); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __Pyx_PyInt_from_py_npy_int32(__pyx_t_1); if (unlikely((__pyx_t_3 == (npy_int32)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_dts->sec = __pyx_t_3; /* "datetime.pxd":181 * dts.min = val.minute * dts.sec = val.second * dts.us = val.microsecond # <<<<<<<<<<<<<< * dts.ps = dts.as = 0 * return pandas_datetimestruct_to_datetime(PANDAS_FR_ns, dts) */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_val, __pyx_n_s__microsecond); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 181; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __Pyx_PyInt_from_py_npy_int32(__pyx_t_1); if (unlikely((__pyx_t_3 == (npy_int32)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 181; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_dts->us = __pyx_t_3; /* "datetime.pxd":182 * dts.sec = val.second * dts.us = val.microsecond * dts.ps = dts.as = 0 # <<<<<<<<<<<<<< * return pandas_datetimestruct_to_datetime(PANDAS_FR_ns, dts) * */ __pyx_v_dts->ps = 0; __pyx_v_dts->as = 0; /* "datetime.pxd":183 * dts.us = val.microsecond * dts.ps = dts.as = 0 * return pandas_datetimestruct_to_datetime(PANDAS_FR_ns, dts) # <<<<<<<<<<<<<< * * cdef inline int64_t _date_to_datetime64(object val, */ __pyx_r = pandas_datetimestruct_to_datetime(PANDAS_FR_ns, __pyx_v_dts); goto __pyx_L0; __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_WriteUnraisable("datetime._dtlike_to_datetime64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "datetime.pxd":185 * return pandas_datetimestruct_to_datetime(PANDAS_FR_ns, dts) * * cdef inline int64_t _date_to_datetime64(object val, # <<<<<<<<<<<<<< * pandas_datetimestruct *dts): * dts.year = PyDateTime_GET_YEAR(val) */ static CYTHON_INLINE __pyx_t_5numpy_int64_t __pyx_f_8datetime__date_to_datetime64(PyObject *__pyx_v_val, pandas_datetimestruct *__pyx_v_dts) { __pyx_t_5numpy_int64_t __pyx_r; __Pyx_RefNannyDeclarations int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_date_to_datetime64", 0); /* "datetime.pxd":187 * cdef inline int64_t _date_to_datetime64(object val, * pandas_datetimestruct *dts): * dts.year = PyDateTime_GET_YEAR(val) # <<<<<<<<<<<<<< * dts.month = PyDateTime_GET_MONTH(val) * dts.day = PyDateTime_GET_DAY(val) */ if (!(likely(((__pyx_v_val) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_val, __pyx_ptype_8datetime_date))))) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 187; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_dts->year = PyDateTime_GET_YEAR(((PyDateTime_Date *)__pyx_v_val)); /* "datetime.pxd":188 * pandas_datetimestruct *dts): * dts.year = PyDateTime_GET_YEAR(val) * dts.month = PyDateTime_GET_MONTH(val) # <<<<<<<<<<<<<< * dts.day = PyDateTime_GET_DAY(val) * dts.hour = dts.min = dts.sec = dts.us = 0 */ if (!(likely(((__pyx_v_val) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_val, __pyx_ptype_8datetime_date))))) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 188; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_dts->month = PyDateTime_GET_MONTH(((PyDateTime_Date *)__pyx_v_val)); /* "datetime.pxd":189 * dts.year = PyDateTime_GET_YEAR(val) * dts.month = PyDateTime_GET_MONTH(val) * dts.day = PyDateTime_GET_DAY(val) # <<<<<<<<<<<<<< * dts.hour = dts.min = dts.sec = dts.us = 0 * dts.ps = dts.as = 0 */ if (!(likely(((__pyx_v_val) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_val, __pyx_ptype_8datetime_date))))) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 189; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_dts->day = PyDateTime_GET_DAY(((PyDateTime_Date *)__pyx_v_val)); /* "datetime.pxd":190 * dts.month = PyDateTime_GET_MONTH(val) * dts.day = PyDateTime_GET_DAY(val) * dts.hour = dts.min = dts.sec = dts.us = 0 # <<<<<<<<<<<<<< * dts.ps = dts.as = 0 * return pandas_datetimestruct_to_datetime(PANDAS_FR_ns, dts) */ __pyx_v_dts->hour = 0; __pyx_v_dts->min = 0; __pyx_v_dts->sec = 0; __pyx_v_dts->us = 0; /* "datetime.pxd":191 * dts.day = PyDateTime_GET_DAY(val) * dts.hour = dts.min = dts.sec = dts.us = 0 * dts.ps = dts.as = 0 # <<<<<<<<<<<<<< * return pandas_datetimestruct_to_datetime(PANDAS_FR_ns, dts) * */ __pyx_v_dts->ps = 0; __pyx_v_dts->as = 0; /* "datetime.pxd":192 * dts.hour = dts.min = dts.sec = dts.us = 0 * dts.ps = dts.as = 0 * return pandas_datetimestruct_to_datetime(PANDAS_FR_ns, dts) # <<<<<<<<<<<<<< * */ __pyx_r = pandas_datetimestruct_to_datetime(PANDAS_FR_ns, __pyx_v_dts); goto __pyx_L0; __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_WriteUnraisable("datetime._date_to_datetime64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "util.pxd":26 * object sarr_from_data(cnp.dtype, int length, void* data) * * cdef inline object get_value_at(ndarray arr, object loc): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, sz */ static CYTHON_INLINE PyObject *__pyx_f_4util_get_value_at(PyArrayObject *__pyx_v_arr, PyObject *__pyx_v_loc) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_sz; PyObject *__pyx_v_casted = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; Py_ssize_t __pyx_t_4; int __pyx_t_5; int __pyx_t_6; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_value_at", 0); __Pyx_INCREF(__pyx_v_loc); /* "util.pxd":30 * Py_ssize_t i, sz * void* data_ptr * if is_float_object(loc): # <<<<<<<<<<<<<< * casted = int(loc) * if casted == loc: */ __pyx_t_1 = (is_float_object(__pyx_v_loc) != 0); if (__pyx_t_1) { /* "util.pxd":31 * void* data_ptr * if is_float_object(loc): * casted = int(loc) # <<<<<<<<<<<<<< * if casted == loc: * loc = casted */ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 31; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_loc); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_loc); __Pyx_GIVEREF(__pyx_v_loc); __pyx_t_3 = PyObject_Call(((PyObject *)((PyObject*)(&PyInt_Type))), ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 31; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __pyx_v_casted = __pyx_t_3; __pyx_t_3 = 0; /* "util.pxd":32 * if is_float_object(loc): * casted = int(loc) * if casted == loc: # <<<<<<<<<<<<<< * loc = casted * i = loc */ __pyx_t_3 = PyObject_RichCompare(__pyx_v_casted, __pyx_v_loc, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 32; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 32; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_1) { /* "util.pxd":33 * casted = int(loc) * if casted == loc: * loc = casted # <<<<<<<<<<<<<< * i = loc * sz = cnp.PyArray_SIZE(arr) */ __Pyx_INCREF(__pyx_v_casted); __Pyx_DECREF_SET(__pyx_v_loc, __pyx_v_casted); goto __pyx_L4; } __pyx_L4:; goto __pyx_L3; } __pyx_L3:; /* "util.pxd":34 * if casted == loc: * loc = casted * i = loc # <<<<<<<<<<<<<< * sz = cnp.PyArray_SIZE(arr) * */ __pyx_t_4 = __Pyx_PyIndex_AsSsize_t(__pyx_v_loc); if (unlikely((__pyx_t_4 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 34; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_i = ((Py_ssize_t)__pyx_t_4); /* "util.pxd":35 * loc = casted * i = loc * sz = cnp.PyArray_SIZE(arr) # <<<<<<<<<<<<<< * * if i < 0 and sz > 0: */ __pyx_v_sz = PyArray_SIZE(__pyx_v_arr); /* "util.pxd":37 * sz = cnp.PyArray_SIZE(arr) * * if i < 0 and sz > 0: # <<<<<<<<<<<<<< * i += sz * elif i >= sz or sz == 0: */ __pyx_t_1 = ((__pyx_v_i < 0) != 0); if (__pyx_t_1) { __pyx_t_5 = ((__pyx_v_sz > 0) != 0); __pyx_t_6 = __pyx_t_5; } else { __pyx_t_6 = __pyx_t_1; } if (__pyx_t_6) { /* "util.pxd":38 * * if i < 0 and sz > 0: * i += sz # <<<<<<<<<<<<<< * elif i >= sz or sz == 0: * raise IndexError('index out of bounds') */ __pyx_v_i = (__pyx_v_i + __pyx_v_sz); goto __pyx_L5; } /* "util.pxd":39 * if i < 0 and sz > 0: * i += sz * elif i >= sz or sz == 0: # <<<<<<<<<<<<<< * raise IndexError('index out of bounds') * */ __pyx_t_6 = ((__pyx_v_i >= __pyx_v_sz) != 0); if (!__pyx_t_6) { __pyx_t_1 = ((__pyx_v_sz == 0) != 0); __pyx_t_5 = __pyx_t_1; } else { __pyx_t_5 = __pyx_t_6; } if (__pyx_t_5) { /* "util.pxd":40 * i += sz * elif i >= sz or sz == 0: * raise IndexError('index out of bounds') # <<<<<<<<<<<<<< * * return get_value_1d(arr, i) */ __pyx_t_3 = PyObject_Call(__pyx_builtin_IndexError, ((PyObject *)__pyx_k_tuple_91), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 40; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[5]; __pyx_lineno = 40; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L5; } __pyx_L5:; /* "util.pxd":42 * raise IndexError('index out of bounds') * * return get_value_1d(arr, i) # <<<<<<<<<<<<<< * * cdef inline set_value_at(ndarray arr, object loc, object value): */ __Pyx_XDECREF(__pyx_r); __pyx_t_3 = get_value_1d(__pyx_v_arr, __pyx_v_i); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 42; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("util.get_value_at", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_casted); __Pyx_XDECREF(__pyx_v_loc); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "util.pxd":44 * return get_value_1d(arr, i) * * cdef inline set_value_at(ndarray arr, object loc, object value): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, sz */ static CYTHON_INLINE PyObject *__pyx_f_4util_set_value_at(PyArrayObject *__pyx_v_arr, PyObject *__pyx_v_loc, PyObject *__pyx_v_value) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_sz; PyObject *__pyx_v_casted = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; Py_ssize_t __pyx_t_4; int __pyx_t_5; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("set_value_at", 0); __Pyx_INCREF(__pyx_v_loc); /* "util.pxd":47 * cdef: * Py_ssize_t i, sz * if is_float_object(loc): # <<<<<<<<<<<<<< * casted = int(loc) * if casted == loc: */ __pyx_t_1 = (is_float_object(__pyx_v_loc) != 0); if (__pyx_t_1) { /* "util.pxd":48 * Py_ssize_t i, sz * if is_float_object(loc): * casted = int(loc) # <<<<<<<<<<<<<< * if casted == loc: * loc = casted */ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_loc); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_loc); __Pyx_GIVEREF(__pyx_v_loc); __pyx_t_3 = PyObject_Call(((PyObject *)((PyObject*)(&PyInt_Type))), ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __pyx_v_casted = __pyx_t_3; __pyx_t_3 = 0; /* "util.pxd":49 * if is_float_object(loc): * casted = int(loc) * if casted == loc: # <<<<<<<<<<<<<< * loc = casted * i = loc */ __pyx_t_3 = PyObject_RichCompare(__pyx_v_casted, __pyx_v_loc, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_1) { /* "util.pxd":50 * casted = int(loc) * if casted == loc: * loc = casted # <<<<<<<<<<<<<< * i = loc * sz = cnp.PyArray_SIZE(arr) */ __Pyx_INCREF(__pyx_v_casted); __Pyx_DECREF_SET(__pyx_v_loc, __pyx_v_casted); goto __pyx_L4; } __pyx_L4:; goto __pyx_L3; } __pyx_L3:; /* "util.pxd":51 * if casted == loc: * loc = casted * i = loc # <<<<<<<<<<<<<< * sz = cnp.PyArray_SIZE(arr) * */ __pyx_t_4 = __Pyx_PyIndex_AsSsize_t(__pyx_v_loc); if (unlikely((__pyx_t_4 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_i = ((Py_ssize_t)__pyx_t_4); /* "util.pxd":52 * loc = casted * i = loc * sz = cnp.PyArray_SIZE(arr) # <<<<<<<<<<<<<< * * if i < 0: */ __pyx_v_sz = PyArray_SIZE(__pyx_v_arr); /* "util.pxd":54 * sz = cnp.PyArray_SIZE(arr) * * if i < 0: # <<<<<<<<<<<<<< * i += sz * elif i >= sz: */ __pyx_t_1 = ((__pyx_v_i < 0) != 0); if (__pyx_t_1) { /* "util.pxd":55 * * if i < 0: * i += sz # <<<<<<<<<<<<<< * elif i >= sz: * raise IndexError('index out of bounds') */ __pyx_v_i = (__pyx_v_i + __pyx_v_sz); goto __pyx_L5; } /* "util.pxd":56 * if i < 0: * i += sz * elif i >= sz: # <<<<<<<<<<<<<< * raise IndexError('index out of bounds') * */ __pyx_t_1 = ((__pyx_v_i >= __pyx_v_sz) != 0); if (__pyx_t_1) { /* "util.pxd":57 * i += sz * elif i >= sz: * raise IndexError('index out of bounds') # <<<<<<<<<<<<<< * * assign_value_1d(arr, i, value) */ __pyx_t_3 = PyObject_Call(__pyx_builtin_IndexError, ((PyObject *)__pyx_k_tuple_92), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 57; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[5]; __pyx_lineno = 57; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L5; } __pyx_L5:; /* "util.pxd":59 * raise IndexError('index out of bounds') * * assign_value_1d(arr, i, value) # <<<<<<<<<<<<<< * * cdef inline int is_contiguous(ndarray arr): */ __pyx_t_5 = assign_value_1d(__pyx_v_arr, __pyx_v_i, __pyx_v_value); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 59; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("util.set_value_at", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_casted); __Pyx_XDECREF(__pyx_v_loc); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "util.pxd":61 * assign_value_1d(arr, i, value) * * cdef inline int is_contiguous(ndarray arr): # <<<<<<<<<<<<<< * return cnp.PyArray_CHKFLAGS(arr, cnp.NPY_C_CONTIGUOUS) * */ static CYTHON_INLINE int __pyx_f_4util_is_contiguous(PyArrayObject *__pyx_v_arr) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("is_contiguous", 0); /* "util.pxd":62 * * cdef inline int is_contiguous(ndarray arr): * return cnp.PyArray_CHKFLAGS(arr, cnp.NPY_C_CONTIGUOUS) # <<<<<<<<<<<<<< * * cdef inline is_array(object o): */ __pyx_r = PyArray_CHKFLAGS(__pyx_v_arr, NPY_C_CONTIGUOUS); goto __pyx_L0; __pyx_r = 0; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "util.pxd":64 * return cnp.PyArray_CHKFLAGS(arr, cnp.NPY_C_CONTIGUOUS) * * cdef inline is_array(object o): # <<<<<<<<<<<<<< * return cnp.PyArray_Check(o) * */ static CYTHON_INLINE PyObject *__pyx_f_4util_is_array(PyObject *__pyx_v_o) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("is_array", 0); /* "util.pxd":65 * * cdef inline is_array(object o): * return cnp.PyArray_Check(o) # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyBool_FromLong(PyArray_Check(__pyx_v_o)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 65; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("util.is_array", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "util.pxd":68 * * * cdef inline bint _checknull(object val): # <<<<<<<<<<<<<< * try: * return val is None or (cpython.PyFloat_Check(val) and val != val) */ static CYTHON_INLINE int __pyx_f_4util__checknull(PyObject *__pyx_v_val) { 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; int __pyx_t_9; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_checknull", 0); /* "util.pxd":69 * * cdef inline bint _checknull(object val): * try: # <<<<<<<<<<<<<< * return val is None or (cpython.PyFloat_Check(val) and val != val) * except ValueError: */ { __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:*/ { /* "util.pxd":70 * cdef inline bint _checknull(object val): * try: * return val is None or (cpython.PyFloat_Check(val) and val != val) # <<<<<<<<<<<<<< * except ValueError: * return False */ __pyx_t_4 = (__pyx_v_val == Py_None); __pyx_t_5 = __Pyx_PyBool_FromLong(__pyx_t_4); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L3_error;} if (!__pyx_t_4) { __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_6 = __Pyx_PyBool_FromLong(PyFloat_Check(__pyx_v_val)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L3_error;} if (__pyx_t_4) { __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_7 = PyObject_RichCompare(__pyx_v_val, __pyx_v_val, Py_NE); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_t_8 = __pyx_t_7; __pyx_t_7 = 0; } else { __pyx_t_8 = __pyx_t_6; __pyx_t_6 = 0; } __pyx_t_6 = __pyx_t_8; __pyx_t_8 = 0; } else { __pyx_t_6 = __pyx_t_5; __pyx_t_5 = 0; } __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_r = __pyx_t_4; goto __pyx_L7_try_return; } __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L10_try_end; __pyx_L7_try_return:; __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); goto __pyx_L0; __pyx_L3_error:; __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; /* "util.pxd":71 * try: * return val is None or (cpython.PyFloat_Check(val) and val != val) * except ValueError: # <<<<<<<<<<<<<< * return False * */ __pyx_t_9 = PyErr_ExceptionMatches(__pyx_builtin_ValueError); if (__pyx_t_9) { __Pyx_AddTraceback("util._checknull", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_5, &__pyx_t_8) < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 71; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_GOTREF(__pyx_t_5); __Pyx_GOTREF(__pyx_t_8); /* "util.pxd":72 * return val is None or (cpython.PyFloat_Check(val) and val != val) * except ValueError: * return False # <<<<<<<<<<<<<< * * cdef inline bint _checknull_old(object val): */ __pyx_r = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; goto __pyx_L6_except_return; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; goto __pyx_L4_exception_handled; } __pyx_L5_except_error:; __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); goto __pyx_L1_error; __pyx_L6_except_return:; __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); goto __pyx_L0; __pyx_L4_exception_handled:; __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); __pyx_L10_try_end:; } __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_WriteUnraisable("util._checknull", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "util.pxd":74 * return False * * cdef inline bint _checknull_old(object val): # <<<<<<<<<<<<<< * import numpy as np * cdef double INF = np.inf */ static CYTHON_INLINE int __pyx_f_4util__checknull_old(PyObject *__pyx_v_val) { PyObject *__pyx_v_np = NULL; double __pyx_v_INF; double __pyx_v_NEGINF; int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; double __pyx_t_2; 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; int __pyx_t_9; int __pyx_t_10; int __pyx_t_11; int __pyx_t_12; PyObject *__pyx_t_13 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_checknull_old", 0); /* "util.pxd":75 * * cdef inline bint _checknull_old(object val): * import numpy as np # <<<<<<<<<<<<<< * cdef double INF = np.inf * cdef double NEGINF = -INF */ __pyx_t_1 = __Pyx_Import(((PyObject *)__pyx_n_s__numpy), 0, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 75; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_v_np = __pyx_t_1; __pyx_t_1 = 0; /* "util.pxd":76 * cdef inline bint _checknull_old(object val): * import numpy as np * cdef double INF = np.inf # <<<<<<<<<<<<<< * cdef double NEGINF = -INF * try: */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_np, __pyx_n_s__inf); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 76; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __pyx_PyFloat_AsDouble(__pyx_t_1); if (unlikely((__pyx_t_2 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 76; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_INF = ((double)__pyx_t_2); /* "util.pxd":77 * import numpy as np * cdef double INF = np.inf * cdef double NEGINF = -INF # <<<<<<<<<<<<<< * try: * return bool(val is None or val != val and val != INF */ __pyx_v_NEGINF = (-__pyx_v_INF); /* "util.pxd":78 * cdef double INF = np.inf * cdef double NEGINF = -INF * try: # <<<<<<<<<<<<<< * return bool(val is None or val != val and val != INF * and val != NEGINF) */ { __Pyx_ExceptionSave(&__pyx_t_3, &__pyx_t_4, &__pyx_t_5); __Pyx_XGOTREF(__pyx_t_3); __Pyx_XGOTREF(__pyx_t_4); __Pyx_XGOTREF(__pyx_t_5); /*try:*/ { /* "util.pxd":79 * cdef double NEGINF = -INF * try: * return bool(val is None or val != val and val != INF # <<<<<<<<<<<<<< * and val != NEGINF) * except ValueError: */ __pyx_t_6 = (__pyx_v_val == Py_None); if (!__pyx_t_6) { __pyx_t_1 = PyObject_RichCompare(__pyx_v_val, __pyx_v_val, Py_NE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_7) { /* "util.pxd":80 * try: * return bool(val is None or val != val and val != INF * and val != NEGINF) # <<<<<<<<<<<<<< * except ValueError: * return False */ __pyx_t_1 = PyFloat_FromDouble(__pyx_v_INF); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 80; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_8 = PyObject_RichCompare(__pyx_v_val, __pyx_t_1, Py_NE); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (__pyx_t_9) { __pyx_t_8 = PyFloat_FromDouble(__pyx_v_NEGINF); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 80; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_1 = PyObject_RichCompare(__pyx_v_val, __pyx_t_8, Py_NE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 80; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 80; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_11 = __pyx_t_10; } else { __pyx_t_11 = __pyx_t_9; } __pyx_t_9 = __pyx_t_11; } else { __pyx_t_9 = __pyx_t_7; } __pyx_t_7 = __pyx_t_9; } else { __pyx_t_7 = __pyx_t_6; } __pyx_r = (!(!__pyx_t_7)); goto __pyx_L7_try_return; } __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; goto __pyx_L10_try_end; __pyx_L7_try_return:; __Pyx_XGIVEREF(__pyx_t_3); __Pyx_XGIVEREF(__pyx_t_4); __Pyx_XGIVEREF(__pyx_t_5); __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5); goto __pyx_L0; __pyx_L3_error:; __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; /* "util.pxd":81 * return bool(val is None or val != val and val != INF * and val != NEGINF) * except ValueError: # <<<<<<<<<<<<<< * return False * */ __pyx_t_12 = PyErr_ExceptionMatches(__pyx_builtin_ValueError); if (__pyx_t_12) { __Pyx_AddTraceback("util._checknull_old", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_8, &__pyx_t_13) < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_GOTREF(__pyx_t_8); __Pyx_GOTREF(__pyx_t_13); /* "util.pxd":82 * and val != NEGINF) * except ValueError: * return False # <<<<<<<<<<<<<< * * cdef inline bint _checknan(object val): */ __pyx_r = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; goto __pyx_L6_except_return; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; goto __pyx_L4_exception_handled; } __pyx_L5_except_error:; __Pyx_XGIVEREF(__pyx_t_3); __Pyx_XGIVEREF(__pyx_t_4); __Pyx_XGIVEREF(__pyx_t_5); __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5); goto __pyx_L1_error; __pyx_L6_except_return:; __Pyx_XGIVEREF(__pyx_t_3); __Pyx_XGIVEREF(__pyx_t_4); __Pyx_XGIVEREF(__pyx_t_5); __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5); goto __pyx_L0; __pyx_L4_exception_handled:; __Pyx_XGIVEREF(__pyx_t_3); __Pyx_XGIVEREF(__pyx_t_4); __Pyx_XGIVEREF(__pyx_t_5); __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5); __pyx_L10_try_end:; } __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_13); __Pyx_WriteUnraisable("util._checknull_old", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_np); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "util.pxd":84 * return False * * cdef inline bint _checknan(object val): # <<<<<<<<<<<<<< * return not cnp.PyArray_Check(val) and val != val */ static CYTHON_INLINE int __pyx_f_4util__checknan(PyObject *__pyx_v_val) { int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_checknan", 0); /* "util.pxd":85 * * cdef inline bint _checknan(object val): * return not cnp.PyArray_Check(val) and val != val # <<<<<<<<<<<<<< */ __pyx_t_1 = __Pyx_PyBool_FromLong((!(PyArray_Check(__pyx_v_val) != 0))); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__pyx_t_2) { __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_3 = PyObject_RichCompare(__pyx_v_val, __pyx_v_val, Py_NE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_4 = __pyx_t_3; __pyx_t_3 = 0; } else { __pyx_t_4 = __pyx_t_1; __pyx_t_1 = 0; } __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_r = __pyx_t_2; goto __pyx_L0; __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_WriteUnraisable("util._checknan", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* 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)); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "numpy.pxd":196 * # 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 fullfill the PEP. */ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags) { int __pyx_v_copy_shape; 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_v_hasfields; int __pyx_r; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; int __pyx_t_5; int __pyx_t_6; int __pyx_t_7; PyObject *__pyx_t_8 = NULL; char *__pyx_t_9; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__getbuffer__", 0); if (__pyx_v_info != NULL) { __pyx_v_info->obj = Py_None; __Pyx_INCREF(Py_None); __Pyx_GIVEREF(__pyx_v_info->obj); } /* "numpy.pxd":202 * # of flags * * if info == NULL: return # <<<<<<<<<<<<<< * * cdef int copy_shape, i, ndim */ __pyx_t_1 = ((__pyx_v_info == NULL) != 0); if (__pyx_t_1) { __pyx_r = 0; goto __pyx_L0; goto __pyx_L3; } __pyx_L3:; /* "numpy.pxd":205 * * cdef int copy_shape, i, ndim * cdef int endian_detector = 1 # <<<<<<<<<<<<<< * cdef bint little_endian = ((&endian_detector)[0] != 0) * */ __pyx_v_endian_detector = 1; /* "numpy.pxd":206 * cdef int copy_shape, 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); /* "numpy.pxd":208 * cdef bint little_endian = ((&endian_detector)[0] != 0) * * ndim = PyArray_NDIM(self) # <<<<<<<<<<<<<< * * if sizeof(npy_intp) != sizeof(Py_ssize_t): */ __pyx_v_ndim = PyArray_NDIM(__pyx_v_self); /* "numpy.pxd":210 * ndim = PyArray_NDIM(self) * * if sizeof(npy_intp) != sizeof(Py_ssize_t): # <<<<<<<<<<<<<< * copy_shape = 1 * else: */ __pyx_t_1 = (((sizeof(npy_intp)) != (sizeof(Py_ssize_t))) != 0); if (__pyx_t_1) { /* "numpy.pxd":211 * * if sizeof(npy_intp) != sizeof(Py_ssize_t): * copy_shape = 1 # <<<<<<<<<<<<<< * else: * copy_shape = 0 */ __pyx_v_copy_shape = 1; goto __pyx_L4; } /*else*/ { /* "numpy.pxd":213 * copy_shape = 1 * else: * copy_shape = 0 # <<<<<<<<<<<<<< * * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) */ __pyx_v_copy_shape = 0; } __pyx_L4:; /* "numpy.pxd":215 * copy_shape = 0 * * 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_1 = (((__pyx_v_flags & PyBUF_C_CONTIGUOUS) == PyBUF_C_CONTIGUOUS) != 0); if (__pyx_t_1) { /* "numpy.pxd":216 * * 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_3 = __pyx_t_2; } else { __pyx_t_3 = __pyx_t_1; } if (__pyx_t_3) { /* "numpy.pxd":217 * 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_4 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_94), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 217; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[6]; __pyx_lineno = 217; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L5; } __pyx_L5:; /* "numpy.pxd":219 * 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_3 = (((__pyx_v_flags & PyBUF_F_CONTIGUOUS) == PyBUF_F_CONTIGUOUS) != 0); if (__pyx_t_3) { /* "numpy.pxd":220 * * 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_1 = ((!(PyArray_CHKFLAGS(__pyx_v_self, NPY_F_CONTIGUOUS) != 0)) != 0); __pyx_t_2 = __pyx_t_1; } else { __pyx_t_2 = __pyx_t_3; } if (__pyx_t_2) { /* "numpy.pxd":221 * 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_4 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_96), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 221; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[6]; __pyx_lineno = 221; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L6; } __pyx_L6:; /* "numpy.pxd":223 * raise ValueError(u"ndarray is not Fortran contiguous") * * info.buf = PyArray_DATA(self) # <<<<<<<<<<<<<< * info.ndim = ndim * if copy_shape: */ __pyx_v_info->buf = PyArray_DATA(__pyx_v_self); /* "numpy.pxd":224 * * info.buf = PyArray_DATA(self) * info.ndim = ndim # <<<<<<<<<<<<<< * if copy_shape: * # Allocate new buffer for strides and shape info. */ __pyx_v_info->ndim = __pyx_v_ndim; /* "numpy.pxd":225 * info.buf = PyArray_DATA(self) * info.ndim = ndim * if copy_shape: # <<<<<<<<<<<<<< * # Allocate new buffer for strides and shape info. * # This is allocated as one block, strides first. */ __pyx_t_2 = (__pyx_v_copy_shape != 0); if (__pyx_t_2) { /* "numpy.pxd":228 * # Allocate new buffer for strides and shape info. * # This is allocated as one block, strides first. * info.strides = stdlib.malloc(sizeof(Py_ssize_t) * ndim * 2) # <<<<<<<<<<<<<< * info.shape = info.strides + ndim * for i in range(ndim): */ __pyx_v_info->strides = ((Py_ssize_t *)malloc((((sizeof(Py_ssize_t)) * ((size_t)__pyx_v_ndim)) * 2))); /* "numpy.pxd":229 * # This is allocated as one block, strides first. * info.strides = stdlib.malloc(sizeof(Py_ssize_t) * ndim * 2) * 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); /* "numpy.pxd":230 * info.strides = stdlib.malloc(sizeof(Py_ssize_t) * ndim * 2) * 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_5 = __pyx_v_ndim; for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) { __pyx_v_i = __pyx_t_6; /* "numpy.pxd":231 * 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]); /* "numpy.pxd":232 * 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]); } goto __pyx_L7; } /*else*/ { /* "numpy.pxd":234 * info.shape[i] = PyArray_DIMS(self)[i] * else: * info.strides = PyArray_STRIDES(self) # <<<<<<<<<<<<<< * info.shape = PyArray_DIMS(self) * info.suboffsets = NULL */ __pyx_v_info->strides = ((Py_ssize_t *)PyArray_STRIDES(__pyx_v_self)); /* "numpy.pxd":235 * 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_L7:; /* "numpy.pxd":236 * 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; /* "numpy.pxd":237 * 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); /* "numpy.pxd":238 * 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)); /* "numpy.pxd":241 * * cdef int t * cdef char* f = NULL # <<<<<<<<<<<<<< * cdef dtype descr = self.descr * cdef list stack */ __pyx_v_f = NULL; /* "numpy.pxd":242 * cdef int t * cdef char* f = NULL * cdef dtype descr = self.descr # <<<<<<<<<<<<<< * cdef list stack * cdef int offset */ __pyx_t_4 = ((PyObject *)__pyx_v_self->descr); __Pyx_INCREF(__pyx_t_4); __pyx_v_descr = ((PyArray_Descr *)__pyx_t_4); __pyx_t_4 = 0; /* "numpy.pxd":246 * cdef int offset * * cdef bint hasfields = PyDataType_HASFIELDS(descr) # <<<<<<<<<<<<<< * * if not hasfields and not copy_shape: */ __pyx_v_hasfields = PyDataType_HASFIELDS(__pyx_v_descr); /* "numpy.pxd":248 * cdef bint hasfields = PyDataType_HASFIELDS(descr) * * if not hasfields and not copy_shape: # <<<<<<<<<<<<<< * # do not call releasebuffer * info.obj = None */ __pyx_t_2 = ((!(__pyx_v_hasfields != 0)) != 0); if (__pyx_t_2) { __pyx_t_3 = ((!(__pyx_v_copy_shape != 0)) != 0); __pyx_t_1 = __pyx_t_3; } else { __pyx_t_1 = __pyx_t_2; } if (__pyx_t_1) { /* "numpy.pxd":250 * if not hasfields and not copy_shape: * # do not call releasebuffer * info.obj = None # <<<<<<<<<<<<<< * else: * # need to call releasebuffer */ __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_info->obj); __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = Py_None; goto __pyx_L10; } /*else*/ { /* "numpy.pxd":253 * else: * # need to call releasebuffer * info.obj = self # <<<<<<<<<<<<<< * * if not hasfields: */ __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); } __pyx_L10:; /* "numpy.pxd":255 * info.obj = self * * if not hasfields: # <<<<<<<<<<<<<< * t = descr.type_num * if ((descr.byteorder == '>' and little_endian) or */ __pyx_t_1 = ((!(__pyx_v_hasfields != 0)) != 0); if (__pyx_t_1) { /* "numpy.pxd":256 * * if not hasfields: * t = descr.type_num # <<<<<<<<<<<<<< * if ((descr.byteorder == '>' and little_endian) or * (descr.byteorder == '<' and not little_endian)): */ __pyx_t_5 = __pyx_v_descr->type_num; __pyx_v_t = __pyx_t_5; /* "numpy.pxd":257 * if not hasfields: * t = descr.type_num * if ((descr.byteorder == '>' and little_endian) or # <<<<<<<<<<<<<< * (descr.byteorder == '<' and not little_endian)): * raise ValueError(u"Non-native byte order not supported") */ __pyx_t_1 = ((__pyx_v_descr->byteorder == '>') != 0); if (__pyx_t_1) { __pyx_t_2 = (__pyx_v_little_endian != 0); } else { __pyx_t_2 = __pyx_t_1; } if (!__pyx_t_2) { /* "numpy.pxd":258 * t = descr.type_num * if ((descr.byteorder == '>' and little_endian) or * (descr.byteorder == '<' and not little_endian)): # <<<<<<<<<<<<<< * raise ValueError(u"Non-native byte order not supported") * if t == NPY_BYTE: f = "b" */ __pyx_t_1 = ((__pyx_v_descr->byteorder == '<') != 0); if (__pyx_t_1) { __pyx_t_3 = ((!(__pyx_v_little_endian != 0)) != 0); __pyx_t_7 = __pyx_t_3; } else { __pyx_t_7 = __pyx_t_1; } __pyx_t_1 = __pyx_t_7; } else { __pyx_t_1 = __pyx_t_2; } if (__pyx_t_1) { /* "numpy.pxd":259 * if ((descr.byteorder == '>' and little_endian) or * (descr.byteorder == '<' 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_4 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_98), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 259; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[6]; __pyx_lineno = 259; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L12; } __pyx_L12:; /* "numpy.pxd":276 * 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) */ switch (__pyx_v_t) { /* "numpy.pxd":260 * (descr.byteorder == '<' 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" */ case NPY_BYTE: __pyx_v_f = __pyx_k__b; break; /* "numpy.pxd":261 * 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 = __pyx_k__B; break; /* "numpy.pxd":262 * 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 = __pyx_k__h; break; /* "numpy.pxd":263 * 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 = __pyx_k__H; break; /* "numpy.pxd":264 * 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 = __pyx_k__i; break; /* "numpy.pxd":265 * 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 = __pyx_k__I; break; /* "numpy.pxd":266 * 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 = __pyx_k__l; break; /* "numpy.pxd":267 * 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 = __pyx_k__L; break; /* "numpy.pxd":268 * 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 = __pyx_k__q; break; /* "numpy.pxd":269 * 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 = __pyx_k__Q; break; /* "numpy.pxd":270 * 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 = __pyx_k__f; break; /* "numpy.pxd":271 * 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 = __pyx_k__d; break; /* "numpy.pxd":272 * 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 = __pyx_k__g; break; /* "numpy.pxd":273 * 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 = __pyx_k__Zf; break; /* "numpy.pxd":274 * 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 = __pyx_k__Zd; break; /* "numpy.pxd":275 * 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 = __pyx_k__Zg; break; /* "numpy.pxd":276 * 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 = __pyx_k__O; break; default: /* "numpy.pxd":278 * elif t == NPY_OBJECT: f = "O" * else: * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) # <<<<<<<<<<<<<< * info.format = f * return */ __pyx_t_4 = PyInt_FromLong(__pyx_v_t); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 278; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_8 = PyNumber_Remainder(((PyObject *)__pyx_kp_u_99), __pyx_t_4); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 278; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_8)); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 278; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_t_8)); __Pyx_GIVEREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0; __pyx_t_8 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 278; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __Pyx_Raise(__pyx_t_8, 0, 0, 0); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; {__pyx_filename = __pyx_f[6]; __pyx_lineno = 278; __pyx_clineno = __LINE__; goto __pyx_L1_error;} break; } /* "numpy.pxd":279 * else: * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) * info.format = f # <<<<<<<<<<<<<< * return * else: */ __pyx_v_info->format = __pyx_v_f; /* "numpy.pxd":280 * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) * info.format = f * return # <<<<<<<<<<<<<< * else: * info.format = stdlib.malloc(_buffer_format_string_len) */ __pyx_r = 0; goto __pyx_L0; goto __pyx_L11; } /*else*/ { /* "numpy.pxd":282 * return * else: * info.format = stdlib.malloc(_buffer_format_string_len) # <<<<<<<<<<<<<< * info.format[0] = '^' # Native data types, manual alignment * offset = 0 */ __pyx_v_info->format = ((char *)malloc(255)); /* "numpy.pxd":283 * else: * info.format = stdlib.malloc(_buffer_format_string_len) * info.format[0] = '^' # Native data types, manual alignment # <<<<<<<<<<<<<< * offset = 0 * f = _util_dtypestring(descr, info.format + 1, */ (__pyx_v_info->format[0]) = '^'; /* "numpy.pxd":284 * info.format = stdlib.malloc(_buffer_format_string_len) * info.format[0] = '^' # Native data types, manual alignment * offset = 0 # <<<<<<<<<<<<<< * f = _util_dtypestring(descr, info.format + 1, * info.format + _buffer_format_string_len, */ __pyx_v_offset = 0; /* "numpy.pxd":287 * f = _util_dtypestring(descr, info.format + 1, * info.format + _buffer_format_string_len, * &offset) # <<<<<<<<<<<<<< * f[0] = 0 # Terminate format string * */ __pyx_t_9 = __pyx_f_5numpy__util_dtypestring(__pyx_v_descr, (__pyx_v_info->format + 1), (__pyx_v_info->format + 255), (&__pyx_v_offset)); if (unlikely(__pyx_t_9 == NULL)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 285; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_f = __pyx_t_9; /* "numpy.pxd":288 * info.format + _buffer_format_string_len, * &offset) * f[0] = 0 # Terminate format string # <<<<<<<<<<<<<< * * def __releasebuffer__(ndarray self, Py_buffer* info): */ (__pyx_v_f[0]) = 0; } __pyx_L11:; __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_8); __Pyx_AddTraceback("numpy.ndarray.__getbuffer__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; if (__pyx_v_info != NULL && __pyx_v_info->obj != NULL) { __Pyx_GOTREF(__pyx_v_info->obj); __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = NULL; } goto __pyx_L2; __pyx_L0:; if (__pyx_v_info != NULL && __pyx_v_info->obj == Py_None) { __Pyx_GOTREF(Py_None); __Pyx_DECREF(Py_None); __pyx_v_info->obj = NULL; } __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_descr); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* 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)); __Pyx_RefNannyFinishContext(); } /* "numpy.pxd":290 * f[0] = 0 # Terminate format string * * def __releasebuffer__(ndarray self, Py_buffer* info): # <<<<<<<<<<<<<< * if PyArray_HASFIELDS(self): * stdlib.free(info.format) */ 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); /* "numpy.pxd":291 * * def __releasebuffer__(ndarray self, Py_buffer* info): * if PyArray_HASFIELDS(self): # <<<<<<<<<<<<<< * stdlib.free(info.format) * if sizeof(npy_intp) != sizeof(Py_ssize_t): */ __pyx_t_1 = (PyArray_HASFIELDS(__pyx_v_self) != 0); if (__pyx_t_1) { /* "numpy.pxd":292 * def __releasebuffer__(ndarray self, Py_buffer* info): * if PyArray_HASFIELDS(self): * stdlib.free(info.format) # <<<<<<<<<<<<<< * if sizeof(npy_intp) != sizeof(Py_ssize_t): * stdlib.free(info.strides) */ free(__pyx_v_info->format); goto __pyx_L3; } __pyx_L3:; /* "numpy.pxd":293 * if PyArray_HASFIELDS(self): * stdlib.free(info.format) * if sizeof(npy_intp) != sizeof(Py_ssize_t): # <<<<<<<<<<<<<< * stdlib.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) { /* "numpy.pxd":294 * stdlib.free(info.format) * if sizeof(npy_intp) != sizeof(Py_ssize_t): * stdlib.free(info.strides) # <<<<<<<<<<<<<< * # info.shape was stored after info.strides in the same block * */ free(__pyx_v_info->strides); goto __pyx_L4; } __pyx_L4:; __Pyx_RefNannyFinishContext(); } /* "numpy.pxd":772 * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PyArray_MultiIterNew1", 0); /* "numpy.pxd":773 * * 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_filename = __pyx_f[6]; __pyx_lineno = 773; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __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; } /* "numpy.pxd":775 * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PyArray_MultiIterNew2", 0); /* "numpy.pxd":776 * * 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_filename = __pyx_f[6]; __pyx_lineno = 776; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __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; } /* "numpy.pxd":778 * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PyArray_MultiIterNew3", 0); /* "numpy.pxd":779 * * 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_filename = __pyx_f[6]; __pyx_lineno = 779; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __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; } /* "numpy.pxd":781 * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PyArray_MultiIterNew4", 0); /* "numpy.pxd":782 * * 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_filename = __pyx_f[6]; __pyx_lineno = 782; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __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; } /* "numpy.pxd":784 * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PyArray_MultiIterNew5", 0); /* "numpy.pxd":785 * * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): * return PyArray_MultiIterNew(5, a, b, c, d, e) # <<<<<<<<<<<<<< * * cdef inline char* _util_dtypestring(dtype descr, char* f, char* end, int* offset) except NULL: */ __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_filename = __pyx_f[6]; __pyx_lineno = 785; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __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; } /* "numpy.pxd":787 * return PyArray_MultiIterNew(5, a, b, c, d, e) * * 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; PyObject *__pyx_t_5 = NULL; PyObject *(*__pyx_t_6)(PyObject *); int __pyx_t_7; int __pyx_t_8; int __pyx_t_9; int __pyx_t_10; long __pyx_t_11; char *__pyx_t_12; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_util_dtypestring", 0); /* "numpy.pxd":794 * cdef int delta_offset * cdef tuple i * cdef int endian_detector = 1 # <<<<<<<<<<<<<< * cdef bint little_endian = ((&endian_detector)[0] != 0) * cdef tuple fields */ __pyx_v_endian_detector = 1; /* "numpy.pxd":795 * cdef tuple i * 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); /* "numpy.pxd":798 * cdef tuple fields * * for childname in descr.names: # <<<<<<<<<<<<<< * fields = descr.fields[childname] * child, new_offset = fields */ if (unlikely(((PyObject *)__pyx_v_descr->names) == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); {__pyx_filename = __pyx_f[6]; __pyx_lineno = 798; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_1 = ((PyObject *)__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_COMPILING_IN_CPYTHON __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_filename = __pyx_f[6]; __pyx_lineno = 798; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 798; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif __Pyx_XDECREF_SET(__pyx_v_childname, __pyx_t_3); __pyx_t_3 = 0; /* "numpy.pxd":799 * * for childname in descr.names: * fields = descr.fields[childname] # <<<<<<<<<<<<<< * child, new_offset = fields * */ __pyx_t_3 = PyObject_GetItem(__pyx_v_descr->fields, __pyx_v_childname); if (!__pyx_t_3) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 799; __pyx_clineno = __LINE__; goto __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 tuple, got %.200s", Py_TYPE(__pyx_t_3)->tp_name), 0))) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 799; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_XDECREF_SET(__pyx_v_fields, ((PyObject*)__pyx_t_3)); __pyx_t_3 = 0; /* "numpy.pxd":800 * for childname in descr.names: * fields = descr.fields[childname] * child, new_offset = fields # <<<<<<<<<<<<<< * * if (end - f) - (new_offset - offset[0]) < 15: */ if (likely(PyTuple_CheckExact(((PyObject *)__pyx_v_fields)))) { PyObject* sequence = ((PyObject *)__pyx_v_fields); #if CYTHON_COMPILING_IN_CPYTHON Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); {__pyx_filename = __pyx_f[6]; __pyx_lineno = 800; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON __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_filename = __pyx_f[6]; __pyx_lineno = 800; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 800; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); #endif } else if (1) { __Pyx_RaiseNoneNotIterableError(); {__pyx_filename = __pyx_f[6]; __pyx_lineno = 800; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } else { Py_ssize_t index = -1; __pyx_t_5 = PyObject_GetIter(((PyObject *)__pyx_v_fields)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 800; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = Py_TYPE(__pyx_t_5)->tp_iternext; index = 0; __pyx_t_3 = __pyx_t_6(__pyx_t_5); if (unlikely(!__pyx_t_3)) goto __pyx_L5_unpacking_failed; __Pyx_GOTREF(__pyx_t_3); index = 1; __pyx_t_4 = __pyx_t_6(__pyx_t_5); if (unlikely(!__pyx_t_4)) goto __pyx_L5_unpacking_failed; __Pyx_GOTREF(__pyx_t_4); if (__Pyx_IternextUnpackEndCheck(__pyx_t_6(__pyx_t_5), 2) < 0) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 800; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_6 = NULL; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; goto __pyx_L6_unpacking_done; __pyx_L5_unpacking_failed:; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_6 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); {__pyx_filename = __pyx_f[6]; __pyx_lineno = 800; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_L6_unpacking_done:; } if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_dtype))))) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 800; __pyx_clineno = __LINE__; goto __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; /* "numpy.pxd":802 * 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 = PyInt_FromLong((__pyx_v_end - __pyx_v_f)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 802; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = PyInt_FromLong((__pyx_v_offset[0])); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 802; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = PyNumber_Subtract(__pyx_v_new_offset, __pyx_t_3); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 802; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyNumber_Subtract(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 802; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyObject_RichCompare(__pyx_t_3, __pyx_int_15, Py_LT); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 802; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 802; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_7) { /* "numpy.pxd":803 * * if (end - f) - (new_offset - offset[0]) < 15: * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") # <<<<<<<<<<<<<< * * if ((child.byteorder == '>' and little_endian) or */ __pyx_t_5 = PyObject_Call(__pyx_builtin_RuntimeError, ((PyObject *)__pyx_k_tuple_101), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 803; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_Raise(__pyx_t_5, 0, 0, 0); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; {__pyx_filename = __pyx_f[6]; __pyx_lineno = 803; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L7; } __pyx_L7:; /* "numpy.pxd":805 * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") * * if ((child.byteorder == '>' and little_endian) or # <<<<<<<<<<<<<< * (child.byteorder == '<' 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) { __pyx_t_8 = (__pyx_v_little_endian != 0); } else { __pyx_t_8 = __pyx_t_7; } if (!__pyx_t_8) { /* "numpy.pxd":806 * * if ((child.byteorder == '>' and little_endian) or * (child.byteorder == '<' 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) { __pyx_t_9 = ((!(__pyx_v_little_endian != 0)) != 0); __pyx_t_10 = __pyx_t_9; } else { __pyx_t_10 = __pyx_t_7; } __pyx_t_7 = __pyx_t_10; } else { __pyx_t_7 = __pyx_t_8; } if (__pyx_t_7) { /* "numpy.pxd":807 * if ((child.byteorder == '>' and little_endian) or * (child.byteorder == '<' 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_5 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_102), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 807; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_Raise(__pyx_t_5, 0, 0, 0); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; {__pyx_filename = __pyx_f[6]; __pyx_lineno = 807; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L8; } __pyx_L8:; /* "numpy.pxd":817 * * # Output padding bytes * while offset[0] < new_offset: # <<<<<<<<<<<<<< * f[0] = 120 # "x"; pad byte * f += 1 */ while (1) { __pyx_t_5 = PyInt_FromLong((__pyx_v_offset[0])); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 817; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = PyObject_RichCompare(__pyx_t_5, __pyx_v_new_offset, Py_LT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 817; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 817; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (!__pyx_t_7) break; /* "numpy.pxd":818 * # Output padding bytes * while offset[0] < new_offset: * f[0] = 120 # "x"; pad byte # <<<<<<<<<<<<<< * f += 1 * offset[0] += 1 */ (__pyx_v_f[0]) = 120; /* "numpy.pxd":819 * while offset[0] < new_offset: * f[0] = 120 # "x"; pad byte * f += 1 # <<<<<<<<<<<<<< * offset[0] += 1 * */ __pyx_v_f = (__pyx_v_f + 1); /* "numpy.pxd":820 * f[0] = 120 # "x"; pad byte * f += 1 * offset[0] += 1 # <<<<<<<<<<<<<< * * offset[0] += child.itemsize */ __pyx_t_11 = 0; (__pyx_v_offset[__pyx_t_11]) = ((__pyx_v_offset[__pyx_t_11]) + 1); } /* "numpy.pxd":822 * offset[0] += 1 * * offset[0] += child.itemsize # <<<<<<<<<<<<<< * * if not PyDataType_HASFIELDS(child): */ __pyx_t_11 = 0; (__pyx_v_offset[__pyx_t_11]) = ((__pyx_v_offset[__pyx_t_11]) + __pyx_v_child->elsize); /* "numpy.pxd":824 * offset[0] += child.itemsize * * if not PyDataType_HASFIELDS(child): # <<<<<<<<<<<<<< * t = child.type_num * if end - f < 5: */ __pyx_t_7 = ((!(PyDataType_HASFIELDS(__pyx_v_child) != 0)) != 0); if (__pyx_t_7) { /* "numpy.pxd":825 * * if not PyDataType_HASFIELDS(child): * t = child.type_num # <<<<<<<<<<<<<< * if end - f < 5: * raise RuntimeError(u"Format string allocated too short.") */ __pyx_t_3 = PyInt_FromLong(__pyx_v_child->type_num); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 825; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_XDECREF_SET(__pyx_v_t, __pyx_t_3); __pyx_t_3 = 0; /* "numpy.pxd":826 * if not PyDataType_HASFIELDS(child): * t = child.type_num * if end - f < 5: # <<<<<<<<<<<<<< * raise RuntimeError(u"Format string allocated too short.") * */ __pyx_t_7 = (((__pyx_v_end - __pyx_v_f) < 5) != 0); if (__pyx_t_7) { /* "numpy.pxd":827 * 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_3 = PyObject_Call(__pyx_builtin_RuntimeError, ((PyObject *)__pyx_k_tuple_104), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 827; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[6]; __pyx_lineno = 827; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L12; } __pyx_L12:; /* "numpy.pxd":830 * * # 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_3 = PyInt_FromLong(NPY_BYTE); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 830; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 830; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 830; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_7) { (__pyx_v_f[0]) = 98; goto __pyx_L13; } /* "numpy.pxd":831 * # 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_5 = PyInt_FromLong(NPY_UBYTE); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 831; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 831; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 831; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_7) { (__pyx_v_f[0]) = 66; goto __pyx_L13; } /* "numpy.pxd":832 * 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_3 = PyInt_FromLong(NPY_SHORT); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 832; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 832; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 832; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_7) { (__pyx_v_f[0]) = 104; goto __pyx_L13; } /* "numpy.pxd":833 * 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_5 = PyInt_FromLong(NPY_USHORT); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 833; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 833; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 833; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_7) { (__pyx_v_f[0]) = 72; goto __pyx_L13; } /* "numpy.pxd":834 * 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_3 = PyInt_FromLong(NPY_INT); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 834; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 834; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 834; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_7) { (__pyx_v_f[0]) = 105; goto __pyx_L13; } /* "numpy.pxd":835 * 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_5 = PyInt_FromLong(NPY_UINT); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 835; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 835; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 835; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_7) { (__pyx_v_f[0]) = 73; goto __pyx_L13; } /* "numpy.pxd":836 * 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_3 = PyInt_FromLong(NPY_LONG); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 836; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 836; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 836; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_7) { (__pyx_v_f[0]) = 108; goto __pyx_L13; } /* "numpy.pxd":837 * 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_5 = PyInt_FromLong(NPY_ULONG); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 837; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 837; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 837; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_7) { (__pyx_v_f[0]) = 76; goto __pyx_L13; } /* "numpy.pxd":838 * 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_3 = PyInt_FromLong(NPY_LONGLONG); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 838; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 838; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 838; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_7) { (__pyx_v_f[0]) = 113; goto __pyx_L13; } /* "numpy.pxd":839 * 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_5 = PyInt_FromLong(NPY_ULONGLONG); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 839; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 839; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 839; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_7) { (__pyx_v_f[0]) = 81; goto __pyx_L13; } /* "numpy.pxd":840 * 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_3 = PyInt_FromLong(NPY_FLOAT); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 840; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 840; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 840; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_7) { (__pyx_v_f[0]) = 102; goto __pyx_L13; } /* "numpy.pxd":841 * 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_5 = PyInt_FromLong(NPY_DOUBLE); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 841; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 841; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 841; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_7) { (__pyx_v_f[0]) = 100; goto __pyx_L13; } /* "numpy.pxd":842 * 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_3 = PyInt_FromLong(NPY_LONGDOUBLE); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 842; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 842; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 842; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_7) { (__pyx_v_f[0]) = 103; goto __pyx_L13; } /* "numpy.pxd":843 * 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_5 = PyInt_FromLong(NPY_CFLOAT); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 843; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 843; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 843; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_7) { (__pyx_v_f[0]) = 90; (__pyx_v_f[1]) = 102; __pyx_v_f = (__pyx_v_f + 1); goto __pyx_L13; } /* "numpy.pxd":844 * 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_3 = PyInt_FromLong(NPY_CDOUBLE); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 844; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 844; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 844; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_7) { (__pyx_v_f[0]) = 90; (__pyx_v_f[1]) = 100; __pyx_v_f = (__pyx_v_f + 1); goto __pyx_L13; } /* "numpy.pxd":845 * 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_5 = PyInt_FromLong(NPY_CLONGDOUBLE); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 845; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 845; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 845; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_7) { (__pyx_v_f[0]) = 90; (__pyx_v_f[1]) = 103; __pyx_v_f = (__pyx_v_f + 1); goto __pyx_L13; } /* "numpy.pxd":846 * 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_3 = PyInt_FromLong(NPY_OBJECT); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 846; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 846; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 846; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_7) { (__pyx_v_f[0]) = 79; goto __pyx_L13; } /*else*/ { /* "numpy.pxd":848 * elif t == NPY_OBJECT: f[0] = 79 #"O" * else: * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) # <<<<<<<<<<<<<< * f += 1 * else: */ __pyx_t_5 = PyNumber_Remainder(((PyObject *)__pyx_kp_u_99), __pyx_v_t); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 848; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_5)); __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 848; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_t_5)); __Pyx_GIVEREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; __pyx_t_5 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 848; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; __Pyx_Raise(__pyx_t_5, 0, 0, 0); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; {__pyx_filename = __pyx_f[6]; __pyx_lineno = 848; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_L13:; /* "numpy.pxd":849 * 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); goto __pyx_L11; } /*else*/ { /* "numpy.pxd":853 * # Cython ignores struct boundary information ("T{...}"), * # so don't output it * f = _util_dtypestring(child, f, end, offset) # <<<<<<<<<<<<<< * return f * */ __pyx_t_12 = __pyx_f_5numpy__util_dtypestring(__pyx_v_child, __pyx_v_f, __pyx_v_end, __pyx_v_offset); if (unlikely(__pyx_t_12 == NULL)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 853; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_f = __pyx_t_12; } __pyx_L11:; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "numpy.pxd":854 * # so don't output it * f = _util_dtypestring(child, f, end, offset) * return f # <<<<<<<<<<<<<< * * */ __pyx_r = __pyx_v_f; goto __pyx_L0; __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("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; } /* "numpy.pxd":969 * * * 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); /* "numpy.pxd":971 * 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) { /* "numpy.pxd":972 * cdef PyObject* baseptr * if base is None: * baseptr = NULL # <<<<<<<<<<<<<< * else: * Py_INCREF(base) # important to do this before decref below! */ __pyx_v_baseptr = NULL; goto __pyx_L3; } /*else*/ { /* "numpy.pxd":974 * baseptr = NULL * else: * Py_INCREF(base) # important to do this before decref below! # <<<<<<<<<<<<<< * baseptr = base * Py_XDECREF(arr.base) */ Py_INCREF(__pyx_v_base); /* "numpy.pxd":975 * 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:; /* "numpy.pxd":976 * 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); /* "numpy.pxd":977 * baseptr = base * Py_XDECREF(arr.base) * arr.base = baseptr # <<<<<<<<<<<<<< * * cdef inline object get_array_base(ndarray arr): */ __pyx_v_arr->base = __pyx_v_baseptr; __Pyx_RefNannyFinishContext(); } /* "numpy.pxd":979 * 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); /* "numpy.pxd":980 * * 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) { /* "numpy.pxd":981 * cdef inline object get_array_base(ndarray arr): * if arr.base is NULL: * return None # <<<<<<<<<<<<<< * else: * return arr.base */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(Py_None); __pyx_r = Py_None; goto __pyx_L0; goto __pyx_L3; } /*else*/ { /* "numpy.pxd":983 * return None * else: * return arr.base # <<<<<<<<<<<<<< */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_arr->base)); __pyx_r = ((PyObject *)__pyx_v_arr->base); goto __pyx_L0; } __pyx_L3:; __pyx_r = Py_None; __Pyx_INCREF(Py_None); __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } static struct __pyx_obj_6pandas_3lib___pyx_scope_struct_1_try_parse_date_and_time *__pyx_freelist_6pandas_3lib___pyx_scope_struct_1_try_parse_date_and_time[8]; static int __pyx_freecount_6pandas_3lib___pyx_scope_struct_1_try_parse_date_and_time = 0; static PyObject *__pyx_tp_new_6pandas_3lib___pyx_scope_struct_1_try_parse_date_and_time(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { struct __pyx_obj_6pandas_3lib___pyx_scope_struct_1_try_parse_date_and_time *p; PyObject *o; if (likely((__pyx_freecount_6pandas_3lib___pyx_scope_struct_1_try_parse_date_and_time > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_6pandas_3lib___pyx_scope_struct_1_try_parse_date_and_time)))) { o = (PyObject*)__pyx_freelist_6pandas_3lib___pyx_scope_struct_1_try_parse_date_and_time[--__pyx_freecount_6pandas_3lib___pyx_scope_struct_1_try_parse_date_and_time]; memset(o, 0, sizeof(struct __pyx_obj_6pandas_3lib___pyx_scope_struct_1_try_parse_date_and_time)); PyObject_INIT(o, t); PyObject_GC_Track(o); } else { o = (*t->tp_alloc)(t, 0); if (unlikely(!o)) return 0; } p = ((struct __pyx_obj_6pandas_3lib___pyx_scope_struct_1_try_parse_date_and_time *)o); p->__pyx_v_date = 0; p->__pyx_v_dayfirst = 0; p->__pyx_v_default = 0; p->__pyx_v_parse = 0; p->__pyx_v_time = 0; return o; } static void __pyx_tp_dealloc_6pandas_3lib___pyx_scope_struct_1_try_parse_date_and_time(PyObject *o) { struct __pyx_obj_6pandas_3lib___pyx_scope_struct_1_try_parse_date_and_time *p = (struct __pyx_obj_6pandas_3lib___pyx_scope_struct_1_try_parse_date_and_time *)o; PyObject_GC_UnTrack(o); Py_CLEAR(p->__pyx_v_date); Py_CLEAR(p->__pyx_v_dayfirst); Py_CLEAR(p->__pyx_v_default); Py_CLEAR(p->__pyx_v_parse); Py_CLEAR(p->__pyx_v_time); if ((__pyx_freecount_6pandas_3lib___pyx_scope_struct_1_try_parse_date_and_time < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_6pandas_3lib___pyx_scope_struct_1_try_parse_date_and_time))) { __pyx_freelist_6pandas_3lib___pyx_scope_struct_1_try_parse_date_and_time[__pyx_freecount_6pandas_3lib___pyx_scope_struct_1_try_parse_date_and_time++] = ((struct __pyx_obj_6pandas_3lib___pyx_scope_struct_1_try_parse_date_and_time *)o); } else { (*Py_TYPE(o)->tp_free)(o); } } static int __pyx_tp_traverse_6pandas_3lib___pyx_scope_struct_1_try_parse_date_and_time(PyObject *o, visitproc v, void *a) { int e; struct __pyx_obj_6pandas_3lib___pyx_scope_struct_1_try_parse_date_and_time *p = (struct __pyx_obj_6pandas_3lib___pyx_scope_struct_1_try_parse_date_and_time *)o; if (p->__pyx_v_date) { e = (*v)(p->__pyx_v_date, a); if (e) return e; } if (p->__pyx_v_dayfirst) { e = (*v)(p->__pyx_v_dayfirst, a); if (e) return e; } if (p->__pyx_v_default) { e = (*v)(p->__pyx_v_default, a); if (e) return e; } if (p->__pyx_v_parse) { e = (*v)(p->__pyx_v_parse, a); if (e) return e; } if (p->__pyx_v_time) { e = (*v)(p->__pyx_v_time, a); if (e) return e; } return 0; } static int __pyx_tp_clear_6pandas_3lib___pyx_scope_struct_1_try_parse_date_and_time(PyObject *o) { struct __pyx_obj_6pandas_3lib___pyx_scope_struct_1_try_parse_date_and_time *p = (struct __pyx_obj_6pandas_3lib___pyx_scope_struct_1_try_parse_date_and_time *)o; PyObject* tmp; tmp = ((PyObject*)p->__pyx_v_date); p->__pyx_v_date = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->__pyx_v_dayfirst); p->__pyx_v_dayfirst = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->__pyx_v_default); p->__pyx_v_default = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->__pyx_v_parse); p->__pyx_v_parse = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->__pyx_v_time); p->__pyx_v_time = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); return 0; } static PyMethodDef __pyx_methods_6pandas_3lib___pyx_scope_struct_1_try_parse_date_and_time[] = { {0, 0, 0, 0} }; static PyTypeObject __pyx_type_6pandas_3lib___pyx_scope_struct_1_try_parse_date_and_time = { PyVarObject_HEAD_INIT(0, 0) __Pyx_NAMESTR("pandas.lib.__pyx_scope_struct_1_try_parse_date_and_time"), /*tp_name*/ sizeof(struct __pyx_obj_6pandas_3lib___pyx_scope_struct_1_try_parse_date_and_time), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_6pandas_3lib___pyx_scope_struct_1_try_parse_date_and_time, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #else 0, /*reserved*/ #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_HAVE_GC, /*tp_flags*/ 0, /*tp_doc*/ __pyx_tp_traverse_6pandas_3lib___pyx_scope_struct_1_try_parse_date_and_time, /*tp_traverse*/ __pyx_tp_clear_6pandas_3lib___pyx_scope_struct_1_try_parse_date_and_time, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_6pandas_3lib___pyx_scope_struct_1_try_parse_date_and_time, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_6pandas_3lib___pyx_scope_struct_1_try_parse_date_and_time, /*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*/ #if PY_VERSION_HEX >= 0x02060000 0, /*tp_version_tag*/ #endif #if PY_VERSION_HEX >= 0x030400a1 && defined(Py_TPFLAGS_HAVE_FINALIZE) 0, /*tp_finalize*/ #endif }; static PyObject *__pyx_tp_new_6pandas_3lib_Reducer(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { struct __pyx_obj_6pandas_3lib_Reducer *p; PyObject *o; o = (*t->tp_alloc)(t, 0); if (unlikely(!o)) return 0; p = ((struct __pyx_obj_6pandas_3lib_Reducer *)o); p->arr = Py_None; Py_INCREF(Py_None); p->dummy = Py_None; Py_INCREF(Py_None); p->f = Py_None; Py_INCREF(Py_None); p->labels = Py_None; Py_INCREF(Py_None); p->typ = Py_None; Py_INCREF(Py_None); p->index = Py_None; Py_INCREF(Py_None); return o; } static void __pyx_tp_dealloc_6pandas_3lib_Reducer(PyObject *o) { struct __pyx_obj_6pandas_3lib_Reducer *p = (struct __pyx_obj_6pandas_3lib_Reducer *)o; PyObject_GC_UnTrack(o); Py_CLEAR(p->arr); Py_CLEAR(p->dummy); Py_CLEAR(p->f); Py_CLEAR(p->labels); Py_CLEAR(p->typ); Py_CLEAR(p->index); (*Py_TYPE(o)->tp_free)(o); } static int __pyx_tp_traverse_6pandas_3lib_Reducer(PyObject *o, visitproc v, void *a) { int e; struct __pyx_obj_6pandas_3lib_Reducer *p = (struct __pyx_obj_6pandas_3lib_Reducer *)o; if (p->arr) { e = (*v)(p->arr, a); if (e) return e; } if (p->dummy) { e = (*v)(p->dummy, a); if (e) return e; } if (p->f) { e = (*v)(p->f, a); if (e) return e; } if (p->labels) { e = (*v)(p->labels, a); if (e) return e; } if (p->typ) { e = (*v)(p->typ, a); if (e) return e; } if (p->index) { e = (*v)(p->index, a); if (e) return e; } return 0; } static int __pyx_tp_clear_6pandas_3lib_Reducer(PyObject *o) { struct __pyx_obj_6pandas_3lib_Reducer *p = (struct __pyx_obj_6pandas_3lib_Reducer *)o; PyObject* tmp; tmp = ((PyObject*)p->arr); p->arr = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->dummy); p->dummy = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->f); p->f = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->labels); p->labels = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->typ); p->typ = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->index); p->index = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); return 0; } static PyMethodDef __pyx_methods_6pandas_3lib_Reducer[] = { {__Pyx_NAMESTR("_check_dummy"), (PyCFunction)__pyx_pw_6pandas_3lib_7Reducer_3_check_dummy, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}, {__Pyx_NAMESTR("get_result"), (PyCFunction)__pyx_pw_6pandas_3lib_7Reducer_5get_result, METH_NOARGS, __Pyx_DOCSTR(0)}, {__Pyx_NAMESTR("_get_result_array"), (PyCFunction)__pyx_pw_6pandas_3lib_7Reducer_7_get_result_array, METH_O, __Pyx_DOCSTR(0)}, {0, 0, 0, 0} }; static PyTypeObject __pyx_type_6pandas_3lib_Reducer = { PyVarObject_HEAD_INIT(0, 0) __Pyx_NAMESTR("pandas.lib.Reducer"), /*tp_name*/ sizeof(struct __pyx_obj_6pandas_3lib_Reducer), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_6pandas_3lib_Reducer, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #else 0, /*reserved*/ #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*/ __Pyx_DOCSTR("\n Performs generic reduction operation on a C or Fortran-contiguous ndarray\n while avoiding ndarray construction overhead\n "), /*tp_doc*/ __pyx_tp_traverse_6pandas_3lib_Reducer, /*tp_traverse*/ __pyx_tp_clear_6pandas_3lib_Reducer, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_6pandas_3lib_Reducer, /*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_3lib_7Reducer_1__init__, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_6pandas_3lib_Reducer, /*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*/ #if PY_VERSION_HEX >= 0x02060000 0, /*tp_version_tag*/ #endif #if PY_VERSION_HEX >= 0x030400a1 && defined(Py_TPFLAGS_HAVE_FINALIZE) 0, /*tp_finalize*/ #endif }; static PyObject *__pyx_tp_new_6pandas_3lib_AxisProperty(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { PyObject *o; o = (*t->tp_alloc)(t, 0); if (unlikely(!o)) return 0; return o; } static void __pyx_tp_dealloc_6pandas_3lib_AxisProperty(PyObject *o) { (*Py_TYPE(o)->tp_free)(o); } static PyObject *__pyx_tp_descr_get_6pandas_3lib_AxisProperty(PyObject *o, PyObject *i, PyObject *c) { PyObject *r = 0; if (!i) i = Py_None; if (!c) c = Py_None; r = __pyx_pw_6pandas_3lib_12AxisProperty_3__get__(o, i, c); return r; } static int __pyx_tp_descr_set_6pandas_3lib_AxisProperty(PyObject *o, PyObject *i, PyObject *v) { if (v) { return __pyx_pw_6pandas_3lib_12AxisProperty_5__set__(o, i, v); } else { PyErr_SetString(PyExc_NotImplementedError, "__delete__"); return -1; } } static PyMethodDef __pyx_methods_6pandas_3lib_AxisProperty[] = { {0, 0, 0, 0} }; static PyTypeObject __pyx_type_6pandas_3lib_AxisProperty = { PyVarObject_HEAD_INIT(0, 0) __Pyx_NAMESTR("pandas.lib.AxisProperty"), /*tp_name*/ sizeof(struct __pyx_obj_6pandas_3lib_AxisProperty), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_6pandas_3lib_AxisProperty, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #else 0, /*reserved*/ #endif 0, /*tp_repr*/ 0, /*tp_as_number*/ 0, /*tp_as_sequence*/ 0, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/ 0, /*tp_doc*/ 0, /*tp_traverse*/ 0, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_6pandas_3lib_AxisProperty, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ __pyx_tp_descr_get_6pandas_3lib_AxisProperty, /*tp_descr_get*/ __pyx_tp_descr_set_6pandas_3lib_AxisProperty, /*tp_descr_set*/ 0, /*tp_dictoffset*/ __pyx_pw_6pandas_3lib_12AxisProperty_1__init__, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_6pandas_3lib_AxisProperty, /*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*/ #if PY_VERSION_HEX >= 0x02060000 0, /*tp_version_tag*/ #endif #if PY_VERSION_HEX >= 0x030400a1 && defined(Py_TPFLAGS_HAVE_FINALIZE) 0, /*tp_finalize*/ #endif }; static PyObject *__pyx_tp_new_6pandas_3lib__PandasNull(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { PyObject *o; o = (*t->tp_alloc)(t, 0); if (unlikely(!o)) return 0; return o; } static void __pyx_tp_dealloc_6pandas_3lib__PandasNull(PyObject *o) { (*Py_TYPE(o)->tp_free)(o); } static PyMethodDef __pyx_methods_6pandas_3lib__PandasNull[] = { {0, 0, 0, 0} }; static PyTypeObject __pyx_type_6pandas_3lib__PandasNull = { PyVarObject_HEAD_INIT(0, 0) __Pyx_NAMESTR("pandas.lib._PandasNull"), /*tp_name*/ sizeof(struct __pyx_obj_6pandas_3lib__PandasNull), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_6pandas_3lib__PandasNull, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #else 0, /*reserved*/ #endif 0, /*tp_repr*/ 0, /*tp_as_number*/ 0, /*tp_as_sequence*/ 0, /*tp_as_mapping*/ __pyx_pw_6pandas_3lib_11_PandasNull_3__hash__, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/ 0, /*tp_doc*/ 0, /*tp_traverse*/ 0, /*tp_clear*/ __pyx_pw_6pandas_3lib_11_PandasNull_1__richcmp__, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_6pandas_3lib__PandasNull, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_6pandas_3lib__PandasNull, /*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*/ #if PY_VERSION_HEX >= 0x02060000 0, /*tp_version_tag*/ #endif #if PY_VERSION_HEX >= 0x030400a1 && defined(Py_TPFLAGS_HAVE_FINALIZE) 0, /*tp_finalize*/ #endif }; static struct __pyx_obj_6pandas_3lib___pyx_scope_struct__try_parse_dates *__pyx_freelist_6pandas_3lib___pyx_scope_struct__try_parse_dates[8]; static int __pyx_freecount_6pandas_3lib___pyx_scope_struct__try_parse_dates = 0; static PyObject *__pyx_tp_new_6pandas_3lib___pyx_scope_struct__try_parse_dates(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { struct __pyx_obj_6pandas_3lib___pyx_scope_struct__try_parse_dates *p; PyObject *o; if (likely((__pyx_freecount_6pandas_3lib___pyx_scope_struct__try_parse_dates > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_6pandas_3lib___pyx_scope_struct__try_parse_dates)))) { o = (PyObject*)__pyx_freelist_6pandas_3lib___pyx_scope_struct__try_parse_dates[--__pyx_freecount_6pandas_3lib___pyx_scope_struct__try_parse_dates]; memset(o, 0, sizeof(struct __pyx_obj_6pandas_3lib___pyx_scope_struct__try_parse_dates)); PyObject_INIT(o, t); PyObject_GC_Track(o); } else { o = (*t->tp_alloc)(t, 0); if (unlikely(!o)) return 0; } p = ((struct __pyx_obj_6pandas_3lib___pyx_scope_struct__try_parse_dates *)o); p->__pyx_v_dayfirst = 0; p->__pyx_v_default = 0; p->__pyx_v_parse = 0; return o; } static void __pyx_tp_dealloc_6pandas_3lib___pyx_scope_struct__try_parse_dates(PyObject *o) { struct __pyx_obj_6pandas_3lib___pyx_scope_struct__try_parse_dates *p = (struct __pyx_obj_6pandas_3lib___pyx_scope_struct__try_parse_dates *)o; PyObject_GC_UnTrack(o); Py_CLEAR(p->__pyx_v_dayfirst); Py_CLEAR(p->__pyx_v_default); Py_CLEAR(p->__pyx_v_parse); if ((__pyx_freecount_6pandas_3lib___pyx_scope_struct__try_parse_dates < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_6pandas_3lib___pyx_scope_struct__try_parse_dates))) { __pyx_freelist_6pandas_3lib___pyx_scope_struct__try_parse_dates[__pyx_freecount_6pandas_3lib___pyx_scope_struct__try_parse_dates++] = ((struct __pyx_obj_6pandas_3lib___pyx_scope_struct__try_parse_dates *)o); } else { (*Py_TYPE(o)->tp_free)(o); } } static int __pyx_tp_traverse_6pandas_3lib___pyx_scope_struct__try_parse_dates(PyObject *o, visitproc v, void *a) { int e; struct __pyx_obj_6pandas_3lib___pyx_scope_struct__try_parse_dates *p = (struct __pyx_obj_6pandas_3lib___pyx_scope_struct__try_parse_dates *)o; if (p->__pyx_v_dayfirst) { e = (*v)(p->__pyx_v_dayfirst, a); if (e) return e; } if (p->__pyx_v_default) { e = (*v)(p->__pyx_v_default, a); if (e) return e; } if (p->__pyx_v_parse) { e = (*v)(p->__pyx_v_parse, a); if (e) return e; } return 0; } static int __pyx_tp_clear_6pandas_3lib___pyx_scope_struct__try_parse_dates(PyObject *o) { struct __pyx_obj_6pandas_3lib___pyx_scope_struct__try_parse_dates *p = (struct __pyx_obj_6pandas_3lib___pyx_scope_struct__try_parse_dates *)o; PyObject* tmp; tmp = ((PyObject*)p->__pyx_v_dayfirst); p->__pyx_v_dayfirst = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->__pyx_v_default); p->__pyx_v_default = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->__pyx_v_parse); p->__pyx_v_parse = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); return 0; } static PyMethodDef __pyx_methods_6pandas_3lib___pyx_scope_struct__try_parse_dates[] = { {0, 0, 0, 0} }; static PyTypeObject __pyx_type_6pandas_3lib___pyx_scope_struct__try_parse_dates = { PyVarObject_HEAD_INIT(0, 0) __Pyx_NAMESTR("pandas.lib.__pyx_scope_struct__try_parse_dates"), /*tp_name*/ sizeof(struct __pyx_obj_6pandas_3lib___pyx_scope_struct__try_parse_dates), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_6pandas_3lib___pyx_scope_struct__try_parse_dates, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #else 0, /*reserved*/ #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_HAVE_GC, /*tp_flags*/ 0, /*tp_doc*/ __pyx_tp_traverse_6pandas_3lib___pyx_scope_struct__try_parse_dates, /*tp_traverse*/ __pyx_tp_clear_6pandas_3lib___pyx_scope_struct__try_parse_dates, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_6pandas_3lib___pyx_scope_struct__try_parse_dates, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_6pandas_3lib___pyx_scope_struct__try_parse_dates, /*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*/ #if PY_VERSION_HEX >= 0x02060000 0, /*tp_version_tag*/ #endif #if PY_VERSION_HEX >= 0x030400a1 && defined(Py_TPFLAGS_HAVE_FINALIZE) 0, /*tp_finalize*/ #endif }; static PyObject *__pyx_tp_new_6pandas_3lib_SeriesBinGrouper(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *p; PyObject *o; o = (*t->tp_alloc)(t, 0); if (unlikely(!o)) return 0; p = ((struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *)o); p->arr = Py_None; Py_INCREF(Py_None); p->index = Py_None; Py_INCREF(Py_None); p->dummy_arr = Py_None; Py_INCREF(Py_None); p->dummy_index = Py_None; Py_INCREF(Py_None); p->values = Py_None; Py_INCREF(Py_None); p->f = Py_None; Py_INCREF(Py_None); p->bins = Py_None; Py_INCREF(Py_None); p->typ = Py_None; Py_INCREF(Py_None); p->name = Py_None; Py_INCREF(Py_None); return o; } static void __pyx_tp_dealloc_6pandas_3lib_SeriesBinGrouper(PyObject *o) { struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *p = (struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *)o; PyObject_GC_UnTrack(o); Py_CLEAR(p->arr); Py_CLEAR(p->index); Py_CLEAR(p->dummy_arr); Py_CLEAR(p->dummy_index); Py_CLEAR(p->values); Py_CLEAR(p->f); Py_CLEAR(p->bins); Py_CLEAR(p->typ); Py_CLEAR(p->name); (*Py_TYPE(o)->tp_free)(o); } static int __pyx_tp_traverse_6pandas_3lib_SeriesBinGrouper(PyObject *o, visitproc v, void *a) { int e; struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *p = (struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *)o; if (p->arr) { e = (*v)(p->arr, a); if (e) return e; } if (p->index) { e = (*v)(p->index, a); if (e) return e; } if (p->dummy_arr) { e = (*v)(p->dummy_arr, a); if (e) return e; } if (p->dummy_index) { e = (*v)(p->dummy_index, a); if (e) return e; } if (p->values) { e = (*v)(p->values, a); if (e) return e; } if (p->f) { e = (*v)(p->f, a); if (e) return e; } if (p->bins) { e = (*v)(p->bins, a); if (e) return e; } if (p->typ) { e = (*v)(p->typ, a); if (e) return e; } if (p->name) { e = (*v)(p->name, a); if (e) return e; } return 0; } static int __pyx_tp_clear_6pandas_3lib_SeriesBinGrouper(PyObject *o) { struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *p = (struct __pyx_obj_6pandas_3lib_SeriesBinGrouper *)o; PyObject* tmp; tmp = ((PyObject*)p->arr); p->arr = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->index); p->index = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->dummy_arr); p->dummy_arr = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->dummy_index); p->dummy_index = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->values); p->values = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->f); p->f = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->bins); p->bins = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->typ); p->typ = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->name); p->name = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); return 0; } static PyObject *__pyx_getprop_6pandas_3lib_16SeriesBinGrouper_arr(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6pandas_3lib_16SeriesBinGrouper_3arr_1__get__(o); } static int __pyx_setprop_6pandas_3lib_16SeriesBinGrouper_arr(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { return __pyx_pw_6pandas_3lib_16SeriesBinGrouper_3arr_3__set__(o, v); } else { return __pyx_pw_6pandas_3lib_16SeriesBinGrouper_3arr_5__del__(o); } } static PyObject *__pyx_getprop_6pandas_3lib_16SeriesBinGrouper_index(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6pandas_3lib_16SeriesBinGrouper_5index_1__get__(o); } static int __pyx_setprop_6pandas_3lib_16SeriesBinGrouper_index(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { return __pyx_pw_6pandas_3lib_16SeriesBinGrouper_5index_3__set__(o, v); } else { return __pyx_pw_6pandas_3lib_16SeriesBinGrouper_5index_5__del__(o); } } static PyObject *__pyx_getprop_6pandas_3lib_16SeriesBinGrouper_dummy_arr(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6pandas_3lib_16SeriesBinGrouper_9dummy_arr_1__get__(o); } static int __pyx_setprop_6pandas_3lib_16SeriesBinGrouper_dummy_arr(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { return __pyx_pw_6pandas_3lib_16SeriesBinGrouper_9dummy_arr_3__set__(o, v); } else { return __pyx_pw_6pandas_3lib_16SeriesBinGrouper_9dummy_arr_5__del__(o); } } static PyObject *__pyx_getprop_6pandas_3lib_16SeriesBinGrouper_dummy_index(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6pandas_3lib_16SeriesBinGrouper_11dummy_index_1__get__(o); } static int __pyx_setprop_6pandas_3lib_16SeriesBinGrouper_dummy_index(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { return __pyx_pw_6pandas_3lib_16SeriesBinGrouper_11dummy_index_3__set__(o, v); } else { return __pyx_pw_6pandas_3lib_16SeriesBinGrouper_11dummy_index_5__del__(o); } } static PyObject *__pyx_getprop_6pandas_3lib_16SeriesBinGrouper_values(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6pandas_3lib_16SeriesBinGrouper_6values_1__get__(o); } static int __pyx_setprop_6pandas_3lib_16SeriesBinGrouper_values(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { return __pyx_pw_6pandas_3lib_16SeriesBinGrouper_6values_3__set__(o, v); } else { return __pyx_pw_6pandas_3lib_16SeriesBinGrouper_6values_5__del__(o); } } static PyObject *__pyx_getprop_6pandas_3lib_16SeriesBinGrouper_f(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6pandas_3lib_16SeriesBinGrouper_1f_1__get__(o); } static int __pyx_setprop_6pandas_3lib_16SeriesBinGrouper_f(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { return __pyx_pw_6pandas_3lib_16SeriesBinGrouper_1f_3__set__(o, v); } else { return __pyx_pw_6pandas_3lib_16SeriesBinGrouper_1f_5__del__(o); } } static PyObject *__pyx_getprop_6pandas_3lib_16SeriesBinGrouper_bins(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6pandas_3lib_16SeriesBinGrouper_4bins_1__get__(o); } static int __pyx_setprop_6pandas_3lib_16SeriesBinGrouper_bins(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { return __pyx_pw_6pandas_3lib_16SeriesBinGrouper_4bins_3__set__(o, v); } else { return __pyx_pw_6pandas_3lib_16SeriesBinGrouper_4bins_5__del__(o); } } static PyObject *__pyx_getprop_6pandas_3lib_16SeriesBinGrouper_typ(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6pandas_3lib_16SeriesBinGrouper_3typ_1__get__(o); } static int __pyx_setprop_6pandas_3lib_16SeriesBinGrouper_typ(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { return __pyx_pw_6pandas_3lib_16SeriesBinGrouper_3typ_3__set__(o, v); } else { return __pyx_pw_6pandas_3lib_16SeriesBinGrouper_3typ_5__del__(o); } } static PyObject *__pyx_getprop_6pandas_3lib_16SeriesBinGrouper_name(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6pandas_3lib_16SeriesBinGrouper_4name_1__get__(o); } static int __pyx_setprop_6pandas_3lib_16SeriesBinGrouper_name(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { return __pyx_pw_6pandas_3lib_16SeriesBinGrouper_4name_3__set__(o, v); } else { return __pyx_pw_6pandas_3lib_16SeriesBinGrouper_4name_5__del__(o); } } static PyMethodDef __pyx_methods_6pandas_3lib_SeriesBinGrouper[] = { {__Pyx_NAMESTR("_check_dummy"), (PyCFunction)__pyx_pw_6pandas_3lib_16SeriesBinGrouper_3_check_dummy, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}, {__Pyx_NAMESTR("get_result"), (PyCFunction)__pyx_pw_6pandas_3lib_16SeriesBinGrouper_5get_result, METH_NOARGS, __Pyx_DOCSTR(0)}, {__Pyx_NAMESTR("_get_result_array"), (PyCFunction)__pyx_pw_6pandas_3lib_16SeriesBinGrouper_7_get_result_array, METH_O, __Pyx_DOCSTR(0)}, {0, 0, 0, 0} }; static struct PyGetSetDef __pyx_getsets_6pandas_3lib_SeriesBinGrouper[] = { {(char *)"arr", __pyx_getprop_6pandas_3lib_16SeriesBinGrouper_arr, __pyx_setprop_6pandas_3lib_16SeriesBinGrouper_arr, 0, 0}, {(char *)"index", __pyx_getprop_6pandas_3lib_16SeriesBinGrouper_index, __pyx_setprop_6pandas_3lib_16SeriesBinGrouper_index, 0, 0}, {(char *)"dummy_arr", __pyx_getprop_6pandas_3lib_16SeriesBinGrouper_dummy_arr, __pyx_setprop_6pandas_3lib_16SeriesBinGrouper_dummy_arr, 0, 0}, {(char *)"dummy_index", __pyx_getprop_6pandas_3lib_16SeriesBinGrouper_dummy_index, __pyx_setprop_6pandas_3lib_16SeriesBinGrouper_dummy_index, 0, 0}, {(char *)"values", __pyx_getprop_6pandas_3lib_16SeriesBinGrouper_values, __pyx_setprop_6pandas_3lib_16SeriesBinGrouper_values, 0, 0}, {(char *)"f", __pyx_getprop_6pandas_3lib_16SeriesBinGrouper_f, __pyx_setprop_6pandas_3lib_16SeriesBinGrouper_f, 0, 0}, {(char *)"bins", __pyx_getprop_6pandas_3lib_16SeriesBinGrouper_bins, __pyx_setprop_6pandas_3lib_16SeriesBinGrouper_bins, 0, 0}, {(char *)"typ", __pyx_getprop_6pandas_3lib_16SeriesBinGrouper_typ, __pyx_setprop_6pandas_3lib_16SeriesBinGrouper_typ, 0, 0}, {(char *)"name", __pyx_getprop_6pandas_3lib_16SeriesBinGrouper_name, __pyx_setprop_6pandas_3lib_16SeriesBinGrouper_name, 0, 0}, {0, 0, 0, 0, 0} }; static PyTypeObject __pyx_type_6pandas_3lib_SeriesBinGrouper = { PyVarObject_HEAD_INIT(0, 0) __Pyx_NAMESTR("pandas.lib.SeriesBinGrouper"), /*tp_name*/ sizeof(struct __pyx_obj_6pandas_3lib_SeriesBinGrouper), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_6pandas_3lib_SeriesBinGrouper, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #else 0, /*reserved*/ #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*/ __Pyx_DOCSTR("\n Performs grouping operation according to bin edges, rather than labels\n "), /*tp_doc*/ __pyx_tp_traverse_6pandas_3lib_SeriesBinGrouper, /*tp_traverse*/ __pyx_tp_clear_6pandas_3lib_SeriesBinGrouper, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_6pandas_3lib_SeriesBinGrouper, /*tp_methods*/ 0, /*tp_members*/ __pyx_getsets_6pandas_3lib_SeriesBinGrouper, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ __pyx_pw_6pandas_3lib_16SeriesBinGrouper_1__init__, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_6pandas_3lib_SeriesBinGrouper, /*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*/ #if PY_VERSION_HEX >= 0x02060000 0, /*tp_version_tag*/ #endif #if PY_VERSION_HEX >= 0x030400a1 && defined(Py_TPFLAGS_HAVE_FINALIZE) 0, /*tp_finalize*/ #endif }; static struct __pyx_vtabstruct_6pandas_3lib_BlockSlider __pyx_vtable_6pandas_3lib_BlockSlider; static PyObject *__pyx_tp_new_6pandas_3lib_BlockSlider(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { struct __pyx_obj_6pandas_3lib_BlockSlider *p; PyObject *o; o = (*t->tp_alloc)(t, 0); if (unlikely(!o)) return 0; p = ((struct __pyx_obj_6pandas_3lib_BlockSlider *)o); p->__pyx_vtab = __pyx_vtabptr_6pandas_3lib_BlockSlider; p->frame = Py_None; Py_INCREF(Py_None); p->dummy = Py_None; Py_INCREF(Py_None); p->idx_slider = ((struct __pyx_obj_6pandas_3lib_Slider *)Py_None); Py_INCREF(Py_None); p->blocks = ((PyObject*)Py_None); Py_INCREF(Py_None); return o; } static void __pyx_tp_dealloc_6pandas_3lib_BlockSlider(PyObject *o) { struct __pyx_obj_6pandas_3lib_BlockSlider *p = (struct __pyx_obj_6pandas_3lib_BlockSlider *)o; PyObject_GC_UnTrack(o); { PyObject *etype, *eval, *etb; PyErr_Fetch(&etype, &eval, &etb); ++Py_REFCNT(o); __pyx_pw_6pandas_3lib_11BlockSlider_3__dealloc__(o); if (PyErr_Occurred()) PyErr_WriteUnraisable(o); --Py_REFCNT(o); PyErr_Restore(etype, eval, etb); } Py_CLEAR(p->frame); Py_CLEAR(p->dummy); Py_CLEAR(p->idx_slider); Py_CLEAR(p->blocks); (*Py_TYPE(o)->tp_free)(o); } static int __pyx_tp_traverse_6pandas_3lib_BlockSlider(PyObject *o, visitproc v, void *a) { int e; struct __pyx_obj_6pandas_3lib_BlockSlider *p = (struct __pyx_obj_6pandas_3lib_BlockSlider *)o; if (p->frame) { e = (*v)(p->frame, a); if (e) return e; } if (p->dummy) { e = (*v)(p->dummy, a); if (e) return e; } if (p->idx_slider) { e = (*v)(((PyObject*)p->idx_slider), a); if (e) return e; } if (p->blocks) { e = (*v)(p->blocks, a); if (e) return e; } return 0; } static int __pyx_tp_clear_6pandas_3lib_BlockSlider(PyObject *o) { struct __pyx_obj_6pandas_3lib_BlockSlider *p = (struct __pyx_obj_6pandas_3lib_BlockSlider *)o; PyObject* tmp; tmp = ((PyObject*)p->frame); p->frame = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->dummy); p->dummy = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->idx_slider); p->idx_slider = ((struct __pyx_obj_6pandas_3lib_Slider *)Py_None); Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->blocks); p->blocks = ((PyObject*)Py_None); Py_INCREF(Py_None); Py_XDECREF(tmp); return 0; } static PyObject *__pyx_getprop_6pandas_3lib_11BlockSlider_frame(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6pandas_3lib_11BlockSlider_5frame_1__get__(o); } static int __pyx_setprop_6pandas_3lib_11BlockSlider_frame(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { return __pyx_pw_6pandas_3lib_11BlockSlider_5frame_3__set__(o, v); } else { return __pyx_pw_6pandas_3lib_11BlockSlider_5frame_5__del__(o); } } static PyObject *__pyx_getprop_6pandas_3lib_11BlockSlider_dummy(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6pandas_3lib_11BlockSlider_5dummy_1__get__(o); } static int __pyx_setprop_6pandas_3lib_11BlockSlider_dummy(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { return __pyx_pw_6pandas_3lib_11BlockSlider_5dummy_3__set__(o, v); } else { return __pyx_pw_6pandas_3lib_11BlockSlider_5dummy_5__del__(o); } } static PyObject *__pyx_getprop_6pandas_3lib_11BlockSlider_nblocks(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6pandas_3lib_11BlockSlider_7nblocks_1__get__(o); } static int __pyx_setprop_6pandas_3lib_11BlockSlider_nblocks(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { return __pyx_pw_6pandas_3lib_11BlockSlider_7nblocks_3__set__(o, v); } else { PyErr_SetString(PyExc_NotImplementedError, "__del__"); return -1; } } static PyObject *__pyx_getprop_6pandas_3lib_11BlockSlider_idx_slider(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6pandas_3lib_11BlockSlider_10idx_slider_1__get__(o); } static int __pyx_setprop_6pandas_3lib_11BlockSlider_idx_slider(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { return __pyx_pw_6pandas_3lib_11BlockSlider_10idx_slider_3__set__(o, v); } else { return __pyx_pw_6pandas_3lib_11BlockSlider_10idx_slider_5__del__(o); } } static PyObject *__pyx_getprop_6pandas_3lib_11BlockSlider_blocks(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6pandas_3lib_11BlockSlider_6blocks_1__get__(o); } static int __pyx_setprop_6pandas_3lib_11BlockSlider_blocks(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { return __pyx_pw_6pandas_3lib_11BlockSlider_6blocks_3__set__(o, v); } else { return __pyx_pw_6pandas_3lib_11BlockSlider_6blocks_5__del__(o); } } static PyMethodDef __pyx_methods_6pandas_3lib_BlockSlider[] = { {__Pyx_NAMESTR("move"), (PyCFunction)__pyx_pw_6pandas_3lib_11BlockSlider_5move, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}, {0, 0, 0, 0} }; static struct PyGetSetDef __pyx_getsets_6pandas_3lib_BlockSlider[] = { {(char *)"frame", __pyx_getprop_6pandas_3lib_11BlockSlider_frame, __pyx_setprop_6pandas_3lib_11BlockSlider_frame, 0, 0}, {(char *)"dummy", __pyx_getprop_6pandas_3lib_11BlockSlider_dummy, __pyx_setprop_6pandas_3lib_11BlockSlider_dummy, 0, 0}, {(char *)"nblocks", __pyx_getprop_6pandas_3lib_11BlockSlider_nblocks, __pyx_setprop_6pandas_3lib_11BlockSlider_nblocks, 0, 0}, {(char *)"idx_slider", __pyx_getprop_6pandas_3lib_11BlockSlider_idx_slider, __pyx_setprop_6pandas_3lib_11BlockSlider_idx_slider, 0, 0}, {(char *)"blocks", __pyx_getprop_6pandas_3lib_11BlockSlider_blocks, __pyx_setprop_6pandas_3lib_11BlockSlider_blocks, 0, 0}, {0, 0, 0, 0, 0} }; static PyTypeObject __pyx_type_6pandas_3lib_BlockSlider = { PyVarObject_HEAD_INIT(0, 0) __Pyx_NAMESTR("pandas.lib.BlockSlider"), /*tp_name*/ sizeof(struct __pyx_obj_6pandas_3lib_BlockSlider), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_6pandas_3lib_BlockSlider, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #else 0, /*reserved*/ #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*/ __Pyx_DOCSTR("\n Only capable of sliding on axis=0\n "), /*tp_doc*/ __pyx_tp_traverse_6pandas_3lib_BlockSlider, /*tp_traverse*/ __pyx_tp_clear_6pandas_3lib_BlockSlider, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_6pandas_3lib_BlockSlider, /*tp_methods*/ 0, /*tp_members*/ __pyx_getsets_6pandas_3lib_BlockSlider, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ __pyx_pw_6pandas_3lib_11BlockSlider_1__init__, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_6pandas_3lib_BlockSlider, /*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*/ #if PY_VERSION_HEX >= 0x02060000 0, /*tp_version_tag*/ #endif #if PY_VERSION_HEX >= 0x030400a1 && defined(Py_TPFLAGS_HAVE_FINALIZE) 0, /*tp_finalize*/ #endif }; static PyObject *__pyx_tp_new_6pandas_3lib_cache_readonly(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { struct __pyx_obj_6pandas_3lib_cache_readonly *p; PyObject *o; o = (*t->tp_alloc)(t, 0); if (unlikely(!o)) return 0; p = ((struct __pyx_obj_6pandas_3lib_cache_readonly *)o); p->func = Py_None; Py_INCREF(Py_None); p->name = Py_None; Py_INCREF(Py_None); p->allow_setting = Py_None; Py_INCREF(Py_None); return o; } static void __pyx_tp_dealloc_6pandas_3lib_cache_readonly(PyObject *o) { struct __pyx_obj_6pandas_3lib_cache_readonly *p = (struct __pyx_obj_6pandas_3lib_cache_readonly *)o; PyObject_GC_UnTrack(o); Py_CLEAR(p->func); Py_CLEAR(p->name); Py_CLEAR(p->allow_setting); (*Py_TYPE(o)->tp_free)(o); } static int __pyx_tp_traverse_6pandas_3lib_cache_readonly(PyObject *o, visitproc v, void *a) { int e; struct __pyx_obj_6pandas_3lib_cache_readonly *p = (struct __pyx_obj_6pandas_3lib_cache_readonly *)o; if (p->func) { e = (*v)(p->func, a); if (e) return e; } if (p->name) { e = (*v)(p->name, a); if (e) return e; } if (p->allow_setting) { e = (*v)(p->allow_setting, a); if (e) return e; } return 0; } static int __pyx_tp_clear_6pandas_3lib_cache_readonly(PyObject *o) { struct __pyx_obj_6pandas_3lib_cache_readonly *p = (struct __pyx_obj_6pandas_3lib_cache_readonly *)o; PyObject* tmp; tmp = ((PyObject*)p->func); p->func = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->name); p->name = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->allow_setting); p->allow_setting = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); return 0; } static PyObject *__pyx_tp_descr_get_6pandas_3lib_cache_readonly(PyObject *o, PyObject *i, PyObject *c) { PyObject *r = 0; if (!i) i = Py_None; if (!c) c = Py_None; r = __pyx_pw_6pandas_3lib_14cache_readonly_5__get__(o, i, c); return r; } static int __pyx_tp_descr_set_6pandas_3lib_cache_readonly(PyObject *o, PyObject *i, PyObject *v) { if (v) { return __pyx_pw_6pandas_3lib_14cache_readonly_7__set__(o, i, v); } else { PyErr_SetString(PyExc_NotImplementedError, "__delete__"); return -1; } } static PyObject *__pyx_getprop_6pandas_3lib_14cache_readonly_func(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6pandas_3lib_14cache_readonly_4func_1__get__(o); } static PyObject *__pyx_getprop_6pandas_3lib_14cache_readonly_name(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6pandas_3lib_14cache_readonly_4name_1__get__(o); } static PyObject *__pyx_getprop_6pandas_3lib_14cache_readonly_allow_setting(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6pandas_3lib_14cache_readonly_13allow_setting_1__get__(o); } static PyMethodDef __pyx_methods_6pandas_3lib_cache_readonly[] = { {0, 0, 0, 0} }; static struct PyGetSetDef __pyx_getsets_6pandas_3lib_cache_readonly[] = { {(char *)"func", __pyx_getprop_6pandas_3lib_14cache_readonly_func, 0, 0, 0}, {(char *)"name", __pyx_getprop_6pandas_3lib_14cache_readonly_name, 0, 0, 0}, {(char *)"allow_setting", __pyx_getprop_6pandas_3lib_14cache_readonly_allow_setting, 0, 0, 0}, {0, 0, 0, 0, 0} }; static PyTypeObject __pyx_type_6pandas_3lib_cache_readonly = { PyVarObject_HEAD_INIT(0, 0) __Pyx_NAMESTR("pandas.lib.cache_readonly"), /*tp_name*/ sizeof(struct __pyx_obj_6pandas_3lib_cache_readonly), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_6pandas_3lib_cache_readonly, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #else 0, /*reserved*/ #endif 0, /*tp_repr*/ 0, /*tp_as_number*/ 0, /*tp_as_sequence*/ 0, /*tp_as_mapping*/ 0, /*tp_hash*/ __pyx_pw_6pandas_3lib_14cache_readonly_3__call__, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ 0, /*tp_doc*/ __pyx_tp_traverse_6pandas_3lib_cache_readonly, /*tp_traverse*/ __pyx_tp_clear_6pandas_3lib_cache_readonly, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_6pandas_3lib_cache_readonly, /*tp_methods*/ 0, /*tp_members*/ __pyx_getsets_6pandas_3lib_cache_readonly, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ __pyx_tp_descr_get_6pandas_3lib_cache_readonly, /*tp_descr_get*/ __pyx_tp_descr_set_6pandas_3lib_cache_readonly, /*tp_descr_set*/ 0, /*tp_dictoffset*/ __pyx_pw_6pandas_3lib_14cache_readonly_1__init__, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_6pandas_3lib_cache_readonly, /*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*/ #if PY_VERSION_HEX >= 0x02060000 0, /*tp_version_tag*/ #endif #if PY_VERSION_HEX >= 0x030400a1 && defined(Py_TPFLAGS_HAVE_FINALIZE) 0, /*tp_finalize*/ #endif }; static PyObject *__pyx_tp_new_6pandas_3lib_SeriesGrouper(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { struct __pyx_obj_6pandas_3lib_SeriesGrouper *p; PyObject *o; o = (*t->tp_alloc)(t, 0); if (unlikely(!o)) return 0; p = ((struct __pyx_obj_6pandas_3lib_SeriesGrouper *)o); p->arr = Py_None; Py_INCREF(Py_None); p->index = Py_None; Py_INCREF(Py_None); p->dummy_arr = Py_None; Py_INCREF(Py_None); p->dummy_index = Py_None; Py_INCREF(Py_None); p->f = Py_None; Py_INCREF(Py_None); p->labels = Py_None; Py_INCREF(Py_None); p->values = Py_None; Py_INCREF(Py_None); p->typ = Py_None; Py_INCREF(Py_None); p->name = Py_None; Py_INCREF(Py_None); return o; } static void __pyx_tp_dealloc_6pandas_3lib_SeriesGrouper(PyObject *o) { struct __pyx_obj_6pandas_3lib_SeriesGrouper *p = (struct __pyx_obj_6pandas_3lib_SeriesGrouper *)o; PyObject_GC_UnTrack(o); Py_CLEAR(p->arr); Py_CLEAR(p->index); Py_CLEAR(p->dummy_arr); Py_CLEAR(p->dummy_index); Py_CLEAR(p->f); Py_CLEAR(p->labels); Py_CLEAR(p->values); Py_CLEAR(p->typ); Py_CLEAR(p->name); (*Py_TYPE(o)->tp_free)(o); } static int __pyx_tp_traverse_6pandas_3lib_SeriesGrouper(PyObject *o, visitproc v, void *a) { int e; struct __pyx_obj_6pandas_3lib_SeriesGrouper *p = (struct __pyx_obj_6pandas_3lib_SeriesGrouper *)o; if (p->arr) { e = (*v)(p->arr, a); if (e) return e; } if (p->index) { e = (*v)(p->index, a); if (e) return e; } if (p->dummy_arr) { e = (*v)(p->dummy_arr, a); if (e) return e; } if (p->dummy_index) { e = (*v)(p->dummy_index, a); if (e) return e; } if (p->f) { e = (*v)(p->f, a); if (e) return e; } if (p->labels) { e = (*v)(p->labels, a); if (e) return e; } if (p->values) { e = (*v)(p->values, a); if (e) return e; } if (p->typ) { e = (*v)(p->typ, a); if (e) return e; } if (p->name) { e = (*v)(p->name, a); if (e) return e; } return 0; } static int __pyx_tp_clear_6pandas_3lib_SeriesGrouper(PyObject *o) { struct __pyx_obj_6pandas_3lib_SeriesGrouper *p = (struct __pyx_obj_6pandas_3lib_SeriesGrouper *)o; PyObject* tmp; tmp = ((PyObject*)p->arr); p->arr = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->index); p->index = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->dummy_arr); p->dummy_arr = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->dummy_index); p->dummy_index = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->f); p->f = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->labels); p->labels = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->values); p->values = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->typ); p->typ = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->name); p->name = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); return 0; } static PyObject *__pyx_getprop_6pandas_3lib_13SeriesGrouper_arr(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6pandas_3lib_13SeriesGrouper_3arr_1__get__(o); } static int __pyx_setprop_6pandas_3lib_13SeriesGrouper_arr(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { return __pyx_pw_6pandas_3lib_13SeriesGrouper_3arr_3__set__(o, v); } else { return __pyx_pw_6pandas_3lib_13SeriesGrouper_3arr_5__del__(o); } } static PyObject *__pyx_getprop_6pandas_3lib_13SeriesGrouper_index(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6pandas_3lib_13SeriesGrouper_5index_1__get__(o); } static int __pyx_setprop_6pandas_3lib_13SeriesGrouper_index(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { return __pyx_pw_6pandas_3lib_13SeriesGrouper_5index_3__set__(o, v); } else { return __pyx_pw_6pandas_3lib_13SeriesGrouper_5index_5__del__(o); } } static PyObject *__pyx_getprop_6pandas_3lib_13SeriesGrouper_dummy_arr(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6pandas_3lib_13SeriesGrouper_9dummy_arr_1__get__(o); } static int __pyx_setprop_6pandas_3lib_13SeriesGrouper_dummy_arr(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { return __pyx_pw_6pandas_3lib_13SeriesGrouper_9dummy_arr_3__set__(o, v); } else { return __pyx_pw_6pandas_3lib_13SeriesGrouper_9dummy_arr_5__del__(o); } } static PyObject *__pyx_getprop_6pandas_3lib_13SeriesGrouper_dummy_index(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6pandas_3lib_13SeriesGrouper_11dummy_index_1__get__(o); } static int __pyx_setprop_6pandas_3lib_13SeriesGrouper_dummy_index(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { return __pyx_pw_6pandas_3lib_13SeriesGrouper_11dummy_index_3__set__(o, v); } else { return __pyx_pw_6pandas_3lib_13SeriesGrouper_11dummy_index_5__del__(o); } } static PyObject *__pyx_getprop_6pandas_3lib_13SeriesGrouper_f(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6pandas_3lib_13SeriesGrouper_1f_1__get__(o); } static int __pyx_setprop_6pandas_3lib_13SeriesGrouper_f(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { return __pyx_pw_6pandas_3lib_13SeriesGrouper_1f_3__set__(o, v); } else { return __pyx_pw_6pandas_3lib_13SeriesGrouper_1f_5__del__(o); } } static PyObject *__pyx_getprop_6pandas_3lib_13SeriesGrouper_labels(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6pandas_3lib_13SeriesGrouper_6labels_1__get__(o); } static int __pyx_setprop_6pandas_3lib_13SeriesGrouper_labels(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { return __pyx_pw_6pandas_3lib_13SeriesGrouper_6labels_3__set__(o, v); } else { return __pyx_pw_6pandas_3lib_13SeriesGrouper_6labels_5__del__(o); } } static PyObject *__pyx_getprop_6pandas_3lib_13SeriesGrouper_values(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6pandas_3lib_13SeriesGrouper_6values_1__get__(o); } static int __pyx_setprop_6pandas_3lib_13SeriesGrouper_values(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { return __pyx_pw_6pandas_3lib_13SeriesGrouper_6values_3__set__(o, v); } else { return __pyx_pw_6pandas_3lib_13SeriesGrouper_6values_5__del__(o); } } static PyObject *__pyx_getprop_6pandas_3lib_13SeriesGrouper_typ(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6pandas_3lib_13SeriesGrouper_3typ_1__get__(o); } static int __pyx_setprop_6pandas_3lib_13SeriesGrouper_typ(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { return __pyx_pw_6pandas_3lib_13SeriesGrouper_3typ_3__set__(o, v); } else { return __pyx_pw_6pandas_3lib_13SeriesGrouper_3typ_5__del__(o); } } static PyObject *__pyx_getprop_6pandas_3lib_13SeriesGrouper_name(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6pandas_3lib_13SeriesGrouper_4name_1__get__(o); } static int __pyx_setprop_6pandas_3lib_13SeriesGrouper_name(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { return __pyx_pw_6pandas_3lib_13SeriesGrouper_4name_3__set__(o, v); } else { return __pyx_pw_6pandas_3lib_13SeriesGrouper_4name_5__del__(o); } } static PyMethodDef __pyx_methods_6pandas_3lib_SeriesGrouper[] = { {__Pyx_NAMESTR("_check_dummy"), (PyCFunction)__pyx_pw_6pandas_3lib_13SeriesGrouper_3_check_dummy, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}, {__Pyx_NAMESTR("get_result"), (PyCFunction)__pyx_pw_6pandas_3lib_13SeriesGrouper_5get_result, METH_NOARGS, __Pyx_DOCSTR(0)}, {__Pyx_NAMESTR("_get_result_array"), (PyCFunction)__pyx_pw_6pandas_3lib_13SeriesGrouper_7_get_result_array, METH_O, __Pyx_DOCSTR(0)}, {0, 0, 0, 0} }; static struct PyGetSetDef __pyx_getsets_6pandas_3lib_SeriesGrouper[] = { {(char *)"arr", __pyx_getprop_6pandas_3lib_13SeriesGrouper_arr, __pyx_setprop_6pandas_3lib_13SeriesGrouper_arr, 0, 0}, {(char *)"index", __pyx_getprop_6pandas_3lib_13SeriesGrouper_index, __pyx_setprop_6pandas_3lib_13SeriesGrouper_index, 0, 0}, {(char *)"dummy_arr", __pyx_getprop_6pandas_3lib_13SeriesGrouper_dummy_arr, __pyx_setprop_6pandas_3lib_13SeriesGrouper_dummy_arr, 0, 0}, {(char *)"dummy_index", __pyx_getprop_6pandas_3lib_13SeriesGrouper_dummy_index, __pyx_setprop_6pandas_3lib_13SeriesGrouper_dummy_index, 0, 0}, {(char *)"f", __pyx_getprop_6pandas_3lib_13SeriesGrouper_f, __pyx_setprop_6pandas_3lib_13SeriesGrouper_f, 0, 0}, {(char *)"labels", __pyx_getprop_6pandas_3lib_13SeriesGrouper_labels, __pyx_setprop_6pandas_3lib_13SeriesGrouper_labels, 0, 0}, {(char *)"values", __pyx_getprop_6pandas_3lib_13SeriesGrouper_values, __pyx_setprop_6pandas_3lib_13SeriesGrouper_values, 0, 0}, {(char *)"typ", __pyx_getprop_6pandas_3lib_13SeriesGrouper_typ, __pyx_setprop_6pandas_3lib_13SeriesGrouper_typ, 0, 0}, {(char *)"name", __pyx_getprop_6pandas_3lib_13SeriesGrouper_name, __pyx_setprop_6pandas_3lib_13SeriesGrouper_name, 0, 0}, {0, 0, 0, 0, 0} }; static PyTypeObject __pyx_type_6pandas_3lib_SeriesGrouper = { PyVarObject_HEAD_INIT(0, 0) __Pyx_NAMESTR("pandas.lib.SeriesGrouper"), /*tp_name*/ sizeof(struct __pyx_obj_6pandas_3lib_SeriesGrouper), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_6pandas_3lib_SeriesGrouper, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #else 0, /*reserved*/ #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*/ __Pyx_DOCSTR("\n Performs generic grouping operation while avoiding ndarray construction\n overhead\n "), /*tp_doc*/ __pyx_tp_traverse_6pandas_3lib_SeriesGrouper, /*tp_traverse*/ __pyx_tp_clear_6pandas_3lib_SeriesGrouper, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_6pandas_3lib_SeriesGrouper, /*tp_methods*/ 0, /*tp_members*/ __pyx_getsets_6pandas_3lib_SeriesGrouper, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ __pyx_pw_6pandas_3lib_13SeriesGrouper_1__init__, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_6pandas_3lib_SeriesGrouper, /*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*/ #if PY_VERSION_HEX >= 0x02060000 0, /*tp_version_tag*/ #endif #if PY_VERSION_HEX >= 0x030400a1 && defined(Py_TPFLAGS_HAVE_FINALIZE) 0, /*tp_finalize*/ #endif }; static struct __pyx_vtabstruct_6pandas_3lib_Slider __pyx_vtable_6pandas_3lib_Slider; static PyObject *__pyx_tp_new_6pandas_3lib_Slider(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { struct __pyx_obj_6pandas_3lib_Slider *p; PyObject *o; o = (*t->tp_alloc)(t, 0); if (unlikely(!o)) return 0; p = ((struct __pyx_obj_6pandas_3lib_Slider *)o); p->__pyx_vtab = __pyx_vtabptr_6pandas_3lib_Slider; p->values = ((PyArrayObject *)Py_None); Py_INCREF(Py_None); p->buf = ((PyArrayObject *)Py_None); Py_INCREF(Py_None); return o; } static void __pyx_tp_dealloc_6pandas_3lib_Slider(PyObject *o) { struct __pyx_obj_6pandas_3lib_Slider *p = (struct __pyx_obj_6pandas_3lib_Slider *)o; PyObject_GC_UnTrack(o); Py_CLEAR(p->values); Py_CLEAR(p->buf); (*Py_TYPE(o)->tp_free)(o); } static int __pyx_tp_traverse_6pandas_3lib_Slider(PyObject *o, visitproc v, void *a) { int e; struct __pyx_obj_6pandas_3lib_Slider *p = (struct __pyx_obj_6pandas_3lib_Slider *)o; if (p->values) { e = (*v)(((PyObject*)p->values), a); if (e) return e; } if (p->buf) { e = (*v)(((PyObject*)p->buf), a); if (e) return e; } return 0; } static int __pyx_tp_clear_6pandas_3lib_Slider(PyObject *o) { struct __pyx_obj_6pandas_3lib_Slider *p = (struct __pyx_obj_6pandas_3lib_Slider *)o; PyObject* tmp; tmp = ((PyObject*)p->values); p->values = ((PyArrayObject *)Py_None); Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->buf); p->buf = ((PyArrayObject *)Py_None); Py_INCREF(Py_None); Py_XDECREF(tmp); return 0; } static PyMethodDef __pyx_methods_6pandas_3lib_Slider[] = { {__Pyx_NAMESTR("advance"), (PyCFunction)__pyx_pw_6pandas_3lib_6Slider_3advance, METH_O, __Pyx_DOCSTR(0)}, {__Pyx_NAMESTR("set_length"), (PyCFunction)__pyx_pw_6pandas_3lib_6Slider_5set_length, METH_O, __Pyx_DOCSTR(0)}, {__Pyx_NAMESTR("reset"), (PyCFunction)__pyx_pw_6pandas_3lib_6Slider_7reset, METH_NOARGS, __Pyx_DOCSTR(0)}, {0, 0, 0, 0} }; static PyTypeObject __pyx_type_6pandas_3lib_Slider = { PyVarObject_HEAD_INIT(0, 0) __Pyx_NAMESTR("pandas.lib.Slider"), /*tp_name*/ sizeof(struct __pyx_obj_6pandas_3lib_Slider), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_6pandas_3lib_Slider, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #else 0, /*reserved*/ #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*/ __Pyx_DOCSTR("\n Only handles contiguous data for now\n "), /*tp_doc*/ __pyx_tp_traverse_6pandas_3lib_Slider, /*tp_traverse*/ __pyx_tp_clear_6pandas_3lib_Slider, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_6pandas_3lib_Slider, /*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_3lib_6Slider_1__init__, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_6pandas_3lib_Slider, /*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*/ #if PY_VERSION_HEX >= 0x02060000 0, /*tp_version_tag*/ #endif #if PY_VERSION_HEX >= 0x030400a1 && defined(Py_TPFLAGS_HAVE_FINALIZE) 0, /*tp_finalize*/ #endif }; static PyMethodDef __pyx_methods[] = { {__Pyx_NAMESTR("map_indices_list"), (PyCFunction)__pyx_pw_6pandas_3lib_1map_indices_list, METH_O, __Pyx_DOCSTR(__pyx_doc_6pandas_3lib_map_indices_list)}, {__Pyx_NAMESTR("to_datetime"), (PyCFunction)__pyx_pw_6pandas_3lib_5to_datetime, METH_O, __Pyx_DOCSTR(0)}, {__Pyx_NAMESTR("to_timestamp"), (PyCFunction)__pyx_pw_6pandas_3lib_7to_timestamp, METH_O, __Pyx_DOCSTR(0)}, {__Pyx_NAMESTR("checknull"), (PyCFunction)__pyx_pw_6pandas_3lib_13checknull, METH_O, __Pyx_DOCSTR(0)}, {__Pyx_NAMESTR("checknull_old"), (PyCFunction)__pyx_pw_6pandas_3lib_15checknull_old, METH_O, __Pyx_DOCSTR(0)}, {__Pyx_NAMESTR("astype_str"), (PyCFunction)__pyx_pw_6pandas_3lib_65astype_str, METH_O, __Pyx_DOCSTR(0)}, {0, 0, 0, 0} }; #if PY_MAJOR_VERSION >= 3 static struct PyModuleDef __pyx_moduledef = { #if PY_VERSION_HEX < 0x03020000 { PyObject_HEAD_INIT(NULL) NULL, 0, NULL }, #else PyModuleDef_HEAD_INIT, #endif __Pyx_NAMESTR("lib"), 0, /* m_doc */ -1, /* m_size */ __pyx_methods /* m_methods */, NULL, /* m_reload */ NULL, /* m_traverse */ NULL, /* m_clear */ NULL /* m_free */ }; #endif static __Pyx_StringTabEntry __pyx_string_tab[] = { {&__pyx_kp_s_10, __pyx_k_10, sizeof(__pyx_k_10), 0, 0, 1, 0}, {&__pyx_kp_u_100, __pyx_k_100, sizeof(__pyx_k_100), 0, 1, 0, 0}, {&__pyx_kp_u_103, __pyx_k_103, sizeof(__pyx_k_103), 0, 1, 0, 0}, {&__pyx_kp_s_107, __pyx_k_107, sizeof(__pyx_k_107), 0, 0, 1, 0}, {&__pyx_kp_s_11, __pyx_k_11, sizeof(__pyx_k_11), 0, 0, 1, 0}, {&__pyx_n_s_12, __pyx_k_12, sizeof(__pyx_k_12), 0, 0, 1, 1}, {&__pyx_kp_s_13, __pyx_k_13, sizeof(__pyx_k_13), 0, 0, 1, 0}, {&__pyx_n_s_130, __pyx_k_130, sizeof(__pyx_k_130), 0, 0, 1, 1}, {&__pyx_n_s_133, __pyx_k_133, sizeof(__pyx_k_133), 0, 0, 1, 1}, {&__pyx_n_s_136, __pyx_k_136, sizeof(__pyx_k_136), 0, 0, 1, 1}, {&__pyx_kp_s_15, __pyx_k_15, sizeof(__pyx_k_15), 0, 0, 1, 0}, {&__pyx_n_s_151, __pyx_k_151, sizeof(__pyx_k_151), 0, 0, 1, 1}, {&__pyx_n_s_154, __pyx_k_154, sizeof(__pyx_k_154), 0, 0, 1, 1}, {&__pyx_n_s_169, __pyx_k_169, sizeof(__pyx_k_169), 0, 0, 1, 1}, {&__pyx_kp_s_17, __pyx_k_17, sizeof(__pyx_k_17), 0, 0, 1, 0}, {&__pyx_n_s_172, __pyx_k_172, sizeof(__pyx_k_172), 0, 0, 1, 1}, {&__pyx_n_s_185, __pyx_k_185, sizeof(__pyx_k_185), 0, 0, 1, 1}, {&__pyx_kp_s_2, __pyx_k_2, sizeof(__pyx_k_2), 0, 0, 1, 0}, {&__pyx_n_s_202, __pyx_k_202, sizeof(__pyx_k_202), 0, 0, 1, 1}, {&__pyx_kp_s_203, __pyx_k_203, sizeof(__pyx_k_203), 0, 0, 1, 0}, {&__pyx_n_s_204, __pyx_k_204, sizeof(__pyx_k_204), 0, 0, 1, 1}, {&__pyx_kp_s_207, __pyx_k_207, sizeof(__pyx_k_207), 0, 0, 1, 0}, {&__pyx_n_s_236, __pyx_k_236, sizeof(__pyx_k_236), 0, 0, 1, 1}, {&__pyx_kp_s_24, __pyx_k_24, sizeof(__pyx_k_24), 0, 0, 1, 0}, {&__pyx_n_s_249, __pyx_k_249, sizeof(__pyx_k_249), 0, 0, 1, 1}, {&__pyx_n_s_258, __pyx_k_258, sizeof(__pyx_k_258), 0, 0, 1, 1}, {&__pyx_kp_s_26, __pyx_k_26, sizeof(__pyx_k_26), 0, 0, 1, 0}, {&__pyx_n_s_261, __pyx_k_261, sizeof(__pyx_k_261), 0, 0, 1, 1}, {&__pyx_n_s_264, __pyx_k_264, sizeof(__pyx_k_264), 0, 0, 1, 1}, {&__pyx_kp_s_27, __pyx_k_27, sizeof(__pyx_k_27), 0, 0, 1, 0}, {&__pyx_n_s_277, __pyx_k_277, sizeof(__pyx_k_277), 0, 0, 1, 1}, {&__pyx_n_s_280, __pyx_k_280, sizeof(__pyx_k_280), 0, 0, 1, 1}, {&__pyx_n_s_37, __pyx_k_37, sizeof(__pyx_k_37), 0, 0, 1, 1}, {&__pyx_kp_s_38, __pyx_k_38, sizeof(__pyx_k_38), 0, 0, 1, 0}, {&__pyx_kp_s_40, __pyx_k_40, sizeof(__pyx_k_40), 0, 0, 1, 0}, {&__pyx_kp_s_42, __pyx_k_42, sizeof(__pyx_k_42), 0, 0, 1, 0}, {&__pyx_kp_s_45, __pyx_k_45, sizeof(__pyx_k_45), 0, 0, 1, 0}, {&__pyx_kp_s_48, __pyx_k_48, sizeof(__pyx_k_48), 0, 0, 1, 0}, {&__pyx_n_s_49, __pyx_k_49, sizeof(__pyx_k_49), 0, 0, 1, 1}, {&__pyx_n_s_51, __pyx_k_51, sizeof(__pyx_k_51), 0, 0, 1, 1}, {&__pyx_n_s_52, __pyx_k_52, sizeof(__pyx_k_52), 0, 0, 1, 1}, {&__pyx_kp_s_53, __pyx_k_53, sizeof(__pyx_k_53), 0, 0, 1, 0}, {&__pyx_kp_s_54, __pyx_k_54, sizeof(__pyx_k_54), 0, 0, 1, 0}, {&__pyx_n_s_55, __pyx_k_55, sizeof(__pyx_k_55), 0, 0, 1, 1}, {&__pyx_kp_s_58, __pyx_k_58, sizeof(__pyx_k_58), 0, 0, 1, 0}, {&__pyx_kp_s_6, __pyx_k_6, sizeof(__pyx_k_6), 0, 0, 1, 0}, {&__pyx_kp_s_60, __pyx_k_60, sizeof(__pyx_k_60), 0, 0, 1, 0}, {&__pyx_kp_s_62, __pyx_k_62, sizeof(__pyx_k_62), 0, 0, 1, 0}, {&__pyx_n_s_63, __pyx_k_63, sizeof(__pyx_k_63), 0, 0, 1, 1}, {&__pyx_n_s_64, __pyx_k_64, sizeof(__pyx_k_64), 0, 0, 1, 1}, {&__pyx_n_s_65, __pyx_k_65, sizeof(__pyx_k_65), 0, 0, 1, 1}, {&__pyx_kp_s_68, __pyx_k_68, sizeof(__pyx_k_68), 0, 0, 1, 0}, {&__pyx_n_s_69, __pyx_k_69, sizeof(__pyx_k_69), 0, 0, 1, 1}, {&__pyx_kp_s_70, __pyx_k_70, sizeof(__pyx_k_70), 0, 0, 1, 0}, {&__pyx_kp_s_72, __pyx_k_72, sizeof(__pyx_k_72), 0, 0, 1, 0}, {&__pyx_kp_s_73, __pyx_k_73, sizeof(__pyx_k_73), 0, 0, 1, 0}, {&__pyx_n_s_75, __pyx_k_75, sizeof(__pyx_k_75), 0, 0, 1, 1}, {&__pyx_n_s_78, __pyx_k_78, sizeof(__pyx_k_78), 0, 0, 1, 1}, {&__pyx_kp_s_8, __pyx_k_8, sizeof(__pyx_k_8), 0, 0, 1, 0}, {&__pyx_n_s_81, __pyx_k_81, sizeof(__pyx_k_81), 0, 0, 1, 1}, {&__pyx_kp_s_82, __pyx_k_82, sizeof(__pyx_k_82), 0, 0, 1, 0}, {&__pyx_kp_s_84, __pyx_k_84, sizeof(__pyx_k_84), 0, 0, 1, 0}, {&__pyx_kp_s_89, __pyx_k_89, sizeof(__pyx_k_89), 0, 0, 1, 0}, {&__pyx_kp_s_90, __pyx_k_90, sizeof(__pyx_k_90), 0, 0, 1, 0}, {&__pyx_kp_u_93, __pyx_k_93, sizeof(__pyx_k_93), 0, 1, 0, 0}, {&__pyx_kp_u_95, __pyx_k_95, sizeof(__pyx_k_95), 0, 1, 0, 0}, {&__pyx_kp_u_97, __pyx_k_97, sizeof(__pyx_k_97), 0, 1, 0, 0}, {&__pyx_kp_u_99, __pyx_k_99, sizeof(__pyx_k_99), 0, 1, 0, 0}, {&__pyx_n_s__AttributeError, __pyx_k__AttributeError, sizeof(__pyx_k__AttributeError), 0, 0, 1, 1}, {&__pyx_n_s__C, __pyx_k__C, sizeof(__pyx_k__C), 0, 0, 1, 1}, {&__pyx_n_s__Exception, __pyx_k__Exception, sizeof(__pyx_k__Exception), 0, 0, 1, 1}, {&__pyx_n_s__F, __pyx_k__F, sizeof(__pyx_k__F), 0, 0, 1, 1}, {&__pyx_n_s__FALSE, __pyx_k__FALSE, sizeof(__pyx_k__FALSE), 0, 0, 1, 1}, {&__pyx_n_s__False, __pyx_k__False, sizeof(__pyx_k__False), 0, 0, 1, 1}, {&__pyx_n_s__ImportError, __pyx_k__ImportError, sizeof(__pyx_k__ImportError), 0, 0, 1, 1}, {&__pyx_n_s__IndexError, __pyx_k__IndexError, sizeof(__pyx_k__IndexError), 0, 0, 1, 1}, {&__pyx_n_s__InvalidApply, __pyx_k__InvalidApply, sizeof(__pyx_k__InvalidApply), 0, 0, 1, 1}, {&__pyx_n_s__LooseVersion, __pyx_k__LooseVersion, sizeof(__pyx_k__LooseVersion), 0, 0, 1, 1}, {&__pyx_n_s__N, __pyx_k__N, sizeof(__pyx_k__N), 0, 0, 1, 1}, {&__pyx_n_s__NaN, __pyx_k__NaN, sizeof(__pyx_k__NaN), 0, 0, 1, 1}, {&__pyx_n_s__NaT, __pyx_k__NaT, sizeof(__pyx_k__NaT), 0, 0, 1, 1}, {&__pyx_n_s__O, __pyx_k__O, sizeof(__pyx_k__O), 0, 0, 1, 1}, {&__pyx_n_s__OverflowError, __pyx_k__OverflowError, sizeof(__pyx_k__OverflowError), 0, 0, 1, 1}, {&__pyx_n_s__Period, __pyx_k__Period, sizeof(__pyx_k__Period), 0, 0, 1, 1}, {&__pyx_n_s__RuntimeError, __pyx_k__RuntimeError, sizeof(__pyx_k__RuntimeError), 0, 0, 1, 1}, {&__pyx_n_s__TRUE, __pyx_k__TRUE, sizeof(__pyx_k__TRUE), 0, 0, 1, 1}, {&__pyx_n_s__Timestamp, __pyx_k__Timestamp, sizeof(__pyx_k__Timestamp), 0, 0, 1, 1}, {&__pyx_n_s__True, __pyx_k__True, sizeof(__pyx_k__True), 0, 0, 1, 1}, {&__pyx_n_s__TypeError, __pyx_k__TypeError, sizeof(__pyx_k__TypeError), 0, 0, 1, 1}, {&__pyx_n_s__ValueError, __pyx_k__ValueError, sizeof(__pyx_k__ValueError), 0, 0, 1, 1}, {&__pyx_n_s___TYPE_MAP, __pyx_k___TYPE_MAP, sizeof(__pyx_k___TYPE_MAP), 0, 0, 1, 1}, {&__pyx_n_s____class__, __pyx_k____class__, sizeof(__pyx_k____class__), 0, 0, 1, 1}, {&__pyx_n_s____import__, __pyx_k____import__, sizeof(__pyx_k____import__), 0, 0, 1, 1}, {&__pyx_n_s____len__, __pyx_k____len__, sizeof(__pyx_k____len__), 0, 0, 1, 1}, {&__pyx_n_s____main__, __pyx_k____main__, sizeof(__pyx_k____main__), 0, 0, 1, 1}, {&__pyx_n_s____metaclass__, __pyx_k____metaclass__, sizeof(__pyx_k____metaclass__), 0, 0, 1, 1}, {&__pyx_n_s____module__, __pyx_k____module__, sizeof(__pyx_k____module__), 0, 0, 1, 1}, {&__pyx_n_s____name__, __pyx_k____name__, sizeof(__pyx_k____name__), 0, 0, 1, 1}, {&__pyx_n_s____pyx_getbuffer, __pyx_k____pyx_getbuffer, sizeof(__pyx_k____pyx_getbuffer), 0, 0, 1, 1}, {&__pyx_n_s____pyx_releasebuffer, __pyx_k____pyx_releasebuffer, sizeof(__pyx_k____pyx_releasebuffer), 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____qualname__, __pyx_k____qualname__, sizeof(__pyx_k____qualname__), 0, 0, 1, 1}, {&__pyx_n_s____setattr__, __pyx_k____setattr__, sizeof(__pyx_k____setattr__), 0, 0, 1, 1}, {&__pyx_n_s____test__, __pyx_k____test__, sizeof(__pyx_k____test__), 0, 0, 1, 1}, {&__pyx_n_s____version__, __pyx_k____version__, sizeof(__pyx_k____version__), 0, 0, 1, 1}, {&__pyx_n_s___block, __pyx_k___block, sizeof(__pyx_k___block), 0, 0, 1, 1}, {&__pyx_n_s___cache, __pyx_k___cache, sizeof(__pyx_k___cache), 0, 0, 1, 1}, {&__pyx_n_s___check_dummy, __pyx_k___check_dummy, sizeof(__pyx_k___check_dummy), 0, 0, 1, 1}, {&__pyx_n_s___data, __pyx_k___data, sizeof(__pyx_k___data), 0, 0, 1, 1}, {&__pyx_n_s___engine, __pyx_k___engine, sizeof(__pyx_k___engine), 0, 0, 1, 1}, {&__pyx_n_s___get_result_array, __pyx_k___get_result_array, sizeof(__pyx_k___get_result_array), 0, 0, 1, 1}, {&__pyx_n_s___index, __pyx_k___index, sizeof(__pyx_k___index), 0, 0, 1, 1}, {&__pyx_n_s___item_cache, __pyx_k___item_cache, sizeof(__pyx_k___item_cache), 0, 0, 1, 1}, {&__pyx_n_s___set_axis, __pyx_k___set_axis, sizeof(__pyx_k___set_axis), 0, 0, 1, 1}, {&__pyx_n_s___values, __pyx_k___values, sizeof(__pyx_k___values), 0, 0, 1, 1}, {&__pyx_n_s__advance, __pyx_k__advance, sizeof(__pyx_k__advance), 0, 0, 1, 1}, {&__pyx_n_s__all_arrays, __pyx_k__all_arrays, sizeof(__pyx_k__all_arrays), 0, 0, 1, 1}, {&__pyx_n_s__allow_setting, __pyx_k__allow_setting, sizeof(__pyx_k__allow_setting), 0, 0, 1, 1}, {&__pyx_n_s__apply_frame_axis0, __pyx_k__apply_frame_axis0, sizeof(__pyx_k__apply_frame_axis0), 0, 0, 1, 1}, {&__pyx_n_s__args, __pyx_k__args, sizeof(__pyx_k__args), 0, 0, 1, 1}, {&__pyx_n_s__arobj, __pyx_k__arobj, sizeof(__pyx_k__arobj), 0, 0, 1, 1}, {&__pyx_n_s__arr, __pyx_k__arr, sizeof(__pyx_k__arr), 0, 0, 1, 1}, {&__pyx_n_s__array_to_timestamp, __pyx_k__array_to_timestamp, sizeof(__pyx_k__array_to_timestamp), 0, 0, 1, 1}, {&__pyx_n_s__arrays, __pyx_k__arrays, sizeof(__pyx_k__arrays), 0, 0, 1, 1}, {&__pyx_n_s__arrmap, __pyx_k__arrmap, sizeof(__pyx_k__arrmap), 0, 0, 1, 1}, {&__pyx_n_s__astype, __pyx_k__astype, sizeof(__pyx_k__astype), 0, 0, 1, 1}, {&__pyx_n_s__astype_intsafe, __pyx_k__astype_intsafe, sizeof(__pyx_k__astype_intsafe), 0, 0, 1, 1}, {&__pyx_n_s__axes, __pyx_k__axes, sizeof(__pyx_k__axes), 0, 0, 1, 1}, {&__pyx_n_s__axis, __pyx_k__axis, sizeof(__pyx_k__axis), 0, 0, 1, 1}, {&__pyx_n_s__bc, __pyx_k__bc, sizeof(__pyx_k__bc), 0, 0, 1, 1}, {&__pyx_n_s__binner, __pyx_k__binner, sizeof(__pyx_k__binner), 0, 0, 1, 1}, {&__pyx_n_s__bins, __pyx_k__bins, sizeof(__pyx_k__bins), 0, 0, 1, 1}, {&__pyx_n_s__blocks, __pyx_k__blocks, sizeof(__pyx_k__blocks), 0, 0, 1, 1}, {&__pyx_n_s__bool_, __pyx_k__bool_, sizeof(__pyx_k__bool_), 0, 0, 1, 1}, {&__pyx_n_s__boolean, __pyx_k__boolean, sizeof(__pyx_k__boolean), 0, 0, 1, 1}, {&__pyx_n_s__bools, __pyx_k__bools, sizeof(__pyx_k__bools), 0, 0, 1, 1}, {&__pyx_n_s__buf, __pyx_k__buf, sizeof(__pyx_k__buf), 0, 0, 1, 1}, {&__pyx_n_s__c16, __pyx_k__c16, sizeof(__pyx_k__c16), 0, 0, 1, 1}, {&__pyx_n_s__c_contiguous, __pyx_k__c_contiguous, sizeof(__pyx_k__c_contiguous), 0, 0, 1, 1}, {&__pyx_n_s__cache, __pyx_k__cache, sizeof(__pyx_k__cache), 0, 0, 1, 1}, {&__pyx_n_s__chunk, __pyx_k__chunk, sizeof(__pyx_k__chunk), 0, 0, 1, 1}, {&__pyx_n_s__clean_index_list, __pyx_k__clean_index_list, sizeof(__pyx_k__clean_index_list), 0, 0, 1, 1}, {&__pyx_n_s__clear_mapping, __pyx_k__clear_mapping, sizeof(__pyx_k__clear_mapping), 0, 0, 1, 1}, {&__pyx_n_s__closed, __pyx_k__closed, sizeof(__pyx_k__closed), 0, 0, 1, 1}, {&__pyx_n_s__coerce_numeric, __pyx_k__coerce_numeric, sizeof(__pyx_k__coerce_numeric), 0, 0, 1, 1}, {&__pyx_n_s__col, __pyx_k__col, sizeof(__pyx_k__col), 0, 0, 1, 1}, {&__pyx_n_s__cols, __pyx_k__cols, sizeof(__pyx_k__cols), 0, 0, 1, 1}, {&__pyx_n_s__columns, __pyx_k__columns, sizeof(__pyx_k__columns), 0, 0, 1, 1}, {&__pyx_n_s__complex, __pyx_k__complex, sizeof(__pyx_k__complex), 0, 0, 1, 1}, {&__pyx_n_s__complex128, __pyx_k__complex128, sizeof(__pyx_k__complex128), 0, 0, 1, 1}, {&__pyx_n_s__complex256, __pyx_k__complex256, sizeof(__pyx_k__complex256), 0, 0, 1, 1}, {&__pyx_n_s__complexes, __pyx_k__complexes, sizeof(__pyx_k__complexes), 0, 0, 1, 1}, {&__pyx_n_s__contiguous, __pyx_k__contiguous, sizeof(__pyx_k__contiguous), 0, 0, 1, 1}, {&__pyx_n_s__convert, __pyx_k__convert, sizeof(__pyx_k__convert), 0, 0, 1, 1}, {&__pyx_n_s__convert_datetime, __pyx_k__convert_datetime, sizeof(__pyx_k__convert_datetime), 0, 0, 1, 1}, {&__pyx_n_s__convert_empty, __pyx_k__convert_empty, sizeof(__pyx_k__convert_empty), 0, 0, 1, 1}, {&__pyx_n_s__convert_sql_column, __pyx_k__convert_sql_column, sizeof(__pyx_k__convert_sql_column), 0, 0, 1, 1}, {&__pyx_n_s__convert_timedelta, __pyx_k__convert_timedelta, sizeof(__pyx_k__convert_timedelta), 0, 0, 1, 1}, {&__pyx_n_s__convert_timestamps, __pyx_k__convert_timestamps, sizeof(__pyx_k__convert_timestamps), 0, 0, 1, 1}, {&__pyx_n_s__converted, __pyx_k__converted, sizeof(__pyx_k__converted), 0, 0, 1, 1}, {&__pyx_n_s__copy, __pyx_k__copy, sizeof(__pyx_k__copy), 0, 0, 1, 1}, {&__pyx_n_s__count_level_1d, __pyx_k__count_level_1d, sizeof(__pyx_k__count_level_1d), 0, 0, 1, 1}, {&__pyx_n_s__count_level_2d, __pyx_k__count_level_2d, sizeof(__pyx_k__count_level_2d), 0, 0, 1, 1}, {&__pyx_n_s__counts, __pyx_k__counts, sizeof(__pyx_k__counts), 0, 0, 1, 1}, {&__pyx_n_s__cur, __pyx_k__cur, sizeof(__pyx_k__cur), 0, 0, 1, 1}, {&__pyx_n_s__d, __pyx_k__d, sizeof(__pyx_k__d), 0, 0, 1, 1}, {&__pyx_n_s__data, __pyx_k__data, sizeof(__pyx_k__data), 0, 0, 1, 1}, {&__pyx_n_s__data_index, __pyx_k__data_index, sizeof(__pyx_k__data_index), 0, 0, 1, 1}, {&__pyx_n_s__date, __pyx_k__date, sizeof(__pyx_k__date), 0, 0, 1, 1}, {&__pyx_n_s__date_parser, __pyx_k__date_parser, sizeof(__pyx_k__date_parser), 0, 0, 1, 1}, {&__pyx_n_s__dates, __pyx_k__dates, sizeof(__pyx_k__dates), 0, 0, 1, 1}, {&__pyx_n_s__datetime, __pyx_k__datetime, sizeof(__pyx_k__datetime), 0, 0, 1, 1}, {&__pyx_n_s__datetime64, __pyx_k__datetime64, sizeof(__pyx_k__datetime64), 0, 0, 1, 1}, {&__pyx_n_s__datetimes, __pyx_k__datetimes, sizeof(__pyx_k__datetimes), 0, 0, 1, 1}, {&__pyx_n_s__day, __pyx_k__day, sizeof(__pyx_k__day), 0, 0, 1, 1}, {&__pyx_n_s__dayfirst, __pyx_k__dayfirst, sizeof(__pyx_k__dayfirst), 0, 0, 1, 1}, {&__pyx_n_s__days, __pyx_k__days, sizeof(__pyx_k__days), 0, 0, 1, 1}, {&__pyx_n_s__default, __pyx_k__default, sizeof(__pyx_k__default), 0, 0, 1, 1}, {&__pyx_n_s__dicts, __pyx_k__dicts, sizeof(__pyx_k__dicts), 0, 0, 1, 1}, {&__pyx_n_s__dicts_to_array, __pyx_k__dicts_to_array, sizeof(__pyx_k__dicts_to_array), 0, 0, 1, 1}, {&__pyx_n_s__doc, __pyx_k__doc, sizeof(__pyx_k__doc), 0, 0, 1, 1}, {&__pyx_n_s__dtype, __pyx_k__dtype, sizeof(__pyx_k__dtype), 0, 0, 1, 1}, {&__pyx_n_s__dummy, __pyx_k__dummy, sizeof(__pyx_k__dummy), 0, 0, 1, 1}, {&__pyx_n_s__duplicated, __pyx_k__duplicated, sizeof(__pyx_k__duplicated), 0, 0, 1, 1}, {&__pyx_n_s__empty, __pyx_k__empty, sizeof(__pyx_k__empty), 0, 0, 1, 1}, {&__pyx_n_s__end, __pyx_k__end, sizeof(__pyx_k__end), 0, 0, 1, 1}, {&__pyx_n_s__ends, __pyx_k__ends, sizeof(__pyx_k__ends), 0, 0, 1, 1}, {&__pyx_n_s__enumerate, __pyx_k__enumerate, sizeof(__pyx_k__enumerate), 0, 0, 1, 1}, {&__pyx_n_s__eq, __pyx_k__eq, sizeof(__pyx_k__eq), 0, 0, 1, 1}, {&__pyx_n_s__f, __pyx_k__f, sizeof(__pyx_k__f), 0, 0, 1, 1}, {&__pyx_n_s__f8, __pyx_k__f8, sizeof(__pyx_k__f8), 0, 0, 1, 1}, {&__pyx_n_s__f_contiguous, __pyx_k__f_contiguous, sizeof(__pyx_k__f_contiguous), 0, 0, 1, 1}, {&__pyx_n_s__false, __pyx_k__false, sizeof(__pyx_k__false), 0, 0, 1, 1}, {&__pyx_n_s__false_vals, __pyx_k__false_vals, sizeof(__pyx_k__false_vals), 0, 0, 1, 1}, {&__pyx_n_s__false_values, __pyx_k__false_values, sizeof(__pyx_k__false_values), 0, 0, 1, 1}, {&__pyx_n_s__fast_multiget, __pyx_k__fast_multiget, sizeof(__pyx_k__fast_multiget), 0, 0, 1, 1}, {&__pyx_n_s__fast_unique, __pyx_k__fast_unique, sizeof(__pyx_k__fast_unique), 0, 0, 1, 1}, {&__pyx_n_s__fast_zip, __pyx_k__fast_zip, sizeof(__pyx_k__fast_zip), 0, 0, 1, 1}, {&__pyx_n_s__fast_zip_fillna, __pyx_k__fast_zip_fillna, sizeof(__pyx_k__fast_zip_fillna), 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__finished, __pyx_k__finished, sizeof(__pyx_k__finished), 0, 0, 1, 1}, {&__pyx_n_s__flag, __pyx_k__flag, sizeof(__pyx_k__flag), 0, 0, 1, 1}, {&__pyx_n_s__flags, __pyx_k__flags, sizeof(__pyx_k__flags), 0, 0, 1, 1}, {&__pyx_n_s__float128, __pyx_k__float128, sizeof(__pyx_k__float128), 0, 0, 1, 1}, {&__pyx_n_s__float16, __pyx_k__float16, sizeof(__pyx_k__float16), 0, 0, 1, 1}, {&__pyx_n_s__float32, __pyx_k__float32, sizeof(__pyx_k__float32), 0, 0, 1, 1}, {&__pyx_n_s__float64, __pyx_k__float64, sizeof(__pyx_k__float64), 0, 0, 1, 1}, {&__pyx_n_s__float_secs, __pyx_k__float_secs, sizeof(__pyx_k__float_secs), 0, 0, 1, 1}, {&__pyx_n_s__floating, __pyx_k__floating, sizeof(__pyx_k__floating), 0, 0, 1, 1}, {&__pyx_n_s__floats, __pyx_k__floats, sizeof(__pyx_k__floats), 0, 0, 1, 1}, {&__pyx_n_s__fnan, __pyx_k__fnan, sizeof(__pyx_k__fnan), 0, 0, 1, 1}, {&__pyx_n_s__frame, __pyx_k__frame, sizeof(__pyx_k__frame), 0, 0, 1, 1}, {&__pyx_n_s__fromtimestamp, __pyx_k__fromtimestamp, sizeof(__pyx_k__fromtimestamp), 0, 0, 1, 1}, {&__pyx_n_s__func, __pyx_k__func, sizeof(__pyx_k__func), 0, 0, 1, 1}, {&__pyx_n_s__fval, __pyx_k__fval, sizeof(__pyx_k__fval), 0, 0, 1, 1}, {&__pyx_n_s__ge, __pyx_k__ge, sizeof(__pyx_k__ge), 0, 0, 1, 1}, {&__pyx_n_s__gen, __pyx_k__gen, sizeof(__pyx_k__gen), 0, 0, 1, 1}, {&__pyx_n_s__generate_bins_dt64, __pyx_k__generate_bins_dt64, sizeof(__pyx_k__generate_bins_dt64), 0, 0, 1, 1}, {&__pyx_n_s__generate_slices, __pyx_k__generate_slices, sizeof(__pyx_k__generate_slices), 0, 0, 1, 1}, {&__pyx_n_s__get_result, __pyx_k__get_result, sizeof(__pyx_k__get_result), 0, 0, 1, 1}, {&__pyx_n_s__get_reverse_indexer, __pyx_k__get_reverse_indexer, sizeof(__pyx_k__get_reverse_indexer), 0, 0, 1, 1}, {&__pyx_n_s__gin, __pyx_k__gin, sizeof(__pyx_k__gin), 0, 0, 1, 1}, {&__pyx_n_s__group_count, __pyx_k__group_count, sizeof(__pyx_k__group_count), 0, 0, 1, 1}, {&__pyx_n_s__group_size, __pyx_k__group_size, sizeof(__pyx_k__group_size), 0, 0, 1, 1}, {&__pyx_n_s__gt, __pyx_k__gt, sizeof(__pyx_k__gt), 0, 0, 1, 1}, {&__pyx_n_s__has_infs_f4, __pyx_k__has_infs_f4, sizeof(__pyx_k__has_infs_f4), 0, 0, 1, 1}, {&__pyx_n_s__has_infs_f8, __pyx_k__has_infs_f8, sizeof(__pyx_k__has_infs_f8), 0, 0, 1, 1}, {&__pyx_n_s__hour, __pyx_k__hour, sizeof(__pyx_k__hour), 0, 0, 1, 1}, {&__pyx_n_s__hours, __pyx_k__hours, sizeof(__pyx_k__hours), 0, 0, 1, 1}, {&__pyx_n_s__i, __pyx_k__i, sizeof(__pyx_k__i), 0, 0, 1, 1}, {&__pyx_n_s__i8, __pyx_k__i8, sizeof(__pyx_k__i8), 0, 0, 1, 1}, {&__pyx_n_s__iNaT, __pyx_k__iNaT, sizeof(__pyx_k__iNaT), 0, 0, 1, 1}, {&__pyx_n_s__idatetimes, __pyx_k__idatetimes, sizeof(__pyx_k__idatetimes), 0, 0, 1, 1}, {&__pyx_n_s__idx, __pyx_k__idx, sizeof(__pyx_k__idx), 0, 0, 1, 1}, {&__pyx_n_s__index, __pyx_k__index, sizeof(__pyx_k__index), 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__indices_fast, __pyx_k__indices_fast, sizeof(__pyx_k__indices_fast), 0, 0, 1, 1}, {&__pyx_n_s__inf, __pyx_k__inf, sizeof(__pyx_k__inf), 0, 0, 1, 1}, {&__pyx_n_s__infer_dtype, __pyx_k__infer_dtype, sizeof(__pyx_k__infer_dtype), 0, 0, 1, 1}, {&__pyx_n_s__infer_dtype_list, __pyx_k__infer_dtype_list, sizeof(__pyx_k__infer_dtype_list), 0, 0, 1, 1}, {&__pyx_n_s__int16, __pyx_k__int16, sizeof(__pyx_k__int16), 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__integer, __pyx_k__integer, sizeof(__pyx_k__integer), 0, 0, 1, 1}, {&__pyx_n_s__ints, __pyx_k__ints, sizeof(__pyx_k__ints), 0, 0, 1, 1}, {&__pyx_n_s__is_bool_array, __pyx_k__is_bool_array, sizeof(__pyx_k__is_bool_array), 0, 0, 1, 1}, {&__pyx_n_s__is_date_array, __pyx_k__is_date_array, sizeof(__pyx_k__is_date_array), 0, 0, 1, 1}, {&__pyx_n_s__is_datelike, __pyx_k__is_datelike, sizeof(__pyx_k__is_datelike), 0, 0, 1, 1}, {&__pyx_n_s__is_datetime64_array, __pyx_k__is_datetime64_array, sizeof(__pyx_k__is_datetime64_array), 0, 0, 1, 1}, {&__pyx_n_s__is_datetime_array, __pyx_k__is_datetime_array, sizeof(__pyx_k__is_datetime_array), 0, 0, 1, 1}, {&__pyx_n_s__is_float_array, __pyx_k__is_float_array, sizeof(__pyx_k__is_float_array), 0, 0, 1, 1}, {&__pyx_n_s__is_integer, __pyx_k__is_integer, sizeof(__pyx_k__is_integer), 0, 0, 1, 1}, {&__pyx_n_s__is_integer_array, __pyx_k__is_integer_array, sizeof(__pyx_k__is_integer_array), 0, 0, 1, 1}, {&__pyx_n_s__is_lexsorted, __pyx_k__is_lexsorted, sizeof(__pyx_k__is_lexsorted), 0, 0, 1, 1}, {&__pyx_n_s__is_period, __pyx_k__is_period, sizeof(__pyx_k__is_period), 0, 0, 1, 1}, {&__pyx_n_s__is_period_array, __pyx_k__is_period_array, sizeof(__pyx_k__is_period_array), 0, 0, 1, 1}, {&__pyx_n_s__is_string_array, __pyx_k__is_string_array, sizeof(__pyx_k__is_string_array), 0, 0, 1, 1}, {&__pyx_n_s__is_time_array, __pyx_k__is_time_array, sizeof(__pyx_k__is_time_array), 0, 0, 1, 1}, {&__pyx_n_s__is_timedelta_array, __pyx_k__is_timedelta_array, sizeof(__pyx_k__is_timedelta_array), 0, 0, 1, 1}, {&__pyx_n_s__is_unicode_array, __pyx_k__is_unicode_array, sizeof(__pyx_k__is_unicode_array), 0, 0, 1, 1}, {&__pyx_n_s__ismember, __pyx_k__ismember, sizeof(__pyx_k__ismember), 0, 0, 1, 1}, {&__pyx_n_s__isnan, __pyx_k__isnan, sizeof(__pyx_k__isnan), 0, 0, 1, 1}, {&__pyx_n_s__isnullobj, __pyx_k__isnullobj, sizeof(__pyx_k__isnullobj), 0, 0, 1, 1}, {&__pyx_n_s__isnullobj2d, __pyx_k__isnullobj2d, sizeof(__pyx_k__isnullobj2d), 0, 0, 1, 1}, {&__pyx_n_s__isnullobj2d_old, __pyx_k__isnullobj2d_old, sizeof(__pyx_k__isnullobj2d_old), 0, 0, 1, 1}, {&__pyx_n_s__isnullobj_old, __pyx_k__isnullobj_old, sizeof(__pyx_k__isnullobj_old), 0, 0, 1, 1}, {&__pyx_n_s__isscalar, __pyx_k__isscalar, sizeof(__pyx_k__isscalar), 0, 0, 1, 1}, {&__pyx_n_s__it, __pyx_k__it, sizeof(__pyx_k__it), 0, 0, 1, 1}, {&__pyx_n_s__item, __pyx_k__item, sizeof(__pyx_k__item), 0, 0, 1, 1}, {&__pyx_n_s__item_cache, __pyx_k__item_cache, sizeof(__pyx_k__item_cache), 0, 0, 1, 1}, {&__pyx_n_s__itemsize, __pyx_k__itemsize, sizeof(__pyx_k__itemsize), 0, 0, 1, 1}, {&__pyx_n_s__itimedeltas, __pyx_k__itimedeltas, sizeof(__pyx_k__itimedeltas), 0, 0, 1, 1}, {&__pyx_n_s__j, __pyx_k__j, sizeof(__pyx_k__j), 0, 0, 1, 1}, {&__pyx_n_s__k, __pyx_k__k, sizeof(__pyx_k__k), 0, 0, 1, 1}, {&__pyx_n_s__keys, __pyx_k__keys, sizeof(__pyx_k__keys), 0, 0, 1, 1}, {&__pyx_n_s__l, __pyx_k__l, sizeof(__pyx_k__l), 0, 0, 1, 1}, {&__pyx_n_s__l_bin, __pyx_k__l_bin, sizeof(__pyx_k__l_bin), 0, 0, 1, 1}, {&__pyx_n_s__lab, __pyx_k__lab, sizeof(__pyx_k__lab), 0, 0, 1, 1}, {&__pyx_n_s__labels, __pyx_k__labels, sizeof(__pyx_k__labels), 0, 0, 1, 1}, {&__pyx_n_s__le, __pyx_k__le, sizeof(__pyx_k__le), 0, 0, 1, 1}, {&__pyx_n_s__left, __pyx_k__left, sizeof(__pyx_k__left), 0, 0, 1, 1}, {&__pyx_n_s__lenbin, __pyx_k__lenbin, sizeof(__pyx_k__lenbin), 0, 0, 1, 1}, {&__pyx_n_s__length, __pyx_k__length, sizeof(__pyx_k__length), 0, 0, 1, 1}, {&__pyx_n_s__lenidx, __pyx_k__lenidx, sizeof(__pyx_k__lenidx), 0, 0, 1, 1}, {&__pyx_n_s__list_of_arrays, __pyx_k__list_of_arrays, sizeof(__pyx_k__list_of_arrays), 0, 0, 1, 1}, {&__pyx_n_s__lists, __pyx_k__lists, sizeof(__pyx_k__lists), 0, 0, 1, 1}, {&__pyx_n_s__lookup_values, __pyx_k__lookup_values, sizeof(__pyx_k__lookup_values), 0, 0, 1, 1}, {&__pyx_n_s__lt, __pyx_k__lt, sizeof(__pyx_k__lt), 0, 0, 1, 1}, {&__pyx_n_s__m, __pyx_k__m, sizeof(__pyx_k__m), 0, 0, 1, 1}, {&__pyx_n_s__map_infer, __pyx_k__map_infer, sizeof(__pyx_k__map_infer), 0, 0, 1, 1}, {&__pyx_n_s__map_infer_mask, __pyx_k__map_infer_mask, sizeof(__pyx_k__map_infer_mask), 0, 0, 1, 1}, {&__pyx_n_s__mapping, __pyx_k__mapping, sizeof(__pyx_k__mapping), 0, 0, 1, 1}, {&__pyx_n_s__mask, __pyx_k__mask, sizeof(__pyx_k__mask), 0, 0, 1, 1}, {&__pyx_n_s__max_bin, __pyx_k__max_bin, sizeof(__pyx_k__max_bin), 0, 0, 1, 1}, {&__pyx_n_s__maybe_convert_bool, __pyx_k__maybe_convert_bool, sizeof(__pyx_k__maybe_convert_bool), 0, 0, 1, 1}, {&__pyx_n_s__memo, __pyx_k__memo, sizeof(__pyx_k__memo), 0, 0, 1, 1}, {&__pyx_n_s__micros, __pyx_k__micros, sizeof(__pyx_k__micros), 0, 0, 1, 1}, {&__pyx_n_s__microsecond, __pyx_k__microsecond, sizeof(__pyx_k__microsecond), 0, 0, 1, 1}, {&__pyx_n_s__minute, __pyx_k__minute, sizeof(__pyx_k__minute), 0, 0, 1, 1}, {&__pyx_n_s__minutes, __pyx_k__minutes, sizeof(__pyx_k__minutes), 0, 0, 1, 1}, {&__pyx_n_s__mixed, __pyx_k__mixed, sizeof(__pyx_k__mixed), 0, 0, 1, 1}, {&__pyx_n_s__month, __pyx_k__month, sizeof(__pyx_k__month), 0, 0, 1, 1}, {&__pyx_n_s__months, __pyx_k__months, sizeof(__pyx_k__months), 0, 0, 1, 1}, {&__pyx_n_s__move, __pyx_k__move, sizeof(__pyx_k__move), 0, 0, 1, 1}, {&__pyx_n_s__mutated, __pyx_k__mutated, sizeof(__pyx_k__mutated), 0, 0, 1, 1}, {&__pyx_n_s__n, __pyx_k__n, sizeof(__pyx_k__n), 0, 0, 1, 1}, {&__pyx_n_s__na_count, __pyx_k__na_count, sizeof(__pyx_k__na_count), 0, 0, 1, 1}, {&__pyx_n_s__na_values, __pyx_k__na_values, sizeof(__pyx_k__na_values), 0, 0, 1, 1}, {&__pyx_n_s__name, __pyx_k__name, sizeof(__pyx_k__name), 0, 0, 1, 1}, {&__pyx_n_s__names, __pyx_k__names, sizeof(__pyx_k__names), 0, 0, 1, 1}, {&__pyx_n_s__nan, __pyx_k__nan, sizeof(__pyx_k__nan), 0, 0, 1, 1}, {&__pyx_n_s__nan_rep, __pyx_k__nan_rep, sizeof(__pyx_k__nan_rep), 0, 0, 1, 1}, {&__pyx_n_s__ncols, __pyx_k__ncols, sizeof(__pyx_k__ncols), 0, 0, 1, 1}, {&__pyx_n_s__ndarrays, __pyx_k__ndarrays, sizeof(__pyx_k__ndarrays), 0, 0, 1, 1}, {&__pyx_n_s__ndim, __pyx_k__ndim, sizeof(__pyx_k__ndim), 0, 0, 1, 1}, {&__pyx_n_s__ne, __pyx_k__ne, sizeof(__pyx_k__ne), 0, 0, 1, 1}, {&__pyx_n_s__neginf, __pyx_k__neginf, sizeof(__pyx_k__neginf), 0, 0, 1, 1}, {&__pyx_n_s__new_dtype, __pyx_k__new_dtype, sizeof(__pyx_k__new_dtype), 0, 0, 1, 1}, {&__pyx_n_s__ngroups, __pyx_k__ngroups, sizeof(__pyx_k__ngroups), 0, 0, 1, 1}, {&__pyx_n_s__nlevels, __pyx_k__nlevels, sizeof(__pyx_k__nlevels), 0, 0, 1, 1}, {&__pyx_n_s__now, __pyx_k__now, sizeof(__pyx_k__now), 0, 0, 1, 1}, {&__pyx_n_s__np, __pyx_k__np, sizeof(__pyx_k__np), 0, 0, 1, 1}, {&__pyx_n_s__ns, __pyx_k__ns, sizeof(__pyx_k__ns), 0, 0, 1, 1}, {&__pyx_n_s__numpy, __pyx_k__numpy, sizeof(__pyx_k__numpy), 0, 0, 1, 1}, {&__pyx_n_s__o, __pyx_k__o, sizeof(__pyx_k__o), 0, 0, 1, 1}, {&__pyx_n_s__obj, __pyx_k__obj, sizeof(__pyx_k__obj), 0, 0, 1, 1}, {&__pyx_n_s__objbuf, __pyx_k__objbuf, sizeof(__pyx_k__objbuf), 0, 0, 1, 1}, {&__pyx_n_s__object, __pyx_k__object, sizeof(__pyx_k__object), 0, 0, 1, 1}, {&__pyx_n_s__object_, __pyx_k__object_, sizeof(__pyx_k__object_), 0, 0, 1, 1}, {&__pyx_n_s__objects, __pyx_k__objects, sizeof(__pyx_k__objects), 0, 0, 1, 1}, {&__pyx_n_s__onan, __pyx_k__onan, sizeof(__pyx_k__onan), 0, 0, 1, 1}, {&__pyx_n_s__op, __pyx_k__op, sizeof(__pyx_k__op), 0, 0, 1, 1}, {&__pyx_n_s__operator, __pyx_k__operator, sizeof(__pyx_k__operator), 0, 0, 1, 1}, {&__pyx_n_s__out, __pyx_k__out, sizeof(__pyx_k__out), 0, 0, 1, 1}, {&__pyx_n_s__output, __pyx_k__output, sizeof(__pyx_k__output), 0, 0, 1, 1}, {&__pyx_n_s__pandas, __pyx_k__pandas, sizeof(__pyx_k__pandas), 0, 0, 1, 1}, {&__pyx_n_s__pandas_null, __pyx_k__pandas_null, sizeof(__pyx_k__pandas_null), 0, 0, 1, 1}, {&__pyx_n_s__parse, __pyx_k__parse, sizeof(__pyx_k__parse), 0, 0, 1, 1}, {&__pyx_n_s__parse_date, __pyx_k__parse_date, sizeof(__pyx_k__parse_date), 0, 0, 1, 1}, {&__pyx_n_s__parse_time, __pyx_k__parse_time, sizeof(__pyx_k__parse_time), 0, 0, 1, 1}, {&__pyx_n_s__parser, __pyx_k__parser, sizeof(__pyx_k__parser), 0, 0, 1, 1}, {&__pyx_n_s__period, __pyx_k__period, sizeof(__pyx_k__period), 0, 0, 1, 1}, {&__pyx_n_s__piece, __pyx_k__piece, sizeof(__pyx_k__piece), 0, 0, 1, 1}, {&__pyx_n_s__pos, __pyx_k__pos, sizeof(__pyx_k__pos), 0, 0, 1, 1}, {&__pyx_n_s__pre, __pyx_k__pre, sizeof(__pyx_k__pre), 0, 0, 1, 1}, {&__pyx_n_s__putmask, __pyx_k__putmask, sizeof(__pyx_k__putmask), 0, 0, 1, 1}, {&__pyx_n_s__pydate, __pyx_k__pydate, sizeof(__pyx_k__pydate), 0, 0, 1, 1}, {&__pyx_n_s__pydatetime, __pyx_k__pydatetime, sizeof(__pyx_k__pydatetime), 0, 0, 1, 1}, {&__pyx_n_s__r_bin, __pyx_k__r_bin, sizeof(__pyx_k__r_bin), 0, 0, 1, 1}, {&__pyx_n_s__range, __pyx_k__range, sizeof(__pyx_k__range), 0, 0, 1, 1}, {&__pyx_n_s__ravel, __pyx_k__ravel, sizeof(__pyx_k__ravel), 0, 0, 1, 1}, {&__pyx_n_s__reduce, __pyx_k__reduce, sizeof(__pyx_k__reduce), 0, 0, 1, 1}, {&__pyx_n_s__reducer, __pyx_k__reducer, sizeof(__pyx_k__reducer), 0, 0, 1, 1}, {&__pyx_n_s__replace, __pyx_k__replace, sizeof(__pyx_k__replace), 0, 0, 1, 1}, {&__pyx_n_s__repr_timedelta64, __pyx_k__repr_timedelta64, sizeof(__pyx_k__repr_timedelta64), 0, 0, 1, 1}, {&__pyx_n_s__reset, __pyx_k__reset, sizeof(__pyx_k__reset), 0, 0, 1, 1}, {&__pyx_n_s__result, __pyx_k__result, sizeof(__pyx_k__result), 0, 0, 1, 1}, {&__pyx_n_s__results, __pyx_k__results, sizeof(__pyx_k__results), 0, 0, 1, 1}, {&__pyx_n_s__rev_indexer, __pyx_k__rev_indexer, sizeof(__pyx_k__rev_indexer), 0, 0, 1, 1}, {&__pyx_n_s__right, __pyx_k__right, sizeof(__pyx_k__right), 0, 0, 1, 1}, {&__pyx_n_s__right_closed, __pyx_k__right_closed, sizeof(__pyx_k__right_closed), 0, 0, 1, 1}, {&__pyx_n_s__row, __pyx_k__row, sizeof(__pyx_k__row), 0, 0, 1, 1}, {&__pyx_n_s__row_bool_subset, __pyx_k__row_bool_subset, sizeof(__pyx_k__row_bool_subset), 0, 0, 1, 1}, {&__pyx_n_s__rows, __pyx_k__rows, sizeof(__pyx_k__rows), 0, 0, 1, 1}, {&__pyx_n_s__s, __pyx_k__s, sizeof(__pyx_k__s), 0, 0, 1, 1}, {&__pyx_n_s__safe, __pyx_k__safe, sizeof(__pyx_k__safe), 0, 0, 1, 1}, {&__pyx_n_s__sanitize_objects, __pyx_k__sanitize_objects, sizeof(__pyx_k__sanitize_objects), 0, 0, 1, 1}, {&__pyx_n_s__scalar_binop, __pyx_k__scalar_binop, sizeof(__pyx_k__scalar_binop), 0, 0, 1, 1}, {&__pyx_n_s__scalar_compare, __pyx_k__scalar_compare, sizeof(__pyx_k__scalar_compare), 0, 0, 1, 1}, {&__pyx_n_s__second, __pyx_k__second, sizeof(__pyx_k__second), 0, 0, 1, 1}, {&__pyx_n_s__seconds, __pyx_k__seconds, sizeof(__pyx_k__seconds), 0, 0, 1, 1}, {&__pyx_n_s__secs, __pyx_k__secs, sizeof(__pyx_k__secs), 0, 0, 1, 1}, {&__pyx_n_s__seen, __pyx_k__seen, sizeof(__pyx_k__seen), 0, 0, 1, 1}, {&__pyx_n_s__seen_bool, __pyx_k__seen_bool, sizeof(__pyx_k__seen_bool), 0, 0, 1, 1}, {&__pyx_n_s__seen_complex, __pyx_k__seen_complex, sizeof(__pyx_k__seen_complex), 0, 0, 1, 1}, {&__pyx_n_s__seen_datetime, __pyx_k__seen_datetime, sizeof(__pyx_k__seen_datetime), 0, 0, 1, 1}, {&__pyx_n_s__seen_float, __pyx_k__seen_float, sizeof(__pyx_k__seen_float), 0, 0, 1, 1}, {&__pyx_n_s__seen_int, __pyx_k__seen_int, sizeof(__pyx_k__seen_int), 0, 0, 1, 1}, {&__pyx_n_s__seen_null, __pyx_k__seen_null, sizeof(__pyx_k__seen_null), 0, 0, 1, 1}, {&__pyx_n_s__seen_numeric, __pyx_k__seen_numeric, sizeof(__pyx_k__seen_numeric), 0, 0, 1, 1}, {&__pyx_n_s__seen_object, __pyx_k__seen_object, sizeof(__pyx_k__seen_object), 0, 0, 1, 1}, {&__pyx_n_s__seen_timedelta, __pyx_k__seen_timedelta, sizeof(__pyx_k__seen_timedelta), 0, 0, 1, 1}, {&__pyx_n_s__series, __pyx_k__series, sizeof(__pyx_k__series), 0, 0, 1, 1}, {&__pyx_n_s__set_length, __pyx_k__set_length, sizeof(__pyx_k__set_length), 0, 0, 1, 1}, {&__pyx_n_s__shape, __pyx_k__shape, sizeof(__pyx_k__shape), 0, 0, 1, 1}, {&__pyx_n_s__shape_before, __pyx_k__shape_before, sizeof(__pyx_k__shape_before), 0, 0, 1, 1}, {&__pyx_n_s__size, __pyx_k__size, sizeof(__pyx_k__size), 0, 0, 1, 1}, {&__pyx_n_s__slider, __pyx_k__slider, sizeof(__pyx_k__slider), 0, 0, 1, 1}, {&__pyx_n_s__slobj, __pyx_k__slobj, sizeof(__pyx_k__slobj), 0, 0, 1, 1}, {&__pyx_n_s__sorted_labels, __pyx_k__sorted_labels, sizeof(__pyx_k__sorted_labels), 0, 0, 1, 1}, {&__pyx_n_s__start, __pyx_k__start, sizeof(__pyx_k__start), 0, 0, 1, 1}, {&__pyx_n_s__started, __pyx_k__started, sizeof(__pyx_k__started), 0, 0, 1, 1}, {&__pyx_n_s__starts, __pyx_k__starts, sizeof(__pyx_k__starts), 0, 0, 1, 1}, {&__pyx_n_s__status, __pyx_k__status, sizeof(__pyx_k__status), 0, 0, 1, 1}, {&__pyx_n_s__strides, __pyx_k__strides, sizeof(__pyx_k__strides), 0, 0, 1, 1}, {&__pyx_n_s__string, __pyx_k__string, sizeof(__pyx_k__string), 0, 0, 1, 1}, {&__pyx_n_s__string_, __pyx_k__string_, sizeof(__pyx_k__string_), 0, 0, 1, 1}, {&__pyx_n_s__strptime, __pyx_k__strptime, sizeof(__pyx_k__strptime), 0, 0, 1, 1}, {&__pyx_n_s__stub, __pyx_k__stub, sizeof(__pyx_k__stub), 0, 0, 1, 1}, {&__pyx_n_s__sum, __pyx_k__sum, sizeof(__pyx_k__sum), 0, 0, 1, 1}, {&__pyx_n_s__t, __pyx_k__t, sizeof(__pyx_k__t), 0, 0, 1, 1}, {&__pyx_n_s__table, __pyx_k__table, sizeof(__pyx_k__table), 0, 0, 1, 1}, {&__pyx_n_s__take_last, __pyx_k__take_last, sizeof(__pyx_k__take_last), 0, 0, 1, 1}, {&__pyx_n_s__time, __pyx_k__time, sizeof(__pyx_k__time), 0, 0, 1, 1}, {&__pyx_n_s__time64_to_datetime, __pyx_k__time64_to_datetime, sizeof(__pyx_k__time64_to_datetime), 0, 0, 1, 1}, {&__pyx_n_s__time_parser, __pyx_k__time_parser, sizeof(__pyx_k__time_parser), 0, 0, 1, 1}, {&__pyx_n_s__timedelta, __pyx_k__timedelta, sizeof(__pyx_k__timedelta), 0, 0, 1, 1}, {&__pyx_n_s__timedelta64, __pyx_k__timedelta64, sizeof(__pyx_k__timedelta64), 0, 0, 1, 1}, {&__pyx_n_s__timedeltas, __pyx_k__timedeltas, sizeof(__pyx_k__timedeltas), 0, 0, 1, 1}, {&__pyx_n_s__times, __pyx_k__times, sizeof(__pyx_k__times), 0, 0, 1, 1}, {&__pyx_n_s__tmp, __pyx_k__tmp, sizeof(__pyx_k__tmp), 0, 0, 1, 1}, {&__pyx_n_s__to_object_array, __pyx_k__to_object_array, sizeof(__pyx_k__to_object_array), 0, 0, 1, 1}, {&__pyx_n_s__toordinal, __pyx_k__toordinal, sizeof(__pyx_k__toordinal), 0, 0, 1, 1}, {&__pyx_n_s__true, __pyx_k__true, sizeof(__pyx_k__true), 0, 0, 1, 1}, {&__pyx_n_s__true_vals, __pyx_k__true_vals, sizeof(__pyx_k__true_vals), 0, 0, 1, 1}, {&__pyx_n_s__true_values, __pyx_k__true_values, sizeof(__pyx_k__true_values), 0, 0, 1, 1}, {&__pyx_n_s__try_float, __pyx_k__try_float, sizeof(__pyx_k__try_float), 0, 0, 1, 1}, {&__pyx_n_s__try_parse_dates, __pyx_k__try_parse_dates, sizeof(__pyx_k__try_parse_dates), 0, 0, 1, 1}, {&__pyx_n_s__tslib, __pyx_k__tslib, sizeof(__pyx_k__tslib), 0, 0, 1, 1}, {&__pyx_n_s__tup, __pyx_k__tup, sizeof(__pyx_k__tup), 0, 0, 1, 1}, {&__pyx_n_s__tuples, __pyx_k__tuples, sizeof(__pyx_k__tuples), 0, 0, 1, 1}, {&__pyx_n_s__type, __pyx_k__type, sizeof(__pyx_k__type), 0, 0, 1, 1}, {&__pyx_n_s__uint16, __pyx_k__uint16, sizeof(__pyx_k__uint16), 0, 0, 1, 1}, {&__pyx_n_s__uint32, __pyx_k__uint32, sizeof(__pyx_k__uint32), 0, 0, 1, 1}, {&__pyx_n_s__uint64, __pyx_k__uint64, sizeof(__pyx_k__uint64), 0, 0, 1, 1}, {&__pyx_n_s__uint8, __pyx_k__uint8, sizeof(__pyx_k__uint8), 0, 0, 1, 1}, {&__pyx_n_s__unicode, __pyx_k__unicode, sizeof(__pyx_k__unicode), 0, 0, 1, 1}, {&__pyx_n_s__unicode_, __pyx_k__unicode_, sizeof(__pyx_k__unicode_), 0, 0, 1, 1}, {&__pyx_n_s__uniques, __pyx_k__uniques, sizeof(__pyx_k__uniques), 0, 0, 1, 1}, {&__pyx_n_s__utcfromtimestamp, __pyx_k__utcfromtimestamp, sizeof(__pyx_k__utcfromtimestamp), 0, 0, 1, 1}, {&__pyx_n_s__v, __pyx_k__v, sizeof(__pyx_k__v), 0, 0, 1, 1}, {&__pyx_n_s__val, __pyx_k__val, sizeof(__pyx_k__val), 0, 0, 1, 1}, {&__pyx_n_s__val_kind, __pyx_k__val_kind, sizeof(__pyx_k__val_kind), 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__vc, __pyx_k__vc, sizeof(__pyx_k__vc), 0, 0, 1, 1}, {&__pyx_n_s__vec_binop, __pyx_k__vec_binop, sizeof(__pyx_k__vec_binop), 0, 0, 1, 1}, {&__pyx_n_s__vec_compare, __pyx_k__vec_compare, sizeof(__pyx_k__vec_compare), 0, 0, 1, 1}, {&__pyx_n_s__vecs, __pyx_k__vecs, sizeof(__pyx_k__vecs), 0, 0, 1, 1}, {&__pyx_n_s__view, __pyx_k__view, sizeof(__pyx_k__view), 0, 0, 1, 1}, {&__pyx_n_s__write_csv_rows, __pyx_k__write_csv_rows, sizeof(__pyx_k__write_csv_rows), 0, 0, 1, 1}, {&__pyx_n_s__writer, __pyx_k__writer, sizeof(__pyx_k__writer), 0, 0, 1, 1}, {&__pyx_n_s__writerows, __pyx_k__writerows, sizeof(__pyx_k__writerows), 0, 0, 1, 1}, {&__pyx_n_s__x, __pyx_k__x, sizeof(__pyx_k__x), 0, 0, 1, 1}, {&__pyx_n_s__y, __pyx_k__y, sizeof(__pyx_k__y), 0, 0, 1, 1}, {&__pyx_n_s__year, __pyx_k__year, sizeof(__pyx_k__year), 0, 0, 1, 1}, {&__pyx_n_s__years, __pyx_k__years, sizeof(__pyx_k__years), 0, 0, 1, 1}, {&__pyx_n_s__zeros, __pyx_k__zeros, sizeof(__pyx_k__zeros), 0, 0, 1, 1}, {0, 0, 0, 0, 0, 0, 0} }; static int __Pyx_InitCachedBuiltins(void) { __pyx_builtin_Exception = __Pyx_GetBuiltinName(__pyx_n_s__Exception); if (!__pyx_builtin_Exception) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 471; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_builtin_AttributeError = __Pyx_GetBuiltinName(__pyx_n_s__AttributeError); if (!__pyx_builtin_AttributeError) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 30; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_n_s__range); if (!__pyx_builtin_range) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 105; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_builtin_object = __Pyx_GetBuiltinName(__pyx_n_s__object); if (!__pyx_builtin_object) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_builtin_ValueError = __Pyx_GetBuiltinName(__pyx_n_s__ValueError); if (!__pyx_builtin_ValueError) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 451; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_builtin_TypeError = __Pyx_GetBuiltinName(__pyx_n_s__TypeError); if (!__pyx_builtin_TypeError) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 706; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_builtin_enumerate = __Pyx_GetBuiltinName(__pyx_n_s__enumerate); if (!__pyx_builtin_enumerate) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 556; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_builtin_OverflowError = __Pyx_GetBuiltinName(__pyx_n_s__OverflowError); if (!__pyx_builtin_OverflowError) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 538; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_builtin_ImportError = __Pyx_GetBuiltinName(__pyx_n_s__ImportError); if (!__pyx_builtin_ImportError) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 646; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_builtin_IndexError = __Pyx_GetBuiltinName(__pyx_n_s__IndexError); if (!__pyx_builtin_IndexError) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 40; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_builtin_RuntimeError = __Pyx_GetBuiltinName(__pyx_n_s__RuntimeError); if (!__pyx_builtin_RuntimeError) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 803; __pyx_clineno = __LINE__; goto __pyx_L1_error;} return 0; __pyx_L1_error:; return -1; } static int __Pyx_InitCachedConstants(void) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0); /* "pandas/lib.pyx":165 * * cdef inline int64_t get_timedelta64_value(val): * return val.view('i8') # <<<<<<<<<<<<<< * * #---------------------------------------------------------------------- */ __pyx_k_tuple_1 = PyTuple_Pack(1, ((PyObject *)__pyx_n_s__i8)); if (unlikely(!__pyx_k_tuple_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 165; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_1); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_1)); /* "pandas/lib.pyx":451 * it = PyArray_IterNew(arr) * if len(arr) != n: * raise ValueError('all arrays must be same length') # <<<<<<<<<<<<<< * * for i in range(n): */ __pyx_k_tuple_3 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_2)); if (unlikely(!__pyx_k_tuple_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 451; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_3); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_3)); /* "pandas/lib.pyx":468 * * rev_indexer = np.empty(length, dtype=np.int64) * rev_indexer.fill(-1) # <<<<<<<<<<<<<< * for i in range(n): * idx = indexer[i] */ __pyx_k_tuple_4 = PyTuple_Pack(1, __pyx_int_neg_1); if (unlikely(!__pyx_k_tuple_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 468; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_4); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_4)); /* "pandas/lib.pyx":563 * * if not started: * return slice(0, 0) # <<<<<<<<<<<<<< * if not finished: * return slice(start, None) */ __pyx_k_tuple_5 = PyTuple_Pack(2, __pyx_int_0, __pyx_int_0); if (unlikely(!__pyx_k_tuple_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 563; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_5); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_5)); /* "pandas/lib.pyx":593 * flag = cpython.Py_NE * else: * raise ValueError('Unrecognized operator') # <<<<<<<<<<<<<< * * result = np.empty(n, dtype=bool).view(np.uint8) */ __pyx_k_tuple_7 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_6)); if (unlikely(!__pyx_k_tuple_7)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 593; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_7); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_7)); /* "pandas/lib.pyx":640 * flag = cpython.Py_NE * else: * raise ValueError('Unrecognized operator') # <<<<<<<<<<<<<< * * result = np.empty(n, dtype=bool).view(np.uint8) */ __pyx_k_tuple_9 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_6)); if (unlikely(!__pyx_k_tuple_9)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 640; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_9); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_9)); /* "pandas/lib.pyx":928 * * if lenidx <= 0 or lenbin <= 0: * raise ValueError("Invalid length for values or for binner") # <<<<<<<<<<<<<< * * # check binner fits data */ __pyx_k_tuple_14 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_13)); if (unlikely(!__pyx_k_tuple_14)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 928; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_14); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_14)); /* "pandas/lib.pyx":932 * # check binner fits data * if values[0] < binner[0]: * raise ValueError("Values falls before first bin") # <<<<<<<<<<<<<< * * if values[lenidx-1] > binner[lenbin-1]: */ __pyx_k_tuple_16 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_15)); if (unlikely(!__pyx_k_tuple_16)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 932; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_16); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_16)); /* "pandas/lib.pyx":935 * * if values[lenidx-1] > binner[lenbin-1]: * raise ValueError("Values falls after last bin") # <<<<<<<<<<<<<< * * bins = np.empty(lenbin - 1, dtype=np.int64) */ __pyx_k_tuple_18 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_17)); if (unlikely(!__pyx_k_tuple_18)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 935; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_18); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_18)); /* "pandas/lib.pyx":1105 * it = PyArray_IterNew(arr) * if len(arr) != n: * raise ValueError('all arrays must be same length') # <<<<<<<<<<<<<< * * for i in range(n): */ __pyx_k_tuple_20 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_2)); if (unlikely(!__pyx_k_tuple_20)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1105; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_20); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_20)); /* "pandas/src/reduce.pyx":24 * if axis == 0: * if not arr.flags.f_contiguous: * arr = arr.copy('F') # <<<<<<<<<<<<<< * * self.nresults = k */ __pyx_k_tuple_22 = PyTuple_Pack(1, ((PyObject *)__pyx_n_s__F)); if (unlikely(!__pyx_k_tuple_22)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 24; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_22); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_22)); /* "pandas/src/reduce.pyx":31 * else: * if not arr.flags.c_contiguous: * arr = arr.copy('C') # <<<<<<<<<<<<<< * * self.nresults = n */ __pyx_k_tuple_23 = PyTuple_Pack(1, ((PyObject *)__pyx_n_s__C)); if (unlikely(!__pyx_k_tuple_23)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 31; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_23); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_23)); /* "pandas/src/reduce.pyx":59 * else: * if dummy.dtype != self.arr.dtype: * raise ValueError('Dummy array must be same dtype') # <<<<<<<<<<<<<< * if len(dummy) != self.chunksize: * raise ValueError('Dummy array must be length %d' % */ __pyx_k_tuple_25 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_24)); if (unlikely(!__pyx_k_tuple_25)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 59; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_25); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_25)); /* "pandas/src/reduce.pyx":153 * result[0] = res * except Exception: * raise ValueError('function does not reduce') # <<<<<<<<<<<<<< * return result * */ __pyx_k_tuple_28 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_27)); if (unlikely(!__pyx_k_tuple_28)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 153; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_28); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_28)); /* "pandas/src/reduce.pyx":176 * values = series.values * if not values.flags.c_contiguous: * values = values.copy('C') # <<<<<<<<<<<<<< * self.arr = values * self.index = series.index */ __pyx_k_tuple_29 = PyTuple_Pack(1, ((PyObject *)__pyx_n_s__C)); if (unlikely(!__pyx_k_tuple_29)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 176; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_29); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_29)); /* "pandas/src/reduce.pyx":193 * def _check_dummy(self, dummy=None): * if dummy is None: * values = np.empty(0, dtype=self.arr.dtype) # <<<<<<<<<<<<<< * index = None * else: */ __pyx_k_tuple_30 = PyTuple_Pack(1, __pyx_int_0); if (unlikely(!__pyx_k_tuple_30)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 193; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_30); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_30)); /* "pandas/src/reduce.pyx":197 * else: * if dummy.dtype != self.arr.dtype: * raise ValueError('Dummy array must be same dtype') # <<<<<<<<<<<<<< * values = dummy.values * if not values.flags.contiguous: */ __pyx_k_tuple_31 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_24)); if (unlikely(!__pyx_k_tuple_31)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 197; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_31); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_31)); /* "pandas/src/reduce.pyx":281 * result = np.empty(self.ngroups, dtype='O') * except Exception: * raise ValueError('function does not reduce') # <<<<<<<<<<<<<< * return result * */ __pyx_k_tuple_32 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_27)); if (unlikely(!__pyx_k_tuple_32)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 281; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_32); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_32)); /* "pandas/src/reduce.pyx":306 * values = series.values * if not values.flags.c_contiguous: * values = values.copy('C') # <<<<<<<<<<<<<< * self.arr = values * self.index = series.index */ __pyx_k_tuple_33 = PyTuple_Pack(1, ((PyObject *)__pyx_n_s__C)); if (unlikely(!__pyx_k_tuple_33)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 306; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_33); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_33)); /* "pandas/src/reduce.pyx":318 * def _check_dummy(self, dummy=None): * if dummy is None: * values = np.empty(0, dtype=self.arr.dtype) # <<<<<<<<<<<<<< * index = None * else: */ __pyx_k_tuple_34 = PyTuple_Pack(1, __pyx_int_0); if (unlikely(!__pyx_k_tuple_34)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 318; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_34); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_34)); /* "pandas/src/reduce.pyx":322 * else: * if dummy.dtype != self.arr.dtype: * raise ValueError('Dummy array must be same dtype') # <<<<<<<<<<<<<< * values = dummy.values * if not values.flags.contiguous: */ __pyx_k_tuple_35 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_24)); if (unlikely(!__pyx_k_tuple_35)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 322; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_35); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_35)); /* "pandas/src/reduce.pyx":410 * result = np.empty(self.ngroups, dtype='O') * except Exception: * raise ValueError('function does not reduce') # <<<<<<<<<<<<<< * return result * */ __pyx_k_tuple_36 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_27)); if (unlikely(!__pyx_k_tuple_36)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 410; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_36); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_36)); /* "pandas/src/reduce.pyx":484 * * if frame.index._has_complex_internals: * raise InvalidApply('Cannot modify frame index internals') # <<<<<<<<<<<<<< * * */ __pyx_k_tuple_39 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_38)); if (unlikely(!__pyx_k_tuple_39)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 484; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_39); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_39)); /* "pandas/src/reduce.pyx":496 * result = f(chunk) * if result is chunk: * raise InvalidApply('Function unsafe for fast apply') # <<<<<<<<<<<<<< * except: * raise InvalidApply('Let this error raise above us') */ __pyx_k_tuple_41 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_40)); if (unlikely(!__pyx_k_tuple_41)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 496; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_41); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_41)); /* "pandas/src/reduce.pyx":498 * raise InvalidApply('Function unsafe for fast apply') * except: * raise InvalidApply('Let this error raise above us') # <<<<<<<<<<<<<< * * slider = BlockSlider(frame) */ __pyx_k_tuple_43 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_42)); if (unlikely(!__pyx_k_tuple_43)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 498; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_43); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_43)); /* "pandas/src/reduce.pyx":545 * def __init__(self, frame): * self.frame = frame * self.dummy = frame[:0] # <<<<<<<<<<<<<< * * self.blocks = [b.values for b in self.dummy._data.blocks] */ __pyx_k_slice_44 = PySlice_New(Py_None, __pyx_int_0, Py_None); if (unlikely(!__pyx_k_slice_44)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 545; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_slice_44); __Pyx_GIVEREF(__pyx_k_slice_44); /* "pandas/src/reduce.pyx":593 * def reduce(arr, f, axis=0, dummy=None, labels=None): * if labels._has_complex_internals: * raise Exception('Cannot use shortcut') # <<<<<<<<<<<<<< * * reducer = Reducer(arr, f, axis=axis, dummy=dummy, labels=labels) */ __pyx_k_tuple_46 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_45)); if (unlikely(!__pyx_k_tuple_46)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 593; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_46); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_46)); /* "pandas/src/inference.pyx":53 * * if values.dtype != np.object_: * values = values.astype('O') # <<<<<<<<<<<<<< * * n = len(values) */ __pyx_k_tuple_50 = PyTuple_Pack(1, ((PyObject *)__pyx_n_s__O)); if (unlikely(!__pyx_k_tuple_50)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 53; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_50); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_50)); /* "pandas/src/inference.pyx":426 * seen_float = 1 * else: * raise ValueError('Empty string encountered') # <<<<<<<<<<<<<< * elif util.is_complex_object(val): * complexes[i] = val */ __pyx_k_tuple_59 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_58)); if (unlikely(!__pyx_k_tuple_59)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 426; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_59); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_59)); /* "pandas/src/inference.pyx":647 * parse_date = lambda x: parse(x, dayfirst=dayfirst,default=default) * except ImportError: # pragma: no cover * def parse_date(s): # <<<<<<<<<<<<<< * try: * return datetime.strptime(s, '%m/%d/%Y') */ __pyx_k_tuple_66 = PyTuple_Pack(1, ((PyObject *)__pyx_n_s__s)); if (unlikely(!__pyx_k_tuple_66)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 647; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_66); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_66)); __pyx_k_codeobj_67 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_66, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_68, __pyx_n_s__parse_date, 647, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_67)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 647; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/inference.pyx":688 * n = len(dates) * if len(times) != n: * raise ValueError('Length of dates and times must be equal') # <<<<<<<<<<<<<< * result = np.empty(n, dtype='O') * */ __pyx_k_tuple_74 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_73)); if (unlikely(!__pyx_k_tuple_74)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 688; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_74); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_74)); /* "pandas/src/inference.pyx":700 * parse_date = lambda x: parse(x, dayfirst=dayfirst, default=default) * except ImportError: # pragma: no cover * def parse_date(s): # <<<<<<<<<<<<<< * try: * return date.strptime(s, '%m/%d/%Y') */ __pyx_k_tuple_76 = PyTuple_Pack(1, ((PyObject *)__pyx_n_s__s)); if (unlikely(!__pyx_k_tuple_76)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 700; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_76); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_76)); __pyx_k_codeobj_77 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_76, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_68, __pyx_n_s__parse_date, 700, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_77)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 700; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/inference.pyx":713 * parse_time = lambda x: parse(x) * except ImportError: # pragma: no cover * def parse_time(s): # <<<<<<<<<<<<<< * try: * return time.strptime(s, '%H:%M:%S') */ __pyx_k_tuple_79 = PyTuple_Pack(1, ((PyObject *)__pyx_n_s__s)); if (unlikely(!__pyx_k_tuple_79)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 713; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_79); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_79)); __pyx_k_codeobj_80 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_79, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_68, __pyx_n_s__parse_time, 713, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_80)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 713; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/inference.pyx":741 * n = len(years) * if len(months) != n or len(days) != n: * raise ValueError('Length of years/months/days must all be equal') # <<<<<<<<<<<<<< * result = np.empty(n, dtype='O') * */ __pyx_k_tuple_83 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_82)); if (unlikely(!__pyx_k_tuple_83)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 741; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_83); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_83)); /* "pandas/src/inference.pyx":768 * if (len(months) != n or len(days) != n or len(hours) != n or * len(minutes) != n or len(seconds) != n): * raise ValueError('Length of all datetime components must be equal') # <<<<<<<<<<<<<< * result = np.empty(n, dtype='O') * */ __pyx_k_tuple_85 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_84)); if (unlikely(!__pyx_k_tuple_85)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 768; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_85); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_85)); /* "pandas/src/inference.pyx":1017 * if n == 0: * # kludge, for Series * return np.empty(0, dtype='f8') # <<<<<<<<<<<<<< * * for i in range(n): */ __pyx_k_tuple_88 = PyTuple_Pack(1, __pyx_int_0); if (unlikely(!__pyx_k_tuple_88)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1017; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_88); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_88)); /* "util.pxd":40 * i += sz * elif i >= sz or sz == 0: * raise IndexError('index out of bounds') # <<<<<<<<<<<<<< * * return get_value_1d(arr, i) */ __pyx_k_tuple_91 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_90)); if (unlikely(!__pyx_k_tuple_91)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 40; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_91); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_91)); /* "util.pxd":57 * i += sz * elif i >= sz: * raise IndexError('index out of bounds') # <<<<<<<<<<<<<< * * assign_value_1d(arr, i, value) */ __pyx_k_tuple_92 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_90)); if (unlikely(!__pyx_k_tuple_92)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 57; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_92); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_92)); /* "numpy.pxd":217 * 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_k_tuple_94 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_u_93)); if (unlikely(!__pyx_k_tuple_94)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 217; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_94); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_94)); /* "numpy.pxd":221 * 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_k_tuple_96 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_u_95)); if (unlikely(!__pyx_k_tuple_96)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 221; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_96); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_96)); /* "numpy.pxd":259 * if ((descr.byteorder == '>' and little_endian) or * (descr.byteorder == '<' 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_k_tuple_98 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_u_97)); if (unlikely(!__pyx_k_tuple_98)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 259; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_98); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_98)); /* "numpy.pxd":803 * * if (end - f) - (new_offset - offset[0]) < 15: * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") # <<<<<<<<<<<<<< * * if ((child.byteorder == '>' and little_endian) or */ __pyx_k_tuple_101 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_u_100)); if (unlikely(!__pyx_k_tuple_101)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 803; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_101); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_101)); /* "numpy.pxd":807 * if ((child.byteorder == '>' and little_endian) or * (child.byteorder == '<' 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_k_tuple_102 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_u_97)); if (unlikely(!__pyx_k_tuple_102)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 807; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_102); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_102)); /* "numpy.pxd":827 * 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_k_tuple_104 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_u_103)); if (unlikely(!__pyx_k_tuple_104)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 827; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_104); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_104)); /* "pandas/lib.pyx":85 * from libc.stdlib cimport malloc, free * * def ismember(ndarray arr, set values): # <<<<<<<<<<<<<< * ''' * Checks whether */ __pyx_k_tuple_105 = PyTuple_Pack(6, ((PyObject *)__pyx_n_s__arr), ((PyObject *)__pyx_n_s__values), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__n), ((PyObject *)__pyx_n_s__result), ((PyObject *)__pyx_n_s__val)); if (unlikely(!__pyx_k_tuple_105)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_105); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_105)); __pyx_k_codeobj_106 = (PyObject*)__Pyx_PyCode_New(2, 0, 6, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_105, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_107, __pyx_n_s__ismember, 85, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_106)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/lib.pyx":140 * return gmtime(dt) * * def array_to_timestamp(ndarray[object, ndim=1] arr): # <<<<<<<<<<<<<< * cdef int i, n * cdef ndarray[int64_t, ndim=1] result */ __pyx_k_tuple_108 = PyTuple_Pack(4, ((PyObject *)__pyx_n_s__arr), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__n), ((PyObject *)__pyx_n_s__result)); if (unlikely(!__pyx_k_tuple_108)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 140; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_108); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_108)); __pyx_k_codeobj_109 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_108, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_107, __pyx_n_s__array_to_timestamp, 140, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_109)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 140; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/lib.pyx":152 * return result * * def time64_to_datetime(ndarray[int64_t, ndim=1] arr): # <<<<<<<<<<<<<< * cdef int i, n * cdef ndarray[object, ndim=1] result */ __pyx_k_tuple_110 = PyTuple_Pack(4, ((PyObject *)__pyx_n_s__arr), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__n), ((PyObject *)__pyx_n_s__result)); if (unlikely(!__pyx_k_tuple_110)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 152; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_110); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_110)); __pyx_k_codeobj_111 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_110, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_107, __pyx_n_s__time64_to_datetime, 152, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_111)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 152; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/lib.pyx":201 * return util._checknull(val) * * def isscalar(object val): # <<<<<<<<<<<<<< * return np.isscalar(val) or val is None or PyDateTime_Check(val) * */ __pyx_k_tuple_112 = PyTuple_Pack(1, ((PyObject *)__pyx_n_s__val)); if (unlikely(!__pyx_k_tuple_112)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 201; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_112); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_112)); __pyx_k_codeobj_113 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_112, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_107, __pyx_n_s__isscalar, 201, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_113)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 201; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/lib.pyx":207 * @cython.wraparound(False) * @cython.boundscheck(False) * def isnullobj(ndarray[object] arr): # <<<<<<<<<<<<<< * cdef Py_ssize_t i, n * cdef object val */ __pyx_k_tuple_114 = PyTuple_Pack(6, ((PyObject *)__pyx_n_s__arr), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__n), ((PyObject *)__pyx_n_s__val), ((PyObject *)__pyx_n_s__result), ((PyObject *)__pyx_n_s__arobj)); if (unlikely(!__pyx_k_tuple_114)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 207; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_114); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_114)); __pyx_k_codeobj_115 = (PyObject*)__Pyx_PyCode_New(1, 0, 6, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_114, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_107, __pyx_n_s__isnullobj, 207, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_115)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 207; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/lib.pyx":221 * @cython.wraparound(False) * @cython.boundscheck(False) * def isnullobj_old(ndarray[object] arr): # <<<<<<<<<<<<<< * cdef Py_ssize_t i, n * cdef object val */ __pyx_k_tuple_116 = PyTuple_Pack(5, ((PyObject *)__pyx_n_s__arr), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__n), ((PyObject *)__pyx_n_s__val), ((PyObject *)__pyx_n_s__result)); if (unlikely(!__pyx_k_tuple_116)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 221; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_116); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_116)); __pyx_k_codeobj_117 = (PyObject*)__Pyx_PyCode_New(1, 0, 5, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_116, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_107, __pyx_n_s__isnullobj_old, 221, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_117)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 221; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/lib.pyx":235 * @cython.wraparound(False) * @cython.boundscheck(False) * def isnullobj2d(ndarray[object, ndim=2] arr): # <<<<<<<<<<<<<< * cdef Py_ssize_t i, j, n, m * cdef object val */ __pyx_k_tuple_118 = PyTuple_Pack(7, ((PyObject *)__pyx_n_s__arr), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__j), ((PyObject *)__pyx_n_s__n), ((PyObject *)__pyx_n_s__m), ((PyObject *)__pyx_n_s__val), ((PyObject *)__pyx_n_s__result)); if (unlikely(!__pyx_k_tuple_118)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 235; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_118); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_118)); __pyx_k_codeobj_119 = (PyObject*)__Pyx_PyCode_New(1, 0, 7, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_118, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_107, __pyx_n_s__isnullobj2d, 235, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_119)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 235; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/lib.pyx":251 * @cython.wraparound(False) * @cython.boundscheck(False) * def isnullobj_old(ndarray[object] arr): # <<<<<<<<<<<<<< * cdef Py_ssize_t i, n * cdef object val */ __pyx_k_tuple_120 = PyTuple_Pack(5, ((PyObject *)__pyx_n_s__arr), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__n), ((PyObject *)__pyx_n_s__val), ((PyObject *)__pyx_n_s__result)); if (unlikely(!__pyx_k_tuple_120)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 251; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_120); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_120)); __pyx_k_codeobj_121 = (PyObject*)__Pyx_PyCode_New(1, 0, 5, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_120, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_107, __pyx_n_s__isnullobj_old, 251, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_121)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 251; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/lib.pyx":265 * @cython.wraparound(False) * @cython.boundscheck(False) * def isnullobj2d_old(ndarray[object, ndim=2] arr): # <<<<<<<<<<<<<< * cdef Py_ssize_t i, j, n, m * cdef object val */ __pyx_k_tuple_122 = PyTuple_Pack(7, ((PyObject *)__pyx_n_s__arr), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__j), ((PyObject *)__pyx_n_s__n), ((PyObject *)__pyx_n_s__m), ((PyObject *)__pyx_n_s__val), ((PyObject *)__pyx_n_s__result)); if (unlikely(!__pyx_k_tuple_122)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 265; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_122); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_122)); __pyx_k_codeobj_123 = (PyObject*)__Pyx_PyCode_New(1, 0, 7, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_122, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_107, __pyx_n_s__isnullobj2d_old, 265, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_123)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 265; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/lib.pyx":279 * return result.view(np.bool_) * * def list_to_object_array(list obj): # <<<<<<<<<<<<<< * ''' * Convert list to object ndarray. Seriously can't believe I had to write this */ __pyx_k_tuple_124 = PyTuple_Pack(4, ((PyObject *)__pyx_n_s__obj), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__n), ((PyObject *)__pyx_n_s__arr)); if (unlikely(!__pyx_k_tuple_124)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 279; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_124); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_124)); __pyx_k_codeobj_125 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_124, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_107, __pyx_n_s_49, 279, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_125)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 279; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/lib.pyx":299 * @cython.wraparound(False) * @cython.boundscheck(False) * def fast_unique(ndarray[object] values): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = len(values) */ __pyx_k_tuple_126 = PyTuple_Pack(7, ((PyObject *)__pyx_n_s__values), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__n), ((PyObject *)__pyx_n_s__uniques), ((PyObject *)__pyx_n_s__table), ((PyObject *)__pyx_n_s__val), ((PyObject *)__pyx_n_s__stub)); if (unlikely(!__pyx_k_tuple_126)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 299; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_126); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_126)); __pyx_k_codeobj_127 = (PyObject*)__Pyx_PyCode_New(1, 0, 7, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_126, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_107, __pyx_n_s__fast_unique, 299, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_127)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 299; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/lib.pyx":320 * @cython.wraparound(False) * @cython.boundscheck(False) * def fast_unique_multiple(list arrays): # <<<<<<<<<<<<<< * cdef: * ndarray[object] buf */ __pyx_k_tuple_128 = PyTuple_Pack(10, ((PyObject *)__pyx_n_s__arrays), ((PyObject *)__pyx_n_s__buf), ((PyObject *)__pyx_n_s__k), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__j), ((PyObject *)__pyx_n_s__n), ((PyObject *)__pyx_n_s__uniques), ((PyObject *)__pyx_n_s__table), ((PyObject *)__pyx_n_s__val), ((PyObject *)__pyx_n_s__stub)); if (unlikely(!__pyx_k_tuple_128)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 320; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_128); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_128)); __pyx_k_codeobj_129 = (PyObject*)__Pyx_PyCode_New(1, 0, 10, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_128, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_107, __pyx_n_s_130, 320, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_129)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 320; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/lib.pyx":346 * @cython.wraparound(False) * @cython.boundscheck(False) * def fast_unique_multiple_list(list lists): # <<<<<<<<<<<<<< * cdef: * list buf */ __pyx_k_tuple_131 = PyTuple_Pack(10, ((PyObject *)__pyx_n_s__lists), ((PyObject *)__pyx_n_s__buf), ((PyObject *)__pyx_n_s__k), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__j), ((PyObject *)__pyx_n_s__n), ((PyObject *)__pyx_n_s__uniques), ((PyObject *)__pyx_n_s__table), ((PyObject *)__pyx_n_s__val), ((PyObject *)__pyx_n_s__stub)); if (unlikely(!__pyx_k_tuple_131)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 346; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_131); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_131)); __pyx_k_codeobj_132 = (PyObject*)__Pyx_PyCode_New(1, 0, 10, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_131, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_107, __pyx_n_s_133, 346, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_132)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 346; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/lib.pyx":372 * @cython.wraparound(False) * @cython.boundscheck(False) * def fast_unique_multiple_list_gen(object gen): # <<<<<<<<<<<<<< * cdef: * list buf */ __pyx_k_tuple_134 = PyTuple_Pack(8, ((PyObject *)__pyx_n_s__gen), ((PyObject *)__pyx_n_s__buf), ((PyObject *)__pyx_n_s__j), ((PyObject *)__pyx_n_s__n), ((PyObject *)__pyx_n_s__uniques), ((PyObject *)__pyx_n_s__table), ((PyObject *)__pyx_n_s__val), ((PyObject *)__pyx_n_s__stub)); if (unlikely(!__pyx_k_tuple_134)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 372; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_134); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_134)); __pyx_k_codeobj_135 = (PyObject*)__Pyx_PyCode_New(1, 0, 8, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_134, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_107, __pyx_n_s_136, 372, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_135)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 372; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/lib.pyx":397 * @cython.wraparound(False) * @cython.boundscheck(False) * def dicts_to_array(list dicts, list columns): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, j, k, n */ __pyx_k_tuple_137 = PyTuple_Pack(10, ((PyObject *)__pyx_n_s__dicts), ((PyObject *)__pyx_n_s__columns), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__j), ((PyObject *)__pyx_n_s__k), ((PyObject *)__pyx_n_s__n), ((PyObject *)__pyx_n_s__result), ((PyObject *)__pyx_n_s__row), ((PyObject *)__pyx_n_s__col), ((PyObject *)__pyx_n_s__onan)); if (unlikely(!__pyx_k_tuple_137)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 397; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_137); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_137)); __pyx_k_codeobj_138 = (PyObject*)__Pyx_PyCode_New(2, 0, 10, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_137, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_107, __pyx_n_s__dicts_to_array, 397, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_138)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 397; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/lib.pyx":420 * return result * * def fast_zip(list ndarrays): # <<<<<<<<<<<<<< * ''' * For zipping multiple ndarrays into an ndarray of tuples */ __pyx_k_tuple_139 = PyTuple_Pack(10, ((PyObject *)__pyx_n_s__ndarrays), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__j), ((PyObject *)__pyx_n_s__k), ((PyObject *)__pyx_n_s__n), ((PyObject *)__pyx_n_s__result), ((PyObject *)__pyx_n_s__it), ((PyObject *)__pyx_n_s__val), ((PyObject *)__pyx_n_s__tup), ((PyObject *)__pyx_n_s__arr)); if (unlikely(!__pyx_k_tuple_139)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 420; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_139); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_139)); __pyx_k_codeobj_140 = (PyObject*)__Pyx_PyCode_New(1, 0, 10, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_139, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_107, __pyx_n_s__fast_zip, 420, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_140)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 420; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/lib.pyx":461 * return result * * def get_reverse_indexer(ndarray[int64_t] indexer, Py_ssize_t length): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = len(indexer) */ __pyx_k_tuple_141 = PyTuple_Pack(6, ((PyObject *)__pyx_n_s__indexer), ((PyObject *)__pyx_n_s__length), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__n), ((PyObject *)__pyx_n_s__rev_indexer), ((PyObject *)__pyx_n_s__idx)); if (unlikely(!__pyx_k_tuple_141)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 461; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_141); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_141)); __pyx_k_codeobj_142 = (PyObject*)__Pyx_PyCode_New(2, 0, 6, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_141, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_107, __pyx_n_s__get_reverse_indexer, 461, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_142)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 461; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/lib.pyx":477 * * * def has_infs_f4(ndarray[float32_t] arr): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = len(arr) */ __pyx_k_tuple_143 = PyTuple_Pack(6, ((PyObject *)__pyx_n_s__arr), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__n), ((PyObject *)__pyx_n_s__inf), ((PyObject *)__pyx_n_s__neginf), ((PyObject *)__pyx_n_s__val)); if (unlikely(!__pyx_k_tuple_143)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 477; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_143); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_143)); __pyx_k_codeobj_144 = (PyObject*)__Pyx_PyCode_New(1, 0, 6, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_143, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_107, __pyx_n_s__has_infs_f4, 477, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_144)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 477; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/lib.pyx":491 * return False * * def has_infs_f8(ndarray[float64_t] arr): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = len(arr) */ __pyx_k_tuple_145 = PyTuple_Pack(6, ((PyObject *)__pyx_n_s__arr), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__n), ((PyObject *)__pyx_n_s__inf), ((PyObject *)__pyx_n_s__neginf), ((PyObject *)__pyx_n_s__val)); if (unlikely(!__pyx_k_tuple_145)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 491; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_145); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_145)); __pyx_k_codeobj_146 = (PyObject*)__Pyx_PyCode_New(1, 0, 6, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_145, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_107, __pyx_n_s__has_infs_f8, 491, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_146)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 491; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/lib.pyx":505 * return False * * def convert_timestamps(ndarray values): # <<<<<<<<<<<<<< * cdef: * object val, f, result */ __pyx_k_tuple_147 = PyTuple_Pack(9, ((PyObject *)__pyx_n_s__values), ((PyObject *)__pyx_n_s__val), ((PyObject *)__pyx_n_s__f), ((PyObject *)__pyx_n_s__result), ((PyObject *)__pyx_n_s__cache), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__n), ((PyObject *)__pyx_n_s__out), ((PyObject *)__pyx_n_s__datetime)); if (unlikely(!__pyx_k_tuple_147)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 505; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_147); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_147)); __pyx_k_codeobj_148 = (PyObject*)__Pyx_PyCode_New(1, 0, 9, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_147, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_107, __pyx_n_s__convert_timestamps, 505, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_148)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 505; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/lib.pyx":528 * return out * * def maybe_indices_to_slice(ndarray[int64_t] indices): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = len(indices) */ __pyx_k_tuple_149 = PyTuple_Pack(3, ((PyObject *)__pyx_n_s__indices), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__n)); if (unlikely(!__pyx_k_tuple_149)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 528; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_149); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_149)); __pyx_k_codeobj_150 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_149, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_107, __pyx_n_s_151, 528, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_150)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 528; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/lib.pyx":541 * * * def maybe_booleans_to_slice(ndarray[uint8_t] mask): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = len(mask) */ __pyx_k_tuple_152 = PyTuple_Pack(7, ((PyObject *)__pyx_n_s__mask), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__n), ((PyObject *)__pyx_n_s__start), ((PyObject *)__pyx_n_s__end), ((PyObject *)__pyx_n_s__started), ((PyObject *)__pyx_n_s__finished)); if (unlikely(!__pyx_k_tuple_152)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 541; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_152); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_152)); __pyx_k_codeobj_153 = (PyObject*)__Pyx_PyCode_New(1, 0, 7, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_152, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_107, __pyx_n_s_154, 541, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_153)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 541; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/lib.pyx":572 * @cython.wraparound(False) * @cython.boundscheck(False) * def scalar_compare(ndarray[object] values, object val, object op): # <<<<<<<<<<<<<< * import operator * cdef: */ __pyx_k_tuple_155 = PyTuple_Pack(9, ((PyObject *)__pyx_n_s__values), ((PyObject *)__pyx_n_s__val), ((PyObject *)__pyx_n_s__op), ((PyObject *)__pyx_n_s__operator), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__n), ((PyObject *)__pyx_n_s__result), ((PyObject *)__pyx_n_s__flag), ((PyObject *)__pyx_n_s__x)); if (unlikely(!__pyx_k_tuple_155)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 572; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_155); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_155)); __pyx_k_codeobj_156 = (PyObject*)__Pyx_PyCode_New(3, 0, 9, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_155, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_107, __pyx_n_s__scalar_compare, 572, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_156)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 572; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/lib.pyx":616 * @cython.wraparound(False) * @cython.boundscheck(False) * def vec_compare(ndarray[object] left, ndarray[object] right, object op): # <<<<<<<<<<<<<< * import operator * cdef: */ __pyx_k_tuple_157 = PyTuple_Pack(10, ((PyObject *)__pyx_n_s__left), ((PyObject *)__pyx_n_s__right), ((PyObject *)__pyx_n_s__op), ((PyObject *)__pyx_n_s__operator), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__n), ((PyObject *)__pyx_n_s__result), ((PyObject *)__pyx_n_s__flag), ((PyObject *)__pyx_n_s__x), ((PyObject *)__pyx_n_s__y)); if (unlikely(!__pyx_k_tuple_157)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 616; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_157); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_157)); __pyx_k_codeobj_158 = (PyObject*)__Pyx_PyCode_New(3, 0, 10, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_157, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_107, __pyx_n_s__vec_compare, 616, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_158)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 616; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/lib.pyx":668 * @cython.wraparound(False) * @cython.boundscheck(False) * def scalar_binop(ndarray[object] values, object val, object op): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = len(values) */ __pyx_k_tuple_159 = PyTuple_Pack(7, ((PyObject *)__pyx_n_s__values), ((PyObject *)__pyx_n_s__val), ((PyObject *)__pyx_n_s__op), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__n), ((PyObject *)__pyx_n_s__result), ((PyObject *)__pyx_n_s__x)); if (unlikely(!__pyx_k_tuple_159)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 668; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_159); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_159)); __pyx_k_codeobj_160 = (PyObject*)__Pyx_PyCode_New(3, 0, 7, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_159, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_107, __pyx_n_s__scalar_binop, 668, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_160)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 668; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/lib.pyx":690 * @cython.wraparound(False) * @cython.boundscheck(False) * def vec_binop(ndarray[object] left, ndarray[object] right, object op): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = len(left) */ __pyx_k_tuple_161 = PyTuple_Pack(8, ((PyObject *)__pyx_n_s__left), ((PyObject *)__pyx_n_s__right), ((PyObject *)__pyx_n_s__op), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__n), ((PyObject *)__pyx_n_s__result), ((PyObject *)__pyx_n_s__x), ((PyObject *)__pyx_n_s__y)); if (unlikely(!__pyx_k_tuple_161)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 690; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_161); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_161)); __pyx_k_codeobj_162 = (PyObject*)__Pyx_PyCode_New(3, 0, 8, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_161, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_107, __pyx_n_s__vec_binop, 690, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_162)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 690; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/lib.pyx":717 * * * def astype_intsafe(ndarray[object] arr, new_dtype): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = len(arr) */ __pyx_k_tuple_163 = PyTuple_Pack(7, ((PyObject *)__pyx_n_s__arr), ((PyObject *)__pyx_n_s__new_dtype), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__n), ((PyObject *)__pyx_n_s__v), ((PyObject *)__pyx_n_s__is_datelike), ((PyObject *)__pyx_n_s__result)); if (unlikely(!__pyx_k_tuple_163)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 717; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_163); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_163)); __pyx_k_codeobj_164 = (PyObject*)__Pyx_PyCode_New(2, 0, 7, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_163, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_107, __pyx_n_s__astype_intsafe, 717, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_164)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 717; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/lib.pyx":747 * return result * * def clean_index_list(list obj): # <<<<<<<<<<<<<< * ''' * Utility used in pandas.core.index._ensure_index */ __pyx_k_tuple_165 = PyTuple_Pack(6, ((PyObject *)__pyx_n_s__obj), ((PyObject *)__pyx_n_s__converted), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__n), ((PyObject *)__pyx_n_s__v), ((PyObject *)__pyx_n_s__all_arrays)); if (unlikely(!__pyx_k_tuple_165)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 747; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_165); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_165)); __pyx_k_codeobj_166 = (PyObject*)__Pyx_PyCode_New(1, 0, 6, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_165, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_107, __pyx_n_s__clean_index_list, 747, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_166)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 747; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/lib.pyx":778 * @cython.boundscheck(False) * @cython.wraparound(False) * def max_len_string_array(ndarray[object, ndim=1] arr): # <<<<<<<<<<<<<< * """ return the maximum size of elements in a 1-dim string array """ * cdef: */ __pyx_k_tuple_167 = PyTuple_Pack(6, ((PyObject *)__pyx_n_s__arr), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__m), ((PyObject *)__pyx_n_s__l), ((PyObject *)__pyx_n_s__length), ((PyObject *)__pyx_n_s__v)); if (unlikely(!__pyx_k_tuple_167)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 778; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_167); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_167)); __pyx_k_codeobj_168 = (PyObject*)__Pyx_PyCode_New(1, 0, 6, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_167, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_107, __pyx_n_s_169, 778, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_168)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 778; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/lib.pyx":798 * @cython.boundscheck(False) * @cython.wraparound(False) * def string_array_replace_from_nan_rep(ndarray[object, ndim=1] arr, object nan_rep, object replace = None): # <<<<<<<<<<<<<< * """ replace the values in the array with replacement if they are nan_rep; return the same array """ * */ __pyx_k_tuple_170 = PyTuple_Pack(5, ((PyObject *)__pyx_n_s__arr), ((PyObject *)__pyx_n_s__nan_rep), ((PyObject *)__pyx_n_s__replace), ((PyObject *)__pyx_n_s__length), ((PyObject *)__pyx_n_s__i)); if (unlikely(!__pyx_k_tuple_170)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 798; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_170); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_170)); __pyx_k_codeobj_171 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_170, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_107, __pyx_n_s_172, 798, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_171)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 798; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/lib.pyx":813 * @cython.boundscheck(False) * @cython.wraparound(False) * def write_csv_rows(list data, list data_index, int nlevels, list cols, object writer): # <<<<<<<<<<<<<< * * cdef int N, j, i, ncols */ __pyx_k_tuple_173 = PyTuple_Pack(13, ((PyObject *)__pyx_n_s__data), ((PyObject *)__pyx_n_s__data_index), ((PyObject *)__pyx_n_s__nlevels), ((PyObject *)__pyx_n_s__cols), ((PyObject *)__pyx_n_s__writer), ((PyObject *)__pyx_n_s__N), ((PyObject *)__pyx_n_s__j), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__ncols), ((PyObject *)__pyx_n_s__rows), ((PyObject *)__pyx_n_s__val), ((PyObject *)__pyx_n_s__row), ((PyObject *)__pyx_n_s__x)); if (unlikely(!__pyx_k_tuple_173)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 813; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_173); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_173)); __pyx_k_codeobj_174 = (PyObject*)__Pyx_PyCode_New(5, 0, 13, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_173, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_107, __pyx_n_s__write_csv_rows, 813, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_174)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 813; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/lib.pyx":861 * * @cython.boundscheck(False) * def arrmap(ndarray[object] index, object func): # <<<<<<<<<<<<<< * cdef int length = index.shape[0] * cdef int i = 0 */ __pyx_k_tuple_175 = PyTuple_Pack(5, ((PyObject *)__pyx_n_s__index), ((PyObject *)__pyx_n_s__func), ((PyObject *)__pyx_n_s__length), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__result)); if (unlikely(!__pyx_k_tuple_175)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 861; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_175); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_175)); __pyx_k_codeobj_176 = (PyObject*)__Pyx_PyCode_New(2, 0, 5, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_175, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_107, __pyx_n_s__arrmap, 861, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_176)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 861; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/lib.pyx":874 * @cython.wraparound(False) * @cython.boundscheck(False) * def is_lexsorted(list list_of_arrays): # <<<<<<<<<<<<<< * cdef: * int i */ __pyx_k_tuple_177 = PyTuple_Pack(9, ((PyObject *)__pyx_n_s__list_of_arrays), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__n), ((PyObject *)__pyx_n_s__nlevels), ((PyObject *)__pyx_n_s__k), ((PyObject *)__pyx_n_s__cur), ((PyObject *)__pyx_n_s__pre), ((PyObject *)__pyx_n_s__arr), ((PyObject *)__pyx_n_s__vecs)); if (unlikely(!__pyx_k_tuple_177)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 874; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_177); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_177)); __pyx_k_codeobj_178 = (PyObject*)__Pyx_PyCode_New(1, 0, 9, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_177, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_107, __pyx_n_s__is_lexsorted, 874, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_178)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 874; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/lib.pyx":913 * @cython.boundscheck(False) * @cython.wraparound(False) * def generate_bins_dt64(ndarray[int64_t] values, ndarray[int64_t] binner, # <<<<<<<<<<<<<< * object closed='left'): * """ */ __pyx_k_tuple_179 = PyTuple_Pack(13, ((PyObject *)__pyx_n_s__values), ((PyObject *)__pyx_n_s__binner), ((PyObject *)__pyx_n_s__closed), ((PyObject *)__pyx_n_s__lenidx), ((PyObject *)__pyx_n_s__lenbin), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__j), ((PyObject *)__pyx_n_s__bc), ((PyObject *)__pyx_n_s__vc), ((PyObject *)__pyx_n_s__bins), ((PyObject *)__pyx_n_s__l_bin), ((PyObject *)__pyx_n_s__r_bin), ((PyObject *)__pyx_n_s__right_closed)); if (unlikely(!__pyx_k_tuple_179)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 913; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_179); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_179)); __pyx_k_codeobj_180 = (PyObject*)__Pyx_PyCode_New(3, 0, 13, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_179, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_107, __pyx_n_s__generate_bins_dt64, 913, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_180)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 913; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/lib.pyx":962 * @cython.boundscheck(False) * @cython.wraparound(False) * def row_bool_subset(ndarray[float64_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[uint8_t, cast=True] mask): * cdef: */ __pyx_k_tuple_181 = PyTuple_Pack(8, ((PyObject *)__pyx_n_s__values), ((PyObject *)__pyx_n_s__mask), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__j), ((PyObject *)__pyx_n_s__n), ((PyObject *)__pyx_n_s__k), ((PyObject *)__pyx_n_s__pos), ((PyObject *)__pyx_n_s__out)); if (unlikely(!__pyx_k_tuple_181)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 962; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_181); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_181)); __pyx_k_codeobj_182 = (PyObject*)__Pyx_PyCode_New(2, 0, 8, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_181, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_107, __pyx_n_s__row_bool_subset, 962, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_182)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 962; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/lib.pyx":983 * @cython.boundscheck(False) * @cython.wraparound(False) * def row_bool_subset_object(ndarray[object, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[uint8_t, cast=True] mask): * cdef: */ __pyx_k_tuple_183 = PyTuple_Pack(8, ((PyObject *)__pyx_n_s__values), ((PyObject *)__pyx_n_s__mask), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__j), ((PyObject *)__pyx_n_s__n), ((PyObject *)__pyx_n_s__k), ((PyObject *)__pyx_n_s__pos), ((PyObject *)__pyx_n_s__out)); if (unlikely(!__pyx_k_tuple_183)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 983; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_183); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_183)); __pyx_k_codeobj_184 = (PyObject*)__Pyx_PyCode_New(2, 0, 8, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_183, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_107, __pyx_n_s_185, 983, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_184)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 983; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/lib.pyx":1003 * * * def group_count(ndarray[int64_t] values, Py_ssize_t size): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = len(values) */ __pyx_k_tuple_186 = PyTuple_Pack(5, ((PyObject *)__pyx_n_s__values), ((PyObject *)__pyx_n_s__size), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__n), ((PyObject *)__pyx_n_s__counts)); if (unlikely(!__pyx_k_tuple_186)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1003; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_186); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_186)); __pyx_k_codeobj_187 = (PyObject*)__Pyx_PyCode_New(2, 0, 5, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_186, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_107, __pyx_n_s__group_count, 1003, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_187)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1003; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/lib.pyx":1013 * return counts * * def lookup_values(ndarray[object] values, dict mapping): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = len(values) */ __pyx_k_tuple_188 = PyTuple_Pack(5, ((PyObject *)__pyx_n_s__values), ((PyObject *)__pyx_n_s__mapping), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__n), ((PyObject *)__pyx_n_s__result)); if (unlikely(!__pyx_k_tuple_188)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1013; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_188); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_188)); __pyx_k_codeobj_189 = (PyObject*)__Pyx_PyCode_New(2, 0, 5, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_188, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_107, __pyx_n_s__lookup_values, 1013, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_189)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1013; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/lib.pyx":1023 * * * def count_level_1d(ndarray[uint8_t, cast=True] mask, # <<<<<<<<<<<<<< * ndarray[int64_t] labels, Py_ssize_t max_bin): * cdef: */ __pyx_k_tuple_190 = PyTuple_Pack(6, ((PyObject *)__pyx_n_s__mask), ((PyObject *)__pyx_n_s__labels), ((PyObject *)__pyx_n_s__max_bin), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__n), ((PyObject *)__pyx_n_s__counts)); if (unlikely(!__pyx_k_tuple_190)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1023; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_190); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_190)); __pyx_k_codeobj_191 = (PyObject*)__Pyx_PyCode_New(3, 0, 6, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_190, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_107, __pyx_n_s__count_level_1d, 1023, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_191)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1023; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/lib.pyx":1040 * * * def count_level_2d(ndarray[uint8_t, ndim=2, cast=True] mask, # <<<<<<<<<<<<<< * ndarray[int64_t] labels, Py_ssize_t max_bin): * cdef: */ __pyx_k_tuple_192 = PyTuple_Pack(8, ((PyObject *)__pyx_n_s__mask), ((PyObject *)__pyx_n_s__labels), ((PyObject *)__pyx_n_s__max_bin), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__j), ((PyObject *)__pyx_n_s__k), ((PyObject *)__pyx_n_s__n), ((PyObject *)__pyx_n_s__counts)); if (unlikely(!__pyx_k_tuple_192)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1040; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_192); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_192)); __pyx_k_codeobj_193 = (PyObject*)__Pyx_PyCode_New(3, 0, 8, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_192, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_107, __pyx_n_s__count_level_2d, 1040, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_193)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1040; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/lib.pyx":1071 * pandas_null = _PandasNull() * * def fast_zip_fillna(list ndarrays, fill_value=pandas_null): # <<<<<<<<<<<<<< * ''' * For zipping multiple ndarrays into an ndarray of tuples */ __pyx_k_tuple_194 = PyTuple_Pack(11, ((PyObject *)__pyx_n_s__ndarrays), ((PyObject *)__pyx_n_s__fill_value), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__j), ((PyObject *)__pyx_n_s__k), ((PyObject *)__pyx_n_s__n), ((PyObject *)__pyx_n_s__result), ((PyObject *)__pyx_n_s__it), ((PyObject *)__pyx_n_s__val), ((PyObject *)__pyx_n_s__tup), ((PyObject *)__pyx_n_s__arr)); if (unlikely(!__pyx_k_tuple_194)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1071; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_194); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_194)); __pyx_k_codeobj_195 = (PyObject*)__Pyx_PyCode_New(2, 0, 11, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_194, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_107, __pyx_n_s__fast_zip_fillna, 1071, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_195)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1071; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/lib.pyx":1118 * return result * * def duplicated(ndarray[object] values, take_last=False): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n */ __pyx_k_tuple_196 = PyTuple_Pack(7, ((PyObject *)__pyx_n_s__values), ((PyObject *)__pyx_n_s__take_last), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__n), ((PyObject *)__pyx_n_s__seen), ((PyObject *)__pyx_n_s__row), ((PyObject *)__pyx_n_s__result)); if (unlikely(!__pyx_k_tuple_196)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1118; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_196); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_196)); __pyx_k_codeobj_197 = (PyObject*)__Pyx_PyCode_New(2, 0, 7, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_196, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_107, __pyx_n_s__duplicated, 1118, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_197)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1118; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/lib.pyx":1147 * return result.view(np.bool_) * * def generate_slices(ndarray[int64_t] labels, Py_ssize_t ngroups): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, group_size, n, lab, start */ __pyx_k_tuple_198 = PyTuple_Pack(10, ((PyObject *)__pyx_n_s__labels), ((PyObject *)__pyx_n_s__ngroups), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__group_size), ((PyObject *)__pyx_n_s__n), ((PyObject *)__pyx_n_s__lab), ((PyObject *)__pyx_n_s__start), ((PyObject *)__pyx_n_s__slobj), ((PyObject *)__pyx_n_s__starts), ((PyObject *)__pyx_n_s__ends)); if (unlikely(!__pyx_k_tuple_198)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1147; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_198); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_198)); __pyx_k_codeobj_199 = (PyObject*)__Pyx_PyCode_New(2, 0, 10, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_198, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_107, __pyx_n_s__generate_slices, 1147, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_199)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1147; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/lib.pyx":1172 * * * def indices_fast(object index, ndarray[int64_t] labels, list keys, # <<<<<<<<<<<<<< * list sorted_labels): * cdef: */ __pyx_k_tuple_200 = PyTuple_Pack(14, ((PyObject *)__pyx_n_s__index), ((PyObject *)__pyx_n_s__labels), ((PyObject *)__pyx_n_s__keys), ((PyObject *)__pyx_n_s__sorted_labels), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__j), ((PyObject *)__pyx_n_s__k), ((PyObject *)__pyx_n_s__lab), ((PyObject *)__pyx_n_s__cur), ((PyObject *)__pyx_n_s__start), ((PyObject *)__pyx_n_s__n), ((PyObject *)__pyx_n_s__result), ((PyObject *)__pyx_n_s__tup), ((PyObject *)__pyx_n_s__val)); if (unlikely(!__pyx_k_tuple_200)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1172; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_200); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_200)); __pyx_k_codeobj_201 = (PyObject*)__Pyx_PyCode_New(4, 0, 14, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_200, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_107, __pyx_n_s__indices_fast, 1172, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_201)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1172; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/reduce.pyx":474 * pass * * def apply_frame_axis0(object frame, object f, object names, # <<<<<<<<<<<<<< * ndarray[int64_t] starts, ndarray[int64_t] ends): * cdef: */ __pyx_k_tuple_205 = PyTuple_Pack(16, ((PyObject *)__pyx_n_s__frame), ((PyObject *)__pyx_n_s__f), ((PyObject *)__pyx_n_s__names), ((PyObject *)__pyx_n_s__starts), ((PyObject *)__pyx_n_s__ends), ((PyObject *)__pyx_n_s__slider), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__n), ((PyObject *)__pyx_n_s__results), ((PyObject *)__pyx_n_s__piece), ((PyObject *)__pyx_n_s__item_cache), ((PyObject *)__pyx_n_s__chunk), ((PyObject *)__pyx_n_s__shape_before), ((PyObject *)__pyx_n_s__result), ((PyObject *)__pyx_n_s__mutated), ((PyObject *)__pyx_n_s__gin)); if (unlikely(!__pyx_k_tuple_205)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 474; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_205); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_205)); __pyx_k_codeobj_206 = (PyObject*)__Pyx_PyCode_New(5, 0, 16, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_205, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_207, __pyx_n_s__apply_frame_axis0, 474, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_206)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 474; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/reduce.pyx":591 * * * def reduce(arr, f, axis=0, dummy=None, labels=None): # <<<<<<<<<<<<<< * if labels._has_complex_internals: * raise Exception('Cannot use shortcut') */ __pyx_k_tuple_208 = PyTuple_Pack(6, ((PyObject *)__pyx_n_s__arr), ((PyObject *)__pyx_n_s__f), ((PyObject *)__pyx_n_s__axis), ((PyObject *)__pyx_n_s__dummy), ((PyObject *)__pyx_n_s__labels), ((PyObject *)__pyx_n_s__reducer)); if (unlikely(!__pyx_k_tuple_208)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 591; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_208); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_208)); __pyx_k_codeobj_209 = (PyObject*)__Pyx_PyCode_New(5, 0, 6, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_208, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_207, __pyx_n_s__reduce, 591, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_209)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 591; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/inference.pyx":33 * pass * * def infer_dtype(object _values): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n */ __pyx_k_tuple_210 = PyTuple_Pack(6, ((PyObject *)__pyx_n_s___values), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__n), ((PyObject *)__pyx_n_s__val), ((PyObject *)__pyx_n_s__values), ((PyObject *)__pyx_n_s__val_kind)); if (unlikely(!__pyx_k_tuple_210)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 33; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_210); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_210)); __pyx_k_codeobj_211 = (PyObject*)__Pyx_PyCode_New(1, 0, 6, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_210, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_68, __pyx_n_s__infer_dtype, 33, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_211)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 33; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/inference.pyx":133 * return 'mixed' * * def infer_dtype_list(list values): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = len(values) */ __pyx_k_tuple_212 = PyTuple_Pack(3, ((PyObject *)__pyx_n_s__values), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__n)); if (unlikely(!__pyx_k_tuple_212)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 133; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_212); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_212)); __pyx_k_codeobj_213 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_212, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_68, __pyx_n_s__infer_dtype_list, 133, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_213)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 133; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/inference.pyx":154 * return PyDelta_Check(o) or util.is_timedelta64_object(o) * * def is_bool_array(ndarray values): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = len(values) */ __pyx_k_tuple_214 = PyTuple_Pack(5, ((PyObject *)__pyx_n_s__values), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__n), ((PyObject *)__pyx_n_s__objbuf), ((PyObject *)__pyx_n_s__obj)); if (unlikely(!__pyx_k_tuple_214)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 154; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_214); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_214)); __pyx_k_codeobj_215 = (PyObject*)__Pyx_PyCode_New(1, 0, 5, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_214, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_68, __pyx_n_s__is_bool_array, 154, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_215)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 154; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/inference.pyx":175 * return False * * def is_integer(object o): # <<<<<<<<<<<<<< * return util.is_integer_object(o) * */ __pyx_k_tuple_216 = PyTuple_Pack(1, ((PyObject *)__pyx_n_s__o)); if (unlikely(!__pyx_k_tuple_216)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 175; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_216); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_216)); __pyx_k_codeobj_217 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_216, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_68, __pyx_n_s__is_integer, 175, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_217)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 175; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/inference.pyx":178 * return util.is_integer_object(o) * * def is_integer_array(ndarray values): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = len(values) */ __pyx_k_tuple_218 = PyTuple_Pack(5, ((PyObject *)__pyx_n_s__values), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__n), ((PyObject *)__pyx_n_s__objbuf), ((PyObject *)__pyx_n_s__obj)); if (unlikely(!__pyx_k_tuple_218)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 178; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_218); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_218)); __pyx_k_codeobj_219 = (PyObject*)__Pyx_PyCode_New(1, 0, 5, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_218, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_68, __pyx_n_s__is_integer_array, 178, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_219)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 178; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/inference.pyx":199 * return False * * def is_integer_float_array(ndarray values): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = len(values) */ __pyx_k_tuple_220 = PyTuple_Pack(5, ((PyObject *)__pyx_n_s__values), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__n), ((PyObject *)__pyx_n_s__objbuf), ((PyObject *)__pyx_n_s__obj)); if (unlikely(!__pyx_k_tuple_220)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 199; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_220); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_220)); __pyx_k_codeobj_221 = (PyObject*)__Pyx_PyCode_New(1, 0, 5, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_220, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_68, __pyx_n_s_52, 199, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_221)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 199; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/inference.pyx":222 * return False * * def is_float_array(ndarray values): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = len(values) */ __pyx_k_tuple_222 = PyTuple_Pack(5, ((PyObject *)__pyx_n_s__values), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__n), ((PyObject *)__pyx_n_s__objbuf), ((PyObject *)__pyx_n_s__obj)); if (unlikely(!__pyx_k_tuple_222)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 222; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_222); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_222)); __pyx_k_codeobj_223 = (PyObject*)__Pyx_PyCode_New(1, 0, 5, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_222, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_68, __pyx_n_s__is_float_array, 222, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_223)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 222; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/inference.pyx":243 * return False * * def is_string_array(ndarray values): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = len(values) */ __pyx_k_tuple_224 = PyTuple_Pack(5, ((PyObject *)__pyx_n_s__values), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__n), ((PyObject *)__pyx_n_s__objbuf), ((PyObject *)__pyx_n_s__obj)); if (unlikely(!__pyx_k_tuple_224)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_224); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_224)); __pyx_k_codeobj_225 = (PyObject*)__Pyx_PyCode_New(1, 0, 5, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_224, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_68, __pyx_n_s__is_string_array, 243, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_225)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/inference.pyx":264 * return False * * def is_unicode_array(ndarray values): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = len(values) */ __pyx_k_tuple_226 = PyTuple_Pack(5, ((PyObject *)__pyx_n_s__values), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__n), ((PyObject *)__pyx_n_s__objbuf), ((PyObject *)__pyx_n_s__obj)); if (unlikely(!__pyx_k_tuple_226)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 264; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_226); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_226)); __pyx_k_codeobj_227 = (PyObject*)__Pyx_PyCode_New(1, 0, 5, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_226, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_68, __pyx_n_s__is_unicode_array, 264, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_227)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 264; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/inference.pyx":286 * * * def is_datetime_array(ndarray[object] values): # <<<<<<<<<<<<<< * cdef int i, n = len(values) * cdef object v */ __pyx_k_tuple_228 = PyTuple_Pack(4, ((PyObject *)__pyx_n_s__values), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__n), ((PyObject *)__pyx_n_s__v)); if (unlikely(!__pyx_k_tuple_228)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 286; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_228); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_228)); __pyx_k_codeobj_229 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_228, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_68, __pyx_n_s__is_datetime_array, 286, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_229)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 286; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/inference.pyx":298 * * * def is_datetime64_array(ndarray values): # <<<<<<<<<<<<<< * cdef int i, n = len(values) * cdef object v */ __pyx_k_tuple_230 = PyTuple_Pack(4, ((PyObject *)__pyx_n_s__values), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__n), ((PyObject *)__pyx_n_s__v)); if (unlikely(!__pyx_k_tuple_230)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 298; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_230); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_230)); __pyx_k_codeobj_231 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_230, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_68, __pyx_n_s__is_datetime64_array, 298, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_231)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 298; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/inference.pyx":309 * return True * * def is_timedelta_array(ndarray values): # <<<<<<<<<<<<<< * cdef int i, n = len(values) * cdef object v */ __pyx_k_tuple_232 = PyTuple_Pack(4, ((PyObject *)__pyx_n_s__values), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__n), ((PyObject *)__pyx_n_s__v)); if (unlikely(!__pyx_k_tuple_232)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 309; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_232); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_232)); __pyx_k_codeobj_233 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_232, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_68, __pyx_n_s__is_timedelta_array, 309, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_233)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 309; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/inference.pyx":320 * return True * * def is_timedelta64_array(ndarray values): # <<<<<<<<<<<<<< * cdef int i, n = len(values) * cdef object v */ __pyx_k_tuple_234 = PyTuple_Pack(4, ((PyObject *)__pyx_n_s__values), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__n), ((PyObject *)__pyx_n_s__v)); if (unlikely(!__pyx_k_tuple_234)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 320; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_234); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_234)); __pyx_k_codeobj_235 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_234, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_68, __pyx_n_s_236, 320, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_235)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 320; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/inference.pyx":331 * return True * * def is_timedelta_or_timedelta64_array(ndarray values): # <<<<<<<<<<<<<< * """ infer with timedeltas and/or nat/none """ * cdef int i, n = len(values) */ __pyx_k_tuple_237 = PyTuple_Pack(4, ((PyObject *)__pyx_n_s__values), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__n), ((PyObject *)__pyx_n_s__v)); if (unlikely(!__pyx_k_tuple_237)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 331; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_237); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_237)); __pyx_k_codeobj_238 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_237, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_68, __pyx_n_s_51, 331, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_238)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 331; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/inference.pyx":343 * return True * * def is_date_array(ndarray[object] values): # <<<<<<<<<<<<<< * cdef int i, n = len(values) * if n == 0: */ __pyx_k_tuple_239 = PyTuple_Pack(3, ((PyObject *)__pyx_n_s__values), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__n)); if (unlikely(!__pyx_k_tuple_239)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 343; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_239); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_239)); __pyx_k_codeobj_240 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_239, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_68, __pyx_n_s__is_date_array, 343, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_240)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 343; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/inference.pyx":352 * return True * * def is_time_array(ndarray[object] values): # <<<<<<<<<<<<<< * cdef int i, n = len(values) * if n == 0: */ __pyx_k_tuple_241 = PyTuple_Pack(3, ((PyObject *)__pyx_n_s__values), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__n)); if (unlikely(!__pyx_k_tuple_241)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 352; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_241); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_241)); __pyx_k_codeobj_242 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_241, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_68, __pyx_n_s__is_time_array, 352, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_242)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 352; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/inference.pyx":361 * return True * * def is_period(object o): # <<<<<<<<<<<<<< * from pandas import Period * return isinstance(o,Period) */ __pyx_k_tuple_243 = PyTuple_Pack(2, ((PyObject *)__pyx_n_s__o), ((PyObject *)__pyx_n_s__Period)); if (unlikely(!__pyx_k_tuple_243)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 361; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_243); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_243)); __pyx_k_codeobj_244 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_243, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_68, __pyx_n_s__is_period, 361, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_244)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 361; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/inference.pyx":365 * return isinstance(o,Period) * * def is_period_array(ndarray[object] values): # <<<<<<<<<<<<<< * cdef int i, n = len(values) * from pandas.tseries.period import Period */ __pyx_k_tuple_245 = PyTuple_Pack(4, ((PyObject *)__pyx_n_s__values), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__n), ((PyObject *)__pyx_n_s__Period)); if (unlikely(!__pyx_k_tuple_245)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 365; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_245); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_245)); __pyx_k_codeobj_246 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_245, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_68, __pyx_n_s__is_period_array, 365, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_246)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 365; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/inference.pyx":383 * cdef double fINT64_MIN = INT64_MIN * * def maybe_convert_numeric(ndarray[object] values, set na_values, # <<<<<<<<<<<<<< * convert_empty=True, coerce_numeric=False): * ''' */ __pyx_k_tuple_247 = PyTuple_Pack(15, ((PyObject *)__pyx_n_s__values), ((PyObject *)__pyx_n_s__na_values), ((PyObject *)__pyx_n_s__convert_empty), ((PyObject *)__pyx_n_s__coerce_numeric), ((PyObject *)__pyx_n_s__status), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__n), ((PyObject *)__pyx_n_s__floats), ((PyObject *)__pyx_n_s__complexes), ((PyObject *)__pyx_n_s__ints), ((PyObject *)__pyx_n_s__seen_float), ((PyObject *)__pyx_n_s__seen_complex), ((PyObject *)__pyx_n_s__val), ((PyObject *)__pyx_n_s__fval), ((PyObject *)__pyx_n_s__seen_int)); if (unlikely(!__pyx_k_tuple_247)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 383; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_247); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_247)); __pyx_k_codeobj_248 = (PyObject*)__Pyx_PyCode_New(4, 0, 15, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_247, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_68, __pyx_n_s_249, 383, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_248)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 383; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/inference.pyx":461 * return ints * * def maybe_convert_objects(ndarray[object] objects, bint try_float=0, # <<<<<<<<<<<<<< * bint safe=0, bint convert_datetime=0, bint convert_timedelta=0): * ''' */ __pyx_k_tuple_250 = PyTuple_Pack(28, ((PyObject *)__pyx_n_s__objects), ((PyObject *)__pyx_n_s__try_float), ((PyObject *)__pyx_n_s__safe), ((PyObject *)__pyx_n_s__convert_datetime), ((PyObject *)__pyx_n_s__convert_timedelta), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__n), ((PyObject *)__pyx_n_s__floats), ((PyObject *)__pyx_n_s__complexes), ((PyObject *)__pyx_n_s__ints), ((PyObject *)__pyx_n_s__bools), ((PyObject *)__pyx_n_s__idatetimes), ((PyObject *)__pyx_n_s__itimedeltas), ((PyObject *)__pyx_n_s__seen_float), ((PyObject *)__pyx_n_s__seen_complex), ((PyObject *)__pyx_n_s__seen_datetime), ((PyObject *)__pyx_n_s__seen_timedelta), ((PyObject *)__pyx_n_s__seen_int), ((PyObject *)__pyx_n_s__seen_bool), ((PyObject *)__pyx_n_s__seen_object), ((PyObject *)__pyx_n_s__seen_null), ((PyObject *)__pyx_n_s__seen_numeric), ((PyObject *)__pyx_n_s__val), ((PyObject *)__pyx_n_s__onan), ((PyObject *)__pyx_n_s__fval), ((PyObject *)__pyx_n_s__fnan), ((PyObject *)__pyx_n_s__datetimes), ((PyObject *)__pyx_n_s__timedeltas)); if (unlikely(!__pyx_k_tuple_250)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 461; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_250); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_250)); __pyx_k_codeobj_251 = (PyObject*)__Pyx_PyCode_New(5, 0, 28, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_250, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_68, __pyx_n_s_12, 461, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_251)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 461; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/inference.pyx":626 * * * def convert_sql_column(x): # <<<<<<<<<<<<<< * return maybe_convert_objects(x, try_float=1) * */ __pyx_k_tuple_252 = PyTuple_Pack(1, ((PyObject *)__pyx_n_s__x)); if (unlikely(!__pyx_k_tuple_252)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 626; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_252); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_252)); __pyx_k_codeobj_253 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_252, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_68, __pyx_n_s__convert_sql_column, 626, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_253)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 626; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/inference.pyx":629 * return maybe_convert_objects(x, try_float=1) * * def try_parse_dates(ndarray[object] values, parser=None, # <<<<<<<<<<<<<< * dayfirst=False,default=None): * cdef: */ __pyx_k_tuple_254 = PyTuple_Pack(11, ((PyObject *)__pyx_n_s__values), ((PyObject *)__pyx_n_s__parser), ((PyObject *)__pyx_n_s__dayfirst), ((PyObject *)__pyx_n_s__default), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__n), ((PyObject *)__pyx_n_s__result), ((PyObject *)__pyx_n_s__date), ((PyObject *)__pyx_n_s__parse), ((PyObject *)__pyx_n_s__parse_date), ((PyObject *)__pyx_n_s__parse_date)); if (unlikely(!__pyx_k_tuple_254)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 629; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_254); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_254)); __pyx_k_codeobj_255 = (PyObject*)__Pyx_PyCode_New(4, 0, 11, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_254, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_68, __pyx_n_s__try_parse_dates, 629, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_255)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 629; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/inference.pyx":677 * return result * * def try_parse_date_and_time(ndarray[object] dates, ndarray[object] times, # <<<<<<<<<<<<<< * date_parser=None, time_parser=None, * dayfirst=False,default=None): */ __pyx_k_tuple_256 = PyTuple_Pack(20, ((PyObject *)__pyx_n_s__dates), ((PyObject *)__pyx_n_s__times), ((PyObject *)__pyx_n_s__date_parser), ((PyObject *)__pyx_n_s__time_parser), ((PyObject *)__pyx_n_s__dayfirst), ((PyObject *)__pyx_n_s__default), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__n), ((PyObject *)__pyx_n_s__result), ((PyObject *)__pyx_n_s__date), ((PyObject *)__pyx_n_s__time), ((PyObject *)__pyx_n_s__datetime), ((PyObject *)__pyx_n_s__timedelta), ((PyObject *)__pyx_n_s__parse), ((PyObject *)__pyx_n_s__parse_date), ((PyObject *)__pyx_n_s__parse_date), ((PyObject *)__pyx_n_s__parse_time), ((PyObject *)__pyx_n_s__parse_time), ((PyObject *)__pyx_n_s__d), ((PyObject *)__pyx_n_s__t)); if (unlikely(!__pyx_k_tuple_256)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 677; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_256); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_256)); __pyx_k_codeobj_257 = (PyObject*)__Pyx_PyCode_New(6, 0, 20, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_256, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_68, __pyx_n_s_258, 677, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_257)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 677; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/inference.pyx":731 * * * def try_parse_year_month_day(ndarray[object] years, ndarray[object] months, # <<<<<<<<<<<<<< * ndarray[object] days): * cdef: */ __pyx_k_tuple_259 = PyTuple_Pack(7, ((PyObject *)__pyx_n_s__years), ((PyObject *)__pyx_n_s__months), ((PyObject *)__pyx_n_s__days), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__n), ((PyObject *)__pyx_n_s__result), ((PyObject *)__pyx_n_s__datetime)); if (unlikely(!__pyx_k_tuple_259)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 731; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_259); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_259)); __pyx_k_codeobj_260 = (PyObject*)__Pyx_PyCode_New(3, 0, 7, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_259, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_68, __pyx_n_s_261, 731, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_260)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 731; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/inference.pyx":749 * return result * * def try_parse_datetime_components(ndarray[object] years, # <<<<<<<<<<<<<< * ndarray[object] months, * ndarray[object] days, */ __pyx_k_tuple_262 = PyTuple_Pack(13, ((PyObject *)__pyx_n_s__years), ((PyObject *)__pyx_n_s__months), ((PyObject *)__pyx_n_s__days), ((PyObject *)__pyx_n_s__hours), ((PyObject *)__pyx_n_s__minutes), ((PyObject *)__pyx_n_s__seconds), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__n), ((PyObject *)__pyx_n_s__result), ((PyObject *)__pyx_n_s__secs), ((PyObject *)__pyx_n_s__float_secs), ((PyObject *)__pyx_n_s__micros), ((PyObject *)__pyx_n_s__datetime)); if (unlikely(!__pyx_k_tuple_262)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 749; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_262); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_262)); __pyx_k_codeobj_263 = (PyObject*)__Pyx_PyCode_New(6, 0, 13, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_262, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_68, __pyx_n_s_264, 749, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_263)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 749; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/inference.pyx":785 * return result * * def sanitize_objects(ndarray[object] values, set na_values, # <<<<<<<<<<<<<< * convert_empty=True): * cdef: */ __pyx_k_tuple_265 = PyTuple_Pack(9, ((PyObject *)__pyx_n_s__values), ((PyObject *)__pyx_n_s__na_values), ((PyObject *)__pyx_n_s__convert_empty), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__n), ((PyObject *)__pyx_n_s__val), ((PyObject *)__pyx_n_s__onan), ((PyObject *)__pyx_n_s__na_count), ((PyObject *)__pyx_n_s__memo)); if (unlikely(!__pyx_k_tuple_265)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 785; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_265); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_265)); __pyx_k_codeobj_266 = (PyObject*)__Pyx_PyCode_New(3, 0, 9, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_265, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_68, __pyx_n_s__sanitize_objects, 785, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_266)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 785; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/inference.pyx":808 * return na_count * * def maybe_convert_bool(ndarray[object] arr, # <<<<<<<<<<<<<< * true_values=None, false_values=None): * cdef: */ __pyx_k_tuple_267 = PyTuple_Pack(11, ((PyObject *)__pyx_n_s__arr), ((PyObject *)__pyx_n_s__true_values), ((PyObject *)__pyx_n_s__false_values), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__n), ((PyObject *)__pyx_n_s__result), ((PyObject *)__pyx_n_s__val), ((PyObject *)__pyx_n_s__true_vals), ((PyObject *)__pyx_n_s__false_vals), ((PyObject *)__pyx_n_s__na_count), ((PyObject *)__pyx_n_s__mask)); if (unlikely(!__pyx_k_tuple_267)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 808; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_267); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_267)); __pyx_k_codeobj_268 = (PyObject*)__Pyx_PyCode_New(3, 0, 11, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_267, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_68, __pyx_n_s__maybe_convert_bool, 808, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_268)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 808; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/inference.pyx":857 * * * def map_infer_mask(ndarray arr, object f, ndarray[uint8_t] mask, # <<<<<<<<<<<<<< * bint convert=1): * ''' */ __pyx_k_tuple_269 = PyTuple_Pack(8, ((PyObject *)__pyx_n_s__arr), ((PyObject *)__pyx_n_s__f), ((PyObject *)__pyx_n_s__mask), ((PyObject *)__pyx_n_s__convert), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__n), ((PyObject *)__pyx_n_s__result), ((PyObject *)__pyx_n_s__val)); if (unlikely(!__pyx_k_tuple_269)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 857; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_269); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_269)); __pyx_k_codeobj_270 = (PyObject*)__Pyx_PyCode_New(4, 0, 8, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_269, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_68, __pyx_n_s__map_infer_mask, 857, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_270)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 857; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/inference.pyx":899 * return result * * def map_infer(ndarray arr, object f, bint convert=1): # <<<<<<<<<<<<<< * ''' * Substitute for np.vectorize with pandas-friendly dtype inference */ __pyx_k_tuple_271 = PyTuple_Pack(7, ((PyObject *)__pyx_n_s__arr), ((PyObject *)__pyx_n_s__f), ((PyObject *)__pyx_n_s__convert), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__n), ((PyObject *)__pyx_n_s__result), ((PyObject *)__pyx_n_s__val)); if (unlikely(!__pyx_k_tuple_271)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 899; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_271); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_271)); __pyx_k_codeobj_272 = (PyObject*)__Pyx_PyCode_New(3, 0, 7, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_271, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_68, __pyx_n_s__map_infer, 899, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_272)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 899; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/inference.pyx":938 * * * def to_object_array(list rows): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, j, n, k, tmp */ __pyx_k_tuple_273 = PyTuple_Pack(8, ((PyObject *)__pyx_n_s__rows), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__j), ((PyObject *)__pyx_n_s__n), ((PyObject *)__pyx_n_s__k), ((PyObject *)__pyx_n_s__tmp), ((PyObject *)__pyx_n_s__result), ((PyObject *)__pyx_n_s__row)); if (unlikely(!__pyx_k_tuple_273)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 938; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_273); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_273)); __pyx_k_codeobj_274 = (PyObject*)__Pyx_PyCode_New(1, 0, 8, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_273, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_68, __pyx_n_s__to_object_array, 938, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_274)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 938; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/inference.pyx":962 * return result * * def tuples_to_object_array(ndarray[object] tuples): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, j, n, k, tmp */ __pyx_k_tuple_275 = PyTuple_Pack(8, ((PyObject *)__pyx_n_s__tuples), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__j), ((PyObject *)__pyx_n_s__n), ((PyObject *)__pyx_n_s__k), ((PyObject *)__pyx_n_s__tmp), ((PyObject *)__pyx_n_s__result), ((PyObject *)__pyx_n_s__tup)); if (unlikely(!__pyx_k_tuple_275)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 962; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_275); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_275)); __pyx_k_codeobj_276 = (PyObject*)__Pyx_PyCode_New(1, 0, 8, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_275, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_68, __pyx_n_s_277, 962, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_276)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 962; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/inference.pyx":978 * return result * * def to_object_array_tuples(list rows): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, j, n, k, tmp */ __pyx_k_tuple_278 = PyTuple_Pack(8, ((PyObject *)__pyx_n_s__rows), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__j), ((PyObject *)__pyx_n_s__n), ((PyObject *)__pyx_n_s__k), ((PyObject *)__pyx_n_s__tmp), ((PyObject *)__pyx_n_s__result), ((PyObject *)__pyx_n_s__row)); if (unlikely(!__pyx_k_tuple_278)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 978; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_278); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_278)); __pyx_k_codeobj_279 = (PyObject*)__Pyx_PyCode_New(1, 0, 8, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_278, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_68, __pyx_n_s_280, 978, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_279)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 978; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/inference.pyx":1009 * * * def fast_multiget(dict mapping, ndarray keys, default=np.nan): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = len(keys) */ __pyx_k_tuple_281 = PyTuple_Pack(7, ((PyObject *)__pyx_n_s__mapping), ((PyObject *)__pyx_n_s__keys), ((PyObject *)__pyx_n_s__default), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__n), ((PyObject *)__pyx_n_s__val), ((PyObject *)__pyx_n_s__output)); if (unlikely(!__pyx_k_tuple_281)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1009; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_281); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_281)); __pyx_k_codeobj_282 = (PyObject*)__Pyx_PyCode_New(3, 0, 7, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_281, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_68, __pyx_n_s__fast_multiget, 1009, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_282)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1009; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __pyx_int_0 = PyInt_FromLong(0); if (unlikely(!__pyx_int_0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __pyx_int_1 = PyInt_FromLong(1); if (unlikely(!__pyx_int_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __pyx_int_neg_1 = PyInt_FromLong(-1); if (unlikely(!__pyx_int_neg_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __pyx_int_15 = PyInt_FromLong(15); if (unlikely(!__pyx_int_15)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; return 0; __pyx_L1_error:; return -1; } #if PY_MAJOR_VERSION < 3 PyMODINIT_FUNC initlib(void); /*proto*/ PyMODINIT_FUNC initlib(void) #else PyMODINIT_FUNC PyInit_lib(void); /*proto*/ PyMODINIT_FUNC PyInit_lib(void) #endif { PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; double __pyx_t_4; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; int __pyx_t_9; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannyDeclarations #if CYTHON_REFNANNY __Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny"); if (!__Pyx_RefNanny) { PyErr_Clear(); __Pyx_RefNanny = __Pyx_RefNannyImportAPI("Cython.Runtime.refnanny"); if (!__Pyx_RefNanny) Py_FatalError("failed to import 'refnanny' module"); } #endif __Pyx_RefNannySetupContext("PyMODINIT_FUNC PyInit_lib(void)", 0); if ( __Pyx_check_binary_version() < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_empty_tuple)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_bytes)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #ifdef __Pyx_CyFunction_USED if (__Pyx_CyFunction_init() < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif #ifdef __Pyx_FusedFunction_USED if (__pyx_FusedFunction_init() < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif #ifdef __Pyx_Generator_USED if (__pyx_Generator_init() < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif /*--- Library function declarations ---*/ /*--- Threads initialization code ---*/ #if defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS #ifdef WITH_THREAD /* Python build with threading support? */ PyEval_InitThreads(); #endif #endif /*--- Module creation code ---*/ #if PY_MAJOR_VERSION < 3 __pyx_m = Py_InitModule4(__Pyx_NAMESTR("lib"), __pyx_methods, 0, 0, PYTHON_API_VERSION); Py_XINCREF(__pyx_m); #else __pyx_m = PyModule_Create(&__pyx_moduledef); #endif if (unlikely(!__pyx_m)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_d)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} Py_INCREF(__pyx_d); #if PY_MAJOR_VERSION >= 3 { PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (!PyDict_GetItemString(modules, "pandas.lib")) { if (unlikely(PyDict_SetItemString(modules, "pandas.lib", __pyx_m) < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } } #endif __pyx_b = PyImport_AddModule(__Pyx_NAMESTR(__Pyx_BUILTIN_MODULE_NAME)); if (unlikely(!__pyx_b)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #if CYTHON_COMPILING_IN_PYPY Py_INCREF(__pyx_b); #endif if (__Pyx_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; /*--- Initialize various global constants etc. ---*/ if (unlikely(__Pyx_InitGlobals() < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif if (__pyx_module_is_main_pandas__lib) { if (__Pyx_SetAttrString(__pyx_m, "__name__", __pyx_n_s____main__) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; } /*--- Builtin init code ---*/ if (unlikely(__Pyx_InitCachedBuiltins() < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /*--- Constants init code ---*/ if (unlikely(__Pyx_InitCachedConstants() < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /*--- Global init code ---*/ /*--- Variable export code ---*/ /*--- Function export code ---*/ /*--- Type init code ---*/ if (PyType_Ready(&__pyx_type_6pandas_3lib___pyx_scope_struct_1_try_parse_date_and_time) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 677; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_6pandas_3lib___pyx_scope_struct_1_try_parse_date_and_time = &__pyx_type_6pandas_3lib___pyx_scope_struct_1_try_parse_date_and_time; if (PyType_Ready(&__pyx_type_6pandas_3lib_Reducer) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 9; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__Pyx_SetAttrString(__pyx_m, "Reducer", (PyObject *)&__pyx_type_6pandas_3lib_Reducer) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 9; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_6pandas_3lib_Reducer = &__pyx_type_6pandas_3lib_Reducer; if (PyType_Ready(&__pyx_type_6pandas_3lib_AxisProperty) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 53; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__Pyx_SetAttrString(__pyx_m, "AxisProperty", (PyObject *)&__pyx_type_6pandas_3lib_AxisProperty) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 53; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_6pandas_3lib_AxisProperty = &__pyx_type_6pandas_3lib_AxisProperty; if (PyType_Ready(&__pyx_type_6pandas_3lib__PandasNull) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1056; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__Pyx_SetAttrString(__pyx_m, "_PandasNull", (PyObject *)&__pyx_type_6pandas_3lib__PandasNull) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1056; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_6pandas_3lib__PandasNull = &__pyx_type_6pandas_3lib__PandasNull; if (PyType_Ready(&__pyx_type_6pandas_3lib___pyx_scope_struct__try_parse_dates) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 629; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_6pandas_3lib___pyx_scope_struct__try_parse_dates = &__pyx_type_6pandas_3lib___pyx_scope_struct__try_parse_dates; if (PyType_Ready(&__pyx_type_6pandas_3lib_SeriesBinGrouper) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__Pyx_SetAttrString(__pyx_m, "SeriesBinGrouper", (PyObject *)&__pyx_type_6pandas_3lib_SeriesBinGrouper) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_6pandas_3lib_SeriesBinGrouper = &__pyx_type_6pandas_3lib_SeriesBinGrouper; __pyx_vtabptr_6pandas_3lib_BlockSlider = &__pyx_vtable_6pandas_3lib_BlockSlider; __pyx_vtable_6pandas_3lib_BlockSlider.move = (PyObject *(*)(struct __pyx_obj_6pandas_3lib_BlockSlider *, int, int, int __pyx_skip_dispatch))__pyx_f_6pandas_3lib_11BlockSlider_move; __pyx_vtable_6pandas_3lib_BlockSlider.reset = (PyObject *(*)(struct __pyx_obj_6pandas_3lib_BlockSlider *))__pyx_f_6pandas_3lib_11BlockSlider_reset; if (PyType_Ready(&__pyx_type_6pandas_3lib_BlockSlider) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 529; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__Pyx_SetVtable(__pyx_type_6pandas_3lib_BlockSlider.tp_dict, __pyx_vtabptr_6pandas_3lib_BlockSlider) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 529; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__Pyx_SetAttrString(__pyx_m, "BlockSlider", (PyObject *)&__pyx_type_6pandas_3lib_BlockSlider) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 529; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_6pandas_3lib_BlockSlider = &__pyx_type_6pandas_3lib_BlockSlider; if (PyType_Ready(&__pyx_type_6pandas_3lib_cache_readonly) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 4; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__Pyx_SetAttrString(__pyx_m, "cache_readonly", (PyObject *)&__pyx_type_6pandas_3lib_cache_readonly) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 4; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_6pandas_3lib_cache_readonly = &__pyx_type_6pandas_3lib_cache_readonly; if (PyType_Ready(&__pyx_type_6pandas_3lib_SeriesGrouper) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 285; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__Pyx_SetAttrString(__pyx_m, "SeriesGrouper", (PyObject *)&__pyx_type_6pandas_3lib_SeriesGrouper) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 285; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_6pandas_3lib_SeriesGrouper = &__pyx_type_6pandas_3lib_SeriesGrouper; __pyx_vtabptr_6pandas_3lib_Slider = &__pyx_vtable_6pandas_3lib_Slider; __pyx_vtable_6pandas_3lib_Slider.advance = (PyObject *(*)(struct __pyx_obj_6pandas_3lib_Slider *, Py_ssize_t, int __pyx_skip_dispatch))__pyx_f_6pandas_3lib_6Slider_advance; __pyx_vtable_6pandas_3lib_Slider.move = (PyObject *(*)(struct __pyx_obj_6pandas_3lib_Slider *, int, int))__pyx_f_6pandas_3lib_6Slider_move; __pyx_vtable_6pandas_3lib_Slider.set_length = (PyObject *(*)(struct __pyx_obj_6pandas_3lib_Slider *, Py_ssize_t, int __pyx_skip_dispatch))__pyx_f_6pandas_3lib_6Slider_set_length; __pyx_vtable_6pandas_3lib_Slider.reset = (PyObject *(*)(struct __pyx_obj_6pandas_3lib_Slider *, int __pyx_skip_dispatch))__pyx_f_6pandas_3lib_6Slider_reset; if (PyType_Ready(&__pyx_type_6pandas_3lib_Slider) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 426; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__Pyx_SetVtable(__pyx_type_6pandas_3lib_Slider.tp_dict, __pyx_vtabptr_6pandas_3lib_Slider) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 426; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__Pyx_SetAttrString(__pyx_m, "Slider", (PyObject *)&__pyx_type_6pandas_3lib_Slider) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 426; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_6pandas_3lib_Slider = &__pyx_type_6pandas_3lib_Slider; /*--- Type import code ---*/ __pyx_ptype_5numpy_dtype = __Pyx_ImportType("numpy", "dtype", sizeof(PyArray_Descr), 0); if (unlikely(!__pyx_ptype_5numpy_dtype)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_5numpy_flatiter = __Pyx_ImportType("numpy", "flatiter", sizeof(PyArrayIterObject), 0); if (unlikely(!__pyx_ptype_5numpy_flatiter)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 167; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_5numpy_broadcast = __Pyx_ImportType("numpy", "broadcast", sizeof(PyArrayMultiIterObject), 0); if (unlikely(!__pyx_ptype_5numpy_broadcast)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 171; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_5numpy_ndarray = __Pyx_ImportType("numpy", "ndarray", sizeof(PyArrayObject), 0); if (unlikely(!__pyx_ptype_5numpy_ndarray)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_5numpy_ufunc = __Pyx_ImportType("numpy", "ufunc", sizeof(PyUFuncObject), 0); if (unlikely(!__pyx_ptype_5numpy_ufunc)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 865; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_7cpython_4type_type = __Pyx_ImportType(__Pyx_BUILTIN_MODULE_NAME, "type", #if CYTHON_COMPILING_IN_PYPY sizeof(PyTypeObject), #else sizeof(PyHeapTypeObject), #endif 0); if (unlikely(!__pyx_ptype_7cpython_4type_type)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 9; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_7cpython_4bool_bool = __Pyx_ImportType(__Pyx_BUILTIN_MODULE_NAME, "bool", sizeof(PyBoolObject), 0); if (unlikely(!__pyx_ptype_7cpython_4bool_bool)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 8; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_7cpython_7complex_complex = __Pyx_ImportType(__Pyx_BUILTIN_MODULE_NAME, "complex", sizeof(PyComplexObject), 0); if (unlikely(!__pyx_ptype_7cpython_7complex_complex)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 15; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_8datetime_date = __Pyx_ImportType("datetime", "date", sizeof(PyDateTime_Date), 0); if (unlikely(!__pyx_ptype_8datetime_date)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 15; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_8datetime_datetime = __Pyx_ImportType("datetime", "datetime", sizeof(PyDateTime_DateTime), 0); if (unlikely(!__pyx_ptype_8datetime_datetime)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 18; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_8datetime_timedelta = __Pyx_ImportType("datetime", "timedelta", sizeof(PyDateTime_Delta), 0); if (unlikely(!__pyx_ptype_8datetime_timedelta)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 21; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /*--- Variable import code ---*/ /*--- Function import code ---*/ __pyx_t_1 = __Pyx_ImportModule("pandas.tslib"); if (!__pyx_t_1) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__Pyx_ImportFunction(__pyx_t_1, "convert_to_tsobject", (void (**)(void))&__pyx_f_6pandas_5tslib_convert_to_tsobject, "PyObject *(PyObject *, PyObject *, PyObject *)") < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__Pyx_ImportFunction(__pyx_t_1, "convert_to_timedelta64", (void (**)(void))&__pyx_f_6pandas_5tslib_convert_to_timedelta64, "PyObject *(PyObject *, PyObject *, PyObject *)") < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} Py_DECREF(__pyx_t_1); __pyx_t_1 = 0; /*--- Execution code ---*/ /* "pandas/lib.pyx":3 * cimport numpy as np * cimport cython * import numpy as np # <<<<<<<<<<<<<< * * from numpy cimport * */ __pyx_t_2 = __Pyx_Import(((PyObject *)__pyx_n_s__numpy), 0, -1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s__np, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/lib.pyx":24 * cimport cpython * * isnan = np.isnan # <<<<<<<<<<<<<< * cdef double NaN = np.NaN * cdef double nan = NaN */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 24; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__isnan); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 24; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (PyDict_SetItem(__pyx_d, __pyx_n_s__isnan, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 24; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/lib.pyx":25 * * isnan = np.isnan * cdef double NaN = np.NaN # <<<<<<<<<<<<<< * cdef double nan = NaN * cdef double NAN = nan */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 25; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s__NaN); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 25; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_4 = __pyx_PyFloat_AsDouble(__pyx_t_2); if (unlikely((__pyx_t_4 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 25; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_6pandas_3lib_NaN = ((double)__pyx_t_4); /* "pandas/lib.pyx":26 * isnan = np.isnan * cdef double NaN = np.NaN * cdef double nan = NaN # <<<<<<<<<<<<<< * cdef double NAN = nan * */ __pyx_v_6pandas_3lib_nan = __pyx_v_6pandas_3lib_NaN; /* "pandas/lib.pyx":27 * cdef double NaN = np.NaN * cdef double nan = NaN * cdef double NAN = nan # <<<<<<<<<<<<<< * * from datetime import datetime as pydatetime */ __pyx_v_6pandas_3lib_NAN = __pyx_v_6pandas_3lib_nan; /* "pandas/lib.pyx":29 * cdef double NAN = nan * * from datetime import datetime as pydatetime # <<<<<<<<<<<<<< * * # this is our tseries.pxd */ __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 29; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(((PyObject *)__pyx_n_s__datetime)); PyList_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_n_s__datetime)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__datetime)); __pyx_t_3 = __Pyx_Import(((PyObject *)__pyx_n_s__datetime), ((PyObject *)__pyx_t_2), -1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 29; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s__datetime); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 29; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s__pydatetime, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 29; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/lib.pyx":35 * * from tslib cimport convert_to_tsobject, convert_to_timedelta64 * import tslib # <<<<<<<<<<<<<< * from tslib import NaT, Timestamp, repr_timedelta64 * */ __pyx_t_3 = __Pyx_Import(((PyObject *)__pyx_n_s__tslib), 0, -1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s__tslib, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/lib.pyx":36 * from tslib cimport convert_to_tsobject, convert_to_timedelta64 * import tslib * from tslib import NaT, Timestamp, repr_timedelta64 # <<<<<<<<<<<<<< * * cdef int64_t NPY_NAT = util.get_nat() */ __pyx_t_3 = PyList_New(3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 36; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(((PyObject *)__pyx_n_s__NaT)); PyList_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_n_s__NaT)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__NaT)); __Pyx_INCREF(((PyObject *)__pyx_n_s__Timestamp)); PyList_SET_ITEM(__pyx_t_3, 1, ((PyObject *)__pyx_n_s__Timestamp)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__Timestamp)); __Pyx_INCREF(((PyObject *)__pyx_n_s__repr_timedelta64)); PyList_SET_ITEM(__pyx_t_3, 2, ((PyObject *)__pyx_n_s__repr_timedelta64)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__repr_timedelta64)); __pyx_t_2 = __Pyx_Import(((PyObject *)__pyx_n_s__tslib), ((PyObject *)__pyx_t_3), -1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 36; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s__NaT); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 36; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s__NaT, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 36; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s__Timestamp); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 36; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s__Timestamp, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 36; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s__repr_timedelta64); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 36; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s__repr_timedelta64, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 36; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/lib.pyx":38 * from tslib import NaT, Timestamp, repr_timedelta64 * * cdef int64_t NPY_NAT = util.get_nat() # <<<<<<<<<<<<<< * * ctypedef unsigned char UChar */ __pyx_v_6pandas_3lib_NPY_NAT = get_nat(); /* "pandas/lib.pyx":56 * * # import datetime C API * PyDateTime_IMPORT # <<<<<<<<<<<<<< * * # initialize numpy */ PyDateTime_IMPORT; /* "pandas/lib.pyx":59 * * # initialize numpy * import_array() # <<<<<<<<<<<<<< * import_ufunc() * */ import_array(); /* "pandas/lib.pyx":60 * # initialize numpy * import_array() * import_ufunc() # <<<<<<<<<<<<<< * * cpdef map_indices_list(list index): */ import_ufunc(); /* "pandas/lib.pyx":85 * from libc.stdlib cimport malloc, free * * def ismember(ndarray arr, set values): # <<<<<<<<<<<<<< * ''' * Checks whether */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_3ismember, NULL, __pyx_n_s_65); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s__ismember, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/lib.pyx":117 * # datetime / io related * * cdef int _EPOCH_ORD = 719163 # <<<<<<<<<<<<<< * * from datetime import date as pydate */ __pyx_v_6pandas_3lib__EPOCH_ORD = 719163; /* "pandas/lib.pyx":119 * cdef int _EPOCH_ORD = 719163 * * from datetime import date as pydate # <<<<<<<<<<<<<< * * cdef inline int64_t gmtime(object date): */ __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 119; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(((PyObject *)__pyx_n_s__date)); PyList_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_n_s__date)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__date)); __pyx_t_3 = __Pyx_Import(((PyObject *)__pyx_n_s__datetime), ((PyObject *)__pyx_t_2), -1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 119; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s__date); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 119; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s__pydate, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 119; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/lib.pyx":140 * return gmtime(dt) * * def array_to_timestamp(ndarray[object, ndim=1] arr): # <<<<<<<<<<<<<< * cdef int i, n * cdef ndarray[int64_t, ndim=1] result */ __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_9array_to_timestamp, NULL, __pyx_n_s_65); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 140; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s__array_to_timestamp, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 140; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/lib.pyx":152 * return result * * def time64_to_datetime(ndarray[int64_t, ndim=1] arr): # <<<<<<<<<<<<<< * cdef int i, n * cdef ndarray[object, ndim=1] result */ __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_11time64_to_datetime, NULL, __pyx_n_s_65); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 152; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s__time64_to_datetime, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 152; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/lib.pyx":170 * # isnull / notnull related * * cdef double INF = np.inf # <<<<<<<<<<<<<< * cdef double NEGINF = -INF * */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 170; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s__inf); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 170; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_4 = __pyx_PyFloat_AsDouble(__pyx_t_2); if (unlikely((__pyx_t_4 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 170; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_6pandas_3lib_INF = ((double)__pyx_t_4); /* "pandas/lib.pyx":171 * * cdef double INF = np.inf * cdef double NEGINF = -INF # <<<<<<<<<<<<<< * * cpdef checknull(object val): */ __pyx_v_6pandas_3lib_NEGINF = (-__pyx_v_6pandas_3lib_INF); /* "pandas/lib.pyx":201 * return util._checknull(val) * * def isscalar(object val): # <<<<<<<<<<<<<< * return np.isscalar(val) or val is None or PyDateTime_Check(val) * */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_17isscalar, NULL, __pyx_n_s_65); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 201; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s__isscalar, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 201; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/lib.pyx":207 * @cython.wraparound(False) * @cython.boundscheck(False) * def isnullobj(ndarray[object] arr): # <<<<<<<<<<<<<< * cdef Py_ssize_t i, n * cdef object val */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_19isnullobj, NULL, __pyx_n_s_65); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 207; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s__isnullobj, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 207; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/lib.pyx":221 * @cython.wraparound(False) * @cython.boundscheck(False) * def isnullobj_old(ndarray[object] arr): # <<<<<<<<<<<<<< * cdef Py_ssize_t i, n * cdef object val */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_21isnullobj_old, NULL, __pyx_n_s_65); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 221; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s__isnullobj_old, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 221; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/lib.pyx":235 * @cython.wraparound(False) * @cython.boundscheck(False) * def isnullobj2d(ndarray[object, ndim=2] arr): # <<<<<<<<<<<<<< * cdef Py_ssize_t i, j, n, m * cdef object val */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_23isnullobj2d, NULL, __pyx_n_s_65); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 235; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s__isnullobj2d, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 235; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/lib.pyx":251 * @cython.wraparound(False) * @cython.boundscheck(False) * def isnullobj_old(ndarray[object] arr): # <<<<<<<<<<<<<< * cdef Py_ssize_t i, n * cdef object val */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_25isnullobj_old, NULL, __pyx_n_s_65); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 251; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s__isnullobj_old, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 251; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/lib.pyx":265 * @cython.wraparound(False) * @cython.boundscheck(False) * def isnullobj2d_old(ndarray[object, ndim=2] arr): # <<<<<<<<<<<<<< * cdef Py_ssize_t i, j, n, m * cdef object val */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_27isnullobj2d_old, NULL, __pyx_n_s_65); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 265; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s__isnullobj2d_old, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 265; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/lib.pyx":279 * return result.view(np.bool_) * * def list_to_object_array(list obj): # <<<<<<<<<<<<<< * ''' * Convert list to object ndarray. Seriously can't believe I had to write this */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_29list_to_object_array, NULL, __pyx_n_s_65); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 279; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_49, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 279; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/lib.pyx":299 * @cython.wraparound(False) * @cython.boundscheck(False) * def fast_unique(ndarray[object] values): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = len(values) */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_31fast_unique, NULL, __pyx_n_s_65); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 299; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s__fast_unique, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 299; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/lib.pyx":320 * @cython.wraparound(False) * @cython.boundscheck(False) * def fast_unique_multiple(list arrays): # <<<<<<<<<<<<<< * cdef: * ndarray[object] buf */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_33fast_unique_multiple, NULL, __pyx_n_s_65); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 320; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_130, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 320; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/lib.pyx":346 * @cython.wraparound(False) * @cython.boundscheck(False) * def fast_unique_multiple_list(list lists): # <<<<<<<<<<<<<< * cdef: * list buf */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_35fast_unique_multiple_list, NULL, __pyx_n_s_65); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 346; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_133, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 346; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/lib.pyx":372 * @cython.wraparound(False) * @cython.boundscheck(False) * def fast_unique_multiple_list_gen(object gen): # <<<<<<<<<<<<<< * cdef: * list buf */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_37fast_unique_multiple_list_gen, NULL, __pyx_n_s_65); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 372; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_136, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 372; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/lib.pyx":397 * @cython.wraparound(False) * @cython.boundscheck(False) * def dicts_to_array(list dicts, list columns): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, j, k, n */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_39dicts_to_array, NULL, __pyx_n_s_65); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 397; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s__dicts_to_array, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 397; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/lib.pyx":420 * return result * * def fast_zip(list ndarrays): # <<<<<<<<<<<<<< * ''' * For zipping multiple ndarrays into an ndarray of tuples */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_41fast_zip, NULL, __pyx_n_s_65); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 420; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s__fast_zip, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 420; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/lib.pyx":461 * return result * * def get_reverse_indexer(ndarray[int64_t] indexer, Py_ssize_t length): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = len(indexer) */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_43get_reverse_indexer, NULL, __pyx_n_s_65); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 461; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s__get_reverse_indexer, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 461; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/lib.pyx":477 * * * def has_infs_f4(ndarray[float32_t] arr): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = len(arr) */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_45has_infs_f4, NULL, __pyx_n_s_65); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 477; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s__has_infs_f4, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 477; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/lib.pyx":491 * return False * * def has_infs_f8(ndarray[float64_t] arr): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = len(arr) */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_47has_infs_f8, NULL, __pyx_n_s_65); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 491; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s__has_infs_f8, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 491; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/lib.pyx":505 * return False * * def convert_timestamps(ndarray values): # <<<<<<<<<<<<<< * cdef: * object val, f, result */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_49convert_timestamps, NULL, __pyx_n_s_65); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 505; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s__convert_timestamps, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 505; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/lib.pyx":528 * return out * * def maybe_indices_to_slice(ndarray[int64_t] indices): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = len(indices) */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_51maybe_indices_to_slice, NULL, __pyx_n_s_65); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 528; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_151, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 528; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/lib.pyx":541 * * * def maybe_booleans_to_slice(ndarray[uint8_t] mask): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = len(mask) */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_53maybe_booleans_to_slice, NULL, __pyx_n_s_65); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 541; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_154, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 541; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/lib.pyx":572 * @cython.wraparound(False) * @cython.boundscheck(False) * def scalar_compare(ndarray[object] values, object val, object op): # <<<<<<<<<<<<<< * import operator * cdef: */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_55scalar_compare, NULL, __pyx_n_s_65); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 572; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s__scalar_compare, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 572; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/lib.pyx":616 * @cython.wraparound(False) * @cython.boundscheck(False) * def vec_compare(ndarray[object] left, ndarray[object] right, object op): # <<<<<<<<<<<<<< * import operator * cdef: */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_57vec_compare, NULL, __pyx_n_s_65); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 616; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s__vec_compare, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 616; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/lib.pyx":668 * @cython.wraparound(False) * @cython.boundscheck(False) * def scalar_binop(ndarray[object] values, object val, object op): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = len(values) */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_59scalar_binop, NULL, __pyx_n_s_65); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 668; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s__scalar_binop, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 668; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/lib.pyx":690 * @cython.wraparound(False) * @cython.boundscheck(False) * def vec_binop(ndarray[object] left, ndarray[object] right, object op): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = len(left) */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_61vec_binop, NULL, __pyx_n_s_65); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 690; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s__vec_binop, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 690; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/lib.pyx":717 * * * def astype_intsafe(ndarray[object] arr, new_dtype): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = len(arr) */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_63astype_intsafe, NULL, __pyx_n_s_65); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 717; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s__astype_intsafe, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 717; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/lib.pyx":747 * return result * * def clean_index_list(list obj): # <<<<<<<<<<<<<< * ''' * Utility used in pandas.core.index._ensure_index */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_67clean_index_list, NULL, __pyx_n_s_65); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 747; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s__clean_index_list, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 747; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/lib.pyx":778 * @cython.boundscheck(False) * @cython.wraparound(False) * def max_len_string_array(ndarray[object, ndim=1] arr): # <<<<<<<<<<<<<< * """ return the maximum size of elements in a 1-dim string array """ * cdef: */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_69max_len_string_array, NULL, __pyx_n_s_65); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 778; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_169, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 778; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/lib.pyx":798 * @cython.boundscheck(False) * @cython.wraparound(False) * def string_array_replace_from_nan_rep(ndarray[object, ndim=1] arr, object nan_rep, object replace = None): # <<<<<<<<<<<<<< * """ replace the values in the array with replacement if they are nan_rep; return the same array """ * */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_71string_array_replace_from_nan_rep, NULL, __pyx_n_s_65); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 798; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_172, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 798; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/lib.pyx":813 * @cython.boundscheck(False) * @cython.wraparound(False) * def write_csv_rows(list data, list data_index, int nlevels, list cols, object writer): # <<<<<<<<<<<<<< * * cdef int N, j, i, ncols */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_73write_csv_rows, NULL, __pyx_n_s_65); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 813; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s__write_csv_rows, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 813; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/lib.pyx":861 * * @cython.boundscheck(False) * def arrmap(ndarray[object] index, object func): # <<<<<<<<<<<<<< * cdef int length = index.shape[0] * cdef int i = 0 */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_75arrmap, NULL, __pyx_n_s_65); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 861; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s__arrmap, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 861; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/lib.pyx":874 * @cython.wraparound(False) * @cython.boundscheck(False) * def is_lexsorted(list list_of_arrays): # <<<<<<<<<<<<<< * cdef: * int i */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_77is_lexsorted, NULL, __pyx_n_s_65); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 874; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s__is_lexsorted, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 874; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/lib.pyx":913 * @cython.boundscheck(False) * @cython.wraparound(False) * def generate_bins_dt64(ndarray[int64_t] values, ndarray[int64_t] binner, # <<<<<<<<<<<<<< * object closed='left'): * """ */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_79generate_bins_dt64, NULL, __pyx_n_s_65); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 913; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s__generate_bins_dt64, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 913; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/lib.pyx":962 * @cython.boundscheck(False) * @cython.wraparound(False) * def row_bool_subset(ndarray[float64_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[uint8_t, cast=True] mask): * cdef: */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_81row_bool_subset, NULL, __pyx_n_s_65); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 962; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s__row_bool_subset, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 962; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/lib.pyx":983 * @cython.boundscheck(False) * @cython.wraparound(False) * def row_bool_subset_object(ndarray[object, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[uint8_t, cast=True] mask): * cdef: */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_83row_bool_subset_object, NULL, __pyx_n_s_65); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 983; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_185, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 983; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/lib.pyx":1003 * * * def group_count(ndarray[int64_t] values, Py_ssize_t size): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = len(values) */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_85group_count, NULL, __pyx_n_s_65); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1003; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s__group_count, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1003; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/lib.pyx":1013 * return counts * * def lookup_values(ndarray[object] values, dict mapping): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = len(values) */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_87lookup_values, NULL, __pyx_n_s_65); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1013; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s__lookup_values, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1013; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/lib.pyx":1023 * * * def count_level_1d(ndarray[uint8_t, cast=True] mask, # <<<<<<<<<<<<<< * ndarray[int64_t] labels, Py_ssize_t max_bin): * cdef: */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_89count_level_1d, NULL, __pyx_n_s_65); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1023; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s__count_level_1d, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1023; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/lib.pyx":1040 * * * def count_level_2d(ndarray[uint8_t, ndim=2, cast=True] mask, # <<<<<<<<<<<<<< * ndarray[int64_t] labels, Py_ssize_t max_bin): * cdef: */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_91count_level_2d, NULL, __pyx_n_s_65); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1040; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s__count_level_2d, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1040; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/lib.pyx":1069 * return 0 * * pandas_null = _PandasNull() # <<<<<<<<<<<<<< * * def fast_zip_fillna(list ndarrays, fill_value=pandas_null): */ __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_6pandas_3lib__PandasNull)), ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1069; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s__pandas_null, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1069; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/lib.pyx":1071 * pandas_null = _PandasNull() * * def fast_zip_fillna(list ndarrays, fill_value=pandas_null): # <<<<<<<<<<<<<< * ''' * For zipping multiple ndarrays into an ndarray of tuples */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__pandas_null); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1071; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_k_19 = __pyx_t_2; __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_93fast_zip_fillna, NULL, __pyx_n_s_65); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1071; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s__fast_zip_fillna, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1071; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/lib.pyx":1118 * return result * * def duplicated(ndarray[object] values, take_last=False): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n */ __pyx_t_2 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1118; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_k_21 = __pyx_t_2; __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_95duplicated, NULL, __pyx_n_s_65); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1118; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s__duplicated, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1118; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/lib.pyx":1147 * return result.view(np.bool_) * * def generate_slices(ndarray[int64_t] labels, Py_ssize_t ngroups): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, group_size, n, lab, start */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_97generate_slices, NULL, __pyx_n_s_65); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1147; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s__generate_slices, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1147; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/lib.pyx":1172 * * * def indices_fast(object index, ndarray[int64_t] labels, list keys, # <<<<<<<<<<<<<< * list sorted_labels): * cdef: */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_99indices_fast, NULL, __pyx_n_s_65); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1172; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s__indices_fast, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1172; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/reduce.pyx":3 * #cython=False * from numpy cimport * * import numpy as np # <<<<<<<<<<<<<< * * from distutils.version import LooseVersion */ __pyx_t_2 = __Pyx_Import(((PyObject *)__pyx_n_s__numpy), 0, -1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s__np, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/reduce.pyx":5 * import numpy as np * * from distutils.version import LooseVersion # <<<<<<<<<<<<<< * * is_numpy_prior_1_6_2 = LooseVersion(np.__version__) < '1.6.2' */ __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 5; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(((PyObject *)__pyx_n_s__LooseVersion)); PyList_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_n_s__LooseVersion)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__LooseVersion)); __pyx_t_3 = __Pyx_Import(((PyObject *)__pyx_n_s_202), ((PyObject *)__pyx_t_2), -1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 5; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s__LooseVersion); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 5; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s__LooseVersion, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 5; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/reduce.pyx":7 * from distutils.version import LooseVersion * * is_numpy_prior_1_6_2 = LooseVersion(np.__version__) < '1.6.2' # <<<<<<<<<<<<<< * * cdef class Reducer: */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s__LooseVersion); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 7; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 7; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s____version__); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 7; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 7; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 7; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __pyx_t_2 = PyObject_RichCompare(__pyx_t_5, ((PyObject *)__pyx_kp_s_203), Py_LT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 7; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_d, __pyx_n_s_204, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 7; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/reduce.pyx":471 * * * class InvalidApply(Exception): # <<<<<<<<<<<<<< * pass * */ __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 471; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_2)); __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 471; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_builtin_Exception); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_builtin_Exception); __Pyx_GIVEREF(__pyx_builtin_Exception); __pyx_t_3 = __Pyx_CreateClass(((PyObject *)__pyx_t_5), ((PyObject *)__pyx_t_2), __pyx_n_s__InvalidApply, __pyx_n_s__InvalidApply, __pyx_n_s_65); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 471; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_d, __pyx_n_s__InvalidApply, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 471; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; /* "pandas/src/reduce.pyx":474 * pass * * def apply_frame_axis0(object frame, object f, object names, # <<<<<<<<<<<<<< * ndarray[int64_t] starts, ndarray[int64_t] ends): * cdef: */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_101apply_frame_axis0, NULL, __pyx_n_s_65); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 474; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s__apply_frame_axis0, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 474; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/reduce.pyx":591 * * * def reduce(arr, f, axis=0, dummy=None, labels=None): # <<<<<<<<<<<<<< * if labels._has_complex_internals: * raise Exception('Cannot use shortcut') */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_103reduce, NULL, __pyx_n_s_65); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 591; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s__reduce, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 591; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/properties.pyx":9 * object func, name, allow_setting * * def __init__(self, func=None, allow_setting=False): # <<<<<<<<<<<<<< * if func is not None: * self.func = func */ __pyx_t_2 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 9; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_k_47 = __pyx_t_2; __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/inference.pyx":2 * cimport util * from tslib import NaT # <<<<<<<<<<<<<< * from datetime import datetime, timedelta * iNaT = util.get_nat() */ __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(((PyObject *)__pyx_n_s__NaT)); PyList_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_n_s__NaT)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__NaT)); __pyx_t_3 = __Pyx_Import(((PyObject *)__pyx_n_s__tslib), ((PyObject *)__pyx_t_2), -1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s__NaT); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s__NaT, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/inference.pyx":3 * cimport util * from tslib import NaT * from datetime import datetime, timedelta # <<<<<<<<<<<<<< * iNaT = util.get_nat() * */ __pyx_t_3 = PyList_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(((PyObject *)__pyx_n_s__datetime)); PyList_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_n_s__datetime)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__datetime)); __Pyx_INCREF(((PyObject *)__pyx_n_s__timedelta)); PyList_SET_ITEM(__pyx_t_3, 1, ((PyObject *)__pyx_n_s__timedelta)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__timedelta)); __pyx_t_2 = __Pyx_Import(((PyObject *)__pyx_n_s__datetime), ((PyObject *)__pyx_t_3), -1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/inference.pyx":4 * from tslib import NaT * from datetime import datetime, timedelta * iNaT = util.get_nat() # <<<<<<<<<<<<<< * * _TYPE_MAP = { */ __pyx_t_2 = __Pyx_PyInt_to_py_npy_int64(get_nat()); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s__iNaT, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/inference.pyx":6 * iNaT = util.get_nat() * * _TYPE_MAP = { # <<<<<<<<<<<<<< * np.int8: 'integer', * np.int16: 'integer', */ __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 6; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_2)); /* "pandas/src/inference.pyx":7 * * _TYPE_MAP = { * np.int8: 'integer', # <<<<<<<<<<<<<< * np.int16: 'integer', * np.int32: 'integer', */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 7; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s__int8); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 7; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (PyDict_SetItem(__pyx_t_2, __pyx_t_5, ((PyObject *)__pyx_n_s__integer)) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 6; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "pandas/src/inference.pyx":8 * _TYPE_MAP = { * np.int8: 'integer', * np.int16: 'integer', # <<<<<<<<<<<<<< * np.int32: 'integer', * np.int64: 'integer', */ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 8; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s__int16); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 8; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_2, __pyx_t_3, ((PyObject *)__pyx_n_s__integer)) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 6; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/inference.pyx":9 * np.int8: 'integer', * np.int16: 'integer', * np.int32: 'integer', # <<<<<<<<<<<<<< * np.int64: 'integer', * np.uint8: 'integer', */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 9; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 9; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (PyDict_SetItem(__pyx_t_2, __pyx_t_5, ((PyObject *)__pyx_n_s__integer)) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 6; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "pandas/src/inference.pyx":10 * np.int16: 'integer', * np.int32: 'integer', * np.int64: 'integer', # <<<<<<<<<<<<<< * np.uint8: 'integer', * np.uint16: 'integer', */ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 10; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s__int64); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 10; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_2, __pyx_t_3, ((PyObject *)__pyx_n_s__integer)) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 6; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/inference.pyx":11 * np.int32: 'integer', * np.int64: 'integer', * np.uint8: 'integer', # <<<<<<<<<<<<<< * np.uint16: 'integer', * np.uint32: 'integer', */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 11; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s__uint8); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 11; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (PyDict_SetItem(__pyx_t_2, __pyx_t_5, ((PyObject *)__pyx_n_s__integer)) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 6; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "pandas/src/inference.pyx":12 * np.int64: 'integer', * np.uint8: 'integer', * np.uint16: 'integer', # <<<<<<<<<<<<<< * np.uint32: 'integer', * np.uint64: 'integer', */ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 12; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s__uint16); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 12; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_2, __pyx_t_3, ((PyObject *)__pyx_n_s__integer)) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 6; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/inference.pyx":13 * np.uint8: 'integer', * np.uint16: 'integer', * np.uint32: 'integer', # <<<<<<<<<<<<<< * np.uint64: 'integer', * np.float32: 'floating', */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 13; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s__uint32); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 13; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (PyDict_SetItem(__pyx_t_2, __pyx_t_5, ((PyObject *)__pyx_n_s__integer)) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 6; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "pandas/src/inference.pyx":14 * np.uint16: 'integer', * np.uint32: 'integer', * np.uint64: 'integer', # <<<<<<<<<<<<<< * np.float32: 'floating', * np.float64: 'floating', */ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 14; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s__uint64); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 14; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_2, __pyx_t_3, ((PyObject *)__pyx_n_s__integer)) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 6; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/inference.pyx":15 * np.uint32: 'integer', * np.uint64: 'integer', * np.float32: 'floating', # <<<<<<<<<<<<<< * np.float64: 'floating', * np.complex128: 'complex', */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 15; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s__float32); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 15; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (PyDict_SetItem(__pyx_t_2, __pyx_t_5, ((PyObject *)__pyx_n_s__floating)) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 6; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "pandas/src/inference.pyx":16 * np.uint64: 'integer', * np.float32: 'floating', * np.float64: 'floating', # <<<<<<<<<<<<<< * np.complex128: 'complex', * np.complex128: 'complex', */ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 16; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s__float64); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 16; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_2, __pyx_t_3, ((PyObject *)__pyx_n_s__floating)) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 6; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/inference.pyx":17 * np.float32: 'floating', * np.float64: 'floating', * np.complex128: 'complex', # <<<<<<<<<<<<<< * np.complex128: 'complex', * np.string_: 'string', */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 17; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s__complex128); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 17; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (PyDict_SetItem(__pyx_t_2, __pyx_t_5, ((PyObject *)__pyx_n_s__complex)) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 6; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "pandas/src/inference.pyx":18 * np.float64: 'floating', * np.complex128: 'complex', * np.complex128: 'complex', # <<<<<<<<<<<<<< * np.string_: 'string', * np.unicode_: 'unicode', */ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 18; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s__complex128); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 18; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_2, __pyx_t_3, ((PyObject *)__pyx_n_s__complex)) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 6; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/inference.pyx":19 * np.complex128: 'complex', * np.complex128: 'complex', * np.string_: 'string', # <<<<<<<<<<<<<< * np.unicode_: 'unicode', * np.bool_: 'boolean', */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 19; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s__string_); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 19; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (PyDict_SetItem(__pyx_t_2, __pyx_t_5, ((PyObject *)__pyx_n_s__string)) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 6; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "pandas/src/inference.pyx":20 * np.complex128: 'complex', * np.string_: 'string', * np.unicode_: 'unicode', # <<<<<<<<<<<<<< * np.bool_: 'boolean', * np.datetime64 : 'datetime64', */ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 20; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s__unicode_); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 20; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_2, __pyx_t_3, ((PyObject *)__pyx_n_s__unicode)) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 6; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/inference.pyx":21 * np.string_: 'string', * np.unicode_: 'unicode', * np.bool_: 'boolean', # <<<<<<<<<<<<<< * np.datetime64 : 'datetime64', * np.timedelta64 : 'timedelta64' */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 21; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s__bool_); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 21; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (PyDict_SetItem(__pyx_t_2, __pyx_t_5, ((PyObject *)__pyx_n_s__boolean)) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 6; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "pandas/src/inference.pyx":22 * np.unicode_: 'unicode', * np.bool_: 'boolean', * np.datetime64 : 'datetime64', # <<<<<<<<<<<<<< * np.timedelta64 : 'timedelta64' * } */ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 22; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s__datetime64); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 22; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_2, __pyx_t_3, ((PyObject *)__pyx_n_s__datetime64)) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 6; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/inference.pyx":23 * np.bool_: 'boolean', * np.datetime64 : 'datetime64', * np.timedelta64 : 'timedelta64' # <<<<<<<<<<<<<< * } * */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 23; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s__timedelta64); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 23; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (PyDict_SetItem(__pyx_t_2, __pyx_t_5, ((PyObject *)__pyx_n_s__timedelta64)) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 6; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_d, __pyx_n_s___TYPE_MAP, ((PyObject *)__pyx_t_2)) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 6; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; /* "pandas/src/inference.pyx":26 * } * * try: # <<<<<<<<<<<<<< * _TYPE_MAP[np.float128] = 'floating' * _TYPE_MAP[np.complex256] = 'complex' */ { __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8); __Pyx_XGOTREF(__pyx_t_6); __Pyx_XGOTREF(__pyx_t_7); __Pyx_XGOTREF(__pyx_t_8); /*try:*/ { /* "pandas/src/inference.pyx":27 * * try: * _TYPE_MAP[np.float128] = 'floating' # <<<<<<<<<<<<<< * _TYPE_MAP[np.complex256] = 'complex' * _TYPE_MAP[np.float16] = 'floating' */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s___TYPE_MAP); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 27; __pyx_clineno = __LINE__; goto __pyx_L2_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 27; __pyx_clineno = __LINE__; goto __pyx_L2_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s__float128); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 27; __pyx_clineno = __LINE__; goto __pyx_L2_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (PyObject_SetItem(__pyx_t_2, __pyx_t_3, ((PyObject *)__pyx_n_s__floating)) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 27; __pyx_clineno = __LINE__; goto __pyx_L2_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/inference.pyx":28 * try: * _TYPE_MAP[np.float128] = 'floating' * _TYPE_MAP[np.complex256] = 'complex' # <<<<<<<<<<<<<< * _TYPE_MAP[np.float16] = 'floating' * except AttributeError: */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s___TYPE_MAP); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 28; __pyx_clineno = __LINE__; goto __pyx_L2_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 28; __pyx_clineno = __LINE__; goto __pyx_L2_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__complex256); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 28; __pyx_clineno = __LINE__; goto __pyx_L2_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (PyObject_SetItem(__pyx_t_3, __pyx_t_5, ((PyObject *)__pyx_n_s__complex)) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 28; __pyx_clineno = __LINE__; goto __pyx_L2_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "pandas/src/inference.pyx":29 * _TYPE_MAP[np.float128] = 'floating' * _TYPE_MAP[np.complex256] = 'complex' * _TYPE_MAP[np.float16] = 'floating' # <<<<<<<<<<<<<< * except AttributeError: * pass */ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s___TYPE_MAP); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 29; __pyx_clineno = __LINE__; goto __pyx_L2_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 29; __pyx_clineno = __LINE__; goto __pyx_L2_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s__float16); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 29; __pyx_clineno = __LINE__; goto __pyx_L2_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (PyObject_SetItem(__pyx_t_5, __pyx_t_2, ((PyObject *)__pyx_n_s__floating)) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 29; __pyx_clineno = __LINE__; goto __pyx_L2_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; goto __pyx_L9_try_end; __pyx_L2_error:; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/inference.pyx":30 * _TYPE_MAP[np.complex256] = 'complex' * _TYPE_MAP[np.float16] = 'floating' * except AttributeError: # <<<<<<<<<<<<<< * pass * */ __pyx_t_9 = PyErr_ExceptionMatches(__pyx_builtin_AttributeError); if (__pyx_t_9) { PyErr_Restore(0,0,0); goto __pyx_L3_exception_handled; } __Pyx_XGIVEREF(__pyx_t_6); __Pyx_XGIVEREF(__pyx_t_7); __Pyx_XGIVEREF(__pyx_t_8); __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8); goto __pyx_L1_error; __pyx_L3_exception_handled:; __Pyx_XGIVEREF(__pyx_t_6); __Pyx_XGIVEREF(__pyx_t_7); __Pyx_XGIVEREF(__pyx_t_8); __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8); __pyx_L9_try_end:; } /* "pandas/src/inference.pyx":33 * pass * * def infer_dtype(object _values): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_105infer_dtype, NULL, __pyx_n_s_65); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 33; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s__infer_dtype, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 33; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/inference.pyx":133 * return 'mixed' * * def infer_dtype_list(list values): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = len(values) */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_107infer_dtype_list, NULL, __pyx_n_s_65); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 133; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s__infer_dtype_list, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 133; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/inference.pyx":154 * return PyDelta_Check(o) or util.is_timedelta64_object(o) * * def is_bool_array(ndarray values): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = len(values) */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_109is_bool_array, NULL, __pyx_n_s_65); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 154; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s__is_bool_array, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 154; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/inference.pyx":175 * return False * * def is_integer(object o): # <<<<<<<<<<<<<< * return util.is_integer_object(o) * */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_111is_integer, NULL, __pyx_n_s_65); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 175; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s__is_integer, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 175; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/inference.pyx":178 * return util.is_integer_object(o) * * def is_integer_array(ndarray values): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = len(values) */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_113is_integer_array, NULL, __pyx_n_s_65); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 178; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s__is_integer_array, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 178; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/inference.pyx":199 * return False * * def is_integer_float_array(ndarray values): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = len(values) */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_115is_integer_float_array, NULL, __pyx_n_s_65); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 199; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_52, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 199; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/inference.pyx":222 * return False * * def is_float_array(ndarray values): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = len(values) */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_117is_float_array, NULL, __pyx_n_s_65); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 222; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s__is_float_array, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 222; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/inference.pyx":243 * return False * * def is_string_array(ndarray values): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = len(values) */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_119is_string_array, NULL, __pyx_n_s_65); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s__is_string_array, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/inference.pyx":264 * return False * * def is_unicode_array(ndarray values): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = len(values) */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_121is_unicode_array, NULL, __pyx_n_s_65); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 264; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s__is_unicode_array, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 264; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/inference.pyx":286 * * * def is_datetime_array(ndarray[object] values): # <<<<<<<<<<<<<< * cdef int i, n = len(values) * cdef object v */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_123is_datetime_array, NULL, __pyx_n_s_65); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 286; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s__is_datetime_array, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 286; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/inference.pyx":298 * * * def is_datetime64_array(ndarray values): # <<<<<<<<<<<<<< * cdef int i, n = len(values) * cdef object v */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_125is_datetime64_array, NULL, __pyx_n_s_65); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 298; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s__is_datetime64_array, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 298; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/inference.pyx":309 * return True * * def is_timedelta_array(ndarray values): # <<<<<<<<<<<<<< * cdef int i, n = len(values) * cdef object v */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_127is_timedelta_array, NULL, __pyx_n_s_65); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 309; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s__is_timedelta_array, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 309; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/inference.pyx":320 * return True * * def is_timedelta64_array(ndarray values): # <<<<<<<<<<<<<< * cdef int i, n = len(values) * cdef object v */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_129is_timedelta64_array, NULL, __pyx_n_s_65); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 320; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_236, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 320; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/inference.pyx":331 * return True * * def is_timedelta_or_timedelta64_array(ndarray values): # <<<<<<<<<<<<<< * """ infer with timedeltas and/or nat/none """ * cdef int i, n = len(values) */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_131is_timedelta_or_timedelta64_array, NULL, __pyx_n_s_65); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 331; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_51, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 331; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/inference.pyx":343 * return True * * def is_date_array(ndarray[object] values): # <<<<<<<<<<<<<< * cdef int i, n = len(values) * if n == 0: */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_133is_date_array, NULL, __pyx_n_s_65); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 343; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s__is_date_array, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 343; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/inference.pyx":352 * return True * * def is_time_array(ndarray[object] values): # <<<<<<<<<<<<<< * cdef int i, n = len(values) * if n == 0: */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_135is_time_array, NULL, __pyx_n_s_65); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 352; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s__is_time_array, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 352; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/inference.pyx":361 * return True * * def is_period(object o): # <<<<<<<<<<<<<< * from pandas import Period * return isinstance(o,Period) */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_137is_period, NULL, __pyx_n_s_65); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 361; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s__is_period, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 361; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/inference.pyx":365 * return isinstance(o,Period) * * def is_period_array(ndarray[object] values): # <<<<<<<<<<<<<< * cdef int i, n = len(values) * from pandas.tseries.period import Period */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_139is_period_array, NULL, __pyx_n_s_65); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 365; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s__is_period_array, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 365; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/inference.pyx":380 * inline int floatify(object, double *result) except -1 * * cdef double fINT64_MAX = INT64_MAX # <<<<<<<<<<<<<< * cdef double fINT64_MIN = INT64_MIN * */ __pyx_v_6pandas_3lib_fINT64_MAX = ((double)INT64_MAX); /* "pandas/src/inference.pyx":381 * * cdef double fINT64_MAX = INT64_MAX * cdef double fINT64_MIN = INT64_MIN # <<<<<<<<<<<<<< * * def maybe_convert_numeric(ndarray[object] values, set na_values, */ __pyx_v_6pandas_3lib_fINT64_MIN = ((double)INT64_MIN); /* "pandas/src/inference.pyx":384 * * def maybe_convert_numeric(ndarray[object] values, set na_values, * convert_empty=True, coerce_numeric=False): # <<<<<<<<<<<<<< * ''' * Type inference function-- convert strings to numeric (potentially) and */ __pyx_t_2 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 384; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_k_56 = __pyx_t_2; __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 384; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_k_57 = __pyx_t_2; __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/inference.pyx":383 * cdef double fINT64_MIN = INT64_MIN * * def maybe_convert_numeric(ndarray[object] values, set na_values, # <<<<<<<<<<<<<< * convert_empty=True, coerce_numeric=False): * ''' */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_141maybe_convert_numeric, NULL, __pyx_n_s_65); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 383; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_249, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 383; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/inference.pyx":461 * return ints * * def maybe_convert_objects(ndarray[object] objects, bint try_float=0, # <<<<<<<<<<<<<< * bint safe=0, bint convert_datetime=0, bint convert_timedelta=0): * ''' */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_143maybe_convert_objects, NULL, __pyx_n_s_65); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 461; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_12, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 461; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/inference.pyx":626 * * * def convert_sql_column(x): # <<<<<<<<<<<<<< * return maybe_convert_objects(x, try_float=1) * */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_145convert_sql_column, NULL, __pyx_n_s_65); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 626; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s__convert_sql_column, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 626; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/inference.pyx":630 * * def try_parse_dates(ndarray[object] values, parser=None, * dayfirst=False,default=None): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n */ __pyx_t_2 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 630; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_k_61 = __pyx_t_2; __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/inference.pyx":629 * return maybe_convert_objects(x, try_float=1) * * def try_parse_dates(ndarray[object] values, parser=None, # <<<<<<<<<<<<<< * dayfirst=False,default=None): * cdef: */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_147try_parse_dates, NULL, __pyx_n_s_65); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 629; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s__try_parse_dates, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 629; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/inference.pyx":679 * def try_parse_date_and_time(ndarray[object] dates, ndarray[object] times, * date_parser=None, time_parser=None, * dayfirst=False,default=None): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n */ __pyx_t_2 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 679; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_k_71 = __pyx_t_2; __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/inference.pyx":677 * return result * * def try_parse_date_and_time(ndarray[object] dates, ndarray[object] times, # <<<<<<<<<<<<<< * date_parser=None, time_parser=None, * dayfirst=False,default=None): */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_149try_parse_date_and_time, NULL, __pyx_n_s_65); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 677; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_258, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 677; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/inference.pyx":731 * * * def try_parse_year_month_day(ndarray[object] years, ndarray[object] months, # <<<<<<<<<<<<<< * ndarray[object] days): * cdef: */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_151try_parse_year_month_day, NULL, __pyx_n_s_65); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 731; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_261, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 731; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/inference.pyx":749 * return result * * def try_parse_datetime_components(ndarray[object] years, # <<<<<<<<<<<<<< * ndarray[object] months, * ndarray[object] days, */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_153try_parse_datetime_components, NULL, __pyx_n_s_65); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 749; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_264, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 749; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/inference.pyx":786 * * def sanitize_objects(ndarray[object] values, set na_values, * convert_empty=True): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n */ __pyx_t_2 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 786; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_k_86 = __pyx_t_2; __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/inference.pyx":785 * return result * * def sanitize_objects(ndarray[object] values, set na_values, # <<<<<<<<<<<<<< * convert_empty=True): * cdef: */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_155sanitize_objects, NULL, __pyx_n_s_65); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 785; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s__sanitize_objects, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 785; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/inference.pyx":808 * return na_count * * def maybe_convert_bool(ndarray[object] arr, # <<<<<<<<<<<<<< * true_values=None, false_values=None): * cdef: */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_157maybe_convert_bool, NULL, __pyx_n_s_65); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 808; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s__maybe_convert_bool, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 808; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/inference.pyx":857 * * * def map_infer_mask(ndarray arr, object f, ndarray[uint8_t] mask, # <<<<<<<<<<<<<< * bint convert=1): * ''' */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_159map_infer_mask, NULL, __pyx_n_s_65); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 857; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s__map_infer_mask, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 857; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/inference.pyx":899 * return result * * def map_infer(ndarray arr, object f, bint convert=1): # <<<<<<<<<<<<<< * ''' * Substitute for np.vectorize with pandas-friendly dtype inference */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_161map_infer, NULL, __pyx_n_s_65); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 899; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s__map_infer, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 899; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/inference.pyx":938 * * * def to_object_array(list rows): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, j, n, k, tmp */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_163to_object_array, NULL, __pyx_n_s_65); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 938; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s__to_object_array, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 938; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/inference.pyx":962 * return result * * def tuples_to_object_array(ndarray[object] tuples): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, j, n, k, tmp */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_165tuples_to_object_array, NULL, __pyx_n_s_65); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 962; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_277, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 962; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/inference.pyx":978 * return result * * def to_object_array_tuples(list rows): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, j, n, k, tmp */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_167to_object_array_tuples, NULL, __pyx_n_s_65); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 978; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_280, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 978; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/inference.pyx":1009 * * * def fast_multiget(dict mapping, ndarray keys, default=np.nan): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = len(keys) */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1009; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__nan); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1009; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_k_87 = __pyx_t_5; __Pyx_GIVEREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyCFunction_NewEx(&__pyx_mdef_6pandas_3lib_169fast_multiget, NULL, __pyx_n_s_65); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1009; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); if (PyDict_SetItem(__pyx_d, __pyx_n_s__fast_multiget, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1009; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "pandas/lib.pyx":1 * cimport numpy as np # <<<<<<<<<<<<<< * cimport cython * import numpy as np */ __pyx_t_5 = PyDict_New(); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_5)); if (PyDict_SetItem(__pyx_d, __pyx_n_s____test__, ((PyObject *)__pyx_t_5)) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; /* "numpy.pxd":979 * arr.base = baseptr * * cdef inline object get_array_base(ndarray arr): # <<<<<<<<<<<<<< * if arr.base is NULL: * return 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_5); if (__pyx_m) { __Pyx_AddTraceback("init pandas.lib", __pyx_clineno, __pyx_lineno, __pyx_filename); Py_DECREF(__pyx_m); __pyx_m = 0; } else if (!PyErr_Occurred()) { PyErr_SetString(PyExc_ImportError, "init pandas.lib"); } __pyx_L0:; __Pyx_RefNannyFinishContext(); #if PY_MAJOR_VERSION < 3 return; #else return __pyx_m; #endif } /* Runtime support code */ #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 /* CYTHON_REFNANNY */ 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 '%s' is not defined", PyString_AS_STRING(name)); #endif } return result; } static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j) { PyObject *r; if (!j) return NULL; r = PyObject_GetItem(o, j); Py_DECREF(j); return r; } static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i, int wraparound, int boundscheck) { #if CYTHON_COMPILING_IN_CPYTHON if (wraparound & unlikely(i < 0)) i += PyList_GET_SIZE(o); if ((!boundscheck) || likely((0 <= i) & (i < PyList_GET_SIZE(o)))) { PyObject *r = PyList_GET_ITEM(o, i); Py_INCREF(r); return r; } return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i)); #else return PySequence_GetItem(o, i); #endif } static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i, int wraparound, int boundscheck) { #if CYTHON_COMPILING_IN_CPYTHON if (wraparound & unlikely(i < 0)) i += PyTuple_GET_SIZE(o); if ((!boundscheck) || likely((0 <= i) & (i < PyTuple_GET_SIZE(o)))) { PyObject *r = PyTuple_GET_ITEM(o, i); Py_INCREF(r); return r; } return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i)); #else return PySequence_GetItem(o, i); #endif } static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, int is_list, int wraparound, int boundscheck) { #if CYTHON_COMPILING_IN_CPYTHON if (is_list || PyList_CheckExact(o)) { Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyList_GET_SIZE(o); if ((!boundscheck) || (likely((n >= 0) & (n < PyList_GET_SIZE(o))))) { PyObject *r = PyList_GET_ITEM(o, n); Py_INCREF(r); return r; } } else if (PyTuple_CheckExact(o)) { Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyTuple_GET_SIZE(o); if ((!boundscheck) || likely((n >= 0) & (n < PyTuple_GET_SIZE(o)))) { PyObject *r = PyTuple_GET_ITEM(o, n); Py_INCREF(r); return r; } } else { PySequenceMethods *m = Py_TYPE(o)->tp_as_sequence; if (likely(m && m->sq_item)) { if (wraparound && unlikely(i < 0) && likely(m->sq_length)) { Py_ssize_t l = m->sq_length(o); if (likely(l >= 0)) { i += l; } else { if (PyErr_ExceptionMatches(PyExc_OverflowError)) PyErr_Clear(); else return NULL; } } 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)); } static int __Pyx_ArgTypeTest(PyObject *obj, PyTypeObject *type, int none_allowed, const char *name, int exact) { if (!type) { PyErr_Format(PyExc_SystemError, "Missing type object"); return 0; } if (none_allowed && obj == Py_None) return 1; else if (exact) { if (Py_TYPE(obj) == type) return 1; } else { if (PyObject_TypeCheck(obj, type)) return 1; } PyErr_Format(PyExc_TypeError, "Argument '%s' has incorrect type (expected %s, got %s)", name, type->tp_name, Py_TYPE(obj)->tp_name); return 0; } 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, "%s() takes %s %" CYTHON_FORMAT_SSIZE_T "d positional argument%s (%" CYTHON_FORMAT_SSIZE_T "d given)", func_name, more_or_less, num_expected, (num_expected == 1) ? "" : "s", num_found); } 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 } 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, "%s() keywords must be strings", function_name); goto bad; invalid_keyword: PyErr_Format(PyExc_TypeError, #if PY_MAJOR_VERSION < 3 "%s() got an unexpected keyword argument '%s'", function_name, PyString_AsString(key)); #else "%s() got an unexpected keyword argument '%U'", function_name, key); #endif bad: return -1; } static CYTHON_INLINE PyObject *__Pyx_GetModuleGlobalName(PyObject *name) { PyObject *result; #if CYTHON_COMPILING_IN_CPYTHON result = PyDict_GetItem(__pyx_d, name); if (result) { Py_INCREF(result); } else { #else result = PyObject_GetItem(__pyx_d, name); if (!result) { PyErr_Clear(); #endif result = __Pyx_GetBuiltinName(name); } return result; } static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type) { if (unlikely(!type)) { PyErr_Format(PyExc_SystemError, "Missing type object"); return 0; } if (likely(PyObject_TypeCheck(obj, type))) return 1; PyErr_Format(PyExc_TypeError, "Cannot convert %.200s to %.200s", Py_TYPE(obj)->tp_name, type->tp_name); return 0; } static CYTHON_INLINE int __Pyx_IsLittleEndian(void) { unsigned int n = 1; return *(unsigned char*)(&n) != 0; } 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) /* First char was not a digit */ 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; /* Consume from buffer string */ while (1) { if (field == &ctx->root) { ctx->head = NULL; if (ctx->enc_count != 0) { __Pyx_BufFmt_RaiseExpected(ctx); return -1; } break; /* breaks both loops as ctx->enc_count == 0 */ } 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; /* empty struct */ 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 CYTHON_INLINE 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 != ')') { if (isspace(*ts)) continue; 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 10: case 13: ++ts; break; case '<': if (!__Pyx_IsLittleEndian()) { PyErr_SetString(PyExc_ValueError, "Little-endian buffer not supported on big-endian compiler"); return NULL; } ctx->new_packmode = '='; ++ts; break; case '>': case '!': if (__Pyx_IsLittleEndian()) { 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': /* substruct */ { 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; /* Erase processed last struct element */ 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 '}': /* end of substruct; either repeat or move on */ { size_t alignment = ctx->struct_alignment; ++ts; if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL; ctx->enc_type = 0; /* Erase processed last struct element */ 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; } /* fall through */ 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 's': case 'p': if (ctx->enc_type == *ts && got_Z == ctx->is_complex && ctx->enc_packmode == ctx->new_packmode) { ctx->enc_count += ctx->new_count; } else { 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; } } } } static CYTHON_INLINE 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 CYTHON_INLINE int __Pyx_GetBufferAndValidate( Py_buffer* buf, PyObject* obj, __Pyx_TypeInfo* dtype, int flags, int nd, int cast, __Pyx_BufFmt_StackElem* stack) { if (obj == Py_None || obj == NULL) { __Pyx_ZeroBuffer(buf); return 0; } buf->buf = NULL; if (__Pyx_GetBuffer(obj, buf, flags) == -1) goto fail; if (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 ((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_ZeroBuffer(buf); return -1; } static CYTHON_INLINE void __Pyx_SafeReleaseBuffer(Py_buffer* info) { if (info->buf == NULL) return; if (info->suboffsets == __Pyx_minusones) info->suboffsets = NULL; __Pyx_ReleaseBuffer(info); } static void __Pyx_RaiseBufferFallbackError(void) { PyErr_Format(PyExc_ValueError, "Buffer acquisition failed on assignment; and then reacquiring the old buffer failed too!"); } static void __Pyx_RaiseBufferIndexError(int axis) { PyErr_Format(PyExc_IndexError, "Out of bounds on buffer access (axis %d)", axis); } static CYTHON_INLINE void __Pyx_ErrRestore(PyObject *type, PyObject *value, PyObject *tb) { #if CYTHON_COMPILING_IN_CPYTHON PyObject *tmp_type, *tmp_value, *tmp_tb; PyThreadState *tstate = PyThreadState_GET(); 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); #else PyErr_Restore(type, value, tb); #endif } static CYTHON_INLINE void __Pyx_ErrFetch(PyObject **type, PyObject **value, PyObject **tb) { #if CYTHON_COMPILING_IN_CPYTHON PyThreadState *tstate = PyThreadState_GET(); *type = tstate->curexc_type; *value = tstate->curexc_value; *tb = tstate->curexc_traceback; tstate->curexc_type = 0; tstate->curexc_value = 0; tstate->curexc_traceback = 0; #else PyErr_Fetch(type, value, tb); #endif } static void __Pyx_WriteUnraisable(const char *name, CYTHON_UNUSED int clineno, CYTHON_UNUSED int lineno, CYTHON_UNUSED const char *filename) { PyObject *old_exc, *old_val, *old_tb; PyObject *ctx; __Pyx_ErrFetch(&old_exc, &old_val, &old_tb); #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); } } 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); } static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index) { PyErr_Format(PyExc_ValueError, "need more than %" CYTHON_FORMAT_SSIZE_T "d value%s to unpack", index, (index == 1) ? "" : "s"); } static CYTHON_INLINE int __Pyx_IterFinish(void) { #if CYTHON_COMPILING_IN_CPYTHON PyThreadState *tstate = PyThreadState_GET(); PyObject* exc_type = tstate->curexc_type; if (unlikely(exc_type)) { if (likely(exc_type == PyExc_StopIteration) || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration)) { PyObject *exc_value, *exc_tb; exc_value = tstate->curexc_value; exc_tb = tstate->curexc_traceback; tstate->curexc_type = 0; tstate->curexc_value = 0; tstate->curexc_traceback = 0; Py_DECREF(exc_type); Py_XDECREF(exc_value); Py_XDECREF(exc_tb); return 0; } else { return -1; } } return 0; #else if (unlikely(PyErr_Occurred())) { if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) { PyErr_Clear(); return 0; } else { return -1; } } return 0; #endif } 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; } #if PY_MAJOR_VERSION < 3 static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, CYTHON_UNUSED PyObject *cause) { 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 PY_VERSION_HEX < 0x02050000 if (PyClass_Check(type)) { #else if (PyType_Check(type)) { #endif #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; #if PY_VERSION_HEX < 0x02050000 if (PyInstance_Check(type)) { type = (PyObject*) ((PyInstanceObject*)type)->in_class; Py_INCREF(type); } else { type = 0; PyErr_SetString(PyExc_TypeError, "raise: exception must be an old-style class or instance"); goto raise_error; } #else 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; } #endif } __Pyx_ErrRestore(type, value, tb); return; raise_error: Py_XDECREF(value); Py_XDECREF(type); Py_XDECREF(tb); return; } #else /* Python 3+ */ 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 *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 = PyEval_CallObject(type, args); Py_DECREF(args); if (!owned_instance) goto bad; value = owned_instance; if (!PyExceptionInstance_Check(value)) { PyErr_Format(PyExc_TypeError, "calling %R should have returned an instance of " "BaseException, not %R", type, Py_TYPE(value)); goto bad; } } else { PyErr_SetString(PyExc_TypeError, "raise: exception class must be a subclass of BaseException"); goto bad; } #if PY_VERSION_HEX >= 0x03030000 if (cause) { #else if (cause && cause != Py_None) { #endif PyObject *fixed_cause; if (cause == Py_None) { fixed_cause = NULL; } else if (PyExceptionClass_Check(cause)) { fixed_cause = PyObject_CallObject(cause, NULL); if (fixed_cause == NULL) goto bad; } else if (PyExceptionInstance_Check(cause)) { fixed_cause = cause; Py_INCREF(fixed_cause); } else { PyErr_SetString(PyExc_TypeError, "exception causes must derive from " "BaseException"); goto bad; } PyException_SetCause(value, fixed_cause); } PyErr_SetObject(type, value); if (tb) { PyThreadState *tstate = PyThreadState_GET(); PyObject* tmp_tb = tstate->curexc_traceback; if (tb != tmp_tb) { Py_INCREF(tb); tstate->curexc_traceback = tb; Py_XDECREF(tmp_tb); } } bad: Py_XDECREF(owned_instance); return; } #endif 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; } static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb) { PyObject *local_type, *local_value, *local_tb; #if CYTHON_COMPILING_IN_CPYTHON PyObject *tmp_type, *tmp_value, *tmp_tb; PyThreadState *tstate = PyThreadState_GET(); local_type = tstate->curexc_type; local_value = tstate->curexc_value; local_tb = tstate->curexc_traceback; tstate->curexc_type = 0; tstate->curexc_value = 0; tstate->curexc_traceback = 0; #else PyErr_Fetch(&local_type, &local_value, &local_tb); #endif PyErr_NormalizeException(&local_type, &local_value, &local_tb); #if CYTHON_COMPILING_IN_CPYTHON if (unlikely(tstate->curexc_type)) #else if (unlikely(PyErr_Occurred())) #endif goto bad; #if PY_MAJOR_VERSION >= 3 if (unlikely(PyException_SetTraceback(local_value, local_tb) < 0)) goto bad; #endif Py_INCREF(local_type); Py_INCREF(local_value); Py_INCREF(local_tb); *type = local_type; *value = local_value; *tb = local_tb; #if CYTHON_COMPILING_IN_CPYTHON tmp_type = tstate->exc_type; tmp_value = tstate->exc_value; tmp_tb = tstate->exc_traceback; tstate->exc_type = local_type; tstate->exc_value = local_value; tstate->exc_traceback = local_tb; /* Make sure tstate is in a consistent state when we XDECREF these objects (DECREF may run arbitrary code). */ 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; } static CYTHON_INLINE int __Pyx_SetItemInt_Generic(PyObject *o, PyObject *j, PyObject *v) { int r; if (!j) return -1; r = PyObject_SetItem(o, j, v); Py_DECREF(j); return r; } static CYTHON_INLINE int __Pyx_SetItemInt_Fast(PyObject *o, Py_ssize_t i, PyObject *v, int is_list, int wraparound, int boundscheck) { #if CYTHON_COMPILING_IN_CPYTHON if (is_list || PyList_CheckExact(o)) { Py_ssize_t n = (!wraparound) ? i : ((likely(i >= 0)) ? i : i + PyList_GET_SIZE(o)); if ((!boundscheck) || likely((n >= 0) & (n < PyList_GET_SIZE(o)))) { PyObject* old = PyList_GET_ITEM(o, n); Py_INCREF(v); PyList_SET_ITEM(o, n, v); Py_DECREF(old); return 1; } } else { PySequenceMethods *m = Py_TYPE(o)->tp_as_sequence; if (likely(m && m->sq_ass_item)) { if (wraparound && unlikely(i < 0) && likely(m->sq_length)) { Py_ssize_t l = m->sq_length(o); if (likely(l >= 0)) { i += l; } else { if (PyErr_ExceptionMatches(PyExc_OverflowError)) PyErr_Clear(); else return -1; } } return m->sq_ass_item(o, i, v); } } #else #if CYTHON_COMPILING_IN_PYPY if (is_list || (PySequence_Check(o) && !PyDict_Check(o))) { #else if (is_list || PySequence_Check(o)) { #endif return PySequence_SetItem(o, i, v); } #endif return __Pyx_SetItemInt_Generic(o, PyInt_FromSsize_t(i), v); } static CYTHON_INLINE int __Pyx_mod_int(int a, int b) { int r = a % b; r += ((r != 0) & ((r ^ b) < 0)) * b; return r; } static CYTHON_INLINE int __Pyx_PyObject_SetSlice( PyObject* obj, PyObject* value, Py_ssize_t cstart, Py_ssize_t cstop, PyObject** _py_start, PyObject** _py_stop, PyObject** _py_slice, int has_cstart, int has_cstop, CYTHON_UNUSED int wraparound) { #if CYTHON_COMPILING_IN_CPYTHON PyMappingMethods* mp; #if PY_MAJOR_VERSION < 3 PySequenceMethods* ms = Py_TYPE(obj)->tp_as_sequence; if (likely(ms && ms->sq_ass_slice)) { if (!has_cstart) { if (_py_start && (*_py_start != Py_None)) { cstart = __Pyx_PyIndex_AsSsize_t(*_py_start); if ((cstart == (Py_ssize_t)-1) && PyErr_Occurred()) goto bad; } else cstart = 0; } if (!has_cstop) { if (_py_stop && (*_py_stop != Py_None)) { cstop = __Pyx_PyIndex_AsSsize_t(*_py_stop); if ((cstop == (Py_ssize_t)-1) && PyErr_Occurred()) goto bad; } else cstop = PY_SSIZE_T_MAX; } if (wraparound && unlikely((cstart < 0) | (cstop < 0)) && likely(ms->sq_length)) { Py_ssize_t l = ms->sq_length(obj); if (likely(l >= 0)) { if (cstop < 0) { cstop += l; if (cstop < 0) cstop = 0; } if (cstart < 0) { cstart += l; if (cstart < 0) cstart = 0; } } else { if (PyErr_ExceptionMatches(PyExc_OverflowError)) PyErr_Clear(); else goto bad; } } return ms->sq_ass_slice(obj, cstart, cstop, value); } #endif mp = Py_TYPE(obj)->tp_as_mapping; if (likely(mp && mp->mp_ass_subscript)) #endif { int result; PyObject *py_slice, *py_start, *py_stop; if (_py_slice) { py_slice = *_py_slice; } else { PyObject* owned_start = NULL; PyObject* owned_stop = NULL; if (_py_start) { py_start = *_py_start; } else { if (has_cstart) { owned_start = py_start = PyInt_FromSsize_t(cstart); if (unlikely(!py_start)) goto bad; } else py_start = Py_None; } if (_py_stop) { py_stop = *_py_stop; } else { if (has_cstop) { owned_stop = py_stop = PyInt_FromSsize_t(cstop); if (unlikely(!py_stop)) { Py_XDECREF(owned_start); goto bad; } } else py_stop = Py_None; } py_slice = PySlice_New(py_start, py_stop, Py_None); Py_XDECREF(owned_start); Py_XDECREF(owned_stop); if (unlikely(!py_slice)) goto bad; } #if CYTHON_COMPILING_IN_CPYTHON result = mp->mp_ass_subscript(obj, py_slice, value); #else result = value ? PyObject_SetItem(obj, py_slice, value) : PyObject_DelItem(obj, py_slice); #endif if (!_py_slice) { Py_DECREF(py_slice); } return result; } PyErr_Format(PyExc_TypeError, "'%.200s' object does not support slice %s", Py_TYPE(obj)->tp_name, value ? "assignment" : "deletion"); bad: return -1; } static CYTHON_INLINE long __Pyx_mod_long(long a, long b) { long r = a % b; r += ((r != 0) & ((r ^ b) < 0)) * b; return r; } #if CYTHON_COMPILING_IN_CPYTHON static CYTHON_INLINE void __Pyx_crop_slice(Py_ssize_t* _start, Py_ssize_t* _stop, Py_ssize_t* _length) { Py_ssize_t start = *_start, stop = *_stop, length = *_length; if (start < 0) { start += length; if (start < 0) start = 0; } if (stop < 0) stop += length; else if (stop > length) stop = length; *_length = stop - start; *_start = start; *_stop = stop; } static CYTHON_INLINE void __Pyx_copy_object_array(PyObject** CYTHON_RESTRICT src, PyObject** CYTHON_RESTRICT dest, Py_ssize_t length) { PyObject *v; Py_ssize_t i; for (i = 0; i < length; i++) { v = dest[i] = src[i]; Py_INCREF(v); } } static CYTHON_INLINE PyObject* __Pyx_PyList_GetSlice( PyObject* src, Py_ssize_t start, Py_ssize_t stop) { PyObject* dest; Py_ssize_t length = PyList_GET_SIZE(src); __Pyx_crop_slice(&start, &stop, &length); if (unlikely(length <= 0)) return PyList_New(0); dest = PyList_New(length); if (unlikely(!dest)) return NULL; __Pyx_copy_object_array( ((PyListObject*)src)->ob_item + start, ((PyListObject*)dest)->ob_item, length); return dest; } static CYTHON_INLINE PyObject* __Pyx_PyTuple_GetSlice( PyObject* src, Py_ssize_t start, Py_ssize_t stop) { PyObject* dest; Py_ssize_t length = PyTuple_GET_SIZE(src); __Pyx_crop_slice(&start, &stop, &length); if (unlikely(length <= 0)) return PyTuple_New(0); dest = PyTuple_New(length); if (unlikely(!dest)) return NULL; __Pyx_copy_object_array( ((PyTupleObject*)src)->ob_item + start, ((PyTupleObject*)dest)->ob_item, length); return dest; } #endif static CYTHON_INLINE PyObject* __Pyx_PyObject_GetSlice( PyObject* obj, Py_ssize_t cstart, Py_ssize_t cstop, PyObject** _py_start, PyObject** _py_stop, PyObject** _py_slice, int has_cstart, int has_cstop, CYTHON_UNUSED int wraparound) { #if CYTHON_COMPILING_IN_CPYTHON PyMappingMethods* mp; #if PY_MAJOR_VERSION < 3 PySequenceMethods* ms = Py_TYPE(obj)->tp_as_sequence; if (likely(ms && ms->sq_slice)) { if (!has_cstart) { if (_py_start && (*_py_start != Py_None)) { cstart = __Pyx_PyIndex_AsSsize_t(*_py_start); if ((cstart == (Py_ssize_t)-1) && PyErr_Occurred()) goto bad; } else cstart = 0; } if (!has_cstop) { if (_py_stop && (*_py_stop != Py_None)) { cstop = __Pyx_PyIndex_AsSsize_t(*_py_stop); if ((cstop == (Py_ssize_t)-1) && PyErr_Occurred()) goto bad; } else cstop = PY_SSIZE_T_MAX; } if (wraparound && unlikely((cstart < 0) | (cstop < 0)) && likely(ms->sq_length)) { Py_ssize_t l = ms->sq_length(obj); if (likely(l >= 0)) { if (cstop < 0) { cstop += l; if (cstop < 0) cstop = 0; } if (cstart < 0) { cstart += l; if (cstart < 0) cstart = 0; } } else { if (PyErr_ExceptionMatches(PyExc_OverflowError)) PyErr_Clear(); else goto bad; } } return ms->sq_slice(obj, cstart, cstop); } #endif mp = Py_TYPE(obj)->tp_as_mapping; if (likely(mp && mp->mp_subscript)) #endif { PyObject* result; PyObject *py_slice, *py_start, *py_stop; if (_py_slice) { py_slice = *_py_slice; } else { PyObject* owned_start = NULL; PyObject* owned_stop = NULL; if (_py_start) { py_start = *_py_start; } else { if (has_cstart) { owned_start = py_start = PyInt_FromSsize_t(cstart); if (unlikely(!py_start)) goto bad; } else py_start = Py_None; } if (_py_stop) { py_stop = *_py_stop; } else { if (has_cstop) { owned_stop = py_stop = PyInt_FromSsize_t(cstop); if (unlikely(!py_stop)) { Py_XDECREF(owned_start); goto bad; } } else py_stop = Py_None; } py_slice = PySlice_New(py_start, py_stop, Py_None); Py_XDECREF(owned_start); Py_XDECREF(owned_stop); if (unlikely(!py_slice)) goto bad; } #if CYTHON_COMPILING_IN_CPYTHON result = mp->mp_subscript(obj, py_slice); #else result = PyObject_GetItem(obj, py_slice); #endif if (!_py_slice) { Py_DECREF(py_slice); } return result; } PyErr_Format(PyExc_TypeError, "'%.200s' object is unsliceable", Py_TYPE(obj)->tp_name); bad: return NULL; } static CYTHON_INLINE PyObject *__Pyx_GetAttr(PyObject *o, PyObject *n) { #if CYTHON_COMPILING_IN_CPYTHON #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); } static CYTHON_INLINE PyObject *__Pyx_GetAttr3(PyObject *o, PyObject *n, PyObject *d) { PyObject *r = __Pyx_GetAttr(o, n); if (!r) { if (!PyErr_ExceptionMatches(PyExc_AttributeError)) goto bad; PyErr_Clear(); r = d; Py_INCREF(d); } return r; bad: return NULL; } static CYTHON_INLINE void __Pyx_RaiseUnboundLocalError(const char *varname) { PyErr_Format(PyExc_UnboundLocalError, "local variable '%s' referenced before assignment", varname); } static double __Pyx__PyObject_AsDouble(PyObject* obj) { PyObject* float_value; #if CYTHON_COMPILING_IN_PYPY float_value = PyNumber_Float(obj); #else PyNumberMethods *nb = Py_TYPE(obj)->tp_as_number; if (likely(nb) && likely(nb->nb_float)) { float_value = nb->nb_float(obj); if (likely(float_value) && unlikely(!PyFloat_Check(float_value))) { PyErr_Format(PyExc_TypeError, "__float__ returned non-float (type %.200s)", Py_TYPE(float_value)->tp_name); Py_DECREF(float_value); goto bad; } } else if (PyUnicode_CheckExact(obj) || PyBytes_CheckExact(obj)) { #if PY_MAJOR_VERSION >= 3 float_value = PyFloat_FromString(obj); #else float_value = PyFloat_FromString(obj, 0); #endif } else { PyObject* args = PyTuple_New(1); if (unlikely(!args)) goto bad; PyTuple_SET_ITEM(args, 0, obj); float_value = PyObject_Call((PyObject*)&PyFloat_Type, args, 0); PyTuple_SET_ITEM(args, 0, 0); Py_DECREF(args); } #endif if (likely(float_value)) { double value = PyFloat_AS_DOUBLE(float_value); Py_DECREF(float_value); return value; } bad: return (double)-1; } static CYTHON_INLINE void __Pyx_RaiseClosureNameError(const char *varname) { PyErr_Format(PyExc_NameError, "free variable '%s' referenced before assignment in enclosing scope", varname); } static PyObject * __Pyx_CyFunction_get_doc(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *closure) { if (unlikely(op->func_doc == NULL)) { if (op->func.m_ml->ml_doc) { #if PY_MAJOR_VERSION >= 3 op->func_doc = PyUnicode_FromString(op->func.m_ml->ml_doc); #else op->func_doc = PyString_FromString(op->func.m_ml->ml_doc); #endif if (unlikely(op->func_doc == NULL)) return NULL; } else { Py_INCREF(Py_None); return Py_None; } } Py_INCREF(op->func_doc); return op->func_doc; } static int __Pyx_CyFunction_set_doc(__pyx_CyFunctionObject *op, PyObject *value) { PyObject *tmp = op->func_doc; if (value == NULL) value = Py_None; /* Mark as deleted */ Py_INCREF(value); op->func_doc = value; Py_XDECREF(tmp); return 0; } static PyObject * __Pyx_CyFunction_get_name(__pyx_CyFunctionObject *op) { if (unlikely(op->func_name == NULL)) { #if PY_MAJOR_VERSION >= 3 op->func_name = PyUnicode_InternFromString(op->func.m_ml->ml_name); #else op->func_name = PyString_InternFromString(op->func.m_ml->ml_name); #endif if (unlikely(op->func_name == NULL)) return NULL; } Py_INCREF(op->func_name); return op->func_name; } static int __Pyx_CyFunction_set_name(__pyx_CyFunctionObject *op, PyObject *value) { PyObject *tmp; #if PY_MAJOR_VERSION >= 3 if (unlikely(value == NULL || !PyUnicode_Check(value))) { #else if (unlikely(value == NULL || !PyString_Check(value))) { #endif PyErr_SetString(PyExc_TypeError, "__name__ must be set to a string object"); return -1; } tmp = op->func_name; Py_INCREF(value); op->func_name = value; Py_XDECREF(tmp); return 0; } static PyObject * __Pyx_CyFunction_get_qualname(__pyx_CyFunctionObject *op) { Py_INCREF(op->func_qualname); return op->func_qualname; } static int __Pyx_CyFunction_set_qualname(__pyx_CyFunctionObject *op, PyObject *value) { PyObject *tmp; #if PY_MAJOR_VERSION >= 3 if (unlikely(value == NULL || !PyUnicode_Check(value))) { #else if (unlikely(value == NULL || !PyString_Check(value))) { #endif PyErr_SetString(PyExc_TypeError, "__qualname__ must be set to a string object"); return -1; } tmp = op->func_qualname; Py_INCREF(value); op->func_qualname = value; Py_XDECREF(tmp); return 0; } static PyObject * __Pyx_CyFunction_get_self(__pyx_CyFunctionObject *m, CYTHON_UNUSED void *closure) { PyObject *self; self = m->func_closure; if (self == NULL) self = Py_None; Py_INCREF(self); return self; } static PyObject * __Pyx_CyFunction_get_dict(__pyx_CyFunctionObject *op) { if (unlikely(op->func_dict == NULL)) { op->func_dict = PyDict_New(); if (unlikely(op->func_dict == NULL)) return NULL; } Py_INCREF(op->func_dict); return op->func_dict; } static int __Pyx_CyFunction_set_dict(__pyx_CyFunctionObject *op, PyObject *value) { PyObject *tmp; if (unlikely(value == NULL)) { PyErr_SetString(PyExc_TypeError, "function's dictionary may not be deleted"); return -1; } if (unlikely(!PyDict_Check(value))) { PyErr_SetString(PyExc_TypeError, "setting function's dictionary to a non-dict"); return -1; } tmp = op->func_dict; Py_INCREF(value); op->func_dict = value; Py_XDECREF(tmp); return 0; } static PyObject * __Pyx_CyFunction_get_globals(CYTHON_UNUSED __pyx_CyFunctionObject *op) { PyObject* dict = PyModule_GetDict(__pyx_m); Py_XINCREF(dict); return dict; } static PyObject * __Pyx_CyFunction_get_closure(CYTHON_UNUSED __pyx_CyFunctionObject *op) { Py_INCREF(Py_None); return Py_None; } static PyObject * __Pyx_CyFunction_get_code(__pyx_CyFunctionObject *op) { PyObject* result = (op->func_code) ? op->func_code : Py_None; Py_INCREF(result); return result; } static int __Pyx_CyFunction_init_defaults(__pyx_CyFunctionObject *op) { PyObject *res = op->defaults_getter((PyObject *) op); if (unlikely(!res)) return -1; op->defaults_tuple = PyTuple_GET_ITEM(res, 0); Py_INCREF(op->defaults_tuple); op->defaults_kwdict = PyTuple_GET_ITEM(res, 1); Py_INCREF(op->defaults_kwdict); Py_DECREF(res); return 0; } static int __Pyx_CyFunction_set_defaults(__pyx_CyFunctionObject *op, PyObject* value) { PyObject* tmp; if (!value) { value = Py_None; } else if (value != Py_None && !PyTuple_Check(value)) { PyErr_SetString(PyExc_TypeError, "__defaults__ must be set to a tuple object"); return -1; } Py_INCREF(value); tmp = op->defaults_tuple; op->defaults_tuple = value; Py_XDECREF(tmp); return 0; } static PyObject * __Pyx_CyFunction_get_defaults(__pyx_CyFunctionObject *op) { PyObject* result = op->defaults_tuple; if (unlikely(!result)) { if (op->defaults_getter) { if (__Pyx_CyFunction_init_defaults(op) < 0) return NULL; result = op->defaults_tuple; } else { result = Py_None; } } Py_INCREF(result); return result; } static int __Pyx_CyFunction_set_kwdefaults(__pyx_CyFunctionObject *op, PyObject* value) { PyObject* tmp; if (!value) { value = Py_None; } else if (value != Py_None && !PyDict_Check(value)) { PyErr_SetString(PyExc_TypeError, "__kwdefaults__ must be set to a dict object"); return -1; } Py_INCREF(value); tmp = op->defaults_kwdict; op->defaults_kwdict = value; Py_XDECREF(tmp); return 0; } static PyObject * __Pyx_CyFunction_get_kwdefaults(__pyx_CyFunctionObject *op) { PyObject* result = op->defaults_kwdict; if (unlikely(!result)) { if (op->defaults_getter) { if (__Pyx_CyFunction_init_defaults(op) < 0) return NULL; result = op->defaults_kwdict; } else { result = Py_None; } } Py_INCREF(result); return result; } static int __Pyx_CyFunction_set_annotations(__pyx_CyFunctionObject *op, PyObject* value) { PyObject* tmp; if (!value || value == Py_None) { value = NULL; } else if (!PyDict_Check(value)) { PyErr_SetString(PyExc_TypeError, "__annotations__ must be set to a dict object"); return -1; } Py_XINCREF(value); tmp = op->func_annotations; op->func_annotations = value; Py_XDECREF(tmp); return 0; } static PyObject * __Pyx_CyFunction_get_annotations(__pyx_CyFunctionObject *op) { PyObject* result = op->func_annotations; if (unlikely(!result)) { result = PyDict_New(); if (unlikely(!result)) return NULL; op->func_annotations = result; } Py_INCREF(result); return result; } static PyGetSetDef __pyx_CyFunction_getsets[] = { {(char *) "func_doc", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0}, {(char *) "__doc__", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0}, {(char *) "func_name", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0}, {(char *) "__name__", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0}, {(char *) "__qualname__", (getter)__Pyx_CyFunction_get_qualname, (setter)__Pyx_CyFunction_set_qualname, 0, 0}, {(char *) "__self__", (getter)__Pyx_CyFunction_get_self, 0, 0, 0}, {(char *) "func_dict", (getter)__Pyx_CyFunction_get_dict, (setter)__Pyx_CyFunction_set_dict, 0, 0}, {(char *) "__dict__", (getter)__Pyx_CyFunction_get_dict, (setter)__Pyx_CyFunction_set_dict, 0, 0}, {(char *) "func_globals", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0}, {(char *) "__globals__", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0}, {(char *) "func_closure", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0}, {(char *) "__closure__", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0}, {(char *) "func_code", (getter)__Pyx_CyFunction_get_code, 0, 0, 0}, {(char *) "__code__", (getter)__Pyx_CyFunction_get_code, 0, 0, 0}, {(char *) "func_defaults", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0}, {(char *) "__defaults__", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0}, {(char *) "__kwdefaults__", (getter)__Pyx_CyFunction_get_kwdefaults, (setter)__Pyx_CyFunction_set_kwdefaults, 0, 0}, {(char *) "__annotations__", (getter)__Pyx_CyFunction_get_annotations, (setter)__Pyx_CyFunction_set_annotations, 0, 0}, {0, 0, 0, 0, 0} }; #ifndef PY_WRITE_RESTRICTED /* < Py2.5 */ #define PY_WRITE_RESTRICTED WRITE_RESTRICTED #endif static PyMemberDef __pyx_CyFunction_members[] = { {(char *) "__module__", T_OBJECT, offsetof(__pyx_CyFunctionObject, func.m_module), PY_WRITE_RESTRICTED, 0}, {0, 0, 0, 0, 0} }; static PyObject * __Pyx_CyFunction_reduce(__pyx_CyFunctionObject *m, CYTHON_UNUSED PyObject *args) { #if PY_MAJOR_VERSION >= 3 return PyUnicode_FromString(m->func.m_ml->ml_name); #else return PyString_FromString(m->func.m_ml->ml_name); #endif } static PyMethodDef __pyx_CyFunction_methods[] = { {__Pyx_NAMESTR("__reduce__"), (PyCFunction)__Pyx_CyFunction_reduce, METH_VARARGS, 0}, {0, 0, 0, 0} }; static PyObject *__Pyx_CyFunction_New(PyTypeObject *type, PyMethodDef *ml, int flags, PyObject* qualname, PyObject *closure, PyObject *module, PyObject* code) { __pyx_CyFunctionObject *op = PyObject_GC_New(__pyx_CyFunctionObject, type); if (op == NULL) return NULL; op->flags = flags; op->func_weakreflist = NULL; op->func.m_ml = ml; op->func.m_self = (PyObject *) op; Py_XINCREF(closure); op->func_closure = closure; Py_XINCREF(module); op->func.m_module = module; op->func_dict = NULL; op->func_name = NULL; Py_INCREF(qualname); op->func_qualname = qualname; op->func_doc = NULL; op->func_classobj = NULL; Py_XINCREF(code); op->func_code = code; op->defaults_pyobjects = 0; op->defaults = NULL; op->defaults_tuple = NULL; op->defaults_kwdict = NULL; op->defaults_getter = NULL; op->func_annotations = NULL; PyObject_GC_Track(op); return (PyObject *) op; } static int __Pyx_CyFunction_clear(__pyx_CyFunctionObject *m) { Py_CLEAR(m->func_closure); Py_CLEAR(m->func.m_module); Py_CLEAR(m->func_dict); Py_CLEAR(m->func_name); Py_CLEAR(m->func_qualname); Py_CLEAR(m->func_doc); Py_CLEAR(m->func_code); Py_CLEAR(m->func_classobj); Py_CLEAR(m->defaults_tuple); Py_CLEAR(m->defaults_kwdict); Py_CLEAR(m->func_annotations); if (m->defaults) { PyObject **pydefaults = __Pyx_CyFunction_Defaults(PyObject *, m); int i; for (i = 0; i < m->defaults_pyobjects; i++) Py_XDECREF(pydefaults[i]); PyMem_Free(m->defaults); m->defaults = NULL; } return 0; } static void __Pyx_CyFunction_dealloc(__pyx_CyFunctionObject *m) { PyObject_GC_UnTrack(m); if (m->func_weakreflist != NULL) PyObject_ClearWeakRefs((PyObject *) m); __Pyx_CyFunction_clear(m); PyObject_GC_Del(m); } static int __Pyx_CyFunction_traverse(__pyx_CyFunctionObject *m, visitproc visit, void *arg) { Py_VISIT(m->func_closure); Py_VISIT(m->func.m_module); Py_VISIT(m->func_dict); Py_VISIT(m->func_name); Py_VISIT(m->func_qualname); Py_VISIT(m->func_doc); Py_VISIT(m->func_code); Py_VISIT(m->func_classobj); Py_VISIT(m->defaults_tuple); Py_VISIT(m->defaults_kwdict); if (m->defaults) { PyObject **pydefaults = __Pyx_CyFunction_Defaults(PyObject *, m); int i; for (i = 0; i < m->defaults_pyobjects; i++) Py_VISIT(pydefaults[i]); } return 0; } static PyObject *__Pyx_CyFunction_descr_get(PyObject *func, PyObject *obj, PyObject *type) { __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; if (m->flags & __Pyx_CYFUNCTION_STATICMETHOD) { Py_INCREF(func); return func; } if (m->flags & __Pyx_CYFUNCTION_CLASSMETHOD) { if (type == NULL) type = (PyObject *)(Py_TYPE(obj)); return PyMethod_New(func, type, (PyObject *)(Py_TYPE(type))); } if (obj == Py_None) obj = NULL; return PyMethod_New(func, obj, type); } static PyObject* __Pyx_CyFunction_repr(__pyx_CyFunctionObject *op) { #if PY_MAJOR_VERSION >= 3 return PyUnicode_FromFormat("", op->func_qualname, (void *)op); #else return PyString_FromFormat("", PyString_AsString(op->func_qualname), (void *)op); #endif } #if CYTHON_COMPILING_IN_PYPY static PyObject * __Pyx_CyFunction_Call(PyObject *func, PyObject *arg, PyObject *kw) { PyCFunctionObject* f = (PyCFunctionObject*)func; PyCFunction meth = PyCFunction_GET_FUNCTION(func); PyObject *self = PyCFunction_GET_SELF(func); Py_ssize_t size; switch (PyCFunction_GET_FLAGS(func) & ~(METH_CLASS | METH_STATIC | METH_COEXIST)) { case METH_VARARGS: if (likely(kw == NULL) || PyDict_Size(kw) == 0) return (*meth)(self, arg); break; case METH_VARARGS | METH_KEYWORDS: return (*(PyCFunctionWithKeywords)meth)(self, arg, kw); case METH_NOARGS: if (likely(kw == NULL) || PyDict_Size(kw) == 0) { size = PyTuple_GET_SIZE(arg); if (size == 0) return (*meth)(self, NULL); PyErr_Format(PyExc_TypeError, "%.200s() takes no arguments (%zd given)", f->m_ml->ml_name, size); return NULL; } break; case METH_O: if (likely(kw == NULL) || PyDict_Size(kw) == 0) { size = PyTuple_GET_SIZE(arg); if (size == 1) return (*meth)(self, PyTuple_GET_ITEM(arg, 0)); PyErr_Format(PyExc_TypeError, "%.200s() takes exactly one argument (%zd given)", f->m_ml->ml_name, size); return NULL; } break; default: PyErr_SetString(PyExc_SystemError, "Bad call flags in " "__Pyx_CyFunction_Call. METH_OLDARGS is no " "longer supported!"); return NULL; } PyErr_Format(PyExc_TypeError, "%.200s() takes no keyword arguments", f->m_ml->ml_name); return NULL; } #else static PyObject * __Pyx_CyFunction_Call(PyObject *func, PyObject *arg, PyObject *kw) { return PyCFunction_Call(func, arg, kw); } #endif static PyTypeObject __pyx_CyFunctionType_type = { PyVarObject_HEAD_INIT(0, 0) __Pyx_NAMESTR("cython_function_or_method"), /*tp_name*/ sizeof(__pyx_CyFunctionObject), /*tp_basicsize*/ 0, /*tp_itemsize*/ (destructor) __Pyx_CyFunction_dealloc, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #else 0, /*reserved*/ #endif (reprfunc) __Pyx_CyFunction_repr, /*tp_repr*/ 0, /*tp_as_number*/ 0, /*tp_as_sequence*/ 0, /*tp_as_mapping*/ 0, /*tp_hash*/ __Pyx_CyFunction_Call, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC, /* tp_flags*/ 0, /*tp_doc*/ (traverseproc) __Pyx_CyFunction_traverse, /*tp_traverse*/ (inquiry) __Pyx_CyFunction_clear, /*tp_clear*/ 0, /*tp_richcompare*/ offsetof(__pyx_CyFunctionObject, func_weakreflist), /* tp_weaklistoffse */ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_CyFunction_methods, /*tp_methods*/ __pyx_CyFunction_members, /*tp_members*/ __pyx_CyFunction_getsets, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ __Pyx_CyFunction_descr_get, /*tp_descr_get*/ 0, /*tp_descr_set*/ offsetof(__pyx_CyFunctionObject, func_dict),/*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ 0, /*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*/ #if PY_VERSION_HEX >= 0x02060000 0, /*tp_version_tag*/ #endif #if PY_VERSION_HEX >= 0x030400a1 && defined(Py_TPFLAGS_HAVE_FINALIZE) 0, /*tp_finalize*/ #endif }; static int __Pyx_CyFunction_init(void) { #if !CYTHON_COMPILING_IN_PYPY __pyx_CyFunctionType_type.tp_call = PyCFunction_Call; #endif if (PyType_Ready(&__pyx_CyFunctionType_type) < 0) return -1; __pyx_CyFunctionType = &__pyx_CyFunctionType_type; return 0; } static CYTHON_INLINE void *__Pyx_CyFunction_InitDefaults(PyObject *func, size_t size, int pyobjects) { __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; m->defaults = PyMem_Malloc(size); if (!m->defaults) return PyErr_NoMemory(); memset(m->defaults, 0, size); m->defaults_pyobjects = pyobjects; return m->defaults; } static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *func, PyObject *tuple) { __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; m->defaults_tuple = tuple; Py_INCREF(tuple); } static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *func, PyObject *dict) { __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; m->defaults_kwdict = dict; Py_INCREF(dict); } static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *func, PyObject *dict) { __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; m->func_annotations = dict; Py_INCREF(dict); } static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); } static int __Pyx_SetVtable(PyObject *dict, void *vtable) { #if PY_VERSION_HEX >= 0x02070000 && !(PY_MAJOR_VERSION==3&&PY_MINOR_VERSION==0) 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; } static CYTHON_INLINE void __Pyx_ExceptionSave(PyObject **type, PyObject **value, PyObject **tb) { #if CYTHON_COMPILING_IN_CPYTHON PyThreadState *tstate = PyThreadState_GET(); *type = tstate->exc_type; *value = tstate->exc_value; *tb = tstate->exc_traceback; Py_XINCREF(*type); Py_XINCREF(*value); Py_XINCREF(*tb); #else PyErr_GetExcInfo(type, value, tb); #endif } static void __Pyx_ExceptionReset(PyObject *type, PyObject *value, PyObject *tb) { #if CYTHON_COMPILING_IN_CPYTHON PyObject *tmp_type, *tmp_value, *tmp_tb; PyThreadState *tstate = PyThreadState_GET(); tmp_type = tstate->exc_type; tmp_value = tstate->exc_value; tmp_tb = tstate->exc_traceback; tstate->exc_type = type; tstate->exc_value = value; tstate->exc_traceback = tb; Py_XDECREF(tmp_type); Py_XDECREF(tmp_value); Py_XDECREF(tmp_tb); #else PyErr_SetExcInfo(type, value, tb); #endif } #if PY_MAJOR_VERSION < 3 static int __Pyx_GetBuffer(PyObject *obj, Py_buffer *view, int flags) { #if PY_VERSION_HEX >= 0x02060000 if (PyObject_CheckBuffer(obj)) return PyObject_GetBuffer(obj, view, flags); #endif if (PyObject_TypeCheck(obj, __pyx_ptype_5numpy_ndarray)) return __pyx_pw_5numpy_7ndarray_1__getbuffer__(obj, view, flags); #if PY_VERSION_HEX < 0x02060000 if (obj->ob_type->tp_dict) { PyObject *getbuffer_cobj = PyObject_GetItem( obj->ob_type->tp_dict, __pyx_n_s____pyx_getbuffer); if (getbuffer_cobj) { getbufferproc func = (getbufferproc) PyCObject_AsVoidPtr(getbuffer_cobj); Py_DECREF(getbuffer_cobj); if (!func) goto fail; return func(obj, view, flags); } else { PyErr_Clear(); } } #endif PyErr_Format(PyExc_TypeError, "'%100s' does not have the buffer interface", Py_TYPE(obj)->tp_name); #if PY_VERSION_HEX < 0x02060000 fail: #endif return -1; } static void __Pyx_ReleaseBuffer(Py_buffer *view) { PyObject *obj = view->obj; if (!obj) return; #if PY_VERSION_HEX >= 0x02060000 if (PyObject_CheckBuffer(obj)) { PyBuffer_Release(view); return; } #endif if (PyObject_TypeCheck(obj, __pyx_ptype_5numpy_ndarray)) { __pyx_pw_5numpy_7ndarray_3__releasebuffer__(obj, view); return; } #if PY_VERSION_HEX < 0x02060000 if (obj->ob_type->tp_dict) { PyObject *releasebuffer_cobj = PyObject_GetItem( obj->ob_type->tp_dict, __pyx_n_s____pyx_releasebuffer); if (releasebuffer_cobj) { releasebufferproc func = (releasebufferproc) PyCObject_AsVoidPtr(releasebuffer_cobj); Py_DECREF(releasebuffer_cobj); if (!func) goto fail; func(obj, view); return; } else { PyErr_Clear(); } } #endif goto nofail; #if PY_VERSION_HEX < 0x02060000 fail: #endif PyErr_WriteUnraisable(obj); nofail: Py_DECREF(obj); view->obj = NULL; } #endif /* PY_MAJOR_VERSION < 3 */ static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level) { PyObject *empty_list = 0; PyObject *module = 0; PyObject *global_dict = 0; PyObject *empty_dict = 0; PyObject *list; #if PY_VERSION_HEX < 0x03030000 PyObject *py_import; py_import = __Pyx_PyObject_GetAttrStr(__pyx_b, __pyx_n_s____import__); if (!py_import) goto bad; #endif if (from_list) list = from_list; else { empty_list = PyList_New(0); if (!empty_list) goto bad; list = empty_list; } global_dict = PyModule_GetDict(__pyx_m); if (!global_dict) goto bad; empty_dict = PyDict_New(); if (!empty_dict) goto bad; #if PY_VERSION_HEX >= 0x02050000 { #if PY_MAJOR_VERSION >= 3 if (level == -1) { if (strchr(__Pyx_MODULE_NAME, '.')) { #if PY_VERSION_HEX < 0x03030000 PyObject *py_level = PyInt_FromLong(1); if (!py_level) goto bad; module = PyObject_CallFunctionObjArgs(py_import, name, global_dict, empty_dict, list, py_level, NULL); Py_DECREF(py_level); #else module = PyImport_ImportModuleLevelObject( name, global_dict, empty_dict, list, 1); #endif if (!module) { if (!PyErr_ExceptionMatches(PyExc_ImportError)) goto bad; PyErr_Clear(); } } level = 0; /* try absolute import on failure */ } #endif if (!module) { #if PY_VERSION_HEX < 0x03030000 PyObject *py_level = PyInt_FromLong(level); if (!py_level) goto bad; module = PyObject_CallFunctionObjArgs(py_import, name, global_dict, empty_dict, list, py_level, NULL); Py_DECREF(py_level); #else module = PyImport_ImportModuleLevelObject( name, global_dict, empty_dict, list, level); #endif } } #else if (level>0) { PyErr_SetString(PyExc_RuntimeError, "Relative import is not supported for Python <=2.4."); goto bad; } module = PyObject_CallFunctionObjArgs(py_import, name, global_dict, empty_dict, list, NULL); #endif bad: #if PY_VERSION_HEX < 0x03030000 Py_XDECREF(py_import); #endif Py_XDECREF(empty_list); Py_XDECREF(empty_dict); return module; } static CYTHON_INLINE npy_int64 __Pyx_PyInt_from_py_npy_int64(PyObject* x) { const npy_int64 neg_one = (npy_int64)-1, const_zero = (npy_int64)0; const int is_unsigned = const_zero < neg_one; if (sizeof(npy_int64) == sizeof(char)) { if (is_unsigned) return (npy_int64)__Pyx_PyInt_AsUnsignedChar(x); else return (npy_int64)__Pyx_PyInt_AsSignedChar(x); } else if (sizeof(npy_int64) == sizeof(short)) { if (is_unsigned) return (npy_int64)__Pyx_PyInt_AsUnsignedShort(x); else return (npy_int64)__Pyx_PyInt_AsSignedShort(x); } else if (sizeof(npy_int64) == sizeof(int)) { if (is_unsigned) return (npy_int64)__Pyx_PyInt_AsUnsignedInt(x); else return (npy_int64)__Pyx_PyInt_AsSignedInt(x); } else if (sizeof(npy_int64) == sizeof(long)) { if (is_unsigned) return (npy_int64)__Pyx_PyInt_AsUnsignedLong(x); else return (npy_int64)__Pyx_PyInt_AsSignedLong(x); } else if (sizeof(npy_int64) == sizeof(PY_LONG_LONG)) { if (is_unsigned) return (npy_int64)__Pyx_PyInt_AsUnsignedLongLong(x); else return (npy_int64)__Pyx_PyInt_AsSignedLongLong(x); } else { #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_Int(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; } } static PyObject *__Pyx_FindPy2Metaclass(PyObject *bases) { PyObject *metaclass; #if PY_MAJOR_VERSION < 3 if (PyTuple_Check(bases) && PyTuple_GET_SIZE(bases) > 0) { PyObject *base = PyTuple_GET_ITEM(bases, 0); metaclass = __Pyx_PyObject_GetAttrStr(base, __pyx_n_s____class__); if (!metaclass) { PyErr_Clear(); metaclass = (PyObject*) Py_TYPE(base); Py_INCREF(metaclass); } } else { metaclass = (PyObject *) &PyClass_Type; Py_INCREF(metaclass); } #else if (PyTuple_Check(bases) && PyTuple_GET_SIZE(bases) > 0) { PyObject *base = PyTuple_GET_ITEM(bases, 0); metaclass = (PyObject*) Py_TYPE(base); } else { metaclass = (PyObject *) &PyType_Type; } Py_INCREF(metaclass); #endif return metaclass; } static PyObject *__Pyx_CreateClass(PyObject *bases, PyObject *dict, PyObject *name, PyObject *qualname, PyObject *modname) { PyObject *result; PyObject *metaclass; if (PyDict_SetItem(dict, __pyx_n_s____module__, modname) < 0) return NULL; if (PyDict_SetItem(dict, __pyx_n_s____qualname__, qualname) < 0) return NULL; metaclass = PyDict_GetItem(dict, __pyx_n_s____metaclass__); if (metaclass) { Py_INCREF(metaclass); } else { metaclass = __Pyx_FindPy2Metaclass(bases); } result = PyObject_CallFunctionObjArgs(metaclass, name, bases, dict, NULL); Py_DECREF(metaclass); return result; } static CYTHON_INLINE PyObject *__Pyx_PyInt_to_py_npy_int64(npy_int64 val) { const npy_int64 neg_one = (npy_int64)-1, const_zero = (npy_int64)0; const int is_unsigned = const_zero < neg_one; if ((sizeof(npy_int64) == sizeof(char)) || (sizeof(npy_int64) == sizeof(short))) { return PyInt_FromLong((long)val); } else if ((sizeof(npy_int64) == sizeof(int)) || (sizeof(npy_int64) == sizeof(long))) { if (is_unsigned) return PyLong_FromUnsignedLong((unsigned long)val); else return PyInt_FromLong((long)val); } else if (sizeof(npy_int64) == sizeof(PY_LONG_LONG)) { if (is_unsigned) return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG)val); else return PyLong_FromLongLong((PY_LONG_LONG)val); } else { int one = 1; int little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&val; return _PyLong_FromByteArray(bytes, sizeof(npy_int64), little, !is_unsigned); } } static CYTHON_INLINE PyObject *__Pyx_PyInt_to_py_Py_intptr_t(Py_intptr_t val) { const Py_intptr_t neg_one = (Py_intptr_t)-1, const_zero = (Py_intptr_t)0; const int is_unsigned = const_zero < neg_one; if ((sizeof(Py_intptr_t) == sizeof(char)) || (sizeof(Py_intptr_t) == sizeof(short))) { return PyInt_FromLong((long)val); } else if ((sizeof(Py_intptr_t) == sizeof(int)) || (sizeof(Py_intptr_t) == sizeof(long))) { if (is_unsigned) return PyLong_FromUnsignedLong((unsigned long)val); else return PyInt_FromLong((long)val); } else if (sizeof(Py_intptr_t) == sizeof(PY_LONG_LONG)) { if (is_unsigned) return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG)val); else return PyLong_FromLongLong((PY_LONG_LONG)val); } else { int one = 1; int little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&val; return _PyLong_FromByteArray(bytes, sizeof(Py_intptr_t), little, !is_unsigned); } } #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 #if CYTHON_CCOMPLEX #else static CYTHON_INLINE int __Pyx_c_eq(__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(__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(__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(__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; } static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_quot(__pyx_t_double_complex a, __pyx_t_double_complex b) { __pyx_t_double_complex z; double denom = b.real * b.real + b.imag * b.imag; z.real = (a.real * b.real + a.imag * b.imag) / denom; z.imag = (a.imag * b.real - a.real * b.imag) / denom; return z; } static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_neg(__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(__pyx_t_double_complex a) { return (a.real == 0) && (a.imag == 0); } static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_conj(__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(__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(__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(a, a); return __Pyx_c_prod(a, a); case 3: z = __Pyx_c_prod(a, a); return __Pyx_c_prod(z, a); case 4: z = __Pyx_c_prod(a, a); return __Pyx_c_prod(z, z); } } if (a.imag == 0) { if (a.real == 0) { return a; } r = a.real; theta = 0; } else { r = __Pyx_c_abs(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 static __pyx_t_double_complex __Pyx_PyComplex_As___pyx_t_double_complex(PyObject* o) { Py_complex cval; #if CYTHON_COMPILING_IN_CPYTHON if (PyComplex_CheckExact(o)) cval = ((PyComplexObject *)o)->cval; else #endif cval = PyComplex_AsCComplex(o); return __pyx_t_double_complex_from_parts( (double)cval.real, (double)cval.imag); } static CYTHON_INLINE npy_uint8 __Pyx_PyInt_from_py_npy_uint8(PyObject* x) { const npy_uint8 neg_one = (npy_uint8)-1, const_zero = (npy_uint8)0; const int is_unsigned = const_zero < neg_one; if (sizeof(npy_uint8) == sizeof(char)) { if (is_unsigned) return (npy_uint8)__Pyx_PyInt_AsUnsignedChar(x); else return (npy_uint8)__Pyx_PyInt_AsSignedChar(x); } else if (sizeof(npy_uint8) == sizeof(short)) { if (is_unsigned) return (npy_uint8)__Pyx_PyInt_AsUnsignedShort(x); else return (npy_uint8)__Pyx_PyInt_AsSignedShort(x); } else if (sizeof(npy_uint8) == sizeof(int)) { if (is_unsigned) return (npy_uint8)__Pyx_PyInt_AsUnsignedInt(x); else return (npy_uint8)__Pyx_PyInt_AsSignedInt(x); } else if (sizeof(npy_uint8) == sizeof(long)) { if (is_unsigned) return (npy_uint8)__Pyx_PyInt_AsUnsignedLong(x); else return (npy_uint8)__Pyx_PyInt_AsSignedLong(x); } else if (sizeof(npy_uint8) == sizeof(PY_LONG_LONG)) { if (is_unsigned) return (npy_uint8)__Pyx_PyInt_AsUnsignedLongLong(x); else return (npy_uint8)__Pyx_PyInt_AsSignedLongLong(x); } else { #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_Int(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; } } static CYTHON_INLINE npy_int32 __Pyx_PyInt_from_py_npy_int32(PyObject* x) { const npy_int32 neg_one = (npy_int32)-1, const_zero = (npy_int32)0; const int is_unsigned = const_zero < neg_one; if (sizeof(npy_int32) == sizeof(char)) { if (is_unsigned) return (npy_int32)__Pyx_PyInt_AsUnsignedChar(x); else return (npy_int32)__Pyx_PyInt_AsSignedChar(x); } else if (sizeof(npy_int32) == sizeof(short)) { if (is_unsigned) return (npy_int32)__Pyx_PyInt_AsUnsignedShort(x); else return (npy_int32)__Pyx_PyInt_AsSignedShort(x); } else if (sizeof(npy_int32) == sizeof(int)) { if (is_unsigned) return (npy_int32)__Pyx_PyInt_AsUnsignedInt(x); else return (npy_int32)__Pyx_PyInt_AsSignedInt(x); } else if (sizeof(npy_int32) == sizeof(long)) { if (is_unsigned) return (npy_int32)__Pyx_PyInt_AsUnsignedLong(x); else return (npy_int32)__Pyx_PyInt_AsSignedLong(x); } else if (sizeof(npy_int32) == sizeof(PY_LONG_LONG)) { if (is_unsigned) return (npy_int32)__Pyx_PyInt_AsUnsignedLongLong(x); else return (npy_int32)__Pyx_PyInt_AsSignedLongLong(x); } else { #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_Int(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; } } #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 #if CYTHON_CCOMPLEX #else static CYTHON_INLINE int __Pyx_c_eqf(__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_sumf(__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_difff(__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_prodf(__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; } static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_quotf(__pyx_t_float_complex a, __pyx_t_float_complex b) { __pyx_t_float_complex z; float denom = b.real * b.real + b.imag * b.imag; z.real = (a.real * b.real + a.imag * b.imag) / denom; z.imag = (a.imag * b.real - a.real * b.imag) / denom; return z; } static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_negf(__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_zerof(__pyx_t_float_complex a) { return (a.real == 0) && (a.imag == 0); } static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_conjf(__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_absf(__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_powf(__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_prodf(a, a); return __Pyx_c_prodf(a, a); case 3: z = __Pyx_c_prodf(a, a); return __Pyx_c_prodf(z, a); case 4: z = __Pyx_c_prodf(a, a); return __Pyx_c_prodf(z, z); } } if (a.imag == 0) { if (a.real == 0) { return a; } r = a.real; theta = 0; } else { r = __Pyx_c_absf(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 static CYTHON_INLINE unsigned char __Pyx_PyInt_AsUnsignedChar(PyObject* x) { const unsigned char neg_one = (unsigned char)-1, const_zero = 0; const int is_unsigned = neg_one > const_zero; if (sizeof(unsigned char) < sizeof(long)) { long val = __Pyx_PyInt_AsLong(x); if (unlikely(val != (long)(unsigned char)val)) { if (!unlikely(val == -1 && PyErr_Occurred())) { PyErr_SetString(PyExc_OverflowError, (is_unsigned && unlikely(val < 0)) ? "can't convert negative value to unsigned char" : "value too large to convert to unsigned char"); } return (unsigned char)-1; } return (unsigned char)val; } return (unsigned char)__Pyx_PyInt_AsUnsignedLong(x); } static CYTHON_INLINE unsigned short __Pyx_PyInt_AsUnsignedShort(PyObject* x) { const unsigned short neg_one = (unsigned short)-1, const_zero = 0; const int is_unsigned = neg_one > const_zero; if (sizeof(unsigned short) < sizeof(long)) { long val = __Pyx_PyInt_AsLong(x); if (unlikely(val != (long)(unsigned short)val)) { if (!unlikely(val == -1 && PyErr_Occurred())) { PyErr_SetString(PyExc_OverflowError, (is_unsigned && unlikely(val < 0)) ? "can't convert negative value to unsigned short" : "value too large to convert to unsigned short"); } return (unsigned short)-1; } return (unsigned short)val; } return (unsigned short)__Pyx_PyInt_AsUnsignedLong(x); } static CYTHON_INLINE unsigned int __Pyx_PyInt_AsUnsignedInt(PyObject* x) { const unsigned int neg_one = (unsigned int)-1, const_zero = 0; const int is_unsigned = neg_one > const_zero; if (sizeof(unsigned int) < sizeof(long)) { long val = __Pyx_PyInt_AsLong(x); if (unlikely(val != (long)(unsigned int)val)) { if (!unlikely(val == -1 && PyErr_Occurred())) { PyErr_SetString(PyExc_OverflowError, (is_unsigned && unlikely(val < 0)) ? "can't convert negative value to unsigned int" : "value too large to convert to unsigned int"); } return (unsigned int)-1; } return (unsigned int)val; } return (unsigned int)__Pyx_PyInt_AsUnsignedLong(x); } static CYTHON_INLINE char __Pyx_PyInt_AsChar(PyObject* x) { const char neg_one = (char)-1, const_zero = 0; const int is_unsigned = neg_one > const_zero; if (sizeof(char) < sizeof(long)) { long val = __Pyx_PyInt_AsLong(x); if (unlikely(val != (long)(char)val)) { if (!unlikely(val == -1 && PyErr_Occurred())) { PyErr_SetString(PyExc_OverflowError, (is_unsigned && unlikely(val < 0)) ? "can't convert negative value to char" : "value too large to convert to char"); } return (char)-1; } return (char)val; } return (char)__Pyx_PyInt_AsLong(x); } static CYTHON_INLINE short __Pyx_PyInt_AsShort(PyObject* x) { const short neg_one = (short)-1, const_zero = 0; const int is_unsigned = neg_one > const_zero; if (sizeof(short) < sizeof(long)) { long val = __Pyx_PyInt_AsLong(x); if (unlikely(val != (long)(short)val)) { if (!unlikely(val == -1 && PyErr_Occurred())) { PyErr_SetString(PyExc_OverflowError, (is_unsigned && unlikely(val < 0)) ? "can't convert negative value to short" : "value too large to convert to short"); } return (short)-1; } return (short)val; } return (short)__Pyx_PyInt_AsLong(x); } static CYTHON_INLINE int __Pyx_PyInt_AsInt(PyObject* x) { const int neg_one = (int)-1, const_zero = 0; const int is_unsigned = neg_one > const_zero; if (sizeof(int) < sizeof(long)) { long val = __Pyx_PyInt_AsLong(x); if (unlikely(val != (long)(int)val)) { if (!unlikely(val == -1 && PyErr_Occurred())) { PyErr_SetString(PyExc_OverflowError, (is_unsigned && unlikely(val < 0)) ? "can't convert negative value to int" : "value too large to convert to int"); } return (int)-1; } return (int)val; } return (int)__Pyx_PyInt_AsLong(x); } static CYTHON_INLINE signed char __Pyx_PyInt_AsSignedChar(PyObject* x) { const signed char neg_one = (signed char)-1, const_zero = 0; const int is_unsigned = neg_one > const_zero; if (sizeof(signed char) < sizeof(long)) { long val = __Pyx_PyInt_AsLong(x); if (unlikely(val != (long)(signed char)val)) { if (!unlikely(val == -1 && PyErr_Occurred())) { PyErr_SetString(PyExc_OverflowError, (is_unsigned && unlikely(val < 0)) ? "can't convert negative value to signed char" : "value too large to convert to signed char"); } return (signed char)-1; } return (signed char)val; } return (signed char)__Pyx_PyInt_AsSignedLong(x); } static CYTHON_INLINE signed short __Pyx_PyInt_AsSignedShort(PyObject* x) { const signed short neg_one = (signed short)-1, const_zero = 0; const int is_unsigned = neg_one > const_zero; if (sizeof(signed short) < sizeof(long)) { long val = __Pyx_PyInt_AsLong(x); if (unlikely(val != (long)(signed short)val)) { if (!unlikely(val == -1 && PyErr_Occurred())) { PyErr_SetString(PyExc_OverflowError, (is_unsigned && unlikely(val < 0)) ? "can't convert negative value to signed short" : "value too large to convert to signed short"); } return (signed short)-1; } return (signed short)val; } return (signed short)__Pyx_PyInt_AsSignedLong(x); } static CYTHON_INLINE signed int __Pyx_PyInt_AsSignedInt(PyObject* x) { const signed int neg_one = (signed int)-1, const_zero = 0; const int is_unsigned = neg_one > const_zero; if (sizeof(signed int) < sizeof(long)) { long val = __Pyx_PyInt_AsLong(x); if (unlikely(val != (long)(signed int)val)) { if (!unlikely(val == -1 && PyErr_Occurred())) { PyErr_SetString(PyExc_OverflowError, (is_unsigned && unlikely(val < 0)) ? "can't convert negative value to signed int" : "value too large to convert to signed int"); } return (signed int)-1; } return (signed int)val; } return (signed int)__Pyx_PyInt_AsSignedLong(x); } static CYTHON_INLINE int __Pyx_PyInt_AsLongDouble(PyObject* x) { const int neg_one = (int)-1, const_zero = 0; const int is_unsigned = neg_one > const_zero; if (sizeof(int) < sizeof(long)) { long val = __Pyx_PyInt_AsLong(x); if (unlikely(val != (long)(int)val)) { if (!unlikely(val == -1 && PyErr_Occurred())) { PyErr_SetString(PyExc_OverflowError, (is_unsigned && unlikely(val < 0)) ? "can't convert negative value to int" : "value too large to convert to int"); } return (int)-1; } return (int)val; } return (int)__Pyx_PyInt_AsLong(x); } #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS #include "longintrepr.h" #endif #endif static CYTHON_INLINE unsigned long __Pyx_PyInt_AsUnsignedLong(PyObject* x) { const unsigned long neg_one = (unsigned long)-1, const_zero = 0; const int is_unsigned = neg_one > const_zero; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_Check(x))) { long val = PyInt_AS_LONG(x); if (is_unsigned && unlikely(val < 0)) { PyErr_SetString(PyExc_OverflowError, "can't convert negative value to unsigned long"); return (unsigned long)-1; } return (unsigned long)val; } else #endif if (likely(PyLong_Check(x))) { if (is_unsigned) { #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS if (sizeof(digit) <= sizeof(unsigned long)) { switch (Py_SIZE(x)) { case 0: return 0; case 1: return (unsigned long) ((PyLongObject*)x)->ob_digit[0]; } } #endif #endif if (unlikely(Py_SIZE(x) < 0)) { PyErr_SetString(PyExc_OverflowError, "can't convert negative value to unsigned long"); return (unsigned long)-1; } return (unsigned long)PyLong_AsUnsignedLong(x); } else { #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS if (sizeof(digit) <= sizeof(unsigned long)) { switch (Py_SIZE(x)) { case 0: return 0; case 1: return +(unsigned long) ((PyLongObject*)x)->ob_digit[0]; case -1: return -(unsigned long) ((PyLongObject*)x)->ob_digit[0]; } } #endif #endif return (unsigned long)PyLong_AsLong(x); } } else { unsigned long val; PyObject *tmp = __Pyx_PyNumber_Int(x); if (!tmp) return (unsigned long)-1; val = __Pyx_PyInt_AsUnsignedLong(tmp); Py_DECREF(tmp); return val; } } #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS #include "longintrepr.h" #endif #endif static CYTHON_INLINE unsigned PY_LONG_LONG __Pyx_PyInt_AsUnsignedLongLong(PyObject* x) { const unsigned PY_LONG_LONG neg_one = (unsigned PY_LONG_LONG)-1, const_zero = 0; const int is_unsigned = neg_one > const_zero; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_Check(x))) { long val = PyInt_AS_LONG(x); if (is_unsigned && unlikely(val < 0)) { PyErr_SetString(PyExc_OverflowError, "can't convert negative value to unsigned PY_LONG_LONG"); return (unsigned PY_LONG_LONG)-1; } return (unsigned PY_LONG_LONG)val; } else #endif if (likely(PyLong_Check(x))) { if (is_unsigned) { #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS if (sizeof(digit) <= sizeof(unsigned PY_LONG_LONG)) { switch (Py_SIZE(x)) { case 0: return 0; case 1: return (unsigned PY_LONG_LONG) ((PyLongObject*)x)->ob_digit[0]; } } #endif #endif if (unlikely(Py_SIZE(x) < 0)) { PyErr_SetString(PyExc_OverflowError, "can't convert negative value to unsigned PY_LONG_LONG"); return (unsigned PY_LONG_LONG)-1; } return (unsigned PY_LONG_LONG)PyLong_AsUnsignedLongLong(x); } else { #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS if (sizeof(digit) <= sizeof(unsigned PY_LONG_LONG)) { switch (Py_SIZE(x)) { case 0: return 0; case 1: return +(unsigned PY_LONG_LONG) ((PyLongObject*)x)->ob_digit[0]; case -1: return -(unsigned PY_LONG_LONG) ((PyLongObject*)x)->ob_digit[0]; } } #endif #endif return (unsigned PY_LONG_LONG)PyLong_AsLongLong(x); } } else { unsigned PY_LONG_LONG val; PyObject *tmp = __Pyx_PyNumber_Int(x); if (!tmp) return (unsigned PY_LONG_LONG)-1; val = __Pyx_PyInt_AsUnsignedLongLong(tmp); Py_DECREF(tmp); return val; } } #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS #include "longintrepr.h" #endif #endif static CYTHON_INLINE long __Pyx_PyInt_AsLong(PyObject* x) { const long neg_one = (long)-1, const_zero = 0; const int is_unsigned = neg_one > const_zero; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_Check(x))) { long val = PyInt_AS_LONG(x); if (is_unsigned && unlikely(val < 0)) { PyErr_SetString(PyExc_OverflowError, "can't convert negative value to long"); return (long)-1; } return (long)val; } else #endif if (likely(PyLong_Check(x))) { if (is_unsigned) { #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS if (sizeof(digit) <= sizeof(long)) { switch (Py_SIZE(x)) { case 0: return 0; case 1: return (long) ((PyLongObject*)x)->ob_digit[0]; } } #endif #endif if (unlikely(Py_SIZE(x) < 0)) { PyErr_SetString(PyExc_OverflowError, "can't convert negative value to long"); return (long)-1; } return (long)PyLong_AsUnsignedLong(x); } else { #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS if (sizeof(digit) <= sizeof(long)) { switch (Py_SIZE(x)) { case 0: return 0; case 1: return +(long) ((PyLongObject*)x)->ob_digit[0]; case -1: return -(long) ((PyLongObject*)x)->ob_digit[0]; } } #endif #endif return (long)PyLong_AsLong(x); } } else { long val; PyObject *tmp = __Pyx_PyNumber_Int(x); if (!tmp) return (long)-1; val = __Pyx_PyInt_AsLong(tmp); Py_DECREF(tmp); return val; } } #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS #include "longintrepr.h" #endif #endif static CYTHON_INLINE PY_LONG_LONG __Pyx_PyInt_AsLongLong(PyObject* x) { const PY_LONG_LONG neg_one = (PY_LONG_LONG)-1, const_zero = 0; const int is_unsigned = neg_one > const_zero; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_Check(x))) { long val = PyInt_AS_LONG(x); if (is_unsigned && unlikely(val < 0)) { PyErr_SetString(PyExc_OverflowError, "can't convert negative value to PY_LONG_LONG"); return (PY_LONG_LONG)-1; } return (PY_LONG_LONG)val; } else #endif if (likely(PyLong_Check(x))) { if (is_unsigned) { #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS if (sizeof(digit) <= sizeof(PY_LONG_LONG)) { switch (Py_SIZE(x)) { case 0: return 0; case 1: return (PY_LONG_LONG) ((PyLongObject*)x)->ob_digit[0]; } } #endif #endif if (unlikely(Py_SIZE(x) < 0)) { PyErr_SetString(PyExc_OverflowError, "can't convert negative value to PY_LONG_LONG"); return (PY_LONG_LONG)-1; } return (PY_LONG_LONG)PyLong_AsUnsignedLongLong(x); } else { #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS if (sizeof(digit) <= sizeof(PY_LONG_LONG)) { switch (Py_SIZE(x)) { case 0: return 0; case 1: return +(PY_LONG_LONG) ((PyLongObject*)x)->ob_digit[0]; case -1: return -(PY_LONG_LONG) ((PyLongObject*)x)->ob_digit[0]; } } #endif #endif return (PY_LONG_LONG)PyLong_AsLongLong(x); } } else { PY_LONG_LONG val; PyObject *tmp = __Pyx_PyNumber_Int(x); if (!tmp) return (PY_LONG_LONG)-1; val = __Pyx_PyInt_AsLongLong(tmp); Py_DECREF(tmp); return val; } } #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS #include "longintrepr.h" #endif #endif static CYTHON_INLINE signed long __Pyx_PyInt_AsSignedLong(PyObject* x) { const signed long neg_one = (signed long)-1, const_zero = 0; const int is_unsigned = neg_one > const_zero; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_Check(x))) { long val = PyInt_AS_LONG(x); if (is_unsigned && unlikely(val < 0)) { PyErr_SetString(PyExc_OverflowError, "can't convert negative value to signed long"); return (signed long)-1; } return (signed long)val; } else #endif if (likely(PyLong_Check(x))) { if (is_unsigned) { #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS if (sizeof(digit) <= sizeof(signed long)) { switch (Py_SIZE(x)) { case 0: return 0; case 1: return (signed long) ((PyLongObject*)x)->ob_digit[0]; } } #endif #endif if (unlikely(Py_SIZE(x) < 0)) { PyErr_SetString(PyExc_OverflowError, "can't convert negative value to signed long"); return (signed long)-1; } return (signed long)PyLong_AsUnsignedLong(x); } else { #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS if (sizeof(digit) <= sizeof(signed long)) { switch (Py_SIZE(x)) { case 0: return 0; case 1: return +(signed long) ((PyLongObject*)x)->ob_digit[0]; case -1: return -(signed long) ((PyLongObject*)x)->ob_digit[0]; } } #endif #endif return (signed long)PyLong_AsLong(x); } } else { signed long val; PyObject *tmp = __Pyx_PyNumber_Int(x); if (!tmp) return (signed long)-1; val = __Pyx_PyInt_AsSignedLong(tmp); Py_DECREF(tmp); return val; } } #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS #include "longintrepr.h" #endif #endif static CYTHON_INLINE signed PY_LONG_LONG __Pyx_PyInt_AsSignedLongLong(PyObject* x) { const signed PY_LONG_LONG neg_one = (signed PY_LONG_LONG)-1, const_zero = 0; const int is_unsigned = neg_one > const_zero; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_Check(x))) { long val = PyInt_AS_LONG(x); if (is_unsigned && unlikely(val < 0)) { PyErr_SetString(PyExc_OverflowError, "can't convert negative value to signed PY_LONG_LONG"); return (signed PY_LONG_LONG)-1; } return (signed PY_LONG_LONG)val; } else #endif if (likely(PyLong_Check(x))) { if (is_unsigned) { #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS if (sizeof(digit) <= sizeof(signed PY_LONG_LONG)) { switch (Py_SIZE(x)) { case 0: return 0; case 1: return (signed PY_LONG_LONG) ((PyLongObject*)x)->ob_digit[0]; } } #endif #endif if (unlikely(Py_SIZE(x) < 0)) { PyErr_SetString(PyExc_OverflowError, "can't convert negative value to signed PY_LONG_LONG"); return (signed PY_LONG_LONG)-1; } return (signed PY_LONG_LONG)PyLong_AsUnsignedLongLong(x); } else { #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS if (sizeof(digit) <= sizeof(signed PY_LONG_LONG)) { switch (Py_SIZE(x)) { case 0: return 0; case 1: return +(signed PY_LONG_LONG) ((PyLongObject*)x)->ob_digit[0]; case -1: return -(signed PY_LONG_LONG) ((PyLongObject*)x)->ob_digit[0]; } } #endif #endif return (signed PY_LONG_LONG)PyLong_AsLongLong(x); } } else { signed PY_LONG_LONG val; PyObject *tmp = __Pyx_PyNumber_Int(x); if (!tmp) return (signed PY_LONG_LONG)-1; val = __Pyx_PyInt_AsSignedLongLong(tmp); Py_DECREF(tmp); return val; } } 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); #if PY_VERSION_HEX < 0x02050000 return PyErr_Warn(NULL, message); #else return PyErr_WarnEx(NULL, message, 1); #endif } return 0; } #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 #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, "%s.%s 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", module_name, class_name); #if PY_VERSION_HEX < 0x02050000 if (PyErr_Warn(NULL, warning) < 0) goto bad; #else if (PyErr_WarnEx(NULL, warning, 0) < 0) goto bad; #endif } else if ((size_t)basicsize != size) { PyErr_Format(PyExc_ValueError, "%s.%s has the wrong size, try recompiling", module_name, class_name); goto bad; } return (PyTypeObject *)result; bad: Py_XDECREF(py_module); Py_XDECREF(result); return NULL; } #endif #ifndef __PYX_HAVE_RT_ImportFunction #define __PYX_HAVE_RT_ImportFunction static int __Pyx_ImportFunction(PyObject *module, const char *funcname, void (**f)(void), const char *sig) { PyObject *d = 0; PyObject *cobj = 0; union { void (*fp)(void); void *p; } tmp; d = PyObject_GetAttrString(module, (char *)"__pyx_capi__"); if (!d) goto bad; cobj = PyDict_GetItemString(d, funcname); if (!cobj) { PyErr_Format(PyExc_ImportError, "%s does not export expected C function %s", PyModule_GetName(module), funcname); goto bad; } #if PY_VERSION_HEX >= 0x02070000 && !(PY_MAJOR_VERSION==3 && PY_MINOR_VERSION==0) if (!PyCapsule_IsValid(cobj, sig)) { PyErr_Format(PyExc_TypeError, "C function %s.%s has wrong signature (expected %s, got %s)", PyModule_GetName(module), funcname, sig, PyCapsule_GetName(cobj)); goto bad; } tmp.p = PyCapsule_GetPointer(cobj, sig); #else {const char *desc, *s1, *s2; desc = (const char *)PyCObject_GetDesc(cobj); if (!desc) goto bad; s1 = desc; s2 = sig; while (*s1 != '\0' && *s1 == *s2) { s1++; s2++; } if (*s1 != *s2) { PyErr_Format(PyExc_TypeError, "C function %s.%s has wrong signature (expected %s, got %s)", PyModule_GetName(module), funcname, sig, desc); goto bad; } tmp.p = PyCObject_AsVoidPtr(cobj);} #endif *f = tmp.fp; if (!(*f)) goto bad; Py_DECREF(d); return 0; bad: Py_XDECREF(d); return -1; } #endif 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) / 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, 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); } #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, /*int argcount,*/ 0, /*int kwonlyargcount,*/ 0, /*int nlocals,*/ 0, /*int stacksize,*/ 0, /*int flags,*/ __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, /*int firstlineno,*/ __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; PyObject *py_globals = 0; PyFrameObject *py_frame = 0; py_code = __pyx_find_code_object(c_line ? c_line : py_line); if (!py_code) { py_code = __Pyx_CreateCodeObjectForTraceback( funcname, c_line, py_line, filename); if (!py_code) goto bad; __pyx_insert_code_object(c_line ? c_line : py_line, py_code); } py_globals = PyModule_GetDict(__pyx_m); if (!py_globals) goto bad; py_frame = PyFrame_New( PyThreadState_GET(), /*PyThreadState *tstate,*/ py_code, /*PyCodeObject *code,*/ py_globals, /*PyObject *globals,*/ 0 /*PyObject *locals*/ ); if (!py_frame) goto bad; py_frame->f_lineno = py_line; PyTraceBack_Here(py_frame); bad: Py_XDECREF(py_code); Py_XDECREF(py_frame); } 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 /* Python 3+ has unicode identifiers */ if (t->is_unicode | t->is_str) { if (t->intern) { *t->p = PyUnicode_InternFromString(t->s); } else if (t->encoding) { *t->p = PyUnicode_Decode(t->s, t->n - 1, t->encoding, NULL); } else { *t->p = PyUnicode_FromStringAndSize(t->s, t->n - 1); } } else { *t->p = PyBytes_FromStringAndSize(t->s, t->n - 1); } #endif if (!*t->p) return -1; ++t; } return 0; } static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(char* c_str) { return __Pyx_PyUnicode_FromStringAndSize(c_str, strlen(c_str)); } static CYTHON_INLINE char* __Pyx_PyObject_AsString(PyObject* o) { Py_ssize_t ignore; return __Pyx_PyObject_AsStringAndSize(o, &ignore); } static CYTHON_INLINE char* __Pyx_PyObject_AsStringAndSize(PyObject* o, Py_ssize_t *length) { #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT if ( #if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII __Pyx_sys_getdefaultencoding_not_ascii && #endif PyUnicode_Check(o)) { #if PY_VERSION_HEX < 0x03030000 char* defenc_c; PyObject* defenc = _PyUnicode_AsDefaultEncodedString(o, NULL); if (!defenc) return NULL; defenc_c = PyBytes_AS_STRING(defenc); #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII { char* end = defenc_c + PyBytes_GET_SIZE(defenc); char* c; for (c = defenc_c; c < end; c++) { if ((unsigned char) (*c) >= 128) { PyUnicode_AsASCIIString(o); return NULL; } } } #endif /*__PYX_DEFAULT_STRING_ENCODING_IS_ASCII*/ *length = PyBytes_GET_SIZE(defenc); return defenc_c; #else /* PY_VERSION_HEX < 0x03030000 */ if (PyUnicode_READY(o) == -1) return NULL; #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII if (PyUnicode_IS_ASCII(o)) { *length = PyUnicode_GET_DATA_SIZE(o); return PyUnicode_AsUTF8(o); } else { PyUnicode_AsASCIIString(o); return NULL; } #else /* __PYX_DEFAULT_STRING_ENCODING_IS_ASCII */ return PyUnicode_AsUTF8AndSize(o, length); #endif /* __PYX_DEFAULT_STRING_ENCODING_IS_ASCII */ #endif /* PY_VERSION_HEX < 0x03030000 */ } else #endif /* __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT */ { char* result; int r = PyBytes_AsStringAndSize(o, &result, length); if (r < 0) { return NULL; } else { return result; } } } static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject* x) { int is_true = x == Py_True; if (is_true | (x == Py_False) | (x == Py_None)) return is_true; else return PyObject_IsTrue(x); } static CYTHON_INLINE PyObject* __Pyx_PyNumber_Int(PyObject* x) { PyNumberMethods *m; const char *name = NULL; PyObject *res = NULL; #if PY_MAJOR_VERSION < 3 if (PyInt_Check(x) || PyLong_Check(x)) #else if (PyLong_Check(x)) #endif return Py_INCREF(x), x; m = Py_TYPE(x)->tp_as_number; #if PY_MAJOR_VERSION < 3 if (m && m->nb_int) { name = "int"; res = PyNumber_Int(x); } else if (m && m->nb_long) { name = "long"; res = PyNumber_Long(x); } #else if (m && m->nb_int) { name = "int"; res = PyNumber_Long(x); } #endif if (res) { #if PY_MAJOR_VERSION < 3 if (!PyInt_Check(res) && !PyLong_Check(res)) { #else if (!PyLong_Check(res)) { #endif PyErr_Format(PyExc_TypeError, "__%s__ returned non-%s (type %.200s)", name, name, Py_TYPE(res)->tp_name); Py_DECREF(res); return NULL; } } else if (!PyErr_Occurred()) { PyErr_SetString(PyExc_TypeError, "an integer is required"); } return res; } static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) { Py_ssize_t ival; PyObject* x = 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) { #if PY_VERSION_HEX < 0x02050000 if (ival <= LONG_MAX) return PyInt_FromLong((long)ival); else { unsigned char *bytes = (unsigned char *) &ival; int one = 1; int little = (int)*(unsigned char*)&one; return _PyLong_FromByteArray(bytes, sizeof(size_t), little, 0); } #else return PyInt_FromSize_t(ival); #endif } static CYTHON_INLINE size_t __Pyx_PyInt_AsSize_t(PyObject* x) { unsigned PY_LONG_LONG val = __Pyx_PyInt_AsUnsignedLongLong(x); if (unlikely(val != (unsigned PY_LONG_LONG)(size_t)val)) { if ((val != (unsigned PY_LONG_LONG)-1) || !PyErr_Occurred()) PyErr_SetString(PyExc_OverflowError, "value too large to convert to size_t"); return (size_t)-1; } return (size_t)val; } #endif /* Py_PYTHON_H */ debian/cythonized-files3/pandas/msgpack.cpp0000664000000000000000000213130712275603610016143 0ustar /* Generated by Cython 0.19.2 on Mon Feb 3 08:42:29 2014 */ #define PY_SSIZE_T_CLEAN #ifndef CYTHON_USE_PYLONG_INTERNALS #ifdef PYLONG_BITS_IN_DIGIT #define CYTHON_USE_PYLONG_INTERNALS 0 #else #include "pyconfig.h" #ifdef PYLONG_BITS_IN_DIGIT #define CYTHON_USE_PYLONG_INTERNALS 1 #else #define CYTHON_USE_PYLONG_INTERNALS 0 #endif #endif #endif #include "Python.h" #ifndef Py_PYTHON_H #error Python headers needed to compile C extensions, please install development version of Python. #elif PY_VERSION_HEX < 0x02040000 #error Cython requires Python 2.4+. #else #include /* For offsetof */ #ifndef offsetof #define offsetof(type, member) ( (size_t) & ((type*)0) -> member ) #endif #if !defined(WIN32) && !defined(MS_WINDOWS) #ifndef __stdcall #define __stdcall #endif #ifndef __cdecl #define __cdecl #endif #ifndef __fastcall #define __fastcall #endif #endif #ifndef DL_IMPORT #define DL_IMPORT(t) t #endif #ifndef DL_EXPORT #define DL_EXPORT(t) t #endif #ifndef PY_LONG_LONG #define PY_LONG_LONG LONG_LONG #endif #ifndef Py_HUGE_VAL #define Py_HUGE_VAL HUGE_VAL #endif #ifdef PYPY_VERSION #define CYTHON_COMPILING_IN_PYPY 1 #define CYTHON_COMPILING_IN_CPYTHON 0 #else #define CYTHON_COMPILING_IN_PYPY 0 #define CYTHON_COMPILING_IN_CPYTHON 1 #endif #if PY_VERSION_HEX < 0x02050000 typedef int Py_ssize_t; #define PY_SSIZE_T_MAX INT_MAX #define PY_SSIZE_T_MIN INT_MIN #define PY_FORMAT_SIZE_T "" #define CYTHON_FORMAT_SSIZE_T "" #define PyInt_FromSsize_t(z) PyInt_FromLong(z) #define PyInt_AsSsize_t(o) __Pyx_PyInt_AsInt(o) #define PyNumber_Index(o) ((PyNumber_Check(o) && !PyFloat_Check(o)) ? PyNumber_Int(o) : \ (PyErr_Format(PyExc_TypeError, \ "expected index value, got %.200s", Py_TYPE(o)->tp_name), \ (PyObject*)0)) #define __Pyx_PyIndex_Check(o) (PyNumber_Check(o) && !PyFloat_Check(o) && \ !PyComplex_Check(o)) #define PyIndex_Check __Pyx_PyIndex_Check #define PyErr_WarnEx(category, message, stacklevel) PyErr_Warn(category, message) #define __PYX_BUILD_PY_SSIZE_T "i" #else #define __PYX_BUILD_PY_SSIZE_T "n" #define CYTHON_FORMAT_SSIZE_T "z" #define __Pyx_PyIndex_Check PyIndex_Check #endif #if PY_VERSION_HEX < 0x02060000 #define Py_REFCNT(ob) (((PyObject*)(ob))->ob_refcnt) #define Py_TYPE(ob) (((PyObject*)(ob))->ob_type) #define Py_SIZE(ob) (((PyVarObject*)(ob))->ob_size) #define PyVarObject_HEAD_INIT(type, size) \ PyObject_HEAD_INIT(type) size, #define PyType_Modified(t) typedef struct { void *buf; PyObject *obj; Py_ssize_t len; Py_ssize_t itemsize; int readonly; int ndim; char *format; Py_ssize_t *shape; Py_ssize_t *strides; Py_ssize_t *suboffsets; void *internal; } Py_buffer; #define PyBUF_SIMPLE 0 #define PyBUF_WRITABLE 0x0001 #define PyBUF_FORMAT 0x0004 #define PyBUF_ND 0x0008 #define PyBUF_STRIDES (0x0010 | PyBUF_ND) #define PyBUF_C_CONTIGUOUS (0x0020 | PyBUF_STRIDES) #define PyBUF_F_CONTIGUOUS (0x0040 | PyBUF_STRIDES) #define PyBUF_ANY_CONTIGUOUS (0x0080 | PyBUF_STRIDES) #define PyBUF_INDIRECT (0x0100 | PyBUF_STRIDES) #define PyBUF_RECORDS (PyBUF_STRIDES | PyBUF_FORMAT | PyBUF_WRITABLE) #define PyBUF_FULL (PyBUF_INDIRECT | PyBUF_FORMAT | PyBUF_WRITABLE) typedef int (*getbufferproc)(PyObject *, Py_buffer *, int); typedef void (*releasebufferproc)(PyObject *, Py_buffer *); #endif #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, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) #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) #endif #if PY_MAJOR_VERSION < 3 && PY_MINOR_VERSION < 6 #define PyUnicode_FromString(s) PyUnicode_Decode(s, strlen(s), "UTF-8", "strict") #endif #if PY_MAJOR_VERSION >= 3 #define Py_TPFLAGS_CHECKTYPES 0 #define Py_TPFLAGS_HAVE_INDEX 0 #endif #if (PY_VERSION_HEX < 0x02060000) || (PY_MAJOR_VERSION >= 3) #define Py_TPFLAGS_HAVE_NEWBUFFER 0 #endif #if PY_VERSION_HEX < 0x02060000 #define Py_TPFLAGS_HAVE_VERSION_TAG 0 #endif #if PY_VERSION_HEX > 0x03030000 && defined(PyUnicode_KIND) #define CYTHON_PEP393_ENABLED 1 #define __Pyx_PyUnicode_READY(op) (likely(PyUnicode_IS_READY(op)) ? \ 0 : _PyUnicode_Ready((PyObject *)(op))) #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_LENGTH(u) #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i) #define __Pyx_PyUnicode_READ(k, d, i) PyUnicode_READ(k, d, i) #else #define CYTHON_PEP393_ENABLED 0 #define __Pyx_PyUnicode_READY(op) (0) #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_SIZE(u) #define __Pyx_PyUnicode_READ_CHAR(u, i) ((Py_UCS4)(PyUnicode_AS_UNICODE(u)[i])) #define __Pyx_PyUnicode_READ(k, d, i) ((k=k), (Py_UCS4)(((Py_UNICODE*)d)[i])) #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_VERSION_HEX < 0x02060000 #define PyBytesObject PyStringObject #define PyBytes_Type PyString_Type #define PyBytes_Check PyString_Check #define PyBytes_CheckExact PyString_CheckExact #define PyBytes_FromString PyString_FromString #define PyBytes_FromStringAndSize PyString_FromStringAndSize #define PyBytes_FromFormat PyString_FromFormat #define PyBytes_DecodeEscape PyString_DecodeEscape #define PyBytes_AsString PyString_AsString #define PyBytes_AsStringAndSize PyString_AsStringAndSize #define PyBytes_Size PyString_Size #define PyBytes_AS_STRING PyString_AS_STRING #define PyBytes_GET_SIZE PyString_GET_SIZE #define PyBytes_Repr PyString_Repr #define PyBytes_Concat PyString_Concat #define PyBytes_ConcatAndDel PyString_ConcatAndDel #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_CheckExact(obj) || PyUnicode_CheckExact(obj) || \ PyString_Check(obj) || PyUnicode_Check(obj)) #define __Pyx_PyBaseString_CheckExact(obj) (Py_TYPE(obj) == &PyBaseString_Type) #endif #if PY_VERSION_HEX < 0x02060000 #define PySet_Check(obj) PyObject_TypeCheck(obj, &PySet_Type) #define PyFrozenSet_Check(obj) PyObject_TypeCheck(obj, &PyFrozenSet_Type) #endif #ifndef PySet_CheckExact #define PySet_CheckExact(obj) (Py_TYPE(obj) == &PySet_Type) #endif #define __Pyx_TypeCheck(obj, type) PyObject_TypeCheck(obj, (PyTypeObject *)type) #if PY_MAJOR_VERSION >= 3 #define PyIntObject PyLongObject #define PyInt_Type PyLong_Type #define PyInt_Check(op) PyLong_Check(op) #define PyInt_CheckExact(op) PyLong_CheckExact(op) #define PyInt_FromString PyLong_FromString #define PyInt_FromUnicode PyLong_FromUnicode #define PyInt_FromLong PyLong_FromLong #define PyInt_FromSize_t PyLong_FromSize_t #define PyInt_FromSsize_t PyLong_FromSsize_t #define PyInt_AsLong PyLong_AsLong #define PyInt_AS_LONG PyLong_AS_LONG #define PyInt_AsSsize_t PyLong_AsSsize_t #define PyInt_AsUnsignedLongMask PyLong_AsUnsignedLongMask #define PyInt_AsUnsignedLongLongMask PyLong_AsUnsignedLongLongMask #endif #if PY_MAJOR_VERSION >= 3 #define PyBoolObject PyLongObject #endif #if PY_VERSION_HEX < 0x03020000 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) || (PY_VERSION_HEX >= 0x03010300) #define __Pyx_PySequence_GetSlice(obj, a, b) PySequence_GetSlice(obj, a, b) #define __Pyx_PySequence_SetSlice(obj, a, b, value) PySequence_SetSlice(obj, a, b, value) #define __Pyx_PySequence_DelSlice(obj, a, b) PySequence_DelSlice(obj, a, b) #else #define __Pyx_PySequence_GetSlice(obj, a, b) (unlikely(!(obj)) ? \ (PyErr_SetString(PyExc_SystemError, "null argument to internal routine"), (PyObject*)0) : \ (likely((obj)->ob_type->tp_as_mapping) ? (PySequence_GetSlice(obj, a, b)) : \ (PyErr_Format(PyExc_TypeError, "'%.200s' object is unsliceable", (obj)->ob_type->tp_name), (PyObject*)0))) #define __Pyx_PySequence_SetSlice(obj, a, b, value) (unlikely(!(obj)) ? \ (PyErr_SetString(PyExc_SystemError, "null argument to internal routine"), -1) : \ (likely((obj)->ob_type->tp_as_mapping) ? (PySequence_SetSlice(obj, a, b, value)) : \ (PyErr_Format(PyExc_TypeError, "'%.200s' object doesn't support slice assignment", (obj)->ob_type->tp_name), -1))) #define __Pyx_PySequence_DelSlice(obj, a, b) (unlikely(!(obj)) ? \ (PyErr_SetString(PyExc_SystemError, "null argument to internal routine"), -1) : \ (likely((obj)->ob_type->tp_as_mapping) ? (PySequence_DelSlice(obj, a, b)) : \ (PyErr_Format(PyExc_TypeError, "'%.200s' object doesn't support slice deletion", (obj)->ob_type->tp_name), -1))) #endif #if PY_MAJOR_VERSION >= 3 #define PyMethod_New(func, self, klass) ((self) ? PyMethod_New(func, self) : PyInstanceMethod_New(func)) #endif #if PY_VERSION_HEX < 0x02050000 #define __Pyx_GetAttrString(o,n) PyObject_GetAttrString((o),((char *)(n))) #define __Pyx_SetAttrString(o,n,a) PyObject_SetAttrString((o),((char *)(n)),(a)) #define __Pyx_DelAttrString(o,n) PyObject_DelAttrString((o),((char *)(n))) #else #define __Pyx_GetAttrString(o,n) PyObject_GetAttrString((o),(n)) #define __Pyx_SetAttrString(o,n,a) PyObject_SetAttrString((o),(n),(a)) #define __Pyx_DelAttrString(o,n) PyObject_DelAttrString((o),(n)) #endif #if PY_VERSION_HEX < 0x02050000 #define __Pyx_NAMESTR(n) ((char *)(n)) #define __Pyx_DOCSTR(n) ((char *)(n)) #else #define __Pyx_NAMESTR(n) (n) #define __Pyx_DOCSTR(n) (n) #endif #ifndef CYTHON_INLINE #if defined(__GNUC__) #define CYTHON_INLINE __inline__ #elif defined(_MSC_VER) #define CYTHON_INLINE __inline #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L #define CYTHON_INLINE inline #else #define CYTHON_INLINE #endif #endif #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 #ifdef NAN #define __PYX_NAN() ((float) NAN) #else static CYTHON_INLINE float __PYX_NAN() { /* Initialize NaN. The sign is irrelevant, an exponent with all bits 1 and a nonzero mantissa means NaN. If the first bit in the mantissa is 1, it is a quiet NaN. */ float value; memset(&value, 0xFF, sizeof(value)); return value; } #endif #if PY_MAJOR_VERSION >= 3 #define __Pyx_PyNumber_Divide(x,y) PyNumber_TrueDivide(x,y) #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceTrueDivide(x,y) #else #define __Pyx_PyNumber_Divide(x,y) PyNumber_Divide(x,y) #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceDivide(x,y) #endif #ifndef __PYX_EXTERN_C #ifdef __cplusplus #define __PYX_EXTERN_C extern "C" #else #define __PYX_EXTERN_C extern #endif #endif #if defined(WIN32) || defined(MS_WINDOWS) #define _USE_MATH_DEFINES #endif #include #define __PYX_HAVE__pandas__msgpack #define __PYX_HAVE_API__pandas__msgpack #include "string.h" #include "stdio.h" #include "pythread.h" #include "stdlib.h" #include "limits.h" #include "numpy/arrayobject.h" #include "numpy/ufuncobject.h" #include "msgpack/unpack.h" #include "msgpack/pack.h" #ifdef _OPENMP #include #endif /* _OPENMP */ #ifdef PYREX_WITHOUT_ASSERTIONS #define CYTHON_WITHOUT_ASSERTIONS #endif #ifndef CYTHON_UNUSED # if defined(__GNUC__) # if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)) # define CYTHON_UNUSED __attribute__ ((__unused__)) # else # define CYTHON_UNUSED # endif # elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER)) # define CYTHON_UNUSED __attribute__ ((__unused__)) # else # define CYTHON_UNUSED # endif #endif typedef struct {PyObject **p; char *s; const Py_ssize_t n; const char* encoding; const char is_unicode; const char is_str; const char intern; } __Pyx_StringTabEntry; /*proto*/ #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 static CYTHON_INLINE char* __Pyx_PyObject_AsString(PyObject*); static CYTHON_INLINE char* __Pyx_PyObject_AsStringAndSize(PyObject*, Py_ssize_t* length); #define __Pyx_PyBytes_FromString PyBytes_FromString #define __Pyx_PyBytes_FromStringAndSize PyBytes_FromStringAndSize static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(char*); #if PY_MAJOR_VERSION < 3 #define __Pyx_PyStr_FromString __Pyx_PyBytes_FromString #define __Pyx_PyStr_FromStringAndSize __Pyx_PyBytes_FromStringAndSize #else #define __Pyx_PyStr_FromString __Pyx_PyUnicode_FromString #define __Pyx_PyStr_FromStringAndSize __Pyx_PyUnicode_FromStringAndSize #endif #define __Pyx_PyObject_AsUString(s) ((unsigned char*) __Pyx_PyObject_AsString(s)) #define __Pyx_PyObject_FromUString(s) __Pyx_PyObject_FromString((char*)s) #define __Pyx_PyBytes_FromUString(s) __Pyx_PyBytes_FromString((char*)s) #define __Pyx_PyStr_FromUString(s) __Pyx_PyStr_FromString((char*)s) #define __Pyx_PyUnicode_FromUString(s) __Pyx_PyUnicode_FromString((char*)s) #if PY_MAJOR_VERSION < 3 static CYTHON_INLINE size_t __Pyx_Py_UNICODE_strlen(const Py_UNICODE *u) { const Py_UNICODE *u_end = u; while (*u_end++) ; return u_end - u - 1; } #else #define __Pyx_Py_UNICODE_strlen Py_UNICODE_strlen #endif #define __Pyx_PyUnicode_FromUnicode(u) PyUnicode_FromUnicode(u, __Pyx_Py_UNICODE_strlen(u)) #define __Pyx_PyUnicode_FromUnicodeAndLength PyUnicode_FromUnicode #define __Pyx_PyUnicode_AsUnicode PyUnicode_AsUnicode #define __Pyx_Owned_Py_None(b) (Py_INCREF(Py_None), Py_None) #define __Pyx_PyBool_FromLong(b) ((b) ? (Py_INCREF(Py_True), Py_True) : (Py_INCREF(Py_False), Py_False)) static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*); static CYTHON_INLINE PyObject* __Pyx_PyNumber_Int(PyObject* x); static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*); static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t); static CYTHON_INLINE size_t __Pyx_PyInt_AsSize_t(PyObject*); #if CYTHON_COMPILING_IN_CPYTHON #define __pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x)) #else #define __pyx_PyFloat_AsDouble(x) PyFloat_AsDouble(x) #endif #define __pyx_PyFloat_AsFloat(x) ((float) __pyx_PyFloat_AsDouble(x)) #if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII static int __Pyx_sys_getdefaultencoding_not_ascii; static int __Pyx_init_sys_getdefaultencoding_params() { PyObject* sys = NULL; PyObject* default_encoding = NULL; PyObject* ascii_chars_u = NULL; PyObject* ascii_chars_b = NULL; sys = PyImport_ImportModule("sys"); if (sys == NULL) goto bad; default_encoding = PyObject_CallMethod(sys, (char*) (const char*) "getdefaultencoding", NULL); if (default_encoding == NULL) goto bad; if (strcmp(PyBytes_AsString(default_encoding), "ascii") == 0) { __Pyx_sys_getdefaultencoding_not_ascii = 0; } else { const char* default_encoding_c = PyBytes_AS_STRING(default_encoding); 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 == NULL) goto bad; ascii_chars_b = PyUnicode_AsEncodedString(ascii_chars_u, default_encoding_c, NULL); if (ascii_chars_b == NULL || strncmp(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 '%s' is not a superset of ascii.", default_encoding_c); goto bad; } } Py_XDECREF(sys); Py_XDECREF(default_encoding); Py_XDECREF(ascii_chars_u); Py_XDECREF(ascii_chars_b); return 0; bad: Py_XDECREF(sys); 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() { PyObject* sys = NULL; PyObject* default_encoding = NULL; char* default_encoding_c; sys = PyImport_ImportModule("sys"); if (sys == NULL) goto bad; default_encoding = PyObject_CallMethod(sys, (char*) (const char*) "getdefaultencoding", NULL); if (default_encoding == NULL) goto bad; default_encoding_c = PyBytes_AS_STRING(default_encoding); __PYX_DEFAULT_STRING_ENCODING = (char*) malloc(strlen(default_encoding_c)); strcpy(__PYX_DEFAULT_STRING_ENCODING, default_encoding_c); Py_DECREF(sys); Py_DECREF(default_encoding); return 0; bad: Py_XDECREF(sys); Py_XDECREF(default_encoding); return -1; } #endif #endif #ifdef __GNUC__ /* Test for GCC > 2.95 */ #if __GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95)) #define likely(x) __builtin_expect(!!(x), 1) #define unlikely(x) __builtin_expect(!!(x), 0) #else /* __GNUC__ > 2 ... */ #define likely(x) (x) #define unlikely(x) (x) #endif /* __GNUC__ > 2 ... */ #else /* __GNUC__ */ #define likely(x) (x) #define unlikely(x) (x) #endif /* __GNUC__ */ static PyObject *__pyx_m; static PyObject *__pyx_d; static PyObject *__pyx_b; static PyObject *__pyx_empty_tuple; static PyObject *__pyx_empty_bytes; static int __pyx_lineno; static int __pyx_clineno = 0; static const char * __pyx_cfilenm= __FILE__; static const char *__pyx_filename; #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[] = { "msgpack.pyx", "numpy.pxd", "type.pxd", "bool.pxd", "complex.pxd", }; /* "numpy.pxd":726 * # 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; /* "numpy.pxd":727 * * 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; /* "numpy.pxd":728 * 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; /* "numpy.pxd":729 * 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; /* "numpy.pxd":733 * #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; /* "numpy.pxd":734 * * 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; /* "numpy.pxd":735 * 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; /* "numpy.pxd":736 * 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; /* "numpy.pxd":740 * #ctypedef npy_uint128 uint128_t * * ctypedef npy_float16 float16_t # <<<<<<<<<<<<<< * ctypedef npy_float32 float32_t * ctypedef npy_float64 float64_t */ typedef npy_float16 __pyx_t_5numpy_float16_t; /* "numpy.pxd":741 * * ctypedef npy_float16 float16_t * ctypedef npy_float32 float32_t # <<<<<<<<<<<<<< * ctypedef npy_float64 float64_t * #ctypedef npy_float80 float80_t */ typedef npy_float32 __pyx_t_5numpy_float32_t; /* "numpy.pxd":742 * ctypedef npy_float16 float16_t * 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; /* "numpy.pxd":751 * # 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; /* "numpy.pxd":752 * # 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; /* "numpy.pxd":753 * 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; /* "numpy.pxd":755 * 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; /* "numpy.pxd":756 * * ctypedef npy_ulong uint_t * ctypedef npy_ulonglong ulong_t # <<<<<<<<<<<<<< * ctypedef npy_ulonglong ulonglong_t * */ typedef npy_ulonglong __pyx_t_5numpy_ulong_t; /* "numpy.pxd":757 * 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; /* "numpy.pxd":759 * ctypedef npy_ulonglong ulonglong_t * * ctypedef npy_intp intp_t # <<<<<<<<<<<<<< * ctypedef npy_uintp uintp_t * */ typedef npy_intp __pyx_t_5numpy_intp_t; /* "numpy.pxd":760 * * ctypedef npy_intp intp_t * ctypedef npy_uintp uintp_t # <<<<<<<<<<<<<< * * ctypedef npy_double float_t */ typedef npy_uintp __pyx_t_5numpy_uintp_t; /* "numpy.pxd":762 * 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; /* "numpy.pxd":763 * * ctypedef npy_double float_t * ctypedef npy_double double_t # <<<<<<<<<<<<<< * ctypedef npy_longdouble longdouble_t * */ typedef npy_double __pyx_t_5numpy_double_t; /* "numpy.pxd":764 * 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; #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 #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 /*--- Type declarations ---*/ struct __pyx_obj_6pandas_7msgpack_Unpacker; struct __pyx_obj_6pandas_7msgpack_Packer; /* "numpy.pxd":766 * 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; /* "numpy.pxd":767 * * ctypedef npy_cfloat cfloat_t * ctypedef npy_cdouble cdouble_t # <<<<<<<<<<<<<< * ctypedef npy_clongdouble clongdouble_t * */ typedef npy_cdouble __pyx_t_5numpy_cdouble_t; /* "numpy.pxd":768 * 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; /* "numpy.pxd":770 * ctypedef npy_clongdouble clongdouble_t * * ctypedef npy_cdouble complex_t # <<<<<<<<<<<<<< * * cdef inline object PyArray_MultiIterNew1(a): */ typedef npy_cdouble __pyx_t_5numpy_complex_t; struct __pyx_opt_args_6pandas_7msgpack_6Packer__pack; struct __pyx_opt_args_6pandas_7msgpack_8Unpacker__unpack; /* "pandas/msgpack.pyx":163 * @cython.boundscheck(False) * @cython.wraparound(False) * cdef int _pack(self, object o, int nest_limit=DEFAULT_RECURSE_LIMIT) except -1: # <<<<<<<<<<<<<< * cdef long long llval * cdef unsigned long long ullval */ struct __pyx_opt_args_6pandas_7msgpack_6Packer__pack { int __pyx_n; int nest_limit; }; /* "pandas/msgpack.pyx":585 * self.file_like = None * * cdef object _unpack(self, execute_fn execute, object write_bytes, bint iter=0): # <<<<<<<<<<<<<< * cdef int ret * cdef object obj */ struct __pyx_opt_args_6pandas_7msgpack_8Unpacker__unpack { int __pyx_n; int iter; }; /* "pandas/msgpack.pyx":421 * * * cdef class Unpacker(object): # <<<<<<<<<<<<<< * """ * Streaming unpacker. */ struct __pyx_obj_6pandas_7msgpack_Unpacker { PyObject_HEAD struct __pyx_vtabstruct_6pandas_7msgpack_Unpacker *__pyx_vtab; template_context ctx; char *buf; size_t buf_size; size_t buf_head; size_t buf_tail; PyObject *file_like; PyObject *file_like_read; Py_ssize_t read_size; PyObject *object_hook; PyObject *encoding; PyObject *unicode_errors; size_t max_buffer_size; }; /* "pandas/msgpack.pyx":99 * * * cdef class Packer(object): # <<<<<<<<<<<<<< * """MessagePack Packer * */ struct __pyx_obj_6pandas_7msgpack_Packer { PyObject_HEAD struct __pyx_vtabstruct_6pandas_7msgpack_Packer *__pyx_vtab; struct msgpack_packer pk; PyObject *_default; PyObject *_bencoding; PyObject *_berrors; char *encoding; char *unicode_errors; PyBoolObject *use_float; int autoreset; }; struct __pyx_vtabstruct_6pandas_7msgpack_Packer { int (*_pack)(struct __pyx_obj_6pandas_7msgpack_Packer *, PyObject *, struct __pyx_opt_args_6pandas_7msgpack_6Packer__pack *__pyx_optional_args); PyObject *(*pack)(struct __pyx_obj_6pandas_7msgpack_Packer *, PyObject *, int __pyx_skip_dispatch); PyObject *(*pack_pair)(struct __pyx_obj_6pandas_7msgpack_Packer *, PyObject *, PyObject *, int); }; static struct __pyx_vtabstruct_6pandas_7msgpack_Packer *__pyx_vtabptr_6pandas_7msgpack_Packer; static CYTHON_INLINE PyObject *__pyx_f_6pandas_7msgpack_6Packer_pack_pair(struct __pyx_obj_6pandas_7msgpack_Packer *, PyObject *, PyObject *, int); /* "pandas/msgpack.pyx":421 * * * cdef class Unpacker(object): # <<<<<<<<<<<<<< * """ * Streaming unpacker. */ struct __pyx_vtabstruct_6pandas_7msgpack_Unpacker { PyObject *(*append_buffer)(struct __pyx_obj_6pandas_7msgpack_Unpacker *, void *, Py_ssize_t); PyObject *(*read_from_file)(struct __pyx_obj_6pandas_7msgpack_Unpacker *); PyObject *(*_unpack)(struct __pyx_obj_6pandas_7msgpack_Unpacker *, execute_fn, PyObject *, struct __pyx_opt_args_6pandas_7msgpack_8Unpacker__unpack *__pyx_optional_args); }; static struct __pyx_vtabstruct_6pandas_7msgpack_Unpacker *__pyx_vtabptr_6pandas_7msgpack_Unpacker; #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); /*proto*/ #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 /* CYTHON_REFNANNY */ #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) #if CYTHON_COMPILING_IN_CPYTHON static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name) { PyTypeObject* tp = Py_TYPE(obj); if (likely(tp->tp_getattro)) return tp->tp_getattro(obj, attr_name); #if PY_MAJOR_VERSION < 3 if (likely(tp->tp_getattr)) return tp->tp_getattr(obj, PyString_AS_STRING(attr_name)); #endif return PyObject_GetAttr(obj, attr_name); } #else #define __Pyx_PyObject_GetAttrStr(o,n) PyObject_GetAttr(o,n) #endif static PyObject *__Pyx_GetBuiltinName(PyObject *name); /*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); /*proto*/ static void __Pyx_RaiseDoubleKeywordsError(const char* func_name, PyObject* kw_name); /*proto*/ static int __Pyx_ParseOptionalKeywords(PyObject *kwds, PyObject **argnames[], \ PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args, \ const char* function_name); /*proto*/ #if CYTHON_COMPILING_IN_CPYTHON #define __Pyx_PyObject_DelAttrStr(o,n) __Pyx_PyObject_SetAttrStr(o,n,NULL) static CYTHON_INLINE int __Pyx_PyObject_SetAttrStr(PyObject* obj, PyObject* attr_name, PyObject* value) { PyTypeObject* tp = Py_TYPE(obj); if (likely(tp->tp_setattro)) return tp->tp_setattro(obj, attr_name, value); #if PY_MAJOR_VERSION < 3 if (likely(tp->tp_setattr)) return tp->tp_setattr(obj, PyString_AS_STRING(attr_name), value); #endif return PyObject_SetAttr(obj, attr_name, value); } #else #define __Pyx_PyObject_DelAttrStr(o,n) PyObject_DelAttr(o,n) #define __Pyx_PyObject_SetAttrStr(o,n,v) PyObject_SetAttr(o,n,v) #endif static CYTHON_INLINE int __Pyx_CheckKeywordStrings(PyObject *kwdict, const char* function_name, int kw_allowed); /*proto*/ static CYTHON_INLINE void __Pyx_ErrRestore(PyObject *type, PyObject *value, PyObject *tb); /*proto*/ static CYTHON_INLINE void __Pyx_ErrFetch(PyObject **type, PyObject **value, PyObject **tb); /*proto*/ static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause); /*proto*/ static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type); /*proto*/ static CYTHON_INLINE PyObject *__Pyx_GetModuleGlobalName(PyObject *name); /*proto*/ static CYTHON_INLINE int __Pyx_IterFinish(void); /*proto*/ static PyObject* __Pyx_PyObject_CallMethodTuple(PyObject* obj, PyObject* method_name, PyObject* args) { PyObject *method, *result = NULL; if (unlikely(!args)) return NULL; method = __Pyx_PyObject_GetAttrStr(obj, method_name); if (unlikely(!method)) goto bad; result = PyObject_Call(method, args, NULL); Py_DECREF(method); bad: Py_DECREF(args); return result; } #define __Pyx_PyObject_CallMethod3(obj, name, arg1, arg2, arg3) \ __Pyx_PyObject_CallMethodTuple(obj, name, PyTuple_Pack(3, arg1, arg2, arg3)) #define __Pyx_PyObject_CallMethod2(obj, name, arg1, arg2) \ __Pyx_PyObject_CallMethodTuple(obj, name, PyTuple_Pack(2, arg1, arg2)) #define __Pyx_PyObject_CallMethod1(obj, name, arg1) \ __Pyx_PyObject_CallMethodTuple(obj, name, PyTuple_Pack(1, arg1)) #define __Pyx_PyObject_CallMethod0(obj, name) \ __Pyx_PyObject_CallMethodTuple(obj, name, (Py_INCREF(__pyx_empty_tuple), __pyx_empty_tuple)) static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected); static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected); /*proto*/ static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index); static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void); static void __Pyx_UnpackTupleError(PyObject *, Py_ssize_t index); /*proto*/ static CYTHON_INLINE int __Pyx_unpack_tuple2(PyObject* tuple, PyObject** value1, PyObject** value2, int is_tuple, int has_known_size, int decref_tuple); static CYTHON_INLINE PyObject* __Pyx_dict_iterator(PyObject* dict, int is_dict, PyObject* method_name, Py_ssize_t* p_orig_length, int* p_is_dict); static CYTHON_INLINE int __Pyx_dict_iter_next(PyObject* dict_or_iter, Py_ssize_t orig_length, Py_ssize_t* ppos, PyObject** pkey, PyObject** pvalue, PyObject** pitem, int is_dict); static int __Pyx_SetVtable(PyObject *dict, void *vtable); /*proto*/ #define __Pyx_CyFunction_USED 1 #include #define __Pyx_CYFUNCTION_STATICMETHOD 0x01 #define __Pyx_CYFUNCTION_CLASSMETHOD 0x02 #define __Pyx_CYFUNCTION_CCLASS 0x04 #define __Pyx_CyFunction_GetClosure(f) \ (((__pyx_CyFunctionObject *) (f))->func_closure) #define __Pyx_CyFunction_GetClassObj(f) \ (((__pyx_CyFunctionObject *) (f))->func_classobj) #define __Pyx_CyFunction_Defaults(type, f) \ ((type *)(((__pyx_CyFunctionObject *) (f))->defaults)) #define __Pyx_CyFunction_SetDefaultsGetter(f, g) \ ((__pyx_CyFunctionObject *) (f))->defaults_getter = (g) typedef struct { PyCFunctionObject func; int flags; PyObject *func_dict; PyObject *func_weakreflist; PyObject *func_name; PyObject *func_qualname; PyObject *func_doc; PyObject *func_code; PyObject *func_closure; PyObject *func_classobj; /* No-args super() class cell */ void *defaults; int defaults_pyobjects; PyObject *defaults_tuple; /* Const defaults tuple */ PyObject *defaults_kwdict; /* Const kwonly defaults dict */ PyObject *(*defaults_getter)(PyObject *); PyObject *func_annotations; /* function annotations dict */ } __pyx_CyFunctionObject; static PyTypeObject *__pyx_CyFunctionType = 0; #define __Pyx_CyFunction_NewEx(ml, flags, qualname, self, module, code) \ __Pyx_CyFunction_New(__pyx_CyFunctionType, ml, flags, qualname, self, module, code) static PyObject *__Pyx_CyFunction_New(PyTypeObject *, PyMethodDef *ml, int flags, PyObject* qualname, PyObject *self, PyObject *module, PyObject* code); static CYTHON_INLINE void *__Pyx_CyFunction_InitDefaults(PyObject *m, size_t size, int pyobjects); static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *m, PyObject *tuple); static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *m, PyObject *dict); static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *m, PyObject *dict); static int __Pyx_CyFunction_init(void); static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level); /*proto*/ static PyObject *__Pyx_FindPy2Metaclass(PyObject *bases); /*proto*/ static PyObject *__Pyx_CreateClass(PyObject *bases, PyObject *dict, PyObject *name, PyObject *qualname, PyObject *modname); /*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(_WIN32) && defined(__cplusplus) && CYTHON_CCOMPLEX #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 static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float, float); #if CYTHON_CCOMPLEX #define __Pyx_c_eqf(a, b) ((a)==(b)) #define __Pyx_c_sumf(a, b) ((a)+(b)) #define __Pyx_c_difff(a, b) ((a)-(b)) #define __Pyx_c_prodf(a, b) ((a)*(b)) #define __Pyx_c_quotf(a, b) ((a)/(b)) #define __Pyx_c_negf(a) (-(a)) #ifdef __cplusplus #define __Pyx_c_is_zerof(z) ((z)==(float)0) #define __Pyx_c_conjf(z) (::std::conj(z)) #if 1 #define __Pyx_c_absf(z) (::std::abs(z)) #define __Pyx_c_powf(a, b) (::std::pow(a, b)) #endif #else #define __Pyx_c_is_zerof(z) ((z)==0) #define __Pyx_c_conjf(z) (conjf(z)) #if 1 #define __Pyx_c_absf(z) (cabsf(z)) #define __Pyx_c_powf(a, b) (cpowf(a, b)) #endif #endif #else static CYTHON_INLINE int __Pyx_c_eqf(__pyx_t_float_complex, __pyx_t_float_complex); static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_sumf(__pyx_t_float_complex, __pyx_t_float_complex); static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_difff(__pyx_t_float_complex, __pyx_t_float_complex); static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_prodf(__pyx_t_float_complex, __pyx_t_float_complex); static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_quotf(__pyx_t_float_complex, __pyx_t_float_complex); static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_negf(__pyx_t_float_complex); static CYTHON_INLINE int __Pyx_c_is_zerof(__pyx_t_float_complex); static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_conjf(__pyx_t_float_complex); #if 1 static CYTHON_INLINE float __Pyx_c_absf(__pyx_t_float_complex); static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_powf(__pyx_t_float_complex, __pyx_t_float_complex); #endif #endif static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double, double); #if CYTHON_CCOMPLEX #define __Pyx_c_eq(a, b) ((a)==(b)) #define __Pyx_c_sum(a, b) ((a)+(b)) #define __Pyx_c_diff(a, b) ((a)-(b)) #define __Pyx_c_prod(a, b) ((a)*(b)) #define __Pyx_c_quot(a, b) ((a)/(b)) #define __Pyx_c_neg(a) (-(a)) #ifdef __cplusplus #define __Pyx_c_is_zero(z) ((z)==(double)0) #define __Pyx_c_conj(z) (::std::conj(z)) #if 1 #define __Pyx_c_abs(z) (::std::abs(z)) #define __Pyx_c_pow(a, b) (::std::pow(a, b)) #endif #else #define __Pyx_c_is_zero(z) ((z)==0) #define __Pyx_c_conj(z) (conj(z)) #if 1 #define __Pyx_c_abs(z) (cabs(z)) #define __Pyx_c_pow(a, b) (cpow(a, b)) #endif #endif #else static CYTHON_INLINE int __Pyx_c_eq(__pyx_t_double_complex, __pyx_t_double_complex); static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_sum(__pyx_t_double_complex, __pyx_t_double_complex); static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_diff(__pyx_t_double_complex, __pyx_t_double_complex); static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_prod(__pyx_t_double_complex, __pyx_t_double_complex); static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_quot(__pyx_t_double_complex, __pyx_t_double_complex); static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_neg(__pyx_t_double_complex); static CYTHON_INLINE int __Pyx_c_is_zero(__pyx_t_double_complex); static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_conj(__pyx_t_double_complex); #if 1 static CYTHON_INLINE double __Pyx_c_abs(__pyx_t_double_complex); static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_pow(__pyx_t_double_complex, __pyx_t_double_complex); #endif #endif static CYTHON_INLINE unsigned char __Pyx_PyInt_AsUnsignedChar(PyObject *); static CYTHON_INLINE unsigned short __Pyx_PyInt_AsUnsignedShort(PyObject *); static CYTHON_INLINE unsigned int __Pyx_PyInt_AsUnsignedInt(PyObject *); static CYTHON_INLINE char __Pyx_PyInt_AsChar(PyObject *); static CYTHON_INLINE short __Pyx_PyInt_AsShort(PyObject *); static CYTHON_INLINE int __Pyx_PyInt_AsInt(PyObject *); static CYTHON_INLINE signed char __Pyx_PyInt_AsSignedChar(PyObject *); static CYTHON_INLINE signed short __Pyx_PyInt_AsSignedShort(PyObject *); static CYTHON_INLINE signed int __Pyx_PyInt_AsSignedInt(PyObject *); static CYTHON_INLINE int __Pyx_PyInt_AsLongDouble(PyObject *); static CYTHON_INLINE unsigned long __Pyx_PyInt_AsUnsignedLong(PyObject *); static CYTHON_INLINE unsigned PY_LONG_LONG __Pyx_PyInt_AsUnsignedLongLong(PyObject *); static CYTHON_INLINE long __Pyx_PyInt_AsLong(PyObject *); static CYTHON_INLINE PY_LONG_LONG __Pyx_PyInt_AsLongLong(PyObject *); static CYTHON_INLINE signed long __Pyx_PyInt_AsSignedLong(PyObject *); static CYTHON_INLINE signed PY_LONG_LONG __Pyx_PyInt_AsSignedLongLong(PyObject *); static int __Pyx_check_binary_version(void); #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 static PyObject *__Pyx_ImportModule(const char *name); /*proto*/ static PyTypeObject *__Pyx_ImportType(const char *module_name, const char *class_name, size_t size, int strict); /*proto*/ typedef struct { int code_line; PyCodeObject* code_object; } __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); static void __Pyx_AddTraceback(const char *funcname, int c_line, int py_line, const char *filename); /*proto*/ static int __Pyx_InitStrings(__Pyx_StringTabEntry *t); /*proto*/ /* Module declarations from 'cpython.version' */ /* Module declarations from 'cpython.ref' */ /* Module declarations from 'cpython.exc' */ /* Module declarations from 'cpython.module' */ /* Module declarations from 'cpython.mem' */ /* Module declarations from 'cpython.tuple' */ /* Module declarations from 'cpython.list' */ /* Module declarations from 'libc.string' */ /* Module declarations from 'libc.stdio' */ /* Module declarations from 'cpython.object' */ /* Module declarations from 'cpython.sequence' */ /* Module declarations from 'cpython.mapping' */ /* Module declarations from 'cpython.iterator' */ /* Module declarations from '__builtin__' */ /* Module declarations from 'cpython.type' */ static PyTypeObject *__pyx_ptype_7cpython_4type_type = 0; /* Module declarations from 'cpython.number' */ /* Module declarations from 'cpython.int' */ /* Module declarations from '__builtin__' */ /* Module declarations from 'cpython.bool' */ static PyTypeObject *__pyx_ptype_7cpython_4bool_bool = 0; /* Module declarations from 'cpython.long' */ /* Module declarations from 'cpython.float' */ /* Module declarations from '__builtin__' */ /* Module declarations from 'cpython.complex' */ static PyTypeObject *__pyx_ptype_7cpython_7complex_complex = 0; /* Module declarations from 'cpython.string' */ /* Module declarations from 'cpython.unicode' */ /* Module declarations from 'cpython.dict' */ /* Module declarations from 'cpython.instance' */ /* Module declarations from 'cpython.function' */ /* Module declarations from 'cpython.method' */ /* Module declarations from 'cpython.weakref' */ /* Module declarations from 'cpython.getargs' */ /* Module declarations from 'cpython.pythread' */ /* Module declarations from 'cpython.pystate' */ /* Module declarations from 'cpython.cobject' */ /* Module declarations from 'cpython.oldbuffer' */ /* Module declarations from 'cpython.set' */ /* Module declarations from 'cpython.buffer' */ /* Module declarations from 'cpython.bytes' */ /* Module declarations from 'cpython.pycapsule' */ /* Module declarations from 'cpython' */ /* Module declarations from 'libc.stdlib' */ /* Module declarations from 'libc.limits' */ /* Module declarations from 'cython' */ /* 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*/ /* Module declarations from 'pandas.msgpack' */ static PyTypeObject *__pyx_ptype_6pandas_7msgpack_Unpacker = 0; static PyTypeObject *__pyx_ptype_6pandas_7msgpack_Packer = 0; static int __pyx_v_6pandas_7msgpack_DEFAULT_RECURSE_LIMIT; static CYTHON_INLINE PyObject *__pyx_f_6pandas_7msgpack_init_ctx(template_context *, PyObject *, PyObject *, PyObject *, int, char *, char *); /*proto*/ #define __Pyx_MODULE_NAME "pandas.msgpack" int __pyx_module_is_main_pandas__msgpack = 0; /* Implementation of 'pandas.msgpack' */ static PyObject *__pyx_builtin_IOError; static PyObject *__pyx_builtin_ValueError; static PyObject *__pyx_builtin_MemoryError; static PyObject *__pyx_builtin_TypeError; static PyObject *__pyx_builtin_StopIteration; static PyObject *__pyx_builtin_range; static PyObject *__pyx_builtin_RuntimeError; static PyObject *__pyx_pf_6pandas_7msgpack_9ExtraData___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_unpacked, PyObject *__pyx_v_extra); /* proto */ static PyObject *__pyx_pf_6pandas_7msgpack_9ExtraData_2__str__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self); /* proto */ static int __pyx_pf_6pandas_7msgpack_6Packer___cinit__(struct __pyx_obj_6pandas_7msgpack_Packer *__pyx_v_self); /* proto */ static int __pyx_pf_6pandas_7msgpack_6Packer_2__init__(struct __pyx_obj_6pandas_7msgpack_Packer *__pyx_v_self, PyObject *__pyx_v_default, PyObject *__pyx_v_encoding, PyObject *__pyx_v_unicode_errors, PyObject *__pyx_v_use_single_float, int __pyx_v_autoreset); /* proto */ static void __pyx_pf_6pandas_7msgpack_6Packer_4__dealloc__(struct __pyx_obj_6pandas_7msgpack_Packer *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_7msgpack_6Packer_6pack(struct __pyx_obj_6pandas_7msgpack_Packer *__pyx_v_self, PyObject *__pyx_v_obj); /* proto */ static PyObject *__pyx_pf_6pandas_7msgpack_6Packer_8pack_array_header(struct __pyx_obj_6pandas_7msgpack_Packer *__pyx_v_self, size_t __pyx_v_size); /* proto */ static PyObject *__pyx_pf_6pandas_7msgpack_6Packer_10pack_map_header(struct __pyx_obj_6pandas_7msgpack_Packer *__pyx_v_self, size_t __pyx_v_size); /* proto */ static PyObject *__pyx_pf_6pandas_7msgpack_6Packer_12pack_map_pairs(struct __pyx_obj_6pandas_7msgpack_Packer *__pyx_v_self, PyObject *__pyx_v_pairs); /* proto */ static PyObject *__pyx_pf_6pandas_7msgpack_6Packer_14reset(struct __pyx_obj_6pandas_7msgpack_Packer *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_7msgpack_6Packer_16bytes(struct __pyx_obj_6pandas_7msgpack_Packer *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_7msgpack_pack(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_o, PyObject *__pyx_v_stream, PyObject *__pyx_v_default, PyObject *__pyx_v_encoding, PyObject *__pyx_v_unicode_errors); /* proto */ static PyObject *__pyx_pf_6pandas_7msgpack_2packb(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_o, PyObject *__pyx_v_default, PyObject *__pyx_v_encoding, PyObject *__pyx_v_unicode_errors, PyObject *__pyx_v_use_single_float); /* proto */ static PyObject *__pyx_pf_6pandas_7msgpack_4unpackb(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_packed, PyObject *__pyx_v_object_hook, PyObject *__pyx_v_list_hook, int __pyx_v_use_list, PyObject *__pyx_v_encoding, PyObject *__pyx_v_unicode_errors, PyObject *__pyx_v_object_pairs_hook); /* proto */ static PyObject *__pyx_pf_6pandas_7msgpack_6unpack(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_stream, PyObject *__pyx_v_object_hook, PyObject *__pyx_v_list_hook, int __pyx_v_use_list, PyObject *__pyx_v_encoding, PyObject *__pyx_v_unicode_errors, PyObject *__pyx_v_object_pairs_hook); /* proto */ static int __pyx_pf_6pandas_7msgpack_8Unpacker___cinit__(struct __pyx_obj_6pandas_7msgpack_Unpacker *__pyx_v_self); /* proto */ static void __pyx_pf_6pandas_7msgpack_8Unpacker_2__dealloc__(struct __pyx_obj_6pandas_7msgpack_Unpacker *__pyx_v_self); /* proto */ static int __pyx_pf_6pandas_7msgpack_8Unpacker_4__init__(struct __pyx_obj_6pandas_7msgpack_Unpacker *__pyx_v_self, PyObject *__pyx_v_file_like, Py_ssize_t __pyx_v_read_size, int __pyx_v_use_list, PyObject *__pyx_v_object_hook, PyObject *__pyx_v_object_pairs_hook, PyObject *__pyx_v_list_hook, PyObject *__pyx_v_encoding, PyObject *__pyx_v_unicode_errors, int __pyx_v_max_buffer_size); /* proto */ static PyObject *__pyx_pf_6pandas_7msgpack_8Unpacker_6feed(struct __pyx_obj_6pandas_7msgpack_Unpacker *__pyx_v_self, PyObject *__pyx_v_next_bytes); /* proto */ static PyObject *__pyx_pf_6pandas_7msgpack_8Unpacker_8read_bytes(struct __pyx_obj_6pandas_7msgpack_Unpacker *__pyx_v_self, Py_ssize_t __pyx_v_nbytes); /* proto */ static PyObject *__pyx_pf_6pandas_7msgpack_8Unpacker_10unpack(struct __pyx_obj_6pandas_7msgpack_Unpacker *__pyx_v_self, PyObject *__pyx_v_write_bytes); /* proto */ static PyObject *__pyx_pf_6pandas_7msgpack_8Unpacker_12skip(struct __pyx_obj_6pandas_7msgpack_Unpacker *__pyx_v_self, PyObject *__pyx_v_write_bytes); /* proto */ static PyObject *__pyx_pf_6pandas_7msgpack_8Unpacker_14read_array_header(struct __pyx_obj_6pandas_7msgpack_Unpacker *__pyx_v_self, PyObject *__pyx_v_write_bytes); /* proto */ static PyObject *__pyx_pf_6pandas_7msgpack_8Unpacker_16read_map_header(struct __pyx_obj_6pandas_7msgpack_Unpacker *__pyx_v_self, PyObject *__pyx_v_write_bytes); /* proto */ static PyObject *__pyx_pf_6pandas_7msgpack_8Unpacker_18__iter__(struct __pyx_obj_6pandas_7msgpack_Unpacker *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_7msgpack_8Unpacker_20__next__(struct __pyx_obj_6pandas_7msgpack_Unpacker *__pyx_v_self); /* 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_7msgpack_Unpacker(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_6pandas_7msgpack_Packer(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static char __pyx_k_1[] = "unpack(b) recieved extra data."; static char __pyx_k_2[] = "Unable to allocate internal buffer."; static char __pyx_k_4[] = "utf-8"; static char __pyx_k_6[] = "default must be a callable."; static char __pyx_k_11[] = "recursion limit exceeded."; static char __pyx_k_13[] = "Can't encode unicode string: no encoding is specified"; static char __pyx_k_15[] = "can't serialize %r"; static char __pyx_k_16[] = "cannot pack : %s"; static char __pyx_k_18[] = "object_pairs_hook and object_hook are mutually exclusive."; static char __pyx_k_20[] = "object_hook must be a callable."; static char __pyx_k_22[] = "object_pairs_hook must be a callable."; static char __pyx_k_24[] = "list_hook must be a callable."; static char __pyx_k_28[] = "Unpack failed: error = %d"; static char __pyx_k_29[] = "`file_like.read` must be a callable."; static char __pyx_k_31[] = "read_size should be less or equal to max_buffer_size"; static char __pyx_k_36[] = "unpacker.feed() is not be able to use with `file_like`."; static char __pyx_k_38[] = "Unable to enlarge internal buffer."; static char __pyx_k_40[] = "No more data to unpack."; static char __pyx_k_43[] = "ndarray is not C contiguous"; static char __pyx_k_45[] = "ndarray is not Fortran contiguous"; static char __pyx_k_47[] = "Non-native byte order not supported"; static char __pyx_k_49[] = "unknown dtype code in numpy.pxd (%d)"; static char __pyx_k_50[] = "Format string allocated too short, see comment in numpy.pxd"; static char __pyx_k_53[] = "Format string allocated too short."; static char __pyx_k_55[] = "pandas.msgpack"; static char __pyx_k_58[] = "/home/yoh/deb/gits/pkg-exppsy/pandas/pandas/msgpack.pyx"; static char __pyx_k_59[] = "ExtraData.__init__"; static char __pyx_k_62[] = "ExtraData.__str__"; static char __pyx_k__B[] = "B"; static char __pyx_k__H[] = "H"; static char __pyx_k__I[] = "I"; static char __pyx_k__L[] = "L"; static char __pyx_k__O[] = "O"; static char __pyx_k__Q[] = "Q"; static char __pyx_k__b[] = "b"; static char __pyx_k__d[] = "d"; static char __pyx_k__f[] = "f"; static char __pyx_k__g[] = "g"; static char __pyx_k__h[] = "h"; static char __pyx_k__i[] = "i"; static char __pyx_k__l[] = "l"; static char __pyx_k__o[] = "o"; static char __pyx_k__q[] = "q"; static char __pyx_k__Zd[] = "Zd"; static char __pyx_k__Zf[] = "Zf"; static char __pyx_k__Zg[] = "Zg"; static char __pyx_k__np[] = "np"; static char __pyx_k__buf[] = "buf"; static char __pyx_k__ctx[] = "ctx"; static char __pyx_k__obj[] = "obj"; static char __pyx_k__off[] = "off"; static char __pyx_k__ret[] = "ret"; static char __pyx_k__cenc[] = "cenc"; static char __pyx_k__cerr[] = "cerr"; static char __pyx_k__pack[] = "pack"; static char __pyx_k__read[] = "read"; static char __pyx_k__self[] = "self"; static char __pyx_k__ascii[] = "ascii"; static char __pyx_k__extra[] = "extra"; static char __pyx_k__items[] = "items"; static char __pyx_k__numpy[] = "numpy"; static char __pyx_k__packb[] = "packb"; static char __pyx_k__range[] = "range"; static char __pyx_k__write[] = "write"; static char __pyx_k__encode[] = "encode"; static char __pyx_k__packed[] = "packed"; static char __pyx_k__packer[] = "packer"; static char __pyx_k__stream[] = "stream"; static char __pyx_k__strict[] = "strict"; static char __pyx_k__unpack[] = "unpack"; static char __pyx_k__IOError[] = "IOError"; static char __pyx_k____str__[] = "__str__"; static char __pyx_k__buf_len[] = "buf_len"; static char __pyx_k__default[] = "default"; static char __pyx_k__unpackb[] = "unpackb"; static char __pyx_k____init__[] = "__init__"; static char __pyx_k____main__[] = "__main__"; static char __pyx_k____test__[] = "__test__"; static char __pyx_k__encoding[] = "encoding"; static char __pyx_k__unpacked[] = "unpacked"; static char __pyx_k__use_list[] = "use_list"; static char __pyx_k__ExtraData[] = "ExtraData"; static char __pyx_k__OutOfData[] = "OutOfData"; static char __pyx_k__TypeError[] = "TypeError"; static char __pyx_k____class__[] = "__class__"; static char __pyx_k__autoreset[] = "autoreset"; static char __pyx_k__file_like[] = "file_like"; static char __pyx_k__iteritems[] = "iteritems"; static char __pyx_k__list_hook[] = "list_hook"; static char __pyx_k__read_size[] = "read_size"; static char __pyx_k__BufferFull[] = "BufferFull"; static char __pyx_k__ValueError[] = "ValueError"; static char __pyx_k____import__[] = "__import__"; static char __pyx_k____module__[] = "__module__"; static char __pyx_k__MemoryError[] = "MemoryError"; static char __pyx_k__object_hook[] = "object_hook"; static char __pyx_k__write_bytes[] = "write_bytes"; static char __pyx_k__RuntimeError[] = "RuntimeError"; static char __pyx_k____qualname__[] = "__qualname__"; static char __pyx_k__PackException[] = "PackException"; static char __pyx_k__StopIteration[] = "StopIteration"; static char __pyx_k____metaclass__[] = "__metaclass__"; static char __pyx_k__PackValueError[] = "PackValueError"; static char __pyx_k____pyx_vtable__[] = "__pyx_vtable__"; static char __pyx_k__unicode_errors[] = "unicode_errors"; static char __pyx_k__UnpackException[] = "UnpackException"; static char __pyx_k__max_buffer_size[] = "max_buffer_size"; static char __pyx_k__UnpackValueError[] = "UnpackValueError"; static char __pyx_k__use_single_float[] = "use_single_float"; static char __pyx_k__object_pairs_hook[] = "object_pairs_hook"; static PyObject *__pyx_kp_s_1; static PyObject *__pyx_kp_s_11; static PyObject *__pyx_kp_s_13; static PyObject *__pyx_kp_s_15; static PyObject *__pyx_kp_s_16; static PyObject *__pyx_kp_s_18; static PyObject *__pyx_kp_s_2; static PyObject *__pyx_kp_s_20; static PyObject *__pyx_kp_s_22; static PyObject *__pyx_kp_s_24; static PyObject *__pyx_kp_s_28; static PyObject *__pyx_kp_s_29; static PyObject *__pyx_kp_s_31; static PyObject *__pyx_kp_s_36; static PyObject *__pyx_kp_s_38; static PyObject *__pyx_kp_s_4; static PyObject *__pyx_kp_s_40; static PyObject *__pyx_kp_u_43; static PyObject *__pyx_kp_u_45; static PyObject *__pyx_kp_u_47; static PyObject *__pyx_kp_u_49; static PyObject *__pyx_kp_u_50; static PyObject *__pyx_kp_u_53; static PyObject *__pyx_n_s_55; static PyObject *__pyx_kp_s_58; static PyObject *__pyx_n_s_59; static PyObject *__pyx_kp_s_6; static PyObject *__pyx_n_s_62; static PyObject *__pyx_n_s__BufferFull; static PyObject *__pyx_n_s__ExtraData; static PyObject *__pyx_n_s__IOError; static PyObject *__pyx_n_s__MemoryError; static PyObject *__pyx_n_s__OutOfData; static PyObject *__pyx_n_s__PackException; static PyObject *__pyx_n_s__PackValueError; static PyObject *__pyx_n_s__RuntimeError; static PyObject *__pyx_n_s__StopIteration; static PyObject *__pyx_n_s__TypeError; static PyObject *__pyx_n_s__UnpackException; static PyObject *__pyx_n_s__UnpackValueError; static PyObject *__pyx_n_s__ValueError; static PyObject *__pyx_n_s____class__; static PyObject *__pyx_n_s____import__; static PyObject *__pyx_n_s____init__; static PyObject *__pyx_n_s____main__; static PyObject *__pyx_n_s____metaclass__; static PyObject *__pyx_n_s____module__; static PyObject *__pyx_n_s____pyx_vtable__; static PyObject *__pyx_n_s____qualname__; static PyObject *__pyx_n_s____str__; static PyObject *__pyx_n_s____test__; static PyObject *__pyx_n_s__ascii; static PyObject *__pyx_n_s__autoreset; static PyObject *__pyx_n_s__buf; static PyObject *__pyx_n_s__buf_len; static PyObject *__pyx_n_s__cenc; static PyObject *__pyx_n_s__cerr; static PyObject *__pyx_n_s__ctx; static PyObject *__pyx_n_s__default; static PyObject *__pyx_n_s__encode; static PyObject *__pyx_n_s__encoding; static PyObject *__pyx_n_s__extra; static PyObject *__pyx_n_s__file_like; static PyObject *__pyx_n_s__items; static PyObject *__pyx_n_s__iteritems; static PyObject *__pyx_n_s__list_hook; static PyObject *__pyx_n_s__max_buffer_size; static PyObject *__pyx_n_s__np; static PyObject *__pyx_n_s__numpy; static PyObject *__pyx_n_s__o; static PyObject *__pyx_n_s__obj; static PyObject *__pyx_n_s__object_hook; static PyObject *__pyx_n_s__object_pairs_hook; static PyObject *__pyx_n_s__off; static PyObject *__pyx_n_s__pack; static PyObject *__pyx_n_s__packb; static PyObject *__pyx_n_s__packed; static PyObject *__pyx_n_s__packer; static PyObject *__pyx_n_s__range; static PyObject *__pyx_n_s__read; static PyObject *__pyx_n_s__read_size; static PyObject *__pyx_n_s__ret; static PyObject *__pyx_n_s__self; static PyObject *__pyx_n_s__stream; static PyObject *__pyx_n_s__strict; static PyObject *__pyx_n_s__unicode_errors; static PyObject *__pyx_n_s__unpack; static PyObject *__pyx_n_s__unpackb; static PyObject *__pyx_n_s__unpacked; static PyObject *__pyx_n_s__use_list; static PyObject *__pyx_n_s__use_single_float; static PyObject *__pyx_n_s__write; static PyObject *__pyx_n_s__write_bytes; static PyObject *__pyx_int_0; static PyObject *__pyx_int_15; static PyObject *__pyx_k_5; static int __pyx_k_10; static PyObject *__pyx_k_17; static PyObject *__pyx_k_tuple_3; static PyObject *__pyx_k_tuple_7; static PyObject *__pyx_k_tuple_8; static PyObject *__pyx_k_tuple_9; static PyObject *__pyx_k_tuple_12; static PyObject *__pyx_k_tuple_14; static PyObject *__pyx_k_tuple_19; static PyObject *__pyx_k_tuple_21; static PyObject *__pyx_k_tuple_23; static PyObject *__pyx_k_tuple_25; static PyObject *__pyx_k_tuple_26; static PyObject *__pyx_k_tuple_27; static PyObject *__pyx_k_tuple_30; static PyObject *__pyx_k_tuple_32; static PyObject *__pyx_k_tuple_33; static PyObject *__pyx_k_tuple_34; static PyObject *__pyx_k_tuple_35; static PyObject *__pyx_k_tuple_37; static PyObject *__pyx_k_tuple_39; static PyObject *__pyx_k_tuple_41; static PyObject *__pyx_k_tuple_42; static PyObject *__pyx_k_tuple_44; static PyObject *__pyx_k_tuple_46; static PyObject *__pyx_k_tuple_48; static PyObject *__pyx_k_tuple_51; static PyObject *__pyx_k_tuple_52; static PyObject *__pyx_k_tuple_54; static PyObject *__pyx_k_tuple_56; static PyObject *__pyx_k_tuple_60; static PyObject *__pyx_k_tuple_63; static PyObject *__pyx_k_tuple_65; static PyObject *__pyx_k_tuple_67; static PyObject *__pyx_k_tuple_69; static PyObject *__pyx_k_codeobj_57; static PyObject *__pyx_k_codeobj_61; static PyObject *__pyx_k_codeobj_64; static PyObject *__pyx_k_codeobj_66; static PyObject *__pyx_k_codeobj_68; static PyObject *__pyx_k_codeobj_70; /* Python wrapper */ static PyObject *__pyx_pw_6pandas_7msgpack_9ExtraData_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6pandas_7msgpack_9ExtraData___init__[] = "ExtraData.__init__(self, unpacked, extra)"; static PyMethodDef __pyx_mdef_6pandas_7msgpack_9ExtraData_1__init__ = {__Pyx_NAMESTR("__init__"), (PyCFunction)__pyx_pw_6pandas_7msgpack_9ExtraData_1__init__, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_7msgpack_9ExtraData___init__)}; static PyObject *__pyx_pw_6pandas_7msgpack_9ExtraData_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_self = 0; PyObject *__pyx_v_unpacked = 0; PyObject *__pyx_v_extra = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__self,&__pyx_n_s__unpacked,&__pyx_n_s__extra,0}; PyObject* values[3] = {0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__self)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__unpacked)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 37; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__extra)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 37; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 37; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 3) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); } __pyx_v_self = values[0]; __pyx_v_unpacked = values[1]; __pyx_v_extra = values[2]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 37; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.msgpack.ExtraData.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pandas_7msgpack_9ExtraData___init__(__pyx_self, __pyx_v_self, __pyx_v_unpacked, __pyx_v_extra); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/msgpack.pyx":37 * * class ExtraData(ValueError): * def __init__(self, unpacked, extra): # <<<<<<<<<<<<<< * self.unpacked = unpacked * self.extra = extra */ static PyObject *__pyx_pf_6pandas_7msgpack_9ExtraData___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_unpacked, PyObject *__pyx_v_extra) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__init__", 0); /* "pandas/msgpack.pyx":38 * class ExtraData(ValueError): * def __init__(self, unpacked, extra): * self.unpacked = unpacked # <<<<<<<<<<<<<< * self.extra = extra * */ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s__unpacked, __pyx_v_unpacked) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 38; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/msgpack.pyx":39 * def __init__(self, unpacked, extra): * self.unpacked = unpacked * self.extra = extra # <<<<<<<<<<<<<< * * def __str__(self): */ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s__extra, __pyx_v_extra) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 39; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("pandas.msgpack.ExtraData.__init__", __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_7msgpack_9ExtraData_3__str__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/ static char __pyx_doc_6pandas_7msgpack_9ExtraData_2__str__[] = "ExtraData.__str__(self)"; static PyMethodDef __pyx_mdef_6pandas_7msgpack_9ExtraData_3__str__ = {__Pyx_NAMESTR("__str__"), (PyCFunction)__pyx_pw_6pandas_7msgpack_9ExtraData_3__str__, METH_O, __Pyx_DOCSTR(__pyx_doc_6pandas_7msgpack_9ExtraData_2__str__)}; static PyObject *__pyx_pw_6pandas_7msgpack_9ExtraData_3__str__(PyObject *__pyx_self, PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__str__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_7msgpack_9ExtraData_2__str__(__pyx_self, ((PyObject *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/msgpack.pyx":41 * self.extra = extra * * def __str__(self): # <<<<<<<<<<<<<< * return "unpack(b) recieved extra data." * */ static PyObject *__pyx_pf_6pandas_7msgpack_9ExtraData_2__str__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__str__", 0); /* "pandas/msgpack.pyx":42 * * def __str__(self): * return "unpack(b) recieved extra data." # <<<<<<<<<<<<<< * * class PackException(IOError): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_kp_s_1)); __pyx_r = ((PyObject *)__pyx_kp_s_1); goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pandas_7msgpack_6Packer_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_pw_6pandas_7msgpack_6Packer_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return -1;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__cinit__", 0))) return -1; __pyx_r = __pyx_pf_6pandas_7msgpack_6Packer___cinit__(((struct __pyx_obj_6pandas_7msgpack_Packer *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/msgpack.pyx":127 * cdef bint autoreset * * def __cinit__(self): # <<<<<<<<<<<<<< * cdef int buf_size = 1024*1024 * self.pk.buf = malloc(buf_size); */ static int __pyx_pf_6pandas_7msgpack_6Packer___cinit__(struct __pyx_obj_6pandas_7msgpack_Packer *__pyx_v_self) { int __pyx_v_buf_size; int __pyx_r; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__cinit__", 0); /* "pandas/msgpack.pyx":128 * * def __cinit__(self): * cdef int buf_size = 1024*1024 # <<<<<<<<<<<<<< * self.pk.buf = malloc(buf_size); * if self.pk.buf == NULL: */ __pyx_v_buf_size = 1048576; /* "pandas/msgpack.pyx":129 * def __cinit__(self): * cdef int buf_size = 1024*1024 * self.pk.buf = malloc(buf_size); # <<<<<<<<<<<<<< * if self.pk.buf == NULL: * raise MemoryError("Unable to allocate internal buffer.") */ __pyx_v_self->pk.buf = ((char *)malloc(__pyx_v_buf_size)); /* "pandas/msgpack.pyx":130 * cdef int buf_size = 1024*1024 * self.pk.buf = malloc(buf_size); * if self.pk.buf == NULL: # <<<<<<<<<<<<<< * raise MemoryError("Unable to allocate internal buffer.") * self.pk.buf_size = buf_size */ __pyx_t_1 = ((__pyx_v_self->pk.buf == NULL) != 0); if (__pyx_t_1) { /* "pandas/msgpack.pyx":131 * self.pk.buf = malloc(buf_size); * if self.pk.buf == NULL: * raise MemoryError("Unable to allocate internal buffer.") # <<<<<<<<<<<<<< * self.pk.buf_size = buf_size * self.pk.length = 0 */ __pyx_t_2 = PyObject_Call(__pyx_builtin_MemoryError, ((PyObject *)__pyx_k_tuple_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 131; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 131; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L3; } __pyx_L3:; /* "pandas/msgpack.pyx":132 * if self.pk.buf == NULL: * raise MemoryError("Unable to allocate internal buffer.") * self.pk.buf_size = buf_size # <<<<<<<<<<<<<< * self.pk.length = 0 * */ __pyx_v_self->pk.buf_size = __pyx_v_buf_size; /* "pandas/msgpack.pyx":133 * raise MemoryError("Unable to allocate internal buffer.") * self.pk.buf_size = buf_size * self.pk.length = 0 # <<<<<<<<<<<<<< * * def __init__(self, default=None, encoding='utf-8', unicode_errors='strict', */ __pyx_v_self->pk.length = 0; __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("pandas.msgpack.Packer.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pandas_7msgpack_6Packer_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_pw_6pandas_7msgpack_6Packer_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_default = 0; PyObject *__pyx_v_encoding = 0; PyObject *__pyx_v_unicode_errors = 0; PyObject *__pyx_v_use_single_float = 0; int __pyx_v_autoreset; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__default,&__pyx_n_s__encoding,&__pyx_n_s__unicode_errors,&__pyx_n_s__use_single_float,&__pyx_n_s__autoreset,0}; PyObject* values[5] = {0,0,0,0,0}; /* "pandas/msgpack.pyx":135 * self.pk.length = 0 * * def __init__(self, default=None, encoding='utf-8', unicode_errors='strict', # <<<<<<<<<<<<<< * use_single_float=False, bint autoreset=1): * self.use_float = use_single_float */ values[0] = ((PyObject *)Py_None); values[1] = ((PyObject *)__pyx_kp_s_4); values[2] = ((PyObject *)__pyx_n_s__strict); values[3] = __pyx_k_5; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__default); if (value) { values[0] = value; kw_args--; } } case 1: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__encoding); if (value) { values[1] = value; kw_args--; } } case 2: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__unicode_errors); if (value) { values[2] = value; kw_args--; } } case 3: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__use_single_float); if (value) { values[3] = value; kw_args--; } } case 4: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__autoreset); if (value) { values[4] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 135; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_default = values[0]; __pyx_v_encoding = values[1]; __pyx_v_unicode_errors = values[2]; __pyx_v_use_single_float = values[3]; if (values[4]) { __pyx_v_autoreset = __Pyx_PyObject_IsTrue(values[4]); if (unlikely((__pyx_v_autoreset == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 136; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } else { __pyx_v_autoreset = ((int)1); } } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("__init__", 0, 0, 5, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 135; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.msgpack.Packer.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return -1; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pandas_7msgpack_6Packer_2__init__(((struct __pyx_obj_6pandas_7msgpack_Packer *)__pyx_v_self), __pyx_v_default, __pyx_v_encoding, __pyx_v_unicode_errors, __pyx_v_use_single_float, __pyx_v_autoreset); __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pandas_7msgpack_6Packer_2__init__(struct __pyx_obj_6pandas_7msgpack_Packer *__pyx_v_self, PyObject *__pyx_v_default, PyObject *__pyx_v_encoding, PyObject *__pyx_v_unicode_errors, PyObject *__pyx_v_use_single_float, int __pyx_v_autoreset) { int __pyx_r; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; char *__pyx_t_5; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__init__", 0); /* "pandas/msgpack.pyx":137 * def __init__(self, default=None, encoding='utf-8', unicode_errors='strict', * use_single_float=False, bint autoreset=1): * self.use_float = use_single_float # <<<<<<<<<<<<<< * self.autoreset = autoreset * if default is not None: */ if (!(likely(((__pyx_v_use_single_float) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_use_single_float, __pyx_ptype_7cpython_4bool_bool))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 137; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_INCREF(__pyx_v_use_single_float); __Pyx_GIVEREF(__pyx_v_use_single_float); __Pyx_GOTREF(__pyx_v_self->use_float); __Pyx_DECREF(((PyObject *)__pyx_v_self->use_float)); __pyx_v_self->use_float = ((PyBoolObject *)__pyx_v_use_single_float); /* "pandas/msgpack.pyx":138 * use_single_float=False, bint autoreset=1): * self.use_float = use_single_float * self.autoreset = autoreset # <<<<<<<<<<<<<< * if default is not None: * if not PyCallable_Check(default): */ __pyx_v_self->autoreset = __pyx_v_autoreset; /* "pandas/msgpack.pyx":139 * self.use_float = use_single_float * self.autoreset = autoreset * if default is not None: # <<<<<<<<<<<<<< * if not PyCallable_Check(default): * raise TypeError("default must be a callable.") */ __pyx_t_1 = (__pyx_v_default != Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { /* "pandas/msgpack.pyx":140 * self.autoreset = autoreset * if default is not None: * if not PyCallable_Check(default): # <<<<<<<<<<<<<< * raise TypeError("default must be a callable.") * self._default = default */ __pyx_t_2 = ((!(PyCallable_Check(__pyx_v_default) != 0)) != 0); if (__pyx_t_2) { /* "pandas/msgpack.pyx":141 * if default is not None: * if not PyCallable_Check(default): * raise TypeError("default must be a callable.") # <<<<<<<<<<<<<< * self._default = default * if encoding is None: */ __pyx_t_3 = PyObject_Call(__pyx_builtin_TypeError, ((PyObject *)__pyx_k_tuple_7), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 141; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 141; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L4; } __pyx_L4:; goto __pyx_L3; } __pyx_L3:; /* "pandas/msgpack.pyx":142 * if not PyCallable_Check(default): * raise TypeError("default must be a callable.") * self._default = default # <<<<<<<<<<<<<< * if encoding is None: * self.encoding = NULL */ __Pyx_INCREF(__pyx_v_default); __Pyx_GIVEREF(__pyx_v_default); __Pyx_GOTREF(__pyx_v_self->_default); __Pyx_DECREF(__pyx_v_self->_default); __pyx_v_self->_default = __pyx_v_default; /* "pandas/msgpack.pyx":143 * raise TypeError("default must be a callable.") * self._default = default * if encoding is None: # <<<<<<<<<<<<<< * self.encoding = NULL * self.unicode_errors = NULL */ __pyx_t_2 = (__pyx_v_encoding == Py_None); __pyx_t_1 = (__pyx_t_2 != 0); if (__pyx_t_1) { /* "pandas/msgpack.pyx":144 * self._default = default * if encoding is None: * self.encoding = NULL # <<<<<<<<<<<<<< * self.unicode_errors = NULL * else: */ __pyx_v_self->encoding = NULL; /* "pandas/msgpack.pyx":145 * if encoding is None: * self.encoding = NULL * self.unicode_errors = NULL # <<<<<<<<<<<<<< * else: * if isinstance(encoding, unicode): */ __pyx_v_self->unicode_errors = NULL; goto __pyx_L5; } /*else*/ { /* "pandas/msgpack.pyx":147 * self.unicode_errors = NULL * else: * if isinstance(encoding, unicode): # <<<<<<<<<<<<<< * self._bencoding = encoding.encode('ascii') * else: */ __pyx_t_1 = PyUnicode_Check(__pyx_v_encoding); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { /* "pandas/msgpack.pyx":148 * else: * if isinstance(encoding, unicode): * self._bencoding = encoding.encode('ascii') # <<<<<<<<<<<<<< * else: * self._bencoding = encoding */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_encoding, __pyx_n_s__encode); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 148; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_k_tuple_8), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 148; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GIVEREF(__pyx_t_4); __Pyx_GOTREF(__pyx_v_self->_bencoding); __Pyx_DECREF(__pyx_v_self->_bencoding); __pyx_v_self->_bencoding = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L6; } /*else*/ { /* "pandas/msgpack.pyx":150 * self._bencoding = encoding.encode('ascii') * else: * self._bencoding = encoding # <<<<<<<<<<<<<< * self.encoding = PyBytes_AsString(self._bencoding) * if isinstance(unicode_errors, unicode): */ __Pyx_INCREF(__pyx_v_encoding); __Pyx_GIVEREF(__pyx_v_encoding); __Pyx_GOTREF(__pyx_v_self->_bencoding); __Pyx_DECREF(__pyx_v_self->_bencoding); __pyx_v_self->_bencoding = __pyx_v_encoding; } __pyx_L6:; /* "pandas/msgpack.pyx":151 * else: * self._bencoding = encoding * self.encoding = PyBytes_AsString(self._bencoding) # <<<<<<<<<<<<<< * if isinstance(unicode_errors, unicode): * self._berrors = unicode_errors.encode('ascii') */ __pyx_t_4 = __pyx_v_self->_bencoding; __Pyx_INCREF(__pyx_t_4); __pyx_t_5 = PyBytes_AsString(__pyx_t_4); if (unlikely(__pyx_t_5 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 151; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_self->encoding = __pyx_t_5; /* "pandas/msgpack.pyx":152 * self._bencoding = encoding * self.encoding = PyBytes_AsString(self._bencoding) * if isinstance(unicode_errors, unicode): # <<<<<<<<<<<<<< * self._berrors = unicode_errors.encode('ascii') * else: */ __pyx_t_2 = PyUnicode_Check(__pyx_v_unicode_errors); __pyx_t_1 = (__pyx_t_2 != 0); if (__pyx_t_1) { /* "pandas/msgpack.pyx":153 * self.encoding = PyBytes_AsString(self._bencoding) * if isinstance(unicode_errors, unicode): * self._berrors = unicode_errors.encode('ascii') # <<<<<<<<<<<<<< * else: * self._berrors = unicode_errors */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_unicode_errors, __pyx_n_s__encode); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 153; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_k_tuple_9), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 153; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GIVEREF(__pyx_t_3); __Pyx_GOTREF(__pyx_v_self->_berrors); __Pyx_DECREF(__pyx_v_self->_berrors); __pyx_v_self->_berrors = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L7; } /*else*/ { /* "pandas/msgpack.pyx":155 * self._berrors = unicode_errors.encode('ascii') * else: * self._berrors = unicode_errors # <<<<<<<<<<<<<< * self.unicode_errors = PyBytes_AsString(self._berrors) * */ __Pyx_INCREF(__pyx_v_unicode_errors); __Pyx_GIVEREF(__pyx_v_unicode_errors); __Pyx_GOTREF(__pyx_v_self->_berrors); __Pyx_DECREF(__pyx_v_self->_berrors); __pyx_v_self->_berrors = __pyx_v_unicode_errors; } __pyx_L7:; /* "pandas/msgpack.pyx":156 * else: * self._berrors = unicode_errors * self.unicode_errors = PyBytes_AsString(self._berrors) # <<<<<<<<<<<<<< * * def __dealloc__(self): */ __pyx_t_3 = __pyx_v_self->_berrors; __Pyx_INCREF(__pyx_t_3); __pyx_t_5 = PyBytes_AsString(__pyx_t_3); if (unlikely(__pyx_t_5 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 156; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_self->unicode_errors = __pyx_t_5; } __pyx_L5:; __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("pandas.msgpack.Packer.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static void __pyx_pw_6pandas_7msgpack_6Packer_5__dealloc__(PyObject *__pyx_v_self); /*proto*/ static void __pyx_pw_6pandas_7msgpack_6Packer_5__dealloc__(PyObject *__pyx_v_self) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0); __pyx_pf_6pandas_7msgpack_6Packer_4__dealloc__(((struct __pyx_obj_6pandas_7msgpack_Packer *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); } /* "pandas/msgpack.pyx":158 * self.unicode_errors = PyBytes_AsString(self._berrors) * * def __dealloc__(self): # <<<<<<<<<<<<<< * free(self.pk.buf); * */ static void __pyx_pf_6pandas_7msgpack_6Packer_4__dealloc__(struct __pyx_obj_6pandas_7msgpack_Packer *__pyx_v_self) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__dealloc__", 0); /* "pandas/msgpack.pyx":159 * * def __dealloc__(self): * free(self.pk.buf); # <<<<<<<<<<<<<< * * @cython.boundscheck(False) */ free(__pyx_v_self->pk.buf); __Pyx_RefNannyFinishContext(); } /* "pandas/msgpack.pyx":163 * @cython.boundscheck(False) * @cython.wraparound(False) * cdef int _pack(self, object o, int nest_limit=DEFAULT_RECURSE_LIMIT) except -1: # <<<<<<<<<<<<<< * cdef long long llval * cdef unsigned long long ullval */ static int __pyx_f_6pandas_7msgpack_6Packer__pack(struct __pyx_obj_6pandas_7msgpack_Packer *__pyx_v_self, PyObject *__pyx_v_o, struct __pyx_opt_args_6pandas_7msgpack_6Packer__pack *__pyx_optional_args) { int __pyx_v_nest_limit = __pyx_k_10; PY_LONG_LONG __pyx_v_llval; unsigned PY_LONG_LONG __pyx_v_ullval; long __pyx_v_longval; float __pyx_v_fval; double __pyx_v_dval; char *__pyx_v_rawval; int __pyx_v_ret; PyObject *__pyx_v_d = 0; PyObject *__pyx_v_k = NULL; PyObject *__pyx_v_v = NULL; int __pyx_r; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_t_4; unsigned PY_LONG_LONG __pyx_t_5; PY_LONG_LONG __pyx_t_6; long __pyx_t_7; float __pyx_t_8; double __pyx_t_9; char *__pyx_t_10; Py_ssize_t __pyx_t_11; Py_ssize_t __pyx_t_12; int __pyx_t_13; PyObject *__pyx_t_14 = NULL; int __pyx_t_15; struct __pyx_opt_args_6pandas_7msgpack_6Packer__pack __pyx_t_16; PyObject *(*__pyx_t_17)(PyObject *); PyObject *__pyx_t_18 = NULL; PyObject *__pyx_t_19 = NULL; PyObject *(*__pyx_t_20)(PyObject *); int __pyx_t_21; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_pack", 0); if (__pyx_optional_args) { if (__pyx_optional_args->__pyx_n > 0) { __pyx_v_nest_limit = __pyx_optional_args->nest_limit; } } __Pyx_INCREF(__pyx_v_o); /* "pandas/msgpack.pyx":176 * cdef int n,i * * if nest_limit < 0: # <<<<<<<<<<<<<< * raise PackValueError("recursion limit exceeded.") * */ __pyx_t_1 = ((__pyx_v_nest_limit < 0) != 0); if (__pyx_t_1) { /* "pandas/msgpack.pyx":177 * * if nest_limit < 0: * raise PackValueError("recursion limit exceeded.") # <<<<<<<<<<<<<< * * if o is None: */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__PackValueError); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 177; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_k_tuple_12), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 177; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __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_filename = __pyx_f[0]; __pyx_lineno = 177; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L3; } __pyx_L3:; /* "pandas/msgpack.pyx":179 * raise PackValueError("recursion limit exceeded.") * * if o is None: # <<<<<<<<<<<<<< * ret = msgpack_pack_nil(&self.pk) * elif isinstance(o, bool): */ __pyx_t_1 = (__pyx_v_o == Py_None); __pyx_t_4 = (__pyx_t_1 != 0); if (__pyx_t_4) { /* "pandas/msgpack.pyx":180 * * if o is None: * ret = msgpack_pack_nil(&self.pk) # <<<<<<<<<<<<<< * elif isinstance(o, bool): * if o: */ __pyx_v_ret = msgpack_pack_nil((&__pyx_v_self->pk)); goto __pyx_L4; } /* "pandas/msgpack.pyx":181 * if o is None: * ret = msgpack_pack_nil(&self.pk) * elif isinstance(o, bool): # <<<<<<<<<<<<<< * if o: * ret = msgpack_pack_true(&self.pk) */ __pyx_t_4 = __Pyx_TypeCheck(__pyx_v_o, ((PyObject*)__pyx_ptype_7cpython_4bool_bool)); __pyx_t_1 = (__pyx_t_4 != 0); if (__pyx_t_1) { /* "pandas/msgpack.pyx":182 * ret = msgpack_pack_nil(&self.pk) * elif isinstance(o, bool): * if o: # <<<<<<<<<<<<<< * ret = msgpack_pack_true(&self.pk) * else: */ __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_o); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 182; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__pyx_t_1) { /* "pandas/msgpack.pyx":183 * elif isinstance(o, bool): * if o: * ret = msgpack_pack_true(&self.pk) # <<<<<<<<<<<<<< * else: * ret = msgpack_pack_false(&self.pk) */ __pyx_v_ret = msgpack_pack_true((&__pyx_v_self->pk)); goto __pyx_L5; } /*else*/ { /* "pandas/msgpack.pyx":185 * ret = msgpack_pack_true(&self.pk) * else: * ret = msgpack_pack_false(&self.pk) # <<<<<<<<<<<<<< * elif PyLong_Check(o): * if o > 0: */ __pyx_v_ret = msgpack_pack_false((&__pyx_v_self->pk)); } __pyx_L5:; goto __pyx_L4; } /* "pandas/msgpack.pyx":186 * else: * ret = msgpack_pack_false(&self.pk) * elif PyLong_Check(o): # <<<<<<<<<<<<<< * if o > 0: * ullval = o */ __pyx_t_1 = (PyLong_Check(__pyx_v_o) != 0); if (__pyx_t_1) { /* "pandas/msgpack.pyx":187 * ret = msgpack_pack_false(&self.pk) * elif PyLong_Check(o): * if o > 0: # <<<<<<<<<<<<<< * ullval = o * ret = msgpack_pack_unsigned_long_long(&self.pk, ullval) */ __pyx_t_3 = PyObject_RichCompare(__pyx_v_o, __pyx_int_0, Py_GT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 187; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 187; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_1) { /* "pandas/msgpack.pyx":188 * elif PyLong_Check(o): * if o > 0: * ullval = o # <<<<<<<<<<<<<< * ret = msgpack_pack_unsigned_long_long(&self.pk, ullval) * else: */ __pyx_t_5 = __Pyx_PyInt_AsUnsignedLongLong(__pyx_v_o); if (unlikely((__pyx_t_5 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 188; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_ullval = __pyx_t_5; /* "pandas/msgpack.pyx":189 * if o > 0: * ullval = o * ret = msgpack_pack_unsigned_long_long(&self.pk, ullval) # <<<<<<<<<<<<<< * else: * llval = o */ __pyx_v_ret = msgpack_pack_unsigned_long_long((&__pyx_v_self->pk), __pyx_v_ullval); goto __pyx_L6; } /*else*/ { /* "pandas/msgpack.pyx":191 * ret = msgpack_pack_unsigned_long_long(&self.pk, ullval) * else: * llval = o # <<<<<<<<<<<<<< * ret = msgpack_pack_long_long(&self.pk, llval) * elif PyInt_Check(o): */ __pyx_t_6 = __Pyx_PyInt_AsLongLong(__pyx_v_o); if (unlikely((__pyx_t_6 == (PY_LONG_LONG)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 191; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_llval = __pyx_t_6; /* "pandas/msgpack.pyx":192 * else: * llval = o * ret = msgpack_pack_long_long(&self.pk, llval) # <<<<<<<<<<<<<< * elif PyInt_Check(o): * longval = o */ __pyx_v_ret = msgpack_pack_long_long((&__pyx_v_self->pk), __pyx_v_llval); } __pyx_L6:; goto __pyx_L4; } /* "pandas/msgpack.pyx":193 * llval = o * ret = msgpack_pack_long_long(&self.pk, llval) * elif PyInt_Check(o): # <<<<<<<<<<<<<< * longval = o * ret = msgpack_pack_long(&self.pk, longval) */ __pyx_t_1 = (PyInt_Check(__pyx_v_o) != 0); if (__pyx_t_1) { /* "pandas/msgpack.pyx":194 * ret = msgpack_pack_long_long(&self.pk, llval) * elif PyInt_Check(o): * longval = o # <<<<<<<<<<<<<< * ret = msgpack_pack_long(&self.pk, longval) * elif PyFloat_Check(o): */ __pyx_t_7 = __Pyx_PyInt_AsLong(__pyx_v_o); if (unlikely((__pyx_t_7 == (long)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 194; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_longval = __pyx_t_7; /* "pandas/msgpack.pyx":195 * elif PyInt_Check(o): * longval = o * ret = msgpack_pack_long(&self.pk, longval) # <<<<<<<<<<<<<< * elif PyFloat_Check(o): * if self.use_float: */ __pyx_v_ret = msgpack_pack_long((&__pyx_v_self->pk), __pyx_v_longval); goto __pyx_L4; } /* "pandas/msgpack.pyx":196 * longval = o * ret = msgpack_pack_long(&self.pk, longval) * elif PyFloat_Check(o): # <<<<<<<<<<<<<< * if self.use_float: * fval = o */ __pyx_t_1 = (PyFloat_Check(__pyx_v_o) != 0); if (__pyx_t_1) { /* "pandas/msgpack.pyx":197 * ret = msgpack_pack_long(&self.pk, longval) * elif PyFloat_Check(o): * if self.use_float: # <<<<<<<<<<<<<< * fval = o * ret = msgpack_pack_float(&self.pk, fval) */ __pyx_t_1 = __Pyx_PyObject_IsTrue(((PyObject *)__pyx_v_self->use_float)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 197; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__pyx_t_1) { /* "pandas/msgpack.pyx":198 * elif PyFloat_Check(o): * if self.use_float: * fval = o # <<<<<<<<<<<<<< * ret = msgpack_pack_float(&self.pk, fval) * else: */ __pyx_t_8 = __pyx_PyFloat_AsFloat(__pyx_v_o); if (unlikely((__pyx_t_8 == (float)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 198; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_fval = __pyx_t_8; /* "pandas/msgpack.pyx":199 * if self.use_float: * fval = o * ret = msgpack_pack_float(&self.pk, fval) # <<<<<<<<<<<<<< * else: * dval = o */ __pyx_v_ret = msgpack_pack_float((&__pyx_v_self->pk), __pyx_v_fval); goto __pyx_L7; } /*else*/ { /* "pandas/msgpack.pyx":201 * ret = msgpack_pack_float(&self.pk, fval) * else: * dval = o # <<<<<<<<<<<<<< * ret = msgpack_pack_double(&self.pk, dval) * elif PyBytes_Check(o): */ __pyx_t_9 = __pyx_PyFloat_AsDouble(__pyx_v_o); if (unlikely((__pyx_t_9 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 201; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_dval = __pyx_t_9; /* "pandas/msgpack.pyx":202 * else: * dval = o * ret = msgpack_pack_double(&self.pk, dval) # <<<<<<<<<<<<<< * elif PyBytes_Check(o): * rawval = o */ __pyx_v_ret = msgpack_pack_double((&__pyx_v_self->pk), __pyx_v_dval); } __pyx_L7:; goto __pyx_L4; } /* "pandas/msgpack.pyx":203 * dval = o * ret = msgpack_pack_double(&self.pk, dval) * elif PyBytes_Check(o): # <<<<<<<<<<<<<< * rawval = o * ret = msgpack_pack_raw(&self.pk, len(o)) */ __pyx_t_1 = (PyBytes_Check(__pyx_v_o) != 0); if (__pyx_t_1) { /* "pandas/msgpack.pyx":204 * ret = msgpack_pack_double(&self.pk, dval) * elif PyBytes_Check(o): * rawval = o # <<<<<<<<<<<<<< * ret = msgpack_pack_raw(&self.pk, len(o)) * if ret == 0: */ __pyx_t_10 = __Pyx_PyObject_AsString(__pyx_v_o); if (unlikely((!__pyx_t_10) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 204; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_rawval = __pyx_t_10; /* "pandas/msgpack.pyx":205 * elif PyBytes_Check(o): * rawval = o * ret = msgpack_pack_raw(&self.pk, len(o)) # <<<<<<<<<<<<<< * if ret == 0: * ret = msgpack_pack_raw_body(&self.pk, rawval, len(o)) */ __pyx_t_11 = PyObject_Length(__pyx_v_o); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 205; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_ret = msgpack_pack_raw((&__pyx_v_self->pk), __pyx_t_11); /* "pandas/msgpack.pyx":206 * rawval = o * ret = msgpack_pack_raw(&self.pk, len(o)) * if ret == 0: # <<<<<<<<<<<<<< * ret = msgpack_pack_raw_body(&self.pk, rawval, len(o)) * elif PyUnicode_Check(o): */ __pyx_t_1 = ((__pyx_v_ret == 0) != 0); if (__pyx_t_1) { /* "pandas/msgpack.pyx":207 * ret = msgpack_pack_raw(&self.pk, len(o)) * if ret == 0: * ret = msgpack_pack_raw_body(&self.pk, rawval, len(o)) # <<<<<<<<<<<<<< * elif PyUnicode_Check(o): * if not self.encoding: */ __pyx_t_11 = PyObject_Length(__pyx_v_o); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 207; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_ret = msgpack_pack_raw_body((&__pyx_v_self->pk), __pyx_v_rawval, __pyx_t_11); goto __pyx_L8; } __pyx_L8:; goto __pyx_L4; } /* "pandas/msgpack.pyx":208 * if ret == 0: * ret = msgpack_pack_raw_body(&self.pk, rawval, len(o)) * elif PyUnicode_Check(o): # <<<<<<<<<<<<<< * if not self.encoding: * raise TypeError("Can't encode unicode string: no encoding is specified") */ __pyx_t_1 = (PyUnicode_Check(__pyx_v_o) != 0); if (__pyx_t_1) { /* "pandas/msgpack.pyx":209 * ret = msgpack_pack_raw_body(&self.pk, rawval, len(o)) * elif PyUnicode_Check(o): * if not self.encoding: # <<<<<<<<<<<<<< * raise TypeError("Can't encode unicode string: no encoding is specified") * o = PyUnicode_AsEncodedString(o, self.encoding, self.unicode_errors) */ __pyx_t_1 = ((!(__pyx_v_self->encoding != 0)) != 0); if (__pyx_t_1) { /* "pandas/msgpack.pyx":210 * elif PyUnicode_Check(o): * if not self.encoding: * raise TypeError("Can't encode unicode string: no encoding is specified") # <<<<<<<<<<<<<< * o = PyUnicode_AsEncodedString(o, self.encoding, self.unicode_errors) * rawval = o */ __pyx_t_3 = PyObject_Call(__pyx_builtin_TypeError, ((PyObject *)__pyx_k_tuple_14), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 210; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 210; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L9; } __pyx_L9:; /* "pandas/msgpack.pyx":211 * if not self.encoding: * raise TypeError("Can't encode unicode string: no encoding is specified") * o = PyUnicode_AsEncodedString(o, self.encoding, self.unicode_errors) # <<<<<<<<<<<<<< * rawval = o * ret = msgpack_pack_raw(&self.pk, len(o)) */ __pyx_t_3 = PyUnicode_AsEncodedString(__pyx_v_o, __pyx_v_self->encoding, __pyx_v_self->unicode_errors); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 211; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF_SET(__pyx_v_o, __pyx_t_3); __pyx_t_3 = 0; /* "pandas/msgpack.pyx":212 * raise TypeError("Can't encode unicode string: no encoding is specified") * o = PyUnicode_AsEncodedString(o, self.encoding, self.unicode_errors) * rawval = o # <<<<<<<<<<<<<< * ret = msgpack_pack_raw(&self.pk, len(o)) * if ret == 0: */ __pyx_t_10 = __Pyx_PyObject_AsString(__pyx_v_o); if (unlikely((!__pyx_t_10) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 212; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_rawval = __pyx_t_10; /* "pandas/msgpack.pyx":213 * o = PyUnicode_AsEncodedString(o, self.encoding, self.unicode_errors) * rawval = o * ret = msgpack_pack_raw(&self.pk, len(o)) # <<<<<<<<<<<<<< * if ret == 0: * ret = msgpack_pack_raw_body(&self.pk, rawval, len(o)) */ __pyx_t_11 = PyObject_Length(__pyx_v_o); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 213; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_ret = msgpack_pack_raw((&__pyx_v_self->pk), __pyx_t_11); /* "pandas/msgpack.pyx":214 * rawval = o * ret = msgpack_pack_raw(&self.pk, len(o)) * if ret == 0: # <<<<<<<<<<<<<< * ret = msgpack_pack_raw_body(&self.pk, rawval, len(o)) * elif PyDict_CheckExact(o): */ __pyx_t_1 = ((__pyx_v_ret == 0) != 0); if (__pyx_t_1) { /* "pandas/msgpack.pyx":215 * ret = msgpack_pack_raw(&self.pk, len(o)) * if ret == 0: * ret = msgpack_pack_raw_body(&self.pk, rawval, len(o)) # <<<<<<<<<<<<<< * elif PyDict_CheckExact(o): * d = o */ __pyx_t_11 = PyObject_Length(__pyx_v_o); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 215; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_ret = msgpack_pack_raw_body((&__pyx_v_self->pk), __pyx_v_rawval, __pyx_t_11); goto __pyx_L10; } __pyx_L10:; goto __pyx_L4; } /* "pandas/msgpack.pyx":216 * if ret == 0: * ret = msgpack_pack_raw_body(&self.pk, rawval, len(o)) * elif PyDict_CheckExact(o): # <<<<<<<<<<<<<< * d = o * ret = msgpack_pack_map(&self.pk, len(d)) */ __pyx_t_1 = (PyDict_CheckExact(__pyx_v_o) != 0); if (__pyx_t_1) { /* "pandas/msgpack.pyx":217 * ret = msgpack_pack_raw_body(&self.pk, rawval, len(o)) * elif PyDict_CheckExact(o): * d = o # <<<<<<<<<<<<<< * ret = msgpack_pack_map(&self.pk, len(d)) * if ret == 0: */ __Pyx_INCREF(((PyObject *)((PyObject*)__pyx_v_o))); __pyx_v_d = ((PyObject*)__pyx_v_o); /* "pandas/msgpack.pyx":218 * elif PyDict_CheckExact(o): * d = o * ret = msgpack_pack_map(&self.pk, len(d)) # <<<<<<<<<<<<<< * if ret == 0: * for k, v in d.iteritems(): */ if (unlikely(((PyObject *)__pyx_v_d) == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 218; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_11 = PyDict_Size(((PyObject *)__pyx_v_d)); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 218; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_ret = msgpack_pack_map((&__pyx_v_self->pk), __pyx_t_11); /* "pandas/msgpack.pyx":219 * d = o * ret = msgpack_pack_map(&self.pk, len(d)) * if ret == 0: # <<<<<<<<<<<<<< * for k, v in d.iteritems(): * ret = self._pack(k, nest_limit-1) */ __pyx_t_1 = ((__pyx_v_ret == 0) != 0); if (__pyx_t_1) { /* "pandas/msgpack.pyx":220 * ret = msgpack_pack_map(&self.pk, len(d)) * if ret == 0: * for k, v in d.iteritems(): # <<<<<<<<<<<<<< * ret = self._pack(k, nest_limit-1) * if ret != 0: break */ __pyx_t_11 = 0; if (unlikely(((PyObject *)__pyx_v_d) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "iteritems"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 220; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_2 = __Pyx_dict_iterator(((PyObject *)__pyx_v_d), 1, ((PyObject *)__pyx_n_s__iteritems), (&__pyx_t_12), (&__pyx_t_13)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 220; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = __pyx_t_2; __pyx_t_2 = 0; while (1) { __pyx_t_15 = __Pyx_dict_iter_next(__pyx_t_3, __pyx_t_12, &__pyx_t_11, &__pyx_t_2, &__pyx_t_14, NULL, __pyx_t_13); if (unlikely(__pyx_t_15 == 0)) break; if (unlikely(__pyx_t_15 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 220; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_GOTREF(__pyx_t_14); __Pyx_XDECREF_SET(__pyx_v_k, __pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF_SET(__pyx_v_v, __pyx_t_14); __pyx_t_14 = 0; /* "pandas/msgpack.pyx":221 * if ret == 0: * for k, v in d.iteritems(): * ret = self._pack(k, nest_limit-1) # <<<<<<<<<<<<<< * if ret != 0: break * ret = self._pack(v, nest_limit-1) */ __pyx_t_16.__pyx_n = 1; __pyx_t_16.nest_limit = (__pyx_v_nest_limit - 1); __pyx_t_15 = ((struct __pyx_vtabstruct_6pandas_7msgpack_Packer *)__pyx_v_self->__pyx_vtab)->_pack(__pyx_v_self, __pyx_v_k, &__pyx_t_16); if (unlikely(__pyx_t_15 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 221; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_ret = __pyx_t_15; /* "pandas/msgpack.pyx":222 * for k, v in d.iteritems(): * ret = self._pack(k, nest_limit-1) * if ret != 0: break # <<<<<<<<<<<<<< * ret = self._pack(v, nest_limit-1) * if ret != 0: break */ __pyx_t_1 = ((__pyx_v_ret != 0) != 0); if (__pyx_t_1) { goto __pyx_L13_break; goto __pyx_L14; } __pyx_L14:; /* "pandas/msgpack.pyx":223 * ret = self._pack(k, nest_limit-1) * if ret != 0: break * ret = self._pack(v, nest_limit-1) # <<<<<<<<<<<<<< * if ret != 0: break * elif PyDict_Check(o): */ __pyx_t_16.__pyx_n = 1; __pyx_t_16.nest_limit = (__pyx_v_nest_limit - 1); __pyx_t_15 = ((struct __pyx_vtabstruct_6pandas_7msgpack_Packer *)__pyx_v_self->__pyx_vtab)->_pack(__pyx_v_self, __pyx_v_v, &__pyx_t_16); if (unlikely(__pyx_t_15 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 223; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_ret = __pyx_t_15; /* "pandas/msgpack.pyx":224 * if ret != 0: break * ret = self._pack(v, nest_limit-1) * if ret != 0: break # <<<<<<<<<<<<<< * elif PyDict_Check(o): * ret = msgpack_pack_map(&self.pk, len(o)) */ __pyx_t_1 = ((__pyx_v_ret != 0) != 0); if (__pyx_t_1) { goto __pyx_L13_break; goto __pyx_L15; } __pyx_L15:; } __pyx_L13_break:; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L11; } __pyx_L11:; goto __pyx_L4; } /* "pandas/msgpack.pyx":225 * ret = self._pack(v, nest_limit-1) * if ret != 0: break * elif PyDict_Check(o): # <<<<<<<<<<<<<< * ret = msgpack_pack_map(&self.pk, len(o)) * if ret == 0: */ __pyx_t_1 = (PyDict_Check(__pyx_v_o) != 0); if (__pyx_t_1) { /* "pandas/msgpack.pyx":226 * if ret != 0: break * elif PyDict_Check(o): * ret = msgpack_pack_map(&self.pk, len(o)) # <<<<<<<<<<<<<< * if ret == 0: * for k, v in o.items(): */ __pyx_t_12 = PyObject_Length(__pyx_v_o); if (unlikely(__pyx_t_12 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 226; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_ret = msgpack_pack_map((&__pyx_v_self->pk), __pyx_t_12); /* "pandas/msgpack.pyx":227 * elif PyDict_Check(o): * ret = msgpack_pack_map(&self.pk, len(o)) * if ret == 0: # <<<<<<<<<<<<<< * for k, v in o.items(): * ret = self._pack(k, nest_limit-1) */ __pyx_t_1 = ((__pyx_v_ret == 0) != 0); if (__pyx_t_1) { /* "pandas/msgpack.pyx":228 * ret = msgpack_pack_map(&self.pk, len(o)) * if ret == 0: * for k, v in o.items(): # <<<<<<<<<<<<<< * ret = self._pack(k, nest_limit-1) * if ret != 0: break */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_o, __pyx_n_s__items); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 228; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_14 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 228; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_14); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (PyList_CheckExact(__pyx_t_14) || PyTuple_CheckExact(__pyx_t_14)) { __pyx_t_3 = __pyx_t_14; __Pyx_INCREF(__pyx_t_3); __pyx_t_12 = 0; __pyx_t_17 = NULL; } else { __pyx_t_12 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_14); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 228; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_17 = Py_TYPE(__pyx_t_3)->tp_iternext; } __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; for (;;) { if (!__pyx_t_17 && PyList_CheckExact(__pyx_t_3)) { if (__pyx_t_12 >= PyList_GET_SIZE(__pyx_t_3)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_14 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_12); __Pyx_INCREF(__pyx_t_14); __pyx_t_12++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 228; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_14 = PySequence_ITEM(__pyx_t_3, __pyx_t_12); __pyx_t_12++; if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 228; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif } else if (!__pyx_t_17 && PyTuple_CheckExact(__pyx_t_3)) { if (__pyx_t_12 >= PyTuple_GET_SIZE(__pyx_t_3)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_14 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_12); __Pyx_INCREF(__pyx_t_14); __pyx_t_12++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 228; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_14 = PySequence_ITEM(__pyx_t_3, __pyx_t_12); __pyx_t_12++; if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 228; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif } else { __pyx_t_14 = __pyx_t_17(__pyx_t_3); if (unlikely(!__pyx_t_14)) { if (PyErr_Occurred()) { if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear(); else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 228; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } break; } __Pyx_GOTREF(__pyx_t_14); } if ((likely(PyTuple_CheckExact(__pyx_t_14))) || (PyList_CheckExact(__pyx_t_14))) { PyObject* sequence = __pyx_t_14; #if CYTHON_COMPILING_IN_CPYTHON Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 228; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_18 = PyTuple_GET_ITEM(sequence, 1); } else { __pyx_t_2 = PyList_GET_ITEM(sequence, 0); __pyx_t_18 = PyList_GET_ITEM(sequence, 1); } __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(__pyx_t_18); #else __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 228; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_18 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 228; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); #endif __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; } else { Py_ssize_t index = -1; __pyx_t_19 = PyObject_GetIter(__pyx_t_14); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 228; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_19); __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; __pyx_t_20 = Py_TYPE(__pyx_t_19)->tp_iternext; index = 0; __pyx_t_2 = __pyx_t_20(__pyx_t_19); if (unlikely(!__pyx_t_2)) goto __pyx_L19_unpacking_failed; __Pyx_GOTREF(__pyx_t_2); index = 1; __pyx_t_18 = __pyx_t_20(__pyx_t_19); if (unlikely(!__pyx_t_18)) goto __pyx_L19_unpacking_failed; __Pyx_GOTREF(__pyx_t_18); if (__Pyx_IternextUnpackEndCheck(__pyx_t_20(__pyx_t_19), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 228; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_20 = NULL; __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0; goto __pyx_L20_unpacking_done; __pyx_L19_unpacking_failed:; __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0; __pyx_t_20 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 228; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_L20_unpacking_done:; } __Pyx_XDECREF_SET(__pyx_v_k, __pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF_SET(__pyx_v_v, __pyx_t_18); __pyx_t_18 = 0; /* "pandas/msgpack.pyx":229 * if ret == 0: * for k, v in o.items(): * ret = self._pack(k, nest_limit-1) # <<<<<<<<<<<<<< * if ret != 0: break * ret = self._pack(v, nest_limit-1) */ __pyx_t_16.__pyx_n = 1; __pyx_t_16.nest_limit = (__pyx_v_nest_limit - 1); __pyx_t_13 = ((struct __pyx_vtabstruct_6pandas_7msgpack_Packer *)__pyx_v_self->__pyx_vtab)->_pack(__pyx_v_self, __pyx_v_k, &__pyx_t_16); if (unlikely(__pyx_t_13 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 229; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_ret = __pyx_t_13; /* "pandas/msgpack.pyx":230 * for k, v in o.items(): * ret = self._pack(k, nest_limit-1) * if ret != 0: break # <<<<<<<<<<<<<< * ret = self._pack(v, nest_limit-1) * if ret != 0: break */ __pyx_t_1 = ((__pyx_v_ret != 0) != 0); if (__pyx_t_1) { goto __pyx_L18_break; goto __pyx_L21; } __pyx_L21:; /* "pandas/msgpack.pyx":231 * ret = self._pack(k, nest_limit-1) * if ret != 0: break * ret = self._pack(v, nest_limit-1) # <<<<<<<<<<<<<< * if ret != 0: break * elif PyTuple_Check(o) or PyList_Check(o): */ __pyx_t_16.__pyx_n = 1; __pyx_t_16.nest_limit = (__pyx_v_nest_limit - 1); __pyx_t_13 = ((struct __pyx_vtabstruct_6pandas_7msgpack_Packer *)__pyx_v_self->__pyx_vtab)->_pack(__pyx_v_self, __pyx_v_v, &__pyx_t_16); if (unlikely(__pyx_t_13 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 231; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_ret = __pyx_t_13; /* "pandas/msgpack.pyx":232 * if ret != 0: break * ret = self._pack(v, nest_limit-1) * if ret != 0: break # <<<<<<<<<<<<<< * elif PyTuple_Check(o) or PyList_Check(o): * ret = msgpack_pack_array(&self.pk, len(o)) */ __pyx_t_1 = ((__pyx_v_ret != 0) != 0); if (__pyx_t_1) { goto __pyx_L18_break; goto __pyx_L22; } __pyx_L22:; } __pyx_L18_break:; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L16; } __pyx_L16:; goto __pyx_L4; } /* "pandas/msgpack.pyx":233 * ret = self._pack(v, nest_limit-1) * if ret != 0: break * elif PyTuple_Check(o) or PyList_Check(o): # <<<<<<<<<<<<<< * ret = msgpack_pack_array(&self.pk, len(o)) * if ret == 0: */ __pyx_t_1 = (PyTuple_Check(__pyx_v_o) != 0); if (!__pyx_t_1) { __pyx_t_4 = (PyList_Check(__pyx_v_o) != 0); __pyx_t_21 = __pyx_t_4; } else { __pyx_t_21 = __pyx_t_1; } if (__pyx_t_21) { /* "pandas/msgpack.pyx":234 * if ret != 0: break * elif PyTuple_Check(o) or PyList_Check(o): * ret = msgpack_pack_array(&self.pk, len(o)) # <<<<<<<<<<<<<< * if ret == 0: * for v in o: */ __pyx_t_12 = PyObject_Length(__pyx_v_o); if (unlikely(__pyx_t_12 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 234; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_ret = msgpack_pack_array((&__pyx_v_self->pk), __pyx_t_12); /* "pandas/msgpack.pyx":235 * elif PyTuple_Check(o) or PyList_Check(o): * ret = msgpack_pack_array(&self.pk, len(o)) * if ret == 0: # <<<<<<<<<<<<<< * for v in o: * ret = self._pack(v, nest_limit-1) */ __pyx_t_21 = ((__pyx_v_ret == 0) != 0); if (__pyx_t_21) { /* "pandas/msgpack.pyx":236 * ret = msgpack_pack_array(&self.pk, len(o)) * if ret == 0: * for v in o: # <<<<<<<<<<<<<< * ret = self._pack(v, nest_limit-1) * if ret != 0: break */ if (PyList_CheckExact(__pyx_v_o) || PyTuple_CheckExact(__pyx_v_o)) { __pyx_t_3 = __pyx_v_o; __Pyx_INCREF(__pyx_t_3); __pyx_t_12 = 0; __pyx_t_17 = NULL; } else { __pyx_t_12 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_o); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 236; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_17 = Py_TYPE(__pyx_t_3)->tp_iternext; } for (;;) { if (!__pyx_t_17 && PyList_CheckExact(__pyx_t_3)) { if (__pyx_t_12 >= PyList_GET_SIZE(__pyx_t_3)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_14 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_12); __Pyx_INCREF(__pyx_t_14); __pyx_t_12++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 236; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_14 = PySequence_ITEM(__pyx_t_3, __pyx_t_12); __pyx_t_12++; if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 236; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif } else if (!__pyx_t_17 && PyTuple_CheckExact(__pyx_t_3)) { if (__pyx_t_12 >= PyTuple_GET_SIZE(__pyx_t_3)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_14 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_12); __Pyx_INCREF(__pyx_t_14); __pyx_t_12++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 236; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_14 = PySequence_ITEM(__pyx_t_3, __pyx_t_12); __pyx_t_12++; if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 236; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif } else { __pyx_t_14 = __pyx_t_17(__pyx_t_3); if (unlikely(!__pyx_t_14)) { if (PyErr_Occurred()) { if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear(); else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 236; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } break; } __Pyx_GOTREF(__pyx_t_14); } __Pyx_XDECREF_SET(__pyx_v_v, __pyx_t_14); __pyx_t_14 = 0; /* "pandas/msgpack.pyx":237 * if ret == 0: * for v in o: * ret = self._pack(v, nest_limit-1) # <<<<<<<<<<<<<< * if ret != 0: break * */ __pyx_t_16.__pyx_n = 1; __pyx_t_16.nest_limit = (__pyx_v_nest_limit - 1); __pyx_t_13 = ((struct __pyx_vtabstruct_6pandas_7msgpack_Packer *)__pyx_v_self->__pyx_vtab)->_pack(__pyx_v_self, __pyx_v_v, &__pyx_t_16); if (unlikely(__pyx_t_13 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 237; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_ret = __pyx_t_13; /* "pandas/msgpack.pyx":238 * for v in o: * ret = self._pack(v, nest_limit-1) * if ret != 0: break # <<<<<<<<<<<<<< * * elif self._default: */ __pyx_t_21 = ((__pyx_v_ret != 0) != 0); if (__pyx_t_21) { goto __pyx_L25_break; goto __pyx_L26; } __pyx_L26:; } __pyx_L25_break:; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L23; } __pyx_L23:; goto __pyx_L4; } /* "pandas/msgpack.pyx":240 * if ret != 0: break * * elif self._default: # <<<<<<<<<<<<<< * o = self._default(o) * ret = self._pack(o, nest_limit-1) */ __pyx_t_21 = __Pyx_PyObject_IsTrue(__pyx_v_self->_default); if (unlikely(__pyx_t_21 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 240; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__pyx_t_21) { /* "pandas/msgpack.pyx":241 * * elif self._default: * o = self._default(o) # <<<<<<<<<<<<<< * ret = self._pack(o, nest_limit-1) * else: */ __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 241; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_v_o); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_o); __Pyx_GIVEREF(__pyx_v_o); __pyx_t_14 = PyObject_Call(__pyx_v_self->_default, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 241; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_14); __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; __Pyx_DECREF_SET(__pyx_v_o, __pyx_t_14); __pyx_t_14 = 0; /* "pandas/msgpack.pyx":242 * elif self._default: * o = self._default(o) * ret = self._pack(o, nest_limit-1) # <<<<<<<<<<<<<< * else: * raise TypeError("can't serialize %r" % (o,)) */ __pyx_t_16.__pyx_n = 1; __pyx_t_16.nest_limit = (__pyx_v_nest_limit - 1); __pyx_t_13 = ((struct __pyx_vtabstruct_6pandas_7msgpack_Packer *)__pyx_v_self->__pyx_vtab)->_pack(__pyx_v_self, __pyx_v_o, &__pyx_t_16); if (unlikely(__pyx_t_13 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 242; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_ret = __pyx_t_13; goto __pyx_L4; } /*else*/ { /* "pandas/msgpack.pyx":244 * ret = self._pack(o, nest_limit-1) * else: * raise TypeError("can't serialize %r" % (o,)) # <<<<<<<<<<<<<< * return ret * */ __pyx_t_14 = PyTuple_New(1); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 244; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_14); __Pyx_INCREF(__pyx_v_o); PyTuple_SET_ITEM(__pyx_t_14, 0, __pyx_v_o); __Pyx_GIVEREF(__pyx_v_o); __pyx_t_3 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_15), ((PyObject *)__pyx_t_14)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 244; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_3)); __Pyx_DECREF(((PyObject *)__pyx_t_14)); __pyx_t_14 = 0; __pyx_t_14 = PyTuple_New(1); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 244; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_14); PyTuple_SET_ITEM(__pyx_t_14, 0, ((PyObject *)__pyx_t_3)); __Pyx_GIVEREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; __pyx_t_3 = PyObject_Call(__pyx_builtin_TypeError, ((PyObject *)__pyx_t_14), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 244; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(((PyObject *)__pyx_t_14)); __pyx_t_14 = 0; __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 244; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_L4:; /* "pandas/msgpack.pyx":245 * else: * raise TypeError("can't serialize %r" % (o,)) * return ret # <<<<<<<<<<<<<< * * cpdef pack(self, object obj): */ __pyx_r = __pyx_v_ret; goto __pyx_L0; __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_14); __Pyx_XDECREF(__pyx_t_18); __Pyx_XDECREF(__pyx_t_19); __Pyx_AddTraceback("pandas.msgpack.Packer._pack", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_XDECREF(__pyx_v_d); __Pyx_XDECREF(__pyx_v_k); __Pyx_XDECREF(__pyx_v_v); __Pyx_XDECREF(__pyx_v_o); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/msgpack.pyx":247 * return ret * * cpdef pack(self, object obj): # <<<<<<<<<<<<<< * cdef int ret * ret = self._pack(obj, DEFAULT_RECURSE_LIMIT) */ static PyObject *__pyx_pw_6pandas_7msgpack_6Packer_7pack(PyObject *__pyx_v_self, PyObject *__pyx_v_obj); /*proto*/ static PyObject *__pyx_f_6pandas_7msgpack_6Packer_pack(struct __pyx_obj_6pandas_7msgpack_Packer *__pyx_v_self, PyObject *__pyx_v_obj, int __pyx_skip_dispatch) { int __pyx_v_ret; PyObject *__pyx_v_buf = 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; struct __pyx_opt_args_6pandas_7msgpack_6Packer__pack __pyx_t_5; int __pyx_t_6; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("pack", 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__pack); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 247; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_6pandas_7msgpack_6Packer_7pack)) { __Pyx_XDECREF(__pyx_r); __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 247; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_obj); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_obj); __Pyx_GIVEREF(__pyx_v_obj); __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 247; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __pyx_r = __pyx_t_3; __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } /* "pandas/msgpack.pyx":249 * cpdef pack(self, object obj): * cdef int ret * ret = self._pack(obj, DEFAULT_RECURSE_LIMIT) # <<<<<<<<<<<<<< * if ret == -1: * raise MemoryError */ __pyx_t_5.__pyx_n = 1; __pyx_t_5.nest_limit = __pyx_v_6pandas_7msgpack_DEFAULT_RECURSE_LIMIT; __pyx_t_4 = ((struct __pyx_vtabstruct_6pandas_7msgpack_Packer *)__pyx_v_self->__pyx_vtab)->_pack(__pyx_v_self, __pyx_v_obj, &__pyx_t_5); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 249; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_ret = __pyx_t_4; /* "pandas/msgpack.pyx":250 * cdef int ret * ret = self._pack(obj, DEFAULT_RECURSE_LIMIT) * if ret == -1: # <<<<<<<<<<<<<< * raise MemoryError * elif ret: # should not happen. */ __pyx_t_6 = ((__pyx_v_ret == -1) != 0); if (__pyx_t_6) { /* "pandas/msgpack.pyx":251 * ret = self._pack(obj, DEFAULT_RECURSE_LIMIT) * if ret == -1: * raise MemoryError # <<<<<<<<<<<<<< * elif ret: # should not happen. * raise TypeError */ PyErr_NoMemory(); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 251; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L3; } /* "pandas/msgpack.pyx":252 * if ret == -1: * raise MemoryError * elif ret: # should not happen. # <<<<<<<<<<<<<< * raise TypeError * if self.autoreset: */ __pyx_t_6 = (__pyx_v_ret != 0); if (__pyx_t_6) { /* "pandas/msgpack.pyx":253 * raise MemoryError * elif ret: # should not happen. * raise TypeError # <<<<<<<<<<<<<< * if self.autoreset: * buf = PyBytes_FromStringAndSize(self.pk.buf, self.pk.length) */ __Pyx_Raise(__pyx_builtin_TypeError, 0, 0, 0); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 253; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L3; } __pyx_L3:; /* "pandas/msgpack.pyx":254 * elif ret: # should not happen. * raise TypeError * if self.autoreset: # <<<<<<<<<<<<<< * buf = PyBytes_FromStringAndSize(self.pk.buf, self.pk.length) * self.pk.length = 0 */ __pyx_t_6 = (__pyx_v_self->autoreset != 0); if (__pyx_t_6) { /* "pandas/msgpack.pyx":255 * raise TypeError * if self.autoreset: * buf = PyBytes_FromStringAndSize(self.pk.buf, self.pk.length) # <<<<<<<<<<<<<< * self.pk.length = 0 * return buf */ __pyx_t_1 = ((PyObject *)PyBytes_FromStringAndSize(__pyx_v_self->pk.buf, __pyx_v_self->pk.length)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 255; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_v_buf = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/msgpack.pyx":256 * if self.autoreset: * buf = PyBytes_FromStringAndSize(self.pk.buf, self.pk.length) * self.pk.length = 0 # <<<<<<<<<<<<<< * return buf * */ __pyx_v_self->pk.length = 0; /* "pandas/msgpack.pyx":257 * buf = PyBytes_FromStringAndSize(self.pk.buf, self.pk.length) * self.pk.length = 0 * return buf # <<<<<<<<<<<<<< * * def pack_array_header(self, size_t size): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_buf)); __pyx_r = ((PyObject *)__pyx_v_buf); goto __pyx_L0; goto __pyx_L4; } __pyx_L4:; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("pandas.msgpack.Packer.pack", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_buf); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_7msgpack_6Packer_7pack(PyObject *__pyx_v_self, PyObject *__pyx_v_obj); /*proto*/ static char __pyx_doc_6pandas_7msgpack_6Packer_6pack[] = "Packer.pack(self, obj)"; static PyObject *__pyx_pw_6pandas_7msgpack_6Packer_7pack(PyObject *__pyx_v_self, PyObject *__pyx_v_obj) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("pack (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_7msgpack_6Packer_6pack(((struct __pyx_obj_6pandas_7msgpack_Packer *)__pyx_v_self), ((PyObject *)__pyx_v_obj)); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/msgpack.pyx":247 * return ret * * cpdef pack(self, object obj): # <<<<<<<<<<<<<< * cdef int ret * ret = self._pack(obj, DEFAULT_RECURSE_LIMIT) */ static PyObject *__pyx_pf_6pandas_7msgpack_6Packer_6pack(struct __pyx_obj_6pandas_7msgpack_Packer *__pyx_v_self, PyObject *__pyx_v_obj) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("pack", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = ((struct __pyx_vtabstruct_6pandas_7msgpack_Packer *)__pyx_v_self->__pyx_vtab)->pack(__pyx_v_self, __pyx_v_obj, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 247; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas.msgpack.Packer.pack", __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_7msgpack_6Packer_9pack_array_header(PyObject *__pyx_v_self, PyObject *__pyx_arg_size); /*proto*/ static char __pyx_doc_6pandas_7msgpack_6Packer_8pack_array_header[] = "Packer.pack_array_header(self, size_t size)"; static PyObject *__pyx_pw_6pandas_7msgpack_6Packer_9pack_array_header(PyObject *__pyx_v_self, PyObject *__pyx_arg_size) { size_t __pyx_v_size; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("pack_array_header (wrapper)", 0); assert(__pyx_arg_size); { __pyx_v_size = __Pyx_PyInt_AsSize_t(__pyx_arg_size); if (unlikely((__pyx_v_size == (size_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 259; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; __Pyx_AddTraceback("pandas.msgpack.Packer.pack_array_header", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pandas_7msgpack_6Packer_8pack_array_header(((struct __pyx_obj_6pandas_7msgpack_Packer *)__pyx_v_self), ((size_t)__pyx_v_size)); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/msgpack.pyx":259 * return buf * * def pack_array_header(self, size_t size): # <<<<<<<<<<<<<< * cdef int ret = msgpack_pack_array(&self.pk, size) * if ret == -1: */ static PyObject *__pyx_pf_6pandas_7msgpack_6Packer_8pack_array_header(struct __pyx_obj_6pandas_7msgpack_Packer *__pyx_v_self, size_t __pyx_v_size) { int __pyx_v_ret; PyObject *__pyx_v_buf = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("pack_array_header", 0); /* "pandas/msgpack.pyx":260 * * def pack_array_header(self, size_t size): * cdef int ret = msgpack_pack_array(&self.pk, size) # <<<<<<<<<<<<<< * if ret == -1: * raise MemoryError */ __pyx_v_ret = msgpack_pack_array((&__pyx_v_self->pk), __pyx_v_size); /* "pandas/msgpack.pyx":261 * def pack_array_header(self, size_t size): * cdef int ret = msgpack_pack_array(&self.pk, size) * if ret == -1: # <<<<<<<<<<<<<< * raise MemoryError * elif ret: # should not happen */ __pyx_t_1 = ((__pyx_v_ret == -1) != 0); if (__pyx_t_1) { /* "pandas/msgpack.pyx":262 * cdef int ret = msgpack_pack_array(&self.pk, size) * if ret == -1: * raise MemoryError # <<<<<<<<<<<<<< * elif ret: # should not happen * raise TypeError */ PyErr_NoMemory(); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 262; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L3; } /* "pandas/msgpack.pyx":263 * if ret == -1: * raise MemoryError * elif ret: # should not happen # <<<<<<<<<<<<<< * raise TypeError * if self.autoreset: */ __pyx_t_1 = (__pyx_v_ret != 0); if (__pyx_t_1) { /* "pandas/msgpack.pyx":264 * raise MemoryError * elif ret: # should not happen * raise TypeError # <<<<<<<<<<<<<< * if self.autoreset: * buf = PyBytes_FromStringAndSize(self.pk.buf, self.pk.length) */ __Pyx_Raise(__pyx_builtin_TypeError, 0, 0, 0); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 264; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L3; } __pyx_L3:; /* "pandas/msgpack.pyx":265 * elif ret: # should not happen * raise TypeError * if self.autoreset: # <<<<<<<<<<<<<< * buf = PyBytes_FromStringAndSize(self.pk.buf, self.pk.length) * self.pk.length = 0 */ __pyx_t_1 = (__pyx_v_self->autoreset != 0); if (__pyx_t_1) { /* "pandas/msgpack.pyx":266 * raise TypeError * if self.autoreset: * buf = PyBytes_FromStringAndSize(self.pk.buf, self.pk.length) # <<<<<<<<<<<<<< * self.pk.length = 0 * return buf */ __pyx_t_2 = ((PyObject *)PyBytes_FromStringAndSize(__pyx_v_self->pk.buf, __pyx_v_self->pk.length)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 266; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_v_buf = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; /* "pandas/msgpack.pyx":267 * if self.autoreset: * buf = PyBytes_FromStringAndSize(self.pk.buf, self.pk.length) * self.pk.length = 0 # <<<<<<<<<<<<<< * return buf * */ __pyx_v_self->pk.length = 0; /* "pandas/msgpack.pyx":268 * buf = PyBytes_FromStringAndSize(self.pk.buf, self.pk.length) * self.pk.length = 0 * return buf # <<<<<<<<<<<<<< * * def pack_map_header(self, size_t size): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_buf)); __pyx_r = ((PyObject *)__pyx_v_buf); goto __pyx_L0; goto __pyx_L4; } __pyx_L4:; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("pandas.msgpack.Packer.pack_array_header", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_buf); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_7msgpack_6Packer_11pack_map_header(PyObject *__pyx_v_self, PyObject *__pyx_arg_size); /*proto*/ static char __pyx_doc_6pandas_7msgpack_6Packer_10pack_map_header[] = "Packer.pack_map_header(self, size_t size)"; static PyObject *__pyx_pw_6pandas_7msgpack_6Packer_11pack_map_header(PyObject *__pyx_v_self, PyObject *__pyx_arg_size) { size_t __pyx_v_size; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("pack_map_header (wrapper)", 0); assert(__pyx_arg_size); { __pyx_v_size = __Pyx_PyInt_AsSize_t(__pyx_arg_size); if (unlikely((__pyx_v_size == (size_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 270; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; __Pyx_AddTraceback("pandas.msgpack.Packer.pack_map_header", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pandas_7msgpack_6Packer_10pack_map_header(((struct __pyx_obj_6pandas_7msgpack_Packer *)__pyx_v_self), ((size_t)__pyx_v_size)); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/msgpack.pyx":270 * return buf * * def pack_map_header(self, size_t size): # <<<<<<<<<<<<<< * cdef int ret = msgpack_pack_map(&self.pk, size) * if ret == -1: */ static PyObject *__pyx_pf_6pandas_7msgpack_6Packer_10pack_map_header(struct __pyx_obj_6pandas_7msgpack_Packer *__pyx_v_self, size_t __pyx_v_size) { int __pyx_v_ret; PyObject *__pyx_v_buf = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("pack_map_header", 0); /* "pandas/msgpack.pyx":271 * * def pack_map_header(self, size_t size): * cdef int ret = msgpack_pack_map(&self.pk, size) # <<<<<<<<<<<<<< * if ret == -1: * raise MemoryError */ __pyx_v_ret = msgpack_pack_map((&__pyx_v_self->pk), __pyx_v_size); /* "pandas/msgpack.pyx":272 * def pack_map_header(self, size_t size): * cdef int ret = msgpack_pack_map(&self.pk, size) * if ret == -1: # <<<<<<<<<<<<<< * raise MemoryError * elif ret: # should not happen */ __pyx_t_1 = ((__pyx_v_ret == -1) != 0); if (__pyx_t_1) { /* "pandas/msgpack.pyx":273 * cdef int ret = msgpack_pack_map(&self.pk, size) * if ret == -1: * raise MemoryError # <<<<<<<<<<<<<< * elif ret: # should not happen * raise TypeError */ PyErr_NoMemory(); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 273; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L3; } /* "pandas/msgpack.pyx":274 * if ret == -1: * raise MemoryError * elif ret: # should not happen # <<<<<<<<<<<<<< * raise TypeError * if self.autoreset: */ __pyx_t_1 = (__pyx_v_ret != 0); if (__pyx_t_1) { /* "pandas/msgpack.pyx":275 * raise MemoryError * elif ret: # should not happen * raise TypeError # <<<<<<<<<<<<<< * if self.autoreset: * buf = PyBytes_FromStringAndSize(self.pk.buf, self.pk.length) */ __Pyx_Raise(__pyx_builtin_TypeError, 0, 0, 0); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 275; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L3; } __pyx_L3:; /* "pandas/msgpack.pyx":276 * elif ret: # should not happen * raise TypeError * if self.autoreset: # <<<<<<<<<<<<<< * buf = PyBytes_FromStringAndSize(self.pk.buf, self.pk.length) * self.pk.length = 0 */ __pyx_t_1 = (__pyx_v_self->autoreset != 0); if (__pyx_t_1) { /* "pandas/msgpack.pyx":277 * raise TypeError * if self.autoreset: * buf = PyBytes_FromStringAndSize(self.pk.buf, self.pk.length) # <<<<<<<<<<<<<< * self.pk.length = 0 * return buf */ __pyx_t_2 = ((PyObject *)PyBytes_FromStringAndSize(__pyx_v_self->pk.buf, __pyx_v_self->pk.length)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 277; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_v_buf = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; /* "pandas/msgpack.pyx":278 * if self.autoreset: * buf = PyBytes_FromStringAndSize(self.pk.buf, self.pk.length) * self.pk.length = 0 # <<<<<<<<<<<<<< * return buf * */ __pyx_v_self->pk.length = 0; /* "pandas/msgpack.pyx":279 * buf = PyBytes_FromStringAndSize(self.pk.buf, self.pk.length) * self.pk.length = 0 * return buf # <<<<<<<<<<<<<< * * def pack_map_pairs(self, object pairs): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_buf)); __pyx_r = ((PyObject *)__pyx_v_buf); goto __pyx_L0; goto __pyx_L4; } __pyx_L4:; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("pandas.msgpack.Packer.pack_map_header", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_buf); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_7msgpack_6Packer_13pack_map_pairs(PyObject *__pyx_v_self, PyObject *__pyx_v_pairs); /*proto*/ static char __pyx_doc_6pandas_7msgpack_6Packer_12pack_map_pairs[] = "Packer.pack_map_pairs(self, pairs)\n\n Pack *pairs* as msgpack map type.\n\n *pairs* should sequence of pair.\n (`len(pairs)` and `for k, v in *pairs*:` should be supported.)\n "; static PyObject *__pyx_pw_6pandas_7msgpack_6Packer_13pack_map_pairs(PyObject *__pyx_v_self, PyObject *__pyx_v_pairs) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("pack_map_pairs (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_7msgpack_6Packer_12pack_map_pairs(((struct __pyx_obj_6pandas_7msgpack_Packer *)__pyx_v_self), ((PyObject *)__pyx_v_pairs)); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/msgpack.pyx":281 * return buf * * def pack_map_pairs(self, object pairs): # <<<<<<<<<<<<<< * """ * Pack *pairs* as msgpack map type. */ static PyObject *__pyx_pf_6pandas_7msgpack_6Packer_12pack_map_pairs(struct __pyx_obj_6pandas_7msgpack_Packer *__pyx_v_self, PyObject *__pyx_v_pairs) { int __pyx_v_ret; PyObject *__pyx_v_k = NULL; PyObject *__pyx_v_v = NULL; PyObject *__pyx_v_buf = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *(*__pyx_t_4)(PyObject *); PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; PyObject *(*__pyx_t_9)(PyObject *); int __pyx_t_10; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("pack_map_pairs", 0); /* "pandas/msgpack.pyx":288 * (`len(pairs)` and `for k, v in *pairs*:` should be supported.) * """ * cdef int ret = msgpack_pack_map(&self.pk, len(pairs)) # <<<<<<<<<<<<<< * if ret == 0: * for k, v in pairs: */ __pyx_t_1 = PyObject_Length(__pyx_v_pairs); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 288; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_ret = msgpack_pack_map((&__pyx_v_self->pk), __pyx_t_1); /* "pandas/msgpack.pyx":289 * """ * cdef int ret = msgpack_pack_map(&self.pk, len(pairs)) * if ret == 0: # <<<<<<<<<<<<<< * for k, v in pairs: * ret = self._pack(k) */ __pyx_t_2 = ((__pyx_v_ret == 0) != 0); if (__pyx_t_2) { /* "pandas/msgpack.pyx":290 * cdef int ret = msgpack_pack_map(&self.pk, len(pairs)) * if ret == 0: * for k, v in pairs: # <<<<<<<<<<<<<< * ret = self._pack(k) * if ret != 0: break */ if (PyList_CheckExact(__pyx_v_pairs) || PyTuple_CheckExact(__pyx_v_pairs)) { __pyx_t_3 = __pyx_v_pairs; __Pyx_INCREF(__pyx_t_3); __pyx_t_1 = 0; __pyx_t_4 = NULL; } else { __pyx_t_1 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_pairs); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 290; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = Py_TYPE(__pyx_t_3)->tp_iternext; } for (;;) { if (!__pyx_t_4 && PyList_CheckExact(__pyx_t_3)) { if (__pyx_t_1 >= PyList_GET_SIZE(__pyx_t_3)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_5 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_1); __Pyx_INCREF(__pyx_t_5); __pyx_t_1++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 290; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_5 = PySequence_ITEM(__pyx_t_3, __pyx_t_1); __pyx_t_1++; if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 290; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif } else if (!__pyx_t_4 && PyTuple_CheckExact(__pyx_t_3)) { if (__pyx_t_1 >= PyTuple_GET_SIZE(__pyx_t_3)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_1); __Pyx_INCREF(__pyx_t_5); __pyx_t_1++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 290; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_5 = PySequence_ITEM(__pyx_t_3, __pyx_t_1); __pyx_t_1++; if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 290; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif } else { __pyx_t_5 = __pyx_t_4(__pyx_t_3); if (unlikely(!__pyx_t_5)) { if (PyErr_Occurred()) { if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear(); else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 290; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } break; } __Pyx_GOTREF(__pyx_t_5); } if ((likely(PyTuple_CheckExact(__pyx_t_5))) || (PyList_CheckExact(__pyx_t_5))) { PyObject* sequence = __pyx_t_5; #if CYTHON_COMPILING_IN_CPYTHON Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 290; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_6 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_7 = PyTuple_GET_ITEM(sequence, 1); } else { __pyx_t_6 = PyList_GET_ITEM(sequence, 0); __pyx_t_7 = PyList_GET_ITEM(sequence, 1); } __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(__pyx_t_7); #else __pyx_t_6 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 290; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 290; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); #endif __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } else { Py_ssize_t index = -1; __pyx_t_8 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 290; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_9 = Py_TYPE(__pyx_t_8)->tp_iternext; index = 0; __pyx_t_6 = __pyx_t_9(__pyx_t_8); if (unlikely(!__pyx_t_6)) goto __pyx_L6_unpacking_failed; __Pyx_GOTREF(__pyx_t_6); index = 1; __pyx_t_7 = __pyx_t_9(__pyx_t_8); if (unlikely(!__pyx_t_7)) goto __pyx_L6_unpacking_failed; __Pyx_GOTREF(__pyx_t_7); if (__Pyx_IternextUnpackEndCheck(__pyx_t_9(__pyx_t_8), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 290; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_9 = NULL; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; goto __pyx_L7_unpacking_done; __pyx_L6_unpacking_failed:; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_9 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 290; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_L7_unpacking_done:; } __Pyx_XDECREF_SET(__pyx_v_k, __pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF_SET(__pyx_v_v, __pyx_t_7); __pyx_t_7 = 0; /* "pandas/msgpack.pyx":291 * if ret == 0: * for k, v in pairs: * ret = self._pack(k) # <<<<<<<<<<<<<< * if ret != 0: break * ret = self._pack(v) */ __pyx_t_10 = ((struct __pyx_vtabstruct_6pandas_7msgpack_Packer *)__pyx_v_self->__pyx_vtab)->_pack(__pyx_v_self, __pyx_v_k, NULL); if (unlikely(__pyx_t_10 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 291; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_ret = __pyx_t_10; /* "pandas/msgpack.pyx":292 * for k, v in pairs: * ret = self._pack(k) * if ret != 0: break # <<<<<<<<<<<<<< * ret = self._pack(v) * if ret != 0: break */ __pyx_t_2 = ((__pyx_v_ret != 0) != 0); if (__pyx_t_2) { goto __pyx_L5_break; goto __pyx_L8; } __pyx_L8:; /* "pandas/msgpack.pyx":293 * ret = self._pack(k) * if ret != 0: break * ret = self._pack(v) # <<<<<<<<<<<<<< * if ret != 0: break * if ret == -1: */ __pyx_t_10 = ((struct __pyx_vtabstruct_6pandas_7msgpack_Packer *)__pyx_v_self->__pyx_vtab)->_pack(__pyx_v_self, __pyx_v_v, NULL); if (unlikely(__pyx_t_10 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 293; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_ret = __pyx_t_10; /* "pandas/msgpack.pyx":294 * if ret != 0: break * ret = self._pack(v) * if ret != 0: break # <<<<<<<<<<<<<< * if ret == -1: * raise MemoryError */ __pyx_t_2 = ((__pyx_v_ret != 0) != 0); if (__pyx_t_2) { goto __pyx_L5_break; goto __pyx_L9; } __pyx_L9:; } __pyx_L5_break:; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L3; } __pyx_L3:; /* "pandas/msgpack.pyx":295 * ret = self._pack(v) * if ret != 0: break * if ret == -1: # <<<<<<<<<<<<<< * raise MemoryError * elif ret: # should not happen */ __pyx_t_2 = ((__pyx_v_ret == -1) != 0); if (__pyx_t_2) { /* "pandas/msgpack.pyx":296 * if ret != 0: break * if ret == -1: * raise MemoryError # <<<<<<<<<<<<<< * elif ret: # should not happen * raise TypeError */ PyErr_NoMemory(); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 296; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L10; } /* "pandas/msgpack.pyx":297 * if ret == -1: * raise MemoryError * elif ret: # should not happen # <<<<<<<<<<<<<< * raise TypeError * if self.autoreset: */ __pyx_t_2 = (__pyx_v_ret != 0); if (__pyx_t_2) { /* "pandas/msgpack.pyx":298 * raise MemoryError * elif ret: # should not happen * raise TypeError # <<<<<<<<<<<<<< * if self.autoreset: * buf = PyBytes_FromStringAndSize(self.pk.buf, self.pk.length) */ __Pyx_Raise(__pyx_builtin_TypeError, 0, 0, 0); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 298; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L10; } __pyx_L10:; /* "pandas/msgpack.pyx":299 * elif ret: # should not happen * raise TypeError * if self.autoreset: # <<<<<<<<<<<<<< * buf = PyBytes_FromStringAndSize(self.pk.buf, self.pk.length) * self.pk.length = 0 */ __pyx_t_2 = (__pyx_v_self->autoreset != 0); if (__pyx_t_2) { /* "pandas/msgpack.pyx":300 * raise TypeError * if self.autoreset: * buf = PyBytes_FromStringAndSize(self.pk.buf, self.pk.length) # <<<<<<<<<<<<<< * self.pk.length = 0 * return buf */ __pyx_t_3 = ((PyObject *)PyBytes_FromStringAndSize(__pyx_v_self->pk.buf, __pyx_v_self->pk.length)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 300; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_v_buf = ((PyObject*)__pyx_t_3); __pyx_t_3 = 0; /* "pandas/msgpack.pyx":301 * if self.autoreset: * buf = PyBytes_FromStringAndSize(self.pk.buf, self.pk.length) * self.pk.length = 0 # <<<<<<<<<<<<<< * return buf * */ __pyx_v_self->pk.length = 0; /* "pandas/msgpack.pyx":302 * buf = PyBytes_FromStringAndSize(self.pk.buf, self.pk.length) * self.pk.length = 0 * return buf # <<<<<<<<<<<<<< * * def reset(self): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_buf)); __pyx_r = ((PyObject *)__pyx_v_buf); goto __pyx_L0; goto __pyx_L11; } __pyx_L11:; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_AddTraceback("pandas.msgpack.Packer.pack_map_pairs", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_k); __Pyx_XDECREF(__pyx_v_v); __Pyx_XDECREF(__pyx_v_buf); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_7msgpack_6Packer_15reset(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_6pandas_7msgpack_6Packer_14reset[] = "Packer.reset(self)\nClear internal buffer."; static PyObject *__pyx_pw_6pandas_7msgpack_6Packer_15reset(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("reset (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_7msgpack_6Packer_14reset(((struct __pyx_obj_6pandas_7msgpack_Packer *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/msgpack.pyx":304 * return buf * * def reset(self): # <<<<<<<<<<<<<< * """Clear internal buffer.""" * self.pk.length = 0 */ static PyObject *__pyx_pf_6pandas_7msgpack_6Packer_14reset(struct __pyx_obj_6pandas_7msgpack_Packer *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("reset", 0); /* "pandas/msgpack.pyx":306 * def reset(self): * """Clear internal buffer.""" * self.pk.length = 0 # <<<<<<<<<<<<<< * * def bytes(self): */ __pyx_v_self->pk.length = 0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_7msgpack_6Packer_17bytes(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_6pandas_7msgpack_6Packer_16bytes[] = "Packer.bytes(self)\nReturn buffer content."; static PyObject *__pyx_pw_6pandas_7msgpack_6Packer_17bytes(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("bytes (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_7msgpack_6Packer_16bytes(((struct __pyx_obj_6pandas_7msgpack_Packer *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/msgpack.pyx":308 * self.pk.length = 0 * * def bytes(self): # <<<<<<<<<<<<<< * """Return buffer content.""" * return PyBytes_FromStringAndSize(self.pk.buf, self.pk.length) */ static PyObject *__pyx_pf_6pandas_7msgpack_6Packer_16bytes(struct __pyx_obj_6pandas_7msgpack_Packer *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("bytes", 0); /* "pandas/msgpack.pyx":310 * def bytes(self): * """Return buffer content.""" * return PyBytes_FromStringAndSize(self.pk.buf, self.pk.length) # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = ((PyObject *)PyBytes_FromStringAndSize(__pyx_v_self->pk.buf, __pyx_v_self->pk.length)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 310; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas.msgpack.Packer.bytes", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/msgpack.pyx":313 * * * cdef inline pack_pair(self, object k, object v, int nest_limit): # <<<<<<<<<<<<<< * ret = self._pack(k, nest_limit-1) * if ret != 0: raise PackException("cannot pack : %s" % k) */ static CYTHON_INLINE PyObject *__pyx_f_6pandas_7msgpack_6Packer_pack_pair(struct __pyx_obj_6pandas_7msgpack_Packer *__pyx_v_self, PyObject *__pyx_v_k, PyObject *__pyx_v_v, int __pyx_v_nest_limit) { int __pyx_v_ret; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; struct __pyx_opt_args_6pandas_7msgpack_6Packer__pack __pyx_t_2; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("pack_pair", 0); /* "pandas/msgpack.pyx":314 * * cdef inline pack_pair(self, object k, object v, int nest_limit): * ret = self._pack(k, nest_limit-1) # <<<<<<<<<<<<<< * if ret != 0: raise PackException("cannot pack : %s" % k) * ret = self._pack(v, nest_limit-1) */ __pyx_t_2.__pyx_n = 1; __pyx_t_2.nest_limit = (__pyx_v_nest_limit - 1); __pyx_t_1 = ((struct __pyx_vtabstruct_6pandas_7msgpack_Packer *)__pyx_v_self->__pyx_vtab)->_pack(__pyx_v_self, __pyx_v_k, &__pyx_t_2); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 314; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_ret = __pyx_t_1; /* "pandas/msgpack.pyx":315 * cdef inline pack_pair(self, object k, object v, int nest_limit): * ret = self._pack(k, nest_limit-1) * if ret != 0: raise PackException("cannot pack : %s" % k) # <<<<<<<<<<<<<< * ret = self._pack(v, nest_limit-1) * if ret != 0: raise PackException("cannot pack : %s" % v) */ __pyx_t_3 = ((__pyx_v_ret != 0) != 0); if (__pyx_t_3) { __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s__PackException); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 315; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_16), __pyx_v_k); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 315; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_5)); __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 315; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_t_5)); __Pyx_GIVEREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; __pyx_t_5 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 315; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0; __Pyx_Raise(__pyx_t_5, 0, 0, 0); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 315; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L3; } __pyx_L3:; /* "pandas/msgpack.pyx":316 * ret = self._pack(k, nest_limit-1) * if ret != 0: raise PackException("cannot pack : %s" % k) * ret = self._pack(v, nest_limit-1) # <<<<<<<<<<<<<< * if ret != 0: raise PackException("cannot pack : %s" % v) * return ret */ __pyx_t_2.__pyx_n = 1; __pyx_t_2.nest_limit = (__pyx_v_nest_limit - 1); __pyx_t_1 = ((struct __pyx_vtabstruct_6pandas_7msgpack_Packer *)__pyx_v_self->__pyx_vtab)->_pack(__pyx_v_self, __pyx_v_v, &__pyx_t_2); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 316; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_ret = __pyx_t_1; /* "pandas/msgpack.pyx":317 * if ret != 0: raise PackException("cannot pack : %s" % k) * ret = self._pack(v, nest_limit-1) * if ret != 0: raise PackException("cannot pack : %s" % v) # <<<<<<<<<<<<<< * return ret * */ __pyx_t_3 = ((__pyx_v_ret != 0) != 0); if (__pyx_t_3) { __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s__PackException); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 317; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_16), __pyx_v_v); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 317; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_6)); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 317; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_t_6)); __Pyx_GIVEREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0; __pyx_t_6 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 317; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __Pyx_Raise(__pyx_t_6, 0, 0, 0); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 317; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L4; } __pyx_L4:; /* "pandas/msgpack.pyx":318 * ret = self._pack(v, nest_limit-1) * if ret != 0: raise PackException("cannot pack : %s" % v) * return ret # <<<<<<<<<<<<<< * * def pack(object o, object stream, default=None, encoding='utf-8', unicode_errors='strict'): */ __Pyx_XDECREF(__pyx_r); __pyx_t_6 = PyInt_FromLong(__pyx_v_ret); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 318; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_r = __pyx_t_6; __pyx_t_6 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("pandas.msgpack.Packer.pack_pair", __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_7msgpack_1pack(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6pandas_7msgpack_pack[] = "pack(o, stream, default=None, encoding='utf-8', unicode_errors='strict')\n\n pack an object `o` and write it to stream)."; static PyMethodDef __pyx_mdef_6pandas_7msgpack_1pack = {__Pyx_NAMESTR("pack"), (PyCFunction)__pyx_pw_6pandas_7msgpack_1pack, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_7msgpack_pack)}; static PyObject *__pyx_pw_6pandas_7msgpack_1pack(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_o = 0; PyObject *__pyx_v_stream = 0; PyObject *__pyx_v_default = 0; PyObject *__pyx_v_encoding = 0; PyObject *__pyx_v_unicode_errors = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("pack (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__o,&__pyx_n_s__stream,&__pyx_n_s__default,&__pyx_n_s__encoding,&__pyx_n_s__unicode_errors,0}; PyObject* values[5] = {0,0,0,0,0}; /* "pandas/msgpack.pyx":320 * return ret * * def pack(object o, object stream, default=None, encoding='utf-8', unicode_errors='strict'): # <<<<<<<<<<<<<< * """ * pack an object `o` and write it to stream).""" */ values[2] = ((PyObject *)Py_None); values[3] = ((PyObject *)__pyx_kp_s_4); values[4] = ((PyObject *)__pyx_n_s__strict); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__o)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__stream)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("pack", 0, 2, 5, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 320; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__default); if (value) { values[2] = value; kw_args--; } } case 3: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__encoding); if (value) { values[3] = value; kw_args--; } } case 4: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__unicode_errors); if (value) { values[4] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "pack") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 320; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_o = values[0]; __pyx_v_stream = values[1]; __pyx_v_default = values[2]; __pyx_v_encoding = values[3]; __pyx_v_unicode_errors = values[4]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("pack", 0, 2, 5, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 320; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.msgpack.pack", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pandas_7msgpack_pack(__pyx_self, __pyx_v_o, __pyx_v_stream, __pyx_v_default, __pyx_v_encoding, __pyx_v_unicode_errors); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_7msgpack_pack(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_o, PyObject *__pyx_v_stream, PyObject *__pyx_v_default, PyObject *__pyx_v_encoding, PyObject *__pyx_v_unicode_errors) { struct __pyx_obj_6pandas_7msgpack_Packer *__pyx_v_packer = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("pack", 0); /* "pandas/msgpack.pyx":323 * """ * pack an object `o` and write it to stream).""" * packer = Packer(default=default, encoding=encoding, unicode_errors=unicode_errors) # <<<<<<<<<<<<<< * stream.write(packer.pack(o)) * */ __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 323; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_1)); if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__default), __pyx_v_default) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 323; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__encoding), __pyx_v_encoding) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 323; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__unicode_errors), __pyx_v_unicode_errors) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 323; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_6pandas_7msgpack_Packer)), ((PyObject *)__pyx_empty_tuple), ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 323; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_v_packer = ((struct __pyx_obj_6pandas_7msgpack_Packer *)__pyx_t_2); __pyx_t_2 = 0; /* "pandas/msgpack.pyx":324 * pack an object `o` and write it to stream).""" * packer = Packer(default=default, encoding=encoding, unicode_errors=unicode_errors) * stream.write(packer.pack(o)) # <<<<<<<<<<<<<< * * def packb(object o, default=None, encoding='utf-8', unicode_errors='strict', use_single_float=False): */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_stream, __pyx_n_s__write); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 324; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = ((struct __pyx_vtabstruct_6pandas_7msgpack_Packer *)__pyx_v_packer->__pyx_vtab)->pack(__pyx_v_packer, __pyx_v_o, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 324; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 324; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 324; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("pandas.msgpack.pack", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_packer); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_7msgpack_3packb(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6pandas_7msgpack_2packb[] = "packb(o, default=None, encoding='utf-8', unicode_errors='strict', use_single_float=False)\n\n pack o and return packed bytes."; static PyMethodDef __pyx_mdef_6pandas_7msgpack_3packb = {__Pyx_NAMESTR("packb"), (PyCFunction)__pyx_pw_6pandas_7msgpack_3packb, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_7msgpack_2packb)}; static PyObject *__pyx_pw_6pandas_7msgpack_3packb(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_o = 0; PyObject *__pyx_v_default = 0; PyObject *__pyx_v_encoding = 0; PyObject *__pyx_v_unicode_errors = 0; PyObject *__pyx_v_use_single_float = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("packb (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__o,&__pyx_n_s__default,&__pyx_n_s__encoding,&__pyx_n_s__unicode_errors,&__pyx_n_s__use_single_float,0}; PyObject* values[5] = {0,0,0,0,0}; /* "pandas/msgpack.pyx":326 * stream.write(packer.pack(o)) * * def packb(object o, default=None, encoding='utf-8', unicode_errors='strict', use_single_float=False): # <<<<<<<<<<<<<< * """ * pack o and return packed bytes.""" */ values[1] = ((PyObject *)Py_None); values[2] = ((PyObject *)__pyx_kp_s_4); values[3] = ((PyObject *)__pyx_n_s__strict); values[4] = __pyx_k_17; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__o)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__default); if (value) { values[1] = value; kw_args--; } } case 2: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__encoding); if (value) { values[2] = value; kw_args--; } } case 3: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__unicode_errors); if (value) { values[3] = value; kw_args--; } } case 4: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__use_single_float); if (value) { values[4] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "packb") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 326; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_o = values[0]; __pyx_v_default = values[1]; __pyx_v_encoding = values[2]; __pyx_v_unicode_errors = values[3]; __pyx_v_use_single_float = values[4]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("packb", 0, 1, 5, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 326; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.msgpack.packb", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pandas_7msgpack_2packb(__pyx_self, __pyx_v_o, __pyx_v_default, __pyx_v_encoding, __pyx_v_unicode_errors, __pyx_v_use_single_float); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_7msgpack_2packb(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_o, PyObject *__pyx_v_default, PyObject *__pyx_v_encoding, PyObject *__pyx_v_unicode_errors, PyObject *__pyx_v_use_single_float) { struct __pyx_obj_6pandas_7msgpack_Packer *__pyx_v_packer = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("packb", 0); /* "pandas/msgpack.pyx":329 * """ * pack o and return packed bytes.""" * packer = Packer(default=default, encoding=encoding, unicode_errors=unicode_errors, # <<<<<<<<<<<<<< * use_single_float=use_single_float) * return packer.pack(o) */ __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 329; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_1)); if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__default), __pyx_v_default) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 329; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__encoding), __pyx_v_encoding) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 329; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__unicode_errors), __pyx_v_unicode_errors) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 329; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/msgpack.pyx":330 * pack o and return packed bytes.""" * packer = Packer(default=default, encoding=encoding, unicode_errors=unicode_errors, * use_single_float=use_single_float) # <<<<<<<<<<<<<< * return packer.pack(o) * */ if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__use_single_float), __pyx_v_use_single_float) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 329; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_6pandas_7msgpack_Packer)), ((PyObject *)__pyx_empty_tuple), ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 329; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_v_packer = ((struct __pyx_obj_6pandas_7msgpack_Packer *)__pyx_t_2); __pyx_t_2 = 0; /* "pandas/msgpack.pyx":331 * packer = Packer(default=default, encoding=encoding, unicode_errors=unicode_errors, * use_single_float=use_single_float) * return packer.pack(o) # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = ((struct __pyx_vtabstruct_6pandas_7msgpack_Packer *)__pyx_v_packer->__pyx_vtab)->pack(__pyx_v_packer, __pyx_v_o, 0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 331; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("pandas.msgpack.packb", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_packer); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/msgpack.pyx":334 * * * cdef inline init_ctx(template_context *ctx, # <<<<<<<<<<<<<< * object object_hook, object object_pairs_hook, object list_hook, * bint use_list, char* encoding, char* unicode_errors): */ static CYTHON_INLINE PyObject *__pyx_f_6pandas_7msgpack_init_ctx(template_context *__pyx_v_ctx, PyObject *__pyx_v_object_hook, PyObject *__pyx_v_object_pairs_hook, PyObject *__pyx_v_list_hook, int __pyx_v_use_list, char *__pyx_v_encoding, char *__pyx_v_unicode_errors) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("init_ctx", 0); /* "pandas/msgpack.pyx":337 * object object_hook, object object_pairs_hook, object list_hook, * bint use_list, char* encoding, char* unicode_errors): * template_init(ctx) # <<<<<<<<<<<<<< * ctx.user.use_list = use_list * ctx.user.object_hook = ctx.user.list_hook = NULL */ template_init(__pyx_v_ctx); /* "pandas/msgpack.pyx":338 * bint use_list, char* encoding, char* unicode_errors): * template_init(ctx) * ctx.user.use_list = use_list # <<<<<<<<<<<<<< * ctx.user.object_hook = ctx.user.list_hook = NULL * */ __pyx_v_ctx->user.use_list = __pyx_v_use_list; /* "pandas/msgpack.pyx":339 * template_init(ctx) * ctx.user.use_list = use_list * ctx.user.object_hook = ctx.user.list_hook = NULL # <<<<<<<<<<<<<< * * if object_hook is not None and object_pairs_hook is not None: */ __pyx_v_ctx->user.object_hook = ((PyObject *)NULL); __pyx_v_ctx->user.list_hook = ((PyObject *)NULL); /* "pandas/msgpack.pyx":341 * ctx.user.object_hook = ctx.user.list_hook = NULL * * if object_hook is not None and object_pairs_hook is not None: # <<<<<<<<<<<<<< * raise ValueError("object_pairs_hook and object_hook are mutually exclusive.") * */ __pyx_t_1 = (__pyx_v_object_hook != Py_None); if ((__pyx_t_1 != 0)) { __pyx_t_2 = (__pyx_v_object_pairs_hook != Py_None); __pyx_t_3 = (__pyx_t_2 != 0); } else { __pyx_t_3 = (__pyx_t_1 != 0); } if (__pyx_t_3) { /* "pandas/msgpack.pyx":342 * * if object_hook is not None and object_pairs_hook is not None: * raise ValueError("object_pairs_hook and object_hook are mutually exclusive.") # <<<<<<<<<<<<<< * * if object_hook is not None: */ __pyx_t_4 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_19), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 342; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 342; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L3; } __pyx_L3:; /* "pandas/msgpack.pyx":344 * raise ValueError("object_pairs_hook and object_hook are mutually exclusive.") * * if object_hook is not None: # <<<<<<<<<<<<<< * if not PyCallable_Check(object_hook): * raise TypeError("object_hook must be a callable.") */ __pyx_t_3 = (__pyx_v_object_hook != Py_None); __pyx_t_1 = (__pyx_t_3 != 0); if (__pyx_t_1) { /* "pandas/msgpack.pyx":345 * * if object_hook is not None: * if not PyCallable_Check(object_hook): # <<<<<<<<<<<<<< * raise TypeError("object_hook must be a callable.") * ctx.user.object_hook = object_hook */ __pyx_t_1 = ((!(PyCallable_Check(__pyx_v_object_hook) != 0)) != 0); if (__pyx_t_1) { /* "pandas/msgpack.pyx":346 * if object_hook is not None: * if not PyCallable_Check(object_hook): * raise TypeError("object_hook must be a callable.") # <<<<<<<<<<<<<< * ctx.user.object_hook = object_hook * */ __pyx_t_4 = PyObject_Call(__pyx_builtin_TypeError, ((PyObject *)__pyx_k_tuple_21), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 346; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 346; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L5; } __pyx_L5:; /* "pandas/msgpack.pyx":347 * if not PyCallable_Check(object_hook): * raise TypeError("object_hook must be a callable.") * ctx.user.object_hook = object_hook # <<<<<<<<<<<<<< * * if object_pairs_hook is None: */ __pyx_v_ctx->user.object_hook = ((PyObject *)__pyx_v_object_hook); goto __pyx_L4; } __pyx_L4:; /* "pandas/msgpack.pyx":349 * ctx.user.object_hook = object_hook * * if object_pairs_hook is None: # <<<<<<<<<<<<<< * ctx.user.has_pairs_hook = False * else: */ __pyx_t_1 = (__pyx_v_object_pairs_hook == Py_None); __pyx_t_3 = (__pyx_t_1 != 0); if (__pyx_t_3) { /* "pandas/msgpack.pyx":350 * * if object_pairs_hook is None: * ctx.user.has_pairs_hook = False # <<<<<<<<<<<<<< * else: * if not PyCallable_Check(object_pairs_hook): */ __pyx_v_ctx->user.has_pairs_hook = 0; goto __pyx_L6; } /*else*/ { /* "pandas/msgpack.pyx":352 * ctx.user.has_pairs_hook = False * else: * if not PyCallable_Check(object_pairs_hook): # <<<<<<<<<<<<<< * raise TypeError("object_pairs_hook must be a callable.") * ctx.user.object_hook = object_pairs_hook */ __pyx_t_3 = ((!(PyCallable_Check(__pyx_v_object_pairs_hook) != 0)) != 0); if (__pyx_t_3) { /* "pandas/msgpack.pyx":353 * else: * if not PyCallable_Check(object_pairs_hook): * raise TypeError("object_pairs_hook must be a callable.") # <<<<<<<<<<<<<< * ctx.user.object_hook = object_pairs_hook * ctx.user.has_pairs_hook = True */ __pyx_t_4 = PyObject_Call(__pyx_builtin_TypeError, ((PyObject *)__pyx_k_tuple_23), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 353; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 353; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L7; } __pyx_L7:; /* "pandas/msgpack.pyx":354 * if not PyCallable_Check(object_pairs_hook): * raise TypeError("object_pairs_hook must be a callable.") * ctx.user.object_hook = object_pairs_hook # <<<<<<<<<<<<<< * ctx.user.has_pairs_hook = True * */ __pyx_v_ctx->user.object_hook = ((PyObject *)__pyx_v_object_pairs_hook); /* "pandas/msgpack.pyx":355 * raise TypeError("object_pairs_hook must be a callable.") * ctx.user.object_hook = object_pairs_hook * ctx.user.has_pairs_hook = True # <<<<<<<<<<<<<< * * if list_hook is not None: */ __pyx_v_ctx->user.has_pairs_hook = 1; } __pyx_L6:; /* "pandas/msgpack.pyx":357 * ctx.user.has_pairs_hook = True * * if list_hook is not None: # <<<<<<<<<<<<<< * if not PyCallable_Check(list_hook): * raise TypeError("list_hook must be a callable.") */ __pyx_t_3 = (__pyx_v_list_hook != Py_None); __pyx_t_1 = (__pyx_t_3 != 0); if (__pyx_t_1) { /* "pandas/msgpack.pyx":358 * * if list_hook is not None: * if not PyCallable_Check(list_hook): # <<<<<<<<<<<<<< * raise TypeError("list_hook must be a callable.") * ctx.user.list_hook = list_hook */ __pyx_t_1 = ((!(PyCallable_Check(__pyx_v_list_hook) != 0)) != 0); if (__pyx_t_1) { /* "pandas/msgpack.pyx":359 * if list_hook is not None: * if not PyCallable_Check(list_hook): * raise TypeError("list_hook must be a callable.") # <<<<<<<<<<<<<< * ctx.user.list_hook = list_hook * */ __pyx_t_4 = PyObject_Call(__pyx_builtin_TypeError, ((PyObject *)__pyx_k_tuple_25), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 359; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 359; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L9; } __pyx_L9:; /* "pandas/msgpack.pyx":360 * if not PyCallable_Check(list_hook): * raise TypeError("list_hook must be a callable.") * ctx.user.list_hook = list_hook # <<<<<<<<<<<<<< * * ctx.user.encoding = encoding */ __pyx_v_ctx->user.list_hook = ((PyObject *)__pyx_v_list_hook); goto __pyx_L8; } __pyx_L8:; /* "pandas/msgpack.pyx":362 * ctx.user.list_hook = list_hook * * ctx.user.encoding = encoding # <<<<<<<<<<<<<< * ctx.user.unicode_errors = unicode_errors * */ __pyx_v_ctx->user.encoding = __pyx_v_encoding; /* "pandas/msgpack.pyx":363 * * ctx.user.encoding = encoding * ctx.user.unicode_errors = unicode_errors # <<<<<<<<<<<<<< * * def unpackb(object packed, object object_hook=None, object list_hook=None, */ __pyx_v_ctx->user.unicode_errors = __pyx_v_unicode_errors; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("pandas.msgpack.init_ctx", __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_7msgpack_5unpackb(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6pandas_7msgpack_4unpackb[] = "unpackb(packed, object_hook=None, list_hook=None, bool use_list=1, encoding=None, unicode_errors='strict', object_pairs_hook=None)\nUnpack packed_bytes to object. Returns an unpacked object.\n\n Raises `ValueError` when `packed` contains extra bytes.\n "; static PyMethodDef __pyx_mdef_6pandas_7msgpack_5unpackb = {__Pyx_NAMESTR("unpackb"), (PyCFunction)__pyx_pw_6pandas_7msgpack_5unpackb, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_7msgpack_4unpackb)}; static PyObject *__pyx_pw_6pandas_7msgpack_5unpackb(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_packed = 0; PyObject *__pyx_v_object_hook = 0; PyObject *__pyx_v_list_hook = 0; int __pyx_v_use_list; PyObject *__pyx_v_encoding = 0; PyObject *__pyx_v_unicode_errors = 0; PyObject *__pyx_v_object_pairs_hook = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("unpackb (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__packed,&__pyx_n_s__object_hook,&__pyx_n_s__list_hook,&__pyx_n_s__use_list,&__pyx_n_s__encoding,&__pyx_n_s__unicode_errors,&__pyx_n_s__object_pairs_hook,0}; PyObject* values[7] = {0,0,0,0,0,0,0}; /* "pandas/msgpack.pyx":365 * ctx.user.unicode_errors = unicode_errors * * def unpackb(object packed, object object_hook=None, object list_hook=None, # <<<<<<<<<<<<<< * bint use_list=1, encoding=None, unicode_errors="strict", * object_pairs_hook=None, */ values[1] = ((PyObject *)Py_None); values[2] = ((PyObject *)Py_None); /* "pandas/msgpack.pyx":366 * * def unpackb(object packed, object object_hook=None, object list_hook=None, * bint use_list=1, encoding=None, unicode_errors="strict", # <<<<<<<<<<<<<< * object_pairs_hook=None, * ): */ values[4] = ((PyObject *)Py_None); values[5] = ((PyObject *)__pyx_n_s__strict); /* "pandas/msgpack.pyx":367 * def unpackb(object packed, object object_hook=None, object list_hook=None, * bint use_list=1, encoding=None, unicode_errors="strict", * object_pairs_hook=None, # <<<<<<<<<<<<<< * ): * """Unpack packed_bytes to object. Returns an unpacked object. */ values[6] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6); case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5); case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__packed)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__object_hook); if (value) { values[1] = value; kw_args--; } } case 2: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__list_hook); if (value) { values[2] = value; kw_args--; } } case 3: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__use_list); if (value) { values[3] = value; kw_args--; } } case 4: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__encoding); if (value) { values[4] = value; kw_args--; } } case 5: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__unicode_errors); if (value) { values[5] = value; kw_args--; } } case 6: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__object_pairs_hook); if (value) { values[6] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "unpackb") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 365; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6); case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5); case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_packed = values[0]; __pyx_v_object_hook = values[1]; __pyx_v_list_hook = values[2]; if (values[3]) { __pyx_v_use_list = __Pyx_PyObject_IsTrue(values[3]); if (unlikely((__pyx_v_use_list == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 366; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } else { __pyx_v_use_list = ((int)1); } __pyx_v_encoding = values[4]; __pyx_v_unicode_errors = values[5]; __pyx_v_object_pairs_hook = values[6]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("unpackb", 0, 1, 7, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 365; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.msgpack.unpackb", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pandas_7msgpack_4unpackb(__pyx_self, __pyx_v_packed, __pyx_v_object_hook, __pyx_v_list_hook, __pyx_v_use_list, __pyx_v_encoding, __pyx_v_unicode_errors, __pyx_v_object_pairs_hook); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/msgpack.pyx":365 * ctx.user.unicode_errors = unicode_errors * * def unpackb(object packed, object object_hook=None, object list_hook=None, # <<<<<<<<<<<<<< * bint use_list=1, encoding=None, unicode_errors="strict", * object_pairs_hook=None, */ static PyObject *__pyx_pf_6pandas_7msgpack_4unpackb(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_packed, PyObject *__pyx_v_object_hook, PyObject *__pyx_v_list_hook, int __pyx_v_use_list, PyObject *__pyx_v_encoding, PyObject *__pyx_v_unicode_errors, PyObject *__pyx_v_object_pairs_hook) { template_context __pyx_v_ctx; size_t __pyx_v_off; int __pyx_v_ret; char *__pyx_v_buf; Py_ssize_t __pyx_v_buf_len; char *__pyx_v_cenc; char *__pyx_v_cerr; PyObject *__pyx_v_obj = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; char *__pyx_t_6; PyObject *__pyx_t_7 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("unpackb", 0); __Pyx_INCREF(__pyx_v_encoding); __Pyx_INCREF(__pyx_v_unicode_errors); /* "pandas/msgpack.pyx":374 * """ * cdef template_context ctx * cdef size_t off = 0 # <<<<<<<<<<<<<< * cdef int ret * */ __pyx_v_off = 0; /* "pandas/msgpack.pyx":379 * cdef char* buf * cdef Py_ssize_t buf_len * cdef char* cenc = NULL # <<<<<<<<<<<<<< * cdef char* cerr = NULL * */ __pyx_v_cenc = NULL; /* "pandas/msgpack.pyx":380 * cdef Py_ssize_t buf_len * cdef char* cenc = NULL * cdef char* cerr = NULL # <<<<<<<<<<<<<< * * PyObject_AsReadBuffer(packed, &buf, &buf_len) */ __pyx_v_cerr = NULL; /* "pandas/msgpack.pyx":382 * cdef char* cerr = NULL * * PyObject_AsReadBuffer(packed, &buf, &buf_len) # <<<<<<<<<<<<<< * * if encoding is not None: */ __pyx_t_1 = PyObject_AsReadBuffer(__pyx_v_packed, ((const void* *)(&__pyx_v_buf)), (&__pyx_v_buf_len)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 382; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/msgpack.pyx":384 * PyObject_AsReadBuffer(packed, &buf, &buf_len) * * if encoding is not None: # <<<<<<<<<<<<<< * if isinstance(encoding, unicode): * encoding = encoding.encode('ascii') */ __pyx_t_2 = (__pyx_v_encoding != Py_None); __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { /* "pandas/msgpack.pyx":385 * * if encoding is not None: * if isinstance(encoding, unicode): # <<<<<<<<<<<<<< * encoding = encoding.encode('ascii') * cenc = PyBytes_AsString(encoding) */ __pyx_t_3 = PyUnicode_Check(__pyx_v_encoding); __pyx_t_2 = (__pyx_t_3 != 0); if (__pyx_t_2) { /* "pandas/msgpack.pyx":386 * if encoding is not None: * if isinstance(encoding, unicode): * encoding = encoding.encode('ascii') # <<<<<<<<<<<<<< * cenc = PyBytes_AsString(encoding) * */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_encoding, __pyx_n_s__encode); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 386; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_k_tuple_26), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 386; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF_SET(__pyx_v_encoding, __pyx_t_5); __pyx_t_5 = 0; goto __pyx_L4; } __pyx_L4:; /* "pandas/msgpack.pyx":387 * if isinstance(encoding, unicode): * encoding = encoding.encode('ascii') * cenc = PyBytes_AsString(encoding) # <<<<<<<<<<<<<< * * if unicode_errors is not None: */ __pyx_t_6 = PyBytes_AsString(__pyx_v_encoding); if (unlikely(__pyx_t_6 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 387; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_cenc = __pyx_t_6; goto __pyx_L3; } __pyx_L3:; /* "pandas/msgpack.pyx":389 * cenc = PyBytes_AsString(encoding) * * if unicode_errors is not None: # <<<<<<<<<<<<<< * if isinstance(unicode_errors, unicode): * unicode_errors = unicode_errors.encode('ascii') */ __pyx_t_2 = (__pyx_v_unicode_errors != Py_None); __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { /* "pandas/msgpack.pyx":390 * * if unicode_errors is not None: * if isinstance(unicode_errors, unicode): # <<<<<<<<<<<<<< * unicode_errors = unicode_errors.encode('ascii') * cerr = PyBytes_AsString(unicode_errors) */ __pyx_t_3 = PyUnicode_Check(__pyx_v_unicode_errors); __pyx_t_2 = (__pyx_t_3 != 0); if (__pyx_t_2) { /* "pandas/msgpack.pyx":391 * if unicode_errors is not None: * if isinstance(unicode_errors, unicode): * unicode_errors = unicode_errors.encode('ascii') # <<<<<<<<<<<<<< * cerr = PyBytes_AsString(unicode_errors) * */ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_unicode_errors, __pyx_n_s__encode); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 391; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_k_tuple_27), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 391; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF_SET(__pyx_v_unicode_errors, __pyx_t_4); __pyx_t_4 = 0; goto __pyx_L6; } __pyx_L6:; /* "pandas/msgpack.pyx":392 * if isinstance(unicode_errors, unicode): * unicode_errors = unicode_errors.encode('ascii') * cerr = PyBytes_AsString(unicode_errors) # <<<<<<<<<<<<<< * * init_ctx(&ctx, object_hook, object_pairs_hook, list_hook, use_list, cenc, cerr) */ __pyx_t_6 = PyBytes_AsString(__pyx_v_unicode_errors); if (unlikely(__pyx_t_6 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 392; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_cerr = __pyx_t_6; goto __pyx_L5; } __pyx_L5:; /* "pandas/msgpack.pyx":394 * cerr = PyBytes_AsString(unicode_errors) * * init_ctx(&ctx, object_hook, object_pairs_hook, list_hook, use_list, cenc, cerr) # <<<<<<<<<<<<<< * ret = template_construct(&ctx, buf, buf_len, &off) * if ret == 1: */ __pyx_t_4 = __pyx_f_6pandas_7msgpack_init_ctx((&__pyx_v_ctx), __pyx_v_object_hook, __pyx_v_object_pairs_hook, __pyx_v_list_hook, __pyx_v_use_list, __pyx_v_cenc, __pyx_v_cerr); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 394; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "pandas/msgpack.pyx":395 * * init_ctx(&ctx, object_hook, object_pairs_hook, list_hook, use_list, cenc, cerr) * ret = template_construct(&ctx, buf, buf_len, &off) # <<<<<<<<<<<<<< * if ret == 1: * obj = template_data(&ctx) */ __pyx_t_1 = template_construct((&__pyx_v_ctx), __pyx_v_buf, __pyx_v_buf_len, (&__pyx_v_off)); if (unlikely(__pyx_t_1 == -1 && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 395; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_ret = __pyx_t_1; /* "pandas/msgpack.pyx":396 * init_ctx(&ctx, object_hook, object_pairs_hook, list_hook, use_list, cenc, cerr) * ret = template_construct(&ctx, buf, buf_len, &off) * if ret == 1: # <<<<<<<<<<<<<< * obj = template_data(&ctx) * if off < buf_len: */ __pyx_t_2 = ((__pyx_v_ret == 1) != 0); if (__pyx_t_2) { /* "pandas/msgpack.pyx":397 * ret = template_construct(&ctx, buf, buf_len, &off) * if ret == 1: * obj = template_data(&ctx) # <<<<<<<<<<<<<< * if off < buf_len: * raise ExtraData(obj, PyBytes_FromStringAndSize(buf+off, buf_len-off)) */ __pyx_t_4 = template_data((&__pyx_v_ctx)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 397; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_v_obj = __pyx_t_4; __pyx_t_4 = 0; /* "pandas/msgpack.pyx":398 * if ret == 1: * obj = template_data(&ctx) * if off < buf_len: # <<<<<<<<<<<<<< * raise ExtraData(obj, PyBytes_FromStringAndSize(buf+off, buf_len-off)) * return obj */ __pyx_t_2 = ((__pyx_v_off < __pyx_v_buf_len) != 0); if (__pyx_t_2) { /* "pandas/msgpack.pyx":399 * obj = template_data(&ctx) * if off < buf_len: * raise ExtraData(obj, PyBytes_FromStringAndSize(buf+off, buf_len-off)) # <<<<<<<<<<<<<< * return obj * elif ret < 0: */ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s__ExtraData); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 399; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = ((PyObject *)PyBytes_FromStringAndSize((__pyx_v_buf + __pyx_v_off), (__pyx_v_buf_len - __pyx_v_off))); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 399; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 399; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_INCREF(__pyx_v_obj); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_v_obj); __Pyx_GIVEREF(__pyx_v_obj); PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_7), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 399; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0; __Pyx_Raise(__pyx_t_5, 0, 0, 0); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 399; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L8; } __pyx_L8:; /* "pandas/msgpack.pyx":400 * if off < buf_len: * raise ExtraData(obj, PyBytes_FromStringAndSize(buf+off, buf_len-off)) * return obj # <<<<<<<<<<<<<< * elif ret < 0: * raise ValueError("Unpack failed: error = %d" % (ret,)) */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_obj); __pyx_r = __pyx_v_obj; goto __pyx_L0; goto __pyx_L7; } /* "pandas/msgpack.pyx":401 * raise ExtraData(obj, PyBytes_FromStringAndSize(buf+off, buf_len-off)) * return obj * elif ret < 0: # <<<<<<<<<<<<<< * raise ValueError("Unpack failed: error = %d" % (ret,)) * else: */ __pyx_t_2 = ((__pyx_v_ret < 0) != 0); if (__pyx_t_2) { /* "pandas/msgpack.pyx":402 * return obj * elif ret < 0: * raise ValueError("Unpack failed: error = %d" % (ret,)) # <<<<<<<<<<<<<< * else: * raise UnpackValueError */ __pyx_t_5 = PyInt_FromLong(__pyx_v_ret); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 402; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 402; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_28), ((PyObject *)__pyx_t_7)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 402; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_5)); __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0; __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 402; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_7, 0, ((PyObject *)__pyx_t_5)); __Pyx_GIVEREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; __pyx_t_5 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_7), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 402; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0; __Pyx_Raise(__pyx_t_5, 0, 0, 0); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 402; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L7; } /*else*/ { /* "pandas/msgpack.pyx":404 * raise ValueError("Unpack failed: error = %d" % (ret,)) * else: * raise UnpackValueError # <<<<<<<<<<<<<< * * */ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s__UnpackValueError); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 404; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_Raise(__pyx_t_5, 0, 0, 0); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 404; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_L7:; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_7); __Pyx_AddTraceback("pandas.msgpack.unpackb", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_obj); __Pyx_XDECREF(__pyx_v_encoding); __Pyx_XDECREF(__pyx_v_unicode_errors); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_7msgpack_7unpack(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6pandas_7msgpack_6unpack[] = "unpack(stream, object_hook=None, list_hook=None, bool use_list=1, encoding=None, unicode_errors='strict', object_pairs_hook=None)\nUnpack an object from `stream`.\n\n Raises `ValueError` when `stream` has extra bytes.\n "; static PyMethodDef __pyx_mdef_6pandas_7msgpack_7unpack = {__Pyx_NAMESTR("unpack"), (PyCFunction)__pyx_pw_6pandas_7msgpack_7unpack, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_7msgpack_6unpack)}; static PyObject *__pyx_pw_6pandas_7msgpack_7unpack(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_stream = 0; PyObject *__pyx_v_object_hook = 0; PyObject *__pyx_v_list_hook = 0; int __pyx_v_use_list; PyObject *__pyx_v_encoding = 0; PyObject *__pyx_v_unicode_errors = 0; PyObject *__pyx_v_object_pairs_hook = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("unpack (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__stream,&__pyx_n_s__object_hook,&__pyx_n_s__list_hook,&__pyx_n_s__use_list,&__pyx_n_s__encoding,&__pyx_n_s__unicode_errors,&__pyx_n_s__object_pairs_hook,0}; PyObject* values[7] = {0,0,0,0,0,0,0}; /* "pandas/msgpack.pyx":407 * * * def unpack(object stream, object object_hook=None, object list_hook=None, # <<<<<<<<<<<<<< * bint use_list=1, encoding=None, unicode_errors="strict", * object_pairs_hook=None, */ values[1] = ((PyObject *)Py_None); values[2] = ((PyObject *)Py_None); /* "pandas/msgpack.pyx":408 * * def unpack(object stream, object object_hook=None, object list_hook=None, * bint use_list=1, encoding=None, unicode_errors="strict", # <<<<<<<<<<<<<< * object_pairs_hook=None, * ): */ values[4] = ((PyObject *)Py_None); values[5] = ((PyObject *)__pyx_n_s__strict); /* "pandas/msgpack.pyx":409 * def unpack(object stream, object object_hook=None, object list_hook=None, * bint use_list=1, encoding=None, unicode_errors="strict", * object_pairs_hook=None, # <<<<<<<<<<<<<< * ): * """Unpack an object from `stream`. */ values[6] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6); case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5); case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__stream)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__object_hook); if (value) { values[1] = value; kw_args--; } } case 2: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__list_hook); if (value) { values[2] = value; kw_args--; } } case 3: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__use_list); if (value) { values[3] = value; kw_args--; } } case 4: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__encoding); if (value) { values[4] = value; kw_args--; } } case 5: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__unicode_errors); if (value) { values[5] = value; kw_args--; } } case 6: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__object_pairs_hook); if (value) { values[6] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "unpack") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 407; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6); case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5); case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_stream = values[0]; __pyx_v_object_hook = values[1]; __pyx_v_list_hook = values[2]; if (values[3]) { __pyx_v_use_list = __Pyx_PyObject_IsTrue(values[3]); if (unlikely((__pyx_v_use_list == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 408; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } else { __pyx_v_use_list = ((int)1); } __pyx_v_encoding = values[4]; __pyx_v_unicode_errors = values[5]; __pyx_v_object_pairs_hook = values[6]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("unpack", 0, 1, 7, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 407; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.msgpack.unpack", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pandas_7msgpack_6unpack(__pyx_self, __pyx_v_stream, __pyx_v_object_hook, __pyx_v_list_hook, __pyx_v_use_list, __pyx_v_encoding, __pyx_v_unicode_errors, __pyx_v_object_pairs_hook); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/msgpack.pyx":407 * * * def unpack(object stream, object object_hook=None, object list_hook=None, # <<<<<<<<<<<<<< * bint use_list=1, encoding=None, unicode_errors="strict", * object_pairs_hook=None, */ static PyObject *__pyx_pf_6pandas_7msgpack_6unpack(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_stream, PyObject *__pyx_v_object_hook, PyObject *__pyx_v_list_hook, int __pyx_v_use_list, PyObject *__pyx_v_encoding, PyObject *__pyx_v_unicode_errors, PyObject *__pyx_v_object_pairs_hook) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("unpack", 0); /* "pandas/msgpack.pyx":415 * Raises `ValueError` when `stream` has extra bytes. * """ * return unpackb(stream.read(), use_list=use_list, # <<<<<<<<<<<<<< * object_hook=object_hook, object_pairs_hook=object_pairs_hook, list_hook=list_hook, * encoding=encoding, unicode_errors=unicode_errors, */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__unpackb); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 415; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_stream, __pyx_n_s__read); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 415; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 415; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 415; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 415; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_3)); __pyx_t_4 = __Pyx_PyBool_FromLong(__pyx_v_use_list); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 415; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); if (PyDict_SetItem(__pyx_t_3, ((PyObject *)__pyx_n_s__use_list), __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 415; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "pandas/msgpack.pyx":416 * """ * return unpackb(stream.read(), use_list=use_list, * object_hook=object_hook, object_pairs_hook=object_pairs_hook, list_hook=list_hook, # <<<<<<<<<<<<<< * encoding=encoding, unicode_errors=unicode_errors, * ) */ if (PyDict_SetItem(__pyx_t_3, ((PyObject *)__pyx_n_s__object_hook), __pyx_v_object_hook) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 415; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (PyDict_SetItem(__pyx_t_3, ((PyObject *)__pyx_n_s__object_pairs_hook), __pyx_v_object_pairs_hook) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 415; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (PyDict_SetItem(__pyx_t_3, ((PyObject *)__pyx_n_s__list_hook), __pyx_v_list_hook) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 415; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/msgpack.pyx":417 * return unpackb(stream.read(), use_list=use_list, * object_hook=object_hook, object_pairs_hook=object_pairs_hook, list_hook=list_hook, * encoding=encoding, unicode_errors=unicode_errors, # <<<<<<<<<<<<<< * ) * */ if (PyDict_SetItem(__pyx_t_3, ((PyObject *)__pyx_n_s__encoding), __pyx_v_encoding) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 415; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (PyDict_SetItem(__pyx_t_3, ((PyObject *)__pyx_n_s__unicode_errors), __pyx_v_unicode_errors) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 415; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_4 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), ((PyObject *)__pyx_t_3)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 415; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("pandas.msgpack.unpack", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pandas_7msgpack_8Unpacker_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_pw_6pandas_7msgpack_8Unpacker_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return -1;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__cinit__", 0))) return -1; __pyx_r = __pyx_pf_6pandas_7msgpack_8Unpacker___cinit__(((struct __pyx_obj_6pandas_7msgpack_Unpacker *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/msgpack.pyx":478 * cdef size_t max_buffer_size * * def __cinit__(self): # <<<<<<<<<<<<<< * self.buf = NULL * */ static int __pyx_pf_6pandas_7msgpack_8Unpacker___cinit__(struct __pyx_obj_6pandas_7msgpack_Unpacker *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__cinit__", 0); /* "pandas/msgpack.pyx":479 * * def __cinit__(self): * self.buf = NULL # <<<<<<<<<<<<<< * * def __dealloc__(self): */ __pyx_v_self->buf = NULL; __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static void __pyx_pw_6pandas_7msgpack_8Unpacker_3__dealloc__(PyObject *__pyx_v_self); /*proto*/ static void __pyx_pw_6pandas_7msgpack_8Unpacker_3__dealloc__(PyObject *__pyx_v_self) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0); __pyx_pf_6pandas_7msgpack_8Unpacker_2__dealloc__(((struct __pyx_obj_6pandas_7msgpack_Unpacker *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); } /* "pandas/msgpack.pyx":481 * self.buf = NULL * * def __dealloc__(self): # <<<<<<<<<<<<<< * free(self.buf) * self.buf = NULL */ static void __pyx_pf_6pandas_7msgpack_8Unpacker_2__dealloc__(struct __pyx_obj_6pandas_7msgpack_Unpacker *__pyx_v_self) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__dealloc__", 0); /* "pandas/msgpack.pyx":482 * * def __dealloc__(self): * free(self.buf) # <<<<<<<<<<<<<< * self.buf = NULL * */ free(__pyx_v_self->buf); /* "pandas/msgpack.pyx":483 * def __dealloc__(self): * free(self.buf) * self.buf = NULL # <<<<<<<<<<<<<< * * def __init__(self, file_like=None, Py_ssize_t read_size=0, bint use_list=1, */ __pyx_v_self->buf = NULL; __Pyx_RefNannyFinishContext(); } /* Python wrapper */ static int __pyx_pw_6pandas_7msgpack_8Unpacker_5__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_pw_6pandas_7msgpack_8Unpacker_5__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_file_like = 0; Py_ssize_t __pyx_v_read_size; int __pyx_v_use_list; PyObject *__pyx_v_object_hook = 0; PyObject *__pyx_v_object_pairs_hook = 0; PyObject *__pyx_v_list_hook = 0; PyObject *__pyx_v_encoding = 0; PyObject *__pyx_v_unicode_errors = 0; int __pyx_v_max_buffer_size; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__file_like,&__pyx_n_s__read_size,&__pyx_n_s__use_list,&__pyx_n_s__object_hook,&__pyx_n_s__object_pairs_hook,&__pyx_n_s__list_hook,&__pyx_n_s__encoding,&__pyx_n_s__unicode_errors,&__pyx_n_s__max_buffer_size,0}; PyObject* values[9] = {0,0,0,0,0,0,0,0,0}; /* "pandas/msgpack.pyx":485 * self.buf = NULL * * def __init__(self, file_like=None, Py_ssize_t read_size=0, bint use_list=1, # <<<<<<<<<<<<<< * object object_hook=None, object object_pairs_hook=None, object list_hook=None, * encoding=None, unicode_errors='strict', int max_buffer_size=0, */ values[0] = ((PyObject *)Py_None); /* "pandas/msgpack.pyx":486 * * def __init__(self, file_like=None, Py_ssize_t read_size=0, bint use_list=1, * object object_hook=None, object object_pairs_hook=None, object list_hook=None, # <<<<<<<<<<<<<< * encoding=None, unicode_errors='strict', int max_buffer_size=0, * ): */ values[3] = ((PyObject *)Py_None); values[4] = ((PyObject *)Py_None); values[5] = ((PyObject *)Py_None); /* "pandas/msgpack.pyx":487 * def __init__(self, file_like=None, Py_ssize_t read_size=0, bint use_list=1, * object object_hook=None, object object_pairs_hook=None, object list_hook=None, * encoding=None, unicode_errors='strict', int max_buffer_size=0, # <<<<<<<<<<<<<< * ): * cdef char *cenc=NULL, *cerr=NULL */ values[6] = ((PyObject *)Py_None); values[7] = ((PyObject *)__pyx_n_s__strict); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8); case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7); case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6); case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5); case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__file_like); if (value) { values[0] = value; kw_args--; } } case 1: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__read_size); if (value) { values[1] = value; kw_args--; } } case 2: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__use_list); if (value) { values[2] = value; kw_args--; } } case 3: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__object_hook); if (value) { values[3] = value; kw_args--; } } case 4: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__object_pairs_hook); if (value) { values[4] = value; kw_args--; } } case 5: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__list_hook); if (value) { values[5] = value; kw_args--; } } case 6: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__encoding); if (value) { values[6] = value; kw_args--; } } case 7: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__unicode_errors); if (value) { values[7] = value; kw_args--; } } case 8: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__max_buffer_size); if (value) { values[8] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 485; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8); case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7); case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6); case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5); case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_file_like = values[0]; if (values[1]) { __pyx_v_read_size = __Pyx_PyIndex_AsSsize_t(values[1]); if (unlikely((__pyx_v_read_size == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 485; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } else { __pyx_v_read_size = ((Py_ssize_t)0); } if (values[2]) { __pyx_v_use_list = __Pyx_PyObject_IsTrue(values[2]); if (unlikely((__pyx_v_use_list == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 485; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } else { __pyx_v_use_list = ((int)1); } __pyx_v_object_hook = values[3]; __pyx_v_object_pairs_hook = values[4]; __pyx_v_list_hook = values[5]; __pyx_v_encoding = values[6]; __pyx_v_unicode_errors = values[7]; if (values[8]) { __pyx_v_max_buffer_size = __Pyx_PyInt_AsInt(values[8]); if (unlikely((__pyx_v_max_buffer_size == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 487; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } else { __pyx_v_max_buffer_size = ((int)0); } } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("__init__", 0, 0, 9, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 485; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.msgpack.Unpacker.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return -1; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pandas_7msgpack_8Unpacker_4__init__(((struct __pyx_obj_6pandas_7msgpack_Unpacker *)__pyx_v_self), __pyx_v_file_like, __pyx_v_read_size, __pyx_v_use_list, __pyx_v_object_hook, __pyx_v_object_pairs_hook, __pyx_v_list_hook, __pyx_v_encoding, __pyx_v_unicode_errors, __pyx_v_max_buffer_size); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/msgpack.pyx":485 * self.buf = NULL * * def __init__(self, file_like=None, Py_ssize_t read_size=0, bint use_list=1, # <<<<<<<<<<<<<< * object object_hook=None, object object_pairs_hook=None, object list_hook=None, * encoding=None, unicode_errors='strict', int max_buffer_size=0, */ static int __pyx_pf_6pandas_7msgpack_8Unpacker_4__init__(struct __pyx_obj_6pandas_7msgpack_Unpacker *__pyx_v_self, PyObject *__pyx_v_file_like, Py_ssize_t __pyx_v_read_size, int __pyx_v_use_list, PyObject *__pyx_v_object_hook, PyObject *__pyx_v_object_pairs_hook, PyObject *__pyx_v_list_hook, PyObject *__pyx_v_encoding, PyObject *__pyx_v_unicode_errors, int __pyx_v_max_buffer_size) { char *__pyx_v_cenc; char *__pyx_v_cerr; int __pyx_r; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; long __pyx_t_3; int __pyx_t_4; long __pyx_t_5; int __pyx_t_6; PyObject *__pyx_t_7 = NULL; char *__pyx_t_8; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__init__", 0); __Pyx_INCREF(__pyx_v_encoding); __Pyx_INCREF(__pyx_v_unicode_errors); /* "pandas/msgpack.pyx":489 * encoding=None, unicode_errors='strict', int max_buffer_size=0, * ): * cdef char *cenc=NULL, *cerr=NULL # <<<<<<<<<<<<<< * * self.file_like = file_like */ __pyx_v_cenc = NULL; __pyx_v_cerr = NULL; /* "pandas/msgpack.pyx":491 * cdef char *cenc=NULL, *cerr=NULL * * self.file_like = file_like # <<<<<<<<<<<<<< * if file_like: * self.file_like_read = file_like.read */ __Pyx_INCREF(__pyx_v_file_like); __Pyx_GIVEREF(__pyx_v_file_like); __Pyx_GOTREF(__pyx_v_self->file_like); __Pyx_DECREF(__pyx_v_self->file_like); __pyx_v_self->file_like = __pyx_v_file_like; /* "pandas/msgpack.pyx":492 * * self.file_like = file_like * if file_like: # <<<<<<<<<<<<<< * self.file_like_read = file_like.read * if not PyCallable_Check(self.file_like_read): */ __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_file_like); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 492; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__pyx_t_1) { /* "pandas/msgpack.pyx":493 * self.file_like = file_like * if file_like: * self.file_like_read = file_like.read # <<<<<<<<<<<<<< * if not PyCallable_Check(self.file_like_read): * raise ValueError("`file_like.read` must be a callable.") */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_file_like, __pyx_n_s__read); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 493; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __Pyx_GOTREF(__pyx_v_self->file_like_read); __Pyx_DECREF(__pyx_v_self->file_like_read); __pyx_v_self->file_like_read = __pyx_t_2; __pyx_t_2 = 0; /* "pandas/msgpack.pyx":494 * if file_like: * self.file_like_read = file_like.read * if not PyCallable_Check(self.file_like_read): # <<<<<<<<<<<<<< * raise ValueError("`file_like.read` must be a callable.") * if not max_buffer_size: */ __pyx_t_2 = __pyx_v_self->file_like_read; __Pyx_INCREF(__pyx_t_2); __pyx_t_1 = ((!(PyCallable_Check(__pyx_t_2) != 0)) != 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_1) { /* "pandas/msgpack.pyx":495 * self.file_like_read = file_like.read * if not PyCallable_Check(self.file_like_read): * raise ValueError("`file_like.read` must be a callable.") # <<<<<<<<<<<<<< * if not max_buffer_size: * max_buffer_size = INT_MAX */ __pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_30), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 495; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 495; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L4; } __pyx_L4:; goto __pyx_L3; } __pyx_L3:; /* "pandas/msgpack.pyx":496 * if not PyCallable_Check(self.file_like_read): * raise ValueError("`file_like.read` must be a callable.") * if not max_buffer_size: # <<<<<<<<<<<<<< * max_buffer_size = INT_MAX * if read_size > max_buffer_size: */ __pyx_t_1 = ((!(__pyx_v_max_buffer_size != 0)) != 0); if (__pyx_t_1) { /* "pandas/msgpack.pyx":497 * raise ValueError("`file_like.read` must be a callable.") * if not max_buffer_size: * max_buffer_size = INT_MAX # <<<<<<<<<<<<<< * if read_size > max_buffer_size: * raise ValueError("read_size should be less or equal to max_buffer_size") */ __pyx_v_max_buffer_size = INT_MAX; goto __pyx_L5; } __pyx_L5:; /* "pandas/msgpack.pyx":498 * if not max_buffer_size: * max_buffer_size = INT_MAX * if read_size > max_buffer_size: # <<<<<<<<<<<<<< * raise ValueError("read_size should be less or equal to max_buffer_size") * if not read_size: */ __pyx_t_1 = ((__pyx_v_read_size > __pyx_v_max_buffer_size) != 0); if (__pyx_t_1) { /* "pandas/msgpack.pyx":499 * max_buffer_size = INT_MAX * if read_size > max_buffer_size: * raise ValueError("read_size should be less or equal to max_buffer_size") # <<<<<<<<<<<<<< * if not read_size: * read_size = min(max_buffer_size, 1024**2) */ __pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_32), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 499; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 499; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L6; } __pyx_L6:; /* "pandas/msgpack.pyx":500 * if read_size > max_buffer_size: * raise ValueError("read_size should be less or equal to max_buffer_size") * if not read_size: # <<<<<<<<<<<<<< * read_size = min(max_buffer_size, 1024**2) * self.max_buffer_size = max_buffer_size */ __pyx_t_1 = ((!(__pyx_v_read_size != 0)) != 0); if (__pyx_t_1) { /* "pandas/msgpack.pyx":501 * raise ValueError("read_size should be less or equal to max_buffer_size") * if not read_size: * read_size = min(max_buffer_size, 1024**2) # <<<<<<<<<<<<<< * self.max_buffer_size = max_buffer_size * self.read_size = read_size */ __pyx_t_3 = 1048576; __pyx_t_4 = __pyx_v_max_buffer_size; if (((__pyx_t_3 < __pyx_t_4) != 0)) { __pyx_t_5 = __pyx_t_3; } else { __pyx_t_5 = __pyx_t_4; } __pyx_v_read_size = __pyx_t_5; goto __pyx_L7; } __pyx_L7:; /* "pandas/msgpack.pyx":502 * if not read_size: * read_size = min(max_buffer_size, 1024**2) * self.max_buffer_size = max_buffer_size # <<<<<<<<<<<<<< * self.read_size = read_size * self.buf = malloc(read_size) */ __pyx_v_self->max_buffer_size = __pyx_v_max_buffer_size; /* "pandas/msgpack.pyx":503 * read_size = min(max_buffer_size, 1024**2) * self.max_buffer_size = max_buffer_size * self.read_size = read_size # <<<<<<<<<<<<<< * self.buf = malloc(read_size) * if self.buf == NULL: */ __pyx_v_self->read_size = __pyx_v_read_size; /* "pandas/msgpack.pyx":504 * self.max_buffer_size = max_buffer_size * self.read_size = read_size * self.buf = malloc(read_size) # <<<<<<<<<<<<<< * if self.buf == NULL: * raise MemoryError("Unable to allocate internal buffer.") */ __pyx_v_self->buf = ((char *)malloc(__pyx_v_read_size)); /* "pandas/msgpack.pyx":505 * self.read_size = read_size * self.buf = malloc(read_size) * if self.buf == NULL: # <<<<<<<<<<<<<< * raise MemoryError("Unable to allocate internal buffer.") * self.buf_size = read_size */ __pyx_t_1 = ((__pyx_v_self->buf == NULL) != 0); if (__pyx_t_1) { /* "pandas/msgpack.pyx":506 * self.buf = malloc(read_size) * if self.buf == NULL: * raise MemoryError("Unable to allocate internal buffer.") # <<<<<<<<<<<<<< * self.buf_size = read_size * self.buf_head = 0 */ __pyx_t_2 = PyObject_Call(__pyx_builtin_MemoryError, ((PyObject *)__pyx_k_tuple_33), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 506; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 506; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L8; } __pyx_L8:; /* "pandas/msgpack.pyx":507 * if self.buf == NULL: * raise MemoryError("Unable to allocate internal buffer.") * self.buf_size = read_size # <<<<<<<<<<<<<< * self.buf_head = 0 * self.buf_tail = 0 */ __pyx_v_self->buf_size = __pyx_v_read_size; /* "pandas/msgpack.pyx":508 * raise MemoryError("Unable to allocate internal buffer.") * self.buf_size = read_size * self.buf_head = 0 # <<<<<<<<<<<<<< * self.buf_tail = 0 * */ __pyx_v_self->buf_head = 0; /* "pandas/msgpack.pyx":509 * self.buf_size = read_size * self.buf_head = 0 * self.buf_tail = 0 # <<<<<<<<<<<<<< * * if encoding is not None: */ __pyx_v_self->buf_tail = 0; /* "pandas/msgpack.pyx":511 * self.buf_tail = 0 * * if encoding is not None: # <<<<<<<<<<<<<< * if isinstance(encoding, unicode): * encoding = encoding.encode('ascii') */ __pyx_t_1 = (__pyx_v_encoding != Py_None); __pyx_t_6 = (__pyx_t_1 != 0); if (__pyx_t_6) { /* "pandas/msgpack.pyx":512 * * if encoding is not None: * if isinstance(encoding, unicode): # <<<<<<<<<<<<<< * encoding = encoding.encode('ascii') * self.encoding = encoding */ __pyx_t_6 = PyUnicode_Check(__pyx_v_encoding); __pyx_t_1 = (__pyx_t_6 != 0); if (__pyx_t_1) { /* "pandas/msgpack.pyx":513 * if encoding is not None: * if isinstance(encoding, unicode): * encoding = encoding.encode('ascii') # <<<<<<<<<<<<<< * self.encoding = encoding * cenc = PyBytes_AsString(encoding) */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_encoding, __pyx_n_s__encode); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 513; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_7 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_k_tuple_34), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 513; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF_SET(__pyx_v_encoding, __pyx_t_7); __pyx_t_7 = 0; goto __pyx_L10; } __pyx_L10:; /* "pandas/msgpack.pyx":514 * if isinstance(encoding, unicode): * encoding = encoding.encode('ascii') * self.encoding = encoding # <<<<<<<<<<<<<< * cenc = PyBytes_AsString(encoding) * */ __Pyx_INCREF(__pyx_v_encoding); __Pyx_GIVEREF(__pyx_v_encoding); __Pyx_GOTREF(__pyx_v_self->encoding); __Pyx_DECREF(__pyx_v_self->encoding); __pyx_v_self->encoding = __pyx_v_encoding; /* "pandas/msgpack.pyx":515 * encoding = encoding.encode('ascii') * self.encoding = encoding * cenc = PyBytes_AsString(encoding) # <<<<<<<<<<<<<< * * if unicode_errors is not None: */ __pyx_t_8 = PyBytes_AsString(__pyx_v_encoding); if (unlikely(__pyx_t_8 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 515; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_cenc = __pyx_t_8; goto __pyx_L9; } __pyx_L9:; /* "pandas/msgpack.pyx":517 * cenc = PyBytes_AsString(encoding) * * if unicode_errors is not None: # <<<<<<<<<<<<<< * if isinstance(unicode_errors, unicode): * unicode_errors = unicode_errors.encode('ascii') */ __pyx_t_1 = (__pyx_v_unicode_errors != Py_None); __pyx_t_6 = (__pyx_t_1 != 0); if (__pyx_t_6) { /* "pandas/msgpack.pyx":518 * * if unicode_errors is not None: * if isinstance(unicode_errors, unicode): # <<<<<<<<<<<<<< * unicode_errors = unicode_errors.encode('ascii') * self.unicode_errors = unicode_errors */ __pyx_t_6 = PyUnicode_Check(__pyx_v_unicode_errors); __pyx_t_1 = (__pyx_t_6 != 0); if (__pyx_t_1) { /* "pandas/msgpack.pyx":519 * if unicode_errors is not None: * if isinstance(unicode_errors, unicode): * unicode_errors = unicode_errors.encode('ascii') # <<<<<<<<<<<<<< * self.unicode_errors = unicode_errors * cerr = PyBytes_AsString(unicode_errors) */ __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_unicode_errors, __pyx_n_s__encode); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 519; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_t_2 = PyObject_Call(__pyx_t_7, ((PyObject *)__pyx_k_tuple_35), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 519; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF_SET(__pyx_v_unicode_errors, __pyx_t_2); __pyx_t_2 = 0; goto __pyx_L12; } __pyx_L12:; /* "pandas/msgpack.pyx":520 * if isinstance(unicode_errors, unicode): * unicode_errors = unicode_errors.encode('ascii') * self.unicode_errors = unicode_errors # <<<<<<<<<<<<<< * cerr = PyBytes_AsString(unicode_errors) * */ __Pyx_INCREF(__pyx_v_unicode_errors); __Pyx_GIVEREF(__pyx_v_unicode_errors); __Pyx_GOTREF(__pyx_v_self->unicode_errors); __Pyx_DECREF(__pyx_v_self->unicode_errors); __pyx_v_self->unicode_errors = __pyx_v_unicode_errors; /* "pandas/msgpack.pyx":521 * unicode_errors = unicode_errors.encode('ascii') * self.unicode_errors = unicode_errors * cerr = PyBytes_AsString(unicode_errors) # <<<<<<<<<<<<<< * * init_ctx(&self.ctx, object_hook, object_pairs_hook, list_hook, use_list, cenc, cerr) */ __pyx_t_8 = PyBytes_AsString(__pyx_v_unicode_errors); if (unlikely(__pyx_t_8 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 521; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_cerr = __pyx_t_8; goto __pyx_L11; } __pyx_L11:; /* "pandas/msgpack.pyx":523 * cerr = PyBytes_AsString(unicode_errors) * * init_ctx(&self.ctx, object_hook, object_pairs_hook, list_hook, use_list, cenc, cerr) # <<<<<<<<<<<<<< * * def feed(self, object next_bytes): */ __pyx_t_2 = __pyx_f_6pandas_7msgpack_init_ctx((&__pyx_v_self->ctx), __pyx_v_object_hook, __pyx_v_object_pairs_hook, __pyx_v_list_hook, __pyx_v_use_list, __pyx_v_cenc, __pyx_v_cerr); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 523; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_7); __Pyx_AddTraceback("pandas.msgpack.Unpacker.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_XDECREF(__pyx_v_encoding); __Pyx_XDECREF(__pyx_v_unicode_errors); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_7msgpack_8Unpacker_7feed(PyObject *__pyx_v_self, PyObject *__pyx_v_next_bytes); /*proto*/ static char __pyx_doc_6pandas_7msgpack_8Unpacker_6feed[] = "Unpacker.feed(self, next_bytes)\nAppend `next_bytes` to internal buffer."; static PyObject *__pyx_pw_6pandas_7msgpack_8Unpacker_7feed(PyObject *__pyx_v_self, PyObject *__pyx_v_next_bytes) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("feed (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_7msgpack_8Unpacker_6feed(((struct __pyx_obj_6pandas_7msgpack_Unpacker *)__pyx_v_self), ((PyObject *)__pyx_v_next_bytes)); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/msgpack.pyx":525 * init_ctx(&self.ctx, object_hook, object_pairs_hook, list_hook, use_list, cenc, cerr) * * def feed(self, object next_bytes): # <<<<<<<<<<<<<< * """Append `next_bytes` to internal buffer.""" * cdef char* buf */ static PyObject *__pyx_pf_6pandas_7msgpack_8Unpacker_6feed(struct __pyx_obj_6pandas_7msgpack_Unpacker *__pyx_v_self, PyObject *__pyx_v_next_bytes) { char *__pyx_v_buf; Py_ssize_t __pyx_v_buf_len; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; int __pyx_t_4; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("feed", 0); /* "pandas/msgpack.pyx":529 * cdef char* buf * cdef Py_ssize_t buf_len * if self.file_like is not None: # <<<<<<<<<<<<<< * raise TypeError( * "unpacker.feed() is not be able to use with `file_like`.") */ __pyx_t_1 = (__pyx_v_self->file_like != Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { /* "pandas/msgpack.pyx":530 * cdef Py_ssize_t buf_len * if self.file_like is not None: * raise TypeError( # <<<<<<<<<<<<<< * "unpacker.feed() is not be able to use with `file_like`.") * PyObject_AsReadBuffer(next_bytes, &buf, &buf_len) */ __pyx_t_3 = PyObject_Call(__pyx_builtin_TypeError, ((PyObject *)__pyx_k_tuple_37), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 530; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 530; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L3; } __pyx_L3:; /* "pandas/msgpack.pyx":532 * raise TypeError( * "unpacker.feed() is not be able to use with `file_like`.") * PyObject_AsReadBuffer(next_bytes, &buf, &buf_len) # <<<<<<<<<<<<<< * self.append_buffer(buf, buf_len) * */ __pyx_t_4 = PyObject_AsReadBuffer(__pyx_v_next_bytes, ((const void* *)(&__pyx_v_buf)), (&__pyx_v_buf_len)); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 532; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/msgpack.pyx":533 * "unpacker.feed() is not be able to use with `file_like`.") * PyObject_AsReadBuffer(next_bytes, &buf, &buf_len) * self.append_buffer(buf, buf_len) # <<<<<<<<<<<<<< * * cdef append_buffer(self, void* _buf, Py_ssize_t _buf_len): */ __pyx_t_3 = ((struct __pyx_vtabstruct_6pandas_7msgpack_Unpacker *)__pyx_v_self->__pyx_vtab)->append_buffer(__pyx_v_self, __pyx_v_buf, __pyx_v_buf_len); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 533; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("pandas.msgpack.Unpacker.feed", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/msgpack.pyx":535 * self.append_buffer(buf, buf_len) * * cdef append_buffer(self, void* _buf, Py_ssize_t _buf_len): # <<<<<<<<<<<<<< * cdef: * char* buf = self.buf */ static PyObject *__pyx_f_6pandas_7msgpack_8Unpacker_append_buffer(struct __pyx_obj_6pandas_7msgpack_Unpacker *__pyx_v_self, void *__pyx_v__buf, Py_ssize_t __pyx_v__buf_len) { char *__pyx_v_buf; char *__pyx_v_new_buf; size_t __pyx_v_head; size_t __pyx_v_tail; size_t __pyx_v_buf_size; size_t __pyx_v_new_size; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations char *__pyx_t_1; size_t __pyx_t_2; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; size_t __pyx_t_5; size_t __pyx_t_6; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("append_buffer", 0); /* "pandas/msgpack.pyx":537 * cdef append_buffer(self, void* _buf, Py_ssize_t _buf_len): * cdef: * char* buf = self.buf # <<<<<<<<<<<<<< * char* new_buf * size_t head = self.buf_head */ __pyx_t_1 = __pyx_v_self->buf; __pyx_v_buf = __pyx_t_1; /* "pandas/msgpack.pyx":539 * char* buf = self.buf * char* new_buf * size_t head = self.buf_head # <<<<<<<<<<<<<< * size_t tail = self.buf_tail * size_t buf_size = self.buf_size */ __pyx_t_2 = __pyx_v_self->buf_head; __pyx_v_head = __pyx_t_2; /* "pandas/msgpack.pyx":540 * char* new_buf * size_t head = self.buf_head * size_t tail = self.buf_tail # <<<<<<<<<<<<<< * size_t buf_size = self.buf_size * size_t new_size */ __pyx_t_2 = __pyx_v_self->buf_tail; __pyx_v_tail = __pyx_t_2; /* "pandas/msgpack.pyx":541 * size_t head = self.buf_head * size_t tail = self.buf_tail * size_t buf_size = self.buf_size # <<<<<<<<<<<<<< * size_t new_size * */ __pyx_t_2 = __pyx_v_self->buf_size; __pyx_v_buf_size = __pyx_t_2; /* "pandas/msgpack.pyx":544 * size_t new_size * * if tail + _buf_len > buf_size: # <<<<<<<<<<<<<< * if ((tail - head) + _buf_len) <= buf_size: * # move to front. */ __pyx_t_3 = (((__pyx_v_tail + __pyx_v__buf_len) > __pyx_v_buf_size) != 0); if (__pyx_t_3) { /* "pandas/msgpack.pyx":545 * * if tail + _buf_len > buf_size: * if ((tail - head) + _buf_len) <= buf_size: # <<<<<<<<<<<<<< * # move to front. * memmove(buf, buf + head, tail - head) */ __pyx_t_3 = ((((__pyx_v_tail - __pyx_v_head) + __pyx_v__buf_len) <= __pyx_v_buf_size) != 0); if (__pyx_t_3) { /* "pandas/msgpack.pyx":547 * if ((tail - head) + _buf_len) <= buf_size: * # move to front. * memmove(buf, buf + head, tail - head) # <<<<<<<<<<<<<< * tail -= head * head = 0 */ memmove(__pyx_v_buf, (__pyx_v_buf + __pyx_v_head), (__pyx_v_tail - __pyx_v_head)); /* "pandas/msgpack.pyx":548 * # move to front. * memmove(buf, buf + head, tail - head) * tail -= head # <<<<<<<<<<<<<< * head = 0 * else: */ __pyx_v_tail = (__pyx_v_tail - __pyx_v_head); /* "pandas/msgpack.pyx":549 * memmove(buf, buf + head, tail - head) * tail -= head * head = 0 # <<<<<<<<<<<<<< * else: * # expand buffer. */ __pyx_v_head = 0; goto __pyx_L4; } /*else*/ { /* "pandas/msgpack.pyx":552 * else: * # expand buffer. * new_size = (tail-head) + _buf_len # <<<<<<<<<<<<<< * if new_size > self.max_buffer_size: * raise BufferFull */ __pyx_v_new_size = ((__pyx_v_tail - __pyx_v_head) + __pyx_v__buf_len); /* "pandas/msgpack.pyx":553 * # expand buffer. * new_size = (tail-head) + _buf_len * if new_size > self.max_buffer_size: # <<<<<<<<<<<<<< * raise BufferFull * new_size = min(new_size*2, self.max_buffer_size) */ __pyx_t_3 = ((__pyx_v_new_size > __pyx_v_self->max_buffer_size) != 0); if (__pyx_t_3) { /* "pandas/msgpack.pyx":554 * new_size = (tail-head) + _buf_len * if new_size > self.max_buffer_size: * raise BufferFull # <<<<<<<<<<<<<< * new_size = min(new_size*2, self.max_buffer_size) * new_buf = malloc(new_size) */ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s__BufferFull); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 554; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 554; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L5; } __pyx_L5:; /* "pandas/msgpack.pyx":555 * if new_size > self.max_buffer_size: * raise BufferFull * new_size = min(new_size*2, self.max_buffer_size) # <<<<<<<<<<<<<< * new_buf = malloc(new_size) * if new_buf == NULL: */ __pyx_t_2 = __pyx_v_self->max_buffer_size; __pyx_t_5 = (__pyx_v_new_size * 2); if (((__pyx_t_2 < __pyx_t_5) != 0)) { __pyx_t_6 = __pyx_t_2; } else { __pyx_t_6 = __pyx_t_5; } __pyx_v_new_size = __pyx_t_6; /* "pandas/msgpack.pyx":556 * raise BufferFull * new_size = min(new_size*2, self.max_buffer_size) * new_buf = malloc(new_size) # <<<<<<<<<<<<<< * if new_buf == NULL: * # self.buf still holds old buffer and will be freed during */ __pyx_v_new_buf = ((char *)malloc(__pyx_v_new_size)); /* "pandas/msgpack.pyx":557 * new_size = min(new_size*2, self.max_buffer_size) * new_buf = malloc(new_size) * if new_buf == NULL: # <<<<<<<<<<<<<< * # self.buf still holds old buffer and will be freed during * # obj destruction */ __pyx_t_3 = ((__pyx_v_new_buf == NULL) != 0); if (__pyx_t_3) { /* "pandas/msgpack.pyx":560 * # self.buf still holds old buffer and will be freed during * # obj destruction * raise MemoryError("Unable to enlarge internal buffer.") # <<<<<<<<<<<<<< * memcpy(new_buf, buf + head, tail - head) * free(buf) */ __pyx_t_4 = PyObject_Call(__pyx_builtin_MemoryError, ((PyObject *)__pyx_k_tuple_39), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 560; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 560; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L6; } __pyx_L6:; /* "pandas/msgpack.pyx":561 * # obj destruction * raise MemoryError("Unable to enlarge internal buffer.") * memcpy(new_buf, buf + head, tail - head) # <<<<<<<<<<<<<< * free(buf) * */ memcpy(__pyx_v_new_buf, (__pyx_v_buf + __pyx_v_head), (__pyx_v_tail - __pyx_v_head)); /* "pandas/msgpack.pyx":562 * raise MemoryError("Unable to enlarge internal buffer.") * memcpy(new_buf, buf + head, tail - head) * free(buf) # <<<<<<<<<<<<<< * * buf = new_buf */ free(__pyx_v_buf); /* "pandas/msgpack.pyx":564 * free(buf) * * buf = new_buf # <<<<<<<<<<<<<< * buf_size = new_size * tail -= head */ __pyx_v_buf = __pyx_v_new_buf; /* "pandas/msgpack.pyx":565 * * buf = new_buf * buf_size = new_size # <<<<<<<<<<<<<< * tail -= head * head = 0 */ __pyx_v_buf_size = __pyx_v_new_size; /* "pandas/msgpack.pyx":566 * buf = new_buf * buf_size = new_size * tail -= head # <<<<<<<<<<<<<< * head = 0 * */ __pyx_v_tail = (__pyx_v_tail - __pyx_v_head); /* "pandas/msgpack.pyx":567 * buf_size = new_size * tail -= head * head = 0 # <<<<<<<<<<<<<< * * memcpy(buf + tail, (_buf), _buf_len) */ __pyx_v_head = 0; } __pyx_L4:; goto __pyx_L3; } __pyx_L3:; /* "pandas/msgpack.pyx":569 * head = 0 * * memcpy(buf + tail, (_buf), _buf_len) # <<<<<<<<<<<<<< * self.buf = buf * self.buf_head = head */ memcpy((__pyx_v_buf + __pyx_v_tail), ((char *)__pyx_v__buf), __pyx_v__buf_len); /* "pandas/msgpack.pyx":570 * * memcpy(buf + tail, (_buf), _buf_len) * self.buf = buf # <<<<<<<<<<<<<< * self.buf_head = head * self.buf_size = buf_size */ __pyx_v_self->buf = __pyx_v_buf; /* "pandas/msgpack.pyx":571 * memcpy(buf + tail, (_buf), _buf_len) * self.buf = buf * self.buf_head = head # <<<<<<<<<<<<<< * self.buf_size = buf_size * self.buf_tail = tail + _buf_len */ __pyx_v_self->buf_head = __pyx_v_head; /* "pandas/msgpack.pyx":572 * self.buf = buf * self.buf_head = head * self.buf_size = buf_size # <<<<<<<<<<<<<< * self.buf_tail = tail + _buf_len * */ __pyx_v_self->buf_size = __pyx_v_buf_size; /* "pandas/msgpack.pyx":573 * self.buf_head = head * self.buf_size = buf_size * self.buf_tail = tail + _buf_len # <<<<<<<<<<<<<< * * cdef read_from_file(self): */ __pyx_v_self->buf_tail = (__pyx_v_tail + __pyx_v__buf_len); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("pandas.msgpack.Unpacker.append_buffer", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/msgpack.pyx":575 * self.buf_tail = tail + _buf_len * * cdef read_from_file(self): # <<<<<<<<<<<<<< * next_bytes = self.file_like_read( * min(self.read_size, */ static PyObject *__pyx_f_6pandas_7msgpack_8Unpacker_read_from_file(struct __pyx_obj_6pandas_7msgpack_Unpacker *__pyx_v_self) { PyObject *__pyx_v_next_bytes = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations size_t __pyx_t_1; Py_ssize_t __pyx_t_2; size_t __pyx_t_3; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; int __pyx_t_6; char *__pyx_t_7; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("read_from_file", 0); /* "pandas/msgpack.pyx":578 * next_bytes = self.file_like_read( * min(self.read_size, * self.max_buffer_size - (self.buf_tail - self.buf_head) # <<<<<<<<<<<<<< * )) * if next_bytes: */ __pyx_t_1 = (__pyx_v_self->max_buffer_size - (__pyx_v_self->buf_tail - __pyx_v_self->buf_head)); /* "pandas/msgpack.pyx":577 * cdef read_from_file(self): * next_bytes = self.file_like_read( * min(self.read_size, # <<<<<<<<<<<<<< * self.max_buffer_size - (self.buf_tail - self.buf_head) * )) */ __pyx_t_2 = __pyx_v_self->read_size; /* "pandas/msgpack.pyx":578 * next_bytes = self.file_like_read( * min(self.read_size, * self.max_buffer_size - (self.buf_tail - self.buf_head) # <<<<<<<<<<<<<< * )) * if next_bytes: */ if (((__pyx_t_1 < __pyx_t_2) != 0)) { __pyx_t_3 = __pyx_t_1; } else { __pyx_t_3 = __pyx_t_2; } __pyx_t_4 = __Pyx_PyInt_FromSize_t(__pyx_t_3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 578; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 576; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyObject_Call(__pyx_v_self->file_like_read, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 576; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; __pyx_v_next_bytes = __pyx_t_4; __pyx_t_4 = 0; /* "pandas/msgpack.pyx":580 * self.max_buffer_size - (self.buf_tail - self.buf_head) * )) * if next_bytes: # <<<<<<<<<<<<<< * self.append_buffer(PyBytes_AsString(next_bytes), PyBytes_Size(next_bytes)) * else: */ __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_next_bytes); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 580; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__pyx_t_6) { /* "pandas/msgpack.pyx":581 * )) * if next_bytes: * self.append_buffer(PyBytes_AsString(next_bytes), PyBytes_Size(next_bytes)) # <<<<<<<<<<<<<< * else: * self.file_like = None */ __pyx_t_7 = PyBytes_AsString(__pyx_v_next_bytes); if (unlikely(__pyx_t_7 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 581; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_2 = PyBytes_Size(__pyx_v_next_bytes); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 581; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_4 = ((struct __pyx_vtabstruct_6pandas_7msgpack_Unpacker *)__pyx_v_self->__pyx_vtab)->append_buffer(__pyx_v_self, __pyx_t_7, __pyx_t_2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 581; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; goto __pyx_L3; } /*else*/ { /* "pandas/msgpack.pyx":583 * self.append_buffer(PyBytes_AsString(next_bytes), PyBytes_Size(next_bytes)) * else: * self.file_like = None # <<<<<<<<<<<<<< * * cdef object _unpack(self, execute_fn execute, object write_bytes, bint iter=0): */ __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->file_like); __Pyx_DECREF(__pyx_v_self->file_like); __pyx_v_self->file_like = Py_None; } __pyx_L3:; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("pandas.msgpack.Unpacker.read_from_file", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_next_bytes); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/msgpack.pyx":585 * self.file_like = None * * cdef object _unpack(self, execute_fn execute, object write_bytes, bint iter=0): # <<<<<<<<<<<<<< * cdef int ret * cdef object obj */ static PyObject *__pyx_f_6pandas_7msgpack_8Unpacker__unpack(struct __pyx_obj_6pandas_7msgpack_Unpacker *__pyx_v_self, execute_fn __pyx_v_execute, PyObject *__pyx_v_write_bytes, struct __pyx_opt_args_6pandas_7msgpack_8Unpacker__unpack *__pyx_optional_args) { int __pyx_v_iter = ((int)0); int __pyx_v_ret; PyObject *__pyx_v_obj = 0; size_t __pyx_v_prev_head; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations size_t __pyx_t_1; int __pyx_t_2; int __pyx_t_3; int __pyx_t_4; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_unpack", 0); if (__pyx_optional_args) { if (__pyx_optional_args->__pyx_n > 0) { __pyx_v_iter = __pyx_optional_args->iter; } } /* "pandas/msgpack.pyx":589 * cdef object obj * cdef size_t prev_head * while 1: # <<<<<<<<<<<<<< * prev_head = self.buf_head * ret = execute(&self.ctx, self.buf, self.buf_tail, &self.buf_head) */ while (1) { if (!1) break; /* "pandas/msgpack.pyx":590 * cdef size_t prev_head * while 1: * prev_head = self.buf_head # <<<<<<<<<<<<<< * ret = execute(&self.ctx, self.buf, self.buf_tail, &self.buf_head) * if write_bytes is not None: */ __pyx_t_1 = __pyx_v_self->buf_head; __pyx_v_prev_head = __pyx_t_1; /* "pandas/msgpack.pyx":591 * while 1: * prev_head = self.buf_head * ret = execute(&self.ctx, self.buf, self.buf_tail, &self.buf_head) # <<<<<<<<<<<<<< * if write_bytes is not None: * write_bytes(PyBytes_FromStringAndSize(self.buf + prev_head, self.buf_head - prev_head)) */ __pyx_t_2 = __pyx_v_execute((&__pyx_v_self->ctx), __pyx_v_self->buf, __pyx_v_self->buf_tail, (&__pyx_v_self->buf_head)); if (unlikely(__pyx_t_2 == -1 && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 591; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_ret = __pyx_t_2; /* "pandas/msgpack.pyx":592 * prev_head = self.buf_head * ret = execute(&self.ctx, self.buf, self.buf_tail, &self.buf_head) * if write_bytes is not None: # <<<<<<<<<<<<<< * write_bytes(PyBytes_FromStringAndSize(self.buf + prev_head, self.buf_head - prev_head)) * */ __pyx_t_3 = (__pyx_v_write_bytes != Py_None); __pyx_t_4 = (__pyx_t_3 != 0); if (__pyx_t_4) { /* "pandas/msgpack.pyx":593 * ret = execute(&self.ctx, self.buf, self.buf_tail, &self.buf_head) * if write_bytes is not None: * write_bytes(PyBytes_FromStringAndSize(self.buf + prev_head, self.buf_head - prev_head)) # <<<<<<<<<<<<<< * * if ret == 1: */ __pyx_t_5 = ((PyObject *)PyBytes_FromStringAndSize((__pyx_v_self->buf + __pyx_v_prev_head), (__pyx_v_self->buf_head - __pyx_v_prev_head))); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 593; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 593; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyObject_Call(__pyx_v_write_bytes, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 593; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; goto __pyx_L5; } __pyx_L5:; /* "pandas/msgpack.pyx":599 * template_init(&self.ctx) * return obj * elif ret == 0: # <<<<<<<<<<<<<< * if self.file_like is not None: * self.read_from_file() */ switch (__pyx_v_ret) { /* "pandas/msgpack.pyx":595 * write_bytes(PyBytes_FromStringAndSize(self.buf + prev_head, self.buf_head - prev_head)) * * if ret == 1: # <<<<<<<<<<<<<< * obj = template_data(&self.ctx) * template_init(&self.ctx) */ case 1: /* "pandas/msgpack.pyx":596 * * if ret == 1: * obj = template_data(&self.ctx) # <<<<<<<<<<<<<< * template_init(&self.ctx) * return obj */ __pyx_t_5 = template_data((&__pyx_v_self->ctx)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 596; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_v_obj = __pyx_t_5; __pyx_t_5 = 0; /* "pandas/msgpack.pyx":597 * if ret == 1: * obj = template_data(&self.ctx) * template_init(&self.ctx) # <<<<<<<<<<<<<< * return obj * elif ret == 0: */ template_init((&__pyx_v_self->ctx)); /* "pandas/msgpack.pyx":598 * obj = template_data(&self.ctx) * template_init(&self.ctx) * return obj # <<<<<<<<<<<<<< * elif ret == 0: * if self.file_like is not None: */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_obj); __pyx_r = __pyx_v_obj; goto __pyx_L0; break; /* "pandas/msgpack.pyx":599 * template_init(&self.ctx) * return obj * elif ret == 0: # <<<<<<<<<<<<<< * if self.file_like is not None: * self.read_from_file() */ case 0: /* "pandas/msgpack.pyx":600 * return obj * elif ret == 0: * if self.file_like is not None: # <<<<<<<<<<<<<< * self.read_from_file() * continue */ __pyx_t_4 = (__pyx_v_self->file_like != Py_None); __pyx_t_3 = (__pyx_t_4 != 0); if (__pyx_t_3) { /* "pandas/msgpack.pyx":601 * elif ret == 0: * if self.file_like is not None: * self.read_from_file() # <<<<<<<<<<<<<< * continue * if iter: */ __pyx_t_5 = ((struct __pyx_vtabstruct_6pandas_7msgpack_Unpacker *)__pyx_v_self->__pyx_vtab)->read_from_file(__pyx_v_self); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 601; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "pandas/msgpack.pyx":602 * if self.file_like is not None: * self.read_from_file() * continue # <<<<<<<<<<<<<< * if iter: * raise StopIteration("No more data to unpack.") */ goto __pyx_L3_continue; goto __pyx_L6; } __pyx_L6:; /* "pandas/msgpack.pyx":603 * self.read_from_file() * continue * if iter: # <<<<<<<<<<<<<< * raise StopIteration("No more data to unpack.") * else: */ __pyx_t_3 = (__pyx_v_iter != 0); if (__pyx_t_3) { /* "pandas/msgpack.pyx":604 * continue * if iter: * raise StopIteration("No more data to unpack.") # <<<<<<<<<<<<<< * else: * raise OutOfData("No more data to unpack.") */ __pyx_t_5 = PyObject_Call(__pyx_builtin_StopIteration, ((PyObject *)__pyx_k_tuple_41), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 604; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_Raise(__pyx_t_5, 0, 0, 0); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 604; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L7; } /*else*/ { /* "pandas/msgpack.pyx":606 * raise StopIteration("No more data to unpack.") * else: * raise OutOfData("No more data to unpack.") # <<<<<<<<<<<<<< * else: * raise ValueError("Unpack failed: error = %d" % (ret,)) */ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s__OutOfData); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 606; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_k_tuple_42), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 606; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_Raise(__pyx_t_6, 0, 0, 0); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 606; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_L7:; break; default: /* "pandas/msgpack.pyx":608 * raise OutOfData("No more data to unpack.") * else: * raise ValueError("Unpack failed: error = %d" % (ret,)) # <<<<<<<<<<<<<< * * def read_bytes(self, Py_ssize_t nbytes): */ __pyx_t_6 = PyInt_FromLong(__pyx_v_ret); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 608; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 608; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_28), ((PyObject *)__pyx_t_5)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 608; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_6)); __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 608; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_t_6)); __Pyx_GIVEREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0; __pyx_t_6 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 608; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; __Pyx_Raise(__pyx_t_6, 0, 0, 0); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 608; __pyx_clineno = __LINE__; goto __pyx_L1_error;} break; } __pyx_L3_continue:; } __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("pandas.msgpack.Unpacker._unpack", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_obj); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_7msgpack_8Unpacker_9read_bytes(PyObject *__pyx_v_self, PyObject *__pyx_arg_nbytes); /*proto*/ static char __pyx_doc_6pandas_7msgpack_8Unpacker_8read_bytes[] = "Unpacker.read_bytes(self, Py_ssize_t nbytes)\nread a specified number of raw bytes from the stream"; static PyObject *__pyx_pw_6pandas_7msgpack_8Unpacker_9read_bytes(PyObject *__pyx_v_self, PyObject *__pyx_arg_nbytes) { Py_ssize_t __pyx_v_nbytes; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("read_bytes (wrapper)", 0); assert(__pyx_arg_nbytes); { __pyx_v_nbytes = __Pyx_PyIndex_AsSsize_t(__pyx_arg_nbytes); if (unlikely((__pyx_v_nbytes == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 610; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; __Pyx_AddTraceback("pandas.msgpack.Unpacker.read_bytes", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pandas_7msgpack_8Unpacker_8read_bytes(((struct __pyx_obj_6pandas_7msgpack_Unpacker *)__pyx_v_self), ((Py_ssize_t)__pyx_v_nbytes)); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/msgpack.pyx":610 * raise ValueError("Unpack failed: error = %d" % (ret,)) * * def read_bytes(self, Py_ssize_t nbytes): # <<<<<<<<<<<<<< * """read a specified number of raw bytes from the stream""" * cdef size_t nread */ static PyObject *__pyx_pf_6pandas_7msgpack_8Unpacker_8read_bytes(struct __pyx_obj_6pandas_7msgpack_Unpacker *__pyx_v_self, Py_ssize_t __pyx_v_nbytes) { size_t __pyx_v_nread; PyObject *__pyx_v_ret = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; size_t __pyx_t_2; size_t __pyx_t_3; PyObject *__pyx_t_4 = NULL; int __pyx_t_5; int __pyx_t_6; int __pyx_t_7; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("read_bytes", 0); /* "pandas/msgpack.pyx":613 * """read a specified number of raw bytes from the stream""" * cdef size_t nread * nread = min(self.buf_tail - self.buf_head, nbytes) # <<<<<<<<<<<<<< * ret = PyBytes_FromStringAndSize(self.buf + self.buf_head, nread) * self.buf_head += nread */ __pyx_t_1 = __pyx_v_nbytes; __pyx_t_2 = (__pyx_v_self->buf_tail - __pyx_v_self->buf_head); if (((__pyx_t_1 < __pyx_t_2) != 0)) { __pyx_t_3 = __pyx_t_1; } else { __pyx_t_3 = __pyx_t_2; } __pyx_v_nread = __pyx_t_3; /* "pandas/msgpack.pyx":614 * cdef size_t nread * nread = min(self.buf_tail - self.buf_head, nbytes) * ret = PyBytes_FromStringAndSize(self.buf + self.buf_head, nread) # <<<<<<<<<<<<<< * self.buf_head += nread * if len(ret) < nbytes and self.file_like is not None: */ __pyx_t_4 = ((PyObject *)PyBytes_FromStringAndSize((__pyx_v_self->buf + __pyx_v_self->buf_head), __pyx_v_nread)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 614; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_v_ret = __pyx_t_4; __pyx_t_4 = 0; /* "pandas/msgpack.pyx":615 * nread = min(self.buf_tail - self.buf_head, nbytes) * ret = PyBytes_FromStringAndSize(self.buf + self.buf_head, nread) * self.buf_head += nread # <<<<<<<<<<<<<< * if len(ret) < nbytes and self.file_like is not None: * ret += self.file_like.read(nbytes - len(ret)) */ __pyx_v_self->buf_head = (__pyx_v_self->buf_head + __pyx_v_nread); /* "pandas/msgpack.pyx":616 * ret = PyBytes_FromStringAndSize(self.buf + self.buf_head, nread) * self.buf_head += nread * if len(ret) < nbytes and self.file_like is not None: # <<<<<<<<<<<<<< * ret += self.file_like.read(nbytes - len(ret)) * return ret */ __pyx_t_1 = PyObject_Length(__pyx_v_ret); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 616; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_5 = ((__pyx_t_1 < __pyx_v_nbytes) != 0); if (__pyx_t_5) { __pyx_t_6 = (__pyx_v_self->file_like != Py_None); __pyx_t_7 = (__pyx_t_6 != 0); } else { __pyx_t_7 = __pyx_t_5; } if (__pyx_t_7) { /* "pandas/msgpack.pyx":617 * self.buf_head += nread * if len(ret) < nbytes and self.file_like is not None: * ret += self.file_like.read(nbytes - len(ret)) # <<<<<<<<<<<<<< * return ret * */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->file_like, __pyx_n_s__read); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 617; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_1 = PyObject_Length(__pyx_v_ret); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 617; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_8 = PyInt_FromSsize_t((__pyx_v_nbytes - __pyx_t_1)); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 617; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 617; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_8); __Pyx_GIVEREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_8 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_9), NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 617; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_9)); __pyx_t_9 = 0; __pyx_t_9 = PyNumber_InPlaceAdd(__pyx_v_ret, __pyx_t_8); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 617; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF_SET(__pyx_v_ret, __pyx_t_9); __pyx_t_9 = 0; goto __pyx_L3; } __pyx_L3:; /* "pandas/msgpack.pyx":618 * if len(ret) < nbytes and self.file_like is not None: * ret += self.file_like.read(nbytes - len(ret)) * return ret # <<<<<<<<<<<<<< * * def unpack(self, object write_bytes=None): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_ret); __pyx_r = __pyx_v_ret; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); __Pyx_AddTraceback("pandas.msgpack.Unpacker.read_bytes", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_ret); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_7msgpack_8Unpacker_11unpack(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6pandas_7msgpack_8Unpacker_10unpack[] = "Unpacker.unpack(self, write_bytes=None)\n\n unpack one object\n\n If write_bytes is not None, it will be called with parts of the raw\n message as it is unpacked.\n\n Raises `OutOfData` when there are no more bytes to unpack.\n "; static PyObject *__pyx_pw_6pandas_7msgpack_8Unpacker_11unpack(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_write_bytes = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("unpack (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__write_bytes,0}; PyObject* values[1] = {0}; /* "pandas/msgpack.pyx":620 * return ret * * def unpack(self, object write_bytes=None): # <<<<<<<<<<<<<< * """ * unpack one object */ values[0] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__write_bytes); if (value) { values[0] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "unpack") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 620; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_write_bytes = values[0]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("unpack", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 620; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.msgpack.Unpacker.unpack", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pandas_7msgpack_8Unpacker_10unpack(((struct __pyx_obj_6pandas_7msgpack_Unpacker *)__pyx_v_self), __pyx_v_write_bytes); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_7msgpack_8Unpacker_10unpack(struct __pyx_obj_6pandas_7msgpack_Unpacker *__pyx_v_self, PyObject *__pyx_v_write_bytes) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("unpack", 0); /* "pandas/msgpack.pyx":629 * Raises `OutOfData` when there are no more bytes to unpack. * """ * return self._unpack(template_construct, write_bytes) # <<<<<<<<<<<<<< * * def skip(self, object write_bytes=None): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = ((struct __pyx_vtabstruct_6pandas_7msgpack_Unpacker *)__pyx_v_self->__pyx_vtab)->_unpack(__pyx_v_self, template_construct, __pyx_v_write_bytes, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 629; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas.msgpack.Unpacker.unpack", __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_7msgpack_8Unpacker_13skip(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6pandas_7msgpack_8Unpacker_12skip[] = "Unpacker.skip(self, write_bytes=None)\n\n read and ignore one object, returning None\n\n If write_bytes is not None, it will be called with parts of the raw\n message as it is unpacked.\n\n Raises `OutOfData` when there are no more bytes to unpack.\n "; static PyObject *__pyx_pw_6pandas_7msgpack_8Unpacker_13skip(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_write_bytes = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("skip (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__write_bytes,0}; PyObject* values[1] = {0}; /* "pandas/msgpack.pyx":631 * return self._unpack(template_construct, write_bytes) * * def skip(self, object write_bytes=None): # <<<<<<<<<<<<<< * """ * read and ignore one object, returning None */ values[0] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__write_bytes); if (value) { values[0] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "skip") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 631; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_write_bytes = values[0]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("skip", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 631; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.msgpack.Unpacker.skip", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pandas_7msgpack_8Unpacker_12skip(((struct __pyx_obj_6pandas_7msgpack_Unpacker *)__pyx_v_self), __pyx_v_write_bytes); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_7msgpack_8Unpacker_12skip(struct __pyx_obj_6pandas_7msgpack_Unpacker *__pyx_v_self, PyObject *__pyx_v_write_bytes) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("skip", 0); /* "pandas/msgpack.pyx":640 * Raises `OutOfData` when there are no more bytes to unpack. * """ * return self._unpack(template_skip, write_bytes) # <<<<<<<<<<<<<< * * def read_array_header(self, object write_bytes=None): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = ((struct __pyx_vtabstruct_6pandas_7msgpack_Unpacker *)__pyx_v_self->__pyx_vtab)->_unpack(__pyx_v_self, template_skip, __pyx_v_write_bytes, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 640; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas.msgpack.Unpacker.skip", __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_7msgpack_8Unpacker_15read_array_header(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6pandas_7msgpack_8Unpacker_14read_array_header[] = "Unpacker.read_array_header(self, write_bytes=None)\nassuming the next object is an array, return its size n, such that\n the next n unpack() calls will iterate over its contents.\n\n Raises `OutOfData` when there are no more bytes to unpack.\n "; static PyObject *__pyx_pw_6pandas_7msgpack_8Unpacker_15read_array_header(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_write_bytes = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("read_array_header (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__write_bytes,0}; PyObject* values[1] = {0}; /* "pandas/msgpack.pyx":642 * return self._unpack(template_skip, write_bytes) * * def read_array_header(self, object write_bytes=None): # <<<<<<<<<<<<<< * """assuming the next object is an array, return its size n, such that * the next n unpack() calls will iterate over its contents. */ values[0] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__write_bytes); if (value) { values[0] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "read_array_header") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 642; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_write_bytes = values[0]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("read_array_header", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 642; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.msgpack.Unpacker.read_array_header", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pandas_7msgpack_8Unpacker_14read_array_header(((struct __pyx_obj_6pandas_7msgpack_Unpacker *)__pyx_v_self), __pyx_v_write_bytes); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_7msgpack_8Unpacker_14read_array_header(struct __pyx_obj_6pandas_7msgpack_Unpacker *__pyx_v_self, PyObject *__pyx_v_write_bytes) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("read_array_header", 0); /* "pandas/msgpack.pyx":648 * Raises `OutOfData` when there are no more bytes to unpack. * """ * return self._unpack(read_array_header, write_bytes) # <<<<<<<<<<<<<< * * def read_map_header(self, object write_bytes=None): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = ((struct __pyx_vtabstruct_6pandas_7msgpack_Unpacker *)__pyx_v_self->__pyx_vtab)->_unpack(__pyx_v_self, read_array_header, __pyx_v_write_bytes, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 648; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas.msgpack.Unpacker.read_array_header", __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_7msgpack_8Unpacker_17read_map_header(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6pandas_7msgpack_8Unpacker_16read_map_header[] = "Unpacker.read_map_header(self, write_bytes=None)\nassuming the next object is a map, return its size n, such that the\n next n * 2 unpack() calls will iterate over its key-value pairs.\n\n Raises `OutOfData` when there are no more bytes to unpack.\n "; static PyObject *__pyx_pw_6pandas_7msgpack_8Unpacker_17read_map_header(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_write_bytes = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("read_map_header (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__write_bytes,0}; PyObject* values[1] = {0}; /* "pandas/msgpack.pyx":650 * return self._unpack(read_array_header, write_bytes) * * def read_map_header(self, object write_bytes=None): # <<<<<<<<<<<<<< * """assuming the next object is a map, return its size n, such that the * next n * 2 unpack() calls will iterate over its key-value pairs. */ values[0] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__write_bytes); if (value) { values[0] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "read_map_header") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 650; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_write_bytes = values[0]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("read_map_header", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 650; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.msgpack.Unpacker.read_map_header", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pandas_7msgpack_8Unpacker_16read_map_header(((struct __pyx_obj_6pandas_7msgpack_Unpacker *)__pyx_v_self), __pyx_v_write_bytes); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_7msgpack_8Unpacker_16read_map_header(struct __pyx_obj_6pandas_7msgpack_Unpacker *__pyx_v_self, PyObject *__pyx_v_write_bytes) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("read_map_header", 0); /* "pandas/msgpack.pyx":656 * Raises `OutOfData` when there are no more bytes to unpack. * """ * return self._unpack(read_map_header, write_bytes) # <<<<<<<<<<<<<< * * def __iter__(self): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = ((struct __pyx_vtabstruct_6pandas_7msgpack_Unpacker *)__pyx_v_self->__pyx_vtab)->_unpack(__pyx_v_self, read_map_header, __pyx_v_write_bytes, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 656; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas.msgpack.Unpacker.read_map_header", __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_7msgpack_8Unpacker_19__iter__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6pandas_7msgpack_8Unpacker_19__iter__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__iter__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_7msgpack_8Unpacker_18__iter__(((struct __pyx_obj_6pandas_7msgpack_Unpacker *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/msgpack.pyx":658 * return self._unpack(read_map_header, write_bytes) * * def __iter__(self): # <<<<<<<<<<<<<< * return self * */ static PyObject *__pyx_pf_6pandas_7msgpack_8Unpacker_18__iter__(struct __pyx_obj_6pandas_7msgpack_Unpacker *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__iter__", 0); /* "pandas/msgpack.pyx":659 * * def __iter__(self): * return self # <<<<<<<<<<<<<< * * def __next__(self): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_self)); __pyx_r = ((PyObject *)__pyx_v_self); goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_7msgpack_8Unpacker_21__next__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6pandas_7msgpack_8Unpacker_21__next__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__next__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_7msgpack_8Unpacker_20__next__(((struct __pyx_obj_6pandas_7msgpack_Unpacker *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/msgpack.pyx":661 * return self * * def __next__(self): # <<<<<<<<<<<<<< * return self._unpack(template_construct, None, 1) * */ static PyObject *__pyx_pf_6pandas_7msgpack_8Unpacker_20__next__(struct __pyx_obj_6pandas_7msgpack_Unpacker *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; struct __pyx_opt_args_6pandas_7msgpack_8Unpacker__unpack __pyx_t_2; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__next__", 0); /* "pandas/msgpack.pyx":662 * * def __next__(self): * return self._unpack(template_construct, None, 1) # <<<<<<<<<<<<<< * * # for debug. */ __Pyx_XDECREF(__pyx_r); __pyx_t_2.__pyx_n = 1; __pyx_t_2.iter = 1; __pyx_t_1 = ((struct __pyx_vtabstruct_6pandas_7msgpack_Unpacker *)__pyx_v_self->__pyx_vtab)->_unpack(__pyx_v_self, template_construct, Py_None, &__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 662; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas.msgpack.Unpacker.__next__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* 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)); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "numpy.pxd":196 * # 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 fullfill the PEP. */ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags) { int __pyx_v_copy_shape; 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_v_hasfields; int __pyx_r; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; int __pyx_t_5; int __pyx_t_6; int __pyx_t_7; PyObject *__pyx_t_8 = NULL; char *__pyx_t_9; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__getbuffer__", 0); if (__pyx_v_info != NULL) { __pyx_v_info->obj = Py_None; __Pyx_INCREF(Py_None); __Pyx_GIVEREF(__pyx_v_info->obj); } /* "numpy.pxd":202 * # of flags * * if info == NULL: return # <<<<<<<<<<<<<< * * cdef int copy_shape, i, ndim */ __pyx_t_1 = ((__pyx_v_info == NULL) != 0); if (__pyx_t_1) { __pyx_r = 0; goto __pyx_L0; goto __pyx_L3; } __pyx_L3:; /* "numpy.pxd":205 * * cdef int copy_shape, i, ndim * cdef int endian_detector = 1 # <<<<<<<<<<<<<< * cdef bint little_endian = ((&endian_detector)[0] != 0) * */ __pyx_v_endian_detector = 1; /* "numpy.pxd":206 * cdef int copy_shape, 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); /* "numpy.pxd":208 * cdef bint little_endian = ((&endian_detector)[0] != 0) * * ndim = PyArray_NDIM(self) # <<<<<<<<<<<<<< * * if sizeof(npy_intp) != sizeof(Py_ssize_t): */ __pyx_v_ndim = PyArray_NDIM(__pyx_v_self); /* "numpy.pxd":210 * ndim = PyArray_NDIM(self) * * if sizeof(npy_intp) != sizeof(Py_ssize_t): # <<<<<<<<<<<<<< * copy_shape = 1 * else: */ __pyx_t_1 = (((sizeof(npy_intp)) != (sizeof(Py_ssize_t))) != 0); if (__pyx_t_1) { /* "numpy.pxd":211 * * if sizeof(npy_intp) != sizeof(Py_ssize_t): * copy_shape = 1 # <<<<<<<<<<<<<< * else: * copy_shape = 0 */ __pyx_v_copy_shape = 1; goto __pyx_L4; } /*else*/ { /* "numpy.pxd":213 * copy_shape = 1 * else: * copy_shape = 0 # <<<<<<<<<<<<<< * * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) */ __pyx_v_copy_shape = 0; } __pyx_L4:; /* "numpy.pxd":215 * copy_shape = 0 * * 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_1 = (((__pyx_v_flags & PyBUF_C_CONTIGUOUS) == PyBUF_C_CONTIGUOUS) != 0); if (__pyx_t_1) { /* "numpy.pxd":216 * * 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_3 = __pyx_t_2; } else { __pyx_t_3 = __pyx_t_1; } if (__pyx_t_3) { /* "numpy.pxd":217 * 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_4 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_44), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 217; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 217; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L5; } __pyx_L5:; /* "numpy.pxd":219 * 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_3 = (((__pyx_v_flags & PyBUF_F_CONTIGUOUS) == PyBUF_F_CONTIGUOUS) != 0); if (__pyx_t_3) { /* "numpy.pxd":220 * * 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_1 = ((!(PyArray_CHKFLAGS(__pyx_v_self, NPY_F_CONTIGUOUS) != 0)) != 0); __pyx_t_2 = __pyx_t_1; } else { __pyx_t_2 = __pyx_t_3; } if (__pyx_t_2) { /* "numpy.pxd":221 * 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_4 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_46), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 221; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 221; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L6; } __pyx_L6:; /* "numpy.pxd":223 * raise ValueError(u"ndarray is not Fortran contiguous") * * info.buf = PyArray_DATA(self) # <<<<<<<<<<<<<< * info.ndim = ndim * if copy_shape: */ __pyx_v_info->buf = PyArray_DATA(__pyx_v_self); /* "numpy.pxd":224 * * info.buf = PyArray_DATA(self) * info.ndim = ndim # <<<<<<<<<<<<<< * if copy_shape: * # Allocate new buffer for strides and shape info. */ __pyx_v_info->ndim = __pyx_v_ndim; /* "numpy.pxd":225 * info.buf = PyArray_DATA(self) * info.ndim = ndim * if copy_shape: # <<<<<<<<<<<<<< * # Allocate new buffer for strides and shape info. * # This is allocated as one block, strides first. */ __pyx_t_2 = (__pyx_v_copy_shape != 0); if (__pyx_t_2) { /* "numpy.pxd":228 * # Allocate new buffer for strides and shape info. * # This is allocated as one block, strides first. * info.strides = stdlib.malloc(sizeof(Py_ssize_t) * ndim * 2) # <<<<<<<<<<<<<< * info.shape = info.strides + ndim * for i in range(ndim): */ __pyx_v_info->strides = ((Py_ssize_t *)malloc((((sizeof(Py_ssize_t)) * ((size_t)__pyx_v_ndim)) * 2))); /* "numpy.pxd":229 * # This is allocated as one block, strides first. * info.strides = stdlib.malloc(sizeof(Py_ssize_t) * ndim * 2) * 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); /* "numpy.pxd":230 * info.strides = stdlib.malloc(sizeof(Py_ssize_t) * ndim * 2) * 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_5 = __pyx_v_ndim; for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) { __pyx_v_i = __pyx_t_6; /* "numpy.pxd":231 * 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]); /* "numpy.pxd":232 * 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]); } goto __pyx_L7; } /*else*/ { /* "numpy.pxd":234 * info.shape[i] = PyArray_DIMS(self)[i] * else: * info.strides = PyArray_STRIDES(self) # <<<<<<<<<<<<<< * info.shape = PyArray_DIMS(self) * info.suboffsets = NULL */ __pyx_v_info->strides = ((Py_ssize_t *)PyArray_STRIDES(__pyx_v_self)); /* "numpy.pxd":235 * 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_L7:; /* "numpy.pxd":236 * 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; /* "numpy.pxd":237 * 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); /* "numpy.pxd":238 * 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)); /* "numpy.pxd":241 * * cdef int t * cdef char* f = NULL # <<<<<<<<<<<<<< * cdef dtype descr = self.descr * cdef list stack */ __pyx_v_f = NULL; /* "numpy.pxd":242 * cdef int t * cdef char* f = NULL * cdef dtype descr = self.descr # <<<<<<<<<<<<<< * cdef list stack * cdef int offset */ __pyx_t_4 = ((PyObject *)__pyx_v_self->descr); __Pyx_INCREF(__pyx_t_4); __pyx_v_descr = ((PyArray_Descr *)__pyx_t_4); __pyx_t_4 = 0; /* "numpy.pxd":246 * cdef int offset * * cdef bint hasfields = PyDataType_HASFIELDS(descr) # <<<<<<<<<<<<<< * * if not hasfields and not copy_shape: */ __pyx_v_hasfields = PyDataType_HASFIELDS(__pyx_v_descr); /* "numpy.pxd":248 * cdef bint hasfields = PyDataType_HASFIELDS(descr) * * if not hasfields and not copy_shape: # <<<<<<<<<<<<<< * # do not call releasebuffer * info.obj = None */ __pyx_t_2 = ((!(__pyx_v_hasfields != 0)) != 0); if (__pyx_t_2) { __pyx_t_3 = ((!(__pyx_v_copy_shape != 0)) != 0); __pyx_t_1 = __pyx_t_3; } else { __pyx_t_1 = __pyx_t_2; } if (__pyx_t_1) { /* "numpy.pxd":250 * if not hasfields and not copy_shape: * # do not call releasebuffer * info.obj = None # <<<<<<<<<<<<<< * else: * # need to call releasebuffer */ __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_info->obj); __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = Py_None; goto __pyx_L10; } /*else*/ { /* "numpy.pxd":253 * else: * # need to call releasebuffer * info.obj = self # <<<<<<<<<<<<<< * * if not hasfields: */ __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); } __pyx_L10:; /* "numpy.pxd":255 * info.obj = self * * if not hasfields: # <<<<<<<<<<<<<< * t = descr.type_num * if ((descr.byteorder == '>' and little_endian) or */ __pyx_t_1 = ((!(__pyx_v_hasfields != 0)) != 0); if (__pyx_t_1) { /* "numpy.pxd":256 * * if not hasfields: * t = descr.type_num # <<<<<<<<<<<<<< * if ((descr.byteorder == '>' and little_endian) or * (descr.byteorder == '<' and not little_endian)): */ __pyx_t_5 = __pyx_v_descr->type_num; __pyx_v_t = __pyx_t_5; /* "numpy.pxd":257 * if not hasfields: * t = descr.type_num * if ((descr.byteorder == '>' and little_endian) or # <<<<<<<<<<<<<< * (descr.byteorder == '<' and not little_endian)): * raise ValueError(u"Non-native byte order not supported") */ __pyx_t_1 = ((__pyx_v_descr->byteorder == '>') != 0); if (__pyx_t_1) { __pyx_t_2 = (__pyx_v_little_endian != 0); } else { __pyx_t_2 = __pyx_t_1; } if (!__pyx_t_2) { /* "numpy.pxd":258 * t = descr.type_num * if ((descr.byteorder == '>' and little_endian) or * (descr.byteorder == '<' and not little_endian)): # <<<<<<<<<<<<<< * raise ValueError(u"Non-native byte order not supported") * if t == NPY_BYTE: f = "b" */ __pyx_t_1 = ((__pyx_v_descr->byteorder == '<') != 0); if (__pyx_t_1) { __pyx_t_3 = ((!(__pyx_v_little_endian != 0)) != 0); __pyx_t_7 = __pyx_t_3; } else { __pyx_t_7 = __pyx_t_1; } __pyx_t_1 = __pyx_t_7; } else { __pyx_t_1 = __pyx_t_2; } if (__pyx_t_1) { /* "numpy.pxd":259 * if ((descr.byteorder == '>' and little_endian) or * (descr.byteorder == '<' 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_4 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_48), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 259; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 259; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L12; } __pyx_L12:; /* "numpy.pxd":276 * 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) */ switch (__pyx_v_t) { /* "numpy.pxd":260 * (descr.byteorder == '<' 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" */ case NPY_BYTE: __pyx_v_f = __pyx_k__b; break; /* "numpy.pxd":261 * 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 = __pyx_k__B; break; /* "numpy.pxd":262 * 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 = __pyx_k__h; break; /* "numpy.pxd":263 * 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 = __pyx_k__H; break; /* "numpy.pxd":264 * 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 = __pyx_k__i; break; /* "numpy.pxd":265 * 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 = __pyx_k__I; break; /* "numpy.pxd":266 * 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 = __pyx_k__l; break; /* "numpy.pxd":267 * 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 = __pyx_k__L; break; /* "numpy.pxd":268 * 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 = __pyx_k__q; break; /* "numpy.pxd":269 * 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 = __pyx_k__Q; break; /* "numpy.pxd":270 * 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 = __pyx_k__f; break; /* "numpy.pxd":271 * 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 = __pyx_k__d; break; /* "numpy.pxd":272 * 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 = __pyx_k__g; break; /* "numpy.pxd":273 * 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 = __pyx_k__Zf; break; /* "numpy.pxd":274 * 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 = __pyx_k__Zd; break; /* "numpy.pxd":275 * 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 = __pyx_k__Zg; break; /* "numpy.pxd":276 * 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 = __pyx_k__O; break; default: /* "numpy.pxd":278 * elif t == NPY_OBJECT: f = "O" * else: * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) # <<<<<<<<<<<<<< * info.format = f * return */ __pyx_t_4 = PyInt_FromLong(__pyx_v_t); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 278; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_8 = PyNumber_Remainder(((PyObject *)__pyx_kp_u_49), __pyx_t_4); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 278; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_8)); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 278; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_t_8)); __Pyx_GIVEREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0; __pyx_t_8 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 278; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __Pyx_Raise(__pyx_t_8, 0, 0, 0); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; {__pyx_filename = __pyx_f[1]; __pyx_lineno = 278; __pyx_clineno = __LINE__; goto __pyx_L1_error;} break; } /* "numpy.pxd":279 * else: * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) * info.format = f # <<<<<<<<<<<<<< * return * else: */ __pyx_v_info->format = __pyx_v_f; /* "numpy.pxd":280 * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) * info.format = f * return # <<<<<<<<<<<<<< * else: * info.format = stdlib.malloc(_buffer_format_string_len) */ __pyx_r = 0; goto __pyx_L0; goto __pyx_L11; } /*else*/ { /* "numpy.pxd":282 * return * else: * info.format = stdlib.malloc(_buffer_format_string_len) # <<<<<<<<<<<<<< * info.format[0] = '^' # Native data types, manual alignment * offset = 0 */ __pyx_v_info->format = ((char *)malloc(255)); /* "numpy.pxd":283 * else: * info.format = stdlib.malloc(_buffer_format_string_len) * info.format[0] = '^' # Native data types, manual alignment # <<<<<<<<<<<<<< * offset = 0 * f = _util_dtypestring(descr, info.format + 1, */ (__pyx_v_info->format[0]) = '^'; /* "numpy.pxd":284 * info.format = stdlib.malloc(_buffer_format_string_len) * info.format[0] = '^' # Native data types, manual alignment * offset = 0 # <<<<<<<<<<<<<< * f = _util_dtypestring(descr, info.format + 1, * info.format + _buffer_format_string_len, */ __pyx_v_offset = 0; /* "numpy.pxd":287 * f = _util_dtypestring(descr, info.format + 1, * info.format + _buffer_format_string_len, * &offset) # <<<<<<<<<<<<<< * f[0] = 0 # Terminate format string * */ __pyx_t_9 = __pyx_f_5numpy__util_dtypestring(__pyx_v_descr, (__pyx_v_info->format + 1), (__pyx_v_info->format + 255), (&__pyx_v_offset)); if (unlikely(__pyx_t_9 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 285; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_f = __pyx_t_9; /* "numpy.pxd":288 * info.format + _buffer_format_string_len, * &offset) * f[0] = 0 # Terminate format string # <<<<<<<<<<<<<< * * def __releasebuffer__(ndarray self, Py_buffer* info): */ (__pyx_v_f[0]) = 0; } __pyx_L11:; __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_8); __Pyx_AddTraceback("numpy.ndarray.__getbuffer__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; if (__pyx_v_info != NULL && __pyx_v_info->obj != NULL) { __Pyx_GOTREF(__pyx_v_info->obj); __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = NULL; } goto __pyx_L2; __pyx_L0:; if (__pyx_v_info != NULL && __pyx_v_info->obj == Py_None) { __Pyx_GOTREF(Py_None); __Pyx_DECREF(Py_None); __pyx_v_info->obj = NULL; } __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_descr); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* 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)); __Pyx_RefNannyFinishContext(); } /* "numpy.pxd":290 * f[0] = 0 # Terminate format string * * def __releasebuffer__(ndarray self, Py_buffer* info): # <<<<<<<<<<<<<< * if PyArray_HASFIELDS(self): * stdlib.free(info.format) */ 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); /* "numpy.pxd":291 * * def __releasebuffer__(ndarray self, Py_buffer* info): * if PyArray_HASFIELDS(self): # <<<<<<<<<<<<<< * stdlib.free(info.format) * if sizeof(npy_intp) != sizeof(Py_ssize_t): */ __pyx_t_1 = (PyArray_HASFIELDS(__pyx_v_self) != 0); if (__pyx_t_1) { /* "numpy.pxd":292 * def __releasebuffer__(ndarray self, Py_buffer* info): * if PyArray_HASFIELDS(self): * stdlib.free(info.format) # <<<<<<<<<<<<<< * if sizeof(npy_intp) != sizeof(Py_ssize_t): * stdlib.free(info.strides) */ free(__pyx_v_info->format); goto __pyx_L3; } __pyx_L3:; /* "numpy.pxd":293 * if PyArray_HASFIELDS(self): * stdlib.free(info.format) * if sizeof(npy_intp) != sizeof(Py_ssize_t): # <<<<<<<<<<<<<< * stdlib.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) { /* "numpy.pxd":294 * stdlib.free(info.format) * if sizeof(npy_intp) != sizeof(Py_ssize_t): * stdlib.free(info.strides) # <<<<<<<<<<<<<< * # info.shape was stored after info.strides in the same block * */ free(__pyx_v_info->strides); goto __pyx_L4; } __pyx_L4:; __Pyx_RefNannyFinishContext(); } /* "numpy.pxd":772 * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PyArray_MultiIterNew1", 0); /* "numpy.pxd":773 * * 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_filename = __pyx_f[1]; __pyx_lineno = 773; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __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; } /* "numpy.pxd":775 * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PyArray_MultiIterNew2", 0); /* "numpy.pxd":776 * * 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_filename = __pyx_f[1]; __pyx_lineno = 776; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __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; } /* "numpy.pxd":778 * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PyArray_MultiIterNew3", 0); /* "numpy.pxd":779 * * 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_filename = __pyx_f[1]; __pyx_lineno = 779; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __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; } /* "numpy.pxd":781 * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PyArray_MultiIterNew4", 0); /* "numpy.pxd":782 * * 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_filename = __pyx_f[1]; __pyx_lineno = 782; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __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; } /* "numpy.pxd":784 * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PyArray_MultiIterNew5", 0); /* "numpy.pxd":785 * * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): * return PyArray_MultiIterNew(5, a, b, c, d, e) # <<<<<<<<<<<<<< * * cdef inline char* _util_dtypestring(dtype descr, char* f, char* end, int* offset) except NULL: */ __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_filename = __pyx_f[1]; __pyx_lineno = 785; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __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; } /* "numpy.pxd":787 * return PyArray_MultiIterNew(5, a, b, c, d, e) * * 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; PyObject *__pyx_t_5 = NULL; PyObject *(*__pyx_t_6)(PyObject *); int __pyx_t_7; int __pyx_t_8; int __pyx_t_9; int __pyx_t_10; long __pyx_t_11; char *__pyx_t_12; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_util_dtypestring", 0); /* "numpy.pxd":794 * cdef int delta_offset * cdef tuple i * cdef int endian_detector = 1 # <<<<<<<<<<<<<< * cdef bint little_endian = ((&endian_detector)[0] != 0) * cdef tuple fields */ __pyx_v_endian_detector = 1; /* "numpy.pxd":795 * cdef tuple i * 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); /* "numpy.pxd":798 * cdef tuple fields * * for childname in descr.names: # <<<<<<<<<<<<<< * fields = descr.fields[childname] * child, new_offset = fields */ if (unlikely(((PyObject *)__pyx_v_descr->names) == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 798; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_1 = ((PyObject *)__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_COMPILING_IN_CPYTHON __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_filename = __pyx_f[1]; __pyx_lineno = 798; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 798; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif __Pyx_XDECREF_SET(__pyx_v_childname, __pyx_t_3); __pyx_t_3 = 0; /* "numpy.pxd":799 * * for childname in descr.names: * fields = descr.fields[childname] # <<<<<<<<<<<<<< * child, new_offset = fields * */ __pyx_t_3 = PyObject_GetItem(__pyx_v_descr->fields, __pyx_v_childname); if (!__pyx_t_3) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 799; __pyx_clineno = __LINE__; goto __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 tuple, got %.200s", Py_TYPE(__pyx_t_3)->tp_name), 0))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 799; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_XDECREF_SET(__pyx_v_fields, ((PyObject*)__pyx_t_3)); __pyx_t_3 = 0; /* "numpy.pxd":800 * for childname in descr.names: * fields = descr.fields[childname] * child, new_offset = fields # <<<<<<<<<<<<<< * * if (end - f) - (new_offset - offset[0]) < 15: */ if (likely(PyTuple_CheckExact(((PyObject *)__pyx_v_fields)))) { PyObject* sequence = ((PyObject *)__pyx_v_fields); #if CYTHON_COMPILING_IN_CPYTHON Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 800; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON __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_filename = __pyx_f[1]; __pyx_lineno = 800; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 800; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); #endif } else if (1) { __Pyx_RaiseNoneNotIterableError(); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 800; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } else { Py_ssize_t index = -1; __pyx_t_5 = PyObject_GetIter(((PyObject *)__pyx_v_fields)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 800; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = Py_TYPE(__pyx_t_5)->tp_iternext; index = 0; __pyx_t_3 = __pyx_t_6(__pyx_t_5); if (unlikely(!__pyx_t_3)) goto __pyx_L5_unpacking_failed; __Pyx_GOTREF(__pyx_t_3); index = 1; __pyx_t_4 = __pyx_t_6(__pyx_t_5); if (unlikely(!__pyx_t_4)) goto __pyx_L5_unpacking_failed; __Pyx_GOTREF(__pyx_t_4); if (__Pyx_IternextUnpackEndCheck(__pyx_t_6(__pyx_t_5), 2) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 800; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_6 = NULL; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; goto __pyx_L6_unpacking_done; __pyx_L5_unpacking_failed:; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_6 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 800; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_L6_unpacking_done:; } if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_dtype))))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 800; __pyx_clineno = __LINE__; goto __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; /* "numpy.pxd":802 * 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 = PyInt_FromLong((__pyx_v_end - __pyx_v_f)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 802; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = PyInt_FromLong((__pyx_v_offset[0])); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 802; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = PyNumber_Subtract(__pyx_v_new_offset, __pyx_t_3); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 802; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyNumber_Subtract(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 802; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyObject_RichCompare(__pyx_t_3, __pyx_int_15, Py_LT); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 802; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 802; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_7) { /* "numpy.pxd":803 * * if (end - f) - (new_offset - offset[0]) < 15: * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") # <<<<<<<<<<<<<< * * if ((child.byteorder == '>' and little_endian) or */ __pyx_t_5 = PyObject_Call(__pyx_builtin_RuntimeError, ((PyObject *)__pyx_k_tuple_51), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 803; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_Raise(__pyx_t_5, 0, 0, 0); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; {__pyx_filename = __pyx_f[1]; __pyx_lineno = 803; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L7; } __pyx_L7:; /* "numpy.pxd":805 * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") * * if ((child.byteorder == '>' and little_endian) or # <<<<<<<<<<<<<< * (child.byteorder == '<' 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) { __pyx_t_8 = (__pyx_v_little_endian != 0); } else { __pyx_t_8 = __pyx_t_7; } if (!__pyx_t_8) { /* "numpy.pxd":806 * * if ((child.byteorder == '>' and little_endian) or * (child.byteorder == '<' 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) { __pyx_t_9 = ((!(__pyx_v_little_endian != 0)) != 0); __pyx_t_10 = __pyx_t_9; } else { __pyx_t_10 = __pyx_t_7; } __pyx_t_7 = __pyx_t_10; } else { __pyx_t_7 = __pyx_t_8; } if (__pyx_t_7) { /* "numpy.pxd":807 * if ((child.byteorder == '>' and little_endian) or * (child.byteorder == '<' 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_5 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_52), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 807; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_Raise(__pyx_t_5, 0, 0, 0); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; {__pyx_filename = __pyx_f[1]; __pyx_lineno = 807; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L8; } __pyx_L8:; /* "numpy.pxd":817 * * # Output padding bytes * while offset[0] < new_offset: # <<<<<<<<<<<<<< * f[0] = 120 # "x"; pad byte * f += 1 */ while (1) { __pyx_t_5 = PyInt_FromLong((__pyx_v_offset[0])); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 817; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = PyObject_RichCompare(__pyx_t_5, __pyx_v_new_offset, Py_LT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 817; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 817; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (!__pyx_t_7) break; /* "numpy.pxd":818 * # Output padding bytes * while offset[0] < new_offset: * f[0] = 120 # "x"; pad byte # <<<<<<<<<<<<<< * f += 1 * offset[0] += 1 */ (__pyx_v_f[0]) = 120; /* "numpy.pxd":819 * while offset[0] < new_offset: * f[0] = 120 # "x"; pad byte * f += 1 # <<<<<<<<<<<<<< * offset[0] += 1 * */ __pyx_v_f = (__pyx_v_f + 1); /* "numpy.pxd":820 * f[0] = 120 # "x"; pad byte * f += 1 * offset[0] += 1 # <<<<<<<<<<<<<< * * offset[0] += child.itemsize */ __pyx_t_11 = 0; (__pyx_v_offset[__pyx_t_11]) = ((__pyx_v_offset[__pyx_t_11]) + 1); } /* "numpy.pxd":822 * offset[0] += 1 * * offset[0] += child.itemsize # <<<<<<<<<<<<<< * * if not PyDataType_HASFIELDS(child): */ __pyx_t_11 = 0; (__pyx_v_offset[__pyx_t_11]) = ((__pyx_v_offset[__pyx_t_11]) + __pyx_v_child->elsize); /* "numpy.pxd":824 * offset[0] += child.itemsize * * if not PyDataType_HASFIELDS(child): # <<<<<<<<<<<<<< * t = child.type_num * if end - f < 5: */ __pyx_t_7 = ((!(PyDataType_HASFIELDS(__pyx_v_child) != 0)) != 0); if (__pyx_t_7) { /* "numpy.pxd":825 * * if not PyDataType_HASFIELDS(child): * t = child.type_num # <<<<<<<<<<<<<< * if end - f < 5: * raise RuntimeError(u"Format string allocated too short.") */ __pyx_t_3 = PyInt_FromLong(__pyx_v_child->type_num); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 825; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_XDECREF_SET(__pyx_v_t, __pyx_t_3); __pyx_t_3 = 0; /* "numpy.pxd":826 * if not PyDataType_HASFIELDS(child): * t = child.type_num * if end - f < 5: # <<<<<<<<<<<<<< * raise RuntimeError(u"Format string allocated too short.") * */ __pyx_t_7 = (((__pyx_v_end - __pyx_v_f) < 5) != 0); if (__pyx_t_7) { /* "numpy.pxd":827 * 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_3 = PyObject_Call(__pyx_builtin_RuntimeError, ((PyObject *)__pyx_k_tuple_54), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 827; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 827; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L12; } __pyx_L12:; /* "numpy.pxd":830 * * # 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_3 = PyInt_FromLong(NPY_BYTE); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 830; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 830; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 830; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_7) { (__pyx_v_f[0]) = 98; goto __pyx_L13; } /* "numpy.pxd":831 * # 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_5 = PyInt_FromLong(NPY_UBYTE); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 831; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 831; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 831; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_7) { (__pyx_v_f[0]) = 66; goto __pyx_L13; } /* "numpy.pxd":832 * 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_3 = PyInt_FromLong(NPY_SHORT); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 832; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 832; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 832; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_7) { (__pyx_v_f[0]) = 104; goto __pyx_L13; } /* "numpy.pxd":833 * 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_5 = PyInt_FromLong(NPY_USHORT); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 833; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 833; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 833; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_7) { (__pyx_v_f[0]) = 72; goto __pyx_L13; } /* "numpy.pxd":834 * 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_3 = PyInt_FromLong(NPY_INT); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 834; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 834; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 834; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_7) { (__pyx_v_f[0]) = 105; goto __pyx_L13; } /* "numpy.pxd":835 * 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_5 = PyInt_FromLong(NPY_UINT); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 835; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 835; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 835; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_7) { (__pyx_v_f[0]) = 73; goto __pyx_L13; } /* "numpy.pxd":836 * 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_3 = PyInt_FromLong(NPY_LONG); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 836; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 836; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 836; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_7) { (__pyx_v_f[0]) = 108; goto __pyx_L13; } /* "numpy.pxd":837 * 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_5 = PyInt_FromLong(NPY_ULONG); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 837; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 837; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 837; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_7) { (__pyx_v_f[0]) = 76; goto __pyx_L13; } /* "numpy.pxd":838 * 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_3 = PyInt_FromLong(NPY_LONGLONG); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 838; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 838; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 838; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_7) { (__pyx_v_f[0]) = 113; goto __pyx_L13; } /* "numpy.pxd":839 * 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_5 = PyInt_FromLong(NPY_ULONGLONG); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 839; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 839; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 839; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_7) { (__pyx_v_f[0]) = 81; goto __pyx_L13; } /* "numpy.pxd":840 * 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_3 = PyInt_FromLong(NPY_FLOAT); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 840; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 840; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 840; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_7) { (__pyx_v_f[0]) = 102; goto __pyx_L13; } /* "numpy.pxd":841 * 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_5 = PyInt_FromLong(NPY_DOUBLE); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 841; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 841; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 841; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_7) { (__pyx_v_f[0]) = 100; goto __pyx_L13; } /* "numpy.pxd":842 * 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_3 = PyInt_FromLong(NPY_LONGDOUBLE); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 842; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 842; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 842; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_7) { (__pyx_v_f[0]) = 103; goto __pyx_L13; } /* "numpy.pxd":843 * 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_5 = PyInt_FromLong(NPY_CFLOAT); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 843; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 843; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 843; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_7) { (__pyx_v_f[0]) = 90; (__pyx_v_f[1]) = 102; __pyx_v_f = (__pyx_v_f + 1); goto __pyx_L13; } /* "numpy.pxd":844 * 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_3 = PyInt_FromLong(NPY_CDOUBLE); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 844; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 844; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 844; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_7) { (__pyx_v_f[0]) = 90; (__pyx_v_f[1]) = 100; __pyx_v_f = (__pyx_v_f + 1); goto __pyx_L13; } /* "numpy.pxd":845 * 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_5 = PyInt_FromLong(NPY_CLONGDOUBLE); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 845; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 845; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 845; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_7) { (__pyx_v_f[0]) = 90; (__pyx_v_f[1]) = 103; __pyx_v_f = (__pyx_v_f + 1); goto __pyx_L13; } /* "numpy.pxd":846 * 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_3 = PyInt_FromLong(NPY_OBJECT); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 846; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 846; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 846; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_7) { (__pyx_v_f[0]) = 79; goto __pyx_L13; } /*else*/ { /* "numpy.pxd":848 * elif t == NPY_OBJECT: f[0] = 79 #"O" * else: * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) # <<<<<<<<<<<<<< * f += 1 * else: */ __pyx_t_5 = PyNumber_Remainder(((PyObject *)__pyx_kp_u_49), __pyx_v_t); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 848; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_5)); __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 848; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_t_5)); __Pyx_GIVEREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; __pyx_t_5 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 848; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; __Pyx_Raise(__pyx_t_5, 0, 0, 0); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; {__pyx_filename = __pyx_f[1]; __pyx_lineno = 848; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_L13:; /* "numpy.pxd":849 * 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); goto __pyx_L11; } /*else*/ { /* "numpy.pxd":853 * # Cython ignores struct boundary information ("T{...}"), * # so don't output it * f = _util_dtypestring(child, f, end, offset) # <<<<<<<<<<<<<< * return f * */ __pyx_t_12 = __pyx_f_5numpy__util_dtypestring(__pyx_v_child, __pyx_v_f, __pyx_v_end, __pyx_v_offset); if (unlikely(__pyx_t_12 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 853; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_f = __pyx_t_12; } __pyx_L11:; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "numpy.pxd":854 * # so don't output it * f = _util_dtypestring(child, f, end, offset) * return f # <<<<<<<<<<<<<< * * */ __pyx_r = __pyx_v_f; goto __pyx_L0; __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("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; } /* "numpy.pxd":969 * * * 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); /* "numpy.pxd":971 * 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) { /* "numpy.pxd":972 * cdef PyObject* baseptr * if base is None: * baseptr = NULL # <<<<<<<<<<<<<< * else: * Py_INCREF(base) # important to do this before decref below! */ __pyx_v_baseptr = NULL; goto __pyx_L3; } /*else*/ { /* "numpy.pxd":974 * baseptr = NULL * else: * Py_INCREF(base) # important to do this before decref below! # <<<<<<<<<<<<<< * baseptr = base * Py_XDECREF(arr.base) */ Py_INCREF(__pyx_v_base); /* "numpy.pxd":975 * 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:; /* "numpy.pxd":976 * 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); /* "numpy.pxd":977 * baseptr = base * Py_XDECREF(arr.base) * arr.base = baseptr # <<<<<<<<<<<<<< * * cdef inline object get_array_base(ndarray arr): */ __pyx_v_arr->base = __pyx_v_baseptr; __Pyx_RefNannyFinishContext(); } /* "numpy.pxd":979 * 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); /* "numpy.pxd":980 * * 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) { /* "numpy.pxd":981 * cdef inline object get_array_base(ndarray arr): * if arr.base is NULL: * return None # <<<<<<<<<<<<<< * else: * return arr.base */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(Py_None); __pyx_r = Py_None; goto __pyx_L0; goto __pyx_L3; } /*else*/ { /* "numpy.pxd":983 * return None * else: * return arr.base # <<<<<<<<<<<<<< */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_arr->base)); __pyx_r = ((PyObject *)__pyx_v_arr->base); goto __pyx_L0; } __pyx_L3:; __pyx_r = Py_None; __Pyx_INCREF(Py_None); __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } static struct __pyx_vtabstruct_6pandas_7msgpack_Unpacker __pyx_vtable_6pandas_7msgpack_Unpacker; static PyObject *__pyx_tp_new_6pandas_7msgpack_Unpacker(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { struct __pyx_obj_6pandas_7msgpack_Unpacker *p; PyObject *o; o = (*t->tp_alloc)(t, 0); if (unlikely(!o)) return 0; p = ((struct __pyx_obj_6pandas_7msgpack_Unpacker *)o); p->__pyx_vtab = __pyx_vtabptr_6pandas_7msgpack_Unpacker; p->file_like = Py_None; Py_INCREF(Py_None); p->file_like_read = Py_None; Py_INCREF(Py_None); p->object_hook = Py_None; Py_INCREF(Py_None); p->encoding = Py_None; Py_INCREF(Py_None); p->unicode_errors = Py_None; Py_INCREF(Py_None); if (unlikely(__pyx_pw_6pandas_7msgpack_8Unpacker_1__cinit__(o, __pyx_empty_tuple, NULL) < 0)) { Py_DECREF(o); o = 0; } return o; } static void __pyx_tp_dealloc_6pandas_7msgpack_Unpacker(PyObject *o) { struct __pyx_obj_6pandas_7msgpack_Unpacker *p = (struct __pyx_obj_6pandas_7msgpack_Unpacker *)o; PyObject_GC_UnTrack(o); { PyObject *etype, *eval, *etb; PyErr_Fetch(&etype, &eval, &etb); ++Py_REFCNT(o); __pyx_pw_6pandas_7msgpack_8Unpacker_3__dealloc__(o); if (PyErr_Occurred()) PyErr_WriteUnraisable(o); --Py_REFCNT(o); PyErr_Restore(etype, eval, etb); } Py_CLEAR(p->file_like); Py_CLEAR(p->file_like_read); Py_CLEAR(p->object_hook); Py_CLEAR(p->encoding); Py_CLEAR(p->unicode_errors); (*Py_TYPE(o)->tp_free)(o); } static int __pyx_tp_traverse_6pandas_7msgpack_Unpacker(PyObject *o, visitproc v, void *a) { int e; struct __pyx_obj_6pandas_7msgpack_Unpacker *p = (struct __pyx_obj_6pandas_7msgpack_Unpacker *)o; if (p->file_like) { e = (*v)(p->file_like, a); if (e) return e; } if (p->file_like_read) { e = (*v)(p->file_like_read, a); if (e) return e; } if (p->object_hook) { e = (*v)(p->object_hook, a); if (e) return e; } if (p->encoding) { e = (*v)(p->encoding, a); if (e) return e; } if (p->unicode_errors) { e = (*v)(p->unicode_errors, a); if (e) return e; } return 0; } static int __pyx_tp_clear_6pandas_7msgpack_Unpacker(PyObject *o) { struct __pyx_obj_6pandas_7msgpack_Unpacker *p = (struct __pyx_obj_6pandas_7msgpack_Unpacker *)o; PyObject* tmp; tmp = ((PyObject*)p->file_like); p->file_like = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->file_like_read); p->file_like_read = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->object_hook); p->object_hook = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->encoding); p->encoding = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->unicode_errors); p->unicode_errors = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); return 0; } static PyMethodDef __pyx_methods_6pandas_7msgpack_Unpacker[] = { {__Pyx_NAMESTR("feed"), (PyCFunction)__pyx_pw_6pandas_7msgpack_8Unpacker_7feed, METH_O, __Pyx_DOCSTR(__pyx_doc_6pandas_7msgpack_8Unpacker_6feed)}, {__Pyx_NAMESTR("read_bytes"), (PyCFunction)__pyx_pw_6pandas_7msgpack_8Unpacker_9read_bytes, METH_O, __Pyx_DOCSTR(__pyx_doc_6pandas_7msgpack_8Unpacker_8read_bytes)}, {__Pyx_NAMESTR("unpack"), (PyCFunction)__pyx_pw_6pandas_7msgpack_8Unpacker_11unpack, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_7msgpack_8Unpacker_10unpack)}, {__Pyx_NAMESTR("skip"), (PyCFunction)__pyx_pw_6pandas_7msgpack_8Unpacker_13skip, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_7msgpack_8Unpacker_12skip)}, {__Pyx_NAMESTR("read_array_header"), (PyCFunction)__pyx_pw_6pandas_7msgpack_8Unpacker_15read_array_header, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_7msgpack_8Unpacker_14read_array_header)}, {__Pyx_NAMESTR("read_map_header"), (PyCFunction)__pyx_pw_6pandas_7msgpack_8Unpacker_17read_map_header, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_7msgpack_8Unpacker_16read_map_header)}, {__Pyx_NAMESTR("__next__"), (PyCFunction)__pyx_pw_6pandas_7msgpack_8Unpacker_21__next__, METH_NOARGS|METH_COEXIST, __Pyx_DOCSTR(0)}, {0, 0, 0, 0} }; static PyTypeObject __pyx_type_6pandas_7msgpack_Unpacker = { PyVarObject_HEAD_INIT(0, 0) __Pyx_NAMESTR("pandas.msgpack.Unpacker"), /*tp_name*/ sizeof(struct __pyx_obj_6pandas_7msgpack_Unpacker), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_6pandas_7msgpack_Unpacker, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #else 0, /*reserved*/ #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*/ __Pyx_DOCSTR("Unpacker(file_like=None, Py_ssize_t read_size=0, bool use_list=1, object_hook=None, object_pairs_hook=None, list_hook=None, encoding=None, unicode_errors='strict', int max_buffer_size=0)\n\n Streaming unpacker.\n\n `file_like` is a file-like object having `.read(n)` method.\n When `Unpacker` initialized with `file_like`, unpacker reads serialized data\n from it and `.feed()` method is not usable.\n\n `read_size` is used as `file_like.read(read_size)`.\n (default: min(1024**2, max_buffer_size))\n\n If `use_list` is true (default), msgpack list is deserialized to Python list.\n Otherwise, it is deserialized to Python tuple.\n\n `object_hook` is same to simplejson. If it is not None, it should be callable\n and Unpacker calls it with a dict argument after deserializing a map.\n\n `object_pairs_hook` is same to simplejson. If it is not None, it should be callable\n and Unpacker calls it with a list of key-value pairs after deserializing a map.\n\n `encoding` is encoding used for decoding msgpack bytes. If it is None (default),\n msgpack bytes is deserialized to Python bytes.\n\n `unicode_errors` is used for decoding bytes.\n\n `max_buffer_size` limits size of data waiting unpacked.\n 0 means system's INT_MAX (default).\n Raises `BufferFull` exception when it is insufficient.\n You shoud set this parameter when unpacking data from untrasted source.\n\n example of streaming deserialize from file-like object::\n\n unpacker = Unpacker(file_like)\n for o in unpacker:\n do_something(o)\n\n example of streaming deserialize from socket::\n\n unpacker = Unpacker()\n while 1:\n buf = sock.recv(1024**2)\n if not buf:\n break\n unpacker.feed(buf)\n for o in unpacker:\n do_something(o)\n "), /*tp_doc*/ __pyx_tp_traverse_6pandas_7msgpack_Unpacker, /*tp_traverse*/ __pyx_tp_clear_6pandas_7msgpack_Unpacker, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ __pyx_pw_6pandas_7msgpack_8Unpacker_19__iter__, /*tp_iter*/ __pyx_pw_6pandas_7msgpack_8Unpacker_21__next__, /*tp_iternext*/ __pyx_methods_6pandas_7msgpack_Unpacker, /*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_7msgpack_8Unpacker_5__init__, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_6pandas_7msgpack_Unpacker, /*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*/ #if PY_VERSION_HEX >= 0x02060000 0, /*tp_version_tag*/ #endif #if PY_VERSION_HEX >= 0x030400a1 && defined(Py_TPFLAGS_HAVE_FINALIZE) 0, /*tp_finalize*/ #endif }; static struct __pyx_vtabstruct_6pandas_7msgpack_Packer __pyx_vtable_6pandas_7msgpack_Packer; static PyObject *__pyx_tp_new_6pandas_7msgpack_Packer(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { struct __pyx_obj_6pandas_7msgpack_Packer *p; PyObject *o; o = (*t->tp_alloc)(t, 0); if (unlikely(!o)) return 0; p = ((struct __pyx_obj_6pandas_7msgpack_Packer *)o); p->__pyx_vtab = __pyx_vtabptr_6pandas_7msgpack_Packer; p->_default = Py_None; Py_INCREF(Py_None); p->_bencoding = Py_None; Py_INCREF(Py_None); p->_berrors = Py_None; Py_INCREF(Py_None); p->use_float = ((PyBoolObject *)Py_None); Py_INCREF(Py_None); if (unlikely(__pyx_pw_6pandas_7msgpack_6Packer_1__cinit__(o, __pyx_empty_tuple, NULL) < 0)) { Py_DECREF(o); o = 0; } return o; } static void __pyx_tp_dealloc_6pandas_7msgpack_Packer(PyObject *o) { struct __pyx_obj_6pandas_7msgpack_Packer *p = (struct __pyx_obj_6pandas_7msgpack_Packer *)o; PyObject_GC_UnTrack(o); { PyObject *etype, *eval, *etb; PyErr_Fetch(&etype, &eval, &etb); ++Py_REFCNT(o); __pyx_pw_6pandas_7msgpack_6Packer_5__dealloc__(o); if (PyErr_Occurred()) PyErr_WriteUnraisable(o); --Py_REFCNT(o); PyErr_Restore(etype, eval, etb); } Py_CLEAR(p->_default); Py_CLEAR(p->_bencoding); Py_CLEAR(p->_berrors); Py_CLEAR(p->use_float); (*Py_TYPE(o)->tp_free)(o); } static int __pyx_tp_traverse_6pandas_7msgpack_Packer(PyObject *o, visitproc v, void *a) { int e; struct __pyx_obj_6pandas_7msgpack_Packer *p = (struct __pyx_obj_6pandas_7msgpack_Packer *)o; if (p->_default) { e = (*v)(p->_default, a); if (e) return e; } if (p->_bencoding) { e = (*v)(p->_bencoding, a); if (e) return e; } if (p->_berrors) { e = (*v)(p->_berrors, a); if (e) return e; } if (p->use_float) { e = (*v)(((PyObject*)p->use_float), a); if (e) return e; } return 0; } static int __pyx_tp_clear_6pandas_7msgpack_Packer(PyObject *o) { struct __pyx_obj_6pandas_7msgpack_Packer *p = (struct __pyx_obj_6pandas_7msgpack_Packer *)o; PyObject* tmp; tmp = ((PyObject*)p->_default); p->_default = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->_bencoding); p->_bencoding = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->_berrors); p->_berrors = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->use_float); p->use_float = ((PyBoolObject *)Py_None); Py_INCREF(Py_None); Py_XDECREF(tmp); return 0; } static PyMethodDef __pyx_methods_6pandas_7msgpack_Packer[] = { {__Pyx_NAMESTR("pack"), (PyCFunction)__pyx_pw_6pandas_7msgpack_6Packer_7pack, METH_O, __Pyx_DOCSTR(__pyx_doc_6pandas_7msgpack_6Packer_6pack)}, {__Pyx_NAMESTR("pack_array_header"), (PyCFunction)__pyx_pw_6pandas_7msgpack_6Packer_9pack_array_header, METH_O, __Pyx_DOCSTR(__pyx_doc_6pandas_7msgpack_6Packer_8pack_array_header)}, {__Pyx_NAMESTR("pack_map_header"), (PyCFunction)__pyx_pw_6pandas_7msgpack_6Packer_11pack_map_header, METH_O, __Pyx_DOCSTR(__pyx_doc_6pandas_7msgpack_6Packer_10pack_map_header)}, {__Pyx_NAMESTR("pack_map_pairs"), (PyCFunction)__pyx_pw_6pandas_7msgpack_6Packer_13pack_map_pairs, METH_O, __Pyx_DOCSTR(__pyx_doc_6pandas_7msgpack_6Packer_12pack_map_pairs)}, {__Pyx_NAMESTR("reset"), (PyCFunction)__pyx_pw_6pandas_7msgpack_6Packer_15reset, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_6pandas_7msgpack_6Packer_14reset)}, {__Pyx_NAMESTR("bytes"), (PyCFunction)__pyx_pw_6pandas_7msgpack_6Packer_17bytes, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_6pandas_7msgpack_6Packer_16bytes)}, {0, 0, 0, 0} }; static PyTypeObject __pyx_type_6pandas_7msgpack_Packer = { PyVarObject_HEAD_INIT(0, 0) __Pyx_NAMESTR("pandas.msgpack.Packer"), /*tp_name*/ sizeof(struct __pyx_obj_6pandas_7msgpack_Packer), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_6pandas_7msgpack_Packer, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #else 0, /*reserved*/ #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*/ __Pyx_DOCSTR("Packer(default=None, encoding='utf-8', unicode_errors='strict', use_single_float=False, bool autoreset=1)\nMessagePack Packer\n\n usage:\n\n packer = Packer()\n astream.write(packer.pack(a))\n astream.write(packer.pack(b))\n\n Packer's constructor has some keyword arguments:\n\n * *defaut* - Convert user type to builtin type that Packer supports.\n See also simplejson's document.\n * *encoding* - Convert unicode to bytes with this encoding. (default: 'utf-8')\n * *unicode_errors* - Error handler for encoding unicode. (default: 'strict')\n * *use_single_float* - Use single precision float type for float. (default: False)\n * *autoreset* - Reset buffer after each pack and return it's content as `bytes`. (default: True).\n If set this to false, use `bytes()` to get content and `.reset()` to clear buffer.\n "), /*tp_doc*/ __pyx_tp_traverse_6pandas_7msgpack_Packer, /*tp_traverse*/ __pyx_tp_clear_6pandas_7msgpack_Packer, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_6pandas_7msgpack_Packer, /*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_7msgpack_6Packer_3__init__, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_6pandas_7msgpack_Packer, /*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*/ #if PY_VERSION_HEX >= 0x02060000 0, /*tp_version_tag*/ #endif #if PY_VERSION_HEX >= 0x030400a1 && defined(Py_TPFLAGS_HAVE_FINALIZE) 0, /*tp_finalize*/ #endif }; static PyMethodDef __pyx_methods[] = { {0, 0, 0, 0} }; #if PY_MAJOR_VERSION >= 3 static struct PyModuleDef __pyx_moduledef = { #if PY_VERSION_HEX < 0x03020000 { PyObject_HEAD_INIT(NULL) NULL, 0, NULL }, #else PyModuleDef_HEAD_INIT, #endif __Pyx_NAMESTR("msgpack"), 0, /* m_doc */ -1, /* m_size */ __pyx_methods /* m_methods */, NULL, /* m_reload */ NULL, /* m_traverse */ NULL, /* m_clear */ NULL /* m_free */ }; #endif static __Pyx_StringTabEntry __pyx_string_tab[] = { {&__pyx_kp_s_1, __pyx_k_1, sizeof(__pyx_k_1), 0, 0, 1, 0}, {&__pyx_kp_s_11, __pyx_k_11, sizeof(__pyx_k_11), 0, 0, 1, 0}, {&__pyx_kp_s_13, __pyx_k_13, sizeof(__pyx_k_13), 0, 0, 1, 0}, {&__pyx_kp_s_15, __pyx_k_15, sizeof(__pyx_k_15), 0, 0, 1, 0}, {&__pyx_kp_s_16, __pyx_k_16, sizeof(__pyx_k_16), 0, 0, 1, 0}, {&__pyx_kp_s_18, __pyx_k_18, sizeof(__pyx_k_18), 0, 0, 1, 0}, {&__pyx_kp_s_2, __pyx_k_2, sizeof(__pyx_k_2), 0, 0, 1, 0}, {&__pyx_kp_s_20, __pyx_k_20, sizeof(__pyx_k_20), 0, 0, 1, 0}, {&__pyx_kp_s_22, __pyx_k_22, sizeof(__pyx_k_22), 0, 0, 1, 0}, {&__pyx_kp_s_24, __pyx_k_24, sizeof(__pyx_k_24), 0, 0, 1, 0}, {&__pyx_kp_s_28, __pyx_k_28, sizeof(__pyx_k_28), 0, 0, 1, 0}, {&__pyx_kp_s_29, __pyx_k_29, sizeof(__pyx_k_29), 0, 0, 1, 0}, {&__pyx_kp_s_31, __pyx_k_31, sizeof(__pyx_k_31), 0, 0, 1, 0}, {&__pyx_kp_s_36, __pyx_k_36, sizeof(__pyx_k_36), 0, 0, 1, 0}, {&__pyx_kp_s_38, __pyx_k_38, sizeof(__pyx_k_38), 0, 0, 1, 0}, {&__pyx_kp_s_4, __pyx_k_4, sizeof(__pyx_k_4), 0, 0, 1, 0}, {&__pyx_kp_s_40, __pyx_k_40, sizeof(__pyx_k_40), 0, 0, 1, 0}, {&__pyx_kp_u_43, __pyx_k_43, sizeof(__pyx_k_43), 0, 1, 0, 0}, {&__pyx_kp_u_45, __pyx_k_45, sizeof(__pyx_k_45), 0, 1, 0, 0}, {&__pyx_kp_u_47, __pyx_k_47, sizeof(__pyx_k_47), 0, 1, 0, 0}, {&__pyx_kp_u_49, __pyx_k_49, sizeof(__pyx_k_49), 0, 1, 0, 0}, {&__pyx_kp_u_50, __pyx_k_50, sizeof(__pyx_k_50), 0, 1, 0, 0}, {&__pyx_kp_u_53, __pyx_k_53, sizeof(__pyx_k_53), 0, 1, 0, 0}, {&__pyx_n_s_55, __pyx_k_55, sizeof(__pyx_k_55), 0, 0, 1, 1}, {&__pyx_kp_s_58, __pyx_k_58, sizeof(__pyx_k_58), 0, 0, 1, 0}, {&__pyx_n_s_59, __pyx_k_59, sizeof(__pyx_k_59), 0, 0, 1, 1}, {&__pyx_kp_s_6, __pyx_k_6, sizeof(__pyx_k_6), 0, 0, 1, 0}, {&__pyx_n_s_62, __pyx_k_62, sizeof(__pyx_k_62), 0, 0, 1, 1}, {&__pyx_n_s__BufferFull, __pyx_k__BufferFull, sizeof(__pyx_k__BufferFull), 0, 0, 1, 1}, {&__pyx_n_s__ExtraData, __pyx_k__ExtraData, sizeof(__pyx_k__ExtraData), 0, 0, 1, 1}, {&__pyx_n_s__IOError, __pyx_k__IOError, sizeof(__pyx_k__IOError), 0, 0, 1, 1}, {&__pyx_n_s__MemoryError, __pyx_k__MemoryError, sizeof(__pyx_k__MemoryError), 0, 0, 1, 1}, {&__pyx_n_s__OutOfData, __pyx_k__OutOfData, sizeof(__pyx_k__OutOfData), 0, 0, 1, 1}, {&__pyx_n_s__PackException, __pyx_k__PackException, sizeof(__pyx_k__PackException), 0, 0, 1, 1}, {&__pyx_n_s__PackValueError, __pyx_k__PackValueError, sizeof(__pyx_k__PackValueError), 0, 0, 1, 1}, {&__pyx_n_s__RuntimeError, __pyx_k__RuntimeError, sizeof(__pyx_k__RuntimeError), 0, 0, 1, 1}, {&__pyx_n_s__StopIteration, __pyx_k__StopIteration, sizeof(__pyx_k__StopIteration), 0, 0, 1, 1}, {&__pyx_n_s__TypeError, __pyx_k__TypeError, sizeof(__pyx_k__TypeError), 0, 0, 1, 1}, {&__pyx_n_s__UnpackException, __pyx_k__UnpackException, sizeof(__pyx_k__UnpackException), 0, 0, 1, 1}, {&__pyx_n_s__UnpackValueError, __pyx_k__UnpackValueError, sizeof(__pyx_k__UnpackValueError), 0, 0, 1, 1}, {&__pyx_n_s__ValueError, __pyx_k__ValueError, sizeof(__pyx_k__ValueError), 0, 0, 1, 1}, {&__pyx_n_s____class__, __pyx_k____class__, sizeof(__pyx_k____class__), 0, 0, 1, 1}, {&__pyx_n_s____import__, __pyx_k____import__, sizeof(__pyx_k____import__), 0, 0, 1, 1}, {&__pyx_n_s____init__, __pyx_k____init__, sizeof(__pyx_k____init__), 0, 0, 1, 1}, {&__pyx_n_s____main__, __pyx_k____main__, sizeof(__pyx_k____main__), 0, 0, 1, 1}, {&__pyx_n_s____metaclass__, __pyx_k____metaclass__, sizeof(__pyx_k____metaclass__), 0, 0, 1, 1}, {&__pyx_n_s____module__, __pyx_k____module__, sizeof(__pyx_k____module__), 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____qualname__, __pyx_k____qualname__, sizeof(__pyx_k____qualname__), 0, 0, 1, 1}, {&__pyx_n_s____str__, __pyx_k____str__, sizeof(__pyx_k____str__), 0, 0, 1, 1}, {&__pyx_n_s____test__, __pyx_k____test__, sizeof(__pyx_k____test__), 0, 0, 1, 1}, {&__pyx_n_s__ascii, __pyx_k__ascii, sizeof(__pyx_k__ascii), 0, 0, 1, 1}, {&__pyx_n_s__autoreset, __pyx_k__autoreset, sizeof(__pyx_k__autoreset), 0, 0, 1, 1}, {&__pyx_n_s__buf, __pyx_k__buf, sizeof(__pyx_k__buf), 0, 0, 1, 1}, {&__pyx_n_s__buf_len, __pyx_k__buf_len, sizeof(__pyx_k__buf_len), 0, 0, 1, 1}, {&__pyx_n_s__cenc, __pyx_k__cenc, sizeof(__pyx_k__cenc), 0, 0, 1, 1}, {&__pyx_n_s__cerr, __pyx_k__cerr, sizeof(__pyx_k__cerr), 0, 0, 1, 1}, {&__pyx_n_s__ctx, __pyx_k__ctx, sizeof(__pyx_k__ctx), 0, 0, 1, 1}, {&__pyx_n_s__default, __pyx_k__default, sizeof(__pyx_k__default), 0, 0, 1, 1}, {&__pyx_n_s__encode, __pyx_k__encode, sizeof(__pyx_k__encode), 0, 0, 1, 1}, {&__pyx_n_s__encoding, __pyx_k__encoding, sizeof(__pyx_k__encoding), 0, 0, 1, 1}, {&__pyx_n_s__extra, __pyx_k__extra, sizeof(__pyx_k__extra), 0, 0, 1, 1}, {&__pyx_n_s__file_like, __pyx_k__file_like, sizeof(__pyx_k__file_like), 0, 0, 1, 1}, {&__pyx_n_s__items, __pyx_k__items, sizeof(__pyx_k__items), 0, 0, 1, 1}, {&__pyx_n_s__iteritems, __pyx_k__iteritems, sizeof(__pyx_k__iteritems), 0, 0, 1, 1}, {&__pyx_n_s__list_hook, __pyx_k__list_hook, sizeof(__pyx_k__list_hook), 0, 0, 1, 1}, {&__pyx_n_s__max_buffer_size, __pyx_k__max_buffer_size, sizeof(__pyx_k__max_buffer_size), 0, 0, 1, 1}, {&__pyx_n_s__np, __pyx_k__np, sizeof(__pyx_k__np), 0, 0, 1, 1}, {&__pyx_n_s__numpy, __pyx_k__numpy, sizeof(__pyx_k__numpy), 0, 0, 1, 1}, {&__pyx_n_s__o, __pyx_k__o, sizeof(__pyx_k__o), 0, 0, 1, 1}, {&__pyx_n_s__obj, __pyx_k__obj, sizeof(__pyx_k__obj), 0, 0, 1, 1}, {&__pyx_n_s__object_hook, __pyx_k__object_hook, sizeof(__pyx_k__object_hook), 0, 0, 1, 1}, {&__pyx_n_s__object_pairs_hook, __pyx_k__object_pairs_hook, sizeof(__pyx_k__object_pairs_hook), 0, 0, 1, 1}, {&__pyx_n_s__off, __pyx_k__off, sizeof(__pyx_k__off), 0, 0, 1, 1}, {&__pyx_n_s__pack, __pyx_k__pack, sizeof(__pyx_k__pack), 0, 0, 1, 1}, {&__pyx_n_s__packb, __pyx_k__packb, sizeof(__pyx_k__packb), 0, 0, 1, 1}, {&__pyx_n_s__packed, __pyx_k__packed, sizeof(__pyx_k__packed), 0, 0, 1, 1}, {&__pyx_n_s__packer, __pyx_k__packer, sizeof(__pyx_k__packer), 0, 0, 1, 1}, {&__pyx_n_s__range, __pyx_k__range, sizeof(__pyx_k__range), 0, 0, 1, 1}, {&__pyx_n_s__read, __pyx_k__read, sizeof(__pyx_k__read), 0, 0, 1, 1}, {&__pyx_n_s__read_size, __pyx_k__read_size, sizeof(__pyx_k__read_size), 0, 0, 1, 1}, {&__pyx_n_s__ret, __pyx_k__ret, sizeof(__pyx_k__ret), 0, 0, 1, 1}, {&__pyx_n_s__self, __pyx_k__self, sizeof(__pyx_k__self), 0, 0, 1, 1}, {&__pyx_n_s__stream, __pyx_k__stream, sizeof(__pyx_k__stream), 0, 0, 1, 1}, {&__pyx_n_s__strict, __pyx_k__strict, sizeof(__pyx_k__strict), 0, 0, 1, 1}, {&__pyx_n_s__unicode_errors, __pyx_k__unicode_errors, sizeof(__pyx_k__unicode_errors), 0, 0, 1, 1}, {&__pyx_n_s__unpack, __pyx_k__unpack, sizeof(__pyx_k__unpack), 0, 0, 1, 1}, {&__pyx_n_s__unpackb, __pyx_k__unpackb, sizeof(__pyx_k__unpackb), 0, 0, 1, 1}, {&__pyx_n_s__unpacked, __pyx_k__unpacked, sizeof(__pyx_k__unpacked), 0, 0, 1, 1}, {&__pyx_n_s__use_list, __pyx_k__use_list, sizeof(__pyx_k__use_list), 0, 0, 1, 1}, {&__pyx_n_s__use_single_float, __pyx_k__use_single_float, sizeof(__pyx_k__use_single_float), 0, 0, 1, 1}, {&__pyx_n_s__write, __pyx_k__write, sizeof(__pyx_k__write), 0, 0, 1, 1}, {&__pyx_n_s__write_bytes, __pyx_k__write_bytes, sizeof(__pyx_k__write_bytes), 0, 0, 1, 1}, {0, 0, 0, 0, 0, 0, 0} }; static int __Pyx_InitCachedBuiltins(void) { __pyx_builtin_IOError = __Pyx_GetBuiltinName(__pyx_n_s__IOError); if (!__pyx_builtin_IOError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 20; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_builtin_ValueError = __Pyx_GetBuiltinName(__pyx_n_s__ValueError); if (!__pyx_builtin_ValueError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 32; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_builtin_MemoryError = __Pyx_GetBuiltinName(__pyx_n_s__MemoryError); if (!__pyx_builtin_MemoryError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 131; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_builtin_TypeError = __Pyx_GetBuiltinName(__pyx_n_s__TypeError); if (!__pyx_builtin_TypeError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 141; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_builtin_StopIteration = __Pyx_GetBuiltinName(__pyx_n_s__StopIteration); if (!__pyx_builtin_StopIteration) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 604; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_n_s__range); if (!__pyx_builtin_range) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 230; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_builtin_RuntimeError = __Pyx_GetBuiltinName(__pyx_n_s__RuntimeError); if (!__pyx_builtin_RuntimeError) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 803; __pyx_clineno = __LINE__; goto __pyx_L1_error;} return 0; __pyx_L1_error:; return -1; } static int __Pyx_InitCachedConstants(void) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0); /* "pandas/msgpack.pyx":131 * self.pk.buf = malloc(buf_size); * if self.pk.buf == NULL: * raise MemoryError("Unable to allocate internal buffer.") # <<<<<<<<<<<<<< * self.pk.buf_size = buf_size * self.pk.length = 0 */ __pyx_k_tuple_3 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_2)); if (unlikely(!__pyx_k_tuple_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 131; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_3); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_3)); /* "pandas/msgpack.pyx":141 * if default is not None: * if not PyCallable_Check(default): * raise TypeError("default must be a callable.") # <<<<<<<<<<<<<< * self._default = default * if encoding is None: */ __pyx_k_tuple_7 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_6)); if (unlikely(!__pyx_k_tuple_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 141; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_7); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_7)); /* "pandas/msgpack.pyx":148 * else: * if isinstance(encoding, unicode): * self._bencoding = encoding.encode('ascii') # <<<<<<<<<<<<<< * else: * self._bencoding = encoding */ __pyx_k_tuple_8 = PyTuple_Pack(1, ((PyObject *)__pyx_n_s__ascii)); if (unlikely(!__pyx_k_tuple_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 148; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_8); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_8)); /* "pandas/msgpack.pyx":153 * self.encoding = PyBytes_AsString(self._bencoding) * if isinstance(unicode_errors, unicode): * self._berrors = unicode_errors.encode('ascii') # <<<<<<<<<<<<<< * else: * self._berrors = unicode_errors */ __pyx_k_tuple_9 = PyTuple_Pack(1, ((PyObject *)__pyx_n_s__ascii)); if (unlikely(!__pyx_k_tuple_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 153; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_9); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_9)); /* "pandas/msgpack.pyx":177 * * if nest_limit < 0: * raise PackValueError("recursion limit exceeded.") # <<<<<<<<<<<<<< * * if o is None: */ __pyx_k_tuple_12 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_11)); if (unlikely(!__pyx_k_tuple_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 177; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_12); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_12)); /* "pandas/msgpack.pyx":210 * elif PyUnicode_Check(o): * if not self.encoding: * raise TypeError("Can't encode unicode string: no encoding is specified") # <<<<<<<<<<<<<< * o = PyUnicode_AsEncodedString(o, self.encoding, self.unicode_errors) * rawval = o */ __pyx_k_tuple_14 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_13)); if (unlikely(!__pyx_k_tuple_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 210; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_14); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_14)); /* "pandas/msgpack.pyx":342 * * if object_hook is not None and object_pairs_hook is not None: * raise ValueError("object_pairs_hook and object_hook are mutually exclusive.") # <<<<<<<<<<<<<< * * if object_hook is not None: */ __pyx_k_tuple_19 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_18)); if (unlikely(!__pyx_k_tuple_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 342; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_19); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_19)); /* "pandas/msgpack.pyx":346 * if object_hook is not None: * if not PyCallable_Check(object_hook): * raise TypeError("object_hook must be a callable.") # <<<<<<<<<<<<<< * ctx.user.object_hook = object_hook * */ __pyx_k_tuple_21 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_20)); if (unlikely(!__pyx_k_tuple_21)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 346; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_21); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_21)); /* "pandas/msgpack.pyx":353 * else: * if not PyCallable_Check(object_pairs_hook): * raise TypeError("object_pairs_hook must be a callable.") # <<<<<<<<<<<<<< * ctx.user.object_hook = object_pairs_hook * ctx.user.has_pairs_hook = True */ __pyx_k_tuple_23 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_22)); if (unlikely(!__pyx_k_tuple_23)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 353; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_23); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_23)); /* "pandas/msgpack.pyx":359 * if list_hook is not None: * if not PyCallable_Check(list_hook): * raise TypeError("list_hook must be a callable.") # <<<<<<<<<<<<<< * ctx.user.list_hook = list_hook * */ __pyx_k_tuple_25 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_24)); if (unlikely(!__pyx_k_tuple_25)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 359; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_25); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_25)); /* "pandas/msgpack.pyx":386 * if encoding is not None: * if isinstance(encoding, unicode): * encoding = encoding.encode('ascii') # <<<<<<<<<<<<<< * cenc = PyBytes_AsString(encoding) * */ __pyx_k_tuple_26 = PyTuple_Pack(1, ((PyObject *)__pyx_n_s__ascii)); if (unlikely(!__pyx_k_tuple_26)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 386; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_26); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_26)); /* "pandas/msgpack.pyx":391 * if unicode_errors is not None: * if isinstance(unicode_errors, unicode): * unicode_errors = unicode_errors.encode('ascii') # <<<<<<<<<<<<<< * cerr = PyBytes_AsString(unicode_errors) * */ __pyx_k_tuple_27 = PyTuple_Pack(1, ((PyObject *)__pyx_n_s__ascii)); if (unlikely(!__pyx_k_tuple_27)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 391; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_27); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_27)); /* "pandas/msgpack.pyx":495 * self.file_like_read = file_like.read * if not PyCallable_Check(self.file_like_read): * raise ValueError("`file_like.read` must be a callable.") # <<<<<<<<<<<<<< * if not max_buffer_size: * max_buffer_size = INT_MAX */ __pyx_k_tuple_30 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_29)); if (unlikely(!__pyx_k_tuple_30)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 495; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_30); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_30)); /* "pandas/msgpack.pyx":499 * max_buffer_size = INT_MAX * if read_size > max_buffer_size: * raise ValueError("read_size should be less or equal to max_buffer_size") # <<<<<<<<<<<<<< * if not read_size: * read_size = min(max_buffer_size, 1024**2) */ __pyx_k_tuple_32 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_31)); if (unlikely(!__pyx_k_tuple_32)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 499; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_32); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_32)); /* "pandas/msgpack.pyx":506 * self.buf = malloc(read_size) * if self.buf == NULL: * raise MemoryError("Unable to allocate internal buffer.") # <<<<<<<<<<<<<< * self.buf_size = read_size * self.buf_head = 0 */ __pyx_k_tuple_33 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_2)); if (unlikely(!__pyx_k_tuple_33)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 506; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_33); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_33)); /* "pandas/msgpack.pyx":513 * if encoding is not None: * if isinstance(encoding, unicode): * encoding = encoding.encode('ascii') # <<<<<<<<<<<<<< * self.encoding = encoding * cenc = PyBytes_AsString(encoding) */ __pyx_k_tuple_34 = PyTuple_Pack(1, ((PyObject *)__pyx_n_s__ascii)); if (unlikely(!__pyx_k_tuple_34)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 513; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_34); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_34)); /* "pandas/msgpack.pyx":519 * if unicode_errors is not None: * if isinstance(unicode_errors, unicode): * unicode_errors = unicode_errors.encode('ascii') # <<<<<<<<<<<<<< * self.unicode_errors = unicode_errors * cerr = PyBytes_AsString(unicode_errors) */ __pyx_k_tuple_35 = PyTuple_Pack(1, ((PyObject *)__pyx_n_s__ascii)); if (unlikely(!__pyx_k_tuple_35)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 519; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_35); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_35)); /* "pandas/msgpack.pyx":530 * cdef Py_ssize_t buf_len * if self.file_like is not None: * raise TypeError( # <<<<<<<<<<<<<< * "unpacker.feed() is not be able to use with `file_like`.") * PyObject_AsReadBuffer(next_bytes, &buf, &buf_len) */ __pyx_k_tuple_37 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_36)); if (unlikely(!__pyx_k_tuple_37)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 530; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_37); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_37)); /* "pandas/msgpack.pyx":560 * # self.buf still holds old buffer and will be freed during * # obj destruction * raise MemoryError("Unable to enlarge internal buffer.") # <<<<<<<<<<<<<< * memcpy(new_buf, buf + head, tail - head) * free(buf) */ __pyx_k_tuple_39 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_38)); if (unlikely(!__pyx_k_tuple_39)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 560; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_39); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_39)); /* "pandas/msgpack.pyx":604 * continue * if iter: * raise StopIteration("No more data to unpack.") # <<<<<<<<<<<<<< * else: * raise OutOfData("No more data to unpack.") */ __pyx_k_tuple_41 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_40)); if (unlikely(!__pyx_k_tuple_41)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 604; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_41); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_41)); /* "pandas/msgpack.pyx":606 * raise StopIteration("No more data to unpack.") * else: * raise OutOfData("No more data to unpack.") # <<<<<<<<<<<<<< * else: * raise ValueError("Unpack failed: error = %d" % (ret,)) */ __pyx_k_tuple_42 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_40)); if (unlikely(!__pyx_k_tuple_42)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 606; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_42); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_42)); /* "numpy.pxd":217 * 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_k_tuple_44 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_u_43)); if (unlikely(!__pyx_k_tuple_44)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 217; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_44); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_44)); /* "numpy.pxd":221 * 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_k_tuple_46 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_u_45)); if (unlikely(!__pyx_k_tuple_46)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 221; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_46); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_46)); /* "numpy.pxd":259 * if ((descr.byteorder == '>' and little_endian) or * (descr.byteorder == '<' 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_k_tuple_48 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_u_47)); if (unlikely(!__pyx_k_tuple_48)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 259; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_48); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_48)); /* "numpy.pxd":803 * * if (end - f) - (new_offset - offset[0]) < 15: * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") # <<<<<<<<<<<<<< * * if ((child.byteorder == '>' and little_endian) or */ __pyx_k_tuple_51 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_u_50)); if (unlikely(!__pyx_k_tuple_51)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 803; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_51); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_51)); /* "numpy.pxd":807 * if ((child.byteorder == '>' and little_endian) or * (child.byteorder == '<' 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_k_tuple_52 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_u_47)); if (unlikely(!__pyx_k_tuple_52)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 807; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_52); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_52)); /* "numpy.pxd":827 * 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_k_tuple_54 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_u_53)); if (unlikely(!__pyx_k_tuple_54)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 827; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_54); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_54)); /* "pandas/msgpack.pyx":37 * * class ExtraData(ValueError): * def __init__(self, unpacked, extra): # <<<<<<<<<<<<<< * self.unpacked = unpacked * self.extra = extra */ __pyx_k_tuple_56 = PyTuple_Pack(3, ((PyObject *)__pyx_n_s__self), ((PyObject *)__pyx_n_s__unpacked), ((PyObject *)__pyx_n_s__extra)); if (unlikely(!__pyx_k_tuple_56)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 37; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_56); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_56)); __pyx_k_codeobj_57 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_56, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_58, __pyx_n_s____init__, 37, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_57)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 37; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/msgpack.pyx":41 * self.extra = extra * * def __str__(self): # <<<<<<<<<<<<<< * return "unpack(b) recieved extra data." * */ __pyx_k_tuple_60 = PyTuple_Pack(1, ((PyObject *)__pyx_n_s__self)); if (unlikely(!__pyx_k_tuple_60)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 41; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_60); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_60)); __pyx_k_codeobj_61 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_60, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_58, __pyx_n_s____str__, 41, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_61)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 41; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/msgpack.pyx":320 * return ret * * def pack(object o, object stream, default=None, encoding='utf-8', unicode_errors='strict'): # <<<<<<<<<<<<<< * """ * pack an object `o` and write it to stream).""" */ __pyx_k_tuple_63 = PyTuple_Pack(6, ((PyObject *)__pyx_n_s__o), ((PyObject *)__pyx_n_s__stream), ((PyObject *)__pyx_n_s__default), ((PyObject *)__pyx_n_s__encoding), ((PyObject *)__pyx_n_s__unicode_errors), ((PyObject *)__pyx_n_s__packer)); if (unlikely(!__pyx_k_tuple_63)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 320; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_63); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_63)); __pyx_k_codeobj_64 = (PyObject*)__Pyx_PyCode_New(5, 0, 6, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_63, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_58, __pyx_n_s__pack, 320, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_64)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 320; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/msgpack.pyx":326 * stream.write(packer.pack(o)) * * def packb(object o, default=None, encoding='utf-8', unicode_errors='strict', use_single_float=False): # <<<<<<<<<<<<<< * """ * pack o and return packed bytes.""" */ __pyx_k_tuple_65 = PyTuple_Pack(6, ((PyObject *)__pyx_n_s__o), ((PyObject *)__pyx_n_s__default), ((PyObject *)__pyx_n_s__encoding), ((PyObject *)__pyx_n_s__unicode_errors), ((PyObject *)__pyx_n_s__use_single_float), ((PyObject *)__pyx_n_s__packer)); if (unlikely(!__pyx_k_tuple_65)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 326; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_65); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_65)); __pyx_k_codeobj_66 = (PyObject*)__Pyx_PyCode_New(5, 0, 6, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_65, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_58, __pyx_n_s__packb, 326, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_66)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 326; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/msgpack.pyx":365 * ctx.user.unicode_errors = unicode_errors * * def unpackb(object packed, object object_hook=None, object list_hook=None, # <<<<<<<<<<<<<< * bint use_list=1, encoding=None, unicode_errors="strict", * object_pairs_hook=None, */ __pyx_k_tuple_67 = PyTuple_Pack(15, ((PyObject *)__pyx_n_s__packed), ((PyObject *)__pyx_n_s__object_hook), ((PyObject *)__pyx_n_s__list_hook), ((PyObject *)__pyx_n_s__use_list), ((PyObject *)__pyx_n_s__encoding), ((PyObject *)__pyx_n_s__unicode_errors), ((PyObject *)__pyx_n_s__object_pairs_hook), ((PyObject *)__pyx_n_s__ctx), ((PyObject *)__pyx_n_s__off), ((PyObject *)__pyx_n_s__ret), ((PyObject *)__pyx_n_s__buf), ((PyObject *)__pyx_n_s__buf_len), ((PyObject *)__pyx_n_s__cenc), ((PyObject *)__pyx_n_s__cerr), ((PyObject *)__pyx_n_s__obj)); if (unlikely(!__pyx_k_tuple_67)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 365; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_67); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_67)); __pyx_k_codeobj_68 = (PyObject*)__Pyx_PyCode_New(7, 0, 15, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_67, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_58, __pyx_n_s__unpackb, 365, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_68)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 365; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/msgpack.pyx":407 * * * def unpack(object stream, object object_hook=None, object list_hook=None, # <<<<<<<<<<<<<< * bint use_list=1, encoding=None, unicode_errors="strict", * object_pairs_hook=None, */ __pyx_k_tuple_69 = PyTuple_Pack(7, ((PyObject *)__pyx_n_s__stream), ((PyObject *)__pyx_n_s__object_hook), ((PyObject *)__pyx_n_s__list_hook), ((PyObject *)__pyx_n_s__use_list), ((PyObject *)__pyx_n_s__encoding), ((PyObject *)__pyx_n_s__unicode_errors), ((PyObject *)__pyx_n_s__object_pairs_hook)); if (unlikely(!__pyx_k_tuple_69)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 407; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_69); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_69)); __pyx_k_codeobj_70 = (PyObject*)__Pyx_PyCode_New(7, 0, 7, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_69, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_58, __pyx_n_s__unpack, 407, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_70)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 407; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __pyx_int_0 = PyInt_FromLong(0); if (unlikely(!__pyx_int_0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __pyx_int_15 = PyInt_FromLong(15); if (unlikely(!__pyx_int_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; return 0; __pyx_L1_error:; return -1; } #if PY_MAJOR_VERSION < 3 PyMODINIT_FUNC initmsgpack(void); /*proto*/ PyMODINIT_FUNC initmsgpack(void) #else PyMODINIT_FUNC PyInit_msgpack(void); /*proto*/ PyMODINIT_FUNC PyInit_msgpack(void) #endif { PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannyDeclarations #if CYTHON_REFNANNY __Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny"); if (!__Pyx_RefNanny) { PyErr_Clear(); __Pyx_RefNanny = __Pyx_RefNannyImportAPI("Cython.Runtime.refnanny"); if (!__Pyx_RefNanny) Py_FatalError("failed to import 'refnanny' module"); } #endif __Pyx_RefNannySetupContext("PyMODINIT_FUNC PyInit_msgpack(void)", 0); if ( __Pyx_check_binary_version() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_empty_tuple)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_bytes)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #ifdef __Pyx_CyFunction_USED if (__Pyx_CyFunction_init() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif #ifdef __Pyx_FusedFunction_USED if (__pyx_FusedFunction_init() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif #ifdef __Pyx_Generator_USED if (__pyx_Generator_init() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif /*--- Library function declarations ---*/ /*--- Threads initialization code ---*/ #if defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS #ifdef WITH_THREAD /* Python build with threading support? */ PyEval_InitThreads(); #endif #endif /*--- Module creation code ---*/ #if PY_MAJOR_VERSION < 3 __pyx_m = Py_InitModule4(__Pyx_NAMESTR("msgpack"), __pyx_methods, 0, 0, PYTHON_API_VERSION); Py_XINCREF(__pyx_m); #else __pyx_m = PyModule_Create(&__pyx_moduledef); #endif if (unlikely(!__pyx_m)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_d)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} Py_INCREF(__pyx_d); #if PY_MAJOR_VERSION >= 3 { PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (!PyDict_GetItemString(modules, "pandas.msgpack")) { if (unlikely(PyDict_SetItemString(modules, "pandas.msgpack", __pyx_m) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } } #endif __pyx_b = PyImport_AddModule(__Pyx_NAMESTR(__Pyx_BUILTIN_MODULE_NAME)); if (unlikely(!__pyx_b)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #if CYTHON_COMPILING_IN_PYPY Py_INCREF(__pyx_b); #endif if (__Pyx_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; /*--- Initialize various global constants etc. ---*/ if (unlikely(__Pyx_InitGlobals() < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif if (__pyx_module_is_main_pandas__msgpack) { if (__Pyx_SetAttrString(__pyx_m, "__name__", __pyx_n_s____main__) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; } /*--- Builtin init code ---*/ if (unlikely(__Pyx_InitCachedBuiltins() < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /*--- Constants init code ---*/ if (unlikely(__Pyx_InitCachedConstants() < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /*--- Global init code ---*/ /*--- Variable export code ---*/ /*--- Function export code ---*/ /*--- Type init code ---*/ __pyx_vtabptr_6pandas_7msgpack_Unpacker = &__pyx_vtable_6pandas_7msgpack_Unpacker; __pyx_vtable_6pandas_7msgpack_Unpacker.append_buffer = (PyObject *(*)(struct __pyx_obj_6pandas_7msgpack_Unpacker *, void *, Py_ssize_t))__pyx_f_6pandas_7msgpack_8Unpacker_append_buffer; __pyx_vtable_6pandas_7msgpack_Unpacker.read_from_file = (PyObject *(*)(struct __pyx_obj_6pandas_7msgpack_Unpacker *))__pyx_f_6pandas_7msgpack_8Unpacker_read_from_file; __pyx_vtable_6pandas_7msgpack_Unpacker._unpack = (PyObject *(*)(struct __pyx_obj_6pandas_7msgpack_Unpacker *, execute_fn, PyObject *, struct __pyx_opt_args_6pandas_7msgpack_8Unpacker__unpack *__pyx_optional_args))__pyx_f_6pandas_7msgpack_8Unpacker__unpack; if (PyType_Ready(&__pyx_type_6pandas_7msgpack_Unpacker) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 421; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__Pyx_SetVtable(__pyx_type_6pandas_7msgpack_Unpacker.tp_dict, __pyx_vtabptr_6pandas_7msgpack_Unpacker) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 421; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__Pyx_SetAttrString(__pyx_m, "Unpacker", (PyObject *)&__pyx_type_6pandas_7msgpack_Unpacker) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 421; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_6pandas_7msgpack_Unpacker = &__pyx_type_6pandas_7msgpack_Unpacker; __pyx_vtabptr_6pandas_7msgpack_Packer = &__pyx_vtable_6pandas_7msgpack_Packer; __pyx_vtable_6pandas_7msgpack_Packer._pack = (int (*)(struct __pyx_obj_6pandas_7msgpack_Packer *, PyObject *, struct __pyx_opt_args_6pandas_7msgpack_6Packer__pack *__pyx_optional_args))__pyx_f_6pandas_7msgpack_6Packer__pack; __pyx_vtable_6pandas_7msgpack_Packer.pack = (PyObject *(*)(struct __pyx_obj_6pandas_7msgpack_Packer *, PyObject *, int __pyx_skip_dispatch))__pyx_f_6pandas_7msgpack_6Packer_pack; __pyx_vtable_6pandas_7msgpack_Packer.pack_pair = (PyObject *(*)(struct __pyx_obj_6pandas_7msgpack_Packer *, PyObject *, PyObject *, int))__pyx_f_6pandas_7msgpack_6Packer_pack_pair; if (PyType_Ready(&__pyx_type_6pandas_7msgpack_Packer) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 99; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__Pyx_SetVtable(__pyx_type_6pandas_7msgpack_Packer.tp_dict, __pyx_vtabptr_6pandas_7msgpack_Packer) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 99; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__Pyx_SetAttrString(__pyx_m, "Packer", (PyObject *)&__pyx_type_6pandas_7msgpack_Packer) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 99; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_6pandas_7msgpack_Packer = &__pyx_type_6pandas_7msgpack_Packer; /*--- Type import code ---*/ __pyx_ptype_7cpython_4type_type = __Pyx_ImportType(__Pyx_BUILTIN_MODULE_NAME, "type", #if CYTHON_COMPILING_IN_PYPY sizeof(PyTypeObject), #else sizeof(PyHeapTypeObject), #endif 0); if (unlikely(!__pyx_ptype_7cpython_4type_type)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 9; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_7cpython_4bool_bool = __Pyx_ImportType(__Pyx_BUILTIN_MODULE_NAME, "bool", sizeof(PyBoolObject), 0); if (unlikely(!__pyx_ptype_7cpython_4bool_bool)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 8; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_7cpython_7complex_complex = __Pyx_ImportType(__Pyx_BUILTIN_MODULE_NAME, "complex", sizeof(PyComplexObject), 0); if (unlikely(!__pyx_ptype_7cpython_7complex_complex)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 15; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_5numpy_dtype = __Pyx_ImportType("numpy", "dtype", sizeof(PyArray_Descr), 0); if (unlikely(!__pyx_ptype_5numpy_dtype)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_5numpy_flatiter = __Pyx_ImportType("numpy", "flatiter", sizeof(PyArrayIterObject), 0); if (unlikely(!__pyx_ptype_5numpy_flatiter)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 167; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_5numpy_broadcast = __Pyx_ImportType("numpy", "broadcast", sizeof(PyArrayMultiIterObject), 0); if (unlikely(!__pyx_ptype_5numpy_broadcast)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 171; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_5numpy_ndarray = __Pyx_ImportType("numpy", "ndarray", sizeof(PyArrayObject), 0); if (unlikely(!__pyx_ptype_5numpy_ndarray)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_5numpy_ufunc = __Pyx_ImportType("numpy", "ufunc", sizeof(PyUFuncObject), 0); if (unlikely(!__pyx_ptype_5numpy_ufunc)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 865; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /*--- Variable import code ---*/ /*--- Function import code ---*/ /*--- Execution code ---*/ /* "pandas/msgpack.pyx":17 * * import cython * import numpy as np # <<<<<<<<<<<<<< * from numpy cimport * * */ __pyx_t_1 = __Pyx_Import(((PyObject *)__pyx_n_s__numpy), 0, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 17; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s__np, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 17; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pandas/msgpack.pyx":20 * from numpy cimport * * * class UnpackException(IOError): # <<<<<<<<<<<<<< * pass * */ __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 20; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 20; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_builtin_IOError); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_builtin_IOError); __Pyx_GIVEREF(__pyx_builtin_IOError); __pyx_t_3 = __Pyx_CreateClass(((PyObject *)__pyx_t_2), ((PyObject *)__pyx_t_1), __pyx_n_s__UnpackException, __pyx_n_s__UnpackException, __pyx_n_s_55); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 20; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; if (PyDict_SetItem(__pyx_d, __pyx_n_s__UnpackException, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 20; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; /* "pandas/msgpack.pyx":24 * * * class BufferFull(UnpackException): # <<<<<<<<<<<<<< * pass * */ __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 24; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s__UnpackException); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 24; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 24; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_CreateClass(((PyObject *)__pyx_t_2), ((PyObject *)__pyx_t_1), __pyx_n_s__BufferFull, __pyx_n_s__BufferFull, __pyx_n_s_55); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 24; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; if (PyDict_SetItem(__pyx_d, __pyx_n_s__BufferFull, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 24; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; /* "pandas/msgpack.pyx":28 * * * class OutOfData(UnpackException): # <<<<<<<<<<<<<< * pass * */ __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 28; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s__UnpackException); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 28; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 28; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_CreateClass(((PyObject *)__pyx_t_2), ((PyObject *)__pyx_t_1), __pyx_n_s__OutOfData, __pyx_n_s__OutOfData, __pyx_n_s_55); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 28; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; if (PyDict_SetItem(__pyx_d, __pyx_n_s__OutOfData, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 28; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; /* "pandas/msgpack.pyx":32 * * * class UnpackValueError(UnpackException, ValueError): # <<<<<<<<<<<<<< * pass * */ __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 32; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s__UnpackException); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 32; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 32; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __Pyx_INCREF(__pyx_builtin_ValueError); PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_builtin_ValueError); __Pyx_GIVEREF(__pyx_builtin_ValueError); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_CreateClass(((PyObject *)__pyx_t_2), ((PyObject *)__pyx_t_1), __pyx_n_s__UnpackValueError, __pyx_n_s__UnpackValueError, __pyx_n_s_55); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 32; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; if (PyDict_SetItem(__pyx_d, __pyx_n_s__UnpackValueError, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 32; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; /* "pandas/msgpack.pyx":36 * * * class ExtraData(ValueError): # <<<<<<<<<<<<<< * def __init__(self, unpacked, extra): * self.unpacked = unpacked */ __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 36; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_1)); /* "pandas/msgpack.pyx":37 * * class ExtraData(ValueError): * def __init__(self, unpacked, extra): # <<<<<<<<<<<<<< * self.unpacked = unpacked * self.extra = extra */ __pyx_t_3 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6pandas_7msgpack_9ExtraData_1__init__, 0, __pyx_n_s_59, NULL, __pyx_n_s_55, ((PyObject *)__pyx_k_codeobj_57)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 37; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyObject_SetItem(__pyx_t_1, __pyx_n_s____init__, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 37; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/msgpack.pyx":41 * self.extra = extra * * def __str__(self): # <<<<<<<<<<<<<< * return "unpack(b) recieved extra data." * */ __pyx_t_3 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6pandas_7msgpack_9ExtraData_3__str__, 0, __pyx_n_s_62, NULL, __pyx_n_s_55, ((PyObject *)__pyx_k_codeobj_61)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 41; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyObject_SetItem(__pyx_t_1, __pyx_n_s____str__, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 41; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/msgpack.pyx":36 * * * class ExtraData(ValueError): # <<<<<<<<<<<<<< * def __init__(self, unpacked, extra): * self.unpacked = unpacked */ __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 36; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_builtin_ValueError); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_builtin_ValueError); __Pyx_GIVEREF(__pyx_builtin_ValueError); __pyx_t_2 = __Pyx_CreateClass(((PyObject *)__pyx_t_3), ((PyObject *)__pyx_t_1), __pyx_n_s__ExtraData, __pyx_n_s__ExtraData, __pyx_n_s_55); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 36; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; if (PyDict_SetItem(__pyx_d, __pyx_n_s__ExtraData, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 36; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; /* "pandas/msgpack.pyx":44 * return "unpack(b) recieved extra data." * * class PackException(IOError): # <<<<<<<<<<<<<< * pass * */ __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 44; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 44; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_builtin_IOError); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_builtin_IOError); __Pyx_GIVEREF(__pyx_builtin_IOError); __pyx_t_3 = __Pyx_CreateClass(((PyObject *)__pyx_t_2), ((PyObject *)__pyx_t_1), __pyx_n_s__PackException, __pyx_n_s__PackException, __pyx_n_s_55); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 44; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; if (PyDict_SetItem(__pyx_d, __pyx_n_s__PackException, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 44; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; /* "pandas/msgpack.pyx":47 * pass * * class PackValueError(PackException, ValueError): # <<<<<<<<<<<<<< * pass * */ __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 47; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s__PackException); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 47; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 47; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __Pyx_INCREF(__pyx_builtin_ValueError); PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_builtin_ValueError); __Pyx_GIVEREF(__pyx_builtin_ValueError); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_CreateClass(((PyObject *)__pyx_t_2), ((PyObject *)__pyx_t_1), __pyx_n_s__PackValueError, __pyx_n_s__PackValueError, __pyx_n_s_55); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 47; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; if (PyDict_SetItem(__pyx_d, __pyx_n_s__PackValueError, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 47; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; /* "pandas/msgpack.pyx":95 * int msgpack_pack_raw_body(msgpack_packer* pk, char* body, size_t l) * * cdef int DEFAULT_RECURSE_LIMIT=511 # <<<<<<<<<<<<<< * * */ __pyx_v_6pandas_7msgpack_DEFAULT_RECURSE_LIMIT = 511; /* "pandas/msgpack.pyx":136 * * def __init__(self, default=None, encoding='utf-8', unicode_errors='strict', * use_single_float=False, bint autoreset=1): # <<<<<<<<<<<<<< * self.use_float = use_single_float * self.autoreset = autoreset */ __pyx_t_1 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 136; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_k_5 = __pyx_t_1; __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; /* "pandas/msgpack.pyx":163 * @cython.boundscheck(False) * @cython.wraparound(False) * cdef int _pack(self, object o, int nest_limit=DEFAULT_RECURSE_LIMIT) except -1: # <<<<<<<<<<<<<< * cdef long long llval * cdef unsigned long long ullval */ __pyx_k_10 = __pyx_v_6pandas_7msgpack_DEFAULT_RECURSE_LIMIT; /* "pandas/msgpack.pyx":320 * return ret * * def pack(object o, object stream, default=None, encoding='utf-8', unicode_errors='strict'): # <<<<<<<<<<<<<< * """ * pack an object `o` and write it to stream).""" */ __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_6pandas_7msgpack_1pack, NULL, __pyx_n_s_55); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 320; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s__pack, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 320; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pandas/msgpack.pyx":326 * stream.write(packer.pack(o)) * * def packb(object o, default=None, encoding='utf-8', unicode_errors='strict', use_single_float=False): # <<<<<<<<<<<<<< * """ * pack o and return packed bytes.""" */ __pyx_t_1 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 326; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_k_17 = __pyx_t_1; __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_6pandas_7msgpack_3packb, NULL, __pyx_n_s_55); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 326; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s__packb, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 326; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pandas/msgpack.pyx":365 * ctx.user.unicode_errors = unicode_errors * * def unpackb(object packed, object object_hook=None, object list_hook=None, # <<<<<<<<<<<<<< * bint use_list=1, encoding=None, unicode_errors="strict", * object_pairs_hook=None, */ __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_6pandas_7msgpack_5unpackb, NULL, __pyx_n_s_55); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 365; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s__unpackb, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 365; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pandas/msgpack.pyx":407 * * * def unpack(object stream, object object_hook=None, object list_hook=None, # <<<<<<<<<<<<<< * bint use_list=1, encoding=None, unicode_errors="strict", * object_pairs_hook=None, */ __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_6pandas_7msgpack_7unpack, NULL, __pyx_n_s_55); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 407; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s__unpack, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 407; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pandas/msgpack.pyx":1 * # coding: utf-8 # <<<<<<<<<<<<<< * #cython: embedsignature=True * #cython: profile=False */ __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_1)); if (PyDict_SetItem(__pyx_d, __pyx_n_s____test__, ((PyObject *)__pyx_t_1)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; /* "numpy.pxd":979 * arr.base = baseptr * * cdef inline object get_array_base(ndarray arr): # <<<<<<<<<<<<<< * if arr.base is NULL: * return None */ goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); if (__pyx_m) { __Pyx_AddTraceback("init pandas.msgpack", __pyx_clineno, __pyx_lineno, __pyx_filename); Py_DECREF(__pyx_m); __pyx_m = 0; } else if (!PyErr_Occurred()) { PyErr_SetString(PyExc_ImportError, "init pandas.msgpack"); } __pyx_L0:; __Pyx_RefNannyFinishContext(); #if PY_MAJOR_VERSION < 3 return; #else return __pyx_m; #endif } /* Runtime support code */ #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 /* CYTHON_REFNANNY */ 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 '%s' is not defined", PyString_AS_STRING(name)); #endif } return result; } 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, "%s() takes %s %" CYTHON_FORMAT_SSIZE_T "d positional argument%s (%" CYTHON_FORMAT_SSIZE_T "d given)", func_name, more_or_less, num_expected, (num_expected == 1) ? "" : "s", num_found); } 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 } 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, "%s() keywords must be strings", function_name); goto bad; invalid_keyword: PyErr_Format(PyExc_TypeError, #if PY_MAJOR_VERSION < 3 "%s() got an unexpected keyword argument '%s'", function_name, PyString_AsString(key)); #else "%s() got an unexpected keyword argument '%U'", function_name, key); #endif bad: return -1; } static CYTHON_INLINE int __Pyx_CheckKeywordStrings( PyObject *kwdict, const char* function_name, int kw_allowed) { PyObject* key = 0; Py_ssize_t pos = 0; #if CPYTHON_COMPILING_IN_PYPY if (!kw_allowed && PyDict_Next(kwdict, &pos, &key, 0)) goto invalid_keyword; return 1; #else while (PyDict_Next(kwdict, &pos, &key, 0)) { #if PY_MAJOR_VERSION < 3 if (unlikely(!PyString_CheckExact(key)) && unlikely(!PyString_Check(key))) #endif if (unlikely(!PyUnicode_Check(key))) goto invalid_keyword_type; } if ((!kw_allowed) && unlikely(key)) goto invalid_keyword; return 1; invalid_keyword_type: PyErr_Format(PyExc_TypeError, "%s() keywords must be strings", function_name); return 0; #endif invalid_keyword: PyErr_Format(PyExc_TypeError, #if PY_MAJOR_VERSION < 3 "%s() got an unexpected keyword argument '%s'", function_name, PyString_AsString(key)); #else "%s() got an unexpected keyword argument '%U'", function_name, key); #endif return 0; } static CYTHON_INLINE void __Pyx_ErrRestore(PyObject *type, PyObject *value, PyObject *tb) { #if CYTHON_COMPILING_IN_CPYTHON PyObject *tmp_type, *tmp_value, *tmp_tb; PyThreadState *tstate = PyThreadState_GET(); 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); #else PyErr_Restore(type, value, tb); #endif } static CYTHON_INLINE void __Pyx_ErrFetch(PyObject **type, PyObject **value, PyObject **tb) { #if CYTHON_COMPILING_IN_CPYTHON PyThreadState *tstate = PyThreadState_GET(); *type = tstate->curexc_type; *value = tstate->curexc_value; *tb = tstate->curexc_traceback; tstate->curexc_type = 0; tstate->curexc_value = 0; tstate->curexc_traceback = 0; #else PyErr_Fetch(type, value, tb); #endif } #if PY_MAJOR_VERSION < 3 static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, CYTHON_UNUSED PyObject *cause) { 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 PY_VERSION_HEX < 0x02050000 if (PyClass_Check(type)) { #else if (PyType_Check(type)) { #endif #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; #if PY_VERSION_HEX < 0x02050000 if (PyInstance_Check(type)) { type = (PyObject*) ((PyInstanceObject*)type)->in_class; Py_INCREF(type); } else { type = 0; PyErr_SetString(PyExc_TypeError, "raise: exception must be an old-style class or instance"); goto raise_error; } #else 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; } #endif } __Pyx_ErrRestore(type, value, tb); return; raise_error: Py_XDECREF(value); Py_XDECREF(type); Py_XDECREF(tb); return; } #else /* Python 3+ */ 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 *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 = PyEval_CallObject(type, args); Py_DECREF(args); if (!owned_instance) goto bad; value = owned_instance; if (!PyExceptionInstance_Check(value)) { PyErr_Format(PyExc_TypeError, "calling %R should have returned an instance of " "BaseException, not %R", type, Py_TYPE(value)); goto bad; } } else { PyErr_SetString(PyExc_TypeError, "raise: exception class must be a subclass of BaseException"); goto bad; } #if PY_VERSION_HEX >= 0x03030000 if (cause) { #else if (cause && cause != Py_None) { #endif PyObject *fixed_cause; if (cause == Py_None) { fixed_cause = NULL; } else if (PyExceptionClass_Check(cause)) { fixed_cause = PyObject_CallObject(cause, NULL); if (fixed_cause == NULL) goto bad; } else if (PyExceptionInstance_Check(cause)) { fixed_cause = cause; Py_INCREF(fixed_cause); } else { PyErr_SetString(PyExc_TypeError, "exception causes must derive from " "BaseException"); goto bad; } PyException_SetCause(value, fixed_cause); } PyErr_SetObject(type, value); if (tb) { PyThreadState *tstate = PyThreadState_GET(); PyObject* tmp_tb = tstate->curexc_traceback; if (tb != tmp_tb) { Py_INCREF(tb); tstate->curexc_traceback = tb; Py_XDECREF(tmp_tb); } } bad: Py_XDECREF(owned_instance); return; } #endif static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type) { if (unlikely(!type)) { PyErr_Format(PyExc_SystemError, "Missing type object"); return 0; } if (likely(PyObject_TypeCheck(obj, type))) return 1; PyErr_Format(PyExc_TypeError, "Cannot convert %.200s to %.200s", Py_TYPE(obj)->tp_name, type->tp_name); return 0; } static CYTHON_INLINE PyObject *__Pyx_GetModuleGlobalName(PyObject *name) { PyObject *result; #if CYTHON_COMPILING_IN_CPYTHON result = PyDict_GetItem(__pyx_d, name); if (result) { Py_INCREF(result); } else { #else result = PyObject_GetItem(__pyx_d, name); if (!result) { PyErr_Clear(); #endif result = __Pyx_GetBuiltinName(name); } return result; } static CYTHON_INLINE int __Pyx_IterFinish(void) { #if CYTHON_COMPILING_IN_CPYTHON PyThreadState *tstate = PyThreadState_GET(); PyObject* exc_type = tstate->curexc_type; if (unlikely(exc_type)) { if (likely(exc_type == PyExc_StopIteration) || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration)) { PyObject *exc_value, *exc_tb; exc_value = tstate->curexc_value; exc_tb = tstate->curexc_traceback; tstate->curexc_type = 0; tstate->curexc_value = 0; tstate->curexc_traceback = 0; Py_DECREF(exc_type); Py_XDECREF(exc_value); Py_XDECREF(exc_tb); return 0; } else { return -1; } } return 0; #else if (unlikely(PyErr_Occurred())) { if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) { PyErr_Clear(); return 0; } else { return -1; } } return 0; #endif } 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); } 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; } static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index) { PyErr_Format(PyExc_ValueError, "need more than %" CYTHON_FORMAT_SSIZE_T "d value%s to unpack", index, (index == 1) ? "" : "s"); } static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); } static void __Pyx_UnpackTupleError(PyObject *t, Py_ssize_t index) { if (t == Py_None) { __Pyx_RaiseNoneNotIterableError(); } else if (PyTuple_GET_SIZE(t) < index) { __Pyx_RaiseNeedMoreValuesError(PyTuple_GET_SIZE(t)); } else { __Pyx_RaiseTooManyValuesError(index); } } static CYTHON_INLINE int __Pyx_unpack_tuple2(PyObject* tuple, PyObject** pvalue1, PyObject** pvalue2, int is_tuple, int has_known_size, int decref_tuple) { Py_ssize_t index; PyObject *value1 = NULL, *value2 = NULL, *iter = NULL; if (!is_tuple && unlikely(!PyTuple_Check(tuple))) { iternextfunc iternext; iter = PyObject_GetIter(tuple); if (unlikely(!iter)) goto bad; if (decref_tuple) { Py_DECREF(tuple); tuple = NULL; } iternext = Py_TYPE(iter)->tp_iternext; value1 = iternext(iter); if (unlikely(!value1)) { index = 0; goto unpacking_failed; } value2 = iternext(iter); if (unlikely(!value2)) { index = 1; goto unpacking_failed; } if (!has_known_size && unlikely(__Pyx_IternextUnpackEndCheck(iternext(iter), 2))) goto bad; Py_DECREF(iter); } else { if (!has_known_size && unlikely(PyTuple_GET_SIZE(tuple) != 2)) { __Pyx_UnpackTupleError(tuple, 2); goto bad; } #if CYTHON_COMPILING_IN_PYPY value1 = PySequence_ITEM(tuple, 0); if (unlikely(!value1)) goto bad; value2 = PySequence_ITEM(tuple, 1); if (unlikely(!value2)) goto bad; #else value1 = PyTuple_GET_ITEM(tuple, 0); value2 = PyTuple_GET_ITEM(tuple, 1); Py_INCREF(value1); Py_INCREF(value2); #endif if (decref_tuple) { Py_DECREF(tuple); } } *pvalue1 = value1; *pvalue2 = value2; return 0; unpacking_failed: if (!has_known_size && __Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); bad: Py_XDECREF(iter); Py_XDECREF(value1); Py_XDECREF(value2); if (decref_tuple) { Py_XDECREF(tuple); } return -1; } static CYTHON_INLINE PyObject* __Pyx_dict_iterator(PyObject* iterable, int is_dict, PyObject* method_name, Py_ssize_t* p_orig_length, int* p_source_is_dict) { is_dict = is_dict || likely(PyDict_CheckExact(iterable)); *p_source_is_dict = is_dict; #if !CYTHON_COMPILING_IN_PYPY if (is_dict) { *p_orig_length = PyDict_Size(iterable); Py_INCREF(iterable); return iterable; } #endif *p_orig_length = 0; if (method_name) { PyObject* iter; iterable = __Pyx_PyObject_CallMethod0(iterable, method_name); if (!iterable) return NULL; #if !CYTHON_COMPILING_IN_PYPY if (PyTuple_CheckExact(iterable) || PyList_CheckExact(iterable)) return iterable; #endif iter = PyObject_GetIter(iterable); Py_DECREF(iterable); return iter; } return PyObject_GetIter(iterable); } static CYTHON_INLINE int __Pyx_dict_iter_next(PyObject* iter_obj, Py_ssize_t orig_length, Py_ssize_t* ppos, PyObject** pkey, PyObject** pvalue, PyObject** pitem, int source_is_dict) { PyObject* next_item; #if !CYTHON_COMPILING_IN_PYPY if (source_is_dict) { PyObject *key, *value; if (unlikely(orig_length != PyDict_Size(iter_obj))) { PyErr_SetString(PyExc_RuntimeError, "dictionary changed size during iteration"); return -1; } if (unlikely(!PyDict_Next(iter_obj, ppos, &key, &value))) { return 0; } if (pitem) { PyObject* tuple = PyTuple_New(2); if (unlikely(!tuple)) { return -1; } Py_INCREF(key); Py_INCREF(value); PyTuple_SET_ITEM(tuple, 0, key); PyTuple_SET_ITEM(tuple, 1, value); *pitem = tuple; } else { if (pkey) { Py_INCREF(key); *pkey = key; } if (pvalue) { Py_INCREF(value); *pvalue = value; } } return 1; } else if (PyTuple_CheckExact(iter_obj)) { Py_ssize_t pos = *ppos; if (unlikely(pos >= PyTuple_GET_SIZE(iter_obj))) return 0; *ppos = pos + 1; next_item = PyTuple_GET_ITEM(iter_obj, pos); Py_INCREF(next_item); } else if (PyList_CheckExact(iter_obj)) { Py_ssize_t pos = *ppos; if (unlikely(pos >= PyList_GET_SIZE(iter_obj))) return 0; *ppos = pos + 1; next_item = PyList_GET_ITEM(iter_obj, pos); Py_INCREF(next_item); } else #endif { next_item = PyIter_Next(iter_obj); if (unlikely(!next_item)) { return __Pyx_IterFinish(); } } if (pitem) { *pitem = next_item; } else if (pkey && pvalue) { if (__Pyx_unpack_tuple2(next_item, pkey, pvalue, source_is_dict, source_is_dict, 1)) return -1; } else if (pkey) { *pkey = next_item; } else { *pvalue = next_item; } return 1; } static int __Pyx_SetVtable(PyObject *dict, void *vtable) { #if PY_VERSION_HEX >= 0x02070000 && !(PY_MAJOR_VERSION==3&&PY_MINOR_VERSION==0) 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; } static PyObject * __Pyx_CyFunction_get_doc(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *closure) { if (unlikely(op->func_doc == NULL)) { if (op->func.m_ml->ml_doc) { #if PY_MAJOR_VERSION >= 3 op->func_doc = PyUnicode_FromString(op->func.m_ml->ml_doc); #else op->func_doc = PyString_FromString(op->func.m_ml->ml_doc); #endif if (unlikely(op->func_doc == NULL)) return NULL; } else { Py_INCREF(Py_None); return Py_None; } } Py_INCREF(op->func_doc); return op->func_doc; } static int __Pyx_CyFunction_set_doc(__pyx_CyFunctionObject *op, PyObject *value) { PyObject *tmp = op->func_doc; if (value == NULL) value = Py_None; /* Mark as deleted */ Py_INCREF(value); op->func_doc = value; Py_XDECREF(tmp); return 0; } static PyObject * __Pyx_CyFunction_get_name(__pyx_CyFunctionObject *op) { if (unlikely(op->func_name == NULL)) { #if PY_MAJOR_VERSION >= 3 op->func_name = PyUnicode_InternFromString(op->func.m_ml->ml_name); #else op->func_name = PyString_InternFromString(op->func.m_ml->ml_name); #endif if (unlikely(op->func_name == NULL)) return NULL; } Py_INCREF(op->func_name); return op->func_name; } static int __Pyx_CyFunction_set_name(__pyx_CyFunctionObject *op, PyObject *value) { PyObject *tmp; #if PY_MAJOR_VERSION >= 3 if (unlikely(value == NULL || !PyUnicode_Check(value))) { #else if (unlikely(value == NULL || !PyString_Check(value))) { #endif PyErr_SetString(PyExc_TypeError, "__name__ must be set to a string object"); return -1; } tmp = op->func_name; Py_INCREF(value); op->func_name = value; Py_XDECREF(tmp); return 0; } static PyObject * __Pyx_CyFunction_get_qualname(__pyx_CyFunctionObject *op) { Py_INCREF(op->func_qualname); return op->func_qualname; } static int __Pyx_CyFunction_set_qualname(__pyx_CyFunctionObject *op, PyObject *value) { PyObject *tmp; #if PY_MAJOR_VERSION >= 3 if (unlikely(value == NULL || !PyUnicode_Check(value))) { #else if (unlikely(value == NULL || !PyString_Check(value))) { #endif PyErr_SetString(PyExc_TypeError, "__qualname__ must be set to a string object"); return -1; } tmp = op->func_qualname; Py_INCREF(value); op->func_qualname = value; Py_XDECREF(tmp); return 0; } static PyObject * __Pyx_CyFunction_get_self(__pyx_CyFunctionObject *m, CYTHON_UNUSED void *closure) { PyObject *self; self = m->func_closure; if (self == NULL) self = Py_None; Py_INCREF(self); return self; } static PyObject * __Pyx_CyFunction_get_dict(__pyx_CyFunctionObject *op) { if (unlikely(op->func_dict == NULL)) { op->func_dict = PyDict_New(); if (unlikely(op->func_dict == NULL)) return NULL; } Py_INCREF(op->func_dict); return op->func_dict; } static int __Pyx_CyFunction_set_dict(__pyx_CyFunctionObject *op, PyObject *value) { PyObject *tmp; if (unlikely(value == NULL)) { PyErr_SetString(PyExc_TypeError, "function's dictionary may not be deleted"); return -1; } if (unlikely(!PyDict_Check(value))) { PyErr_SetString(PyExc_TypeError, "setting function's dictionary to a non-dict"); return -1; } tmp = op->func_dict; Py_INCREF(value); op->func_dict = value; Py_XDECREF(tmp); return 0; } static PyObject * __Pyx_CyFunction_get_globals(CYTHON_UNUSED __pyx_CyFunctionObject *op) { PyObject* dict = PyModule_GetDict(__pyx_m); Py_XINCREF(dict); return dict; } static PyObject * __Pyx_CyFunction_get_closure(CYTHON_UNUSED __pyx_CyFunctionObject *op) { Py_INCREF(Py_None); return Py_None; } static PyObject * __Pyx_CyFunction_get_code(__pyx_CyFunctionObject *op) { PyObject* result = (op->func_code) ? op->func_code : Py_None; Py_INCREF(result); return result; } static int __Pyx_CyFunction_init_defaults(__pyx_CyFunctionObject *op) { PyObject *res = op->defaults_getter((PyObject *) op); if (unlikely(!res)) return -1; op->defaults_tuple = PyTuple_GET_ITEM(res, 0); Py_INCREF(op->defaults_tuple); op->defaults_kwdict = PyTuple_GET_ITEM(res, 1); Py_INCREF(op->defaults_kwdict); Py_DECREF(res); return 0; } static int __Pyx_CyFunction_set_defaults(__pyx_CyFunctionObject *op, PyObject* value) { PyObject* tmp; if (!value) { value = Py_None; } else if (value != Py_None && !PyTuple_Check(value)) { PyErr_SetString(PyExc_TypeError, "__defaults__ must be set to a tuple object"); return -1; } Py_INCREF(value); tmp = op->defaults_tuple; op->defaults_tuple = value; Py_XDECREF(tmp); return 0; } static PyObject * __Pyx_CyFunction_get_defaults(__pyx_CyFunctionObject *op) { PyObject* result = op->defaults_tuple; if (unlikely(!result)) { if (op->defaults_getter) { if (__Pyx_CyFunction_init_defaults(op) < 0) return NULL; result = op->defaults_tuple; } else { result = Py_None; } } Py_INCREF(result); return result; } static int __Pyx_CyFunction_set_kwdefaults(__pyx_CyFunctionObject *op, PyObject* value) { PyObject* tmp; if (!value) { value = Py_None; } else if (value != Py_None && !PyDict_Check(value)) { PyErr_SetString(PyExc_TypeError, "__kwdefaults__ must be set to a dict object"); return -1; } Py_INCREF(value); tmp = op->defaults_kwdict; op->defaults_kwdict = value; Py_XDECREF(tmp); return 0; } static PyObject * __Pyx_CyFunction_get_kwdefaults(__pyx_CyFunctionObject *op) { PyObject* result = op->defaults_kwdict; if (unlikely(!result)) { if (op->defaults_getter) { if (__Pyx_CyFunction_init_defaults(op) < 0) return NULL; result = op->defaults_kwdict; } else { result = Py_None; } } Py_INCREF(result); return result; } static int __Pyx_CyFunction_set_annotations(__pyx_CyFunctionObject *op, PyObject* value) { PyObject* tmp; if (!value || value == Py_None) { value = NULL; } else if (!PyDict_Check(value)) { PyErr_SetString(PyExc_TypeError, "__annotations__ must be set to a dict object"); return -1; } Py_XINCREF(value); tmp = op->func_annotations; op->func_annotations = value; Py_XDECREF(tmp); return 0; } static PyObject * __Pyx_CyFunction_get_annotations(__pyx_CyFunctionObject *op) { PyObject* result = op->func_annotations; if (unlikely(!result)) { result = PyDict_New(); if (unlikely(!result)) return NULL; op->func_annotations = result; } Py_INCREF(result); return result; } static PyGetSetDef __pyx_CyFunction_getsets[] = { {(char *) "func_doc", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0}, {(char *) "__doc__", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0}, {(char *) "func_name", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0}, {(char *) "__name__", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0}, {(char *) "__qualname__", (getter)__Pyx_CyFunction_get_qualname, (setter)__Pyx_CyFunction_set_qualname, 0, 0}, {(char *) "__self__", (getter)__Pyx_CyFunction_get_self, 0, 0, 0}, {(char *) "func_dict", (getter)__Pyx_CyFunction_get_dict, (setter)__Pyx_CyFunction_set_dict, 0, 0}, {(char *) "__dict__", (getter)__Pyx_CyFunction_get_dict, (setter)__Pyx_CyFunction_set_dict, 0, 0}, {(char *) "func_globals", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0}, {(char *) "__globals__", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0}, {(char *) "func_closure", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0}, {(char *) "__closure__", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0}, {(char *) "func_code", (getter)__Pyx_CyFunction_get_code, 0, 0, 0}, {(char *) "__code__", (getter)__Pyx_CyFunction_get_code, 0, 0, 0}, {(char *) "func_defaults", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0}, {(char *) "__defaults__", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0}, {(char *) "__kwdefaults__", (getter)__Pyx_CyFunction_get_kwdefaults, (setter)__Pyx_CyFunction_set_kwdefaults, 0, 0}, {(char *) "__annotations__", (getter)__Pyx_CyFunction_get_annotations, (setter)__Pyx_CyFunction_set_annotations, 0, 0}, {0, 0, 0, 0, 0} }; #ifndef PY_WRITE_RESTRICTED /* < Py2.5 */ #define PY_WRITE_RESTRICTED WRITE_RESTRICTED #endif static PyMemberDef __pyx_CyFunction_members[] = { {(char *) "__module__", T_OBJECT, offsetof(__pyx_CyFunctionObject, func.m_module), PY_WRITE_RESTRICTED, 0}, {0, 0, 0, 0, 0} }; static PyObject * __Pyx_CyFunction_reduce(__pyx_CyFunctionObject *m, CYTHON_UNUSED PyObject *args) { #if PY_MAJOR_VERSION >= 3 return PyUnicode_FromString(m->func.m_ml->ml_name); #else return PyString_FromString(m->func.m_ml->ml_name); #endif } static PyMethodDef __pyx_CyFunction_methods[] = { {__Pyx_NAMESTR("__reduce__"), (PyCFunction)__Pyx_CyFunction_reduce, METH_VARARGS, 0}, {0, 0, 0, 0} }; static PyObject *__Pyx_CyFunction_New(PyTypeObject *type, PyMethodDef *ml, int flags, PyObject* qualname, PyObject *closure, PyObject *module, PyObject* code) { __pyx_CyFunctionObject *op = PyObject_GC_New(__pyx_CyFunctionObject, type); if (op == NULL) return NULL; op->flags = flags; op->func_weakreflist = NULL; op->func.m_ml = ml; op->func.m_self = (PyObject *) op; Py_XINCREF(closure); op->func_closure = closure; Py_XINCREF(module); op->func.m_module = module; op->func_dict = NULL; op->func_name = NULL; Py_INCREF(qualname); op->func_qualname = qualname; op->func_doc = NULL; op->func_classobj = NULL; Py_XINCREF(code); op->func_code = code; op->defaults_pyobjects = 0; op->defaults = NULL; op->defaults_tuple = NULL; op->defaults_kwdict = NULL; op->defaults_getter = NULL; op->func_annotations = NULL; PyObject_GC_Track(op); return (PyObject *) op; } static int __Pyx_CyFunction_clear(__pyx_CyFunctionObject *m) { Py_CLEAR(m->func_closure); Py_CLEAR(m->func.m_module); Py_CLEAR(m->func_dict); Py_CLEAR(m->func_name); Py_CLEAR(m->func_qualname); Py_CLEAR(m->func_doc); Py_CLEAR(m->func_code); Py_CLEAR(m->func_classobj); Py_CLEAR(m->defaults_tuple); Py_CLEAR(m->defaults_kwdict); Py_CLEAR(m->func_annotations); if (m->defaults) { PyObject **pydefaults = __Pyx_CyFunction_Defaults(PyObject *, m); int i; for (i = 0; i < m->defaults_pyobjects; i++) Py_XDECREF(pydefaults[i]); PyMem_Free(m->defaults); m->defaults = NULL; } return 0; } static void __Pyx_CyFunction_dealloc(__pyx_CyFunctionObject *m) { PyObject_GC_UnTrack(m); if (m->func_weakreflist != NULL) PyObject_ClearWeakRefs((PyObject *) m); __Pyx_CyFunction_clear(m); PyObject_GC_Del(m); } static int __Pyx_CyFunction_traverse(__pyx_CyFunctionObject *m, visitproc visit, void *arg) { Py_VISIT(m->func_closure); Py_VISIT(m->func.m_module); Py_VISIT(m->func_dict); Py_VISIT(m->func_name); Py_VISIT(m->func_qualname); Py_VISIT(m->func_doc); Py_VISIT(m->func_code); Py_VISIT(m->func_classobj); Py_VISIT(m->defaults_tuple); Py_VISIT(m->defaults_kwdict); if (m->defaults) { PyObject **pydefaults = __Pyx_CyFunction_Defaults(PyObject *, m); int i; for (i = 0; i < m->defaults_pyobjects; i++) Py_VISIT(pydefaults[i]); } return 0; } static PyObject *__Pyx_CyFunction_descr_get(PyObject *func, PyObject *obj, PyObject *type) { __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; if (m->flags & __Pyx_CYFUNCTION_STATICMETHOD) { Py_INCREF(func); return func; } if (m->flags & __Pyx_CYFUNCTION_CLASSMETHOD) { if (type == NULL) type = (PyObject *)(Py_TYPE(obj)); return PyMethod_New(func, type, (PyObject *)(Py_TYPE(type))); } if (obj == Py_None) obj = NULL; return PyMethod_New(func, obj, type); } static PyObject* __Pyx_CyFunction_repr(__pyx_CyFunctionObject *op) { #if PY_MAJOR_VERSION >= 3 return PyUnicode_FromFormat("", op->func_qualname, (void *)op); #else return PyString_FromFormat("", PyString_AsString(op->func_qualname), (void *)op); #endif } #if CYTHON_COMPILING_IN_PYPY static PyObject * __Pyx_CyFunction_Call(PyObject *func, PyObject *arg, PyObject *kw) { PyCFunctionObject* f = (PyCFunctionObject*)func; PyCFunction meth = PyCFunction_GET_FUNCTION(func); PyObject *self = PyCFunction_GET_SELF(func); Py_ssize_t size; switch (PyCFunction_GET_FLAGS(func) & ~(METH_CLASS | METH_STATIC | METH_COEXIST)) { case METH_VARARGS: if (likely(kw == NULL) || PyDict_Size(kw) == 0) return (*meth)(self, arg); break; case METH_VARARGS | METH_KEYWORDS: return (*(PyCFunctionWithKeywords)meth)(self, arg, kw); case METH_NOARGS: if (likely(kw == NULL) || PyDict_Size(kw) == 0) { size = PyTuple_GET_SIZE(arg); if (size == 0) return (*meth)(self, NULL); PyErr_Format(PyExc_TypeError, "%.200s() takes no arguments (%zd given)", f->m_ml->ml_name, size); return NULL; } break; case METH_O: if (likely(kw == NULL) || PyDict_Size(kw) == 0) { size = PyTuple_GET_SIZE(arg); if (size == 1) return (*meth)(self, PyTuple_GET_ITEM(arg, 0)); PyErr_Format(PyExc_TypeError, "%.200s() takes exactly one argument (%zd given)", f->m_ml->ml_name, size); return NULL; } break; default: PyErr_SetString(PyExc_SystemError, "Bad call flags in " "__Pyx_CyFunction_Call. METH_OLDARGS is no " "longer supported!"); return NULL; } PyErr_Format(PyExc_TypeError, "%.200s() takes no keyword arguments", f->m_ml->ml_name); return NULL; } #else static PyObject * __Pyx_CyFunction_Call(PyObject *func, PyObject *arg, PyObject *kw) { return PyCFunction_Call(func, arg, kw); } #endif static PyTypeObject __pyx_CyFunctionType_type = { PyVarObject_HEAD_INIT(0, 0) __Pyx_NAMESTR("cython_function_or_method"), /*tp_name*/ sizeof(__pyx_CyFunctionObject), /*tp_basicsize*/ 0, /*tp_itemsize*/ (destructor) __Pyx_CyFunction_dealloc, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #else 0, /*reserved*/ #endif (reprfunc) __Pyx_CyFunction_repr, /*tp_repr*/ 0, /*tp_as_number*/ 0, /*tp_as_sequence*/ 0, /*tp_as_mapping*/ 0, /*tp_hash*/ __Pyx_CyFunction_Call, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC, /* tp_flags*/ 0, /*tp_doc*/ (traverseproc) __Pyx_CyFunction_traverse, /*tp_traverse*/ (inquiry) __Pyx_CyFunction_clear, /*tp_clear*/ 0, /*tp_richcompare*/ offsetof(__pyx_CyFunctionObject, func_weakreflist), /* tp_weaklistoffse */ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_CyFunction_methods, /*tp_methods*/ __pyx_CyFunction_members, /*tp_members*/ __pyx_CyFunction_getsets, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ __Pyx_CyFunction_descr_get, /*tp_descr_get*/ 0, /*tp_descr_set*/ offsetof(__pyx_CyFunctionObject, func_dict),/*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ 0, /*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*/ #if PY_VERSION_HEX >= 0x02060000 0, /*tp_version_tag*/ #endif #if PY_VERSION_HEX >= 0x030400a1 && defined(Py_TPFLAGS_HAVE_FINALIZE) 0, /*tp_finalize*/ #endif }; static int __Pyx_CyFunction_init(void) { #if !CYTHON_COMPILING_IN_PYPY __pyx_CyFunctionType_type.tp_call = PyCFunction_Call; #endif if (PyType_Ready(&__pyx_CyFunctionType_type) < 0) return -1; __pyx_CyFunctionType = &__pyx_CyFunctionType_type; return 0; } static CYTHON_INLINE void *__Pyx_CyFunction_InitDefaults(PyObject *func, size_t size, int pyobjects) { __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; m->defaults = PyMem_Malloc(size); if (!m->defaults) return PyErr_NoMemory(); memset(m->defaults, 0, size); m->defaults_pyobjects = pyobjects; return m->defaults; } static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *func, PyObject *tuple) { __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; m->defaults_tuple = tuple; Py_INCREF(tuple); } static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *func, PyObject *dict) { __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; m->defaults_kwdict = dict; Py_INCREF(dict); } static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *func, PyObject *dict) { __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; m->func_annotations = dict; Py_INCREF(dict); } static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level) { PyObject *empty_list = 0; PyObject *module = 0; PyObject *global_dict = 0; PyObject *empty_dict = 0; PyObject *list; #if PY_VERSION_HEX < 0x03030000 PyObject *py_import; py_import = __Pyx_PyObject_GetAttrStr(__pyx_b, __pyx_n_s____import__); if (!py_import) goto bad; #endif if (from_list) list = from_list; else { empty_list = PyList_New(0); if (!empty_list) goto bad; list = empty_list; } global_dict = PyModule_GetDict(__pyx_m); if (!global_dict) goto bad; empty_dict = PyDict_New(); if (!empty_dict) goto bad; #if PY_VERSION_HEX >= 0x02050000 { #if PY_MAJOR_VERSION >= 3 if (level == -1) { if (strchr(__Pyx_MODULE_NAME, '.')) { #if PY_VERSION_HEX < 0x03030000 PyObject *py_level = PyInt_FromLong(1); if (!py_level) goto bad; module = PyObject_CallFunctionObjArgs(py_import, name, global_dict, empty_dict, list, py_level, NULL); Py_DECREF(py_level); #else module = PyImport_ImportModuleLevelObject( name, global_dict, empty_dict, list, 1); #endif if (!module) { if (!PyErr_ExceptionMatches(PyExc_ImportError)) goto bad; PyErr_Clear(); } } level = 0; /* try absolute import on failure */ } #endif if (!module) { #if PY_VERSION_HEX < 0x03030000 PyObject *py_level = PyInt_FromLong(level); if (!py_level) goto bad; module = PyObject_CallFunctionObjArgs(py_import, name, global_dict, empty_dict, list, py_level, NULL); Py_DECREF(py_level); #else module = PyImport_ImportModuleLevelObject( name, global_dict, empty_dict, list, level); #endif } } #else if (level>0) { PyErr_SetString(PyExc_RuntimeError, "Relative import is not supported for Python <=2.4."); goto bad; } module = PyObject_CallFunctionObjArgs(py_import, name, global_dict, empty_dict, list, NULL); #endif bad: #if PY_VERSION_HEX < 0x03030000 Py_XDECREF(py_import); #endif Py_XDECREF(empty_list); Py_XDECREF(empty_dict); return module; } static PyObject *__Pyx_FindPy2Metaclass(PyObject *bases) { PyObject *metaclass; #if PY_MAJOR_VERSION < 3 if (PyTuple_Check(bases) && PyTuple_GET_SIZE(bases) > 0) { PyObject *base = PyTuple_GET_ITEM(bases, 0); metaclass = __Pyx_PyObject_GetAttrStr(base, __pyx_n_s____class__); if (!metaclass) { PyErr_Clear(); metaclass = (PyObject*) Py_TYPE(base); Py_INCREF(metaclass); } } else { metaclass = (PyObject *) &PyClass_Type; Py_INCREF(metaclass); } #else if (PyTuple_Check(bases) && PyTuple_GET_SIZE(bases) > 0) { PyObject *base = PyTuple_GET_ITEM(bases, 0); metaclass = (PyObject*) Py_TYPE(base); } else { metaclass = (PyObject *) &PyType_Type; } Py_INCREF(metaclass); #endif return metaclass; } static PyObject *__Pyx_CreateClass(PyObject *bases, PyObject *dict, PyObject *name, PyObject *qualname, PyObject *modname) { PyObject *result; PyObject *metaclass; if (PyDict_SetItem(dict, __pyx_n_s____module__, modname) < 0) return NULL; if (PyDict_SetItem(dict, __pyx_n_s____qualname__, qualname) < 0) return NULL; metaclass = PyDict_GetItem(dict, __pyx_n_s____metaclass__); if (metaclass) { Py_INCREF(metaclass); } else { metaclass = __Pyx_FindPy2Metaclass(bases); } result = PyObject_CallFunctionObjArgs(metaclass, name, bases, dict, NULL); Py_DECREF(metaclass); return result; } #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 #if CYTHON_CCOMPLEX #else static CYTHON_INLINE int __Pyx_c_eqf(__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_sumf(__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_difff(__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_prodf(__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; } static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_quotf(__pyx_t_float_complex a, __pyx_t_float_complex b) { __pyx_t_float_complex z; float denom = b.real * b.real + b.imag * b.imag; z.real = (a.real * b.real + a.imag * b.imag) / denom; z.imag = (a.imag * b.real - a.real * b.imag) / denom; return z; } static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_negf(__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_zerof(__pyx_t_float_complex a) { return (a.real == 0) && (a.imag == 0); } static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_conjf(__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_absf(__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_powf(__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_prodf(a, a); return __Pyx_c_prodf(a, a); case 3: z = __Pyx_c_prodf(a, a); return __Pyx_c_prodf(z, a); case 4: z = __Pyx_c_prodf(a, a); return __Pyx_c_prodf(z, z); } } if (a.imag == 0) { if (a.real == 0) { return a; } r = a.real; theta = 0; } else { r = __Pyx_c_absf(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 #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 #if CYTHON_CCOMPLEX #else static CYTHON_INLINE int __Pyx_c_eq(__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(__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(__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(__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; } static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_quot(__pyx_t_double_complex a, __pyx_t_double_complex b) { __pyx_t_double_complex z; double denom = b.real * b.real + b.imag * b.imag; z.real = (a.real * b.real + a.imag * b.imag) / denom; z.imag = (a.imag * b.real - a.real * b.imag) / denom; return z; } static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_neg(__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(__pyx_t_double_complex a) { return (a.real == 0) && (a.imag == 0); } static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_conj(__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(__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(__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(a, a); return __Pyx_c_prod(a, a); case 3: z = __Pyx_c_prod(a, a); return __Pyx_c_prod(z, a); case 4: z = __Pyx_c_prod(a, a); return __Pyx_c_prod(z, z); } } if (a.imag == 0) { if (a.real == 0) { return a; } r = a.real; theta = 0; } else { r = __Pyx_c_abs(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 static CYTHON_INLINE unsigned char __Pyx_PyInt_AsUnsignedChar(PyObject* x) { const unsigned char neg_one = (unsigned char)-1, const_zero = 0; const int is_unsigned = neg_one > const_zero; if (sizeof(unsigned char) < sizeof(long)) { long val = __Pyx_PyInt_AsLong(x); if (unlikely(val != (long)(unsigned char)val)) { if (!unlikely(val == -1 && PyErr_Occurred())) { PyErr_SetString(PyExc_OverflowError, (is_unsigned && unlikely(val < 0)) ? "can't convert negative value to unsigned char" : "value too large to convert to unsigned char"); } return (unsigned char)-1; } return (unsigned char)val; } return (unsigned char)__Pyx_PyInt_AsUnsignedLong(x); } static CYTHON_INLINE unsigned short __Pyx_PyInt_AsUnsignedShort(PyObject* x) { const unsigned short neg_one = (unsigned short)-1, const_zero = 0; const int is_unsigned = neg_one > const_zero; if (sizeof(unsigned short) < sizeof(long)) { long val = __Pyx_PyInt_AsLong(x); if (unlikely(val != (long)(unsigned short)val)) { if (!unlikely(val == -1 && PyErr_Occurred())) { PyErr_SetString(PyExc_OverflowError, (is_unsigned && unlikely(val < 0)) ? "can't convert negative value to unsigned short" : "value too large to convert to unsigned short"); } return (unsigned short)-1; } return (unsigned short)val; } return (unsigned short)__Pyx_PyInt_AsUnsignedLong(x); } static CYTHON_INLINE unsigned int __Pyx_PyInt_AsUnsignedInt(PyObject* x) { const unsigned int neg_one = (unsigned int)-1, const_zero = 0; const int is_unsigned = neg_one > const_zero; if (sizeof(unsigned int) < sizeof(long)) { long val = __Pyx_PyInt_AsLong(x); if (unlikely(val != (long)(unsigned int)val)) { if (!unlikely(val == -1 && PyErr_Occurred())) { PyErr_SetString(PyExc_OverflowError, (is_unsigned && unlikely(val < 0)) ? "can't convert negative value to unsigned int" : "value too large to convert to unsigned int"); } return (unsigned int)-1; } return (unsigned int)val; } return (unsigned int)__Pyx_PyInt_AsUnsignedLong(x); } static CYTHON_INLINE char __Pyx_PyInt_AsChar(PyObject* x) { const char neg_one = (char)-1, const_zero = 0; const int is_unsigned = neg_one > const_zero; if (sizeof(char) < sizeof(long)) { long val = __Pyx_PyInt_AsLong(x); if (unlikely(val != (long)(char)val)) { if (!unlikely(val == -1 && PyErr_Occurred())) { PyErr_SetString(PyExc_OverflowError, (is_unsigned && unlikely(val < 0)) ? "can't convert negative value to char" : "value too large to convert to char"); } return (char)-1; } return (char)val; } return (char)__Pyx_PyInt_AsLong(x); } static CYTHON_INLINE short __Pyx_PyInt_AsShort(PyObject* x) { const short neg_one = (short)-1, const_zero = 0; const int is_unsigned = neg_one > const_zero; if (sizeof(short) < sizeof(long)) { long val = __Pyx_PyInt_AsLong(x); if (unlikely(val != (long)(short)val)) { if (!unlikely(val == -1 && PyErr_Occurred())) { PyErr_SetString(PyExc_OverflowError, (is_unsigned && unlikely(val < 0)) ? "can't convert negative value to short" : "value too large to convert to short"); } return (short)-1; } return (short)val; } return (short)__Pyx_PyInt_AsLong(x); } static CYTHON_INLINE int __Pyx_PyInt_AsInt(PyObject* x) { const int neg_one = (int)-1, const_zero = 0; const int is_unsigned = neg_one > const_zero; if (sizeof(int) < sizeof(long)) { long val = __Pyx_PyInt_AsLong(x); if (unlikely(val != (long)(int)val)) { if (!unlikely(val == -1 && PyErr_Occurred())) { PyErr_SetString(PyExc_OverflowError, (is_unsigned && unlikely(val < 0)) ? "can't convert negative value to int" : "value too large to convert to int"); } return (int)-1; } return (int)val; } return (int)__Pyx_PyInt_AsLong(x); } static CYTHON_INLINE signed char __Pyx_PyInt_AsSignedChar(PyObject* x) { const signed char neg_one = (signed char)-1, const_zero = 0; const int is_unsigned = neg_one > const_zero; if (sizeof(signed char) < sizeof(long)) { long val = __Pyx_PyInt_AsLong(x); if (unlikely(val != (long)(signed char)val)) { if (!unlikely(val == -1 && PyErr_Occurred())) { PyErr_SetString(PyExc_OverflowError, (is_unsigned && unlikely(val < 0)) ? "can't convert negative value to signed char" : "value too large to convert to signed char"); } return (signed char)-1; } return (signed char)val; } return (signed char)__Pyx_PyInt_AsSignedLong(x); } static CYTHON_INLINE signed short __Pyx_PyInt_AsSignedShort(PyObject* x) { const signed short neg_one = (signed short)-1, const_zero = 0; const int is_unsigned = neg_one > const_zero; if (sizeof(signed short) < sizeof(long)) { long val = __Pyx_PyInt_AsLong(x); if (unlikely(val != (long)(signed short)val)) { if (!unlikely(val == -1 && PyErr_Occurred())) { PyErr_SetString(PyExc_OverflowError, (is_unsigned && unlikely(val < 0)) ? "can't convert negative value to signed short" : "value too large to convert to signed short"); } return (signed short)-1; } return (signed short)val; } return (signed short)__Pyx_PyInt_AsSignedLong(x); } static CYTHON_INLINE signed int __Pyx_PyInt_AsSignedInt(PyObject* x) { const signed int neg_one = (signed int)-1, const_zero = 0; const int is_unsigned = neg_one > const_zero; if (sizeof(signed int) < sizeof(long)) { long val = __Pyx_PyInt_AsLong(x); if (unlikely(val != (long)(signed int)val)) { if (!unlikely(val == -1 && PyErr_Occurred())) { PyErr_SetString(PyExc_OverflowError, (is_unsigned && unlikely(val < 0)) ? "can't convert negative value to signed int" : "value too large to convert to signed int"); } return (signed int)-1; } return (signed int)val; } return (signed int)__Pyx_PyInt_AsSignedLong(x); } static CYTHON_INLINE int __Pyx_PyInt_AsLongDouble(PyObject* x) { const int neg_one = (int)-1, const_zero = 0; const int is_unsigned = neg_one > const_zero; if (sizeof(int) < sizeof(long)) { long val = __Pyx_PyInt_AsLong(x); if (unlikely(val != (long)(int)val)) { if (!unlikely(val == -1 && PyErr_Occurred())) { PyErr_SetString(PyExc_OverflowError, (is_unsigned && unlikely(val < 0)) ? "can't convert negative value to int" : "value too large to convert to int"); } return (int)-1; } return (int)val; } return (int)__Pyx_PyInt_AsLong(x); } #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS #include "longintrepr.h" #endif #endif static CYTHON_INLINE unsigned long __Pyx_PyInt_AsUnsignedLong(PyObject* x) { const unsigned long neg_one = (unsigned long)-1, const_zero = 0; const int is_unsigned = neg_one > const_zero; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_Check(x))) { long val = PyInt_AS_LONG(x); if (is_unsigned && unlikely(val < 0)) { PyErr_SetString(PyExc_OverflowError, "can't convert negative value to unsigned long"); return (unsigned long)-1; } return (unsigned long)val; } else #endif if (likely(PyLong_Check(x))) { if (is_unsigned) { #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS if (sizeof(digit) <= sizeof(unsigned long)) { switch (Py_SIZE(x)) { case 0: return 0; case 1: return (unsigned long) ((PyLongObject*)x)->ob_digit[0]; } } #endif #endif if (unlikely(Py_SIZE(x) < 0)) { PyErr_SetString(PyExc_OverflowError, "can't convert negative value to unsigned long"); return (unsigned long)-1; } return (unsigned long)PyLong_AsUnsignedLong(x); } else { #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS if (sizeof(digit) <= sizeof(unsigned long)) { switch (Py_SIZE(x)) { case 0: return 0; case 1: return +(unsigned long) ((PyLongObject*)x)->ob_digit[0]; case -1: return -(unsigned long) ((PyLongObject*)x)->ob_digit[0]; } } #endif #endif return (unsigned long)PyLong_AsLong(x); } } else { unsigned long val; PyObject *tmp = __Pyx_PyNumber_Int(x); if (!tmp) return (unsigned long)-1; val = __Pyx_PyInt_AsUnsignedLong(tmp); Py_DECREF(tmp); return val; } } #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS #include "longintrepr.h" #endif #endif static CYTHON_INLINE unsigned PY_LONG_LONG __Pyx_PyInt_AsUnsignedLongLong(PyObject* x) { const unsigned PY_LONG_LONG neg_one = (unsigned PY_LONG_LONG)-1, const_zero = 0; const int is_unsigned = neg_one > const_zero; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_Check(x))) { long val = PyInt_AS_LONG(x); if (is_unsigned && unlikely(val < 0)) { PyErr_SetString(PyExc_OverflowError, "can't convert negative value to unsigned PY_LONG_LONG"); return (unsigned PY_LONG_LONG)-1; } return (unsigned PY_LONG_LONG)val; } else #endif if (likely(PyLong_Check(x))) { if (is_unsigned) { #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS if (sizeof(digit) <= sizeof(unsigned PY_LONG_LONG)) { switch (Py_SIZE(x)) { case 0: return 0; case 1: return (unsigned PY_LONG_LONG) ((PyLongObject*)x)->ob_digit[0]; } } #endif #endif if (unlikely(Py_SIZE(x) < 0)) { PyErr_SetString(PyExc_OverflowError, "can't convert negative value to unsigned PY_LONG_LONG"); return (unsigned PY_LONG_LONG)-1; } return (unsigned PY_LONG_LONG)PyLong_AsUnsignedLongLong(x); } else { #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS if (sizeof(digit) <= sizeof(unsigned PY_LONG_LONG)) { switch (Py_SIZE(x)) { case 0: return 0; case 1: return +(unsigned PY_LONG_LONG) ((PyLongObject*)x)->ob_digit[0]; case -1: return -(unsigned PY_LONG_LONG) ((PyLongObject*)x)->ob_digit[0]; } } #endif #endif return (unsigned PY_LONG_LONG)PyLong_AsLongLong(x); } } else { unsigned PY_LONG_LONG val; PyObject *tmp = __Pyx_PyNumber_Int(x); if (!tmp) return (unsigned PY_LONG_LONG)-1; val = __Pyx_PyInt_AsUnsignedLongLong(tmp); Py_DECREF(tmp); return val; } } #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS #include "longintrepr.h" #endif #endif static CYTHON_INLINE long __Pyx_PyInt_AsLong(PyObject* x) { const long neg_one = (long)-1, const_zero = 0; const int is_unsigned = neg_one > const_zero; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_Check(x))) { long val = PyInt_AS_LONG(x); if (is_unsigned && unlikely(val < 0)) { PyErr_SetString(PyExc_OverflowError, "can't convert negative value to long"); return (long)-1; } return (long)val; } else #endif if (likely(PyLong_Check(x))) { if (is_unsigned) { #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS if (sizeof(digit) <= sizeof(long)) { switch (Py_SIZE(x)) { case 0: return 0; case 1: return (long) ((PyLongObject*)x)->ob_digit[0]; } } #endif #endif if (unlikely(Py_SIZE(x) < 0)) { PyErr_SetString(PyExc_OverflowError, "can't convert negative value to long"); return (long)-1; } return (long)PyLong_AsUnsignedLong(x); } else { #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS if (sizeof(digit) <= sizeof(long)) { switch (Py_SIZE(x)) { case 0: return 0; case 1: return +(long) ((PyLongObject*)x)->ob_digit[0]; case -1: return -(long) ((PyLongObject*)x)->ob_digit[0]; } } #endif #endif return (long)PyLong_AsLong(x); } } else { long val; PyObject *tmp = __Pyx_PyNumber_Int(x); if (!tmp) return (long)-1; val = __Pyx_PyInt_AsLong(tmp); Py_DECREF(tmp); return val; } } #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS #include "longintrepr.h" #endif #endif static CYTHON_INLINE PY_LONG_LONG __Pyx_PyInt_AsLongLong(PyObject* x) { const PY_LONG_LONG neg_one = (PY_LONG_LONG)-1, const_zero = 0; const int is_unsigned = neg_one > const_zero; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_Check(x))) { long val = PyInt_AS_LONG(x); if (is_unsigned && unlikely(val < 0)) { PyErr_SetString(PyExc_OverflowError, "can't convert negative value to PY_LONG_LONG"); return (PY_LONG_LONG)-1; } return (PY_LONG_LONG)val; } else #endif if (likely(PyLong_Check(x))) { if (is_unsigned) { #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS if (sizeof(digit) <= sizeof(PY_LONG_LONG)) { switch (Py_SIZE(x)) { case 0: return 0; case 1: return (PY_LONG_LONG) ((PyLongObject*)x)->ob_digit[0]; } } #endif #endif if (unlikely(Py_SIZE(x) < 0)) { PyErr_SetString(PyExc_OverflowError, "can't convert negative value to PY_LONG_LONG"); return (PY_LONG_LONG)-1; } return (PY_LONG_LONG)PyLong_AsUnsignedLongLong(x); } else { #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS if (sizeof(digit) <= sizeof(PY_LONG_LONG)) { switch (Py_SIZE(x)) { case 0: return 0; case 1: return +(PY_LONG_LONG) ((PyLongObject*)x)->ob_digit[0]; case -1: return -(PY_LONG_LONG) ((PyLongObject*)x)->ob_digit[0]; } } #endif #endif return (PY_LONG_LONG)PyLong_AsLongLong(x); } } else { PY_LONG_LONG val; PyObject *tmp = __Pyx_PyNumber_Int(x); if (!tmp) return (PY_LONG_LONG)-1; val = __Pyx_PyInt_AsLongLong(tmp); Py_DECREF(tmp); return val; } } #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS #include "longintrepr.h" #endif #endif static CYTHON_INLINE signed long __Pyx_PyInt_AsSignedLong(PyObject* x) { const signed long neg_one = (signed long)-1, const_zero = 0; const int is_unsigned = neg_one > const_zero; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_Check(x))) { long val = PyInt_AS_LONG(x); if (is_unsigned && unlikely(val < 0)) { PyErr_SetString(PyExc_OverflowError, "can't convert negative value to signed long"); return (signed long)-1; } return (signed long)val; } else #endif if (likely(PyLong_Check(x))) { if (is_unsigned) { #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS if (sizeof(digit) <= sizeof(signed long)) { switch (Py_SIZE(x)) { case 0: return 0; case 1: return (signed long) ((PyLongObject*)x)->ob_digit[0]; } } #endif #endif if (unlikely(Py_SIZE(x) < 0)) { PyErr_SetString(PyExc_OverflowError, "can't convert negative value to signed long"); return (signed long)-1; } return (signed long)PyLong_AsUnsignedLong(x); } else { #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS if (sizeof(digit) <= sizeof(signed long)) { switch (Py_SIZE(x)) { case 0: return 0; case 1: return +(signed long) ((PyLongObject*)x)->ob_digit[0]; case -1: return -(signed long) ((PyLongObject*)x)->ob_digit[0]; } } #endif #endif return (signed long)PyLong_AsLong(x); } } else { signed long val; PyObject *tmp = __Pyx_PyNumber_Int(x); if (!tmp) return (signed long)-1; val = __Pyx_PyInt_AsSignedLong(tmp); Py_DECREF(tmp); return val; } } #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS #include "longintrepr.h" #endif #endif static CYTHON_INLINE signed PY_LONG_LONG __Pyx_PyInt_AsSignedLongLong(PyObject* x) { const signed PY_LONG_LONG neg_one = (signed PY_LONG_LONG)-1, const_zero = 0; const int is_unsigned = neg_one > const_zero; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_Check(x))) { long val = PyInt_AS_LONG(x); if (is_unsigned && unlikely(val < 0)) { PyErr_SetString(PyExc_OverflowError, "can't convert negative value to signed PY_LONG_LONG"); return (signed PY_LONG_LONG)-1; } return (signed PY_LONG_LONG)val; } else #endif if (likely(PyLong_Check(x))) { if (is_unsigned) { #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS if (sizeof(digit) <= sizeof(signed PY_LONG_LONG)) { switch (Py_SIZE(x)) { case 0: return 0; case 1: return (signed PY_LONG_LONG) ((PyLongObject*)x)->ob_digit[0]; } } #endif #endif if (unlikely(Py_SIZE(x) < 0)) { PyErr_SetString(PyExc_OverflowError, "can't convert negative value to signed PY_LONG_LONG"); return (signed PY_LONG_LONG)-1; } return (signed PY_LONG_LONG)PyLong_AsUnsignedLongLong(x); } else { #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS if (sizeof(digit) <= sizeof(signed PY_LONG_LONG)) { switch (Py_SIZE(x)) { case 0: return 0; case 1: return +(signed PY_LONG_LONG) ((PyLongObject*)x)->ob_digit[0]; case -1: return -(signed PY_LONG_LONG) ((PyLongObject*)x)->ob_digit[0]; } } #endif #endif return (signed PY_LONG_LONG)PyLong_AsLongLong(x); } } else { signed PY_LONG_LONG val; PyObject *tmp = __Pyx_PyNumber_Int(x); if (!tmp) return (signed PY_LONG_LONG)-1; val = __Pyx_PyInt_AsSignedLongLong(tmp); Py_DECREF(tmp); return val; } } 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); #if PY_VERSION_HEX < 0x02050000 return PyErr_Warn(NULL, message); #else return PyErr_WarnEx(NULL, message, 1); #endif } return 0; } #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 #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, "%s.%s 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", module_name, class_name); #if PY_VERSION_HEX < 0x02050000 if (PyErr_Warn(NULL, warning) < 0) goto bad; #else if (PyErr_WarnEx(NULL, warning, 0) < 0) goto bad; #endif } else if ((size_t)basicsize != size) { PyErr_Format(PyExc_ValueError, "%s.%s has the wrong size, try recompiling", module_name, class_name); goto bad; } return (PyTypeObject *)result; bad: Py_XDECREF(py_module); Py_XDECREF(result); return NULL; } #endif 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) / 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, 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); } #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, /*int argcount,*/ 0, /*int kwonlyargcount,*/ 0, /*int nlocals,*/ 0, /*int stacksize,*/ 0, /*int flags,*/ __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, /*int firstlineno,*/ __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; PyObject *py_globals = 0; PyFrameObject *py_frame = 0; py_code = __pyx_find_code_object(c_line ? c_line : py_line); if (!py_code) { py_code = __Pyx_CreateCodeObjectForTraceback( funcname, c_line, py_line, filename); if (!py_code) goto bad; __pyx_insert_code_object(c_line ? c_line : py_line, py_code); } py_globals = PyModule_GetDict(__pyx_m); if (!py_globals) goto bad; py_frame = PyFrame_New( PyThreadState_GET(), /*PyThreadState *tstate,*/ py_code, /*PyCodeObject *code,*/ py_globals, /*PyObject *globals,*/ 0 /*PyObject *locals*/ ); if (!py_frame) goto bad; py_frame->f_lineno = py_line; PyTraceBack_Here(py_frame); bad: Py_XDECREF(py_code); Py_XDECREF(py_frame); } 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 /* Python 3+ has unicode identifiers */ if (t->is_unicode | t->is_str) { if (t->intern) { *t->p = PyUnicode_InternFromString(t->s); } else if (t->encoding) { *t->p = PyUnicode_Decode(t->s, t->n - 1, t->encoding, NULL); } else { *t->p = PyUnicode_FromStringAndSize(t->s, t->n - 1); } } else { *t->p = PyBytes_FromStringAndSize(t->s, t->n - 1); } #endif if (!*t->p) return -1; ++t; } return 0; } static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(char* c_str) { return __Pyx_PyUnicode_FromStringAndSize(c_str, strlen(c_str)); } static CYTHON_INLINE char* __Pyx_PyObject_AsString(PyObject* o) { Py_ssize_t ignore; return __Pyx_PyObject_AsStringAndSize(o, &ignore); } static CYTHON_INLINE char* __Pyx_PyObject_AsStringAndSize(PyObject* o, Py_ssize_t *length) { #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT if ( #if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII __Pyx_sys_getdefaultencoding_not_ascii && #endif PyUnicode_Check(o)) { #if PY_VERSION_HEX < 0x03030000 char* defenc_c; PyObject* defenc = _PyUnicode_AsDefaultEncodedString(o, NULL); if (!defenc) return NULL; defenc_c = PyBytes_AS_STRING(defenc); #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII { char* end = defenc_c + PyBytes_GET_SIZE(defenc); char* c; for (c = defenc_c; c < end; c++) { if ((unsigned char) (*c) >= 128) { PyUnicode_AsASCIIString(o); return NULL; } } } #endif /*__PYX_DEFAULT_STRING_ENCODING_IS_ASCII*/ *length = PyBytes_GET_SIZE(defenc); return defenc_c; #else /* PY_VERSION_HEX < 0x03030000 */ if (PyUnicode_READY(o) == -1) return NULL; #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII if (PyUnicode_IS_ASCII(o)) { *length = PyUnicode_GET_DATA_SIZE(o); return PyUnicode_AsUTF8(o); } else { PyUnicode_AsASCIIString(o); return NULL; } #else /* __PYX_DEFAULT_STRING_ENCODING_IS_ASCII */ return PyUnicode_AsUTF8AndSize(o, length); #endif /* __PYX_DEFAULT_STRING_ENCODING_IS_ASCII */ #endif /* PY_VERSION_HEX < 0x03030000 */ } else #endif /* __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT */ { char* result; int r = PyBytes_AsStringAndSize(o, &result, length); if (r < 0) { return NULL; } else { return result; } } } static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject* x) { int is_true = x == Py_True; if (is_true | (x == Py_False) | (x == Py_None)) return is_true; else return PyObject_IsTrue(x); } static CYTHON_INLINE PyObject* __Pyx_PyNumber_Int(PyObject* x) { PyNumberMethods *m; const char *name = NULL; PyObject *res = NULL; #if PY_MAJOR_VERSION < 3 if (PyInt_Check(x) || PyLong_Check(x)) #else if (PyLong_Check(x)) #endif return Py_INCREF(x), x; m = Py_TYPE(x)->tp_as_number; #if PY_MAJOR_VERSION < 3 if (m && m->nb_int) { name = "int"; res = PyNumber_Int(x); } else if (m && m->nb_long) { name = "long"; res = PyNumber_Long(x); } #else if (m && m->nb_int) { name = "int"; res = PyNumber_Long(x); } #endif if (res) { #if PY_MAJOR_VERSION < 3 if (!PyInt_Check(res) && !PyLong_Check(res)) { #else if (!PyLong_Check(res)) { #endif PyErr_Format(PyExc_TypeError, "__%s__ returned non-%s (type %.200s)", name, name, Py_TYPE(res)->tp_name); Py_DECREF(res); return NULL; } } else if (!PyErr_Occurred()) { PyErr_SetString(PyExc_TypeError, "an integer is required"); } return res; } static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) { Py_ssize_t ival; PyObject* x = 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) { #if PY_VERSION_HEX < 0x02050000 if (ival <= LONG_MAX) return PyInt_FromLong((long)ival); else { unsigned char *bytes = (unsigned char *) &ival; int one = 1; int little = (int)*(unsigned char*)&one; return _PyLong_FromByteArray(bytes, sizeof(size_t), little, 0); } #else return PyInt_FromSize_t(ival); #endif } static CYTHON_INLINE size_t __Pyx_PyInt_AsSize_t(PyObject* x) { unsigned PY_LONG_LONG val = __Pyx_PyInt_AsUnsignedLongLong(x); if (unlikely(val != (unsigned PY_LONG_LONG)(size_t)val)) { if ((val != (unsigned PY_LONG_LONG)-1) || !PyErr_Occurred()) PyErr_SetString(PyExc_OverflowError, "value too large to convert to size_t"); return (size_t)-1; } return (size_t)val; } #endif /* Py_PYTHON_H */ debian/cythonized-files3/pandas/parser.c0000664000000000000000000511564712275603610015466 0ustar /* Generated by Cython 0.19.2 on Mon Feb 3 08:42:29 2014 */ #define PY_SSIZE_T_CLEAN #ifndef CYTHON_USE_PYLONG_INTERNALS #ifdef PYLONG_BITS_IN_DIGIT #define CYTHON_USE_PYLONG_INTERNALS 0 #else #include "pyconfig.h" #ifdef PYLONG_BITS_IN_DIGIT #define CYTHON_USE_PYLONG_INTERNALS 1 #else #define CYTHON_USE_PYLONG_INTERNALS 0 #endif #endif #endif #include "Python.h" #ifndef Py_PYTHON_H #error Python headers needed to compile C extensions, please install development version of Python. #elif PY_VERSION_HEX < 0x02040000 #error Cython requires Python 2.4+. #else #include /* For offsetof */ #ifndef offsetof #define offsetof(type, member) ( (size_t) & ((type*)0) -> member ) #endif #if !defined(WIN32) && !defined(MS_WINDOWS) #ifndef __stdcall #define __stdcall #endif #ifndef __cdecl #define __cdecl #endif #ifndef __fastcall #define __fastcall #endif #endif #ifndef DL_IMPORT #define DL_IMPORT(t) t #endif #ifndef DL_EXPORT #define DL_EXPORT(t) t #endif #ifndef PY_LONG_LONG #define PY_LONG_LONG LONG_LONG #endif #ifndef Py_HUGE_VAL #define Py_HUGE_VAL HUGE_VAL #endif #ifdef PYPY_VERSION #define CYTHON_COMPILING_IN_PYPY 1 #define CYTHON_COMPILING_IN_CPYTHON 0 #else #define CYTHON_COMPILING_IN_PYPY 0 #define CYTHON_COMPILING_IN_CPYTHON 1 #endif #if PY_VERSION_HEX < 0x02050000 typedef int Py_ssize_t; #define PY_SSIZE_T_MAX INT_MAX #define PY_SSIZE_T_MIN INT_MIN #define PY_FORMAT_SIZE_T "" #define CYTHON_FORMAT_SSIZE_T "" #define PyInt_FromSsize_t(z) PyInt_FromLong(z) #define PyInt_AsSsize_t(o) __Pyx_PyInt_AsInt(o) #define PyNumber_Index(o) ((PyNumber_Check(o) && !PyFloat_Check(o)) ? PyNumber_Int(o) : \ (PyErr_Format(PyExc_TypeError, \ "expected index value, got %.200s", Py_TYPE(o)->tp_name), \ (PyObject*)0)) #define __Pyx_PyIndex_Check(o) (PyNumber_Check(o) && !PyFloat_Check(o) && \ !PyComplex_Check(o)) #define PyIndex_Check __Pyx_PyIndex_Check #define PyErr_WarnEx(category, message, stacklevel) PyErr_Warn(category, message) #define __PYX_BUILD_PY_SSIZE_T "i" #else #define __PYX_BUILD_PY_SSIZE_T "n" #define CYTHON_FORMAT_SSIZE_T "z" #define __Pyx_PyIndex_Check PyIndex_Check #endif #if PY_VERSION_HEX < 0x02060000 #define Py_REFCNT(ob) (((PyObject*)(ob))->ob_refcnt) #define Py_TYPE(ob) (((PyObject*)(ob))->ob_type) #define Py_SIZE(ob) (((PyVarObject*)(ob))->ob_size) #define PyVarObject_HEAD_INIT(type, size) \ PyObject_HEAD_INIT(type) size, #define PyType_Modified(t) typedef struct { void *buf; PyObject *obj; Py_ssize_t len; Py_ssize_t itemsize; int readonly; int ndim; char *format; Py_ssize_t *shape; Py_ssize_t *strides; Py_ssize_t *suboffsets; void *internal; } Py_buffer; #define PyBUF_SIMPLE 0 #define PyBUF_WRITABLE 0x0001 #define PyBUF_FORMAT 0x0004 #define PyBUF_ND 0x0008 #define PyBUF_STRIDES (0x0010 | PyBUF_ND) #define PyBUF_C_CONTIGUOUS (0x0020 | PyBUF_STRIDES) #define PyBUF_F_CONTIGUOUS (0x0040 | PyBUF_STRIDES) #define PyBUF_ANY_CONTIGUOUS (0x0080 | PyBUF_STRIDES) #define PyBUF_INDIRECT (0x0100 | PyBUF_STRIDES) #define PyBUF_RECORDS (PyBUF_STRIDES | PyBUF_FORMAT | PyBUF_WRITABLE) #define PyBUF_FULL (PyBUF_INDIRECT | PyBUF_FORMAT | PyBUF_WRITABLE) typedef int (*getbufferproc)(PyObject *, Py_buffer *, int); typedef void (*releasebufferproc)(PyObject *, Py_buffer *); #endif #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, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) #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) #endif #if PY_MAJOR_VERSION < 3 && PY_MINOR_VERSION < 6 #define PyUnicode_FromString(s) PyUnicode_Decode(s, strlen(s), "UTF-8", "strict") #endif #if PY_MAJOR_VERSION >= 3 #define Py_TPFLAGS_CHECKTYPES 0 #define Py_TPFLAGS_HAVE_INDEX 0 #endif #if (PY_VERSION_HEX < 0x02060000) || (PY_MAJOR_VERSION >= 3) #define Py_TPFLAGS_HAVE_NEWBUFFER 0 #endif #if PY_VERSION_HEX < 0x02060000 #define Py_TPFLAGS_HAVE_VERSION_TAG 0 #endif #if PY_VERSION_HEX > 0x03030000 && defined(PyUnicode_KIND) #define CYTHON_PEP393_ENABLED 1 #define __Pyx_PyUnicode_READY(op) (likely(PyUnicode_IS_READY(op)) ? \ 0 : _PyUnicode_Ready((PyObject *)(op))) #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_LENGTH(u) #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i) #define __Pyx_PyUnicode_READ(k, d, i) PyUnicode_READ(k, d, i) #else #define CYTHON_PEP393_ENABLED 0 #define __Pyx_PyUnicode_READY(op) (0) #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_SIZE(u) #define __Pyx_PyUnicode_READ_CHAR(u, i) ((Py_UCS4)(PyUnicode_AS_UNICODE(u)[i])) #define __Pyx_PyUnicode_READ(k, d, i) ((k=k), (Py_UCS4)(((Py_UNICODE*)d)[i])) #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_VERSION_HEX < 0x02060000 #define PyBytesObject PyStringObject #define PyBytes_Type PyString_Type #define PyBytes_Check PyString_Check #define PyBytes_CheckExact PyString_CheckExact #define PyBytes_FromString PyString_FromString #define PyBytes_FromStringAndSize PyString_FromStringAndSize #define PyBytes_FromFormat PyString_FromFormat #define PyBytes_DecodeEscape PyString_DecodeEscape #define PyBytes_AsString PyString_AsString #define PyBytes_AsStringAndSize PyString_AsStringAndSize #define PyBytes_Size PyString_Size #define PyBytes_AS_STRING PyString_AS_STRING #define PyBytes_GET_SIZE PyString_GET_SIZE #define PyBytes_Repr PyString_Repr #define PyBytes_Concat PyString_Concat #define PyBytes_ConcatAndDel PyString_ConcatAndDel #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_CheckExact(obj) || PyUnicode_CheckExact(obj) || \ PyString_Check(obj) || PyUnicode_Check(obj)) #define __Pyx_PyBaseString_CheckExact(obj) (Py_TYPE(obj) == &PyBaseString_Type) #endif #if PY_VERSION_HEX < 0x02060000 #define PySet_Check(obj) PyObject_TypeCheck(obj, &PySet_Type) #define PyFrozenSet_Check(obj) PyObject_TypeCheck(obj, &PyFrozenSet_Type) #endif #ifndef PySet_CheckExact #define PySet_CheckExact(obj) (Py_TYPE(obj) == &PySet_Type) #endif #define __Pyx_TypeCheck(obj, type) PyObject_TypeCheck(obj, (PyTypeObject *)type) #if PY_MAJOR_VERSION >= 3 #define PyIntObject PyLongObject #define PyInt_Type PyLong_Type #define PyInt_Check(op) PyLong_Check(op) #define PyInt_CheckExact(op) PyLong_CheckExact(op) #define PyInt_FromString PyLong_FromString #define PyInt_FromUnicode PyLong_FromUnicode #define PyInt_FromLong PyLong_FromLong #define PyInt_FromSize_t PyLong_FromSize_t #define PyInt_FromSsize_t PyLong_FromSsize_t #define PyInt_AsLong PyLong_AsLong #define PyInt_AS_LONG PyLong_AS_LONG #define PyInt_AsSsize_t PyLong_AsSsize_t #define PyInt_AsUnsignedLongMask PyLong_AsUnsignedLongMask #define PyInt_AsUnsignedLongLongMask PyLong_AsUnsignedLongLongMask #endif #if PY_MAJOR_VERSION >= 3 #define PyBoolObject PyLongObject #endif #if PY_VERSION_HEX < 0x03020000 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) || (PY_VERSION_HEX >= 0x03010300) #define __Pyx_PySequence_GetSlice(obj, a, b) PySequence_GetSlice(obj, a, b) #define __Pyx_PySequence_SetSlice(obj, a, b, value) PySequence_SetSlice(obj, a, b, value) #define __Pyx_PySequence_DelSlice(obj, a, b) PySequence_DelSlice(obj, a, b) #else #define __Pyx_PySequence_GetSlice(obj, a, b) (unlikely(!(obj)) ? \ (PyErr_SetString(PyExc_SystemError, "null argument to internal routine"), (PyObject*)0) : \ (likely((obj)->ob_type->tp_as_mapping) ? (PySequence_GetSlice(obj, a, b)) : \ (PyErr_Format(PyExc_TypeError, "'%.200s' object is unsliceable", (obj)->ob_type->tp_name), (PyObject*)0))) #define __Pyx_PySequence_SetSlice(obj, a, b, value) (unlikely(!(obj)) ? \ (PyErr_SetString(PyExc_SystemError, "null argument to internal routine"), -1) : \ (likely((obj)->ob_type->tp_as_mapping) ? (PySequence_SetSlice(obj, a, b, value)) : \ (PyErr_Format(PyExc_TypeError, "'%.200s' object doesn't support slice assignment", (obj)->ob_type->tp_name), -1))) #define __Pyx_PySequence_DelSlice(obj, a, b) (unlikely(!(obj)) ? \ (PyErr_SetString(PyExc_SystemError, "null argument to internal routine"), -1) : \ (likely((obj)->ob_type->tp_as_mapping) ? (PySequence_DelSlice(obj, a, b)) : \ (PyErr_Format(PyExc_TypeError, "'%.200s' object doesn't support slice deletion", (obj)->ob_type->tp_name), -1))) #endif #if PY_MAJOR_VERSION >= 3 #define PyMethod_New(func, self, klass) ((self) ? PyMethod_New(func, self) : PyInstanceMethod_New(func)) #endif #if PY_VERSION_HEX < 0x02050000 #define __Pyx_GetAttrString(o,n) PyObject_GetAttrString((o),((char *)(n))) #define __Pyx_SetAttrString(o,n,a) PyObject_SetAttrString((o),((char *)(n)),(a)) #define __Pyx_DelAttrString(o,n) PyObject_DelAttrString((o),((char *)(n))) #else #define __Pyx_GetAttrString(o,n) PyObject_GetAttrString((o),(n)) #define __Pyx_SetAttrString(o,n,a) PyObject_SetAttrString((o),(n),(a)) #define __Pyx_DelAttrString(o,n) PyObject_DelAttrString((o),(n)) #endif #if PY_VERSION_HEX < 0x02050000 #define __Pyx_NAMESTR(n) ((char *)(n)) #define __Pyx_DOCSTR(n) ((char *)(n)) #else #define __Pyx_NAMESTR(n) (n) #define __Pyx_DOCSTR(n) (n) #endif #ifndef CYTHON_INLINE #if defined(__GNUC__) #define CYTHON_INLINE __inline__ #elif defined(_MSC_VER) #define CYTHON_INLINE __inline #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L #define CYTHON_INLINE inline #else #define CYTHON_INLINE #endif #endif #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 #ifdef NAN #define __PYX_NAN() ((float) NAN) #else static CYTHON_INLINE float __PYX_NAN() { /* Initialize NaN. The sign is irrelevant, an exponent with all bits 1 and a nonzero mantissa means NaN. If the first bit in the mantissa is 1, it is a quiet NaN. */ float value; memset(&value, 0xFF, sizeof(value)); return value; } #endif #if PY_MAJOR_VERSION >= 3 #define __Pyx_PyNumber_Divide(x,y) PyNumber_TrueDivide(x,y) #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceTrueDivide(x,y) #else #define __Pyx_PyNumber_Divide(x,y) PyNumber_Divide(x,y) #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceDivide(x,y) #endif #ifndef __PYX_EXTERN_C #ifdef __cplusplus #define __PYX_EXTERN_C extern "C" #else #define __PYX_EXTERN_C extern #endif #endif #if defined(WIN32) || defined(MS_WINDOWS) #define _USE_MATH_DEFINES #endif #include #define __PYX_HAVE__pandas__parser #define __PYX_HAVE_API__pandas__parser #include "string.h" #include "stdio.h" #include "stdlib.h" #include "pythread.h" #include "numpy/arrayobject.h" #include "numpy/ufuncobject.h" #include "numpy_helper.h" #include "khash_python.h" #include "headers/stdint.h" #include "headers/portable.h" #include "parser/tokenizer.h" #include "parser/io.h" #ifdef _OPENMP #include #endif /* _OPENMP */ #ifdef PYREX_WITHOUT_ASSERTIONS #define CYTHON_WITHOUT_ASSERTIONS #endif #ifndef CYTHON_UNUSED # if defined(__GNUC__) # if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)) # define CYTHON_UNUSED __attribute__ ((__unused__)) # else # define CYTHON_UNUSED # endif # elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER)) # define CYTHON_UNUSED __attribute__ ((__unused__)) # else # define CYTHON_UNUSED # endif #endif typedef struct {PyObject **p; char *s; const Py_ssize_t n; const char* encoding; const char is_unicode; const char is_str; const char intern; } __Pyx_StringTabEntry; /*proto*/ #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 static CYTHON_INLINE char* __Pyx_PyObject_AsString(PyObject*); static CYTHON_INLINE char* __Pyx_PyObject_AsStringAndSize(PyObject*, Py_ssize_t* length); #define __Pyx_PyBytes_FromString PyBytes_FromString #define __Pyx_PyBytes_FromStringAndSize PyBytes_FromStringAndSize static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(char*); #if PY_MAJOR_VERSION < 3 #define __Pyx_PyStr_FromString __Pyx_PyBytes_FromString #define __Pyx_PyStr_FromStringAndSize __Pyx_PyBytes_FromStringAndSize #else #define __Pyx_PyStr_FromString __Pyx_PyUnicode_FromString #define __Pyx_PyStr_FromStringAndSize __Pyx_PyUnicode_FromStringAndSize #endif #define __Pyx_PyObject_AsUString(s) ((unsigned char*) __Pyx_PyObject_AsString(s)) #define __Pyx_PyObject_FromUString(s) __Pyx_PyObject_FromString((char*)s) #define __Pyx_PyBytes_FromUString(s) __Pyx_PyBytes_FromString((char*)s) #define __Pyx_PyStr_FromUString(s) __Pyx_PyStr_FromString((char*)s) #define __Pyx_PyUnicode_FromUString(s) __Pyx_PyUnicode_FromString((char*)s) #if PY_MAJOR_VERSION < 3 static CYTHON_INLINE size_t __Pyx_Py_UNICODE_strlen(const Py_UNICODE *u) { const Py_UNICODE *u_end = u; while (*u_end++) ; return u_end - u - 1; } #else #define __Pyx_Py_UNICODE_strlen Py_UNICODE_strlen #endif #define __Pyx_PyUnicode_FromUnicode(u) PyUnicode_FromUnicode(u, __Pyx_Py_UNICODE_strlen(u)) #define __Pyx_PyUnicode_FromUnicodeAndLength PyUnicode_FromUnicode #define __Pyx_PyUnicode_AsUnicode PyUnicode_AsUnicode #define __Pyx_Owned_Py_None(b) (Py_INCREF(Py_None), Py_None) #define __Pyx_PyBool_FromLong(b) ((b) ? (Py_INCREF(Py_True), Py_True) : (Py_INCREF(Py_False), Py_False)) static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*); static CYTHON_INLINE PyObject* __Pyx_PyNumber_Int(PyObject* x); static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*); static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t); static CYTHON_INLINE size_t __Pyx_PyInt_AsSize_t(PyObject*); #if CYTHON_COMPILING_IN_CPYTHON #define __pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x)) #else #define __pyx_PyFloat_AsDouble(x) PyFloat_AsDouble(x) #endif #define __pyx_PyFloat_AsFloat(x) ((float) __pyx_PyFloat_AsDouble(x)) #if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII static int __Pyx_sys_getdefaultencoding_not_ascii; static int __Pyx_init_sys_getdefaultencoding_params() { PyObject* sys = NULL; PyObject* default_encoding = NULL; PyObject* ascii_chars_u = NULL; PyObject* ascii_chars_b = NULL; sys = PyImport_ImportModule("sys"); if (sys == NULL) goto bad; default_encoding = PyObject_CallMethod(sys, (char*) (const char*) "getdefaultencoding", NULL); if (default_encoding == NULL) goto bad; if (strcmp(PyBytes_AsString(default_encoding), "ascii") == 0) { __Pyx_sys_getdefaultencoding_not_ascii = 0; } else { const char* default_encoding_c = PyBytes_AS_STRING(default_encoding); 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 == NULL) goto bad; ascii_chars_b = PyUnicode_AsEncodedString(ascii_chars_u, default_encoding_c, NULL); if (ascii_chars_b == NULL || strncmp(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 '%s' is not a superset of ascii.", default_encoding_c); goto bad; } } Py_XDECREF(sys); Py_XDECREF(default_encoding); Py_XDECREF(ascii_chars_u); Py_XDECREF(ascii_chars_b); return 0; bad: Py_XDECREF(sys); 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() { PyObject* sys = NULL; PyObject* default_encoding = NULL; char* default_encoding_c; sys = PyImport_ImportModule("sys"); if (sys == NULL) goto bad; default_encoding = PyObject_CallMethod(sys, (char*) (const char*) "getdefaultencoding", NULL); if (default_encoding == NULL) goto bad; default_encoding_c = PyBytes_AS_STRING(default_encoding); __PYX_DEFAULT_STRING_ENCODING = (char*) malloc(strlen(default_encoding_c)); strcpy(__PYX_DEFAULT_STRING_ENCODING, default_encoding_c); Py_DECREF(sys); Py_DECREF(default_encoding); return 0; bad: Py_XDECREF(sys); Py_XDECREF(default_encoding); return -1; } #endif #endif #ifdef __GNUC__ /* Test for GCC > 2.95 */ #if __GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95)) #define likely(x) __builtin_expect(!!(x), 1) #define unlikely(x) __builtin_expect(!!(x), 0) #else /* __GNUC__ > 2 ... */ #define likely(x) (x) #define unlikely(x) (x) #endif /* __GNUC__ > 2 ... */ #else /* __GNUC__ */ #define likely(x) (x) #define unlikely(x) (x) #endif /* __GNUC__ */ static PyObject *__pyx_m; static PyObject *__pyx_d; static PyObject *__pyx_b; static PyObject *__pyx_empty_tuple; static PyObject *__pyx_empty_bytes; static int __pyx_lineno; static int __pyx_clineno = 0; static const char * __pyx_cfilenm= __FILE__; static const char *__pyx_filename; #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[] = { "parser.pyx", "util.pxd", "numpy.pxd", "type.pxd", "bool.pxd", "complex.pxd", }; #define IS_UNSIGNED(type) (((type) -1) > 0) struct __Pyx_StructField_; #define __PYX_BUF_FLAGS_PACKED_STRUCT (1 << 0) typedef struct { const char* name; /* for error messages only */ struct __Pyx_StructField_* fields; size_t size; /* sizeof(type) */ size_t arraysize[8]; /* length of array in each dimension */ int ndim; char typegroup; /* _R_eal, _C_omplex, Signed _I_nt, _U_nsigned int, _S_truct, _P_ointer, _O_bject, c_H_ar */ 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; /* "numpy.pxd":726 * # 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; /* "numpy.pxd":727 * * 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; /* "numpy.pxd":728 * 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; /* "numpy.pxd":729 * 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; /* "numpy.pxd":733 * #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; /* "numpy.pxd":734 * * 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; /* "numpy.pxd":735 * 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; /* "numpy.pxd":736 * 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; /* "numpy.pxd":740 * #ctypedef npy_uint128 uint128_t * * ctypedef npy_float16 float16_t # <<<<<<<<<<<<<< * ctypedef npy_float32 float32_t * ctypedef npy_float64 float64_t */ typedef npy_float16 __pyx_t_5numpy_float16_t; /* "numpy.pxd":741 * * ctypedef npy_float16 float16_t * ctypedef npy_float32 float32_t # <<<<<<<<<<<<<< * ctypedef npy_float64 float64_t * #ctypedef npy_float80 float80_t */ typedef npy_float32 __pyx_t_5numpy_float32_t; /* "numpy.pxd":742 * ctypedef npy_float16 float16_t * 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; /* "numpy.pxd":751 * # 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; /* "numpy.pxd":752 * # 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; /* "numpy.pxd":753 * 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; /* "numpy.pxd":755 * 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; /* "numpy.pxd":756 * * ctypedef npy_ulong uint_t * ctypedef npy_ulonglong ulong_t # <<<<<<<<<<<<<< * ctypedef npy_ulonglong ulonglong_t * */ typedef npy_ulonglong __pyx_t_5numpy_ulong_t; /* "numpy.pxd":757 * 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; /* "numpy.pxd":759 * ctypedef npy_ulonglong ulonglong_t * * ctypedef npy_intp intp_t # <<<<<<<<<<<<<< * ctypedef npy_uintp uintp_t * */ typedef npy_intp __pyx_t_5numpy_intp_t; /* "numpy.pxd":760 * * ctypedef npy_intp intp_t * ctypedef npy_uintp uintp_t # <<<<<<<<<<<<<< * * ctypedef npy_double float_t */ typedef npy_uintp __pyx_t_5numpy_uintp_t; /* "numpy.pxd":762 * 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; /* "numpy.pxd":763 * * ctypedef npy_double float_t * ctypedef npy_double double_t # <<<<<<<<<<<<<< * ctypedef npy_longdouble longdouble_t * */ typedef npy_double __pyx_t_5numpy_double_t; /* "numpy.pxd":764 * 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; #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 #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 /*--- Type declarations ---*/ struct __pyx_obj_6pandas_6parser_TextReader; /* "numpy.pxd":766 * 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; /* "numpy.pxd":767 * * ctypedef npy_cfloat cfloat_t * ctypedef npy_cdouble cdouble_t # <<<<<<<<<<<<<< * ctypedef npy_clongdouble clongdouble_t * */ typedef npy_cdouble __pyx_t_5numpy_cdouble_t; /* "numpy.pxd":768 * 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; /* "numpy.pxd":770 * 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/parser.pyx":230 * * * cdef class TextReader: # <<<<<<<<<<<<<< * ''' * */ struct __pyx_obj_6pandas_6parser_TextReader { PyObject_HEAD struct __pyx_vtabstruct_6pandas_6parser_TextReader *__pyx_vtab; parser_t *parser; PyObject *file_handle; PyObject *na_fvalues; int na_filter; int verbose; int has_usecols; int has_mi_columns; int parser_start; PyObject *clocks; char *c_encoding; int leading_cols; int table_width; int skip_footer; int buffer_lines; PyObject *allow_leading_cols; PyObject *delimiter; PyObject *converters; PyObject *delim_whitespace; PyObject *na_values; PyObject *true_values; PyObject *false_values; PyObject *memory_map; PyObject *as_recarray; PyObject *header; PyObject *orig_header; PyObject *names; PyObject *header_start; PyObject *header_end; PyObject *index_col; PyObject *low_memory; PyObject *skiprows; PyObject *compact_ints; PyObject *use_unsigned; PyObject *dtype; PyObject *encoding; PyObject *compression; PyObject *mangle_dupe_cols; PyObject *tupleize_cols; PyObject *noconvert; PyObject *usecols; }; struct __pyx_vtabstruct_6pandas_6parser_TextReader { PyObject *(*_make_skiprow_set)(struct __pyx_obj_6pandas_6parser_TextReader *); PyObject *(*_setup_parser_source)(struct __pyx_obj_6pandas_6parser_TextReader *, PyObject *); PyObject *(*_get_header)(struct __pyx_obj_6pandas_6parser_TextReader *); PyObject *(*_implicit_index_count)(struct __pyx_obj_6pandas_6parser_TextReader *); PyObject *(*_read_low_memory)(struct __pyx_obj_6pandas_6parser_TextReader *, PyObject *); PyObject *(*_tokenize_rows)(struct __pyx_obj_6pandas_6parser_TextReader *, size_t); PyObject *(*_read_rows)(struct __pyx_obj_6pandas_6parser_TextReader *, PyObject *, int); PyObject *(*_start_clock)(struct __pyx_obj_6pandas_6parser_TextReader *); PyObject *(*_end_clock)(struct __pyx_obj_6pandas_6parser_TextReader *, PyObject *); PyObject *(*_convert_tokens)(struct __pyx_obj_6pandas_6parser_TextReader *, Py_ssize_t, int, int, PyObject *, int, kh_str_t *, PyObject *); PyObject *(*_convert_with_dtype)(struct __pyx_obj_6pandas_6parser_TextReader *, PyObject *, Py_ssize_t, int, int, int, int, kh_str_t *, PyObject *); PyObject *(*_string_convert)(struct __pyx_obj_6pandas_6parser_TextReader *, Py_ssize_t, int, int, int, kh_str_t *); PyObject *(*_get_na_list)(struct __pyx_obj_6pandas_6parser_TextReader *, PyObject *, PyObject *); PyObject *(*_free_na_set)(struct __pyx_obj_6pandas_6parser_TextReader *, kh_str_t *); PyObject *(*_get_column_name)(struct __pyx_obj_6pandas_6parser_TextReader *, Py_ssize_t, Py_ssize_t); }; static struct __pyx_vtabstruct_6pandas_6parser_TextReader *__pyx_vtabptr_6pandas_6parser_TextReader; static CYTHON_INLINE PyObject *__pyx_f_6pandas_6parser_10TextReader__convert_tokens(struct __pyx_obj_6pandas_6parser_TextReader *, Py_ssize_t, int, int, PyObject *, int, kh_str_t *, PyObject *); #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); /*proto*/ #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 /* CYTHON_REFNANNY */ #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) #if CYTHON_COMPILING_IN_CPYTHON static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name) { PyTypeObject* tp = Py_TYPE(obj); if (likely(tp->tp_getattro)) return tp->tp_getattro(obj, attr_name); #if PY_MAJOR_VERSION < 3 if (likely(tp->tp_getattr)) return tp->tp_getattr(obj, PyString_AS_STRING(attr_name)); #endif return PyObject_GetAttr(obj, attr_name); } #else #define __Pyx_PyObject_GetAttrStr(o,n) PyObject_GetAttr(o,n) #endif static PyObject *__Pyx_GetBuiltinName(PyObject *name); /*proto*/ static void __Pyx_RaiseDoubleKeywordsError(const char* func_name, PyObject* kw_name); /*proto*/ static int __Pyx_ParseOptionalKeywords(PyObject *kwds, PyObject **argnames[], \ PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args, \ const char* function_name); /*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); /*proto*/ static CYTHON_INLINE void __Pyx_ErrRestore(PyObject *type, PyObject *value, PyObject *tb); /*proto*/ static CYTHON_INLINE void __Pyx_ErrFetch(PyObject **type, PyObject **value, PyObject **tb); /*proto*/ static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause); /*proto*/ #if PY_VERSION_HEX < 0x02050000 #ifndef PyAnySet_CheckExact #define PyAnySet_CheckExact(ob) \ ((ob)->ob_type == &PySet_Type || \ (ob)->ob_type == &PyFrozenSet_Type) #define PySet_New(iterable) \ PyObject_CallFunctionObjArgs((PyObject *)&PySet_Type, (iterable), NULL) #define Pyx_PyFrozenSet_New(iterable) \ PyObject_CallFunctionObjArgs((PyObject *)&PyFrozenSet_Type, (iterable), NULL) #define PySet_Size(anyset) \ PyObject_Size((anyset)) #define PySet_Contains(anyset, key) \ PySequence_Contains((anyset), (key)) #define PySet_Pop(set) \ PyObject_CallMethod(set, (char *)"pop", NULL) static CYTHON_INLINE int PySet_Clear(PyObject *set) { PyObject *ret = PyObject_CallMethod(set, (char *)"clear", NULL); if (!ret) return -1; Py_DECREF(ret); return 0; } static CYTHON_INLINE int PySet_Discard(PyObject *set, PyObject *key) { PyObject *ret = PyObject_CallMethod(set, (char *)"discard", (char *)"O", key); if (!ret) return -1; Py_DECREF(ret); return 0; } static CYTHON_INLINE int PySet_Add(PyObject *set, PyObject *key) { PyObject *ret = PyObject_CallMethod(set, (char *)"add", (char *)"O", key); if (!ret) return -1; Py_DECREF(ret); return 0; } #endif /* PyAnySet_CheckExact (<= Py2.4) */ #endif /* < Py2.5 */ static CYTHON_INLINE PyObject *__Pyx_GetModuleGlobalName(PyObject *name); /*proto*/ static PyObject* __Pyx_PyObject_CallMethodTuple(PyObject* obj, PyObject* method_name, PyObject* args) { PyObject *method, *result = NULL; if (unlikely(!args)) return NULL; method = __Pyx_PyObject_GetAttrStr(obj, method_name); if (unlikely(!method)) goto bad; result = PyObject_Call(method, args, NULL); Py_DECREF(method); bad: Py_DECREF(args); return result; } #define __Pyx_PyObject_CallMethod3(obj, name, arg1, arg2, arg3) \ __Pyx_PyObject_CallMethodTuple(obj, name, PyTuple_Pack(3, arg1, arg2, arg3)) #define __Pyx_PyObject_CallMethod2(obj, name, arg1, arg2) \ __Pyx_PyObject_CallMethodTuple(obj, name, PyTuple_Pack(2, arg1, arg2)) #define __Pyx_PyObject_CallMethod1(obj, name, arg1) \ __Pyx_PyObject_CallMethodTuple(obj, name, PyTuple_Pack(1, arg1)) #define __Pyx_PyObject_CallMethod0(obj, name) \ __Pyx_PyObject_CallMethodTuple(obj, name, (Py_INCREF(__pyx_empty_tuple), __pyx_empty_tuple)) #if CYTHON_COMPILING_IN_CPYTHON static CYTHON_INLINE int __Pyx_PyList_Append(PyObject* list, PyObject* x) { PyListObject* L = (PyListObject*) list; Py_ssize_t len = Py_SIZE(list); if (likely(L->allocated > len) & likely(len > (L->allocated >> 1))) { Py_INCREF(x); PyList_SET_ITEM(list, len, x); Py_SIZE(list) = len+1; return 0; } return PyList_Append(list, x); } #else #define __Pyx_PyList_Append(L,x) PyList_Append(L,x) #endif static CYTHON_INLINE PyObject* __Pyx_PyObject_Append(PyObject* L, PyObject* x); /*proto*/ #define __Pyx_GetItemInt(o, i, size, to_py_func, is_list, wraparound, boundscheck) \ (((size) <= sizeof(Py_ssize_t)) ? \ __Pyx_GetItemInt_Fast(o, i, is_list, wraparound, boundscheck) : \ __Pyx_GetItemInt_Generic(o, to_py_func(i))) #define __Pyx_GetItemInt_List(o, i, size, to_py_func, is_list, wraparound, boundscheck) \ (((size) <= sizeof(Py_ssize_t)) ? \ __Pyx_GetItemInt_List_Fast(o, i, wraparound, boundscheck) : \ __Pyx_GetItemInt_Generic(o, to_py_func(i))) static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i, int wraparound, int boundscheck); #define __Pyx_GetItemInt_Tuple(o, i, size, to_py_func, is_list, wraparound, boundscheck) \ (((size) <= sizeof(Py_ssize_t)) ? \ __Pyx_GetItemInt_Tuple_Fast(o, i, wraparound, boundscheck) : \ __Pyx_GetItemInt_Generic(o, to_py_func(i))) static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i, int wraparound, int boundscheck); static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j); static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, int is_list, int wraparound, int boundscheck); static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected); static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index); static CYTHON_INLINE int __Pyx_IterFinish(void); /*proto*/ static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected); /*proto*/ static CYTHON_INLINE long __Pyx_div_long(long, long); /* proto */ #ifndef __PYX_FORCE_INIT_THREADS #define __PYX_FORCE_INIT_THREADS 0 #endif #define UNARY_NEG_WOULD_OVERFLOW(x) (((x) < 0) & ((unsigned long)(x) == 0-(unsigned long)(x))) static CYTHON_INLINE int __Pyx_CheckKeywordStrings(PyObject *kwdict, const char* function_name, int kw_allowed); /*proto*/ #if CYTHON_COMPILING_IN_CPYTHON static CYTHON_INLINE int __Pyx_ListComp_Append(PyObject* list, PyObject* x) { PyListObject* L = (PyListObject*) list; Py_ssize_t len = Py_SIZE(list); if (likely(L->allocated > len)) { Py_INCREF(x); PyList_SET_ITEM(list, len, x); Py_SIZE(list) = len+1; return 0; } return PyList_Append(list, x); } #else #define __Pyx_ListComp_Append(L,x) PyList_Append(L,x) #endif static PyObject* __Pyx_PyDict_GetItemDefault(PyObject* d, PyObject* key, PyObject* default_value); /*proto*/ static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb); /*proto*/ static PyObject* __Pyx_PyObject_PopIndex(PyObject* L, Py_ssize_t ix); /*proto*/ static CYTHON_INLINE int __Pyx_PySequence_Contains(PyObject* item, PyObject* seq, int eq) { int result = PySequence_Contains(seq, item); return unlikely(result < 0) ? result : (result == (eq == Py_EQ)); } #define __Pyx_SetItemInt(o, i, v, size, to_py_func, is_list, wraparound, boundscheck) \ (((size) <= sizeof(Py_ssize_t)) ? \ __Pyx_SetItemInt_Fast(o, i, v, is_list, wraparound, boundscheck) : \ __Pyx_SetItemInt_Generic(o, to_py_func(i), v)) static CYTHON_INLINE int __Pyx_SetItemInt_Generic(PyObject *o, PyObject *j, PyObject *v); static CYTHON_INLINE int __Pyx_SetItemInt_Fast(PyObject *o, Py_ssize_t i, PyObject *v, int is_list, int wraparound, int boundscheck); static CYTHON_INLINE void __Pyx_RaiseUnboundLocalError(const char *varname); static CYTHON_INLINE PyObject* __Pyx_PyObject_GetSlice( PyObject* obj, Py_ssize_t cstart, Py_ssize_t cstop, PyObject** py_start, PyObject** py_stop, PyObject** py_slice, int has_cstart, int has_cstop, int wraparound); static int __Pyx_ArgTypeTest(PyObject *obj, PyTypeObject *type, int none_allowed, const char *name, int exact); /*proto*/ static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type); /*proto*/ static CYTHON_INLINE int __Pyx_GetBufferAndValidate(Py_buffer* buf, PyObject* obj, __Pyx_TypeInfo* dtype, int flags, int nd, int cast, __Pyx_BufFmt_StackElem* stack); static CYTHON_INLINE void __Pyx_SafeReleaseBuffer(Py_buffer* info); static void __Pyx_RaiseBufferFallbackError(void); /*proto*/ static void __Pyx_RaiseBufferIndexError(int axis); /*proto*/ #define __Pyx_BufPtrStrided1d(type, buf, i0, s0) (type)((char*)buf + i0 * s0) static CYTHON_INLINE PyObject* __Pyx_decode_c_string( const char* cstring, Py_ssize_t start, Py_ssize_t stop, const char* encoding, const char* errors, PyObject* (*decode_func)(const char *s, Py_ssize_t size, const char *errors)); #include #if PY_MAJOR_VERSION >= 3 static CYTHON_INLINE PyObject* __Pyx_PyDict_Values(PyObject* d); /*proto*/ #else #define __Pyx_PyDict_Values(d) PyDict_Values(d) #endif #if PY_MAJOR_VERSION >= 3 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; } #else #define __Pyx_PyDict_GetItem(d, key) PyObject_GetItem(d, key) #endif static void __Pyx_WriteUnraisable(const char *name, int clineno, int lineno, const char *filename); /*proto*/ static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void); static int __Pyx_SetVtable(PyObject *dict, void *vtable); /*proto*/ static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name); /*proto*/ static CYTHON_INLINE void __Pyx_ExceptionSave(PyObject **type, PyObject **value, PyObject **tb); /*proto*/ static void __Pyx_ExceptionReset(PyObject *type, PyObject *value, PyObject *tb); /*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 static Py_ssize_t __Pyx_zeros[] = {0, 0, 0, 0, 0, 0, 0, 0}; static Py_ssize_t __Pyx_minusones[] = {-1, -1, -1, -1, -1, -1, -1, -1}; static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level); /*proto*/ static PyObject *__Pyx_FindPy2Metaclass(PyObject *bases); /*proto*/ static PyObject *__Pyx_CreateClass(PyObject *bases, PyObject *dict, PyObject *name, PyObject *qualname, PyObject *modname); /*proto*/ static CYTHON_INLINE npy_int64 __Pyx_PyInt_from_py_npy_int64(PyObject *); static int __Pyx_Print(PyObject*, PyObject *, int); /*proto*/ #if CYTHON_COMPILING_IN_PYPY || PY_MAJOR_VERSION >= 3 static PyObject* __pyx_print = 0; static PyObject* __pyx_print_kwargs = 0; #endif static int __Pyx_PrintOne(PyObject* stream, PyObject *o); /*proto*/ static CYTHON_INLINE npy_uint8 __Pyx_PyInt_from_py_npy_uint8(PyObject *); #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(_WIN32) && defined(__cplusplus) && CYTHON_CCOMPLEX #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 static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float, float); #if CYTHON_CCOMPLEX #define __Pyx_c_eqf(a, b) ((a)==(b)) #define __Pyx_c_sumf(a, b) ((a)+(b)) #define __Pyx_c_difff(a, b) ((a)-(b)) #define __Pyx_c_prodf(a, b) ((a)*(b)) #define __Pyx_c_quotf(a, b) ((a)/(b)) #define __Pyx_c_negf(a) (-(a)) #ifdef __cplusplus #define __Pyx_c_is_zerof(z) ((z)==(float)0) #define __Pyx_c_conjf(z) (::std::conj(z)) #if 1 #define __Pyx_c_absf(z) (::std::abs(z)) #define __Pyx_c_powf(a, b) (::std::pow(a, b)) #endif #else #define __Pyx_c_is_zerof(z) ((z)==0) #define __Pyx_c_conjf(z) (conjf(z)) #if 1 #define __Pyx_c_absf(z) (cabsf(z)) #define __Pyx_c_powf(a, b) (cpowf(a, b)) #endif #endif #else static CYTHON_INLINE int __Pyx_c_eqf(__pyx_t_float_complex, __pyx_t_float_complex); static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_sumf(__pyx_t_float_complex, __pyx_t_float_complex); static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_difff(__pyx_t_float_complex, __pyx_t_float_complex); static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_prodf(__pyx_t_float_complex, __pyx_t_float_complex); static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_quotf(__pyx_t_float_complex, __pyx_t_float_complex); static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_negf(__pyx_t_float_complex); static CYTHON_INLINE int __Pyx_c_is_zerof(__pyx_t_float_complex); static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_conjf(__pyx_t_float_complex); #if 1 static CYTHON_INLINE float __Pyx_c_absf(__pyx_t_float_complex); static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_powf(__pyx_t_float_complex, __pyx_t_float_complex); #endif #endif static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double, double); #if CYTHON_CCOMPLEX #define __Pyx_c_eq(a, b) ((a)==(b)) #define __Pyx_c_sum(a, b) ((a)+(b)) #define __Pyx_c_diff(a, b) ((a)-(b)) #define __Pyx_c_prod(a, b) ((a)*(b)) #define __Pyx_c_quot(a, b) ((a)/(b)) #define __Pyx_c_neg(a) (-(a)) #ifdef __cplusplus #define __Pyx_c_is_zero(z) ((z)==(double)0) #define __Pyx_c_conj(z) (::std::conj(z)) #if 1 #define __Pyx_c_abs(z) (::std::abs(z)) #define __Pyx_c_pow(a, b) (::std::pow(a, b)) #endif #else #define __Pyx_c_is_zero(z) ((z)==0) #define __Pyx_c_conj(z) (conj(z)) #if 1 #define __Pyx_c_abs(z) (cabs(z)) #define __Pyx_c_pow(a, b) (cpow(a, b)) #endif #endif #else static CYTHON_INLINE int __Pyx_c_eq(__pyx_t_double_complex, __pyx_t_double_complex); static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_sum(__pyx_t_double_complex, __pyx_t_double_complex); static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_diff(__pyx_t_double_complex, __pyx_t_double_complex); static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_prod(__pyx_t_double_complex, __pyx_t_double_complex); static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_quot(__pyx_t_double_complex, __pyx_t_double_complex); static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_neg(__pyx_t_double_complex); static CYTHON_INLINE int __Pyx_c_is_zero(__pyx_t_double_complex); static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_conj(__pyx_t_double_complex); #if 1 static CYTHON_INLINE double __Pyx_c_abs(__pyx_t_double_complex); static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_pow(__pyx_t_double_complex, __pyx_t_double_complex); #endif #endif static CYTHON_INLINE unsigned char __Pyx_PyInt_AsUnsignedChar(PyObject *); static CYTHON_INLINE unsigned short __Pyx_PyInt_AsUnsignedShort(PyObject *); static CYTHON_INLINE unsigned int __Pyx_PyInt_AsUnsignedInt(PyObject *); static CYTHON_INLINE char __Pyx_PyInt_AsChar(PyObject *); static CYTHON_INLINE short __Pyx_PyInt_AsShort(PyObject *); static CYTHON_INLINE int __Pyx_PyInt_AsInt(PyObject *); static CYTHON_INLINE signed char __Pyx_PyInt_AsSignedChar(PyObject *); static CYTHON_INLINE signed short __Pyx_PyInt_AsSignedShort(PyObject *); static CYTHON_INLINE signed int __Pyx_PyInt_AsSignedInt(PyObject *); static CYTHON_INLINE int __Pyx_PyInt_AsLongDouble(PyObject *); static CYTHON_INLINE unsigned long __Pyx_PyInt_AsUnsignedLong(PyObject *); static CYTHON_INLINE unsigned PY_LONG_LONG __Pyx_PyInt_AsUnsignedLongLong(PyObject *); static CYTHON_INLINE long __Pyx_PyInt_AsLong(PyObject *); static CYTHON_INLINE PY_LONG_LONG __Pyx_PyInt_AsLongLong(PyObject *); static CYTHON_INLINE signed long __Pyx_PyInt_AsSignedLong(PyObject *); static CYTHON_INLINE signed PY_LONG_LONG __Pyx_PyInt_AsSignedLongLong(PyObject *); static int __Pyx_check_binary_version(void); #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 static PyObject *__Pyx_ImportModule(const char *name); /*proto*/ static PyTypeObject *__Pyx_ImportType(const char *module_name, const char *class_name, size_t size, int strict); /*proto*/ typedef struct { int code_line; PyCodeObject* code_object; } __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); static void __Pyx_AddTraceback(const char *funcname, int c_line, int py_line, const char *filename); /*proto*/ static int __Pyx_InitStrings(__Pyx_StringTabEntry *t); /*proto*/ /* Module declarations from 'libc.string' */ /* Module declarations from 'libc.stdio' */ /* Module declarations from 'libc.stdlib' */ /* Module declarations from 'cpython.version' */ /* Module declarations from 'cpython.ref' */ /* Module declarations from 'cpython.exc' */ /* Module declarations from 'cpython.module' */ /* Module declarations from 'cpython.mem' */ /* Module declarations from 'cpython.tuple' */ /* Module declarations from 'cpython.list' */ /* Module declarations from 'cpython.object' */ /* Module declarations from 'cpython.sequence' */ /* Module declarations from 'cpython.mapping' */ /* Module declarations from 'cpython.iterator' */ /* Module declarations from '__builtin__' */ /* Module declarations from 'cpython.type' */ static PyTypeObject *__pyx_ptype_7cpython_4type_type = 0; /* Module declarations from 'cpython.number' */ /* Module declarations from 'cpython.int' */ /* Module declarations from '__builtin__' */ /* Module declarations from 'cpython.bool' */ static PyTypeObject *__pyx_ptype_7cpython_4bool_bool = 0; /* Module declarations from 'cpython.long' */ /* Module declarations from 'cpython.float' */ /* Module declarations from '__builtin__' */ /* Module declarations from 'cpython.complex' */ static PyTypeObject *__pyx_ptype_7cpython_7complex_complex = 0; /* Module declarations from 'cpython.string' */ /* Module declarations from 'cpython.unicode' */ /* Module declarations from 'cpython.dict' */ /* Module declarations from 'cpython.instance' */ /* Module declarations from 'cpython.function' */ /* Module declarations from 'cpython.method' */ /* Module declarations from 'cpython.weakref' */ /* Module declarations from 'cpython.getargs' */ /* Module declarations from 'cpython.pythread' */ /* Module declarations from 'cpython.pystate' */ /* Module declarations from 'cpython.cobject' */ /* Module declarations from 'cpython.oldbuffer' */ /* Module declarations from 'cpython.set' */ /* Module declarations from 'cpython.buffer' */ /* Module declarations from 'cpython.bytes' */ /* Module declarations from 'cpython.pycapsule' */ /* Module declarations from 'cpython' */ /* 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*/ /* Module declarations from 'util' */ /* Module declarations from 'khash' */ /* Module declarations from 'pandas.parser' */ static PyTypeObject *__pyx_ptype_6pandas_6parser_TextReader = 0; static int __pyx_v_6pandas_6parser_PY3; static double __pyx_v_6pandas_6parser_INF; static double __pyx_v_6pandas_6parser_NEGINF; static PyObject *__pyx_v_6pandas_6parser__true_values = 0; static PyObject *__pyx_v_6pandas_6parser__false_values = 0; static char *__pyx_v_6pandas_6parser_cinf; static char *__pyx_v_6pandas_6parser_cneginf; static PyObject *__pyx_v_6pandas_6parser_dtype_cast_order = 0; static PyObject *__pyx_f_6pandas_6parser_asbytes(PyObject *); /*proto*/ static PyObject *__pyx_f_6pandas_6parser__string_box_factorize(parser_t *, int, int, int, int, kh_str_t *); /*proto*/ static PyObject *__pyx_f_6pandas_6parser__string_box_utf8(parser_t *, int, int, int, int, kh_str_t *); /*proto*/ static PyObject *__pyx_f_6pandas_6parser__string_box_decode(parser_t *, int, int, int, int, kh_str_t *, char *); /*proto*/ static PyObject *__pyx_f_6pandas_6parser__to_fw_string(parser_t *, int, int, int, size_t); /*proto*/ static PyObject *__pyx_f_6pandas_6parser__try_double(parser_t *, int, int, int, int, kh_str_t *, PyObject *); /*proto*/ static PyObject *__pyx_f_6pandas_6parser__try_int64(parser_t *, int, int, int, int, kh_str_t *); /*proto*/ static PyObject *__pyx_f_6pandas_6parser__try_bool(parser_t *, int, int, int, int, kh_str_t *); /*proto*/ static PyObject *__pyx_f_6pandas_6parser__try_bool_flex(parser_t *, int, int, int, int, kh_str_t *, kh_str_t *, kh_str_t *); /*proto*/ static kh_str_t *__pyx_f_6pandas_6parser_kset_from_list(PyObject *); /*proto*/ static PyObject *__pyx_f_6pandas_6parser_raise_parser_error(PyObject *, parser_t *); /*proto*/ static PyObject *__pyx_f_6pandas_6parser__apply_converter(PyObject *, parser_t *, int, int, int, char *); /*proto*/ static PyObject *__pyx_f_6pandas_6parser__fill_structured_column(char *, char *, int, int, int, int); /*proto*/ 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_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_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 }; #define __Pyx_MODULE_NAME "pandas.parser" int __pyx_module_is_main_pandas__parser = 0; /* Implementation of 'pandas.parser' */ static PyObject *__pyx_builtin_NameError; static PyObject *__pyx_builtin_Exception; static PyObject *__pyx_builtin_ValueError; static PyObject *__pyx_builtin_ord; static PyObject *__pyx_builtin_range; static PyObject *__pyx_builtin_IOError; static PyObject *__pyx_builtin_enumerate; static PyObject *__pyx_builtin_StopIteration; static PyObject *__pyx_builtin_NotImplementedError; static PyObject *__pyx_builtin_TypeError; static PyObject *__pyx_builtin_object; static PyObject *__pyx_builtin_IndexError; static PyObject *__pyx_builtin_RuntimeError; static int __pyx_pf_6pandas_6parser_10TextReader___cinit__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self, PyObject *__pyx_v_source, PyObject *__pyx_v_delimiter, PyObject *__pyx_v_header, CYTHON_UNUSED PyObject *__pyx_v_header_start, CYTHON_UNUSED PyObject *__pyx_v_header_end, PyObject *__pyx_v_index_col, PyObject *__pyx_v_names, PyObject *__pyx_v_memory_map, PyObject *__pyx_v_tokenize_chunksize, PyObject *__pyx_v_delim_whitespace, PyObject *__pyx_v_compression, PyObject *__pyx_v_converters, PyObject *__pyx_v_as_recarray, PyObject *__pyx_v_skipinitialspace, PyObject *__pyx_v_escapechar, PyObject *__pyx_v_doublequote, PyObject *__pyx_v_quotechar, PyObject *__pyx_v_quoting, PyObject *__pyx_v_lineterminator, PyObject *__pyx_v_encoding, PyObject *__pyx_v_comment, PyObject *__pyx_v_decimal, PyObject *__pyx_v_thousands, PyObject *__pyx_v_dtype, PyObject *__pyx_v_usecols, PyObject *__pyx_v_error_bad_lines, PyObject *__pyx_v_warn_bad_lines, PyObject *__pyx_v_na_filter, PyObject *__pyx_v_na_values, PyObject *__pyx_v_na_fvalues, PyObject *__pyx_v_true_values, PyObject *__pyx_v_false_values, PyObject *__pyx_v_compact_ints, PyObject *__pyx_v_allow_leading_cols, PyObject *__pyx_v_use_unsigned, PyObject *__pyx_v_low_memory, CYTHON_UNUSED PyObject *__pyx_v_buffer_lines, PyObject *__pyx_v_skiprows, PyObject *__pyx_v_skip_footer, PyObject *__pyx_v_verbose, PyObject *__pyx_v_mangle_dupe_cols, PyObject *__pyx_v_tupleize_cols); /* proto */ static int __pyx_pf_6pandas_6parser_10TextReader_2__init__(CYTHON_UNUSED struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_args, CYTHON_UNUSED PyObject *__pyx_v_kwards); /* proto */ static void __pyx_pf_6pandas_6parser_10TextReader_4__dealloc__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_6parser_10TextReader_6set_error_bad_lines(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self, int __pyx_v_status); /* proto */ static PyObject *__pyx_pf_6pandas_6parser_10TextReader_8read(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self, PyObject *__pyx_v_rows); /* proto */ static PyObject *__pyx_pf_6pandas_6parser_10TextReader_10debug_print(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_6parser_10TextReader_12set_noconvert(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self, PyObject *__pyx_v_i); /* proto */ static PyObject *__pyx_pf_6pandas_6parser_10TextReader_14remove_noconvert(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self, PyObject *__pyx_v_i); /* proto */ static PyObject *__pyx_pf_6pandas_6parser_10TextReader_16_convert_column_data(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self, PyObject *__pyx_v_rows, PyObject *__pyx_v_upcast_na, CYTHON_UNUSED PyObject *__pyx_v_footer); /* proto */ static PyObject *__pyx_pf_6pandas_6parser_10TextReader_18_get_converter(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self, PyObject *__pyx_v_i, PyObject *__pyx_v_name); /* proto */ static PyObject *__pyx_pf_6pandas_6parser_10TextReader_12leading_cols___get__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self); /* proto */ static int __pyx_pf_6pandas_6parser_10TextReader_12leading_cols_2__set__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ static PyObject *__pyx_pf_6pandas_6parser_10TextReader_11table_width___get__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self); /* proto */ static int __pyx_pf_6pandas_6parser_10TextReader_11table_width_2__set__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ static PyObject *__pyx_pf_6pandas_6parser_10TextReader_11skip_footer___get__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self); /* proto */ static int __pyx_pf_6pandas_6parser_10TextReader_11skip_footer_2__set__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ static PyObject *__pyx_pf_6pandas_6parser_10TextReader_12buffer_lines___get__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self); /* proto */ static int __pyx_pf_6pandas_6parser_10TextReader_12buffer_lines_2__set__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ static PyObject *__pyx_pf_6pandas_6parser_10TextReader_18allow_leading_cols___get__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self); /* proto */ static int __pyx_pf_6pandas_6parser_10TextReader_18allow_leading_cols_2__set__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ static int __pyx_pf_6pandas_6parser_10TextReader_18allow_leading_cols_4__del__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_6parser_10TextReader_9delimiter___get__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self); /* proto */ static int __pyx_pf_6pandas_6parser_10TextReader_9delimiter_2__set__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ static int __pyx_pf_6pandas_6parser_10TextReader_9delimiter_4__del__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_6parser_10TextReader_10converters___get__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self); /* proto */ static int __pyx_pf_6pandas_6parser_10TextReader_10converters_2__set__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ static int __pyx_pf_6pandas_6parser_10TextReader_10converters_4__del__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_6parser_10TextReader_16delim_whitespace___get__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self); /* proto */ static int __pyx_pf_6pandas_6parser_10TextReader_16delim_whitespace_2__set__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ static int __pyx_pf_6pandas_6parser_10TextReader_16delim_whitespace_4__del__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_6parser_10TextReader_9na_values___get__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self); /* proto */ static int __pyx_pf_6pandas_6parser_10TextReader_9na_values_2__set__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ static int __pyx_pf_6pandas_6parser_10TextReader_9na_values_4__del__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_6parser_10TextReader_11true_values___get__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self); /* proto */ static int __pyx_pf_6pandas_6parser_10TextReader_11true_values_2__set__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ static int __pyx_pf_6pandas_6parser_10TextReader_11true_values_4__del__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_6parser_10TextReader_12false_values___get__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self); /* proto */ static int __pyx_pf_6pandas_6parser_10TextReader_12false_values_2__set__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ static int __pyx_pf_6pandas_6parser_10TextReader_12false_values_4__del__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_6parser_10TextReader_10memory_map___get__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self); /* proto */ static int __pyx_pf_6pandas_6parser_10TextReader_10memory_map_2__set__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ static int __pyx_pf_6pandas_6parser_10TextReader_10memory_map_4__del__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_6parser_10TextReader_11as_recarray___get__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self); /* proto */ static int __pyx_pf_6pandas_6parser_10TextReader_11as_recarray_2__set__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ static int __pyx_pf_6pandas_6parser_10TextReader_11as_recarray_4__del__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_6parser_10TextReader_6header___get__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self); /* proto */ static int __pyx_pf_6pandas_6parser_10TextReader_6header_2__set__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ static int __pyx_pf_6pandas_6parser_10TextReader_6header_4__del__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_6parser_10TextReader_11orig_header___get__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self); /* proto */ static int __pyx_pf_6pandas_6parser_10TextReader_11orig_header_2__set__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ static int __pyx_pf_6pandas_6parser_10TextReader_11orig_header_4__del__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_6parser_10TextReader_5names___get__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self); /* proto */ static int __pyx_pf_6pandas_6parser_10TextReader_5names_2__set__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ static int __pyx_pf_6pandas_6parser_10TextReader_5names_4__del__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_6parser_10TextReader_12header_start___get__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self); /* proto */ static int __pyx_pf_6pandas_6parser_10TextReader_12header_start_2__set__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ static int __pyx_pf_6pandas_6parser_10TextReader_12header_start_4__del__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_6parser_10TextReader_10header_end___get__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self); /* proto */ static int __pyx_pf_6pandas_6parser_10TextReader_10header_end_2__set__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ static int __pyx_pf_6pandas_6parser_10TextReader_10header_end_4__del__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_6parser_10TextReader_9index_col___get__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self); /* proto */ static int __pyx_pf_6pandas_6parser_10TextReader_9index_col_2__set__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ static int __pyx_pf_6pandas_6parser_10TextReader_9index_col_4__del__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_6parser_10TextReader_10low_memory___get__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self); /* proto */ static int __pyx_pf_6pandas_6parser_10TextReader_10low_memory_2__set__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ static int __pyx_pf_6pandas_6parser_10TextReader_10low_memory_4__del__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_6parser_10TextReader_8skiprows___get__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self); /* proto */ static int __pyx_pf_6pandas_6parser_10TextReader_8skiprows_2__set__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ static int __pyx_pf_6pandas_6parser_10TextReader_8skiprows_4__del__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_6parser_10TextReader_12compact_ints___get__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self); /* proto */ static int __pyx_pf_6pandas_6parser_10TextReader_12compact_ints_2__set__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ static int __pyx_pf_6pandas_6parser_10TextReader_12compact_ints_4__del__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_6parser_10TextReader_12use_unsigned___get__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self); /* proto */ static int __pyx_pf_6pandas_6parser_10TextReader_12use_unsigned_2__set__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ static int __pyx_pf_6pandas_6parser_10TextReader_12use_unsigned_4__del__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_6parser_10TextReader_5dtype___get__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self); /* proto */ static int __pyx_pf_6pandas_6parser_10TextReader_5dtype_2__set__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ static int __pyx_pf_6pandas_6parser_10TextReader_5dtype_4__del__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_6parser_10TextReader_8encoding___get__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self); /* proto */ static int __pyx_pf_6pandas_6parser_10TextReader_8encoding_2__set__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ static int __pyx_pf_6pandas_6parser_10TextReader_8encoding_4__del__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_6parser_10TextReader_11compression___get__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self); /* proto */ static int __pyx_pf_6pandas_6parser_10TextReader_11compression_2__set__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ static int __pyx_pf_6pandas_6parser_10TextReader_11compression_4__del__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_6parser_10TextReader_16mangle_dupe_cols___get__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self); /* proto */ static int __pyx_pf_6pandas_6parser_10TextReader_16mangle_dupe_cols_2__set__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ static int __pyx_pf_6pandas_6parser_10TextReader_16mangle_dupe_cols_4__del__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_6parser_10TextReader_13tupleize_cols___get__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self); /* proto */ static int __pyx_pf_6pandas_6parser_10TextReader_13tupleize_cols_2__set__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ static int __pyx_pf_6pandas_6parser_10TextReader_13tupleize_cols_4__del__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_6parser_10TextReader_9noconvert___get__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self); /* proto */ static int __pyx_pf_6pandas_6parser_10TextReader_9noconvert_2__set__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ static int __pyx_pf_6pandas_6parser_10TextReader_9noconvert_4__del__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_6parser_10TextReader_7usecols___get__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self); /* proto */ static int __pyx_pf_6pandas_6parser_10TextReader_7usecols_2__set__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ static int __pyx_pf_6pandas_6parser_10TextReader_7usecols_4__del__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_6parser__ensure_encoded(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_lst); /* proto */ static PyObject *__pyx_pf_6pandas_6parser_2_is_file_like(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */ static PyObject *__pyx_pf_6pandas_6parser_4_maybe_upcast(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_arr); /* proto */ static PyObject *__pyx_pf_6pandas_6parser_6downcast_int64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_arr, int __pyx_v_use_unsigned); /* proto */ static PyObject *__pyx_pf_6pandas_6parser_8_concatenate_chunks(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_chunks); /* proto */ static PyObject *__pyx_pf_6pandas_6parser_10_compute_na_values(CYTHON_UNUSED PyObject *__pyx_self); /* proto */ static PyObject *__pyx_pf_6pandas_6parser_12_to_structured_array(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_columns, PyObject *__pyx_v_names); /* proto */ static PyObject *__pyx_pf_6pandas_6parser_14_maybe_encode(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_values); /* 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_6parser_TextReader(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static char __pyx_k_1[] = ","; static char __pyx_k_8[] = "\""; static char __pyx_k_9[] = "."; static char __pyx_k_20[] = "only length-1 separators excluded right now"; static char __pyx_k_22[] = "Only length-1 line terminators supported"; static char __pyx_k_24[] = "Only length-1 decimal markers supported"; static char __pyx_k_26[] = "Only length-1 thousands markers supported"; static char __pyx_k_28[] = "Only length-1 escapes supported"; static char __pyx_k_30[] = "Only length-1 comment characters supported"; static char __pyx_k_32[] = "utf-8"; static char __pyx_k_34[] = "No columns to parse from file"; static char __pyx_k_36[] = "Python cannot read bz2 from open file handle"; static char __pyx_k_38[] = "Unrecognized compression type: %s"; static char __pyx_k_40[] = "File %s does not exist"; static char __pyx_k_41[] = "Initializing from file failed"; static char __pyx_k_43[] = "Initializing parser from file-like object failed"; static char __pyx_k_45[] = "Expected file path name or file-like object, got %s type"; static char __pyx_k_46[] = "[%s], len of %d,"; static char __pyx_k_47[] = "Passed header=%s but only %d lines in file"; static char __pyx_k_48[] = ""; static char __pyx_k_49[] = "Unnamed: %d_level_%d"; static char __pyx_k_50[] = "Unnamed: %d"; static char __pyx_k_51[] = "%s.%d"; static char __pyx_k_52[] = "Passed header names mismatches usecols"; static char __pyx_k_54[] = "_to_structured_array"; static char __pyx_k_55[] = "Conversion to structured array"; static char __pyx_k_56[] = "Error tokenizing data"; static char __pyx_k_57[] = "skip_footer can only be used to read the whole file"; static char __pyx_k_59[] = "_convert_column_data"; static char __pyx_k_60[] = "Type conversion"; static char __pyx_k_61[] = "Parser memory cleanup"; static char __pyx_k_62[] = "%s took: %.2f ms"; static char __pyx_k_64[] = "Too many columns specified: expected %s and found %s"; static char __pyx_k_65[] = "Unable to parse column %d"; static char __pyx_k_66[] = "|O8"; static char __pyx_k_67[] = "Integer column has NA values"; static char __pyx_k_71[] = "the dtype %s is not supported for parsing"; static char __pyx_k_74[] = "the dtype %s is not supported for parsing, pass this column using parse_dates instead"; static char __pyx_k_76[] = "Cannot handle open unicode files (yet)"; static char __pyx_k_78[] = "|S%d"; static char __pyx_k_87[] = "Must be all encoded bytes"; static char __pyx_k_89[] = "%s. C error: "; static char __pyx_k_90[] = "no error message set"; static char __pyx_k_91[] = " "; static char __pyx_k_92[] = "Columns (%s) have mixed types."; static char __pyx_k_93[] = "Specify dtype option on import or set low_memory=False."; static char __pyx_k_94[] = "maybe_convert_objects"; static char __pyx_k_95[] = "%d"; static char __pyx_k_97[] = "index out of bounds"; static char __pyx_k__B[] = "B"; static char __pyx_k__H[] = "H"; static char __pyx_k__I[] = "I"; static char __pyx_k__L[] = "L"; static char __pyx_k__M[] = "M"; static char __pyx_k__O[] = "O"; static char __pyx_k__Q[] = "Q"; static char __pyx_k__S[] = "S"; static char __pyx_k__U[] = "U"; static char __pyx_k__a[] = "a"; static char __pyx_k__b[] = "b"; static char __pyx_k__c[] = "c"; static char __pyx_k__d[] = "d"; static char __pyx_k__f[] = "f"; static char __pyx_k__g[] = "g"; static char __pyx_k__h[] = "h"; static char __pyx_k__i[] = "i"; static char __pyx_k__k[] = "k"; static char __pyx_k__l[] = "l"; static char __pyx_k__n[] = "n"; static char __pyx_k__q[] = "q"; static char __pyx_k__u[] = "u"; static char __pyx_k__x[] = "x"; static char __pyx_k_100[] = "ndarray is not C contiguous"; static char __pyx_k_102[] = "ndarray is not Fortran contiguous"; static char __pyx_k_104[] = "Non-native byte order not supported"; static char __pyx_k_106[] = "unknown dtype code in numpy.pxd (%d)"; static char __pyx_k_107[] = "Format string allocated too short, see comment in numpy.pxd"; static char __pyx_k_110[] = "Format string allocated too short."; static char __pyx_k_112[] = "io.common"; static char __pyx_k_113[] = "pandas.lib"; static char __pyx_k_114[] = "*"; static char __pyx_k_115[] = "-1.#IND"; static char __pyx_k_116[] = "1.#QNAN"; static char __pyx_k_117[] = "1.#IND"; static char __pyx_k_118[] = "-1.#QNAN"; static char __pyx_k_119[] = "#N/A N/A"; static char __pyx_k_120[] = "#NA"; static char __pyx_k_121[] = "pandas.parser"; static char __pyx_k_124[] = "/home/yoh/deb/gits/pkg-exppsy/pandas/pandas/parser.pyx"; static char __pyx_k_129[] = "-inf"; static char __pyx_k_130[] = " 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__delimiter); if (value) { values[1] = value; kw_args--; } } case 2: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__header); if (value) { values[2] = value; kw_args--; } } case 3: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__header_start); if (value) { values[3] = value; kw_args--; } } case 4: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__header_end); if (value) { values[4] = value; kw_args--; } } case 5: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__index_col); if (value) { values[5] = value; kw_args--; } } case 6: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__names); if (value) { values[6] = value; kw_args--; } } case 7: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__memory_map); if (value) { values[7] = value; kw_args--; } } case 8: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__tokenize_chunksize); if (value) { values[8] = value; kw_args--; } } case 9: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__delim_whitespace); if (value) { values[9] = value; kw_args--; } } case 10: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__compression); if (value) { values[10] = value; kw_args--; } } case 11: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__converters); if (value) { values[11] = value; kw_args--; } } case 12: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__as_recarray); if (value) { values[12] = value; kw_args--; } } case 13: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__skipinitialspace); if (value) { values[13] = value; kw_args--; } } case 14: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__escapechar); if (value) { values[14] = value; kw_args--; } } case 15: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__doublequote); if (value) { values[15] = value; kw_args--; } } case 16: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__quotechar); if (value) { values[16] = value; kw_args--; } } case 17: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__quoting); if (value) { values[17] = value; kw_args--; } } case 18: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__lineterminator); if (value) { values[18] = value; kw_args--; } } case 19: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__encoding); if (value) { values[19] = value; kw_args--; } } case 20: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__comment); if (value) { values[20] = value; kw_args--; } } case 21: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__decimal); if (value) { values[21] = value; kw_args--; } } case 22: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__thousands); if (value) { values[22] = value; kw_args--; } } case 23: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__dtype); if (value) { values[23] = value; kw_args--; } } case 24: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__usecols); if (value) { values[24] = value; kw_args--; } } case 25: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__error_bad_lines); if (value) { values[25] = value; kw_args--; } } case 26: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__warn_bad_lines); if (value) { values[26] = value; kw_args--; } } case 27: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__na_filter); if (value) { values[27] = value; kw_args--; } } case 28: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__na_values); if (value) { values[28] = value; kw_args--; } } case 29: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__na_fvalues); if (value) { values[29] = value; kw_args--; } } case 30: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__true_values); if (value) { values[30] = value; kw_args--; } } case 31: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__false_values); if (value) { values[31] = value; kw_args--; } } case 32: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__compact_ints); if (value) { values[32] = value; kw_args--; } } case 33: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__allow_leading_cols); if (value) { values[33] = value; kw_args--; } } case 34: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__use_unsigned); if (value) { values[34] = value; kw_args--; } } case 35: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__low_memory); if (value) { values[35] = value; kw_args--; } } case 36: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__buffer_lines); if (value) { values[36] = value; kw_args--; } } case 37: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__skiprows); if (value) { values[37] = value; kw_args--; } } case 38: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__skip_footer); if (value) { values[38] = value; kw_args--; } } case 39: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__verbose); if (value) { values[39] = value; kw_args--; } } case 40: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__mangle_dupe_cols); if (value) { values[40] = value; kw_args--; } } case 41: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__tupleize_cols); if (value) { values[41] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 264; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 42: values[41] = PyTuple_GET_ITEM(__pyx_args, 41); case 41: values[40] = PyTuple_GET_ITEM(__pyx_args, 40); case 40: values[39] = PyTuple_GET_ITEM(__pyx_args, 39); case 39: values[38] = PyTuple_GET_ITEM(__pyx_args, 38); case 38: values[37] = PyTuple_GET_ITEM(__pyx_args, 37); case 37: values[36] = PyTuple_GET_ITEM(__pyx_args, 36); case 36: values[35] = PyTuple_GET_ITEM(__pyx_args, 35); case 35: values[34] = PyTuple_GET_ITEM(__pyx_args, 34); case 34: values[33] = PyTuple_GET_ITEM(__pyx_args, 33); case 33: values[32] = PyTuple_GET_ITEM(__pyx_args, 32); case 32: values[31] = PyTuple_GET_ITEM(__pyx_args, 31); case 31: values[30] = PyTuple_GET_ITEM(__pyx_args, 30); case 30: values[29] = PyTuple_GET_ITEM(__pyx_args, 29); case 29: values[28] = PyTuple_GET_ITEM(__pyx_args, 28); case 28: values[27] = PyTuple_GET_ITEM(__pyx_args, 27); case 27: values[26] = PyTuple_GET_ITEM(__pyx_args, 26); case 26: values[25] = PyTuple_GET_ITEM(__pyx_args, 25); case 25: values[24] = PyTuple_GET_ITEM(__pyx_args, 24); case 24: values[23] = PyTuple_GET_ITEM(__pyx_args, 23); case 23: values[22] = PyTuple_GET_ITEM(__pyx_args, 22); case 22: values[21] = PyTuple_GET_ITEM(__pyx_args, 21); case 21: values[20] = PyTuple_GET_ITEM(__pyx_args, 20); case 20: values[19] = PyTuple_GET_ITEM(__pyx_args, 19); case 19: values[18] = PyTuple_GET_ITEM(__pyx_args, 18); case 18: values[17] = PyTuple_GET_ITEM(__pyx_args, 17); case 17: values[16] = PyTuple_GET_ITEM(__pyx_args, 16); case 16: values[15] = PyTuple_GET_ITEM(__pyx_args, 15); case 15: values[14] = PyTuple_GET_ITEM(__pyx_args, 14); case 14: values[13] = PyTuple_GET_ITEM(__pyx_args, 13); case 13: values[12] = PyTuple_GET_ITEM(__pyx_args, 12); case 12: values[11] = PyTuple_GET_ITEM(__pyx_args, 11); case 11: values[10] = PyTuple_GET_ITEM(__pyx_args, 10); case 10: values[9] = PyTuple_GET_ITEM(__pyx_args, 9); case 9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8); case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7); case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6); case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5); case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_source = values[0]; __pyx_v_delimiter = values[1]; __pyx_v_header = values[2]; __pyx_v_header_start = values[3]; __pyx_v_header_end = values[4]; __pyx_v_index_col = values[5]; __pyx_v_names = values[6]; __pyx_v_memory_map = values[7]; __pyx_v_tokenize_chunksize = values[8]; __pyx_v_delim_whitespace = values[9]; __pyx_v_compression = values[10]; __pyx_v_converters = values[11]; __pyx_v_as_recarray = values[12]; __pyx_v_skipinitialspace = values[13]; __pyx_v_escapechar = values[14]; __pyx_v_doublequote = values[15]; __pyx_v_quotechar = values[16]; __pyx_v_quoting = values[17]; __pyx_v_lineterminator = values[18]; __pyx_v_encoding = values[19]; __pyx_v_comment = values[20]; __pyx_v_decimal = values[21]; __pyx_v_thousands = values[22]; __pyx_v_dtype = values[23]; __pyx_v_usecols = values[24]; __pyx_v_error_bad_lines = values[25]; __pyx_v_warn_bad_lines = values[26]; __pyx_v_na_filter = values[27]; __pyx_v_na_values = values[28]; __pyx_v_na_fvalues = values[29]; __pyx_v_true_values = values[30]; __pyx_v_false_values = values[31]; __pyx_v_compact_ints = values[32]; __pyx_v_allow_leading_cols = values[33]; __pyx_v_use_unsigned = values[34]; __pyx_v_low_memory = values[35]; __pyx_v_buffer_lines = values[36]; __pyx_v_skiprows = values[37]; __pyx_v_skip_footer = values[38]; __pyx_v_verbose = values[39]; __pyx_v_mangle_dupe_cols = values[40]; __pyx_v_tupleize_cols = values[41]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 1, 42, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 264; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.parser.TextReader.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return -1; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pandas_6parser_10TextReader___cinit__(((struct __pyx_obj_6pandas_6parser_TextReader *)__pyx_v_self), __pyx_v_source, __pyx_v_delimiter, __pyx_v_header, __pyx_v_header_start, __pyx_v_header_end, __pyx_v_index_col, __pyx_v_names, __pyx_v_memory_map, __pyx_v_tokenize_chunksize, __pyx_v_delim_whitespace, __pyx_v_compression, __pyx_v_converters, __pyx_v_as_recarray, __pyx_v_skipinitialspace, __pyx_v_escapechar, __pyx_v_doublequote, __pyx_v_quotechar, __pyx_v_quoting, __pyx_v_lineterminator, __pyx_v_encoding, __pyx_v_comment, __pyx_v_decimal, __pyx_v_thousands, __pyx_v_dtype, __pyx_v_usecols, __pyx_v_error_bad_lines, __pyx_v_warn_bad_lines, __pyx_v_na_filter, __pyx_v_na_values, __pyx_v_na_fvalues, __pyx_v_true_values, __pyx_v_false_values, __pyx_v_compact_ints, __pyx_v_allow_leading_cols, __pyx_v_use_unsigned, __pyx_v_low_memory, __pyx_v_buffer_lines, __pyx_v_skiprows, __pyx_v_skip_footer, __pyx_v_verbose, __pyx_v_mangle_dupe_cols, __pyx_v_tupleize_cols); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/parser.pyx":264 * set noconvert, usecols * * def __cinit__(self, source, # <<<<<<<<<<<<<< * delimiter=b',', * */ static int __pyx_pf_6pandas_6parser_10TextReader___cinit__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self, PyObject *__pyx_v_source, PyObject *__pyx_v_delimiter, PyObject *__pyx_v_header, CYTHON_UNUSED PyObject *__pyx_v_header_start, CYTHON_UNUSED PyObject *__pyx_v_header_end, PyObject *__pyx_v_index_col, PyObject *__pyx_v_names, PyObject *__pyx_v_memory_map, PyObject *__pyx_v_tokenize_chunksize, PyObject *__pyx_v_delim_whitespace, PyObject *__pyx_v_compression, PyObject *__pyx_v_converters, PyObject *__pyx_v_as_recarray, PyObject *__pyx_v_skipinitialspace, PyObject *__pyx_v_escapechar, PyObject *__pyx_v_doublequote, PyObject *__pyx_v_quotechar, PyObject *__pyx_v_quoting, PyObject *__pyx_v_lineterminator, PyObject *__pyx_v_encoding, PyObject *__pyx_v_comment, PyObject *__pyx_v_decimal, PyObject *__pyx_v_thousands, PyObject *__pyx_v_dtype, PyObject *__pyx_v_usecols, PyObject *__pyx_v_error_bad_lines, PyObject *__pyx_v_warn_bad_lines, PyObject *__pyx_v_na_filter, PyObject *__pyx_v_na_values, PyObject *__pyx_v_na_fvalues, PyObject *__pyx_v_true_values, PyObject *__pyx_v_false_values, PyObject *__pyx_v_compact_ints, PyObject *__pyx_v_allow_leading_cols, PyObject *__pyx_v_use_unsigned, PyObject *__pyx_v_low_memory, CYTHON_UNUSED PyObject *__pyx_v_buffer_lines, PyObject *__pyx_v_skiprows, PyObject *__pyx_v_skip_footer, PyObject *__pyx_v_verbose, PyObject *__pyx_v_mangle_dupe_cols, PyObject *__pyx_v_tupleize_cols) { PyObject *__pyx_v_conv = NULL; PyObject *__pyx_v_k = NULL; PyObject *__pyx_v_v = NULL; long __pyx_v_heuristic; int __pyx_r; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; int __pyx_t_3; Py_ssize_t __pyx_t_4; PyObject *__pyx_t_5 = NULL; char __pyx_t_6; int __pyx_t_7; PyObject *__pyx_t_8 = NULL; char *__pyx_t_9; PyObject *(*__pyx_t_10)(PyObject *); PyObject *__pyx_t_11 = NULL; PyObject *(*__pyx_t_12)(PyObject *); int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__cinit__", 0); __Pyx_INCREF(__pyx_v_header); __Pyx_INCREF(__pyx_v_encoding); __Pyx_INCREF(__pyx_v_dtype); __Pyx_INCREF(__pyx_v_na_fvalues); /* "pandas/parser.pyx":318 * tupleize_cols=False): * * self.parser = parser_new() # <<<<<<<<<<<<<< * self.parser.chunksize = tokenize_chunksize * */ __pyx_v_self->parser = parser_new(); /* "pandas/parser.pyx":319 * * self.parser = parser_new() * self.parser.chunksize = tokenize_chunksize # <<<<<<<<<<<<<< * * self.mangle_dupe_cols=mangle_dupe_cols */ __pyx_t_1 = __Pyx_PyInt_AsInt(__pyx_v_tokenize_chunksize); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 319; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_self->parser->chunksize = __pyx_t_1; /* "pandas/parser.pyx":321 * self.parser.chunksize = tokenize_chunksize * * self.mangle_dupe_cols=mangle_dupe_cols # <<<<<<<<<<<<<< * self.tupleize_cols=tupleize_cols * */ __Pyx_INCREF(__pyx_v_mangle_dupe_cols); __Pyx_GIVEREF(__pyx_v_mangle_dupe_cols); __Pyx_GOTREF(__pyx_v_self->mangle_dupe_cols); __Pyx_DECREF(__pyx_v_self->mangle_dupe_cols); __pyx_v_self->mangle_dupe_cols = __pyx_v_mangle_dupe_cols; /* "pandas/parser.pyx":322 * * self.mangle_dupe_cols=mangle_dupe_cols * self.tupleize_cols=tupleize_cols # <<<<<<<<<<<<<< * * # For timekeeping */ __Pyx_INCREF(__pyx_v_tupleize_cols); __Pyx_GIVEREF(__pyx_v_tupleize_cols); __Pyx_GOTREF(__pyx_v_self->tupleize_cols); __Pyx_DECREF(__pyx_v_self->tupleize_cols); __pyx_v_self->tupleize_cols = __pyx_v_tupleize_cols; /* "pandas/parser.pyx":325 * * # For timekeeping * self.clocks = [] # <<<<<<<<<<<<<< * * self.compression = compression */ __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 325; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(((PyObject *)__pyx_t_2)); __Pyx_GOTREF(__pyx_v_self->clocks); __Pyx_DECREF(((PyObject *)__pyx_v_self->clocks)); __pyx_v_self->clocks = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; /* "pandas/parser.pyx":327 * self.clocks = [] * * self.compression = compression # <<<<<<<<<<<<<< * self.memory_map = memory_map * */ __Pyx_INCREF(__pyx_v_compression); __Pyx_GIVEREF(__pyx_v_compression); __Pyx_GOTREF(__pyx_v_self->compression); __Pyx_DECREF(__pyx_v_self->compression); __pyx_v_self->compression = __pyx_v_compression; /* "pandas/parser.pyx":328 * * self.compression = compression * self.memory_map = memory_map # <<<<<<<<<<<<<< * * self._setup_parser_source(source) */ __Pyx_INCREF(__pyx_v_memory_map); __Pyx_GIVEREF(__pyx_v_memory_map); __Pyx_GOTREF(__pyx_v_self->memory_map); __Pyx_DECREF(__pyx_v_self->memory_map); __pyx_v_self->memory_map = __pyx_v_memory_map; /* "pandas/parser.pyx":330 * self.memory_map = memory_map * * self._setup_parser_source(source) # <<<<<<<<<<<<<< * parser_set_default_options(self.parser) * */ __pyx_t_2 = ((struct __pyx_vtabstruct_6pandas_6parser_TextReader *)__pyx_v_self->__pyx_vtab)->_setup_parser_source(__pyx_v_self, __pyx_v_source); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 330; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/parser.pyx":331 * * self._setup_parser_source(source) * parser_set_default_options(self.parser) # <<<<<<<<<<<<<< * * parser_init(self.parser) */ parser_set_default_options(__pyx_v_self->parser); /* "pandas/parser.pyx":333 * parser_set_default_options(self.parser) * * parser_init(self.parser) # <<<<<<<<<<<<<< * * if delim_whitespace: */ parser_init(__pyx_v_self->parser); /* "pandas/parser.pyx":335 * parser_init(self.parser) * * if delim_whitespace: # <<<<<<<<<<<<<< * self.parser.delim_whitespace = delim_whitespace * else: */ __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_delim_whitespace); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 335; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__pyx_t_3) { /* "pandas/parser.pyx":336 * * if delim_whitespace: * self.parser.delim_whitespace = delim_whitespace # <<<<<<<<<<<<<< * else: * if len(delimiter) > 1: */ __pyx_t_1 = __Pyx_PyInt_AsInt(__pyx_v_delim_whitespace); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 336; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_self->parser->delim_whitespace = __pyx_t_1; goto __pyx_L3; } /*else*/ { /* "pandas/parser.pyx":338 * self.parser.delim_whitespace = delim_whitespace * else: * if len(delimiter) > 1: # <<<<<<<<<<<<<< * raise ValueError('only length-1 separators excluded right now') * self.parser.delimiter = ord(delimiter) */ __pyx_t_4 = PyObject_Length(__pyx_v_delimiter); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 338; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_3 = ((__pyx_t_4 > 1) != 0); if (__pyx_t_3) { /* "pandas/parser.pyx":339 * else: * if len(delimiter) > 1: * raise ValueError('only length-1 separators excluded right now') # <<<<<<<<<<<<<< * self.parser.delimiter = ord(delimiter) * */ __pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_21), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 339; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 339; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L4; } __pyx_L4:; /* "pandas/parser.pyx":340 * if len(delimiter) > 1: * raise ValueError('only length-1 separators excluded right now') * self.parser.delimiter = ord(delimiter) # <<<<<<<<<<<<<< * * #---------------------------------------- */ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 340; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_delimiter); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_delimiter); __Pyx_GIVEREF(__pyx_v_delimiter); __pyx_t_5 = PyObject_Call(__pyx_builtin_ord, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 340; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __pyx_t_6 = __Pyx_PyInt_AsChar(__pyx_t_5); if (unlikely((__pyx_t_6 == (char)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 340; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_v_self->parser->delimiter = __pyx_t_6; } __pyx_L3:; /* "pandas/parser.pyx":345 * # parser options * * self.parser.doublequote = doublequote # <<<<<<<<<<<<<< * self.parser.skipinitialspace = skipinitialspace * */ __pyx_t_1 = __Pyx_PyInt_AsInt(__pyx_v_doublequote); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 345; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_self->parser->doublequote = __pyx_t_1; /* "pandas/parser.pyx":346 * * self.parser.doublequote = doublequote * self.parser.skipinitialspace = skipinitialspace # <<<<<<<<<<<<<< * * if lineterminator is not None: */ __pyx_t_1 = __Pyx_PyInt_AsInt(__pyx_v_skipinitialspace); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 346; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_self->parser->skipinitialspace = __pyx_t_1; /* "pandas/parser.pyx":348 * self.parser.skipinitialspace = skipinitialspace * * if lineterminator is not None: # <<<<<<<<<<<<<< * if len(lineterminator) != 1: * raise ValueError('Only length-1 line terminators supported') */ __pyx_t_3 = (__pyx_v_lineterminator != Py_None); __pyx_t_7 = (__pyx_t_3 != 0); if (__pyx_t_7) { /* "pandas/parser.pyx":349 * * if lineterminator is not None: * if len(lineterminator) != 1: # <<<<<<<<<<<<<< * raise ValueError('Only length-1 line terminators supported') * self.parser.lineterminator = ord(lineterminator) */ __pyx_t_4 = PyObject_Length(__pyx_v_lineterminator); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 349; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_7 = ((__pyx_t_4 != 1) != 0); if (__pyx_t_7) { /* "pandas/parser.pyx":350 * if lineterminator is not None: * if len(lineterminator) != 1: * raise ValueError('Only length-1 line terminators supported') # <<<<<<<<<<<<<< * self.parser.lineterminator = ord(lineterminator) * */ __pyx_t_5 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_23), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 350; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_Raise(__pyx_t_5, 0, 0, 0); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 350; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L6; } __pyx_L6:; /* "pandas/parser.pyx":351 * if len(lineterminator) != 1: * raise ValueError('Only length-1 line terminators supported') * self.parser.lineterminator = ord(lineterminator) # <<<<<<<<<<<<<< * * if len(decimal) != 1: */ __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 351; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_v_lineterminator); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_lineterminator); __Pyx_GIVEREF(__pyx_v_lineterminator); __pyx_t_2 = PyObject_Call(__pyx_builtin_ord, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 351; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; __pyx_t_6 = __Pyx_PyInt_AsChar(__pyx_t_2); if (unlikely((__pyx_t_6 == (char)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 351; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_self->parser->lineterminator = __pyx_t_6; goto __pyx_L5; } __pyx_L5:; /* "pandas/parser.pyx":353 * self.parser.lineterminator = ord(lineterminator) * * if len(decimal) != 1: # <<<<<<<<<<<<<< * raise ValueError('Only length-1 decimal markers supported') * self.parser.decimal = ord(decimal) */ __pyx_t_4 = PyObject_Length(__pyx_v_decimal); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 353; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_7 = ((__pyx_t_4 != 1) != 0); if (__pyx_t_7) { /* "pandas/parser.pyx":354 * * if len(decimal) != 1: * raise ValueError('Only length-1 decimal markers supported') # <<<<<<<<<<<<<< * self.parser.decimal = ord(decimal) * */ __pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_25), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 354; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 354; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L7; } __pyx_L7:; /* "pandas/parser.pyx":355 * if len(decimal) != 1: * raise ValueError('Only length-1 decimal markers supported') * self.parser.decimal = ord(decimal) # <<<<<<<<<<<<<< * * if thousands is not None: */ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 355; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_decimal); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_decimal); __Pyx_GIVEREF(__pyx_v_decimal); __pyx_t_5 = PyObject_Call(__pyx_builtin_ord, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 355; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __pyx_t_6 = __Pyx_PyInt_AsChar(__pyx_t_5); if (unlikely((__pyx_t_6 == (char)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 355; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_v_self->parser->decimal = __pyx_t_6; /* "pandas/parser.pyx":357 * self.parser.decimal = ord(decimal) * * if thousands is not None: # <<<<<<<<<<<<<< * if len(thousands) != 1: * raise ValueError('Only length-1 thousands markers supported') */ __pyx_t_7 = (__pyx_v_thousands != Py_None); __pyx_t_3 = (__pyx_t_7 != 0); if (__pyx_t_3) { /* "pandas/parser.pyx":358 * * if thousands is not None: * if len(thousands) != 1: # <<<<<<<<<<<<<< * raise ValueError('Only length-1 thousands markers supported') * self.parser.thousands = ord(thousands) */ __pyx_t_4 = PyObject_Length(__pyx_v_thousands); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 358; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_3 = ((__pyx_t_4 != 1) != 0); if (__pyx_t_3) { /* "pandas/parser.pyx":359 * if thousands is not None: * if len(thousands) != 1: * raise ValueError('Only length-1 thousands markers supported') # <<<<<<<<<<<<<< * self.parser.thousands = ord(thousands) * */ __pyx_t_5 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_27), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 359; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_Raise(__pyx_t_5, 0, 0, 0); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 359; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L9; } __pyx_L9:; /* "pandas/parser.pyx":360 * if len(thousands) != 1: * raise ValueError('Only length-1 thousands markers supported') * self.parser.thousands = ord(thousands) # <<<<<<<<<<<<<< * * if escapechar is not None: */ __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 360; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_v_thousands); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_thousands); __Pyx_GIVEREF(__pyx_v_thousands); __pyx_t_2 = PyObject_Call(__pyx_builtin_ord, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 360; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; __pyx_t_6 = __Pyx_PyInt_AsChar(__pyx_t_2); if (unlikely((__pyx_t_6 == (char)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 360; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_self->parser->thousands = __pyx_t_6; goto __pyx_L8; } __pyx_L8:; /* "pandas/parser.pyx":362 * self.parser.thousands = ord(thousands) * * if escapechar is not None: # <<<<<<<<<<<<<< * if len(escapechar) != 1: * raise ValueError('Only length-1 escapes supported') */ __pyx_t_3 = (__pyx_v_escapechar != Py_None); __pyx_t_7 = (__pyx_t_3 != 0); if (__pyx_t_7) { /* "pandas/parser.pyx":363 * * if escapechar is not None: * if len(escapechar) != 1: # <<<<<<<<<<<<<< * raise ValueError('Only length-1 escapes supported') * self.parser.escapechar = ord(escapechar) */ __pyx_t_4 = PyObject_Length(__pyx_v_escapechar); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 363; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_7 = ((__pyx_t_4 != 1) != 0); if (__pyx_t_7) { /* "pandas/parser.pyx":364 * if escapechar is not None: * if len(escapechar) != 1: * raise ValueError('Only length-1 escapes supported') # <<<<<<<<<<<<<< * self.parser.escapechar = ord(escapechar) * */ __pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_29), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 364; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 364; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L11; } __pyx_L11:; /* "pandas/parser.pyx":365 * if len(escapechar) != 1: * raise ValueError('Only length-1 escapes supported') * self.parser.escapechar = ord(escapechar) # <<<<<<<<<<<<<< * * self.parser.quotechar = ord(quotechar) */ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 365; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_escapechar); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_escapechar); __Pyx_GIVEREF(__pyx_v_escapechar); __pyx_t_5 = PyObject_Call(__pyx_builtin_ord, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 365; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __pyx_t_6 = __Pyx_PyInt_AsChar(__pyx_t_5); if (unlikely((__pyx_t_6 == (char)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 365; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_v_self->parser->escapechar = __pyx_t_6; goto __pyx_L10; } __pyx_L10:; /* "pandas/parser.pyx":367 * self.parser.escapechar = ord(escapechar) * * self.parser.quotechar = ord(quotechar) # <<<<<<<<<<<<<< * self.parser.quoting = quoting * */ __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 367; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_v_quotechar); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_quotechar); __Pyx_GIVEREF(__pyx_v_quotechar); __pyx_t_2 = PyObject_Call(__pyx_builtin_ord, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 367; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; __pyx_t_6 = __Pyx_PyInt_AsChar(__pyx_t_2); if (unlikely((__pyx_t_6 == (char)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 367; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_self->parser->quotechar = __pyx_t_6; /* "pandas/parser.pyx":368 * * self.parser.quotechar = ord(quotechar) * self.parser.quoting = quoting # <<<<<<<<<<<<<< * * if comment is not None: */ __pyx_t_1 = __Pyx_PyInt_AsInt(__pyx_v_quoting); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 368; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_self->parser->quoting = __pyx_t_1; /* "pandas/parser.pyx":370 * self.parser.quoting = quoting * * if comment is not None: # <<<<<<<<<<<<<< * if len(comment) > 1: * raise ValueError('Only length-1 comment characters supported') */ __pyx_t_7 = (__pyx_v_comment != Py_None); __pyx_t_3 = (__pyx_t_7 != 0); if (__pyx_t_3) { /* "pandas/parser.pyx":371 * * if comment is not None: * if len(comment) > 1: # <<<<<<<<<<<<<< * raise ValueError('Only length-1 comment characters supported') * self.parser.commentchar = ord(comment) */ __pyx_t_4 = PyObject_Length(__pyx_v_comment); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 371; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_3 = ((__pyx_t_4 > 1) != 0); if (__pyx_t_3) { /* "pandas/parser.pyx":372 * if comment is not None: * if len(comment) > 1: * raise ValueError('Only length-1 comment characters supported') # <<<<<<<<<<<<<< * self.parser.commentchar = ord(comment) * */ __pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_31), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 372; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 372; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L13; } __pyx_L13:; /* "pandas/parser.pyx":373 * if len(comment) > 1: * raise ValueError('Only length-1 comment characters supported') * self.parser.commentchar = ord(comment) # <<<<<<<<<<<<<< * * # error handling of bad lines */ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 373; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_comment); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_comment); __Pyx_GIVEREF(__pyx_v_comment); __pyx_t_5 = PyObject_Call(__pyx_builtin_ord, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 373; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __pyx_t_6 = __Pyx_PyInt_AsChar(__pyx_t_5); if (unlikely((__pyx_t_6 == (char)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 373; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_v_self->parser->commentchar = __pyx_t_6; goto __pyx_L12; } __pyx_L12:; /* "pandas/parser.pyx":376 * * # error handling of bad lines * self.parser.error_bad_lines = int(error_bad_lines) # <<<<<<<<<<<<<< * self.parser.warn_bad_lines = int(warn_bad_lines) * */ __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 376; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_v_error_bad_lines); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_error_bad_lines); __Pyx_GIVEREF(__pyx_v_error_bad_lines); __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)(&PyInt_Type))), ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 376; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; __pyx_t_1 = __Pyx_PyInt_AsInt(__pyx_t_2); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 376; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_self->parser->error_bad_lines = __pyx_t_1; /* "pandas/parser.pyx":377 * # error handling of bad lines * self.parser.error_bad_lines = int(error_bad_lines) * self.parser.warn_bad_lines = int(warn_bad_lines) # <<<<<<<<<<<<<< * * self.skiprows = skiprows */ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 377; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_warn_bad_lines); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_warn_bad_lines); __Pyx_GIVEREF(__pyx_v_warn_bad_lines); __pyx_t_5 = PyObject_Call(((PyObject *)((PyObject*)(&PyInt_Type))), ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 377; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __pyx_t_1 = __Pyx_PyInt_AsInt(__pyx_t_5); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 377; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_v_self->parser->warn_bad_lines = __pyx_t_1; /* "pandas/parser.pyx":379 * self.parser.warn_bad_lines = int(warn_bad_lines) * * self.skiprows = skiprows # <<<<<<<<<<<<<< * if skiprows is not None: * self._make_skiprow_set() */ __Pyx_INCREF(__pyx_v_skiprows); __Pyx_GIVEREF(__pyx_v_skiprows); __Pyx_GOTREF(__pyx_v_self->skiprows); __Pyx_DECREF(__pyx_v_self->skiprows); __pyx_v_self->skiprows = __pyx_v_skiprows; /* "pandas/parser.pyx":380 * * self.skiprows = skiprows * if skiprows is not None: # <<<<<<<<<<<<<< * self._make_skiprow_set() * */ __pyx_t_3 = (__pyx_v_skiprows != Py_None); __pyx_t_7 = (__pyx_t_3 != 0); if (__pyx_t_7) { /* "pandas/parser.pyx":381 * self.skiprows = skiprows * if skiprows is not None: * self._make_skiprow_set() # <<<<<<<<<<<<<< * * self.skip_footer = skip_footer */ __pyx_t_5 = ((struct __pyx_vtabstruct_6pandas_6parser_TextReader *)__pyx_v_self->__pyx_vtab)->_make_skiprow_set(__pyx_v_self); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 381; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; goto __pyx_L14; } __pyx_L14:; /* "pandas/parser.pyx":383 * self._make_skiprow_set() * * self.skip_footer = skip_footer # <<<<<<<<<<<<<< * * # suboptimal */ __pyx_t_1 = __Pyx_PyInt_AsInt(__pyx_v_skip_footer); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 383; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_self->skip_footer = __pyx_t_1; /* "pandas/parser.pyx":386 * * # suboptimal * if usecols is not None: # <<<<<<<<<<<<<< * self.has_usecols = 1 * self.usecols = set(usecols) */ __pyx_t_7 = (__pyx_v_usecols != Py_None); __pyx_t_3 = (__pyx_t_7 != 0); if (__pyx_t_3) { /* "pandas/parser.pyx":387 * # suboptimal * if usecols is not None: * self.has_usecols = 1 # <<<<<<<<<<<<<< * self.usecols = set(usecols) * */ __pyx_v_self->has_usecols = 1; /* "pandas/parser.pyx":388 * if usecols is not None: * self.has_usecols = 1 * self.usecols = set(usecols) # <<<<<<<<<<<<<< * * # XXX */ __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 388; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_v_usecols); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_usecols); __Pyx_GIVEREF(__pyx_v_usecols); __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)(&PySet_Type))), ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 388; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; __Pyx_GIVEREF(__pyx_t_2); __Pyx_GOTREF(__pyx_v_self->usecols); __Pyx_DECREF(((PyObject *)__pyx_v_self->usecols)); __pyx_v_self->usecols = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; goto __pyx_L15; } __pyx_L15:; /* "pandas/parser.pyx":391 * * # XXX * if skip_footer > 0: # <<<<<<<<<<<<<< * self.parser.error_bad_lines = 0 * self.parser.warn_bad_lines = 0 */ __pyx_t_2 = PyObject_RichCompare(__pyx_v_skip_footer, __pyx_int_0, Py_GT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 391; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 391; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_3) { /* "pandas/parser.pyx":392 * # XXX * if skip_footer > 0: * self.parser.error_bad_lines = 0 # <<<<<<<<<<<<<< * self.parser.warn_bad_lines = 0 * */ __pyx_v_self->parser->error_bad_lines = 0; /* "pandas/parser.pyx":393 * if skip_footer > 0: * self.parser.error_bad_lines = 0 * self.parser.warn_bad_lines = 0 # <<<<<<<<<<<<<< * * self.delimiter = delimiter */ __pyx_v_self->parser->warn_bad_lines = 0; goto __pyx_L16; } __pyx_L16:; /* "pandas/parser.pyx":395 * self.parser.warn_bad_lines = 0 * * self.delimiter = delimiter # <<<<<<<<<<<<<< * self.delim_whitespace = delim_whitespace * */ __Pyx_INCREF(__pyx_v_delimiter); __Pyx_GIVEREF(__pyx_v_delimiter); __Pyx_GOTREF(__pyx_v_self->delimiter); __Pyx_DECREF(__pyx_v_self->delimiter); __pyx_v_self->delimiter = __pyx_v_delimiter; /* "pandas/parser.pyx":396 * * self.delimiter = delimiter * self.delim_whitespace = delim_whitespace # <<<<<<<<<<<<<< * * self.na_values = na_values */ __Pyx_INCREF(__pyx_v_delim_whitespace); __Pyx_GIVEREF(__pyx_v_delim_whitespace); __Pyx_GOTREF(__pyx_v_self->delim_whitespace); __Pyx_DECREF(__pyx_v_self->delim_whitespace); __pyx_v_self->delim_whitespace = __pyx_v_delim_whitespace; /* "pandas/parser.pyx":398 * self.delim_whitespace = delim_whitespace * * self.na_values = na_values # <<<<<<<<<<<<<< * if na_fvalues is None: * na_fvalues = set() */ __Pyx_INCREF(__pyx_v_na_values); __Pyx_GIVEREF(__pyx_v_na_values); __Pyx_GOTREF(__pyx_v_self->na_values); __Pyx_DECREF(__pyx_v_self->na_values); __pyx_v_self->na_values = __pyx_v_na_values; /* "pandas/parser.pyx":399 * * self.na_values = na_values * if na_fvalues is None: # <<<<<<<<<<<<<< * na_fvalues = set() * self.na_fvalues = na_fvalues */ __pyx_t_3 = (__pyx_v_na_fvalues == Py_None); __pyx_t_7 = (__pyx_t_3 != 0); if (__pyx_t_7) { /* "pandas/parser.pyx":400 * self.na_values = na_values * if na_fvalues is None: * na_fvalues = set() # <<<<<<<<<<<<<< * self.na_fvalues = na_fvalues * */ __pyx_t_2 = PySet_New(0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 400; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_2)); __Pyx_DECREF_SET(__pyx_v_na_fvalues, ((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; goto __pyx_L17; } __pyx_L17:; /* "pandas/parser.pyx":401 * if na_fvalues is None: * na_fvalues = set() * self.na_fvalues = na_fvalues # <<<<<<<<<<<<<< * * self.true_values = _maybe_encode(true_values) */ __Pyx_INCREF(__pyx_v_na_fvalues); __Pyx_GIVEREF(__pyx_v_na_fvalues); __Pyx_GOTREF(__pyx_v_self->na_fvalues); __Pyx_DECREF(__pyx_v_self->na_fvalues); __pyx_v_self->na_fvalues = __pyx_v_na_fvalues; /* "pandas/parser.pyx":403 * self.na_fvalues = na_fvalues * * self.true_values = _maybe_encode(true_values) # <<<<<<<<<<<<<< * self.false_values = _maybe_encode(false_values) * */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s___maybe_encode); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 403; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 403; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_v_true_values); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_true_values); __Pyx_GIVEREF(__pyx_v_true_values); __pyx_t_8 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 403; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; __Pyx_GIVEREF(__pyx_t_8); __Pyx_GOTREF(__pyx_v_self->true_values); __Pyx_DECREF(__pyx_v_self->true_values); __pyx_v_self->true_values = __pyx_t_8; __pyx_t_8 = 0; /* "pandas/parser.pyx":404 * * self.true_values = _maybe_encode(true_values) * self.false_values = _maybe_encode(false_values) # <<<<<<<<<<<<<< * * self.converters = converters */ __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s___maybe_encode); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 404; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 404; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_v_false_values); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_false_values); __Pyx_GIVEREF(__pyx_v_false_values); __pyx_t_2 = PyObject_Call(__pyx_t_8, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 404; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; __Pyx_GIVEREF(__pyx_t_2); __Pyx_GOTREF(__pyx_v_self->false_values); __Pyx_DECREF(__pyx_v_self->false_values); __pyx_v_self->false_values = __pyx_t_2; __pyx_t_2 = 0; /* "pandas/parser.pyx":406 * self.false_values = _maybe_encode(false_values) * * self.converters = converters # <<<<<<<<<<<<<< * * self.na_filter = na_filter */ __Pyx_INCREF(__pyx_v_converters); __Pyx_GIVEREF(__pyx_v_converters); __Pyx_GOTREF(__pyx_v_self->converters); __Pyx_DECREF(__pyx_v_self->converters); __pyx_v_self->converters = __pyx_v_converters; /* "pandas/parser.pyx":408 * self.converters = converters * * self.na_filter = na_filter # <<<<<<<<<<<<<< * self.as_recarray = as_recarray * */ __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_v_na_filter); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 408; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_self->na_filter = __pyx_t_7; /* "pandas/parser.pyx":409 * * self.na_filter = na_filter * self.as_recarray = as_recarray # <<<<<<<<<<<<<< * * self.compact_ints = compact_ints */ __Pyx_INCREF(__pyx_v_as_recarray); __Pyx_GIVEREF(__pyx_v_as_recarray); __Pyx_GOTREF(__pyx_v_self->as_recarray); __Pyx_DECREF(__pyx_v_self->as_recarray); __pyx_v_self->as_recarray = __pyx_v_as_recarray; /* "pandas/parser.pyx":411 * self.as_recarray = as_recarray * * self.compact_ints = compact_ints # <<<<<<<<<<<<<< * self.use_unsigned = use_unsigned * */ __Pyx_INCREF(__pyx_v_compact_ints); __Pyx_GIVEREF(__pyx_v_compact_ints); __Pyx_GOTREF(__pyx_v_self->compact_ints); __Pyx_DECREF(__pyx_v_self->compact_ints); __pyx_v_self->compact_ints = __pyx_v_compact_ints; /* "pandas/parser.pyx":412 * * self.compact_ints = compact_ints * self.use_unsigned = use_unsigned # <<<<<<<<<<<<<< * * self.verbose = verbose */ __Pyx_INCREF(__pyx_v_use_unsigned); __Pyx_GIVEREF(__pyx_v_use_unsigned); __Pyx_GOTREF(__pyx_v_self->use_unsigned); __Pyx_DECREF(__pyx_v_self->use_unsigned); __pyx_v_self->use_unsigned = __pyx_v_use_unsigned; /* "pandas/parser.pyx":414 * self.use_unsigned = use_unsigned * * self.verbose = verbose # <<<<<<<<<<<<<< * self.low_memory = low_memory * */ __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_v_verbose); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 414; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_self->verbose = __pyx_t_7; /* "pandas/parser.pyx":415 * * self.verbose = verbose * self.low_memory = low_memory # <<<<<<<<<<<<<< * * # encoding */ __Pyx_INCREF(__pyx_v_low_memory); __Pyx_GIVEREF(__pyx_v_low_memory); __Pyx_GOTREF(__pyx_v_self->low_memory); __Pyx_DECREF(__pyx_v_self->low_memory); __pyx_v_self->low_memory = __pyx_v_low_memory; /* "pandas/parser.pyx":418 * * # encoding * if encoding is not None: # <<<<<<<<<<<<<< * if not isinstance(encoding, bytes): * encoding = encoding.encode('utf-8') */ __pyx_t_7 = (__pyx_v_encoding != Py_None); __pyx_t_3 = (__pyx_t_7 != 0); if (__pyx_t_3) { /* "pandas/parser.pyx":419 * # encoding * if encoding is not None: * if not isinstance(encoding, bytes): # <<<<<<<<<<<<<< * encoding = encoding.encode('utf-8') * encoding = encoding.lower() */ __pyx_t_3 = PyBytes_Check(__pyx_v_encoding); __pyx_t_7 = ((!(__pyx_t_3 != 0)) != 0); if (__pyx_t_7) { /* "pandas/parser.pyx":420 * if encoding is not None: * if not isinstance(encoding, bytes): * encoding = encoding.encode('utf-8') # <<<<<<<<<<<<<< * encoding = encoding.lower() * self.c_encoding = encoding */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_encoding, __pyx_n_s__encode); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 420; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_k_tuple_33), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 420; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF_SET(__pyx_v_encoding, __pyx_t_5); __pyx_t_5 = 0; goto __pyx_L19; } __pyx_L19:; /* "pandas/parser.pyx":421 * if not isinstance(encoding, bytes): * encoding = encoding.encode('utf-8') * encoding = encoding.lower() # <<<<<<<<<<<<<< * self.c_encoding = encoding * else: */ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_encoding, __pyx_n_s__lower); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 421; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_2 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 421; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF_SET(__pyx_v_encoding, __pyx_t_2); __pyx_t_2 = 0; /* "pandas/parser.pyx":422 * encoding = encoding.encode('utf-8') * encoding = encoding.lower() * self.c_encoding = encoding # <<<<<<<<<<<<<< * else: * self.c_encoding = NULL */ __pyx_t_9 = __Pyx_PyObject_AsString(__pyx_v_encoding); if (unlikely((!__pyx_t_9) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 422; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_self->c_encoding = ((char *)__pyx_t_9); goto __pyx_L18; } /*else*/ { /* "pandas/parser.pyx":424 * self.c_encoding = encoding * else: * self.c_encoding = NULL # <<<<<<<<<<<<<< * * self.encoding = encoding */ __pyx_v_self->c_encoding = NULL; } __pyx_L18:; /* "pandas/parser.pyx":426 * self.c_encoding = NULL * * self.encoding = encoding # <<<<<<<<<<<<<< * * if isinstance(dtype, dict): */ __Pyx_INCREF(__pyx_v_encoding); __Pyx_GIVEREF(__pyx_v_encoding); __Pyx_GOTREF(__pyx_v_self->encoding); __Pyx_DECREF(__pyx_v_self->encoding); __pyx_v_self->encoding = __pyx_v_encoding; /* "pandas/parser.pyx":428 * self.encoding = encoding * * if isinstance(dtype, dict): # <<<<<<<<<<<<<< * conv = {} * for k in dtype: */ __pyx_t_7 = PyDict_Check(__pyx_v_dtype); __pyx_t_3 = (__pyx_t_7 != 0); if (__pyx_t_3) { /* "pandas/parser.pyx":429 * * if isinstance(dtype, dict): * conv = {} # <<<<<<<<<<<<<< * for k in dtype: * v = dtype[k] */ __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 429; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_2)); __pyx_v_conv = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; /* "pandas/parser.pyx":430 * if isinstance(dtype, dict): * conv = {} * for k in dtype: # <<<<<<<<<<<<<< * v = dtype[k] * if isinstance(v, basestring): */ if (PyList_CheckExact(__pyx_v_dtype) || PyTuple_CheckExact(__pyx_v_dtype)) { __pyx_t_2 = __pyx_v_dtype; __Pyx_INCREF(__pyx_t_2); __pyx_t_4 = 0; __pyx_t_10 = NULL; } else { __pyx_t_4 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_dtype); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 430; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_10 = Py_TYPE(__pyx_t_2)->tp_iternext; } for (;;) { if (!__pyx_t_10 && PyList_CheckExact(__pyx_t_2)) { if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_2)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_5 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_5); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 430; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_5 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 430; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif } else if (!__pyx_t_10 && PyTuple_CheckExact(__pyx_t_2)) { if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_2)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_5); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 430; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_5 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 430; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif } else { __pyx_t_5 = __pyx_t_10(__pyx_t_2); if (unlikely(!__pyx_t_5)) { if (PyErr_Occurred()) { if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear(); else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 430; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } break; } __Pyx_GOTREF(__pyx_t_5); } __Pyx_XDECREF_SET(__pyx_v_k, __pyx_t_5); __pyx_t_5 = 0; /* "pandas/parser.pyx":431 * conv = {} * for k in dtype: * v = dtype[k] # <<<<<<<<<<<<<< * if isinstance(v, basestring): * v = np.dtype(v) */ __pyx_t_5 = PyObject_GetItem(__pyx_v_dtype, __pyx_v_k); if (!__pyx_t_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 431; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_XDECREF_SET(__pyx_v_v, __pyx_t_5); __pyx_t_5 = 0; /* "pandas/parser.pyx":432 * for k in dtype: * v = dtype[k] * if isinstance(v, basestring): # <<<<<<<<<<<<<< * v = np.dtype(v) * conv[k] = v */ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s__basestring); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 432; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = PyObject_IsInstance(__pyx_v_v, __pyx_t_5); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 432; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_7 = (__pyx_t_3 != 0); if (__pyx_t_7) { /* "pandas/parser.pyx":433 * v = dtype[k] * if isinstance(v, basestring): * v = np.dtype(v) # <<<<<<<<<<<<<< * conv[k] = v * dtype = conv */ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 433; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s__dtype); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 433; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 433; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_v_v); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_v); __Pyx_GIVEREF(__pyx_v_v); __pyx_t_11 = PyObject_Call(__pyx_t_8, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 433; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; __Pyx_DECREF_SET(__pyx_v_v, __pyx_t_11); __pyx_t_11 = 0; goto __pyx_L23; } __pyx_L23:; /* "pandas/parser.pyx":434 * if isinstance(v, basestring): * v = np.dtype(v) * conv[k] = v # <<<<<<<<<<<<<< * dtype = conv * elif dtype is not None: */ if (PyDict_SetItem(((PyObject *)__pyx_v_conv), __pyx_v_k, __pyx_v_v) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 434; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/parser.pyx":435 * v = np.dtype(v) * conv[k] = v * dtype = conv # <<<<<<<<<<<<<< * elif dtype is not None: * dtype = np.dtype(dtype) */ __Pyx_INCREF(((PyObject *)__pyx_v_conv)); __Pyx_DECREF_SET(__pyx_v_dtype, ((PyObject *)__pyx_v_conv)); goto __pyx_L20; } /* "pandas/parser.pyx":436 * conv[k] = v * dtype = conv * elif dtype is not None: # <<<<<<<<<<<<<< * dtype = np.dtype(dtype) * */ __pyx_t_7 = (__pyx_v_dtype != Py_None); __pyx_t_3 = (__pyx_t_7 != 0); if (__pyx_t_3) { /* "pandas/parser.pyx":437 * dtype = conv * elif dtype is not None: * dtype = np.dtype(dtype) # <<<<<<<<<<<<<< * * self.dtype = dtype */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 437; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__dtype); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 437; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 437; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_dtype); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_dtype); __Pyx_GIVEREF(__pyx_v_dtype); __pyx_t_5 = PyObject_Call(__pyx_t_11, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 437; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __Pyx_DECREF_SET(__pyx_v_dtype, __pyx_t_5); __pyx_t_5 = 0; goto __pyx_L20; } __pyx_L20:; /* "pandas/parser.pyx":439 * dtype = np.dtype(dtype) * * self.dtype = dtype # <<<<<<<<<<<<<< * * # XXX */ __Pyx_INCREF(__pyx_v_dtype); __Pyx_GIVEREF(__pyx_v_dtype); __Pyx_GOTREF(__pyx_v_self->dtype); __Pyx_DECREF(__pyx_v_self->dtype); __pyx_v_self->dtype = __pyx_v_dtype; /* "pandas/parser.pyx":442 * * # XXX * self.noconvert = set() # <<<<<<<<<<<<<< * * self.index_col = index_col */ __pyx_t_5 = PySet_New(0); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 442; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_5)); __Pyx_GIVEREF(((PyObject *)__pyx_t_5)); __Pyx_GOTREF(__pyx_v_self->noconvert); __Pyx_DECREF(((PyObject *)__pyx_v_self->noconvert)); __pyx_v_self->noconvert = ((PyObject*)__pyx_t_5); __pyx_t_5 = 0; /* "pandas/parser.pyx":444 * self.noconvert = set() * * self.index_col = index_col # <<<<<<<<<<<<<< * * #---------------------------------------- */ __Pyx_INCREF(__pyx_v_index_col); __Pyx_GIVEREF(__pyx_v_index_col); __Pyx_GOTREF(__pyx_v_self->index_col); __Pyx_DECREF(__pyx_v_self->index_col); __pyx_v_self->index_col = __pyx_v_index_col; /* "pandas/parser.pyx":449 * # header stuff * * self.allow_leading_cols = allow_leading_cols # <<<<<<<<<<<<<< * self.leading_cols = 0 * */ __Pyx_INCREF(__pyx_v_allow_leading_cols); __Pyx_GIVEREF(__pyx_v_allow_leading_cols); __Pyx_GOTREF(__pyx_v_self->allow_leading_cols); __Pyx_DECREF(__pyx_v_self->allow_leading_cols); __pyx_v_self->allow_leading_cols = __pyx_v_allow_leading_cols; /* "pandas/parser.pyx":450 * * self.allow_leading_cols = allow_leading_cols * self.leading_cols = 0 # <<<<<<<<<<<<<< * * # TODO: no header vs. header is not the first row */ __pyx_v_self->leading_cols = 0; /* "pandas/parser.pyx":453 * * # TODO: no header vs. header is not the first row * self.has_mi_columns = 0 # <<<<<<<<<<<<<< * self.orig_header = header * if header is None: */ __pyx_v_self->has_mi_columns = 0; /* "pandas/parser.pyx":454 * # TODO: no header vs. header is not the first row * self.has_mi_columns = 0 * self.orig_header = header # <<<<<<<<<<<<<< * if header is None: * # sentinel value */ __Pyx_INCREF(__pyx_v_header); __Pyx_GIVEREF(__pyx_v_header); __Pyx_GOTREF(__pyx_v_self->orig_header); __Pyx_DECREF(__pyx_v_self->orig_header); __pyx_v_self->orig_header = __pyx_v_header; /* "pandas/parser.pyx":455 * self.has_mi_columns = 0 * self.orig_header = header * if header is None: # <<<<<<<<<<<<<< * # sentinel value * self.parser.header_start = -1 */ __pyx_t_3 = (__pyx_v_header == Py_None); __pyx_t_7 = (__pyx_t_3 != 0); if (__pyx_t_7) { /* "pandas/parser.pyx":457 * if header is None: * # sentinel value * self.parser.header_start = -1 # <<<<<<<<<<<<<< * self.parser.header_end = -1 * self.parser.header = -1 */ __pyx_v_self->parser->header_start = -1; /* "pandas/parser.pyx":458 * # sentinel value * self.parser.header_start = -1 * self.parser.header_end = -1 # <<<<<<<<<<<<<< * self.parser.header = -1 * self.parser_start = 0 */ __pyx_v_self->parser->header_end = -1; /* "pandas/parser.pyx":459 * self.parser.header_start = -1 * self.parser.header_end = -1 * self.parser.header = -1 # <<<<<<<<<<<<<< * self.parser_start = 0 * self.header = [] */ __pyx_v_self->parser->header = -1; /* "pandas/parser.pyx":460 * self.parser.header_end = -1 * self.parser.header = -1 * self.parser_start = 0 # <<<<<<<<<<<<<< * self.header = [] * else: */ __pyx_v_self->parser_start = 0; /* "pandas/parser.pyx":461 * self.parser.header = -1 * self.parser_start = 0 * self.header = [] # <<<<<<<<<<<<<< * else: * if isinstance(header, list) and len(header): */ __pyx_t_5 = PyList_New(0); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 461; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(((PyObject *)__pyx_t_5)); __Pyx_GOTREF(__pyx_v_self->header); __Pyx_DECREF(__pyx_v_self->header); __pyx_v_self->header = ((PyObject *)__pyx_t_5); __pyx_t_5 = 0; goto __pyx_L24; } /*else*/ { /* "pandas/parser.pyx":463 * self.header = [] * else: * if isinstance(header, list) and len(header): # <<<<<<<<<<<<<< * # need to artifically skip the final line * # which is still a header line */ __pyx_t_7 = PyList_Check(__pyx_v_header); if (__pyx_t_7) { __pyx_t_4 = PyObject_Length(__pyx_v_header); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 463; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_3 = (__pyx_t_4 != 0); } else { __pyx_t_3 = __pyx_t_7; } if (__pyx_t_3) { /* "pandas/parser.pyx":466 * # need to artifically skip the final line * # which is still a header line * header = list(header) # <<<<<<<<<<<<<< * header.append(header[-1]+1) * */ __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 466; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_v_header); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_header); __Pyx_GIVEREF(__pyx_v_header); __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)(&PyList_Type))), ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 466; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; __Pyx_DECREF_SET(__pyx_v_header, __pyx_t_2); __pyx_t_2 = 0; /* "pandas/parser.pyx":467 * # which is still a header line * header = list(header) * header.append(header[-1]+1) # <<<<<<<<<<<<<< * * self.parser.header_start = header[0] */ __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_header, -1, sizeof(long), PyInt_FromLong, 0, 1, 1); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 467; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = PyNumber_Add(__pyx_t_2, __pyx_int_1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 467; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyObject_Append(__pyx_v_header, __pyx_t_5); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 467; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/parser.pyx":469 * header.append(header[-1]+1) * * self.parser.header_start = header[0] # <<<<<<<<<<<<<< * self.parser.header_end = header[-1] * self.parser.header = header[0] */ __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_header, 0, sizeof(long), PyInt_FromLong, 0, 0, 1); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 469; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __Pyx_PyInt_AsInt(__pyx_t_2); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 469; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_self->parser->header_start = __pyx_t_1; /* "pandas/parser.pyx":470 * * self.parser.header_start = header[0] * self.parser.header_end = header[-1] # <<<<<<<<<<<<<< * self.parser.header = header[0] * self.parser_start = header[-1] + 1 */ __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_header, -1, sizeof(long), PyInt_FromLong, 0, 1, 1); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 470; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __Pyx_PyInt_AsInt(__pyx_t_2); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 470; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_self->parser->header_end = __pyx_t_1; /* "pandas/parser.pyx":471 * self.parser.header_start = header[0] * self.parser.header_end = header[-1] * self.parser.header = header[0] # <<<<<<<<<<<<<< * self.parser_start = header[-1] + 1 * self.has_mi_columns = 1 */ __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_header, 0, sizeof(long), PyInt_FromLong, 0, 0, 1); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 471; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __Pyx_PyInt_AsInt(__pyx_t_2); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 471; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_self->parser->header = __pyx_t_1; /* "pandas/parser.pyx":472 * self.parser.header_end = header[-1] * self.parser.header = header[0] * self.parser_start = header[-1] + 1 # <<<<<<<<<<<<<< * self.has_mi_columns = 1 * self.header = header */ __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_header, -1, sizeof(long), PyInt_FromLong, 0, 1, 1); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 472; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = PyNumber_Add(__pyx_t_2, __pyx_int_1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 472; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_1 = __Pyx_PyInt_AsInt(__pyx_t_5); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 472; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_v_self->parser_start = __pyx_t_1; /* "pandas/parser.pyx":473 * self.parser.header = header[0] * self.parser_start = header[-1] + 1 * self.has_mi_columns = 1 # <<<<<<<<<<<<<< * self.header = header * else: */ __pyx_v_self->has_mi_columns = 1; /* "pandas/parser.pyx":474 * self.parser_start = header[-1] + 1 * self.has_mi_columns = 1 * self.header = header # <<<<<<<<<<<<<< * else: * self.parser.header_start = header */ __Pyx_INCREF(__pyx_v_header); __Pyx_GIVEREF(__pyx_v_header); __Pyx_GOTREF(__pyx_v_self->header); __Pyx_DECREF(__pyx_v_self->header); __pyx_v_self->header = __pyx_v_header; goto __pyx_L25; } /*else*/ { /* "pandas/parser.pyx":476 * self.header = header * else: * self.parser.header_start = header # <<<<<<<<<<<<<< * self.parser.header_end = header * self.parser.header = header */ __pyx_t_1 = __Pyx_PyInt_AsInt(__pyx_v_header); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 476; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_self->parser->header_start = __pyx_t_1; /* "pandas/parser.pyx":477 * else: * self.parser.header_start = header * self.parser.header_end = header # <<<<<<<<<<<<<< * self.parser.header = header * self.parser_start = header + 1 */ __pyx_t_1 = __Pyx_PyInt_AsInt(__pyx_v_header); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 477; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_self->parser->header_end = __pyx_t_1; /* "pandas/parser.pyx":478 * self.parser.header_start = header * self.parser.header_end = header * self.parser.header = header # <<<<<<<<<<<<<< * self.parser_start = header + 1 * self.header = [ header ] */ __pyx_t_1 = __Pyx_PyInt_AsInt(__pyx_v_header); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 478; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_self->parser->header = __pyx_t_1; /* "pandas/parser.pyx":479 * self.parser.header_end = header * self.parser.header = header * self.parser_start = header + 1 # <<<<<<<<<<<<<< * self.header = [ header ] * */ __pyx_t_5 = PyNumber_Add(__pyx_v_header, __pyx_int_1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 479; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_1 = __Pyx_PyInt_AsInt(__pyx_t_5); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 479; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_v_self->parser_start = __pyx_t_1; /* "pandas/parser.pyx":480 * self.parser.header = header * self.parser_start = header + 1 * self.header = [ header ] # <<<<<<<<<<<<<< * * self.names = names */ __pyx_t_5 = PyList_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 480; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_v_header); PyList_SET_ITEM(__pyx_t_5, 0, __pyx_v_header); __Pyx_GIVEREF(__pyx_v_header); __Pyx_GIVEREF(((PyObject *)__pyx_t_5)); __Pyx_GOTREF(__pyx_v_self->header); __Pyx_DECREF(__pyx_v_self->header); __pyx_v_self->header = ((PyObject *)__pyx_t_5); __pyx_t_5 = 0; } __pyx_L25:; } __pyx_L24:; /* "pandas/parser.pyx":482 * self.header = [ header ] * * self.names = names # <<<<<<<<<<<<<< * self.header, self.table_width = self._get_header() * */ __Pyx_INCREF(__pyx_v_names); __Pyx_GIVEREF(__pyx_v_names); __Pyx_GOTREF(__pyx_v_self->names); __Pyx_DECREF(__pyx_v_self->names); __pyx_v_self->names = __pyx_v_names; /* "pandas/parser.pyx":483 * * self.names = names * self.header, self.table_width = self._get_header() # <<<<<<<<<<<<<< * * if not self.table_width: */ __pyx_t_5 = ((struct __pyx_vtabstruct_6pandas_6parser_TextReader *)__pyx_v_self->__pyx_vtab)->_get_header(__pyx_v_self); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 483; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); if ((likely(PyTuple_CheckExact(__pyx_t_5))) || (PyList_CheckExact(__pyx_t_5))) { PyObject* sequence = __pyx_t_5; #if CYTHON_COMPILING_IN_CPYTHON Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 483; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_11 = PyTuple_GET_ITEM(sequence, 1); } else { __pyx_t_2 = PyList_GET_ITEM(sequence, 0); __pyx_t_11 = PyList_GET_ITEM(sequence, 1); } __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(__pyx_t_11); #else __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 483; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_11 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 483; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); #endif __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } else { Py_ssize_t index = -1; __pyx_t_8 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 483; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_12 = Py_TYPE(__pyx_t_8)->tp_iternext; index = 0; __pyx_t_2 = __pyx_t_12(__pyx_t_8); if (unlikely(!__pyx_t_2)) goto __pyx_L26_unpacking_failed; __Pyx_GOTREF(__pyx_t_2); index = 1; __pyx_t_11 = __pyx_t_12(__pyx_t_8); if (unlikely(!__pyx_t_11)) goto __pyx_L26_unpacking_failed; __Pyx_GOTREF(__pyx_t_11); if (__Pyx_IternextUnpackEndCheck(__pyx_t_12(__pyx_t_8), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 483; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_12 = NULL; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; goto __pyx_L27_unpacking_done; __pyx_L26_unpacking_failed:; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_12 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 483; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_L27_unpacking_done:; } __pyx_t_1 = __Pyx_PyInt_AsInt(__pyx_t_11); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 483; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_GIVEREF(__pyx_t_2); __Pyx_GOTREF(__pyx_v_self->header); __Pyx_DECREF(__pyx_v_self->header); __pyx_v_self->header = __pyx_t_2; __pyx_t_2 = 0; __pyx_v_self->table_width = __pyx_t_1; /* "pandas/parser.pyx":485 * self.header, self.table_width = self._get_header() * * if not self.table_width: # <<<<<<<<<<<<<< * raise ValueError("No columns to parse from file") * */ __pyx_t_3 = ((!(__pyx_v_self->table_width != 0)) != 0); if (__pyx_t_3) { /* "pandas/parser.pyx":486 * * if not self.table_width: * raise ValueError("No columns to parse from file") # <<<<<<<<<<<<<< * * # compute buffer_lines as function of table width */ __pyx_t_5 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_35), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 486; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_Raise(__pyx_t_5, 0, 0, 0); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 486; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L28; } __pyx_L28:; /* "pandas/parser.pyx":489 * * # compute buffer_lines as function of table width * heuristic = 2**20 // self.table_width # <<<<<<<<<<<<<< * self.buffer_lines = 1 * while self.buffer_lines * 2< heuristic: */ if (unlikely(__pyx_v_self->table_width == 0)) { #ifdef WITH_THREAD PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure(); #endif PyErr_Format(PyExc_ZeroDivisionError, "integer division or modulo by zero"); #ifdef WITH_THREAD PyGILState_Release(__pyx_gilstate_save); #endif {__pyx_filename = __pyx_f[0]; __pyx_lineno = 489; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } else if (sizeof(long) == sizeof(long) && unlikely(__pyx_v_self->table_width == -1) && unlikely(UNARY_NEG_WOULD_OVERFLOW(1048576))) { #ifdef WITH_THREAD PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure(); #endif PyErr_Format(PyExc_OverflowError, "value too large to perform division"); #ifdef WITH_THREAD PyGILState_Release(__pyx_gilstate_save); #endif {__pyx_filename = __pyx_f[0]; __pyx_lineno = 489; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_heuristic = __Pyx_div_long(1048576, __pyx_v_self->table_width); /* "pandas/parser.pyx":490 * # compute buffer_lines as function of table width * heuristic = 2**20 // self.table_width * self.buffer_lines = 1 # <<<<<<<<<<<<<< * while self.buffer_lines * 2< heuristic: * self.buffer_lines *= 2 */ __pyx_v_self->buffer_lines = 1; /* "pandas/parser.pyx":491 * heuristic = 2**20 // self.table_width * self.buffer_lines = 1 * while self.buffer_lines * 2< heuristic: # <<<<<<<<<<<<<< * self.buffer_lines *= 2 * */ while (1) { __pyx_t_3 = (((__pyx_v_self->buffer_lines * 2) < __pyx_v_heuristic) != 0); if (!__pyx_t_3) break; /* "pandas/parser.pyx":492 * self.buffer_lines = 1 * while self.buffer_lines * 2< heuristic: * self.buffer_lines *= 2 # <<<<<<<<<<<<<< * * def __init__(self, *args, **kwards): */ __pyx_v_self->buffer_lines = (__pyx_v_self->buffer_lines * 2); } __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_11); __Pyx_AddTraceback("pandas.parser.TextReader.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_XDECREF(__pyx_v_conv); __Pyx_XDECREF(__pyx_v_k); __Pyx_XDECREF(__pyx_v_v); __Pyx_XDECREF(__pyx_v_header); __Pyx_XDECREF(__pyx_v_encoding); __Pyx_XDECREF(__pyx_v_dtype); __Pyx_XDECREF(__pyx_v_na_fvalues); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pandas_6parser_10TextReader_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_pw_6pandas_6parser_10TextReader_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { CYTHON_UNUSED PyObject *__pyx_v_args = 0; CYTHON_UNUSED PyObject *__pyx_v_kwards = 0; int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); if (unlikely(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__init__", 1))) return -1; __pyx_v_kwards = (__pyx_kwds) ? PyDict_Copy(__pyx_kwds) : PyDict_New(); if (unlikely(!__pyx_v_kwards)) return -1; __Pyx_GOTREF(__pyx_v_kwards); __Pyx_INCREF(__pyx_args); __pyx_v_args = __pyx_args; __pyx_r = __pyx_pf_6pandas_6parser_10TextReader_2__init__(((struct __pyx_obj_6pandas_6parser_TextReader *)__pyx_v_self), __pyx_v_args, __pyx_v_kwards); __Pyx_XDECREF(__pyx_v_args); __Pyx_XDECREF(__pyx_v_kwards); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/parser.pyx":494 * self.buffer_lines *= 2 * * def __init__(self, *args, **kwards): # <<<<<<<<<<<<<< * pass * */ static int __pyx_pf_6pandas_6parser_10TextReader_2__init__(CYTHON_UNUSED struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_args, CYTHON_UNUSED PyObject *__pyx_v_kwards) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__init__", 0); __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static void __pyx_pw_6pandas_6parser_10TextReader_5__dealloc__(PyObject *__pyx_v_self); /*proto*/ static void __pyx_pw_6pandas_6parser_10TextReader_5__dealloc__(PyObject *__pyx_v_self) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0); __pyx_pf_6pandas_6parser_10TextReader_4__dealloc__(((struct __pyx_obj_6pandas_6parser_TextReader *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); } /* "pandas/parser.pyx":497 * pass * * def __dealloc__(self): # <<<<<<<<<<<<<< * parser_free(self.parser) * */ static void __pyx_pf_6pandas_6parser_10TextReader_4__dealloc__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__dealloc__", 0); /* "pandas/parser.pyx":498 * * def __dealloc__(self): * parser_free(self.parser) # <<<<<<<<<<<<<< * * def set_error_bad_lines(self, int status): */ parser_free(__pyx_v_self->parser); __Pyx_RefNannyFinishContext(); } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_6parser_10TextReader_7set_error_bad_lines(PyObject *__pyx_v_self, PyObject *__pyx_arg_status); /*proto*/ static PyObject *__pyx_pw_6pandas_6parser_10TextReader_7set_error_bad_lines(PyObject *__pyx_v_self, PyObject *__pyx_arg_status) { int __pyx_v_status; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("set_error_bad_lines (wrapper)", 0); assert(__pyx_arg_status); { __pyx_v_status = __Pyx_PyInt_AsInt(__pyx_arg_status); if (unlikely((__pyx_v_status == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 500; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; __Pyx_AddTraceback("pandas.parser.TextReader.set_error_bad_lines", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pandas_6parser_10TextReader_6set_error_bad_lines(((struct __pyx_obj_6pandas_6parser_TextReader *)__pyx_v_self), ((int)__pyx_v_status)); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/parser.pyx":500 * parser_free(self.parser) * * def set_error_bad_lines(self, int status): # <<<<<<<<<<<<<< * self.parser.error_bad_lines = status * */ static PyObject *__pyx_pf_6pandas_6parser_10TextReader_6set_error_bad_lines(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self, int __pyx_v_status) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("set_error_bad_lines", 0); /* "pandas/parser.pyx":501 * * def set_error_bad_lines(self, int status): * self.parser.error_bad_lines = status # <<<<<<<<<<<<<< * * cdef _make_skiprow_set(self): */ __pyx_v_self->parser->error_bad_lines = __pyx_v_status; __pyx_r = Py_None; __Pyx_INCREF(Py_None); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/parser.pyx":503 * self.parser.error_bad_lines = status * * cdef _make_skiprow_set(self): # <<<<<<<<<<<<<< * if isinstance(self.skiprows, (int, np.integer)): * self.skiprows = range(self.skiprows) */ static PyObject *__pyx_f_6pandas_6parser_10TextReader__make_skiprow_set(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self) { PyObject *__pyx_v_i = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_t_4; int __pyx_t_5; Py_ssize_t __pyx_t_6; PyObject *(*__pyx_t_7)(PyObject *); __pyx_t_5numpy_int64_t __pyx_t_8; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_make_skiprow_set", 0); /* "pandas/parser.pyx":504 * * cdef _make_skiprow_set(self): * if isinstance(self.skiprows, (int, np.integer)): # <<<<<<<<<<<<<< * self.skiprows = range(self.skiprows) * */ __pyx_t_1 = __pyx_v_self->skiprows; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 504; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__integer); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 504; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 504; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(((PyObject *)((PyObject*)(&PyInt_Type)))); PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)((PyObject*)(&PyInt_Type)))); __Pyx_GIVEREF(((PyObject *)((PyObject*)(&PyInt_Type)))); PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_4 = PyObject_IsInstance(__pyx_t_1, ((PyObject *)__pyx_t_2)); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 504; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __pyx_t_5 = (__pyx_t_4 != 0); if (__pyx_t_5) { /* "pandas/parser.pyx":505 * cdef _make_skiprow_set(self): * if isinstance(self.skiprows, (int, np.integer)): * self.skiprows = range(self.skiprows) # <<<<<<<<<<<<<< * * for i in self.skiprows: */ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 505; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_self->skiprows); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_self->skiprows); __Pyx_GIVEREF(__pyx_v_self->skiprows); __pyx_t_1 = PyObject_Call(__pyx_builtin_range, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 505; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->skiprows); __Pyx_DECREF(__pyx_v_self->skiprows); __pyx_v_self->skiprows = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L3; } __pyx_L3:; /* "pandas/parser.pyx":507 * self.skiprows = range(self.skiprows) * * for i in self.skiprows: # <<<<<<<<<<<<<< * parser_add_skiprow(self.parser, i) * */ if (PyList_CheckExact(__pyx_v_self->skiprows) || PyTuple_CheckExact(__pyx_v_self->skiprows)) { __pyx_t_1 = __pyx_v_self->skiprows; __Pyx_INCREF(__pyx_t_1); __pyx_t_6 = 0; __pyx_t_7 = NULL; } else { __pyx_t_6 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_self->skiprows); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 507; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_7 = Py_TYPE(__pyx_t_1)->tp_iternext; } for (;;) { if (!__pyx_t_7 && PyList_CheckExact(__pyx_t_1)) { if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_1)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_6); __Pyx_INCREF(__pyx_t_2); __pyx_t_6++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 507; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 507; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif } else if (!__pyx_t_7 && PyTuple_CheckExact(__pyx_t_1)) { if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_1)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_6); __Pyx_INCREF(__pyx_t_2); __pyx_t_6++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 507; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 507; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif } else { __pyx_t_2 = __pyx_t_7(__pyx_t_1); if (unlikely(!__pyx_t_2)) { if (PyErr_Occurred()) { if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear(); else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 507; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } break; } __Pyx_GOTREF(__pyx_t_2); } __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_2); __pyx_t_2 = 0; /* "pandas/parser.pyx":508 * * for i in self.skiprows: * parser_add_skiprow(self.parser, i) # <<<<<<<<<<<<<< * * cdef _setup_parser_source(self, source): */ __pyx_t_8 = __Pyx_PyInt_from_py_npy_int64(__pyx_v_i); if (unlikely((__pyx_t_8 == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 508; __pyx_clineno = __LINE__; goto __pyx_L1_error;} parser_add_skiprow(__pyx_v_self->parser, __pyx_t_8); } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("pandas.parser.TextReader._make_skiprow_set", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_i); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/parser.pyx":510 * parser_add_skiprow(self.parser, i) * * cdef _setup_parser_source(self, source): # <<<<<<<<<<<<<< * cdef: * int status */ static PyObject *__pyx_f_6pandas_6parser_10TextReader__setup_parser_source(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self, PyObject *__pyx_v_source) { void *__pyx_v_ptr; PyObject *__pyx_v_gzip = NULL; PyObject *__pyx_v_bz2 = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; char *__pyx_t_6; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_setup_parser_source", 0); __Pyx_INCREF(__pyx_v_source); /* "pandas/parser.pyx":515 * void *ptr * * self.parser.cb_io = NULL # <<<<<<<<<<<<<< * self.parser.cb_cleanup = NULL * */ __pyx_v_self->parser->cb_io = NULL; /* "pandas/parser.pyx":516 * * self.parser.cb_io = NULL * self.parser.cb_cleanup = NULL # <<<<<<<<<<<<<< * * if self.compression: */ __pyx_v_self->parser->cb_cleanup = NULL; /* "pandas/parser.pyx":518 * self.parser.cb_cleanup = NULL * * if self.compression: # <<<<<<<<<<<<<< * if self.compression == 'gzip': * import gzip */ __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_self->compression); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 518; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__pyx_t_1) { /* "pandas/parser.pyx":519 * * if self.compression: * if self.compression == 'gzip': # <<<<<<<<<<<<<< * import gzip * if isinstance(source, basestring): */ __pyx_t_2 = PyObject_RichCompare(__pyx_v_self->compression, ((PyObject *)__pyx_n_s__gzip), Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 519; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 519; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_1) { /* "pandas/parser.pyx":520 * if self.compression: * if self.compression == 'gzip': * import gzip # <<<<<<<<<<<<<< * if isinstance(source, basestring): * source = gzip.GzipFile(source, 'rb') */ __pyx_t_2 = __Pyx_Import(((PyObject *)__pyx_n_s__gzip), 0, -1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 520; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_v_gzip = __pyx_t_2; __pyx_t_2 = 0; /* "pandas/parser.pyx":521 * if self.compression == 'gzip': * import gzip * if isinstance(source, basestring): # <<<<<<<<<<<<<< * source = gzip.GzipFile(source, 'rb') * else: */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__basestring); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 521; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = PyObject_IsInstance(__pyx_v_source, __pyx_t_2); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 521; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_3 = (__pyx_t_1 != 0); if (__pyx_t_3) { /* "pandas/parser.pyx":522 * import gzip * if isinstance(source, basestring): * source = gzip.GzipFile(source, 'rb') # <<<<<<<<<<<<<< * else: * source = gzip.GzipFile(fileobj=source) */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_gzip, __pyx_n_s__GzipFile); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 522; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 522; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_v_source); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_source); __Pyx_GIVEREF(__pyx_v_source); __Pyx_INCREF(((PyObject *)__pyx_n_s__rb)); PyTuple_SET_ITEM(__pyx_t_4, 1, ((PyObject *)__pyx_n_s__rb)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__rb)); __pyx_t_5 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 522; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __Pyx_DECREF_SET(__pyx_v_source, __pyx_t_5); __pyx_t_5 = 0; goto __pyx_L5; } /*else*/ { /* "pandas/parser.pyx":524 * source = gzip.GzipFile(source, 'rb') * else: * source = gzip.GzipFile(fileobj=source) # <<<<<<<<<<<<<< * elif self.compression == 'bz2': * import bz2 */ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_gzip, __pyx_n_s__GzipFile); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 524; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = PyDict_New(); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 524; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_4)); if (PyDict_SetItem(__pyx_t_4, ((PyObject *)__pyx_n_s__fileobj), __pyx_v_source) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 524; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_2 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_empty_tuple), ((PyObject *)__pyx_t_4)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 524; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __Pyx_DECREF_SET(__pyx_v_source, __pyx_t_2); __pyx_t_2 = 0; } __pyx_L5:; goto __pyx_L4; } /* "pandas/parser.pyx":525 * else: * source = gzip.GzipFile(fileobj=source) * elif self.compression == 'bz2': # <<<<<<<<<<<<<< * import bz2 * if isinstance(source, basestring): */ __pyx_t_2 = PyObject_RichCompare(__pyx_v_self->compression, ((PyObject *)__pyx_n_s__bz2), Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 525; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 525; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_3) { /* "pandas/parser.pyx":526 * source = gzip.GzipFile(fileobj=source) * elif self.compression == 'bz2': * import bz2 # <<<<<<<<<<<<<< * if isinstance(source, basestring): * source = bz2.BZ2File(source, 'rb') */ __pyx_t_2 = __Pyx_Import(((PyObject *)__pyx_n_s__bz2), 0, -1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 526; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_v_bz2 = __pyx_t_2; __pyx_t_2 = 0; /* "pandas/parser.pyx":527 * elif self.compression == 'bz2': * import bz2 * if isinstance(source, basestring): # <<<<<<<<<<<<<< * source = bz2.BZ2File(source, 'rb') * else: */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__basestring); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 527; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyObject_IsInstance(__pyx_v_source, __pyx_t_2); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 527; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_1 = (__pyx_t_3 != 0); if (__pyx_t_1) { /* "pandas/parser.pyx":528 * import bz2 * if isinstance(source, basestring): * source = bz2.BZ2File(source, 'rb') # <<<<<<<<<<<<<< * else: * raise ValueError('Python cannot read bz2 from open file ' */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_bz2, __pyx_n_s__BZ2File); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 528; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 528; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_v_source); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_source); __Pyx_GIVEREF(__pyx_v_source); __Pyx_INCREF(((PyObject *)__pyx_n_s__rb)); PyTuple_SET_ITEM(__pyx_t_4, 1, ((PyObject *)__pyx_n_s__rb)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__rb)); __pyx_t_5 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 528; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __Pyx_DECREF_SET(__pyx_v_source, __pyx_t_5); __pyx_t_5 = 0; goto __pyx_L6; } /*else*/ { /* "pandas/parser.pyx":530 * source = bz2.BZ2File(source, 'rb') * else: * raise ValueError('Python cannot read bz2 from open file ' # <<<<<<<<<<<<<< * 'handle') * else: */ __pyx_t_5 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_37), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 530; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_Raise(__pyx_t_5, 0, 0, 0); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 530; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_L6:; goto __pyx_L4; } /*else*/ { /* "pandas/parser.pyx":534 * else: * raise ValueError('Unrecognized compression type: %s' % * self.compression) # <<<<<<<<<<<<<< * * if isinstance(source, basestring): */ __pyx_t_5 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_38), __pyx_v_self->compression); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 533; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_5)); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 533; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_t_5)); __Pyx_GIVEREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; __pyx_t_5 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 533; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __Pyx_Raise(__pyx_t_5, 0, 0, 0); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 533; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_L4:; goto __pyx_L3; } __pyx_L3:; /* "pandas/parser.pyx":536 * self.compression) * * if isinstance(source, basestring): # <<<<<<<<<<<<<< * if not isinstance(source, bytes): * source = source.encode('utf-8') */ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s__basestring); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 536; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_1 = PyObject_IsInstance(__pyx_v_source, __pyx_t_5); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 536; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_3 = (__pyx_t_1 != 0); if (__pyx_t_3) { /* "pandas/parser.pyx":537 * * if isinstance(source, basestring): * if not isinstance(source, bytes): # <<<<<<<<<<<<<< * source = source.encode('utf-8') * */ __pyx_t_3 = PyBytes_Check(__pyx_v_source); __pyx_t_1 = ((!(__pyx_t_3 != 0)) != 0); if (__pyx_t_1) { /* "pandas/parser.pyx":538 * if isinstance(source, basestring): * if not isinstance(source, bytes): * source = source.encode('utf-8') # <<<<<<<<<<<<<< * * if self.memory_map: */ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_source, __pyx_n_s__encode); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 538; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_k_tuple_39), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 538; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF_SET(__pyx_v_source, __pyx_t_4); __pyx_t_4 = 0; goto __pyx_L8; } __pyx_L8:; /* "pandas/parser.pyx":540 * source = source.encode('utf-8') * * if self.memory_map: # <<<<<<<<<<<<<< * ptr = new_mmap(source) * if ptr == NULL: */ __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_self->memory_map); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 540; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__pyx_t_1) { /* "pandas/parser.pyx":541 * * if self.memory_map: * ptr = new_mmap(source) # <<<<<<<<<<<<<< * if ptr == NULL: * # fall back */ __pyx_t_6 = __Pyx_PyObject_AsString(__pyx_v_source); if (unlikely((!__pyx_t_6) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 541; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_ptr = new_mmap(__pyx_t_6); /* "pandas/parser.pyx":542 * if self.memory_map: * ptr = new_mmap(source) * if ptr == NULL: # <<<<<<<<<<<<<< * # fall back * ptr = new_file_source(source, self.parser.chunksize) */ __pyx_t_1 = ((__pyx_v_ptr == NULL) != 0); if (__pyx_t_1) { /* "pandas/parser.pyx":544 * if ptr == NULL: * # fall back * ptr = new_file_source(source, self.parser.chunksize) # <<<<<<<<<<<<<< * self.parser.cb_io = &buffer_file_bytes * self.parser.cb_cleanup = &del_file_source */ __pyx_t_6 = __Pyx_PyObject_AsString(__pyx_v_source); if (unlikely((!__pyx_t_6) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 544; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_ptr = new_file_source(__pyx_t_6, __pyx_v_self->parser->chunksize); /* "pandas/parser.pyx":545 * # fall back * ptr = new_file_source(source, self.parser.chunksize) * self.parser.cb_io = &buffer_file_bytes # <<<<<<<<<<<<<< * self.parser.cb_cleanup = &del_file_source * else: */ __pyx_v_self->parser->cb_io = (&buffer_file_bytes); /* "pandas/parser.pyx":546 * ptr = new_file_source(source, self.parser.chunksize) * self.parser.cb_io = &buffer_file_bytes * self.parser.cb_cleanup = &del_file_source # <<<<<<<<<<<<<< * else: * self.parser.cb_io = &buffer_mmap_bytes */ __pyx_v_self->parser->cb_cleanup = (&del_file_source); goto __pyx_L10; } /*else*/ { /* "pandas/parser.pyx":548 * self.parser.cb_cleanup = &del_file_source * else: * self.parser.cb_io = &buffer_mmap_bytes # <<<<<<<<<<<<<< * self.parser.cb_cleanup = &del_mmap * else: */ __pyx_v_self->parser->cb_io = (&buffer_mmap_bytes); /* "pandas/parser.pyx":549 * else: * self.parser.cb_io = &buffer_mmap_bytes * self.parser.cb_cleanup = &del_mmap # <<<<<<<<<<<<<< * else: * ptr = new_file_source(source, self.parser.chunksize) */ __pyx_v_self->parser->cb_cleanup = (&del_mmap); } __pyx_L10:; goto __pyx_L9; } /*else*/ { /* "pandas/parser.pyx":551 * self.parser.cb_cleanup = &del_mmap * else: * ptr = new_file_source(source, self.parser.chunksize) # <<<<<<<<<<<<<< * self.parser.cb_io = &buffer_file_bytes * self.parser.cb_cleanup = &del_file_source */ __pyx_t_6 = __Pyx_PyObject_AsString(__pyx_v_source); if (unlikely((!__pyx_t_6) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 551; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_ptr = new_file_source(__pyx_t_6, __pyx_v_self->parser->chunksize); /* "pandas/parser.pyx":552 * else: * ptr = new_file_source(source, self.parser.chunksize) * self.parser.cb_io = &buffer_file_bytes # <<<<<<<<<<<<<< * self.parser.cb_cleanup = &del_file_source * */ __pyx_v_self->parser->cb_io = (&buffer_file_bytes); /* "pandas/parser.pyx":553 * ptr = new_file_source(source, self.parser.chunksize) * self.parser.cb_io = &buffer_file_bytes * self.parser.cb_cleanup = &del_file_source # <<<<<<<<<<<<<< * * if ptr == NULL: */ __pyx_v_self->parser->cb_cleanup = (&del_file_source); } __pyx_L9:; /* "pandas/parser.pyx":555 * self.parser.cb_cleanup = &del_file_source * * if ptr == NULL: # <<<<<<<<<<<<<< * if not os.path.exists(source): * raise IOError('File %s does not exist' % source) */ __pyx_t_1 = ((__pyx_v_ptr == NULL) != 0); if (__pyx_t_1) { /* "pandas/parser.pyx":556 * * if ptr == NULL: * if not os.path.exists(source): # <<<<<<<<<<<<<< * raise IOError('File %s does not exist' % source) * raise IOError('Initializing from file failed') */ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s__os); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 556; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s__path); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 556; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s__exists); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 556; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 556; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_v_source); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_source); __Pyx_GIVEREF(__pyx_v_source); __pyx_t_2 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 556; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 556; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_3 = ((!__pyx_t_1) != 0); if (__pyx_t_3) { /* "pandas/parser.pyx":557 * if ptr == NULL: * if not os.path.exists(source): * raise IOError('File %s does not exist' % source) # <<<<<<<<<<<<<< * raise IOError('Initializing from file failed') * */ __pyx_t_2 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_40), __pyx_v_source); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 557; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_2)); __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 557; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_t_2)); __Pyx_GIVEREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __pyx_t_2 = PyObject_Call(__pyx_builtin_IOError, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 557; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 557; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L12; } __pyx_L12:; /* "pandas/parser.pyx":558 * if not os.path.exists(source): * raise IOError('File %s does not exist' % source) * raise IOError('Initializing from file failed') # <<<<<<<<<<<<<< * * self.parser.source = ptr */ __pyx_t_2 = PyObject_Call(__pyx_builtin_IOError, ((PyObject *)__pyx_k_tuple_42), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 558; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 558; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L11; } __pyx_L11:; /* "pandas/parser.pyx":560 * raise IOError('Initializing from file failed') * * self.parser.source = ptr # <<<<<<<<<<<<<< * * elif hasattr(source, 'read'): */ __pyx_v_self->parser->source = __pyx_v_ptr; goto __pyx_L7; } /* "pandas/parser.pyx":562 * self.parser.source = ptr * * elif hasattr(source, 'read'): # <<<<<<<<<<<<<< * # e.g., StringIO * */ __pyx_t_3 = PyObject_HasAttr(__pyx_v_source, ((PyObject *)__pyx_n_s__read)); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 562; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_1 = (__pyx_t_3 != 0); if (__pyx_t_1) { /* "pandas/parser.pyx":565 * # e.g., StringIO * * ptr = new_rd_source(source) # <<<<<<<<<<<<<< * if ptr == NULL: * raise IOError('Initializing parser from file-like ' */ __pyx_v_ptr = new_rd_source(__pyx_v_source); /* "pandas/parser.pyx":566 * * ptr = new_rd_source(source) * if ptr == NULL: # <<<<<<<<<<<<<< * raise IOError('Initializing parser from file-like ' * 'object failed') */ __pyx_t_1 = ((__pyx_v_ptr == NULL) != 0); if (__pyx_t_1) { /* "pandas/parser.pyx":567 * ptr = new_rd_source(source) * if ptr == NULL: * raise IOError('Initializing parser from file-like ' # <<<<<<<<<<<<<< * 'object failed') * */ __pyx_t_2 = PyObject_Call(__pyx_builtin_IOError, ((PyObject *)__pyx_k_tuple_44), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 567; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 567; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L13; } __pyx_L13:; /* "pandas/parser.pyx":570 * 'object failed') * * self.parser.source = ptr # <<<<<<<<<<<<<< * self.parser.cb_io = &buffer_rd_bytes * self.parser.cb_cleanup = &del_rd_source */ __pyx_v_self->parser->source = __pyx_v_ptr; /* "pandas/parser.pyx":571 * * self.parser.source = ptr * self.parser.cb_io = &buffer_rd_bytes # <<<<<<<<<<<<<< * self.parser.cb_cleanup = &del_rd_source * else: */ __pyx_v_self->parser->cb_io = (&buffer_rd_bytes); /* "pandas/parser.pyx":572 * self.parser.source = ptr * self.parser.cb_io = &buffer_rd_bytes * self.parser.cb_cleanup = &del_rd_source # <<<<<<<<<<<<<< * else: * raise IOError('Expected file path name or file-like object,' */ __pyx_v_self->parser->cb_cleanup = (&del_rd_source); goto __pyx_L7; } /*else*/ { /* "pandas/parser.pyx":575 * else: * raise IOError('Expected file path name or file-like object,' * ' got %s type' % type(source)) # <<<<<<<<<<<<<< * * cdef _get_header(self): */ __pyx_t_2 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_45), ((PyObject *)Py_TYPE(__pyx_v_source))); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 575; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_2)); __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 574; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_t_2)); __Pyx_GIVEREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __pyx_t_2 = PyObject_Call(__pyx_builtin_IOError, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 574; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 574; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_L7:; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("pandas.parser.TextReader._setup_parser_source", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_gzip); __Pyx_XDECREF(__pyx_v_bz2); __Pyx_XDECREF(__pyx_v_source); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/parser.pyx":577 * ' got %s type' % type(source)) * * cdef _get_header(self): # <<<<<<<<<<<<<< * # header is now a list of lists, so field_count should use header[0] * */ static PyObject *__pyx_f_6pandas_6parser_10TextReader__get_header(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self) { size_t __pyx_v_i; size_t __pyx_v_start; size_t __pyx_v_data_line; size_t __pyx_v_field_count; size_t __pyx_v_passed_count; size_t __pyx_v_hr; size_t __pyx_v_unnamed_count; char *__pyx_v_word; PyObject *__pyx_v_name = 0; char *__pyx_v_errors; PyObject *__pyx_v_header = NULL; PyObject *__pyx_v_level = NULL; PyObject *__pyx_v_this_header = NULL; PyObject *__pyx_v_msg = NULL; PyObject *__pyx_v_counts = NULL; PyObject *__pyx_v_count = NULL; PyObject *__pyx_v_lc = NULL; PyObject *__pyx_v_ic = NULL; PyObject *__pyx_v_nuse = NULL; PyObject *__pyx_v_m = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; Py_ssize_t __pyx_t_4; PyObject *(*__pyx_t_5)(PyObject *); PyObject *__pyx_t_6 = NULL; size_t __pyx_t_7; int __pyx_t_8; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; Py_ssize_t __pyx_t_11; PyObject *(*__pyx_t_12)(PyObject *); PyObject *__pyx_t_13 = NULL; PyObject *__pyx_t_14 = NULL; size_t __pyx_t_15; int __pyx_t_16; int __pyx_t_17; int __pyx_t_18; Py_ssize_t __pyx_t_19; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_get_header", 0); /* "pandas/parser.pyx":586 * int status * Py_ssize_t size * char *errors = "strict" # <<<<<<<<<<<<<< * * header = [] */ __pyx_v_errors = __pyx_k__strict; /* "pandas/parser.pyx":588 * char *errors = "strict" * * header = [] # <<<<<<<<<<<<<< * * if self.parser.header_start >= 0: */ __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 588; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_v_header = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/parser.pyx":590 * header = [] * * if self.parser.header_start >= 0: # <<<<<<<<<<<<<< * * # Header is in the file */ __pyx_t_2 = ((__pyx_v_self->parser->header_start >= 0) != 0); if (__pyx_t_2) { /* "pandas/parser.pyx":593 * * # Header is in the file * for level, hr in enumerate(self.header): # <<<<<<<<<<<<<< * * this_header = [] */ __Pyx_INCREF(__pyx_int_0); __pyx_t_1 = __pyx_int_0; if (PyList_CheckExact(__pyx_v_self->header) || PyTuple_CheckExact(__pyx_v_self->header)) { __pyx_t_3 = __pyx_v_self->header; __Pyx_INCREF(__pyx_t_3); __pyx_t_4 = 0; __pyx_t_5 = NULL; } else { __pyx_t_4 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_self->header); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 593; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = Py_TYPE(__pyx_t_3)->tp_iternext; } for (;;) { if (!__pyx_t_5 && PyList_CheckExact(__pyx_t_3)) { if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_3)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_6 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_6); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 593; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_6 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 593; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif } else if (!__pyx_t_5 && PyTuple_CheckExact(__pyx_t_3)) { if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_3)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_6); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 593; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_6 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 593; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif } else { __pyx_t_6 = __pyx_t_5(__pyx_t_3); if (unlikely(!__pyx_t_6)) { if (PyErr_Occurred()) { if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear(); else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 593; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } break; } __Pyx_GOTREF(__pyx_t_6); } __pyx_t_7 = __Pyx_PyInt_AsSize_t(__pyx_t_6); if (unlikely((__pyx_t_7 == (size_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 593; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_v_hr = __pyx_t_7; __Pyx_INCREF(__pyx_t_1); __Pyx_XDECREF_SET(__pyx_v_level, __pyx_t_1); __pyx_t_6 = PyNumber_Add(__pyx_t_1, __pyx_int_1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 593; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = __pyx_t_6; __pyx_t_6 = 0; /* "pandas/parser.pyx":595 * for level, hr in enumerate(self.header): * * this_header = [] # <<<<<<<<<<<<<< * * if self.parser.lines < hr + 1: */ __pyx_t_6 = PyList_New(0); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 595; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_XDECREF_SET(__pyx_v_this_header, ((PyObject*)__pyx_t_6)); __pyx_t_6 = 0; /* "pandas/parser.pyx":597 * this_header = [] * * if self.parser.lines < hr + 1: # <<<<<<<<<<<<<< * self._tokenize_rows(hr + 2) * */ __pyx_t_2 = ((__pyx_v_self->parser->lines < (__pyx_v_hr + 1)) != 0); if (__pyx_t_2) { /* "pandas/parser.pyx":598 * * if self.parser.lines < hr + 1: * self._tokenize_rows(hr + 2) # <<<<<<<<<<<<<< * * # e.g., if header=3 and file only has 2 lines */ __pyx_t_6 = ((struct __pyx_vtabstruct_6pandas_6parser_TextReader *)__pyx_v_self->__pyx_vtab)->_tokenize_rows(__pyx_v_self, (__pyx_v_hr + 2)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 598; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; goto __pyx_L6; } __pyx_L6:; /* "pandas/parser.pyx":601 * * # e.g., if header=3 and file only has 2 lines * if self.parser.lines < hr + 1: # <<<<<<<<<<<<<< * msg = self.orig_header * if isinstance(msg,list): */ __pyx_t_2 = ((__pyx_v_self->parser->lines < (__pyx_v_hr + 1)) != 0); if (__pyx_t_2) { /* "pandas/parser.pyx":602 * # e.g., if header=3 and file only has 2 lines * if self.parser.lines < hr + 1: * msg = self.orig_header # <<<<<<<<<<<<<< * if isinstance(msg,list): * msg = "[%s], len of %d," % (','.join([ str(m) for m in msg ]),len(msg)) */ __pyx_t_6 = __pyx_v_self->orig_header; __Pyx_INCREF(__pyx_t_6); __pyx_v_msg = __pyx_t_6; __pyx_t_6 = 0; /* "pandas/parser.pyx":603 * if self.parser.lines < hr + 1: * msg = self.orig_header * if isinstance(msg,list): # <<<<<<<<<<<<<< * msg = "[%s], len of %d," % (','.join([ str(m) for m in msg ]),len(msg)) * raise CParserError('Passed header=%s but only %d lines in file' */ __pyx_t_2 = PyList_Check(__pyx_v_msg); __pyx_t_8 = (__pyx_t_2 != 0); if (__pyx_t_8) { /* "pandas/parser.pyx":604 * msg = self.orig_header * if isinstance(msg,list): * msg = "[%s], len of %d," % (','.join([ str(m) for m in msg ]),len(msg)) # <<<<<<<<<<<<<< * raise CParserError('Passed header=%s but only %d lines in file' * % (msg, self.parser.lines)) */ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_kp_s_1), __pyx_n_s__join); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 604; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_9 = PyList_New(0); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 604; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); if (PyList_CheckExact(__pyx_v_msg) || PyTuple_CheckExact(__pyx_v_msg)) { __pyx_t_10 = __pyx_v_msg; __Pyx_INCREF(__pyx_t_10); __pyx_t_11 = 0; __pyx_t_12 = NULL; } else { __pyx_t_11 = -1; __pyx_t_10 = PyObject_GetIter(__pyx_v_msg); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 604; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __pyx_t_12 = Py_TYPE(__pyx_t_10)->tp_iternext; } for (;;) { if (!__pyx_t_12 && PyList_CheckExact(__pyx_t_10)) { if (__pyx_t_11 >= PyList_GET_SIZE(__pyx_t_10)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_13 = PyList_GET_ITEM(__pyx_t_10, __pyx_t_11); __Pyx_INCREF(__pyx_t_13); __pyx_t_11++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 604; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_13 = PySequence_ITEM(__pyx_t_10, __pyx_t_11); __pyx_t_11++; if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 604; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif } else if (!__pyx_t_12 && PyTuple_CheckExact(__pyx_t_10)) { if (__pyx_t_11 >= PyTuple_GET_SIZE(__pyx_t_10)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_13 = PyTuple_GET_ITEM(__pyx_t_10, __pyx_t_11); __Pyx_INCREF(__pyx_t_13); __pyx_t_11++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 604; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_13 = PySequence_ITEM(__pyx_t_10, __pyx_t_11); __pyx_t_11++; if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 604; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif } else { __pyx_t_13 = __pyx_t_12(__pyx_t_10); if (unlikely(!__pyx_t_13)) { if (PyErr_Occurred()) { if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear(); else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 604; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } break; } __Pyx_GOTREF(__pyx_t_13); } __Pyx_XDECREF_SET(__pyx_v_m, __pyx_t_13); __pyx_t_13 = 0; __pyx_t_13 = PyTuple_New(1); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 604; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __Pyx_INCREF(__pyx_v_m); PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_v_m); __Pyx_GIVEREF(__pyx_v_m); __pyx_t_14 = PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), ((PyObject *)__pyx_t_13), NULL); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 604; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_14); __Pyx_DECREF(((PyObject *)__pyx_t_13)); __pyx_t_13 = 0; if (unlikely(__Pyx_ListComp_Append(__pyx_t_9, (PyObject*)__pyx_t_14))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 604; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; } __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_t_10 = PyTuple_New(1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 604; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_10, 0, ((PyObject *)__pyx_t_9)); __Pyx_GIVEREF(((PyObject *)__pyx_t_9)); __pyx_t_9 = 0; __pyx_t_9 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_t_10), NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 604; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_10)); __pyx_t_10 = 0; __pyx_t_11 = PyObject_Length(__pyx_v_msg); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 604; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_10 = PyInt_FromSsize_t(__pyx_t_11); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 604; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 604; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_9); __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_10); __Pyx_GIVEREF(__pyx_t_10); __pyx_t_9 = 0; __pyx_t_10 = 0; __pyx_t_10 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_46), ((PyObject *)__pyx_t_6)); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 604; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_10)); __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0; __Pyx_DECREF_SET(__pyx_v_msg, ((PyObject *)__pyx_t_10)); __pyx_t_10 = 0; goto __pyx_L8; } __pyx_L8:; /* "pandas/parser.pyx":605 * if isinstance(msg,list): * msg = "[%s], len of %d," % (','.join([ str(m) for m in msg ]),len(msg)) * raise CParserError('Passed header=%s but only %d lines in file' # <<<<<<<<<<<<<< * % (msg, self.parser.lines)) * */ __pyx_t_10 = __Pyx_GetModuleGlobalName(__pyx_n_s__CParserError); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 605; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); /* "pandas/parser.pyx":606 * msg = "[%s], len of %d," % (','.join([ str(m) for m in msg ]),len(msg)) * raise CParserError('Passed header=%s but only %d lines in file' * % (msg, self.parser.lines)) # <<<<<<<<<<<<<< * * field_count = self.parser.line_fields[hr] */ __pyx_t_6 = PyInt_FromLong(__pyx_v_self->parser->lines); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 606; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_9 = PyTuple_New(2); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 606; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_INCREF(__pyx_v_msg); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_v_msg); __Pyx_GIVEREF(__pyx_v_msg); PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_47), ((PyObject *)__pyx_t_9)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 606; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_6)); __Pyx_DECREF(((PyObject *)__pyx_t_9)); __pyx_t_9 = 0; __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 605; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_9, 0, ((PyObject *)__pyx_t_6)); __Pyx_GIVEREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0; __pyx_t_6 = PyObject_Call(__pyx_t_10, ((PyObject *)__pyx_t_9), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 605; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_9)); __pyx_t_9 = 0; __Pyx_Raise(__pyx_t_6, 0, 0, 0); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 605; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L7; } __pyx_L7:; /* "pandas/parser.pyx":608 * % (msg, self.parser.lines)) * * field_count = self.parser.line_fields[hr] # <<<<<<<<<<<<<< * start = self.parser.line_start[hr] * */ __pyx_v_field_count = (__pyx_v_self->parser->line_fields[__pyx_v_hr]); /* "pandas/parser.pyx":609 * * field_count = self.parser.line_fields[hr] * start = self.parser.line_start[hr] # <<<<<<<<<<<<<< * * # TODO: Py3 vs. Py2 */ __pyx_v_start = (__pyx_v_self->parser->line_start[__pyx_v_hr]); /* "pandas/parser.pyx":612 * * # TODO: Py3 vs. Py2 * counts = {} # <<<<<<<<<<<<<< * unnamed_count = 0 * for i in range(field_count): */ __pyx_t_6 = PyDict_New(); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 612; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_6)); __Pyx_XDECREF_SET(__pyx_v_counts, ((PyObject*)__pyx_t_6)); __pyx_t_6 = 0; /* "pandas/parser.pyx":613 * # TODO: Py3 vs. Py2 * counts = {} * unnamed_count = 0 # <<<<<<<<<<<<<< * for i in range(field_count): * word = self.parser.words[start + i] */ __pyx_v_unnamed_count = 0; /* "pandas/parser.pyx":614 * counts = {} * unnamed_count = 0 * for i in range(field_count): # <<<<<<<<<<<<<< * word = self.parser.words[start + i] * */ __pyx_t_7 = __pyx_v_field_count; for (__pyx_t_15 = 0; __pyx_t_15 < __pyx_t_7; __pyx_t_15+=1) { __pyx_v_i = __pyx_t_15; /* "pandas/parser.pyx":615 * unnamed_count = 0 * for i in range(field_count): * word = self.parser.words[start + i] # <<<<<<<<<<<<<< * * if self.c_encoding == NULL and not PY3: */ __pyx_v_word = (__pyx_v_self->parser->words[(__pyx_v_start + __pyx_v_i)]); /* "pandas/parser.pyx":617 * word = self.parser.words[start + i] * * if self.c_encoding == NULL and not PY3: # <<<<<<<<<<<<<< * name = PyBytes_FromString(word) * else: */ __pyx_t_8 = ((__pyx_v_self->c_encoding == NULL) != 0); if (__pyx_t_8) { __pyx_t_2 = ((!(__pyx_v_6pandas_6parser_PY3 != 0)) != 0); __pyx_t_16 = __pyx_t_2; } else { __pyx_t_16 = __pyx_t_8; } if (__pyx_t_16) { /* "pandas/parser.pyx":618 * * if self.c_encoding == NULL and not PY3: * name = PyBytes_FromString(word) # <<<<<<<<<<<<<< * else: * if self.c_encoding == NULL or self.c_encoding == b'utf-8': */ __pyx_t_6 = ((PyObject *)PyBytes_FromString(__pyx_v_word)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 618; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_XDECREF_SET(__pyx_v_name, __pyx_t_6); __pyx_t_6 = 0; goto __pyx_L13; } /*else*/ { /* "pandas/parser.pyx":620 * name = PyBytes_FromString(word) * else: * if self.c_encoding == NULL or self.c_encoding == b'utf-8': # <<<<<<<<<<<<<< * name = PyUnicode_FromString(word) * else: */ __pyx_t_16 = (__pyx_v_self->c_encoding == NULL); if (!__pyx_t_16) { __pyx_t_6 = __Pyx_PyBytes_FromString(__pyx_v_self->c_encoding); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 620; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_6)); __pyx_t_9 = PyObject_RichCompare(((PyObject *)__pyx_t_6), ((PyObject *)__pyx_kp_b_32), Py_EQ); __Pyx_XGOTREF(__pyx_t_9); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 620; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0; __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 620; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_2 = __pyx_t_8; } else { __pyx_t_2 = __pyx_t_16; } if (__pyx_t_2) { /* "pandas/parser.pyx":621 * else: * if self.c_encoding == NULL or self.c_encoding == b'utf-8': * name = PyUnicode_FromString(word) # <<<<<<<<<<<<<< * else: * name = PyUnicode_Decode(word, strlen(word), */ __pyx_t_9 = PyUnicode_FromString(__pyx_v_word); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 621; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_XDECREF_SET(__pyx_v_name, __pyx_t_9); __pyx_t_9 = 0; goto __pyx_L14; } /*else*/ { /* "pandas/parser.pyx":624 * else: * name = PyUnicode_Decode(word, strlen(word), * self.c_encoding, errors) # <<<<<<<<<<<<<< * * if name == '': */ __pyx_t_9 = PyUnicode_Decode(__pyx_v_word, strlen(__pyx_v_word), __pyx_v_self->c_encoding, __pyx_v_errors); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 623; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_XDECREF_SET(__pyx_v_name, __pyx_t_9); __pyx_t_9 = 0; } __pyx_L14:; } __pyx_L13:; /* "pandas/parser.pyx":626 * self.c_encoding, errors) * * if name == '': # <<<<<<<<<<<<<< * if self.has_mi_columns: * name = 'Unnamed: %d_level_%d' % (i,level) */ __pyx_t_9 = PyObject_RichCompare(__pyx_v_name, ((PyObject *)__pyx_kp_s_48), Py_EQ); __Pyx_XGOTREF(__pyx_t_9); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 626; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 626; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; if (__pyx_t_2) { /* "pandas/parser.pyx":627 * * if name == '': * if self.has_mi_columns: # <<<<<<<<<<<<<< * name = 'Unnamed: %d_level_%d' % (i,level) * else: */ __pyx_t_2 = (__pyx_v_self->has_mi_columns != 0); if (__pyx_t_2) { /* "pandas/parser.pyx":628 * if name == '': * if self.has_mi_columns: * name = 'Unnamed: %d_level_%d' % (i,level) # <<<<<<<<<<<<<< * else: * name = 'Unnamed: %d' % i */ __pyx_t_9 = __Pyx_PyInt_FromSize_t(__pyx_v_i); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 628; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 628; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_9); __Pyx_GIVEREF(__pyx_t_9); __Pyx_INCREF(__pyx_v_level); PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_v_level); __Pyx_GIVEREF(__pyx_v_level); __pyx_t_9 = 0; __pyx_t_9 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_49), ((PyObject *)__pyx_t_6)); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 628; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_9)); __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0; __Pyx_DECREF_SET(__pyx_v_name, ((PyObject *)__pyx_t_9)); __pyx_t_9 = 0; goto __pyx_L16; } /*else*/ { /* "pandas/parser.pyx":630 * name = 'Unnamed: %d_level_%d' % (i,level) * else: * name = 'Unnamed: %d' % i # <<<<<<<<<<<<<< * unnamed_count += 1 * */ __pyx_t_9 = __Pyx_PyInt_FromSize_t(__pyx_v_i); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 630; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_t_6 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_50), __pyx_t_9); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 630; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_6)); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF_SET(__pyx_v_name, ((PyObject *)__pyx_t_6)); __pyx_t_6 = 0; } __pyx_L16:; /* "pandas/parser.pyx":631 * else: * name = 'Unnamed: %d' % i * unnamed_count += 1 # <<<<<<<<<<<<<< * * count = counts.get(name, 0) */ __pyx_v_unnamed_count = (__pyx_v_unnamed_count + 1); goto __pyx_L15; } __pyx_L15:; /* "pandas/parser.pyx":633 * unnamed_count += 1 * * count = counts.get(name, 0) # <<<<<<<<<<<<<< * if count > 0 and self.mangle_dupe_cols and not self.has_mi_columns: * this_header.append('%s.%d' % (name, count)) */ __pyx_t_6 = __Pyx_PyDict_GetItemDefault(((PyObject *)__pyx_v_counts), __pyx_v_name, __pyx_int_0); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 633; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_XDECREF_SET(__pyx_v_count, __pyx_t_6); __pyx_t_6 = 0; /* "pandas/parser.pyx":634 * * count = counts.get(name, 0) * if count > 0 and self.mangle_dupe_cols and not self.has_mi_columns: # <<<<<<<<<<<<<< * this_header.append('%s.%d' % (name, count)) * else: */ __pyx_t_6 = PyObject_RichCompare(__pyx_v_count, __pyx_int_0, Py_GT); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 634; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 634; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (__pyx_t_2) { __pyx_t_16 = __Pyx_PyObject_IsTrue(__pyx_v_self->mangle_dupe_cols); if (unlikely(__pyx_t_16 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 634; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__pyx_t_16) { __pyx_t_8 = (!(__pyx_v_self->has_mi_columns != 0)); __pyx_t_17 = __pyx_t_8; } else { __pyx_t_17 = __pyx_t_16; } __pyx_t_16 = __pyx_t_17; } else { __pyx_t_16 = __pyx_t_2; } if (__pyx_t_16) { /* "pandas/parser.pyx":635 * count = counts.get(name, 0) * if count > 0 and self.mangle_dupe_cols and not self.has_mi_columns: * this_header.append('%s.%d' % (name, count)) # <<<<<<<<<<<<<< * else: * this_header.append(name) */ __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 635; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(__pyx_v_name); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_name); __Pyx_GIVEREF(__pyx_v_name); __Pyx_INCREF(__pyx_v_count); PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_v_count); __Pyx_GIVEREF(__pyx_v_count); __pyx_t_9 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_51), ((PyObject *)__pyx_t_6)); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 635; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_9)); __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0; __pyx_t_18 = __Pyx_PyList_Append(__pyx_v_this_header, ((PyObject *)__pyx_t_9)); if (unlikely(__pyx_t_18 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 635; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(((PyObject *)__pyx_t_9)); __pyx_t_9 = 0; goto __pyx_L17; } /*else*/ { /* "pandas/parser.pyx":637 * this_header.append('%s.%d' % (name, count)) * else: * this_header.append(name) # <<<<<<<<<<<<<< * counts[name] = count + 1 * */ __pyx_t_18 = __Pyx_PyList_Append(__pyx_v_this_header, __pyx_v_name); if (unlikely(__pyx_t_18 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 637; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_L17:; /* "pandas/parser.pyx":638 * else: * this_header.append(name) * counts[name] = count + 1 # <<<<<<<<<<<<<< * * if self.has_mi_columns: */ __pyx_t_9 = PyNumber_Add(__pyx_v_count, __pyx_int_1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 638; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); if (PyDict_SetItem(((PyObject *)__pyx_v_counts), __pyx_v_name, __pyx_t_9) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 638; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; } /* "pandas/parser.pyx":640 * counts[name] = count + 1 * * if self.has_mi_columns: # <<<<<<<<<<<<<< * * # if we have grabbed an extra line, but its not in our format */ __pyx_t_16 = (__pyx_v_self->has_mi_columns != 0); if (__pyx_t_16) { /* "pandas/parser.pyx":645 * # so save in the buffer, and create an blank extra line for the rest of the * # parsing code * if hr == self.header[-1]: # <<<<<<<<<<<<<< * lc = len(this_header) * ic = len(self.index_col) if self.index_col is not None else 0 */ __pyx_t_9 = __Pyx_PyInt_FromSize_t(__pyx_v_hr); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 645; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_self->header, -1, sizeof(long), PyInt_FromLong, 0, 1, 1); if (!__pyx_t_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 645; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_10 = PyObject_RichCompare(__pyx_t_9, __pyx_t_6, Py_EQ); __Pyx_XGOTREF(__pyx_t_10); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 645; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_16 = __Pyx_PyObject_IsTrue(__pyx_t_10); if (unlikely(__pyx_t_16 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 645; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; if (__pyx_t_16) { /* "pandas/parser.pyx":646 * # parsing code * if hr == self.header[-1]: * lc = len(this_header) # <<<<<<<<<<<<<< * ic = len(self.index_col) if self.index_col is not None else 0 * if lc != unnamed_count and lc-ic > unnamed_count: */ __pyx_t_11 = PyList_GET_SIZE(((PyObject *)__pyx_v_this_header)); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 646; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_10 = PyInt_FromSsize_t(__pyx_t_11); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 646; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_XDECREF_SET(__pyx_v_lc, __pyx_t_10); __pyx_t_10 = 0; /* "pandas/parser.pyx":647 * if hr == self.header[-1]: * lc = len(this_header) * ic = len(self.index_col) if self.index_col is not None else 0 # <<<<<<<<<<<<<< * if lc != unnamed_count and lc-ic > unnamed_count: * hr -= 1 */ __pyx_t_16 = (__pyx_v_self->index_col != Py_None); if ((__pyx_t_16 != 0)) { __pyx_t_10 = __pyx_v_self->index_col; __Pyx_INCREF(__pyx_t_10); __pyx_t_19 = PyObject_Length(__pyx_t_10); if (unlikely(__pyx_t_19 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 647; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_t_11 = __pyx_t_19; } else { __pyx_t_11 = 0; } __pyx_t_10 = PyInt_FromSsize_t(__pyx_t_11); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 647; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_XDECREF_SET(__pyx_v_ic, __pyx_t_10); __pyx_t_10 = 0; /* "pandas/parser.pyx":648 * lc = len(this_header) * ic = len(self.index_col) if self.index_col is not None else 0 * if lc != unnamed_count and lc-ic > unnamed_count: # <<<<<<<<<<<<<< * hr -= 1 * self.parser_start -= 1 */ __pyx_t_10 = __Pyx_PyInt_FromSize_t(__pyx_v_unnamed_count); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 648; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __pyx_t_6 = PyObject_RichCompare(__pyx_v_lc, __pyx_t_10, Py_NE); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 648; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_t_16 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_16 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 648; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (__pyx_t_16) { __pyx_t_6 = PyNumber_Subtract(__pyx_v_lc, __pyx_v_ic); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 648; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_10 = __Pyx_PyInt_FromSize_t(__pyx_v_unnamed_count); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 648; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __pyx_t_9 = PyObject_RichCompare(__pyx_t_6, __pyx_t_10, Py_GT); __Pyx_XGOTREF(__pyx_t_9); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 648; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 648; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_17 = __pyx_t_2; } else { __pyx_t_17 = __pyx_t_16; } if (__pyx_t_17) { /* "pandas/parser.pyx":649 * ic = len(self.index_col) if self.index_col is not None else 0 * if lc != unnamed_count and lc-ic > unnamed_count: * hr -= 1 # <<<<<<<<<<<<<< * self.parser_start -= 1 * this_header = [ None ] * lc */ __pyx_v_hr = (__pyx_v_hr - 1); /* "pandas/parser.pyx":650 * if lc != unnamed_count and lc-ic > unnamed_count: * hr -= 1 * self.parser_start -= 1 # <<<<<<<<<<<<<< * this_header = [ None ] * lc * */ __pyx_v_self->parser_start = (__pyx_v_self->parser_start - 1); /* "pandas/parser.pyx":651 * hr -= 1 * self.parser_start -= 1 * this_header = [ None ] * lc # <<<<<<<<<<<<<< * * data_line = hr + 1 */ __pyx_t_9 = PyList_New(1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 651; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_INCREF(Py_None); PyList_SET_ITEM(__pyx_t_9, 0, Py_None); __Pyx_GIVEREF(Py_None); { PyObject* __pyx_temp = PyNumber_InPlaceMultiply(__pyx_t_9, __pyx_v_lc); if (unlikely(!__pyx_temp)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 651; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_temp); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = __pyx_temp; } __Pyx_DECREF_SET(__pyx_v_this_header, ((PyObject*)__pyx_t_9)); __pyx_t_9 = 0; goto __pyx_L20; } __pyx_L20:; goto __pyx_L19; } __pyx_L19:; goto __pyx_L18; } __pyx_L18:; /* "pandas/parser.pyx":653 * this_header = [ None ] * lc * * data_line = hr + 1 # <<<<<<<<<<<<<< * header.append(this_header) * */ __pyx_v_data_line = (__pyx_v_hr + 1); /* "pandas/parser.pyx":654 * * data_line = hr + 1 * header.append(this_header) # <<<<<<<<<<<<<< * * if self.names is not None: */ __pyx_t_18 = __Pyx_PyList_Append(__pyx_v_header, ((PyObject *)__pyx_v_this_header)); if (unlikely(__pyx_t_18 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 654; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pandas/parser.pyx":656 * header.append(this_header) * * if self.names is not None: # <<<<<<<<<<<<<< * header = [ self.names ] * */ __pyx_t_17 = (__pyx_v_self->names != Py_None); __pyx_t_16 = (__pyx_t_17 != 0); if (__pyx_t_16) { /* "pandas/parser.pyx":657 * * if self.names is not None: * header = [ self.names ] # <<<<<<<<<<<<<< * * elif self.names is not None: */ __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 657; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_self->names); PyList_SET_ITEM(__pyx_t_1, 0, __pyx_v_self->names); __Pyx_GIVEREF(__pyx_v_self->names); __Pyx_DECREF_SET(__pyx_v_header, ((PyObject*)__pyx_t_1)); __pyx_t_1 = 0; goto __pyx_L21; } __pyx_L21:; goto __pyx_L3; } /* "pandas/parser.pyx":659 * header = [ self.names ] * * elif self.names is not None: # <<<<<<<<<<<<<< * # Enforce this unless usecols * if not self.has_usecols: */ __pyx_t_16 = (__pyx_v_self->names != Py_None); __pyx_t_17 = (__pyx_t_16 != 0); if (__pyx_t_17) { /* "pandas/parser.pyx":661 * elif self.names is not None: * # Enforce this unless usecols * if not self.has_usecols: # <<<<<<<<<<<<<< * self.parser.expected_fields = len(self.names) * */ __pyx_t_17 = ((!(__pyx_v_self->has_usecols != 0)) != 0); if (__pyx_t_17) { /* "pandas/parser.pyx":662 * # Enforce this unless usecols * if not self.has_usecols: * self.parser.expected_fields = len(self.names) # <<<<<<<<<<<<<< * * # Names passed */ __pyx_t_1 = __pyx_v_self->names; __Pyx_INCREF(__pyx_t_1); __pyx_t_4 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 662; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_self->parser->expected_fields = __pyx_t_4; goto __pyx_L22; } __pyx_L22:; /* "pandas/parser.pyx":665 * * # Names passed * if self.parser.lines < 1: # <<<<<<<<<<<<<< * self._tokenize_rows(1) * */ __pyx_t_17 = ((__pyx_v_self->parser->lines < 1) != 0); if (__pyx_t_17) { /* "pandas/parser.pyx":666 * # Names passed * if self.parser.lines < 1: * self._tokenize_rows(1) # <<<<<<<<<<<<<< * * header = [ self.names ] */ __pyx_t_1 = ((struct __pyx_vtabstruct_6pandas_6parser_TextReader *)__pyx_v_self->__pyx_vtab)->_tokenize_rows(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 666; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L23; } __pyx_L23:; /* "pandas/parser.pyx":668 * self._tokenize_rows(1) * * header = [ self.names ] # <<<<<<<<<<<<<< * data_line = 0 * */ __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 668; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_self->names); PyList_SET_ITEM(__pyx_t_1, 0, __pyx_v_self->names); __Pyx_GIVEREF(__pyx_v_self->names); __Pyx_DECREF_SET(__pyx_v_header, ((PyObject*)__pyx_t_1)); __pyx_t_1 = 0; /* "pandas/parser.pyx":669 * * header = [ self.names ] * data_line = 0 # <<<<<<<<<<<<<< * * if self.parser.lines < 1: */ __pyx_v_data_line = 0; /* "pandas/parser.pyx":671 * data_line = 0 * * if self.parser.lines < 1: # <<<<<<<<<<<<<< * field_count = len(header[0]) * else: */ __pyx_t_17 = ((__pyx_v_self->parser->lines < 1) != 0); if (__pyx_t_17) { /* "pandas/parser.pyx":672 * * if self.parser.lines < 1: * field_count = len(header[0]) # <<<<<<<<<<<<<< * else: * field_count = self.parser.line_fields[data_line] */ __pyx_t_1 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_header), 0, sizeof(long), PyInt_FromLong, 1, 0, 1); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 672; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 672; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_field_count = __pyx_t_4; goto __pyx_L24; } /*else*/ { /* "pandas/parser.pyx":674 * field_count = len(header[0]) * else: * field_count = self.parser.line_fields[data_line] # <<<<<<<<<<<<<< * else: * # No header passed nor to be found in the file */ __pyx_v_field_count = (__pyx_v_self->parser->line_fields[__pyx_v_data_line]); } __pyx_L24:; goto __pyx_L3; } /*else*/ { /* "pandas/parser.pyx":677 * else: * # No header passed nor to be found in the file * if self.parser.lines < 1: # <<<<<<<<<<<<<< * self._tokenize_rows(1) * */ __pyx_t_17 = ((__pyx_v_self->parser->lines < 1) != 0); if (__pyx_t_17) { /* "pandas/parser.pyx":678 * # No header passed nor to be found in the file * if self.parser.lines < 1: * self._tokenize_rows(1) # <<<<<<<<<<<<<< * * return None, self.parser.line_fields[0] */ __pyx_t_1 = ((struct __pyx_vtabstruct_6pandas_6parser_TextReader *)__pyx_v_self->__pyx_vtab)->_tokenize_rows(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 678; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L25; } __pyx_L25:; /* "pandas/parser.pyx":680 * self._tokenize_rows(1) * * return None, self.parser.line_fields[0] # <<<<<<<<<<<<<< * * # Corner case, not enough lines in the file */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyInt_FromLong((__pyx_v_self->parser->line_fields[0])); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 680; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 680; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(Py_None); PyTuple_SET_ITEM(__pyx_t_3, 0, Py_None); __Pyx_GIVEREF(Py_None); PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = ((PyObject *)__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L0; } __pyx_L3:; /* "pandas/parser.pyx":683 * * # Corner case, not enough lines in the file * if self.parser.lines < data_line + 1: # <<<<<<<<<<<<<< * field_count = len(header[0]) * else: # not self.has_usecols: */ __pyx_t_17 = ((__pyx_v_self->parser->lines < (__pyx_v_data_line + 1)) != 0); if (__pyx_t_17) { /* "pandas/parser.pyx":684 * # Corner case, not enough lines in the file * if self.parser.lines < data_line + 1: * field_count = len(header[0]) # <<<<<<<<<<<<<< * else: # not self.has_usecols: * */ __pyx_t_3 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_header), 0, sizeof(long), PyInt_FromLong, 1, 0, 1); if (!__pyx_t_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 684; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PyObject_Length(__pyx_t_3); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 684; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_field_count = __pyx_t_4; goto __pyx_L26; } /*else*/ { /* "pandas/parser.pyx":687 * else: # not self.has_usecols: * * field_count = self.parser.line_fields[data_line] # <<<<<<<<<<<<<< * * # #2981 */ __pyx_v_field_count = (__pyx_v_self->parser->line_fields[__pyx_v_data_line]); /* "pandas/parser.pyx":690 * * # #2981 * if self.names is not None: # <<<<<<<<<<<<<< * field_count = max(field_count, len(self.names)) * */ __pyx_t_17 = (__pyx_v_self->names != Py_None); __pyx_t_16 = (__pyx_t_17 != 0); if (__pyx_t_16) { /* "pandas/parser.pyx":691 * # #2981 * if self.names is not None: * field_count = max(field_count, len(self.names)) # <<<<<<<<<<<<<< * * passed_count = len(header[0]) */ __pyx_t_3 = __pyx_v_self->names; __Pyx_INCREF(__pyx_t_3); __pyx_t_4 = PyObject_Length(__pyx_t_3); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 691; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_7 = __pyx_v_field_count; if (((__pyx_t_4 > __pyx_t_7) != 0)) { __pyx_t_15 = __pyx_t_4; } else { __pyx_t_15 = __pyx_t_7; } __pyx_v_field_count = __pyx_t_15; goto __pyx_L27; } __pyx_L27:; /* "pandas/parser.pyx":693 * field_count = max(field_count, len(self.names)) * * passed_count = len(header[0]) # <<<<<<<<<<<<<< * * # if passed_count > field_count: */ __pyx_t_3 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_header), 0, sizeof(long), PyInt_FromLong, 1, 0, 1); if (!__pyx_t_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 693; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PyObject_Length(__pyx_t_3); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 693; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_passed_count = __pyx_t_4; /* "pandas/parser.pyx":700 * # % (passed_count, field_count)) * * if self.has_usecols: # <<<<<<<<<<<<<< * nuse = len(self.usecols) * if nuse == passed_count: */ __pyx_t_16 = (__pyx_v_self->has_usecols != 0); if (__pyx_t_16) { /* "pandas/parser.pyx":701 * * if self.has_usecols: * nuse = len(self.usecols) # <<<<<<<<<<<<<< * if nuse == passed_count: * self.leading_cols = 0 */ __pyx_t_3 = ((PyObject *)__pyx_v_self->usecols); __Pyx_INCREF(__pyx_t_3); if (unlikely(__pyx_t_3 == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 701; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_4 = PySet_Size(__pyx_t_3); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 701; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyInt_FromSsize_t(__pyx_t_4); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 701; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_v_nuse = __pyx_t_3; __pyx_t_3 = 0; /* "pandas/parser.pyx":702 * if self.has_usecols: * nuse = len(self.usecols) * if nuse == passed_count: # <<<<<<<<<<<<<< * self.leading_cols = 0 * elif self.names is None and nuse < passed_count: */ __pyx_t_3 = __Pyx_PyInt_FromSize_t(__pyx_v_passed_count); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 702; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = PyObject_RichCompare(__pyx_v_nuse, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 702; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_16 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_16 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 702; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_16) { /* "pandas/parser.pyx":703 * nuse = len(self.usecols) * if nuse == passed_count: * self.leading_cols = 0 # <<<<<<<<<<<<<< * elif self.names is None and nuse < passed_count: * self.leading_cols = field_count - passed_count */ __pyx_v_self->leading_cols = 0; goto __pyx_L29; } /* "pandas/parser.pyx":704 * if nuse == passed_count: * self.leading_cols = 0 * elif self.names is None and nuse < passed_count: # <<<<<<<<<<<<<< * self.leading_cols = field_count - passed_count * elif passed_count != field_count: */ __pyx_t_16 = (__pyx_v_self->names == Py_None); if (__pyx_t_16) { __pyx_t_1 = __Pyx_PyInt_FromSize_t(__pyx_v_passed_count); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 704; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = PyObject_RichCompare(__pyx_v_nuse, __pyx_t_1, Py_LT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 704; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_17 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_17 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 704; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_2 = __pyx_t_17; } else { __pyx_t_2 = __pyx_t_16; } if (__pyx_t_2) { /* "pandas/parser.pyx":705 * self.leading_cols = 0 * elif self.names is None and nuse < passed_count: * self.leading_cols = field_count - passed_count # <<<<<<<<<<<<<< * elif passed_count != field_count: * raise ValueError('Passed header names ' */ __pyx_v_self->leading_cols = (__pyx_v_field_count - __pyx_v_passed_count); goto __pyx_L29; } /* "pandas/parser.pyx":706 * elif self.names is None and nuse < passed_count: * self.leading_cols = field_count - passed_count * elif passed_count != field_count: # <<<<<<<<<<<<<< * raise ValueError('Passed header names ' * 'mismatches usecols') */ __pyx_t_2 = ((__pyx_v_passed_count != __pyx_v_field_count) != 0); if (__pyx_t_2) { /* "pandas/parser.pyx":707 * self.leading_cols = field_count - passed_count * elif passed_count != field_count: * raise ValueError('Passed header names ' # <<<<<<<<<<<<<< * 'mismatches usecols') * # oh boy, #2442, #2981 */ __pyx_t_3 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_53), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 707; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 707; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L29; } __pyx_L29:; goto __pyx_L28; } /* "pandas/parser.pyx":710 * 'mismatches usecols') * # oh boy, #2442, #2981 * elif self.allow_leading_cols and passed_count < field_count: # <<<<<<<<<<<<<< * self.leading_cols = field_count - passed_count * */ __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_self->allow_leading_cols); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 710; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__pyx_t_2) { __pyx_t_16 = (__pyx_v_passed_count < __pyx_v_field_count); __pyx_t_17 = __pyx_t_16; } else { __pyx_t_17 = __pyx_t_2; } if (__pyx_t_17) { /* "pandas/parser.pyx":711 * # oh boy, #2442, #2981 * elif self.allow_leading_cols and passed_count < field_count: * self.leading_cols = field_count - passed_count # <<<<<<<<<<<<<< * * return header, field_count */ __pyx_v_self->leading_cols = (__pyx_v_field_count - __pyx_v_passed_count); goto __pyx_L28; } __pyx_L28:; } __pyx_L26:; /* "pandas/parser.pyx":713 * self.leading_cols = field_count - passed_count * * return header, field_count # <<<<<<<<<<<<<< * * cdef _implicit_index_count(self): */ __Pyx_XDECREF(__pyx_r); __pyx_t_3 = __Pyx_PyInt_FromSize_t(__pyx_v_field_count); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 713; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 713; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)__pyx_v_header)); PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_header)); __Pyx_GIVEREF(((PyObject *)__pyx_v_header)); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_r = ((PyObject *)__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_9); __Pyx_XDECREF(__pyx_t_10); __Pyx_XDECREF(__pyx_t_13); __Pyx_XDECREF(__pyx_t_14); __Pyx_AddTraceback("pandas.parser.TextReader._get_header", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_name); __Pyx_XDECREF(__pyx_v_header); __Pyx_XDECREF(__pyx_v_level); __Pyx_XDECREF(__pyx_v_this_header); __Pyx_XDECREF(__pyx_v_msg); __Pyx_XDECREF(__pyx_v_counts); __Pyx_XDECREF(__pyx_v_count); __Pyx_XDECREF(__pyx_v_lc); __Pyx_XDECREF(__pyx_v_ic); __Pyx_XDECREF(__pyx_v_nuse); __Pyx_XDECREF(__pyx_v_m); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/parser.pyx":715 * return header, field_count * * cdef _implicit_index_count(self): # <<<<<<<<<<<<<< * pass * */ static PyObject *__pyx_f_6pandas_6parser_10TextReader__implicit_index_count(CYTHON_UNUSED struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_implicit_index_count", 0); __pyx_r = Py_None; __Pyx_INCREF(Py_None); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_6parser_10TextReader_9read(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6pandas_6parser_10TextReader_8read[] = "\n rows=None --> read all rows\n "; static PyObject *__pyx_pw_6pandas_6parser_10TextReader_9read(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_rows = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("read (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__rows,0}; PyObject* values[1] = {0}; /* "pandas/parser.pyx":718 * pass * * def read(self, rows=None): # <<<<<<<<<<<<<< * """ * rows=None --> read all rows */ values[0] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__rows); if (value) { values[0] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "read") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 718; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_rows = values[0]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("read", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 718; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.parser.TextReader.read", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pandas_6parser_10TextReader_8read(((struct __pyx_obj_6pandas_6parser_TextReader *)__pyx_v_self), __pyx_v_rows); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_6parser_10TextReader_8read(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self, PyObject *__pyx_v_rows) { PyObject *__pyx_v_columns = NULL; PyObject *__pyx_v_result = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("read", 0); /* "pandas/parser.pyx":725 * int status * * if self.low_memory: # <<<<<<<<<<<<<< * # Conserve intermediate space * columns = self._read_low_memory(rows) */ __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_self->low_memory); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 725; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__pyx_t_1) { /* "pandas/parser.pyx":727 * if self.low_memory: * # Conserve intermediate space * columns = self._read_low_memory(rows) # <<<<<<<<<<<<<< * else: * # Don't care about memory usage */ __pyx_t_2 = ((struct __pyx_vtabstruct_6pandas_6parser_TextReader *)__pyx_v_self->__pyx_vtab)->_read_low_memory(__pyx_v_self, __pyx_v_rows); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 727; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_v_columns = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L3; } /*else*/ { /* "pandas/parser.pyx":730 * else: * # Don't care about memory usage * columns = self._read_rows(rows, 1) # <<<<<<<<<<<<<< * * if self.as_recarray: */ __pyx_t_2 = ((struct __pyx_vtabstruct_6pandas_6parser_TextReader *)__pyx_v_self->__pyx_vtab)->_read_rows(__pyx_v_self, __pyx_v_rows, 1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 730; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_v_columns = __pyx_t_2; __pyx_t_2 = 0; } __pyx_L3:; /* "pandas/parser.pyx":732 * columns = self._read_rows(rows, 1) * * if self.as_recarray: # <<<<<<<<<<<<<< * self._start_clock() * result = _to_structured_array(columns, self.header) */ __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_self->as_recarray); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 732; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__pyx_t_1) { /* "pandas/parser.pyx":733 * * if self.as_recarray: * self._start_clock() # <<<<<<<<<<<<<< * result = _to_structured_array(columns, self.header) * self._end_clock('Conversion to structured array') */ __pyx_t_2 = ((struct __pyx_vtabstruct_6pandas_6parser_TextReader *)__pyx_v_self->__pyx_vtab)->_start_clock(__pyx_v_self); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 733; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/parser.pyx":734 * if self.as_recarray: * self._start_clock() * result = _to_structured_array(columns, self.header) # <<<<<<<<<<<<<< * self._end_clock('Conversion to structured array') * */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_54); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 734; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 734; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_v_columns); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_columns); __Pyx_GIVEREF(__pyx_v_columns); __Pyx_INCREF(__pyx_v_self->header); PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_self->header); __Pyx_GIVEREF(__pyx_v_self->header); __pyx_t_4 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 734; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; __pyx_v_result = __pyx_t_4; __pyx_t_4 = 0; /* "pandas/parser.pyx":735 * self._start_clock() * result = _to_structured_array(columns, self.header) * self._end_clock('Conversion to structured array') # <<<<<<<<<<<<<< * * return result */ __pyx_t_4 = ((struct __pyx_vtabstruct_6pandas_6parser_TextReader *)__pyx_v_self->__pyx_vtab)->_end_clock(__pyx_v_self, ((PyObject *)__pyx_kp_s_55)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 735; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "pandas/parser.pyx":737 * self._end_clock('Conversion to structured array') * * return result # <<<<<<<<<<<<<< * else: * return columns */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_result); __pyx_r = __pyx_v_result; goto __pyx_L0; goto __pyx_L4; } /*else*/ { /* "pandas/parser.pyx":739 * return result * else: * return columns # <<<<<<<<<<<<<< * * cdef _read_low_memory(self, rows): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_columns); __pyx_r = __pyx_v_columns; goto __pyx_L0; } __pyx_L4:; __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.parser.TextReader.read", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_columns); __Pyx_XDECREF(__pyx_v_result); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/parser.pyx":741 * return columns * * cdef _read_low_memory(self, rows): # <<<<<<<<<<<<<< * cdef: * size_t rows_read = 0 */ static PyObject *__pyx_f_6pandas_6parser_10TextReader__read_low_memory(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self, PyObject *__pyx_v_rows) { size_t __pyx_v_rows_read; PyObject *__pyx_v_chunks = 0; PyObject *__pyx_v_chunk = NULL; PyObject *__pyx_v_crows = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; Py_ssize_t __pyx_t_8; int __pyx_t_9; PyObject *__pyx_t_10 = NULL; PyObject *__pyx_t_11 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_read_low_memory", 0); /* "pandas/parser.pyx":743 * cdef _read_low_memory(self, rows): * cdef: * size_t rows_read = 0 # <<<<<<<<<<<<<< * chunks = [] * */ __pyx_v_rows_read = 0; /* "pandas/parser.pyx":744 * cdef: * size_t rows_read = 0 * chunks = [] # <<<<<<<<<<<<<< * * if rows is None: */ __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 744; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_v_chunks = ((PyObject *)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/parser.pyx":746 * chunks = [] * * if rows is None: # <<<<<<<<<<<<<< * while True: * try: */ __pyx_t_2 = (__pyx_v_rows == Py_None); __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { /* "pandas/parser.pyx":747 * * if rows is None: * while True: # <<<<<<<<<<<<<< * try: * chunk = self._read_rows(self.buffer_lines, 0) */ while (1) { if (!1) break; /* "pandas/parser.pyx":748 * if rows is None: * while True: * try: # <<<<<<<<<<<<<< * chunk = self._read_rows(self.buffer_lines, 0) * if len(chunk) == 0: */ { __Pyx_ExceptionSave(&__pyx_t_4, &__pyx_t_5, &__pyx_t_6); __Pyx_XGOTREF(__pyx_t_4); __Pyx_XGOTREF(__pyx_t_5); __Pyx_XGOTREF(__pyx_t_6); /*try:*/ { /* "pandas/parser.pyx":749 * while True: * try: * chunk = self._read_rows(self.buffer_lines, 0) # <<<<<<<<<<<<<< * if len(chunk) == 0: * break */ __pyx_t_1 = PyInt_FromLong(__pyx_v_self->buffer_lines); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 749; __pyx_clineno = __LINE__; goto __pyx_L6_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_7 = ((struct __pyx_vtabstruct_6pandas_6parser_TextReader *)__pyx_v_self->__pyx_vtab)->_read_rows(__pyx_v_self, __pyx_t_1, 0); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 749; __pyx_clineno = __LINE__; goto __pyx_L6_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF_SET(__pyx_v_chunk, __pyx_t_7); __pyx_t_7 = 0; /* "pandas/parser.pyx":750 * try: * chunk = self._read_rows(self.buffer_lines, 0) * if len(chunk) == 0: # <<<<<<<<<<<<<< * break * except StopIteration: */ __pyx_t_8 = PyObject_Length(__pyx_v_chunk); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 750; __pyx_clineno = __LINE__; goto __pyx_L6_error;} __pyx_t_3 = ((__pyx_t_8 == 0) != 0); if (__pyx_t_3) { /* "pandas/parser.pyx":751 * chunk = self._read_rows(self.buffer_lines, 0) * if len(chunk) == 0: * break # <<<<<<<<<<<<<< * except StopIteration: * break */ goto __pyx_L11_try_break; goto __pyx_L14; } __pyx_L14:; } /*else:*/ { /* "pandas/parser.pyx":755 * break * else: * chunks.append(chunk) # <<<<<<<<<<<<<< * else: * while rows_read < rows: */ __pyx_t_7 = __Pyx_PyObject_Append(__pyx_v_chunks, __pyx_v_chunk); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 755; __pyx_clineno = __LINE__; goto __pyx_L8_except_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; goto __pyx_L13_try_end; __pyx_L6_error:; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; /* "pandas/parser.pyx":752 * if len(chunk) == 0: * break * except StopIteration: # <<<<<<<<<<<<<< * break * else: */ __pyx_t_9 = PyErr_ExceptionMatches(__pyx_builtin_StopIteration); if (__pyx_t_9) { __Pyx_AddTraceback("pandas.parser.TextReader._read_low_memory", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_7, &__pyx_t_1, &__pyx_t_10) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 752; __pyx_clineno = __LINE__; goto __pyx_L8_except_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_GOTREF(__pyx_t_1); __Pyx_GOTREF(__pyx_t_10); /* "pandas/parser.pyx":753 * break * except StopIteration: * break # <<<<<<<<<<<<<< * else: * chunks.append(chunk) */ goto __pyx_L15_except_break; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; goto __pyx_L7_exception_handled; __pyx_L15_except_break:; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; goto __pyx_L11_try_break; } __pyx_L8_except_error:; __Pyx_XGIVEREF(__pyx_t_4); __Pyx_XGIVEREF(__pyx_t_5); __Pyx_XGIVEREF(__pyx_t_6); __Pyx_ExceptionReset(__pyx_t_4, __pyx_t_5, __pyx_t_6); goto __pyx_L1_error; __pyx_L11_try_break:; __Pyx_XGIVEREF(__pyx_t_4); __Pyx_XGIVEREF(__pyx_t_5); __Pyx_XGIVEREF(__pyx_t_6); __Pyx_ExceptionReset(__pyx_t_4, __pyx_t_5, __pyx_t_6); goto __pyx_L5_break; __pyx_L7_exception_handled:; __Pyx_XGIVEREF(__pyx_t_4); __Pyx_XGIVEREF(__pyx_t_5); __Pyx_XGIVEREF(__pyx_t_6); __Pyx_ExceptionReset(__pyx_t_4, __pyx_t_5, __pyx_t_6); __pyx_L13_try_end:; } } __pyx_L5_break:; goto __pyx_L3; } /*else*/ { /* "pandas/parser.pyx":757 * chunks.append(chunk) * else: * while rows_read < rows: # <<<<<<<<<<<<<< * try: * crows = min(self.buffer_lines, rows - rows_read) */ while (1) { __pyx_t_10 = __Pyx_PyInt_FromSize_t(__pyx_v_rows_read); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 757; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __pyx_t_1 = PyObject_RichCompare(__pyx_t_10, __pyx_v_rows, Py_LT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 757; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 757; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (!__pyx_t_3) break; /* "pandas/parser.pyx":758 * else: * while rows_read < rows: * try: # <<<<<<<<<<<<<< * crows = min(self.buffer_lines, rows - rows_read) * */ { __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_5, &__pyx_t_4); __Pyx_XGOTREF(__pyx_t_6); __Pyx_XGOTREF(__pyx_t_5); __Pyx_XGOTREF(__pyx_t_4); /*try:*/ { /* "pandas/parser.pyx":759 * while rows_read < rows: * try: * crows = min(self.buffer_lines, rows - rows_read) # <<<<<<<<<<<<<< * * chunk = self._read_rows(crows, 0) */ __pyx_t_1 = __Pyx_PyInt_FromSize_t(__pyx_v_rows_read); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 759; __pyx_clineno = __LINE__; goto __pyx_L19_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_10 = PyNumber_Subtract(__pyx_v_rows, __pyx_t_1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 759; __pyx_clineno = __LINE__; goto __pyx_L19_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_9 = __pyx_v_self->buffer_lines; __pyx_t_7 = PyInt_FromLong(__pyx_t_9); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 759; __pyx_clineno = __LINE__; goto __pyx_L19_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_t_11 = PyObject_RichCompare(__pyx_t_10, __pyx_t_7, Py_LT); __Pyx_XGOTREF(__pyx_t_11); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 759; __pyx_clineno = __LINE__; goto __pyx_L19_error;} __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_11); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 759; __pyx_clineno = __LINE__; goto __pyx_L19_error;} __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; if (__pyx_t_3) { __Pyx_INCREF(__pyx_t_10); __pyx_t_1 = __pyx_t_10; } else { __pyx_t_11 = PyInt_FromLong(__pyx_t_9); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 759; __pyx_clineno = __LINE__; goto __pyx_L19_error;} __Pyx_GOTREF(__pyx_t_11); __pyx_t_1 = __pyx_t_11; __pyx_t_11 = 0; } __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_t_10 = __pyx_t_1; __Pyx_INCREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF_SET(__pyx_v_crows, __pyx_t_10); __pyx_t_10 = 0; /* "pandas/parser.pyx":761 * crows = min(self.buffer_lines, rows - rows_read) * * chunk = self._read_rows(crows, 0) # <<<<<<<<<<<<<< * if len(chunk) == 0: * break */ __pyx_t_10 = ((struct __pyx_vtabstruct_6pandas_6parser_TextReader *)__pyx_v_self->__pyx_vtab)->_read_rows(__pyx_v_self, __pyx_v_crows, 0); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 761; __pyx_clineno = __LINE__; goto __pyx_L19_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_XDECREF_SET(__pyx_v_chunk, __pyx_t_10); __pyx_t_10 = 0; /* "pandas/parser.pyx":762 * * chunk = self._read_rows(crows, 0) * if len(chunk) == 0: # <<<<<<<<<<<<<< * break * */ __pyx_t_8 = PyObject_Length(__pyx_v_chunk); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 762; __pyx_clineno = __LINE__; goto __pyx_L19_error;} __pyx_t_3 = ((__pyx_t_8 == 0) != 0); if (__pyx_t_3) { /* "pandas/parser.pyx":763 * chunk = self._read_rows(crows, 0) * if len(chunk) == 0: * break # <<<<<<<<<<<<<< * * rows_read += len(list(chunk.values())[0]) */ goto __pyx_L24_try_break; goto __pyx_L27; } __pyx_L27:; /* "pandas/parser.pyx":765 * break * * rows_read += len(list(chunk.values())[0]) # <<<<<<<<<<<<<< * except StopIteration: * break */ __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_chunk, __pyx_n_s__values); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 765; __pyx_clineno = __LINE__; goto __pyx_L19_error;} __Pyx_GOTREF(__pyx_t_10); __pyx_t_1 = PyObject_Call(__pyx_t_10, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 765; __pyx_clineno = __LINE__; goto __pyx_L19_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_t_10 = PyTuple_New(1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 765; __pyx_clineno = __LINE__; goto __pyx_L19_error;} __Pyx_GOTREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)(&PyList_Type))), ((PyObject *)__pyx_t_10), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 765; __pyx_clineno = __LINE__; goto __pyx_L19_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(((PyObject *)__pyx_t_10)); __pyx_t_10 = 0; __pyx_t_10 = __Pyx_GetItemInt_List(__pyx_t_1, 0, sizeof(long), PyInt_FromLong, 1, 0, 1); if (!__pyx_t_10) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 765; __pyx_clineno = __LINE__; goto __pyx_L19_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_8 = PyObject_Length(__pyx_t_10); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 765; __pyx_clineno = __LINE__; goto __pyx_L19_error;} __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_v_rows_read = (__pyx_v_rows_read + __pyx_t_8); } /*else:*/ { /* "pandas/parser.pyx":769 * break * else: * chunks.append(chunk) # <<<<<<<<<<<<<< * * parser_trim_buffers(self.parser) */ __pyx_t_10 = __Pyx_PyObject_Append(__pyx_v_chunks, __pyx_v_chunk); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 769; __pyx_clineno = __LINE__; goto __pyx_L21_except_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; } __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; goto __pyx_L26_try_end; __pyx_L19_error:; __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; /* "pandas/parser.pyx":766 * * rows_read += len(list(chunk.values())[0]) * except StopIteration: # <<<<<<<<<<<<<< * break * else: */ __pyx_t_9 = PyErr_ExceptionMatches(__pyx_builtin_StopIteration); if (__pyx_t_9) { __Pyx_AddTraceback("pandas.parser.TextReader._read_low_memory", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_10, &__pyx_t_1, &__pyx_t_11) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 766; __pyx_clineno = __LINE__; goto __pyx_L21_except_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_GOTREF(__pyx_t_1); __Pyx_GOTREF(__pyx_t_11); /* "pandas/parser.pyx":767 * rows_read += len(list(chunk.values())[0]) * except StopIteration: * break # <<<<<<<<<<<<<< * else: * chunks.append(chunk) */ goto __pyx_L28_except_break; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; goto __pyx_L20_exception_handled; __pyx_L28_except_break:; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; goto __pyx_L24_try_break; } __pyx_L21_except_error:; __Pyx_XGIVEREF(__pyx_t_6); __Pyx_XGIVEREF(__pyx_t_5); __Pyx_XGIVEREF(__pyx_t_4); __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_5, __pyx_t_4); goto __pyx_L1_error; __pyx_L24_try_break:; __Pyx_XGIVEREF(__pyx_t_6); __Pyx_XGIVEREF(__pyx_t_5); __Pyx_XGIVEREF(__pyx_t_4); __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_5, __pyx_t_4); goto __pyx_L18_break; __pyx_L20_exception_handled:; __Pyx_XGIVEREF(__pyx_t_6); __Pyx_XGIVEREF(__pyx_t_5); __Pyx_XGIVEREF(__pyx_t_4); __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_5, __pyx_t_4); __pyx_L26_try_end:; } } __pyx_L18_break:; } __pyx_L3:; /* "pandas/parser.pyx":771 * chunks.append(chunk) * * parser_trim_buffers(self.parser) # <<<<<<<<<<<<<< * * if len(chunks) == 0: */ parser_trim_buffers(__pyx_v_self->parser); /* "pandas/parser.pyx":773 * parser_trim_buffers(self.parser) * * if len(chunks) == 0: # <<<<<<<<<<<<<< * raise StopIteration * */ __pyx_t_8 = PyObject_Length(__pyx_v_chunks); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 773; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_3 = ((__pyx_t_8 == 0) != 0); if (__pyx_t_3) { /* "pandas/parser.pyx":774 * * if len(chunks) == 0: * raise StopIteration # <<<<<<<<<<<<<< * * # destructive to chunks */ __Pyx_Raise(__pyx_builtin_StopIteration, 0, 0, 0); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 774; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L30; } __pyx_L30:; /* "pandas/parser.pyx":777 * * # destructive to chunks * return _concatenate_chunks(chunks) # <<<<<<<<<<<<<< * * cdef _tokenize_rows(self, size_t nrows): */ __Pyx_XDECREF(__pyx_r); __pyx_t_11 = __Pyx_GetModuleGlobalName(__pyx_n_s___concatenate_chunks); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 777; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 777; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_chunks); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_chunks); __Pyx_GIVEREF(__pyx_v_chunks); __pyx_t_10 = PyObject_Call(__pyx_t_11, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 777; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_r = __pyx_t_10; __pyx_t_10 = 0; goto __pyx_L0; __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_10); __Pyx_XDECREF(__pyx_t_11); __Pyx_AddTraceback("pandas.parser.TextReader._read_low_memory", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_chunks); __Pyx_XDECREF(__pyx_v_chunk); __Pyx_XDECREF(__pyx_v_crows); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/parser.pyx":779 * return _concatenate_chunks(chunks) * * cdef _tokenize_rows(self, size_t nrows): # <<<<<<<<<<<<<< * cdef int status * status = tokenize_nrows(self.parser, nrows) */ static PyObject *__pyx_f_6pandas_6parser_10TextReader__tokenize_rows(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self, size_t __pyx_v_nrows) { int __pyx_v_status; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_tokenize_rows", 0); /* "pandas/parser.pyx":781 * cdef _tokenize_rows(self, size_t nrows): * cdef int status * status = tokenize_nrows(self.parser, nrows) # <<<<<<<<<<<<<< * * if self.parser.warn_msg != NULL: */ __pyx_v_status = tokenize_nrows(__pyx_v_self->parser, __pyx_v_nrows); /* "pandas/parser.pyx":783 * status = tokenize_nrows(self.parser, nrows) * * if self.parser.warn_msg != NULL: # <<<<<<<<<<<<<< * print >> sys.stderr, self.parser.warn_msg * free(self.parser.warn_msg) */ __pyx_t_1 = ((__pyx_v_self->parser->warn_msg != NULL) != 0); if (__pyx_t_1) { /* "pandas/parser.pyx":784 * * if self.parser.warn_msg != NULL: * print >> sys.stderr, self.parser.warn_msg # <<<<<<<<<<<<<< * free(self.parser.warn_msg) * self.parser.warn_msg = NULL */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__sys); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 784; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__stderr); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 784; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyBytes_FromString(__pyx_v_self->parser->warn_msg); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 784; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_2)); if (__Pyx_PrintOne(__pyx_t_3, ((PyObject *)__pyx_t_2)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 784; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/parser.pyx":785 * if self.parser.warn_msg != NULL: * print >> sys.stderr, self.parser.warn_msg * free(self.parser.warn_msg) # <<<<<<<<<<<<<< * self.parser.warn_msg = NULL * */ free(__pyx_v_self->parser->warn_msg); /* "pandas/parser.pyx":786 * print >> sys.stderr, self.parser.warn_msg * free(self.parser.warn_msg) * self.parser.warn_msg = NULL # <<<<<<<<<<<<<< * * if status < 0: */ __pyx_v_self->parser->warn_msg = NULL; goto __pyx_L3; } __pyx_L3:; /* "pandas/parser.pyx":788 * self.parser.warn_msg = NULL * * if status < 0: # <<<<<<<<<<<<<< * raise_parser_error('Error tokenizing data', self.parser) * */ __pyx_t_1 = ((__pyx_v_status < 0) != 0); if (__pyx_t_1) { /* "pandas/parser.pyx":789 * * if status < 0: * raise_parser_error('Error tokenizing data', self.parser) # <<<<<<<<<<<<<< * * cdef _read_rows(self, rows, bint trim): */ __pyx_t_3 = __pyx_f_6pandas_6parser_raise_parser_error(((PyObject *)__pyx_kp_s_56), __pyx_v_self->parser); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 789; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L4; } __pyx_L4:; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("pandas.parser.TextReader._tokenize_rows", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/parser.pyx":791 * raise_parser_error('Error tokenizing data', self.parser) * * cdef _read_rows(self, rows, bint trim): # <<<<<<<<<<<<<< * cdef: * int buffered_lines */ static PyObject *__pyx_f_6pandas_6parser_10TextReader__read_rows(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self, PyObject *__pyx_v_rows, int __pyx_v_trim) { int __pyx_v_buffered_lines; int __pyx_v_irows; int __pyx_v_footer; int __pyx_v_status; PyObject *__pyx_v_columns = NULL; PyObject *__pyx_v_rows_read = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; int __pyx_t_3; int __pyx_t_4; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; Py_ssize_t __pyx_t_7; size_t __pyx_t_8; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_read_rows", 0); /* "pandas/parser.pyx":794 * cdef: * int buffered_lines * int irows, footer = 0 # <<<<<<<<<<<<<< * * self._start_clock() */ __pyx_v_footer = 0; /* "pandas/parser.pyx":796 * int irows, footer = 0 * * self._start_clock() # <<<<<<<<<<<<<< * * if rows is not None: */ __pyx_t_1 = ((struct __pyx_vtabstruct_6pandas_6parser_TextReader *)__pyx_v_self->__pyx_vtab)->_start_clock(__pyx_v_self); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 796; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pandas/parser.pyx":798 * self._start_clock() * * if rows is not None: # <<<<<<<<<<<<<< * irows = rows * buffered_lines = self.parser.lines - self.parser_start */ __pyx_t_2 = (__pyx_v_rows != Py_None); __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { /* "pandas/parser.pyx":799 * * if rows is not None: * irows = rows # <<<<<<<<<<<<<< * buffered_lines = self.parser.lines - self.parser_start * if buffered_lines < irows: */ __pyx_t_4 = __Pyx_PyInt_AsInt(__pyx_v_rows); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 799; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_irows = __pyx_t_4; /* "pandas/parser.pyx":800 * if rows is not None: * irows = rows * buffered_lines = self.parser.lines - self.parser_start # <<<<<<<<<<<<<< * if buffered_lines < irows: * self._tokenize_rows(irows - buffered_lines) */ __pyx_v_buffered_lines = (__pyx_v_self->parser->lines - __pyx_v_self->parser_start); /* "pandas/parser.pyx":801 * irows = rows * buffered_lines = self.parser.lines - self.parser_start * if buffered_lines < irows: # <<<<<<<<<<<<<< * self._tokenize_rows(irows - buffered_lines) * */ __pyx_t_3 = ((__pyx_v_buffered_lines < __pyx_v_irows) != 0); if (__pyx_t_3) { /* "pandas/parser.pyx":802 * buffered_lines = self.parser.lines - self.parser_start * if buffered_lines < irows: * self._tokenize_rows(irows - buffered_lines) # <<<<<<<<<<<<<< * * if self.skip_footer > 0: */ __pyx_t_1 = ((struct __pyx_vtabstruct_6pandas_6parser_TextReader *)__pyx_v_self->__pyx_vtab)->_tokenize_rows(__pyx_v_self, (__pyx_v_irows - __pyx_v_buffered_lines)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 802; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L4; } __pyx_L4:; /* "pandas/parser.pyx":804 * self._tokenize_rows(irows - buffered_lines) * * if self.skip_footer > 0: # <<<<<<<<<<<<<< * raise ValueError('skip_footer can only be used to read ' * 'the whole file') */ __pyx_t_3 = ((__pyx_v_self->skip_footer > 0) != 0); if (__pyx_t_3) { /* "pandas/parser.pyx":805 * * if self.skip_footer > 0: * raise ValueError('skip_footer can only be used to read ' # <<<<<<<<<<<<<< * 'the whole file') * else: */ __pyx_t_1 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_58), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 805; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 805; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L5; } __pyx_L5:; goto __pyx_L3; } /*else*/ { /* "pandas/parser.pyx":808 * 'the whole file') * else: * status = tokenize_all_rows(self.parser) # <<<<<<<<<<<<<< * * if self.parser.warn_msg != NULL: */ __pyx_v_status = tokenize_all_rows(__pyx_v_self->parser); /* "pandas/parser.pyx":810 * status = tokenize_all_rows(self.parser) * * if self.parser.warn_msg != NULL: # <<<<<<<<<<<<<< * print >> sys.stderr, self.parser.warn_msg * free(self.parser.warn_msg) */ __pyx_t_3 = ((__pyx_v_self->parser->warn_msg != NULL) != 0); if (__pyx_t_3) { /* "pandas/parser.pyx":811 * * if self.parser.warn_msg != NULL: * print >> sys.stderr, self.parser.warn_msg # <<<<<<<<<<<<<< * free(self.parser.warn_msg) * self.parser.warn_msg = NULL */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__sys); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 811; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s__stderr); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 811; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_PyBytes_FromString(__pyx_v_self->parser->warn_msg); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 811; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_1)); if (__Pyx_PrintOne(__pyx_t_5, ((PyObject *)__pyx_t_1)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 811; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "pandas/parser.pyx":812 * if self.parser.warn_msg != NULL: * print >> sys.stderr, self.parser.warn_msg * free(self.parser.warn_msg) # <<<<<<<<<<<<<< * self.parser.warn_msg = NULL * */ free(__pyx_v_self->parser->warn_msg); /* "pandas/parser.pyx":813 * print >> sys.stderr, self.parser.warn_msg * free(self.parser.warn_msg) * self.parser.warn_msg = NULL # <<<<<<<<<<<<<< * * if status < 0: */ __pyx_v_self->parser->warn_msg = NULL; goto __pyx_L6; } __pyx_L6:; /* "pandas/parser.pyx":815 * self.parser.warn_msg = NULL * * if status < 0: # <<<<<<<<<<<<<< * raise_parser_error('Error tokenizing data', self.parser) * footer = self.skip_footer */ __pyx_t_3 = ((__pyx_v_status < 0) != 0); if (__pyx_t_3) { /* "pandas/parser.pyx":816 * * if status < 0: * raise_parser_error('Error tokenizing data', self.parser) # <<<<<<<<<<<<<< * footer = self.skip_footer * */ __pyx_t_5 = __pyx_f_6pandas_6parser_raise_parser_error(((PyObject *)__pyx_kp_s_56), __pyx_v_self->parser); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 816; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; goto __pyx_L7; } __pyx_L7:; /* "pandas/parser.pyx":817 * if status < 0: * raise_parser_error('Error tokenizing data', self.parser) * footer = self.skip_footer # <<<<<<<<<<<<<< * * if self.parser_start == self.parser.lines: */ __pyx_t_4 = __pyx_v_self->skip_footer; __pyx_v_footer = __pyx_t_4; } __pyx_L3:; /* "pandas/parser.pyx":819 * footer = self.skip_footer * * if self.parser_start == self.parser.lines: # <<<<<<<<<<<<<< * raise StopIteration * self._end_clock('Tokenization') */ __pyx_t_3 = ((__pyx_v_self->parser_start == __pyx_v_self->parser->lines) != 0); if (__pyx_t_3) { /* "pandas/parser.pyx":820 * * if self.parser_start == self.parser.lines: * raise StopIteration # <<<<<<<<<<<<<< * self._end_clock('Tokenization') * */ __Pyx_Raise(__pyx_builtin_StopIteration, 0, 0, 0); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 820; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L8; } __pyx_L8:; /* "pandas/parser.pyx":821 * if self.parser_start == self.parser.lines: * raise StopIteration * self._end_clock('Tokenization') # <<<<<<<<<<<<<< * * self._start_clock() */ __pyx_t_5 = ((struct __pyx_vtabstruct_6pandas_6parser_TextReader *)__pyx_v_self->__pyx_vtab)->_end_clock(__pyx_v_self, ((PyObject *)__pyx_n_s__Tokenization)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 821; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "pandas/parser.pyx":823 * self._end_clock('Tokenization') * * self._start_clock() # <<<<<<<<<<<<<< * columns = self._convert_column_data(rows=rows, * footer=footer, */ __pyx_t_5 = ((struct __pyx_vtabstruct_6pandas_6parser_TextReader *)__pyx_v_self->__pyx_vtab)->_start_clock(__pyx_v_self); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 823; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "pandas/parser.pyx":824 * * self._start_clock() * columns = self._convert_column_data(rows=rows, # <<<<<<<<<<<<<< * footer=footer, * upcast_na=not self.as_recarray) */ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_59); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 824; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 824; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_1)); if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__rows), __pyx_v_rows) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 824; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/parser.pyx":825 * self._start_clock() * columns = self._convert_column_data(rows=rows, * footer=footer, # <<<<<<<<<<<<<< * upcast_na=not self.as_recarray) * self._end_clock('Type conversion') */ __pyx_t_6 = PyInt_FromLong(__pyx_v_footer); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 825; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__footer), __pyx_t_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 824; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; /* "pandas/parser.pyx":826 * columns = self._convert_column_data(rows=rows, * footer=footer, * upcast_na=not self.as_recarray) # <<<<<<<<<<<<<< * self._end_clock('Type conversion') * */ __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_self->as_recarray); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 826; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_6 = __Pyx_PyBool_FromLong((!__pyx_t_3)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 826; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__upcast_na), __pyx_t_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 824; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_empty_tuple), ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 824; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_v_columns = __pyx_t_6; __pyx_t_6 = 0; /* "pandas/parser.pyx":827 * footer=footer, * upcast_na=not self.as_recarray) * self._end_clock('Type conversion') # <<<<<<<<<<<<<< * * self._start_clock() */ __pyx_t_6 = ((struct __pyx_vtabstruct_6pandas_6parser_TextReader *)__pyx_v_self->__pyx_vtab)->_end_clock(__pyx_v_self, ((PyObject *)__pyx_kp_s_60)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 827; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; /* "pandas/parser.pyx":829 * self._end_clock('Type conversion') * * self._start_clock() # <<<<<<<<<<<<<< * if len(columns) > 0: * rows_read = len(list(columns.values())[0]) */ __pyx_t_6 = ((struct __pyx_vtabstruct_6pandas_6parser_TextReader *)__pyx_v_self->__pyx_vtab)->_start_clock(__pyx_v_self); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 829; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; /* "pandas/parser.pyx":830 * * self._start_clock() * if len(columns) > 0: # <<<<<<<<<<<<<< * rows_read = len(list(columns.values())[0]) * # trim */ __pyx_t_7 = PyObject_Length(__pyx_v_columns); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 830; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_3 = ((__pyx_t_7 > 0) != 0); if (__pyx_t_3) { /* "pandas/parser.pyx":831 * self._start_clock() * if len(columns) > 0: * rows_read = len(list(columns.values())[0]) # <<<<<<<<<<<<<< * # trim * parser_consume_rows(self.parser, rows_read) */ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_columns, __pyx_n_s__values); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 831; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_1 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 831; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 831; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)(&PyList_Type))), ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 831; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0; __pyx_t_6 = __Pyx_GetItemInt_List(__pyx_t_1, 0, sizeof(long), PyInt_FromLong, 1, 0, 1); if (!__pyx_t_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 831; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_7 = PyObject_Length(__pyx_t_6); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 831; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyInt_FromSsize_t(__pyx_t_7); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 831; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_v_rows_read = __pyx_t_6; __pyx_t_6 = 0; /* "pandas/parser.pyx":833 * rows_read = len(list(columns.values())[0]) * # trim * parser_consume_rows(self.parser, rows_read) # <<<<<<<<<<<<<< * if trim: * parser_trim_buffers(self.parser) */ __pyx_t_8 = __Pyx_PyInt_AsSize_t(__pyx_v_rows_read); if (unlikely((__pyx_t_8 == (size_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 833; __pyx_clineno = __LINE__; goto __pyx_L1_error;} parser_consume_rows(__pyx_v_self->parser, __pyx_t_8); /* "pandas/parser.pyx":834 * # trim * parser_consume_rows(self.parser, rows_read) * if trim: # <<<<<<<<<<<<<< * parser_trim_buffers(self.parser) * self.parser_start -= rows_read */ __pyx_t_3 = (__pyx_v_trim != 0); if (__pyx_t_3) { /* "pandas/parser.pyx":835 * parser_consume_rows(self.parser, rows_read) * if trim: * parser_trim_buffers(self.parser) # <<<<<<<<<<<<<< * self.parser_start -= rows_read * */ parser_trim_buffers(__pyx_v_self->parser); goto __pyx_L10; } __pyx_L10:; /* "pandas/parser.pyx":836 * if trim: * parser_trim_buffers(self.parser) * self.parser_start -= rows_read # <<<<<<<<<<<<<< * * self._end_clock('Parser memory cleanup') */ __pyx_t_6 = PyInt_FromLong(__pyx_v_self->parser_start); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 836; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_1 = PyNumber_InPlaceSubtract(__pyx_t_6, __pyx_v_rows_read); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 836; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_4 = __Pyx_PyInt_AsInt(__pyx_t_1); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 836; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_self->parser_start = __pyx_t_4; goto __pyx_L9; } __pyx_L9:; /* "pandas/parser.pyx":838 * self.parser_start -= rows_read * * self._end_clock('Parser memory cleanup') # <<<<<<<<<<<<<< * * return columns */ __pyx_t_1 = ((struct __pyx_vtabstruct_6pandas_6parser_TextReader *)__pyx_v_self->__pyx_vtab)->_end_clock(__pyx_v_self, ((PyObject *)__pyx_kp_s_61)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 838; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pandas/parser.pyx":840 * self._end_clock('Parser memory cleanup') * * return columns # <<<<<<<<<<<<<< * * def debug_print(self): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_columns); __pyx_r = __pyx_v_columns; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("pandas.parser.TextReader._read_rows", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_columns); __Pyx_XDECREF(__pyx_v_rows_read); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_6parser_10TextReader_11debug_print(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static PyObject *__pyx_pw_6pandas_6parser_10TextReader_11debug_print(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("debug_print (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_6parser_10TextReader_10debug_print(((struct __pyx_obj_6pandas_6parser_TextReader *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/parser.pyx":842 * return columns * * def debug_print(self): # <<<<<<<<<<<<<< * debug_print_parser(self.parser) * */ static PyObject *__pyx_pf_6pandas_6parser_10TextReader_10debug_print(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("debug_print", 0); /* "pandas/parser.pyx":843 * * def debug_print(self): * debug_print_parser(self.parser) # <<<<<<<<<<<<<< * * cdef _start_clock(self): */ debug_print_parser(__pyx_v_self->parser); __pyx_r = Py_None; __Pyx_INCREF(Py_None); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/parser.pyx":845 * debug_print_parser(self.parser) * * cdef _start_clock(self): # <<<<<<<<<<<<<< * self.clocks.append(time.time()) * */ static PyObject *__pyx_f_6pandas_6parser_10TextReader__start_clock(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_t_3; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_start_clock", 0); /* "pandas/parser.pyx":846 * * cdef _start_clock(self): * self.clocks.append(time.time()) # <<<<<<<<<<<<<< * * cdef _end_clock(self, what): */ if (unlikely(((PyObject *)__pyx_v_self->clocks) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "append"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 846; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__time); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 846; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s__time); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 846; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 846; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_3 = __Pyx_PyList_Append(__pyx_v_self->clocks, __pyx_t_1); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 846; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("pandas.parser.TextReader._start_clock", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/parser.pyx":848 * self.clocks.append(time.time()) * * cdef _end_clock(self, what): # <<<<<<<<<<<<<< * if self.verbose: * elapsed = time.time() - self.clocks.pop(-1) */ static PyObject *__pyx_f_6pandas_6parser_10TextReader__end_clock(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self, PyObject *__pyx_v_what) { PyObject *__pyx_v_elapsed = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_end_clock", 0); /* "pandas/parser.pyx":849 * * cdef _end_clock(self, what): * if self.verbose: # <<<<<<<<<<<<<< * elapsed = time.time() - self.clocks.pop(-1) * print '%s took: %.2f ms' % (what, elapsed * 1000) */ __pyx_t_1 = (__pyx_v_self->verbose != 0); if (__pyx_t_1) { /* "pandas/parser.pyx":850 * cdef _end_clock(self, what): * if self.verbose: * elapsed = time.time() - self.clocks.pop(-1) # <<<<<<<<<<<<<< * print '%s took: %.2f ms' % (what, elapsed * 1000) * */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__time); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 850; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__time); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 850; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 850; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyObject_PopIndex(((PyObject *)__pyx_v_self->clocks), -1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 850; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PyNumber_Subtract(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 850; __pyx_clineno = __LINE__; goto __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_elapsed = __pyx_t_4; __pyx_t_4 = 0; /* "pandas/parser.pyx":851 * if self.verbose: * elapsed = time.time() - self.clocks.pop(-1) * print '%s took: %.2f ms' % (what, elapsed * 1000) # <<<<<<<<<<<<<< * * def set_noconvert(self, i): */ __pyx_t_4 = PyNumber_Multiply(__pyx_v_elapsed, __pyx_int_1000); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 851; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 851; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_v_what); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_what); __Pyx_GIVEREF(__pyx_v_what); PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_62), ((PyObject *)__pyx_t_3)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 851; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_4)); __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; if (__Pyx_PrintOne(0, ((PyObject *)__pyx_t_4)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 851; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; goto __pyx_L3; } __pyx_L3:; __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.parser.TextReader._end_clock", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_elapsed); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_6parser_10TextReader_13set_noconvert(PyObject *__pyx_v_self, PyObject *__pyx_v_i); /*proto*/ static PyObject *__pyx_pw_6pandas_6parser_10TextReader_13set_noconvert(PyObject *__pyx_v_self, PyObject *__pyx_v_i) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("set_noconvert (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_6parser_10TextReader_12set_noconvert(((struct __pyx_obj_6pandas_6parser_TextReader *)__pyx_v_self), ((PyObject *)__pyx_v_i)); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/parser.pyx":853 * print '%s took: %.2f ms' % (what, elapsed * 1000) * * def set_noconvert(self, i): # <<<<<<<<<<<<<< * self.noconvert.add(i) * */ static PyObject *__pyx_pf_6pandas_6parser_10TextReader_12set_noconvert(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self, PyObject *__pyx_v_i) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("set_noconvert", 0); /* "pandas/parser.pyx":854 * * def set_noconvert(self, i): * self.noconvert.add(i) # <<<<<<<<<<<<<< * * def remove_noconvert(self, i): */ if (unlikely(((PyObject *)__pyx_v_self->noconvert) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "add"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 854; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_1 = PySet_Add(__pyx_v_self->noconvert, __pyx_v_i); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 854; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("pandas.parser.TextReader.set_noconvert", __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_6parser_10TextReader_15remove_noconvert(PyObject *__pyx_v_self, PyObject *__pyx_v_i); /*proto*/ static PyObject *__pyx_pw_6pandas_6parser_10TextReader_15remove_noconvert(PyObject *__pyx_v_self, PyObject *__pyx_v_i) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("remove_noconvert (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_6parser_10TextReader_14remove_noconvert(((struct __pyx_obj_6pandas_6parser_TextReader *)__pyx_v_self), ((PyObject *)__pyx_v_i)); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/parser.pyx":856 * self.noconvert.add(i) * * def remove_noconvert(self, i): # <<<<<<<<<<<<<< * self.noconvert.remove(i) * */ static PyObject *__pyx_pf_6pandas_6parser_10TextReader_14remove_noconvert(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self, PyObject *__pyx_v_i) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("remove_noconvert", 0); /* "pandas/parser.pyx":857 * * def remove_noconvert(self, i): * self.noconvert.remove(i) # <<<<<<<<<<<<<< * * def _convert_column_data(self, rows=None, upcast_na=False, footer=0): */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->noconvert), __pyx_n_s__remove); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 857; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 857; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_i); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_i); __Pyx_GIVEREF(__pyx_v_i); __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 857; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("pandas.parser.TextReader.remove_noconvert", __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_6parser_10TextReader_17_convert_column_data(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_6pandas_6parser_10TextReader_17_convert_column_data(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_rows = 0; PyObject *__pyx_v_upcast_na = 0; CYTHON_UNUSED PyObject *__pyx_v_footer = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_convert_column_data (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__rows,&__pyx_n_s__upcast_na,&__pyx_n_s__footer,0}; PyObject* values[3] = {0,0,0}; /* "pandas/parser.pyx":859 * self.noconvert.remove(i) * * def _convert_column_data(self, rows=None, upcast_na=False, footer=0): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, nused */ values[0] = ((PyObject *)Py_None); values[1] = __pyx_k_63; values[2] = ((PyObject *)__pyx_int_0); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__rows); if (value) { values[0] = value; kw_args--; } } case 1: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__upcast_na); if (value) { values[1] = value; kw_args--; } } case 2: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__footer); if (value) { values[2] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_convert_column_data") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 859; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_rows = values[0]; __pyx_v_upcast_na = values[1]; __pyx_v_footer = values[2]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("_convert_column_data", 0, 0, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 859; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.parser.TextReader._convert_column_data", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pandas_6parser_10TextReader_16_convert_column_data(((struct __pyx_obj_6pandas_6parser_TextReader *)__pyx_v_self), __pyx_v_rows, __pyx_v_upcast_na, __pyx_v_footer); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_6parser_10TextReader_16_convert_column_data(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self, PyObject *__pyx_v_rows, PyObject *__pyx_v_upcast_na, CYTHON_UNUSED PyObject *__pyx_v_footer) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_nused; kh_str_t *__pyx_v_na_hashset; int __pyx_v_start; int __pyx_v_end; PyObject *__pyx_v_name = 0; PyObject *__pyx_v_na_flist = 0; int __pyx_v_na_filter; Py_ssize_t __pyx_v_num_cols; PyObject *__pyx_v_results = NULL; PyObject *__pyx_v_conv = NULL; PyObject *__pyx_v_na_list = NULL; PyObject *__pyx_v_col_res = NULL; PyObject *__pyx_v_na_count = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; Py_ssize_t __pyx_t_8; Py_ssize_t __pyx_t_9; int __pyx_t_10; PyObject *(*__pyx_t_11)(PyObject *); kh_str_t *__pyx_t_12; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_convert_column_data", 0); /* "pandas/parser.pyx":862 * cdef: * Py_ssize_t i, nused * kh_str_t *na_hashset = NULL # <<<<<<<<<<<<<< * int start, end * object name, na_flist */ __pyx_v_na_hashset = NULL; /* "pandas/parser.pyx":865 * int start, end * object name, na_flist * bint na_filter = 0 # <<<<<<<<<<<<<< * Py_ssize_t num_cols * */ __pyx_v_na_filter = 0; /* "pandas/parser.pyx":868 * Py_ssize_t num_cols * * start = self.parser_start # <<<<<<<<<<<<<< * * if rows is None: */ __pyx_t_1 = __pyx_v_self->parser_start; __pyx_v_start = __pyx_t_1; /* "pandas/parser.pyx":870 * start = self.parser_start * * if rows is None: # <<<<<<<<<<<<<< * end = self.parser.lines * else: */ __pyx_t_2 = (__pyx_v_rows == Py_None); __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { /* "pandas/parser.pyx":871 * * if rows is None: * end = self.parser.lines # <<<<<<<<<<<<<< * else: * end = min(start + rows, self.parser.lines) */ __pyx_t_1 = __pyx_v_self->parser->lines; __pyx_v_end = __pyx_t_1; goto __pyx_L3; } /*else*/ { /* "pandas/parser.pyx":873 * end = self.parser.lines * else: * end = min(start + rows, self.parser.lines) # <<<<<<<<<<<<<< * * # # skip footer */ __pyx_t_1 = __pyx_v_self->parser->lines; __pyx_t_4 = PyInt_FromLong(__pyx_v_start); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 873; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = PyNumber_Add(__pyx_t_4, __pyx_v_rows); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 873; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_6 = PyInt_FromLong(__pyx_t_1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 873; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = PyObject_RichCompare(__pyx_t_6, __pyx_t_5, Py_LT); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 873; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 873; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (__pyx_t_3) { __pyx_t_7 = PyInt_FromLong(__pyx_t_1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 873; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_t_4 = __pyx_t_7; __pyx_t_7 = 0; } else { __Pyx_INCREF(__pyx_t_5); __pyx_t_4 = __pyx_t_5; } __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_1 = __Pyx_PyInt_AsInt(__pyx_t_4); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 873; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_end = __pyx_t_1; } __pyx_L3:; /* "pandas/parser.pyx":886 * #print >> sys.stderr, self.header * #print >> sys.stderr, "index" * num_cols = -1 # <<<<<<<<<<<<<< * for i in range(self.parser.lines): * num_cols = (num_cols < self.parser.line_fields[i]) * self.parser.line_fields[i] +\ */ __pyx_v_num_cols = -1; /* "pandas/parser.pyx":887 * #print >> sys.stderr, "index" * num_cols = -1 * for i in range(self.parser.lines): # <<<<<<<<<<<<<< * num_cols = (num_cols < self.parser.line_fields[i]) * self.parser.line_fields[i] +\ * (num_cols >= self.parser.line_fields[i]) * num_cols */ __pyx_t_1 = __pyx_v_self->parser->lines; for (__pyx_t_8 = 0; __pyx_t_8 < __pyx_t_1; __pyx_t_8+=1) { __pyx_v_i = __pyx_t_8; /* "pandas/parser.pyx":889 * for i in range(self.parser.lines): * num_cols = (num_cols < self.parser.line_fields[i]) * self.parser.line_fields[i] +\ * (num_cols >= self.parser.line_fields[i]) * num_cols # <<<<<<<<<<<<<< * * if self.table_width - self.leading_cols > num_cols: */ __pyx_v_num_cols = (((__pyx_v_num_cols < (__pyx_v_self->parser->line_fields[__pyx_v_i])) * (__pyx_v_self->parser->line_fields[__pyx_v_i])) + ((__pyx_v_num_cols >= (__pyx_v_self->parser->line_fields[__pyx_v_i])) * __pyx_v_num_cols)); } /* "pandas/parser.pyx":891 * (num_cols >= self.parser.line_fields[i]) * num_cols * * if self.table_width - self.leading_cols > num_cols: # <<<<<<<<<<<<<< * raise CParserError("Too many columns specified: expected %s and found %s" % * (self.table_width - self.leading_cols, num_cols)) */ __pyx_t_3 = (((__pyx_v_self->table_width - __pyx_v_self->leading_cols) > __pyx_v_num_cols) != 0); if (__pyx_t_3) { /* "pandas/parser.pyx":892 * * if self.table_width - self.leading_cols > num_cols: * raise CParserError("Too many columns specified: expected %s and found %s" % # <<<<<<<<<<<<<< * (self.table_width - self.leading_cols, num_cols)) * */ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s__CParserError); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 892; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); /* "pandas/parser.pyx":893 * if self.table_width - self.leading_cols > num_cols: * raise CParserError("Too many columns specified: expected %s and found %s" % * (self.table_width - self.leading_cols, num_cols)) # <<<<<<<<<<<<<< * * results = {} */ __pyx_t_5 = PyInt_FromLong((__pyx_v_self->table_width - __pyx_v_self->leading_cols)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 893; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_7 = PyInt_FromSsize_t(__pyx_v_num_cols); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 893; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 893; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_7); __Pyx_GIVEREF(__pyx_t_7); __pyx_t_5 = 0; __pyx_t_7 = 0; __pyx_t_7 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_64), ((PyObject *)__pyx_t_6)); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 892; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_7)); __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0; __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 892; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_t_7)); __Pyx_GIVEREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0; __pyx_t_7 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 892; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0; __Pyx_Raise(__pyx_t_7, 0, 0, 0); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 892; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L6; } __pyx_L6:; /* "pandas/parser.pyx":895 * (self.table_width - self.leading_cols, num_cols)) * * results = {} # <<<<<<<<<<<<<< * nused = 0 * for i in range(self.table_width): */ __pyx_t_7 = PyDict_New(); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 895; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_7)); __pyx_v_results = ((PyObject*)__pyx_t_7); __pyx_t_7 = 0; /* "pandas/parser.pyx":896 * * results = {} * nused = 0 # <<<<<<<<<<<<<< * for i in range(self.table_width): * if i < self.leading_cols: */ __pyx_v_nused = 0; /* "pandas/parser.pyx":897 * results = {} * nused = 0 * for i in range(self.table_width): # <<<<<<<<<<<<<< * if i < self.leading_cols: * # Pass through leading columns always */ __pyx_t_1 = __pyx_v_self->table_width; for (__pyx_t_8 = 0; __pyx_t_8 < __pyx_t_1; __pyx_t_8+=1) { __pyx_v_i = __pyx_t_8; /* "pandas/parser.pyx":898 * nused = 0 * for i in range(self.table_width): * if i < self.leading_cols: # <<<<<<<<<<<<<< * # Pass through leading columns always * name = i */ __pyx_t_3 = ((__pyx_v_i < __pyx_v_self->leading_cols) != 0); if (__pyx_t_3) { /* "pandas/parser.pyx":900 * if i < self.leading_cols: * # Pass through leading columns always * name = i # <<<<<<<<<<<<<< * elif self.usecols and nused == len(self.usecols): * # Once we've gathered all requested columns, stop. GH5766 */ __pyx_t_7 = PyInt_FromSsize_t(__pyx_v_i); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 900; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_XDECREF_SET(__pyx_v_name, __pyx_t_7); __pyx_t_7 = 0; goto __pyx_L9; } /* "pandas/parser.pyx":901 * # Pass through leading columns always * name = i * elif self.usecols and nused == len(self.usecols): # <<<<<<<<<<<<<< * # Once we've gathered all requested columns, stop. GH5766 * break */ __pyx_t_3 = __Pyx_PyObject_IsTrue(((PyObject *)__pyx_v_self->usecols)); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 901; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__pyx_t_3) { __pyx_t_7 = ((PyObject *)__pyx_v_self->usecols); __Pyx_INCREF(__pyx_t_7); if (unlikely(__pyx_t_7 == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 901; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_9 = PySet_Size(__pyx_t_7); if (unlikely(__pyx_t_9 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 901; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_2 = (__pyx_v_nused == __pyx_t_9); __pyx_t_10 = __pyx_t_2; } else { __pyx_t_10 = __pyx_t_3; } if (__pyx_t_10) { /* "pandas/parser.pyx":903 * elif self.usecols and nused == len(self.usecols): * # Once we've gathered all requested columns, stop. GH5766 * break # <<<<<<<<<<<<<< * else: * name = self._get_column_name(i, nused) */ goto __pyx_L8_break; goto __pyx_L9; } /*else*/ { /* "pandas/parser.pyx":905 * break * else: * name = self._get_column_name(i, nused) # <<<<<<<<<<<<<< * if self.has_usecols and not (i in self.usecols or * name in self.usecols): */ __pyx_t_7 = ((struct __pyx_vtabstruct_6pandas_6parser_TextReader *)__pyx_v_self->__pyx_vtab)->_get_column_name(__pyx_v_self, __pyx_v_i, __pyx_v_nused); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 905; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_XDECREF_SET(__pyx_v_name, __pyx_t_7); __pyx_t_7 = 0; /* "pandas/parser.pyx":906 * else: * name = self._get_column_name(i, nused) * if self.has_usecols and not (i in self.usecols or # <<<<<<<<<<<<<< * name in self.usecols): * continue */ if ((__pyx_v_self->has_usecols != 0)) { __pyx_t_7 = PyInt_FromSsize_t(__pyx_v_i); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 906; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_t_10 = (__Pyx_PySequence_Contains(__pyx_t_7, ((PyObject *)__pyx_v_self->usecols), Py_EQ)); if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 906; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (!(__pyx_t_10 != 0)) { /* "pandas/parser.pyx":907 * name = self._get_column_name(i, nused) * if self.has_usecols and not (i in self.usecols or * name in self.usecols): # <<<<<<<<<<<<<< * continue * nused += 1 */ __pyx_t_3 = (__Pyx_PySequence_Contains(__pyx_v_name, ((PyObject *)__pyx_v_self->usecols), Py_EQ)); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 907; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_2 = (__pyx_t_3 != 0); } else { __pyx_t_2 = (__pyx_t_10 != 0); } __pyx_t_10 = ((!__pyx_t_2) != 0); __pyx_t_2 = __pyx_t_10; } else { __pyx_t_2 = (__pyx_v_self->has_usecols != 0); } if (__pyx_t_2) { /* "pandas/parser.pyx":908 * if self.has_usecols and not (i in self.usecols or * name in self.usecols): * continue # <<<<<<<<<<<<<< * nused += 1 * */ goto __pyx_L7_continue; goto __pyx_L10; } __pyx_L10:; /* "pandas/parser.pyx":909 * name in self.usecols): * continue * nused += 1 # <<<<<<<<<<<<<< * * conv = self._get_converter(i, name) */ __pyx_v_nused = (__pyx_v_nused + 1); } __pyx_L9:; /* "pandas/parser.pyx":911 * nused += 1 * * conv = self._get_converter(i, name) # <<<<<<<<<<<<<< * * # XXX */ __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s___get_converter); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 911; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_t_6 = PyInt_FromSsize_t(__pyx_v_i); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 911; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 911; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_6); __Pyx_INCREF(__pyx_v_name); PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_name); __Pyx_GIVEREF(__pyx_v_name); __pyx_t_6 = 0; __pyx_t_6 = PyObject_Call(__pyx_t_7, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 911; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __Pyx_XDECREF_SET(__pyx_v_conv, __pyx_t_6); __pyx_t_6 = 0; /* "pandas/parser.pyx":914 * * # XXX * na_flist = set() # <<<<<<<<<<<<<< * if self.na_filter: * na_list, na_flist = self._get_na_list(i, name) */ __pyx_t_6 = PySet_New(0); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 914; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_6)); __Pyx_XDECREF_SET(__pyx_v_na_flist, ((PyObject *)__pyx_t_6)); __pyx_t_6 = 0; /* "pandas/parser.pyx":915 * # XXX * na_flist = set() * if self.na_filter: # <<<<<<<<<<<<<< * na_list, na_flist = self._get_na_list(i, name) * if na_list is None: */ __pyx_t_2 = (__pyx_v_self->na_filter != 0); if (__pyx_t_2) { /* "pandas/parser.pyx":916 * na_flist = set() * if self.na_filter: * na_list, na_flist = self._get_na_list(i, name) # <<<<<<<<<<<<<< * if na_list is None: * na_filter = 0 */ __pyx_t_6 = PyInt_FromSsize_t(__pyx_v_i); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 916; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_4 = ((struct __pyx_vtabstruct_6pandas_6parser_TextReader *)__pyx_v_self->__pyx_vtab)->_get_na_list(__pyx_v_self, __pyx_t_6, __pyx_v_name); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 916; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if ((likely(PyTuple_CheckExact(__pyx_t_4))) || (PyList_CheckExact(__pyx_t_4))) { PyObject* sequence = __pyx_t_4; #if CYTHON_COMPILING_IN_CPYTHON Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 916; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_6 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_7 = PyTuple_GET_ITEM(sequence, 1); } else { __pyx_t_6 = PyList_GET_ITEM(sequence, 0); __pyx_t_7 = PyList_GET_ITEM(sequence, 1); } __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(__pyx_t_7); #else __pyx_t_6 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 916; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 916; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); #endif __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else { Py_ssize_t index = -1; __pyx_t_5 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 916; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_11 = Py_TYPE(__pyx_t_5)->tp_iternext; index = 0; __pyx_t_6 = __pyx_t_11(__pyx_t_5); if (unlikely(!__pyx_t_6)) goto __pyx_L12_unpacking_failed; __Pyx_GOTREF(__pyx_t_6); index = 1; __pyx_t_7 = __pyx_t_11(__pyx_t_5); if (unlikely(!__pyx_t_7)) goto __pyx_L12_unpacking_failed; __Pyx_GOTREF(__pyx_t_7); if (__Pyx_IternextUnpackEndCheck(__pyx_t_11(__pyx_t_5), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 916; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_11 = NULL; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; goto __pyx_L13_unpacking_done; __pyx_L12_unpacking_failed:; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_11 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 916; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_L13_unpacking_done:; } __Pyx_XDECREF_SET(__pyx_v_na_list, __pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF_SET(__pyx_v_na_flist, __pyx_t_7); __pyx_t_7 = 0; /* "pandas/parser.pyx":917 * if self.na_filter: * na_list, na_flist = self._get_na_list(i, name) * if na_list is None: # <<<<<<<<<<<<<< * na_filter = 0 * else: */ __pyx_t_2 = (__pyx_v_na_list == Py_None); __pyx_t_10 = (__pyx_t_2 != 0); if (__pyx_t_10) { /* "pandas/parser.pyx":918 * na_list, na_flist = self._get_na_list(i, name) * if na_list is None: * na_filter = 0 # <<<<<<<<<<<<<< * else: * na_filter = 1 */ __pyx_v_na_filter = 0; goto __pyx_L14; } /*else*/ { /* "pandas/parser.pyx":920 * na_filter = 0 * else: * na_filter = 1 # <<<<<<<<<<<<<< * na_hashset = kset_from_list(na_list) * else: */ __pyx_v_na_filter = 1; /* "pandas/parser.pyx":921 * else: * na_filter = 1 * na_hashset = kset_from_list(na_list) # <<<<<<<<<<<<<< * else: * na_filter = 0 */ if (!(likely(PyList_CheckExact(__pyx_v_na_list))||((__pyx_v_na_list) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected list, got %.200s", Py_TYPE(__pyx_v_na_list)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 921; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_12 = __pyx_f_6pandas_6parser_kset_from_list(((PyObject*)__pyx_v_na_list)); if (unlikely(__pyx_t_12 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 921; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_na_hashset = __pyx_t_12; } __pyx_L14:; goto __pyx_L11; } /*else*/ { /* "pandas/parser.pyx":923 * na_hashset = kset_from_list(na_list) * else: * na_filter = 0 # <<<<<<<<<<<<<< * * if conv: */ __pyx_v_na_filter = 0; } __pyx_L11:; /* "pandas/parser.pyx":925 * na_filter = 0 * * if conv: # <<<<<<<<<<<<<< * results[i] = _apply_converter(conv, self.parser, i, start, end, * self.c_encoding) */ __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_v_conv); if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 925; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__pyx_t_10) { /* "pandas/parser.pyx":927 * if conv: * results[i] = _apply_converter(conv, self.parser, i, start, end, * self.c_encoding) # <<<<<<<<<<<<<< * continue * */ __pyx_t_4 = __pyx_f_6pandas_6parser__apply_converter(__pyx_v_conv, __pyx_v_self->parser, __pyx_v_i, __pyx_v_start, __pyx_v_end, __pyx_v_self->c_encoding); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 926; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); /* "pandas/parser.pyx":926 * * if conv: * results[i] = _apply_converter(conv, self.parser, i, start, end, # <<<<<<<<<<<<<< * self.c_encoding) * continue */ if (__Pyx_SetItemInt(((PyObject *)__pyx_v_results), __pyx_v_i, __pyx_t_4, sizeof(Py_ssize_t), PyInt_FromSsize_t, 0, 1, 1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 926; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "pandas/parser.pyx":928 * results[i] = _apply_converter(conv, self.parser, i, start, end, * self.c_encoding) * continue # <<<<<<<<<<<<<< * * # Should return as the desired dtype (inferred or specified) */ goto __pyx_L7_continue; goto __pyx_L15; } __pyx_L15:; /* "pandas/parser.pyx":932 * # Should return as the desired dtype (inferred or specified) * col_res, na_count = self._convert_tokens(i, start, end, name, * na_filter, na_hashset, na_flist) # <<<<<<<<<<<<<< * * if na_filter: */ __pyx_t_4 = __pyx_f_6pandas_6parser_10TextReader__convert_tokens(__pyx_v_self, __pyx_v_i, __pyx_v_start, __pyx_v_end, __pyx_v_name, __pyx_v_na_filter, __pyx_v_na_hashset, __pyx_v_na_flist); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 931; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); if ((likely(PyTuple_CheckExact(__pyx_t_4))) || (PyList_CheckExact(__pyx_t_4))) { PyObject* sequence = __pyx_t_4; #if CYTHON_COMPILING_IN_CPYTHON Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 931; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_7 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_6 = PyTuple_GET_ITEM(sequence, 1); } else { __pyx_t_7 = PyList_GET_ITEM(sequence, 0); __pyx_t_6 = PyList_GET_ITEM(sequence, 1); } __Pyx_INCREF(__pyx_t_7); __Pyx_INCREF(__pyx_t_6); #else __pyx_t_7 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 931; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 931; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); #endif __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else { Py_ssize_t index = -1; __pyx_t_5 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 931; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_11 = Py_TYPE(__pyx_t_5)->tp_iternext; index = 0; __pyx_t_7 = __pyx_t_11(__pyx_t_5); if (unlikely(!__pyx_t_7)) goto __pyx_L16_unpacking_failed; __Pyx_GOTREF(__pyx_t_7); index = 1; __pyx_t_6 = __pyx_t_11(__pyx_t_5); if (unlikely(!__pyx_t_6)) goto __pyx_L16_unpacking_failed; __Pyx_GOTREF(__pyx_t_6); if (__Pyx_IternextUnpackEndCheck(__pyx_t_11(__pyx_t_5), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 931; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_11 = NULL; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; goto __pyx_L17_unpacking_done; __pyx_L16_unpacking_failed:; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_11 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 931; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_L17_unpacking_done:; } /* "pandas/parser.pyx":931 * * # Should return as the desired dtype (inferred or specified) * col_res, na_count = self._convert_tokens(i, start, end, name, # <<<<<<<<<<<<<< * na_filter, na_hashset, na_flist) * */ __Pyx_XDECREF_SET(__pyx_v_col_res, __pyx_t_7); __pyx_t_7 = 0; __Pyx_XDECREF_SET(__pyx_v_na_count, __pyx_t_6); __pyx_t_6 = 0; /* "pandas/parser.pyx":934 * na_filter, na_hashset, na_flist) * * if na_filter: # <<<<<<<<<<<<<< * self._free_na_set(na_hashset) * */ __pyx_t_10 = (__pyx_v_na_filter != 0); if (__pyx_t_10) { /* "pandas/parser.pyx":935 * * if na_filter: * self._free_na_set(na_hashset) # <<<<<<<<<<<<<< * * if upcast_na and na_count > 0: */ __pyx_t_4 = ((struct __pyx_vtabstruct_6pandas_6parser_TextReader *)__pyx_v_self->__pyx_vtab)->_free_na_set(__pyx_v_self, __pyx_v_na_hashset); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 935; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; goto __pyx_L18; } __pyx_L18:; /* "pandas/parser.pyx":937 * self._free_na_set(na_hashset) * * if upcast_na and na_count > 0: # <<<<<<<<<<<<<< * col_res = _maybe_upcast(col_res) * */ __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_v_upcast_na); if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 937; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__pyx_t_10) { __pyx_t_4 = PyObject_RichCompare(__pyx_v_na_count, __pyx_int_0, Py_GT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 937; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 937; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_3 = __pyx_t_2; } else { __pyx_t_3 = __pyx_t_10; } if (__pyx_t_3) { /* "pandas/parser.pyx":938 * * if upcast_na and na_count > 0: * col_res = _maybe_upcast(col_res) # <<<<<<<<<<<<<< * * if issubclass(col_res.dtype.type, np.integer) and self.compact_ints: */ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s___maybe_upcast); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 938; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 938; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(__pyx_v_col_res); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_col_res); __Pyx_GIVEREF(__pyx_v_col_res); __pyx_t_7 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 938; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0; __Pyx_DECREF_SET(__pyx_v_col_res, __pyx_t_7); __pyx_t_7 = 0; goto __pyx_L19; } __pyx_L19:; /* "pandas/parser.pyx":940 * col_res = _maybe_upcast(col_res) * * if issubclass(col_res.dtype.type, np.integer) and self.compact_ints: # <<<<<<<<<<<<<< * col_res = downcast_int64(col_res, self.use_unsigned) * */ __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_col_res, __pyx_n_s__dtype); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 940; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s__type); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 940; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 940; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s__integer); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 940; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_3 = PyObject_IsSubclass(__pyx_t_6, __pyx_t_4); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 940; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_3) { __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_v_self->compact_ints); if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 940; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_2 = __pyx_t_10; } else { __pyx_t_2 = __pyx_t_3; } if (__pyx_t_2) { /* "pandas/parser.pyx":941 * * if issubclass(col_res.dtype.type, np.integer) and self.compact_ints: * col_res = downcast_int64(col_res, self.use_unsigned) # <<<<<<<<<<<<<< * * if col_res is None: */ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s__downcast_int64); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 941; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 941; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(__pyx_v_col_res); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_col_res); __Pyx_GIVEREF(__pyx_v_col_res); __Pyx_INCREF(__pyx_v_self->use_unsigned); PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_v_self->use_unsigned); __Pyx_GIVEREF(__pyx_v_self->use_unsigned); __pyx_t_7 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 941; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0; __Pyx_DECREF_SET(__pyx_v_col_res, __pyx_t_7); __pyx_t_7 = 0; goto __pyx_L20; } __pyx_L20:; /* "pandas/parser.pyx":943 * col_res = downcast_int64(col_res, self.use_unsigned) * * if col_res is None: # <<<<<<<<<<<<<< * raise Exception('Unable to parse column %d' % i) * */ __pyx_t_2 = (__pyx_v_col_res == Py_None); __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { /* "pandas/parser.pyx":944 * * if col_res is None: * raise Exception('Unable to parse column %d' % i) # <<<<<<<<<<<<<< * * results[i] = col_res */ __pyx_t_7 = PyInt_FromSsize_t(__pyx_v_i); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 944; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_t_6 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_65), __pyx_t_7); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 944; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_6)); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 944; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_7, 0, ((PyObject *)__pyx_t_6)); __Pyx_GIVEREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0; __pyx_t_6 = PyObject_Call(__pyx_builtin_Exception, ((PyObject *)__pyx_t_7), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 944; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0; __Pyx_Raise(__pyx_t_6, 0, 0, 0); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 944; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L21; } __pyx_L21:; /* "pandas/parser.pyx":946 * raise Exception('Unable to parse column %d' % i) * * results[i] = col_res # <<<<<<<<<<<<<< * * self.parser_start += end - start */ if (__Pyx_SetItemInt(((PyObject *)__pyx_v_results), __pyx_v_i, __pyx_v_col_res, sizeof(Py_ssize_t), PyInt_FromSsize_t, 0, 1, 1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 946; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_L7_continue:; } __pyx_L8_break:; /* "pandas/parser.pyx":948 * results[i] = col_res * * self.parser_start += end - start # <<<<<<<<<<<<<< * * return results */ __pyx_v_self->parser_start = (__pyx_v_self->parser_start + (__pyx_v_end - __pyx_v_start)); /* "pandas/parser.pyx":950 * self.parser_start += end - start * * return results # <<<<<<<<<<<<<< * * cdef inline _convert_tokens(self, Py_ssize_t i, int start, int end, */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_results)); __pyx_r = ((PyObject *)__pyx_v_results); goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_AddTraceback("pandas.parser.TextReader._convert_column_data", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_name); __Pyx_XDECREF(__pyx_v_na_flist); __Pyx_XDECREF(__pyx_v_results); __Pyx_XDECREF(__pyx_v_conv); __Pyx_XDECREF(__pyx_v_na_list); __Pyx_XDECREF(__pyx_v_col_res); __Pyx_XDECREF(__pyx_v_na_count); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/parser.pyx":952 * return results * * cdef inline _convert_tokens(self, Py_ssize_t i, int start, int end, # <<<<<<<<<<<<<< * object name, bint na_filter, * kh_str_t *na_hashset, */ static CYTHON_INLINE PyObject *__pyx_f_6pandas_6parser_10TextReader__convert_tokens(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self, Py_ssize_t __pyx_v_i, int __pyx_v_start, int __pyx_v_end, PyObject *__pyx_v_name, int __pyx_v_na_filter, kh_str_t *__pyx_v_na_hashset, PyObject *__pyx_v_na_flist) { PyObject *__pyx_v_col_dtype = 0; PyObject *__pyx_v_col_res = NULL; PyObject *__pyx_v_dt = NULL; PyObject *__pyx_v_na_count = 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; Py_ssize_t __pyx_t_6; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; PyObject *__pyx_t_11 = NULL; PyObject *(*__pyx_t_12)(PyObject *); int __pyx_t_13; PyObject *__pyx_t_14 = NULL; PyObject *__pyx_t_15 = NULL; PyObject *__pyx_t_16 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_convert_tokens", 0); /* "pandas/parser.pyx":957 * object na_flist): * cdef: * object col_dtype = None # <<<<<<<<<<<<<< * * if self.dtype is not None: */ __Pyx_INCREF(Py_None); __pyx_v_col_dtype = Py_None; /* "pandas/parser.pyx":959 * object col_dtype = None * * if self.dtype is not None: # <<<<<<<<<<<<<< * if isinstance(self.dtype, dict): * if name in self.dtype: */ __pyx_t_1 = (__pyx_v_self->dtype != Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { /* "pandas/parser.pyx":960 * * if self.dtype is not None: * if isinstance(self.dtype, dict): # <<<<<<<<<<<<<< * if name in self.dtype: * col_dtype = self.dtype[name] */ __pyx_t_3 = __pyx_v_self->dtype; __Pyx_INCREF(__pyx_t_3); __pyx_t_2 = PyDict_Check(__pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_1 = (__pyx_t_2 != 0); if (__pyx_t_1) { /* "pandas/parser.pyx":961 * if self.dtype is not None: * if isinstance(self.dtype, dict): * if name in self.dtype: # <<<<<<<<<<<<<< * col_dtype = self.dtype[name] * elif i in self.dtype: */ __pyx_t_1 = (__Pyx_PySequence_Contains(__pyx_v_name, __pyx_v_self->dtype, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 961; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { /* "pandas/parser.pyx":962 * if isinstance(self.dtype, dict): * if name in self.dtype: * col_dtype = self.dtype[name] # <<<<<<<<<<<<<< * elif i in self.dtype: * col_dtype = self.dtype[i] */ __pyx_t_3 = PyObject_GetItem(__pyx_v_self->dtype, __pyx_v_name); if (!__pyx_t_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 962; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF_SET(__pyx_v_col_dtype, __pyx_t_3); __pyx_t_3 = 0; goto __pyx_L5; } /* "pandas/parser.pyx":963 * if name in self.dtype: * col_dtype = self.dtype[name] * elif i in self.dtype: # <<<<<<<<<<<<<< * col_dtype = self.dtype[i] * else: */ __pyx_t_3 = PyInt_FromSsize_t(__pyx_v_i); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 963; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = (__Pyx_PySequence_Contains(__pyx_t_3, __pyx_v_self->dtype, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 963; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_1 = (__pyx_t_2 != 0); if (__pyx_t_1) { /* "pandas/parser.pyx":964 * col_dtype = self.dtype[name] * elif i in self.dtype: * col_dtype = self.dtype[i] # <<<<<<<<<<<<<< * else: * if self.dtype.names: */ __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_self->dtype, __pyx_v_i, sizeof(Py_ssize_t), PyInt_FromSsize_t, 0, 1, 1); if (!__pyx_t_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 964; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF_SET(__pyx_v_col_dtype, __pyx_t_3); __pyx_t_3 = 0; goto __pyx_L5; } __pyx_L5:; goto __pyx_L4; } /*else*/ { /* "pandas/parser.pyx":966 * col_dtype = self.dtype[i] * else: * if self.dtype.names: # <<<<<<<<<<<<<< * col_dtype = self.dtype.descr[i][1] * else: */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->dtype, __pyx_n_s__names); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 966; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 966; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_1) { /* "pandas/parser.pyx":967 * else: * if self.dtype.names: * col_dtype = self.dtype.descr[i][1] # <<<<<<<<<<<<<< * else: * col_dtype = self.dtype */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->dtype, __pyx_n_s__descr); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 967; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_3, __pyx_v_i, sizeof(Py_ssize_t), PyInt_FromSsize_t, 0, 1, 1); if (!__pyx_t_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 967; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_4, 1, sizeof(long), PyInt_FromLong, 0, 0, 1); if (!__pyx_t_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 967; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF_SET(__pyx_v_col_dtype, __pyx_t_3); __pyx_t_3 = 0; goto __pyx_L6; } /*else*/ { /* "pandas/parser.pyx":969 * col_dtype = self.dtype.descr[i][1] * else: * col_dtype = self.dtype # <<<<<<<<<<<<<< * * if col_dtype is not None: */ __pyx_t_3 = __pyx_v_self->dtype; __Pyx_INCREF(__pyx_t_3); __Pyx_DECREF_SET(__pyx_v_col_dtype, __pyx_t_3); __pyx_t_3 = 0; } __pyx_L6:; } __pyx_L4:; /* "pandas/parser.pyx":971 * col_dtype = self.dtype * * if col_dtype is not None: # <<<<<<<<<<<<<< * if not isinstance(col_dtype, basestring): * if isinstance(col_dtype, np.dtype): */ __pyx_t_1 = (__pyx_v_col_dtype != Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { /* "pandas/parser.pyx":972 * * if col_dtype is not None: * if not isinstance(col_dtype, basestring): # <<<<<<<<<<<<<< * if isinstance(col_dtype, np.dtype): * col_dtype = col_dtype.str */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s__basestring); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 972; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = PyObject_IsInstance(__pyx_v_col_dtype, __pyx_t_3); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 972; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_1 = ((!(__pyx_t_2 != 0)) != 0); if (__pyx_t_1) { /* "pandas/parser.pyx":973 * if col_dtype is not None: * if not isinstance(col_dtype, basestring): * if isinstance(col_dtype, np.dtype): # <<<<<<<<<<<<<< * col_dtype = col_dtype.str * else: */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 973; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s__dtype); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 973; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_1 = PyObject_IsInstance(__pyx_v_col_dtype, __pyx_t_4); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 973; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { /* "pandas/parser.pyx":974 * if not isinstance(col_dtype, basestring): * if isinstance(col_dtype, np.dtype): * col_dtype = col_dtype.str # <<<<<<<<<<<<<< * else: * col_dtype = np.dtype(col_dtype).str */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_col_dtype, __pyx_n_s__str); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 974; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF_SET(__pyx_v_col_dtype, __pyx_t_4); __pyx_t_4 = 0; goto __pyx_L9; } /*else*/ { /* "pandas/parser.pyx":976 * col_dtype = col_dtype.str * else: * col_dtype = np.dtype(col_dtype).str # <<<<<<<<<<<<<< * * return self._convert_with_dtype(col_dtype, i, start, end, */ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 976; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s__dtype); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 976; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 976; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_v_col_dtype); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_col_dtype); __Pyx_GIVEREF(__pyx_v_col_dtype); __pyx_t_5 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 976; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s__str); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 976; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF_SET(__pyx_v_col_dtype, __pyx_t_4); __pyx_t_4 = 0; } __pyx_L9:; goto __pyx_L8; } __pyx_L8:; /* "pandas/parser.pyx":978 * col_dtype = np.dtype(col_dtype).str * * return self._convert_with_dtype(col_dtype, i, start, end, # <<<<<<<<<<<<<< * na_filter, 1, na_hashset, na_flist) * */ __Pyx_XDECREF(__pyx_r); /* "pandas/parser.pyx":979 * * return self._convert_with_dtype(col_dtype, i, start, end, * na_filter, 1, na_hashset, na_flist) # <<<<<<<<<<<<<< * * if i in self.noconvert: */ __pyx_t_4 = ((struct __pyx_vtabstruct_6pandas_6parser_TextReader *)__pyx_v_self->__pyx_vtab)->_convert_with_dtype(__pyx_v_self, __pyx_v_col_dtype, __pyx_v_i, __pyx_v_start, __pyx_v_end, __pyx_v_na_filter, 1, __pyx_v_na_hashset, __pyx_v_na_flist); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 978; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; goto __pyx_L7; } __pyx_L7:; goto __pyx_L3; } __pyx_L3:; /* "pandas/parser.pyx":981 * na_filter, 1, na_hashset, na_flist) * * if i in self.noconvert: # <<<<<<<<<<<<<< * return self._string_convert(i, start, end, na_filter, na_hashset) * else: */ __pyx_t_4 = PyInt_FromSsize_t(__pyx_v_i); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 981; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_2 = (__Pyx_PySequence_Contains(__pyx_t_4, ((PyObject *)__pyx_v_self->noconvert), Py_EQ)); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 981; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_1 = (__pyx_t_2 != 0); if (__pyx_t_1) { /* "pandas/parser.pyx":982 * * if i in self.noconvert: * return self._string_convert(i, start, end, na_filter, na_hashset) # <<<<<<<<<<<<<< * else: * col_res = None */ __Pyx_XDECREF(__pyx_r); __pyx_t_4 = ((struct __pyx_vtabstruct_6pandas_6parser_TextReader *)__pyx_v_self->__pyx_vtab)->_string_convert(__pyx_v_self, __pyx_v_i, __pyx_v_start, __pyx_v_end, __pyx_v_na_filter, __pyx_v_na_hashset); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 982; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; goto __pyx_L10; } /*else*/ { /* "pandas/parser.pyx":984 * return self._string_convert(i, start, end, na_filter, na_hashset) * else: * col_res = None # <<<<<<<<<<<<<< * for dt in dtype_cast_order: * try: */ __Pyx_INCREF(Py_None); __pyx_v_col_res = Py_None; /* "pandas/parser.pyx":985 * else: * col_res = None * for dt in dtype_cast_order: # <<<<<<<<<<<<<< * try: * col_res, na_count = self._convert_with_dtype( */ if (unlikely(((PyObject *)__pyx_v_6pandas_6parser_dtype_cast_order) == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 985; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_4 = ((PyObject *)__pyx_v_6pandas_6parser_dtype_cast_order); __Pyx_INCREF(__pyx_t_4); __pyx_t_6 = 0; for (;;) { if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_4)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_5 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_6); __Pyx_INCREF(__pyx_t_5); __pyx_t_6++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 985; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_5 = PySequence_ITEM(__pyx_t_4, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 985; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif __Pyx_XDECREF_SET(__pyx_v_dt, __pyx_t_5); __pyx_t_5 = 0; /* "pandas/parser.pyx":986 * col_res = None * for dt in dtype_cast_order: * try: # <<<<<<<<<<<<<< * col_res, na_count = self._convert_with_dtype( * dt, i, start, end, na_filter, 0, na_hashset, na_flist) */ { __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9); __Pyx_XGOTREF(__pyx_t_7); __Pyx_XGOTREF(__pyx_t_8); __Pyx_XGOTREF(__pyx_t_9); /*try:*/ { /* "pandas/parser.pyx":988 * try: * col_res, na_count = self._convert_with_dtype( * dt, i, start, end, na_filter, 0, na_hashset, na_flist) # <<<<<<<<<<<<<< * except OverflowError: * col_res, na_count = self._convert_with_dtype( */ __pyx_t_5 = ((struct __pyx_vtabstruct_6pandas_6parser_TextReader *)__pyx_v_self->__pyx_vtab)->_convert_with_dtype(__pyx_v_self, __pyx_v_dt, __pyx_v_i, __pyx_v_start, __pyx_v_end, __pyx_v_na_filter, 0, __pyx_v_na_hashset, __pyx_v_na_flist); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 987; __pyx_clineno = __LINE__; goto __pyx_L13_error;} __Pyx_GOTREF(__pyx_t_5); if ((likely(PyTuple_CheckExact(__pyx_t_5))) || (PyList_CheckExact(__pyx_t_5))) { PyObject* sequence = __pyx_t_5; #if CYTHON_COMPILING_IN_CPYTHON Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 987; __pyx_clineno = __LINE__; goto __pyx_L13_error;} } #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_10 = PyTuple_GET_ITEM(sequence, 1); } else { __pyx_t_3 = PyList_GET_ITEM(sequence, 0); __pyx_t_10 = PyList_GET_ITEM(sequence, 1); } __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(__pyx_t_10); #else __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 987; __pyx_clineno = __LINE__; goto __pyx_L13_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_10 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 987; __pyx_clineno = __LINE__; goto __pyx_L13_error;} __Pyx_GOTREF(__pyx_t_10); #endif __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } else { Py_ssize_t index = -1; __pyx_t_11 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 987; __pyx_clineno = __LINE__; goto __pyx_L13_error;} __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_12 = Py_TYPE(__pyx_t_11)->tp_iternext; index = 0; __pyx_t_3 = __pyx_t_12(__pyx_t_11); if (unlikely(!__pyx_t_3)) goto __pyx_L21_unpacking_failed; __Pyx_GOTREF(__pyx_t_3); index = 1; __pyx_t_10 = __pyx_t_12(__pyx_t_11); if (unlikely(!__pyx_t_10)) goto __pyx_L21_unpacking_failed; __Pyx_GOTREF(__pyx_t_10); if (__Pyx_IternextUnpackEndCheck(__pyx_t_12(__pyx_t_11), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 987; __pyx_clineno = __LINE__; goto __pyx_L13_error;} __pyx_t_12 = NULL; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; goto __pyx_L22_unpacking_done; __pyx_L21_unpacking_failed:; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __pyx_t_12 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 987; __pyx_clineno = __LINE__; goto __pyx_L13_error;} __pyx_L22_unpacking_done:; } /* "pandas/parser.pyx":987 * for dt in dtype_cast_order: * try: * col_res, na_count = self._convert_with_dtype( # <<<<<<<<<<<<<< * dt, i, start, end, na_filter, 0, na_hashset, na_flist) * except OverflowError: */ __Pyx_DECREF_SET(__pyx_v_col_res, __pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF_SET(__pyx_v_na_count, __pyx_t_10); __pyx_t_10 = 0; } __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; goto __pyx_L20_try_end; __pyx_L13_error:; __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; /* "pandas/parser.pyx":989 * col_res, na_count = self._convert_with_dtype( * dt, i, start, end, na_filter, 0, na_hashset, na_flist) * except OverflowError: # <<<<<<<<<<<<<< * col_res, na_count = self._convert_with_dtype( * '|O8', i, start, end, na_filter, 0, na_hashset, na_flist) */ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s__OverflowError); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 989; __pyx_clineno = __LINE__; goto __pyx_L15_except_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_13 = PyErr_ExceptionMatches(__pyx_t_5); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_13) { __Pyx_AddTraceback("pandas.parser.TextReader._convert_tokens", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_10, &__pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 989; __pyx_clineno = __LINE__; goto __pyx_L15_except_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_GOTREF(__pyx_t_10); __Pyx_GOTREF(__pyx_t_3); /* "pandas/parser.pyx":991 * except OverflowError: * col_res, na_count = self._convert_with_dtype( * '|O8', i, start, end, na_filter, 0, na_hashset, na_flist) # <<<<<<<<<<<<<< * * if col_res is not None: */ __pyx_t_11 = ((struct __pyx_vtabstruct_6pandas_6parser_TextReader *)__pyx_v_self->__pyx_vtab)->_convert_with_dtype(__pyx_v_self, ((PyObject *)__pyx_kp_s_66), __pyx_v_i, __pyx_v_start, __pyx_v_end, __pyx_v_na_filter, 0, __pyx_v_na_hashset, __pyx_v_na_flist); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 990; __pyx_clineno = __LINE__; goto __pyx_L15_except_error;} __Pyx_GOTREF(__pyx_t_11); if ((likely(PyTuple_CheckExact(__pyx_t_11))) || (PyList_CheckExact(__pyx_t_11))) { PyObject* sequence = __pyx_t_11; #if CYTHON_COMPILING_IN_CPYTHON Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 990; __pyx_clineno = __LINE__; goto __pyx_L15_except_error;} } #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_14 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_15 = PyTuple_GET_ITEM(sequence, 1); } else { __pyx_t_14 = PyList_GET_ITEM(sequence, 0); __pyx_t_15 = PyList_GET_ITEM(sequence, 1); } __Pyx_INCREF(__pyx_t_14); __Pyx_INCREF(__pyx_t_15); #else __pyx_t_14 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 990; __pyx_clineno = __LINE__; goto __pyx_L15_except_error;} __Pyx_GOTREF(__pyx_t_14); __pyx_t_15 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 990; __pyx_clineno = __LINE__; goto __pyx_L15_except_error;} __Pyx_GOTREF(__pyx_t_15); #endif __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; } else { Py_ssize_t index = -1; __pyx_t_16 = PyObject_GetIter(__pyx_t_11); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 990; __pyx_clineno = __LINE__; goto __pyx_L15_except_error;} __Pyx_GOTREF(__pyx_t_16); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __pyx_t_12 = Py_TYPE(__pyx_t_16)->tp_iternext; index = 0; __pyx_t_14 = __pyx_t_12(__pyx_t_16); if (unlikely(!__pyx_t_14)) goto __pyx_L25_unpacking_failed; __Pyx_GOTREF(__pyx_t_14); index = 1; __pyx_t_15 = __pyx_t_12(__pyx_t_16); if (unlikely(!__pyx_t_15)) goto __pyx_L25_unpacking_failed; __Pyx_GOTREF(__pyx_t_15); if (__Pyx_IternextUnpackEndCheck(__pyx_t_12(__pyx_t_16), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 990; __pyx_clineno = __LINE__; goto __pyx_L15_except_error;} __pyx_t_12 = NULL; __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; goto __pyx_L26_unpacking_done; __pyx_L25_unpacking_failed:; __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; __pyx_t_12 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 990; __pyx_clineno = __LINE__; goto __pyx_L15_except_error;} __pyx_L26_unpacking_done:; } /* "pandas/parser.pyx":990 * dt, i, start, end, na_filter, 0, na_hashset, na_flist) * except OverflowError: * col_res, na_count = self._convert_with_dtype( # <<<<<<<<<<<<<< * '|O8', i, start, end, na_filter, 0, na_hashset, na_flist) * */ __Pyx_DECREF_SET(__pyx_v_col_res, __pyx_t_14); __pyx_t_14 = 0; __Pyx_XDECREF_SET(__pyx_v_na_count, __pyx_t_15); __pyx_t_15 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L14_exception_handled; } __pyx_L15_except_error:; __Pyx_XGIVEREF(__pyx_t_7); __Pyx_XGIVEREF(__pyx_t_8); __Pyx_XGIVEREF(__pyx_t_9); __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9); goto __pyx_L1_error; __pyx_L14_exception_handled:; __Pyx_XGIVEREF(__pyx_t_7); __Pyx_XGIVEREF(__pyx_t_8); __Pyx_XGIVEREF(__pyx_t_9); __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9); __pyx_L20_try_end:; } /* "pandas/parser.pyx":993 * '|O8', i, start, end, na_filter, 0, na_hashset, na_flist) * * if col_res is not None: # <<<<<<<<<<<<<< * break * */ __pyx_t_1 = (__pyx_v_col_res != Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { /* "pandas/parser.pyx":994 * * if col_res is not None: * break # <<<<<<<<<<<<<< * * return col_res, na_count */ goto __pyx_L12_break; goto __pyx_L27; } __pyx_L27:; } __pyx_L12_break:; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } __pyx_L10:; /* "pandas/parser.pyx":996 * break * * return col_res, na_count # <<<<<<<<<<<<<< * * cdef _convert_with_dtype(self, object dtype, Py_ssize_t i, */ __Pyx_XDECREF(__pyx_r); if (unlikely(!__pyx_v_na_count)) { __Pyx_RaiseUnboundLocalError("na_count"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 996; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 996; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_v_col_res); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_col_res); __Pyx_GIVEREF(__pyx_v_col_res); __Pyx_INCREF(__pyx_v_na_count); PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_na_count); __Pyx_GIVEREF(__pyx_v_na_count); __pyx_r = ((PyObject *)__pyx_t_4); __pyx_t_4 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_10); __Pyx_XDECREF(__pyx_t_11); __Pyx_XDECREF(__pyx_t_14); __Pyx_XDECREF(__pyx_t_15); __Pyx_XDECREF(__pyx_t_16); __Pyx_AddTraceback("pandas.parser.TextReader._convert_tokens", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_col_dtype); __Pyx_XDECREF(__pyx_v_col_res); __Pyx_XDECREF(__pyx_v_dt); __Pyx_XDECREF(__pyx_v_na_count); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/parser.pyx":998 * return col_res, na_count * * cdef _convert_with_dtype(self, object dtype, Py_ssize_t i, # <<<<<<<<<<<<<< * int start, int end, * bint na_filter, */ static PyObject *__pyx_f_6pandas_6parser_10TextReader__convert_with_dtype(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self, PyObject *__pyx_v_dtype, Py_ssize_t __pyx_v_i, int __pyx_v_start, int __pyx_v_end, int __pyx_v_na_filter, int __pyx_v_user_dtype, kh_str_t *__pyx_v_na_hashset, PyObject *__pyx_v_na_flist) { kh_str_t *__pyx_v_true_set; kh_str_t *__pyx_v_false_set; PyObject *__pyx_v_result = NULL; PyObject *__pyx_v_na_count = NULL; PyObject *__pyx_v_width = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_t_3; int __pyx_t_4; int __pyx_t_5; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *(*__pyx_t_8)(PyObject *); kh_str_t *__pyx_t_9; size_t __pyx_t_10; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_convert_with_dtype", 0); /* "pandas/parser.pyx":1006 * cdef kh_str_t *true_set, *false_set * * if dtype[1] == 'i' or dtype[1] == 'u': # <<<<<<<<<<<<<< * result, na_count = _try_int64(self.parser, i, start, end, * na_filter, na_hashset) */ __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_dtype, 1, sizeof(long), PyInt_FromLong, 0, 0, 1); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1006; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyObject_RichCompare(__pyx_t_1, ((PyObject *)__pyx_n_s__i), Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1006; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1006; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (!__pyx_t_3) { __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_dtype, 1, sizeof(long), PyInt_FromLong, 0, 0, 1); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1006; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = PyObject_RichCompare(__pyx_t_2, ((PyObject *)__pyx_n_s__u), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1006; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1006; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_5 = __pyx_t_4; } else { __pyx_t_5 = __pyx_t_3; } if (__pyx_t_5) { /* "pandas/parser.pyx":1008 * if dtype[1] == 'i' or dtype[1] == 'u': * result, na_count = _try_int64(self.parser, i, start, end, * na_filter, na_hashset) # <<<<<<<<<<<<<< * if user_dtype and na_count > 0: * raise Exception('Integer column has NA values') */ __pyx_t_1 = __pyx_f_6pandas_6parser__try_int64(__pyx_v_self->parser, __pyx_v_i, __pyx_v_start, __pyx_v_end, __pyx_v_na_filter, __pyx_v_na_hashset); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1007; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) { PyObject* sequence = __pyx_t_1; #if CYTHON_COMPILING_IN_CPYTHON Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1007; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_6 = PyTuple_GET_ITEM(sequence, 1); } else { __pyx_t_2 = PyList_GET_ITEM(sequence, 0); __pyx_t_6 = PyList_GET_ITEM(sequence, 1); } __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(__pyx_t_6); #else __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1007; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1007; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } else { Py_ssize_t index = -1; __pyx_t_7 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1007; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_8 = Py_TYPE(__pyx_t_7)->tp_iternext; index = 0; __pyx_t_2 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_2)) goto __pyx_L4_unpacking_failed; __Pyx_GOTREF(__pyx_t_2); index = 1; __pyx_t_6 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_6)) goto __pyx_L4_unpacking_failed; __Pyx_GOTREF(__pyx_t_6); if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_7), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1007; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_8 = NULL; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; goto __pyx_L5_unpacking_done; __pyx_L4_unpacking_failed:; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_8 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1007; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_L5_unpacking_done:; } /* "pandas/parser.pyx":1007 * * if dtype[1] == 'i' or dtype[1] == 'u': * result, na_count = _try_int64(self.parser, i, start, end, # <<<<<<<<<<<<<< * na_filter, na_hashset) * if user_dtype and na_count > 0: */ __pyx_v_result = __pyx_t_2; __pyx_t_2 = 0; __pyx_v_na_count = __pyx_t_6; __pyx_t_6 = 0; /* "pandas/parser.pyx":1009 * result, na_count = _try_int64(self.parser, i, start, end, * na_filter, na_hashset) * if user_dtype and na_count > 0: # <<<<<<<<<<<<<< * raise Exception('Integer column has NA values') * */ __pyx_t_5 = __pyx_v_user_dtype; if (__pyx_t_5) { __pyx_t_1 = PyObject_RichCompare(__pyx_v_na_count, __pyx_int_0, Py_GT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1009; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1009; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_4 = __pyx_t_3; } else { __pyx_t_4 = __pyx_t_5; } if (__pyx_t_4) { /* "pandas/parser.pyx":1010 * na_filter, na_hashset) * if user_dtype and na_count > 0: * raise Exception('Integer column has NA values') # <<<<<<<<<<<<<< * * if dtype[1:] != 'i8': */ __pyx_t_1 = PyObject_Call(__pyx_builtin_Exception, ((PyObject *)__pyx_k_tuple_68), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1010; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 1010; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L6; } __pyx_L6:; /* "pandas/parser.pyx":1012 * raise Exception('Integer column has NA values') * * if dtype[1:] != 'i8': # <<<<<<<<<<<<<< * result = result.astype(dtype) * */ __pyx_t_1 = __Pyx_PyObject_GetSlice(__pyx_v_dtype, 1, 0, NULL, NULL, &__pyx_k_slice_69, 1, 0, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1012; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_6 = PyObject_RichCompare(__pyx_t_1, ((PyObject *)__pyx_n_s__i8), Py_NE); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1012; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1012; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (__pyx_t_4) { /* "pandas/parser.pyx":1013 * * if dtype[1:] != 'i8': * result = result.astype(dtype) # <<<<<<<<<<<<<< * * return result, na_count */ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_result, __pyx_n_s__astype); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1013; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1013; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_dtype); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_dtype); __Pyx_GIVEREF(__pyx_v_dtype); __pyx_t_2 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1013; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __Pyx_DECREF_SET(__pyx_v_result, __pyx_t_2); __pyx_t_2 = 0; goto __pyx_L7; } __pyx_L7:; /* "pandas/parser.pyx":1015 * result = result.astype(dtype) * * return result, na_count # <<<<<<<<<<<<<< * * elif dtype[1] == 'f': */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1015; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_result); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_result); __Pyx_GIVEREF(__pyx_v_result); __Pyx_INCREF(__pyx_v_na_count); PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_na_count); __Pyx_GIVEREF(__pyx_v_na_count); __pyx_r = ((PyObject *)__pyx_t_2); __pyx_t_2 = 0; goto __pyx_L0; goto __pyx_L3; } /* "pandas/parser.pyx":1017 * return result, na_count * * elif dtype[1] == 'f': # <<<<<<<<<<<<<< * result, na_count = _try_double(self.parser, i, start, end, * na_filter, na_hashset, na_flist) */ __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_dtype, 1, sizeof(long), PyInt_FromLong, 0, 0, 1); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1017; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = PyObject_RichCompare(__pyx_t_2, ((PyObject *)__pyx_n_s__f), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1017; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1017; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_4) { /* "pandas/parser.pyx":1019 * elif dtype[1] == 'f': * result, na_count = _try_double(self.parser, i, start, end, * na_filter, na_hashset, na_flist) # <<<<<<<<<<<<<< * * if dtype[1:] != 'f8': */ __pyx_t_1 = __pyx_f_6pandas_6parser__try_double(__pyx_v_self->parser, __pyx_v_i, __pyx_v_start, __pyx_v_end, __pyx_v_na_filter, __pyx_v_na_hashset, __pyx_v_na_flist); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1018; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) { PyObject* sequence = __pyx_t_1; #if CYTHON_COMPILING_IN_CPYTHON Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1018; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_6 = PyTuple_GET_ITEM(sequence, 1); } else { __pyx_t_2 = PyList_GET_ITEM(sequence, 0); __pyx_t_6 = PyList_GET_ITEM(sequence, 1); } __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(__pyx_t_6); #else __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1018; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1018; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } else { Py_ssize_t index = -1; __pyx_t_7 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1018; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_8 = Py_TYPE(__pyx_t_7)->tp_iternext; index = 0; __pyx_t_2 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_2)) goto __pyx_L8_unpacking_failed; __Pyx_GOTREF(__pyx_t_2); index = 1; __pyx_t_6 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_6)) goto __pyx_L8_unpacking_failed; __Pyx_GOTREF(__pyx_t_6); if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_7), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1018; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_8 = NULL; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; goto __pyx_L9_unpacking_done; __pyx_L8_unpacking_failed:; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_8 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1018; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_L9_unpacking_done:; } /* "pandas/parser.pyx":1018 * * elif dtype[1] == 'f': * result, na_count = _try_double(self.parser, i, start, end, # <<<<<<<<<<<<<< * na_filter, na_hashset, na_flist) * */ __pyx_v_result = __pyx_t_2; __pyx_t_2 = 0; __pyx_v_na_count = __pyx_t_6; __pyx_t_6 = 0; /* "pandas/parser.pyx":1021 * na_filter, na_hashset, na_flist) * * if dtype[1:] != 'f8': # <<<<<<<<<<<<<< * result = result.astype(dtype) * return result, na_count */ __pyx_t_1 = __Pyx_PyObject_GetSlice(__pyx_v_dtype, 1, 0, NULL, NULL, &__pyx_k_slice_70, 1, 0, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1021; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_6 = PyObject_RichCompare(__pyx_t_1, ((PyObject *)__pyx_n_s__f8), Py_NE); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1021; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1021; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (__pyx_t_4) { /* "pandas/parser.pyx":1022 * * if dtype[1:] != 'f8': * result = result.astype(dtype) # <<<<<<<<<<<<<< * return result, na_count * */ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_result, __pyx_n_s__astype); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1022; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1022; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_dtype); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_dtype); __Pyx_GIVEREF(__pyx_v_dtype); __pyx_t_2 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1022; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __Pyx_DECREF_SET(__pyx_v_result, __pyx_t_2); __pyx_t_2 = 0; goto __pyx_L10; } __pyx_L10:; /* "pandas/parser.pyx":1023 * if dtype[1:] != 'f8': * result = result.astype(dtype) * return result, na_count # <<<<<<<<<<<<<< * * elif dtype[1] == 'b': */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1023; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_result); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_result); __Pyx_GIVEREF(__pyx_v_result); __Pyx_INCREF(__pyx_v_na_count); PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_na_count); __Pyx_GIVEREF(__pyx_v_na_count); __pyx_r = ((PyObject *)__pyx_t_2); __pyx_t_2 = 0; goto __pyx_L0; goto __pyx_L3; } /* "pandas/parser.pyx":1025 * return result, na_count * * elif dtype[1] == 'b': # <<<<<<<<<<<<<< * if self.true_values is not None or self.false_values is not None: * */ __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_dtype, 1, sizeof(long), PyInt_FromLong, 0, 0, 1); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1025; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = PyObject_RichCompare(__pyx_t_2, ((PyObject *)__pyx_n_s__b), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1025; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1025; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_4) { /* "pandas/parser.pyx":1026 * * elif dtype[1] == 'b': * if self.true_values is not None or self.false_values is not None: # <<<<<<<<<<<<<< * * true_set = kset_from_list(self.true_values + _true_values) */ __pyx_t_4 = (__pyx_v_self->true_values != Py_None); if (!(__pyx_t_4 != 0)) { __pyx_t_5 = (__pyx_v_self->false_values != Py_None); __pyx_t_3 = (__pyx_t_5 != 0); } else { __pyx_t_3 = (__pyx_t_4 != 0); } if (__pyx_t_3) { /* "pandas/parser.pyx":1028 * if self.true_values is not None or self.false_values is not None: * * true_set = kset_from_list(self.true_values + _true_values) # <<<<<<<<<<<<<< * false_set = kset_from_list(self.false_values + _false_values) * result, na_count = _try_bool_flex(self.parser, i, start, end, */ __pyx_t_1 = PyNumber_Add(__pyx_v_self->true_values, __pyx_v_6pandas_6parser__true_values); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1028; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (!(likely(PyList_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected list, got %.200s", Py_TYPE(__pyx_t_1)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1028; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_9 = __pyx_f_6pandas_6parser_kset_from_list(((PyObject*)__pyx_t_1)); if (unlikely(__pyx_t_9 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1028; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_true_set = __pyx_t_9; /* "pandas/parser.pyx":1029 * * true_set = kset_from_list(self.true_values + _true_values) * false_set = kset_from_list(self.false_values + _false_values) # <<<<<<<<<<<<<< * result, na_count = _try_bool_flex(self.parser, i, start, end, * na_filter, na_hashset, */ __pyx_t_1 = PyNumber_Add(__pyx_v_self->false_values, __pyx_v_6pandas_6parser__false_values); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1029; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (!(likely(PyList_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected list, got %.200s", Py_TYPE(__pyx_t_1)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1029; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_9 = __pyx_f_6pandas_6parser_kset_from_list(((PyObject*)__pyx_t_1)); if (unlikely(__pyx_t_9 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1029; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_false_set = __pyx_t_9; /* "pandas/parser.pyx":1032 * result, na_count = _try_bool_flex(self.parser, i, start, end, * na_filter, na_hashset, * true_set, false_set) # <<<<<<<<<<<<<< * kh_destroy_str(true_set) * kh_destroy_str(false_set) */ __pyx_t_1 = __pyx_f_6pandas_6parser__try_bool_flex(__pyx_v_self->parser, __pyx_v_i, __pyx_v_start, __pyx_v_end, __pyx_v_na_filter, __pyx_v_na_hashset, __pyx_v_true_set, __pyx_v_false_set); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1030; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) { PyObject* sequence = __pyx_t_1; #if CYTHON_COMPILING_IN_CPYTHON Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1030; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_6 = PyTuple_GET_ITEM(sequence, 1); } else { __pyx_t_2 = PyList_GET_ITEM(sequence, 0); __pyx_t_6 = PyList_GET_ITEM(sequence, 1); } __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(__pyx_t_6); #else __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1030; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1030; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } else { Py_ssize_t index = -1; __pyx_t_7 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1030; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_8 = Py_TYPE(__pyx_t_7)->tp_iternext; index = 0; __pyx_t_2 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_2)) goto __pyx_L12_unpacking_failed; __Pyx_GOTREF(__pyx_t_2); index = 1; __pyx_t_6 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_6)) goto __pyx_L12_unpacking_failed; __Pyx_GOTREF(__pyx_t_6); if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_7), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1030; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_8 = NULL; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; goto __pyx_L13_unpacking_done; __pyx_L12_unpacking_failed:; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_8 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1030; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_L13_unpacking_done:; } /* "pandas/parser.pyx":1030 * true_set = kset_from_list(self.true_values + _true_values) * false_set = kset_from_list(self.false_values + _false_values) * result, na_count = _try_bool_flex(self.parser, i, start, end, # <<<<<<<<<<<<<< * na_filter, na_hashset, * true_set, false_set) */ __pyx_v_result = __pyx_t_2; __pyx_t_2 = 0; __pyx_v_na_count = __pyx_t_6; __pyx_t_6 = 0; /* "pandas/parser.pyx":1033 * na_filter, na_hashset, * true_set, false_set) * kh_destroy_str(true_set) # <<<<<<<<<<<<<< * kh_destroy_str(false_set) * else: */ kh_destroy_str(__pyx_v_true_set); /* "pandas/parser.pyx":1034 * true_set, false_set) * kh_destroy_str(true_set) * kh_destroy_str(false_set) # <<<<<<<<<<<<<< * else: * result, na_count = _try_bool(self.parser, i, start, end, */ kh_destroy_str(__pyx_v_false_set); goto __pyx_L11; } /*else*/ { /* "pandas/parser.pyx":1037 * else: * result, na_count = _try_bool(self.parser, i, start, end, * na_filter, na_hashset) # <<<<<<<<<<<<<< * return result, na_count * elif dtype[1] == 'c': */ __pyx_t_1 = __pyx_f_6pandas_6parser__try_bool(__pyx_v_self->parser, __pyx_v_i, __pyx_v_start, __pyx_v_end, __pyx_v_na_filter, __pyx_v_na_hashset); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1036; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) { PyObject* sequence = __pyx_t_1; #if CYTHON_COMPILING_IN_CPYTHON Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1036; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_6 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_2 = PyTuple_GET_ITEM(sequence, 1); } else { __pyx_t_6 = PyList_GET_ITEM(sequence, 0); __pyx_t_2 = PyList_GET_ITEM(sequence, 1); } __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(__pyx_t_2); #else __pyx_t_6 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1036; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_2 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1036; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } else { Py_ssize_t index = -1; __pyx_t_7 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1036; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_8 = Py_TYPE(__pyx_t_7)->tp_iternext; index = 0; __pyx_t_6 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_6)) goto __pyx_L14_unpacking_failed; __Pyx_GOTREF(__pyx_t_6); index = 1; __pyx_t_2 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_2)) goto __pyx_L14_unpacking_failed; __Pyx_GOTREF(__pyx_t_2); if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_7), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1036; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_8 = NULL; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; goto __pyx_L15_unpacking_done; __pyx_L14_unpacking_failed:; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_8 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1036; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_L15_unpacking_done:; } /* "pandas/parser.pyx":1036 * kh_destroy_str(false_set) * else: * result, na_count = _try_bool(self.parser, i, start, end, # <<<<<<<<<<<<<< * na_filter, na_hashset) * return result, na_count */ __pyx_v_result = __pyx_t_6; __pyx_t_6 = 0; __pyx_v_na_count = __pyx_t_2; __pyx_t_2 = 0; } __pyx_L11:; /* "pandas/parser.pyx":1038 * result, na_count = _try_bool(self.parser, i, start, end, * na_filter, na_hashset) * return result, na_count # <<<<<<<<<<<<<< * elif dtype[1] == 'c': * raise NotImplementedError("the dtype %s is not supported for parsing" % dtype) */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1038; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_result); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_result); __Pyx_GIVEREF(__pyx_v_result); __Pyx_INCREF(__pyx_v_na_count); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_na_count); __Pyx_GIVEREF(__pyx_v_na_count); __pyx_r = ((PyObject *)__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; goto __pyx_L3; } /* "pandas/parser.pyx":1039 * na_filter, na_hashset) * return result, na_count * elif dtype[1] == 'c': # <<<<<<<<<<<<<< * raise NotImplementedError("the dtype %s is not supported for parsing" % dtype) * */ __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_dtype, 1, sizeof(long), PyInt_FromLong, 0, 0, 1); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1039; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyObject_RichCompare(__pyx_t_1, ((PyObject *)__pyx_n_s__c), Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1039; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1039; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_3) { /* "pandas/parser.pyx":1040 * return result, na_count * elif dtype[1] == 'c': * raise NotImplementedError("the dtype %s is not supported for parsing" % dtype) # <<<<<<<<<<<<<< * * elif dtype[1] == 'S': */ __pyx_t_2 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_71), __pyx_v_dtype); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1040; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_2)); __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1040; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_t_2)); __Pyx_GIVEREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __pyx_t_2 = PyObject_Call(__pyx_builtin_NotImplementedError, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1040; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1040; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L3; } /* "pandas/parser.pyx":1042 * raise NotImplementedError("the dtype %s is not supported for parsing" % dtype) * * elif dtype[1] == 'S': # <<<<<<<<<<<<<< * # TODO: na handling * width = int(dtype[2:]) */ __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_dtype, 1, sizeof(long), PyInt_FromLong, 0, 0, 1); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1042; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = PyObject_RichCompare(__pyx_t_2, ((PyObject *)__pyx_n_s__S), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1042; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1042; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_3) { /* "pandas/parser.pyx":1044 * elif dtype[1] == 'S': * # TODO: na handling * width = int(dtype[2:]) # <<<<<<<<<<<<<< * if width > 0: * result = _to_fw_string(self.parser, i, start, end, width) */ __pyx_t_1 = __Pyx_PyObject_GetSlice(__pyx_v_dtype, 2, 0, NULL, NULL, &__pyx_k_slice_72, 1, 0, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1044; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1044; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)(&PyInt_Type))), ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1044; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __pyx_v_width = __pyx_t_1; __pyx_t_1 = 0; /* "pandas/parser.pyx":1045 * # TODO: na handling * width = int(dtype[2:]) * if width > 0: # <<<<<<<<<<<<<< * result = _to_fw_string(self.parser, i, start, end, width) * return result, 0 */ __pyx_t_1 = PyObject_RichCompare(__pyx_v_width, __pyx_int_0, Py_GT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1045; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1045; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_3) { /* "pandas/parser.pyx":1046 * width = int(dtype[2:]) * if width > 0: * result = _to_fw_string(self.parser, i, start, end, width) # <<<<<<<<<<<<<< * return result, 0 * */ __pyx_t_10 = __Pyx_PyInt_AsSize_t(__pyx_v_width); if (unlikely((__pyx_t_10 == (size_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1046; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_1 = __pyx_f_6pandas_6parser__to_fw_string(__pyx_v_self->parser, __pyx_v_i, __pyx_v_start, __pyx_v_end, __pyx_t_10); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1046; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_v_result = __pyx_t_1; __pyx_t_1 = 0; /* "pandas/parser.pyx":1047 * if width > 0: * result = _to_fw_string(self.parser, i, start, end, width) * return result, 0 # <<<<<<<<<<<<<< * * # treat as a regular string parsing */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1047; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_result); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_result); __Pyx_GIVEREF(__pyx_v_result); __Pyx_INCREF(__pyx_int_0); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_0); __Pyx_GIVEREF(__pyx_int_0); __pyx_r = ((PyObject *)__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; goto __pyx_L16; } __pyx_L16:; /* "pandas/parser.pyx":1050 * * # treat as a regular string parsing * return self._string_convert(i, start, end, na_filter, # <<<<<<<<<<<<<< * na_hashset) * elif dtype[1] == 'U': */ __Pyx_XDECREF(__pyx_r); /* "pandas/parser.pyx":1051 * # treat as a regular string parsing * return self._string_convert(i, start, end, na_filter, * na_hashset) # <<<<<<<<<<<<<< * elif dtype[1] == 'U': * width = int(dtype[2:]) */ __pyx_t_1 = ((struct __pyx_vtabstruct_6pandas_6parser_TextReader *)__pyx_v_self->__pyx_vtab)->_string_convert(__pyx_v_self, __pyx_v_i, __pyx_v_start, __pyx_v_end, __pyx_v_na_filter, __pyx_v_na_hashset); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1050; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; goto __pyx_L3; } /* "pandas/parser.pyx":1052 * return self._string_convert(i, start, end, na_filter, * na_hashset) * elif dtype[1] == 'U': # <<<<<<<<<<<<<< * width = int(dtype[2:]) * if width > 0: */ __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_dtype, 1, sizeof(long), PyInt_FromLong, 0, 0, 1); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1052; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyObject_RichCompare(__pyx_t_1, ((PyObject *)__pyx_n_s__U), Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1052; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1052; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_3) { /* "pandas/parser.pyx":1053 * na_hashset) * elif dtype[1] == 'U': * width = int(dtype[2:]) # <<<<<<<<<<<<<< * if width > 0: * raise NotImplementedError("the dtype %s is not supported for parsing" % dtype) */ __pyx_t_2 = __Pyx_PyObject_GetSlice(__pyx_v_dtype, 2, 0, NULL, NULL, &__pyx_k_slice_73, 1, 0, 1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1053; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1053; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)(&PyInt_Type))), ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1053; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_v_width = __pyx_t_2; __pyx_t_2 = 0; /* "pandas/parser.pyx":1054 * elif dtype[1] == 'U': * width = int(dtype[2:]) * if width > 0: # <<<<<<<<<<<<<< * raise NotImplementedError("the dtype %s is not supported for parsing" % dtype) * */ __pyx_t_2 = PyObject_RichCompare(__pyx_v_width, __pyx_int_0, Py_GT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1054; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1054; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_3) { /* "pandas/parser.pyx":1055 * width = int(dtype[2:]) * if width > 0: * raise NotImplementedError("the dtype %s is not supported for parsing" % dtype) # <<<<<<<<<<<<<< * * # unicode variable width */ __pyx_t_2 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_71), __pyx_v_dtype); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1055; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_2)); __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1055; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_t_2)); __Pyx_GIVEREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __pyx_t_2 = PyObject_Call(__pyx_builtin_NotImplementedError, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1055; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1055; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L17; } __pyx_L17:; /* "pandas/parser.pyx":1058 * * # unicode variable width * return self._string_convert(i, start, end, na_filter, # <<<<<<<<<<<<<< * na_hashset) * */ __Pyx_XDECREF(__pyx_r); /* "pandas/parser.pyx":1059 * # unicode variable width * return self._string_convert(i, start, end, na_filter, * na_hashset) # <<<<<<<<<<<<<< * * */ __pyx_t_2 = ((struct __pyx_vtabstruct_6pandas_6parser_TextReader *)__pyx_v_self->__pyx_vtab)->_string_convert(__pyx_v_self, __pyx_v_i, __pyx_v_start, __pyx_v_end, __pyx_v_na_filter, __pyx_v_na_hashset); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1058; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; goto __pyx_L3; } /* "pandas/parser.pyx":1062 * * * elif dtype[1] == 'O': # <<<<<<<<<<<<<< * return self._string_convert(i, start, end, na_filter, * na_hashset) */ __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_dtype, 1, sizeof(long), PyInt_FromLong, 0, 0, 1); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1062; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = PyObject_RichCompare(__pyx_t_2, ((PyObject *)__pyx_n_s__O), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1062; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1062; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_3) { /* "pandas/parser.pyx":1063 * * elif dtype[1] == 'O': * return self._string_convert(i, start, end, na_filter, # <<<<<<<<<<<<<< * na_hashset) * else: */ __Pyx_XDECREF(__pyx_r); /* "pandas/parser.pyx":1064 * elif dtype[1] == 'O': * return self._string_convert(i, start, end, na_filter, * na_hashset) # <<<<<<<<<<<<<< * else: * if dtype[1] == 'M': */ __pyx_t_1 = ((struct __pyx_vtabstruct_6pandas_6parser_TextReader *)__pyx_v_self->__pyx_vtab)->_string_convert(__pyx_v_self, __pyx_v_i, __pyx_v_start, __pyx_v_end, __pyx_v_na_filter, __pyx_v_na_hashset); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1063; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; goto __pyx_L3; } /*else*/ { /* "pandas/parser.pyx":1066 * na_hashset) * else: * if dtype[1] == 'M': # <<<<<<<<<<<<<< * raise TypeError("the dtype %s is not supported for parsing, " * "pass this column using parse_dates instead" % dtype) */ __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_dtype, 1, sizeof(long), PyInt_FromLong, 0, 0, 1); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1066; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyObject_RichCompare(__pyx_t_1, ((PyObject *)__pyx_n_s__M), Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1066; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1066; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_3) { /* "pandas/parser.pyx":1068 * if dtype[1] == 'M': * raise TypeError("the dtype %s is not supported for parsing, " * "pass this column using parse_dates instead" % dtype) # <<<<<<<<<<<<<< * raise TypeError("the dtype %s is not supported for parsing" % dtype) * */ __pyx_t_2 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_74), __pyx_v_dtype); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1068; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_2)); __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1067; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_t_2)); __Pyx_GIVEREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __pyx_t_2 = PyObject_Call(__pyx_builtin_TypeError, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1067; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1067; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L18; } __pyx_L18:; /* "pandas/parser.pyx":1069 * raise TypeError("the dtype %s is not supported for parsing, " * "pass this column using parse_dates instead" % dtype) * raise TypeError("the dtype %s is not supported for parsing" % dtype) # <<<<<<<<<<<<<< * * cdef _string_convert(self, Py_ssize_t i, int start, int end, */ __pyx_t_2 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_71), __pyx_v_dtype); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1069; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_2)); __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1069; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_t_2)); __Pyx_GIVEREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __pyx_t_2 = PyObject_Call(__pyx_builtin_TypeError, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1069; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1069; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_L3:; __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_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_AddTraceback("pandas.parser.TextReader._convert_with_dtype", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_result); __Pyx_XDECREF(__pyx_v_na_count); __Pyx_XDECREF(__pyx_v_width); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/parser.pyx":1071 * raise TypeError("the dtype %s is not supported for parsing" % dtype) * * cdef _string_convert(self, Py_ssize_t i, int start, int end, # <<<<<<<<<<<<<< * bint na_filter, kh_str_t *na_hashset): * if PY3: */ static PyObject *__pyx_f_6pandas_6parser_10TextReader__string_convert(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self, Py_ssize_t __pyx_v_i, int __pyx_v_start, int __pyx_v_end, int __pyx_v_na_filter, kh_str_t *__pyx_v_na_hashset) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_string_convert", 0); /* "pandas/parser.pyx":1073 * cdef _string_convert(self, Py_ssize_t i, int start, int end, * bint na_filter, kh_str_t *na_hashset): * if PY3: # <<<<<<<<<<<<<< * if self.c_encoding != NULL: * if self.c_encoding == b"utf-8": */ __pyx_t_1 = (__pyx_v_6pandas_6parser_PY3 != 0); if (__pyx_t_1) { /* "pandas/parser.pyx":1074 * bint na_filter, kh_str_t *na_hashset): * if PY3: * if self.c_encoding != NULL: # <<<<<<<<<<<<<< * if self.c_encoding == b"utf-8": * return _string_box_utf8(self.parser, i, start, end, */ __pyx_t_1 = ((__pyx_v_self->c_encoding != NULL) != 0); if (__pyx_t_1) { /* "pandas/parser.pyx":1075 * if PY3: * if self.c_encoding != NULL: * if self.c_encoding == b"utf-8": # <<<<<<<<<<<<<< * return _string_box_utf8(self.parser, i, start, end, * na_filter, na_hashset) */ __pyx_t_2 = __Pyx_PyBytes_FromString(__pyx_v_self->c_encoding); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1075; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_2)); __pyx_t_3 = PyObject_RichCompare(((PyObject *)__pyx_t_2), ((PyObject *)__pyx_kp_b_32), Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1075; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1075; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_1) { /* "pandas/parser.pyx":1076 * if self.c_encoding != NULL: * if self.c_encoding == b"utf-8": * return _string_box_utf8(self.parser, i, start, end, # <<<<<<<<<<<<<< * na_filter, na_hashset) * else: */ __Pyx_XDECREF(__pyx_r); /* "pandas/parser.pyx":1077 * if self.c_encoding == b"utf-8": * return _string_box_utf8(self.parser, i, start, end, * na_filter, na_hashset) # <<<<<<<<<<<<<< * else: * return _string_box_decode(self.parser, i, start, end, */ __pyx_t_3 = __pyx_f_6pandas_6parser__string_box_utf8(__pyx_v_self->parser, __pyx_v_i, __pyx_v_start, __pyx_v_end, __pyx_v_na_filter, __pyx_v_na_hashset); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1076; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; goto __pyx_L5; } /*else*/ { /* "pandas/parser.pyx":1079 * na_filter, na_hashset) * else: * return _string_box_decode(self.parser, i, start, end, # <<<<<<<<<<<<<< * na_filter, na_hashset, * self.c_encoding) */ __Pyx_XDECREF(__pyx_r); /* "pandas/parser.pyx":1081 * return _string_box_decode(self.parser, i, start, end, * na_filter, na_hashset, * self.c_encoding) # <<<<<<<<<<<<<< * else: * return _string_box_utf8(self.parser, i, start, end, */ __pyx_t_3 = __pyx_f_6pandas_6parser__string_box_decode(__pyx_v_self->parser, __pyx_v_i, __pyx_v_start, __pyx_v_end, __pyx_v_na_filter, __pyx_v_na_hashset, __pyx_v_self->c_encoding); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1079; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; } __pyx_L5:; goto __pyx_L4; } /*else*/ { /* "pandas/parser.pyx":1083 * self.c_encoding) * else: * return _string_box_utf8(self.parser, i, start, end, # <<<<<<<<<<<<<< * na_filter, na_hashset) * else: */ __Pyx_XDECREF(__pyx_r); /* "pandas/parser.pyx":1084 * else: * return _string_box_utf8(self.parser, i, start, end, * na_filter, na_hashset) # <<<<<<<<<<<<<< * else: * if self.c_encoding != NULL: */ __pyx_t_3 = __pyx_f_6pandas_6parser__string_box_utf8(__pyx_v_self->parser, __pyx_v_i, __pyx_v_start, __pyx_v_end, __pyx_v_na_filter, __pyx_v_na_hashset); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1083; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; } __pyx_L4:; goto __pyx_L3; } /*else*/ { /* "pandas/parser.pyx":1086 * na_filter, na_hashset) * else: * if self.c_encoding != NULL: # <<<<<<<<<<<<<< * if self.c_encoding == b"utf-8": * return _string_box_utf8(self.parser, i, start, end, */ __pyx_t_1 = ((__pyx_v_self->c_encoding != NULL) != 0); if (__pyx_t_1) { /* "pandas/parser.pyx":1087 * else: * if self.c_encoding != NULL: * if self.c_encoding == b"utf-8": # <<<<<<<<<<<<<< * return _string_box_utf8(self.parser, i, start, end, * na_filter, na_hashset) */ __pyx_t_3 = __Pyx_PyBytes_FromString(__pyx_v_self->c_encoding); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1087; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_3)); __pyx_t_2 = PyObject_RichCompare(((PyObject *)__pyx_t_3), ((PyObject *)__pyx_kp_b_32), Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1087; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1087; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_1) { /* "pandas/parser.pyx":1088 * if self.c_encoding != NULL: * if self.c_encoding == b"utf-8": * return _string_box_utf8(self.parser, i, start, end, # <<<<<<<<<<<<<< * na_filter, na_hashset) * else: */ __Pyx_XDECREF(__pyx_r); /* "pandas/parser.pyx":1089 * if self.c_encoding == b"utf-8": * return _string_box_utf8(self.parser, i, start, end, * na_filter, na_hashset) # <<<<<<<<<<<<<< * else: * return _string_box_decode(self.parser, i, start, end, */ __pyx_t_2 = __pyx_f_6pandas_6parser__string_box_utf8(__pyx_v_self->parser, __pyx_v_i, __pyx_v_start, __pyx_v_end, __pyx_v_na_filter, __pyx_v_na_hashset); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1088; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; goto __pyx_L7; } /*else*/ { /* "pandas/parser.pyx":1091 * na_filter, na_hashset) * else: * return _string_box_decode(self.parser, i, start, end, # <<<<<<<<<<<<<< * na_filter, na_hashset, * self.c_encoding) */ __Pyx_XDECREF(__pyx_r); /* "pandas/parser.pyx":1093 * return _string_box_decode(self.parser, i, start, end, * na_filter, na_hashset, * self.c_encoding) # <<<<<<<<<<<<<< * else: * return _string_box_factorize(self.parser, i, start, end, */ __pyx_t_2 = __pyx_f_6pandas_6parser__string_box_decode(__pyx_v_self->parser, __pyx_v_i, __pyx_v_start, __pyx_v_end, __pyx_v_na_filter, __pyx_v_na_hashset, __pyx_v_self->c_encoding); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1091; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; } __pyx_L7:; goto __pyx_L6; } /*else*/ { /* "pandas/parser.pyx":1095 * self.c_encoding) * else: * return _string_box_factorize(self.parser, i, start, end, # <<<<<<<<<<<<<< * na_filter, na_hashset) * */ __Pyx_XDECREF(__pyx_r); /* "pandas/parser.pyx":1096 * else: * return _string_box_factorize(self.parser, i, start, end, * na_filter, na_hashset) # <<<<<<<<<<<<<< * * def _get_converter(self, i, name): */ __pyx_t_2 = __pyx_f_6pandas_6parser__string_box_factorize(__pyx_v_self->parser, __pyx_v_i, __pyx_v_start, __pyx_v_end, __pyx_v_na_filter, __pyx_v_na_hashset); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1095; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; } __pyx_L6:; } __pyx_L3:; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("pandas.parser.TextReader._string_convert", __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_6parser_10TextReader_19_get_converter(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_6pandas_6parser_10TextReader_19_get_converter(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_i = 0; PyObject *__pyx_v_name = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_get_converter (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__i,&__pyx_n_s__name,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__i)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__name)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("_get_converter", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1098; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_get_converter") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1098; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } __pyx_v_i = values[0]; __pyx_v_name = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("_get_converter", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1098; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.parser.TextReader._get_converter", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pandas_6parser_10TextReader_18_get_converter(((struct __pyx_obj_6pandas_6parser_TextReader *)__pyx_v_self), __pyx_v_i, __pyx_v_name); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/parser.pyx":1098 * na_filter, na_hashset) * * def _get_converter(self, i, name): # <<<<<<<<<<<<<< * if self.converters is None: * return None */ static PyObject *__pyx_pf_6pandas_6parser_10TextReader_18_get_converter(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self, PyObject *__pyx_v_i, PyObject *__pyx_v_name) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_get_converter", 0); /* "pandas/parser.pyx":1099 * * def _get_converter(self, i, name): * if self.converters is None: # <<<<<<<<<<<<<< * return None * */ __pyx_t_1 = (__pyx_v_self->converters == Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { /* "pandas/parser.pyx":1100 * def _get_converter(self, i, name): * if self.converters is None: * return None # <<<<<<<<<<<<<< * * if name is not None and name in self.converters: */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(Py_None); __pyx_r = Py_None; goto __pyx_L0; goto __pyx_L3; } __pyx_L3:; /* "pandas/parser.pyx":1102 * return None * * if name is not None and name in self.converters: # <<<<<<<<<<<<<< * return self.converters[name] * */ __pyx_t_2 = (__pyx_v_name != Py_None); if ((__pyx_t_2 != 0)) { __pyx_t_1 = (__Pyx_PySequence_Contains(__pyx_v_name, __pyx_v_self->converters, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1102; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_3 = (__pyx_t_1 != 0); } else { __pyx_t_3 = (__pyx_t_2 != 0); } if (__pyx_t_3) { /* "pandas/parser.pyx":1103 * * if name is not None and name in self.converters: * return self.converters[name] # <<<<<<<<<<<<<< * * # Converter for position, if any */ __Pyx_XDECREF(__pyx_r); __pyx_t_4 = PyObject_GetItem(__pyx_v_self->converters, __pyx_v_name); if (!__pyx_t_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1103; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; goto __pyx_L4; } __pyx_L4:; /* "pandas/parser.pyx":1106 * * # Converter for position, if any * return self.converters.get(i) # <<<<<<<<<<<<<< * * cdef _get_na_list(self, i, name): */ __Pyx_XDECREF(__pyx_r); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->converters, __pyx_n_s__get); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1106; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1106; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_v_i); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_i); __Pyx_GIVEREF(__pyx_v_i); __pyx_t_6 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1106; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; __pyx_r = __pyx_t_6; __pyx_t_6 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("pandas.parser.TextReader._get_converter", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/parser.pyx":1108 * return self.converters.get(i) * * cdef _get_na_list(self, i, name): # <<<<<<<<<<<<<< * if self.na_values is None: * return None, set() */ static PyObject *__pyx_f_6pandas_6parser_10TextReader__get_na_list(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self, PyObject *__pyx_v_i, PyObject *__pyx_v_name) { PyObject *__pyx_v_values = NULL; PyObject *__pyx_v_fvalues = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; int __pyx_t_5; PyObject *__pyx_t_6 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_get_na_list", 0); /* "pandas/parser.pyx":1109 * * cdef _get_na_list(self, i, name): * if self.na_values is None: # <<<<<<<<<<<<<< * return None, set() * */ __pyx_t_1 = (__pyx_v_self->na_values == Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { /* "pandas/parser.pyx":1110 * cdef _get_na_list(self, i, name): * if self.na_values is None: * return None, set() # <<<<<<<<<<<<<< * * if isinstance(self.na_values, dict): */ __Pyx_XDECREF(__pyx_r); __pyx_t_3 = PySet_New(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1110; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_3)); __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1110; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(Py_None); PyTuple_SET_ITEM(__pyx_t_4, 0, Py_None); __Pyx_GIVEREF(Py_None); PyTuple_SET_ITEM(__pyx_t_4, 1, ((PyObject *)__pyx_t_3)); __Pyx_GIVEREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; __pyx_r = ((PyObject *)__pyx_t_4); __pyx_t_4 = 0; goto __pyx_L0; goto __pyx_L3; } __pyx_L3:; /* "pandas/parser.pyx":1112 * return None, set() * * if isinstance(self.na_values, dict): # <<<<<<<<<<<<<< * values = None * if name is not None and name in self.na_values: */ __pyx_t_4 = __pyx_v_self->na_values; __Pyx_INCREF(__pyx_t_4); __pyx_t_2 = PyDict_Check(__pyx_t_4); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_1 = (__pyx_t_2 != 0); if (__pyx_t_1) { /* "pandas/parser.pyx":1113 * * if isinstance(self.na_values, dict): * values = None # <<<<<<<<<<<<<< * if name is not None and name in self.na_values: * values = self.na_values[name] */ __Pyx_INCREF(Py_None); __pyx_v_values = Py_None; /* "pandas/parser.pyx":1114 * if isinstance(self.na_values, dict): * values = None * if name is not None and name in self.na_values: # <<<<<<<<<<<<<< * values = self.na_values[name] * if values is not None and not isinstance(values, list): */ __pyx_t_1 = (__pyx_v_name != Py_None); if ((__pyx_t_1 != 0)) { __pyx_t_2 = (__Pyx_PySequence_Contains(__pyx_v_name, __pyx_v_self->na_values, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1114; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_5 = (__pyx_t_2 != 0); } else { __pyx_t_5 = (__pyx_t_1 != 0); } if (__pyx_t_5) { /* "pandas/parser.pyx":1115 * values = None * if name is not None and name in self.na_values: * values = self.na_values[name] # <<<<<<<<<<<<<< * if values is not None and not isinstance(values, list): * values = list(values) */ __pyx_t_4 = PyObject_GetItem(__pyx_v_self->na_values, __pyx_v_name); if (!__pyx_t_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1115; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF_SET(__pyx_v_values, __pyx_t_4); __pyx_t_4 = 0; /* "pandas/parser.pyx":1116 * if name is not None and name in self.na_values: * values = self.na_values[name] * if values is not None and not isinstance(values, list): # <<<<<<<<<<<<<< * values = list(values) * fvalues = self.na_fvalues[name] */ __pyx_t_5 = (__pyx_v_values != Py_None); if ((__pyx_t_5 != 0)) { __pyx_t_1 = PyList_Check(__pyx_v_values); __pyx_t_2 = ((!(__pyx_t_1 != 0)) != 0); __pyx_t_1 = __pyx_t_2; } else { __pyx_t_1 = (__pyx_t_5 != 0); } if (__pyx_t_1) { /* "pandas/parser.pyx":1117 * values = self.na_values[name] * if values is not None and not isinstance(values, list): * values = list(values) # <<<<<<<<<<<<<< * fvalues = self.na_fvalues[name] * if fvalues is not None and not isinstance(fvalues, set): */ __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1117; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_v_values); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_values); __Pyx_GIVEREF(__pyx_v_values); __pyx_t_3 = PyObject_Call(((PyObject *)((PyObject*)(&PyList_Type))), ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1117; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __Pyx_DECREF_SET(__pyx_v_values, __pyx_t_3); __pyx_t_3 = 0; goto __pyx_L6; } __pyx_L6:; /* "pandas/parser.pyx":1118 * if values is not None and not isinstance(values, list): * values = list(values) * fvalues = self.na_fvalues[name] # <<<<<<<<<<<<<< * if fvalues is not None and not isinstance(fvalues, set): * fvalues = set(fvalues) */ __pyx_t_3 = PyObject_GetItem(__pyx_v_self->na_fvalues, __pyx_v_name); if (!__pyx_t_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1118; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_v_fvalues = __pyx_t_3; __pyx_t_3 = 0; /* "pandas/parser.pyx":1119 * values = list(values) * fvalues = self.na_fvalues[name] * if fvalues is not None and not isinstance(fvalues, set): # <<<<<<<<<<<<<< * fvalues = set(fvalues) * else: */ __pyx_t_1 = (__pyx_v_fvalues != Py_None); if ((__pyx_t_1 != 0)) { __pyx_t_5 = PySet_Check(__pyx_v_fvalues); __pyx_t_2 = ((!(__pyx_t_5 != 0)) != 0); __pyx_t_5 = __pyx_t_2; } else { __pyx_t_5 = (__pyx_t_1 != 0); } if (__pyx_t_5) { /* "pandas/parser.pyx":1120 * fvalues = self.na_fvalues[name] * if fvalues is not None and not isinstance(fvalues, set): * fvalues = set(fvalues) # <<<<<<<<<<<<<< * else: * if i in self.na_values: */ __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1120; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_v_fvalues); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_fvalues); __Pyx_GIVEREF(__pyx_v_fvalues); __pyx_t_4 = PyObject_Call(((PyObject *)((PyObject*)(&PySet_Type))), ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1120; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; __Pyx_DECREF_SET(__pyx_v_fvalues, __pyx_t_4); __pyx_t_4 = 0; goto __pyx_L7; } __pyx_L7:; goto __pyx_L5; } /*else*/ { /* "pandas/parser.pyx":1122 * fvalues = set(fvalues) * else: * if i in self.na_values: # <<<<<<<<<<<<<< * return self.na_values[i], self.na_fvalues[i] * else: */ __pyx_t_5 = (__Pyx_PySequence_Contains(__pyx_v_i, __pyx_v_self->na_values, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1122; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_1 = (__pyx_t_5 != 0); if (__pyx_t_1) { /* "pandas/parser.pyx":1123 * else: * if i in self.na_values: * return self.na_values[i], self.na_fvalues[i] # <<<<<<<<<<<<<< * else: * return _NA_VALUES, set() */ __Pyx_XDECREF(__pyx_r); __pyx_t_4 = PyObject_GetItem(__pyx_v_self->na_values, __pyx_v_i); if (!__pyx_t_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1123; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = PyObject_GetItem(__pyx_v_self->na_fvalues, __pyx_v_i); if (!__pyx_t_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1123; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1123; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_4 = 0; __pyx_t_3 = 0; __pyx_r = ((PyObject *)__pyx_t_6); __pyx_t_6 = 0; goto __pyx_L0; goto __pyx_L8; } /*else*/ { /* "pandas/parser.pyx":1125 * return self.na_values[i], self.na_fvalues[i] * else: * return _NA_VALUES, set() # <<<<<<<<<<<<<< * * return _ensure_encoded(values), fvalues */ __Pyx_XDECREF(__pyx_r); __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s___NA_VALUES); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1125; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_3 = PySet_New(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1125; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_3)); __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1125; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_4, 1, ((PyObject *)__pyx_t_3)); __Pyx_GIVEREF(((PyObject *)__pyx_t_3)); __pyx_t_6 = 0; __pyx_t_3 = 0; __pyx_r = ((PyObject *)__pyx_t_4); __pyx_t_4 = 0; goto __pyx_L0; } __pyx_L8:; } __pyx_L5:; /* "pandas/parser.pyx":1127 * return _NA_VALUES, set() * * return _ensure_encoded(values), fvalues # <<<<<<<<<<<<<< * else: * if not isinstance(self.na_values, list): */ __Pyx_XDECREF(__pyx_r); __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s___ensure_encoded); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1127; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1127; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_v_values); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_values); __Pyx_GIVEREF(__pyx_v_values); __pyx_t_6 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1127; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1127; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_6); __Pyx_INCREF(__pyx_v_fvalues); PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_fvalues); __Pyx_GIVEREF(__pyx_v_fvalues); __pyx_t_6 = 0; __pyx_r = ((PyObject *)__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L0; goto __pyx_L4; } /*else*/ { /* "pandas/parser.pyx":1129 * return _ensure_encoded(values), fvalues * else: * if not isinstance(self.na_values, list): # <<<<<<<<<<<<<< * self.na_values = list(self.na_values) * if not isinstance(self.na_fvalues, set): */ __pyx_t_3 = __pyx_v_self->na_values; __Pyx_INCREF(__pyx_t_3); __pyx_t_1 = PyList_Check(__pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_5 = ((!(__pyx_t_1 != 0)) != 0); if (__pyx_t_5) { /* "pandas/parser.pyx":1130 * else: * if not isinstance(self.na_values, list): * self.na_values = list(self.na_values) # <<<<<<<<<<<<<< * if not isinstance(self.na_fvalues, set): * self.na_fvalues = set(self.na_fvalues) */ __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1130; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_v_self->na_values); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_self->na_values); __Pyx_GIVEREF(__pyx_v_self->na_values); __pyx_t_6 = PyObject_Call(((PyObject *)((PyObject*)(&PyList_Type))), ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1130; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; __Pyx_GIVEREF(__pyx_t_6); __Pyx_GOTREF(__pyx_v_self->na_values); __Pyx_DECREF(__pyx_v_self->na_values); __pyx_v_self->na_values = __pyx_t_6; __pyx_t_6 = 0; goto __pyx_L9; } __pyx_L9:; /* "pandas/parser.pyx":1131 * if not isinstance(self.na_values, list): * self.na_values = list(self.na_values) * if not isinstance(self.na_fvalues, set): # <<<<<<<<<<<<<< * self.na_fvalues = set(self.na_fvalues) * */ __pyx_t_6 = __pyx_v_self->na_fvalues; __Pyx_INCREF(__pyx_t_6); __pyx_t_5 = PySet_Check(__pyx_t_6); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_1 = ((!(__pyx_t_5 != 0)) != 0); if (__pyx_t_1) { /* "pandas/parser.pyx":1132 * self.na_values = list(self.na_values) * if not isinstance(self.na_fvalues, set): * self.na_fvalues = set(self.na_fvalues) # <<<<<<<<<<<<<< * * return _ensure_encoded(self.na_values), self.na_fvalues */ __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1132; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(__pyx_v_self->na_fvalues); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_self->na_fvalues); __Pyx_GIVEREF(__pyx_v_self->na_fvalues); __pyx_t_3 = PyObject_Call(((PyObject *)((PyObject*)(&PySet_Type))), ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1132; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0; __Pyx_GIVEREF(__pyx_t_3); __Pyx_GOTREF(__pyx_v_self->na_fvalues); __Pyx_DECREF(__pyx_v_self->na_fvalues); __pyx_v_self->na_fvalues = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L10; } __pyx_L10:; /* "pandas/parser.pyx":1134 * self.na_fvalues = set(self.na_fvalues) * * return _ensure_encoded(self.na_values), self.na_fvalues # <<<<<<<<<<<<<< * * cdef _free_na_set(self, kh_str_t *table): */ __Pyx_XDECREF(__pyx_r); __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s___ensure_encoded); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1134; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1134; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(__pyx_v_self->na_values); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_self->na_values); __Pyx_GIVEREF(__pyx_v_self->na_values); __pyx_t_4 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1134; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0; __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1134; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __Pyx_INCREF(__pyx_v_self->na_fvalues); PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_v_self->na_fvalues); __Pyx_GIVEREF(__pyx_v_self->na_fvalues); __pyx_t_4 = 0; __pyx_r = ((PyObject *)__pyx_t_6); __pyx_t_6 = 0; goto __pyx_L0; } __pyx_L4:; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("pandas.parser.TextReader._get_na_list", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_values); __Pyx_XDECREF(__pyx_v_fvalues); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/parser.pyx":1136 * return _ensure_encoded(self.na_values), self.na_fvalues * * cdef _free_na_set(self, kh_str_t *table): # <<<<<<<<<<<<<< * kh_destroy_str(table) * */ static PyObject *__pyx_f_6pandas_6parser_10TextReader__free_na_set(CYTHON_UNUSED struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self, kh_str_t *__pyx_v_table) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_free_na_set", 0); /* "pandas/parser.pyx":1137 * * cdef _free_na_set(self, kh_str_t *table): * kh_destroy_str(table) # <<<<<<<<<<<<<< * * cdef _get_column_name(self, Py_ssize_t i, Py_ssize_t nused): */ kh_destroy_str(__pyx_v_table); __pyx_r = Py_None; __Pyx_INCREF(Py_None); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/parser.pyx":1139 * kh_destroy_str(table) * * cdef _get_column_name(self, Py_ssize_t i, Py_ssize_t nused): # <<<<<<<<<<<<<< * if self.has_usecols and self.names is not None: * if len(self.names) == len(self.usecols): */ static PyObject *__pyx_f_6pandas_6parser_10TextReader__get_column_name(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self, Py_ssize_t __pyx_v_i, Py_ssize_t __pyx_v_nused) { Py_ssize_t __pyx_v_j; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; Py_ssize_t __pyx_t_4; Py_ssize_t __pyx_t_5; PyObject *__pyx_t_6 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_get_column_name", 0); /* "pandas/parser.pyx":1140 * * cdef _get_column_name(self, Py_ssize_t i, Py_ssize_t nused): * if self.has_usecols and self.names is not None: # <<<<<<<<<<<<<< * if len(self.names) == len(self.usecols): * return self.names[nused] */ if ((__pyx_v_self->has_usecols != 0)) { __pyx_t_1 = (__pyx_v_self->names != Py_None); __pyx_t_2 = (__pyx_t_1 != 0); } else { __pyx_t_2 = (__pyx_v_self->has_usecols != 0); } if (__pyx_t_2) { /* "pandas/parser.pyx":1141 * cdef _get_column_name(self, Py_ssize_t i, Py_ssize_t nused): * if self.has_usecols and self.names is not None: * if len(self.names) == len(self.usecols): # <<<<<<<<<<<<<< * return self.names[nused] * else: */ __pyx_t_3 = __pyx_v_self->names; __Pyx_INCREF(__pyx_t_3); __pyx_t_4 = PyObject_Length(__pyx_t_3); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1141; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = ((PyObject *)__pyx_v_self->usecols); __Pyx_INCREF(__pyx_t_3); if (unlikely(__pyx_t_3 == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1141; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_5 = PySet_Size(__pyx_t_3); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1141; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_2 = ((__pyx_t_4 == __pyx_t_5) != 0); if (__pyx_t_2) { /* "pandas/parser.pyx":1142 * if self.has_usecols and self.names is not None: * if len(self.names) == len(self.usecols): * return self.names[nused] # <<<<<<<<<<<<<< * else: * return self.names[i - self.leading_cols] */ __Pyx_XDECREF(__pyx_r); __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_self->names, __pyx_v_nused, sizeof(Py_ssize_t), PyInt_FromSsize_t, 0, 1, 1); if (!__pyx_t_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1142; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; goto __pyx_L4; } /*else*/ { /* "pandas/parser.pyx":1144 * return self.names[nused] * else: * return self.names[i - self.leading_cols] # <<<<<<<<<<<<<< * else: * if self.header is not None: */ __Pyx_XDECREF(__pyx_r); __pyx_t_5 = (__pyx_v_i - __pyx_v_self->leading_cols); __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_self->names, __pyx_t_5, sizeof(Py_ssize_t), PyInt_FromSsize_t, 0, 1, 1); if (!__pyx_t_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1144; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; } __pyx_L4:; goto __pyx_L3; } /*else*/ { /* "pandas/parser.pyx":1146 * return self.names[i - self.leading_cols] * else: * if self.header is not None: # <<<<<<<<<<<<<< * j = i - self.leading_cols * # hack for #2442 */ __pyx_t_2 = (__pyx_v_self->header != Py_None); __pyx_t_1 = (__pyx_t_2 != 0); if (__pyx_t_1) { /* "pandas/parser.pyx":1147 * else: * if self.header is not None: * j = i - self.leading_cols # <<<<<<<<<<<<<< * # hack for #2442 * if j == len(self.header[0]): */ __pyx_v_j = (__pyx_v_i - __pyx_v_self->leading_cols); /* "pandas/parser.pyx":1149 * j = i - self.leading_cols * # hack for #2442 * if j == len(self.header[0]): # <<<<<<<<<<<<<< * return j * else: */ __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_self->header, 0, sizeof(long), PyInt_FromLong, 0, 0, 1); if (!__pyx_t_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1149; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = PyObject_Length(__pyx_t_3); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1149; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_1 = ((__pyx_v_j == __pyx_t_5) != 0); if (__pyx_t_1) { /* "pandas/parser.pyx":1150 * # hack for #2442 * if j == len(self.header[0]): * return j # <<<<<<<<<<<<<< * else: * return self.header[0][j] */ __Pyx_XDECREF(__pyx_r); __pyx_t_3 = PyInt_FromSsize_t(__pyx_v_j); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1150; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; goto __pyx_L6; } /*else*/ { /* "pandas/parser.pyx":1152 * return j * else: * return self.header[0][j] # <<<<<<<<<<<<<< * else: * return None */ __Pyx_XDECREF(__pyx_r); __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_self->header, 0, sizeof(long), PyInt_FromLong, 0, 0, 1); if (!__pyx_t_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1152; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_6 = __Pyx_GetItemInt(__pyx_t_3, __pyx_v_j, sizeof(Py_ssize_t), PyInt_FromSsize_t, 0, 1, 1); if (!__pyx_t_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1152; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_r = __pyx_t_6; __pyx_t_6 = 0; goto __pyx_L0; } __pyx_L6:; goto __pyx_L5; } /*else*/ { /* "pandas/parser.pyx":1154 * return self.header[0][j] * else: * return None # <<<<<<<<<<<<<< * * class CParserError(Exception): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(Py_None); __pyx_r = Py_None; goto __pyx_L0; } __pyx_L5:; } __pyx_L3:; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("pandas.parser.TextReader._get_column_name", __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_6parser_10TextReader_12leading_cols_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6pandas_6parser_10TextReader_12leading_cols_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_6parser_10TextReader_12leading_cols___get__(((struct __pyx_obj_6pandas_6parser_TextReader *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/parser.pyx":246 * * cdef public: * int leading_cols, table_width, skip_footer, buffer_lines # <<<<<<<<<<<<<< * object allow_leading_cols * object delimiter, converters, delim_whitespace */ static PyObject *__pyx_pf_6pandas_6parser_10TextReader_12leading_cols___get__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyInt_FromLong(__pyx_v_self->leading_cols); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 246; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas.parser.TextReader.leading_cols.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pandas_6parser_10TextReader_12leading_cols_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ static int __pyx_pw_6pandas_6parser_10TextReader_12leading_cols_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_6parser_10TextReader_12leading_cols_2__set__(((struct __pyx_obj_6pandas_6parser_TextReader *)__pyx_v_self), ((PyObject *)__pyx_v_value)); __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pandas_6parser_10TextReader_12leading_cols_2__set__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__set__", 0); __pyx_t_1 = __Pyx_PyInt_AsInt(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 246; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_self->leading_cols = __pyx_t_1; __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("pandas.parser.TextReader.leading_cols.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_6parser_10TextReader_11table_width_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6pandas_6parser_10TextReader_11table_width_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_6parser_10TextReader_11table_width___get__(((struct __pyx_obj_6pandas_6parser_TextReader *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_6parser_10TextReader_11table_width___get__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyInt_FromLong(__pyx_v_self->table_width); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 246; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas.parser.TextReader.table_width.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pandas_6parser_10TextReader_11table_width_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ static int __pyx_pw_6pandas_6parser_10TextReader_11table_width_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_6parser_10TextReader_11table_width_2__set__(((struct __pyx_obj_6pandas_6parser_TextReader *)__pyx_v_self), ((PyObject *)__pyx_v_value)); __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pandas_6parser_10TextReader_11table_width_2__set__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__set__", 0); __pyx_t_1 = __Pyx_PyInt_AsInt(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 246; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_self->table_width = __pyx_t_1; __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("pandas.parser.TextReader.table_width.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_6parser_10TextReader_11skip_footer_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6pandas_6parser_10TextReader_11skip_footer_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_6parser_10TextReader_11skip_footer___get__(((struct __pyx_obj_6pandas_6parser_TextReader *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_6parser_10TextReader_11skip_footer___get__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyInt_FromLong(__pyx_v_self->skip_footer); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 246; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas.parser.TextReader.skip_footer.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pandas_6parser_10TextReader_11skip_footer_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ static int __pyx_pw_6pandas_6parser_10TextReader_11skip_footer_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_6parser_10TextReader_11skip_footer_2__set__(((struct __pyx_obj_6pandas_6parser_TextReader *)__pyx_v_self), ((PyObject *)__pyx_v_value)); __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pandas_6parser_10TextReader_11skip_footer_2__set__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__set__", 0); __pyx_t_1 = __Pyx_PyInt_AsInt(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 246; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_self->skip_footer = __pyx_t_1; __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("pandas.parser.TextReader.skip_footer.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_6parser_10TextReader_12buffer_lines_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6pandas_6parser_10TextReader_12buffer_lines_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_6parser_10TextReader_12buffer_lines___get__(((struct __pyx_obj_6pandas_6parser_TextReader *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_6parser_10TextReader_12buffer_lines___get__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyInt_FromLong(__pyx_v_self->buffer_lines); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 246; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas.parser.TextReader.buffer_lines.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pandas_6parser_10TextReader_12buffer_lines_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ static int __pyx_pw_6pandas_6parser_10TextReader_12buffer_lines_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_6parser_10TextReader_12buffer_lines_2__set__(((struct __pyx_obj_6pandas_6parser_TextReader *)__pyx_v_self), ((PyObject *)__pyx_v_value)); __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pandas_6parser_10TextReader_12buffer_lines_2__set__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__set__", 0); __pyx_t_1 = __Pyx_PyInt_AsInt(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 246; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_self->buffer_lines = __pyx_t_1; __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("pandas.parser.TextReader.buffer_lines.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_6parser_10TextReader_18allow_leading_cols_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6pandas_6parser_10TextReader_18allow_leading_cols_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_6parser_10TextReader_18allow_leading_cols___get__(((struct __pyx_obj_6pandas_6parser_TextReader *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/parser.pyx":247 * cdef public: * int leading_cols, table_width, skip_footer, buffer_lines * object allow_leading_cols # <<<<<<<<<<<<<< * object delimiter, converters, delim_whitespace * object na_values, true_values, false_values */ static PyObject *__pyx_pf_6pandas_6parser_10TextReader_18allow_leading_cols___get__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_self->allow_leading_cols); __pyx_r = __pyx_v_self->allow_leading_cols; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pandas_6parser_10TextReader_18allow_leading_cols_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ static int __pyx_pw_6pandas_6parser_10TextReader_18allow_leading_cols_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_6parser_10TextReader_18allow_leading_cols_2__set__(((struct __pyx_obj_6pandas_6parser_TextReader *)__pyx_v_self), ((PyObject *)__pyx_v_value)); __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pandas_6parser_10TextReader_18allow_leading_cols_2__set__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__", 0); __Pyx_INCREF(__pyx_v_value); __Pyx_GIVEREF(__pyx_v_value); __Pyx_GOTREF(__pyx_v_self->allow_leading_cols); __Pyx_DECREF(__pyx_v_self->allow_leading_cols); __pyx_v_self->allow_leading_cols = __pyx_v_value; __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pandas_6parser_10TextReader_18allow_leading_cols_5__del__(PyObject *__pyx_v_self); /*proto*/ static int __pyx_pw_6pandas_6parser_10TextReader_18allow_leading_cols_5__del__(PyObject *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_6parser_10TextReader_18allow_leading_cols_4__del__(((struct __pyx_obj_6pandas_6parser_TextReader *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pandas_6parser_10TextReader_18allow_leading_cols_4__del__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__", 0); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->allow_leading_cols); __Pyx_DECREF(__pyx_v_self->allow_leading_cols); __pyx_v_self->allow_leading_cols = Py_None; __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_6parser_10TextReader_9delimiter_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6pandas_6parser_10TextReader_9delimiter_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_6parser_10TextReader_9delimiter___get__(((struct __pyx_obj_6pandas_6parser_TextReader *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/parser.pyx":248 * int leading_cols, table_width, skip_footer, buffer_lines * object allow_leading_cols * object delimiter, converters, delim_whitespace # <<<<<<<<<<<<<< * object na_values, true_values, false_values * object memory_map */ static PyObject *__pyx_pf_6pandas_6parser_10TextReader_9delimiter___get__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_self->delimiter); __pyx_r = __pyx_v_self->delimiter; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pandas_6parser_10TextReader_9delimiter_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ static int __pyx_pw_6pandas_6parser_10TextReader_9delimiter_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_6parser_10TextReader_9delimiter_2__set__(((struct __pyx_obj_6pandas_6parser_TextReader *)__pyx_v_self), ((PyObject *)__pyx_v_value)); __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pandas_6parser_10TextReader_9delimiter_2__set__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__", 0); __Pyx_INCREF(__pyx_v_value); __Pyx_GIVEREF(__pyx_v_value); __Pyx_GOTREF(__pyx_v_self->delimiter); __Pyx_DECREF(__pyx_v_self->delimiter); __pyx_v_self->delimiter = __pyx_v_value; __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pandas_6parser_10TextReader_9delimiter_5__del__(PyObject *__pyx_v_self); /*proto*/ static int __pyx_pw_6pandas_6parser_10TextReader_9delimiter_5__del__(PyObject *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_6parser_10TextReader_9delimiter_4__del__(((struct __pyx_obj_6pandas_6parser_TextReader *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pandas_6parser_10TextReader_9delimiter_4__del__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__", 0); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->delimiter); __Pyx_DECREF(__pyx_v_self->delimiter); __pyx_v_self->delimiter = Py_None; __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_6parser_10TextReader_10converters_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6pandas_6parser_10TextReader_10converters_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_6parser_10TextReader_10converters___get__(((struct __pyx_obj_6pandas_6parser_TextReader *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_6parser_10TextReader_10converters___get__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_self->converters); __pyx_r = __pyx_v_self->converters; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pandas_6parser_10TextReader_10converters_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ static int __pyx_pw_6pandas_6parser_10TextReader_10converters_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_6parser_10TextReader_10converters_2__set__(((struct __pyx_obj_6pandas_6parser_TextReader *)__pyx_v_self), ((PyObject *)__pyx_v_value)); __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pandas_6parser_10TextReader_10converters_2__set__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__", 0); __Pyx_INCREF(__pyx_v_value); __Pyx_GIVEREF(__pyx_v_value); __Pyx_GOTREF(__pyx_v_self->converters); __Pyx_DECREF(__pyx_v_self->converters); __pyx_v_self->converters = __pyx_v_value; __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pandas_6parser_10TextReader_10converters_5__del__(PyObject *__pyx_v_self); /*proto*/ static int __pyx_pw_6pandas_6parser_10TextReader_10converters_5__del__(PyObject *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_6parser_10TextReader_10converters_4__del__(((struct __pyx_obj_6pandas_6parser_TextReader *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pandas_6parser_10TextReader_10converters_4__del__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__", 0); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->converters); __Pyx_DECREF(__pyx_v_self->converters); __pyx_v_self->converters = Py_None; __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_6parser_10TextReader_16delim_whitespace_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6pandas_6parser_10TextReader_16delim_whitespace_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_6parser_10TextReader_16delim_whitespace___get__(((struct __pyx_obj_6pandas_6parser_TextReader *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_6parser_10TextReader_16delim_whitespace___get__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_self->delim_whitespace); __pyx_r = __pyx_v_self->delim_whitespace; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pandas_6parser_10TextReader_16delim_whitespace_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ static int __pyx_pw_6pandas_6parser_10TextReader_16delim_whitespace_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_6parser_10TextReader_16delim_whitespace_2__set__(((struct __pyx_obj_6pandas_6parser_TextReader *)__pyx_v_self), ((PyObject *)__pyx_v_value)); __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pandas_6parser_10TextReader_16delim_whitespace_2__set__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__", 0); __Pyx_INCREF(__pyx_v_value); __Pyx_GIVEREF(__pyx_v_value); __Pyx_GOTREF(__pyx_v_self->delim_whitespace); __Pyx_DECREF(__pyx_v_self->delim_whitespace); __pyx_v_self->delim_whitespace = __pyx_v_value; __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pandas_6parser_10TextReader_16delim_whitespace_5__del__(PyObject *__pyx_v_self); /*proto*/ static int __pyx_pw_6pandas_6parser_10TextReader_16delim_whitespace_5__del__(PyObject *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_6parser_10TextReader_16delim_whitespace_4__del__(((struct __pyx_obj_6pandas_6parser_TextReader *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pandas_6parser_10TextReader_16delim_whitespace_4__del__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__", 0); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->delim_whitespace); __Pyx_DECREF(__pyx_v_self->delim_whitespace); __pyx_v_self->delim_whitespace = Py_None; __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_6parser_10TextReader_9na_values_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6pandas_6parser_10TextReader_9na_values_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_6parser_10TextReader_9na_values___get__(((struct __pyx_obj_6pandas_6parser_TextReader *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/parser.pyx":249 * object allow_leading_cols * object delimiter, converters, delim_whitespace * object na_values, true_values, false_values # <<<<<<<<<<<<<< * object memory_map * object as_recarray */ static PyObject *__pyx_pf_6pandas_6parser_10TextReader_9na_values___get__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_self->na_values); __pyx_r = __pyx_v_self->na_values; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pandas_6parser_10TextReader_9na_values_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ static int __pyx_pw_6pandas_6parser_10TextReader_9na_values_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_6parser_10TextReader_9na_values_2__set__(((struct __pyx_obj_6pandas_6parser_TextReader *)__pyx_v_self), ((PyObject *)__pyx_v_value)); __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pandas_6parser_10TextReader_9na_values_2__set__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__", 0); __Pyx_INCREF(__pyx_v_value); __Pyx_GIVEREF(__pyx_v_value); __Pyx_GOTREF(__pyx_v_self->na_values); __Pyx_DECREF(__pyx_v_self->na_values); __pyx_v_self->na_values = __pyx_v_value; __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pandas_6parser_10TextReader_9na_values_5__del__(PyObject *__pyx_v_self); /*proto*/ static int __pyx_pw_6pandas_6parser_10TextReader_9na_values_5__del__(PyObject *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_6parser_10TextReader_9na_values_4__del__(((struct __pyx_obj_6pandas_6parser_TextReader *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pandas_6parser_10TextReader_9na_values_4__del__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__", 0); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->na_values); __Pyx_DECREF(__pyx_v_self->na_values); __pyx_v_self->na_values = Py_None; __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_6parser_10TextReader_11true_values_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6pandas_6parser_10TextReader_11true_values_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_6parser_10TextReader_11true_values___get__(((struct __pyx_obj_6pandas_6parser_TextReader *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_6parser_10TextReader_11true_values___get__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_self->true_values); __pyx_r = __pyx_v_self->true_values; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pandas_6parser_10TextReader_11true_values_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ static int __pyx_pw_6pandas_6parser_10TextReader_11true_values_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_6parser_10TextReader_11true_values_2__set__(((struct __pyx_obj_6pandas_6parser_TextReader *)__pyx_v_self), ((PyObject *)__pyx_v_value)); __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pandas_6parser_10TextReader_11true_values_2__set__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__", 0); __Pyx_INCREF(__pyx_v_value); __Pyx_GIVEREF(__pyx_v_value); __Pyx_GOTREF(__pyx_v_self->true_values); __Pyx_DECREF(__pyx_v_self->true_values); __pyx_v_self->true_values = __pyx_v_value; __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pandas_6parser_10TextReader_11true_values_5__del__(PyObject *__pyx_v_self); /*proto*/ static int __pyx_pw_6pandas_6parser_10TextReader_11true_values_5__del__(PyObject *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_6parser_10TextReader_11true_values_4__del__(((struct __pyx_obj_6pandas_6parser_TextReader *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pandas_6parser_10TextReader_11true_values_4__del__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__", 0); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->true_values); __Pyx_DECREF(__pyx_v_self->true_values); __pyx_v_self->true_values = Py_None; __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_6parser_10TextReader_12false_values_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6pandas_6parser_10TextReader_12false_values_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_6parser_10TextReader_12false_values___get__(((struct __pyx_obj_6pandas_6parser_TextReader *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_6parser_10TextReader_12false_values___get__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_self->false_values); __pyx_r = __pyx_v_self->false_values; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pandas_6parser_10TextReader_12false_values_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ static int __pyx_pw_6pandas_6parser_10TextReader_12false_values_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_6parser_10TextReader_12false_values_2__set__(((struct __pyx_obj_6pandas_6parser_TextReader *)__pyx_v_self), ((PyObject *)__pyx_v_value)); __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pandas_6parser_10TextReader_12false_values_2__set__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__", 0); __Pyx_INCREF(__pyx_v_value); __Pyx_GIVEREF(__pyx_v_value); __Pyx_GOTREF(__pyx_v_self->false_values); __Pyx_DECREF(__pyx_v_self->false_values); __pyx_v_self->false_values = __pyx_v_value; __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pandas_6parser_10TextReader_12false_values_5__del__(PyObject *__pyx_v_self); /*proto*/ static int __pyx_pw_6pandas_6parser_10TextReader_12false_values_5__del__(PyObject *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_6parser_10TextReader_12false_values_4__del__(((struct __pyx_obj_6pandas_6parser_TextReader *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pandas_6parser_10TextReader_12false_values_4__del__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__", 0); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->false_values); __Pyx_DECREF(__pyx_v_self->false_values); __pyx_v_self->false_values = Py_None; __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_6parser_10TextReader_10memory_map_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6pandas_6parser_10TextReader_10memory_map_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_6parser_10TextReader_10memory_map___get__(((struct __pyx_obj_6pandas_6parser_TextReader *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/parser.pyx":250 * object delimiter, converters, delim_whitespace * object na_values, true_values, false_values * object memory_map # <<<<<<<<<<<<<< * object as_recarray * object header, orig_header, names, header_start, header_end */ static PyObject *__pyx_pf_6pandas_6parser_10TextReader_10memory_map___get__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_self->memory_map); __pyx_r = __pyx_v_self->memory_map; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pandas_6parser_10TextReader_10memory_map_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ static int __pyx_pw_6pandas_6parser_10TextReader_10memory_map_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_6parser_10TextReader_10memory_map_2__set__(((struct __pyx_obj_6pandas_6parser_TextReader *)__pyx_v_self), ((PyObject *)__pyx_v_value)); __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pandas_6parser_10TextReader_10memory_map_2__set__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__", 0); __Pyx_INCREF(__pyx_v_value); __Pyx_GIVEREF(__pyx_v_value); __Pyx_GOTREF(__pyx_v_self->memory_map); __Pyx_DECREF(__pyx_v_self->memory_map); __pyx_v_self->memory_map = __pyx_v_value; __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pandas_6parser_10TextReader_10memory_map_5__del__(PyObject *__pyx_v_self); /*proto*/ static int __pyx_pw_6pandas_6parser_10TextReader_10memory_map_5__del__(PyObject *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_6parser_10TextReader_10memory_map_4__del__(((struct __pyx_obj_6pandas_6parser_TextReader *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pandas_6parser_10TextReader_10memory_map_4__del__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__", 0); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->memory_map); __Pyx_DECREF(__pyx_v_self->memory_map); __pyx_v_self->memory_map = Py_None; __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_6parser_10TextReader_11as_recarray_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6pandas_6parser_10TextReader_11as_recarray_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_6parser_10TextReader_11as_recarray___get__(((struct __pyx_obj_6pandas_6parser_TextReader *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/parser.pyx":251 * object na_values, true_values, false_values * object memory_map * object as_recarray # <<<<<<<<<<<<<< * object header, orig_header, names, header_start, header_end * object index_col */ static PyObject *__pyx_pf_6pandas_6parser_10TextReader_11as_recarray___get__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_self->as_recarray); __pyx_r = __pyx_v_self->as_recarray; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pandas_6parser_10TextReader_11as_recarray_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ static int __pyx_pw_6pandas_6parser_10TextReader_11as_recarray_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_6parser_10TextReader_11as_recarray_2__set__(((struct __pyx_obj_6pandas_6parser_TextReader *)__pyx_v_self), ((PyObject *)__pyx_v_value)); __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pandas_6parser_10TextReader_11as_recarray_2__set__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__", 0); __Pyx_INCREF(__pyx_v_value); __Pyx_GIVEREF(__pyx_v_value); __Pyx_GOTREF(__pyx_v_self->as_recarray); __Pyx_DECREF(__pyx_v_self->as_recarray); __pyx_v_self->as_recarray = __pyx_v_value; __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pandas_6parser_10TextReader_11as_recarray_5__del__(PyObject *__pyx_v_self); /*proto*/ static int __pyx_pw_6pandas_6parser_10TextReader_11as_recarray_5__del__(PyObject *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_6parser_10TextReader_11as_recarray_4__del__(((struct __pyx_obj_6pandas_6parser_TextReader *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pandas_6parser_10TextReader_11as_recarray_4__del__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__", 0); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->as_recarray); __Pyx_DECREF(__pyx_v_self->as_recarray); __pyx_v_self->as_recarray = Py_None; __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_6parser_10TextReader_6header_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6pandas_6parser_10TextReader_6header_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_6parser_10TextReader_6header___get__(((struct __pyx_obj_6pandas_6parser_TextReader *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/parser.pyx":252 * object memory_map * object as_recarray * object header, orig_header, names, header_start, header_end # <<<<<<<<<<<<<< * object index_col * object low_memory */ static PyObject *__pyx_pf_6pandas_6parser_10TextReader_6header___get__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_self->header); __pyx_r = __pyx_v_self->header; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pandas_6parser_10TextReader_6header_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ static int __pyx_pw_6pandas_6parser_10TextReader_6header_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_6parser_10TextReader_6header_2__set__(((struct __pyx_obj_6pandas_6parser_TextReader *)__pyx_v_self), ((PyObject *)__pyx_v_value)); __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pandas_6parser_10TextReader_6header_2__set__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__", 0); __Pyx_INCREF(__pyx_v_value); __Pyx_GIVEREF(__pyx_v_value); __Pyx_GOTREF(__pyx_v_self->header); __Pyx_DECREF(__pyx_v_self->header); __pyx_v_self->header = __pyx_v_value; __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pandas_6parser_10TextReader_6header_5__del__(PyObject *__pyx_v_self); /*proto*/ static int __pyx_pw_6pandas_6parser_10TextReader_6header_5__del__(PyObject *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_6parser_10TextReader_6header_4__del__(((struct __pyx_obj_6pandas_6parser_TextReader *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pandas_6parser_10TextReader_6header_4__del__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__", 0); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->header); __Pyx_DECREF(__pyx_v_self->header); __pyx_v_self->header = Py_None; __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_6parser_10TextReader_11orig_header_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6pandas_6parser_10TextReader_11orig_header_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_6parser_10TextReader_11orig_header___get__(((struct __pyx_obj_6pandas_6parser_TextReader *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_6parser_10TextReader_11orig_header___get__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_self->orig_header); __pyx_r = __pyx_v_self->orig_header; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pandas_6parser_10TextReader_11orig_header_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ static int __pyx_pw_6pandas_6parser_10TextReader_11orig_header_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_6parser_10TextReader_11orig_header_2__set__(((struct __pyx_obj_6pandas_6parser_TextReader *)__pyx_v_self), ((PyObject *)__pyx_v_value)); __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pandas_6parser_10TextReader_11orig_header_2__set__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__", 0); __Pyx_INCREF(__pyx_v_value); __Pyx_GIVEREF(__pyx_v_value); __Pyx_GOTREF(__pyx_v_self->orig_header); __Pyx_DECREF(__pyx_v_self->orig_header); __pyx_v_self->orig_header = __pyx_v_value; __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pandas_6parser_10TextReader_11orig_header_5__del__(PyObject *__pyx_v_self); /*proto*/ static int __pyx_pw_6pandas_6parser_10TextReader_11orig_header_5__del__(PyObject *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_6parser_10TextReader_11orig_header_4__del__(((struct __pyx_obj_6pandas_6parser_TextReader *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pandas_6parser_10TextReader_11orig_header_4__del__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__", 0); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->orig_header); __Pyx_DECREF(__pyx_v_self->orig_header); __pyx_v_self->orig_header = Py_None; __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_6parser_10TextReader_5names_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6pandas_6parser_10TextReader_5names_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_6parser_10TextReader_5names___get__(((struct __pyx_obj_6pandas_6parser_TextReader *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_6parser_10TextReader_5names___get__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_self->names); __pyx_r = __pyx_v_self->names; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pandas_6parser_10TextReader_5names_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ static int __pyx_pw_6pandas_6parser_10TextReader_5names_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_6parser_10TextReader_5names_2__set__(((struct __pyx_obj_6pandas_6parser_TextReader *)__pyx_v_self), ((PyObject *)__pyx_v_value)); __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pandas_6parser_10TextReader_5names_2__set__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__", 0); __Pyx_INCREF(__pyx_v_value); __Pyx_GIVEREF(__pyx_v_value); __Pyx_GOTREF(__pyx_v_self->names); __Pyx_DECREF(__pyx_v_self->names); __pyx_v_self->names = __pyx_v_value; __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pandas_6parser_10TextReader_5names_5__del__(PyObject *__pyx_v_self); /*proto*/ static int __pyx_pw_6pandas_6parser_10TextReader_5names_5__del__(PyObject *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_6parser_10TextReader_5names_4__del__(((struct __pyx_obj_6pandas_6parser_TextReader *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pandas_6parser_10TextReader_5names_4__del__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__", 0); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->names); __Pyx_DECREF(__pyx_v_self->names); __pyx_v_self->names = Py_None; __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_6parser_10TextReader_12header_start_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6pandas_6parser_10TextReader_12header_start_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_6parser_10TextReader_12header_start___get__(((struct __pyx_obj_6pandas_6parser_TextReader *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_6parser_10TextReader_12header_start___get__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_self->header_start); __pyx_r = __pyx_v_self->header_start; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pandas_6parser_10TextReader_12header_start_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ static int __pyx_pw_6pandas_6parser_10TextReader_12header_start_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_6parser_10TextReader_12header_start_2__set__(((struct __pyx_obj_6pandas_6parser_TextReader *)__pyx_v_self), ((PyObject *)__pyx_v_value)); __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pandas_6parser_10TextReader_12header_start_2__set__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__", 0); __Pyx_INCREF(__pyx_v_value); __Pyx_GIVEREF(__pyx_v_value); __Pyx_GOTREF(__pyx_v_self->header_start); __Pyx_DECREF(__pyx_v_self->header_start); __pyx_v_self->header_start = __pyx_v_value; __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pandas_6parser_10TextReader_12header_start_5__del__(PyObject *__pyx_v_self); /*proto*/ static int __pyx_pw_6pandas_6parser_10TextReader_12header_start_5__del__(PyObject *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_6parser_10TextReader_12header_start_4__del__(((struct __pyx_obj_6pandas_6parser_TextReader *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pandas_6parser_10TextReader_12header_start_4__del__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__", 0); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->header_start); __Pyx_DECREF(__pyx_v_self->header_start); __pyx_v_self->header_start = Py_None; __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_6parser_10TextReader_10header_end_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6pandas_6parser_10TextReader_10header_end_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_6parser_10TextReader_10header_end___get__(((struct __pyx_obj_6pandas_6parser_TextReader *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_6parser_10TextReader_10header_end___get__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_self->header_end); __pyx_r = __pyx_v_self->header_end; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pandas_6parser_10TextReader_10header_end_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ static int __pyx_pw_6pandas_6parser_10TextReader_10header_end_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_6parser_10TextReader_10header_end_2__set__(((struct __pyx_obj_6pandas_6parser_TextReader *)__pyx_v_self), ((PyObject *)__pyx_v_value)); __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pandas_6parser_10TextReader_10header_end_2__set__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__", 0); __Pyx_INCREF(__pyx_v_value); __Pyx_GIVEREF(__pyx_v_value); __Pyx_GOTREF(__pyx_v_self->header_end); __Pyx_DECREF(__pyx_v_self->header_end); __pyx_v_self->header_end = __pyx_v_value; __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pandas_6parser_10TextReader_10header_end_5__del__(PyObject *__pyx_v_self); /*proto*/ static int __pyx_pw_6pandas_6parser_10TextReader_10header_end_5__del__(PyObject *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_6parser_10TextReader_10header_end_4__del__(((struct __pyx_obj_6pandas_6parser_TextReader *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pandas_6parser_10TextReader_10header_end_4__del__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__", 0); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->header_end); __Pyx_DECREF(__pyx_v_self->header_end); __pyx_v_self->header_end = Py_None; __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_6parser_10TextReader_9index_col_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6pandas_6parser_10TextReader_9index_col_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_6parser_10TextReader_9index_col___get__(((struct __pyx_obj_6pandas_6parser_TextReader *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/parser.pyx":253 * object as_recarray * object header, orig_header, names, header_start, header_end * object index_col # <<<<<<<<<<<<<< * object low_memory * object skiprows */ static PyObject *__pyx_pf_6pandas_6parser_10TextReader_9index_col___get__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_self->index_col); __pyx_r = __pyx_v_self->index_col; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pandas_6parser_10TextReader_9index_col_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ static int __pyx_pw_6pandas_6parser_10TextReader_9index_col_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_6parser_10TextReader_9index_col_2__set__(((struct __pyx_obj_6pandas_6parser_TextReader *)__pyx_v_self), ((PyObject *)__pyx_v_value)); __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pandas_6parser_10TextReader_9index_col_2__set__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__", 0); __Pyx_INCREF(__pyx_v_value); __Pyx_GIVEREF(__pyx_v_value); __Pyx_GOTREF(__pyx_v_self->index_col); __Pyx_DECREF(__pyx_v_self->index_col); __pyx_v_self->index_col = __pyx_v_value; __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pandas_6parser_10TextReader_9index_col_5__del__(PyObject *__pyx_v_self); /*proto*/ static int __pyx_pw_6pandas_6parser_10TextReader_9index_col_5__del__(PyObject *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_6parser_10TextReader_9index_col_4__del__(((struct __pyx_obj_6pandas_6parser_TextReader *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pandas_6parser_10TextReader_9index_col_4__del__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__", 0); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->index_col); __Pyx_DECREF(__pyx_v_self->index_col); __pyx_v_self->index_col = Py_None; __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_6parser_10TextReader_10low_memory_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6pandas_6parser_10TextReader_10low_memory_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_6parser_10TextReader_10low_memory___get__(((struct __pyx_obj_6pandas_6parser_TextReader *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/parser.pyx":254 * object header, orig_header, names, header_start, header_end * object index_col * object low_memory # <<<<<<<<<<<<<< * object skiprows * object compact_ints, use_unsigned */ static PyObject *__pyx_pf_6pandas_6parser_10TextReader_10low_memory___get__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_self->low_memory); __pyx_r = __pyx_v_self->low_memory; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pandas_6parser_10TextReader_10low_memory_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ static int __pyx_pw_6pandas_6parser_10TextReader_10low_memory_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_6parser_10TextReader_10low_memory_2__set__(((struct __pyx_obj_6pandas_6parser_TextReader *)__pyx_v_self), ((PyObject *)__pyx_v_value)); __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pandas_6parser_10TextReader_10low_memory_2__set__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__", 0); __Pyx_INCREF(__pyx_v_value); __Pyx_GIVEREF(__pyx_v_value); __Pyx_GOTREF(__pyx_v_self->low_memory); __Pyx_DECREF(__pyx_v_self->low_memory); __pyx_v_self->low_memory = __pyx_v_value; __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pandas_6parser_10TextReader_10low_memory_5__del__(PyObject *__pyx_v_self); /*proto*/ static int __pyx_pw_6pandas_6parser_10TextReader_10low_memory_5__del__(PyObject *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_6parser_10TextReader_10low_memory_4__del__(((struct __pyx_obj_6pandas_6parser_TextReader *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pandas_6parser_10TextReader_10low_memory_4__del__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__", 0); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->low_memory); __Pyx_DECREF(__pyx_v_self->low_memory); __pyx_v_self->low_memory = Py_None; __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_6parser_10TextReader_8skiprows_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6pandas_6parser_10TextReader_8skiprows_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_6parser_10TextReader_8skiprows___get__(((struct __pyx_obj_6pandas_6parser_TextReader *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/parser.pyx":255 * object index_col * object low_memory * object skiprows # <<<<<<<<<<<<<< * object compact_ints, use_unsigned * object dtype */ static PyObject *__pyx_pf_6pandas_6parser_10TextReader_8skiprows___get__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_self->skiprows); __pyx_r = __pyx_v_self->skiprows; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pandas_6parser_10TextReader_8skiprows_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ static int __pyx_pw_6pandas_6parser_10TextReader_8skiprows_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_6parser_10TextReader_8skiprows_2__set__(((struct __pyx_obj_6pandas_6parser_TextReader *)__pyx_v_self), ((PyObject *)__pyx_v_value)); __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pandas_6parser_10TextReader_8skiprows_2__set__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__", 0); __Pyx_INCREF(__pyx_v_value); __Pyx_GIVEREF(__pyx_v_value); __Pyx_GOTREF(__pyx_v_self->skiprows); __Pyx_DECREF(__pyx_v_self->skiprows); __pyx_v_self->skiprows = __pyx_v_value; __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pandas_6parser_10TextReader_8skiprows_5__del__(PyObject *__pyx_v_self); /*proto*/ static int __pyx_pw_6pandas_6parser_10TextReader_8skiprows_5__del__(PyObject *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_6parser_10TextReader_8skiprows_4__del__(((struct __pyx_obj_6pandas_6parser_TextReader *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pandas_6parser_10TextReader_8skiprows_4__del__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__", 0); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->skiprows); __Pyx_DECREF(__pyx_v_self->skiprows); __pyx_v_self->skiprows = Py_None; __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_6parser_10TextReader_12compact_ints_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6pandas_6parser_10TextReader_12compact_ints_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_6parser_10TextReader_12compact_ints___get__(((struct __pyx_obj_6pandas_6parser_TextReader *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/parser.pyx":256 * object low_memory * object skiprows * object compact_ints, use_unsigned # <<<<<<<<<<<<<< * object dtype * object encoding */ static PyObject *__pyx_pf_6pandas_6parser_10TextReader_12compact_ints___get__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_self->compact_ints); __pyx_r = __pyx_v_self->compact_ints; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pandas_6parser_10TextReader_12compact_ints_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ static int __pyx_pw_6pandas_6parser_10TextReader_12compact_ints_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_6parser_10TextReader_12compact_ints_2__set__(((struct __pyx_obj_6pandas_6parser_TextReader *)__pyx_v_self), ((PyObject *)__pyx_v_value)); __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pandas_6parser_10TextReader_12compact_ints_2__set__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__", 0); __Pyx_INCREF(__pyx_v_value); __Pyx_GIVEREF(__pyx_v_value); __Pyx_GOTREF(__pyx_v_self->compact_ints); __Pyx_DECREF(__pyx_v_self->compact_ints); __pyx_v_self->compact_ints = __pyx_v_value; __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pandas_6parser_10TextReader_12compact_ints_5__del__(PyObject *__pyx_v_self); /*proto*/ static int __pyx_pw_6pandas_6parser_10TextReader_12compact_ints_5__del__(PyObject *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_6parser_10TextReader_12compact_ints_4__del__(((struct __pyx_obj_6pandas_6parser_TextReader *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pandas_6parser_10TextReader_12compact_ints_4__del__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__", 0); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->compact_ints); __Pyx_DECREF(__pyx_v_self->compact_ints); __pyx_v_self->compact_ints = Py_None; __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_6parser_10TextReader_12use_unsigned_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6pandas_6parser_10TextReader_12use_unsigned_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_6parser_10TextReader_12use_unsigned___get__(((struct __pyx_obj_6pandas_6parser_TextReader *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_6parser_10TextReader_12use_unsigned___get__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_self->use_unsigned); __pyx_r = __pyx_v_self->use_unsigned; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pandas_6parser_10TextReader_12use_unsigned_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ static int __pyx_pw_6pandas_6parser_10TextReader_12use_unsigned_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_6parser_10TextReader_12use_unsigned_2__set__(((struct __pyx_obj_6pandas_6parser_TextReader *)__pyx_v_self), ((PyObject *)__pyx_v_value)); __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pandas_6parser_10TextReader_12use_unsigned_2__set__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__", 0); __Pyx_INCREF(__pyx_v_value); __Pyx_GIVEREF(__pyx_v_value); __Pyx_GOTREF(__pyx_v_self->use_unsigned); __Pyx_DECREF(__pyx_v_self->use_unsigned); __pyx_v_self->use_unsigned = __pyx_v_value; __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pandas_6parser_10TextReader_12use_unsigned_5__del__(PyObject *__pyx_v_self); /*proto*/ static int __pyx_pw_6pandas_6parser_10TextReader_12use_unsigned_5__del__(PyObject *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_6parser_10TextReader_12use_unsigned_4__del__(((struct __pyx_obj_6pandas_6parser_TextReader *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pandas_6parser_10TextReader_12use_unsigned_4__del__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__", 0); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->use_unsigned); __Pyx_DECREF(__pyx_v_self->use_unsigned); __pyx_v_self->use_unsigned = Py_None; __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_6parser_10TextReader_5dtype_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6pandas_6parser_10TextReader_5dtype_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_6parser_10TextReader_5dtype___get__(((struct __pyx_obj_6pandas_6parser_TextReader *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/parser.pyx":257 * object skiprows * object compact_ints, use_unsigned * object dtype # <<<<<<<<<<<<<< * object encoding * object compression */ static PyObject *__pyx_pf_6pandas_6parser_10TextReader_5dtype___get__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_self->dtype); __pyx_r = __pyx_v_self->dtype; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pandas_6parser_10TextReader_5dtype_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ static int __pyx_pw_6pandas_6parser_10TextReader_5dtype_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_6parser_10TextReader_5dtype_2__set__(((struct __pyx_obj_6pandas_6parser_TextReader *)__pyx_v_self), ((PyObject *)__pyx_v_value)); __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pandas_6parser_10TextReader_5dtype_2__set__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__", 0); __Pyx_INCREF(__pyx_v_value); __Pyx_GIVEREF(__pyx_v_value); __Pyx_GOTREF(__pyx_v_self->dtype); __Pyx_DECREF(__pyx_v_self->dtype); __pyx_v_self->dtype = __pyx_v_value; __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pandas_6parser_10TextReader_5dtype_5__del__(PyObject *__pyx_v_self); /*proto*/ static int __pyx_pw_6pandas_6parser_10TextReader_5dtype_5__del__(PyObject *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_6parser_10TextReader_5dtype_4__del__(((struct __pyx_obj_6pandas_6parser_TextReader *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pandas_6parser_10TextReader_5dtype_4__del__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__", 0); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->dtype); __Pyx_DECREF(__pyx_v_self->dtype); __pyx_v_self->dtype = Py_None; __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_6parser_10TextReader_8encoding_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6pandas_6parser_10TextReader_8encoding_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_6parser_10TextReader_8encoding___get__(((struct __pyx_obj_6pandas_6parser_TextReader *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/parser.pyx":258 * object compact_ints, use_unsigned * object dtype * object encoding # <<<<<<<<<<<<<< * object compression * object mangle_dupe_cols */ static PyObject *__pyx_pf_6pandas_6parser_10TextReader_8encoding___get__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_self->encoding); __pyx_r = __pyx_v_self->encoding; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pandas_6parser_10TextReader_8encoding_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ static int __pyx_pw_6pandas_6parser_10TextReader_8encoding_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_6parser_10TextReader_8encoding_2__set__(((struct __pyx_obj_6pandas_6parser_TextReader *)__pyx_v_self), ((PyObject *)__pyx_v_value)); __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pandas_6parser_10TextReader_8encoding_2__set__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__", 0); __Pyx_INCREF(__pyx_v_value); __Pyx_GIVEREF(__pyx_v_value); __Pyx_GOTREF(__pyx_v_self->encoding); __Pyx_DECREF(__pyx_v_self->encoding); __pyx_v_self->encoding = __pyx_v_value; __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pandas_6parser_10TextReader_8encoding_5__del__(PyObject *__pyx_v_self); /*proto*/ static int __pyx_pw_6pandas_6parser_10TextReader_8encoding_5__del__(PyObject *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_6parser_10TextReader_8encoding_4__del__(((struct __pyx_obj_6pandas_6parser_TextReader *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pandas_6parser_10TextReader_8encoding_4__del__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__", 0); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->encoding); __Pyx_DECREF(__pyx_v_self->encoding); __pyx_v_self->encoding = Py_None; __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_6parser_10TextReader_11compression_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6pandas_6parser_10TextReader_11compression_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_6parser_10TextReader_11compression___get__(((struct __pyx_obj_6pandas_6parser_TextReader *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/parser.pyx":259 * object dtype * object encoding * object compression # <<<<<<<<<<<<<< * object mangle_dupe_cols * object tupleize_cols */ static PyObject *__pyx_pf_6pandas_6parser_10TextReader_11compression___get__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_self->compression); __pyx_r = __pyx_v_self->compression; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pandas_6parser_10TextReader_11compression_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ static int __pyx_pw_6pandas_6parser_10TextReader_11compression_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_6parser_10TextReader_11compression_2__set__(((struct __pyx_obj_6pandas_6parser_TextReader *)__pyx_v_self), ((PyObject *)__pyx_v_value)); __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pandas_6parser_10TextReader_11compression_2__set__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__", 0); __Pyx_INCREF(__pyx_v_value); __Pyx_GIVEREF(__pyx_v_value); __Pyx_GOTREF(__pyx_v_self->compression); __Pyx_DECREF(__pyx_v_self->compression); __pyx_v_self->compression = __pyx_v_value; __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pandas_6parser_10TextReader_11compression_5__del__(PyObject *__pyx_v_self); /*proto*/ static int __pyx_pw_6pandas_6parser_10TextReader_11compression_5__del__(PyObject *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_6parser_10TextReader_11compression_4__del__(((struct __pyx_obj_6pandas_6parser_TextReader *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pandas_6parser_10TextReader_11compression_4__del__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__", 0); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->compression); __Pyx_DECREF(__pyx_v_self->compression); __pyx_v_self->compression = Py_None; __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_6parser_10TextReader_16mangle_dupe_cols_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6pandas_6parser_10TextReader_16mangle_dupe_cols_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_6parser_10TextReader_16mangle_dupe_cols___get__(((struct __pyx_obj_6pandas_6parser_TextReader *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/parser.pyx":260 * object encoding * object compression * object mangle_dupe_cols # <<<<<<<<<<<<<< * object tupleize_cols * set noconvert, usecols */ static PyObject *__pyx_pf_6pandas_6parser_10TextReader_16mangle_dupe_cols___get__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_self->mangle_dupe_cols); __pyx_r = __pyx_v_self->mangle_dupe_cols; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pandas_6parser_10TextReader_16mangle_dupe_cols_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ static int __pyx_pw_6pandas_6parser_10TextReader_16mangle_dupe_cols_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_6parser_10TextReader_16mangle_dupe_cols_2__set__(((struct __pyx_obj_6pandas_6parser_TextReader *)__pyx_v_self), ((PyObject *)__pyx_v_value)); __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pandas_6parser_10TextReader_16mangle_dupe_cols_2__set__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__", 0); __Pyx_INCREF(__pyx_v_value); __Pyx_GIVEREF(__pyx_v_value); __Pyx_GOTREF(__pyx_v_self->mangle_dupe_cols); __Pyx_DECREF(__pyx_v_self->mangle_dupe_cols); __pyx_v_self->mangle_dupe_cols = __pyx_v_value; __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pandas_6parser_10TextReader_16mangle_dupe_cols_5__del__(PyObject *__pyx_v_self); /*proto*/ static int __pyx_pw_6pandas_6parser_10TextReader_16mangle_dupe_cols_5__del__(PyObject *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_6parser_10TextReader_16mangle_dupe_cols_4__del__(((struct __pyx_obj_6pandas_6parser_TextReader *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pandas_6parser_10TextReader_16mangle_dupe_cols_4__del__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__", 0); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->mangle_dupe_cols); __Pyx_DECREF(__pyx_v_self->mangle_dupe_cols); __pyx_v_self->mangle_dupe_cols = Py_None; __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_6parser_10TextReader_13tupleize_cols_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6pandas_6parser_10TextReader_13tupleize_cols_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_6parser_10TextReader_13tupleize_cols___get__(((struct __pyx_obj_6pandas_6parser_TextReader *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/parser.pyx":261 * object compression * object mangle_dupe_cols * object tupleize_cols # <<<<<<<<<<<<<< * set noconvert, usecols * */ static PyObject *__pyx_pf_6pandas_6parser_10TextReader_13tupleize_cols___get__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_self->tupleize_cols); __pyx_r = __pyx_v_self->tupleize_cols; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pandas_6parser_10TextReader_13tupleize_cols_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ static int __pyx_pw_6pandas_6parser_10TextReader_13tupleize_cols_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_6parser_10TextReader_13tupleize_cols_2__set__(((struct __pyx_obj_6pandas_6parser_TextReader *)__pyx_v_self), ((PyObject *)__pyx_v_value)); __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pandas_6parser_10TextReader_13tupleize_cols_2__set__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__", 0); __Pyx_INCREF(__pyx_v_value); __Pyx_GIVEREF(__pyx_v_value); __Pyx_GOTREF(__pyx_v_self->tupleize_cols); __Pyx_DECREF(__pyx_v_self->tupleize_cols); __pyx_v_self->tupleize_cols = __pyx_v_value; __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pandas_6parser_10TextReader_13tupleize_cols_5__del__(PyObject *__pyx_v_self); /*proto*/ static int __pyx_pw_6pandas_6parser_10TextReader_13tupleize_cols_5__del__(PyObject *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_6parser_10TextReader_13tupleize_cols_4__del__(((struct __pyx_obj_6pandas_6parser_TextReader *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pandas_6parser_10TextReader_13tupleize_cols_4__del__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__", 0); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->tupleize_cols); __Pyx_DECREF(__pyx_v_self->tupleize_cols); __pyx_v_self->tupleize_cols = Py_None; __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_6parser_10TextReader_9noconvert_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6pandas_6parser_10TextReader_9noconvert_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_6parser_10TextReader_9noconvert___get__(((struct __pyx_obj_6pandas_6parser_TextReader *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/parser.pyx":262 * object mangle_dupe_cols * object tupleize_cols * set noconvert, usecols # <<<<<<<<<<<<<< * * def __cinit__(self, source, */ static PyObject *__pyx_pf_6pandas_6parser_10TextReader_9noconvert___get__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_self->noconvert)); __pyx_r = ((PyObject *)__pyx_v_self->noconvert); goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pandas_6parser_10TextReader_9noconvert_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ static int __pyx_pw_6pandas_6parser_10TextReader_9noconvert_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_6parser_10TextReader_9noconvert_2__set__(((struct __pyx_obj_6pandas_6parser_TextReader *)__pyx_v_self), ((PyObject *)__pyx_v_value)); __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pandas_6parser_10TextReader_9noconvert_2__set__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__set__", 0); if (!(likely(PySet_CheckExact(__pyx_v_value))||((__pyx_v_value) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected set, got %.200s", Py_TYPE(__pyx_v_value)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 262; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_INCREF(__pyx_v_value); __Pyx_GIVEREF(__pyx_v_value); __Pyx_GOTREF(__pyx_v_self->noconvert); __Pyx_DECREF(((PyObject *)__pyx_v_self->noconvert)); __pyx_v_self->noconvert = ((PyObject*)__pyx_v_value); __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("pandas.parser.TextReader.noconvert.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pandas_6parser_10TextReader_9noconvert_5__del__(PyObject *__pyx_v_self); /*proto*/ static int __pyx_pw_6pandas_6parser_10TextReader_9noconvert_5__del__(PyObject *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_6parser_10TextReader_9noconvert_4__del__(((struct __pyx_obj_6pandas_6parser_TextReader *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pandas_6parser_10TextReader_9noconvert_4__del__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__", 0); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->noconvert); __Pyx_DECREF(((PyObject *)__pyx_v_self->noconvert)); __pyx_v_self->noconvert = ((PyObject*)Py_None); __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_6parser_10TextReader_7usecols_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6pandas_6parser_10TextReader_7usecols_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_6parser_10TextReader_7usecols___get__(((struct __pyx_obj_6pandas_6parser_TextReader *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_6parser_10TextReader_7usecols___get__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_self->usecols)); __pyx_r = ((PyObject *)__pyx_v_self->usecols); goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pandas_6parser_10TextReader_7usecols_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ static int __pyx_pw_6pandas_6parser_10TextReader_7usecols_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_6parser_10TextReader_7usecols_2__set__(((struct __pyx_obj_6pandas_6parser_TextReader *)__pyx_v_self), ((PyObject *)__pyx_v_value)); __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pandas_6parser_10TextReader_7usecols_2__set__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__set__", 0); if (!(likely(PySet_CheckExact(__pyx_v_value))||((__pyx_v_value) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected set, got %.200s", Py_TYPE(__pyx_v_value)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 262; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_INCREF(__pyx_v_value); __Pyx_GIVEREF(__pyx_v_value); __Pyx_GOTREF(__pyx_v_self->usecols); __Pyx_DECREF(((PyObject *)__pyx_v_self->usecols)); __pyx_v_self->usecols = ((PyObject*)__pyx_v_value); __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("pandas.parser.TextReader.usecols.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pandas_6parser_10TextReader_7usecols_5__del__(PyObject *__pyx_v_self); /*proto*/ static int __pyx_pw_6pandas_6parser_10TextReader_7usecols_5__del__(PyObject *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_6parser_10TextReader_7usecols_4__del__(((struct __pyx_obj_6pandas_6parser_TextReader *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pandas_6parser_10TextReader_7usecols_4__del__(struct __pyx_obj_6pandas_6parser_TextReader *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__", 0); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->usecols); __Pyx_DECREF(((PyObject *)__pyx_v_self->usecols)); __pyx_v_self->usecols = ((PyObject*)Py_None); __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_6parser_1_ensure_encoded(PyObject *__pyx_self, PyObject *__pyx_v_lst); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_6parser_1_ensure_encoded = {__Pyx_NAMESTR("_ensure_encoded"), (PyCFunction)__pyx_pw_6pandas_6parser_1_ensure_encoded, METH_O, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_6parser_1_ensure_encoded(PyObject *__pyx_self, PyObject *__pyx_v_lst) { CYTHON_UNUSED int __pyx_lineno = 0; CYTHON_UNUSED const char *__pyx_filename = NULL; CYTHON_UNUSED int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_ensure_encoded (wrapper)", 0); if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_lst), (&PyList_Type), 1, "lst", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1167; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_6parser__ensure_encoded(__pyx_self, ((PyObject*)__pyx_v_lst)); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/parser.pyx":1167 * * * def _ensure_encoded(list lst): # <<<<<<<<<<<<<< * cdef list result = [] * for x in lst: */ static PyObject *__pyx_pf_6pandas_6parser__ensure_encoded(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_lst) { PyObject *__pyx_v_result = 0; PyObject *__pyx_v_x = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; Py_ssize_t __pyx_t_2; PyObject *__pyx_t_3 = NULL; int __pyx_t_4; int __pyx_t_5; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_ensure_encoded", 0); /* "pandas/parser.pyx":1168 * * def _ensure_encoded(list lst): * cdef list result = [] # <<<<<<<<<<<<<< * for x in lst: * if PyUnicode_Check(x): */ __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1168; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_v_result = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/parser.pyx":1169 * def _ensure_encoded(list lst): * cdef list result = [] * for x in lst: # <<<<<<<<<<<<<< * if PyUnicode_Check(x): * x = PyUnicode_AsUTF8String(x) */ if (unlikely(((PyObject *)__pyx_v_lst) == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1169; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_1 = ((PyObject *)__pyx_v_lst); __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0; for (;;) { if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_3 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1169; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1169; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif __Pyx_XDECREF_SET(__pyx_v_x, __pyx_t_3); __pyx_t_3 = 0; /* "pandas/parser.pyx":1170 * cdef list result = [] * for x in lst: * if PyUnicode_Check(x): # <<<<<<<<<<<<<< * x = PyUnicode_AsUTF8String(x) * elif not PyBytes_Check(x): */ __pyx_t_4 = (PyUnicode_Check(__pyx_v_x) != 0); if (__pyx_t_4) { /* "pandas/parser.pyx":1171 * for x in lst: * if PyUnicode_Check(x): * x = PyUnicode_AsUTF8String(x) # <<<<<<<<<<<<<< * elif not PyBytes_Check(x): * x = asbytes(x) */ __pyx_t_3 = PyUnicode_AsUTF8String(__pyx_v_x); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1171; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF_SET(__pyx_v_x, __pyx_t_3); __pyx_t_3 = 0; goto __pyx_L5; } /* "pandas/parser.pyx":1172 * if PyUnicode_Check(x): * x = PyUnicode_AsUTF8String(x) * elif not PyBytes_Check(x): # <<<<<<<<<<<<<< * x = asbytes(x) * */ __pyx_t_4 = ((!(PyBytes_Check(__pyx_v_x) != 0)) != 0); if (__pyx_t_4) { /* "pandas/parser.pyx":1173 * x = PyUnicode_AsUTF8String(x) * elif not PyBytes_Check(x): * x = asbytes(x) # <<<<<<<<<<<<<< * * result.append(x) */ __pyx_t_3 = __pyx_f_6pandas_6parser_asbytes(__pyx_v_x); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1173; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF_SET(__pyx_v_x, __pyx_t_3); __pyx_t_3 = 0; goto __pyx_L5; } __pyx_L5:; /* "pandas/parser.pyx":1175 * x = asbytes(x) * * result.append(x) # <<<<<<<<<<<<<< * return result * */ __pyx_t_5 = __Pyx_PyList_Append(__pyx_v_result, __pyx_v_x); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1175; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pandas/parser.pyx":1176 * * result.append(x) * return result # <<<<<<<<<<<<<< * * cdef asbytes(object o): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_result)); __pyx_r = ((PyObject *)__pyx_v_result); goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("pandas.parser._ensure_encoded", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_result); __Pyx_XDECREF(__pyx_v_x); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/parser.pyx":1178 * return result * * cdef asbytes(object o): # <<<<<<<<<<<<<< * if PY3: * return str(o).encode('utf-8') */ static PyObject *__pyx_f_6pandas_6parser_asbytes(PyObject *__pyx_v_o) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("asbytes", 0); /* "pandas/parser.pyx":1179 * * cdef asbytes(object o): * if PY3: # <<<<<<<<<<<<<< * return str(o).encode('utf-8') * else: */ __pyx_t_1 = (__pyx_v_6pandas_6parser_PY3 != 0); if (__pyx_t_1) { /* "pandas/parser.pyx":1180 * cdef asbytes(object o): * if PY3: * return str(o).encode('utf-8') # <<<<<<<<<<<<<< * else: * return str(o) */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1180; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_o); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_o); __Pyx_GIVEREF(__pyx_v_o); __pyx_t_3 = PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1180; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s__encode); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1180; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_k_tuple_75), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1180; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; goto __pyx_L3; } /*else*/ { /* "pandas/parser.pyx":1182 * return str(o).encode('utf-8') * else: * return str(o) # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1182; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_v_o); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_o); __Pyx_GIVEREF(__pyx_v_o); __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1182; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; } __pyx_L3:; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("pandas.parser.asbytes", __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_6parser_3_is_file_like(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_6parser_3_is_file_like = {__Pyx_NAMESTR("_is_file_like"), (PyCFunction)__pyx_pw_6pandas_6parser_3_is_file_like, METH_O, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_6parser_3_is_file_like(PyObject *__pyx_self, PyObject *__pyx_v_obj) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_is_file_like (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_6parser_2_is_file_like(__pyx_self, ((PyObject *)__pyx_v_obj)); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/parser.pyx":1185 * * * def _is_file_like(obj): # <<<<<<<<<<<<<< * if PY3: * import io */ static PyObject *__pyx_pf_6pandas_6parser_2_is_file_like(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) { PyObject *__pyx_v_io = NULL; PyObject *__pyx_v_file = NULL; PyObject *__pyx_v___builtin__ = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_is_file_like", 0); /* "pandas/parser.pyx":1186 * * def _is_file_like(obj): * if PY3: # <<<<<<<<<<<<<< * import io * if isinstance(obj, io.TextIOWrapper): */ __pyx_t_1 = (__pyx_v_6pandas_6parser_PY3 != 0); if (__pyx_t_1) { /* "pandas/parser.pyx":1187 * def _is_file_like(obj): * if PY3: * import io # <<<<<<<<<<<<<< * if isinstance(obj, io.TextIOWrapper): * raise CParserError('Cannot handle open unicode files (yet)') */ __pyx_t_2 = __Pyx_Import(((PyObject *)__pyx_n_s__io), 0, -1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1187; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_v_io = __pyx_t_2; __pyx_t_2 = 0; /* "pandas/parser.pyx":1188 * if PY3: * import io * if isinstance(obj, io.TextIOWrapper): # <<<<<<<<<<<<<< * raise CParserError('Cannot handle open unicode files (yet)') * */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_io, __pyx_n_s__TextIOWrapper); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1188; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = PyObject_IsInstance(__pyx_v_obj, __pyx_t_2); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1188; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_3 = (__pyx_t_1 != 0); if (__pyx_t_3) { /* "pandas/parser.pyx":1189 * import io * if isinstance(obj, io.TextIOWrapper): * raise CParserError('Cannot handle open unicode files (yet)') # <<<<<<<<<<<<<< * * # BufferedReader is a byte reader for Python 3 */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__CParserError); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1189; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_k_tuple_77), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1189; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_Raise(__pyx_t_4, 0, 0, 0); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1189; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L4; } __pyx_L4:; /* "pandas/parser.pyx":1192 * * # BufferedReader is a byte reader for Python 3 * file = io.BufferedReader # <<<<<<<<<<<<<< * else: * import __builtin__ */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_io, __pyx_n_s__BufferedReader); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1192; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_v_file = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L3; } /*else*/ { /* "pandas/parser.pyx":1194 * file = io.BufferedReader * else: * import __builtin__ # <<<<<<<<<<<<<< * file = __builtin__.file * */ __pyx_t_4 = __Pyx_Import(((PyObject *)__pyx_n_s____builtin__), 0, -1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1194; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_v___builtin__ = __pyx_t_4; __pyx_t_4 = 0; /* "pandas/parser.pyx":1195 * else: * import __builtin__ * file = __builtin__.file # <<<<<<<<<<<<<< * * return isinstance(obj, (basestring, file)) */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v___builtin__, __pyx_n_s__file); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1195; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_v_file = __pyx_t_4; __pyx_t_4 = 0; } __pyx_L3:; /* "pandas/parser.pyx":1197 * file = __builtin__.file * * return isinstance(obj, (basestring, file)) # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s__basestring); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1197; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1197; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __Pyx_INCREF(__pyx_v_file); PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_file); __Pyx_GIVEREF(__pyx_v_file); __pyx_t_4 = 0; __pyx_t_3 = PyObject_IsInstance(__pyx_v_obj, ((PyObject *)__pyx_t_2)); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1197; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1197; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("pandas.parser._is_file_like", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_io); __Pyx_XDECREF(__pyx_v_file); __Pyx_XDECREF(__pyx_v___builtin__); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_6parser_5_maybe_upcast(PyObject *__pyx_self, PyObject *__pyx_v_arr); /*proto*/ static char __pyx_doc_6pandas_6parser_4_maybe_upcast[] = "\n\n "; static PyMethodDef __pyx_mdef_6pandas_6parser_5_maybe_upcast = {__Pyx_NAMESTR("_maybe_upcast"), (PyCFunction)__pyx_pw_6pandas_6parser_5_maybe_upcast, METH_O, __Pyx_DOCSTR(__pyx_doc_6pandas_6parser_4_maybe_upcast)}; static PyObject *__pyx_pw_6pandas_6parser_5_maybe_upcast(PyObject *__pyx_self, PyObject *__pyx_v_arr) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_maybe_upcast (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_6parser_4_maybe_upcast(__pyx_self, ((PyObject *)__pyx_v_arr)); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/parser.pyx":1200 * * * def _maybe_upcast(arr): # <<<<<<<<<<<<<< * """ * */ static PyObject *__pyx_pf_6pandas_6parser_4_maybe_upcast(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_arr) { PyObject *__pyx_v_na_value = NULL; PyObject *__pyx_v_mask = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_t_4; int __pyx_t_5; PyObject *__pyx_t_6 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_maybe_upcast", 0); __Pyx_INCREF(__pyx_v_arr); /* "pandas/parser.pyx":1204 * * """ * if issubclass(arr.dtype.type, np.integer): # <<<<<<<<<<<<<< * na_value = na_values[arr.dtype] * arr = arr.astype(float) */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_arr, __pyx_n_s__dtype); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1204; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s__type); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1204; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1204; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s__integer); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1204; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_4 = PyObject_IsSubclass(__pyx_t_2, __pyx_t_3); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1204; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_5 = (__pyx_t_4 != 0); if (__pyx_t_5) { /* "pandas/parser.pyx":1205 * """ * if issubclass(arr.dtype.type, np.integer): * na_value = na_values[arr.dtype] # <<<<<<<<<<<<<< * arr = arr.astype(float) * np.putmask(arr, arr == na_value, np.nan) */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s__na_values); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1205; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_arr, __pyx_n_s__dtype); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1205; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = PyObject_GetItem(__pyx_t_3, __pyx_t_2); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1205; __pyx_clineno = __LINE__; goto __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_v_na_value = __pyx_t_1; __pyx_t_1 = 0; /* "pandas/parser.pyx":1206 * if issubclass(arr.dtype.type, np.integer): * na_value = na_values[arr.dtype] * arr = arr.astype(float) # <<<<<<<<<<<<<< * np.putmask(arr, arr == na_value, np.nan) * elif arr.dtype == np.bool_: */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_arr, __pyx_n_s__astype); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1206; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1206; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(((PyObject *)((PyObject*)(&PyFloat_Type)))); PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)((PyObject*)(&PyFloat_Type)))); __Pyx_GIVEREF(((PyObject *)((PyObject*)(&PyFloat_Type)))); __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1206; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __Pyx_DECREF_SET(__pyx_v_arr, __pyx_t_3); __pyx_t_3 = 0; /* "pandas/parser.pyx":1207 * na_value = na_values[arr.dtype] * arr = arr.astype(float) * np.putmask(arr, arr == na_value, np.nan) # <<<<<<<<<<<<<< * elif arr.dtype == np.bool_: * mask = arr.view(np.uint8) == na_values[np.uint8] */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1207; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s__putmask); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1207; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyObject_RichCompare(__pyx_v_arr, __pyx_v_na_value, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1207; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1207; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s__nan); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1207; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1207; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_arr); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_arr); __Pyx_GIVEREF(__pyx_v_arr); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_6); __pyx_t_3 = 0; __pyx_t_6 = 0; __pyx_t_6 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1207; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; goto __pyx_L3; } /* "pandas/parser.pyx":1208 * arr = arr.astype(float) * np.putmask(arr, arr == na_value, np.nan) * elif arr.dtype == np.bool_: # <<<<<<<<<<<<<< * mask = arr.view(np.uint8) == na_values[np.uint8] * arr = arr.astype(object) */ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_arr, __pyx_n_s__dtype); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1208; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1208; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s__bool_); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1208; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyObject_RichCompare(__pyx_t_6, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1208; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1208; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_5) { /* "pandas/parser.pyx":1209 * np.putmask(arr, arr == na_value, np.nan) * elif arr.dtype == np.bool_: * mask = arr.view(np.uint8) == na_values[np.uint8] # <<<<<<<<<<<<<< * arr = arr.astype(object) * np.putmask(arr, mask, np.nan) */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_arr, __pyx_n_s__view); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1209; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1209; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__uint8); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1209; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1209; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1209; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__na_values); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1209; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1209; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s__uint8); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1209; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyObject_GetItem(__pyx_t_2, __pyx_t_3); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1209; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyObject_RichCompare(__pyx_t_6, __pyx_t_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1209; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_mask = __pyx_t_3; __pyx_t_3 = 0; /* "pandas/parser.pyx":1210 * elif arr.dtype == np.bool_: * mask = arr.view(np.uint8) == na_values[np.uint8] * arr = arr.astype(object) # <<<<<<<<<<<<<< * np.putmask(arr, mask, np.nan) * */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_arr, __pyx_n_s__astype); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1210; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1210; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_builtin_object); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_builtin_object); __Pyx_GIVEREF(__pyx_builtin_object); __pyx_t_6 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1210; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __Pyx_DECREF_SET(__pyx_v_arr, __pyx_t_6); __pyx_t_6 = 0; /* "pandas/parser.pyx":1211 * mask = arr.view(np.uint8) == na_values[np.uint8] * arr = arr.astype(object) * np.putmask(arr, mask, np.nan) # <<<<<<<<<<<<<< * * return arr */ __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1211; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s__putmask); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1211; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1211; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s__nan); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1211; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1211; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(__pyx_v_arr); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_arr); __Pyx_GIVEREF(__pyx_v_arr); __Pyx_INCREF(__pyx_v_mask); PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_v_mask); __Pyx_GIVEREF(__pyx_v_mask); PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1211; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L3; } __pyx_L3:; /* "pandas/parser.pyx":1213 * np.putmask(arr, mask, np.nan) * * return arr # <<<<<<<<<<<<<< * * # ---------------------------------------------------------------------- */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_arr); __pyx_r = __pyx_v_arr; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("pandas.parser._maybe_upcast", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_na_value); __Pyx_XDECREF(__pyx_v_mask); __Pyx_XDECREF(__pyx_v_arr); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/parser.pyx":1218 * # Type conversions / inference support code * * cdef _string_box_factorize(parser_t *parser, int col, # <<<<<<<<<<<<<< * int line_start, int line_end, * bint na_filter, kh_str_t *na_hashset): */ static PyObject *__pyx_f_6pandas_6parser__string_box_factorize(parser_t *__pyx_v_parser, int __pyx_v_col, int __pyx_v_line_start, int __pyx_v_line_end, int __pyx_v_na_filter, kh_str_t *__pyx_v_na_hashset) { int __pyx_v_na_count; Py_ssize_t __pyx_v_i; size_t __pyx_v_lines; coliter_t __pyx_v_it; char *__pyx_v_word; PyArrayObject *__pyx_v_result = 0; int __pyx_v_ret; kh_strbox_t *__pyx_v_table; PyObject *__pyx_v_pyval = 0; PyObject *__pyx_v_NA = 0; khiter_t __pyx_v_k; __Pyx_LocalBuf_ND __pyx_pybuffernd_result; __Pyx_Buffer __pyx_pybuffer_result; 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; size_t __pyx_t_11; Py_ssize_t __pyx_t_12; int __pyx_t_13; Py_ssize_t __pyx_t_14; PyObject **__pyx_t_15; Py_ssize_t __pyx_t_16; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_string_box_factorize", 0); __pyx_pybuffer_result.pybuffer.buf = NULL; __pyx_pybuffer_result.refcount = 0; __pyx_pybuffernd_result.data = NULL; __pyx_pybuffernd_result.rcbuffer = &__pyx_pybuffer_result; /* "pandas/parser.pyx":1222 * bint na_filter, kh_str_t *na_hashset): * cdef: * int error, na_count = 0 # <<<<<<<<<<<<<< * Py_ssize_t i * size_t lines */ __pyx_v_na_count = 0; /* "pandas/parser.pyx":1229 * ndarray[object] result * * int ret = 0 # <<<<<<<<<<<<<< * kh_strbox_t *table * */ __pyx_v_ret = 0; /* "pandas/parser.pyx":1234 * object pyval * * object NA = na_values[np.object_] # <<<<<<<<<<<<<< * khiter_t k * */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__na_values); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1234; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1234; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__object_); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1234; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_GetItem(__pyx_t_1, __pyx_t_3); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1234; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_NA = __pyx_t_2; __pyx_t_2 = 0; /* "pandas/parser.pyx":1237 * khiter_t k * * table = kh_init_strbox() # <<<<<<<<<<<<<< * lines = line_end - line_start * result = np.empty(lines, dtype=np.object_) */ __pyx_v_table = kh_init_strbox(); /* "pandas/parser.pyx":1238 * * table = kh_init_strbox() * lines = line_end - line_start # <<<<<<<<<<<<<< * result = np.empty(lines, dtype=np.object_) * coliter_setup(&it, parser, col, line_start) */ __pyx_v_lines = (__pyx_v_line_end - __pyx_v_line_start); /* "pandas/parser.pyx":1239 * table = kh_init_strbox() * lines = line_end - line_start * result = np.empty(lines, dtype=np.object_) # <<<<<<<<<<<<<< * coliter_setup(&it, parser, col, line_start) * */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1239; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 1239; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyInt_FromSize_t(__pyx_v_lines); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1239; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1239; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1239; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_2)); __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1239; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s__object_); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1239; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__dtype), __pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1239; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_1), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1239; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1239; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_6 = ((PyArrayObject *)__pyx_t_5); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_object, 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_result.rcbuffer->pybuffer, (PyObject*)__pyx_v_result, &__Pyx_TypeInfo_object, 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_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_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1239; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_6 = 0; __pyx_v_result = ((PyArrayObject *)__pyx_t_5); __pyx_t_5 = 0; /* "pandas/parser.pyx":1240 * lines = line_end - line_start * result = np.empty(lines, dtype=np.object_) * coliter_setup(&it, parser, col, line_start) # <<<<<<<<<<<<<< * * for i in range(lines): */ coliter_setup((&__pyx_v_it), __pyx_v_parser, __pyx_v_col, __pyx_v_line_start); /* "pandas/parser.pyx":1242 * coliter_setup(&it, parser, col, line_start) * * for i in range(lines): # <<<<<<<<<<<<<< * word = COLITER_NEXT(it) * */ __pyx_t_11 = __pyx_v_lines; for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_11; __pyx_t_12+=1) { __pyx_v_i = __pyx_t_12; /* "pandas/parser.pyx":1243 * * for i in range(lines): * word = COLITER_NEXT(it) # <<<<<<<<<<<<<< * * if na_filter: */ __pyx_v_word = COLITER_NEXT(__pyx_v_it); /* "pandas/parser.pyx":1245 * word = COLITER_NEXT(it) * * if na_filter: # <<<<<<<<<<<<<< * k = kh_get_str(na_hashset, word) * # in the hash table */ __pyx_t_13 = (__pyx_v_na_filter != 0); if (__pyx_t_13) { /* "pandas/parser.pyx":1246 * * if na_filter: * k = kh_get_str(na_hashset, word) # <<<<<<<<<<<<<< * # in the hash table * if k != na_hashset.n_buckets: */ __pyx_v_k = kh_get_str(__pyx_v_na_hashset, __pyx_v_word); /* "pandas/parser.pyx":1248 * k = kh_get_str(na_hashset, word) * # in the hash table * if k != na_hashset.n_buckets: # <<<<<<<<<<<<<< * na_count += 1 * result[i] = NA */ __pyx_t_13 = ((__pyx_v_k != __pyx_v_na_hashset->n_buckets) != 0); if (__pyx_t_13) { /* "pandas/parser.pyx":1249 * # in the hash table * if k != na_hashset.n_buckets: * na_count += 1 # <<<<<<<<<<<<<< * result[i] = NA * continue */ __pyx_v_na_count = (__pyx_v_na_count + 1); /* "pandas/parser.pyx":1250 * if k != na_hashset.n_buckets: * na_count += 1 * result[i] = NA # <<<<<<<<<<<<<< * continue * */ __pyx_t_14 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_14 < 0) { __pyx_t_14 += __pyx_pybuffernd_result.diminfo[0].shape; if (unlikely(__pyx_t_14 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_14 >= __pyx_pybuffernd_result.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1250; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_15 = __Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_result.diminfo[0].strides); __Pyx_GOTREF(*__pyx_t_15); __Pyx_INCREF(__pyx_v_NA); __Pyx_DECREF(*__pyx_t_15); *__pyx_t_15 = __pyx_v_NA; __Pyx_GIVEREF(*__pyx_t_15); /* "pandas/parser.pyx":1251 * na_count += 1 * result[i] = NA * continue # <<<<<<<<<<<<<< * * k = kh_get_strbox(table, word) */ goto __pyx_L3_continue; goto __pyx_L6; } __pyx_L6:; goto __pyx_L5; } __pyx_L5:; /* "pandas/parser.pyx":1253 * continue * * k = kh_get_strbox(table, word) # <<<<<<<<<<<<<< * * # in the hash table */ __pyx_v_k = kh_get_strbox(__pyx_v_table, __pyx_v_word); /* "pandas/parser.pyx":1256 * * # in the hash table * if k != table.n_buckets: # <<<<<<<<<<<<<< * # this increments the refcount, but need to test * pyval = table.vals[k] */ __pyx_t_13 = ((__pyx_v_k != __pyx_v_table->n_buckets) != 0); if (__pyx_t_13) { /* "pandas/parser.pyx":1258 * if k != table.n_buckets: * # this increments the refcount, but need to test * pyval = table.vals[k] # <<<<<<<<<<<<<< * else: * # box it. new ref? */ __Pyx_INCREF(((PyObject *)(__pyx_v_table->vals[__pyx_v_k]))); __Pyx_XDECREF_SET(__pyx_v_pyval, ((PyObject *)(__pyx_v_table->vals[__pyx_v_k]))); goto __pyx_L7; } /*else*/ { /* "pandas/parser.pyx":1261 * else: * # box it. new ref? * pyval = PyBytes_FromString(word) # <<<<<<<<<<<<<< * * k = kh_put_strbox(table, word, &ret) */ __pyx_t_5 = ((PyObject *)PyBytes_FromString(__pyx_v_word)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1261; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_XDECREF_SET(__pyx_v_pyval, __pyx_t_5); __pyx_t_5 = 0; /* "pandas/parser.pyx":1263 * pyval = PyBytes_FromString(word) * * k = kh_put_strbox(table, word, &ret) # <<<<<<<<<<<<<< * table.vals[k] = pyval * */ __pyx_v_k = kh_put_strbox(__pyx_v_table, __pyx_v_word, (&__pyx_v_ret)); /* "pandas/parser.pyx":1264 * * k = kh_put_strbox(table, word, &ret) * table.vals[k] = pyval # <<<<<<<<<<<<<< * * result[i] = pyval */ (__pyx_v_table->vals[__pyx_v_k]) = ((PyObject *)__pyx_v_pyval); } __pyx_L7:; /* "pandas/parser.pyx":1266 * table.vals[k] = pyval * * result[i] = pyval # <<<<<<<<<<<<<< * * kh_destroy_strbox(table) */ __pyx_t_16 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_16 < 0) { __pyx_t_16 += __pyx_pybuffernd_result.diminfo[0].shape; if (unlikely(__pyx_t_16 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_16 >= __pyx_pybuffernd_result.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1266; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_15 = __Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_result.diminfo[0].strides); __Pyx_GOTREF(*__pyx_t_15); __Pyx_INCREF(__pyx_v_pyval); __Pyx_DECREF(*__pyx_t_15); *__pyx_t_15 = __pyx_v_pyval; __Pyx_GIVEREF(*__pyx_t_15); __pyx_L3_continue:; } /* "pandas/parser.pyx":1268 * result[i] = pyval * * kh_destroy_strbox(table) # <<<<<<<<<<<<<< * * return result, na_count */ kh_destroy_strbox(__pyx_v_table); /* "pandas/parser.pyx":1270 * kh_destroy_strbox(table) * * return result, na_count # <<<<<<<<<<<<<< * * cdef _string_box_utf8(parser_t *parser, int col, */ __Pyx_XDECREF(__pyx_r); __pyx_t_5 = PyInt_FromLong(__pyx_v_na_count); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1270; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1270; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(((PyObject *)__pyx_v_result)); PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_result)); __Pyx_GIVEREF(((PyObject *)__pyx_v_result)); PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_r = ((PyObject *)__pyx_t_2); __pyx_t_2 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.parser._string_box_factorize", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_result); __Pyx_XDECREF(__pyx_v_pyval); __Pyx_XDECREF(__pyx_v_NA); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/parser.pyx":1272 * return result, na_count * * cdef _string_box_utf8(parser_t *parser, int col, # <<<<<<<<<<<<<< * int line_start, int line_end, * bint na_filter, kh_str_t *na_hashset): */ static PyObject *__pyx_f_6pandas_6parser__string_box_utf8(parser_t *__pyx_v_parser, int __pyx_v_col, int __pyx_v_line_start, int __pyx_v_line_end, int __pyx_v_na_filter, kh_str_t *__pyx_v_na_hashset) { int __pyx_v_na_count; Py_ssize_t __pyx_v_i; size_t __pyx_v_lines; coliter_t __pyx_v_it; char *__pyx_v_word; PyArrayObject *__pyx_v_result = 0; int __pyx_v_ret; kh_strbox_t *__pyx_v_table; PyObject *__pyx_v_pyval = 0; PyObject *__pyx_v_NA = 0; khiter_t __pyx_v_k; __Pyx_LocalBuf_ND __pyx_pybuffernd_result; __Pyx_Buffer __pyx_pybuffer_result; 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; size_t __pyx_t_11; Py_ssize_t __pyx_t_12; int __pyx_t_13; Py_ssize_t __pyx_t_14; PyObject **__pyx_t_15; Py_ssize_t __pyx_t_16; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_string_box_utf8", 0); __pyx_pybuffer_result.pybuffer.buf = NULL; __pyx_pybuffer_result.refcount = 0; __pyx_pybuffernd_result.data = NULL; __pyx_pybuffernd_result.rcbuffer = &__pyx_pybuffer_result; /* "pandas/parser.pyx":1276 * bint na_filter, kh_str_t *na_hashset): * cdef: * int error, na_count = 0 # <<<<<<<<<<<<<< * Py_ssize_t i * size_t lines */ __pyx_v_na_count = 0; /* "pandas/parser.pyx":1283 * ndarray[object] result * * int ret = 0 # <<<<<<<<<<<<<< * kh_strbox_t *table * */ __pyx_v_ret = 0; /* "pandas/parser.pyx":1288 * object pyval * * object NA = na_values[np.object_] # <<<<<<<<<<<<<< * khiter_t k * */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__na_values); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1288; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1288; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__object_); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1288; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_GetItem(__pyx_t_1, __pyx_t_3); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1288; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_NA = __pyx_t_2; __pyx_t_2 = 0; /* "pandas/parser.pyx":1291 * khiter_t k * * table = kh_init_strbox() # <<<<<<<<<<<<<< * lines = line_end - line_start * result = np.empty(lines, dtype=np.object_) */ __pyx_v_table = kh_init_strbox(); /* "pandas/parser.pyx":1292 * * table = kh_init_strbox() * lines = line_end - line_start # <<<<<<<<<<<<<< * result = np.empty(lines, dtype=np.object_) * coliter_setup(&it, parser, col, line_start) */ __pyx_v_lines = (__pyx_v_line_end - __pyx_v_line_start); /* "pandas/parser.pyx":1293 * table = kh_init_strbox() * lines = line_end - line_start * result = np.empty(lines, dtype=np.object_) # <<<<<<<<<<<<<< * coliter_setup(&it, parser, col, line_start) * */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1293; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 1293; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyInt_FromSize_t(__pyx_v_lines); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1293; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1293; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1293; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_2)); __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1293; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s__object_); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1293; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__dtype), __pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1293; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_1), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1293; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1293; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_6 = ((PyArrayObject *)__pyx_t_5); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_object, 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_result.rcbuffer->pybuffer, (PyObject*)__pyx_v_result, &__Pyx_TypeInfo_object, 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_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_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1293; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_6 = 0; __pyx_v_result = ((PyArrayObject *)__pyx_t_5); __pyx_t_5 = 0; /* "pandas/parser.pyx":1294 * lines = line_end - line_start * result = np.empty(lines, dtype=np.object_) * coliter_setup(&it, parser, col, line_start) # <<<<<<<<<<<<<< * * for i in range(lines): */ coliter_setup((&__pyx_v_it), __pyx_v_parser, __pyx_v_col, __pyx_v_line_start); /* "pandas/parser.pyx":1296 * coliter_setup(&it, parser, col, line_start) * * for i in range(lines): # <<<<<<<<<<<<<< * word = COLITER_NEXT(it) * */ __pyx_t_11 = __pyx_v_lines; for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_11; __pyx_t_12+=1) { __pyx_v_i = __pyx_t_12; /* "pandas/parser.pyx":1297 * * for i in range(lines): * word = COLITER_NEXT(it) # <<<<<<<<<<<<<< * * if na_filter: */ __pyx_v_word = COLITER_NEXT(__pyx_v_it); /* "pandas/parser.pyx":1299 * word = COLITER_NEXT(it) * * if na_filter: # <<<<<<<<<<<<<< * k = kh_get_str(na_hashset, word) * # in the hash table */ __pyx_t_13 = (__pyx_v_na_filter != 0); if (__pyx_t_13) { /* "pandas/parser.pyx":1300 * * if na_filter: * k = kh_get_str(na_hashset, word) # <<<<<<<<<<<<<< * # in the hash table * if k != na_hashset.n_buckets: */ __pyx_v_k = kh_get_str(__pyx_v_na_hashset, __pyx_v_word); /* "pandas/parser.pyx":1302 * k = kh_get_str(na_hashset, word) * # in the hash table * if k != na_hashset.n_buckets: # <<<<<<<<<<<<<< * na_count += 1 * result[i] = NA */ __pyx_t_13 = ((__pyx_v_k != __pyx_v_na_hashset->n_buckets) != 0); if (__pyx_t_13) { /* "pandas/parser.pyx":1303 * # in the hash table * if k != na_hashset.n_buckets: * na_count += 1 # <<<<<<<<<<<<<< * result[i] = NA * continue */ __pyx_v_na_count = (__pyx_v_na_count + 1); /* "pandas/parser.pyx":1304 * if k != na_hashset.n_buckets: * na_count += 1 * result[i] = NA # <<<<<<<<<<<<<< * continue * */ __pyx_t_14 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_14 < 0) { __pyx_t_14 += __pyx_pybuffernd_result.diminfo[0].shape; if (unlikely(__pyx_t_14 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_14 >= __pyx_pybuffernd_result.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1304; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_15 = __Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_result.diminfo[0].strides); __Pyx_GOTREF(*__pyx_t_15); __Pyx_INCREF(__pyx_v_NA); __Pyx_DECREF(*__pyx_t_15); *__pyx_t_15 = __pyx_v_NA; __Pyx_GIVEREF(*__pyx_t_15); /* "pandas/parser.pyx":1305 * na_count += 1 * result[i] = NA * continue # <<<<<<<<<<<<<< * * k = kh_get_strbox(table, word) */ goto __pyx_L3_continue; goto __pyx_L6; } __pyx_L6:; goto __pyx_L5; } __pyx_L5:; /* "pandas/parser.pyx":1307 * continue * * k = kh_get_strbox(table, word) # <<<<<<<<<<<<<< * * # in the hash table */ __pyx_v_k = kh_get_strbox(__pyx_v_table, __pyx_v_word); /* "pandas/parser.pyx":1310 * * # in the hash table * if k != table.n_buckets: # <<<<<<<<<<<<<< * # this increments the refcount, but need to test * pyval = table.vals[k] */ __pyx_t_13 = ((__pyx_v_k != __pyx_v_table->n_buckets) != 0); if (__pyx_t_13) { /* "pandas/parser.pyx":1312 * if k != table.n_buckets: * # this increments the refcount, but need to test * pyval = table.vals[k] # <<<<<<<<<<<<<< * else: * # box it. new ref? */ __Pyx_INCREF(((PyObject *)(__pyx_v_table->vals[__pyx_v_k]))); __Pyx_XDECREF_SET(__pyx_v_pyval, ((PyObject *)(__pyx_v_table->vals[__pyx_v_k]))); goto __pyx_L7; } /*else*/ { /* "pandas/parser.pyx":1315 * else: * # box it. new ref? * pyval = PyUnicode_FromString(word) # <<<<<<<<<<<<<< * * k = kh_put_strbox(table, word, &ret) */ __pyx_t_5 = PyUnicode_FromString(__pyx_v_word); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1315; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_XDECREF_SET(__pyx_v_pyval, __pyx_t_5); __pyx_t_5 = 0; /* "pandas/parser.pyx":1317 * pyval = PyUnicode_FromString(word) * * k = kh_put_strbox(table, word, &ret) # <<<<<<<<<<<<<< * table.vals[k] = pyval * */ __pyx_v_k = kh_put_strbox(__pyx_v_table, __pyx_v_word, (&__pyx_v_ret)); /* "pandas/parser.pyx":1318 * * k = kh_put_strbox(table, word, &ret) * table.vals[k] = pyval # <<<<<<<<<<<<<< * * result[i] = pyval */ (__pyx_v_table->vals[__pyx_v_k]) = ((PyObject *)__pyx_v_pyval); } __pyx_L7:; /* "pandas/parser.pyx":1320 * table.vals[k] = pyval * * result[i] = pyval # <<<<<<<<<<<<<< * * kh_destroy_strbox(table) */ __pyx_t_16 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_16 < 0) { __pyx_t_16 += __pyx_pybuffernd_result.diminfo[0].shape; if (unlikely(__pyx_t_16 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_16 >= __pyx_pybuffernd_result.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1320; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_15 = __Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_result.diminfo[0].strides); __Pyx_GOTREF(*__pyx_t_15); __Pyx_INCREF(__pyx_v_pyval); __Pyx_DECREF(*__pyx_t_15); *__pyx_t_15 = __pyx_v_pyval; __Pyx_GIVEREF(*__pyx_t_15); __pyx_L3_continue:; } /* "pandas/parser.pyx":1322 * result[i] = pyval * * kh_destroy_strbox(table) # <<<<<<<<<<<<<< * * return result, na_count */ kh_destroy_strbox(__pyx_v_table); /* "pandas/parser.pyx":1324 * kh_destroy_strbox(table) * * return result, na_count # <<<<<<<<<<<<<< * * cdef _string_box_decode(parser_t *parser, int col, */ __Pyx_XDECREF(__pyx_r); __pyx_t_5 = PyInt_FromLong(__pyx_v_na_count); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1324; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1324; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(((PyObject *)__pyx_v_result)); PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_result)); __Pyx_GIVEREF(((PyObject *)__pyx_v_result)); PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_r = ((PyObject *)__pyx_t_2); __pyx_t_2 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.parser._string_box_utf8", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_result); __Pyx_XDECREF(__pyx_v_pyval); __Pyx_XDECREF(__pyx_v_NA); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/parser.pyx":1326 * return result, na_count * * cdef _string_box_decode(parser_t *parser, int col, # <<<<<<<<<<<<<< * int line_start, int line_end, * bint na_filter, kh_str_t *na_hashset, */ static PyObject *__pyx_f_6pandas_6parser__string_box_decode(parser_t *__pyx_v_parser, int __pyx_v_col, int __pyx_v_line_start, int __pyx_v_line_end, int __pyx_v_na_filter, kh_str_t *__pyx_v_na_hashset, char *__pyx_v_encoding) { int __pyx_v_na_count; Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_size; size_t __pyx_v_lines; coliter_t __pyx_v_it; char *__pyx_v_word; PyArrayObject *__pyx_v_result = 0; int __pyx_v_ret; kh_strbox_t *__pyx_v_table; char *__pyx_v_errors; PyObject *__pyx_v_pyval = 0; PyObject *__pyx_v_NA = 0; khiter_t __pyx_v_k; __Pyx_LocalBuf_ND __pyx_pybuffernd_result; __Pyx_Buffer __pyx_pybuffer_result; 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; size_t __pyx_t_11; Py_ssize_t __pyx_t_12; int __pyx_t_13; Py_ssize_t __pyx_t_14; PyObject **__pyx_t_15; Py_ssize_t __pyx_t_16; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_string_box_decode", 0); __pyx_pybuffer_result.pybuffer.buf = NULL; __pyx_pybuffer_result.refcount = 0; __pyx_pybuffernd_result.data = NULL; __pyx_pybuffernd_result.rcbuffer = &__pyx_pybuffer_result; /* "pandas/parser.pyx":1331 * char *encoding): * cdef: * int error, na_count = 0 # <<<<<<<<<<<<<< * Py_ssize_t i, size * size_t lines */ __pyx_v_na_count = 0; /* "pandas/parser.pyx":1338 * ndarray[object] result * * int ret = 0 # <<<<<<<<<<<<<< * kh_strbox_t *table * */ __pyx_v_ret = 0; /* "pandas/parser.pyx":1341 * kh_strbox_t *table * * char *errors = "strict" # <<<<<<<<<<<<<< * * object pyval */ __pyx_v_errors = __pyx_k__strict; /* "pandas/parser.pyx":1345 * object pyval * * object NA = na_values[np.object_] # <<<<<<<<<<<<<< * khiter_t k * */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__na_values); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1345; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1345; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__object_); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1345; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_GetItem(__pyx_t_1, __pyx_t_3); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1345; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_NA = __pyx_t_2; __pyx_t_2 = 0; /* "pandas/parser.pyx":1348 * khiter_t k * * table = kh_init_strbox() # <<<<<<<<<<<<<< * lines = line_end - line_start * result = np.empty(lines, dtype=np.object_) */ __pyx_v_table = kh_init_strbox(); /* "pandas/parser.pyx":1349 * * table = kh_init_strbox() * lines = line_end - line_start # <<<<<<<<<<<<<< * result = np.empty(lines, dtype=np.object_) * coliter_setup(&it, parser, col, line_start) */ __pyx_v_lines = (__pyx_v_line_end - __pyx_v_line_start); /* "pandas/parser.pyx":1350 * table = kh_init_strbox() * lines = line_end - line_start * result = np.empty(lines, dtype=np.object_) # <<<<<<<<<<<<<< * coliter_setup(&it, parser, col, line_start) * */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1350; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 1350; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyInt_FromSize_t(__pyx_v_lines); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1350; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1350; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1350; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_2)); __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1350; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s__object_); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1350; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__dtype), __pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1350; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_1), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1350; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1350; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_6 = ((PyArrayObject *)__pyx_t_5); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_object, 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_result.rcbuffer->pybuffer, (PyObject*)__pyx_v_result, &__Pyx_TypeInfo_object, 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_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_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1350; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_6 = 0; __pyx_v_result = ((PyArrayObject *)__pyx_t_5); __pyx_t_5 = 0; /* "pandas/parser.pyx":1351 * lines = line_end - line_start * result = np.empty(lines, dtype=np.object_) * coliter_setup(&it, parser, col, line_start) # <<<<<<<<<<<<<< * * for i in range(lines): */ coliter_setup((&__pyx_v_it), __pyx_v_parser, __pyx_v_col, __pyx_v_line_start); /* "pandas/parser.pyx":1353 * coliter_setup(&it, parser, col, line_start) * * for i in range(lines): # <<<<<<<<<<<<<< * word = COLITER_NEXT(it) * */ __pyx_t_11 = __pyx_v_lines; for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_11; __pyx_t_12+=1) { __pyx_v_i = __pyx_t_12; /* "pandas/parser.pyx":1354 * * for i in range(lines): * word = COLITER_NEXT(it) # <<<<<<<<<<<<<< * * if na_filter: */ __pyx_v_word = COLITER_NEXT(__pyx_v_it); /* "pandas/parser.pyx":1356 * word = COLITER_NEXT(it) * * if na_filter: # <<<<<<<<<<<<<< * k = kh_get_str(na_hashset, word) * # in the hash table */ __pyx_t_13 = (__pyx_v_na_filter != 0); if (__pyx_t_13) { /* "pandas/parser.pyx":1357 * * if na_filter: * k = kh_get_str(na_hashset, word) # <<<<<<<<<<<<<< * # in the hash table * if k != na_hashset.n_buckets: */ __pyx_v_k = kh_get_str(__pyx_v_na_hashset, __pyx_v_word); /* "pandas/parser.pyx":1359 * k = kh_get_str(na_hashset, word) * # in the hash table * if k != na_hashset.n_buckets: # <<<<<<<<<<<<<< * na_count += 1 * result[i] = NA */ __pyx_t_13 = ((__pyx_v_k != __pyx_v_na_hashset->n_buckets) != 0); if (__pyx_t_13) { /* "pandas/parser.pyx":1360 * # in the hash table * if k != na_hashset.n_buckets: * na_count += 1 # <<<<<<<<<<<<<< * result[i] = NA * continue */ __pyx_v_na_count = (__pyx_v_na_count + 1); /* "pandas/parser.pyx":1361 * if k != na_hashset.n_buckets: * na_count += 1 * result[i] = NA # <<<<<<<<<<<<<< * continue * */ __pyx_t_14 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_14 < 0) { __pyx_t_14 += __pyx_pybuffernd_result.diminfo[0].shape; if (unlikely(__pyx_t_14 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_14 >= __pyx_pybuffernd_result.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1361; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_15 = __Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_result.diminfo[0].strides); __Pyx_GOTREF(*__pyx_t_15); __Pyx_INCREF(__pyx_v_NA); __Pyx_DECREF(*__pyx_t_15); *__pyx_t_15 = __pyx_v_NA; __Pyx_GIVEREF(*__pyx_t_15); /* "pandas/parser.pyx":1362 * na_count += 1 * result[i] = NA * continue # <<<<<<<<<<<<<< * * k = kh_get_strbox(table, word) */ goto __pyx_L3_continue; goto __pyx_L6; } __pyx_L6:; goto __pyx_L5; } __pyx_L5:; /* "pandas/parser.pyx":1364 * continue * * k = kh_get_strbox(table, word) # <<<<<<<<<<<<<< * * # in the hash table */ __pyx_v_k = kh_get_strbox(__pyx_v_table, __pyx_v_word); /* "pandas/parser.pyx":1367 * * # in the hash table * if k != table.n_buckets: # <<<<<<<<<<<<<< * # this increments the refcount, but need to test * pyval = table.vals[k] */ __pyx_t_13 = ((__pyx_v_k != __pyx_v_table->n_buckets) != 0); if (__pyx_t_13) { /* "pandas/parser.pyx":1369 * if k != table.n_buckets: * # this increments the refcount, but need to test * pyval = table.vals[k] # <<<<<<<<<<<<<< * else: * # box it. new ref? */ __Pyx_INCREF(((PyObject *)(__pyx_v_table->vals[__pyx_v_k]))); __Pyx_XDECREF_SET(__pyx_v_pyval, ((PyObject *)(__pyx_v_table->vals[__pyx_v_k]))); goto __pyx_L7; } /*else*/ { /* "pandas/parser.pyx":1372 * else: * # box it. new ref? * size = strlen(word) # <<<<<<<<<<<<<< * pyval = PyUnicode_Decode(word, size, encoding, errors) * */ __pyx_v_size = strlen(__pyx_v_word); /* "pandas/parser.pyx":1373 * # box it. new ref? * size = strlen(word) * pyval = PyUnicode_Decode(word, size, encoding, errors) # <<<<<<<<<<<<<< * * k = kh_put_strbox(table, word, &ret) */ __pyx_t_5 = PyUnicode_Decode(__pyx_v_word, __pyx_v_size, __pyx_v_encoding, __pyx_v_errors); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1373; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_XDECREF_SET(__pyx_v_pyval, __pyx_t_5); __pyx_t_5 = 0; /* "pandas/parser.pyx":1375 * pyval = PyUnicode_Decode(word, size, encoding, errors) * * k = kh_put_strbox(table, word, &ret) # <<<<<<<<<<<<<< * table.vals[k] = pyval * */ __pyx_v_k = kh_put_strbox(__pyx_v_table, __pyx_v_word, (&__pyx_v_ret)); /* "pandas/parser.pyx":1376 * * k = kh_put_strbox(table, word, &ret) * table.vals[k] = pyval # <<<<<<<<<<<<<< * * result[i] = pyval */ (__pyx_v_table->vals[__pyx_v_k]) = ((PyObject *)__pyx_v_pyval); } __pyx_L7:; /* "pandas/parser.pyx":1378 * table.vals[k] = pyval * * result[i] = pyval # <<<<<<<<<<<<<< * * kh_destroy_strbox(table) */ __pyx_t_16 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_16 < 0) { __pyx_t_16 += __pyx_pybuffernd_result.diminfo[0].shape; if (unlikely(__pyx_t_16 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_16 >= __pyx_pybuffernd_result.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1378; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_15 = __Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_result.diminfo[0].strides); __Pyx_GOTREF(*__pyx_t_15); __Pyx_INCREF(__pyx_v_pyval); __Pyx_DECREF(*__pyx_t_15); *__pyx_t_15 = __pyx_v_pyval; __Pyx_GIVEREF(*__pyx_t_15); __pyx_L3_continue:; } /* "pandas/parser.pyx":1380 * result[i] = pyval * * kh_destroy_strbox(table) # <<<<<<<<<<<<<< * * return result, na_count */ kh_destroy_strbox(__pyx_v_table); /* "pandas/parser.pyx":1382 * kh_destroy_strbox(table) * * return result, na_count # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_5 = PyInt_FromLong(__pyx_v_na_count); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1382; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1382; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(((PyObject *)__pyx_v_result)); PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_result)); __Pyx_GIVEREF(((PyObject *)__pyx_v_result)); PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_r = ((PyObject *)__pyx_t_2); __pyx_t_2 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.parser._string_box_decode", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_result); __Pyx_XDECREF(__pyx_v_pyval); __Pyx_XDECREF(__pyx_v_NA); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/parser.pyx":1385 * * * cdef _to_fw_string(parser_t *parser, int col, int line_start, # <<<<<<<<<<<<<< * int line_end, size_t width): * cdef: */ static PyObject *__pyx_f_6pandas_6parser__to_fw_string(parser_t *__pyx_v_parser, int __pyx_v_col, int __pyx_v_line_start, int __pyx_v_line_end, size_t __pyx_v_width) { CYTHON_UNUSED Py_ssize_t __pyx_v_i; coliter_t __pyx_v_it; char *__pyx_v_word; char *__pyx_v_data; PyArrayObject *__pyx_v_result = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; int __pyx_t_6; Py_ssize_t __pyx_t_7; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_to_fw_string", 0); /* "pandas/parser.pyx":1394 * ndarray result * * result = np.empty(line_end - line_start, dtype='|S%d' % width) # <<<<<<<<<<<<<< * data = result.data * */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1394; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 1394; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyInt_FromLong((__pyx_v_line_end - __pyx_v_line_start)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1394; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1394; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1394; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_t_4 = __Pyx_PyInt_FromSize_t(__pyx_v_width); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1394; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_78), __pyx_t_4); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1394; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_5)); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__dtype), ((PyObject *)__pyx_t_5)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1394; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; __pyx_t_5 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_3), ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1394; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__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_filename = __pyx_f[0]; __pyx_lineno = 1394; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_result = ((PyArrayObject *)__pyx_t_5); __pyx_t_5 = 0; /* "pandas/parser.pyx":1395 * * result = np.empty(line_end - line_start, dtype='|S%d' % width) * data = result.data # <<<<<<<<<<<<<< * * coliter_setup(&it, parser, col, line_start) */ __pyx_v_data = ((char *)__pyx_v_result->data); /* "pandas/parser.pyx":1397 * data = result.data * * coliter_setup(&it, parser, col, line_start) # <<<<<<<<<<<<<< * * for i in range(line_end - line_start): */ coliter_setup((&__pyx_v_it), __pyx_v_parser, __pyx_v_col, __pyx_v_line_start); /* "pandas/parser.pyx":1399 * coliter_setup(&it, parser, col, line_start) * * for i in range(line_end - line_start): # <<<<<<<<<<<<<< * word = COLITER_NEXT(it) * strncpy(data, word, width) */ __pyx_t_6 = (__pyx_v_line_end - __pyx_v_line_start); for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_6; __pyx_t_7+=1) { __pyx_v_i = __pyx_t_7; /* "pandas/parser.pyx":1400 * * for i in range(line_end - line_start): * word = COLITER_NEXT(it) # <<<<<<<<<<<<<< * strncpy(data, word, width) * data += width */ __pyx_v_word = COLITER_NEXT(__pyx_v_it); /* "pandas/parser.pyx":1401 * for i in range(line_end - line_start): * word = COLITER_NEXT(it) * strncpy(data, word, width) # <<<<<<<<<<<<<< * data += width * */ strncpy(__pyx_v_data, __pyx_v_word, __pyx_v_width); /* "pandas/parser.pyx":1402 * word = COLITER_NEXT(it) * strncpy(data, word, width) * data += width # <<<<<<<<<<<<<< * * return result */ __pyx_v_data = (__pyx_v_data + __pyx_v_width); } /* "pandas/parser.pyx":1404 * data += width * * return result # <<<<<<<<<<<<<< * * cdef char* cinf = b'inf' */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_result)); __pyx_r = ((PyObject *)__pyx_v_result); goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("pandas.parser._to_fw_string", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_result); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/parser.pyx":1409 * cdef char* cneginf = b'-inf' * * cdef _try_double(parser_t *parser, int col, int line_start, int line_end, # <<<<<<<<<<<<<< * bint na_filter, kh_str_t *na_hashset, object na_flist): * cdef: */ static PyObject *__pyx_f_6pandas_6parser__try_double(parser_t *__pyx_v_parser, int __pyx_v_col, int __pyx_v_line_start, int __pyx_v_line_end, int __pyx_v_na_filter, kh_str_t *__pyx_v_na_hashset, PyObject *__pyx_v_na_flist) { int __pyx_v_error; int __pyx_v_na_count; CYTHON_UNUSED size_t __pyx_v_i; size_t __pyx_v_lines; coliter_t __pyx_v_it; char *__pyx_v_word; double *__pyx_v_data; double __pyx_v_NA; PyArrayObject *__pyx_v_result = 0; khiter_t __pyx_v_k; int __pyx_v_use_na_flist; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; double __pyx_t_4; Py_ssize_t __pyx_t_5; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; int __pyx_t_8; size_t __pyx_t_9; size_t __pyx_t_10; int __pyx_t_11; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_try_double", 0); /* "pandas/parser.pyx":1412 * bint na_filter, kh_str_t *na_hashset, object na_flist): * cdef: * int error, na_count = 0 # <<<<<<<<<<<<<< * size_t i, lines * coliter_t it */ __pyx_v_na_count = 0; /* "pandas/parser.pyx":1417 * char *word * double *data * double NA = na_values[np.float64] # <<<<<<<<<<<<<< * ndarray result * khiter_t k */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__na_values); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1417; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1417; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__float64); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1417; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_GetItem(__pyx_t_1, __pyx_t_3); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1417; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_4 = __pyx_PyFloat_AsDouble(__pyx_t_2); if (unlikely((__pyx_t_4 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1417; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_NA = __pyx_t_4; /* "pandas/parser.pyx":1420 * ndarray result * khiter_t k * bint use_na_flist = len(na_flist) > 0 # <<<<<<<<<<<<<< * * lines = line_end - line_start */ __pyx_t_5 = PyObject_Length(__pyx_v_na_flist); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1420; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_use_na_flist = (__pyx_t_5 > 0); /* "pandas/parser.pyx":1422 * bint use_na_flist = len(na_flist) > 0 * * lines = line_end - line_start # <<<<<<<<<<<<<< * result = np.empty(lines, dtype=np.float64) * data = result.data */ __pyx_v_lines = (__pyx_v_line_end - __pyx_v_line_start); /* "pandas/parser.pyx":1423 * * lines = line_end - line_start * result = np.empty(lines, dtype=np.float64) # <<<<<<<<<<<<<< * data = result.data * coliter_setup(&it, parser, col, line_start) */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1423; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 1423; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyInt_FromSize_t(__pyx_v_lines); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1423; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1423; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1423; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_2)); __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1423; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s__float64); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1423; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__dtype), __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1423; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_7 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_1), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1423; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; if (!(likely(((__pyx_t_7) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_7, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1423; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_result = ((PyArrayObject *)__pyx_t_7); __pyx_t_7 = 0; /* "pandas/parser.pyx":1424 * lines = line_end - line_start * result = np.empty(lines, dtype=np.float64) * data = result.data # <<<<<<<<<<<<<< * coliter_setup(&it, parser, col, line_start) * */ __pyx_v_data = ((double *)__pyx_v_result->data); /* "pandas/parser.pyx":1425 * result = np.empty(lines, dtype=np.float64) * data = result.data * coliter_setup(&it, parser, col, line_start) # <<<<<<<<<<<<<< * * if na_filter: */ coliter_setup((&__pyx_v_it), __pyx_v_parser, __pyx_v_col, __pyx_v_line_start); /* "pandas/parser.pyx":1427 * coliter_setup(&it, parser, col, line_start) * * if na_filter: # <<<<<<<<<<<<<< * for i in range(lines): * word = COLITER_NEXT(it) */ __pyx_t_8 = (__pyx_v_na_filter != 0); if (__pyx_t_8) { /* "pandas/parser.pyx":1428 * * if na_filter: * for i in range(lines): # <<<<<<<<<<<<<< * word = COLITER_NEXT(it) * */ __pyx_t_9 = __pyx_v_lines; for (__pyx_t_10 = 0; __pyx_t_10 < __pyx_t_9; __pyx_t_10+=1) { __pyx_v_i = __pyx_t_10; /* "pandas/parser.pyx":1429 * if na_filter: * for i in range(lines): * word = COLITER_NEXT(it) # <<<<<<<<<<<<<< * * k = kh_get_str(na_hashset, word) */ __pyx_v_word = COLITER_NEXT(__pyx_v_it); /* "pandas/parser.pyx":1431 * word = COLITER_NEXT(it) * * k = kh_get_str(na_hashset, word) # <<<<<<<<<<<<<< * # in the hash table * if k != na_hashset.n_buckets: */ __pyx_v_k = kh_get_str(__pyx_v_na_hashset, __pyx_v_word); /* "pandas/parser.pyx":1433 * k = kh_get_str(na_hashset, word) * # in the hash table * if k != na_hashset.n_buckets: # <<<<<<<<<<<<<< * na_count += 1 * data[0] = NA */ __pyx_t_8 = ((__pyx_v_k != __pyx_v_na_hashset->n_buckets) != 0); if (__pyx_t_8) { /* "pandas/parser.pyx":1434 * # in the hash table * if k != na_hashset.n_buckets: * na_count += 1 # <<<<<<<<<<<<<< * data[0] = NA * else: */ __pyx_v_na_count = (__pyx_v_na_count + 1); /* "pandas/parser.pyx":1435 * if k != na_hashset.n_buckets: * na_count += 1 * data[0] = NA # <<<<<<<<<<<<<< * else: * error = to_double(word, data, parser.sci, parser.decimal, parser.thousands) */ (__pyx_v_data[0]) = __pyx_v_NA; goto __pyx_L6; } /*else*/ { /* "pandas/parser.pyx":1437 * data[0] = NA * else: * error = to_double(word, data, parser.sci, parser.decimal, parser.thousands) # <<<<<<<<<<<<<< * if error != 1: * if strcasecmp(word, cinf) == 0: */ __pyx_v_error = to_double(__pyx_v_word, __pyx_v_data, __pyx_v_parser->sci, __pyx_v_parser->decimal, __pyx_v_parser->thousands); /* "pandas/parser.pyx":1438 * else: * error = to_double(word, data, parser.sci, parser.decimal, parser.thousands) * if error != 1: # <<<<<<<<<<<<<< * if strcasecmp(word, cinf) == 0: * data[0] = INF */ __pyx_t_8 = ((__pyx_v_error != 1) != 0); if (__pyx_t_8) { /* "pandas/parser.pyx":1439 * error = to_double(word, data, parser.sci, parser.decimal, parser.thousands) * if error != 1: * if strcasecmp(word, cinf) == 0: # <<<<<<<<<<<<<< * data[0] = INF * elif strcasecmp(word, cneginf) == 0: */ __pyx_t_8 = ((strcasecmp(__pyx_v_word, __pyx_v_6pandas_6parser_cinf) == 0) != 0); if (__pyx_t_8) { /* "pandas/parser.pyx":1440 * if error != 1: * if strcasecmp(word, cinf) == 0: * data[0] = INF # <<<<<<<<<<<<<< * elif strcasecmp(word, cneginf) == 0: * data[0] = NEGINF */ (__pyx_v_data[0]) = __pyx_v_6pandas_6parser_INF; goto __pyx_L8; } /* "pandas/parser.pyx":1441 * if strcasecmp(word, cinf) == 0: * data[0] = INF * elif strcasecmp(word, cneginf) == 0: # <<<<<<<<<<<<<< * data[0] = NEGINF * else: */ __pyx_t_8 = ((strcasecmp(__pyx_v_word, __pyx_v_6pandas_6parser_cneginf) == 0) != 0); if (__pyx_t_8) { /* "pandas/parser.pyx":1442 * data[0] = INF * elif strcasecmp(word, cneginf) == 0: * data[0] = NEGINF # <<<<<<<<<<<<<< * else: * return None, None */ (__pyx_v_data[0]) = __pyx_v_6pandas_6parser_NEGINF; goto __pyx_L8; } /*else*/ { /* "pandas/parser.pyx":1444 * data[0] = NEGINF * else: * return None, None # <<<<<<<<<<<<<< * if use_na_flist: * if data[0] in na_flist: */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_k_tuple_79)); __pyx_r = ((PyObject *)__pyx_k_tuple_79); goto __pyx_L0; } __pyx_L8:; goto __pyx_L7; } __pyx_L7:; /* "pandas/parser.pyx":1445 * else: * return None, None * if use_na_flist: # <<<<<<<<<<<<<< * if data[0] in na_flist: * na_count += 1 */ __pyx_t_8 = (__pyx_v_use_na_flist != 0); if (__pyx_t_8) { /* "pandas/parser.pyx":1446 * return None, None * if use_na_flist: * if data[0] in na_flist: # <<<<<<<<<<<<<< * na_count += 1 * data[0] = NA */ __pyx_t_7 = PyFloat_FromDouble((__pyx_v_data[0])); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1446; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_t_8 = (__Pyx_PySequence_Contains(__pyx_t_7, __pyx_v_na_flist, Py_EQ)); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1446; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_11 = (__pyx_t_8 != 0); if (__pyx_t_11) { /* "pandas/parser.pyx":1447 * if use_na_flist: * if data[0] in na_flist: * na_count += 1 # <<<<<<<<<<<<<< * data[0] = NA * data += 1 */ __pyx_v_na_count = (__pyx_v_na_count + 1); /* "pandas/parser.pyx":1448 * if data[0] in na_flist: * na_count += 1 * data[0] = NA # <<<<<<<<<<<<<< * data += 1 * else: */ (__pyx_v_data[0]) = __pyx_v_NA; goto __pyx_L10; } __pyx_L10:; goto __pyx_L9; } __pyx_L9:; } __pyx_L6:; /* "pandas/parser.pyx":1449 * na_count += 1 * data[0] = NA * data += 1 # <<<<<<<<<<<<<< * else: * for i in range(lines): */ __pyx_v_data = (__pyx_v_data + 1); } goto __pyx_L3; } /*else*/ { /* "pandas/parser.pyx":1451 * data += 1 * else: * for i in range(lines): # <<<<<<<<<<<<<< * word = COLITER_NEXT(it) * error = to_double(word, data, parser.sci, parser.decimal, parser.thousands) */ __pyx_t_9 = __pyx_v_lines; for (__pyx_t_10 = 0; __pyx_t_10 < __pyx_t_9; __pyx_t_10+=1) { __pyx_v_i = __pyx_t_10; /* "pandas/parser.pyx":1452 * else: * for i in range(lines): * word = COLITER_NEXT(it) # <<<<<<<<<<<<<< * error = to_double(word, data, parser.sci, parser.decimal, parser.thousands) * if error != 1: */ __pyx_v_word = COLITER_NEXT(__pyx_v_it); /* "pandas/parser.pyx":1453 * for i in range(lines): * word = COLITER_NEXT(it) * error = to_double(word, data, parser.sci, parser.decimal, parser.thousands) # <<<<<<<<<<<<<< * if error != 1: * if strcasecmp(word, cinf) == 0: */ __pyx_v_error = to_double(__pyx_v_word, __pyx_v_data, __pyx_v_parser->sci, __pyx_v_parser->decimal, __pyx_v_parser->thousands); /* "pandas/parser.pyx":1454 * word = COLITER_NEXT(it) * error = to_double(word, data, parser.sci, parser.decimal, parser.thousands) * if error != 1: # <<<<<<<<<<<<<< * if strcasecmp(word, cinf) == 0: * data[0] = INF */ __pyx_t_11 = ((__pyx_v_error != 1) != 0); if (__pyx_t_11) { /* "pandas/parser.pyx":1455 * error = to_double(word, data, parser.sci, parser.decimal, parser.thousands) * if error != 1: * if strcasecmp(word, cinf) == 0: # <<<<<<<<<<<<<< * data[0] = INF * elif strcasecmp(word, cneginf) == 0: */ __pyx_t_11 = ((strcasecmp(__pyx_v_word, __pyx_v_6pandas_6parser_cinf) == 0) != 0); if (__pyx_t_11) { /* "pandas/parser.pyx":1456 * if error != 1: * if strcasecmp(word, cinf) == 0: * data[0] = INF # <<<<<<<<<<<<<< * elif strcasecmp(word, cneginf) == 0: * data[0] = NEGINF */ (__pyx_v_data[0]) = __pyx_v_6pandas_6parser_INF; goto __pyx_L14; } /* "pandas/parser.pyx":1457 * if strcasecmp(word, cinf) == 0: * data[0] = INF * elif strcasecmp(word, cneginf) == 0: # <<<<<<<<<<<<<< * data[0] = NEGINF * else: */ __pyx_t_11 = ((strcasecmp(__pyx_v_word, __pyx_v_6pandas_6parser_cneginf) == 0) != 0); if (__pyx_t_11) { /* "pandas/parser.pyx":1458 * data[0] = INF * elif strcasecmp(word, cneginf) == 0: * data[0] = NEGINF # <<<<<<<<<<<<<< * else: * return None, None */ (__pyx_v_data[0]) = __pyx_v_6pandas_6parser_NEGINF; goto __pyx_L14; } /*else*/ { /* "pandas/parser.pyx":1460 * data[0] = NEGINF * else: * return None, None # <<<<<<<<<<<<<< * data += 1 * */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_k_tuple_80)); __pyx_r = ((PyObject *)__pyx_k_tuple_80); goto __pyx_L0; } __pyx_L14:; goto __pyx_L13; } __pyx_L13:; /* "pandas/parser.pyx":1461 * else: * return None, None * data += 1 # <<<<<<<<<<<<<< * * return result, na_count */ __pyx_v_data = (__pyx_v_data + 1); } } __pyx_L3:; /* "pandas/parser.pyx":1463 * data += 1 * * return result, na_count # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_7 = PyInt_FromLong(__pyx_v_na_count); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1463; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1463; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(((PyObject *)__pyx_v_result)); PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_result)); __Pyx_GIVEREF(((PyObject *)__pyx_v_result)); PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_7); __Pyx_GIVEREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_r = ((PyObject *)__pyx_t_2); __pyx_t_2 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_AddTraceback("pandas.parser._try_double", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_result); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/parser.pyx":1466 * * * cdef _try_int64(parser_t *parser, int col, int line_start, int line_end, # <<<<<<<<<<<<<< * bint na_filter, kh_str_t *na_hashset): * cdef: */ static PyObject *__pyx_f_6pandas_6parser__try_int64(parser_t *__pyx_v_parser, int __pyx_v_col, int __pyx_v_line_start, int __pyx_v_line_end, int __pyx_v_na_filter, kh_str_t *__pyx_v_na_hashset) { int __pyx_v_error; int __pyx_v_na_count; size_t __pyx_v_i; size_t __pyx_v_lines; coliter_t __pyx_v_it; char *__pyx_v_word; __pyx_t_5numpy_int64_t *__pyx_v_data; PyArrayObject *__pyx_v_result = 0; __pyx_t_5numpy_int64_t __pyx_v_NA; khiter_t __pyx_v_k; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; __pyx_t_5numpy_int64_t __pyx_t_4; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; int __pyx_t_7; size_t __pyx_t_8; size_t __pyx_t_9; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_try_int64", 0); /* "pandas/parser.pyx":1469 * bint na_filter, kh_str_t *na_hashset): * cdef: * int error, na_count = 0 # <<<<<<<<<<<<<< * size_t i, lines * coliter_t it */ __pyx_v_na_count = 0; /* "pandas/parser.pyx":1476 * ndarray result * * int64_t NA = na_values[np.int64] # <<<<<<<<<<<<<< * khiter_t k * */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__na_values); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1476; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1476; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__int64); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1476; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_GetItem(__pyx_t_1, __pyx_t_3); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1476; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_4 = __Pyx_PyInt_from_py_npy_int64(__pyx_t_2); if (unlikely((__pyx_t_4 == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1476; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_NA = __pyx_t_4; /* "pandas/parser.pyx":1479 * khiter_t k * * lines = line_end - line_start # <<<<<<<<<<<<<< * result = np.empty(lines, dtype=np.int64) * data = result.data */ __pyx_v_lines = (__pyx_v_line_end - __pyx_v_line_start); /* "pandas/parser.pyx":1480 * * lines = line_end - line_start * result = np.empty(lines, dtype=np.int64) # <<<<<<<<<<<<<< * data = result.data * coliter_setup(&it, parser, col, line_start) */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1480; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 1480; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyInt_FromSize_t(__pyx_v_lines); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1480; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1480; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1480; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_2)); __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1480; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s__int64); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1480; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__dtype), __pyx_t_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1480; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_1), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1480; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __Pyx_DECREF(((PyObject *)__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_filename = __pyx_f[0]; __pyx_lineno = 1480; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_result = ((PyArrayObject *)__pyx_t_6); __pyx_t_6 = 0; /* "pandas/parser.pyx":1481 * lines = line_end - line_start * result = np.empty(lines, dtype=np.int64) * data = result.data # <<<<<<<<<<<<<< * coliter_setup(&it, parser, col, line_start) * */ __pyx_v_data = ((__pyx_t_5numpy_int64_t *)__pyx_v_result->data); /* "pandas/parser.pyx":1482 * result = np.empty(lines, dtype=np.int64) * data = result.data * coliter_setup(&it, parser, col, line_start) # <<<<<<<<<<<<<< * * if na_filter: */ coliter_setup((&__pyx_v_it), __pyx_v_parser, __pyx_v_col, __pyx_v_line_start); /* "pandas/parser.pyx":1484 * coliter_setup(&it, parser, col, line_start) * * if na_filter: # <<<<<<<<<<<<<< * for i in range(lines): * word = COLITER_NEXT(it) */ __pyx_t_7 = (__pyx_v_na_filter != 0); if (__pyx_t_7) { /* "pandas/parser.pyx":1485 * * if na_filter: * for i in range(lines): # <<<<<<<<<<<<<< * word = COLITER_NEXT(it) * k = kh_get_str(na_hashset, word) */ __pyx_t_8 = __pyx_v_lines; for (__pyx_t_9 = 0; __pyx_t_9 < __pyx_t_8; __pyx_t_9+=1) { __pyx_v_i = __pyx_t_9; /* "pandas/parser.pyx":1486 * if na_filter: * for i in range(lines): * word = COLITER_NEXT(it) # <<<<<<<<<<<<<< * k = kh_get_str(na_hashset, word) * # in the hash table */ __pyx_v_word = COLITER_NEXT(__pyx_v_it); /* "pandas/parser.pyx":1487 * for i in range(lines): * word = COLITER_NEXT(it) * k = kh_get_str(na_hashset, word) # <<<<<<<<<<<<<< * # in the hash table * if k != na_hashset.n_buckets: */ __pyx_v_k = kh_get_str(__pyx_v_na_hashset, __pyx_v_word); /* "pandas/parser.pyx":1489 * k = kh_get_str(na_hashset, word) * # in the hash table * if k != na_hashset.n_buckets: # <<<<<<<<<<<<<< * na_count += 1 * data[i] = NA */ __pyx_t_7 = ((__pyx_v_k != __pyx_v_na_hashset->n_buckets) != 0); if (__pyx_t_7) { /* "pandas/parser.pyx":1490 * # in the hash table * if k != na_hashset.n_buckets: * na_count += 1 # <<<<<<<<<<<<<< * data[i] = NA * continue */ __pyx_v_na_count = (__pyx_v_na_count + 1); /* "pandas/parser.pyx":1491 * if k != na_hashset.n_buckets: * na_count += 1 * data[i] = NA # <<<<<<<<<<<<<< * continue * */ (__pyx_v_data[__pyx_v_i]) = __pyx_v_NA; /* "pandas/parser.pyx":1492 * na_count += 1 * data[i] = NA * continue # <<<<<<<<<<<<<< * * data[i] = str_to_int64(word, INT64_MIN, INT64_MAX, */ goto __pyx_L4_continue; goto __pyx_L6; } __pyx_L6:; /* "pandas/parser.pyx":1494 * continue * * data[i] = str_to_int64(word, INT64_MIN, INT64_MAX, # <<<<<<<<<<<<<< * &error, parser.thousands) * if error != 0: */ (__pyx_v_data[__pyx_v_i]) = str_to_int64(__pyx_v_word, INT64_MIN, INT64_MAX, (&__pyx_v_error), __pyx_v_parser->thousands); /* "pandas/parser.pyx":1496 * data[i] = str_to_int64(word, INT64_MIN, INT64_MAX, * &error, parser.thousands) * if error != 0: # <<<<<<<<<<<<<< * if error == ERROR_OVERFLOW: * raise OverflowError(word) */ __pyx_t_7 = ((__pyx_v_error != 0) != 0); if (__pyx_t_7) { /* "pandas/parser.pyx":1497 * &error, parser.thousands) * if error != 0: * if error == ERROR_OVERFLOW: # <<<<<<<<<<<<<< * raise OverflowError(word) * */ __pyx_t_7 = ((__pyx_v_error == ERROR_OVERFLOW) != 0); if (__pyx_t_7) { /* "pandas/parser.pyx":1498 * if error != 0: * if error == ERROR_OVERFLOW: * raise OverflowError(word) # <<<<<<<<<<<<<< * * return None, None */ __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s__OverflowError); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1498; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_2 = __Pyx_PyBytes_FromString(__pyx_v_word); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1498; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_2)); __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1498; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_t_2)); __Pyx_GIVEREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __pyx_t_2 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1498; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1498; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L8; } __pyx_L8:; /* "pandas/parser.pyx":1500 * raise OverflowError(word) * * return None, None # <<<<<<<<<<<<<< * else: * for i in range(lines): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_k_tuple_81)); __pyx_r = ((PyObject *)__pyx_k_tuple_81); goto __pyx_L0; goto __pyx_L7; } __pyx_L7:; __pyx_L4_continue:; } goto __pyx_L3; } /*else*/ { /* "pandas/parser.pyx":1502 * return None, None * else: * for i in range(lines): # <<<<<<<<<<<<<< * word = COLITER_NEXT(it) * data[i] = str_to_int64(word, INT64_MIN, INT64_MAX, */ __pyx_t_8 = __pyx_v_lines; for (__pyx_t_9 = 0; __pyx_t_9 < __pyx_t_8; __pyx_t_9+=1) { __pyx_v_i = __pyx_t_9; /* "pandas/parser.pyx":1503 * else: * for i in range(lines): * word = COLITER_NEXT(it) # <<<<<<<<<<<<<< * data[i] = str_to_int64(word, INT64_MIN, INT64_MAX, * &error, parser.thousands) */ __pyx_v_word = COLITER_NEXT(__pyx_v_it); /* "pandas/parser.pyx":1504 * for i in range(lines): * word = COLITER_NEXT(it) * data[i] = str_to_int64(word, INT64_MIN, INT64_MAX, # <<<<<<<<<<<<<< * &error, parser.thousands) * if error != 0: */ (__pyx_v_data[__pyx_v_i]) = str_to_int64(__pyx_v_word, INT64_MIN, INT64_MAX, (&__pyx_v_error), __pyx_v_parser->thousands); /* "pandas/parser.pyx":1506 * data[i] = str_to_int64(word, INT64_MIN, INT64_MAX, * &error, parser.thousands) * if error != 0: # <<<<<<<<<<<<<< * if error == ERROR_OVERFLOW: * raise OverflowError(word) */ __pyx_t_7 = ((__pyx_v_error != 0) != 0); if (__pyx_t_7) { /* "pandas/parser.pyx":1507 * &error, parser.thousands) * if error != 0: * if error == ERROR_OVERFLOW: # <<<<<<<<<<<<<< * raise OverflowError(word) * return None, None */ __pyx_t_7 = ((__pyx_v_error == ERROR_OVERFLOW) != 0); if (__pyx_t_7) { /* "pandas/parser.pyx":1508 * if error != 0: * if error == ERROR_OVERFLOW: * raise OverflowError(word) # <<<<<<<<<<<<<< * return None, None * */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__OverflowError); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1508; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __Pyx_PyBytes_FromString(__pyx_v_word); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1508; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1508; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_t_1)); __Pyx_GIVEREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_t_1 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1508; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0; __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1508; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L12; } __pyx_L12:; /* "pandas/parser.pyx":1509 * if error == ERROR_OVERFLOW: * raise OverflowError(word) * return None, None # <<<<<<<<<<<<<< * * return result, na_count */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_k_tuple_82)); __pyx_r = ((PyObject *)__pyx_k_tuple_82); goto __pyx_L0; goto __pyx_L11; } __pyx_L11:; } } __pyx_L3:; /* "pandas/parser.pyx":1511 * return None, None * * return result, na_count # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyInt_FromLong(__pyx_v_na_count); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1511; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1511; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(((PyObject *)__pyx_v_result)); PyTuple_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_v_result)); __Pyx_GIVEREF(((PyObject *)__pyx_v_result)); PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = ((PyObject *)__pyx_t_6); __pyx_t_6 = 0; goto __pyx_L0; __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_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("pandas.parser._try_int64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_result); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/parser.pyx":1514 * * * cdef _try_bool(parser_t *parser, int col, int line_start, int line_end, # <<<<<<<<<<<<<< * bint na_filter, kh_str_t *na_hashset): * cdef: */ static PyObject *__pyx_f_6pandas_6parser__try_bool(parser_t *__pyx_v_parser, int __pyx_v_col, int __pyx_v_line_start, int __pyx_v_line_end, int __pyx_v_na_filter, kh_str_t *__pyx_v_na_hashset) { int __pyx_v_error; int __pyx_v_na_count; CYTHON_UNUSED size_t __pyx_v_i; size_t __pyx_v_lines; coliter_t __pyx_v_it; char *__pyx_v_word; __pyx_t_5numpy_uint8_t *__pyx_v_data; PyArrayObject *__pyx_v_result = 0; __pyx_t_5numpy_uint8_t __pyx_v_NA; khiter_t __pyx_v_k; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; __pyx_t_5numpy_uint8_t __pyx_t_4; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; int __pyx_t_7; size_t __pyx_t_8; size_t __pyx_t_9; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_try_bool", 0); /* "pandas/parser.pyx":1517 * bint na_filter, kh_str_t *na_hashset): * cdef: * int error, na_count = 0 # <<<<<<<<<<<<<< * size_t i, lines * coliter_t it */ __pyx_v_na_count = 0; /* "pandas/parser.pyx":1524 * ndarray result * * uint8_t NA = na_values[np.bool_] # <<<<<<<<<<<<<< * khiter_t k * */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__na_values); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1524; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1524; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__bool_); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1524; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_GetItem(__pyx_t_1, __pyx_t_3); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1524; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_4 = __Pyx_PyInt_from_py_npy_uint8(__pyx_t_2); if (unlikely((__pyx_t_4 == (npy_uint8)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1524; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_NA = __pyx_t_4; /* "pandas/parser.pyx":1527 * khiter_t k * * lines = line_end - line_start # <<<<<<<<<<<<<< * result = np.empty(lines, dtype=np.uint8) * data = result.data */ __pyx_v_lines = (__pyx_v_line_end - __pyx_v_line_start); /* "pandas/parser.pyx":1528 * * lines = line_end - line_start * result = np.empty(lines, dtype=np.uint8) # <<<<<<<<<<<<<< * data = result.data * coliter_setup(&it, parser, col, line_start) */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1528; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 1528; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyInt_FromSize_t(__pyx_v_lines); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1528; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1528; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1528; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_2)); __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1528; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s__uint8); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1528; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__dtype), __pyx_t_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1528; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_1), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1528; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __Pyx_DECREF(((PyObject *)__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_filename = __pyx_f[0]; __pyx_lineno = 1528; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_result = ((PyArrayObject *)__pyx_t_6); __pyx_t_6 = 0; /* "pandas/parser.pyx":1529 * lines = line_end - line_start * result = np.empty(lines, dtype=np.uint8) * data = result.data # <<<<<<<<<<<<<< * coliter_setup(&it, parser, col, line_start) * */ __pyx_v_data = ((__pyx_t_5numpy_uint8_t *)__pyx_v_result->data); /* "pandas/parser.pyx":1530 * result = np.empty(lines, dtype=np.uint8) * data = result.data * coliter_setup(&it, parser, col, line_start) # <<<<<<<<<<<<<< * * if na_filter: */ coliter_setup((&__pyx_v_it), __pyx_v_parser, __pyx_v_col, __pyx_v_line_start); /* "pandas/parser.pyx":1532 * coliter_setup(&it, parser, col, line_start) * * if na_filter: # <<<<<<<<<<<<<< * for i in range(lines): * word = COLITER_NEXT(it) */ __pyx_t_7 = (__pyx_v_na_filter != 0); if (__pyx_t_7) { /* "pandas/parser.pyx":1533 * * if na_filter: * for i in range(lines): # <<<<<<<<<<<<<< * word = COLITER_NEXT(it) * */ __pyx_t_8 = __pyx_v_lines; for (__pyx_t_9 = 0; __pyx_t_9 < __pyx_t_8; __pyx_t_9+=1) { __pyx_v_i = __pyx_t_9; /* "pandas/parser.pyx":1534 * if na_filter: * for i in range(lines): * word = COLITER_NEXT(it) # <<<<<<<<<<<<<< * * k = kh_get_str(na_hashset, word) */ __pyx_v_word = COLITER_NEXT(__pyx_v_it); /* "pandas/parser.pyx":1536 * word = COLITER_NEXT(it) * * k = kh_get_str(na_hashset, word) # <<<<<<<<<<<<<< * # in the hash table * if k != na_hashset.n_buckets: */ __pyx_v_k = kh_get_str(__pyx_v_na_hashset, __pyx_v_word); /* "pandas/parser.pyx":1538 * k = kh_get_str(na_hashset, word) * # in the hash table * if k != na_hashset.n_buckets: # <<<<<<<<<<<<<< * na_count += 1 * data[0] = NA */ __pyx_t_7 = ((__pyx_v_k != __pyx_v_na_hashset->n_buckets) != 0); if (__pyx_t_7) { /* "pandas/parser.pyx":1539 * # in the hash table * if k != na_hashset.n_buckets: * na_count += 1 # <<<<<<<<<<<<<< * data[0] = NA * data += 1 */ __pyx_v_na_count = (__pyx_v_na_count + 1); /* "pandas/parser.pyx":1540 * if k != na_hashset.n_buckets: * na_count += 1 * data[0] = NA # <<<<<<<<<<<<<< * data += 1 * continue */ (__pyx_v_data[0]) = __pyx_v_NA; /* "pandas/parser.pyx":1541 * na_count += 1 * data[0] = NA * data += 1 # <<<<<<<<<<<<<< * continue * */ __pyx_v_data = (__pyx_v_data + 1); /* "pandas/parser.pyx":1542 * data[0] = NA * data += 1 * continue # <<<<<<<<<<<<<< * * error = to_boolean(word, data) */ goto __pyx_L4_continue; goto __pyx_L6; } __pyx_L6:; /* "pandas/parser.pyx":1544 * continue * * error = to_boolean(word, data) # <<<<<<<<<<<<<< * if error != 0: * return None, None */ __pyx_v_error = to_boolean(__pyx_v_word, __pyx_v_data); /* "pandas/parser.pyx":1545 * * error = to_boolean(word, data) * if error != 0: # <<<<<<<<<<<<<< * return None, None * data += 1 */ __pyx_t_7 = ((__pyx_v_error != 0) != 0); if (__pyx_t_7) { /* "pandas/parser.pyx":1546 * error = to_boolean(word, data) * if error != 0: * return None, None # <<<<<<<<<<<<<< * data += 1 * else: */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_k_tuple_83)); __pyx_r = ((PyObject *)__pyx_k_tuple_83); goto __pyx_L0; goto __pyx_L7; } __pyx_L7:; /* "pandas/parser.pyx":1547 * if error != 0: * return None, None * data += 1 # <<<<<<<<<<<<<< * else: * for i in range(lines): */ __pyx_v_data = (__pyx_v_data + 1); __pyx_L4_continue:; } goto __pyx_L3; } /*else*/ { /* "pandas/parser.pyx":1549 * data += 1 * else: * for i in range(lines): # <<<<<<<<<<<<<< * word = COLITER_NEXT(it) * */ __pyx_t_8 = __pyx_v_lines; for (__pyx_t_9 = 0; __pyx_t_9 < __pyx_t_8; __pyx_t_9+=1) { __pyx_v_i = __pyx_t_9; /* "pandas/parser.pyx":1550 * else: * for i in range(lines): * word = COLITER_NEXT(it) # <<<<<<<<<<<<<< * * error = to_boolean(word, data) */ __pyx_v_word = COLITER_NEXT(__pyx_v_it); /* "pandas/parser.pyx":1552 * word = COLITER_NEXT(it) * * error = to_boolean(word, data) # <<<<<<<<<<<<<< * if error != 0: * return None, None */ __pyx_v_error = to_boolean(__pyx_v_word, __pyx_v_data); /* "pandas/parser.pyx":1553 * * error = to_boolean(word, data) * if error != 0: # <<<<<<<<<<<<<< * return None, None * data += 1 */ __pyx_t_7 = ((__pyx_v_error != 0) != 0); if (__pyx_t_7) { /* "pandas/parser.pyx":1554 * error = to_boolean(word, data) * if error != 0: * return None, None # <<<<<<<<<<<<<< * data += 1 * */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_k_tuple_84)); __pyx_r = ((PyObject *)__pyx_k_tuple_84); goto __pyx_L0; goto __pyx_L10; } __pyx_L10:; /* "pandas/parser.pyx":1555 * if error != 0: * return None, None * data += 1 # <<<<<<<<<<<<<< * * return result.view(np.bool_), na_count */ __pyx_v_data = (__pyx_v_data + 1); } } __pyx_L3:; /* "pandas/parser.pyx":1557 * data += 1 * * return result.view(np.bool_), na_count # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_result), __pyx_n_s__view); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1557; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1557; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__bool_); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1557; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1557; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1557; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __pyx_t_2 = PyInt_FromLong(__pyx_v_na_count); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1557; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1557; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_1 = 0; __pyx_t_2 = 0; __pyx_r = ((PyObject *)__pyx_t_6); __pyx_t_6 = 0; goto __pyx_L0; __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_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("pandas.parser._try_bool", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_result); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/parser.pyx":1560 * * * cdef _try_bool_flex(parser_t *parser, int col, int line_start, int line_end, # <<<<<<<<<<<<<< * bint na_filter, kh_str_t *na_hashset, * kh_str_t *true_hashset, kh_str_t *false_hashset): */ static PyObject *__pyx_f_6pandas_6parser__try_bool_flex(parser_t *__pyx_v_parser, int __pyx_v_col, int __pyx_v_line_start, int __pyx_v_line_end, int __pyx_v_na_filter, kh_str_t *__pyx_v_na_hashset, kh_str_t *__pyx_v_true_hashset, kh_str_t *__pyx_v_false_hashset) { int __pyx_v_error; int __pyx_v_na_count; CYTHON_UNUSED size_t __pyx_v_i; size_t __pyx_v_lines; coliter_t __pyx_v_it; char *__pyx_v_word; __pyx_t_5numpy_uint8_t *__pyx_v_data; PyArrayObject *__pyx_v_result = 0; __pyx_t_5numpy_uint8_t __pyx_v_NA; khiter_t __pyx_v_k; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; __pyx_t_5numpy_uint8_t __pyx_t_4; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; int __pyx_t_7; size_t __pyx_t_8; size_t __pyx_t_9; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_try_bool_flex", 0); /* "pandas/parser.pyx":1564 * kh_str_t *true_hashset, kh_str_t *false_hashset): * cdef: * int error, na_count = 0 # <<<<<<<<<<<<<< * size_t i, lines * coliter_t it */ __pyx_v_na_count = 0; /* "pandas/parser.pyx":1571 * ndarray result * * uint8_t NA = na_values[np.bool_] # <<<<<<<<<<<<<< * khiter_t k * */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__na_values); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1571; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1571; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__bool_); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1571; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_GetItem(__pyx_t_1, __pyx_t_3); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1571; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_4 = __Pyx_PyInt_from_py_npy_uint8(__pyx_t_2); if (unlikely((__pyx_t_4 == (npy_uint8)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1571; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_NA = __pyx_t_4; /* "pandas/parser.pyx":1574 * khiter_t k * * lines = line_end - line_start # <<<<<<<<<<<<<< * result = np.empty(lines, dtype=np.uint8) * data = result.data */ __pyx_v_lines = (__pyx_v_line_end - __pyx_v_line_start); /* "pandas/parser.pyx":1575 * * lines = line_end - line_start * result = np.empty(lines, dtype=np.uint8) # <<<<<<<<<<<<<< * data = result.data * coliter_setup(&it, parser, col, line_start) */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1575; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 1575; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyInt_FromSize_t(__pyx_v_lines); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1575; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1575; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1575; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_2)); __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1575; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s__uint8); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1575; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__dtype), __pyx_t_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1575; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_1), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1575; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __Pyx_DECREF(((PyObject *)__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_filename = __pyx_f[0]; __pyx_lineno = 1575; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_result = ((PyArrayObject *)__pyx_t_6); __pyx_t_6 = 0; /* "pandas/parser.pyx":1576 * lines = line_end - line_start * result = np.empty(lines, dtype=np.uint8) * data = result.data # <<<<<<<<<<<<<< * coliter_setup(&it, parser, col, line_start) * */ __pyx_v_data = ((__pyx_t_5numpy_uint8_t *)__pyx_v_result->data); /* "pandas/parser.pyx":1577 * result = np.empty(lines, dtype=np.uint8) * data = result.data * coliter_setup(&it, parser, col, line_start) # <<<<<<<<<<<<<< * * if na_filter: */ coliter_setup((&__pyx_v_it), __pyx_v_parser, __pyx_v_col, __pyx_v_line_start); /* "pandas/parser.pyx":1579 * coliter_setup(&it, parser, col, line_start) * * if na_filter: # <<<<<<<<<<<<<< * for i in range(lines): * word = COLITER_NEXT(it) */ __pyx_t_7 = (__pyx_v_na_filter != 0); if (__pyx_t_7) { /* "pandas/parser.pyx":1580 * * if na_filter: * for i in range(lines): # <<<<<<<<<<<<<< * word = COLITER_NEXT(it) * */ __pyx_t_8 = __pyx_v_lines; for (__pyx_t_9 = 0; __pyx_t_9 < __pyx_t_8; __pyx_t_9+=1) { __pyx_v_i = __pyx_t_9; /* "pandas/parser.pyx":1581 * if na_filter: * for i in range(lines): * word = COLITER_NEXT(it) # <<<<<<<<<<<<<< * * k = kh_get_str(na_hashset, word) */ __pyx_v_word = COLITER_NEXT(__pyx_v_it); /* "pandas/parser.pyx":1583 * word = COLITER_NEXT(it) * * k = kh_get_str(na_hashset, word) # <<<<<<<<<<<<<< * # in the hash table * if k != na_hashset.n_buckets: */ __pyx_v_k = kh_get_str(__pyx_v_na_hashset, __pyx_v_word); /* "pandas/parser.pyx":1585 * k = kh_get_str(na_hashset, word) * # in the hash table * if k != na_hashset.n_buckets: # <<<<<<<<<<<<<< * na_count += 1 * data[0] = NA */ __pyx_t_7 = ((__pyx_v_k != __pyx_v_na_hashset->n_buckets) != 0); if (__pyx_t_7) { /* "pandas/parser.pyx":1586 * # in the hash table * if k != na_hashset.n_buckets: * na_count += 1 # <<<<<<<<<<<<<< * data[0] = NA * data += 1 */ __pyx_v_na_count = (__pyx_v_na_count + 1); /* "pandas/parser.pyx":1587 * if k != na_hashset.n_buckets: * na_count += 1 * data[0] = NA # <<<<<<<<<<<<<< * data += 1 * continue */ (__pyx_v_data[0]) = __pyx_v_NA; /* "pandas/parser.pyx":1588 * na_count += 1 * data[0] = NA * data += 1 # <<<<<<<<<<<<<< * continue * */ __pyx_v_data = (__pyx_v_data + 1); /* "pandas/parser.pyx":1589 * data[0] = NA * data += 1 * continue # <<<<<<<<<<<<<< * * k = kh_get_str(true_hashset, word) */ goto __pyx_L4_continue; goto __pyx_L6; } __pyx_L6:; /* "pandas/parser.pyx":1591 * continue * * k = kh_get_str(true_hashset, word) # <<<<<<<<<<<<<< * if k != true_hashset.n_buckets: * data[0] = 1 */ __pyx_v_k = kh_get_str(__pyx_v_true_hashset, __pyx_v_word); /* "pandas/parser.pyx":1592 * * k = kh_get_str(true_hashset, word) * if k != true_hashset.n_buckets: # <<<<<<<<<<<<<< * data[0] = 1 * data += 1 */ __pyx_t_7 = ((__pyx_v_k != __pyx_v_true_hashset->n_buckets) != 0); if (__pyx_t_7) { /* "pandas/parser.pyx":1593 * k = kh_get_str(true_hashset, word) * if k != true_hashset.n_buckets: * data[0] = 1 # <<<<<<<<<<<<<< * data += 1 * continue */ (__pyx_v_data[0]) = 1; /* "pandas/parser.pyx":1594 * if k != true_hashset.n_buckets: * data[0] = 1 * data += 1 # <<<<<<<<<<<<<< * continue * */ __pyx_v_data = (__pyx_v_data + 1); /* "pandas/parser.pyx":1595 * data[0] = 1 * data += 1 * continue # <<<<<<<<<<<<<< * * k = kh_get_str(false_hashset, word) */ goto __pyx_L4_continue; goto __pyx_L7; } __pyx_L7:; /* "pandas/parser.pyx":1597 * continue * * k = kh_get_str(false_hashset, word) # <<<<<<<<<<<<<< * if k != false_hashset.n_buckets: * data[0] = 0 */ __pyx_v_k = kh_get_str(__pyx_v_false_hashset, __pyx_v_word); /* "pandas/parser.pyx":1598 * * k = kh_get_str(false_hashset, word) * if k != false_hashset.n_buckets: # <<<<<<<<<<<<<< * data[0] = 0 * data += 1 */ __pyx_t_7 = ((__pyx_v_k != __pyx_v_false_hashset->n_buckets) != 0); if (__pyx_t_7) { /* "pandas/parser.pyx":1599 * k = kh_get_str(false_hashset, word) * if k != false_hashset.n_buckets: * data[0] = 0 # <<<<<<<<<<<<<< * data += 1 * continue */ (__pyx_v_data[0]) = 0; /* "pandas/parser.pyx":1600 * if k != false_hashset.n_buckets: * data[0] = 0 * data += 1 # <<<<<<<<<<<<<< * continue * */ __pyx_v_data = (__pyx_v_data + 1); /* "pandas/parser.pyx":1601 * data[0] = 0 * data += 1 * continue # <<<<<<<<<<<<<< * * error = to_boolean(word, data) */ goto __pyx_L4_continue; goto __pyx_L8; } __pyx_L8:; /* "pandas/parser.pyx":1603 * continue * * error = to_boolean(word, data) # <<<<<<<<<<<<<< * if error != 0: * return None, None */ __pyx_v_error = to_boolean(__pyx_v_word, __pyx_v_data); /* "pandas/parser.pyx":1604 * * error = to_boolean(word, data) * if error != 0: # <<<<<<<<<<<<<< * return None, None * data += 1 */ __pyx_t_7 = ((__pyx_v_error != 0) != 0); if (__pyx_t_7) { /* "pandas/parser.pyx":1605 * error = to_boolean(word, data) * if error != 0: * return None, None # <<<<<<<<<<<<<< * data += 1 * else: */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_k_tuple_85)); __pyx_r = ((PyObject *)__pyx_k_tuple_85); goto __pyx_L0; goto __pyx_L9; } __pyx_L9:; /* "pandas/parser.pyx":1606 * if error != 0: * return None, None * data += 1 # <<<<<<<<<<<<<< * else: * for i in range(lines): */ __pyx_v_data = (__pyx_v_data + 1); __pyx_L4_continue:; } goto __pyx_L3; } /*else*/ { /* "pandas/parser.pyx":1608 * data += 1 * else: * for i in range(lines): # <<<<<<<<<<<<<< * word = COLITER_NEXT(it) * */ __pyx_t_8 = __pyx_v_lines; for (__pyx_t_9 = 0; __pyx_t_9 < __pyx_t_8; __pyx_t_9+=1) { __pyx_v_i = __pyx_t_9; /* "pandas/parser.pyx":1609 * else: * for i in range(lines): * word = COLITER_NEXT(it) # <<<<<<<<<<<<<< * * k = kh_get_str(true_hashset, word) */ __pyx_v_word = COLITER_NEXT(__pyx_v_it); /* "pandas/parser.pyx":1611 * word = COLITER_NEXT(it) * * k = kh_get_str(true_hashset, word) # <<<<<<<<<<<<<< * if k != true_hashset.n_buckets: * data[0] = 1 */ __pyx_v_k = kh_get_str(__pyx_v_true_hashset, __pyx_v_word); /* "pandas/parser.pyx":1612 * * k = kh_get_str(true_hashset, word) * if k != true_hashset.n_buckets: # <<<<<<<<<<<<<< * data[0] = 1 * data += 1 */ __pyx_t_7 = ((__pyx_v_k != __pyx_v_true_hashset->n_buckets) != 0); if (__pyx_t_7) { /* "pandas/parser.pyx":1613 * k = kh_get_str(true_hashset, word) * if k != true_hashset.n_buckets: * data[0] = 1 # <<<<<<<<<<<<<< * data += 1 * continue */ (__pyx_v_data[0]) = 1; /* "pandas/parser.pyx":1614 * if k != true_hashset.n_buckets: * data[0] = 1 * data += 1 # <<<<<<<<<<<<<< * continue * */ __pyx_v_data = (__pyx_v_data + 1); /* "pandas/parser.pyx":1615 * data[0] = 1 * data += 1 * continue # <<<<<<<<<<<<<< * * k = kh_get_str(false_hashset, word) */ goto __pyx_L10_continue; goto __pyx_L12; } __pyx_L12:; /* "pandas/parser.pyx":1617 * continue * * k = kh_get_str(false_hashset, word) # <<<<<<<<<<<<<< * if k != false_hashset.n_buckets: * data[0] = 0 */ __pyx_v_k = kh_get_str(__pyx_v_false_hashset, __pyx_v_word); /* "pandas/parser.pyx":1618 * * k = kh_get_str(false_hashset, word) * if k != false_hashset.n_buckets: # <<<<<<<<<<<<<< * data[0] = 0 * data += 1 */ __pyx_t_7 = ((__pyx_v_k != __pyx_v_false_hashset->n_buckets) != 0); if (__pyx_t_7) { /* "pandas/parser.pyx":1619 * k = kh_get_str(false_hashset, word) * if k != false_hashset.n_buckets: * data[0] = 0 # <<<<<<<<<<<<<< * data += 1 * continue */ (__pyx_v_data[0]) = 0; /* "pandas/parser.pyx":1620 * if k != false_hashset.n_buckets: * data[0] = 0 * data += 1 # <<<<<<<<<<<<<< * continue * */ __pyx_v_data = (__pyx_v_data + 1); /* "pandas/parser.pyx":1621 * data[0] = 0 * data += 1 * continue # <<<<<<<<<<<<<< * * error = to_boolean(word, data) */ goto __pyx_L10_continue; goto __pyx_L13; } __pyx_L13:; /* "pandas/parser.pyx":1623 * continue * * error = to_boolean(word, data) # <<<<<<<<<<<<<< * if error != 0: * return None, None */ __pyx_v_error = to_boolean(__pyx_v_word, __pyx_v_data); /* "pandas/parser.pyx":1624 * * error = to_boolean(word, data) * if error != 0: # <<<<<<<<<<<<<< * return None, None * data += 1 */ __pyx_t_7 = ((__pyx_v_error != 0) != 0); if (__pyx_t_7) { /* "pandas/parser.pyx":1625 * error = to_boolean(word, data) * if error != 0: * return None, None # <<<<<<<<<<<<<< * data += 1 * */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_k_tuple_86)); __pyx_r = ((PyObject *)__pyx_k_tuple_86); goto __pyx_L0; goto __pyx_L14; } __pyx_L14:; /* "pandas/parser.pyx":1626 * if error != 0: * return None, None * data += 1 # <<<<<<<<<<<<<< * * return result.view(np.bool_), na_count */ __pyx_v_data = (__pyx_v_data + 1); __pyx_L10_continue:; } } __pyx_L3:; /* "pandas/parser.pyx":1628 * data += 1 * * return result.view(np.bool_), na_count # <<<<<<<<<<<<<< * * cdef _get_na_mask(parser_t *parser, int col, int line_start, int line_end, */ __Pyx_XDECREF(__pyx_r); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_result), __pyx_n_s__view); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1628; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1628; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__bool_); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1628; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1628; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1628; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __pyx_t_2 = PyInt_FromLong(__pyx_v_na_count); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1628; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1628; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_1 = 0; __pyx_t_2 = 0; __pyx_r = ((PyObject *)__pyx_t_6); __pyx_t_6 = 0; goto __pyx_L0; __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_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("pandas.parser._try_bool_flex", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_result); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/parser.pyx":1630 * return result.view(np.bool_), na_count * * cdef _get_na_mask(parser_t *parser, int col, int line_start, int line_end, # <<<<<<<<<<<<<< * kh_str_t *na_hashset): * cdef: */ static PyObject *__pyx_f_6pandas_6parser__get_na_mask(parser_t *__pyx_v_parser, int __pyx_v_col, int __pyx_v_line_start, int __pyx_v_line_end, kh_str_t *__pyx_v_na_hashset) { Py_ssize_t __pyx_v_i; size_t __pyx_v_lines; coliter_t __pyx_v_it; char *__pyx_v_word; PyArrayObject *__pyx_v_result = 0; khiter_t __pyx_v_k; __Pyx_LocalBuf_ND __pyx_pybuffernd_result; __Pyx_Buffer __pyx_pybuffer_result; 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; size_t __pyx_t_11; Py_ssize_t __pyx_t_12; int __pyx_t_13; Py_ssize_t __pyx_t_14; Py_ssize_t __pyx_t_15; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_get_na_mask", 0); __pyx_pybuffer_result.pybuffer.buf = NULL; __pyx_pybuffer_result.refcount = 0; __pyx_pybuffernd_result.data = NULL; __pyx_pybuffernd_result.rcbuffer = &__pyx_pybuffer_result; /* "pandas/parser.pyx":1641 * khiter_t k * * lines = line_end - line_start # <<<<<<<<<<<<<< * result = np.empty(lines, dtype=np.bool_) * */ __pyx_v_lines = (__pyx_v_line_end - __pyx_v_line_start); /* "pandas/parser.pyx":1642 * * lines = line_end - line_start * result = np.empty(lines, dtype=np.bool_) # <<<<<<<<<<<<<< * * coliter_setup(&it, parser, col, line_start) */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1642; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 1642; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_PyInt_FromSize_t(__pyx_v_lines); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1642; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1642; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1642; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1642; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s__bool_); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1642; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__dtype), __pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1642; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_3), ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1642; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__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_filename = __pyx_f[0]; __pyx_lineno = 1642; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_6 = ((PyArrayObject *)__pyx_t_5); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 1, __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_result.rcbuffer->pybuffer, (PyObject*)__pyx_v_result, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 1, __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_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_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1642; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_6 = 0; __pyx_v_result = ((PyArrayObject *)__pyx_t_5); __pyx_t_5 = 0; /* "pandas/parser.pyx":1644 * result = np.empty(lines, dtype=np.bool_) * * coliter_setup(&it, parser, col, line_start) # <<<<<<<<<<<<<< * for i in range(lines): * word = COLITER_NEXT(it) */ coliter_setup((&__pyx_v_it), __pyx_v_parser, __pyx_v_col, __pyx_v_line_start); /* "pandas/parser.pyx":1645 * * coliter_setup(&it, parser, col, line_start) * for i in range(lines): # <<<<<<<<<<<<<< * word = COLITER_NEXT(it) * */ __pyx_t_11 = __pyx_v_lines; for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_11; __pyx_t_12+=1) { __pyx_v_i = __pyx_t_12; /* "pandas/parser.pyx":1646 * coliter_setup(&it, parser, col, line_start) * for i in range(lines): * word = COLITER_NEXT(it) # <<<<<<<<<<<<<< * * k = kh_get_str(na_hashset, word) */ __pyx_v_word = COLITER_NEXT(__pyx_v_it); /* "pandas/parser.pyx":1648 * word = COLITER_NEXT(it) * * k = kh_get_str(na_hashset, word) # <<<<<<<<<<<<<< * # in the hash table * if k != na_hashset.n_buckets: */ __pyx_v_k = kh_get_str(__pyx_v_na_hashset, __pyx_v_word); /* "pandas/parser.pyx":1650 * k = kh_get_str(na_hashset, word) * # in the hash table * if k != na_hashset.n_buckets: # <<<<<<<<<<<<<< * result[i] = 1 * else: */ __pyx_t_13 = ((__pyx_v_k != __pyx_v_na_hashset->n_buckets) != 0); if (__pyx_t_13) { /* "pandas/parser.pyx":1651 * # in the hash table * if k != na_hashset.n_buckets: * result[i] = 1 # <<<<<<<<<<<<<< * else: * result[i] = 0 */ __pyx_t_14 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_14 < 0) { __pyx_t_14 += __pyx_pybuffernd_result.diminfo[0].shape; if (unlikely(__pyx_t_14 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_14 >= __pyx_pybuffernd_result.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1651; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_result.diminfo[0].strides) = 1; goto __pyx_L5; } /*else*/ { /* "pandas/parser.pyx":1653 * result[i] = 1 * else: * result[i] = 0 # <<<<<<<<<<<<<< * * return result */ __pyx_t_15 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_15 < 0) { __pyx_t_15 += __pyx_pybuffernd_result.diminfo[0].shape; if (unlikely(__pyx_t_15 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_15 >= __pyx_pybuffernd_result.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1653; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_result.diminfo[0].strides) = 0; } __pyx_L5:; } /* "pandas/parser.pyx":1655 * result[i] = 0 * * return result # <<<<<<<<<<<<<< * * cdef kh_str_t* kset_from_list(list values) except NULL: */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_result)); __pyx_r = ((PyObject *)__pyx_v_result); goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.parser._get_na_mask", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_result); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/parser.pyx":1657 * return result * * cdef kh_str_t* kset_from_list(list values) except NULL: # <<<<<<<<<<<<<< * # caller takes responsibility for freeing the hash table * cdef: */ static kh_str_t *__pyx_f_6pandas_6parser_kset_from_list(PyObject *__pyx_v_values) { Py_ssize_t __pyx_v_i; CYTHON_UNUSED khiter_t __pyx_v_k; kh_str_t *__pyx_v_table; int __pyx_v_ret; PyObject *__pyx_v_val = 0; kh_str_t *__pyx_r; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; Py_ssize_t __pyx_t_2; PyObject *__pyx_t_3 = NULL; int __pyx_t_4; char *__pyx_t_5; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("kset_from_list", 0); /* "pandas/parser.pyx":1663 * khiter_t k * kh_str_t *table * int ret = 0 # <<<<<<<<<<<<<< * * object val */ __pyx_v_ret = 0; /* "pandas/parser.pyx":1667 * object val * * table = kh_init_str() # <<<<<<<<<<<<<< * * for i in range(len(values)): */ __pyx_v_table = kh_init_str(); /* "pandas/parser.pyx":1669 * table = kh_init_str() * * for i in range(len(values)): # <<<<<<<<<<<<<< * val = values[i] * */ if (unlikely(((PyObject *)__pyx_v_values) == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1669; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_1 = PyList_GET_SIZE(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1669; __pyx_clineno = __LINE__; goto __pyx_L1_error;} for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) { __pyx_v_i = __pyx_t_2; /* "pandas/parser.pyx":1670 * * for i in range(len(values)): * val = values[i] # <<<<<<<<<<<<<< * * # None creeps in sometimes, which isn't possible here */ if (unlikely(((PyObject *)__pyx_v_values) == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1670; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_3 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_values), __pyx_v_i, sizeof(Py_ssize_t), PyInt_FromSsize_t, 1, 1, 1); if (!__pyx_t_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1670; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_XDECREF_SET(__pyx_v_val, __pyx_t_3); __pyx_t_3 = 0; /* "pandas/parser.pyx":1673 * * # None creeps in sometimes, which isn't possible here * if not PyBytes_Check(val): # <<<<<<<<<<<<<< * raise Exception('Must be all encoded bytes') * */ __pyx_t_4 = ((!(PyBytes_Check(__pyx_v_val) != 0)) != 0); if (__pyx_t_4) { /* "pandas/parser.pyx":1674 * # None creeps in sometimes, which isn't possible here * if not PyBytes_Check(val): * raise Exception('Must be all encoded bytes') # <<<<<<<<<<<<<< * * k = kh_put_str(table, PyBytes_AsString(val), &ret) */ __pyx_t_3 = PyObject_Call(__pyx_builtin_Exception, ((PyObject *)__pyx_k_tuple_88), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1674; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 1674; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L5; } __pyx_L5:; /* "pandas/parser.pyx":1676 * raise Exception('Must be all encoded bytes') * * k = kh_put_str(table, PyBytes_AsString(val), &ret) # <<<<<<<<<<<<<< * * return table */ __pyx_t_5 = PyBytes_AsString(__pyx_v_val); if (unlikely(__pyx_t_5 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1676; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_k = kh_put_str(__pyx_v_table, __pyx_t_5, (&__pyx_v_ret)); } /* "pandas/parser.pyx":1678 * k = kh_put_str(table, PyBytes_AsString(val), &ret) * * return table # <<<<<<<<<<<<<< * * */ __pyx_r = __pyx_v_table; goto __pyx_L0; __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("pandas.parser.kset_from_list", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_val); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/parser.pyx":1687 * * * cdef raise_parser_error(object base, parser_t *parser): # <<<<<<<<<<<<<< * message = '%s. C error: ' % base * if parser.error_msg != NULL: */ static PyObject *__pyx_f_6pandas_6parser_raise_parser_error(PyObject *__pyx_v_base, parser_t *__pyx_v_parser) { PyObject *__pyx_v_message = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; char *__pyx_t_3; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("raise_parser_error", 0); /* "pandas/parser.pyx":1688 * * cdef raise_parser_error(object base, parser_t *parser): * message = '%s. C error: ' % base # <<<<<<<<<<<<<< * if parser.error_msg != NULL: * if PY3: */ __pyx_t_1 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_89), __pyx_v_base); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1688; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_v_message = ((PyObject *)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/parser.pyx":1689 * cdef raise_parser_error(object base, parser_t *parser): * message = '%s. C error: ' % base * if parser.error_msg != NULL: # <<<<<<<<<<<<<< * if PY3: * message += parser.error_msg.decode('utf-8') */ __pyx_t_2 = ((__pyx_v_parser->error_msg != NULL) != 0); if (__pyx_t_2) { /* "pandas/parser.pyx":1690 * message = '%s. C error: ' % base * if parser.error_msg != NULL: * if PY3: # <<<<<<<<<<<<<< * message += parser.error_msg.decode('utf-8') * else: */ __pyx_t_2 = (__pyx_v_6pandas_6parser_PY3 != 0); if (__pyx_t_2) { /* "pandas/parser.pyx":1691 * if parser.error_msg != NULL: * if PY3: * message += parser.error_msg.decode('utf-8') # <<<<<<<<<<<<<< * else: * message += parser.error_msg */ __pyx_t_3 = __pyx_v_parser->error_msg; __pyx_t_1 = ((PyObject *)__Pyx_decode_c_string(__pyx_t_3, 0, strlen(__pyx_t_3), NULL, NULL, PyUnicode_DecodeUTF8)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1691; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_message, ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1691; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __Pyx_DECREF_SET(__pyx_v_message, __pyx_t_4); __pyx_t_4 = 0; goto __pyx_L4; } /*else*/ { /* "pandas/parser.pyx":1693 * message += parser.error_msg.decode('utf-8') * else: * message += parser.error_msg # <<<<<<<<<<<<<< * else: * message += 'no error message set' */ __pyx_t_4 = __Pyx_PyBytes_FromString(__pyx_v_parser->error_msg); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1693; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_4)); __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_message, ((PyObject *)__pyx_t_4)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1693; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __Pyx_DECREF_SET(__pyx_v_message, __pyx_t_1); __pyx_t_1 = 0; } __pyx_L4:; goto __pyx_L3; } /*else*/ { /* "pandas/parser.pyx":1695 * message += parser.error_msg * else: * message += 'no error message set' # <<<<<<<<<<<<<< * * raise CParserError(message) */ __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_message, ((PyObject *)__pyx_kp_s_90)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1695; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF_SET(__pyx_v_message, __pyx_t_1); __pyx_t_1 = 0; } __pyx_L3:; /* "pandas/parser.pyx":1697 * message += 'no error message set' * * raise CParserError(message) # <<<<<<<<<<<<<< * * */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__CParserError); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1697; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1697; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_v_message); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_message); __Pyx_GIVEREF(__pyx_v_message); __pyx_t_5 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1697; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __Pyx_Raise(__pyx_t_5, 0, 0, 0); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1697; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("pandas.parser.raise_parser_error", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_message); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_6parser_7downcast_int64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_6parser_7downcast_int64 = {__Pyx_NAMESTR("downcast_int64"), (PyCFunction)__pyx_pw_6pandas_6parser_7downcast_int64, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_6parser_7downcast_int64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_arr = 0; int __pyx_v_use_unsigned; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("downcast_int64 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__arr,&__pyx_n_s__use_unsigned,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__arr)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__use_unsigned); if (value) { values[1] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "downcast_int64") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1700; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_arr = ((PyArrayObject *)values[0]); if (values[1]) { __pyx_v_use_unsigned = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_use_unsigned == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1700; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } else { __pyx_v_use_unsigned = ((int)0); } } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("downcast_int64", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1700; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.parser.downcast_int64", __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_filename = __pyx_f[0]; __pyx_lineno = 1700; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_6parser_6downcast_int64(__pyx_self, __pyx_v_arr, __pyx_v_use_unsigned); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/parser.pyx":1700 * * * def downcast_int64(ndarray[int64_t] arr, bint use_unsigned=0): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = len(arr) */ static PyObject *__pyx_pf_6pandas_6parser_6downcast_int64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_arr, int __pyx_v_use_unsigned) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_n; __pyx_t_5numpy_int64_t __pyx_v_mx; __pyx_t_5numpy_int64_t __pyx_v_mn; __pyx_t_5numpy_int64_t __pyx_v_NA; __pyx_t_5numpy_int64_t __pyx_v_val; PyArrayObject *__pyx_v_mask = 0; int __pyx_v_na_count; PyObject *__pyx_v__mask = NULL; PyObject *__pyx_v_result = NULL; __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; __pyx_t_5numpy_int64_t __pyx_t_5; 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; int __pyx_t_14; Py_ssize_t __pyx_t_15; Py_ssize_t __pyx_t_16; int __pyx_t_17; int __pyx_t_18; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("downcast_int64", 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_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1700; __pyx_clineno = __LINE__; goto __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/parser.pyx":1702 * def downcast_int64(ndarray[int64_t] arr, bint use_unsigned=0): * cdef: * Py_ssize_t i, n = len(arr) # <<<<<<<<<<<<<< * int64_t mx = INT64_MIN + 1, mn = INT64_MAX * int64_t NA = na_values[np.int64] */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_arr)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1702; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/parser.pyx":1703 * cdef: * Py_ssize_t i, n = len(arr) * int64_t mx = INT64_MIN + 1, mn = INT64_MAX # <<<<<<<<<<<<<< * int64_t NA = na_values[np.int64] * int64_t val */ __pyx_v_mx = (INT64_MIN + 1); __pyx_v_mn = INT64_MAX; /* "pandas/parser.pyx":1704 * Py_ssize_t i, n = len(arr) * int64_t mx = INT64_MIN + 1, mn = INT64_MAX * int64_t NA = na_values[np.int64] # <<<<<<<<<<<<<< * int64_t val * ndarray[uint8_t] mask */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__na_values); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1704; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1704; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s__int64); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1704; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyObject_GetItem(__pyx_t_2, __pyx_t_4); if (!__pyx_t_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1704; __pyx_clineno = __LINE__; goto __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_t_5 = __Pyx_PyInt_from_py_npy_int64(__pyx_t_3); if (unlikely((__pyx_t_5 == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1704; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_NA = __pyx_t_5; /* "pandas/parser.pyx":1707 * int64_t val * ndarray[uint8_t] mask * int na_count = 0 # <<<<<<<<<<<<<< * * _mask = np.empty(n, dtype=bool) */ __pyx_v_na_count = 0; /* "pandas/parser.pyx":1709 * int na_count = 0 * * _mask = np.empty(n, dtype=bool) # <<<<<<<<<<<<<< * mask = _mask.view(np.uint8) * */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1709; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s__empty); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1709; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyInt_FromSsize_t(__pyx_v_n); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1709; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1709; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1709; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_3)); if (PyDict_SetItem(__pyx_t_3, ((PyObject *)__pyx_n_s__dtype), ((PyObject*)&PyBool_Type)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1709; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_6 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_2), ((PyObject *)__pyx_t_3)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1709; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; __pyx_v__mask = __pyx_t_6; __pyx_t_6 = 0; /* "pandas/parser.pyx":1710 * * _mask = np.empty(n, dtype=bool) * mask = _mask.view(np.uint8) # <<<<<<<<<<<<<< * * for i in range(n): */ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v__mask, __pyx_n_s__view); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1710; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1710; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s__uint8); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1710; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1710; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1710; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(((PyObject *)__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_filename = __pyx_f[0]; __pyx_lineno = 1710; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_7 = ((PyArrayObject *)__pyx_t_2); { __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_uint8_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_uint8_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_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_filename = __pyx_f[0]; __pyx_lineno = 1710; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_7 = 0; __pyx_v_mask = ((PyArrayObject *)__pyx_t_2); __pyx_t_2 = 0; /* "pandas/parser.pyx":1712 * mask = _mask.view(np.uint8) * * for i in range(n): # <<<<<<<<<<<<<< * val = arr[i] * */ __pyx_t_1 = __pyx_v_n; for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_1; __pyx_t_12+=1) { __pyx_v_i = __pyx_t_12; /* "pandas/parser.pyx":1713 * * for i in range(n): * val = arr[i] # <<<<<<<<<<<<<< * * if val == NA: */ __pyx_t_13 = __pyx_v_i; __pyx_t_8 = -1; if (__pyx_t_13 < 0) { __pyx_t_13 += __pyx_pybuffernd_arr.diminfo[0].shape; if (unlikely(__pyx_t_13 < 0)) __pyx_t_8 = 0; } else if (unlikely(__pyx_t_13 >= __pyx_pybuffernd_arr.diminfo[0].shape)) __pyx_t_8 = 0; if (unlikely(__pyx_t_8 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_8); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1713; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_val = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_arr.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_arr.diminfo[0].strides)); /* "pandas/parser.pyx":1715 * val = arr[i] * * if val == NA: # <<<<<<<<<<<<<< * mask[i] = 1 * na_count += 1 */ __pyx_t_14 = ((__pyx_v_val == __pyx_v_NA) != 0); if (__pyx_t_14) { /* "pandas/parser.pyx":1716 * * if val == NA: * mask[i] = 1 # <<<<<<<<<<<<<< * na_count += 1 * continue */ __pyx_t_15 = __pyx_v_i; __pyx_t_8 = -1; if (__pyx_t_15 < 0) { __pyx_t_15 += __pyx_pybuffernd_mask.diminfo[0].shape; if (unlikely(__pyx_t_15 < 0)) __pyx_t_8 = 0; } else if (unlikely(__pyx_t_15 >= __pyx_pybuffernd_mask.diminfo[0].shape)) __pyx_t_8 = 0; if (unlikely(__pyx_t_8 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_8); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1716; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_mask.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_mask.diminfo[0].strides) = 1; /* "pandas/parser.pyx":1717 * if val == NA: * mask[i] = 1 * na_count += 1 # <<<<<<<<<<<<<< * continue * */ __pyx_v_na_count = (__pyx_v_na_count + 1); /* "pandas/parser.pyx":1718 * mask[i] = 1 * na_count += 1 * continue # <<<<<<<<<<<<<< * * # not NA */ goto __pyx_L3_continue; goto __pyx_L5; } __pyx_L5:; /* "pandas/parser.pyx":1721 * * # not NA * mask[i] = 0 # <<<<<<<<<<<<<< * * if val > mx: */ __pyx_t_16 = __pyx_v_i; __pyx_t_8 = -1; if (__pyx_t_16 < 0) { __pyx_t_16 += __pyx_pybuffernd_mask.diminfo[0].shape; if (unlikely(__pyx_t_16 < 0)) __pyx_t_8 = 0; } else if (unlikely(__pyx_t_16 >= __pyx_pybuffernd_mask.diminfo[0].shape)) __pyx_t_8 = 0; if (unlikely(__pyx_t_8 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_8); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1721; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_mask.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_mask.diminfo[0].strides) = 0; /* "pandas/parser.pyx":1723 * mask[i] = 0 * * if val > mx: # <<<<<<<<<<<<<< * mx = val * */ __pyx_t_14 = ((__pyx_v_val > __pyx_v_mx) != 0); if (__pyx_t_14) { /* "pandas/parser.pyx":1724 * * if val > mx: * mx = val # <<<<<<<<<<<<<< * * if val < mn: */ __pyx_v_mx = __pyx_v_val; goto __pyx_L6; } __pyx_L6:; /* "pandas/parser.pyx":1726 * mx = val * * if val < mn: # <<<<<<<<<<<<<< * mn = val * */ __pyx_t_14 = ((__pyx_v_val < __pyx_v_mn) != 0); if (__pyx_t_14) { /* "pandas/parser.pyx":1727 * * if val < mn: * mn = val # <<<<<<<<<<<<<< * * if mn >= 0 and use_unsigned: */ __pyx_v_mn = __pyx_v_val; goto __pyx_L7; } __pyx_L7:; __pyx_L3_continue:; } /* "pandas/parser.pyx":1729 * mn = val * * if mn >= 0 and use_unsigned: # <<<<<<<<<<<<<< * if mx <= UINT8_MAX - 1: * result = arr.astype(np.uint8) */ __pyx_t_14 = ((__pyx_v_mn >= 0) != 0); if (__pyx_t_14) { __pyx_t_17 = (__pyx_v_use_unsigned != 0); } else { __pyx_t_17 = __pyx_t_14; } if (__pyx_t_17) { /* "pandas/parser.pyx":1730 * * if mn >= 0 and use_unsigned: * if mx <= UINT8_MAX - 1: # <<<<<<<<<<<<<< * result = arr.astype(np.uint8) * if na_count: */ __pyx_t_17 = ((__pyx_v_mx <= (UINT8_MAX - 1)) != 0); if (__pyx_t_17) { /* "pandas/parser.pyx":1731 * if mn >= 0 and use_unsigned: * if mx <= UINT8_MAX - 1: * result = arr.astype(np.uint8) # <<<<<<<<<<<<<< * if na_count: * np.putmask(result, _mask, na_values[np.uint8]) */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_arr), __pyx_n_s__astype); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1731; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1731; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s__uint8); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1731; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1731; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1731; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; __pyx_v_result = __pyx_t_6; __pyx_t_6 = 0; /* "pandas/parser.pyx":1732 * if mx <= UINT8_MAX - 1: * result = arr.astype(np.uint8) * if na_count: # <<<<<<<<<<<<<< * np.putmask(result, _mask, na_values[np.uint8]) * return result */ __pyx_t_17 = (__pyx_v_na_count != 0); if (__pyx_t_17) { /* "pandas/parser.pyx":1733 * result = arr.astype(np.uint8) * if na_count: * np.putmask(result, _mask, na_values[np.uint8]) # <<<<<<<<<<<<<< * return result * */ __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1733; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s__putmask); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1733; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s__na_values); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1733; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1733; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__uint8); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1733; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_GetItem(__pyx_t_6, __pyx_t_4); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1733; __pyx_clineno = __LINE__; goto __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_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1733; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_v_result); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_result); __Pyx_GIVEREF(__pyx_v_result); __Pyx_INCREF(__pyx_v__mask); PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v__mask); __Pyx_GIVEREF(__pyx_v__mask); PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1733; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; goto __pyx_L10; } __pyx_L10:; /* "pandas/parser.pyx":1734 * if na_count: * np.putmask(result, _mask, na_values[np.uint8]) * return result # <<<<<<<<<<<<<< * * if mx <= UINT16_MAX - 1: */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_result); __pyx_r = __pyx_v_result; goto __pyx_L0; goto __pyx_L9; } __pyx_L9:; /* "pandas/parser.pyx":1736 * return result * * if mx <= UINT16_MAX - 1: # <<<<<<<<<<<<<< * result = arr.astype(np.uint16) * if na_count: */ __pyx_t_17 = ((__pyx_v_mx <= (UINT16_MAX - 1)) != 0); if (__pyx_t_17) { /* "pandas/parser.pyx":1737 * * if mx <= UINT16_MAX - 1: * result = arr.astype(np.uint16) # <<<<<<<<<<<<<< * if na_count: * np.putmask(result, _mask, na_values[np.uint16]) */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_arr), __pyx_n_s__astype); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1737; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1737; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s__uint16); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1737; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1737; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1737; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __pyx_v_result = __pyx_t_3; __pyx_t_3 = 0; /* "pandas/parser.pyx":1738 * if mx <= UINT16_MAX - 1: * result = arr.astype(np.uint16) * if na_count: # <<<<<<<<<<<<<< * np.putmask(result, _mask, na_values[np.uint16]) * return result */ __pyx_t_17 = (__pyx_v_na_count != 0); if (__pyx_t_17) { /* "pandas/parser.pyx":1739 * result = arr.astype(np.uint16) * if na_count: * np.putmask(result, _mask, na_values[np.uint16]) # <<<<<<<<<<<<<< * return result * */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1739; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s__putmask); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1739; __pyx_clineno = __LINE__; goto __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__na_values); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1739; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1739; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__uint16); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1739; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_GetItem(__pyx_t_3, __pyx_t_6); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1739; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1739; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(__pyx_v_result); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_result); __Pyx_GIVEREF(__pyx_v_result); __Pyx_INCREF(__pyx_v__mask); PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_v__mask); __Pyx_GIVEREF(__pyx_v__mask); PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1739; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; goto __pyx_L12; } __pyx_L12:; /* "pandas/parser.pyx":1740 * if na_count: * np.putmask(result, _mask, na_values[np.uint16]) * return result # <<<<<<<<<<<<<< * * if mx <= UINT32_MAX - 1: */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_result); __pyx_r = __pyx_v_result; goto __pyx_L0; goto __pyx_L11; } __pyx_L11:; /* "pandas/parser.pyx":1742 * return result * * if mx <= UINT32_MAX - 1: # <<<<<<<<<<<<<< * result = arr.astype(np.uint32) * if na_count: */ __pyx_t_17 = ((__pyx_v_mx <= (UINT32_MAX - 1)) != 0); if (__pyx_t_17) { /* "pandas/parser.pyx":1743 * * if mx <= UINT32_MAX - 1: * result = arr.astype(np.uint32) # <<<<<<<<<<<<<< * if na_count: * np.putmask(result, _mask, na_values[np.uint32]) */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_arr), __pyx_n_s__astype); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1743; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1743; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s__uint32); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1743; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1743; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1743; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0; __pyx_v_result = __pyx_t_4; __pyx_t_4 = 0; /* "pandas/parser.pyx":1744 * if mx <= UINT32_MAX - 1: * result = arr.astype(np.uint32) * if na_count: # <<<<<<<<<<<<<< * np.putmask(result, _mask, na_values[np.uint32]) * return result */ __pyx_t_17 = (__pyx_v_na_count != 0); if (__pyx_t_17) { /* "pandas/parser.pyx":1745 * result = arr.astype(np.uint32) * if na_count: * np.putmask(result, _mask, na_values[np.uint32]) # <<<<<<<<<<<<<< * return result * */ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1745; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s__putmask); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1745; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s__na_values); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1745; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1745; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__uint32); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1745; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_GetItem(__pyx_t_4, __pyx_t_3); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1745; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1745; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_v_result); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_result); __Pyx_GIVEREF(__pyx_v_result); __Pyx_INCREF(__pyx_v__mask); PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v__mask); __Pyx_GIVEREF(__pyx_v__mask); PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1745; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; goto __pyx_L14; } __pyx_L14:; /* "pandas/parser.pyx":1746 * if na_count: * np.putmask(result, _mask, na_values[np.uint32]) * return result # <<<<<<<<<<<<<< * * else: */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_result); __pyx_r = __pyx_v_result; goto __pyx_L0; goto __pyx_L13; } __pyx_L13:; goto __pyx_L8; } /*else*/ { /* "pandas/parser.pyx":1749 * * else: * if mn >= INT8_MIN + 1 and mx <= INT8_MAX: # <<<<<<<<<<<<<< * result = arr.astype(np.int8) * if na_count: */ __pyx_t_17 = ((__pyx_v_mn >= (INT8_MIN + 1)) != 0); if (__pyx_t_17) { __pyx_t_14 = ((__pyx_v_mx <= INT8_MAX) != 0); __pyx_t_18 = __pyx_t_14; } else { __pyx_t_18 = __pyx_t_17; } if (__pyx_t_18) { /* "pandas/parser.pyx":1750 * else: * if mn >= INT8_MIN + 1 and mx <= INT8_MAX: * result = arr.astype(np.int8) # <<<<<<<<<<<<<< * if na_count: * np.putmask(result, _mask, na_values[np.int8]) */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_arr), __pyx_n_s__astype); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1750; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1750; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s__int8); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1750; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1750; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1750; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; __pyx_v_result = __pyx_t_6; __pyx_t_6 = 0; /* "pandas/parser.pyx":1751 * if mn >= INT8_MIN + 1 and mx <= INT8_MAX: * result = arr.astype(np.int8) * if na_count: # <<<<<<<<<<<<<< * np.putmask(result, _mask, na_values[np.int8]) * return result */ __pyx_t_18 = (__pyx_v_na_count != 0); if (__pyx_t_18) { /* "pandas/parser.pyx":1752 * result = arr.astype(np.int8) * if na_count: * np.putmask(result, _mask, na_values[np.int8]) # <<<<<<<<<<<<<< * return result * */ __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1752; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s__putmask); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1752; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s__na_values); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1752; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1752; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__int8); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1752; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_GetItem(__pyx_t_6, __pyx_t_4); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1752; __pyx_clineno = __LINE__; goto __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_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1752; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_v_result); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_result); __Pyx_GIVEREF(__pyx_v_result); __Pyx_INCREF(__pyx_v__mask); PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v__mask); __Pyx_GIVEREF(__pyx_v__mask); PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1752; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; goto __pyx_L16; } __pyx_L16:; /* "pandas/parser.pyx":1753 * if na_count: * np.putmask(result, _mask, na_values[np.int8]) * return result # <<<<<<<<<<<<<< * * if mn >= INT16_MIN + 1 and mx <= INT16_MAX: */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_result); __pyx_r = __pyx_v_result; goto __pyx_L0; goto __pyx_L15; } __pyx_L15:; /* "pandas/parser.pyx":1755 * return result * * if mn >= INT16_MIN + 1 and mx <= INT16_MAX: # <<<<<<<<<<<<<< * result = arr.astype(np.int16) * if na_count: */ __pyx_t_18 = ((__pyx_v_mn >= (INT16_MIN + 1)) != 0); if (__pyx_t_18) { __pyx_t_17 = ((__pyx_v_mx <= INT16_MAX) != 0); __pyx_t_14 = __pyx_t_17; } else { __pyx_t_14 = __pyx_t_18; } if (__pyx_t_14) { /* "pandas/parser.pyx":1756 * * if mn >= INT16_MIN + 1 and mx <= INT16_MAX: * result = arr.astype(np.int16) # <<<<<<<<<<<<<< * if na_count: * np.putmask(result, _mask, na_values[np.int16]) */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_arr), __pyx_n_s__astype); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1756; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1756; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s__int16); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1756; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1756; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1756; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __pyx_v_result = __pyx_t_3; __pyx_t_3 = 0; /* "pandas/parser.pyx":1757 * if mn >= INT16_MIN + 1 and mx <= INT16_MAX: * result = arr.astype(np.int16) * if na_count: # <<<<<<<<<<<<<< * np.putmask(result, _mask, na_values[np.int16]) * return result */ __pyx_t_14 = (__pyx_v_na_count != 0); if (__pyx_t_14) { /* "pandas/parser.pyx":1758 * result = arr.astype(np.int16) * if na_count: * np.putmask(result, _mask, na_values[np.int16]) # <<<<<<<<<<<<<< * return result * */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1758; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s__putmask); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1758; __pyx_clineno = __LINE__; goto __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__na_values); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1758; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1758; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__int16); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1758; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_GetItem(__pyx_t_3, __pyx_t_6); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1758; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1758; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(__pyx_v_result); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_result); __Pyx_GIVEREF(__pyx_v_result); __Pyx_INCREF(__pyx_v__mask); PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_v__mask); __Pyx_GIVEREF(__pyx_v__mask); PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1758; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; goto __pyx_L18; } __pyx_L18:; /* "pandas/parser.pyx":1759 * if na_count: * np.putmask(result, _mask, na_values[np.int16]) * return result # <<<<<<<<<<<<<< * * if mn >= INT32_MIN + 1 and mx <= INT32_MAX: */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_result); __pyx_r = __pyx_v_result; goto __pyx_L0; goto __pyx_L17; } __pyx_L17:; /* "pandas/parser.pyx":1761 * return result * * if mn >= INT32_MIN + 1 and mx <= INT32_MAX: # <<<<<<<<<<<<<< * result = arr.astype(np.int32) * if na_count: */ __pyx_t_14 = ((__pyx_v_mn >= (INT32_MIN + 1)) != 0); if (__pyx_t_14) { __pyx_t_18 = ((__pyx_v_mx <= INT32_MAX) != 0); __pyx_t_17 = __pyx_t_18; } else { __pyx_t_17 = __pyx_t_14; } if (__pyx_t_17) { /* "pandas/parser.pyx":1762 * * if mn >= INT32_MIN + 1 and mx <= INT32_MAX: * result = arr.astype(np.int32) # <<<<<<<<<<<<<< * if na_count: * np.putmask(result, _mask, na_values[np.int32]) */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_arr), __pyx_n_s__astype); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1762; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1762; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s__int32); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1762; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1762; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1762; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0; __pyx_v_result = __pyx_t_4; __pyx_t_4 = 0; /* "pandas/parser.pyx":1763 * if mn >= INT32_MIN + 1 and mx <= INT32_MAX: * result = arr.astype(np.int32) * if na_count: # <<<<<<<<<<<<<< * np.putmask(result, _mask, na_values[np.int32]) * return result */ __pyx_t_17 = (__pyx_v_na_count != 0); if (__pyx_t_17) { /* "pandas/parser.pyx":1764 * result = arr.astype(np.int32) * if na_count: * np.putmask(result, _mask, na_values[np.int32]) # <<<<<<<<<<<<<< * return result * */ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1764; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s__putmask); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1764; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s__na_values); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1764; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1764; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__int32); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1764; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_GetItem(__pyx_t_4, __pyx_t_3); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1764; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1764; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_v_result); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_result); __Pyx_GIVEREF(__pyx_v_result); __Pyx_INCREF(__pyx_v__mask); PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v__mask); __Pyx_GIVEREF(__pyx_v__mask); PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1764; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; goto __pyx_L20; } __pyx_L20:; /* "pandas/parser.pyx":1765 * if na_count: * np.putmask(result, _mask, na_values[np.int32]) * return result # <<<<<<<<<<<<<< * * return arr */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_result); __pyx_r = __pyx_v_result; goto __pyx_L0; goto __pyx_L19; } __pyx_L19:; } __pyx_L8:; /* "pandas/parser.pyx":1767 * return result * * return arr # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_arr)); __pyx_r = ((PyObject *)__pyx_v_arr); goto __pyx_L0; __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_XDECREF(__pyx_t_6); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __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.parser.downcast_int64", __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((PyObject *)__pyx_v_mask); __Pyx_XDECREF(__pyx_v__mask); __Pyx_XDECREF(__pyx_v_result); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_6parser_9_concatenate_chunks(PyObject *__pyx_self, PyObject *__pyx_v_chunks); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_6parser_9_concatenate_chunks = {__Pyx_NAMESTR("_concatenate_chunks"), (PyCFunction)__pyx_pw_6pandas_6parser_9_concatenate_chunks, METH_O, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_6parser_9_concatenate_chunks(PyObject *__pyx_self, PyObject *__pyx_v_chunks) { CYTHON_UNUSED int __pyx_lineno = 0; CYTHON_UNUSED const char *__pyx_filename = NULL; CYTHON_UNUSED int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_concatenate_chunks (wrapper)", 0); if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_chunks), (&PyList_Type), 1, "chunks", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1770; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_6parser_8_concatenate_chunks(__pyx_self, ((PyObject*)__pyx_v_chunks)); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/parser.pyx":1770 * * * def _concatenate_chunks(list chunks): # <<<<<<<<<<<<<< * cdef: * list names = list(chunks[0].keys()) */ static PyObject *__pyx_pf_6pandas_6parser_8_concatenate_chunks(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_chunks) { PyObject *__pyx_v_names = 0; PyObject *__pyx_v_name = 0; PyObject *__pyx_v_warning_columns = 0; PyObject *__pyx_v_warning_names = 0; PyObject *__pyx_v_common_type = 0; PyObject *__pyx_v_result = NULL; PyObject *__pyx_v_arrs = NULL; PyObject *__pyx_v_dtypes = NULL; PyObject *__pyx_v_warning_message = NULL; PyObject *__pyx_v_chunk = NULL; PyObject *__pyx_v_a = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; Py_ssize_t __pyx_t_3; PyObject *__pyx_t_4 = NULL; Py_ssize_t __pyx_t_5; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; int __pyx_t_9; int __pyx_t_10; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_concatenate_chunks", 0); /* "pandas/parser.pyx":1772 * def _concatenate_chunks(list chunks): * cdef: * list names = list(chunks[0].keys()) # <<<<<<<<<<<<<< * object name * list warning_columns */ if (unlikely(((PyObject *)__pyx_v_chunks) == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1772; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_1 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_chunks), 0, sizeof(long), PyInt_FromLong, 1, 0, 1); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1772; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s__keys); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1772; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1772; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1772; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)(&PyList_Type))), ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1772; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __pyx_v_names = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/parser.pyx":1778 * object common_type * * result = {} # <<<<<<<<<<<<<< * warning_columns = list() * for name in names: */ __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1778; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_v_result = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/parser.pyx":1779 * * result = {} * warning_columns = list() # <<<<<<<<<<<<<< * for name in names: * arrs = [chunk.pop(name) for chunk in chunks] */ __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1779; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_v_warning_columns = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/parser.pyx":1780 * result = {} * warning_columns = list() * for name in names: # <<<<<<<<<<<<<< * arrs = [chunk.pop(name) for chunk in chunks] * # Check each arr for consistent types. */ __pyx_t_1 = ((PyObject *)__pyx_v_names); __Pyx_INCREF(__pyx_t_1); __pyx_t_3 = 0; for (;;) { if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_1)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_3); __Pyx_INCREF(__pyx_t_2); __pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1780; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1780; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif __Pyx_XDECREF_SET(__pyx_v_name, __pyx_t_2); __pyx_t_2 = 0; /* "pandas/parser.pyx":1781 * warning_columns = list() * for name in names: * arrs = [chunk.pop(name) for chunk in chunks] # <<<<<<<<<<<<<< * # Check each arr for consistent types. * dtypes = set([a.dtype for a in arrs]) */ __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1781; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (unlikely(((PyObject *)__pyx_v_chunks) == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1781; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_4 = ((PyObject *)__pyx_v_chunks); __Pyx_INCREF(__pyx_t_4); __pyx_t_5 = 0; for (;;) { if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_4)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_6 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_6); __pyx_t_5++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1781; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_6 = PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1781; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif __Pyx_XDECREF_SET(__pyx_v_chunk, __pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_chunk, __pyx_n_s__pop); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1781; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1781; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_INCREF(__pyx_v_name); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_v_name); __Pyx_GIVEREF(__pyx_v_name); __pyx_t_8 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_t_7), NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1781; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0; if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_8))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1781; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF_SET(__pyx_v_arrs, ((PyObject*)__pyx_t_2)); __pyx_t_2 = 0; /* "pandas/parser.pyx":1783 * arrs = [chunk.pop(name) for chunk in chunks] * # Check each arr for consistent types. * dtypes = set([a.dtype for a in arrs]) # <<<<<<<<<<<<<< * if len(dtypes) > 1: * common_type = np.find_common_type(dtypes, []) */ __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1783; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = ((PyObject *)__pyx_v_arrs); __Pyx_INCREF(__pyx_t_4); __pyx_t_5 = 0; for (;;) { if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_4)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_8 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_8); __pyx_t_5++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1783; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_8 = PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1783; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif __Pyx_XDECREF_SET(__pyx_v_a, __pyx_t_8); __pyx_t_8 = 0; __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_a, __pyx_n_s__dtype); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1783; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_8))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1783; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1783; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_t_2)); __Pyx_GIVEREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)(&PySet_Type))), ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1783; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __Pyx_XDECREF_SET(__pyx_v_dtypes, ((PyObject*)__pyx_t_2)); __pyx_t_2 = 0; /* "pandas/parser.pyx":1784 * # Check each arr for consistent types. * dtypes = set([a.dtype for a in arrs]) * if len(dtypes) > 1: # <<<<<<<<<<<<<< * common_type = np.find_common_type(dtypes, []) * if common_type == np.object: */ __pyx_t_5 = PySet_Size(((PyObject *)__pyx_v_dtypes)); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1784; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_9 = ((__pyx_t_5 > 1) != 0); if (__pyx_t_9) { /* "pandas/parser.pyx":1785 * dtypes = set([a.dtype for a in arrs]) * if len(dtypes) > 1: * common_type = np.find_common_type(dtypes, []) # <<<<<<<<<<<<<< * if common_type == np.object: * warning_columns.append(str(name)) */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1785; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__find_common_type); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1785; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1785; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1785; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_INCREF(((PyObject *)__pyx_v_dtypes)); PyTuple_SET_ITEM(__pyx_t_8, 0, ((PyObject *)__pyx_v_dtypes)); __Pyx_GIVEREF(((PyObject *)__pyx_v_dtypes)); PyTuple_SET_ITEM(__pyx_t_8, 1, ((PyObject *)__pyx_t_2)); __Pyx_GIVEREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __pyx_t_2 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_8), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1785; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0; __Pyx_XDECREF_SET(__pyx_v_common_type, __pyx_t_2); __pyx_t_2 = 0; /* "pandas/parser.pyx":1786 * if len(dtypes) > 1: * common_type = np.find_common_type(dtypes, []) * if common_type == np.object: # <<<<<<<<<<<<<< * warning_columns.append(str(name)) * result[name] = np.concatenate(arrs) */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1786; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__object); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1786; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_RichCompare(__pyx_v_common_type, __pyx_t_8, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1786; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1786; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_9) { /* "pandas/parser.pyx":1787 * common_type = np.find_common_type(dtypes, []) * if common_type == np.object: * warning_columns.append(str(name)) # <<<<<<<<<<<<<< * result[name] = np.concatenate(arrs) * */ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1787; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_name); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_name); __Pyx_GIVEREF(__pyx_v_name); __pyx_t_8 = PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1787; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __pyx_t_10 = __Pyx_PyList_Append(__pyx_v_warning_columns, __pyx_t_8); if (unlikely(__pyx_t_10 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1787; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; goto __pyx_L10; } __pyx_L10:; goto __pyx_L9; } __pyx_L9:; /* "pandas/parser.pyx":1788 * if common_type == np.object: * warning_columns.append(str(name)) * result[name] = np.concatenate(arrs) # <<<<<<<<<<<<<< * * if warning_columns: */ __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1788; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s__concatenate); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1788; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1788; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_INCREF(((PyObject *)__pyx_v_arrs)); PyTuple_SET_ITEM(__pyx_t_8, 0, ((PyObject *)__pyx_v_arrs)); __Pyx_GIVEREF(((PyObject *)__pyx_v_arrs)); __pyx_t_4 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_8), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1788; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0; if (PyDict_SetItem(((PyObject *)__pyx_v_result), __pyx_v_name, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1788; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pandas/parser.pyx":1790 * result[name] = np.concatenate(arrs) * * if warning_columns: # <<<<<<<<<<<<<< * warning_names = ','.join(warning_columns) * warning_message = " ".join(["Columns (%s) have mixed types." % warning_names, */ __pyx_t_9 = (((PyObject *)__pyx_v_warning_columns) != Py_None) && (PyList_GET_SIZE(((PyObject *)__pyx_v_warning_columns)) != 0); if (__pyx_t_9) { /* "pandas/parser.pyx":1791 * * if warning_columns: * warning_names = ','.join(warning_columns) # <<<<<<<<<<<<<< * warning_message = " ".join(["Columns (%s) have mixed types." % warning_names, * "Specify dtype option on import or set low_memory=False." */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_kp_s_1), __pyx_n_s__join); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1791; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1791; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(((PyObject *)__pyx_v_warning_columns)); PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_v_warning_columns)); __Pyx_GIVEREF(((PyObject *)__pyx_v_warning_columns)); __pyx_t_8 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1791; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __pyx_v_warning_names = __pyx_t_8; __pyx_t_8 = 0; /* "pandas/parser.pyx":1792 * if warning_columns: * warning_names = ','.join(warning_columns) * warning_message = " ".join(["Columns (%s) have mixed types." % warning_names, # <<<<<<<<<<<<<< * "Specify dtype option on import or set low_memory=False." * ]) */ __pyx_t_8 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_kp_s_91), __pyx_n_s__join); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1792; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_4 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_92), __pyx_v_warning_names); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1792; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_4)); __pyx_t_1 = PyList_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1792; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); PyList_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_t_4)); __Pyx_GIVEREF(((PyObject *)__pyx_t_4)); __Pyx_INCREF(((PyObject *)__pyx_kp_s_93)); PyList_SET_ITEM(__pyx_t_1, 1, ((PyObject *)__pyx_kp_s_93)); __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_93)); __pyx_t_4 = 0; __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1792; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_t_1)); __Pyx_GIVEREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_t_1 = PyObject_Call(__pyx_t_8, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1792; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __pyx_v_warning_message = __pyx_t_1; __pyx_t_1 = 0; /* "pandas/parser.pyx":1795 * "Specify dtype option on import or set low_memory=False." * ]) * warnings.warn(warning_message, DtypeWarning) # <<<<<<<<<<<<<< * return result * */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__warnings); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1795; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s__warn); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1795; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__DtypeWarning); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1795; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1795; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_INCREF(__pyx_v_warning_message); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_v_warning_message); __Pyx_GIVEREF(__pyx_v_warning_message); PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_8), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1795; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L11; } __pyx_L11:; /* "pandas/parser.pyx":1796 * ]) * warnings.warn(warning_message, DtypeWarning) * return result # <<<<<<<<<<<<<< * * #---------------------------------------------------------------------- */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_result)); __pyx_r = ((PyObject *)__pyx_v_result); goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_AddTraceback("pandas.parser._concatenate_chunks", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_names); __Pyx_XDECREF(__pyx_v_name); __Pyx_XDECREF(__pyx_v_warning_columns); __Pyx_XDECREF(__pyx_v_warning_names); __Pyx_XDECREF(__pyx_v_common_type); __Pyx_XDECREF(__pyx_v_result); __Pyx_XDECREF(__pyx_v_arrs); __Pyx_XDECREF(__pyx_v_dtypes); __Pyx_XDECREF(__pyx_v_warning_message); __Pyx_XDECREF(__pyx_v_chunk); __Pyx_XDECREF(__pyx_v_a); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_6parser_11_compute_na_values(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_6parser_11_compute_na_values = {__Pyx_NAMESTR("_compute_na_values"), (PyCFunction)__pyx_pw_6pandas_6parser_11_compute_na_values, METH_NOARGS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_6parser_11_compute_na_values(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_compute_na_values (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_6parser_10_compute_na_values(__pyx_self); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/parser.pyx":1801 * * # NA values * def _compute_na_values(): # <<<<<<<<<<<<<< * int64info = np.iinfo(np.int64) * int32info = np.iinfo(np.int32) */ static PyObject *__pyx_pf_6pandas_6parser_10_compute_na_values(CYTHON_UNUSED PyObject *__pyx_self) { PyObject *__pyx_v_int64info = NULL; PyObject *__pyx_v_int32info = NULL; PyObject *__pyx_v_int16info = NULL; PyObject *__pyx_v_int8info = NULL; PyObject *__pyx_v_uint64info = NULL; PyObject *__pyx_v_uint32info = NULL; PyObject *__pyx_v_uint16info = NULL; PyObject *__pyx_v_uint8info = NULL; PyObject *__pyx_v_na_values = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_compute_na_values", 0); /* "pandas/parser.pyx":1802 * # NA values * def _compute_na_values(): * int64info = np.iinfo(np.int64) # <<<<<<<<<<<<<< * int32info = np.iinfo(np.int32) * int16info = np.iinfo(np.int16) */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1802; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s__iinfo); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1802; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1802; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s__int64); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1802; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1802; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1802; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_v_int64info = __pyx_t_3; __pyx_t_3 = 0; /* "pandas/parser.pyx":1803 * def _compute_na_values(): * int64info = np.iinfo(np.int64) * int32info = np.iinfo(np.int32) # <<<<<<<<<<<<<< * int16info = np.iinfo(np.int16) * int8info = np.iinfo(np.int8) */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1803; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s__iinfo); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1803; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1803; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s__int32); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1803; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1803; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1803; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; __pyx_v_int32info = __pyx_t_2; __pyx_t_2 = 0; /* "pandas/parser.pyx":1804 * int64info = np.iinfo(np.int64) * int32info = np.iinfo(np.int32) * int16info = np.iinfo(np.int16) # <<<<<<<<<<<<<< * int8info = np.iinfo(np.int8) * uint64info = np.iinfo(np.uint64) */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1804; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__iinfo); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1804; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1804; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__int16); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1804; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1804; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1804; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __pyx_v_int16info = __pyx_t_1; __pyx_t_1 = 0; /* "pandas/parser.pyx":1805 * int32info = np.iinfo(np.int32) * int16info = np.iinfo(np.int16) * int8info = np.iinfo(np.int8) # <<<<<<<<<<<<<< * uint64info = np.iinfo(np.uint64) * uint32info = np.iinfo(np.uint32) */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1805; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s__iinfo); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1805; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1805; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s__int8); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1805; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1805; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1805; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_v_int8info = __pyx_t_3; __pyx_t_3 = 0; /* "pandas/parser.pyx":1806 * int16info = np.iinfo(np.int16) * int8info = np.iinfo(np.int8) * uint64info = np.iinfo(np.uint64) # <<<<<<<<<<<<<< * uint32info = np.iinfo(np.uint32) * uint16info = np.iinfo(np.uint16) */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1806; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s__iinfo); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1806; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1806; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s__uint64); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1806; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1806; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1806; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; __pyx_v_uint64info = __pyx_t_2; __pyx_t_2 = 0; /* "pandas/parser.pyx":1807 * int8info = np.iinfo(np.int8) * uint64info = np.iinfo(np.uint64) * uint32info = np.iinfo(np.uint32) # <<<<<<<<<<<<<< * uint16info = np.iinfo(np.uint16) * uint8info = np.iinfo(np.uint8) */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1807; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__iinfo); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1807; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1807; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__uint32); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1807; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1807; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1807; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __pyx_v_uint32info = __pyx_t_1; __pyx_t_1 = 0; /* "pandas/parser.pyx":1808 * uint64info = np.iinfo(np.uint64) * uint32info = np.iinfo(np.uint32) * uint16info = np.iinfo(np.uint16) # <<<<<<<<<<<<<< * uint8info = np.iinfo(np.uint8) * na_values = { */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1808; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s__iinfo); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1808; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1808; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s__uint16); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1808; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1808; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1808; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_v_uint16info = __pyx_t_3; __pyx_t_3 = 0; /* "pandas/parser.pyx":1809 * uint32info = np.iinfo(np.uint32) * uint16info = np.iinfo(np.uint16) * uint8info = np.iinfo(np.uint8) # <<<<<<<<<<<<<< * na_values = { * np.float64 : np.nan, */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1809; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s__iinfo); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1809; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1809; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s__uint8); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1809; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1809; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1809; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; __pyx_v_uint8info = __pyx_t_2; __pyx_t_2 = 0; /* "pandas/parser.pyx":1810 * uint16info = np.iinfo(np.uint16) * uint8info = np.iinfo(np.uint8) * na_values = { # <<<<<<<<<<<<<< * np.float64 : np.nan, * np.int64 : int64info.min, */ __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1810; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_2)); /* "pandas/parser.pyx":1811 * uint8info = np.iinfo(np.uint8) * na_values = { * np.float64 : np.nan, # <<<<<<<<<<<<<< * np.int64 : int64info.min, * np.int32 : int32info.min, */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1811; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s__float64); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1811; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1811; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s__nan); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1811; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (PyDict_SetItem(__pyx_t_2, __pyx_t_1, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1810; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "pandas/parser.pyx":1812 * na_values = { * np.float64 : np.nan, * np.int64 : int64info.min, # <<<<<<<<<<<<<< * np.int32 : int32info.min, * np.int16 : int16info.min, */ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1812; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s__int64); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1812; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_int64info, __pyx_n_s__min); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1812; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); if (PyDict_SetItem(__pyx_t_2, __pyx_t_1, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1810; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "pandas/parser.pyx":1813 * np.float64 : np.nan, * np.int64 : int64info.min, * np.int32 : int32info.min, # <<<<<<<<<<<<<< * np.int16 : int16info.min, * np.int8 : int8info.min, */ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1813; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s__int32); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1813; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_int32info, __pyx_n_s__min); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1813; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); if (PyDict_SetItem(__pyx_t_2, __pyx_t_1, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1810; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "pandas/parser.pyx":1814 * np.int64 : int64info.min, * np.int32 : int32info.min, * np.int16 : int16info.min, # <<<<<<<<<<<<<< * np.int8 : int8info.min, * np.uint64 : uint64info.max, */ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1814; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s__int16); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1814; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_int16info, __pyx_n_s__min); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1814; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); if (PyDict_SetItem(__pyx_t_2, __pyx_t_1, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1810; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "pandas/parser.pyx":1815 * np.int32 : int32info.min, * np.int16 : int16info.min, * np.int8 : int8info.min, # <<<<<<<<<<<<<< * np.uint64 : uint64info.max, * np.uint32 : uint32info.max, */ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1815; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s__int8); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1815; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_int8info, __pyx_n_s__min); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1815; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); if (PyDict_SetItem(__pyx_t_2, __pyx_t_1, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1810; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "pandas/parser.pyx":1816 * np.int16 : int16info.min, * np.int8 : int8info.min, * np.uint64 : uint64info.max, # <<<<<<<<<<<<<< * np.uint32 : uint32info.max, * np.uint16 : uint16info.max, */ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1816; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s__uint64); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1816; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_uint64info, __pyx_n_s__max); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1816; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); if (PyDict_SetItem(__pyx_t_2, __pyx_t_1, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1810; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "pandas/parser.pyx":1817 * np.int8 : int8info.min, * np.uint64 : uint64info.max, * np.uint32 : uint32info.max, # <<<<<<<<<<<<<< * np.uint16 : uint16info.max, * np.uint8 : uint8info.max, */ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1817; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s__uint32); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1817; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_uint32info, __pyx_n_s__max); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1817; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); if (PyDict_SetItem(__pyx_t_2, __pyx_t_1, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1810; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "pandas/parser.pyx":1818 * np.uint64 : uint64info.max, * np.uint32 : uint32info.max, * np.uint16 : uint16info.max, # <<<<<<<<<<<<<< * np.uint8 : uint8info.max, * np.bool_ : uint8info.max, */ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1818; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s__uint16); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1818; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_uint16info, __pyx_n_s__max); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1818; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); if (PyDict_SetItem(__pyx_t_2, __pyx_t_1, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1810; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "pandas/parser.pyx":1819 * np.uint32 : uint32info.max, * np.uint16 : uint16info.max, * np.uint8 : uint8info.max, # <<<<<<<<<<<<<< * np.bool_ : uint8info.max, * np.object_ : np.nan # oof */ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1819; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s__uint8); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1819; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_uint8info, __pyx_n_s__max); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1819; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); if (PyDict_SetItem(__pyx_t_2, __pyx_t_1, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1810; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "pandas/parser.pyx":1820 * np.uint16 : uint16info.max, * np.uint8 : uint8info.max, * np.bool_ : uint8info.max, # <<<<<<<<<<<<<< * np.object_ : np.nan # oof * } */ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1820; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s__bool_); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1820; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_uint8info, __pyx_n_s__max); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1820; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); if (PyDict_SetItem(__pyx_t_2, __pyx_t_1, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1810; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "pandas/parser.pyx":1821 * np.uint8 : uint8info.max, * np.bool_ : uint8info.max, * np.object_ : np.nan # oof # <<<<<<<<<<<<<< * } * return na_values */ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1821; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s__object_); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1821; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1821; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s__nan); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1821; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (PyDict_SetItem(__pyx_t_2, __pyx_t_1, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1810; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_na_values = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; /* "pandas/parser.pyx":1823 * np.object_ : np.nan # oof * } * return na_values # <<<<<<<<<<<<<< * * na_values = _compute_na_values() */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_na_values)); __pyx_r = ((PyObject *)__pyx_v_na_values); goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("pandas.parser._compute_na_values", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_int64info); __Pyx_XDECREF(__pyx_v_int32info); __Pyx_XDECREF(__pyx_v_int16info); __Pyx_XDECREF(__pyx_v_int8info); __Pyx_XDECREF(__pyx_v_uint64info); __Pyx_XDECREF(__pyx_v_uint32info); __Pyx_XDECREF(__pyx_v_uint16info); __Pyx_XDECREF(__pyx_v_uint8info); __Pyx_XDECREF(__pyx_v_na_values); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/parser.pyx":1831 * * * cdef _apply_converter(object f, parser_t *parser, int col, # <<<<<<<<<<<<<< * int line_start, int line_end, * char* c_encoding): */ static PyObject *__pyx_f_6pandas_6parser__apply_converter(PyObject *__pyx_v_f, parser_t *__pyx_v_parser, int __pyx_v_col, int __pyx_v_line_start, int __pyx_v_line_end, char *__pyx_v_c_encoding) { Py_ssize_t __pyx_v_i; size_t __pyx_v_lines; coliter_t __pyx_v_it; char *__pyx_v_word; char *__pyx_v_errors; PyArrayObject *__pyx_v_result = 0; PyObject *__pyx_v_val = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_result; __Pyx_Buffer __pyx_pybuffer_result; 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; int __pyx_t_11; int __pyx_t_12; int __pyx_t_13; size_t __pyx_t_14; Py_ssize_t __pyx_t_15; Py_ssize_t __pyx_t_16; PyObject **__pyx_t_17; Py_ssize_t __pyx_t_18; Py_ssize_t __pyx_t_19; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_apply_converter", 0); __pyx_pybuffer_result.pybuffer.buf = NULL; __pyx_pybuffer_result.refcount = 0; __pyx_pybuffernd_result.data = NULL; __pyx_pybuffernd_result.rcbuffer = &__pyx_pybuffer_result; /* "pandas/parser.pyx":1840 * coliter_t it * char *word * char *errors = "strict" # <<<<<<<<<<<<<< * ndarray[object] result * object val */ __pyx_v_errors = __pyx_k__strict; /* "pandas/parser.pyx":1844 * object val * * lines = line_end - line_start # <<<<<<<<<<<<<< * result = np.empty(lines, dtype=np.object_) * */ __pyx_v_lines = (__pyx_v_line_end - __pyx_v_line_start); /* "pandas/parser.pyx":1845 * * lines = line_end - line_start * result = np.empty(lines, dtype=np.object_) # <<<<<<<<<<<<<< * * coliter_setup(&it, parser, col, line_start) */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1845; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 1845; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_PyInt_FromSize_t(__pyx_v_lines); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1845; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1845; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1845; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1845; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s__object_); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1845; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__dtype), __pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1845; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_3), ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1845; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__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_filename = __pyx_f[0]; __pyx_lineno = 1845; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_6 = ((PyArrayObject *)__pyx_t_5); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_object, 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_result.rcbuffer->pybuffer, (PyObject*)__pyx_v_result, &__Pyx_TypeInfo_object, 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_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_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1845; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_6 = 0; __pyx_v_result = ((PyArrayObject *)__pyx_t_5); __pyx_t_5 = 0; /* "pandas/parser.pyx":1847 * result = np.empty(lines, dtype=np.object_) * * coliter_setup(&it, parser, col, line_start) # <<<<<<<<<<<<<< * * if not PY3 and c_encoding == NULL: */ coliter_setup((&__pyx_v_it), __pyx_v_parser, __pyx_v_col, __pyx_v_line_start); /* "pandas/parser.pyx":1849 * coliter_setup(&it, parser, col, line_start) * * if not PY3 and c_encoding == NULL: # <<<<<<<<<<<<<< * for i in range(lines): * word = COLITER_NEXT(it) */ __pyx_t_11 = ((!(__pyx_v_6pandas_6parser_PY3 != 0)) != 0); if (__pyx_t_11) { __pyx_t_12 = ((__pyx_v_c_encoding == NULL) != 0); __pyx_t_13 = __pyx_t_12; } else { __pyx_t_13 = __pyx_t_11; } if (__pyx_t_13) { /* "pandas/parser.pyx":1850 * * if not PY3 and c_encoding == NULL: * for i in range(lines): # <<<<<<<<<<<<<< * word = COLITER_NEXT(it) * val = PyBytes_FromString(word) */ __pyx_t_14 = __pyx_v_lines; for (__pyx_t_15 = 0; __pyx_t_15 < __pyx_t_14; __pyx_t_15+=1) { __pyx_v_i = __pyx_t_15; /* "pandas/parser.pyx":1851 * if not PY3 and c_encoding == NULL: * for i in range(lines): * word = COLITER_NEXT(it) # <<<<<<<<<<<<<< * val = PyBytes_FromString(word) * result[i] = f(val) */ __pyx_v_word = COLITER_NEXT(__pyx_v_it); /* "pandas/parser.pyx":1852 * for i in range(lines): * word = COLITER_NEXT(it) * val = PyBytes_FromString(word) # <<<<<<<<<<<<<< * result[i] = f(val) * elif ((PY3 and c_encoding == NULL) or c_encoding == b'utf-8'): */ __pyx_t_5 = ((PyObject *)PyBytes_FromString(__pyx_v_word)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1852; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_XDECREF_SET(__pyx_v_val, __pyx_t_5); __pyx_t_5 = 0; /* "pandas/parser.pyx":1853 * word = COLITER_NEXT(it) * val = PyBytes_FromString(word) * result[i] = f(val) # <<<<<<<<<<<<<< * elif ((PY3 and c_encoding == NULL) or c_encoding == b'utf-8'): * for i in range(lines): */ __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1853; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_v_val); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_val); __Pyx_GIVEREF(__pyx_v_val); __pyx_t_1 = PyObject_Call(__pyx_v_f, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1853; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; __pyx_t_16 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_16 < 0) { __pyx_t_16 += __pyx_pybuffernd_result.diminfo[0].shape; if (unlikely(__pyx_t_16 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_16 >= __pyx_pybuffernd_result.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1853; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_17 = __Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_result.diminfo[0].strides); __Pyx_GOTREF(*__pyx_t_17); __Pyx_INCREF(__pyx_t_1); __Pyx_DECREF(*__pyx_t_17); *__pyx_t_17 = __pyx_t_1; __Pyx_GIVEREF(*__pyx_t_17); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } goto __pyx_L3; } /* "pandas/parser.pyx":1854 * val = PyBytes_FromString(word) * result[i] = f(val) * elif ((PY3 and c_encoding == NULL) or c_encoding == b'utf-8'): # <<<<<<<<<<<<<< * for i in range(lines): * word = COLITER_NEXT(it) */ if (__pyx_v_6pandas_6parser_PY3) { __pyx_t_13 = (__pyx_v_c_encoding == NULL); __pyx_t_11 = __pyx_t_13; } else { __pyx_t_11 = __pyx_v_6pandas_6parser_PY3; } if (!__pyx_t_11) { __pyx_t_1 = __Pyx_PyBytes_FromString(__pyx_v_c_encoding); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1854; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_t_5 = PyObject_RichCompare(((PyObject *)__pyx_t_1), ((PyObject *)__pyx_kp_b_32), Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1854; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_13 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1854; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_12 = __pyx_t_13; } else { __pyx_t_12 = __pyx_t_11; } if (__pyx_t_12) { /* "pandas/parser.pyx":1855 * result[i] = f(val) * elif ((PY3 and c_encoding == NULL) or c_encoding == b'utf-8'): * for i in range(lines): # <<<<<<<<<<<<<< * word = COLITER_NEXT(it) * val = PyUnicode_FromString(word) */ __pyx_t_14 = __pyx_v_lines; for (__pyx_t_15 = 0; __pyx_t_15 < __pyx_t_14; __pyx_t_15+=1) { __pyx_v_i = __pyx_t_15; /* "pandas/parser.pyx":1856 * elif ((PY3 and c_encoding == NULL) or c_encoding == b'utf-8'): * for i in range(lines): * word = COLITER_NEXT(it) # <<<<<<<<<<<<<< * val = PyUnicode_FromString(word) * result[i] = f(val) */ __pyx_v_word = COLITER_NEXT(__pyx_v_it); /* "pandas/parser.pyx":1857 * for i in range(lines): * word = COLITER_NEXT(it) * val = PyUnicode_FromString(word) # <<<<<<<<<<<<<< * result[i] = f(val) * else: */ __pyx_t_5 = PyUnicode_FromString(__pyx_v_word); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1857; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_XDECREF_SET(__pyx_v_val, __pyx_t_5); __pyx_t_5 = 0; /* "pandas/parser.pyx":1858 * word = COLITER_NEXT(it) * val = PyUnicode_FromString(word) * result[i] = f(val) # <<<<<<<<<<<<<< * else: * for i in range(lines): */ __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1858; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_v_val); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_val); __Pyx_GIVEREF(__pyx_v_val); __pyx_t_1 = PyObject_Call(__pyx_v_f, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1858; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; __pyx_t_18 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_18 < 0) { __pyx_t_18 += __pyx_pybuffernd_result.diminfo[0].shape; if (unlikely(__pyx_t_18 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_18 >= __pyx_pybuffernd_result.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1858; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_17 = __Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_result.diminfo[0].strides); __Pyx_GOTREF(*__pyx_t_17); __Pyx_INCREF(__pyx_t_1); __Pyx_DECREF(*__pyx_t_17); *__pyx_t_17 = __pyx_t_1; __Pyx_GIVEREF(*__pyx_t_17); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } goto __pyx_L3; } /*else*/ { /* "pandas/parser.pyx":1860 * result[i] = f(val) * else: * for i in range(lines): # <<<<<<<<<<<<<< * word = COLITER_NEXT(it) * val = PyUnicode_Decode(word, strlen(word), */ __pyx_t_14 = __pyx_v_lines; for (__pyx_t_15 = 0; __pyx_t_15 < __pyx_t_14; __pyx_t_15+=1) { __pyx_v_i = __pyx_t_15; /* "pandas/parser.pyx":1861 * else: * for i in range(lines): * word = COLITER_NEXT(it) # <<<<<<<<<<<<<< * val = PyUnicode_Decode(word, strlen(word), * c_encoding, errors) */ __pyx_v_word = COLITER_NEXT(__pyx_v_it); /* "pandas/parser.pyx":1863 * word = COLITER_NEXT(it) * val = PyUnicode_Decode(word, strlen(word), * c_encoding, errors) # <<<<<<<<<<<<<< * result[i] = f(val) * */ __pyx_t_1 = PyUnicode_Decode(__pyx_v_word, strlen(__pyx_v_word), __pyx_v_c_encoding, __pyx_v_errors); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1862; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_XDECREF_SET(__pyx_v_val, __pyx_t_1); __pyx_t_1 = 0; /* "pandas/parser.pyx":1864 * val = PyUnicode_Decode(word, strlen(word), * c_encoding, errors) * result[i] = f(val) # <<<<<<<<<<<<<< * * return lib.maybe_convert_objects(result) */ __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1864; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_val); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_val); __Pyx_GIVEREF(__pyx_v_val); __pyx_t_5 = PyObject_Call(__pyx_v_f, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1864; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_t_19 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_19 < 0) { __pyx_t_19 += __pyx_pybuffernd_result.diminfo[0].shape; if (unlikely(__pyx_t_19 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_19 >= __pyx_pybuffernd_result.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1864; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_17 = __Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_result.diminfo[0].strides); __Pyx_GOTREF(*__pyx_t_17); __Pyx_INCREF(__pyx_t_5); __Pyx_DECREF(*__pyx_t_17); *__pyx_t_17 = __pyx_t_5; __Pyx_GIVEREF(*__pyx_t_17); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } } __pyx_L3:; /* "pandas/parser.pyx":1866 * result[i] = f(val) * * return lib.maybe_convert_objects(result) # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s__lib); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1866; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_94); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1866; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1866; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(((PyObject *)__pyx_v_result)); PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_v_result)); __Pyx_GIVEREF(((PyObject *)__pyx_v_result)); __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1866; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.parser._apply_converter", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_result); __Pyx_XDECREF(__pyx_v_val); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_6parser_13_to_structured_array(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_6parser_13_to_structured_array = {__Pyx_NAMESTR("_to_structured_array"), (PyCFunction)__pyx_pw_6pandas_6parser_13_to_structured_array, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_6parser_13_to_structured_array(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_columns = 0; PyObject *__pyx_v_names = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_to_structured_array (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__columns,&__pyx_n_s__names,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__columns)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__names)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("_to_structured_array", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1869; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_to_structured_array") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1869; __pyx_clineno = __LINE__; goto __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_columns = ((PyObject*)values[0]); __pyx_v_names = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("_to_structured_array", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1869; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.parser._to_structured_array", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_columns), (&PyDict_Type), 1, "columns", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1869; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_6parser_12_to_structured_array(__pyx_self, __pyx_v_columns, __pyx_v_names); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/parser.pyx":1869 * * * def _to_structured_array(dict columns, object names): # <<<<<<<<<<<<<< * cdef: * ndarray recs, column */ static PyObject *__pyx_pf_6pandas_6parser_12_to_structured_array(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_columns, PyObject *__pyx_v_names) { PyArrayObject *__pyx_v_recs = 0; PyArrayObject *__pyx_v_column = 0; PyArray_Descr *__pyx_v_dt = 0; PyObject *__pyx_v_fields = 0; PyObject *__pyx_v_name = 0; PyObject *__pyx_v_fnames = 0; PyObject *__pyx_v_field_type = 0; Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_offset; Py_ssize_t __pyx_v_nfields; Py_ssize_t __pyx_v_length; int __pyx_v_stride; int __pyx_v_elsize; char *__pyx_v_buf; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; Py_ssize_t __pyx_t_4; Py_ssize_t __pyx_t_5; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *(*__pyx_t_8)(PyObject *); PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; PyObject *__pyx_t_11 = NULL; int __pyx_t_12; Py_ssize_t __pyx_t_13; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_to_structured_array", 0); __Pyx_INCREF(__pyx_v_names); /* "pandas/parser.pyx":1880 * char *buf * * if names is None: # <<<<<<<<<<<<<< * names = ['%d' % i for i in range(len(columns))] * else: */ __pyx_t_1 = (__pyx_v_names == Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { /* "pandas/parser.pyx":1881 * * if names is None: * names = ['%d' % i for i in range(len(columns))] # <<<<<<<<<<<<<< * else: * # single line header */ __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1881; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (unlikely(((PyObject *)__pyx_v_columns) == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1881; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_4 = PyDict_Size(((PyObject *)__pyx_v_columns)); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1881; __pyx_clineno = __LINE__; goto __pyx_L1_error;} for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) { __pyx_v_i = __pyx_t_5; __pyx_t_6 = PyInt_FromSsize_t(__pyx_v_i); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1881; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_95), __pyx_t_6); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1881; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_7)); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(__Pyx_ListComp_Append(__pyx_t_3, (PyObject*)__pyx_t_7))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1881; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0; } __Pyx_DECREF_SET(__pyx_v_names, ((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; goto __pyx_L3; } /*else*/ { /* "pandas/parser.pyx":1884 * else: * # single line header * names = names[0] # <<<<<<<<<<<<<< * * dt = np.dtype([(str(name), columns[i].dtype) */ __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_names, 0, sizeof(long), PyInt_FromLong, 0, 0, 1); if (!__pyx_t_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1884; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF_SET(__pyx_v_names, __pyx_t_3); __pyx_t_3 = 0; } __pyx_L3:; /* "pandas/parser.pyx":1886 * names = names[0] * * dt = np.dtype([(str(name), columns[i].dtype) # <<<<<<<<<<<<<< * for i, name in enumerate(names)]) * fnames = dt.names */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1886; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s__dtype); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1886; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1886; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = 0; /* "pandas/parser.pyx":1887 * * dt = np.dtype([(str(name), columns[i].dtype) * for i, name in enumerate(names)]) # <<<<<<<<<<<<<< * fnames = dt.names * fields = dt.fields */ if (PyList_CheckExact(__pyx_v_names) || PyTuple_CheckExact(__pyx_v_names)) { __pyx_t_6 = __pyx_v_names; __Pyx_INCREF(__pyx_t_6); __pyx_t_5 = 0; __pyx_t_8 = NULL; } else { __pyx_t_5 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_v_names); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1887; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_8 = Py_TYPE(__pyx_t_6)->tp_iternext; } for (;;) { if (!__pyx_t_8 && PyList_CheckExact(__pyx_t_6)) { if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_6)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_9 = PyList_GET_ITEM(__pyx_t_6, __pyx_t_5); __Pyx_INCREF(__pyx_t_9); __pyx_t_5++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1887; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_9 = PySequence_ITEM(__pyx_t_6, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1887; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif } else if (!__pyx_t_8 && PyTuple_CheckExact(__pyx_t_6)) { if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_6)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_9 = PyTuple_GET_ITEM(__pyx_t_6, __pyx_t_5); __Pyx_INCREF(__pyx_t_9); __pyx_t_5++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1887; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_9 = PySequence_ITEM(__pyx_t_6, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1887; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif } else { __pyx_t_9 = __pyx_t_8(__pyx_t_6); if (unlikely(!__pyx_t_9)) { if (PyErr_Occurred()) { if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear(); else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1887; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } break; } __Pyx_GOTREF(__pyx_t_9); } __Pyx_XDECREF_SET(__pyx_v_name, __pyx_t_9); __pyx_t_9 = 0; __pyx_v_i = __pyx_t_4; __pyx_t_4 = (__pyx_t_4 + 1); /* "pandas/parser.pyx":1886 * names = names[0] * * dt = np.dtype([(str(name), columns[i].dtype) # <<<<<<<<<<<<<< * for i, name in enumerate(names)]) * fnames = dt.names */ __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1886; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_INCREF(__pyx_v_name); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_v_name); __Pyx_GIVEREF(__pyx_v_name); __pyx_t_10 = PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), ((PyObject *)__pyx_t_9), NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1886; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(((PyObject *)__pyx_t_9)); __pyx_t_9 = 0; if (unlikely(((PyObject *)__pyx_v_columns) == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1886; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_9 = __Pyx_GetItemInt(((PyObject *)__pyx_v_columns), __pyx_v_i, sizeof(Py_ssize_t), PyInt_FromSsize_t, 0, 1, 1); if (!__pyx_t_9) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1886; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s__dtype); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1886; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_9 = PyTuple_New(2); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1886; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_10); __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_t_11); __Pyx_GIVEREF(__pyx_t_11); __pyx_t_10 = 0; __pyx_t_11 = 0; if (unlikely(__Pyx_ListComp_Append(__pyx_t_3, (PyObject*)__pyx_t_9))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1886; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(((PyObject *)__pyx_t_9)); __pyx_t_9 = 0; } __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1886; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_t_3)); __Pyx_GIVEREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; __pyx_t_3 = PyObject_Call(__pyx_t_7, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1886; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0; if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_dtype))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1886; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_dt = ((PyArray_Descr *)__pyx_t_3); __pyx_t_3 = 0; /* "pandas/parser.pyx":1888 * dt = np.dtype([(str(name), columns[i].dtype) * for i, name in enumerate(names)]) * fnames = dt.names # <<<<<<<<<<<<<< * fields = dt.fields * */ __pyx_t_3 = ((PyObject *)__pyx_v_dt->names); __Pyx_INCREF(__pyx_t_3); __pyx_v_fnames = __pyx_t_3; __pyx_t_3 = 0; /* "pandas/parser.pyx":1889 * for i, name in enumerate(names)]) * fnames = dt.names * fields = dt.fields # <<<<<<<<<<<<<< * * nfields = len(fields) */ if (!(likely(PyDict_CheckExact(__pyx_v_dt->fields))||((__pyx_v_dt->fields) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected dict, got %.200s", Py_TYPE(__pyx_v_dt->fields)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1889; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_INCREF(__pyx_v_dt->fields); __pyx_v_fields = ((PyObject*)__pyx_v_dt->fields); /* "pandas/parser.pyx":1891 * fields = dt.fields * * nfields = len(fields) # <<<<<<<<<<<<<< * * if PY3: */ if (unlikely(((PyObject *)__pyx_v_fields) == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1891; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_4 = PyDict_Size(((PyObject *)__pyx_v_fields)); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1891; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_nfields = __pyx_t_4; /* "pandas/parser.pyx":1893 * nfields = len(fields) * * if PY3: # <<<<<<<<<<<<<< * length = len(list(columns.values())[0]) * else: */ __pyx_t_2 = (__pyx_v_6pandas_6parser_PY3 != 0); if (__pyx_t_2) { /* "pandas/parser.pyx":1894 * * if PY3: * length = len(list(columns.values())[0]) # <<<<<<<<<<<<<< * else: * length = len(columns.values()[0]) */ if (unlikely(((PyObject *)__pyx_v_columns) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "values"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1894; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_3 = __Pyx_PyDict_Values(__pyx_v_columns); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1894; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1894; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyObject_Call(((PyObject *)((PyObject*)(&PyList_Type))), ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1894; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0; __pyx_t_6 = __Pyx_GetItemInt_List(__pyx_t_3, 0, sizeof(long), PyInt_FromLong, 1, 0, 1); if (!__pyx_t_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1894; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_4 = PyObject_Length(__pyx_t_6); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1894; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_v_length = __pyx_t_4; goto __pyx_L8; } /*else*/ { /* "pandas/parser.pyx":1896 * length = len(list(columns.values())[0]) * else: * length = len(columns.values()[0]) # <<<<<<<<<<<<<< * * stride = dt.itemsize */ if (unlikely(((PyObject *)__pyx_v_columns) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "values"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1896; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_6 = __Pyx_PyDict_Values(__pyx_v_columns); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1896; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_6, 0, sizeof(long), PyInt_FromLong, 0, 0, 1); if (!__pyx_t_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1896; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_4 = PyObject_Length(__pyx_t_3); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1896; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_length = __pyx_t_4; } __pyx_L8:; /* "pandas/parser.pyx":1898 * length = len(columns.values()[0]) * * stride = dt.itemsize # <<<<<<<<<<<<<< * * # start = time.time() */ __pyx_t_12 = __pyx_v_dt->elsize; __pyx_v_stride = __pyx_t_12; /* "pandas/parser.pyx":1903 * * # we own the data * buf = malloc(length * stride) # <<<<<<<<<<<<<< * * recs = util.sarr_from_data(dt, length, buf) */ __pyx_v_buf = ((char *)malloc((__pyx_v_length * __pyx_v_stride))); /* "pandas/parser.pyx":1905 * buf = malloc(length * stride) * * recs = util.sarr_from_data(dt, length, buf) # <<<<<<<<<<<<<< * assert(recs.flags.owndata) * */ __pyx_t_3 = sarr_from_data(__pyx_v_dt, __pyx_v_length, __pyx_v_buf); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1905; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1905; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_recs = ((PyArrayObject *)__pyx_t_3); __pyx_t_3 = 0; /* "pandas/parser.pyx":1906 * * recs = util.sarr_from_data(dt, length, buf) * assert(recs.flags.owndata) # <<<<<<<<<<<<<< * * # buf = recs.data */ #ifndef CYTHON_WITHOUT_ASSERTIONS __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_recs), __pyx_n_s__flags); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1906; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s__owndata); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1906; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1906; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(!__pyx_t_2)) { PyErr_SetNone(PyExc_AssertionError); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1906; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #endif /* "pandas/parser.pyx":1912 * # print 'took %.4f' % (end - start) * * for i in range(nfields): # <<<<<<<<<<<<<< * # start = time.clock() * # name = names[i] */ __pyx_t_4 = __pyx_v_nfields; for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) { __pyx_v_i = __pyx_t_5; /* "pandas/parser.pyx":1917 * * # XXX * field_type = fields[fnames[i]] # <<<<<<<<<<<<<< * * # (dtype, stride) tuple */ if (unlikely(((PyObject *)__pyx_v_fields) == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1917; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_fnames, __pyx_v_i, sizeof(Py_ssize_t), PyInt_FromSsize_t, 0, 1, 1); if (!__pyx_t_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1917; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_3 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_fields), __pyx_t_6); if (!__pyx_t_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1917; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF_SET(__pyx_v_field_type, __pyx_t_3); __pyx_t_3 = 0; /* "pandas/parser.pyx":1920 * * # (dtype, stride) tuple * offset = field_type[1] # <<<<<<<<<<<<<< * elsize = field_type[0].itemsize * column = columns[i] */ __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_field_type, 1, sizeof(long), PyInt_FromLong, 0, 0, 1); if (!__pyx_t_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1920; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_13 = __Pyx_PyIndex_AsSsize_t(__pyx_t_3); if (unlikely((__pyx_t_13 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1920; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_offset = __pyx_t_13; /* "pandas/parser.pyx":1921 * # (dtype, stride) tuple * offset = field_type[1] * elsize = field_type[0].itemsize # <<<<<<<<<<<<<< * column = columns[i] * */ __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_field_type, 0, sizeof(long), PyInt_FromLong, 0, 0, 1); if (!__pyx_t_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1921; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s__itemsize); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1921; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_12 = __Pyx_PyInt_AsInt(__pyx_t_6); if (unlikely((__pyx_t_12 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1921; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_v_elsize = __pyx_t_12; /* "pandas/parser.pyx":1922 * offset = field_type[1] * elsize = field_type[0].itemsize * column = columns[i] # <<<<<<<<<<<<<< * * _fill_structured_column(buf + offset, column.data, */ if (unlikely(((PyObject *)__pyx_v_columns) == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1922; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_6 = __Pyx_GetItemInt(((PyObject *)__pyx_v_columns), __pyx_v_i, sizeof(Py_ssize_t), PyInt_FromSsize_t, 0, 1, 1); if (!__pyx_t_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1922; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1922; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_XDECREF_SET(__pyx_v_column, ((PyArrayObject *)__pyx_t_6)); __pyx_t_6 = 0; /* "pandas/parser.pyx":1926 * _fill_structured_column(buf + offset, column.data, * elsize, stride, length, * field_type[0] == np.object_) # <<<<<<<<<<<<<< * * # print 'Transfer of %s took %.4f' % (str(field_type), */ __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_field_type, 0, sizeof(long), PyInt_FromLong, 0, 0, 1); if (!__pyx_t_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1926; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1926; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s__object_); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1926; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyObject_RichCompare(__pyx_t_6, __pyx_t_7, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1926; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1926; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __pyx_f_6pandas_6parser__fill_structured_column((__pyx_v_buf + __pyx_v_offset), ((char *)__pyx_v_column->data), __pyx_v_elsize, __pyx_v_stride, __pyx_v_length, __pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1924; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } /* "pandas/parser.pyx":1931 * # time.clock() - start) * * return recs # <<<<<<<<<<<<<< * * cdef _fill_structured_column(char *dst, char* src, int elsize, */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_recs)); __pyx_r = ((PyObject *)__pyx_v_recs); goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_9); __Pyx_XDECREF(__pyx_t_10); __Pyx_XDECREF(__pyx_t_11); __Pyx_AddTraceback("pandas.parser._to_structured_array", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_recs); __Pyx_XDECREF((PyObject *)__pyx_v_column); __Pyx_XDECREF((PyObject *)__pyx_v_dt); __Pyx_XDECREF(__pyx_v_fields); __Pyx_XDECREF(__pyx_v_name); __Pyx_XDECREF(__pyx_v_fnames); __Pyx_XDECREF(__pyx_v_field_type); __Pyx_XDECREF(__pyx_v_names); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/parser.pyx":1933 * return recs * * cdef _fill_structured_column(char *dst, char* src, int elsize, # <<<<<<<<<<<<<< * int stride, int length, bint incref): * cdef: */ static PyObject *__pyx_f_6pandas_6parser__fill_structured_column(char *__pyx_v_dst, char *__pyx_v_src, int __pyx_v_elsize, int __pyx_v_stride, int __pyx_v_length, int __pyx_v_incref) { CYTHON_UNUSED size_t __pyx_v_i; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; size_t __pyx_t_3; __Pyx_RefNannySetupContext("_fill_structured_column", 0); /* "pandas/parser.pyx":1938 * size_t i * * if incref: # <<<<<<<<<<<<<< * util.transfer_object_column(dst, src, stride, length) * else: */ __pyx_t_1 = (__pyx_v_incref != 0); if (__pyx_t_1) { /* "pandas/parser.pyx":1939 * * if incref: * util.transfer_object_column(dst, src, stride, length) # <<<<<<<<<<<<<< * else: * for i in range(length): */ transfer_object_column(__pyx_v_dst, __pyx_v_src, __pyx_v_stride, __pyx_v_length); goto __pyx_L3; } /*else*/ { /* "pandas/parser.pyx":1941 * util.transfer_object_column(dst, src, stride, length) * else: * for i in range(length): # <<<<<<<<<<<<<< * memcpy(dst, src, elsize) * dst += stride */ __pyx_t_2 = __pyx_v_length; for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) { __pyx_v_i = __pyx_t_3; /* "pandas/parser.pyx":1942 * else: * for i in range(length): * memcpy(dst, src, elsize) # <<<<<<<<<<<<<< * dst += stride * src += elsize */ memcpy(__pyx_v_dst, __pyx_v_src, __pyx_v_elsize); /* "pandas/parser.pyx":1943 * for i in range(length): * memcpy(dst, src, elsize) * dst += stride # <<<<<<<<<<<<<< * src += elsize * */ __pyx_v_dst = (__pyx_v_dst + __pyx_v_stride); /* "pandas/parser.pyx":1944 * memcpy(dst, src, elsize) * dst += stride * src += elsize # <<<<<<<<<<<<<< * * */ __pyx_v_src = (__pyx_v_src + __pyx_v_elsize); } } __pyx_L3:; __pyx_r = Py_None; __Pyx_INCREF(Py_None); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_6parser_15_maybe_encode(PyObject *__pyx_self, PyObject *__pyx_v_values); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_6parser_15_maybe_encode = {__Pyx_NAMESTR("_maybe_encode"), (PyCFunction)__pyx_pw_6pandas_6parser_15_maybe_encode, METH_O, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_6parser_15_maybe_encode(PyObject *__pyx_self, PyObject *__pyx_v_values) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_maybe_encode (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_6parser_14_maybe_encode(__pyx_self, ((PyObject *)__pyx_v_values)); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/parser.pyx":1948 * * * def _maybe_encode(values): # <<<<<<<<<<<<<< * if values is None: * return [] */ static PyObject *__pyx_pf_6pandas_6parser_14_maybe_encode(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_values) { PyObject *__pyx_v_x = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; Py_ssize_t __pyx_t_5; PyObject *(*__pyx_t_6)(PyObject *); PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_maybe_encode", 0); /* "pandas/parser.pyx":1949 * * def _maybe_encode(values): * if values is None: # <<<<<<<<<<<<<< * return [] * return [x.encode('utf-8') if isinstance(x, unicode) else x for x in values] */ __pyx_t_1 = (__pyx_v_values == Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { /* "pandas/parser.pyx":1950 * def _maybe_encode(values): * if values is None: * return [] # <<<<<<<<<<<<<< * return [x.encode('utf-8') if isinstance(x, unicode) else x for x in values] */ __Pyx_XDECREF(__pyx_r); __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1950; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_r = ((PyObject *)__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L0; goto __pyx_L3; } __pyx_L3:; /* "pandas/parser.pyx":1951 * if values is None: * return [] * return [x.encode('utf-8') if isinstance(x, unicode) else x for x in values] # <<<<<<<<<<<<<< */ __Pyx_XDECREF(__pyx_r); __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1951; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyList_CheckExact(__pyx_v_values) || PyTuple_CheckExact(__pyx_v_values)) { __pyx_t_4 = __pyx_v_values; __Pyx_INCREF(__pyx_t_4); __pyx_t_5 = 0; __pyx_t_6 = NULL; } else { __pyx_t_5 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_v_values); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1951; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_6 = Py_TYPE(__pyx_t_4)->tp_iternext; } for (;;) { if (!__pyx_t_6 && PyList_CheckExact(__pyx_t_4)) { if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_4)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_7 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_7); __pyx_t_5++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1951; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_7 = PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1951; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif } else if (!__pyx_t_6 && PyTuple_CheckExact(__pyx_t_4)) { if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_4)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_7 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_7); __pyx_t_5++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1951; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_7 = PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1951; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif } else { __pyx_t_7 = __pyx_t_6(__pyx_t_4); if (unlikely(!__pyx_t_7)) { if (PyErr_Occurred()) { if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear(); else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1951; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } break; } __Pyx_GOTREF(__pyx_t_7); } __Pyx_XDECREF_SET(__pyx_v_x, __pyx_t_7); __pyx_t_7 = 0; __pyx_t_2 = PyUnicode_Check(__pyx_v_x); if ((__pyx_t_2 != 0)) { __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_x, __pyx_n_s__encode); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1951; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_9 = PyObject_Call(__pyx_t_8, ((PyObject *)__pyx_k_tuple_96), NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1951; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_7 = __pyx_t_9; __pyx_t_9 = 0; } else { __Pyx_INCREF(__pyx_v_x); __pyx_t_7 = __pyx_v_x; } if (unlikely(__Pyx_ListComp_Append(__pyx_t_3, (PyObject*)__pyx_t_7))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1951; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_r = ((PyObject *)__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); __Pyx_AddTraceback("pandas.parser._maybe_encode", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_x); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "util.pxd":26 * object sarr_from_data(cnp.dtype, int length, void* data) * * cdef inline object get_value_at(ndarray arr, object loc): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, sz */ static CYTHON_INLINE PyObject *__pyx_f_4util_get_value_at(PyArrayObject *__pyx_v_arr, PyObject *__pyx_v_loc) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_sz; PyObject *__pyx_v_casted = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; Py_ssize_t __pyx_t_4; int __pyx_t_5; int __pyx_t_6; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_value_at", 0); __Pyx_INCREF(__pyx_v_loc); /* "util.pxd":30 * Py_ssize_t i, sz * void* data_ptr * if is_float_object(loc): # <<<<<<<<<<<<<< * casted = int(loc) * if casted == loc: */ __pyx_t_1 = (is_float_object(__pyx_v_loc) != 0); if (__pyx_t_1) { /* "util.pxd":31 * void* data_ptr * if is_float_object(loc): * casted = int(loc) # <<<<<<<<<<<<<< * if casted == loc: * loc = casted */ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 31; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_loc); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_loc); __Pyx_GIVEREF(__pyx_v_loc); __pyx_t_3 = PyObject_Call(((PyObject *)((PyObject*)(&PyInt_Type))), ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 31; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __pyx_v_casted = __pyx_t_3; __pyx_t_3 = 0; /* "util.pxd":32 * if is_float_object(loc): * casted = int(loc) * if casted == loc: # <<<<<<<<<<<<<< * loc = casted * i = loc */ __pyx_t_3 = PyObject_RichCompare(__pyx_v_casted, __pyx_v_loc, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 32; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 32; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_1) { /* "util.pxd":33 * casted = int(loc) * if casted == loc: * loc = casted # <<<<<<<<<<<<<< * i = loc * sz = cnp.PyArray_SIZE(arr) */ __Pyx_INCREF(__pyx_v_casted); __Pyx_DECREF_SET(__pyx_v_loc, __pyx_v_casted); goto __pyx_L4; } __pyx_L4:; goto __pyx_L3; } __pyx_L3:; /* "util.pxd":34 * if casted == loc: * loc = casted * i = loc # <<<<<<<<<<<<<< * sz = cnp.PyArray_SIZE(arr) * */ __pyx_t_4 = __Pyx_PyIndex_AsSsize_t(__pyx_v_loc); if (unlikely((__pyx_t_4 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 34; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_i = ((Py_ssize_t)__pyx_t_4); /* "util.pxd":35 * loc = casted * i = loc * sz = cnp.PyArray_SIZE(arr) # <<<<<<<<<<<<<< * * if i < 0 and sz > 0: */ __pyx_v_sz = PyArray_SIZE(__pyx_v_arr); /* "util.pxd":37 * sz = cnp.PyArray_SIZE(arr) * * if i < 0 and sz > 0: # <<<<<<<<<<<<<< * i += sz * elif i >= sz or sz == 0: */ __pyx_t_1 = ((__pyx_v_i < 0) != 0); if (__pyx_t_1) { __pyx_t_5 = ((__pyx_v_sz > 0) != 0); __pyx_t_6 = __pyx_t_5; } else { __pyx_t_6 = __pyx_t_1; } if (__pyx_t_6) { /* "util.pxd":38 * * if i < 0 and sz > 0: * i += sz # <<<<<<<<<<<<<< * elif i >= sz or sz == 0: * raise IndexError('index out of bounds') */ __pyx_v_i = (__pyx_v_i + __pyx_v_sz); goto __pyx_L5; } /* "util.pxd":39 * if i < 0 and sz > 0: * i += sz * elif i >= sz or sz == 0: # <<<<<<<<<<<<<< * raise IndexError('index out of bounds') * */ __pyx_t_6 = ((__pyx_v_i >= __pyx_v_sz) != 0); if (!__pyx_t_6) { __pyx_t_1 = ((__pyx_v_sz == 0) != 0); __pyx_t_5 = __pyx_t_1; } else { __pyx_t_5 = __pyx_t_6; } if (__pyx_t_5) { /* "util.pxd":40 * i += sz * elif i >= sz or sz == 0: * raise IndexError('index out of bounds') # <<<<<<<<<<<<<< * * return get_value_1d(arr, i) */ __pyx_t_3 = PyObject_Call(__pyx_builtin_IndexError, ((PyObject *)__pyx_k_tuple_98), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 40; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 40; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L5; } __pyx_L5:; /* "util.pxd":42 * raise IndexError('index out of bounds') * * return get_value_1d(arr, i) # <<<<<<<<<<<<<< * * cdef inline set_value_at(ndarray arr, object loc, object value): */ __Pyx_XDECREF(__pyx_r); __pyx_t_3 = get_value_1d(__pyx_v_arr, __pyx_v_i); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 42; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("util.get_value_at", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_casted); __Pyx_XDECREF(__pyx_v_loc); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "util.pxd":44 * return get_value_1d(arr, i) * * cdef inline set_value_at(ndarray arr, object loc, object value): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, sz */ static CYTHON_INLINE PyObject *__pyx_f_4util_set_value_at(PyArrayObject *__pyx_v_arr, PyObject *__pyx_v_loc, PyObject *__pyx_v_value) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_sz; PyObject *__pyx_v_casted = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; Py_ssize_t __pyx_t_4; int __pyx_t_5; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("set_value_at", 0); __Pyx_INCREF(__pyx_v_loc); /* "util.pxd":47 * cdef: * Py_ssize_t i, sz * if is_float_object(loc): # <<<<<<<<<<<<<< * casted = int(loc) * if casted == loc: */ __pyx_t_1 = (is_float_object(__pyx_v_loc) != 0); if (__pyx_t_1) { /* "util.pxd":48 * Py_ssize_t i, sz * if is_float_object(loc): * casted = int(loc) # <<<<<<<<<<<<<< * if casted == loc: * loc = casted */ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_loc); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_loc); __Pyx_GIVEREF(__pyx_v_loc); __pyx_t_3 = PyObject_Call(((PyObject *)((PyObject*)(&PyInt_Type))), ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __pyx_v_casted = __pyx_t_3; __pyx_t_3 = 0; /* "util.pxd":49 * if is_float_object(loc): * casted = int(loc) * if casted == loc: # <<<<<<<<<<<<<< * loc = casted * i = loc */ __pyx_t_3 = PyObject_RichCompare(__pyx_v_casted, __pyx_v_loc, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_1) { /* "util.pxd":50 * casted = int(loc) * if casted == loc: * loc = casted # <<<<<<<<<<<<<< * i = loc * sz = cnp.PyArray_SIZE(arr) */ __Pyx_INCREF(__pyx_v_casted); __Pyx_DECREF_SET(__pyx_v_loc, __pyx_v_casted); goto __pyx_L4; } __pyx_L4:; goto __pyx_L3; } __pyx_L3:; /* "util.pxd":51 * if casted == loc: * loc = casted * i = loc # <<<<<<<<<<<<<< * sz = cnp.PyArray_SIZE(arr) * */ __pyx_t_4 = __Pyx_PyIndex_AsSsize_t(__pyx_v_loc); if (unlikely((__pyx_t_4 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_i = ((Py_ssize_t)__pyx_t_4); /* "util.pxd":52 * loc = casted * i = loc * sz = cnp.PyArray_SIZE(arr) # <<<<<<<<<<<<<< * * if i < 0: */ __pyx_v_sz = PyArray_SIZE(__pyx_v_arr); /* "util.pxd":54 * sz = cnp.PyArray_SIZE(arr) * * if i < 0: # <<<<<<<<<<<<<< * i += sz * elif i >= sz: */ __pyx_t_1 = ((__pyx_v_i < 0) != 0); if (__pyx_t_1) { /* "util.pxd":55 * * if i < 0: * i += sz # <<<<<<<<<<<<<< * elif i >= sz: * raise IndexError('index out of bounds') */ __pyx_v_i = (__pyx_v_i + __pyx_v_sz); goto __pyx_L5; } /* "util.pxd":56 * if i < 0: * i += sz * elif i >= sz: # <<<<<<<<<<<<<< * raise IndexError('index out of bounds') * */ __pyx_t_1 = ((__pyx_v_i >= __pyx_v_sz) != 0); if (__pyx_t_1) { /* "util.pxd":57 * i += sz * elif i >= sz: * raise IndexError('index out of bounds') # <<<<<<<<<<<<<< * * assign_value_1d(arr, i, value) */ __pyx_t_3 = PyObject_Call(__pyx_builtin_IndexError, ((PyObject *)__pyx_k_tuple_99), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 57; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 57; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L5; } __pyx_L5:; /* "util.pxd":59 * raise IndexError('index out of bounds') * * assign_value_1d(arr, i, value) # <<<<<<<<<<<<<< * * cdef inline int is_contiguous(ndarray arr): */ __pyx_t_5 = assign_value_1d(__pyx_v_arr, __pyx_v_i, __pyx_v_value); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 59; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("util.set_value_at", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_casted); __Pyx_XDECREF(__pyx_v_loc); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "util.pxd":61 * assign_value_1d(arr, i, value) * * cdef inline int is_contiguous(ndarray arr): # <<<<<<<<<<<<<< * return cnp.PyArray_CHKFLAGS(arr, cnp.NPY_C_CONTIGUOUS) * */ static CYTHON_INLINE int __pyx_f_4util_is_contiguous(PyArrayObject *__pyx_v_arr) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("is_contiguous", 0); /* "util.pxd":62 * * cdef inline int is_contiguous(ndarray arr): * return cnp.PyArray_CHKFLAGS(arr, cnp.NPY_C_CONTIGUOUS) # <<<<<<<<<<<<<< * * cdef inline is_array(object o): */ __pyx_r = PyArray_CHKFLAGS(__pyx_v_arr, NPY_C_CONTIGUOUS); goto __pyx_L0; __pyx_r = 0; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "util.pxd":64 * return cnp.PyArray_CHKFLAGS(arr, cnp.NPY_C_CONTIGUOUS) * * cdef inline is_array(object o): # <<<<<<<<<<<<<< * return cnp.PyArray_Check(o) * */ static CYTHON_INLINE PyObject *__pyx_f_4util_is_array(PyObject *__pyx_v_o) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("is_array", 0); /* "util.pxd":65 * * cdef inline is_array(object o): * return cnp.PyArray_Check(o) # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyBool_FromLong(PyArray_Check(__pyx_v_o)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 65; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("util.is_array", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "util.pxd":68 * * * cdef inline bint _checknull(object val): # <<<<<<<<<<<<<< * try: * return val is None or (cpython.PyFloat_Check(val) and val != val) */ static CYTHON_INLINE int __pyx_f_4util__checknull(PyObject *__pyx_v_val) { 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; int __pyx_t_9; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_checknull", 0); /* "util.pxd":69 * * cdef inline bint _checknull(object val): * try: # <<<<<<<<<<<<<< * return val is None or (cpython.PyFloat_Check(val) and val != val) * except ValueError: */ { __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:*/ { /* "util.pxd":70 * cdef inline bint _checknull(object val): * try: * return val is None or (cpython.PyFloat_Check(val) and val != val) # <<<<<<<<<<<<<< * except ValueError: * return False */ __pyx_t_4 = (__pyx_v_val == Py_None); __pyx_t_5 = __Pyx_PyBool_FromLong(__pyx_t_4); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L3_error;} if (!__pyx_t_4) { __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_6 = __Pyx_PyBool_FromLong(PyFloat_Check(__pyx_v_val)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L3_error;} if (__pyx_t_4) { __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_7 = PyObject_RichCompare(__pyx_v_val, __pyx_v_val, Py_NE); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_t_8 = __pyx_t_7; __pyx_t_7 = 0; } else { __pyx_t_8 = __pyx_t_6; __pyx_t_6 = 0; } __pyx_t_6 = __pyx_t_8; __pyx_t_8 = 0; } else { __pyx_t_6 = __pyx_t_5; __pyx_t_5 = 0; } __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_r = __pyx_t_4; goto __pyx_L7_try_return; } __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L10_try_end; __pyx_L7_try_return:; __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); goto __pyx_L0; __pyx_L3_error:; __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; /* "util.pxd":71 * try: * return val is None or (cpython.PyFloat_Check(val) and val != val) * except ValueError: # <<<<<<<<<<<<<< * return False * */ __pyx_t_9 = PyErr_ExceptionMatches(__pyx_builtin_ValueError); if (__pyx_t_9) { __Pyx_AddTraceback("util._checknull", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_5, &__pyx_t_8) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 71; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_GOTREF(__pyx_t_5); __Pyx_GOTREF(__pyx_t_8); /* "util.pxd":72 * return val is None or (cpython.PyFloat_Check(val) and val != val) * except ValueError: * return False # <<<<<<<<<<<<<< * * cdef inline bint _checknull_old(object val): */ __pyx_r = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; goto __pyx_L6_except_return; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; goto __pyx_L4_exception_handled; } __pyx_L5_except_error:; __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); goto __pyx_L1_error; __pyx_L6_except_return:; __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); goto __pyx_L0; __pyx_L4_exception_handled:; __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); __pyx_L10_try_end:; } __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_WriteUnraisable("util._checknull", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "util.pxd":74 * return False * * cdef inline bint _checknull_old(object val): # <<<<<<<<<<<<<< * import numpy as np * cdef double INF = np.inf */ static CYTHON_INLINE int __pyx_f_4util__checknull_old(PyObject *__pyx_v_val) { PyObject *__pyx_v_np = NULL; double __pyx_v_INF; double __pyx_v_NEGINF; int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; double __pyx_t_2; 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; int __pyx_t_9; int __pyx_t_10; int __pyx_t_11; int __pyx_t_12; PyObject *__pyx_t_13 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_checknull_old", 0); /* "util.pxd":75 * * cdef inline bint _checknull_old(object val): * import numpy as np # <<<<<<<<<<<<<< * cdef double INF = np.inf * cdef double NEGINF = -INF */ __pyx_t_1 = __Pyx_Import(((PyObject *)__pyx_n_s__numpy), 0, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 75; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_v_np = __pyx_t_1; __pyx_t_1 = 0; /* "util.pxd":76 * cdef inline bint _checknull_old(object val): * import numpy as np * cdef double INF = np.inf # <<<<<<<<<<<<<< * cdef double NEGINF = -INF * try: */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_np, __pyx_n_s__inf); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 76; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __pyx_PyFloat_AsDouble(__pyx_t_1); if (unlikely((__pyx_t_2 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 76; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_INF = ((double)__pyx_t_2); /* "util.pxd":77 * import numpy as np * cdef double INF = np.inf * cdef double NEGINF = -INF # <<<<<<<<<<<<<< * try: * return bool(val is None or val != val and val != INF */ __pyx_v_NEGINF = (-__pyx_v_INF); /* "util.pxd":78 * cdef double INF = np.inf * cdef double NEGINF = -INF * try: # <<<<<<<<<<<<<< * return bool(val is None or val != val and val != INF * and val != NEGINF) */ { __Pyx_ExceptionSave(&__pyx_t_3, &__pyx_t_4, &__pyx_t_5); __Pyx_XGOTREF(__pyx_t_3); __Pyx_XGOTREF(__pyx_t_4); __Pyx_XGOTREF(__pyx_t_5); /*try:*/ { /* "util.pxd":79 * cdef double NEGINF = -INF * try: * return bool(val is None or val != val and val != INF # <<<<<<<<<<<<<< * and val != NEGINF) * except ValueError: */ __pyx_t_6 = (__pyx_v_val == Py_None); if (!__pyx_t_6) { __pyx_t_1 = PyObject_RichCompare(__pyx_v_val, __pyx_v_val, Py_NE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_7) { /* "util.pxd":80 * try: * return bool(val is None or val != val and val != INF * and val != NEGINF) # <<<<<<<<<<<<<< * except ValueError: * return False */ __pyx_t_1 = PyFloat_FromDouble(__pyx_v_INF); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 80; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_8 = PyObject_RichCompare(__pyx_v_val, __pyx_t_1, Py_NE); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (__pyx_t_9) { __pyx_t_8 = PyFloat_FromDouble(__pyx_v_NEGINF); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 80; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_1 = PyObject_RichCompare(__pyx_v_val, __pyx_t_8, Py_NE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 80; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 80; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_11 = __pyx_t_10; } else { __pyx_t_11 = __pyx_t_9; } __pyx_t_9 = __pyx_t_11; } else { __pyx_t_9 = __pyx_t_7; } __pyx_t_7 = __pyx_t_9; } else { __pyx_t_7 = __pyx_t_6; } __pyx_r = (!(!__pyx_t_7)); goto __pyx_L7_try_return; } __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; goto __pyx_L10_try_end; __pyx_L7_try_return:; __Pyx_XGIVEREF(__pyx_t_3); __Pyx_XGIVEREF(__pyx_t_4); __Pyx_XGIVEREF(__pyx_t_5); __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5); goto __pyx_L0; __pyx_L3_error:; __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; /* "util.pxd":81 * return bool(val is None or val != val and val != INF * and val != NEGINF) * except ValueError: # <<<<<<<<<<<<<< * return False * */ __pyx_t_12 = PyErr_ExceptionMatches(__pyx_builtin_ValueError); if (__pyx_t_12) { __Pyx_AddTraceback("util._checknull_old", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_8, &__pyx_t_13) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_GOTREF(__pyx_t_8); __Pyx_GOTREF(__pyx_t_13); /* "util.pxd":82 * and val != NEGINF) * except ValueError: * return False # <<<<<<<<<<<<<< * * cdef inline bint _checknan(object val): */ __pyx_r = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; goto __pyx_L6_except_return; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; goto __pyx_L4_exception_handled; } __pyx_L5_except_error:; __Pyx_XGIVEREF(__pyx_t_3); __Pyx_XGIVEREF(__pyx_t_4); __Pyx_XGIVEREF(__pyx_t_5); __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5); goto __pyx_L1_error; __pyx_L6_except_return:; __Pyx_XGIVEREF(__pyx_t_3); __Pyx_XGIVEREF(__pyx_t_4); __Pyx_XGIVEREF(__pyx_t_5); __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5); goto __pyx_L0; __pyx_L4_exception_handled:; __Pyx_XGIVEREF(__pyx_t_3); __Pyx_XGIVEREF(__pyx_t_4); __Pyx_XGIVEREF(__pyx_t_5); __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5); __pyx_L10_try_end:; } __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_13); __Pyx_WriteUnraisable("util._checknull_old", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_np); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "util.pxd":84 * return False * * cdef inline bint _checknan(object val): # <<<<<<<<<<<<<< * return not cnp.PyArray_Check(val) and val != val */ static CYTHON_INLINE int __pyx_f_4util__checknan(PyObject *__pyx_v_val) { int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_checknan", 0); /* "util.pxd":85 * * cdef inline bint _checknan(object val): * return not cnp.PyArray_Check(val) and val != val # <<<<<<<<<<<<<< */ __pyx_t_1 = __Pyx_PyBool_FromLong((!(PyArray_Check(__pyx_v_val) != 0))); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__pyx_t_2) { __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_3 = PyObject_RichCompare(__pyx_v_val, __pyx_v_val, Py_NE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_4 = __pyx_t_3; __pyx_t_3 = 0; } else { __pyx_t_4 = __pyx_t_1; __pyx_t_1 = 0; } __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_r = __pyx_t_2; goto __pyx_L0; __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_WriteUnraisable("util._checknan", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* 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)); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "numpy.pxd":196 * # 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 fullfill the PEP. */ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags) { int __pyx_v_copy_shape; 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_v_hasfields; int __pyx_r; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; int __pyx_t_5; int __pyx_t_6; int __pyx_t_7; PyObject *__pyx_t_8 = NULL; char *__pyx_t_9; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__getbuffer__", 0); if (__pyx_v_info != NULL) { __pyx_v_info->obj = Py_None; __Pyx_INCREF(Py_None); __Pyx_GIVEREF(__pyx_v_info->obj); } /* "numpy.pxd":202 * # of flags * * if info == NULL: return # <<<<<<<<<<<<<< * * cdef int copy_shape, i, ndim */ __pyx_t_1 = ((__pyx_v_info == NULL) != 0); if (__pyx_t_1) { __pyx_r = 0; goto __pyx_L0; goto __pyx_L3; } __pyx_L3:; /* "numpy.pxd":205 * * cdef int copy_shape, i, ndim * cdef int endian_detector = 1 # <<<<<<<<<<<<<< * cdef bint little_endian = ((&endian_detector)[0] != 0) * */ __pyx_v_endian_detector = 1; /* "numpy.pxd":206 * cdef int copy_shape, 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); /* "numpy.pxd":208 * cdef bint little_endian = ((&endian_detector)[0] != 0) * * ndim = PyArray_NDIM(self) # <<<<<<<<<<<<<< * * if sizeof(npy_intp) != sizeof(Py_ssize_t): */ __pyx_v_ndim = PyArray_NDIM(__pyx_v_self); /* "numpy.pxd":210 * ndim = PyArray_NDIM(self) * * if sizeof(npy_intp) != sizeof(Py_ssize_t): # <<<<<<<<<<<<<< * copy_shape = 1 * else: */ __pyx_t_1 = (((sizeof(npy_intp)) != (sizeof(Py_ssize_t))) != 0); if (__pyx_t_1) { /* "numpy.pxd":211 * * if sizeof(npy_intp) != sizeof(Py_ssize_t): * copy_shape = 1 # <<<<<<<<<<<<<< * else: * copy_shape = 0 */ __pyx_v_copy_shape = 1; goto __pyx_L4; } /*else*/ { /* "numpy.pxd":213 * copy_shape = 1 * else: * copy_shape = 0 # <<<<<<<<<<<<<< * * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) */ __pyx_v_copy_shape = 0; } __pyx_L4:; /* "numpy.pxd":215 * copy_shape = 0 * * 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_1 = (((__pyx_v_flags & PyBUF_C_CONTIGUOUS) == PyBUF_C_CONTIGUOUS) != 0); if (__pyx_t_1) { /* "numpy.pxd":216 * * 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_3 = __pyx_t_2; } else { __pyx_t_3 = __pyx_t_1; } if (__pyx_t_3) { /* "numpy.pxd":217 * 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_4 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_101), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 217; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 217; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L5; } __pyx_L5:; /* "numpy.pxd":219 * 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_3 = (((__pyx_v_flags & PyBUF_F_CONTIGUOUS) == PyBUF_F_CONTIGUOUS) != 0); if (__pyx_t_3) { /* "numpy.pxd":220 * * 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_1 = ((!(PyArray_CHKFLAGS(__pyx_v_self, NPY_F_CONTIGUOUS) != 0)) != 0); __pyx_t_2 = __pyx_t_1; } else { __pyx_t_2 = __pyx_t_3; } if (__pyx_t_2) { /* "numpy.pxd":221 * 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_4 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_103), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 221; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 221; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L6; } __pyx_L6:; /* "numpy.pxd":223 * raise ValueError(u"ndarray is not Fortran contiguous") * * info.buf = PyArray_DATA(self) # <<<<<<<<<<<<<< * info.ndim = ndim * if copy_shape: */ __pyx_v_info->buf = PyArray_DATA(__pyx_v_self); /* "numpy.pxd":224 * * info.buf = PyArray_DATA(self) * info.ndim = ndim # <<<<<<<<<<<<<< * if copy_shape: * # Allocate new buffer for strides and shape info. */ __pyx_v_info->ndim = __pyx_v_ndim; /* "numpy.pxd":225 * info.buf = PyArray_DATA(self) * info.ndim = ndim * if copy_shape: # <<<<<<<<<<<<<< * # Allocate new buffer for strides and shape info. * # This is allocated as one block, strides first. */ __pyx_t_2 = (__pyx_v_copy_shape != 0); if (__pyx_t_2) { /* "numpy.pxd":228 * # Allocate new buffer for strides and shape info. * # This is allocated as one block, strides first. * info.strides = stdlib.malloc(sizeof(Py_ssize_t) * ndim * 2) # <<<<<<<<<<<<<< * info.shape = info.strides + ndim * for i in range(ndim): */ __pyx_v_info->strides = ((Py_ssize_t *)malloc((((sizeof(Py_ssize_t)) * ((size_t)__pyx_v_ndim)) * 2))); /* "numpy.pxd":229 * # This is allocated as one block, strides first. * info.strides = stdlib.malloc(sizeof(Py_ssize_t) * ndim * 2) * 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); /* "numpy.pxd":230 * info.strides = stdlib.malloc(sizeof(Py_ssize_t) * ndim * 2) * 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_5 = __pyx_v_ndim; for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) { __pyx_v_i = __pyx_t_6; /* "numpy.pxd":231 * 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]); /* "numpy.pxd":232 * 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]); } goto __pyx_L7; } /*else*/ { /* "numpy.pxd":234 * info.shape[i] = PyArray_DIMS(self)[i] * else: * info.strides = PyArray_STRIDES(self) # <<<<<<<<<<<<<< * info.shape = PyArray_DIMS(self) * info.suboffsets = NULL */ __pyx_v_info->strides = ((Py_ssize_t *)PyArray_STRIDES(__pyx_v_self)); /* "numpy.pxd":235 * 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_L7:; /* "numpy.pxd":236 * 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; /* "numpy.pxd":237 * 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); /* "numpy.pxd":238 * 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)); /* "numpy.pxd":241 * * cdef int t * cdef char* f = NULL # <<<<<<<<<<<<<< * cdef dtype descr = self.descr * cdef list stack */ __pyx_v_f = NULL; /* "numpy.pxd":242 * cdef int t * cdef char* f = NULL * cdef dtype descr = self.descr # <<<<<<<<<<<<<< * cdef list stack * cdef int offset */ __pyx_t_4 = ((PyObject *)__pyx_v_self->descr); __Pyx_INCREF(__pyx_t_4); __pyx_v_descr = ((PyArray_Descr *)__pyx_t_4); __pyx_t_4 = 0; /* "numpy.pxd":246 * cdef int offset * * cdef bint hasfields = PyDataType_HASFIELDS(descr) # <<<<<<<<<<<<<< * * if not hasfields and not copy_shape: */ __pyx_v_hasfields = PyDataType_HASFIELDS(__pyx_v_descr); /* "numpy.pxd":248 * cdef bint hasfields = PyDataType_HASFIELDS(descr) * * if not hasfields and not copy_shape: # <<<<<<<<<<<<<< * # do not call releasebuffer * info.obj = None */ __pyx_t_2 = ((!(__pyx_v_hasfields != 0)) != 0); if (__pyx_t_2) { __pyx_t_3 = ((!(__pyx_v_copy_shape != 0)) != 0); __pyx_t_1 = __pyx_t_3; } else { __pyx_t_1 = __pyx_t_2; } if (__pyx_t_1) { /* "numpy.pxd":250 * if not hasfields and not copy_shape: * # do not call releasebuffer * info.obj = None # <<<<<<<<<<<<<< * else: * # need to call releasebuffer */ __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_info->obj); __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = Py_None; goto __pyx_L10; } /*else*/ { /* "numpy.pxd":253 * else: * # need to call releasebuffer * info.obj = self # <<<<<<<<<<<<<< * * if not hasfields: */ __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); } __pyx_L10:; /* "numpy.pxd":255 * info.obj = self * * if not hasfields: # <<<<<<<<<<<<<< * t = descr.type_num * if ((descr.byteorder == '>' and little_endian) or */ __pyx_t_1 = ((!(__pyx_v_hasfields != 0)) != 0); if (__pyx_t_1) { /* "numpy.pxd":256 * * if not hasfields: * t = descr.type_num # <<<<<<<<<<<<<< * if ((descr.byteorder == '>' and little_endian) or * (descr.byteorder == '<' and not little_endian)): */ __pyx_t_5 = __pyx_v_descr->type_num; __pyx_v_t = __pyx_t_5; /* "numpy.pxd":257 * if not hasfields: * t = descr.type_num * if ((descr.byteorder == '>' and little_endian) or # <<<<<<<<<<<<<< * (descr.byteorder == '<' and not little_endian)): * raise ValueError(u"Non-native byte order not supported") */ __pyx_t_1 = ((__pyx_v_descr->byteorder == '>') != 0); if (__pyx_t_1) { __pyx_t_2 = (__pyx_v_little_endian != 0); } else { __pyx_t_2 = __pyx_t_1; } if (!__pyx_t_2) { /* "numpy.pxd":258 * t = descr.type_num * if ((descr.byteorder == '>' and little_endian) or * (descr.byteorder == '<' and not little_endian)): # <<<<<<<<<<<<<< * raise ValueError(u"Non-native byte order not supported") * if t == NPY_BYTE: f = "b" */ __pyx_t_1 = ((__pyx_v_descr->byteorder == '<') != 0); if (__pyx_t_1) { __pyx_t_3 = ((!(__pyx_v_little_endian != 0)) != 0); __pyx_t_7 = __pyx_t_3; } else { __pyx_t_7 = __pyx_t_1; } __pyx_t_1 = __pyx_t_7; } else { __pyx_t_1 = __pyx_t_2; } if (__pyx_t_1) { /* "numpy.pxd":259 * if ((descr.byteorder == '>' and little_endian) or * (descr.byteorder == '<' 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_4 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_105), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 259; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 259; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L12; } __pyx_L12:; /* "numpy.pxd":276 * 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) */ switch (__pyx_v_t) { /* "numpy.pxd":260 * (descr.byteorder == '<' 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" */ case NPY_BYTE: __pyx_v_f = __pyx_k__b; break; /* "numpy.pxd":261 * 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 = __pyx_k__B; break; /* "numpy.pxd":262 * 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 = __pyx_k__h; break; /* "numpy.pxd":263 * 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 = __pyx_k__H; break; /* "numpy.pxd":264 * 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 = __pyx_k__i; break; /* "numpy.pxd":265 * 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 = __pyx_k__I; break; /* "numpy.pxd":266 * 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 = __pyx_k__l; break; /* "numpy.pxd":267 * 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 = __pyx_k__L; break; /* "numpy.pxd":268 * 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 = __pyx_k__q; break; /* "numpy.pxd":269 * 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 = __pyx_k__Q; break; /* "numpy.pxd":270 * 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 = __pyx_k__f; break; /* "numpy.pxd":271 * 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 = __pyx_k__d; break; /* "numpy.pxd":272 * 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 = __pyx_k__g; break; /* "numpy.pxd":273 * 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 = __pyx_k__Zf; break; /* "numpy.pxd":274 * 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 = __pyx_k__Zd; break; /* "numpy.pxd":275 * 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 = __pyx_k__Zg; break; /* "numpy.pxd":276 * 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 = __pyx_k__O; break; default: /* "numpy.pxd":278 * elif t == NPY_OBJECT: f = "O" * else: * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) # <<<<<<<<<<<<<< * info.format = f * return */ __pyx_t_4 = PyInt_FromLong(__pyx_v_t); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 278; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_8 = PyNumber_Remainder(((PyObject *)__pyx_kp_u_106), __pyx_t_4); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 278; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_8)); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 278; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_t_8)); __Pyx_GIVEREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0; __pyx_t_8 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 278; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __Pyx_Raise(__pyx_t_8, 0, 0, 0); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; {__pyx_filename = __pyx_f[2]; __pyx_lineno = 278; __pyx_clineno = __LINE__; goto __pyx_L1_error;} break; } /* "numpy.pxd":279 * else: * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) * info.format = f # <<<<<<<<<<<<<< * return * else: */ __pyx_v_info->format = __pyx_v_f; /* "numpy.pxd":280 * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) * info.format = f * return # <<<<<<<<<<<<<< * else: * info.format = stdlib.malloc(_buffer_format_string_len) */ __pyx_r = 0; goto __pyx_L0; goto __pyx_L11; } /*else*/ { /* "numpy.pxd":282 * return * else: * info.format = stdlib.malloc(_buffer_format_string_len) # <<<<<<<<<<<<<< * info.format[0] = '^' # Native data types, manual alignment * offset = 0 */ __pyx_v_info->format = ((char *)malloc(255)); /* "numpy.pxd":283 * else: * info.format = stdlib.malloc(_buffer_format_string_len) * info.format[0] = '^' # Native data types, manual alignment # <<<<<<<<<<<<<< * offset = 0 * f = _util_dtypestring(descr, info.format + 1, */ (__pyx_v_info->format[0]) = '^'; /* "numpy.pxd":284 * info.format = stdlib.malloc(_buffer_format_string_len) * info.format[0] = '^' # Native data types, manual alignment * offset = 0 # <<<<<<<<<<<<<< * f = _util_dtypestring(descr, info.format + 1, * info.format + _buffer_format_string_len, */ __pyx_v_offset = 0; /* "numpy.pxd":287 * f = _util_dtypestring(descr, info.format + 1, * info.format + _buffer_format_string_len, * &offset) # <<<<<<<<<<<<<< * f[0] = 0 # Terminate format string * */ __pyx_t_9 = __pyx_f_5numpy__util_dtypestring(__pyx_v_descr, (__pyx_v_info->format + 1), (__pyx_v_info->format + 255), (&__pyx_v_offset)); if (unlikely(__pyx_t_9 == NULL)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 285; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_f = __pyx_t_9; /* "numpy.pxd":288 * info.format + _buffer_format_string_len, * &offset) * f[0] = 0 # Terminate format string # <<<<<<<<<<<<<< * * def __releasebuffer__(ndarray self, Py_buffer* info): */ (__pyx_v_f[0]) = 0; } __pyx_L11:; __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_8); __Pyx_AddTraceback("numpy.ndarray.__getbuffer__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; if (__pyx_v_info != NULL && __pyx_v_info->obj != NULL) { __Pyx_GOTREF(__pyx_v_info->obj); __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = NULL; } goto __pyx_L2; __pyx_L0:; if (__pyx_v_info != NULL && __pyx_v_info->obj == Py_None) { __Pyx_GOTREF(Py_None); __Pyx_DECREF(Py_None); __pyx_v_info->obj = NULL; } __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_descr); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* 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)); __Pyx_RefNannyFinishContext(); } /* "numpy.pxd":290 * f[0] = 0 # Terminate format string * * def __releasebuffer__(ndarray self, Py_buffer* info): # <<<<<<<<<<<<<< * if PyArray_HASFIELDS(self): * stdlib.free(info.format) */ 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); /* "numpy.pxd":291 * * def __releasebuffer__(ndarray self, Py_buffer* info): * if PyArray_HASFIELDS(self): # <<<<<<<<<<<<<< * stdlib.free(info.format) * if sizeof(npy_intp) != sizeof(Py_ssize_t): */ __pyx_t_1 = (PyArray_HASFIELDS(__pyx_v_self) != 0); if (__pyx_t_1) { /* "numpy.pxd":292 * def __releasebuffer__(ndarray self, Py_buffer* info): * if PyArray_HASFIELDS(self): * stdlib.free(info.format) # <<<<<<<<<<<<<< * if sizeof(npy_intp) != sizeof(Py_ssize_t): * stdlib.free(info.strides) */ free(__pyx_v_info->format); goto __pyx_L3; } __pyx_L3:; /* "numpy.pxd":293 * if PyArray_HASFIELDS(self): * stdlib.free(info.format) * if sizeof(npy_intp) != sizeof(Py_ssize_t): # <<<<<<<<<<<<<< * stdlib.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) { /* "numpy.pxd":294 * stdlib.free(info.format) * if sizeof(npy_intp) != sizeof(Py_ssize_t): * stdlib.free(info.strides) # <<<<<<<<<<<<<< * # info.shape was stored after info.strides in the same block * */ free(__pyx_v_info->strides); goto __pyx_L4; } __pyx_L4:; __Pyx_RefNannyFinishContext(); } /* "numpy.pxd":772 * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PyArray_MultiIterNew1", 0); /* "numpy.pxd":773 * * 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_filename = __pyx_f[2]; __pyx_lineno = 773; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __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; } /* "numpy.pxd":775 * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PyArray_MultiIterNew2", 0); /* "numpy.pxd":776 * * 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_filename = __pyx_f[2]; __pyx_lineno = 776; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __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; } /* "numpy.pxd":778 * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PyArray_MultiIterNew3", 0); /* "numpy.pxd":779 * * 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_filename = __pyx_f[2]; __pyx_lineno = 779; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __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; } /* "numpy.pxd":781 * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PyArray_MultiIterNew4", 0); /* "numpy.pxd":782 * * 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_filename = __pyx_f[2]; __pyx_lineno = 782; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __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; } /* "numpy.pxd":784 * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PyArray_MultiIterNew5", 0); /* "numpy.pxd":785 * * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): * return PyArray_MultiIterNew(5, a, b, c, d, e) # <<<<<<<<<<<<<< * * cdef inline char* _util_dtypestring(dtype descr, char* f, char* end, int* offset) except NULL: */ __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_filename = __pyx_f[2]; __pyx_lineno = 785; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __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; } /* "numpy.pxd":787 * return PyArray_MultiIterNew(5, a, b, c, d, e) * * 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; PyObject *__pyx_t_5 = NULL; PyObject *(*__pyx_t_6)(PyObject *); int __pyx_t_7; int __pyx_t_8; int __pyx_t_9; int __pyx_t_10; long __pyx_t_11; char *__pyx_t_12; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_util_dtypestring", 0); /* "numpy.pxd":794 * cdef int delta_offset * cdef tuple i * cdef int endian_detector = 1 # <<<<<<<<<<<<<< * cdef bint little_endian = ((&endian_detector)[0] != 0) * cdef tuple fields */ __pyx_v_endian_detector = 1; /* "numpy.pxd":795 * cdef tuple i * 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); /* "numpy.pxd":798 * cdef tuple fields * * for childname in descr.names: # <<<<<<<<<<<<<< * fields = descr.fields[childname] * child, new_offset = fields */ if (unlikely(((PyObject *)__pyx_v_descr->names) == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 798; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_1 = ((PyObject *)__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_COMPILING_IN_CPYTHON __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_filename = __pyx_f[2]; __pyx_lineno = 798; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 798; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif __Pyx_XDECREF_SET(__pyx_v_childname, __pyx_t_3); __pyx_t_3 = 0; /* "numpy.pxd":799 * * for childname in descr.names: * fields = descr.fields[childname] # <<<<<<<<<<<<<< * child, new_offset = fields * */ __pyx_t_3 = PyObject_GetItem(__pyx_v_descr->fields, __pyx_v_childname); if (!__pyx_t_3) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 799; __pyx_clineno = __LINE__; goto __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 tuple, got %.200s", Py_TYPE(__pyx_t_3)->tp_name), 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 799; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_XDECREF_SET(__pyx_v_fields, ((PyObject*)__pyx_t_3)); __pyx_t_3 = 0; /* "numpy.pxd":800 * for childname in descr.names: * fields = descr.fields[childname] * child, new_offset = fields # <<<<<<<<<<<<<< * * if (end - f) - (new_offset - offset[0]) < 15: */ if (likely(PyTuple_CheckExact(((PyObject *)__pyx_v_fields)))) { PyObject* sequence = ((PyObject *)__pyx_v_fields); #if CYTHON_COMPILING_IN_CPYTHON Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 800; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON __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_filename = __pyx_f[2]; __pyx_lineno = 800; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 800; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); #endif } else if (1) { __Pyx_RaiseNoneNotIterableError(); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 800; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } else { Py_ssize_t index = -1; __pyx_t_5 = PyObject_GetIter(((PyObject *)__pyx_v_fields)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 800; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = Py_TYPE(__pyx_t_5)->tp_iternext; index = 0; __pyx_t_3 = __pyx_t_6(__pyx_t_5); if (unlikely(!__pyx_t_3)) goto __pyx_L5_unpacking_failed; __Pyx_GOTREF(__pyx_t_3); index = 1; __pyx_t_4 = __pyx_t_6(__pyx_t_5); if (unlikely(!__pyx_t_4)) goto __pyx_L5_unpacking_failed; __Pyx_GOTREF(__pyx_t_4); if (__Pyx_IternextUnpackEndCheck(__pyx_t_6(__pyx_t_5), 2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 800; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_6 = NULL; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; goto __pyx_L6_unpacking_done; __pyx_L5_unpacking_failed:; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_6 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 800; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_L6_unpacking_done:; } if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_dtype))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 800; __pyx_clineno = __LINE__; goto __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; /* "numpy.pxd":802 * 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 = PyInt_FromLong((__pyx_v_end - __pyx_v_f)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 802; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = PyInt_FromLong((__pyx_v_offset[0])); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 802; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = PyNumber_Subtract(__pyx_v_new_offset, __pyx_t_3); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 802; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyNumber_Subtract(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 802; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyObject_RichCompare(__pyx_t_3, __pyx_int_15, Py_LT); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 802; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 802; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_7) { /* "numpy.pxd":803 * * if (end - f) - (new_offset - offset[0]) < 15: * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") # <<<<<<<<<<<<<< * * if ((child.byteorder == '>' and little_endian) or */ __pyx_t_5 = PyObject_Call(__pyx_builtin_RuntimeError, ((PyObject *)__pyx_k_tuple_108), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 803; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_Raise(__pyx_t_5, 0, 0, 0); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; {__pyx_filename = __pyx_f[2]; __pyx_lineno = 803; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L7; } __pyx_L7:; /* "numpy.pxd":805 * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") * * if ((child.byteorder == '>' and little_endian) or # <<<<<<<<<<<<<< * (child.byteorder == '<' 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) { __pyx_t_8 = (__pyx_v_little_endian != 0); } else { __pyx_t_8 = __pyx_t_7; } if (!__pyx_t_8) { /* "numpy.pxd":806 * * if ((child.byteorder == '>' and little_endian) or * (child.byteorder == '<' 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) { __pyx_t_9 = ((!(__pyx_v_little_endian != 0)) != 0); __pyx_t_10 = __pyx_t_9; } else { __pyx_t_10 = __pyx_t_7; } __pyx_t_7 = __pyx_t_10; } else { __pyx_t_7 = __pyx_t_8; } if (__pyx_t_7) { /* "numpy.pxd":807 * if ((child.byteorder == '>' and little_endian) or * (child.byteorder == '<' 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_5 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_109), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 807; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_Raise(__pyx_t_5, 0, 0, 0); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; {__pyx_filename = __pyx_f[2]; __pyx_lineno = 807; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L8; } __pyx_L8:; /* "numpy.pxd":817 * * # Output padding bytes * while offset[0] < new_offset: # <<<<<<<<<<<<<< * f[0] = 120 # "x"; pad byte * f += 1 */ while (1) { __pyx_t_5 = PyInt_FromLong((__pyx_v_offset[0])); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 817; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = PyObject_RichCompare(__pyx_t_5, __pyx_v_new_offset, Py_LT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 817; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 817; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (!__pyx_t_7) break; /* "numpy.pxd":818 * # Output padding bytes * while offset[0] < new_offset: * f[0] = 120 # "x"; pad byte # <<<<<<<<<<<<<< * f += 1 * offset[0] += 1 */ (__pyx_v_f[0]) = 120; /* "numpy.pxd":819 * while offset[0] < new_offset: * f[0] = 120 # "x"; pad byte * f += 1 # <<<<<<<<<<<<<< * offset[0] += 1 * */ __pyx_v_f = (__pyx_v_f + 1); /* "numpy.pxd":820 * f[0] = 120 # "x"; pad byte * f += 1 * offset[0] += 1 # <<<<<<<<<<<<<< * * offset[0] += child.itemsize */ __pyx_t_11 = 0; (__pyx_v_offset[__pyx_t_11]) = ((__pyx_v_offset[__pyx_t_11]) + 1); } /* "numpy.pxd":822 * offset[0] += 1 * * offset[0] += child.itemsize # <<<<<<<<<<<<<< * * if not PyDataType_HASFIELDS(child): */ __pyx_t_11 = 0; (__pyx_v_offset[__pyx_t_11]) = ((__pyx_v_offset[__pyx_t_11]) + __pyx_v_child->elsize); /* "numpy.pxd":824 * offset[0] += child.itemsize * * if not PyDataType_HASFIELDS(child): # <<<<<<<<<<<<<< * t = child.type_num * if end - f < 5: */ __pyx_t_7 = ((!(PyDataType_HASFIELDS(__pyx_v_child) != 0)) != 0); if (__pyx_t_7) { /* "numpy.pxd":825 * * if not PyDataType_HASFIELDS(child): * t = child.type_num # <<<<<<<<<<<<<< * if end - f < 5: * raise RuntimeError(u"Format string allocated too short.") */ __pyx_t_3 = PyInt_FromLong(__pyx_v_child->type_num); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 825; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_XDECREF_SET(__pyx_v_t, __pyx_t_3); __pyx_t_3 = 0; /* "numpy.pxd":826 * if not PyDataType_HASFIELDS(child): * t = child.type_num * if end - f < 5: # <<<<<<<<<<<<<< * raise RuntimeError(u"Format string allocated too short.") * */ __pyx_t_7 = (((__pyx_v_end - __pyx_v_f) < 5) != 0); if (__pyx_t_7) { /* "numpy.pxd":827 * 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_3 = PyObject_Call(__pyx_builtin_RuntimeError, ((PyObject *)__pyx_k_tuple_111), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 827; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 827; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L12; } __pyx_L12:; /* "numpy.pxd":830 * * # 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_3 = PyInt_FromLong(NPY_BYTE); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 830; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 830; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 830; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_7) { (__pyx_v_f[0]) = 98; goto __pyx_L13; } /* "numpy.pxd":831 * # 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_5 = PyInt_FromLong(NPY_UBYTE); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 831; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 831; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 831; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_7) { (__pyx_v_f[0]) = 66; goto __pyx_L13; } /* "numpy.pxd":832 * 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_3 = PyInt_FromLong(NPY_SHORT); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 832; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 832; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 832; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_7) { (__pyx_v_f[0]) = 104; goto __pyx_L13; } /* "numpy.pxd":833 * 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_5 = PyInt_FromLong(NPY_USHORT); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 833; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 833; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 833; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_7) { (__pyx_v_f[0]) = 72; goto __pyx_L13; } /* "numpy.pxd":834 * 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_3 = PyInt_FromLong(NPY_INT); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 834; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 834; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 834; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_7) { (__pyx_v_f[0]) = 105; goto __pyx_L13; } /* "numpy.pxd":835 * 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_5 = PyInt_FromLong(NPY_UINT); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 835; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 835; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 835; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_7) { (__pyx_v_f[0]) = 73; goto __pyx_L13; } /* "numpy.pxd":836 * 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_3 = PyInt_FromLong(NPY_LONG); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 836; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 836; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 836; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_7) { (__pyx_v_f[0]) = 108; goto __pyx_L13; } /* "numpy.pxd":837 * 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_5 = PyInt_FromLong(NPY_ULONG); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 837; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 837; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 837; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_7) { (__pyx_v_f[0]) = 76; goto __pyx_L13; } /* "numpy.pxd":838 * 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_3 = PyInt_FromLong(NPY_LONGLONG); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 838; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 838; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 838; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_7) { (__pyx_v_f[0]) = 113; goto __pyx_L13; } /* "numpy.pxd":839 * 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_5 = PyInt_FromLong(NPY_ULONGLONG); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 839; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 839; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 839; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_7) { (__pyx_v_f[0]) = 81; goto __pyx_L13; } /* "numpy.pxd":840 * 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_3 = PyInt_FromLong(NPY_FLOAT); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 840; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 840; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 840; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_7) { (__pyx_v_f[0]) = 102; goto __pyx_L13; } /* "numpy.pxd":841 * 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_5 = PyInt_FromLong(NPY_DOUBLE); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 841; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 841; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 841; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_7) { (__pyx_v_f[0]) = 100; goto __pyx_L13; } /* "numpy.pxd":842 * 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_3 = PyInt_FromLong(NPY_LONGDOUBLE); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 842; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 842; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 842; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_7) { (__pyx_v_f[0]) = 103; goto __pyx_L13; } /* "numpy.pxd":843 * 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_5 = PyInt_FromLong(NPY_CFLOAT); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 843; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 843; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 843; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_7) { (__pyx_v_f[0]) = 90; (__pyx_v_f[1]) = 102; __pyx_v_f = (__pyx_v_f + 1); goto __pyx_L13; } /* "numpy.pxd":844 * 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_3 = PyInt_FromLong(NPY_CDOUBLE); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 844; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 844; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 844; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_7) { (__pyx_v_f[0]) = 90; (__pyx_v_f[1]) = 100; __pyx_v_f = (__pyx_v_f + 1); goto __pyx_L13; } /* "numpy.pxd":845 * 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_5 = PyInt_FromLong(NPY_CLONGDOUBLE); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 845; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 845; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 845; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_7) { (__pyx_v_f[0]) = 90; (__pyx_v_f[1]) = 103; __pyx_v_f = (__pyx_v_f + 1); goto __pyx_L13; } /* "numpy.pxd":846 * 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_3 = PyInt_FromLong(NPY_OBJECT); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 846; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 846; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 846; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_7) { (__pyx_v_f[0]) = 79; goto __pyx_L13; } /*else*/ { /* "numpy.pxd":848 * elif t == NPY_OBJECT: f[0] = 79 #"O" * else: * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) # <<<<<<<<<<<<<< * f += 1 * else: */ __pyx_t_5 = PyNumber_Remainder(((PyObject *)__pyx_kp_u_106), __pyx_v_t); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 848; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_5)); __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 848; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_t_5)); __Pyx_GIVEREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; __pyx_t_5 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 848; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; __Pyx_Raise(__pyx_t_5, 0, 0, 0); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; {__pyx_filename = __pyx_f[2]; __pyx_lineno = 848; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_L13:; /* "numpy.pxd":849 * 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); goto __pyx_L11; } /*else*/ { /* "numpy.pxd":853 * # Cython ignores struct boundary information ("T{...}"), * # so don't output it * f = _util_dtypestring(child, f, end, offset) # <<<<<<<<<<<<<< * return f * */ __pyx_t_12 = __pyx_f_5numpy__util_dtypestring(__pyx_v_child, __pyx_v_f, __pyx_v_end, __pyx_v_offset); if (unlikely(__pyx_t_12 == NULL)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 853; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_f = __pyx_t_12; } __pyx_L11:; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "numpy.pxd":854 * # so don't output it * f = _util_dtypestring(child, f, end, offset) * return f # <<<<<<<<<<<<<< * * */ __pyx_r = __pyx_v_f; goto __pyx_L0; __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("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; } /* "numpy.pxd":969 * * * 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); /* "numpy.pxd":971 * 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) { /* "numpy.pxd":972 * cdef PyObject* baseptr * if base is None: * baseptr = NULL # <<<<<<<<<<<<<< * else: * Py_INCREF(base) # important to do this before decref below! */ __pyx_v_baseptr = NULL; goto __pyx_L3; } /*else*/ { /* "numpy.pxd":974 * baseptr = NULL * else: * Py_INCREF(base) # important to do this before decref below! # <<<<<<<<<<<<<< * baseptr = base * Py_XDECREF(arr.base) */ Py_INCREF(__pyx_v_base); /* "numpy.pxd":975 * 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:; /* "numpy.pxd":976 * 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); /* "numpy.pxd":977 * baseptr = base * Py_XDECREF(arr.base) * arr.base = baseptr # <<<<<<<<<<<<<< * * cdef inline object get_array_base(ndarray arr): */ __pyx_v_arr->base = __pyx_v_baseptr; __Pyx_RefNannyFinishContext(); } /* "numpy.pxd":979 * 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); /* "numpy.pxd":980 * * 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) { /* "numpy.pxd":981 * cdef inline object get_array_base(ndarray arr): * if arr.base is NULL: * return None # <<<<<<<<<<<<<< * else: * return arr.base */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(Py_None); __pyx_r = Py_None; goto __pyx_L0; goto __pyx_L3; } /*else*/ { /* "numpy.pxd":983 * return None * else: * return arr.base # <<<<<<<<<<<<<< */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_arr->base)); __pyx_r = ((PyObject *)__pyx_v_arr->base); goto __pyx_L0; } __pyx_L3:; __pyx_r = Py_None; __Pyx_INCREF(Py_None); __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } static struct __pyx_vtabstruct_6pandas_6parser_TextReader __pyx_vtable_6pandas_6parser_TextReader; static PyObject *__pyx_tp_new_6pandas_6parser_TextReader(PyTypeObject *t, PyObject *a, PyObject *k) { struct __pyx_obj_6pandas_6parser_TextReader *p; PyObject *o; o = (*t->tp_alloc)(t, 0); if (unlikely(!o)) return 0; p = ((struct __pyx_obj_6pandas_6parser_TextReader *)o); p->__pyx_vtab = __pyx_vtabptr_6pandas_6parser_TextReader; p->file_handle = Py_None; Py_INCREF(Py_None); p->na_fvalues = Py_None; Py_INCREF(Py_None); p->clocks = ((PyObject*)Py_None); Py_INCREF(Py_None); p->allow_leading_cols = Py_None; Py_INCREF(Py_None); p->delimiter = Py_None; Py_INCREF(Py_None); p->converters = Py_None; Py_INCREF(Py_None); p->delim_whitespace = Py_None; Py_INCREF(Py_None); p->na_values = Py_None; Py_INCREF(Py_None); p->true_values = Py_None; Py_INCREF(Py_None); p->false_values = Py_None; Py_INCREF(Py_None); p->memory_map = Py_None; Py_INCREF(Py_None); p->as_recarray = Py_None; Py_INCREF(Py_None); p->header = Py_None; Py_INCREF(Py_None); p->orig_header = Py_None; Py_INCREF(Py_None); p->names = Py_None; Py_INCREF(Py_None); p->header_start = Py_None; Py_INCREF(Py_None); p->header_end = Py_None; Py_INCREF(Py_None); p->index_col = Py_None; Py_INCREF(Py_None); p->low_memory = Py_None; Py_INCREF(Py_None); p->skiprows = Py_None; Py_INCREF(Py_None); p->compact_ints = Py_None; Py_INCREF(Py_None); p->use_unsigned = Py_None; Py_INCREF(Py_None); p->dtype = Py_None; Py_INCREF(Py_None); p->encoding = Py_None; Py_INCREF(Py_None); p->compression = Py_None; Py_INCREF(Py_None); p->mangle_dupe_cols = Py_None; Py_INCREF(Py_None); p->tupleize_cols = Py_None; Py_INCREF(Py_None); p->noconvert = ((PyObject*)Py_None); Py_INCREF(Py_None); p->usecols = ((PyObject*)Py_None); Py_INCREF(Py_None); if (unlikely(__pyx_pw_6pandas_6parser_10TextReader_1__cinit__(o, a, k) < 0)) { Py_DECREF(o); o = 0; } return o; } static void __pyx_tp_dealloc_6pandas_6parser_TextReader(PyObject *o) { struct __pyx_obj_6pandas_6parser_TextReader *p = (struct __pyx_obj_6pandas_6parser_TextReader *)o; PyObject_GC_UnTrack(o); { PyObject *etype, *eval, *etb; PyErr_Fetch(&etype, &eval, &etb); ++Py_REFCNT(o); __pyx_pw_6pandas_6parser_10TextReader_5__dealloc__(o); if (PyErr_Occurred()) PyErr_WriteUnraisable(o); --Py_REFCNT(o); PyErr_Restore(etype, eval, etb); } Py_CLEAR(p->file_handle); Py_CLEAR(p->na_fvalues); Py_CLEAR(p->clocks); Py_CLEAR(p->allow_leading_cols); Py_CLEAR(p->delimiter); Py_CLEAR(p->converters); Py_CLEAR(p->delim_whitespace); Py_CLEAR(p->na_values); Py_CLEAR(p->true_values); Py_CLEAR(p->false_values); Py_CLEAR(p->memory_map); Py_CLEAR(p->as_recarray); Py_CLEAR(p->header); Py_CLEAR(p->orig_header); Py_CLEAR(p->names); Py_CLEAR(p->header_start); Py_CLEAR(p->header_end); Py_CLEAR(p->index_col); Py_CLEAR(p->low_memory); Py_CLEAR(p->skiprows); Py_CLEAR(p->compact_ints); Py_CLEAR(p->use_unsigned); Py_CLEAR(p->dtype); Py_CLEAR(p->encoding); Py_CLEAR(p->compression); Py_CLEAR(p->mangle_dupe_cols); Py_CLEAR(p->tupleize_cols); Py_CLEAR(p->noconvert); Py_CLEAR(p->usecols); (*Py_TYPE(o)->tp_free)(o); } static int __pyx_tp_traverse_6pandas_6parser_TextReader(PyObject *o, visitproc v, void *a) { int e; struct __pyx_obj_6pandas_6parser_TextReader *p = (struct __pyx_obj_6pandas_6parser_TextReader *)o; if (p->file_handle) { e = (*v)(p->file_handle, a); if (e) return e; } if (p->na_fvalues) { e = (*v)(p->na_fvalues, a); if (e) return e; } if (p->clocks) { e = (*v)(p->clocks, a); if (e) return e; } if (p->allow_leading_cols) { e = (*v)(p->allow_leading_cols, a); if (e) return e; } if (p->delimiter) { e = (*v)(p->delimiter, a); if (e) return e; } if (p->converters) { e = (*v)(p->converters, a); if (e) return e; } if (p->delim_whitespace) { e = (*v)(p->delim_whitespace, a); if (e) return e; } if (p->na_values) { e = (*v)(p->na_values, a); if (e) return e; } if (p->true_values) { e = (*v)(p->true_values, a); if (e) return e; } if (p->false_values) { e = (*v)(p->false_values, a); if (e) return e; } if (p->memory_map) { e = (*v)(p->memory_map, a); if (e) return e; } if (p->as_recarray) { e = (*v)(p->as_recarray, a); if (e) return e; } if (p->header) { e = (*v)(p->header, a); if (e) return e; } if (p->orig_header) { e = (*v)(p->orig_header, a); if (e) return e; } if (p->names) { e = (*v)(p->names, a); if (e) return e; } if (p->header_start) { e = (*v)(p->header_start, a); if (e) return e; } if (p->header_end) { e = (*v)(p->header_end, a); if (e) return e; } if (p->index_col) { e = (*v)(p->index_col, a); if (e) return e; } if (p->low_memory) { e = (*v)(p->low_memory, a); if (e) return e; } if (p->skiprows) { e = (*v)(p->skiprows, a); if (e) return e; } if (p->compact_ints) { e = (*v)(p->compact_ints, a); if (e) return e; } if (p->use_unsigned) { e = (*v)(p->use_unsigned, a); if (e) return e; } if (p->dtype) { e = (*v)(p->dtype, a); if (e) return e; } if (p->encoding) { e = (*v)(p->encoding, a); if (e) return e; } if (p->compression) { e = (*v)(p->compression, a); if (e) return e; } if (p->mangle_dupe_cols) { e = (*v)(p->mangle_dupe_cols, a); if (e) return e; } if (p->tupleize_cols) { e = (*v)(p->tupleize_cols, a); if (e) return e; } if (p->noconvert) { e = (*v)(p->noconvert, a); if (e) return e; } if (p->usecols) { e = (*v)(p->usecols, a); if (e) return e; } return 0; } static int __pyx_tp_clear_6pandas_6parser_TextReader(PyObject *o) { struct __pyx_obj_6pandas_6parser_TextReader *p = (struct __pyx_obj_6pandas_6parser_TextReader *)o; PyObject* tmp; tmp = ((PyObject*)p->file_handle); p->file_handle = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->na_fvalues); p->na_fvalues = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->clocks); p->clocks = ((PyObject*)Py_None); Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->allow_leading_cols); p->allow_leading_cols = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->delimiter); p->delimiter = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->converters); p->converters = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->delim_whitespace); p->delim_whitespace = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->na_values); p->na_values = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->true_values); p->true_values = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->false_values); p->false_values = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->memory_map); p->memory_map = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->as_recarray); p->as_recarray = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->header); p->header = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->orig_header); p->orig_header = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->names); p->names = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->header_start); p->header_start = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->header_end); p->header_end = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->index_col); p->index_col = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->low_memory); p->low_memory = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->skiprows); p->skiprows = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->compact_ints); p->compact_ints = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->use_unsigned); p->use_unsigned = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->dtype); p->dtype = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->encoding); p->encoding = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->compression); p->compression = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->mangle_dupe_cols); p->mangle_dupe_cols = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->tupleize_cols); p->tupleize_cols = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->noconvert); p->noconvert = ((PyObject*)Py_None); Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->usecols); p->usecols = ((PyObject*)Py_None); Py_INCREF(Py_None); Py_XDECREF(tmp); return 0; } static PyObject *__pyx_getprop_6pandas_6parser_10TextReader_leading_cols(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6pandas_6parser_10TextReader_12leading_cols_1__get__(o); } static int __pyx_setprop_6pandas_6parser_10TextReader_leading_cols(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { return __pyx_pw_6pandas_6parser_10TextReader_12leading_cols_3__set__(o, v); } else { PyErr_SetString(PyExc_NotImplementedError, "__del__"); return -1; } } static PyObject *__pyx_getprop_6pandas_6parser_10TextReader_table_width(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6pandas_6parser_10TextReader_11table_width_1__get__(o); } static int __pyx_setprop_6pandas_6parser_10TextReader_table_width(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { return __pyx_pw_6pandas_6parser_10TextReader_11table_width_3__set__(o, v); } else { PyErr_SetString(PyExc_NotImplementedError, "__del__"); return -1; } } static PyObject *__pyx_getprop_6pandas_6parser_10TextReader_skip_footer(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6pandas_6parser_10TextReader_11skip_footer_1__get__(o); } static int __pyx_setprop_6pandas_6parser_10TextReader_skip_footer(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { return __pyx_pw_6pandas_6parser_10TextReader_11skip_footer_3__set__(o, v); } else { PyErr_SetString(PyExc_NotImplementedError, "__del__"); return -1; } } static PyObject *__pyx_getprop_6pandas_6parser_10TextReader_buffer_lines(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6pandas_6parser_10TextReader_12buffer_lines_1__get__(o); } static int __pyx_setprop_6pandas_6parser_10TextReader_buffer_lines(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { return __pyx_pw_6pandas_6parser_10TextReader_12buffer_lines_3__set__(o, v); } else { PyErr_SetString(PyExc_NotImplementedError, "__del__"); return -1; } } static PyObject *__pyx_getprop_6pandas_6parser_10TextReader_allow_leading_cols(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6pandas_6parser_10TextReader_18allow_leading_cols_1__get__(o); } static int __pyx_setprop_6pandas_6parser_10TextReader_allow_leading_cols(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { return __pyx_pw_6pandas_6parser_10TextReader_18allow_leading_cols_3__set__(o, v); } else { return __pyx_pw_6pandas_6parser_10TextReader_18allow_leading_cols_5__del__(o); } } static PyObject *__pyx_getprop_6pandas_6parser_10TextReader_delimiter(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6pandas_6parser_10TextReader_9delimiter_1__get__(o); } static int __pyx_setprop_6pandas_6parser_10TextReader_delimiter(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { return __pyx_pw_6pandas_6parser_10TextReader_9delimiter_3__set__(o, v); } else { return __pyx_pw_6pandas_6parser_10TextReader_9delimiter_5__del__(o); } } static PyObject *__pyx_getprop_6pandas_6parser_10TextReader_converters(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6pandas_6parser_10TextReader_10converters_1__get__(o); } static int __pyx_setprop_6pandas_6parser_10TextReader_converters(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { return __pyx_pw_6pandas_6parser_10TextReader_10converters_3__set__(o, v); } else { return __pyx_pw_6pandas_6parser_10TextReader_10converters_5__del__(o); } } static PyObject *__pyx_getprop_6pandas_6parser_10TextReader_delim_whitespace(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6pandas_6parser_10TextReader_16delim_whitespace_1__get__(o); } static int __pyx_setprop_6pandas_6parser_10TextReader_delim_whitespace(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { return __pyx_pw_6pandas_6parser_10TextReader_16delim_whitespace_3__set__(o, v); } else { return __pyx_pw_6pandas_6parser_10TextReader_16delim_whitespace_5__del__(o); } } static PyObject *__pyx_getprop_6pandas_6parser_10TextReader_na_values(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6pandas_6parser_10TextReader_9na_values_1__get__(o); } static int __pyx_setprop_6pandas_6parser_10TextReader_na_values(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { return __pyx_pw_6pandas_6parser_10TextReader_9na_values_3__set__(o, v); } else { return __pyx_pw_6pandas_6parser_10TextReader_9na_values_5__del__(o); } } static PyObject *__pyx_getprop_6pandas_6parser_10TextReader_true_values(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6pandas_6parser_10TextReader_11true_values_1__get__(o); } static int __pyx_setprop_6pandas_6parser_10TextReader_true_values(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { return __pyx_pw_6pandas_6parser_10TextReader_11true_values_3__set__(o, v); } else { return __pyx_pw_6pandas_6parser_10TextReader_11true_values_5__del__(o); } } static PyObject *__pyx_getprop_6pandas_6parser_10TextReader_false_values(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6pandas_6parser_10TextReader_12false_values_1__get__(o); } static int __pyx_setprop_6pandas_6parser_10TextReader_false_values(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { return __pyx_pw_6pandas_6parser_10TextReader_12false_values_3__set__(o, v); } else { return __pyx_pw_6pandas_6parser_10TextReader_12false_values_5__del__(o); } } static PyObject *__pyx_getprop_6pandas_6parser_10TextReader_memory_map(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6pandas_6parser_10TextReader_10memory_map_1__get__(o); } static int __pyx_setprop_6pandas_6parser_10TextReader_memory_map(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { return __pyx_pw_6pandas_6parser_10TextReader_10memory_map_3__set__(o, v); } else { return __pyx_pw_6pandas_6parser_10TextReader_10memory_map_5__del__(o); } } static PyObject *__pyx_getprop_6pandas_6parser_10TextReader_as_recarray(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6pandas_6parser_10TextReader_11as_recarray_1__get__(o); } static int __pyx_setprop_6pandas_6parser_10TextReader_as_recarray(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { return __pyx_pw_6pandas_6parser_10TextReader_11as_recarray_3__set__(o, v); } else { return __pyx_pw_6pandas_6parser_10TextReader_11as_recarray_5__del__(o); } } static PyObject *__pyx_getprop_6pandas_6parser_10TextReader_header(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6pandas_6parser_10TextReader_6header_1__get__(o); } static int __pyx_setprop_6pandas_6parser_10TextReader_header(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { return __pyx_pw_6pandas_6parser_10TextReader_6header_3__set__(o, v); } else { return __pyx_pw_6pandas_6parser_10TextReader_6header_5__del__(o); } } static PyObject *__pyx_getprop_6pandas_6parser_10TextReader_orig_header(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6pandas_6parser_10TextReader_11orig_header_1__get__(o); } static int __pyx_setprop_6pandas_6parser_10TextReader_orig_header(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { return __pyx_pw_6pandas_6parser_10TextReader_11orig_header_3__set__(o, v); } else { return __pyx_pw_6pandas_6parser_10TextReader_11orig_header_5__del__(o); } } static PyObject *__pyx_getprop_6pandas_6parser_10TextReader_names(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6pandas_6parser_10TextReader_5names_1__get__(o); } static int __pyx_setprop_6pandas_6parser_10TextReader_names(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { return __pyx_pw_6pandas_6parser_10TextReader_5names_3__set__(o, v); } else { return __pyx_pw_6pandas_6parser_10TextReader_5names_5__del__(o); } } static PyObject *__pyx_getprop_6pandas_6parser_10TextReader_header_start(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6pandas_6parser_10TextReader_12header_start_1__get__(o); } static int __pyx_setprop_6pandas_6parser_10TextReader_header_start(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { return __pyx_pw_6pandas_6parser_10TextReader_12header_start_3__set__(o, v); } else { return __pyx_pw_6pandas_6parser_10TextReader_12header_start_5__del__(o); } } static PyObject *__pyx_getprop_6pandas_6parser_10TextReader_header_end(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6pandas_6parser_10TextReader_10header_end_1__get__(o); } static int __pyx_setprop_6pandas_6parser_10TextReader_header_end(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { return __pyx_pw_6pandas_6parser_10TextReader_10header_end_3__set__(o, v); } else { return __pyx_pw_6pandas_6parser_10TextReader_10header_end_5__del__(o); } } static PyObject *__pyx_getprop_6pandas_6parser_10TextReader_index_col(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6pandas_6parser_10TextReader_9index_col_1__get__(o); } static int __pyx_setprop_6pandas_6parser_10TextReader_index_col(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { return __pyx_pw_6pandas_6parser_10TextReader_9index_col_3__set__(o, v); } else { return __pyx_pw_6pandas_6parser_10TextReader_9index_col_5__del__(o); } } static PyObject *__pyx_getprop_6pandas_6parser_10TextReader_low_memory(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6pandas_6parser_10TextReader_10low_memory_1__get__(o); } static int __pyx_setprop_6pandas_6parser_10TextReader_low_memory(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { return __pyx_pw_6pandas_6parser_10TextReader_10low_memory_3__set__(o, v); } else { return __pyx_pw_6pandas_6parser_10TextReader_10low_memory_5__del__(o); } } static PyObject *__pyx_getprop_6pandas_6parser_10TextReader_skiprows(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6pandas_6parser_10TextReader_8skiprows_1__get__(o); } static int __pyx_setprop_6pandas_6parser_10TextReader_skiprows(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { return __pyx_pw_6pandas_6parser_10TextReader_8skiprows_3__set__(o, v); } else { return __pyx_pw_6pandas_6parser_10TextReader_8skiprows_5__del__(o); } } static PyObject *__pyx_getprop_6pandas_6parser_10TextReader_compact_ints(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6pandas_6parser_10TextReader_12compact_ints_1__get__(o); } static int __pyx_setprop_6pandas_6parser_10TextReader_compact_ints(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { return __pyx_pw_6pandas_6parser_10TextReader_12compact_ints_3__set__(o, v); } else { return __pyx_pw_6pandas_6parser_10TextReader_12compact_ints_5__del__(o); } } static PyObject *__pyx_getprop_6pandas_6parser_10TextReader_use_unsigned(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6pandas_6parser_10TextReader_12use_unsigned_1__get__(o); } static int __pyx_setprop_6pandas_6parser_10TextReader_use_unsigned(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { return __pyx_pw_6pandas_6parser_10TextReader_12use_unsigned_3__set__(o, v); } else { return __pyx_pw_6pandas_6parser_10TextReader_12use_unsigned_5__del__(o); } } static PyObject *__pyx_getprop_6pandas_6parser_10TextReader_dtype(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6pandas_6parser_10TextReader_5dtype_1__get__(o); } static int __pyx_setprop_6pandas_6parser_10TextReader_dtype(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { return __pyx_pw_6pandas_6parser_10TextReader_5dtype_3__set__(o, v); } else { return __pyx_pw_6pandas_6parser_10TextReader_5dtype_5__del__(o); } } static PyObject *__pyx_getprop_6pandas_6parser_10TextReader_encoding(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6pandas_6parser_10TextReader_8encoding_1__get__(o); } static int __pyx_setprop_6pandas_6parser_10TextReader_encoding(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { return __pyx_pw_6pandas_6parser_10TextReader_8encoding_3__set__(o, v); } else { return __pyx_pw_6pandas_6parser_10TextReader_8encoding_5__del__(o); } } static PyObject *__pyx_getprop_6pandas_6parser_10TextReader_compression(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6pandas_6parser_10TextReader_11compression_1__get__(o); } static int __pyx_setprop_6pandas_6parser_10TextReader_compression(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { return __pyx_pw_6pandas_6parser_10TextReader_11compression_3__set__(o, v); } else { return __pyx_pw_6pandas_6parser_10TextReader_11compression_5__del__(o); } } static PyObject *__pyx_getprop_6pandas_6parser_10TextReader_mangle_dupe_cols(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6pandas_6parser_10TextReader_16mangle_dupe_cols_1__get__(o); } static int __pyx_setprop_6pandas_6parser_10TextReader_mangle_dupe_cols(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { return __pyx_pw_6pandas_6parser_10TextReader_16mangle_dupe_cols_3__set__(o, v); } else { return __pyx_pw_6pandas_6parser_10TextReader_16mangle_dupe_cols_5__del__(o); } } static PyObject *__pyx_getprop_6pandas_6parser_10TextReader_tupleize_cols(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6pandas_6parser_10TextReader_13tupleize_cols_1__get__(o); } static int __pyx_setprop_6pandas_6parser_10TextReader_tupleize_cols(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { return __pyx_pw_6pandas_6parser_10TextReader_13tupleize_cols_3__set__(o, v); } else { return __pyx_pw_6pandas_6parser_10TextReader_13tupleize_cols_5__del__(o); } } static PyObject *__pyx_getprop_6pandas_6parser_10TextReader_noconvert(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6pandas_6parser_10TextReader_9noconvert_1__get__(o); } static int __pyx_setprop_6pandas_6parser_10TextReader_noconvert(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { return __pyx_pw_6pandas_6parser_10TextReader_9noconvert_3__set__(o, v); } else { return __pyx_pw_6pandas_6parser_10TextReader_9noconvert_5__del__(o); } } static PyObject *__pyx_getprop_6pandas_6parser_10TextReader_usecols(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6pandas_6parser_10TextReader_7usecols_1__get__(o); } static int __pyx_setprop_6pandas_6parser_10TextReader_usecols(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { return __pyx_pw_6pandas_6parser_10TextReader_7usecols_3__set__(o, v); } else { return __pyx_pw_6pandas_6parser_10TextReader_7usecols_5__del__(o); } } static PyMethodDef __pyx_methods_6pandas_6parser_TextReader[] = { {__Pyx_NAMESTR("set_error_bad_lines"), (PyCFunction)__pyx_pw_6pandas_6parser_10TextReader_7set_error_bad_lines, METH_O, __Pyx_DOCSTR(0)}, {__Pyx_NAMESTR("read"), (PyCFunction)__pyx_pw_6pandas_6parser_10TextReader_9read, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_6parser_10TextReader_8read)}, {__Pyx_NAMESTR("debug_print"), (PyCFunction)__pyx_pw_6pandas_6parser_10TextReader_11debug_print, METH_NOARGS, __Pyx_DOCSTR(0)}, {__Pyx_NAMESTR("set_noconvert"), (PyCFunction)__pyx_pw_6pandas_6parser_10TextReader_13set_noconvert, METH_O, __Pyx_DOCSTR(0)}, {__Pyx_NAMESTR("remove_noconvert"), (PyCFunction)__pyx_pw_6pandas_6parser_10TextReader_15remove_noconvert, METH_O, __Pyx_DOCSTR(0)}, {__Pyx_NAMESTR("_convert_column_data"), (PyCFunction)__pyx_pw_6pandas_6parser_10TextReader_17_convert_column_data, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}, {__Pyx_NAMESTR("_get_converter"), (PyCFunction)__pyx_pw_6pandas_6parser_10TextReader_19_get_converter, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}, {0, 0, 0, 0} }; static struct PyGetSetDef __pyx_getsets_6pandas_6parser_TextReader[] = { {(char *)"leading_cols", __pyx_getprop_6pandas_6parser_10TextReader_leading_cols, __pyx_setprop_6pandas_6parser_10TextReader_leading_cols, 0, 0}, {(char *)"table_width", __pyx_getprop_6pandas_6parser_10TextReader_table_width, __pyx_setprop_6pandas_6parser_10TextReader_table_width, 0, 0}, {(char *)"skip_footer", __pyx_getprop_6pandas_6parser_10TextReader_skip_footer, __pyx_setprop_6pandas_6parser_10TextReader_skip_footer, 0, 0}, {(char *)"buffer_lines", __pyx_getprop_6pandas_6parser_10TextReader_buffer_lines, __pyx_setprop_6pandas_6parser_10TextReader_buffer_lines, 0, 0}, {(char *)"allow_leading_cols", __pyx_getprop_6pandas_6parser_10TextReader_allow_leading_cols, __pyx_setprop_6pandas_6parser_10TextReader_allow_leading_cols, 0, 0}, {(char *)"delimiter", __pyx_getprop_6pandas_6parser_10TextReader_delimiter, __pyx_setprop_6pandas_6parser_10TextReader_delimiter, 0, 0}, {(char *)"converters", __pyx_getprop_6pandas_6parser_10TextReader_converters, __pyx_setprop_6pandas_6parser_10TextReader_converters, 0, 0}, {(char *)"delim_whitespace", __pyx_getprop_6pandas_6parser_10TextReader_delim_whitespace, __pyx_setprop_6pandas_6parser_10TextReader_delim_whitespace, 0, 0}, {(char *)"na_values", __pyx_getprop_6pandas_6parser_10TextReader_na_values, __pyx_setprop_6pandas_6parser_10TextReader_na_values, 0, 0}, {(char *)"true_values", __pyx_getprop_6pandas_6parser_10TextReader_true_values, __pyx_setprop_6pandas_6parser_10TextReader_true_values, 0, 0}, {(char *)"false_values", __pyx_getprop_6pandas_6parser_10TextReader_false_values, __pyx_setprop_6pandas_6parser_10TextReader_false_values, 0, 0}, {(char *)"memory_map", __pyx_getprop_6pandas_6parser_10TextReader_memory_map, __pyx_setprop_6pandas_6parser_10TextReader_memory_map, 0, 0}, {(char *)"as_recarray", __pyx_getprop_6pandas_6parser_10TextReader_as_recarray, __pyx_setprop_6pandas_6parser_10TextReader_as_recarray, 0, 0}, {(char *)"header", __pyx_getprop_6pandas_6parser_10TextReader_header, __pyx_setprop_6pandas_6parser_10TextReader_header, 0, 0}, {(char *)"orig_header", __pyx_getprop_6pandas_6parser_10TextReader_orig_header, __pyx_setprop_6pandas_6parser_10TextReader_orig_header, 0, 0}, {(char *)"names", __pyx_getprop_6pandas_6parser_10TextReader_names, __pyx_setprop_6pandas_6parser_10TextReader_names, 0, 0}, {(char *)"header_start", __pyx_getprop_6pandas_6parser_10TextReader_header_start, __pyx_setprop_6pandas_6parser_10TextReader_header_start, 0, 0}, {(char *)"header_end", __pyx_getprop_6pandas_6parser_10TextReader_header_end, __pyx_setprop_6pandas_6parser_10TextReader_header_end, 0, 0}, {(char *)"index_col", __pyx_getprop_6pandas_6parser_10TextReader_index_col, __pyx_setprop_6pandas_6parser_10TextReader_index_col, 0, 0}, {(char *)"low_memory", __pyx_getprop_6pandas_6parser_10TextReader_low_memory, __pyx_setprop_6pandas_6parser_10TextReader_low_memory, 0, 0}, {(char *)"skiprows", __pyx_getprop_6pandas_6parser_10TextReader_skiprows, __pyx_setprop_6pandas_6parser_10TextReader_skiprows, 0, 0}, {(char *)"compact_ints", __pyx_getprop_6pandas_6parser_10TextReader_compact_ints, __pyx_setprop_6pandas_6parser_10TextReader_compact_ints, 0, 0}, {(char *)"use_unsigned", __pyx_getprop_6pandas_6parser_10TextReader_use_unsigned, __pyx_setprop_6pandas_6parser_10TextReader_use_unsigned, 0, 0}, {(char *)"dtype", __pyx_getprop_6pandas_6parser_10TextReader_dtype, __pyx_setprop_6pandas_6parser_10TextReader_dtype, 0, 0}, {(char *)"encoding", __pyx_getprop_6pandas_6parser_10TextReader_encoding, __pyx_setprop_6pandas_6parser_10TextReader_encoding, 0, 0}, {(char *)"compression", __pyx_getprop_6pandas_6parser_10TextReader_compression, __pyx_setprop_6pandas_6parser_10TextReader_compression, 0, 0}, {(char *)"mangle_dupe_cols", __pyx_getprop_6pandas_6parser_10TextReader_mangle_dupe_cols, __pyx_setprop_6pandas_6parser_10TextReader_mangle_dupe_cols, 0, 0}, {(char *)"tupleize_cols", __pyx_getprop_6pandas_6parser_10TextReader_tupleize_cols, __pyx_setprop_6pandas_6parser_10TextReader_tupleize_cols, 0, 0}, {(char *)"noconvert", __pyx_getprop_6pandas_6parser_10TextReader_noconvert, __pyx_setprop_6pandas_6parser_10TextReader_noconvert, 0, 0}, {(char *)"usecols", __pyx_getprop_6pandas_6parser_10TextReader_usecols, __pyx_setprop_6pandas_6parser_10TextReader_usecols, 0, 0}, {0, 0, 0, 0, 0} }; static PyTypeObject __pyx_type_6pandas_6parser_TextReader = { PyVarObject_HEAD_INIT(0, 0) __Pyx_NAMESTR("pandas.parser.TextReader"), /*tp_name*/ sizeof(struct __pyx_obj_6pandas_6parser_TextReader), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_6pandas_6parser_TextReader, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #else 0, /*reserved*/ #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*/ __Pyx_DOCSTR("\n\n # source: StringIO or file object\n\n "), /*tp_doc*/ __pyx_tp_traverse_6pandas_6parser_TextReader, /*tp_traverse*/ __pyx_tp_clear_6pandas_6parser_TextReader, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_6pandas_6parser_TextReader, /*tp_methods*/ 0, /*tp_members*/ __pyx_getsets_6pandas_6parser_TextReader, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ __pyx_pw_6pandas_6parser_10TextReader_3__init__, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_6pandas_6parser_TextReader, /*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*/ #if PY_VERSION_HEX >= 0x02060000 0, /*tp_version_tag*/ #endif #if PY_VERSION_HEX >= 0x030400a1 && defined(Py_TPFLAGS_HAVE_FINALIZE) 0, /*tp_finalize*/ #endif }; static PyMethodDef __pyx_methods[] = { {0, 0, 0, 0} }; #if PY_MAJOR_VERSION >= 3 static struct PyModuleDef __pyx_moduledef = { #if PY_VERSION_HEX < 0x03020000 { PyObject_HEAD_INIT(NULL) NULL, 0, NULL }, #else PyModuleDef_HEAD_INIT, #endif __Pyx_NAMESTR("parser"), 0, /* m_doc */ -1, /* m_size */ __pyx_methods /* m_methods */, NULL, /* m_reload */ NULL, /* m_traverse */ NULL, /* m_clear */ NULL /* m_free */ }; #endif static __Pyx_StringTabEntry __pyx_string_tab[] = { {&__pyx_kp_b_1, __pyx_k_1, sizeof(__pyx_k_1), 0, 0, 0, 0}, {&__pyx_kp_s_1, __pyx_k_1, sizeof(__pyx_k_1), 0, 0, 1, 0}, {&__pyx_kp_u_100, __pyx_k_100, sizeof(__pyx_k_100), 0, 1, 0, 0}, {&__pyx_kp_u_102, __pyx_k_102, sizeof(__pyx_k_102), 0, 1, 0, 0}, {&__pyx_kp_u_104, __pyx_k_104, sizeof(__pyx_k_104), 0, 1, 0, 0}, {&__pyx_kp_u_106, __pyx_k_106, sizeof(__pyx_k_106), 0, 1, 0, 0}, {&__pyx_kp_u_107, __pyx_k_107, sizeof(__pyx_k_107), 0, 1, 0, 0}, {&__pyx_kp_u_110, __pyx_k_110, sizeof(__pyx_k_110), 0, 1, 0, 0}, {&__pyx_n_s_112, __pyx_k_112, sizeof(__pyx_k_112), 0, 0, 1, 1}, {&__pyx_n_s_113, __pyx_k_113, sizeof(__pyx_k_113), 0, 0, 1, 1}, {&__pyx_n_s_114, __pyx_k_114, sizeof(__pyx_k_114), 0, 0, 1, 1}, {&__pyx_kp_b_115, __pyx_k_115, sizeof(__pyx_k_115), 0, 0, 0, 0}, {&__pyx_kp_b_116, __pyx_k_116, sizeof(__pyx_k_116), 0, 0, 0, 0}, {&__pyx_kp_b_117, __pyx_k_117, sizeof(__pyx_k_117), 0, 0, 0, 0}, {&__pyx_kp_b_118, __pyx_k_118, sizeof(__pyx_k_118), 0, 0, 0, 0}, {&__pyx_kp_b_119, __pyx_k_119, sizeof(__pyx_k_119), 0, 0, 0, 0}, {&__pyx_kp_b_120, __pyx_k_120, sizeof(__pyx_k_120), 0, 0, 0, 0}, {&__pyx_n_s_121, __pyx_k_121, sizeof(__pyx_k_121), 0, 0, 1, 1}, {&__pyx_kp_s_124, __pyx_k_124, sizeof(__pyx_k_124), 0, 0, 1, 0}, {&__pyx_kp_s_130, __pyx_k_130, sizeof(__pyx_k_130), 0, 0, 1, 0}, {&__pyx_kp_s_131, __pyx_k_131, sizeof(__pyx_k_131), 0, 0, 1, 0}, {&__pyx_kp_s_132, __pyx_k_132, sizeof(__pyx_k_132), 0, 0, 1, 0}, {&__pyx_kp_s_20, __pyx_k_20, sizeof(__pyx_k_20), 0, 0, 1, 0}, {&__pyx_kp_s_22, __pyx_k_22, sizeof(__pyx_k_22), 0, 0, 1, 0}, {&__pyx_kp_s_24, __pyx_k_24, sizeof(__pyx_k_24), 0, 0, 1, 0}, {&__pyx_kp_s_26, __pyx_k_26, sizeof(__pyx_k_26), 0, 0, 1, 0}, {&__pyx_kp_s_28, __pyx_k_28, sizeof(__pyx_k_28), 0, 0, 1, 0}, {&__pyx_kp_s_30, __pyx_k_30, sizeof(__pyx_k_30), 0, 0, 1, 0}, {&__pyx_kp_b_32, __pyx_k_32, sizeof(__pyx_k_32), 0, 0, 0, 0}, {&__pyx_kp_s_32, __pyx_k_32, sizeof(__pyx_k_32), 0, 0, 1, 0}, {&__pyx_kp_s_34, __pyx_k_34, sizeof(__pyx_k_34), 0, 0, 1, 0}, {&__pyx_kp_s_36, __pyx_k_36, sizeof(__pyx_k_36), 0, 0, 1, 0}, {&__pyx_kp_s_38, __pyx_k_38, sizeof(__pyx_k_38), 0, 0, 1, 0}, {&__pyx_kp_s_40, __pyx_k_40, sizeof(__pyx_k_40), 0, 0, 1, 0}, {&__pyx_kp_s_41, __pyx_k_41, sizeof(__pyx_k_41), 0, 0, 1, 0}, {&__pyx_kp_s_43, __pyx_k_43, sizeof(__pyx_k_43), 0, 0, 1, 0}, {&__pyx_kp_s_45, __pyx_k_45, sizeof(__pyx_k_45), 0, 0, 1, 0}, {&__pyx_kp_s_46, __pyx_k_46, sizeof(__pyx_k_46), 0, 0, 1, 0}, {&__pyx_kp_s_47, __pyx_k_47, sizeof(__pyx_k_47), 0, 0, 1, 0}, {&__pyx_kp_b_48, __pyx_k_48, sizeof(__pyx_k_48), 0, 0, 0, 0}, {&__pyx_kp_s_48, __pyx_k_48, sizeof(__pyx_k_48), 0, 0, 1, 0}, {&__pyx_kp_s_49, __pyx_k_49, sizeof(__pyx_k_49), 0, 0, 1, 0}, {&__pyx_kp_s_50, __pyx_k_50, sizeof(__pyx_k_50), 0, 0, 1, 0}, {&__pyx_kp_s_51, __pyx_k_51, sizeof(__pyx_k_51), 0, 0, 1, 0}, {&__pyx_kp_s_52, __pyx_k_52, sizeof(__pyx_k_52), 0, 0, 1, 0}, {&__pyx_n_s_54, __pyx_k_54, sizeof(__pyx_k_54), 0, 0, 1, 1}, {&__pyx_kp_s_55, __pyx_k_55, sizeof(__pyx_k_55), 0, 0, 1, 0}, {&__pyx_kp_s_56, __pyx_k_56, sizeof(__pyx_k_56), 0, 0, 1, 0}, {&__pyx_kp_s_57, __pyx_k_57, sizeof(__pyx_k_57), 0, 0, 1, 0}, {&__pyx_n_s_59, __pyx_k_59, sizeof(__pyx_k_59), 0, 0, 1, 1}, {&__pyx_kp_s_60, __pyx_k_60, sizeof(__pyx_k_60), 0, 0, 1, 0}, {&__pyx_kp_s_61, __pyx_k_61, sizeof(__pyx_k_61), 0, 0, 1, 0}, {&__pyx_kp_s_62, __pyx_k_62, sizeof(__pyx_k_62), 0, 0, 1, 0}, {&__pyx_kp_s_64, __pyx_k_64, sizeof(__pyx_k_64), 0, 0, 1, 0}, {&__pyx_kp_s_65, __pyx_k_65, sizeof(__pyx_k_65), 0, 0, 1, 0}, {&__pyx_kp_s_66, __pyx_k_66, sizeof(__pyx_k_66), 0, 0, 1, 0}, {&__pyx_kp_s_67, __pyx_k_67, sizeof(__pyx_k_67), 0, 0, 1, 0}, {&__pyx_kp_s_71, __pyx_k_71, sizeof(__pyx_k_71), 0, 0, 1, 0}, {&__pyx_kp_s_74, __pyx_k_74, sizeof(__pyx_k_74), 0, 0, 1, 0}, {&__pyx_kp_s_76, __pyx_k_76, sizeof(__pyx_k_76), 0, 0, 1, 0}, {&__pyx_kp_s_78, __pyx_k_78, sizeof(__pyx_k_78), 0, 0, 1, 0}, {&__pyx_kp_b_8, __pyx_k_8, sizeof(__pyx_k_8), 0, 0, 0, 0}, {&__pyx_kp_s_87, __pyx_k_87, sizeof(__pyx_k_87), 0, 0, 1, 0}, {&__pyx_kp_s_89, __pyx_k_89, sizeof(__pyx_k_89), 0, 0, 1, 0}, {&__pyx_kp_b_9, __pyx_k_9, sizeof(__pyx_k_9), 0, 0, 0, 0}, {&__pyx_kp_s_90, __pyx_k_90, sizeof(__pyx_k_90), 0, 0, 1, 0}, {&__pyx_kp_s_91, __pyx_k_91, sizeof(__pyx_k_91), 0, 0, 1, 0}, {&__pyx_kp_s_92, __pyx_k_92, sizeof(__pyx_k_92), 0, 0, 1, 0}, {&__pyx_kp_s_93, __pyx_k_93, sizeof(__pyx_k_93), 0, 0, 1, 0}, {&__pyx_n_s_94, __pyx_k_94, sizeof(__pyx_k_94), 0, 0, 1, 1}, {&__pyx_kp_s_95, __pyx_k_95, sizeof(__pyx_k_95), 0, 0, 1, 0}, {&__pyx_kp_s_97, __pyx_k_97, sizeof(__pyx_k_97), 0, 0, 1, 0}, {&__pyx_n_s__BZ2File, __pyx_k__BZ2File, sizeof(__pyx_k__BZ2File), 0, 0, 1, 1}, {&__pyx_n_s__BufferedReader, __pyx_k__BufferedReader, sizeof(__pyx_k__BufferedReader), 0, 0, 1, 1}, {&__pyx_n_s__CParserError, __pyx_k__CParserError, sizeof(__pyx_k__CParserError), 0, 0, 1, 1}, {&__pyx_n_s__DEFAULT_CHUNKSIZE, __pyx_k__DEFAULT_CHUNKSIZE, sizeof(__pyx_k__DEFAULT_CHUNKSIZE), 0, 0, 1, 1}, {&__pyx_n_s__DtypeWarning, __pyx_k__DtypeWarning, sizeof(__pyx_k__DtypeWarning), 0, 0, 1, 1}, {&__pyx_n_s__Exception, __pyx_k__Exception, sizeof(__pyx_k__Exception), 0, 0, 1, 1}, {&__pyx_n_b__FALSE, __pyx_k__FALSE, sizeof(__pyx_k__FALSE), 0, 0, 0, 1}, {&__pyx_n_b__False, __pyx_k__False, sizeof(__pyx_k__False), 0, 0, 0, 1}, {&__pyx_n_s__GzipFile, __pyx_k__GzipFile, sizeof(__pyx_k__GzipFile), 0, 0, 1, 1}, {&__pyx_n_s__IOError, __pyx_k__IOError, sizeof(__pyx_k__IOError), 0, 0, 1, 1}, {&__pyx_n_s__IndexError, __pyx_k__IndexError, sizeof(__pyx_k__IndexError), 0, 0, 1, 1}, {&__pyx_n_s__M, __pyx_k__M, sizeof(__pyx_k__M), 0, 0, 1, 1}, {&__pyx_n_b__NA, __pyx_k__NA, sizeof(__pyx_k__NA), 0, 0, 0, 1}, {&__pyx_n_s__NA, __pyx_k__NA, sizeof(__pyx_k__NA), 0, 0, 1, 1}, {&__pyx_n_b__NULL, __pyx_k__NULL, sizeof(__pyx_k__NULL), 0, 0, 0, 1}, {&__pyx_n_b__NaN, __pyx_k__NaN, sizeof(__pyx_k__NaN), 0, 0, 0, 1}, {&__pyx_n_s__NameError, __pyx_k__NameError, sizeof(__pyx_k__NameError), 0, 0, 1, 1}, {&__pyx_n_s__NotImplementedError, __pyx_k__NotImplementedError, sizeof(__pyx_k__NotImplementedError), 0, 0, 1, 1}, {&__pyx_n_s__O, __pyx_k__O, sizeof(__pyx_k__O), 0, 0, 1, 1}, {&__pyx_n_s__OverflowError, __pyx_k__OverflowError, sizeof(__pyx_k__OverflowError), 0, 0, 1, 1}, {&__pyx_n_s__RuntimeError, __pyx_k__RuntimeError, sizeof(__pyx_k__RuntimeError), 0, 0, 1, 1}, {&__pyx_n_s__S, __pyx_k__S, sizeof(__pyx_k__S), 0, 0, 1, 1}, {&__pyx_n_s__StopIteration, __pyx_k__StopIteration, sizeof(__pyx_k__StopIteration), 0, 0, 1, 1}, {&__pyx_n_b__TRUE, __pyx_k__TRUE, sizeof(__pyx_k__TRUE), 0, 0, 0, 1}, {&__pyx_n_s__TextIOWrapper, __pyx_k__TextIOWrapper, sizeof(__pyx_k__TextIOWrapper), 0, 0, 1, 1}, {&__pyx_n_s__Tokenization, __pyx_k__Tokenization, sizeof(__pyx_k__Tokenization), 0, 0, 1, 1}, {&__pyx_n_b__True, __pyx_k__True, sizeof(__pyx_k__True), 0, 0, 0, 1}, {&__pyx_n_s__TypeError, __pyx_k__TypeError, sizeof(__pyx_k__TypeError), 0, 0, 1, 1}, {&__pyx_n_s__U, __pyx_k__U, sizeof(__pyx_k__U), 0, 0, 1, 1}, {&__pyx_n_s__ValueError, __pyx_k__ValueError, sizeof(__pyx_k__ValueError), 0, 0, 1, 1}, {&__pyx_n_s___NA_VALUES, __pyx_k___NA_VALUES, sizeof(__pyx_k___NA_VALUES), 0, 0, 1, 1}, {&__pyx_n_s____builtin__, __pyx_k____builtin__, sizeof(__pyx_k____builtin__), 0, 0, 1, 1}, {&__pyx_n_s____class__, __pyx_k____class__, sizeof(__pyx_k____class__), 0, 0, 1, 1}, {&__pyx_n_s____import__, __pyx_k____import__, sizeof(__pyx_k____import__), 0, 0, 1, 1}, {&__pyx_n_s____main__, __pyx_k____main__, sizeof(__pyx_k____main__), 0, 0, 1, 1}, {&__pyx_n_s____metaclass__, __pyx_k____metaclass__, sizeof(__pyx_k____metaclass__), 0, 0, 1, 1}, {&__pyx_n_s____module__, __pyx_k____module__, sizeof(__pyx_k____module__), 0, 0, 1, 1}, {&__pyx_n_s____pyx_getbuffer, __pyx_k____pyx_getbuffer, sizeof(__pyx_k____pyx_getbuffer), 0, 0, 1, 1}, {&__pyx_n_s____pyx_releasebuffer, __pyx_k____pyx_releasebuffer, sizeof(__pyx_k____pyx_releasebuffer), 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____qualname__, __pyx_k____qualname__, sizeof(__pyx_k____qualname__), 0, 0, 1, 1}, {&__pyx_n_s____test__, __pyx_k____test__, sizeof(__pyx_k____test__), 0, 0, 1, 1}, {&__pyx_n_s___compute_na_values, __pyx_k___compute_na_values, sizeof(__pyx_k___compute_na_values), 0, 0, 1, 1}, {&__pyx_n_s___concatenate_chunks, __pyx_k___concatenate_chunks, sizeof(__pyx_k___concatenate_chunks), 0, 0, 1, 1}, {&__pyx_n_s___ensure_encoded, __pyx_k___ensure_encoded, sizeof(__pyx_k___ensure_encoded), 0, 0, 1, 1}, {&__pyx_n_s___get_converter, __pyx_k___get_converter, sizeof(__pyx_k___get_converter), 0, 0, 1, 1}, {&__pyx_n_s___is_file_like, __pyx_k___is_file_like, sizeof(__pyx_k___is_file_like), 0, 0, 1, 1}, {&__pyx_n_s___mask, __pyx_k___mask, sizeof(__pyx_k___mask), 0, 0, 1, 1}, {&__pyx_n_s___maybe_encode, __pyx_k___maybe_encode, sizeof(__pyx_k___maybe_encode), 0, 0, 1, 1}, {&__pyx_n_s___maybe_upcast, __pyx_k___maybe_upcast, sizeof(__pyx_k___maybe_upcast), 0, 0, 1, 1}, {&__pyx_n_s__a, __pyx_k__a, sizeof(__pyx_k__a), 0, 0, 1, 1}, {&__pyx_n_s__allow_leading_cols, __pyx_k__allow_leading_cols, sizeof(__pyx_k__allow_leading_cols), 0, 0, 1, 1}, {&__pyx_n_s__append, __pyx_k__append, sizeof(__pyx_k__append), 0, 0, 1, 1}, {&__pyx_n_s__arr, __pyx_k__arr, sizeof(__pyx_k__arr), 0, 0, 1, 1}, {&__pyx_n_s__arrs, __pyx_k__arrs, sizeof(__pyx_k__arrs), 0, 0, 1, 1}, {&__pyx_n_s__as_recarray, __pyx_k__as_recarray, sizeof(__pyx_k__as_recarray), 0, 0, 1, 1}, {&__pyx_n_s__astype, __pyx_k__astype, sizeof(__pyx_k__astype), 0, 0, 1, 1}, {&__pyx_n_s__b, __pyx_k__b, sizeof(__pyx_k__b), 0, 0, 1, 1}, {&__pyx_n_s__basestring, __pyx_k__basestring, sizeof(__pyx_k__basestring), 0, 0, 1, 1}, {&__pyx_n_s__bool_, __pyx_k__bool_, sizeof(__pyx_k__bool_), 0, 0, 1, 1}, {&__pyx_n_s__buf, __pyx_k__buf, sizeof(__pyx_k__buf), 0, 0, 1, 1}, {&__pyx_n_s__buffer_lines, __pyx_k__buffer_lines, sizeof(__pyx_k__buffer_lines), 0, 0, 1, 1}, {&__pyx_n_s__bz2, __pyx_k__bz2, sizeof(__pyx_k__bz2), 0, 0, 1, 1}, {&__pyx_n_s__c, __pyx_k__c, sizeof(__pyx_k__c), 0, 0, 1, 1}, {&__pyx_n_s__chunk, __pyx_k__chunk, sizeof(__pyx_k__chunk), 0, 0, 1, 1}, {&__pyx_n_s__chunks, __pyx_k__chunks, sizeof(__pyx_k__chunks), 0, 0, 1, 1}, {&__pyx_n_s__column, __pyx_k__column, sizeof(__pyx_k__column), 0, 0, 1, 1}, {&__pyx_n_s__columns, __pyx_k__columns, sizeof(__pyx_k__columns), 0, 0, 1, 1}, {&__pyx_n_s__comment, __pyx_k__comment, sizeof(__pyx_k__comment), 0, 0, 1, 1}, {&__pyx_n_s__common_type, __pyx_k__common_type, sizeof(__pyx_k__common_type), 0, 0, 1, 1}, {&__pyx_n_s__compact_ints, __pyx_k__compact_ints, sizeof(__pyx_k__compact_ints), 0, 0, 1, 1}, {&__pyx_n_s__compression, __pyx_k__compression, sizeof(__pyx_k__compression), 0, 0, 1, 1}, {&__pyx_n_s__concatenate, __pyx_k__concatenate, sizeof(__pyx_k__concatenate), 0, 0, 1, 1}, {&__pyx_n_s__converters, __pyx_k__converters, sizeof(__pyx_k__converters), 0, 0, 1, 1}, {&__pyx_n_s__decimal, __pyx_k__decimal, sizeof(__pyx_k__decimal), 0, 0, 1, 1}, {&__pyx_n_s__delim_whitespace, __pyx_k__delim_whitespace, sizeof(__pyx_k__delim_whitespace), 0, 0, 1, 1}, {&__pyx_n_s__delimiter, __pyx_k__delimiter, sizeof(__pyx_k__delimiter), 0, 0, 1, 1}, {&__pyx_n_s__descr, __pyx_k__descr, sizeof(__pyx_k__descr), 0, 0, 1, 1}, {&__pyx_n_s__doublequote, __pyx_k__doublequote, sizeof(__pyx_k__doublequote), 0, 0, 1, 1}, {&__pyx_n_s__downcast_int64, __pyx_k__downcast_int64, sizeof(__pyx_k__downcast_int64), 0, 0, 1, 1}, {&__pyx_n_s__dt, __pyx_k__dt, sizeof(__pyx_k__dt), 0, 0, 1, 1}, {&__pyx_n_s__dtype, __pyx_k__dtype, sizeof(__pyx_k__dtype), 0, 0, 1, 1}, {&__pyx_n_s__dtypes, __pyx_k__dtypes, sizeof(__pyx_k__dtypes), 0, 0, 1, 1}, {&__pyx_n_s__elsize, __pyx_k__elsize, sizeof(__pyx_k__elsize), 0, 0, 1, 1}, {&__pyx_n_s__empty, __pyx_k__empty, sizeof(__pyx_k__empty), 0, 0, 1, 1}, {&__pyx_n_s__encode, __pyx_k__encode, sizeof(__pyx_k__encode), 0, 0, 1, 1}, {&__pyx_n_s__encoding, __pyx_k__encoding, sizeof(__pyx_k__encoding), 0, 0, 1, 1}, {&__pyx_n_s__end, __pyx_k__end, sizeof(__pyx_k__end), 0, 0, 1, 1}, {&__pyx_n_s__enumerate, __pyx_k__enumerate, sizeof(__pyx_k__enumerate), 0, 0, 1, 1}, {&__pyx_n_s__error_bad_lines, __pyx_k__error_bad_lines, sizeof(__pyx_k__error_bad_lines), 0, 0, 1, 1}, {&__pyx_n_s__escapechar, __pyx_k__escapechar, sizeof(__pyx_k__escapechar), 0, 0, 1, 1}, {&__pyx_n_s__exists, __pyx_k__exists, sizeof(__pyx_k__exists), 0, 0, 1, 1}, {&__pyx_n_s__f, __pyx_k__f, sizeof(__pyx_k__f), 0, 0, 1, 1}, {&__pyx_n_s__f8, __pyx_k__f8, sizeof(__pyx_k__f8), 0, 0, 1, 1}, {&__pyx_n_b__false, __pyx_k__false, sizeof(__pyx_k__false), 0, 0, 0, 1}, {&__pyx_n_s__false_values, __pyx_k__false_values, sizeof(__pyx_k__false_values), 0, 0, 1, 1}, {&__pyx_n_s__field_type, __pyx_k__field_type, sizeof(__pyx_k__field_type), 0, 0, 1, 1}, {&__pyx_n_s__fields, __pyx_k__fields, sizeof(__pyx_k__fields), 0, 0, 1, 1}, {&__pyx_n_s__file, __pyx_k__file, sizeof(__pyx_k__file), 0, 0, 1, 1}, {&__pyx_n_s__fileobj, __pyx_k__fileobj, sizeof(__pyx_k__fileobj), 0, 0, 1, 1}, {&__pyx_n_s__find_common_type, __pyx_k__find_common_type, sizeof(__pyx_k__find_common_type), 0, 0, 1, 1}, {&__pyx_n_s__flags, __pyx_k__flags, sizeof(__pyx_k__flags), 0, 0, 1, 1}, {&__pyx_n_s__float64, __pyx_k__float64, sizeof(__pyx_k__float64), 0, 0, 1, 1}, {&__pyx_n_s__fnames, __pyx_k__fnames, sizeof(__pyx_k__fnames), 0, 0, 1, 1}, {&__pyx_n_s__footer, __pyx_k__footer, sizeof(__pyx_k__footer), 0, 0, 1, 1}, {&__pyx_n_s__get, __pyx_k__get, sizeof(__pyx_k__get), 0, 0, 1, 1}, {&__pyx_n_s__gzip, __pyx_k__gzip, sizeof(__pyx_k__gzip), 0, 0, 1, 1}, {&__pyx_n_s__header, __pyx_k__header, sizeof(__pyx_k__header), 0, 0, 1, 1}, {&__pyx_n_s__header_end, __pyx_k__header_end, sizeof(__pyx_k__header_end), 0, 0, 1, 1}, {&__pyx_n_s__header_start, __pyx_k__header_start, sizeof(__pyx_k__header_start), 0, 0, 1, 1}, {&__pyx_n_s__i, __pyx_k__i, sizeof(__pyx_k__i), 0, 0, 1, 1}, {&__pyx_n_s__i8, __pyx_k__i8, sizeof(__pyx_k__i8), 0, 0, 1, 1}, {&__pyx_n_s__iinfo, __pyx_k__iinfo, sizeof(__pyx_k__iinfo), 0, 0, 1, 1}, {&__pyx_n_s__index_col, __pyx_k__index_col, sizeof(__pyx_k__index_col), 0, 0, 1, 1}, {&__pyx_n_s__inf, __pyx_k__inf, sizeof(__pyx_k__inf), 0, 0, 1, 1}, {&__pyx_n_s__int16, __pyx_k__int16, sizeof(__pyx_k__int16), 0, 0, 1, 1}, {&__pyx_n_s__int16info, __pyx_k__int16info, sizeof(__pyx_k__int16info), 0, 0, 1, 1}, {&__pyx_n_s__int32, __pyx_k__int32, sizeof(__pyx_k__int32), 0, 0, 1, 1}, {&__pyx_n_s__int32info, __pyx_k__int32info, sizeof(__pyx_k__int32info), 0, 0, 1, 1}, {&__pyx_n_s__int64, __pyx_k__int64, sizeof(__pyx_k__int64), 0, 0, 1, 1}, {&__pyx_n_s__int64info, __pyx_k__int64info, sizeof(__pyx_k__int64info), 0, 0, 1, 1}, {&__pyx_n_s__int8, __pyx_k__int8, sizeof(__pyx_k__int8), 0, 0, 1, 1}, {&__pyx_n_s__int8info, __pyx_k__int8info, sizeof(__pyx_k__int8info), 0, 0, 1, 1}, {&__pyx_n_s__integer, __pyx_k__integer, sizeof(__pyx_k__integer), 0, 0, 1, 1}, {&__pyx_n_s__io, __pyx_k__io, sizeof(__pyx_k__io), 0, 0, 1, 1}, {&__pyx_n_s__itemsize, __pyx_k__itemsize, sizeof(__pyx_k__itemsize), 0, 0, 1, 1}, {&__pyx_n_s__join, __pyx_k__join, sizeof(__pyx_k__join), 0, 0, 1, 1}, {&__pyx_n_s__k, __pyx_k__k, sizeof(__pyx_k__k), 0, 0, 1, 1}, {&__pyx_n_s__keys, __pyx_k__keys, sizeof(__pyx_k__keys), 0, 0, 1, 1}, {&__pyx_n_s__length, __pyx_k__length, sizeof(__pyx_k__length), 0, 0, 1, 1}, {&__pyx_n_s__lib, __pyx_k__lib, sizeof(__pyx_k__lib), 0, 0, 1, 1}, {&__pyx_n_s__lineterminator, __pyx_k__lineterminator, sizeof(__pyx_k__lineterminator), 0, 0, 1, 1}, {&__pyx_n_s__low_memory, __pyx_k__low_memory, sizeof(__pyx_k__low_memory), 0, 0, 1, 1}, {&__pyx_n_s__lower, __pyx_k__lower, sizeof(__pyx_k__lower), 0, 0, 1, 1}, {&__pyx_n_s__lst, __pyx_k__lst, sizeof(__pyx_k__lst), 0, 0, 1, 1}, {&__pyx_n_s__mangle_dupe_cols, __pyx_k__mangle_dupe_cols, sizeof(__pyx_k__mangle_dupe_cols), 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__memory_map, __pyx_k__memory_map, sizeof(__pyx_k__memory_map), 0, 0, 1, 1}, {&__pyx_n_s__min, __pyx_k__min, sizeof(__pyx_k__min), 0, 0, 1, 1}, {&__pyx_n_s__mn, __pyx_k__mn, sizeof(__pyx_k__mn), 0, 0, 1, 1}, {&__pyx_n_s__mx, __pyx_k__mx, sizeof(__pyx_k__mx), 0, 0, 1, 1}, {&__pyx_n_s__n, __pyx_k__n, sizeof(__pyx_k__n), 0, 0, 1, 1}, {&__pyx_n_s__na_count, __pyx_k__na_count, sizeof(__pyx_k__na_count), 0, 0, 1, 1}, {&__pyx_n_s__na_filter, __pyx_k__na_filter, sizeof(__pyx_k__na_filter), 0, 0, 1, 1}, {&__pyx_n_s__na_fvalues, __pyx_k__na_fvalues, sizeof(__pyx_k__na_fvalues), 0, 0, 1, 1}, {&__pyx_n_s__na_value, __pyx_k__na_value, sizeof(__pyx_k__na_value), 0, 0, 1, 1}, {&__pyx_n_s__na_values, __pyx_k__na_values, sizeof(__pyx_k__na_values), 0, 0, 1, 1}, {&__pyx_n_s__name, __pyx_k__name, sizeof(__pyx_k__name), 0, 0, 1, 1}, {&__pyx_n_s__names, __pyx_k__names, sizeof(__pyx_k__names), 0, 0, 1, 1}, {&__pyx_n_b__nan, __pyx_k__nan, sizeof(__pyx_k__nan), 0, 0, 0, 1}, {&__pyx_n_s__nan, __pyx_k__nan, sizeof(__pyx_k__nan), 0, 0, 1, 1}, {&__pyx_n_s__nfields, __pyx_k__nfields, sizeof(__pyx_k__nfields), 0, 0, 1, 1}, {&__pyx_n_s__np, __pyx_k__np, sizeof(__pyx_k__np), 0, 0, 1, 1}, {&__pyx_n_s__numpy, __pyx_k__numpy, sizeof(__pyx_k__numpy), 0, 0, 1, 1}, {&__pyx_n_s__obj, __pyx_k__obj, sizeof(__pyx_k__obj), 0, 0, 1, 1}, {&__pyx_n_s__object, __pyx_k__object, sizeof(__pyx_k__object), 0, 0, 1, 1}, {&__pyx_n_s__object_, __pyx_k__object_, sizeof(__pyx_k__object_), 0, 0, 1, 1}, {&__pyx_n_s__offset, __pyx_k__offset, sizeof(__pyx_k__offset), 0, 0, 1, 1}, {&__pyx_n_s__ord, __pyx_k__ord, sizeof(__pyx_k__ord), 0, 0, 1, 1}, {&__pyx_n_s__os, __pyx_k__os, sizeof(__pyx_k__os), 0, 0, 1, 1}, {&__pyx_n_s__owndata, __pyx_k__owndata, sizeof(__pyx_k__owndata), 0, 0, 1, 1}, {&__pyx_n_s__path, __pyx_k__path, sizeof(__pyx_k__path), 0, 0, 1, 1}, {&__pyx_n_s__pop, __pyx_k__pop, sizeof(__pyx_k__pop), 0, 0, 1, 1}, {&__pyx_n_s__print, __pyx_k__print, sizeof(__pyx_k__print), 0, 0, 1, 1}, {&__pyx_n_s__putmask, __pyx_k__putmask, sizeof(__pyx_k__putmask), 0, 0, 1, 1}, {&__pyx_n_s__quotechar, __pyx_k__quotechar, sizeof(__pyx_k__quotechar), 0, 0, 1, 1}, {&__pyx_n_s__quoting, __pyx_k__quoting, sizeof(__pyx_k__quoting), 0, 0, 1, 1}, {&__pyx_n_s__range, __pyx_k__range, sizeof(__pyx_k__range), 0, 0, 1, 1}, {&__pyx_n_s__rb, __pyx_k__rb, sizeof(__pyx_k__rb), 0, 0, 1, 1}, {&__pyx_n_s__read, __pyx_k__read, sizeof(__pyx_k__read), 0, 0, 1, 1}, {&__pyx_n_s__recs, __pyx_k__recs, sizeof(__pyx_k__recs), 0, 0, 1, 1}, {&__pyx_n_s__remove, __pyx_k__remove, sizeof(__pyx_k__remove), 0, 0, 1, 1}, {&__pyx_n_s__result, __pyx_k__result, sizeof(__pyx_k__result), 0, 0, 1, 1}, {&__pyx_n_s__rows, __pyx_k__rows, sizeof(__pyx_k__rows), 0, 0, 1, 1}, {&__pyx_n_s__skip_footer, __pyx_k__skip_footer, sizeof(__pyx_k__skip_footer), 0, 0, 1, 1}, {&__pyx_n_s__skipinitialspace, __pyx_k__skipinitialspace, sizeof(__pyx_k__skipinitialspace), 0, 0, 1, 1}, {&__pyx_n_s__skiprows, __pyx_k__skiprows, sizeof(__pyx_k__skiprows), 0, 0, 1, 1}, {&__pyx_n_s__source, __pyx_k__source, sizeof(__pyx_k__source), 0, 0, 1, 1}, {&__pyx_n_s__stderr, __pyx_k__stderr, sizeof(__pyx_k__stderr), 0, 0, 1, 1}, {&__pyx_n_s__str, __pyx_k__str, sizeof(__pyx_k__str), 0, 0, 1, 1}, {&__pyx_n_s__stride, __pyx_k__stride, sizeof(__pyx_k__stride), 0, 0, 1, 1}, {&__pyx_n_s__sys, __pyx_k__sys, sizeof(__pyx_k__sys), 0, 0, 1, 1}, {&__pyx_n_s__thousands, __pyx_k__thousands, sizeof(__pyx_k__thousands), 0, 0, 1, 1}, {&__pyx_n_s__time, __pyx_k__time, sizeof(__pyx_k__time), 0, 0, 1, 1}, {&__pyx_n_s__tokenize_chunksize, __pyx_k__tokenize_chunksize, sizeof(__pyx_k__tokenize_chunksize), 0, 0, 1, 1}, {&__pyx_n_b__true, __pyx_k__true, sizeof(__pyx_k__true), 0, 0, 0, 1}, {&__pyx_n_s__true_values, __pyx_k__true_values, sizeof(__pyx_k__true_values), 0, 0, 1, 1}, {&__pyx_n_s__tupleize_cols, __pyx_k__tupleize_cols, sizeof(__pyx_k__tupleize_cols), 0, 0, 1, 1}, {&__pyx_n_s__type, __pyx_k__type, sizeof(__pyx_k__type), 0, 0, 1, 1}, {&__pyx_n_s__u, __pyx_k__u, sizeof(__pyx_k__u), 0, 0, 1, 1}, {&__pyx_n_s__uint16, __pyx_k__uint16, sizeof(__pyx_k__uint16), 0, 0, 1, 1}, {&__pyx_n_s__uint16info, __pyx_k__uint16info, sizeof(__pyx_k__uint16info), 0, 0, 1, 1}, {&__pyx_n_s__uint32, __pyx_k__uint32, sizeof(__pyx_k__uint32), 0, 0, 1, 1}, {&__pyx_n_s__uint32info, __pyx_k__uint32info, sizeof(__pyx_k__uint32info), 0, 0, 1, 1}, {&__pyx_n_s__uint64, __pyx_k__uint64, sizeof(__pyx_k__uint64), 0, 0, 1, 1}, {&__pyx_n_s__uint64info, __pyx_k__uint64info, sizeof(__pyx_k__uint64info), 0, 0, 1, 1}, {&__pyx_n_s__uint8, __pyx_k__uint8, sizeof(__pyx_k__uint8), 0, 0, 1, 1}, {&__pyx_n_s__uint8info, __pyx_k__uint8info, sizeof(__pyx_k__uint8info), 0, 0, 1, 1}, {&__pyx_n_s__upcast_na, __pyx_k__upcast_na, sizeof(__pyx_k__upcast_na), 0, 0, 1, 1}, {&__pyx_n_s__use_unsigned, __pyx_k__use_unsigned, sizeof(__pyx_k__use_unsigned), 0, 0, 1, 1}, {&__pyx_n_s__usecols, __pyx_k__usecols, sizeof(__pyx_k__usecols), 0, 0, 1, 1}, {&__pyx_n_s__val, __pyx_k__val, sizeof(__pyx_k__val), 0, 0, 1, 1}, {&__pyx_n_s__values, __pyx_k__values, sizeof(__pyx_k__values), 0, 0, 1, 1}, {&__pyx_n_s__verbose, __pyx_k__verbose, sizeof(__pyx_k__verbose), 0, 0, 1, 1}, {&__pyx_n_s__version_info, __pyx_k__version_info, sizeof(__pyx_k__version_info), 0, 0, 1, 1}, {&__pyx_n_s__view, __pyx_k__view, sizeof(__pyx_k__view), 0, 0, 1, 1}, {&__pyx_n_s__warn, __pyx_k__warn, sizeof(__pyx_k__warn), 0, 0, 1, 1}, {&__pyx_n_s__warn_bad_lines, __pyx_k__warn_bad_lines, sizeof(__pyx_k__warn_bad_lines), 0, 0, 1, 1}, {&__pyx_n_s__warning_columns, __pyx_k__warning_columns, sizeof(__pyx_k__warning_columns), 0, 0, 1, 1}, {&__pyx_n_s__warning_message, __pyx_k__warning_message, sizeof(__pyx_k__warning_message), 0, 0, 1, 1}, {&__pyx_n_s__warning_names, __pyx_k__warning_names, sizeof(__pyx_k__warning_names), 0, 0, 1, 1}, {&__pyx_n_s__warnings, __pyx_k__warnings, sizeof(__pyx_k__warnings), 0, 0, 1, 1}, {&__pyx_n_s__x, __pyx_k__x, sizeof(__pyx_k__x), 0, 0, 1, 1}, {0, 0, 0, 0, 0, 0, 0} }; static int __Pyx_InitCachedBuiltins(void) { __pyx_builtin_NameError = __Pyx_GetBuiltinName(__pyx_n_s__NameError); if (!__pyx_builtin_NameError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 67; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_builtin_Exception = __Pyx_GetBuiltinName(__pyx_n_s__Exception); if (!__pyx_builtin_Exception) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1156; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_builtin_ValueError = __Pyx_GetBuiltinName(__pyx_n_s__ValueError); if (!__pyx_builtin_ValueError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1160; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_builtin_ord = __Pyx_GetBuiltinName(__pyx_n_s__ord); if (!__pyx_builtin_ord) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 340; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_n_s__range); if (!__pyx_builtin_range) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 505; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_builtin_IOError = __Pyx_GetBuiltinName(__pyx_n_s__IOError); if (!__pyx_builtin_IOError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 557; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_builtin_enumerate = __Pyx_GetBuiltinName(__pyx_n_s__enumerate); if (!__pyx_builtin_enumerate) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 593; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_builtin_StopIteration = __Pyx_GetBuiltinName(__pyx_n_s__StopIteration); if (!__pyx_builtin_StopIteration) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 752; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_builtin_NotImplementedError = __Pyx_GetBuiltinName(__pyx_n_s__NotImplementedError); if (!__pyx_builtin_NotImplementedError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1040; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_builtin_TypeError = __Pyx_GetBuiltinName(__pyx_n_s__TypeError); if (!__pyx_builtin_TypeError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1067; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_builtin_object = __Pyx_GetBuiltinName(__pyx_n_s__object); if (!__pyx_builtin_object) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1210; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_builtin_IndexError = __Pyx_GetBuiltinName(__pyx_n_s__IndexError); if (!__pyx_builtin_IndexError) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 40; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_builtin_RuntimeError = __Pyx_GetBuiltinName(__pyx_n_s__RuntimeError); if (!__pyx_builtin_RuntimeError) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 803; __pyx_clineno = __LINE__; goto __pyx_L1_error;} return 0; __pyx_L1_error:; return -1; } static int __Pyx_InitCachedConstants(void) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0); /* "pandas/parser.pyx":339 * else: * if len(delimiter) > 1: * raise ValueError('only length-1 separators excluded right now') # <<<<<<<<<<<<<< * self.parser.delimiter = ord(delimiter) * */ __pyx_k_tuple_21 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_20)); if (unlikely(!__pyx_k_tuple_21)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 339; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_21); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_21)); /* "pandas/parser.pyx":350 * if lineterminator is not None: * if len(lineterminator) != 1: * raise ValueError('Only length-1 line terminators supported') # <<<<<<<<<<<<<< * self.parser.lineterminator = ord(lineterminator) * */ __pyx_k_tuple_23 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_22)); if (unlikely(!__pyx_k_tuple_23)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 350; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_23); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_23)); /* "pandas/parser.pyx":354 * * if len(decimal) != 1: * raise ValueError('Only length-1 decimal markers supported') # <<<<<<<<<<<<<< * self.parser.decimal = ord(decimal) * */ __pyx_k_tuple_25 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_24)); if (unlikely(!__pyx_k_tuple_25)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 354; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_25); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_25)); /* "pandas/parser.pyx":359 * if thousands is not None: * if len(thousands) != 1: * raise ValueError('Only length-1 thousands markers supported') # <<<<<<<<<<<<<< * self.parser.thousands = ord(thousands) * */ __pyx_k_tuple_27 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_26)); if (unlikely(!__pyx_k_tuple_27)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 359; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_27); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_27)); /* "pandas/parser.pyx":364 * if escapechar is not None: * if len(escapechar) != 1: * raise ValueError('Only length-1 escapes supported') # <<<<<<<<<<<<<< * self.parser.escapechar = ord(escapechar) * */ __pyx_k_tuple_29 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_28)); if (unlikely(!__pyx_k_tuple_29)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 364; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_29); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_29)); /* "pandas/parser.pyx":372 * if comment is not None: * if len(comment) > 1: * raise ValueError('Only length-1 comment characters supported') # <<<<<<<<<<<<<< * self.parser.commentchar = ord(comment) * */ __pyx_k_tuple_31 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_30)); if (unlikely(!__pyx_k_tuple_31)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 372; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_31); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_31)); /* "pandas/parser.pyx":420 * if encoding is not None: * if not isinstance(encoding, bytes): * encoding = encoding.encode('utf-8') # <<<<<<<<<<<<<< * encoding = encoding.lower() * self.c_encoding = encoding */ __pyx_k_tuple_33 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_32)); if (unlikely(!__pyx_k_tuple_33)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 420; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_33); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_33)); /* "pandas/parser.pyx":486 * * if not self.table_width: * raise ValueError("No columns to parse from file") # <<<<<<<<<<<<<< * * # compute buffer_lines as function of table width */ __pyx_k_tuple_35 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_34)); if (unlikely(!__pyx_k_tuple_35)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 486; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_35); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_35)); /* "pandas/parser.pyx":530 * source = bz2.BZ2File(source, 'rb') * else: * raise ValueError('Python cannot read bz2 from open file ' # <<<<<<<<<<<<<< * 'handle') * else: */ __pyx_k_tuple_37 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_36)); if (unlikely(!__pyx_k_tuple_37)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 530; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_37); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_37)); /* "pandas/parser.pyx":538 * if isinstance(source, basestring): * if not isinstance(source, bytes): * source = source.encode('utf-8') # <<<<<<<<<<<<<< * * if self.memory_map: */ __pyx_k_tuple_39 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_32)); if (unlikely(!__pyx_k_tuple_39)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 538; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_39); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_39)); /* "pandas/parser.pyx":558 * if not os.path.exists(source): * raise IOError('File %s does not exist' % source) * raise IOError('Initializing from file failed') # <<<<<<<<<<<<<< * * self.parser.source = ptr */ __pyx_k_tuple_42 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_41)); if (unlikely(!__pyx_k_tuple_42)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 558; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_42); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_42)); /* "pandas/parser.pyx":567 * ptr = new_rd_source(source) * if ptr == NULL: * raise IOError('Initializing parser from file-like ' # <<<<<<<<<<<<<< * 'object failed') * */ __pyx_k_tuple_44 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_43)); if (unlikely(!__pyx_k_tuple_44)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 567; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_44); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_44)); /* "pandas/parser.pyx":707 * self.leading_cols = field_count - passed_count * elif passed_count != field_count: * raise ValueError('Passed header names ' # <<<<<<<<<<<<<< * 'mismatches usecols') * # oh boy, #2442, #2981 */ __pyx_k_tuple_53 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_52)); if (unlikely(!__pyx_k_tuple_53)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 707; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_53); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_53)); /* "pandas/parser.pyx":805 * * if self.skip_footer > 0: * raise ValueError('skip_footer can only be used to read ' # <<<<<<<<<<<<<< * 'the whole file') * else: */ __pyx_k_tuple_58 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_57)); if (unlikely(!__pyx_k_tuple_58)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 805; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_58); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_58)); /* "pandas/parser.pyx":1010 * na_filter, na_hashset) * if user_dtype and na_count > 0: * raise Exception('Integer column has NA values') # <<<<<<<<<<<<<< * * if dtype[1:] != 'i8': */ __pyx_k_tuple_68 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_67)); if (unlikely(!__pyx_k_tuple_68)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1010; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_68); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_68)); /* "pandas/parser.pyx":1012 * raise Exception('Integer column has NA values') * * if dtype[1:] != 'i8': # <<<<<<<<<<<<<< * result = result.astype(dtype) * */ __pyx_k_slice_69 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_k_slice_69)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1012; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_slice_69); __Pyx_GIVEREF(__pyx_k_slice_69); /* "pandas/parser.pyx":1021 * na_filter, na_hashset, na_flist) * * if dtype[1:] != 'f8': # <<<<<<<<<<<<<< * result = result.astype(dtype) * return result, na_count */ __pyx_k_slice_70 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_k_slice_70)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1021; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_slice_70); __Pyx_GIVEREF(__pyx_k_slice_70); /* "pandas/parser.pyx":1044 * elif dtype[1] == 'S': * # TODO: na handling * width = int(dtype[2:]) # <<<<<<<<<<<<<< * if width > 0: * result = _to_fw_string(self.parser, i, start, end, width) */ __pyx_k_slice_72 = PySlice_New(__pyx_int_2, Py_None, Py_None); if (unlikely(!__pyx_k_slice_72)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1044; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_slice_72); __Pyx_GIVEREF(__pyx_k_slice_72); /* "pandas/parser.pyx":1053 * na_hashset) * elif dtype[1] == 'U': * width = int(dtype[2:]) # <<<<<<<<<<<<<< * if width > 0: * raise NotImplementedError("the dtype %s is not supported for parsing" % dtype) */ __pyx_k_slice_73 = PySlice_New(__pyx_int_2, Py_None, Py_None); if (unlikely(!__pyx_k_slice_73)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1053; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_slice_73); __Pyx_GIVEREF(__pyx_k_slice_73); /* "pandas/parser.pyx":1180 * cdef asbytes(object o): * if PY3: * return str(o).encode('utf-8') # <<<<<<<<<<<<<< * else: * return str(o) */ __pyx_k_tuple_75 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_32)); if (unlikely(!__pyx_k_tuple_75)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1180; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_75); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_75)); /* "pandas/parser.pyx":1189 * import io * if isinstance(obj, io.TextIOWrapper): * raise CParserError('Cannot handle open unicode files (yet)') # <<<<<<<<<<<<<< * * # BufferedReader is a byte reader for Python 3 */ __pyx_k_tuple_77 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_76)); if (unlikely(!__pyx_k_tuple_77)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1189; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_77); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_77)); /* "pandas/parser.pyx":1444 * data[0] = NEGINF * else: * return None, None # <<<<<<<<<<<<<< * if use_na_flist: * if data[0] in na_flist: */ __pyx_k_tuple_79 = PyTuple_Pack(2, Py_None, Py_None); if (unlikely(!__pyx_k_tuple_79)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1444; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_79); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_79)); /* "pandas/parser.pyx":1460 * data[0] = NEGINF * else: * return None, None # <<<<<<<<<<<<<< * data += 1 * */ __pyx_k_tuple_80 = PyTuple_Pack(2, Py_None, Py_None); if (unlikely(!__pyx_k_tuple_80)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1460; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_80); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_80)); /* "pandas/parser.pyx":1500 * raise OverflowError(word) * * return None, None # <<<<<<<<<<<<<< * else: * for i in range(lines): */ __pyx_k_tuple_81 = PyTuple_Pack(2, Py_None, Py_None); if (unlikely(!__pyx_k_tuple_81)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1500; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_81); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_81)); /* "pandas/parser.pyx":1509 * if error == ERROR_OVERFLOW: * raise OverflowError(word) * return None, None # <<<<<<<<<<<<<< * * return result, na_count */ __pyx_k_tuple_82 = PyTuple_Pack(2, Py_None, Py_None); if (unlikely(!__pyx_k_tuple_82)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1509; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_82); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_82)); /* "pandas/parser.pyx":1546 * error = to_boolean(word, data) * if error != 0: * return None, None # <<<<<<<<<<<<<< * data += 1 * else: */ __pyx_k_tuple_83 = PyTuple_Pack(2, Py_None, Py_None); if (unlikely(!__pyx_k_tuple_83)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1546; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_83); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_83)); /* "pandas/parser.pyx":1554 * error = to_boolean(word, data) * if error != 0: * return None, None # <<<<<<<<<<<<<< * data += 1 * */ __pyx_k_tuple_84 = PyTuple_Pack(2, Py_None, Py_None); if (unlikely(!__pyx_k_tuple_84)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1554; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_84); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_84)); /* "pandas/parser.pyx":1605 * error = to_boolean(word, data) * if error != 0: * return None, None # <<<<<<<<<<<<<< * data += 1 * else: */ __pyx_k_tuple_85 = PyTuple_Pack(2, Py_None, Py_None); if (unlikely(!__pyx_k_tuple_85)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1605; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_85); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_85)); /* "pandas/parser.pyx":1625 * error = to_boolean(word, data) * if error != 0: * return None, None # <<<<<<<<<<<<<< * data += 1 * */ __pyx_k_tuple_86 = PyTuple_Pack(2, Py_None, Py_None); if (unlikely(!__pyx_k_tuple_86)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1625; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_86); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_86)); /* "pandas/parser.pyx":1674 * # None creeps in sometimes, which isn't possible here * if not PyBytes_Check(val): * raise Exception('Must be all encoded bytes') # <<<<<<<<<<<<<< * * k = kh_put_str(table, PyBytes_AsString(val), &ret) */ __pyx_k_tuple_88 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_87)); if (unlikely(!__pyx_k_tuple_88)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1674; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_88); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_88)); /* "pandas/parser.pyx":1951 * if values is None: * return [] * return [x.encode('utf-8') if isinstance(x, unicode) else x for x in values] # <<<<<<<<<<<<<< */ __pyx_k_tuple_96 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_32)); if (unlikely(!__pyx_k_tuple_96)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1951; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_96); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_96)); /* "util.pxd":40 * i += sz * elif i >= sz or sz == 0: * raise IndexError('index out of bounds') # <<<<<<<<<<<<<< * * return get_value_1d(arr, i) */ __pyx_k_tuple_98 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_97)); if (unlikely(!__pyx_k_tuple_98)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 40; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_98); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_98)); /* "util.pxd":57 * i += sz * elif i >= sz: * raise IndexError('index out of bounds') # <<<<<<<<<<<<<< * * assign_value_1d(arr, i, value) */ __pyx_k_tuple_99 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_97)); if (unlikely(!__pyx_k_tuple_99)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 57; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_99); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_99)); /* "numpy.pxd":217 * 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_k_tuple_101 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_u_100)); if (unlikely(!__pyx_k_tuple_101)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 217; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_101); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_101)); /* "numpy.pxd":221 * 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_k_tuple_103 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_u_102)); if (unlikely(!__pyx_k_tuple_103)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 221; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_103); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_103)); /* "numpy.pxd":259 * if ((descr.byteorder == '>' and little_endian) or * (descr.byteorder == '<' 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_k_tuple_105 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_u_104)); if (unlikely(!__pyx_k_tuple_105)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 259; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_105); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_105)); /* "numpy.pxd":803 * * if (end - f) - (new_offset - offset[0]) < 15: * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") # <<<<<<<<<<<<<< * * if ((child.byteorder == '>' and little_endian) or */ __pyx_k_tuple_108 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_u_107)); if (unlikely(!__pyx_k_tuple_108)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 803; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_108); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_108)); /* "numpy.pxd":807 * if ((child.byteorder == '>' and little_endian) or * (child.byteorder == '<' 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_k_tuple_109 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_u_104)); if (unlikely(!__pyx_k_tuple_109)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 807; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_109); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_109)); /* "numpy.pxd":827 * 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_k_tuple_111 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_u_110)); if (unlikely(!__pyx_k_tuple_111)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 827; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_111); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_111)); /* "pandas/parser.pyx":1167 * * * def _ensure_encoded(list lst): # <<<<<<<<<<<<<< * cdef list result = [] * for x in lst: */ __pyx_k_tuple_122 = PyTuple_Pack(3, ((PyObject *)__pyx_n_s__lst), ((PyObject *)__pyx_n_s__result), ((PyObject *)__pyx_n_s__x)); if (unlikely(!__pyx_k_tuple_122)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1167; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_122); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_122)); __pyx_k_codeobj_123 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_122, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_124, __pyx_n_s___ensure_encoded, 1167, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_123)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1167; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/parser.pyx":1185 * * * def _is_file_like(obj): # <<<<<<<<<<<<<< * if PY3: * import io */ __pyx_k_tuple_125 = PyTuple_Pack(4, ((PyObject *)__pyx_n_s__obj), ((PyObject *)__pyx_n_s__io), ((PyObject *)__pyx_n_s__file), ((PyObject *)__pyx_n_s____builtin__)); if (unlikely(!__pyx_k_tuple_125)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1185; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_125); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_125)); __pyx_k_codeobj_126 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_125, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_124, __pyx_n_s___is_file_like, 1185, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_126)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1185; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/parser.pyx":1200 * * * def _maybe_upcast(arr): # <<<<<<<<<<<<<< * """ * */ __pyx_k_tuple_127 = PyTuple_Pack(3, ((PyObject *)__pyx_n_s__arr), ((PyObject *)__pyx_n_s__na_value), ((PyObject *)__pyx_n_s__mask)); if (unlikely(!__pyx_k_tuple_127)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1200; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_127); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_127)); __pyx_k_codeobj_128 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_127, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_124, __pyx_n_s___maybe_upcast, 1200, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_128)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1200; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/parser.pyx":1700 * * * def downcast_int64(ndarray[int64_t] arr, bint use_unsigned=0): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = len(arr) */ __pyx_k_tuple_133 = PyTuple_Pack(12, ((PyObject *)__pyx_n_s__arr), ((PyObject *)__pyx_n_s__use_unsigned), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__n), ((PyObject *)__pyx_n_s__mx), ((PyObject *)__pyx_n_s__mn), ((PyObject *)__pyx_n_s__NA), ((PyObject *)__pyx_n_s__val), ((PyObject *)__pyx_n_s__mask), ((PyObject *)__pyx_n_s__na_count), ((PyObject *)__pyx_n_s___mask), ((PyObject *)__pyx_n_s__result)); if (unlikely(!__pyx_k_tuple_133)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1700; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_133); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_133)); __pyx_k_codeobj_134 = (PyObject*)__Pyx_PyCode_New(2, 0, 12, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_133, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_124, __pyx_n_s__downcast_int64, 1700, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_134)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1700; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/parser.pyx":1770 * * * def _concatenate_chunks(list chunks): # <<<<<<<<<<<<<< * cdef: * list names = list(chunks[0].keys()) */ __pyx_k_tuple_135 = PyTuple_Pack(12, ((PyObject *)__pyx_n_s__chunks), ((PyObject *)__pyx_n_s__names), ((PyObject *)__pyx_n_s__name), ((PyObject *)__pyx_n_s__warning_columns), ((PyObject *)__pyx_n_s__warning_names), ((PyObject *)__pyx_n_s__common_type), ((PyObject *)__pyx_n_s__result), ((PyObject *)__pyx_n_s__arrs), ((PyObject *)__pyx_n_s__dtypes), ((PyObject *)__pyx_n_s__warning_message), ((PyObject *)__pyx_n_s__chunk), ((PyObject *)__pyx_n_s__a)); if (unlikely(!__pyx_k_tuple_135)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1770; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_135); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_135)); __pyx_k_codeobj_136 = (PyObject*)__Pyx_PyCode_New(1, 0, 12, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_135, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_124, __pyx_n_s___concatenate_chunks, 1770, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_136)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1770; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/parser.pyx":1801 * * # NA values * def _compute_na_values(): # <<<<<<<<<<<<<< * int64info = np.iinfo(np.int64) * int32info = np.iinfo(np.int32) */ __pyx_k_tuple_137 = PyTuple_Pack(9, ((PyObject *)__pyx_n_s__int64info), ((PyObject *)__pyx_n_s__int32info), ((PyObject *)__pyx_n_s__int16info), ((PyObject *)__pyx_n_s__int8info), ((PyObject *)__pyx_n_s__uint64info), ((PyObject *)__pyx_n_s__uint32info), ((PyObject *)__pyx_n_s__uint16info), ((PyObject *)__pyx_n_s__uint8info), ((PyObject *)__pyx_n_s__na_values)); if (unlikely(!__pyx_k_tuple_137)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1801; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_137); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_137)); __pyx_k_codeobj_138 = (PyObject*)__Pyx_PyCode_New(0, 0, 9, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_137, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_124, __pyx_n_s___compute_na_values, 1801, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_138)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1801; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/parser.pyx":1869 * * * def _to_structured_array(dict columns, object names): # <<<<<<<<<<<<<< * cdef: * ndarray recs, column */ __pyx_k_tuple_139 = PyTuple_Pack(16, ((PyObject *)__pyx_n_s__columns), ((PyObject *)__pyx_n_s__names), ((PyObject *)__pyx_n_s__recs), ((PyObject *)__pyx_n_s__column), ((PyObject *)__pyx_n_s__dt), ((PyObject *)__pyx_n_s__fields), ((PyObject *)__pyx_n_s__name), ((PyObject *)__pyx_n_s__fnames), ((PyObject *)__pyx_n_s__field_type), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__offset), ((PyObject *)__pyx_n_s__nfields), ((PyObject *)__pyx_n_s__length), ((PyObject *)__pyx_n_s__stride), ((PyObject *)__pyx_n_s__elsize), ((PyObject *)__pyx_n_s__buf)); if (unlikely(!__pyx_k_tuple_139)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1869; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_139); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_139)); __pyx_k_codeobj_140 = (PyObject*)__Pyx_PyCode_New(2, 0, 16, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_139, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_124, __pyx_n_s_54, 1869, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_140)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1869; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/parser.pyx":1948 * * * def _maybe_encode(values): # <<<<<<<<<<<<<< * if values is None: * return [] */ __pyx_k_tuple_141 = PyTuple_Pack(2, ((PyObject *)__pyx_n_s__values), ((PyObject *)__pyx_n_s__x)); if (unlikely(!__pyx_k_tuple_141)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1948; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_141); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_141)); __pyx_k_codeobj_142 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_141, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_124, __pyx_n_s___maybe_encode, 1948, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_142)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1948; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __pyx_int_0 = PyInt_FromLong(0); if (unlikely(!__pyx_int_0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __pyx_int_1 = PyInt_FromLong(1); if (unlikely(!__pyx_int_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __pyx_int_2 = PyInt_FromLong(2); if (unlikely(!__pyx_int_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __pyx_int_3 = PyInt_FromLong(3); if (unlikely(!__pyx_int_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __pyx_int_15 = PyInt_FromLong(15); if (unlikely(!__pyx_int_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __pyx_int_1000 = PyInt_FromLong(1000); if (unlikely(!__pyx_int_1000)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __pyx_int_262144 = PyInt_FromLong(262144); if (unlikely(!__pyx_int_262144)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; return 0; __pyx_L1_error:; return -1; } #if PY_MAJOR_VERSION < 3 PyMODINIT_FUNC initparser(void); /*proto*/ PyMODINIT_FUNC initparser(void) #else PyMODINIT_FUNC PyInit_parser(void); /*proto*/ PyMODINIT_FUNC PyInit_parser(void) #endif { PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_t_3; double __pyx_t_4; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; int __pyx_t_8; PyObject *__pyx_t_9 = NULL; Py_ssize_t __pyx_t_10; PyObject *__pyx_t_11 = NULL; PyObject *__pyx_t_12 = NULL; PyObject *__pyx_t_13 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannyDeclarations #if CYTHON_REFNANNY __Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny"); if (!__Pyx_RefNanny) { PyErr_Clear(); __Pyx_RefNanny = __Pyx_RefNannyImportAPI("Cython.Runtime.refnanny"); if (!__Pyx_RefNanny) Py_FatalError("failed to import 'refnanny' module"); } #endif __Pyx_RefNannySetupContext("PyMODINIT_FUNC PyInit_parser(void)", 0); if ( __Pyx_check_binary_version() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_empty_tuple)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_bytes)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #ifdef __Pyx_CyFunction_USED if (__Pyx_CyFunction_init() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif #ifdef __Pyx_FusedFunction_USED if (__pyx_FusedFunction_init() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif #ifdef __Pyx_Generator_USED if (__pyx_Generator_init() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif /*--- Library function declarations ---*/ /*--- Threads initialization code ---*/ #if defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS #ifdef WITH_THREAD /* Python build with threading support? */ PyEval_InitThreads(); #endif #endif /*--- Module creation code ---*/ #if PY_MAJOR_VERSION < 3 __pyx_m = Py_InitModule4(__Pyx_NAMESTR("parser"), __pyx_methods, 0, 0, PYTHON_API_VERSION); Py_XINCREF(__pyx_m); #else __pyx_m = PyModule_Create(&__pyx_moduledef); #endif if (unlikely(!__pyx_m)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_d)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} Py_INCREF(__pyx_d); #if PY_MAJOR_VERSION >= 3 { PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (!PyDict_GetItemString(modules, "pandas.parser")) { if (unlikely(PyDict_SetItemString(modules, "pandas.parser", __pyx_m) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } } #endif __pyx_b = PyImport_AddModule(__Pyx_NAMESTR(__Pyx_BUILTIN_MODULE_NAME)); if (unlikely(!__pyx_b)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #if CYTHON_COMPILING_IN_PYPY Py_INCREF(__pyx_b); #endif if (__Pyx_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; /*--- Initialize various global constants etc. ---*/ if (unlikely(__Pyx_InitGlobals() < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif if (__pyx_module_is_main_pandas__parser) { if (__Pyx_SetAttrString(__pyx_m, "__name__", __pyx_n_s____main__) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; } /*--- Builtin init code ---*/ if (unlikely(__Pyx_InitCachedBuiltins() < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /*--- Constants init code ---*/ if (unlikely(__Pyx_InitCachedConstants() < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /*--- Global init code ---*/ __pyx_v_6pandas_6parser__true_values = Py_None; Py_INCREF(Py_None); __pyx_v_6pandas_6parser__false_values = Py_None; Py_INCREF(Py_None); __pyx_v_6pandas_6parser_dtype_cast_order = ((PyObject*)Py_None); Py_INCREF(Py_None); /*--- Variable export code ---*/ /*--- Function export code ---*/ /*--- Type init code ---*/ __pyx_vtabptr_6pandas_6parser_TextReader = &__pyx_vtable_6pandas_6parser_TextReader; __pyx_vtable_6pandas_6parser_TextReader._make_skiprow_set = (PyObject *(*)(struct __pyx_obj_6pandas_6parser_TextReader *))__pyx_f_6pandas_6parser_10TextReader__make_skiprow_set; __pyx_vtable_6pandas_6parser_TextReader._setup_parser_source = (PyObject *(*)(struct __pyx_obj_6pandas_6parser_TextReader *, PyObject *))__pyx_f_6pandas_6parser_10TextReader__setup_parser_source; __pyx_vtable_6pandas_6parser_TextReader._get_header = (PyObject *(*)(struct __pyx_obj_6pandas_6parser_TextReader *))__pyx_f_6pandas_6parser_10TextReader__get_header; __pyx_vtable_6pandas_6parser_TextReader._implicit_index_count = (PyObject *(*)(struct __pyx_obj_6pandas_6parser_TextReader *))__pyx_f_6pandas_6parser_10TextReader__implicit_index_count; __pyx_vtable_6pandas_6parser_TextReader._read_low_memory = (PyObject *(*)(struct __pyx_obj_6pandas_6parser_TextReader *, PyObject *))__pyx_f_6pandas_6parser_10TextReader__read_low_memory; __pyx_vtable_6pandas_6parser_TextReader._tokenize_rows = (PyObject *(*)(struct __pyx_obj_6pandas_6parser_TextReader *, size_t))__pyx_f_6pandas_6parser_10TextReader__tokenize_rows; __pyx_vtable_6pandas_6parser_TextReader._read_rows = (PyObject *(*)(struct __pyx_obj_6pandas_6parser_TextReader *, PyObject *, int))__pyx_f_6pandas_6parser_10TextReader__read_rows; __pyx_vtable_6pandas_6parser_TextReader._start_clock = (PyObject *(*)(struct __pyx_obj_6pandas_6parser_TextReader *))__pyx_f_6pandas_6parser_10TextReader__start_clock; __pyx_vtable_6pandas_6parser_TextReader._end_clock = (PyObject *(*)(struct __pyx_obj_6pandas_6parser_TextReader *, PyObject *))__pyx_f_6pandas_6parser_10TextReader__end_clock; __pyx_vtable_6pandas_6parser_TextReader._convert_tokens = (PyObject *(*)(struct __pyx_obj_6pandas_6parser_TextReader *, Py_ssize_t, int, int, PyObject *, int, kh_str_t *, PyObject *))__pyx_f_6pandas_6parser_10TextReader__convert_tokens; __pyx_vtable_6pandas_6parser_TextReader._convert_with_dtype = (PyObject *(*)(struct __pyx_obj_6pandas_6parser_TextReader *, PyObject *, Py_ssize_t, int, int, int, int, kh_str_t *, PyObject *))__pyx_f_6pandas_6parser_10TextReader__convert_with_dtype; __pyx_vtable_6pandas_6parser_TextReader._string_convert = (PyObject *(*)(struct __pyx_obj_6pandas_6parser_TextReader *, Py_ssize_t, int, int, int, kh_str_t *))__pyx_f_6pandas_6parser_10TextReader__string_convert; __pyx_vtable_6pandas_6parser_TextReader._get_na_list = (PyObject *(*)(struct __pyx_obj_6pandas_6parser_TextReader *, PyObject *, PyObject *))__pyx_f_6pandas_6parser_10TextReader__get_na_list; __pyx_vtable_6pandas_6parser_TextReader._free_na_set = (PyObject *(*)(struct __pyx_obj_6pandas_6parser_TextReader *, kh_str_t *))__pyx_f_6pandas_6parser_10TextReader__free_na_set; __pyx_vtable_6pandas_6parser_TextReader._get_column_name = (PyObject *(*)(struct __pyx_obj_6pandas_6parser_TextReader *, Py_ssize_t, Py_ssize_t))__pyx_f_6pandas_6parser_10TextReader__get_column_name; if (PyType_Ready(&__pyx_type_6pandas_6parser_TextReader) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 230; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__Pyx_SetVtable(__pyx_type_6pandas_6parser_TextReader.tp_dict, __pyx_vtabptr_6pandas_6parser_TextReader) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 230; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__Pyx_SetAttrString(__pyx_m, "TextReader", (PyObject *)&__pyx_type_6pandas_6parser_TextReader) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 230; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_6pandas_6parser_TextReader = &__pyx_type_6pandas_6parser_TextReader; /*--- Type import code ---*/ __pyx_ptype_7cpython_4type_type = __Pyx_ImportType(__Pyx_BUILTIN_MODULE_NAME, "type", #if CYTHON_COMPILING_IN_PYPY sizeof(PyTypeObject), #else sizeof(PyHeapTypeObject), #endif 0); if (unlikely(!__pyx_ptype_7cpython_4type_type)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 9; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_7cpython_4bool_bool = __Pyx_ImportType(__Pyx_BUILTIN_MODULE_NAME, "bool", sizeof(PyBoolObject), 0); if (unlikely(!__pyx_ptype_7cpython_4bool_bool)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 8; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_7cpython_7complex_complex = __Pyx_ImportType(__Pyx_BUILTIN_MODULE_NAME, "complex", sizeof(PyComplexObject), 0); if (unlikely(!__pyx_ptype_7cpython_7complex_complex)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 15; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_5numpy_dtype = __Pyx_ImportType("numpy", "dtype", sizeof(PyArray_Descr), 0); if (unlikely(!__pyx_ptype_5numpy_dtype)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_5numpy_flatiter = __Pyx_ImportType("numpy", "flatiter", sizeof(PyArrayIterObject), 0); if (unlikely(!__pyx_ptype_5numpy_flatiter)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 167; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_5numpy_broadcast = __Pyx_ImportType("numpy", "broadcast", sizeof(PyArrayMultiIterObject), 0); if (unlikely(!__pyx_ptype_5numpy_broadcast)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 171; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_5numpy_ndarray = __Pyx_ImportType("numpy", "ndarray", sizeof(PyArrayObject), 0); if (unlikely(!__pyx_ptype_5numpy_ndarray)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_5numpy_ufunc = __Pyx_ImportType("numpy", "ufunc", sizeof(PyUFuncObject), 0); if (unlikely(!__pyx_ptype_5numpy_ufunc)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 865; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /*--- Variable import code ---*/ /*--- Function import code ---*/ /*--- Execution code ---*/ /* "pandas/parser.pyx":8 * from libc.string cimport strncpy, strlen, strcmp, strcasecmp * cimport libc.stdio as stdio * import warnings # <<<<<<<<<<<<<< * * from cpython cimport (PyObject, PyBytes_FromString, */ __pyx_t_1 = __Pyx_Import(((PyObject *)__pyx_n_s__warnings), 0, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 8; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s__warnings, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 8; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pandas/parser.pyx":13 * PyBytes_AsString, PyBytes_Check, * PyUnicode_Check, PyUnicode_AsUTF8String) * from io.common import DtypeWarning # <<<<<<<<<<<<<< * * */ __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 13; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)__pyx_n_s__DtypeWarning)); PyList_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_n_s__DtypeWarning)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__DtypeWarning)); __pyx_t_2 = __Pyx_Import(((PyObject *)__pyx_n_s_112), ((PyObject *)__pyx_t_1), -1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 13; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s__DtypeWarning); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 13; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s__DtypeWarning, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 13; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/parser.pyx":29 * from numpy cimport ndarray, uint8_t, uint64_t * * import numpy as np # <<<<<<<<<<<<<< * cimport util * */ __pyx_t_2 = __Pyx_Import(((PyObject *)__pyx_n_s__numpy), 0, -1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 29; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s__np, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 29; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/parser.pyx":32 * cimport util * * import pandas.lib as lib # <<<<<<<<<<<<<< * * import time */ __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 32; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(((PyObject *)__pyx_n_s_114)); PyList_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_n_s_114)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s_114)); __pyx_t_1 = __Pyx_Import(((PyObject *)__pyx_n_s_113), ((PyObject *)__pyx_t_2), -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 32; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; if (PyDict_SetItem(__pyx_d, __pyx_n_s__lib, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 32; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pandas/parser.pyx":34 * import pandas.lib as lib * * import time # <<<<<<<<<<<<<< * import os * */ __pyx_t_1 = __Pyx_Import(((PyObject *)__pyx_n_s__time), 0, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 34; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s__time, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 34; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pandas/parser.pyx":35 * * import time * import os # <<<<<<<<<<<<<< * * cnp.import_array() */ __pyx_t_1 = __Pyx_Import(((PyObject *)__pyx_n_s__os), 0, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s__os, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pandas/parser.pyx":37 * import os * * cnp.import_array() # <<<<<<<<<<<<<< * * from khash cimport * */ import_array(); /* "pandas/parser.pyx":41 * from khash cimport * * * import sys # <<<<<<<<<<<<<< * * cdef bint PY3 = (sys.version_info[0] >= 3) */ __pyx_t_1 = __Pyx_Import(((PyObject *)__pyx_n_s__sys), 0, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 41; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s__sys, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 41; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pandas/parser.pyx":43 * import sys * * cdef bint PY3 = (sys.version_info[0] >= 3) # <<<<<<<<<<<<<< * * cdef double INF = np.inf */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__sys); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 43; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s__version_info); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 43; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_2, 0, sizeof(long), PyInt_FromLong, 0, 0, 1); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 43; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_RichCompare(__pyx_t_1, __pyx_int_3, Py_GE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 43; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 43; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_6pandas_6parser_PY3 = __pyx_t_3; /* "pandas/parser.pyx":45 * cdef bint PY3 = (sys.version_info[0] >= 3) * * cdef double INF = np.inf # <<<<<<<<<<<<<< * cdef double NEGINF = -INF * */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 45; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__inf); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 45; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_4 = __pyx_PyFloat_AsDouble(__pyx_t_1); if (unlikely((__pyx_t_4 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 45; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_6pandas_6parser_INF = ((double)__pyx_t_4); /* "pandas/parser.pyx":46 * * cdef double INF = np.inf * cdef double NEGINF = -INF # <<<<<<<<<<<<<< * * cdef extern from "headers/stdint.h": */ __pyx_v_6pandas_6parser_NEGINF = (-__pyx_v_6pandas_6parser_INF); /* "pandas/parser.pyx":65 * pass * * try: # <<<<<<<<<<<<<< * basestring * except NameError: */ { __Pyx_ExceptionSave(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7); __Pyx_XGOTREF(__pyx_t_5); __Pyx_XGOTREF(__pyx_t_6); __Pyx_XGOTREF(__pyx_t_7); /*try:*/ { /* "pandas/parser.pyx":66 * * try: * basestring # <<<<<<<<<<<<<< * except NameError: * basestring = str */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__basestring); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 66; __pyx_clineno = __LINE__; goto __pyx_L2_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; goto __pyx_L9_try_end; __pyx_L2_error:; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pandas/parser.pyx":67 * try: * basestring * except NameError: # <<<<<<<<<<<<<< * basestring = str * */ __pyx_t_8 = PyErr_ExceptionMatches(__pyx_builtin_NameError); if (__pyx_t_8) { __Pyx_AddTraceback("pandas.parser", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_2, &__pyx_t_9) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 67; __pyx_clineno = __LINE__; goto __pyx_L4_except_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_GOTREF(__pyx_t_2); __Pyx_GOTREF(__pyx_t_9); /* "pandas/parser.pyx":68 * basestring * except NameError: * basestring = str # <<<<<<<<<<<<<< * * cdef extern from "parser/tokenizer.h": */ if (PyDict_SetItem(__pyx_d, __pyx_n_s__basestring, ((PyObject *)((PyObject*)(&PyString_Type)))) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 68; __pyx_clineno = __LINE__; goto __pyx_L4_except_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; goto __pyx_L3_exception_handled; } __pyx_L4_except_error:; __Pyx_XGIVEREF(__pyx_t_5); __Pyx_XGIVEREF(__pyx_t_6); __Pyx_XGIVEREF(__pyx_t_7); __Pyx_ExceptionReset(__pyx_t_5, __pyx_t_6, __pyx_t_7); goto __pyx_L1_error; __pyx_L3_exception_handled:; __Pyx_XGIVEREF(__pyx_t_5); __Pyx_XGIVEREF(__pyx_t_6); __Pyx_XGIVEREF(__pyx_t_7); __Pyx_ExceptionReset(__pyx_t_5, __pyx_t_6, __pyx_t_7); __pyx_L9_try_end:; } /* "pandas/parser.pyx":220 * * * DEFAULT_CHUNKSIZE = 256 * 1024 # <<<<<<<<<<<<<< * * # common NA values */ if (PyDict_SetItem(__pyx_d, __pyx_n_s__DEFAULT_CHUNKSIZE, __pyx_int_262144) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 220; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/parser.pyx":225 * # no longer excluding inf representations * # '1.#INF','-1.#INF', '1.#INF000000', * _NA_VALUES = [b'-1.#IND', b'1.#QNAN', b'1.#IND', b'-1.#QNAN', # <<<<<<<<<<<<<< * b'#N/A N/A', b'NA', b'#NA', b'NULL', b'NaN', * b'nan', b''] */ __pyx_t_9 = PyList_New(11); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 225; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_INCREF(((PyObject *)__pyx_kp_b_115)); PyList_SET_ITEM(__pyx_t_9, 0, ((PyObject *)__pyx_kp_b_115)); __Pyx_GIVEREF(((PyObject *)__pyx_kp_b_115)); __Pyx_INCREF(((PyObject *)__pyx_kp_b_116)); PyList_SET_ITEM(__pyx_t_9, 1, ((PyObject *)__pyx_kp_b_116)); __Pyx_GIVEREF(((PyObject *)__pyx_kp_b_116)); __Pyx_INCREF(((PyObject *)__pyx_kp_b_117)); PyList_SET_ITEM(__pyx_t_9, 2, ((PyObject *)__pyx_kp_b_117)); __Pyx_GIVEREF(((PyObject *)__pyx_kp_b_117)); __Pyx_INCREF(((PyObject *)__pyx_kp_b_118)); PyList_SET_ITEM(__pyx_t_9, 3, ((PyObject *)__pyx_kp_b_118)); __Pyx_GIVEREF(((PyObject *)__pyx_kp_b_118)); __Pyx_INCREF(((PyObject *)__pyx_kp_b_119)); PyList_SET_ITEM(__pyx_t_9, 4, ((PyObject *)__pyx_kp_b_119)); __Pyx_GIVEREF(((PyObject *)__pyx_kp_b_119)); __Pyx_INCREF(((PyObject *)__pyx_n_b__NA)); PyList_SET_ITEM(__pyx_t_9, 5, ((PyObject *)__pyx_n_b__NA)); __Pyx_GIVEREF(((PyObject *)__pyx_n_b__NA)); __Pyx_INCREF(((PyObject *)__pyx_kp_b_120)); PyList_SET_ITEM(__pyx_t_9, 6, ((PyObject *)__pyx_kp_b_120)); __Pyx_GIVEREF(((PyObject *)__pyx_kp_b_120)); __Pyx_INCREF(((PyObject *)__pyx_n_b__NULL)); PyList_SET_ITEM(__pyx_t_9, 7, ((PyObject *)__pyx_n_b__NULL)); __Pyx_GIVEREF(((PyObject *)__pyx_n_b__NULL)); __Pyx_INCREF(((PyObject *)__pyx_n_b__NaN)); PyList_SET_ITEM(__pyx_t_9, 8, ((PyObject *)__pyx_n_b__NaN)); __Pyx_GIVEREF(((PyObject *)__pyx_n_b__NaN)); __Pyx_INCREF(((PyObject *)__pyx_n_b__nan)); PyList_SET_ITEM(__pyx_t_9, 9, ((PyObject *)__pyx_n_b__nan)); __Pyx_GIVEREF(((PyObject *)__pyx_n_b__nan)); __Pyx_INCREF(((PyObject *)__pyx_kp_b_48)); PyList_SET_ITEM(__pyx_t_9, 10, ((PyObject *)__pyx_kp_b_48)); __Pyx_GIVEREF(((PyObject *)__pyx_kp_b_48)); if (PyDict_SetItem(__pyx_d, __pyx_n_s___NA_VALUES, ((PyObject *)__pyx_t_9)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 225; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(((PyObject *)__pyx_t_9)); __pyx_t_9 = 0; /* "pandas/parser.pyx":273 * names=None, * * memory_map=False, # <<<<<<<<<<<<<< * tokenize_chunksize=DEFAULT_CHUNKSIZE, * delim_whitespace=False, */ __pyx_t_9 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 273; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_k_2 = __pyx_t_9; __Pyx_GIVEREF(__pyx_t_9); __pyx_t_9 = 0; /* "pandas/parser.pyx":274 * * memory_map=False, * tokenize_chunksize=DEFAULT_CHUNKSIZE, # <<<<<<<<<<<<<< * delim_whitespace=False, * */ __pyx_t_9 = __Pyx_GetModuleGlobalName(__pyx_n_s__DEFAULT_CHUNKSIZE); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 274; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_k_3 = __pyx_t_9; __Pyx_GIVEREF(__pyx_t_9); __pyx_t_9 = 0; /* "pandas/parser.pyx":275 * memory_map=False, * tokenize_chunksize=DEFAULT_CHUNKSIZE, * delim_whitespace=False, # <<<<<<<<<<<<<< * * compression=None, */ __pyx_t_9 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 275; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_k_4 = __pyx_t_9; __Pyx_GIVEREF(__pyx_t_9); __pyx_t_9 = 0; /* "pandas/parser.pyx":281 * converters=None, * * as_recarray=False, # <<<<<<<<<<<<<< * * skipinitialspace=False, */ __pyx_t_9 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 281; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_k_5 = __pyx_t_9; __Pyx_GIVEREF(__pyx_t_9); __pyx_t_9 = 0; /* "pandas/parser.pyx":283 * as_recarray=False, * * skipinitialspace=False, # <<<<<<<<<<<<<< * escapechar=None, * doublequote=True, */ __pyx_t_9 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 283; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_k_6 = __pyx_t_9; __Pyx_GIVEREF(__pyx_t_9); __pyx_t_9 = 0; /* "pandas/parser.pyx":285 * skipinitialspace=False, * escapechar=None, * doublequote=True, # <<<<<<<<<<<<<< * quotechar=b'"', * quoting=0, */ __pyx_t_9 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 285; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_k_7 = __pyx_t_9; __Pyx_GIVEREF(__pyx_t_9); __pyx_t_9 = 0; /* "pandas/parser.pyx":298 * dtype=None, * usecols=None, * error_bad_lines=True, # <<<<<<<<<<<<<< * warn_bad_lines=True, * */ __pyx_t_9 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 298; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_k_10 = __pyx_t_9; __Pyx_GIVEREF(__pyx_t_9); __pyx_t_9 = 0; /* "pandas/parser.pyx":299 * usecols=None, * error_bad_lines=True, * warn_bad_lines=True, # <<<<<<<<<<<<<< * * na_filter=True, */ __pyx_t_9 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 299; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_k_11 = __pyx_t_9; __Pyx_GIVEREF(__pyx_t_9); __pyx_t_9 = 0; /* "pandas/parser.pyx":301 * warn_bad_lines=True, * * na_filter=True, # <<<<<<<<<<<<<< * na_values=None, * na_fvalues=None, */ __pyx_t_9 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 301; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_k_12 = __pyx_t_9; __Pyx_GIVEREF(__pyx_t_9); __pyx_t_9 = 0; /* "pandas/parser.pyx":307 * false_values=None, * * compact_ints=False, # <<<<<<<<<<<<<< * allow_leading_cols=True, * use_unsigned=False, */ __pyx_t_9 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 307; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_k_13 = __pyx_t_9; __Pyx_GIVEREF(__pyx_t_9); __pyx_t_9 = 0; /* "pandas/parser.pyx":308 * * compact_ints=False, * allow_leading_cols=True, # <<<<<<<<<<<<<< * use_unsigned=False, * low_memory=False, */ __pyx_t_9 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 308; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_k_14 = __pyx_t_9; __Pyx_GIVEREF(__pyx_t_9); __pyx_t_9 = 0; /* "pandas/parser.pyx":309 * compact_ints=False, * allow_leading_cols=True, * use_unsigned=False, # <<<<<<<<<<<<<< * low_memory=False, * buffer_lines=None, */ __pyx_t_9 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 309; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_k_15 = __pyx_t_9; __Pyx_GIVEREF(__pyx_t_9); __pyx_t_9 = 0; /* "pandas/parser.pyx":310 * allow_leading_cols=True, * use_unsigned=False, * low_memory=False, # <<<<<<<<<<<<<< * buffer_lines=None, * skiprows=None, */ __pyx_t_9 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 310; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_k_16 = __pyx_t_9; __Pyx_GIVEREF(__pyx_t_9); __pyx_t_9 = 0; /* "pandas/parser.pyx":314 * skiprows=None, * skip_footer=0, * verbose=False, # <<<<<<<<<<<<<< * mangle_dupe_cols=True, * tupleize_cols=False): */ __pyx_t_9 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 314; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_k_17 = __pyx_t_9; __Pyx_GIVEREF(__pyx_t_9); __pyx_t_9 = 0; /* "pandas/parser.pyx":315 * skip_footer=0, * verbose=False, * mangle_dupe_cols=True, # <<<<<<<<<<<<<< * tupleize_cols=False): * */ __pyx_t_9 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 315; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_k_18 = __pyx_t_9; __Pyx_GIVEREF(__pyx_t_9); __pyx_t_9 = 0; /* "pandas/parser.pyx":316 * verbose=False, * mangle_dupe_cols=True, * tupleize_cols=False): # <<<<<<<<<<<<<< * * self.parser = parser_new() */ __pyx_t_9 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 316; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_k_19 = __pyx_t_9; __Pyx_GIVEREF(__pyx_t_9); __pyx_t_9 = 0; /* "pandas/parser.pyx":859 * self.noconvert.remove(i) * * def _convert_column_data(self, rows=None, upcast_na=False, footer=0): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, nused */ __pyx_t_9 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 859; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_k_63 = __pyx_t_9; __Pyx_GIVEREF(__pyx_t_9); __pyx_t_9 = 0; /* "pandas/parser.pyx":1156 * return None * * class CParserError(Exception): # <<<<<<<<<<<<<< * pass * */ __pyx_t_9 = PyDict_New(); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1156; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_9)); __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1156; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_builtin_Exception); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_builtin_Exception); __Pyx_GIVEREF(__pyx_builtin_Exception); __pyx_t_1 = __Pyx_CreateClass(((PyObject *)__pyx_t_2), ((PyObject *)__pyx_t_9), __pyx_n_s__CParserError, __pyx_n_s__CParserError, __pyx_n_s_121); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1156; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; if (PyDict_SetItem(__pyx_d, __pyx_n_s__CParserError, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1156; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_9)); __pyx_t_9 = 0; /* "pandas/parser.pyx":1160 * * * class OverflowError(ValueError): # <<<<<<<<<<<<<< * pass * */ __pyx_t_9 = PyDict_New(); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1160; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_9)); __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1160; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_builtin_ValueError); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_builtin_ValueError); __Pyx_GIVEREF(__pyx_builtin_ValueError); __pyx_t_2 = __Pyx_CreateClass(((PyObject *)__pyx_t_1), ((PyObject *)__pyx_t_9), __pyx_n_s__OverflowError, __pyx_n_s__OverflowError, __pyx_n_s_121); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1160; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; if (PyDict_SetItem(__pyx_d, __pyx_n_s__OverflowError, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1160; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_9)); __pyx_t_9 = 0; /* "pandas/parser.pyx":1163 * pass * * cdef object _true_values = [b'True', b'TRUE', b'true'] # <<<<<<<<<<<<<< * cdef object _false_values = [b'False', b'FALSE', b'false'] * */ __pyx_t_9 = PyList_New(3); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1163; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_INCREF(((PyObject *)__pyx_n_b__True)); PyList_SET_ITEM(__pyx_t_9, 0, ((PyObject *)__pyx_n_b__True)); __Pyx_GIVEREF(((PyObject *)__pyx_n_b__True)); __Pyx_INCREF(((PyObject *)__pyx_n_b__TRUE)); PyList_SET_ITEM(__pyx_t_9, 1, ((PyObject *)__pyx_n_b__TRUE)); __Pyx_GIVEREF(((PyObject *)__pyx_n_b__TRUE)); __Pyx_INCREF(((PyObject *)__pyx_n_b__true)); PyList_SET_ITEM(__pyx_t_9, 2, ((PyObject *)__pyx_n_b__true)); __Pyx_GIVEREF(((PyObject *)__pyx_n_b__true)); __Pyx_XGOTREF(__pyx_v_6pandas_6parser__true_values); __Pyx_DECREF_SET(__pyx_v_6pandas_6parser__true_values, ((PyObject *)__pyx_t_9)); __Pyx_GIVEREF(((PyObject *)__pyx_t_9)); __pyx_t_9 = 0; /* "pandas/parser.pyx":1164 * * cdef object _true_values = [b'True', b'TRUE', b'true'] * cdef object _false_values = [b'False', b'FALSE', b'false'] # <<<<<<<<<<<<<< * * */ __pyx_t_9 = PyList_New(3); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1164; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_INCREF(((PyObject *)__pyx_n_b__False)); PyList_SET_ITEM(__pyx_t_9, 0, ((PyObject *)__pyx_n_b__False)); __Pyx_GIVEREF(((PyObject *)__pyx_n_b__False)); __Pyx_INCREF(((PyObject *)__pyx_n_b__FALSE)); PyList_SET_ITEM(__pyx_t_9, 1, ((PyObject *)__pyx_n_b__FALSE)); __Pyx_GIVEREF(((PyObject *)__pyx_n_b__FALSE)); __Pyx_INCREF(((PyObject *)__pyx_n_b__false)); PyList_SET_ITEM(__pyx_t_9, 2, ((PyObject *)__pyx_n_b__false)); __Pyx_GIVEREF(((PyObject *)__pyx_n_b__false)); __Pyx_XGOTREF(__pyx_v_6pandas_6parser__false_values); __Pyx_DECREF_SET(__pyx_v_6pandas_6parser__false_values, ((PyObject *)__pyx_t_9)); __Pyx_GIVEREF(((PyObject *)__pyx_t_9)); __pyx_t_9 = 0; /* "pandas/parser.pyx":1167 * * * def _ensure_encoded(list lst): # <<<<<<<<<<<<<< * cdef list result = [] * for x in lst: */ __pyx_t_9 = PyCFunction_NewEx(&__pyx_mdef_6pandas_6parser_1_ensure_encoded, NULL, __pyx_n_s_121); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1167; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); if (PyDict_SetItem(__pyx_d, __pyx_n_s___ensure_encoded, __pyx_t_9) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1167; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; /* "pandas/parser.pyx":1185 * * * def _is_file_like(obj): # <<<<<<<<<<<<<< * if PY3: * import io */ __pyx_t_9 = PyCFunction_NewEx(&__pyx_mdef_6pandas_6parser_3_is_file_like, NULL, __pyx_n_s_121); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1185; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); if (PyDict_SetItem(__pyx_d, __pyx_n_s___is_file_like, __pyx_t_9) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1185; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; /* "pandas/parser.pyx":1200 * * * def _maybe_upcast(arr): # <<<<<<<<<<<<<< * """ * */ __pyx_t_9 = PyCFunction_NewEx(&__pyx_mdef_6pandas_6parser_5_maybe_upcast, NULL, __pyx_n_s_121); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1200; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); if (PyDict_SetItem(__pyx_d, __pyx_n_s___maybe_upcast, __pyx_t_9) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1200; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; /* "pandas/parser.pyx":1406 * return result * * cdef char* cinf = b'inf' # <<<<<<<<<<<<<< * cdef char* cneginf = b'-inf' * */ __pyx_v_6pandas_6parser_cinf = __pyx_k__inf; /* "pandas/parser.pyx":1407 * * cdef char* cinf = b'inf' * cdef char* cneginf = b'-inf' # <<<<<<<<<<<<<< * * cdef _try_double(parser_t *parser, int col, int line_start, int line_end, */ __pyx_v_6pandas_6parser_cneginf = __pyx_k_129; /* "pandas/parser.pyx":1684 * * # TODO: endianness just a placeholder? * cdef list dtype_cast_order = ['= PyList_GET_SIZE(__pyx_t_9)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_2 = PyList_GET_ITEM(__pyx_t_9, __pyx_t_10); __Pyx_INCREF(__pyx_t_2); __pyx_t_10++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1827; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_2 = PySequence_ITEM(__pyx_t_9, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1827; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif if (PyDict_SetItem(__pyx_d, __pyx_n_s__k, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1827; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/parser.pyx":1828 * * for k in list(na_values): * na_values[np.dtype(k)] = na_values[k] # <<<<<<<<<<<<<< * * */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__na_values); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1828; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__k); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1828; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_11 = PyObject_GetItem(__pyx_t_2, __pyx_t_1); if (!__pyx_t_11) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1828; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__na_values); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1828; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1828; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__dtype); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1828; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__k); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1828; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_13 = PyTuple_New(1); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1828; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_Call(__pyx_t_12, ((PyObject *)__pyx_t_13), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1828; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_13)); __pyx_t_13 = 0; if (PyObject_SetItem(__pyx_t_1, __pyx_t_2, __pyx_t_11) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1828; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; } __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; /* "pandas/parser.pyx":1869 * * * def _to_structured_array(dict columns, object names): # <<<<<<<<<<<<<< * cdef: * ndarray recs, column */ __pyx_t_9 = PyCFunction_NewEx(&__pyx_mdef_6pandas_6parser_13_to_structured_array, NULL, __pyx_n_s_121); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1869; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); if (PyDict_SetItem(__pyx_d, __pyx_n_s_54, __pyx_t_9) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1869; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; /* "pandas/parser.pyx":1948 * * * def _maybe_encode(values): # <<<<<<<<<<<<<< * if values is None: * return [] */ __pyx_t_9 = PyCFunction_NewEx(&__pyx_mdef_6pandas_6parser_15_maybe_encode, NULL, __pyx_n_s_121); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1948; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); if (PyDict_SetItem(__pyx_d, __pyx_n_s___maybe_encode, __pyx_t_9) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1948; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; /* "pandas/parser.pyx":1 * # Copyright (c) 2012, Lambda Foundry, Inc. # <<<<<<<<<<<<<< * # See LICENSE for the license * */ __pyx_t_9 = PyDict_New(); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_9)); if (PyDict_SetItem(__pyx_d, __pyx_n_s____test__, ((PyObject *)__pyx_t_9)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(((PyObject *)__pyx_t_9)); __pyx_t_9 = 0; /* "numpy.pxd":979 * arr.base = baseptr * * cdef inline object get_array_base(ndarray arr): # <<<<<<<<<<<<<< * if arr.base is NULL: * return None */ goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_9); __Pyx_XDECREF(__pyx_t_11); __Pyx_XDECREF(__pyx_t_12); __Pyx_XDECREF(__pyx_t_13); if (__pyx_m) { __Pyx_AddTraceback("init pandas.parser", __pyx_clineno, __pyx_lineno, __pyx_filename); Py_DECREF(__pyx_m); __pyx_m = 0; } else if (!PyErr_Occurred()) { PyErr_SetString(PyExc_ImportError, "init pandas.parser"); } __pyx_L0:; __Pyx_RefNannyFinishContext(); #if PY_MAJOR_VERSION < 3 return; #else return __pyx_m; #endif } /* Runtime support code */ #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 /* CYTHON_REFNANNY */ 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 '%s' is not defined", PyString_AS_STRING(name)); #endif } return result; } 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 } 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, "%s() keywords must be strings", function_name); goto bad; invalid_keyword: PyErr_Format(PyExc_TypeError, #if PY_MAJOR_VERSION < 3 "%s() got an unexpected keyword argument '%s'", function_name, PyString_AsString(key)); #else "%s() got an unexpected keyword argument '%U'", function_name, key); #endif bad: return -1; } 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, "%s() takes %s %" CYTHON_FORMAT_SSIZE_T "d positional argument%s (%" CYTHON_FORMAT_SSIZE_T "d given)", func_name, more_or_less, num_expected, (num_expected == 1) ? "" : "s", num_found); } static CYTHON_INLINE void __Pyx_ErrRestore(PyObject *type, PyObject *value, PyObject *tb) { #if CYTHON_COMPILING_IN_CPYTHON PyObject *tmp_type, *tmp_value, *tmp_tb; PyThreadState *tstate = PyThreadState_GET(); 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); #else PyErr_Restore(type, value, tb); #endif } static CYTHON_INLINE void __Pyx_ErrFetch(PyObject **type, PyObject **value, PyObject **tb) { #if CYTHON_COMPILING_IN_CPYTHON PyThreadState *tstate = PyThreadState_GET(); *type = tstate->curexc_type; *value = tstate->curexc_value; *tb = tstate->curexc_traceback; tstate->curexc_type = 0; tstate->curexc_value = 0; tstate->curexc_traceback = 0; #else PyErr_Fetch(type, value, tb); #endif } #if PY_MAJOR_VERSION < 3 static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, CYTHON_UNUSED PyObject *cause) { 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 PY_VERSION_HEX < 0x02050000 if (PyClass_Check(type)) { #else if (PyType_Check(type)) { #endif #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; #if PY_VERSION_HEX < 0x02050000 if (PyInstance_Check(type)) { type = (PyObject*) ((PyInstanceObject*)type)->in_class; Py_INCREF(type); } else { type = 0; PyErr_SetString(PyExc_TypeError, "raise: exception must be an old-style class or instance"); goto raise_error; } #else 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; } #endif } __Pyx_ErrRestore(type, value, tb); return; raise_error: Py_XDECREF(value); Py_XDECREF(type); Py_XDECREF(tb); return; } #else /* Python 3+ */ 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 *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 = PyEval_CallObject(type, args); Py_DECREF(args); if (!owned_instance) goto bad; value = owned_instance; if (!PyExceptionInstance_Check(value)) { PyErr_Format(PyExc_TypeError, "calling %R should have returned an instance of " "BaseException, not %R", type, Py_TYPE(value)); goto bad; } } else { PyErr_SetString(PyExc_TypeError, "raise: exception class must be a subclass of BaseException"); goto bad; } #if PY_VERSION_HEX >= 0x03030000 if (cause) { #else if (cause && cause != Py_None) { #endif PyObject *fixed_cause; if (cause == Py_None) { fixed_cause = NULL; } else if (PyExceptionClass_Check(cause)) { fixed_cause = PyObject_CallObject(cause, NULL); if (fixed_cause == NULL) goto bad; } else if (PyExceptionInstance_Check(cause)) { fixed_cause = cause; Py_INCREF(fixed_cause); } else { PyErr_SetString(PyExc_TypeError, "exception causes must derive from " "BaseException"); goto bad; } PyException_SetCause(value, fixed_cause); } PyErr_SetObject(type, value); if (tb) { PyThreadState *tstate = PyThreadState_GET(); PyObject* tmp_tb = tstate->curexc_traceback; if (tb != tmp_tb) { Py_INCREF(tb); tstate->curexc_traceback = tb; Py_XDECREF(tmp_tb); } } bad: Py_XDECREF(owned_instance); return; } #endif static CYTHON_INLINE PyObject *__Pyx_GetModuleGlobalName(PyObject *name) { PyObject *result; #if CYTHON_COMPILING_IN_CPYTHON result = PyDict_GetItem(__pyx_d, name); if (result) { Py_INCREF(result); } else { #else result = PyObject_GetItem(__pyx_d, name); if (!result) { PyErr_Clear(); #endif result = __Pyx_GetBuiltinName(name); } return result; } static CYTHON_INLINE PyObject* __Pyx_PyObject_Append(PyObject* L, PyObject* x) { if (likely(PyList_CheckExact(L))) { if (unlikely(__Pyx_PyList_Append(L, x) < 0)) return NULL; Py_INCREF(Py_None); return Py_None; /* this is just to have an accurate signature */ } else { return __Pyx_PyObject_CallMethod1(L, __pyx_n_s__append, x); } } static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j) { PyObject *r; if (!j) return NULL; r = PyObject_GetItem(o, j); Py_DECREF(j); return r; } static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i, int wraparound, int boundscheck) { #if CYTHON_COMPILING_IN_CPYTHON if (wraparound & unlikely(i < 0)) i += PyList_GET_SIZE(o); if ((!boundscheck) || likely((0 <= i) & (i < PyList_GET_SIZE(o)))) { PyObject *r = PyList_GET_ITEM(o, i); Py_INCREF(r); return r; } return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i)); #else return PySequence_GetItem(o, i); #endif } static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i, int wraparound, int boundscheck) { #if CYTHON_COMPILING_IN_CPYTHON if (wraparound & unlikely(i < 0)) i += PyTuple_GET_SIZE(o); if ((!boundscheck) || likely((0 <= i) & (i < PyTuple_GET_SIZE(o)))) { PyObject *r = PyTuple_GET_ITEM(o, i); Py_INCREF(r); return r; } return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i)); #else return PySequence_GetItem(o, i); #endif } static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, int is_list, int wraparound, int boundscheck) { #if CYTHON_COMPILING_IN_CPYTHON if (is_list || PyList_CheckExact(o)) { Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyList_GET_SIZE(o); if ((!boundscheck) || (likely((n >= 0) & (n < PyList_GET_SIZE(o))))) { PyObject *r = PyList_GET_ITEM(o, n); Py_INCREF(r); return r; } } else if (PyTuple_CheckExact(o)) { Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyTuple_GET_SIZE(o); if ((!boundscheck) || likely((n >= 0) & (n < PyTuple_GET_SIZE(o)))) { PyObject *r = PyTuple_GET_ITEM(o, n); Py_INCREF(r); return r; } } else { PySequenceMethods *m = Py_TYPE(o)->tp_as_sequence; if (likely(m && m->sq_item)) { if (wraparound && unlikely(i < 0) && likely(m->sq_length)) { Py_ssize_t l = m->sq_length(o); if (likely(l >= 0)) { i += l; } else { if (PyErr_ExceptionMatches(PyExc_OverflowError)) PyErr_Clear(); else return NULL; } } 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)); } 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); } static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index) { PyErr_Format(PyExc_ValueError, "need more than %" CYTHON_FORMAT_SSIZE_T "d value%s to unpack", index, (index == 1) ? "" : "s"); } static CYTHON_INLINE int __Pyx_IterFinish(void) { #if CYTHON_COMPILING_IN_CPYTHON PyThreadState *tstate = PyThreadState_GET(); PyObject* exc_type = tstate->curexc_type; if (unlikely(exc_type)) { if (likely(exc_type == PyExc_StopIteration) || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration)) { PyObject *exc_value, *exc_tb; exc_value = tstate->curexc_value; exc_tb = tstate->curexc_traceback; tstate->curexc_type = 0; tstate->curexc_value = 0; tstate->curexc_traceback = 0; Py_DECREF(exc_type); Py_XDECREF(exc_value); Py_XDECREF(exc_tb); return 0; } else { return -1; } } return 0; #else if (unlikely(PyErr_Occurred())) { if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) { PyErr_Clear(); return 0; } else { return -1; } } return 0; #endif } 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; } 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; } static CYTHON_INLINE int __Pyx_CheckKeywordStrings( PyObject *kwdict, const char* function_name, int kw_allowed) { PyObject* key = 0; Py_ssize_t pos = 0; #if CPYTHON_COMPILING_IN_PYPY if (!kw_allowed && PyDict_Next(kwdict, &pos, &key, 0)) goto invalid_keyword; return 1; #else while (PyDict_Next(kwdict, &pos, &key, 0)) { #if PY_MAJOR_VERSION < 3 if (unlikely(!PyString_CheckExact(key)) && unlikely(!PyString_Check(key))) #endif if (unlikely(!PyUnicode_Check(key))) goto invalid_keyword_type; } if ((!kw_allowed) && unlikely(key)) goto invalid_keyword; return 1; invalid_keyword_type: PyErr_Format(PyExc_TypeError, "%s() keywords must be strings", function_name); return 0; #endif invalid_keyword: PyErr_Format(PyExc_TypeError, #if PY_MAJOR_VERSION < 3 "%s() got an unexpected keyword argument '%s'", function_name, PyString_AsString(key)); #else "%s() got an unexpected keyword argument '%U'", function_name, key); #endif return 0; } static PyObject* __Pyx_PyDict_GetItemDefault(PyObject* d, PyObject* key, PyObject* default_value) { PyObject* value; #if PY_MAJOR_VERSION >= 3 value = PyDict_GetItemWithError(d, key); if (unlikely(!value)) { if (unlikely(PyErr_Occurred())) return NULL; value = default_value; } Py_INCREF(value); #else if (PyString_CheckExact(key) || PyUnicode_CheckExact(key) || PyInt_CheckExact(key)) { value = PyDict_GetItem(d, key); if (unlikely(!value)) { value = default_value; } Py_INCREF(value); } else { if (default_value == Py_None) default_value = NULL; value = PyObject_CallMethodObjArgs( d, __pyx_n_s__get, key, default_value, NULL); } #endif return value; } static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb) { PyObject *local_type, *local_value, *local_tb; #if CYTHON_COMPILING_IN_CPYTHON PyObject *tmp_type, *tmp_value, *tmp_tb; PyThreadState *tstate = PyThreadState_GET(); local_type = tstate->curexc_type; local_value = tstate->curexc_value; local_tb = tstate->curexc_traceback; tstate->curexc_type = 0; tstate->curexc_value = 0; tstate->curexc_traceback = 0; #else PyErr_Fetch(&local_type, &local_value, &local_tb); #endif PyErr_NormalizeException(&local_type, &local_value, &local_tb); #if CYTHON_COMPILING_IN_CPYTHON if (unlikely(tstate->curexc_type)) #else if (unlikely(PyErr_Occurred())) #endif goto bad; #if PY_MAJOR_VERSION >= 3 if (unlikely(PyException_SetTraceback(local_value, local_tb) < 0)) goto bad; #endif Py_INCREF(local_type); Py_INCREF(local_value); Py_INCREF(local_tb); *type = local_type; *value = local_value; *tb = local_tb; #if CYTHON_COMPILING_IN_CPYTHON tmp_type = tstate->exc_type; tmp_value = tstate->exc_value; tmp_tb = tstate->exc_traceback; tstate->exc_type = local_type; tstate->exc_value = local_value; tstate->exc_traceback = local_tb; /* Make sure tstate is in a consistent state when we XDECREF these objects (DECREF may run arbitrary code). */ 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; } static PyObject* __Pyx_PyObject_PopIndex(PyObject* L, Py_ssize_t ix) { PyObject *r, *py_ix; #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyList_CheckExact(L))) { Py_ssize_t size = PyList_GET_SIZE(L); if (likely(size > (((PyListObject*)L)->allocated >> 1))) { Py_ssize_t cix = ix; if (cix < 0) { cix += size; } if (likely(0 <= cix && cix < size)) { PyObject* v = PyList_GET_ITEM(L, cix); Py_SIZE(L) -= 1; size -= 1; memmove(&PyList_GET_ITEM(L, cix), &PyList_GET_ITEM(L, cix+1), (size-cix)*sizeof(PyObject*)); return v; } } } #endif py_ix = PyInt_FromSsize_t(ix); if (!py_ix) return NULL; r = __Pyx_PyObject_CallMethod1(L, __pyx_n_s__pop, py_ix); Py_DECREF(py_ix); return r; } static CYTHON_INLINE int __Pyx_SetItemInt_Generic(PyObject *o, PyObject *j, PyObject *v) { int r; if (!j) return -1; r = PyObject_SetItem(o, j, v); Py_DECREF(j); return r; } static CYTHON_INLINE int __Pyx_SetItemInt_Fast(PyObject *o, Py_ssize_t i, PyObject *v, int is_list, int wraparound, int boundscheck) { #if CYTHON_COMPILING_IN_CPYTHON if (is_list || PyList_CheckExact(o)) { Py_ssize_t n = (!wraparound) ? i : ((likely(i >= 0)) ? i : i + PyList_GET_SIZE(o)); if ((!boundscheck) || likely((n >= 0) & (n < PyList_GET_SIZE(o)))) { PyObject* old = PyList_GET_ITEM(o, n); Py_INCREF(v); PyList_SET_ITEM(o, n, v); Py_DECREF(old); return 1; } } else { PySequenceMethods *m = Py_TYPE(o)->tp_as_sequence; if (likely(m && m->sq_ass_item)) { if (wraparound && unlikely(i < 0) && likely(m->sq_length)) { Py_ssize_t l = m->sq_length(o); if (likely(l >= 0)) { i += l; } else { if (PyErr_ExceptionMatches(PyExc_OverflowError)) PyErr_Clear(); else return -1; } } return m->sq_ass_item(o, i, v); } } #else #if CYTHON_COMPILING_IN_PYPY if (is_list || (PySequence_Check(o) && !PyDict_Check(o))) { #else if (is_list || PySequence_Check(o)) { #endif return PySequence_SetItem(o, i, v); } #endif return __Pyx_SetItemInt_Generic(o, PyInt_FromSsize_t(i), v); } static CYTHON_INLINE void __Pyx_RaiseUnboundLocalError(const char *varname) { PyErr_Format(PyExc_UnboundLocalError, "local variable '%s' referenced before assignment", varname); } static CYTHON_INLINE PyObject* __Pyx_PyObject_GetSlice( PyObject* obj, Py_ssize_t cstart, Py_ssize_t cstop, PyObject** _py_start, PyObject** _py_stop, PyObject** _py_slice, int has_cstart, int has_cstop, CYTHON_UNUSED int wraparound) { #if CYTHON_COMPILING_IN_CPYTHON PyMappingMethods* mp; #if PY_MAJOR_VERSION < 3 PySequenceMethods* ms = Py_TYPE(obj)->tp_as_sequence; if (likely(ms && ms->sq_slice)) { if (!has_cstart) { if (_py_start && (*_py_start != Py_None)) { cstart = __Pyx_PyIndex_AsSsize_t(*_py_start); if ((cstart == (Py_ssize_t)-1) && PyErr_Occurred()) goto bad; } else cstart = 0; } if (!has_cstop) { if (_py_stop && (*_py_stop != Py_None)) { cstop = __Pyx_PyIndex_AsSsize_t(*_py_stop); if ((cstop == (Py_ssize_t)-1) && PyErr_Occurred()) goto bad; } else cstop = PY_SSIZE_T_MAX; } if (wraparound && unlikely((cstart < 0) | (cstop < 0)) && likely(ms->sq_length)) { Py_ssize_t l = ms->sq_length(obj); if (likely(l >= 0)) { if (cstop < 0) { cstop += l; if (cstop < 0) cstop = 0; } if (cstart < 0) { cstart += l; if (cstart < 0) cstart = 0; } } else { if (PyErr_ExceptionMatches(PyExc_OverflowError)) PyErr_Clear(); else goto bad; } } return ms->sq_slice(obj, cstart, cstop); } #endif mp = Py_TYPE(obj)->tp_as_mapping; if (likely(mp && mp->mp_subscript)) #endif { PyObject* result; PyObject *py_slice, *py_start, *py_stop; if (_py_slice) { py_slice = *_py_slice; } else { PyObject* owned_start = NULL; PyObject* owned_stop = NULL; if (_py_start) { py_start = *_py_start; } else { if (has_cstart) { owned_start = py_start = PyInt_FromSsize_t(cstart); if (unlikely(!py_start)) goto bad; } else py_start = Py_None; } if (_py_stop) { py_stop = *_py_stop; } else { if (has_cstop) { owned_stop = py_stop = PyInt_FromSsize_t(cstop); if (unlikely(!py_stop)) { Py_XDECREF(owned_start); goto bad; } } else py_stop = Py_None; } py_slice = PySlice_New(py_start, py_stop, Py_None); Py_XDECREF(owned_start); Py_XDECREF(owned_stop); if (unlikely(!py_slice)) goto bad; } #if CYTHON_COMPILING_IN_CPYTHON result = mp->mp_subscript(obj, py_slice); #else result = PyObject_GetItem(obj, py_slice); #endif if (!_py_slice) { Py_DECREF(py_slice); } return result; } PyErr_Format(PyExc_TypeError, "'%.200s' object is unsliceable", Py_TYPE(obj)->tp_name); bad: return NULL; } static int __Pyx_ArgTypeTest(PyObject *obj, PyTypeObject *type, int none_allowed, const char *name, int exact) { if (!type) { PyErr_Format(PyExc_SystemError, "Missing type object"); return 0; } if (none_allowed && obj == Py_None) return 1; else if (exact) { if (Py_TYPE(obj) == type) return 1; } else { if (PyObject_TypeCheck(obj, type)) return 1; } PyErr_Format(PyExc_TypeError, "Argument '%s' has incorrect type (expected %s, got %s)", name, type->tp_name, Py_TYPE(obj)->tp_name); return 0; } static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type) { if (unlikely(!type)) { PyErr_Format(PyExc_SystemError, "Missing type object"); return 0; } if (likely(PyObject_TypeCheck(obj, type))) return 1; PyErr_Format(PyExc_TypeError, "Cannot convert %.200s to %.200s", Py_TYPE(obj)->tp_name, type->tp_name); return 0; } static CYTHON_INLINE int __Pyx_IsLittleEndian(void) { unsigned int n = 1; return *(unsigned char*)(&n) != 0; } 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) /* First char was not a digit */ 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; /* Consume from buffer string */ while (1) { if (field == &ctx->root) { ctx->head = NULL; if (ctx->enc_count != 0) { __Pyx_BufFmt_RaiseExpected(ctx); return -1; } break; /* breaks both loops as ctx->enc_count == 0 */ } 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; /* empty struct */ 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 CYTHON_INLINE 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 != ')') { if (isspace(*ts)) continue; 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 10: case 13: ++ts; break; case '<': if (!__Pyx_IsLittleEndian()) { PyErr_SetString(PyExc_ValueError, "Little-endian buffer not supported on big-endian compiler"); return NULL; } ctx->new_packmode = '='; ++ts; break; case '>': case '!': if (__Pyx_IsLittleEndian()) { 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': /* substruct */ { 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; /* Erase processed last struct element */ 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 '}': /* end of substruct; either repeat or move on */ { size_t alignment = ctx->struct_alignment; ++ts; if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL; ctx->enc_type = 0; /* Erase processed last struct element */ 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; } /* fall through */ 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 's': case 'p': if (ctx->enc_type == *ts && got_Z == ctx->is_complex && ctx->enc_packmode == ctx->new_packmode) { ctx->enc_count += ctx->new_count; } else { 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; } } } } static CYTHON_INLINE 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 CYTHON_INLINE int __Pyx_GetBufferAndValidate( Py_buffer* buf, PyObject* obj, __Pyx_TypeInfo* dtype, int flags, int nd, int cast, __Pyx_BufFmt_StackElem* stack) { if (obj == Py_None || obj == NULL) { __Pyx_ZeroBuffer(buf); return 0; } buf->buf = NULL; if (__Pyx_GetBuffer(obj, buf, flags) == -1) goto fail; if (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 ((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_ZeroBuffer(buf); return -1; } static CYTHON_INLINE void __Pyx_SafeReleaseBuffer(Py_buffer* info) { if (info->buf == NULL) return; if (info->suboffsets == __Pyx_minusones) info->suboffsets = NULL; __Pyx_ReleaseBuffer(info); } static void __Pyx_RaiseBufferFallbackError(void) { PyErr_Format(PyExc_ValueError, "Buffer acquisition failed on assignment; and then reacquiring the old buffer failed too!"); } static void __Pyx_RaiseBufferIndexError(int axis) { PyErr_Format(PyExc_IndexError, "Out of bounds on buffer access (axis %d)", axis); } static CYTHON_INLINE PyObject* __Pyx_decode_c_string( const char* cstring, Py_ssize_t start, Py_ssize_t stop, const char* encoding, const char* errors, PyObject* (*decode_func)(const char *s, Py_ssize_t size, const char *errors)) { Py_ssize_t length; if (unlikely((start < 0) | (stop < 0))) { length = strlen(cstring); if (start < 0) { start += length; if (start < 0) start = 0; } if (stop < 0) stop += length; } length = stop - start; if (unlikely(length <= 0)) return PyUnicode_FromUnicode(NULL, 0); cstring += start; if (decode_func) { return decode_func(cstring, length, errors); } else { return PyUnicode_Decode(cstring, length, encoding, errors); } } #if PY_MAJOR_VERSION >= 3 static CYTHON_INLINE PyObject* __Pyx_PyDict_Values(PyObject* d) { return __Pyx_PyObject_CallMethod1((PyObject*)&PyDict_Type, __pyx_n_s__values, d); } #endif static void __Pyx_WriteUnraisable(const char *name, CYTHON_UNUSED int clineno, CYTHON_UNUSED int lineno, CYTHON_UNUSED const char *filename) { PyObject *old_exc, *old_val, *old_tb; PyObject *ctx; __Pyx_ErrFetch(&old_exc, &old_val, &old_tb); #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); } } static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); } static int __Pyx_SetVtable(PyObject *dict, void *vtable) { #if PY_VERSION_HEX >= 0x02070000 && !(PY_MAJOR_VERSION==3&&PY_MINOR_VERSION==0) 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; } 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; } static CYTHON_INLINE void __Pyx_ExceptionSave(PyObject **type, PyObject **value, PyObject **tb) { #if CYTHON_COMPILING_IN_CPYTHON PyThreadState *tstate = PyThreadState_GET(); *type = tstate->exc_type; *value = tstate->exc_value; *tb = tstate->exc_traceback; Py_XINCREF(*type); Py_XINCREF(*value); Py_XINCREF(*tb); #else PyErr_GetExcInfo(type, value, tb); #endif } static void __Pyx_ExceptionReset(PyObject *type, PyObject *value, PyObject *tb) { #if CYTHON_COMPILING_IN_CPYTHON PyObject *tmp_type, *tmp_value, *tmp_tb; PyThreadState *tstate = PyThreadState_GET(); tmp_type = tstate->exc_type; tmp_value = tstate->exc_value; tmp_tb = tstate->exc_traceback; tstate->exc_type = type; tstate->exc_value = value; tstate->exc_traceback = tb; Py_XDECREF(tmp_type); Py_XDECREF(tmp_value); Py_XDECREF(tmp_tb); #else PyErr_SetExcInfo(type, value, tb); #endif } #if PY_MAJOR_VERSION < 3 static int __Pyx_GetBuffer(PyObject *obj, Py_buffer *view, int flags) { #if PY_VERSION_HEX >= 0x02060000 if (PyObject_CheckBuffer(obj)) return PyObject_GetBuffer(obj, view, flags); #endif if (PyObject_TypeCheck(obj, __pyx_ptype_5numpy_ndarray)) return __pyx_pw_5numpy_7ndarray_1__getbuffer__(obj, view, flags); #if PY_VERSION_HEX < 0x02060000 if (obj->ob_type->tp_dict) { PyObject *getbuffer_cobj = PyObject_GetItem( obj->ob_type->tp_dict, __pyx_n_s____pyx_getbuffer); if (getbuffer_cobj) { getbufferproc func = (getbufferproc) PyCObject_AsVoidPtr(getbuffer_cobj); Py_DECREF(getbuffer_cobj); if (!func) goto fail; return func(obj, view, flags); } else { PyErr_Clear(); } } #endif PyErr_Format(PyExc_TypeError, "'%100s' does not have the buffer interface", Py_TYPE(obj)->tp_name); #if PY_VERSION_HEX < 0x02060000 fail: #endif return -1; } static void __Pyx_ReleaseBuffer(Py_buffer *view) { PyObject *obj = view->obj; if (!obj) return; #if PY_VERSION_HEX >= 0x02060000 if (PyObject_CheckBuffer(obj)) { PyBuffer_Release(view); return; } #endif if (PyObject_TypeCheck(obj, __pyx_ptype_5numpy_ndarray)) { __pyx_pw_5numpy_7ndarray_3__releasebuffer__(obj, view); return; } #if PY_VERSION_HEX < 0x02060000 if (obj->ob_type->tp_dict) { PyObject *releasebuffer_cobj = PyObject_GetItem( obj->ob_type->tp_dict, __pyx_n_s____pyx_releasebuffer); if (releasebuffer_cobj) { releasebufferproc func = (releasebufferproc) PyCObject_AsVoidPtr(releasebuffer_cobj); Py_DECREF(releasebuffer_cobj); if (!func) goto fail; func(obj, view); return; } else { PyErr_Clear(); } } #endif goto nofail; #if PY_VERSION_HEX < 0x02060000 fail: #endif PyErr_WriteUnraisable(obj); nofail: Py_DECREF(obj); view->obj = NULL; } #endif /* PY_MAJOR_VERSION < 3 */ static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level) { PyObject *empty_list = 0; PyObject *module = 0; PyObject *global_dict = 0; PyObject *empty_dict = 0; PyObject *list; #if PY_VERSION_HEX < 0x03030000 PyObject *py_import; py_import = __Pyx_PyObject_GetAttrStr(__pyx_b, __pyx_n_s____import__); if (!py_import) goto bad; #endif if (from_list) list = from_list; else { empty_list = PyList_New(0); if (!empty_list) goto bad; list = empty_list; } global_dict = PyModule_GetDict(__pyx_m); if (!global_dict) goto bad; empty_dict = PyDict_New(); if (!empty_dict) goto bad; #if PY_VERSION_HEX >= 0x02050000 { #if PY_MAJOR_VERSION >= 3 if (level == -1) { if (strchr(__Pyx_MODULE_NAME, '.')) { #if PY_VERSION_HEX < 0x03030000 PyObject *py_level = PyInt_FromLong(1); if (!py_level) goto bad; module = PyObject_CallFunctionObjArgs(py_import, name, global_dict, empty_dict, list, py_level, NULL); Py_DECREF(py_level); #else module = PyImport_ImportModuleLevelObject( name, global_dict, empty_dict, list, 1); #endif if (!module) { if (!PyErr_ExceptionMatches(PyExc_ImportError)) goto bad; PyErr_Clear(); } } level = 0; /* try absolute import on failure */ } #endif if (!module) { #if PY_VERSION_HEX < 0x03030000 PyObject *py_level = PyInt_FromLong(level); if (!py_level) goto bad; module = PyObject_CallFunctionObjArgs(py_import, name, global_dict, empty_dict, list, py_level, NULL); Py_DECREF(py_level); #else module = PyImport_ImportModuleLevelObject( name, global_dict, empty_dict, list, level); #endif } } #else if (level>0) { PyErr_SetString(PyExc_RuntimeError, "Relative import is not supported for Python <=2.4."); goto bad; } module = PyObject_CallFunctionObjArgs(py_import, name, global_dict, empty_dict, list, NULL); #endif bad: #if PY_VERSION_HEX < 0x03030000 Py_XDECREF(py_import); #endif Py_XDECREF(empty_list); Py_XDECREF(empty_dict); return module; } static PyObject *__Pyx_FindPy2Metaclass(PyObject *bases) { PyObject *metaclass; #if PY_MAJOR_VERSION < 3 if (PyTuple_Check(bases) && PyTuple_GET_SIZE(bases) > 0) { PyObject *base = PyTuple_GET_ITEM(bases, 0); metaclass = __Pyx_PyObject_GetAttrStr(base, __pyx_n_s____class__); if (!metaclass) { PyErr_Clear(); metaclass = (PyObject*) Py_TYPE(base); Py_INCREF(metaclass); } } else { metaclass = (PyObject *) &PyClass_Type; Py_INCREF(metaclass); } #else if (PyTuple_Check(bases) && PyTuple_GET_SIZE(bases) > 0) { PyObject *base = PyTuple_GET_ITEM(bases, 0); metaclass = (PyObject*) Py_TYPE(base); } else { metaclass = (PyObject *) &PyType_Type; } Py_INCREF(metaclass); #endif return metaclass; } static PyObject *__Pyx_CreateClass(PyObject *bases, PyObject *dict, PyObject *name, PyObject *qualname, PyObject *modname) { PyObject *result; PyObject *metaclass; if (PyDict_SetItem(dict, __pyx_n_s____module__, modname) < 0) return NULL; if (PyDict_SetItem(dict, __pyx_n_s____qualname__, qualname) < 0) return NULL; metaclass = PyDict_GetItem(dict, __pyx_n_s____metaclass__); if (metaclass) { Py_INCREF(metaclass); } else { metaclass = __Pyx_FindPy2Metaclass(bases); } result = PyObject_CallFunctionObjArgs(metaclass, name, bases, dict, NULL); Py_DECREF(metaclass); return result; } static CYTHON_INLINE npy_int64 __Pyx_PyInt_from_py_npy_int64(PyObject* x) { const npy_int64 neg_one = (npy_int64)-1, const_zero = (npy_int64)0; const int is_unsigned = const_zero < neg_one; if (sizeof(npy_int64) == sizeof(char)) { if (is_unsigned) return (npy_int64)__Pyx_PyInt_AsUnsignedChar(x); else return (npy_int64)__Pyx_PyInt_AsSignedChar(x); } else if (sizeof(npy_int64) == sizeof(short)) { if (is_unsigned) return (npy_int64)__Pyx_PyInt_AsUnsignedShort(x); else return (npy_int64)__Pyx_PyInt_AsSignedShort(x); } else if (sizeof(npy_int64) == sizeof(int)) { if (is_unsigned) return (npy_int64)__Pyx_PyInt_AsUnsignedInt(x); else return (npy_int64)__Pyx_PyInt_AsSignedInt(x); } else if (sizeof(npy_int64) == sizeof(long)) { if (is_unsigned) return (npy_int64)__Pyx_PyInt_AsUnsignedLong(x); else return (npy_int64)__Pyx_PyInt_AsSignedLong(x); } else if (sizeof(npy_int64) == sizeof(PY_LONG_LONG)) { if (is_unsigned) return (npy_int64)__Pyx_PyInt_AsUnsignedLongLong(x); else return (npy_int64)__Pyx_PyInt_AsSignedLongLong(x); } else { #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_Int(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; } } #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION < 3 static PyObject *__Pyx_GetStdout(void) { PyObject *f = PySys_GetObject((char *)"stdout"); if (!f) { PyErr_SetString(PyExc_RuntimeError, "lost sys.stdout"); } return f; } static int __Pyx_Print(PyObject* f, PyObject *arg_tuple, int newline) { int i; if (!f) { if (!(f = __Pyx_GetStdout())) return -1; } Py_INCREF(f); for (i=0; i < PyTuple_GET_SIZE(arg_tuple); i++) { PyObject* v; if (PyFile_SoftSpace(f, 1)) { if (PyFile_WriteString(" ", f) < 0) goto error; } v = PyTuple_GET_ITEM(arg_tuple, i); if (PyFile_WriteObject(v, f, Py_PRINT_RAW) < 0) goto error; if (PyString_Check(v)) { char *s = PyString_AsString(v); Py_ssize_t len = PyString_Size(v); if (len > 0 && isspace(Py_CHARMASK(s[len-1])) && s[len-1] != ' ') PyFile_SoftSpace(f, 0); } } if (newline) { if (PyFile_WriteString("\n", f) < 0) goto error; PyFile_SoftSpace(f, 0); } Py_DECREF(f); return 0; error: Py_DECREF(f); return -1; } #else /* Python 3 has a print function */ static int __Pyx_Print(PyObject* stream, PyObject *arg_tuple, int newline) { PyObject* kwargs = 0; PyObject* result = 0; PyObject* end_string; if (unlikely(!__pyx_print)) { __pyx_print = PyObject_GetAttr(__pyx_b, __pyx_n_s__print); if (!__pyx_print) return -1; } if (stream) { kwargs = PyDict_New(); if (unlikely(!kwargs)) return -1; if (unlikely(PyDict_SetItem(kwargs, __pyx_n_s__file, stream) < 0)) goto bad; if (!newline) { end_string = PyUnicode_FromStringAndSize(" ", 1); if (unlikely(!end_string)) goto bad; if (PyDict_SetItem(kwargs, __pyx_n_s__end, end_string) < 0) { Py_DECREF(end_string); goto bad; } Py_DECREF(end_string); } } else if (!newline) { if (unlikely(!__pyx_print_kwargs)) { __pyx_print_kwargs = PyDict_New(); if (unlikely(!__pyx_print_kwargs)) return -1; end_string = PyUnicode_FromStringAndSize(" ", 1); if (unlikely(!end_string)) return -1; if (PyDict_SetItem(__pyx_print_kwargs, __pyx_n_s__end, end_string) < 0) { Py_DECREF(end_string); return -1; } Py_DECREF(end_string); } kwargs = __pyx_print_kwargs; } result = PyObject_Call(__pyx_print, arg_tuple, kwargs); if (unlikely(kwargs) && (kwargs != __pyx_print_kwargs)) Py_DECREF(kwargs); if (!result) return -1; Py_DECREF(result); return 0; bad: if (kwargs != __pyx_print_kwargs) Py_XDECREF(kwargs); return -1; } #endif #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION < 3 static int __Pyx_PrintOne(PyObject* f, PyObject *o) { if (!f) { if (!(f = __Pyx_GetStdout())) return -1; } Py_INCREF(f); if (PyFile_SoftSpace(f, 0)) { if (PyFile_WriteString(" ", f) < 0) goto error; } if (PyFile_WriteObject(o, f, Py_PRINT_RAW) < 0) goto error; if (PyFile_WriteString("\n", f) < 0) goto error; Py_DECREF(f); return 0; error: Py_DECREF(f); return -1; /* the line below is just to avoid C compiler * warnings about unused functions */ return __Pyx_Print(f, NULL, 0); } #else /* Python 3 has a print function */ static int __Pyx_PrintOne(PyObject* stream, PyObject *o) { int res; PyObject* arg_tuple = PyTuple_Pack(1, o); if (unlikely(!arg_tuple)) return -1; res = __Pyx_Print(stream, arg_tuple, 1); Py_DECREF(arg_tuple); return res; } #endif static CYTHON_INLINE npy_uint8 __Pyx_PyInt_from_py_npy_uint8(PyObject* x) { const npy_uint8 neg_one = (npy_uint8)-1, const_zero = (npy_uint8)0; const int is_unsigned = const_zero < neg_one; if (sizeof(npy_uint8) == sizeof(char)) { if (is_unsigned) return (npy_uint8)__Pyx_PyInt_AsUnsignedChar(x); else return (npy_uint8)__Pyx_PyInt_AsSignedChar(x); } else if (sizeof(npy_uint8) == sizeof(short)) { if (is_unsigned) return (npy_uint8)__Pyx_PyInt_AsUnsignedShort(x); else return (npy_uint8)__Pyx_PyInt_AsSignedShort(x); } else if (sizeof(npy_uint8) == sizeof(int)) { if (is_unsigned) return (npy_uint8)__Pyx_PyInt_AsUnsignedInt(x); else return (npy_uint8)__Pyx_PyInt_AsSignedInt(x); } else if (sizeof(npy_uint8) == sizeof(long)) { if (is_unsigned) return (npy_uint8)__Pyx_PyInt_AsUnsignedLong(x); else return (npy_uint8)__Pyx_PyInt_AsSignedLong(x); } else if (sizeof(npy_uint8) == sizeof(PY_LONG_LONG)) { if (is_unsigned) return (npy_uint8)__Pyx_PyInt_AsUnsignedLongLong(x); else return (npy_uint8)__Pyx_PyInt_AsSignedLongLong(x); } else { #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_Int(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; } } #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 #if CYTHON_CCOMPLEX #else static CYTHON_INLINE int __Pyx_c_eqf(__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_sumf(__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_difff(__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_prodf(__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; } static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_quotf(__pyx_t_float_complex a, __pyx_t_float_complex b) { __pyx_t_float_complex z; float denom = b.real * b.real + b.imag * b.imag; z.real = (a.real * b.real + a.imag * b.imag) / denom; z.imag = (a.imag * b.real - a.real * b.imag) / denom; return z; } static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_negf(__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_zerof(__pyx_t_float_complex a) { return (a.real == 0) && (a.imag == 0); } static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_conjf(__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_absf(__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_powf(__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_prodf(a, a); return __Pyx_c_prodf(a, a); case 3: z = __Pyx_c_prodf(a, a); return __Pyx_c_prodf(z, a); case 4: z = __Pyx_c_prodf(a, a); return __Pyx_c_prodf(z, z); } } if (a.imag == 0) { if (a.real == 0) { return a; } r = a.real; theta = 0; } else { r = __Pyx_c_absf(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 #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 #if CYTHON_CCOMPLEX #else static CYTHON_INLINE int __Pyx_c_eq(__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(__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(__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(__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; } static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_quot(__pyx_t_double_complex a, __pyx_t_double_complex b) { __pyx_t_double_complex z; double denom = b.real * b.real + b.imag * b.imag; z.real = (a.real * b.real + a.imag * b.imag) / denom; z.imag = (a.imag * b.real - a.real * b.imag) / denom; return z; } static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_neg(__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(__pyx_t_double_complex a) { return (a.real == 0) && (a.imag == 0); } static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_conj(__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(__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(__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(a, a); return __Pyx_c_prod(a, a); case 3: z = __Pyx_c_prod(a, a); return __Pyx_c_prod(z, a); case 4: z = __Pyx_c_prod(a, a); return __Pyx_c_prod(z, z); } } if (a.imag == 0) { if (a.real == 0) { return a; } r = a.real; theta = 0; } else { r = __Pyx_c_abs(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 static CYTHON_INLINE unsigned char __Pyx_PyInt_AsUnsignedChar(PyObject* x) { const unsigned char neg_one = (unsigned char)-1, const_zero = 0; const int is_unsigned = neg_one > const_zero; if (sizeof(unsigned char) < sizeof(long)) { long val = __Pyx_PyInt_AsLong(x); if (unlikely(val != (long)(unsigned char)val)) { if (!unlikely(val == -1 && PyErr_Occurred())) { PyErr_SetString(PyExc_OverflowError, (is_unsigned && unlikely(val < 0)) ? "can't convert negative value to unsigned char" : "value too large to convert to unsigned char"); } return (unsigned char)-1; } return (unsigned char)val; } return (unsigned char)__Pyx_PyInt_AsUnsignedLong(x); } static CYTHON_INLINE unsigned short __Pyx_PyInt_AsUnsignedShort(PyObject* x) { const unsigned short neg_one = (unsigned short)-1, const_zero = 0; const int is_unsigned = neg_one > const_zero; if (sizeof(unsigned short) < sizeof(long)) { long val = __Pyx_PyInt_AsLong(x); if (unlikely(val != (long)(unsigned short)val)) { if (!unlikely(val == -1 && PyErr_Occurred())) { PyErr_SetString(PyExc_OverflowError, (is_unsigned && unlikely(val < 0)) ? "can't convert negative value to unsigned short" : "value too large to convert to unsigned short"); } return (unsigned short)-1; } return (unsigned short)val; } return (unsigned short)__Pyx_PyInt_AsUnsignedLong(x); } static CYTHON_INLINE unsigned int __Pyx_PyInt_AsUnsignedInt(PyObject* x) { const unsigned int neg_one = (unsigned int)-1, const_zero = 0; const int is_unsigned = neg_one > const_zero; if (sizeof(unsigned int) < sizeof(long)) { long val = __Pyx_PyInt_AsLong(x); if (unlikely(val != (long)(unsigned int)val)) { if (!unlikely(val == -1 && PyErr_Occurred())) { PyErr_SetString(PyExc_OverflowError, (is_unsigned && unlikely(val < 0)) ? "can't convert negative value to unsigned int" : "value too large to convert to unsigned int"); } return (unsigned int)-1; } return (unsigned int)val; } return (unsigned int)__Pyx_PyInt_AsUnsignedLong(x); } static CYTHON_INLINE char __Pyx_PyInt_AsChar(PyObject* x) { const char neg_one = (char)-1, const_zero = 0; const int is_unsigned = neg_one > const_zero; if (sizeof(char) < sizeof(long)) { long val = __Pyx_PyInt_AsLong(x); if (unlikely(val != (long)(char)val)) { if (!unlikely(val == -1 && PyErr_Occurred())) { PyErr_SetString(PyExc_OverflowError, (is_unsigned && unlikely(val < 0)) ? "can't convert negative value to char" : "value too large to convert to char"); } return (char)-1; } return (char)val; } return (char)__Pyx_PyInt_AsLong(x); } static CYTHON_INLINE short __Pyx_PyInt_AsShort(PyObject* x) { const short neg_one = (short)-1, const_zero = 0; const int is_unsigned = neg_one > const_zero; if (sizeof(short) < sizeof(long)) { long val = __Pyx_PyInt_AsLong(x); if (unlikely(val != (long)(short)val)) { if (!unlikely(val == -1 && PyErr_Occurred())) { PyErr_SetString(PyExc_OverflowError, (is_unsigned && unlikely(val < 0)) ? "can't convert negative value to short" : "value too large to convert to short"); } return (short)-1; } return (short)val; } return (short)__Pyx_PyInt_AsLong(x); } static CYTHON_INLINE int __Pyx_PyInt_AsInt(PyObject* x) { const int neg_one = (int)-1, const_zero = 0; const int is_unsigned = neg_one > const_zero; if (sizeof(int) < sizeof(long)) { long val = __Pyx_PyInt_AsLong(x); if (unlikely(val != (long)(int)val)) { if (!unlikely(val == -1 && PyErr_Occurred())) { PyErr_SetString(PyExc_OverflowError, (is_unsigned && unlikely(val < 0)) ? "can't convert negative value to int" : "value too large to convert to int"); } return (int)-1; } return (int)val; } return (int)__Pyx_PyInt_AsLong(x); } static CYTHON_INLINE signed char __Pyx_PyInt_AsSignedChar(PyObject* x) { const signed char neg_one = (signed char)-1, const_zero = 0; const int is_unsigned = neg_one > const_zero; if (sizeof(signed char) < sizeof(long)) { long val = __Pyx_PyInt_AsLong(x); if (unlikely(val != (long)(signed char)val)) { if (!unlikely(val == -1 && PyErr_Occurred())) { PyErr_SetString(PyExc_OverflowError, (is_unsigned && unlikely(val < 0)) ? "can't convert negative value to signed char" : "value too large to convert to signed char"); } return (signed char)-1; } return (signed char)val; } return (signed char)__Pyx_PyInt_AsSignedLong(x); } static CYTHON_INLINE signed short __Pyx_PyInt_AsSignedShort(PyObject* x) { const signed short neg_one = (signed short)-1, const_zero = 0; const int is_unsigned = neg_one > const_zero; if (sizeof(signed short) < sizeof(long)) { long val = __Pyx_PyInt_AsLong(x); if (unlikely(val != (long)(signed short)val)) { if (!unlikely(val == -1 && PyErr_Occurred())) { PyErr_SetString(PyExc_OverflowError, (is_unsigned && unlikely(val < 0)) ? "can't convert negative value to signed short" : "value too large to convert to signed short"); } return (signed short)-1; } return (signed short)val; } return (signed short)__Pyx_PyInt_AsSignedLong(x); } static CYTHON_INLINE signed int __Pyx_PyInt_AsSignedInt(PyObject* x) { const signed int neg_one = (signed int)-1, const_zero = 0; const int is_unsigned = neg_one > const_zero; if (sizeof(signed int) < sizeof(long)) { long val = __Pyx_PyInt_AsLong(x); if (unlikely(val != (long)(signed int)val)) { if (!unlikely(val == -1 && PyErr_Occurred())) { PyErr_SetString(PyExc_OverflowError, (is_unsigned && unlikely(val < 0)) ? "can't convert negative value to signed int" : "value too large to convert to signed int"); } return (signed int)-1; } return (signed int)val; } return (signed int)__Pyx_PyInt_AsSignedLong(x); } static CYTHON_INLINE int __Pyx_PyInt_AsLongDouble(PyObject* x) { const int neg_one = (int)-1, const_zero = 0; const int is_unsigned = neg_one > const_zero; if (sizeof(int) < sizeof(long)) { long val = __Pyx_PyInt_AsLong(x); if (unlikely(val != (long)(int)val)) { if (!unlikely(val == -1 && PyErr_Occurred())) { PyErr_SetString(PyExc_OverflowError, (is_unsigned && unlikely(val < 0)) ? "can't convert negative value to int" : "value too large to convert to int"); } return (int)-1; } return (int)val; } return (int)__Pyx_PyInt_AsLong(x); } #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS #include "longintrepr.h" #endif #endif static CYTHON_INLINE unsigned long __Pyx_PyInt_AsUnsignedLong(PyObject* x) { const unsigned long neg_one = (unsigned long)-1, const_zero = 0; const int is_unsigned = neg_one > const_zero; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_Check(x))) { long val = PyInt_AS_LONG(x); if (is_unsigned && unlikely(val < 0)) { PyErr_SetString(PyExc_OverflowError, "can't convert negative value to unsigned long"); return (unsigned long)-1; } return (unsigned long)val; } else #endif if (likely(PyLong_Check(x))) { if (is_unsigned) { #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS if (sizeof(digit) <= sizeof(unsigned long)) { switch (Py_SIZE(x)) { case 0: return 0; case 1: return (unsigned long) ((PyLongObject*)x)->ob_digit[0]; } } #endif #endif if (unlikely(Py_SIZE(x) < 0)) { PyErr_SetString(PyExc_OverflowError, "can't convert negative value to unsigned long"); return (unsigned long)-1; } return (unsigned long)PyLong_AsUnsignedLong(x); } else { #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS if (sizeof(digit) <= sizeof(unsigned long)) { switch (Py_SIZE(x)) { case 0: return 0; case 1: return +(unsigned long) ((PyLongObject*)x)->ob_digit[0]; case -1: return -(unsigned long) ((PyLongObject*)x)->ob_digit[0]; } } #endif #endif return (unsigned long)PyLong_AsLong(x); } } else { unsigned long val; PyObject *tmp = __Pyx_PyNumber_Int(x); if (!tmp) return (unsigned long)-1; val = __Pyx_PyInt_AsUnsignedLong(tmp); Py_DECREF(tmp); return val; } } #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS #include "longintrepr.h" #endif #endif static CYTHON_INLINE unsigned PY_LONG_LONG __Pyx_PyInt_AsUnsignedLongLong(PyObject* x) { const unsigned PY_LONG_LONG neg_one = (unsigned PY_LONG_LONG)-1, const_zero = 0; const int is_unsigned = neg_one > const_zero; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_Check(x))) { long val = PyInt_AS_LONG(x); if (is_unsigned && unlikely(val < 0)) { PyErr_SetString(PyExc_OverflowError, "can't convert negative value to unsigned PY_LONG_LONG"); return (unsigned PY_LONG_LONG)-1; } return (unsigned PY_LONG_LONG)val; } else #endif if (likely(PyLong_Check(x))) { if (is_unsigned) { #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS if (sizeof(digit) <= sizeof(unsigned PY_LONG_LONG)) { switch (Py_SIZE(x)) { case 0: return 0; case 1: return (unsigned PY_LONG_LONG) ((PyLongObject*)x)->ob_digit[0]; } } #endif #endif if (unlikely(Py_SIZE(x) < 0)) { PyErr_SetString(PyExc_OverflowError, "can't convert negative value to unsigned PY_LONG_LONG"); return (unsigned PY_LONG_LONG)-1; } return (unsigned PY_LONG_LONG)PyLong_AsUnsignedLongLong(x); } else { #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS if (sizeof(digit) <= sizeof(unsigned PY_LONG_LONG)) { switch (Py_SIZE(x)) { case 0: return 0; case 1: return +(unsigned PY_LONG_LONG) ((PyLongObject*)x)->ob_digit[0]; case -1: return -(unsigned PY_LONG_LONG) ((PyLongObject*)x)->ob_digit[0]; } } #endif #endif return (unsigned PY_LONG_LONG)PyLong_AsLongLong(x); } } else { unsigned PY_LONG_LONG val; PyObject *tmp = __Pyx_PyNumber_Int(x); if (!tmp) return (unsigned PY_LONG_LONG)-1; val = __Pyx_PyInt_AsUnsignedLongLong(tmp); Py_DECREF(tmp); return val; } } #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS #include "longintrepr.h" #endif #endif static CYTHON_INLINE long __Pyx_PyInt_AsLong(PyObject* x) { const long neg_one = (long)-1, const_zero = 0; const int is_unsigned = neg_one > const_zero; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_Check(x))) { long val = PyInt_AS_LONG(x); if (is_unsigned && unlikely(val < 0)) { PyErr_SetString(PyExc_OverflowError, "can't convert negative value to long"); return (long)-1; } return (long)val; } else #endif if (likely(PyLong_Check(x))) { if (is_unsigned) { #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS if (sizeof(digit) <= sizeof(long)) { switch (Py_SIZE(x)) { case 0: return 0; case 1: return (long) ((PyLongObject*)x)->ob_digit[0]; } } #endif #endif if (unlikely(Py_SIZE(x) < 0)) { PyErr_SetString(PyExc_OverflowError, "can't convert negative value to long"); return (long)-1; } return (long)PyLong_AsUnsignedLong(x); } else { #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS if (sizeof(digit) <= sizeof(long)) { switch (Py_SIZE(x)) { case 0: return 0; case 1: return +(long) ((PyLongObject*)x)->ob_digit[0]; case -1: return -(long) ((PyLongObject*)x)->ob_digit[0]; } } #endif #endif return (long)PyLong_AsLong(x); } } else { long val; PyObject *tmp = __Pyx_PyNumber_Int(x); if (!tmp) return (long)-1; val = __Pyx_PyInt_AsLong(tmp); Py_DECREF(tmp); return val; } } #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS #include "longintrepr.h" #endif #endif static CYTHON_INLINE PY_LONG_LONG __Pyx_PyInt_AsLongLong(PyObject* x) { const PY_LONG_LONG neg_one = (PY_LONG_LONG)-1, const_zero = 0; const int is_unsigned = neg_one > const_zero; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_Check(x))) { long val = PyInt_AS_LONG(x); if (is_unsigned && unlikely(val < 0)) { PyErr_SetString(PyExc_OverflowError, "can't convert negative value to PY_LONG_LONG"); return (PY_LONG_LONG)-1; } return (PY_LONG_LONG)val; } else #endif if (likely(PyLong_Check(x))) { if (is_unsigned) { #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS if (sizeof(digit) <= sizeof(PY_LONG_LONG)) { switch (Py_SIZE(x)) { case 0: return 0; case 1: return (PY_LONG_LONG) ((PyLongObject*)x)->ob_digit[0]; } } #endif #endif if (unlikely(Py_SIZE(x) < 0)) { PyErr_SetString(PyExc_OverflowError, "can't convert negative value to PY_LONG_LONG"); return (PY_LONG_LONG)-1; } return (PY_LONG_LONG)PyLong_AsUnsignedLongLong(x); } else { #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS if (sizeof(digit) <= sizeof(PY_LONG_LONG)) { switch (Py_SIZE(x)) { case 0: return 0; case 1: return +(PY_LONG_LONG) ((PyLongObject*)x)->ob_digit[0]; case -1: return -(PY_LONG_LONG) ((PyLongObject*)x)->ob_digit[0]; } } #endif #endif return (PY_LONG_LONG)PyLong_AsLongLong(x); } } else { PY_LONG_LONG val; PyObject *tmp = __Pyx_PyNumber_Int(x); if (!tmp) return (PY_LONG_LONG)-1; val = __Pyx_PyInt_AsLongLong(tmp); Py_DECREF(tmp); return val; } } #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS #include "longintrepr.h" #endif #endif static CYTHON_INLINE signed long __Pyx_PyInt_AsSignedLong(PyObject* x) { const signed long neg_one = (signed long)-1, const_zero = 0; const int is_unsigned = neg_one > const_zero; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_Check(x))) { long val = PyInt_AS_LONG(x); if (is_unsigned && unlikely(val < 0)) { PyErr_SetString(PyExc_OverflowError, "can't convert negative value to signed long"); return (signed long)-1; } return (signed long)val; } else #endif if (likely(PyLong_Check(x))) { if (is_unsigned) { #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS if (sizeof(digit) <= sizeof(signed long)) { switch (Py_SIZE(x)) { case 0: return 0; case 1: return (signed long) ((PyLongObject*)x)->ob_digit[0]; } } #endif #endif if (unlikely(Py_SIZE(x) < 0)) { PyErr_SetString(PyExc_OverflowError, "can't convert negative value to signed long"); return (signed long)-1; } return (signed long)PyLong_AsUnsignedLong(x); } else { #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS if (sizeof(digit) <= sizeof(signed long)) { switch (Py_SIZE(x)) { case 0: return 0; case 1: return +(signed long) ((PyLongObject*)x)->ob_digit[0]; case -1: return -(signed long) ((PyLongObject*)x)->ob_digit[0]; } } #endif #endif return (signed long)PyLong_AsLong(x); } } else { signed long val; PyObject *tmp = __Pyx_PyNumber_Int(x); if (!tmp) return (signed long)-1; val = __Pyx_PyInt_AsSignedLong(tmp); Py_DECREF(tmp); return val; } } #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS #include "longintrepr.h" #endif #endif static CYTHON_INLINE signed PY_LONG_LONG __Pyx_PyInt_AsSignedLongLong(PyObject* x) { const signed PY_LONG_LONG neg_one = (signed PY_LONG_LONG)-1, const_zero = 0; const int is_unsigned = neg_one > const_zero; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_Check(x))) { long val = PyInt_AS_LONG(x); if (is_unsigned && unlikely(val < 0)) { PyErr_SetString(PyExc_OverflowError, "can't convert negative value to signed PY_LONG_LONG"); return (signed PY_LONG_LONG)-1; } return (signed PY_LONG_LONG)val; } else #endif if (likely(PyLong_Check(x))) { if (is_unsigned) { #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS if (sizeof(digit) <= sizeof(signed PY_LONG_LONG)) { switch (Py_SIZE(x)) { case 0: return 0; case 1: return (signed PY_LONG_LONG) ((PyLongObject*)x)->ob_digit[0]; } } #endif #endif if (unlikely(Py_SIZE(x) < 0)) { PyErr_SetString(PyExc_OverflowError, "can't convert negative value to signed PY_LONG_LONG"); return (signed PY_LONG_LONG)-1; } return (signed PY_LONG_LONG)PyLong_AsUnsignedLongLong(x); } else { #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS if (sizeof(digit) <= sizeof(signed PY_LONG_LONG)) { switch (Py_SIZE(x)) { case 0: return 0; case 1: return +(signed PY_LONG_LONG) ((PyLongObject*)x)->ob_digit[0]; case -1: return -(signed PY_LONG_LONG) ((PyLongObject*)x)->ob_digit[0]; } } #endif #endif return (signed PY_LONG_LONG)PyLong_AsLongLong(x); } } else { signed PY_LONG_LONG val; PyObject *tmp = __Pyx_PyNumber_Int(x); if (!tmp) return (signed PY_LONG_LONG)-1; val = __Pyx_PyInt_AsSignedLongLong(tmp); Py_DECREF(tmp); return val; } } 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); #if PY_VERSION_HEX < 0x02050000 return PyErr_Warn(NULL, message); #else return PyErr_WarnEx(NULL, message, 1); #endif } return 0; } #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 #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, "%s.%s 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", module_name, class_name); #if PY_VERSION_HEX < 0x02050000 if (PyErr_Warn(NULL, warning) < 0) goto bad; #else if (PyErr_WarnEx(NULL, warning, 0) < 0) goto bad; #endif } else if ((size_t)basicsize != size) { PyErr_Format(PyExc_ValueError, "%s.%s has the wrong size, try recompiling", module_name, class_name); goto bad; } return (PyTypeObject *)result; bad: Py_XDECREF(py_module); Py_XDECREF(result); return NULL; } #endif 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) / 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, 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); } #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, /*int argcount,*/ 0, /*int kwonlyargcount,*/ 0, /*int nlocals,*/ 0, /*int stacksize,*/ 0, /*int flags,*/ __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, /*int firstlineno,*/ __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; PyObject *py_globals = 0; PyFrameObject *py_frame = 0; py_code = __pyx_find_code_object(c_line ? c_line : py_line); if (!py_code) { py_code = __Pyx_CreateCodeObjectForTraceback( funcname, c_line, py_line, filename); if (!py_code) goto bad; __pyx_insert_code_object(c_line ? c_line : py_line, py_code); } py_globals = PyModule_GetDict(__pyx_m); if (!py_globals) goto bad; py_frame = PyFrame_New( PyThreadState_GET(), /*PyThreadState *tstate,*/ py_code, /*PyCodeObject *code,*/ py_globals, /*PyObject *globals,*/ 0 /*PyObject *locals*/ ); if (!py_frame) goto bad; py_frame->f_lineno = py_line; PyTraceBack_Here(py_frame); bad: Py_XDECREF(py_code); Py_XDECREF(py_frame); } 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 /* Python 3+ has unicode identifiers */ if (t->is_unicode | t->is_str) { if (t->intern) { *t->p = PyUnicode_InternFromString(t->s); } else if (t->encoding) { *t->p = PyUnicode_Decode(t->s, t->n - 1, t->encoding, NULL); } else { *t->p = PyUnicode_FromStringAndSize(t->s, t->n - 1); } } else { *t->p = PyBytes_FromStringAndSize(t->s, t->n - 1); } #endif if (!*t->p) return -1; ++t; } return 0; } static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(char* c_str) { return __Pyx_PyUnicode_FromStringAndSize(c_str, strlen(c_str)); } static CYTHON_INLINE char* __Pyx_PyObject_AsString(PyObject* o) { Py_ssize_t ignore; return __Pyx_PyObject_AsStringAndSize(o, &ignore); } static CYTHON_INLINE char* __Pyx_PyObject_AsStringAndSize(PyObject* o, Py_ssize_t *length) { #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT if ( #if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII __Pyx_sys_getdefaultencoding_not_ascii && #endif PyUnicode_Check(o)) { #if PY_VERSION_HEX < 0x03030000 char* defenc_c; PyObject* defenc = _PyUnicode_AsDefaultEncodedString(o, NULL); if (!defenc) return NULL; defenc_c = PyBytes_AS_STRING(defenc); #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII { char* end = defenc_c + PyBytes_GET_SIZE(defenc); char* c; for (c = defenc_c; c < end; c++) { if ((unsigned char) (*c) >= 128) { PyUnicode_AsASCIIString(o); return NULL; } } } #endif /*__PYX_DEFAULT_STRING_ENCODING_IS_ASCII*/ *length = PyBytes_GET_SIZE(defenc); return defenc_c; #else /* PY_VERSION_HEX < 0x03030000 */ if (PyUnicode_READY(o) == -1) return NULL; #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII if (PyUnicode_IS_ASCII(o)) { *length = PyUnicode_GET_DATA_SIZE(o); return PyUnicode_AsUTF8(o); } else { PyUnicode_AsASCIIString(o); return NULL; } #else /* __PYX_DEFAULT_STRING_ENCODING_IS_ASCII */ return PyUnicode_AsUTF8AndSize(o, length); #endif /* __PYX_DEFAULT_STRING_ENCODING_IS_ASCII */ #endif /* PY_VERSION_HEX < 0x03030000 */ } else #endif /* __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT */ { char* result; int r = PyBytes_AsStringAndSize(o, &result, length); if (r < 0) { return NULL; } else { return result; } } } static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject* x) { int is_true = x == Py_True; if (is_true | (x == Py_False) | (x == Py_None)) return is_true; else return PyObject_IsTrue(x); } static CYTHON_INLINE PyObject* __Pyx_PyNumber_Int(PyObject* x) { PyNumberMethods *m; const char *name = NULL; PyObject *res = NULL; #if PY_MAJOR_VERSION < 3 if (PyInt_Check(x) || PyLong_Check(x)) #else if (PyLong_Check(x)) #endif return Py_INCREF(x), x; m = Py_TYPE(x)->tp_as_number; #if PY_MAJOR_VERSION < 3 if (m && m->nb_int) { name = "int"; res = PyNumber_Int(x); } else if (m && m->nb_long) { name = "long"; res = PyNumber_Long(x); } #else if (m && m->nb_int) { name = "int"; res = PyNumber_Long(x); } #endif if (res) { #if PY_MAJOR_VERSION < 3 if (!PyInt_Check(res) && !PyLong_Check(res)) { #else if (!PyLong_Check(res)) { #endif PyErr_Format(PyExc_TypeError, "__%s__ returned non-%s (type %.200s)", name, name, Py_TYPE(res)->tp_name); Py_DECREF(res); return NULL; } } else if (!PyErr_Occurred()) { PyErr_SetString(PyExc_TypeError, "an integer is required"); } return res; } static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) { Py_ssize_t ival; PyObject* x = 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) { #if PY_VERSION_HEX < 0x02050000 if (ival <= LONG_MAX) return PyInt_FromLong((long)ival); else { unsigned char *bytes = (unsigned char *) &ival; int one = 1; int little = (int)*(unsigned char*)&one; return _PyLong_FromByteArray(bytes, sizeof(size_t), little, 0); } #else return PyInt_FromSize_t(ival); #endif } static CYTHON_INLINE size_t __Pyx_PyInt_AsSize_t(PyObject* x) { unsigned PY_LONG_LONG val = __Pyx_PyInt_AsUnsignedLongLong(x); if (unlikely(val != (unsigned PY_LONG_LONG)(size_t)val)) { if ((val != (unsigned PY_LONG_LONG)-1) || !PyErr_Occurred()) PyErr_SetString(PyExc_OverflowError, "value too large to convert to size_t"); return (size_t)-1; } return (size_t)val; } #endif /* Py_PYTHON_H */ debian/cythonized-files3/pandas/src/0000775000000000000000000000000012275603610014572 5ustar debian/cythonized-files3/pandas/src/testing.c0000664000000000000000000055153012275603610016424 0ustar /* Generated by Cython 0.19.2 on Mon Feb 3 08:42:29 2014 */ #define PY_SSIZE_T_CLEAN #ifndef CYTHON_USE_PYLONG_INTERNALS #ifdef PYLONG_BITS_IN_DIGIT #define CYTHON_USE_PYLONG_INTERNALS 0 #else #include "pyconfig.h" #ifdef PYLONG_BITS_IN_DIGIT #define CYTHON_USE_PYLONG_INTERNALS 1 #else #define CYTHON_USE_PYLONG_INTERNALS 0 #endif #endif #endif #include "Python.h" #ifndef Py_PYTHON_H #error Python headers needed to compile C extensions, please install development version of Python. #elif PY_VERSION_HEX < 0x02040000 #error Cython requires Python 2.4+. #else #include /* For offsetof */ #ifndef offsetof #define offsetof(type, member) ( (size_t) & ((type*)0) -> member ) #endif #if !defined(WIN32) && !defined(MS_WINDOWS) #ifndef __stdcall #define __stdcall #endif #ifndef __cdecl #define __cdecl #endif #ifndef __fastcall #define __fastcall #endif #endif #ifndef DL_IMPORT #define DL_IMPORT(t) t #endif #ifndef DL_EXPORT #define DL_EXPORT(t) t #endif #ifndef PY_LONG_LONG #define PY_LONG_LONG LONG_LONG #endif #ifndef Py_HUGE_VAL #define Py_HUGE_VAL HUGE_VAL #endif #ifdef PYPY_VERSION #define CYTHON_COMPILING_IN_PYPY 1 #define CYTHON_COMPILING_IN_CPYTHON 0 #else #define CYTHON_COMPILING_IN_PYPY 0 #define CYTHON_COMPILING_IN_CPYTHON 1 #endif #if PY_VERSION_HEX < 0x02050000 typedef int Py_ssize_t; #define PY_SSIZE_T_MAX INT_MAX #define PY_SSIZE_T_MIN INT_MIN #define PY_FORMAT_SIZE_T "" #define CYTHON_FORMAT_SSIZE_T "" #define PyInt_FromSsize_t(z) PyInt_FromLong(z) #define PyInt_AsSsize_t(o) __Pyx_PyInt_AsInt(o) #define PyNumber_Index(o) ((PyNumber_Check(o) && !PyFloat_Check(o)) ? PyNumber_Int(o) : \ (PyErr_Format(PyExc_TypeError, \ "expected index value, got %.200s", Py_TYPE(o)->tp_name), \ (PyObject*)0)) #define __Pyx_PyIndex_Check(o) (PyNumber_Check(o) && !PyFloat_Check(o) && \ !PyComplex_Check(o)) #define PyIndex_Check __Pyx_PyIndex_Check #define PyErr_WarnEx(category, message, stacklevel) PyErr_Warn(category, message) #define __PYX_BUILD_PY_SSIZE_T "i" #else #define __PYX_BUILD_PY_SSIZE_T "n" #define CYTHON_FORMAT_SSIZE_T "z" #define __Pyx_PyIndex_Check PyIndex_Check #endif #if PY_VERSION_HEX < 0x02060000 #define Py_REFCNT(ob) (((PyObject*)(ob))->ob_refcnt) #define Py_TYPE(ob) (((PyObject*)(ob))->ob_type) #define Py_SIZE(ob) (((PyVarObject*)(ob))->ob_size) #define PyVarObject_HEAD_INIT(type, size) \ PyObject_HEAD_INIT(type) size, #define PyType_Modified(t) typedef struct { void *buf; PyObject *obj; Py_ssize_t len; Py_ssize_t itemsize; int readonly; int ndim; char *format; Py_ssize_t *shape; Py_ssize_t *strides; Py_ssize_t *suboffsets; void *internal; } Py_buffer; #define PyBUF_SIMPLE 0 #define PyBUF_WRITABLE 0x0001 #define PyBUF_FORMAT 0x0004 #define PyBUF_ND 0x0008 #define PyBUF_STRIDES (0x0010 | PyBUF_ND) #define PyBUF_C_CONTIGUOUS (0x0020 | PyBUF_STRIDES) #define PyBUF_F_CONTIGUOUS (0x0040 | PyBUF_STRIDES) #define PyBUF_ANY_CONTIGUOUS (0x0080 | PyBUF_STRIDES) #define PyBUF_INDIRECT (0x0100 | PyBUF_STRIDES) #define PyBUF_RECORDS (PyBUF_STRIDES | PyBUF_FORMAT | PyBUF_WRITABLE) #define PyBUF_FULL (PyBUF_INDIRECT | PyBUF_FORMAT | PyBUF_WRITABLE) typedef int (*getbufferproc)(PyObject *, Py_buffer *, int); typedef void (*releasebufferproc)(PyObject *, Py_buffer *); #endif #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, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) #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) #endif #if PY_MAJOR_VERSION < 3 && PY_MINOR_VERSION < 6 #define PyUnicode_FromString(s) PyUnicode_Decode(s, strlen(s), "UTF-8", "strict") #endif #if PY_MAJOR_VERSION >= 3 #define Py_TPFLAGS_CHECKTYPES 0 #define Py_TPFLAGS_HAVE_INDEX 0 #endif #if (PY_VERSION_HEX < 0x02060000) || (PY_MAJOR_VERSION >= 3) #define Py_TPFLAGS_HAVE_NEWBUFFER 0 #endif #if PY_VERSION_HEX < 0x02060000 #define Py_TPFLAGS_HAVE_VERSION_TAG 0 #endif #if PY_VERSION_HEX > 0x03030000 && defined(PyUnicode_KIND) #define CYTHON_PEP393_ENABLED 1 #define __Pyx_PyUnicode_READY(op) (likely(PyUnicode_IS_READY(op)) ? \ 0 : _PyUnicode_Ready((PyObject *)(op))) #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_LENGTH(u) #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i) #define __Pyx_PyUnicode_READ(k, d, i) PyUnicode_READ(k, d, i) #else #define CYTHON_PEP393_ENABLED 0 #define __Pyx_PyUnicode_READY(op) (0) #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_SIZE(u) #define __Pyx_PyUnicode_READ_CHAR(u, i) ((Py_UCS4)(PyUnicode_AS_UNICODE(u)[i])) #define __Pyx_PyUnicode_READ(k, d, i) ((k=k), (Py_UCS4)(((Py_UNICODE*)d)[i])) #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_VERSION_HEX < 0x02060000 #define PyBytesObject PyStringObject #define PyBytes_Type PyString_Type #define PyBytes_Check PyString_Check #define PyBytes_CheckExact PyString_CheckExact #define PyBytes_FromString PyString_FromString #define PyBytes_FromStringAndSize PyString_FromStringAndSize #define PyBytes_FromFormat PyString_FromFormat #define PyBytes_DecodeEscape PyString_DecodeEscape #define PyBytes_AsString PyString_AsString #define PyBytes_AsStringAndSize PyString_AsStringAndSize #define PyBytes_Size PyString_Size #define PyBytes_AS_STRING PyString_AS_STRING #define PyBytes_GET_SIZE PyString_GET_SIZE #define PyBytes_Repr PyString_Repr #define PyBytes_Concat PyString_Concat #define PyBytes_ConcatAndDel PyString_ConcatAndDel #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_CheckExact(obj) || PyUnicode_CheckExact(obj) || \ PyString_Check(obj) || PyUnicode_Check(obj)) #define __Pyx_PyBaseString_CheckExact(obj) (Py_TYPE(obj) == &PyBaseString_Type) #endif #if PY_VERSION_HEX < 0x02060000 #define PySet_Check(obj) PyObject_TypeCheck(obj, &PySet_Type) #define PyFrozenSet_Check(obj) PyObject_TypeCheck(obj, &PyFrozenSet_Type) #endif #ifndef PySet_CheckExact #define PySet_CheckExact(obj) (Py_TYPE(obj) == &PySet_Type) #endif #define __Pyx_TypeCheck(obj, type) PyObject_TypeCheck(obj, (PyTypeObject *)type) #if PY_MAJOR_VERSION >= 3 #define PyIntObject PyLongObject #define PyInt_Type PyLong_Type #define PyInt_Check(op) PyLong_Check(op) #define PyInt_CheckExact(op) PyLong_CheckExact(op) #define PyInt_FromString PyLong_FromString #define PyInt_FromUnicode PyLong_FromUnicode #define PyInt_FromLong PyLong_FromLong #define PyInt_FromSize_t PyLong_FromSize_t #define PyInt_FromSsize_t PyLong_FromSsize_t #define PyInt_AsLong PyLong_AsLong #define PyInt_AS_LONG PyLong_AS_LONG #define PyInt_AsSsize_t PyLong_AsSsize_t #define PyInt_AsUnsignedLongMask PyLong_AsUnsignedLongMask #define PyInt_AsUnsignedLongLongMask PyLong_AsUnsignedLongLongMask #endif #if PY_MAJOR_VERSION >= 3 #define PyBoolObject PyLongObject #endif #if PY_VERSION_HEX < 0x03020000 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) || (PY_VERSION_HEX >= 0x03010300) #define __Pyx_PySequence_GetSlice(obj, a, b) PySequence_GetSlice(obj, a, b) #define __Pyx_PySequence_SetSlice(obj, a, b, value) PySequence_SetSlice(obj, a, b, value) #define __Pyx_PySequence_DelSlice(obj, a, b) PySequence_DelSlice(obj, a, b) #else #define __Pyx_PySequence_GetSlice(obj, a, b) (unlikely(!(obj)) ? \ (PyErr_SetString(PyExc_SystemError, "null argument to internal routine"), (PyObject*)0) : \ (likely((obj)->ob_type->tp_as_mapping) ? (PySequence_GetSlice(obj, a, b)) : \ (PyErr_Format(PyExc_TypeError, "'%.200s' object is unsliceable", (obj)->ob_type->tp_name), (PyObject*)0))) #define __Pyx_PySequence_SetSlice(obj, a, b, value) (unlikely(!(obj)) ? \ (PyErr_SetString(PyExc_SystemError, "null argument to internal routine"), -1) : \ (likely((obj)->ob_type->tp_as_mapping) ? (PySequence_SetSlice(obj, a, b, value)) : \ (PyErr_Format(PyExc_TypeError, "'%.200s' object doesn't support slice assignment", (obj)->ob_type->tp_name), -1))) #define __Pyx_PySequence_DelSlice(obj, a, b) (unlikely(!(obj)) ? \ (PyErr_SetString(PyExc_SystemError, "null argument to internal routine"), -1) : \ (likely((obj)->ob_type->tp_as_mapping) ? (PySequence_DelSlice(obj, a, b)) : \ (PyErr_Format(PyExc_TypeError, "'%.200s' object doesn't support slice deletion", (obj)->ob_type->tp_name), -1))) #endif #if PY_MAJOR_VERSION >= 3 #define PyMethod_New(func, self, klass) ((self) ? PyMethod_New(func, self) : PyInstanceMethod_New(func)) #endif #if PY_VERSION_HEX < 0x02050000 #define __Pyx_GetAttrString(o,n) PyObject_GetAttrString((o),((char *)(n))) #define __Pyx_SetAttrString(o,n,a) PyObject_SetAttrString((o),((char *)(n)),(a)) #define __Pyx_DelAttrString(o,n) PyObject_DelAttrString((o),((char *)(n))) #else #define __Pyx_GetAttrString(o,n) PyObject_GetAttrString((o),(n)) #define __Pyx_SetAttrString(o,n,a) PyObject_SetAttrString((o),(n),(a)) #define __Pyx_DelAttrString(o,n) PyObject_DelAttrString((o),(n)) #endif #if PY_VERSION_HEX < 0x02050000 #define __Pyx_NAMESTR(n) ((char *)(n)) #define __Pyx_DOCSTR(n) ((char *)(n)) #else #define __Pyx_NAMESTR(n) (n) #define __Pyx_DOCSTR(n) (n) #endif #ifndef CYTHON_INLINE #if defined(__GNUC__) #define CYTHON_INLINE __inline__ #elif defined(_MSC_VER) #define CYTHON_INLINE __inline #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L #define CYTHON_INLINE inline #else #define CYTHON_INLINE #endif #endif #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 #ifdef NAN #define __PYX_NAN() ((float) NAN) #else static CYTHON_INLINE float __PYX_NAN() { /* Initialize NaN. The sign is irrelevant, an exponent with all bits 1 and a nonzero mantissa means NaN. If the first bit in the mantissa is 1, it is a quiet NaN. */ float value; memset(&value, 0xFF, sizeof(value)); return value; } #endif #if PY_MAJOR_VERSION >= 3 #define __Pyx_PyNumber_Divide(x,y) PyNumber_TrueDivide(x,y) #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceTrueDivide(x,y) #else #define __Pyx_PyNumber_Divide(x,y) PyNumber_Divide(x,y) #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceDivide(x,y) #endif #ifndef __PYX_EXTERN_C #ifdef __cplusplus #define __PYX_EXTERN_C extern "C" #else #define __PYX_EXTERN_C extern #endif #endif #if defined(WIN32) || defined(MS_WINDOWS) #define _USE_MATH_DEFINES #endif #include #define __PYX_HAVE__pandas___testing #define __PYX_HAVE_API__pandas___testing #ifdef _OPENMP #include #endif /* _OPENMP */ #ifdef PYREX_WITHOUT_ASSERTIONS #define CYTHON_WITHOUT_ASSERTIONS #endif #ifndef CYTHON_UNUSED # if defined(__GNUC__) # if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)) # define CYTHON_UNUSED __attribute__ ((__unused__)) # else # define CYTHON_UNUSED # endif # elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER)) # define CYTHON_UNUSED __attribute__ ((__unused__)) # else # define CYTHON_UNUSED # endif #endif typedef struct {PyObject **p; char *s; const Py_ssize_t n; const char* encoding; const char is_unicode; const char is_str; const char intern; } __Pyx_StringTabEntry; /*proto*/ #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 static CYTHON_INLINE char* __Pyx_PyObject_AsString(PyObject*); static CYTHON_INLINE char* __Pyx_PyObject_AsStringAndSize(PyObject*, Py_ssize_t* length); #define __Pyx_PyBytes_FromString PyBytes_FromString #define __Pyx_PyBytes_FromStringAndSize PyBytes_FromStringAndSize static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(char*); #if PY_MAJOR_VERSION < 3 #define __Pyx_PyStr_FromString __Pyx_PyBytes_FromString #define __Pyx_PyStr_FromStringAndSize __Pyx_PyBytes_FromStringAndSize #else #define __Pyx_PyStr_FromString __Pyx_PyUnicode_FromString #define __Pyx_PyStr_FromStringAndSize __Pyx_PyUnicode_FromStringAndSize #endif #define __Pyx_PyObject_AsUString(s) ((unsigned char*) __Pyx_PyObject_AsString(s)) #define __Pyx_PyObject_FromUString(s) __Pyx_PyObject_FromString((char*)s) #define __Pyx_PyBytes_FromUString(s) __Pyx_PyBytes_FromString((char*)s) #define __Pyx_PyStr_FromUString(s) __Pyx_PyStr_FromString((char*)s) #define __Pyx_PyUnicode_FromUString(s) __Pyx_PyUnicode_FromString((char*)s) #if PY_MAJOR_VERSION < 3 static CYTHON_INLINE size_t __Pyx_Py_UNICODE_strlen(const Py_UNICODE *u) { const Py_UNICODE *u_end = u; while (*u_end++) ; return u_end - u - 1; } #else #define __Pyx_Py_UNICODE_strlen Py_UNICODE_strlen #endif #define __Pyx_PyUnicode_FromUnicode(u) PyUnicode_FromUnicode(u, __Pyx_Py_UNICODE_strlen(u)) #define __Pyx_PyUnicode_FromUnicodeAndLength PyUnicode_FromUnicode #define __Pyx_PyUnicode_AsUnicode PyUnicode_AsUnicode #define __Pyx_Owned_Py_None(b) (Py_INCREF(Py_None), Py_None) #define __Pyx_PyBool_FromLong(b) ((b) ? (Py_INCREF(Py_True), Py_True) : (Py_INCREF(Py_False), Py_False)) static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*); static CYTHON_INLINE PyObject* __Pyx_PyNumber_Int(PyObject* x); static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*); static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t); static CYTHON_INLINE size_t __Pyx_PyInt_AsSize_t(PyObject*); #if CYTHON_COMPILING_IN_CPYTHON #define __pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x)) #else #define __pyx_PyFloat_AsDouble(x) PyFloat_AsDouble(x) #endif #define __pyx_PyFloat_AsFloat(x) ((float) __pyx_PyFloat_AsDouble(x)) #if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII static int __Pyx_sys_getdefaultencoding_not_ascii; static int __Pyx_init_sys_getdefaultencoding_params() { PyObject* sys = NULL; PyObject* default_encoding = NULL; PyObject* ascii_chars_u = NULL; PyObject* ascii_chars_b = NULL; sys = PyImport_ImportModule("sys"); if (sys == NULL) goto bad; default_encoding = PyObject_CallMethod(sys, (char*) (const char*) "getdefaultencoding", NULL); if (default_encoding == NULL) goto bad; if (strcmp(PyBytes_AsString(default_encoding), "ascii") == 0) { __Pyx_sys_getdefaultencoding_not_ascii = 0; } else { const char* default_encoding_c = PyBytes_AS_STRING(default_encoding); 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 == NULL) goto bad; ascii_chars_b = PyUnicode_AsEncodedString(ascii_chars_u, default_encoding_c, NULL); if (ascii_chars_b == NULL || strncmp(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 '%s' is not a superset of ascii.", default_encoding_c); goto bad; } } Py_XDECREF(sys); Py_XDECREF(default_encoding); Py_XDECREF(ascii_chars_u); Py_XDECREF(ascii_chars_b); return 0; bad: Py_XDECREF(sys); 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() { PyObject* sys = NULL; PyObject* default_encoding = NULL; char* default_encoding_c; sys = PyImport_ImportModule("sys"); if (sys == NULL) goto bad; default_encoding = PyObject_CallMethod(sys, (char*) (const char*) "getdefaultencoding", NULL); if (default_encoding == NULL) goto bad; default_encoding_c = PyBytes_AS_STRING(default_encoding); __PYX_DEFAULT_STRING_ENCODING = (char*) malloc(strlen(default_encoding_c)); strcpy(__PYX_DEFAULT_STRING_ENCODING, default_encoding_c); Py_DECREF(sys); Py_DECREF(default_encoding); return 0; bad: Py_XDECREF(sys); Py_XDECREF(default_encoding); return -1; } #endif #endif #ifdef __GNUC__ /* Test for GCC > 2.95 */ #if __GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95)) #define likely(x) __builtin_expect(!!(x), 1) #define unlikely(x) __builtin_expect(!!(x), 0) #else /* __GNUC__ > 2 ... */ #define likely(x) (x) #define unlikely(x) (x) #endif /* __GNUC__ > 2 ... */ #else /* __GNUC__ */ #define likely(x) (x) #define unlikely(x) (x) #endif /* __GNUC__ */ static PyObject *__pyx_m; static PyObject *__pyx_d; static PyObject *__pyx_b; static PyObject *__pyx_empty_tuple; static PyObject *__pyx_empty_bytes; static int __pyx_lineno; static int __pyx_clineno = 0; static const char * __pyx_cfilenm= __FILE__; static const char *__pyx_filename; static const char *__pyx_f[] = { "testing.pyx", }; /*--- Type declarations ---*/ struct __pyx_opt_args_6pandas_8_testing_assert_dict_equal; struct __pyx_opt_args_6pandas_8_testing_assert_almost_equal; /* "pandas/src/testing.pyx":42 * return abs(desired - actual) < (0.5 * 10.0 ** -decimal) * * cpdef assert_dict_equal(a, b, bint compare_keys=True): # <<<<<<<<<<<<<< * assert is_dictlike(a) and is_dictlike(b), ( * "Cannot compare dict objects, one or both is not dict-like" */ struct __pyx_opt_args_6pandas_8_testing_assert_dict_equal { int __pyx_n; int compare_keys; }; /* "pandas/src/testing.pyx":58 * return True * * cpdef assert_almost_equal(a, b, bint check_less_precise=False): # <<<<<<<<<<<<<< * cdef: * int decimal */ struct __pyx_opt_args_6pandas_8_testing_assert_almost_equal { int __pyx_n; int check_less_precise; }; #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); /*proto*/ #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 /* CYTHON_REFNANNY */ #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) #if CYTHON_COMPILING_IN_CPYTHON static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name) { PyTypeObject* tp = Py_TYPE(obj); if (likely(tp->tp_getattro)) return tp->tp_getattro(obj, attr_name); #if PY_MAJOR_VERSION < 3 if (likely(tp->tp_getattr)) return tp->tp_getattr(obj, PyString_AS_STRING(attr_name)); #endif return PyObject_GetAttr(obj, attr_name); } #else #define __Pyx_PyObject_GetAttrStr(o,n) PyObject_GetAttr(o,n) #endif static PyObject *__Pyx_GetBuiltinName(PyObject *name); /*proto*/ static CYTHON_INLINE void __Pyx_ErrRestore(PyObject *type, PyObject *value, PyObject *tb); /*proto*/ static CYTHON_INLINE void __Pyx_ErrFetch(PyObject **type, PyObject **value, PyObject **tb); /*proto*/ static void __Pyx_WriteUnraisable(const char *name, int clineno, int lineno, const char *filename); /*proto*/ #if PY_VERSION_HEX < 0x02050000 #ifndef PyAnySet_CheckExact #define PyAnySet_CheckExact(ob) \ ((ob)->ob_type == &PySet_Type || \ (ob)->ob_type == &PyFrozenSet_Type) #define PySet_New(iterable) \ PyObject_CallFunctionObjArgs((PyObject *)&PySet_Type, (iterable), NULL) #define Pyx_PyFrozenSet_New(iterable) \ PyObject_CallFunctionObjArgs((PyObject *)&PyFrozenSet_Type, (iterable), NULL) #define PySet_Size(anyset) \ PyObject_Size((anyset)) #define PySet_Contains(anyset, key) \ PySequence_Contains((anyset), (key)) #define PySet_Pop(set) \ PyObject_CallMethod(set, (char *)"pop", NULL) static CYTHON_INLINE int PySet_Clear(PyObject *set) { PyObject *ret = PyObject_CallMethod(set, (char *)"clear", NULL); if (!ret) return -1; Py_DECREF(ret); return 0; } static CYTHON_INLINE int PySet_Discard(PyObject *set, PyObject *key) { PyObject *ret = PyObject_CallMethod(set, (char *)"discard", (char *)"O", key); if (!ret) return -1; Py_DECREF(ret); return 0; } static CYTHON_INLINE int PySet_Add(PyObject *set, PyObject *key) { PyObject *ret = PyObject_CallMethod(set, (char *)"add", (char *)"O", key); if (!ret) return -1; Py_DECREF(ret); return 0; } #endif /* PyAnySet_CheckExact (<= Py2.4) */ #endif /* < Py2.5 */ 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); /*proto*/ static void __Pyx_RaiseDoubleKeywordsError(const char* func_name, PyObject* kw_name); /*proto*/ static int __Pyx_ParseOptionalKeywords(PyObject *kwds, PyObject **argnames[], \ PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args, \ const char* function_name); /*proto*/ static CYTHON_INLINE PyObject *__Pyx_GetModuleGlobalName(PyObject *name); /*proto*/ #define __Pyx_GetItemInt(o, i, size, to_py_func, is_list, wraparound, boundscheck) \ (((size) <= sizeof(Py_ssize_t)) ? \ __Pyx_GetItemInt_Fast(o, i, is_list, wraparound, boundscheck) : \ __Pyx_GetItemInt_Generic(o, to_py_func(i))) #define __Pyx_GetItemInt_List(o, i, size, to_py_func, is_list, wraparound, boundscheck) \ (((size) <= sizeof(Py_ssize_t)) ? \ __Pyx_GetItemInt_List_Fast(o, i, wraparound, boundscheck) : \ __Pyx_GetItemInt_Generic(o, to_py_func(i))) static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i, int wraparound, int boundscheck); #define __Pyx_GetItemInt_Tuple(o, i, size, to_py_func, is_list, wraparound, boundscheck) \ (((size) <= sizeof(Py_ssize_t)) ? \ __Pyx_GetItemInt_Tuple_Fast(o, i, wraparound, boundscheck) : \ __Pyx_GetItemInt_Generic(o, to_py_func(i))) static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i, int wraparound, int boundscheck); static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j); static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, int is_list, int wraparound, int boundscheck); #ifndef __PYX_FORCE_INIT_THREADS #define __PYX_FORCE_INIT_THREADS 0 #endif static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name); /*proto*/ static CYTHON_INLINE void __Pyx_ExceptionSave(PyObject **type, PyObject **value, PyObject **tb); /*proto*/ static void __Pyx_ExceptionReset(PyObject *type, PyObject *value, PyObject *tb); /*proto*/ static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level); /*proto*/ static CYTHON_INLINE unsigned char __Pyx_PyInt_AsUnsignedChar(PyObject *); static CYTHON_INLINE unsigned short __Pyx_PyInt_AsUnsignedShort(PyObject *); static CYTHON_INLINE unsigned int __Pyx_PyInt_AsUnsignedInt(PyObject *); static CYTHON_INLINE char __Pyx_PyInt_AsChar(PyObject *); static CYTHON_INLINE short __Pyx_PyInt_AsShort(PyObject *); static CYTHON_INLINE int __Pyx_PyInt_AsInt(PyObject *); static CYTHON_INLINE signed char __Pyx_PyInt_AsSignedChar(PyObject *); static CYTHON_INLINE signed short __Pyx_PyInt_AsSignedShort(PyObject *); static CYTHON_INLINE signed int __Pyx_PyInt_AsSignedInt(PyObject *); static CYTHON_INLINE int __Pyx_PyInt_AsLongDouble(PyObject *); static CYTHON_INLINE unsigned long __Pyx_PyInt_AsUnsignedLong(PyObject *); static CYTHON_INLINE unsigned PY_LONG_LONG __Pyx_PyInt_AsUnsignedLongLong(PyObject *); static CYTHON_INLINE long __Pyx_PyInt_AsLong(PyObject *); static CYTHON_INLINE PY_LONG_LONG __Pyx_PyInt_AsLongLong(PyObject *); static CYTHON_INLINE signed long __Pyx_PyInt_AsSignedLong(PyObject *); static CYTHON_INLINE signed PY_LONG_LONG __Pyx_PyInt_AsSignedLongLong(PyObject *); static int __Pyx_check_binary_version(void); typedef struct { int code_line; PyCodeObject* code_object; } __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); static void __Pyx_AddTraceback(const char *funcname, int c_line, int py_line, const char *filename); /*proto*/ static int __Pyx_InitStrings(__Pyx_StringTabEntry *t); /*proto*/ /* Module declarations from 'pandas._testing' */ static PyObject *__pyx_v_6pandas_8_testing_NUMERIC_TYPES = 0; static int __pyx_f_6pandas_8_testing_is_comparable_as_number(PyObject *); /*proto*/ static int __pyx_f_6pandas_8_testing_isiterable(PyObject *); /*proto*/ static int __pyx_f_6pandas_8_testing_has_length(PyObject *); /*proto*/ static int __pyx_f_6pandas_8_testing_is_dictlike(PyObject *); /*proto*/ static int __pyx_f_6pandas_8_testing_decimal_almost_equal(double, double, int); /*proto*/ static PyObject *__pyx_f_6pandas_8_testing_assert_dict_equal(PyObject *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_6pandas_8_testing_assert_dict_equal *__pyx_optional_args); /*proto*/ static PyObject *__pyx_f_6pandas_8_testing_assert_almost_equal(PyObject *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_6pandas_8_testing_assert_almost_equal *__pyx_optional_args); /*proto*/ #define __Pyx_MODULE_NAME "pandas._testing" int __pyx_module_is_main_pandas___testing = 0; /* Implementation of 'pandas._testing' */ static PyObject *__pyx_builtin_xrange; static PyObject *__pyx_pf_6pandas_8_testing_assert_dict_equal(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_a, PyObject *__pyx_v_b, int __pyx_v_compare_keys); /* proto */ static PyObject *__pyx_pf_6pandas_8_testing_2assert_almost_equal(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_a, PyObject *__pyx_v_b, int __pyx_v_check_less_precise); /* proto */ static char __pyx_k_1[] = "Cannot compare dict objects, one or both is not dict-like"; static char __pyx_k_2[] = "%r != %r"; static char __pyx_k_3[] = "First object is iterable, second isn't: %r != %r"; static char __pyx_k_4[] = "Can't compare objects without length, one or both is invalid: (%r, %r)"; static char __pyx_k_5[] = "Length of two iterators not the same: %r != %r"; static char __pyx_k_6[] = "Second object is iterable, first isn't: %r != %r"; static char __pyx_k_7[] = "First object is null, second isn't: %r != %r"; static char __pyx_k_8[] = "First object is not null, second is null: %r != %r"; static char __pyx_k_9[] = "First object is numeric, second is not: %r != %r"; static char __pyx_k_10[] = "First object is inf, second isn't"; static char __pyx_k_11[] = "(very low values) expected %.5f but got %.5f"; static char __pyx_k_12[] = "expected %.5f but got %.5f"; static char __pyx_k_13[] = "pandas.core.common"; static char __pyx_k__a[] = "a"; static char __pyx_k__b[] = "b"; static char __pyx_k__f[] = "f"; static char __pyx_k__np[] = "np"; static char __pyx_k__bool[] = "bool"; static char __pyx_k__int8[] = "int8"; static char __pyx_k__keys[] = "keys"; static char __pyx_k__kind[] = "kind"; static char __pyx_k__dtype[] = "dtype"; static char __pyx_k__int16[] = "int16"; static char __pyx_k__int32[] = "int32"; static char __pyx_k__int64[] = "int64"; static char __pyx_k__isinf[] = "isinf"; static char __pyx_k__numpy[] = "numpy"; static char __pyx_k__range[] = "range"; static char __pyx_k__uint8[] = "uint8"; static char __pyx_k__compat[] = "compat"; static char __pyx_k__isnull[] = "isnull"; static char __pyx_k__pandas[] = "pandas"; static char __pyx_k__uint16[] = "uint16"; static char __pyx_k__uint32[] = "uint32"; static char __pyx_k__uint64[] = "uint64"; static char __pyx_k__xrange[] = "xrange"; static char __pyx_k____len__[] = "__len__"; static char __pyx_k__float16[] = "float16"; static char __pyx_k__float32[] = "float32"; static char __pyx_k__float64[] = "float64"; static char __pyx_k__ndarray[] = "ndarray"; static char __pyx_k____iter__[] = "__iter__"; static char __pyx_k____main__[] = "__main__"; static char __pyx_k____test__[] = "__test__"; static char __pyx_k__itemsize[] = "itemsize"; static char __pyx_k____import__[] = "__import__"; static char __pyx_k____getitem__[] = "__getitem__"; static char __pyx_k__array_equal[] = "array_equal"; static char __pyx_k__compare_keys[] = "compare_keys"; static char __pyx_k__string_types[] = "string_types"; static char __pyx_k__check_less_precise[] = "check_less_precise"; static PyObject *__pyx_kp_s_1; static PyObject *__pyx_kp_s_10; static PyObject *__pyx_kp_s_11; static PyObject *__pyx_kp_s_12; static PyObject *__pyx_n_s_13; static PyObject *__pyx_kp_s_2; static PyObject *__pyx_kp_s_3; static PyObject *__pyx_kp_s_4; static PyObject *__pyx_kp_s_5; static PyObject *__pyx_kp_s_6; static PyObject *__pyx_kp_s_7; static PyObject *__pyx_kp_s_8; static PyObject *__pyx_kp_s_9; static PyObject *__pyx_n_s____getitem__; static PyObject *__pyx_n_s____import__; static PyObject *__pyx_n_s____iter__; static PyObject *__pyx_n_s____len__; static PyObject *__pyx_n_s____main__; static PyObject *__pyx_n_s____test__; static PyObject *__pyx_n_s__a; static PyObject *__pyx_n_s__array_equal; static PyObject *__pyx_n_s__b; static PyObject *__pyx_n_s__bool; static PyObject *__pyx_n_s__check_less_precise; static PyObject *__pyx_n_s__compare_keys; static PyObject *__pyx_n_s__compat; static PyObject *__pyx_n_s__dtype; static PyObject *__pyx_n_s__f; static PyObject *__pyx_n_s__float16; static PyObject *__pyx_n_s__float32; static PyObject *__pyx_n_s__float64; static PyObject *__pyx_n_s__int16; static PyObject *__pyx_n_s__int32; static PyObject *__pyx_n_s__int64; static PyObject *__pyx_n_s__int8; static PyObject *__pyx_n_s__isinf; static PyObject *__pyx_n_s__isnull; static PyObject *__pyx_n_s__itemsize; static PyObject *__pyx_n_s__keys; static PyObject *__pyx_n_s__kind; static PyObject *__pyx_n_s__ndarray; static PyObject *__pyx_n_s__np; static PyObject *__pyx_n_s__numpy; static PyObject *__pyx_n_s__pandas; static PyObject *__pyx_n_s__range; static PyObject *__pyx_n_s__string_types; static PyObject *__pyx_n_s__uint16; static PyObject *__pyx_n_s__uint32; static PyObject *__pyx_n_s__uint64; static PyObject *__pyx_n_s__uint8; static PyObject *__pyx_n_s__xrange; static PyObject *__pyx_int_4; /* "pandas/src/testing.pyx":24 * ) * * cdef bint is_comparable_as_number(obj): # <<<<<<<<<<<<<< * return isinstance(obj, NUMERIC_TYPES) * */ static int __pyx_f_6pandas_8_testing_is_comparable_as_number(PyObject *__pyx_v_obj) { int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("is_comparable_as_number", 0); /* "pandas/src/testing.pyx":25 * * cdef bint is_comparable_as_number(obj): * return isinstance(obj, NUMERIC_TYPES) # <<<<<<<<<<<<<< * * cdef bint isiterable(obj): */ __pyx_t_1 = __pyx_v_6pandas_8_testing_NUMERIC_TYPES; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = PyObject_IsInstance(__pyx_v_obj, __pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 25; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_2; goto __pyx_L0; __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_WriteUnraisable("pandas._testing.is_comparable_as_number", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/testing.pyx":27 * return isinstance(obj, NUMERIC_TYPES) * * cdef bint isiterable(obj): # <<<<<<<<<<<<<< * return hasattr(obj, '__iter__') * */ static int __pyx_f_6pandas_8_testing_isiterable(PyObject *__pyx_v_obj) { int __pyx_r; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("isiterable", 0); /* "pandas/src/testing.pyx":28 * * cdef bint isiterable(obj): * return hasattr(obj, '__iter__') # <<<<<<<<<<<<<< * * cdef bint has_length(obj): */ __pyx_t_1 = PyObject_HasAttr(__pyx_v_obj, ((PyObject *)__pyx_n_s____iter__)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 28; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_t_1; goto __pyx_L0; __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_WriteUnraisable("pandas._testing.isiterable", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/testing.pyx":30 * return hasattr(obj, '__iter__') * * cdef bint has_length(obj): # <<<<<<<<<<<<<< * return hasattr(obj, '__len__') * */ static int __pyx_f_6pandas_8_testing_has_length(PyObject *__pyx_v_obj) { int __pyx_r; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("has_length", 0); /* "pandas/src/testing.pyx":31 * * cdef bint has_length(obj): * return hasattr(obj, '__len__') # <<<<<<<<<<<<<< * * cdef bint is_dictlike(obj): */ __pyx_t_1 = PyObject_HasAttr(__pyx_v_obj, ((PyObject *)__pyx_n_s____len__)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 31; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_t_1; goto __pyx_L0; __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_WriteUnraisable("pandas._testing.has_length", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/testing.pyx":33 * return hasattr(obj, '__len__') * * cdef bint is_dictlike(obj): # <<<<<<<<<<<<<< * return hasattr(obj, 'keys') and hasattr(obj, '__getitem__') * */ static int __pyx_f_6pandas_8_testing_is_dictlike(PyObject *__pyx_v_obj) { int __pyx_r; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; int __pyx_t_3; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("is_dictlike", 0); /* "pandas/src/testing.pyx":34 * * cdef bint is_dictlike(obj): * return hasattr(obj, 'keys') and hasattr(obj, '__getitem__') # <<<<<<<<<<<<<< * * cdef bint decimal_almost_equal(double desired, double actual, int decimal): */ __pyx_t_1 = PyObject_HasAttr(__pyx_v_obj, ((PyObject *)__pyx_n_s__keys)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 34; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__pyx_t_1) { __pyx_t_2 = PyObject_HasAttr(__pyx_v_obj, ((PyObject *)__pyx_n_s____getitem__)); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 34; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_3 = __pyx_t_2; } else { __pyx_t_3 = __pyx_t_1; } __pyx_r = __pyx_t_3; goto __pyx_L0; __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_WriteUnraisable("pandas._testing.is_dictlike", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/testing.pyx":36 * return hasattr(obj, 'keys') and hasattr(obj, '__getitem__') * * cdef bint decimal_almost_equal(double desired, double actual, int decimal): # <<<<<<<<<<<<<< * # Code from * # http://docs.scipy.org/doc/numpy/reference/generated */ static int __pyx_f_6pandas_8_testing_decimal_almost_equal(double __pyx_v_desired, double __pyx_v_actual, int __pyx_v_decimal) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("decimal_almost_equal", 0); /* "pandas/src/testing.pyx":40 * # http://docs.scipy.org/doc/numpy/reference/generated * # /numpy.testing.assert_almost_equal.html * return abs(desired - actual) < (0.5 * 10.0 ** -decimal) # <<<<<<<<<<<<<< * * cpdef assert_dict_equal(a, b, bint compare_keys=True): */ __pyx_r = (fabs((__pyx_v_desired - __pyx_v_actual)) < (0.5 * pow(10.0, ((double)(-__pyx_v_decimal))))); goto __pyx_L0; __pyx_r = 0; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/testing.pyx":42 * return abs(desired - actual) < (0.5 * 10.0 ** -decimal) * * cpdef assert_dict_equal(a, b, bint compare_keys=True): # <<<<<<<<<<<<<< * assert is_dictlike(a) and is_dictlike(b), ( * "Cannot compare dict objects, one or both is not dict-like" */ static PyObject *__pyx_pw_6pandas_8_testing_1assert_dict_equal(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_6pandas_8_testing_assert_dict_equal(PyObject *__pyx_v_a, PyObject *__pyx_v_b, CYTHON_UNUSED int __pyx_skip_dispatch, struct __pyx_opt_args_6pandas_8_testing_assert_dict_equal *__pyx_optional_args) { int __pyx_v_compare_keys = ((int)1); PyObject *__pyx_v_a_keys = NULL; PyObject *__pyx_v_b_keys = NULL; PyObject *__pyx_v_k = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *(*__pyx_t_6)(PyObject *); PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("assert_dict_equal", 0); if (__pyx_optional_args) { if (__pyx_optional_args->__pyx_n > 0) { __pyx_v_compare_keys = __pyx_optional_args->compare_keys; } } /* "pandas/src/testing.pyx":43 * * cpdef assert_dict_equal(a, b, bint compare_keys=True): * assert is_dictlike(a) and is_dictlike(b), ( # <<<<<<<<<<<<<< * "Cannot compare dict objects, one or both is not dict-like" * ) */ #ifndef CYTHON_WITHOUT_ASSERTIONS __pyx_t_1 = (__pyx_f_6pandas_8_testing_is_dictlike(__pyx_v_a) != 0); if (__pyx_t_1) { __pyx_t_2 = (__pyx_f_6pandas_8_testing_is_dictlike(__pyx_v_b) != 0); __pyx_t_3 = __pyx_t_2; } else { __pyx_t_3 = __pyx_t_1; } if (unlikely(!__pyx_t_3)) { PyErr_SetObject(PyExc_AssertionError, ((PyObject *)__pyx_kp_s_1)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 43; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #endif /* "pandas/src/testing.pyx":47 * ) * * a_keys = frozenset(a.keys()) # <<<<<<<<<<<<<< * b_keys = frozenset(b.keys()) * */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_a, __pyx_n_s__keys); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 47; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 47; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 47; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyObject_Call(((PyObject *)((PyObject*)(&PyFrozenSet_Type))), ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 47; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __pyx_v_a_keys = ((PyObject*)__pyx_t_5); __pyx_t_5 = 0; /* "pandas/src/testing.pyx":48 * * a_keys = frozenset(a.keys()) * b_keys = frozenset(b.keys()) # <<<<<<<<<<<<<< * * if compare_keys: */ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_b, __pyx_n_s__keys); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyObject_Call(((PyObject *)((PyObject*)(&PyFrozenSet_Type))), ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; __pyx_v_b_keys = ((PyObject*)__pyx_t_4); __pyx_t_4 = 0; /* "pandas/src/testing.pyx":50 * b_keys = frozenset(b.keys()) * * if compare_keys: # <<<<<<<<<<<<<< * assert a_keys == b_keys * */ __pyx_t_3 = (__pyx_v_compare_keys != 0); if (__pyx_t_3) { /* "pandas/src/testing.pyx":51 * * if compare_keys: * assert a_keys == b_keys # <<<<<<<<<<<<<< * * for k in a_keys: */ #ifndef CYTHON_WITHOUT_ASSERTIONS __pyx_t_4 = PyObject_RichCompare(((PyObject *)__pyx_v_a_keys), ((PyObject *)__pyx_v_b_keys), Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_3)) { PyErr_SetNone(PyExc_AssertionError); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #endif goto __pyx_L3; } __pyx_L3:; /* "pandas/src/testing.pyx":53 * assert a_keys == b_keys * * for k in a_keys: # <<<<<<<<<<<<<< * assert_almost_equal(a[k], b[k]) * */ __pyx_t_4 = PyObject_GetIter(((PyObject *)__pyx_v_a_keys)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 53; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_6 = Py_TYPE(__pyx_t_4)->tp_iternext; for (;;) { { __pyx_t_5 = __pyx_t_6(__pyx_t_4); if (unlikely(!__pyx_t_5)) { if (PyErr_Occurred()) { if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear(); else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 53; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } break; } __Pyx_GOTREF(__pyx_t_5); } __Pyx_XDECREF_SET(__pyx_v_k, __pyx_t_5); __pyx_t_5 = 0; /* "pandas/src/testing.pyx":54 * * for k in a_keys: * assert_almost_equal(a[k], b[k]) # <<<<<<<<<<<<<< * * return True */ __pyx_t_5 = PyObject_GetItem(__pyx_v_a, __pyx_v_k); if (!__pyx_t_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 54; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_7 = PyObject_GetItem(__pyx_v_b, __pyx_v_k); if (!__pyx_t_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 54; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_t_8 = __pyx_f_6pandas_8_testing_assert_almost_equal(__pyx_t_5, __pyx_t_7, 0, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 54; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "pandas/src/testing.pyx":56 * assert_almost_equal(a[k], b[k]) * * return True # <<<<<<<<<<<<<< * * cpdef assert_almost_equal(a, b, bint check_less_precise=False): */ __Pyx_XDECREF(__pyx_r); __pyx_t_4 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 56; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_AddTraceback("pandas._testing.assert_dict_equal", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_a_keys); __Pyx_XDECREF(__pyx_v_b_keys); __Pyx_XDECREF(__pyx_v_k); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_8_testing_1assert_dict_equal(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_6pandas_8_testing_1assert_dict_equal(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_a = 0; PyObject *__pyx_v_b = 0; int __pyx_v_compare_keys; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("assert_dict_equal (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__a,&__pyx_n_s__b,&__pyx_n_s__compare_keys,0}; PyObject* values[3] = {0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__a)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__b)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("assert_dict_equal", 0, 2, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 42; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__compare_keys); if (value) { values[2] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "assert_dict_equal") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 42; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_a = values[0]; __pyx_v_b = values[1]; if (values[2]) { __pyx_v_compare_keys = __Pyx_PyObject_IsTrue(values[2]); if (unlikely((__pyx_v_compare_keys == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 42; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } else { /* "pandas/src/testing.pyx":42 * return abs(desired - actual) < (0.5 * 10.0 ** -decimal) * * cpdef assert_dict_equal(a, b, bint compare_keys=True): # <<<<<<<<<<<<<< * assert is_dictlike(a) and is_dictlike(b), ( * "Cannot compare dict objects, one or both is not dict-like" */ __pyx_v_compare_keys = ((int)1); } } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("assert_dict_equal", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 42; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas._testing.assert_dict_equal", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pandas_8_testing_assert_dict_equal(__pyx_self, __pyx_v_a, __pyx_v_b, __pyx_v_compare_keys); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_8_testing_assert_dict_equal(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_a, PyObject *__pyx_v_b, int __pyx_v_compare_keys) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; struct __pyx_opt_args_6pandas_8_testing_assert_dict_equal __pyx_t_2; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("assert_dict_equal", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_2.__pyx_n = 1; __pyx_t_2.compare_keys = __pyx_v_compare_keys; __pyx_t_1 = __pyx_f_6pandas_8_testing_assert_dict_equal(__pyx_v_a, __pyx_v_b, 0, &__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 42; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas._testing.assert_dict_equal", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/testing.pyx":58 * return True * * cpdef assert_almost_equal(a, b, bint check_less_precise=False): # <<<<<<<<<<<<<< * cdef: * int decimal */ static PyObject *__pyx_pw_6pandas_8_testing_3assert_almost_equal(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_6pandas_8_testing_assert_almost_equal(PyObject *__pyx_v_a, PyObject *__pyx_v_b, CYTHON_UNUSED int __pyx_skip_dispatch, struct __pyx_opt_args_6pandas_8_testing_assert_almost_equal *__pyx_optional_args) { int __pyx_v_check_less_precise = ((int)0); int __pyx_v_decimal; Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_na; Py_ssize_t __pyx_v_nb; double __pyx_v_fa; double __pyx_v_fb; PyObject *__pyx_v_dtype_a = NULL; PyObject *__pyx_v_dtype_b = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; Py_ssize_t __pyx_t_6; Py_ssize_t __pyx_t_7; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; PyObject *__pyx_t_11 = NULL; struct __pyx_opt_args_6pandas_8_testing_assert_almost_equal __pyx_t_12; double __pyx_t_13; double __pyx_t_14; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("assert_almost_equal", 0); if (__pyx_optional_args) { if (__pyx_optional_args->__pyx_n > 0) { __pyx_v_check_less_precise = __pyx_optional_args->check_less_precise; } } /* "pandas/src/testing.pyx":64 * double fa, fb * * if isinstance(a, dict) or isinstance(b, dict): # <<<<<<<<<<<<<< * return assert_dict_equal(a, b) * */ __pyx_t_1 = PyDict_Check(__pyx_v_a); if (!(__pyx_t_1 != 0)) { __pyx_t_2 = PyDict_Check(__pyx_v_b); __pyx_t_3 = (__pyx_t_2 != 0); } else { __pyx_t_3 = (__pyx_t_1 != 0); } if (__pyx_t_3) { /* "pandas/src/testing.pyx":65 * * if isinstance(a, dict) or isinstance(b, dict): * return assert_dict_equal(a, b) # <<<<<<<<<<<<<< * * if (isinstance(a, compat.string_types) or */ __Pyx_XDECREF(__pyx_r); __pyx_t_4 = __pyx_f_6pandas_8_testing_assert_dict_equal(__pyx_v_a, __pyx_v_b, 0, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 65; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; goto __pyx_L3; } __pyx_L3:; /* "pandas/src/testing.pyx":67 * return assert_dict_equal(a, b) * * if (isinstance(a, compat.string_types) or # <<<<<<<<<<<<<< * isinstance(b, compat.string_types)): * assert a == b, "%r != %r" % (a, b) */ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s__compat); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 67; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s__string_types); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 67; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_3 = PyObject_IsInstance(__pyx_v_a, __pyx_t_5); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 67; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (!(__pyx_t_3 != 0)) { /* "pandas/src/testing.pyx":68 * * if (isinstance(a, compat.string_types) or * isinstance(b, compat.string_types)): # <<<<<<<<<<<<<< * assert a == b, "%r != %r" % (a, b) * return True */ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s__compat); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 68; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s__string_types); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 68; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_1 = PyObject_IsInstance(__pyx_v_b, __pyx_t_4); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 68; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_2 = (__pyx_t_1 != 0); } else { __pyx_t_2 = (__pyx_t_3 != 0); } if (__pyx_t_2) { /* "pandas/src/testing.pyx":69 * if (isinstance(a, compat.string_types) or * isinstance(b, compat.string_types)): * assert a == b, "%r != %r" % (a, b) # <<<<<<<<<<<<<< * return True * */ #ifndef CYTHON_WITHOUT_ASSERTIONS __pyx_t_4 = PyObject_RichCompare(__pyx_v_a, __pyx_v_b, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_2)) { __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_v_a); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_a); __Pyx_GIVEREF(__pyx_v_a); __Pyx_INCREF(__pyx_v_b); PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_b); __Pyx_GIVEREF(__pyx_v_b); __pyx_t_5 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_2), ((PyObject *)__pyx_t_4)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_5)); __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; PyErr_SetObject(PyExc_AssertionError, ((PyObject *)__pyx_t_5)); __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #endif /* "pandas/src/testing.pyx":70 * isinstance(b, compat.string_types)): * assert a == b, "%r != %r" % (a, b) * return True # <<<<<<<<<<<<<< * * if isiterable(a): */ __Pyx_XDECREF(__pyx_r); __pyx_t_5 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_r = __pyx_t_5; __pyx_t_5 = 0; goto __pyx_L0; goto __pyx_L4; } __pyx_L4:; /* "pandas/src/testing.pyx":72 * return True * * if isiterable(a): # <<<<<<<<<<<<<< * assert isiterable(b), ( * "First object is iterable, second isn't: %r != %r" % (a, b) */ __pyx_t_2 = (__pyx_f_6pandas_8_testing_isiterable(__pyx_v_a) != 0); if (__pyx_t_2) { /* "pandas/src/testing.pyx":73 * * if isiterable(a): * assert isiterable(b), ( # <<<<<<<<<<<<<< * "First object is iterable, second isn't: %r != %r" % (a, b) * ) */ #ifndef CYTHON_WITHOUT_ASSERTIONS if (unlikely(!(__pyx_f_6pandas_8_testing_isiterable(__pyx_v_b) != 0))) { /* "pandas/src/testing.pyx":74 * if isiterable(a): * assert isiterable(b), ( * "First object is iterable, second isn't: %r != %r" % (a, b) # <<<<<<<<<<<<<< * ) * assert has_length(a) and has_length(b), ( */ __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 74; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_v_a); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_a); __Pyx_GIVEREF(__pyx_v_a); __Pyx_INCREF(__pyx_v_b); PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_v_b); __Pyx_GIVEREF(__pyx_v_b); __pyx_t_4 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_3), ((PyObject *)__pyx_t_5)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 74; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_4)); __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; PyErr_SetObject(PyExc_AssertionError, ((PyObject *)__pyx_t_4)); __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 73; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #endif /* "pandas/src/testing.pyx":76 * "First object is iterable, second isn't: %r != %r" % (a, b) * ) * assert has_length(a) and has_length(b), ( # <<<<<<<<<<<<<< * "Can't compare objects without length, one or both is invalid: " * "(%r, %r)" % (a, b) */ #ifndef CYTHON_WITHOUT_ASSERTIONS __pyx_t_2 = (__pyx_f_6pandas_8_testing_has_length(__pyx_v_a) != 0); if (__pyx_t_2) { __pyx_t_3 = (__pyx_f_6pandas_8_testing_has_length(__pyx_v_b) != 0); __pyx_t_1 = __pyx_t_3; } else { __pyx_t_1 = __pyx_t_2; } if (unlikely(!__pyx_t_1)) { /* "pandas/src/testing.pyx":78 * assert has_length(a) and has_length(b), ( * "Can't compare objects without length, one or both is invalid: " * "(%r, %r)" % (a, b) # <<<<<<<<<<<<<< * ) * */ __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 78; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_v_a); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_a); __Pyx_GIVEREF(__pyx_v_a); __Pyx_INCREF(__pyx_v_b); PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_b); __Pyx_GIVEREF(__pyx_v_b); __pyx_t_5 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_4), ((PyObject *)__pyx_t_4)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 78; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_5)); __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; PyErr_SetObject(PyExc_AssertionError, ((PyObject *)__pyx_t_5)); __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 76; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #endif /* "pandas/src/testing.pyx":81 * ) * * na, nb = len(a), len(b) # <<<<<<<<<<<<<< * assert na == nb, ( * "Length of two iterators not the same: %r != %r" % (na, nb) */ __pyx_t_6 = PyObject_Length(__pyx_v_a); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_7 = PyObject_Length(__pyx_v_b); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_na = __pyx_t_6; __pyx_v_nb = __pyx_t_7; /* "pandas/src/testing.pyx":82 * * na, nb = len(a), len(b) * assert na == nb, ( # <<<<<<<<<<<<<< * "Length of two iterators not the same: %r != %r" % (na, nb) * ) */ #ifndef CYTHON_WITHOUT_ASSERTIONS if (unlikely(!((__pyx_v_na == __pyx_v_nb) != 0))) { /* "pandas/src/testing.pyx":83 * na, nb = len(a), len(b) * assert na == nb, ( * "Length of two iterators not the same: %r != %r" % (na, nb) # <<<<<<<<<<<<<< * ) * if isinstance(a, np.ndarray) and isinstance(b, np.ndarray): */ __pyx_t_5 = PyInt_FromSsize_t(__pyx_v_na); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = PyInt_FromSsize_t(__pyx_v_nb); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_5 = 0; __pyx_t_4 = 0; __pyx_t_4 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_5), ((PyObject *)__pyx_t_8)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_4)); __Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0; PyErr_SetObject(PyExc_AssertionError, ((PyObject *)__pyx_t_4)); __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #endif /* "pandas/src/testing.pyx":85 * "Length of two iterators not the same: %r != %r" % (na, nb) * ) * if isinstance(a, np.ndarray) and isinstance(b, np.ndarray): # <<<<<<<<<<<<<< * try: * if np.array_equal(a, b): */ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s__ndarray); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_1 = PyObject_IsInstance(__pyx_v_a, __pyx_t_8); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if ((__pyx_t_1 != 0)) { __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s__ndarray); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_2 = PyObject_IsInstance(__pyx_v_b, __pyx_t_4); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_3 = (__pyx_t_2 != 0); } else { __pyx_t_3 = (__pyx_t_1 != 0); } if (__pyx_t_3) { /* "pandas/src/testing.pyx":86 * ) * if isinstance(a, np.ndarray) and isinstance(b, np.ndarray): * try: # <<<<<<<<<<<<<< * if np.array_equal(a, b): * return True */ { __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11); __Pyx_XGOTREF(__pyx_t_9); __Pyx_XGOTREF(__pyx_t_10); __Pyx_XGOTREF(__pyx_t_11); /*try:*/ { /* "pandas/src/testing.pyx":87 * if isinstance(a, np.ndarray) and isinstance(b, np.ndarray): * try: * if np.array_equal(a, b): # <<<<<<<<<<<<<< * return True * except: */ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 87; __pyx_clineno = __LINE__; goto __pyx_L7_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s__array_equal); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 87; __pyx_clineno = __LINE__; goto __pyx_L7_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 87; __pyx_clineno = __LINE__; goto __pyx_L7_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_v_a); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_a); __Pyx_GIVEREF(__pyx_v_a); __Pyx_INCREF(__pyx_v_b); PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_b); __Pyx_GIVEREF(__pyx_v_b); __pyx_t_5 = PyObject_Call(__pyx_t_8, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 87; __pyx_clineno = __LINE__; goto __pyx_L7_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 87; __pyx_clineno = __LINE__; goto __pyx_L7_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_3) { /* "pandas/src/testing.pyx":88 * try: * if np.array_equal(a, b): * return True # <<<<<<<<<<<<<< * except: * pass */ __Pyx_XDECREF(__pyx_r); __pyx_t_5 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L7_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_r = __pyx_t_5; __pyx_t_5 = 0; goto __pyx_L11_try_return; goto __pyx_L15; } __pyx_L15:; } __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; goto __pyx_L14_try_end; __pyx_L11_try_return:; __Pyx_XGIVEREF(__pyx_t_9); __Pyx_XGIVEREF(__pyx_t_10); __Pyx_XGIVEREF(__pyx_t_11); __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_10, __pyx_t_11); goto __pyx_L0; __pyx_L7_error:; __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; /* "pandas/src/testing.pyx":89 * if np.array_equal(a, b): * return True * except: # <<<<<<<<<<<<<< * pass * */ /*except:*/ { PyErr_Restore(0,0,0); goto __pyx_L8_exception_handled; } __pyx_L8_exception_handled:; __Pyx_XGIVEREF(__pyx_t_9); __Pyx_XGIVEREF(__pyx_t_10); __Pyx_XGIVEREF(__pyx_t_11); __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_10, __pyx_t_11); __pyx_L14_try_end:; } goto __pyx_L6; } __pyx_L6:; /* "pandas/src/testing.pyx":92 * pass * * for i in xrange(na): # <<<<<<<<<<<<<< * assert_almost_equal(a[i], b[i], check_less_precise) * */ __pyx_t_7 = __pyx_v_na; for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_7; __pyx_t_6+=1) { __pyx_v_i = __pyx_t_6; /* "pandas/src/testing.pyx":93 * * for i in xrange(na): * assert_almost_equal(a[i], b[i], check_less_precise) # <<<<<<<<<<<<<< * * return True */ __pyx_t_5 = __Pyx_GetItemInt(__pyx_v_a, __pyx_v_i, sizeof(Py_ssize_t), PyInt_FromSsize_t, 0, 1, 1); if (!__pyx_t_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 93; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_b, __pyx_v_i, sizeof(Py_ssize_t), PyInt_FromSsize_t, 0, 1, 1); if (!__pyx_t_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 93; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_12.__pyx_n = 1; __pyx_t_12.check_less_precise = __pyx_v_check_less_precise; __pyx_t_8 = __pyx_f_6pandas_8_testing_assert_almost_equal(__pyx_t_5, __pyx_t_4, 0, &__pyx_t_12); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 93; __pyx_clineno = __LINE__; goto __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_8); __pyx_t_8 = 0; } /* "pandas/src/testing.pyx":95 * assert_almost_equal(a[i], b[i], check_less_precise) * * return True # <<<<<<<<<<<<<< * elif isiterable(b): * assert False, ( */ __Pyx_XDECREF(__pyx_r); __pyx_t_8 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 95; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_r = __pyx_t_8; __pyx_t_8 = 0; goto __pyx_L0; goto __pyx_L5; } /* "pandas/src/testing.pyx":96 * * return True * elif isiterable(b): # <<<<<<<<<<<<<< * assert False, ( * "Second object is iterable, first isn't: %r != %r" % (a, b) */ __pyx_t_3 = (__pyx_f_6pandas_8_testing_isiterable(__pyx_v_b) != 0); if (__pyx_t_3) { /* "pandas/src/testing.pyx":97 * return True * elif isiterable(b): * assert False, ( # <<<<<<<<<<<<<< * "Second object is iterable, first isn't: %r != %r" % (a, b) * ) */ #ifndef CYTHON_WITHOUT_ASSERTIONS if (unlikely(!0)) { /* "pandas/src/testing.pyx":98 * elif isiterable(b): * assert False, ( * "Second object is iterable, first isn't: %r != %r" % (a, b) # <<<<<<<<<<<<<< * ) * */ __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 98; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_INCREF(__pyx_v_a); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_v_a); __Pyx_GIVEREF(__pyx_v_a); __Pyx_INCREF(__pyx_v_b); PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_v_b); __Pyx_GIVEREF(__pyx_v_b); __pyx_t_4 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_6), ((PyObject *)__pyx_t_8)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 98; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_4)); __Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0; PyErr_SetObject(PyExc_AssertionError, ((PyObject *)__pyx_t_4)); __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 97; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #endif goto __pyx_L5; } __pyx_L5:; /* "pandas/src/testing.pyx":101 * ) * * if isnull(a): # <<<<<<<<<<<<<< * assert isnull(b), ( * "First object is null, second isn't: %r != %r" % (a, b) */ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s__isnull); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 101; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 101; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_INCREF(__pyx_v_a); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_v_a); __Pyx_GIVEREF(__pyx_v_a); __pyx_t_5 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_8), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 101; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0; __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 101; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_3) { /* "pandas/src/testing.pyx":102 * * if isnull(a): * assert isnull(b), ( # <<<<<<<<<<<<<< * "First object is null, second isn't: %r != %r" % (a, b) * ) */ #ifndef CYTHON_WITHOUT_ASSERTIONS __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s__isnull); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_INCREF(__pyx_v_b); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_v_b); __Pyx_GIVEREF(__pyx_v_b); __pyx_t_4 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_8), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0; __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_3)) { /* "pandas/src/testing.pyx":103 * if isnull(a): * assert isnull(b), ( * "First object is null, second isn't: %r != %r" % (a, b) # <<<<<<<<<<<<<< * ) * return True */ __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_v_a); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_a); __Pyx_GIVEREF(__pyx_v_a); __Pyx_INCREF(__pyx_v_b); PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_b); __Pyx_GIVEREF(__pyx_v_b); __pyx_t_8 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_7), ((PyObject *)__pyx_t_4)); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_8)); __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; PyErr_SetObject(PyExc_AssertionError, ((PyObject *)__pyx_t_8)); __Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #endif /* "pandas/src/testing.pyx":105 * "First object is null, second isn't: %r != %r" % (a, b) * ) * return True # <<<<<<<<<<<<<< * elif isnull(b): * assert isnull(a), ( */ __Pyx_XDECREF(__pyx_r); __pyx_t_8 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 105; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_r = __pyx_t_8; __pyx_t_8 = 0; goto __pyx_L0; goto __pyx_L18; } /* "pandas/src/testing.pyx":106 * ) * return True * elif isnull(b): # <<<<<<<<<<<<<< * assert isnull(a), ( * "First object is not null, second is null: %r != %r" % (a, b) */ __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s__isnull); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 106; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 106; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_v_b); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_b); __Pyx_GIVEREF(__pyx_v_b); __pyx_t_5 = PyObject_Call(__pyx_t_8, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 106; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 106; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_3) { /* "pandas/src/testing.pyx":107 * return True * elif isnull(b): * assert isnull(a), ( # <<<<<<<<<<<<<< * "First object is not null, second is null: %r != %r" % (a, b) * ) */ #ifndef CYTHON_WITHOUT_ASSERTIONS __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s__isnull); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_v_a); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_a); __Pyx_GIVEREF(__pyx_v_a); __pyx_t_8 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (unlikely(!__pyx_t_3)) { /* "pandas/src/testing.pyx":108 * elif isnull(b): * assert isnull(a), ( * "First object is not null, second is null: %r != %r" % (a, b) # <<<<<<<<<<<<<< * ) * return True */ __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 108; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_INCREF(__pyx_v_a); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_v_a); __Pyx_GIVEREF(__pyx_v_a); __Pyx_INCREF(__pyx_v_b); PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_v_b); __Pyx_GIVEREF(__pyx_v_b); __pyx_t_4 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_8), ((PyObject *)__pyx_t_8)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 108; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_4)); __Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0; PyErr_SetObject(PyExc_AssertionError, ((PyObject *)__pyx_t_4)); __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #endif /* "pandas/src/testing.pyx":110 * "First object is not null, second is null: %r != %r" % (a, b) * ) * return True # <<<<<<<<<<<<<< * * if is_comparable_as_number(a): */ __Pyx_XDECREF(__pyx_r); __pyx_t_4 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 110; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; goto __pyx_L18; } __pyx_L18:; /* "pandas/src/testing.pyx":112 * return True * * if is_comparable_as_number(a): # <<<<<<<<<<<<<< * assert is_comparable_as_number(b), ( * "First object is numeric, second is not: %r != %r" % (a, b) */ __pyx_t_3 = (__pyx_f_6pandas_8_testing_is_comparable_as_number(__pyx_v_a) != 0); if (__pyx_t_3) { /* "pandas/src/testing.pyx":113 * * if is_comparable_as_number(a): * assert is_comparable_as_number(b), ( # <<<<<<<<<<<<<< * "First object is numeric, second is not: %r != %r" % (a, b) * ) */ #ifndef CYTHON_WITHOUT_ASSERTIONS if (unlikely(!(__pyx_f_6pandas_8_testing_is_comparable_as_number(__pyx_v_b) != 0))) { /* "pandas/src/testing.pyx":114 * if is_comparable_as_number(a): * assert is_comparable_as_number(b), ( * "First object is numeric, second is not: %r != %r" % (a, b) # <<<<<<<<<<<<<< * ) * */ __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 114; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_v_a); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_a); __Pyx_GIVEREF(__pyx_v_a); __Pyx_INCREF(__pyx_v_b); PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_b); __Pyx_GIVEREF(__pyx_v_b); __pyx_t_8 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_9), ((PyObject *)__pyx_t_4)); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 114; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_8)); __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; PyErr_SetObject(PyExc_AssertionError, ((PyObject *)__pyx_t_8)); __Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 113; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #endif /* "pandas/src/testing.pyx":117 * ) * * decimal = 5 # <<<<<<<<<<<<<< * * # deal with differing dtypes */ __pyx_v_decimal = 5; /* "pandas/src/testing.pyx":120 * * # deal with differing dtypes * if check_less_precise: # <<<<<<<<<<<<<< * dtype_a = np.dtype(type(a)) * dtype_b = np.dtype(type(b)) */ __pyx_t_3 = (__pyx_v_check_less_precise != 0); if (__pyx_t_3) { /* "pandas/src/testing.pyx":121 * # deal with differing dtypes * if check_less_precise: * dtype_a = np.dtype(type(a)) # <<<<<<<<<<<<<< * dtype_b = np.dtype(type(b)) * if dtype_a.kind == 'f' and dtype_b == 'f': */ __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 121; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s__dtype); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 121; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 121; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_INCREF(((PyObject *)Py_TYPE(__pyx_v_a))); PyTuple_SET_ITEM(__pyx_t_8, 0, ((PyObject *)Py_TYPE(__pyx_v_a))); __Pyx_GIVEREF(((PyObject *)Py_TYPE(__pyx_v_a))); __pyx_t_5 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_8), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 121; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0; __pyx_v_dtype_a = __pyx_t_5; __pyx_t_5 = 0; /* "pandas/src/testing.pyx":122 * if check_less_precise: * dtype_a = np.dtype(type(a)) * dtype_b = np.dtype(type(b)) # <<<<<<<<<<<<<< * if dtype_a.kind == 'f' and dtype_b == 'f': * if dtype_a.itemsize <= 4 and dtype_b.itemsize <= 4: */ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 122; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s__dtype); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 122; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 122; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(((PyObject *)Py_TYPE(__pyx_v_b))); PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)Py_TYPE(__pyx_v_b))); __Pyx_GIVEREF(((PyObject *)Py_TYPE(__pyx_v_b))); __pyx_t_4 = PyObject_Call(__pyx_t_8, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 122; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; __pyx_v_dtype_b = __pyx_t_4; __pyx_t_4 = 0; /* "pandas/src/testing.pyx":123 * dtype_a = np.dtype(type(a)) * dtype_b = np.dtype(type(b)) * if dtype_a.kind == 'f' and dtype_b == 'f': # <<<<<<<<<<<<<< * if dtype_a.itemsize <= 4 and dtype_b.itemsize <= 4: * decimal = 3 */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_dtype_a, __pyx_n_s__kind); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 123; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = PyObject_RichCompare(__pyx_t_4, ((PyObject *)__pyx_n_s__f), Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 123; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 123; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_3) { __pyx_t_5 = PyObject_RichCompare(__pyx_v_dtype_b, ((PyObject *)__pyx_n_s__f), Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 123; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 123; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_2 = __pyx_t_1; } else { __pyx_t_2 = __pyx_t_3; } if (__pyx_t_2) { /* "pandas/src/testing.pyx":124 * dtype_b = np.dtype(type(b)) * if dtype_a.kind == 'f' and dtype_b == 'f': * if dtype_a.itemsize <= 4 and dtype_b.itemsize <= 4: # <<<<<<<<<<<<<< * decimal = 3 * */ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_dtype_a, __pyx_n_s__itemsize); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 124; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = PyObject_RichCompare(__pyx_t_5, __pyx_int_4, Py_LE); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 124; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 124; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_2) { __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_dtype_b, __pyx_n_s__itemsize); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 124; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = PyObject_RichCompare(__pyx_t_4, __pyx_int_4, Py_LE); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 124; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 124; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_1 = __pyx_t_3; } else { __pyx_t_1 = __pyx_t_2; } if (__pyx_t_1) { /* "pandas/src/testing.pyx":125 * if dtype_a.kind == 'f' and dtype_b == 'f': * if dtype_a.itemsize <= 4 and dtype_b.itemsize <= 4: * decimal = 3 # <<<<<<<<<<<<<< * * if np.isinf(a): */ __pyx_v_decimal = 3; goto __pyx_L22; } __pyx_L22:; goto __pyx_L21; } __pyx_L21:; goto __pyx_L20; } __pyx_L20:; /* "pandas/src/testing.pyx":127 * decimal = 3 * * if np.isinf(a): # <<<<<<<<<<<<<< * assert np.isinf(b), "First object is inf, second isn't" * else: */ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 127; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s__isinf); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 127; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 127; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_v_a); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_a); __Pyx_GIVEREF(__pyx_v_a); __pyx_t_8 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 127; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 127; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (__pyx_t_1) { /* "pandas/src/testing.pyx":128 * * if np.isinf(a): * assert np.isinf(b), "First object is inf, second isn't" # <<<<<<<<<<<<<< * else: * fa, fb = a, b */ #ifndef CYTHON_WITHOUT_ASSERTIONS __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s__isinf); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_INCREF(__pyx_v_b); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_v_b); __Pyx_GIVEREF(__pyx_v_b); __pyx_t_4 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_8), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0; __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_1)) { PyErr_SetObject(PyExc_AssertionError, ((PyObject *)__pyx_kp_s_10)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #endif goto __pyx_L23; } /*else*/ { /* "pandas/src/testing.pyx":130 * assert np.isinf(b), "First object is inf, second isn't" * else: * fa, fb = a, b # <<<<<<<<<<<<<< * * # case for zero */ __pyx_t_13 = __pyx_PyFloat_AsDouble(__pyx_v_a); if (unlikely((__pyx_t_13 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 130; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_14 = __pyx_PyFloat_AsDouble(__pyx_v_b); if (unlikely((__pyx_t_14 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 130; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_fa = __pyx_t_13; __pyx_v_fb = __pyx_t_14; /* "pandas/src/testing.pyx":133 * * # case for zero * if abs(fa) < 1e-5: # <<<<<<<<<<<<<< * if not decimal_almost_equal(fa, fb, decimal): * assert False, ( */ __pyx_t_1 = ((fabs(__pyx_v_fa) < 1e-5) != 0); if (__pyx_t_1) { /* "pandas/src/testing.pyx":134 * # case for zero * if abs(fa) < 1e-5: * if not decimal_almost_equal(fa, fb, decimal): # <<<<<<<<<<<<<< * assert False, ( * '(very low values) expected %.5f but got %.5f' % (b, a) */ __pyx_t_1 = ((!(__pyx_f_6pandas_8_testing_decimal_almost_equal(__pyx_v_fa, __pyx_v_fb, __pyx_v_decimal) != 0)) != 0); if (__pyx_t_1) { /* "pandas/src/testing.pyx":135 * if abs(fa) < 1e-5: * if not decimal_almost_equal(fa, fb, decimal): * assert False, ( # <<<<<<<<<<<<<< * '(very low values) expected %.5f but got %.5f' % (b, a) * ) */ #ifndef CYTHON_WITHOUT_ASSERTIONS if (unlikely(!0)) { /* "pandas/src/testing.pyx":136 * if not decimal_almost_equal(fa, fb, decimal): * assert False, ( * '(very low values) expected %.5f but got %.5f' % (b, a) # <<<<<<<<<<<<<< * ) * else: */ __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 136; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_v_b); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_b); __Pyx_GIVEREF(__pyx_v_b); __Pyx_INCREF(__pyx_v_a); PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_a); __Pyx_GIVEREF(__pyx_v_a); __pyx_t_8 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_11), ((PyObject *)__pyx_t_4)); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 136; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_8)); __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; PyErr_SetObject(PyExc_AssertionError, ((PyObject *)__pyx_t_8)); __Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 135; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #endif goto __pyx_L25; } __pyx_L25:; goto __pyx_L24; } /*else*/ { /* "pandas/src/testing.pyx":139 * ) * else: * if not decimal_almost_equal(1, fb / fa, decimal): # <<<<<<<<<<<<<< * assert False, 'expected %.5f but got %.5f' % (b, a) * */ if (unlikely(__pyx_v_fa == 0)) { #ifdef WITH_THREAD PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure(); #endif PyErr_Format(PyExc_ZeroDivisionError, "float division"); #ifdef WITH_THREAD PyGILState_Release(__pyx_gilstate_save); #endif {__pyx_filename = __pyx_f[0]; __pyx_lineno = 139; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_1 = ((!(__pyx_f_6pandas_8_testing_decimal_almost_equal(1.0, (__pyx_v_fb / __pyx_v_fa), __pyx_v_decimal) != 0)) != 0); if (__pyx_t_1) { /* "pandas/src/testing.pyx":140 * else: * if not decimal_almost_equal(1, fb / fa, decimal): * assert False, 'expected %.5f but got %.5f' % (b, a) # <<<<<<<<<<<<<< * * else: */ #ifndef CYTHON_WITHOUT_ASSERTIONS if (unlikely(!0)) { __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 140; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_INCREF(__pyx_v_b); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_v_b); __Pyx_GIVEREF(__pyx_v_b); __Pyx_INCREF(__pyx_v_a); PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_v_a); __Pyx_GIVEREF(__pyx_v_a); __pyx_t_4 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_12), ((PyObject *)__pyx_t_8)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 140; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_4)); __Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0; PyErr_SetObject(PyExc_AssertionError, ((PyObject *)__pyx_t_4)); __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 140; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #endif goto __pyx_L26; } __pyx_L26:; } __pyx_L24:; } __pyx_L23:; goto __pyx_L19; } /*else*/ { /* "pandas/src/testing.pyx":143 * * else: * assert a == b, "%r != %r" % (a, b) # <<<<<<<<<<<<<< * * return True */ #ifndef CYTHON_WITHOUT_ASSERTIONS __pyx_t_4 = PyObject_RichCompare(__pyx_v_a, __pyx_v_b, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 143; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 143; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_1)) { __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 143; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_v_a); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_a); __Pyx_GIVEREF(__pyx_v_a); __Pyx_INCREF(__pyx_v_b); PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_b); __Pyx_GIVEREF(__pyx_v_b); __pyx_t_8 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_2), ((PyObject *)__pyx_t_4)); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 143; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_8)); __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; PyErr_SetObject(PyExc_AssertionError, ((PyObject *)__pyx_t_8)); __Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 143; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #endif } __pyx_L19:; /* "pandas/src/testing.pyx":145 * assert a == b, "%r != %r" % (a, b) * * return True # <<<<<<<<<<<<<< */ __Pyx_XDECREF(__pyx_r); __pyx_t_8 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 145; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_r = __pyx_t_8; __pyx_t_8 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_8); __Pyx_AddTraceback("pandas._testing.assert_almost_equal", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_dtype_a); __Pyx_XDECREF(__pyx_v_dtype_b); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_8_testing_3assert_almost_equal(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_6pandas_8_testing_3assert_almost_equal(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_a = 0; PyObject *__pyx_v_b = 0; int __pyx_v_check_less_precise; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("assert_almost_equal (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__a,&__pyx_n_s__b,&__pyx_n_s__check_less_precise,0}; PyObject* values[3] = {0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__a)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__b)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("assert_almost_equal", 0, 2, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 58; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__check_less_precise); if (value) { values[2] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "assert_almost_equal") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 58; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_a = values[0]; __pyx_v_b = values[1]; if (values[2]) { __pyx_v_check_less_precise = __Pyx_PyObject_IsTrue(values[2]); if (unlikely((__pyx_v_check_less_precise == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 58; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } else { /* "pandas/src/testing.pyx":58 * return True * * cpdef assert_almost_equal(a, b, bint check_less_precise=False): # <<<<<<<<<<<<<< * cdef: * int decimal */ __pyx_v_check_less_precise = ((int)0); } } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("assert_almost_equal", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 58; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas._testing.assert_almost_equal", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pandas_8_testing_2assert_almost_equal(__pyx_self, __pyx_v_a, __pyx_v_b, __pyx_v_check_less_precise); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_8_testing_2assert_almost_equal(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_a, PyObject *__pyx_v_b, int __pyx_v_check_less_precise) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; struct __pyx_opt_args_6pandas_8_testing_assert_almost_equal __pyx_t_2; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("assert_almost_equal", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_2.__pyx_n = 1; __pyx_t_2.check_less_precise = __pyx_v_check_less_precise; __pyx_t_1 = __pyx_f_6pandas_8_testing_assert_almost_equal(__pyx_v_a, __pyx_v_b, 0, &__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 58; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas._testing.assert_almost_equal", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyMethodDef __pyx_methods[] = { {__Pyx_NAMESTR("assert_dict_equal"), (PyCFunction)__pyx_pw_6pandas_8_testing_1assert_dict_equal, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}, {__Pyx_NAMESTR("assert_almost_equal"), (PyCFunction)__pyx_pw_6pandas_8_testing_3assert_almost_equal, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}, {0, 0, 0, 0} }; #if PY_MAJOR_VERSION >= 3 static struct PyModuleDef __pyx_moduledef = { #if PY_VERSION_HEX < 0x03020000 { PyObject_HEAD_INIT(NULL) NULL, 0, NULL }, #else PyModuleDef_HEAD_INIT, #endif __Pyx_NAMESTR("_testing"), 0, /* m_doc */ -1, /* m_size */ __pyx_methods /* m_methods */, NULL, /* m_reload */ NULL, /* m_traverse */ NULL, /* m_clear */ NULL /* m_free */ }; #endif static __Pyx_StringTabEntry __pyx_string_tab[] = { {&__pyx_kp_s_1, __pyx_k_1, sizeof(__pyx_k_1), 0, 0, 1, 0}, {&__pyx_kp_s_10, __pyx_k_10, sizeof(__pyx_k_10), 0, 0, 1, 0}, {&__pyx_kp_s_11, __pyx_k_11, sizeof(__pyx_k_11), 0, 0, 1, 0}, {&__pyx_kp_s_12, __pyx_k_12, sizeof(__pyx_k_12), 0, 0, 1, 0}, {&__pyx_n_s_13, __pyx_k_13, sizeof(__pyx_k_13), 0, 0, 1, 1}, {&__pyx_kp_s_2, __pyx_k_2, sizeof(__pyx_k_2), 0, 0, 1, 0}, {&__pyx_kp_s_3, __pyx_k_3, sizeof(__pyx_k_3), 0, 0, 1, 0}, {&__pyx_kp_s_4, __pyx_k_4, sizeof(__pyx_k_4), 0, 0, 1, 0}, {&__pyx_kp_s_5, __pyx_k_5, sizeof(__pyx_k_5), 0, 0, 1, 0}, {&__pyx_kp_s_6, __pyx_k_6, sizeof(__pyx_k_6), 0, 0, 1, 0}, {&__pyx_kp_s_7, __pyx_k_7, sizeof(__pyx_k_7), 0, 0, 1, 0}, {&__pyx_kp_s_8, __pyx_k_8, sizeof(__pyx_k_8), 0, 0, 1, 0}, {&__pyx_kp_s_9, __pyx_k_9, sizeof(__pyx_k_9), 0, 0, 1, 0}, {&__pyx_n_s____getitem__, __pyx_k____getitem__, sizeof(__pyx_k____getitem__), 0, 0, 1, 1}, {&__pyx_n_s____import__, __pyx_k____import__, sizeof(__pyx_k____import__), 0, 0, 1, 1}, {&__pyx_n_s____iter__, __pyx_k____iter__, sizeof(__pyx_k____iter__), 0, 0, 1, 1}, {&__pyx_n_s____len__, __pyx_k____len__, sizeof(__pyx_k____len__), 0, 0, 1, 1}, {&__pyx_n_s____main__, __pyx_k____main__, sizeof(__pyx_k____main__), 0, 0, 1, 1}, {&__pyx_n_s____test__, __pyx_k____test__, sizeof(__pyx_k____test__), 0, 0, 1, 1}, {&__pyx_n_s__a, __pyx_k__a, sizeof(__pyx_k__a), 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__b, __pyx_k__b, sizeof(__pyx_k__b), 0, 0, 1, 1}, {&__pyx_n_s__bool, __pyx_k__bool, sizeof(__pyx_k__bool), 0, 0, 1, 1}, {&__pyx_n_s__check_less_precise, __pyx_k__check_less_precise, sizeof(__pyx_k__check_less_precise), 0, 0, 1, 1}, {&__pyx_n_s__compare_keys, __pyx_k__compare_keys, sizeof(__pyx_k__compare_keys), 0, 0, 1, 1}, {&__pyx_n_s__compat, __pyx_k__compat, sizeof(__pyx_k__compat), 0, 0, 1, 1}, {&__pyx_n_s__dtype, __pyx_k__dtype, sizeof(__pyx_k__dtype), 0, 0, 1, 1}, {&__pyx_n_s__f, __pyx_k__f, sizeof(__pyx_k__f), 0, 0, 1, 1}, {&__pyx_n_s__float16, __pyx_k__float16, sizeof(__pyx_k__float16), 0, 0, 1, 1}, {&__pyx_n_s__float32, __pyx_k__float32, sizeof(__pyx_k__float32), 0, 0, 1, 1}, {&__pyx_n_s__float64, __pyx_k__float64, sizeof(__pyx_k__float64), 0, 0, 1, 1}, {&__pyx_n_s__int16, __pyx_k__int16, sizeof(__pyx_k__int16), 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__isinf, __pyx_k__isinf, sizeof(__pyx_k__isinf), 0, 0, 1, 1}, {&__pyx_n_s__isnull, __pyx_k__isnull, sizeof(__pyx_k__isnull), 0, 0, 1, 1}, {&__pyx_n_s__itemsize, __pyx_k__itemsize, sizeof(__pyx_k__itemsize), 0, 0, 1, 1}, {&__pyx_n_s__keys, __pyx_k__keys, sizeof(__pyx_k__keys), 0, 0, 1, 1}, {&__pyx_n_s__kind, __pyx_k__kind, sizeof(__pyx_k__kind), 0, 0, 1, 1}, {&__pyx_n_s__ndarray, __pyx_k__ndarray, sizeof(__pyx_k__ndarray), 0, 0, 1, 1}, {&__pyx_n_s__np, __pyx_k__np, sizeof(__pyx_k__np), 0, 0, 1, 1}, {&__pyx_n_s__numpy, __pyx_k__numpy, sizeof(__pyx_k__numpy), 0, 0, 1, 1}, {&__pyx_n_s__pandas, __pyx_k__pandas, sizeof(__pyx_k__pandas), 0, 0, 1, 1}, {&__pyx_n_s__range, __pyx_k__range, sizeof(__pyx_k__range), 0, 0, 1, 1}, {&__pyx_n_s__string_types, __pyx_k__string_types, sizeof(__pyx_k__string_types), 0, 0, 1, 1}, {&__pyx_n_s__uint16, __pyx_k__uint16, sizeof(__pyx_k__uint16), 0, 0, 1, 1}, {&__pyx_n_s__uint32, __pyx_k__uint32, sizeof(__pyx_k__uint32), 0, 0, 1, 1}, {&__pyx_n_s__uint64, __pyx_k__uint64, sizeof(__pyx_k__uint64), 0, 0, 1, 1}, {&__pyx_n_s__uint8, __pyx_k__uint8, sizeof(__pyx_k__uint8), 0, 0, 1, 1}, {&__pyx_n_s__xrange, __pyx_k__xrange, sizeof(__pyx_k__xrange), 0, 0, 1, 1}, {0, 0, 0, 0, 0, 0, 0} }; static int __Pyx_InitCachedBuiltins(void) { #if PY_MAJOR_VERSION >= 3 __pyx_builtin_xrange = __Pyx_GetBuiltinName(__pyx_n_s__range); if (!__pyx_builtin_xrange) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 92; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_builtin_xrange = __Pyx_GetBuiltinName(__pyx_n_s__xrange); if (!__pyx_builtin_xrange) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 92; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif return 0; __pyx_L1_error:; return -1; } static int __Pyx_InitCachedConstants(void) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0); __Pyx_RefNannyFinishContext(); return 0; } static int __Pyx_InitGlobals(void) { if (__Pyx_InitStrings(__pyx_string_tab) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __pyx_int_4 = PyInt_FromLong(4); if (unlikely(!__pyx_int_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; return 0; __pyx_L1_error:; return -1; } #if PY_MAJOR_VERSION < 3 PyMODINIT_FUNC init_testing(void); /*proto*/ PyMODINIT_FUNC init_testing(void) #else PyMODINIT_FUNC PyInit__testing(void); /*proto*/ PyMODINIT_FUNC PyInit__testing(void) #endif { PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; PyObject *__pyx_t_11 = NULL; PyObject *__pyx_t_12 = NULL; PyObject *__pyx_t_13 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannyDeclarations #if CYTHON_REFNANNY __Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny"); if (!__Pyx_RefNanny) { PyErr_Clear(); __Pyx_RefNanny = __Pyx_RefNannyImportAPI("Cython.Runtime.refnanny"); if (!__Pyx_RefNanny) Py_FatalError("failed to import 'refnanny' module"); } #endif __Pyx_RefNannySetupContext("PyMODINIT_FUNC PyInit__testing(void)", 0); if ( __Pyx_check_binary_version() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_empty_tuple)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_bytes)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #ifdef __Pyx_CyFunction_USED if (__Pyx_CyFunction_init() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif #ifdef __Pyx_FusedFunction_USED if (__pyx_FusedFunction_init() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif #ifdef __Pyx_Generator_USED if (__pyx_Generator_init() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif /*--- Library function declarations ---*/ /*--- Threads initialization code ---*/ #if defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS #ifdef WITH_THREAD /* Python build with threading support? */ PyEval_InitThreads(); #endif #endif /*--- Module creation code ---*/ #if PY_MAJOR_VERSION < 3 __pyx_m = Py_InitModule4(__Pyx_NAMESTR("_testing"), __pyx_methods, 0, 0, PYTHON_API_VERSION); Py_XINCREF(__pyx_m); #else __pyx_m = PyModule_Create(&__pyx_moduledef); #endif if (unlikely(!__pyx_m)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_d)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} Py_INCREF(__pyx_d); #if PY_MAJOR_VERSION >= 3 { PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (!PyDict_GetItemString(modules, "pandas._testing")) { if (unlikely(PyDict_SetItemString(modules, "pandas._testing", __pyx_m) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } } #endif __pyx_b = PyImport_AddModule(__Pyx_NAMESTR(__Pyx_BUILTIN_MODULE_NAME)); if (unlikely(!__pyx_b)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #if CYTHON_COMPILING_IN_PYPY Py_INCREF(__pyx_b); #endif if (__Pyx_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; /*--- Initialize various global constants etc. ---*/ if (unlikely(__Pyx_InitGlobals() < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif if (__pyx_module_is_main_pandas___testing) { if (__Pyx_SetAttrString(__pyx_m, "__name__", __pyx_n_s____main__) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; } /*--- Builtin init code ---*/ if (unlikely(__Pyx_InitCachedBuiltins() < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /*--- Constants init code ---*/ if (unlikely(__Pyx_InitCachedConstants() < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /*--- Global init code ---*/ __pyx_v_6pandas_8_testing_NUMERIC_TYPES = Py_None; Py_INCREF(Py_None); /*--- Variable export code ---*/ /*--- Function export code ---*/ /*--- Type init code ---*/ /*--- Type import code ---*/ /*--- Variable import code ---*/ /*--- Function import code ---*/ /*--- Execution code ---*/ /* "pandas/src/testing.pyx":1 * import numpy as np # <<<<<<<<<<<<<< * * from pandas import compat */ __pyx_t_1 = __Pyx_Import(((PyObject *)__pyx_n_s__numpy), 0, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s__np, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/testing.pyx":3 * import numpy as np * * from pandas import compat # <<<<<<<<<<<<<< * from pandas.core.common import isnull * */ __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)__pyx_n_s__compat)); PyList_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_n_s__compat)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__compat)); __pyx_t_2 = __Pyx_Import(((PyObject *)__pyx_n_s__pandas), ((PyObject *)__pyx_t_1), -1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s__compat); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s__compat, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/testing.pyx":4 * * from pandas import compat * from pandas.core.common import isnull # <<<<<<<<<<<<<< * * cdef NUMERIC_TYPES = ( */ __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(((PyObject *)__pyx_n_s__isnull)); PyList_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_n_s__isnull)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__isnull)); __pyx_t_1 = __Pyx_Import(((PyObject *)__pyx_n_s_13), ((PyObject *)__pyx_t_2), -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s__isnull); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s__isnull, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/testing.pyx":10 * int, * float, * np.bool, # <<<<<<<<<<<<<< * np.int8, * np.int16, */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 10; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s__bool); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 10; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/testing.pyx":11 * float, * np.bool, * np.int8, # <<<<<<<<<<<<<< * np.int16, * np.int32, */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 11; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s__int8); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 11; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/testing.pyx":12 * np.bool, * np.int8, * np.int16, # <<<<<<<<<<<<<< * np.int32, * np.int64, */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 12; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s__int16); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 12; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/testing.pyx":13 * np.int8, * np.int16, * np.int32, # <<<<<<<<<<<<<< * np.int64, * np.uint8, */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 13; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 13; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/testing.pyx":14 * np.int16, * np.int32, * np.int64, # <<<<<<<<<<<<<< * np.uint8, * np.uint16, */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 14; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s__int64); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 14; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/testing.pyx":15 * np.int32, * np.int64, * np.uint8, # <<<<<<<<<<<<<< * np.uint16, * np.uint32, */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 15; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s__uint8); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 15; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/testing.pyx":16 * np.int64, * np.uint8, * np.uint16, # <<<<<<<<<<<<<< * np.uint32, * np.uint64, */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 16; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s__uint16); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 16; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/testing.pyx":17 * np.uint8, * np.uint16, * np.uint32, # <<<<<<<<<<<<<< * np.uint64, * np.float16, */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 17; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s__uint32); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 17; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/testing.pyx":18 * np.uint16, * np.uint32, * np.uint64, # <<<<<<<<<<<<<< * np.float16, * np.float32, */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 18; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s__uint64); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 18; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/testing.pyx":19 * np.uint32, * np.uint64, * np.float16, # <<<<<<<<<<<<<< * np.float32, * np.float64, */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 19; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s__float16); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 19; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/testing.pyx":20 * np.uint64, * np.float16, * np.float32, # <<<<<<<<<<<<<< * np.float64, * ) */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 20; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s__float32); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 20; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/testing.pyx":21 * np.float16, * np.float32, * np.float64, # <<<<<<<<<<<<<< * ) * */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 21; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s__float64); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 21; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyTuple_New(15); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 7; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject*)&PyBool_Type)); PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject*)&PyBool_Type)); __Pyx_GIVEREF(((PyObject*)&PyBool_Type)); __Pyx_INCREF(((PyObject *)((PyObject*)(&PyInt_Type)))); PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject *)((PyObject*)(&PyInt_Type)))); __Pyx_GIVEREF(((PyObject *)((PyObject*)(&PyInt_Type)))); __Pyx_INCREF(((PyObject *)((PyObject*)(&PyFloat_Type)))); PyTuple_SET_ITEM(__pyx_t_1, 2, ((PyObject *)((PyObject*)(&PyFloat_Type)))); __Pyx_GIVEREF(((PyObject *)((PyObject*)(&PyFloat_Type)))); PyTuple_SET_ITEM(__pyx_t_1, 3, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_1, 4, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_1, 5, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_1, 6, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_1, 7, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_1, 8, __pyx_t_7); __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_1, 9, __pyx_t_8); __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_1, 10, __pyx_t_9); __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_1, 11, __pyx_t_10); __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_1, 12, __pyx_t_11); __Pyx_GIVEREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_1, 13, __pyx_t_12); __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_1, 14, __pyx_t_13); __Pyx_GIVEREF(__pyx_t_13); __pyx_t_2 = 0; __pyx_t_3 = 0; __pyx_t_4 = 0; __pyx_t_5 = 0; __pyx_t_6 = 0; __pyx_t_7 = 0; __pyx_t_8 = 0; __pyx_t_9 = 0; __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __Pyx_XGOTREF(__pyx_v_6pandas_8_testing_NUMERIC_TYPES); __Pyx_DECREF_SET(__pyx_v_6pandas_8_testing_NUMERIC_TYPES, ((PyObject *)__pyx_t_1)); __Pyx_GIVEREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; /* "pandas/src/testing.pyx":1 * import numpy as np # <<<<<<<<<<<<<< * * from pandas import compat */ __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_1)); if (PyDict_SetItem(__pyx_d, __pyx_n_s____test__, ((PyObject *)__pyx_t_1)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 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_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); __Pyx_XDECREF(__pyx_t_10); __Pyx_XDECREF(__pyx_t_11); __Pyx_XDECREF(__pyx_t_12); __Pyx_XDECREF(__pyx_t_13); if (__pyx_m) { __Pyx_AddTraceback("init pandas._testing", __pyx_clineno, __pyx_lineno, __pyx_filename); Py_DECREF(__pyx_m); __pyx_m = 0; } else if (!PyErr_Occurred()) { PyErr_SetString(PyExc_ImportError, "init pandas._testing"); } __pyx_L0:; __Pyx_RefNannyFinishContext(); #if PY_MAJOR_VERSION < 3 return; #else return __pyx_m; #endif } /* Runtime support code */ #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 /* CYTHON_REFNANNY */ 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 '%s' is not defined", PyString_AS_STRING(name)); #endif } return result; } static CYTHON_INLINE void __Pyx_ErrRestore(PyObject *type, PyObject *value, PyObject *tb) { #if CYTHON_COMPILING_IN_CPYTHON PyObject *tmp_type, *tmp_value, *tmp_tb; PyThreadState *tstate = PyThreadState_GET(); 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); #else PyErr_Restore(type, value, tb); #endif } static CYTHON_INLINE void __Pyx_ErrFetch(PyObject **type, PyObject **value, PyObject **tb) { #if CYTHON_COMPILING_IN_CPYTHON PyThreadState *tstate = PyThreadState_GET(); *type = tstate->curexc_type; *value = tstate->curexc_value; *tb = tstate->curexc_traceback; tstate->curexc_type = 0; tstate->curexc_value = 0; tstate->curexc_traceback = 0; #else PyErr_Fetch(type, value, tb); #endif } static void __Pyx_WriteUnraisable(const char *name, CYTHON_UNUSED int clineno, CYTHON_UNUSED int lineno, CYTHON_UNUSED const char *filename) { PyObject *old_exc, *old_val, *old_tb; PyObject *ctx; __Pyx_ErrFetch(&old_exc, &old_val, &old_tb); #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); } } 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, "%s() takes %s %" CYTHON_FORMAT_SSIZE_T "d positional argument%s (%" CYTHON_FORMAT_SSIZE_T "d given)", func_name, more_or_less, num_expected, (num_expected == 1) ? "" : "s", num_found); } 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 } 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, "%s() keywords must be strings", function_name); goto bad; invalid_keyword: PyErr_Format(PyExc_TypeError, #if PY_MAJOR_VERSION < 3 "%s() got an unexpected keyword argument '%s'", function_name, PyString_AsString(key)); #else "%s() got an unexpected keyword argument '%U'", function_name, key); #endif bad: return -1; } static CYTHON_INLINE PyObject *__Pyx_GetModuleGlobalName(PyObject *name) { PyObject *result; #if CYTHON_COMPILING_IN_CPYTHON result = PyDict_GetItem(__pyx_d, name); if (result) { Py_INCREF(result); } else { #else result = PyObject_GetItem(__pyx_d, name); if (!result) { PyErr_Clear(); #endif result = __Pyx_GetBuiltinName(name); } return result; } static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j) { PyObject *r; if (!j) return NULL; r = PyObject_GetItem(o, j); Py_DECREF(j); return r; } static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i, int wraparound, int boundscheck) { #if CYTHON_COMPILING_IN_CPYTHON if (wraparound & unlikely(i < 0)) i += PyList_GET_SIZE(o); if ((!boundscheck) || likely((0 <= i) & (i < PyList_GET_SIZE(o)))) { PyObject *r = PyList_GET_ITEM(o, i); Py_INCREF(r); return r; } return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i)); #else return PySequence_GetItem(o, i); #endif } static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i, int wraparound, int boundscheck) { #if CYTHON_COMPILING_IN_CPYTHON if (wraparound & unlikely(i < 0)) i += PyTuple_GET_SIZE(o); if ((!boundscheck) || likely((0 <= i) & (i < PyTuple_GET_SIZE(o)))) { PyObject *r = PyTuple_GET_ITEM(o, i); Py_INCREF(r); return r; } return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i)); #else return PySequence_GetItem(o, i); #endif } static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, int is_list, int wraparound, int boundscheck) { #if CYTHON_COMPILING_IN_CPYTHON if (is_list || PyList_CheckExact(o)) { Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyList_GET_SIZE(o); if ((!boundscheck) || (likely((n >= 0) & (n < PyList_GET_SIZE(o))))) { PyObject *r = PyList_GET_ITEM(o, n); Py_INCREF(r); return r; } } else if (PyTuple_CheckExact(o)) { Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyTuple_GET_SIZE(o); if ((!boundscheck) || likely((n >= 0) & (n < PyTuple_GET_SIZE(o)))) { PyObject *r = PyTuple_GET_ITEM(o, n); Py_INCREF(r); return r; } } else { PySequenceMethods *m = Py_TYPE(o)->tp_as_sequence; if (likely(m && m->sq_item)) { if (wraparound && unlikely(i < 0) && likely(m->sq_length)) { Py_ssize_t l = m->sq_length(o); if (likely(l >= 0)) { i += l; } else { if (PyErr_ExceptionMatches(PyExc_OverflowError)) PyErr_Clear(); else return NULL; } } 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)); } 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; } static CYTHON_INLINE void __Pyx_ExceptionSave(PyObject **type, PyObject **value, PyObject **tb) { #if CYTHON_COMPILING_IN_CPYTHON PyThreadState *tstate = PyThreadState_GET(); *type = tstate->exc_type; *value = tstate->exc_value; *tb = tstate->exc_traceback; Py_XINCREF(*type); Py_XINCREF(*value); Py_XINCREF(*tb); #else PyErr_GetExcInfo(type, value, tb); #endif } static void __Pyx_ExceptionReset(PyObject *type, PyObject *value, PyObject *tb) { #if CYTHON_COMPILING_IN_CPYTHON PyObject *tmp_type, *tmp_value, *tmp_tb; PyThreadState *tstate = PyThreadState_GET(); tmp_type = tstate->exc_type; tmp_value = tstate->exc_value; tmp_tb = tstate->exc_traceback; tstate->exc_type = type; tstate->exc_value = value; tstate->exc_traceback = tb; Py_XDECREF(tmp_type); Py_XDECREF(tmp_value); Py_XDECREF(tmp_tb); #else PyErr_SetExcInfo(type, value, tb); #endif } static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level) { PyObject *empty_list = 0; PyObject *module = 0; PyObject *global_dict = 0; PyObject *empty_dict = 0; PyObject *list; #if PY_VERSION_HEX < 0x03030000 PyObject *py_import; py_import = __Pyx_PyObject_GetAttrStr(__pyx_b, __pyx_n_s____import__); if (!py_import) goto bad; #endif if (from_list) list = from_list; else { empty_list = PyList_New(0); if (!empty_list) goto bad; list = empty_list; } global_dict = PyModule_GetDict(__pyx_m); if (!global_dict) goto bad; empty_dict = PyDict_New(); if (!empty_dict) goto bad; #if PY_VERSION_HEX >= 0x02050000 { #if PY_MAJOR_VERSION >= 3 if (level == -1) { if (strchr(__Pyx_MODULE_NAME, '.')) { #if PY_VERSION_HEX < 0x03030000 PyObject *py_level = PyInt_FromLong(1); if (!py_level) goto bad; module = PyObject_CallFunctionObjArgs(py_import, name, global_dict, empty_dict, list, py_level, NULL); Py_DECREF(py_level); #else module = PyImport_ImportModuleLevelObject( name, global_dict, empty_dict, list, 1); #endif if (!module) { if (!PyErr_ExceptionMatches(PyExc_ImportError)) goto bad; PyErr_Clear(); } } level = 0; /* try absolute import on failure */ } #endif if (!module) { #if PY_VERSION_HEX < 0x03030000 PyObject *py_level = PyInt_FromLong(level); if (!py_level) goto bad; module = PyObject_CallFunctionObjArgs(py_import, name, global_dict, empty_dict, list, py_level, NULL); Py_DECREF(py_level); #else module = PyImport_ImportModuleLevelObject( name, global_dict, empty_dict, list, level); #endif } } #else if (level>0) { PyErr_SetString(PyExc_RuntimeError, "Relative import is not supported for Python <=2.4."); goto bad; } module = PyObject_CallFunctionObjArgs(py_import, name, global_dict, empty_dict, list, NULL); #endif bad: #if PY_VERSION_HEX < 0x03030000 Py_XDECREF(py_import); #endif Py_XDECREF(empty_list); Py_XDECREF(empty_dict); return module; } static CYTHON_INLINE unsigned char __Pyx_PyInt_AsUnsignedChar(PyObject* x) { const unsigned char neg_one = (unsigned char)-1, const_zero = 0; const int is_unsigned = neg_one > const_zero; if (sizeof(unsigned char) < sizeof(long)) { long val = __Pyx_PyInt_AsLong(x); if (unlikely(val != (long)(unsigned char)val)) { if (!unlikely(val == -1 && PyErr_Occurred())) { PyErr_SetString(PyExc_OverflowError, (is_unsigned && unlikely(val < 0)) ? "can't convert negative value to unsigned char" : "value too large to convert to unsigned char"); } return (unsigned char)-1; } return (unsigned char)val; } return (unsigned char)__Pyx_PyInt_AsUnsignedLong(x); } static CYTHON_INLINE unsigned short __Pyx_PyInt_AsUnsignedShort(PyObject* x) { const unsigned short neg_one = (unsigned short)-1, const_zero = 0; const int is_unsigned = neg_one > const_zero; if (sizeof(unsigned short) < sizeof(long)) { long val = __Pyx_PyInt_AsLong(x); if (unlikely(val != (long)(unsigned short)val)) { if (!unlikely(val == -1 && PyErr_Occurred())) { PyErr_SetString(PyExc_OverflowError, (is_unsigned && unlikely(val < 0)) ? "can't convert negative value to unsigned short" : "value too large to convert to unsigned short"); } return (unsigned short)-1; } return (unsigned short)val; } return (unsigned short)__Pyx_PyInt_AsUnsignedLong(x); } static CYTHON_INLINE unsigned int __Pyx_PyInt_AsUnsignedInt(PyObject* x) { const unsigned int neg_one = (unsigned int)-1, const_zero = 0; const int is_unsigned = neg_one > const_zero; if (sizeof(unsigned int) < sizeof(long)) { long val = __Pyx_PyInt_AsLong(x); if (unlikely(val != (long)(unsigned int)val)) { if (!unlikely(val == -1 && PyErr_Occurred())) { PyErr_SetString(PyExc_OverflowError, (is_unsigned && unlikely(val < 0)) ? "can't convert negative value to unsigned int" : "value too large to convert to unsigned int"); } return (unsigned int)-1; } return (unsigned int)val; } return (unsigned int)__Pyx_PyInt_AsUnsignedLong(x); } static CYTHON_INLINE char __Pyx_PyInt_AsChar(PyObject* x) { const char neg_one = (char)-1, const_zero = 0; const int is_unsigned = neg_one > const_zero; if (sizeof(char) < sizeof(long)) { long val = __Pyx_PyInt_AsLong(x); if (unlikely(val != (long)(char)val)) { if (!unlikely(val == -1 && PyErr_Occurred())) { PyErr_SetString(PyExc_OverflowError, (is_unsigned && unlikely(val < 0)) ? "can't convert negative value to char" : "value too large to convert to char"); } return (char)-1; } return (char)val; } return (char)__Pyx_PyInt_AsLong(x); } static CYTHON_INLINE short __Pyx_PyInt_AsShort(PyObject* x) { const short neg_one = (short)-1, const_zero = 0; const int is_unsigned = neg_one > const_zero; if (sizeof(short) < sizeof(long)) { long val = __Pyx_PyInt_AsLong(x); if (unlikely(val != (long)(short)val)) { if (!unlikely(val == -1 && PyErr_Occurred())) { PyErr_SetString(PyExc_OverflowError, (is_unsigned && unlikely(val < 0)) ? "can't convert negative value to short" : "value too large to convert to short"); } return (short)-1; } return (short)val; } return (short)__Pyx_PyInt_AsLong(x); } static CYTHON_INLINE int __Pyx_PyInt_AsInt(PyObject* x) { const int neg_one = (int)-1, const_zero = 0; const int is_unsigned = neg_one > const_zero; if (sizeof(int) < sizeof(long)) { long val = __Pyx_PyInt_AsLong(x); if (unlikely(val != (long)(int)val)) { if (!unlikely(val == -1 && PyErr_Occurred())) { PyErr_SetString(PyExc_OverflowError, (is_unsigned && unlikely(val < 0)) ? "can't convert negative value to int" : "value too large to convert to int"); } return (int)-1; } return (int)val; } return (int)__Pyx_PyInt_AsLong(x); } static CYTHON_INLINE signed char __Pyx_PyInt_AsSignedChar(PyObject* x) { const signed char neg_one = (signed char)-1, const_zero = 0; const int is_unsigned = neg_one > const_zero; if (sizeof(signed char) < sizeof(long)) { long val = __Pyx_PyInt_AsLong(x); if (unlikely(val != (long)(signed char)val)) { if (!unlikely(val == -1 && PyErr_Occurred())) { PyErr_SetString(PyExc_OverflowError, (is_unsigned && unlikely(val < 0)) ? "can't convert negative value to signed char" : "value too large to convert to signed char"); } return (signed char)-1; } return (signed char)val; } return (signed char)__Pyx_PyInt_AsSignedLong(x); } static CYTHON_INLINE signed short __Pyx_PyInt_AsSignedShort(PyObject* x) { const signed short neg_one = (signed short)-1, const_zero = 0; const int is_unsigned = neg_one > const_zero; if (sizeof(signed short) < sizeof(long)) { long val = __Pyx_PyInt_AsLong(x); if (unlikely(val != (long)(signed short)val)) { if (!unlikely(val == -1 && PyErr_Occurred())) { PyErr_SetString(PyExc_OverflowError, (is_unsigned && unlikely(val < 0)) ? "can't convert negative value to signed short" : "value too large to convert to signed short"); } return (signed short)-1; } return (signed short)val; } return (signed short)__Pyx_PyInt_AsSignedLong(x); } static CYTHON_INLINE signed int __Pyx_PyInt_AsSignedInt(PyObject* x) { const signed int neg_one = (signed int)-1, const_zero = 0; const int is_unsigned = neg_one > const_zero; if (sizeof(signed int) < sizeof(long)) { long val = __Pyx_PyInt_AsLong(x); if (unlikely(val != (long)(signed int)val)) { if (!unlikely(val == -1 && PyErr_Occurred())) { PyErr_SetString(PyExc_OverflowError, (is_unsigned && unlikely(val < 0)) ? "can't convert negative value to signed int" : "value too large to convert to signed int"); } return (signed int)-1; } return (signed int)val; } return (signed int)__Pyx_PyInt_AsSignedLong(x); } static CYTHON_INLINE int __Pyx_PyInt_AsLongDouble(PyObject* x) { const int neg_one = (int)-1, const_zero = 0; const int is_unsigned = neg_one > const_zero; if (sizeof(int) < sizeof(long)) { long val = __Pyx_PyInt_AsLong(x); if (unlikely(val != (long)(int)val)) { if (!unlikely(val == -1 && PyErr_Occurred())) { PyErr_SetString(PyExc_OverflowError, (is_unsigned && unlikely(val < 0)) ? "can't convert negative value to int" : "value too large to convert to int"); } return (int)-1; } return (int)val; } return (int)__Pyx_PyInt_AsLong(x); } #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS #include "longintrepr.h" #endif #endif static CYTHON_INLINE unsigned long __Pyx_PyInt_AsUnsignedLong(PyObject* x) { const unsigned long neg_one = (unsigned long)-1, const_zero = 0; const int is_unsigned = neg_one > const_zero; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_Check(x))) { long val = PyInt_AS_LONG(x); if (is_unsigned && unlikely(val < 0)) { PyErr_SetString(PyExc_OverflowError, "can't convert negative value to unsigned long"); return (unsigned long)-1; } return (unsigned long)val; } else #endif if (likely(PyLong_Check(x))) { if (is_unsigned) { #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS if (sizeof(digit) <= sizeof(unsigned long)) { switch (Py_SIZE(x)) { case 0: return 0; case 1: return (unsigned long) ((PyLongObject*)x)->ob_digit[0]; } } #endif #endif if (unlikely(Py_SIZE(x) < 0)) { PyErr_SetString(PyExc_OverflowError, "can't convert negative value to unsigned long"); return (unsigned long)-1; } return (unsigned long)PyLong_AsUnsignedLong(x); } else { #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS if (sizeof(digit) <= sizeof(unsigned long)) { switch (Py_SIZE(x)) { case 0: return 0; case 1: return +(unsigned long) ((PyLongObject*)x)->ob_digit[0]; case -1: return -(unsigned long) ((PyLongObject*)x)->ob_digit[0]; } } #endif #endif return (unsigned long)PyLong_AsLong(x); } } else { unsigned long val; PyObject *tmp = __Pyx_PyNumber_Int(x); if (!tmp) return (unsigned long)-1; val = __Pyx_PyInt_AsUnsignedLong(tmp); Py_DECREF(tmp); return val; } } #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS #include "longintrepr.h" #endif #endif static CYTHON_INLINE unsigned PY_LONG_LONG __Pyx_PyInt_AsUnsignedLongLong(PyObject* x) { const unsigned PY_LONG_LONG neg_one = (unsigned PY_LONG_LONG)-1, const_zero = 0; const int is_unsigned = neg_one > const_zero; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_Check(x))) { long val = PyInt_AS_LONG(x); if (is_unsigned && unlikely(val < 0)) { PyErr_SetString(PyExc_OverflowError, "can't convert negative value to unsigned PY_LONG_LONG"); return (unsigned PY_LONG_LONG)-1; } return (unsigned PY_LONG_LONG)val; } else #endif if (likely(PyLong_Check(x))) { if (is_unsigned) { #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS if (sizeof(digit) <= sizeof(unsigned PY_LONG_LONG)) { switch (Py_SIZE(x)) { case 0: return 0; case 1: return (unsigned PY_LONG_LONG) ((PyLongObject*)x)->ob_digit[0]; } } #endif #endif if (unlikely(Py_SIZE(x) < 0)) { PyErr_SetString(PyExc_OverflowError, "can't convert negative value to unsigned PY_LONG_LONG"); return (unsigned PY_LONG_LONG)-1; } return (unsigned PY_LONG_LONG)PyLong_AsUnsignedLongLong(x); } else { #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS if (sizeof(digit) <= sizeof(unsigned PY_LONG_LONG)) { switch (Py_SIZE(x)) { case 0: return 0; case 1: return +(unsigned PY_LONG_LONG) ((PyLongObject*)x)->ob_digit[0]; case -1: return -(unsigned PY_LONG_LONG) ((PyLongObject*)x)->ob_digit[0]; } } #endif #endif return (unsigned PY_LONG_LONG)PyLong_AsLongLong(x); } } else { unsigned PY_LONG_LONG val; PyObject *tmp = __Pyx_PyNumber_Int(x); if (!tmp) return (unsigned PY_LONG_LONG)-1; val = __Pyx_PyInt_AsUnsignedLongLong(tmp); Py_DECREF(tmp); return val; } } #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS #include "longintrepr.h" #endif #endif static CYTHON_INLINE long __Pyx_PyInt_AsLong(PyObject* x) { const long neg_one = (long)-1, const_zero = 0; const int is_unsigned = neg_one > const_zero; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_Check(x))) { long val = PyInt_AS_LONG(x); if (is_unsigned && unlikely(val < 0)) { PyErr_SetString(PyExc_OverflowError, "can't convert negative value to long"); return (long)-1; } return (long)val; } else #endif if (likely(PyLong_Check(x))) { if (is_unsigned) { #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS if (sizeof(digit) <= sizeof(long)) { switch (Py_SIZE(x)) { case 0: return 0; case 1: return (long) ((PyLongObject*)x)->ob_digit[0]; } } #endif #endif if (unlikely(Py_SIZE(x) < 0)) { PyErr_SetString(PyExc_OverflowError, "can't convert negative value to long"); return (long)-1; } return (long)PyLong_AsUnsignedLong(x); } else { #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS if (sizeof(digit) <= sizeof(long)) { switch (Py_SIZE(x)) { case 0: return 0; case 1: return +(long) ((PyLongObject*)x)->ob_digit[0]; case -1: return -(long) ((PyLongObject*)x)->ob_digit[0]; } } #endif #endif return (long)PyLong_AsLong(x); } } else { long val; PyObject *tmp = __Pyx_PyNumber_Int(x); if (!tmp) return (long)-1; val = __Pyx_PyInt_AsLong(tmp); Py_DECREF(tmp); return val; } } #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS #include "longintrepr.h" #endif #endif static CYTHON_INLINE PY_LONG_LONG __Pyx_PyInt_AsLongLong(PyObject* x) { const PY_LONG_LONG neg_one = (PY_LONG_LONG)-1, const_zero = 0; const int is_unsigned = neg_one > const_zero; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_Check(x))) { long val = PyInt_AS_LONG(x); if (is_unsigned && unlikely(val < 0)) { PyErr_SetString(PyExc_OverflowError, "can't convert negative value to PY_LONG_LONG"); return (PY_LONG_LONG)-1; } return (PY_LONG_LONG)val; } else #endif if (likely(PyLong_Check(x))) { if (is_unsigned) { #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS if (sizeof(digit) <= sizeof(PY_LONG_LONG)) { switch (Py_SIZE(x)) { case 0: return 0; case 1: return (PY_LONG_LONG) ((PyLongObject*)x)->ob_digit[0]; } } #endif #endif if (unlikely(Py_SIZE(x) < 0)) { PyErr_SetString(PyExc_OverflowError, "can't convert negative value to PY_LONG_LONG"); return (PY_LONG_LONG)-1; } return (PY_LONG_LONG)PyLong_AsUnsignedLongLong(x); } else { #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS if (sizeof(digit) <= sizeof(PY_LONG_LONG)) { switch (Py_SIZE(x)) { case 0: return 0; case 1: return +(PY_LONG_LONG) ((PyLongObject*)x)->ob_digit[0]; case -1: return -(PY_LONG_LONG) ((PyLongObject*)x)->ob_digit[0]; } } #endif #endif return (PY_LONG_LONG)PyLong_AsLongLong(x); } } else { PY_LONG_LONG val; PyObject *tmp = __Pyx_PyNumber_Int(x); if (!tmp) return (PY_LONG_LONG)-1; val = __Pyx_PyInt_AsLongLong(tmp); Py_DECREF(tmp); return val; } } #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS #include "longintrepr.h" #endif #endif static CYTHON_INLINE signed long __Pyx_PyInt_AsSignedLong(PyObject* x) { const signed long neg_one = (signed long)-1, const_zero = 0; const int is_unsigned = neg_one > const_zero; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_Check(x))) { long val = PyInt_AS_LONG(x); if (is_unsigned && unlikely(val < 0)) { PyErr_SetString(PyExc_OverflowError, "can't convert negative value to signed long"); return (signed long)-1; } return (signed long)val; } else #endif if (likely(PyLong_Check(x))) { if (is_unsigned) { #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS if (sizeof(digit) <= sizeof(signed long)) { switch (Py_SIZE(x)) { case 0: return 0; case 1: return (signed long) ((PyLongObject*)x)->ob_digit[0]; } } #endif #endif if (unlikely(Py_SIZE(x) < 0)) { PyErr_SetString(PyExc_OverflowError, "can't convert negative value to signed long"); return (signed long)-1; } return (signed long)PyLong_AsUnsignedLong(x); } else { #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS if (sizeof(digit) <= sizeof(signed long)) { switch (Py_SIZE(x)) { case 0: return 0; case 1: return +(signed long) ((PyLongObject*)x)->ob_digit[0]; case -1: return -(signed long) ((PyLongObject*)x)->ob_digit[0]; } } #endif #endif return (signed long)PyLong_AsLong(x); } } else { signed long val; PyObject *tmp = __Pyx_PyNumber_Int(x); if (!tmp) return (signed long)-1; val = __Pyx_PyInt_AsSignedLong(tmp); Py_DECREF(tmp); return val; } } #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS #include "longintrepr.h" #endif #endif static CYTHON_INLINE signed PY_LONG_LONG __Pyx_PyInt_AsSignedLongLong(PyObject* x) { const signed PY_LONG_LONG neg_one = (signed PY_LONG_LONG)-1, const_zero = 0; const int is_unsigned = neg_one > const_zero; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_Check(x))) { long val = PyInt_AS_LONG(x); if (is_unsigned && unlikely(val < 0)) { PyErr_SetString(PyExc_OverflowError, "can't convert negative value to signed PY_LONG_LONG"); return (signed PY_LONG_LONG)-1; } return (signed PY_LONG_LONG)val; } else #endif if (likely(PyLong_Check(x))) { if (is_unsigned) { #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS if (sizeof(digit) <= sizeof(signed PY_LONG_LONG)) { switch (Py_SIZE(x)) { case 0: return 0; case 1: return (signed PY_LONG_LONG) ((PyLongObject*)x)->ob_digit[0]; } } #endif #endif if (unlikely(Py_SIZE(x) < 0)) { PyErr_SetString(PyExc_OverflowError, "can't convert negative value to signed PY_LONG_LONG"); return (signed PY_LONG_LONG)-1; } return (signed PY_LONG_LONG)PyLong_AsUnsignedLongLong(x); } else { #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS if (sizeof(digit) <= sizeof(signed PY_LONG_LONG)) { switch (Py_SIZE(x)) { case 0: return 0; case 1: return +(signed PY_LONG_LONG) ((PyLongObject*)x)->ob_digit[0]; case -1: return -(signed PY_LONG_LONG) ((PyLongObject*)x)->ob_digit[0]; } } #endif #endif return (signed PY_LONG_LONG)PyLong_AsLongLong(x); } } else { signed PY_LONG_LONG val; PyObject *tmp = __Pyx_PyNumber_Int(x); if (!tmp) return (signed PY_LONG_LONG)-1; val = __Pyx_PyInt_AsSignedLongLong(tmp); Py_DECREF(tmp); return val; } } 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); #if PY_VERSION_HEX < 0x02050000 return PyErr_Warn(NULL, message); #else return PyErr_WarnEx(NULL, message, 1); #endif } return 0; } 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) / 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, 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); } #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, /*int argcount,*/ 0, /*int kwonlyargcount,*/ 0, /*int nlocals,*/ 0, /*int stacksize,*/ 0, /*int flags,*/ __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, /*int firstlineno,*/ __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; PyObject *py_globals = 0; PyFrameObject *py_frame = 0; py_code = __pyx_find_code_object(c_line ? c_line : py_line); if (!py_code) { py_code = __Pyx_CreateCodeObjectForTraceback( funcname, c_line, py_line, filename); if (!py_code) goto bad; __pyx_insert_code_object(c_line ? c_line : py_line, py_code); } py_globals = PyModule_GetDict(__pyx_m); if (!py_globals) goto bad; py_frame = PyFrame_New( PyThreadState_GET(), /*PyThreadState *tstate,*/ py_code, /*PyCodeObject *code,*/ py_globals, /*PyObject *globals,*/ 0 /*PyObject *locals*/ ); if (!py_frame) goto bad; py_frame->f_lineno = py_line; PyTraceBack_Here(py_frame); bad: Py_XDECREF(py_code); Py_XDECREF(py_frame); } 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 /* Python 3+ has unicode identifiers */ if (t->is_unicode | t->is_str) { if (t->intern) { *t->p = PyUnicode_InternFromString(t->s); } else if (t->encoding) { *t->p = PyUnicode_Decode(t->s, t->n - 1, t->encoding, NULL); } else { *t->p = PyUnicode_FromStringAndSize(t->s, t->n - 1); } } else { *t->p = PyBytes_FromStringAndSize(t->s, t->n - 1); } #endif if (!*t->p) return -1; ++t; } return 0; } static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(char* c_str) { return __Pyx_PyUnicode_FromStringAndSize(c_str, strlen(c_str)); } static CYTHON_INLINE char* __Pyx_PyObject_AsString(PyObject* o) { Py_ssize_t ignore; return __Pyx_PyObject_AsStringAndSize(o, &ignore); } static CYTHON_INLINE char* __Pyx_PyObject_AsStringAndSize(PyObject* o, Py_ssize_t *length) { #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT if ( #if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII __Pyx_sys_getdefaultencoding_not_ascii && #endif PyUnicode_Check(o)) { #if PY_VERSION_HEX < 0x03030000 char* defenc_c; PyObject* defenc = _PyUnicode_AsDefaultEncodedString(o, NULL); if (!defenc) return NULL; defenc_c = PyBytes_AS_STRING(defenc); #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII { char* end = defenc_c + PyBytes_GET_SIZE(defenc); char* c; for (c = defenc_c; c < end; c++) { if ((unsigned char) (*c) >= 128) { PyUnicode_AsASCIIString(o); return NULL; } } } #endif /*__PYX_DEFAULT_STRING_ENCODING_IS_ASCII*/ *length = PyBytes_GET_SIZE(defenc); return defenc_c; #else /* PY_VERSION_HEX < 0x03030000 */ if (PyUnicode_READY(o) == -1) return NULL; #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII if (PyUnicode_IS_ASCII(o)) { *length = PyUnicode_GET_DATA_SIZE(o); return PyUnicode_AsUTF8(o); } else { PyUnicode_AsASCIIString(o); return NULL; } #else /* __PYX_DEFAULT_STRING_ENCODING_IS_ASCII */ return PyUnicode_AsUTF8AndSize(o, length); #endif /* __PYX_DEFAULT_STRING_ENCODING_IS_ASCII */ #endif /* PY_VERSION_HEX < 0x03030000 */ } else #endif /* __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT */ { char* result; int r = PyBytes_AsStringAndSize(o, &result, length); if (r < 0) { return NULL; } else { return result; } } } static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject* x) { int is_true = x == Py_True; if (is_true | (x == Py_False) | (x == Py_None)) return is_true; else return PyObject_IsTrue(x); } static CYTHON_INLINE PyObject* __Pyx_PyNumber_Int(PyObject* x) { PyNumberMethods *m; const char *name = NULL; PyObject *res = NULL; #if PY_MAJOR_VERSION < 3 if (PyInt_Check(x) || PyLong_Check(x)) #else if (PyLong_Check(x)) #endif return Py_INCREF(x), x; m = Py_TYPE(x)->tp_as_number; #if PY_MAJOR_VERSION < 3 if (m && m->nb_int) { name = "int"; res = PyNumber_Int(x); } else if (m && m->nb_long) { name = "long"; res = PyNumber_Long(x); } #else if (m && m->nb_int) { name = "int"; res = PyNumber_Long(x); } #endif if (res) { #if PY_MAJOR_VERSION < 3 if (!PyInt_Check(res) && !PyLong_Check(res)) { #else if (!PyLong_Check(res)) { #endif PyErr_Format(PyExc_TypeError, "__%s__ returned non-%s (type %.200s)", name, name, Py_TYPE(res)->tp_name); Py_DECREF(res); return NULL; } } else if (!PyErr_Occurred()) { PyErr_SetString(PyExc_TypeError, "an integer is required"); } return res; } static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) { Py_ssize_t ival; PyObject* x = 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) { #if PY_VERSION_HEX < 0x02050000 if (ival <= LONG_MAX) return PyInt_FromLong((long)ival); else { unsigned char *bytes = (unsigned char *) &ival; int one = 1; int little = (int)*(unsigned char*)&one; return _PyLong_FromByteArray(bytes, sizeof(size_t), little, 0); } #else return PyInt_FromSize_t(ival); #endif } static CYTHON_INLINE size_t __Pyx_PyInt_AsSize_t(PyObject* x) { unsigned PY_LONG_LONG val = __Pyx_PyInt_AsUnsignedLongLong(x); if (unlikely(val != (unsigned PY_LONG_LONG)(size_t)val)) { if ((val != (unsigned PY_LONG_LONG)-1) || !PyErr_Occurred()) PyErr_SetString(PyExc_OverflowError, "value too large to convert to size_t"); return (size_t)-1; } return (size_t)val; } #endif /* Py_PYTHON_H */ debian/cythonized-files3/pandas/src/sparse.c0000664000000000000000000413677312275603610016260 0ustar /* Generated by Cython 0.19.2 on Mon Feb 3 08:42:29 2014 */ #define PY_SSIZE_T_CLEAN #ifndef CYTHON_USE_PYLONG_INTERNALS #ifdef PYLONG_BITS_IN_DIGIT #define CYTHON_USE_PYLONG_INTERNALS 0 #else #include "pyconfig.h" #ifdef PYLONG_BITS_IN_DIGIT #define CYTHON_USE_PYLONG_INTERNALS 1 #else #define CYTHON_USE_PYLONG_INTERNALS 0 #endif #endif #endif #include "Python.h" #ifndef Py_PYTHON_H #error Python headers needed to compile C extensions, please install development version of Python. #elif PY_VERSION_HEX < 0x02040000 #error Cython requires Python 2.4+. #else #include /* For offsetof */ #ifndef offsetof #define offsetof(type, member) ( (size_t) & ((type*)0) -> member ) #endif #if !defined(WIN32) && !defined(MS_WINDOWS) #ifndef __stdcall #define __stdcall #endif #ifndef __cdecl #define __cdecl #endif #ifndef __fastcall #define __fastcall #endif #endif #ifndef DL_IMPORT #define DL_IMPORT(t) t #endif #ifndef DL_EXPORT #define DL_EXPORT(t) t #endif #ifndef PY_LONG_LONG #define PY_LONG_LONG LONG_LONG #endif #ifndef Py_HUGE_VAL #define Py_HUGE_VAL HUGE_VAL #endif #ifdef PYPY_VERSION #define CYTHON_COMPILING_IN_PYPY 1 #define CYTHON_COMPILING_IN_CPYTHON 0 #else #define CYTHON_COMPILING_IN_PYPY 0 #define CYTHON_COMPILING_IN_CPYTHON 1 #endif #if PY_VERSION_HEX < 0x02050000 typedef int Py_ssize_t; #define PY_SSIZE_T_MAX INT_MAX #define PY_SSIZE_T_MIN INT_MIN #define PY_FORMAT_SIZE_T "" #define CYTHON_FORMAT_SSIZE_T "" #define PyInt_FromSsize_t(z) PyInt_FromLong(z) #define PyInt_AsSsize_t(o) __Pyx_PyInt_AsInt(o) #define PyNumber_Index(o) ((PyNumber_Check(o) && !PyFloat_Check(o)) ? PyNumber_Int(o) : \ (PyErr_Format(PyExc_TypeError, \ "expected index value, got %.200s", Py_TYPE(o)->tp_name), \ (PyObject*)0)) #define __Pyx_PyIndex_Check(o) (PyNumber_Check(o) && !PyFloat_Check(o) && \ !PyComplex_Check(o)) #define PyIndex_Check __Pyx_PyIndex_Check #define PyErr_WarnEx(category, message, stacklevel) PyErr_Warn(category, message) #define __PYX_BUILD_PY_SSIZE_T "i" #else #define __PYX_BUILD_PY_SSIZE_T "n" #define CYTHON_FORMAT_SSIZE_T "z" #define __Pyx_PyIndex_Check PyIndex_Check #endif #if PY_VERSION_HEX < 0x02060000 #define Py_REFCNT(ob) (((PyObject*)(ob))->ob_refcnt) #define Py_TYPE(ob) (((PyObject*)(ob))->ob_type) #define Py_SIZE(ob) (((PyVarObject*)(ob))->ob_size) #define PyVarObject_HEAD_INIT(type, size) \ PyObject_HEAD_INIT(type) size, #define PyType_Modified(t) typedef struct { void *buf; PyObject *obj; Py_ssize_t len; Py_ssize_t itemsize; int readonly; int ndim; char *format; Py_ssize_t *shape; Py_ssize_t *strides; Py_ssize_t *suboffsets; void *internal; } Py_buffer; #define PyBUF_SIMPLE 0 #define PyBUF_WRITABLE 0x0001 #define PyBUF_FORMAT 0x0004 #define PyBUF_ND 0x0008 #define PyBUF_STRIDES (0x0010 | PyBUF_ND) #define PyBUF_C_CONTIGUOUS (0x0020 | PyBUF_STRIDES) #define PyBUF_F_CONTIGUOUS (0x0040 | PyBUF_STRIDES) #define PyBUF_ANY_CONTIGUOUS (0x0080 | PyBUF_STRIDES) #define PyBUF_INDIRECT (0x0100 | PyBUF_STRIDES) #define PyBUF_RECORDS (PyBUF_STRIDES | PyBUF_FORMAT | PyBUF_WRITABLE) #define PyBUF_FULL (PyBUF_INDIRECT | PyBUF_FORMAT | PyBUF_WRITABLE) typedef int (*getbufferproc)(PyObject *, Py_buffer *, int); typedef void (*releasebufferproc)(PyObject *, Py_buffer *); #endif #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, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) #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) #endif #if PY_MAJOR_VERSION < 3 && PY_MINOR_VERSION < 6 #define PyUnicode_FromString(s) PyUnicode_Decode(s, strlen(s), "UTF-8", "strict") #endif #if PY_MAJOR_VERSION >= 3 #define Py_TPFLAGS_CHECKTYPES 0 #define Py_TPFLAGS_HAVE_INDEX 0 #endif #if (PY_VERSION_HEX < 0x02060000) || (PY_MAJOR_VERSION >= 3) #define Py_TPFLAGS_HAVE_NEWBUFFER 0 #endif #if PY_VERSION_HEX < 0x02060000 #define Py_TPFLAGS_HAVE_VERSION_TAG 0 #endif #if PY_VERSION_HEX > 0x03030000 && defined(PyUnicode_KIND) #define CYTHON_PEP393_ENABLED 1 #define __Pyx_PyUnicode_READY(op) (likely(PyUnicode_IS_READY(op)) ? \ 0 : _PyUnicode_Ready((PyObject *)(op))) #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_LENGTH(u) #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i) #define __Pyx_PyUnicode_READ(k, d, i) PyUnicode_READ(k, d, i) #else #define CYTHON_PEP393_ENABLED 0 #define __Pyx_PyUnicode_READY(op) (0) #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_SIZE(u) #define __Pyx_PyUnicode_READ_CHAR(u, i) ((Py_UCS4)(PyUnicode_AS_UNICODE(u)[i])) #define __Pyx_PyUnicode_READ(k, d, i) ((k=k), (Py_UCS4)(((Py_UNICODE*)d)[i])) #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_VERSION_HEX < 0x02060000 #define PyBytesObject PyStringObject #define PyBytes_Type PyString_Type #define PyBytes_Check PyString_Check #define PyBytes_CheckExact PyString_CheckExact #define PyBytes_FromString PyString_FromString #define PyBytes_FromStringAndSize PyString_FromStringAndSize #define PyBytes_FromFormat PyString_FromFormat #define PyBytes_DecodeEscape PyString_DecodeEscape #define PyBytes_AsString PyString_AsString #define PyBytes_AsStringAndSize PyString_AsStringAndSize #define PyBytes_Size PyString_Size #define PyBytes_AS_STRING PyString_AS_STRING #define PyBytes_GET_SIZE PyString_GET_SIZE #define PyBytes_Repr PyString_Repr #define PyBytes_Concat PyString_Concat #define PyBytes_ConcatAndDel PyString_ConcatAndDel #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_CheckExact(obj) || PyUnicode_CheckExact(obj) || \ PyString_Check(obj) || PyUnicode_Check(obj)) #define __Pyx_PyBaseString_CheckExact(obj) (Py_TYPE(obj) == &PyBaseString_Type) #endif #if PY_VERSION_HEX < 0x02060000 #define PySet_Check(obj) PyObject_TypeCheck(obj, &PySet_Type) #define PyFrozenSet_Check(obj) PyObject_TypeCheck(obj, &PyFrozenSet_Type) #endif #ifndef PySet_CheckExact #define PySet_CheckExact(obj) (Py_TYPE(obj) == &PySet_Type) #endif #define __Pyx_TypeCheck(obj, type) PyObject_TypeCheck(obj, (PyTypeObject *)type) #if PY_MAJOR_VERSION >= 3 #define PyIntObject PyLongObject #define PyInt_Type PyLong_Type #define PyInt_Check(op) PyLong_Check(op) #define PyInt_CheckExact(op) PyLong_CheckExact(op) #define PyInt_FromString PyLong_FromString #define PyInt_FromUnicode PyLong_FromUnicode #define PyInt_FromLong PyLong_FromLong #define PyInt_FromSize_t PyLong_FromSize_t #define PyInt_FromSsize_t PyLong_FromSsize_t #define PyInt_AsLong PyLong_AsLong #define PyInt_AS_LONG PyLong_AS_LONG #define PyInt_AsSsize_t PyLong_AsSsize_t #define PyInt_AsUnsignedLongMask PyLong_AsUnsignedLongMask #define PyInt_AsUnsignedLongLongMask PyLong_AsUnsignedLongLongMask #endif #if PY_MAJOR_VERSION >= 3 #define PyBoolObject PyLongObject #endif #if PY_VERSION_HEX < 0x03020000 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) || (PY_VERSION_HEX >= 0x03010300) #define __Pyx_PySequence_GetSlice(obj, a, b) PySequence_GetSlice(obj, a, b) #define __Pyx_PySequence_SetSlice(obj, a, b, value) PySequence_SetSlice(obj, a, b, value) #define __Pyx_PySequence_DelSlice(obj, a, b) PySequence_DelSlice(obj, a, b) #else #define __Pyx_PySequence_GetSlice(obj, a, b) (unlikely(!(obj)) ? \ (PyErr_SetString(PyExc_SystemError, "null argument to internal routine"), (PyObject*)0) : \ (likely((obj)->ob_type->tp_as_mapping) ? (PySequence_GetSlice(obj, a, b)) : \ (PyErr_Format(PyExc_TypeError, "'%.200s' object is unsliceable", (obj)->ob_type->tp_name), (PyObject*)0))) #define __Pyx_PySequence_SetSlice(obj, a, b, value) (unlikely(!(obj)) ? \ (PyErr_SetString(PyExc_SystemError, "null argument to internal routine"), -1) : \ (likely((obj)->ob_type->tp_as_mapping) ? (PySequence_SetSlice(obj, a, b, value)) : \ (PyErr_Format(PyExc_TypeError, "'%.200s' object doesn't support slice assignment", (obj)->ob_type->tp_name), -1))) #define __Pyx_PySequence_DelSlice(obj, a, b) (unlikely(!(obj)) ? \ (PyErr_SetString(PyExc_SystemError, "null argument to internal routine"), -1) : \ (likely((obj)->ob_type->tp_as_mapping) ? (PySequence_DelSlice(obj, a, b)) : \ (PyErr_Format(PyExc_TypeError, "'%.200s' object doesn't support slice deletion", (obj)->ob_type->tp_name), -1))) #endif #if PY_MAJOR_VERSION >= 3 #define PyMethod_New(func, self, klass) ((self) ? PyMethod_New(func, self) : PyInstanceMethod_New(func)) #endif #if PY_VERSION_HEX < 0x02050000 #define __Pyx_GetAttrString(o,n) PyObject_GetAttrString((o),((char *)(n))) #define __Pyx_SetAttrString(o,n,a) PyObject_SetAttrString((o),((char *)(n)),(a)) #define __Pyx_DelAttrString(o,n) PyObject_DelAttrString((o),((char *)(n))) #else #define __Pyx_GetAttrString(o,n) PyObject_GetAttrString((o),(n)) #define __Pyx_SetAttrString(o,n,a) PyObject_SetAttrString((o),(n),(a)) #define __Pyx_DelAttrString(o,n) PyObject_DelAttrString((o),(n)) #endif #if PY_VERSION_HEX < 0x02050000 #define __Pyx_NAMESTR(n) ((char *)(n)) #define __Pyx_DOCSTR(n) ((char *)(n)) #else #define __Pyx_NAMESTR(n) (n) #define __Pyx_DOCSTR(n) (n) #endif #ifndef CYTHON_INLINE #if defined(__GNUC__) #define CYTHON_INLINE __inline__ #elif defined(_MSC_VER) #define CYTHON_INLINE __inline #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L #define CYTHON_INLINE inline #else #define CYTHON_INLINE #endif #endif #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 #ifdef NAN #define __PYX_NAN() ((float) NAN) #else static CYTHON_INLINE float __PYX_NAN() { /* Initialize NaN. The sign is irrelevant, an exponent with all bits 1 and a nonzero mantissa means NaN. If the first bit in the mantissa is 1, it is a quiet NaN. */ float value; memset(&value, 0xFF, sizeof(value)); return value; } #endif #if PY_MAJOR_VERSION >= 3 #define __Pyx_PyNumber_Divide(x,y) PyNumber_TrueDivide(x,y) #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceTrueDivide(x,y) #else #define __Pyx_PyNumber_Divide(x,y) PyNumber_Divide(x,y) #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceDivide(x,y) #endif #ifndef __PYX_EXTERN_C #ifdef __cplusplus #define __PYX_EXTERN_C extern "C" #else #define __PYX_EXTERN_C extern #endif #endif #if defined(WIN32) || defined(MS_WINDOWS) #define _USE_MATH_DEFINES #endif #include #define __PYX_HAVE__pandas___sparse #define __PYX_HAVE_API__pandas___sparse #include "string.h" #include "stdio.h" #include "stdlib.h" #include "numpy/arrayobject.h" #include "numpy/ufuncobject.h" #ifdef _OPENMP #include #endif /* _OPENMP */ #ifdef PYREX_WITHOUT_ASSERTIONS #define CYTHON_WITHOUT_ASSERTIONS #endif #ifndef CYTHON_UNUSED # if defined(__GNUC__) # if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)) # define CYTHON_UNUSED __attribute__ ((__unused__)) # else # define CYTHON_UNUSED # endif # elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER)) # define CYTHON_UNUSED __attribute__ ((__unused__)) # else # define CYTHON_UNUSED # endif #endif typedef struct {PyObject **p; char *s; const Py_ssize_t n; const char* encoding; const char is_unicode; const char is_str; const char intern; } __Pyx_StringTabEntry; /*proto*/ #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 static CYTHON_INLINE char* __Pyx_PyObject_AsString(PyObject*); static CYTHON_INLINE char* __Pyx_PyObject_AsStringAndSize(PyObject*, Py_ssize_t* length); #define __Pyx_PyBytes_FromString PyBytes_FromString #define __Pyx_PyBytes_FromStringAndSize PyBytes_FromStringAndSize static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(char*); #if PY_MAJOR_VERSION < 3 #define __Pyx_PyStr_FromString __Pyx_PyBytes_FromString #define __Pyx_PyStr_FromStringAndSize __Pyx_PyBytes_FromStringAndSize #else #define __Pyx_PyStr_FromString __Pyx_PyUnicode_FromString #define __Pyx_PyStr_FromStringAndSize __Pyx_PyUnicode_FromStringAndSize #endif #define __Pyx_PyObject_AsUString(s) ((unsigned char*) __Pyx_PyObject_AsString(s)) #define __Pyx_PyObject_FromUString(s) __Pyx_PyObject_FromString((char*)s) #define __Pyx_PyBytes_FromUString(s) __Pyx_PyBytes_FromString((char*)s) #define __Pyx_PyStr_FromUString(s) __Pyx_PyStr_FromString((char*)s) #define __Pyx_PyUnicode_FromUString(s) __Pyx_PyUnicode_FromString((char*)s) #if PY_MAJOR_VERSION < 3 static CYTHON_INLINE size_t __Pyx_Py_UNICODE_strlen(const Py_UNICODE *u) { const Py_UNICODE *u_end = u; while (*u_end++) ; return u_end - u - 1; } #else #define __Pyx_Py_UNICODE_strlen Py_UNICODE_strlen #endif #define __Pyx_PyUnicode_FromUnicode(u) PyUnicode_FromUnicode(u, __Pyx_Py_UNICODE_strlen(u)) #define __Pyx_PyUnicode_FromUnicodeAndLength PyUnicode_FromUnicode #define __Pyx_PyUnicode_AsUnicode PyUnicode_AsUnicode #define __Pyx_Owned_Py_None(b) (Py_INCREF(Py_None), Py_None) #define __Pyx_PyBool_FromLong(b) ((b) ? (Py_INCREF(Py_True), Py_True) : (Py_INCREF(Py_False), Py_False)) static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*); static CYTHON_INLINE PyObject* __Pyx_PyNumber_Int(PyObject* x); static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*); static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t); static CYTHON_INLINE size_t __Pyx_PyInt_AsSize_t(PyObject*); #if CYTHON_COMPILING_IN_CPYTHON #define __pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x)) #else #define __pyx_PyFloat_AsDouble(x) PyFloat_AsDouble(x) #endif #define __pyx_PyFloat_AsFloat(x) ((float) __pyx_PyFloat_AsDouble(x)) #if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII static int __Pyx_sys_getdefaultencoding_not_ascii; static int __Pyx_init_sys_getdefaultencoding_params() { PyObject* sys = NULL; PyObject* default_encoding = NULL; PyObject* ascii_chars_u = NULL; PyObject* ascii_chars_b = NULL; sys = PyImport_ImportModule("sys"); if (sys == NULL) goto bad; default_encoding = PyObject_CallMethod(sys, (char*) (const char*) "getdefaultencoding", NULL); if (default_encoding == NULL) goto bad; if (strcmp(PyBytes_AsString(default_encoding), "ascii") == 0) { __Pyx_sys_getdefaultencoding_not_ascii = 0; } else { const char* default_encoding_c = PyBytes_AS_STRING(default_encoding); 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 == NULL) goto bad; ascii_chars_b = PyUnicode_AsEncodedString(ascii_chars_u, default_encoding_c, NULL); if (ascii_chars_b == NULL || strncmp(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 '%s' is not a superset of ascii.", default_encoding_c); goto bad; } } Py_XDECREF(sys); Py_XDECREF(default_encoding); Py_XDECREF(ascii_chars_u); Py_XDECREF(ascii_chars_b); return 0; bad: Py_XDECREF(sys); 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() { PyObject* sys = NULL; PyObject* default_encoding = NULL; char* default_encoding_c; sys = PyImport_ImportModule("sys"); if (sys == NULL) goto bad; default_encoding = PyObject_CallMethod(sys, (char*) (const char*) "getdefaultencoding", NULL); if (default_encoding == NULL) goto bad; default_encoding_c = PyBytes_AS_STRING(default_encoding); __PYX_DEFAULT_STRING_ENCODING = (char*) malloc(strlen(default_encoding_c)); strcpy(__PYX_DEFAULT_STRING_ENCODING, default_encoding_c); Py_DECREF(sys); Py_DECREF(default_encoding); return 0; bad: Py_XDECREF(sys); Py_XDECREF(default_encoding); return -1; } #endif #endif #ifdef __GNUC__ /* Test for GCC > 2.95 */ #if __GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95)) #define likely(x) __builtin_expect(!!(x), 1) #define unlikely(x) __builtin_expect(!!(x), 0) #else /* __GNUC__ > 2 ... */ #define likely(x) (x) #define unlikely(x) (x) #endif /* __GNUC__ > 2 ... */ #else /* __GNUC__ */ #define likely(x) (x) #define unlikely(x) (x) #endif /* __GNUC__ */ static PyObject *__pyx_m; static PyObject *__pyx_d; static PyObject *__pyx_b; static PyObject *__pyx_empty_tuple; static PyObject *__pyx_empty_bytes; static int __pyx_lineno; static int __pyx_clineno = 0; static const char * __pyx_cfilenm= __FILE__; static const char *__pyx_filename; #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[] = { "sparse.pyx", "numpy.pxd", }; #define IS_UNSIGNED(type) (((type) -1) > 0) struct __Pyx_StructField_; #define __PYX_BUF_FLAGS_PACKED_STRUCT (1 << 0) typedef struct { const char* name; /* for error messages only */ struct __Pyx_StructField_* fields; size_t size; /* sizeof(type) */ size_t arraysize[8]; /* length of array in each dimension */ int ndim; char typegroup; /* _R_eal, _C_omplex, Signed _I_nt, _U_nsigned int, _S_truct, _P_ointer, _O_bject, c_H_ar */ 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; /* "numpy.pxd":726 * # 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; /* "numpy.pxd":727 * * 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; /* "numpy.pxd":728 * 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; /* "numpy.pxd":729 * 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; /* "numpy.pxd":733 * #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; /* "numpy.pxd":734 * * 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; /* "numpy.pxd":735 * 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; /* "numpy.pxd":736 * 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; /* "numpy.pxd":740 * #ctypedef npy_uint128 uint128_t * * ctypedef npy_float16 float16_t # <<<<<<<<<<<<<< * ctypedef npy_float32 float32_t * ctypedef npy_float64 float64_t */ typedef npy_float16 __pyx_t_5numpy_float16_t; /* "numpy.pxd":741 * * ctypedef npy_float16 float16_t * ctypedef npy_float32 float32_t # <<<<<<<<<<<<<< * ctypedef npy_float64 float64_t * #ctypedef npy_float80 float80_t */ typedef npy_float32 __pyx_t_5numpy_float32_t; /* "numpy.pxd":742 * ctypedef npy_float16 float16_t * 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; /* "numpy.pxd":751 * # 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; /* "numpy.pxd":752 * # 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; /* "numpy.pxd":753 * 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; /* "numpy.pxd":755 * 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; /* "numpy.pxd":756 * * ctypedef npy_ulong uint_t * ctypedef npy_ulonglong ulong_t # <<<<<<<<<<<<<< * ctypedef npy_ulonglong ulonglong_t * */ typedef npy_ulonglong __pyx_t_5numpy_ulong_t; /* "numpy.pxd":757 * 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; /* "numpy.pxd":759 * ctypedef npy_ulonglong ulonglong_t * * ctypedef npy_intp intp_t # <<<<<<<<<<<<<< * ctypedef npy_uintp uintp_t * */ typedef npy_intp __pyx_t_5numpy_intp_t; /* "numpy.pxd":760 * * ctypedef npy_intp intp_t * ctypedef npy_uintp uintp_t # <<<<<<<<<<<<<< * * ctypedef npy_double float_t */ typedef npy_uintp __pyx_t_5numpy_uintp_t; /* "numpy.pxd":762 * 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; /* "numpy.pxd":763 * * ctypedef npy_double float_t * ctypedef npy_double double_t # <<<<<<<<<<<<<< * ctypedef npy_longdouble longdouble_t * */ typedef npy_double __pyx_t_5numpy_double_t; /* "numpy.pxd":764 * 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; #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 #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 /*--- Type declarations ---*/ struct __pyx_obj_6pandas_7_sparse_BlockMerge; struct __pyx_obj_6pandas_7_sparse_BlockUnion; struct __pyx_obj_6pandas_7_sparse_SparseIndex; struct __pyx_obj_6pandas_7_sparse_IntIndex; struct __pyx_obj_6pandas_7_sparse_BlockIndex; struct __pyx_obj_6pandas_7_sparse_BlockIntersection; /* "numpy.pxd":766 * 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; /* "numpy.pxd":767 * * ctypedef npy_cfloat cfloat_t * ctypedef npy_cdouble cdouble_t # <<<<<<<<<<<<<< * ctypedef npy_clongdouble clongdouble_t * */ typedef npy_cdouble __pyx_t_5numpy_cdouble_t; /* "numpy.pxd":768 * 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; /* "numpy.pxd":770 * 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/src/sparse.pyx":688 * # Sparse arithmetic * * ctypedef float64_t (* double_func)(float64_t a, float64_t b) # <<<<<<<<<<<<<< * * cdef inline tuple sparse_nancombine(ndarray x, SparseIndex xindex, */ typedef __pyx_t_5numpy_float64_t (*__pyx_t_6pandas_7_sparse_double_func)(__pyx_t_5numpy_float64_t, __pyx_t_5numpy_float64_t); /* "pandas/src/sparse.pyx":527 * * * cdef class BlockMerge(object): # <<<<<<<<<<<<<< * ''' * Object-oriented approach makes sharing state between recursive functions a */ struct __pyx_obj_6pandas_7_sparse_BlockMerge { PyObject_HEAD struct __pyx_vtabstruct_6pandas_7_sparse_BlockMerge *__pyx_vtab; struct __pyx_obj_6pandas_7_sparse_BlockIndex *x; struct __pyx_obj_6pandas_7_sparse_BlockIndex *y; struct __pyx_obj_6pandas_7_sparse_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/src/sparse.pyx":575 * pass * * cdef class BlockUnion(BlockMerge): # <<<<<<<<<<<<<< * ''' * Object-oriented approach makes sharing state between recursive functions a */ struct __pyx_obj_6pandas_7_sparse_BlockUnion { struct __pyx_obj_6pandas_7_sparse_BlockMerge __pyx_base; }; /* "pandas/src/sparse.pyx":25 * * * cdef class SparseIndex: # <<<<<<<<<<<<<< * ''' * Abstract superclass for sparse index types */ struct __pyx_obj_6pandas_7_sparse_SparseIndex { PyObject_HEAD }; /* "pandas/src/sparse.pyx":33 * * * cdef class IntIndex(SparseIndex): # <<<<<<<<<<<<<< * ''' * Object for holding exact integer sparse indexing information */ struct __pyx_obj_6pandas_7_sparse_IntIndex { struct __pyx_obj_6pandas_7_sparse_SparseIndex __pyx_base; struct __pyx_vtabstruct_6pandas_7_sparse_IntIndex *__pyx_vtab; Py_ssize_t length; Py_ssize_t npoints; PyArrayObject *indices; }; /* "pandas/src/sparse.pyx":259 * # BlockIndex * * cdef class BlockIndex(SparseIndex): # <<<<<<<<<<<<<< * ''' * Object for holding block-based sparse indexing information */ struct __pyx_obj_6pandas_7_sparse_BlockIndex { struct __pyx_obj_6pandas_7_sparse_SparseIndex __pyx_base; struct __pyx_vtabstruct_6pandas_7_sparse_BlockIndex *__pyx_vtab; Py_ssize_t nblocks; Py_ssize_t npoints; Py_ssize_t length; PyArrayObject *blocs; PyArrayObject *blengths; PyObject *__weakref__; __pyx_t_5numpy_int32_t *locbuf; __pyx_t_5numpy_int32_t *lenbuf; }; /* "pandas/src/sparse.pyx":569 * self.yi = xi * * cdef class BlockIntersection(BlockMerge): # <<<<<<<<<<<<<< * ''' * not done yet */ struct __pyx_obj_6pandas_7_sparse_BlockIntersection { struct __pyx_obj_6pandas_7_sparse_BlockMerge __pyx_base; }; /* "pandas/src/sparse.pyx":527 * * * cdef class BlockMerge(object): # <<<<<<<<<<<<<< * ''' * Object-oriented approach makes sharing state between recursive functions a */ struct __pyx_vtabstruct_6pandas_7_sparse_BlockMerge { PyObject *(*_make_merged_blocks)(struct __pyx_obj_6pandas_7_sparse_BlockMerge *); PyObject *(*_set_current_indices)(struct __pyx_obj_6pandas_7_sparse_BlockMerge *, __pyx_t_5numpy_int32_t, __pyx_t_5numpy_int32_t, int); }; static struct __pyx_vtabstruct_6pandas_7_sparse_BlockMerge *__pyx_vtabptr_6pandas_7_sparse_BlockMerge; /* "pandas/src/sparse.pyx":575 * pass * * cdef class BlockUnion(BlockMerge): # <<<<<<<<<<<<<< * ''' * Object-oriented approach makes sharing state between recursive functions a */ struct __pyx_vtabstruct_6pandas_7_sparse_BlockUnion { struct __pyx_vtabstruct_6pandas_7_sparse_BlockMerge __pyx_base; __pyx_t_5numpy_int32_t (*_find_next_block_end)(struct __pyx_obj_6pandas_7_sparse_BlockUnion *, int); }; static struct __pyx_vtabstruct_6pandas_7_sparse_BlockUnion *__pyx_vtabptr_6pandas_7_sparse_BlockUnion; /* "pandas/src/sparse.pyx":259 * # BlockIndex * * cdef class BlockIndex(SparseIndex): # <<<<<<<<<<<<<< * ''' * Object for holding block-based sparse indexing information */ struct __pyx_vtabstruct_6pandas_7_sparse_BlockIndex { PyObject *(*check_integrity)(struct __pyx_obj_6pandas_7_sparse_BlockIndex *, int __pyx_skip_dispatch); struct __pyx_obj_6pandas_7_sparse_BlockIndex *(*intersect)(struct __pyx_obj_6pandas_7_sparse_BlockIndex *, struct __pyx_obj_6pandas_7_sparse_SparseIndex *, int __pyx_skip_dispatch); struct __pyx_obj_6pandas_7_sparse_BlockIndex *(*make_union)(struct __pyx_obj_6pandas_7_sparse_BlockIndex *, struct __pyx_obj_6pandas_7_sparse_SparseIndex *, int __pyx_skip_dispatch); PyObject *(*lookup)(struct __pyx_obj_6pandas_7_sparse_BlockIndex *, Py_ssize_t, int __pyx_skip_dispatch); PyArrayObject *(*reindex)(struct __pyx_obj_6pandas_7_sparse_BlockIndex *, PyArrayObject *, __pyx_t_5numpy_float64_t, struct __pyx_obj_6pandas_7_sparse_SparseIndex *, int __pyx_skip_dispatch); PyObject *(*put)(struct __pyx_obj_6pandas_7_sparse_BlockIndex *, PyArrayObject *, PyArrayObject *, PyObject *, int __pyx_skip_dispatch); PyObject *(*take)(struct __pyx_obj_6pandas_7_sparse_BlockIndex *, PyArrayObject *, PyArrayObject *, int __pyx_skip_dispatch); }; static struct __pyx_vtabstruct_6pandas_7_sparse_BlockIndex *__pyx_vtabptr_6pandas_7_sparse_BlockIndex; /* "pandas/src/sparse.pyx":569 * self.yi = xi * * cdef class BlockIntersection(BlockMerge): # <<<<<<<<<<<<<< * ''' * not done yet */ struct __pyx_vtabstruct_6pandas_7_sparse_BlockIntersection { struct __pyx_vtabstruct_6pandas_7_sparse_BlockMerge __pyx_base; }; static struct __pyx_vtabstruct_6pandas_7_sparse_BlockIntersection *__pyx_vtabptr_6pandas_7_sparse_BlockIntersection; /* "pandas/src/sparse.pyx":33 * * * cdef class IntIndex(SparseIndex): # <<<<<<<<<<<<<< * ''' * Object for holding exact integer sparse indexing information */ struct __pyx_vtabstruct_6pandas_7_sparse_IntIndex { struct __pyx_obj_6pandas_7_sparse_IntIndex *(*intersect)(struct __pyx_obj_6pandas_7_sparse_IntIndex *, struct __pyx_obj_6pandas_7_sparse_SparseIndex *, int __pyx_skip_dispatch); struct __pyx_obj_6pandas_7_sparse_IntIndex *(*make_union)(struct __pyx_obj_6pandas_7_sparse_IntIndex *, struct __pyx_obj_6pandas_7_sparse_SparseIndex *, int __pyx_skip_dispatch); PyObject *(*lookup)(struct __pyx_obj_6pandas_7_sparse_IntIndex *, Py_ssize_t, int __pyx_skip_dispatch); PyArrayObject *(*reindex)(struct __pyx_obj_6pandas_7_sparse_IntIndex *, PyArrayObject *, __pyx_t_5numpy_float64_t, struct __pyx_obj_6pandas_7_sparse_SparseIndex *, int __pyx_skip_dispatch); PyObject *(*put)(struct __pyx_obj_6pandas_7_sparse_IntIndex *, PyArrayObject *, PyArrayObject *, PyObject *, int __pyx_skip_dispatch); PyObject *(*take)(struct __pyx_obj_6pandas_7_sparse_IntIndex *, PyArrayObject *, PyArrayObject *, int __pyx_skip_dispatch); }; static struct __pyx_vtabstruct_6pandas_7_sparse_IntIndex *__pyx_vtabptr_6pandas_7_sparse_IntIndex; #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); /*proto*/ #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 /* CYTHON_REFNANNY */ #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) #if CYTHON_COMPILING_IN_CPYTHON static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name) { PyTypeObject* tp = Py_TYPE(obj); if (likely(tp->tp_getattro)) return tp->tp_getattro(obj, attr_name); #if PY_MAJOR_VERSION < 3 if (likely(tp->tp_getattr)) return tp->tp_getattr(obj, PyString_AS_STRING(attr_name)); #endif return PyObject_GetAttr(obj, attr_name); } #else #define __Pyx_PyObject_GetAttrStr(o,n) PyObject_GetAttr(o,n) #endif static PyObject *__Pyx_GetBuiltinName(PyObject *name); /*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); /*proto*/ static CYTHON_INLINE int __Pyx_CheckKeywordStrings(PyObject *kwdict, const char* function_name, int kw_allowed); /*proto*/ static CYTHON_INLINE void __Pyx_ErrRestore(PyObject *type, PyObject *value, PyObject *tb); /*proto*/ static CYTHON_INLINE void __Pyx_ErrFetch(PyObject **type, PyObject **value, PyObject **tb); /*proto*/ static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause); /*proto*/ static void __Pyx_RaiseDoubleKeywordsError(const char* func_name, PyObject* kw_name); /*proto*/ static int __Pyx_ParseOptionalKeywords(PyObject *kwds, PyObject **argnames[], \ PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args, \ const char* function_name); /*proto*/ static CYTHON_INLINE PyObject *__Pyx_GetModuleGlobalName(PyObject *name); /*proto*/ static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type); /*proto*/ static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected); static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index); static CYTHON_INLINE int __Pyx_IterFinish(void); /*proto*/ static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected); /*proto*/ static CYTHON_INLINE int __Pyx_GetBufferAndValidate(Py_buffer* buf, PyObject* obj, __Pyx_TypeInfo* dtype, int flags, int nd, int cast, __Pyx_BufFmt_StackElem* stack); static CYTHON_INLINE void __Pyx_SafeReleaseBuffer(Py_buffer* info); static void __Pyx_RaiseBufferFallbackError(void); /*proto*/ static void __Pyx_RaiseBufferIndexError(int axis); /*proto*/ #define __Pyx_BufPtrStrided1d(type, buf, i0, s0) (type)((char*)buf + i0 * s0) #if CYTHON_COMPILING_IN_CPYTHON static CYTHON_INLINE int __Pyx_PyList_Append(PyObject* list, PyObject* x) { PyListObject* L = (PyListObject*) list; Py_ssize_t len = Py_SIZE(list); if (likely(L->allocated > len) & likely(len > (L->allocated >> 1))) { Py_INCREF(x); PyList_SET_ITEM(list, len, x); Py_SIZE(list) = len+1; return 0; } return PyList_Append(list, x); } #else #define __Pyx_PyList_Append(L,x) PyList_Append(L,x) #endif static int __Pyx_ArgTypeTest(PyObject *obj, PyTypeObject *type, int none_allowed, const char *name, int exact); /*proto*/ #ifndef __PYX_FORCE_INIT_THREADS #define __PYX_FORCE_INIT_THREADS 0 #endif static void __Pyx_WriteUnraisable(const char *name, int clineno, int lineno, const char *filename); /*proto*/ static CYTHON_INLINE int __Pyx_PyDict_Contains(PyObject* item, PyObject* dict, int eq) { int result = PyDict_Contains(dict, item); return unlikely(result < 0) ? result : (result == (eq == Py_EQ)); } #if PY_MAJOR_VERSION >= 3 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; } #else #define __Pyx_PyDict_GetItem(d, key) PyObject_GetItem(d, key) #endif static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void); static int __Pyx_call_next_tp_traverse(PyObject* obj, visitproc v, void *a, traverseproc current_tp_traverse); static void __Pyx_call_next_tp_clear(PyObject* obj, inquiry current_tp_dealloc); static int __Pyx_SetVtable(PyObject *dict, void *vtable); /*proto*/ static PyObject *__Pyx_GetNameInClass(PyObject *nmspace, PyObject *name); /*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 static Py_ssize_t __Pyx_zeros[] = {0, 0, 0, 0, 0, 0, 0, 0}; static Py_ssize_t __Pyx_minusones[] = {-1, -1, -1, -1, -1, -1, -1, -1}; static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level); /*proto*/ static CYTHON_INLINE PyObject *__Pyx_PyInt_to_py_npy_int32(npy_int32); static CYTHON_INLINE npy_int32 __Pyx_PyInt_from_py_npy_int32(PyObject *); #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(_WIN32) && defined(__cplusplus) && CYTHON_CCOMPLEX #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 static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float, float); #if CYTHON_CCOMPLEX #define __Pyx_c_eqf(a, b) ((a)==(b)) #define __Pyx_c_sumf(a, b) ((a)+(b)) #define __Pyx_c_difff(a, b) ((a)-(b)) #define __Pyx_c_prodf(a, b) ((a)*(b)) #define __Pyx_c_quotf(a, b) ((a)/(b)) #define __Pyx_c_negf(a) (-(a)) #ifdef __cplusplus #define __Pyx_c_is_zerof(z) ((z)==(float)0) #define __Pyx_c_conjf(z) (::std::conj(z)) #if 1 #define __Pyx_c_absf(z) (::std::abs(z)) #define __Pyx_c_powf(a, b) (::std::pow(a, b)) #endif #else #define __Pyx_c_is_zerof(z) ((z)==0) #define __Pyx_c_conjf(z) (conjf(z)) #if 1 #define __Pyx_c_absf(z) (cabsf(z)) #define __Pyx_c_powf(a, b) (cpowf(a, b)) #endif #endif #else static CYTHON_INLINE int __Pyx_c_eqf(__pyx_t_float_complex, __pyx_t_float_complex); static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_sumf(__pyx_t_float_complex, __pyx_t_float_complex); static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_difff(__pyx_t_float_complex, __pyx_t_float_complex); static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_prodf(__pyx_t_float_complex, __pyx_t_float_complex); static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_quotf(__pyx_t_float_complex, __pyx_t_float_complex); static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_negf(__pyx_t_float_complex); static CYTHON_INLINE int __Pyx_c_is_zerof(__pyx_t_float_complex); static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_conjf(__pyx_t_float_complex); #if 1 static CYTHON_INLINE float __Pyx_c_absf(__pyx_t_float_complex); static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_powf(__pyx_t_float_complex, __pyx_t_float_complex); #endif #endif static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double, double); #if CYTHON_CCOMPLEX #define __Pyx_c_eq(a, b) ((a)==(b)) #define __Pyx_c_sum(a, b) ((a)+(b)) #define __Pyx_c_diff(a, b) ((a)-(b)) #define __Pyx_c_prod(a, b) ((a)*(b)) #define __Pyx_c_quot(a, b) ((a)/(b)) #define __Pyx_c_neg(a) (-(a)) #ifdef __cplusplus #define __Pyx_c_is_zero(z) ((z)==(double)0) #define __Pyx_c_conj(z) (::std::conj(z)) #if 1 #define __Pyx_c_abs(z) (::std::abs(z)) #define __Pyx_c_pow(a, b) (::std::pow(a, b)) #endif #else #define __Pyx_c_is_zero(z) ((z)==0) #define __Pyx_c_conj(z) (conj(z)) #if 1 #define __Pyx_c_abs(z) (cabs(z)) #define __Pyx_c_pow(a, b) (cpow(a, b)) #endif #endif #else static CYTHON_INLINE int __Pyx_c_eq(__pyx_t_double_complex, __pyx_t_double_complex); static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_sum(__pyx_t_double_complex, __pyx_t_double_complex); static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_diff(__pyx_t_double_complex, __pyx_t_double_complex); static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_prod(__pyx_t_double_complex, __pyx_t_double_complex); static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_quot(__pyx_t_double_complex, __pyx_t_double_complex); static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_neg(__pyx_t_double_complex); static CYTHON_INLINE int __Pyx_c_is_zero(__pyx_t_double_complex); static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_conj(__pyx_t_double_complex); #if 1 static CYTHON_INLINE double __Pyx_c_abs(__pyx_t_double_complex); static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_pow(__pyx_t_double_complex, __pyx_t_double_complex); #endif #endif static CYTHON_INLINE unsigned char __Pyx_PyInt_AsUnsignedChar(PyObject *); static CYTHON_INLINE unsigned short __Pyx_PyInt_AsUnsignedShort(PyObject *); static CYTHON_INLINE unsigned int __Pyx_PyInt_AsUnsignedInt(PyObject *); static CYTHON_INLINE char __Pyx_PyInt_AsChar(PyObject *); static CYTHON_INLINE short __Pyx_PyInt_AsShort(PyObject *); static CYTHON_INLINE int __Pyx_PyInt_AsInt(PyObject *); static CYTHON_INLINE signed char __Pyx_PyInt_AsSignedChar(PyObject *); static CYTHON_INLINE signed short __Pyx_PyInt_AsSignedShort(PyObject *); static CYTHON_INLINE signed int __Pyx_PyInt_AsSignedInt(PyObject *); static CYTHON_INLINE int __Pyx_PyInt_AsLongDouble(PyObject *); static CYTHON_INLINE unsigned long __Pyx_PyInt_AsUnsignedLong(PyObject *); static CYTHON_INLINE unsigned PY_LONG_LONG __Pyx_PyInt_AsUnsignedLongLong(PyObject *); static CYTHON_INLINE long __Pyx_PyInt_AsLong(PyObject *); static CYTHON_INLINE PY_LONG_LONG __Pyx_PyInt_AsLongLong(PyObject *); static CYTHON_INLINE signed long __Pyx_PyInt_AsSignedLong(PyObject *); static CYTHON_INLINE signed PY_LONG_LONG __Pyx_PyInt_AsSignedLongLong(PyObject *); static int __Pyx_check_binary_version(void); #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 static PyObject *__Pyx_ImportModule(const char *name); /*proto*/ static PyTypeObject *__Pyx_ImportType(const char *module_name, const char *class_name, size_t size, int strict); /*proto*/ typedef struct { int code_line; PyCodeObject* code_object; } __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); static void __Pyx_AddTraceback(const char *funcname, int c_line, int py_line, const char *filename); /*proto*/ static int __Pyx_InitStrings(__Pyx_StringTabEntry *t); /*proto*/ /* Module declarations from 'cpython.buffer' */ /* Module declarations from 'cpython.ref' */ /* Module declarations from 'libc.string' */ /* Module declarations from 'libc.stdio' */ /* Module declarations from 'cpython.object' */ /* Module declarations from 'libc.stdlib' */ /* 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*/ /* Module declarations from 'cython' */ /* Module declarations from 'pandas._sparse' */ static PyTypeObject *__pyx_ptype_6pandas_7_sparse_BlockMerge = 0; static PyTypeObject *__pyx_ptype_6pandas_7_sparse_BlockUnion = 0; static PyTypeObject *__pyx_ptype_6pandas_7_sparse_SparseIndex = 0; static PyTypeObject *__pyx_ptype_6pandas_7_sparse_IntIndex = 0; static PyTypeObject *__pyx_ptype_6pandas_7_sparse_BlockIndex = 0; static PyTypeObject *__pyx_ptype_6pandas_7_sparse_BlockIntersection = 0; static __pyx_t_5numpy_float64_t __pyx_v_6pandas_7_sparse_NaN; static __pyx_t_5numpy_float64_t __pyx_v_6pandas_7_sparse_INF; static PyObject *__pyx_f_6pandas_7_sparse_get_blocks(PyArrayObject *, int __pyx_skip_dispatch); /*proto*/ static CYTHON_INLINE PyObject *__pyx_f_6pandas_7_sparse_sparse_nancombine(PyArrayObject *, struct __pyx_obj_6pandas_7_sparse_SparseIndex *, PyArrayObject *, struct __pyx_obj_6pandas_7_sparse_SparseIndex *, __pyx_t_6pandas_7_sparse_double_func); /*proto*/ static CYTHON_INLINE PyObject *__pyx_f_6pandas_7_sparse_sparse_combine(PyArrayObject *, struct __pyx_obj_6pandas_7_sparse_SparseIndex *, __pyx_t_5numpy_float64_t, PyArrayObject *, struct __pyx_obj_6pandas_7_sparse_SparseIndex *, __pyx_t_5numpy_float64_t, __pyx_t_6pandas_7_sparse_double_func); /*proto*/ static CYTHON_INLINE PyObject *__pyx_f_6pandas_7_sparse_int_nanop(PyArrayObject *, struct __pyx_obj_6pandas_7_sparse_IntIndex *, PyArrayObject *, struct __pyx_obj_6pandas_7_sparse_IntIndex *, __pyx_t_6pandas_7_sparse_double_func); /*proto*/ static CYTHON_INLINE PyObject *__pyx_f_6pandas_7_sparse_block_op(PyArrayObject *, struct __pyx_obj_6pandas_7_sparse_BlockIndex *, __pyx_t_5numpy_float64_t, PyArrayObject *, struct __pyx_obj_6pandas_7_sparse_BlockIndex *, __pyx_t_5numpy_float64_t, __pyx_t_6pandas_7_sparse_double_func); /*proto*/ static CYTHON_INLINE PyObject *__pyx_f_6pandas_7_sparse_int_op(PyArrayObject *, struct __pyx_obj_6pandas_7_sparse_IntIndex *, __pyx_t_5numpy_float64_t, PyArrayObject *, struct __pyx_obj_6pandas_7_sparse_IntIndex *, __pyx_t_5numpy_float64_t, __pyx_t_6pandas_7_sparse_double_func); /*proto*/ static CYTHON_INLINE __pyx_t_5numpy_float64_t __pyx_f_6pandas_7_sparse___add(__pyx_t_5numpy_float64_t, __pyx_t_5numpy_float64_t); /*proto*/ static CYTHON_INLINE __pyx_t_5numpy_float64_t __pyx_f_6pandas_7_sparse___sub(__pyx_t_5numpy_float64_t, __pyx_t_5numpy_float64_t); /*proto*/ static CYTHON_INLINE __pyx_t_5numpy_float64_t __pyx_f_6pandas_7_sparse___rsub(__pyx_t_5numpy_float64_t, __pyx_t_5numpy_float64_t); /*proto*/ static CYTHON_INLINE __pyx_t_5numpy_float64_t __pyx_f_6pandas_7_sparse___div(__pyx_t_5numpy_float64_t, __pyx_t_5numpy_float64_t); /*proto*/ static CYTHON_INLINE __pyx_t_5numpy_float64_t __pyx_f_6pandas_7_sparse___rdiv(__pyx_t_5numpy_float64_t, __pyx_t_5numpy_float64_t); /*proto*/ static CYTHON_INLINE __pyx_t_5numpy_float64_t __pyx_f_6pandas_7_sparse___floordiv(__pyx_t_5numpy_float64_t, __pyx_t_5numpy_float64_t); /*proto*/ static CYTHON_INLINE __pyx_t_5numpy_float64_t __pyx_f_6pandas_7_sparse___rfloordiv(__pyx_t_5numpy_float64_t, __pyx_t_5numpy_float64_t); /*proto*/ static CYTHON_INLINE __pyx_t_5numpy_float64_t __pyx_f_6pandas_7_sparse___mul(__pyx_t_5numpy_float64_t, __pyx_t_5numpy_float64_t); /*proto*/ static CYTHON_INLINE __pyx_t_5numpy_float64_t __pyx_f_6pandas_7_sparse___pow(__pyx_t_5numpy_float64_t, __pyx_t_5numpy_float64_t); /*proto*/ static CYTHON_INLINE __pyx_t_5numpy_float64_t __pyx_f_6pandas_7_sparse___rpow(__pyx_t_5numpy_float64_t, __pyx_t_5numpy_float64_t); /*proto*/ static PyObject *__pyx_f_6pandas_7_sparse_sparse_nanadd(PyArrayObject *, struct __pyx_obj_6pandas_7_sparse_SparseIndex *, PyArrayObject *, struct __pyx_obj_6pandas_7_sparse_SparseIndex *, int __pyx_skip_dispatch); /*proto*/ static PyObject *__pyx_f_6pandas_7_sparse_sparse_nansub(PyArrayObject *, struct __pyx_obj_6pandas_7_sparse_SparseIndex *, PyArrayObject *, struct __pyx_obj_6pandas_7_sparse_SparseIndex *, int __pyx_skip_dispatch); /*proto*/ static PyObject *__pyx_f_6pandas_7_sparse_sparse_nanrsub(PyArrayObject *, struct __pyx_obj_6pandas_7_sparse_SparseIndex *, PyArrayObject *, struct __pyx_obj_6pandas_7_sparse_SparseIndex *, int __pyx_skip_dispatch); /*proto*/ static PyObject *__pyx_f_6pandas_7_sparse_sparse_nanmul(PyArrayObject *, struct __pyx_obj_6pandas_7_sparse_SparseIndex *, PyArrayObject *, struct __pyx_obj_6pandas_7_sparse_SparseIndex *, int __pyx_skip_dispatch); /*proto*/ static PyObject *__pyx_f_6pandas_7_sparse_sparse_nandiv(PyArrayObject *, struct __pyx_obj_6pandas_7_sparse_SparseIndex *, PyArrayObject *, struct __pyx_obj_6pandas_7_sparse_SparseIndex *, int __pyx_skip_dispatch); /*proto*/ static PyObject *__pyx_f_6pandas_7_sparse_sparse_nanrdiv(PyArrayObject *, struct __pyx_obj_6pandas_7_sparse_SparseIndex *, PyArrayObject *, struct __pyx_obj_6pandas_7_sparse_SparseIndex *, int __pyx_skip_dispatch); /*proto*/ static PyObject *__pyx_f_6pandas_7_sparse_sparse_nanfloordiv(PyArrayObject *, struct __pyx_obj_6pandas_7_sparse_SparseIndex *, PyArrayObject *, struct __pyx_obj_6pandas_7_sparse_SparseIndex *, int __pyx_skip_dispatch); /*proto*/ static PyObject *__pyx_f_6pandas_7_sparse_sparse_nanrfloordiv(PyArrayObject *, struct __pyx_obj_6pandas_7_sparse_SparseIndex *, PyArrayObject *, struct __pyx_obj_6pandas_7_sparse_SparseIndex *, int __pyx_skip_dispatch); /*proto*/ static PyObject *__pyx_f_6pandas_7_sparse_sparse_nanpow(PyArrayObject *, struct __pyx_obj_6pandas_7_sparse_SparseIndex *, PyArrayObject *, struct __pyx_obj_6pandas_7_sparse_SparseIndex *, int __pyx_skip_dispatch); /*proto*/ static PyObject *__pyx_f_6pandas_7_sparse_sparse_nanrpow(PyArrayObject *, struct __pyx_obj_6pandas_7_sparse_SparseIndex *, PyArrayObject *, struct __pyx_obj_6pandas_7_sparse_SparseIndex *, int __pyx_skip_dispatch); /*proto*/ static PyObject *__pyx_f_6pandas_7_sparse_sparse_add(PyArrayObject *, struct __pyx_obj_6pandas_7_sparse_SparseIndex *, __pyx_t_5numpy_float64_t, PyArrayObject *, struct __pyx_obj_6pandas_7_sparse_SparseIndex *, __pyx_t_5numpy_float64_t, int __pyx_skip_dispatch); /*proto*/ static PyObject *__pyx_f_6pandas_7_sparse_sparse_sub(PyArrayObject *, struct __pyx_obj_6pandas_7_sparse_SparseIndex *, __pyx_t_5numpy_float64_t, PyArrayObject *, struct __pyx_obj_6pandas_7_sparse_SparseIndex *, __pyx_t_5numpy_float64_t, int __pyx_skip_dispatch); /*proto*/ static PyObject *__pyx_f_6pandas_7_sparse_sparse_rsub(PyArrayObject *, struct __pyx_obj_6pandas_7_sparse_SparseIndex *, __pyx_t_5numpy_float64_t, PyArrayObject *, struct __pyx_obj_6pandas_7_sparse_SparseIndex *, __pyx_t_5numpy_float64_t, int __pyx_skip_dispatch); /*proto*/ static PyObject *__pyx_f_6pandas_7_sparse_sparse_mul(PyArrayObject *, struct __pyx_obj_6pandas_7_sparse_SparseIndex *, __pyx_t_5numpy_float64_t, PyArrayObject *, struct __pyx_obj_6pandas_7_sparse_SparseIndex *, __pyx_t_5numpy_float64_t, int __pyx_skip_dispatch); /*proto*/ static PyObject *__pyx_f_6pandas_7_sparse_sparse_div(PyArrayObject *, struct __pyx_obj_6pandas_7_sparse_SparseIndex *, __pyx_t_5numpy_float64_t, PyArrayObject *, struct __pyx_obj_6pandas_7_sparse_SparseIndex *, __pyx_t_5numpy_float64_t, int __pyx_skip_dispatch); /*proto*/ static PyObject *__pyx_f_6pandas_7_sparse_sparse_rdiv(PyArrayObject *, struct __pyx_obj_6pandas_7_sparse_SparseIndex *, __pyx_t_5numpy_float64_t, PyArrayObject *, struct __pyx_obj_6pandas_7_sparse_SparseIndex *, __pyx_t_5numpy_float64_t, int __pyx_skip_dispatch); /*proto*/ static PyObject *__pyx_f_6pandas_7_sparse_sparse_floordiv(PyArrayObject *, struct __pyx_obj_6pandas_7_sparse_SparseIndex *, __pyx_t_5numpy_float64_t, PyArrayObject *, struct __pyx_obj_6pandas_7_sparse_SparseIndex *, __pyx_t_5numpy_float64_t, int __pyx_skip_dispatch); /*proto*/ static PyObject *__pyx_f_6pandas_7_sparse_sparse_rfloordiv(PyArrayObject *, struct __pyx_obj_6pandas_7_sparse_SparseIndex *, __pyx_t_5numpy_float64_t, PyArrayObject *, struct __pyx_obj_6pandas_7_sparse_SparseIndex *, __pyx_t_5numpy_float64_t, int __pyx_skip_dispatch); /*proto*/ static PyObject *__pyx_f_6pandas_7_sparse_sparse_pow(PyArrayObject *, struct __pyx_obj_6pandas_7_sparse_SparseIndex *, __pyx_t_5numpy_float64_t, PyArrayObject *, struct __pyx_obj_6pandas_7_sparse_SparseIndex *, __pyx_t_5numpy_float64_t, int __pyx_skip_dispatch); /*proto*/ static PyObject *__pyx_f_6pandas_7_sparse_sparse_rpow(PyArrayObject *, struct __pyx_obj_6pandas_7_sparse_SparseIndex *, __pyx_t_5numpy_float64_t, PyArrayObject *, struct __pyx_obj_6pandas_7_sparse_SparseIndex *, __pyx_t_5numpy_float64_t, int __pyx_skip_dispatch); /*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_float64_t = { "float64_t", NULL, sizeof(__pyx_t_5numpy_float64_t), { 0 }, 0, 'R', 0, 0 }; static __Pyx_TypeInfo __Pyx_TypeInfo_object = { "Python object", NULL, sizeof(PyObject *), { 0 }, 0, 'O', 0, 0 }; #define __Pyx_MODULE_NAME "pandas._sparse" int __pyx_module_is_main_pandas___sparse = 0; /* Implementation of 'pandas._sparse' */ static PyObject *__pyx_builtin_property; static PyObject *__pyx_builtin_NotImplementedError; static PyObject *__pyx_builtin_Exception; static PyObject *__pyx_builtin_ValueError; static PyObject *__pyx_builtin_range; static PyObject *__pyx_builtin_RuntimeError; static int __pyx_pf_6pandas_7_sparse_11SparseIndex___init__(CYTHON_UNUSED struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_self); /* proto */ static int __pyx_pf_6pandas_7_sparse_8IntIndex___init__(struct __pyx_obj_6pandas_7_sparse_IntIndex *__pyx_v_self, Py_ssize_t __pyx_v_length, PyObject *__pyx_v_indices); /* proto */ static PyObject *__pyx_pf_6pandas_7_sparse_8IntIndex_2__reduce__(struct __pyx_obj_6pandas_7_sparse_IntIndex *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_7_sparse_8IntIndex_4__repr__(struct __pyx_obj_6pandas_7_sparse_IntIndex *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_7_sparse_8IntIndex_6check_integrity(CYTHON_UNUSED struct __pyx_obj_6pandas_7_sparse_IntIndex *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_7_sparse_8IntIndex_8equals(struct __pyx_obj_6pandas_7_sparse_IntIndex *__pyx_v_self, PyObject *__pyx_v_other); /* proto */ static PyObject *__pyx_pf_6pandas_7_sparse_8IntIndex_10ngaps(struct __pyx_obj_6pandas_7_sparse_IntIndex *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_7_sparse_8IntIndex_12to_int_index(struct __pyx_obj_6pandas_7_sparse_IntIndex *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_7_sparse_8IntIndex_14to_block_index(struct __pyx_obj_6pandas_7_sparse_IntIndex *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_7_sparse_8IntIndex_16intersect(struct __pyx_obj_6pandas_7_sparse_IntIndex *__pyx_v_self, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_y_); /* proto */ static PyObject *__pyx_pf_6pandas_7_sparse_8IntIndex_18make_union(struct __pyx_obj_6pandas_7_sparse_IntIndex *__pyx_v_self, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_y_); /* proto */ static PyObject *__pyx_pf_6pandas_7_sparse_8IntIndex_20lookup(struct __pyx_obj_6pandas_7_sparse_IntIndex *__pyx_v_self, Py_ssize_t __pyx_v_index); /* proto */ static PyObject *__pyx_pf_6pandas_7_sparse_8IntIndex_22reindex(struct __pyx_obj_6pandas_7_sparse_IntIndex *__pyx_v_self, PyArrayObject *__pyx_v_values, __pyx_t_5numpy_float64_t __pyx_v_fill_value, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_other_); /* proto */ static PyObject *__pyx_pf_6pandas_7_sparse_8IntIndex_24put(struct __pyx_obj_6pandas_7_sparse_IntIndex *__pyx_v_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_indices, PyObject *__pyx_v_to_put); /* proto */ static PyObject *__pyx_pf_6pandas_7_sparse_8IntIndex_26take(struct __pyx_obj_6pandas_7_sparse_IntIndex *__pyx_v_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_indices); /* proto */ static PyObject *__pyx_pf_6pandas_7_sparse_8IntIndex_6length___get__(struct __pyx_obj_6pandas_7_sparse_IntIndex *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_7_sparse_8IntIndex_7npoints___get__(struct __pyx_obj_6pandas_7_sparse_IntIndex *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_7_sparse_8IntIndex_7indices___get__(struct __pyx_obj_6pandas_7_sparse_IntIndex *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_7_sparse_get_blocks(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_indices); /* proto */ static int __pyx_pf_6pandas_7_sparse_10BlockIndex___init__(struct __pyx_obj_6pandas_7_sparse_BlockIndex *__pyx_v_self, PyObject *__pyx_v_length, PyObject *__pyx_v_blocs, PyObject *__pyx_v_blengths); /* proto */ static PyObject *__pyx_pf_6pandas_7_sparse_10BlockIndex_2__reduce__(struct __pyx_obj_6pandas_7_sparse_BlockIndex *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_7_sparse_10BlockIndex_4__repr__(struct __pyx_obj_6pandas_7_sparse_BlockIndex *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_7_sparse_10BlockIndex_6ngaps(struct __pyx_obj_6pandas_7_sparse_BlockIndex *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_7_sparse_10BlockIndex_8check_integrity(struct __pyx_obj_6pandas_7_sparse_BlockIndex *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_7_sparse_10BlockIndex_10equals(struct __pyx_obj_6pandas_7_sparse_BlockIndex *__pyx_v_self, PyObject *__pyx_v_other); /* proto */ static PyObject *__pyx_pf_6pandas_7_sparse_10BlockIndex_12to_block_index(struct __pyx_obj_6pandas_7_sparse_BlockIndex *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_7_sparse_10BlockIndex_14to_int_index(struct __pyx_obj_6pandas_7_sparse_BlockIndex *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_7_sparse_10BlockIndex_16intersect(struct __pyx_obj_6pandas_7_sparse_BlockIndex *__pyx_v_self, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_other); /* proto */ static PyObject *__pyx_pf_6pandas_7_sparse_10BlockIndex_18make_union(struct __pyx_obj_6pandas_7_sparse_BlockIndex *__pyx_v_self, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_y); /* proto */ static PyObject *__pyx_pf_6pandas_7_sparse_10BlockIndex_20lookup(struct __pyx_obj_6pandas_7_sparse_BlockIndex *__pyx_v_self, Py_ssize_t __pyx_v_index); /* proto */ static PyObject *__pyx_pf_6pandas_7_sparse_10BlockIndex_22reindex(struct __pyx_obj_6pandas_7_sparse_BlockIndex *__pyx_v_self, PyArrayObject *__pyx_v_values, __pyx_t_5numpy_float64_t __pyx_v_fill_value, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_other_); /* proto */ static PyObject *__pyx_pf_6pandas_7_sparse_10BlockIndex_24put(struct __pyx_obj_6pandas_7_sparse_BlockIndex *__pyx_v_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_indices, PyObject *__pyx_v_to_put); /* proto */ static PyObject *__pyx_pf_6pandas_7_sparse_10BlockIndex_26take(struct __pyx_obj_6pandas_7_sparse_BlockIndex *__pyx_v_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_indices); /* proto */ static PyObject *__pyx_pf_6pandas_7_sparse_10BlockIndex_7nblocks___get__(struct __pyx_obj_6pandas_7_sparse_BlockIndex *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_7_sparse_10BlockIndex_7npoints___get__(struct __pyx_obj_6pandas_7_sparse_BlockIndex *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_7_sparse_10BlockIndex_6length___get__(struct __pyx_obj_6pandas_7_sparse_BlockIndex *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_7_sparse_10BlockIndex_5blocs___get__(struct __pyx_obj_6pandas_7_sparse_BlockIndex *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_7_sparse_10BlockIndex_8blengths___get__(struct __pyx_obj_6pandas_7_sparse_BlockIndex *__pyx_v_self); /* proto */ static int __pyx_pf_6pandas_7_sparse_10BlockMerge___init__(struct __pyx_obj_6pandas_7_sparse_BlockMerge *__pyx_v_self, struct __pyx_obj_6pandas_7_sparse_BlockIndex *__pyx_v_x, struct __pyx_obj_6pandas_7_sparse_BlockIndex *__pyx_v_y); /* proto */ static PyObject *__pyx_pf_6pandas_7_sparse_2sparse_nanadd(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_x, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_xindex, PyArrayObject *__pyx_v_y, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_yindex); /* proto */ static PyObject *__pyx_pf_6pandas_7_sparse_4sparse_nansub(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_x, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_xindex, PyArrayObject *__pyx_v_y, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_yindex); /* proto */ static PyObject *__pyx_pf_6pandas_7_sparse_6sparse_nanrsub(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_x, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_xindex, PyArrayObject *__pyx_v_y, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_yindex); /* proto */ static PyObject *__pyx_pf_6pandas_7_sparse_8sparse_nanmul(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_x, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_xindex, PyArrayObject *__pyx_v_y, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_yindex); /* proto */ static PyObject *__pyx_pf_6pandas_7_sparse_10sparse_nandiv(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_x, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_xindex, PyArrayObject *__pyx_v_y, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_yindex); /* proto */ static PyObject *__pyx_pf_6pandas_7_sparse_12sparse_nanrdiv(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_x, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_xindex, PyArrayObject *__pyx_v_y, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_yindex); /* proto */ static PyObject *__pyx_pf_6pandas_7_sparse_14sparse_nanfloordiv(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_x, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_xindex, PyArrayObject *__pyx_v_y, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_yindex); /* proto */ static PyObject *__pyx_pf_6pandas_7_sparse_16sparse_nanrfloordiv(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_x, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_xindex, PyArrayObject *__pyx_v_y, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_yindex); /* proto */ static PyObject *__pyx_pf_6pandas_7_sparse_18sparse_nanpow(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_x, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_xindex, PyArrayObject *__pyx_v_y, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_yindex); /* proto */ static PyObject *__pyx_pf_6pandas_7_sparse_20sparse_nanrpow(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_x, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_xindex, PyArrayObject *__pyx_v_y, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_yindex); /* proto */ static PyObject *__pyx_pf_6pandas_7_sparse_22sparse_add(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_x, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_xindex, __pyx_t_5numpy_float64_t __pyx_v_xfill, PyArrayObject *__pyx_v_y, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_yindex, __pyx_t_5numpy_float64_t __pyx_v_yfill); /* proto */ static PyObject *__pyx_pf_6pandas_7_sparse_24sparse_sub(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_x, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_xindex, __pyx_t_5numpy_float64_t __pyx_v_xfill, PyArrayObject *__pyx_v_y, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_yindex, __pyx_t_5numpy_float64_t __pyx_v_yfill); /* proto */ static PyObject *__pyx_pf_6pandas_7_sparse_26sparse_rsub(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_x, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_xindex, __pyx_t_5numpy_float64_t __pyx_v_xfill, PyArrayObject *__pyx_v_y, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_yindex, __pyx_t_5numpy_float64_t __pyx_v_yfill); /* proto */ static PyObject *__pyx_pf_6pandas_7_sparse_28sparse_mul(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_x, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_xindex, __pyx_t_5numpy_float64_t __pyx_v_xfill, PyArrayObject *__pyx_v_y, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_yindex, __pyx_t_5numpy_float64_t __pyx_v_yfill); /* proto */ static PyObject *__pyx_pf_6pandas_7_sparse_30sparse_div(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_x, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_xindex, __pyx_t_5numpy_float64_t __pyx_v_xfill, PyArrayObject *__pyx_v_y, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_yindex, __pyx_t_5numpy_float64_t __pyx_v_yfill); /* proto */ static PyObject *__pyx_pf_6pandas_7_sparse_32sparse_rdiv(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_x, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_xindex, __pyx_t_5numpy_float64_t __pyx_v_xfill, PyArrayObject *__pyx_v_y, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_yindex, __pyx_t_5numpy_float64_t __pyx_v_yfill); /* proto */ static PyObject *__pyx_pf_6pandas_7_sparse_34sparse_floordiv(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_x, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_xindex, __pyx_t_5numpy_float64_t __pyx_v_xfill, PyArrayObject *__pyx_v_y, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_yindex, __pyx_t_5numpy_float64_t __pyx_v_yfill); /* proto */ static PyObject *__pyx_pf_6pandas_7_sparse_36sparse_rfloordiv(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_x, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_xindex, __pyx_t_5numpy_float64_t __pyx_v_xfill, PyArrayObject *__pyx_v_y, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_yindex, __pyx_t_5numpy_float64_t __pyx_v_yfill); /* proto */ static PyObject *__pyx_pf_6pandas_7_sparse_38sparse_pow(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_x, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_xindex, __pyx_t_5numpy_float64_t __pyx_v_xfill, PyArrayObject *__pyx_v_y, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_yindex, __pyx_t_5numpy_float64_t __pyx_v_yfill); /* proto */ static PyObject *__pyx_pf_6pandas_7_sparse_40sparse_rpow(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_x, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_xindex, __pyx_t_5numpy_float64_t __pyx_v_xfill, PyArrayObject *__pyx_v_y, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_yindex, __pyx_t_5numpy_float64_t __pyx_v_yfill); /* proto */ static PyObject *__pyx_pf_6pandas_7_sparse_42get_reindexer(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyObject *__pyx_v_index_map); /* proto */ static PyObject *__pyx_pf_6pandas_7_sparse_44reindex_integer(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyArrayObject *__pyx_v_values, CYTHON_UNUSED struct __pyx_obj_6pandas_7_sparse_IntIndex *__pyx_v_sparse_index, CYTHON_UNUSED PyArrayObject *__pyx_v_indexer); /* 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_7_sparse_BlockMerge(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_6pandas_7_sparse_BlockUnion(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_6pandas_7_sparse_SparseIndex(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_6pandas_7_sparse_IntIndex(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_6pandas_7_sparse_BlockIndex(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_6pandas_7_sparse_BlockIntersection(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static char __pyx_k_1[] = "IntIndex\n"; static char __pyx_k_2[] = "Indices: %s\n"; static char __pyx_k_3[] = "Indices must reference same underlying length"; static char __pyx_k_6[] = "BlockIndex\n"; static char __pyx_k_7[] = "Block locations: %s\n"; static char __pyx_k_8[] = "Block lengths: %s"; static char __pyx_k_9[] = "block bound arrays must be same length"; static char __pyx_k_11[] = "Locations not in ascending order"; static char __pyx_k_13[] = "Block %d overlaps"; static char __pyx_k_14[] = "Block %d extends beyond end"; static char __pyx_k_15[] = "Zero-length block %d"; static char __pyx_k_18[] = "Mode must be 0 or 1"; static char __pyx_k_20[] = "ndarray is not C contiguous"; static char __pyx_k_22[] = "ndarray is not Fortran contiguous"; static char __pyx_k_24[] = "Non-native byte order not supported"; static char __pyx_k_26[] = "unknown dtype code in numpy.pxd (%d)"; static char __pyx_k_27[] = "Format string allocated too short, see comment in numpy.pxd"; static char __pyx_k_30[] = "Format string allocated too short."; static char __pyx_k_34[] = "/home/yoh/deb/gits/pkg-exppsy/pandas/pandas/src/sparse.pyx"; static char __pyx_k_35[] = "pandas._sparse"; static char __pyx_k__B[] = "B"; static char __pyx_k__H[] = "H"; static char __pyx_k__I[] = "I"; static char __pyx_k__L[] = "L"; static char __pyx_k__O[] = "O"; static char __pyx_k__Q[] = "Q"; static char __pyx_k__b[] = "b"; static char __pyx_k__d[] = "d"; static char __pyx_k__f[] = "f"; static char __pyx_k__g[] = "g"; static char __pyx_k__h[] = "h"; static char __pyx_k__i[] = "i"; static char __pyx_k__l[] = "l"; static char __pyx_k__q[] = "q"; static char __pyx_k__x[] = "x"; static char __pyx_k__y[] = "y"; static char __pyx_k__Zd[] = "Zd"; static char __pyx_k__Zf[] = "Zf"; static char __pyx_k__Zg[] = "Zg"; static char __pyx_k__np[] = "np"; static char __pyx_k__NaN[] = "NaN"; static char __pyx_k__idx[] = "idx"; static char __pyx_k__inf[] = "inf"; static char __pyx_k__put[] = "put"; static char __pyx_k__sum[] = "sum"; static char __pyx_k__sys[] = "sys"; static char __pyx_k__fill[] = "fill"; static char __pyx_k__take[] = "take"; static char __pyx_k__blocs[] = "blocs"; static char __pyx_k__dtype[] = "dtype"; static char __pyx_k__empty[] = "empty"; static char __pyx_k__int32[] = "int32"; static char __pyx_k__ngaps[] = "ngaps"; static char __pyx_k__numpy[] = "numpy"; static char __pyx_k__range[] = "range"; static char __pyx_k__xfill[] = "xfill"; static char __pyx_k__yfill[] = "yfill"; static char __pyx_k__length[] = "length"; static char __pyx_k__lookup[] = "lookup"; static char __pyx_k__other_[] = "other_"; static char __pyx_k__to_put[] = "to_put"; static char __pyx_k__values[] = "values"; static char __pyx_k__xindex[] = "xindex"; static char __pyx_k__yindex[] = "yindex"; static char __pyx_k__float64[] = "float64"; static char __pyx_k__indexer[] = "indexer"; static char __pyx_k__indices[] = "indices"; static char __pyx_k__reindex[] = "reindex"; static char __pyx_k____main__[] = "__main__"; static char __pyx_k____test__[] = "__test__"; static char __pyx_k__blengths[] = "blengths"; static char __pyx_k__operator[] = "operator"; static char __pyx_k__property[] = "property"; static char __pyx_k__Exception[] = "Exception"; static char __pyx_k__index_map[] = "index_map"; static char __pyx_k__intersect[] = "intersect"; static char __pyx_k__ValueError[] = "ValueError"; static char __pyx_k____import__[] = "__import__"; static char __pyx_k__fill_value[] = "fill_value"; static char __pyx_k__make_union[] = "make_union"; static char __pyx_k__new_length[] = "new_length"; static char __pyx_k__sparse_div[] = "sparse_div"; static char __pyx_k__array_equal[] = "array_equal"; static char __pyx_k__sparse_rdiv[] = "sparse_rdiv"; static char __pyx_k__RuntimeError[] = "RuntimeError"; static char __pyx_k__searchsorted[] = "searchsorted"; static char __pyx_k__sparse_index[] = "sparse_index"; static char __pyx_k__to_int_index[] = "to_int_index"; static char __pyx_k__get_reindexer[] = "get_reindexer"; static char __pyx_k__sparse_nandiv[] = "sparse_nandiv"; static char __pyx_k____pyx_vtable__[] = "__pyx_vtable__"; static char __pyx_k__sparse_nanrdiv[] = "sparse_nanrdiv"; static char __pyx_k__sparse_truediv[] = "sparse_truediv"; static char __pyx_k__to_block_index[] = "to_block_index"; static char __pyx_k____pyx_getbuffer[] = "__pyx_getbuffer"; static char __pyx_k__check_integrity[] = "check_integrity"; static char __pyx_k__reindex_integer[] = "reindex_integer"; static char __pyx_k__sparse_rtruediv[] = "sparse_rtruediv"; static char __pyx_k__ascontiguousarray[] = "ascontiguousarray"; static char __pyx_k__sparse_nantruediv[] = "sparse_nantruediv"; static char __pyx_k__sparse_nanrtruediv[] = "sparse_nanrtruediv"; static char __pyx_k__NotImplementedError[] = "NotImplementedError"; static char __pyx_k____pyx_releasebuffer[] = "__pyx_releasebuffer"; static PyObject *__pyx_n_s_1; static PyObject *__pyx_kp_s_11; static PyObject *__pyx_kp_s_13; static PyObject *__pyx_kp_s_14; static PyObject *__pyx_kp_s_15; static PyObject *__pyx_kp_s_18; static PyObject *__pyx_kp_s_2; static PyObject *__pyx_kp_u_20; static PyObject *__pyx_kp_u_22; static PyObject *__pyx_kp_u_24; static PyObject *__pyx_kp_u_26; static PyObject *__pyx_kp_u_27; static PyObject *__pyx_kp_s_3; static PyObject *__pyx_kp_u_30; static PyObject *__pyx_kp_s_34; static PyObject *__pyx_n_s_35; static PyObject *__pyx_n_s_6; static PyObject *__pyx_kp_s_7; static PyObject *__pyx_kp_s_8; static PyObject *__pyx_kp_s_9; static PyObject *__pyx_n_s__Exception; static PyObject *__pyx_n_s__NaN; static PyObject *__pyx_n_s__NotImplementedError; static PyObject *__pyx_n_s__RuntimeError; static PyObject *__pyx_n_s__ValueError; static PyObject *__pyx_n_s____import__; static PyObject *__pyx_n_s____main__; static PyObject *__pyx_n_s____pyx_getbuffer; static PyObject *__pyx_n_s____pyx_releasebuffer; static PyObject *__pyx_n_s____pyx_vtable__; static PyObject *__pyx_n_s____test__; static PyObject *__pyx_n_s__array_equal; static PyObject *__pyx_n_s__ascontiguousarray; static PyObject *__pyx_n_s__blengths; static PyObject *__pyx_n_s__blocs; static PyObject *__pyx_n_s__check_integrity; static PyObject *__pyx_n_s__dtype; static PyObject *__pyx_n_s__empty; static PyObject *__pyx_n_s__fill; static PyObject *__pyx_n_s__fill_value; static PyObject *__pyx_n_s__float64; static PyObject *__pyx_n_s__get_reindexer; static PyObject *__pyx_n_s__i; static PyObject *__pyx_n_s__idx; 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__intersect; static PyObject *__pyx_n_s__length; static PyObject *__pyx_n_s__lookup; static PyObject *__pyx_n_s__make_union; static PyObject *__pyx_n_s__new_length; static PyObject *__pyx_n_s__ngaps; static PyObject *__pyx_n_s__np; static PyObject *__pyx_n_s__numpy; static PyObject *__pyx_n_s__operator; static PyObject *__pyx_n_s__other_; static PyObject *__pyx_n_s__property; static PyObject *__pyx_n_s__put; static PyObject *__pyx_n_s__range; static PyObject *__pyx_n_s__reindex; static PyObject *__pyx_n_s__reindex_integer; static PyObject *__pyx_n_s__searchsorted; static PyObject *__pyx_n_s__sparse_div; static PyObject *__pyx_n_s__sparse_index; static PyObject *__pyx_n_s__sparse_nandiv; static PyObject *__pyx_n_s__sparse_nanrdiv; static PyObject *__pyx_n_s__sparse_nanrtruediv; static PyObject *__pyx_n_s__sparse_nantruediv; static PyObject *__pyx_n_s__sparse_rdiv; static PyObject *__pyx_n_s__sparse_rtruediv; static PyObject *__pyx_n_s__sparse_truediv; static PyObject *__pyx_n_s__sum; static PyObject *__pyx_n_s__sys; static PyObject *__pyx_n_s__take; 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__values; 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 PyObject *__pyx_int_neg_1; static PyObject *__pyx_int_15; static PyObject *__pyx_k_tuple_4; static PyObject *__pyx_k_tuple_5; static PyObject *__pyx_k_tuple_10; static PyObject *__pyx_k_tuple_12; static PyObject *__pyx_k_tuple_16; static PyObject *__pyx_k_tuple_17; static PyObject *__pyx_k_tuple_19; static PyObject *__pyx_k_tuple_21; static PyObject *__pyx_k_tuple_23; static PyObject *__pyx_k_tuple_25; static PyObject *__pyx_k_tuple_28; static PyObject *__pyx_k_tuple_29; static PyObject *__pyx_k_tuple_31; static PyObject *__pyx_k_tuple_32; static PyObject *__pyx_k_tuple_36; static PyObject *__pyx_k_codeobj_33; static PyObject *__pyx_k_codeobj_37; /* "pandas/src/sparse.pyx":19 * 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_7_sparse_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; __pyx_r = 0; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/sparse.pyx":20 * * 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_7_sparse_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; __pyx_r = 0; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pandas_7_sparse_11SparseIndex_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_pw_6pandas_7_sparse_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_7_sparse_11SparseIndex___init__(((struct __pyx_obj_6pandas_7_sparse_SparseIndex *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/sparse.pyx":29 * Abstract superclass for sparse index types * ''' * def __init__(self): # <<<<<<<<<<<<<< * raise NotImplementedError * */ static int __pyx_pf_6pandas_7_sparse_11SparseIndex___init__(CYTHON_UNUSED struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__init__", 0); /* "pandas/src/sparse.pyx":30 * ''' * def __init__(self): * raise NotImplementedError # <<<<<<<<<<<<<< * * */ __Pyx_Raise(__pyx_builtin_NotImplementedError, 0, 0, 0); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 30; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("pandas._sparse.SparseIndex.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pandas_7_sparse_8IntIndex_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_pw_6pandas_7_sparse_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_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 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); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__length)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__indices)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 47; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 47; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 47; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 47; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas._sparse.IntIndex.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return -1; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pandas_7_sparse_8IntIndex___init__(((struct __pyx_obj_6pandas_7_sparse_IntIndex *)__pyx_v_self), __pyx_v_length, __pyx_v_indices); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/sparse.pyx":47 * ndarray indices * * def __init__(self, Py_ssize_t length, indices): # <<<<<<<<<<<<<< * self.length = length * self.indices = np.ascontiguousarray(indices, dtype=np.int32) */ static int __pyx_pf_6pandas_7_sparse_8IntIndex___init__(struct __pyx_obj_6pandas_7_sparse_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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__init__", 0); /* "pandas/src/sparse.pyx":48 * * 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/src/sparse.pyx":49 * 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_filename = __pyx_f[0]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_indices); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_indices); __Pyx_GIVEREF(__pyx_v_indices); __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_3)); __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (PyDict_SetItem(__pyx_t_3, ((PyObject *)__pyx_n_s__dtype), __pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_1), ((PyObject *)__pyx_t_3)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __Pyx_DECREF(((PyObject *)__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_filename = __pyx_f[0]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __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/src/sparse.pyx":50 * self.length = length * self.indices = np.ascontiguousarray(indices, dtype=np.int32) * self.npoints = len(self.indices) # <<<<<<<<<<<<<< * * def __reduce__(self): */ __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 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 50; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_v_self->npoints = __pyx_t_6; __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._sparse.IntIndex.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_7_sparse_8IntIndex_3__reduce__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static PyObject *__pyx_pw_6pandas_7_sparse_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_7_sparse_8IntIndex_2__reduce__(((struct __pyx_obj_6pandas_7_sparse_IntIndex *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/sparse.pyx":52 * self.npoints = len(self.indices) * * def __reduce__(self): # <<<<<<<<<<<<<< * args = (self.length, self.indices) * return (IntIndex, args) */ static PyObject *__pyx_pf_6pandas_7_sparse_8IntIndex_2__reduce__(struct __pyx_obj_6pandas_7_sparse_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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__reduce__", 0); /* "pandas/src/sparse.pyx":53 * * 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_filename = __pyx_f[0]; __pyx_lineno = 53; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 53; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)__pyx_v_self->indices)); PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)__pyx_v_self->indices)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self->indices)); __pyx_t_1 = 0; __pyx_v_args = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/sparse.pyx":54 * 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_filename = __pyx_f[0]; __pyx_lineno = 54; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(((PyObject *)((PyObject*)__pyx_ptype_6pandas_7_sparse_IntIndex))); PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)((PyObject*)__pyx_ptype_6pandas_7_sparse_IntIndex))); __Pyx_GIVEREF(((PyObject *)((PyObject*)__pyx_ptype_6pandas_7_sparse_IntIndex))); __Pyx_INCREF(((PyObject *)__pyx_v_args)); PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)__pyx_v_args)); __Pyx_GIVEREF(((PyObject *)__pyx_v_args)); __pyx_r = ((PyObject *)__pyx_t_2); __pyx_t_2 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("pandas._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; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_7_sparse_8IntIndex_5__repr__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6pandas_7_sparse_8IntIndex_5__repr__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_7_sparse_8IntIndex_4__repr__(((struct __pyx_obj_6pandas_7_sparse_IntIndex *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/sparse.pyx":56 * return (IntIndex, args) * * def __repr__(self): # <<<<<<<<<<<<<< * output = 'IntIndex\n' * output += 'Indices: %s\n' % repr(self.indices) */ static PyObject *__pyx_pf_6pandas_7_sparse_8IntIndex_4__repr__(struct __pyx_obj_6pandas_7_sparse_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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__repr__", 0); /* "pandas/src/sparse.pyx":57 * * def __repr__(self): * output = 'IntIndex\n' # <<<<<<<<<<<<<< * output += 'Indices: %s\n' % repr(self.indices) * return output */ __Pyx_INCREF(((PyObject *)__pyx_n_s_1)); __pyx_v_output = ((PyObject *)__pyx_n_s_1); /* "pandas/src/sparse.pyx":58 * 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_filename = __pyx_f[0]; __pyx_lineno = 58; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_2), __pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 58; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_output, ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 58; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __Pyx_DECREF_SET(__pyx_v_output, __pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/sparse.pyx":59 * 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; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("pandas._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; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_7_sparse_8IntIndex_7check_integrity(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_6pandas_7_sparse_8IntIndex_6check_integrity[] = "\n Only need be strictly ascending and nothing less than 0 or greater than\n totall ength\n "; static PyObject *__pyx_pw_6pandas_7_sparse_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_7_sparse_8IntIndex_6check_integrity(((struct __pyx_obj_6pandas_7_sparse_IntIndex *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/sparse.pyx":61 * return output * * def check_integrity(self): # <<<<<<<<<<<<<< * ''' * Only need be strictly ascending and nothing less than 0 or greater than */ static PyObject *__pyx_pf_6pandas_7_sparse_8IntIndex_6check_integrity(CYTHON_UNUSED struct __pyx_obj_6pandas_7_sparse_IntIndex *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("check_integrity", 0); __pyx_r = Py_None; __Pyx_INCREF(Py_None); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_7_sparse_8IntIndex_9equals(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/ static PyObject *__pyx_pw_6pandas_7_sparse_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_7_sparse_8IntIndex_8equals(((struct __pyx_obj_6pandas_7_sparse_IntIndex *)__pyx_v_self), ((PyObject *)__pyx_v_other)); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/sparse.pyx":68 * pass * * def equals(self, other): # <<<<<<<<<<<<<< * if not isinstance(other, IntIndex): * return False */ static PyObject *__pyx_pf_6pandas_7_sparse_8IntIndex_8equals(struct __pyx_obj_6pandas_7_sparse_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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("equals", 0); /* "pandas/src/sparse.pyx":69 * * def equals(self, other): * if not isinstance(other, IntIndex): # <<<<<<<<<<<<<< * return False * */ __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_other, ((PyObject*)__pyx_ptype_6pandas_7_sparse_IntIndex)); __pyx_t_2 = ((!(__pyx_t_1 != 0)) != 0); if (__pyx_t_2) { /* "pandas/src/sparse.pyx":70 * def equals(self, other): * if not isinstance(other, IntIndex): * return False # <<<<<<<<<<<<<< * * if self is other: */ __Pyx_XDECREF(__pyx_r); __pyx_t_3 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; goto __pyx_L3; } __pyx_L3:; /* "pandas/src/sparse.pyx":72 * 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/src/sparse.pyx":73 * * if self is other: * return True # <<<<<<<<<<<<<< * * same_length = self.length == other.length */ __Pyx_XDECREF(__pyx_r); __pyx_t_3 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 73; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; goto __pyx_L4; } __pyx_L4:; /* "pandas/src/sparse.pyx":75 * 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_filename = __pyx_f[0]; __pyx_lineno = 75; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 75; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 75; __pyx_clineno = __LINE__; goto __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/src/sparse.pyx":76 * * same_length = self.length == other.length * same_indices = np.array_equal(self.indices, other.indices) # <<<<<<<<<<<<<< * return same_length and same_indices * */ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 76; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s__array_equal); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 76; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_other, __pyx_n_s__indices); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 76; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 76; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(((PyObject *)__pyx_v_self->indices)); PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_v_self->indices)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self->indices)); PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 76; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; __pyx_v_same_indices = __pyx_t_5; __pyx_t_5 = 0; /* "pandas/src/sparse.pyx":77 * 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_filename = __pyx_f[0]; __pyx_lineno = 77; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__pyx_t_1) { __Pyx_INCREF(__pyx_v_same_indices); __pyx_t_5 = __pyx_v_same_indices; } else { __Pyx_INCREF(__pyx_v_same_length); __pyx_t_5 = __pyx_v_same_length; } __pyx_r = __pyx_t_5; __pyx_t_5 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("pandas._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; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_7_sparse_8IntIndex_11ngaps(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static PyObject *__pyx_pw_6pandas_7_sparse_8IntIndex_11ngaps(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("ngaps (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_7_sparse_8IntIndex_10ngaps(((struct __pyx_obj_6pandas_7_sparse_IntIndex *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/sparse.pyx":80 * * @property * def ngaps(self): # <<<<<<<<<<<<<< * return self.length - self.npoints * */ static PyObject *__pyx_pf_6pandas_7_sparse_8IntIndex_10ngaps(struct __pyx_obj_6pandas_7_sparse_IntIndex *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("ngaps", 0); /* "pandas/src/sparse.pyx":81 * @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_filename = __pyx_f[0]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas._sparse.IntIndex.ngaps", __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_7_sparse_8IntIndex_13to_int_index(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static PyObject *__pyx_pw_6pandas_7_sparse_8IntIndex_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_7_sparse_8IntIndex_12to_int_index(((struct __pyx_obj_6pandas_7_sparse_IntIndex *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/sparse.pyx":83 * return self.length - self.npoints * * def to_int_index(self): # <<<<<<<<<<<<<< * return self * */ static PyObject *__pyx_pf_6pandas_7_sparse_8IntIndex_12to_int_index(struct __pyx_obj_6pandas_7_sparse_IntIndex *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("to_int_index", 0); /* "pandas/src/sparse.pyx":84 * * 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; __pyx_r = Py_None; __Pyx_INCREF(Py_None); __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_7_sparse_8IntIndex_15to_block_index(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static PyObject *__pyx_pw_6pandas_7_sparse_8IntIndex_15to_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_7_sparse_8IntIndex_14to_block_index(((struct __pyx_obj_6pandas_7_sparse_IntIndex *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/sparse.pyx":86 * return self * * def to_block_index(self): # <<<<<<<<<<<<<< * locs, lens = get_blocks(self.indices) * return BlockIndex(self.length, locs, lens) */ static PyObject *__pyx_pf_6pandas_7_sparse_8IntIndex_14to_block_index(struct __pyx_obj_6pandas_7_sparse_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 *); int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("to_block_index", 0); /* "pandas/src/sparse.pyx":87 * * 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_7_sparse_get_blocks(((PyArrayObject *)__pyx_t_1), 0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 87; __pyx_clineno = __LINE__; goto __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; #if CYTHON_COMPILING_IN_CPYTHON Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 87; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON 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_filename = __pyx_f[0]; __pyx_lineno = 87; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 87; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 87; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 87; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 87; __pyx_clineno = __LINE__; goto __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/src/sparse.pyx":88 * 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_filename = __pyx_f[0]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_locs); PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_locs); __Pyx_GIVEREF(__pyx_v_locs); __Pyx_INCREF(__pyx_v_lens); PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_lens); __Pyx_GIVEREF(__pyx_v_lens); __pyx_t_2 = 0; __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_6pandas_7_sparse_BlockIndex)), ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("pandas._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/src/sparse.pyx":90 * return BlockIndex(self.length, locs, lens) * * cpdef IntIndex intersect(self, SparseIndex y_): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t out_length, xi, yi = 0 */ static PyObject *__pyx_pw_6pandas_7_sparse_8IntIndex_17intersect(PyObject *__pyx_v_self, PyObject *__pyx_v_y_); /*proto*/ static struct __pyx_obj_6pandas_7_sparse_IntIndex *__pyx_f_6pandas_7_sparse_8IntIndex_intersect(struct __pyx_obj_6pandas_7_sparse_IntIndex *__pyx_v_self, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_y_, int __pyx_skip_dispatch) { Py_ssize_t __pyx_v_xi; Py_ssize_t __pyx_v_yi; __pyx_t_5numpy_int32_t __pyx_v_xind; PyArrayObject *__pyx_v_xindices = 0; PyArrayObject *__pyx_v_yindices = 0; PyObject *__pyx_v_new_list = 0; struct __pyx_obj_6pandas_7_sparse_IntIndex *__pyx_v_y = 0; __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_7_sparse_IntIndex *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_t_4; int __pyx_t_5; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; Py_ssize_t __pyx_t_9; Py_ssize_t __pyx_t_10; Py_ssize_t __pyx_t_11; int __pyx_t_12; int __pyx_t_13; Py_ssize_t __pyx_t_14; int __pyx_t_15; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __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; /* 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_filename = __pyx_f[0]; __pyx_lineno = 90; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_6pandas_7_sparse_8IntIndex_17intersect)) { __Pyx_XDECREF(((PyObject *)__pyx_r)); __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 90; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(((PyObject *)__pyx_v_y_)); PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_y_)); __Pyx_GIVEREF(((PyObject *)__pyx_v_y_)); __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 90; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_6pandas_7_sparse_IntIndex))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 90; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = ((struct __pyx_obj_6pandas_7_sparse_IntIndex *)__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } /* "pandas/src/sparse.pyx":92 * cpdef IntIndex intersect(self, SparseIndex y_): * cdef: * Py_ssize_t out_length, xi, yi = 0 # <<<<<<<<<<<<<< * int32_t xind * ndarray[int32_t, ndim=1] xindices, yindices */ __pyx_v_yi = 0; /* "pandas/src/sparse.pyx":95 * int32_t xind * ndarray[int32_t, ndim=1] xindices, yindices * list new_list = [] # <<<<<<<<<<<<<< * IntIndex y * */ __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 95; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_v_new_list = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/sparse.pyx":99 * * # if is one already, returns self * y = y_.to_int_index() # <<<<<<<<<<<<<< * * if self.length != y.length: */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_y_), __pyx_n_s__to_int_index); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 99; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 99; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_6pandas_7_sparse_IntIndex))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 99; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_y = ((struct __pyx_obj_6pandas_7_sparse_IntIndex *)__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/sparse.pyx":101 * y = y_.to_int_index() * * if self.length != y.length: # <<<<<<<<<<<<<< * raise Exception('Indices must reference same underlying length') * */ __pyx_t_4 = ((__pyx_v_self->length != __pyx_v_y->length) != 0); if (__pyx_t_4) { /* "pandas/src/sparse.pyx":102 * * if self.length != y.length: * raise Exception('Indices must reference same underlying length') # <<<<<<<<<<<<<< * * xindices = self.indices */ __pyx_t_3 = PyObject_Call(__pyx_builtin_Exception, ((PyObject *)__pyx_k_tuple_4), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L3; } __pyx_L3:; /* "pandas/src/sparse.pyx":104 * raise Exception('Indices must reference same underlying length') * * xindices = self.indices # <<<<<<<<<<<<<< * yindices = y.indices * */ __pyx_t_3 = ((PyObject *)__pyx_v_self->indices); __Pyx_INCREF(__pyx_t_3); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_xindices.rcbuffer->pybuffer); __pyx_t_5 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_xindices.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_3), &__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_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_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_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_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_xindices = ((PyArrayObject *)__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/sparse.pyx":105 * * xindices = self.indices * yindices = y.indices # <<<<<<<<<<<<<< * * for xi from 0 <= xi < self.npoints: */ __pyx_t_3 = ((PyObject *)__pyx_v_y->indices); __Pyx_INCREF(__pyx_t_3); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_yindices.rcbuffer->pybuffer); __pyx_t_5 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_yindices.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_3), &__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_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_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_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_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 105; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_yindices = ((PyArrayObject *)__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/sparse.pyx":107 * yindices = y.indices * * for xi from 0 <= xi < self.npoints: # <<<<<<<<<<<<<< * xind = xindices[xi] * */ __pyx_t_9 = __pyx_v_self->npoints; for (__pyx_v_xi = 0; __pyx_v_xi < __pyx_t_9; __pyx_v_xi++) { /* "pandas/src/sparse.pyx":108 * * for xi from 0 <= xi < self.npoints: * xind = xindices[xi] # <<<<<<<<<<<<<< * * while yi < y.npoints and yindices[yi] < xind: */ __pyx_t_10 = __pyx_v_xi; __pyx_t_5 = -1; if (__pyx_t_10 < 0) { __pyx_t_10 += __pyx_pybuffernd_xindices.diminfo[0].shape; if (unlikely(__pyx_t_10 < 0)) __pyx_t_5 = 0; } else if (unlikely(__pyx_t_10 >= __pyx_pybuffernd_xindices.diminfo[0].shape)) __pyx_t_5 = 0; if (unlikely(__pyx_t_5 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_5); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 108; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_xind = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_xindices.rcbuffer->pybuffer.buf, __pyx_t_10, __pyx_pybuffernd_xindices.diminfo[0].strides)); /* "pandas/src/sparse.pyx":110 * xind = xindices[xi] * * while yi < y.npoints and yindices[yi] < xind: # <<<<<<<<<<<<<< * yi += 1 * */ while (1) { __pyx_t_4 = ((__pyx_v_yi < __pyx_v_y->npoints) != 0); if (__pyx_t_4) { __pyx_t_11 = __pyx_v_yi; __pyx_t_5 = -1; if (__pyx_t_11 < 0) { __pyx_t_11 += __pyx_pybuffernd_yindices.diminfo[0].shape; if (unlikely(__pyx_t_11 < 0)) __pyx_t_5 = 0; } else if (unlikely(__pyx_t_11 >= __pyx_pybuffernd_yindices.diminfo[0].shape)) __pyx_t_5 = 0; if (unlikely(__pyx_t_5 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_5); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 110; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_12 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_yindices.rcbuffer->pybuffer.buf, __pyx_t_11, __pyx_pybuffernd_yindices.diminfo[0].strides)) < __pyx_v_xind) != 0); __pyx_t_13 = __pyx_t_12; } else { __pyx_t_13 = __pyx_t_4; } if (!__pyx_t_13) break; /* "pandas/src/sparse.pyx":111 * * while yi < y.npoints and yindices[yi] < xind: * yi += 1 # <<<<<<<<<<<<<< * * if yi >= y.npoints: */ __pyx_v_yi = (__pyx_v_yi + 1); } /* "pandas/src/sparse.pyx":113 * yi += 1 * * if yi >= y.npoints: # <<<<<<<<<<<<<< * break * */ __pyx_t_13 = ((__pyx_v_yi >= __pyx_v_y->npoints) != 0); if (__pyx_t_13) { /* "pandas/src/sparse.pyx":114 * * if yi >= y.npoints: * break # <<<<<<<<<<<<<< * * # TODO: would a two-pass algorithm be faster? */ goto __pyx_L5_break; goto __pyx_L8; } __pyx_L8:; /* "pandas/src/sparse.pyx":117 * * # TODO: would a two-pass algorithm be faster? * if yindices[yi] == xind: # <<<<<<<<<<<<<< * new_list.append(xind) * */ __pyx_t_14 = __pyx_v_yi; __pyx_t_5 = -1; if (__pyx_t_14 < 0) { __pyx_t_14 += __pyx_pybuffernd_yindices.diminfo[0].shape; if (unlikely(__pyx_t_14 < 0)) __pyx_t_5 = 0; } else if (unlikely(__pyx_t_14 >= __pyx_pybuffernd_yindices.diminfo[0].shape)) __pyx_t_5 = 0; if (unlikely(__pyx_t_5 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_5); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 117; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_13 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_yindices.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_yindices.diminfo[0].strides)) == __pyx_v_xind) != 0); if (__pyx_t_13) { /* "pandas/src/sparse.pyx":118 * # TODO: would a two-pass algorithm be faster? * if yindices[yi] == xind: * new_list.append(xind) # <<<<<<<<<<<<<< * * return IntIndex(self.length, new_list) */ __pyx_t_3 = __Pyx_PyInt_to_py_npy_int32(__pyx_v_xind); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 118; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_15 = __Pyx_PyList_Append(__pyx_v_new_list, __pyx_t_3); if (unlikely(__pyx_t_15 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 118; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L9; } __pyx_L9:; } __pyx_L5_break:; /* "pandas/src/sparse.pyx":120 * new_list.append(xind) * * return IntIndex(self.length, new_list) # <<<<<<<<<<<<<< * * cpdef IntIndex make_union(self, SparseIndex y_): */ __Pyx_XDECREF(((PyObject *)__pyx_r)); __pyx_t_3 = PyInt_FromSsize_t(__pyx_v_self->length); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 120; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 120; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __Pyx_INCREF(((PyObject *)__pyx_v_new_list)); PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject *)__pyx_v_new_list)); __Pyx_GIVEREF(((PyObject *)__pyx_v_new_list)); __pyx_t_3 = 0; __pyx_t_3 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_6pandas_7_sparse_IntIndex)), ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 120; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_r = ((struct __pyx_obj_6pandas_7_sparse_IntIndex *)__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L0; __pyx_r = ((struct __pyx_obj_6pandas_7_sparse_IntIndex *)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); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __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._sparse.IntIndex.intersect", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; goto __pyx_L2; __pyx_L0:; __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(__pyx_v_new_list); __Pyx_XDECREF((PyObject *)__pyx_v_y); __Pyx_XGIVEREF((PyObject *)__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_7_sparse_8IntIndex_17intersect(PyObject *__pyx_v_self, PyObject *__pyx_v_y_); /*proto*/ static PyObject *__pyx_pw_6pandas_7_sparse_8IntIndex_17intersect(PyObject *__pyx_v_self, PyObject *__pyx_v_y_) { CYTHON_UNUSED int __pyx_lineno = 0; CYTHON_UNUSED const char *__pyx_filename = NULL; CYTHON_UNUSED int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("intersect (wrapper)", 0); if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_y_), __pyx_ptype_6pandas_7_sparse_SparseIndex, 1, "y_", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 90; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_7_sparse_8IntIndex_16intersect(((struct __pyx_obj_6pandas_7_sparse_IntIndex *)__pyx_v_self), ((struct __pyx_obj_6pandas_7_sparse_SparseIndex *)__pyx_v_y_)); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/sparse.pyx":90 * return BlockIndex(self.length, locs, lens) * * cpdef IntIndex intersect(self, SparseIndex y_): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t out_length, xi, yi = 0 */ static PyObject *__pyx_pf_6pandas_7_sparse_8IntIndex_16intersect(struct __pyx_obj_6pandas_7_sparse_IntIndex *__pyx_v_self, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_y_) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("intersect", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_6pandas_7_sparse_IntIndex *)__pyx_v_self->__pyx_vtab)->intersect(__pyx_v_self, __pyx_v_y_, 1)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 90; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas._sparse.IntIndex.intersect", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/sparse.pyx":122 * return IntIndex(self.length, new_list) * * cpdef IntIndex make_union(self, SparseIndex y_): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t out_length, i, xi, yi */ static PyObject *__pyx_pw_6pandas_7_sparse_8IntIndex_19make_union(PyObject *__pyx_v_self, PyObject *__pyx_v_y_); /*proto*/ static struct __pyx_obj_6pandas_7_sparse_IntIndex *__pyx_f_6pandas_7_sparse_8IntIndex_make_union(struct __pyx_obj_6pandas_7_sparse_IntIndex *__pyx_v_self, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_y_, int __pyx_skip_dispatch) { Py_ssize_t __pyx_v_xi; Py_ssize_t __pyx_v_yi; __pyx_t_5numpy_int32_t __pyx_v_xind; PyArrayObject *__pyx_v_xindices = 0; PyArrayObject *__pyx_v_yindices = 0; PyObject *__pyx_v_new_list = 0; struct __pyx_obj_6pandas_7_sparse_IntIndex *__pyx_v_x = 0; struct __pyx_obj_6pandas_7_sparse_IntIndex *__pyx_v_y = 0; PyObject *__pyx_v_yind = NULL; __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_7_sparse_IntIndex *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_t_4; int __pyx_t_5; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; Py_ssize_t __pyx_t_9; int __pyx_t_10; Py_ssize_t __pyx_t_11; Py_ssize_t __pyx_t_12; Py_ssize_t __pyx_t_13; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("make_union", 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; /* 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_filename = __pyx_f[0]; __pyx_lineno = 122; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_6pandas_7_sparse_8IntIndex_19make_union)) { __Pyx_XDECREF(((PyObject *)__pyx_r)); __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 122; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(((PyObject *)__pyx_v_y_)); PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_y_)); __Pyx_GIVEREF(((PyObject *)__pyx_v_y_)); __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 122; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_6pandas_7_sparse_IntIndex))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 122; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = ((struct __pyx_obj_6pandas_7_sparse_IntIndex *)__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } /* "pandas/src/sparse.pyx":127 * int32_t xind * ndarray[int32_t, ndim=1] xindices, yindices * list new_list = [] # <<<<<<<<<<<<<< * IntIndex x, y * */ __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 127; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_v_new_list = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/sparse.pyx":130 * IntIndex x, y * * x = self # <<<<<<<<<<<<<< * * # if is one already, returns self */ __Pyx_INCREF(((PyObject *)__pyx_v_self)); __pyx_v_x = __pyx_v_self; /* "pandas/src/sparse.pyx":133 * * # if is one already, returns self * y = y_.to_int_index() # <<<<<<<<<<<<<< * * if self.length != y.length: */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_y_), __pyx_n_s__to_int_index); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 133; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 133; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_6pandas_7_sparse_IntIndex))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 133; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_y = ((struct __pyx_obj_6pandas_7_sparse_IntIndex *)__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/sparse.pyx":135 * y = y_.to_int_index() * * if self.length != y.length: # <<<<<<<<<<<<<< * raise Exception('Indices must reference same underlying length') * */ __pyx_t_4 = ((__pyx_v_self->length != __pyx_v_y->length) != 0); if (__pyx_t_4) { /* "pandas/src/sparse.pyx":136 * * if self.length != y.length: * raise Exception('Indices must reference same underlying length') # <<<<<<<<<<<<<< * * xindices = self.indices */ __pyx_t_3 = PyObject_Call(__pyx_builtin_Exception, ((PyObject *)__pyx_k_tuple_5), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 136; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 136; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L3; } __pyx_L3:; /* "pandas/src/sparse.pyx":138 * raise Exception('Indices must reference same underlying length') * * xindices = self.indices # <<<<<<<<<<<<<< * yindices = y.indices * */ __pyx_t_3 = ((PyObject *)__pyx_v_self->indices); __Pyx_INCREF(__pyx_t_3); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_xindices.rcbuffer->pybuffer); __pyx_t_5 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_xindices.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_3), &__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_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_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_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_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 138; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_xindices = ((PyArrayObject *)__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/sparse.pyx":139 * * xindices = self.indices * yindices = y.indices # <<<<<<<<<<<<<< * * xi = yi = 0 */ __pyx_t_3 = ((PyObject *)__pyx_v_y->indices); __Pyx_INCREF(__pyx_t_3); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_yindices.rcbuffer->pybuffer); __pyx_t_5 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_yindices.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_3), &__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_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_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_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_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 139; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_yindices = ((PyArrayObject *)__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/sparse.pyx":141 * yindices = y.indices * * xi = yi = 0 # <<<<<<<<<<<<<< * while True: * if xi == x.npoints: */ __pyx_v_xi = 0; __pyx_v_yi = 0; /* "pandas/src/sparse.pyx":142 * * xi = yi = 0 * while True: # <<<<<<<<<<<<<< * if xi == x.npoints: * while yi < y.npoints: */ while (1) { if (!1) break; /* "pandas/src/sparse.pyx":143 * xi = yi = 0 * while True: * if xi == x.npoints: # <<<<<<<<<<<<<< * while yi < y.npoints: * new_list.append(yindices[yi]) */ __pyx_t_4 = ((__pyx_v_xi == __pyx_v_x->npoints) != 0); if (__pyx_t_4) { /* "pandas/src/sparse.pyx":144 * while True: * if xi == x.npoints: * while yi < y.npoints: # <<<<<<<<<<<<<< * new_list.append(yindices[yi]) * yi += 1 */ while (1) { __pyx_t_4 = ((__pyx_v_yi < __pyx_v_y->npoints) != 0); if (!__pyx_t_4) break; /* "pandas/src/sparse.pyx":145 * if xi == x.npoints: * while yi < y.npoints: * new_list.append(yindices[yi]) # <<<<<<<<<<<<<< * yi += 1 * break */ __pyx_t_9 = __pyx_v_yi; __pyx_t_5 = -1; if (__pyx_t_9 < 0) { __pyx_t_9 += __pyx_pybuffernd_yindices.diminfo[0].shape; if (unlikely(__pyx_t_9 < 0)) __pyx_t_5 = 0; } else if (unlikely(__pyx_t_9 >= __pyx_pybuffernd_yindices.diminfo[0].shape)) __pyx_t_5 = 0; if (unlikely(__pyx_t_5 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_5); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 145; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_3 = __Pyx_PyInt_to_py_npy_int32((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_yindices.rcbuffer->pybuffer.buf, __pyx_t_9, __pyx_pybuffernd_yindices.diminfo[0].strides))); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 145; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_10 = __Pyx_PyList_Append(__pyx_v_new_list, __pyx_t_3); if (unlikely(__pyx_t_10 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 145; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/sparse.pyx":146 * while yi < y.npoints: * new_list.append(yindices[yi]) * yi += 1 # <<<<<<<<<<<<<< * break * elif yi == y.npoints: */ __pyx_v_yi = (__pyx_v_yi + 1); } /* "pandas/src/sparse.pyx":147 * new_list.append(yindices[yi]) * yi += 1 * break # <<<<<<<<<<<<<< * elif yi == y.npoints: * while xi < x.npoints: */ goto __pyx_L5_break; goto __pyx_L6; } /* "pandas/src/sparse.pyx":148 * yi += 1 * break * elif yi == y.npoints: # <<<<<<<<<<<<<< * while xi < x.npoints: * new_list.append(xindices[xi]) */ __pyx_t_4 = ((__pyx_v_yi == __pyx_v_y->npoints) != 0); if (__pyx_t_4) { /* "pandas/src/sparse.pyx":149 * break * elif yi == y.npoints: * while xi < x.npoints: # <<<<<<<<<<<<<< * new_list.append(xindices[xi]) * xi += 1 */ while (1) { __pyx_t_4 = ((__pyx_v_xi < __pyx_v_x->npoints) != 0); if (!__pyx_t_4) break; /* "pandas/src/sparse.pyx":150 * elif yi == y.npoints: * while xi < x.npoints: * new_list.append(xindices[xi]) # <<<<<<<<<<<<<< * xi += 1 * break */ __pyx_t_11 = __pyx_v_xi; __pyx_t_5 = -1; if (__pyx_t_11 < 0) { __pyx_t_11 += __pyx_pybuffernd_xindices.diminfo[0].shape; if (unlikely(__pyx_t_11 < 0)) __pyx_t_5 = 0; } else if (unlikely(__pyx_t_11 >= __pyx_pybuffernd_xindices.diminfo[0].shape)) __pyx_t_5 = 0; if (unlikely(__pyx_t_5 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_5); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 150; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_3 = __Pyx_PyInt_to_py_npy_int32((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_xindices.rcbuffer->pybuffer.buf, __pyx_t_11, __pyx_pybuffernd_xindices.diminfo[0].strides))); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 150; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_10 = __Pyx_PyList_Append(__pyx_v_new_list, __pyx_t_3); if (unlikely(__pyx_t_10 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 150; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/sparse.pyx":151 * while xi < x.npoints: * new_list.append(xindices[xi]) * xi += 1 # <<<<<<<<<<<<<< * break * */ __pyx_v_xi = (__pyx_v_xi + 1); } /* "pandas/src/sparse.pyx":152 * new_list.append(xindices[xi]) * xi += 1 * break # <<<<<<<<<<<<<< * * xind = xindices[xi] */ goto __pyx_L5_break; goto __pyx_L6; } __pyx_L6:; /* "pandas/src/sparse.pyx":154 * break * * xind = xindices[xi] # <<<<<<<<<<<<<< * yind = yindices[yi] * */ __pyx_t_12 = __pyx_v_xi; __pyx_t_5 = -1; if (__pyx_t_12 < 0) { __pyx_t_12 += __pyx_pybuffernd_xindices.diminfo[0].shape; if (unlikely(__pyx_t_12 < 0)) __pyx_t_5 = 0; } else if (unlikely(__pyx_t_12 >= __pyx_pybuffernd_xindices.diminfo[0].shape)) __pyx_t_5 = 0; if (unlikely(__pyx_t_5 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_5); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 154; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_xind = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_xindices.rcbuffer->pybuffer.buf, __pyx_t_12, __pyx_pybuffernd_xindices.diminfo[0].strides)); /* "pandas/src/sparse.pyx":155 * * xind = xindices[xi] * yind = yindices[yi] # <<<<<<<<<<<<<< * * if xind == yind: */ __pyx_t_13 = __pyx_v_yi; __pyx_t_5 = -1; if (__pyx_t_13 < 0) { __pyx_t_13 += __pyx_pybuffernd_yindices.diminfo[0].shape; if (unlikely(__pyx_t_13 < 0)) __pyx_t_5 = 0; } else if (unlikely(__pyx_t_13 >= __pyx_pybuffernd_yindices.diminfo[0].shape)) __pyx_t_5 = 0; if (unlikely(__pyx_t_5 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_5); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 155; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_3 = __Pyx_PyInt_to_py_npy_int32((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_yindices.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_yindices.diminfo[0].strides))); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 155; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_XDECREF_SET(__pyx_v_yind, __pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/sparse.pyx":157 * yind = yindices[yi] * * if xind == yind: # <<<<<<<<<<<<<< * new_list.append(xind) * xi += 1 */ __pyx_t_3 = __Pyx_PyInt_to_py_npy_int32(__pyx_v_xind); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = PyObject_RichCompare(__pyx_t_3, __pyx_v_yind, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_4) { /* "pandas/src/sparse.pyx":158 * * if xind == yind: * new_list.append(xind) # <<<<<<<<<<<<<< * xi += 1 * yi += 1 */ __pyx_t_1 = __Pyx_PyInt_to_py_npy_int32(__pyx_v_xind); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 158; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_10 = __Pyx_PyList_Append(__pyx_v_new_list, __pyx_t_1); if (unlikely(__pyx_t_10 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 158; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/sparse.pyx":159 * if xind == yind: * new_list.append(xind) * xi += 1 # <<<<<<<<<<<<<< * yi += 1 * elif xind < yind: */ __pyx_v_xi = (__pyx_v_xi + 1); /* "pandas/src/sparse.pyx":160 * new_list.append(xind) * xi += 1 * yi += 1 # <<<<<<<<<<<<<< * elif xind < yind: * new_list.append(xind) */ __pyx_v_yi = (__pyx_v_yi + 1); goto __pyx_L11; } /* "pandas/src/sparse.pyx":161 * xi += 1 * yi += 1 * elif xind < yind: # <<<<<<<<<<<<<< * new_list.append(xind) * xi += 1 */ __pyx_t_1 = __Pyx_PyInt_to_py_npy_int32(__pyx_v_xind); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 161; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = PyObject_RichCompare(__pyx_t_1, __pyx_v_yind, Py_LT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 161; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 161; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_4) { /* "pandas/src/sparse.pyx":162 * yi += 1 * elif xind < yind: * new_list.append(xind) # <<<<<<<<<<<<<< * xi += 1 * else: */ __pyx_t_3 = __Pyx_PyInt_to_py_npy_int32(__pyx_v_xind); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 162; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_10 = __Pyx_PyList_Append(__pyx_v_new_list, __pyx_t_3); if (unlikely(__pyx_t_10 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 162; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/sparse.pyx":163 * elif xind < yind: * new_list.append(xind) * xi += 1 # <<<<<<<<<<<<<< * else: * new_list.append(yind) */ __pyx_v_xi = (__pyx_v_xi + 1); goto __pyx_L11; } /*else*/ { /* "pandas/src/sparse.pyx":165 * xi += 1 * else: * new_list.append(yind) # <<<<<<<<<<<<<< * yi += 1 * */ __pyx_t_10 = __Pyx_PyList_Append(__pyx_v_new_list, __pyx_v_yind); if (unlikely(__pyx_t_10 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 165; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/sparse.pyx":166 * else: * new_list.append(yind) * yi += 1 # <<<<<<<<<<<<<< * * return IntIndex(x.length, new_list) */ __pyx_v_yi = (__pyx_v_yi + 1); } __pyx_L11:; } __pyx_L5_break:; /* "pandas/src/sparse.pyx":168 * yi += 1 * * return IntIndex(x.length, new_list) # <<<<<<<<<<<<<< * * @cython.wraparound(False) */ __Pyx_XDECREF(((PyObject *)__pyx_r)); __pyx_t_3 = PyInt_FromSsize_t(__pyx_v_x->length); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __Pyx_INCREF(((PyObject *)__pyx_v_new_list)); PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject *)__pyx_v_new_list)); __Pyx_GIVEREF(((PyObject *)__pyx_v_new_list)); __pyx_t_3 = 0; __pyx_t_3 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_6pandas_7_sparse_IntIndex)), ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_r = ((struct __pyx_obj_6pandas_7_sparse_IntIndex *)__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L0; __pyx_r = ((struct __pyx_obj_6pandas_7_sparse_IntIndex *)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); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __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._sparse.IntIndex.make_union", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; goto __pyx_L2; __pyx_L0:; __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(__pyx_v_new_list); __Pyx_XDECREF((PyObject *)__pyx_v_x); __Pyx_XDECREF((PyObject *)__pyx_v_y); __Pyx_XDECREF(__pyx_v_yind); __Pyx_XGIVEREF((PyObject *)__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_7_sparse_8IntIndex_19make_union(PyObject *__pyx_v_self, PyObject *__pyx_v_y_); /*proto*/ static PyObject *__pyx_pw_6pandas_7_sparse_8IntIndex_19make_union(PyObject *__pyx_v_self, PyObject *__pyx_v_y_) { CYTHON_UNUSED int __pyx_lineno = 0; CYTHON_UNUSED const char *__pyx_filename = NULL; CYTHON_UNUSED int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("make_union (wrapper)", 0); if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_y_), __pyx_ptype_6pandas_7_sparse_SparseIndex, 1, "y_", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 122; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_7_sparse_8IntIndex_18make_union(((struct __pyx_obj_6pandas_7_sparse_IntIndex *)__pyx_v_self), ((struct __pyx_obj_6pandas_7_sparse_SparseIndex *)__pyx_v_y_)); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/sparse.pyx":122 * return IntIndex(self.length, new_list) * * cpdef IntIndex make_union(self, SparseIndex y_): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t out_length, i, xi, yi */ static PyObject *__pyx_pf_6pandas_7_sparse_8IntIndex_18make_union(struct __pyx_obj_6pandas_7_sparse_IntIndex *__pyx_v_self, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_y_) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("make_union", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_6pandas_7_sparse_IntIndex *)__pyx_v_self->__pyx_vtab)->make_union(__pyx_v_self, __pyx_v_y_, 1)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 122; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas._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/src/sparse.pyx":171 * * @cython.wraparound(False) * cpdef lookup(self, Py_ssize_t index): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t res, n, cum_len = 0 */ static PyObject *__pyx_pw_6pandas_7_sparse_8IntIndex_21lookup(PyObject *__pyx_v_self, PyObject *__pyx_arg_index); /*proto*/ static PyObject *__pyx_f_6pandas_7_sparse_8IntIndex_lookup(struct __pyx_obj_6pandas_7_sparse_IntIndex *__pyx_v_self, Py_ssize_t __pyx_v_index, int __pyx_skip_dispatch) { Py_ssize_t __pyx_v_res; CYTHON_UNUSED Py_ssize_t __pyx_v_cum_len; PyArrayObject *__pyx_v_inds = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_inds; __Pyx_Buffer __pyx_pybuffer_inds; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_t_4; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; Py_ssize_t __pyx_t_8; int __pyx_t_9; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __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_filename = __pyx_f[0]; __pyx_lineno = 171; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_6pandas_7_sparse_8IntIndex_21lookup)) { __Pyx_XDECREF(__pyx_r); __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_index); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 171; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 171; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 171; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(((PyObject *)__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/src/sparse.pyx":173 * cpdef lookup(self, Py_ssize_t index): * cdef: * Py_ssize_t res, n, cum_len = 0 # <<<<<<<<<<<<<< * ndarray[int32_t, ndim=1] inds * */ __pyx_v_cum_len = 0; /* "pandas/src/sparse.pyx":176 * ndarray[int32_t, ndim=1] inds * * inds = self.indices # <<<<<<<<<<<<<< * res = inds.searchsorted(index) * if res == self.npoints: */ __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_4 = __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_4 < 0)) { PyErr_Fetch(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7); 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_5); Py_XDECREF(__pyx_t_6); Py_XDECREF(__pyx_t_7); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_5, __pyx_t_6, __pyx_t_7); } } __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_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 176; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_inds = ((PyArrayObject *)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/sparse.pyx":177 * * inds = self.indices * res = inds.searchsorted(index) # <<<<<<<<<<<<<< * if res == self.npoints: * return -1 */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_inds), __pyx_n_s__searchsorted); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 177; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_index); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 177; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 177; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 177; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; __pyx_t_8 = __Pyx_PyIndex_AsSsize_t(__pyx_t_2); if (unlikely((__pyx_t_8 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 177; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_res = __pyx_t_8; /* "pandas/src/sparse.pyx":178 * inds = self.indices * res = inds.searchsorted(index) * if res == self.npoints: # <<<<<<<<<<<<<< * return -1 * elif inds[res] == index: */ __pyx_t_9 = ((__pyx_v_res == __pyx_v_self->npoints) != 0); if (__pyx_t_9) { /* "pandas/src/sparse.pyx":179 * res = inds.searchsorted(index) * if res == self.npoints: * return -1 # <<<<<<<<<<<<<< * elif inds[res] == index: * return res */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_int_neg_1); __pyx_r = __pyx_int_neg_1; goto __pyx_L0; goto __pyx_L3; } /* "pandas/src/sparse.pyx":180 * if res == self.npoints: * return -1 * elif inds[res] == index: # <<<<<<<<<<<<<< * return res * else: */ __pyx_t_8 = __pyx_v_res; __pyx_t_4 = -1; if (__pyx_t_8 < 0) { __pyx_t_4 = 0; } else if (unlikely(__pyx_t_8 >= __pyx_pybuffernd_inds.diminfo[0].shape)) __pyx_t_4 = 0; if (unlikely(__pyx_t_4 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_4); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_9 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_inds.rcbuffer->pybuffer.buf, __pyx_t_8, __pyx_pybuffernd_inds.diminfo[0].strides)) == __pyx_v_index) != 0); if (__pyx_t_9) { /* "pandas/src/sparse.pyx":181 * return -1 * elif inds[res] == index: * return res # <<<<<<<<<<<<<< * else: * return -1 */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_res); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 181; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; goto __pyx_L3; } /*else*/ { /* "pandas/src/sparse.pyx":183 * return res * else: * return -1 # <<<<<<<<<<<<<< * * cpdef ndarray reindex(self, ndarray[float64_t, ndim=1] values, */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_int_neg_1); __pyx_r = __pyx_int_neg_1; goto __pyx_L0; } __pyx_L3:; __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); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_inds.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas._sparse.IntIndex.lookup", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_inds.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_inds); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_7_sparse_8IntIndex_21lookup(PyObject *__pyx_v_self, PyObject *__pyx_arg_index); /*proto*/ static PyObject *__pyx_pw_6pandas_7_sparse_8IntIndex_21lookup(PyObject *__pyx_v_self, PyObject *__pyx_arg_index) { Py_ssize_t __pyx_v_index; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; 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_filename = __pyx_f[0]; __pyx_lineno = 171; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; __Pyx_AddTraceback("pandas._sparse.IntIndex.lookup", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pandas_7_sparse_8IntIndex_20lookup(((struct __pyx_obj_6pandas_7_sparse_IntIndex *)__pyx_v_self), ((Py_ssize_t)__pyx_v_index)); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/sparse.pyx":171 * * @cython.wraparound(False) * cpdef lookup(self, Py_ssize_t index): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t res, n, cum_len = 0 */ static PyObject *__pyx_pf_6pandas_7_sparse_8IntIndex_20lookup(struct __pyx_obj_6pandas_7_sparse_IntIndex *__pyx_v_self, Py_ssize_t __pyx_v_index) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("lookup", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = ((struct __pyx_vtabstruct_6pandas_7_sparse_IntIndex *)__pyx_v_self->__pyx_vtab)->lookup(__pyx_v_self, __pyx_v_index, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 171; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas._sparse.IntIndex.lookup", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/sparse.pyx":185 * return -1 * * cpdef ndarray reindex(self, ndarray[float64_t, ndim=1] values, # <<<<<<<<<<<<<< * float64_t fill_value, SparseIndex other_): * cdef: */ static PyObject *__pyx_pw_6pandas_7_sparse_8IntIndex_23reindex(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyArrayObject *__pyx_f_6pandas_7_sparse_8IntIndex_reindex(struct __pyx_obj_6pandas_7_sparse_IntIndex *__pyx_v_self, PyArrayObject *__pyx_v_values, __pyx_t_5numpy_float64_t __pyx_v_fill_value, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_other_, int __pyx_skip_dispatch) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; struct __pyx_obj_6pandas_7_sparse_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; 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; PyArrayObject *__pyx_t_10 = NULL; Py_ssize_t __pyx_t_11; Py_ssize_t __pyx_t_12; Py_ssize_t __pyx_t_13; int __pyx_t_14; 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __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_filename = __pyx_f[0]; __pyx_lineno = 185; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 185; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_6pandas_7_sparse_8IntIndex_23reindex)) { __Pyx_XDECREF(((PyObject *)__pyx_r)); __pyx_t_2 = PyFloat_FromDouble(__pyx_v_fill_value); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 185; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 185; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(((PyObject *)__pyx_v_values)); PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_v_values)); __Pyx_GIVEREF(((PyObject *)__pyx_v_values)); PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __Pyx_INCREF(((PyObject *)__pyx_v_other_)); PyTuple_SET_ITEM(__pyx_t_3, 2, ((PyObject *)__pyx_v_other_)); __Pyx_GIVEREF(((PyObject *)__pyx_v_other_)); __pyx_t_2 = 0; __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 185; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(((PyObject *)__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_filename = __pyx_f[0]; __pyx_lineno = 185; __pyx_clineno = __LINE__; goto __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/src/sparse.pyx":188 * 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/src/sparse.pyx":193 * ndarray[int32_t, ndim=1] sinds, oinds * * other = other_.to_int_index() # <<<<<<<<<<<<<< * * oinds = other.indices */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_other_), __pyx_n_s__to_int_index); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 193; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 193; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_6pandas_7_sparse_IntIndex))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 193; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_other = ((struct __pyx_obj_6pandas_7_sparse_IntIndex *)__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/sparse.pyx":195 * other = other_.to_int_index() * * oinds = other.indices # <<<<<<<<<<<<<< * sinds = self.indices * */ __pyx_t_2 = ((PyObject *)__pyx_v_other->indices); __Pyx_INCREF(__pyx_t_2); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_oinds.rcbuffer->pybuffer); __pyx_t_4 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_oinds.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_4 < 0)) { PyErr_Fetch(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7); 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_5); Py_XDECREF(__pyx_t_6); Py_XDECREF(__pyx_t_7); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_5, __pyx_t_6, __pyx_t_7); } } __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_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 195; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_oinds = ((PyArrayObject *)__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/sparse.pyx":196 * * oinds = other.indices * sinds = self.indices # <<<<<<<<<<<<<< * * result = np.empty(other.npoints, dtype=np.float64) */ __pyx_t_2 = ((PyObject *)__pyx_v_self->indices); __Pyx_INCREF(__pyx_t_2); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_sinds.rcbuffer->pybuffer); __pyx_t_4 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_sinds.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_4 < 0)) { PyErr_Fetch(&__pyx_t_7, &__pyx_t_6, &__pyx_t_5); 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_7); Py_XDECREF(__pyx_t_6); Py_XDECREF(__pyx_t_5); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_7, __pyx_t_6, __pyx_t_5); } } __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_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 196; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_sinds = ((PyArrayObject *)__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/sparse.pyx":198 * sinds = self.indices * * result = np.empty(other.npoints, dtype=np.float64) # <<<<<<<<<<<<<< * result.fill(fill_value) * */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 198; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__empty); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 198; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_other->npoints); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 198; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 198; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 198; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_2)); __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 198; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 198; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__dtype), __pyx_t_9) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 198; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_9 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_3), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 198; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; if (!(likely(((__pyx_t_9) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_9, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 198; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_10 = ((PyArrayObject *)__pyx_t_9); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __pyx_t_4 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.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_4 < 0)) { PyErr_Fetch(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7); 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_5); Py_XDECREF(__pyx_t_6); Py_XDECREF(__pyx_t_7); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_5, __pyx_t_6, __pyx_t_7); } } __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_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 198; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_10 = 0; __pyx_v_result = ((PyArrayObject *)__pyx_t_9); __pyx_t_9 = 0; /* "pandas/src/sparse.pyx":199 * * result = np.empty(other.npoints, dtype=np.float64) * result.fill(fill_value) # <<<<<<<<<<<<<< * * for 0 <= i < other.npoints: */ __pyx_t_9 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_result), __pyx_n_s__fill); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 199; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_t_2 = PyFloat_FromDouble(__pyx_v_fill_value); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 199; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 199; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_Call(__pyx_t_9, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 199; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/sparse.pyx":201 * result.fill(fill_value) * * for 0 <= i < other.npoints: # <<<<<<<<<<<<<< * while oinds[i] > sinds[j] and j < self.npoints: * j += 1 */ __pyx_t_11 = __pyx_v_other->npoints; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_11; __pyx_v_i++) { /* "pandas/src/sparse.pyx":202 * * for 0 <= i < other.npoints: * while oinds[i] > sinds[j] and j < self.npoints: # <<<<<<<<<<<<<< * j += 1 * */ while (1) { __pyx_t_12 = __pyx_v_i; __pyx_t_4 = -1; if (__pyx_t_12 < 0) { __pyx_t_12 += __pyx_pybuffernd_oinds.diminfo[0].shape; if (unlikely(__pyx_t_12 < 0)) __pyx_t_4 = 0; } else if (unlikely(__pyx_t_12 >= __pyx_pybuffernd_oinds.diminfo[0].shape)) __pyx_t_4 = 0; if (unlikely(__pyx_t_4 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_4); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 202; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_13 = __pyx_v_j; __pyx_t_4 = -1; if (__pyx_t_13 < 0) { __pyx_t_13 += __pyx_pybuffernd_sinds.diminfo[0].shape; if (unlikely(__pyx_t_13 < 0)) __pyx_t_4 = 0; } else if (unlikely(__pyx_t_13 >= __pyx_pybuffernd_sinds.diminfo[0].shape)) __pyx_t_4 = 0; if (unlikely(__pyx_t_4 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_4); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 202; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_14 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_oinds.rcbuffer->pybuffer.buf, __pyx_t_12, __pyx_pybuffernd_oinds.diminfo[0].strides)) > (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_sinds.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_sinds.diminfo[0].strides))) != 0); if (__pyx_t_14) { __pyx_t_15 = ((__pyx_v_j < __pyx_v_self->npoints) != 0); __pyx_t_16 = __pyx_t_15; } else { __pyx_t_16 = __pyx_t_14; } if (!__pyx_t_16) break; /* "pandas/src/sparse.pyx":203 * 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/src/sparse.pyx":205 * j += 1 * * if j == self.npoints: # <<<<<<<<<<<<<< * break * */ __pyx_t_16 = ((__pyx_v_j == __pyx_v_self->npoints) != 0); if (__pyx_t_16) { /* "pandas/src/sparse.pyx":206 * * if j == self.npoints: * break # <<<<<<<<<<<<<< * * if oinds[i] < sinds[j]: */ goto __pyx_L4_break; goto __pyx_L7; } __pyx_L7:; /* "pandas/src/sparse.pyx":208 * break * * if oinds[i] < sinds[j]: # <<<<<<<<<<<<<< * continue * elif oinds[i] == sinds[j]: */ __pyx_t_17 = __pyx_v_i; __pyx_t_4 = -1; if (__pyx_t_17 < 0) { __pyx_t_17 += __pyx_pybuffernd_oinds.diminfo[0].shape; if (unlikely(__pyx_t_17 < 0)) __pyx_t_4 = 0; } else if (unlikely(__pyx_t_17 >= __pyx_pybuffernd_oinds.diminfo[0].shape)) __pyx_t_4 = 0; if (unlikely(__pyx_t_4 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_4); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 208; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_18 = __pyx_v_j; __pyx_t_4 = -1; if (__pyx_t_18 < 0) { __pyx_t_18 += __pyx_pybuffernd_sinds.diminfo[0].shape; if (unlikely(__pyx_t_18 < 0)) __pyx_t_4 = 0; } else if (unlikely(__pyx_t_18 >= __pyx_pybuffernd_sinds.diminfo[0].shape)) __pyx_t_4 = 0; if (unlikely(__pyx_t_4 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_4); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 208; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_16 = (((*__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_16) { /* "pandas/src/sparse.pyx":209 * * if oinds[i] < sinds[j]: * continue # <<<<<<<<<<<<<< * elif oinds[i] == sinds[j]: * result[i] = values[j] */ goto __pyx_L3_continue; goto __pyx_L8; } /* "pandas/src/sparse.pyx":210 * 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_4 = -1; if (__pyx_t_19 < 0) { __pyx_t_19 += __pyx_pybuffernd_oinds.diminfo[0].shape; if (unlikely(__pyx_t_19 < 0)) __pyx_t_4 = 0; } else if (unlikely(__pyx_t_19 >= __pyx_pybuffernd_oinds.diminfo[0].shape)) __pyx_t_4 = 0; if (unlikely(__pyx_t_4 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_4); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 210; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_20 = __pyx_v_j; __pyx_t_4 = -1; if (__pyx_t_20 < 0) { __pyx_t_20 += __pyx_pybuffernd_sinds.diminfo[0].shape; if (unlikely(__pyx_t_20 < 0)) __pyx_t_4 = 0; } else if (unlikely(__pyx_t_20 >= __pyx_pybuffernd_sinds.diminfo[0].shape)) __pyx_t_4 = 0; if (unlikely(__pyx_t_4 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_4); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 210; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_16 = (((*__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_16) { /* "pandas/src/sparse.pyx":211 * continue * elif oinds[i] == sinds[j]: * result[i] = values[j] # <<<<<<<<<<<<<< * j += 1 * */ __pyx_t_21 = __pyx_v_j; __pyx_t_4 = -1; if (__pyx_t_21 < 0) { __pyx_t_21 += __pyx_pybuffernd_values.diminfo[0].shape; if (unlikely(__pyx_t_21 < 0)) __pyx_t_4 = 0; } else if (unlikely(__pyx_t_21 >= __pyx_pybuffernd_values.diminfo[0].shape)) __pyx_t_4 = 0; if (unlikely(__pyx_t_4 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_4); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 211; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_22 = __pyx_v_i; __pyx_t_4 = -1; if (__pyx_t_22 < 0) { __pyx_t_22 += __pyx_pybuffernd_result.diminfo[0].shape; if (unlikely(__pyx_t_22 < 0)) __pyx_t_4 = 0; } else if (unlikely(__pyx_t_22 >= __pyx_pybuffernd_result.diminfo[0].shape)) __pyx_t_4 = 0; if (unlikely(__pyx_t_4 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_4); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 211; __pyx_clineno = __LINE__; goto __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/src/sparse.pyx":212 * elif oinds[i] == sinds[j]: * result[i] = values[j] * j += 1 # <<<<<<<<<<<<<< * * return result */ __pyx_v_j = (__pyx_v_j + 1); goto __pyx_L8; } __pyx_L8:; __pyx_L3_continue:; } __pyx_L4_break:; /* "pandas/src/sparse.pyx":214 * 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; __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_8); __Pyx_XDECREF(__pyx_t_9); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __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._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_7_sparse_8IntIndex_23reindex(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_6pandas_7_sparse_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_7_sparse_SparseIndex *__pyx_v_other_ = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 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); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__values)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__fill_value)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("reindex", 1, 3, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 185; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__other_)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("reindex", 1, 3, 3, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 185; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "reindex") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 185; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 186; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_other_ = ((struct __pyx_obj_6pandas_7_sparse_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_filename = __pyx_f[0]; __pyx_lineno = 185; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas._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_filename = __pyx_f[0]; __pyx_lineno = 185; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_other_), __pyx_ptype_6pandas_7_sparse_SparseIndex, 1, "other_", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 186; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_7_sparse_8IntIndex_22reindex(((struct __pyx_obj_6pandas_7_sparse_IntIndex *)__pyx_v_self), __pyx_v_values, __pyx_v_fill_value, __pyx_v_other_); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/sparse.pyx":185 * return -1 * * cpdef ndarray reindex(self, ndarray[float64_t, ndim=1] values, # <<<<<<<<<<<<<< * float64_t fill_value, SparseIndex other_): * cdef: */ static PyObject *__pyx_pf_6pandas_7_sparse_8IntIndex_22reindex(struct __pyx_obj_6pandas_7_sparse_IntIndex *__pyx_v_self, PyArrayObject *__pyx_v_values, __pyx_t_5numpy_float64_t __pyx_v_fill_value, struct __pyx_obj_6pandas_7_sparse_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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __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_filename = __pyx_f[0]; __pyx_lineno = 185; __pyx_clineno = __LINE__; goto __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 *)((struct __pyx_vtabstruct_6pandas_7_sparse_IntIndex *)__pyx_v_self->__pyx_vtab)->reindex(__pyx_v_self, __pyx_v_values, __pyx_v_fill_value, __pyx_v_other_, 1)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 185; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __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._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/src/sparse.pyx":216 * 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_7_sparse_8IntIndex_25put(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_6pandas_7_sparse_8IntIndex_put(CYTHON_UNUSED struct __pyx_obj_6pandas_7_sparse_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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __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_filename = __pyx_f[0]; __pyx_lineno = 216; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 216; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 216; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_6pandas_7_sparse_8IntIndex_25put)) { __Pyx_XDECREF(__pyx_r); __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 216; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(((PyObject *)__pyx_v_values)); PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_values)); __Pyx_GIVEREF(((PyObject *)__pyx_v_values)); __Pyx_INCREF(((PyObject *)__pyx_v_indices)); PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)__pyx_v_indices)); __Pyx_GIVEREF(((PyObject *)__pyx_v_indices)); __Pyx_INCREF(__pyx_v_to_put); PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_to_put); __Pyx_GIVEREF(__pyx_v_to_put); __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 216; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __pyx_r = __pyx_t_3; __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } /* "pandas/src/sparse.pyx":218 * 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, */ __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); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __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._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; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_7_sparse_8IntIndex_25put(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_6pandas_7_sparse_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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 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); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__values)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__indices)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("put", 1, 3, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 216; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__to_put)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("put", 1, 3, 3, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 216; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "put") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 216; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 216; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas._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_filename = __pyx_f[0]; __pyx_lineno = 216; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_indices), __pyx_ptype_5numpy_ndarray, 1, "indices", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 217; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_7_sparse_8IntIndex_24put(((struct __pyx_obj_6pandas_7_sparse_IntIndex *)__pyx_v_self), __pyx_v_values, __pyx_v_indices, __pyx_v_to_put); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/sparse.pyx":216 * return result * * cpdef put(self, ndarray[float64_t, ndim=1] values, # <<<<<<<<<<<<<< * ndarray[int32_t, ndim=1] indices, object to_put): * pass */ static PyObject *__pyx_pf_6pandas_7_sparse_8IntIndex_24put(struct __pyx_obj_6pandas_7_sparse_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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __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_filename = __pyx_f[0]; __pyx_lineno = 216; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 216; __pyx_clineno = __LINE__; goto __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 = ((struct __pyx_vtabstruct_6pandas_7_sparse_IntIndex *)__pyx_v_self->__pyx_vtab)->put(__pyx_v_self, __pyx_v_values, __pyx_v_indices, __pyx_v_to_put, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 216; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __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._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/src/sparse.pyx":220 * pass * * cpdef take(self, ndarray[float64_t, ndim=1] values, # <<<<<<<<<<<<<< * ndarray[int32_t, ndim=1] indices): * pass */ static PyObject *__pyx_pw_6pandas_7_sparse_8IntIndex_27take(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_6pandas_7_sparse_8IntIndex_take(CYTHON_UNUSED struct __pyx_obj_6pandas_7_sparse_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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __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_filename = __pyx_f[0]; __pyx_lineno = 220; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 220; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 220; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_6pandas_7_sparse_8IntIndex_27take)) { __Pyx_XDECREF(__pyx_r); __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 220; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(((PyObject *)__pyx_v_values)); PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_values)); __Pyx_GIVEREF(((PyObject *)__pyx_v_values)); __Pyx_INCREF(((PyObject *)__pyx_v_indices)); PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)__pyx_v_indices)); __Pyx_GIVEREF(((PyObject *)__pyx_v_indices)); __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 220; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __pyx_r = __pyx_t_3; __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } /* "pandas/src/sparse.pyx":222 * 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): */ __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); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __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._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; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_7_sparse_8IntIndex_27take(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_6pandas_7_sparse_8IntIndex_27take(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_values = 0; PyArrayObject *__pyx_v_indices = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 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); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__values)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__indices)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 220; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "take") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 220; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 220; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas._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_filename = __pyx_f[0]; __pyx_lineno = 220; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_indices), __pyx_ptype_5numpy_ndarray, 1, "indices", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 221; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_7_sparse_8IntIndex_26take(((struct __pyx_obj_6pandas_7_sparse_IntIndex *)__pyx_v_self), __pyx_v_values, __pyx_v_indices); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/sparse.pyx":220 * pass * * cpdef take(self, ndarray[float64_t, ndim=1] values, # <<<<<<<<<<<<<< * ndarray[int32_t, ndim=1] indices): * pass */ static PyObject *__pyx_pf_6pandas_7_sparse_8IntIndex_26take(struct __pyx_obj_6pandas_7_sparse_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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __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_filename = __pyx_f[0]; __pyx_lineno = 220; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 220; __pyx_clineno = __LINE__; goto __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 = ((struct __pyx_vtabstruct_6pandas_7_sparse_IntIndex *)__pyx_v_self->__pyx_vtab)->take(__pyx_v_self, __pyx_v_values, __pyx_v_indices, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 220; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __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._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; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_7_sparse_8IntIndex_6length_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6pandas_7_sparse_8IntIndex_6length_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_7_sparse_8IntIndex_6length___get__(((struct __pyx_obj_6pandas_7_sparse_IntIndex *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/sparse.pyx":44 * ''' * cdef readonly: * Py_ssize_t length, npoints # <<<<<<<<<<<<<< * ndarray indices * */ static PyObject *__pyx_pf_6pandas_7_sparse_8IntIndex_6length___get__(struct __pyx_obj_6pandas_7_sparse_IntIndex *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_self->length); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 44; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas._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_7_sparse_8IntIndex_7npoints_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6pandas_7_sparse_8IntIndex_7npoints_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_7_sparse_8IntIndex_7npoints___get__(((struct __pyx_obj_6pandas_7_sparse_IntIndex *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_7_sparse_8IntIndex_7npoints___get__(struct __pyx_obj_6pandas_7_sparse_IntIndex *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_self->npoints); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 44; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas._sparse.IntIndex.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_7_sparse_8IntIndex_7indices_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6pandas_7_sparse_8IntIndex_7indices_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_7_sparse_8IntIndex_7indices___get__(((struct __pyx_obj_6pandas_7_sparse_IntIndex *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/sparse.pyx":45 * cdef readonly: * Py_ssize_t length, npoints * ndarray indices # <<<<<<<<<<<<<< * * def __init__(self, Py_ssize_t length, indices): */ static PyObject *__pyx_pf_6pandas_7_sparse_8IntIndex_7indices___get__(struct __pyx_obj_6pandas_7_sparse_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; __pyx_r = Py_None; __Pyx_INCREF(Py_None); __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/sparse.pyx":224 * pass * * cpdef get_blocks(ndarray[int32_t, ndim=1] indices): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, npoints */ static PyObject *__pyx_pw_6pandas_7_sparse_1get_blocks(PyObject *__pyx_self, PyObject *__pyx_v_indices); /*proto*/ static PyObject *__pyx_f_6pandas_7_sparse_get_blocks(PyArrayObject *__pyx_v_indices, CYTHON_UNUSED int __pyx_skip_dispatch) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_npoints; __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; PyObject *__pyx_v_locs = 0; PyObject *__pyx_v_lens = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_indices; __Pyx_Buffer __pyx_pybuffer_indices; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; Py_ssize_t __pyx_t_2; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; long __pyx_t_6; int __pyx_t_7; __pyx_t_5numpy_int32_t __pyx_t_8; Py_ssize_t __pyx_t_9; int __pyx_t_10; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __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_filename = __pyx_f[0]; __pyx_lineno = 224; __pyx_clineno = __LINE__; goto __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/src/sparse.pyx":227 * cdef: * Py_ssize_t i, npoints * int32_t block, length = 1, cur, prev # <<<<<<<<<<<<<< * list locs = [], lens = [] * */ __pyx_v_length = 1; /* "pandas/src/sparse.pyx":228 * Py_ssize_t i, npoints * int32_t block, length = 1, cur, prev * list locs = [], lens = [] # <<<<<<<<<<<<<< * * npoints = len(indices) */ __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 228; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_v_locs = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 228; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_v_lens = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/sparse.pyx":230 * list locs = [], lens = [] * * npoints = len(indices) # <<<<<<<<<<<<<< * * # just handle the special empty case separately */ __pyx_t_2 = PyObject_Length(((PyObject *)__pyx_v_indices)); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 230; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_npoints = __pyx_t_2; /* "pandas/src/sparse.pyx":233 * * # just handle the special empty case separately * if npoints == 0: # <<<<<<<<<<<<<< * return [], [] * */ __pyx_t_3 = ((__pyx_v_npoints == 0) != 0); if (__pyx_t_3) { /* "pandas/src/sparse.pyx":234 * # just handle the special empty case separately * if npoints == 0: * return [], [] # <<<<<<<<<<<<<< * * # TODO: two-pass algorithm faster? */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 234; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 234; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 234; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_t_1)); __Pyx_GIVEREF(((PyObject *)__pyx_t_1)); PyTuple_SET_ITEM(__pyx_t_5, 1, ((PyObject *)__pyx_t_4)); __Pyx_GIVEREF(((PyObject *)__pyx_t_4)); __pyx_t_1 = 0; __pyx_t_4 = 0; __pyx_r = ((PyObject *)__pyx_t_5); __pyx_t_5 = 0; goto __pyx_L0; goto __pyx_L3; } __pyx_L3:; /* "pandas/src/sparse.pyx":237 * * # TODO: two-pass algorithm faster? * prev = block = indices[0] # <<<<<<<<<<<<<< * for i from 1 <= i < npoints: * cur = indices[i] */ __pyx_t_6 = 0; __pyx_t_7 = -1; if (__pyx_t_6 < 0) { __pyx_t_6 += __pyx_pybuffernd_indices.diminfo[0].shape; if (unlikely(__pyx_t_6 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_6 >= __pyx_pybuffernd_indices.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 237; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_8 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_indices.rcbuffer->pybuffer.buf, __pyx_t_6, __pyx_pybuffernd_indices.diminfo[0].strides)); __pyx_v_prev = __pyx_t_8; __pyx_v_block = __pyx_t_8; /* "pandas/src/sparse.pyx":238 * # TODO: two-pass algorithm faster? * prev = block = indices[0] * for i from 1 <= i < npoints: # <<<<<<<<<<<<<< * cur = indices[i] * if cur - prev > 1: */ __pyx_t_2 = __pyx_v_npoints; for (__pyx_v_i = 1; __pyx_v_i < __pyx_t_2; __pyx_v_i++) { /* "pandas/src/sparse.pyx":239 * prev = block = indices[0] * for i from 1 <= i < npoints: * cur = indices[i] # <<<<<<<<<<<<<< * if cur - prev > 1: * # new block */ __pyx_t_9 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_9 < 0) { __pyx_t_9 += __pyx_pybuffernd_indices.diminfo[0].shape; if (unlikely(__pyx_t_9 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_9 >= __pyx_pybuffernd_indices.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 239; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_cur = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_indices.rcbuffer->pybuffer.buf, __pyx_t_9, __pyx_pybuffernd_indices.diminfo[0].strides)); /* "pandas/src/sparse.pyx":240 * for i from 1 <= i < npoints: * cur = indices[i] * if cur - prev > 1: # <<<<<<<<<<<<<< * # new block * locs.append(block) */ __pyx_t_3 = (((__pyx_v_cur - __pyx_v_prev) > 1) != 0); if (__pyx_t_3) { /* "pandas/src/sparse.pyx":242 * if cur - prev > 1: * # new block * locs.append(block) # <<<<<<<<<<<<<< * lens.append(length) * block = cur */ __pyx_t_5 = __Pyx_PyInt_to_py_npy_int32(__pyx_v_block); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 242; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_10 = __Pyx_PyList_Append(__pyx_v_locs, __pyx_t_5); if (unlikely(__pyx_t_10 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 242; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "pandas/src/sparse.pyx":243 * # new block * locs.append(block) * lens.append(length) # <<<<<<<<<<<<<< * block = cur * length = 1 */ __pyx_t_5 = __Pyx_PyInt_to_py_npy_int32(__pyx_v_length); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_10 = __Pyx_PyList_Append(__pyx_v_lens, __pyx_t_5); if (unlikely(__pyx_t_10 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "pandas/src/sparse.pyx":244 * locs.append(block) * lens.append(length) * block = cur # <<<<<<<<<<<<<< * length = 1 * else: */ __pyx_v_block = __pyx_v_cur; /* "pandas/src/sparse.pyx":245 * lens.append(length) * block = cur * length = 1 # <<<<<<<<<<<<<< * else: * # same block, increment length */ __pyx_v_length = 1; goto __pyx_L6; } /*else*/ { /* "pandas/src/sparse.pyx":248 * else: * # same block, increment length * length += 1 # <<<<<<<<<<<<<< * * prev = cur */ __pyx_v_length = (__pyx_v_length + 1); } __pyx_L6:; /* "pandas/src/sparse.pyx":250 * length += 1 * * prev = cur # <<<<<<<<<<<<<< * * locs.append(block) */ __pyx_v_prev = __pyx_v_cur; } /* "pandas/src/sparse.pyx":252 * prev = cur * * locs.append(block) # <<<<<<<<<<<<<< * lens.append(length) * return locs, lens */ __pyx_t_5 = __Pyx_PyInt_to_py_npy_int32(__pyx_v_block); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 252; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_10 = __Pyx_PyList_Append(__pyx_v_locs, __pyx_t_5); if (unlikely(__pyx_t_10 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 252; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "pandas/src/sparse.pyx":253 * * locs.append(block) * lens.append(length) # <<<<<<<<<<<<<< * return locs, lens * */ __pyx_t_5 = __Pyx_PyInt_to_py_npy_int32(__pyx_v_length); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 253; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_10 = __Pyx_PyList_Append(__pyx_v_lens, __pyx_t_5); if (unlikely(__pyx_t_10 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 253; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "pandas/src/sparse.pyx":254 * locs.append(block) * lens.append(length) * return locs, lens # <<<<<<<<<<<<<< * * #------------------------------------------------------------------------------- */ __Pyx_XDECREF(__pyx_r); __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 254; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(((PyObject *)__pyx_v_locs)); PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_v_locs)); __Pyx_GIVEREF(((PyObject *)__pyx_v_locs)); __Pyx_INCREF(((PyObject *)__pyx_v_lens)); PyTuple_SET_ITEM(__pyx_t_5, 1, ((PyObject *)__pyx_v_lens)); __Pyx_GIVEREF(((PyObject *)__pyx_v_lens)); __pyx_r = ((PyObject *)__pyx_t_5); __pyx_t_5 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __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._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_L2:; __Pyx_XDECREF(__pyx_v_locs); __Pyx_XDECREF(__pyx_v_lens); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_7_sparse_1get_blocks(PyObject *__pyx_self, PyObject *__pyx_v_indices); /*proto*/ static PyObject *__pyx_pw_6pandas_7_sparse_1get_blocks(PyObject *__pyx_self, PyObject *__pyx_v_indices) { CYTHON_UNUSED int __pyx_lineno = 0; CYTHON_UNUSED const char *__pyx_filename = NULL; CYTHON_UNUSED int __pyx_clineno = 0; 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_filename = __pyx_f[0]; __pyx_lineno = 224; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_7_sparse_get_blocks(__pyx_self, ((PyArrayObject *)__pyx_v_indices)); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/sparse.pyx":224 * pass * * cpdef get_blocks(ndarray[int32_t, ndim=1] indices): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, npoints */ static PyObject *__pyx_pf_6pandas_7_sparse_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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __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_filename = __pyx_f[0]; __pyx_lineno = 224; __pyx_clineno = __LINE__; goto __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_7_sparse_get_blocks(__pyx_v_indices, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 224; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __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._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; } /* Python wrapper */ static int __pyx_pw_6pandas_7_sparse_10BlockIndex_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_pw_6pandas_7_sparse_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_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 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); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__length)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__blocs)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 274; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__blengths)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 274; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 274; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 274; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas._sparse.BlockIndex.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return -1; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pandas_7_sparse_10BlockIndex___init__(((struct __pyx_obj_6pandas_7_sparse_BlockIndex *)__pyx_v_self), __pyx_v_length, __pyx_v_blocs, __pyx_v_blengths); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/sparse.pyx":274 * int32_t* locbuf, *lenbuf * * def __init__(self, length, blocs, blengths): # <<<<<<<<<<<<<< * * self.blocs = np.ascontiguousarray(blocs, dtype=np.int32) */ static int __pyx_pf_6pandas_7_sparse_10BlockIndex___init__(struct __pyx_obj_6pandas_7_sparse_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; Py_ssize_t __pyx_t_6; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__init__", 0); /* "pandas/src/sparse.pyx":276 * 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_filename = __pyx_f[0]; __pyx_lineno = 276; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 276; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 276; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_blocs); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_blocs); __Pyx_GIVEREF(__pyx_v_blocs); __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 276; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_3)); __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 276; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 276; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (PyDict_SetItem(__pyx_t_3, ((PyObject *)__pyx_n_s__dtype), __pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 276; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_1), ((PyObject *)__pyx_t_3)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 276; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __Pyx_DECREF(((PyObject *)__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_filename = __pyx_f[0]; __pyx_lineno = 276; __pyx_clineno = __LINE__; goto __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/src/sparse.pyx":277 * * 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_filename = __pyx_f[0]; __pyx_lineno = 277; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 277; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 277; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_v_blengths); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_blengths); __Pyx_GIVEREF(__pyx_v_blengths); __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 277; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 277; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 277; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__dtype), __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 277; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_5), ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 277; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; __Pyx_DECREF(((PyObject *)__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_filename = __pyx_f[0]; __pyx_lineno = 277; __pyx_clineno = __LINE__; goto __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/src/sparse.pyx":280 * * # 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/src/sparse.pyx":281 * # 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/src/sparse.pyx":283 * self.lenbuf = self.blengths.data * * self.length = length # <<<<<<<<<<<<<< * self.nblocks = len(self.blocs) * self.npoints = self.blengths.sum() */ __pyx_t_6 = __Pyx_PyIndex_AsSsize_t(__pyx_v_length); if (unlikely((__pyx_t_6 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 283; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_self->length = __pyx_t_6; /* "pandas/src/sparse.pyx":284 * * self.length = length * self.nblocks = len(self.blocs) # <<<<<<<<<<<<<< * self.npoints = self.blengths.sum() * */ __pyx_t_4 = ((PyObject *)__pyx_v_self->blocs); __Pyx_INCREF(__pyx_t_4); __pyx_t_6 = PyObject_Length(__pyx_t_4); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 284; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_self->nblocks = __pyx_t_6; /* "pandas/src/sparse.pyx":285 * self.length = length * self.nblocks = len(self.blocs) * self.npoints = self.blengths.sum() # <<<<<<<<<<<<<< * * # self.block_start = blocs */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->blengths), __pyx_n_s__sum); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 285; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_1 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 285; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_6 = __Pyx_PyIndex_AsSsize_t(__pyx_t_1); if (unlikely((__pyx_t_6 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 285; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_self->npoints = __pyx_t_6; /* "pandas/src/sparse.pyx":290 * # self.block_end = blocs + blengths * * self.check_integrity() # <<<<<<<<<<<<<< * * def __reduce__(self): */ __pyx_t_1 = ((struct __pyx_vtabstruct_6pandas_7_sparse_BlockIndex *)__pyx_v_self->__pyx_vtab)->check_integrity(__pyx_v_self, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 290; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __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._sparse.BlockIndex.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_7_sparse_10BlockIndex_3__reduce__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static PyObject *__pyx_pw_6pandas_7_sparse_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_7_sparse_10BlockIndex_2__reduce__(((struct __pyx_obj_6pandas_7_sparse_BlockIndex *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/sparse.pyx":292 * self.check_integrity() * * def __reduce__(self): # <<<<<<<<<<<<<< * args = (self.length, self.blocs, self.blengths) * return (BlockIndex, args) */ static PyObject *__pyx_pf_6pandas_7_sparse_10BlockIndex_2__reduce__(struct __pyx_obj_6pandas_7_sparse_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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__reduce__", 0); /* "pandas/src/sparse.pyx":293 * * def __reduce__(self): * args = (self.length, self.blocs, self.blengths) # <<<<<<<<<<<<<< * return (BlockIndex, args) * */ __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_self->length); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 293; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 293; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)__pyx_v_self->blocs)); PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)__pyx_v_self->blocs)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self->blocs)); __Pyx_INCREF(((PyObject *)__pyx_v_self->blengths)); PyTuple_SET_ITEM(__pyx_t_2, 2, ((PyObject *)__pyx_v_self->blengths)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self->blengths)); __pyx_t_1 = 0; __pyx_v_args = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/sparse.pyx":294 * 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_filename = __pyx_f[0]; __pyx_lineno = 294; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(((PyObject *)((PyObject*)__pyx_ptype_6pandas_7_sparse_BlockIndex))); PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)((PyObject*)__pyx_ptype_6pandas_7_sparse_BlockIndex))); __Pyx_GIVEREF(((PyObject *)((PyObject*)__pyx_ptype_6pandas_7_sparse_BlockIndex))); __Pyx_INCREF(((PyObject *)__pyx_v_args)); PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)__pyx_v_args)); __Pyx_GIVEREF(((PyObject *)__pyx_v_args)); __pyx_r = ((PyObject *)__pyx_t_2); __pyx_t_2 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("pandas._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; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_7_sparse_10BlockIndex_5__repr__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6pandas_7_sparse_10BlockIndex_5__repr__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_7_sparse_10BlockIndex_4__repr__(((struct __pyx_obj_6pandas_7_sparse_BlockIndex *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/sparse.pyx":296 * return (BlockIndex, args) * * def __repr__(self): # <<<<<<<<<<<<<< * output = 'BlockIndex\n' * output += 'Block locations: %s\n' % repr(self.blocs) */ static PyObject *__pyx_pf_6pandas_7_sparse_10BlockIndex_4__repr__(struct __pyx_obj_6pandas_7_sparse_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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__repr__", 0); /* "pandas/src/sparse.pyx":297 * * def __repr__(self): * output = 'BlockIndex\n' # <<<<<<<<<<<<<< * output += 'Block locations: %s\n' % repr(self.blocs) * output += 'Block lengths: %s' % repr(self.blengths) */ __Pyx_INCREF(((PyObject *)__pyx_n_s_6)); __pyx_v_output = ((PyObject *)__pyx_n_s_6); /* "pandas/src/sparse.pyx":298 * 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_filename = __pyx_f[0]; __pyx_lineno = 298; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_7), __pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 298; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_output, ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 298; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __Pyx_DECREF_SET(__pyx_v_output, __pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/sparse.pyx":299 * 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_filename = __pyx_f[0]; __pyx_lineno = 299; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_8), __pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 299; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_2)); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_output, ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 299; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __Pyx_DECREF_SET(__pyx_v_output, __pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/sparse.pyx":301 * 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; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("pandas._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; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_7_sparse_10BlockIndex_7ngaps(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static PyObject *__pyx_pw_6pandas_7_sparse_10BlockIndex_7ngaps(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("ngaps (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_7_sparse_10BlockIndex_6ngaps(((struct __pyx_obj_6pandas_7_sparse_BlockIndex *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/sparse.pyx":304 * * @property * def ngaps(self): # <<<<<<<<<<<<<< * return self.length - self.npoints * */ static PyObject *__pyx_pf_6pandas_7_sparse_10BlockIndex_6ngaps(struct __pyx_obj_6pandas_7_sparse_BlockIndex *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("ngaps", 0); /* "pandas/src/sparse.pyx":305 * @property * def ngaps(self): * return self.length - self.npoints # <<<<<<<<<<<<<< * * cpdef check_integrity(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_filename = __pyx_f[0]; __pyx_lineno = 305; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas._sparse.BlockIndex.ngaps", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/sparse.pyx":307 * return self.length - self.npoints * * cpdef check_integrity(self): # <<<<<<<<<<<<<< * ''' * Check: */ static PyObject *__pyx_pw_6pandas_7_sparse_10BlockIndex_9check_integrity(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static PyObject *__pyx_f_6pandas_7_sparse_10BlockIndex_check_integrity(struct __pyx_obj_6pandas_7_sparse_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; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; Py_ssize_t __pyx_t_7; Py_ssize_t __pyx_t_8; int __pyx_t_9; Py_ssize_t __pyx_t_10; Py_ssize_t __pyx_t_11; Py_ssize_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_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __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_filename = __pyx_f[0]; __pyx_lineno = 307; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_6pandas_7_sparse_10BlockIndex_9check_integrity)) { __Pyx_XDECREF(__pyx_r); __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 307; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } /* "pandas/src/sparse.pyx":318 * 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_3 = __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_3 < 0)) { PyErr_Fetch(&__pyx_t_4, &__pyx_t_5, &__pyx_t_6); 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_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_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_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 318; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_blocs = ((PyArrayObject *)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/sparse.pyx":319 * * 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_3 = __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_3 < 0)) { PyErr_Fetch(&__pyx_t_6, &__pyx_t_5, &__pyx_t_4); 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_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_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_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 319; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_blengths = ((PyArrayObject *)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/sparse.pyx":321 * blengths = self.blengths * * if len(blocs) != len(blengths): # <<<<<<<<<<<<<< * raise ValueError('block bound arrays must be same length') * */ __pyx_t_7 = PyObject_Length(((PyObject *)__pyx_v_blocs)); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 321; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_8 = PyObject_Length(((PyObject *)__pyx_v_blengths)); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 321; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_9 = ((__pyx_t_7 != __pyx_t_8) != 0); if (__pyx_t_9) { /* "pandas/src/sparse.pyx":322 * * if len(blocs) != len(blengths): * raise ValueError('block bound arrays must be same length') # <<<<<<<<<<<<<< * * for i from 0 <= i < self.nblocks: */ __pyx_t_1 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_10), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 322; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 322; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L3; } __pyx_L3:; /* "pandas/src/sparse.pyx":324 * 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_8 = __pyx_v_self->nblocks; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_8; __pyx_v_i++) { /* "pandas/src/sparse.pyx":325 * * 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_9 = ((__pyx_v_i > 0) != 0); if (__pyx_t_9) { /* "pandas/src/sparse.pyx":326 * 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_7 = __pyx_v_i; __pyx_t_3 = -1; if (__pyx_t_7 < 0) { __pyx_t_7 += __pyx_pybuffernd_blocs.diminfo[0].shape; if (unlikely(__pyx_t_7 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_7 >= __pyx_pybuffernd_blocs.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 326; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_10 = (__pyx_v_i - 1); __pyx_t_3 = -1; if (__pyx_t_10 < 0) { __pyx_t_10 += __pyx_pybuffernd_blocs.diminfo[0].shape; if (unlikely(__pyx_t_10 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_10 >= __pyx_pybuffernd_blocs.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 326; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_9 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_blocs.rcbuffer->pybuffer.buf, __pyx_t_7, __pyx_pybuffernd_blocs.diminfo[0].strides)) <= (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_blocs.rcbuffer->pybuffer.buf, __pyx_t_10, __pyx_pybuffernd_blocs.diminfo[0].strides))) != 0); if (__pyx_t_9) { /* "pandas/src/sparse.pyx":327 * if i > 0: * if blocs[i] <= blocs[i-1]: * raise ValueError('Locations not in ascending order') # <<<<<<<<<<<<<< * * if i < self.nblocks - 1: */ __pyx_t_1 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_12), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 327; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 327; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L7; } __pyx_L7:; goto __pyx_L6; } __pyx_L6:; /* "pandas/src/sparse.pyx":329 * 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_9 = ((__pyx_v_i < (__pyx_v_self->nblocks - 1)) != 0); if (__pyx_t_9) { /* "pandas/src/sparse.pyx":330 * * if i < self.nblocks - 1: * if blocs[i] + blengths[i] > blocs[i + 1]: # <<<<<<<<<<<<<< * raise ValueError('Block %d overlaps' % i) * else: */ __pyx_t_11 = __pyx_v_i; __pyx_t_3 = -1; if (__pyx_t_11 < 0) { __pyx_t_11 += __pyx_pybuffernd_blocs.diminfo[0].shape; if (unlikely(__pyx_t_11 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_11 >= __pyx_pybuffernd_blocs.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 330; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_12 = __pyx_v_i; __pyx_t_3 = -1; if (__pyx_t_12 < 0) { __pyx_t_12 += __pyx_pybuffernd_blengths.diminfo[0].shape; if (unlikely(__pyx_t_12 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_12 >= __pyx_pybuffernd_blengths.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 330; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_13 = (__pyx_v_i + 1); __pyx_t_3 = -1; if (__pyx_t_13 < 0) { __pyx_t_13 += __pyx_pybuffernd_blocs.diminfo[0].shape; if (unlikely(__pyx_t_13 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_13 >= __pyx_pybuffernd_blocs.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 330; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_9 = ((((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_blocs.rcbuffer->pybuffer.buf, __pyx_t_11, __pyx_pybuffernd_blocs.diminfo[0].strides)) + (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_blengths.rcbuffer->pybuffer.buf, __pyx_t_12, __pyx_pybuffernd_blengths.diminfo[0].strides))) > (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_blocs.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_blocs.diminfo[0].strides))) != 0); if (__pyx_t_9) { /* "pandas/src/sparse.pyx":331 * 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_filename = __pyx_f[0]; __pyx_lineno = 331; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_13), __pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 331; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_2)); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 331; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_t_2)); __Pyx_GIVEREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 331; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 331; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L9; } __pyx_L9:; goto __pyx_L8; } /*else*/ { /* "pandas/src/sparse.pyx":333 * raise ValueError('Block %d overlaps' % i) * else: * if blocs[i] + blengths[i] > self.length: # <<<<<<<<<<<<<< * raise ValueError('Block %d extends beyond end' % i) * */ __pyx_t_14 = __pyx_v_i; __pyx_t_3 = -1; if (__pyx_t_14 < 0) { __pyx_t_14 += __pyx_pybuffernd_blocs.diminfo[0].shape; if (unlikely(__pyx_t_14 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_14 >= __pyx_pybuffernd_blocs.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 333; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_15 = __pyx_v_i; __pyx_t_3 = -1; if (__pyx_t_15 < 0) { __pyx_t_15 += __pyx_pybuffernd_blengths.diminfo[0].shape; if (unlikely(__pyx_t_15 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_15 >= __pyx_pybuffernd_blengths.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 333; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_9 = ((((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_blocs.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_blocs.diminfo[0].strides)) + (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_blengths.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_blengths.diminfo[0].strides))) > __pyx_v_self->length) != 0); if (__pyx_t_9) { /* "pandas/src/sparse.pyx":334 * else: * if blocs[i] + blengths[i] > self.length: * raise ValueError('Block %d extends beyond end' % i) # <<<<<<<<<<<<<< * * # no zero-length blocks */ __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_i); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 334; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_14), __pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 334; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 334; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_t_1)); __Pyx_GIVEREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_t_1 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 334; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(((PyObject *)__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_filename = __pyx_f[0]; __pyx_lineno = 334; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L10; } __pyx_L10:; } __pyx_L8:; /* "pandas/src/sparse.pyx":337 * * # no zero-length blocks * if blengths[i] == 0: # <<<<<<<<<<<<<< * raise ValueError('Zero-length block %d' % i) * */ __pyx_t_16 = __pyx_v_i; __pyx_t_3 = -1; if (__pyx_t_16 < 0) { __pyx_t_16 += __pyx_pybuffernd_blengths.diminfo[0].shape; if (unlikely(__pyx_t_16 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_16 >= __pyx_pybuffernd_blengths.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 337; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_9 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_blengths.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_blengths.diminfo[0].strides)) == 0) != 0); if (__pyx_t_9) { /* "pandas/src/sparse.pyx":338 * # 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_filename = __pyx_f[0]; __pyx_lineno = 338; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_15), __pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 338; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_2)); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 338; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_t_2)); __Pyx_GIVEREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 338; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 338; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L11; } __pyx_L11:; } __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __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._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_7_sparse_10BlockIndex_9check_integrity(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_6pandas_7_sparse_10BlockIndex_8check_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_7_sparse_10BlockIndex_9check_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_7_sparse_10BlockIndex_8check_integrity(((struct __pyx_obj_6pandas_7_sparse_BlockIndex *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/sparse.pyx":307 * return self.length - self.npoints * * cpdef check_integrity(self): # <<<<<<<<<<<<<< * ''' * Check: */ static PyObject *__pyx_pf_6pandas_7_sparse_10BlockIndex_8check_integrity(struct __pyx_obj_6pandas_7_sparse_BlockIndex *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("check_integrity", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = ((struct __pyx_vtabstruct_6pandas_7_sparse_BlockIndex *)__pyx_v_self->__pyx_vtab)->check_integrity(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 307; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas._sparse.BlockIndex.check_integrity", __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_7_sparse_10BlockIndex_11equals(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/ static PyObject *__pyx_pw_6pandas_7_sparse_10BlockIndex_11equals(PyObject *__pyx_v_self, PyObject *__pyx_v_other) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("equals (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_7_sparse_10BlockIndex_10equals(((struct __pyx_obj_6pandas_7_sparse_BlockIndex *)__pyx_v_self), ((PyObject *)__pyx_v_other)); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/sparse.pyx":340 * raise ValueError('Zero-length block %d' % i) * * def equals(self, other): # <<<<<<<<<<<<<< * if not isinstance(other, BlockIndex): * return False */ static PyObject *__pyx_pf_6pandas_7_sparse_10BlockIndex_10equals(struct __pyx_obj_6pandas_7_sparse_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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("equals", 0); /* "pandas/src/sparse.pyx":341 * * def equals(self, other): * if not isinstance(other, BlockIndex): # <<<<<<<<<<<<<< * return False * */ __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_other, ((PyObject*)__pyx_ptype_6pandas_7_sparse_BlockIndex)); __pyx_t_2 = ((!(__pyx_t_1 != 0)) != 0); if (__pyx_t_2) { /* "pandas/src/sparse.pyx":342 * def equals(self, other): * if not isinstance(other, BlockIndex): * return False # <<<<<<<<<<<<<< * * if self is other: */ __Pyx_XDECREF(__pyx_r); __pyx_t_3 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 342; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; goto __pyx_L3; } __pyx_L3:; /* "pandas/src/sparse.pyx":344 * 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/src/sparse.pyx":345 * * if self is other: * return True # <<<<<<<<<<<<<< * * same_length = self.length == other.length */ __Pyx_XDECREF(__pyx_r); __pyx_t_3 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 345; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; goto __pyx_L4; } __pyx_L4:; /* "pandas/src/sparse.pyx":347 * 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 = PyInt_FromSsize_t(__pyx_v_self->length); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 347; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 347; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 347; __pyx_clineno = __LINE__; goto __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/src/sparse.pyx":348 * * 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_5 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 348; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s__array_equal); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 348; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_other, __pyx_n_s__blocs); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 348; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 348; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(((PyObject *)__pyx_v_self->blocs)); PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_v_self->blocs)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self->blocs)); PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 348; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 348; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__pyx_t_1) { __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "pandas/src/sparse.pyx":349 * 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_filename = __pyx_f[0]; __pyx_lineno = 349; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s__array_equal); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 349; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_other, __pyx_n_s__blengths); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 349; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 349; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(((PyObject *)__pyx_v_self->blengths)); PyTuple_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_v_self->blengths)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self->blengths)); PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 349; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0; __pyx_t_6 = __pyx_t_3; __pyx_t_3 = 0; } else { __pyx_t_6 = __pyx_t_5; __pyx_t_5 = 0; } __pyx_v_same_blocks = __pyx_t_6; __pyx_t_6 = 0; /* "pandas/src/sparse.pyx":350 * 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_filename = __pyx_f[0]; __pyx_lineno = 350; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__pyx_t_1) { __Pyx_INCREF(__pyx_v_same_blocks); __pyx_t_6 = __pyx_v_same_blocks; } else { __Pyx_INCREF(__pyx_v_same_length); __pyx_t_6 = __pyx_v_same_length; } __pyx_r = __pyx_t_6; __pyx_t_6 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("pandas._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; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_7_sparse_10BlockIndex_13to_block_index(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static PyObject *__pyx_pw_6pandas_7_sparse_10BlockIndex_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_7_sparse_10BlockIndex_12to_block_index(((struct __pyx_obj_6pandas_7_sparse_BlockIndex *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/sparse.pyx":352 * return same_length and same_blocks * * def to_block_index(self): # <<<<<<<<<<<<<< * return self * */ static PyObject *__pyx_pf_6pandas_7_sparse_10BlockIndex_12to_block_index(struct __pyx_obj_6pandas_7_sparse_BlockIndex *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("to_block_index", 0); /* "pandas/src/sparse.pyx":353 * * 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; __pyx_r = Py_None; __Pyx_INCREF(Py_None); __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_7_sparse_10BlockIndex_15to_int_index(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static PyObject *__pyx_pw_6pandas_7_sparse_10BlockIndex_15to_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_7_sparse_10BlockIndex_14to_int_index(((struct __pyx_obj_6pandas_7_sparse_BlockIndex *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/sparse.pyx":355 * return self * * def to_int_index(self): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i = 0, j, b */ static PyObject *__pyx_pf_6pandas_7_sparse_10BlockIndex_14to_int_index(struct __pyx_obj_6pandas_7_sparse_BlockIndex *__pyx_v_self) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_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; Py_ssize_t __pyx_t_11; __pyx_t_5numpy_int32_t __pyx_t_12; Py_ssize_t __pyx_t_13; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __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/src/sparse.pyx":357 * def to_int_index(self): * cdef: * Py_ssize_t i = 0, j, b # <<<<<<<<<<<<<< * int32_t offset * ndarray[int32_t, ndim=1] indices */ __pyx_v_i = 0; /* "pandas/src/sparse.pyx":361 * 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_filename = __pyx_f[0]; __pyx_lineno = 361; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 361; __pyx_clineno = __LINE__; goto __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_self->npoints); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 361; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 361; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 361; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 361; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 361; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__dtype), __pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 361; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_3), ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 361; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__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_filename = __pyx_f[0]; __pyx_lineno = 361; __pyx_clineno = __LINE__; goto __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_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_filename = __pyx_f[0]; __pyx_lineno = 361; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_6 = 0; __pyx_v_indices = ((PyArrayObject *)__pyx_t_5); __pyx_t_5 = 0; /* "pandas/src/sparse.pyx":363 * 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/src/sparse.pyx":364 * * 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/src/sparse.pyx":366 * 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/src/sparse.pyx":367 * * 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_filename = __pyx_f[0]; __pyx_lineno = 367; __pyx_clineno = __LINE__; goto __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/src/sparse.pyx":368 * 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/src/sparse.pyx":370 * i += 1 * * return IntIndex(self.length, indices) # <<<<<<<<<<<<<< * * cpdef BlockIndex intersect(self, SparseIndex other): */ __Pyx_XDECREF(__pyx_r); __pyx_t_5 = PyInt_FromSsize_t(__pyx_v_self->length); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 370; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 370; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __Pyx_INCREF(((PyObject *)__pyx_v_indices)); PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject *)__pyx_v_indices)); __Pyx_GIVEREF(((PyObject *)__pyx_v_indices)); __pyx_t_5 = 0; __pyx_t_5 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_6pandas_7_sparse_IntIndex)), ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 370; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_r = __pyx_t_5; __pyx_t_5 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __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._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/src/sparse.pyx":372 * return IntIndex(self.length, indices) * * cpdef BlockIndex intersect(self, SparseIndex other): # <<<<<<<<<<<<<< * ''' * Intersect two BlockIndex objects */ static PyObject *__pyx_pw_6pandas_7_sparse_10BlockIndex_17intersect(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/ static struct __pyx_obj_6pandas_7_sparse_BlockIndex *__pyx_f_6pandas_7_sparse_10BlockIndex_intersect(struct __pyx_obj_6pandas_7_sparse_BlockIndex *__pyx_v_self, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_other, int __pyx_skip_dispatch) { struct __pyx_obj_6pandas_7_sparse_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; PyObject *__pyx_v_out_blocs = 0; PyObject *__pyx_v_out_blengths = 0; Py_ssize_t __pyx_v_xi; Py_ssize_t __pyx_v_yi; __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_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_7_sparse_BlockIndex *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_t_4; int __pyx_t_5; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; int __pyx_t_9; int __pyx_t_10; Py_ssize_t __pyx_t_11; Py_ssize_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; 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; int __pyx_t_29; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __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; /* 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_filename = __pyx_f[0]; __pyx_lineno = 372; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_6pandas_7_sparse_10BlockIndex_17intersect)) { __Pyx_XDECREF(((PyObject *)__pyx_r)); __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 372; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(((PyObject *)__pyx_v_other)); PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_other)); __Pyx_GIVEREF(((PyObject *)__pyx_v_other)); __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 372; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_6pandas_7_sparse_BlockIndex))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 372; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = ((struct __pyx_obj_6pandas_7_sparse_BlockIndex *)__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } /* "pandas/src/sparse.pyx":387 * ndarray[int32_t, ndim=1] xloc, xlen, yloc, ylen * * list out_blocs = [] # <<<<<<<<<<<<<< * list out_blengths = [] * */ __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 387; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_v_out_blocs = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/sparse.pyx":388 * * list out_blocs = [] * list out_blengths = [] # <<<<<<<<<<<<<< * * Py_ssize_t xi = 0, yi = 0 */ __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 388; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_v_out_blengths = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/sparse.pyx":390 * list out_blengths = [] * * Py_ssize_t xi = 0, yi = 0 # <<<<<<<<<<<<<< * int32_t cur_loc, cur_length, diff * */ __pyx_v_xi = 0; __pyx_v_yi = 0; /* "pandas/src/sparse.pyx":393 * int32_t cur_loc, cur_length, diff * * y = other.to_block_index() # <<<<<<<<<<<<<< * * if self.length != y.length: */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_other), __pyx_n_s__to_block_index); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 393; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 393; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_6pandas_7_sparse_BlockIndex))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 393; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_y = ((struct __pyx_obj_6pandas_7_sparse_BlockIndex *)__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/sparse.pyx":395 * y = other.to_block_index() * * if self.length != y.length: # <<<<<<<<<<<<<< * raise Exception('Indices must reference same underlying length') * */ __pyx_t_4 = ((__pyx_v_self->length != __pyx_v_y->length) != 0); if (__pyx_t_4) { /* "pandas/src/sparse.pyx":396 * * if self.length != y.length: * raise Exception('Indices must reference same underlying length') # <<<<<<<<<<<<<< * * xloc = self.blocs */ __pyx_t_3 = PyObject_Call(__pyx_builtin_Exception, ((PyObject *)__pyx_k_tuple_16), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 396; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 396; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L3; } __pyx_L3:; /* "pandas/src/sparse.pyx":398 * raise Exception('Indices must reference same underlying length') * * xloc = self.blocs # <<<<<<<<<<<<<< * xlen = self.blengths * yloc = y.blocs */ __pyx_t_3 = ((PyObject *)__pyx_v_self->blocs); __Pyx_INCREF(__pyx_t_3); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_xloc.rcbuffer->pybuffer); __pyx_t_5 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_xloc.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_3), &__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_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_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_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_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 398; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_xloc = ((PyArrayObject *)__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/sparse.pyx":399 * * xloc = self.blocs * xlen = self.blengths # <<<<<<<<<<<<<< * yloc = y.blocs * ylen = y.blengths */ __pyx_t_3 = ((PyObject *)__pyx_v_self->blengths); __Pyx_INCREF(__pyx_t_3); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_xlen.rcbuffer->pybuffer); __pyx_t_5 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_xlen.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_3), &__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_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_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_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_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 399; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_xlen = ((PyArrayObject *)__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/sparse.pyx":400 * xloc = self.blocs * xlen = self.blengths * yloc = y.blocs # <<<<<<<<<<<<<< * ylen = y.blengths * */ __pyx_t_3 = ((PyObject *)__pyx_v_y->blocs); __Pyx_INCREF(__pyx_t_3); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_yloc.rcbuffer->pybuffer); __pyx_t_5 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_yloc.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_3), &__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_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_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_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_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 400; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_yloc = ((PyArrayObject *)__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/sparse.pyx":401 * xlen = self.blengths * yloc = y.blocs * ylen = y.blengths # <<<<<<<<<<<<<< * * while True: */ __pyx_t_3 = ((PyObject *)__pyx_v_y->blengths); __Pyx_INCREF(__pyx_t_3); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_ylen.rcbuffer->pybuffer); __pyx_t_5 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_ylen.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_3), &__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_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_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_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_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 401; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_ylen = ((PyArrayObject *)__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/sparse.pyx":403 * ylen = y.blengths * * while True: # <<<<<<<<<<<<<< * # we are done (or possibly never began) * if xi >= self.nblocks or yi >= y.nblocks: */ while (1) { if (!1) break; /* "pandas/src/sparse.pyx":405 * while True: * # we are done (or possibly never began) * if xi >= self.nblocks or yi >= y.nblocks: # <<<<<<<<<<<<<< * break * */ __pyx_t_4 = ((__pyx_v_xi >= __pyx_v_self->nblocks) != 0); if (!__pyx_t_4) { __pyx_t_9 = ((__pyx_v_yi >= __pyx_v_y->nblocks) != 0); __pyx_t_10 = __pyx_t_9; } else { __pyx_t_10 = __pyx_t_4; } if (__pyx_t_10) { /* "pandas/src/sparse.pyx":406 * # 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; goto __pyx_L6; } __pyx_L6:; /* "pandas/src/sparse.pyx":409 * * # 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_11 = __pyx_v_xi; __pyx_t_5 = -1; if (__pyx_t_11 < 0) { __pyx_t_11 += __pyx_pybuffernd_xloc.diminfo[0].shape; if (unlikely(__pyx_t_11 < 0)) __pyx_t_5 = 0; } else if (unlikely(__pyx_t_11 >= __pyx_pybuffernd_xloc.diminfo[0].shape)) __pyx_t_5 = 0; if (unlikely(__pyx_t_5 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_5); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 409; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_12 = __pyx_v_yi; __pyx_t_5 = -1; if (__pyx_t_12 < 0) { __pyx_t_12 += __pyx_pybuffernd_yloc.diminfo[0].shape; if (unlikely(__pyx_t_12 < 0)) __pyx_t_5 = 0; } else if (unlikely(__pyx_t_12 >= __pyx_pybuffernd_yloc.diminfo[0].shape)) __pyx_t_5 = 0; if (unlikely(__pyx_t_5 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_5); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 409; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_10 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_xloc.rcbuffer->pybuffer.buf, __pyx_t_11, __pyx_pybuffernd_xloc.diminfo[0].strides)) >= (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_yloc.rcbuffer->pybuffer.buf, __pyx_t_12, __pyx_pybuffernd_yloc.diminfo[0].strides))) != 0); if (__pyx_t_10) { /* "pandas/src/sparse.pyx":410 * # 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_13 = __pyx_v_xi; __pyx_t_5 = -1; if (__pyx_t_13 < 0) { __pyx_t_13 += __pyx_pybuffernd_xloc.diminfo[0].shape; if (unlikely(__pyx_t_13 < 0)) __pyx_t_5 = 0; } else if (unlikely(__pyx_t_13 >= __pyx_pybuffernd_xloc.diminfo[0].shape)) __pyx_t_5 = 0; if (unlikely(__pyx_t_5 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_5); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 410; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_cur_loc = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_xloc.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_xloc.diminfo[0].strides)); /* "pandas/src/sparse.pyx":411 * if xloc[xi] >= yloc[yi]: * cur_loc = xloc[xi] * diff = xloc[xi] - yloc[yi] # <<<<<<<<<<<<<< * * if ylen[yi] <= diff: */ __pyx_t_14 = __pyx_v_xi; __pyx_t_5 = -1; if (__pyx_t_14 < 0) { __pyx_t_14 += __pyx_pybuffernd_xloc.diminfo[0].shape; if (unlikely(__pyx_t_14 < 0)) __pyx_t_5 = 0; } else if (unlikely(__pyx_t_14 >= __pyx_pybuffernd_xloc.diminfo[0].shape)) __pyx_t_5 = 0; if (unlikely(__pyx_t_5 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_5); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 411; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_15 = __pyx_v_yi; __pyx_t_5 = -1; if (__pyx_t_15 < 0) { __pyx_t_15 += __pyx_pybuffernd_yloc.diminfo[0].shape; if (unlikely(__pyx_t_15 < 0)) __pyx_t_5 = 0; } else if (unlikely(__pyx_t_15 >= __pyx_pybuffernd_yloc.diminfo[0].shape)) __pyx_t_5 = 0; if (unlikely(__pyx_t_5 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_5); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 411; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_diff = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_xloc.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_xloc.diminfo[0].strides)) - (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_yloc.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_yloc.diminfo[0].strides))); /* "pandas/src/sparse.pyx":413 * diff = xloc[xi] - yloc[yi] * * if ylen[yi] <= diff: # <<<<<<<<<<<<<< * # have to skip this block * yi += 1 */ __pyx_t_16 = __pyx_v_yi; __pyx_t_5 = -1; if (__pyx_t_16 < 0) { __pyx_t_16 += __pyx_pybuffernd_ylen.diminfo[0].shape; if (unlikely(__pyx_t_16 < 0)) __pyx_t_5 = 0; } else if (unlikely(__pyx_t_16 >= __pyx_pybuffernd_ylen.diminfo[0].shape)) __pyx_t_5 = 0; if (unlikely(__pyx_t_5 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_5); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 413; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_10 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_ylen.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_ylen.diminfo[0].strides)) <= __pyx_v_diff) != 0); if (__pyx_t_10) { /* "pandas/src/sparse.pyx":415 * if ylen[yi] <= diff: * # have to skip this block * yi += 1 # <<<<<<<<<<<<<< * continue * */ __pyx_v_yi = (__pyx_v_yi + 1); /* "pandas/src/sparse.pyx":416 * # have to skip this block * yi += 1 * continue # <<<<<<<<<<<<<< * * if ylen[yi] - diff < xlen[xi]: */ goto __pyx_L4_continue; goto __pyx_L8; } __pyx_L8:; /* "pandas/src/sparse.pyx":418 * continue * * if ylen[yi] - diff < xlen[xi]: # <<<<<<<<<<<<<< * # take end of y block, move onward * cur_length = ylen[yi] - diff */ __pyx_t_17 = __pyx_v_yi; __pyx_t_5 = -1; if (__pyx_t_17 < 0) { __pyx_t_17 += __pyx_pybuffernd_ylen.diminfo[0].shape; if (unlikely(__pyx_t_17 < 0)) __pyx_t_5 = 0; } else if (unlikely(__pyx_t_17 >= __pyx_pybuffernd_ylen.diminfo[0].shape)) __pyx_t_5 = 0; if (unlikely(__pyx_t_5 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_5); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 418; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_18 = __pyx_v_xi; __pyx_t_5 = -1; if (__pyx_t_18 < 0) { __pyx_t_18 += __pyx_pybuffernd_xlen.diminfo[0].shape; if (unlikely(__pyx_t_18 < 0)) __pyx_t_5 = 0; } else if (unlikely(__pyx_t_18 >= __pyx_pybuffernd_xlen.diminfo[0].shape)) __pyx_t_5 = 0; if (unlikely(__pyx_t_5 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_5); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 418; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_10 = ((((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_ylen.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_ylen.diminfo[0].strides)) - __pyx_v_diff) < (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_xlen.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_xlen.diminfo[0].strides))) != 0); if (__pyx_t_10) { /* "pandas/src/sparse.pyx":420 * if ylen[yi] - diff < xlen[xi]: * # take end of y block, move onward * cur_length = ylen[yi] - diff # <<<<<<<<<<<<<< * yi += 1 * else: */ __pyx_t_19 = __pyx_v_yi; __pyx_t_5 = -1; if (__pyx_t_19 < 0) { __pyx_t_19 += __pyx_pybuffernd_ylen.diminfo[0].shape; if (unlikely(__pyx_t_19 < 0)) __pyx_t_5 = 0; } else if (unlikely(__pyx_t_19 >= __pyx_pybuffernd_ylen.diminfo[0].shape)) __pyx_t_5 = 0; if (unlikely(__pyx_t_5 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_5); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 420; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_cur_length = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_ylen.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_ylen.diminfo[0].strides)) - __pyx_v_diff); /* "pandas/src/sparse.pyx":421 * # 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); goto __pyx_L9; } /*else*/ { /* "pandas/src/sparse.pyx":424 * else: * # take end of x block * cur_length = xlen[xi] # <<<<<<<<<<<<<< * xi += 1 * */ __pyx_t_20 = __pyx_v_xi; __pyx_t_5 = -1; if (__pyx_t_20 < 0) { __pyx_t_20 += __pyx_pybuffernd_xlen.diminfo[0].shape; if (unlikely(__pyx_t_20 < 0)) __pyx_t_5 = 0; } else if (unlikely(__pyx_t_20 >= __pyx_pybuffernd_xlen.diminfo[0].shape)) __pyx_t_5 = 0; if (unlikely(__pyx_t_5 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_5); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 424; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_cur_length = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_xlen.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_xlen.diminfo[0].strides)); /* "pandas/src/sparse.pyx":425 * # take end of x block * cur_length = xlen[xi] * xi += 1 # <<<<<<<<<<<<<< * * else: # xloc[xi] < yloc[yi] */ __pyx_v_xi = (__pyx_v_xi + 1); } __pyx_L9:; goto __pyx_L7; } /*else*/ { /* "pandas/src/sparse.pyx":428 * * else: # xloc[xi] < yloc[yi] * cur_loc = yloc[yi] # <<<<<<<<<<<<<< * diff = yloc[yi] - xloc[xi] * */ __pyx_t_21 = __pyx_v_yi; __pyx_t_5 = -1; if (__pyx_t_21 < 0) { __pyx_t_21 += __pyx_pybuffernd_yloc.diminfo[0].shape; if (unlikely(__pyx_t_21 < 0)) __pyx_t_5 = 0; } else if (unlikely(__pyx_t_21 >= __pyx_pybuffernd_yloc.diminfo[0].shape)) __pyx_t_5 = 0; if (unlikely(__pyx_t_5 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_5); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 428; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_cur_loc = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_yloc.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_yloc.diminfo[0].strides)); /* "pandas/src/sparse.pyx":429 * else: # xloc[xi] < yloc[yi] * cur_loc = yloc[yi] * diff = yloc[yi] - xloc[xi] # <<<<<<<<<<<<<< * * if xlen[xi] <= diff: */ __pyx_t_22 = __pyx_v_yi; __pyx_t_5 = -1; if (__pyx_t_22 < 0) { __pyx_t_22 += __pyx_pybuffernd_yloc.diminfo[0].shape; if (unlikely(__pyx_t_22 < 0)) __pyx_t_5 = 0; } else if (unlikely(__pyx_t_22 >= __pyx_pybuffernd_yloc.diminfo[0].shape)) __pyx_t_5 = 0; if (unlikely(__pyx_t_5 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_5); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 429; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_23 = __pyx_v_xi; __pyx_t_5 = -1; if (__pyx_t_23 < 0) { __pyx_t_23 += __pyx_pybuffernd_xloc.diminfo[0].shape; if (unlikely(__pyx_t_23 < 0)) __pyx_t_5 = 0; } else if (unlikely(__pyx_t_23 >= __pyx_pybuffernd_xloc.diminfo[0].shape)) __pyx_t_5 = 0; if (unlikely(__pyx_t_5 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_5); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 429; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_diff = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_yloc.rcbuffer->pybuffer.buf, __pyx_t_22, __pyx_pybuffernd_yloc.diminfo[0].strides)) - (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_xloc.rcbuffer->pybuffer.buf, __pyx_t_23, __pyx_pybuffernd_xloc.diminfo[0].strides))); /* "pandas/src/sparse.pyx":431 * diff = yloc[yi] - xloc[xi] * * if xlen[xi] <= diff: # <<<<<<<<<<<<<< * # have to skip this block * xi += 1 */ __pyx_t_24 = __pyx_v_xi; __pyx_t_5 = -1; if (__pyx_t_24 < 0) { __pyx_t_24 += __pyx_pybuffernd_xlen.diminfo[0].shape; if (unlikely(__pyx_t_24 < 0)) __pyx_t_5 = 0; } else if (unlikely(__pyx_t_24 >= __pyx_pybuffernd_xlen.diminfo[0].shape)) __pyx_t_5 = 0; if (unlikely(__pyx_t_5 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_5); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 431; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_10 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_xlen.rcbuffer->pybuffer.buf, __pyx_t_24, __pyx_pybuffernd_xlen.diminfo[0].strides)) <= __pyx_v_diff) != 0); if (__pyx_t_10) { /* "pandas/src/sparse.pyx":433 * if xlen[xi] <= diff: * # have to skip this block * xi += 1 # <<<<<<<<<<<<<< * continue * */ __pyx_v_xi = (__pyx_v_xi + 1); /* "pandas/src/sparse.pyx":434 * # have to skip this block * xi += 1 * continue # <<<<<<<<<<<<<< * * if xlen[xi] - diff < ylen[yi]: */ goto __pyx_L4_continue; goto __pyx_L10; } __pyx_L10:; /* "pandas/src/sparse.pyx":436 * continue * * if xlen[xi] - diff < ylen[yi]: # <<<<<<<<<<<<<< * # take end of x block, move onward * cur_length = xlen[xi] - diff */ __pyx_t_25 = __pyx_v_xi; __pyx_t_5 = -1; if (__pyx_t_25 < 0) { __pyx_t_25 += __pyx_pybuffernd_xlen.diminfo[0].shape; if (unlikely(__pyx_t_25 < 0)) __pyx_t_5 = 0; } else if (unlikely(__pyx_t_25 >= __pyx_pybuffernd_xlen.diminfo[0].shape)) __pyx_t_5 = 0; if (unlikely(__pyx_t_5 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_5); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 436; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_26 = __pyx_v_yi; __pyx_t_5 = -1; if (__pyx_t_26 < 0) { __pyx_t_26 += __pyx_pybuffernd_ylen.diminfo[0].shape; if (unlikely(__pyx_t_26 < 0)) __pyx_t_5 = 0; } else if (unlikely(__pyx_t_26 >= __pyx_pybuffernd_ylen.diminfo[0].shape)) __pyx_t_5 = 0; if (unlikely(__pyx_t_5 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_5); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 436; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_10 = ((((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_xlen.rcbuffer->pybuffer.buf, __pyx_t_25, __pyx_pybuffernd_xlen.diminfo[0].strides)) - __pyx_v_diff) < (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_ylen.rcbuffer->pybuffer.buf, __pyx_t_26, __pyx_pybuffernd_ylen.diminfo[0].strides))) != 0); if (__pyx_t_10) { /* "pandas/src/sparse.pyx":438 * if xlen[xi] - diff < ylen[yi]: * # take end of x block, move onward * cur_length = xlen[xi] - diff # <<<<<<<<<<<<<< * xi += 1 * else: */ __pyx_t_27 = __pyx_v_xi; __pyx_t_5 = -1; if (__pyx_t_27 < 0) { __pyx_t_27 += __pyx_pybuffernd_xlen.diminfo[0].shape; if (unlikely(__pyx_t_27 < 0)) __pyx_t_5 = 0; } else if (unlikely(__pyx_t_27 >= __pyx_pybuffernd_xlen.diminfo[0].shape)) __pyx_t_5 = 0; if (unlikely(__pyx_t_5 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_5); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 438; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_cur_length = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_xlen.rcbuffer->pybuffer.buf, __pyx_t_27, __pyx_pybuffernd_xlen.diminfo[0].strides)) - __pyx_v_diff); /* "pandas/src/sparse.pyx":439 * # 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); goto __pyx_L11; } /*else*/ { /* "pandas/src/sparse.pyx":442 * else: * # take end of y block * cur_length = ylen[yi] # <<<<<<<<<<<<<< * yi += 1 * */ __pyx_t_28 = __pyx_v_yi; __pyx_t_5 = -1; if (__pyx_t_28 < 0) { __pyx_t_28 += __pyx_pybuffernd_ylen.diminfo[0].shape; if (unlikely(__pyx_t_28 < 0)) __pyx_t_5 = 0; } else if (unlikely(__pyx_t_28 >= __pyx_pybuffernd_ylen.diminfo[0].shape)) __pyx_t_5 = 0; if (unlikely(__pyx_t_5 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_5); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 442; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_cur_length = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_ylen.rcbuffer->pybuffer.buf, __pyx_t_28, __pyx_pybuffernd_ylen.diminfo[0].strides)); /* "pandas/src/sparse.pyx":443 * # take end of y block * cur_length = ylen[yi] * yi += 1 # <<<<<<<<<<<<<< * * out_blocs.append(cur_loc) */ __pyx_v_yi = (__pyx_v_yi + 1); } __pyx_L11:; } __pyx_L7:; /* "pandas/src/sparse.pyx":445 * yi += 1 * * out_blocs.append(cur_loc) # <<<<<<<<<<<<<< * out_blengths.append(cur_length) * */ __pyx_t_3 = __Pyx_PyInt_to_py_npy_int32(__pyx_v_cur_loc); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 445; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_29 = __Pyx_PyList_Append(__pyx_v_out_blocs, __pyx_t_3); if (unlikely(__pyx_t_29 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 445; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/sparse.pyx":446 * * out_blocs.append(cur_loc) * out_blengths.append(cur_length) # <<<<<<<<<<<<<< * * return BlockIndex(self.length, out_blocs, out_blengths) */ __pyx_t_3 = __Pyx_PyInt_to_py_npy_int32(__pyx_v_cur_length); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 446; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_29 = __Pyx_PyList_Append(__pyx_v_out_blengths, __pyx_t_3); if (unlikely(__pyx_t_29 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 446; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_L4_continue:; } __pyx_L5_break:; /* "pandas/src/sparse.pyx":448 * out_blengths.append(cur_length) * * return BlockIndex(self.length, out_blocs, out_blengths) # <<<<<<<<<<<<<< * * cpdef BlockIndex make_union(self, SparseIndex y): */ __Pyx_XDECREF(((PyObject *)__pyx_r)); __pyx_t_3 = PyInt_FromSsize_t(__pyx_v_self->length); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 448; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 448; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __Pyx_INCREF(((PyObject *)__pyx_v_out_blocs)); PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject *)__pyx_v_out_blocs)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out_blocs)); __Pyx_INCREF(((PyObject *)__pyx_v_out_blengths)); PyTuple_SET_ITEM(__pyx_t_1, 2, ((PyObject *)__pyx_v_out_blengths)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out_blengths)); __pyx_t_3 = 0; __pyx_t_3 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_6pandas_7_sparse_BlockIndex)), ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 448; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_r = ((struct __pyx_obj_6pandas_7_sparse_BlockIndex *)__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L0; __pyx_r = ((struct __pyx_obj_6pandas_7_sparse_BlockIndex *)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); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __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._sparse.BlockIndex.intersect", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; goto __pyx_L2; __pyx_L0:; __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(__pyx_v_out_blocs); __Pyx_XDECREF(__pyx_v_out_blengths); __Pyx_XGIVEREF((PyObject *)__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_7_sparse_10BlockIndex_17intersect(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/ static char __pyx_doc_6pandas_7_sparse_10BlockIndex_16intersect[] = "\n Intersect two BlockIndex objects\n\n Parameters\n ----------\n\n Returns\n -------\n intersection : BlockIndex\n "; static PyObject *__pyx_pw_6pandas_7_sparse_10BlockIndex_17intersect(PyObject *__pyx_v_self, PyObject *__pyx_v_other) { CYTHON_UNUSED int __pyx_lineno = 0; CYTHON_UNUSED const char *__pyx_filename = NULL; CYTHON_UNUSED int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("intersect (wrapper)", 0); if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_other), __pyx_ptype_6pandas_7_sparse_SparseIndex, 1, "other", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 372; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_7_sparse_10BlockIndex_16intersect(((struct __pyx_obj_6pandas_7_sparse_BlockIndex *)__pyx_v_self), ((struct __pyx_obj_6pandas_7_sparse_SparseIndex *)__pyx_v_other)); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/sparse.pyx":372 * return IntIndex(self.length, indices) * * cpdef BlockIndex intersect(self, SparseIndex other): # <<<<<<<<<<<<<< * ''' * Intersect two BlockIndex objects */ static PyObject *__pyx_pf_6pandas_7_sparse_10BlockIndex_16intersect(struct __pyx_obj_6pandas_7_sparse_BlockIndex *__pyx_v_self, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_other) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("intersect", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_6pandas_7_sparse_BlockIndex *)__pyx_v_self->__pyx_vtab)->intersect(__pyx_v_self, __pyx_v_other, 1)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 372; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas._sparse.BlockIndex.intersect", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/sparse.pyx":450 * return BlockIndex(self.length, out_blocs, out_blengths) * * cpdef BlockIndex make_union(self, SparseIndex y): # <<<<<<<<<<<<<< * ''' * Combine together two BlockIndex objects, accepting indices if contained */ static PyObject *__pyx_pw_6pandas_7_sparse_10BlockIndex_19make_union(PyObject *__pyx_v_self, PyObject *__pyx_v_y); /*proto*/ static struct __pyx_obj_6pandas_7_sparse_BlockIndex *__pyx_f_6pandas_7_sparse_10BlockIndex_make_union(struct __pyx_obj_6pandas_7_sparse_BlockIndex *__pyx_v_self, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_y, int __pyx_skip_dispatch) { struct __pyx_obj_6pandas_7_sparse_BlockIndex *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("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_filename = __pyx_f[0]; __pyx_lineno = 450; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_6pandas_7_sparse_10BlockIndex_19make_union)) { __Pyx_XDECREF(((PyObject *)__pyx_r)); __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 450; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(((PyObject *)__pyx_v_y)); PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_y)); __Pyx_GIVEREF(((PyObject *)__pyx_v_y)); __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 450; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_6pandas_7_sparse_BlockIndex))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 450; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = ((struct __pyx_obj_6pandas_7_sparse_BlockIndex *)__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } /* "pandas/src/sparse.pyx":467 * union : BlockIndex * ''' * return BlockUnion(self, y.to_block_index()).result # <<<<<<<<<<<<<< * * cpdef lookup(self, Py_ssize_t index): */ __Pyx_XDECREF(((PyObject *)__pyx_r)); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_y), __pyx_n_s__to_block_index); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 467; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 467; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 467; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)__pyx_v_self)); PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_self)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self)); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_6pandas_7_sparse_BlockUnion)), ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 467; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __Pyx_INCREF(((PyObject *)((struct __pyx_obj_6pandas_7_sparse_BlockUnion *)__pyx_t_3)->__pyx_base.result)); __pyx_r = ((struct __pyx_obj_6pandas_7_sparse_BlockUnion *)__pyx_t_3)->__pyx_base.result; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L0; __pyx_r = ((struct __pyx_obj_6pandas_7_sparse_BlockIndex *)Py_None); __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("pandas._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_7_sparse_10BlockIndex_19make_union(PyObject *__pyx_v_self, PyObject *__pyx_v_y); /*proto*/ static char __pyx_doc_6pandas_7_sparse_10BlockIndex_18make_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_7_sparse_10BlockIndex_19make_union(PyObject *__pyx_v_self, PyObject *__pyx_v_y) { CYTHON_UNUSED int __pyx_lineno = 0; CYTHON_UNUSED const char *__pyx_filename = NULL; CYTHON_UNUSED int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("make_union (wrapper)", 0); if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_y), __pyx_ptype_6pandas_7_sparse_SparseIndex, 1, "y", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 450; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_7_sparse_10BlockIndex_18make_union(((struct __pyx_obj_6pandas_7_sparse_BlockIndex *)__pyx_v_self), ((struct __pyx_obj_6pandas_7_sparse_SparseIndex *)__pyx_v_y)); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/sparse.pyx":450 * return BlockIndex(self.length, out_blocs, out_blengths) * * cpdef BlockIndex make_union(self, SparseIndex y): # <<<<<<<<<<<<<< * ''' * Combine together two BlockIndex objects, accepting indices if contained */ static PyObject *__pyx_pf_6pandas_7_sparse_10BlockIndex_18make_union(struct __pyx_obj_6pandas_7_sparse_BlockIndex *__pyx_v_self, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_y) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("make_union", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_6pandas_7_sparse_BlockIndex *)__pyx_v_self->__pyx_vtab)->make_union(__pyx_v_self, __pyx_v_y, 1)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 450; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas._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/src/sparse.pyx":469 * return BlockUnion(self, y.to_block_index()).result * * cpdef lookup(self, Py_ssize_t index): # <<<<<<<<<<<<<< * ''' * */ static PyObject *__pyx_pw_6pandas_7_sparse_10BlockIndex_21lookup(PyObject *__pyx_v_self, PyObject *__pyx_arg_index); /*proto*/ static PyObject *__pyx_f_6pandas_7_sparse_10BlockIndex_lookup(struct __pyx_obj_6pandas_7_sparse_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; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_t_4; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; int __pyx_t_8; long __pyx_t_9; Py_ssize_t __pyx_t_10; Py_ssize_t __pyx_t_11; Py_ssize_t __pyx_t_12; Py_ssize_t __pyx_t_13; int __pyx_t_14; int __pyx_t_15; Py_ssize_t __pyx_t_16; Py_ssize_t __pyx_t_17; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __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_filename = __pyx_f[0]; __pyx_lineno = 469; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_6pandas_7_sparse_10BlockIndex_21lookup)) { __Pyx_XDECREF(__pyx_r); __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_index); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 469; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 469; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 469; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(((PyObject *)__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/src/sparse.pyx":478 * 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_4 = __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_4 < 0)) { PyErr_Fetch(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7); 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_5); Py_XDECREF(__pyx_t_6); Py_XDECREF(__pyx_t_7); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_5, __pyx_t_6, __pyx_t_7); } } __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_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 478; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_locs = ((PyArrayObject *)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/sparse.pyx":479 * * 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_4 = __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_4 < 0)) { PyErr_Fetch(&__pyx_t_7, &__pyx_t_6, &__pyx_t_5); 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_7); Py_XDECREF(__pyx_t_6); Py_XDECREF(__pyx_t_5); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_7, __pyx_t_6, __pyx_t_5); } } __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_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 479; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_lens = ((PyArrayObject *)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/sparse.pyx":481 * lens = self.blengths * * if self.nblocks == 0: # <<<<<<<<<<<<<< * return -1 * elif index < locs[0]: */ __pyx_t_8 = ((__pyx_v_self->nblocks == 0) != 0); if (__pyx_t_8) { /* "pandas/src/sparse.pyx":482 * * if self.nblocks == 0: * return -1 # <<<<<<<<<<<<<< * elif index < locs[0]: * return -1 */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_int_neg_1); __pyx_r = __pyx_int_neg_1; goto __pyx_L0; goto __pyx_L3; } /* "pandas/src/sparse.pyx":483 * if self.nblocks == 0: * return -1 * elif index < locs[0]: # <<<<<<<<<<<<<< * return -1 * */ __pyx_t_9 = 0; __pyx_t_4 = -1; if (__pyx_t_9 < 0) { __pyx_t_9 += __pyx_pybuffernd_locs.diminfo[0].shape; if (unlikely(__pyx_t_9 < 0)) __pyx_t_4 = 0; } else if (unlikely(__pyx_t_9 >= __pyx_pybuffernd_locs.diminfo[0].shape)) __pyx_t_4 = 0; if (unlikely(__pyx_t_4 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_4); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 483; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_8 = ((__pyx_v_index < (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_locs.rcbuffer->pybuffer.buf, __pyx_t_9, __pyx_pybuffernd_locs.diminfo[0].strides))) != 0); if (__pyx_t_8) { /* "pandas/src/sparse.pyx":484 * return -1 * elif index < locs[0]: * return -1 # <<<<<<<<<<<<<< * * cum_len = 0 */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_int_neg_1); __pyx_r = __pyx_int_neg_1; goto __pyx_L0; goto __pyx_L3; } __pyx_L3:; /* "pandas/src/sparse.pyx":486 * 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/src/sparse.pyx":487 * * 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_10 = __pyx_v_self->nblocks; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_10; __pyx_v_i++) { /* "pandas/src/sparse.pyx":488 * 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_11 = __pyx_v_i; __pyx_t_4 = -1; if (__pyx_t_11 < 0) { __pyx_t_11 += __pyx_pybuffernd_locs.diminfo[0].shape; if (unlikely(__pyx_t_11 < 0)) __pyx_t_4 = 0; } else if (unlikely(__pyx_t_11 >= __pyx_pybuffernd_locs.diminfo[0].shape)) __pyx_t_4 = 0; if (unlikely(__pyx_t_4 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_4); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 488; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_8 = ((__pyx_v_index >= (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_locs.rcbuffer->pybuffer.buf, __pyx_t_11, __pyx_pybuffernd_locs.diminfo[0].strides))) != 0); if (__pyx_t_8) { __pyx_t_12 = __pyx_v_i; __pyx_t_4 = -1; if (__pyx_t_12 < 0) { __pyx_t_12 += __pyx_pybuffernd_locs.diminfo[0].shape; if (unlikely(__pyx_t_12 < 0)) __pyx_t_4 = 0; } else if (unlikely(__pyx_t_12 >= __pyx_pybuffernd_locs.diminfo[0].shape)) __pyx_t_4 = 0; if (unlikely(__pyx_t_4 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_4); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 488; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_13 = __pyx_v_i; __pyx_t_4 = -1; if (__pyx_t_13 < 0) { __pyx_t_13 += __pyx_pybuffernd_lens.diminfo[0].shape; if (unlikely(__pyx_t_13 < 0)) __pyx_t_4 = 0; } else if (unlikely(__pyx_t_13 >= __pyx_pybuffernd_lens.diminfo[0].shape)) __pyx_t_4 = 0; if (unlikely(__pyx_t_4 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_4); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 488; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_14 = ((__pyx_v_index < ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_locs.rcbuffer->pybuffer.buf, __pyx_t_12, __pyx_pybuffernd_locs.diminfo[0].strides)) + (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_lens.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_lens.diminfo[0].strides)))) != 0); __pyx_t_15 = __pyx_t_14; } else { __pyx_t_15 = __pyx_t_8; } if (__pyx_t_15) { /* "pandas/src/sparse.pyx":489 * 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_XDECREF(__pyx_r); __pyx_t_16 = __pyx_v_i; __pyx_t_4 = -1; if (__pyx_t_16 < 0) { __pyx_t_16 += __pyx_pybuffernd_locs.diminfo[0].shape; if (unlikely(__pyx_t_16 < 0)) __pyx_t_4 = 0; } else if (unlikely(__pyx_t_16 >= __pyx_pybuffernd_locs.diminfo[0].shape)) __pyx_t_4 = 0; if (unlikely(__pyx_t_4 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_4); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 489; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_1 = PyInt_FromSsize_t(((__pyx_v_cum_len + __pyx_v_index) - (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_locs.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_locs.diminfo[0].strides)))); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 489; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; goto __pyx_L6; } __pyx_L6:; /* "pandas/src/sparse.pyx":490 * if index >= locs[i] and index < locs[i] + lens[i]: * return cum_len + index - locs[i] * cum_len += lens[i] # <<<<<<<<<<<<<< * * return -1 */ __pyx_t_17 = __pyx_v_i; __pyx_t_4 = -1; if (__pyx_t_17 < 0) { __pyx_t_17 += __pyx_pybuffernd_lens.diminfo[0].shape; if (unlikely(__pyx_t_17 < 0)) __pyx_t_4 = 0; } else if (unlikely(__pyx_t_17 >= __pyx_pybuffernd_lens.diminfo[0].shape)) __pyx_t_4 = 0; if (unlikely(__pyx_t_4 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_4); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 490; __pyx_clineno = __LINE__; goto __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_17, __pyx_pybuffernd_lens.diminfo[0].strides))); } /* "pandas/src/sparse.pyx":492 * cum_len += lens[i] * * return -1 # <<<<<<<<<<<<<< * * cpdef ndarray reindex(self, ndarray[float64_t, ndim=1] values, */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_int_neg_1); __pyx_r = __pyx_int_neg_1; goto __pyx_L0; __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); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __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_AddTraceback("pandas._sparse.BlockIndex.lookup", __pyx_clineno, __pyx_lineno, __pyx_filename); __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_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_7_sparse_10BlockIndex_21lookup(PyObject *__pyx_v_self, PyObject *__pyx_arg_index); /*proto*/ static char __pyx_doc_6pandas_7_sparse_10BlockIndex_20lookup[] = "\n\n Returns -1 if not found\n "; static PyObject *__pyx_pw_6pandas_7_sparse_10BlockIndex_21lookup(PyObject *__pyx_v_self, PyObject *__pyx_arg_index) { Py_ssize_t __pyx_v_index; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; 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_filename = __pyx_f[0]; __pyx_lineno = 469; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; __Pyx_AddTraceback("pandas._sparse.BlockIndex.lookup", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pandas_7_sparse_10BlockIndex_20lookup(((struct __pyx_obj_6pandas_7_sparse_BlockIndex *)__pyx_v_self), ((Py_ssize_t)__pyx_v_index)); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/sparse.pyx":469 * return BlockUnion(self, y.to_block_index()).result * * cpdef lookup(self, Py_ssize_t index): # <<<<<<<<<<<<<< * ''' * */ static PyObject *__pyx_pf_6pandas_7_sparse_10BlockIndex_20lookup(struct __pyx_obj_6pandas_7_sparse_BlockIndex *__pyx_v_self, Py_ssize_t __pyx_v_index) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("lookup", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = ((struct __pyx_vtabstruct_6pandas_7_sparse_BlockIndex *)__pyx_v_self->__pyx_vtab)->lookup(__pyx_v_self, __pyx_v_index, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 469; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas._sparse.BlockIndex.lookup", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/sparse.pyx":494 * return -1 * * cpdef ndarray reindex(self, ndarray[float64_t, ndim=1] values, # <<<<<<<<<<<<<< * float64_t fill_value, SparseIndex other_): * cdef: */ static PyObject *__pyx_pw_6pandas_7_sparse_10BlockIndex_23reindex(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyArrayObject *__pyx_f_6pandas_7_sparse_10BlockIndex_reindex(struct __pyx_obj_6pandas_7_sparse_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_7_sparse_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_7_sparse_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; 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; PyArrayObject *__pyx_t_10 = NULL; Py_ssize_t __pyx_t_11; Py_ssize_t __pyx_t_12; Py_ssize_t __pyx_t_13; Py_ssize_t __pyx_t_14; Py_ssize_t __pyx_t_15; int __pyx_t_16; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __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_filename = __pyx_f[0]; __pyx_lineno = 494; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 494; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_6pandas_7_sparse_10BlockIndex_23reindex)) { __Pyx_XDECREF(((PyObject *)__pyx_r)); __pyx_t_2 = PyFloat_FromDouble(__pyx_v_fill_value); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 494; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 494; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(((PyObject *)__pyx_v_values)); PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_v_values)); __Pyx_GIVEREF(((PyObject *)__pyx_v_values)); PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __Pyx_INCREF(((PyObject *)__pyx_v_other_)); PyTuple_SET_ITEM(__pyx_t_3, 2, ((PyObject *)__pyx_v_other_)); __Pyx_GIVEREF(((PyObject *)__pyx_v_other_)); __pyx_t_2 = 0; __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 494; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(((PyObject *)__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_filename = __pyx_f[0]; __pyx_lineno = 494; __pyx_clineno = __LINE__; goto __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/src/sparse.pyx":497 * 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/src/sparse.pyx":502 * ndarray[int32_t, ndim=1] slocs, slens, olocs, olens * * other = other_.to_block_index() # <<<<<<<<<<<<<< * * olocs = other.blocs */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_other_), __pyx_n_s__to_block_index); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 502; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 502; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_6pandas_7_sparse_BlockIndex))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 502; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_other = ((struct __pyx_obj_6pandas_7_sparse_BlockIndex *)__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/sparse.pyx":504 * other = other_.to_block_index() * * olocs = other.blocs # <<<<<<<<<<<<<< * olens = other.blengths * slocs = self.blocs */ __pyx_t_2 = ((PyObject *)__pyx_v_other->blocs); __Pyx_INCREF(__pyx_t_2); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_olocs.rcbuffer->pybuffer); __pyx_t_4 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_olocs.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_4 < 0)) { PyErr_Fetch(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7); 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_5); Py_XDECREF(__pyx_t_6); Py_XDECREF(__pyx_t_7); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_5, __pyx_t_6, __pyx_t_7); } } __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_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 504; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_olocs = ((PyArrayObject *)__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/sparse.pyx":505 * * olocs = other.blocs * olens = other.blengths # <<<<<<<<<<<<<< * slocs = self.blocs * slens = self.blengths */ __pyx_t_2 = ((PyObject *)__pyx_v_other->blengths); __Pyx_INCREF(__pyx_t_2); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_olens.rcbuffer->pybuffer); __pyx_t_4 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_olens.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_4 < 0)) { PyErr_Fetch(&__pyx_t_7, &__pyx_t_6, &__pyx_t_5); 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_7); Py_XDECREF(__pyx_t_6); Py_XDECREF(__pyx_t_5); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_7, __pyx_t_6, __pyx_t_5); } } __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_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 505; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_olens = ((PyArrayObject *)__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/sparse.pyx":506 * olocs = other.blocs * olens = other.blengths * slocs = self.blocs # <<<<<<<<<<<<<< * slens = self.blengths * */ __pyx_t_2 = ((PyObject *)__pyx_v_self->blocs); __Pyx_INCREF(__pyx_t_2); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_slocs.rcbuffer->pybuffer); __pyx_t_4 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_slocs.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_4 < 0)) { PyErr_Fetch(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7); 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_5); Py_XDECREF(__pyx_t_6); Py_XDECREF(__pyx_t_7); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_5, __pyx_t_6, __pyx_t_7); } } __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_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 506; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_slocs = ((PyArrayObject *)__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/sparse.pyx":507 * olens = other.blengths * slocs = self.blocs * slens = self.blengths # <<<<<<<<<<<<<< * * result = np.empty(other.npoints, dtype=np.float64) */ __pyx_t_2 = ((PyObject *)__pyx_v_self->blengths); __Pyx_INCREF(__pyx_t_2); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_slens.rcbuffer->pybuffer); __pyx_t_4 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_slens.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_4 < 0)) { PyErr_Fetch(&__pyx_t_7, &__pyx_t_6, &__pyx_t_5); 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_7); Py_XDECREF(__pyx_t_6); Py_XDECREF(__pyx_t_5); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_7, __pyx_t_6, __pyx_t_5); } } __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_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 507; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_slens = ((PyArrayObject *)__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/sparse.pyx":509 * slens = self.blengths * * result = np.empty(other.npoints, dtype=np.float64) # <<<<<<<<<<<<<< * * for 0 <= i < other.nblocks: */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 509; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__empty); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 509; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_other->npoints); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 509; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 509; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 509; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_2)); __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 509; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 509; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__dtype), __pyx_t_9) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 509; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_9 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_3), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 509; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; if (!(likely(((__pyx_t_9) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_9, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 509; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_10 = ((PyArrayObject *)__pyx_t_9); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __pyx_t_4 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_t_10, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_4 < 0)) { PyErr_Fetch(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7); 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_5); Py_XDECREF(__pyx_t_6); Py_XDECREF(__pyx_t_7); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_5, __pyx_t_6, __pyx_t_7); } } __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_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 509; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_10 = 0; __pyx_v_result = ((PyArrayObject *)__pyx_t_9); __pyx_t_9 = 0; /* "pandas/src/sparse.pyx":511 * result = np.empty(other.npoints, dtype=np.float64) * * for 0 <= i < other.nblocks: # <<<<<<<<<<<<<< * ocur = olocs[i] * ocurlen = olens[i] */ __pyx_t_11 = __pyx_v_other->nblocks; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_11; __pyx_v_i++) { /* "pandas/src/sparse.pyx":512 * * for 0 <= i < other.nblocks: * ocur = olocs[i] # <<<<<<<<<<<<<< * ocurlen = olens[i] * */ __pyx_t_12 = __pyx_v_i; __pyx_t_4 = -1; if (__pyx_t_12 < 0) { __pyx_t_12 += __pyx_pybuffernd_olocs.diminfo[0].shape; if (unlikely(__pyx_t_12 < 0)) __pyx_t_4 = 0; } else if (unlikely(__pyx_t_12 >= __pyx_pybuffernd_olocs.diminfo[0].shape)) __pyx_t_4 = 0; if (unlikely(__pyx_t_4 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_4); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 512; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_ocur = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_olocs.rcbuffer->pybuffer.buf, __pyx_t_12, __pyx_pybuffernd_olocs.diminfo[0].strides)); /* "pandas/src/sparse.pyx":513 * for 0 <= i < other.nblocks: * ocur = olocs[i] * ocurlen = olens[i] # <<<<<<<<<<<<<< * * while slocs[j] + slens[j] < ocur: */ __pyx_t_13 = __pyx_v_i; __pyx_t_4 = -1; if (__pyx_t_13 < 0) { __pyx_t_13 += __pyx_pybuffernd_olens.diminfo[0].shape; if (unlikely(__pyx_t_13 < 0)) __pyx_t_4 = 0; } else if (unlikely(__pyx_t_13 >= __pyx_pybuffernd_olens.diminfo[0].shape)) __pyx_t_4 = 0; if (unlikely(__pyx_t_4 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_4); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 513; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_ocurlen = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_olens.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_olens.diminfo[0].strides)); /* "pandas/src/sparse.pyx":515 * ocurlen = olens[i] * * while slocs[j] + slens[j] < ocur: # <<<<<<<<<<<<<< * j += 1 * */ while (1) { __pyx_t_14 = __pyx_v_j; __pyx_t_4 = -1; if (__pyx_t_14 < 0) { __pyx_t_14 += __pyx_pybuffernd_slocs.diminfo[0].shape; if (unlikely(__pyx_t_14 < 0)) __pyx_t_4 = 0; } else if (unlikely(__pyx_t_14 >= __pyx_pybuffernd_slocs.diminfo[0].shape)) __pyx_t_4 = 0; if (unlikely(__pyx_t_4 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_4); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 515; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_15 = __pyx_v_j; __pyx_t_4 = -1; if (__pyx_t_15 < 0) { __pyx_t_15 += __pyx_pybuffernd_slens.diminfo[0].shape; if (unlikely(__pyx_t_15 < 0)) __pyx_t_4 = 0; } else if (unlikely(__pyx_t_15 >= __pyx_pybuffernd_slens.diminfo[0].shape)) __pyx_t_4 = 0; if (unlikely(__pyx_t_4 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_4); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 515; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_16 = ((((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_slocs.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_slocs.diminfo[0].strides)) + (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_slens.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_slens.diminfo[0].strides))) < __pyx_v_ocur) != 0); if (!__pyx_t_16) break; /* "pandas/src/sparse.pyx":516 * * while slocs[j] + slens[j] < ocur: * j += 1 # <<<<<<<<<<<<<< * * cpdef put(self, ndarray[float64_t, ndim=1] values, */ __pyx_v_j = (__pyx_v_j + 1); } } __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_8); __Pyx_XDECREF(__pyx_t_9); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __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._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_7_sparse_10BlockIndex_23reindex(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_6pandas_7_sparse_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_7_sparse_SparseIndex *__pyx_v_other_ = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 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); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__values)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__fill_value)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("reindex", 1, 3, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 494; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__other_)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("reindex", 1, 3, 3, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 494; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "reindex") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 494; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 495; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_other_ = ((struct __pyx_obj_6pandas_7_sparse_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_filename = __pyx_f[0]; __pyx_lineno = 494; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas._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_filename = __pyx_f[0]; __pyx_lineno = 494; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_other_), __pyx_ptype_6pandas_7_sparse_SparseIndex, 1, "other_", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 495; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_7_sparse_10BlockIndex_22reindex(((struct __pyx_obj_6pandas_7_sparse_BlockIndex *)__pyx_v_self), __pyx_v_values, __pyx_v_fill_value, __pyx_v_other_); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/sparse.pyx":494 * return -1 * * cpdef ndarray reindex(self, ndarray[float64_t, ndim=1] values, # <<<<<<<<<<<<<< * float64_t fill_value, SparseIndex other_): * cdef: */ static PyObject *__pyx_pf_6pandas_7_sparse_10BlockIndex_22reindex(struct __pyx_obj_6pandas_7_sparse_BlockIndex *__pyx_v_self, PyArrayObject *__pyx_v_values, __pyx_t_5numpy_float64_t __pyx_v_fill_value, struct __pyx_obj_6pandas_7_sparse_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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __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_filename = __pyx_f[0]; __pyx_lineno = 494; __pyx_clineno = __LINE__; goto __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 *)((struct __pyx_vtabstruct_6pandas_7_sparse_BlockIndex *)__pyx_v_self->__pyx_vtab)->reindex(__pyx_v_self, __pyx_v_values, __pyx_v_fill_value, __pyx_v_other_, 1)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 494; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __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._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/src/sparse.pyx":518 * 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_7_sparse_10BlockIndex_25put(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_6pandas_7_sparse_10BlockIndex_put(CYTHON_UNUSED struct __pyx_obj_6pandas_7_sparse_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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __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_filename = __pyx_f[0]; __pyx_lineno = 518; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 518; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 518; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_6pandas_7_sparse_10BlockIndex_25put)) { __Pyx_XDECREF(__pyx_r); __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 518; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(((PyObject *)__pyx_v_values)); PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_values)); __Pyx_GIVEREF(((PyObject *)__pyx_v_values)); __Pyx_INCREF(((PyObject *)__pyx_v_indices)); PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)__pyx_v_indices)); __Pyx_GIVEREF(((PyObject *)__pyx_v_indices)); __Pyx_INCREF(__pyx_v_to_put); PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_to_put); __Pyx_GIVEREF(__pyx_v_to_put); __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 518; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __pyx_r = __pyx_t_3; __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } /* "pandas/src/sparse.pyx":520 * 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, */ __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); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __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._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; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_7_sparse_10BlockIndex_25put(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_6pandas_7_sparse_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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 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); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__values)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__indices)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("put", 1, 3, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 518; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__to_put)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("put", 1, 3, 3, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 518; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "put") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 518; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 518; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas._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_filename = __pyx_f[0]; __pyx_lineno = 518; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_indices), __pyx_ptype_5numpy_ndarray, 1, "indices", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 519; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_7_sparse_10BlockIndex_24put(((struct __pyx_obj_6pandas_7_sparse_BlockIndex *)__pyx_v_self), __pyx_v_values, __pyx_v_indices, __pyx_v_to_put); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/sparse.pyx":518 * j += 1 * * cpdef put(self, ndarray[float64_t, ndim=1] values, # <<<<<<<<<<<<<< * ndarray[int32_t, ndim=1] indices, object to_put): * pass */ static PyObject *__pyx_pf_6pandas_7_sparse_10BlockIndex_24put(struct __pyx_obj_6pandas_7_sparse_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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __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_filename = __pyx_f[0]; __pyx_lineno = 518; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 518; __pyx_clineno = __LINE__; goto __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 = ((struct __pyx_vtabstruct_6pandas_7_sparse_BlockIndex *)__pyx_v_self->__pyx_vtab)->put(__pyx_v_self, __pyx_v_values, __pyx_v_indices, __pyx_v_to_put, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 518; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __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._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/src/sparse.pyx":522 * pass * * cpdef take(self, ndarray[float64_t, ndim=1] values, # <<<<<<<<<<<<<< * ndarray[int32_t, ndim=1] indices): * pass */ static PyObject *__pyx_pw_6pandas_7_sparse_10BlockIndex_27take(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_6pandas_7_sparse_10BlockIndex_take(CYTHON_UNUSED struct __pyx_obj_6pandas_7_sparse_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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __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_filename = __pyx_f[0]; __pyx_lineno = 522; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 522; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 522; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_6pandas_7_sparse_10BlockIndex_27take)) { __Pyx_XDECREF(__pyx_r); __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 522; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(((PyObject *)__pyx_v_values)); PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_values)); __Pyx_GIVEREF(((PyObject *)__pyx_v_values)); __Pyx_INCREF(((PyObject *)__pyx_v_indices)); PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)__pyx_v_indices)); __Pyx_GIVEREF(((PyObject *)__pyx_v_indices)); __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 522; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __pyx_r = __pyx_t_3; __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } /* "pandas/src/sparse.pyx":524 * cpdef take(self, ndarray[float64_t, ndim=1] values, * ndarray[int32_t, ndim=1] indices): * pass # <<<<<<<<<<<<<< * * */ __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); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __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._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; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_7_sparse_10BlockIndex_27take(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_6pandas_7_sparse_10BlockIndex_27take(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_values = 0; PyArrayObject *__pyx_v_indices = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 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); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__values)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__indices)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 522; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "take") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 522; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 522; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas._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_filename = __pyx_f[0]; __pyx_lineno = 522; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_indices), __pyx_ptype_5numpy_ndarray, 1, "indices", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 523; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_7_sparse_10BlockIndex_26take(((struct __pyx_obj_6pandas_7_sparse_BlockIndex *)__pyx_v_self), __pyx_v_values, __pyx_v_indices); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/sparse.pyx":522 * pass * * cpdef take(self, ndarray[float64_t, ndim=1] values, # <<<<<<<<<<<<<< * ndarray[int32_t, ndim=1] indices): * pass */ static PyObject *__pyx_pf_6pandas_7_sparse_10BlockIndex_26take(struct __pyx_obj_6pandas_7_sparse_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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __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_filename = __pyx_f[0]; __pyx_lineno = 522; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 522; __pyx_clineno = __LINE__; goto __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 = ((struct __pyx_vtabstruct_6pandas_7_sparse_BlockIndex *)__pyx_v_self->__pyx_vtab)->take(__pyx_v_self, __pyx_v_values, __pyx_v_indices, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 522; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __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._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; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_7_sparse_10BlockIndex_7nblocks_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6pandas_7_sparse_10BlockIndex_7nblocks_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_7_sparse_10BlockIndex_7nblocks___get__(((struct __pyx_obj_6pandas_7_sparse_BlockIndex *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/sparse.pyx":267 * ''' * cdef readonly: * Py_ssize_t nblocks, npoints, length # <<<<<<<<<<<<<< * ndarray blocs, blengths * */ static PyObject *__pyx_pf_6pandas_7_sparse_10BlockIndex_7nblocks___get__(struct __pyx_obj_6pandas_7_sparse_BlockIndex *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_self->nblocks); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 267; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas._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_7_sparse_10BlockIndex_7npoints_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6pandas_7_sparse_10BlockIndex_7npoints_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_7_sparse_10BlockIndex_7npoints___get__(((struct __pyx_obj_6pandas_7_sparse_BlockIndex *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_7_sparse_10BlockIndex_7npoints___get__(struct __pyx_obj_6pandas_7_sparse_BlockIndex *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_self->npoints); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 267; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas._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_7_sparse_10BlockIndex_6length_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6pandas_7_sparse_10BlockIndex_6length_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_7_sparse_10BlockIndex_6length___get__(((struct __pyx_obj_6pandas_7_sparse_BlockIndex *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_7_sparse_10BlockIndex_6length___get__(struct __pyx_obj_6pandas_7_sparse_BlockIndex *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_self->length); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 267; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas._sparse.BlockIndex.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_7_sparse_10BlockIndex_5blocs_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6pandas_7_sparse_10BlockIndex_5blocs_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_7_sparse_10BlockIndex_5blocs___get__(((struct __pyx_obj_6pandas_7_sparse_BlockIndex *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/sparse.pyx":268 * cdef readonly: * Py_ssize_t nblocks, npoints, length * ndarray blocs, blengths # <<<<<<<<<<<<<< * * cdef: */ static PyObject *__pyx_pf_6pandas_7_sparse_10BlockIndex_5blocs___get__(struct __pyx_obj_6pandas_7_sparse_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; __pyx_r = Py_None; __Pyx_INCREF(Py_None); __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_7_sparse_10BlockIndex_8blengths_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6pandas_7_sparse_10BlockIndex_8blengths_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_7_sparse_10BlockIndex_8blengths___get__(((struct __pyx_obj_6pandas_7_sparse_BlockIndex *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_7_sparse_10BlockIndex_8blengths___get__(struct __pyx_obj_6pandas_7_sparse_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; __pyx_r = Py_None; __Pyx_INCREF(Py_None); __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pandas_7_sparse_10BlockMerge_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_pw_6pandas_7_sparse_10BlockMerge_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct __pyx_obj_6pandas_7_sparse_BlockIndex *__pyx_v_x = 0; struct __pyx_obj_6pandas_7_sparse_BlockIndex *__pyx_v_y = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 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); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__x)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__y)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 537; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 537; __pyx_clineno = __LINE__; goto __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_7_sparse_BlockIndex *)values[0]); __pyx_v_y = ((struct __pyx_obj_6pandas_7_sparse_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_filename = __pyx_f[0]; __pyx_lineno = 537; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas._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_7_sparse_BlockIndex, 1, "x", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 537; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_y), __pyx_ptype_6pandas_7_sparse_BlockIndex, 1, "y", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 537; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_7_sparse_10BlockMerge___init__(((struct __pyx_obj_6pandas_7_sparse_BlockMerge *)__pyx_v_self), __pyx_v_x, __pyx_v_y); goto __pyx_L0; __pyx_L1_error:; __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/sparse.pyx":537 * int32_t xi, yi # block indices * * def __init__(self, BlockIndex x, BlockIndex y): # <<<<<<<<<<<<<< * self.x = x * self.y = y */ static int __pyx_pf_6pandas_7_sparse_10BlockMerge___init__(struct __pyx_obj_6pandas_7_sparse_BlockMerge *__pyx_v_self, struct __pyx_obj_6pandas_7_sparse_BlockIndex *__pyx_v_x, struct __pyx_obj_6pandas_7_sparse_BlockIndex *__pyx_v_y) { int __pyx_r; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__init__", 0); /* "pandas/src/sparse.pyx":538 * * 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/src/sparse.pyx":539 * 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/src/sparse.pyx":541 * 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 (__pyx_t_1) { /* "pandas/src/sparse.pyx":542 * * if x.length != y.length: * raise Exception('Indices must reference same underlying length') # <<<<<<<<<<<<<< * * self.xstart = self.x.blocs */ __pyx_t_2 = PyObject_Call(__pyx_builtin_Exception, ((PyObject *)__pyx_k_tuple_17), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 542; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 542; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L3; } __pyx_L3:; /* "pandas/src/sparse.pyx":544 * 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/src/sparse.pyx":545 * * 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/src/sparse.pyx":547 * 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_filename = __pyx_f[0]; __pyx_lineno = 547; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 547; __pyx_clineno = __LINE__; goto __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/src/sparse.pyx":548 * * 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_filename = __pyx_f[0]; __pyx_lineno = 548; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 548; __pyx_clineno = __LINE__; goto __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/src/sparse.pyx":553 * # self.ylen = self.y.blengths * * self.xi = 0 # <<<<<<<<<<<<<< * self.yi = 0 * */ __pyx_v_self->xi = 0; /* "pandas/src/sparse.pyx":554 * * self.xi = 0 * self.yi = 0 # <<<<<<<<<<<<<< * * self.result = self._make_merged_blocks() */ __pyx_v_self->yi = 0; /* "pandas/src/sparse.pyx":556 * self.yi = 0 * * self.result = self._make_merged_blocks() # <<<<<<<<<<<<<< * * cdef _make_merged_blocks(self): */ __pyx_t_2 = ((struct __pyx_vtabstruct_6pandas_7_sparse_BlockMerge *)__pyx_v_self->__pyx_vtab)->_make_merged_blocks(__pyx_v_self); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 556; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_6pandas_7_sparse_BlockIndex))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 556; __pyx_clineno = __LINE__; goto __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_7_sparse_BlockIndex *)__pyx_t_2); __pyx_t_2 = 0; __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("pandas._sparse.BlockMerge.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/sparse.pyx":558 * self.result = self._make_merged_blocks() * * cdef _make_merged_blocks(self): # <<<<<<<<<<<<<< * raise NotImplementedError * */ static PyObject *__pyx_f_6pandas_7_sparse_10BlockMerge__make_merged_blocks(CYTHON_UNUSED struct __pyx_obj_6pandas_7_sparse_BlockMerge *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_make_merged_blocks", 0); /* "pandas/src/sparse.pyx":559 * * 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_filename = __pyx_f[0]; __pyx_lineno = 559; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("pandas._sparse.BlockMerge._make_merged_blocks", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/sparse.pyx":561 * 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_7_sparse_10BlockMerge__set_current_indices(struct __pyx_obj_6pandas_7_sparse_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/src/sparse.pyx":562 * * 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/src/sparse.pyx":563 * 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/src/sparse.pyx":564 * if mode == 0: * self.xi = xi * self.yi = yi # <<<<<<<<<<<<<< * else: * self.xi = yi */ __pyx_v_self->yi = __pyx_v_yi; goto __pyx_L3; } /*else*/ { /* "pandas/src/sparse.pyx":566 * self.yi = yi * else: * self.xi = yi # <<<<<<<<<<<<<< * self.yi = xi * */ __pyx_v_self->xi = __pyx_v_yi; /* "pandas/src/sparse.pyx":567 * else: * self.xi = yi * self.yi = xi # <<<<<<<<<<<<<< * * cdef class BlockIntersection(BlockMerge): */ __pyx_v_self->yi = __pyx_v_xi; } __pyx_L3:; __pyx_r = Py_None; __Pyx_INCREF(Py_None); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/sparse.pyx":581 * ''' * * cdef _make_merged_blocks(self): # <<<<<<<<<<<<<< * cdef: * ndarray[int32_t, ndim=1] xstart, xend, ystart, yend */ static PyObject *__pyx_f_6pandas_7_sparse_10BlockUnion__make_merged_blocks(struct __pyx_obj_6pandas_7_sparse_BlockUnion *__pyx_v_self) { 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_nstart; __pyx_t_5numpy_int32_t __pyx_v_nend; PyObject *__pyx_v_out_blocs = 0; PyObject *__pyx_v_out_blengths = 0; __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; int __pyx_t_6; int __pyx_t_7; int __pyx_t_8; __pyx_t_5numpy_int32_t __pyx_t_9; __pyx_t_5numpy_int32_t __pyx_t_10; __pyx_t_5numpy_int32_t __pyx_t_11; __pyx_t_5numpy_int32_t __pyx_t_12; __pyx_t_5numpy_int32_t __pyx_t_13; __pyx_t_5numpy_int32_t __pyx_t_14; __pyx_t_5numpy_int32_t __pyx_t_15; __pyx_t_5numpy_int32_t __pyx_t_16; __pyx_t_5numpy_int32_t __pyx_t_17; int __pyx_t_18; PyObject *__pyx_t_19 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __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; /* "pandas/src/sparse.pyx":585 * ndarray[int32_t, ndim=1] xstart, xend, ystart, yend * int32_t nstart, nend, diff * list out_blocs = [], out_blengths = [] # <<<<<<<<<<<<<< * * xstart = self.xstart */ __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 585; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_v_out_blocs = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 585; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_v_out_blengths = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/sparse.pyx":587 * list out_blocs = [], out_blengths = [] * * 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_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_filename = __pyx_f[0]; __pyx_lineno = 587; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_xstart = ((PyArrayObject *)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/sparse.pyx":588 * * 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_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_filename = __pyx_f[0]; __pyx_lineno = 588; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_xend = ((PyArrayObject *)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/sparse.pyx":589 * 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_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_filename = __pyx_f[0]; __pyx_lineno = 589; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_ystart = ((PyArrayObject *)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/sparse.pyx":590 * xend = self.xend * ystart = self.ystart * yend = self.yend # <<<<<<<<<<<<<< * * while True: */ __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_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_filename = __pyx_f[0]; __pyx_lineno = 590; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_yend = ((PyArrayObject *)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/sparse.pyx":592 * yend = self.yend * * while True: # <<<<<<<<<<<<<< * # we are done (or possibly never began) * if self.xi >= self.x.nblocks and self.yi >= self.y.nblocks: */ while (1) { if (!1) break; /* "pandas/src/sparse.pyx":594 * 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_6 = ((__pyx_v_self->__pyx_base.xi >= __pyx_v_self->__pyx_base.x->nblocks) != 0); if (__pyx_t_6) { __pyx_t_7 = ((__pyx_v_self->__pyx_base.yi >= __pyx_v_self->__pyx_base.y->nblocks) != 0); __pyx_t_8 = __pyx_t_7; } else { __pyx_t_8 = __pyx_t_6; } if (__pyx_t_8) { /* "pandas/src/sparse.pyx":595 * # 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; goto __pyx_L5; } /* "pandas/src/sparse.pyx":596 * 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_8 = ((__pyx_v_self->__pyx_base.yi >= __pyx_v_self->__pyx_base.y->nblocks) != 0); if (__pyx_t_8) { /* "pandas/src/sparse.pyx":598 * 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_9 = __pyx_v_self->__pyx_base.xi; __pyx_t_2 = -1; if (__pyx_t_9 < 0) { __pyx_t_9 += __pyx_pybuffernd_xstart.diminfo[0].shape; if (unlikely(__pyx_t_9 < 0)) __pyx_t_2 = 0; } else if (unlikely(__pyx_t_9 >= __pyx_pybuffernd_xstart.diminfo[0].shape)) __pyx_t_2 = 0; if (unlikely(__pyx_t_2 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 598; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_nstart = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_xstart.rcbuffer->pybuffer.buf, __pyx_t_9, __pyx_pybuffernd_xstart.diminfo[0].strides)); /* "pandas/src/sparse.pyx":599 * # 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_10 = __pyx_v_self->__pyx_base.xi; __pyx_t_2 = -1; if (__pyx_t_10 < 0) { __pyx_t_10 += __pyx_pybuffernd_xend.diminfo[0].shape; if (unlikely(__pyx_t_10 < 0)) __pyx_t_2 = 0; } else if (unlikely(__pyx_t_10 >= __pyx_pybuffernd_xend.diminfo[0].shape)) __pyx_t_2 = 0; if (unlikely(__pyx_t_2 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 599; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_nend = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_xend.rcbuffer->pybuffer.buf, __pyx_t_10, __pyx_pybuffernd_xend.diminfo[0].strides)); /* "pandas/src/sparse.pyx":600 * 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); goto __pyx_L5; } /* "pandas/src/sparse.pyx":601 * 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_8 = ((__pyx_v_self->__pyx_base.xi >= __pyx_v_self->__pyx_base.x->nblocks) != 0); if (__pyx_t_8) { /* "pandas/src/sparse.pyx":603 * 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_11 = __pyx_v_self->__pyx_base.yi; __pyx_t_2 = -1; if (__pyx_t_11 < 0) { __pyx_t_11 += __pyx_pybuffernd_ystart.diminfo[0].shape; if (unlikely(__pyx_t_11 < 0)) __pyx_t_2 = 0; } else if (unlikely(__pyx_t_11 >= __pyx_pybuffernd_ystart.diminfo[0].shape)) __pyx_t_2 = 0; if (unlikely(__pyx_t_2 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 603; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_nstart = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_ystart.rcbuffer->pybuffer.buf, __pyx_t_11, __pyx_pybuffernd_ystart.diminfo[0].strides)); /* "pandas/src/sparse.pyx":604 * # through with x, just pass through y blocks * nstart = ystart[self.yi] * nend = yend[self.yi] # <<<<<<<<<<<<<< * self.yi += 1 * else: */ __pyx_t_12 = __pyx_v_self->__pyx_base.yi; __pyx_t_2 = -1; if (__pyx_t_12 < 0) { __pyx_t_12 += __pyx_pybuffernd_yend.diminfo[0].shape; if (unlikely(__pyx_t_12 < 0)) __pyx_t_2 = 0; } else if (unlikely(__pyx_t_12 >= __pyx_pybuffernd_yend.diminfo[0].shape)) __pyx_t_2 = 0; if (unlikely(__pyx_t_2 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 604; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_nend = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_yend.rcbuffer->pybuffer.buf, __pyx_t_12, __pyx_pybuffernd_yend.diminfo[0].strides)); /* "pandas/src/sparse.pyx":605 * 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); goto __pyx_L5; } /*else*/ { /* "pandas/src/sparse.pyx":608 * else: * # find end of new block * if xstart[self.xi] < ystart[self.yi]: # <<<<<<<<<<<<<< * nstart = xstart[self.xi] * nend = self._find_next_block_end(0) */ __pyx_t_13 = __pyx_v_self->__pyx_base.xi; __pyx_t_2 = -1; if (__pyx_t_13 < 0) { __pyx_t_13 += __pyx_pybuffernd_xstart.diminfo[0].shape; if (unlikely(__pyx_t_13 < 0)) __pyx_t_2 = 0; } else if (unlikely(__pyx_t_13 >= __pyx_pybuffernd_xstart.diminfo[0].shape)) __pyx_t_2 = 0; if (unlikely(__pyx_t_2 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 608; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_14 = __pyx_v_self->__pyx_base.yi; __pyx_t_2 = -1; if (__pyx_t_14 < 0) { __pyx_t_14 += __pyx_pybuffernd_ystart.diminfo[0].shape; if (unlikely(__pyx_t_14 < 0)) __pyx_t_2 = 0; } else if (unlikely(__pyx_t_14 >= __pyx_pybuffernd_ystart.diminfo[0].shape)) __pyx_t_2 = 0; if (unlikely(__pyx_t_2 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 608; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_8 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_xstart.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_xstart.diminfo[0].strides)) < (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_ystart.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_ystart.diminfo[0].strides))) != 0); if (__pyx_t_8) { /* "pandas/src/sparse.pyx":609 * # 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_15 = __pyx_v_self->__pyx_base.xi; __pyx_t_2 = -1; if (__pyx_t_15 < 0) { __pyx_t_15 += __pyx_pybuffernd_xstart.diminfo[0].shape; if (unlikely(__pyx_t_15 < 0)) __pyx_t_2 = 0; } else if (unlikely(__pyx_t_15 >= __pyx_pybuffernd_xstart.diminfo[0].shape)) __pyx_t_2 = 0; if (unlikely(__pyx_t_2 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 609; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_nstart = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_xstart.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_xstart.diminfo[0].strides)); /* "pandas/src/sparse.pyx":610 * 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_16 = ((struct __pyx_vtabstruct_6pandas_7_sparse_BlockUnion *)__pyx_v_self->__pyx_base.__pyx_vtab)->_find_next_block_end(__pyx_v_self, 0); if (unlikely(__pyx_t_16 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 610; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_nend = __pyx_t_16; goto __pyx_L6; } /*else*/ { /* "pandas/src/sparse.pyx":612 * nend = self._find_next_block_end(0) * else: * nstart = ystart[self.yi] # <<<<<<<<<<<<<< * nend = self._find_next_block_end(1) * */ __pyx_t_16 = __pyx_v_self->__pyx_base.yi; __pyx_t_2 = -1; if (__pyx_t_16 < 0) { __pyx_t_16 += __pyx_pybuffernd_ystart.diminfo[0].shape; if (unlikely(__pyx_t_16 < 0)) __pyx_t_2 = 0; } else if (unlikely(__pyx_t_16 >= __pyx_pybuffernd_ystart.diminfo[0].shape)) __pyx_t_2 = 0; if (unlikely(__pyx_t_2 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 612; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_nstart = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_ystart.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_ystart.diminfo[0].strides)); /* "pandas/src/sparse.pyx":613 * else: * nstart = ystart[self.yi] * nend = self._find_next_block_end(1) # <<<<<<<<<<<<<< * * out_blocs.append(nstart) */ __pyx_t_17 = ((struct __pyx_vtabstruct_6pandas_7_sparse_BlockUnion *)__pyx_v_self->__pyx_base.__pyx_vtab)->_find_next_block_end(__pyx_v_self, 1); if (unlikely(__pyx_t_17 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 613; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_nend = __pyx_t_17; } __pyx_L6:; } __pyx_L5:; /* "pandas/src/sparse.pyx":615 * nend = self._find_next_block_end(1) * * out_blocs.append(nstart) # <<<<<<<<<<<<<< * out_blengths.append(nend - nstart) * */ __pyx_t_1 = __Pyx_PyInt_to_py_npy_int32(__pyx_v_nstart); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 615; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_18 = __Pyx_PyList_Append(__pyx_v_out_blocs, __pyx_t_1); if (unlikely(__pyx_t_18 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 615; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/sparse.pyx":616 * * out_blocs.append(nstart) * out_blengths.append(nend - nstart) # <<<<<<<<<<<<<< * * return BlockIndex(self.x.length, out_blocs, out_blengths) */ __pyx_t_1 = PyInt_FromLong((__pyx_v_nend - __pyx_v_nstart)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 616; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_18 = __Pyx_PyList_Append(__pyx_v_out_blengths, __pyx_t_1); if (unlikely(__pyx_t_18 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 616; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } __pyx_L4_break:; /* "pandas/src/sparse.pyx":618 * out_blengths.append(nend - nstart) * * return BlockIndex(self.x.length, out_blocs, out_blengths) # <<<<<<<<<<<<<< * * cdef int32_t _find_next_block_end(self, bint mode) except -1: */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_self->__pyx_base.x->length); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 618; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_19 = PyTuple_New(3); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 618; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_19); PyTuple_SET_ITEM(__pyx_t_19, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)__pyx_v_out_blocs)); PyTuple_SET_ITEM(__pyx_t_19, 1, ((PyObject *)__pyx_v_out_blocs)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out_blocs)); __Pyx_INCREF(((PyObject *)__pyx_v_out_blengths)); PyTuple_SET_ITEM(__pyx_t_19, 2, ((PyObject *)__pyx_v_out_blengths)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out_blengths)); __pyx_t_1 = 0; __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_6pandas_7_sparse_BlockIndex)), ((PyObject *)__pyx_t_19), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 618; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(((PyObject *)__pyx_t_19)); __pyx_t_19 = 0; __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_19); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __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._sparse.BlockUnion._make_merged_blocks", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; 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_XDECREF(__pyx_v_out_blocs); __Pyx_XDECREF(__pyx_v_out_blengths); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/sparse.pyx":620 * return BlockIndex(self.x.length, out_blocs, out_blengths) * * 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_7_sparse_10BlockUnion__find_next_block_end(struct __pyx_obj_6pandas_7_sparse_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; __pyx_t_5numpy_int32_t __pyx_t_9; __pyx_t_5numpy_int32_t __pyx_t_10; int __pyx_t_11; int __pyx_t_12; __pyx_t_5numpy_int32_t __pyx_t_13; __pyx_t_5numpy_int32_t __pyx_t_14; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __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/src/sparse.pyx":631 * 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 (__pyx_t_1) { /* "pandas/src/sparse.pyx":632 * * if mode != 0 and mode != 1: * raise Exception('Mode must be 0 or 1') # <<<<<<<<<<<<<< * * # so symmetric code will work */ __pyx_t_2 = PyObject_Call(__pyx_builtin_Exception, ((PyObject *)__pyx_k_tuple_19), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 632; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 632; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L3; } __pyx_L3:; /* "pandas/src/sparse.pyx":635 * * # 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/src/sparse.pyx":636 * # 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_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_filename = __pyx_f[0]; __pyx_lineno = 636; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_xstart = ((PyArrayObject *)__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/sparse.pyx":637 * 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_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_filename = __pyx_f[0]; __pyx_lineno = 637; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_xend = ((PyArrayObject *)__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/sparse.pyx":638 * 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/src/sparse.pyx":640 * 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_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_filename = __pyx_f[0]; __pyx_lineno = 640; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_ystart = ((PyArrayObject *)__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/sparse.pyx":641 * * 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_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_filename = __pyx_f[0]; __pyx_lineno = 641; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_yend = ((PyArrayObject *)__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/sparse.pyx":642 * 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/src/sparse.pyx":643 * yend = self.yend * yi = self.yi * ynblocks = self.y.nblocks # <<<<<<<<<<<<<< * else: * xstart = self.ystart */ __pyx_t_8 = __pyx_v_self->__pyx_base.y->nblocks; __pyx_v_ynblocks = __pyx_t_8; goto __pyx_L4; } /*else*/ { /* "pandas/src/sparse.pyx":645 * ynblocks = self.y.nblocks * else: * xstart = self.ystart # <<<<<<<<<<<<<< * xend = self.yend * xi = 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_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_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_filename = __pyx_f[0]; __pyx_lineno = 645; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_xstart = ((PyArrayObject *)__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/sparse.pyx":646 * 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_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_filename = __pyx_f[0]; __pyx_lineno = 646; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_xend = ((PyArrayObject *)__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/sparse.pyx":647 * 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/src/sparse.pyx":649 * 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_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_filename = __pyx_f[0]; __pyx_lineno = 649; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_ystart = ((PyArrayObject *)__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/sparse.pyx":650 * * 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_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_filename = __pyx_f[0]; __pyx_lineno = 650; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_yend = ((PyArrayObject *)__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/sparse.pyx":651 * 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/src/sparse.pyx":652 * yend = self.xend * yi = self.xi * ynblocks = self.x.nblocks # <<<<<<<<<<<<<< * * nend = xend[xi] */ __pyx_t_8 = __pyx_v_self->__pyx_base.x->nblocks; __pyx_v_ynblocks = __pyx_t_8; } __pyx_L4:; /* "pandas/src/sparse.pyx":654 * ynblocks = self.x.nblocks * * nend = xend[xi] # <<<<<<<<<<<<<< * * # print 'here xi=%d, yi=%d, mode=%d, nend=%d' % (self.xi, self.yi, */ __pyx_t_7 = __pyx_v_xi; __pyx_t_3 = -1; if (__pyx_t_7 < 0) { __pyx_t_7 += __pyx_pybuffernd_xend.diminfo[0].shape; if (unlikely(__pyx_t_7 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_7 >= __pyx_pybuffernd_xend.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 654; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_nend = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_xend.rcbuffer->pybuffer.buf, __pyx_t_7, __pyx_pybuffernd_xend.diminfo[0].strides)); /* "pandas/src/sparse.pyx":660 * * # 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/src/sparse.pyx":661 * # 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_7_sparse_BlockUnion *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base._set_current_indices(((struct __pyx_obj_6pandas_7_sparse_BlockMerge *)__pyx_v_self), (__pyx_v_xi + 1), __pyx_v_yi, __pyx_v_mode); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 661; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/sparse.pyx":662 * 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; goto __pyx_L5; } /* "pandas/src/sparse.pyx":663 * 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_filename = __pyx_f[0]; __pyx_lineno = 663; __pyx_clineno = __LINE__; goto __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/src/sparse.pyx":665 * 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_7_sparse_BlockUnion *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base._set_current_indices(((struct __pyx_obj_6pandas_7_sparse_BlockMerge *)__pyx_v_self), (__pyx_v_xi + 1), __pyx_v_yi, __pyx_v_mode); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 665; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/sparse.pyx":666 * # 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; goto __pyx_L5; } /*else*/ { /* "pandas/src/sparse.pyx":668 * return nend * else: * while yi < ynblocks and nend > yend[yi]: # <<<<<<<<<<<<<< * yi += 1 * */ while (1) { __pyx_t_1 = ((__pyx_v_yi < __pyx_v_ynblocks) != 0); if (__pyx_t_1) { __pyx_t_10 = __pyx_v_yi; __pyx_t_3 = -1; if (__pyx_t_10 < 0) { __pyx_t_10 += __pyx_pybuffernd_yend.diminfo[0].shape; if (unlikely(__pyx_t_10 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_10 >= __pyx_pybuffernd_yend.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 668; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_11 = ((__pyx_v_nend > (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_yend.rcbuffer->pybuffer.buf, __pyx_t_10, __pyx_pybuffernd_yend.diminfo[0].strides))) != 0); __pyx_t_12 = __pyx_t_11; } else { __pyx_t_12 = __pyx_t_1; } if (!__pyx_t_12) break; /* "pandas/src/sparse.pyx":669 * 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/src/sparse.pyx":671 * yi += 1 * * self._set_current_indices(xi + 1, yi, mode) # <<<<<<<<<<<<<< * * if yi == ynblocks: */ __pyx_t_2 = ((struct __pyx_vtabstruct_6pandas_7_sparse_BlockUnion *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base._set_current_indices(((struct __pyx_obj_6pandas_7_sparse_BlockMerge *)__pyx_v_self), (__pyx_v_xi + 1), __pyx_v_yi, __pyx_v_mode); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 671; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/sparse.pyx":673 * self._set_current_indices(xi + 1, yi, mode) * * if yi == ynblocks: # <<<<<<<<<<<<<< * return nend * */ __pyx_t_12 = ((__pyx_v_yi == __pyx_v_ynblocks) != 0); if (__pyx_t_12) { /* "pandas/src/sparse.pyx":674 * * if yi == ynblocks: * return nend # <<<<<<<<<<<<<< * * if nend < ystart[yi]: */ __pyx_r = __pyx_v_nend; goto __pyx_L0; goto __pyx_L8; } __pyx_L8:; /* "pandas/src/sparse.pyx":676 * return nend * * if nend < ystart[yi]: # <<<<<<<<<<<<<< * # we're done, return the block end * return nend */ __pyx_t_13 = __pyx_v_yi; __pyx_t_3 = -1; if (__pyx_t_13 < 0) { __pyx_t_13 += __pyx_pybuffernd_ystart.diminfo[0].shape; if (unlikely(__pyx_t_13 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_13 >= __pyx_pybuffernd_ystart.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 676; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_12 = ((__pyx_v_nend < (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_ystart.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_ystart.diminfo[0].strides))) != 0); if (__pyx_t_12) { /* "pandas/src/sparse.pyx":678 * 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; goto __pyx_L9; } /*else*/ { /* "pandas/src/sparse.pyx":682 * # merge blocks, continue searching * # this also catches the case where blocks * return self._find_next_block_end(1 - mode) # <<<<<<<<<<<<<< * * */ __pyx_t_14 = ((struct __pyx_vtabstruct_6pandas_7_sparse_BlockUnion *)__pyx_v_self->__pyx_base.__pyx_vtab)->_find_next_block_end(__pyx_v_self, (1 - __pyx_v_mode)); if (unlikely(__pyx_t_14 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 682; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_t_14; goto __pyx_L0; } __pyx_L9:; } __pyx_L5:; __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __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._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; } /* "pandas/src/sparse.pyx":690 * ctypedef float64_t (* double_func)(float64_t a, float64_t b) * * cdef inline tuple sparse_nancombine(ndarray x, SparseIndex xindex, # <<<<<<<<<<<<<< * ndarray y, SparseIndex yindex, * double_func op): */ static CYTHON_INLINE PyObject *__pyx_f_6pandas_7_sparse_sparse_nancombine(PyArrayObject *__pyx_v_x, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_xindex, PyArrayObject *__pyx_v_y, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_yindex, __pyx_t_6pandas_7_sparse_double_func __pyx_v_op) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("sparse_nancombine", 0); /* "pandas/src/sparse.pyx":694 * double_func op): * # faster to convert to IntIndex * return int_nanop(x, xindex.to_int_index(), # <<<<<<<<<<<<<< * y, yindex.to_int_index(), op) * */ __Pyx_XDECREF(((PyObject *)__pyx_r)); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_xindex), __pyx_n_s__to_int_index); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 694; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 694; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_6pandas_7_sparse_IntIndex))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 694; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/sparse.pyx":695 * # faster to convert to IntIndex * return int_nanop(x, xindex.to_int_index(), * y, yindex.to_int_index(), op) # <<<<<<<<<<<<<< * * # if isinstance(xindex, BlockIndex): */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_yindex), __pyx_n_s__to_int_index); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 695; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 695; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_6pandas_7_sparse_IntIndex))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 695; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_1 = ((PyObject *)__pyx_f_6pandas_7_sparse_int_nanop(__pyx_v_x, ((struct __pyx_obj_6pandas_7_sparse_IntIndex *)__pyx_t_2), __pyx_v_y, ((struct __pyx_obj_6pandas_7_sparse_IntIndex *)__pyx_t_3), __pyx_v_op)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 694; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_r = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; __pyx_r = ((PyObject*)Py_None); __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("pandas._sparse.sparse_nancombine", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/sparse.pyx":705 * * * cdef inline tuple sparse_combine(ndarray x, SparseIndex xindex, float64_t xfill, # <<<<<<<<<<<<<< * ndarray y, SparseIndex yindex, float64_t yfill, * double_func op): */ static CYTHON_INLINE PyObject *__pyx_f_6pandas_7_sparse_sparse_combine(PyArrayObject *__pyx_v_x, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_xindex, __pyx_t_5numpy_float64_t __pyx_v_xfill, PyArrayObject *__pyx_v_y, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_yindex, __pyx_t_5numpy_float64_t __pyx_v_yfill, __pyx_t_6pandas_7_sparse_double_func __pyx_v_op) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("sparse_combine", 0); /* "pandas/src/sparse.pyx":708 * ndarray y, SparseIndex yindex, float64_t yfill, * double_func op): * if isinstance(xindex, BlockIndex): # <<<<<<<<<<<<<< * return block_op(x, xindex.to_block_index(), xfill, * y, yindex.to_block_index(), yfill, op) */ __pyx_t_1 = __Pyx_TypeCheck(((PyObject *)__pyx_v_xindex), ((PyObject*)__pyx_ptype_6pandas_7_sparse_BlockIndex)); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { /* "pandas/src/sparse.pyx":709 * double_func op): * if isinstance(xindex, BlockIndex): * return block_op(x, xindex.to_block_index(), xfill, # <<<<<<<<<<<<<< * y, yindex.to_block_index(), yfill, op) * elif isinstance(xindex, IntIndex): */ __Pyx_XDECREF(((PyObject *)__pyx_r)); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_xindex), __pyx_n_s__to_block_index); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 709; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 709; __pyx_clineno = __LINE__; goto __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_7_sparse_BlockIndex))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 709; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/sparse.pyx":710 * if isinstance(xindex, BlockIndex): * return block_op(x, xindex.to_block_index(), xfill, * y, yindex.to_block_index(), yfill, op) # <<<<<<<<<<<<<< * elif isinstance(xindex, IntIndex): * return int_op(x, xindex.to_int_index(), xfill, */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_yindex), __pyx_n_s__to_block_index); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 710; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 710; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_6pandas_7_sparse_BlockIndex))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 710; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_3 = ((PyObject *)__pyx_f_6pandas_7_sparse_block_op(__pyx_v_x, ((struct __pyx_obj_6pandas_7_sparse_BlockIndex *)__pyx_t_4), __pyx_v_xfill, __pyx_v_y, ((struct __pyx_obj_6pandas_7_sparse_BlockIndex *)__pyx_t_5), __pyx_v_yfill, __pyx_v_op)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 709; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_r = ((PyObject*)__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L0; goto __pyx_L3; } /* "pandas/src/sparse.pyx":711 * return block_op(x, xindex.to_block_index(), xfill, * y, yindex.to_block_index(), yfill, op) * elif isinstance(xindex, IntIndex): # <<<<<<<<<<<<<< * return int_op(x, xindex.to_int_index(), xfill, * y, yindex.to_int_index(), yfill, op) */ __pyx_t_2 = __Pyx_TypeCheck(((PyObject *)__pyx_v_xindex), ((PyObject*)__pyx_ptype_6pandas_7_sparse_IntIndex)); __pyx_t_1 = (__pyx_t_2 != 0); if (__pyx_t_1) { /* "pandas/src/sparse.pyx":712 * y, yindex.to_block_index(), yfill, op) * elif isinstance(xindex, IntIndex): * return int_op(x, xindex.to_int_index(), xfill, # <<<<<<<<<<<<<< * y, yindex.to_int_index(), yfill, op) * */ __Pyx_XDECREF(((PyObject *)__pyx_r)); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_xindex), __pyx_n_s__to_int_index); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 712; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 712; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_6pandas_7_sparse_IntIndex))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 712; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/sparse.pyx":713 * elif isinstance(xindex, IntIndex): * return int_op(x, xindex.to_int_index(), xfill, * y, yindex.to_int_index(), yfill, op) # <<<<<<<<<<<<<< * * # NaN-based arithmetic operation-- no handling of fill values */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_yindex), __pyx_n_s__to_int_index); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 713; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 713; __pyx_clineno = __LINE__; goto __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_7_sparse_IntIndex))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 713; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_3 = ((PyObject *)__pyx_f_6pandas_7_sparse_int_op(__pyx_v_x, ((struct __pyx_obj_6pandas_7_sparse_IntIndex *)__pyx_t_5), __pyx_v_xfill, __pyx_v_y, ((struct __pyx_obj_6pandas_7_sparse_IntIndex *)__pyx_t_4), __pyx_v_yfill, __pyx_v_op)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 712; __pyx_clineno = __LINE__; goto __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 = ((PyObject*)__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L0; goto __pyx_L3; } __pyx_L3:; __pyx_r = ((PyObject*)Py_None); __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("pandas._sparse.sparse_combine", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/sparse.pyx":719 * * @cython.boundscheck(False) * cdef inline tuple block_nanop(ndarray x_, BlockIndex xindex, # <<<<<<<<<<<<<< * ndarray y_, BlockIndex yindex, * double_func op): */ static CYTHON_INLINE PyObject *__pyx_f_6pandas_7_sparse_block_nanop(PyArrayObject *__pyx_v_x_, struct __pyx_obj_6pandas_7_sparse_BlockIndex *__pyx_v_xindex, PyArrayObject *__pyx_v_y_, struct __pyx_obj_6pandas_7_sparse_BlockIndex *__pyx_v_yindex, __pyx_t_6pandas_7_sparse_double_func __pyx_v_op) { struct __pyx_obj_6pandas_7_sparse_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; Py_ssize_t __pyx_v_xbp; Py_ssize_t __pyx_v_ybp; Py_ssize_t __pyx_v_obp; Py_ssize_t __pyx_v_xblock; Py_ssize_t __pyx_v_yblock; Py_ssize_t __pyx_v_outblock; 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; 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("block_nanop", 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/src/sparse.pyx":724 * cdef: * BlockIndex out_index * Py_ssize_t xi = 0, yi = 0, out_i = 0 # fp buf indices # <<<<<<<<<<<<<< * Py_ssize_t xbp = 0, ybp = 0, obp = 0 # block positions * Py_ssize_t xblock = 0, yblock = 0, outblock = 0 # block numbers */ __pyx_v_xi = 0; __pyx_v_yi = 0; __pyx_v_out_i = 0; /* "pandas/src/sparse.pyx":725 * BlockIndex out_index * Py_ssize_t xi = 0, yi = 0, out_i = 0 # fp buf indices * Py_ssize_t xbp = 0, ybp = 0, obp = 0 # block positions # <<<<<<<<<<<<<< * Py_ssize_t xblock = 0, yblock = 0, outblock = 0 # block numbers * */ __pyx_v_xbp = 0; __pyx_v_ybp = 0; __pyx_v_obp = 0; /* "pandas/src/sparse.pyx":726 * Py_ssize_t xi = 0, yi = 0, out_i = 0 # fp buf indices * Py_ssize_t xbp = 0, ybp = 0, obp = 0 # block positions * Py_ssize_t xblock = 0, yblock = 0, outblock = 0 # block numbers # <<<<<<<<<<<<<< * * ndarray[float64_t, ndim=1] x, y */ __pyx_v_xblock = 0; __pyx_v_yblock = 0; __pyx_v_outblock = 0; /* "pandas/src/sparse.pyx":732 * * # 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_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_filename = __pyx_f[0]; __pyx_lineno = 732; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __Pyx_INCREF(((PyObject *)__pyx_v_x_)); __pyx_v_x = ((PyArrayObject *)__pyx_v_x_); /* "pandas/src/sparse.pyx":733 * # suppress Cython compiler warnings due to inlining * x = x_ * y = y_ # <<<<<<<<<<<<<< * * out_index = xindex.intersect(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_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_filename = __pyx_f[0]; __pyx_lineno = 733; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __Pyx_INCREF(((PyObject *)__pyx_v_y_)); __pyx_v_y = ((PyArrayObject *)__pyx_v_y_); /* "pandas/src/sparse.pyx":735 * y = y_ * * out_index = xindex.intersect(yindex) # <<<<<<<<<<<<<< * out = np.empty(out_index.npoints, dtype=np.float64) * */ __pyx_t_5 = ((PyObject *)((struct __pyx_vtabstruct_6pandas_7_sparse_BlockIndex *)__pyx_v_xindex->__pyx_vtab)->intersect(__pyx_v_xindex, ((struct __pyx_obj_6pandas_7_sparse_SparseIndex *)__pyx_v_yindex), 0)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 735; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_v_out_index = ((struct __pyx_obj_6pandas_7_sparse_BlockIndex *)__pyx_t_5); __pyx_t_5 = 0; /* "pandas/src/sparse.pyx":736 * * out_index = xindex.intersect(yindex) * out = np.empty(out_index.npoints, dtype=np.float64) # <<<<<<<<<<<<<< * * # walk the two SparseVectors, adding matched locations... */ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 736; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 736; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 736; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 736; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyDict_New(); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 736; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_5)); __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 736; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 736; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (PyDict_SetItem(__pyx_t_5, ((PyObject *)__pyx_n_s__dtype), __pyx_t_9) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 736; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_9 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_t_7), ((PyObject *)__pyx_t_5)); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 736; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0; __Pyx_DECREF(((PyObject *)__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_filename = __pyx_f[0]; __pyx_lineno = 736; __pyx_clineno = __LINE__; goto __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_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_filename = __pyx_f[0]; __pyx_lineno = 736; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_10 = 0; __pyx_v_out = ((PyArrayObject *)__pyx_t_9); __pyx_t_9 = 0; /* "pandas/src/sparse.pyx":739 * * # walk the two SparseVectors, adding matched locations... * for out_i from 0 <= out_i < out_index.npoints: # <<<<<<<<<<<<<< * * # I have a feeling this is inefficient */ __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/src/sparse.pyx":744 * * # walk x * while xindex.locbuf[xblock] + xbp < out_index.locbuf[outblock] + obp: # <<<<<<<<<<<<<< * xbp += 1 * xi += 1 */ while (1) { __pyx_t_12 = ((((__pyx_v_xindex->locbuf[__pyx_v_xblock]) + __pyx_v_xbp) < ((__pyx_v_out_index->locbuf[__pyx_v_outblock]) + __pyx_v_obp)) != 0); if (!__pyx_t_12) break; /* "pandas/src/sparse.pyx":745 * # walk x * while xindex.locbuf[xblock] + xbp < out_index.locbuf[outblock] + obp: * xbp += 1 # <<<<<<<<<<<<<< * xi += 1 * if xbp == xindex.lenbuf[xblock]: */ __pyx_v_xbp = (__pyx_v_xbp + 1); /* "pandas/src/sparse.pyx":746 * while xindex.locbuf[xblock] + xbp < out_index.locbuf[outblock] + obp: * xbp += 1 * xi += 1 # <<<<<<<<<<<<<< * if xbp == xindex.lenbuf[xblock]: * xblock += 1 */ __pyx_v_xi = (__pyx_v_xi + 1); /* "pandas/src/sparse.pyx":747 * xbp += 1 * xi += 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/src/sparse.pyx":748 * xi += 1 * if xbp == xindex.lenbuf[xblock]: * xblock += 1 # <<<<<<<<<<<<<< * xbp = 0 * */ __pyx_v_xblock = (__pyx_v_xblock + 1); /* "pandas/src/sparse.pyx":749 * if xbp == xindex.lenbuf[xblock]: * xblock += 1 * xbp = 0 # <<<<<<<<<<<<<< * * # walk y */ __pyx_v_xbp = 0; goto __pyx_L7; } __pyx_L7:; } /* "pandas/src/sparse.pyx":752 * * # walk y * while yindex.locbuf[yblock] + ybp < out_index.locbuf[outblock] + obp: # <<<<<<<<<<<<<< * ybp += 1 * yi += 1 */ while (1) { __pyx_t_12 = ((((__pyx_v_yindex->locbuf[__pyx_v_yblock]) + __pyx_v_ybp) < ((__pyx_v_out_index->locbuf[__pyx_v_outblock]) + __pyx_v_obp)) != 0); if (!__pyx_t_12) break; /* "pandas/src/sparse.pyx":753 * # walk y * while yindex.locbuf[yblock] + ybp < out_index.locbuf[outblock] + obp: * ybp += 1 # <<<<<<<<<<<<<< * yi += 1 * if ybp == yindex.lenbuf[yblock]: */ __pyx_v_ybp = (__pyx_v_ybp + 1); /* "pandas/src/sparse.pyx":754 * while yindex.locbuf[yblock] + ybp < out_index.locbuf[outblock] + obp: * ybp += 1 * yi += 1 # <<<<<<<<<<<<<< * if ybp == yindex.lenbuf[yblock]: * yblock += 1 */ __pyx_v_yi = (__pyx_v_yi + 1); /* "pandas/src/sparse.pyx":755 * ybp += 1 * yi += 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/src/sparse.pyx":756 * yi += 1 * if ybp == yindex.lenbuf[yblock]: * yblock += 1 # <<<<<<<<<<<<<< * ybp = 0 * */ __pyx_v_yblock = (__pyx_v_yblock + 1); /* "pandas/src/sparse.pyx":757 * if ybp == yindex.lenbuf[yblock]: * yblock += 1 * ybp = 0 # <<<<<<<<<<<<<< * * out[out_i] = op(x[xi], y[yi]) */ __pyx_v_ybp = 0; goto __pyx_L10; } __pyx_L10:; } /* "pandas/src/sparse.pyx":759 * ybp = 0 * * out[out_i] = op(x[xi], y[yi]) # <<<<<<<<<<<<<< * * # advance. strikes me as too complicated */ __pyx_t_13 = __pyx_v_xi; if (__pyx_t_13 < 0) __pyx_t_13 += __pyx_pybuffernd_x.diminfo[0].shape; __pyx_t_14 = __pyx_v_yi; if (__pyx_t_14 < 0) __pyx_t_14 += __pyx_pybuffernd_y.diminfo[0].shape; __pyx_t_15 = __pyx_v_out_i; if (__pyx_t_15 < 0) __pyx_t_15 += __pyx_pybuffernd_out.diminfo[0].shape; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_out.diminfo[0].strides) = __pyx_v_op((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_x.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_x.diminfo[0].strides)), (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_y.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_y.diminfo[0].strides))); /* "pandas/src/sparse.pyx":762 * * # advance. strikes me as too complicated * xi += 1 # <<<<<<<<<<<<<< * yi += 1 * */ __pyx_v_xi = (__pyx_v_xi + 1); /* "pandas/src/sparse.pyx":763 * # advance. strikes me as too complicated * xi += 1 * yi += 1 # <<<<<<<<<<<<<< * * xbp += 1 */ __pyx_v_yi = (__pyx_v_yi + 1); /* "pandas/src/sparse.pyx":765 * yi += 1 * * xbp += 1 # <<<<<<<<<<<<<< * if xbp == xindex.lenbuf[xblock]: * xblock += 1 */ __pyx_v_xbp = (__pyx_v_xbp + 1); /* "pandas/src/sparse.pyx":766 * * 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/src/sparse.pyx":767 * xbp += 1 * if xbp == xindex.lenbuf[xblock]: * xblock += 1 # <<<<<<<<<<<<<< * xbp = 0 * */ __pyx_v_xblock = (__pyx_v_xblock + 1); /* "pandas/src/sparse.pyx":768 * if xbp == xindex.lenbuf[xblock]: * xblock += 1 * xbp = 0 # <<<<<<<<<<<<<< * * ybp += 1 */ __pyx_v_xbp = 0; goto __pyx_L11; } __pyx_L11:; /* "pandas/src/sparse.pyx":770 * xbp = 0 * * ybp += 1 # <<<<<<<<<<<<<< * if ybp == yindex.lenbuf[yblock]: * yblock += 1 */ __pyx_v_ybp = (__pyx_v_ybp + 1); /* "pandas/src/sparse.pyx":771 * * 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/src/sparse.pyx":772 * ybp += 1 * if ybp == yindex.lenbuf[yblock]: * yblock += 1 # <<<<<<<<<<<<<< * ybp = 0 * */ __pyx_v_yblock = (__pyx_v_yblock + 1); /* "pandas/src/sparse.pyx":773 * if ybp == yindex.lenbuf[yblock]: * yblock += 1 * ybp = 0 # <<<<<<<<<<<<<< * * obp += 1 */ __pyx_v_ybp = 0; goto __pyx_L12; } __pyx_L12:; /* "pandas/src/sparse.pyx":775 * ybp = 0 * * obp += 1 # <<<<<<<<<<<<<< * if obp == out_index.lenbuf[outblock]: * outblock += 1 */ __pyx_v_obp = (__pyx_v_obp + 1); /* "pandas/src/sparse.pyx":776 * * obp += 1 * if obp == out_index.lenbuf[outblock]: # <<<<<<<<<<<<<< * outblock += 1 * obp = 0 */ __pyx_t_12 = ((__pyx_v_obp == (__pyx_v_out_index->lenbuf[__pyx_v_outblock])) != 0); if (__pyx_t_12) { /* "pandas/src/sparse.pyx":777 * obp += 1 * if obp == out_index.lenbuf[outblock]: * outblock += 1 # <<<<<<<<<<<<<< * obp = 0 * */ __pyx_v_outblock = (__pyx_v_outblock + 1); /* "pandas/src/sparse.pyx":778 * if obp == out_index.lenbuf[outblock]: * outblock += 1 * obp = 0 # <<<<<<<<<<<<<< * * return out, out_index */ __pyx_v_obp = 0; goto __pyx_L13; } __pyx_L13:; } /* "pandas/src/sparse.pyx":780 * obp = 0 * * return out, out_index # <<<<<<<<<<<<<< * * @cython.boundscheck(False) */ __Pyx_XDECREF(((PyObject *)__pyx_r)); __pyx_t_9 = PyTuple_New(2); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 780; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_INCREF(((PyObject *)__pyx_v_out)); PyTuple_SET_ITEM(__pyx_t_9, 0, ((PyObject *)__pyx_v_out)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out)); __Pyx_INCREF(((PyObject *)__pyx_v_out_index)); PyTuple_SET_ITEM(__pyx_t_9, 1, ((PyObject *)__pyx_v_out_index)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out_index)); __pyx_r = ((PyObject*)__pyx_t_9); __pyx_t_9 = 0; goto __pyx_L0; __pyx_r = ((PyObject*)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); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __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._sparse.block_nanop", __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/src/sparse.pyx":783 * * @cython.boundscheck(False) * cdef inline tuple int_nanop(ndarray x_, IntIndex xindex, # <<<<<<<<<<<<<< * ndarray y_, IntIndex yindex, * double_func op): */ static CYTHON_INLINE PyObject *__pyx_f_6pandas_7_sparse_int_nanop(PyArrayObject *__pyx_v_x_, struct __pyx_obj_6pandas_7_sparse_IntIndex *__pyx_v_xindex, PyArrayObject *__pyx_v_y_, struct __pyx_obj_6pandas_7_sparse_IntIndex *__pyx_v_yindex, __pyx_t_6pandas_7_sparse_double_func __pyx_v_op) { struct __pyx_obj_6pandas_7_sparse_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; PyArrayObject *__pyx_v_xindices = 0; PyArrayObject *__pyx_v_yindices = 0; 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; Py_ssize_t __pyx_t_12; Py_ssize_t __pyx_t_13; int __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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("int_nanop", 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/src/sparse.pyx":788 * cdef: * IntIndex out_index * Py_ssize_t xi = 0, yi = 0, out_i = 0 # fp buf indices # <<<<<<<<<<<<<< * ndarray[int32_t, ndim=1] xindices, yindices, out_indices * ndarray[float64_t, ndim=1] x, y */ __pyx_v_xi = 0; __pyx_v_yi = 0; __pyx_v_out_i = 0; /* "pandas/src/sparse.pyx":794 * * # 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_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_filename = __pyx_f[0]; __pyx_lineno = 794; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __Pyx_INCREF(((PyObject *)__pyx_v_x_)); __pyx_v_x = ((PyArrayObject *)__pyx_v_x_); /* "pandas/src/sparse.pyx":795 * # 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_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_filename = __pyx_f[0]; __pyx_lineno = 795; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __Pyx_INCREF(((PyObject *)__pyx_v_y_)); __pyx_v_y = ((PyArrayObject *)__pyx_v_y_); /* "pandas/src/sparse.pyx":798 * * # need to do this first to know size of result array * out_index = xindex.intersect(yindex) # <<<<<<<<<<<<<< * out = np.empty(out_index.npoints, dtype=np.float64) * */ __pyx_t_5 = ((PyObject *)((struct __pyx_vtabstruct_6pandas_7_sparse_IntIndex *)__pyx_v_xindex->__pyx_vtab)->intersect(__pyx_v_xindex, ((struct __pyx_obj_6pandas_7_sparse_SparseIndex *)__pyx_v_yindex), 0)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 798; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_v_out_index = ((struct __pyx_obj_6pandas_7_sparse_IntIndex *)__pyx_t_5); __pyx_t_5 = 0; /* "pandas/src/sparse.pyx":799 * # need to do this first to know size of result array * out_index = xindex.intersect(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_filename = __pyx_f[0]; __pyx_lineno = 799; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 799; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 799; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 799; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyDict_New(); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 799; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_5)); __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 799; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 799; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (PyDict_SetItem(__pyx_t_5, ((PyObject *)__pyx_n_s__dtype), __pyx_t_9) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 799; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_9 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_t_7), ((PyObject *)__pyx_t_5)); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 799; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0; __Pyx_DECREF(((PyObject *)__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_filename = __pyx_f[0]; __pyx_lineno = 799; __pyx_clineno = __LINE__; goto __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_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_filename = __pyx_f[0]; __pyx_lineno = 799; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_10 = 0; __pyx_v_out = ((PyArrayObject *)__pyx_t_9); __pyx_t_9 = 0; /* "pandas/src/sparse.pyx":801 * 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_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_filename = __pyx_f[0]; __pyx_lineno = 801; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_xindices = ((PyArrayObject *)__pyx_t_9); __pyx_t_9 = 0; /* "pandas/src/sparse.pyx":802 * * 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_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_filename = __pyx_f[0]; __pyx_lineno = 802; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_yindices = ((PyArrayObject *)__pyx_t_9); __pyx_t_9 = 0; /* "pandas/src/sparse.pyx":803 * 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_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_filename = __pyx_f[0]; __pyx_lineno = 803; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_out_indices = ((PyArrayObject *)__pyx_t_9); __pyx_t_9 = 0; /* "pandas/src/sparse.pyx":806 * * # walk the two SparseVectors, adding matched locations... * for out_i from 0 <= out_i < out_index.npoints: # <<<<<<<<<<<<<< * * # walk x */ __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/src/sparse.pyx":809 * * # walk x * while xindices[xi] < out_indices[out_i]: # <<<<<<<<<<<<<< * xi += 1 * */ while (1) { __pyx_t_12 = __pyx_v_xi; if (__pyx_t_12 < 0) __pyx_t_12 += __pyx_pybuffernd_xindices.diminfo[0].shape; __pyx_t_13 = __pyx_v_out_i; if (__pyx_t_13 < 0) __pyx_t_13 += __pyx_pybuffernd_out_indices.diminfo[0].shape; __pyx_t_14 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_xindices.rcbuffer->pybuffer.buf, __pyx_t_12, __pyx_pybuffernd_xindices.diminfo[0].strides)) < (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_out_indices.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_out_indices.diminfo[0].strides))) != 0); if (!__pyx_t_14) break; /* "pandas/src/sparse.pyx":810 * # walk x * while xindices[xi] < out_indices[out_i]: * xi += 1 # <<<<<<<<<<<<<< * * # walk y */ __pyx_v_xi = (__pyx_v_xi + 1); } /* "pandas/src/sparse.pyx":813 * * # walk y * while yindices[yi] < out_indices[out_i]: # <<<<<<<<<<<<<< * yi += 1 * */ while (1) { __pyx_t_15 = __pyx_v_yi; if (__pyx_t_15 < 0) __pyx_t_15 += __pyx_pybuffernd_yindices.diminfo[0].shape; __pyx_t_16 = __pyx_v_out_i; if (__pyx_t_16 < 0) __pyx_t_16 += __pyx_pybuffernd_out_indices.diminfo[0].shape; __pyx_t_14 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_yindices.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_yindices.diminfo[0].strides)) < (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_out_indices.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_out_indices.diminfo[0].strides))) != 0); if (!__pyx_t_14) break; /* "pandas/src/sparse.pyx":814 * # walk y * while yindices[yi] < out_indices[out_i]: * yi += 1 # <<<<<<<<<<<<<< * * out[out_i] = op(x[xi], y[yi]) */ __pyx_v_yi = (__pyx_v_yi + 1); } /* "pandas/src/sparse.pyx":816 * yi += 1 * * out[out_i] = op(x[xi], y[yi]) # <<<<<<<<<<<<<< * * # advance */ __pyx_t_17 = __pyx_v_xi; if (__pyx_t_17 < 0) __pyx_t_17 += __pyx_pybuffernd_x.diminfo[0].shape; __pyx_t_18 = __pyx_v_yi; if (__pyx_t_18 < 0) __pyx_t_18 += __pyx_pybuffernd_y.diminfo[0].shape; __pyx_t_19 = __pyx_v_out_i; if (__pyx_t_19 < 0) __pyx_t_19 += __pyx_pybuffernd_out.diminfo[0].shape; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_out.diminfo[0].strides) = __pyx_v_op((*__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/src/sparse.pyx":819 * * # advance * xi += 1 # <<<<<<<<<<<<<< * yi += 1 * */ __pyx_v_xi = (__pyx_v_xi + 1); /* "pandas/src/sparse.pyx":820 * # advance * xi += 1 * yi += 1 # <<<<<<<<<<<<<< * * return out, out_index */ __pyx_v_yi = (__pyx_v_yi + 1); } /* "pandas/src/sparse.pyx":822 * yi += 1 * * return out, out_index # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(((PyObject *)__pyx_r)); __pyx_t_9 = PyTuple_New(2); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 822; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_INCREF(((PyObject *)__pyx_v_out)); PyTuple_SET_ITEM(__pyx_t_9, 0, ((PyObject *)__pyx_v_out)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out)); __Pyx_INCREF(((PyObject *)__pyx_v_out_index)); PyTuple_SET_ITEM(__pyx_t_9, 1, ((PyObject *)__pyx_v_out_index)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out_index)); __pyx_r = ((PyObject*)__pyx_t_9); __pyx_t_9 = 0; goto __pyx_L0; __pyx_r = ((PyObject*)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); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __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._sparse.int_nanop", __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/src/sparse.pyx":826 * * @cython.boundscheck(False) * cdef inline tuple block_op(ndarray x_, BlockIndex xindex, float64_t xfill, # <<<<<<<<<<<<<< * ndarray y_, BlockIndex yindex, float64_t yfill, * double_func op): */ static CYTHON_INLINE PyObject *__pyx_f_6pandas_7_sparse_block_op(PyArrayObject *__pyx_v_x_, struct __pyx_obj_6pandas_7_sparse_BlockIndex *__pyx_v_xindex, __pyx_t_5numpy_float64_t __pyx_v_xfill, PyArrayObject *__pyx_v_y_, struct __pyx_obj_6pandas_7_sparse_BlockIndex *__pyx_v_yindex, __pyx_t_5numpy_float64_t __pyx_v_yfill, __pyx_t_6pandas_7_sparse_double_func __pyx_v_op) { struct __pyx_obj_6pandas_7_sparse_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; Py_ssize_t __pyx_v_xbp; Py_ssize_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; 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("block_op", 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/src/sparse.pyx":835 * cdef: * BlockIndex out_index * Py_ssize_t xi = 0, yi = 0, out_i = 0 # fp buf indices # <<<<<<<<<<<<<< * Py_ssize_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/src/sparse.pyx":836 * BlockIndex out_index * Py_ssize_t xi = 0, yi = 0, out_i = 0 # fp buf indices * Py_ssize_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/src/sparse.pyx":838 * Py_ssize_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/src/sparse.pyx":844 * * # 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_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_filename = __pyx_f[0]; __pyx_lineno = 844; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __Pyx_INCREF(((PyObject *)__pyx_v_x_)); __pyx_v_x = ((PyArrayObject *)__pyx_v_x_); /* "pandas/src/sparse.pyx":845 * # 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_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_filename = __pyx_f[0]; __pyx_lineno = 845; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __Pyx_INCREF(((PyObject *)__pyx_v_y_)); __pyx_v_y = ((PyArrayObject *)__pyx_v_y_); /* "pandas/src/sparse.pyx":847 * 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_7_sparse_BlockIndex *)__pyx_v_xindex->__pyx_vtab)->make_union(__pyx_v_xindex, ((struct __pyx_obj_6pandas_7_sparse_SparseIndex *)__pyx_v_yindex), 0)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 847; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_v_out_index = ((struct __pyx_obj_6pandas_7_sparse_BlockIndex *)__pyx_t_5); __pyx_t_5 = 0; /* "pandas/src/sparse.pyx":848 * * 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_filename = __pyx_f[0]; __pyx_lineno = 848; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 848; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 848; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 848; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyDict_New(); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 848; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_5)); __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 848; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 848; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (PyDict_SetItem(__pyx_t_5, ((PyObject *)__pyx_n_s__dtype), __pyx_t_9) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 848; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_9 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_t_7), ((PyObject *)__pyx_t_5)); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 848; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0; __Pyx_DECREF(((PyObject *)__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_filename = __pyx_f[0]; __pyx_lineno = 848; __pyx_clineno = __LINE__; goto __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_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_filename = __pyx_f[0]; __pyx_lineno = 848; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_10 = 0; __pyx_v_out = ((PyArrayObject *)__pyx_t_9); __pyx_t_9 = 0; /* "pandas/src/sparse.pyx":853 * * # 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/src/sparse.pyx":854 * # 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] = op(x[xi], yfill) */ __pyx_t_12 = ((__pyx_v_yblock == __pyx_v_yindex->nblocks) != 0); if (__pyx_t_12) { /* "pandas/src/sparse.pyx":856 * if yblock == yindex.nblocks: * # use y fill value * out[out_i] = op(x[xi], yfill) # <<<<<<<<<<<<<< * xi += 1 * */ __pyx_t_13 = __pyx_v_xi; if (__pyx_t_13 < 0) __pyx_t_13 += __pyx_pybuffernd_x.diminfo[0].shape; __pyx_t_14 = __pyx_v_out_i; if (__pyx_t_14 < 0) __pyx_t_14 += __pyx_pybuffernd_out.diminfo[0].shape; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_out.diminfo[0].strides) = __pyx_v_op((*__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/src/sparse.pyx":857 * # use y fill value * out[out_i] = op(x[xi], yfill) * xi += 1 # <<<<<<<<<<<<<< * * # advance x location */ __pyx_v_xi = (__pyx_v_xi + 1); /* "pandas/src/sparse.pyx":860 * * # advance x location * xbp += 1 # <<<<<<<<<<<<<< * if xbp == xindex.lenbuf[xblock]: * xblock += 1 */ __pyx_v_xbp = (__pyx_v_xbp + 1); /* "pandas/src/sparse.pyx":861 * # 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/src/sparse.pyx":862 * xbp += 1 * if xbp == xindex.lenbuf[xblock]: * xblock += 1 # <<<<<<<<<<<<<< * xbp = 0 * continue */ __pyx_v_xblock = (__pyx_v_xblock + 1); /* "pandas/src/sparse.pyx":863 * if xbp == xindex.lenbuf[xblock]: * xblock += 1 * xbp = 0 # <<<<<<<<<<<<<< * continue * */ __pyx_v_xbp = 0; goto __pyx_L6; } __pyx_L6:; /* "pandas/src/sparse.pyx":864 * xblock += 1 * xbp = 0 * continue # <<<<<<<<<<<<<< * * if xblock == xindex.nblocks: */ goto __pyx_L3_continue; goto __pyx_L5; } __pyx_L5:; /* "pandas/src/sparse.pyx":866 * continue * * if xblock == xindex.nblocks: # <<<<<<<<<<<<<< * # use x fill value * out[out_i] = op(xfill, y[yi]) */ __pyx_t_12 = ((__pyx_v_xblock == __pyx_v_xindex->nblocks) != 0); if (__pyx_t_12) { /* "pandas/src/sparse.pyx":868 * if xblock == xindex.nblocks: * # use x fill value * out[out_i] = op(xfill, y[yi]) # <<<<<<<<<<<<<< * yi += 1 * */ __pyx_t_15 = __pyx_v_yi; if (__pyx_t_15 < 0) __pyx_t_15 += __pyx_pybuffernd_y.diminfo[0].shape; __pyx_t_16 = __pyx_v_out_i; if (__pyx_t_16 < 0) __pyx_t_16 += __pyx_pybuffernd_out.diminfo[0].shape; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_out.diminfo[0].strides) = __pyx_v_op(__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/src/sparse.pyx":869 * # use x fill value * out[out_i] = op(xfill, y[yi]) * yi += 1 # <<<<<<<<<<<<<< * * # advance y location */ __pyx_v_yi = (__pyx_v_yi + 1); /* "pandas/src/sparse.pyx":872 * * # advance y location * ybp += 1 # <<<<<<<<<<<<<< * if ybp == yindex.lenbuf[yblock]: * yblock += 1 */ __pyx_v_ybp = (__pyx_v_ybp + 1); /* "pandas/src/sparse.pyx":873 * # 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/src/sparse.pyx":874 * ybp += 1 * if ybp == yindex.lenbuf[yblock]: * yblock += 1 # <<<<<<<<<<<<<< * ybp = 0 * continue */ __pyx_v_yblock = (__pyx_v_yblock + 1); /* "pandas/src/sparse.pyx":875 * if ybp == yindex.lenbuf[yblock]: * yblock += 1 * ybp = 0 # <<<<<<<<<<<<<< * continue * */ __pyx_v_ybp = 0; goto __pyx_L8; } __pyx_L8:; /* "pandas/src/sparse.pyx":876 * yblock += 1 * ybp = 0 * continue # <<<<<<<<<<<<<< * * yloc = yindex.locbuf[yblock] + ybp */ goto __pyx_L3_continue; goto __pyx_L7; } __pyx_L7:; /* "pandas/src/sparse.pyx":878 * 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/src/sparse.pyx":879 * * 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/src/sparse.pyx":882 * * # each index in the out_index had to come from either x, y, or both * if xloc == yloc: # <<<<<<<<<<<<<< * out[out_i] = op(x[xi], y[yi]) * xi += 1 */ __pyx_t_12 = ((__pyx_v_xloc == __pyx_v_yloc) != 0); if (__pyx_t_12) { /* "pandas/src/sparse.pyx":883 * # each index in the out_index had to come from either x, y, or both * if xloc == yloc: * out[out_i] = op(x[xi], y[yi]) # <<<<<<<<<<<<<< * xi += 1 * yi += 1 */ __pyx_t_17 = __pyx_v_xi; if (__pyx_t_17 < 0) __pyx_t_17 += __pyx_pybuffernd_x.diminfo[0].shape; __pyx_t_18 = __pyx_v_yi; if (__pyx_t_18 < 0) __pyx_t_18 += __pyx_pybuffernd_y.diminfo[0].shape; __pyx_t_19 = __pyx_v_out_i; if (__pyx_t_19 < 0) __pyx_t_19 += __pyx_pybuffernd_out.diminfo[0].shape; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_out.diminfo[0].strides) = __pyx_v_op((*__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/src/sparse.pyx":884 * if xloc == yloc: * out[out_i] = op(x[xi], y[yi]) * xi += 1 # <<<<<<<<<<<<<< * yi += 1 * */ __pyx_v_xi = (__pyx_v_xi + 1); /* "pandas/src/sparse.pyx":885 * out[out_i] = op(x[xi], y[yi]) * xi += 1 * yi += 1 # <<<<<<<<<<<<<< * * # advance both locations */ __pyx_v_yi = (__pyx_v_yi + 1); /* "pandas/src/sparse.pyx":888 * * # advance both locations * xbp += 1 # <<<<<<<<<<<<<< * if xbp == xindex.lenbuf[xblock]: * xblock += 1 */ __pyx_v_xbp = (__pyx_v_xbp + 1); /* "pandas/src/sparse.pyx":889 * # 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/src/sparse.pyx":890 * xbp += 1 * if xbp == xindex.lenbuf[xblock]: * xblock += 1 # <<<<<<<<<<<<<< * xbp = 0 * */ __pyx_v_xblock = (__pyx_v_xblock + 1); /* "pandas/src/sparse.pyx":891 * if xbp == xindex.lenbuf[xblock]: * xblock += 1 * xbp = 0 # <<<<<<<<<<<<<< * * ybp += 1 */ __pyx_v_xbp = 0; goto __pyx_L10; } __pyx_L10:; /* "pandas/src/sparse.pyx":893 * xbp = 0 * * ybp += 1 # <<<<<<<<<<<<<< * if ybp == yindex.lenbuf[yblock]: * yblock += 1 */ __pyx_v_ybp = (__pyx_v_ybp + 1); /* "pandas/src/sparse.pyx":894 * * 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/src/sparse.pyx":895 * ybp += 1 * if ybp == yindex.lenbuf[yblock]: * yblock += 1 # <<<<<<<<<<<<<< * ybp = 0 * */ __pyx_v_yblock = (__pyx_v_yblock + 1); /* "pandas/src/sparse.pyx":896 * if ybp == yindex.lenbuf[yblock]: * yblock += 1 * ybp = 0 # <<<<<<<<<<<<<< * * elif xloc < yloc: */ __pyx_v_ybp = 0; goto __pyx_L11; } __pyx_L11:; goto __pyx_L9; } /* "pandas/src/sparse.pyx":898 * ybp = 0 * * elif xloc < yloc: # <<<<<<<<<<<<<< * # use y fill value * out[out_i] = op(x[xi], yfill) */ __pyx_t_12 = ((__pyx_v_xloc < __pyx_v_yloc) != 0); if (__pyx_t_12) { /* "pandas/src/sparse.pyx":900 * elif xloc < yloc: * # use y fill value * out[out_i] = op(x[xi], yfill) # <<<<<<<<<<<<<< * xi += 1 * */ __pyx_t_20 = __pyx_v_xi; if (__pyx_t_20 < 0) __pyx_t_20 += __pyx_pybuffernd_x.diminfo[0].shape; __pyx_t_21 = __pyx_v_out_i; if (__pyx_t_21 < 0) __pyx_t_21 += __pyx_pybuffernd_out.diminfo[0].shape; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_out.diminfo[0].strides) = __pyx_v_op((*__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/src/sparse.pyx":901 * # use y fill value * out[out_i] = op(x[xi], yfill) * xi += 1 # <<<<<<<<<<<<<< * * # advance x location */ __pyx_v_xi = (__pyx_v_xi + 1); /* "pandas/src/sparse.pyx":904 * * # advance x location * xbp += 1 # <<<<<<<<<<<<<< * if xbp == xindex.lenbuf[xblock]: * xblock += 1 */ __pyx_v_xbp = (__pyx_v_xbp + 1); /* "pandas/src/sparse.pyx":905 * # 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/src/sparse.pyx":906 * xbp += 1 * if xbp == xindex.lenbuf[xblock]: * xblock += 1 # <<<<<<<<<<<<<< * xbp = 0 * else: */ __pyx_v_xblock = (__pyx_v_xblock + 1); /* "pandas/src/sparse.pyx":907 * if xbp == xindex.lenbuf[xblock]: * xblock += 1 * xbp = 0 # <<<<<<<<<<<<<< * else: * # use x fill value */ __pyx_v_xbp = 0; goto __pyx_L12; } __pyx_L12:; goto __pyx_L9; } /*else*/ { /* "pandas/src/sparse.pyx":910 * else: * # use x fill value * out[out_i] = op(xfill, y[yi]) # <<<<<<<<<<<<<< * yi += 1 * */ __pyx_t_22 = __pyx_v_yi; if (__pyx_t_22 < 0) __pyx_t_22 += __pyx_pybuffernd_y.diminfo[0].shape; __pyx_t_23 = __pyx_v_out_i; if (__pyx_t_23 < 0) __pyx_t_23 += __pyx_pybuffernd_out.diminfo[0].shape; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_23, __pyx_pybuffernd_out.diminfo[0].strides) = __pyx_v_op(__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/src/sparse.pyx":911 * # use x fill value * out[out_i] = op(xfill, y[yi]) * yi += 1 # <<<<<<<<<<<<<< * * # advance y location */ __pyx_v_yi = (__pyx_v_yi + 1); /* "pandas/src/sparse.pyx":914 * * # advance y location * ybp += 1 # <<<<<<<<<<<<<< * if ybp == yindex.lenbuf[yblock]: * yblock += 1 */ __pyx_v_ybp = (__pyx_v_ybp + 1); /* "pandas/src/sparse.pyx":915 * # 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/src/sparse.pyx":916 * ybp += 1 * if ybp == yindex.lenbuf[yblock]: * yblock += 1 # <<<<<<<<<<<<<< * ybp = 0 * */ __pyx_v_yblock = (__pyx_v_yblock + 1); /* "pandas/src/sparse.pyx":917 * if ybp == yindex.lenbuf[yblock]: * yblock += 1 * ybp = 0 # <<<<<<<<<<<<<< * * return out, out_index */ __pyx_v_ybp = 0; goto __pyx_L13; } __pyx_L13:; } __pyx_L9:; __pyx_L3_continue:; } /* "pandas/src/sparse.pyx":919 * ybp = 0 * * return out, out_index # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(((PyObject *)__pyx_r)); __pyx_t_9 = PyTuple_New(2); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 919; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_INCREF(((PyObject *)__pyx_v_out)); PyTuple_SET_ITEM(__pyx_t_9, 0, ((PyObject *)__pyx_v_out)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out)); __Pyx_INCREF(((PyObject *)__pyx_v_out_index)); PyTuple_SET_ITEM(__pyx_t_9, 1, ((PyObject *)__pyx_v_out_index)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out_index)); __pyx_r = ((PyObject*)__pyx_t_9); __pyx_t_9 = 0; goto __pyx_L0; __pyx_r = ((PyObject*)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); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __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._sparse.block_op", __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/src/sparse.pyx":923 * * @cython.boundscheck(False) * cdef inline tuple int_op(ndarray x_, IntIndex xindex, float64_t xfill, # <<<<<<<<<<<<<< * ndarray y_, IntIndex yindex, float64_t yfill, * double_func op): */ static CYTHON_INLINE PyObject *__pyx_f_6pandas_7_sparse_int_op(PyArrayObject *__pyx_v_x_, struct __pyx_obj_6pandas_7_sparse_IntIndex *__pyx_v_xindex, __pyx_t_5numpy_float64_t __pyx_v_xfill, PyArrayObject *__pyx_v_y_, struct __pyx_obj_6pandas_7_sparse_IntIndex *__pyx_v_yindex, __pyx_t_5numpy_float64_t __pyx_v_yfill, __pyx_t_6pandas_7_sparse_double_func __pyx_v_op) { struct __pyx_obj_6pandas_7_sparse_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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("int_op", 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/src/sparse.pyx":928 * 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/src/sparse.pyx":935 * * # 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_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_filename = __pyx_f[0]; __pyx_lineno = 935; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __Pyx_INCREF(((PyObject *)__pyx_v_x_)); __pyx_v_x = ((PyArrayObject *)__pyx_v_x_); /* "pandas/src/sparse.pyx":936 * # 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_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_filename = __pyx_f[0]; __pyx_lineno = 936; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __Pyx_INCREF(((PyObject *)__pyx_v_y_)); __pyx_v_y = ((PyArrayObject *)__pyx_v_y_); /* "pandas/src/sparse.pyx":939 * * # 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_7_sparse_IntIndex *)__pyx_v_xindex->__pyx_vtab)->make_union(__pyx_v_xindex, ((struct __pyx_obj_6pandas_7_sparse_SparseIndex *)__pyx_v_yindex), 0)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 939; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_v_out_index = ((struct __pyx_obj_6pandas_7_sparse_IntIndex *)__pyx_t_5); __pyx_t_5 = 0; /* "pandas/src/sparse.pyx":940 * # 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_filename = __pyx_f[0]; __pyx_lineno = 940; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 940; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 940; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 940; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyDict_New(); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 940; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_5)); __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 940; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 940; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (PyDict_SetItem(__pyx_t_5, ((PyObject *)__pyx_n_s__dtype), __pyx_t_9) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 940; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_9 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_t_7), ((PyObject *)__pyx_t_5)); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 940; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0; __Pyx_DECREF(((PyObject *)__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_filename = __pyx_f[0]; __pyx_lineno = 940; __pyx_clineno = __LINE__; goto __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_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_filename = __pyx_f[0]; __pyx_lineno = 940; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_10 = 0; __pyx_v_out = ((PyArrayObject *)__pyx_t_9); __pyx_t_9 = 0; /* "pandas/src/sparse.pyx":942 * 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_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_filename = __pyx_f[0]; __pyx_lineno = 942; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_xindices = ((PyArrayObject *)__pyx_t_9); __pyx_t_9 = 0; /* "pandas/src/sparse.pyx":943 * * 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_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_filename = __pyx_f[0]; __pyx_lineno = 943; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_yindices = ((PyArrayObject *)__pyx_t_9); __pyx_t_9 = 0; /* "pandas/src/sparse.pyx":944 * 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_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_filename = __pyx_f[0]; __pyx_lineno = 944; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_out_indices = ((PyArrayObject *)__pyx_t_9); __pyx_t_9 = 0; /* "pandas/src/sparse.pyx":947 * * # 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/src/sparse.pyx":948 * # 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] = op(xfill, y[yi]) */ __pyx_t_12 = ((__pyx_v_xi == __pyx_v_xindex->npoints) != 0); if (__pyx_t_12) { /* "pandas/src/sparse.pyx":950 * if xi == xindex.npoints: * # use x fill value * out[out_i] = op(xfill, y[yi]) # <<<<<<<<<<<<<< * yi += 1 * continue */ __pyx_t_13 = __pyx_v_yi; if (__pyx_t_13 < 0) __pyx_t_13 += __pyx_pybuffernd_y.diminfo[0].shape; __pyx_t_14 = __pyx_v_out_i; if (__pyx_t_14 < 0) __pyx_t_14 += __pyx_pybuffernd_out.diminfo[0].shape; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_out.diminfo[0].strides) = __pyx_v_op(__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/src/sparse.pyx":951 * # use x fill value * out[out_i] = op(xfill, y[yi]) * yi += 1 # <<<<<<<<<<<<<< * continue * */ __pyx_v_yi = (__pyx_v_yi + 1); /* "pandas/src/sparse.pyx":952 * out[out_i] = op(xfill, y[yi]) * yi += 1 * continue # <<<<<<<<<<<<<< * * if yi == yindex.npoints: */ goto __pyx_L3_continue; goto __pyx_L5; } __pyx_L5:; /* "pandas/src/sparse.pyx":954 * continue * * if yi == yindex.npoints: # <<<<<<<<<<<<<< * # use y fill value * out[out_i] = op(x[xi], yfill) */ __pyx_t_12 = ((__pyx_v_yi == __pyx_v_yindex->npoints) != 0); if (__pyx_t_12) { /* "pandas/src/sparse.pyx":956 * if yi == yindex.npoints: * # use y fill value * out[out_i] = op(x[xi], yfill) # <<<<<<<<<<<<<< * xi += 1 * continue */ __pyx_t_15 = __pyx_v_xi; if (__pyx_t_15 < 0) __pyx_t_15 += __pyx_pybuffernd_x.diminfo[0].shape; __pyx_t_16 = __pyx_v_out_i; if (__pyx_t_16 < 0) __pyx_t_16 += __pyx_pybuffernd_out.diminfo[0].shape; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_out.diminfo[0].strides) = __pyx_v_op((*__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/src/sparse.pyx":957 * # use y fill value * out[out_i] = op(x[xi], yfill) * xi += 1 # <<<<<<<<<<<<<< * continue * */ __pyx_v_xi = (__pyx_v_xi + 1); /* "pandas/src/sparse.pyx":958 * out[out_i] = op(x[xi], yfill) * xi += 1 * continue # <<<<<<<<<<<<<< * * xloc = xindices[xi] */ goto __pyx_L3_continue; goto __pyx_L6; } __pyx_L6:; /* "pandas/src/sparse.pyx":960 * continue * * xloc = xindices[xi] # <<<<<<<<<<<<<< * yloc = yindices[yi] * */ __pyx_t_17 = __pyx_v_xi; if (__pyx_t_17 < 0) __pyx_t_17 += __pyx_pybuffernd_xindices.diminfo[0].shape; __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/src/sparse.pyx":961 * * 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; if (__pyx_t_18 < 0) __pyx_t_18 += __pyx_pybuffernd_yindices.diminfo[0].shape; __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/src/sparse.pyx":964 * * # each index in the out_index had to come from either x, y, or both * if xloc == yloc: # <<<<<<<<<<<<<< * out[out_i] = op(x[xi], y[yi]) * xi += 1 */ __pyx_t_12 = ((__pyx_v_xloc == __pyx_v_yloc) != 0); if (__pyx_t_12) { /* "pandas/src/sparse.pyx":965 * # each index in the out_index had to come from either x, y, or both * if xloc == yloc: * out[out_i] = op(x[xi], y[yi]) # <<<<<<<<<<<<<< * xi += 1 * yi += 1 */ __pyx_t_19 = __pyx_v_xi; if (__pyx_t_19 < 0) __pyx_t_19 += __pyx_pybuffernd_x.diminfo[0].shape; __pyx_t_20 = __pyx_v_yi; if (__pyx_t_20 < 0) __pyx_t_20 += __pyx_pybuffernd_y.diminfo[0].shape; __pyx_t_21 = __pyx_v_out_i; if (__pyx_t_21 < 0) __pyx_t_21 += __pyx_pybuffernd_out.diminfo[0].shape; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_out.diminfo[0].strides) = __pyx_v_op((*__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/src/sparse.pyx":966 * if xloc == yloc: * out[out_i] = op(x[xi], y[yi]) * xi += 1 # <<<<<<<<<<<<<< * yi += 1 * elif xloc < yloc: */ __pyx_v_xi = (__pyx_v_xi + 1); /* "pandas/src/sparse.pyx":967 * out[out_i] = op(x[xi], y[yi]) * xi += 1 * yi += 1 # <<<<<<<<<<<<<< * elif xloc < yloc: * # use y fill value */ __pyx_v_yi = (__pyx_v_yi + 1); goto __pyx_L7; } /* "pandas/src/sparse.pyx":968 * xi += 1 * yi += 1 * elif xloc < yloc: # <<<<<<<<<<<<<< * # use y fill value * out[out_i] = op(x[xi], yfill) */ __pyx_t_12 = ((__pyx_v_xloc < __pyx_v_yloc) != 0); if (__pyx_t_12) { /* "pandas/src/sparse.pyx":970 * elif xloc < yloc: * # use y fill value * out[out_i] = op(x[xi], yfill) # <<<<<<<<<<<<<< * xi += 1 * else: */ __pyx_t_22 = __pyx_v_xi; if (__pyx_t_22 < 0) __pyx_t_22 += __pyx_pybuffernd_x.diminfo[0].shape; __pyx_t_23 = __pyx_v_out_i; if (__pyx_t_23 < 0) __pyx_t_23 += __pyx_pybuffernd_out.diminfo[0].shape; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_23, __pyx_pybuffernd_out.diminfo[0].strides) = __pyx_v_op((*__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/src/sparse.pyx":971 * # use y fill value * out[out_i] = op(x[xi], yfill) * xi += 1 # <<<<<<<<<<<<<< * else: * # use x fill value */ __pyx_v_xi = (__pyx_v_xi + 1); goto __pyx_L7; } /*else*/ { /* "pandas/src/sparse.pyx":974 * else: * # use x fill value * out[out_i] = op(xfill, y[yi]) # <<<<<<<<<<<<<< * yi += 1 * */ __pyx_t_24 = __pyx_v_yi; if (__pyx_t_24 < 0) __pyx_t_24 += __pyx_pybuffernd_y.diminfo[0].shape; __pyx_t_25 = __pyx_v_out_i; if (__pyx_t_25 < 0) __pyx_t_25 += __pyx_pybuffernd_out.diminfo[0].shape; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_25, __pyx_pybuffernd_out.diminfo[0].strides) = __pyx_v_op(__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/src/sparse.pyx":975 * # use x fill value * out[out_i] = op(xfill, y[yi]) * yi += 1 # <<<<<<<<<<<<<< * * return out, out_index */ __pyx_v_yi = (__pyx_v_yi + 1); } __pyx_L7:; __pyx_L3_continue:; } /* "pandas/src/sparse.pyx":977 * yi += 1 * * return out, out_index # <<<<<<<<<<<<<< * * cdef inline float64_t __add(float64_t a, float64_t b): */ __Pyx_XDECREF(((PyObject *)__pyx_r)); __pyx_t_9 = PyTuple_New(2); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 977; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_INCREF(((PyObject *)__pyx_v_out)); PyTuple_SET_ITEM(__pyx_t_9, 0, ((PyObject *)__pyx_v_out)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out)); __Pyx_INCREF(((PyObject *)__pyx_v_out_index)); PyTuple_SET_ITEM(__pyx_t_9, 1, ((PyObject *)__pyx_v_out_index)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out_index)); __pyx_r = ((PyObject*)__pyx_t_9); __pyx_t_9 = 0; goto __pyx_L0; __pyx_r = ((PyObject*)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); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __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._sparse.int_op", __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/src/sparse.pyx":979 * return out, out_index * * cdef inline float64_t __add(float64_t a, float64_t b): # <<<<<<<<<<<<<< * return a + b * */ static CYTHON_INLINE __pyx_t_5numpy_float64_t __pyx_f_6pandas_7_sparse___add(__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("__add", 0); /* "pandas/src/sparse.pyx":980 * * cdef inline float64_t __add(float64_t a, float64_t b): * return a + b # <<<<<<<<<<<<<< * * cdef inline float64_t __sub(float64_t a, float64_t b): */ __pyx_r = (__pyx_v_a + __pyx_v_b); goto __pyx_L0; __pyx_r = 0; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/sparse.pyx":982 * return a + b * * cdef inline float64_t __sub(float64_t a, float64_t b): # <<<<<<<<<<<<<< * return a - b * */ static CYTHON_INLINE __pyx_t_5numpy_float64_t __pyx_f_6pandas_7_sparse___sub(__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("__sub", 0); /* "pandas/src/sparse.pyx":983 * * cdef inline float64_t __sub(float64_t a, float64_t b): * return a - b # <<<<<<<<<<<<<< * * cdef inline float64_t __rsub(float64_t a, float64_t b): */ __pyx_r = (__pyx_v_a - __pyx_v_b); goto __pyx_L0; __pyx_r = 0; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/sparse.pyx":985 * return a - b * * cdef inline float64_t __rsub(float64_t a, float64_t b): # <<<<<<<<<<<<<< * return b - a * */ static CYTHON_INLINE __pyx_t_5numpy_float64_t __pyx_f_6pandas_7_sparse___rsub(__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("__rsub", 0); /* "pandas/src/sparse.pyx":986 * * cdef inline float64_t __rsub(float64_t a, float64_t b): * return b - a # <<<<<<<<<<<<<< * * cdef inline float64_t __div(float64_t a, float64_t b): */ __pyx_r = (__pyx_v_b - __pyx_v_a); goto __pyx_L0; __pyx_r = 0; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/sparse.pyx":988 * return b - a * * cdef inline float64_t __div(float64_t a, float64_t b): # <<<<<<<<<<<<<< * if b == 0: * if a > 0: */ static CYTHON_INLINE __pyx_t_5numpy_float64_t __pyx_f_6pandas_7_sparse___div(__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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__div", 0); /* "pandas/src/sparse.pyx":989 * * cdef inline float64_t __div(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/src/sparse.pyx":990 * cdef inline float64_t __div(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/src/sparse.pyx":991 * if b == 0: * if a > 0: * return INF # <<<<<<<<<<<<<< * elif a < 0: * return -INF */ __pyx_r = __pyx_v_6pandas_7_sparse_INF; goto __pyx_L0; goto __pyx_L4; } /* "pandas/src/sparse.pyx":992 * 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/src/sparse.pyx":993 * return INF * elif a < 0: * return -INF # <<<<<<<<<<<<<< * else: * return NaN */ __pyx_r = (-__pyx_v_6pandas_7_sparse_INF); goto __pyx_L0; goto __pyx_L4; } /*else*/ { /* "pandas/src/sparse.pyx":995 * return -INF * else: * return NaN # <<<<<<<<<<<<<< * else: * return a / b */ __pyx_r = __pyx_v_6pandas_7_sparse_NaN; goto __pyx_L0; } __pyx_L4:; goto __pyx_L3; } /*else*/ { /* "pandas/src/sparse.pyx":997 * return NaN * else: * return a / b # <<<<<<<<<<<<<< * * cdef inline float64_t __rdiv(float64_t a, float64_t b): */ if (unlikely(__pyx_v_b == 0)) { #ifdef WITH_THREAD PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure(); #endif PyErr_Format(PyExc_ZeroDivisionError, "float division"); #ifdef WITH_THREAD PyGILState_Release(__pyx_gilstate_save); #endif {__pyx_filename = __pyx_f[0]; __pyx_lineno = 997; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_r = (__pyx_v_a / __pyx_v_b); goto __pyx_L0; } __pyx_L3:; __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_WriteUnraisable("pandas._sparse.__div", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/sparse.pyx":999 * return a / b * * cdef inline float64_t __rdiv(float64_t a, float64_t b): # <<<<<<<<<<<<<< * return __div(b, a) * */ static CYTHON_INLINE __pyx_t_5numpy_float64_t __pyx_f_6pandas_7_sparse___rdiv(__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("__rdiv", 0); /* "pandas/src/sparse.pyx":1000 * * cdef inline float64_t __rdiv(float64_t a, float64_t b): * return __div(b, a) # <<<<<<<<<<<<<< * * cdef inline float64_t __floordiv(float64_t a, float64_t b): */ __pyx_r = __pyx_f_6pandas_7_sparse___div(__pyx_v_b, __pyx_v_a); goto __pyx_L0; __pyx_r = 0; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/sparse.pyx":1002 * return __div(b, a) * * cdef inline float64_t __floordiv(float64_t a, float64_t b): # <<<<<<<<<<<<<< * if b == 0: * if a > 0: */ static CYTHON_INLINE __pyx_t_5numpy_float64_t __pyx_f_6pandas_7_sparse___floordiv(__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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__floordiv", 0); /* "pandas/src/sparse.pyx":1003 * * cdef inline float64_t __floordiv(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/src/sparse.pyx":1004 * cdef inline float64_t __floordiv(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/src/sparse.pyx":1005 * if b == 0: * if a > 0: * return INF # <<<<<<<<<<<<<< * elif a < 0: * return -INF */ __pyx_r = __pyx_v_6pandas_7_sparse_INF; goto __pyx_L0; goto __pyx_L4; } /* "pandas/src/sparse.pyx":1006 * 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/src/sparse.pyx":1007 * return INF * elif a < 0: * return -INF # <<<<<<<<<<<<<< * else: * return NaN */ __pyx_r = (-__pyx_v_6pandas_7_sparse_INF); goto __pyx_L0; goto __pyx_L4; } /*else*/ { /* "pandas/src/sparse.pyx":1009 * return -INF * else: * return NaN # <<<<<<<<<<<<<< * else: * return a // b */ __pyx_r = __pyx_v_6pandas_7_sparse_NaN; goto __pyx_L0; } __pyx_L4:; goto __pyx_L3; } /*else*/ { /* "pandas/src/sparse.pyx":1011 * return NaN * else: * return a // b # <<<<<<<<<<<<<< * * cdef inline float64_t __rfloordiv(float64_t a, float64_t b): */ if (unlikely(__pyx_v_b == 0)) { #ifdef WITH_THREAD PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure(); #endif PyErr_Format(PyExc_ZeroDivisionError, "float division"); #ifdef WITH_THREAD PyGILState_Release(__pyx_gilstate_save); #endif {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1011; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_r = floor(__pyx_v_a / __pyx_v_b); goto __pyx_L0; } __pyx_L3:; __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_WriteUnraisable("pandas._sparse.__floordiv", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/sparse.pyx":1013 * return a // b * * cdef inline float64_t __rfloordiv(float64_t a, float64_t b): # <<<<<<<<<<<<<< * return __floordiv(b, a) * */ static CYTHON_INLINE __pyx_t_5numpy_float64_t __pyx_f_6pandas_7_sparse___rfloordiv(__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("__rfloordiv", 0); /* "pandas/src/sparse.pyx":1014 * * cdef inline float64_t __rfloordiv(float64_t a, float64_t b): * return __floordiv(b, a) # <<<<<<<<<<<<<< * * cdef inline float64_t __mul(float64_t a, float64_t b): */ __pyx_r = __pyx_f_6pandas_7_sparse___floordiv(__pyx_v_b, __pyx_v_a); goto __pyx_L0; __pyx_r = 0; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/sparse.pyx":1016 * return __floordiv(b, a) * * cdef inline float64_t __mul(float64_t a, float64_t b): # <<<<<<<<<<<<<< * return a * b * cdef inline float64_t __eq(float64_t a, float64_t b): */ static CYTHON_INLINE __pyx_t_5numpy_float64_t __pyx_f_6pandas_7_sparse___mul(__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("__mul", 0); /* "pandas/src/sparse.pyx":1017 * * cdef inline float64_t __mul(float64_t a, float64_t b): * return a * b # <<<<<<<<<<<<<< * cdef inline float64_t __eq(float64_t a, float64_t b): * return a == b */ __pyx_r = (__pyx_v_a * __pyx_v_b); goto __pyx_L0; __pyx_r = 0; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/sparse.pyx":1018 * cdef inline float64_t __mul(float64_t a, float64_t b): * return a * b * cdef inline float64_t __eq(float64_t a, float64_t b): # <<<<<<<<<<<<<< * return a == b * cdef inline float64_t __ne(float64_t a, float64_t b): */ static CYTHON_INLINE __pyx_t_5numpy_float64_t __pyx_f_6pandas_7_sparse___eq(__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("__eq", 0); /* "pandas/src/sparse.pyx":1019 * return a * b * cdef inline float64_t __eq(float64_t a, float64_t b): * return a == b # <<<<<<<<<<<<<< * cdef inline float64_t __ne(float64_t a, float64_t b): * return a != b */ __pyx_r = (__pyx_v_a == __pyx_v_b); goto __pyx_L0; __pyx_r = 0; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/sparse.pyx":1020 * cdef inline float64_t __eq(float64_t a, float64_t b): * return a == b * cdef inline float64_t __ne(float64_t a, float64_t b): # <<<<<<<<<<<<<< * return a != b * cdef inline float64_t __lt(float64_t a, float64_t b): */ static CYTHON_INLINE __pyx_t_5numpy_float64_t __pyx_f_6pandas_7_sparse___ne(__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("__ne", 0); /* "pandas/src/sparse.pyx":1021 * return a == b * cdef inline float64_t __ne(float64_t a, float64_t b): * return a != b # <<<<<<<<<<<<<< * cdef inline float64_t __lt(float64_t a, float64_t b): * return a < b */ __pyx_r = (__pyx_v_a != __pyx_v_b); goto __pyx_L0; __pyx_r = 0; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/sparse.pyx":1022 * cdef inline float64_t __ne(float64_t a, float64_t b): * return a != b * cdef inline float64_t __lt(float64_t a, float64_t b): # <<<<<<<<<<<<<< * return a < b * cdef inline float64_t __gt(float64_t a, float64_t b): */ static CYTHON_INLINE __pyx_t_5numpy_float64_t __pyx_f_6pandas_7_sparse___lt(__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("__lt", 0); /* "pandas/src/sparse.pyx":1023 * return a != b * cdef inline float64_t __lt(float64_t a, float64_t b): * return a < b # <<<<<<<<<<<<<< * cdef inline float64_t __gt(float64_t a, float64_t b): * return a > b */ __pyx_r = (__pyx_v_a < __pyx_v_b); goto __pyx_L0; __pyx_r = 0; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/sparse.pyx":1024 * cdef inline float64_t __lt(float64_t a, float64_t b): * return a < b * cdef inline float64_t __gt(float64_t a, float64_t b): # <<<<<<<<<<<<<< * return a > b * */ static CYTHON_INLINE __pyx_t_5numpy_float64_t __pyx_f_6pandas_7_sparse___gt(__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("__gt", 0); /* "pandas/src/sparse.pyx":1025 * return a < b * cdef inline float64_t __gt(float64_t a, float64_t b): * return a > b # <<<<<<<<<<<<<< * * cdef inline float64_t __pow(float64_t a, float64_t b): */ __pyx_r = (__pyx_v_a > __pyx_v_b); goto __pyx_L0; __pyx_r = 0; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/sparse.pyx":1027 * return a > b * * cdef inline float64_t __pow(float64_t a, float64_t b): # <<<<<<<<<<<<<< * # NaN * if a != a or b != b: */ static CYTHON_INLINE __pyx_t_5numpy_float64_t __pyx_f_6pandas_7_sparse___pow(__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; int __pyx_t_2; int __pyx_t_3; __Pyx_RefNannySetupContext("__pow", 0); /* "pandas/src/sparse.pyx":1029 * cdef inline float64_t __pow(float64_t a, float64_t b): * # NaN * if a != a or b != b: # <<<<<<<<<<<<<< * return NaN * return a ** b */ __pyx_t_1 = ((__pyx_v_a != __pyx_v_a) != 0); if (!__pyx_t_1) { __pyx_t_2 = ((__pyx_v_b != __pyx_v_b) != 0); __pyx_t_3 = __pyx_t_2; } else { __pyx_t_3 = __pyx_t_1; } if (__pyx_t_3) { /* "pandas/src/sparse.pyx":1030 * # NaN * if a != a or b != b: * return NaN # <<<<<<<<<<<<<< * return a ** b * */ __pyx_r = __pyx_v_6pandas_7_sparse_NaN; goto __pyx_L0; goto __pyx_L3; } __pyx_L3:; /* "pandas/src/sparse.pyx":1031 * if a != a or b != b: * return NaN * return a ** b # <<<<<<<<<<<<<< * * cdef inline float64_t __rpow(float64_t a, float64_t b): */ __pyx_r = pow(__pyx_v_a, __pyx_v_b); goto __pyx_L0; __pyx_r = 0; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/sparse.pyx":1033 * return a ** b * * cdef inline float64_t __rpow(float64_t a, float64_t b): # <<<<<<<<<<<<<< * return __pow(b, a) * */ static CYTHON_INLINE __pyx_t_5numpy_float64_t __pyx_f_6pandas_7_sparse___rpow(__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("__rpow", 0); /* "pandas/src/sparse.pyx":1034 * * cdef inline float64_t __rpow(float64_t a, float64_t b): * return __pow(b, a) # <<<<<<<<<<<<<< * * */ __pyx_r = __pyx_f_6pandas_7_sparse___pow(__pyx_v_b, __pyx_v_a); goto __pyx_L0; __pyx_r = 0; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/sparse.pyx":1040 * # TODO: quantify performance boost to "templating" * * cpdef sparse_nanadd(ndarray x, SparseIndex xindex, # <<<<<<<<<<<<<< * ndarray y, SparseIndex yindex): * return sparse_nancombine(x, xindex, y, yindex, __add) */ static PyObject *__pyx_pw_6pandas_7_sparse_3sparse_nanadd(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_6pandas_7_sparse_sparse_nanadd(PyArrayObject *__pyx_v_x, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_xindex, PyArrayObject *__pyx_v_y, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_yindex, CYTHON_UNUSED int __pyx_skip_dispatch) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("sparse_nanadd", 0); /* "pandas/src/sparse.pyx":1042 * cpdef sparse_nanadd(ndarray x, SparseIndex xindex, * ndarray y, SparseIndex yindex): * return sparse_nancombine(x, xindex, y, yindex, __add) # <<<<<<<<<<<<<< * * cpdef sparse_nansub(ndarray x, SparseIndex xindex, */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = ((PyObject *)__pyx_f_6pandas_7_sparse_sparse_nancombine(__pyx_v_x, __pyx_v_xindex, __pyx_v_y, __pyx_v_yindex, __pyx_f_6pandas_7_sparse___add)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1042; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas._sparse.sparse_nanadd", __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_7_sparse_3sparse_nanadd(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_6pandas_7_sparse_3sparse_nanadd(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_x = 0; struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_xindex = 0; PyArrayObject *__pyx_v_y = 0; struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_yindex = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("sparse_nanadd (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__x,&__pyx_n_s__xindex,&__pyx_n_s__y,&__pyx_n_s__yindex,0}; PyObject* values[4] = {0,0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__x)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__xindex)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_nanadd", 1, 4, 4, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1040; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__y)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_nanadd", 1, 4, 4, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1040; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__yindex)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_nanadd", 1, 4, 4, 3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1040; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "sparse_nanadd") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1040; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 4) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[3] = PyTuple_GET_ITEM(__pyx_args, 3); } __pyx_v_x = ((PyArrayObject *)values[0]); __pyx_v_xindex = ((struct __pyx_obj_6pandas_7_sparse_SparseIndex *)values[1]); __pyx_v_y = ((PyArrayObject *)values[2]); __pyx_v_yindex = ((struct __pyx_obj_6pandas_7_sparse_SparseIndex *)values[3]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("sparse_nanadd", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1040; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas._sparse.sparse_nanadd", __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_filename = __pyx_f[0]; __pyx_lineno = 1040; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_xindex), __pyx_ptype_6pandas_7_sparse_SparseIndex, 1, "xindex", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1040; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_y), __pyx_ptype_5numpy_ndarray, 1, "y", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1041; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_yindex), __pyx_ptype_6pandas_7_sparse_SparseIndex, 1, "yindex", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1041; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_7_sparse_2sparse_nanadd(__pyx_self, __pyx_v_x, __pyx_v_xindex, __pyx_v_y, __pyx_v_yindex); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/sparse.pyx":1040 * # TODO: quantify performance boost to "templating" * * cpdef sparse_nanadd(ndarray x, SparseIndex xindex, # <<<<<<<<<<<<<< * ndarray y, SparseIndex yindex): * return sparse_nancombine(x, xindex, y, yindex, __add) */ static PyObject *__pyx_pf_6pandas_7_sparse_2sparse_nanadd(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_x, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_xindex, PyArrayObject *__pyx_v_y, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_yindex) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("sparse_nanadd", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_6pandas_7_sparse_sparse_nanadd(__pyx_v_x, __pyx_v_xindex, __pyx_v_y, __pyx_v_yindex, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1040; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas._sparse.sparse_nanadd", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/sparse.pyx":1044 * return sparse_nancombine(x, xindex, y, yindex, __add) * * cpdef sparse_nansub(ndarray x, SparseIndex xindex, # <<<<<<<<<<<<<< * ndarray y, SparseIndex yindex): * return sparse_nancombine(x, xindex, y, yindex, __sub) */ static PyObject *__pyx_pw_6pandas_7_sparse_5sparse_nansub(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_6pandas_7_sparse_sparse_nansub(PyArrayObject *__pyx_v_x, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_xindex, PyArrayObject *__pyx_v_y, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_yindex, CYTHON_UNUSED int __pyx_skip_dispatch) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("sparse_nansub", 0); /* "pandas/src/sparse.pyx":1046 * cpdef sparse_nansub(ndarray x, SparseIndex xindex, * ndarray y, SparseIndex yindex): * return sparse_nancombine(x, xindex, y, yindex, __sub) # <<<<<<<<<<<<<< * * cpdef sparse_nanrsub(ndarray x, SparseIndex xindex, */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = ((PyObject *)__pyx_f_6pandas_7_sparse_sparse_nancombine(__pyx_v_x, __pyx_v_xindex, __pyx_v_y, __pyx_v_yindex, __pyx_f_6pandas_7_sparse___sub)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1046; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas._sparse.sparse_nansub", __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_7_sparse_5sparse_nansub(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_6pandas_7_sparse_5sparse_nansub(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_x = 0; struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_xindex = 0; PyArrayObject *__pyx_v_y = 0; struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_yindex = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("sparse_nansub (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__x,&__pyx_n_s__xindex,&__pyx_n_s__y,&__pyx_n_s__yindex,0}; PyObject* values[4] = {0,0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__x)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__xindex)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_nansub", 1, 4, 4, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1044; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__y)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_nansub", 1, 4, 4, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1044; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__yindex)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_nansub", 1, 4, 4, 3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1044; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "sparse_nansub") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1044; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 4) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[3] = PyTuple_GET_ITEM(__pyx_args, 3); } __pyx_v_x = ((PyArrayObject *)values[0]); __pyx_v_xindex = ((struct __pyx_obj_6pandas_7_sparse_SparseIndex *)values[1]); __pyx_v_y = ((PyArrayObject *)values[2]); __pyx_v_yindex = ((struct __pyx_obj_6pandas_7_sparse_SparseIndex *)values[3]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("sparse_nansub", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1044; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas._sparse.sparse_nansub", __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_filename = __pyx_f[0]; __pyx_lineno = 1044; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_xindex), __pyx_ptype_6pandas_7_sparse_SparseIndex, 1, "xindex", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1044; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_y), __pyx_ptype_5numpy_ndarray, 1, "y", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1045; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_yindex), __pyx_ptype_6pandas_7_sparse_SparseIndex, 1, "yindex", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1045; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_7_sparse_4sparse_nansub(__pyx_self, __pyx_v_x, __pyx_v_xindex, __pyx_v_y, __pyx_v_yindex); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/sparse.pyx":1044 * return sparse_nancombine(x, xindex, y, yindex, __add) * * cpdef sparse_nansub(ndarray x, SparseIndex xindex, # <<<<<<<<<<<<<< * ndarray y, SparseIndex yindex): * return sparse_nancombine(x, xindex, y, yindex, __sub) */ static PyObject *__pyx_pf_6pandas_7_sparse_4sparse_nansub(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_x, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_xindex, PyArrayObject *__pyx_v_y, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_yindex) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("sparse_nansub", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_6pandas_7_sparse_sparse_nansub(__pyx_v_x, __pyx_v_xindex, __pyx_v_y, __pyx_v_yindex, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1044; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas._sparse.sparse_nansub", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/sparse.pyx":1048 * return sparse_nancombine(x, xindex, y, yindex, __sub) * * cpdef sparse_nanrsub(ndarray x, SparseIndex xindex, # <<<<<<<<<<<<<< * ndarray y, SparseIndex yindex): * return sparse_nancombine(x, xindex, y, yindex, __rsub) */ static PyObject *__pyx_pw_6pandas_7_sparse_7sparse_nanrsub(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_6pandas_7_sparse_sparse_nanrsub(PyArrayObject *__pyx_v_x, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_xindex, PyArrayObject *__pyx_v_y, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_yindex, CYTHON_UNUSED int __pyx_skip_dispatch) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("sparse_nanrsub", 0); /* "pandas/src/sparse.pyx":1050 * cpdef sparse_nanrsub(ndarray x, SparseIndex xindex, * ndarray y, SparseIndex yindex): * return sparse_nancombine(x, xindex, y, yindex, __rsub) # <<<<<<<<<<<<<< * * cpdef sparse_nanmul(ndarray x, SparseIndex xindex, */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = ((PyObject *)__pyx_f_6pandas_7_sparse_sparse_nancombine(__pyx_v_x, __pyx_v_xindex, __pyx_v_y, __pyx_v_yindex, __pyx_f_6pandas_7_sparse___rsub)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1050; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas._sparse.sparse_nanrsub", __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_7_sparse_7sparse_nanrsub(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_6pandas_7_sparse_7sparse_nanrsub(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_x = 0; struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_xindex = 0; PyArrayObject *__pyx_v_y = 0; struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_yindex = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("sparse_nanrsub (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__x,&__pyx_n_s__xindex,&__pyx_n_s__y,&__pyx_n_s__yindex,0}; PyObject* values[4] = {0,0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__x)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__xindex)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_nanrsub", 1, 4, 4, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1048; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__y)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_nanrsub", 1, 4, 4, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1048; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__yindex)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_nanrsub", 1, 4, 4, 3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1048; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "sparse_nanrsub") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1048; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 4) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[3] = PyTuple_GET_ITEM(__pyx_args, 3); } __pyx_v_x = ((PyArrayObject *)values[0]); __pyx_v_xindex = ((struct __pyx_obj_6pandas_7_sparse_SparseIndex *)values[1]); __pyx_v_y = ((PyArrayObject *)values[2]); __pyx_v_yindex = ((struct __pyx_obj_6pandas_7_sparse_SparseIndex *)values[3]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("sparse_nanrsub", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1048; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas._sparse.sparse_nanrsub", __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_filename = __pyx_f[0]; __pyx_lineno = 1048; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_xindex), __pyx_ptype_6pandas_7_sparse_SparseIndex, 1, "xindex", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1048; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_y), __pyx_ptype_5numpy_ndarray, 1, "y", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1049; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_yindex), __pyx_ptype_6pandas_7_sparse_SparseIndex, 1, "yindex", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1049; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_7_sparse_6sparse_nanrsub(__pyx_self, __pyx_v_x, __pyx_v_xindex, __pyx_v_y, __pyx_v_yindex); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/sparse.pyx":1048 * return sparse_nancombine(x, xindex, y, yindex, __sub) * * cpdef sparse_nanrsub(ndarray x, SparseIndex xindex, # <<<<<<<<<<<<<< * ndarray y, SparseIndex yindex): * return sparse_nancombine(x, xindex, y, yindex, __rsub) */ static PyObject *__pyx_pf_6pandas_7_sparse_6sparse_nanrsub(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_x, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_xindex, PyArrayObject *__pyx_v_y, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_yindex) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("sparse_nanrsub", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_6pandas_7_sparse_sparse_nanrsub(__pyx_v_x, __pyx_v_xindex, __pyx_v_y, __pyx_v_yindex, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1048; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas._sparse.sparse_nanrsub", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/sparse.pyx":1052 * return sparse_nancombine(x, xindex, y, yindex, __rsub) * * cpdef sparse_nanmul(ndarray x, SparseIndex xindex, # <<<<<<<<<<<<<< * ndarray y, SparseIndex yindex): * return sparse_nancombine(x, xindex, y, yindex, __mul) */ static PyObject *__pyx_pw_6pandas_7_sparse_9sparse_nanmul(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_6pandas_7_sparse_sparse_nanmul(PyArrayObject *__pyx_v_x, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_xindex, PyArrayObject *__pyx_v_y, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_yindex, CYTHON_UNUSED int __pyx_skip_dispatch) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("sparse_nanmul", 0); /* "pandas/src/sparse.pyx":1054 * cpdef sparse_nanmul(ndarray x, SparseIndex xindex, * ndarray y, SparseIndex yindex): * return sparse_nancombine(x, xindex, y, yindex, __mul) # <<<<<<<<<<<<<< * * cpdef sparse_nandiv(ndarray x, SparseIndex xindex, */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = ((PyObject *)__pyx_f_6pandas_7_sparse_sparse_nancombine(__pyx_v_x, __pyx_v_xindex, __pyx_v_y, __pyx_v_yindex, __pyx_f_6pandas_7_sparse___mul)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1054; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas._sparse.sparse_nanmul", __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_7_sparse_9sparse_nanmul(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_6pandas_7_sparse_9sparse_nanmul(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_x = 0; struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_xindex = 0; PyArrayObject *__pyx_v_y = 0; struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_yindex = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("sparse_nanmul (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__x,&__pyx_n_s__xindex,&__pyx_n_s__y,&__pyx_n_s__yindex,0}; PyObject* values[4] = {0,0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__x)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__xindex)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_nanmul", 1, 4, 4, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1052; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__y)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_nanmul", 1, 4, 4, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1052; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__yindex)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_nanmul", 1, 4, 4, 3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1052; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "sparse_nanmul") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1052; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 4) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[3] = PyTuple_GET_ITEM(__pyx_args, 3); } __pyx_v_x = ((PyArrayObject *)values[0]); __pyx_v_xindex = ((struct __pyx_obj_6pandas_7_sparse_SparseIndex *)values[1]); __pyx_v_y = ((PyArrayObject *)values[2]); __pyx_v_yindex = ((struct __pyx_obj_6pandas_7_sparse_SparseIndex *)values[3]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("sparse_nanmul", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1052; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas._sparse.sparse_nanmul", __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_filename = __pyx_f[0]; __pyx_lineno = 1052; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_xindex), __pyx_ptype_6pandas_7_sparse_SparseIndex, 1, "xindex", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1052; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_y), __pyx_ptype_5numpy_ndarray, 1, "y", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1053; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_yindex), __pyx_ptype_6pandas_7_sparse_SparseIndex, 1, "yindex", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1053; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_7_sparse_8sparse_nanmul(__pyx_self, __pyx_v_x, __pyx_v_xindex, __pyx_v_y, __pyx_v_yindex); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/sparse.pyx":1052 * return sparse_nancombine(x, xindex, y, yindex, __rsub) * * cpdef sparse_nanmul(ndarray x, SparseIndex xindex, # <<<<<<<<<<<<<< * ndarray y, SparseIndex yindex): * return sparse_nancombine(x, xindex, y, yindex, __mul) */ static PyObject *__pyx_pf_6pandas_7_sparse_8sparse_nanmul(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_x, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_xindex, PyArrayObject *__pyx_v_y, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_yindex) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("sparse_nanmul", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_6pandas_7_sparse_sparse_nanmul(__pyx_v_x, __pyx_v_xindex, __pyx_v_y, __pyx_v_yindex, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1052; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas._sparse.sparse_nanmul", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/sparse.pyx":1056 * return sparse_nancombine(x, xindex, y, yindex, __mul) * * cpdef sparse_nandiv(ndarray x, SparseIndex xindex, # <<<<<<<<<<<<<< * ndarray y, SparseIndex yindex): * return sparse_nancombine(x, xindex, y, yindex, __div) */ static PyObject *__pyx_pw_6pandas_7_sparse_11sparse_nandiv(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_6pandas_7_sparse_sparse_nandiv(PyArrayObject *__pyx_v_x, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_xindex, PyArrayObject *__pyx_v_y, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_yindex, CYTHON_UNUSED int __pyx_skip_dispatch) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("sparse_nandiv", 0); /* "pandas/src/sparse.pyx":1058 * cpdef sparse_nandiv(ndarray x, SparseIndex xindex, * ndarray y, SparseIndex yindex): * return sparse_nancombine(x, xindex, y, yindex, __div) # <<<<<<<<<<<<<< * * cpdef sparse_nanrdiv(ndarray x, SparseIndex xindex, */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = ((PyObject *)__pyx_f_6pandas_7_sparse_sparse_nancombine(__pyx_v_x, __pyx_v_xindex, __pyx_v_y, __pyx_v_yindex, __pyx_f_6pandas_7_sparse___div)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1058; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas._sparse.sparse_nandiv", __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_7_sparse_11sparse_nandiv(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_6pandas_7_sparse_11sparse_nandiv(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_x = 0; struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_xindex = 0; PyArrayObject *__pyx_v_y = 0; struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_yindex = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("sparse_nandiv (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__x,&__pyx_n_s__xindex,&__pyx_n_s__y,&__pyx_n_s__yindex,0}; PyObject* values[4] = {0,0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__x)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__xindex)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_nandiv", 1, 4, 4, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1056; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__y)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_nandiv", 1, 4, 4, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1056; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__yindex)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_nandiv", 1, 4, 4, 3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1056; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "sparse_nandiv") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1056; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 4) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[3] = PyTuple_GET_ITEM(__pyx_args, 3); } __pyx_v_x = ((PyArrayObject *)values[0]); __pyx_v_xindex = ((struct __pyx_obj_6pandas_7_sparse_SparseIndex *)values[1]); __pyx_v_y = ((PyArrayObject *)values[2]); __pyx_v_yindex = ((struct __pyx_obj_6pandas_7_sparse_SparseIndex *)values[3]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("sparse_nandiv", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1056; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas._sparse.sparse_nandiv", __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_filename = __pyx_f[0]; __pyx_lineno = 1056; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_xindex), __pyx_ptype_6pandas_7_sparse_SparseIndex, 1, "xindex", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1056; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_y), __pyx_ptype_5numpy_ndarray, 1, "y", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1057; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_yindex), __pyx_ptype_6pandas_7_sparse_SparseIndex, 1, "yindex", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1057; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_7_sparse_10sparse_nandiv(__pyx_self, __pyx_v_x, __pyx_v_xindex, __pyx_v_y, __pyx_v_yindex); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/sparse.pyx":1056 * return sparse_nancombine(x, xindex, y, yindex, __mul) * * cpdef sparse_nandiv(ndarray x, SparseIndex xindex, # <<<<<<<<<<<<<< * ndarray y, SparseIndex yindex): * return sparse_nancombine(x, xindex, y, yindex, __div) */ static PyObject *__pyx_pf_6pandas_7_sparse_10sparse_nandiv(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_x, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_xindex, PyArrayObject *__pyx_v_y, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_yindex) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("sparse_nandiv", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_6pandas_7_sparse_sparse_nandiv(__pyx_v_x, __pyx_v_xindex, __pyx_v_y, __pyx_v_yindex, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1056; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas._sparse.sparse_nandiv", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/sparse.pyx":1060 * return sparse_nancombine(x, xindex, y, yindex, __div) * * cpdef sparse_nanrdiv(ndarray x, SparseIndex xindex, # <<<<<<<<<<<<<< * ndarray y, SparseIndex yindex): * return sparse_nancombine(x, xindex, y, yindex, __rdiv) */ static PyObject *__pyx_pw_6pandas_7_sparse_13sparse_nanrdiv(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_6pandas_7_sparse_sparse_nanrdiv(PyArrayObject *__pyx_v_x, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_xindex, PyArrayObject *__pyx_v_y, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_yindex, CYTHON_UNUSED int __pyx_skip_dispatch) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("sparse_nanrdiv", 0); /* "pandas/src/sparse.pyx":1062 * cpdef sparse_nanrdiv(ndarray x, SparseIndex xindex, * ndarray y, SparseIndex yindex): * return sparse_nancombine(x, xindex, y, yindex, __rdiv) # <<<<<<<<<<<<<< * * sparse_nantruediv = sparse_nandiv */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = ((PyObject *)__pyx_f_6pandas_7_sparse_sparse_nancombine(__pyx_v_x, __pyx_v_xindex, __pyx_v_y, __pyx_v_yindex, __pyx_f_6pandas_7_sparse___rdiv)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1062; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas._sparse.sparse_nanrdiv", __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_7_sparse_13sparse_nanrdiv(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_6pandas_7_sparse_13sparse_nanrdiv(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_x = 0; struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_xindex = 0; PyArrayObject *__pyx_v_y = 0; struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_yindex = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("sparse_nanrdiv (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__x,&__pyx_n_s__xindex,&__pyx_n_s__y,&__pyx_n_s__yindex,0}; PyObject* values[4] = {0,0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__x)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__xindex)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_nanrdiv", 1, 4, 4, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1060; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__y)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_nanrdiv", 1, 4, 4, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1060; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__yindex)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_nanrdiv", 1, 4, 4, 3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1060; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "sparse_nanrdiv") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1060; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 4) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[3] = PyTuple_GET_ITEM(__pyx_args, 3); } __pyx_v_x = ((PyArrayObject *)values[0]); __pyx_v_xindex = ((struct __pyx_obj_6pandas_7_sparse_SparseIndex *)values[1]); __pyx_v_y = ((PyArrayObject *)values[2]); __pyx_v_yindex = ((struct __pyx_obj_6pandas_7_sparse_SparseIndex *)values[3]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("sparse_nanrdiv", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1060; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas._sparse.sparse_nanrdiv", __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_filename = __pyx_f[0]; __pyx_lineno = 1060; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_xindex), __pyx_ptype_6pandas_7_sparse_SparseIndex, 1, "xindex", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1060; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_y), __pyx_ptype_5numpy_ndarray, 1, "y", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1061; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_yindex), __pyx_ptype_6pandas_7_sparse_SparseIndex, 1, "yindex", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1061; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_7_sparse_12sparse_nanrdiv(__pyx_self, __pyx_v_x, __pyx_v_xindex, __pyx_v_y, __pyx_v_yindex); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/sparse.pyx":1060 * return sparse_nancombine(x, xindex, y, yindex, __div) * * cpdef sparse_nanrdiv(ndarray x, SparseIndex xindex, # <<<<<<<<<<<<<< * ndarray y, SparseIndex yindex): * return sparse_nancombine(x, xindex, y, yindex, __rdiv) */ static PyObject *__pyx_pf_6pandas_7_sparse_12sparse_nanrdiv(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_x, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_xindex, PyArrayObject *__pyx_v_y, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_yindex) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("sparse_nanrdiv", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_6pandas_7_sparse_sparse_nanrdiv(__pyx_v_x, __pyx_v_xindex, __pyx_v_y, __pyx_v_yindex, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1060; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas._sparse.sparse_nanrdiv", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/sparse.pyx":1067 * sparse_nanrtruediv = sparse_nanrdiv * * cpdef sparse_nanfloordiv(ndarray x, SparseIndex xindex, # <<<<<<<<<<<<<< * ndarray y, SparseIndex yindex): * return sparse_nancombine(x, xindex, y, yindex, __floordiv) */ static PyObject *__pyx_pw_6pandas_7_sparse_15sparse_nanfloordiv(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_6pandas_7_sparse_sparse_nanfloordiv(PyArrayObject *__pyx_v_x, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_xindex, PyArrayObject *__pyx_v_y, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_yindex, CYTHON_UNUSED int __pyx_skip_dispatch) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("sparse_nanfloordiv", 0); /* "pandas/src/sparse.pyx":1069 * cpdef sparse_nanfloordiv(ndarray x, SparseIndex xindex, * ndarray y, SparseIndex yindex): * return sparse_nancombine(x, xindex, y, yindex, __floordiv) # <<<<<<<<<<<<<< * * cpdef sparse_nanrfloordiv(ndarray x, SparseIndex xindex, */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = ((PyObject *)__pyx_f_6pandas_7_sparse_sparse_nancombine(__pyx_v_x, __pyx_v_xindex, __pyx_v_y, __pyx_v_yindex, __pyx_f_6pandas_7_sparse___floordiv)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1069; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas._sparse.sparse_nanfloordiv", __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_7_sparse_15sparse_nanfloordiv(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_6pandas_7_sparse_15sparse_nanfloordiv(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_x = 0; struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_xindex = 0; PyArrayObject *__pyx_v_y = 0; struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_yindex = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("sparse_nanfloordiv (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__x,&__pyx_n_s__xindex,&__pyx_n_s__y,&__pyx_n_s__yindex,0}; PyObject* values[4] = {0,0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__x)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__xindex)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_nanfloordiv", 1, 4, 4, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1067; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__y)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_nanfloordiv", 1, 4, 4, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1067; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__yindex)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_nanfloordiv", 1, 4, 4, 3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1067; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "sparse_nanfloordiv") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1067; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 4) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[3] = PyTuple_GET_ITEM(__pyx_args, 3); } __pyx_v_x = ((PyArrayObject *)values[0]); __pyx_v_xindex = ((struct __pyx_obj_6pandas_7_sparse_SparseIndex *)values[1]); __pyx_v_y = ((PyArrayObject *)values[2]); __pyx_v_yindex = ((struct __pyx_obj_6pandas_7_sparse_SparseIndex *)values[3]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("sparse_nanfloordiv", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1067; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas._sparse.sparse_nanfloordiv", __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_filename = __pyx_f[0]; __pyx_lineno = 1067; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_xindex), __pyx_ptype_6pandas_7_sparse_SparseIndex, 1, "xindex", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1067; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_y), __pyx_ptype_5numpy_ndarray, 1, "y", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1068; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_yindex), __pyx_ptype_6pandas_7_sparse_SparseIndex, 1, "yindex", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1068; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_7_sparse_14sparse_nanfloordiv(__pyx_self, __pyx_v_x, __pyx_v_xindex, __pyx_v_y, __pyx_v_yindex); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/sparse.pyx":1067 * sparse_nanrtruediv = sparse_nanrdiv * * cpdef sparse_nanfloordiv(ndarray x, SparseIndex xindex, # <<<<<<<<<<<<<< * ndarray y, SparseIndex yindex): * return sparse_nancombine(x, xindex, y, yindex, __floordiv) */ static PyObject *__pyx_pf_6pandas_7_sparse_14sparse_nanfloordiv(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_x, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_xindex, PyArrayObject *__pyx_v_y, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_yindex) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("sparse_nanfloordiv", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_6pandas_7_sparse_sparse_nanfloordiv(__pyx_v_x, __pyx_v_xindex, __pyx_v_y, __pyx_v_yindex, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1067; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas._sparse.sparse_nanfloordiv", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/sparse.pyx":1071 * return sparse_nancombine(x, xindex, y, yindex, __floordiv) * * cpdef sparse_nanrfloordiv(ndarray x, SparseIndex xindex, # <<<<<<<<<<<<<< * ndarray y, SparseIndex yindex): * return sparse_nancombine(x, xindex, y, yindex, __rfloordiv) */ static PyObject *__pyx_pw_6pandas_7_sparse_17sparse_nanrfloordiv(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_6pandas_7_sparse_sparse_nanrfloordiv(PyArrayObject *__pyx_v_x, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_xindex, PyArrayObject *__pyx_v_y, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_yindex, CYTHON_UNUSED int __pyx_skip_dispatch) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("sparse_nanrfloordiv", 0); /* "pandas/src/sparse.pyx":1073 * cpdef sparse_nanrfloordiv(ndarray x, SparseIndex xindex, * ndarray y, SparseIndex yindex): * return sparse_nancombine(x, xindex, y, yindex, __rfloordiv) # <<<<<<<<<<<<<< * * cpdef sparse_nanpow(ndarray x, SparseIndex xindex, */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = ((PyObject *)__pyx_f_6pandas_7_sparse_sparse_nancombine(__pyx_v_x, __pyx_v_xindex, __pyx_v_y, __pyx_v_yindex, __pyx_f_6pandas_7_sparse___rfloordiv)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1073; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas._sparse.sparse_nanrfloordiv", __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_7_sparse_17sparse_nanrfloordiv(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_6pandas_7_sparse_17sparse_nanrfloordiv(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_x = 0; struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_xindex = 0; PyArrayObject *__pyx_v_y = 0; struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_yindex = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("sparse_nanrfloordiv (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__x,&__pyx_n_s__xindex,&__pyx_n_s__y,&__pyx_n_s__yindex,0}; PyObject* values[4] = {0,0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__x)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__xindex)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_nanrfloordiv", 1, 4, 4, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1071; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__y)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_nanrfloordiv", 1, 4, 4, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1071; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__yindex)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_nanrfloordiv", 1, 4, 4, 3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1071; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "sparse_nanrfloordiv") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1071; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 4) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[3] = PyTuple_GET_ITEM(__pyx_args, 3); } __pyx_v_x = ((PyArrayObject *)values[0]); __pyx_v_xindex = ((struct __pyx_obj_6pandas_7_sparse_SparseIndex *)values[1]); __pyx_v_y = ((PyArrayObject *)values[2]); __pyx_v_yindex = ((struct __pyx_obj_6pandas_7_sparse_SparseIndex *)values[3]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("sparse_nanrfloordiv", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1071; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas._sparse.sparse_nanrfloordiv", __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_filename = __pyx_f[0]; __pyx_lineno = 1071; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_xindex), __pyx_ptype_6pandas_7_sparse_SparseIndex, 1, "xindex", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1071; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_y), __pyx_ptype_5numpy_ndarray, 1, "y", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1072; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_yindex), __pyx_ptype_6pandas_7_sparse_SparseIndex, 1, "yindex", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1072; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_7_sparse_16sparse_nanrfloordiv(__pyx_self, __pyx_v_x, __pyx_v_xindex, __pyx_v_y, __pyx_v_yindex); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/sparse.pyx":1071 * return sparse_nancombine(x, xindex, y, yindex, __floordiv) * * cpdef sparse_nanrfloordiv(ndarray x, SparseIndex xindex, # <<<<<<<<<<<<<< * ndarray y, SparseIndex yindex): * return sparse_nancombine(x, xindex, y, yindex, __rfloordiv) */ static PyObject *__pyx_pf_6pandas_7_sparse_16sparse_nanrfloordiv(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_x, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_xindex, PyArrayObject *__pyx_v_y, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_yindex) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("sparse_nanrfloordiv", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_6pandas_7_sparse_sparse_nanrfloordiv(__pyx_v_x, __pyx_v_xindex, __pyx_v_y, __pyx_v_yindex, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1071; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas._sparse.sparse_nanrfloordiv", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/sparse.pyx":1075 * return sparse_nancombine(x, xindex, y, yindex, __rfloordiv) * * cpdef sparse_nanpow(ndarray x, SparseIndex xindex, # <<<<<<<<<<<<<< * ndarray y, SparseIndex yindex): * return sparse_nancombine(x, xindex, y, yindex, __pow) */ static PyObject *__pyx_pw_6pandas_7_sparse_19sparse_nanpow(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_6pandas_7_sparse_sparse_nanpow(PyArrayObject *__pyx_v_x, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_xindex, PyArrayObject *__pyx_v_y, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_yindex, CYTHON_UNUSED int __pyx_skip_dispatch) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("sparse_nanpow", 0); /* "pandas/src/sparse.pyx":1077 * cpdef sparse_nanpow(ndarray x, SparseIndex xindex, * ndarray y, SparseIndex yindex): * return sparse_nancombine(x, xindex, y, yindex, __pow) # <<<<<<<<<<<<<< * * cpdef sparse_nanrpow(ndarray x, SparseIndex xindex, */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = ((PyObject *)__pyx_f_6pandas_7_sparse_sparse_nancombine(__pyx_v_x, __pyx_v_xindex, __pyx_v_y, __pyx_v_yindex, __pyx_f_6pandas_7_sparse___pow)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1077; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas._sparse.sparse_nanpow", __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_7_sparse_19sparse_nanpow(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_6pandas_7_sparse_19sparse_nanpow(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_x = 0; struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_xindex = 0; PyArrayObject *__pyx_v_y = 0; struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_yindex = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("sparse_nanpow (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__x,&__pyx_n_s__xindex,&__pyx_n_s__y,&__pyx_n_s__yindex,0}; PyObject* values[4] = {0,0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__x)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__xindex)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_nanpow", 1, 4, 4, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1075; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__y)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_nanpow", 1, 4, 4, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1075; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__yindex)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_nanpow", 1, 4, 4, 3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1075; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "sparse_nanpow") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1075; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 4) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[3] = PyTuple_GET_ITEM(__pyx_args, 3); } __pyx_v_x = ((PyArrayObject *)values[0]); __pyx_v_xindex = ((struct __pyx_obj_6pandas_7_sparse_SparseIndex *)values[1]); __pyx_v_y = ((PyArrayObject *)values[2]); __pyx_v_yindex = ((struct __pyx_obj_6pandas_7_sparse_SparseIndex *)values[3]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("sparse_nanpow", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1075; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas._sparse.sparse_nanpow", __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_filename = __pyx_f[0]; __pyx_lineno = 1075; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_xindex), __pyx_ptype_6pandas_7_sparse_SparseIndex, 1, "xindex", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1075; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_y), __pyx_ptype_5numpy_ndarray, 1, "y", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1076; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_yindex), __pyx_ptype_6pandas_7_sparse_SparseIndex, 1, "yindex", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1076; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_7_sparse_18sparse_nanpow(__pyx_self, __pyx_v_x, __pyx_v_xindex, __pyx_v_y, __pyx_v_yindex); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/sparse.pyx":1075 * return sparse_nancombine(x, xindex, y, yindex, __rfloordiv) * * cpdef sparse_nanpow(ndarray x, SparseIndex xindex, # <<<<<<<<<<<<<< * ndarray y, SparseIndex yindex): * return sparse_nancombine(x, xindex, y, yindex, __pow) */ static PyObject *__pyx_pf_6pandas_7_sparse_18sparse_nanpow(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_x, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_xindex, PyArrayObject *__pyx_v_y, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_yindex) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("sparse_nanpow", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_6pandas_7_sparse_sparse_nanpow(__pyx_v_x, __pyx_v_xindex, __pyx_v_y, __pyx_v_yindex, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1075; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas._sparse.sparse_nanpow", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/sparse.pyx":1079 * return sparse_nancombine(x, xindex, y, yindex, __pow) * * cpdef sparse_nanrpow(ndarray x, SparseIndex xindex, # <<<<<<<<<<<<<< * ndarray y, SparseIndex yindex): * return sparse_nancombine(x, xindex, y, yindex, __rpow) */ static PyObject *__pyx_pw_6pandas_7_sparse_21sparse_nanrpow(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_6pandas_7_sparse_sparse_nanrpow(PyArrayObject *__pyx_v_x, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_xindex, PyArrayObject *__pyx_v_y, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_yindex, CYTHON_UNUSED int __pyx_skip_dispatch) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("sparse_nanrpow", 0); /* "pandas/src/sparse.pyx":1081 * cpdef sparse_nanrpow(ndarray x, SparseIndex xindex, * ndarray y, SparseIndex yindex): * return sparse_nancombine(x, xindex, y, yindex, __rpow) # <<<<<<<<<<<<<< * * cpdef sparse_add(ndarray x, SparseIndex xindex, float64_t xfill, */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = ((PyObject *)__pyx_f_6pandas_7_sparse_sparse_nancombine(__pyx_v_x, __pyx_v_xindex, __pyx_v_y, __pyx_v_yindex, __pyx_f_6pandas_7_sparse___rpow)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1081; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas._sparse.sparse_nanrpow", __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_7_sparse_21sparse_nanrpow(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_6pandas_7_sparse_21sparse_nanrpow(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_x = 0; struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_xindex = 0; PyArrayObject *__pyx_v_y = 0; struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_yindex = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("sparse_nanrpow (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__x,&__pyx_n_s__xindex,&__pyx_n_s__y,&__pyx_n_s__yindex,0}; PyObject* values[4] = {0,0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__x)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__xindex)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_nanrpow", 1, 4, 4, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1079; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__y)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_nanrpow", 1, 4, 4, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1079; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__yindex)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_nanrpow", 1, 4, 4, 3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1079; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "sparse_nanrpow") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1079; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 4) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[3] = PyTuple_GET_ITEM(__pyx_args, 3); } __pyx_v_x = ((PyArrayObject *)values[0]); __pyx_v_xindex = ((struct __pyx_obj_6pandas_7_sparse_SparseIndex *)values[1]); __pyx_v_y = ((PyArrayObject *)values[2]); __pyx_v_yindex = ((struct __pyx_obj_6pandas_7_sparse_SparseIndex *)values[3]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("sparse_nanrpow", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1079; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas._sparse.sparse_nanrpow", __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_filename = __pyx_f[0]; __pyx_lineno = 1079; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_xindex), __pyx_ptype_6pandas_7_sparse_SparseIndex, 1, "xindex", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1079; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_y), __pyx_ptype_5numpy_ndarray, 1, "y", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1080; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_yindex), __pyx_ptype_6pandas_7_sparse_SparseIndex, 1, "yindex", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1080; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_7_sparse_20sparse_nanrpow(__pyx_self, __pyx_v_x, __pyx_v_xindex, __pyx_v_y, __pyx_v_yindex); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/sparse.pyx":1079 * return sparse_nancombine(x, xindex, y, yindex, __pow) * * cpdef sparse_nanrpow(ndarray x, SparseIndex xindex, # <<<<<<<<<<<<<< * ndarray y, SparseIndex yindex): * return sparse_nancombine(x, xindex, y, yindex, __rpow) */ static PyObject *__pyx_pf_6pandas_7_sparse_20sparse_nanrpow(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_x, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_xindex, PyArrayObject *__pyx_v_y, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_yindex) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("sparse_nanrpow", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_6pandas_7_sparse_sparse_nanrpow(__pyx_v_x, __pyx_v_xindex, __pyx_v_y, __pyx_v_yindex, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1079; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas._sparse.sparse_nanrpow", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/sparse.pyx":1083 * return sparse_nancombine(x, xindex, y, yindex, __rpow) * * cpdef sparse_add(ndarray x, SparseIndex xindex, float64_t xfill, # <<<<<<<<<<<<<< * ndarray y, SparseIndex yindex, float64_t yfill): * return sparse_combine(x, xindex, xfill, */ static PyObject *__pyx_pw_6pandas_7_sparse_23sparse_add(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_6pandas_7_sparse_sparse_add(PyArrayObject *__pyx_v_x, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_xindex, __pyx_t_5numpy_float64_t __pyx_v_xfill, PyArrayObject *__pyx_v_y, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_yindex, __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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("sparse_add", 0); /* "pandas/src/sparse.pyx":1085 * cpdef sparse_add(ndarray x, SparseIndex xindex, float64_t xfill, * ndarray y, SparseIndex yindex, float64_t yfill): * return sparse_combine(x, xindex, xfill, # <<<<<<<<<<<<<< * y, yindex, yfill, __add) * */ __Pyx_XDECREF(__pyx_r); /* "pandas/src/sparse.pyx":1086 * ndarray y, SparseIndex yindex, float64_t yfill): * return sparse_combine(x, xindex, xfill, * y, yindex, yfill, __add) # <<<<<<<<<<<<<< * * cpdef sparse_sub(ndarray x, SparseIndex xindex, float64_t xfill, */ __pyx_t_1 = ((PyObject *)__pyx_f_6pandas_7_sparse_sparse_combine(__pyx_v_x, __pyx_v_xindex, __pyx_v_xfill, __pyx_v_y, __pyx_v_yindex, __pyx_v_yfill, __pyx_f_6pandas_7_sparse___add)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1085; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas._sparse.sparse_add", __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_7_sparse_23sparse_add(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_6pandas_7_sparse_23sparse_add(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_x = 0; struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_xindex = 0; __pyx_t_5numpy_float64_t __pyx_v_xfill; PyArrayObject *__pyx_v_y = 0; struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_yindex = 0; __pyx_t_5numpy_float64_t __pyx_v_yfill; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("sparse_add (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); case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__x)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__xindex)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_add", 1, 6, 6, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1083; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__xfill)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_add", 1, 6, 6, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1083; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__y)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_add", 1, 6, 6, 3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1083; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 4: if (likely((values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__yindex)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_add", 1, 6, 6, 4); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1083; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 5: if (likely((values[5] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__yfill)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_add", 1, 6, 6, 5); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1083; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "sparse_add") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1083; __pyx_clineno = __LINE__; goto __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_7_sparse_SparseIndex *)values[1]); __pyx_v_xfill = __pyx_PyFloat_AsDouble(values[2]); if (unlikely((__pyx_v_xfill == (npy_float64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1083; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_y = ((PyArrayObject *)values[3]); __pyx_v_yindex = ((struct __pyx_obj_6pandas_7_sparse_SparseIndex *)values[4]); __pyx_v_yfill = __pyx_PyFloat_AsDouble(values[5]); if (unlikely((__pyx_v_yfill == (npy_float64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1084; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("sparse_add", 1, 6, 6, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1083; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas._sparse.sparse_add", __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_filename = __pyx_f[0]; __pyx_lineno = 1083; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_xindex), __pyx_ptype_6pandas_7_sparse_SparseIndex, 1, "xindex", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1083; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_y), __pyx_ptype_5numpy_ndarray, 1, "y", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1084; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_yindex), __pyx_ptype_6pandas_7_sparse_SparseIndex, 1, "yindex", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1084; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_7_sparse_22sparse_add(__pyx_self, __pyx_v_x, __pyx_v_xindex, __pyx_v_xfill, __pyx_v_y, __pyx_v_yindex, __pyx_v_yfill); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/sparse.pyx":1083 * return sparse_nancombine(x, xindex, y, yindex, __rpow) * * cpdef sparse_add(ndarray x, SparseIndex xindex, float64_t xfill, # <<<<<<<<<<<<<< * ndarray y, SparseIndex yindex, float64_t yfill): * return sparse_combine(x, xindex, xfill, */ static PyObject *__pyx_pf_6pandas_7_sparse_22sparse_add(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_x, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_xindex, __pyx_t_5numpy_float64_t __pyx_v_xfill, PyArrayObject *__pyx_v_y, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_yindex, __pyx_t_5numpy_float64_t __pyx_v_yfill) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("sparse_add", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_6pandas_7_sparse_sparse_add(__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_filename = __pyx_f[0]; __pyx_lineno = 1083; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas._sparse.sparse_add", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/sparse.pyx":1088 * y, yindex, yfill, __add) * * cpdef sparse_sub(ndarray x, SparseIndex xindex, float64_t xfill, # <<<<<<<<<<<<<< * ndarray y, SparseIndex yindex, float64_t yfill): * return sparse_combine(x, xindex, xfill, */ static PyObject *__pyx_pw_6pandas_7_sparse_25sparse_sub(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_6pandas_7_sparse_sparse_sub(PyArrayObject *__pyx_v_x, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_xindex, __pyx_t_5numpy_float64_t __pyx_v_xfill, PyArrayObject *__pyx_v_y, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_yindex, __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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("sparse_sub", 0); /* "pandas/src/sparse.pyx":1090 * cpdef sparse_sub(ndarray x, SparseIndex xindex, float64_t xfill, * ndarray y, SparseIndex yindex, float64_t yfill): * return sparse_combine(x, xindex, xfill, # <<<<<<<<<<<<<< * y, yindex, yfill, __sub) * */ __Pyx_XDECREF(__pyx_r); /* "pandas/src/sparse.pyx":1091 * ndarray y, SparseIndex yindex, float64_t yfill): * return sparse_combine(x, xindex, xfill, * y, yindex, yfill, __sub) # <<<<<<<<<<<<<< * * cpdef sparse_rsub(ndarray x, SparseIndex xindex, float64_t xfill, */ __pyx_t_1 = ((PyObject *)__pyx_f_6pandas_7_sparse_sparse_combine(__pyx_v_x, __pyx_v_xindex, __pyx_v_xfill, __pyx_v_y, __pyx_v_yindex, __pyx_v_yfill, __pyx_f_6pandas_7_sparse___sub)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1090; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas._sparse.sparse_sub", __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_7_sparse_25sparse_sub(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_6pandas_7_sparse_25sparse_sub(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_x = 0; struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_xindex = 0; __pyx_t_5numpy_float64_t __pyx_v_xfill; PyArrayObject *__pyx_v_y = 0; struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_yindex = 0; __pyx_t_5numpy_float64_t __pyx_v_yfill; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("sparse_sub (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); case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__x)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__xindex)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_sub", 1, 6, 6, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1088; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__xfill)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_sub", 1, 6, 6, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1088; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__y)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_sub", 1, 6, 6, 3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1088; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 4: if (likely((values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__yindex)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_sub", 1, 6, 6, 4); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1088; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 5: if (likely((values[5] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__yfill)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_sub", 1, 6, 6, 5); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1088; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "sparse_sub") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1088; __pyx_clineno = __LINE__; goto __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_7_sparse_SparseIndex *)values[1]); __pyx_v_xfill = __pyx_PyFloat_AsDouble(values[2]); if (unlikely((__pyx_v_xfill == (npy_float64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1088; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_y = ((PyArrayObject *)values[3]); __pyx_v_yindex = ((struct __pyx_obj_6pandas_7_sparse_SparseIndex *)values[4]); __pyx_v_yfill = __pyx_PyFloat_AsDouble(values[5]); if (unlikely((__pyx_v_yfill == (npy_float64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1089; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("sparse_sub", 1, 6, 6, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1088; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas._sparse.sparse_sub", __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_filename = __pyx_f[0]; __pyx_lineno = 1088; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_xindex), __pyx_ptype_6pandas_7_sparse_SparseIndex, 1, "xindex", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1088; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_y), __pyx_ptype_5numpy_ndarray, 1, "y", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1089; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_yindex), __pyx_ptype_6pandas_7_sparse_SparseIndex, 1, "yindex", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1089; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_7_sparse_24sparse_sub(__pyx_self, __pyx_v_x, __pyx_v_xindex, __pyx_v_xfill, __pyx_v_y, __pyx_v_yindex, __pyx_v_yfill); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/sparse.pyx":1088 * y, yindex, yfill, __add) * * cpdef sparse_sub(ndarray x, SparseIndex xindex, float64_t xfill, # <<<<<<<<<<<<<< * ndarray y, SparseIndex yindex, float64_t yfill): * return sparse_combine(x, xindex, xfill, */ static PyObject *__pyx_pf_6pandas_7_sparse_24sparse_sub(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_x, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_xindex, __pyx_t_5numpy_float64_t __pyx_v_xfill, PyArrayObject *__pyx_v_y, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_yindex, __pyx_t_5numpy_float64_t __pyx_v_yfill) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("sparse_sub", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_6pandas_7_sparse_sparse_sub(__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_filename = __pyx_f[0]; __pyx_lineno = 1088; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas._sparse.sparse_sub", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/sparse.pyx":1093 * y, yindex, yfill, __sub) * * cpdef sparse_rsub(ndarray x, SparseIndex xindex, float64_t xfill, # <<<<<<<<<<<<<< * ndarray y, SparseIndex yindex, float64_t yfill): * return sparse_combine(x, xindex, xfill, */ static PyObject *__pyx_pw_6pandas_7_sparse_27sparse_rsub(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_6pandas_7_sparse_sparse_rsub(PyArrayObject *__pyx_v_x, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_xindex, __pyx_t_5numpy_float64_t __pyx_v_xfill, PyArrayObject *__pyx_v_y, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_yindex, __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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("sparse_rsub", 0); /* "pandas/src/sparse.pyx":1095 * cpdef sparse_rsub(ndarray x, SparseIndex xindex, float64_t xfill, * ndarray y, SparseIndex yindex, float64_t yfill): * return sparse_combine(x, xindex, xfill, # <<<<<<<<<<<<<< * y, yindex, yfill, __rsub) * */ __Pyx_XDECREF(__pyx_r); /* "pandas/src/sparse.pyx":1096 * ndarray y, SparseIndex yindex, float64_t yfill): * return sparse_combine(x, xindex, xfill, * y, yindex, yfill, __rsub) # <<<<<<<<<<<<<< * * cpdef sparse_mul(ndarray x, SparseIndex xindex, float64_t xfill, */ __pyx_t_1 = ((PyObject *)__pyx_f_6pandas_7_sparse_sparse_combine(__pyx_v_x, __pyx_v_xindex, __pyx_v_xfill, __pyx_v_y, __pyx_v_yindex, __pyx_v_yfill, __pyx_f_6pandas_7_sparse___rsub)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1095; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas._sparse.sparse_rsub", __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_7_sparse_27sparse_rsub(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_6pandas_7_sparse_27sparse_rsub(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_x = 0; struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_xindex = 0; __pyx_t_5numpy_float64_t __pyx_v_xfill; PyArrayObject *__pyx_v_y = 0; struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_yindex = 0; __pyx_t_5numpy_float64_t __pyx_v_yfill; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("sparse_rsub (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); case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__x)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__xindex)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_rsub", 1, 6, 6, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1093; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__xfill)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_rsub", 1, 6, 6, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1093; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__y)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_rsub", 1, 6, 6, 3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1093; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 4: if (likely((values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__yindex)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_rsub", 1, 6, 6, 4); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1093; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 5: if (likely((values[5] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__yfill)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_rsub", 1, 6, 6, 5); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1093; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "sparse_rsub") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1093; __pyx_clineno = __LINE__; goto __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_7_sparse_SparseIndex *)values[1]); __pyx_v_xfill = __pyx_PyFloat_AsDouble(values[2]); if (unlikely((__pyx_v_xfill == (npy_float64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1093; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_y = ((PyArrayObject *)values[3]); __pyx_v_yindex = ((struct __pyx_obj_6pandas_7_sparse_SparseIndex *)values[4]); __pyx_v_yfill = __pyx_PyFloat_AsDouble(values[5]); if (unlikely((__pyx_v_yfill == (npy_float64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1094; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("sparse_rsub", 1, 6, 6, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1093; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas._sparse.sparse_rsub", __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_filename = __pyx_f[0]; __pyx_lineno = 1093; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_xindex), __pyx_ptype_6pandas_7_sparse_SparseIndex, 1, "xindex", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1093; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_y), __pyx_ptype_5numpy_ndarray, 1, "y", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1094; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_yindex), __pyx_ptype_6pandas_7_sparse_SparseIndex, 1, "yindex", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1094; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_7_sparse_26sparse_rsub(__pyx_self, __pyx_v_x, __pyx_v_xindex, __pyx_v_xfill, __pyx_v_y, __pyx_v_yindex, __pyx_v_yfill); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/sparse.pyx":1093 * y, yindex, yfill, __sub) * * cpdef sparse_rsub(ndarray x, SparseIndex xindex, float64_t xfill, # <<<<<<<<<<<<<< * ndarray y, SparseIndex yindex, float64_t yfill): * return sparse_combine(x, xindex, xfill, */ static PyObject *__pyx_pf_6pandas_7_sparse_26sparse_rsub(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_x, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_xindex, __pyx_t_5numpy_float64_t __pyx_v_xfill, PyArrayObject *__pyx_v_y, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_yindex, __pyx_t_5numpy_float64_t __pyx_v_yfill) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("sparse_rsub", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_6pandas_7_sparse_sparse_rsub(__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_filename = __pyx_f[0]; __pyx_lineno = 1093; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas._sparse.sparse_rsub", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/sparse.pyx":1098 * y, yindex, yfill, __rsub) * * cpdef sparse_mul(ndarray x, SparseIndex xindex, float64_t xfill, # <<<<<<<<<<<<<< * ndarray y, SparseIndex yindex, float64_t yfill): * return sparse_combine(x, xindex, xfill, */ static PyObject *__pyx_pw_6pandas_7_sparse_29sparse_mul(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_6pandas_7_sparse_sparse_mul(PyArrayObject *__pyx_v_x, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_xindex, __pyx_t_5numpy_float64_t __pyx_v_xfill, PyArrayObject *__pyx_v_y, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_yindex, __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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("sparse_mul", 0); /* "pandas/src/sparse.pyx":1100 * cpdef sparse_mul(ndarray x, SparseIndex xindex, float64_t xfill, * ndarray y, SparseIndex yindex, float64_t yfill): * return sparse_combine(x, xindex, xfill, # <<<<<<<<<<<<<< * y, yindex, yfill, __mul) * */ __Pyx_XDECREF(__pyx_r); /* "pandas/src/sparse.pyx":1101 * ndarray y, SparseIndex yindex, float64_t yfill): * return sparse_combine(x, xindex, xfill, * y, yindex, yfill, __mul) # <<<<<<<<<<<<<< * * cpdef sparse_div(ndarray x, SparseIndex xindex, float64_t xfill, */ __pyx_t_1 = ((PyObject *)__pyx_f_6pandas_7_sparse_sparse_combine(__pyx_v_x, __pyx_v_xindex, __pyx_v_xfill, __pyx_v_y, __pyx_v_yindex, __pyx_v_yfill, __pyx_f_6pandas_7_sparse___mul)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1100; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas._sparse.sparse_mul", __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_7_sparse_29sparse_mul(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_6pandas_7_sparse_29sparse_mul(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_x = 0; struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_xindex = 0; __pyx_t_5numpy_float64_t __pyx_v_xfill; PyArrayObject *__pyx_v_y = 0; struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_yindex = 0; __pyx_t_5numpy_float64_t __pyx_v_yfill; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("sparse_mul (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); case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__x)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__xindex)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_mul", 1, 6, 6, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1098; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__xfill)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_mul", 1, 6, 6, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1098; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__y)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_mul", 1, 6, 6, 3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1098; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 4: if (likely((values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__yindex)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_mul", 1, 6, 6, 4); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1098; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 5: if (likely((values[5] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__yfill)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_mul", 1, 6, 6, 5); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1098; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "sparse_mul") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1098; __pyx_clineno = __LINE__; goto __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_7_sparse_SparseIndex *)values[1]); __pyx_v_xfill = __pyx_PyFloat_AsDouble(values[2]); if (unlikely((__pyx_v_xfill == (npy_float64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1098; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_y = ((PyArrayObject *)values[3]); __pyx_v_yindex = ((struct __pyx_obj_6pandas_7_sparse_SparseIndex *)values[4]); __pyx_v_yfill = __pyx_PyFloat_AsDouble(values[5]); if (unlikely((__pyx_v_yfill == (npy_float64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1099; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("sparse_mul", 1, 6, 6, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1098; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas._sparse.sparse_mul", __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_filename = __pyx_f[0]; __pyx_lineno = 1098; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_xindex), __pyx_ptype_6pandas_7_sparse_SparseIndex, 1, "xindex", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1098; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_y), __pyx_ptype_5numpy_ndarray, 1, "y", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1099; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_yindex), __pyx_ptype_6pandas_7_sparse_SparseIndex, 1, "yindex", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1099; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_7_sparse_28sparse_mul(__pyx_self, __pyx_v_x, __pyx_v_xindex, __pyx_v_xfill, __pyx_v_y, __pyx_v_yindex, __pyx_v_yfill); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/sparse.pyx":1098 * y, yindex, yfill, __rsub) * * cpdef sparse_mul(ndarray x, SparseIndex xindex, float64_t xfill, # <<<<<<<<<<<<<< * ndarray y, SparseIndex yindex, float64_t yfill): * return sparse_combine(x, xindex, xfill, */ static PyObject *__pyx_pf_6pandas_7_sparse_28sparse_mul(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_x, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_xindex, __pyx_t_5numpy_float64_t __pyx_v_xfill, PyArrayObject *__pyx_v_y, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_yindex, __pyx_t_5numpy_float64_t __pyx_v_yfill) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("sparse_mul", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_6pandas_7_sparse_sparse_mul(__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_filename = __pyx_f[0]; __pyx_lineno = 1098; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas._sparse.sparse_mul", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/sparse.pyx":1103 * y, yindex, yfill, __mul) * * cpdef sparse_div(ndarray x, SparseIndex xindex, float64_t xfill, # <<<<<<<<<<<<<< * ndarray y, SparseIndex yindex, float64_t yfill): * return sparse_combine(x, xindex, xfill, */ static PyObject *__pyx_pw_6pandas_7_sparse_31sparse_div(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_6pandas_7_sparse_sparse_div(PyArrayObject *__pyx_v_x, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_xindex, __pyx_t_5numpy_float64_t __pyx_v_xfill, PyArrayObject *__pyx_v_y, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_yindex, __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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("sparse_div", 0); /* "pandas/src/sparse.pyx":1105 * cpdef sparse_div(ndarray x, SparseIndex xindex, float64_t xfill, * ndarray y, SparseIndex yindex, float64_t yfill): * return sparse_combine(x, xindex, xfill, # <<<<<<<<<<<<<< * y, yindex, yfill, __div) * */ __Pyx_XDECREF(__pyx_r); /* "pandas/src/sparse.pyx":1106 * ndarray y, SparseIndex yindex, float64_t yfill): * return sparse_combine(x, xindex, xfill, * y, yindex, yfill, __div) # <<<<<<<<<<<<<< * * cpdef sparse_rdiv(ndarray x, SparseIndex xindex, float64_t xfill, */ __pyx_t_1 = ((PyObject *)__pyx_f_6pandas_7_sparse_sparse_combine(__pyx_v_x, __pyx_v_xindex, __pyx_v_xfill, __pyx_v_y, __pyx_v_yindex, __pyx_v_yfill, __pyx_f_6pandas_7_sparse___div)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1105; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas._sparse.sparse_div", __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_7_sparse_31sparse_div(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_6pandas_7_sparse_31sparse_div(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_x = 0; struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_xindex = 0; __pyx_t_5numpy_float64_t __pyx_v_xfill; PyArrayObject *__pyx_v_y = 0; struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_yindex = 0; __pyx_t_5numpy_float64_t __pyx_v_yfill; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("sparse_div (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); case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__x)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__xindex)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_div", 1, 6, 6, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1103; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__xfill)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_div", 1, 6, 6, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1103; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__y)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_div", 1, 6, 6, 3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1103; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 4: if (likely((values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__yindex)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_div", 1, 6, 6, 4); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1103; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 5: if (likely((values[5] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__yfill)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_div", 1, 6, 6, 5); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1103; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "sparse_div") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1103; __pyx_clineno = __LINE__; goto __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_7_sparse_SparseIndex *)values[1]); __pyx_v_xfill = __pyx_PyFloat_AsDouble(values[2]); if (unlikely((__pyx_v_xfill == (npy_float64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1103; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_y = ((PyArrayObject *)values[3]); __pyx_v_yindex = ((struct __pyx_obj_6pandas_7_sparse_SparseIndex *)values[4]); __pyx_v_yfill = __pyx_PyFloat_AsDouble(values[5]); if (unlikely((__pyx_v_yfill == (npy_float64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1104; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("sparse_div", 1, 6, 6, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1103; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas._sparse.sparse_div", __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_filename = __pyx_f[0]; __pyx_lineno = 1103; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_xindex), __pyx_ptype_6pandas_7_sparse_SparseIndex, 1, "xindex", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1103; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_y), __pyx_ptype_5numpy_ndarray, 1, "y", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1104; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_yindex), __pyx_ptype_6pandas_7_sparse_SparseIndex, 1, "yindex", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1104; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_7_sparse_30sparse_div(__pyx_self, __pyx_v_x, __pyx_v_xindex, __pyx_v_xfill, __pyx_v_y, __pyx_v_yindex, __pyx_v_yfill); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/sparse.pyx":1103 * y, yindex, yfill, __mul) * * cpdef sparse_div(ndarray x, SparseIndex xindex, float64_t xfill, # <<<<<<<<<<<<<< * ndarray y, SparseIndex yindex, float64_t yfill): * return sparse_combine(x, xindex, xfill, */ static PyObject *__pyx_pf_6pandas_7_sparse_30sparse_div(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_x, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_xindex, __pyx_t_5numpy_float64_t __pyx_v_xfill, PyArrayObject *__pyx_v_y, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_yindex, __pyx_t_5numpy_float64_t __pyx_v_yfill) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("sparse_div", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_6pandas_7_sparse_sparse_div(__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_filename = __pyx_f[0]; __pyx_lineno = 1103; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas._sparse.sparse_div", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/sparse.pyx":1108 * y, yindex, yfill, __div) * * cpdef sparse_rdiv(ndarray x, SparseIndex xindex, float64_t xfill, # <<<<<<<<<<<<<< * ndarray y, SparseIndex yindex, float64_t yfill): * return sparse_combine(x, xindex, xfill, */ static PyObject *__pyx_pw_6pandas_7_sparse_33sparse_rdiv(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_6pandas_7_sparse_sparse_rdiv(PyArrayObject *__pyx_v_x, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_xindex, __pyx_t_5numpy_float64_t __pyx_v_xfill, PyArrayObject *__pyx_v_y, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_yindex, __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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("sparse_rdiv", 0); /* "pandas/src/sparse.pyx":1110 * cpdef sparse_rdiv(ndarray x, SparseIndex xindex, float64_t xfill, * ndarray y, SparseIndex yindex, float64_t yfill): * return sparse_combine(x, xindex, xfill, # <<<<<<<<<<<<<< * y, yindex, yfill, __rdiv) * */ __Pyx_XDECREF(__pyx_r); /* "pandas/src/sparse.pyx":1111 * ndarray y, SparseIndex yindex, float64_t yfill): * return sparse_combine(x, xindex, xfill, * y, yindex, yfill, __rdiv) # <<<<<<<<<<<<<< * * sparse_truediv = sparse_div */ __pyx_t_1 = ((PyObject *)__pyx_f_6pandas_7_sparse_sparse_combine(__pyx_v_x, __pyx_v_xindex, __pyx_v_xfill, __pyx_v_y, __pyx_v_yindex, __pyx_v_yfill, __pyx_f_6pandas_7_sparse___rdiv)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1110; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas._sparse.sparse_rdiv", __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_7_sparse_33sparse_rdiv(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_6pandas_7_sparse_33sparse_rdiv(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_x = 0; struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_xindex = 0; __pyx_t_5numpy_float64_t __pyx_v_xfill; PyArrayObject *__pyx_v_y = 0; struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_yindex = 0; __pyx_t_5numpy_float64_t __pyx_v_yfill; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("sparse_rdiv (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); case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__x)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__xindex)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_rdiv", 1, 6, 6, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1108; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__xfill)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_rdiv", 1, 6, 6, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1108; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__y)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_rdiv", 1, 6, 6, 3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1108; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 4: if (likely((values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__yindex)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_rdiv", 1, 6, 6, 4); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1108; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 5: if (likely((values[5] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__yfill)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_rdiv", 1, 6, 6, 5); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1108; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "sparse_rdiv") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1108; __pyx_clineno = __LINE__; goto __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_7_sparse_SparseIndex *)values[1]); __pyx_v_xfill = __pyx_PyFloat_AsDouble(values[2]); if (unlikely((__pyx_v_xfill == (npy_float64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1108; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_y = ((PyArrayObject *)values[3]); __pyx_v_yindex = ((struct __pyx_obj_6pandas_7_sparse_SparseIndex *)values[4]); __pyx_v_yfill = __pyx_PyFloat_AsDouble(values[5]); if (unlikely((__pyx_v_yfill == (npy_float64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1109; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("sparse_rdiv", 1, 6, 6, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1108; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas._sparse.sparse_rdiv", __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_filename = __pyx_f[0]; __pyx_lineno = 1108; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_xindex), __pyx_ptype_6pandas_7_sparse_SparseIndex, 1, "xindex", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1108; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_y), __pyx_ptype_5numpy_ndarray, 1, "y", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1109; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_yindex), __pyx_ptype_6pandas_7_sparse_SparseIndex, 1, "yindex", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1109; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_7_sparse_32sparse_rdiv(__pyx_self, __pyx_v_x, __pyx_v_xindex, __pyx_v_xfill, __pyx_v_y, __pyx_v_yindex, __pyx_v_yfill); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/sparse.pyx":1108 * y, yindex, yfill, __div) * * cpdef sparse_rdiv(ndarray x, SparseIndex xindex, float64_t xfill, # <<<<<<<<<<<<<< * ndarray y, SparseIndex yindex, float64_t yfill): * return sparse_combine(x, xindex, xfill, */ static PyObject *__pyx_pf_6pandas_7_sparse_32sparse_rdiv(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_x, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_xindex, __pyx_t_5numpy_float64_t __pyx_v_xfill, PyArrayObject *__pyx_v_y, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_yindex, __pyx_t_5numpy_float64_t __pyx_v_yfill) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("sparse_rdiv", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_6pandas_7_sparse_sparse_rdiv(__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_filename = __pyx_f[0]; __pyx_lineno = 1108; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas._sparse.sparse_rdiv", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/sparse.pyx":1116 * sparse_rtruediv = sparse_rdiv * * cpdef sparse_floordiv(ndarray x, SparseIndex xindex, float64_t xfill, # <<<<<<<<<<<<<< * ndarray y, SparseIndex yindex, float64_t yfill): * return sparse_combine(x, xindex, xfill, */ static PyObject *__pyx_pw_6pandas_7_sparse_35sparse_floordiv(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_6pandas_7_sparse_sparse_floordiv(PyArrayObject *__pyx_v_x, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_xindex, __pyx_t_5numpy_float64_t __pyx_v_xfill, PyArrayObject *__pyx_v_y, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_yindex, __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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("sparse_floordiv", 0); /* "pandas/src/sparse.pyx":1118 * cpdef sparse_floordiv(ndarray x, SparseIndex xindex, float64_t xfill, * ndarray y, SparseIndex yindex, float64_t yfill): * return sparse_combine(x, xindex, xfill, # <<<<<<<<<<<<<< * y, yindex, yfill, __floordiv) * */ __Pyx_XDECREF(__pyx_r); /* "pandas/src/sparse.pyx":1119 * ndarray y, SparseIndex yindex, float64_t yfill): * return sparse_combine(x, xindex, xfill, * y, yindex, yfill, __floordiv) # <<<<<<<<<<<<<< * * cpdef sparse_rfloordiv(ndarray x, SparseIndex xindex, float64_t xfill, */ __pyx_t_1 = ((PyObject *)__pyx_f_6pandas_7_sparse_sparse_combine(__pyx_v_x, __pyx_v_xindex, __pyx_v_xfill, __pyx_v_y, __pyx_v_yindex, __pyx_v_yfill, __pyx_f_6pandas_7_sparse___floordiv)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1118; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas._sparse.sparse_floordiv", __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_7_sparse_35sparse_floordiv(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_6pandas_7_sparse_35sparse_floordiv(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_x = 0; struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_xindex = 0; __pyx_t_5numpy_float64_t __pyx_v_xfill; PyArrayObject *__pyx_v_y = 0; struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_yindex = 0; __pyx_t_5numpy_float64_t __pyx_v_yfill; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("sparse_floordiv (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); case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__x)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__xindex)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_floordiv", 1, 6, 6, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1116; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__xfill)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_floordiv", 1, 6, 6, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1116; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__y)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_floordiv", 1, 6, 6, 3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1116; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 4: if (likely((values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__yindex)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_floordiv", 1, 6, 6, 4); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1116; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 5: if (likely((values[5] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__yfill)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_floordiv", 1, 6, 6, 5); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1116; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "sparse_floordiv") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1116; __pyx_clineno = __LINE__; goto __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_7_sparse_SparseIndex *)values[1]); __pyx_v_xfill = __pyx_PyFloat_AsDouble(values[2]); if (unlikely((__pyx_v_xfill == (npy_float64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1116; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_y = ((PyArrayObject *)values[3]); __pyx_v_yindex = ((struct __pyx_obj_6pandas_7_sparse_SparseIndex *)values[4]); __pyx_v_yfill = __pyx_PyFloat_AsDouble(values[5]); if (unlikely((__pyx_v_yfill == (npy_float64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1117; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("sparse_floordiv", 1, 6, 6, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1116; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas._sparse.sparse_floordiv", __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_filename = __pyx_f[0]; __pyx_lineno = 1116; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_xindex), __pyx_ptype_6pandas_7_sparse_SparseIndex, 1, "xindex", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1116; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_y), __pyx_ptype_5numpy_ndarray, 1, "y", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1117; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_yindex), __pyx_ptype_6pandas_7_sparse_SparseIndex, 1, "yindex", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1117; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_7_sparse_34sparse_floordiv(__pyx_self, __pyx_v_x, __pyx_v_xindex, __pyx_v_xfill, __pyx_v_y, __pyx_v_yindex, __pyx_v_yfill); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/sparse.pyx":1116 * sparse_rtruediv = sparse_rdiv * * cpdef sparse_floordiv(ndarray x, SparseIndex xindex, float64_t xfill, # <<<<<<<<<<<<<< * ndarray y, SparseIndex yindex, float64_t yfill): * return sparse_combine(x, xindex, xfill, */ static PyObject *__pyx_pf_6pandas_7_sparse_34sparse_floordiv(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_x, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_xindex, __pyx_t_5numpy_float64_t __pyx_v_xfill, PyArrayObject *__pyx_v_y, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_yindex, __pyx_t_5numpy_float64_t __pyx_v_yfill) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("sparse_floordiv", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_6pandas_7_sparse_sparse_floordiv(__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_filename = __pyx_f[0]; __pyx_lineno = 1116; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas._sparse.sparse_floordiv", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/sparse.pyx":1121 * y, yindex, yfill, __floordiv) * * cpdef sparse_rfloordiv(ndarray x, SparseIndex xindex, float64_t xfill, # <<<<<<<<<<<<<< * ndarray y, SparseIndex yindex, float64_t yfill): * return sparse_combine(x, xindex, xfill, */ static PyObject *__pyx_pw_6pandas_7_sparse_37sparse_rfloordiv(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_6pandas_7_sparse_sparse_rfloordiv(PyArrayObject *__pyx_v_x, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_xindex, __pyx_t_5numpy_float64_t __pyx_v_xfill, PyArrayObject *__pyx_v_y, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_yindex, __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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("sparse_rfloordiv", 0); /* "pandas/src/sparse.pyx":1123 * cpdef sparse_rfloordiv(ndarray x, SparseIndex xindex, float64_t xfill, * ndarray y, SparseIndex yindex, float64_t yfill): * return sparse_combine(x, xindex, xfill, # <<<<<<<<<<<<<< * y, yindex, yfill, __rfloordiv) * */ __Pyx_XDECREF(__pyx_r); /* "pandas/src/sparse.pyx":1124 * ndarray y, SparseIndex yindex, float64_t yfill): * return sparse_combine(x, xindex, xfill, * y, yindex, yfill, __rfloordiv) # <<<<<<<<<<<<<< * * cpdef sparse_pow(ndarray x, SparseIndex xindex, float64_t xfill, */ __pyx_t_1 = ((PyObject *)__pyx_f_6pandas_7_sparse_sparse_combine(__pyx_v_x, __pyx_v_xindex, __pyx_v_xfill, __pyx_v_y, __pyx_v_yindex, __pyx_v_yfill, __pyx_f_6pandas_7_sparse___rfloordiv)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1123; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas._sparse.sparse_rfloordiv", __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_7_sparse_37sparse_rfloordiv(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_6pandas_7_sparse_37sparse_rfloordiv(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_x = 0; struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_xindex = 0; __pyx_t_5numpy_float64_t __pyx_v_xfill; PyArrayObject *__pyx_v_y = 0; struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_yindex = 0; __pyx_t_5numpy_float64_t __pyx_v_yfill; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("sparse_rfloordiv (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); case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__x)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__xindex)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_rfloordiv", 1, 6, 6, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1121; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__xfill)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_rfloordiv", 1, 6, 6, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1121; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__y)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_rfloordiv", 1, 6, 6, 3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1121; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 4: if (likely((values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__yindex)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_rfloordiv", 1, 6, 6, 4); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1121; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 5: if (likely((values[5] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__yfill)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_rfloordiv", 1, 6, 6, 5); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1121; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "sparse_rfloordiv") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1121; __pyx_clineno = __LINE__; goto __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_7_sparse_SparseIndex *)values[1]); __pyx_v_xfill = __pyx_PyFloat_AsDouble(values[2]); if (unlikely((__pyx_v_xfill == (npy_float64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1121; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_y = ((PyArrayObject *)values[3]); __pyx_v_yindex = ((struct __pyx_obj_6pandas_7_sparse_SparseIndex *)values[4]); __pyx_v_yfill = __pyx_PyFloat_AsDouble(values[5]); if (unlikely((__pyx_v_yfill == (npy_float64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1122; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("sparse_rfloordiv", 1, 6, 6, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1121; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas._sparse.sparse_rfloordiv", __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_filename = __pyx_f[0]; __pyx_lineno = 1121; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_xindex), __pyx_ptype_6pandas_7_sparse_SparseIndex, 1, "xindex", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1121; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_y), __pyx_ptype_5numpy_ndarray, 1, "y", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1122; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_yindex), __pyx_ptype_6pandas_7_sparse_SparseIndex, 1, "yindex", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1122; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_7_sparse_36sparse_rfloordiv(__pyx_self, __pyx_v_x, __pyx_v_xindex, __pyx_v_xfill, __pyx_v_y, __pyx_v_yindex, __pyx_v_yfill); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/sparse.pyx":1121 * y, yindex, yfill, __floordiv) * * cpdef sparse_rfloordiv(ndarray x, SparseIndex xindex, float64_t xfill, # <<<<<<<<<<<<<< * ndarray y, SparseIndex yindex, float64_t yfill): * return sparse_combine(x, xindex, xfill, */ static PyObject *__pyx_pf_6pandas_7_sparse_36sparse_rfloordiv(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_x, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_xindex, __pyx_t_5numpy_float64_t __pyx_v_xfill, PyArrayObject *__pyx_v_y, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_yindex, __pyx_t_5numpy_float64_t __pyx_v_yfill) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("sparse_rfloordiv", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_6pandas_7_sparse_sparse_rfloordiv(__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_filename = __pyx_f[0]; __pyx_lineno = 1121; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas._sparse.sparse_rfloordiv", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/sparse.pyx":1126 * y, yindex, yfill, __rfloordiv) * * cpdef sparse_pow(ndarray x, SparseIndex xindex, float64_t xfill, # <<<<<<<<<<<<<< * ndarray y, SparseIndex yindex, float64_t yfill): * return sparse_combine(x, xindex, xfill, */ static PyObject *__pyx_pw_6pandas_7_sparse_39sparse_pow(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_6pandas_7_sparse_sparse_pow(PyArrayObject *__pyx_v_x, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_xindex, __pyx_t_5numpy_float64_t __pyx_v_xfill, PyArrayObject *__pyx_v_y, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_yindex, __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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("sparse_pow", 0); /* "pandas/src/sparse.pyx":1128 * cpdef sparse_pow(ndarray x, SparseIndex xindex, float64_t xfill, * ndarray y, SparseIndex yindex, float64_t yfill): * return sparse_combine(x, xindex, xfill, # <<<<<<<<<<<<<< * y, yindex, yfill, __pow) * */ __Pyx_XDECREF(__pyx_r); /* "pandas/src/sparse.pyx":1129 * ndarray y, SparseIndex yindex, float64_t yfill): * return sparse_combine(x, xindex, xfill, * y, yindex, yfill, __pow) # <<<<<<<<<<<<<< * * cpdef sparse_rpow(ndarray x, SparseIndex xindex, float64_t xfill, */ __pyx_t_1 = ((PyObject *)__pyx_f_6pandas_7_sparse_sparse_combine(__pyx_v_x, __pyx_v_xindex, __pyx_v_xfill, __pyx_v_y, __pyx_v_yindex, __pyx_v_yfill, __pyx_f_6pandas_7_sparse___pow)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1128; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas._sparse.sparse_pow", __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_7_sparse_39sparse_pow(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_6pandas_7_sparse_39sparse_pow(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_x = 0; struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_xindex = 0; __pyx_t_5numpy_float64_t __pyx_v_xfill; PyArrayObject *__pyx_v_y = 0; struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_yindex = 0; __pyx_t_5numpy_float64_t __pyx_v_yfill; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("sparse_pow (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); case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__x)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__xindex)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_pow", 1, 6, 6, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1126; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__xfill)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_pow", 1, 6, 6, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1126; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__y)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_pow", 1, 6, 6, 3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1126; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 4: if (likely((values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__yindex)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_pow", 1, 6, 6, 4); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1126; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 5: if (likely((values[5] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__yfill)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_pow", 1, 6, 6, 5); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1126; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "sparse_pow") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1126; __pyx_clineno = __LINE__; goto __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_7_sparse_SparseIndex *)values[1]); __pyx_v_xfill = __pyx_PyFloat_AsDouble(values[2]); if (unlikely((__pyx_v_xfill == (npy_float64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1126; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_y = ((PyArrayObject *)values[3]); __pyx_v_yindex = ((struct __pyx_obj_6pandas_7_sparse_SparseIndex *)values[4]); __pyx_v_yfill = __pyx_PyFloat_AsDouble(values[5]); if (unlikely((__pyx_v_yfill == (npy_float64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1127; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("sparse_pow", 1, 6, 6, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1126; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas._sparse.sparse_pow", __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_filename = __pyx_f[0]; __pyx_lineno = 1126; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_xindex), __pyx_ptype_6pandas_7_sparse_SparseIndex, 1, "xindex", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1126; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_y), __pyx_ptype_5numpy_ndarray, 1, "y", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1127; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_yindex), __pyx_ptype_6pandas_7_sparse_SparseIndex, 1, "yindex", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1127; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_7_sparse_38sparse_pow(__pyx_self, __pyx_v_x, __pyx_v_xindex, __pyx_v_xfill, __pyx_v_y, __pyx_v_yindex, __pyx_v_yfill); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/sparse.pyx":1126 * y, yindex, yfill, __rfloordiv) * * cpdef sparse_pow(ndarray x, SparseIndex xindex, float64_t xfill, # <<<<<<<<<<<<<< * ndarray y, SparseIndex yindex, float64_t yfill): * return sparse_combine(x, xindex, xfill, */ static PyObject *__pyx_pf_6pandas_7_sparse_38sparse_pow(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_x, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_xindex, __pyx_t_5numpy_float64_t __pyx_v_xfill, PyArrayObject *__pyx_v_y, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_yindex, __pyx_t_5numpy_float64_t __pyx_v_yfill) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("sparse_pow", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_6pandas_7_sparse_sparse_pow(__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_filename = __pyx_f[0]; __pyx_lineno = 1126; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas._sparse.sparse_pow", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/sparse.pyx":1131 * y, yindex, yfill, __pow) * * cpdef sparse_rpow(ndarray x, SparseIndex xindex, float64_t xfill, # <<<<<<<<<<<<<< * ndarray y, SparseIndex yindex, float64_t yfill): * return sparse_combine(x, xindex, xfill, */ static PyObject *__pyx_pw_6pandas_7_sparse_41sparse_rpow(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_6pandas_7_sparse_sparse_rpow(PyArrayObject *__pyx_v_x, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_xindex, __pyx_t_5numpy_float64_t __pyx_v_xfill, PyArrayObject *__pyx_v_y, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_yindex, __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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("sparse_rpow", 0); /* "pandas/src/sparse.pyx":1133 * cpdef sparse_rpow(ndarray x, SparseIndex xindex, float64_t xfill, * ndarray y, SparseIndex yindex, float64_t yfill): * return sparse_combine(x, xindex, xfill, # <<<<<<<<<<<<<< * y, yindex, yfill, __rpow) * */ __Pyx_XDECREF(__pyx_r); /* "pandas/src/sparse.pyx":1134 * ndarray y, SparseIndex yindex, float64_t yfill): * return sparse_combine(x, xindex, xfill, * y, yindex, yfill, __rpow) # <<<<<<<<<<<<<< * * */ __pyx_t_1 = ((PyObject *)__pyx_f_6pandas_7_sparse_sparse_combine(__pyx_v_x, __pyx_v_xindex, __pyx_v_xfill, __pyx_v_y, __pyx_v_yindex, __pyx_v_yfill, __pyx_f_6pandas_7_sparse___rpow)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1133; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas._sparse.sparse_rpow", __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_7_sparse_41sparse_rpow(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_6pandas_7_sparse_41sparse_rpow(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_x = 0; struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_xindex = 0; __pyx_t_5numpy_float64_t __pyx_v_xfill; PyArrayObject *__pyx_v_y = 0; struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_yindex = 0; __pyx_t_5numpy_float64_t __pyx_v_yfill; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("sparse_rpow (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); case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__x)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__xindex)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_rpow", 1, 6, 6, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1131; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__xfill)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_rpow", 1, 6, 6, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1131; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__y)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_rpow", 1, 6, 6, 3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1131; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 4: if (likely((values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__yindex)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_rpow", 1, 6, 6, 4); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1131; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 5: if (likely((values[5] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__yfill)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_rpow", 1, 6, 6, 5); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1131; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "sparse_rpow") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1131; __pyx_clineno = __LINE__; goto __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_7_sparse_SparseIndex *)values[1]); __pyx_v_xfill = __pyx_PyFloat_AsDouble(values[2]); if (unlikely((__pyx_v_xfill == (npy_float64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1131; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_y = ((PyArrayObject *)values[3]); __pyx_v_yindex = ((struct __pyx_obj_6pandas_7_sparse_SparseIndex *)values[4]); __pyx_v_yfill = __pyx_PyFloat_AsDouble(values[5]); if (unlikely((__pyx_v_yfill == (npy_float64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1132; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("sparse_rpow", 1, 6, 6, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1131; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas._sparse.sparse_rpow", __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_filename = __pyx_f[0]; __pyx_lineno = 1131; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_xindex), __pyx_ptype_6pandas_7_sparse_SparseIndex, 1, "xindex", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1131; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_y), __pyx_ptype_5numpy_ndarray, 1, "y", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1132; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_yindex), __pyx_ptype_6pandas_7_sparse_SparseIndex, 1, "yindex", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1132; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_7_sparse_40sparse_rpow(__pyx_self, __pyx_v_x, __pyx_v_xindex, __pyx_v_xfill, __pyx_v_y, __pyx_v_yindex, __pyx_v_yfill); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/sparse.pyx":1131 * y, yindex, yfill, __pow) * * cpdef sparse_rpow(ndarray x, SparseIndex xindex, float64_t xfill, # <<<<<<<<<<<<<< * ndarray y, SparseIndex yindex, float64_t yfill): * return sparse_combine(x, xindex, xfill, */ static PyObject *__pyx_pf_6pandas_7_sparse_40sparse_rpow(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_x, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_xindex, __pyx_t_5numpy_float64_t __pyx_v_xfill, PyArrayObject *__pyx_v_y, struct __pyx_obj_6pandas_7_sparse_SparseIndex *__pyx_v_yindex, __pyx_t_5numpy_float64_t __pyx_v_yfill) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("sparse_rpow", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_6pandas_7_sparse_sparse_rpow(__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_filename = __pyx_f[0]; __pyx_lineno = 1131; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas._sparse.sparse_rpow", __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_7_sparse_43get_reindexer(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_7_sparse_43get_reindexer = {__Pyx_NAMESTR("get_reindexer"), (PyCFunction)__pyx_pw_6pandas_7_sparse_43get_reindexer, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_7_sparse_43get_reindexer(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_values = 0; PyObject *__pyx_v_index_map = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 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); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__values)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__index_map)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("get_reindexer", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1140; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "get_reindexer") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1140; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 1140; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas._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_filename = __pyx_f[0]; __pyx_lineno = 1140; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_index_map), (&PyDict_Type), 1, "index_map", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1140; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_7_sparse_42get_reindexer(__pyx_self, __pyx_v_values, __pyx_v_index_map); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/sparse.pyx":1140 * # Indexing operations * * def get_reindexer(ndarray[object, ndim=1] values, dict index_map): # <<<<<<<<<<<<<< * cdef object idx * cdef Py_ssize_t i */ static PyObject *__pyx_pf_6pandas_7_sparse_42get_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; int __pyx_t_14; int __pyx_t_15; __pyx_t_5numpy_int32_t __pyx_t_16; Py_ssize_t __pyx_t_17; Py_ssize_t __pyx_t_18; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __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_filename = __pyx_f[0]; __pyx_lineno = 1140; __pyx_clineno = __LINE__; goto __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/src/sparse.pyx":1143 * 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 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1143; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_new_length = __pyx_t_1; /* "pandas/src/sparse.pyx":1146 * 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_filename = __pyx_f[0]; __pyx_lineno = 1146; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 1146; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 1146; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1146; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1146; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_2)); __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1146; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 1146; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__dtype), __pyx_t_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1146; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1146; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __Pyx_DECREF(((PyObject *)__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_filename = __pyx_f[0]; __pyx_lineno = 1146; __pyx_clineno = __LINE__; goto __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_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_filename = __pyx_f[0]; __pyx_lineno = 1146; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_7 = 0; __pyx_v_indexer = ((PyArrayObject *)__pyx_t_6); __pyx_t_6 = 0; /* "pandas/src/sparse.pyx":1148 * 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; for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_1; __pyx_t_12+=1) { __pyx_v_i = __pyx_t_12; /* "pandas/src/sparse.pyx":1149 * * for i in range(new_length): * idx = values[i] # <<<<<<<<<<<<<< * if idx in index_map: * indexer[i] = index_map[idx] */ __pyx_t_13 = __pyx_v_i; __pyx_t_8 = -1; if (__pyx_t_13 < 0) { __pyx_t_13 += __pyx_pybuffernd_values.diminfo[0].shape; if (unlikely(__pyx_t_13 < 0)) __pyx_t_8 = 0; } else if (unlikely(__pyx_t_13 >= __pyx_pybuffernd_values.diminfo[0].shape)) __pyx_t_8 = 0; if (unlikely(__pyx_t_8 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_8); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1149; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_6 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_13, __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/src/sparse.pyx":1150 * for i in range(new_length): * idx = values[i] * if idx in index_map: # <<<<<<<<<<<<<< * indexer[i] = index_map[idx] * else: */ if (unlikely(((PyObject *)__pyx_v_index_map) == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1150; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_14 = (__Pyx_PyDict_Contains(__pyx_v_idx, ((PyObject *)__pyx_v_index_map), Py_EQ)); if (unlikely(__pyx_t_14 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1150; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_15 = (__pyx_t_14 != 0); if (__pyx_t_15) { /* "pandas/src/sparse.pyx":1151 * idx = values[i] * if idx in index_map: * indexer[i] = index_map[idx] # <<<<<<<<<<<<<< * else: * indexer[i] = -1 */ if (unlikely(((PyObject *)__pyx_v_index_map) == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1151; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_6 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_index_map), __pyx_v_idx); if (!__pyx_t_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1151; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_16 = __Pyx_PyInt_from_py_npy_int32(__pyx_t_6); if (unlikely((__pyx_t_16 == (npy_int32)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1151; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_17 = __pyx_v_i; __pyx_t_8 = -1; if (__pyx_t_17 < 0) { __pyx_t_17 += __pyx_pybuffernd_indexer.diminfo[0].shape; if (unlikely(__pyx_t_17 < 0)) __pyx_t_8 = 0; } else if (unlikely(__pyx_t_17 >= __pyx_pybuffernd_indexer.diminfo[0].shape)) __pyx_t_8 = 0; if (unlikely(__pyx_t_8 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_8); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1151; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_indexer.diminfo[0].strides) = __pyx_t_16; goto __pyx_L5; } /*else*/ { /* "pandas/src/sparse.pyx":1153 * indexer[i] = index_map[idx] * else: * indexer[i] = -1 # <<<<<<<<<<<<<< * * return indexer */ __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_filename = __pyx_f[0]; __pyx_lineno = 1153; __pyx_clineno = __LINE__; goto __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) = -1; } __pyx_L5:; } /* "pandas/src/sparse.pyx":1155 * 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; __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_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __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._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; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_7_sparse_45reindex_integer(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_7_sparse_45reindex_integer = {__Pyx_NAMESTR("reindex_integer"), (PyCFunction)__pyx_pw_6pandas_7_sparse_45reindex_integer, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_7_sparse_45reindex_integer(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { CYTHON_UNUSED PyArrayObject *__pyx_v_values = 0; CYTHON_UNUSED struct __pyx_obj_6pandas_7_sparse_IntIndex *__pyx_v_sparse_index = 0; CYTHON_UNUSED PyArrayObject *__pyx_v_indexer = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 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); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__values)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__sparse_index)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("reindex_integer", 1, 3, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1187; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__indexer)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("reindex_integer", 1, 3, 3, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1187; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "reindex_integer") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1187; __pyx_clineno = __LINE__; goto __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_7_sparse_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_filename = __pyx_f[0]; __pyx_lineno = 1187; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas._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_filename = __pyx_f[0]; __pyx_lineno = 1187; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_sparse_index), __pyx_ptype_6pandas_7_sparse_IntIndex, 1, "sparse_index", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1188; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_indexer), __pyx_ptype_5numpy_ndarray, 1, "indexer", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1189; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_7_sparse_44reindex_integer(__pyx_self, __pyx_v_values, __pyx_v_sparse_index, __pyx_v_indexer); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/sparse.pyx":1187 * * * def reindex_integer(ndarray[float64_t, ndim=1] values, # <<<<<<<<<<<<<< * IntIndex sparse_index, * ndarray[int32_t, ndim=1] indexer): */ static PyObject *__pyx_pf_6pandas_7_sparse_44reindex_integer(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyArrayObject *__pyx_v_values, CYTHON_UNUSED struct __pyx_obj_6pandas_7_sparse_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 int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __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_filename = __pyx_f[0]; __pyx_lineno = 1187; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 1187; __pyx_clineno = __LINE__; goto __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_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __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._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; } /* 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)); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "numpy.pxd":196 * # 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 fullfill the PEP. */ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags) { int __pyx_v_copy_shape; 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_v_hasfields; int __pyx_r; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; int __pyx_t_5; int __pyx_t_6; int __pyx_t_7; PyObject *__pyx_t_8 = NULL; char *__pyx_t_9; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__getbuffer__", 0); if (__pyx_v_info != NULL) { __pyx_v_info->obj = Py_None; __Pyx_INCREF(Py_None); __Pyx_GIVEREF(__pyx_v_info->obj); } /* "numpy.pxd":202 * # of flags * * if info == NULL: return # <<<<<<<<<<<<<< * * cdef int copy_shape, i, ndim */ __pyx_t_1 = ((__pyx_v_info == NULL) != 0); if (__pyx_t_1) { __pyx_r = 0; goto __pyx_L0; goto __pyx_L3; } __pyx_L3:; /* "numpy.pxd":205 * * cdef int copy_shape, i, ndim * cdef int endian_detector = 1 # <<<<<<<<<<<<<< * cdef bint little_endian = ((&endian_detector)[0] != 0) * */ __pyx_v_endian_detector = 1; /* "numpy.pxd":206 * cdef int copy_shape, 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); /* "numpy.pxd":208 * cdef bint little_endian = ((&endian_detector)[0] != 0) * * ndim = PyArray_NDIM(self) # <<<<<<<<<<<<<< * * if sizeof(npy_intp) != sizeof(Py_ssize_t): */ __pyx_v_ndim = PyArray_NDIM(__pyx_v_self); /* "numpy.pxd":210 * ndim = PyArray_NDIM(self) * * if sizeof(npy_intp) != sizeof(Py_ssize_t): # <<<<<<<<<<<<<< * copy_shape = 1 * else: */ __pyx_t_1 = (((sizeof(npy_intp)) != (sizeof(Py_ssize_t))) != 0); if (__pyx_t_1) { /* "numpy.pxd":211 * * if sizeof(npy_intp) != sizeof(Py_ssize_t): * copy_shape = 1 # <<<<<<<<<<<<<< * else: * copy_shape = 0 */ __pyx_v_copy_shape = 1; goto __pyx_L4; } /*else*/ { /* "numpy.pxd":213 * copy_shape = 1 * else: * copy_shape = 0 # <<<<<<<<<<<<<< * * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) */ __pyx_v_copy_shape = 0; } __pyx_L4:; /* "numpy.pxd":215 * copy_shape = 0 * * 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_1 = (((__pyx_v_flags & PyBUF_C_CONTIGUOUS) == PyBUF_C_CONTIGUOUS) != 0); if (__pyx_t_1) { /* "numpy.pxd":216 * * 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_3 = __pyx_t_2; } else { __pyx_t_3 = __pyx_t_1; } if (__pyx_t_3) { /* "numpy.pxd":217 * 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_4 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_21), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 217; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 217; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L5; } __pyx_L5:; /* "numpy.pxd":219 * 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_3 = (((__pyx_v_flags & PyBUF_F_CONTIGUOUS) == PyBUF_F_CONTIGUOUS) != 0); if (__pyx_t_3) { /* "numpy.pxd":220 * * 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_1 = ((!(PyArray_CHKFLAGS(__pyx_v_self, NPY_F_CONTIGUOUS) != 0)) != 0); __pyx_t_2 = __pyx_t_1; } else { __pyx_t_2 = __pyx_t_3; } if (__pyx_t_2) { /* "numpy.pxd":221 * 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_4 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_23), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 221; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 221; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L6; } __pyx_L6:; /* "numpy.pxd":223 * raise ValueError(u"ndarray is not Fortran contiguous") * * info.buf = PyArray_DATA(self) # <<<<<<<<<<<<<< * info.ndim = ndim * if copy_shape: */ __pyx_v_info->buf = PyArray_DATA(__pyx_v_self); /* "numpy.pxd":224 * * info.buf = PyArray_DATA(self) * info.ndim = ndim # <<<<<<<<<<<<<< * if copy_shape: * # Allocate new buffer for strides and shape info. */ __pyx_v_info->ndim = __pyx_v_ndim; /* "numpy.pxd":225 * info.buf = PyArray_DATA(self) * info.ndim = ndim * if copy_shape: # <<<<<<<<<<<<<< * # Allocate new buffer for strides and shape info. * # This is allocated as one block, strides first. */ __pyx_t_2 = (__pyx_v_copy_shape != 0); if (__pyx_t_2) { /* "numpy.pxd":228 * # Allocate new buffer for strides and shape info. * # This is allocated as one block, strides first. * info.strides = stdlib.malloc(sizeof(Py_ssize_t) * ndim * 2) # <<<<<<<<<<<<<< * info.shape = info.strides + ndim * for i in range(ndim): */ __pyx_v_info->strides = ((Py_ssize_t *)malloc((((sizeof(Py_ssize_t)) * ((size_t)__pyx_v_ndim)) * 2))); /* "numpy.pxd":229 * # This is allocated as one block, strides first. * info.strides = stdlib.malloc(sizeof(Py_ssize_t) * ndim * 2) * 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); /* "numpy.pxd":230 * info.strides = stdlib.malloc(sizeof(Py_ssize_t) * ndim * 2) * 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_5 = __pyx_v_ndim; for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) { __pyx_v_i = __pyx_t_6; /* "numpy.pxd":231 * 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]); /* "numpy.pxd":232 * 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]); } goto __pyx_L7; } /*else*/ { /* "numpy.pxd":234 * info.shape[i] = PyArray_DIMS(self)[i] * else: * info.strides = PyArray_STRIDES(self) # <<<<<<<<<<<<<< * info.shape = PyArray_DIMS(self) * info.suboffsets = NULL */ __pyx_v_info->strides = ((Py_ssize_t *)PyArray_STRIDES(__pyx_v_self)); /* "numpy.pxd":235 * 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_L7:; /* "numpy.pxd":236 * 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; /* "numpy.pxd":237 * 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); /* "numpy.pxd":238 * 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)); /* "numpy.pxd":241 * * cdef int t * cdef char* f = NULL # <<<<<<<<<<<<<< * cdef dtype descr = self.descr * cdef list stack */ __pyx_v_f = NULL; /* "numpy.pxd":242 * cdef int t * cdef char* f = NULL * cdef dtype descr = self.descr # <<<<<<<<<<<<<< * cdef list stack * cdef int offset */ __pyx_t_4 = ((PyObject *)__pyx_v_self->descr); __Pyx_INCREF(__pyx_t_4); __pyx_v_descr = ((PyArray_Descr *)__pyx_t_4); __pyx_t_4 = 0; /* "numpy.pxd":246 * cdef int offset * * cdef bint hasfields = PyDataType_HASFIELDS(descr) # <<<<<<<<<<<<<< * * if not hasfields and not copy_shape: */ __pyx_v_hasfields = PyDataType_HASFIELDS(__pyx_v_descr); /* "numpy.pxd":248 * cdef bint hasfields = PyDataType_HASFIELDS(descr) * * if not hasfields and not copy_shape: # <<<<<<<<<<<<<< * # do not call releasebuffer * info.obj = None */ __pyx_t_2 = ((!(__pyx_v_hasfields != 0)) != 0); if (__pyx_t_2) { __pyx_t_3 = ((!(__pyx_v_copy_shape != 0)) != 0); __pyx_t_1 = __pyx_t_3; } else { __pyx_t_1 = __pyx_t_2; } if (__pyx_t_1) { /* "numpy.pxd":250 * if not hasfields and not copy_shape: * # do not call releasebuffer * info.obj = None # <<<<<<<<<<<<<< * else: * # need to call releasebuffer */ __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_info->obj); __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = Py_None; goto __pyx_L10; } /*else*/ { /* "numpy.pxd":253 * else: * # need to call releasebuffer * info.obj = self # <<<<<<<<<<<<<< * * if not hasfields: */ __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); } __pyx_L10:; /* "numpy.pxd":255 * info.obj = self * * if not hasfields: # <<<<<<<<<<<<<< * t = descr.type_num * if ((descr.byteorder == '>' and little_endian) or */ __pyx_t_1 = ((!(__pyx_v_hasfields != 0)) != 0); if (__pyx_t_1) { /* "numpy.pxd":256 * * if not hasfields: * t = descr.type_num # <<<<<<<<<<<<<< * if ((descr.byteorder == '>' and little_endian) or * (descr.byteorder == '<' and not little_endian)): */ __pyx_t_5 = __pyx_v_descr->type_num; __pyx_v_t = __pyx_t_5; /* "numpy.pxd":257 * if not hasfields: * t = descr.type_num * if ((descr.byteorder == '>' and little_endian) or # <<<<<<<<<<<<<< * (descr.byteorder == '<' and not little_endian)): * raise ValueError(u"Non-native byte order not supported") */ __pyx_t_1 = ((__pyx_v_descr->byteorder == '>') != 0); if (__pyx_t_1) { __pyx_t_2 = (__pyx_v_little_endian != 0); } else { __pyx_t_2 = __pyx_t_1; } if (!__pyx_t_2) { /* "numpy.pxd":258 * t = descr.type_num * if ((descr.byteorder == '>' and little_endian) or * (descr.byteorder == '<' and not little_endian)): # <<<<<<<<<<<<<< * raise ValueError(u"Non-native byte order not supported") * if t == NPY_BYTE: f = "b" */ __pyx_t_1 = ((__pyx_v_descr->byteorder == '<') != 0); if (__pyx_t_1) { __pyx_t_3 = ((!(__pyx_v_little_endian != 0)) != 0); __pyx_t_7 = __pyx_t_3; } else { __pyx_t_7 = __pyx_t_1; } __pyx_t_1 = __pyx_t_7; } else { __pyx_t_1 = __pyx_t_2; } if (__pyx_t_1) { /* "numpy.pxd":259 * if ((descr.byteorder == '>' and little_endian) or * (descr.byteorder == '<' 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_4 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_25), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 259; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 259; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L12; } __pyx_L12:; /* "numpy.pxd":276 * 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) */ switch (__pyx_v_t) { /* "numpy.pxd":260 * (descr.byteorder == '<' 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" */ case NPY_BYTE: __pyx_v_f = __pyx_k__b; break; /* "numpy.pxd":261 * 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 = __pyx_k__B; break; /* "numpy.pxd":262 * 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 = __pyx_k__h; break; /* "numpy.pxd":263 * 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 = __pyx_k__H; break; /* "numpy.pxd":264 * 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 = __pyx_k__i; break; /* "numpy.pxd":265 * 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 = __pyx_k__I; break; /* "numpy.pxd":266 * 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 = __pyx_k__l; break; /* "numpy.pxd":267 * 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 = __pyx_k__L; break; /* "numpy.pxd":268 * 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 = __pyx_k__q; break; /* "numpy.pxd":269 * 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 = __pyx_k__Q; break; /* "numpy.pxd":270 * 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 = __pyx_k__f; break; /* "numpy.pxd":271 * 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 = __pyx_k__d; break; /* "numpy.pxd":272 * 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 = __pyx_k__g; break; /* "numpy.pxd":273 * 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 = __pyx_k__Zf; break; /* "numpy.pxd":274 * 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 = __pyx_k__Zd; break; /* "numpy.pxd":275 * 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 = __pyx_k__Zg; break; /* "numpy.pxd":276 * 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 = __pyx_k__O; break; default: /* "numpy.pxd":278 * elif t == NPY_OBJECT: f = "O" * else: * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) # <<<<<<<<<<<<<< * info.format = f * return */ __pyx_t_4 = PyInt_FromLong(__pyx_v_t); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 278; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_8 = PyNumber_Remainder(((PyObject *)__pyx_kp_u_26), __pyx_t_4); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 278; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_8)); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 278; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_t_8)); __Pyx_GIVEREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0; __pyx_t_8 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 278; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __Pyx_Raise(__pyx_t_8, 0, 0, 0); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; {__pyx_filename = __pyx_f[1]; __pyx_lineno = 278; __pyx_clineno = __LINE__; goto __pyx_L1_error;} break; } /* "numpy.pxd":279 * else: * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) * info.format = f # <<<<<<<<<<<<<< * return * else: */ __pyx_v_info->format = __pyx_v_f; /* "numpy.pxd":280 * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) * info.format = f * return # <<<<<<<<<<<<<< * else: * info.format = stdlib.malloc(_buffer_format_string_len) */ __pyx_r = 0; goto __pyx_L0; goto __pyx_L11; } /*else*/ { /* "numpy.pxd":282 * return * else: * info.format = stdlib.malloc(_buffer_format_string_len) # <<<<<<<<<<<<<< * info.format[0] = '^' # Native data types, manual alignment * offset = 0 */ __pyx_v_info->format = ((char *)malloc(255)); /* "numpy.pxd":283 * else: * info.format = stdlib.malloc(_buffer_format_string_len) * info.format[0] = '^' # Native data types, manual alignment # <<<<<<<<<<<<<< * offset = 0 * f = _util_dtypestring(descr, info.format + 1, */ (__pyx_v_info->format[0]) = '^'; /* "numpy.pxd":284 * info.format = stdlib.malloc(_buffer_format_string_len) * info.format[0] = '^' # Native data types, manual alignment * offset = 0 # <<<<<<<<<<<<<< * f = _util_dtypestring(descr, info.format + 1, * info.format + _buffer_format_string_len, */ __pyx_v_offset = 0; /* "numpy.pxd":287 * f = _util_dtypestring(descr, info.format + 1, * info.format + _buffer_format_string_len, * &offset) # <<<<<<<<<<<<<< * f[0] = 0 # Terminate format string * */ __pyx_t_9 = __pyx_f_5numpy__util_dtypestring(__pyx_v_descr, (__pyx_v_info->format + 1), (__pyx_v_info->format + 255), (&__pyx_v_offset)); if (unlikely(__pyx_t_9 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 285; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_f = __pyx_t_9; /* "numpy.pxd":288 * info.format + _buffer_format_string_len, * &offset) * f[0] = 0 # Terminate format string # <<<<<<<<<<<<<< * * def __releasebuffer__(ndarray self, Py_buffer* info): */ (__pyx_v_f[0]) = 0; } __pyx_L11:; __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_8); __Pyx_AddTraceback("numpy.ndarray.__getbuffer__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; if (__pyx_v_info != NULL && __pyx_v_info->obj != NULL) { __Pyx_GOTREF(__pyx_v_info->obj); __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = NULL; } goto __pyx_L2; __pyx_L0:; if (__pyx_v_info != NULL && __pyx_v_info->obj == Py_None) { __Pyx_GOTREF(Py_None); __Pyx_DECREF(Py_None); __pyx_v_info->obj = NULL; } __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_descr); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* 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)); __Pyx_RefNannyFinishContext(); } /* "numpy.pxd":290 * f[0] = 0 # Terminate format string * * def __releasebuffer__(ndarray self, Py_buffer* info): # <<<<<<<<<<<<<< * if PyArray_HASFIELDS(self): * stdlib.free(info.format) */ 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); /* "numpy.pxd":291 * * def __releasebuffer__(ndarray self, Py_buffer* info): * if PyArray_HASFIELDS(self): # <<<<<<<<<<<<<< * stdlib.free(info.format) * if sizeof(npy_intp) != sizeof(Py_ssize_t): */ __pyx_t_1 = (PyArray_HASFIELDS(__pyx_v_self) != 0); if (__pyx_t_1) { /* "numpy.pxd":292 * def __releasebuffer__(ndarray self, Py_buffer* info): * if PyArray_HASFIELDS(self): * stdlib.free(info.format) # <<<<<<<<<<<<<< * if sizeof(npy_intp) != sizeof(Py_ssize_t): * stdlib.free(info.strides) */ free(__pyx_v_info->format); goto __pyx_L3; } __pyx_L3:; /* "numpy.pxd":293 * if PyArray_HASFIELDS(self): * stdlib.free(info.format) * if sizeof(npy_intp) != sizeof(Py_ssize_t): # <<<<<<<<<<<<<< * stdlib.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) { /* "numpy.pxd":294 * stdlib.free(info.format) * if sizeof(npy_intp) != sizeof(Py_ssize_t): * stdlib.free(info.strides) # <<<<<<<<<<<<<< * # info.shape was stored after info.strides in the same block * */ free(__pyx_v_info->strides); goto __pyx_L4; } __pyx_L4:; __Pyx_RefNannyFinishContext(); } /* "numpy.pxd":772 * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PyArray_MultiIterNew1", 0); /* "numpy.pxd":773 * * 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_filename = __pyx_f[1]; __pyx_lineno = 773; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __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; } /* "numpy.pxd":775 * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PyArray_MultiIterNew2", 0); /* "numpy.pxd":776 * * 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_filename = __pyx_f[1]; __pyx_lineno = 776; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __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; } /* "numpy.pxd":778 * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PyArray_MultiIterNew3", 0); /* "numpy.pxd":779 * * 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_filename = __pyx_f[1]; __pyx_lineno = 779; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __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; } /* "numpy.pxd":781 * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PyArray_MultiIterNew4", 0); /* "numpy.pxd":782 * * 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_filename = __pyx_f[1]; __pyx_lineno = 782; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __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; } /* "numpy.pxd":784 * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PyArray_MultiIterNew5", 0); /* "numpy.pxd":785 * * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): * return PyArray_MultiIterNew(5, a, b, c, d, e) # <<<<<<<<<<<<<< * * cdef inline char* _util_dtypestring(dtype descr, char* f, char* end, int* offset) except NULL: */ __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_filename = __pyx_f[1]; __pyx_lineno = 785; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __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; } /* "numpy.pxd":787 * return PyArray_MultiIterNew(5, a, b, c, d, e) * * 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; PyObject *__pyx_t_5 = NULL; PyObject *(*__pyx_t_6)(PyObject *); int __pyx_t_7; int __pyx_t_8; int __pyx_t_9; int __pyx_t_10; long __pyx_t_11; char *__pyx_t_12; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_util_dtypestring", 0); /* "numpy.pxd":794 * cdef int delta_offset * cdef tuple i * cdef int endian_detector = 1 # <<<<<<<<<<<<<< * cdef bint little_endian = ((&endian_detector)[0] != 0) * cdef tuple fields */ __pyx_v_endian_detector = 1; /* "numpy.pxd":795 * cdef tuple i * 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); /* "numpy.pxd":798 * cdef tuple fields * * for childname in descr.names: # <<<<<<<<<<<<<< * fields = descr.fields[childname] * child, new_offset = fields */ if (unlikely(((PyObject *)__pyx_v_descr->names) == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 798; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_1 = ((PyObject *)__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_COMPILING_IN_CPYTHON __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_filename = __pyx_f[1]; __pyx_lineno = 798; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 798; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif __Pyx_XDECREF_SET(__pyx_v_childname, __pyx_t_3); __pyx_t_3 = 0; /* "numpy.pxd":799 * * for childname in descr.names: * fields = descr.fields[childname] # <<<<<<<<<<<<<< * child, new_offset = fields * */ __pyx_t_3 = PyObject_GetItem(__pyx_v_descr->fields, __pyx_v_childname); if (!__pyx_t_3) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 799; __pyx_clineno = __LINE__; goto __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 tuple, got %.200s", Py_TYPE(__pyx_t_3)->tp_name), 0))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 799; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_XDECREF_SET(__pyx_v_fields, ((PyObject*)__pyx_t_3)); __pyx_t_3 = 0; /* "numpy.pxd":800 * for childname in descr.names: * fields = descr.fields[childname] * child, new_offset = fields # <<<<<<<<<<<<<< * * if (end - f) - (new_offset - offset[0]) < 15: */ if (likely(PyTuple_CheckExact(((PyObject *)__pyx_v_fields)))) { PyObject* sequence = ((PyObject *)__pyx_v_fields); #if CYTHON_COMPILING_IN_CPYTHON Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 800; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON __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_filename = __pyx_f[1]; __pyx_lineno = 800; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 800; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); #endif } else if (1) { __Pyx_RaiseNoneNotIterableError(); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 800; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } else { Py_ssize_t index = -1; __pyx_t_5 = PyObject_GetIter(((PyObject *)__pyx_v_fields)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 800; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = Py_TYPE(__pyx_t_5)->tp_iternext; index = 0; __pyx_t_3 = __pyx_t_6(__pyx_t_5); if (unlikely(!__pyx_t_3)) goto __pyx_L5_unpacking_failed; __Pyx_GOTREF(__pyx_t_3); index = 1; __pyx_t_4 = __pyx_t_6(__pyx_t_5); if (unlikely(!__pyx_t_4)) goto __pyx_L5_unpacking_failed; __Pyx_GOTREF(__pyx_t_4); if (__Pyx_IternextUnpackEndCheck(__pyx_t_6(__pyx_t_5), 2) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 800; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_6 = NULL; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; goto __pyx_L6_unpacking_done; __pyx_L5_unpacking_failed:; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_6 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 800; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_L6_unpacking_done:; } if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_dtype))))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 800; __pyx_clineno = __LINE__; goto __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; /* "numpy.pxd":802 * 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 = PyInt_FromLong((__pyx_v_end - __pyx_v_f)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 802; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = PyInt_FromLong((__pyx_v_offset[0])); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 802; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = PyNumber_Subtract(__pyx_v_new_offset, __pyx_t_3); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 802; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyNumber_Subtract(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 802; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyObject_RichCompare(__pyx_t_3, __pyx_int_15, Py_LT); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 802; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 802; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_7) { /* "numpy.pxd":803 * * if (end - f) - (new_offset - offset[0]) < 15: * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") # <<<<<<<<<<<<<< * * if ((child.byteorder == '>' and little_endian) or */ __pyx_t_5 = PyObject_Call(__pyx_builtin_RuntimeError, ((PyObject *)__pyx_k_tuple_28), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 803; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_Raise(__pyx_t_5, 0, 0, 0); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; {__pyx_filename = __pyx_f[1]; __pyx_lineno = 803; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L7; } __pyx_L7:; /* "numpy.pxd":805 * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") * * if ((child.byteorder == '>' and little_endian) or # <<<<<<<<<<<<<< * (child.byteorder == '<' 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) { __pyx_t_8 = (__pyx_v_little_endian != 0); } else { __pyx_t_8 = __pyx_t_7; } if (!__pyx_t_8) { /* "numpy.pxd":806 * * if ((child.byteorder == '>' and little_endian) or * (child.byteorder == '<' 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) { __pyx_t_9 = ((!(__pyx_v_little_endian != 0)) != 0); __pyx_t_10 = __pyx_t_9; } else { __pyx_t_10 = __pyx_t_7; } __pyx_t_7 = __pyx_t_10; } else { __pyx_t_7 = __pyx_t_8; } if (__pyx_t_7) { /* "numpy.pxd":807 * if ((child.byteorder == '>' and little_endian) or * (child.byteorder == '<' 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_5 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_29), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 807; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_Raise(__pyx_t_5, 0, 0, 0); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; {__pyx_filename = __pyx_f[1]; __pyx_lineno = 807; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L8; } __pyx_L8:; /* "numpy.pxd":817 * * # Output padding bytes * while offset[0] < new_offset: # <<<<<<<<<<<<<< * f[0] = 120 # "x"; pad byte * f += 1 */ while (1) { __pyx_t_5 = PyInt_FromLong((__pyx_v_offset[0])); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 817; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = PyObject_RichCompare(__pyx_t_5, __pyx_v_new_offset, Py_LT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 817; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 817; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (!__pyx_t_7) break; /* "numpy.pxd":818 * # Output padding bytes * while offset[0] < new_offset: * f[0] = 120 # "x"; pad byte # <<<<<<<<<<<<<< * f += 1 * offset[0] += 1 */ (__pyx_v_f[0]) = 120; /* "numpy.pxd":819 * while offset[0] < new_offset: * f[0] = 120 # "x"; pad byte * f += 1 # <<<<<<<<<<<<<< * offset[0] += 1 * */ __pyx_v_f = (__pyx_v_f + 1); /* "numpy.pxd":820 * f[0] = 120 # "x"; pad byte * f += 1 * offset[0] += 1 # <<<<<<<<<<<<<< * * offset[0] += child.itemsize */ __pyx_t_11 = 0; (__pyx_v_offset[__pyx_t_11]) = ((__pyx_v_offset[__pyx_t_11]) + 1); } /* "numpy.pxd":822 * offset[0] += 1 * * offset[0] += child.itemsize # <<<<<<<<<<<<<< * * if not PyDataType_HASFIELDS(child): */ __pyx_t_11 = 0; (__pyx_v_offset[__pyx_t_11]) = ((__pyx_v_offset[__pyx_t_11]) + __pyx_v_child->elsize); /* "numpy.pxd":824 * offset[0] += child.itemsize * * if not PyDataType_HASFIELDS(child): # <<<<<<<<<<<<<< * t = child.type_num * if end - f < 5: */ __pyx_t_7 = ((!(PyDataType_HASFIELDS(__pyx_v_child) != 0)) != 0); if (__pyx_t_7) { /* "numpy.pxd":825 * * if not PyDataType_HASFIELDS(child): * t = child.type_num # <<<<<<<<<<<<<< * if end - f < 5: * raise RuntimeError(u"Format string allocated too short.") */ __pyx_t_3 = PyInt_FromLong(__pyx_v_child->type_num); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 825; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_XDECREF_SET(__pyx_v_t, __pyx_t_3); __pyx_t_3 = 0; /* "numpy.pxd":826 * if not PyDataType_HASFIELDS(child): * t = child.type_num * if end - f < 5: # <<<<<<<<<<<<<< * raise RuntimeError(u"Format string allocated too short.") * */ __pyx_t_7 = (((__pyx_v_end - __pyx_v_f) < 5) != 0); if (__pyx_t_7) { /* "numpy.pxd":827 * 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_3 = PyObject_Call(__pyx_builtin_RuntimeError, ((PyObject *)__pyx_k_tuple_31), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 827; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 827; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L12; } __pyx_L12:; /* "numpy.pxd":830 * * # 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_3 = PyInt_FromLong(NPY_BYTE); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 830; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 830; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 830; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_7) { (__pyx_v_f[0]) = 98; goto __pyx_L13; } /* "numpy.pxd":831 * # 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_5 = PyInt_FromLong(NPY_UBYTE); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 831; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 831; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 831; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_7) { (__pyx_v_f[0]) = 66; goto __pyx_L13; } /* "numpy.pxd":832 * 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_3 = PyInt_FromLong(NPY_SHORT); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 832; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 832; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 832; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_7) { (__pyx_v_f[0]) = 104; goto __pyx_L13; } /* "numpy.pxd":833 * 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_5 = PyInt_FromLong(NPY_USHORT); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 833; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 833; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 833; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_7) { (__pyx_v_f[0]) = 72; goto __pyx_L13; } /* "numpy.pxd":834 * 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_3 = PyInt_FromLong(NPY_INT); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 834; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 834; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 834; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_7) { (__pyx_v_f[0]) = 105; goto __pyx_L13; } /* "numpy.pxd":835 * 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_5 = PyInt_FromLong(NPY_UINT); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 835; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 835; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 835; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_7) { (__pyx_v_f[0]) = 73; goto __pyx_L13; } /* "numpy.pxd":836 * 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_3 = PyInt_FromLong(NPY_LONG); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 836; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 836; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 836; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_7) { (__pyx_v_f[0]) = 108; goto __pyx_L13; } /* "numpy.pxd":837 * 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_5 = PyInt_FromLong(NPY_ULONG); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 837; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 837; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 837; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_7) { (__pyx_v_f[0]) = 76; goto __pyx_L13; } /* "numpy.pxd":838 * 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_3 = PyInt_FromLong(NPY_LONGLONG); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 838; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 838; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 838; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_7) { (__pyx_v_f[0]) = 113; goto __pyx_L13; } /* "numpy.pxd":839 * 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_5 = PyInt_FromLong(NPY_ULONGLONG); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 839; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 839; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 839; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_7) { (__pyx_v_f[0]) = 81; goto __pyx_L13; } /* "numpy.pxd":840 * 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_3 = PyInt_FromLong(NPY_FLOAT); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 840; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 840; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 840; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_7) { (__pyx_v_f[0]) = 102; goto __pyx_L13; } /* "numpy.pxd":841 * 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_5 = PyInt_FromLong(NPY_DOUBLE); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 841; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 841; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 841; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_7) { (__pyx_v_f[0]) = 100; goto __pyx_L13; } /* "numpy.pxd":842 * 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_3 = PyInt_FromLong(NPY_LONGDOUBLE); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 842; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 842; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 842; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_7) { (__pyx_v_f[0]) = 103; goto __pyx_L13; } /* "numpy.pxd":843 * 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_5 = PyInt_FromLong(NPY_CFLOAT); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 843; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 843; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 843; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_7) { (__pyx_v_f[0]) = 90; (__pyx_v_f[1]) = 102; __pyx_v_f = (__pyx_v_f + 1); goto __pyx_L13; } /* "numpy.pxd":844 * 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_3 = PyInt_FromLong(NPY_CDOUBLE); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 844; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 844; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 844; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_7) { (__pyx_v_f[0]) = 90; (__pyx_v_f[1]) = 100; __pyx_v_f = (__pyx_v_f + 1); goto __pyx_L13; } /* "numpy.pxd":845 * 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_5 = PyInt_FromLong(NPY_CLONGDOUBLE); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 845; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 845; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 845; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_7) { (__pyx_v_f[0]) = 90; (__pyx_v_f[1]) = 103; __pyx_v_f = (__pyx_v_f + 1); goto __pyx_L13; } /* "numpy.pxd":846 * 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_3 = PyInt_FromLong(NPY_OBJECT); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 846; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 846; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 846; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_7) { (__pyx_v_f[0]) = 79; goto __pyx_L13; } /*else*/ { /* "numpy.pxd":848 * elif t == NPY_OBJECT: f[0] = 79 #"O" * else: * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) # <<<<<<<<<<<<<< * f += 1 * else: */ __pyx_t_5 = PyNumber_Remainder(((PyObject *)__pyx_kp_u_26), __pyx_v_t); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 848; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_5)); __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 848; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_t_5)); __Pyx_GIVEREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; __pyx_t_5 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 848; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; __Pyx_Raise(__pyx_t_5, 0, 0, 0); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; {__pyx_filename = __pyx_f[1]; __pyx_lineno = 848; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_L13:; /* "numpy.pxd":849 * 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); goto __pyx_L11; } /*else*/ { /* "numpy.pxd":853 * # Cython ignores struct boundary information ("T{...}"), * # so don't output it * f = _util_dtypestring(child, f, end, offset) # <<<<<<<<<<<<<< * return f * */ __pyx_t_12 = __pyx_f_5numpy__util_dtypestring(__pyx_v_child, __pyx_v_f, __pyx_v_end, __pyx_v_offset); if (unlikely(__pyx_t_12 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 853; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_f = __pyx_t_12; } __pyx_L11:; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "numpy.pxd":854 * # so don't output it * f = _util_dtypestring(child, f, end, offset) * return f # <<<<<<<<<<<<<< * * */ __pyx_r = __pyx_v_f; goto __pyx_L0; __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("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; } /* "numpy.pxd":969 * * * 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); /* "numpy.pxd":971 * 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) { /* "numpy.pxd":972 * cdef PyObject* baseptr * if base is None: * baseptr = NULL # <<<<<<<<<<<<<< * else: * Py_INCREF(base) # important to do this before decref below! */ __pyx_v_baseptr = NULL; goto __pyx_L3; } /*else*/ { /* "numpy.pxd":974 * baseptr = NULL * else: * Py_INCREF(base) # important to do this before decref below! # <<<<<<<<<<<<<< * baseptr = base * Py_XDECREF(arr.base) */ Py_INCREF(__pyx_v_base); /* "numpy.pxd":975 * 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:; /* "numpy.pxd":976 * 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); /* "numpy.pxd":977 * baseptr = base * Py_XDECREF(arr.base) * arr.base = baseptr # <<<<<<<<<<<<<< * * cdef inline object get_array_base(ndarray arr): */ __pyx_v_arr->base = __pyx_v_baseptr; __Pyx_RefNannyFinishContext(); } /* "numpy.pxd":979 * 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); /* "numpy.pxd":980 * * 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) { /* "numpy.pxd":981 * cdef inline object get_array_base(ndarray arr): * if arr.base is NULL: * return None # <<<<<<<<<<<<<< * else: * return arr.base */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(Py_None); __pyx_r = Py_None; goto __pyx_L0; goto __pyx_L3; } /*else*/ { /* "numpy.pxd":983 * return None * else: * return arr.base # <<<<<<<<<<<<<< */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_arr->base)); __pyx_r = ((PyObject *)__pyx_v_arr->base); goto __pyx_L0; } __pyx_L3:; __pyx_r = Py_None; __Pyx_INCREF(Py_None); __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } static struct __pyx_vtabstruct_6pandas_7_sparse_BlockMerge __pyx_vtable_6pandas_7_sparse_BlockMerge; static PyObject *__pyx_tp_new_6pandas_7_sparse_BlockMerge(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { struct __pyx_obj_6pandas_7_sparse_BlockMerge *p; PyObject *o; o = (*t->tp_alloc)(t, 0); if (unlikely(!o)) return 0; p = ((struct __pyx_obj_6pandas_7_sparse_BlockMerge *)o); p->__pyx_vtab = __pyx_vtabptr_6pandas_7_sparse_BlockMerge; p->x = ((struct __pyx_obj_6pandas_7_sparse_BlockIndex *)Py_None); Py_INCREF(Py_None); p->y = ((struct __pyx_obj_6pandas_7_sparse_BlockIndex *)Py_None); Py_INCREF(Py_None); p->result = ((struct __pyx_obj_6pandas_7_sparse_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_7_sparse_BlockMerge(PyObject *o) { struct __pyx_obj_6pandas_7_sparse_BlockMerge *p = (struct __pyx_obj_6pandas_7_sparse_BlockMerge *)o; 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_7_sparse_BlockMerge(PyObject *o, visitproc v, void *a) { int e; struct __pyx_obj_6pandas_7_sparse_BlockMerge *p = (struct __pyx_obj_6pandas_7_sparse_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_7_sparse_BlockMerge(PyObject *o) { struct __pyx_obj_6pandas_7_sparse_BlockMerge *p = (struct __pyx_obj_6pandas_7_sparse_BlockMerge *)o; PyObject* tmp; tmp = ((PyObject*)p->x); p->x = ((struct __pyx_obj_6pandas_7_sparse_BlockIndex *)Py_None); Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->y); p->y = ((struct __pyx_obj_6pandas_7_sparse_BlockIndex *)Py_None); Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->result); p->result = ((struct __pyx_obj_6pandas_7_sparse_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_7_sparse_BlockMerge[] = { {0, 0, 0, 0} }; static PyTypeObject __pyx_type_6pandas_7_sparse_BlockMerge = { PyVarObject_HEAD_INIT(0, 0) __Pyx_NAMESTR("pandas._sparse.BlockMerge"), /*tp_name*/ sizeof(struct __pyx_obj_6pandas_7_sparse_BlockMerge), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_6pandas_7_sparse_BlockMerge, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #else 0, /*reserved*/ #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*/ __Pyx_DOCSTR("\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_7_sparse_BlockMerge, /*tp_traverse*/ __pyx_tp_clear_6pandas_7_sparse_BlockMerge, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_6pandas_7_sparse_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_7_sparse_10BlockMerge_1__init__, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_6pandas_7_sparse_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*/ #if PY_VERSION_HEX >= 0x02060000 0, /*tp_version_tag*/ #endif #if PY_VERSION_HEX >= 0x030400a1 && defined(Py_TPFLAGS_HAVE_FINALIZE) 0, /*tp_finalize*/ #endif }; static struct __pyx_vtabstruct_6pandas_7_sparse_BlockUnion __pyx_vtable_6pandas_7_sparse_BlockUnion; static PyObject *__pyx_tp_new_6pandas_7_sparse_BlockUnion(PyTypeObject *t, PyObject *a, PyObject *k) { struct __pyx_obj_6pandas_7_sparse_BlockUnion *p; PyObject *o = __pyx_tp_new_6pandas_7_sparse_BlockMerge(t, a, k); if (unlikely(!o)) return 0; p = ((struct __pyx_obj_6pandas_7_sparse_BlockUnion *)o); p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_6pandas_7_sparse_BlockMerge*)__pyx_vtabptr_6pandas_7_sparse_BlockUnion; return o; } static PyMethodDef __pyx_methods_6pandas_7_sparse_BlockUnion[] = { {0, 0, 0, 0} }; static PyTypeObject __pyx_type_6pandas_7_sparse_BlockUnion = { PyVarObject_HEAD_INIT(0, 0) __Pyx_NAMESTR("pandas._sparse.BlockUnion"), /*tp_name*/ sizeof(struct __pyx_obj_6pandas_7_sparse_BlockUnion), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_6pandas_7_sparse_BlockMerge, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #else 0, /*reserved*/ #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*/ __Pyx_DOCSTR("\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_7_sparse_BlockMerge, /*tp_traverse*/ __pyx_tp_clear_6pandas_7_sparse_BlockMerge, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_6pandas_7_sparse_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_7_sparse_10BlockMerge_1__init__, /*tp_init*/ #else 0, /*tp_init*/ #endif 0, /*tp_alloc*/ __pyx_tp_new_6pandas_7_sparse_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*/ #if PY_VERSION_HEX >= 0x02060000 0, /*tp_version_tag*/ #endif #if PY_VERSION_HEX >= 0x030400a1 && defined(Py_TPFLAGS_HAVE_FINALIZE) 0, /*tp_finalize*/ #endif }; static PyObject *__pyx_tp_new_6pandas_7_sparse_SparseIndex(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { PyObject *o; o = (*t->tp_alloc)(t, 0); if (unlikely(!o)) return 0; return o; } static void __pyx_tp_dealloc_6pandas_7_sparse_SparseIndex(PyObject *o) { (*Py_TYPE(o)->tp_free)(o); } static PyMethodDef __pyx_methods_6pandas_7_sparse_SparseIndex[] = { {0, 0, 0, 0} }; static PyTypeObject __pyx_type_6pandas_7_sparse_SparseIndex = { PyVarObject_HEAD_INIT(0, 0) __Pyx_NAMESTR("pandas._sparse.SparseIndex"), /*tp_name*/ sizeof(struct __pyx_obj_6pandas_7_sparse_SparseIndex), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_6pandas_7_sparse_SparseIndex, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #else 0, /*reserved*/ #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*/ __Pyx_DOCSTR("\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_7_sparse_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_7_sparse_11SparseIndex_1__init__, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_6pandas_7_sparse_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*/ #if PY_VERSION_HEX >= 0x02060000 0, /*tp_version_tag*/ #endif #if PY_VERSION_HEX >= 0x030400a1 && defined(Py_TPFLAGS_HAVE_FINALIZE) 0, /*tp_finalize*/ #endif }; static struct __pyx_vtabstruct_6pandas_7_sparse_IntIndex __pyx_vtable_6pandas_7_sparse_IntIndex; static PyObject *__pyx_tp_new_6pandas_7_sparse_IntIndex(PyTypeObject *t, PyObject *a, PyObject *k) { struct __pyx_obj_6pandas_7_sparse_IntIndex *p; PyObject *o = __pyx_tp_new_6pandas_7_sparse_SparseIndex(t, a, k); if (unlikely(!o)) return 0; p = ((struct __pyx_obj_6pandas_7_sparse_IntIndex *)o); p->__pyx_vtab = __pyx_vtabptr_6pandas_7_sparse_IntIndex; p->indices = ((PyArrayObject *)Py_None); Py_INCREF(Py_None); return o; } static void __pyx_tp_dealloc_6pandas_7_sparse_IntIndex(PyObject *o) { struct __pyx_obj_6pandas_7_sparse_IntIndex *p = (struct __pyx_obj_6pandas_7_sparse_IntIndex *)o; PyObject_GC_UnTrack(o); Py_CLEAR(p->indices); PyObject_GC_Track(o); __pyx_tp_dealloc_6pandas_7_sparse_SparseIndex(o); } static int __pyx_tp_traverse_6pandas_7_sparse_IntIndex(PyObject *o, visitproc v, void *a) { int e; struct __pyx_obj_6pandas_7_sparse_IntIndex *p = (struct __pyx_obj_6pandas_7_sparse_IntIndex *)o; e = ((likely(__pyx_ptype_6pandas_7_sparse_SparseIndex)) ? ((__pyx_ptype_6pandas_7_sparse_SparseIndex->tp_traverse) ? __pyx_ptype_6pandas_7_sparse_SparseIndex->tp_traverse(o, v, a) : 0) : __Pyx_call_next_tp_traverse(o, v, a, __pyx_tp_traverse_6pandas_7_sparse_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_7_sparse_IntIndex(PyObject *o) { struct __pyx_obj_6pandas_7_sparse_IntIndex *p = (struct __pyx_obj_6pandas_7_sparse_IntIndex *)o; PyObject* tmp; if (likely(__pyx_ptype_6pandas_7_sparse_SparseIndex)) { if (__pyx_ptype_6pandas_7_sparse_SparseIndex->tp_clear) __pyx_ptype_6pandas_7_sparse_SparseIndex->tp_clear(o); } else __Pyx_call_next_tp_clear(o, __pyx_tp_clear_6pandas_7_sparse_IntIndex); tmp = ((PyObject*)p->indices); p->indices = ((PyArrayObject *)Py_None); Py_INCREF(Py_None); Py_XDECREF(tmp); return 0; } static PyObject *__pyx_getprop_6pandas_7_sparse_8IntIndex_length(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6pandas_7_sparse_8IntIndex_6length_1__get__(o); } static PyObject *__pyx_getprop_6pandas_7_sparse_8IntIndex_npoints(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6pandas_7_sparse_8IntIndex_7npoints_1__get__(o); } static PyObject *__pyx_getprop_6pandas_7_sparse_8IntIndex_indices(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6pandas_7_sparse_8IntIndex_7indices_1__get__(o); } static PyMethodDef __pyx_methods_6pandas_7_sparse_IntIndex[] = { {__Pyx_NAMESTR("__reduce__"), (PyCFunction)__pyx_pw_6pandas_7_sparse_8IntIndex_3__reduce__, METH_NOARGS, __Pyx_DOCSTR(0)}, {__Pyx_NAMESTR("check_integrity"), (PyCFunction)__pyx_pw_6pandas_7_sparse_8IntIndex_7check_integrity, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_6pandas_7_sparse_8IntIndex_6check_integrity)}, {__Pyx_NAMESTR("equals"), (PyCFunction)__pyx_pw_6pandas_7_sparse_8IntIndex_9equals, METH_O, __Pyx_DOCSTR(0)}, {__Pyx_NAMESTR("ngaps"), (PyCFunction)__pyx_pw_6pandas_7_sparse_8IntIndex_11ngaps, METH_NOARGS, __Pyx_DOCSTR(0)}, {__Pyx_NAMESTR("to_int_index"), (PyCFunction)__pyx_pw_6pandas_7_sparse_8IntIndex_13to_int_index, METH_NOARGS, __Pyx_DOCSTR(0)}, {__Pyx_NAMESTR("to_block_index"), (PyCFunction)__pyx_pw_6pandas_7_sparse_8IntIndex_15to_block_index, METH_NOARGS, __Pyx_DOCSTR(0)}, {__Pyx_NAMESTR("intersect"), (PyCFunction)__pyx_pw_6pandas_7_sparse_8IntIndex_17intersect, METH_O, __Pyx_DOCSTR(0)}, {__Pyx_NAMESTR("make_union"), (PyCFunction)__pyx_pw_6pandas_7_sparse_8IntIndex_19make_union, METH_O, __Pyx_DOCSTR(0)}, {__Pyx_NAMESTR("lookup"), (PyCFunction)__pyx_pw_6pandas_7_sparse_8IntIndex_21lookup, METH_O, __Pyx_DOCSTR(0)}, {__Pyx_NAMESTR("reindex"), (PyCFunction)__pyx_pw_6pandas_7_sparse_8IntIndex_23reindex, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}, {__Pyx_NAMESTR("put"), (PyCFunction)__pyx_pw_6pandas_7_sparse_8IntIndex_25put, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}, {__Pyx_NAMESTR("take"), (PyCFunction)__pyx_pw_6pandas_7_sparse_8IntIndex_27take, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}, {0, 0, 0, 0} }; static struct PyGetSetDef __pyx_getsets_6pandas_7_sparse_IntIndex[] = { {(char *)"length", __pyx_getprop_6pandas_7_sparse_8IntIndex_length, 0, 0, 0}, {(char *)"npoints", __pyx_getprop_6pandas_7_sparse_8IntIndex_npoints, 0, 0, 0}, {(char *)"indices", __pyx_getprop_6pandas_7_sparse_8IntIndex_indices, 0, 0, 0}, {0, 0, 0, 0, 0} }; static PyTypeObject __pyx_type_6pandas_7_sparse_IntIndex = { PyVarObject_HEAD_INIT(0, 0) __Pyx_NAMESTR("pandas._sparse.IntIndex"), /*tp_name*/ sizeof(struct __pyx_obj_6pandas_7_sparse_IntIndex), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_6pandas_7_sparse_IntIndex, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #else 0, /*reserved*/ #endif __pyx_pw_6pandas_7_sparse_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*/ __Pyx_DOCSTR("\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\n "), /*tp_doc*/ __pyx_tp_traverse_6pandas_7_sparse_IntIndex, /*tp_traverse*/ __pyx_tp_clear_6pandas_7_sparse_IntIndex, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_6pandas_7_sparse_IntIndex, /*tp_methods*/ 0, /*tp_members*/ __pyx_getsets_6pandas_7_sparse_IntIndex, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ __pyx_pw_6pandas_7_sparse_8IntIndex_1__init__, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_6pandas_7_sparse_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*/ #if PY_VERSION_HEX >= 0x02060000 0, /*tp_version_tag*/ #endif #if PY_VERSION_HEX >= 0x030400a1 && defined(Py_TPFLAGS_HAVE_FINALIZE) 0, /*tp_finalize*/ #endif }; static struct __pyx_vtabstruct_6pandas_7_sparse_BlockIndex __pyx_vtable_6pandas_7_sparse_BlockIndex; static PyObject *__pyx_tp_new_6pandas_7_sparse_BlockIndex(PyTypeObject *t, PyObject *a, PyObject *k) { struct __pyx_obj_6pandas_7_sparse_BlockIndex *p; PyObject *o = __pyx_tp_new_6pandas_7_sparse_SparseIndex(t, a, k); if (unlikely(!o)) return 0; p = ((struct __pyx_obj_6pandas_7_sparse_BlockIndex *)o); p->__pyx_vtab = __pyx_vtabptr_6pandas_7_sparse_BlockIndex; p->blocs = ((PyArrayObject *)Py_None); Py_INCREF(Py_None); p->blengths = ((PyArrayObject *)Py_None); Py_INCREF(Py_None); p->__weakref__ = 0; return o; } static void __pyx_tp_dealloc_6pandas_7_sparse_BlockIndex(PyObject *o) { struct __pyx_obj_6pandas_7_sparse_BlockIndex *p = (struct __pyx_obj_6pandas_7_sparse_BlockIndex *)o; PyObject_GC_UnTrack(o); if (p->__weakref__) PyObject_ClearWeakRefs(o); Py_CLEAR(p->blocs); Py_CLEAR(p->blengths); PyObject_GC_Track(o); __pyx_tp_dealloc_6pandas_7_sparse_SparseIndex(o); } static int __pyx_tp_traverse_6pandas_7_sparse_BlockIndex(PyObject *o, visitproc v, void *a) { int e; struct __pyx_obj_6pandas_7_sparse_BlockIndex *p = (struct __pyx_obj_6pandas_7_sparse_BlockIndex *)o; e = ((likely(__pyx_ptype_6pandas_7_sparse_SparseIndex)) ? ((__pyx_ptype_6pandas_7_sparse_SparseIndex->tp_traverse) ? __pyx_ptype_6pandas_7_sparse_SparseIndex->tp_traverse(o, v, a) : 0) : __Pyx_call_next_tp_traverse(o, v, a, __pyx_tp_traverse_6pandas_7_sparse_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_7_sparse_BlockIndex(PyObject *o) { struct __pyx_obj_6pandas_7_sparse_BlockIndex *p = (struct __pyx_obj_6pandas_7_sparse_BlockIndex *)o; PyObject* tmp; if (likely(__pyx_ptype_6pandas_7_sparse_SparseIndex)) { if (__pyx_ptype_6pandas_7_sparse_SparseIndex->tp_clear) __pyx_ptype_6pandas_7_sparse_SparseIndex->tp_clear(o); } else __Pyx_call_next_tp_clear(o, __pyx_tp_clear_6pandas_7_sparse_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_7_sparse_10BlockIndex_nblocks(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6pandas_7_sparse_10BlockIndex_7nblocks_1__get__(o); } static PyObject *__pyx_getprop_6pandas_7_sparse_10BlockIndex_npoints(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6pandas_7_sparse_10BlockIndex_7npoints_1__get__(o); } static PyObject *__pyx_getprop_6pandas_7_sparse_10BlockIndex_length(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6pandas_7_sparse_10BlockIndex_6length_1__get__(o); } static PyObject *__pyx_getprop_6pandas_7_sparse_10BlockIndex_blocs(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6pandas_7_sparse_10BlockIndex_5blocs_1__get__(o); } static PyObject *__pyx_getprop_6pandas_7_sparse_10BlockIndex_blengths(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6pandas_7_sparse_10BlockIndex_8blengths_1__get__(o); } static PyMethodDef __pyx_methods_6pandas_7_sparse_BlockIndex[] = { {__Pyx_NAMESTR("__reduce__"), (PyCFunction)__pyx_pw_6pandas_7_sparse_10BlockIndex_3__reduce__, METH_NOARGS, __Pyx_DOCSTR(0)}, {__Pyx_NAMESTR("ngaps"), (PyCFunction)__pyx_pw_6pandas_7_sparse_10BlockIndex_7ngaps, METH_NOARGS, __Pyx_DOCSTR(0)}, {__Pyx_NAMESTR("check_integrity"), (PyCFunction)__pyx_pw_6pandas_7_sparse_10BlockIndex_9check_integrity, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_6pandas_7_sparse_10BlockIndex_8check_integrity)}, {__Pyx_NAMESTR("equals"), (PyCFunction)__pyx_pw_6pandas_7_sparse_10BlockIndex_11equals, METH_O, __Pyx_DOCSTR(0)}, {__Pyx_NAMESTR("to_block_index"), (PyCFunction)__pyx_pw_6pandas_7_sparse_10BlockIndex_13to_block_index, METH_NOARGS, __Pyx_DOCSTR(0)}, {__Pyx_NAMESTR("to_int_index"), (PyCFunction)__pyx_pw_6pandas_7_sparse_10BlockIndex_15to_int_index, METH_NOARGS, __Pyx_DOCSTR(0)}, {__Pyx_NAMESTR("intersect"), (PyCFunction)__pyx_pw_6pandas_7_sparse_10BlockIndex_17intersect, METH_O, __Pyx_DOCSTR(__pyx_doc_6pandas_7_sparse_10BlockIndex_16intersect)}, {__Pyx_NAMESTR("make_union"), (PyCFunction)__pyx_pw_6pandas_7_sparse_10BlockIndex_19make_union, METH_O, __Pyx_DOCSTR(__pyx_doc_6pandas_7_sparse_10BlockIndex_18make_union)}, {__Pyx_NAMESTR("lookup"), (PyCFunction)__pyx_pw_6pandas_7_sparse_10BlockIndex_21lookup, METH_O, __Pyx_DOCSTR(__pyx_doc_6pandas_7_sparse_10BlockIndex_20lookup)}, {__Pyx_NAMESTR("reindex"), (PyCFunction)__pyx_pw_6pandas_7_sparse_10BlockIndex_23reindex, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}, {__Pyx_NAMESTR("put"), (PyCFunction)__pyx_pw_6pandas_7_sparse_10BlockIndex_25put, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}, {__Pyx_NAMESTR("take"), (PyCFunction)__pyx_pw_6pandas_7_sparse_10BlockIndex_27take, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}, {0, 0, 0, 0} }; static struct PyGetSetDef __pyx_getsets_6pandas_7_sparse_BlockIndex[] = { {(char *)"nblocks", __pyx_getprop_6pandas_7_sparse_10BlockIndex_nblocks, 0, 0, 0}, {(char *)"npoints", __pyx_getprop_6pandas_7_sparse_10BlockIndex_npoints, 0, 0, 0}, {(char *)"length", __pyx_getprop_6pandas_7_sparse_10BlockIndex_length, 0, 0, 0}, {(char *)"blocs", __pyx_getprop_6pandas_7_sparse_10BlockIndex_blocs, 0, 0, 0}, {(char *)"blengths", __pyx_getprop_6pandas_7_sparse_10BlockIndex_blengths, 0, 0, 0}, {0, 0, 0, 0, 0} }; static PyTypeObject __pyx_type_6pandas_7_sparse_BlockIndex = { PyVarObject_HEAD_INIT(0, 0) __Pyx_NAMESTR("pandas._sparse.BlockIndex"), /*tp_name*/ sizeof(struct __pyx_obj_6pandas_7_sparse_BlockIndex), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_6pandas_7_sparse_BlockIndex, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #else 0, /*reserved*/ #endif __pyx_pw_6pandas_7_sparse_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*/ __Pyx_DOCSTR("\n Object for holding block-based sparse indexing information\n\n Parameters\n ----------\n "), /*tp_doc*/ __pyx_tp_traverse_6pandas_7_sparse_BlockIndex, /*tp_traverse*/ __pyx_tp_clear_6pandas_7_sparse_BlockIndex, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_6pandas_7_sparse_BlockIndex, /*tp_methods*/ 0, /*tp_members*/ __pyx_getsets_6pandas_7_sparse_BlockIndex, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ __pyx_pw_6pandas_7_sparse_10BlockIndex_1__init__, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_6pandas_7_sparse_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*/ #if PY_VERSION_HEX >= 0x02060000 0, /*tp_version_tag*/ #endif #if PY_VERSION_HEX >= 0x030400a1 && defined(Py_TPFLAGS_HAVE_FINALIZE) 0, /*tp_finalize*/ #endif }; static struct __pyx_vtabstruct_6pandas_7_sparse_BlockIntersection __pyx_vtable_6pandas_7_sparse_BlockIntersection; static PyObject *__pyx_tp_new_6pandas_7_sparse_BlockIntersection(PyTypeObject *t, PyObject *a, PyObject *k) { struct __pyx_obj_6pandas_7_sparse_BlockIntersection *p; PyObject *o = __pyx_tp_new_6pandas_7_sparse_BlockMerge(t, a, k); if (unlikely(!o)) return 0; p = ((struct __pyx_obj_6pandas_7_sparse_BlockIntersection *)o); p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_6pandas_7_sparse_BlockMerge*)__pyx_vtabptr_6pandas_7_sparse_BlockIntersection; return o; } static PyMethodDef __pyx_methods_6pandas_7_sparse_BlockIntersection[] = { {0, 0, 0, 0} }; static PyTypeObject __pyx_type_6pandas_7_sparse_BlockIntersection = { PyVarObject_HEAD_INIT(0, 0) __Pyx_NAMESTR("pandas._sparse.BlockIntersection"), /*tp_name*/ sizeof(struct __pyx_obj_6pandas_7_sparse_BlockIntersection), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_6pandas_7_sparse_BlockMerge, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #else 0, /*reserved*/ #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*/ __Pyx_DOCSTR("\n not done yet\n "), /*tp_doc*/ __pyx_tp_traverse_6pandas_7_sparse_BlockMerge, /*tp_traverse*/ __pyx_tp_clear_6pandas_7_sparse_BlockMerge, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_6pandas_7_sparse_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_7_sparse_10BlockMerge_1__init__, /*tp_init*/ #else 0, /*tp_init*/ #endif 0, /*tp_alloc*/ __pyx_tp_new_6pandas_7_sparse_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*/ #if PY_VERSION_HEX >= 0x02060000 0, /*tp_version_tag*/ #endif #if PY_VERSION_HEX >= 0x030400a1 && defined(Py_TPFLAGS_HAVE_FINALIZE) 0, /*tp_finalize*/ #endif }; static PyMethodDef __pyx_methods[] = { {__Pyx_NAMESTR("get_blocks"), (PyCFunction)__pyx_pw_6pandas_7_sparse_1get_blocks, METH_O, __Pyx_DOCSTR(0)}, {__Pyx_NAMESTR("sparse_nanadd"), (PyCFunction)__pyx_pw_6pandas_7_sparse_3sparse_nanadd, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}, {__Pyx_NAMESTR("sparse_nansub"), (PyCFunction)__pyx_pw_6pandas_7_sparse_5sparse_nansub, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}, {__Pyx_NAMESTR("sparse_nanrsub"), (PyCFunction)__pyx_pw_6pandas_7_sparse_7sparse_nanrsub, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}, {__Pyx_NAMESTR("sparse_nanmul"), (PyCFunction)__pyx_pw_6pandas_7_sparse_9sparse_nanmul, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}, {__Pyx_NAMESTR("sparse_nandiv"), (PyCFunction)__pyx_pw_6pandas_7_sparse_11sparse_nandiv, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}, {__Pyx_NAMESTR("sparse_nanrdiv"), (PyCFunction)__pyx_pw_6pandas_7_sparse_13sparse_nanrdiv, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}, {__Pyx_NAMESTR("sparse_nanfloordiv"), (PyCFunction)__pyx_pw_6pandas_7_sparse_15sparse_nanfloordiv, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}, {__Pyx_NAMESTR("sparse_nanrfloordiv"), (PyCFunction)__pyx_pw_6pandas_7_sparse_17sparse_nanrfloordiv, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}, {__Pyx_NAMESTR("sparse_nanpow"), (PyCFunction)__pyx_pw_6pandas_7_sparse_19sparse_nanpow, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}, {__Pyx_NAMESTR("sparse_nanrpow"), (PyCFunction)__pyx_pw_6pandas_7_sparse_21sparse_nanrpow, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}, {__Pyx_NAMESTR("sparse_add"), (PyCFunction)__pyx_pw_6pandas_7_sparse_23sparse_add, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}, {__Pyx_NAMESTR("sparse_sub"), (PyCFunction)__pyx_pw_6pandas_7_sparse_25sparse_sub, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}, {__Pyx_NAMESTR("sparse_rsub"), (PyCFunction)__pyx_pw_6pandas_7_sparse_27sparse_rsub, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}, {__Pyx_NAMESTR("sparse_mul"), (PyCFunction)__pyx_pw_6pandas_7_sparse_29sparse_mul, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}, {__Pyx_NAMESTR("sparse_div"), (PyCFunction)__pyx_pw_6pandas_7_sparse_31sparse_div, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}, {__Pyx_NAMESTR("sparse_rdiv"), (PyCFunction)__pyx_pw_6pandas_7_sparse_33sparse_rdiv, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}, {__Pyx_NAMESTR("sparse_floordiv"), (PyCFunction)__pyx_pw_6pandas_7_sparse_35sparse_floordiv, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}, {__Pyx_NAMESTR("sparse_rfloordiv"), (PyCFunction)__pyx_pw_6pandas_7_sparse_37sparse_rfloordiv, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}, {__Pyx_NAMESTR("sparse_pow"), (PyCFunction)__pyx_pw_6pandas_7_sparse_39sparse_pow, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}, {__Pyx_NAMESTR("sparse_rpow"), (PyCFunction)__pyx_pw_6pandas_7_sparse_41sparse_rpow, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}, {0, 0, 0, 0} }; #if PY_MAJOR_VERSION >= 3 static struct PyModuleDef __pyx_moduledef = { #if PY_VERSION_HEX < 0x03020000 { PyObject_HEAD_INIT(NULL) NULL, 0, NULL }, #else PyModuleDef_HEAD_INIT, #endif __Pyx_NAMESTR("_sparse"), 0, /* m_doc */ -1, /* m_size */ __pyx_methods /* m_methods */, NULL, /* m_reload */ NULL, /* m_traverse */ NULL, /* m_clear */ NULL /* m_free */ }; #endif static __Pyx_StringTabEntry __pyx_string_tab[] = { {&__pyx_n_s_1, __pyx_k_1, sizeof(__pyx_k_1), 0, 0, 1, 1}, {&__pyx_kp_s_11, __pyx_k_11, sizeof(__pyx_k_11), 0, 0, 1, 0}, {&__pyx_kp_s_13, __pyx_k_13, sizeof(__pyx_k_13), 0, 0, 1, 0}, {&__pyx_kp_s_14, __pyx_k_14, sizeof(__pyx_k_14), 0, 0, 1, 0}, {&__pyx_kp_s_15, __pyx_k_15, sizeof(__pyx_k_15), 0, 0, 1, 0}, {&__pyx_kp_s_18, __pyx_k_18, sizeof(__pyx_k_18), 0, 0, 1, 0}, {&__pyx_kp_s_2, __pyx_k_2, sizeof(__pyx_k_2), 0, 0, 1, 0}, {&__pyx_kp_u_20, __pyx_k_20, sizeof(__pyx_k_20), 0, 1, 0, 0}, {&__pyx_kp_u_22, __pyx_k_22, sizeof(__pyx_k_22), 0, 1, 0, 0}, {&__pyx_kp_u_24, __pyx_k_24, sizeof(__pyx_k_24), 0, 1, 0, 0}, {&__pyx_kp_u_26, __pyx_k_26, sizeof(__pyx_k_26), 0, 1, 0, 0}, {&__pyx_kp_u_27, __pyx_k_27, sizeof(__pyx_k_27), 0, 1, 0, 0}, {&__pyx_kp_s_3, __pyx_k_3, sizeof(__pyx_k_3), 0, 0, 1, 0}, {&__pyx_kp_u_30, __pyx_k_30, sizeof(__pyx_k_30), 0, 1, 0, 0}, {&__pyx_kp_s_34, __pyx_k_34, sizeof(__pyx_k_34), 0, 0, 1, 0}, {&__pyx_n_s_35, __pyx_k_35, sizeof(__pyx_k_35), 0, 0, 1, 1}, {&__pyx_n_s_6, __pyx_k_6, sizeof(__pyx_k_6), 0, 0, 1, 1}, {&__pyx_kp_s_7, __pyx_k_7, sizeof(__pyx_k_7), 0, 0, 1, 0}, {&__pyx_kp_s_8, __pyx_k_8, sizeof(__pyx_k_8), 0, 0, 1, 0}, {&__pyx_kp_s_9, __pyx_k_9, sizeof(__pyx_k_9), 0, 0, 1, 0}, {&__pyx_n_s__Exception, __pyx_k__Exception, sizeof(__pyx_k__Exception), 0, 0, 1, 1}, {&__pyx_n_s__NaN, __pyx_k__NaN, sizeof(__pyx_k__NaN), 0, 0, 1, 1}, {&__pyx_n_s__NotImplementedError, __pyx_k__NotImplementedError, sizeof(__pyx_k__NotImplementedError), 0, 0, 1, 1}, {&__pyx_n_s__RuntimeError, __pyx_k__RuntimeError, sizeof(__pyx_k__RuntimeError), 0, 0, 1, 1}, {&__pyx_n_s__ValueError, __pyx_k__ValueError, sizeof(__pyx_k__ValueError), 0, 0, 1, 1}, {&__pyx_n_s____import__, __pyx_k____import__, sizeof(__pyx_k____import__), 0, 0, 1, 1}, {&__pyx_n_s____main__, __pyx_k____main__, sizeof(__pyx_k____main__), 0, 0, 1, 1}, {&__pyx_n_s____pyx_getbuffer, __pyx_k____pyx_getbuffer, sizeof(__pyx_k____pyx_getbuffer), 0, 0, 1, 1}, {&__pyx_n_s____pyx_releasebuffer, __pyx_k____pyx_releasebuffer, sizeof(__pyx_k____pyx_releasebuffer), 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____test__, __pyx_k____test__, sizeof(__pyx_k____test__), 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__blengths, __pyx_k__blengths, sizeof(__pyx_k__blengths), 0, 0, 1, 1}, {&__pyx_n_s__blocs, __pyx_k__blocs, sizeof(__pyx_k__blocs), 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__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__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__get_reindexer, __pyx_k__get_reindexer, sizeof(__pyx_k__get_reindexer), 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__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__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__make_union, __pyx_k__make_union, sizeof(__pyx_k__make_union), 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__ngaps, __pyx_k__ngaps, sizeof(__pyx_k__ngaps), 0, 0, 1, 1}, {&__pyx_n_s__np, __pyx_k__np, sizeof(__pyx_k__np), 0, 0, 1, 1}, {&__pyx_n_s__numpy, __pyx_k__numpy, sizeof(__pyx_k__numpy), 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__property, __pyx_k__property, sizeof(__pyx_k__property), 0, 0, 1, 1}, {&__pyx_n_s__put, __pyx_k__put, sizeof(__pyx_k__put), 0, 0, 1, 1}, {&__pyx_n_s__range, __pyx_k__range, sizeof(__pyx_k__range), 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__sparse_div, __pyx_k__sparse_div, sizeof(__pyx_k__sparse_div), 0, 0, 1, 1}, {&__pyx_n_s__sparse_index, __pyx_k__sparse_index, sizeof(__pyx_k__sparse_index), 0, 0, 1, 1}, {&__pyx_n_s__sparse_nandiv, __pyx_k__sparse_nandiv, sizeof(__pyx_k__sparse_nandiv), 0, 0, 1, 1}, {&__pyx_n_s__sparse_nanrdiv, __pyx_k__sparse_nanrdiv, sizeof(__pyx_k__sparse_nanrdiv), 0, 0, 1, 1}, {&__pyx_n_s__sparse_nanrtruediv, __pyx_k__sparse_nanrtruediv, sizeof(__pyx_k__sparse_nanrtruediv), 0, 0, 1, 1}, {&__pyx_n_s__sparse_nantruediv, __pyx_k__sparse_nantruediv, sizeof(__pyx_k__sparse_nantruediv), 0, 0, 1, 1}, {&__pyx_n_s__sparse_rdiv, __pyx_k__sparse_rdiv, sizeof(__pyx_k__sparse_rdiv), 0, 0, 1, 1}, {&__pyx_n_s__sparse_rtruediv, __pyx_k__sparse_rtruediv, sizeof(__pyx_k__sparse_rtruediv), 0, 0, 1, 1}, {&__pyx_n_s__sparse_truediv, __pyx_k__sparse_truediv, sizeof(__pyx_k__sparse_truediv), 0, 0, 1, 1}, {&__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__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__values, __pyx_k__values, sizeof(__pyx_k__values), 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_property = __Pyx_GetBuiltinName(__pyx_n_s__property); if (!__pyx_builtin_property) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_builtin_NotImplementedError = __Pyx_GetBuiltinName(__pyx_n_s__NotImplementedError); if (!__pyx_builtin_NotImplementedError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 30; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_builtin_Exception = __Pyx_GetBuiltinName(__pyx_n_s__Exception); if (!__pyx_builtin_Exception) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_builtin_ValueError = __Pyx_GetBuiltinName(__pyx_n_s__ValueError); if (!__pyx_builtin_ValueError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 322; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_n_s__range); if (!__pyx_builtin_range) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1148; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_builtin_RuntimeError = __Pyx_GetBuiltinName(__pyx_n_s__RuntimeError); if (!__pyx_builtin_RuntimeError) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 803; __pyx_clineno = __LINE__; goto __pyx_L1_error;} return 0; __pyx_L1_error:; return -1; } static int __Pyx_InitCachedConstants(void) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0); /* "pandas/src/sparse.pyx":102 * * if self.length != y.length: * raise Exception('Indices must reference same underlying length') # <<<<<<<<<<<<<< * * xindices = self.indices */ __pyx_k_tuple_4 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_3)); if (unlikely(!__pyx_k_tuple_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_4); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_4)); /* "pandas/src/sparse.pyx":136 * * if self.length != y.length: * raise Exception('Indices must reference same underlying length') # <<<<<<<<<<<<<< * * xindices = self.indices */ __pyx_k_tuple_5 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_3)); if (unlikely(!__pyx_k_tuple_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 136; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_5); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_5)); /* "pandas/src/sparse.pyx":322 * * if len(blocs) != len(blengths): * raise ValueError('block bound arrays must be same length') # <<<<<<<<<<<<<< * * for i from 0 <= i < self.nblocks: */ __pyx_k_tuple_10 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_9)); if (unlikely(!__pyx_k_tuple_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 322; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_10); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_10)); /* "pandas/src/sparse.pyx":327 * if i > 0: * if blocs[i] <= blocs[i-1]: * raise ValueError('Locations not in ascending order') # <<<<<<<<<<<<<< * * if i < self.nblocks - 1: */ __pyx_k_tuple_12 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_11)); if (unlikely(!__pyx_k_tuple_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 327; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_12); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_12)); /* "pandas/src/sparse.pyx":396 * * if self.length != y.length: * raise Exception('Indices must reference same underlying length') # <<<<<<<<<<<<<< * * xloc = self.blocs */ __pyx_k_tuple_16 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_3)); if (unlikely(!__pyx_k_tuple_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 396; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_16); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_16)); /* "pandas/src/sparse.pyx":542 * * if x.length != y.length: * raise Exception('Indices must reference same underlying length') # <<<<<<<<<<<<<< * * self.xstart = self.x.blocs */ __pyx_k_tuple_17 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_3)); if (unlikely(!__pyx_k_tuple_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 542; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_17); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_17)); /* "pandas/src/sparse.pyx":632 * * if mode != 0 and mode != 1: * raise Exception('Mode must be 0 or 1') # <<<<<<<<<<<<<< * * # so symmetric code will work */ __pyx_k_tuple_19 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_18)); if (unlikely(!__pyx_k_tuple_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 632; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_19); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_19)); /* "numpy.pxd":217 * 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_k_tuple_21 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_u_20)); if (unlikely(!__pyx_k_tuple_21)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 217; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_21); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_21)); /* "numpy.pxd":221 * 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_k_tuple_23 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_u_22)); if (unlikely(!__pyx_k_tuple_23)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 221; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_23); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_23)); /* "numpy.pxd":259 * if ((descr.byteorder == '>' and little_endian) or * (descr.byteorder == '<' 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_k_tuple_25 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_u_24)); if (unlikely(!__pyx_k_tuple_25)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 259; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_25); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_25)); /* "numpy.pxd":803 * * if (end - f) - (new_offset - offset[0]) < 15: * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") # <<<<<<<<<<<<<< * * if ((child.byteorder == '>' and little_endian) or */ __pyx_k_tuple_28 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_u_27)); if (unlikely(!__pyx_k_tuple_28)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 803; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_28); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_28)); /* "numpy.pxd":807 * if ((child.byteorder == '>' and little_endian) or * (child.byteorder == '<' 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_k_tuple_29 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_u_24)); if (unlikely(!__pyx_k_tuple_29)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 807; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_29); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_29)); /* "numpy.pxd":827 * 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_k_tuple_31 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_u_30)); if (unlikely(!__pyx_k_tuple_31)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 827; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_31); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_31)); /* "pandas/src/sparse.pyx":1140 * # Indexing operations * * def get_reindexer(ndarray[object, ndim=1] values, dict index_map): # <<<<<<<<<<<<<< * cdef object idx * cdef Py_ssize_t i */ __pyx_k_tuple_32 = PyTuple_Pack(6, ((PyObject *)__pyx_n_s__values), ((PyObject *)__pyx_n_s__index_map), ((PyObject *)__pyx_n_s__idx), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__new_length), ((PyObject *)__pyx_n_s__indexer)); if (unlikely(!__pyx_k_tuple_32)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1140; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_32); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_32)); __pyx_k_codeobj_33 = (PyObject*)__Pyx_PyCode_New(2, 0, 6, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_32, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_34, __pyx_n_s__get_reindexer, 1140, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_33)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1140; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/sparse.pyx":1187 * * * def reindex_integer(ndarray[float64_t, ndim=1] values, # <<<<<<<<<<<<<< * IntIndex sparse_index, * ndarray[int32_t, ndim=1] indexer): */ __pyx_k_tuple_36 = PyTuple_Pack(3, ((PyObject *)__pyx_n_s__values), ((PyObject *)__pyx_n_s__sparse_index), ((PyObject *)__pyx_n_s__indexer)); if (unlikely(!__pyx_k_tuple_36)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1187; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_36); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_36)); __pyx_k_codeobj_37 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_36, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_34, __pyx_n_s__reindex_integer, 1187, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_37)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1187; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __pyx_int_neg_1 = PyInt_FromLong(-1); if (unlikely(!__pyx_int_neg_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __pyx_int_15 = PyInt_FromLong(15); if (unlikely(!__pyx_int_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; return 0; __pyx_L1_error:; return -1; } #if PY_MAJOR_VERSION < 3 PyMODINIT_FUNC init_sparse(void); /*proto*/ PyMODINIT_FUNC init_sparse(void) #else PyMODINIT_FUNC PyInit__sparse(void); /*proto*/ PyMODINIT_FUNC PyInit__sparse(void) #endif { PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; __pyx_t_5numpy_float64_t __pyx_t_3; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannyDeclarations #if CYTHON_REFNANNY __Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny"); if (!__Pyx_RefNanny) { PyErr_Clear(); __Pyx_RefNanny = __Pyx_RefNannyImportAPI("Cython.Runtime.refnanny"); if (!__Pyx_RefNanny) Py_FatalError("failed to import 'refnanny' module"); } #endif __Pyx_RefNannySetupContext("PyMODINIT_FUNC PyInit__sparse(void)", 0); if ( __Pyx_check_binary_version() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_empty_tuple)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_bytes)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #ifdef __Pyx_CyFunction_USED if (__Pyx_CyFunction_init() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif #ifdef __Pyx_FusedFunction_USED if (__pyx_FusedFunction_init() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif #ifdef __Pyx_Generator_USED if (__pyx_Generator_init() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif /*--- Library function declarations ---*/ /*--- Threads initialization code ---*/ #if defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS #ifdef WITH_THREAD /* Python build with threading support? */ PyEval_InitThreads(); #endif #endif /*--- Module creation code ---*/ #if PY_MAJOR_VERSION < 3 __pyx_m = Py_InitModule4(__Pyx_NAMESTR("_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_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_d)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} Py_INCREF(__pyx_d); #if PY_MAJOR_VERSION >= 3 { PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (!PyDict_GetItemString(modules, "pandas._sparse")) { if (unlikely(PyDict_SetItemString(modules, "pandas._sparse", __pyx_m) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } } #endif __pyx_b = PyImport_AddModule(__Pyx_NAMESTR(__Pyx_BUILTIN_MODULE_NAME)); if (unlikely(!__pyx_b)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #if CYTHON_COMPILING_IN_PYPY Py_INCREF(__pyx_b); #endif if (__Pyx_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; /*--- Initialize various global constants etc. ---*/ if (unlikely(__Pyx_InitGlobals() < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif if (__pyx_module_is_main_pandas___sparse) { if (__Pyx_SetAttrString(__pyx_m, "__name__", __pyx_n_s____main__) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; } /*--- Builtin init code ---*/ if (unlikely(__Pyx_InitCachedBuiltins() < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /*--- Constants init code ---*/ if (unlikely(__Pyx_InitCachedConstants() < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /*--- Global init code ---*/ /*--- Variable export code ---*/ /*--- Function export code ---*/ /*--- Type init code ---*/ __pyx_vtabptr_6pandas_7_sparse_BlockMerge = &__pyx_vtable_6pandas_7_sparse_BlockMerge; __pyx_vtable_6pandas_7_sparse_BlockMerge._make_merged_blocks = (PyObject *(*)(struct __pyx_obj_6pandas_7_sparse_BlockMerge *))__pyx_f_6pandas_7_sparse_10BlockMerge__make_merged_blocks; __pyx_vtable_6pandas_7_sparse_BlockMerge._set_current_indices = (PyObject *(*)(struct __pyx_obj_6pandas_7_sparse_BlockMerge *, __pyx_t_5numpy_int32_t, __pyx_t_5numpy_int32_t, int))__pyx_f_6pandas_7_sparse_10BlockMerge__set_current_indices; if (PyType_Ready(&__pyx_type_6pandas_7_sparse_BlockMerge) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 527; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__Pyx_SetVtable(__pyx_type_6pandas_7_sparse_BlockMerge.tp_dict, __pyx_vtabptr_6pandas_7_sparse_BlockMerge) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 527; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__Pyx_SetAttrString(__pyx_m, "BlockMerge", (PyObject *)&__pyx_type_6pandas_7_sparse_BlockMerge) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 527; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_6pandas_7_sparse_BlockMerge = &__pyx_type_6pandas_7_sparse_BlockMerge; __pyx_vtabptr_6pandas_7_sparse_BlockUnion = &__pyx_vtable_6pandas_7_sparse_BlockUnion; __pyx_vtable_6pandas_7_sparse_BlockUnion.__pyx_base = *__pyx_vtabptr_6pandas_7_sparse_BlockMerge; __pyx_vtable_6pandas_7_sparse_BlockUnion.__pyx_base._make_merged_blocks = (PyObject *(*)(struct __pyx_obj_6pandas_7_sparse_BlockMerge *))__pyx_f_6pandas_7_sparse_10BlockUnion__make_merged_blocks; __pyx_vtable_6pandas_7_sparse_BlockUnion._find_next_block_end = (__pyx_t_5numpy_int32_t (*)(struct __pyx_obj_6pandas_7_sparse_BlockUnion *, int))__pyx_f_6pandas_7_sparse_10BlockUnion__find_next_block_end; __pyx_type_6pandas_7_sparse_BlockUnion.tp_base = __pyx_ptype_6pandas_7_sparse_BlockMerge; if (PyType_Ready(&__pyx_type_6pandas_7_sparse_BlockUnion) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 575; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__Pyx_SetVtable(__pyx_type_6pandas_7_sparse_BlockUnion.tp_dict, __pyx_vtabptr_6pandas_7_sparse_BlockUnion) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 575; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__Pyx_SetAttrString(__pyx_m, "BlockUnion", (PyObject *)&__pyx_type_6pandas_7_sparse_BlockUnion) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 575; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_6pandas_7_sparse_BlockUnion = &__pyx_type_6pandas_7_sparse_BlockUnion; if (PyType_Ready(&__pyx_type_6pandas_7_sparse_SparseIndex) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 25; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__Pyx_SetAttrString(__pyx_m, "SparseIndex", (PyObject *)&__pyx_type_6pandas_7_sparse_SparseIndex) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 25; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_6pandas_7_sparse_SparseIndex = &__pyx_type_6pandas_7_sparse_SparseIndex; __pyx_vtabptr_6pandas_7_sparse_IntIndex = &__pyx_vtable_6pandas_7_sparse_IntIndex; __pyx_vtable_6pandas_7_sparse_IntIndex.intersect = (struct __pyx_obj_6pandas_7_sparse_IntIndex *(*)(struct __pyx_obj_6pandas_7_sparse_IntIndex *, struct __pyx_obj_6pandas_7_sparse_SparseIndex *, int __pyx_skip_dispatch))__pyx_f_6pandas_7_sparse_8IntIndex_intersect; __pyx_vtable_6pandas_7_sparse_IntIndex.make_union = (struct __pyx_obj_6pandas_7_sparse_IntIndex *(*)(struct __pyx_obj_6pandas_7_sparse_IntIndex *, struct __pyx_obj_6pandas_7_sparse_SparseIndex *, int __pyx_skip_dispatch))__pyx_f_6pandas_7_sparse_8IntIndex_make_union; __pyx_vtable_6pandas_7_sparse_IntIndex.lookup = (PyObject *(*)(struct __pyx_obj_6pandas_7_sparse_IntIndex *, Py_ssize_t, int __pyx_skip_dispatch))__pyx_f_6pandas_7_sparse_8IntIndex_lookup; __pyx_vtable_6pandas_7_sparse_IntIndex.reindex = (PyArrayObject *(*)(struct __pyx_obj_6pandas_7_sparse_IntIndex *, PyArrayObject *, __pyx_t_5numpy_float64_t, struct __pyx_obj_6pandas_7_sparse_SparseIndex *, int __pyx_skip_dispatch))__pyx_f_6pandas_7_sparse_8IntIndex_reindex; __pyx_vtable_6pandas_7_sparse_IntIndex.put = (PyObject *(*)(struct __pyx_obj_6pandas_7_sparse_IntIndex *, PyArrayObject *, PyArrayObject *, PyObject *, int __pyx_skip_dispatch))__pyx_f_6pandas_7_sparse_8IntIndex_put; __pyx_vtable_6pandas_7_sparse_IntIndex.take = (PyObject *(*)(struct __pyx_obj_6pandas_7_sparse_IntIndex *, PyArrayObject *, PyArrayObject *, int __pyx_skip_dispatch))__pyx_f_6pandas_7_sparse_8IntIndex_take; __pyx_type_6pandas_7_sparse_IntIndex.tp_base = __pyx_ptype_6pandas_7_sparse_SparseIndex; if (PyType_Ready(&__pyx_type_6pandas_7_sparse_IntIndex) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 33; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__Pyx_SetVtable(__pyx_type_6pandas_7_sparse_IntIndex.tp_dict, __pyx_vtabptr_6pandas_7_sparse_IntIndex) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 33; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__Pyx_SetAttrString(__pyx_m, "IntIndex", (PyObject *)&__pyx_type_6pandas_7_sparse_IntIndex) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 33; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_6pandas_7_sparse_IntIndex = &__pyx_type_6pandas_7_sparse_IntIndex; __pyx_vtabptr_6pandas_7_sparse_BlockIndex = &__pyx_vtable_6pandas_7_sparse_BlockIndex; __pyx_vtable_6pandas_7_sparse_BlockIndex.check_integrity = (PyObject *(*)(struct __pyx_obj_6pandas_7_sparse_BlockIndex *, int __pyx_skip_dispatch))__pyx_f_6pandas_7_sparse_10BlockIndex_check_integrity; __pyx_vtable_6pandas_7_sparse_BlockIndex.intersect = (struct __pyx_obj_6pandas_7_sparse_BlockIndex *(*)(struct __pyx_obj_6pandas_7_sparse_BlockIndex *, struct __pyx_obj_6pandas_7_sparse_SparseIndex *, int __pyx_skip_dispatch))__pyx_f_6pandas_7_sparse_10BlockIndex_intersect; __pyx_vtable_6pandas_7_sparse_BlockIndex.make_union = (struct __pyx_obj_6pandas_7_sparse_BlockIndex *(*)(struct __pyx_obj_6pandas_7_sparse_BlockIndex *, struct __pyx_obj_6pandas_7_sparse_SparseIndex *, int __pyx_skip_dispatch))__pyx_f_6pandas_7_sparse_10BlockIndex_make_union; __pyx_vtable_6pandas_7_sparse_BlockIndex.lookup = (PyObject *(*)(struct __pyx_obj_6pandas_7_sparse_BlockIndex *, Py_ssize_t, int __pyx_skip_dispatch))__pyx_f_6pandas_7_sparse_10BlockIndex_lookup; __pyx_vtable_6pandas_7_sparse_BlockIndex.reindex = (PyArrayObject *(*)(struct __pyx_obj_6pandas_7_sparse_BlockIndex *, PyArrayObject *, __pyx_t_5numpy_float64_t, struct __pyx_obj_6pandas_7_sparse_SparseIndex *, int __pyx_skip_dispatch))__pyx_f_6pandas_7_sparse_10BlockIndex_reindex; __pyx_vtable_6pandas_7_sparse_BlockIndex.put = (PyObject *(*)(struct __pyx_obj_6pandas_7_sparse_BlockIndex *, PyArrayObject *, PyArrayObject *, PyObject *, int __pyx_skip_dispatch))__pyx_f_6pandas_7_sparse_10BlockIndex_put; __pyx_vtable_6pandas_7_sparse_BlockIndex.take = (PyObject *(*)(struct __pyx_obj_6pandas_7_sparse_BlockIndex *, PyArrayObject *, PyArrayObject *, int __pyx_skip_dispatch))__pyx_f_6pandas_7_sparse_10BlockIndex_take; __pyx_type_6pandas_7_sparse_BlockIndex.tp_base = __pyx_ptype_6pandas_7_sparse_SparseIndex; if (PyType_Ready(&__pyx_type_6pandas_7_sparse_BlockIndex) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 259; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__Pyx_SetVtable(__pyx_type_6pandas_7_sparse_BlockIndex.tp_dict, __pyx_vtabptr_6pandas_7_sparse_BlockIndex) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 259; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__Pyx_SetAttrString(__pyx_m, "BlockIndex", (PyObject *)&__pyx_type_6pandas_7_sparse_BlockIndex) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 259; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__pyx_type_6pandas_7_sparse_BlockIndex.tp_weaklistoffset == 0) __pyx_type_6pandas_7_sparse_BlockIndex.tp_weaklistoffset = offsetof(struct __pyx_obj_6pandas_7_sparse_BlockIndex, __weakref__); __pyx_ptype_6pandas_7_sparse_BlockIndex = &__pyx_type_6pandas_7_sparse_BlockIndex; __pyx_vtabptr_6pandas_7_sparse_BlockIntersection = &__pyx_vtable_6pandas_7_sparse_BlockIntersection; __pyx_vtable_6pandas_7_sparse_BlockIntersection.__pyx_base = *__pyx_vtabptr_6pandas_7_sparse_BlockMerge; __pyx_type_6pandas_7_sparse_BlockIntersection.tp_base = __pyx_ptype_6pandas_7_sparse_BlockMerge; if (PyType_Ready(&__pyx_type_6pandas_7_sparse_BlockIntersection) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 569; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__Pyx_SetVtable(__pyx_type_6pandas_7_sparse_BlockIntersection.tp_dict, __pyx_vtabptr_6pandas_7_sparse_BlockIntersection) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 569; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__Pyx_SetAttrString(__pyx_m, "BlockIntersection", (PyObject *)&__pyx_type_6pandas_7_sparse_BlockIntersection) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 569; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_6pandas_7_sparse_BlockIntersection = &__pyx_type_6pandas_7_sparse_BlockIntersection; /*--- Type import code ---*/ __pyx_ptype_5numpy_dtype = __Pyx_ImportType("numpy", "dtype", sizeof(PyArray_Descr), 0); if (unlikely(!__pyx_ptype_5numpy_dtype)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_5numpy_flatiter = __Pyx_ImportType("numpy", "flatiter", sizeof(PyArrayIterObject), 0); if (unlikely(!__pyx_ptype_5numpy_flatiter)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 167; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_5numpy_broadcast = __Pyx_ImportType("numpy", "broadcast", sizeof(PyArrayMultiIterObject), 0); if (unlikely(!__pyx_ptype_5numpy_broadcast)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 171; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_5numpy_ndarray = __Pyx_ImportType("numpy", "ndarray", sizeof(PyArrayObject), 0); if (unlikely(!__pyx_ptype_5numpy_ndarray)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_5numpy_ufunc = __Pyx_ImportType("numpy", "ufunc", sizeof(PyUFuncObject), 0); if (unlikely(!__pyx_ptype_5numpy_ufunc)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 865; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /*--- Variable import code ---*/ /*--- Function import code ---*/ /*--- Execution code ---*/ /* "pandas/src/sparse.pyx":6 * cimport cython * * import numpy as np # <<<<<<<<<<<<<< * import operator * import sys */ __pyx_t_1 = __Pyx_Import(((PyObject *)__pyx_n_s__numpy), 0, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 6; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s__np, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 6; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/sparse.pyx":7 * * import numpy as np * import operator # <<<<<<<<<<<<<< * import sys * */ __pyx_t_1 = __Pyx_Import(((PyObject *)__pyx_n_s__operator), 0, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 7; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s__operator, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 7; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/sparse.pyx":8 * import numpy as np * import operator * import sys # <<<<<<<<<<<<<< * * np.import_array() */ __pyx_t_1 = __Pyx_Import(((PyObject *)__pyx_n_s__sys), 0, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 8; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s__sys, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 8; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/sparse.pyx":10 * import sys * * np.import_array() # <<<<<<<<<<<<<< * np.import_ufunc() * */ import_array(); /* "pandas/src/sparse.pyx":11 * * np.import_array() * np.import_ufunc() # <<<<<<<<<<<<<< * * #------------------------------------------------------------------------------- */ import_ufunc(); /* "pandas/src/sparse.pyx":16 * # Preamble stuff * * cdef float64_t NaN = np.NaN # <<<<<<<<<<<<<< * cdef float64_t INF = np.inf * */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 16; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s__NaN); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 16; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_3 = __pyx_PyFloat_AsDouble(__pyx_t_2); if (unlikely((__pyx_t_3 == (npy_float64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 16; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_6pandas_7_sparse_NaN = ((__pyx_t_5numpy_float64_t)__pyx_t_3); /* "pandas/src/sparse.pyx":17 * * 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_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 17; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__inf); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 17; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_3 = __pyx_PyFloat_AsDouble(__pyx_t_1); if (unlikely((__pyx_t_3 == (npy_float64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 17; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_6pandas_7_sparse_INF = ((__pyx_t_5numpy_float64_t)__pyx_t_3); /* "pandas/src/sparse.pyx":80 * * @property * def ngaps(self): # <<<<<<<<<<<<<< * return self.length - self.npoints * */ __pyx_t_1 = __Pyx_GetNameInClass((PyObject *)__pyx_ptype_6pandas_7_sparse_IntIndex, __pyx_n_s__ngaps); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 80; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyObject_Call(__pyx_builtin_property, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; if (PyDict_SetItem((PyObject *)__pyx_ptype_6pandas_7_sparse_IntIndex->tp_dict, __pyx_n_s__ngaps, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 80; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; PyType_Modified(__pyx_ptype_6pandas_7_sparse_IntIndex); /* "pandas/src/sparse.pyx":304 * * @property * def ngaps(self): # <<<<<<<<<<<<<< * return self.length - self.npoints * */ __pyx_t_1 = __Pyx_GetNameInClass((PyObject *)__pyx_ptype_6pandas_7_sparse_BlockIndex, __pyx_n_s__ngaps); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 304; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 303; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyObject_Call(__pyx_builtin_property, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 303; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; if (PyDict_SetItem((PyObject *)__pyx_ptype_6pandas_7_sparse_BlockIndex->tp_dict, __pyx_n_s__ngaps, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 304; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; PyType_Modified(__pyx_ptype_6pandas_7_sparse_BlockIndex); /* "pandas/src/sparse.pyx":1064 * return sparse_nancombine(x, xindex, y, yindex, __rdiv) * * sparse_nantruediv = sparse_nandiv # <<<<<<<<<<<<<< * sparse_nanrtruediv = sparse_nanrdiv * */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__sparse_nandiv); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1064; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s__sparse_nantruediv, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1064; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/sparse.pyx":1065 * * sparse_nantruediv = sparse_nandiv * sparse_nanrtruediv = sparse_nanrdiv # <<<<<<<<<<<<<< * * cpdef sparse_nanfloordiv(ndarray x, SparseIndex xindex, */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__sparse_nanrdiv); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1065; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s__sparse_nanrtruediv, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1065; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/sparse.pyx":1113 * y, yindex, yfill, __rdiv) * * sparse_truediv = sparse_div # <<<<<<<<<<<<<< * sparse_rtruediv = sparse_rdiv * */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__sparse_div); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1113; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s__sparse_truediv, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1113; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/sparse.pyx":1114 * * sparse_truediv = sparse_div * sparse_rtruediv = sparse_rdiv # <<<<<<<<<<<<<< * * cpdef sparse_floordiv(ndarray x, SparseIndex xindex, float64_t xfill, */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__sparse_rdiv); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1114; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s__sparse_rtruediv, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1114; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/sparse.pyx":1140 * # Indexing operations * * def get_reindexer(ndarray[object, ndim=1] values, dict index_map): # <<<<<<<<<<<<<< * cdef object idx * cdef Py_ssize_t i */ __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_6pandas_7_sparse_43get_reindexer, NULL, __pyx_n_s_35); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1140; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s__get_reindexer, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1140; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/sparse.pyx":1187 * * * def reindex_integer(ndarray[float64_t, ndim=1] values, # <<<<<<<<<<<<<< * IntIndex sparse_index, * ndarray[int32_t, ndim=1] indexer): */ __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_6pandas_7_sparse_45reindex_integer, NULL, __pyx_n_s_35); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1187; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s__reindex_integer, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1187; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/sparse.pyx":1 * from numpy cimport ndarray, int32_t, float64_t # <<<<<<<<<<<<<< * cimport numpy as np * */ __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_1)); if (PyDict_SetItem(__pyx_d, __pyx_n_s____test__, ((PyObject *)__pyx_t_1)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; /* "numpy.pxd":979 * arr.base = baseptr * * cdef inline object get_array_base(ndarray arr): # <<<<<<<<<<<<<< * if arr.base is NULL: * return None */ goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); if (__pyx_m) { __Pyx_AddTraceback("init pandas._sparse", __pyx_clineno, __pyx_lineno, __pyx_filename); Py_DECREF(__pyx_m); __pyx_m = 0; } else if (!PyErr_Occurred()) { PyErr_SetString(PyExc_ImportError, "init pandas._sparse"); } __pyx_L0:; __Pyx_RefNannyFinishContext(); #if PY_MAJOR_VERSION < 3 return; #else return __pyx_m; #endif } /* Runtime support code */ #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 /* CYTHON_REFNANNY */ 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 '%s' is not defined", PyString_AS_STRING(name)); #endif } return result; } 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, "%s() takes %s %" CYTHON_FORMAT_SSIZE_T "d positional argument%s (%" CYTHON_FORMAT_SSIZE_T "d given)", func_name, more_or_less, num_expected, (num_expected == 1) ? "" : "s", num_found); } static CYTHON_INLINE int __Pyx_CheckKeywordStrings( PyObject *kwdict, const char* function_name, int kw_allowed) { PyObject* key = 0; Py_ssize_t pos = 0; #if CPYTHON_COMPILING_IN_PYPY if (!kw_allowed && PyDict_Next(kwdict, &pos, &key, 0)) goto invalid_keyword; return 1; #else while (PyDict_Next(kwdict, &pos, &key, 0)) { #if PY_MAJOR_VERSION < 3 if (unlikely(!PyString_CheckExact(key)) && unlikely(!PyString_Check(key))) #endif if (unlikely(!PyUnicode_Check(key))) goto invalid_keyword_type; } if ((!kw_allowed) && unlikely(key)) goto invalid_keyword; return 1; invalid_keyword_type: PyErr_Format(PyExc_TypeError, "%s() keywords must be strings", function_name); return 0; #endif invalid_keyword: PyErr_Format(PyExc_TypeError, #if PY_MAJOR_VERSION < 3 "%s() got an unexpected keyword argument '%s'", function_name, PyString_AsString(key)); #else "%s() got an unexpected keyword argument '%U'", function_name, key); #endif return 0; } static CYTHON_INLINE void __Pyx_ErrRestore(PyObject *type, PyObject *value, PyObject *tb) { #if CYTHON_COMPILING_IN_CPYTHON PyObject *tmp_type, *tmp_value, *tmp_tb; PyThreadState *tstate = PyThreadState_GET(); 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); #else PyErr_Restore(type, value, tb); #endif } static CYTHON_INLINE void __Pyx_ErrFetch(PyObject **type, PyObject **value, PyObject **tb) { #if CYTHON_COMPILING_IN_CPYTHON PyThreadState *tstate = PyThreadState_GET(); *type = tstate->curexc_type; *value = tstate->curexc_value; *tb = tstate->curexc_traceback; tstate->curexc_type = 0; tstate->curexc_value = 0; tstate->curexc_traceback = 0; #else PyErr_Fetch(type, value, tb); #endif } #if PY_MAJOR_VERSION < 3 static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, CYTHON_UNUSED PyObject *cause) { 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 PY_VERSION_HEX < 0x02050000 if (PyClass_Check(type)) { #else if (PyType_Check(type)) { #endif #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; #if PY_VERSION_HEX < 0x02050000 if (PyInstance_Check(type)) { type = (PyObject*) ((PyInstanceObject*)type)->in_class; Py_INCREF(type); } else { type = 0; PyErr_SetString(PyExc_TypeError, "raise: exception must be an old-style class or instance"); goto raise_error; } #else 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; } #endif } __Pyx_ErrRestore(type, value, tb); return; raise_error: Py_XDECREF(value); Py_XDECREF(type); Py_XDECREF(tb); return; } #else /* Python 3+ */ 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 *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 = PyEval_CallObject(type, args); Py_DECREF(args); if (!owned_instance) goto bad; value = owned_instance; if (!PyExceptionInstance_Check(value)) { PyErr_Format(PyExc_TypeError, "calling %R should have returned an instance of " "BaseException, not %R", type, Py_TYPE(value)); goto bad; } } else { PyErr_SetString(PyExc_TypeError, "raise: exception class must be a subclass of BaseException"); goto bad; } #if PY_VERSION_HEX >= 0x03030000 if (cause) { #else if (cause && cause != Py_None) { #endif PyObject *fixed_cause; if (cause == Py_None) { fixed_cause = NULL; } else if (PyExceptionClass_Check(cause)) { fixed_cause = PyObject_CallObject(cause, NULL); if (fixed_cause == NULL) goto bad; } else if (PyExceptionInstance_Check(cause)) { fixed_cause = cause; Py_INCREF(fixed_cause); } else { PyErr_SetString(PyExc_TypeError, "exception causes must derive from " "BaseException"); goto bad; } PyException_SetCause(value, fixed_cause); } PyErr_SetObject(type, value); if (tb) { PyThreadState *tstate = PyThreadState_GET(); PyObject* tmp_tb = tstate->curexc_traceback; if (tb != tmp_tb) { Py_INCREF(tb); tstate->curexc_traceback = tb; Py_XDECREF(tmp_tb); } } bad: Py_XDECREF(owned_instance); return; } #endif 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 } 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, "%s() keywords must be strings", function_name); goto bad; invalid_keyword: PyErr_Format(PyExc_TypeError, #if PY_MAJOR_VERSION < 3 "%s() got an unexpected keyword argument '%s'", function_name, PyString_AsString(key)); #else "%s() got an unexpected keyword argument '%U'", function_name, key); #endif bad: return -1; } static CYTHON_INLINE PyObject *__Pyx_GetModuleGlobalName(PyObject *name) { PyObject *result; #if CYTHON_COMPILING_IN_CPYTHON result = PyDict_GetItem(__pyx_d, name); if (result) { Py_INCREF(result); } else { #else result = PyObject_GetItem(__pyx_d, name); if (!result) { PyErr_Clear(); #endif result = __Pyx_GetBuiltinName(name); } return result; } static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type) { if (unlikely(!type)) { PyErr_Format(PyExc_SystemError, "Missing type object"); return 0; } if (likely(PyObject_TypeCheck(obj, type))) return 1; PyErr_Format(PyExc_TypeError, "Cannot convert %.200s to %.200s", Py_TYPE(obj)->tp_name, type->tp_name); return 0; } 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); } static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index) { PyErr_Format(PyExc_ValueError, "need more than %" CYTHON_FORMAT_SSIZE_T "d value%s to unpack", index, (index == 1) ? "" : "s"); } static CYTHON_INLINE int __Pyx_IterFinish(void) { #if CYTHON_COMPILING_IN_CPYTHON PyThreadState *tstate = PyThreadState_GET(); PyObject* exc_type = tstate->curexc_type; if (unlikely(exc_type)) { if (likely(exc_type == PyExc_StopIteration) || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration)) { PyObject *exc_value, *exc_tb; exc_value = tstate->curexc_value; exc_tb = tstate->curexc_traceback; tstate->curexc_type = 0; tstate->curexc_value = 0; tstate->curexc_traceback = 0; Py_DECREF(exc_type); Py_XDECREF(exc_value); Py_XDECREF(exc_tb); return 0; } else { return -1; } } return 0; #else if (unlikely(PyErr_Occurred())) { if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) { PyErr_Clear(); return 0; } else { return -1; } } return 0; #endif } 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; } static CYTHON_INLINE int __Pyx_IsLittleEndian(void) { unsigned int n = 1; return *(unsigned char*)(&n) != 0; } 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) /* First char was not a digit */ 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; /* Consume from buffer string */ while (1) { if (field == &ctx->root) { ctx->head = NULL; if (ctx->enc_count != 0) { __Pyx_BufFmt_RaiseExpected(ctx); return -1; } break; /* breaks both loops as ctx->enc_count == 0 */ } 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; /* empty struct */ 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 CYTHON_INLINE 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 != ')') { if (isspace(*ts)) continue; 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 10: case 13: ++ts; break; case '<': if (!__Pyx_IsLittleEndian()) { PyErr_SetString(PyExc_ValueError, "Little-endian buffer not supported on big-endian compiler"); return NULL; } ctx->new_packmode = '='; ++ts; break; case '>': case '!': if (__Pyx_IsLittleEndian()) { 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': /* substruct */ { 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; /* Erase processed last struct element */ 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 '}': /* end of substruct; either repeat or move on */ { size_t alignment = ctx->struct_alignment; ++ts; if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL; ctx->enc_type = 0; /* Erase processed last struct element */ 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; } /* fall through */ 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 's': case 'p': if (ctx->enc_type == *ts && got_Z == ctx->is_complex && ctx->enc_packmode == ctx->new_packmode) { ctx->enc_count += ctx->new_count; } else { 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; } } } } static CYTHON_INLINE 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 CYTHON_INLINE int __Pyx_GetBufferAndValidate( Py_buffer* buf, PyObject* obj, __Pyx_TypeInfo* dtype, int flags, int nd, int cast, __Pyx_BufFmt_StackElem* stack) { if (obj == Py_None || obj == NULL) { __Pyx_ZeroBuffer(buf); return 0; } buf->buf = NULL; if (__Pyx_GetBuffer(obj, buf, flags) == -1) goto fail; if (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 ((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_ZeroBuffer(buf); return -1; } static CYTHON_INLINE void __Pyx_SafeReleaseBuffer(Py_buffer* info) { if (info->buf == NULL) return; if (info->suboffsets == __Pyx_minusones) info->suboffsets = NULL; __Pyx_ReleaseBuffer(info); } static void __Pyx_RaiseBufferFallbackError(void) { PyErr_Format(PyExc_ValueError, "Buffer acquisition failed on assignment; and then reacquiring the old buffer failed too!"); } static void __Pyx_RaiseBufferIndexError(int axis) { PyErr_Format(PyExc_IndexError, "Out of bounds on buffer access (axis %d)", axis); } static int __Pyx_ArgTypeTest(PyObject *obj, PyTypeObject *type, int none_allowed, const char *name, int exact) { if (!type) { PyErr_Format(PyExc_SystemError, "Missing type object"); return 0; } if (none_allowed && obj == Py_None) return 1; else if (exact) { if (Py_TYPE(obj) == type) return 1; } else { if (PyObject_TypeCheck(obj, type)) return 1; } PyErr_Format(PyExc_TypeError, "Argument '%s' has incorrect type (expected %s, got %s)", name, type->tp_name, Py_TYPE(obj)->tp_name); return 0; } static void __Pyx_WriteUnraisable(const char *name, CYTHON_UNUSED int clineno, CYTHON_UNUSED int lineno, CYTHON_UNUSED const char *filename) { PyObject *old_exc, *old_val, *old_tb; PyObject *ctx; __Pyx_ErrFetch(&old_exc, &old_val, &old_tb); #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); } } static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); } 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; } 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); } static int __Pyx_SetVtable(PyObject *dict, void *vtable) { #if PY_VERSION_HEX >= 0x02070000 && !(PY_MAJOR_VERSION==3&&PY_MINOR_VERSION==0) 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; } static PyObject *__Pyx_GetNameInClass(PyObject *nmspace, PyObject *name) { PyObject *result; result = __Pyx_PyObject_GetAttrStr(nmspace, name); if (!result) result = __Pyx_GetModuleGlobalName(name); return result; } #if PY_MAJOR_VERSION < 3 static int __Pyx_GetBuffer(PyObject *obj, Py_buffer *view, int flags) { #if PY_VERSION_HEX >= 0x02060000 if (PyObject_CheckBuffer(obj)) return PyObject_GetBuffer(obj, view, flags); #endif if (PyObject_TypeCheck(obj, __pyx_ptype_5numpy_ndarray)) return __pyx_pw_5numpy_7ndarray_1__getbuffer__(obj, view, flags); #if PY_VERSION_HEX < 0x02060000 if (obj->ob_type->tp_dict) { PyObject *getbuffer_cobj = PyObject_GetItem( obj->ob_type->tp_dict, __pyx_n_s____pyx_getbuffer); if (getbuffer_cobj) { getbufferproc func = (getbufferproc) PyCObject_AsVoidPtr(getbuffer_cobj); Py_DECREF(getbuffer_cobj); if (!func) goto fail; return func(obj, view, flags); } else { PyErr_Clear(); } } #endif PyErr_Format(PyExc_TypeError, "'%100s' does not have the buffer interface", Py_TYPE(obj)->tp_name); #if PY_VERSION_HEX < 0x02060000 fail: #endif return -1; } static void __Pyx_ReleaseBuffer(Py_buffer *view) { PyObject *obj = view->obj; if (!obj) return; #if PY_VERSION_HEX >= 0x02060000 if (PyObject_CheckBuffer(obj)) { PyBuffer_Release(view); return; } #endif if (PyObject_TypeCheck(obj, __pyx_ptype_5numpy_ndarray)) { __pyx_pw_5numpy_7ndarray_3__releasebuffer__(obj, view); return; } #if PY_VERSION_HEX < 0x02060000 if (obj->ob_type->tp_dict) { PyObject *releasebuffer_cobj = PyObject_GetItem( obj->ob_type->tp_dict, __pyx_n_s____pyx_releasebuffer); if (releasebuffer_cobj) { releasebufferproc func = (releasebufferproc) PyCObject_AsVoidPtr(releasebuffer_cobj); Py_DECREF(releasebuffer_cobj); if (!func) goto fail; func(obj, view); return; } else { PyErr_Clear(); } } #endif goto nofail; #if PY_VERSION_HEX < 0x02060000 fail: #endif PyErr_WriteUnraisable(obj); nofail: Py_DECREF(obj); view->obj = NULL; } #endif /* PY_MAJOR_VERSION < 3 */ static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level) { PyObject *empty_list = 0; PyObject *module = 0; PyObject *global_dict = 0; PyObject *empty_dict = 0; PyObject *list; #if PY_VERSION_HEX < 0x03030000 PyObject *py_import; py_import = __Pyx_PyObject_GetAttrStr(__pyx_b, __pyx_n_s____import__); if (!py_import) goto bad; #endif if (from_list) list = from_list; else { empty_list = PyList_New(0); if (!empty_list) goto bad; list = empty_list; } global_dict = PyModule_GetDict(__pyx_m); if (!global_dict) goto bad; empty_dict = PyDict_New(); if (!empty_dict) goto bad; #if PY_VERSION_HEX >= 0x02050000 { #if PY_MAJOR_VERSION >= 3 if (level == -1) { if (strchr(__Pyx_MODULE_NAME, '.')) { #if PY_VERSION_HEX < 0x03030000 PyObject *py_level = PyInt_FromLong(1); if (!py_level) goto bad; module = PyObject_CallFunctionObjArgs(py_import, name, global_dict, empty_dict, list, py_level, NULL); Py_DECREF(py_level); #else module = PyImport_ImportModuleLevelObject( name, global_dict, empty_dict, list, 1); #endif if (!module) { if (!PyErr_ExceptionMatches(PyExc_ImportError)) goto bad; PyErr_Clear(); } } level = 0; /* try absolute import on failure */ } #endif if (!module) { #if PY_VERSION_HEX < 0x03030000 PyObject *py_level = PyInt_FromLong(level); if (!py_level) goto bad; module = PyObject_CallFunctionObjArgs(py_import, name, global_dict, empty_dict, list, py_level, NULL); Py_DECREF(py_level); #else module = PyImport_ImportModuleLevelObject( name, global_dict, empty_dict, list, level); #endif } } #else if (level>0) { PyErr_SetString(PyExc_RuntimeError, "Relative import is not supported for Python <=2.4."); goto bad; } module = PyObject_CallFunctionObjArgs(py_import, name, global_dict, empty_dict, list, NULL); #endif bad: #if PY_VERSION_HEX < 0x03030000 Py_XDECREF(py_import); #endif Py_XDECREF(empty_list); Py_XDECREF(empty_dict); return module; } static CYTHON_INLINE PyObject *__Pyx_PyInt_to_py_npy_int32(npy_int32 val) { const npy_int32 neg_one = (npy_int32)-1, const_zero = (npy_int32)0; const int is_unsigned = const_zero < neg_one; if ((sizeof(npy_int32) == sizeof(char)) || (sizeof(npy_int32) == sizeof(short))) { return PyInt_FromLong((long)val); } else if ((sizeof(npy_int32) == sizeof(int)) || (sizeof(npy_int32) == sizeof(long))) { if (is_unsigned) return PyLong_FromUnsignedLong((unsigned long)val); else return PyInt_FromLong((long)val); } else if (sizeof(npy_int32) == sizeof(PY_LONG_LONG)) { if (is_unsigned) return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG)val); else return PyLong_FromLongLong((PY_LONG_LONG)val); } else { int one = 1; int little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&val; return _PyLong_FromByteArray(bytes, sizeof(npy_int32), little, !is_unsigned); } } static CYTHON_INLINE npy_int32 __Pyx_PyInt_from_py_npy_int32(PyObject* x) { const npy_int32 neg_one = (npy_int32)-1, const_zero = (npy_int32)0; const int is_unsigned = const_zero < neg_one; if (sizeof(npy_int32) == sizeof(char)) { if (is_unsigned) return (npy_int32)__Pyx_PyInt_AsUnsignedChar(x); else return (npy_int32)__Pyx_PyInt_AsSignedChar(x); } else if (sizeof(npy_int32) == sizeof(short)) { if (is_unsigned) return (npy_int32)__Pyx_PyInt_AsUnsignedShort(x); else return (npy_int32)__Pyx_PyInt_AsSignedShort(x); } else if (sizeof(npy_int32) == sizeof(int)) { if (is_unsigned) return (npy_int32)__Pyx_PyInt_AsUnsignedInt(x); else return (npy_int32)__Pyx_PyInt_AsSignedInt(x); } else if (sizeof(npy_int32) == sizeof(long)) { if (is_unsigned) return (npy_int32)__Pyx_PyInt_AsUnsignedLong(x); else return (npy_int32)__Pyx_PyInt_AsSignedLong(x); } else if (sizeof(npy_int32) == sizeof(PY_LONG_LONG)) { if (is_unsigned) return (npy_int32)__Pyx_PyInt_AsUnsignedLongLong(x); else return (npy_int32)__Pyx_PyInt_AsSignedLongLong(x); } else { #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_Int(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; } } #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 #if CYTHON_CCOMPLEX #else static CYTHON_INLINE int __Pyx_c_eqf(__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_sumf(__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_difff(__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_prodf(__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; } static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_quotf(__pyx_t_float_complex a, __pyx_t_float_complex b) { __pyx_t_float_complex z; float denom = b.real * b.real + b.imag * b.imag; z.real = (a.real * b.real + a.imag * b.imag) / denom; z.imag = (a.imag * b.real - a.real * b.imag) / denom; return z; } static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_negf(__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_zerof(__pyx_t_float_complex a) { return (a.real == 0) && (a.imag == 0); } static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_conjf(__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_absf(__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_powf(__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_prodf(a, a); return __Pyx_c_prodf(a, a); case 3: z = __Pyx_c_prodf(a, a); return __Pyx_c_prodf(z, a); case 4: z = __Pyx_c_prodf(a, a); return __Pyx_c_prodf(z, z); } } if (a.imag == 0) { if (a.real == 0) { return a; } r = a.real; theta = 0; } else { r = __Pyx_c_absf(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 #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 #if CYTHON_CCOMPLEX #else static CYTHON_INLINE int __Pyx_c_eq(__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(__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(__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(__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; } static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_quot(__pyx_t_double_complex a, __pyx_t_double_complex b) { __pyx_t_double_complex z; double denom = b.real * b.real + b.imag * b.imag; z.real = (a.real * b.real + a.imag * b.imag) / denom; z.imag = (a.imag * b.real - a.real * b.imag) / denom; return z; } static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_neg(__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(__pyx_t_double_complex a) { return (a.real == 0) && (a.imag == 0); } static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_conj(__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(__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(__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(a, a); return __Pyx_c_prod(a, a); case 3: z = __Pyx_c_prod(a, a); return __Pyx_c_prod(z, a); case 4: z = __Pyx_c_prod(a, a); return __Pyx_c_prod(z, z); } } if (a.imag == 0) { if (a.real == 0) { return a; } r = a.real; theta = 0; } else { r = __Pyx_c_abs(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 static CYTHON_INLINE unsigned char __Pyx_PyInt_AsUnsignedChar(PyObject* x) { const unsigned char neg_one = (unsigned char)-1, const_zero = 0; const int is_unsigned = neg_one > const_zero; if (sizeof(unsigned char) < sizeof(long)) { long val = __Pyx_PyInt_AsLong(x); if (unlikely(val != (long)(unsigned char)val)) { if (!unlikely(val == -1 && PyErr_Occurred())) { PyErr_SetString(PyExc_OverflowError, (is_unsigned && unlikely(val < 0)) ? "can't convert negative value to unsigned char" : "value too large to convert to unsigned char"); } return (unsigned char)-1; } return (unsigned char)val; } return (unsigned char)__Pyx_PyInt_AsUnsignedLong(x); } static CYTHON_INLINE unsigned short __Pyx_PyInt_AsUnsignedShort(PyObject* x) { const unsigned short neg_one = (unsigned short)-1, const_zero = 0; const int is_unsigned = neg_one > const_zero; if (sizeof(unsigned short) < sizeof(long)) { long val = __Pyx_PyInt_AsLong(x); if (unlikely(val != (long)(unsigned short)val)) { if (!unlikely(val == -1 && PyErr_Occurred())) { PyErr_SetString(PyExc_OverflowError, (is_unsigned && unlikely(val < 0)) ? "can't convert negative value to unsigned short" : "value too large to convert to unsigned short"); } return (unsigned short)-1; } return (unsigned short)val; } return (unsigned short)__Pyx_PyInt_AsUnsignedLong(x); } static CYTHON_INLINE unsigned int __Pyx_PyInt_AsUnsignedInt(PyObject* x) { const unsigned int neg_one = (unsigned int)-1, const_zero = 0; const int is_unsigned = neg_one > const_zero; if (sizeof(unsigned int) < sizeof(long)) { long val = __Pyx_PyInt_AsLong(x); if (unlikely(val != (long)(unsigned int)val)) { if (!unlikely(val == -1 && PyErr_Occurred())) { PyErr_SetString(PyExc_OverflowError, (is_unsigned && unlikely(val < 0)) ? "can't convert negative value to unsigned int" : "value too large to convert to unsigned int"); } return (unsigned int)-1; } return (unsigned int)val; } return (unsigned int)__Pyx_PyInt_AsUnsignedLong(x); } static CYTHON_INLINE char __Pyx_PyInt_AsChar(PyObject* x) { const char neg_one = (char)-1, const_zero = 0; const int is_unsigned = neg_one > const_zero; if (sizeof(char) < sizeof(long)) { long val = __Pyx_PyInt_AsLong(x); if (unlikely(val != (long)(char)val)) { if (!unlikely(val == -1 && PyErr_Occurred())) { PyErr_SetString(PyExc_OverflowError, (is_unsigned && unlikely(val < 0)) ? "can't convert negative value to char" : "value too large to convert to char"); } return (char)-1; } return (char)val; } return (char)__Pyx_PyInt_AsLong(x); } static CYTHON_INLINE short __Pyx_PyInt_AsShort(PyObject* x) { const short neg_one = (short)-1, const_zero = 0; const int is_unsigned = neg_one > const_zero; if (sizeof(short) < sizeof(long)) { long val = __Pyx_PyInt_AsLong(x); if (unlikely(val != (long)(short)val)) { if (!unlikely(val == -1 && PyErr_Occurred())) { PyErr_SetString(PyExc_OverflowError, (is_unsigned && unlikely(val < 0)) ? "can't convert negative value to short" : "value too large to convert to short"); } return (short)-1; } return (short)val; } return (short)__Pyx_PyInt_AsLong(x); } static CYTHON_INLINE int __Pyx_PyInt_AsInt(PyObject* x) { const int neg_one = (int)-1, const_zero = 0; const int is_unsigned = neg_one > const_zero; if (sizeof(int) < sizeof(long)) { long val = __Pyx_PyInt_AsLong(x); if (unlikely(val != (long)(int)val)) { if (!unlikely(val == -1 && PyErr_Occurred())) { PyErr_SetString(PyExc_OverflowError, (is_unsigned && unlikely(val < 0)) ? "can't convert negative value to int" : "value too large to convert to int"); } return (int)-1; } return (int)val; } return (int)__Pyx_PyInt_AsLong(x); } static CYTHON_INLINE signed char __Pyx_PyInt_AsSignedChar(PyObject* x) { const signed char neg_one = (signed char)-1, const_zero = 0; const int is_unsigned = neg_one > const_zero; if (sizeof(signed char) < sizeof(long)) { long val = __Pyx_PyInt_AsLong(x); if (unlikely(val != (long)(signed char)val)) { if (!unlikely(val == -1 && PyErr_Occurred())) { PyErr_SetString(PyExc_OverflowError, (is_unsigned && unlikely(val < 0)) ? "can't convert negative value to signed char" : "value too large to convert to signed char"); } return (signed char)-1; } return (signed char)val; } return (signed char)__Pyx_PyInt_AsSignedLong(x); } static CYTHON_INLINE signed short __Pyx_PyInt_AsSignedShort(PyObject* x) { const signed short neg_one = (signed short)-1, const_zero = 0; const int is_unsigned = neg_one > const_zero; if (sizeof(signed short) < sizeof(long)) { long val = __Pyx_PyInt_AsLong(x); if (unlikely(val != (long)(signed short)val)) { if (!unlikely(val == -1 && PyErr_Occurred())) { PyErr_SetString(PyExc_OverflowError, (is_unsigned && unlikely(val < 0)) ? "can't convert negative value to signed short" : "value too large to convert to signed short"); } return (signed short)-1; } return (signed short)val; } return (signed short)__Pyx_PyInt_AsSignedLong(x); } static CYTHON_INLINE signed int __Pyx_PyInt_AsSignedInt(PyObject* x) { const signed int neg_one = (signed int)-1, const_zero = 0; const int is_unsigned = neg_one > const_zero; if (sizeof(signed int) < sizeof(long)) { long val = __Pyx_PyInt_AsLong(x); if (unlikely(val != (long)(signed int)val)) { if (!unlikely(val == -1 && PyErr_Occurred())) { PyErr_SetString(PyExc_OverflowError, (is_unsigned && unlikely(val < 0)) ? "can't convert negative value to signed int" : "value too large to convert to signed int"); } return (signed int)-1; } return (signed int)val; } return (signed int)__Pyx_PyInt_AsSignedLong(x); } static CYTHON_INLINE int __Pyx_PyInt_AsLongDouble(PyObject* x) { const int neg_one = (int)-1, const_zero = 0; const int is_unsigned = neg_one > const_zero; if (sizeof(int) < sizeof(long)) { long val = __Pyx_PyInt_AsLong(x); if (unlikely(val != (long)(int)val)) { if (!unlikely(val == -1 && PyErr_Occurred())) { PyErr_SetString(PyExc_OverflowError, (is_unsigned && unlikely(val < 0)) ? "can't convert negative value to int" : "value too large to convert to int"); } return (int)-1; } return (int)val; } return (int)__Pyx_PyInt_AsLong(x); } #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS #include "longintrepr.h" #endif #endif static CYTHON_INLINE unsigned long __Pyx_PyInt_AsUnsignedLong(PyObject* x) { const unsigned long neg_one = (unsigned long)-1, const_zero = 0; const int is_unsigned = neg_one > const_zero; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_Check(x))) { long val = PyInt_AS_LONG(x); if (is_unsigned && unlikely(val < 0)) { PyErr_SetString(PyExc_OverflowError, "can't convert negative value to unsigned long"); return (unsigned long)-1; } return (unsigned long)val; } else #endif if (likely(PyLong_Check(x))) { if (is_unsigned) { #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS if (sizeof(digit) <= sizeof(unsigned long)) { switch (Py_SIZE(x)) { case 0: return 0; case 1: return (unsigned long) ((PyLongObject*)x)->ob_digit[0]; } } #endif #endif if (unlikely(Py_SIZE(x) < 0)) { PyErr_SetString(PyExc_OverflowError, "can't convert negative value to unsigned long"); return (unsigned long)-1; } return (unsigned long)PyLong_AsUnsignedLong(x); } else { #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS if (sizeof(digit) <= sizeof(unsigned long)) { switch (Py_SIZE(x)) { case 0: return 0; case 1: return +(unsigned long) ((PyLongObject*)x)->ob_digit[0]; case -1: return -(unsigned long) ((PyLongObject*)x)->ob_digit[0]; } } #endif #endif return (unsigned long)PyLong_AsLong(x); } } else { unsigned long val; PyObject *tmp = __Pyx_PyNumber_Int(x); if (!tmp) return (unsigned long)-1; val = __Pyx_PyInt_AsUnsignedLong(tmp); Py_DECREF(tmp); return val; } } #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS #include "longintrepr.h" #endif #endif static CYTHON_INLINE unsigned PY_LONG_LONG __Pyx_PyInt_AsUnsignedLongLong(PyObject* x) { const unsigned PY_LONG_LONG neg_one = (unsigned PY_LONG_LONG)-1, const_zero = 0; const int is_unsigned = neg_one > const_zero; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_Check(x))) { long val = PyInt_AS_LONG(x); if (is_unsigned && unlikely(val < 0)) { PyErr_SetString(PyExc_OverflowError, "can't convert negative value to unsigned PY_LONG_LONG"); return (unsigned PY_LONG_LONG)-1; } return (unsigned PY_LONG_LONG)val; } else #endif if (likely(PyLong_Check(x))) { if (is_unsigned) { #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS if (sizeof(digit) <= sizeof(unsigned PY_LONG_LONG)) { switch (Py_SIZE(x)) { case 0: return 0; case 1: return (unsigned PY_LONG_LONG) ((PyLongObject*)x)->ob_digit[0]; } } #endif #endif if (unlikely(Py_SIZE(x) < 0)) { PyErr_SetString(PyExc_OverflowError, "can't convert negative value to unsigned PY_LONG_LONG"); return (unsigned PY_LONG_LONG)-1; } return (unsigned PY_LONG_LONG)PyLong_AsUnsignedLongLong(x); } else { #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS if (sizeof(digit) <= sizeof(unsigned PY_LONG_LONG)) { switch (Py_SIZE(x)) { case 0: return 0; case 1: return +(unsigned PY_LONG_LONG) ((PyLongObject*)x)->ob_digit[0]; case -1: return -(unsigned PY_LONG_LONG) ((PyLongObject*)x)->ob_digit[0]; } } #endif #endif return (unsigned PY_LONG_LONG)PyLong_AsLongLong(x); } } else { unsigned PY_LONG_LONG val; PyObject *tmp = __Pyx_PyNumber_Int(x); if (!tmp) return (unsigned PY_LONG_LONG)-1; val = __Pyx_PyInt_AsUnsignedLongLong(tmp); Py_DECREF(tmp); return val; } } #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS #include "longintrepr.h" #endif #endif static CYTHON_INLINE long __Pyx_PyInt_AsLong(PyObject* x) { const long neg_one = (long)-1, const_zero = 0; const int is_unsigned = neg_one > const_zero; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_Check(x))) { long val = PyInt_AS_LONG(x); if (is_unsigned && unlikely(val < 0)) { PyErr_SetString(PyExc_OverflowError, "can't convert negative value to long"); return (long)-1; } return (long)val; } else #endif if (likely(PyLong_Check(x))) { if (is_unsigned) { #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS if (sizeof(digit) <= sizeof(long)) { switch (Py_SIZE(x)) { case 0: return 0; case 1: return (long) ((PyLongObject*)x)->ob_digit[0]; } } #endif #endif if (unlikely(Py_SIZE(x) < 0)) { PyErr_SetString(PyExc_OverflowError, "can't convert negative value to long"); return (long)-1; } return (long)PyLong_AsUnsignedLong(x); } else { #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS if (sizeof(digit) <= sizeof(long)) { switch (Py_SIZE(x)) { case 0: return 0; case 1: return +(long) ((PyLongObject*)x)->ob_digit[0]; case -1: return -(long) ((PyLongObject*)x)->ob_digit[0]; } } #endif #endif return (long)PyLong_AsLong(x); } } else { long val; PyObject *tmp = __Pyx_PyNumber_Int(x); if (!tmp) return (long)-1; val = __Pyx_PyInt_AsLong(tmp); Py_DECREF(tmp); return val; } } #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS #include "longintrepr.h" #endif #endif static CYTHON_INLINE PY_LONG_LONG __Pyx_PyInt_AsLongLong(PyObject* x) { const PY_LONG_LONG neg_one = (PY_LONG_LONG)-1, const_zero = 0; const int is_unsigned = neg_one > const_zero; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_Check(x))) { long val = PyInt_AS_LONG(x); if (is_unsigned && unlikely(val < 0)) { PyErr_SetString(PyExc_OverflowError, "can't convert negative value to PY_LONG_LONG"); return (PY_LONG_LONG)-1; } return (PY_LONG_LONG)val; } else #endif if (likely(PyLong_Check(x))) { if (is_unsigned) { #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS if (sizeof(digit) <= sizeof(PY_LONG_LONG)) { switch (Py_SIZE(x)) { case 0: return 0; case 1: return (PY_LONG_LONG) ((PyLongObject*)x)->ob_digit[0]; } } #endif #endif if (unlikely(Py_SIZE(x) < 0)) { PyErr_SetString(PyExc_OverflowError, "can't convert negative value to PY_LONG_LONG"); return (PY_LONG_LONG)-1; } return (PY_LONG_LONG)PyLong_AsUnsignedLongLong(x); } else { #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS if (sizeof(digit) <= sizeof(PY_LONG_LONG)) { switch (Py_SIZE(x)) { case 0: return 0; case 1: return +(PY_LONG_LONG) ((PyLongObject*)x)->ob_digit[0]; case -1: return -(PY_LONG_LONG) ((PyLongObject*)x)->ob_digit[0]; } } #endif #endif return (PY_LONG_LONG)PyLong_AsLongLong(x); } } else { PY_LONG_LONG val; PyObject *tmp = __Pyx_PyNumber_Int(x); if (!tmp) return (PY_LONG_LONG)-1; val = __Pyx_PyInt_AsLongLong(tmp); Py_DECREF(tmp); return val; } } #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS #include "longintrepr.h" #endif #endif static CYTHON_INLINE signed long __Pyx_PyInt_AsSignedLong(PyObject* x) { const signed long neg_one = (signed long)-1, const_zero = 0; const int is_unsigned = neg_one > const_zero; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_Check(x))) { long val = PyInt_AS_LONG(x); if (is_unsigned && unlikely(val < 0)) { PyErr_SetString(PyExc_OverflowError, "can't convert negative value to signed long"); return (signed long)-1; } return (signed long)val; } else #endif if (likely(PyLong_Check(x))) { if (is_unsigned) { #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS if (sizeof(digit) <= sizeof(signed long)) { switch (Py_SIZE(x)) { case 0: return 0; case 1: return (signed long) ((PyLongObject*)x)->ob_digit[0]; } } #endif #endif if (unlikely(Py_SIZE(x) < 0)) { PyErr_SetString(PyExc_OverflowError, "can't convert negative value to signed long"); return (signed long)-1; } return (signed long)PyLong_AsUnsignedLong(x); } else { #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS if (sizeof(digit) <= sizeof(signed long)) { switch (Py_SIZE(x)) { case 0: return 0; case 1: return +(signed long) ((PyLongObject*)x)->ob_digit[0]; case -1: return -(signed long) ((PyLongObject*)x)->ob_digit[0]; } } #endif #endif return (signed long)PyLong_AsLong(x); } } else { signed long val; PyObject *tmp = __Pyx_PyNumber_Int(x); if (!tmp) return (signed long)-1; val = __Pyx_PyInt_AsSignedLong(tmp); Py_DECREF(tmp); return val; } } #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS #include "longintrepr.h" #endif #endif static CYTHON_INLINE signed PY_LONG_LONG __Pyx_PyInt_AsSignedLongLong(PyObject* x) { const signed PY_LONG_LONG neg_one = (signed PY_LONG_LONG)-1, const_zero = 0; const int is_unsigned = neg_one > const_zero; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_Check(x))) { long val = PyInt_AS_LONG(x); if (is_unsigned && unlikely(val < 0)) { PyErr_SetString(PyExc_OverflowError, "can't convert negative value to signed PY_LONG_LONG"); return (signed PY_LONG_LONG)-1; } return (signed PY_LONG_LONG)val; } else #endif if (likely(PyLong_Check(x))) { if (is_unsigned) { #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS if (sizeof(digit) <= sizeof(signed PY_LONG_LONG)) { switch (Py_SIZE(x)) { case 0: return 0; case 1: return (signed PY_LONG_LONG) ((PyLongObject*)x)->ob_digit[0]; } } #endif #endif if (unlikely(Py_SIZE(x) < 0)) { PyErr_SetString(PyExc_OverflowError, "can't convert negative value to signed PY_LONG_LONG"); return (signed PY_LONG_LONG)-1; } return (signed PY_LONG_LONG)PyLong_AsUnsignedLongLong(x); } else { #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS if (sizeof(digit) <= sizeof(signed PY_LONG_LONG)) { switch (Py_SIZE(x)) { case 0: return 0; case 1: return +(signed PY_LONG_LONG) ((PyLongObject*)x)->ob_digit[0]; case -1: return -(signed PY_LONG_LONG) ((PyLongObject*)x)->ob_digit[0]; } } #endif #endif return (signed PY_LONG_LONG)PyLong_AsLongLong(x); } } else { signed PY_LONG_LONG val; PyObject *tmp = __Pyx_PyNumber_Int(x); if (!tmp) return (signed PY_LONG_LONG)-1; val = __Pyx_PyInt_AsSignedLongLong(tmp); Py_DECREF(tmp); return val; } } 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); #if PY_VERSION_HEX < 0x02050000 return PyErr_Warn(NULL, message); #else return PyErr_WarnEx(NULL, message, 1); #endif } return 0; } #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 #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, "%s.%s 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", module_name, class_name); #if PY_VERSION_HEX < 0x02050000 if (PyErr_Warn(NULL, warning) < 0) goto bad; #else if (PyErr_WarnEx(NULL, warning, 0) < 0) goto bad; #endif } else if ((size_t)basicsize != size) { PyErr_Format(PyExc_ValueError, "%s.%s has the wrong size, try recompiling", module_name, class_name); goto bad; } return (PyTypeObject *)result; bad: Py_XDECREF(py_module); Py_XDECREF(result); return NULL; } #endif 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) / 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, 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); } #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, /*int argcount,*/ 0, /*int kwonlyargcount,*/ 0, /*int nlocals,*/ 0, /*int stacksize,*/ 0, /*int flags,*/ __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, /*int firstlineno,*/ __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; PyObject *py_globals = 0; PyFrameObject *py_frame = 0; py_code = __pyx_find_code_object(c_line ? c_line : py_line); if (!py_code) { py_code = __Pyx_CreateCodeObjectForTraceback( funcname, c_line, py_line, filename); if (!py_code) goto bad; __pyx_insert_code_object(c_line ? c_line : py_line, py_code); } py_globals = PyModule_GetDict(__pyx_m); if (!py_globals) goto bad; py_frame = PyFrame_New( PyThreadState_GET(), /*PyThreadState *tstate,*/ py_code, /*PyCodeObject *code,*/ py_globals, /*PyObject *globals,*/ 0 /*PyObject *locals*/ ); if (!py_frame) goto bad; py_frame->f_lineno = py_line; PyTraceBack_Here(py_frame); bad: Py_XDECREF(py_code); Py_XDECREF(py_frame); } 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 /* Python 3+ has unicode identifiers */ if (t->is_unicode | t->is_str) { if (t->intern) { *t->p = PyUnicode_InternFromString(t->s); } else if (t->encoding) { *t->p = PyUnicode_Decode(t->s, t->n - 1, t->encoding, NULL); } else { *t->p = PyUnicode_FromStringAndSize(t->s, t->n - 1); } } else { *t->p = PyBytes_FromStringAndSize(t->s, t->n - 1); } #endif if (!*t->p) return -1; ++t; } return 0; } static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(char* c_str) { return __Pyx_PyUnicode_FromStringAndSize(c_str, strlen(c_str)); } static CYTHON_INLINE char* __Pyx_PyObject_AsString(PyObject* o) { Py_ssize_t ignore; return __Pyx_PyObject_AsStringAndSize(o, &ignore); } static CYTHON_INLINE char* __Pyx_PyObject_AsStringAndSize(PyObject* o, Py_ssize_t *length) { #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT if ( #if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII __Pyx_sys_getdefaultencoding_not_ascii && #endif PyUnicode_Check(o)) { #if PY_VERSION_HEX < 0x03030000 char* defenc_c; PyObject* defenc = _PyUnicode_AsDefaultEncodedString(o, NULL); if (!defenc) return NULL; defenc_c = PyBytes_AS_STRING(defenc); #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII { char* end = defenc_c + PyBytes_GET_SIZE(defenc); char* c; for (c = defenc_c; c < end; c++) { if ((unsigned char) (*c) >= 128) { PyUnicode_AsASCIIString(o); return NULL; } } } #endif /*__PYX_DEFAULT_STRING_ENCODING_IS_ASCII*/ *length = PyBytes_GET_SIZE(defenc); return defenc_c; #else /* PY_VERSION_HEX < 0x03030000 */ if (PyUnicode_READY(o) == -1) return NULL; #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII if (PyUnicode_IS_ASCII(o)) { *length = PyUnicode_GET_DATA_SIZE(o); return PyUnicode_AsUTF8(o); } else { PyUnicode_AsASCIIString(o); return NULL; } #else /* __PYX_DEFAULT_STRING_ENCODING_IS_ASCII */ return PyUnicode_AsUTF8AndSize(o, length); #endif /* __PYX_DEFAULT_STRING_ENCODING_IS_ASCII */ #endif /* PY_VERSION_HEX < 0x03030000 */ } else #endif /* __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT */ { char* result; int r = PyBytes_AsStringAndSize(o, &result, length); if (r < 0) { return NULL; } else { return result; } } } static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject* x) { int is_true = x == Py_True; if (is_true | (x == Py_False) | (x == Py_None)) return is_true; else return PyObject_IsTrue(x); } static CYTHON_INLINE PyObject* __Pyx_PyNumber_Int(PyObject* x) { PyNumberMethods *m; const char *name = NULL; PyObject *res = NULL; #if PY_MAJOR_VERSION < 3 if (PyInt_Check(x) || PyLong_Check(x)) #else if (PyLong_Check(x)) #endif return Py_INCREF(x), x; m = Py_TYPE(x)->tp_as_number; #if PY_MAJOR_VERSION < 3 if (m && m->nb_int) { name = "int"; res = PyNumber_Int(x); } else if (m && m->nb_long) { name = "long"; res = PyNumber_Long(x); } #else if (m && m->nb_int) { name = "int"; res = PyNumber_Long(x); } #endif if (res) { #if PY_MAJOR_VERSION < 3 if (!PyInt_Check(res) && !PyLong_Check(res)) { #else if (!PyLong_Check(res)) { #endif PyErr_Format(PyExc_TypeError, "__%s__ returned non-%s (type %.200s)", name, name, Py_TYPE(res)->tp_name); Py_DECREF(res); return NULL; } } else if (!PyErr_Occurred()) { PyErr_SetString(PyExc_TypeError, "an integer is required"); } return res; } static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) { Py_ssize_t ival; PyObject* x = 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) { #if PY_VERSION_HEX < 0x02050000 if (ival <= LONG_MAX) return PyInt_FromLong((long)ival); else { unsigned char *bytes = (unsigned char *) &ival; int one = 1; int little = (int)*(unsigned char*)&one; return _PyLong_FromByteArray(bytes, sizeof(size_t), little, 0); } #else return PyInt_FromSize_t(ival); #endif } static CYTHON_INLINE size_t __Pyx_PyInt_AsSize_t(PyObject* x) { unsigned PY_LONG_LONG val = __Pyx_PyInt_AsUnsignedLongLong(x); if (unlikely(val != (unsigned PY_LONG_LONG)(size_t)val)) { if ((val != (unsigned PY_LONG_LONG)-1) || !PyErr_Occurred()) PyErr_SetString(PyExc_OverflowError, "value too large to convert to size_t"); return (size_t)-1; } return (size_t)val; } #endif /* Py_PYTHON_H */ debian/cythonized-files3/pandas/algos.c0000664000000000000000003416226512275603610015277 0ustar /* Generated by Cython 0.19.2 on Mon Feb 3 08:42:29 2014 */ #define PY_SSIZE_T_CLEAN #ifndef CYTHON_USE_PYLONG_INTERNALS #ifdef PYLONG_BITS_IN_DIGIT #define CYTHON_USE_PYLONG_INTERNALS 0 #else #include "pyconfig.h" #ifdef PYLONG_BITS_IN_DIGIT #define CYTHON_USE_PYLONG_INTERNALS 1 #else #define CYTHON_USE_PYLONG_INTERNALS 0 #endif #endif #endif #include "Python.h" #ifndef Py_PYTHON_H #error Python headers needed to compile C extensions, please install development version of Python. #elif PY_VERSION_HEX < 0x02040000 #error Cython requires Python 2.4+. #else #include /* For offsetof */ #ifndef offsetof #define offsetof(type, member) ( (size_t) & ((type*)0) -> member ) #endif #if !defined(WIN32) && !defined(MS_WINDOWS) #ifndef __stdcall #define __stdcall #endif #ifndef __cdecl #define __cdecl #endif #ifndef __fastcall #define __fastcall #endif #endif #ifndef DL_IMPORT #define DL_IMPORT(t) t #endif #ifndef DL_EXPORT #define DL_EXPORT(t) t #endif #ifndef PY_LONG_LONG #define PY_LONG_LONG LONG_LONG #endif #ifndef Py_HUGE_VAL #define Py_HUGE_VAL HUGE_VAL #endif #ifdef PYPY_VERSION #define CYTHON_COMPILING_IN_PYPY 1 #define CYTHON_COMPILING_IN_CPYTHON 0 #else #define CYTHON_COMPILING_IN_PYPY 0 #define CYTHON_COMPILING_IN_CPYTHON 1 #endif #if PY_VERSION_HEX < 0x02050000 typedef int Py_ssize_t; #define PY_SSIZE_T_MAX INT_MAX #define PY_SSIZE_T_MIN INT_MIN #define PY_FORMAT_SIZE_T "" #define CYTHON_FORMAT_SSIZE_T "" #define PyInt_FromSsize_t(z) PyInt_FromLong(z) #define PyInt_AsSsize_t(o) __Pyx_PyInt_AsInt(o) #define PyNumber_Index(o) ((PyNumber_Check(o) && !PyFloat_Check(o)) ? PyNumber_Int(o) : \ (PyErr_Format(PyExc_TypeError, \ "expected index value, got %.200s", Py_TYPE(o)->tp_name), \ (PyObject*)0)) #define __Pyx_PyIndex_Check(o) (PyNumber_Check(o) && !PyFloat_Check(o) && \ !PyComplex_Check(o)) #define PyIndex_Check __Pyx_PyIndex_Check #define PyErr_WarnEx(category, message, stacklevel) PyErr_Warn(category, message) #define __PYX_BUILD_PY_SSIZE_T "i" #else #define __PYX_BUILD_PY_SSIZE_T "n" #define CYTHON_FORMAT_SSIZE_T "z" #define __Pyx_PyIndex_Check PyIndex_Check #endif #if PY_VERSION_HEX < 0x02060000 #define Py_REFCNT(ob) (((PyObject*)(ob))->ob_refcnt) #define Py_TYPE(ob) (((PyObject*)(ob))->ob_type) #define Py_SIZE(ob) (((PyVarObject*)(ob))->ob_size) #define PyVarObject_HEAD_INIT(type, size) \ PyObject_HEAD_INIT(type) size, #define PyType_Modified(t) typedef struct { void *buf; PyObject *obj; Py_ssize_t len; Py_ssize_t itemsize; int readonly; int ndim; char *format; Py_ssize_t *shape; Py_ssize_t *strides; Py_ssize_t *suboffsets; void *internal; } Py_buffer; #define PyBUF_SIMPLE 0 #define PyBUF_WRITABLE 0x0001 #define PyBUF_FORMAT 0x0004 #define PyBUF_ND 0x0008 #define PyBUF_STRIDES (0x0010 | PyBUF_ND) #define PyBUF_C_CONTIGUOUS (0x0020 | PyBUF_STRIDES) #define PyBUF_F_CONTIGUOUS (0x0040 | PyBUF_STRIDES) #define PyBUF_ANY_CONTIGUOUS (0x0080 | PyBUF_STRIDES) #define PyBUF_INDIRECT (0x0100 | PyBUF_STRIDES) #define PyBUF_RECORDS (PyBUF_STRIDES | PyBUF_FORMAT | PyBUF_WRITABLE) #define PyBUF_FULL (PyBUF_INDIRECT | PyBUF_FORMAT | PyBUF_WRITABLE) typedef int (*getbufferproc)(PyObject *, Py_buffer *, int); typedef void (*releasebufferproc)(PyObject *, Py_buffer *); #endif #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, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) #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) #endif #if PY_MAJOR_VERSION < 3 && PY_MINOR_VERSION < 6 #define PyUnicode_FromString(s) PyUnicode_Decode(s, strlen(s), "UTF-8", "strict") #endif #if PY_MAJOR_VERSION >= 3 #define Py_TPFLAGS_CHECKTYPES 0 #define Py_TPFLAGS_HAVE_INDEX 0 #endif #if (PY_VERSION_HEX < 0x02060000) || (PY_MAJOR_VERSION >= 3) #define Py_TPFLAGS_HAVE_NEWBUFFER 0 #endif #if PY_VERSION_HEX < 0x02060000 #define Py_TPFLAGS_HAVE_VERSION_TAG 0 #endif #if PY_VERSION_HEX > 0x03030000 && defined(PyUnicode_KIND) #define CYTHON_PEP393_ENABLED 1 #define __Pyx_PyUnicode_READY(op) (likely(PyUnicode_IS_READY(op)) ? \ 0 : _PyUnicode_Ready((PyObject *)(op))) #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_LENGTH(u) #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i) #define __Pyx_PyUnicode_READ(k, d, i) PyUnicode_READ(k, d, i) #else #define CYTHON_PEP393_ENABLED 0 #define __Pyx_PyUnicode_READY(op) (0) #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_SIZE(u) #define __Pyx_PyUnicode_READ_CHAR(u, i) ((Py_UCS4)(PyUnicode_AS_UNICODE(u)[i])) #define __Pyx_PyUnicode_READ(k, d, i) ((k=k), (Py_UCS4)(((Py_UNICODE*)d)[i])) #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_VERSION_HEX < 0x02060000 #define PyBytesObject PyStringObject #define PyBytes_Type PyString_Type #define PyBytes_Check PyString_Check #define PyBytes_CheckExact PyString_CheckExact #define PyBytes_FromString PyString_FromString #define PyBytes_FromStringAndSize PyString_FromStringAndSize #define PyBytes_FromFormat PyString_FromFormat #define PyBytes_DecodeEscape PyString_DecodeEscape #define PyBytes_AsString PyString_AsString #define PyBytes_AsStringAndSize PyString_AsStringAndSize #define PyBytes_Size PyString_Size #define PyBytes_AS_STRING PyString_AS_STRING #define PyBytes_GET_SIZE PyString_GET_SIZE #define PyBytes_Repr PyString_Repr #define PyBytes_Concat PyString_Concat #define PyBytes_ConcatAndDel PyString_ConcatAndDel #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_CheckExact(obj) || PyUnicode_CheckExact(obj) || \ PyString_Check(obj) || PyUnicode_Check(obj)) #define __Pyx_PyBaseString_CheckExact(obj) (Py_TYPE(obj) == &PyBaseString_Type) #endif #if PY_VERSION_HEX < 0x02060000 #define PySet_Check(obj) PyObject_TypeCheck(obj, &PySet_Type) #define PyFrozenSet_Check(obj) PyObject_TypeCheck(obj, &PyFrozenSet_Type) #endif #ifndef PySet_CheckExact #define PySet_CheckExact(obj) (Py_TYPE(obj) == &PySet_Type) #endif #define __Pyx_TypeCheck(obj, type) PyObject_TypeCheck(obj, (PyTypeObject *)type) #if PY_MAJOR_VERSION >= 3 #define PyIntObject PyLongObject #define PyInt_Type PyLong_Type #define PyInt_Check(op) PyLong_Check(op) #define PyInt_CheckExact(op) PyLong_CheckExact(op) #define PyInt_FromString PyLong_FromString #define PyInt_FromUnicode PyLong_FromUnicode #define PyInt_FromLong PyLong_FromLong #define PyInt_FromSize_t PyLong_FromSize_t #define PyInt_FromSsize_t PyLong_FromSsize_t #define PyInt_AsLong PyLong_AsLong #define PyInt_AS_LONG PyLong_AS_LONG #define PyInt_AsSsize_t PyLong_AsSsize_t #define PyInt_AsUnsignedLongMask PyLong_AsUnsignedLongMask #define PyInt_AsUnsignedLongLongMask PyLong_AsUnsignedLongLongMask #endif #if PY_MAJOR_VERSION >= 3 #define PyBoolObject PyLongObject #endif #if PY_VERSION_HEX < 0x03020000 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) || (PY_VERSION_HEX >= 0x03010300) #define __Pyx_PySequence_GetSlice(obj, a, b) PySequence_GetSlice(obj, a, b) #define __Pyx_PySequence_SetSlice(obj, a, b, value) PySequence_SetSlice(obj, a, b, value) #define __Pyx_PySequence_DelSlice(obj, a, b) PySequence_DelSlice(obj, a, b) #else #define __Pyx_PySequence_GetSlice(obj, a, b) (unlikely(!(obj)) ? \ (PyErr_SetString(PyExc_SystemError, "null argument to internal routine"), (PyObject*)0) : \ (likely((obj)->ob_type->tp_as_mapping) ? (PySequence_GetSlice(obj, a, b)) : \ (PyErr_Format(PyExc_TypeError, "'%.200s' object is unsliceable", (obj)->ob_type->tp_name), (PyObject*)0))) #define __Pyx_PySequence_SetSlice(obj, a, b, value) (unlikely(!(obj)) ? \ (PyErr_SetString(PyExc_SystemError, "null argument to internal routine"), -1) : \ (likely((obj)->ob_type->tp_as_mapping) ? (PySequence_SetSlice(obj, a, b, value)) : \ (PyErr_Format(PyExc_TypeError, "'%.200s' object doesn't support slice assignment", (obj)->ob_type->tp_name), -1))) #define __Pyx_PySequence_DelSlice(obj, a, b) (unlikely(!(obj)) ? \ (PyErr_SetString(PyExc_SystemError, "null argument to internal routine"), -1) : \ (likely((obj)->ob_type->tp_as_mapping) ? (PySequence_DelSlice(obj, a, b)) : \ (PyErr_Format(PyExc_TypeError, "'%.200s' object doesn't support slice deletion", (obj)->ob_type->tp_name), -1))) #endif #if PY_MAJOR_VERSION >= 3 #define PyMethod_New(func, self, klass) ((self) ? PyMethod_New(func, self) : PyInstanceMethod_New(func)) #endif #if PY_VERSION_HEX < 0x02050000 #define __Pyx_GetAttrString(o,n) PyObject_GetAttrString((o),((char *)(n))) #define __Pyx_SetAttrString(o,n,a) PyObject_SetAttrString((o),((char *)(n)),(a)) #define __Pyx_DelAttrString(o,n) PyObject_DelAttrString((o),((char *)(n))) #else #define __Pyx_GetAttrString(o,n) PyObject_GetAttrString((o),(n)) #define __Pyx_SetAttrString(o,n,a) PyObject_SetAttrString((o),(n),(a)) #define __Pyx_DelAttrString(o,n) PyObject_DelAttrString((o),(n)) #endif #if PY_VERSION_HEX < 0x02050000 #define __Pyx_NAMESTR(n) ((char *)(n)) #define __Pyx_DOCSTR(n) ((char *)(n)) #else #define __Pyx_NAMESTR(n) (n) #define __Pyx_DOCSTR(n) (n) #endif #ifndef CYTHON_INLINE #if defined(__GNUC__) #define CYTHON_INLINE __inline__ #elif defined(_MSC_VER) #define CYTHON_INLINE __inline #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L #define CYTHON_INLINE inline #else #define CYTHON_INLINE #endif #endif #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 #ifdef NAN #define __PYX_NAN() ((float) NAN) #else static CYTHON_INLINE float __PYX_NAN() { /* Initialize NaN. The sign is irrelevant, an exponent with all bits 1 and a nonzero mantissa means NaN. If the first bit in the mantissa is 1, it is a quiet NaN. */ float value; memset(&value, 0xFF, sizeof(value)); return value; } #endif #if PY_MAJOR_VERSION >= 3 #define __Pyx_PyNumber_Divide(x,y) PyNumber_TrueDivide(x,y) #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceTrueDivide(x,y) #else #define __Pyx_PyNumber_Divide(x,y) PyNumber_Divide(x,y) #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceDivide(x,y) #endif #ifndef __PYX_EXTERN_C #ifdef __cplusplus #define __PYX_EXTERN_C extern "C" #else #define __PYX_EXTERN_C extern #endif #endif #if defined(WIN32) || defined(MS_WINDOWS) #define _USE_MATH_DEFINES #endif #include #define __PYX_HAVE__pandas__algos #define __PYX_HAVE_API__pandas__algos #include "string.h" #include "stdio.h" #include "stdlib.h" #include "numpy/arrayobject.h" #include "numpy/ufuncobject.h" #include "pythread.h" #include "numpy_helper.h" #include "src/headers/math.h" #include "math.h" #include "skiplist.h" #include "headers/stdint.h" #include "datetime.h" #include "datetime_helper.h" #include "numpy/ndarrayobject.h" #include "numpy/npy_common.h" #include "datetime/np_datetime.h" #include "datetime/np_datetime_strings.h" #include "khash_python.h" #ifdef _OPENMP #include #endif /* _OPENMP */ #ifdef PYREX_WITHOUT_ASSERTIONS #define CYTHON_WITHOUT_ASSERTIONS #endif #ifndef CYTHON_UNUSED # if defined(__GNUC__) # if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)) # define CYTHON_UNUSED __attribute__ ((__unused__)) # else # define CYTHON_UNUSED # endif # elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER)) # define CYTHON_UNUSED __attribute__ ((__unused__)) # else # define CYTHON_UNUSED # endif #endif typedef struct {PyObject **p; char *s; const Py_ssize_t n; const char* encoding; const char is_unicode; const char is_str; const char intern; } __Pyx_StringTabEntry; /*proto*/ #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 static CYTHON_INLINE char* __Pyx_PyObject_AsString(PyObject*); static CYTHON_INLINE char* __Pyx_PyObject_AsStringAndSize(PyObject*, Py_ssize_t* length); #define __Pyx_PyBytes_FromString PyBytes_FromString #define __Pyx_PyBytes_FromStringAndSize PyBytes_FromStringAndSize static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(char*); #if PY_MAJOR_VERSION < 3 #define __Pyx_PyStr_FromString __Pyx_PyBytes_FromString #define __Pyx_PyStr_FromStringAndSize __Pyx_PyBytes_FromStringAndSize #else #define __Pyx_PyStr_FromString __Pyx_PyUnicode_FromString #define __Pyx_PyStr_FromStringAndSize __Pyx_PyUnicode_FromStringAndSize #endif #define __Pyx_PyObject_AsUString(s) ((unsigned char*) __Pyx_PyObject_AsString(s)) #define __Pyx_PyObject_FromUString(s) __Pyx_PyObject_FromString((char*)s) #define __Pyx_PyBytes_FromUString(s) __Pyx_PyBytes_FromString((char*)s) #define __Pyx_PyStr_FromUString(s) __Pyx_PyStr_FromString((char*)s) #define __Pyx_PyUnicode_FromUString(s) __Pyx_PyUnicode_FromString((char*)s) #if PY_MAJOR_VERSION < 3 static CYTHON_INLINE size_t __Pyx_Py_UNICODE_strlen(const Py_UNICODE *u) { const Py_UNICODE *u_end = u; while (*u_end++) ; return u_end - u - 1; } #else #define __Pyx_Py_UNICODE_strlen Py_UNICODE_strlen #endif #define __Pyx_PyUnicode_FromUnicode(u) PyUnicode_FromUnicode(u, __Pyx_Py_UNICODE_strlen(u)) #define __Pyx_PyUnicode_FromUnicodeAndLength PyUnicode_FromUnicode #define __Pyx_PyUnicode_AsUnicode PyUnicode_AsUnicode #define __Pyx_Owned_Py_None(b) (Py_INCREF(Py_None), Py_None) #define __Pyx_PyBool_FromLong(b) ((b) ? (Py_INCREF(Py_True), Py_True) : (Py_INCREF(Py_False), Py_False)) static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*); static CYTHON_INLINE PyObject* __Pyx_PyNumber_Int(PyObject* x); static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*); static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t); static CYTHON_INLINE size_t __Pyx_PyInt_AsSize_t(PyObject*); #if CYTHON_COMPILING_IN_CPYTHON #define __pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x)) #else #define __pyx_PyFloat_AsDouble(x) PyFloat_AsDouble(x) #endif #define __pyx_PyFloat_AsFloat(x) ((float) __pyx_PyFloat_AsDouble(x)) #if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII static int __Pyx_sys_getdefaultencoding_not_ascii; static int __Pyx_init_sys_getdefaultencoding_params() { PyObject* sys = NULL; PyObject* default_encoding = NULL; PyObject* ascii_chars_u = NULL; PyObject* ascii_chars_b = NULL; sys = PyImport_ImportModule("sys"); if (sys == NULL) goto bad; default_encoding = PyObject_CallMethod(sys, (char*) (const char*) "getdefaultencoding", NULL); if (default_encoding == NULL) goto bad; if (strcmp(PyBytes_AsString(default_encoding), "ascii") == 0) { __Pyx_sys_getdefaultencoding_not_ascii = 0; } else { const char* default_encoding_c = PyBytes_AS_STRING(default_encoding); 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 == NULL) goto bad; ascii_chars_b = PyUnicode_AsEncodedString(ascii_chars_u, default_encoding_c, NULL); if (ascii_chars_b == NULL || strncmp(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 '%s' is not a superset of ascii.", default_encoding_c); goto bad; } } Py_XDECREF(sys); Py_XDECREF(default_encoding); Py_XDECREF(ascii_chars_u); Py_XDECREF(ascii_chars_b); return 0; bad: Py_XDECREF(sys); 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() { PyObject* sys = NULL; PyObject* default_encoding = NULL; char* default_encoding_c; sys = PyImport_ImportModule("sys"); if (sys == NULL) goto bad; default_encoding = PyObject_CallMethod(sys, (char*) (const char*) "getdefaultencoding", NULL); if (default_encoding == NULL) goto bad; default_encoding_c = PyBytes_AS_STRING(default_encoding); __PYX_DEFAULT_STRING_ENCODING = (char*) malloc(strlen(default_encoding_c)); strcpy(__PYX_DEFAULT_STRING_ENCODING, default_encoding_c); Py_DECREF(sys); Py_DECREF(default_encoding); return 0; bad: Py_XDECREF(sys); Py_XDECREF(default_encoding); return -1; } #endif #endif #ifdef __GNUC__ /* Test for GCC > 2.95 */ #if __GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95)) #define likely(x) __builtin_expect(!!(x), 1) #define unlikely(x) __builtin_expect(!!(x), 0) #else /* __GNUC__ > 2 ... */ #define likely(x) (x) #define unlikely(x) (x) #endif /* __GNUC__ > 2 ... */ #else /* __GNUC__ */ #define likely(x) (x) #define unlikely(x) (x) #endif /* __GNUC__ */ static PyObject *__pyx_m; static PyObject *__pyx_d; static PyObject *__pyx_b; static PyObject *__pyx_empty_tuple; static PyObject *__pyx_empty_bytes; static int __pyx_lineno; static int __pyx_clineno = 0; static const char * __pyx_cfilenm= __FILE__; static const char *__pyx_filename; #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[] = { "algos.pyx", "skiplist.pyx", "generated.pyx", "join.pyx", "util.pxd", "datetime.pxd", "numpy.pxd", "type.pxd", "bool.pxd", "complex.pxd", }; #define IS_UNSIGNED(type) (((type) -1) > 0) struct __Pyx_StructField_; #define __PYX_BUF_FLAGS_PACKED_STRUCT (1 << 0) typedef struct { const char* name; /* for error messages only */ struct __Pyx_StructField_* fields; size_t size; /* sizeof(type) */ size_t arraysize[8]; /* length of array in each dimension */ int ndim; char typegroup; /* _R_eal, _C_omplex, Signed _I_nt, _U_nsigned int, _S_truct, _P_ointer, _O_bject, c_H_ar */ 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; /* "numpy.pxd":726 * # 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; /* "numpy.pxd":727 * * 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; /* "numpy.pxd":728 * 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; /* "numpy.pxd":729 * 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; /* "numpy.pxd":733 * #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; /* "numpy.pxd":734 * * 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; /* "numpy.pxd":735 * 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; /* "numpy.pxd":736 * 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; /* "numpy.pxd":740 * #ctypedef npy_uint128 uint128_t * * ctypedef npy_float16 float16_t # <<<<<<<<<<<<<< * ctypedef npy_float32 float32_t * ctypedef npy_float64 float64_t */ typedef npy_float16 __pyx_t_5numpy_float16_t; /* "numpy.pxd":741 * * ctypedef npy_float16 float16_t * ctypedef npy_float32 float32_t # <<<<<<<<<<<<<< * ctypedef npy_float64 float64_t * #ctypedef npy_float80 float80_t */ typedef npy_float32 __pyx_t_5numpy_float32_t; /* "numpy.pxd":742 * ctypedef npy_float16 float16_t * 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; /* "numpy.pxd":751 * # 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; /* "numpy.pxd":752 * # 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; /* "numpy.pxd":753 * 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; /* "numpy.pxd":755 * 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; /* "numpy.pxd":756 * * ctypedef npy_ulong uint_t * ctypedef npy_ulonglong ulong_t # <<<<<<<<<<<<<< * ctypedef npy_ulonglong ulonglong_t * */ typedef npy_ulonglong __pyx_t_5numpy_ulong_t; /* "numpy.pxd":757 * 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; /* "numpy.pxd":759 * ctypedef npy_ulonglong ulonglong_t * * ctypedef npy_intp intp_t # <<<<<<<<<<<<<< * ctypedef npy_uintp uintp_t * */ typedef npy_intp __pyx_t_5numpy_intp_t; /* "numpy.pxd":760 * * ctypedef npy_intp intp_t * ctypedef npy_uintp uintp_t # <<<<<<<<<<<<<< * * ctypedef npy_double float_t */ typedef npy_uintp __pyx_t_5numpy_uintp_t; /* "numpy.pxd":762 * 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; /* "numpy.pxd":763 * * ctypedef npy_double float_t * ctypedef npy_double double_t # <<<<<<<<<<<<<< * ctypedef npy_longdouble longdouble_t * */ typedef npy_double __pyx_t_5numpy_double_t; /* "numpy.pxd":764 * 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; /* "pandas/src/generated.pyx":27 * from khash cimport * * * ctypedef unsigned char UChar # <<<<<<<<<<<<<< * * cimport util */ typedef unsigned char __pyx_t_6pandas_5algos_UChar; #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 #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 /*--- Type declarations ---*/ struct __pyx_obj_6pandas_5algos_IndexableSkiplist; struct __pyx_obj_6pandas_5algos_Node; /* "numpy.pxd":766 * 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; /* "numpy.pxd":767 * * ctypedef npy_cfloat cfloat_t * ctypedef npy_cdouble cdouble_t # <<<<<<<<<<<<<< * ctypedef npy_clongdouble clongdouble_t * */ typedef npy_cdouble __pyx_t_5numpy_cdouble_t; /* "numpy.pxd":768 * 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; /* "numpy.pxd":770 * ctypedef npy_clongdouble clongdouble_t * * ctypedef npy_cdouble complex_t # <<<<<<<<<<<<<< * * cdef inline object PyArray_MultiIterNew1(a): */ typedef npy_cdouble __pyx_t_5numpy_complex_t; struct __pyx_t_6pandas_5algos_pairs; /* "pandas/algos.pyx":1259 * # Rolling median, min, max * * ctypedef double_t (* skiplist_f)(object sl, int n, int p) # <<<<<<<<<<<<<< * * cdef _roll_skiplist_op(ndarray arg, int win, int minp, skiplist_f op): */ typedef __pyx_t_5numpy_double_t (*__pyx_t_6pandas_5algos_skiplist_f)(PyObject *, int, int); /* "pandas/algos.pyx":1387 * # https://github.com/kwgoodman/bottleneck * * cdef struct pairs: # <<<<<<<<<<<<<< * double value * int death */ struct __pyx_t_6pandas_5algos_pairs { double value; int death; }; /* "pandas/src/skiplist.pyx":46 * NIL = Node(np.inf, [], []) * * cdef class IndexableSkiplist: # <<<<<<<<<<<<<< * ''' * Sorted collection supporting O(lg n) insertion, removal, and */ struct __pyx_obj_6pandas_5algos_IndexableSkiplist { PyObject_HEAD struct __pyx_vtabstruct_6pandas_5algos_IndexableSkiplist *__pyx_vtab; Py_ssize_t size; Py_ssize_t maxlevels; struct __pyx_obj_6pandas_5algos_Node *head; }; /* "pandas/src/skiplist.pyx":32 * # TODO: optimize this, make less messy * * cdef class Node: # <<<<<<<<<<<<<< * cdef public: * double_t value */ struct __pyx_obj_6pandas_5algos_Node { PyObject_HEAD __pyx_t_5numpy_double_t value; PyObject *next; PyObject *width; }; /* "pandas/src/skiplist.pyx":46 * NIL = Node(np.inf, [], []) * * cdef class IndexableSkiplist: # <<<<<<<<<<<<<< * ''' * Sorted collection supporting O(lg n) insertion, removal, and */ struct __pyx_vtabstruct_6pandas_5algos_IndexableSkiplist { PyObject *(*get)(struct __pyx_obj_6pandas_5algos_IndexableSkiplist *, Py_ssize_t, int __pyx_skip_dispatch); PyObject *(*insert)(struct __pyx_obj_6pandas_5algos_IndexableSkiplist *, double, int __pyx_skip_dispatch); PyObject *(*remove)(struct __pyx_obj_6pandas_5algos_IndexableSkiplist *, double, int __pyx_skip_dispatch); }; static struct __pyx_vtabstruct_6pandas_5algos_IndexableSkiplist *__pyx_vtabptr_6pandas_5algos_IndexableSkiplist; #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); /*proto*/ #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 /* CYTHON_REFNANNY */ #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) #if CYTHON_COMPILING_IN_CPYTHON static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name) { PyTypeObject* tp = Py_TYPE(obj); if (likely(tp->tp_getattro)) return tp->tp_getattro(obj, attr_name); #if PY_MAJOR_VERSION < 3 if (likely(tp->tp_getattr)) return tp->tp_getattr(obj, PyString_AS_STRING(attr_name)); #endif return PyObject_GetAttr(obj, attr_name); } #else #define __Pyx_PyObject_GetAttrStr(o,n) PyObject_GetAttr(o,n) #endif static PyObject *__Pyx_GetBuiltinName(PyObject *name); /*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); /*proto*/ static void __Pyx_RaiseDoubleKeywordsError(const char* func_name, PyObject* kw_name); /*proto*/ static int __Pyx_ParseOptionalKeywords(PyObject *kwds, PyObject **argnames[], \ PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args, \ const char* function_name); /*proto*/ #ifndef __PYX_FORCE_INIT_THREADS #define __PYX_FORCE_INIT_THREADS 0 #endif static CYTHON_INLINE void __Pyx_ErrRestore(PyObject *type, PyObject *value, PyObject *tb); /*proto*/ static CYTHON_INLINE void __Pyx_ErrFetch(PyObject **type, PyObject **value, PyObject **tb); /*proto*/ static void __Pyx_WriteUnraisable(const char *name, int clineno, int lineno, const char *filename); /*proto*/ static int __Pyx_ArgTypeTest(PyObject *obj, PyTypeObject *type, int none_allowed, const char *name, int exact); /*proto*/ static CYTHON_INLINE PyObject *__Pyx_GetModuleGlobalName(PyObject *name); /*proto*/ #define __Pyx_GetItemInt(o, i, size, to_py_func, is_list, wraparound, boundscheck) \ (((size) <= sizeof(Py_ssize_t)) ? \ __Pyx_GetItemInt_Fast(o, i, is_list, wraparound, boundscheck) : \ __Pyx_GetItemInt_Generic(o, to_py_func(i))) #define __Pyx_GetItemInt_List(o, i, size, to_py_func, is_list, wraparound, boundscheck) \ (((size) <= sizeof(Py_ssize_t)) ? \ __Pyx_GetItemInt_List_Fast(o, i, wraparound, boundscheck) : \ __Pyx_GetItemInt_Generic(o, to_py_func(i))) static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i, int wraparound, int boundscheck); #define __Pyx_GetItemInt_Tuple(o, i, size, to_py_func, is_list, wraparound, boundscheck) \ (((size) <= sizeof(Py_ssize_t)) ? \ __Pyx_GetItemInt_Tuple_Fast(o, i, wraparound, boundscheck) : \ __Pyx_GetItemInt_Generic(o, to_py_func(i))) static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i, int wraparound, int boundscheck); static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j); static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, int is_list, int wraparound, int boundscheck); static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type); /*proto*/ #define __Pyx_SetItemInt(o, i, v, size, to_py_func, is_list, wraparound, boundscheck) \ (((size) <= sizeof(Py_ssize_t)) ? \ __Pyx_SetItemInt_Fast(o, i, v, is_list, wraparound, boundscheck) : \ __Pyx_SetItemInt_Generic(o, to_py_func(i), v)) static CYTHON_INLINE int __Pyx_SetItemInt_Generic(PyObject *o, PyObject *j, PyObject *v); static CYTHON_INLINE int __Pyx_SetItemInt_Fast(PyObject *o, Py_ssize_t i, PyObject *v, int is_list, int wraparound, int boundscheck); static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause); /*proto*/ static CYTHON_INLINE int __Pyx_GetBufferAndValidate(Py_buffer* buf, PyObject* obj, __Pyx_TypeInfo* dtype, int flags, int nd, int cast, __Pyx_BufFmt_StackElem* stack); static CYTHON_INLINE void __Pyx_SafeReleaseBuffer(Py_buffer* info); static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected); static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index); static CYTHON_INLINE int __Pyx_IterFinish(void); /*proto*/ static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected); /*proto*/ static void __Pyx_RaiseBufferFallbackError(void); /*proto*/ static void __Pyx_RaiseBufferIndexError(int axis); /*proto*/ #define __Pyx_BufPtrStrided2d(type, buf, i0, s0, i1, s1) (type)((char*)buf + i0 * s0 + i1 * s1) #define __Pyx_BufPtrStrided1d(type, buf, i0, s0) (type)((char*)buf + i0 * s0) static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb); /*proto*/ static CYTHON_INLINE long __Pyx_mod_long(long, long); /* proto */ static CYTHON_INLINE long __Pyx_div_long(long, long); /* proto */ static CYTHON_INLINE Py_ssize_t __Pyx_div_Py_ssize_t(Py_ssize_t, Py_ssize_t); /* proto */ static CYTHON_INLINE Py_ssize_t __Pyx_mod_Py_ssize_t(Py_ssize_t, Py_ssize_t); /* proto */ static CYTHON_INLINE PyObject* __Pyx_PyObject_GetSlice( PyObject* obj, Py_ssize_t cstart, Py_ssize_t cstop, PyObject** py_start, PyObject** py_stop, PyObject** py_slice, int has_cstart, int has_cstop, int wraparound); static CYTHON_INLINE int __Pyx_PyDict_Contains(PyObject* item, PyObject* dict, int eq) { int result = PyDict_Contains(dict, item); return unlikely(result < 0) ? result : (result == (eq == Py_EQ)); } #if PY_MAJOR_VERSION >= 3 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; } #else #define __Pyx_PyDict_GetItem(d, key) PyObject_GetItem(d, key) #endif #define __Pyx_PyObject_DelSlice(obj, cstart, cstop, py_start, py_stop, py_slice, has_cstart, has_cstop, wraparound) \ __Pyx_PyObject_SetSlice(obj, (PyObject*)NULL, cstart, cstop, py_start, py_stop, py_slice, has_cstart, has_cstop, wraparound) static CYTHON_INLINE int __Pyx_PyObject_SetSlice( PyObject* obj, PyObject* value, Py_ssize_t cstart, Py_ssize_t cstop, PyObject** py_start, PyObject** py_stop, PyObject** py_slice, int has_cstart, int has_cstop, int wraparound); #if CYTHON_COMPILING_IN_CPYTHON static CYTHON_INLINE int __Pyx_PyList_Append(PyObject* list, PyObject* x) { PyListObject* L = (PyListObject*) list; Py_ssize_t len = Py_SIZE(list); if (likely(L->allocated > len) & likely(len > (L->allocated >> 1))) { Py_INCREF(x); PyList_SET_ITEM(list, len, x); Py_SIZE(list) = len+1; return 0; } return PyList_Append(list, x); } #else #define __Pyx_PyList_Append(L,x) PyList_Append(L,x) #endif static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name); /*proto*/ static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void); static int __Pyx_SetVtable(PyObject *dict, void *vtable); /*proto*/ #define __Pyx_CyFunction_USED 1 #include #define __Pyx_CYFUNCTION_STATICMETHOD 0x01 #define __Pyx_CYFUNCTION_CLASSMETHOD 0x02 #define __Pyx_CYFUNCTION_CCLASS 0x04 #define __Pyx_CyFunction_GetClosure(f) \ (((__pyx_CyFunctionObject *) (f))->func_closure) #define __Pyx_CyFunction_GetClassObj(f) \ (((__pyx_CyFunctionObject *) (f))->func_classobj) #define __Pyx_CyFunction_Defaults(type, f) \ ((type *)(((__pyx_CyFunctionObject *) (f))->defaults)) #define __Pyx_CyFunction_SetDefaultsGetter(f, g) \ ((__pyx_CyFunctionObject *) (f))->defaults_getter = (g) typedef struct { PyCFunctionObject func; int flags; PyObject *func_dict; PyObject *func_weakreflist; PyObject *func_name; PyObject *func_qualname; PyObject *func_doc; PyObject *func_code; PyObject *func_closure; PyObject *func_classobj; /* No-args super() class cell */ void *defaults; int defaults_pyobjects; PyObject *defaults_tuple; /* Const defaults tuple */ PyObject *defaults_kwdict; /* Const kwonly defaults dict */ PyObject *(*defaults_getter)(PyObject *); PyObject *func_annotations; /* function annotations dict */ } __pyx_CyFunctionObject; static PyTypeObject *__pyx_CyFunctionType = 0; #define __Pyx_CyFunction_NewEx(ml, flags, qualname, self, module, code) \ __Pyx_CyFunction_New(__pyx_CyFunctionType, ml, flags, qualname, self, module, code) static PyObject *__Pyx_CyFunction_New(PyTypeObject *, PyMethodDef *ml, int flags, PyObject* qualname, PyObject *self, PyObject *module, PyObject* code); static CYTHON_INLINE void *__Pyx_CyFunction_InitDefaults(PyObject *m, size_t size, int pyobjects); static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *m, PyObject *tuple); static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *m, PyObject *dict); static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *m, PyObject *dict); static int __Pyx_CyFunction_init(void); static CYTHON_INLINE void __Pyx_ExceptionSave(PyObject **type, PyObject **value, PyObject **tb); /*proto*/ static void __Pyx_ExceptionReset(PyObject *type, PyObject *value, PyObject *tb); /*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 static Py_ssize_t __Pyx_zeros[] = {0, 0, 0, 0, 0, 0, 0, 0}; static Py_ssize_t __Pyx_minusones[] = {-1, -1, -1, -1, -1, -1, -1, -1}; static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level); /*proto*/ static CYTHON_INLINE npy_int8 __Pyx_PyInt_from_py_npy_int8(PyObject *); static CYTHON_INLINE npy_int16 __Pyx_PyInt_from_py_npy_int16(PyObject *); static CYTHON_INLINE npy_int32 __Pyx_PyInt_from_py_npy_int32(PyObject *); static CYTHON_INLINE npy_int64 __Pyx_PyInt_from_py_npy_int64(PyObject *); static PyObject *__Pyx_FindPy2Metaclass(PyObject *bases); /*proto*/ static PyObject *__Pyx_CreateClass(PyObject *bases, PyObject *dict, PyObject *name, PyObject *qualname, PyObject *modname); /*proto*/ static CYTHON_INLINE PyObject *__Pyx_PyInt_to_py_npy_int64(npy_int64); static CYTHON_INLINE PyObject *__Pyx_PyInt_to_py_npy_int32(npy_int32); static CYTHON_INLINE PyObject *__Pyx_PyInt_to_py_npy_uint8(npy_uint8); static CYTHON_INLINE npy_uint8 __Pyx_PyInt_from_py_npy_uint8(PyObject *); #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(_WIN32) && defined(__cplusplus) && CYTHON_CCOMPLEX #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 static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float, float); #if CYTHON_CCOMPLEX #define __Pyx_c_eqf(a, b) ((a)==(b)) #define __Pyx_c_sumf(a, b) ((a)+(b)) #define __Pyx_c_difff(a, b) ((a)-(b)) #define __Pyx_c_prodf(a, b) ((a)*(b)) #define __Pyx_c_quotf(a, b) ((a)/(b)) #define __Pyx_c_negf(a) (-(a)) #ifdef __cplusplus #define __Pyx_c_is_zerof(z) ((z)==(float)0) #define __Pyx_c_conjf(z) (::std::conj(z)) #if 1 #define __Pyx_c_absf(z) (::std::abs(z)) #define __Pyx_c_powf(a, b) (::std::pow(a, b)) #endif #else #define __Pyx_c_is_zerof(z) ((z)==0) #define __Pyx_c_conjf(z) (conjf(z)) #if 1 #define __Pyx_c_absf(z) (cabsf(z)) #define __Pyx_c_powf(a, b) (cpowf(a, b)) #endif #endif #else static CYTHON_INLINE int __Pyx_c_eqf(__pyx_t_float_complex, __pyx_t_float_complex); static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_sumf(__pyx_t_float_complex, __pyx_t_float_complex); static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_difff(__pyx_t_float_complex, __pyx_t_float_complex); static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_prodf(__pyx_t_float_complex, __pyx_t_float_complex); static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_quotf(__pyx_t_float_complex, __pyx_t_float_complex); static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_negf(__pyx_t_float_complex); static CYTHON_INLINE int __Pyx_c_is_zerof(__pyx_t_float_complex); static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_conjf(__pyx_t_float_complex); #if 1 static CYTHON_INLINE float __Pyx_c_absf(__pyx_t_float_complex); static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_powf(__pyx_t_float_complex, __pyx_t_float_complex); #endif #endif static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double, double); #if CYTHON_CCOMPLEX #define __Pyx_c_eq(a, b) ((a)==(b)) #define __Pyx_c_sum(a, b) ((a)+(b)) #define __Pyx_c_diff(a, b) ((a)-(b)) #define __Pyx_c_prod(a, b) ((a)*(b)) #define __Pyx_c_quot(a, b) ((a)/(b)) #define __Pyx_c_neg(a) (-(a)) #ifdef __cplusplus #define __Pyx_c_is_zero(z) ((z)==(double)0) #define __Pyx_c_conj(z) (::std::conj(z)) #if 1 #define __Pyx_c_abs(z) (::std::abs(z)) #define __Pyx_c_pow(a, b) (::std::pow(a, b)) #endif #else #define __Pyx_c_is_zero(z) ((z)==0) #define __Pyx_c_conj(z) (conj(z)) #if 1 #define __Pyx_c_abs(z) (cabs(z)) #define __Pyx_c_pow(a, b) (cpow(a, b)) #endif #endif #else static CYTHON_INLINE int __Pyx_c_eq(__pyx_t_double_complex, __pyx_t_double_complex); static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_sum(__pyx_t_double_complex, __pyx_t_double_complex); static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_diff(__pyx_t_double_complex, __pyx_t_double_complex); static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_prod(__pyx_t_double_complex, __pyx_t_double_complex); static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_quot(__pyx_t_double_complex, __pyx_t_double_complex); static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_neg(__pyx_t_double_complex); static CYTHON_INLINE int __Pyx_c_is_zero(__pyx_t_double_complex); static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_conj(__pyx_t_double_complex); #if 1 static CYTHON_INLINE double __Pyx_c_abs(__pyx_t_double_complex); static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_pow(__pyx_t_double_complex, __pyx_t_double_complex); #endif #endif static CYTHON_INLINE unsigned char __Pyx_PyInt_AsUnsignedChar(PyObject *); static CYTHON_INLINE unsigned short __Pyx_PyInt_AsUnsignedShort(PyObject *); static CYTHON_INLINE unsigned int __Pyx_PyInt_AsUnsignedInt(PyObject *); static CYTHON_INLINE char __Pyx_PyInt_AsChar(PyObject *); static CYTHON_INLINE short __Pyx_PyInt_AsShort(PyObject *); static CYTHON_INLINE int __Pyx_PyInt_AsInt(PyObject *); static CYTHON_INLINE signed char __Pyx_PyInt_AsSignedChar(PyObject *); static CYTHON_INLINE signed short __Pyx_PyInt_AsSignedShort(PyObject *); static CYTHON_INLINE signed int __Pyx_PyInt_AsSignedInt(PyObject *); static CYTHON_INLINE int __Pyx_PyInt_AsLongDouble(PyObject *); static CYTHON_INLINE unsigned long __Pyx_PyInt_AsUnsignedLong(PyObject *); static CYTHON_INLINE unsigned PY_LONG_LONG __Pyx_PyInt_AsUnsignedLongLong(PyObject *); static CYTHON_INLINE long __Pyx_PyInt_AsLong(PyObject *); static CYTHON_INLINE PY_LONG_LONG __Pyx_PyInt_AsLongLong(PyObject *); static CYTHON_INLINE signed long __Pyx_PyInt_AsSignedLong(PyObject *); static CYTHON_INLINE signed PY_LONG_LONG __Pyx_PyInt_AsSignedLongLong(PyObject *); static int __Pyx_check_binary_version(void); #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 static PyObject *__Pyx_ImportModule(const char *name); /*proto*/ static PyTypeObject *__Pyx_ImportType(const char *module_name, const char *class_name, size_t size, int strict); /*proto*/ typedef struct { int code_line; PyCodeObject* code_object; } __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); static void __Pyx_AddTraceback(const char *funcname, int c_line, int py_line, const char *filename); /*proto*/ static int __Pyx_InitStrings(__Pyx_StringTabEntry *t); /*proto*/ /* Module declarations from 'cpython.buffer' */ /* Module declarations from 'cpython.ref' */ /* Module declarations from 'libc.string' */ /* Module declarations from 'libc.stdio' */ /* Module declarations from 'cpython.object' */ /* Module declarations from 'libc.stdlib' */ /* 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*/ /* Module declarations from 'cython' */ /* Module declarations from 'cpython.version' */ /* Module declarations from 'cpython.exc' */ /* Module declarations from 'cpython.module' */ /* Module declarations from 'cpython.mem' */ /* Module declarations from 'cpython.tuple' */ /* Module declarations from 'cpython.list' */ /* Module declarations from 'cpython.sequence' */ /* Module declarations from 'cpython.mapping' */ /* Module declarations from 'cpython.iterator' */ /* Module declarations from '__builtin__' */ /* Module declarations from 'cpython.type' */ static PyTypeObject *__pyx_ptype_7cpython_4type_type = 0; /* Module declarations from 'cpython.number' */ /* Module declarations from 'cpython.int' */ /* Module declarations from '__builtin__' */ /* Module declarations from 'cpython.bool' */ static PyTypeObject *__pyx_ptype_7cpython_4bool_bool = 0; /* Module declarations from 'cpython.long' */ /* Module declarations from 'cpython.float' */ /* Module declarations from '__builtin__' */ /* Module declarations from 'cpython.complex' */ static PyTypeObject *__pyx_ptype_7cpython_7complex_complex = 0; /* Module declarations from 'cpython.string' */ /* Module declarations from 'cpython.unicode' */ /* Module declarations from 'cpython.dict' */ /* Module declarations from 'cpython.instance' */ /* Module declarations from 'cpython.function' */ /* Module declarations from 'cpython.method' */ /* Module declarations from 'cpython.weakref' */ /* Module declarations from 'cpython.getargs' */ /* Module declarations from 'cpython.pythread' */ /* Module declarations from 'cpython.pystate' */ /* Module declarations from 'cpython.cobject' */ /* Module declarations from 'cpython.oldbuffer' */ /* Module declarations from 'cpython.set' */ /* Module declarations from 'cpython.bytes' */ /* Module declarations from 'cpython.pycapsule' */ /* Module declarations from 'cpython' */ /* Module declarations from 'util' */ static CYTHON_INLINE PyObject *__pyx_f_4util_get_value_at(PyArrayObject *, PyObject *); /*proto*/ static CYTHON_INLINE PyObject *__pyx_f_4util_is_array(PyObject *); /*proto*/ static CYTHON_INLINE int __pyx_f_4util__checknull(PyObject *); /*proto*/ static CYTHON_INLINE int __pyx_f_4util__checknan(PyObject *); /*proto*/ /* Module declarations from 'skiplist' */ /* Module declarations from 'libc' */ /* Module declarations from 'datetime' */ /* Module declarations from 'datetime' */ static PyTypeObject *__pyx_ptype_8datetime_date = 0; static PyTypeObject *__pyx_ptype_8datetime_datetime = 0; static PyTypeObject *__pyx_ptype_8datetime_timedelta = 0; static CYTHON_INLINE int __pyx_f_8datetime__cstring_to_dts(char *, int, pandas_datetimestruct *); /*proto*/ static CYTHON_INLINE PyObject *__pyx_f_8datetime__dts_to_pydatetime(pandas_datetimestruct *); /*proto*/ /* Module declarations from 'khash' */ /* Module declarations from 'pandas.algos' */ static PyTypeObject *__pyx_ptype_6pandas_5algos_IndexableSkiplist = 0; static PyTypeObject *__pyx_ptype_6pandas_5algos_Node = 0; static __pyx_t_5numpy_float64_t __pyx_v_6pandas_5algos_FP_ERR; static __pyx_t_5numpy_int8_t __pyx_v_6pandas_5algos_MINint8; static __pyx_t_5numpy_int16_t __pyx_v_6pandas_5algos_MINint16; static __pyx_t_5numpy_int32_t __pyx_v_6pandas_5algos_MINint32; static __pyx_t_5numpy_int64_t __pyx_v_6pandas_5algos_MINint64; static __pyx_t_5numpy_float16_t __pyx_v_6pandas_5algos_MINfloat16; static __pyx_t_5numpy_float32_t __pyx_v_6pandas_5algos_MINfloat32; static __pyx_t_5numpy_float64_t __pyx_v_6pandas_5algos_MINfloat64; static __pyx_t_5numpy_int8_t __pyx_v_6pandas_5algos_MAXint8; static __pyx_t_5numpy_int16_t __pyx_v_6pandas_5algos_MAXint16; static __pyx_t_5numpy_int32_t __pyx_v_6pandas_5algos_MAXint32; static __pyx_t_5numpy_int64_t __pyx_v_6pandas_5algos_MAXint64; static __pyx_t_5numpy_float16_t __pyx_v_6pandas_5algos_MAXfloat16; static __pyx_t_5numpy_float32_t __pyx_v_6pandas_5algos_MAXfloat32; static __pyx_t_5numpy_float64_t __pyx_v_6pandas_5algos_MAXfloat64; static double __pyx_v_6pandas_5algos_NaN; static double __pyx_v_6pandas_5algos_nan; static int __pyx_v_6pandas_5algos_TIEBREAK_AVERAGE; static int __pyx_v_6pandas_5algos_TIEBREAK_MIN; static int __pyx_v_6pandas_5algos_TIEBREAK_MAX; static int __pyx_v_6pandas_5algos_TIEBREAK_FIRST; static int __pyx_v_6pandas_5algos_TIEBREAK_FIRST_DESCENDING; static int __pyx_v_6pandas_5algos_PLATFORM_INT; static CYTHON_INLINE int __pyx_f_6pandas_5algos_int_max(int, int); /*proto*/ static CYTHON_INLINE int __pyx_f_6pandas_5algos_int_min(int, int); /*proto*/ static double __pyx_f_6pandas_5algos_Log2(double); /*proto*/ static PyObject *__pyx_f_6pandas_5algos__take_2d_float64(PyArrayObject *, PyObject *); /*proto*/ static PyObject *__pyx_f_6pandas_5algos__take_2d_int64(PyArrayObject *, PyObject *); /*proto*/ static PyObject *__pyx_f_6pandas_5algos__take_2d_object(PyArrayObject *, PyObject *); /*proto*/ static CYTHON_INLINE PyObject *__pyx_f_6pandas_5algos_are_diff(PyObject *, PyObject *); /*proto*/ static CYTHON_INLINE PyObject *__pyx_f_6pandas_5algos_kth_smallest_c(__pyx_t_5numpy_float64_t *, Py_ssize_t, Py_ssize_t); /*proto*/ static PyObject *__pyx_f_6pandas_5algos__roll_skiplist_op(PyArrayObject *, int, int, __pyx_t_6pandas_5algos_skiplist_f); /*proto*/ static __pyx_t_5numpy_double_t __pyx_f_6pandas_5algos__get_median(PyObject *, int, int); /*proto*/ static __pyx_t_5numpy_double_t __pyx_f_6pandas_5algos__get_max(PyObject *, int, int); /*proto*/ static __pyx_t_5numpy_double_t __pyx_f_6pandas_5algos__get_min(PyObject *, int, int); /*proto*/ static CYTHON_INLINE __pyx_t_5numpy_float64_t __pyx_f_6pandas_5algos__median_linear(__pyx_t_5numpy_float64_t *, int); /*proto*/ static PyObject *__pyx_f_6pandas_5algos_ensure_platform_int(PyObject *, int __pyx_skip_dispatch); /*proto*/ static PyObject *__pyx_f_6pandas_5algos_ensure_float64(PyObject *, int __pyx_skip_dispatch); /*proto*/ static PyObject *__pyx_f_6pandas_5algos_ensure_float32(PyObject *, int __pyx_skip_dispatch); /*proto*/ static PyObject *__pyx_f_6pandas_5algos_ensure_int8(PyObject *, int __pyx_skip_dispatch); /*proto*/ static PyObject *__pyx_f_6pandas_5algos_ensure_int16(PyObject *, int __pyx_skip_dispatch); /*proto*/ static PyObject *__pyx_f_6pandas_5algos_ensure_int32(PyObject *, int __pyx_skip_dispatch); /*proto*/ static PyObject *__pyx_f_6pandas_5algos_ensure_int64(PyObject *, int __pyx_skip_dispatch); /*proto*/ static PyObject *__pyx_f_6pandas_5algos_ensure_object(PyObject *, int __pyx_skip_dispatch); /*proto*/ static PyObject *__pyx_f_6pandas_5algos_map_indices_float64(PyArrayObject *, int __pyx_skip_dispatch); /*proto*/ static PyObject *__pyx_f_6pandas_5algos_map_indices_float32(PyArrayObject *, int __pyx_skip_dispatch); /*proto*/ static PyObject *__pyx_f_6pandas_5algos_map_indices_object(PyArrayObject *, int __pyx_skip_dispatch); /*proto*/ static PyObject *__pyx_f_6pandas_5algos_map_indices_int32(PyArrayObject *, int __pyx_skip_dispatch); /*proto*/ static PyObject *__pyx_f_6pandas_5algos_map_indices_int64(PyArrayObject *, int __pyx_skip_dispatch); /*proto*/ static PyObject *__pyx_f_6pandas_5algos_map_indices_bool(PyArrayObject *, int __pyx_skip_dispatch); /*proto*/ 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_Py_ssize_t = { "Py_ssize_t", NULL, sizeof(Py_ssize_t), { 0 }, 0, IS_UNSIGNED(Py_ssize_t) ? 'U' : 'I', IS_UNSIGNED(Py_ssize_t), 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_double_t = { "double_t", NULL, sizeof(__pyx_t_5numpy_double_t), { 0 }, 0, 'R', 0, 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_float32_t = { "float32_t", NULL, sizeof(__pyx_t_5numpy_float32_t), { 0 }, 0, 'R', 0, 0 }; 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_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 }; static __Pyx_TypeInfo __Pyx_TypeInfo_nn___pyx_t_5numpy_int16_t = { "int16_t", NULL, sizeof(__pyx_t_5numpy_int16_t), { 0 }, 0, IS_UNSIGNED(__pyx_t_5numpy_int16_t) ? 'U' : 'I', IS_UNSIGNED(__pyx_t_5numpy_int16_t), 0 }; #define __Pyx_MODULE_NAME "pandas.algos" int __pyx_module_is_main_pandas__algos = 0; /* Implementation of 'pandas.algos' */ static PyObject *__pyx_builtin_object; static PyObject *__pyx_builtin_range; static PyObject *__pyx_builtin_KeyError; static PyObject *__pyx_builtin_TypeError; static PyObject *__pyx_builtin_ValueError; static PyObject *__pyx_builtin_AssertionError; static PyObject *__pyx_builtin_NotImplementedError; static PyObject *__pyx_builtin_IndexError; static PyObject *__pyx_builtin_RuntimeError; static PyObject *__pyx_lambda_funcdef_6pandas_5algos_lambda1(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_other); /* proto */ static PyObject *__pyx_lambda_funcdef_6pandas_5algos_lambda2(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_other); /* proto */ static int __pyx_pf_6pandas_5algos_4Node___init__(struct __pyx_obj_6pandas_5algos_Node *__pyx_v_self, __pyx_t_5numpy_double_t __pyx_v_value, PyObject *__pyx_v_next, PyObject *__pyx_v_width); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_4Node_5value___get__(struct __pyx_obj_6pandas_5algos_Node *__pyx_v_self); /* proto */ static int __pyx_pf_6pandas_5algos_4Node_5value_2__set__(struct __pyx_obj_6pandas_5algos_Node *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_4Node_4next___get__(struct __pyx_obj_6pandas_5algos_Node *__pyx_v_self); /* proto */ static int __pyx_pf_6pandas_5algos_4Node_4next_2__set__(struct __pyx_obj_6pandas_5algos_Node *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ static int __pyx_pf_6pandas_5algos_4Node_4next_4__del__(struct __pyx_obj_6pandas_5algos_Node *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_4Node_5width___get__(struct __pyx_obj_6pandas_5algos_Node *__pyx_v_self); /* proto */ static int __pyx_pf_6pandas_5algos_4Node_5width_2__set__(struct __pyx_obj_6pandas_5algos_Node *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ static int __pyx_pf_6pandas_5algos_4Node_5width_4__del__(struct __pyx_obj_6pandas_5algos_Node *__pyx_v_self); /* proto */ static int __pyx_pf_6pandas_5algos_17IndexableSkiplist___init__(struct __pyx_obj_6pandas_5algos_IndexableSkiplist *__pyx_v_self, PyObject *__pyx_v_expected_size); /* proto */ static Py_ssize_t __pyx_pf_6pandas_5algos_17IndexableSkiplist_2__len__(struct __pyx_obj_6pandas_5algos_IndexableSkiplist *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_17IndexableSkiplist_4__getitem__(struct __pyx_obj_6pandas_5algos_IndexableSkiplist *__pyx_v_self, PyObject *__pyx_v_i); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_17IndexableSkiplist_6get(struct __pyx_obj_6pandas_5algos_IndexableSkiplist *__pyx_v_self, Py_ssize_t __pyx_v_i); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_17IndexableSkiplist_8insert(struct __pyx_obj_6pandas_5algos_IndexableSkiplist *__pyx_v_self, double __pyx_v_value); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_17IndexableSkiplist_10remove(struct __pyx_obj_6pandas_5algos_IndexableSkiplist *__pyx_v_self, double __pyx_v_value); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_rank_1d_float64(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_in_arr, PyObject *__pyx_v_ties_method, PyObject *__pyx_v_ascending, PyObject *__pyx_v_na_option); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_2rank_1d_int64(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_in_arr, PyObject *__pyx_v_ties_method, PyObject *__pyx_v_ascending, CYTHON_UNUSED PyObject *__pyx_v_na_option); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_4rank_2d_float64(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_in_arr, PyObject *__pyx_v_axis, PyObject *__pyx_v_ties_method, PyObject *__pyx_v_ascending, PyObject *__pyx_v_na_option); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_6rank_2d_int64(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_in_arr, PyObject *__pyx_v_axis, PyObject *__pyx_v_ties_method, PyObject *__pyx_v_ascending, CYTHON_UNUSED PyObject *__pyx_v_na_option); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_8rank_1d_generic(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_in_arr, int __pyx_v_retry, PyObject *__pyx_v_ties_method, PyObject *__pyx_v_ascending, PyObject *__pyx_v_na_option); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_10rank_2d_generic(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_in_arr, PyObject *__pyx_v_axis, PyObject *__pyx_v_ties_method, PyObject *__pyx_v_ascending, PyObject *__pyx_v_na_option); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_12_check_minp(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_win, PyObject *__pyx_v_minp, PyObject *__pyx_v_N); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_14kth_smallest(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_a, Py_ssize_t __pyx_v_k); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_16median(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_arr); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_18max_subseq(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_arr); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_20min_subseq(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_arr); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_22roll_sum(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_input, int __pyx_v_win, int __pyx_v_minp); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_24roll_mean(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_input, int __pyx_v_win, int __pyx_v_minp); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_26ewma(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_input, __pyx_t_5numpy_double_t __pyx_v_com, int __pyx_v_adjust); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_28nancorr(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_mat, PyObject *__pyx_v_cov, PyObject *__pyx_v_minp); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_30nancorr_spearman(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_mat, Py_ssize_t __pyx_v_minp); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_32roll_var(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_input, int __pyx_v_win, int __pyx_v_minp, int __pyx_v_ddof); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_34roll_skew(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_input, int __pyx_v_win, int __pyx_v_minp); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_36roll_kurt(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_input, int __pyx_v_win, int __pyx_v_minp); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_38roll_median_c(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_arg, int __pyx_v_win, int __pyx_v_minp); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_40roll_median_cython(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_input, int __pyx_v_win, int __pyx_v_minp); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_42roll_max2(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_a, int __pyx_v_window, int __pyx_v_minp); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_44roll_max(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_input, int __pyx_v_win, int __pyx_v_minp); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_46roll_min(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_input, int __pyx_v_win, int __pyx_v_minp); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_48roll_min2(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_a, int __pyx_v_window, int __pyx_v_minp); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_50roll_quantile(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_input, int __pyx_v_win, int __pyx_v_minp, double __pyx_v_quantile); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_52roll_generic(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_input, int __pyx_v_win, int __pyx_v_minp, PyObject *__pyx_v_func); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_54roll_window(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_input, PyArrayObject *__pyx_v_weights, int __pyx_v_minp, int __pyx_v_avg, int __pyx_v_avg_wgt); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_56is_lexsorted(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_list_of_arrays); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_58groupby_indices(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_60group_labels(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_62groupsort_indexer(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_index, Py_ssize_t __pyx_v_ngroups); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_64group_nth_object(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_out, PyArrayObject *__pyx_v_counts, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_labels, __pyx_t_5numpy_int64_t __pyx_v_rank); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_66group_nth_bin_object(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_out, PyArrayObject *__pyx_v_counts, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_bins, __pyx_t_5numpy_int64_t __pyx_v_rank); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_68group_last_object(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_out, PyArrayObject *__pyx_v_counts, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_labels); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_70group_last_bin_object(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_out, PyArrayObject *__pyx_v_counts, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_bins); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_72group_median(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_out, PyArrayObject *__pyx_v_counts, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_labels); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_74inner_join(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_left, PyArrayObject *__pyx_v_right, Py_ssize_t __pyx_v_max_groups); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_76left_outer_join(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_left, PyArrayObject *__pyx_v_right, Py_ssize_t __pyx_v_max_groups, PyObject *__pyx_v_sort); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_78full_outer_join(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_left, PyArrayObject *__pyx_v_right, Py_ssize_t __pyx_v_max_groups); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_80_get_result_indexer(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_sorter, PyObject *__pyx_v_indexer); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_82ffill_indexer(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_indexer); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_84ffill_by_group(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_indexer, PyArrayObject *__pyx_v_group_ids, __pyx_t_5numpy_int64_t __pyx_v_max_group); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_86ensure_platform_int(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_arr); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_88ensure_float64(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_arr); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_90ensure_float32(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_arr); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_92ensure_int8(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_arr); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_94ensure_int16(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_arr); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_96ensure_int32(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_arr); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_98ensure_int64(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_arr); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_100ensure_object(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_arr); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_102map_indices_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_index); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_104map_indices_float32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_index); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_106map_indices_object(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_index); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_108map_indices_int32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_index); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_110map_indices_int64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_index); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_112map_indices_bool(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_index); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_114pad_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_old, PyArrayObject *__pyx_v_new, PyObject *__pyx_v_limit); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_116pad_float32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_old, PyArrayObject *__pyx_v_new, PyObject *__pyx_v_limit); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_118pad_object(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_old, PyArrayObject *__pyx_v_new, PyObject *__pyx_v_limit); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_120pad_int32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_old, PyArrayObject *__pyx_v_new, PyObject *__pyx_v_limit); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_122pad_int64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_old, PyArrayObject *__pyx_v_new, PyObject *__pyx_v_limit); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_124pad_bool(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_old, PyArrayObject *__pyx_v_new, PyObject *__pyx_v_limit); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_126backfill_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_old, PyArrayObject *__pyx_v_new, PyObject *__pyx_v_limit); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_128backfill_float32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_old, PyArrayObject *__pyx_v_new, PyObject *__pyx_v_limit); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_130backfill_object(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_old, PyArrayObject *__pyx_v_new, PyObject *__pyx_v_limit); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_132backfill_int32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_old, PyArrayObject *__pyx_v_new, PyObject *__pyx_v_limit); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_134backfill_int64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_old, PyArrayObject *__pyx_v_new, PyObject *__pyx_v_limit); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_136backfill_bool(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_old, PyArrayObject *__pyx_v_new, PyObject *__pyx_v_limit); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_138pad_inplace_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_mask, PyObject *__pyx_v_limit); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_140pad_inplace_float32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_mask, PyObject *__pyx_v_limit); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_142pad_inplace_object(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_mask, PyObject *__pyx_v_limit); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_144pad_inplace_int32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_mask, PyObject *__pyx_v_limit); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_146pad_inplace_int64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_mask, PyObject *__pyx_v_limit); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_148pad_inplace_bool(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_mask, PyObject *__pyx_v_limit); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_150backfill_inplace_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_mask, PyObject *__pyx_v_limit); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_152backfill_inplace_float32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_mask, PyObject *__pyx_v_limit); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_154backfill_inplace_object(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_mask, PyObject *__pyx_v_limit); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_156backfill_inplace_int32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_mask, PyObject *__pyx_v_limit); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_158backfill_inplace_int64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_mask, PyObject *__pyx_v_limit); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_160backfill_inplace_bool(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_mask, PyObject *__pyx_v_limit); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_162pad_2d_inplace_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_mask, PyObject *__pyx_v_limit); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_164pad_2d_inplace_float32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_mask, PyObject *__pyx_v_limit); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_166pad_2d_inplace_object(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_mask, PyObject *__pyx_v_limit); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_168pad_2d_inplace_int32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_mask, PyObject *__pyx_v_limit); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_170pad_2d_inplace_int64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_mask, PyObject *__pyx_v_limit); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_172pad_2d_inplace_bool(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_mask, PyObject *__pyx_v_limit); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_174backfill_2d_inplace_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_mask, PyObject *__pyx_v_limit); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_176backfill_2d_inplace_float32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_mask, PyObject *__pyx_v_limit); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_178backfill_2d_inplace_object(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_mask, PyObject *__pyx_v_limit); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_180backfill_2d_inplace_int32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_mask, PyObject *__pyx_v_limit); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_182backfill_2d_inplace_int64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_mask, PyObject *__pyx_v_limit); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_184backfill_2d_inplace_bool(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_mask, PyObject *__pyx_v_limit); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_186is_monotonic_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_arr); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_188is_monotonic_float32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_arr); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_190is_monotonic_object(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_arr); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_192is_monotonic_int32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_arr); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_194is_monotonic_int64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_arr); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_196is_monotonic_bool(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_arr); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_198groupby_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_index, PyArrayObject *__pyx_v_labels); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_200groupby_float32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_index, PyArrayObject *__pyx_v_labels); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_202groupby_object(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_index, PyArrayObject *__pyx_v_labels); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_204groupby_int32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_index, PyArrayObject *__pyx_v_labels); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_206groupby_int64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_index, PyArrayObject *__pyx_v_labels); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_208groupby_bool(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_index, PyArrayObject *__pyx_v_labels); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_210arrmap_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_index, PyObject *__pyx_v_func); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_212arrmap_float32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_index, PyObject *__pyx_v_func); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_214arrmap_object(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_index, PyObject *__pyx_v_func); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_216arrmap_int32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_index, PyObject *__pyx_v_func); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_218arrmap_int64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_index, PyObject *__pyx_v_func); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_220arrmap_bool(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_index, PyObject *__pyx_v_func); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_222take_1d_bool_bool(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_224take_1d_bool_object(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_226take_1d_int8_int8(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_228take_1d_int8_int32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_230take_1d_int8_int64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_232take_1d_int8_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_234take_1d_int16_int16(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_236take_1d_int16_int32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_238take_1d_int16_int64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_240take_1d_int16_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_242take_1d_int32_int32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_244take_1d_int32_int64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_246take_1d_int32_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_248take_1d_int64_int64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_250take_1d_int64_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_252take_1d_float32_float32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_254take_1d_float32_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_256take_1d_float64_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_258take_1d_object_object(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_260take_2d_axis0_bool_bool(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_262take_2d_axis0_bool_object(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_264take_2d_axis0_int8_int8(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_266take_2d_axis0_int8_int32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_268take_2d_axis0_int8_int64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_270take_2d_axis0_int8_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_272take_2d_axis0_int16_int16(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_274take_2d_axis0_int16_int32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_276take_2d_axis0_int16_int64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_278take_2d_axis0_int16_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_280take_2d_axis0_int32_int32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_282take_2d_axis0_int32_int64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_284take_2d_axis0_int32_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_286take_2d_axis0_int64_int64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_288take_2d_axis0_int64_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_290take_2d_axis0_float32_float32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_292take_2d_axis0_float32_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_294take_2d_axis0_float64_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_296take_2d_axis0_object_object(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_298take_2d_axis1_bool_bool(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_300take_2d_axis1_bool_object(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_302take_2d_axis1_int8_int8(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_304take_2d_axis1_int8_int32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_306take_2d_axis1_int8_int64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_308take_2d_axis1_int8_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_310take_2d_axis1_int16_int16(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_312take_2d_axis1_int16_int32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_314take_2d_axis1_int16_int64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_316take_2d_axis1_int16_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_318take_2d_axis1_int32_int32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_320take_2d_axis1_int32_int64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_322take_2d_axis1_int32_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_324take_2d_axis1_int64_int64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_326take_2d_axis1_int64_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_328take_2d_axis1_float32_float32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_330take_2d_axis1_float32_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_332take_2d_axis1_float64_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_334take_2d_axis1_object_object(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_336take_2d_multi_bool_bool(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_338take_2d_multi_bool_object(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_340take_2d_multi_int8_int8(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_342take_2d_multi_int8_int32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_344take_2d_multi_int8_int64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_346take_2d_multi_int8_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_348take_2d_multi_int16_int16(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_350take_2d_multi_int16_int32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_352take_2d_multi_int16_int64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_354take_2d_multi_int16_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_356take_2d_multi_int32_int32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_358take_2d_multi_int32_int64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_360take_2d_multi_int32_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_362take_2d_multi_int64_int64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_364take_2d_multi_int64_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_366take_2d_multi_float32_float32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_368take_2d_multi_float32_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_370take_2d_multi_float64_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_372take_2d_multi_object_object(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_374diff_2d_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_arr, PyArrayObject *__pyx_v_out, Py_ssize_t __pyx_v_periods, int __pyx_v_axis); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_376diff_2d_float32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_arr, PyArrayObject *__pyx_v_out, Py_ssize_t __pyx_v_periods, int __pyx_v_axis); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_378diff_2d_int8(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_arr, PyArrayObject *__pyx_v_out, Py_ssize_t __pyx_v_periods, int __pyx_v_axis); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_380diff_2d_int16(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_arr, PyArrayObject *__pyx_v_out, Py_ssize_t __pyx_v_periods, int __pyx_v_axis); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_382diff_2d_int32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_arr, PyArrayObject *__pyx_v_out, Py_ssize_t __pyx_v_periods, int __pyx_v_axis); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_384diff_2d_int64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_arr, PyArrayObject *__pyx_v_out, Py_ssize_t __pyx_v_periods, int __pyx_v_axis); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_386group_last_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_out, PyArrayObject *__pyx_v_counts, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_labels); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_388group_last_float32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_out, PyArrayObject *__pyx_v_counts, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_labels); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_390group_last_bin_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_out, PyArrayObject *__pyx_v_counts, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_bins); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_392group_last_bin_float32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_out, PyArrayObject *__pyx_v_counts, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_bins); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_394group_nth_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_out, PyArrayObject *__pyx_v_counts, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_labels, __pyx_t_5numpy_int64_t __pyx_v_rank); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_396group_nth_float32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_out, PyArrayObject *__pyx_v_counts, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_labels, __pyx_t_5numpy_int64_t __pyx_v_rank); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_398group_nth_bin_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_out, PyArrayObject *__pyx_v_counts, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_bins, __pyx_t_5numpy_int64_t __pyx_v_rank); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_400group_nth_bin_float32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_out, PyArrayObject *__pyx_v_counts, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_bins, __pyx_t_5numpy_int64_t __pyx_v_rank); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_402group_add_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_out, PyArrayObject *__pyx_v_counts, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_labels); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_404group_add_float32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_out, PyArrayObject *__pyx_v_counts, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_labels); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_406group_add_bin_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_out, PyArrayObject *__pyx_v_counts, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_bins); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_408group_add_bin_float32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_out, PyArrayObject *__pyx_v_counts, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_bins); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_410group_prod_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_out, PyArrayObject *__pyx_v_counts, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_labels); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_412group_prod_float32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_out, PyArrayObject *__pyx_v_counts, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_labels); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_414group_prod_bin_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_out, PyArrayObject *__pyx_v_counts, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_bins); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_416group_prod_bin_float32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_out, PyArrayObject *__pyx_v_counts, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_bins); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_418group_var_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_out, PyArrayObject *__pyx_v_counts, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_labels); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_420group_var_float32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_out, PyArrayObject *__pyx_v_counts, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_labels); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_422group_var_bin_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_out, PyArrayObject *__pyx_v_counts, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_bins); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_424group_var_bin_float32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_out, PyArrayObject *__pyx_v_counts, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_bins); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_426group_mean_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_out, PyArrayObject *__pyx_v_counts, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_labels); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_428group_mean_float32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_out, PyArrayObject *__pyx_v_counts, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_labels); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_430group_mean_bin_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_out, PyArrayObject *__pyx_v_counts, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_bins); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_432group_mean_bin_float32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_out, PyArrayObject *__pyx_v_counts, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_bins); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_434group_min_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_out, PyArrayObject *__pyx_v_counts, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_labels); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_436group_min_float32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_out, PyArrayObject *__pyx_v_counts, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_labels); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_438group_min_bin_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_out, PyArrayObject *__pyx_v_counts, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_bins); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_440group_min_bin_float32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_out, PyArrayObject *__pyx_v_counts, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_bins); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_442group_max_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_out, PyArrayObject *__pyx_v_counts, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_labels); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_444group_max_float32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_out, PyArrayObject *__pyx_v_counts, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_labels); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_446group_max_bin_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_out, PyArrayObject *__pyx_v_counts, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_bins); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_448group_max_bin_float32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_out, PyArrayObject *__pyx_v_counts, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_bins); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_450group_ohlc_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_out, PyArrayObject *__pyx_v_counts, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_bins); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_452group_ohlc_float32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_out, PyArrayObject *__pyx_v_counts, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_bins); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_454left_join_indexer_unique_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_left, PyArrayObject *__pyx_v_right); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_456left_join_indexer_unique_float32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_left, PyArrayObject *__pyx_v_right); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_458left_join_indexer_unique_object(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_left, PyArrayObject *__pyx_v_right); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_460left_join_indexer_unique_int32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_left, PyArrayObject *__pyx_v_right); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_462left_join_indexer_unique_int64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_left, PyArrayObject *__pyx_v_right); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_464left_join_indexer_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_left, PyArrayObject *__pyx_v_right); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_466left_join_indexer_float32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_left, PyArrayObject *__pyx_v_right); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_468left_join_indexer_object(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_left, PyArrayObject *__pyx_v_right); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_470left_join_indexer_int32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_left, PyArrayObject *__pyx_v_right); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_472left_join_indexer_int64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_left, PyArrayObject *__pyx_v_right); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_474outer_join_indexer_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_left, PyArrayObject *__pyx_v_right); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_476outer_join_indexer_float32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_left, PyArrayObject *__pyx_v_right); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_478outer_join_indexer_object(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_left, PyArrayObject *__pyx_v_right); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_480outer_join_indexer_int32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_left, PyArrayObject *__pyx_v_right); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_482outer_join_indexer_int64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_left, PyArrayObject *__pyx_v_right); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_484inner_join_indexer_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_left, PyArrayObject *__pyx_v_right); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_486inner_join_indexer_float32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_left, PyArrayObject *__pyx_v_right); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_488inner_join_indexer_object(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_left, PyArrayObject *__pyx_v_right); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_490inner_join_indexer_int32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_left, PyArrayObject *__pyx_v_right); /* proto */ static PyObject *__pyx_pf_6pandas_5algos_492inner_join_indexer_int64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_left, PyArrayObject *__pyx_v_right); /* 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_5algos_IndexableSkiplist(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_6pandas_5algos_Node(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static char __pyx_k_1[] = "Not Found"; static char __pyx_k_25[] = "first not supported for non-numeric data"; static char __pyx_k_35[] = "min_periods (%d) must be <= window (%d)"; static char __pyx_k_36[] = "min_periods must be >= 0"; static char __pyx_k_40[] = "Invalid window size %d"; static char __pyx_k_41[] = "Invalid min_periods size %d greater than window %d"; static char __pyx_k_46[] = "take_2d_axis1_float64_float64"; static char __pyx_k_51[] = "Limit must be non-negative"; static char __pyx_k_99[] = "len(index) != len(labels)"; static char __pyx_k__A[] = "A"; static char __pyx_k__B[] = "B"; static char __pyx_k__C[] = "C"; static char __pyx_k__D[] = "D"; static char __pyx_k__H[] = "H"; static char __pyx_k__I[] = "I"; static char __pyx_k__K[] = "K"; static char __pyx_k__L[] = "L"; static char __pyx_k__N[] = "N"; static char __pyx_k__O[] = "O"; static char __pyx_k__Q[] = "Q"; static char __pyx_k__R[] = "R"; static char __pyx_k__S[] = "S"; static char __pyx_k__T[] = "T"; static char __pyx_k__a[] = "a"; static char __pyx_k__b[] = "b"; static char __pyx_k__c[] = "c"; static char __pyx_k__d[] = "d"; static char __pyx_k__e[] = "e"; static char __pyx_k__f[] = "f"; static char __pyx_k__g[] = "g"; static char __pyx_k__h[] = "h"; static char __pyx_k__i[] = "i"; static char __pyx_k__j[] = "j"; static char __pyx_k__k[] = "k"; static char __pyx_k__l[] = "l"; static char __pyx_k__m[] = "m"; static char __pyx_k__n[] = "n"; static char __pyx_k__o[] = "o"; static char __pyx_k__q[] = "q"; static char __pyx_k__s[] = "s"; static char __pyx_k__t[] = "t"; static char __pyx_k__v[] = "v"; static char __pyx_k__w[] = "w"; static char __pyx_k__x[] = "x"; static char __pyx_k__y[] = "y"; static char __pyx_k__z[] = "z"; static char __pyx_k_106[] = "pandas.lib"; static char __pyx_k_107[] = "maybe_convert_objects"; static char __pyx_k_200[] = "Output array must have 4 columns"; static char __pyx_k_203[] = "index out of bounds"; static char __pyx_k_206[] = "Unable to parse %s"; static char __pyx_k_207[] = "ndarray is not C contiguous"; static char __pyx_k_209[] = "ndarray is not Fortran contiguous"; static char __pyx_k_211[] = "Non-native byte order not supported"; static char __pyx_k_213[] = "unknown dtype code in numpy.pxd (%d)"; static char __pyx_k_214[] = "Format string allocated too short, see comment in numpy.pxd"; static char __pyx_k_217[] = "Format string allocated too short."; static char __pyx_k_221[] = "/home/yoh/deb/gits/pkg-exppsy/pandas/pandas/algos.pyx"; static char __pyx_k_222[] = "pandas.algos"; static char __pyx_k_231[] = ""; static char __pyx_k_290[] = "group_nth_bin_object"; static char __pyx_k_295[] = "group_last_bin_object"; static char __pyx_k_300[] = "pandas/src/join.pyx"; static char __pyx_k_314[] = "pandas/src/generated.pyx"; static char __pyx_k_351[] = "backfill_inplace_float64"; static char __pyx_k_354[] = "backfill_inplace_float32"; static char __pyx_k_357[] = "backfill_inplace_object"; static char __pyx_k_360[] = "backfill_inplace_int32"; static char __pyx_k_363[] = "backfill_inplace_int64"; static char __pyx_k_366[] = "backfill_inplace_bool"; static char __pyx_k_369[] = "pad_2d_inplace_float64"; static char __pyx_k_372[] = "pad_2d_inplace_float32"; static char __pyx_k_375[] = "pad_2d_inplace_object"; static char __pyx_k_378[] = "pad_2d_inplace_int32"; static char __pyx_k_381[] = "pad_2d_inplace_int64"; static char __pyx_k_386[] = "backfill_2d_inplace_float64"; static char __pyx_k_389[] = "backfill_2d_inplace_float32"; static char __pyx_k_392[] = "backfill_2d_inplace_object"; static char __pyx_k_395[] = "backfill_2d_inplace_int32"; static char __pyx_k_398[] = "backfill_2d_inplace_int64"; static char __pyx_k_401[] = "backfill_2d_inplace_bool"; static char __pyx_k_404[] = "is_monotonic_float64"; static char __pyx_k_407[] = "is_monotonic_float32"; static char __pyx_k_452[] = "take_1d_int8_float64"; static char __pyx_k_461[] = "take_1d_int16_float64"; static char __pyx_k_468[] = "take_1d_int32_float64"; static char __pyx_k_473[] = "take_1d_int64_float64"; static char __pyx_k_476[] = "take_1d_float32_float32"; static char __pyx_k_479[] = "take_1d_float32_float64"; static char __pyx_k_482[] = "take_1d_float64_float64"; static char __pyx_k_485[] = "take_1d_object_object"; static char __pyx_k_488[] = "take_2d_axis0_bool_bool"; static char __pyx_k_491[] = "take_2d_axis0_bool_object"; static char __pyx_k_494[] = "take_2d_axis0_int8_int8"; static char __pyx_k_497[] = "take_2d_axis0_int8_int32"; static char __pyx_k_500[] = "take_2d_axis0_int8_int64"; static char __pyx_k_503[] = "take_2d_axis0_int8_float64"; static char __pyx_k_506[] = "take_2d_axis0_int16_int16"; static char __pyx_k_509[] = "take_2d_axis0_int16_int32"; static char __pyx_k_512[] = "take_2d_axis0_int16_int64"; static char __pyx_k_515[] = "take_2d_axis0_int16_float64"; static char __pyx_k_518[] = "take_2d_axis0_int32_int32"; static char __pyx_k_521[] = "take_2d_axis0_int32_int64"; static char __pyx_k_524[] = "take_2d_axis0_int32_float64"; static char __pyx_k_527[] = "take_2d_axis0_int64_int64"; static char __pyx_k_530[] = "take_2d_axis0_int64_float64"; static char __pyx_k_533[] = "take_2d_axis0_float32_float32"; static char __pyx_k_536[] = "take_2d_axis0_float32_float64"; static char __pyx_k_539[] = "take_2d_axis0_float64_float64"; static char __pyx_k_542[] = "take_2d_axis0_object_object"; static char __pyx_k_545[] = "take_2d_axis1_bool_bool"; static char __pyx_k_548[] = "take_2d_axis1_bool_object"; static char __pyx_k_551[] = "take_2d_axis1_int8_int8"; static char __pyx_k_554[] = "take_2d_axis1_int8_int32"; static char __pyx_k_557[] = "take_2d_axis1_int8_int64"; static char __pyx_k_560[] = "take_2d_axis1_int8_float64"; static char __pyx_k_563[] = "take_2d_axis1_int16_int16"; static char __pyx_k_566[] = "take_2d_axis1_int16_int32"; static char __pyx_k_569[] = "take_2d_axis1_int16_int64"; static char __pyx_k_572[] = "take_2d_axis1_int16_float64"; static char __pyx_k_575[] = "take_2d_axis1_int32_int32"; static char __pyx_k_578[] = "take_2d_axis1_int32_int64"; static char __pyx_k_581[] = "take_2d_axis1_int32_float64"; static char __pyx_k_584[] = "take_2d_axis1_int64_int64"; static char __pyx_k_587[] = "take_2d_axis1_int64_float64"; static char __pyx_k_590[] = "take_2d_axis1_float32_float32"; static char __pyx_k_593[] = "take_2d_axis1_float32_float64"; static char __pyx_k_598[] = "take_2d_axis1_object_object"; static char __pyx_k_601[] = "take_2d_multi_bool_bool"; static char __pyx_k_604[] = "take_2d_multi_bool_object"; static char __pyx_k_607[] = "take_2d_multi_int8_int8"; static char __pyx_k_610[] = "take_2d_multi_int8_int32"; static char __pyx_k_613[] = "take_2d_multi_int8_int64"; static char __pyx_k_616[] = "take_2d_multi_int8_float64"; static char __pyx_k_619[] = "take_2d_multi_int16_int16"; static char __pyx_k_622[] = "take_2d_multi_int16_int32"; static char __pyx_k_625[] = "take_2d_multi_int16_int64"; static char __pyx_k_628[] = "take_2d_multi_int16_float64"; static char __pyx_k_631[] = "take_2d_multi_int32_int32"; static char __pyx_k_634[] = "take_2d_multi_int32_int64"; static char __pyx_k_637[] = "take_2d_multi_int32_float64"; static char __pyx_k_640[] = "take_2d_multi_int64_int64"; static char __pyx_k_643[] = "take_2d_multi_int64_float64"; static char __pyx_k_646[] = "take_2d_multi_float32_float32"; static char __pyx_k_649[] = "take_2d_multi_float32_float64"; static char __pyx_k_652[] = "take_2d_multi_float64_float64"; static char __pyx_k_655[] = "take_2d_multi_object_object"; static char __pyx_k_674[] = "group_last_bin_float64"; static char __pyx_k_677[] = "group_last_bin_float32"; static char __pyx_k_684[] = "group_nth_bin_float64"; static char __pyx_k_687[] = "group_nth_bin_float32"; static char __pyx_k_694[] = "group_add_bin_float64"; static char __pyx_k_697[] = "group_add_bin_float32"; static char __pyx_k_704[] = "group_prod_bin_float64"; static char __pyx_k_707[] = "group_prod_bin_float32"; static char __pyx_k_714[] = "group_var_bin_float64"; static char __pyx_k_717[] = "group_var_bin_float32"; static char __pyx_k_724[] = "group_mean_bin_float64"; static char __pyx_k_727[] = "group_mean_bin_float32"; static char __pyx_k_734[] = "group_min_bin_float64"; static char __pyx_k_737[] = "group_min_bin_float32"; static char __pyx_k_744[] = "group_max_bin_float64"; static char __pyx_k_747[] = "group_max_bin_float32"; static char __pyx_k_754[] = "left_join_indexer_unique_float64"; static char __pyx_k_757[] = "left_join_indexer_unique_float32"; static char __pyx_k_760[] = "left_join_indexer_unique_object"; static char __pyx_k_763[] = "left_join_indexer_unique_int32"; static char __pyx_k_766[] = "left_join_indexer_unique_int64"; static char __pyx_k_769[] = "left_join_indexer_float64"; static char __pyx_k_772[] = "left_join_indexer_float32"; static char __pyx_k_775[] = "left_join_indexer_object"; static char __pyx_k_778[] = "left_join_indexer_int32"; static char __pyx_k_781[] = "left_join_indexer_int64"; static char __pyx_k_784[] = "outer_join_indexer_float64"; static char __pyx_k_787[] = "outer_join_indexer_float32"; static char __pyx_k_790[] = "outer_join_indexer_object"; static char __pyx_k_793[] = "outer_join_indexer_int32"; static char __pyx_k_796[] = "outer_join_indexer_int64"; static char __pyx_k_799[] = "inner_join_indexer_float64"; static char __pyx_k_802[] = "inner_join_indexer_float32"; static char __pyx_k_805[] = "inner_join_indexer_object"; static char __pyx_k_808[] = "inner_join_indexer_int32"; static char __pyx_k_811[] = "inner_join_indexer_int64"; static char __pyx_k__NA[] = "NA"; static char __pyx_k__Zd[] = "Zd"; static char __pyx_k__Zf[] = "Zf"; static char __pyx_k__Zg[] = "Zg"; static char __pyx_k__ai[] = "ai"; static char __pyx_k__ct[] = "ct"; static char __pyx_k__f8[] = "f8"; static char __pyx_k__fv[] = "fv"; static char __pyx_k__i0[] = "i0"; static char __pyx_k__i8[] = "i8"; static char __pyx_k__lc[] = "lc"; static char __pyx_k__n0[] = "n0"; static char __pyx_k__np[] = "np"; static char __pyx_k__rc[] = "rc"; static char __pyx_k__sl[] = "sl"; static char __pyx_k__sx[] = "sx"; static char __pyx_k__sy[] = "sy"; static char __pyx_k__vx[] = "vx"; static char __pyx_k__vy[] = "vy"; static char __pyx_k__xi[] = "xi"; static char __pyx_k__xx[] = "xx"; static char __pyx_k__yi[] = "yi"; static char __pyx_k__NIL[] = "NIL"; static char __pyx_k__NaN[] = "NaN"; static char __pyx_k___as[] = "_as"; static char __pyx_k__adj[] = "adj"; static char __pyx_k__arg[] = "arg"; static char __pyx_k__arr[] = "arr"; static char __pyx_k__avg[] = "avg"; static char __pyx_k__buf[] = "buf"; static char __pyx_k__com[] = "com"; static char __pyx_k__cov[] = "cov"; static char __pyx_k__cur[] = "cur"; static char __pyx_k__day[] = "day"; static char __pyx_k__dim[] = "dim"; static char __pyx_k__end[] = "end"; static char __pyx_k__get[] = "get"; static char __pyx_k__gid[] = "gid"; static char __pyx_k__ids[] = "ids"; static char __pyx_k__idx[] = "idx"; static char __pyx_k__inf[] = "inf"; static char __pyx_k__key[] = "key"; static char __pyx_k__lab[] = "lab"; static char __pyx_k__lib[] = "lib"; static char __pyx_k__lim[] = "lim"; static char __pyx_k__loc[] = "loc"; static char __pyx_k__mat[] = "mat"; static char __pyx_k__max[] = "max"; static char __pyx_k__min[] = "min"; static char __pyx_k__nan[] = "nan"; static char __pyx_k__new[] = "new"; static char __pyx_k__old[] = "old"; static char __pyx_k__out[] = "out"; static char __pyx_k__pre[] = "pre"; static char __pyx_k__ptr[] = "ptr"; static char __pyx_k__put[] = "put"; static char __pyx_k__res[] = "res"; static char __pyx_k__ret[] = "ret"; static char __pyx_k__rev[] = "rev"; static char __pyx_k__top[] = "top"; static char __pyx_k__val[] = "val"; static char __pyx_k__win[] = "win"; static char __pyx_k__xxx[] = "xxx"; static char __pyx_k__NINF[] = "NINF"; static char __pyx_k__aold[] = "aold"; static char __pyx_k__axis[] = "axis"; static char __pyx_k__bins[] = "bins"; static char __pyx_k__copy[] = "copy"; static char __pyx_k__data[] = "data"; static char __pyx_k__ddof[] = "ddof"; static char __pyx_k__dims[] = "dims"; static char __pyx_k__dups[] = "dups"; static char __pyx_k__ewma[] = "ewma"; static char __pyx_k__fill[] = "fill"; static char __pyx_k__func[] = "func"; static char __pyx_k__hour[] = "hour"; static char __pyx_k__idx0[] = "idx0"; static char __pyx_k__idx1[] = "idx1"; static char __pyx_k__in_i[] = "in_i"; static char __pyx_k__in_k[] = "in_k"; static char __pyx_k__in_n[] = "in_n"; static char __pyx_k__infs[] = "infs"; static char __pyx_k__int8[] = "int8"; static char __pyx_k__int_[] = "int_"; static char __pyx_k__keep[] = "keep"; static char __pyx_k__kind[] = "kind"; static char __pyx_k__last[] = "last"; static char __pyx_k__left[] = "left"; static char __pyx_k__lval[] = "lval"; static char __pyx_k__mask[] = "mask"; static char __pyx_k__maxx[] = "maxx"; static char __pyx_k__mean[] = "mean"; static char __pyx_k__minp[] = "minp"; static char __pyx_k__minx[] = "minx"; static char __pyx_k__neww[] = "neww"; static char __pyx_k__next[] = "next"; static char __pyx_k__nobs[] = "nobs"; static char __pyx_k__oldw[] = "oldw"; static char __pyx_k__prev[] = "prev"; static char __pyx_k__rank[] = "rank"; static char __pyx_k__resx[] = "resx"; static char __pyx_k__ring[] = "ring"; static char __pyx_k__rval[] = "rval"; static char __pyx_k__seen[] = "seen"; static char __pyx_k__self[] = "self"; static char __pyx_k__size[] = "size"; static char __pyx_k__sort[] = "sort"; static char __pyx_k__stop[] = "stop"; static char __pyx_k__sumx[] = "sumx"; static char __pyx_k__sumy[] = "sumy"; static char __pyx_k__take[] = "take"; static char __pyx_k__vecs[] = "vecs"; static char __pyx_k__view[] = "view"; static char __pyx_k__vlow[] = "vlow"; static char __pyx_k__xxxx[] = "xxxx"; static char __pyx_k__year[] = "year"; static char __pyx_k__array[] = "array"; static char __pyx_k__count[] = "count"; static char __pyx_k__dtype[] = "dtype"; static char __pyx_k__empty[] = "empty"; static char __pyx_k__first[] = "first"; static char __pyx_k__flags[] = "flags"; static char __pyx_k__iinfo[] = "iinfo"; static char __pyx_k__index[] = "index"; static char __pyx_k__input[] = "input"; static char __pyx_k__int16[] = "int16"; static char __pyx_k__int32[] = "int32"; static char __pyx_k__int64[] = "int64"; static char __pyx_k__isnan[] = "isnan"; static char __pyx_k__label[] = "label"; static char __pyx_k__limit[] = "limit"; static char __pyx_k__meanx[] = "meanx"; static char __pyx_k__meany[] = "meany"; static char __pyx_k__month[] = "month"; static char __pyx_k__nbins[] = "nbins"; static char __pyx_k__nleft[] = "nleft"; static char __pyx_k__numpy[] = "numpy"; static char __pyx_k__other[] = "other"; static char __pyx_k__prodx[] = "prodx"; static char __pyx_k__range[] = "range"; static char __pyx_k__ranks[] = "ranks"; static char __pyx_k__retry[] = "retry"; static char __pyx_k__right[] = "right"; static char __pyx_k__shape[] = "shape"; static char __pyx_k__start[] = "start"; static char __pyx_k__sum_x[] = "sum_x"; static char __pyx_k__sumxx[] = "sumxx"; static char __pyx_k__sumyy[] = "sumyy"; static char __pyx_k__uint8[] = "uint8"; static char __pyx_k__value[] = "value"; static char __pyx_k__vhigh[] = "vhigh"; static char __pyx_k__vopen[] = "vopen"; static char __pyx_k__where[] = "where"; static char __pyx_k__width[] = "width"; static char __pyx_k__win_i[] = "win_i"; static char __pyx_k__win_k[] = "win_k"; static char __pyx_k__win_n[] = "win_n"; static char __pyx_k__zeros[] = "zeros"; static char __pyx_k____eq__[] = "__eq__"; static char __pyx_k____ge__[] = "__ge__"; static char __pyx_k____gt__[] = "__gt__"; static char __pyx_k____le__[] = "__le__"; static char __pyx_k____lt__[] = "__lt__"; static char __pyx_k____ne__[] = "__ne__"; static char __pyx_k__adjust[] = "adjust"; static char __pyx_k__arange[] = "arange"; static char __pyx_k__astype[] = "astype"; static char __pyx_k__bufarr[] = "bufarr"; static char __pyx_k__counts[] = "counts"; static char __pyx_k__in_arr[] = "in_arr"; static char __pyx_k__insert[] = "insert"; static char __pyx_k__labels[] = "labels"; static char __pyx_k__length[] = "length"; static char __pyx_k__median[] = "median"; static char __pyx_k__minute[] = "minute"; static char __pyx_k__neg_ct[] = "neg_ct"; static char __pyx_k__nright[] = "nright"; static char __pyx_k__object[] = "object"; static char __pyx_k__offset[] = "offset"; static char __pyx_k__oldbuf[] = "oldbuf"; static char __pyx_k__output[] = "output"; static char __pyx_k__pandas[] = "pandas"; static char __pyx_k__random[] = "random"; static char __pyx_k__remove[] = "remove"; static char __pyx_k__result[] = "result"; static char __pyx_k__second[] = "second"; static char __pyx_k__sorter[] = "sorter"; static char __pyx_k__sum_xx[] = "sum_xx"; static char __pyx_k__val_in[] = "val_in"; static char __pyx_k__values[] = "values"; static char __pyx_k__vclose[] = "vclose"; static char __pyx_k__window[] = "window"; static char __pyx_k____cmp__[] = "__cmp__"; static char __pyx_k___counts[] = "_counts"; static char __pyx_k__argsort[] = "argsort"; static char __pyx_k__asarray[] = "asarray"; static char __pyx_k__average[] = "average"; static char __pyx_k__avg_wgt[] = "avg_wgt"; static char __pyx_k__divisor[] = "divisor"; static char __pyx_k__float16[] = "float16"; static char __pyx_k__float32[] = "float32"; static char __pyx_k__float64[] = "float64"; static char __pyx_k__indexer[] = "indexer"; static char __pyx_k__keep_na[] = "keep_na"; static char __pyx_k__maskedx[] = "maskedx"; static char __pyx_k__maskedy[] = "maskedy"; static char __pyx_k__members[] = "members"; static char __pyx_k__minpair[] = "minpair"; static char __pyx_k__nancorr[] = "nancorr"; static char __pyx_k__ngroups[] = "ngroups"; static char __pyx_k__nlevels[] = "nlevels"; static char __pyx_k__nonzero[] = "nonzero"; static char __pyx_k__object_[] = "object_"; static char __pyx_k__periods[] = "periods"; static char __pyx_k__putmask[] = "putmask"; static char __pyx_k__reverse[] = "reverse"; static char __pyx_k__tot_wgt[] = "tot_wgt"; static char __pyx_k__val_win[] = "val_win"; static char __pyx_k__weights[] = "weights"; static char __pyx_k__Infinity[] = "Infinity"; static char __pyx_k__KeyError[] = "KeyError"; static char __pyx_k____main__[] = "__main__"; static char __pyx_k____test__[] = "__test__"; static char __pyx_k__datetime[] = "datetime"; static char __pyx_k__isfinite[] = "isfinite"; static char __pyx_k__last_obs[] = "last_obs"; static char __pyx_k__left_pos[] = "left_pos"; static char __pyx_k__lindexer[] = "lindexer"; static char __pyx_k__midpoint[] = "midpoint"; static char __pyx_k__pad_bool[] = "pad_bool"; static char __pyx_k__position[] = "position"; static char __pyx_k__quantile[] = "quantile"; static char __pyx_k__rindexer[] = "rindexer"; static char __pyx_k__roll_max[] = "roll_max"; static char __pyx_k__roll_min[] = "roll_min"; static char __pyx_k__roll_sum[] = "roll_sum"; static char __pyx_k__roll_var[] = "roll_var"; static char __pyx_k__skiplist[] = "skiplist"; static char __pyx_k__tiebreak[] = "tiebreak"; static char __pyx_k__TypeError[] = "TypeError"; static char __pyx_k____class__[] = "__class__"; static char __pyx_k__argsorted[] = "argsorted"; static char __pyx_k__ascending[] = "ascending"; static char __pyx_k__got_first[] = "got_first"; static char __pyx_k__group_ids[] = "group_ids"; static char __pyx_k__is_unique[] = "is_unique"; static char __pyx_k__isnullobj[] = "isnullobj"; static char __pyx_k__max_group[] = "max_group"; static char __pyx_k__mergesort[] = "mergesort"; static char __pyx_k__na_option[] = "na_option"; static char __pyx_k__nan_value[] = "nan_value"; static char __pyx_k__ones_like[] = "ones_like"; static char __pyx_k__pad_int32[] = "pad_int32"; static char __pyx_k__pad_int64[] = "pad_int64"; static char __pyx_k__right_pos[] = "right_pos"; static char __pyx_k__roll_kurt[] = "roll_kurt"; static char __pyx_k__roll_max2[] = "roll_max2"; static char __pyx_k__roll_mean[] = "roll_mean"; static char __pyx_k__roll_min2[] = "roll_min2"; static char __pyx_k__roll_skew[] = "roll_skew"; static char __pyx_k__sum_ranks[] = "sum_ranks"; static char __pyx_k__IndexError[] = "IndexError"; static char __pyx_k__ValueError[] = "ValueError"; static char __pyx_k____import__[] = "__import__"; static char __pyx_k____module__[] = "__module__"; static char __pyx_k__empty_like[] = "empty_like"; static char __pyx_k__fill_count[] = "fill_count"; static char __pyx_k__fill_value[] = "fill_value"; static char __pyx_k__inner_join[] = "inner_join"; static char __pyx_k__left_count[] = "left_count"; static char __pyx_k__max_groups[] = "max_groups"; static char __pyx_k__max_subseq[] = "max_subseq"; static char __pyx_k__min_subseq[] = "min_subseq"; static char __pyx_k__pad_object[] = "pad_object"; static char __pyx_k__pydatetime[] = "pydatetime"; static char __pyx_k__valid_locs[] = "valid_locs"; static char __pyx_k__zeros_like[] = "zeros_like"; static char __pyx_k__NegInfinity[] = "NegInfinity"; static char __pyx_k___check_minp[] = "_check_minp"; static char __pyx_k__arrmap_bool[] = "arrmap_bool"; static char __pyx_k__isnullobj2d[] = "isnullobj2d"; static char __pyx_k__left_sorter[] = "left_sorter"; static char __pyx_k__microsecond[] = "microsecond"; static char __pyx_k__pad_float32[] = "pad_float32"; static char __pyx_k__pad_float64[] = "pad_float64"; static char __pyx_k__right_count[] = "right_count"; static char __pyx_k__roll_window[] = "roll_window"; static char __pyx_k__sorted_data[] = "sorted_data"; static char __pyx_k__tiebreakers[] = "tiebreakers"; static char __pyx_k__ties_method[] = "ties_method"; static char __pyx_k__RuntimeError[] = "RuntimeError"; static char __pyx_k____qualname__[] = "__qualname__"; static char __pyx_k___return_true[] = "_return_true"; static char __pyx_k__arrmap_int32[] = "arrmap_int32"; static char __pyx_k__arrmap_int64[] = "arrmap_int64"; static char __pyx_k__c_contiguous[] = "c_contiguous"; static char __pyx_k__diff_2d_int8[] = "diff_2d_int8"; static char __pyx_k__f_contiguous[] = "f_contiguous"; static char __pyx_k__group_labels[] = "group_labels"; static char __pyx_k__group_median[] = "group_median"; static char __pyx_k__groupby_bool[] = "groupby_bool"; static char __pyx_k__is_lexsorted[] = "is_lexsorted"; static char __pyx_k__kth_smallest[] = "kth_smallest"; static char __pyx_k__left_indexer[] = "left_indexer"; static char __pyx_k__right_sorter[] = "right_sorter"; static char __pyx_k__roll_generic[] = "roll_generic"; static char __pyx_k____metaclass__[] = "__metaclass__"; static char __pyx_k___return_false[] = "_return_false"; static char __pyx_k__arrmap_object[] = "arrmap_object"; static char __pyx_k__backfill_bool[] = "backfill_bool"; static char __pyx_k__diff_2d_int16[] = "diff_2d_int16"; static char __pyx_k__diff_2d_int32[] = "diff_2d_int32"; static char __pyx_k__diff_2d_int64[] = "diff_2d_int64"; static char __pyx_k__expected_size[] = "expected_size"; static char __pyx_k__ffill_indexer[] = "ffill_indexer"; static char __pyx_k__groupby_int32[] = "groupby_int32"; static char __pyx_k__groupby_int64[] = "groupby_int64"; static char __pyx_k__rank_1d_int64[] = "rank_1d_int64"; static char __pyx_k__rank_2d_int64[] = "rank_2d_int64"; static char __pyx_k__right_indexer[] = "right_indexer"; static char __pyx_k__roll_median_c[] = "roll_median_c"; static char __pyx_k__roll_quantile[] = "roll_quantile"; static char __pyx_k__AssertionError[] = "AssertionError"; static char __pyx_k____pyx_vtable__[] = "__pyx_vtable__"; static char __pyx_k__arrmap_float32[] = "arrmap_float32"; static char __pyx_k__arrmap_float64[] = "arrmap_float64"; static char __pyx_k__backfill_int32[] = "backfill_int32"; static char __pyx_k__backfill_int64[] = "backfill_int64"; static char __pyx_k__ffill_by_group[] = "ffill_by_group"; static char __pyx_k__groupby_object[] = "groupby_object"; static char __pyx_k__list_of_arrays[] = "list_of_arrays"; static char __pyx_k____pyx_getbuffer[] = "__pyx_getbuffer"; static char __pyx_k__backfill_object[] = "backfill_object"; static char __pyx_k__diff_2d_float32[] = "diff_2d_float32"; static char __pyx_k__diff_2d_float64[] = "diff_2d_float64"; static char __pyx_k__full_outer_join[] = "full_outer_join"; static char __pyx_k__groupby_float32[] = "groupby_float32"; static char __pyx_k__groupby_float64[] = "groupby_float64"; static char __pyx_k__groupby_indices[] = "groupby_indices"; static char __pyx_k__left_outer_join[] = "left_outer_join"; static char __pyx_k__rank_1d_float64[] = "rank_1d_float64"; static char __pyx_k__rank_1d_generic[] = "rank_1d_generic"; static char __pyx_k__rank_2d_float64[] = "rank_2d_float64"; static char __pyx_k__rank_2d_generic[] = "rank_2d_generic"; static char __pyx_k__backfill_float32[] = "backfill_float32"; static char __pyx_k__backfill_float64[] = "backfill_float64"; static char __pyx_k__group_nth_object[] = "group_nth_object"; static char __pyx_k__nancorr_spearman[] = "nancorr_spearman"; static char __pyx_k__pad_inplace_bool[] = "pad_inplace_bool"; static char __pyx_k__group_add_float32[] = "group_add_float32"; static char __pyx_k__group_add_float64[] = "group_add_float64"; static char __pyx_k__group_last_object[] = "group_last_object"; static char __pyx_k__group_max_float32[] = "group_max_float32"; static char __pyx_k__group_max_float64[] = "group_max_float64"; static char __pyx_k__group_min_float32[] = "group_min_float32"; static char __pyx_k__group_min_float64[] = "group_min_float64"; static char __pyx_k__group_nth_float32[] = "group_nth_float32"; static char __pyx_k__group_nth_float64[] = "group_nth_float64"; static char __pyx_k__group_var_float32[] = "group_var_float32"; static char __pyx_k__group_var_float64[] = "group_var_float64"; static char __pyx_k__groupsort_indexer[] = "groupsort_indexer"; static char __pyx_k__is_monotonic_bool[] = "is_monotonic_bool"; static char __pyx_k__pad_inplace_int32[] = "pad_inplace_int32"; static char __pyx_k__pad_inplace_int64[] = "pad_inplace_int64"; static char __pyx_k__take_1d_bool_bool[] = "take_1d_bool_bool"; static char __pyx_k__take_1d_int8_int8[] = "take_1d_int8_int8"; static char __pyx_k__group_last_float32[] = "group_last_float32"; static char __pyx_k__group_last_float64[] = "group_last_float64"; static char __pyx_k__group_mean_float32[] = "group_mean_float32"; static char __pyx_k__group_mean_float64[] = "group_mean_float64"; static char __pyx_k__group_ohlc_float32[] = "group_ohlc_float32"; static char __pyx_k__group_ohlc_float64[] = "group_ohlc_float64"; static char __pyx_k__group_prod_float32[] = "group_prod_float32"; static char __pyx_k__group_prod_float64[] = "group_prod_float64"; static char __pyx_k__is_monotonic_int32[] = "is_monotonic_int32"; static char __pyx_k__is_monotonic_int64[] = "is_monotonic_int64"; static char __pyx_k__pad_inplace_object[] = "pad_inplace_object"; static char __pyx_k__roll_median_cython[] = "roll_median_cython"; static char __pyx_k__take_1d_int8_int32[] = "take_1d_int8_int32"; static char __pyx_k__take_1d_int8_int64[] = "take_1d_int8_int64"; static char __pyx_k__NotImplementedError[] = "NotImplementedError"; static char __pyx_k____pyx_releasebuffer[] = "__pyx_releasebuffer"; static char __pyx_k___get_result_indexer[] = "_get_result_indexer"; static char __pyx_k__is_monotonic_object[] = "is_monotonic_object"; static char __pyx_k__pad_2d_inplace_bool[] = "pad_2d_inplace_bool"; static char __pyx_k__pad_inplace_float32[] = "pad_inplace_float32"; static char __pyx_k__pad_inplace_float64[] = "pad_inplace_float64"; static char __pyx_k__take_1d_bool_object[] = "take_1d_bool_object"; static char __pyx_k__take_1d_int16_int16[] = "take_1d_int16_int16"; static char __pyx_k__take_1d_int16_int32[] = "take_1d_int16_int32"; static char __pyx_k__take_1d_int16_int64[] = "take_1d_int16_int64"; static char __pyx_k__take_1d_int32_int32[] = "take_1d_int32_int32"; static char __pyx_k__take_1d_int32_int64[] = "take_1d_int32_int64"; static char __pyx_k__take_1d_int64_int64[] = "take_1d_int64_int64"; static PyObject *__pyx_kp_s_1; static PyObject *__pyx_n_s_106; static PyObject *__pyx_n_s_107; static PyObject *__pyx_kp_s_200; static PyObject *__pyx_kp_s_203; static PyObject *__pyx_kp_s_206; static PyObject *__pyx_kp_u_207; static PyObject *__pyx_kp_u_209; static PyObject *__pyx_kp_u_211; static PyObject *__pyx_kp_u_213; static PyObject *__pyx_kp_u_214; static PyObject *__pyx_kp_u_217; static PyObject *__pyx_kp_s_221; static PyObject *__pyx_n_s_222; static PyObject *__pyx_n_s_231; static PyObject *__pyx_kp_s_25; static PyObject *__pyx_n_s_290; static PyObject *__pyx_n_s_295; static PyObject *__pyx_kp_s_300; static PyObject *__pyx_kp_s_314; static PyObject *__pyx_kp_s_35; static PyObject *__pyx_n_s_351; static PyObject *__pyx_n_s_354; static PyObject *__pyx_n_s_357; static PyObject *__pyx_kp_s_36; static PyObject *__pyx_n_s_360; static PyObject *__pyx_n_s_363; static PyObject *__pyx_n_s_366; static PyObject *__pyx_n_s_369; static PyObject *__pyx_n_s_372; static PyObject *__pyx_n_s_375; static PyObject *__pyx_n_s_378; static PyObject *__pyx_n_s_381; static PyObject *__pyx_n_s_386; static PyObject *__pyx_n_s_389; static PyObject *__pyx_n_s_392; static PyObject *__pyx_n_s_395; static PyObject *__pyx_n_s_398; static PyObject *__pyx_kp_s_40; static PyObject *__pyx_n_s_401; static PyObject *__pyx_n_s_404; static PyObject *__pyx_n_s_407; static PyObject *__pyx_kp_s_41; static PyObject *__pyx_n_s_452; static PyObject *__pyx_n_s_46; static PyObject *__pyx_n_s_461; static PyObject *__pyx_n_s_468; static PyObject *__pyx_n_s_473; static PyObject *__pyx_n_s_476; static PyObject *__pyx_n_s_479; static PyObject *__pyx_n_s_482; static PyObject *__pyx_n_s_485; static PyObject *__pyx_n_s_488; static PyObject *__pyx_n_s_491; static PyObject *__pyx_n_s_494; static PyObject *__pyx_n_s_497; static PyObject *__pyx_n_s_500; static PyObject *__pyx_n_s_503; static PyObject *__pyx_n_s_506; static PyObject *__pyx_n_s_509; static PyObject *__pyx_kp_s_51; static PyObject *__pyx_n_s_512; static PyObject *__pyx_n_s_515; static PyObject *__pyx_n_s_518; static PyObject *__pyx_n_s_521; static PyObject *__pyx_n_s_524; static PyObject *__pyx_n_s_527; static PyObject *__pyx_n_s_530; static PyObject *__pyx_n_s_533; static PyObject *__pyx_n_s_536; static PyObject *__pyx_n_s_539; static PyObject *__pyx_n_s_542; static PyObject *__pyx_n_s_545; static PyObject *__pyx_n_s_548; static PyObject *__pyx_n_s_551; static PyObject *__pyx_n_s_554; static PyObject *__pyx_n_s_557; static PyObject *__pyx_n_s_560; static PyObject *__pyx_n_s_563; static PyObject *__pyx_n_s_566; static PyObject *__pyx_n_s_569; static PyObject *__pyx_n_s_572; static PyObject *__pyx_n_s_575; static PyObject *__pyx_n_s_578; static PyObject *__pyx_n_s_581; static PyObject *__pyx_n_s_584; static PyObject *__pyx_n_s_587; static PyObject *__pyx_n_s_590; static PyObject *__pyx_n_s_593; static PyObject *__pyx_n_s_598; static PyObject *__pyx_n_s_601; static PyObject *__pyx_n_s_604; static PyObject *__pyx_n_s_607; static PyObject *__pyx_n_s_610; static PyObject *__pyx_n_s_613; static PyObject *__pyx_n_s_616; static PyObject *__pyx_n_s_619; static PyObject *__pyx_n_s_622; static PyObject *__pyx_n_s_625; static PyObject *__pyx_n_s_628; static PyObject *__pyx_n_s_631; static PyObject *__pyx_n_s_634; static PyObject *__pyx_n_s_637; static PyObject *__pyx_n_s_640; static PyObject *__pyx_n_s_643; static PyObject *__pyx_n_s_646; static PyObject *__pyx_n_s_649; static PyObject *__pyx_n_s_652; static PyObject *__pyx_n_s_655; static PyObject *__pyx_n_s_674; static PyObject *__pyx_n_s_677; static PyObject *__pyx_n_s_684; static PyObject *__pyx_n_s_687; static PyObject *__pyx_n_s_694; static PyObject *__pyx_n_s_697; static PyObject *__pyx_n_s_704; static PyObject *__pyx_n_s_707; static PyObject *__pyx_n_s_714; static PyObject *__pyx_n_s_717; static PyObject *__pyx_n_s_724; static PyObject *__pyx_n_s_727; static PyObject *__pyx_n_s_734; static PyObject *__pyx_n_s_737; static PyObject *__pyx_n_s_744; static PyObject *__pyx_n_s_747; static PyObject *__pyx_n_s_754; static PyObject *__pyx_n_s_757; static PyObject *__pyx_n_s_760; static PyObject *__pyx_n_s_763; static PyObject *__pyx_n_s_766; static PyObject *__pyx_n_s_769; static PyObject *__pyx_n_s_772; static PyObject *__pyx_n_s_775; static PyObject *__pyx_n_s_778; static PyObject *__pyx_n_s_781; static PyObject *__pyx_n_s_784; static PyObject *__pyx_n_s_787; static PyObject *__pyx_n_s_790; static PyObject *__pyx_n_s_793; static PyObject *__pyx_n_s_796; static PyObject *__pyx_n_s_799; static PyObject *__pyx_n_s_802; static PyObject *__pyx_n_s_805; static PyObject *__pyx_n_s_808; static PyObject *__pyx_n_s_811; static PyObject *__pyx_kp_s_99; static PyObject *__pyx_n_s__A; static PyObject *__pyx_n_s__AssertionError; static PyObject *__pyx_n_s__B; static PyObject *__pyx_n_s__C; static PyObject *__pyx_n_s__D; static PyObject *__pyx_n_s__IndexError; static PyObject *__pyx_n_s__Infinity; static PyObject *__pyx_n_s__K; static PyObject *__pyx_n_s__KeyError; static PyObject *__pyx_n_s__N; static PyObject *__pyx_n_s__NA; static PyObject *__pyx_n_s__NIL; static PyObject *__pyx_n_s__NINF; static PyObject *__pyx_n_s__NaN; static PyObject *__pyx_n_s__NegInfinity; static PyObject *__pyx_n_s__NotImplementedError; static PyObject *__pyx_n_s__O; static PyObject *__pyx_n_s__R; static PyObject *__pyx_n_s__RuntimeError; static PyObject *__pyx_n_s__S; static PyObject *__pyx_n_s__T; static PyObject *__pyx_n_s__TypeError; static PyObject *__pyx_n_s__ValueError; static PyObject *__pyx_n_s____class__; static PyObject *__pyx_n_s____cmp__; static PyObject *__pyx_n_s____eq__; static PyObject *__pyx_n_s____ge__; static PyObject *__pyx_n_s____gt__; static PyObject *__pyx_n_s____import__; static PyObject *__pyx_n_s____le__; static PyObject *__pyx_n_s____lt__; static PyObject *__pyx_n_s____main__; static PyObject *__pyx_n_s____metaclass__; static PyObject *__pyx_n_s____module__; static PyObject *__pyx_n_s____ne__; static PyObject *__pyx_n_s____pyx_getbuffer; static PyObject *__pyx_n_s____pyx_releasebuffer; static PyObject *__pyx_n_s____pyx_vtable__; static PyObject *__pyx_n_s____qualname__; static PyObject *__pyx_n_s____test__; static PyObject *__pyx_n_s___as; static PyObject *__pyx_n_s___check_minp; static PyObject *__pyx_n_s___counts; static PyObject *__pyx_n_s___get_result_indexer; static PyObject *__pyx_n_s___return_false; static PyObject *__pyx_n_s___return_true; static PyObject *__pyx_n_s__a; static PyObject *__pyx_n_s__adj; static PyObject *__pyx_n_s__adjust; static PyObject *__pyx_n_s__ai; static PyObject *__pyx_n_s__aold; static PyObject *__pyx_n_s__arange; static PyObject *__pyx_n_s__arg; static PyObject *__pyx_n_s__argsort; static PyObject *__pyx_n_s__argsorted; static PyObject *__pyx_n_s__arr; static PyObject *__pyx_n_s__array; static PyObject *__pyx_n_s__arrmap_bool; static PyObject *__pyx_n_s__arrmap_float32; static PyObject *__pyx_n_s__arrmap_float64; static PyObject *__pyx_n_s__arrmap_int32; static PyObject *__pyx_n_s__arrmap_int64; static PyObject *__pyx_n_s__arrmap_object; static PyObject *__pyx_n_s__asarray; static PyObject *__pyx_n_s__ascending; static PyObject *__pyx_n_s__astype; static PyObject *__pyx_n_s__average; static PyObject *__pyx_n_s__avg; static PyObject *__pyx_n_s__avg_wgt; static PyObject *__pyx_n_s__axis; static PyObject *__pyx_n_s__b; static PyObject *__pyx_n_s__backfill_bool; static PyObject *__pyx_n_s__backfill_float32; static PyObject *__pyx_n_s__backfill_float64; static PyObject *__pyx_n_s__backfill_int32; static PyObject *__pyx_n_s__backfill_int64; static PyObject *__pyx_n_s__backfill_object; static PyObject *__pyx_n_s__bins; static PyObject *__pyx_n_s__buf; static PyObject *__pyx_n_s__bufarr; static PyObject *__pyx_n_s__c; static PyObject *__pyx_n_s__c_contiguous; static PyObject *__pyx_n_s__com; static PyObject *__pyx_n_s__copy; static PyObject *__pyx_n_s__count; static PyObject *__pyx_n_s__counts; static PyObject *__pyx_n_s__cov; static PyObject *__pyx_n_s__ct; static PyObject *__pyx_n_s__cur; static PyObject *__pyx_n_s__data; static PyObject *__pyx_n_s__datetime; static PyObject *__pyx_n_s__day; static PyObject *__pyx_n_s__ddof; static PyObject *__pyx_n_s__diff_2d_float32; static PyObject *__pyx_n_s__diff_2d_float64; static PyObject *__pyx_n_s__diff_2d_int16; static PyObject *__pyx_n_s__diff_2d_int32; static PyObject *__pyx_n_s__diff_2d_int64; static PyObject *__pyx_n_s__diff_2d_int8; static PyObject *__pyx_n_s__dim; static PyObject *__pyx_n_s__dims; static PyObject *__pyx_n_s__divisor; static PyObject *__pyx_n_s__dtype; static PyObject *__pyx_n_s__dups; static PyObject *__pyx_n_s__e; static PyObject *__pyx_n_s__empty; static PyObject *__pyx_n_s__empty_like; static PyObject *__pyx_n_s__end; static PyObject *__pyx_n_s__ewma; static PyObject *__pyx_n_s__expected_size; static PyObject *__pyx_n_s__f8; static PyObject *__pyx_n_s__f_contiguous; static PyObject *__pyx_n_s__ffill_by_group; static PyObject *__pyx_n_s__ffill_indexer; static PyObject *__pyx_n_s__fill; static PyObject *__pyx_n_s__fill_count; static PyObject *__pyx_n_s__fill_value; static PyObject *__pyx_n_s__first; static PyObject *__pyx_n_s__flags; static PyObject *__pyx_n_s__float16; static PyObject *__pyx_n_s__float32; static PyObject *__pyx_n_s__float64; static PyObject *__pyx_n_s__full_outer_join; static PyObject *__pyx_n_s__func; static PyObject *__pyx_n_s__fv; static PyObject *__pyx_n_s__get; static PyObject *__pyx_n_s__gid; static PyObject *__pyx_n_s__got_first; static PyObject *__pyx_n_s__group_add_float32; static PyObject *__pyx_n_s__group_add_float64; static PyObject *__pyx_n_s__group_ids; static PyObject *__pyx_n_s__group_labels; static PyObject *__pyx_n_s__group_last_float32; static PyObject *__pyx_n_s__group_last_float64; static PyObject *__pyx_n_s__group_last_object; static PyObject *__pyx_n_s__group_max_float32; static PyObject *__pyx_n_s__group_max_float64; static PyObject *__pyx_n_s__group_mean_float32; static PyObject *__pyx_n_s__group_mean_float64; static PyObject *__pyx_n_s__group_median; static PyObject *__pyx_n_s__group_min_float32; static PyObject *__pyx_n_s__group_min_float64; static PyObject *__pyx_n_s__group_nth_float32; static PyObject *__pyx_n_s__group_nth_float64; static PyObject *__pyx_n_s__group_nth_object; static PyObject *__pyx_n_s__group_ohlc_float32; static PyObject *__pyx_n_s__group_ohlc_float64; static PyObject *__pyx_n_s__group_prod_float32; static PyObject *__pyx_n_s__group_prod_float64; static PyObject *__pyx_n_s__group_var_float32; static PyObject *__pyx_n_s__group_var_float64; static PyObject *__pyx_n_s__groupby_bool; static PyObject *__pyx_n_s__groupby_float32; static PyObject *__pyx_n_s__groupby_float64; static PyObject *__pyx_n_s__groupby_indices; static PyObject *__pyx_n_s__groupby_int32; static PyObject *__pyx_n_s__groupby_int64; static PyObject *__pyx_n_s__groupby_object; static PyObject *__pyx_n_s__groupsort_indexer; static PyObject *__pyx_n_s__hour; static PyObject *__pyx_n_s__i; static PyObject *__pyx_n_s__i0; static PyObject *__pyx_n_s__i8; static PyObject *__pyx_n_s__ids; static PyObject *__pyx_n_s__idx; static PyObject *__pyx_n_s__idx0; static PyObject *__pyx_n_s__idx1; static PyObject *__pyx_n_s__iinfo; static PyObject *__pyx_n_s__in_arr; static PyObject *__pyx_n_s__in_i; static PyObject *__pyx_n_s__in_k; static PyObject *__pyx_n_s__in_n; static PyObject *__pyx_n_s__index; static PyObject *__pyx_n_s__indexer; static PyObject *__pyx_n_s__inf; static PyObject *__pyx_n_s__infs; static PyObject *__pyx_n_s__inner_join; static PyObject *__pyx_n_s__input; static PyObject *__pyx_n_s__insert; static PyObject *__pyx_n_s__int16; static PyObject *__pyx_n_s__int32; static PyObject *__pyx_n_s__int64; static PyObject *__pyx_n_s__int8; static PyObject *__pyx_n_s__int_; static PyObject *__pyx_n_s__is_lexsorted; static PyObject *__pyx_n_s__is_monotonic_bool; static PyObject *__pyx_n_s__is_monotonic_int32; static PyObject *__pyx_n_s__is_monotonic_int64; static PyObject *__pyx_n_s__is_monotonic_object; static PyObject *__pyx_n_s__is_unique; static PyObject *__pyx_n_s__isfinite; static PyObject *__pyx_n_s__isnan; static PyObject *__pyx_n_s__isnullobj; static PyObject *__pyx_n_s__isnullobj2d; static PyObject *__pyx_n_s__j; static PyObject *__pyx_n_s__k; static PyObject *__pyx_n_s__keep; static PyObject *__pyx_n_s__keep_na; static PyObject *__pyx_n_s__key; static PyObject *__pyx_n_s__kind; static PyObject *__pyx_n_s__kth_smallest; static PyObject *__pyx_n_s__l; static PyObject *__pyx_n_s__lab; static PyObject *__pyx_n_s__label; static PyObject *__pyx_n_s__labels; static PyObject *__pyx_n_s__last; static PyObject *__pyx_n_s__last_obs; static PyObject *__pyx_n_s__lc; static PyObject *__pyx_n_s__left; static PyObject *__pyx_n_s__left_count; static PyObject *__pyx_n_s__left_indexer; static PyObject *__pyx_n_s__left_outer_join; static PyObject *__pyx_n_s__left_pos; static PyObject *__pyx_n_s__left_sorter; static PyObject *__pyx_n_s__length; static PyObject *__pyx_n_s__lib; static PyObject *__pyx_n_s__lim; static PyObject *__pyx_n_s__limit; static PyObject *__pyx_n_s__lindexer; static PyObject *__pyx_n_s__list_of_arrays; static PyObject *__pyx_n_s__loc; static PyObject *__pyx_n_s__lval; static PyObject *__pyx_n_s__m; static PyObject *__pyx_n_s__mask; static PyObject *__pyx_n_s__maskedx; static PyObject *__pyx_n_s__maskedy; static PyObject *__pyx_n_s__mat; static PyObject *__pyx_n_s__max; static PyObject *__pyx_n_s__max_group; static PyObject *__pyx_n_s__max_groups; static PyObject *__pyx_n_s__max_subseq; static PyObject *__pyx_n_s__maxx; static PyObject *__pyx_n_s__mean; static PyObject *__pyx_n_s__meanx; static PyObject *__pyx_n_s__meany; static PyObject *__pyx_n_s__median; static PyObject *__pyx_n_s__members; static PyObject *__pyx_n_s__mergesort; static PyObject *__pyx_n_s__microsecond; static PyObject *__pyx_n_s__midpoint; static PyObject *__pyx_n_s__min; static PyObject *__pyx_n_s__min_subseq; static PyObject *__pyx_n_s__minp; static PyObject *__pyx_n_s__minpair; static PyObject *__pyx_n_s__minute; static PyObject *__pyx_n_s__minx; static PyObject *__pyx_n_s__month; static PyObject *__pyx_n_s__n; static PyObject *__pyx_n_s__n0; static PyObject *__pyx_n_s__na_option; static PyObject *__pyx_n_s__nan; static PyObject *__pyx_n_s__nan_value; static PyObject *__pyx_n_s__nancorr; static PyObject *__pyx_n_s__nancorr_spearman; static PyObject *__pyx_n_s__nbins; static PyObject *__pyx_n_s__neg_ct; static PyObject *__pyx_n_s__new; static PyObject *__pyx_n_s__neww; static PyObject *__pyx_n_s__next; static PyObject *__pyx_n_s__ngroups; static PyObject *__pyx_n_s__nleft; static PyObject *__pyx_n_s__nlevels; static PyObject *__pyx_n_s__nobs; static PyObject *__pyx_n_s__nonzero; static PyObject *__pyx_n_s__np; static PyObject *__pyx_n_s__nright; static PyObject *__pyx_n_s__numpy; static PyObject *__pyx_n_s__o; static PyObject *__pyx_n_s__object; static PyObject *__pyx_n_s__object_; static PyObject *__pyx_n_s__offset; static PyObject *__pyx_n_s__old; static PyObject *__pyx_n_s__oldbuf; static PyObject *__pyx_n_s__oldw; static PyObject *__pyx_n_s__ones_like; static PyObject *__pyx_n_s__other; static PyObject *__pyx_n_s__out; static PyObject *__pyx_n_s__output; static PyObject *__pyx_n_s__pad_2d_inplace_bool; static PyObject *__pyx_n_s__pad_bool; static PyObject *__pyx_n_s__pad_float32; static PyObject *__pyx_n_s__pad_float64; static PyObject *__pyx_n_s__pad_inplace_bool; static PyObject *__pyx_n_s__pad_inplace_float32; static PyObject *__pyx_n_s__pad_inplace_float64; static PyObject *__pyx_n_s__pad_inplace_int32; static PyObject *__pyx_n_s__pad_inplace_int64; static PyObject *__pyx_n_s__pad_inplace_object; static PyObject *__pyx_n_s__pad_int32; static PyObject *__pyx_n_s__pad_int64; static PyObject *__pyx_n_s__pad_object; static PyObject *__pyx_n_s__pandas; static PyObject *__pyx_n_s__periods; static PyObject *__pyx_n_s__position; static PyObject *__pyx_n_s__pre; static PyObject *__pyx_n_s__prev; static PyObject *__pyx_n_s__prodx; static PyObject *__pyx_n_s__ptr; static PyObject *__pyx_n_s__put; static PyObject *__pyx_n_s__putmask; static PyObject *__pyx_n_s__pydatetime; static PyObject *__pyx_n_s__quantile; static PyObject *__pyx_n_s__random; static PyObject *__pyx_n_s__range; static PyObject *__pyx_n_s__rank; static PyObject *__pyx_n_s__rank_1d_float64; static PyObject *__pyx_n_s__rank_1d_generic; static PyObject *__pyx_n_s__rank_1d_int64; static PyObject *__pyx_n_s__rank_2d_float64; static PyObject *__pyx_n_s__rank_2d_generic; static PyObject *__pyx_n_s__rank_2d_int64; static PyObject *__pyx_n_s__ranks; static PyObject *__pyx_n_s__rc; static PyObject *__pyx_n_s__remove; static PyObject *__pyx_n_s__res; static PyObject *__pyx_n_s__result; static PyObject *__pyx_n_s__resx; static PyObject *__pyx_n_s__ret; static PyObject *__pyx_n_s__retry; static PyObject *__pyx_n_s__rev; static PyObject *__pyx_n_s__reverse; static PyObject *__pyx_n_s__right; static PyObject *__pyx_n_s__right_count; static PyObject *__pyx_n_s__right_indexer; static PyObject *__pyx_n_s__right_pos; static PyObject *__pyx_n_s__right_sorter; static PyObject *__pyx_n_s__rindexer; static PyObject *__pyx_n_s__ring; static PyObject *__pyx_n_s__roll_generic; static PyObject *__pyx_n_s__roll_kurt; static PyObject *__pyx_n_s__roll_max; static PyObject *__pyx_n_s__roll_max2; static PyObject *__pyx_n_s__roll_mean; static PyObject *__pyx_n_s__roll_median_c; static PyObject *__pyx_n_s__roll_median_cython; static PyObject *__pyx_n_s__roll_min; static PyObject *__pyx_n_s__roll_min2; static PyObject *__pyx_n_s__roll_quantile; static PyObject *__pyx_n_s__roll_skew; static PyObject *__pyx_n_s__roll_sum; static PyObject *__pyx_n_s__roll_var; static PyObject *__pyx_n_s__roll_window; static PyObject *__pyx_n_s__rval; static PyObject *__pyx_n_s__s; static PyObject *__pyx_n_s__second; static PyObject *__pyx_n_s__seen; static PyObject *__pyx_n_s__self; static PyObject *__pyx_n_s__shape; static PyObject *__pyx_n_s__size; static PyObject *__pyx_n_s__skiplist; static PyObject *__pyx_n_s__sl; static PyObject *__pyx_n_s__sort; static PyObject *__pyx_n_s__sorted_data; static PyObject *__pyx_n_s__sorter; static PyObject *__pyx_n_s__start; static PyObject *__pyx_n_s__stop; static PyObject *__pyx_n_s__sum_ranks; static PyObject *__pyx_n_s__sum_x; static PyObject *__pyx_n_s__sum_xx; static PyObject *__pyx_n_s__sumx; static PyObject *__pyx_n_s__sumxx; static PyObject *__pyx_n_s__sumy; static PyObject *__pyx_n_s__sumyy; static PyObject *__pyx_n_s__sx; static PyObject *__pyx_n_s__sy; static PyObject *__pyx_n_s__t; static PyObject *__pyx_n_s__take; static PyObject *__pyx_n_s__take_1d_bool_bool; static PyObject *__pyx_n_s__take_1d_bool_object; static PyObject *__pyx_n_s__take_1d_int16_int16; static PyObject *__pyx_n_s__take_1d_int16_int32; static PyObject *__pyx_n_s__take_1d_int16_int64; static PyObject *__pyx_n_s__take_1d_int32_int32; static PyObject *__pyx_n_s__take_1d_int32_int64; static PyObject *__pyx_n_s__take_1d_int64_int64; static PyObject *__pyx_n_s__take_1d_int8_int32; static PyObject *__pyx_n_s__take_1d_int8_int64; static PyObject *__pyx_n_s__take_1d_int8_int8; static PyObject *__pyx_n_s__tiebreak; static PyObject *__pyx_n_s__tiebreakers; static PyObject *__pyx_n_s__ties_method; static PyObject *__pyx_n_s__top; static PyObject *__pyx_n_s__tot_wgt; static PyObject *__pyx_n_s__uint8; static PyObject *__pyx_n_s__v; static PyObject *__pyx_n_s__val; static PyObject *__pyx_n_s__val_in; static PyObject *__pyx_n_s__val_win; static PyObject *__pyx_n_s__valid_locs; static PyObject *__pyx_n_s__value; static PyObject *__pyx_n_s__values; static PyObject *__pyx_n_s__vclose; static PyObject *__pyx_n_s__vecs; static PyObject *__pyx_n_s__vhigh; static PyObject *__pyx_n_s__view; static PyObject *__pyx_n_s__vlow; static PyObject *__pyx_n_s__vopen; static PyObject *__pyx_n_s__vx; static PyObject *__pyx_n_s__vy; static PyObject *__pyx_n_s__w; static PyObject *__pyx_n_s__weights; static PyObject *__pyx_n_s__where; static PyObject *__pyx_n_s__width; static PyObject *__pyx_n_s__win; static PyObject *__pyx_n_s__win_i; static PyObject *__pyx_n_s__win_k; static PyObject *__pyx_n_s__win_n; static PyObject *__pyx_n_s__window; static PyObject *__pyx_n_s__x; static PyObject *__pyx_n_s__xi; static PyObject *__pyx_n_s__xx; static PyObject *__pyx_n_s__xxx; static PyObject *__pyx_n_s__xxxx; static PyObject *__pyx_n_s__y; static PyObject *__pyx_n_s__year; static PyObject *__pyx_n_s__yi; static PyObject *__pyx_n_s__z; static PyObject *__pyx_n_s__zeros; static PyObject *__pyx_n_s__zeros_like; static PyObject *__pyx_int_0; static PyObject *__pyx_int_1; static PyObject *__pyx_int_2; static PyObject *__pyx_int_neg_1; static PyObject *__pyx_int_15; static PyObject *__pyx_int_100; static PyObject *__pyx_k_3; static PyObject *__pyx_k_6; static PyObject *__pyx_k_9; static PyObject *__pyx_k_15; static PyObject *__pyx_k_21; static PyObject *__pyx_k_27; static PyObject *__pyx_k_39; static PyObject *__pyx_k_47; static PyObject *__pyx_k_108; static PyObject *__pyx_k_109; static PyObject *__pyx_k_110; static PyObject *__pyx_k_111; static PyObject *__pyx_k_112; static PyObject *__pyx_k_113; static PyObject *__pyx_k_114; static PyObject *__pyx_k_115; static PyObject *__pyx_k_116; static PyObject *__pyx_k_117; static PyObject *__pyx_k_118; static PyObject *__pyx_k_119; static PyObject *__pyx_k_120; static PyObject *__pyx_k_121; static PyObject *__pyx_k_122; static PyObject *__pyx_k_123; static PyObject *__pyx_k_124; static PyObject *__pyx_k_125; static PyObject *__pyx_k_126; static PyObject *__pyx_k_127; static PyObject *__pyx_k_128; static PyObject *__pyx_k_129; static PyObject *__pyx_k_130; static PyObject *__pyx_k_131; static PyObject *__pyx_k_132; static PyObject *__pyx_k_133; static PyObject *__pyx_k_134; static PyObject *__pyx_k_135; static PyObject *__pyx_k_136; static PyObject *__pyx_k_137; static PyObject *__pyx_k_138; static PyObject *__pyx_k_139; static PyObject *__pyx_k_140; static PyObject *__pyx_k_141; static PyObject *__pyx_k_142; static PyObject *__pyx_k_143; static PyObject *__pyx_k_144; static PyObject *__pyx_k_145; static PyObject *__pyx_k_146; static PyObject *__pyx_k_147; static PyObject *__pyx_k_148; static PyObject *__pyx_k_149; static PyObject *__pyx_k_150; static PyObject *__pyx_k_151; static PyObject *__pyx_k_152; static PyObject *__pyx_k_153; static PyObject *__pyx_k_154; static PyObject *__pyx_k_155; static PyObject *__pyx_k_156; static PyObject *__pyx_k_157; static PyObject *__pyx_k_158; static PyObject *__pyx_k_159; static PyObject *__pyx_k_160; static PyObject *__pyx_k_161; static PyObject *__pyx_k_162; static PyObject *__pyx_k_163; static PyObject *__pyx_k_164; static PyObject *__pyx_k_165; static PyObject *__pyx_k_166; static PyObject *__pyx_k_167; static PyObject *__pyx_k_168; static PyObject *__pyx_k_169; static PyObject *__pyx_k_170; static PyObject *__pyx_k_171; static PyObject *__pyx_k_172; static PyObject *__pyx_k_173; static PyObject *__pyx_k_174; static PyObject *__pyx_k_175; static PyObject *__pyx_k_176; static PyObject *__pyx_k_177; static PyObject *__pyx_k_178; static PyObject *__pyx_k_179; static PyObject *__pyx_k_180; static PyObject *__pyx_k_181; static PyObject *__pyx_k_182; static PyObject *__pyx_k_183; static PyObject *__pyx_k_slice_4; static PyObject *__pyx_k_slice_7; static PyObject *__pyx_k_tuple_2; static PyObject *__pyx_k_tuple_5; static PyObject *__pyx_k_tuple_8; static PyObject *__pyx_k_slice_11; static PyObject *__pyx_k_slice_12; static PyObject *__pyx_k_slice_17; static PyObject *__pyx_k_slice_18; static PyObject *__pyx_k_slice_23; static PyObject *__pyx_k_slice_30; static PyObject *__pyx_k_slice_31; static PyObject *__pyx_k_slice_44; static PyObject *__pyx_k_slice_45; static PyObject *__pyx_k_tuple_10; static PyObject *__pyx_k_tuple_13; static PyObject *__pyx_k_tuple_14; static PyObject *__pyx_k_tuple_16; static PyObject *__pyx_k_tuple_19; static PyObject *__pyx_k_tuple_20; static PyObject *__pyx_k_tuple_22; static PyObject *__pyx_k_tuple_24; static PyObject *__pyx_k_tuple_26; static PyObject *__pyx_k_tuple_28; static PyObject *__pyx_k_tuple_29; static PyObject *__pyx_k_tuple_32; static PyObject *__pyx_k_tuple_33; static PyObject *__pyx_k_tuple_34; static PyObject *__pyx_k_tuple_37; static PyObject *__pyx_k_tuple_38; static PyObject *__pyx_k_tuple_42; static PyObject *__pyx_k_tuple_43; static PyObject *__pyx_k_tuple_48; static PyObject *__pyx_k_tuple_49; static PyObject *__pyx_k_tuple_50; static PyObject *__pyx_k_tuple_52; static PyObject *__pyx_k_tuple_53; static PyObject *__pyx_k_tuple_54; static PyObject *__pyx_k_tuple_55; static PyObject *__pyx_k_tuple_56; static PyObject *__pyx_k_tuple_57; static PyObject *__pyx_k_tuple_58; static PyObject *__pyx_k_tuple_59; static PyObject *__pyx_k_tuple_60; static PyObject *__pyx_k_tuple_61; static PyObject *__pyx_k_tuple_62; static PyObject *__pyx_k_tuple_63; static PyObject *__pyx_k_tuple_64; static PyObject *__pyx_k_tuple_65; static PyObject *__pyx_k_tuple_66; static PyObject *__pyx_k_tuple_67; static PyObject *__pyx_k_tuple_68; static PyObject *__pyx_k_tuple_69; static PyObject *__pyx_k_tuple_70; static PyObject *__pyx_k_tuple_71; static PyObject *__pyx_k_tuple_72; static PyObject *__pyx_k_tuple_73; static PyObject *__pyx_k_tuple_74; static PyObject *__pyx_k_tuple_75; static PyObject *__pyx_k_tuple_76; static PyObject *__pyx_k_tuple_77; static PyObject *__pyx_k_tuple_78; static PyObject *__pyx_k_tuple_79; static PyObject *__pyx_k_tuple_80; static PyObject *__pyx_k_tuple_81; static PyObject *__pyx_k_tuple_82; static PyObject *__pyx_k_tuple_83; static PyObject *__pyx_k_tuple_84; static PyObject *__pyx_k_tuple_85; static PyObject *__pyx_k_tuple_86; static PyObject *__pyx_k_tuple_87; static PyObject *__pyx_k_tuple_88; static PyObject *__pyx_k_tuple_89; static PyObject *__pyx_k_tuple_90; static PyObject *__pyx_k_tuple_91; static PyObject *__pyx_k_tuple_92; static PyObject *__pyx_k_tuple_93; static PyObject *__pyx_k_tuple_94; static PyObject *__pyx_k_tuple_95; static PyObject *__pyx_k_tuple_96; static PyObject *__pyx_k_tuple_97; static PyObject *__pyx_k_tuple_98; static PyObject *__pyx_k_tuple_100; static PyObject *__pyx_k_tuple_101; static PyObject *__pyx_k_tuple_102; static PyObject *__pyx_k_tuple_103; static PyObject *__pyx_k_tuple_104; static PyObject *__pyx_k_tuple_105; static PyObject *__pyx_k_tuple_184; static PyObject *__pyx_k_tuple_185; static PyObject *__pyx_k_tuple_186; static PyObject *__pyx_k_tuple_187; static PyObject *__pyx_k_tuple_188; static PyObject *__pyx_k_tuple_189; static PyObject *__pyx_k_tuple_190; static PyObject *__pyx_k_tuple_191; static PyObject *__pyx_k_tuple_192; static PyObject *__pyx_k_tuple_193; static PyObject *__pyx_k_tuple_194; static PyObject *__pyx_k_tuple_195; static PyObject *__pyx_k_tuple_196; static PyObject *__pyx_k_tuple_197; static PyObject *__pyx_k_tuple_198; static PyObject *__pyx_k_tuple_199; static PyObject *__pyx_k_tuple_201; static PyObject *__pyx_k_tuple_202; static PyObject *__pyx_k_tuple_204; static PyObject *__pyx_k_tuple_205; static PyObject *__pyx_k_tuple_208; static PyObject *__pyx_k_tuple_210; static PyObject *__pyx_k_tuple_212; static PyObject *__pyx_k_tuple_215; static PyObject *__pyx_k_tuple_216; static PyObject *__pyx_k_tuple_218; static PyObject *__pyx_k_tuple_219; static PyObject *__pyx_k_tuple_223; static PyObject *__pyx_k_tuple_225; static PyObject *__pyx_k_tuple_227; static PyObject *__pyx_k_tuple_229; static PyObject *__pyx_k_tuple_232; static PyObject *__pyx_k_tuple_234; static PyObject *__pyx_k_tuple_236; static PyObject *__pyx_k_tuple_238; static PyObject *__pyx_k_tuple_240; static PyObject *__pyx_k_tuple_242; static PyObject *__pyx_k_tuple_244; static PyObject *__pyx_k_tuple_246; static PyObject *__pyx_k_tuple_248; static PyObject *__pyx_k_tuple_250; static PyObject *__pyx_k_tuple_252; static PyObject *__pyx_k_tuple_254; static PyObject *__pyx_k_tuple_256; static PyObject *__pyx_k_tuple_258; static PyObject *__pyx_k_tuple_260; static PyObject *__pyx_k_tuple_262; static PyObject *__pyx_k_tuple_264; static PyObject *__pyx_k_tuple_266; static PyObject *__pyx_k_tuple_268; static PyObject *__pyx_k_tuple_270; static PyObject *__pyx_k_tuple_272; static PyObject *__pyx_k_tuple_274; static PyObject *__pyx_k_tuple_276; static PyObject *__pyx_k_tuple_278; static PyObject *__pyx_k_tuple_280; static PyObject *__pyx_k_tuple_282; static PyObject *__pyx_k_tuple_284; static PyObject *__pyx_k_tuple_286; static PyObject *__pyx_k_tuple_288; static PyObject *__pyx_k_tuple_291; static PyObject *__pyx_k_tuple_293; static PyObject *__pyx_k_tuple_296; static PyObject *__pyx_k_tuple_298; static PyObject *__pyx_k_tuple_301; static PyObject *__pyx_k_tuple_303; static PyObject *__pyx_k_tuple_305; static PyObject *__pyx_k_tuple_307; static PyObject *__pyx_k_tuple_309; static PyObject *__pyx_k_tuple_311; static PyObject *__pyx_k_tuple_312; static PyObject *__pyx_k_tuple_315; static PyObject *__pyx_k_tuple_317; static PyObject *__pyx_k_tuple_319; static PyObject *__pyx_k_tuple_321; static PyObject *__pyx_k_tuple_323; static PyObject *__pyx_k_tuple_325; static PyObject *__pyx_k_tuple_327; static PyObject *__pyx_k_tuple_329; static PyObject *__pyx_k_tuple_331; static PyObject *__pyx_k_tuple_333; static PyObject *__pyx_k_tuple_335; static PyObject *__pyx_k_tuple_337; static PyObject *__pyx_k_tuple_339; static PyObject *__pyx_k_tuple_341; static PyObject *__pyx_k_tuple_343; static PyObject *__pyx_k_tuple_345; static PyObject *__pyx_k_tuple_347; static PyObject *__pyx_k_tuple_349; static PyObject *__pyx_k_tuple_352; static PyObject *__pyx_k_tuple_355; static PyObject *__pyx_k_tuple_358; static PyObject *__pyx_k_tuple_361; static PyObject *__pyx_k_tuple_364; static PyObject *__pyx_k_tuple_367; static PyObject *__pyx_k_tuple_370; static PyObject *__pyx_k_tuple_373; static PyObject *__pyx_k_tuple_376; static PyObject *__pyx_k_tuple_379; static PyObject *__pyx_k_tuple_382; static PyObject *__pyx_k_tuple_384; static PyObject *__pyx_k_tuple_387; static PyObject *__pyx_k_tuple_390; static PyObject *__pyx_k_tuple_393; static PyObject *__pyx_k_tuple_396; static PyObject *__pyx_k_tuple_399; static PyObject *__pyx_k_tuple_402; static PyObject *__pyx_k_tuple_405; static PyObject *__pyx_k_tuple_408; static PyObject *__pyx_k_tuple_410; static PyObject *__pyx_k_tuple_412; static PyObject *__pyx_k_tuple_414; static PyObject *__pyx_k_tuple_416; static PyObject *__pyx_k_tuple_418; static PyObject *__pyx_k_tuple_420; static PyObject *__pyx_k_tuple_422; static PyObject *__pyx_k_tuple_424; static PyObject *__pyx_k_tuple_426; static PyObject *__pyx_k_tuple_428; static PyObject *__pyx_k_tuple_430; static PyObject *__pyx_k_tuple_432; static PyObject *__pyx_k_tuple_434; static PyObject *__pyx_k_tuple_436; static PyObject *__pyx_k_tuple_438; static PyObject *__pyx_k_tuple_440; static PyObject *__pyx_k_tuple_442; static PyObject *__pyx_k_tuple_444; static PyObject *__pyx_k_tuple_446; static PyObject *__pyx_k_tuple_448; static PyObject *__pyx_k_tuple_450; static PyObject *__pyx_k_tuple_453; static PyObject *__pyx_k_tuple_455; static PyObject *__pyx_k_tuple_457; static PyObject *__pyx_k_tuple_459; static PyObject *__pyx_k_tuple_462; static PyObject *__pyx_k_tuple_464; static PyObject *__pyx_k_tuple_466; static PyObject *__pyx_k_tuple_469; static PyObject *__pyx_k_tuple_471; static PyObject *__pyx_k_tuple_474; static PyObject *__pyx_k_tuple_477; static PyObject *__pyx_k_tuple_480; static PyObject *__pyx_k_tuple_483; static PyObject *__pyx_k_tuple_486; static PyObject *__pyx_k_tuple_489; static PyObject *__pyx_k_tuple_492; static PyObject *__pyx_k_tuple_495; static PyObject *__pyx_k_tuple_498; static PyObject *__pyx_k_tuple_501; static PyObject *__pyx_k_tuple_504; static PyObject *__pyx_k_tuple_507; static PyObject *__pyx_k_tuple_510; static PyObject *__pyx_k_tuple_513; static PyObject *__pyx_k_tuple_516; static PyObject *__pyx_k_tuple_519; static PyObject *__pyx_k_tuple_522; static PyObject *__pyx_k_tuple_525; static PyObject *__pyx_k_tuple_528; static PyObject *__pyx_k_tuple_531; static PyObject *__pyx_k_tuple_534; static PyObject *__pyx_k_tuple_537; static PyObject *__pyx_k_tuple_540; static PyObject *__pyx_k_tuple_543; static PyObject *__pyx_k_tuple_546; static PyObject *__pyx_k_tuple_549; static PyObject *__pyx_k_tuple_552; static PyObject *__pyx_k_tuple_555; static PyObject *__pyx_k_tuple_558; static PyObject *__pyx_k_tuple_561; static PyObject *__pyx_k_tuple_564; static PyObject *__pyx_k_tuple_567; static PyObject *__pyx_k_tuple_570; static PyObject *__pyx_k_tuple_573; static PyObject *__pyx_k_tuple_576; static PyObject *__pyx_k_tuple_579; static PyObject *__pyx_k_tuple_582; static PyObject *__pyx_k_tuple_585; static PyObject *__pyx_k_tuple_588; static PyObject *__pyx_k_tuple_591; static PyObject *__pyx_k_tuple_594; static PyObject *__pyx_k_tuple_596; static PyObject *__pyx_k_tuple_599; static PyObject *__pyx_k_tuple_602; static PyObject *__pyx_k_tuple_605; static PyObject *__pyx_k_tuple_608; static PyObject *__pyx_k_tuple_611; static PyObject *__pyx_k_tuple_614; static PyObject *__pyx_k_tuple_617; static PyObject *__pyx_k_tuple_620; static PyObject *__pyx_k_tuple_623; static PyObject *__pyx_k_tuple_626; static PyObject *__pyx_k_tuple_629; static PyObject *__pyx_k_tuple_632; static PyObject *__pyx_k_tuple_635; static PyObject *__pyx_k_tuple_638; static PyObject *__pyx_k_tuple_641; static PyObject *__pyx_k_tuple_644; static PyObject *__pyx_k_tuple_647; static PyObject *__pyx_k_tuple_650; static PyObject *__pyx_k_tuple_653; static PyObject *__pyx_k_tuple_656; static PyObject *__pyx_k_tuple_658; static PyObject *__pyx_k_tuple_660; static PyObject *__pyx_k_tuple_662; static PyObject *__pyx_k_tuple_664; static PyObject *__pyx_k_tuple_666; static PyObject *__pyx_k_tuple_668; static PyObject *__pyx_k_tuple_670; static PyObject *__pyx_k_tuple_672; static PyObject *__pyx_k_tuple_675; static PyObject *__pyx_k_tuple_678; static PyObject *__pyx_k_tuple_680; static PyObject *__pyx_k_tuple_682; static PyObject *__pyx_k_tuple_685; static PyObject *__pyx_k_tuple_688; static PyObject *__pyx_k_tuple_690; static PyObject *__pyx_k_tuple_692; static PyObject *__pyx_k_tuple_695; static PyObject *__pyx_k_tuple_698; static PyObject *__pyx_k_tuple_700; static PyObject *__pyx_k_tuple_702; static PyObject *__pyx_k_tuple_705; static PyObject *__pyx_k_tuple_708; static PyObject *__pyx_k_tuple_710; static PyObject *__pyx_k_tuple_712; static PyObject *__pyx_k_tuple_715; static PyObject *__pyx_k_tuple_718; static PyObject *__pyx_k_tuple_720; static PyObject *__pyx_k_tuple_722; static PyObject *__pyx_k_tuple_725; static PyObject *__pyx_k_tuple_728; static PyObject *__pyx_k_tuple_730; static PyObject *__pyx_k_tuple_732; static PyObject *__pyx_k_tuple_735; static PyObject *__pyx_k_tuple_738; static PyObject *__pyx_k_tuple_740; static PyObject *__pyx_k_tuple_742; static PyObject *__pyx_k_tuple_745; static PyObject *__pyx_k_tuple_748; static PyObject *__pyx_k_tuple_750; static PyObject *__pyx_k_tuple_752; static PyObject *__pyx_k_tuple_755; static PyObject *__pyx_k_tuple_758; static PyObject *__pyx_k_tuple_761; static PyObject *__pyx_k_tuple_764; static PyObject *__pyx_k_tuple_767; static PyObject *__pyx_k_tuple_770; static PyObject *__pyx_k_tuple_773; static PyObject *__pyx_k_tuple_776; static PyObject *__pyx_k_tuple_779; static PyObject *__pyx_k_tuple_782; static PyObject *__pyx_k_tuple_785; static PyObject *__pyx_k_tuple_788; static PyObject *__pyx_k_tuple_791; static PyObject *__pyx_k_tuple_794; static PyObject *__pyx_k_tuple_797; static PyObject *__pyx_k_tuple_800; static PyObject *__pyx_k_tuple_803; static PyObject *__pyx_k_tuple_806; static PyObject *__pyx_k_tuple_809; static PyObject *__pyx_k_codeobj_220; static PyObject *__pyx_k_codeobj_224; static PyObject *__pyx_k_codeobj_226; static PyObject *__pyx_k_codeobj_228; static PyObject *__pyx_k_codeobj_230; static PyObject *__pyx_k_codeobj_233; static PyObject *__pyx_k_codeobj_235; static PyObject *__pyx_k_codeobj_237; static PyObject *__pyx_k_codeobj_239; static PyObject *__pyx_k_codeobj_241; static PyObject *__pyx_k_codeobj_243; static PyObject *__pyx_k_codeobj_245; static PyObject *__pyx_k_codeobj_247; static PyObject *__pyx_k_codeobj_249; static PyObject *__pyx_k_codeobj_251; static PyObject *__pyx_k_codeobj_253; static PyObject *__pyx_k_codeobj_255; static PyObject *__pyx_k_codeobj_257; static PyObject *__pyx_k_codeobj_259; static PyObject *__pyx_k_codeobj_261; static PyObject *__pyx_k_codeobj_263; static PyObject *__pyx_k_codeobj_265; static PyObject *__pyx_k_codeobj_267; static PyObject *__pyx_k_codeobj_269; static PyObject *__pyx_k_codeobj_271; static PyObject *__pyx_k_codeobj_273; static PyObject *__pyx_k_codeobj_275; static PyObject *__pyx_k_codeobj_277; static PyObject *__pyx_k_codeobj_279; static PyObject *__pyx_k_codeobj_281; static PyObject *__pyx_k_codeobj_283; static PyObject *__pyx_k_codeobj_285; static PyObject *__pyx_k_codeobj_287; static PyObject *__pyx_k_codeobj_289; static PyObject *__pyx_k_codeobj_292; static PyObject *__pyx_k_codeobj_294; static PyObject *__pyx_k_codeobj_297; static PyObject *__pyx_k_codeobj_299; static PyObject *__pyx_k_codeobj_302; static PyObject *__pyx_k_codeobj_304; static PyObject *__pyx_k_codeobj_306; static PyObject *__pyx_k_codeobj_308; static PyObject *__pyx_k_codeobj_310; static PyObject *__pyx_k_codeobj_313; static PyObject *__pyx_k_codeobj_316; static PyObject *__pyx_k_codeobj_318; static PyObject *__pyx_k_codeobj_320; static PyObject *__pyx_k_codeobj_322; static PyObject *__pyx_k_codeobj_324; static PyObject *__pyx_k_codeobj_326; static PyObject *__pyx_k_codeobj_328; static PyObject *__pyx_k_codeobj_330; static PyObject *__pyx_k_codeobj_332; static PyObject *__pyx_k_codeobj_334; static PyObject *__pyx_k_codeobj_336; static PyObject *__pyx_k_codeobj_338; static PyObject *__pyx_k_codeobj_340; static PyObject *__pyx_k_codeobj_342; static PyObject *__pyx_k_codeobj_344; static PyObject *__pyx_k_codeobj_346; static PyObject *__pyx_k_codeobj_348; static PyObject *__pyx_k_codeobj_350; static PyObject *__pyx_k_codeobj_353; static PyObject *__pyx_k_codeobj_356; static PyObject *__pyx_k_codeobj_359; static PyObject *__pyx_k_codeobj_362; static PyObject *__pyx_k_codeobj_365; static PyObject *__pyx_k_codeobj_368; static PyObject *__pyx_k_codeobj_371; static PyObject *__pyx_k_codeobj_374; static PyObject *__pyx_k_codeobj_377; static PyObject *__pyx_k_codeobj_380; static PyObject *__pyx_k_codeobj_383; static PyObject *__pyx_k_codeobj_385; static PyObject *__pyx_k_codeobj_388; static PyObject *__pyx_k_codeobj_391; static PyObject *__pyx_k_codeobj_394; static PyObject *__pyx_k_codeobj_397; static PyObject *__pyx_k_codeobj_400; static PyObject *__pyx_k_codeobj_403; static PyObject *__pyx_k_codeobj_406; static PyObject *__pyx_k_codeobj_409; static PyObject *__pyx_k_codeobj_411; static PyObject *__pyx_k_codeobj_413; static PyObject *__pyx_k_codeobj_415; static PyObject *__pyx_k_codeobj_417; static PyObject *__pyx_k_codeobj_419; static PyObject *__pyx_k_codeobj_421; static PyObject *__pyx_k_codeobj_423; static PyObject *__pyx_k_codeobj_425; static PyObject *__pyx_k_codeobj_427; static PyObject *__pyx_k_codeobj_429; static PyObject *__pyx_k_codeobj_431; static PyObject *__pyx_k_codeobj_433; static PyObject *__pyx_k_codeobj_435; static PyObject *__pyx_k_codeobj_437; static PyObject *__pyx_k_codeobj_439; static PyObject *__pyx_k_codeobj_441; static PyObject *__pyx_k_codeobj_443; static PyObject *__pyx_k_codeobj_445; static PyObject *__pyx_k_codeobj_447; static PyObject *__pyx_k_codeobj_449; static PyObject *__pyx_k_codeobj_451; static PyObject *__pyx_k_codeobj_454; static PyObject *__pyx_k_codeobj_456; static PyObject *__pyx_k_codeobj_458; static PyObject *__pyx_k_codeobj_460; static PyObject *__pyx_k_codeobj_463; static PyObject *__pyx_k_codeobj_465; static PyObject *__pyx_k_codeobj_467; static PyObject *__pyx_k_codeobj_470; static PyObject *__pyx_k_codeobj_472; static PyObject *__pyx_k_codeobj_475; static PyObject *__pyx_k_codeobj_478; static PyObject *__pyx_k_codeobj_481; static PyObject *__pyx_k_codeobj_484; static PyObject *__pyx_k_codeobj_487; static PyObject *__pyx_k_codeobj_490; static PyObject *__pyx_k_codeobj_493; static PyObject *__pyx_k_codeobj_496; static PyObject *__pyx_k_codeobj_499; static PyObject *__pyx_k_codeobj_502; static PyObject *__pyx_k_codeobj_505; static PyObject *__pyx_k_codeobj_508; static PyObject *__pyx_k_codeobj_511; static PyObject *__pyx_k_codeobj_514; static PyObject *__pyx_k_codeobj_517; static PyObject *__pyx_k_codeobj_520; static PyObject *__pyx_k_codeobj_523; static PyObject *__pyx_k_codeobj_526; static PyObject *__pyx_k_codeobj_529; static PyObject *__pyx_k_codeobj_532; static PyObject *__pyx_k_codeobj_535; static PyObject *__pyx_k_codeobj_538; static PyObject *__pyx_k_codeobj_541; static PyObject *__pyx_k_codeobj_544; static PyObject *__pyx_k_codeobj_547; static PyObject *__pyx_k_codeobj_550; static PyObject *__pyx_k_codeobj_553; static PyObject *__pyx_k_codeobj_556; static PyObject *__pyx_k_codeobj_559; static PyObject *__pyx_k_codeobj_562; static PyObject *__pyx_k_codeobj_565; static PyObject *__pyx_k_codeobj_568; static PyObject *__pyx_k_codeobj_571; static PyObject *__pyx_k_codeobj_574; static PyObject *__pyx_k_codeobj_577; static PyObject *__pyx_k_codeobj_580; static PyObject *__pyx_k_codeobj_583; static PyObject *__pyx_k_codeobj_586; static PyObject *__pyx_k_codeobj_589; static PyObject *__pyx_k_codeobj_592; static PyObject *__pyx_k_codeobj_595; static PyObject *__pyx_k_codeobj_597; static PyObject *__pyx_k_codeobj_600; static PyObject *__pyx_k_codeobj_603; static PyObject *__pyx_k_codeobj_606; static PyObject *__pyx_k_codeobj_609; static PyObject *__pyx_k_codeobj_612; static PyObject *__pyx_k_codeobj_615; static PyObject *__pyx_k_codeobj_618; static PyObject *__pyx_k_codeobj_621; static PyObject *__pyx_k_codeobj_624; static PyObject *__pyx_k_codeobj_627; static PyObject *__pyx_k_codeobj_630; static PyObject *__pyx_k_codeobj_633; static PyObject *__pyx_k_codeobj_636; static PyObject *__pyx_k_codeobj_639; static PyObject *__pyx_k_codeobj_642; static PyObject *__pyx_k_codeobj_645; static PyObject *__pyx_k_codeobj_648; static PyObject *__pyx_k_codeobj_651; static PyObject *__pyx_k_codeobj_654; static PyObject *__pyx_k_codeobj_657; static PyObject *__pyx_k_codeobj_659; static PyObject *__pyx_k_codeobj_661; static PyObject *__pyx_k_codeobj_663; static PyObject *__pyx_k_codeobj_665; static PyObject *__pyx_k_codeobj_667; static PyObject *__pyx_k_codeobj_669; static PyObject *__pyx_k_codeobj_671; static PyObject *__pyx_k_codeobj_673; static PyObject *__pyx_k_codeobj_676; static PyObject *__pyx_k_codeobj_679; static PyObject *__pyx_k_codeobj_681; static PyObject *__pyx_k_codeobj_683; static PyObject *__pyx_k_codeobj_686; static PyObject *__pyx_k_codeobj_689; static PyObject *__pyx_k_codeobj_691; static PyObject *__pyx_k_codeobj_693; static PyObject *__pyx_k_codeobj_696; static PyObject *__pyx_k_codeobj_699; static PyObject *__pyx_k_codeobj_701; static PyObject *__pyx_k_codeobj_703; static PyObject *__pyx_k_codeobj_706; static PyObject *__pyx_k_codeobj_709; static PyObject *__pyx_k_codeobj_711; static PyObject *__pyx_k_codeobj_713; static PyObject *__pyx_k_codeobj_716; static PyObject *__pyx_k_codeobj_719; static PyObject *__pyx_k_codeobj_721; static PyObject *__pyx_k_codeobj_723; static PyObject *__pyx_k_codeobj_726; static PyObject *__pyx_k_codeobj_729; static PyObject *__pyx_k_codeobj_731; static PyObject *__pyx_k_codeobj_733; static PyObject *__pyx_k_codeobj_736; static PyObject *__pyx_k_codeobj_739; static PyObject *__pyx_k_codeobj_741; static PyObject *__pyx_k_codeobj_743; static PyObject *__pyx_k_codeobj_746; static PyObject *__pyx_k_codeobj_749; static PyObject *__pyx_k_codeobj_751; static PyObject *__pyx_k_codeobj_753; static PyObject *__pyx_k_codeobj_756; static PyObject *__pyx_k_codeobj_759; static PyObject *__pyx_k_codeobj_762; static PyObject *__pyx_k_codeobj_765; static PyObject *__pyx_k_codeobj_768; static PyObject *__pyx_k_codeobj_771; static PyObject *__pyx_k_codeobj_774; static PyObject *__pyx_k_codeobj_777; static PyObject *__pyx_k_codeobj_780; static PyObject *__pyx_k_codeobj_783; static PyObject *__pyx_k_codeobj_786; static PyObject *__pyx_k_codeobj_789; static PyObject *__pyx_k_codeobj_792; static PyObject *__pyx_k_codeobj_795; static PyObject *__pyx_k_codeobj_798; static PyObject *__pyx_k_codeobj_801; static PyObject *__pyx_k_codeobj_804; static PyObject *__pyx_k_codeobj_807; static PyObject *__pyx_k_codeobj_810; /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_494lambda1(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_494lambda1 = {__Pyx_NAMESTR("lambda1"), (PyCFunction)__pyx_pw_6pandas_5algos_494lambda1, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_494lambda1(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { CYTHON_UNUSED PyObject *__pyx_v_self = 0; CYTHON_UNUSED PyObject *__pyx_v_other = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("lambda1 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__self,&__pyx_n_s__other,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__self)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__other)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("lambda1", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 502; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "lambda1") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 502; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } __pyx_v_self = values[0]; __pyx_v_other = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("lambda1", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 502; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.lambda1", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_lambda_funcdef_6pandas_5algos_lambda1(__pyx_self, __pyx_v_self, __pyx_v_other); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/algos.pyx":502 * return left != right * * _return_false = lambda self, other: False # <<<<<<<<<<<<<< * _return_true = lambda self, other: True * */ static PyObject *__pyx_lambda_funcdef_6pandas_5algos_lambda1(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_other) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("lambda1", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 502; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas.algos.lambda1", __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_5algos_495lambda2(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_495lambda2 = {__Pyx_NAMESTR("lambda2"), (PyCFunction)__pyx_pw_6pandas_5algos_495lambda2, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_495lambda2(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { CYTHON_UNUSED PyObject *__pyx_v_self = 0; CYTHON_UNUSED PyObject *__pyx_v_other = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("lambda2 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__self,&__pyx_n_s__other,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__self)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__other)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("lambda2", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 503; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "lambda2") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 503; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } __pyx_v_self = values[0]; __pyx_v_other = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("lambda2", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 503; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.lambda2", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_lambda_funcdef_6pandas_5algos_lambda2(__pyx_self, __pyx_v_self, __pyx_v_other); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/algos.pyx":503 * * _return_false = lambda self, other: False * _return_true = lambda self, other: True # <<<<<<<<<<<<<< * * class Infinity(object): */ static PyObject *__pyx_lambda_funcdef_6pandas_5algos_lambda2(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_other) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("lambda2", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 503; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas.algos.lambda2", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/algos.pyx":51 * * * 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_5algos_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; __pyx_r = 0; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/algos.pyx":52 * * 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_5algos_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; __pyx_r = 0; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/skiplist.pyx":18 * # MSVC does not have log2! * * cdef double Log2(double x): # <<<<<<<<<<<<<< * return log(x) / log(2.) * */ static double __pyx_f_6pandas_5algos_Log2(double __pyx_v_x) { double __pyx_r; __Pyx_RefNannyDeclarations double __pyx_t_1; double __pyx_t_2; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("Log2", 0); /* "pandas/src/skiplist.pyx":19 * * cdef double Log2(double x): * return log(x) / log(2.) # <<<<<<<<<<<<<< * * cimport numpy as np */ __pyx_t_1 = log(__pyx_v_x); __pyx_t_2 = log(2.); if (unlikely(__pyx_t_2 == 0)) { #ifdef WITH_THREAD PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure(); #endif PyErr_Format(PyExc_ZeroDivisionError, "float division"); #ifdef WITH_THREAD PyGILState_Release(__pyx_gilstate_save); #endif {__pyx_filename = __pyx_f[1]; __pyx_lineno = 19; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_r = (__pyx_t_1 / __pyx_t_2); goto __pyx_L0; __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_WriteUnraisable("pandas.algos.Log2", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pandas_5algos_4Node_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_pw_6pandas_5algos_4Node_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { __pyx_t_5numpy_double_t __pyx_v_value; PyObject *__pyx_v_next = 0; PyObject *__pyx_v_width = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__value,&__pyx_n_s__next,&__pyx_n_s__width,0}; PyObject* values[3] = {0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__value)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__next)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, 1); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 38; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__width)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, 2); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 38; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 38; __pyx_clineno = __LINE__; goto __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_value = __pyx_PyFloat_AsDouble(values[0]); if (unlikely((__pyx_v_value == (npy_double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 38; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_next = ((PyObject*)values[1]); __pyx_v_width = ((PyObject*)values[2]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 38; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.Node.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return -1; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_next), (&PyList_Type), 1, "next", 1))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 38; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_width), (&PyList_Type), 1, "width", 1))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 38; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_4Node___init__(((struct __pyx_obj_6pandas_5algos_Node *)__pyx_v_self), __pyx_v_value, __pyx_v_next, __pyx_v_width); goto __pyx_L0; __pyx_L1_error:; __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/skiplist.pyx":38 * list width * * def __init__(self, double_t value, list next, list width): # <<<<<<<<<<<<<< * self.value = value * self.next = next */ static int __pyx_pf_6pandas_5algos_4Node___init__(struct __pyx_obj_6pandas_5algos_Node *__pyx_v_self, __pyx_t_5numpy_double_t __pyx_v_value, PyObject *__pyx_v_next, PyObject *__pyx_v_width) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__init__", 0); /* "pandas/src/skiplist.pyx":39 * * def __init__(self, double_t value, list next, list width): * self.value = value # <<<<<<<<<<<<<< * self.next = next * self.width = width */ __pyx_v_self->value = __pyx_v_value; /* "pandas/src/skiplist.pyx":40 * def __init__(self, double_t value, list next, list width): * self.value = value * self.next = next # <<<<<<<<<<<<<< * self.width = width * */ __Pyx_INCREF(((PyObject *)__pyx_v_next)); __Pyx_GIVEREF(((PyObject *)__pyx_v_next)); __Pyx_GOTREF(__pyx_v_self->next); __Pyx_DECREF(((PyObject *)__pyx_v_self->next)); __pyx_v_self->next = __pyx_v_next; /* "pandas/src/skiplist.pyx":41 * self.value = value * self.next = next * self.width = width # <<<<<<<<<<<<<< * * # Singleton terminator node */ __Pyx_INCREF(((PyObject *)__pyx_v_width)); __Pyx_GIVEREF(((PyObject *)__pyx_v_width)); __Pyx_GOTREF(__pyx_v_self->width); __Pyx_DECREF(((PyObject *)__pyx_v_self->width)); __pyx_v_self->width = __pyx_v_width; __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_4Node_5value_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6pandas_5algos_4Node_5value_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_5algos_4Node_5value___get__(((struct __pyx_obj_6pandas_5algos_Node *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/skiplist.pyx":34 * cdef class Node: * cdef public: * double_t value # <<<<<<<<<<<<<< * list next * list width */ static PyObject *__pyx_pf_6pandas_5algos_4Node_5value___get__(struct __pyx_obj_6pandas_5algos_Node *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->value); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 34; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas.algos.Node.value.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pandas_5algos_4Node_5value_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ static int __pyx_pw_6pandas_5algos_4Node_5value_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_5algos_4Node_5value_2__set__(((struct __pyx_obj_6pandas_5algos_Node *)__pyx_v_self), ((PyObject *)__pyx_v_value)); __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pandas_5algos_4Node_5value_2__set__(struct __pyx_obj_6pandas_5algos_Node *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __pyx_t_5numpy_double_t __pyx_t_1; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__set__", 0); __pyx_t_1 = __pyx_PyFloat_AsDouble(__pyx_v_value); if (unlikely((__pyx_t_1 == (npy_double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 34; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_self->value = __pyx_t_1; __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("pandas.algos.Node.value.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_4Node_4next_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6pandas_5algos_4Node_4next_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_5algos_4Node_4next___get__(((struct __pyx_obj_6pandas_5algos_Node *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/skiplist.pyx":35 * cdef public: * double_t value * list next # <<<<<<<<<<<<<< * list width * */ static PyObject *__pyx_pf_6pandas_5algos_4Node_4next___get__(struct __pyx_obj_6pandas_5algos_Node *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_self->next)); __pyx_r = ((PyObject *)__pyx_v_self->next); goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pandas_5algos_4Node_4next_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ static int __pyx_pw_6pandas_5algos_4Node_4next_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_5algos_4Node_4next_2__set__(((struct __pyx_obj_6pandas_5algos_Node *)__pyx_v_self), ((PyObject *)__pyx_v_value)); __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pandas_5algos_4Node_4next_2__set__(struct __pyx_obj_6pandas_5algos_Node *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__set__", 0); if (!(likely(PyList_CheckExact(__pyx_v_value))||((__pyx_v_value) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected list, got %.200s", Py_TYPE(__pyx_v_value)->tp_name), 0))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_INCREF(__pyx_v_value); __Pyx_GIVEREF(__pyx_v_value); __Pyx_GOTREF(__pyx_v_self->next); __Pyx_DECREF(((PyObject *)__pyx_v_self->next)); __pyx_v_self->next = ((PyObject*)__pyx_v_value); __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("pandas.algos.Node.next.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pandas_5algos_4Node_4next_5__del__(PyObject *__pyx_v_self); /*proto*/ static int __pyx_pw_6pandas_5algos_4Node_4next_5__del__(PyObject *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_5algos_4Node_4next_4__del__(((struct __pyx_obj_6pandas_5algos_Node *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pandas_5algos_4Node_4next_4__del__(struct __pyx_obj_6pandas_5algos_Node *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__", 0); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->next); __Pyx_DECREF(((PyObject *)__pyx_v_self->next)); __pyx_v_self->next = ((PyObject*)Py_None); __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_4Node_5width_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6pandas_5algos_4Node_5width_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_5algos_4Node_5width___get__(((struct __pyx_obj_6pandas_5algos_Node *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/skiplist.pyx":36 * double_t value * list next * list width # <<<<<<<<<<<<<< * * def __init__(self, double_t value, list next, list width): */ static PyObject *__pyx_pf_6pandas_5algos_4Node_5width___get__(struct __pyx_obj_6pandas_5algos_Node *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_self->width)); __pyx_r = ((PyObject *)__pyx_v_self->width); goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pandas_5algos_4Node_5width_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ static int __pyx_pw_6pandas_5algos_4Node_5width_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_5algos_4Node_5width_2__set__(((struct __pyx_obj_6pandas_5algos_Node *)__pyx_v_self), ((PyObject *)__pyx_v_value)); __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pandas_5algos_4Node_5width_2__set__(struct __pyx_obj_6pandas_5algos_Node *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__set__", 0); if (!(likely(PyList_CheckExact(__pyx_v_value))||((__pyx_v_value) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected list, got %.200s", Py_TYPE(__pyx_v_value)->tp_name), 0))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 36; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_INCREF(__pyx_v_value); __Pyx_GIVEREF(__pyx_v_value); __Pyx_GOTREF(__pyx_v_self->width); __Pyx_DECREF(((PyObject *)__pyx_v_self->width)); __pyx_v_self->width = ((PyObject*)__pyx_v_value); __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("pandas.algos.Node.width.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pandas_5algos_4Node_5width_5__del__(PyObject *__pyx_v_self); /*proto*/ static int __pyx_pw_6pandas_5algos_4Node_5width_5__del__(PyObject *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_5algos_4Node_5width_4__del__(((struct __pyx_obj_6pandas_5algos_Node *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pandas_5algos_4Node_5width_4__del__(struct __pyx_obj_6pandas_5algos_Node *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__", 0); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->width); __Pyx_DECREF(((PyObject *)__pyx_v_self->width)); __pyx_v_self->width = ((PyObject*)Py_None); __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pandas_5algos_17IndexableSkiplist_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_pw_6pandas_5algos_17IndexableSkiplist_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_expected_size = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__expected_size,0}; PyObject* values[1] = {0}; values[0] = ((PyObject *)__pyx_int_100); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__expected_size); if (value) { values[0] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 55; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_expected_size = values[0]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("__init__", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 55; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.IndexableSkiplist.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return -1; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pandas_5algos_17IndexableSkiplist___init__(((struct __pyx_obj_6pandas_5algos_IndexableSkiplist *)__pyx_v_self), __pyx_v_expected_size); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/skiplist.pyx":55 * Node head * * def __init__(self, expected_size=100): # <<<<<<<<<<<<<< * self.size = 0 * self.maxlevels = int(1 + Log2(expected_size)) */ static int __pyx_pf_6pandas_5algos_17IndexableSkiplist___init__(struct __pyx_obj_6pandas_5algos_IndexableSkiplist *__pyx_v_self, PyObject *__pyx_v_expected_size) { int __pyx_r; __Pyx_RefNannyDeclarations double __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__init__", 0); /* "pandas/src/skiplist.pyx":56 * * def __init__(self, expected_size=100): * self.size = 0 # <<<<<<<<<<<<<< * self.maxlevels = int(1 + Log2(expected_size)) * self.head = Node(np.NaN, [NIL] * self.maxlevels, [1] * self.maxlevels) */ __pyx_v_self->size = 0; /* "pandas/src/skiplist.pyx":57 * def __init__(self, expected_size=100): * self.size = 0 * self.maxlevels = int(1 + Log2(expected_size)) # <<<<<<<<<<<<<< * self.head = Node(np.NaN, [NIL] * self.maxlevels, [1] * self.maxlevels) * */ __pyx_t_1 = __pyx_PyFloat_AsDouble(__pyx_v_expected_size); if (unlikely((__pyx_t_1 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 57; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_self->maxlevels = ((Py_ssize_t)(1.0 + __pyx_f_6pandas_5algos_Log2(__pyx_t_1))); /* "pandas/src/skiplist.pyx":58 * self.size = 0 * self.maxlevels = int(1 + Log2(expected_size)) * self.head = Node(np.NaN, [NIL] * self.maxlevels, [1] * self.maxlevels) # <<<<<<<<<<<<<< * * def __len__(self): */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 58; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__NaN); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 58; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__NIL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 58; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = PyList_New(1 * ((__pyx_v_self->maxlevels<0) ? 0:__pyx_v_self->maxlevels)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 58; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < __pyx_v_self->maxlevels; __pyx_temp++) { __Pyx_INCREF(__pyx_t_2); PyList_SET_ITEM(__pyx_t_4, __pyx_temp, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); } } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyList_New(1 * ((__pyx_v_self->maxlevels<0) ? 0:__pyx_v_self->maxlevels)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 58; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < __pyx_v_self->maxlevels; __pyx_temp++) { __Pyx_INCREF(__pyx_int_1); PyList_SET_ITEM(__pyx_t_2, __pyx_temp, __pyx_int_1); __Pyx_GIVEREF(__pyx_int_1); } } __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 58; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 1, ((PyObject *)__pyx_t_4)); __Pyx_GIVEREF(((PyObject *)__pyx_t_4)); PyTuple_SET_ITEM(__pyx_t_5, 2, ((PyObject *)__pyx_t_2)); __Pyx_GIVEREF(((PyObject *)__pyx_t_2)); __pyx_t_3 = 0; __pyx_t_4 = 0; __pyx_t_2 = 0; __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_6pandas_5algos_Node)), ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 58; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; __Pyx_GIVEREF(__pyx_t_2); __Pyx_GOTREF(__pyx_v_self->head); __Pyx_DECREF(((PyObject *)__pyx_v_self->head)); __pyx_v_self->head = ((struct __pyx_obj_6pandas_5algos_Node *)__pyx_t_2); __pyx_t_2 = 0; __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("pandas.algos.IndexableSkiplist.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static Py_ssize_t __pyx_pw_6pandas_5algos_17IndexableSkiplist_3__len__(PyObject *__pyx_v_self); /*proto*/ static Py_ssize_t __pyx_pw_6pandas_5algos_17IndexableSkiplist_3__len__(PyObject *__pyx_v_self) { Py_ssize_t __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__len__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_5algos_17IndexableSkiplist_2__len__(((struct __pyx_obj_6pandas_5algos_IndexableSkiplist *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/skiplist.pyx":60 * self.head = Node(np.NaN, [NIL] * self.maxlevels, [1] * self.maxlevels) * * def __len__(self): # <<<<<<<<<<<<<< * return self.size * */ static Py_ssize_t __pyx_pf_6pandas_5algos_17IndexableSkiplist_2__len__(struct __pyx_obj_6pandas_5algos_IndexableSkiplist *__pyx_v_self) { Py_ssize_t __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__len__", 0); /* "pandas/src/skiplist.pyx":61 * * def __len__(self): * return self.size # <<<<<<<<<<<<<< * * def __getitem__(self, i): */ __pyx_r = __pyx_v_self->size; goto __pyx_L0; __pyx_r = 0; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_17IndexableSkiplist_5__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_i); /*proto*/ static PyObject *__pyx_pw_6pandas_5algos_17IndexableSkiplist_5__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_i) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__getitem__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_5algos_17IndexableSkiplist_4__getitem__(((struct __pyx_obj_6pandas_5algos_IndexableSkiplist *)__pyx_v_self), ((PyObject *)__pyx_v_i)); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/skiplist.pyx":63 * return self.size * * def __getitem__(self, i): # <<<<<<<<<<<<<< * return self.get(i) * */ static PyObject *__pyx_pf_6pandas_5algos_17IndexableSkiplist_4__getitem__(struct __pyx_obj_6pandas_5algos_IndexableSkiplist *__pyx_v_self, PyObject *__pyx_v_i) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; PyObject *__pyx_t_2 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__getitem__", 0); /* "pandas/src/skiplist.pyx":64 * * def __getitem__(self, i): * return self.get(i) # <<<<<<<<<<<<<< * * cpdef get(self, Py_ssize_t i): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_1 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 64; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_2 = ((struct __pyx_vtabstruct_6pandas_5algos_IndexableSkiplist *)__pyx_v_self->__pyx_vtab)->get(__pyx_v_self, __pyx_t_1, 0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 64; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("pandas.algos.IndexableSkiplist.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/skiplist.pyx":66 * return self.get(i) * * cpdef get(self, Py_ssize_t i): # <<<<<<<<<<<<<< * cdef Py_ssize_t level * cdef Node node */ static PyObject *__pyx_pw_6pandas_5algos_17IndexableSkiplist_7get(PyObject *__pyx_v_self, PyObject *__pyx_arg_i); /*proto*/ static PyObject *__pyx_f_6pandas_5algos_17IndexableSkiplist_get(struct __pyx_obj_6pandas_5algos_IndexableSkiplist *__pyx_v_self, Py_ssize_t __pyx_v_i, int __pyx_skip_dispatch) { Py_ssize_t __pyx_v_level; struct __pyx_obj_6pandas_5algos_Node *__pyx_v_node = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; Py_ssize_t __pyx_t_4; int __pyx_t_5; Py_ssize_t __pyx_t_6; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get", 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__get); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 66; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_6pandas_5algos_17IndexableSkiplist_7get)) { __Pyx_XDECREF(__pyx_r); __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_i); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 66; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 66; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 66; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(((PyObject *)__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/src/skiplist.pyx":70 * cdef Node node * * node = self.head # <<<<<<<<<<<<<< * i += 1 * */ __pyx_t_1 = ((PyObject *)__pyx_v_self->head); __Pyx_INCREF(__pyx_t_1); __pyx_v_node = ((struct __pyx_obj_6pandas_5algos_Node *)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/skiplist.pyx":71 * * node = self.head * i += 1 # <<<<<<<<<<<<<< * * for level in range(self.maxlevels - 1, -1, -1): */ __pyx_v_i = (__pyx_v_i + 1); /* "pandas/src/skiplist.pyx":73 * i += 1 * * for level in range(self.maxlevels - 1, -1, -1): # <<<<<<<<<<<<<< * while node.width[level] <= i: * i -= node.width[level] */ for (__pyx_t_4 = (__pyx_v_self->maxlevels - 1); __pyx_t_4 > -1; __pyx_t_4-=1) { __pyx_v_level = __pyx_t_4; /* "pandas/src/skiplist.pyx":74 * * for level in range(self.maxlevels - 1, -1, -1): * while node.width[level] <= i: # <<<<<<<<<<<<<< * i -= node.width[level] * node = node.next[level] */ while (1) { if (unlikely(((PyObject *)__pyx_v_node->width) == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 74; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_1 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_node->width), __pyx_v_level, sizeof(Py_ssize_t), PyInt_FromSsize_t, 1, 1, 1); if (!__pyx_t_1) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 74; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_i); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 74; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyObject_RichCompare(__pyx_t_1, __pyx_t_2, Py_LE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 74; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 74; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (!__pyx_t_5) break; /* "pandas/src/skiplist.pyx":75 * for level in range(self.maxlevels - 1, -1, -1): * while node.width[level] <= i: * i -= node.width[level] # <<<<<<<<<<<<<< * node = node.next[level] * */ __pyx_t_3 = PyInt_FromSsize_t(__pyx_v_i); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 75; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (unlikely(((PyObject *)__pyx_v_node->width) == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 75; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_2 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_node->width), __pyx_v_level, sizeof(Py_ssize_t), PyInt_FromSsize_t, 1, 1, 1); if (!__pyx_t_2) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 75; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = PyNumber_InPlaceSubtract(__pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 75; __pyx_clineno = __LINE__; goto __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_6 = __Pyx_PyIndex_AsSsize_t(__pyx_t_1); if (unlikely((__pyx_t_6 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 75; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_i = __pyx_t_6; /* "pandas/src/skiplist.pyx":76 * while node.width[level] <= i: * i -= node.width[level] * node = node.next[level] # <<<<<<<<<<<<<< * * */ if (unlikely(((PyObject *)__pyx_v_node->next) == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 76; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_1 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_node->next), __pyx_v_level, sizeof(Py_ssize_t), PyInt_FromSsize_t, 1, 1, 1); if (!__pyx_t_1) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 76; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_6pandas_5algos_Node))))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 76; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF_SET(__pyx_v_node, ((struct __pyx_obj_6pandas_5algos_Node *)__pyx_t_1)); __pyx_t_1 = 0; } } /* "pandas/src/skiplist.pyx":79 * * * return node.value # <<<<<<<<<<<<<< * * cpdef insert(self, double value): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyFloat_FromDouble(__pyx_v_node->value); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("pandas.algos.IndexableSkiplist.get", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_node); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_17IndexableSkiplist_7get(PyObject *__pyx_v_self, PyObject *__pyx_arg_i); /*proto*/ static PyObject *__pyx_pw_6pandas_5algos_17IndexableSkiplist_7get(PyObject *__pyx_v_self, PyObject *__pyx_arg_i) { Py_ssize_t __pyx_v_i; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("get (wrapper)", 0); assert(__pyx_arg_i); { __pyx_v_i = __Pyx_PyIndex_AsSsize_t(__pyx_arg_i); if (unlikely((__pyx_v_i == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 66; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.IndexableSkiplist.get", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pandas_5algos_17IndexableSkiplist_6get(((struct __pyx_obj_6pandas_5algos_IndexableSkiplist *)__pyx_v_self), ((Py_ssize_t)__pyx_v_i)); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/skiplist.pyx":66 * return self.get(i) * * cpdef get(self, Py_ssize_t i): # <<<<<<<<<<<<<< * cdef Py_ssize_t level * cdef Node node */ static PyObject *__pyx_pf_6pandas_5algos_17IndexableSkiplist_6get(struct __pyx_obj_6pandas_5algos_IndexableSkiplist *__pyx_v_self, Py_ssize_t __pyx_v_i) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = ((struct __pyx_vtabstruct_6pandas_5algos_IndexableSkiplist *)__pyx_v_self->__pyx_vtab)->get(__pyx_v_self, __pyx_v_i, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 66; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas.algos.IndexableSkiplist.get", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/skiplist.pyx":81 * return node.value * * cpdef insert(self, double value): # <<<<<<<<<<<<<< * cdef Py_ssize_t level, steps, d * cdef Node node, prevnode, newnode, next_at_level, tmp */ static PyObject *__pyx_pw_6pandas_5algos_17IndexableSkiplist_9insert(PyObject *__pyx_v_self, PyObject *__pyx_arg_value); /*proto*/ static PyObject *__pyx_f_6pandas_5algos_17IndexableSkiplist_insert(struct __pyx_obj_6pandas_5algos_IndexableSkiplist *__pyx_v_self, double __pyx_v_value, int __pyx_skip_dispatch) { Py_ssize_t __pyx_v_level; Py_ssize_t __pyx_v_steps; Py_ssize_t __pyx_v_d; struct __pyx_obj_6pandas_5algos_Node *__pyx_v_node = 0; struct __pyx_obj_6pandas_5algos_Node *__pyx_v_prevnode = 0; struct __pyx_obj_6pandas_5algos_Node *__pyx_v_newnode = 0; struct __pyx_obj_6pandas_5algos_Node *__pyx_v_next_at_level = 0; PyObject *__pyx_v_chain = 0; PyObject *__pyx_v_steps_at_level = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; Py_ssize_t __pyx_t_4; int __pyx_t_5; double __pyx_t_6; PyObject *__pyx_t_7 = NULL; Py_ssize_t __pyx_t_8; Py_ssize_t __pyx_t_9; PyObject *__pyx_t_10 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("insert", 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__insert); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_6pandas_5algos_17IndexableSkiplist_9insert)) { __Pyx_XDECREF(__pyx_r); __pyx_t_2 = PyFloat_FromDouble(__pyx_v_value); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(((PyObject *)__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/src/skiplist.pyx":87 * * # find first node on each level where node.next[levels].value > value * chain = [None] * self.maxlevels # <<<<<<<<<<<<<< * steps_at_level = [0] * self.maxlevels * node = self.head */ __pyx_t_1 = PyList_New(1 * ((__pyx_v_self->maxlevels<0) ? 0:__pyx_v_self->maxlevels)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 87; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < __pyx_v_self->maxlevels; __pyx_temp++) { __Pyx_INCREF(Py_None); PyList_SET_ITEM(__pyx_t_1, __pyx_temp, Py_None); __Pyx_GIVEREF(Py_None); } } __pyx_v_chain = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/skiplist.pyx":88 * # find first node on each level where node.next[levels].value > value * chain = [None] * self.maxlevels * steps_at_level = [0] * self.maxlevels # <<<<<<<<<<<<<< * node = self.head * */ __pyx_t_1 = PyList_New(1 * ((__pyx_v_self->maxlevels<0) ? 0:__pyx_v_self->maxlevels)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < __pyx_v_self->maxlevels; __pyx_temp++) { __Pyx_INCREF(__pyx_int_0); PyList_SET_ITEM(__pyx_t_1, __pyx_temp, __pyx_int_0); __Pyx_GIVEREF(__pyx_int_0); } } __pyx_v_steps_at_level = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/skiplist.pyx":89 * chain = [None] * self.maxlevels * steps_at_level = [0] * self.maxlevels * node = self.head # <<<<<<<<<<<<<< * * for level in range(self.maxlevels - 1, -1, -1): */ __pyx_t_1 = ((PyObject *)__pyx_v_self->head); __Pyx_INCREF(__pyx_t_1); __pyx_v_node = ((struct __pyx_obj_6pandas_5algos_Node *)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/skiplist.pyx":91 * node = self.head * * for level in range(self.maxlevels - 1, -1, -1): # <<<<<<<<<<<<<< * next_at_level = node.next[level] * */ for (__pyx_t_4 = (__pyx_v_self->maxlevels - 1); __pyx_t_4 > -1; __pyx_t_4-=1) { __pyx_v_level = __pyx_t_4; /* "pandas/src/skiplist.pyx":92 * * for level in range(self.maxlevels - 1, -1, -1): * next_at_level = node.next[level] # <<<<<<<<<<<<<< * * while next_at_level.value <= value: */ if (unlikely(((PyObject *)__pyx_v_node->next) == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 92; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_1 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_node->next), __pyx_v_level, sizeof(Py_ssize_t), PyInt_FromSsize_t, 1, 1, 1); if (!__pyx_t_1) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 92; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_6pandas_5algos_Node))))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 92; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_XDECREF_SET(__pyx_v_next_at_level, ((struct __pyx_obj_6pandas_5algos_Node *)__pyx_t_1)); __pyx_t_1 = 0; /* "pandas/src/skiplist.pyx":94 * next_at_level = node.next[level] * * while next_at_level.value <= value: # <<<<<<<<<<<<<< * steps_at_level[level] = (steps_at_level[level] + * node.width[level]) */ while (1) { __pyx_t_5 = ((__pyx_v_next_at_level->value <= __pyx_v_value) != 0); if (!__pyx_t_5) break; /* "pandas/src/skiplist.pyx":95 * * while next_at_level.value <= value: * steps_at_level[level] = (steps_at_level[level] + # <<<<<<<<<<<<<< * node.width[level]) * node = next_at_level */ __pyx_t_1 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_steps_at_level), __pyx_v_level, sizeof(Py_ssize_t), PyInt_FromSsize_t, 1, 1, 1); if (!__pyx_t_1) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 95; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); /* "pandas/src/skiplist.pyx":96 * while next_at_level.value <= value: * steps_at_level[level] = (steps_at_level[level] + * node.width[level]) # <<<<<<<<<<<<<< * node = next_at_level * next_at_level = node.next[level] */ if (unlikely(((PyObject *)__pyx_v_node->width) == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 96; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_2 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_node->width), __pyx_v_level, sizeof(Py_ssize_t), PyInt_FromSsize_t, 1, 1, 1); if (!__pyx_t_2) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 96; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyNumber_Add(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 95; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/skiplist.pyx":95 * * while next_at_level.value <= value: * steps_at_level[level] = (steps_at_level[level] + # <<<<<<<<<<<<<< * node.width[level]) * node = next_at_level */ if (__Pyx_SetItemInt(((PyObject *)__pyx_v_steps_at_level), __pyx_v_level, __pyx_t_3, sizeof(Py_ssize_t), PyInt_FromSsize_t, 1, 1, 1) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 95; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/skiplist.pyx":97 * steps_at_level[level] = (steps_at_level[level] + * node.width[level]) * node = next_at_level # <<<<<<<<<<<<<< * next_at_level = node.next[level] * */ __Pyx_INCREF(((PyObject *)__pyx_v_next_at_level)); __Pyx_DECREF_SET(__pyx_v_node, __pyx_v_next_at_level); /* "pandas/src/skiplist.pyx":98 * node.width[level]) * node = next_at_level * next_at_level = node.next[level] # <<<<<<<<<<<<<< * * chain[level] = node */ if (unlikely(((PyObject *)__pyx_v_node->next) == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 98; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_3 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_node->next), __pyx_v_level, sizeof(Py_ssize_t), PyInt_FromSsize_t, 1, 1, 1); if (!__pyx_t_3) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 98; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_6pandas_5algos_Node))))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 98; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF_SET(__pyx_v_next_at_level, ((struct __pyx_obj_6pandas_5algos_Node *)__pyx_t_3)); __pyx_t_3 = 0; } /* "pandas/src/skiplist.pyx":100 * next_at_level = node.next[level] * * chain[level] = node # <<<<<<<<<<<<<< * * # insert a link to the newnode at each level */ if (__Pyx_SetItemInt(((PyObject *)__pyx_v_chain), __pyx_v_level, ((PyObject *)__pyx_v_node), sizeof(Py_ssize_t), PyInt_FromSsize_t, 1, 1, 1) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 100; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } /* "pandas/src/skiplist.pyx":103 * * # insert a link to the newnode at each level * d = min(self.maxlevels, 1 - int(Log2(random()))) # <<<<<<<<<<<<<< * newnode = Node(value, [None] * d, [None] * d) * steps = 0 */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s__random); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_6 = __pyx_PyFloat_AsDouble(__pyx_t_2); if (unlikely((__pyx_t_6 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyFloat_FromDouble(__pyx_f_6pandas_5algos_Log2(__pyx_t_6)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)(&PyInt_Type))), ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; __pyx_t_3 = PyNumber_Subtract(__pyx_int_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_4 = __pyx_v_self->maxlevels; __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_7 = PyObject_RichCompare(__pyx_t_3, __pyx_t_1, Py_LT); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (__pyx_t_5) { __Pyx_INCREF(__pyx_t_3); __pyx_t_2 = __pyx_t_3; } else { __pyx_t_7 = PyInt_FromSsize_t(__pyx_t_4); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_t_2 = __pyx_t_7; __pyx_t_7 = 0; } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_4 = __Pyx_PyIndex_AsSsize_t(__pyx_t_2); if (unlikely((__pyx_t_4 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_d = __pyx_t_4; /* "pandas/src/skiplist.pyx":104 * # insert a link to the newnode at each level * d = min(self.maxlevels, 1 - int(Log2(random()))) * newnode = Node(value, [None] * d, [None] * d) # <<<<<<<<<<<<<< * steps = 0 * */ __pyx_t_2 = PyFloat_FromDouble(__pyx_v_value); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyList_New(1 * ((__pyx_v_d<0) ? 0:__pyx_v_d)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < __pyx_v_d; __pyx_temp++) { __Pyx_INCREF(Py_None); PyList_SET_ITEM(__pyx_t_3, __pyx_temp, Py_None); __Pyx_GIVEREF(Py_None); } } __pyx_t_7 = PyList_New(1 * ((__pyx_v_d<0) ? 0:__pyx_v_d)); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < __pyx_v_d; __pyx_temp++) { __Pyx_INCREF(Py_None); PyList_SET_ITEM(__pyx_t_7, __pyx_temp, Py_None); __Pyx_GIVEREF(Py_None); } } __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject *)__pyx_t_3)); __Pyx_GIVEREF(((PyObject *)__pyx_t_3)); PyTuple_SET_ITEM(__pyx_t_1, 2, ((PyObject *)__pyx_t_7)); __Pyx_GIVEREF(((PyObject *)__pyx_t_7)); __pyx_t_2 = 0; __pyx_t_3 = 0; __pyx_t_7 = 0; __pyx_t_7 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_6pandas_5algos_Node)), ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_v_newnode = ((struct __pyx_obj_6pandas_5algos_Node *)__pyx_t_7); __pyx_t_7 = 0; /* "pandas/src/skiplist.pyx":105 * d = min(self.maxlevels, 1 - int(Log2(random()))) * newnode = Node(value, [None] * d, [None] * d) * steps = 0 # <<<<<<<<<<<<<< * * for level in range(d): */ __pyx_v_steps = 0; /* "pandas/src/skiplist.pyx":107 * steps = 0 * * for level in range(d): # <<<<<<<<<<<<<< * prevnode = chain[level] * newnode.next[level] = prevnode.next[level] */ __pyx_t_4 = __pyx_v_d; for (__pyx_t_8 = 0; __pyx_t_8 < __pyx_t_4; __pyx_t_8+=1) { __pyx_v_level = __pyx_t_8; /* "pandas/src/skiplist.pyx":108 * * for level in range(d): * prevnode = chain[level] # <<<<<<<<<<<<<< * newnode.next[level] = prevnode.next[level] * prevnode.next[level] = newnode */ __pyx_t_7 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_chain), __pyx_v_level, sizeof(Py_ssize_t), PyInt_FromSsize_t, 1, 1, 1); if (!__pyx_t_7) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 108; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); if (!(likely(((__pyx_t_7) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_7, __pyx_ptype_6pandas_5algos_Node))))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 108; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_XDECREF_SET(__pyx_v_prevnode, ((struct __pyx_obj_6pandas_5algos_Node *)__pyx_t_7)); __pyx_t_7 = 0; /* "pandas/src/skiplist.pyx":109 * for level in range(d): * prevnode = chain[level] * newnode.next[level] = prevnode.next[level] # <<<<<<<<<<<<<< * prevnode.next[level] = newnode * newnode.width[level] = (prevnode.width[level] - steps) */ if (unlikely(((PyObject *)__pyx_v_prevnode->next) == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 109; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_7 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_prevnode->next), __pyx_v_level, sizeof(Py_ssize_t), PyInt_FromSsize_t, 1, 1, 1); if (!__pyx_t_7) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 109; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); if (unlikely(((PyObject *)__pyx_v_newnode->next) == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 109; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } if (__Pyx_SetItemInt(((PyObject *)__pyx_v_newnode->next), __pyx_v_level, __pyx_t_7, sizeof(Py_ssize_t), PyInt_FromSsize_t, 1, 1, 1) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 109; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; /* "pandas/src/skiplist.pyx":110 * prevnode = chain[level] * newnode.next[level] = prevnode.next[level] * prevnode.next[level] = newnode # <<<<<<<<<<<<<< * newnode.width[level] = (prevnode.width[level] - steps) * prevnode.width[level] = steps + 1 */ if (unlikely(((PyObject *)__pyx_v_prevnode->next) == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 110; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } if (__Pyx_SetItemInt(((PyObject *)__pyx_v_prevnode->next), __pyx_v_level, ((PyObject *)__pyx_v_newnode), sizeof(Py_ssize_t), PyInt_FromSsize_t, 1, 1, 1) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 110; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/skiplist.pyx":111 * newnode.next[level] = prevnode.next[level] * prevnode.next[level] = newnode * newnode.width[level] = (prevnode.width[level] - steps) # <<<<<<<<<<<<<< * prevnode.width[level] = steps + 1 * steps += steps_at_level[level] */ if (unlikely(((PyObject *)__pyx_v_prevnode->width) == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 111; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_7 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_prevnode->width), __pyx_v_level, sizeof(Py_ssize_t), PyInt_FromSsize_t, 1, 1, 1); if (!__pyx_t_7) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 111; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_steps); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 111; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = PyNumber_Subtract(__pyx_t_7, __pyx_t_1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 111; __pyx_clineno = __LINE__; goto __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; if (unlikely(((PyObject *)__pyx_v_newnode->width) == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 111; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } if (__Pyx_SetItemInt(((PyObject *)__pyx_v_newnode->width), __pyx_v_level, __pyx_t_3, sizeof(Py_ssize_t), PyInt_FromSsize_t, 1, 1, 1) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 111; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/skiplist.pyx":112 * prevnode.next[level] = newnode * newnode.width[level] = (prevnode.width[level] - steps) * prevnode.width[level] = steps + 1 # <<<<<<<<<<<<<< * steps += steps_at_level[level] * */ __pyx_t_3 = PyInt_FromSsize_t((__pyx_v_steps + 1)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 112; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (unlikely(((PyObject *)__pyx_v_prevnode->width) == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 112; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } if (__Pyx_SetItemInt(((PyObject *)__pyx_v_prevnode->width), __pyx_v_level, __pyx_t_3, sizeof(Py_ssize_t), PyInt_FromSsize_t, 1, 1, 1) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 112; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/skiplist.pyx":113 * newnode.width[level] = (prevnode.width[level] - steps) * prevnode.width[level] = steps + 1 * steps += steps_at_level[level] # <<<<<<<<<<<<<< * * for level in range(d, self.maxlevels): */ __pyx_t_3 = PyInt_FromSsize_t(__pyx_v_steps); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 113; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_steps_at_level), __pyx_v_level, sizeof(Py_ssize_t), PyInt_FromSsize_t, 1, 1, 1); if (!__pyx_t_1) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 113; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_7 = PyNumber_InPlaceAdd(__pyx_t_3, __pyx_t_1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 113; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_9 = __Pyx_PyIndex_AsSsize_t(__pyx_t_7); if (unlikely((__pyx_t_9 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 113; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_v_steps = __pyx_t_9; } /* "pandas/src/skiplist.pyx":115 * steps += steps_at_level[level] * * for level in range(d, self.maxlevels): # <<<<<<<<<<<<<< * ( chain[level]).width[level] += 1 * */ __pyx_t_4 = __pyx_v_self->maxlevels; for (__pyx_t_8 = __pyx_v_d; __pyx_t_8 < __pyx_t_4; __pyx_t_8+=1) { __pyx_v_level = __pyx_t_8; /* "pandas/src/skiplist.pyx":116 * * for level in range(d, self.maxlevels): * ( chain[level]).width[level] += 1 # <<<<<<<<<<<<<< * * self.size += 1 */ __pyx_t_7 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_chain), __pyx_v_level, sizeof(Py_ssize_t), PyInt_FromSsize_t, 1, 1, 1); if (!__pyx_t_7) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 116; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); if (unlikely(((PyObject *)((struct __pyx_obj_6pandas_5algos_Node *)__pyx_t_7)->width) == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 116; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __Pyx_INCREF(((PyObject *)((struct __pyx_obj_6pandas_5algos_Node *)__pyx_t_7)->width)); __pyx_t_10 = ((struct __pyx_obj_6pandas_5algos_Node *)__pyx_t_7)->width; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_9 = __pyx_v_level; if (unlikely(((PyObject *)__pyx_t_10) == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 116; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_7 = __Pyx_GetItemInt_List(((PyObject *)__pyx_t_10), __pyx_t_9, sizeof(Py_ssize_t), PyInt_FromSsize_t, 1, 1, 1); if (!__pyx_t_7) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 116; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_t_7, __pyx_int_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 116; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (unlikely(((PyObject *)__pyx_t_10) == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 116; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } if (__Pyx_SetItemInt(((PyObject *)__pyx_t_10), __pyx_t_9, __pyx_t_1, sizeof(Py_ssize_t), PyInt_FromSsize_t, 1, 1, 1) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 116; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_10)); __pyx_t_10 = 0; } /* "pandas/src/skiplist.pyx":118 * ( chain[level]).width[level] += 1 * * self.size += 1 # <<<<<<<<<<<<<< * * cpdef remove(self, double value): */ __pyx_v_self->size = (__pyx_v_self->size + 1); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(((PyObject *)__pyx_t_10)); __Pyx_AddTraceback("pandas.algos.IndexableSkiplist.insert", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_node); __Pyx_XDECREF((PyObject *)__pyx_v_prevnode); __Pyx_XDECREF((PyObject *)__pyx_v_newnode); __Pyx_XDECREF((PyObject *)__pyx_v_next_at_level); __Pyx_XDECREF(__pyx_v_chain); __Pyx_XDECREF(__pyx_v_steps_at_level); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_17IndexableSkiplist_9insert(PyObject *__pyx_v_self, PyObject *__pyx_arg_value); /*proto*/ static PyObject *__pyx_pw_6pandas_5algos_17IndexableSkiplist_9insert(PyObject *__pyx_v_self, PyObject *__pyx_arg_value) { double __pyx_v_value; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("insert (wrapper)", 0); assert(__pyx_arg_value); { __pyx_v_value = __pyx_PyFloat_AsDouble(__pyx_arg_value); if (unlikely((__pyx_v_value == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.IndexableSkiplist.insert", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pandas_5algos_17IndexableSkiplist_8insert(((struct __pyx_obj_6pandas_5algos_IndexableSkiplist *)__pyx_v_self), ((double)__pyx_v_value)); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/skiplist.pyx":81 * return node.value * * cpdef insert(self, double value): # <<<<<<<<<<<<<< * cdef Py_ssize_t level, steps, d * cdef Node node, prevnode, newnode, next_at_level, tmp */ static PyObject *__pyx_pf_6pandas_5algos_17IndexableSkiplist_8insert(struct __pyx_obj_6pandas_5algos_IndexableSkiplist *__pyx_v_self, double __pyx_v_value) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("insert", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = ((struct __pyx_vtabstruct_6pandas_5algos_IndexableSkiplist *)__pyx_v_self->__pyx_vtab)->insert(__pyx_v_self, __pyx_v_value, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas.algos.IndexableSkiplist.insert", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/skiplist.pyx":120 * self.size += 1 * * cpdef remove(self, double value): # <<<<<<<<<<<<<< * cdef Py_ssize_t level, d * cdef Node node, prevnode, tmpnode, next_at_level */ static PyObject *__pyx_pw_6pandas_5algos_17IndexableSkiplist_11remove(PyObject *__pyx_v_self, PyObject *__pyx_arg_value); /*proto*/ static PyObject *__pyx_f_6pandas_5algos_17IndexableSkiplist_remove(struct __pyx_obj_6pandas_5algos_IndexableSkiplist *__pyx_v_self, double __pyx_v_value, int __pyx_skip_dispatch) { Py_ssize_t __pyx_v_level; Py_ssize_t __pyx_v_d; struct __pyx_obj_6pandas_5algos_Node *__pyx_v_node = 0; struct __pyx_obj_6pandas_5algos_Node *__pyx_v_prevnode = 0; struct __pyx_obj_6pandas_5algos_Node *__pyx_v_tmpnode = 0; struct __pyx_obj_6pandas_5algos_Node *__pyx_v_next_at_level = 0; PyObject *__pyx_v_chain = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; Py_ssize_t __pyx_t_4; int __pyx_t_5; Py_ssize_t __pyx_t_6; PyObject *__pyx_t_7 = NULL; Py_ssize_t __pyx_t_8; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("remove", 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__remove); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 120; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_6pandas_5algos_17IndexableSkiplist_11remove)) { __Pyx_XDECREF(__pyx_r); __pyx_t_2 = PyFloat_FromDouble(__pyx_v_value); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 120; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 120; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 120; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(((PyObject *)__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/src/skiplist.pyx":126 * * # find first node on each level where node.next[levels].value >= value * chain = [None] * self.maxlevels # <<<<<<<<<<<<<< * node = self.head * */ __pyx_t_1 = PyList_New(1 * ((__pyx_v_self->maxlevels<0) ? 0:__pyx_v_self->maxlevels)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 126; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < __pyx_v_self->maxlevels; __pyx_temp++) { __Pyx_INCREF(Py_None); PyList_SET_ITEM(__pyx_t_1, __pyx_temp, Py_None); __Pyx_GIVEREF(Py_None); } } __pyx_v_chain = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/skiplist.pyx":127 * # find first node on each level where node.next[levels].value >= value * chain = [None] * self.maxlevels * node = self.head # <<<<<<<<<<<<<< * * for level in range(self.maxlevels - 1, -1, -1): */ __pyx_t_1 = ((PyObject *)__pyx_v_self->head); __Pyx_INCREF(__pyx_t_1); __pyx_v_node = ((struct __pyx_obj_6pandas_5algos_Node *)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/skiplist.pyx":129 * node = self.head * * for level in range(self.maxlevels - 1, -1, -1): # <<<<<<<<<<<<<< * next_at_level = node.next[level] * while next_at_level.value < value: */ for (__pyx_t_4 = (__pyx_v_self->maxlevels - 1); __pyx_t_4 > -1; __pyx_t_4-=1) { __pyx_v_level = __pyx_t_4; /* "pandas/src/skiplist.pyx":130 * * for level in range(self.maxlevels - 1, -1, -1): * next_at_level = node.next[level] # <<<<<<<<<<<<<< * while next_at_level.value < value: * node = next_at_level */ if (unlikely(((PyObject *)__pyx_v_node->next) == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 130; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_1 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_node->next), __pyx_v_level, sizeof(Py_ssize_t), PyInt_FromSsize_t, 1, 1, 1); if (!__pyx_t_1) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 130; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_6pandas_5algos_Node))))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 130; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_XDECREF_SET(__pyx_v_next_at_level, ((struct __pyx_obj_6pandas_5algos_Node *)__pyx_t_1)); __pyx_t_1 = 0; /* "pandas/src/skiplist.pyx":131 * for level in range(self.maxlevels - 1, -1, -1): * next_at_level = node.next[level] * while next_at_level.value < value: # <<<<<<<<<<<<<< * node = next_at_level * next_at_level = node.next[level] */ while (1) { __pyx_t_5 = ((__pyx_v_next_at_level->value < __pyx_v_value) != 0); if (!__pyx_t_5) break; /* "pandas/src/skiplist.pyx":132 * next_at_level = node.next[level] * while next_at_level.value < value: * node = next_at_level # <<<<<<<<<<<<<< * next_at_level = node.next[level] * */ __Pyx_INCREF(((PyObject *)__pyx_v_next_at_level)); __Pyx_DECREF_SET(__pyx_v_node, __pyx_v_next_at_level); /* "pandas/src/skiplist.pyx":133 * while next_at_level.value < value: * node = next_at_level * next_at_level = node.next[level] # <<<<<<<<<<<<<< * * chain[level] = node */ if (unlikely(((PyObject *)__pyx_v_node->next) == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 133; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_1 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_node->next), __pyx_v_level, sizeof(Py_ssize_t), PyInt_FromSsize_t, 1, 1, 1); if (!__pyx_t_1) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 133; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_6pandas_5algos_Node))))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 133; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF_SET(__pyx_v_next_at_level, ((struct __pyx_obj_6pandas_5algos_Node *)__pyx_t_1)); __pyx_t_1 = 0; } /* "pandas/src/skiplist.pyx":135 * next_at_level = node.next[level] * * chain[level] = node # <<<<<<<<<<<<<< * * if value != ( ( ( chain[0]).next)[0]).value: */ if (__Pyx_SetItemInt(((PyObject *)__pyx_v_chain), __pyx_v_level, ((PyObject *)__pyx_v_node), sizeof(Py_ssize_t), PyInt_FromSsize_t, 1, 1, 1) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 135; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } /* "pandas/src/skiplist.pyx":137 * chain[level] = node * * if value != ( ( ( chain[0]).next)[0]).value: # <<<<<<<<<<<<<< * raise KeyError('Not Found') * */ __pyx_t_1 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_chain), 0, sizeof(long), PyInt_FromLong, 1, 0, 1); if (!__pyx_t_1) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 137; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_GetItemInt(((PyObject *)((struct __pyx_obj_6pandas_5algos_Node *)__pyx_t_1)->next), 0, sizeof(long), PyInt_FromLong, 0, 0, 1); if (!__pyx_t_2) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 137; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_5 = ((__pyx_v_value != ((struct __pyx_obj_6pandas_5algos_Node *)__pyx_t_2)->value) != 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_5) { /* "pandas/src/skiplist.pyx":138 * * if value != ( ( ( chain[0]).next)[0]).value: * raise KeyError('Not Found') # <<<<<<<<<<<<<< * * # remove one link at each level */ __pyx_t_2 = PyObject_Call(__pyx_builtin_KeyError, ((PyObject *)__pyx_k_tuple_2), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 138; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 138; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L7; } __pyx_L7:; /* "pandas/src/skiplist.pyx":141 * * # remove one link at each level * d = len(( ( ( chain[0]).next)[0]).next) # <<<<<<<<<<<<<< * * for level in range(d): */ __pyx_t_2 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_chain), 0, sizeof(long), PyInt_FromLong, 1, 0, 1); if (!__pyx_t_2) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 141; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __Pyx_GetItemInt(((PyObject *)((struct __pyx_obj_6pandas_5algos_Node *)__pyx_t_2)->next), 0, sizeof(long), PyInt_FromLong, 0, 0, 1); if (!__pyx_t_1) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 141; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = ((PyObject *)((struct __pyx_obj_6pandas_5algos_Node *)__pyx_t_1)->next); __Pyx_INCREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (unlikely(__pyx_t_2 == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 141; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_4 = PyList_GET_SIZE(__pyx_t_2); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 141; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_d = __pyx_t_4; /* "pandas/src/skiplist.pyx":143 * d = len(( ( ( chain[0]).next)[0]).next) * * for level in range(d): # <<<<<<<<<<<<<< * prevnode = chain[level] * tmpnode = prevnode.next[level] */ __pyx_t_4 = __pyx_v_d; for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_4; __pyx_t_6+=1) { __pyx_v_level = __pyx_t_6; /* "pandas/src/skiplist.pyx":144 * * for level in range(d): * prevnode = chain[level] # <<<<<<<<<<<<<< * tmpnode = prevnode.next[level] * prevnode.width[level] += tmpnode.width[level] - 1 */ __pyx_t_2 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_chain), __pyx_v_level, sizeof(Py_ssize_t), PyInt_FromSsize_t, 1, 1, 1); if (!__pyx_t_2) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 144; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_6pandas_5algos_Node))))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 144; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_XDECREF_SET(__pyx_v_prevnode, ((struct __pyx_obj_6pandas_5algos_Node *)__pyx_t_2)); __pyx_t_2 = 0; /* "pandas/src/skiplist.pyx":145 * for level in range(d): * prevnode = chain[level] * tmpnode = prevnode.next[level] # <<<<<<<<<<<<<< * prevnode.width[level] += tmpnode.width[level] - 1 * prevnode.next[level] = tmpnode.next[level] */ if (unlikely(((PyObject *)__pyx_v_prevnode->next) == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 145; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_2 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_prevnode->next), __pyx_v_level, sizeof(Py_ssize_t), PyInt_FromSsize_t, 1, 1, 1); if (!__pyx_t_2) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 145; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_6pandas_5algos_Node))))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 145; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_XDECREF_SET(__pyx_v_tmpnode, ((struct __pyx_obj_6pandas_5algos_Node *)__pyx_t_2)); __pyx_t_2 = 0; /* "pandas/src/skiplist.pyx":146 * prevnode = chain[level] * tmpnode = prevnode.next[level] * prevnode.width[level] += tmpnode.width[level] - 1 # <<<<<<<<<<<<<< * prevnode.next[level] = tmpnode.next[level] * */ if (unlikely(((PyObject *)__pyx_v_prevnode->width) == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 146; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __Pyx_INCREF(((PyObject *)__pyx_v_prevnode->width)); __pyx_t_7 = __pyx_v_prevnode->width; __pyx_t_8 = __pyx_v_level; if (unlikely(((PyObject *)__pyx_t_7) == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 146; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_2 = __Pyx_GetItemInt_List(((PyObject *)__pyx_t_7), __pyx_t_8, sizeof(Py_ssize_t), PyInt_FromSsize_t, 1, 1, 1); if (!__pyx_t_2) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 146; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (unlikely(((PyObject *)__pyx_v_tmpnode->width) == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 146; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_1 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_tmpnode->width), __pyx_v_level, sizeof(Py_ssize_t), PyInt_FromSsize_t, 1, 1, 1); if (!__pyx_t_1) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 146; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = PyNumber_Subtract(__pyx_t_1, __pyx_int_1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 146; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 146; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(((PyObject *)__pyx_t_7) == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 146; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } if (__Pyx_SetItemInt(((PyObject *)__pyx_t_7), __pyx_t_8, __pyx_t_1, sizeof(Py_ssize_t), PyInt_FromSsize_t, 1, 1, 1) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 146; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0; /* "pandas/src/skiplist.pyx":147 * tmpnode = prevnode.next[level] * prevnode.width[level] += tmpnode.width[level] - 1 * prevnode.next[level] = tmpnode.next[level] # <<<<<<<<<<<<<< * * for level in range(d, self.maxlevels): */ if (unlikely(((PyObject *)__pyx_v_tmpnode->next) == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 147; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_1 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_tmpnode->next), __pyx_v_level, sizeof(Py_ssize_t), PyInt_FromSsize_t, 1, 1, 1); if (!__pyx_t_1) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 147; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (unlikely(((PyObject *)__pyx_v_prevnode->next) == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 147; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } if (__Pyx_SetItemInt(((PyObject *)__pyx_v_prevnode->next), __pyx_v_level, __pyx_t_1, sizeof(Py_ssize_t), PyInt_FromSsize_t, 1, 1, 1) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 147; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } /* "pandas/src/skiplist.pyx":149 * prevnode.next[level] = tmpnode.next[level] * * for level in range(d, self.maxlevels): # <<<<<<<<<<<<<< * tmpnode = chain[level] * tmpnode.width[level] -= 1 */ __pyx_t_4 = __pyx_v_self->maxlevels; for (__pyx_t_6 = __pyx_v_d; __pyx_t_6 < __pyx_t_4; __pyx_t_6+=1) { __pyx_v_level = __pyx_t_6; /* "pandas/src/skiplist.pyx":150 * * for level in range(d, self.maxlevels): * tmpnode = chain[level] # <<<<<<<<<<<<<< * tmpnode.width[level] -= 1 * */ __pyx_t_1 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_chain), __pyx_v_level, sizeof(Py_ssize_t), PyInt_FromSsize_t, 1, 1, 1); if (!__pyx_t_1) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 150; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_6pandas_5algos_Node))))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 150; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_XDECREF_SET(__pyx_v_tmpnode, ((struct __pyx_obj_6pandas_5algos_Node *)__pyx_t_1)); __pyx_t_1 = 0; /* "pandas/src/skiplist.pyx":151 * for level in range(d, self.maxlevels): * tmpnode = chain[level] * tmpnode.width[level] -= 1 # <<<<<<<<<<<<<< * * self.size -= 1 */ if (unlikely(((PyObject *)__pyx_v_tmpnode->width) == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 151; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __Pyx_INCREF(((PyObject *)__pyx_v_tmpnode->width)); __pyx_t_7 = __pyx_v_tmpnode->width; __pyx_t_8 = __pyx_v_level; if (unlikely(((PyObject *)__pyx_t_7) == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 151; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_1 = __Pyx_GetItemInt_List(((PyObject *)__pyx_t_7), __pyx_t_8, sizeof(Py_ssize_t), PyInt_FromSsize_t, 1, 1, 1); if (!__pyx_t_1) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 151; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = PyNumber_InPlaceSubtract(__pyx_t_1, __pyx_int_1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 151; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (unlikely(((PyObject *)__pyx_t_7) == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 151; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } if (__Pyx_SetItemInt(((PyObject *)__pyx_t_7), __pyx_t_8, __pyx_t_3, sizeof(Py_ssize_t), PyInt_FromSsize_t, 1, 1, 1) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 151; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0; } /* "pandas/src/skiplist.pyx":153 * tmpnode.width[level] -= 1 * * self.size -= 1 # <<<<<<<<<<<<<< */ __pyx_v_self->size = (__pyx_v_self->size - 1); __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(((PyObject *)__pyx_t_7)); __Pyx_AddTraceback("pandas.algos.IndexableSkiplist.remove", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_node); __Pyx_XDECREF((PyObject *)__pyx_v_prevnode); __Pyx_XDECREF((PyObject *)__pyx_v_tmpnode); __Pyx_XDECREF((PyObject *)__pyx_v_next_at_level); __Pyx_XDECREF(__pyx_v_chain); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_17IndexableSkiplist_11remove(PyObject *__pyx_v_self, PyObject *__pyx_arg_value); /*proto*/ static PyObject *__pyx_pw_6pandas_5algos_17IndexableSkiplist_11remove(PyObject *__pyx_v_self, PyObject *__pyx_arg_value) { double __pyx_v_value; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("remove (wrapper)", 0); assert(__pyx_arg_value); { __pyx_v_value = __pyx_PyFloat_AsDouble(__pyx_arg_value); if (unlikely((__pyx_v_value == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 120; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.IndexableSkiplist.remove", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pandas_5algos_17IndexableSkiplist_10remove(((struct __pyx_obj_6pandas_5algos_IndexableSkiplist *)__pyx_v_self), ((double)__pyx_v_value)); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/skiplist.pyx":120 * self.size += 1 * * cpdef remove(self, double value): # <<<<<<<<<<<<<< * cdef Py_ssize_t level, d * cdef Node node, prevnode, tmpnode, next_at_level */ static PyObject *__pyx_pf_6pandas_5algos_17IndexableSkiplist_10remove(struct __pyx_obj_6pandas_5algos_IndexableSkiplist *__pyx_v_self, double __pyx_v_value) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("remove", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = ((struct __pyx_vtabstruct_6pandas_5algos_IndexableSkiplist *)__pyx_v_self->__pyx_vtab)->remove(__pyx_v_self, __pyx_v_value, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 120; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas.algos.IndexableSkiplist.remove", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/algos.pyx":87 * # from cython cimport floating, integral * * cdef _take_2d_float64(ndarray[float64_t, ndim=2] values, # <<<<<<<<<<<<<< * object idx): * cdef: */ static PyObject *__pyx_f_6pandas_5algos__take_2d_float64(PyArrayObject *__pyx_v_values, PyObject *__pyx_v_idx) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_N; Py_ssize_t __pyx_v_K; PyArrayObject *__pyx_v_indexer = 0; PyArrayObject *__pyx_v_result = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_indexer; __Pyx_Buffer __pyx_pybuffer_indexer; __Pyx_LocalBuf_ND __pyx_pybuffernd_result; __Pyx_Buffer __pyx_pybuffer_result; __Pyx_LocalBuf_ND __pyx_pybuffernd_values; __Pyx_Buffer __pyx_pybuffer_values; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyArrayObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *(*__pyx_t_6)(PyObject *); Py_ssize_t __pyx_t_7; Py_ssize_t __pyx_t_8; 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; 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_take_2d_float64", 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_result.pybuffer.buf = NULL; __pyx_pybuffer_result.refcount = 0; __pyx_pybuffernd_result.data = NULL; __pyx_pybuffernd_result.rcbuffer = &__pyx_pybuffer_result; __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, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 87; __pyx_clineno = __LINE__; goto __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_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1]; /* "pandas/algos.pyx":91 * cdef: * Py_ssize_t i, j, N, K * ndarray[Py_ssize_t, ndim=2, cast=True] indexer = idx # <<<<<<<<<<<<<< * ndarray[float64_t, ndim=2] result * object val */ if (!(likely(((__pyx_v_idx) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_idx, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 91; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_1 = ((PyArrayObject *)__pyx_v_idx); { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer, (PyObject*)__pyx_t_1, &__Pyx_TypeInfo_Py_ssize_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 1, __pyx_stack) == -1)) { __pyx_v_indexer = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf = NULL; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 91; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } else {__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_pybuffernd_indexer.diminfo[1].strides = __pyx_pybuffernd_indexer.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_indexer.diminfo[1].shape = __pyx_pybuffernd_indexer.rcbuffer->pybuffer.shape[1]; } } __pyx_t_1 = 0; __Pyx_INCREF(__pyx_v_idx); __pyx_v_indexer = ((PyArrayObject *)__pyx_v_idx); /* "pandas/algos.pyx":95 * object val * * N, K = ( values).shape # <<<<<<<<<<<<<< * result = np.empty_like(values) * for i in range(N): */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_values), __pyx_n_s__shape); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 95; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if ((likely(PyTuple_CheckExact(__pyx_t_2))) || (PyList_CheckExact(__pyx_t_2))) { PyObject* sequence = __pyx_t_2; #if CYTHON_COMPILING_IN_CPYTHON Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 95; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_4 = PyTuple_GET_ITEM(sequence, 1); } else { __pyx_t_3 = PyList_GET_ITEM(sequence, 0); __pyx_t_4 = PyList_GET_ITEM(sequence, 1); } __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(__pyx_t_4); #else __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 95; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 95; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); #endif __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } else { Py_ssize_t index = -1; __pyx_t_5 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 95; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_6 = Py_TYPE(__pyx_t_5)->tp_iternext; index = 0; __pyx_t_3 = __pyx_t_6(__pyx_t_5); if (unlikely(!__pyx_t_3)) goto __pyx_L3_unpacking_failed; __Pyx_GOTREF(__pyx_t_3); index = 1; __pyx_t_4 = __pyx_t_6(__pyx_t_5); if (unlikely(!__pyx_t_4)) goto __pyx_L3_unpacking_failed; __Pyx_GOTREF(__pyx_t_4); if (__Pyx_IternextUnpackEndCheck(__pyx_t_6(__pyx_t_5), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 95; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_6 = NULL; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; goto __pyx_L4_unpacking_done; __pyx_L3_unpacking_failed:; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_6 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 95; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_L4_unpacking_done:; } __pyx_t_7 = __Pyx_PyIndex_AsSsize_t(__pyx_t_3); if (unlikely((__pyx_t_7 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 95; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_8 = __Pyx_PyIndex_AsSsize_t(__pyx_t_4); if (unlikely((__pyx_t_8 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 95; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_N = __pyx_t_7; __pyx_v_K = __pyx_t_8; /* "pandas/algos.pyx":96 * * N, K = ( values).shape * result = np.empty_like(values) # <<<<<<<<<<<<<< * for i in range(N): * for j in range(K): */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 96; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__empty_like); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 96; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 96; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(((PyObject *)__pyx_v_values)); PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_values)); __Pyx_GIVEREF(((PyObject *)__pyx_v_values)); __pyx_t_3 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 96; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 96; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_9 = ((PyArrayObject *)__pyx_t_3); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __pyx_t_10 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_t_9, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_result.rcbuffer->pybuffer, (PyObject*)__pyx_v_result, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_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]; __pyx_pybuffernd_result.diminfo[1].strides = __pyx_pybuffernd_result.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_result.diminfo[1].shape = __pyx_pybuffernd_result.rcbuffer->pybuffer.shape[1]; if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 96; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_9 = 0; __pyx_v_result = ((PyArrayObject *)__pyx_t_3); __pyx_t_3 = 0; /* "pandas/algos.pyx":97 * N, K = ( values).shape * result = np.empty_like(values) * for i in range(N): # <<<<<<<<<<<<<< * for j in range(K): * result[i, j] = values[i, indexer[i, j]] */ __pyx_t_8 = __pyx_v_N; for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_8; __pyx_t_7+=1) { __pyx_v_i = __pyx_t_7; /* "pandas/algos.pyx":98 * result = np.empty_like(values) * for i in range(N): * for j in range(K): # <<<<<<<<<<<<<< * result[i, j] = values[i, indexer[i, j]] * return result */ __pyx_t_14 = __pyx_v_K; for (__pyx_t_15 = 0; __pyx_t_15 < __pyx_t_14; __pyx_t_15+=1) { __pyx_v_j = __pyx_t_15; /* "pandas/algos.pyx":99 * for i in range(N): * for j in range(K): * result[i, j] = values[i, indexer[i, j]] # <<<<<<<<<<<<<< * return result * */ __pyx_t_16 = __pyx_v_i; __pyx_t_17 = __pyx_v_j; __pyx_t_10 = -1; if (__pyx_t_16 < 0) { __pyx_t_16 += __pyx_pybuffernd_indexer.diminfo[0].shape; if (unlikely(__pyx_t_16 < 0)) __pyx_t_10 = 0; } else if (unlikely(__pyx_t_16 >= __pyx_pybuffernd_indexer.diminfo[0].shape)) __pyx_t_10 = 0; if (__pyx_t_17 < 0) { __pyx_t_17 += __pyx_pybuffernd_indexer.diminfo[1].shape; if (unlikely(__pyx_t_17 < 0)) __pyx_t_10 = 1; } else if (unlikely(__pyx_t_17 >= __pyx_pybuffernd_indexer.diminfo[1].shape)) __pyx_t_10 = 1; if (unlikely(__pyx_t_10 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_10); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 99; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_18 = __pyx_v_i; __pyx_t_19 = (*__Pyx_BufPtrStrided2d(Py_ssize_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_indexer.diminfo[0].strides, __pyx_t_17, __pyx_pybuffernd_indexer.diminfo[1].strides)); __pyx_t_10 = -1; if (__pyx_t_18 < 0) { __pyx_t_18 += __pyx_pybuffernd_values.diminfo[0].shape; if (unlikely(__pyx_t_18 < 0)) __pyx_t_10 = 0; } else if (unlikely(__pyx_t_18 >= __pyx_pybuffernd_values.diminfo[0].shape)) __pyx_t_10 = 0; if (__pyx_t_19 < 0) { __pyx_t_19 += __pyx_pybuffernd_values.diminfo[1].shape; if (unlikely(__pyx_t_19 < 0)) __pyx_t_10 = 1; } else if (unlikely(__pyx_t_19 >= __pyx_pybuffernd_values.diminfo[1].shape)) __pyx_t_10 = 1; if (unlikely(__pyx_t_10 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_10); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 99; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_20 = __pyx_v_i; __pyx_t_21 = __pyx_v_j; __pyx_t_10 = -1; if (__pyx_t_20 < 0) { __pyx_t_20 += __pyx_pybuffernd_result.diminfo[0].shape; if (unlikely(__pyx_t_20 < 0)) __pyx_t_10 = 0; } else if (unlikely(__pyx_t_20 >= __pyx_pybuffernd_result.diminfo[0].shape)) __pyx_t_10 = 0; if (__pyx_t_21 < 0) { __pyx_t_21 += __pyx_pybuffernd_result.diminfo[1].shape; if (unlikely(__pyx_t_21 < 0)) __pyx_t_10 = 1; } else if (unlikely(__pyx_t_21 >= __pyx_pybuffernd_result.diminfo[1].shape)) __pyx_t_10 = 1; if (unlikely(__pyx_t_10 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_10); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 99; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_result.diminfo[0].strides, __pyx_t_21, __pyx_pybuffernd_result.diminfo[1].strides) = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_19, __pyx_pybuffernd_values.diminfo[1].strides)); } } /* "pandas/algos.pyx":100 * for j in range(K): * result[i, j] = values[i, indexer[i, j]] * return result # <<<<<<<<<<<<<< * * cdef _take_2d_int64(ndarray[int64_t, ndim=2] values, */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_result)); __pyx_r = ((PyObject *)__pyx_v_result); goto __pyx_L0; __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_XDECREF(__pyx_t_5); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos._take_2d_float64", __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_result.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_indexer); __Pyx_XDECREF((PyObject *)__pyx_v_result); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/algos.pyx":102 * return result * * cdef _take_2d_int64(ndarray[int64_t, ndim=2] values, # <<<<<<<<<<<<<< * object idx): * cdef: */ static PyObject *__pyx_f_6pandas_5algos__take_2d_int64(PyArrayObject *__pyx_v_values, PyObject *__pyx_v_idx) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_N; Py_ssize_t __pyx_v_K; PyArrayObject *__pyx_v_indexer = 0; PyArrayObject *__pyx_v_result = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_indexer; __Pyx_Buffer __pyx_pybuffer_indexer; __Pyx_LocalBuf_ND __pyx_pybuffernd_result; __Pyx_Buffer __pyx_pybuffer_result; __Pyx_LocalBuf_ND __pyx_pybuffernd_values; __Pyx_Buffer __pyx_pybuffer_values; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyArrayObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *(*__pyx_t_6)(PyObject *); Py_ssize_t __pyx_t_7; Py_ssize_t __pyx_t_8; 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; 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_take_2d_int64", 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_result.pybuffer.buf = NULL; __pyx_pybuffer_result.refcount = 0; __pyx_pybuffernd_result.data = NULL; __pyx_pybuffernd_result.rcbuffer = &__pyx_pybuffer_result; __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_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __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_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1]; /* "pandas/algos.pyx":106 * cdef: * Py_ssize_t i, j, N, K * ndarray[Py_ssize_t, ndim=2, cast=True] indexer = idx # <<<<<<<<<<<<<< * ndarray[int64_t, ndim=2] result * object val */ if (!(likely(((__pyx_v_idx) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_idx, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 106; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_1 = ((PyArrayObject *)__pyx_v_idx); { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer, (PyObject*)__pyx_t_1, &__Pyx_TypeInfo_Py_ssize_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 1, __pyx_stack) == -1)) { __pyx_v_indexer = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf = NULL; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 106; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } else {__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_pybuffernd_indexer.diminfo[1].strides = __pyx_pybuffernd_indexer.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_indexer.diminfo[1].shape = __pyx_pybuffernd_indexer.rcbuffer->pybuffer.shape[1]; } } __pyx_t_1 = 0; __Pyx_INCREF(__pyx_v_idx); __pyx_v_indexer = ((PyArrayObject *)__pyx_v_idx); /* "pandas/algos.pyx":110 * object val * * N, K = ( values).shape # <<<<<<<<<<<<<< * result = np.empty_like(values) * for i in range(N): */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_values), __pyx_n_s__shape); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 110; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if ((likely(PyTuple_CheckExact(__pyx_t_2))) || (PyList_CheckExact(__pyx_t_2))) { PyObject* sequence = __pyx_t_2; #if CYTHON_COMPILING_IN_CPYTHON Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 110; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_4 = PyTuple_GET_ITEM(sequence, 1); } else { __pyx_t_3 = PyList_GET_ITEM(sequence, 0); __pyx_t_4 = PyList_GET_ITEM(sequence, 1); } __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(__pyx_t_4); #else __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 110; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 110; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); #endif __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } else { Py_ssize_t index = -1; __pyx_t_5 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 110; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_6 = Py_TYPE(__pyx_t_5)->tp_iternext; index = 0; __pyx_t_3 = __pyx_t_6(__pyx_t_5); if (unlikely(!__pyx_t_3)) goto __pyx_L3_unpacking_failed; __Pyx_GOTREF(__pyx_t_3); index = 1; __pyx_t_4 = __pyx_t_6(__pyx_t_5); if (unlikely(!__pyx_t_4)) goto __pyx_L3_unpacking_failed; __Pyx_GOTREF(__pyx_t_4); if (__Pyx_IternextUnpackEndCheck(__pyx_t_6(__pyx_t_5), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 110; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_6 = NULL; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; goto __pyx_L4_unpacking_done; __pyx_L3_unpacking_failed:; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_6 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 110; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_L4_unpacking_done:; } __pyx_t_7 = __Pyx_PyIndex_AsSsize_t(__pyx_t_3); if (unlikely((__pyx_t_7 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 110; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_8 = __Pyx_PyIndex_AsSsize_t(__pyx_t_4); if (unlikely((__pyx_t_8 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 110; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_N = __pyx_t_7; __pyx_v_K = __pyx_t_8; /* "pandas/algos.pyx":111 * * N, K = ( values).shape * result = np.empty_like(values) # <<<<<<<<<<<<<< * for i in range(N): * for j in range(K): */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 111; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__empty_like); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 111; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 111; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(((PyObject *)__pyx_v_values)); PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_values)); __Pyx_GIVEREF(((PyObject *)__pyx_v_values)); __pyx_t_3 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 111; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 111; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_9 = ((PyArrayObject *)__pyx_t_3); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __pyx_t_10 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_t_9, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_result.rcbuffer->pybuffer, (PyObject*)__pyx_v_result, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_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]; __pyx_pybuffernd_result.diminfo[1].strides = __pyx_pybuffernd_result.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_result.diminfo[1].shape = __pyx_pybuffernd_result.rcbuffer->pybuffer.shape[1]; if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 111; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_9 = 0; __pyx_v_result = ((PyArrayObject *)__pyx_t_3); __pyx_t_3 = 0; /* "pandas/algos.pyx":112 * N, K = ( values).shape * result = np.empty_like(values) * for i in range(N): # <<<<<<<<<<<<<< * for j in range(K): * result[i, j] = values[i, indexer[i, j]] */ __pyx_t_8 = __pyx_v_N; for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_8; __pyx_t_7+=1) { __pyx_v_i = __pyx_t_7; /* "pandas/algos.pyx":113 * result = np.empty_like(values) * for i in range(N): * for j in range(K): # <<<<<<<<<<<<<< * result[i, j] = values[i, indexer[i, j]] * return result */ __pyx_t_14 = __pyx_v_K; for (__pyx_t_15 = 0; __pyx_t_15 < __pyx_t_14; __pyx_t_15+=1) { __pyx_v_j = __pyx_t_15; /* "pandas/algos.pyx":114 * for i in range(N): * for j in range(K): * result[i, j] = values[i, indexer[i, j]] # <<<<<<<<<<<<<< * return result * */ __pyx_t_16 = __pyx_v_i; __pyx_t_17 = __pyx_v_j; __pyx_t_10 = -1; if (__pyx_t_16 < 0) { __pyx_t_16 += __pyx_pybuffernd_indexer.diminfo[0].shape; if (unlikely(__pyx_t_16 < 0)) __pyx_t_10 = 0; } else if (unlikely(__pyx_t_16 >= __pyx_pybuffernd_indexer.diminfo[0].shape)) __pyx_t_10 = 0; if (__pyx_t_17 < 0) { __pyx_t_17 += __pyx_pybuffernd_indexer.diminfo[1].shape; if (unlikely(__pyx_t_17 < 0)) __pyx_t_10 = 1; } else if (unlikely(__pyx_t_17 >= __pyx_pybuffernd_indexer.diminfo[1].shape)) __pyx_t_10 = 1; if (unlikely(__pyx_t_10 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_10); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 114; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_18 = __pyx_v_i; __pyx_t_19 = (*__Pyx_BufPtrStrided2d(Py_ssize_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_indexer.diminfo[0].strides, __pyx_t_17, __pyx_pybuffernd_indexer.diminfo[1].strides)); __pyx_t_10 = -1; if (__pyx_t_18 < 0) { __pyx_t_18 += __pyx_pybuffernd_values.diminfo[0].shape; if (unlikely(__pyx_t_18 < 0)) __pyx_t_10 = 0; } else if (unlikely(__pyx_t_18 >= __pyx_pybuffernd_values.diminfo[0].shape)) __pyx_t_10 = 0; if (__pyx_t_19 < 0) { __pyx_t_19 += __pyx_pybuffernd_values.diminfo[1].shape; if (unlikely(__pyx_t_19 < 0)) __pyx_t_10 = 1; } else if (unlikely(__pyx_t_19 >= __pyx_pybuffernd_values.diminfo[1].shape)) __pyx_t_10 = 1; if (unlikely(__pyx_t_10 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_10); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 114; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_20 = __pyx_v_i; __pyx_t_21 = __pyx_v_j; __pyx_t_10 = -1; if (__pyx_t_20 < 0) { __pyx_t_20 += __pyx_pybuffernd_result.diminfo[0].shape; if (unlikely(__pyx_t_20 < 0)) __pyx_t_10 = 0; } else if (unlikely(__pyx_t_20 >= __pyx_pybuffernd_result.diminfo[0].shape)) __pyx_t_10 = 0; if (__pyx_t_21 < 0) { __pyx_t_21 += __pyx_pybuffernd_result.diminfo[1].shape; if (unlikely(__pyx_t_21 < 0)) __pyx_t_10 = 1; } else if (unlikely(__pyx_t_21 >= __pyx_pybuffernd_result.diminfo[1].shape)) __pyx_t_10 = 1; if (unlikely(__pyx_t_10 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_10); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 114; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_result.diminfo[0].strides, __pyx_t_21, __pyx_pybuffernd_result.diminfo[1].strides) = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_19, __pyx_pybuffernd_values.diminfo[1].strides)); } } /* "pandas/algos.pyx":115 * for j in range(K): * result[i, j] = values[i, indexer[i, j]] * return result # <<<<<<<<<<<<<< * * cdef _take_2d_object(ndarray[object, ndim=2] values, */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_result)); __pyx_r = ((PyObject *)__pyx_v_result); goto __pyx_L0; __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_XDECREF(__pyx_t_5); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos._take_2d_int64", __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_result.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_indexer); __Pyx_XDECREF((PyObject *)__pyx_v_result); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/algos.pyx":117 * return result * * cdef _take_2d_object(ndarray[object, ndim=2] values, # <<<<<<<<<<<<<< * object idx): * cdef: */ static PyObject *__pyx_f_6pandas_5algos__take_2d_object(PyArrayObject *__pyx_v_values, PyObject *__pyx_v_idx) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_N; Py_ssize_t __pyx_v_K; PyArrayObject *__pyx_v_indexer = 0; PyArrayObject *__pyx_v_result = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_indexer; __Pyx_Buffer __pyx_pybuffer_indexer; __Pyx_LocalBuf_ND __pyx_pybuffernd_result; __Pyx_Buffer __pyx_pybuffer_result; __Pyx_LocalBuf_ND __pyx_pybuffernd_values; __Pyx_Buffer __pyx_pybuffer_values; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyArrayObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *(*__pyx_t_6)(PyObject *); Py_ssize_t __pyx_t_7; Py_ssize_t __pyx_t_8; 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; 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; PyObject **__pyx_t_22; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_take_2d_object", 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_result.pybuffer.buf = NULL; __pyx_pybuffer_result.refcount = 0; __pyx_pybuffernd_result.data = NULL; __pyx_pybuffernd_result.rcbuffer = &__pyx_pybuffer_result; __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, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 117; __pyx_clineno = __LINE__; goto __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_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1]; /* "pandas/algos.pyx":121 * cdef: * Py_ssize_t i, j, N, K * ndarray[Py_ssize_t, ndim=2, cast=True] indexer = idx # <<<<<<<<<<<<<< * ndarray[object, ndim=2] result * object val */ if (!(likely(((__pyx_v_idx) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_idx, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 121; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_1 = ((PyArrayObject *)__pyx_v_idx); { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer, (PyObject*)__pyx_t_1, &__Pyx_TypeInfo_Py_ssize_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 1, __pyx_stack) == -1)) { __pyx_v_indexer = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf = NULL; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 121; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } else {__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_pybuffernd_indexer.diminfo[1].strides = __pyx_pybuffernd_indexer.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_indexer.diminfo[1].shape = __pyx_pybuffernd_indexer.rcbuffer->pybuffer.shape[1]; } } __pyx_t_1 = 0; __Pyx_INCREF(__pyx_v_idx); __pyx_v_indexer = ((PyArrayObject *)__pyx_v_idx); /* "pandas/algos.pyx":125 * object val * * N, K = ( values).shape # <<<<<<<<<<<<<< * result = values.copy() * for i in range(N): */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_values), __pyx_n_s__shape); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 125; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if ((likely(PyTuple_CheckExact(__pyx_t_2))) || (PyList_CheckExact(__pyx_t_2))) { PyObject* sequence = __pyx_t_2; #if CYTHON_COMPILING_IN_CPYTHON Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 125; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_4 = PyTuple_GET_ITEM(sequence, 1); } else { __pyx_t_3 = PyList_GET_ITEM(sequence, 0); __pyx_t_4 = PyList_GET_ITEM(sequence, 1); } __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(__pyx_t_4); #else __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 125; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 125; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); #endif __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } else { Py_ssize_t index = -1; __pyx_t_5 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 125; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_6 = Py_TYPE(__pyx_t_5)->tp_iternext; index = 0; __pyx_t_3 = __pyx_t_6(__pyx_t_5); if (unlikely(!__pyx_t_3)) goto __pyx_L3_unpacking_failed; __Pyx_GOTREF(__pyx_t_3); index = 1; __pyx_t_4 = __pyx_t_6(__pyx_t_5); if (unlikely(!__pyx_t_4)) goto __pyx_L3_unpacking_failed; __Pyx_GOTREF(__pyx_t_4); if (__Pyx_IternextUnpackEndCheck(__pyx_t_6(__pyx_t_5), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 125; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_6 = NULL; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; goto __pyx_L4_unpacking_done; __pyx_L3_unpacking_failed:; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_6 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 125; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_L4_unpacking_done:; } __pyx_t_7 = __Pyx_PyIndex_AsSsize_t(__pyx_t_3); if (unlikely((__pyx_t_7 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 125; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_8 = __Pyx_PyIndex_AsSsize_t(__pyx_t_4); if (unlikely((__pyx_t_8 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 125; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_N = __pyx_t_7; __pyx_v_K = __pyx_t_8; /* "pandas/algos.pyx":126 * * N, K = ( values).shape * result = values.copy() # <<<<<<<<<<<<<< * for i in range(N): * for j in range(K): */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_values), __pyx_n_s__copy); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 126; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 126; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 126; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_9 = ((PyArrayObject *)__pyx_t_4); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __pyx_t_10 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_t_9, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_result.rcbuffer->pybuffer, (PyObject*)__pyx_v_result, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_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]; __pyx_pybuffernd_result.diminfo[1].strides = __pyx_pybuffernd_result.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_result.diminfo[1].shape = __pyx_pybuffernd_result.rcbuffer->pybuffer.shape[1]; if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 126; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_9 = 0; __pyx_v_result = ((PyArrayObject *)__pyx_t_4); __pyx_t_4 = 0; /* "pandas/algos.pyx":127 * N, K = ( values).shape * result = values.copy() * for i in range(N): # <<<<<<<<<<<<<< * for j in range(K): * result[i, j] = values[i, indexer[i, j]] */ __pyx_t_8 = __pyx_v_N; for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_8; __pyx_t_7+=1) { __pyx_v_i = __pyx_t_7; /* "pandas/algos.pyx":128 * result = values.copy() * for i in range(N): * for j in range(K): # <<<<<<<<<<<<<< * result[i, j] = values[i, indexer[i, j]] * return result */ __pyx_t_14 = __pyx_v_K; for (__pyx_t_15 = 0; __pyx_t_15 < __pyx_t_14; __pyx_t_15+=1) { __pyx_v_j = __pyx_t_15; /* "pandas/algos.pyx":129 * for i in range(N): * for j in range(K): * result[i, j] = values[i, indexer[i, j]] # <<<<<<<<<<<<<< * return result * */ __pyx_t_16 = __pyx_v_i; __pyx_t_17 = __pyx_v_j; __pyx_t_10 = -1; if (__pyx_t_16 < 0) { __pyx_t_16 += __pyx_pybuffernd_indexer.diminfo[0].shape; if (unlikely(__pyx_t_16 < 0)) __pyx_t_10 = 0; } else if (unlikely(__pyx_t_16 >= __pyx_pybuffernd_indexer.diminfo[0].shape)) __pyx_t_10 = 0; if (__pyx_t_17 < 0) { __pyx_t_17 += __pyx_pybuffernd_indexer.diminfo[1].shape; if (unlikely(__pyx_t_17 < 0)) __pyx_t_10 = 1; } else if (unlikely(__pyx_t_17 >= __pyx_pybuffernd_indexer.diminfo[1].shape)) __pyx_t_10 = 1; if (unlikely(__pyx_t_10 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_10); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 129; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_18 = __pyx_v_i; __pyx_t_19 = (*__Pyx_BufPtrStrided2d(Py_ssize_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_indexer.diminfo[0].strides, __pyx_t_17, __pyx_pybuffernd_indexer.diminfo[1].strides)); __pyx_t_10 = -1; if (__pyx_t_18 < 0) { __pyx_t_18 += __pyx_pybuffernd_values.diminfo[0].shape; if (unlikely(__pyx_t_18 < 0)) __pyx_t_10 = 0; } else if (unlikely(__pyx_t_18 >= __pyx_pybuffernd_values.diminfo[0].shape)) __pyx_t_10 = 0; if (__pyx_t_19 < 0) { __pyx_t_19 += __pyx_pybuffernd_values.diminfo[1].shape; if (unlikely(__pyx_t_19 < 0)) __pyx_t_10 = 1; } else if (unlikely(__pyx_t_19 >= __pyx_pybuffernd_values.diminfo[1].shape)) __pyx_t_10 = 1; if (unlikely(__pyx_t_10 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_10); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 129; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_4 = (PyObject *) *__Pyx_BufPtrStrided2d(PyObject **, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_19, __pyx_pybuffernd_values.diminfo[1].strides); __Pyx_INCREF((PyObject*)__pyx_t_4); __pyx_t_20 = __pyx_v_i; __pyx_t_21 = __pyx_v_j; __pyx_t_10 = -1; if (__pyx_t_20 < 0) { __pyx_t_20 += __pyx_pybuffernd_result.diminfo[0].shape; if (unlikely(__pyx_t_20 < 0)) __pyx_t_10 = 0; } else if (unlikely(__pyx_t_20 >= __pyx_pybuffernd_result.diminfo[0].shape)) __pyx_t_10 = 0; if (__pyx_t_21 < 0) { __pyx_t_21 += __pyx_pybuffernd_result.diminfo[1].shape; if (unlikely(__pyx_t_21 < 0)) __pyx_t_10 = 1; } else if (unlikely(__pyx_t_21 >= __pyx_pybuffernd_result.diminfo[1].shape)) __pyx_t_10 = 1; if (unlikely(__pyx_t_10 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_10); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 129; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_22 = __Pyx_BufPtrStrided2d(PyObject **, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_result.diminfo[0].strides, __pyx_t_21, __pyx_pybuffernd_result.diminfo[1].strides); __Pyx_GOTREF(*__pyx_t_22); __Pyx_INCREF(__pyx_t_4); __Pyx_DECREF(*__pyx_t_22); *__pyx_t_22 = __pyx_t_4; __Pyx_GIVEREF(*__pyx_t_22); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } } /* "pandas/algos.pyx":130 * for j in range(K): * result[i, j] = values[i, indexer[i, j]] * return result # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_result)); __pyx_r = ((PyObject *)__pyx_v_result); goto __pyx_L0; __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_XDECREF(__pyx_t_5); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos._take_2d_object", __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_result.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_indexer); __Pyx_XDECREF((PyObject *)__pyx_v_result); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_1rank_1d_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6pandas_5algos_rank_1d_float64[] = "\n Fast NaN-friendly version of scipy.stats.rankdata\n "; static PyMethodDef __pyx_mdef_6pandas_5algos_1rank_1d_float64 = {__Pyx_NAMESTR("rank_1d_float64"), (PyCFunction)__pyx_pw_6pandas_5algos_1rank_1d_float64, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_5algos_rank_1d_float64)}; static PyObject *__pyx_pw_6pandas_5algos_1rank_1d_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_in_arr = 0; PyObject *__pyx_v_ties_method = 0; PyObject *__pyx_v_ascending = 0; PyObject *__pyx_v_na_option = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("rank_1d_float64 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__in_arr,&__pyx_n_s__ties_method,&__pyx_n_s__ascending,&__pyx_n_s__na_option,0}; PyObject* values[4] = {0,0,0,0}; values[1] = ((PyObject *)__pyx_n_s__average); values[2] = __pyx_k_3; values[3] = ((PyObject *)__pyx_n_s__keep); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__in_arr)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__ties_method); if (value) { values[1] = value; kw_args--; } } case 2: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__ascending); if (value) { values[2] = value; kw_args--; } } case 3: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__na_option); if (value) { values[3] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "rank_1d_float64") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 133; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_in_arr = values[0]; __pyx_v_ties_method = values[1]; __pyx_v_ascending = values[2]; __pyx_v_na_option = values[3]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("rank_1d_float64", 0, 1, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 133; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.rank_1d_float64", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pandas_5algos_rank_1d_float64(__pyx_self, __pyx_v_in_arr, __pyx_v_ties_method, __pyx_v_ascending, __pyx_v_na_option); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/algos.pyx":133 * * * def rank_1d_float64(object in_arr, ties_method='average', ascending=True, # <<<<<<<<<<<<<< * na_option='keep'): * """ */ static PyObject *__pyx_pf_6pandas_5algos_rank_1d_float64(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_in_arr, PyObject *__pyx_v_ties_method, PyObject *__pyx_v_ascending, PyObject *__pyx_v_na_option) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_n; Py_ssize_t __pyx_v_dups; PyArrayObject *__pyx_v_sorted_data = 0; PyArrayObject *__pyx_v_ranks = 0; PyArrayObject *__pyx_v_values = 0; PyArrayObject *__pyx_v_argsorted = 0; __pyx_t_5numpy_float64_t __pyx_v_val; __pyx_t_5numpy_float64_t __pyx_v_nan_value; __pyx_t_5numpy_float64_t __pyx_v_sum_ranks; int __pyx_v_tiebreak; int __pyx_v_keep_na; PyObject *__pyx_v_mask = NULL; PyObject *__pyx_v__as = NULL; __Pyx_LocalBuf_ND __pyx_pybuffernd_argsorted; __Pyx_Buffer __pyx_pybuffer_argsorted; __Pyx_LocalBuf_ND __pyx_pybuffernd_ranks; __Pyx_Buffer __pyx_pybuffer_ranks; __Pyx_LocalBuf_ND __pyx_pybuffernd_sorted_data; __Pyx_Buffer __pyx_pybuffer_sorted_data; __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; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; PyArrayObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; int __pyx_t_9; __pyx_t_5numpy_float64_t __pyx_t_10; Py_ssize_t __pyx_t_11; PyObject *__pyx_t_12 = NULL; int __pyx_t_13; PyArrayObject *__pyx_t_14 = NULL; Py_ssize_t __pyx_t_15; Py_ssize_t __pyx_t_16; Py_ssize_t __pyx_t_17; __pyx_t_5numpy_int64_t __pyx_t_18; Py_ssize_t __pyx_t_19; int __pyx_t_20; Py_ssize_t __pyx_t_21; Py_ssize_t __pyx_t_22; Py_ssize_t __pyx_t_23; __pyx_t_5numpy_int64_t __pyx_t_24; Py_ssize_t __pyx_t_25; __pyx_t_5numpy_int64_t __pyx_t_26; Py_ssize_t __pyx_t_27; __pyx_t_5numpy_int64_t __pyx_t_28; Py_ssize_t __pyx_t_29; __pyx_t_5numpy_int64_t __pyx_t_30; Py_ssize_t __pyx_t_31; __pyx_t_5numpy_int64_t __pyx_t_32; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("rank_1d_float64", 0); __pyx_pybuffer_sorted_data.pybuffer.buf = NULL; __pyx_pybuffer_sorted_data.refcount = 0; __pyx_pybuffernd_sorted_data.data = NULL; __pyx_pybuffernd_sorted_data.rcbuffer = &__pyx_pybuffer_sorted_data; __pyx_pybuffer_ranks.pybuffer.buf = NULL; __pyx_pybuffer_ranks.refcount = 0; __pyx_pybuffernd_ranks.data = NULL; __pyx_pybuffernd_ranks.rcbuffer = &__pyx_pybuffer_ranks; __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_argsorted.pybuffer.buf = NULL; __pyx_pybuffer_argsorted.refcount = 0; __pyx_pybuffernd_argsorted.data = NULL; __pyx_pybuffernd_argsorted.rcbuffer = &__pyx_pybuffer_argsorted; /* "pandas/algos.pyx":140 * * cdef: * Py_ssize_t i, j, n, dups = 0 # <<<<<<<<<<<<<< * ndarray[float64_t] sorted_data, ranks, values * ndarray[int64_t] argsorted */ __pyx_v_dups = 0; /* "pandas/algos.pyx":144 * ndarray[int64_t] argsorted * float64_t val, nan_value * float64_t sum_ranks = 0 # <<<<<<<<<<<<<< * int tiebreak = 0 * bint keep_na = 0 */ __pyx_v_sum_ranks = 0.0; /* "pandas/algos.pyx":145 * float64_t val, nan_value * float64_t sum_ranks = 0 * int tiebreak = 0 # <<<<<<<<<<<<<< * bint keep_na = 0 * tiebreak = tiebreakers[ties_method] */ __pyx_v_tiebreak = 0; /* "pandas/algos.pyx":146 * float64_t sum_ranks = 0 * int tiebreak = 0 * bint keep_na = 0 # <<<<<<<<<<<<<< * tiebreak = tiebreakers[ties_method] * */ __pyx_v_keep_na = 0; /* "pandas/algos.pyx":147 * int tiebreak = 0 * bint keep_na = 0 * tiebreak = tiebreakers[ties_method] # <<<<<<<<<<<<<< * * values = np.asarray(in_arr).copy() */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__tiebreakers); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 147; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyObject_GetItem(__pyx_t_1, __pyx_v_ties_method); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 147; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_3 = __Pyx_PyInt_AsInt(__pyx_t_2); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 147; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_tiebreak = __pyx_t_3; /* "pandas/algos.pyx":149 * tiebreak = tiebreakers[ties_method] * * values = np.asarray(in_arr).copy() # <<<<<<<<<<<<<< * * keep_na = na_option == 'keep' */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 149; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__asarray); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 149; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 149; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_in_arr); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_in_arr); __Pyx_GIVEREF(__pyx_v_in_arr); __pyx_t_4 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 149; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s__copy); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 149; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 149; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 149; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_5 = ((PyArrayObject *)__pyx_t_4); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_t_3 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_values.rcbuffer->pybuffer, (PyObject*)__pyx_t_5, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_3 < 0)) { PyErr_Fetch(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8); 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)) { 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_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]; if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 149; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_5 = 0; __pyx_v_values = ((PyArrayObject *)__pyx_t_4); __pyx_t_4 = 0; /* "pandas/algos.pyx":151 * values = np.asarray(in_arr).copy() * * keep_na = na_option == 'keep' # <<<<<<<<<<<<<< * * if ascending ^ (na_option == 'top'): */ __pyx_t_4 = PyObject_RichCompare(__pyx_v_na_option, ((PyObject *)__pyx_n_s__keep), Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 151; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_9 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 151; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_keep_na = __pyx_t_9; /* "pandas/algos.pyx":153 * keep_na = na_option == 'keep' * * if ascending ^ (na_option == 'top'): # <<<<<<<<<<<<<< * nan_value = np.inf * else: */ __pyx_t_4 = PyObject_RichCompare(__pyx_v_na_option, ((PyObject *)__pyx_n_s__top), Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 153; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_2 = PyNumber_Xor(__pyx_v_ascending, __pyx_t_4); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 153; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 153; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_9) { /* "pandas/algos.pyx":154 * * if ascending ^ (na_option == 'top'): * nan_value = np.inf # <<<<<<<<<<<<<< * else: * nan_value = -np.inf */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 154; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__inf); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 154; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_10 = __pyx_PyFloat_AsDouble(__pyx_t_4); if (unlikely((__pyx_t_10 == (npy_float64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 154; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_nan_value = __pyx_t_10; goto __pyx_L3; } /*else*/ { /* "pandas/algos.pyx":156 * nan_value = np.inf * else: * nan_value = -np.inf # <<<<<<<<<<<<<< * mask = np.isnan(values) * np.putmask(values, mask, nan_value) */ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 156; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s__inf); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 156; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyNumber_Negative(__pyx_t_2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 156; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_10 = __pyx_PyFloat_AsDouble(__pyx_t_4); if (unlikely((__pyx_t_10 == (npy_float64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 156; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_nan_value = __pyx_t_10; } __pyx_L3:; /* "pandas/algos.pyx":157 * else: * nan_value = -np.inf * mask = np.isnan(values) # <<<<<<<<<<<<<< * np.putmask(values, mask, nan_value) * */ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s__isnan); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(((PyObject *)__pyx_v_values)); PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_v_values)); __Pyx_GIVEREF(((PyObject *)__pyx_v_values)); __pyx_t_1 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __pyx_v_mask = __pyx_t_1; __pyx_t_1 = 0; /* "pandas/algos.pyx":158 * nan_value = -np.inf * mask = np.isnan(values) * np.putmask(values, mask, nan_value) # <<<<<<<<<<<<<< * * n = len(values) */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 158; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s__putmask); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 158; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyFloat_FromDouble(__pyx_v_nan_value); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 158; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 158; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(((PyObject *)__pyx_v_values)); PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_values)); __Pyx_GIVEREF(((PyObject *)__pyx_v_values)); __Pyx_INCREF(__pyx_v_mask); PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_mask); __Pyx_GIVEREF(__pyx_v_mask); PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 158; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pandas/algos.pyx":160 * np.putmask(values, mask, nan_value) * * n = len(values) # <<<<<<<<<<<<<< * ranks = np.empty(n, dtype='f8') * */ __pyx_t_11 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 160; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_11; /* "pandas/algos.pyx":161 * * n = len(values) * ranks = np.empty(n, dtype='f8') # <<<<<<<<<<<<<< * * # py2.5/win32 hack, can't pass i8 */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 161; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 161; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 161; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 161; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 161; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_1)); if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__dtype), ((PyObject *)__pyx_n_s__f8)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 161; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_12 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 161; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; if (!(likely(((__pyx_t_12) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_12, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 161; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_5 = ((PyArrayObject *)__pyx_t_12); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_ranks.rcbuffer->pybuffer); __pyx_t_3 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_ranks.rcbuffer->pybuffer, (PyObject*)__pyx_t_5, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_3 < 0)) { PyErr_Fetch(&__pyx_t_8, &__pyx_t_7, &__pyx_t_6); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_ranks.rcbuffer->pybuffer, (PyObject*)__pyx_v_ranks, &__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_7); Py_XDECREF(__pyx_t_6); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_8, __pyx_t_7, __pyx_t_6); } } __pyx_pybuffernd_ranks.diminfo[0].strides = __pyx_pybuffernd_ranks.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_ranks.diminfo[0].shape = __pyx_pybuffernd_ranks.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 161; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_5 = 0; __pyx_v_ranks = ((PyArrayObject *)__pyx_t_12); __pyx_t_12 = 0; /* "pandas/algos.pyx":164 * * # py2.5/win32 hack, can't pass i8 * if tiebreak == TIEBREAK_FIRST: # <<<<<<<<<<<<<< * # need to use a stable sort here * _as = values.argsort(kind='mergesort') */ __pyx_t_9 = ((__pyx_v_tiebreak == __pyx_v_6pandas_5algos_TIEBREAK_FIRST) != 0); if (__pyx_t_9) { /* "pandas/algos.pyx":166 * if tiebreak == TIEBREAK_FIRST: * # need to use a stable sort here * _as = values.argsort(kind='mergesort') # <<<<<<<<<<<<<< * if not ascending: * tiebreak = TIEBREAK_FIRST_DESCENDING */ __pyx_t_12 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_values), __pyx_n_s__argsort); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 166; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 166; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_1)); if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__kind), ((PyObject *)__pyx_n_s__mergesort)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 166; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_4 = PyObject_Call(__pyx_t_12, ((PyObject *)__pyx_empty_tuple), ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 166; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_v__as = __pyx_t_4; __pyx_t_4 = 0; /* "pandas/algos.pyx":167 * # need to use a stable sort here * _as = values.argsort(kind='mergesort') * if not ascending: # <<<<<<<<<<<<<< * tiebreak = TIEBREAK_FIRST_DESCENDING * else: */ __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_v_ascending); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 167; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_13 = ((!__pyx_t_9) != 0); if (__pyx_t_13) { /* "pandas/algos.pyx":168 * _as = values.argsort(kind='mergesort') * if not ascending: * tiebreak = TIEBREAK_FIRST_DESCENDING # <<<<<<<<<<<<<< * else: * _as = values.argsort() */ __pyx_v_tiebreak = __pyx_v_6pandas_5algos_TIEBREAK_FIRST_DESCENDING; goto __pyx_L5; } __pyx_L5:; goto __pyx_L4; } /*else*/ { /* "pandas/algos.pyx":170 * tiebreak = TIEBREAK_FIRST_DESCENDING * else: * _as = values.argsort() # <<<<<<<<<<<<<< * * if not ascending: */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_values), __pyx_n_s__argsort); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 170; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_1 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 170; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v__as = __pyx_t_1; __pyx_t_1 = 0; } __pyx_L4:; /* "pandas/algos.pyx":172 * _as = values.argsort() * * if not ascending: # <<<<<<<<<<<<<< * _as = _as[::-1] * */ __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_v_ascending); if (unlikely(__pyx_t_13 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 172; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_9 = ((!__pyx_t_13) != 0); if (__pyx_t_9) { /* "pandas/algos.pyx":173 * * if not ascending: * _as = _as[::-1] # <<<<<<<<<<<<<< * * sorted_data = values.take(_as) */ __pyx_t_1 = PyObject_GetItem(__pyx_v__as, __pyx_k_slice_4); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 173; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF_SET(__pyx_v__as, __pyx_t_1); __pyx_t_1 = 0; goto __pyx_L6; } __pyx_L6:; /* "pandas/algos.pyx":175 * _as = _as[::-1] * * sorted_data = values.take(_as) # <<<<<<<<<<<<<< * argsorted = _as.astype('i8') * */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_values), __pyx_n_s__take); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 175; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 175; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_v__as); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v__as); __Pyx_GIVEREF(__pyx_v__as); __pyx_t_12 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 175; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; if (!(likely(((__pyx_t_12) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_12, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 175; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_5 = ((PyArrayObject *)__pyx_t_12); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_sorted_data.rcbuffer->pybuffer); __pyx_t_3 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_sorted_data.rcbuffer->pybuffer, (PyObject*)__pyx_t_5, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_3 < 0)) { PyErr_Fetch(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_sorted_data.rcbuffer->pybuffer, (PyObject*)__pyx_v_sorted_data, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_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_pybuffernd_sorted_data.diminfo[0].strides = __pyx_pybuffernd_sorted_data.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_sorted_data.diminfo[0].shape = __pyx_pybuffernd_sorted_data.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 175; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_5 = 0; __pyx_v_sorted_data = ((PyArrayObject *)__pyx_t_12); __pyx_t_12 = 0; /* "pandas/algos.pyx":176 * * sorted_data = values.take(_as) * argsorted = _as.astype('i8') # <<<<<<<<<<<<<< * * for i in range(n): */ __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v__as, __pyx_n_s__astype); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 176; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __pyx_t_4 = PyObject_Call(__pyx_t_12, ((PyObject *)__pyx_k_tuple_5), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 176; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 176; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_14 = ((PyArrayObject *)__pyx_t_4); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_argsorted.rcbuffer->pybuffer); __pyx_t_3 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_argsorted.rcbuffer->pybuffer, (PyObject*)__pyx_t_14, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_3 < 0)) { PyErr_Fetch(&__pyx_t_8, &__pyx_t_7, &__pyx_t_6); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_argsorted.rcbuffer->pybuffer, (PyObject*)__pyx_v_argsorted, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_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_pybuffernd_argsorted.diminfo[0].strides = __pyx_pybuffernd_argsorted.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_argsorted.diminfo[0].shape = __pyx_pybuffernd_argsorted.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 176; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_14 = 0; __pyx_v_argsorted = ((PyArrayObject *)__pyx_t_4); __pyx_t_4 = 0; /* "pandas/algos.pyx":178 * argsorted = _as.astype('i8') * * for i in range(n): # <<<<<<<<<<<<<< * sum_ranks += i + 1 * dups += 1 */ __pyx_t_11 = __pyx_v_n; for (__pyx_t_15 = 0; __pyx_t_15 < __pyx_t_11; __pyx_t_15+=1) { __pyx_v_i = __pyx_t_15; /* "pandas/algos.pyx":179 * * for i in range(n): * sum_ranks += i + 1 # <<<<<<<<<<<<<< * dups += 1 * val = sorted_data[i] */ __pyx_v_sum_ranks = (__pyx_v_sum_ranks + (__pyx_v_i + 1)); /* "pandas/algos.pyx":180 * for i in range(n): * sum_ranks += i + 1 * dups += 1 # <<<<<<<<<<<<<< * val = sorted_data[i] * if (val == nan_value) and keep_na: */ __pyx_v_dups = (__pyx_v_dups + 1); /* "pandas/algos.pyx":181 * sum_ranks += i + 1 * dups += 1 * val = sorted_data[i] # <<<<<<<<<<<<<< * if (val == nan_value) and keep_na: * ranks[argsorted[i]] = nan */ __pyx_t_16 = __pyx_v_i; __pyx_t_3 = -1; if (__pyx_t_16 < 0) { __pyx_t_16 += __pyx_pybuffernd_sorted_data.diminfo[0].shape; if (unlikely(__pyx_t_16 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_16 >= __pyx_pybuffernd_sorted_data.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 181; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_val = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_sorted_data.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_sorted_data.diminfo[0].strides)); /* "pandas/algos.pyx":182 * dups += 1 * val = sorted_data[i] * if (val == nan_value) and keep_na: # <<<<<<<<<<<<<< * ranks[argsorted[i]] = nan * continue */ __pyx_t_9 = ((__pyx_v_val == __pyx_v_nan_value) != 0); if (__pyx_t_9) { __pyx_t_13 = (__pyx_v_keep_na != 0); } else { __pyx_t_13 = __pyx_t_9; } if (__pyx_t_13) { /* "pandas/algos.pyx":183 * val = sorted_data[i] * if (val == nan_value) and keep_na: * ranks[argsorted[i]] = nan # <<<<<<<<<<<<<< * continue * if i == n - 1 or fabs(sorted_data[i + 1] - val) > FP_ERR: */ __pyx_t_17 = __pyx_v_i; __pyx_t_3 = -1; if (__pyx_t_17 < 0) { __pyx_t_17 += __pyx_pybuffernd_argsorted.diminfo[0].shape; if (unlikely(__pyx_t_17 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_17 >= __pyx_pybuffernd_argsorted.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 183; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_18 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_argsorted.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_argsorted.diminfo[0].strides)); __pyx_t_3 = -1; if (__pyx_t_18 < 0) { __pyx_t_18 += __pyx_pybuffernd_ranks.diminfo[0].shape; if (unlikely(__pyx_t_18 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_18 >= __pyx_pybuffernd_ranks.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 183; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_ranks.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_ranks.diminfo[0].strides) = __pyx_v_6pandas_5algos_nan; /* "pandas/algos.pyx":184 * if (val == nan_value) and keep_na: * ranks[argsorted[i]] = nan * continue # <<<<<<<<<<<<<< * if i == n - 1 or fabs(sorted_data[i + 1] - val) > FP_ERR: * if tiebreak == TIEBREAK_AVERAGE: */ goto __pyx_L7_continue; goto __pyx_L9; } __pyx_L9:; /* "pandas/algos.pyx":185 * ranks[argsorted[i]] = nan * continue * if i == n - 1 or fabs(sorted_data[i + 1] - val) > FP_ERR: # <<<<<<<<<<<<<< * if tiebreak == TIEBREAK_AVERAGE: * for j in range(i - dups + 1, i + 1): */ __pyx_t_13 = ((__pyx_v_i == (__pyx_v_n - 1)) != 0); if (!__pyx_t_13) { __pyx_t_19 = (__pyx_v_i + 1); __pyx_t_3 = -1; if (__pyx_t_19 < 0) { __pyx_t_19 += __pyx_pybuffernd_sorted_data.diminfo[0].shape; if (unlikely(__pyx_t_19 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_19 >= __pyx_pybuffernd_sorted_data.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 185; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_9 = ((fabs(((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_sorted_data.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_sorted_data.diminfo[0].strides)) - __pyx_v_val)) > __pyx_v_6pandas_5algos_FP_ERR) != 0); __pyx_t_20 = __pyx_t_9; } else { __pyx_t_20 = __pyx_t_13; } if (__pyx_t_20) { /* "pandas/algos.pyx":186 * continue * if i == n - 1 or fabs(sorted_data[i + 1] - val) > FP_ERR: * if tiebreak == TIEBREAK_AVERAGE: # <<<<<<<<<<<<<< * for j in range(i - dups + 1, i + 1): * ranks[argsorted[j]] = sum_ranks / dups */ __pyx_t_20 = ((__pyx_v_tiebreak == __pyx_v_6pandas_5algos_TIEBREAK_AVERAGE) != 0); if (__pyx_t_20) { /* "pandas/algos.pyx":187 * if i == n - 1 or fabs(sorted_data[i + 1] - val) > FP_ERR: * if tiebreak == TIEBREAK_AVERAGE: * for j in range(i - dups + 1, i + 1): # <<<<<<<<<<<<<< * ranks[argsorted[j]] = sum_ranks / dups * elif tiebreak == TIEBREAK_MIN: */ __pyx_t_21 = (__pyx_v_i + 1); for (__pyx_t_22 = ((__pyx_v_i - __pyx_v_dups) + 1); __pyx_t_22 < __pyx_t_21; __pyx_t_22+=1) { __pyx_v_j = __pyx_t_22; /* "pandas/algos.pyx":188 * if tiebreak == TIEBREAK_AVERAGE: * for j in range(i - dups + 1, i + 1): * ranks[argsorted[j]] = sum_ranks / dups # <<<<<<<<<<<<<< * elif tiebreak == TIEBREAK_MIN: * for j in range(i - dups + 1, i + 1): */ if (unlikely(__pyx_v_dups == 0)) { #ifdef WITH_THREAD PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure(); #endif PyErr_Format(PyExc_ZeroDivisionError, "float division"); #ifdef WITH_THREAD PyGILState_Release(__pyx_gilstate_save); #endif {__pyx_filename = __pyx_f[0]; __pyx_lineno = 188; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_23 = __pyx_v_j; __pyx_t_3 = -1; if (__pyx_t_23 < 0) { __pyx_t_23 += __pyx_pybuffernd_argsorted.diminfo[0].shape; if (unlikely(__pyx_t_23 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_23 >= __pyx_pybuffernd_argsorted.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 188; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_24 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_argsorted.rcbuffer->pybuffer.buf, __pyx_t_23, __pyx_pybuffernd_argsorted.diminfo[0].strides)); __pyx_t_3 = -1; if (__pyx_t_24 < 0) { __pyx_t_24 += __pyx_pybuffernd_ranks.diminfo[0].shape; if (unlikely(__pyx_t_24 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_24 >= __pyx_pybuffernd_ranks.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 188; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_ranks.rcbuffer->pybuffer.buf, __pyx_t_24, __pyx_pybuffernd_ranks.diminfo[0].strides) = (__pyx_v_sum_ranks / __pyx_v_dups); } goto __pyx_L11; } /* "pandas/algos.pyx":189 * for j in range(i - dups + 1, i + 1): * ranks[argsorted[j]] = sum_ranks / dups * elif tiebreak == TIEBREAK_MIN: # <<<<<<<<<<<<<< * for j in range(i - dups + 1, i + 1): * ranks[argsorted[j]] = i - dups + 2 */ __pyx_t_20 = ((__pyx_v_tiebreak == __pyx_v_6pandas_5algos_TIEBREAK_MIN) != 0); if (__pyx_t_20) { /* "pandas/algos.pyx":190 * ranks[argsorted[j]] = sum_ranks / dups * elif tiebreak == TIEBREAK_MIN: * for j in range(i - dups + 1, i + 1): # <<<<<<<<<<<<<< * ranks[argsorted[j]] = i - dups + 2 * elif tiebreak == TIEBREAK_MAX: */ __pyx_t_21 = (__pyx_v_i + 1); for (__pyx_t_22 = ((__pyx_v_i - __pyx_v_dups) + 1); __pyx_t_22 < __pyx_t_21; __pyx_t_22+=1) { __pyx_v_j = __pyx_t_22; /* "pandas/algos.pyx":191 * elif tiebreak == TIEBREAK_MIN: * for j in range(i - dups + 1, i + 1): * ranks[argsorted[j]] = i - dups + 2 # <<<<<<<<<<<<<< * elif tiebreak == TIEBREAK_MAX: * for j in range(i - dups + 1, i + 1): */ __pyx_t_25 = __pyx_v_j; __pyx_t_3 = -1; if (__pyx_t_25 < 0) { __pyx_t_25 += __pyx_pybuffernd_argsorted.diminfo[0].shape; if (unlikely(__pyx_t_25 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_25 >= __pyx_pybuffernd_argsorted.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 191; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_26 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_argsorted.rcbuffer->pybuffer.buf, __pyx_t_25, __pyx_pybuffernd_argsorted.diminfo[0].strides)); __pyx_t_3 = -1; if (__pyx_t_26 < 0) { __pyx_t_26 += __pyx_pybuffernd_ranks.diminfo[0].shape; if (unlikely(__pyx_t_26 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_26 >= __pyx_pybuffernd_ranks.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 191; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_ranks.rcbuffer->pybuffer.buf, __pyx_t_26, __pyx_pybuffernd_ranks.diminfo[0].strides) = ((__pyx_v_i - __pyx_v_dups) + 2); } goto __pyx_L11; } /* "pandas/algos.pyx":192 * for j in range(i - dups + 1, i + 1): * ranks[argsorted[j]] = i - dups + 2 * elif tiebreak == TIEBREAK_MAX: # <<<<<<<<<<<<<< * for j in range(i - dups + 1, i + 1): * ranks[argsorted[j]] = i + 1 */ __pyx_t_20 = ((__pyx_v_tiebreak == __pyx_v_6pandas_5algos_TIEBREAK_MAX) != 0); if (__pyx_t_20) { /* "pandas/algos.pyx":193 * ranks[argsorted[j]] = i - dups + 2 * elif tiebreak == TIEBREAK_MAX: * for j in range(i - dups + 1, i + 1): # <<<<<<<<<<<<<< * ranks[argsorted[j]] = i + 1 * elif tiebreak == TIEBREAK_FIRST: */ __pyx_t_21 = (__pyx_v_i + 1); for (__pyx_t_22 = ((__pyx_v_i - __pyx_v_dups) + 1); __pyx_t_22 < __pyx_t_21; __pyx_t_22+=1) { __pyx_v_j = __pyx_t_22; /* "pandas/algos.pyx":194 * elif tiebreak == TIEBREAK_MAX: * for j in range(i - dups + 1, i + 1): * ranks[argsorted[j]] = i + 1 # <<<<<<<<<<<<<< * elif tiebreak == TIEBREAK_FIRST: * for j in range(i - dups + 1, i + 1): */ __pyx_t_27 = __pyx_v_j; __pyx_t_3 = -1; if (__pyx_t_27 < 0) { __pyx_t_27 += __pyx_pybuffernd_argsorted.diminfo[0].shape; if (unlikely(__pyx_t_27 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_27 >= __pyx_pybuffernd_argsorted.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 194; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_28 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_argsorted.rcbuffer->pybuffer.buf, __pyx_t_27, __pyx_pybuffernd_argsorted.diminfo[0].strides)); __pyx_t_3 = -1; if (__pyx_t_28 < 0) { __pyx_t_28 += __pyx_pybuffernd_ranks.diminfo[0].shape; if (unlikely(__pyx_t_28 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_28 >= __pyx_pybuffernd_ranks.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 194; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_ranks.rcbuffer->pybuffer.buf, __pyx_t_28, __pyx_pybuffernd_ranks.diminfo[0].strides) = (__pyx_v_i + 1); } goto __pyx_L11; } /* "pandas/algos.pyx":195 * for j in range(i - dups + 1, i + 1): * ranks[argsorted[j]] = i + 1 * elif tiebreak == TIEBREAK_FIRST: # <<<<<<<<<<<<<< * for j in range(i - dups + 1, i + 1): * ranks[argsorted[j]] = j + 1 */ __pyx_t_20 = ((__pyx_v_tiebreak == __pyx_v_6pandas_5algos_TIEBREAK_FIRST) != 0); if (__pyx_t_20) { /* "pandas/algos.pyx":196 * ranks[argsorted[j]] = i + 1 * elif tiebreak == TIEBREAK_FIRST: * for j in range(i - dups + 1, i + 1): # <<<<<<<<<<<<<< * ranks[argsorted[j]] = j + 1 * elif tiebreak == TIEBREAK_FIRST_DESCENDING: */ __pyx_t_21 = (__pyx_v_i + 1); for (__pyx_t_22 = ((__pyx_v_i - __pyx_v_dups) + 1); __pyx_t_22 < __pyx_t_21; __pyx_t_22+=1) { __pyx_v_j = __pyx_t_22; /* "pandas/algos.pyx":197 * elif tiebreak == TIEBREAK_FIRST: * for j in range(i - dups + 1, i + 1): * ranks[argsorted[j]] = j + 1 # <<<<<<<<<<<<<< * elif tiebreak == TIEBREAK_FIRST_DESCENDING: * for j in range(i - dups + 1, i + 1): */ __pyx_t_29 = __pyx_v_j; __pyx_t_3 = -1; if (__pyx_t_29 < 0) { __pyx_t_29 += __pyx_pybuffernd_argsorted.diminfo[0].shape; if (unlikely(__pyx_t_29 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_29 >= __pyx_pybuffernd_argsorted.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 197; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_30 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_argsorted.rcbuffer->pybuffer.buf, __pyx_t_29, __pyx_pybuffernd_argsorted.diminfo[0].strides)); __pyx_t_3 = -1; if (__pyx_t_30 < 0) { __pyx_t_30 += __pyx_pybuffernd_ranks.diminfo[0].shape; if (unlikely(__pyx_t_30 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_30 >= __pyx_pybuffernd_ranks.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 197; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_ranks.rcbuffer->pybuffer.buf, __pyx_t_30, __pyx_pybuffernd_ranks.diminfo[0].strides) = (__pyx_v_j + 1); } goto __pyx_L11; } /* "pandas/algos.pyx":198 * for j in range(i - dups + 1, i + 1): * ranks[argsorted[j]] = j + 1 * elif tiebreak == TIEBREAK_FIRST_DESCENDING: # <<<<<<<<<<<<<< * for j in range(i - dups + 1, i + 1): * ranks[argsorted[j]] = 2 * i - j - dups + 2 */ __pyx_t_20 = ((__pyx_v_tiebreak == __pyx_v_6pandas_5algos_TIEBREAK_FIRST_DESCENDING) != 0); if (__pyx_t_20) { /* "pandas/algos.pyx":199 * ranks[argsorted[j]] = j + 1 * elif tiebreak == TIEBREAK_FIRST_DESCENDING: * for j in range(i - dups + 1, i + 1): # <<<<<<<<<<<<<< * ranks[argsorted[j]] = 2 * i - j - dups + 2 * sum_ranks = dups = 0 */ __pyx_t_21 = (__pyx_v_i + 1); for (__pyx_t_22 = ((__pyx_v_i - __pyx_v_dups) + 1); __pyx_t_22 < __pyx_t_21; __pyx_t_22+=1) { __pyx_v_j = __pyx_t_22; /* "pandas/algos.pyx":200 * elif tiebreak == TIEBREAK_FIRST_DESCENDING: * for j in range(i - dups + 1, i + 1): * ranks[argsorted[j]] = 2 * i - j - dups + 2 # <<<<<<<<<<<<<< * sum_ranks = dups = 0 * return ranks */ __pyx_t_31 = __pyx_v_j; __pyx_t_3 = -1; if (__pyx_t_31 < 0) { __pyx_t_31 += __pyx_pybuffernd_argsorted.diminfo[0].shape; if (unlikely(__pyx_t_31 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_31 >= __pyx_pybuffernd_argsorted.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 200; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_32 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_argsorted.rcbuffer->pybuffer.buf, __pyx_t_31, __pyx_pybuffernd_argsorted.diminfo[0].strides)); __pyx_t_3 = -1; if (__pyx_t_32 < 0) { __pyx_t_32 += __pyx_pybuffernd_ranks.diminfo[0].shape; if (unlikely(__pyx_t_32 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_32 >= __pyx_pybuffernd_ranks.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 200; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_ranks.rcbuffer->pybuffer.buf, __pyx_t_32, __pyx_pybuffernd_ranks.diminfo[0].strides) = ((((2 * __pyx_v_i) - __pyx_v_j) - __pyx_v_dups) + 2); } goto __pyx_L11; } __pyx_L11:; /* "pandas/algos.pyx":201 * for j in range(i - dups + 1, i + 1): * ranks[argsorted[j]] = 2 * i - j - dups + 2 * sum_ranks = dups = 0 # <<<<<<<<<<<<<< * return ranks * */ __pyx_v_sum_ranks = 0; __pyx_v_dups = 0; goto __pyx_L10; } __pyx_L10:; __pyx_L7_continue:; } /* "pandas/algos.pyx":202 * ranks[argsorted[j]] = 2 * i - j - dups + 2 * sum_ranks = dups = 0 * return ranks # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_ranks)); __pyx_r = ((PyObject *)__pyx_v_ranks); goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_12); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_argsorted.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_ranks.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_sorted_data.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.rank_1d_float64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_argsorted.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_ranks.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_sorted_data.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_sorted_data); __Pyx_XDECREF((PyObject *)__pyx_v_ranks); __Pyx_XDECREF((PyObject *)__pyx_v_values); __Pyx_XDECREF((PyObject *)__pyx_v_argsorted); __Pyx_XDECREF(__pyx_v_mask); __Pyx_XDECREF(__pyx_v__as); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_3rank_1d_int64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6pandas_5algos_2rank_1d_int64[] = "\n Fast NaN-friendly version of scipy.stats.rankdata\n "; static PyMethodDef __pyx_mdef_6pandas_5algos_3rank_1d_int64 = {__Pyx_NAMESTR("rank_1d_int64"), (PyCFunction)__pyx_pw_6pandas_5algos_3rank_1d_int64, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_5algos_2rank_1d_int64)}; static PyObject *__pyx_pw_6pandas_5algos_3rank_1d_int64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_in_arr = 0; PyObject *__pyx_v_ties_method = 0; PyObject *__pyx_v_ascending = 0; CYTHON_UNUSED PyObject *__pyx_v_na_option = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("rank_1d_int64 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__in_arr,&__pyx_n_s__ties_method,&__pyx_n_s__ascending,&__pyx_n_s__na_option,0}; PyObject* values[4] = {0,0,0,0}; values[1] = ((PyObject *)__pyx_n_s__average); values[2] = __pyx_k_6; values[3] = ((PyObject *)__pyx_n_s__keep); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__in_arr)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__ties_method); if (value) { values[1] = value; kw_args--; } } case 2: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__ascending); if (value) { values[2] = value; kw_args--; } } case 3: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__na_option); if (value) { values[3] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "rank_1d_int64") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 205; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_in_arr = values[0]; __pyx_v_ties_method = values[1]; __pyx_v_ascending = values[2]; __pyx_v_na_option = values[3]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("rank_1d_int64", 0, 1, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 205; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.rank_1d_int64", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pandas_5algos_2rank_1d_int64(__pyx_self, __pyx_v_in_arr, __pyx_v_ties_method, __pyx_v_ascending, __pyx_v_na_option); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/algos.pyx":205 * * * def rank_1d_int64(object in_arr, ties_method='average', ascending=True, # <<<<<<<<<<<<<< * na_option='keep'): * """ */ static PyObject *__pyx_pf_6pandas_5algos_2rank_1d_int64(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_in_arr, PyObject *__pyx_v_ties_method, PyObject *__pyx_v_ascending, CYTHON_UNUSED PyObject *__pyx_v_na_option) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_n; Py_ssize_t __pyx_v_dups; PyArrayObject *__pyx_v_sorted_data = 0; PyArrayObject *__pyx_v_values = 0; PyArrayObject *__pyx_v_ranks = 0; PyArrayObject *__pyx_v_argsorted = 0; __pyx_t_5numpy_int64_t __pyx_v_val; __pyx_t_5numpy_float64_t __pyx_v_sum_ranks; int __pyx_v_tiebreak; PyObject *__pyx_v__as = NULL; __Pyx_LocalBuf_ND __pyx_pybuffernd_argsorted; __Pyx_Buffer __pyx_pybuffer_argsorted; __Pyx_LocalBuf_ND __pyx_pybuffernd_ranks; __Pyx_Buffer __pyx_pybuffer_ranks; __Pyx_LocalBuf_ND __pyx_pybuffernd_sorted_data; __Pyx_Buffer __pyx_pybuffer_sorted_data; __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; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; PyArrayObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; Py_ssize_t __pyx_t_9; PyObject *__pyx_t_10 = NULL; PyArrayObject *__pyx_t_11 = NULL; int __pyx_t_12; int __pyx_t_13; PyArrayObject *__pyx_t_14 = NULL; Py_ssize_t __pyx_t_15; Py_ssize_t __pyx_t_16; Py_ssize_t __pyx_t_17; int __pyx_t_18; Py_ssize_t __pyx_t_19; Py_ssize_t __pyx_t_20; Py_ssize_t __pyx_t_21; __pyx_t_5numpy_int64_t __pyx_t_22; Py_ssize_t __pyx_t_23; __pyx_t_5numpy_int64_t __pyx_t_24; Py_ssize_t __pyx_t_25; __pyx_t_5numpy_int64_t __pyx_t_26; Py_ssize_t __pyx_t_27; __pyx_t_5numpy_int64_t __pyx_t_28; Py_ssize_t __pyx_t_29; __pyx_t_5numpy_int64_t __pyx_t_30; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("rank_1d_int64", 0); __pyx_pybuffer_sorted_data.pybuffer.buf = NULL; __pyx_pybuffer_sorted_data.refcount = 0; __pyx_pybuffernd_sorted_data.data = NULL; __pyx_pybuffernd_sorted_data.rcbuffer = &__pyx_pybuffer_sorted_data; __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_ranks.pybuffer.buf = NULL; __pyx_pybuffer_ranks.refcount = 0; __pyx_pybuffernd_ranks.data = NULL; __pyx_pybuffernd_ranks.rcbuffer = &__pyx_pybuffer_ranks; __pyx_pybuffer_argsorted.pybuffer.buf = NULL; __pyx_pybuffer_argsorted.refcount = 0; __pyx_pybuffernd_argsorted.data = NULL; __pyx_pybuffernd_argsorted.rcbuffer = &__pyx_pybuffer_argsorted; /* "pandas/algos.pyx":212 * * cdef: * Py_ssize_t i, j, n, dups = 0 # <<<<<<<<<<<<<< * ndarray[int64_t] sorted_data, values * ndarray[float64_t] ranks */ __pyx_v_dups = 0; /* "pandas/algos.pyx":217 * ndarray[int64_t] argsorted * int64_t val * float64_t sum_ranks = 0 # <<<<<<<<<<<<<< * int tiebreak = 0 * tiebreak = tiebreakers[ties_method] */ __pyx_v_sum_ranks = 0.0; /* "pandas/algos.pyx":218 * int64_t val * float64_t sum_ranks = 0 * int tiebreak = 0 # <<<<<<<<<<<<<< * tiebreak = tiebreakers[ties_method] * */ __pyx_v_tiebreak = 0; /* "pandas/algos.pyx":219 * float64_t sum_ranks = 0 * int tiebreak = 0 * tiebreak = tiebreakers[ties_method] # <<<<<<<<<<<<<< * * values = np.asarray(in_arr) */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__tiebreakers); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 219; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyObject_GetItem(__pyx_t_1, __pyx_v_ties_method); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 219; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_3 = __Pyx_PyInt_AsInt(__pyx_t_2); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 219; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_tiebreak = __pyx_t_3; /* "pandas/algos.pyx":221 * tiebreak = tiebreakers[ties_method] * * values = np.asarray(in_arr) # <<<<<<<<<<<<<< * * n = len(values) */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 221; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__asarray); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 221; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 221; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_in_arr); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_in_arr); __Pyx_GIVEREF(__pyx_v_in_arr); __pyx_t_4 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 221; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 221; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_5 = ((PyArrayObject *)__pyx_t_4); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_t_3 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_values.rcbuffer->pybuffer, (PyObject*)__pyx_t_5, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_3 < 0)) { PyErr_Fetch(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_values.rcbuffer->pybuffer, (PyObject*)__pyx_v_values, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_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_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]; if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 221; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_5 = 0; __pyx_v_values = ((PyArrayObject *)__pyx_t_4); __pyx_t_4 = 0; /* "pandas/algos.pyx":223 * values = np.asarray(in_arr) * * n = len(values) # <<<<<<<<<<<<<< * ranks = np.empty(n, dtype='f8') * */ __pyx_t_9 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_9 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 223; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_9; /* "pandas/algos.pyx":224 * * n = len(values) * ranks = np.empty(n, dtype='f8') # <<<<<<<<<<<<<< * * # py2.5/win32 hack, can't pass i8 */ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 224; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s__empty); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 224; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyInt_FromSsize_t(__pyx_v_n); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 224; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 224; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyDict_New(); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 224; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_4)); if (PyDict_SetItem(__pyx_t_4, ((PyObject *)__pyx_n_s__dtype), ((PyObject *)__pyx_n_s__f8)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 224; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_10 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_1), ((PyObject *)__pyx_t_4)); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 224; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; if (!(likely(((__pyx_t_10) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_10, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 224; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_11 = ((PyArrayObject *)__pyx_t_10); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_ranks.rcbuffer->pybuffer); __pyx_t_3 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_ranks.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_3 < 0)) { PyErr_Fetch(&__pyx_t_8, &__pyx_t_7, &__pyx_t_6); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_ranks.rcbuffer->pybuffer, (PyObject*)__pyx_v_ranks, &__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_7); Py_XDECREF(__pyx_t_6); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_8, __pyx_t_7, __pyx_t_6); } } __pyx_pybuffernd_ranks.diminfo[0].strides = __pyx_pybuffernd_ranks.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_ranks.diminfo[0].shape = __pyx_pybuffernd_ranks.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 224; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_11 = 0; __pyx_v_ranks = ((PyArrayObject *)__pyx_t_10); __pyx_t_10 = 0; /* "pandas/algos.pyx":227 * * # py2.5/win32 hack, can't pass i8 * if tiebreak == TIEBREAK_FIRST: # <<<<<<<<<<<<<< * # need to use a stable sort here * _as = values.argsort(kind='mergesort') */ __pyx_t_12 = ((__pyx_v_tiebreak == __pyx_v_6pandas_5algos_TIEBREAK_FIRST) != 0); if (__pyx_t_12) { /* "pandas/algos.pyx":229 * if tiebreak == TIEBREAK_FIRST: * # need to use a stable sort here * _as = values.argsort(kind='mergesort') # <<<<<<<<<<<<<< * if not ascending: * tiebreak = TIEBREAK_FIRST_DESCENDING */ __pyx_t_10 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_values), __pyx_n_s__argsort); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 229; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __pyx_t_4 = PyDict_New(); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 229; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_4)); if (PyDict_SetItem(__pyx_t_4, ((PyObject *)__pyx_n_s__kind), ((PyObject *)__pyx_n_s__mergesort)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 229; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_1 = PyObject_Call(__pyx_t_10, ((PyObject *)__pyx_empty_tuple), ((PyObject *)__pyx_t_4)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 229; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __pyx_v__as = __pyx_t_1; __pyx_t_1 = 0; /* "pandas/algos.pyx":230 * # need to use a stable sort here * _as = values.argsort(kind='mergesort') * if not ascending: # <<<<<<<<<<<<<< * tiebreak = TIEBREAK_FIRST_DESCENDING * else: */ __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_v_ascending); if (unlikely(__pyx_t_12 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 230; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_13 = ((!__pyx_t_12) != 0); if (__pyx_t_13) { /* "pandas/algos.pyx":231 * _as = values.argsort(kind='mergesort') * if not ascending: * tiebreak = TIEBREAK_FIRST_DESCENDING # <<<<<<<<<<<<<< * else: * _as = values.argsort() */ __pyx_v_tiebreak = __pyx_v_6pandas_5algos_TIEBREAK_FIRST_DESCENDING; goto __pyx_L4; } __pyx_L4:; goto __pyx_L3; } /*else*/ { /* "pandas/algos.pyx":233 * tiebreak = TIEBREAK_FIRST_DESCENDING * else: * _as = values.argsort() # <<<<<<<<<<<<<< * * if not ascending: */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_values), __pyx_n_s__argsort); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 233; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 233; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v__as = __pyx_t_4; __pyx_t_4 = 0; } __pyx_L3:; /* "pandas/algos.pyx":235 * _as = values.argsort() * * if not ascending: # <<<<<<<<<<<<<< * _as = _as[::-1] * */ __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_v_ascending); if (unlikely(__pyx_t_13 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 235; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_12 = ((!__pyx_t_13) != 0); if (__pyx_t_12) { /* "pandas/algos.pyx":236 * * if not ascending: * _as = _as[::-1] # <<<<<<<<<<<<<< * * sorted_data = values.take(_as) */ __pyx_t_4 = PyObject_GetItem(__pyx_v__as, __pyx_k_slice_7); if (!__pyx_t_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 236; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF_SET(__pyx_v__as, __pyx_t_4); __pyx_t_4 = 0; goto __pyx_L5; } __pyx_L5:; /* "pandas/algos.pyx":238 * _as = _as[::-1] * * sorted_data = values.take(_as) # <<<<<<<<<<<<<< * argsorted = _as.astype('i8') * */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_values), __pyx_n_s__take); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 238; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 238; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v__as); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v__as); __Pyx_GIVEREF(__pyx_v__as); __pyx_t_10 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 238; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; if (!(likely(((__pyx_t_10) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_10, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 238; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_5 = ((PyArrayObject *)__pyx_t_10); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_sorted_data.rcbuffer->pybuffer); __pyx_t_3 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_sorted_data.rcbuffer->pybuffer, (PyObject*)__pyx_t_5, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_3 < 0)) { PyErr_Fetch(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_sorted_data.rcbuffer->pybuffer, (PyObject*)__pyx_v_sorted_data, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_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_pybuffernd_sorted_data.diminfo[0].strides = __pyx_pybuffernd_sorted_data.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_sorted_data.diminfo[0].shape = __pyx_pybuffernd_sorted_data.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 238; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_5 = 0; __pyx_v_sorted_data = ((PyArrayObject *)__pyx_t_10); __pyx_t_10 = 0; /* "pandas/algos.pyx":239 * * sorted_data = values.take(_as) * argsorted = _as.astype('i8') # <<<<<<<<<<<<<< * * for i in range(n): */ __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v__as, __pyx_n_s__astype); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 239; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __pyx_t_1 = PyObject_Call(__pyx_t_10, ((PyObject *)__pyx_k_tuple_8), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 239; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 239; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_14 = ((PyArrayObject *)__pyx_t_1); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_argsorted.rcbuffer->pybuffer); __pyx_t_3 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_argsorted.rcbuffer->pybuffer, (PyObject*)__pyx_t_14, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_3 < 0)) { PyErr_Fetch(&__pyx_t_8, &__pyx_t_7, &__pyx_t_6); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_argsorted.rcbuffer->pybuffer, (PyObject*)__pyx_v_argsorted, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_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_pybuffernd_argsorted.diminfo[0].strides = __pyx_pybuffernd_argsorted.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_argsorted.diminfo[0].shape = __pyx_pybuffernd_argsorted.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 239; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_14 = 0; __pyx_v_argsorted = ((PyArrayObject *)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/algos.pyx":241 * argsorted = _as.astype('i8') * * for i in range(n): # <<<<<<<<<<<<<< * sum_ranks += i + 1 * dups += 1 */ __pyx_t_9 = __pyx_v_n; for (__pyx_t_15 = 0; __pyx_t_15 < __pyx_t_9; __pyx_t_15+=1) { __pyx_v_i = __pyx_t_15; /* "pandas/algos.pyx":242 * * for i in range(n): * sum_ranks += i + 1 # <<<<<<<<<<<<<< * dups += 1 * val = sorted_data[i] */ __pyx_v_sum_ranks = (__pyx_v_sum_ranks + (__pyx_v_i + 1)); /* "pandas/algos.pyx":243 * for i in range(n): * sum_ranks += i + 1 * dups += 1 # <<<<<<<<<<<<<< * val = sorted_data[i] * if i == n - 1 or fabs(sorted_data[i + 1] - val) > 0: */ __pyx_v_dups = (__pyx_v_dups + 1); /* "pandas/algos.pyx":244 * sum_ranks += i + 1 * dups += 1 * val = sorted_data[i] # <<<<<<<<<<<<<< * if i == n - 1 or fabs(sorted_data[i + 1] - val) > 0: * if tiebreak == TIEBREAK_AVERAGE: */ __pyx_t_16 = __pyx_v_i; __pyx_t_3 = -1; if (__pyx_t_16 < 0) { __pyx_t_16 += __pyx_pybuffernd_sorted_data.diminfo[0].shape; if (unlikely(__pyx_t_16 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_16 >= __pyx_pybuffernd_sorted_data.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 244; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_val = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_sorted_data.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_sorted_data.diminfo[0].strides)); /* "pandas/algos.pyx":245 * dups += 1 * val = sorted_data[i] * if i == n - 1 or fabs(sorted_data[i + 1] - val) > 0: # <<<<<<<<<<<<<< * if tiebreak == TIEBREAK_AVERAGE: * for j in range(i - dups + 1, i + 1): */ __pyx_t_12 = ((__pyx_v_i == (__pyx_v_n - 1)) != 0); if (!__pyx_t_12) { __pyx_t_17 = (__pyx_v_i + 1); __pyx_t_3 = -1; if (__pyx_t_17 < 0) { __pyx_t_17 += __pyx_pybuffernd_sorted_data.diminfo[0].shape; if (unlikely(__pyx_t_17 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_17 >= __pyx_pybuffernd_sorted_data.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 245; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_13 = ((fabs(((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_sorted_data.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_sorted_data.diminfo[0].strides)) - __pyx_v_val)) > 0.0) != 0); __pyx_t_18 = __pyx_t_13; } else { __pyx_t_18 = __pyx_t_12; } if (__pyx_t_18) { /* "pandas/algos.pyx":246 * val = sorted_data[i] * if i == n - 1 or fabs(sorted_data[i + 1] - val) > 0: * if tiebreak == TIEBREAK_AVERAGE: # <<<<<<<<<<<<<< * for j in range(i - dups + 1, i + 1): * ranks[argsorted[j]] = sum_ranks / dups */ __pyx_t_18 = ((__pyx_v_tiebreak == __pyx_v_6pandas_5algos_TIEBREAK_AVERAGE) != 0); if (__pyx_t_18) { /* "pandas/algos.pyx":247 * if i == n - 1 or fabs(sorted_data[i + 1] - val) > 0: * if tiebreak == TIEBREAK_AVERAGE: * for j in range(i - dups + 1, i + 1): # <<<<<<<<<<<<<< * ranks[argsorted[j]] = sum_ranks / dups * elif tiebreak == TIEBREAK_MIN: */ __pyx_t_19 = (__pyx_v_i + 1); for (__pyx_t_20 = ((__pyx_v_i - __pyx_v_dups) + 1); __pyx_t_20 < __pyx_t_19; __pyx_t_20+=1) { __pyx_v_j = __pyx_t_20; /* "pandas/algos.pyx":248 * if tiebreak == TIEBREAK_AVERAGE: * for j in range(i - dups + 1, i + 1): * ranks[argsorted[j]] = sum_ranks / dups # <<<<<<<<<<<<<< * elif tiebreak == TIEBREAK_MIN: * for j in range(i - dups + 1, i + 1): */ if (unlikely(__pyx_v_dups == 0)) { #ifdef WITH_THREAD PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure(); #endif PyErr_Format(PyExc_ZeroDivisionError, "float division"); #ifdef WITH_THREAD PyGILState_Release(__pyx_gilstate_save); #endif {__pyx_filename = __pyx_f[0]; __pyx_lineno = 248; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_21 = __pyx_v_j; __pyx_t_3 = -1; if (__pyx_t_21 < 0) { __pyx_t_21 += __pyx_pybuffernd_argsorted.diminfo[0].shape; if (unlikely(__pyx_t_21 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_21 >= __pyx_pybuffernd_argsorted.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 248; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_22 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_argsorted.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_argsorted.diminfo[0].strides)); __pyx_t_3 = -1; if (__pyx_t_22 < 0) { __pyx_t_22 += __pyx_pybuffernd_ranks.diminfo[0].shape; if (unlikely(__pyx_t_22 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_22 >= __pyx_pybuffernd_ranks.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 248; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_ranks.rcbuffer->pybuffer.buf, __pyx_t_22, __pyx_pybuffernd_ranks.diminfo[0].strides) = (__pyx_v_sum_ranks / __pyx_v_dups); } goto __pyx_L9; } /* "pandas/algos.pyx":249 * for j in range(i - dups + 1, i + 1): * ranks[argsorted[j]] = sum_ranks / dups * elif tiebreak == TIEBREAK_MIN: # <<<<<<<<<<<<<< * for j in range(i - dups + 1, i + 1): * ranks[argsorted[j]] = i - dups + 2 */ __pyx_t_18 = ((__pyx_v_tiebreak == __pyx_v_6pandas_5algos_TIEBREAK_MIN) != 0); if (__pyx_t_18) { /* "pandas/algos.pyx":250 * ranks[argsorted[j]] = sum_ranks / dups * elif tiebreak == TIEBREAK_MIN: * for j in range(i - dups + 1, i + 1): # <<<<<<<<<<<<<< * ranks[argsorted[j]] = i - dups + 2 * elif tiebreak == TIEBREAK_MAX: */ __pyx_t_19 = (__pyx_v_i + 1); for (__pyx_t_20 = ((__pyx_v_i - __pyx_v_dups) + 1); __pyx_t_20 < __pyx_t_19; __pyx_t_20+=1) { __pyx_v_j = __pyx_t_20; /* "pandas/algos.pyx":251 * elif tiebreak == TIEBREAK_MIN: * for j in range(i - dups + 1, i + 1): * ranks[argsorted[j]] = i - dups + 2 # <<<<<<<<<<<<<< * elif tiebreak == TIEBREAK_MAX: * for j in range(i - dups + 1, i + 1): */ __pyx_t_23 = __pyx_v_j; __pyx_t_3 = -1; if (__pyx_t_23 < 0) { __pyx_t_23 += __pyx_pybuffernd_argsorted.diminfo[0].shape; if (unlikely(__pyx_t_23 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_23 >= __pyx_pybuffernd_argsorted.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 251; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_24 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_argsorted.rcbuffer->pybuffer.buf, __pyx_t_23, __pyx_pybuffernd_argsorted.diminfo[0].strides)); __pyx_t_3 = -1; if (__pyx_t_24 < 0) { __pyx_t_24 += __pyx_pybuffernd_ranks.diminfo[0].shape; if (unlikely(__pyx_t_24 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_24 >= __pyx_pybuffernd_ranks.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 251; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_ranks.rcbuffer->pybuffer.buf, __pyx_t_24, __pyx_pybuffernd_ranks.diminfo[0].strides) = ((__pyx_v_i - __pyx_v_dups) + 2); } goto __pyx_L9; } /* "pandas/algos.pyx":252 * for j in range(i - dups + 1, i + 1): * ranks[argsorted[j]] = i - dups + 2 * elif tiebreak == TIEBREAK_MAX: # <<<<<<<<<<<<<< * for j in range(i - dups + 1, i + 1): * ranks[argsorted[j]] = i + 1 */ __pyx_t_18 = ((__pyx_v_tiebreak == __pyx_v_6pandas_5algos_TIEBREAK_MAX) != 0); if (__pyx_t_18) { /* "pandas/algos.pyx":253 * ranks[argsorted[j]] = i - dups + 2 * elif tiebreak == TIEBREAK_MAX: * for j in range(i - dups + 1, i + 1): # <<<<<<<<<<<<<< * ranks[argsorted[j]] = i + 1 * elif tiebreak == TIEBREAK_FIRST: */ __pyx_t_19 = (__pyx_v_i + 1); for (__pyx_t_20 = ((__pyx_v_i - __pyx_v_dups) + 1); __pyx_t_20 < __pyx_t_19; __pyx_t_20+=1) { __pyx_v_j = __pyx_t_20; /* "pandas/algos.pyx":254 * elif tiebreak == TIEBREAK_MAX: * for j in range(i - dups + 1, i + 1): * ranks[argsorted[j]] = i + 1 # <<<<<<<<<<<<<< * elif tiebreak == TIEBREAK_FIRST: * for j in range(i - dups + 1, i + 1): */ __pyx_t_25 = __pyx_v_j; __pyx_t_3 = -1; if (__pyx_t_25 < 0) { __pyx_t_25 += __pyx_pybuffernd_argsorted.diminfo[0].shape; if (unlikely(__pyx_t_25 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_25 >= __pyx_pybuffernd_argsorted.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 254; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_26 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_argsorted.rcbuffer->pybuffer.buf, __pyx_t_25, __pyx_pybuffernd_argsorted.diminfo[0].strides)); __pyx_t_3 = -1; if (__pyx_t_26 < 0) { __pyx_t_26 += __pyx_pybuffernd_ranks.diminfo[0].shape; if (unlikely(__pyx_t_26 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_26 >= __pyx_pybuffernd_ranks.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 254; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_ranks.rcbuffer->pybuffer.buf, __pyx_t_26, __pyx_pybuffernd_ranks.diminfo[0].strides) = (__pyx_v_i + 1); } goto __pyx_L9; } /* "pandas/algos.pyx":255 * for j in range(i - dups + 1, i + 1): * ranks[argsorted[j]] = i + 1 * elif tiebreak == TIEBREAK_FIRST: # <<<<<<<<<<<<<< * for j in range(i - dups + 1, i + 1): * ranks[argsorted[j]] = j + 1 */ __pyx_t_18 = ((__pyx_v_tiebreak == __pyx_v_6pandas_5algos_TIEBREAK_FIRST) != 0); if (__pyx_t_18) { /* "pandas/algos.pyx":256 * ranks[argsorted[j]] = i + 1 * elif tiebreak == TIEBREAK_FIRST: * for j in range(i - dups + 1, i + 1): # <<<<<<<<<<<<<< * ranks[argsorted[j]] = j + 1 * elif tiebreak == TIEBREAK_FIRST_DESCENDING: */ __pyx_t_19 = (__pyx_v_i + 1); for (__pyx_t_20 = ((__pyx_v_i - __pyx_v_dups) + 1); __pyx_t_20 < __pyx_t_19; __pyx_t_20+=1) { __pyx_v_j = __pyx_t_20; /* "pandas/algos.pyx":257 * elif tiebreak == TIEBREAK_FIRST: * for j in range(i - dups + 1, i + 1): * ranks[argsorted[j]] = j + 1 # <<<<<<<<<<<<<< * elif tiebreak == TIEBREAK_FIRST_DESCENDING: * for j in range(i - dups + 1, i + 1): */ __pyx_t_27 = __pyx_v_j; __pyx_t_3 = -1; if (__pyx_t_27 < 0) { __pyx_t_27 += __pyx_pybuffernd_argsorted.diminfo[0].shape; if (unlikely(__pyx_t_27 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_27 >= __pyx_pybuffernd_argsorted.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 257; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_28 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_argsorted.rcbuffer->pybuffer.buf, __pyx_t_27, __pyx_pybuffernd_argsorted.diminfo[0].strides)); __pyx_t_3 = -1; if (__pyx_t_28 < 0) { __pyx_t_28 += __pyx_pybuffernd_ranks.diminfo[0].shape; if (unlikely(__pyx_t_28 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_28 >= __pyx_pybuffernd_ranks.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 257; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_ranks.rcbuffer->pybuffer.buf, __pyx_t_28, __pyx_pybuffernd_ranks.diminfo[0].strides) = (__pyx_v_j + 1); } goto __pyx_L9; } /* "pandas/algos.pyx":258 * for j in range(i - dups + 1, i + 1): * ranks[argsorted[j]] = j + 1 * elif tiebreak == TIEBREAK_FIRST_DESCENDING: # <<<<<<<<<<<<<< * for j in range(i - dups + 1, i + 1): * ranks[argsorted[j]] = 2 * i - j - dups + 2 */ __pyx_t_18 = ((__pyx_v_tiebreak == __pyx_v_6pandas_5algos_TIEBREAK_FIRST_DESCENDING) != 0); if (__pyx_t_18) { /* "pandas/algos.pyx":259 * ranks[argsorted[j]] = j + 1 * elif tiebreak == TIEBREAK_FIRST_DESCENDING: * for j in range(i - dups + 1, i + 1): # <<<<<<<<<<<<<< * ranks[argsorted[j]] = 2 * i - j - dups + 2 * sum_ranks = dups = 0 */ __pyx_t_19 = (__pyx_v_i + 1); for (__pyx_t_20 = ((__pyx_v_i - __pyx_v_dups) + 1); __pyx_t_20 < __pyx_t_19; __pyx_t_20+=1) { __pyx_v_j = __pyx_t_20; /* "pandas/algos.pyx":260 * elif tiebreak == TIEBREAK_FIRST_DESCENDING: * for j in range(i - dups + 1, i + 1): * ranks[argsorted[j]] = 2 * i - j - dups + 2 # <<<<<<<<<<<<<< * sum_ranks = dups = 0 * return ranks */ __pyx_t_29 = __pyx_v_j; __pyx_t_3 = -1; if (__pyx_t_29 < 0) { __pyx_t_29 += __pyx_pybuffernd_argsorted.diminfo[0].shape; if (unlikely(__pyx_t_29 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_29 >= __pyx_pybuffernd_argsorted.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 260; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_30 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_argsorted.rcbuffer->pybuffer.buf, __pyx_t_29, __pyx_pybuffernd_argsorted.diminfo[0].strides)); __pyx_t_3 = -1; if (__pyx_t_30 < 0) { __pyx_t_30 += __pyx_pybuffernd_ranks.diminfo[0].shape; if (unlikely(__pyx_t_30 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_30 >= __pyx_pybuffernd_ranks.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 260; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_ranks.rcbuffer->pybuffer.buf, __pyx_t_30, __pyx_pybuffernd_ranks.diminfo[0].strides) = ((((2 * __pyx_v_i) - __pyx_v_j) - __pyx_v_dups) + 2); } goto __pyx_L9; } __pyx_L9:; /* "pandas/algos.pyx":261 * for j in range(i - dups + 1, i + 1): * ranks[argsorted[j]] = 2 * i - j - dups + 2 * sum_ranks = dups = 0 # <<<<<<<<<<<<<< * return ranks * */ __pyx_v_sum_ranks = 0; __pyx_v_dups = 0; goto __pyx_L8; } __pyx_L8:; } /* "pandas/algos.pyx":262 * ranks[argsorted[j]] = 2 * i - j - dups + 2 * sum_ranks = dups = 0 * return ranks # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_ranks)); __pyx_r = ((PyObject *)__pyx_v_ranks); goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_10); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_argsorted.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_ranks.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_sorted_data.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.rank_1d_int64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_argsorted.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_ranks.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_sorted_data.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_sorted_data); __Pyx_XDECREF((PyObject *)__pyx_v_values); __Pyx_XDECREF((PyObject *)__pyx_v_ranks); __Pyx_XDECREF((PyObject *)__pyx_v_argsorted); __Pyx_XDECREF(__pyx_v__as); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_5rank_2d_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6pandas_5algos_4rank_2d_float64[] = "\n Fast NaN-friendly version of scipy.stats.rankdata\n "; static PyMethodDef __pyx_mdef_6pandas_5algos_5rank_2d_float64 = {__Pyx_NAMESTR("rank_2d_float64"), (PyCFunction)__pyx_pw_6pandas_5algos_5rank_2d_float64, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_5algos_4rank_2d_float64)}; static PyObject *__pyx_pw_6pandas_5algos_5rank_2d_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_in_arr = 0; PyObject *__pyx_v_axis = 0; PyObject *__pyx_v_ties_method = 0; PyObject *__pyx_v_ascending = 0; PyObject *__pyx_v_na_option = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("rank_2d_float64 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__in_arr,&__pyx_n_s__axis,&__pyx_n_s__ties_method,&__pyx_n_s__ascending,&__pyx_n_s__na_option,0}; PyObject* values[5] = {0,0,0,0,0}; values[1] = ((PyObject *)__pyx_int_0); values[2] = ((PyObject *)__pyx_n_s__average); values[3] = __pyx_k_9; values[4] = ((PyObject *)__pyx_n_s__keep); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__in_arr)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__axis); if (value) { values[1] = value; kw_args--; } } case 2: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__ties_method); if (value) { values[2] = value; kw_args--; } } case 3: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__ascending); if (value) { values[3] = value; kw_args--; } } case 4: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__na_option); if (value) { values[4] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "rank_2d_float64") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 265; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_in_arr = values[0]; __pyx_v_axis = values[1]; __pyx_v_ties_method = values[2]; __pyx_v_ascending = values[3]; __pyx_v_na_option = values[4]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("rank_2d_float64", 0, 1, 5, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 265; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.rank_2d_float64", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pandas_5algos_4rank_2d_float64(__pyx_self, __pyx_v_in_arr, __pyx_v_axis, __pyx_v_ties_method, __pyx_v_ascending, __pyx_v_na_option); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/algos.pyx":265 * * * def rank_2d_float64(object in_arr, axis=0, ties_method='average', # <<<<<<<<<<<<<< * ascending=True, na_option='keep'): * """ */ static PyObject *__pyx_pf_6pandas_5algos_4rank_2d_float64(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_in_arr, PyObject *__pyx_v_axis, PyObject *__pyx_v_ties_method, PyObject *__pyx_v_ascending, PyObject *__pyx_v_na_option) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_z; Py_ssize_t __pyx_v_k; Py_ssize_t __pyx_v_n; Py_ssize_t __pyx_v_dups; PyArrayObject *__pyx_v_ranks = 0; PyArrayObject *__pyx_v_values = 0; PyArrayObject *__pyx_v_argsorted = 0; __pyx_t_5numpy_float64_t __pyx_v_val; __pyx_t_5numpy_float64_t __pyx_v_nan_value; __pyx_t_5numpy_float64_t __pyx_v_sum_ranks; int __pyx_v_tiebreak; int __pyx_v_keep_na; PyObject *__pyx_v__as = NULL; __Pyx_LocalBuf_ND __pyx_pybuffernd_argsorted; __Pyx_Buffer __pyx_pybuffer_argsorted; __Pyx_LocalBuf_ND __pyx_pybuffernd_ranks; __Pyx_Buffer __pyx_pybuffer_ranks; __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; int __pyx_t_3; int __pyx_t_4; PyObject *__pyx_t_5 = NULL; PyArrayObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; __pyx_t_5numpy_float64_t __pyx_t_10; PyObject *__pyx_t_11 = NULL; PyObject *(*__pyx_t_12)(PyObject *); Py_ssize_t __pyx_t_13; Py_ssize_t __pyx_t_14; int __pyx_t_15; PyArrayObject *__pyx_t_16 = NULL; 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_t_5numpy_int64_t __pyx_t_24; Py_ssize_t __pyx_t_25; Py_ssize_t __pyx_t_26; int __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; __pyx_t_5numpy_int64_t __pyx_t_33; Py_ssize_t __pyx_t_34; Py_ssize_t __pyx_t_35; Py_ssize_t __pyx_t_36; __pyx_t_5numpy_int64_t __pyx_t_37; Py_ssize_t __pyx_t_38; Py_ssize_t __pyx_t_39; Py_ssize_t __pyx_t_40; __pyx_t_5numpy_int64_t __pyx_t_41; Py_ssize_t __pyx_t_42; Py_ssize_t __pyx_t_43; Py_ssize_t __pyx_t_44; __pyx_t_5numpy_int64_t __pyx_t_45; Py_ssize_t __pyx_t_46; Py_ssize_t __pyx_t_47; Py_ssize_t __pyx_t_48; __pyx_t_5numpy_int64_t __pyx_t_49; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("rank_2d_float64", 0); __Pyx_INCREF(__pyx_v_in_arr); __pyx_pybuffer_ranks.pybuffer.buf = NULL; __pyx_pybuffer_ranks.refcount = 0; __pyx_pybuffernd_ranks.data = NULL; __pyx_pybuffernd_ranks.rcbuffer = &__pyx_pybuffer_ranks; __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_argsorted.pybuffer.buf = NULL; __pyx_pybuffer_argsorted.refcount = 0; __pyx_pybuffernd_argsorted.data = NULL; __pyx_pybuffernd_argsorted.rcbuffer = &__pyx_pybuffer_argsorted; /* "pandas/algos.pyx":272 * * cdef: * Py_ssize_t i, j, z, k, n, dups = 0 # <<<<<<<<<<<<<< * ndarray[float64_t, ndim=2] ranks, values * ndarray[int64_t, ndim=2] argsorted */ __pyx_v_dups = 0; /* "pandas/algos.pyx":276 * ndarray[int64_t, ndim=2] argsorted * float64_t val, nan_value * float64_t sum_ranks = 0 # <<<<<<<<<<<<<< * int tiebreak = 0 * bint keep_na = 0 */ __pyx_v_sum_ranks = 0.0; /* "pandas/algos.pyx":277 * float64_t val, nan_value * float64_t sum_ranks = 0 * int tiebreak = 0 # <<<<<<<<<<<<<< * bint keep_na = 0 * */ __pyx_v_tiebreak = 0; /* "pandas/algos.pyx":278 * float64_t sum_ranks = 0 * int tiebreak = 0 * bint keep_na = 0 # <<<<<<<<<<<<<< * * tiebreak = tiebreakers[ties_method] */ __pyx_v_keep_na = 0; /* "pandas/algos.pyx":280 * bint keep_na = 0 * * tiebreak = tiebreakers[ties_method] # <<<<<<<<<<<<<< * * keep_na = na_option == 'keep' */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__tiebreakers); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 280; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyObject_GetItem(__pyx_t_1, __pyx_v_ties_method); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 280; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_3 = __Pyx_PyInt_AsInt(__pyx_t_2); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 280; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_tiebreak = __pyx_t_3; /* "pandas/algos.pyx":282 * tiebreak = tiebreakers[ties_method] * * keep_na = na_option == 'keep' # <<<<<<<<<<<<<< * * in_arr = np.asarray(in_arr) */ __pyx_t_2 = PyObject_RichCompare(__pyx_v_na_option, ((PyObject *)__pyx_n_s__keep), Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 282; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 282; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_keep_na = __pyx_t_4; /* "pandas/algos.pyx":284 * keep_na = na_option == 'keep' * * in_arr = np.asarray(in_arr) # <<<<<<<<<<<<<< * * if axis == 0: */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 284; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__asarray); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 284; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 284; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_in_arr); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_in_arr); __Pyx_GIVEREF(__pyx_v_in_arr); __pyx_t_5 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 284; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __Pyx_DECREF_SET(__pyx_v_in_arr, __pyx_t_5); __pyx_t_5 = 0; /* "pandas/algos.pyx":286 * in_arr = np.asarray(in_arr) * * if axis == 0: # <<<<<<<<<<<<<< * values = in_arr.T.copy() * else: */ __pyx_t_5 = PyObject_RichCompare(__pyx_v_axis, __pyx_int_0, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 286; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 286; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_4) { /* "pandas/algos.pyx":287 * * if axis == 0: * values = in_arr.T.copy() # <<<<<<<<<<<<<< * else: * values = in_arr.copy() */ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_in_arr, __pyx_n_s__T); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 287; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s__copy); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 287; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 287; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 287; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_6 = ((PyArrayObject *)__pyx_t_5); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_t_3 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_values.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack); if (unlikely(__pyx_t_3 < 0)) { PyErr_Fetch(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9); 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, 2, 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_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_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1]; if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 287; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_6 = 0; __pyx_v_values = ((PyArrayObject *)__pyx_t_5); __pyx_t_5 = 0; goto __pyx_L3; } /*else*/ { /* "pandas/algos.pyx":289 * values = in_arr.T.copy() * else: * values = in_arr.copy() # <<<<<<<<<<<<<< * * if ascending ^ (na_option == 'top'): */ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_in_arr, __pyx_n_s__copy); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 289; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_2 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 289; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 289; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_6 = ((PyArrayObject *)__pyx_t_2); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_t_3 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_values.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack); if (unlikely(__pyx_t_3 < 0)) { PyErr_Fetch(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7); 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, 2, 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_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_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1]; if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 289; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_6 = 0; __pyx_v_values = ((PyArrayObject *)__pyx_t_2); __pyx_t_2 = 0; } __pyx_L3:; /* "pandas/algos.pyx":291 * values = in_arr.copy() * * if ascending ^ (na_option == 'top'): # <<<<<<<<<<<<<< * nan_value = np.inf * else: */ __pyx_t_2 = PyObject_RichCompare(__pyx_v_na_option, ((PyObject *)__pyx_n_s__top), Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 291; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_5 = PyNumber_Xor(__pyx_v_ascending, __pyx_t_2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 291; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 291; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_4) { /* "pandas/algos.pyx":292 * * if ascending ^ (na_option == 'top'): * nan_value = np.inf # <<<<<<<<<<<<<< * else: * nan_value = -np.inf */ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 292; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s__inf); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 292; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_10 = __pyx_PyFloat_AsDouble(__pyx_t_2); if (unlikely((__pyx_t_10 == (npy_float64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 292; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_nan_value = __pyx_t_10; goto __pyx_L4; } /*else*/ { /* "pandas/algos.pyx":294 * nan_value = np.inf * else: * nan_value = -np.inf # <<<<<<<<<<<<<< * * np.putmask(values, np.isnan(values), nan_value) */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 294; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__inf); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 294; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyNumber_Negative(__pyx_t_5); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 294; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_10 = __pyx_PyFloat_AsDouble(__pyx_t_2); if (unlikely((__pyx_t_10 == (npy_float64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 294; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_nan_value = __pyx_t_10; } __pyx_L4:; /* "pandas/algos.pyx":296 * nan_value = -np.inf * * np.putmask(values, np.isnan(values), nan_value) # <<<<<<<<<<<<<< * * n, k = ( values).shape */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 296; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__putmask); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 296; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 296; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__isnan); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 296; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 296; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(((PyObject *)__pyx_v_values)); PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_values)); __Pyx_GIVEREF(((PyObject *)__pyx_v_values)); __pyx_t_11 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 296; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __pyx_t_2 = PyFloat_FromDouble(__pyx_v_nan_value); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 296; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 296; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)__pyx_v_values)); PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_values)); __Pyx_GIVEREF(((PyObject *)__pyx_v_values)); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_11); __Pyx_GIVEREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_11 = 0; __pyx_t_2 = 0; __pyx_t_2 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 296; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/algos.pyx":298 * np.putmask(values, np.isnan(values), nan_value) * * n, k = ( values).shape # <<<<<<<<<<<<<< * ranks = np.empty((n, k), dtype='f8') * */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_values), __pyx_n_s__shape); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 298; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if ((likely(PyTuple_CheckExact(__pyx_t_2))) || (PyList_CheckExact(__pyx_t_2))) { PyObject* sequence = __pyx_t_2; #if CYTHON_COMPILING_IN_CPYTHON Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 298; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_1 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_5 = PyTuple_GET_ITEM(sequence, 1); } else { __pyx_t_1 = PyList_GET_ITEM(sequence, 0); __pyx_t_5 = PyList_GET_ITEM(sequence, 1); } __Pyx_INCREF(__pyx_t_1); __Pyx_INCREF(__pyx_t_5); #else __pyx_t_1 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 298; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_5 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 298; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); #endif __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } else { Py_ssize_t index = -1; __pyx_t_11 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 298; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_12 = Py_TYPE(__pyx_t_11)->tp_iternext; index = 0; __pyx_t_1 = __pyx_t_12(__pyx_t_11); if (unlikely(!__pyx_t_1)) goto __pyx_L5_unpacking_failed; __Pyx_GOTREF(__pyx_t_1); index = 1; __pyx_t_5 = __pyx_t_12(__pyx_t_11); if (unlikely(!__pyx_t_5)) goto __pyx_L5_unpacking_failed; __Pyx_GOTREF(__pyx_t_5); if (__Pyx_IternextUnpackEndCheck(__pyx_t_12(__pyx_t_11), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 298; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_12 = NULL; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; goto __pyx_L6_unpacking_done; __pyx_L5_unpacking_failed:; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __pyx_t_12 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 298; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_L6_unpacking_done:; } __pyx_t_13 = __Pyx_PyIndex_AsSsize_t(__pyx_t_1); if (unlikely((__pyx_t_13 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 298; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_14 = __Pyx_PyIndex_AsSsize_t(__pyx_t_5); if (unlikely((__pyx_t_14 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 298; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_v_n = __pyx_t_13; __pyx_v_k = __pyx_t_14; /* "pandas/algos.pyx":299 * * n, k = ( values).shape * ranks = np.empty((n, k), dtype='f8') # <<<<<<<<<<<<<< * * if tiebreak == TIEBREAK_FIRST: */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 299; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__empty); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 299; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_n); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 299; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_k); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 299; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_11 = PyTuple_New(2); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 299; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_11, 1, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_2 = 0; __pyx_t_1 = 0; __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 299; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_t_11)); __Pyx_GIVEREF(((PyObject *)__pyx_t_11)); __pyx_t_11 = 0; __pyx_t_11 = PyDict_New(); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 299; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_11)); if (PyDict_SetItem(__pyx_t_11, ((PyObject *)__pyx_n_s__dtype), ((PyObject *)__pyx_n_s__f8)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 299; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_2 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_1), ((PyObject *)__pyx_t_11)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 299; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_11)); __pyx_t_11 = 0; if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 299; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_6 = ((PyArrayObject *)__pyx_t_2); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_ranks.rcbuffer->pybuffer); __pyx_t_3 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_ranks.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack); if (unlikely(__pyx_t_3 < 0)) { PyErr_Fetch(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_ranks.rcbuffer->pybuffer, (PyObject*)__pyx_v_ranks, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_pybuffernd_ranks.diminfo[0].strides = __pyx_pybuffernd_ranks.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_ranks.diminfo[0].shape = __pyx_pybuffernd_ranks.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_ranks.diminfo[1].strides = __pyx_pybuffernd_ranks.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_ranks.diminfo[1].shape = __pyx_pybuffernd_ranks.rcbuffer->pybuffer.shape[1]; if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 299; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_6 = 0; __pyx_v_ranks = ((PyArrayObject *)__pyx_t_2); __pyx_t_2 = 0; /* "pandas/algos.pyx":301 * ranks = np.empty((n, k), dtype='f8') * * if tiebreak == TIEBREAK_FIRST: # <<<<<<<<<<<<<< * # need to use a stable sort here * _as = values.argsort(axis=1, kind='mergesort') */ __pyx_t_4 = ((__pyx_v_tiebreak == __pyx_v_6pandas_5algos_TIEBREAK_FIRST) != 0); if (__pyx_t_4) { /* "pandas/algos.pyx":303 * if tiebreak == TIEBREAK_FIRST: * # need to use a stable sort here * _as = values.argsort(axis=1, kind='mergesort') # <<<<<<<<<<<<<< * if not ascending: * tiebreak = TIEBREAK_FIRST_DESCENDING */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_values), __pyx_n_s__argsort); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 303; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_11 = PyDict_New(); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 303; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_11)); if (PyDict_SetItem(__pyx_t_11, ((PyObject *)__pyx_n_s__axis), __pyx_int_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 303; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (PyDict_SetItem(__pyx_t_11, ((PyObject *)__pyx_n_s__kind), ((PyObject *)__pyx_n_s__mergesort)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 303; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_1 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_empty_tuple), ((PyObject *)__pyx_t_11)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 303; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_11)); __pyx_t_11 = 0; __pyx_v__as = __pyx_t_1; __pyx_t_1 = 0; /* "pandas/algos.pyx":304 * # need to use a stable sort here * _as = values.argsort(axis=1, kind='mergesort') * if not ascending: # <<<<<<<<<<<<<< * tiebreak = TIEBREAK_FIRST_DESCENDING * else: */ __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_ascending); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 304; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_15 = ((!__pyx_t_4) != 0); if (__pyx_t_15) { /* "pandas/algos.pyx":305 * _as = values.argsort(axis=1, kind='mergesort') * if not ascending: * tiebreak = TIEBREAK_FIRST_DESCENDING # <<<<<<<<<<<<<< * else: * _as = values.argsort(1) */ __pyx_v_tiebreak = __pyx_v_6pandas_5algos_TIEBREAK_FIRST_DESCENDING; goto __pyx_L8; } __pyx_L8:; goto __pyx_L7; } /*else*/ { /* "pandas/algos.pyx":307 * tiebreak = TIEBREAK_FIRST_DESCENDING * else: * _as = values.argsort(1) # <<<<<<<<<<<<<< * * if not ascending: */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_values), __pyx_n_s__argsort); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 307; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_11 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_k_tuple_10), NULL); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 307; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v__as = __pyx_t_11; __pyx_t_11 = 0; } __pyx_L7:; /* "pandas/algos.pyx":309 * _as = values.argsort(1) * * if not ascending: # <<<<<<<<<<<<<< * _as = _as[:, ::-1] * */ __pyx_t_15 = __Pyx_PyObject_IsTrue(__pyx_v_ascending); if (unlikely(__pyx_t_15 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 309; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_4 = ((!__pyx_t_15) != 0); if (__pyx_t_4) { /* "pandas/algos.pyx":310 * * if not ascending: * _as = _as[:, ::-1] # <<<<<<<<<<<<<< * * values = _take_2d_float64(values, _as) */ __pyx_t_11 = PyObject_GetItem(__pyx_v__as, ((PyObject *)__pyx_k_tuple_13)); if (!__pyx_t_11) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 310; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF_SET(__pyx_v__as, __pyx_t_11); __pyx_t_11 = 0; goto __pyx_L9; } __pyx_L9:; /* "pandas/algos.pyx":312 * _as = _as[:, ::-1] * * values = _take_2d_float64(values, _as) # <<<<<<<<<<<<<< * argsorted = _as.astype('i8') * */ __pyx_t_11 = __pyx_f_6pandas_5algos__take_2d_float64(((PyArrayObject *)__pyx_v_values), __pyx_v__as); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 312; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); if (!(likely(((__pyx_t_11) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_11, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 312; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_6 = ((PyArrayObject *)__pyx_t_11); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_t_3 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_values.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack); if (unlikely(__pyx_t_3 < 0)) { PyErr_Fetch(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7); 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, 2, 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_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_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1]; if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 312; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_6 = 0; __Pyx_DECREF_SET(__pyx_v_values, ((PyArrayObject *)__pyx_t_11)); __pyx_t_11 = 0; /* "pandas/algos.pyx":313 * * values = _take_2d_float64(values, _as) * argsorted = _as.astype('i8') # <<<<<<<<<<<<<< * * for i in range(n): */ __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v__as, __pyx_n_s__astype); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 313; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __pyx_t_1 = PyObject_Call(__pyx_t_11, ((PyObject *)__pyx_k_tuple_14), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 313; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 313; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_16 = ((PyArrayObject *)__pyx_t_1); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_argsorted.rcbuffer->pybuffer); __pyx_t_3 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_argsorted.rcbuffer->pybuffer, (PyObject*)__pyx_t_16, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack); if (unlikely(__pyx_t_3 < 0)) { PyErr_Fetch(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_argsorted.rcbuffer->pybuffer, (PyObject*)__pyx_v_argsorted, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 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_pybuffernd_argsorted.diminfo[0].strides = __pyx_pybuffernd_argsorted.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_argsorted.diminfo[0].shape = __pyx_pybuffernd_argsorted.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_argsorted.diminfo[1].strides = __pyx_pybuffernd_argsorted.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_argsorted.diminfo[1].shape = __pyx_pybuffernd_argsorted.rcbuffer->pybuffer.shape[1]; if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 313; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_16 = 0; __pyx_v_argsorted = ((PyArrayObject *)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/algos.pyx":315 * argsorted = _as.astype('i8') * * for i in range(n): # <<<<<<<<<<<<<< * dups = sum_ranks = 0 * for j in range(k): */ __pyx_t_14 = __pyx_v_n; for (__pyx_t_13 = 0; __pyx_t_13 < __pyx_t_14; __pyx_t_13+=1) { __pyx_v_i = __pyx_t_13; /* "pandas/algos.pyx":316 * * for i in range(n): * dups = sum_ranks = 0 # <<<<<<<<<<<<<< * for j in range(k): * sum_ranks += j + 1 */ __pyx_v_dups = 0; __pyx_v_sum_ranks = 0; /* "pandas/algos.pyx":317 * for i in range(n): * dups = sum_ranks = 0 * for j in range(k): # <<<<<<<<<<<<<< * sum_ranks += j + 1 * dups += 1 */ __pyx_t_17 = __pyx_v_k; for (__pyx_t_18 = 0; __pyx_t_18 < __pyx_t_17; __pyx_t_18+=1) { __pyx_v_j = __pyx_t_18; /* "pandas/algos.pyx":318 * dups = sum_ranks = 0 * for j in range(k): * sum_ranks += j + 1 # <<<<<<<<<<<<<< * dups += 1 * val = values[i, j] */ __pyx_v_sum_ranks = (__pyx_v_sum_ranks + (__pyx_v_j + 1)); /* "pandas/algos.pyx":319 * for j in range(k): * sum_ranks += j + 1 * dups += 1 # <<<<<<<<<<<<<< * val = values[i, j] * if val == nan_value and keep_na: */ __pyx_v_dups = (__pyx_v_dups + 1); /* "pandas/algos.pyx":320 * sum_ranks += j + 1 * dups += 1 * val = values[i, j] # <<<<<<<<<<<<<< * if val == nan_value and keep_na: * ranks[i, argsorted[i, j]] = nan */ __pyx_t_19 = __pyx_v_i; __pyx_t_20 = __pyx_v_j; __pyx_t_3 = -1; if (__pyx_t_19 < 0) { __pyx_t_19 += __pyx_pybuffernd_values.diminfo[0].shape; if (unlikely(__pyx_t_19 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_19 >= __pyx_pybuffernd_values.diminfo[0].shape)) __pyx_t_3 = 0; if (__pyx_t_20 < 0) { __pyx_t_20 += __pyx_pybuffernd_values.diminfo[1].shape; if (unlikely(__pyx_t_20 < 0)) __pyx_t_3 = 1; } else if (unlikely(__pyx_t_20 >= __pyx_pybuffernd_values.diminfo[1].shape)) __pyx_t_3 = 1; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 320; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_val = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_20, __pyx_pybuffernd_values.diminfo[1].strides)); /* "pandas/algos.pyx":321 * dups += 1 * val = values[i, j] * if val == nan_value and keep_na: # <<<<<<<<<<<<<< * ranks[i, argsorted[i, j]] = nan * continue */ __pyx_t_4 = ((__pyx_v_val == __pyx_v_nan_value) != 0); if (__pyx_t_4) { __pyx_t_15 = (__pyx_v_keep_na != 0); } else { __pyx_t_15 = __pyx_t_4; } if (__pyx_t_15) { /* "pandas/algos.pyx":322 * val = values[i, j] * if val == nan_value and keep_na: * ranks[i, argsorted[i, j]] = nan # <<<<<<<<<<<<<< * continue * if j == k - 1 or fabs(values[i, j + 1] - val) > FP_ERR: */ __pyx_t_21 = __pyx_v_i; __pyx_t_22 = __pyx_v_j; __pyx_t_3 = -1; if (__pyx_t_21 < 0) { __pyx_t_21 += __pyx_pybuffernd_argsorted.diminfo[0].shape; if (unlikely(__pyx_t_21 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_21 >= __pyx_pybuffernd_argsorted.diminfo[0].shape)) __pyx_t_3 = 0; if (__pyx_t_22 < 0) { __pyx_t_22 += __pyx_pybuffernd_argsorted.diminfo[1].shape; if (unlikely(__pyx_t_22 < 0)) __pyx_t_3 = 1; } else if (unlikely(__pyx_t_22 >= __pyx_pybuffernd_argsorted.diminfo[1].shape)) __pyx_t_3 = 1; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 322; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_23 = __pyx_v_i; __pyx_t_24 = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_argsorted.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_argsorted.diminfo[0].strides, __pyx_t_22, __pyx_pybuffernd_argsorted.diminfo[1].strides)); __pyx_t_3 = -1; if (__pyx_t_23 < 0) { __pyx_t_23 += __pyx_pybuffernd_ranks.diminfo[0].shape; if (unlikely(__pyx_t_23 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_23 >= __pyx_pybuffernd_ranks.diminfo[0].shape)) __pyx_t_3 = 0; if (__pyx_t_24 < 0) { __pyx_t_24 += __pyx_pybuffernd_ranks.diminfo[1].shape; if (unlikely(__pyx_t_24 < 0)) __pyx_t_3 = 1; } else if (unlikely(__pyx_t_24 >= __pyx_pybuffernd_ranks.diminfo[1].shape)) __pyx_t_3 = 1; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 322; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_ranks.rcbuffer->pybuffer.buf, __pyx_t_23, __pyx_pybuffernd_ranks.diminfo[0].strides, __pyx_t_24, __pyx_pybuffernd_ranks.diminfo[1].strides) = __pyx_v_6pandas_5algos_nan; /* "pandas/algos.pyx":323 * if val == nan_value and keep_na: * ranks[i, argsorted[i, j]] = nan * continue # <<<<<<<<<<<<<< * if j == k - 1 or fabs(values[i, j + 1] - val) > FP_ERR: * if tiebreak == TIEBREAK_AVERAGE: */ goto __pyx_L12_continue; goto __pyx_L14; } __pyx_L14:; /* "pandas/algos.pyx":324 * ranks[i, argsorted[i, j]] = nan * continue * if j == k - 1 or fabs(values[i, j + 1] - val) > FP_ERR: # <<<<<<<<<<<<<< * if tiebreak == TIEBREAK_AVERAGE: * for z in range(j - dups + 1, j + 1): */ __pyx_t_15 = ((__pyx_v_j == (__pyx_v_k - 1)) != 0); if (!__pyx_t_15) { __pyx_t_25 = __pyx_v_i; __pyx_t_26 = (__pyx_v_j + 1); __pyx_t_3 = -1; if (__pyx_t_25 < 0) { __pyx_t_25 += __pyx_pybuffernd_values.diminfo[0].shape; if (unlikely(__pyx_t_25 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_25 >= __pyx_pybuffernd_values.diminfo[0].shape)) __pyx_t_3 = 0; if (__pyx_t_26 < 0) { __pyx_t_26 += __pyx_pybuffernd_values.diminfo[1].shape; if (unlikely(__pyx_t_26 < 0)) __pyx_t_3 = 1; } else if (unlikely(__pyx_t_26 >= __pyx_pybuffernd_values.diminfo[1].shape)) __pyx_t_3 = 1; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 324; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_4 = ((fabs(((*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_25, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_26, __pyx_pybuffernd_values.diminfo[1].strides)) - __pyx_v_val)) > __pyx_v_6pandas_5algos_FP_ERR) != 0); __pyx_t_27 = __pyx_t_4; } else { __pyx_t_27 = __pyx_t_15; } if (__pyx_t_27) { /* "pandas/algos.pyx":325 * continue * if j == k - 1 or fabs(values[i, j + 1] - val) > FP_ERR: * if tiebreak == TIEBREAK_AVERAGE: # <<<<<<<<<<<<<< * for z in range(j - dups + 1, j + 1): * ranks[i, argsorted[i, z]] = sum_ranks / dups */ __pyx_t_27 = ((__pyx_v_tiebreak == __pyx_v_6pandas_5algos_TIEBREAK_AVERAGE) != 0); if (__pyx_t_27) { /* "pandas/algos.pyx":326 * if j == k - 1 or fabs(values[i, j + 1] - val) > FP_ERR: * if tiebreak == TIEBREAK_AVERAGE: * for z in range(j - dups + 1, j + 1): # <<<<<<<<<<<<<< * ranks[i, argsorted[i, z]] = sum_ranks / dups * elif tiebreak == TIEBREAK_MIN: */ __pyx_t_28 = (__pyx_v_j + 1); for (__pyx_t_29 = ((__pyx_v_j - __pyx_v_dups) + 1); __pyx_t_29 < __pyx_t_28; __pyx_t_29+=1) { __pyx_v_z = __pyx_t_29; /* "pandas/algos.pyx":327 * if tiebreak == TIEBREAK_AVERAGE: * for z in range(j - dups + 1, j + 1): * ranks[i, argsorted[i, z]] = sum_ranks / dups # <<<<<<<<<<<<<< * elif tiebreak == TIEBREAK_MIN: * for z in range(j - dups + 1, j + 1): */ if (unlikely(__pyx_v_dups == 0)) { #ifdef WITH_THREAD PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure(); #endif PyErr_Format(PyExc_ZeroDivisionError, "float division"); #ifdef WITH_THREAD PyGILState_Release(__pyx_gilstate_save); #endif {__pyx_filename = __pyx_f[0]; __pyx_lineno = 327; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_30 = __pyx_v_i; __pyx_t_31 = __pyx_v_z; __pyx_t_3 = -1; if (__pyx_t_30 < 0) { __pyx_t_30 += __pyx_pybuffernd_argsorted.diminfo[0].shape; if (unlikely(__pyx_t_30 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_30 >= __pyx_pybuffernd_argsorted.diminfo[0].shape)) __pyx_t_3 = 0; if (__pyx_t_31 < 0) { __pyx_t_31 += __pyx_pybuffernd_argsorted.diminfo[1].shape; if (unlikely(__pyx_t_31 < 0)) __pyx_t_3 = 1; } else if (unlikely(__pyx_t_31 >= __pyx_pybuffernd_argsorted.diminfo[1].shape)) __pyx_t_3 = 1; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 327; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_32 = __pyx_v_i; __pyx_t_33 = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_argsorted.rcbuffer->pybuffer.buf, __pyx_t_30, __pyx_pybuffernd_argsorted.diminfo[0].strides, __pyx_t_31, __pyx_pybuffernd_argsorted.diminfo[1].strides)); __pyx_t_3 = -1; if (__pyx_t_32 < 0) { __pyx_t_32 += __pyx_pybuffernd_ranks.diminfo[0].shape; if (unlikely(__pyx_t_32 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_32 >= __pyx_pybuffernd_ranks.diminfo[0].shape)) __pyx_t_3 = 0; if (__pyx_t_33 < 0) { __pyx_t_33 += __pyx_pybuffernd_ranks.diminfo[1].shape; if (unlikely(__pyx_t_33 < 0)) __pyx_t_3 = 1; } else if (unlikely(__pyx_t_33 >= __pyx_pybuffernd_ranks.diminfo[1].shape)) __pyx_t_3 = 1; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 327; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_ranks.rcbuffer->pybuffer.buf, __pyx_t_32, __pyx_pybuffernd_ranks.diminfo[0].strides, __pyx_t_33, __pyx_pybuffernd_ranks.diminfo[1].strides) = (__pyx_v_sum_ranks / __pyx_v_dups); } goto __pyx_L16; } /* "pandas/algos.pyx":328 * for z in range(j - dups + 1, j + 1): * ranks[i, argsorted[i, z]] = sum_ranks / dups * elif tiebreak == TIEBREAK_MIN: # <<<<<<<<<<<<<< * for z in range(j - dups + 1, j + 1): * ranks[i, argsorted[i, z]] = j - dups + 2 */ __pyx_t_27 = ((__pyx_v_tiebreak == __pyx_v_6pandas_5algos_TIEBREAK_MIN) != 0); if (__pyx_t_27) { /* "pandas/algos.pyx":329 * ranks[i, argsorted[i, z]] = sum_ranks / dups * elif tiebreak == TIEBREAK_MIN: * for z in range(j - dups + 1, j + 1): # <<<<<<<<<<<<<< * ranks[i, argsorted[i, z]] = j - dups + 2 * elif tiebreak == TIEBREAK_MAX: */ __pyx_t_28 = (__pyx_v_j + 1); for (__pyx_t_29 = ((__pyx_v_j - __pyx_v_dups) + 1); __pyx_t_29 < __pyx_t_28; __pyx_t_29+=1) { __pyx_v_z = __pyx_t_29; /* "pandas/algos.pyx":330 * elif tiebreak == TIEBREAK_MIN: * for z in range(j - dups + 1, j + 1): * ranks[i, argsorted[i, z]] = j - dups + 2 # <<<<<<<<<<<<<< * elif tiebreak == TIEBREAK_MAX: * for z in range(j - dups + 1, j + 1): */ __pyx_t_34 = __pyx_v_i; __pyx_t_35 = __pyx_v_z; __pyx_t_3 = -1; if (__pyx_t_34 < 0) { __pyx_t_34 += __pyx_pybuffernd_argsorted.diminfo[0].shape; if (unlikely(__pyx_t_34 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_34 >= __pyx_pybuffernd_argsorted.diminfo[0].shape)) __pyx_t_3 = 0; if (__pyx_t_35 < 0) { __pyx_t_35 += __pyx_pybuffernd_argsorted.diminfo[1].shape; if (unlikely(__pyx_t_35 < 0)) __pyx_t_3 = 1; } else if (unlikely(__pyx_t_35 >= __pyx_pybuffernd_argsorted.diminfo[1].shape)) __pyx_t_3 = 1; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 330; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_36 = __pyx_v_i; __pyx_t_37 = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_argsorted.rcbuffer->pybuffer.buf, __pyx_t_34, __pyx_pybuffernd_argsorted.diminfo[0].strides, __pyx_t_35, __pyx_pybuffernd_argsorted.diminfo[1].strides)); __pyx_t_3 = -1; if (__pyx_t_36 < 0) { __pyx_t_36 += __pyx_pybuffernd_ranks.diminfo[0].shape; if (unlikely(__pyx_t_36 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_36 >= __pyx_pybuffernd_ranks.diminfo[0].shape)) __pyx_t_3 = 0; if (__pyx_t_37 < 0) { __pyx_t_37 += __pyx_pybuffernd_ranks.diminfo[1].shape; if (unlikely(__pyx_t_37 < 0)) __pyx_t_3 = 1; } else if (unlikely(__pyx_t_37 >= __pyx_pybuffernd_ranks.diminfo[1].shape)) __pyx_t_3 = 1; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 330; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_ranks.rcbuffer->pybuffer.buf, __pyx_t_36, __pyx_pybuffernd_ranks.diminfo[0].strides, __pyx_t_37, __pyx_pybuffernd_ranks.diminfo[1].strides) = ((__pyx_v_j - __pyx_v_dups) + 2); } goto __pyx_L16; } /* "pandas/algos.pyx":331 * for z in range(j - dups + 1, j + 1): * ranks[i, argsorted[i, z]] = j - dups + 2 * elif tiebreak == TIEBREAK_MAX: # <<<<<<<<<<<<<< * for z in range(j - dups + 1, j + 1): * ranks[i, argsorted[i, z]] = j + 1 */ __pyx_t_27 = ((__pyx_v_tiebreak == __pyx_v_6pandas_5algos_TIEBREAK_MAX) != 0); if (__pyx_t_27) { /* "pandas/algos.pyx":332 * ranks[i, argsorted[i, z]] = j - dups + 2 * elif tiebreak == TIEBREAK_MAX: * for z in range(j - dups + 1, j + 1): # <<<<<<<<<<<<<< * ranks[i, argsorted[i, z]] = j + 1 * elif tiebreak == TIEBREAK_FIRST: */ __pyx_t_28 = (__pyx_v_j + 1); for (__pyx_t_29 = ((__pyx_v_j - __pyx_v_dups) + 1); __pyx_t_29 < __pyx_t_28; __pyx_t_29+=1) { __pyx_v_z = __pyx_t_29; /* "pandas/algos.pyx":333 * elif tiebreak == TIEBREAK_MAX: * for z in range(j - dups + 1, j + 1): * ranks[i, argsorted[i, z]] = j + 1 # <<<<<<<<<<<<<< * elif tiebreak == TIEBREAK_FIRST: * for z in range(j - dups + 1, j + 1): */ __pyx_t_38 = __pyx_v_i; __pyx_t_39 = __pyx_v_z; __pyx_t_3 = -1; if (__pyx_t_38 < 0) { __pyx_t_38 += __pyx_pybuffernd_argsorted.diminfo[0].shape; if (unlikely(__pyx_t_38 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_38 >= __pyx_pybuffernd_argsorted.diminfo[0].shape)) __pyx_t_3 = 0; if (__pyx_t_39 < 0) { __pyx_t_39 += __pyx_pybuffernd_argsorted.diminfo[1].shape; if (unlikely(__pyx_t_39 < 0)) __pyx_t_3 = 1; } else if (unlikely(__pyx_t_39 >= __pyx_pybuffernd_argsorted.diminfo[1].shape)) __pyx_t_3 = 1; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 333; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_40 = __pyx_v_i; __pyx_t_41 = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_argsorted.rcbuffer->pybuffer.buf, __pyx_t_38, __pyx_pybuffernd_argsorted.diminfo[0].strides, __pyx_t_39, __pyx_pybuffernd_argsorted.diminfo[1].strides)); __pyx_t_3 = -1; if (__pyx_t_40 < 0) { __pyx_t_40 += __pyx_pybuffernd_ranks.diminfo[0].shape; if (unlikely(__pyx_t_40 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_40 >= __pyx_pybuffernd_ranks.diminfo[0].shape)) __pyx_t_3 = 0; if (__pyx_t_41 < 0) { __pyx_t_41 += __pyx_pybuffernd_ranks.diminfo[1].shape; if (unlikely(__pyx_t_41 < 0)) __pyx_t_3 = 1; } else if (unlikely(__pyx_t_41 >= __pyx_pybuffernd_ranks.diminfo[1].shape)) __pyx_t_3 = 1; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 333; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_ranks.rcbuffer->pybuffer.buf, __pyx_t_40, __pyx_pybuffernd_ranks.diminfo[0].strides, __pyx_t_41, __pyx_pybuffernd_ranks.diminfo[1].strides) = (__pyx_v_j + 1); } goto __pyx_L16; } /* "pandas/algos.pyx":334 * for z in range(j - dups + 1, j + 1): * ranks[i, argsorted[i, z]] = j + 1 * elif tiebreak == TIEBREAK_FIRST: # <<<<<<<<<<<<<< * for z in range(j - dups + 1, j + 1): * ranks[i, argsorted[i, z]] = z + 1 */ __pyx_t_27 = ((__pyx_v_tiebreak == __pyx_v_6pandas_5algos_TIEBREAK_FIRST) != 0); if (__pyx_t_27) { /* "pandas/algos.pyx":335 * ranks[i, argsorted[i, z]] = j + 1 * elif tiebreak == TIEBREAK_FIRST: * for z in range(j - dups + 1, j + 1): # <<<<<<<<<<<<<< * ranks[i, argsorted[i, z]] = z + 1 * elif tiebreak == TIEBREAK_FIRST_DESCENDING: */ __pyx_t_28 = (__pyx_v_j + 1); for (__pyx_t_29 = ((__pyx_v_j - __pyx_v_dups) + 1); __pyx_t_29 < __pyx_t_28; __pyx_t_29+=1) { __pyx_v_z = __pyx_t_29; /* "pandas/algos.pyx":336 * elif tiebreak == TIEBREAK_FIRST: * for z in range(j - dups + 1, j + 1): * ranks[i, argsorted[i, z]] = z + 1 # <<<<<<<<<<<<<< * elif tiebreak == TIEBREAK_FIRST_DESCENDING: * for z in range(j - dups + 1, j + 1): */ __pyx_t_42 = __pyx_v_i; __pyx_t_43 = __pyx_v_z; __pyx_t_3 = -1; if (__pyx_t_42 < 0) { __pyx_t_42 += __pyx_pybuffernd_argsorted.diminfo[0].shape; if (unlikely(__pyx_t_42 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_42 >= __pyx_pybuffernd_argsorted.diminfo[0].shape)) __pyx_t_3 = 0; if (__pyx_t_43 < 0) { __pyx_t_43 += __pyx_pybuffernd_argsorted.diminfo[1].shape; if (unlikely(__pyx_t_43 < 0)) __pyx_t_3 = 1; } else if (unlikely(__pyx_t_43 >= __pyx_pybuffernd_argsorted.diminfo[1].shape)) __pyx_t_3 = 1; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 336; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_44 = __pyx_v_i; __pyx_t_45 = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_argsorted.rcbuffer->pybuffer.buf, __pyx_t_42, __pyx_pybuffernd_argsorted.diminfo[0].strides, __pyx_t_43, __pyx_pybuffernd_argsorted.diminfo[1].strides)); __pyx_t_3 = -1; if (__pyx_t_44 < 0) { __pyx_t_44 += __pyx_pybuffernd_ranks.diminfo[0].shape; if (unlikely(__pyx_t_44 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_44 >= __pyx_pybuffernd_ranks.diminfo[0].shape)) __pyx_t_3 = 0; if (__pyx_t_45 < 0) { __pyx_t_45 += __pyx_pybuffernd_ranks.diminfo[1].shape; if (unlikely(__pyx_t_45 < 0)) __pyx_t_3 = 1; } else if (unlikely(__pyx_t_45 >= __pyx_pybuffernd_ranks.diminfo[1].shape)) __pyx_t_3 = 1; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 336; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_ranks.rcbuffer->pybuffer.buf, __pyx_t_44, __pyx_pybuffernd_ranks.diminfo[0].strides, __pyx_t_45, __pyx_pybuffernd_ranks.diminfo[1].strides) = (__pyx_v_z + 1); } goto __pyx_L16; } /* "pandas/algos.pyx":337 * for z in range(j - dups + 1, j + 1): * ranks[i, argsorted[i, z]] = z + 1 * elif tiebreak == TIEBREAK_FIRST_DESCENDING: # <<<<<<<<<<<<<< * for z in range(j - dups + 1, j + 1): * ranks[i, argsorted[i, z]] = 2 * j - z - dups + 2 */ __pyx_t_27 = ((__pyx_v_tiebreak == __pyx_v_6pandas_5algos_TIEBREAK_FIRST_DESCENDING) != 0); if (__pyx_t_27) { /* "pandas/algos.pyx":338 * ranks[i, argsorted[i, z]] = z + 1 * elif tiebreak == TIEBREAK_FIRST_DESCENDING: * for z in range(j - dups + 1, j + 1): # <<<<<<<<<<<<<< * ranks[i, argsorted[i, z]] = 2 * j - z - dups + 2 * sum_ranks = dups = 0 */ __pyx_t_28 = (__pyx_v_j + 1); for (__pyx_t_29 = ((__pyx_v_j - __pyx_v_dups) + 1); __pyx_t_29 < __pyx_t_28; __pyx_t_29+=1) { __pyx_v_z = __pyx_t_29; /* "pandas/algos.pyx":339 * elif tiebreak == TIEBREAK_FIRST_DESCENDING: * for z in range(j - dups + 1, j + 1): * ranks[i, argsorted[i, z]] = 2 * j - z - dups + 2 # <<<<<<<<<<<<<< * sum_ranks = dups = 0 * */ __pyx_t_46 = __pyx_v_i; __pyx_t_47 = __pyx_v_z; __pyx_t_3 = -1; if (__pyx_t_46 < 0) { __pyx_t_46 += __pyx_pybuffernd_argsorted.diminfo[0].shape; if (unlikely(__pyx_t_46 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_46 >= __pyx_pybuffernd_argsorted.diminfo[0].shape)) __pyx_t_3 = 0; if (__pyx_t_47 < 0) { __pyx_t_47 += __pyx_pybuffernd_argsorted.diminfo[1].shape; if (unlikely(__pyx_t_47 < 0)) __pyx_t_3 = 1; } else if (unlikely(__pyx_t_47 >= __pyx_pybuffernd_argsorted.diminfo[1].shape)) __pyx_t_3 = 1; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 339; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_48 = __pyx_v_i; __pyx_t_49 = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_argsorted.rcbuffer->pybuffer.buf, __pyx_t_46, __pyx_pybuffernd_argsorted.diminfo[0].strides, __pyx_t_47, __pyx_pybuffernd_argsorted.diminfo[1].strides)); __pyx_t_3 = -1; if (__pyx_t_48 < 0) { __pyx_t_48 += __pyx_pybuffernd_ranks.diminfo[0].shape; if (unlikely(__pyx_t_48 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_48 >= __pyx_pybuffernd_ranks.diminfo[0].shape)) __pyx_t_3 = 0; if (__pyx_t_49 < 0) { __pyx_t_49 += __pyx_pybuffernd_ranks.diminfo[1].shape; if (unlikely(__pyx_t_49 < 0)) __pyx_t_3 = 1; } else if (unlikely(__pyx_t_49 >= __pyx_pybuffernd_ranks.diminfo[1].shape)) __pyx_t_3 = 1; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 339; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_ranks.rcbuffer->pybuffer.buf, __pyx_t_48, __pyx_pybuffernd_ranks.diminfo[0].strides, __pyx_t_49, __pyx_pybuffernd_ranks.diminfo[1].strides) = ((((2 * __pyx_v_j) - __pyx_v_z) - __pyx_v_dups) + 2); } goto __pyx_L16; } __pyx_L16:; /* "pandas/algos.pyx":340 * for z in range(j - dups + 1, j + 1): * ranks[i, argsorted[i, z]] = 2 * j - z - dups + 2 * sum_ranks = dups = 0 # <<<<<<<<<<<<<< * * if axis == 0: */ __pyx_v_sum_ranks = 0; __pyx_v_dups = 0; goto __pyx_L15; } __pyx_L15:; __pyx_L12_continue:; } } /* "pandas/algos.pyx":342 * sum_ranks = dups = 0 * * if axis == 0: # <<<<<<<<<<<<<< * return ranks.T * else: */ __pyx_t_1 = PyObject_RichCompare(__pyx_v_axis, __pyx_int_0, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 342; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_27 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_27 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 342; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_27) { /* "pandas/algos.pyx":343 * * if axis == 0: * return ranks.T # <<<<<<<<<<<<<< * else: * return ranks */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_ranks), __pyx_n_s__T); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 343; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; goto __pyx_L27; } /*else*/ { /* "pandas/algos.pyx":345 * return ranks.T * else: * return ranks # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_ranks)); __pyx_r = ((PyObject *)__pyx_v_ranks); goto __pyx_L0; } __pyx_L27:; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_11); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_argsorted.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_ranks.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.rank_2d_float64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_argsorted.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_ranks.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_ranks); __Pyx_XDECREF((PyObject *)__pyx_v_values); __Pyx_XDECREF((PyObject *)__pyx_v_argsorted); __Pyx_XDECREF(__pyx_v__as); __Pyx_XDECREF(__pyx_v_in_arr); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_7rank_2d_int64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6pandas_5algos_6rank_2d_int64[] = "\n Fast NaN-friendly version of scipy.stats.rankdata\n "; static PyMethodDef __pyx_mdef_6pandas_5algos_7rank_2d_int64 = {__Pyx_NAMESTR("rank_2d_int64"), (PyCFunction)__pyx_pw_6pandas_5algos_7rank_2d_int64, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_5algos_6rank_2d_int64)}; static PyObject *__pyx_pw_6pandas_5algos_7rank_2d_int64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_in_arr = 0; PyObject *__pyx_v_axis = 0; PyObject *__pyx_v_ties_method = 0; PyObject *__pyx_v_ascending = 0; CYTHON_UNUSED PyObject *__pyx_v_na_option = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("rank_2d_int64 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__in_arr,&__pyx_n_s__axis,&__pyx_n_s__ties_method,&__pyx_n_s__ascending,&__pyx_n_s__na_option,0}; PyObject* values[5] = {0,0,0,0,0}; values[1] = ((PyObject *)__pyx_int_0); values[2] = ((PyObject *)__pyx_n_s__average); values[3] = __pyx_k_15; values[4] = ((PyObject *)__pyx_n_s__keep); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__in_arr)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__axis); if (value) { values[1] = value; kw_args--; } } case 2: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__ties_method); if (value) { values[2] = value; kw_args--; } } case 3: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__ascending); if (value) { values[3] = value; kw_args--; } } case 4: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__na_option); if (value) { values[4] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "rank_2d_int64") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 348; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_in_arr = values[0]; __pyx_v_axis = values[1]; __pyx_v_ties_method = values[2]; __pyx_v_ascending = values[3]; __pyx_v_na_option = values[4]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("rank_2d_int64", 0, 1, 5, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 348; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.rank_2d_int64", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pandas_5algos_6rank_2d_int64(__pyx_self, __pyx_v_in_arr, __pyx_v_axis, __pyx_v_ties_method, __pyx_v_ascending, __pyx_v_na_option); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/algos.pyx":348 * * * def rank_2d_int64(object in_arr, axis=0, ties_method='average', # <<<<<<<<<<<<<< * ascending=True, na_option='keep'): * """ */ static PyObject *__pyx_pf_6pandas_5algos_6rank_2d_int64(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_in_arr, PyObject *__pyx_v_axis, PyObject *__pyx_v_ties_method, PyObject *__pyx_v_ascending, CYTHON_UNUSED PyObject *__pyx_v_na_option) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_z; Py_ssize_t __pyx_v_k; Py_ssize_t __pyx_v_n; Py_ssize_t __pyx_v_dups; PyArrayObject *__pyx_v_ranks = 0; PyArrayObject *__pyx_v_argsorted = 0; PyArrayObject *__pyx_v_values = 0; __pyx_t_5numpy_int64_t __pyx_v_val; __pyx_t_5numpy_float64_t __pyx_v_sum_ranks; int __pyx_v_tiebreak; PyObject *__pyx_v__as = NULL; __Pyx_LocalBuf_ND __pyx_pybuffernd_argsorted; __Pyx_Buffer __pyx_pybuffer_argsorted; __Pyx_LocalBuf_ND __pyx_pybuffernd_ranks; __Pyx_Buffer __pyx_pybuffer_ranks; __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; int __pyx_t_3; int __pyx_t_4; PyObject *__pyx_t_5 = NULL; PyArrayObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; PyObject *(*__pyx_t_11)(PyObject *); Py_ssize_t __pyx_t_12; Py_ssize_t __pyx_t_13; PyArrayObject *__pyx_t_14 = NULL; int __pyx_t_15; PyArrayObject *__pyx_t_16 = NULL; 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; int __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; __pyx_t_5numpy_int64_t __pyx_t_29; Py_ssize_t __pyx_t_30; Py_ssize_t __pyx_t_31; Py_ssize_t __pyx_t_32; __pyx_t_5numpy_int64_t __pyx_t_33; Py_ssize_t __pyx_t_34; Py_ssize_t __pyx_t_35; Py_ssize_t __pyx_t_36; __pyx_t_5numpy_int64_t __pyx_t_37; Py_ssize_t __pyx_t_38; Py_ssize_t __pyx_t_39; Py_ssize_t __pyx_t_40; __pyx_t_5numpy_int64_t __pyx_t_41; Py_ssize_t __pyx_t_42; Py_ssize_t __pyx_t_43; Py_ssize_t __pyx_t_44; __pyx_t_5numpy_int64_t __pyx_t_45; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("rank_2d_int64", 0); __pyx_pybuffer_ranks.pybuffer.buf = NULL; __pyx_pybuffer_ranks.refcount = 0; __pyx_pybuffernd_ranks.data = NULL; __pyx_pybuffernd_ranks.rcbuffer = &__pyx_pybuffer_ranks; __pyx_pybuffer_argsorted.pybuffer.buf = NULL; __pyx_pybuffer_argsorted.refcount = 0; __pyx_pybuffernd_argsorted.data = NULL; __pyx_pybuffernd_argsorted.rcbuffer = &__pyx_pybuffer_argsorted; __pyx_pybuffer_values.pybuffer.buf = NULL; __pyx_pybuffer_values.refcount = 0; __pyx_pybuffernd_values.data = NULL; __pyx_pybuffernd_values.rcbuffer = &__pyx_pybuffer_values; /* "pandas/algos.pyx":355 * * cdef: * Py_ssize_t i, j, z, k, n, dups = 0 # <<<<<<<<<<<<<< * ndarray[float64_t, ndim=2] ranks * ndarray[int64_t, ndim=2] argsorted */ __pyx_v_dups = 0; /* "pandas/algos.pyx":360 * ndarray[int64_t, ndim=2, cast=True] values * int64_t val * float64_t sum_ranks = 0 # <<<<<<<<<<<<<< * int tiebreak = 0 * tiebreak = tiebreakers[ties_method] */ __pyx_v_sum_ranks = 0.0; /* "pandas/algos.pyx":361 * int64_t val * float64_t sum_ranks = 0 * int tiebreak = 0 # <<<<<<<<<<<<<< * tiebreak = tiebreakers[ties_method] * */ __pyx_v_tiebreak = 0; /* "pandas/algos.pyx":362 * float64_t sum_ranks = 0 * int tiebreak = 0 * tiebreak = tiebreakers[ties_method] # <<<<<<<<<<<<<< * * if axis == 0: */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__tiebreakers); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 362; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyObject_GetItem(__pyx_t_1, __pyx_v_ties_method); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 362; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_3 = __Pyx_PyInt_AsInt(__pyx_t_2); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 362; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_tiebreak = __pyx_t_3; /* "pandas/algos.pyx":364 * tiebreak = tiebreakers[ties_method] * * if axis == 0: # <<<<<<<<<<<<<< * values = np.asarray(in_arr).T * else: */ __pyx_t_2 = PyObject_RichCompare(__pyx_v_axis, __pyx_int_0, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 364; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 364; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_4) { /* "pandas/algos.pyx":365 * * if axis == 0: * values = np.asarray(in_arr).T # <<<<<<<<<<<<<< * else: * values = np.asarray(in_arr) */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 365; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__asarray); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 365; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 365; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_in_arr); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_in_arr); __Pyx_GIVEREF(__pyx_v_in_arr); __pyx_t_5 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 365; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s__T); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 365; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 365; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_6 = ((PyArrayObject *)__pyx_t_2); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_t_3 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_values.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 1, __pyx_stack); if (unlikely(__pyx_t_3 < 0)) { PyErr_Fetch(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_values.rcbuffer->pybuffer, (PyObject*)__pyx_v_values, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 1, __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_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_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1]; if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 365; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_6 = 0; __pyx_v_values = ((PyArrayObject *)__pyx_t_2); __pyx_t_2 = 0; goto __pyx_L3; } /*else*/ { /* "pandas/algos.pyx":367 * values = np.asarray(in_arr).T * else: * values = np.asarray(in_arr) # <<<<<<<<<<<<<< * * n, k = ( values).shape */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 367; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__asarray); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 367; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 367; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_in_arr); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_in_arr); __Pyx_GIVEREF(__pyx_v_in_arr); __pyx_t_1 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 367; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 367; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_6 = ((PyArrayObject *)__pyx_t_1); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_t_3 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_values.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 1, __pyx_stack); if (unlikely(__pyx_t_3 < 0)) { PyErr_Fetch(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_values.rcbuffer->pybuffer, (PyObject*)__pyx_v_values, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 1, __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_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_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1]; if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 367; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_6 = 0; __pyx_v_values = ((PyArrayObject *)__pyx_t_1); __pyx_t_1 = 0; } __pyx_L3:; /* "pandas/algos.pyx":369 * values = np.asarray(in_arr) * * n, k = ( values).shape # <<<<<<<<<<<<<< * ranks = np.empty((n, k), dtype='f8') * */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_values), __pyx_n_s__shape); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 369; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) { PyObject* sequence = __pyx_t_1; #if CYTHON_COMPILING_IN_CPYTHON Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 369; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_5 = PyTuple_GET_ITEM(sequence, 1); } else { __pyx_t_2 = PyList_GET_ITEM(sequence, 0); __pyx_t_5 = PyList_GET_ITEM(sequence, 1); } __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(__pyx_t_5); #else __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 369; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 369; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } else { Py_ssize_t index = -1; __pyx_t_10 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 369; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_11 = Py_TYPE(__pyx_t_10)->tp_iternext; index = 0; __pyx_t_2 = __pyx_t_11(__pyx_t_10); if (unlikely(!__pyx_t_2)) goto __pyx_L4_unpacking_failed; __Pyx_GOTREF(__pyx_t_2); index = 1; __pyx_t_5 = __pyx_t_11(__pyx_t_10); if (unlikely(!__pyx_t_5)) goto __pyx_L4_unpacking_failed; __Pyx_GOTREF(__pyx_t_5); if (__Pyx_IternextUnpackEndCheck(__pyx_t_11(__pyx_t_10), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 369; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_11 = NULL; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; goto __pyx_L5_unpacking_done; __pyx_L4_unpacking_failed:; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_t_11 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 369; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_L5_unpacking_done:; } __pyx_t_12 = __Pyx_PyIndex_AsSsize_t(__pyx_t_2); if (unlikely((__pyx_t_12 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 369; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_13 = __Pyx_PyIndex_AsSsize_t(__pyx_t_5); if (unlikely((__pyx_t_13 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 369; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_v_n = __pyx_t_12; __pyx_v_k = __pyx_t_13; /* "pandas/algos.pyx":370 * * n, k = ( values).shape * ranks = np.empty((n, k), dtype='f8') # <<<<<<<<<<<<<< * * if tiebreak == TIEBREAK_FIRST: */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 370; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s__empty); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 370; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_n); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 370; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_k); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 370; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_10 = PyTuple_New(2); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 370; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_1 = 0; __pyx_t_2 = 0; __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 370; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_t_10)); __Pyx_GIVEREF(((PyObject *)__pyx_t_10)); __pyx_t_10 = 0; __pyx_t_10 = PyDict_New(); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 370; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_10)); if (PyDict_SetItem(__pyx_t_10, ((PyObject *)__pyx_n_s__dtype), ((PyObject *)__pyx_n_s__f8)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 370; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_1 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_2), ((PyObject *)__pyx_t_10)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 370; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_10)); __pyx_t_10 = 0; if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 370; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_14 = ((PyArrayObject *)__pyx_t_1); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_ranks.rcbuffer->pybuffer); __pyx_t_3 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_ranks.rcbuffer->pybuffer, (PyObject*)__pyx_t_14, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack); if (unlikely(__pyx_t_3 < 0)) { PyErr_Fetch(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_ranks.rcbuffer->pybuffer, (PyObject*)__pyx_v_ranks, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_pybuffernd_ranks.diminfo[0].strides = __pyx_pybuffernd_ranks.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_ranks.diminfo[0].shape = __pyx_pybuffernd_ranks.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_ranks.diminfo[1].strides = __pyx_pybuffernd_ranks.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_ranks.diminfo[1].shape = __pyx_pybuffernd_ranks.rcbuffer->pybuffer.shape[1]; if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 370; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_14 = 0; __pyx_v_ranks = ((PyArrayObject *)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/algos.pyx":372 * ranks = np.empty((n, k), dtype='f8') * * if tiebreak == TIEBREAK_FIRST: # <<<<<<<<<<<<<< * # need to use a stable sort here * _as = values.argsort(axis=1, kind='mergesort') */ __pyx_t_4 = ((__pyx_v_tiebreak == __pyx_v_6pandas_5algos_TIEBREAK_FIRST) != 0); if (__pyx_t_4) { /* "pandas/algos.pyx":374 * if tiebreak == TIEBREAK_FIRST: * # need to use a stable sort here * _as = values.argsort(axis=1, kind='mergesort') # <<<<<<<<<<<<<< * if not ascending: * tiebreak = TIEBREAK_FIRST_DESCENDING */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_values), __pyx_n_s__argsort); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 374; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_10 = PyDict_New(); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 374; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_10)); if (PyDict_SetItem(__pyx_t_10, ((PyObject *)__pyx_n_s__axis), __pyx_int_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 374; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (PyDict_SetItem(__pyx_t_10, ((PyObject *)__pyx_n_s__kind), ((PyObject *)__pyx_n_s__mergesort)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 374; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), ((PyObject *)__pyx_t_10)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 374; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_10)); __pyx_t_10 = 0; __pyx_v__as = __pyx_t_2; __pyx_t_2 = 0; /* "pandas/algos.pyx":375 * # need to use a stable sort here * _as = values.argsort(axis=1, kind='mergesort') * if not ascending: # <<<<<<<<<<<<<< * tiebreak = TIEBREAK_FIRST_DESCENDING * else: */ __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_ascending); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 375; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_15 = ((!__pyx_t_4) != 0); if (__pyx_t_15) { /* "pandas/algos.pyx":376 * _as = values.argsort(axis=1, kind='mergesort') * if not ascending: * tiebreak = TIEBREAK_FIRST_DESCENDING # <<<<<<<<<<<<<< * else: * _as = values.argsort(1) */ __pyx_v_tiebreak = __pyx_v_6pandas_5algos_TIEBREAK_FIRST_DESCENDING; goto __pyx_L7; } __pyx_L7:; goto __pyx_L6; } /*else*/ { /* "pandas/algos.pyx":378 * tiebreak = TIEBREAK_FIRST_DESCENDING * else: * _as = values.argsort(1) # <<<<<<<<<<<<<< * * if not ascending: */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_values), __pyx_n_s__argsort); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 378; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_10 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_k_tuple_16), NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 378; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v__as = __pyx_t_10; __pyx_t_10 = 0; } __pyx_L6:; /* "pandas/algos.pyx":380 * _as = values.argsort(1) * * if not ascending: # <<<<<<<<<<<<<< * _as = _as[:, ::-1] * */ __pyx_t_15 = __Pyx_PyObject_IsTrue(__pyx_v_ascending); if (unlikely(__pyx_t_15 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 380; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_4 = ((!__pyx_t_15) != 0); if (__pyx_t_4) { /* "pandas/algos.pyx":381 * * if not ascending: * _as = _as[:, ::-1] # <<<<<<<<<<<<<< * * values = _take_2d_int64(values, _as) */ __pyx_t_10 = PyObject_GetItem(__pyx_v__as, ((PyObject *)__pyx_k_tuple_19)); if (!__pyx_t_10) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 381; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF_SET(__pyx_v__as, __pyx_t_10); __pyx_t_10 = 0; goto __pyx_L8; } __pyx_L8:; /* "pandas/algos.pyx":383 * _as = _as[:, ::-1] * * values = _take_2d_int64(values, _as) # <<<<<<<<<<<<<< * argsorted = _as.astype('i8') * */ __pyx_t_10 = __pyx_f_6pandas_5algos__take_2d_int64(((PyArrayObject *)__pyx_v_values), __pyx_v__as); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 383; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); if (!(likely(((__pyx_t_10) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_10, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 383; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_6 = ((PyArrayObject *)__pyx_t_10); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_t_3 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_values.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 1, __pyx_stack); if (unlikely(__pyx_t_3 < 0)) { PyErr_Fetch(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_values.rcbuffer->pybuffer, (PyObject*)__pyx_v_values, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 1, __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_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_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1]; if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 383; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_6 = 0; __Pyx_DECREF_SET(__pyx_v_values, ((PyArrayObject *)__pyx_t_10)); __pyx_t_10 = 0; /* "pandas/algos.pyx":384 * * values = _take_2d_int64(values, _as) * argsorted = _as.astype('i8') # <<<<<<<<<<<<<< * * for i in range(n): */ __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v__as, __pyx_n_s__astype); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 384; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __pyx_t_2 = PyObject_Call(__pyx_t_10, ((PyObject *)__pyx_k_tuple_20), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 384; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 384; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_16 = ((PyArrayObject *)__pyx_t_2); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_argsorted.rcbuffer->pybuffer); __pyx_t_3 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_argsorted.rcbuffer->pybuffer, (PyObject*)__pyx_t_16, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack); if (unlikely(__pyx_t_3 < 0)) { PyErr_Fetch(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_argsorted.rcbuffer->pybuffer, (PyObject*)__pyx_v_argsorted, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 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_pybuffernd_argsorted.diminfo[0].strides = __pyx_pybuffernd_argsorted.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_argsorted.diminfo[0].shape = __pyx_pybuffernd_argsorted.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_argsorted.diminfo[1].strides = __pyx_pybuffernd_argsorted.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_argsorted.diminfo[1].shape = __pyx_pybuffernd_argsorted.rcbuffer->pybuffer.shape[1]; if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 384; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_16 = 0; __pyx_v_argsorted = ((PyArrayObject *)__pyx_t_2); __pyx_t_2 = 0; /* "pandas/algos.pyx":386 * argsorted = _as.astype('i8') * * for i in range(n): # <<<<<<<<<<<<<< * dups = sum_ranks = 0 * for j in range(k): */ __pyx_t_13 = __pyx_v_n; for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_13; __pyx_t_12+=1) { __pyx_v_i = __pyx_t_12; /* "pandas/algos.pyx":387 * * for i in range(n): * dups = sum_ranks = 0 # <<<<<<<<<<<<<< * for j in range(k): * sum_ranks += j + 1 */ __pyx_v_dups = 0; __pyx_v_sum_ranks = 0; /* "pandas/algos.pyx":388 * for i in range(n): * dups = sum_ranks = 0 * for j in range(k): # <<<<<<<<<<<<<< * sum_ranks += j + 1 * dups += 1 */ __pyx_t_17 = __pyx_v_k; for (__pyx_t_18 = 0; __pyx_t_18 < __pyx_t_17; __pyx_t_18+=1) { __pyx_v_j = __pyx_t_18; /* "pandas/algos.pyx":389 * dups = sum_ranks = 0 * for j in range(k): * sum_ranks += j + 1 # <<<<<<<<<<<<<< * dups += 1 * val = values[i, j] */ __pyx_v_sum_ranks = (__pyx_v_sum_ranks + (__pyx_v_j + 1)); /* "pandas/algos.pyx":390 * for j in range(k): * sum_ranks += j + 1 * dups += 1 # <<<<<<<<<<<<<< * val = values[i, j] * if j == k - 1 or fabs(values[i, j + 1] - val) > FP_ERR: */ __pyx_v_dups = (__pyx_v_dups + 1); /* "pandas/algos.pyx":391 * sum_ranks += j + 1 * dups += 1 * val = values[i, j] # <<<<<<<<<<<<<< * if j == k - 1 or fabs(values[i, j + 1] - val) > FP_ERR: * if tiebreak == TIEBREAK_AVERAGE: */ __pyx_t_19 = __pyx_v_i; __pyx_t_20 = __pyx_v_j; __pyx_t_3 = -1; if (__pyx_t_19 < 0) { __pyx_t_19 += __pyx_pybuffernd_values.diminfo[0].shape; if (unlikely(__pyx_t_19 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_19 >= __pyx_pybuffernd_values.diminfo[0].shape)) __pyx_t_3 = 0; if (__pyx_t_20 < 0) { __pyx_t_20 += __pyx_pybuffernd_values.diminfo[1].shape; if (unlikely(__pyx_t_20 < 0)) __pyx_t_3 = 1; } else if (unlikely(__pyx_t_20 >= __pyx_pybuffernd_values.diminfo[1].shape)) __pyx_t_3 = 1; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 391; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_val = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_20, __pyx_pybuffernd_values.diminfo[1].strides)); /* "pandas/algos.pyx":392 * dups += 1 * val = values[i, j] * if j == k - 1 or fabs(values[i, j + 1] - val) > FP_ERR: # <<<<<<<<<<<<<< * if tiebreak == TIEBREAK_AVERAGE: * for z in range(j - dups + 1, j + 1): */ __pyx_t_4 = ((__pyx_v_j == (__pyx_v_k - 1)) != 0); if (!__pyx_t_4) { __pyx_t_21 = __pyx_v_i; __pyx_t_22 = (__pyx_v_j + 1); __pyx_t_3 = -1; if (__pyx_t_21 < 0) { __pyx_t_21 += __pyx_pybuffernd_values.diminfo[0].shape; if (unlikely(__pyx_t_21 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_21 >= __pyx_pybuffernd_values.diminfo[0].shape)) __pyx_t_3 = 0; if (__pyx_t_22 < 0) { __pyx_t_22 += __pyx_pybuffernd_values.diminfo[1].shape; if (unlikely(__pyx_t_22 < 0)) __pyx_t_3 = 1; } else if (unlikely(__pyx_t_22 >= __pyx_pybuffernd_values.diminfo[1].shape)) __pyx_t_3 = 1; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 392; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_15 = ((fabs(((*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_22, __pyx_pybuffernd_values.diminfo[1].strides)) - __pyx_v_val)) > __pyx_v_6pandas_5algos_FP_ERR) != 0); __pyx_t_23 = __pyx_t_15; } else { __pyx_t_23 = __pyx_t_4; } if (__pyx_t_23) { /* "pandas/algos.pyx":393 * val = values[i, j] * if j == k - 1 or fabs(values[i, j + 1] - val) > FP_ERR: * if tiebreak == TIEBREAK_AVERAGE: # <<<<<<<<<<<<<< * for z in range(j - dups + 1, j + 1): * ranks[i, argsorted[i, z]] = sum_ranks / dups */ __pyx_t_23 = ((__pyx_v_tiebreak == __pyx_v_6pandas_5algos_TIEBREAK_AVERAGE) != 0); if (__pyx_t_23) { /* "pandas/algos.pyx":394 * if j == k - 1 or fabs(values[i, j + 1] - val) > FP_ERR: * if tiebreak == TIEBREAK_AVERAGE: * for z in range(j - dups + 1, j + 1): # <<<<<<<<<<<<<< * ranks[i, argsorted[i, z]] = sum_ranks / dups * elif tiebreak == TIEBREAK_MIN: */ __pyx_t_24 = (__pyx_v_j + 1); for (__pyx_t_25 = ((__pyx_v_j - __pyx_v_dups) + 1); __pyx_t_25 < __pyx_t_24; __pyx_t_25+=1) { __pyx_v_z = __pyx_t_25; /* "pandas/algos.pyx":395 * if tiebreak == TIEBREAK_AVERAGE: * for z in range(j - dups + 1, j + 1): * ranks[i, argsorted[i, z]] = sum_ranks / dups # <<<<<<<<<<<<<< * elif tiebreak == TIEBREAK_MIN: * for z in range(j - dups + 1, j + 1): */ if (unlikely(__pyx_v_dups == 0)) { #ifdef WITH_THREAD PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure(); #endif PyErr_Format(PyExc_ZeroDivisionError, "float division"); #ifdef WITH_THREAD PyGILState_Release(__pyx_gilstate_save); #endif {__pyx_filename = __pyx_f[0]; __pyx_lineno = 395; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_26 = __pyx_v_i; __pyx_t_27 = __pyx_v_z; __pyx_t_3 = -1; if (__pyx_t_26 < 0) { __pyx_t_26 += __pyx_pybuffernd_argsorted.diminfo[0].shape; if (unlikely(__pyx_t_26 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_26 >= __pyx_pybuffernd_argsorted.diminfo[0].shape)) __pyx_t_3 = 0; if (__pyx_t_27 < 0) { __pyx_t_27 += __pyx_pybuffernd_argsorted.diminfo[1].shape; if (unlikely(__pyx_t_27 < 0)) __pyx_t_3 = 1; } else if (unlikely(__pyx_t_27 >= __pyx_pybuffernd_argsorted.diminfo[1].shape)) __pyx_t_3 = 1; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 395; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_28 = __pyx_v_i; __pyx_t_29 = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_argsorted.rcbuffer->pybuffer.buf, __pyx_t_26, __pyx_pybuffernd_argsorted.diminfo[0].strides, __pyx_t_27, __pyx_pybuffernd_argsorted.diminfo[1].strides)); __pyx_t_3 = -1; if (__pyx_t_28 < 0) { __pyx_t_28 += __pyx_pybuffernd_ranks.diminfo[0].shape; if (unlikely(__pyx_t_28 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_28 >= __pyx_pybuffernd_ranks.diminfo[0].shape)) __pyx_t_3 = 0; if (__pyx_t_29 < 0) { __pyx_t_29 += __pyx_pybuffernd_ranks.diminfo[1].shape; if (unlikely(__pyx_t_29 < 0)) __pyx_t_3 = 1; } else if (unlikely(__pyx_t_29 >= __pyx_pybuffernd_ranks.diminfo[1].shape)) __pyx_t_3 = 1; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 395; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_ranks.rcbuffer->pybuffer.buf, __pyx_t_28, __pyx_pybuffernd_ranks.diminfo[0].strides, __pyx_t_29, __pyx_pybuffernd_ranks.diminfo[1].strides) = (__pyx_v_sum_ranks / __pyx_v_dups); } goto __pyx_L14; } /* "pandas/algos.pyx":396 * for z in range(j - dups + 1, j + 1): * ranks[i, argsorted[i, z]] = sum_ranks / dups * elif tiebreak == TIEBREAK_MIN: # <<<<<<<<<<<<<< * for z in range(j - dups + 1, j + 1): * ranks[i, argsorted[i, z]] = j - dups + 2 */ __pyx_t_23 = ((__pyx_v_tiebreak == __pyx_v_6pandas_5algos_TIEBREAK_MIN) != 0); if (__pyx_t_23) { /* "pandas/algos.pyx":397 * ranks[i, argsorted[i, z]] = sum_ranks / dups * elif tiebreak == TIEBREAK_MIN: * for z in range(j - dups + 1, j + 1): # <<<<<<<<<<<<<< * ranks[i, argsorted[i, z]] = j - dups + 2 * elif tiebreak == TIEBREAK_MAX: */ __pyx_t_24 = (__pyx_v_j + 1); for (__pyx_t_25 = ((__pyx_v_j - __pyx_v_dups) + 1); __pyx_t_25 < __pyx_t_24; __pyx_t_25+=1) { __pyx_v_z = __pyx_t_25; /* "pandas/algos.pyx":398 * elif tiebreak == TIEBREAK_MIN: * for z in range(j - dups + 1, j + 1): * ranks[i, argsorted[i, z]] = j - dups + 2 # <<<<<<<<<<<<<< * elif tiebreak == TIEBREAK_MAX: * for z in range(j - dups + 1, j + 1): */ __pyx_t_30 = __pyx_v_i; __pyx_t_31 = __pyx_v_z; __pyx_t_3 = -1; if (__pyx_t_30 < 0) { __pyx_t_30 += __pyx_pybuffernd_argsorted.diminfo[0].shape; if (unlikely(__pyx_t_30 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_30 >= __pyx_pybuffernd_argsorted.diminfo[0].shape)) __pyx_t_3 = 0; if (__pyx_t_31 < 0) { __pyx_t_31 += __pyx_pybuffernd_argsorted.diminfo[1].shape; if (unlikely(__pyx_t_31 < 0)) __pyx_t_3 = 1; } else if (unlikely(__pyx_t_31 >= __pyx_pybuffernd_argsorted.diminfo[1].shape)) __pyx_t_3 = 1; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 398; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_32 = __pyx_v_i; __pyx_t_33 = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_argsorted.rcbuffer->pybuffer.buf, __pyx_t_30, __pyx_pybuffernd_argsorted.diminfo[0].strides, __pyx_t_31, __pyx_pybuffernd_argsorted.diminfo[1].strides)); __pyx_t_3 = -1; if (__pyx_t_32 < 0) { __pyx_t_32 += __pyx_pybuffernd_ranks.diminfo[0].shape; if (unlikely(__pyx_t_32 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_32 >= __pyx_pybuffernd_ranks.diminfo[0].shape)) __pyx_t_3 = 0; if (__pyx_t_33 < 0) { __pyx_t_33 += __pyx_pybuffernd_ranks.diminfo[1].shape; if (unlikely(__pyx_t_33 < 0)) __pyx_t_3 = 1; } else if (unlikely(__pyx_t_33 >= __pyx_pybuffernd_ranks.diminfo[1].shape)) __pyx_t_3 = 1; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 398; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_ranks.rcbuffer->pybuffer.buf, __pyx_t_32, __pyx_pybuffernd_ranks.diminfo[0].strides, __pyx_t_33, __pyx_pybuffernd_ranks.diminfo[1].strides) = ((__pyx_v_j - __pyx_v_dups) + 2); } goto __pyx_L14; } /* "pandas/algos.pyx":399 * for z in range(j - dups + 1, j + 1): * ranks[i, argsorted[i, z]] = j - dups + 2 * elif tiebreak == TIEBREAK_MAX: # <<<<<<<<<<<<<< * for z in range(j - dups + 1, j + 1): * ranks[i, argsorted[i, z]] = j + 1 */ __pyx_t_23 = ((__pyx_v_tiebreak == __pyx_v_6pandas_5algos_TIEBREAK_MAX) != 0); if (__pyx_t_23) { /* "pandas/algos.pyx":400 * ranks[i, argsorted[i, z]] = j - dups + 2 * elif tiebreak == TIEBREAK_MAX: * for z in range(j - dups + 1, j + 1): # <<<<<<<<<<<<<< * ranks[i, argsorted[i, z]] = j + 1 * elif tiebreak == TIEBREAK_FIRST: */ __pyx_t_24 = (__pyx_v_j + 1); for (__pyx_t_25 = ((__pyx_v_j - __pyx_v_dups) + 1); __pyx_t_25 < __pyx_t_24; __pyx_t_25+=1) { __pyx_v_z = __pyx_t_25; /* "pandas/algos.pyx":401 * elif tiebreak == TIEBREAK_MAX: * for z in range(j - dups + 1, j + 1): * ranks[i, argsorted[i, z]] = j + 1 # <<<<<<<<<<<<<< * elif tiebreak == TIEBREAK_FIRST: * for z in range(j - dups + 1, j + 1): */ __pyx_t_34 = __pyx_v_i; __pyx_t_35 = __pyx_v_z; __pyx_t_3 = -1; if (__pyx_t_34 < 0) { __pyx_t_34 += __pyx_pybuffernd_argsorted.diminfo[0].shape; if (unlikely(__pyx_t_34 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_34 >= __pyx_pybuffernd_argsorted.diminfo[0].shape)) __pyx_t_3 = 0; if (__pyx_t_35 < 0) { __pyx_t_35 += __pyx_pybuffernd_argsorted.diminfo[1].shape; if (unlikely(__pyx_t_35 < 0)) __pyx_t_3 = 1; } else if (unlikely(__pyx_t_35 >= __pyx_pybuffernd_argsorted.diminfo[1].shape)) __pyx_t_3 = 1; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 401; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_36 = __pyx_v_i; __pyx_t_37 = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_argsorted.rcbuffer->pybuffer.buf, __pyx_t_34, __pyx_pybuffernd_argsorted.diminfo[0].strides, __pyx_t_35, __pyx_pybuffernd_argsorted.diminfo[1].strides)); __pyx_t_3 = -1; if (__pyx_t_36 < 0) { __pyx_t_36 += __pyx_pybuffernd_ranks.diminfo[0].shape; if (unlikely(__pyx_t_36 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_36 >= __pyx_pybuffernd_ranks.diminfo[0].shape)) __pyx_t_3 = 0; if (__pyx_t_37 < 0) { __pyx_t_37 += __pyx_pybuffernd_ranks.diminfo[1].shape; if (unlikely(__pyx_t_37 < 0)) __pyx_t_3 = 1; } else if (unlikely(__pyx_t_37 >= __pyx_pybuffernd_ranks.diminfo[1].shape)) __pyx_t_3 = 1; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 401; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_ranks.rcbuffer->pybuffer.buf, __pyx_t_36, __pyx_pybuffernd_ranks.diminfo[0].strides, __pyx_t_37, __pyx_pybuffernd_ranks.diminfo[1].strides) = (__pyx_v_j + 1); } goto __pyx_L14; } /* "pandas/algos.pyx":402 * for z in range(j - dups + 1, j + 1): * ranks[i, argsorted[i, z]] = j + 1 * elif tiebreak == TIEBREAK_FIRST: # <<<<<<<<<<<<<< * for z in range(j - dups + 1, j + 1): * ranks[i, argsorted[i, z]] = z + 1 */ __pyx_t_23 = ((__pyx_v_tiebreak == __pyx_v_6pandas_5algos_TIEBREAK_FIRST) != 0); if (__pyx_t_23) { /* "pandas/algos.pyx":403 * ranks[i, argsorted[i, z]] = j + 1 * elif tiebreak == TIEBREAK_FIRST: * for z in range(j - dups + 1, j + 1): # <<<<<<<<<<<<<< * ranks[i, argsorted[i, z]] = z + 1 * elif tiebreak == TIEBREAK_FIRST_DESCENDING: */ __pyx_t_24 = (__pyx_v_j + 1); for (__pyx_t_25 = ((__pyx_v_j - __pyx_v_dups) + 1); __pyx_t_25 < __pyx_t_24; __pyx_t_25+=1) { __pyx_v_z = __pyx_t_25; /* "pandas/algos.pyx":404 * elif tiebreak == TIEBREAK_FIRST: * for z in range(j - dups + 1, j + 1): * ranks[i, argsorted[i, z]] = z + 1 # <<<<<<<<<<<<<< * elif tiebreak == TIEBREAK_FIRST_DESCENDING: * for z in range(j - dups + 1, j + 1): */ __pyx_t_38 = __pyx_v_i; __pyx_t_39 = __pyx_v_z; __pyx_t_3 = -1; if (__pyx_t_38 < 0) { __pyx_t_38 += __pyx_pybuffernd_argsorted.diminfo[0].shape; if (unlikely(__pyx_t_38 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_38 >= __pyx_pybuffernd_argsorted.diminfo[0].shape)) __pyx_t_3 = 0; if (__pyx_t_39 < 0) { __pyx_t_39 += __pyx_pybuffernd_argsorted.diminfo[1].shape; if (unlikely(__pyx_t_39 < 0)) __pyx_t_3 = 1; } else if (unlikely(__pyx_t_39 >= __pyx_pybuffernd_argsorted.diminfo[1].shape)) __pyx_t_3 = 1; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 404; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_40 = __pyx_v_i; __pyx_t_41 = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_argsorted.rcbuffer->pybuffer.buf, __pyx_t_38, __pyx_pybuffernd_argsorted.diminfo[0].strides, __pyx_t_39, __pyx_pybuffernd_argsorted.diminfo[1].strides)); __pyx_t_3 = -1; if (__pyx_t_40 < 0) { __pyx_t_40 += __pyx_pybuffernd_ranks.diminfo[0].shape; if (unlikely(__pyx_t_40 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_40 >= __pyx_pybuffernd_ranks.diminfo[0].shape)) __pyx_t_3 = 0; if (__pyx_t_41 < 0) { __pyx_t_41 += __pyx_pybuffernd_ranks.diminfo[1].shape; if (unlikely(__pyx_t_41 < 0)) __pyx_t_3 = 1; } else if (unlikely(__pyx_t_41 >= __pyx_pybuffernd_ranks.diminfo[1].shape)) __pyx_t_3 = 1; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 404; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_ranks.rcbuffer->pybuffer.buf, __pyx_t_40, __pyx_pybuffernd_ranks.diminfo[0].strides, __pyx_t_41, __pyx_pybuffernd_ranks.diminfo[1].strides) = (__pyx_v_z + 1); } goto __pyx_L14; } /* "pandas/algos.pyx":405 * for z in range(j - dups + 1, j + 1): * ranks[i, argsorted[i, z]] = z + 1 * elif tiebreak == TIEBREAK_FIRST_DESCENDING: # <<<<<<<<<<<<<< * for z in range(j - dups + 1, j + 1): * ranks[i, argsorted[i, z]] = 2 * j - z - dups + 2 */ __pyx_t_23 = ((__pyx_v_tiebreak == __pyx_v_6pandas_5algos_TIEBREAK_FIRST_DESCENDING) != 0); if (__pyx_t_23) { /* "pandas/algos.pyx":406 * ranks[i, argsorted[i, z]] = z + 1 * elif tiebreak == TIEBREAK_FIRST_DESCENDING: * for z in range(j - dups + 1, j + 1): # <<<<<<<<<<<<<< * ranks[i, argsorted[i, z]] = 2 * j - z - dups + 2 * sum_ranks = dups = 0 */ __pyx_t_24 = (__pyx_v_j + 1); for (__pyx_t_25 = ((__pyx_v_j - __pyx_v_dups) + 1); __pyx_t_25 < __pyx_t_24; __pyx_t_25+=1) { __pyx_v_z = __pyx_t_25; /* "pandas/algos.pyx":407 * elif tiebreak == TIEBREAK_FIRST_DESCENDING: * for z in range(j - dups + 1, j + 1): * ranks[i, argsorted[i, z]] = 2 * j - z - dups + 2 # <<<<<<<<<<<<<< * sum_ranks = dups = 0 * */ __pyx_t_42 = __pyx_v_i; __pyx_t_43 = __pyx_v_z; __pyx_t_3 = -1; if (__pyx_t_42 < 0) { __pyx_t_42 += __pyx_pybuffernd_argsorted.diminfo[0].shape; if (unlikely(__pyx_t_42 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_42 >= __pyx_pybuffernd_argsorted.diminfo[0].shape)) __pyx_t_3 = 0; if (__pyx_t_43 < 0) { __pyx_t_43 += __pyx_pybuffernd_argsorted.diminfo[1].shape; if (unlikely(__pyx_t_43 < 0)) __pyx_t_3 = 1; } else if (unlikely(__pyx_t_43 >= __pyx_pybuffernd_argsorted.diminfo[1].shape)) __pyx_t_3 = 1; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 407; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_44 = __pyx_v_i; __pyx_t_45 = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_argsorted.rcbuffer->pybuffer.buf, __pyx_t_42, __pyx_pybuffernd_argsorted.diminfo[0].strides, __pyx_t_43, __pyx_pybuffernd_argsorted.diminfo[1].strides)); __pyx_t_3 = -1; if (__pyx_t_44 < 0) { __pyx_t_44 += __pyx_pybuffernd_ranks.diminfo[0].shape; if (unlikely(__pyx_t_44 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_44 >= __pyx_pybuffernd_ranks.diminfo[0].shape)) __pyx_t_3 = 0; if (__pyx_t_45 < 0) { __pyx_t_45 += __pyx_pybuffernd_ranks.diminfo[1].shape; if (unlikely(__pyx_t_45 < 0)) __pyx_t_3 = 1; } else if (unlikely(__pyx_t_45 >= __pyx_pybuffernd_ranks.diminfo[1].shape)) __pyx_t_3 = 1; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 407; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_ranks.rcbuffer->pybuffer.buf, __pyx_t_44, __pyx_pybuffernd_ranks.diminfo[0].strides, __pyx_t_45, __pyx_pybuffernd_ranks.diminfo[1].strides) = ((((2 * __pyx_v_j) - __pyx_v_z) - __pyx_v_dups) + 2); } goto __pyx_L14; } __pyx_L14:; /* "pandas/algos.pyx":408 * for z in range(j - dups + 1, j + 1): * ranks[i, argsorted[i, z]] = 2 * j - z - dups + 2 * sum_ranks = dups = 0 # <<<<<<<<<<<<<< * * if axis == 0: */ __pyx_v_sum_ranks = 0; __pyx_v_dups = 0; goto __pyx_L13; } __pyx_L13:; } } /* "pandas/algos.pyx":410 * sum_ranks = dups = 0 * * if axis == 0: # <<<<<<<<<<<<<< * return ranks.T * else: */ __pyx_t_2 = PyObject_RichCompare(__pyx_v_axis, __pyx_int_0, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 410; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_23 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_23 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 410; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_23) { /* "pandas/algos.pyx":411 * * if axis == 0: * return ranks.T # <<<<<<<<<<<<<< * else: * return ranks */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_ranks), __pyx_n_s__T); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 411; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; goto __pyx_L25; } /*else*/ { /* "pandas/algos.pyx":413 * return ranks.T * else: * return ranks # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_ranks)); __pyx_r = ((PyObject *)__pyx_v_ranks); goto __pyx_L0; } __pyx_L25:; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_10); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_argsorted.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_ranks.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.rank_2d_int64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_argsorted.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_ranks.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_ranks); __Pyx_XDECREF((PyObject *)__pyx_v_argsorted); __Pyx_XDECREF((PyObject *)__pyx_v_values); __Pyx_XDECREF(__pyx_v__as); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_9rank_1d_generic(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6pandas_5algos_8rank_1d_generic[] = "\n Fast NaN-friendly version of scipy.stats.rankdata\n "; static PyMethodDef __pyx_mdef_6pandas_5algos_9rank_1d_generic = {__Pyx_NAMESTR("rank_1d_generic"), (PyCFunction)__pyx_pw_6pandas_5algos_9rank_1d_generic, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_5algos_8rank_1d_generic)}; static PyObject *__pyx_pw_6pandas_5algos_9rank_1d_generic(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_in_arr = 0; int __pyx_v_retry; PyObject *__pyx_v_ties_method = 0; PyObject *__pyx_v_ascending = 0; PyObject *__pyx_v_na_option = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("rank_1d_generic (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__in_arr,&__pyx_n_s__retry,&__pyx_n_s__ties_method,&__pyx_n_s__ascending,&__pyx_n_s__na_option,0}; PyObject* values[5] = {0,0,0,0,0}; values[2] = ((PyObject *)__pyx_n_s__average); values[3] = __pyx_k_21; values[4] = ((PyObject *)__pyx_n_s__keep); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__in_arr)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__retry); if (value) { values[1] = value; kw_args--; } } case 2: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__ties_method); if (value) { values[2] = value; kw_args--; } } case 3: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__ascending); if (value) { values[3] = value; kw_args--; } } case 4: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__na_option); if (value) { values[4] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "rank_1d_generic") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 416; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_in_arr = values[0]; if (values[1]) { __pyx_v_retry = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_retry == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 416; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } else { __pyx_v_retry = ((int)1); } __pyx_v_ties_method = values[2]; __pyx_v_ascending = values[3]; __pyx_v_na_option = values[4]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("rank_1d_generic", 0, 1, 5, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 416; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.rank_1d_generic", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pandas_5algos_8rank_1d_generic(__pyx_self, __pyx_v_in_arr, __pyx_v_retry, __pyx_v_ties_method, __pyx_v_ascending, __pyx_v_na_option); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/algos.pyx":416 * * * def rank_1d_generic(object in_arr, bint retry=1, ties_method='average', # <<<<<<<<<<<<<< * ascending=True, na_option='keep'): * """ */ static PyObject *__pyx_pf_6pandas_5algos_8rank_1d_generic(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_in_arr, int __pyx_v_retry, PyObject *__pyx_v_ties_method, PyObject *__pyx_v_ascending, PyObject *__pyx_v_na_option) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_n; Py_ssize_t __pyx_v_dups; PyArrayObject *__pyx_v_ranks = 0; PyArrayObject *__pyx_v_sorted_data = 0; PyArrayObject *__pyx_v_values = 0; PyArrayObject *__pyx_v_argsorted = 0; PyObject *__pyx_v_val = 0; PyObject *__pyx_v_nan_value = 0; __pyx_t_5numpy_float64_t __pyx_v_sum_ranks; int __pyx_v_tiebreak; int __pyx_v_keep_na; PyObject *__pyx_v_mask = NULL; PyObject *__pyx_v__as = NULL; PyObject *__pyx_v_valid_locs = NULL; __Pyx_LocalBuf_ND __pyx_pybuffernd_argsorted; __Pyx_Buffer __pyx_pybuffer_argsorted; __Pyx_LocalBuf_ND __pyx_pybuffernd_ranks; __Pyx_Buffer __pyx_pybuffer_ranks; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_t_3; int __pyx_t_4; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; Py_ssize_t __pyx_t_7; PyArrayObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; PyObject *__pyx_t_11 = NULL; PyObject *__pyx_t_12 = NULL; PyObject *__pyx_t_13 = NULL; PyObject *__pyx_t_14 = NULL; PyObject *__pyx_t_15 = NULL; int __pyx_t_16; PyArrayObject *__pyx_t_17 = NULL; Py_ssize_t __pyx_t_18; Py_ssize_t __pyx_t_19; __pyx_t_5numpy_int64_t __pyx_t_20; int __pyx_t_21; Py_ssize_t __pyx_t_22; Py_ssize_t __pyx_t_23; Py_ssize_t __pyx_t_24; __pyx_t_5numpy_int64_t __pyx_t_25; Py_ssize_t __pyx_t_26; __pyx_t_5numpy_int64_t __pyx_t_27; Py_ssize_t __pyx_t_28; __pyx_t_5numpy_int64_t __pyx_t_29; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("rank_1d_generic", 0); __pyx_pybuffer_ranks.pybuffer.buf = NULL; __pyx_pybuffer_ranks.refcount = 0; __pyx_pybuffernd_ranks.data = NULL; __pyx_pybuffernd_ranks.rcbuffer = &__pyx_pybuffer_ranks; __pyx_pybuffer_argsorted.pybuffer.buf = NULL; __pyx_pybuffer_argsorted.refcount = 0; __pyx_pybuffernd_argsorted.data = NULL; __pyx_pybuffernd_argsorted.rcbuffer = &__pyx_pybuffer_argsorted; /* "pandas/algos.pyx":423 * * cdef: * Py_ssize_t i, j, n, dups = 0 # <<<<<<<<<<<<<< * ndarray[float64_t] ranks * ndarray sorted_data, values */ __pyx_v_dups = 0; /* "pandas/algos.pyx":428 * ndarray[int64_t] argsorted * object val, nan_value * float64_t sum_ranks = 0 # <<<<<<<<<<<<<< * int tiebreak = 0 * bint keep_na = 0 */ __pyx_v_sum_ranks = 0.0; /* "pandas/algos.pyx":429 * object val, nan_value * float64_t sum_ranks = 0 * int tiebreak = 0 # <<<<<<<<<<<<<< * bint keep_na = 0 * */ __pyx_v_tiebreak = 0; /* "pandas/algos.pyx":430 * float64_t sum_ranks = 0 * int tiebreak = 0 * bint keep_na = 0 # <<<<<<<<<<<<<< * * tiebreak = tiebreakers[ties_method] */ __pyx_v_keep_na = 0; /* "pandas/algos.pyx":432 * bint keep_na = 0 * * tiebreak = tiebreakers[ties_method] # <<<<<<<<<<<<<< * * keep_na = na_option == 'keep' */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__tiebreakers); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 432; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyObject_GetItem(__pyx_t_1, __pyx_v_ties_method); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 432; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_3 = __Pyx_PyInt_AsInt(__pyx_t_2); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 432; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_tiebreak = __pyx_t_3; /* "pandas/algos.pyx":434 * tiebreak = tiebreakers[ties_method] * * keep_na = na_option == 'keep' # <<<<<<<<<<<<<< * * values = np.array(in_arr, copy=True) */ __pyx_t_2 = PyObject_RichCompare(__pyx_v_na_option, ((PyObject *)__pyx_n_s__keep), Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 434; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 434; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_keep_na = __pyx_t_4; /* "pandas/algos.pyx":436 * keep_na = na_option == 'keep' * * values = np.array(in_arr, copy=True) # <<<<<<<<<<<<<< * * if values.dtype != np.object_: */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 436; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__array); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 436; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 436; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_in_arr); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_in_arr); __Pyx_GIVEREF(__pyx_v_in_arr); __pyx_t_5 = PyDict_New(); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 436; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_5)); __pyx_t_6 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 436; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); if (PyDict_SetItem(__pyx_t_5, ((PyObject *)__pyx_n_s__copy), __pyx_t_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 436; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), ((PyObject *)__pyx_t_5)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 436; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 436; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_values = ((PyArrayObject *)__pyx_t_6); __pyx_t_6 = 0; /* "pandas/algos.pyx":438 * values = np.array(in_arr, copy=True) * * if values.dtype != np.object_: # <<<<<<<<<<<<<< * values = values.astype('O') * */ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_values), __pyx_n_s__dtype); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 438; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 438; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s__object_); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 438; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyObject_RichCompare(__pyx_t_6, __pyx_t_2, Py_NE); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 438; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 438; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_4) { /* "pandas/algos.pyx":439 * * if values.dtype != np.object_: * values = values.astype('O') # <<<<<<<<<<<<<< * * if ascending ^ (na_option == 'top'): */ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_values), __pyx_n_s__astype); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 439; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_2 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_k_tuple_22), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 439; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 439; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF_SET(__pyx_v_values, ((PyArrayObject *)__pyx_t_2)); __pyx_t_2 = 0; goto __pyx_L3; } __pyx_L3:; /* "pandas/algos.pyx":441 * values = values.astype('O') * * if ascending ^ (na_option == 'top'): # <<<<<<<<<<<<<< * # always greater than everything * nan_value = Infinity() */ __pyx_t_2 = PyObject_RichCompare(__pyx_v_na_option, ((PyObject *)__pyx_n_s__top), Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 441; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_5 = PyNumber_Xor(__pyx_v_ascending, __pyx_t_2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 441; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 441; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_4) { /* "pandas/algos.pyx":443 * if ascending ^ (na_option == 'top'): * # always greater than everything * nan_value = Infinity() # <<<<<<<<<<<<<< * else: * nan_value = NegInfinity() */ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s__Infinity); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 443; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_2 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 443; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_v_nan_value = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L4; } /*else*/ { /* "pandas/algos.pyx":445 * nan_value = Infinity() * else: * nan_value = NegInfinity() # <<<<<<<<<<<<<< * * mask = lib.isnullobj(values) */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__NegInfinity); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 445; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 445; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_nan_value = __pyx_t_5; __pyx_t_5 = 0; } __pyx_L4:; /* "pandas/algos.pyx":447 * nan_value = NegInfinity() * * mask = lib.isnullobj(values) # <<<<<<<<<<<<<< * np.putmask(values, mask, nan_value) * */ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s__lib); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 447; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s__isnullobj); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 447; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 447; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(((PyObject *)__pyx_v_values)); PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_v_values)); __Pyx_GIVEREF(((PyObject *)__pyx_v_values)); __pyx_t_6 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 447; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; __pyx_v_mask = __pyx_t_6; __pyx_t_6 = 0; /* "pandas/algos.pyx":448 * * mask = lib.isnullobj(values) * np.putmask(values, mask, nan_value) # <<<<<<<<<<<<<< * * n = len(values) */ __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 448; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s__putmask); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 448; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 448; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(((PyObject *)__pyx_v_values)); PyTuple_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_v_values)); __Pyx_GIVEREF(((PyObject *)__pyx_v_values)); __Pyx_INCREF(__pyx_v_mask); PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_v_mask); __Pyx_GIVEREF(__pyx_v_mask); __Pyx_INCREF(__pyx_v_nan_value); PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_v_nan_value); __Pyx_GIVEREF(__pyx_v_nan_value); __pyx_t_2 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 448; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/algos.pyx":450 * np.putmask(values, mask, nan_value) * * n = len(values) # <<<<<<<<<<<<<< * ranks = np.empty(n, dtype='f8') * */ __pyx_t_7 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 450; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_7; /* "pandas/algos.pyx":451 * * n = len(values) * ranks = np.empty(n, dtype='f8') # <<<<<<<<<<<<<< * * # py2.5/win32 hack, can't pass i8 */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 451; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__empty); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 451; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_n); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 451; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 451; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 451; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_2)); if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__dtype), ((PyObject *)__pyx_n_s__f8)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 451; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_1 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_t_5), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 451; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 451; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_8 = ((PyArrayObject *)__pyx_t_1); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_ranks.rcbuffer->pybuffer); __pyx_t_3 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_ranks.rcbuffer->pybuffer, (PyObject*)__pyx_t_8, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_3 < 0)) { PyErr_Fetch(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_ranks.rcbuffer->pybuffer, (PyObject*)__pyx_v_ranks, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_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_pybuffernd_ranks.diminfo[0].strides = __pyx_pybuffernd_ranks.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_ranks.diminfo[0].shape = __pyx_pybuffernd_ranks.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 451; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_8 = 0; __pyx_v_ranks = ((PyArrayObject *)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/algos.pyx":454 * * # py2.5/win32 hack, can't pass i8 * try: # <<<<<<<<<<<<<< * _as = values.argsort() * except TypeError: */ { __Pyx_ExceptionSave(&__pyx_t_11, &__pyx_t_10, &__pyx_t_9); __Pyx_XGOTREF(__pyx_t_11); __Pyx_XGOTREF(__pyx_t_10); __Pyx_XGOTREF(__pyx_t_9); /*try:*/ { /* "pandas/algos.pyx":455 * # py2.5/win32 hack, can't pass i8 * try: * _as = values.argsort() # <<<<<<<<<<<<<< * except TypeError: * if not retry: */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_values), __pyx_n_s__argsort); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 455; __pyx_clineno = __LINE__; goto __pyx_L5_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 455; __pyx_clineno = __LINE__; goto __pyx_L5_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v__as = __pyx_t_2; __pyx_t_2 = 0; } __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; goto __pyx_L12_try_end; __pyx_L5_error:; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/algos.pyx":456 * try: * _as = values.argsort() * except TypeError: # <<<<<<<<<<<<<< * if not retry: * raise */ __pyx_t_3 = PyErr_ExceptionMatches(__pyx_builtin_TypeError); if (__pyx_t_3) { __Pyx_AddTraceback("pandas.algos.rank_1d_generic", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_1, &__pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 456; __pyx_clineno = __LINE__; goto __pyx_L7_except_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_GOTREF(__pyx_t_1); __Pyx_GOTREF(__pyx_t_5); /* "pandas/algos.pyx":457 * _as = values.argsort() * except TypeError: * if not retry: # <<<<<<<<<<<<<< * raise * */ __pyx_t_4 = ((!(__pyx_v_retry != 0)) != 0); if (__pyx_t_4) { /* "pandas/algos.pyx":458 * except TypeError: * if not retry: * raise # <<<<<<<<<<<<<< * * valid_locs = (-mask).nonzero()[0] */ __Pyx_GIVEREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_5); __Pyx_ErrRestore(__pyx_t_2, __pyx_t_1, __pyx_t_5); __pyx_t_2 = 0; __pyx_t_1 = 0; __pyx_t_5 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 458; __pyx_clineno = __LINE__; goto __pyx_L7_except_error;} goto __pyx_L15; } __pyx_L15:; /* "pandas/algos.pyx":460 * raise * * valid_locs = (-mask).nonzero()[0] # <<<<<<<<<<<<<< * ranks.put(valid_locs, rank_1d_generic(values.take(valid_locs), 0, * ties_method=ties_method, */ __pyx_t_6 = PyNumber_Negative(__pyx_v_mask); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 460; __pyx_clineno = __LINE__; goto __pyx_L7_except_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s__nonzero); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 460; __pyx_clineno = __LINE__; goto __pyx_L7_except_error;} __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyObject_Call(__pyx_t_12, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 460; __pyx_clineno = __LINE__; goto __pyx_L7_except_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __pyx_t_12 = __Pyx_GetItemInt(__pyx_t_6, 0, sizeof(long), PyInt_FromLong, 0, 0, 1); if (!__pyx_t_12) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 460; __pyx_clineno = __LINE__; goto __pyx_L7_except_error;} __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_v_valid_locs = __pyx_t_12; __pyx_t_12 = 0; /* "pandas/algos.pyx":461 * * valid_locs = (-mask).nonzero()[0] * ranks.put(valid_locs, rank_1d_generic(values.take(valid_locs), 0, # <<<<<<<<<<<<<< * ties_method=ties_method, * ascending=ascending)) */ __pyx_t_12 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_ranks), __pyx_n_s__put); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 461; __pyx_clineno = __LINE__; goto __pyx_L7_except_error;} __Pyx_GOTREF(__pyx_t_12); __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s__rank_1d_generic); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 461; __pyx_clineno = __LINE__; goto __pyx_L7_except_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_13 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_values), __pyx_n_s__take); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 461; __pyx_clineno = __LINE__; goto __pyx_L7_except_error;} __Pyx_GOTREF(__pyx_t_13); __pyx_t_14 = PyTuple_New(1); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 461; __pyx_clineno = __LINE__; goto __pyx_L7_except_error;} __Pyx_GOTREF(__pyx_t_14); __Pyx_INCREF(__pyx_v_valid_locs); PyTuple_SET_ITEM(__pyx_t_14, 0, __pyx_v_valid_locs); __Pyx_GIVEREF(__pyx_v_valid_locs); __pyx_t_15 = PyObject_Call(__pyx_t_13, ((PyObject *)__pyx_t_14), NULL); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 461; __pyx_clineno = __LINE__; goto __pyx_L7_except_error;} __Pyx_GOTREF(__pyx_t_15); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_14)); __pyx_t_14 = 0; __pyx_t_14 = PyTuple_New(2); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 461; __pyx_clineno = __LINE__; goto __pyx_L7_except_error;} __Pyx_GOTREF(__pyx_t_14); PyTuple_SET_ITEM(__pyx_t_14, 0, __pyx_t_15); __Pyx_GIVEREF(__pyx_t_15); __Pyx_INCREF(__pyx_int_0); PyTuple_SET_ITEM(__pyx_t_14, 1, __pyx_int_0); __Pyx_GIVEREF(__pyx_int_0); __pyx_t_15 = 0; __pyx_t_15 = PyDict_New(); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 461; __pyx_clineno = __LINE__; goto __pyx_L7_except_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_15)); /* "pandas/algos.pyx":462 * valid_locs = (-mask).nonzero()[0] * ranks.put(valid_locs, rank_1d_generic(values.take(valid_locs), 0, * ties_method=ties_method, # <<<<<<<<<<<<<< * ascending=ascending)) * np.putmask(ranks, mask, np.nan) */ if (PyDict_SetItem(__pyx_t_15, ((PyObject *)__pyx_n_s__ties_method), __pyx_v_ties_method) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 461; __pyx_clineno = __LINE__; goto __pyx_L7_except_error;} /* "pandas/algos.pyx":463 * ranks.put(valid_locs, rank_1d_generic(values.take(valid_locs), 0, * ties_method=ties_method, * ascending=ascending)) # <<<<<<<<<<<<<< * np.putmask(ranks, mask, np.nan) * return ranks */ if (PyDict_SetItem(__pyx_t_15, ((PyObject *)__pyx_n_s__ascending), __pyx_v_ascending) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 461; __pyx_clineno = __LINE__; goto __pyx_L7_except_error;} __pyx_t_13 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_t_14), ((PyObject *)__pyx_t_15)); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 461; __pyx_clineno = __LINE__; goto __pyx_L7_except_error;} __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_14)); __pyx_t_14 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_15)); __pyx_t_15 = 0; __pyx_t_15 = PyTuple_New(2); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 461; __pyx_clineno = __LINE__; goto __pyx_L7_except_error;} __Pyx_GOTREF(__pyx_t_15); __Pyx_INCREF(__pyx_v_valid_locs); PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_v_valid_locs); __Pyx_GIVEREF(__pyx_v_valid_locs); PyTuple_SET_ITEM(__pyx_t_15, 1, __pyx_t_13); __Pyx_GIVEREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_13 = PyObject_Call(__pyx_t_12, ((PyObject *)__pyx_t_15), NULL); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 461; __pyx_clineno = __LINE__; goto __pyx_L7_except_error;} __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_15)); __pyx_t_15 = 0; __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; /* "pandas/algos.pyx":464 * ties_method=ties_method, * ascending=ascending)) * np.putmask(ranks, mask, np.nan) # <<<<<<<<<<<<<< * return ranks * */ __pyx_t_13 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 464; __pyx_clineno = __LINE__; goto __pyx_L7_except_error;} __Pyx_GOTREF(__pyx_t_13); __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_t_13, __pyx_n_s__putmask); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 464; __pyx_clineno = __LINE__; goto __pyx_L7_except_error;} __Pyx_GOTREF(__pyx_t_15); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_13 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 464; __pyx_clineno = __LINE__; goto __pyx_L7_except_error;} __Pyx_GOTREF(__pyx_t_13); __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_13, __pyx_n_s__nan); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 464; __pyx_clineno = __LINE__; goto __pyx_L7_except_error;} __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_13 = PyTuple_New(3); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 464; __pyx_clineno = __LINE__; goto __pyx_L7_except_error;} __Pyx_GOTREF(__pyx_t_13); __Pyx_INCREF(((PyObject *)__pyx_v_ranks)); PyTuple_SET_ITEM(__pyx_t_13, 0, ((PyObject *)__pyx_v_ranks)); __Pyx_GIVEREF(((PyObject *)__pyx_v_ranks)); __Pyx_INCREF(__pyx_v_mask); PyTuple_SET_ITEM(__pyx_t_13, 1, __pyx_v_mask); __Pyx_GIVEREF(__pyx_v_mask); PyTuple_SET_ITEM(__pyx_t_13, 2, __pyx_t_12); __Pyx_GIVEREF(__pyx_t_12); __pyx_t_12 = 0; __pyx_t_12 = PyObject_Call(__pyx_t_15, ((PyObject *)__pyx_t_13), NULL); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 464; __pyx_clineno = __LINE__; goto __pyx_L7_except_error;} __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_13)); __pyx_t_13 = 0; __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; /* "pandas/algos.pyx":465 * ascending=ascending)) * np.putmask(ranks, mask, np.nan) * return ranks # <<<<<<<<<<<<<< * * if not ascending: */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_ranks)); __pyx_r = ((PyObject *)__pyx_v_ranks); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; goto __pyx_L8_except_return; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; goto __pyx_L6_exception_handled; } __pyx_L7_except_error:; __Pyx_XGIVEREF(__pyx_t_11); __Pyx_XGIVEREF(__pyx_t_10); __Pyx_XGIVEREF(__pyx_t_9); __Pyx_ExceptionReset(__pyx_t_11, __pyx_t_10, __pyx_t_9); goto __pyx_L1_error; __pyx_L8_except_return:; __Pyx_XGIVEREF(__pyx_t_11); __Pyx_XGIVEREF(__pyx_t_10); __Pyx_XGIVEREF(__pyx_t_9); __Pyx_ExceptionReset(__pyx_t_11, __pyx_t_10, __pyx_t_9); goto __pyx_L0; __pyx_L6_exception_handled:; __Pyx_XGIVEREF(__pyx_t_11); __Pyx_XGIVEREF(__pyx_t_10); __Pyx_XGIVEREF(__pyx_t_9); __Pyx_ExceptionReset(__pyx_t_11, __pyx_t_10, __pyx_t_9); __pyx_L12_try_end:; } /* "pandas/algos.pyx":467 * return ranks * * if not ascending: # <<<<<<<<<<<<<< * _as = _as[::-1] * */ __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_ascending); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 467; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_16 = ((!__pyx_t_4) != 0); if (__pyx_t_16) { /* "pandas/algos.pyx":468 * * if not ascending: * _as = _as[::-1] # <<<<<<<<<<<<<< * * sorted_data = values.take(_as) */ __pyx_t_5 = PyObject_GetItem(__pyx_v__as, __pyx_k_slice_23); if (!__pyx_t_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 468; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF_SET(__pyx_v__as, __pyx_t_5); __pyx_t_5 = 0; goto __pyx_L16; } __pyx_L16:; /* "pandas/algos.pyx":470 * _as = _as[::-1] * * sorted_data = values.take(_as) # <<<<<<<<<<<<<< * argsorted = _as.astype('i8') * */ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_values), __pyx_n_s__take); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 470; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 470; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v__as); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v__as); __Pyx_GIVEREF(__pyx_v__as); __pyx_t_2 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 470; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 470; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_sorted_data = ((PyArrayObject *)__pyx_t_2); __pyx_t_2 = 0; /* "pandas/algos.pyx":471 * * sorted_data = values.take(_as) * argsorted = _as.astype('i8') # <<<<<<<<<<<<<< * * for i in range(n): */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v__as, __pyx_n_s__astype); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 471; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_k_tuple_24), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 471; __pyx_clineno = __LINE__; goto __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_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 471; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_17 = ((PyArrayObject *)__pyx_t_1); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_argsorted.rcbuffer->pybuffer); __pyx_t_3 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_argsorted.rcbuffer->pybuffer, (PyObject*)__pyx_t_17, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_3 < 0)) { PyErr_Fetch(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_argsorted.rcbuffer->pybuffer, (PyObject*)__pyx_v_argsorted, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_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_pybuffernd_argsorted.diminfo[0].strides = __pyx_pybuffernd_argsorted.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_argsorted.diminfo[0].shape = __pyx_pybuffernd_argsorted.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 471; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_17 = 0; __pyx_v_argsorted = ((PyArrayObject *)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/algos.pyx":473 * argsorted = _as.astype('i8') * * for i in range(n): # <<<<<<<<<<<<<< * sum_ranks += i + 1 * dups += 1 */ __pyx_t_7 = __pyx_v_n; for (__pyx_t_18 = 0; __pyx_t_18 < __pyx_t_7; __pyx_t_18+=1) { __pyx_v_i = __pyx_t_18; /* "pandas/algos.pyx":474 * * for i in range(n): * sum_ranks += i + 1 # <<<<<<<<<<<<<< * dups += 1 * val = util.get_value_at(sorted_data, i) */ __pyx_v_sum_ranks = (__pyx_v_sum_ranks + (__pyx_v_i + 1)); /* "pandas/algos.pyx":475 * for i in range(n): * sum_ranks += i + 1 * dups += 1 # <<<<<<<<<<<<<< * val = util.get_value_at(sorted_data, i) * if val is nan_value and keep_na: */ __pyx_v_dups = (__pyx_v_dups + 1); /* "pandas/algos.pyx":476 * sum_ranks += i + 1 * dups += 1 * val = util.get_value_at(sorted_data, i) # <<<<<<<<<<<<<< * if val is nan_value and keep_na: * ranks[argsorted[i]] = nan */ __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_i); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 476; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __pyx_f_4util_get_value_at(__pyx_v_sorted_data, __pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 476; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF_SET(__pyx_v_val, __pyx_t_2); __pyx_t_2 = 0; /* "pandas/algos.pyx":477 * dups += 1 * val = util.get_value_at(sorted_data, i) * if val is nan_value and keep_na: # <<<<<<<<<<<<<< * ranks[argsorted[i]] = nan * continue */ __pyx_t_16 = (__pyx_v_val == __pyx_v_nan_value); if ((__pyx_t_16 != 0)) { __pyx_t_4 = (__pyx_v_keep_na != 0); } else { __pyx_t_4 = (__pyx_t_16 != 0); } if (__pyx_t_4) { /* "pandas/algos.pyx":478 * val = util.get_value_at(sorted_data, i) * if val is nan_value and keep_na: * ranks[argsorted[i]] = nan # <<<<<<<<<<<<<< * continue * if (i == n - 1 or */ __pyx_t_19 = __pyx_v_i; __pyx_t_3 = -1; if (__pyx_t_19 < 0) { __pyx_t_19 += __pyx_pybuffernd_argsorted.diminfo[0].shape; if (unlikely(__pyx_t_19 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_19 >= __pyx_pybuffernd_argsorted.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 478; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_20 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_argsorted.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_argsorted.diminfo[0].strides)); __pyx_t_3 = -1; if (__pyx_t_20 < 0) { __pyx_t_20 += __pyx_pybuffernd_ranks.diminfo[0].shape; if (unlikely(__pyx_t_20 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_20 >= __pyx_pybuffernd_ranks.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 478; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_ranks.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_ranks.diminfo[0].strides) = __pyx_v_6pandas_5algos_nan; /* "pandas/algos.pyx":479 * if val is nan_value and keep_na: * ranks[argsorted[i]] = nan * continue # <<<<<<<<<<<<<< * if (i == n - 1 or * are_diff(util.get_value_at(sorted_data, i + 1), val)): */ goto __pyx_L17_continue; goto __pyx_L19; } __pyx_L19:; /* "pandas/algos.pyx":480 * ranks[argsorted[i]] = nan * continue * if (i == n - 1 or # <<<<<<<<<<<<<< * are_diff(util.get_value_at(sorted_data, i + 1), val)): * if tiebreak == TIEBREAK_AVERAGE: */ __pyx_t_4 = (__pyx_v_i == (__pyx_v_n - 1)); if (!__pyx_t_4) { /* "pandas/algos.pyx":481 * continue * if (i == n - 1 or * are_diff(util.get_value_at(sorted_data, i + 1), val)): # <<<<<<<<<<<<<< * if tiebreak == TIEBREAK_AVERAGE: * for j in range(i - dups + 1, i + 1): */ __pyx_t_2 = PyInt_FromSsize_t((__pyx_v_i + 1)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 481; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __pyx_f_4util_get_value_at(__pyx_v_sorted_data, __pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 481; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __pyx_f_6pandas_5algos_are_diff(__pyx_t_1, __pyx_v_val); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 481; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_16 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_16 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 481; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_21 = __pyx_t_16; } else { __pyx_t_21 = __pyx_t_4; } if (__pyx_t_21) { /* "pandas/algos.pyx":482 * if (i == n - 1 or * are_diff(util.get_value_at(sorted_data, i + 1), val)): * if tiebreak == TIEBREAK_AVERAGE: # <<<<<<<<<<<<<< * for j in range(i - dups + 1, i + 1): * ranks[argsorted[j]] = sum_ranks / dups */ __pyx_t_21 = ((__pyx_v_tiebreak == __pyx_v_6pandas_5algos_TIEBREAK_AVERAGE) != 0); if (__pyx_t_21) { /* "pandas/algos.pyx":483 * are_diff(util.get_value_at(sorted_data, i + 1), val)): * if tiebreak == TIEBREAK_AVERAGE: * for j in range(i - dups + 1, i + 1): # <<<<<<<<<<<<<< * ranks[argsorted[j]] = sum_ranks / dups * elif tiebreak == TIEBREAK_MIN: */ __pyx_t_22 = (__pyx_v_i + 1); for (__pyx_t_23 = ((__pyx_v_i - __pyx_v_dups) + 1); __pyx_t_23 < __pyx_t_22; __pyx_t_23+=1) { __pyx_v_j = __pyx_t_23; /* "pandas/algos.pyx":484 * if tiebreak == TIEBREAK_AVERAGE: * for j in range(i - dups + 1, i + 1): * ranks[argsorted[j]] = sum_ranks / dups # <<<<<<<<<<<<<< * elif tiebreak == TIEBREAK_MIN: * for j in range(i - dups + 1, i + 1): */ if (unlikely(__pyx_v_dups == 0)) { #ifdef WITH_THREAD PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure(); #endif PyErr_Format(PyExc_ZeroDivisionError, "float division"); #ifdef WITH_THREAD PyGILState_Release(__pyx_gilstate_save); #endif {__pyx_filename = __pyx_f[0]; __pyx_lineno = 484; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_24 = __pyx_v_j; __pyx_t_3 = -1; if (__pyx_t_24 < 0) { __pyx_t_24 += __pyx_pybuffernd_argsorted.diminfo[0].shape; if (unlikely(__pyx_t_24 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_24 >= __pyx_pybuffernd_argsorted.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 484; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_25 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_argsorted.rcbuffer->pybuffer.buf, __pyx_t_24, __pyx_pybuffernd_argsorted.diminfo[0].strides)); __pyx_t_3 = -1; if (__pyx_t_25 < 0) { __pyx_t_25 += __pyx_pybuffernd_ranks.diminfo[0].shape; if (unlikely(__pyx_t_25 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_25 >= __pyx_pybuffernd_ranks.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 484; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_ranks.rcbuffer->pybuffer.buf, __pyx_t_25, __pyx_pybuffernd_ranks.diminfo[0].strides) = (__pyx_v_sum_ranks / __pyx_v_dups); } goto __pyx_L21; } /* "pandas/algos.pyx":485 * for j in range(i - dups + 1, i + 1): * ranks[argsorted[j]] = sum_ranks / dups * elif tiebreak == TIEBREAK_MIN: # <<<<<<<<<<<<<< * for j in range(i - dups + 1, i + 1): * ranks[argsorted[j]] = i - dups + 2 */ __pyx_t_21 = ((__pyx_v_tiebreak == __pyx_v_6pandas_5algos_TIEBREAK_MIN) != 0); if (__pyx_t_21) { /* "pandas/algos.pyx":486 * ranks[argsorted[j]] = sum_ranks / dups * elif tiebreak == TIEBREAK_MIN: * for j in range(i - dups + 1, i + 1): # <<<<<<<<<<<<<< * ranks[argsorted[j]] = i - dups + 2 * elif tiebreak == TIEBREAK_MAX: */ __pyx_t_22 = (__pyx_v_i + 1); for (__pyx_t_23 = ((__pyx_v_i - __pyx_v_dups) + 1); __pyx_t_23 < __pyx_t_22; __pyx_t_23+=1) { __pyx_v_j = __pyx_t_23; /* "pandas/algos.pyx":487 * elif tiebreak == TIEBREAK_MIN: * for j in range(i - dups + 1, i + 1): * ranks[argsorted[j]] = i - dups + 2 # <<<<<<<<<<<<<< * elif tiebreak == TIEBREAK_MAX: * for j in range(i - dups + 1, i + 1): */ __pyx_t_26 = __pyx_v_j; __pyx_t_3 = -1; if (__pyx_t_26 < 0) { __pyx_t_26 += __pyx_pybuffernd_argsorted.diminfo[0].shape; if (unlikely(__pyx_t_26 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_26 >= __pyx_pybuffernd_argsorted.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 487; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_27 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_argsorted.rcbuffer->pybuffer.buf, __pyx_t_26, __pyx_pybuffernd_argsorted.diminfo[0].strides)); __pyx_t_3 = -1; if (__pyx_t_27 < 0) { __pyx_t_27 += __pyx_pybuffernd_ranks.diminfo[0].shape; if (unlikely(__pyx_t_27 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_27 >= __pyx_pybuffernd_ranks.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 487; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_ranks.rcbuffer->pybuffer.buf, __pyx_t_27, __pyx_pybuffernd_ranks.diminfo[0].strides) = ((__pyx_v_i - __pyx_v_dups) + 2); } goto __pyx_L21; } /* "pandas/algos.pyx":488 * for j in range(i - dups + 1, i + 1): * ranks[argsorted[j]] = i - dups + 2 * elif tiebreak == TIEBREAK_MAX: # <<<<<<<<<<<<<< * for j in range(i - dups + 1, i + 1): * ranks[argsorted[j]] = i + 1 */ __pyx_t_21 = ((__pyx_v_tiebreak == __pyx_v_6pandas_5algos_TIEBREAK_MAX) != 0); if (__pyx_t_21) { /* "pandas/algos.pyx":489 * ranks[argsorted[j]] = i - dups + 2 * elif tiebreak == TIEBREAK_MAX: * for j in range(i - dups + 1, i + 1): # <<<<<<<<<<<<<< * ranks[argsorted[j]] = i + 1 * elif tiebreak == TIEBREAK_FIRST: */ __pyx_t_22 = (__pyx_v_i + 1); for (__pyx_t_23 = ((__pyx_v_i - __pyx_v_dups) + 1); __pyx_t_23 < __pyx_t_22; __pyx_t_23+=1) { __pyx_v_j = __pyx_t_23; /* "pandas/algos.pyx":490 * elif tiebreak == TIEBREAK_MAX: * for j in range(i - dups + 1, i + 1): * ranks[argsorted[j]] = i + 1 # <<<<<<<<<<<<<< * elif tiebreak == TIEBREAK_FIRST: * raise ValueError('first not supported for non-numeric data') */ __pyx_t_28 = __pyx_v_j; __pyx_t_3 = -1; if (__pyx_t_28 < 0) { __pyx_t_28 += __pyx_pybuffernd_argsorted.diminfo[0].shape; if (unlikely(__pyx_t_28 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_28 >= __pyx_pybuffernd_argsorted.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 490; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_29 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_argsorted.rcbuffer->pybuffer.buf, __pyx_t_28, __pyx_pybuffernd_argsorted.diminfo[0].strides)); __pyx_t_3 = -1; if (__pyx_t_29 < 0) { __pyx_t_29 += __pyx_pybuffernd_ranks.diminfo[0].shape; if (unlikely(__pyx_t_29 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_29 >= __pyx_pybuffernd_ranks.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 490; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_ranks.rcbuffer->pybuffer.buf, __pyx_t_29, __pyx_pybuffernd_ranks.diminfo[0].strides) = (__pyx_v_i + 1); } goto __pyx_L21; } /* "pandas/algos.pyx":491 * for j in range(i - dups + 1, i + 1): * ranks[argsorted[j]] = i + 1 * elif tiebreak == TIEBREAK_FIRST: # <<<<<<<<<<<<<< * raise ValueError('first not supported for non-numeric data') * sum_ranks = dups = 0 */ __pyx_t_21 = ((__pyx_v_tiebreak == __pyx_v_6pandas_5algos_TIEBREAK_FIRST) != 0); if (__pyx_t_21) { /* "pandas/algos.pyx":492 * ranks[argsorted[j]] = i + 1 * elif tiebreak == TIEBREAK_FIRST: * raise ValueError('first not supported for non-numeric data') # <<<<<<<<<<<<<< * sum_ranks = dups = 0 * return ranks */ __pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_26), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 492; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 492; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L21; } __pyx_L21:; /* "pandas/algos.pyx":493 * elif tiebreak == TIEBREAK_FIRST: * raise ValueError('first not supported for non-numeric data') * sum_ranks = dups = 0 # <<<<<<<<<<<<<< * return ranks * */ __pyx_v_sum_ranks = 0; __pyx_v_dups = 0; goto __pyx_L20; } __pyx_L20:; __pyx_L17_continue:; } /* "pandas/algos.pyx":494 * raise ValueError('first not supported for non-numeric data') * sum_ranks = dups = 0 * return ranks # <<<<<<<<<<<<<< * * cdef inline are_diff(object left, object right): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_ranks)); __pyx_r = ((PyObject *)__pyx_v_ranks); goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_12); __Pyx_XDECREF(__pyx_t_13); __Pyx_XDECREF(__pyx_t_14); __Pyx_XDECREF(__pyx_t_15); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_argsorted.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_ranks.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.rank_1d_generic", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_argsorted.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_ranks.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_ranks); __Pyx_XDECREF((PyObject *)__pyx_v_sorted_data); __Pyx_XDECREF((PyObject *)__pyx_v_values); __Pyx_XDECREF((PyObject *)__pyx_v_argsorted); __Pyx_XDECREF(__pyx_v_val); __Pyx_XDECREF(__pyx_v_nan_value); __Pyx_XDECREF(__pyx_v_mask); __Pyx_XDECREF(__pyx_v__as); __Pyx_XDECREF(__pyx_v_valid_locs); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/algos.pyx":496 * return ranks * * cdef inline are_diff(object left, object right): # <<<<<<<<<<<<<< * try: * return fabs(left - right) > FP_ERR */ static CYTHON_INLINE PyObject *__pyx_f_6pandas_5algos_are_diff(PyObject *__pyx_v_left, PyObject *__pyx_v_right) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; double __pyx_t_5; int __pyx_t_6; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("are_diff", 0); /* "pandas/algos.pyx":497 * * cdef inline are_diff(object left, object right): * try: # <<<<<<<<<<<<<< * return fabs(left - right) > FP_ERR * except TypeError: */ { __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:*/ { /* "pandas/algos.pyx":498 * cdef inline are_diff(object left, object right): * try: * return fabs(left - right) > FP_ERR # <<<<<<<<<<<<<< * except TypeError: * return left != right */ __Pyx_XDECREF(__pyx_r); __pyx_t_4 = PyNumber_Subtract(__pyx_v_left, __pyx_v_right); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 498; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __pyx_PyFloat_AsDouble(__pyx_t_4); if (unlikely((__pyx_t_5 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 498; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyBool_FromLong((fabs(__pyx_t_5) > __pyx_v_6pandas_5algos_FP_ERR)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 498; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L7_try_return; } __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L10_try_end; __pyx_L7_try_return:; __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); goto __pyx_L0; __pyx_L3_error:; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; /* "pandas/algos.pyx":499 * try: * return fabs(left - right) > FP_ERR * except TypeError: # <<<<<<<<<<<<<< * return left != right * */ __pyx_t_6 = PyErr_ExceptionMatches(__pyx_builtin_TypeError); if (__pyx_t_6) { __Pyx_AddTraceback("pandas.algos.are_diff", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_7, &__pyx_t_8) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 499; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_GOTREF(__pyx_t_7); __Pyx_GOTREF(__pyx_t_8); /* "pandas/algos.pyx":500 * return fabs(left - right) > FP_ERR * except TypeError: * return left != right # <<<<<<<<<<<<<< * * _return_false = lambda self, other: False */ __Pyx_XDECREF(__pyx_r); __pyx_t_9 = PyObject_RichCompare(__pyx_v_left, __pyx_v_right, Py_NE); __Pyx_XGOTREF(__pyx_t_9); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 500; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} __pyx_r = __pyx_t_9; __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; goto __pyx_L6_except_return; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; goto __pyx_L4_exception_handled; } __pyx_L5_except_error:; __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); goto __pyx_L1_error; __pyx_L6_except_return:; __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); goto __pyx_L0; __pyx_L4_exception_handled:; __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); __pyx_L10_try_end:; } __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); __Pyx_AddTraceback("pandas.algos.are_diff", __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_5algos_11rank_2d_generic(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6pandas_5algos_10rank_2d_generic[] = "\n Fast NaN-friendly version of scipy.stats.rankdata\n "; static PyMethodDef __pyx_mdef_6pandas_5algos_11rank_2d_generic = {__Pyx_NAMESTR("rank_2d_generic"), (PyCFunction)__pyx_pw_6pandas_5algos_11rank_2d_generic, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_5algos_10rank_2d_generic)}; static PyObject *__pyx_pw_6pandas_5algos_11rank_2d_generic(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_in_arr = 0; PyObject *__pyx_v_axis = 0; PyObject *__pyx_v_ties_method = 0; PyObject *__pyx_v_ascending = 0; PyObject *__pyx_v_na_option = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("rank_2d_generic (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__in_arr,&__pyx_n_s__axis,&__pyx_n_s__ties_method,&__pyx_n_s__ascending,&__pyx_n_s__na_option,0}; PyObject* values[5] = {0,0,0,0,0}; values[1] = ((PyObject *)__pyx_int_0); values[2] = ((PyObject *)__pyx_n_s__average); values[3] = __pyx_k_27; values[4] = ((PyObject *)__pyx_n_s__keep); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__in_arr)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__axis); if (value) { values[1] = value; kw_args--; } } case 2: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__ties_method); if (value) { values[2] = value; kw_args--; } } case 3: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__ascending); if (value) { values[3] = value; kw_args--; } } case 4: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__na_option); if (value) { values[4] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "rank_2d_generic") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 525; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_in_arr = values[0]; __pyx_v_axis = values[1]; __pyx_v_ties_method = values[2]; __pyx_v_ascending = values[3]; __pyx_v_na_option = values[4]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("rank_2d_generic", 0, 1, 5, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 525; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.rank_2d_generic", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pandas_5algos_10rank_2d_generic(__pyx_self, __pyx_v_in_arr, __pyx_v_axis, __pyx_v_ties_method, __pyx_v_ascending, __pyx_v_na_option); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/algos.pyx":525 * __cmp__ = _return_true * * def rank_2d_generic(object in_arr, axis=0, ties_method='average', # <<<<<<<<<<<<<< * ascending=True, na_option='keep'): * """ */ static PyObject *__pyx_pf_6pandas_5algos_10rank_2d_generic(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_in_arr, PyObject *__pyx_v_axis, PyObject *__pyx_v_ties_method, PyObject *__pyx_v_ascending, PyObject *__pyx_v_na_option) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_z; Py_ssize_t __pyx_v_k; Py_ssize_t __pyx_v_n; Py_ssize_t __pyx_v_infs; Py_ssize_t __pyx_v_dups; PyArrayObject *__pyx_v_ranks = 0; PyArrayObject *__pyx_v_values = 0; PyArrayObject *__pyx_v_argsorted = 0; PyObject *__pyx_v_val = 0; PyObject *__pyx_v_nan_value = 0; __pyx_t_5numpy_float64_t __pyx_v_sum_ranks; int __pyx_v_tiebreak; int __pyx_v_keep_na; PyObject *__pyx_v_mask = NULL; PyObject *__pyx_v__as = NULL; __Pyx_LocalBuf_ND __pyx_pybuffernd_argsorted; __Pyx_Buffer __pyx_pybuffer_argsorted; __Pyx_LocalBuf_ND __pyx_pybuffernd_ranks; __Pyx_Buffer __pyx_pybuffer_ranks; __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; int __pyx_t_3; int __pyx_t_4; PyObject *__pyx_t_5 = NULL; PyArrayObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; PyObject *(*__pyx_t_11)(PyObject *); Py_ssize_t __pyx_t_12; Py_ssize_t __pyx_t_13; PyArrayObject *__pyx_t_14 = NULL; PyObject *__pyx_t_15 = NULL; PyObject *__pyx_t_16 = NULL; PyObject *__pyx_t_17 = NULL; PyObject *__pyx_t_18 = NULL; PyObject *__pyx_t_19 = NULL; PyObject *__pyx_t_20 = NULL; int __pyx_t_21; PyArrayObject *__pyx_t_22 = NULL; 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; __pyx_t_5numpy_int64_t __pyx_t_30; Py_ssize_t __pyx_t_31; Py_ssize_t __pyx_t_32; int __pyx_t_33; Py_ssize_t __pyx_t_34; Py_ssize_t __pyx_t_35; Py_ssize_t __pyx_t_36; Py_ssize_t __pyx_t_37; Py_ssize_t __pyx_t_38; __pyx_t_5numpy_int64_t __pyx_t_39; Py_ssize_t __pyx_t_40; Py_ssize_t __pyx_t_41; Py_ssize_t __pyx_t_42; __pyx_t_5numpy_int64_t __pyx_t_43; Py_ssize_t __pyx_t_44; Py_ssize_t __pyx_t_45; Py_ssize_t __pyx_t_46; __pyx_t_5numpy_int64_t __pyx_t_47; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("rank_2d_generic", 0); __Pyx_INCREF(__pyx_v_in_arr); __pyx_pybuffer_ranks.pybuffer.buf = NULL; __pyx_pybuffer_ranks.refcount = 0; __pyx_pybuffernd_ranks.data = NULL; __pyx_pybuffernd_ranks.rcbuffer = &__pyx_pybuffer_ranks; __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_argsorted.pybuffer.buf = NULL; __pyx_pybuffer_argsorted.refcount = 0; __pyx_pybuffernd_argsorted.data = NULL; __pyx_pybuffernd_argsorted.rcbuffer = &__pyx_pybuffer_argsorted; /* "pandas/algos.pyx":532 * * cdef: * Py_ssize_t i, j, z, k, n, infs, dups = 0 # <<<<<<<<<<<<<< * ndarray[float64_t, ndim=2] ranks * ndarray[object, ndim=2] values */ __pyx_v_dups = 0; /* "pandas/algos.pyx":537 * ndarray[int64_t, ndim=2] argsorted * object val, nan_value * float64_t sum_ranks = 0 # <<<<<<<<<<<<<< * int tiebreak = 0 * bint keep_na = 0 */ __pyx_v_sum_ranks = 0.0; /* "pandas/algos.pyx":538 * object val, nan_value * float64_t sum_ranks = 0 * int tiebreak = 0 # <<<<<<<<<<<<<< * bint keep_na = 0 * */ __pyx_v_tiebreak = 0; /* "pandas/algos.pyx":539 * float64_t sum_ranks = 0 * int tiebreak = 0 * bint keep_na = 0 # <<<<<<<<<<<<<< * * tiebreak = tiebreakers[ties_method] */ __pyx_v_keep_na = 0; /* "pandas/algos.pyx":541 * bint keep_na = 0 * * tiebreak = tiebreakers[ties_method] # <<<<<<<<<<<<<< * * keep_na = na_option == 'keep' */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__tiebreakers); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 541; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyObject_GetItem(__pyx_t_1, __pyx_v_ties_method); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 541; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_3 = __Pyx_PyInt_AsInt(__pyx_t_2); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 541; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_tiebreak = __pyx_t_3; /* "pandas/algos.pyx":543 * tiebreak = tiebreakers[ties_method] * * keep_na = na_option == 'keep' # <<<<<<<<<<<<<< * * in_arr = np.asarray(in_arr) */ __pyx_t_2 = PyObject_RichCompare(__pyx_v_na_option, ((PyObject *)__pyx_n_s__keep), Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 543; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 543; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_keep_na = __pyx_t_4; /* "pandas/algos.pyx":545 * keep_na = na_option == 'keep' * * in_arr = np.asarray(in_arr) # <<<<<<<<<<<<<< * * if axis == 0: */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 545; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__asarray); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 545; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 545; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_in_arr); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_in_arr); __Pyx_GIVEREF(__pyx_v_in_arr); __pyx_t_5 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 545; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __Pyx_DECREF_SET(__pyx_v_in_arr, __pyx_t_5); __pyx_t_5 = 0; /* "pandas/algos.pyx":547 * in_arr = np.asarray(in_arr) * * if axis == 0: # <<<<<<<<<<<<<< * values = in_arr.T.copy() * else: */ __pyx_t_5 = PyObject_RichCompare(__pyx_v_axis, __pyx_int_0, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 547; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 547; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_4) { /* "pandas/algos.pyx":548 * * if axis == 0: * values = in_arr.T.copy() # <<<<<<<<<<<<<< * else: * values = in_arr.copy() */ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_in_arr, __pyx_n_s__T); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 548; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s__copy); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 548; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 548; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 548; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_6 = ((PyArrayObject *)__pyx_t_5); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_t_3 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_values.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack); if (unlikely(__pyx_t_3 < 0)) { PyErr_Fetch(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_values.rcbuffer->pybuffer, (PyObject*)__pyx_v_values, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES, 2, 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_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_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1]; if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 548; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_6 = 0; __pyx_v_values = ((PyArrayObject *)__pyx_t_5); __pyx_t_5 = 0; goto __pyx_L3; } /*else*/ { /* "pandas/algos.pyx":550 * values = in_arr.T.copy() * else: * values = in_arr.copy() # <<<<<<<<<<<<<< * * if values.dtype != np.object_: */ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_in_arr, __pyx_n_s__copy); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 550; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_2 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 550; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 550; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_6 = ((PyArrayObject *)__pyx_t_2); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_t_3 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_values.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack); if (unlikely(__pyx_t_3 < 0)) { PyErr_Fetch(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_values.rcbuffer->pybuffer, (PyObject*)__pyx_v_values, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES, 2, 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_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_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1]; if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 550; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_6 = 0; __pyx_v_values = ((PyArrayObject *)__pyx_t_2); __pyx_t_2 = 0; } __pyx_L3:; /* "pandas/algos.pyx":552 * values = in_arr.copy() * * if values.dtype != np.object_: # <<<<<<<<<<<<<< * values = values.astype('O') * */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_values), __pyx_n_s__dtype); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 552; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 552; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s__object_); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 552; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyObject_RichCompare(__pyx_t_2, __pyx_t_1, Py_NE); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 552; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 552; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_4) { /* "pandas/algos.pyx":553 * * if values.dtype != np.object_: * values = values.astype('O') # <<<<<<<<<<<<<< * * if ascending ^ (na_option == 'top'): */ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_values), __pyx_n_s__astype); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 553; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_1 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_k_tuple_28), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 553; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 553; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_6 = ((PyArrayObject *)__pyx_t_1); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_t_3 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_values.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack); if (unlikely(__pyx_t_3 < 0)) { PyErr_Fetch(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_values.rcbuffer->pybuffer, (PyObject*)__pyx_v_values, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES, 2, 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_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_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1]; if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 553; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_6 = 0; __Pyx_DECREF_SET(__pyx_v_values, ((PyArrayObject *)__pyx_t_1)); __pyx_t_1 = 0; goto __pyx_L4; } __pyx_L4:; /* "pandas/algos.pyx":555 * values = values.astype('O') * * if ascending ^ (na_option == 'top'): # <<<<<<<<<<<<<< * # always greater than everything * nan_value = Infinity() */ __pyx_t_1 = PyObject_RichCompare(__pyx_v_na_option, ((PyObject *)__pyx_n_s__top), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 555; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_5 = PyNumber_Xor(__pyx_v_ascending, __pyx_t_1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 555; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 555; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_4) { /* "pandas/algos.pyx":557 * if ascending ^ (na_option == 'top'): * # always greater than everything * nan_value = Infinity() # <<<<<<<<<<<<<< * else: * nan_value = NegInfinity() */ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s__Infinity); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 557; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_1 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 557; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_v_nan_value = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L5; } /*else*/ { /* "pandas/algos.pyx":559 * nan_value = Infinity() * else: * nan_value = NegInfinity() # <<<<<<<<<<<<<< * * mask = lib.isnullobj2d(values) */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__NegInfinity); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 559; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_5 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 559; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_nan_value = __pyx_t_5; __pyx_t_5 = 0; } __pyx_L5:; /* "pandas/algos.pyx":561 * nan_value = NegInfinity() * * mask = lib.isnullobj2d(values) # <<<<<<<<<<<<<< * np.putmask(values, mask, nan_value) * */ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s__lib); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 561; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s__isnullobj2d); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 561; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 561; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(((PyObject *)__pyx_v_values)); PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_v_values)); __Pyx_GIVEREF(((PyObject *)__pyx_v_values)); __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 561; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; __pyx_v_mask = __pyx_t_2; __pyx_t_2 = 0; /* "pandas/algos.pyx":562 * * mask = lib.isnullobj2d(values) * np.putmask(values, mask, nan_value) # <<<<<<<<<<<<<< * * n, k = ( values).shape */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 562; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__putmask); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 562; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 562; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(((PyObject *)__pyx_v_values)); PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_values)); __Pyx_GIVEREF(((PyObject *)__pyx_v_values)); __Pyx_INCREF(__pyx_v_mask); PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_mask); __Pyx_GIVEREF(__pyx_v_mask); __Pyx_INCREF(__pyx_v_nan_value); PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_nan_value); __Pyx_GIVEREF(__pyx_v_nan_value); __pyx_t_1 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 562; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pandas/algos.pyx":564 * np.putmask(values, mask, nan_value) * * n, k = ( values).shape # <<<<<<<<<<<<<< * ranks = np.empty((n, k), dtype='f8') * */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_values), __pyx_n_s__shape); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 564; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) { PyObject* sequence = __pyx_t_1; #if CYTHON_COMPILING_IN_CPYTHON Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 564; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_5 = PyTuple_GET_ITEM(sequence, 1); } else { __pyx_t_2 = PyList_GET_ITEM(sequence, 0); __pyx_t_5 = PyList_GET_ITEM(sequence, 1); } __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(__pyx_t_5); #else __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 564; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 564; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } else { Py_ssize_t index = -1; __pyx_t_10 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 564; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_11 = Py_TYPE(__pyx_t_10)->tp_iternext; index = 0; __pyx_t_2 = __pyx_t_11(__pyx_t_10); if (unlikely(!__pyx_t_2)) goto __pyx_L6_unpacking_failed; __Pyx_GOTREF(__pyx_t_2); index = 1; __pyx_t_5 = __pyx_t_11(__pyx_t_10); if (unlikely(!__pyx_t_5)) goto __pyx_L6_unpacking_failed; __Pyx_GOTREF(__pyx_t_5); if (__Pyx_IternextUnpackEndCheck(__pyx_t_11(__pyx_t_10), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 564; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_11 = NULL; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; goto __pyx_L7_unpacking_done; __pyx_L6_unpacking_failed:; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_t_11 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 564; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_L7_unpacking_done:; } __pyx_t_12 = __Pyx_PyIndex_AsSsize_t(__pyx_t_2); if (unlikely((__pyx_t_12 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 564; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_13 = __Pyx_PyIndex_AsSsize_t(__pyx_t_5); if (unlikely((__pyx_t_13 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 564; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_v_n = __pyx_t_12; __pyx_v_k = __pyx_t_13; /* "pandas/algos.pyx":565 * * n, k = ( values).shape * ranks = np.empty((n, k), dtype='f8') # <<<<<<<<<<<<<< * * try: */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 565; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s__empty); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 565; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_n); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 565; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_k); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 565; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_10 = PyTuple_New(2); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 565; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_1 = 0; __pyx_t_2 = 0; __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 565; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_t_10)); __Pyx_GIVEREF(((PyObject *)__pyx_t_10)); __pyx_t_10 = 0; __pyx_t_10 = PyDict_New(); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 565; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_10)); if (PyDict_SetItem(__pyx_t_10, ((PyObject *)__pyx_n_s__dtype), ((PyObject *)__pyx_n_s__f8)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 565; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_1 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_2), ((PyObject *)__pyx_t_10)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 565; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_10)); __pyx_t_10 = 0; if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 565; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_14 = ((PyArrayObject *)__pyx_t_1); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_ranks.rcbuffer->pybuffer); __pyx_t_3 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_ranks.rcbuffer->pybuffer, (PyObject*)__pyx_t_14, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack); if (unlikely(__pyx_t_3 < 0)) { PyErr_Fetch(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_ranks.rcbuffer->pybuffer, (PyObject*)__pyx_v_ranks, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_pybuffernd_ranks.diminfo[0].strides = __pyx_pybuffernd_ranks.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_ranks.diminfo[0].shape = __pyx_pybuffernd_ranks.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_ranks.diminfo[1].strides = __pyx_pybuffernd_ranks.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_ranks.diminfo[1].shape = __pyx_pybuffernd_ranks.rcbuffer->pybuffer.shape[1]; if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 565; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_14 = 0; __pyx_v_ranks = ((PyArrayObject *)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/algos.pyx":567 * ranks = np.empty((n, k), dtype='f8') * * try: # <<<<<<<<<<<<<< * _as = values.argsort(1) * except TypeError: */ { __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9); __Pyx_XGOTREF(__pyx_t_7); __Pyx_XGOTREF(__pyx_t_8); __Pyx_XGOTREF(__pyx_t_9); /*try:*/ { /* "pandas/algos.pyx":568 * * try: * _as = values.argsort(1) # <<<<<<<<<<<<<< * except TypeError: * values = in_arr */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_values), __pyx_n_s__argsort); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 568; __pyx_clineno = __LINE__; goto __pyx_L8_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_10 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_k_tuple_29), NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 568; __pyx_clineno = __LINE__; goto __pyx_L8_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v__as = __pyx_t_10; __pyx_t_10 = 0; } __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; goto __pyx_L15_try_end; __pyx_L8_error:; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; /* "pandas/algos.pyx":569 * try: * _as = values.argsort(1) * except TypeError: # <<<<<<<<<<<<<< * values = in_arr * for i in range(len(values)): */ __pyx_t_3 = PyErr_ExceptionMatches(__pyx_builtin_TypeError); if (__pyx_t_3) { __Pyx_AddTraceback("pandas.algos.rank_2d_generic", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_10, &__pyx_t_1, &__pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 569; __pyx_clineno = __LINE__; goto __pyx_L10_except_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_GOTREF(__pyx_t_1); __Pyx_GOTREF(__pyx_t_2); /* "pandas/algos.pyx":570 * _as = values.argsort(1) * except TypeError: * values = in_arr # <<<<<<<<<<<<<< * for i in range(len(values)): * ranks[i] = rank_1d_generic(in_arr[i], */ if (!(likely(((__pyx_v_in_arr) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_in_arr, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 570; __pyx_clineno = __LINE__; goto __pyx_L10_except_error;} __pyx_t_6 = ((PyArrayObject *)__pyx_v_in_arr); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_t_3 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_values.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack); if (unlikely(__pyx_t_3 < 0)) { PyErr_Fetch(&__pyx_t_15, &__pyx_t_16, &__pyx_t_17); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_values.rcbuffer->pybuffer, (PyObject*)__pyx_v_values, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_15); Py_XDECREF(__pyx_t_16); Py_XDECREF(__pyx_t_17); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_15, __pyx_t_16, __pyx_t_17); } } __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_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1]; if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 570; __pyx_clineno = __LINE__; goto __pyx_L10_except_error;} } __pyx_t_6 = 0; __Pyx_INCREF(__pyx_v_in_arr); __Pyx_DECREF_SET(__pyx_v_values, ((PyArrayObject *)__pyx_v_in_arr)); /* "pandas/algos.pyx":571 * except TypeError: * values = in_arr * for i in range(len(values)): # <<<<<<<<<<<<<< * ranks[i] = rank_1d_generic(in_arr[i], * ties_method=ties_method, */ __pyx_t_13 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_13 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 571; __pyx_clineno = __LINE__; goto __pyx_L10_except_error;} for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_13; __pyx_t_12+=1) { __pyx_v_i = __pyx_t_12; /* "pandas/algos.pyx":572 * values = in_arr * for i in range(len(values)): * ranks[i] = rank_1d_generic(in_arr[i], # <<<<<<<<<<<<<< * ties_method=ties_method, * ascending=ascending) */ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s__rank_1d_generic); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 572; __pyx_clineno = __LINE__; goto __pyx_L10_except_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_18 = __Pyx_GetItemInt(__pyx_v_in_arr, __pyx_v_i, sizeof(Py_ssize_t), PyInt_FromSsize_t, 0, 1, 1); if (!__pyx_t_18) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 572; __pyx_clineno = __LINE__; goto __pyx_L10_except_error;} __Pyx_GOTREF(__pyx_t_18); __pyx_t_19 = PyTuple_New(1); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 572; __pyx_clineno = __LINE__; goto __pyx_L10_except_error;} __Pyx_GOTREF(__pyx_t_19); PyTuple_SET_ITEM(__pyx_t_19, 0, __pyx_t_18); __Pyx_GIVEREF(__pyx_t_18); __pyx_t_18 = 0; __pyx_t_18 = PyDict_New(); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 572; __pyx_clineno = __LINE__; goto __pyx_L10_except_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_18)); /* "pandas/algos.pyx":573 * for i in range(len(values)): * ranks[i] = rank_1d_generic(in_arr[i], * ties_method=ties_method, # <<<<<<<<<<<<<< * ascending=ascending) * if axis == 0: */ if (PyDict_SetItem(__pyx_t_18, ((PyObject *)__pyx_n_s__ties_method), __pyx_v_ties_method) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 572; __pyx_clineno = __LINE__; goto __pyx_L10_except_error;} /* "pandas/algos.pyx":574 * ranks[i] = rank_1d_generic(in_arr[i], * ties_method=ties_method, * ascending=ascending) # <<<<<<<<<<<<<< * if axis == 0: * return ranks.T */ if (PyDict_SetItem(__pyx_t_18, ((PyObject *)__pyx_n_s__ascending), __pyx_v_ascending) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 572; __pyx_clineno = __LINE__; goto __pyx_L10_except_error;} __pyx_t_20 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_19), ((PyObject *)__pyx_t_18)); if (unlikely(!__pyx_t_20)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 572; __pyx_clineno = __LINE__; goto __pyx_L10_except_error;} __Pyx_GOTREF(__pyx_t_20); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_19)); __pyx_t_19 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_18)); __pyx_t_18 = 0; /* "pandas/algos.pyx":572 * values = in_arr * for i in range(len(values)): * ranks[i] = rank_1d_generic(in_arr[i], # <<<<<<<<<<<<<< * ties_method=ties_method, * ascending=ascending) */ if (__Pyx_SetItemInt(((PyObject *)__pyx_v_ranks), __pyx_v_i, __pyx_t_20, sizeof(Py_ssize_t), PyInt_FromSsize_t, 0, 1, 1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 572; __pyx_clineno = __LINE__; goto __pyx_L10_except_error;} __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0; } /* "pandas/algos.pyx":575 * ties_method=ties_method, * ascending=ascending) * if axis == 0: # <<<<<<<<<<<<<< * return ranks.T * else: */ __pyx_t_20 = PyObject_RichCompare(__pyx_v_axis, __pyx_int_0, Py_EQ); __Pyx_XGOTREF(__pyx_t_20); if (unlikely(!__pyx_t_20)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 575; __pyx_clineno = __LINE__; goto __pyx_L10_except_error;} __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_20); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 575; __pyx_clineno = __LINE__; goto __pyx_L10_except_error;} __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0; if (__pyx_t_4) { /* "pandas/algos.pyx":576 * ascending=ascending) * if axis == 0: * return ranks.T # <<<<<<<<<<<<<< * else: * return ranks */ __Pyx_XDECREF(__pyx_r); __pyx_t_20 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_ranks), __pyx_n_s__T); if (unlikely(!__pyx_t_20)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 576; __pyx_clineno = __LINE__; goto __pyx_L10_except_error;} __Pyx_GOTREF(__pyx_t_20); __pyx_r = __pyx_t_20; __pyx_t_20 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; goto __pyx_L11_except_return; goto __pyx_L20; } /*else*/ { /* "pandas/algos.pyx":578 * return ranks.T * else: * return ranks # <<<<<<<<<<<<<< * * if not ascending: */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_ranks)); __pyx_r = ((PyObject *)__pyx_v_ranks); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; goto __pyx_L11_except_return; } __pyx_L20:; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; goto __pyx_L9_exception_handled; } __pyx_L10_except_error:; __Pyx_XGIVEREF(__pyx_t_7); __Pyx_XGIVEREF(__pyx_t_8); __Pyx_XGIVEREF(__pyx_t_9); __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9); goto __pyx_L1_error; __pyx_L11_except_return:; __Pyx_XGIVEREF(__pyx_t_7); __Pyx_XGIVEREF(__pyx_t_8); __Pyx_XGIVEREF(__pyx_t_9); __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9); goto __pyx_L0; __pyx_L9_exception_handled:; __Pyx_XGIVEREF(__pyx_t_7); __Pyx_XGIVEREF(__pyx_t_8); __Pyx_XGIVEREF(__pyx_t_9); __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9); __pyx_L15_try_end:; } /* "pandas/algos.pyx":580 * return ranks * * if not ascending: # <<<<<<<<<<<<<< * _as = _as[:, ::-1] * */ __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_ascending); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 580; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_21 = ((!__pyx_t_4) != 0); if (__pyx_t_21) { /* "pandas/algos.pyx":581 * * if not ascending: * _as = _as[:, ::-1] # <<<<<<<<<<<<<< * * values = _take_2d_object(values, _as) */ __pyx_t_2 = PyObject_GetItem(__pyx_v__as, ((PyObject *)__pyx_k_tuple_32)); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 581; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF_SET(__pyx_v__as, __pyx_t_2); __pyx_t_2 = 0; goto __pyx_L21; } __pyx_L21:; /* "pandas/algos.pyx":583 * _as = _as[:, ::-1] * * values = _take_2d_object(values, _as) # <<<<<<<<<<<<<< * argsorted = _as.astype('i8') * */ __pyx_t_2 = __pyx_f_6pandas_5algos__take_2d_object(((PyArrayObject *)__pyx_v_values), __pyx_v__as); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 583; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 583; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_6 = ((PyArrayObject *)__pyx_t_2); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_t_3 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_values.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack); if (unlikely(__pyx_t_3 < 0)) { PyErr_Fetch(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_values.rcbuffer->pybuffer, (PyObject*)__pyx_v_values, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES, 2, 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_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_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1]; if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 583; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_6 = 0; __Pyx_DECREF_SET(__pyx_v_values, ((PyArrayObject *)__pyx_t_2)); __pyx_t_2 = 0; /* "pandas/algos.pyx":584 * * values = _take_2d_object(values, _as) * argsorted = _as.astype('i8') # <<<<<<<<<<<<<< * * for i in range(n): */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v__as, __pyx_n_s__astype); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 584; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_k_tuple_33), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 584; __pyx_clineno = __LINE__; goto __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_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 584; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_22 = ((PyArrayObject *)__pyx_t_1); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_argsorted.rcbuffer->pybuffer); __pyx_t_3 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_argsorted.rcbuffer->pybuffer, (PyObject*)__pyx_t_22, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack); if (unlikely(__pyx_t_3 < 0)) { PyErr_Fetch(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_argsorted.rcbuffer->pybuffer, (PyObject*)__pyx_v_argsorted, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 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_pybuffernd_argsorted.diminfo[0].strides = __pyx_pybuffernd_argsorted.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_argsorted.diminfo[0].shape = __pyx_pybuffernd_argsorted.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_argsorted.diminfo[1].strides = __pyx_pybuffernd_argsorted.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_argsorted.diminfo[1].shape = __pyx_pybuffernd_argsorted.rcbuffer->pybuffer.shape[1]; if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 584; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_22 = 0; __pyx_v_argsorted = ((PyArrayObject *)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/algos.pyx":586 * argsorted = _as.astype('i8') * * for i in range(n): # <<<<<<<<<<<<<< * dups = sum_ranks = infs = 0 * for j in range(k): */ __pyx_t_13 = __pyx_v_n; for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_13; __pyx_t_12+=1) { __pyx_v_i = __pyx_t_12; /* "pandas/algos.pyx":587 * * for i in range(n): * dups = sum_ranks = infs = 0 # <<<<<<<<<<<<<< * for j in range(k): * val = values[i, j] */ __pyx_v_dups = 0; __pyx_v_sum_ranks = 0; __pyx_v_infs = 0; /* "pandas/algos.pyx":588 * for i in range(n): * dups = sum_ranks = infs = 0 * for j in range(k): # <<<<<<<<<<<<<< * val = values[i, j] * if val is nan_value and keep_na: */ __pyx_t_23 = __pyx_v_k; for (__pyx_t_24 = 0; __pyx_t_24 < __pyx_t_23; __pyx_t_24+=1) { __pyx_v_j = __pyx_t_24; /* "pandas/algos.pyx":589 * dups = sum_ranks = infs = 0 * for j in range(k): * val = values[i, j] # <<<<<<<<<<<<<< * if val is nan_value and keep_na: * ranks[i, argsorted[i, j]] = nan */ __pyx_t_25 = __pyx_v_i; __pyx_t_26 = __pyx_v_j; __pyx_t_3 = -1; if (__pyx_t_25 < 0) { __pyx_t_25 += __pyx_pybuffernd_values.diminfo[0].shape; if (unlikely(__pyx_t_25 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_25 >= __pyx_pybuffernd_values.diminfo[0].shape)) __pyx_t_3 = 0; if (__pyx_t_26 < 0) { __pyx_t_26 += __pyx_pybuffernd_values.diminfo[1].shape; if (unlikely(__pyx_t_26 < 0)) __pyx_t_3 = 1; } else if (unlikely(__pyx_t_26 >= __pyx_pybuffernd_values.diminfo[1].shape)) __pyx_t_3 = 1; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 589; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_1 = (PyObject *) *__Pyx_BufPtrStrided2d(PyObject **, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_25, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_26, __pyx_pybuffernd_values.diminfo[1].strides); __Pyx_INCREF((PyObject*)__pyx_t_1); __Pyx_XDECREF_SET(__pyx_v_val, __pyx_t_1); __pyx_t_1 = 0; /* "pandas/algos.pyx":590 * for j in range(k): * val = values[i, j] * if val is nan_value and keep_na: # <<<<<<<<<<<<<< * ranks[i, argsorted[i, j]] = nan * infs += 1 */ __pyx_t_21 = (__pyx_v_val == __pyx_v_nan_value); if ((__pyx_t_21 != 0)) { __pyx_t_4 = (__pyx_v_keep_na != 0); } else { __pyx_t_4 = (__pyx_t_21 != 0); } if (__pyx_t_4) { /* "pandas/algos.pyx":591 * val = values[i, j] * if val is nan_value and keep_na: * ranks[i, argsorted[i, j]] = nan # <<<<<<<<<<<<<< * infs += 1 * continue */ __pyx_t_27 = __pyx_v_i; __pyx_t_28 = __pyx_v_j; __pyx_t_3 = -1; if (__pyx_t_27 < 0) { __pyx_t_27 += __pyx_pybuffernd_argsorted.diminfo[0].shape; if (unlikely(__pyx_t_27 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_27 >= __pyx_pybuffernd_argsorted.diminfo[0].shape)) __pyx_t_3 = 0; if (__pyx_t_28 < 0) { __pyx_t_28 += __pyx_pybuffernd_argsorted.diminfo[1].shape; if (unlikely(__pyx_t_28 < 0)) __pyx_t_3 = 1; } else if (unlikely(__pyx_t_28 >= __pyx_pybuffernd_argsorted.diminfo[1].shape)) __pyx_t_3 = 1; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 591; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_29 = __pyx_v_i; __pyx_t_30 = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_argsorted.rcbuffer->pybuffer.buf, __pyx_t_27, __pyx_pybuffernd_argsorted.diminfo[0].strides, __pyx_t_28, __pyx_pybuffernd_argsorted.diminfo[1].strides)); __pyx_t_3 = -1; if (__pyx_t_29 < 0) { __pyx_t_29 += __pyx_pybuffernd_ranks.diminfo[0].shape; if (unlikely(__pyx_t_29 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_29 >= __pyx_pybuffernd_ranks.diminfo[0].shape)) __pyx_t_3 = 0; if (__pyx_t_30 < 0) { __pyx_t_30 += __pyx_pybuffernd_ranks.diminfo[1].shape; if (unlikely(__pyx_t_30 < 0)) __pyx_t_3 = 1; } else if (unlikely(__pyx_t_30 >= __pyx_pybuffernd_ranks.diminfo[1].shape)) __pyx_t_3 = 1; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 591; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_ranks.rcbuffer->pybuffer.buf, __pyx_t_29, __pyx_pybuffernd_ranks.diminfo[0].strides, __pyx_t_30, __pyx_pybuffernd_ranks.diminfo[1].strides) = __pyx_v_6pandas_5algos_nan; /* "pandas/algos.pyx":592 * if val is nan_value and keep_na: * ranks[i, argsorted[i, j]] = nan * infs += 1 # <<<<<<<<<<<<<< * continue * sum_ranks += (j - infs) + 1 */ __pyx_v_infs = (__pyx_v_infs + 1); /* "pandas/algos.pyx":593 * ranks[i, argsorted[i, j]] = nan * infs += 1 * continue # <<<<<<<<<<<<<< * sum_ranks += (j - infs) + 1 * dups += 1 */ goto __pyx_L24_continue; goto __pyx_L26; } __pyx_L26:; /* "pandas/algos.pyx":594 * infs += 1 * continue * sum_ranks += (j - infs) + 1 # <<<<<<<<<<<<<< * dups += 1 * if j == k - 1 or are_diff(values[i, j + 1], val): */ __pyx_v_sum_ranks = (__pyx_v_sum_ranks + ((__pyx_v_j - __pyx_v_infs) + 1)); /* "pandas/algos.pyx":595 * continue * sum_ranks += (j - infs) + 1 * dups += 1 # <<<<<<<<<<<<<< * if j == k - 1 or are_diff(values[i, j + 1], val): * if tiebreak == TIEBREAK_AVERAGE: */ __pyx_v_dups = (__pyx_v_dups + 1); /* "pandas/algos.pyx":596 * sum_ranks += (j - infs) + 1 * dups += 1 * if j == k - 1 or are_diff(values[i, j + 1], val): # <<<<<<<<<<<<<< * if tiebreak == TIEBREAK_AVERAGE: * for z in range(j - dups + 1, j + 1): */ __pyx_t_4 = (__pyx_v_j == (__pyx_v_k - 1)); if (!__pyx_t_4) { __pyx_t_31 = __pyx_v_i; __pyx_t_32 = (__pyx_v_j + 1); __pyx_t_3 = -1; if (__pyx_t_31 < 0) { __pyx_t_31 += __pyx_pybuffernd_values.diminfo[0].shape; if (unlikely(__pyx_t_31 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_31 >= __pyx_pybuffernd_values.diminfo[0].shape)) __pyx_t_3 = 0; if (__pyx_t_32 < 0) { __pyx_t_32 += __pyx_pybuffernd_values.diminfo[1].shape; if (unlikely(__pyx_t_32 < 0)) __pyx_t_3 = 1; } else if (unlikely(__pyx_t_32 >= __pyx_pybuffernd_values.diminfo[1].shape)) __pyx_t_3 = 1; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 596; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_1 = (PyObject *) *__Pyx_BufPtrStrided2d(PyObject **, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_31, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_32, __pyx_pybuffernd_values.diminfo[1].strides); __Pyx_INCREF((PyObject*)__pyx_t_1); __pyx_t_2 = __pyx_f_6pandas_5algos_are_diff(__pyx_t_1, __pyx_v_val); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 596; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_21 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_21 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 596; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_33 = __pyx_t_21; } else { __pyx_t_33 = __pyx_t_4; } if (__pyx_t_33) { /* "pandas/algos.pyx":597 * dups += 1 * if j == k - 1 or are_diff(values[i, j + 1], val): * if tiebreak == TIEBREAK_AVERAGE: # <<<<<<<<<<<<<< * for z in range(j - dups + 1, j + 1): * ranks[i, argsorted[i, z]] = sum_ranks / dups */ __pyx_t_33 = ((__pyx_v_tiebreak == __pyx_v_6pandas_5algos_TIEBREAK_AVERAGE) != 0); if (__pyx_t_33) { /* "pandas/algos.pyx":598 * if j == k - 1 or are_diff(values[i, j + 1], val): * if tiebreak == TIEBREAK_AVERAGE: * for z in range(j - dups + 1, j + 1): # <<<<<<<<<<<<<< * ranks[i, argsorted[i, z]] = sum_ranks / dups * elif tiebreak == TIEBREAK_MIN: */ __pyx_t_34 = (__pyx_v_j + 1); for (__pyx_t_35 = ((__pyx_v_j - __pyx_v_dups) + 1); __pyx_t_35 < __pyx_t_34; __pyx_t_35+=1) { __pyx_v_z = __pyx_t_35; /* "pandas/algos.pyx":599 * if tiebreak == TIEBREAK_AVERAGE: * for z in range(j - dups + 1, j + 1): * ranks[i, argsorted[i, z]] = sum_ranks / dups # <<<<<<<<<<<<<< * elif tiebreak == TIEBREAK_MIN: * for z in range(j - dups + 1, j + 1): */ if (unlikely(__pyx_v_dups == 0)) { #ifdef WITH_THREAD PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure(); #endif PyErr_Format(PyExc_ZeroDivisionError, "float division"); #ifdef WITH_THREAD PyGILState_Release(__pyx_gilstate_save); #endif {__pyx_filename = __pyx_f[0]; __pyx_lineno = 599; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_36 = __pyx_v_i; __pyx_t_37 = __pyx_v_z; __pyx_t_3 = -1; if (__pyx_t_36 < 0) { __pyx_t_36 += __pyx_pybuffernd_argsorted.diminfo[0].shape; if (unlikely(__pyx_t_36 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_36 >= __pyx_pybuffernd_argsorted.diminfo[0].shape)) __pyx_t_3 = 0; if (__pyx_t_37 < 0) { __pyx_t_37 += __pyx_pybuffernd_argsorted.diminfo[1].shape; if (unlikely(__pyx_t_37 < 0)) __pyx_t_3 = 1; } else if (unlikely(__pyx_t_37 >= __pyx_pybuffernd_argsorted.diminfo[1].shape)) __pyx_t_3 = 1; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 599; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_38 = __pyx_v_i; __pyx_t_39 = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_argsorted.rcbuffer->pybuffer.buf, __pyx_t_36, __pyx_pybuffernd_argsorted.diminfo[0].strides, __pyx_t_37, __pyx_pybuffernd_argsorted.diminfo[1].strides)); __pyx_t_3 = -1; if (__pyx_t_38 < 0) { __pyx_t_38 += __pyx_pybuffernd_ranks.diminfo[0].shape; if (unlikely(__pyx_t_38 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_38 >= __pyx_pybuffernd_ranks.diminfo[0].shape)) __pyx_t_3 = 0; if (__pyx_t_39 < 0) { __pyx_t_39 += __pyx_pybuffernd_ranks.diminfo[1].shape; if (unlikely(__pyx_t_39 < 0)) __pyx_t_3 = 1; } else if (unlikely(__pyx_t_39 >= __pyx_pybuffernd_ranks.diminfo[1].shape)) __pyx_t_3 = 1; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 599; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_ranks.rcbuffer->pybuffer.buf, __pyx_t_38, __pyx_pybuffernd_ranks.diminfo[0].strides, __pyx_t_39, __pyx_pybuffernd_ranks.diminfo[1].strides) = (__pyx_v_sum_ranks / __pyx_v_dups); } goto __pyx_L28; } /* "pandas/algos.pyx":600 * for z in range(j - dups + 1, j + 1): * ranks[i, argsorted[i, z]] = sum_ranks / dups * elif tiebreak == TIEBREAK_MIN: # <<<<<<<<<<<<<< * for z in range(j - dups + 1, j + 1): * ranks[i, argsorted[i, z]] = j - dups + 2 */ __pyx_t_33 = ((__pyx_v_tiebreak == __pyx_v_6pandas_5algos_TIEBREAK_MIN) != 0); if (__pyx_t_33) { /* "pandas/algos.pyx":601 * ranks[i, argsorted[i, z]] = sum_ranks / dups * elif tiebreak == TIEBREAK_MIN: * for z in range(j - dups + 1, j + 1): # <<<<<<<<<<<<<< * ranks[i, argsorted[i, z]] = j - dups + 2 * elif tiebreak == TIEBREAK_MAX: */ __pyx_t_34 = (__pyx_v_j + 1); for (__pyx_t_35 = ((__pyx_v_j - __pyx_v_dups) + 1); __pyx_t_35 < __pyx_t_34; __pyx_t_35+=1) { __pyx_v_z = __pyx_t_35; /* "pandas/algos.pyx":602 * elif tiebreak == TIEBREAK_MIN: * for z in range(j - dups + 1, j + 1): * ranks[i, argsorted[i, z]] = j - dups + 2 # <<<<<<<<<<<<<< * elif tiebreak == TIEBREAK_MAX: * for z in range(j - dups + 1, j + 1): */ __pyx_t_40 = __pyx_v_i; __pyx_t_41 = __pyx_v_z; __pyx_t_3 = -1; if (__pyx_t_40 < 0) { __pyx_t_40 += __pyx_pybuffernd_argsorted.diminfo[0].shape; if (unlikely(__pyx_t_40 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_40 >= __pyx_pybuffernd_argsorted.diminfo[0].shape)) __pyx_t_3 = 0; if (__pyx_t_41 < 0) { __pyx_t_41 += __pyx_pybuffernd_argsorted.diminfo[1].shape; if (unlikely(__pyx_t_41 < 0)) __pyx_t_3 = 1; } else if (unlikely(__pyx_t_41 >= __pyx_pybuffernd_argsorted.diminfo[1].shape)) __pyx_t_3 = 1; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 602; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_42 = __pyx_v_i; __pyx_t_43 = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_argsorted.rcbuffer->pybuffer.buf, __pyx_t_40, __pyx_pybuffernd_argsorted.diminfo[0].strides, __pyx_t_41, __pyx_pybuffernd_argsorted.diminfo[1].strides)); __pyx_t_3 = -1; if (__pyx_t_42 < 0) { __pyx_t_42 += __pyx_pybuffernd_ranks.diminfo[0].shape; if (unlikely(__pyx_t_42 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_42 >= __pyx_pybuffernd_ranks.diminfo[0].shape)) __pyx_t_3 = 0; if (__pyx_t_43 < 0) { __pyx_t_43 += __pyx_pybuffernd_ranks.diminfo[1].shape; if (unlikely(__pyx_t_43 < 0)) __pyx_t_3 = 1; } else if (unlikely(__pyx_t_43 >= __pyx_pybuffernd_ranks.diminfo[1].shape)) __pyx_t_3 = 1; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 602; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_ranks.rcbuffer->pybuffer.buf, __pyx_t_42, __pyx_pybuffernd_ranks.diminfo[0].strides, __pyx_t_43, __pyx_pybuffernd_ranks.diminfo[1].strides) = ((__pyx_v_j - __pyx_v_dups) + 2); } goto __pyx_L28; } /* "pandas/algos.pyx":603 * for z in range(j - dups + 1, j + 1): * ranks[i, argsorted[i, z]] = j - dups + 2 * elif tiebreak == TIEBREAK_MAX: # <<<<<<<<<<<<<< * for z in range(j - dups + 1, j + 1): * ranks[i, argsorted[i, z]] = j + 1 */ __pyx_t_33 = ((__pyx_v_tiebreak == __pyx_v_6pandas_5algos_TIEBREAK_MAX) != 0); if (__pyx_t_33) { /* "pandas/algos.pyx":604 * ranks[i, argsorted[i, z]] = j - dups + 2 * elif tiebreak == TIEBREAK_MAX: * for z in range(j - dups + 1, j + 1): # <<<<<<<<<<<<<< * ranks[i, argsorted[i, z]] = j + 1 * elif tiebreak == TIEBREAK_FIRST: */ __pyx_t_34 = (__pyx_v_j + 1); for (__pyx_t_35 = ((__pyx_v_j - __pyx_v_dups) + 1); __pyx_t_35 < __pyx_t_34; __pyx_t_35+=1) { __pyx_v_z = __pyx_t_35; /* "pandas/algos.pyx":605 * elif tiebreak == TIEBREAK_MAX: * for z in range(j - dups + 1, j + 1): * ranks[i, argsorted[i, z]] = j + 1 # <<<<<<<<<<<<<< * elif tiebreak == TIEBREAK_FIRST: * raise ValueError('first not supported for ' */ __pyx_t_44 = __pyx_v_i; __pyx_t_45 = __pyx_v_z; __pyx_t_3 = -1; if (__pyx_t_44 < 0) { __pyx_t_44 += __pyx_pybuffernd_argsorted.diminfo[0].shape; if (unlikely(__pyx_t_44 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_44 >= __pyx_pybuffernd_argsorted.diminfo[0].shape)) __pyx_t_3 = 0; if (__pyx_t_45 < 0) { __pyx_t_45 += __pyx_pybuffernd_argsorted.diminfo[1].shape; if (unlikely(__pyx_t_45 < 0)) __pyx_t_3 = 1; } else if (unlikely(__pyx_t_45 >= __pyx_pybuffernd_argsorted.diminfo[1].shape)) __pyx_t_3 = 1; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 605; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_46 = __pyx_v_i; __pyx_t_47 = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_argsorted.rcbuffer->pybuffer.buf, __pyx_t_44, __pyx_pybuffernd_argsorted.diminfo[0].strides, __pyx_t_45, __pyx_pybuffernd_argsorted.diminfo[1].strides)); __pyx_t_3 = -1; if (__pyx_t_46 < 0) { __pyx_t_46 += __pyx_pybuffernd_ranks.diminfo[0].shape; if (unlikely(__pyx_t_46 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_46 >= __pyx_pybuffernd_ranks.diminfo[0].shape)) __pyx_t_3 = 0; if (__pyx_t_47 < 0) { __pyx_t_47 += __pyx_pybuffernd_ranks.diminfo[1].shape; if (unlikely(__pyx_t_47 < 0)) __pyx_t_3 = 1; } else if (unlikely(__pyx_t_47 >= __pyx_pybuffernd_ranks.diminfo[1].shape)) __pyx_t_3 = 1; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 605; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_ranks.rcbuffer->pybuffer.buf, __pyx_t_46, __pyx_pybuffernd_ranks.diminfo[0].strides, __pyx_t_47, __pyx_pybuffernd_ranks.diminfo[1].strides) = (__pyx_v_j + 1); } goto __pyx_L28; } /* "pandas/algos.pyx":606 * for z in range(j - dups + 1, j + 1): * ranks[i, argsorted[i, z]] = j + 1 * elif tiebreak == TIEBREAK_FIRST: # <<<<<<<<<<<<<< * raise ValueError('first not supported for ' * 'non-numeric data') */ __pyx_t_33 = ((__pyx_v_tiebreak == __pyx_v_6pandas_5algos_TIEBREAK_FIRST) != 0); if (__pyx_t_33) { /* "pandas/algos.pyx":607 * ranks[i, argsorted[i, z]] = j + 1 * elif tiebreak == TIEBREAK_FIRST: * raise ValueError('first not supported for ' # <<<<<<<<<<<<<< * 'non-numeric data') * sum_ranks = dups = 0 */ __pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_34), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 607; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 607; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L28; } __pyx_L28:; /* "pandas/algos.pyx":609 * raise ValueError('first not supported for ' * 'non-numeric data') * sum_ranks = dups = 0 # <<<<<<<<<<<<<< * * if axis == 0: */ __pyx_v_sum_ranks = 0; __pyx_v_dups = 0; goto __pyx_L27; } __pyx_L27:; __pyx_L24_continue:; } } /* "pandas/algos.pyx":611 * sum_ranks = dups = 0 * * if axis == 0: # <<<<<<<<<<<<<< * return ranks.T * else: */ __pyx_t_2 = PyObject_RichCompare(__pyx_v_axis, __pyx_int_0, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 611; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_33 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_33 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 611; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_33) { /* "pandas/algos.pyx":612 * * if axis == 0: * return ranks.T # <<<<<<<<<<<<<< * else: * return ranks */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_ranks), __pyx_n_s__T); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 612; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; goto __pyx_L35; } /*else*/ { /* "pandas/algos.pyx":614 * return ranks.T * else: * return ranks # <<<<<<<<<<<<<< * * # def _take_indexer_2d(ndarray[float64_t, ndim=2] values, */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_ranks)); __pyx_r = ((PyObject *)__pyx_v_ranks); goto __pyx_L0; } __pyx_L35:; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_10); __Pyx_XDECREF(__pyx_t_18); __Pyx_XDECREF(__pyx_t_19); __Pyx_XDECREF(__pyx_t_20); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_argsorted.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_ranks.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.rank_2d_generic", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_argsorted.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_ranks.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_ranks); __Pyx_XDECREF((PyObject *)__pyx_v_values); __Pyx_XDECREF((PyObject *)__pyx_v_argsorted); __Pyx_XDECREF(__pyx_v_val); __Pyx_XDECREF(__pyx_v_nan_value); __Pyx_XDECREF(__pyx_v_mask); __Pyx_XDECREF(__pyx_v__as); __Pyx_XDECREF(__pyx_v_in_arr); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_13_check_minp(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_13_check_minp = {__Pyx_NAMESTR("_check_minp"), (PyCFunction)__pyx_pw_6pandas_5algos_13_check_minp, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_13_check_minp(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_win = 0; PyObject *__pyx_v_minp = 0; PyObject *__pyx_v_N = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_check_minp (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__win,&__pyx_n_s__minp,&__pyx_n_s__N,0}; PyObject* values[3] = {0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__win)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__minp)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("_check_minp", 1, 3, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 641; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__N)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("_check_minp", 1, 3, 3, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 641; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_check_minp") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 641; __pyx_clineno = __LINE__; goto __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_win = values[0]; __pyx_v_minp = values[1]; __pyx_v_N = values[2]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("_check_minp", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 641; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos._check_minp", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pandas_5algos_12_check_minp(__pyx_self, __pyx_v_win, __pyx_v_minp, __pyx_v_N); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/algos.pyx":641 * # - * * def _check_minp(win, minp, N): # <<<<<<<<<<<<<< * if minp > win: * raise ValueError('min_periods (%d) must be <= window (%d)' */ static PyObject *__pyx_pf_6pandas_5algos_12_check_minp(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_win, PyObject *__pyx_v_minp, PyObject *__pyx_v_N) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_check_minp", 0); __Pyx_INCREF(__pyx_v_minp); /* "pandas/algos.pyx":642 * * def _check_minp(win, minp, N): * if minp > win: # <<<<<<<<<<<<<< * raise ValueError('min_periods (%d) must be <= window (%d)' * % (minp, win)) */ __pyx_t_1 = PyObject_RichCompare(__pyx_v_minp, __pyx_v_win, Py_GT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 642; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 642; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_2) { /* "pandas/algos.pyx":644 * if minp > win: * raise ValueError('min_periods (%d) must be <= window (%d)' * % (minp, win)) # <<<<<<<<<<<<<< * elif minp > N: * minp = N + 1 */ __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 644; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_minp); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_minp); __Pyx_GIVEREF(__pyx_v_minp); __Pyx_INCREF(__pyx_v_win); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_win); __Pyx_GIVEREF(__pyx_v_win); __pyx_t_3 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_35), ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 644; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_3)); __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 643; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_t_3)); __Pyx_GIVEREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; __pyx_t_3 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 643; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 643; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L3; } /* "pandas/algos.pyx":645 * raise ValueError('min_periods (%d) must be <= window (%d)' * % (minp, win)) * elif minp > N: # <<<<<<<<<<<<<< * minp = N + 1 * elif minp == 0: */ __pyx_t_3 = PyObject_RichCompare(__pyx_v_minp, __pyx_v_N, Py_GT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 645; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 645; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_2) { /* "pandas/algos.pyx":646 * % (minp, win)) * elif minp > N: * minp = N + 1 # <<<<<<<<<<<<<< * elif minp == 0: * minp = 1 */ __pyx_t_3 = PyNumber_Add(__pyx_v_N, __pyx_int_1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 646; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF_SET(__pyx_v_minp, __pyx_t_3); __pyx_t_3 = 0; goto __pyx_L3; } /* "pandas/algos.pyx":647 * elif minp > N: * minp = N + 1 * elif minp == 0: # <<<<<<<<<<<<<< * minp = 1 * elif minp < 0: */ __pyx_t_3 = PyObject_RichCompare(__pyx_v_minp, __pyx_int_0, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 647; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 647; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_2) { /* "pandas/algos.pyx":648 * minp = N + 1 * elif minp == 0: * minp = 1 # <<<<<<<<<<<<<< * elif minp < 0: * raise ValueError('min_periods must be >= 0') */ __Pyx_INCREF(__pyx_int_1); __Pyx_DECREF_SET(__pyx_v_minp, __pyx_int_1); goto __pyx_L3; } /* "pandas/algos.pyx":649 * elif minp == 0: * minp = 1 * elif minp < 0: # <<<<<<<<<<<<<< * raise ValueError('min_periods must be >= 0') * return minp */ __pyx_t_3 = PyObject_RichCompare(__pyx_v_minp, __pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 649; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 649; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_2) { /* "pandas/algos.pyx":650 * minp = 1 * elif minp < 0: * raise ValueError('min_periods must be >= 0') # <<<<<<<<<<<<<< * return minp * */ __pyx_t_3 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_37), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 650; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 650; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L3; } __pyx_L3:; /* "pandas/algos.pyx":651 * elif minp < 0: * raise ValueError('min_periods must be >= 0') * return minp # <<<<<<<<<<<<<< * * # original C implementation by N. Devillard. */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_minp); __pyx_r = __pyx_v_minp; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("pandas.algos._check_minp", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_minp); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_15kth_smallest(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_15kth_smallest = {__Pyx_NAMESTR("kth_smallest"), (PyCFunction)__pyx_pw_6pandas_5algos_15kth_smallest, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_15kth_smallest(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_a = 0; Py_ssize_t __pyx_v_k; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("kth_smallest (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__a,&__pyx_n_s__k,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__a)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__k)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("kth_smallest", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 668; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "kth_smallest") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 668; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } __pyx_v_a = ((PyArrayObject *)values[0]); __pyx_v_k = __Pyx_PyIndex_AsSsize_t(values[1]); if (unlikely((__pyx_v_k == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 668; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("kth_smallest", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 668; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.kth_smallest", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_a), __pyx_ptype_5numpy_ndarray, 1, "a", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 668; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_14kth_smallest(__pyx_self, __pyx_v_a, __pyx_v_k); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/algos.pyx":668 * # Series: Prentice-Hall Series in Automatic Computation * * def kth_smallest(ndarray[double_t] a, Py_ssize_t k): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i,j,l,m,n */ static PyObject *__pyx_pf_6pandas_5algos_14kth_smallest(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_a, Py_ssize_t __pyx_v_k) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_l; Py_ssize_t __pyx_v_m; Py_ssize_t __pyx_v_n; __pyx_t_5numpy_double_t __pyx_v_x; __pyx_t_5numpy_double_t __pyx_v_t; __Pyx_LocalBuf_ND __pyx_pybuffernd_a; __Pyx_Buffer __pyx_pybuffer_a; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; int __pyx_t_2; int __pyx_t_3; Py_ssize_t __pyx_t_4; Py_ssize_t __pyx_t_5; Py_ssize_t __pyx_t_6; Py_ssize_t __pyx_t_7; Py_ssize_t __pyx_t_8; Py_ssize_t __pyx_t_9; Py_ssize_t __pyx_t_10; PyObject *__pyx_t_11 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("kth_smallest", 0); __pyx_pybuffer_a.pybuffer.buf = NULL; __pyx_pybuffer_a.refcount = 0; __pyx_pybuffernd_a.data = NULL; __pyx_pybuffernd_a.rcbuffer = &__pyx_pybuffer_a; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_a.rcbuffer->pybuffer, (PyObject*)__pyx_v_a, &__Pyx_TypeInfo_nn___pyx_t_5numpy_double_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 668; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_a.diminfo[0].strides = __pyx_pybuffernd_a.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_a.diminfo[0].shape = __pyx_pybuffernd_a.rcbuffer->pybuffer.shape[0]; /* "pandas/algos.pyx":673 * double_t x, t * * n = len(a) # <<<<<<<<<<<<<< * * l = 0 */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_a)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 673; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/algos.pyx":675 * n = len(a) * * l = 0 # <<<<<<<<<<<<<< * m = n-1 * while (l= __pyx_pybuffernd_a.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 678; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_x = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_double_t *, __pyx_pybuffernd_a.rcbuffer->pybuffer.buf, __pyx_t_1, __pyx_pybuffernd_a.diminfo[0].strides)); /* "pandas/algos.pyx":679 * while (l= __pyx_pybuffernd_a.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 683; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_2 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_double_t *, __pyx_pybuffernd_a.rcbuffer->pybuffer.buf, __pyx_t_4, __pyx_pybuffernd_a.diminfo[0].strides)) < __pyx_v_x) != 0); if (!__pyx_t_2) break; __pyx_v_i = (__pyx_v_i + 1); } /* "pandas/algos.pyx":684 * while 1: * while a[i] < x: i += 1 * while x < a[j]: j -= 1 # <<<<<<<<<<<<<< * if i <= j: * t = a[i] */ while (1) { __pyx_t_5 = __pyx_v_j; __pyx_t_3 = -1; if (__pyx_t_5 < 0) { __pyx_t_5 += __pyx_pybuffernd_a.diminfo[0].shape; if (unlikely(__pyx_t_5 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_5 >= __pyx_pybuffernd_a.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 684; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_2 = ((__pyx_v_x < (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_double_t *, __pyx_pybuffernd_a.rcbuffer->pybuffer.buf, __pyx_t_5, __pyx_pybuffernd_a.diminfo[0].strides))) != 0); if (!__pyx_t_2) break; __pyx_v_j = (__pyx_v_j - 1); } /* "pandas/algos.pyx":685 * while a[i] < x: i += 1 * while x < a[j]: j -= 1 * if i <= j: # <<<<<<<<<<<<<< * t = a[i] * a[i] = a[j] */ __pyx_t_2 = ((__pyx_v_i <= __pyx_v_j) != 0); if (__pyx_t_2) { /* "pandas/algos.pyx":686 * while x < a[j]: j -= 1 * if i <= j: * t = a[i] # <<<<<<<<<<<<<< * a[i] = a[j] * a[j] = t */ __pyx_t_6 = __pyx_v_i; __pyx_t_3 = -1; if (__pyx_t_6 < 0) { __pyx_t_6 += __pyx_pybuffernd_a.diminfo[0].shape; if (unlikely(__pyx_t_6 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_6 >= __pyx_pybuffernd_a.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 686; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_t = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_double_t *, __pyx_pybuffernd_a.rcbuffer->pybuffer.buf, __pyx_t_6, __pyx_pybuffernd_a.diminfo[0].strides)); /* "pandas/algos.pyx":687 * if i <= j: * t = a[i] * a[i] = a[j] # <<<<<<<<<<<<<< * a[j] = t * i += 1; j -= 1 */ __pyx_t_7 = __pyx_v_j; __pyx_t_3 = -1; if (__pyx_t_7 < 0) { __pyx_t_7 += __pyx_pybuffernd_a.diminfo[0].shape; if (unlikely(__pyx_t_7 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_7 >= __pyx_pybuffernd_a.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 687; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_8 = __pyx_v_i; __pyx_t_3 = -1; if (__pyx_t_8 < 0) { __pyx_t_8 += __pyx_pybuffernd_a.diminfo[0].shape; if (unlikely(__pyx_t_8 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_8 >= __pyx_pybuffernd_a.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 687; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_double_t *, __pyx_pybuffernd_a.rcbuffer->pybuffer.buf, __pyx_t_8, __pyx_pybuffernd_a.diminfo[0].strides) = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_double_t *, __pyx_pybuffernd_a.rcbuffer->pybuffer.buf, __pyx_t_7, __pyx_pybuffernd_a.diminfo[0].strides)); /* "pandas/algos.pyx":688 * t = a[i] * a[i] = a[j] * a[j] = t # <<<<<<<<<<<<<< * i += 1; j -= 1 * */ __pyx_t_9 = __pyx_v_j; __pyx_t_3 = -1; if (__pyx_t_9 < 0) { __pyx_t_9 += __pyx_pybuffernd_a.diminfo[0].shape; if (unlikely(__pyx_t_9 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_9 >= __pyx_pybuffernd_a.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 688; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_double_t *, __pyx_pybuffernd_a.rcbuffer->pybuffer.buf, __pyx_t_9, __pyx_pybuffernd_a.diminfo[0].strides) = __pyx_v_t; /* "pandas/algos.pyx":689 * a[i] = a[j] * a[j] = t * i += 1; j -= 1 # <<<<<<<<<<<<<< * * if i > j: break */ __pyx_v_i = (__pyx_v_i + 1); __pyx_v_j = (__pyx_v_j - 1); goto __pyx_L11; } __pyx_L11:; /* "pandas/algos.pyx":691 * i += 1; j -= 1 * * if i > j: break # <<<<<<<<<<<<<< * * if j < k: l = i */ __pyx_t_2 = ((__pyx_v_i > __pyx_v_j) != 0); if (__pyx_t_2) { goto __pyx_L6_break; goto __pyx_L12; } __pyx_L12:; } __pyx_L6_break:; /* "pandas/algos.pyx":693 * if i > j: break * * if j < k: l = i # <<<<<<<<<<<<<< * if k < i: m = j * return a[k] */ __pyx_t_2 = ((__pyx_v_j < __pyx_v_k) != 0); if (__pyx_t_2) { __pyx_v_l = __pyx_v_i; goto __pyx_L13; } __pyx_L13:; /* "pandas/algos.pyx":694 * * if j < k: l = i * if k < i: m = j # <<<<<<<<<<<<<< * return a[k] * */ __pyx_t_2 = ((__pyx_v_k < __pyx_v_i) != 0); if (__pyx_t_2) { __pyx_v_m = __pyx_v_j; goto __pyx_L14; } __pyx_L14:; } /* "pandas/algos.pyx":695 * if j < k: l = i * if k < i: m = j * return a[k] # <<<<<<<<<<<<<< * * cdef inline kth_smallest_c(float64_t* a, Py_ssize_t k, Py_ssize_t n): */ __Pyx_XDECREF(__pyx_r); __pyx_t_10 = __pyx_v_k; __pyx_t_3 = -1; if (__pyx_t_10 < 0) { __pyx_t_10 += __pyx_pybuffernd_a.diminfo[0].shape; if (unlikely(__pyx_t_10 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_10 >= __pyx_pybuffernd_a.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 695; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_11 = PyFloat_FromDouble((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_double_t *, __pyx_pybuffernd_a.rcbuffer->pybuffer.buf, __pyx_t_10, __pyx_pybuffernd_a.diminfo[0].strides))); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 695; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __pyx_r = __pyx_t_11; __pyx_t_11 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_11); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_a.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.kth_smallest", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_a.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/algos.pyx":697 * return a[k] * * cdef inline kth_smallest_c(float64_t* a, Py_ssize_t k, Py_ssize_t n): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i,j,l,m */ static CYTHON_INLINE PyObject *__pyx_f_6pandas_5algos_kth_smallest_c(__pyx_t_5numpy_float64_t *__pyx_v_a, Py_ssize_t __pyx_v_k, Py_ssize_t __pyx_v_n) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_l; Py_ssize_t __pyx_v_m; __pyx_t_5numpy_double_t __pyx_v_x; __pyx_t_5numpy_double_t __pyx_v_t; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("kth_smallest_c", 0); /* "pandas/algos.pyx":702 * double_t x, t * * l = 0 # <<<<<<<<<<<<<< * m = n-1 * while (l j: break */ __pyx_v_i = (__pyx_v_i + 1); __pyx_v_j = (__pyx_v_j - 1); goto __pyx_L11; } __pyx_L11:; /* "pandas/algos.pyx":718 * i += 1; j -= 1 * * if i > j: break # <<<<<<<<<<<<<< * * if j < k: l = i */ __pyx_t_1 = ((__pyx_v_i > __pyx_v_j) != 0); if (__pyx_t_1) { goto __pyx_L6_break; goto __pyx_L12; } __pyx_L12:; } __pyx_L6_break:; /* "pandas/algos.pyx":720 * if i > j: break * * if j < k: l = i # <<<<<<<<<<<<<< * if k < i: m = j * return a[k] */ __pyx_t_1 = ((__pyx_v_j < __pyx_v_k) != 0); if (__pyx_t_1) { __pyx_v_l = __pyx_v_i; goto __pyx_L13; } __pyx_L13:; /* "pandas/algos.pyx":721 * * if j < k: l = i * if k < i: m = j # <<<<<<<<<<<<<< * return a[k] * */ __pyx_t_1 = ((__pyx_v_k < __pyx_v_i) != 0); if (__pyx_t_1) { __pyx_v_m = __pyx_v_j; goto __pyx_L14; } __pyx_L14:; } /* "pandas/algos.pyx":722 * if j < k: l = i * if k < i: m = j * return a[k] # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = PyFloat_FromDouble((__pyx_v_a[__pyx_v_k])); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 722; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("pandas.algos.kth_smallest_c", __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_5algos_17median(PyObject *__pyx_self, PyObject *__pyx_v_arr); /*proto*/ static char __pyx_doc_6pandas_5algos_16median[] = "\n A faster median\n "; static PyMethodDef __pyx_mdef_6pandas_5algos_17median = {__Pyx_NAMESTR("median"), (PyCFunction)__pyx_pw_6pandas_5algos_17median, METH_O, __Pyx_DOCSTR(__pyx_doc_6pandas_5algos_16median)}; static PyObject *__pyx_pw_6pandas_5algos_17median(PyObject *__pyx_self, PyObject *__pyx_v_arr) { CYTHON_UNUSED int __pyx_lineno = 0; CYTHON_UNUSED const char *__pyx_filename = NULL; CYTHON_UNUSED int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("median (wrapper)", 0); if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_arr), __pyx_ptype_5numpy_ndarray, 1, "arr", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 725; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_16median(__pyx_self, ((PyArrayObject *)__pyx_v_arr)); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/algos.pyx":725 * * * def median(ndarray arr): # <<<<<<<<<<<<<< * ''' * A faster median */ static PyObject *__pyx_pf_6pandas_5algos_16median(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_arr) { int __pyx_v_n; 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("median", 0); __Pyx_INCREF((PyObject *)__pyx_v_arr); /* "pandas/algos.pyx":729 * A faster median * ''' * cdef int n = len(arr) # <<<<<<<<<<<<<< * * if len(arr) == 0: */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_arr)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 729; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/algos.pyx":731 * cdef int n = len(arr) * * if len(arr) == 0: # <<<<<<<<<<<<<< * return np.NaN * */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_arr)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 731; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_2 = ((__pyx_t_1 == 0) != 0); if (__pyx_t_2) { /* "pandas/algos.pyx":732 * * if len(arr) == 0: * return np.NaN # <<<<<<<<<<<<<< * * arr = arr.copy() */ __Pyx_XDECREF(__pyx_r); __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 732; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s__NaN); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 732; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; goto __pyx_L3; } __pyx_L3:; /* "pandas/algos.pyx":734 * return np.NaN * * arr = arr.copy() # <<<<<<<<<<<<<< * * if n % 2: */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_arr), __pyx_n_s__copy); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 734; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 734; __pyx_clineno = __LINE__; goto __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_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 734; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_3)); __pyx_t_3 = 0; /* "pandas/algos.pyx":736 * arr = arr.copy() * * if n % 2: # <<<<<<<<<<<<<< * return kth_smallest(arr, n / 2) * else: */ __pyx_t_2 = (__Pyx_mod_long(__pyx_v_n, 2) != 0); if (__pyx_t_2) { /* "pandas/algos.pyx":737 * * if n % 2: * return kth_smallest(arr, n / 2) # <<<<<<<<<<<<<< * else: * return (kth_smallest(arr, n / 2) + */ __Pyx_XDECREF(__pyx_r); __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s__kth_smallest); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 737; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PyInt_FromLong(__Pyx_div_long(__pyx_v_n, 2)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 737; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 737; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(((PyObject *)__pyx_v_arr)); PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_v_arr)); __Pyx_GIVEREF(((PyObject *)__pyx_v_arr)); PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 737; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; goto __pyx_L4; } /*else*/ { /* "pandas/algos.pyx":739 * return kth_smallest(arr, n / 2) * else: * return (kth_smallest(arr, n / 2) + # <<<<<<<<<<<<<< * kth_smallest(arr, n / 2 - 1)) / 2 * */ __Pyx_XDECREF(__pyx_r); /* "pandas/algos.pyx":740 * else: * return (kth_smallest(arr, n / 2) + * kth_smallest(arr, n / 2 - 1)) / 2 # <<<<<<<<<<<<<< * * */ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s__kth_smallest); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 739; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); /* "pandas/algos.pyx":739 * return kth_smallest(arr, n / 2) * else: * return (kth_smallest(arr, n / 2) + # <<<<<<<<<<<<<< * kth_smallest(arr, n / 2 - 1)) / 2 * */ __pyx_t_5 = PyInt_FromLong(__Pyx_div_long(__pyx_v_n, 2)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 739; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 739; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(((PyObject *)__pyx_v_arr)); PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_v_arr)); __Pyx_GIVEREF(((PyObject *)__pyx_v_arr)); PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 739; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; /* "pandas/algos.pyx":740 * else: * return (kth_smallest(arr, n / 2) + * kth_smallest(arr, n / 2 - 1)) / 2 # <<<<<<<<<<<<<< * * */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s__kth_smallest); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 740; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PyInt_FromLong((__Pyx_div_long(__pyx_v_n, 2) - 1)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 740; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 740; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(((PyObject *)__pyx_v_arr)); PyTuple_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_v_arr)); __Pyx_GIVEREF(((PyObject *)__pyx_v_arr)); PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 740; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0; __pyx_t_6 = PyNumber_Add(__pyx_t_5, __pyx_t_4); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 739; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyNumber_Divide(__pyx_t_6, __pyx_int_2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 740; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; } __pyx_L4:; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("pandas.algos.median", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_arr); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_19max_subseq(PyObject *__pyx_self, PyObject *__pyx_v_arr); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_19max_subseq = {__Pyx_NAMESTR("max_subseq"), (PyCFunction)__pyx_pw_6pandas_5algos_19max_subseq, METH_O, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_19max_subseq(PyObject *__pyx_self, PyObject *__pyx_v_arr) { CYTHON_UNUSED int __pyx_lineno = 0; CYTHON_UNUSED const char *__pyx_filename = NULL; CYTHON_UNUSED int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("max_subseq (wrapper)", 0); if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_arr), __pyx_ptype_5numpy_ndarray, 1, "arr", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 745; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_18max_subseq(__pyx_self, ((PyArrayObject *)__pyx_v_arr)); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/algos.pyx":745 * # -------------- Min, Max subsequence * * def max_subseq(ndarray[double_t] arr): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i=0,s=0,e=0,T,n */ static PyObject *__pyx_pf_6pandas_5algos_18max_subseq(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_arr) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_s; Py_ssize_t __pyx_v_e; Py_ssize_t __pyx_v_T; Py_ssize_t __pyx_v_n; double __pyx_v_m; double __pyx_v_S; __Pyx_LocalBuf_ND __pyx_pybuffernd_arr; __Pyx_Buffer __pyx_pybuffer_arr; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; int __pyx_t_2; long __pyx_t_3; int __pyx_t_4; Py_ssize_t __pyx_t_5; Py_ssize_t __pyx_t_6; Py_ssize_t __pyx_t_7; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; PyObject *__pyx_t_11 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("max_subseq", 0); __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_nn___pyx_t_5numpy_double_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 745; __pyx_clineno = __LINE__; goto __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/algos.pyx":747 * def max_subseq(ndarray[double_t] arr): * cdef: * Py_ssize_t i=0,s=0,e=0,T,n # <<<<<<<<<<<<<< * double m, S * */ __pyx_v_i = 0; __pyx_v_s = 0; __pyx_v_e = 0; /* "pandas/algos.pyx":750 * double m, S * * n = len(arr) # <<<<<<<<<<<<<< * * if len(arr) == 0: */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_arr)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 750; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/algos.pyx":752 * n = len(arr) * * if len(arr) == 0: # <<<<<<<<<<<<<< * return (-1,-1,None) * */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_arr)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 752; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_2 = ((__pyx_t_1 == 0) != 0); if (__pyx_t_2) { /* "pandas/algos.pyx":753 * * if len(arr) == 0: * return (-1,-1,None) # <<<<<<<<<<<<<< * * m = arr[0] */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_k_tuple_38)); __pyx_r = ((PyObject *)__pyx_k_tuple_38); goto __pyx_L0; goto __pyx_L3; } __pyx_L3:; /* "pandas/algos.pyx":755 * return (-1,-1,None) * * m = arr[0] # <<<<<<<<<<<<<< * S = m * T = 0 */ __pyx_t_3 = 0; __pyx_t_4 = -1; if (__pyx_t_3 < 0) { __pyx_t_3 += __pyx_pybuffernd_arr.diminfo[0].shape; if (unlikely(__pyx_t_3 < 0)) __pyx_t_4 = 0; } else if (unlikely(__pyx_t_3 >= __pyx_pybuffernd_arr.diminfo[0].shape)) __pyx_t_4 = 0; if (unlikely(__pyx_t_4 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_4); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 755; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_m = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_double_t *, __pyx_pybuffernd_arr.rcbuffer->pybuffer.buf, __pyx_t_3, __pyx_pybuffernd_arr.diminfo[0].strides)); /* "pandas/algos.pyx":756 * * m = arr[0] * S = m # <<<<<<<<<<<<<< * T = 0 * */ __pyx_v_S = __pyx_v_m; /* "pandas/algos.pyx":757 * m = arr[0] * S = m * T = 0 # <<<<<<<<<<<<<< * * for i in range(1, n): */ __pyx_v_T = 0; /* "pandas/algos.pyx":759 * T = 0 * * for i in range(1, n): # <<<<<<<<<<<<<< * # S = max { S + A[i], A[i] ) * if (S > 0): */ __pyx_t_1 = __pyx_v_n; for (__pyx_t_5 = 1; __pyx_t_5 < __pyx_t_1; __pyx_t_5+=1) { __pyx_v_i = __pyx_t_5; /* "pandas/algos.pyx":761 * for i in range(1, n): * # S = max { S + A[i], A[i] ) * if (S > 0): # <<<<<<<<<<<<<< * S = S + arr[i] * else: */ __pyx_t_2 = ((__pyx_v_S > 0.0) != 0); if (__pyx_t_2) { /* "pandas/algos.pyx":762 * # S = max { S + A[i], A[i] ) * if (S > 0): * S = S + arr[i] # <<<<<<<<<<<<<< * else: * S = arr[i] */ __pyx_t_6 = __pyx_v_i; __pyx_t_4 = -1; if (__pyx_t_6 < 0) { __pyx_t_6 += __pyx_pybuffernd_arr.diminfo[0].shape; if (unlikely(__pyx_t_6 < 0)) __pyx_t_4 = 0; } else if (unlikely(__pyx_t_6 >= __pyx_pybuffernd_arr.diminfo[0].shape)) __pyx_t_4 = 0; if (unlikely(__pyx_t_4 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_4); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 762; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_S = (__pyx_v_S + (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_double_t *, __pyx_pybuffernd_arr.rcbuffer->pybuffer.buf, __pyx_t_6, __pyx_pybuffernd_arr.diminfo[0].strides))); goto __pyx_L6; } /*else*/ { /* "pandas/algos.pyx":764 * S = S + arr[i] * else: * S = arr[i] # <<<<<<<<<<<<<< * T = i * if S > m: */ __pyx_t_7 = __pyx_v_i; __pyx_t_4 = -1; if (__pyx_t_7 < 0) { __pyx_t_7 += __pyx_pybuffernd_arr.diminfo[0].shape; if (unlikely(__pyx_t_7 < 0)) __pyx_t_4 = 0; } else if (unlikely(__pyx_t_7 >= __pyx_pybuffernd_arr.diminfo[0].shape)) __pyx_t_4 = 0; if (unlikely(__pyx_t_4 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_4); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 764; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_S = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_double_t *, __pyx_pybuffernd_arr.rcbuffer->pybuffer.buf, __pyx_t_7, __pyx_pybuffernd_arr.diminfo[0].strides)); /* "pandas/algos.pyx":765 * else: * S = arr[i] * T = i # <<<<<<<<<<<<<< * if S > m: * s = T */ __pyx_v_T = __pyx_v_i; } __pyx_L6:; /* "pandas/algos.pyx":766 * S = arr[i] * T = i * if S > m: # <<<<<<<<<<<<<< * s = T * e = i */ __pyx_t_2 = ((__pyx_v_S > __pyx_v_m) != 0); if (__pyx_t_2) { /* "pandas/algos.pyx":767 * T = i * if S > m: * s = T # <<<<<<<<<<<<<< * e = i * m = S */ __pyx_v_s = __pyx_v_T; /* "pandas/algos.pyx":768 * if S > m: * s = T * e = i # <<<<<<<<<<<<<< * m = S * */ __pyx_v_e = __pyx_v_i; /* "pandas/algos.pyx":769 * s = T * e = i * m = S # <<<<<<<<<<<<<< * * return (s, e, m) */ __pyx_v_m = __pyx_v_S; goto __pyx_L7; } __pyx_L7:; } /* "pandas/algos.pyx":771 * m = S * * return (s, e, m) # <<<<<<<<<<<<<< * * def min_subseq(ndarray[double_t] arr): */ __Pyx_XDECREF(__pyx_r); __pyx_t_8 = PyInt_FromSsize_t(__pyx_v_s); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 771; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_9 = PyInt_FromSsize_t(__pyx_v_e); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 771; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_t_10 = PyFloat_FromDouble(__pyx_v_m); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 771; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __pyx_t_11 = PyTuple_New(3); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 771; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_8); __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_11, 1, __pyx_t_9); __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_11, 2, __pyx_t_10); __Pyx_GIVEREF(__pyx_t_10); __pyx_t_8 = 0; __pyx_t_9 = 0; __pyx_t_10 = 0; __pyx_r = ((PyObject *)__pyx_t_11); __pyx_t_11 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); __Pyx_XDECREF(__pyx_t_10); __Pyx_XDECREF(__pyx_t_11); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_arr.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.max_subseq", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_arr.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_21min_subseq(PyObject *__pyx_self, PyObject *__pyx_v_arr); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_21min_subseq = {__Pyx_NAMESTR("min_subseq"), (PyCFunction)__pyx_pw_6pandas_5algos_21min_subseq, METH_O, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_21min_subseq(PyObject *__pyx_self, PyObject *__pyx_v_arr) { CYTHON_UNUSED int __pyx_lineno = 0; CYTHON_UNUSED const char *__pyx_filename = NULL; CYTHON_UNUSED int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("min_subseq (wrapper)", 0); if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_arr), __pyx_ptype_5numpy_ndarray, 1, "arr", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 773; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_20min_subseq(__pyx_self, ((PyArrayObject *)__pyx_v_arr)); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/algos.pyx":773 * return (s, e, m) * * def min_subseq(ndarray[double_t] arr): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t s, e */ static PyObject *__pyx_pf_6pandas_5algos_20min_subseq(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_arr) { Py_ssize_t __pyx_v_s; Py_ssize_t __pyx_v_e; double __pyx_v_m; __Pyx_LocalBuf_ND __pyx_pybuffernd_arr; __Pyx_Buffer __pyx_pybuffer_arr; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *(*__pyx_t_6)(PyObject *); Py_ssize_t __pyx_t_7; Py_ssize_t __pyx_t_8; double __pyx_t_9; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("min_subseq", 0); __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_nn___pyx_t_5numpy_double_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 773; __pyx_clineno = __LINE__; goto __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/algos.pyx":778 * double m * * (s, e, m) = max_subseq(-arr) # <<<<<<<<<<<<<< * * return (s, e, -m) */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__max_subseq); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 778; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyNumber_Negative(((PyObject *)__pyx_v_arr)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 778; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 778; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 778; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; if ((likely(PyTuple_CheckExact(__pyx_t_2))) || (PyList_CheckExact(__pyx_t_2))) { PyObject* sequence = __pyx_t_2; #if CYTHON_COMPILING_IN_CPYTHON Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 3)) { if (size > 3) __Pyx_RaiseTooManyValuesError(3); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 778; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_1 = PyTuple_GET_ITEM(sequence, 1); __pyx_t_4 = PyTuple_GET_ITEM(sequence, 2); } else { __pyx_t_3 = PyList_GET_ITEM(sequence, 0); __pyx_t_1 = PyList_GET_ITEM(sequence, 1); __pyx_t_4 = PyList_GET_ITEM(sequence, 2); } __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(__pyx_t_1); __Pyx_INCREF(__pyx_t_4); #else __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 778; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 778; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 778; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); #endif __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } else { Py_ssize_t index = -1; __pyx_t_5 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 778; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_6 = Py_TYPE(__pyx_t_5)->tp_iternext; index = 0; __pyx_t_3 = __pyx_t_6(__pyx_t_5); if (unlikely(!__pyx_t_3)) goto __pyx_L3_unpacking_failed; __Pyx_GOTREF(__pyx_t_3); index = 1; __pyx_t_1 = __pyx_t_6(__pyx_t_5); if (unlikely(!__pyx_t_1)) goto __pyx_L3_unpacking_failed; __Pyx_GOTREF(__pyx_t_1); index = 2; __pyx_t_4 = __pyx_t_6(__pyx_t_5); if (unlikely(!__pyx_t_4)) goto __pyx_L3_unpacking_failed; __Pyx_GOTREF(__pyx_t_4); if (__Pyx_IternextUnpackEndCheck(__pyx_t_6(__pyx_t_5), 3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 778; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_6 = NULL; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; goto __pyx_L4_unpacking_done; __pyx_L3_unpacking_failed:; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_6 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 778; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_L4_unpacking_done:; } __pyx_t_7 = __Pyx_PyIndex_AsSsize_t(__pyx_t_3); if (unlikely((__pyx_t_7 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 778; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_8 = __Pyx_PyIndex_AsSsize_t(__pyx_t_1); if (unlikely((__pyx_t_8 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 778; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_9 = __pyx_PyFloat_AsDouble(__pyx_t_4); if (unlikely((__pyx_t_9 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 778; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_s = __pyx_t_7; __pyx_v_e = __pyx_t_8; __pyx_v_m = __pyx_t_9; /* "pandas/algos.pyx":780 * (s, e, m) = max_subseq(-arr) * * return (s, e, -m) # <<<<<<<<<<<<<< * * #------------------------------------------------------------------------------- */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_s); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 780; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = PyInt_FromSsize_t(__pyx_v_e); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 780; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_1 = PyFloat_FromDouble((-__pyx_v_m)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 780; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 780; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_2 = 0; __pyx_t_4 = 0; __pyx_t_1 = 0; __pyx_r = ((PyObject *)__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_arr.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.min_subseq", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_arr.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_23roll_sum(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_23roll_sum = {__Pyx_NAMESTR("roll_sum"), (PyCFunction)__pyx_pw_6pandas_5algos_23roll_sum, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_23roll_sum(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_input = 0; int __pyx_v_win; int __pyx_v_minp; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("roll_sum (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__input,&__pyx_n_s__win,&__pyx_n_s__minp,0}; PyObject* values[3] = {0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__input)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__win)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("roll_sum", 1, 3, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 785; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__minp)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("roll_sum", 1, 3, 3, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 785; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "roll_sum") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 785; __pyx_clineno = __LINE__; goto __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_input = ((PyArrayObject *)values[0]); __pyx_v_win = __Pyx_PyInt_AsInt(values[1]); if (unlikely((__pyx_v_win == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 785; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_minp = __Pyx_PyInt_AsInt(values[2]); if (unlikely((__pyx_v_minp == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 785; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("roll_sum", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 785; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.roll_sum", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_input), __pyx_ptype_5numpy_ndarray, 1, "input", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 785; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_22roll_sum(__pyx_self, __pyx_v_input, __pyx_v_win, __pyx_v_minp); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/algos.pyx":785 * # Rolling sum * * def roll_sum(ndarray[double_t] input, int win, int minp): # <<<<<<<<<<<<<< * cdef double val, prev, sum_x = 0 * cdef int nobs = 0, i */ static PyObject *__pyx_pf_6pandas_5algos_22roll_sum(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_input, int __pyx_v_win, int __pyx_v_minp) { double __pyx_v_val; double __pyx_v_prev; double __pyx_v_sum_x; int __pyx_v_nobs; int __pyx_v_i; int __pyx_v_N; PyArrayObject *__pyx_v_output = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_input; __Pyx_Buffer __pyx_pybuffer_input; __Pyx_LocalBuf_ND __pyx_pybuffernd_output; __Pyx_Buffer __pyx_pybuffer_output; 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; PyArrayObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; int __pyx_t_8; long __pyx_t_9; int __pyx_t_10; int __pyx_t_11; int __pyx_t_12; int __pyx_t_13; int __pyx_t_14; int __pyx_t_15; int __pyx_t_16; int __pyx_t_17; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("roll_sum", 0); __pyx_pybuffer_output.pybuffer.buf = NULL; __pyx_pybuffer_output.refcount = 0; __pyx_pybuffernd_output.data = NULL; __pyx_pybuffernd_output.rcbuffer = &__pyx_pybuffer_output; __pyx_pybuffer_input.pybuffer.buf = NULL; __pyx_pybuffer_input.refcount = 0; __pyx_pybuffernd_input.data = NULL; __pyx_pybuffernd_input.rcbuffer = &__pyx_pybuffer_input; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_input.rcbuffer->pybuffer, (PyObject*)__pyx_v_input, &__Pyx_TypeInfo_nn___pyx_t_5numpy_double_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 785; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_input.diminfo[0].strides = __pyx_pybuffernd_input.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_input.diminfo[0].shape = __pyx_pybuffernd_input.rcbuffer->pybuffer.shape[0]; /* "pandas/algos.pyx":786 * * def roll_sum(ndarray[double_t] input, int win, int minp): * cdef double val, prev, sum_x = 0 # <<<<<<<<<<<<<< * cdef int nobs = 0, i * cdef int N = len(input) */ __pyx_v_sum_x = 0.0; /* "pandas/algos.pyx":787 * def roll_sum(ndarray[double_t] input, int win, int minp): * cdef double val, prev, sum_x = 0 * cdef int nobs = 0, i # <<<<<<<<<<<<<< * cdef int N = len(input) * */ __pyx_v_nobs = 0; /* "pandas/algos.pyx":788 * cdef double val, prev, sum_x = 0 * cdef int nobs = 0, i * cdef int N = len(input) # <<<<<<<<<<<<<< * * cdef ndarray[double_t] output = np.empty(N, dtype=float) */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_input)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 788; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_N = __pyx_t_1; /* "pandas/algos.pyx":790 * cdef int N = len(input) * * cdef ndarray[double_t] output = np.empty(N, dtype=float) # <<<<<<<<<<<<<< * * minp = _check_minp(win, minp, N) */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 790; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 790; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyInt_FromLong(__pyx_v_N); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 790; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 790; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 790; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_2)); if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__dtype), ((PyObject *)((PyObject*)(&PyFloat_Type)))) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 790; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_5 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 790; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 790; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_6 = ((PyArrayObject *)__pyx_t_5); { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_output.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_nn___pyx_t_5numpy_double_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { __pyx_v_output = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_output.rcbuffer->pybuffer.buf = NULL; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 790; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } else {__pyx_pybuffernd_output.diminfo[0].strides = __pyx_pybuffernd_output.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_output.diminfo[0].shape = __pyx_pybuffernd_output.rcbuffer->pybuffer.shape[0]; } } __pyx_t_6 = 0; __pyx_v_output = ((PyArrayObject *)__pyx_t_5); __pyx_t_5 = 0; /* "pandas/algos.pyx":792 * cdef ndarray[double_t] output = np.empty(N, dtype=float) * * minp = _check_minp(win, minp, N) # <<<<<<<<<<<<<< * * for i from 0 <= i < minp - 1: */ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s___check_minp); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 792; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_2 = PyInt_FromLong(__pyx_v_win); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 792; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = PyInt_FromLong(__pyx_v_minp); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 792; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = PyInt_FromLong(__pyx_v_N); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 792; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_7 = PyTuple_New(3); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 792; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_7, 2, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_2 = 0; __pyx_t_4 = 0; __pyx_t_3 = 0; __pyx_t_3 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_7), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 792; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0; __pyx_t_8 = __Pyx_PyInt_AsInt(__pyx_t_3); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 792; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_minp = __pyx_t_8; /* "pandas/algos.pyx":794 * minp = _check_minp(win, minp, N) * * for i from 0 <= i < minp - 1: # <<<<<<<<<<<<<< * val = input[i] * */ __pyx_t_9 = (__pyx_v_minp - 1); for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_9; __pyx_v_i++) { /* "pandas/algos.pyx":795 * * for i from 0 <= i < minp - 1: * val = input[i] # <<<<<<<<<<<<<< * * # Not NaN */ __pyx_t_8 = __pyx_v_i; __pyx_t_10 = -1; if (__pyx_t_8 < 0) { __pyx_t_8 += __pyx_pybuffernd_input.diminfo[0].shape; if (unlikely(__pyx_t_8 < 0)) __pyx_t_10 = 0; } else if (unlikely(__pyx_t_8 >= __pyx_pybuffernd_input.diminfo[0].shape)) __pyx_t_10 = 0; if (unlikely(__pyx_t_10 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_10); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 795; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_val = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_double_t *, __pyx_pybuffernd_input.rcbuffer->pybuffer.buf, __pyx_t_8, __pyx_pybuffernd_input.diminfo[0].strides)); /* "pandas/algos.pyx":798 * * # Not NaN * if val == val: # <<<<<<<<<<<<<< * nobs += 1 * sum_x += val */ __pyx_t_11 = ((__pyx_v_val == __pyx_v_val) != 0); if (__pyx_t_11) { /* "pandas/algos.pyx":799 * # Not NaN * if val == val: * nobs += 1 # <<<<<<<<<<<<<< * sum_x += val * */ __pyx_v_nobs = (__pyx_v_nobs + 1); /* "pandas/algos.pyx":800 * if val == val: * nobs += 1 * sum_x += val # <<<<<<<<<<<<<< * * output[i] = NaN */ __pyx_v_sum_x = (__pyx_v_sum_x + __pyx_v_val); goto __pyx_L5; } __pyx_L5:; /* "pandas/algos.pyx":802 * sum_x += val * * output[i] = NaN # <<<<<<<<<<<<<< * * for i from minp - 1 <= i < N: */ __pyx_t_10 = __pyx_v_i; __pyx_t_12 = -1; if (__pyx_t_10 < 0) { __pyx_t_10 += __pyx_pybuffernd_output.diminfo[0].shape; if (unlikely(__pyx_t_10 < 0)) __pyx_t_12 = 0; } else if (unlikely(__pyx_t_10 >= __pyx_pybuffernd_output.diminfo[0].shape)) __pyx_t_12 = 0; if (unlikely(__pyx_t_12 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_12); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 802; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_double_t *, __pyx_pybuffernd_output.rcbuffer->pybuffer.buf, __pyx_t_10, __pyx_pybuffernd_output.diminfo[0].strides) = __pyx_v_6pandas_5algos_NaN; } /* "pandas/algos.pyx":804 * output[i] = NaN * * for i from minp - 1 <= i < N: # <<<<<<<<<<<<<< * val = input[i] * */ __pyx_t_12 = __pyx_v_N; for (__pyx_v_i = (__pyx_v_minp - 1); __pyx_v_i < __pyx_t_12; __pyx_v_i++) { /* "pandas/algos.pyx":805 * * for i from minp - 1 <= i < N: * val = input[i] # <<<<<<<<<<<<<< * * if val == val: */ __pyx_t_13 = __pyx_v_i; __pyx_t_14 = -1; if (__pyx_t_13 < 0) { __pyx_t_13 += __pyx_pybuffernd_input.diminfo[0].shape; if (unlikely(__pyx_t_13 < 0)) __pyx_t_14 = 0; } else if (unlikely(__pyx_t_13 >= __pyx_pybuffernd_input.diminfo[0].shape)) __pyx_t_14 = 0; if (unlikely(__pyx_t_14 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_14); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 805; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_val = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_double_t *, __pyx_pybuffernd_input.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_input.diminfo[0].strides)); /* "pandas/algos.pyx":807 * val = input[i] * * if val == val: # <<<<<<<<<<<<<< * nobs += 1 * sum_x += val */ __pyx_t_11 = ((__pyx_v_val == __pyx_v_val) != 0); if (__pyx_t_11) { /* "pandas/algos.pyx":808 * * if val == val: * nobs += 1 # <<<<<<<<<<<<<< * sum_x += val * */ __pyx_v_nobs = (__pyx_v_nobs + 1); /* "pandas/algos.pyx":809 * if val == val: * nobs += 1 * sum_x += val # <<<<<<<<<<<<<< * * if i > win - 1: */ __pyx_v_sum_x = (__pyx_v_sum_x + __pyx_v_val); goto __pyx_L8; } __pyx_L8:; /* "pandas/algos.pyx":811 * sum_x += val * * if i > win - 1: # <<<<<<<<<<<<<< * prev = input[i - win] * if prev == prev: */ __pyx_t_11 = ((__pyx_v_i > (__pyx_v_win - 1)) != 0); if (__pyx_t_11) { /* "pandas/algos.pyx":812 * * if i > win - 1: * prev = input[i - win] # <<<<<<<<<<<<<< * if prev == prev: * sum_x -= prev */ __pyx_t_14 = (__pyx_v_i - __pyx_v_win); __pyx_t_15 = -1; if (__pyx_t_14 < 0) { __pyx_t_14 += __pyx_pybuffernd_input.diminfo[0].shape; if (unlikely(__pyx_t_14 < 0)) __pyx_t_15 = 0; } else if (unlikely(__pyx_t_14 >= __pyx_pybuffernd_input.diminfo[0].shape)) __pyx_t_15 = 0; if (unlikely(__pyx_t_15 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_15); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 812; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_prev = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_double_t *, __pyx_pybuffernd_input.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_input.diminfo[0].strides)); /* "pandas/algos.pyx":813 * if i > win - 1: * prev = input[i - win] * if prev == prev: # <<<<<<<<<<<<<< * sum_x -= prev * nobs -= 1 */ __pyx_t_11 = ((__pyx_v_prev == __pyx_v_prev) != 0); if (__pyx_t_11) { /* "pandas/algos.pyx":814 * prev = input[i - win] * if prev == prev: * sum_x -= prev # <<<<<<<<<<<<<< * nobs -= 1 * */ __pyx_v_sum_x = (__pyx_v_sum_x - __pyx_v_prev); /* "pandas/algos.pyx":815 * if prev == prev: * sum_x -= prev * nobs -= 1 # <<<<<<<<<<<<<< * * if nobs >= minp: */ __pyx_v_nobs = (__pyx_v_nobs - 1); goto __pyx_L10; } __pyx_L10:; goto __pyx_L9; } __pyx_L9:; /* "pandas/algos.pyx":817 * nobs -= 1 * * if nobs >= minp: # <<<<<<<<<<<<<< * output[i] = sum_x * else: */ __pyx_t_11 = ((__pyx_v_nobs >= __pyx_v_minp) != 0); if (__pyx_t_11) { /* "pandas/algos.pyx":818 * * if nobs >= minp: * output[i] = sum_x # <<<<<<<<<<<<<< * else: * output[i] = NaN */ __pyx_t_15 = __pyx_v_i; __pyx_t_16 = -1; if (__pyx_t_15 < 0) { __pyx_t_15 += __pyx_pybuffernd_output.diminfo[0].shape; if (unlikely(__pyx_t_15 < 0)) __pyx_t_16 = 0; } else if (unlikely(__pyx_t_15 >= __pyx_pybuffernd_output.diminfo[0].shape)) __pyx_t_16 = 0; if (unlikely(__pyx_t_16 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_16); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 818; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_double_t *, __pyx_pybuffernd_output.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_output.diminfo[0].strides) = __pyx_v_sum_x; goto __pyx_L11; } /*else*/ { /* "pandas/algos.pyx":820 * output[i] = sum_x * else: * output[i] = NaN # <<<<<<<<<<<<<< * * return output */ __pyx_t_16 = __pyx_v_i; __pyx_t_17 = -1; if (__pyx_t_16 < 0) { __pyx_t_16 += __pyx_pybuffernd_output.diminfo[0].shape; if (unlikely(__pyx_t_16 < 0)) __pyx_t_17 = 0; } else if (unlikely(__pyx_t_16 >= __pyx_pybuffernd_output.diminfo[0].shape)) __pyx_t_17 = 0; if (unlikely(__pyx_t_17 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_17); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 820; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_double_t *, __pyx_pybuffernd_output.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_output.diminfo[0].strides) = __pyx_v_6pandas_5algos_NaN; } __pyx_L11:; } /* "pandas/algos.pyx":822 * output[i] = NaN * * return output # <<<<<<<<<<<<<< * * #------------------------------------------------------------------------------- */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_output)); __pyx_r = ((PyObject *)__pyx_v_output); goto __pyx_L0; __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_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_7); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_input.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_output.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.roll_sum", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_input.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_output.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_output); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_25roll_mean(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_25roll_mean = {__Pyx_NAMESTR("roll_mean"), (PyCFunction)__pyx_pw_6pandas_5algos_25roll_mean, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_25roll_mean(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_input = 0; int __pyx_v_win; int __pyx_v_minp; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("roll_mean (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__input,&__pyx_n_s__win,&__pyx_n_s__minp,0}; PyObject* values[3] = {0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__input)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__win)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("roll_mean", 1, 3, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 827; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__minp)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("roll_mean", 1, 3, 3, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 827; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "roll_mean") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 827; __pyx_clineno = __LINE__; goto __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_input = ((PyArrayObject *)values[0]); __pyx_v_win = __Pyx_PyInt_AsInt(values[1]); if (unlikely((__pyx_v_win == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 828; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_minp = __Pyx_PyInt_AsInt(values[2]); if (unlikely((__pyx_v_minp == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 828; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("roll_mean", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 827; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.roll_mean", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_input), __pyx_ptype_5numpy_ndarray, 1, "input", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 827; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_24roll_mean(__pyx_self, __pyx_v_input, __pyx_v_win, __pyx_v_minp); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/algos.pyx":827 * # Rolling mean * * def roll_mean(ndarray[double_t] input, # <<<<<<<<<<<<<< * int win, int minp): * cdef: */ static PyObject *__pyx_pf_6pandas_5algos_24roll_mean(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_input, int __pyx_v_win, int __pyx_v_minp) { double __pyx_v_val; double __pyx_v_prev; double __pyx_v_result; double __pyx_v_sum_x; Py_ssize_t __pyx_v_nobs; Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_neg_ct; Py_ssize_t __pyx_v_N; PyArrayObject *__pyx_v_output = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_input; __Pyx_Buffer __pyx_pybuffer_input; __Pyx_LocalBuf_ND __pyx_pybuffernd_output; __Pyx_Buffer __pyx_pybuffer_output; 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; PyArrayObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; int __pyx_t_8; long __pyx_t_9; int __pyx_t_10; Py_ssize_t __pyx_t_11; 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; Py_ssize_t __pyx_t_18; Py_ssize_t __pyx_t_19; Py_ssize_t __pyx_t_20; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("roll_mean", 0); __pyx_pybuffer_output.pybuffer.buf = NULL; __pyx_pybuffer_output.refcount = 0; __pyx_pybuffernd_output.data = NULL; __pyx_pybuffernd_output.rcbuffer = &__pyx_pybuffer_output; __pyx_pybuffer_input.pybuffer.buf = NULL; __pyx_pybuffer_input.refcount = 0; __pyx_pybuffernd_input.data = NULL; __pyx_pybuffernd_input.rcbuffer = &__pyx_pybuffer_input; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_input.rcbuffer->pybuffer, (PyObject*)__pyx_v_input, &__Pyx_TypeInfo_nn___pyx_t_5numpy_double_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 827; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_input.diminfo[0].strides = __pyx_pybuffernd_input.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_input.diminfo[0].shape = __pyx_pybuffernd_input.rcbuffer->pybuffer.shape[0]; /* "pandas/algos.pyx":830 * int win, int minp): * cdef: * double val, prev, result, sum_x = 0 # <<<<<<<<<<<<<< * Py_ssize_t nobs = 0, i, neg_ct = 0 * Py_ssize_t N = len(input) */ __pyx_v_sum_x = 0.0; /* "pandas/algos.pyx":831 * cdef: * double val, prev, result, sum_x = 0 * Py_ssize_t nobs = 0, i, neg_ct = 0 # <<<<<<<<<<<<<< * Py_ssize_t N = len(input) * */ __pyx_v_nobs = 0; __pyx_v_neg_ct = 0; /* "pandas/algos.pyx":832 * double val, prev, result, sum_x = 0 * Py_ssize_t nobs = 0, i, neg_ct = 0 * Py_ssize_t N = len(input) # <<<<<<<<<<<<<< * * cdef ndarray[double_t] output = np.empty(N, dtype=float) */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_input)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 832; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_N = __pyx_t_1; /* "pandas/algos.pyx":834 * Py_ssize_t N = len(input) * * cdef ndarray[double_t] output = np.empty(N, dtype=float) # <<<<<<<<<<<<<< * minp = _check_minp(win, minp, N) * */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 834; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 834; __pyx_clineno = __LINE__; goto __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_N); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 834; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 834; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 834; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_2)); if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__dtype), ((PyObject *)((PyObject*)(&PyFloat_Type)))) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 834; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_5 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 834; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 834; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_6 = ((PyArrayObject *)__pyx_t_5); { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_output.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_nn___pyx_t_5numpy_double_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { __pyx_v_output = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_output.rcbuffer->pybuffer.buf = NULL; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 834; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } else {__pyx_pybuffernd_output.diminfo[0].strides = __pyx_pybuffernd_output.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_output.diminfo[0].shape = __pyx_pybuffernd_output.rcbuffer->pybuffer.shape[0]; } } __pyx_t_6 = 0; __pyx_v_output = ((PyArrayObject *)__pyx_t_5); __pyx_t_5 = 0; /* "pandas/algos.pyx":835 * * cdef ndarray[double_t] output = np.empty(N, dtype=float) * minp = _check_minp(win, minp, N) # <<<<<<<<<<<<<< * * for i from 0 <= i < minp - 1: */ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s___check_minp); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 835; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_2 = PyInt_FromLong(__pyx_v_win); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 835; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = PyInt_FromLong(__pyx_v_minp); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 835; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = PyInt_FromSsize_t(__pyx_v_N); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 835; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_7 = PyTuple_New(3); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 835; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_7, 2, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_2 = 0; __pyx_t_4 = 0; __pyx_t_3 = 0; __pyx_t_3 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_7), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 835; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0; __pyx_t_8 = __Pyx_PyInt_AsInt(__pyx_t_3); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 835; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_minp = __pyx_t_8; /* "pandas/algos.pyx":837 * minp = _check_minp(win, minp, N) * * for i from 0 <= i < minp - 1: # <<<<<<<<<<<<<< * val = input[i] * */ __pyx_t_9 = (__pyx_v_minp - 1); for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_9; __pyx_v_i++) { /* "pandas/algos.pyx":838 * * for i from 0 <= i < minp - 1: * val = input[i] # <<<<<<<<<<<<<< * * # Not NaN */ __pyx_t_1 = __pyx_v_i; __pyx_t_8 = -1; if (__pyx_t_1 < 0) { __pyx_t_1 += __pyx_pybuffernd_input.diminfo[0].shape; if (unlikely(__pyx_t_1 < 0)) __pyx_t_8 = 0; } else if (unlikely(__pyx_t_1 >= __pyx_pybuffernd_input.diminfo[0].shape)) __pyx_t_8 = 0; if (unlikely(__pyx_t_8 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_8); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 838; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_val = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_double_t *, __pyx_pybuffernd_input.rcbuffer->pybuffer.buf, __pyx_t_1, __pyx_pybuffernd_input.diminfo[0].strides)); /* "pandas/algos.pyx":841 * * # Not NaN * if val == val: # <<<<<<<<<<<<<< * nobs += 1 * sum_x += val */ __pyx_t_10 = ((__pyx_v_val == __pyx_v_val) != 0); if (__pyx_t_10) { /* "pandas/algos.pyx":842 * # Not NaN * if val == val: * nobs += 1 # <<<<<<<<<<<<<< * sum_x += val * if signbit(val): */ __pyx_v_nobs = (__pyx_v_nobs + 1); /* "pandas/algos.pyx":843 * if val == val: * nobs += 1 * sum_x += val # <<<<<<<<<<<<<< * if signbit(val): * neg_ct += 1 */ __pyx_v_sum_x = (__pyx_v_sum_x + __pyx_v_val); /* "pandas/algos.pyx":844 * nobs += 1 * sum_x += val * if signbit(val): # <<<<<<<<<<<<<< * neg_ct += 1 * */ __pyx_t_10 = (signbit(__pyx_v_val) != 0); if (__pyx_t_10) { /* "pandas/algos.pyx":845 * sum_x += val * if signbit(val): * neg_ct += 1 # <<<<<<<<<<<<<< * * output[i] = NaN */ __pyx_v_neg_ct = (__pyx_v_neg_ct + 1); goto __pyx_L6; } __pyx_L6:; goto __pyx_L5; } __pyx_L5:; /* "pandas/algos.pyx":847 * neg_ct += 1 * * output[i] = NaN # <<<<<<<<<<<<<< * * for i from minp - 1 <= i < N: */ __pyx_t_11 = __pyx_v_i; __pyx_t_8 = -1; if (__pyx_t_11 < 0) { __pyx_t_11 += __pyx_pybuffernd_output.diminfo[0].shape; if (unlikely(__pyx_t_11 < 0)) __pyx_t_8 = 0; } else if (unlikely(__pyx_t_11 >= __pyx_pybuffernd_output.diminfo[0].shape)) __pyx_t_8 = 0; if (unlikely(__pyx_t_8 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_8); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 847; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_double_t *, __pyx_pybuffernd_output.rcbuffer->pybuffer.buf, __pyx_t_11, __pyx_pybuffernd_output.diminfo[0].strides) = __pyx_v_6pandas_5algos_NaN; } /* "pandas/algos.pyx":849 * output[i] = NaN * * for i from minp - 1 <= i < N: # <<<<<<<<<<<<<< * val = input[i] * */ __pyx_t_12 = __pyx_v_N; for (__pyx_v_i = (__pyx_v_minp - 1); __pyx_v_i < __pyx_t_12; __pyx_v_i++) { /* "pandas/algos.pyx":850 * * for i from minp - 1 <= i < N: * val = input[i] # <<<<<<<<<<<<<< * * if val == val: */ __pyx_t_13 = __pyx_v_i; __pyx_t_8 = -1; if (__pyx_t_13 < 0) { __pyx_t_13 += __pyx_pybuffernd_input.diminfo[0].shape; if (unlikely(__pyx_t_13 < 0)) __pyx_t_8 = 0; } else if (unlikely(__pyx_t_13 >= __pyx_pybuffernd_input.diminfo[0].shape)) __pyx_t_8 = 0; if (unlikely(__pyx_t_8 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_8); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 850; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_val = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_double_t *, __pyx_pybuffernd_input.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_input.diminfo[0].strides)); /* "pandas/algos.pyx":852 * val = input[i] * * if val == val: # <<<<<<<<<<<<<< * nobs += 1 * sum_x += val */ __pyx_t_10 = ((__pyx_v_val == __pyx_v_val) != 0); if (__pyx_t_10) { /* "pandas/algos.pyx":853 * * if val == val: * nobs += 1 # <<<<<<<<<<<<<< * sum_x += val * if signbit(val): */ __pyx_v_nobs = (__pyx_v_nobs + 1); /* "pandas/algos.pyx":854 * if val == val: * nobs += 1 * sum_x += val # <<<<<<<<<<<<<< * if signbit(val): * neg_ct += 1 */ __pyx_v_sum_x = (__pyx_v_sum_x + __pyx_v_val); /* "pandas/algos.pyx":855 * nobs += 1 * sum_x += val * if signbit(val): # <<<<<<<<<<<<<< * neg_ct += 1 * */ __pyx_t_10 = (signbit(__pyx_v_val) != 0); if (__pyx_t_10) { /* "pandas/algos.pyx":856 * sum_x += val * if signbit(val): * neg_ct += 1 # <<<<<<<<<<<<<< * * if i > win - 1: */ __pyx_v_neg_ct = (__pyx_v_neg_ct + 1); goto __pyx_L10; } __pyx_L10:; goto __pyx_L9; } __pyx_L9:; /* "pandas/algos.pyx":858 * neg_ct += 1 * * if i > win - 1: # <<<<<<<<<<<<<< * prev = input[i - win] * if prev == prev: */ __pyx_t_10 = ((__pyx_v_i > (__pyx_v_win - 1)) != 0); if (__pyx_t_10) { /* "pandas/algos.pyx":859 * * if i > win - 1: * prev = input[i - win] # <<<<<<<<<<<<<< * if prev == prev: * sum_x -= prev */ __pyx_t_14 = (__pyx_v_i - __pyx_v_win); __pyx_t_8 = -1; if (__pyx_t_14 < 0) { __pyx_t_14 += __pyx_pybuffernd_input.diminfo[0].shape; if (unlikely(__pyx_t_14 < 0)) __pyx_t_8 = 0; } else if (unlikely(__pyx_t_14 >= __pyx_pybuffernd_input.diminfo[0].shape)) __pyx_t_8 = 0; if (unlikely(__pyx_t_8 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_8); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 859; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_prev = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_double_t *, __pyx_pybuffernd_input.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_input.diminfo[0].strides)); /* "pandas/algos.pyx":860 * if i > win - 1: * prev = input[i - win] * if prev == prev: # <<<<<<<<<<<<<< * sum_x -= prev * nobs -= 1 */ __pyx_t_10 = ((__pyx_v_prev == __pyx_v_prev) != 0); if (__pyx_t_10) { /* "pandas/algos.pyx":861 * prev = input[i - win] * if prev == prev: * sum_x -= prev # <<<<<<<<<<<<<< * nobs -= 1 * if signbit(prev): */ __pyx_v_sum_x = (__pyx_v_sum_x - __pyx_v_prev); /* "pandas/algos.pyx":862 * if prev == prev: * sum_x -= prev * nobs -= 1 # <<<<<<<<<<<<<< * if signbit(prev): * neg_ct -= 1 */ __pyx_v_nobs = (__pyx_v_nobs - 1); /* "pandas/algos.pyx":863 * sum_x -= prev * nobs -= 1 * if signbit(prev): # <<<<<<<<<<<<<< * neg_ct -= 1 * */ __pyx_t_10 = (signbit(__pyx_v_prev) != 0); if (__pyx_t_10) { /* "pandas/algos.pyx":864 * nobs -= 1 * if signbit(prev): * neg_ct -= 1 # <<<<<<<<<<<<<< * * if nobs >= minp: */ __pyx_v_neg_ct = (__pyx_v_neg_ct - 1); goto __pyx_L13; } __pyx_L13:; goto __pyx_L12; } __pyx_L12:; goto __pyx_L11; } __pyx_L11:; /* "pandas/algos.pyx":866 * neg_ct -= 1 * * if nobs >= minp: # <<<<<<<<<<<<<< * result = sum_x / nobs * if neg_ct == 0 and result < 0: */ __pyx_t_10 = ((__pyx_v_nobs >= __pyx_v_minp) != 0); if (__pyx_t_10) { /* "pandas/algos.pyx":867 * * if nobs >= minp: * result = sum_x / nobs # <<<<<<<<<<<<<< * if neg_ct == 0 and result < 0: * # all positive */ if (unlikely(__pyx_v_nobs == 0)) { #ifdef WITH_THREAD PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure(); #endif PyErr_Format(PyExc_ZeroDivisionError, "float division"); #ifdef WITH_THREAD PyGILState_Release(__pyx_gilstate_save); #endif {__pyx_filename = __pyx_f[0]; __pyx_lineno = 867; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_result = (__pyx_v_sum_x / __pyx_v_nobs); /* "pandas/algos.pyx":868 * if nobs >= minp: * result = sum_x / nobs * if neg_ct == 0 and result < 0: # <<<<<<<<<<<<<< * # all positive * output[i] = 0 */ __pyx_t_10 = ((__pyx_v_neg_ct == 0) != 0); if (__pyx_t_10) { __pyx_t_15 = ((__pyx_v_result < 0.0) != 0); __pyx_t_16 = __pyx_t_15; } else { __pyx_t_16 = __pyx_t_10; } if (__pyx_t_16) { /* "pandas/algos.pyx":870 * if neg_ct == 0 and result < 0: * # all positive * output[i] = 0 # <<<<<<<<<<<<<< * elif neg_ct == nobs and result > 0: * # all negative */ __pyx_t_17 = __pyx_v_i; __pyx_t_8 = -1; if (__pyx_t_17 < 0) { __pyx_t_17 += __pyx_pybuffernd_output.diminfo[0].shape; if (unlikely(__pyx_t_17 < 0)) __pyx_t_8 = 0; } else if (unlikely(__pyx_t_17 >= __pyx_pybuffernd_output.diminfo[0].shape)) __pyx_t_8 = 0; if (unlikely(__pyx_t_8 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_8); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 870; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_double_t *, __pyx_pybuffernd_output.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_output.diminfo[0].strides) = 0.0; goto __pyx_L15; } /* "pandas/algos.pyx":871 * # all positive * output[i] = 0 * elif neg_ct == nobs and result > 0: # <<<<<<<<<<<<<< * # all negative * output[i] = 0 */ __pyx_t_16 = ((__pyx_v_neg_ct == __pyx_v_nobs) != 0); if (__pyx_t_16) { __pyx_t_10 = ((__pyx_v_result > 0.0) != 0); __pyx_t_15 = __pyx_t_10; } else { __pyx_t_15 = __pyx_t_16; } if (__pyx_t_15) { /* "pandas/algos.pyx":873 * elif neg_ct == nobs and result > 0: * # all negative * output[i] = 0 # <<<<<<<<<<<<<< * else: * output[i] = result */ __pyx_t_18 = __pyx_v_i; __pyx_t_8 = -1; if (__pyx_t_18 < 0) { __pyx_t_18 += __pyx_pybuffernd_output.diminfo[0].shape; if (unlikely(__pyx_t_18 < 0)) __pyx_t_8 = 0; } else if (unlikely(__pyx_t_18 >= __pyx_pybuffernd_output.diminfo[0].shape)) __pyx_t_8 = 0; if (unlikely(__pyx_t_8 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_8); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 873; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_double_t *, __pyx_pybuffernd_output.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_output.diminfo[0].strides) = 0.0; goto __pyx_L15; } /*else*/ { /* "pandas/algos.pyx":875 * output[i] = 0 * else: * output[i] = result # <<<<<<<<<<<<<< * else: * output[i] = NaN */ __pyx_t_19 = __pyx_v_i; __pyx_t_8 = -1; if (__pyx_t_19 < 0) { __pyx_t_19 += __pyx_pybuffernd_output.diminfo[0].shape; if (unlikely(__pyx_t_19 < 0)) __pyx_t_8 = 0; } else if (unlikely(__pyx_t_19 >= __pyx_pybuffernd_output.diminfo[0].shape)) __pyx_t_8 = 0; if (unlikely(__pyx_t_8 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_8); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 875; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_double_t *, __pyx_pybuffernd_output.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_output.diminfo[0].strides) = __pyx_v_result; } __pyx_L15:; goto __pyx_L14; } /*else*/ { /* "pandas/algos.pyx":877 * output[i] = result * else: * output[i] = NaN # <<<<<<<<<<<<<< * * return output */ __pyx_t_20 = __pyx_v_i; __pyx_t_8 = -1; if (__pyx_t_20 < 0) { __pyx_t_20 += __pyx_pybuffernd_output.diminfo[0].shape; if (unlikely(__pyx_t_20 < 0)) __pyx_t_8 = 0; } else if (unlikely(__pyx_t_20 >= __pyx_pybuffernd_output.diminfo[0].shape)) __pyx_t_8 = 0; if (unlikely(__pyx_t_8 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_8); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 877; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_double_t *, __pyx_pybuffernd_output.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_output.diminfo[0].strides) = __pyx_v_6pandas_5algos_NaN; } __pyx_L14:; } /* "pandas/algos.pyx":879 * output[i] = NaN * * return output # <<<<<<<<<<<<<< * * #------------------------------------------------------------------------------- */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_output)); __pyx_r = ((PyObject *)__pyx_v_output); goto __pyx_L0; __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_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_7); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_input.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_output.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.roll_mean", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_input.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_output.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_output); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_27ewma(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6pandas_5algos_26ewma[] = "\n Compute exponentially-weighted moving average using center-of-mass.\n\n Parameters\n ----------\n input : ndarray (float64 type)\n com : float64\n\n Returns\n -------\n y : ndarray\n "; static PyMethodDef __pyx_mdef_6pandas_5algos_27ewma = {__Pyx_NAMESTR("ewma"), (PyCFunction)__pyx_pw_6pandas_5algos_27ewma, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_5algos_26ewma)}; static PyObject *__pyx_pw_6pandas_5algos_27ewma(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_input = 0; __pyx_t_5numpy_double_t __pyx_v_com; int __pyx_v_adjust; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("ewma (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__input,&__pyx_n_s__com,&__pyx_n_s__adjust,0}; PyObject* values[3] = {0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__input)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__com)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("ewma", 1, 3, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 884; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__adjust)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("ewma", 1, 3, 3, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 884; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "ewma") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 884; __pyx_clineno = __LINE__; goto __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_input = ((PyArrayObject *)values[0]); __pyx_v_com = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_com == (npy_double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 884; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_adjust = __Pyx_PyInt_AsInt(values[2]); if (unlikely((__pyx_v_adjust == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 884; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("ewma", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 884; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.ewma", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_input), __pyx_ptype_5numpy_ndarray, 1, "input", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 884; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_26ewma(__pyx_self, __pyx_v_input, __pyx_v_com, __pyx_v_adjust); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/algos.pyx":884 * # Exponentially weighted moving average * * def ewma(ndarray[double_t] input, double_t com, int adjust): # <<<<<<<<<<<<<< * ''' * Compute exponentially-weighted moving average using center-of-mass. */ static PyObject *__pyx_pf_6pandas_5algos_26ewma(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_input, __pyx_t_5numpy_double_t __pyx_v_com, int __pyx_v_adjust) { double __pyx_v_cur; double __pyx_v_prev; double __pyx_v_neww; double __pyx_v_oldw; double __pyx_v_adj; Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_N; PyArrayObject *__pyx_v_output = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_input; __Pyx_Buffer __pyx_pybuffer_input; __Pyx_LocalBuf_ND __pyx_pybuffernd_output; __Pyx_Buffer __pyx_pybuffer_output; 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; PyArrayObject *__pyx_t_6 = NULL; int __pyx_t_7; __pyx_t_5numpy_double_t __pyx_t_8; long __pyx_t_9; int __pyx_t_10; long __pyx_t_11; long __pyx_t_12; long __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; double __pyx_t_21; Py_ssize_t __pyx_t_22; Py_ssize_t __pyx_t_23; Py_ssize_t __pyx_t_24; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("ewma", 0); __pyx_pybuffer_output.pybuffer.buf = NULL; __pyx_pybuffer_output.refcount = 0; __pyx_pybuffernd_output.data = NULL; __pyx_pybuffernd_output.rcbuffer = &__pyx_pybuffer_output; __pyx_pybuffer_input.pybuffer.buf = NULL; __pyx_pybuffer_input.refcount = 0; __pyx_pybuffernd_input.data = NULL; __pyx_pybuffernd_input.rcbuffer = &__pyx_pybuffer_input; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_input.rcbuffer->pybuffer, (PyObject*)__pyx_v_input, &__Pyx_TypeInfo_nn___pyx_t_5numpy_double_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 884; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_input.diminfo[0].strides = __pyx_pybuffernd_input.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_input.diminfo[0].shape = __pyx_pybuffernd_input.rcbuffer->pybuffer.shape[0]; /* "pandas/algos.pyx":900 * cdef double cur, prev, neww, oldw, adj * cdef Py_ssize_t i * cdef Py_ssize_t N = len(input) # <<<<<<<<<<<<<< * * cdef ndarray[double_t] output = np.empty(N, dtype=float) */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_input)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 900; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_N = __pyx_t_1; /* "pandas/algos.pyx":902 * cdef Py_ssize_t N = len(input) * * cdef ndarray[double_t] output = np.empty(N, dtype=float) # <<<<<<<<<<<<<< * * if N == 0: */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 902; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 902; __pyx_clineno = __LINE__; goto __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_N); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 902; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 902; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 902; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_2)); if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__dtype), ((PyObject *)((PyObject*)(&PyFloat_Type)))) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 902; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_5 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 902; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 902; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_6 = ((PyArrayObject *)__pyx_t_5); { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_output.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_nn___pyx_t_5numpy_double_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { __pyx_v_output = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_output.rcbuffer->pybuffer.buf = NULL; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 902; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } else {__pyx_pybuffernd_output.diminfo[0].strides = __pyx_pybuffernd_output.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_output.diminfo[0].shape = __pyx_pybuffernd_output.rcbuffer->pybuffer.shape[0]; } } __pyx_t_6 = 0; __pyx_v_output = ((PyArrayObject *)__pyx_t_5); __pyx_t_5 = 0; /* "pandas/algos.pyx":904 * cdef ndarray[double_t] output = np.empty(N, dtype=float) * * if N == 0: # <<<<<<<<<<<<<< * return output * */ __pyx_t_7 = ((__pyx_v_N == 0) != 0); if (__pyx_t_7) { /* "pandas/algos.pyx":905 * * if N == 0: * return output # <<<<<<<<<<<<<< * * neww = 1. / (1. + com) */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_output)); __pyx_r = ((PyObject *)__pyx_v_output); goto __pyx_L0; goto __pyx_L3; } __pyx_L3:; /* "pandas/algos.pyx":907 * return output * * neww = 1. / (1. + com) # <<<<<<<<<<<<<< * oldw = 1. - neww * adj = oldw */ __pyx_t_8 = (1. + __pyx_v_com); if (unlikely(__pyx_t_8 == 0)) { #ifdef WITH_THREAD PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure(); #endif PyErr_Format(PyExc_ZeroDivisionError, "float division"); #ifdef WITH_THREAD PyGILState_Release(__pyx_gilstate_save); #endif {__pyx_filename = __pyx_f[0]; __pyx_lineno = 907; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_neww = (1. / __pyx_t_8); /* "pandas/algos.pyx":908 * * neww = 1. / (1. + com) * oldw = 1. - neww # <<<<<<<<<<<<<< * adj = oldw * */ __pyx_v_oldw = (1. - __pyx_v_neww); /* "pandas/algos.pyx":909 * neww = 1. / (1. + com) * oldw = 1. - neww * adj = oldw # <<<<<<<<<<<<<< * * if adjust: */ __pyx_v_adj = __pyx_v_oldw; /* "pandas/algos.pyx":911 * adj = oldw * * if adjust: # <<<<<<<<<<<<<< * output[0] = neww * input[0] * else: */ __pyx_t_7 = (__pyx_v_adjust != 0); if (__pyx_t_7) { /* "pandas/algos.pyx":912 * * if adjust: * output[0] = neww * input[0] # <<<<<<<<<<<<<< * else: * output[0] = input[0] */ __pyx_t_9 = 0; __pyx_t_10 = -1; if (__pyx_t_9 < 0) { __pyx_t_9 += __pyx_pybuffernd_input.diminfo[0].shape; if (unlikely(__pyx_t_9 < 0)) __pyx_t_10 = 0; } else if (unlikely(__pyx_t_9 >= __pyx_pybuffernd_input.diminfo[0].shape)) __pyx_t_10 = 0; if (unlikely(__pyx_t_10 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_10); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 912; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_11 = 0; __pyx_t_10 = -1; if (__pyx_t_11 < 0) { __pyx_t_11 += __pyx_pybuffernd_output.diminfo[0].shape; if (unlikely(__pyx_t_11 < 0)) __pyx_t_10 = 0; } else if (unlikely(__pyx_t_11 >= __pyx_pybuffernd_output.diminfo[0].shape)) __pyx_t_10 = 0; if (unlikely(__pyx_t_10 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_10); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 912; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_double_t *, __pyx_pybuffernd_output.rcbuffer->pybuffer.buf, __pyx_t_11, __pyx_pybuffernd_output.diminfo[0].strides) = (__pyx_v_neww * (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_double_t *, __pyx_pybuffernd_input.rcbuffer->pybuffer.buf, __pyx_t_9, __pyx_pybuffernd_input.diminfo[0].strides))); goto __pyx_L4; } /*else*/ { /* "pandas/algos.pyx":914 * output[0] = neww * input[0] * else: * output[0] = input[0] # <<<<<<<<<<<<<< * * for i from 1 <= i < N: */ __pyx_t_12 = 0; __pyx_t_10 = -1; if (__pyx_t_12 < 0) { __pyx_t_12 += __pyx_pybuffernd_input.diminfo[0].shape; if (unlikely(__pyx_t_12 < 0)) __pyx_t_10 = 0; } else if (unlikely(__pyx_t_12 >= __pyx_pybuffernd_input.diminfo[0].shape)) __pyx_t_10 = 0; if (unlikely(__pyx_t_10 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_10); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 914; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_13 = 0; __pyx_t_10 = -1; if (__pyx_t_13 < 0) { __pyx_t_13 += __pyx_pybuffernd_output.diminfo[0].shape; if (unlikely(__pyx_t_13 < 0)) __pyx_t_10 = 0; } else if (unlikely(__pyx_t_13 >= __pyx_pybuffernd_output.diminfo[0].shape)) __pyx_t_10 = 0; if (unlikely(__pyx_t_10 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_10); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 914; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_double_t *, __pyx_pybuffernd_output.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_output.diminfo[0].strides) = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_double_t *, __pyx_pybuffernd_input.rcbuffer->pybuffer.buf, __pyx_t_12, __pyx_pybuffernd_input.diminfo[0].strides)); } __pyx_L4:; /* "pandas/algos.pyx":916 * output[0] = input[0] * * for i from 1 <= i < N: # <<<<<<<<<<<<<< * cur = input[i] * prev = output[i - 1] */ __pyx_t_1 = __pyx_v_N; for (__pyx_v_i = 1; __pyx_v_i < __pyx_t_1; __pyx_v_i++) { /* "pandas/algos.pyx":917 * * for i from 1 <= i < N: * cur = input[i] # <<<<<<<<<<<<<< * prev = output[i - 1] * */ __pyx_t_14 = __pyx_v_i; __pyx_t_10 = -1; if (__pyx_t_14 < 0) { __pyx_t_14 += __pyx_pybuffernd_input.diminfo[0].shape; if (unlikely(__pyx_t_14 < 0)) __pyx_t_10 = 0; } else if (unlikely(__pyx_t_14 >= __pyx_pybuffernd_input.diminfo[0].shape)) __pyx_t_10 = 0; if (unlikely(__pyx_t_10 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_10); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 917; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_cur = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_double_t *, __pyx_pybuffernd_input.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_input.diminfo[0].strides)); /* "pandas/algos.pyx":918 * for i from 1 <= i < N: * cur = input[i] * prev = output[i - 1] # <<<<<<<<<<<<<< * * if cur == cur: */ __pyx_t_15 = (__pyx_v_i - 1); __pyx_t_10 = -1; if (__pyx_t_15 < 0) { __pyx_t_15 += __pyx_pybuffernd_output.diminfo[0].shape; if (unlikely(__pyx_t_15 < 0)) __pyx_t_10 = 0; } else if (unlikely(__pyx_t_15 >= __pyx_pybuffernd_output.diminfo[0].shape)) __pyx_t_10 = 0; if (unlikely(__pyx_t_10 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_10); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 918; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_prev = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_double_t *, __pyx_pybuffernd_output.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_output.diminfo[0].strides)); /* "pandas/algos.pyx":920 * prev = output[i - 1] * * if cur == cur: # <<<<<<<<<<<<<< * if prev == prev: * output[i] = oldw * prev + neww * cur */ __pyx_t_7 = ((__pyx_v_cur == __pyx_v_cur) != 0); if (__pyx_t_7) { /* "pandas/algos.pyx":921 * * if cur == cur: * if prev == prev: # <<<<<<<<<<<<<< * output[i] = oldw * prev + neww * cur * else: */ __pyx_t_7 = ((__pyx_v_prev == __pyx_v_prev) != 0); if (__pyx_t_7) { /* "pandas/algos.pyx":922 * if cur == cur: * if prev == prev: * output[i] = oldw * prev + neww * cur # <<<<<<<<<<<<<< * else: * output[i] = neww * cur */ __pyx_t_16 = __pyx_v_i; __pyx_t_10 = -1; if (__pyx_t_16 < 0) { __pyx_t_16 += __pyx_pybuffernd_output.diminfo[0].shape; if (unlikely(__pyx_t_16 < 0)) __pyx_t_10 = 0; } else if (unlikely(__pyx_t_16 >= __pyx_pybuffernd_output.diminfo[0].shape)) __pyx_t_10 = 0; if (unlikely(__pyx_t_10 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_10); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 922; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_double_t *, __pyx_pybuffernd_output.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_output.diminfo[0].strides) = ((__pyx_v_oldw * __pyx_v_prev) + (__pyx_v_neww * __pyx_v_cur)); goto __pyx_L8; } /*else*/ { /* "pandas/algos.pyx":924 * output[i] = oldw * prev + neww * cur * else: * output[i] = neww * cur # <<<<<<<<<<<<<< * else: * output[i] = prev */ __pyx_t_17 = __pyx_v_i; __pyx_t_10 = -1; if (__pyx_t_17 < 0) { __pyx_t_17 += __pyx_pybuffernd_output.diminfo[0].shape; if (unlikely(__pyx_t_17 < 0)) __pyx_t_10 = 0; } else if (unlikely(__pyx_t_17 >= __pyx_pybuffernd_output.diminfo[0].shape)) __pyx_t_10 = 0; if (unlikely(__pyx_t_10 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_10); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 924; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_double_t *, __pyx_pybuffernd_output.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_output.diminfo[0].strides) = (__pyx_v_neww * __pyx_v_cur); } __pyx_L8:; goto __pyx_L7; } /*else*/ { /* "pandas/algos.pyx":926 * output[i] = neww * cur * else: * output[i] = prev # <<<<<<<<<<<<<< * * if adjust: */ __pyx_t_18 = __pyx_v_i; __pyx_t_10 = -1; if (__pyx_t_18 < 0) { __pyx_t_18 += __pyx_pybuffernd_output.diminfo[0].shape; if (unlikely(__pyx_t_18 < 0)) __pyx_t_10 = 0; } else if (unlikely(__pyx_t_18 >= __pyx_pybuffernd_output.diminfo[0].shape)) __pyx_t_10 = 0; if (unlikely(__pyx_t_10 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_10); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 926; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_double_t *, __pyx_pybuffernd_output.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_output.diminfo[0].strides) = __pyx_v_prev; } __pyx_L7:; } /* "pandas/algos.pyx":928 * output[i] = prev * * if adjust: # <<<<<<<<<<<<<< * for i from 0 <= i < N: * cur = input[i] */ __pyx_t_7 = (__pyx_v_adjust != 0); if (__pyx_t_7) { /* "pandas/algos.pyx":929 * * if adjust: * for i from 0 <= i < N: # <<<<<<<<<<<<<< * cur = input[i] * */ __pyx_t_1 = __pyx_v_N; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_1; __pyx_v_i++) { /* "pandas/algos.pyx":930 * if adjust: * for i from 0 <= i < N: * cur = input[i] # <<<<<<<<<<<<<< * * if cur == cur: */ __pyx_t_19 = __pyx_v_i; __pyx_t_10 = -1; if (__pyx_t_19 < 0) { __pyx_t_19 += __pyx_pybuffernd_input.diminfo[0].shape; if (unlikely(__pyx_t_19 < 0)) __pyx_t_10 = 0; } else if (unlikely(__pyx_t_19 >= __pyx_pybuffernd_input.diminfo[0].shape)) __pyx_t_10 = 0; if (unlikely(__pyx_t_10 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_10); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 930; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_cur = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_double_t *, __pyx_pybuffernd_input.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_input.diminfo[0].strides)); /* "pandas/algos.pyx":932 * cur = input[i] * * if cur == cur: # <<<<<<<<<<<<<< * output[i] = output[i] / (1. - adj) * adj *= oldw */ __pyx_t_7 = ((__pyx_v_cur == __pyx_v_cur) != 0); if (__pyx_t_7) { /* "pandas/algos.pyx":933 * * if cur == cur: * output[i] = output[i] / (1. - adj) # <<<<<<<<<<<<<< * adj *= oldw * else: */ __pyx_t_20 = __pyx_v_i; __pyx_t_10 = -1; if (__pyx_t_20 < 0) { __pyx_t_20 += __pyx_pybuffernd_output.diminfo[0].shape; if (unlikely(__pyx_t_20 < 0)) __pyx_t_10 = 0; } else if (unlikely(__pyx_t_20 >= __pyx_pybuffernd_output.diminfo[0].shape)) __pyx_t_10 = 0; if (unlikely(__pyx_t_10 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_10); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 933; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_8 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_double_t *, __pyx_pybuffernd_output.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_output.diminfo[0].strides)); __pyx_t_21 = (1. - __pyx_v_adj); if (unlikely(__pyx_t_21 == 0)) { #ifdef WITH_THREAD PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure(); #endif PyErr_Format(PyExc_ZeroDivisionError, "float division"); #ifdef WITH_THREAD PyGILState_Release(__pyx_gilstate_save); #endif {__pyx_filename = __pyx_f[0]; __pyx_lineno = 933; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_22 = __pyx_v_i; __pyx_t_10 = -1; if (__pyx_t_22 < 0) { __pyx_t_22 += __pyx_pybuffernd_output.diminfo[0].shape; if (unlikely(__pyx_t_22 < 0)) __pyx_t_10 = 0; } else if (unlikely(__pyx_t_22 >= __pyx_pybuffernd_output.diminfo[0].shape)) __pyx_t_10 = 0; if (unlikely(__pyx_t_10 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_10); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 933; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_double_t *, __pyx_pybuffernd_output.rcbuffer->pybuffer.buf, __pyx_t_22, __pyx_pybuffernd_output.diminfo[0].strides) = (__pyx_t_8 / __pyx_t_21); /* "pandas/algos.pyx":934 * if cur == cur: * output[i] = output[i] / (1. - adj) * adj *= oldw # <<<<<<<<<<<<<< * else: * if i >= 1: */ __pyx_v_adj = (__pyx_v_adj * __pyx_v_oldw); goto __pyx_L12; } /*else*/ { /* "pandas/algos.pyx":936 * adj *= oldw * else: * if i >= 1: # <<<<<<<<<<<<<< * output[i] = output[i - 1] * */ __pyx_t_7 = ((__pyx_v_i >= 1) != 0); if (__pyx_t_7) { /* "pandas/algos.pyx":937 * else: * if i >= 1: * output[i] = output[i - 1] # <<<<<<<<<<<<<< * * return output */ __pyx_t_23 = (__pyx_v_i - 1); __pyx_t_10 = -1; if (__pyx_t_23 < 0) { __pyx_t_23 += __pyx_pybuffernd_output.diminfo[0].shape; if (unlikely(__pyx_t_23 < 0)) __pyx_t_10 = 0; } else if (unlikely(__pyx_t_23 >= __pyx_pybuffernd_output.diminfo[0].shape)) __pyx_t_10 = 0; if (unlikely(__pyx_t_10 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_10); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 937; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_24 = __pyx_v_i; __pyx_t_10 = -1; if (__pyx_t_24 < 0) { __pyx_t_24 += __pyx_pybuffernd_output.diminfo[0].shape; if (unlikely(__pyx_t_24 < 0)) __pyx_t_10 = 0; } else if (unlikely(__pyx_t_24 >= __pyx_pybuffernd_output.diminfo[0].shape)) __pyx_t_10 = 0; if (unlikely(__pyx_t_10 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_10); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 937; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_double_t *, __pyx_pybuffernd_output.rcbuffer->pybuffer.buf, __pyx_t_24, __pyx_pybuffernd_output.diminfo[0].strides) = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_double_t *, __pyx_pybuffernd_output.rcbuffer->pybuffer.buf, __pyx_t_23, __pyx_pybuffernd_output.diminfo[0].strides)); goto __pyx_L13; } __pyx_L13:; } __pyx_L12:; } goto __pyx_L9; } __pyx_L9:; /* "pandas/algos.pyx":939 * output[i] = output[i - 1] * * return output # <<<<<<<<<<<<<< * * #---------------------------------------------------------------------- */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_output)); __pyx_r = ((PyObject *)__pyx_v_output); goto __pyx_L0; __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_XDECREF(__pyx_t_5); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_input.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_output.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.ewma", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_input.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_output.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_output); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_29nancorr(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_29nancorr = {__Pyx_NAMESTR("nancorr"), (PyCFunction)__pyx_pw_6pandas_5algos_29nancorr, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_29nancorr(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_mat = 0; PyObject *__pyx_v_cov = 0; PyObject *__pyx_v_minp = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("nancorr (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__mat,&__pyx_n_s__cov,&__pyx_n_s__minp,0}; PyObject* values[3] = {0,0,0}; values[1] = __pyx_k_39; /* "pandas/algos.pyx":946 * @cython.boundscheck(False) * @cython.wraparound(False) * def nancorr(ndarray[float64_t, ndim=2] mat, cov=False, minp=None): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, j, xi, yi, N, K */ values[2] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__mat)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__cov); if (value) { values[1] = value; kw_args--; } } case 2: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__minp); if (value) { values[2] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "nancorr") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 946; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_mat = ((PyArrayObject *)values[0]); __pyx_v_cov = values[1]; __pyx_v_minp = values[2]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("nancorr", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 946; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.nancorr", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_mat), __pyx_ptype_5numpy_ndarray, 1, "mat", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 946; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_28nancorr(__pyx_self, __pyx_v_mat, __pyx_v_cov, __pyx_v_minp); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5algos_28nancorr(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_mat, PyObject *__pyx_v_cov, PyObject *__pyx_v_minp) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_xi; Py_ssize_t __pyx_v_yi; Py_ssize_t __pyx_v_N; Py_ssize_t __pyx_v_K; PyArrayObject *__pyx_v_result = 0; PyArrayObject *__pyx_v_mask = 0; __pyx_t_5numpy_int64_t __pyx_v_nobs; __pyx_t_5numpy_float64_t __pyx_v_vx; __pyx_t_5numpy_float64_t __pyx_v_vy; __pyx_t_5numpy_float64_t __pyx_v_sumx; __pyx_t_5numpy_float64_t __pyx_v_sumy; __pyx_t_5numpy_float64_t __pyx_v_sumxx; __pyx_t_5numpy_float64_t __pyx_v_sumyy; __pyx_t_5numpy_float64_t __pyx_v_meanx; __pyx_t_5numpy_float64_t __pyx_v_meany; __pyx_t_5numpy_float64_t __pyx_v_divisor; __Pyx_LocalBuf_ND __pyx_pybuffernd_mask; __Pyx_Buffer __pyx_pybuffer_mask; __Pyx_LocalBuf_ND __pyx_pybuffernd_mat; __Pyx_Buffer __pyx_pybuffer_mat; __Pyx_LocalBuf_ND __pyx_pybuffernd_result; __Pyx_Buffer __pyx_pybuffer_result; 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 *); Py_ssize_t __pyx_t_6; Py_ssize_t __pyx_t_7; int __pyx_t_8; int __pyx_t_9; PyObject *__pyx_t_10 = NULL; PyArrayObject *__pyx_t_11 = NULL; int __pyx_t_12; PyObject *__pyx_t_13 = NULL; PyObject *__pyx_t_14 = NULL; PyObject *__pyx_t_15 = NULL; PyArrayObject *__pyx_t_16 = NULL; 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; int __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; __pyx_t_5numpy_float64_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; Py_ssize_t __pyx_t_37; Py_ssize_t __pyx_t_38; Py_ssize_t __pyx_t_39; Py_ssize_t __pyx_t_40; Py_ssize_t __pyx_t_41; Py_ssize_t __pyx_t_42; double __pyx_t_43; Py_ssize_t __pyx_t_44; Py_ssize_t __pyx_t_45; Py_ssize_t __pyx_t_46; Py_ssize_t __pyx_t_47; Py_ssize_t __pyx_t_48; Py_ssize_t __pyx_t_49; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("nancorr", 0); __Pyx_INCREF(__pyx_v_minp); __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_mask.pybuffer.buf = NULL; __pyx_pybuffer_mask.refcount = 0; __pyx_pybuffernd_mask.data = NULL; __pyx_pybuffernd_mask.rcbuffer = &__pyx_pybuffer_mask; __pyx_pybuffer_mat.pybuffer.buf = NULL; __pyx_pybuffer_mat.refcount = 0; __pyx_pybuffernd_mat.data = NULL; __pyx_pybuffernd_mat.rcbuffer = &__pyx_pybuffer_mat; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_mat.rcbuffer->pybuffer, (PyObject*)__pyx_v_mat, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 946; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_mat.diminfo[0].strides = __pyx_pybuffernd_mat.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_mat.diminfo[0].shape = __pyx_pybuffernd_mat.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_mat.diminfo[1].strides = __pyx_pybuffernd_mat.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_mat.diminfo[1].shape = __pyx_pybuffernd_mat.rcbuffer->pybuffer.shape[1]; /* "pandas/algos.pyx":951 * ndarray[float64_t, ndim=2] result * ndarray[uint8_t, ndim=2] mask * int64_t nobs = 0 # <<<<<<<<<<<<<< * float64_t vx, vy, sumx, sumy, sumxx, sumyy, meanx, meany, divisor * */ __pyx_v_nobs = 0; /* "pandas/algos.pyx":954 * float64_t vx, vy, sumx, sumy, sumxx, sumyy, meanx, meany, divisor * * N, K = ( mat).shape # <<<<<<<<<<<<<< * * if minp is None: */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_mat), __pyx_n_s__shape); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 954; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) { PyObject* sequence = __pyx_t_1; #if CYTHON_COMPILING_IN_CPYTHON Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 954; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1); } else { __pyx_t_2 = PyList_GET_ITEM(sequence, 0); __pyx_t_3 = PyList_GET_ITEM(sequence, 1); } __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); #else __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 954; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 954; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } else { Py_ssize_t index = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 954; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_5 = Py_TYPE(__pyx_t_4)->tp_iternext; index = 0; __pyx_t_2 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_2)) goto __pyx_L3_unpacking_failed; __Pyx_GOTREF(__pyx_t_2); index = 1; __pyx_t_3 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_3)) goto __pyx_L3_unpacking_failed; __Pyx_GOTREF(__pyx_t_3); if (__Pyx_IternextUnpackEndCheck(__pyx_t_5(__pyx_t_4), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 954; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 954; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_L4_unpacking_done:; } __pyx_t_6 = __Pyx_PyIndex_AsSsize_t(__pyx_t_2); if (unlikely((__pyx_t_6 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 954; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_7 = __Pyx_PyIndex_AsSsize_t(__pyx_t_3); if (unlikely((__pyx_t_7 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 954; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_N = __pyx_t_6; __pyx_v_K = __pyx_t_7; /* "pandas/algos.pyx":956 * N, K = ( mat).shape * * if minp is None: # <<<<<<<<<<<<<< * minp = 1 * */ __pyx_t_8 = (__pyx_v_minp == Py_None); __pyx_t_9 = (__pyx_t_8 != 0); if (__pyx_t_9) { /* "pandas/algos.pyx":957 * * if minp is None: * minp = 1 # <<<<<<<<<<<<<< * * result = np.empty((K, K), dtype=np.float64) */ __Pyx_INCREF(__pyx_int_1); __Pyx_DECREF_SET(__pyx_v_minp, __pyx_int_1); goto __pyx_L5; } __pyx_L5:; /* "pandas/algos.pyx":959 * minp = 1 * * result = np.empty((K, K), dtype=np.float64) # <<<<<<<<<<<<<< * mask = np.isfinite(mat).view(np.uint8) * */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 959; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s__empty); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 959; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_K); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 959; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_K); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 959; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 959; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_1 = 0; __pyx_t_2 = 0; __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 959; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_t_4)); __Pyx_GIVEREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __pyx_t_4 = PyDict_New(); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 959; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_4)); __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 959; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s__float64); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 959; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (PyDict_SetItem(__pyx_t_4, ((PyObject *)__pyx_n_s__dtype), __pyx_t_10) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 959; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_t_10 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_2), ((PyObject *)__pyx_t_4)); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 959; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; if (!(likely(((__pyx_t_10) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_10, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 959; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_11 = ((PyArrayObject *)__pyx_t_10); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __pyx_t_12 = __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, 2, 0, __pyx_stack); if (unlikely(__pyx_t_12 < 0)) { PyErr_Fetch(&__pyx_t_13, &__pyx_t_14, &__pyx_t_15); 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, 2, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_13); Py_XDECREF(__pyx_t_14); Py_XDECREF(__pyx_t_15); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_13, __pyx_t_14, __pyx_t_15); } } __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]; __pyx_pybuffernd_result.diminfo[1].strides = __pyx_pybuffernd_result.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_result.diminfo[1].shape = __pyx_pybuffernd_result.rcbuffer->pybuffer.shape[1]; if (unlikely(__pyx_t_12 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 959; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_11 = 0; __pyx_v_result = ((PyArrayObject *)__pyx_t_10); __pyx_t_10 = 0; /* "pandas/algos.pyx":960 * * result = np.empty((K, K), dtype=np.float64) * mask = np.isfinite(mat).view(np.uint8) # <<<<<<<<<<<<<< * * for xi in range(K): */ __pyx_t_10 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 960; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s__isfinite); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 960; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_t_10 = PyTuple_New(1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 960; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_INCREF(((PyObject *)__pyx_v_mat)); PyTuple_SET_ITEM(__pyx_t_10, 0, ((PyObject *)__pyx_v_mat)); __Pyx_GIVEREF(((PyObject *)__pyx_v_mat)); __pyx_t_2 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_10), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 960; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_10)); __pyx_t_10 = 0; __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__view); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 960; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 960; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__uint8); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 960; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 960; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyObject_Call(__pyx_t_10, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 960; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 960; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_16 = ((PyArrayObject *)__pyx_t_4); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_mask.rcbuffer->pybuffer); __pyx_t_12 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_mask.rcbuffer->pybuffer, (PyObject*)__pyx_t_16, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack); if (unlikely(__pyx_t_12 < 0)) { PyErr_Fetch(&__pyx_t_15, &__pyx_t_14, &__pyx_t_13); 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, 2, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_15); Py_XDECREF(__pyx_t_14); Py_XDECREF(__pyx_t_13); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_15, __pyx_t_14, __pyx_t_13); } } __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]; __pyx_pybuffernd_mask.diminfo[1].strides = __pyx_pybuffernd_mask.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_mask.diminfo[1].shape = __pyx_pybuffernd_mask.rcbuffer->pybuffer.shape[1]; if (unlikely(__pyx_t_12 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 960; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_16 = 0; __pyx_v_mask = ((PyArrayObject *)__pyx_t_4); __pyx_t_4 = 0; /* "pandas/algos.pyx":962 * mask = np.isfinite(mat).view(np.uint8) * * for xi in range(K): # <<<<<<<<<<<<<< * for yi in range(xi + 1): * nobs = sumxx = sumyy = sumx = sumy = 0 */ __pyx_t_7 = __pyx_v_K; for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_7; __pyx_t_6+=1) { __pyx_v_xi = __pyx_t_6; /* "pandas/algos.pyx":963 * * for xi in range(K): * for yi in range(xi + 1): # <<<<<<<<<<<<<< * nobs = sumxx = sumyy = sumx = sumy = 0 * for i in range(N): */ __pyx_t_17 = (__pyx_v_xi + 1); for (__pyx_t_18 = 0; __pyx_t_18 < __pyx_t_17; __pyx_t_18+=1) { __pyx_v_yi = __pyx_t_18; /* "pandas/algos.pyx":964 * for xi in range(K): * for yi in range(xi + 1): * nobs = sumxx = sumyy = sumx = sumy = 0 # <<<<<<<<<<<<<< * for i in range(N): * if mask[i, xi] and mask[i, yi]: */ __pyx_v_nobs = 0; __pyx_v_sumxx = 0; __pyx_v_sumyy = 0; __pyx_v_sumx = 0; __pyx_v_sumy = 0; /* "pandas/algos.pyx":965 * for yi in range(xi + 1): * nobs = sumxx = sumyy = sumx = sumy = 0 * for i in range(N): # <<<<<<<<<<<<<< * if mask[i, xi] and mask[i, yi]: * vx = mat[i, xi] */ __pyx_t_19 = __pyx_v_N; for (__pyx_t_20 = 0; __pyx_t_20 < __pyx_t_19; __pyx_t_20+=1) { __pyx_v_i = __pyx_t_20; /* "pandas/algos.pyx":966 * nobs = sumxx = sumyy = sumx = sumy = 0 * for i in range(N): * if mask[i, xi] and mask[i, yi]: # <<<<<<<<<<<<<< * vx = mat[i, xi] * vy = mat[i, yi] */ __pyx_t_21 = __pyx_v_i; __pyx_t_22 = __pyx_v_xi; __pyx_t_9 = ((*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_mask.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_mask.diminfo[0].strides, __pyx_t_22, __pyx_pybuffernd_mask.diminfo[1].strides)) != 0); if (__pyx_t_9) { __pyx_t_23 = __pyx_v_i; __pyx_t_24 = __pyx_v_yi; __pyx_t_8 = ((*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_mask.rcbuffer->pybuffer.buf, __pyx_t_23, __pyx_pybuffernd_mask.diminfo[0].strides, __pyx_t_24, __pyx_pybuffernd_mask.diminfo[1].strides)) != 0); __pyx_t_25 = __pyx_t_8; } else { __pyx_t_25 = __pyx_t_9; } if (__pyx_t_25) { /* "pandas/algos.pyx":967 * for i in range(N): * if mask[i, xi] and mask[i, yi]: * vx = mat[i, xi] # <<<<<<<<<<<<<< * vy = mat[i, yi] * nobs += 1 */ __pyx_t_26 = __pyx_v_i; __pyx_t_27 = __pyx_v_xi; __pyx_v_vx = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_mat.rcbuffer->pybuffer.buf, __pyx_t_26, __pyx_pybuffernd_mat.diminfo[0].strides, __pyx_t_27, __pyx_pybuffernd_mat.diminfo[1].strides)); /* "pandas/algos.pyx":968 * if mask[i, xi] and mask[i, yi]: * vx = mat[i, xi] * vy = mat[i, yi] # <<<<<<<<<<<<<< * nobs += 1 * sumx += vx */ __pyx_t_28 = __pyx_v_i; __pyx_t_29 = __pyx_v_yi; __pyx_v_vy = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_mat.rcbuffer->pybuffer.buf, __pyx_t_28, __pyx_pybuffernd_mat.diminfo[0].strides, __pyx_t_29, __pyx_pybuffernd_mat.diminfo[1].strides)); /* "pandas/algos.pyx":969 * vx = mat[i, xi] * vy = mat[i, yi] * nobs += 1 # <<<<<<<<<<<<<< * sumx += vx * sumy += vy */ __pyx_v_nobs = (__pyx_v_nobs + 1); /* "pandas/algos.pyx":970 * vy = mat[i, yi] * nobs += 1 * sumx += vx # <<<<<<<<<<<<<< * sumy += vy * */ __pyx_v_sumx = (__pyx_v_sumx + __pyx_v_vx); /* "pandas/algos.pyx":971 * nobs += 1 * sumx += vx * sumy += vy # <<<<<<<<<<<<<< * * if nobs < minp: */ __pyx_v_sumy = (__pyx_v_sumy + __pyx_v_vy); goto __pyx_L12; } __pyx_L12:; } /* "pandas/algos.pyx":973 * sumy += vy * * if nobs < minp: # <<<<<<<<<<<<<< * result[xi, yi] = result[yi, xi] = np.NaN * else: */ __pyx_t_4 = __Pyx_PyInt_to_py_npy_int64(__pyx_v_nobs); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 973; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_2 = PyObject_RichCompare(__pyx_t_4, __pyx_v_minp, Py_LT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 973; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_25 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_25 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 973; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_25) { /* "pandas/algos.pyx":974 * * if nobs < minp: * result[xi, yi] = result[yi, xi] = np.NaN # <<<<<<<<<<<<<< * else: * meanx = sumx / nobs */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 974; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__NaN); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 974; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_30 = __pyx_PyFloat_AsDouble(__pyx_t_4); if (unlikely((__pyx_t_30 == (npy_float64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 974; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_19 = __pyx_v_xi; __pyx_t_20 = __pyx_v_yi; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_result.diminfo[0].strides, __pyx_t_20, __pyx_pybuffernd_result.diminfo[1].strides) = __pyx_t_30; __pyx_t_30 = __pyx_PyFloat_AsDouble(__pyx_t_4); if (unlikely((__pyx_t_30 == (npy_float64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 974; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_31 = __pyx_v_yi; __pyx_t_32 = __pyx_v_xi; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_31, __pyx_pybuffernd_result.diminfo[0].strides, __pyx_t_32, __pyx_pybuffernd_result.diminfo[1].strides) = __pyx_t_30; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; goto __pyx_L13; } /*else*/ { /* "pandas/algos.pyx":976 * result[xi, yi] = result[yi, xi] = np.NaN * else: * meanx = sumx / nobs # <<<<<<<<<<<<<< * meany = sumy / nobs * */ if (unlikely(__pyx_v_nobs == 0)) { #ifdef WITH_THREAD PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure(); #endif PyErr_Format(PyExc_ZeroDivisionError, "float division"); #ifdef WITH_THREAD PyGILState_Release(__pyx_gilstate_save); #endif {__pyx_filename = __pyx_f[0]; __pyx_lineno = 976; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_meanx = (__pyx_v_sumx / __pyx_v_nobs); /* "pandas/algos.pyx":977 * else: * meanx = sumx / nobs * meany = sumy / nobs # <<<<<<<<<<<<<< * * # now the cov numerator */ if (unlikely(__pyx_v_nobs == 0)) { #ifdef WITH_THREAD PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure(); #endif PyErr_Format(PyExc_ZeroDivisionError, "float division"); #ifdef WITH_THREAD PyGILState_Release(__pyx_gilstate_save); #endif {__pyx_filename = __pyx_f[0]; __pyx_lineno = 977; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_meany = (__pyx_v_sumy / __pyx_v_nobs); /* "pandas/algos.pyx":980 * * # now the cov numerator * sumx = 0 # <<<<<<<<<<<<<< * * for i in range(N): */ __pyx_v_sumx = 0.0; /* "pandas/algos.pyx":982 * sumx = 0 * * for i in range(N): # <<<<<<<<<<<<<< * if mask[i, xi] and mask[i, yi]: * vx = mat[i, xi] - meanx */ __pyx_t_33 = __pyx_v_N; for (__pyx_t_34 = 0; __pyx_t_34 < __pyx_t_33; __pyx_t_34+=1) { __pyx_v_i = __pyx_t_34; /* "pandas/algos.pyx":983 * * for i in range(N): * if mask[i, xi] and mask[i, yi]: # <<<<<<<<<<<<<< * vx = mat[i, xi] - meanx * vy = mat[i, yi] - meany */ __pyx_t_35 = __pyx_v_i; __pyx_t_36 = __pyx_v_xi; __pyx_t_25 = ((*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_mask.rcbuffer->pybuffer.buf, __pyx_t_35, __pyx_pybuffernd_mask.diminfo[0].strides, __pyx_t_36, __pyx_pybuffernd_mask.diminfo[1].strides)) != 0); if (__pyx_t_25) { __pyx_t_37 = __pyx_v_i; __pyx_t_38 = __pyx_v_yi; __pyx_t_9 = ((*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_mask.rcbuffer->pybuffer.buf, __pyx_t_37, __pyx_pybuffernd_mask.diminfo[0].strides, __pyx_t_38, __pyx_pybuffernd_mask.diminfo[1].strides)) != 0); __pyx_t_8 = __pyx_t_9; } else { __pyx_t_8 = __pyx_t_25; } if (__pyx_t_8) { /* "pandas/algos.pyx":984 * for i in range(N): * if mask[i, xi] and mask[i, yi]: * vx = mat[i, xi] - meanx # <<<<<<<<<<<<<< * vy = mat[i, yi] - meany * */ __pyx_t_39 = __pyx_v_i; __pyx_t_40 = __pyx_v_xi; __pyx_v_vx = ((*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_mat.rcbuffer->pybuffer.buf, __pyx_t_39, __pyx_pybuffernd_mat.diminfo[0].strides, __pyx_t_40, __pyx_pybuffernd_mat.diminfo[1].strides)) - __pyx_v_meanx); /* "pandas/algos.pyx":985 * if mask[i, xi] and mask[i, yi]: * vx = mat[i, xi] - meanx * vy = mat[i, yi] - meany # <<<<<<<<<<<<<< * * sumx += vx * vy */ __pyx_t_41 = __pyx_v_i; __pyx_t_42 = __pyx_v_yi; __pyx_v_vy = ((*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_mat.rcbuffer->pybuffer.buf, __pyx_t_41, __pyx_pybuffernd_mat.diminfo[0].strides, __pyx_t_42, __pyx_pybuffernd_mat.diminfo[1].strides)) - __pyx_v_meany); /* "pandas/algos.pyx":987 * vy = mat[i, yi] - meany * * sumx += vx * vy # <<<<<<<<<<<<<< * sumxx += vx * vx * sumyy += vy * vy */ __pyx_v_sumx = (__pyx_v_sumx + (__pyx_v_vx * __pyx_v_vy)); /* "pandas/algos.pyx":988 * * sumx += vx * vy * sumxx += vx * vx # <<<<<<<<<<<<<< * sumyy += vy * vy * */ __pyx_v_sumxx = (__pyx_v_sumxx + (__pyx_v_vx * __pyx_v_vx)); /* "pandas/algos.pyx":989 * sumx += vx * vy * sumxx += vx * vx * sumyy += vy * vy # <<<<<<<<<<<<<< * * divisor = (nobs - 1.0) if cov else sqrt(sumxx * sumyy) */ __pyx_v_sumyy = (__pyx_v_sumyy + (__pyx_v_vy * __pyx_v_vy)); goto __pyx_L16; } __pyx_L16:; } /* "pandas/algos.pyx":991 * sumyy += vy * vy * * divisor = (nobs - 1.0) if cov else sqrt(sumxx * sumyy) # <<<<<<<<<<<<<< * * if divisor != 0: */ __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_v_cov); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 991; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__pyx_t_8) { __pyx_t_43 = (__pyx_v_nobs - 1.0); } else { __pyx_t_43 = sqrt((__pyx_v_sumxx * __pyx_v_sumyy)); } __pyx_v_divisor = __pyx_t_43; /* "pandas/algos.pyx":993 * divisor = (nobs - 1.0) if cov else sqrt(sumxx * sumyy) * * if divisor != 0: # <<<<<<<<<<<<<< * result[xi, yi] = result[yi, xi] = sumx / divisor * else: */ __pyx_t_8 = ((__pyx_v_divisor != 0.0) != 0); if (__pyx_t_8) { /* "pandas/algos.pyx":994 * * if divisor != 0: * result[xi, yi] = result[yi, xi] = sumx / divisor # <<<<<<<<<<<<<< * else: * result[xi, yi] = result[yi, xi] = np.NaN */ if (unlikely(__pyx_v_divisor == 0)) { #ifdef WITH_THREAD PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure(); #endif PyErr_Format(PyExc_ZeroDivisionError, "float division"); #ifdef WITH_THREAD PyGILState_Release(__pyx_gilstate_save); #endif {__pyx_filename = __pyx_f[0]; __pyx_lineno = 994; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_30 = (__pyx_v_sumx / __pyx_v_divisor); __pyx_t_33 = __pyx_v_xi; __pyx_t_34 = __pyx_v_yi; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_33, __pyx_pybuffernd_result.diminfo[0].strides, __pyx_t_34, __pyx_pybuffernd_result.diminfo[1].strides) = __pyx_t_30; __pyx_t_44 = __pyx_v_yi; __pyx_t_45 = __pyx_v_xi; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_44, __pyx_pybuffernd_result.diminfo[0].strides, __pyx_t_45, __pyx_pybuffernd_result.diminfo[1].strides) = __pyx_t_30; goto __pyx_L17; } /*else*/ { /* "pandas/algos.pyx":996 * result[xi, yi] = result[yi, xi] = sumx / divisor * else: * result[xi, yi] = result[yi, xi] = np.NaN # <<<<<<<<<<<<<< * * return result */ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 996; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s__NaN); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 996; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_30 = __pyx_PyFloat_AsDouble(__pyx_t_2); if (unlikely((__pyx_t_30 == (npy_float64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 996; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_46 = __pyx_v_xi; __pyx_t_47 = __pyx_v_yi; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_46, __pyx_pybuffernd_result.diminfo[0].strides, __pyx_t_47, __pyx_pybuffernd_result.diminfo[1].strides) = __pyx_t_30; __pyx_t_30 = __pyx_PyFloat_AsDouble(__pyx_t_2); if (unlikely((__pyx_t_30 == (npy_float64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 996; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_48 = __pyx_v_yi; __pyx_t_49 = __pyx_v_xi; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_48, __pyx_pybuffernd_result.diminfo[0].strides, __pyx_t_49, __pyx_pybuffernd_result.diminfo[1].strides) = __pyx_t_30; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } __pyx_L17:; } __pyx_L13:; } } /* "pandas/algos.pyx":998 * result[xi, yi] = result[yi, xi] = np.NaN * * return result # <<<<<<<<<<<<<< * * #---------------------------------------------------------------------- */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_result)); __pyx_r = ((PyObject *)__pyx_v_result); goto __pyx_L0; __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_10); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_mask.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_mat.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.nancorr", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_mask.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_mat.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_result); __Pyx_XDECREF((PyObject *)__pyx_v_mask); __Pyx_XDECREF(__pyx_v_minp); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_31nancorr_spearman(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_31nancorr_spearman = {__Pyx_NAMESTR("nancorr_spearman"), (PyCFunction)__pyx_pw_6pandas_5algos_31nancorr_spearman, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_31nancorr_spearman(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_mat = 0; Py_ssize_t __pyx_v_minp; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("nancorr_spearman (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__mat,&__pyx_n_s__minp,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__mat)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__minp); if (value) { values[1] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "nancorr_spearman") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1005; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_mat = ((PyArrayObject *)values[0]); if (values[1]) { __pyx_v_minp = __Pyx_PyIndex_AsSsize_t(values[1]); if (unlikely((__pyx_v_minp == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1005; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } else { __pyx_v_minp = ((Py_ssize_t)1); } } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("nancorr_spearman", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1005; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.nancorr_spearman", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_mat), __pyx_ptype_5numpy_ndarray, 1, "mat", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1005; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_30nancorr_spearman(__pyx_self, __pyx_v_mat, __pyx_v_minp); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/algos.pyx":1005 * @cython.boundscheck(False) * @cython.wraparound(False) * def nancorr_spearman(ndarray[float64_t, ndim=2] mat, Py_ssize_t minp=1): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, j, xi, yi, N, K */ static PyObject *__pyx_pf_6pandas_5algos_30nancorr_spearman(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_mat, Py_ssize_t __pyx_v_minp) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_xi; Py_ssize_t __pyx_v_yi; Py_ssize_t __pyx_v_N; Py_ssize_t __pyx_v_K; PyArrayObject *__pyx_v_result = 0; PyArrayObject *__pyx_v_maskedx = 0; PyArrayObject *__pyx_v_maskedy = 0; PyArrayObject *__pyx_v_mask = 0; __pyx_t_5numpy_int64_t __pyx_v_nobs; __pyx_t_5numpy_float64_t __pyx_v_vx; __pyx_t_5numpy_float64_t __pyx_v_vy; __pyx_t_5numpy_float64_t __pyx_v_sumx; __pyx_t_5numpy_float64_t __pyx_v_sumxx; __pyx_t_5numpy_float64_t __pyx_v_sumyy; __pyx_t_5numpy_float64_t __pyx_v_mean; __pyx_t_5numpy_float64_t __pyx_v_divisor; __Pyx_LocalBuf_ND __pyx_pybuffernd_mask; __Pyx_Buffer __pyx_pybuffer_mask; __Pyx_LocalBuf_ND __pyx_pybuffernd_maskedx; __Pyx_Buffer __pyx_pybuffer_maskedx; __Pyx_LocalBuf_ND __pyx_pybuffernd_maskedy; __Pyx_Buffer __pyx_pybuffer_maskedy; __Pyx_LocalBuf_ND __pyx_pybuffernd_mat; __Pyx_Buffer __pyx_pybuffer_mat; __Pyx_LocalBuf_ND __pyx_pybuffernd_result; __Pyx_Buffer __pyx_pybuffer_result; 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 *); Py_ssize_t __pyx_t_6; Py_ssize_t __pyx_t_7; 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; PyArrayObject *__pyx_t_14 = NULL; 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; int __pyx_t_21; Py_ssize_t __pyx_t_22; Py_ssize_t __pyx_t_23; int __pyx_t_24; int __pyx_t_25; __pyx_t_5numpy_float64_t __pyx_t_26; Py_ssize_t __pyx_t_27; Py_ssize_t __pyx_t_28; PyArrayObject *__pyx_t_29 = NULL; PyArrayObject *__pyx_t_30 = NULL; 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; Py_ssize_t __pyx_t_37; Py_ssize_t __pyx_t_38; Py_ssize_t __pyx_t_39; Py_ssize_t __pyx_t_40; Py_ssize_t __pyx_t_41; Py_ssize_t __pyx_t_42; __pyx_t_5numpy_int64_t __pyx_t_43; Py_ssize_t __pyx_t_44; Py_ssize_t __pyx_t_45; Py_ssize_t __pyx_t_46; Py_ssize_t __pyx_t_47; Py_ssize_t __pyx_t_48; Py_ssize_t __pyx_t_49; Py_ssize_t __pyx_t_50; Py_ssize_t __pyx_t_51; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("nancorr_spearman", 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_maskedx.pybuffer.buf = NULL; __pyx_pybuffer_maskedx.refcount = 0; __pyx_pybuffernd_maskedx.data = NULL; __pyx_pybuffernd_maskedx.rcbuffer = &__pyx_pybuffer_maskedx; __pyx_pybuffer_maskedy.pybuffer.buf = NULL; __pyx_pybuffer_maskedy.refcount = 0; __pyx_pybuffernd_maskedy.data = NULL; __pyx_pybuffernd_maskedy.rcbuffer = &__pyx_pybuffer_maskedy; __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_mat.pybuffer.buf = NULL; __pyx_pybuffer_mat.refcount = 0; __pyx_pybuffernd_mat.data = NULL; __pyx_pybuffernd_mat.rcbuffer = &__pyx_pybuffer_mat; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_mat.rcbuffer->pybuffer, (PyObject*)__pyx_v_mat, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1005; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_mat.diminfo[0].strides = __pyx_pybuffernd_mat.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_mat.diminfo[0].shape = __pyx_pybuffernd_mat.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_mat.diminfo[1].strides = __pyx_pybuffernd_mat.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_mat.diminfo[1].shape = __pyx_pybuffernd_mat.rcbuffer->pybuffer.shape[1]; /* "pandas/algos.pyx":1012 * ndarray[float64_t, ndim=1] maskedy * ndarray[uint8_t, ndim=2] mask * int64_t nobs = 0 # <<<<<<<<<<<<<< * float64_t vx, vy, sumx, sumxx, sumyy, mean, divisor * */ __pyx_v_nobs = 0; /* "pandas/algos.pyx":1015 * float64_t vx, vy, sumx, sumxx, sumyy, mean, divisor * * N, K = ( mat).shape # <<<<<<<<<<<<<< * * result = np.empty((K, K), dtype=np.float64) */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_mat), __pyx_n_s__shape); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1015; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) { PyObject* sequence = __pyx_t_1; #if CYTHON_COMPILING_IN_CPYTHON Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1015; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1); } else { __pyx_t_2 = PyList_GET_ITEM(sequence, 0); __pyx_t_3 = PyList_GET_ITEM(sequence, 1); } __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); #else __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1015; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1015; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } else { Py_ssize_t index = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1015; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_5 = Py_TYPE(__pyx_t_4)->tp_iternext; index = 0; __pyx_t_2 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_2)) goto __pyx_L3_unpacking_failed; __Pyx_GOTREF(__pyx_t_2); index = 1; __pyx_t_3 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_3)) goto __pyx_L3_unpacking_failed; __Pyx_GOTREF(__pyx_t_3); if (__Pyx_IternextUnpackEndCheck(__pyx_t_5(__pyx_t_4), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1015; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 1015; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_L4_unpacking_done:; } __pyx_t_6 = __Pyx_PyIndex_AsSsize_t(__pyx_t_2); if (unlikely((__pyx_t_6 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1015; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_7 = __Pyx_PyIndex_AsSsize_t(__pyx_t_3); if (unlikely((__pyx_t_7 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1015; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_N = __pyx_t_6; __pyx_v_K = __pyx_t_7; /* "pandas/algos.pyx":1017 * N, K = ( mat).shape * * result = np.empty((K, K), dtype=np.float64) # <<<<<<<<<<<<<< * mask = np.isfinite(mat).view(np.uint8) * */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1017; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s__empty); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1017; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_K); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1017; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_K); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1017; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1017; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_1 = 0; __pyx_t_2 = 0; __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1017; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_t_4)); __Pyx_GIVEREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __pyx_t_4 = PyDict_New(); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1017; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_4)); __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1017; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s__float64); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1017; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (PyDict_SetItem(__pyx_t_4, ((PyObject *)__pyx_n_s__dtype), __pyx_t_8) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1017; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_8 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_2), ((PyObject *)__pyx_t_4)); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1017; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; if (!(likely(((__pyx_t_8) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_8, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1017; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_9 = ((PyArrayObject *)__pyx_t_8); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __pyx_t_10 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_t_9, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_result.rcbuffer->pybuffer, (PyObject*)__pyx_v_result, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_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]; __pyx_pybuffernd_result.diminfo[1].strides = __pyx_pybuffernd_result.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_result.diminfo[1].shape = __pyx_pybuffernd_result.rcbuffer->pybuffer.shape[1]; if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1017; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_9 = 0; __pyx_v_result = ((PyArrayObject *)__pyx_t_8); __pyx_t_8 = 0; /* "pandas/algos.pyx":1018 * * result = np.empty((K, K), dtype=np.float64) * mask = np.isfinite(mat).view(np.uint8) # <<<<<<<<<<<<<< * * for xi in range(K): */ __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1018; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s__isfinite); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1018; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1018; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_INCREF(((PyObject *)__pyx_v_mat)); PyTuple_SET_ITEM(__pyx_t_8, 0, ((PyObject *)__pyx_v_mat)); __Pyx_GIVEREF(((PyObject *)__pyx_v_mat)); __pyx_t_2 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_8), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1018; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0; __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__view); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1018; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1018; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__uint8); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1018; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1018; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyObject_Call(__pyx_t_8, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1018; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1018; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_14 = ((PyArrayObject *)__pyx_t_4); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_mask.rcbuffer->pybuffer); __pyx_t_10 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_mask.rcbuffer->pybuffer, (PyObject*)__pyx_t_14, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 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_mask.rcbuffer->pybuffer, (PyObject*)__pyx_v_mask, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 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_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]; __pyx_pybuffernd_mask.diminfo[1].strides = __pyx_pybuffernd_mask.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_mask.diminfo[1].shape = __pyx_pybuffernd_mask.rcbuffer->pybuffer.shape[1]; if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1018; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_14 = 0; __pyx_v_mask = ((PyArrayObject *)__pyx_t_4); __pyx_t_4 = 0; /* "pandas/algos.pyx":1020 * mask = np.isfinite(mat).view(np.uint8) * * for xi in range(K): # <<<<<<<<<<<<<< * for yi in range(xi + 1): * nobs = 0 */ __pyx_t_7 = __pyx_v_K; for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_7; __pyx_t_6+=1) { __pyx_v_xi = __pyx_t_6; /* "pandas/algos.pyx":1021 * * for xi in range(K): * for yi in range(xi + 1): # <<<<<<<<<<<<<< * nobs = 0 * for i in range(N): */ __pyx_t_15 = (__pyx_v_xi + 1); for (__pyx_t_16 = 0; __pyx_t_16 < __pyx_t_15; __pyx_t_16+=1) { __pyx_v_yi = __pyx_t_16; /* "pandas/algos.pyx":1022 * for xi in range(K): * for yi in range(xi + 1): * nobs = 0 # <<<<<<<<<<<<<< * for i in range(N): * if mask[i, xi] and mask[i, yi]: */ __pyx_v_nobs = 0; /* "pandas/algos.pyx":1023 * for yi in range(xi + 1): * nobs = 0 * for i in range(N): # <<<<<<<<<<<<<< * if mask[i, xi] and mask[i, yi]: * nobs += 1 */ __pyx_t_17 = __pyx_v_N; for (__pyx_t_18 = 0; __pyx_t_18 < __pyx_t_17; __pyx_t_18+=1) { __pyx_v_i = __pyx_t_18; /* "pandas/algos.pyx":1024 * nobs = 0 * for i in range(N): * if mask[i, xi] and mask[i, yi]: # <<<<<<<<<<<<<< * nobs += 1 * */ __pyx_t_19 = __pyx_v_i; __pyx_t_20 = __pyx_v_xi; __pyx_t_21 = ((*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_mask.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_mask.diminfo[0].strides, __pyx_t_20, __pyx_pybuffernd_mask.diminfo[1].strides)) != 0); if (__pyx_t_21) { __pyx_t_22 = __pyx_v_i; __pyx_t_23 = __pyx_v_yi; __pyx_t_24 = ((*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_mask.rcbuffer->pybuffer.buf, __pyx_t_22, __pyx_pybuffernd_mask.diminfo[0].strides, __pyx_t_23, __pyx_pybuffernd_mask.diminfo[1].strides)) != 0); __pyx_t_25 = __pyx_t_24; } else { __pyx_t_25 = __pyx_t_21; } if (__pyx_t_25) { /* "pandas/algos.pyx":1025 * for i in range(N): * if mask[i, xi] and mask[i, yi]: * nobs += 1 # <<<<<<<<<<<<<< * * if nobs < minp: */ __pyx_v_nobs = (__pyx_v_nobs + 1); goto __pyx_L11; } __pyx_L11:; } /* "pandas/algos.pyx":1027 * nobs += 1 * * if nobs < minp: # <<<<<<<<<<<<<< * result[xi, yi] = result[yi, xi] = np.NaN * else: */ __pyx_t_25 = ((__pyx_v_nobs < __pyx_v_minp) != 0); if (__pyx_t_25) { /* "pandas/algos.pyx":1028 * * if nobs < minp: * result[xi, yi] = result[yi, xi] = np.NaN # <<<<<<<<<<<<<< * else: * maskedx = np.empty(nobs, dtype=np.float64) */ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1028; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s__NaN); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1028; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_26 = __pyx_PyFloat_AsDouble(__pyx_t_2); if (unlikely((__pyx_t_26 == (npy_float64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1028; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_17 = __pyx_v_xi; __pyx_t_18 = __pyx_v_yi; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_result.diminfo[0].strides, __pyx_t_18, __pyx_pybuffernd_result.diminfo[1].strides) = __pyx_t_26; __pyx_t_26 = __pyx_PyFloat_AsDouble(__pyx_t_2); if (unlikely((__pyx_t_26 == (npy_float64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1028; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_27 = __pyx_v_yi; __pyx_t_28 = __pyx_v_xi; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_27, __pyx_pybuffernd_result.diminfo[0].strides, __pyx_t_28, __pyx_pybuffernd_result.diminfo[1].strides) = __pyx_t_26; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; goto __pyx_L12; } /*else*/ { /* "pandas/algos.pyx":1030 * result[xi, yi] = result[yi, xi] = np.NaN * else: * maskedx = np.empty(nobs, dtype=np.float64) # <<<<<<<<<<<<<< * maskedy = np.empty(nobs, dtype=np.float64) * j = 0 */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1030; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__empty); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1030; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyInt_to_py_npy_int64(__pyx_v_nobs); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1030; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1030; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1030; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_2)); __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1030; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s__float64); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1030; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__dtype), __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1030; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_8), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1030; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1030; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_29 = ((PyArrayObject *)__pyx_t_1); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_maskedx.rcbuffer->pybuffer); __pyx_t_10 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_maskedx.rcbuffer->pybuffer, (PyObject*)__pyx_t_29, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_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_maskedx.rcbuffer->pybuffer, (PyObject*)__pyx_v_maskedx, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_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_pybuffernd_maskedx.diminfo[0].strides = __pyx_pybuffernd_maskedx.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_maskedx.diminfo[0].shape = __pyx_pybuffernd_maskedx.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1030; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_29 = 0; __Pyx_XDECREF_SET(__pyx_v_maskedx, ((PyArrayObject *)__pyx_t_1)); __pyx_t_1 = 0; /* "pandas/algos.pyx":1031 * else: * maskedx = np.empty(nobs, dtype=np.float64) * maskedy = np.empty(nobs, dtype=np.float64) # <<<<<<<<<<<<<< * j = 0 * for i in range(N): */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1031; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 1031; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_PyInt_to_py_npy_int64(__pyx_v_nobs); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1031; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1031; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1031; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1031; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s__float64); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1031; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__dtype), __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1031; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_8), ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1031; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0; __Pyx_DECREF(((PyObject *)__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_filename = __pyx_f[0]; __pyx_lineno = 1031; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_30 = ((PyArrayObject *)__pyx_t_3); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_maskedy.rcbuffer->pybuffer); __pyx_t_10 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_maskedy.rcbuffer->pybuffer, (PyObject*)__pyx_t_30, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_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_maskedy.rcbuffer->pybuffer, (PyObject*)__pyx_v_maskedy, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_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_pybuffernd_maskedy.diminfo[0].strides = __pyx_pybuffernd_maskedy.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_maskedy.diminfo[0].shape = __pyx_pybuffernd_maskedy.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1031; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_30 = 0; __Pyx_XDECREF_SET(__pyx_v_maskedy, ((PyArrayObject *)__pyx_t_3)); __pyx_t_3 = 0; /* "pandas/algos.pyx":1032 * maskedx = np.empty(nobs, dtype=np.float64) * maskedy = np.empty(nobs, dtype=np.float64) * j = 0 # <<<<<<<<<<<<<< * for i in range(N): * if mask[i, xi] and mask[i, yi]: */ __pyx_v_j = 0; /* "pandas/algos.pyx":1033 * maskedy = np.empty(nobs, dtype=np.float64) * j = 0 * for i in range(N): # <<<<<<<<<<<<<< * if mask[i, xi] and mask[i, yi]: * maskedx[j] = mat[i, xi] */ __pyx_t_31 = __pyx_v_N; for (__pyx_t_32 = 0; __pyx_t_32 < __pyx_t_31; __pyx_t_32+=1) { __pyx_v_i = __pyx_t_32; /* "pandas/algos.pyx":1034 * j = 0 * for i in range(N): * if mask[i, xi] and mask[i, yi]: # <<<<<<<<<<<<<< * maskedx[j] = mat[i, xi] * maskedy[j] = mat[i, yi] */ __pyx_t_33 = __pyx_v_i; __pyx_t_34 = __pyx_v_xi; __pyx_t_25 = ((*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_mask.rcbuffer->pybuffer.buf, __pyx_t_33, __pyx_pybuffernd_mask.diminfo[0].strides, __pyx_t_34, __pyx_pybuffernd_mask.diminfo[1].strides)) != 0); if (__pyx_t_25) { __pyx_t_35 = __pyx_v_i; __pyx_t_36 = __pyx_v_yi; __pyx_t_21 = ((*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_mask.rcbuffer->pybuffer.buf, __pyx_t_35, __pyx_pybuffernd_mask.diminfo[0].strides, __pyx_t_36, __pyx_pybuffernd_mask.diminfo[1].strides)) != 0); __pyx_t_24 = __pyx_t_21; } else { __pyx_t_24 = __pyx_t_25; } if (__pyx_t_24) { /* "pandas/algos.pyx":1035 * for i in range(N): * if mask[i, xi] and mask[i, yi]: * maskedx[j] = mat[i, xi] # <<<<<<<<<<<<<< * maskedy[j] = mat[i, yi] * j += 1 */ __pyx_t_37 = __pyx_v_i; __pyx_t_38 = __pyx_v_xi; __pyx_t_39 = __pyx_v_j; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_maskedx.rcbuffer->pybuffer.buf, __pyx_t_39, __pyx_pybuffernd_maskedx.diminfo[0].strides) = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_mat.rcbuffer->pybuffer.buf, __pyx_t_37, __pyx_pybuffernd_mat.diminfo[0].strides, __pyx_t_38, __pyx_pybuffernd_mat.diminfo[1].strides)); /* "pandas/algos.pyx":1036 * if mask[i, xi] and mask[i, yi]: * maskedx[j] = mat[i, xi] * maskedy[j] = mat[i, yi] # <<<<<<<<<<<<<< * j += 1 * maskedx = rank_1d_float64(maskedx) */ __pyx_t_40 = __pyx_v_i; __pyx_t_41 = __pyx_v_yi; __pyx_t_42 = __pyx_v_j; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_maskedy.rcbuffer->pybuffer.buf, __pyx_t_42, __pyx_pybuffernd_maskedy.diminfo[0].strides) = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_mat.rcbuffer->pybuffer.buf, __pyx_t_40, __pyx_pybuffernd_mat.diminfo[0].strides, __pyx_t_41, __pyx_pybuffernd_mat.diminfo[1].strides)); /* "pandas/algos.pyx":1037 * maskedx[j] = mat[i, xi] * maskedy[j] = mat[i, yi] * j += 1 # <<<<<<<<<<<<<< * maskedx = rank_1d_float64(maskedx) * maskedy = rank_1d_float64(maskedy) */ __pyx_v_j = (__pyx_v_j + 1); goto __pyx_L15; } __pyx_L15:; } /* "pandas/algos.pyx":1038 * maskedy[j] = mat[i, yi] * j += 1 * maskedx = rank_1d_float64(maskedx) # <<<<<<<<<<<<<< * maskedy = rank_1d_float64(maskedy) * */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s__rank_1d_float64); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1038; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1038; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)__pyx_v_maskedx)); PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_maskedx)); __Pyx_GIVEREF(((PyObject *)__pyx_v_maskedx)); __pyx_t_8 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1038; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; if (!(likely(((__pyx_t_8) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_8, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1038; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_29 = ((PyArrayObject *)__pyx_t_8); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_maskedx.rcbuffer->pybuffer); __pyx_t_10 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_maskedx.rcbuffer->pybuffer, (PyObject*)__pyx_t_29, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_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_maskedx.rcbuffer->pybuffer, (PyObject*)__pyx_v_maskedx, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_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_pybuffernd_maskedx.diminfo[0].strides = __pyx_pybuffernd_maskedx.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_maskedx.diminfo[0].shape = __pyx_pybuffernd_maskedx.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1038; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_29 = 0; __Pyx_DECREF_SET(__pyx_v_maskedx, ((PyArrayObject *)__pyx_t_8)); __pyx_t_8 = 0; /* "pandas/algos.pyx":1039 * j += 1 * maskedx = rank_1d_float64(maskedx) * maskedy = rank_1d_float64(maskedy) # <<<<<<<<<<<<<< * * mean = (nobs + 1) / 2. */ __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s__rank_1d_float64); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1039; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1039; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)__pyx_v_maskedy)); PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_maskedy)); __Pyx_GIVEREF(((PyObject *)__pyx_v_maskedy)); __pyx_t_3 = PyObject_Call(__pyx_t_8, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1039; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(((PyObject *)__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_filename = __pyx_f[0]; __pyx_lineno = 1039; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_30 = ((PyArrayObject *)__pyx_t_3); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_maskedy.rcbuffer->pybuffer); __pyx_t_10 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_maskedy.rcbuffer->pybuffer, (PyObject*)__pyx_t_30, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_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_maskedy.rcbuffer->pybuffer, (PyObject*)__pyx_v_maskedy, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_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_pybuffernd_maskedy.diminfo[0].strides = __pyx_pybuffernd_maskedy.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_maskedy.diminfo[0].shape = __pyx_pybuffernd_maskedy.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1039; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_30 = 0; __Pyx_DECREF_SET(__pyx_v_maskedy, ((PyArrayObject *)__pyx_t_3)); __pyx_t_3 = 0; /* "pandas/algos.pyx":1041 * maskedy = rank_1d_float64(maskedy) * * mean = (nobs + 1) / 2. # <<<<<<<<<<<<<< * * # now the cov numerator */ __pyx_v_mean = ((__pyx_v_nobs + 1) / 2.); /* "pandas/algos.pyx":1044 * * # now the cov numerator * sumx = sumxx = sumyy = 0 # <<<<<<<<<<<<<< * * for i in range(nobs): */ __pyx_v_sumx = 0; __pyx_v_sumxx = 0; __pyx_v_sumyy = 0; /* "pandas/algos.pyx":1046 * sumx = sumxx = sumyy = 0 * * for i in range(nobs): # <<<<<<<<<<<<<< * vx = maskedx[i] - mean * vy = maskedy[i] - mean */ __pyx_t_43 = __pyx_v_nobs; for (__pyx_t_31 = 0; __pyx_t_31 < __pyx_t_43; __pyx_t_31+=1) { __pyx_v_i = __pyx_t_31; /* "pandas/algos.pyx":1047 * * for i in range(nobs): * vx = maskedx[i] - mean # <<<<<<<<<<<<<< * vy = maskedy[i] - mean * */ __pyx_t_32 = __pyx_v_i; __pyx_v_vx = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_maskedx.rcbuffer->pybuffer.buf, __pyx_t_32, __pyx_pybuffernd_maskedx.diminfo[0].strides)) - __pyx_v_mean); /* "pandas/algos.pyx":1048 * for i in range(nobs): * vx = maskedx[i] - mean * vy = maskedy[i] - mean # <<<<<<<<<<<<<< * * sumx += vx * vy */ __pyx_t_44 = __pyx_v_i; __pyx_v_vy = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_maskedy.rcbuffer->pybuffer.buf, __pyx_t_44, __pyx_pybuffernd_maskedy.diminfo[0].strides)) - __pyx_v_mean); /* "pandas/algos.pyx":1050 * vy = maskedy[i] - mean * * sumx += vx * vy # <<<<<<<<<<<<<< * sumxx += vx * vx * sumyy += vy * vy */ __pyx_v_sumx = (__pyx_v_sumx + (__pyx_v_vx * __pyx_v_vy)); /* "pandas/algos.pyx":1051 * * sumx += vx * vy * sumxx += vx * vx # <<<<<<<<<<<<<< * sumyy += vy * vy * */ __pyx_v_sumxx = (__pyx_v_sumxx + (__pyx_v_vx * __pyx_v_vx)); /* "pandas/algos.pyx":1052 * sumx += vx * vy * sumxx += vx * vx * sumyy += vy * vy # <<<<<<<<<<<<<< * * divisor = sqrt(sumxx * sumyy) */ __pyx_v_sumyy = (__pyx_v_sumyy + (__pyx_v_vy * __pyx_v_vy)); } /* "pandas/algos.pyx":1054 * sumyy += vy * vy * * divisor = sqrt(sumxx * sumyy) # <<<<<<<<<<<<<< * * if divisor != 0: */ __pyx_v_divisor = sqrt((__pyx_v_sumxx * __pyx_v_sumyy)); /* "pandas/algos.pyx":1056 * divisor = sqrt(sumxx * sumyy) * * if divisor != 0: # <<<<<<<<<<<<<< * result[xi, yi] = result[yi, xi] = sumx / divisor * else: */ __pyx_t_24 = ((__pyx_v_divisor != 0.0) != 0); if (__pyx_t_24) { /* "pandas/algos.pyx":1057 * * if divisor != 0: * result[xi, yi] = result[yi, xi] = sumx / divisor # <<<<<<<<<<<<<< * else: * result[xi, yi] = result[yi, xi] = np.NaN */ if (unlikely(__pyx_v_divisor == 0)) { #ifdef WITH_THREAD PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure(); #endif PyErr_Format(PyExc_ZeroDivisionError, "float division"); #ifdef WITH_THREAD PyGILState_Release(__pyx_gilstate_save); #endif {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1057; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_26 = (__pyx_v_sumx / __pyx_v_divisor); __pyx_t_31 = __pyx_v_xi; __pyx_t_45 = __pyx_v_yi; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_31, __pyx_pybuffernd_result.diminfo[0].strides, __pyx_t_45, __pyx_pybuffernd_result.diminfo[1].strides) = __pyx_t_26; __pyx_t_46 = __pyx_v_yi; __pyx_t_47 = __pyx_v_xi; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_46, __pyx_pybuffernd_result.diminfo[0].strides, __pyx_t_47, __pyx_pybuffernd_result.diminfo[1].strides) = __pyx_t_26; goto __pyx_L18; } /*else*/ { /* "pandas/algos.pyx":1059 * result[xi, yi] = result[yi, xi] = sumx / divisor * else: * result[xi, yi] = result[yi, xi] = np.NaN # <<<<<<<<<<<<<< * * return result */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1059; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 1059; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_26 = __pyx_PyFloat_AsDouble(__pyx_t_1); if (unlikely((__pyx_t_26 == (npy_float64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1059; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_48 = __pyx_v_xi; __pyx_t_49 = __pyx_v_yi; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_48, __pyx_pybuffernd_result.diminfo[0].strides, __pyx_t_49, __pyx_pybuffernd_result.diminfo[1].strides) = __pyx_t_26; __pyx_t_26 = __pyx_PyFloat_AsDouble(__pyx_t_1); if (unlikely((__pyx_t_26 == (npy_float64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1059; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_50 = __pyx_v_yi; __pyx_t_51 = __pyx_v_xi; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_50, __pyx_pybuffernd_result.diminfo[0].strides, __pyx_t_51, __pyx_pybuffernd_result.diminfo[1].strides) = __pyx_t_26; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } __pyx_L18:; } __pyx_L12:; } } /* "pandas/algos.pyx":1061 * result[xi, yi] = result[yi, xi] = np.NaN * * return result # <<<<<<<<<<<<<< * * #---------------------------------------------------------------------- */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_result)); __pyx_r = ((PyObject *)__pyx_v_result); goto __pyx_L0; __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_8); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_mask.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_maskedx.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_maskedy.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_mat.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.nancorr_spearman", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_mask.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_maskedx.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_maskedy.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_mat.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_result); __Pyx_XDECREF((PyObject *)__pyx_v_maskedx); __Pyx_XDECREF((PyObject *)__pyx_v_maskedy); __Pyx_XDECREF((PyObject *)__pyx_v_mask); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_33roll_var(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_33roll_var = {__Pyx_NAMESTR("roll_var"), (PyCFunction)__pyx_pw_6pandas_5algos_33roll_var, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_33roll_var(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_input = 0; int __pyx_v_win; int __pyx_v_minp; int __pyx_v_ddof; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("roll_var (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__input,&__pyx_n_s__win,&__pyx_n_s__minp,&__pyx_n_s__ddof,0}; PyObject* values[4] = {0,0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__input)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__win)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("roll_var", 0, 3, 4, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1066; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__minp)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("roll_var", 0, 3, 4, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1066; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__ddof); if (value) { values[3] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "roll_var") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1066; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_input = ((PyArrayObject *)values[0]); __pyx_v_win = __Pyx_PyInt_AsInt(values[1]); if (unlikely((__pyx_v_win == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1066; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_minp = __Pyx_PyInt_AsInt(values[2]); if (unlikely((__pyx_v_minp == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1066; __pyx_clineno = __LINE__; goto __pyx_L3_error;} if (values[3]) { __pyx_v_ddof = __Pyx_PyInt_AsInt(values[3]); if (unlikely((__pyx_v_ddof == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1066; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } else { __pyx_v_ddof = ((int)1); } } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("roll_var", 0, 3, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1066; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.roll_var", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_input), __pyx_ptype_5numpy_ndarray, 1, "input", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1066; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_32roll_var(__pyx_self, __pyx_v_input, __pyx_v_win, __pyx_v_minp, __pyx_v_ddof); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/algos.pyx":1066 * # Rolling variance * * def roll_var(ndarray[double_t] input, int win, int minp, int ddof=1): # <<<<<<<<<<<<<< * cdef double val, prev, sum_x = 0, sum_xx = 0, nobs = 0 * cdef Py_ssize_t i */ static PyObject *__pyx_pf_6pandas_5algos_32roll_var(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_input, int __pyx_v_win, int __pyx_v_minp, int __pyx_v_ddof) { double __pyx_v_val; double __pyx_v_prev; double __pyx_v_sum_x; double __pyx_v_sum_xx; double __pyx_v_nobs; Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_N; PyArrayObject *__pyx_v_output = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_input; __Pyx_Buffer __pyx_pybuffer_input; __Pyx_LocalBuf_ND __pyx_pybuffernd_output; __Pyx_Buffer __pyx_pybuffer_output; 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; PyArrayObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; int __pyx_t_8; long __pyx_t_9; int __pyx_t_10; Py_ssize_t __pyx_t_11; Py_ssize_t __pyx_t_12; Py_ssize_t __pyx_t_13; Py_ssize_t __pyx_t_14; Py_ssize_t __pyx_t_15; double __pyx_t_16; double __pyx_t_17; Py_ssize_t __pyx_t_18; Py_ssize_t __pyx_t_19; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("roll_var", 0); __pyx_pybuffer_output.pybuffer.buf = NULL; __pyx_pybuffer_output.refcount = 0; __pyx_pybuffernd_output.data = NULL; __pyx_pybuffernd_output.rcbuffer = &__pyx_pybuffer_output; __pyx_pybuffer_input.pybuffer.buf = NULL; __pyx_pybuffer_input.refcount = 0; __pyx_pybuffernd_input.data = NULL; __pyx_pybuffernd_input.rcbuffer = &__pyx_pybuffer_input; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_input.rcbuffer->pybuffer, (PyObject*)__pyx_v_input, &__Pyx_TypeInfo_nn___pyx_t_5numpy_double_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1066; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_input.diminfo[0].strides = __pyx_pybuffernd_input.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_input.diminfo[0].shape = __pyx_pybuffernd_input.rcbuffer->pybuffer.shape[0]; /* "pandas/algos.pyx":1067 * * def roll_var(ndarray[double_t] input, int win, int minp, int ddof=1): * cdef double val, prev, sum_x = 0, sum_xx = 0, nobs = 0 # <<<<<<<<<<<<<< * cdef Py_ssize_t i * cdef Py_ssize_t N = len(input) */ __pyx_v_sum_x = 0.0; __pyx_v_sum_xx = 0.0; __pyx_v_nobs = 0.0; /* "pandas/algos.pyx":1069 * cdef double val, prev, sum_x = 0, sum_xx = 0, nobs = 0 * cdef Py_ssize_t i * cdef Py_ssize_t N = len(input) # <<<<<<<<<<<<<< * * cdef ndarray[double_t] output = np.empty(N, dtype=float) */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_input)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1069; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_N = __pyx_t_1; /* "pandas/algos.pyx":1071 * cdef Py_ssize_t N = len(input) * * cdef ndarray[double_t] output = np.empty(N, dtype=float) # <<<<<<<<<<<<<< * * minp = _check_minp(win, minp, N) */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1071; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 1071; __pyx_clineno = __LINE__; goto __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_N); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1071; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1071; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1071; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_2)); if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__dtype), ((PyObject *)((PyObject*)(&PyFloat_Type)))) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1071; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_5 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1071; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1071; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_6 = ((PyArrayObject *)__pyx_t_5); { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_output.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_nn___pyx_t_5numpy_double_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { __pyx_v_output = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_output.rcbuffer->pybuffer.buf = NULL; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1071; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } else {__pyx_pybuffernd_output.diminfo[0].strides = __pyx_pybuffernd_output.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_output.diminfo[0].shape = __pyx_pybuffernd_output.rcbuffer->pybuffer.shape[0]; } } __pyx_t_6 = 0; __pyx_v_output = ((PyArrayObject *)__pyx_t_5); __pyx_t_5 = 0; /* "pandas/algos.pyx":1073 * cdef ndarray[double_t] output = np.empty(N, dtype=float) * * minp = _check_minp(win, minp, N) # <<<<<<<<<<<<<< * * for i from 0 <= i < minp - 1: */ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s___check_minp); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1073; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_2 = PyInt_FromLong(__pyx_v_win); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1073; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = PyInt_FromLong(__pyx_v_minp); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1073; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = PyInt_FromSsize_t(__pyx_v_N); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1073; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_7 = PyTuple_New(3); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1073; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_7, 2, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_2 = 0; __pyx_t_4 = 0; __pyx_t_3 = 0; __pyx_t_3 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_7), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1073; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0; __pyx_t_8 = __Pyx_PyInt_AsInt(__pyx_t_3); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1073; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_minp = __pyx_t_8; /* "pandas/algos.pyx":1075 * minp = _check_minp(win, minp, N) * * for i from 0 <= i < minp - 1: # <<<<<<<<<<<<<< * val = input[i] * */ __pyx_t_9 = (__pyx_v_minp - 1); for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_9; __pyx_v_i++) { /* "pandas/algos.pyx":1076 * * for i from 0 <= i < minp - 1: * val = input[i] # <<<<<<<<<<<<<< * * # Not NaN */ __pyx_t_1 = __pyx_v_i; __pyx_t_8 = -1; if (__pyx_t_1 < 0) { __pyx_t_1 += __pyx_pybuffernd_input.diminfo[0].shape; if (unlikely(__pyx_t_1 < 0)) __pyx_t_8 = 0; } else if (unlikely(__pyx_t_1 >= __pyx_pybuffernd_input.diminfo[0].shape)) __pyx_t_8 = 0; if (unlikely(__pyx_t_8 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_8); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1076; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_val = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_double_t *, __pyx_pybuffernd_input.rcbuffer->pybuffer.buf, __pyx_t_1, __pyx_pybuffernd_input.diminfo[0].strides)); /* "pandas/algos.pyx":1079 * * # Not NaN * if val == val: # <<<<<<<<<<<<<< * nobs += 1 * sum_x += val */ __pyx_t_10 = ((__pyx_v_val == __pyx_v_val) != 0); if (__pyx_t_10) { /* "pandas/algos.pyx":1080 * # Not NaN * if val == val: * nobs += 1 # <<<<<<<<<<<<<< * sum_x += val * sum_xx += val * val */ __pyx_v_nobs = (__pyx_v_nobs + 1.0); /* "pandas/algos.pyx":1081 * if val == val: * nobs += 1 * sum_x += val # <<<<<<<<<<<<<< * sum_xx += val * val * */ __pyx_v_sum_x = (__pyx_v_sum_x + __pyx_v_val); /* "pandas/algos.pyx":1082 * nobs += 1 * sum_x += val * sum_xx += val * val # <<<<<<<<<<<<<< * * output[i] = NaN */ __pyx_v_sum_xx = (__pyx_v_sum_xx + (__pyx_v_val * __pyx_v_val)); goto __pyx_L5; } __pyx_L5:; /* "pandas/algos.pyx":1084 * sum_xx += val * val * * output[i] = NaN # <<<<<<<<<<<<<< * * for i from minp - 1 <= i < N: */ __pyx_t_11 = __pyx_v_i; __pyx_t_8 = -1; if (__pyx_t_11 < 0) { __pyx_t_11 += __pyx_pybuffernd_output.diminfo[0].shape; if (unlikely(__pyx_t_11 < 0)) __pyx_t_8 = 0; } else if (unlikely(__pyx_t_11 >= __pyx_pybuffernd_output.diminfo[0].shape)) __pyx_t_8 = 0; if (unlikely(__pyx_t_8 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_8); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1084; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_double_t *, __pyx_pybuffernd_output.rcbuffer->pybuffer.buf, __pyx_t_11, __pyx_pybuffernd_output.diminfo[0].strides) = __pyx_v_6pandas_5algos_NaN; } /* "pandas/algos.pyx":1086 * output[i] = NaN * * for i from minp - 1 <= i < N: # <<<<<<<<<<<<<< * val = input[i] * */ __pyx_t_12 = __pyx_v_N; for (__pyx_v_i = (__pyx_v_minp - 1); __pyx_v_i < __pyx_t_12; __pyx_v_i++) { /* "pandas/algos.pyx":1087 * * for i from minp - 1 <= i < N: * val = input[i] # <<<<<<<<<<<<<< * * if val == val: */ __pyx_t_13 = __pyx_v_i; __pyx_t_8 = -1; if (__pyx_t_13 < 0) { __pyx_t_13 += __pyx_pybuffernd_input.diminfo[0].shape; if (unlikely(__pyx_t_13 < 0)) __pyx_t_8 = 0; } else if (unlikely(__pyx_t_13 >= __pyx_pybuffernd_input.diminfo[0].shape)) __pyx_t_8 = 0; if (unlikely(__pyx_t_8 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_8); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1087; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_val = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_double_t *, __pyx_pybuffernd_input.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_input.diminfo[0].strides)); /* "pandas/algos.pyx":1089 * val = input[i] * * if val == val: # <<<<<<<<<<<<<< * nobs += 1 * sum_x += val */ __pyx_t_10 = ((__pyx_v_val == __pyx_v_val) != 0); if (__pyx_t_10) { /* "pandas/algos.pyx":1090 * * if val == val: * nobs += 1 # <<<<<<<<<<<<<< * sum_x += val * sum_xx += val * val */ __pyx_v_nobs = (__pyx_v_nobs + 1.0); /* "pandas/algos.pyx":1091 * if val == val: * nobs += 1 * sum_x += val # <<<<<<<<<<<<<< * sum_xx += val * val * */ __pyx_v_sum_x = (__pyx_v_sum_x + __pyx_v_val); /* "pandas/algos.pyx":1092 * nobs += 1 * sum_x += val * sum_xx += val * val # <<<<<<<<<<<<<< * * if i > win - 1: */ __pyx_v_sum_xx = (__pyx_v_sum_xx + (__pyx_v_val * __pyx_v_val)); goto __pyx_L8; } __pyx_L8:; /* "pandas/algos.pyx":1094 * sum_xx += val * val * * if i > win - 1: # <<<<<<<<<<<<<< * prev = input[i - win] * if prev == prev: */ __pyx_t_10 = ((__pyx_v_i > (__pyx_v_win - 1)) != 0); if (__pyx_t_10) { /* "pandas/algos.pyx":1095 * * if i > win - 1: * prev = input[i - win] # <<<<<<<<<<<<<< * if prev == prev: * sum_x -= prev */ __pyx_t_14 = (__pyx_v_i - __pyx_v_win); __pyx_t_8 = -1; if (__pyx_t_14 < 0) { __pyx_t_14 += __pyx_pybuffernd_input.diminfo[0].shape; if (unlikely(__pyx_t_14 < 0)) __pyx_t_8 = 0; } else if (unlikely(__pyx_t_14 >= __pyx_pybuffernd_input.diminfo[0].shape)) __pyx_t_8 = 0; if (unlikely(__pyx_t_8 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_8); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1095; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_prev = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_double_t *, __pyx_pybuffernd_input.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_input.diminfo[0].strides)); /* "pandas/algos.pyx":1096 * if i > win - 1: * prev = input[i - win] * if prev == prev: # <<<<<<<<<<<<<< * sum_x -= prev * sum_xx -= prev * prev */ __pyx_t_10 = ((__pyx_v_prev == __pyx_v_prev) != 0); if (__pyx_t_10) { /* "pandas/algos.pyx":1097 * prev = input[i - win] * if prev == prev: * sum_x -= prev # <<<<<<<<<<<<<< * sum_xx -= prev * prev * nobs -= 1 */ __pyx_v_sum_x = (__pyx_v_sum_x - __pyx_v_prev); /* "pandas/algos.pyx":1098 * if prev == prev: * sum_x -= prev * sum_xx -= prev * prev # <<<<<<<<<<<<<< * nobs -= 1 * */ __pyx_v_sum_xx = (__pyx_v_sum_xx - (__pyx_v_prev * __pyx_v_prev)); /* "pandas/algos.pyx":1099 * sum_x -= prev * sum_xx -= prev * prev * nobs -= 1 # <<<<<<<<<<<<<< * * if nobs >= minp: */ __pyx_v_nobs = (__pyx_v_nobs - 1.0); goto __pyx_L10; } __pyx_L10:; goto __pyx_L9; } __pyx_L9:; /* "pandas/algos.pyx":1101 * nobs -= 1 * * if nobs >= minp: # <<<<<<<<<<<<<< * # pathological case * if nobs == 1: */ __pyx_t_10 = ((__pyx_v_nobs >= __pyx_v_minp) != 0); if (__pyx_t_10) { /* "pandas/algos.pyx":1103 * if nobs >= minp: * # pathological case * if nobs == 1: # <<<<<<<<<<<<<< * output[i] = 0 * continue */ __pyx_t_10 = ((__pyx_v_nobs == 1.0) != 0); if (__pyx_t_10) { /* "pandas/algos.pyx":1104 * # pathological case * if nobs == 1: * output[i] = 0 # <<<<<<<<<<<<<< * continue * */ __pyx_t_15 = __pyx_v_i; __pyx_t_8 = -1; if (__pyx_t_15 < 0) { __pyx_t_15 += __pyx_pybuffernd_output.diminfo[0].shape; if (unlikely(__pyx_t_15 < 0)) __pyx_t_8 = 0; } else if (unlikely(__pyx_t_15 >= __pyx_pybuffernd_output.diminfo[0].shape)) __pyx_t_8 = 0; if (unlikely(__pyx_t_8 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_8); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1104; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_double_t *, __pyx_pybuffernd_output.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_output.diminfo[0].strides) = 0.0; /* "pandas/algos.pyx":1105 * if nobs == 1: * output[i] = 0 * continue # <<<<<<<<<<<<<< * * val = (nobs * sum_xx - sum_x * sum_x) / (nobs * (nobs - ddof)) */ goto __pyx_L6_continue; goto __pyx_L12; } __pyx_L12:; /* "pandas/algos.pyx":1107 * continue * * val = (nobs * sum_xx - sum_x * sum_x) / (nobs * (nobs - ddof)) # <<<<<<<<<<<<<< * if val < 0: * val = 0 */ __pyx_t_16 = ((__pyx_v_nobs * __pyx_v_sum_xx) - (__pyx_v_sum_x * __pyx_v_sum_x)); __pyx_t_17 = (__pyx_v_nobs * (__pyx_v_nobs - __pyx_v_ddof)); if (unlikely(__pyx_t_17 == 0)) { #ifdef WITH_THREAD PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure(); #endif PyErr_Format(PyExc_ZeroDivisionError, "float division"); #ifdef WITH_THREAD PyGILState_Release(__pyx_gilstate_save); #endif {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1107; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_val = (__pyx_t_16 / __pyx_t_17); /* "pandas/algos.pyx":1108 * * val = (nobs * sum_xx - sum_x * sum_x) / (nobs * (nobs - ddof)) * if val < 0: # <<<<<<<<<<<<<< * val = 0 * */ __pyx_t_10 = ((__pyx_v_val < 0.0) != 0); if (__pyx_t_10) { /* "pandas/algos.pyx":1109 * val = (nobs * sum_xx - sum_x * sum_x) / (nobs * (nobs - ddof)) * if val < 0: * val = 0 # <<<<<<<<<<<<<< * * output[i] = val */ __pyx_v_val = 0.0; goto __pyx_L13; } __pyx_L13:; /* "pandas/algos.pyx":1111 * val = 0 * * output[i] = val # <<<<<<<<<<<<<< * else: * output[i] = NaN */ __pyx_t_18 = __pyx_v_i; __pyx_t_8 = -1; if (__pyx_t_18 < 0) { __pyx_t_18 += __pyx_pybuffernd_output.diminfo[0].shape; if (unlikely(__pyx_t_18 < 0)) __pyx_t_8 = 0; } else if (unlikely(__pyx_t_18 >= __pyx_pybuffernd_output.diminfo[0].shape)) __pyx_t_8 = 0; if (unlikely(__pyx_t_8 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_8); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1111; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_double_t *, __pyx_pybuffernd_output.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_output.diminfo[0].strides) = __pyx_v_val; goto __pyx_L11; } /*else*/ { /* "pandas/algos.pyx":1113 * output[i] = val * else: * output[i] = NaN # <<<<<<<<<<<<<< * * return output */ __pyx_t_19 = __pyx_v_i; __pyx_t_8 = -1; if (__pyx_t_19 < 0) { __pyx_t_19 += __pyx_pybuffernd_output.diminfo[0].shape; if (unlikely(__pyx_t_19 < 0)) __pyx_t_8 = 0; } else if (unlikely(__pyx_t_19 >= __pyx_pybuffernd_output.diminfo[0].shape)) __pyx_t_8 = 0; if (unlikely(__pyx_t_8 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_8); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1113; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_double_t *, __pyx_pybuffernd_output.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_output.diminfo[0].strides) = __pyx_v_6pandas_5algos_NaN; } __pyx_L11:; __pyx_L6_continue:; } /* "pandas/algos.pyx":1115 * output[i] = NaN * * return output # <<<<<<<<<<<<<< * * #------------------------------------------------------------------------------- */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_output)); __pyx_r = ((PyObject *)__pyx_v_output); goto __pyx_L0; __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_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_7); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_input.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_output.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.roll_var", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_input.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_output.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_output); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_35roll_skew(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_35roll_skew = {__Pyx_NAMESTR("roll_skew"), (PyCFunction)__pyx_pw_6pandas_5algos_35roll_skew, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_35roll_skew(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_input = 0; int __pyx_v_win; int __pyx_v_minp; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("roll_skew (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__input,&__pyx_n_s__win,&__pyx_n_s__minp,0}; PyObject* values[3] = {0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__input)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__win)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("roll_skew", 1, 3, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1120; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__minp)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("roll_skew", 1, 3, 3, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1120; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "roll_skew") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1120; __pyx_clineno = __LINE__; goto __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_input = ((PyArrayObject *)values[0]); __pyx_v_win = __Pyx_PyInt_AsInt(values[1]); if (unlikely((__pyx_v_win == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1120; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_minp = __Pyx_PyInt_AsInt(values[2]); if (unlikely((__pyx_v_minp == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1120; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("roll_skew", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1120; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.roll_skew", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_input), __pyx_ptype_5numpy_ndarray, 1, "input", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1120; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_34roll_skew(__pyx_self, __pyx_v_input, __pyx_v_win, __pyx_v_minp); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/algos.pyx":1120 * # Rolling skewness * * def roll_skew(ndarray[double_t] input, int win, int minp): # <<<<<<<<<<<<<< * cdef double val, prev * cdef double x = 0, xx = 0, xxx = 0 */ static PyObject *__pyx_pf_6pandas_5algos_34roll_skew(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_input, int __pyx_v_win, int __pyx_v_minp) { double __pyx_v_val; double __pyx_v_prev; double __pyx_v_x; double __pyx_v_xx; double __pyx_v_xxx; Py_ssize_t __pyx_v_nobs; Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_N; PyArrayObject *__pyx_v_output = 0; double __pyx_v_A; double __pyx_v_B; double __pyx_v_C; double __pyx_v_R; __Pyx_LocalBuf_ND __pyx_pybuffernd_input; __Pyx_Buffer __pyx_pybuffer_input; __Pyx_LocalBuf_ND __pyx_pybuffernd_output; __Pyx_Buffer __pyx_pybuffer_output; 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; PyArrayObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; int __pyx_t_8; long __pyx_t_9; int __pyx_t_10; Py_ssize_t __pyx_t_11; 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; double __pyx_t_18; double __pyx_t_19; Py_ssize_t __pyx_t_20; Py_ssize_t __pyx_t_21; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("roll_skew", 0); __pyx_pybuffer_output.pybuffer.buf = NULL; __pyx_pybuffer_output.refcount = 0; __pyx_pybuffernd_output.data = NULL; __pyx_pybuffernd_output.rcbuffer = &__pyx_pybuffer_output; __pyx_pybuffer_input.pybuffer.buf = NULL; __pyx_pybuffer_input.refcount = 0; __pyx_pybuffernd_input.data = NULL; __pyx_pybuffernd_input.rcbuffer = &__pyx_pybuffer_input; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_input.rcbuffer->pybuffer, (PyObject*)__pyx_v_input, &__Pyx_TypeInfo_nn___pyx_t_5numpy_double_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1120; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_input.diminfo[0].strides = __pyx_pybuffernd_input.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_input.diminfo[0].shape = __pyx_pybuffernd_input.rcbuffer->pybuffer.shape[0]; /* "pandas/algos.pyx":1122 * def roll_skew(ndarray[double_t] input, int win, int minp): * cdef double val, prev * cdef double x = 0, xx = 0, xxx = 0 # <<<<<<<<<<<<<< * cdef Py_ssize_t nobs = 0, i * cdef Py_ssize_t N = len(input) */ __pyx_v_x = 0.0; __pyx_v_xx = 0.0; __pyx_v_xxx = 0.0; /* "pandas/algos.pyx":1123 * cdef double val, prev * cdef double x = 0, xx = 0, xxx = 0 * cdef Py_ssize_t nobs = 0, i # <<<<<<<<<<<<<< * cdef Py_ssize_t N = len(input) * */ __pyx_v_nobs = 0; /* "pandas/algos.pyx":1124 * cdef double x = 0, xx = 0, xxx = 0 * cdef Py_ssize_t nobs = 0, i * cdef Py_ssize_t N = len(input) # <<<<<<<<<<<<<< * * cdef ndarray[double_t] output = np.empty(N, dtype=float) */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_input)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1124; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_N = __pyx_t_1; /* "pandas/algos.pyx":1126 * cdef Py_ssize_t N = len(input) * * cdef ndarray[double_t] output = np.empty(N, dtype=float) # <<<<<<<<<<<<<< * * # 3 components of the skewness equation */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1126; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 1126; __pyx_clineno = __LINE__; goto __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_N); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1126; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1126; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1126; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_2)); if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__dtype), ((PyObject *)((PyObject*)(&PyFloat_Type)))) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1126; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_5 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1126; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1126; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_6 = ((PyArrayObject *)__pyx_t_5); { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_output.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_nn___pyx_t_5numpy_double_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { __pyx_v_output = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_output.rcbuffer->pybuffer.buf = NULL; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1126; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } else {__pyx_pybuffernd_output.diminfo[0].strides = __pyx_pybuffernd_output.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_output.diminfo[0].shape = __pyx_pybuffernd_output.rcbuffer->pybuffer.shape[0]; } } __pyx_t_6 = 0; __pyx_v_output = ((PyArrayObject *)__pyx_t_5); __pyx_t_5 = 0; /* "pandas/algos.pyx":1131 * cdef double A, B, C, R * * minp = _check_minp(win, minp, N) # <<<<<<<<<<<<<< * * for i from 0 <= i < minp - 1: */ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s___check_minp); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1131; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_2 = PyInt_FromLong(__pyx_v_win); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1131; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = PyInt_FromLong(__pyx_v_minp); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1131; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = PyInt_FromSsize_t(__pyx_v_N); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1131; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_7 = PyTuple_New(3); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1131; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_7, 2, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_2 = 0; __pyx_t_4 = 0; __pyx_t_3 = 0; __pyx_t_3 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_7), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1131; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0; __pyx_t_8 = __Pyx_PyInt_AsInt(__pyx_t_3); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1131; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_minp = __pyx_t_8; /* "pandas/algos.pyx":1133 * minp = _check_minp(win, minp, N) * * for i from 0 <= i < minp - 1: # <<<<<<<<<<<<<< * val = input[i] * */ __pyx_t_9 = (__pyx_v_minp - 1); for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_9; __pyx_v_i++) { /* "pandas/algos.pyx":1134 * * for i from 0 <= i < minp - 1: * val = input[i] # <<<<<<<<<<<<<< * * # Not NaN */ __pyx_t_1 = __pyx_v_i; __pyx_t_8 = -1; if (__pyx_t_1 < 0) { __pyx_t_1 += __pyx_pybuffernd_input.diminfo[0].shape; if (unlikely(__pyx_t_1 < 0)) __pyx_t_8 = 0; } else if (unlikely(__pyx_t_1 >= __pyx_pybuffernd_input.diminfo[0].shape)) __pyx_t_8 = 0; if (unlikely(__pyx_t_8 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_8); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1134; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_val = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_double_t *, __pyx_pybuffernd_input.rcbuffer->pybuffer.buf, __pyx_t_1, __pyx_pybuffernd_input.diminfo[0].strides)); /* "pandas/algos.pyx":1137 * * # Not NaN * if val == val: # <<<<<<<<<<<<<< * nobs += 1 * x += val */ __pyx_t_10 = ((__pyx_v_val == __pyx_v_val) != 0); if (__pyx_t_10) { /* "pandas/algos.pyx":1138 * # Not NaN * if val == val: * nobs += 1 # <<<<<<<<<<<<<< * x += val * xx += val * val */ __pyx_v_nobs = (__pyx_v_nobs + 1); /* "pandas/algos.pyx":1139 * if val == val: * nobs += 1 * x += val # <<<<<<<<<<<<<< * xx += val * val * xxx += val * val * val */ __pyx_v_x = (__pyx_v_x + __pyx_v_val); /* "pandas/algos.pyx":1140 * nobs += 1 * x += val * xx += val * val # <<<<<<<<<<<<<< * xxx += val * val * val * */ __pyx_v_xx = (__pyx_v_xx + (__pyx_v_val * __pyx_v_val)); /* "pandas/algos.pyx":1141 * x += val * xx += val * val * xxx += val * val * val # <<<<<<<<<<<<<< * * output[i] = NaN */ __pyx_v_xxx = (__pyx_v_xxx + ((__pyx_v_val * __pyx_v_val) * __pyx_v_val)); goto __pyx_L5; } __pyx_L5:; /* "pandas/algos.pyx":1143 * xxx += val * val * val * * output[i] = NaN # <<<<<<<<<<<<<< * * for i from minp - 1 <= i < N: */ __pyx_t_11 = __pyx_v_i; __pyx_t_8 = -1; if (__pyx_t_11 < 0) { __pyx_t_11 += __pyx_pybuffernd_output.diminfo[0].shape; if (unlikely(__pyx_t_11 < 0)) __pyx_t_8 = 0; } else if (unlikely(__pyx_t_11 >= __pyx_pybuffernd_output.diminfo[0].shape)) __pyx_t_8 = 0; if (unlikely(__pyx_t_8 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_8); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1143; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_double_t *, __pyx_pybuffernd_output.rcbuffer->pybuffer.buf, __pyx_t_11, __pyx_pybuffernd_output.diminfo[0].strides) = __pyx_v_6pandas_5algos_NaN; } /* "pandas/algos.pyx":1145 * output[i] = NaN * * for i from minp - 1 <= i < N: # <<<<<<<<<<<<<< * val = input[i] * */ __pyx_t_12 = __pyx_v_N; for (__pyx_v_i = (__pyx_v_minp - 1); __pyx_v_i < __pyx_t_12; __pyx_v_i++) { /* "pandas/algos.pyx":1146 * * for i from minp - 1 <= i < N: * val = input[i] # <<<<<<<<<<<<<< * * if val == val: */ __pyx_t_13 = __pyx_v_i; __pyx_t_8 = -1; if (__pyx_t_13 < 0) { __pyx_t_13 += __pyx_pybuffernd_input.diminfo[0].shape; if (unlikely(__pyx_t_13 < 0)) __pyx_t_8 = 0; } else if (unlikely(__pyx_t_13 >= __pyx_pybuffernd_input.diminfo[0].shape)) __pyx_t_8 = 0; if (unlikely(__pyx_t_8 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_8); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1146; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_val = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_double_t *, __pyx_pybuffernd_input.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_input.diminfo[0].strides)); /* "pandas/algos.pyx":1148 * val = input[i] * * if val == val: # <<<<<<<<<<<<<< * nobs += 1 * x += val */ __pyx_t_10 = ((__pyx_v_val == __pyx_v_val) != 0); if (__pyx_t_10) { /* "pandas/algos.pyx":1149 * * if val == val: * nobs += 1 # <<<<<<<<<<<<<< * x += val * xx += val * val */ __pyx_v_nobs = (__pyx_v_nobs + 1); /* "pandas/algos.pyx":1150 * if val == val: * nobs += 1 * x += val # <<<<<<<<<<<<<< * xx += val * val * xxx += val * val * val */ __pyx_v_x = (__pyx_v_x + __pyx_v_val); /* "pandas/algos.pyx":1151 * nobs += 1 * x += val * xx += val * val # <<<<<<<<<<<<<< * xxx += val * val * val * */ __pyx_v_xx = (__pyx_v_xx + (__pyx_v_val * __pyx_v_val)); /* "pandas/algos.pyx":1152 * x += val * xx += val * val * xxx += val * val * val # <<<<<<<<<<<<<< * * if i > win - 1: */ __pyx_v_xxx = (__pyx_v_xxx + ((__pyx_v_val * __pyx_v_val) * __pyx_v_val)); goto __pyx_L8; } __pyx_L8:; /* "pandas/algos.pyx":1154 * xxx += val * val * val * * if i > win - 1: # <<<<<<<<<<<<<< * prev = input[i - win] * if prev == prev: */ __pyx_t_10 = ((__pyx_v_i > (__pyx_v_win - 1)) != 0); if (__pyx_t_10) { /* "pandas/algos.pyx":1155 * * if i > win - 1: * prev = input[i - win] # <<<<<<<<<<<<<< * if prev == prev: * x -= prev */ __pyx_t_14 = (__pyx_v_i - __pyx_v_win); __pyx_t_8 = -1; if (__pyx_t_14 < 0) { __pyx_t_14 += __pyx_pybuffernd_input.diminfo[0].shape; if (unlikely(__pyx_t_14 < 0)) __pyx_t_8 = 0; } else if (unlikely(__pyx_t_14 >= __pyx_pybuffernd_input.diminfo[0].shape)) __pyx_t_8 = 0; if (unlikely(__pyx_t_8 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_8); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1155; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_prev = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_double_t *, __pyx_pybuffernd_input.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_input.diminfo[0].strides)); /* "pandas/algos.pyx":1156 * if i > win - 1: * prev = input[i - win] * if prev == prev: # <<<<<<<<<<<<<< * x -= prev * xx -= prev * prev */ __pyx_t_10 = ((__pyx_v_prev == __pyx_v_prev) != 0); if (__pyx_t_10) { /* "pandas/algos.pyx":1157 * prev = input[i - win] * if prev == prev: * x -= prev # <<<<<<<<<<<<<< * xx -= prev * prev * xxx -= prev * prev * prev */ __pyx_v_x = (__pyx_v_x - __pyx_v_prev); /* "pandas/algos.pyx":1158 * if prev == prev: * x -= prev * xx -= prev * prev # <<<<<<<<<<<<<< * xxx -= prev * prev * prev * */ __pyx_v_xx = (__pyx_v_xx - (__pyx_v_prev * __pyx_v_prev)); /* "pandas/algos.pyx":1159 * x -= prev * xx -= prev * prev * xxx -= prev * prev * prev # <<<<<<<<<<<<<< * * nobs -= 1 */ __pyx_v_xxx = (__pyx_v_xxx - ((__pyx_v_prev * __pyx_v_prev) * __pyx_v_prev)); /* "pandas/algos.pyx":1161 * xxx -= prev * prev * prev * * nobs -= 1 # <<<<<<<<<<<<<< * * if nobs >= minp: */ __pyx_v_nobs = (__pyx_v_nobs - 1); goto __pyx_L10; } __pyx_L10:; goto __pyx_L9; } __pyx_L9:; /* "pandas/algos.pyx":1163 * nobs -= 1 * * if nobs >= minp: # <<<<<<<<<<<<<< * A = x / nobs * B = xx / nobs - A * A */ __pyx_t_10 = ((__pyx_v_nobs >= __pyx_v_minp) != 0); if (__pyx_t_10) { /* "pandas/algos.pyx":1164 * * if nobs >= minp: * A = x / nobs # <<<<<<<<<<<<<< * B = xx / nobs - A * A * C = xxx / nobs - A * A * A - 3 * A * B */ if (unlikely(__pyx_v_nobs == 0)) { #ifdef WITH_THREAD PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure(); #endif PyErr_Format(PyExc_ZeroDivisionError, "float division"); #ifdef WITH_THREAD PyGILState_Release(__pyx_gilstate_save); #endif {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1164; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_A = (__pyx_v_x / __pyx_v_nobs); /* "pandas/algos.pyx":1165 * if nobs >= minp: * A = x / nobs * B = xx / nobs - A * A # <<<<<<<<<<<<<< * C = xxx / nobs - A * A * A - 3 * A * B * */ if (unlikely(__pyx_v_nobs == 0)) { #ifdef WITH_THREAD PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure(); #endif PyErr_Format(PyExc_ZeroDivisionError, "float division"); #ifdef WITH_THREAD PyGILState_Release(__pyx_gilstate_save); #endif {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1165; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_B = ((__pyx_v_xx / __pyx_v_nobs) - (__pyx_v_A * __pyx_v_A)); /* "pandas/algos.pyx":1166 * A = x / nobs * B = xx / nobs - A * A * C = xxx / nobs - A * A * A - 3 * A * B # <<<<<<<<<<<<<< * * R = sqrt(B) */ if (unlikely(__pyx_v_nobs == 0)) { #ifdef WITH_THREAD PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure(); #endif PyErr_Format(PyExc_ZeroDivisionError, "float division"); #ifdef WITH_THREAD PyGILState_Release(__pyx_gilstate_save); #endif {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1166; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_C = (((__pyx_v_xxx / __pyx_v_nobs) - ((__pyx_v_A * __pyx_v_A) * __pyx_v_A)) - ((3.0 * __pyx_v_A) * __pyx_v_B)); /* "pandas/algos.pyx":1168 * C = xxx / nobs - A * A * A - 3 * A * B * * R = sqrt(B) # <<<<<<<<<<<<<< * * if B == 0 or nobs < 3: */ __pyx_v_R = sqrt(__pyx_v_B); /* "pandas/algos.pyx":1170 * R = sqrt(B) * * if B == 0 or nobs < 3: # <<<<<<<<<<<<<< * output[i] = NaN * else: */ __pyx_t_10 = ((__pyx_v_B == 0.0) != 0); if (!__pyx_t_10) { __pyx_t_15 = ((__pyx_v_nobs < 3) != 0); __pyx_t_16 = __pyx_t_15; } else { __pyx_t_16 = __pyx_t_10; } if (__pyx_t_16) { /* "pandas/algos.pyx":1171 * * if B == 0 or nobs < 3: * output[i] = NaN # <<<<<<<<<<<<<< * else: * output[i] = ((sqrt(nobs * (nobs - 1.)) * C) / */ __pyx_t_17 = __pyx_v_i; __pyx_t_8 = -1; if (__pyx_t_17 < 0) { __pyx_t_17 += __pyx_pybuffernd_output.diminfo[0].shape; if (unlikely(__pyx_t_17 < 0)) __pyx_t_8 = 0; } else if (unlikely(__pyx_t_17 >= __pyx_pybuffernd_output.diminfo[0].shape)) __pyx_t_8 = 0; if (unlikely(__pyx_t_8 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_8); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1171; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_double_t *, __pyx_pybuffernd_output.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_output.diminfo[0].strides) = __pyx_v_6pandas_5algos_NaN; goto __pyx_L12; } /*else*/ { /* "pandas/algos.pyx":1173 * output[i] = NaN * else: * output[i] = ((sqrt(nobs * (nobs - 1.)) * C) / # <<<<<<<<<<<<<< * ((nobs-2) * R * R * R)) * else: */ __pyx_t_18 = (sqrt((__pyx_v_nobs * (__pyx_v_nobs - 1.))) * __pyx_v_C); /* "pandas/algos.pyx":1174 * else: * output[i] = ((sqrt(nobs * (nobs - 1.)) * C) / * ((nobs-2) * R * R * R)) # <<<<<<<<<<<<<< * else: * output[i] = NaN */ __pyx_t_19 = ((((__pyx_v_nobs - 2) * __pyx_v_R) * __pyx_v_R) * __pyx_v_R); if (unlikely(__pyx_t_19 == 0)) { #ifdef WITH_THREAD PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure(); #endif PyErr_Format(PyExc_ZeroDivisionError, "float division"); #ifdef WITH_THREAD PyGILState_Release(__pyx_gilstate_save); #endif {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1173; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } /* "pandas/algos.pyx":1173 * output[i] = NaN * else: * output[i] = ((sqrt(nobs * (nobs - 1.)) * C) / # <<<<<<<<<<<<<< * ((nobs-2) * R * R * R)) * else: */ __pyx_t_20 = __pyx_v_i; __pyx_t_8 = -1; if (__pyx_t_20 < 0) { __pyx_t_20 += __pyx_pybuffernd_output.diminfo[0].shape; if (unlikely(__pyx_t_20 < 0)) __pyx_t_8 = 0; } else if (unlikely(__pyx_t_20 >= __pyx_pybuffernd_output.diminfo[0].shape)) __pyx_t_8 = 0; if (unlikely(__pyx_t_8 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_8); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1173; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_double_t *, __pyx_pybuffernd_output.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_output.diminfo[0].strides) = (__pyx_t_18 / __pyx_t_19); } __pyx_L12:; goto __pyx_L11; } /*else*/ { /* "pandas/algos.pyx":1176 * ((nobs-2) * R * R * R)) * else: * output[i] = NaN # <<<<<<<<<<<<<< * * return output */ __pyx_t_21 = __pyx_v_i; __pyx_t_8 = -1; if (__pyx_t_21 < 0) { __pyx_t_21 += __pyx_pybuffernd_output.diminfo[0].shape; if (unlikely(__pyx_t_21 < 0)) __pyx_t_8 = 0; } else if (unlikely(__pyx_t_21 >= __pyx_pybuffernd_output.diminfo[0].shape)) __pyx_t_8 = 0; if (unlikely(__pyx_t_8 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_8); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1176; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_double_t *, __pyx_pybuffernd_output.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_output.diminfo[0].strides) = __pyx_v_6pandas_5algos_NaN; } __pyx_L11:; } /* "pandas/algos.pyx":1178 * output[i] = NaN * * return output # <<<<<<<<<<<<<< * * #------------------------------------------------------------------------------- */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_output)); __pyx_r = ((PyObject *)__pyx_v_output); goto __pyx_L0; __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_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_7); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_input.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_output.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.roll_skew", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_input.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_output.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_output); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_37roll_kurt(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_37roll_kurt = {__Pyx_NAMESTR("roll_kurt"), (PyCFunction)__pyx_pw_6pandas_5algos_37roll_kurt, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_37roll_kurt(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_input = 0; int __pyx_v_win; int __pyx_v_minp; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("roll_kurt (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__input,&__pyx_n_s__win,&__pyx_n_s__minp,0}; PyObject* values[3] = {0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__input)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__win)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("roll_kurt", 1, 3, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1184; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__minp)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("roll_kurt", 1, 3, 3, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1184; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "roll_kurt") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1184; __pyx_clineno = __LINE__; goto __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_input = ((PyArrayObject *)values[0]); __pyx_v_win = __Pyx_PyInt_AsInt(values[1]); if (unlikely((__pyx_v_win == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1185; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_minp = __Pyx_PyInt_AsInt(values[2]); if (unlikely((__pyx_v_minp == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1185; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("roll_kurt", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1184; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.roll_kurt", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_input), __pyx_ptype_5numpy_ndarray, 1, "input", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1184; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_36roll_kurt(__pyx_self, __pyx_v_input, __pyx_v_win, __pyx_v_minp); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/algos.pyx":1184 * * * def roll_kurt(ndarray[double_t] input, # <<<<<<<<<<<<<< * int win, int minp): * cdef double val, prev */ static PyObject *__pyx_pf_6pandas_5algos_36roll_kurt(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_input, int __pyx_v_win, int __pyx_v_minp) { double __pyx_v_val; double __pyx_v_prev; double __pyx_v_x; double __pyx_v_xx; double __pyx_v_xxx; double __pyx_v_xxxx; Py_ssize_t __pyx_v_nobs; Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_N; PyArrayObject *__pyx_v_output = 0; double __pyx_v_A; double __pyx_v_B; double __pyx_v_C; double __pyx_v_D; double __pyx_v_R; double __pyx_v_K; __Pyx_LocalBuf_ND __pyx_pybuffernd_input; __Pyx_Buffer __pyx_pybuffer_input; __Pyx_LocalBuf_ND __pyx_pybuffernd_output; __Pyx_Buffer __pyx_pybuffer_output; 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; PyArrayObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; int __pyx_t_8; long __pyx_t_9; int __pyx_t_10; Py_ssize_t __pyx_t_11; 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; double __pyx_t_18; double __pyx_t_19; Py_ssize_t __pyx_t_20; Py_ssize_t __pyx_t_21; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("roll_kurt", 0); __pyx_pybuffer_output.pybuffer.buf = NULL; __pyx_pybuffer_output.refcount = 0; __pyx_pybuffernd_output.data = NULL; __pyx_pybuffernd_output.rcbuffer = &__pyx_pybuffer_output; __pyx_pybuffer_input.pybuffer.buf = NULL; __pyx_pybuffer_input.refcount = 0; __pyx_pybuffernd_input.data = NULL; __pyx_pybuffernd_input.rcbuffer = &__pyx_pybuffer_input; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_input.rcbuffer->pybuffer, (PyObject*)__pyx_v_input, &__Pyx_TypeInfo_nn___pyx_t_5numpy_double_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1184; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_input.diminfo[0].strides = __pyx_pybuffernd_input.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_input.diminfo[0].shape = __pyx_pybuffernd_input.rcbuffer->pybuffer.shape[0]; /* "pandas/algos.pyx":1187 * int win, int minp): * cdef double val, prev * cdef double x = 0, xx = 0, xxx = 0, xxxx = 0 # <<<<<<<<<<<<<< * cdef Py_ssize_t nobs = 0, i * cdef Py_ssize_t N = len(input) */ __pyx_v_x = 0.0; __pyx_v_xx = 0.0; __pyx_v_xxx = 0.0; __pyx_v_xxxx = 0.0; /* "pandas/algos.pyx":1188 * cdef double val, prev * cdef double x = 0, xx = 0, xxx = 0, xxxx = 0 * cdef Py_ssize_t nobs = 0, i # <<<<<<<<<<<<<< * cdef Py_ssize_t N = len(input) * */ __pyx_v_nobs = 0; /* "pandas/algos.pyx":1189 * cdef double x = 0, xx = 0, xxx = 0, xxxx = 0 * cdef Py_ssize_t nobs = 0, i * cdef Py_ssize_t N = len(input) # <<<<<<<<<<<<<< * * cdef ndarray[double_t] output = np.empty(N, dtype=float) */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_input)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1189; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_N = __pyx_t_1; /* "pandas/algos.pyx":1191 * cdef Py_ssize_t N = len(input) * * cdef ndarray[double_t] output = np.empty(N, dtype=float) # <<<<<<<<<<<<<< * * # 5 components of the kurtosis equation */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1191; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 1191; __pyx_clineno = __LINE__; goto __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_N); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1191; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1191; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1191; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_2)); if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__dtype), ((PyObject *)((PyObject*)(&PyFloat_Type)))) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1191; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_5 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1191; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1191; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_6 = ((PyArrayObject *)__pyx_t_5); { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_output.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_nn___pyx_t_5numpy_double_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { __pyx_v_output = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_output.rcbuffer->pybuffer.buf = NULL; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1191; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } else {__pyx_pybuffernd_output.diminfo[0].strides = __pyx_pybuffernd_output.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_output.diminfo[0].shape = __pyx_pybuffernd_output.rcbuffer->pybuffer.shape[0]; } } __pyx_t_6 = 0; __pyx_v_output = ((PyArrayObject *)__pyx_t_5); __pyx_t_5 = 0; /* "pandas/algos.pyx":1196 * cdef double A, B, C, D, R, K * * minp = _check_minp(win, minp, N) # <<<<<<<<<<<<<< * * for i from 0 <= i < minp - 1: */ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s___check_minp); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1196; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_2 = PyInt_FromLong(__pyx_v_win); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1196; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = PyInt_FromLong(__pyx_v_minp); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1196; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = PyInt_FromSsize_t(__pyx_v_N); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1196; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_7 = PyTuple_New(3); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1196; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_7, 2, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_2 = 0; __pyx_t_4 = 0; __pyx_t_3 = 0; __pyx_t_3 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_7), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1196; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0; __pyx_t_8 = __Pyx_PyInt_AsInt(__pyx_t_3); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1196; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_minp = __pyx_t_8; /* "pandas/algos.pyx":1198 * minp = _check_minp(win, minp, N) * * for i from 0 <= i < minp - 1: # <<<<<<<<<<<<<< * val = input[i] * */ __pyx_t_9 = (__pyx_v_minp - 1); for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_9; __pyx_v_i++) { /* "pandas/algos.pyx":1199 * * for i from 0 <= i < minp - 1: * val = input[i] # <<<<<<<<<<<<<< * * # Not NaN */ __pyx_t_1 = __pyx_v_i; __pyx_t_8 = -1; if (__pyx_t_1 < 0) { __pyx_t_1 += __pyx_pybuffernd_input.diminfo[0].shape; if (unlikely(__pyx_t_1 < 0)) __pyx_t_8 = 0; } else if (unlikely(__pyx_t_1 >= __pyx_pybuffernd_input.diminfo[0].shape)) __pyx_t_8 = 0; if (unlikely(__pyx_t_8 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_8); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1199; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_val = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_double_t *, __pyx_pybuffernd_input.rcbuffer->pybuffer.buf, __pyx_t_1, __pyx_pybuffernd_input.diminfo[0].strides)); /* "pandas/algos.pyx":1202 * * # Not NaN * if val == val: # <<<<<<<<<<<<<< * nobs += 1 * */ __pyx_t_10 = ((__pyx_v_val == __pyx_v_val) != 0); if (__pyx_t_10) { /* "pandas/algos.pyx":1203 * # Not NaN * if val == val: * nobs += 1 # <<<<<<<<<<<<<< * * # seriously don't ask me why this is faster */ __pyx_v_nobs = (__pyx_v_nobs + 1); /* "pandas/algos.pyx":1206 * * # seriously don't ask me why this is faster * x += val # <<<<<<<<<<<<<< * xx += val * val * xxx += val * val * val */ __pyx_v_x = (__pyx_v_x + __pyx_v_val); /* "pandas/algos.pyx":1207 * # seriously don't ask me why this is faster * x += val * xx += val * val # <<<<<<<<<<<<<< * xxx += val * val * val * xxxx += val * val * val * val */ __pyx_v_xx = (__pyx_v_xx + (__pyx_v_val * __pyx_v_val)); /* "pandas/algos.pyx":1208 * x += val * xx += val * val * xxx += val * val * val # <<<<<<<<<<<<<< * xxxx += val * val * val * val * */ __pyx_v_xxx = (__pyx_v_xxx + ((__pyx_v_val * __pyx_v_val) * __pyx_v_val)); /* "pandas/algos.pyx":1209 * xx += val * val * xxx += val * val * val * xxxx += val * val * val * val # <<<<<<<<<<<<<< * * output[i] = NaN */ __pyx_v_xxxx = (__pyx_v_xxxx + (((__pyx_v_val * __pyx_v_val) * __pyx_v_val) * __pyx_v_val)); goto __pyx_L5; } __pyx_L5:; /* "pandas/algos.pyx":1211 * xxxx += val * val * val * val * * output[i] = NaN # <<<<<<<<<<<<<< * * for i from minp - 1 <= i < N: */ __pyx_t_11 = __pyx_v_i; __pyx_t_8 = -1; if (__pyx_t_11 < 0) { __pyx_t_11 += __pyx_pybuffernd_output.diminfo[0].shape; if (unlikely(__pyx_t_11 < 0)) __pyx_t_8 = 0; } else if (unlikely(__pyx_t_11 >= __pyx_pybuffernd_output.diminfo[0].shape)) __pyx_t_8 = 0; if (unlikely(__pyx_t_8 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_8); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1211; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_double_t *, __pyx_pybuffernd_output.rcbuffer->pybuffer.buf, __pyx_t_11, __pyx_pybuffernd_output.diminfo[0].strides) = __pyx_v_6pandas_5algos_NaN; } /* "pandas/algos.pyx":1213 * output[i] = NaN * * for i from minp - 1 <= i < N: # <<<<<<<<<<<<<< * val = input[i] * */ __pyx_t_12 = __pyx_v_N; for (__pyx_v_i = (__pyx_v_minp - 1); __pyx_v_i < __pyx_t_12; __pyx_v_i++) { /* "pandas/algos.pyx":1214 * * for i from minp - 1 <= i < N: * val = input[i] # <<<<<<<<<<<<<< * * if val == val: */ __pyx_t_13 = __pyx_v_i; __pyx_t_8 = -1; if (__pyx_t_13 < 0) { __pyx_t_13 += __pyx_pybuffernd_input.diminfo[0].shape; if (unlikely(__pyx_t_13 < 0)) __pyx_t_8 = 0; } else if (unlikely(__pyx_t_13 >= __pyx_pybuffernd_input.diminfo[0].shape)) __pyx_t_8 = 0; if (unlikely(__pyx_t_8 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_8); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1214; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_val = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_double_t *, __pyx_pybuffernd_input.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_input.diminfo[0].strides)); /* "pandas/algos.pyx":1216 * val = input[i] * * if val == val: # <<<<<<<<<<<<<< * nobs += 1 * x += val */ __pyx_t_10 = ((__pyx_v_val == __pyx_v_val) != 0); if (__pyx_t_10) { /* "pandas/algos.pyx":1217 * * if val == val: * nobs += 1 # <<<<<<<<<<<<<< * x += val * xx += val * val */ __pyx_v_nobs = (__pyx_v_nobs + 1); /* "pandas/algos.pyx":1218 * if val == val: * nobs += 1 * x += val # <<<<<<<<<<<<<< * xx += val * val * xxx += val * val * val */ __pyx_v_x = (__pyx_v_x + __pyx_v_val); /* "pandas/algos.pyx":1219 * nobs += 1 * x += val * xx += val * val # <<<<<<<<<<<<<< * xxx += val * val * val * xxxx += val * val * val * val */ __pyx_v_xx = (__pyx_v_xx + (__pyx_v_val * __pyx_v_val)); /* "pandas/algos.pyx":1220 * x += val * xx += val * val * xxx += val * val * val # <<<<<<<<<<<<<< * xxxx += val * val * val * val * */ __pyx_v_xxx = (__pyx_v_xxx + ((__pyx_v_val * __pyx_v_val) * __pyx_v_val)); /* "pandas/algos.pyx":1221 * xx += val * val * xxx += val * val * val * xxxx += val * val * val * val # <<<<<<<<<<<<<< * * if i > win - 1: */ __pyx_v_xxxx = (__pyx_v_xxxx + (((__pyx_v_val * __pyx_v_val) * __pyx_v_val) * __pyx_v_val)); goto __pyx_L8; } __pyx_L8:; /* "pandas/algos.pyx":1223 * xxxx += val * val * val * val * * if i > win - 1: # <<<<<<<<<<<<<< * prev = input[i - win] * if prev == prev: */ __pyx_t_10 = ((__pyx_v_i > (__pyx_v_win - 1)) != 0); if (__pyx_t_10) { /* "pandas/algos.pyx":1224 * * if i > win - 1: * prev = input[i - win] # <<<<<<<<<<<<<< * if prev == prev: * x -= prev */ __pyx_t_14 = (__pyx_v_i - __pyx_v_win); __pyx_t_8 = -1; if (__pyx_t_14 < 0) { __pyx_t_14 += __pyx_pybuffernd_input.diminfo[0].shape; if (unlikely(__pyx_t_14 < 0)) __pyx_t_8 = 0; } else if (unlikely(__pyx_t_14 >= __pyx_pybuffernd_input.diminfo[0].shape)) __pyx_t_8 = 0; if (unlikely(__pyx_t_8 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_8); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1224; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_prev = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_double_t *, __pyx_pybuffernd_input.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_input.diminfo[0].strides)); /* "pandas/algos.pyx":1225 * if i > win - 1: * prev = input[i - win] * if prev == prev: # <<<<<<<<<<<<<< * x -= prev * xx -= prev * prev */ __pyx_t_10 = ((__pyx_v_prev == __pyx_v_prev) != 0); if (__pyx_t_10) { /* "pandas/algos.pyx":1226 * prev = input[i - win] * if prev == prev: * x -= prev # <<<<<<<<<<<<<< * xx -= prev * prev * xxx -= prev * prev * prev */ __pyx_v_x = (__pyx_v_x - __pyx_v_prev); /* "pandas/algos.pyx":1227 * if prev == prev: * x -= prev * xx -= prev * prev # <<<<<<<<<<<<<< * xxx -= prev * prev * prev * xxxx -= prev * prev * prev * prev */ __pyx_v_xx = (__pyx_v_xx - (__pyx_v_prev * __pyx_v_prev)); /* "pandas/algos.pyx":1228 * x -= prev * xx -= prev * prev * xxx -= prev * prev * prev # <<<<<<<<<<<<<< * xxxx -= prev * prev * prev * prev * */ __pyx_v_xxx = (__pyx_v_xxx - ((__pyx_v_prev * __pyx_v_prev) * __pyx_v_prev)); /* "pandas/algos.pyx":1229 * xx -= prev * prev * xxx -= prev * prev * prev * xxxx -= prev * prev * prev * prev # <<<<<<<<<<<<<< * * nobs -= 1 */ __pyx_v_xxxx = (__pyx_v_xxxx - (((__pyx_v_prev * __pyx_v_prev) * __pyx_v_prev) * __pyx_v_prev)); /* "pandas/algos.pyx":1231 * xxxx -= prev * prev * prev * prev * * nobs -= 1 # <<<<<<<<<<<<<< * * if nobs >= minp: */ __pyx_v_nobs = (__pyx_v_nobs - 1); goto __pyx_L10; } __pyx_L10:; goto __pyx_L9; } __pyx_L9:; /* "pandas/algos.pyx":1233 * nobs -= 1 * * if nobs >= minp: # <<<<<<<<<<<<<< * A = x / nobs * R = A * A */ __pyx_t_10 = ((__pyx_v_nobs >= __pyx_v_minp) != 0); if (__pyx_t_10) { /* "pandas/algos.pyx":1234 * * if nobs >= minp: * A = x / nobs # <<<<<<<<<<<<<< * R = A * A * B = xx / nobs - R */ if (unlikely(__pyx_v_nobs == 0)) { #ifdef WITH_THREAD PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure(); #endif PyErr_Format(PyExc_ZeroDivisionError, "float division"); #ifdef WITH_THREAD PyGILState_Release(__pyx_gilstate_save); #endif {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1234; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_A = (__pyx_v_x / __pyx_v_nobs); /* "pandas/algos.pyx":1235 * if nobs >= minp: * A = x / nobs * R = A * A # <<<<<<<<<<<<<< * B = xx / nobs - R * R = R * A */ __pyx_v_R = (__pyx_v_A * __pyx_v_A); /* "pandas/algos.pyx":1236 * A = x / nobs * R = A * A * B = xx / nobs - R # <<<<<<<<<<<<<< * R = R * A * C = xxx / nobs - R - 3 * A * B */ if (unlikely(__pyx_v_nobs == 0)) { #ifdef WITH_THREAD PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure(); #endif PyErr_Format(PyExc_ZeroDivisionError, "float division"); #ifdef WITH_THREAD PyGILState_Release(__pyx_gilstate_save); #endif {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1236; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_B = ((__pyx_v_xx / __pyx_v_nobs) - __pyx_v_R); /* "pandas/algos.pyx":1237 * R = A * A * B = xx / nobs - R * R = R * A # <<<<<<<<<<<<<< * C = xxx / nobs - R - 3 * A * B * R = R * A */ __pyx_v_R = (__pyx_v_R * __pyx_v_A); /* "pandas/algos.pyx":1238 * B = xx / nobs - R * R = R * A * C = xxx / nobs - R - 3 * A * B # <<<<<<<<<<<<<< * R = R * A * D = xxxx / nobs - R - 6*B*A*A - 4*C*A */ if (unlikely(__pyx_v_nobs == 0)) { #ifdef WITH_THREAD PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure(); #endif PyErr_Format(PyExc_ZeroDivisionError, "float division"); #ifdef WITH_THREAD PyGILState_Release(__pyx_gilstate_save); #endif {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1238; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_C = (((__pyx_v_xxx / __pyx_v_nobs) - __pyx_v_R) - ((3.0 * __pyx_v_A) * __pyx_v_B)); /* "pandas/algos.pyx":1239 * R = R * A * C = xxx / nobs - R - 3 * A * B * R = R * A # <<<<<<<<<<<<<< * D = xxxx / nobs - R - 6*B*A*A - 4*C*A * */ __pyx_v_R = (__pyx_v_R * __pyx_v_A); /* "pandas/algos.pyx":1240 * C = xxx / nobs - R - 3 * A * B * R = R * A * D = xxxx / nobs - R - 6*B*A*A - 4*C*A # <<<<<<<<<<<<<< * * if B == 0 or nobs < 4: */ if (unlikely(__pyx_v_nobs == 0)) { #ifdef WITH_THREAD PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure(); #endif PyErr_Format(PyExc_ZeroDivisionError, "float division"); #ifdef WITH_THREAD PyGILState_Release(__pyx_gilstate_save); #endif {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1240; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_D = ((((__pyx_v_xxxx / __pyx_v_nobs) - __pyx_v_R) - (((6.0 * __pyx_v_B) * __pyx_v_A) * __pyx_v_A)) - ((4.0 * __pyx_v_C) * __pyx_v_A)); /* "pandas/algos.pyx":1242 * D = xxxx / nobs - R - 6*B*A*A - 4*C*A * * if B == 0 or nobs < 4: # <<<<<<<<<<<<<< * output[i] = NaN * */ __pyx_t_10 = ((__pyx_v_B == 0.0) != 0); if (!__pyx_t_10) { __pyx_t_15 = ((__pyx_v_nobs < 4) != 0); __pyx_t_16 = __pyx_t_15; } else { __pyx_t_16 = __pyx_t_10; } if (__pyx_t_16) { /* "pandas/algos.pyx":1243 * * if B == 0 or nobs < 4: * output[i] = NaN # <<<<<<<<<<<<<< * * else: */ __pyx_t_17 = __pyx_v_i; __pyx_t_8 = -1; if (__pyx_t_17 < 0) { __pyx_t_17 += __pyx_pybuffernd_output.diminfo[0].shape; if (unlikely(__pyx_t_17 < 0)) __pyx_t_8 = 0; } else if (unlikely(__pyx_t_17 >= __pyx_pybuffernd_output.diminfo[0].shape)) __pyx_t_8 = 0; if (unlikely(__pyx_t_8 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_8); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1243; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_double_t *, __pyx_pybuffernd_output.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_output.diminfo[0].strides) = __pyx_v_6pandas_5algos_NaN; goto __pyx_L12; } /*else*/ { /* "pandas/algos.pyx":1246 * * else: * K = (nobs * nobs - 1.)*D/(B*B) - 3*((nobs-1.)**2) # <<<<<<<<<<<<<< * K = K / ((nobs - 2.)*(nobs-3.)) * */ __pyx_t_18 = (((__pyx_v_nobs * __pyx_v_nobs) - 1.) * __pyx_v_D); __pyx_t_19 = (__pyx_v_B * __pyx_v_B); if (unlikely(__pyx_t_19 == 0)) { #ifdef WITH_THREAD PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure(); #endif PyErr_Format(PyExc_ZeroDivisionError, "float division"); #ifdef WITH_THREAD PyGILState_Release(__pyx_gilstate_save); #endif {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1246; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_K = ((__pyx_t_18 / __pyx_t_19) - (3.0 * pow((__pyx_v_nobs - 1.), 2.0))); /* "pandas/algos.pyx":1247 * else: * K = (nobs * nobs - 1.)*D/(B*B) - 3*((nobs-1.)**2) * K = K / ((nobs - 2.)*(nobs-3.)) # <<<<<<<<<<<<<< * * output[i] = K */ __pyx_t_19 = ((__pyx_v_nobs - 2.) * (__pyx_v_nobs - 3.)); if (unlikely(__pyx_t_19 == 0)) { #ifdef WITH_THREAD PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure(); #endif PyErr_Format(PyExc_ZeroDivisionError, "float division"); #ifdef WITH_THREAD PyGILState_Release(__pyx_gilstate_save); #endif {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1247; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_K = (__pyx_v_K / __pyx_t_19); /* "pandas/algos.pyx":1249 * K = K / ((nobs - 2.)*(nobs-3.)) * * output[i] = K # <<<<<<<<<<<<<< * * else: */ __pyx_t_20 = __pyx_v_i; __pyx_t_8 = -1; if (__pyx_t_20 < 0) { __pyx_t_20 += __pyx_pybuffernd_output.diminfo[0].shape; if (unlikely(__pyx_t_20 < 0)) __pyx_t_8 = 0; } else if (unlikely(__pyx_t_20 >= __pyx_pybuffernd_output.diminfo[0].shape)) __pyx_t_8 = 0; if (unlikely(__pyx_t_8 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_8); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1249; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_double_t *, __pyx_pybuffernd_output.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_output.diminfo[0].strides) = __pyx_v_K; } __pyx_L12:; goto __pyx_L11; } /*else*/ { /* "pandas/algos.pyx":1252 * * else: * output[i] = NaN # <<<<<<<<<<<<<< * * return output */ __pyx_t_21 = __pyx_v_i; __pyx_t_8 = -1; if (__pyx_t_21 < 0) { __pyx_t_21 += __pyx_pybuffernd_output.diminfo[0].shape; if (unlikely(__pyx_t_21 < 0)) __pyx_t_8 = 0; } else if (unlikely(__pyx_t_21 >= __pyx_pybuffernd_output.diminfo[0].shape)) __pyx_t_8 = 0; if (unlikely(__pyx_t_8 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_8); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1252; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_double_t *, __pyx_pybuffernd_output.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_output.diminfo[0].strides) = __pyx_v_6pandas_5algos_NaN; } __pyx_L11:; } /* "pandas/algos.pyx":1254 * output[i] = NaN * * return output # <<<<<<<<<<<<<< * * #------------------------------------------------------------------------------- */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_output)); __pyx_r = ((PyObject *)__pyx_v_output); goto __pyx_L0; __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_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_7); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_input.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_output.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.roll_kurt", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_input.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_output.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_output); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/algos.pyx":1261 * ctypedef double_t (* skiplist_f)(object sl, int n, int p) * * cdef _roll_skiplist_op(ndarray arg, int win, int minp, skiplist_f op): # <<<<<<<<<<<<<< * cdef ndarray[double_t] input = arg * cdef double val, prev, midpoint */ static PyObject *__pyx_f_6pandas_5algos__roll_skiplist_op(PyArrayObject *__pyx_v_arg, int __pyx_v_win, int __pyx_v_minp, __pyx_t_6pandas_5algos_skiplist_f __pyx_v_op) { PyArrayObject *__pyx_v_input = 0; double __pyx_v_val; double __pyx_v_prev; struct __pyx_obj_6pandas_5algos_IndexableSkiplist *__pyx_v_skiplist = 0; Py_ssize_t __pyx_v_nobs; Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_N; PyArrayObject *__pyx_v_output = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_input; __Pyx_Buffer __pyx_pybuffer_input; __Pyx_LocalBuf_ND __pyx_pybuffernd_output; __Pyx_Buffer __pyx_pybuffer_output; 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; PyArrayObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; int __pyx_t_8; long __pyx_t_9; int __pyx_t_10; Py_ssize_t __pyx_t_11; Py_ssize_t __pyx_t_12; Py_ssize_t __pyx_t_13; Py_ssize_t __pyx_t_14; Py_ssize_t __pyx_t_15; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_roll_skiplist_op", 0); __pyx_pybuffer_input.pybuffer.buf = NULL; __pyx_pybuffer_input.refcount = 0; __pyx_pybuffernd_input.data = NULL; __pyx_pybuffernd_input.rcbuffer = &__pyx_pybuffer_input; __pyx_pybuffer_output.pybuffer.buf = NULL; __pyx_pybuffer_output.refcount = 0; __pyx_pybuffernd_output.data = NULL; __pyx_pybuffernd_output.rcbuffer = &__pyx_pybuffer_output; /* "pandas/algos.pyx":1262 * * cdef _roll_skiplist_op(ndarray arg, int win, int minp, skiplist_f op): * cdef ndarray[double_t] input = arg # <<<<<<<<<<<<<< * cdef double val, prev, midpoint * cdef IndexableSkiplist skiplist */ { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_input.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_v_arg), &__Pyx_TypeInfo_nn___pyx_t_5numpy_double_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { __pyx_v_input = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_input.rcbuffer->pybuffer.buf = NULL; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1262; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } else {__pyx_pybuffernd_input.diminfo[0].strides = __pyx_pybuffernd_input.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_input.diminfo[0].shape = __pyx_pybuffernd_input.rcbuffer->pybuffer.shape[0]; } } __Pyx_INCREF(((PyObject *)__pyx_v_arg)); __pyx_v_input = ((PyArrayObject *)__pyx_v_arg); /* "pandas/algos.pyx":1265 * cdef double val, prev, midpoint * cdef IndexableSkiplist skiplist * cdef Py_ssize_t nobs = 0, i # <<<<<<<<<<<<<< * * cdef Py_ssize_t N = len(input) */ __pyx_v_nobs = 0; /* "pandas/algos.pyx":1267 * cdef Py_ssize_t nobs = 0, i * * cdef Py_ssize_t N = len(input) # <<<<<<<<<<<<<< * cdef ndarray[double_t] output = np.empty(N, dtype=float) * */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_input)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1267; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_N = __pyx_t_1; /* "pandas/algos.pyx":1268 * * cdef Py_ssize_t N = len(input) * cdef ndarray[double_t] output = np.empty(N, dtype=float) # <<<<<<<<<<<<<< * * skiplist = IndexableSkiplist(win) */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1268; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 1268; __pyx_clineno = __LINE__; goto __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_N); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1268; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1268; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1268; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_2)); if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__dtype), ((PyObject *)((PyObject*)(&PyFloat_Type)))) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1268; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_5 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1268; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1268; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_6 = ((PyArrayObject *)__pyx_t_5); { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_output.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_nn___pyx_t_5numpy_double_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { __pyx_v_output = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_output.rcbuffer->pybuffer.buf = NULL; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1268; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } else {__pyx_pybuffernd_output.diminfo[0].strides = __pyx_pybuffernd_output.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_output.diminfo[0].shape = __pyx_pybuffernd_output.rcbuffer->pybuffer.shape[0]; } } __pyx_t_6 = 0; __pyx_v_output = ((PyArrayObject *)__pyx_t_5); __pyx_t_5 = 0; /* "pandas/algos.pyx":1270 * cdef ndarray[double_t] output = np.empty(N, dtype=float) * * skiplist = IndexableSkiplist(win) # <<<<<<<<<<<<<< * * minp = _check_minp(win, minp, N) */ __pyx_t_5 = PyInt_FromLong(__pyx_v_win); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1270; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1270; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_6pandas_5algos_IndexableSkiplist)), ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1270; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __pyx_v_skiplist = ((struct __pyx_obj_6pandas_5algos_IndexableSkiplist *)__pyx_t_5); __pyx_t_5 = 0; /* "pandas/algos.pyx":1272 * skiplist = IndexableSkiplist(win) * * minp = _check_minp(win, minp, N) # <<<<<<<<<<<<<< * * for i from 0 <= i < minp - 1: */ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s___check_minp); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1272; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_2 = PyInt_FromLong(__pyx_v_win); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1272; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = PyInt_FromLong(__pyx_v_minp); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1272; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = PyInt_FromSsize_t(__pyx_v_N); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1272; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_7 = PyTuple_New(3); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1272; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_7, 2, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_2 = 0; __pyx_t_4 = 0; __pyx_t_3 = 0; __pyx_t_3 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_7), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1272; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0; __pyx_t_8 = __Pyx_PyInt_AsInt(__pyx_t_3); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1272; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_minp = __pyx_t_8; /* "pandas/algos.pyx":1274 * minp = _check_minp(win, minp, N) * * for i from 0 <= i < minp - 1: # <<<<<<<<<<<<<< * val = input[i] * */ __pyx_t_9 = (__pyx_v_minp - 1); for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_9; __pyx_v_i++) { /* "pandas/algos.pyx":1275 * * for i from 0 <= i < minp - 1: * val = input[i] # <<<<<<<<<<<<<< * * # Not NaN */ __pyx_t_1 = __pyx_v_i; __pyx_t_8 = -1; if (__pyx_t_1 < 0) { __pyx_t_1 += __pyx_pybuffernd_input.diminfo[0].shape; if (unlikely(__pyx_t_1 < 0)) __pyx_t_8 = 0; } else if (unlikely(__pyx_t_1 >= __pyx_pybuffernd_input.diminfo[0].shape)) __pyx_t_8 = 0; if (unlikely(__pyx_t_8 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_8); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1275; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_val = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_double_t *, __pyx_pybuffernd_input.rcbuffer->pybuffer.buf, __pyx_t_1, __pyx_pybuffernd_input.diminfo[0].strides)); /* "pandas/algos.pyx":1278 * * # Not NaN * if val == val: # <<<<<<<<<<<<<< * nobs += 1 * skiplist.insert(val) */ __pyx_t_10 = ((__pyx_v_val == __pyx_v_val) != 0); if (__pyx_t_10) { /* "pandas/algos.pyx":1279 * # Not NaN * if val == val: * nobs += 1 # <<<<<<<<<<<<<< * skiplist.insert(val) * */ __pyx_v_nobs = (__pyx_v_nobs + 1); /* "pandas/algos.pyx":1280 * if val == val: * nobs += 1 * skiplist.insert(val) # <<<<<<<<<<<<<< * * output[i] = NaN */ __pyx_t_3 = ((struct __pyx_vtabstruct_6pandas_5algos_IndexableSkiplist *)__pyx_v_skiplist->__pyx_vtab)->insert(__pyx_v_skiplist, __pyx_v_val, 0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1280; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L5; } __pyx_L5:; /* "pandas/algos.pyx":1282 * skiplist.insert(val) * * output[i] = NaN # <<<<<<<<<<<<<< * * for i from minp - 1 <= i < N: */ __pyx_t_11 = __pyx_v_i; __pyx_t_8 = -1; if (__pyx_t_11 < 0) { __pyx_t_11 += __pyx_pybuffernd_output.diminfo[0].shape; if (unlikely(__pyx_t_11 < 0)) __pyx_t_8 = 0; } else if (unlikely(__pyx_t_11 >= __pyx_pybuffernd_output.diminfo[0].shape)) __pyx_t_8 = 0; if (unlikely(__pyx_t_8 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_8); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1282; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_double_t *, __pyx_pybuffernd_output.rcbuffer->pybuffer.buf, __pyx_t_11, __pyx_pybuffernd_output.diminfo[0].strides) = __pyx_v_6pandas_5algos_NaN; } /* "pandas/algos.pyx":1284 * output[i] = NaN * * for i from minp - 1 <= i < N: # <<<<<<<<<<<<<< * val = input[i] * */ __pyx_t_12 = __pyx_v_N; for (__pyx_v_i = (__pyx_v_minp - 1); __pyx_v_i < __pyx_t_12; __pyx_v_i++) { /* "pandas/algos.pyx":1285 * * for i from minp - 1 <= i < N: * val = input[i] # <<<<<<<<<<<<<< * * if i > win - 1: */ __pyx_t_13 = __pyx_v_i; __pyx_t_8 = -1; if (__pyx_t_13 < 0) { __pyx_t_13 += __pyx_pybuffernd_input.diminfo[0].shape; if (unlikely(__pyx_t_13 < 0)) __pyx_t_8 = 0; } else if (unlikely(__pyx_t_13 >= __pyx_pybuffernd_input.diminfo[0].shape)) __pyx_t_8 = 0; if (unlikely(__pyx_t_8 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_8); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1285; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_val = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_double_t *, __pyx_pybuffernd_input.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_input.diminfo[0].strides)); /* "pandas/algos.pyx":1287 * val = input[i] * * if i > win - 1: # <<<<<<<<<<<<<< * prev = input[i - win] * */ __pyx_t_10 = ((__pyx_v_i > (__pyx_v_win - 1)) != 0); if (__pyx_t_10) { /* "pandas/algos.pyx":1288 * * if i > win - 1: * prev = input[i - win] # <<<<<<<<<<<<<< * * if prev == prev: */ __pyx_t_14 = (__pyx_v_i - __pyx_v_win); __pyx_t_8 = -1; if (__pyx_t_14 < 0) { __pyx_t_14 += __pyx_pybuffernd_input.diminfo[0].shape; if (unlikely(__pyx_t_14 < 0)) __pyx_t_8 = 0; } else if (unlikely(__pyx_t_14 >= __pyx_pybuffernd_input.diminfo[0].shape)) __pyx_t_8 = 0; if (unlikely(__pyx_t_8 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_8); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1288; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_prev = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_double_t *, __pyx_pybuffernd_input.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_input.diminfo[0].strides)); /* "pandas/algos.pyx":1290 * prev = input[i - win] * * if prev == prev: # <<<<<<<<<<<<<< * skiplist.remove(prev) * nobs -= 1 */ __pyx_t_10 = ((__pyx_v_prev == __pyx_v_prev) != 0); if (__pyx_t_10) { /* "pandas/algos.pyx":1291 * * if prev == prev: * skiplist.remove(prev) # <<<<<<<<<<<<<< * nobs -= 1 * */ __pyx_t_3 = ((struct __pyx_vtabstruct_6pandas_5algos_IndexableSkiplist *)__pyx_v_skiplist->__pyx_vtab)->remove(__pyx_v_skiplist, __pyx_v_prev, 0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1291; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/algos.pyx":1292 * if prev == prev: * skiplist.remove(prev) * nobs -= 1 # <<<<<<<<<<<<<< * * if val == val: */ __pyx_v_nobs = (__pyx_v_nobs - 1); goto __pyx_L9; } __pyx_L9:; goto __pyx_L8; } __pyx_L8:; /* "pandas/algos.pyx":1294 * nobs -= 1 * * if val == val: # <<<<<<<<<<<<<< * nobs += 1 * skiplist.insert(val) */ __pyx_t_10 = ((__pyx_v_val == __pyx_v_val) != 0); if (__pyx_t_10) { /* "pandas/algos.pyx":1295 * * if val == val: * nobs += 1 # <<<<<<<<<<<<<< * skiplist.insert(val) * */ __pyx_v_nobs = (__pyx_v_nobs + 1); /* "pandas/algos.pyx":1296 * if val == val: * nobs += 1 * skiplist.insert(val) # <<<<<<<<<<<<<< * * output[i] = op(skiplist, nobs, minp) */ __pyx_t_3 = ((struct __pyx_vtabstruct_6pandas_5algos_IndexableSkiplist *)__pyx_v_skiplist->__pyx_vtab)->insert(__pyx_v_skiplist, __pyx_v_val, 0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1296; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L10; } __pyx_L10:; /* "pandas/algos.pyx":1298 * skiplist.insert(val) * * output[i] = op(skiplist, nobs, minp) # <<<<<<<<<<<<<< * * return output */ __pyx_t_15 = __pyx_v_i; __pyx_t_8 = -1; if (__pyx_t_15 < 0) { __pyx_t_15 += __pyx_pybuffernd_output.diminfo[0].shape; if (unlikely(__pyx_t_15 < 0)) __pyx_t_8 = 0; } else if (unlikely(__pyx_t_15 >= __pyx_pybuffernd_output.diminfo[0].shape)) __pyx_t_8 = 0; if (unlikely(__pyx_t_8 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_8); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1298; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_double_t *, __pyx_pybuffernd_output.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_output.diminfo[0].strides) = __pyx_v_op(((PyObject *)__pyx_v_skiplist), __pyx_v_nobs, __pyx_v_minp); } /* "pandas/algos.pyx":1300 * output[i] = op(skiplist, nobs, minp) * * return output # <<<<<<<<<<<<<< * * from skiplist cimport * */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_output)); __pyx_r = ((PyObject *)__pyx_v_output); goto __pyx_L0; __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_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_7); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_input.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_output.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos._roll_skiplist_op", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_input.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_output.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_input); __Pyx_XDECREF((PyObject *)__pyx_v_skiplist); __Pyx_XDECREF((PyObject *)__pyx_v_output); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_39roll_median_c(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_39roll_median_c = {__Pyx_NAMESTR("roll_median_c"), (PyCFunction)__pyx_pw_6pandas_5algos_39roll_median_c, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_39roll_median_c(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_arg = 0; int __pyx_v_win; int __pyx_v_minp; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("roll_median_c (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__arg,&__pyx_n_s__win,&__pyx_n_s__minp,0}; PyObject* values[3] = {0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__arg)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__win)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("roll_median_c", 1, 3, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1304; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__minp)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("roll_median_c", 1, 3, 3, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1304; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "roll_median_c") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1304; __pyx_clineno = __LINE__; goto __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_arg = ((PyArrayObject *)values[0]); __pyx_v_win = __Pyx_PyInt_AsInt(values[1]); if (unlikely((__pyx_v_win == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1304; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_minp = __Pyx_PyInt_AsInt(values[2]); if (unlikely((__pyx_v_minp == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1304; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("roll_median_c", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1304; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.roll_median_c", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_arg), __pyx_ptype_5numpy_ndarray, 1, "arg", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1304; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_38roll_median_c(__pyx_self, __pyx_v_arg, __pyx_v_win, __pyx_v_minp); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/algos.pyx":1304 * from skiplist cimport * * * def roll_median_c(ndarray[float64_t] arg, int win, int minp): # <<<<<<<<<<<<<< * cdef double val, res, prev * cdef: */ static PyObject *__pyx_pf_6pandas_5algos_38roll_median_c(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_arg, int __pyx_v_win, int __pyx_v_minp) { double __pyx_v_val; double __pyx_v_res; double __pyx_v_prev; int __pyx_v_ret; skiplist_t *__pyx_v_sl; Py_ssize_t __pyx_v_midpoint; Py_ssize_t __pyx_v_nobs; Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_N; PyArrayObject *__pyx_v_output = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_arg; __Pyx_Buffer __pyx_pybuffer_arg; __Pyx_LocalBuf_ND __pyx_pybuffernd_output; __Pyx_Buffer __pyx_pybuffer_output; 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; PyArrayObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; int __pyx_t_8; long __pyx_t_9; int __pyx_t_10; Py_ssize_t __pyx_t_11; Py_ssize_t __pyx_t_12; Py_ssize_t __pyx_t_13; Py_ssize_t __pyx_t_14; Py_ssize_t __pyx_t_15; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("roll_median_c", 0); __pyx_pybuffer_output.pybuffer.buf = NULL; __pyx_pybuffer_output.refcount = 0; __pyx_pybuffernd_output.data = NULL; __pyx_pybuffernd_output.rcbuffer = &__pyx_pybuffer_output; __pyx_pybuffer_arg.pybuffer.buf = NULL; __pyx_pybuffer_arg.refcount = 0; __pyx_pybuffernd_arg.data = NULL; __pyx_pybuffernd_arg.rcbuffer = &__pyx_pybuffer_arg; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_arg.rcbuffer->pybuffer, (PyObject*)__pyx_v_arg, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1304; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_arg.diminfo[0].strides = __pyx_pybuffernd_arg.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_arg.diminfo[0].shape = __pyx_pybuffernd_arg.rcbuffer->pybuffer.shape[0]; /* "pandas/algos.pyx":1307 * cdef double val, res, prev * cdef: * int ret=0 # <<<<<<<<<<<<<< * skiplist_t *sl * Py_ssize_t midpoint, nobs = 0, i */ __pyx_v_ret = 0; /* "pandas/algos.pyx":1309 * int ret=0 * skiplist_t *sl * Py_ssize_t midpoint, nobs = 0, i # <<<<<<<<<<<<<< * * */ __pyx_v_nobs = 0; /* "pandas/algos.pyx":1312 * * * cdef Py_ssize_t N = len(arg) # <<<<<<<<<<<<<< * cdef ndarray[double_t] output = np.empty(N, dtype=float) * */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_arg)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1312; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_N = __pyx_t_1; /* "pandas/algos.pyx":1313 * * cdef Py_ssize_t N = len(arg) * cdef ndarray[double_t] output = np.empty(N, dtype=float) # <<<<<<<<<<<<<< * * sl = skiplist_init(win) */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1313; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 1313; __pyx_clineno = __LINE__; goto __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_N); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1313; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1313; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1313; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_2)); if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__dtype), ((PyObject *)((PyObject*)(&PyFloat_Type)))) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1313; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_5 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1313; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1313; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_6 = ((PyArrayObject *)__pyx_t_5); { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_output.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_nn___pyx_t_5numpy_double_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { __pyx_v_output = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_output.rcbuffer->pybuffer.buf = NULL; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1313; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } else {__pyx_pybuffernd_output.diminfo[0].strides = __pyx_pybuffernd_output.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_output.diminfo[0].shape = __pyx_pybuffernd_output.rcbuffer->pybuffer.shape[0]; } } __pyx_t_6 = 0; __pyx_v_output = ((PyArrayObject *)__pyx_t_5); __pyx_t_5 = 0; /* "pandas/algos.pyx":1315 * cdef ndarray[double_t] output = np.empty(N, dtype=float) * * sl = skiplist_init(win) # <<<<<<<<<<<<<< * * minp = _check_minp(win, minp, N) */ __pyx_v_sl = skiplist_init(__pyx_v_win); /* "pandas/algos.pyx":1317 * sl = skiplist_init(win) * * minp = _check_minp(win, minp, N) # <<<<<<<<<<<<<< * * for i from 0 <= i < minp - 1: */ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s___check_minp); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1317; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_2 = PyInt_FromLong(__pyx_v_win); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1317; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = PyInt_FromLong(__pyx_v_minp); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1317; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = PyInt_FromSsize_t(__pyx_v_N); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1317; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_7 = PyTuple_New(3); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1317; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_7, 2, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_2 = 0; __pyx_t_4 = 0; __pyx_t_3 = 0; __pyx_t_3 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_7), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1317; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0; __pyx_t_8 = __Pyx_PyInt_AsInt(__pyx_t_3); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1317; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_minp = __pyx_t_8; /* "pandas/algos.pyx":1319 * minp = _check_minp(win, minp, N) * * for i from 0 <= i < minp - 1: # <<<<<<<<<<<<<< * val = arg[i] * */ __pyx_t_9 = (__pyx_v_minp - 1); for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_9; __pyx_v_i++) { /* "pandas/algos.pyx":1320 * * for i from 0 <= i < minp - 1: * val = arg[i] # <<<<<<<<<<<<<< * * # Not NaN */ __pyx_t_1 = __pyx_v_i; __pyx_t_8 = -1; if (__pyx_t_1 < 0) { __pyx_t_1 += __pyx_pybuffernd_arg.diminfo[0].shape; if (unlikely(__pyx_t_1 < 0)) __pyx_t_8 = 0; } else if (unlikely(__pyx_t_1 >= __pyx_pybuffernd_arg.diminfo[0].shape)) __pyx_t_8 = 0; if (unlikely(__pyx_t_8 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_8); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1320; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_val = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_arg.rcbuffer->pybuffer.buf, __pyx_t_1, __pyx_pybuffernd_arg.diminfo[0].strides)); /* "pandas/algos.pyx":1323 * * # Not NaN * if val == val: # <<<<<<<<<<<<<< * nobs += 1 * skiplist_insert(sl, val) */ __pyx_t_10 = ((__pyx_v_val == __pyx_v_val) != 0); if (__pyx_t_10) { /* "pandas/algos.pyx":1324 * # Not NaN * if val == val: * nobs += 1 # <<<<<<<<<<<<<< * skiplist_insert(sl, val) * */ __pyx_v_nobs = (__pyx_v_nobs + 1); /* "pandas/algos.pyx":1325 * if val == val: * nobs += 1 * skiplist_insert(sl, val) # <<<<<<<<<<<<<< * * output[i] = NaN */ skiplist_insert(__pyx_v_sl, __pyx_v_val); goto __pyx_L5; } __pyx_L5:; /* "pandas/algos.pyx":1327 * skiplist_insert(sl, val) * * output[i] = NaN # <<<<<<<<<<<<<< * * for i from minp - 1 <= i < N: */ __pyx_t_11 = __pyx_v_i; __pyx_t_8 = -1; if (__pyx_t_11 < 0) { __pyx_t_11 += __pyx_pybuffernd_output.diminfo[0].shape; if (unlikely(__pyx_t_11 < 0)) __pyx_t_8 = 0; } else if (unlikely(__pyx_t_11 >= __pyx_pybuffernd_output.diminfo[0].shape)) __pyx_t_8 = 0; if (unlikely(__pyx_t_8 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_8); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1327; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_double_t *, __pyx_pybuffernd_output.rcbuffer->pybuffer.buf, __pyx_t_11, __pyx_pybuffernd_output.diminfo[0].strides) = __pyx_v_6pandas_5algos_NaN; } /* "pandas/algos.pyx":1329 * output[i] = NaN * * for i from minp - 1 <= i < N: # <<<<<<<<<<<<<< * val = arg[i] * */ __pyx_t_12 = __pyx_v_N; for (__pyx_v_i = (__pyx_v_minp - 1); __pyx_v_i < __pyx_t_12; __pyx_v_i++) { /* "pandas/algos.pyx":1330 * * for i from minp - 1 <= i < N: * val = arg[i] # <<<<<<<<<<<<<< * * if i > win - 1: */ __pyx_t_13 = __pyx_v_i; __pyx_t_8 = -1; if (__pyx_t_13 < 0) { __pyx_t_13 += __pyx_pybuffernd_arg.diminfo[0].shape; if (unlikely(__pyx_t_13 < 0)) __pyx_t_8 = 0; } else if (unlikely(__pyx_t_13 >= __pyx_pybuffernd_arg.diminfo[0].shape)) __pyx_t_8 = 0; if (unlikely(__pyx_t_8 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_8); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1330; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_val = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_arg.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_arg.diminfo[0].strides)); /* "pandas/algos.pyx":1332 * val = arg[i] * * if i > win - 1: # <<<<<<<<<<<<<< * prev = arg[i - win] * */ __pyx_t_10 = ((__pyx_v_i > (__pyx_v_win - 1)) != 0); if (__pyx_t_10) { /* "pandas/algos.pyx":1333 * * if i > win - 1: * prev = arg[i - win] # <<<<<<<<<<<<<< * * if prev == prev: */ __pyx_t_14 = (__pyx_v_i - __pyx_v_win); __pyx_t_8 = -1; if (__pyx_t_14 < 0) { __pyx_t_14 += __pyx_pybuffernd_arg.diminfo[0].shape; if (unlikely(__pyx_t_14 < 0)) __pyx_t_8 = 0; } else if (unlikely(__pyx_t_14 >= __pyx_pybuffernd_arg.diminfo[0].shape)) __pyx_t_8 = 0; if (unlikely(__pyx_t_8 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_8); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1333; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_prev = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_arg.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_arg.diminfo[0].strides)); /* "pandas/algos.pyx":1335 * prev = arg[i - win] * * if prev == prev: # <<<<<<<<<<<<<< * skiplist_remove(sl, prev) * nobs -= 1 */ __pyx_t_10 = ((__pyx_v_prev == __pyx_v_prev) != 0); if (__pyx_t_10) { /* "pandas/algos.pyx":1336 * * if prev == prev: * skiplist_remove(sl, prev) # <<<<<<<<<<<<<< * nobs -= 1 * */ skiplist_remove(__pyx_v_sl, __pyx_v_prev); /* "pandas/algos.pyx":1337 * if prev == prev: * skiplist_remove(sl, prev) * nobs -= 1 # <<<<<<<<<<<<<< * * if val == val: */ __pyx_v_nobs = (__pyx_v_nobs - 1); goto __pyx_L9; } __pyx_L9:; goto __pyx_L8; } __pyx_L8:; /* "pandas/algos.pyx":1339 * nobs -= 1 * * if val == val: # <<<<<<<<<<<<<< * nobs += 1 * skiplist_insert(sl, val) */ __pyx_t_10 = ((__pyx_v_val == __pyx_v_val) != 0); if (__pyx_t_10) { /* "pandas/algos.pyx":1340 * * if val == val: * nobs += 1 # <<<<<<<<<<<<<< * skiplist_insert(sl, val) * */ __pyx_v_nobs = (__pyx_v_nobs + 1); /* "pandas/algos.pyx":1341 * if val == val: * nobs += 1 * skiplist_insert(sl, val) # <<<<<<<<<<<<<< * * if nobs >= minp: */ skiplist_insert(__pyx_v_sl, __pyx_v_val); goto __pyx_L10; } __pyx_L10:; /* "pandas/algos.pyx":1343 * skiplist_insert(sl, val) * * if nobs >= minp: # <<<<<<<<<<<<<< * midpoint = nobs / 2 * if nobs % 2: */ __pyx_t_10 = ((__pyx_v_nobs >= __pyx_v_minp) != 0); if (__pyx_t_10) { /* "pandas/algos.pyx":1344 * * if nobs >= minp: * midpoint = nobs / 2 # <<<<<<<<<<<<<< * if nobs % 2: * res = skiplist_get(sl, midpoint, &ret) */ __pyx_v_midpoint = __Pyx_div_Py_ssize_t(__pyx_v_nobs, 2); /* "pandas/algos.pyx":1345 * if nobs >= minp: * midpoint = nobs / 2 * if nobs % 2: # <<<<<<<<<<<<<< * res = skiplist_get(sl, midpoint, &ret) * else: */ __pyx_t_10 = (__Pyx_mod_Py_ssize_t(__pyx_v_nobs, 2) != 0); if (__pyx_t_10) { /* "pandas/algos.pyx":1346 * midpoint = nobs / 2 * if nobs % 2: * res = skiplist_get(sl, midpoint, &ret) # <<<<<<<<<<<<<< * else: * res = (skiplist_get(sl, midpoint, &ret) + */ __pyx_v_res = skiplist_get(__pyx_v_sl, __pyx_v_midpoint, (&__pyx_v_ret)); goto __pyx_L12; } /*else*/ { /* "pandas/algos.pyx":1349 * else: * res = (skiplist_get(sl, midpoint, &ret) + * skiplist_get(sl, (midpoint - 1), &ret)) / 2 # <<<<<<<<<<<<<< * else: * res = NaN */ __pyx_v_res = ((skiplist_get(__pyx_v_sl, __pyx_v_midpoint, (&__pyx_v_ret)) + skiplist_get(__pyx_v_sl, (__pyx_v_midpoint - 1), (&__pyx_v_ret))) / 2.0); } __pyx_L12:; goto __pyx_L11; } /*else*/ { /* "pandas/algos.pyx":1351 * skiplist_get(sl, (midpoint - 1), &ret)) / 2 * else: * res = NaN # <<<<<<<<<<<<<< * * output[i] = res */ __pyx_v_res = __pyx_v_6pandas_5algos_NaN; } __pyx_L11:; /* "pandas/algos.pyx":1353 * res = NaN * * output[i] = res # <<<<<<<<<<<<<< * * skiplist_destroy(sl) */ __pyx_t_15 = __pyx_v_i; __pyx_t_8 = -1; if (__pyx_t_15 < 0) { __pyx_t_15 += __pyx_pybuffernd_output.diminfo[0].shape; if (unlikely(__pyx_t_15 < 0)) __pyx_t_8 = 0; } else if (unlikely(__pyx_t_15 >= __pyx_pybuffernd_output.diminfo[0].shape)) __pyx_t_8 = 0; if (unlikely(__pyx_t_8 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_8); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1353; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_double_t *, __pyx_pybuffernd_output.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_output.diminfo[0].strides) = __pyx_v_res; } /* "pandas/algos.pyx":1355 * output[i] = res * * skiplist_destroy(sl) # <<<<<<<<<<<<<< * * return output */ skiplist_destroy(__pyx_v_sl); /* "pandas/algos.pyx":1357 * skiplist_destroy(sl) * * return output # <<<<<<<<<<<<<< * * def roll_median_cython(ndarray input, int win, int minp): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_output)); __pyx_r = ((PyObject *)__pyx_v_output); goto __pyx_L0; __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_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_7); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_arg.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_output.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.roll_median_c", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_arg.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_output.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_output); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_41roll_median_cython(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6pandas_5algos_40roll_median_cython[] = "\n O(N log(window)) implementation using skip list\n "; static PyMethodDef __pyx_mdef_6pandas_5algos_41roll_median_cython = {__Pyx_NAMESTR("roll_median_cython"), (PyCFunction)__pyx_pw_6pandas_5algos_41roll_median_cython, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_5algos_40roll_median_cython)}; static PyObject *__pyx_pw_6pandas_5algos_41roll_median_cython(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_input = 0; int __pyx_v_win; int __pyx_v_minp; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("roll_median_cython (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__input,&__pyx_n_s__win,&__pyx_n_s__minp,0}; PyObject* values[3] = {0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__input)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__win)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("roll_median_cython", 1, 3, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1359; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__minp)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("roll_median_cython", 1, 3, 3, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1359; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "roll_median_cython") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1359; __pyx_clineno = __LINE__; goto __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_input = ((PyArrayObject *)values[0]); __pyx_v_win = __Pyx_PyInt_AsInt(values[1]); if (unlikely((__pyx_v_win == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1359; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_minp = __Pyx_PyInt_AsInt(values[2]); if (unlikely((__pyx_v_minp == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1359; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("roll_median_cython", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1359; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.roll_median_cython", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_input), __pyx_ptype_5numpy_ndarray, 1, "input", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1359; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_40roll_median_cython(__pyx_self, __pyx_v_input, __pyx_v_win, __pyx_v_minp); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/algos.pyx":1359 * return output * * def roll_median_cython(ndarray input, int win, int minp): # <<<<<<<<<<<<<< * ''' * O(N log(window)) implementation using skip list */ static PyObject *__pyx_pf_6pandas_5algos_40roll_median_cython(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_input, int __pyx_v_win, int __pyx_v_minp) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("roll_median_cython", 0); /* "pandas/algos.pyx":1363 * O(N log(window)) implementation using skip list * ''' * return _roll_skiplist_op(input, win, minp, _get_median) # <<<<<<<<<<<<<< * * # Unfortunately had to resort to some hackery here, would like for */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_6pandas_5algos__roll_skiplist_op(__pyx_v_input, __pyx_v_win, __pyx_v_minp, __pyx_f_6pandas_5algos__get_median); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1363; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas.algos.roll_median_cython", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/algos.pyx":1368 * # Cython to be able to get this right. * * cdef double_t _get_median(object sl, int nobs, int minp): # <<<<<<<<<<<<<< * cdef Py_ssize_t midpoint * cdef IndexableSkiplist skiplist = sl */ static __pyx_t_5numpy_double_t __pyx_f_6pandas_5algos__get_median(PyObject *__pyx_v_sl, int __pyx_v_nobs, int __pyx_v_minp) { Py_ssize_t __pyx_v_midpoint; struct __pyx_obj_6pandas_5algos_IndexableSkiplist *__pyx_v_skiplist = 0; __pyx_t_5numpy_double_t __pyx_r; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; __pyx_t_5numpy_double_t __pyx_t_3; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_get_median", 0); /* "pandas/algos.pyx":1370 * cdef double_t _get_median(object sl, int nobs, int minp): * cdef Py_ssize_t midpoint * cdef IndexableSkiplist skiplist = sl # <<<<<<<<<<<<<< * if nobs >= minp: * midpoint = nobs / 2 */ __Pyx_INCREF(((PyObject *)((struct __pyx_obj_6pandas_5algos_IndexableSkiplist *)__pyx_v_sl))); __pyx_v_skiplist = ((struct __pyx_obj_6pandas_5algos_IndexableSkiplist *)__pyx_v_sl); /* "pandas/algos.pyx":1371 * cdef Py_ssize_t midpoint * cdef IndexableSkiplist skiplist = sl * if nobs >= minp: # <<<<<<<<<<<<<< * midpoint = nobs / 2 * if nobs % 2: */ __pyx_t_1 = ((__pyx_v_nobs >= __pyx_v_minp) != 0); if (__pyx_t_1) { /* "pandas/algos.pyx":1372 * cdef IndexableSkiplist skiplist = sl * if nobs >= minp: * midpoint = nobs / 2 # <<<<<<<<<<<<<< * if nobs % 2: * return skiplist.get(midpoint) */ __pyx_v_midpoint = __Pyx_div_long(__pyx_v_nobs, 2); /* "pandas/algos.pyx":1373 * if nobs >= minp: * midpoint = nobs / 2 * if nobs % 2: # <<<<<<<<<<<<<< * return skiplist.get(midpoint) * else: */ __pyx_t_1 = (__Pyx_mod_long(__pyx_v_nobs, 2) != 0); if (__pyx_t_1) { /* "pandas/algos.pyx":1374 * midpoint = nobs / 2 * if nobs % 2: * return skiplist.get(midpoint) # <<<<<<<<<<<<<< * else: * return (skiplist.get(midpoint) + */ __pyx_t_2 = ((struct __pyx_vtabstruct_6pandas_5algos_IndexableSkiplist *)__pyx_v_skiplist->__pyx_vtab)->get(__pyx_v_skiplist, __pyx_v_midpoint, 0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1374; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __pyx_PyFloat_AsDouble(__pyx_t_2); if (unlikely((__pyx_t_3 == (npy_double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1374; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_3; goto __pyx_L0; goto __pyx_L4; } /*else*/ { /* "pandas/algos.pyx":1376 * return skiplist.get(midpoint) * else: * return (skiplist.get(midpoint) + # <<<<<<<<<<<<<< * skiplist.get(midpoint - 1)) / 2 * else: */ __pyx_t_2 = ((struct __pyx_vtabstruct_6pandas_5algos_IndexableSkiplist *)__pyx_v_skiplist->__pyx_vtab)->get(__pyx_v_skiplist, __pyx_v_midpoint, 0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1376; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); /* "pandas/algos.pyx":1377 * else: * return (skiplist.get(midpoint) + * skiplist.get(midpoint - 1)) / 2 # <<<<<<<<<<<<<< * else: * return NaN */ __pyx_t_4 = ((struct __pyx_vtabstruct_6pandas_5algos_IndexableSkiplist *)__pyx_v_skiplist->__pyx_vtab)->get(__pyx_v_skiplist, (__pyx_v_midpoint - 1), 0); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1377; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = PyNumber_Add(__pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1376; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyNumber_Divide(__pyx_t_5, __pyx_int_2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1377; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_3 = __pyx_PyFloat_AsDouble(__pyx_t_4); if (unlikely((__pyx_t_3 == (npy_double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1377; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_r = __pyx_t_3; goto __pyx_L0; } __pyx_L4:; goto __pyx_L3; } /*else*/ { /* "pandas/algos.pyx":1379 * skiplist.get(midpoint - 1)) / 2 * else: * return NaN # <<<<<<<<<<<<<< * * #---------------------------------------------------------------------- */ __pyx_r = __pyx_v_6pandas_5algos_NaN; goto __pyx_L0; } __pyx_L3:; __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_WriteUnraisable("pandas.algos._get_median", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_skiplist); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_43roll_max2(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6pandas_5algos_42roll_max2[] = "Moving max of 1d array of dtype=float64 along axis=0 ignoring NaNs."; static PyMethodDef __pyx_mdef_6pandas_5algos_43roll_max2 = {__Pyx_NAMESTR("roll_max2"), (PyCFunction)__pyx_pw_6pandas_5algos_43roll_max2, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_5algos_42roll_max2)}; static PyObject *__pyx_pw_6pandas_5algos_43roll_max2(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_a = 0; int __pyx_v_window; int __pyx_v_minp; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("roll_max2 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__a,&__pyx_n_s__window,&__pyx_n_s__minp,0}; PyObject* values[3] = {0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__a)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__window)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("roll_max2", 1, 3, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1395; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__minp)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("roll_max2", 1, 3, 3, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1395; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "roll_max2") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1395; __pyx_clineno = __LINE__; goto __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_a = ((PyArrayObject *)values[0]); __pyx_v_window = __Pyx_PyInt_AsInt(values[1]); if (unlikely((__pyx_v_window == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1395; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_minp = __Pyx_PyInt_AsInt(values[2]); if (unlikely((__pyx_v_minp == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1395; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("roll_max2", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1395; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.roll_max2", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_a), __pyx_ptype_5numpy_ndarray, 1, "a", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1395; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_42roll_max2(__pyx_self, __pyx_v_a, __pyx_v_window, __pyx_v_minp); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/algos.pyx":1395 * @cython.boundscheck(False) * @cython.wraparound(False) * def roll_max2(ndarray[float64_t] a, int window, int minp): # <<<<<<<<<<<<<< * "Moving max of 1d array of dtype=float64 along axis=0 ignoring NaNs." * cdef np.float64_t ai, aold */ static PyObject *__pyx_pf_6pandas_5algos_42roll_max2(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_a, int __pyx_v_window, int __pyx_v_minp) { __pyx_t_5numpy_float64_t __pyx_v_ai; __pyx_t_5numpy_float64_t __pyx_v_aold; Py_ssize_t __pyx_v_count; struct __pyx_t_6pandas_5algos_pairs *__pyx_v_ring; struct __pyx_t_6pandas_5algos_pairs *__pyx_v_minpair; struct __pyx_t_6pandas_5algos_pairs *__pyx_v_end; struct __pyx_t_6pandas_5algos_pairs *__pyx_v_last; Py_ssize_t __pyx_v_i0; npy_intp *__pyx_v_dim; Py_ssize_t __pyx_v_n0; npy_intp *__pyx_v_dims; PyArrayObject *__pyx_v_y = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_a; __Pyx_Buffer __pyx_pybuffer_a; __Pyx_LocalBuf_ND __pyx_pybuffernd_y; __Pyx_Buffer __pyx_pybuffer_y; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations npy_intp __pyx_t_1[1]; PyObject *__pyx_t_2 = NULL; PyArrayObject *__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; int __pyx_t_9; Py_ssize_t __pyx_t_10; Py_ssize_t __pyx_t_11; long __pyx_t_12; Py_ssize_t __pyx_t_13; Py_ssize_t __pyx_t_14; double __pyx_t_15; Py_ssize_t __pyx_t_16; Py_ssize_t __pyx_t_17; long __pyx_t_18; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("roll_max2", 0); __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_a.pybuffer.buf = NULL; __pyx_pybuffer_a.refcount = 0; __pyx_pybuffernd_a.data = NULL; __pyx_pybuffernd_a.rcbuffer = &__pyx_pybuffer_a; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_a.rcbuffer->pybuffer, (PyObject*)__pyx_v_a, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1395; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_a.diminfo[0].strides = __pyx_pybuffernd_a.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_a.diminfo[0].shape = __pyx_pybuffernd_a.rcbuffer->pybuffer.shape[0]; /* "pandas/algos.pyx":1405 * cdef Py_ssize_t i0 * cdef np.npy_intp *dim * dim = PyArray_DIMS(a) # <<<<<<<<<<<<<< * cdef Py_ssize_t n0 = dim[0] * cdef np.npy_intp *dims = [n0] */ __pyx_v_dim = PyArray_DIMS(((PyArrayObject *)__pyx_v_a)); /* "pandas/algos.pyx":1406 * cdef np.npy_intp *dim * dim = PyArray_DIMS(a) * cdef Py_ssize_t n0 = dim[0] # <<<<<<<<<<<<<< * cdef np.npy_intp *dims = [n0] * cdef np.ndarray[np.float64_t, ndim=1] y = PyArray_EMPTY(1, dims, */ __pyx_v_n0 = (__pyx_v_dim[0]); /* "pandas/algos.pyx":1407 * dim = PyArray_DIMS(a) * cdef Py_ssize_t n0 = dim[0] * cdef np.npy_intp *dims = [n0] # <<<<<<<<<<<<<< * cdef np.ndarray[np.float64_t, ndim=1] y = PyArray_EMPTY(1, dims, * NPY_float64, 0) */ __pyx_t_1[0] = __pyx_v_n0; __pyx_v_dims = __pyx_t_1; /* "pandas/algos.pyx":1409 * cdef np.npy_intp *dims = [n0] * cdef np.ndarray[np.float64_t, ndim=1] y = PyArray_EMPTY(1, dims, * NPY_float64, 0) # <<<<<<<<<<<<<< * * if window < 1: */ __pyx_t_2 = PyArray_EMPTY(1, __pyx_v_dims, NPY_FLOAT64, 0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1408; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 1408; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_3 = ((PyArrayObject *)__pyx_t_2); { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_y.rcbuffer->pybuffer, (PyObject*)__pyx_t_3, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { __pyx_v_y = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_y.rcbuffer->pybuffer.buf = NULL; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1408; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } else {__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_t_3 = 0; __pyx_v_y = ((PyArrayObject *)__pyx_t_2); __pyx_t_2 = 0; /* "pandas/algos.pyx":1411 * NPY_float64, 0) * * if window < 1: # <<<<<<<<<<<<<< * raise ValueError('Invalid window size %d' * % (window)) */ __pyx_t_4 = ((__pyx_v_window < 1) != 0); if (__pyx_t_4) { /* "pandas/algos.pyx":1413 * if window < 1: * raise ValueError('Invalid window size %d' * % (window)) # <<<<<<<<<<<<<< * * if minp > window: */ __pyx_t_2 = PyInt_FromLong(__pyx_v_window); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1413; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_40), __pyx_t_2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1413; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_5)); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1412; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_t_5)); __Pyx_GIVEREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; __pyx_t_5 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1412; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __Pyx_Raise(__pyx_t_5, 0, 0, 0); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1412; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L3; } __pyx_L3:; /* "pandas/algos.pyx":1415 * % (window)) * * if minp > window: # <<<<<<<<<<<<<< * raise ValueError('Invalid min_periods size %d greater than window %d' * % (minp, window)) */ __pyx_t_4 = ((__pyx_v_minp > __pyx_v_window) != 0); if (__pyx_t_4) { /* "pandas/algos.pyx":1417 * if minp > window: * raise ValueError('Invalid min_periods size %d greater than window %d' * % (minp, window)) # <<<<<<<<<<<<<< * * minp = _check_minp(window, minp, n0) */ __pyx_t_5 = PyInt_FromLong(__pyx_v_minp); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1417; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_2 = PyInt_FromLong(__pyx_v_window); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1417; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1417; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_5 = 0; __pyx_t_2 = 0; __pyx_t_2 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_41), ((PyObject *)__pyx_t_6)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1417; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_2)); __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0; __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1416; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_t_2)); __Pyx_GIVEREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1416; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0; __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1416; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L4; } __pyx_L4:; /* "pandas/algos.pyx":1419 * % (minp, window)) * * minp = _check_minp(window, minp, n0) # <<<<<<<<<<<<<< * * window = min(window, n0) */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s___check_minp); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1419; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_6 = PyInt_FromLong(__pyx_v_window); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1419; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_5 = PyInt_FromLong(__pyx_v_minp); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1419; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_7 = PyInt_FromSsize_t(__pyx_v_n0); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1419; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_t_8 = PyTuple_New(3); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1419; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_8, 2, __pyx_t_7); __Pyx_GIVEREF(__pyx_t_7); __pyx_t_6 = 0; __pyx_t_5 = 0; __pyx_t_7 = 0; __pyx_t_7 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_8), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1419; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0; __pyx_t_9 = __Pyx_PyInt_AsInt(__pyx_t_7); if (unlikely((__pyx_t_9 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1419; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_v_minp = __pyx_t_9; /* "pandas/algos.pyx":1421 * minp = _check_minp(window, minp, n0) * * window = min(window, n0) # <<<<<<<<<<<<<< * * ring = stdlib.malloc(window * sizeof(pairs)) */ __pyx_t_10 = __pyx_v_n0; __pyx_t_9 = __pyx_v_window; if (((__pyx_t_10 < __pyx_t_9) != 0)) { __pyx_t_11 = __pyx_t_10; } else { __pyx_t_11 = __pyx_t_9; } __pyx_v_window = __pyx_t_11; /* "pandas/algos.pyx":1423 * window = min(window, n0) * * ring = stdlib.malloc(window * sizeof(pairs)) # <<<<<<<<<<<<<< * end = ring + window * last = ring */ __pyx_v_ring = ((struct __pyx_t_6pandas_5algos_pairs *)malloc((__pyx_v_window * (sizeof(struct __pyx_t_6pandas_5algos_pairs))))); /* "pandas/algos.pyx":1424 * * ring = stdlib.malloc(window * sizeof(pairs)) * end = ring + window # <<<<<<<<<<<<<< * last = ring * */ __pyx_v_end = (__pyx_v_ring + __pyx_v_window); /* "pandas/algos.pyx":1425 * ring = stdlib.malloc(window * sizeof(pairs)) * end = ring + window * last = ring # <<<<<<<<<<<<<< * * minpair = ring */ __pyx_v_last = __pyx_v_ring; /* "pandas/algos.pyx":1427 * last = ring * * minpair = ring # <<<<<<<<<<<<<< * ai = a[0] * if ai == ai: */ __pyx_v_minpair = __pyx_v_ring; /* "pandas/algos.pyx":1428 * * minpair = ring * ai = a[0] # <<<<<<<<<<<<<< * if ai == ai: * minpair.value = ai */ __pyx_t_12 = 0; __pyx_v_ai = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_a.rcbuffer->pybuffer.buf, __pyx_t_12, __pyx_pybuffernd_a.diminfo[0].strides)); /* "pandas/algos.pyx":1429 * minpair = ring * ai = a[0] * if ai == ai: # <<<<<<<<<<<<<< * minpair.value = ai * else: */ __pyx_t_4 = ((__pyx_v_ai == __pyx_v_ai) != 0); if (__pyx_t_4) { /* "pandas/algos.pyx":1430 * ai = a[0] * if ai == ai: * minpair.value = ai # <<<<<<<<<<<<<< * else: * minpair.value = MINfloat64 */ __pyx_v_minpair->value = __pyx_v_ai; goto __pyx_L5; } /*else*/ { /* "pandas/algos.pyx":1432 * minpair.value = ai * else: * minpair.value = MINfloat64 # <<<<<<<<<<<<<< * minpair.death = window * */ __pyx_v_minpair->value = __pyx_v_6pandas_5algos_MINfloat64; } __pyx_L5:; /* "pandas/algos.pyx":1433 * else: * minpair.value = MINfloat64 * minpair.death = window # <<<<<<<<<<<<<< * * count = 0 */ __pyx_v_minpair->death = __pyx_v_window; /* "pandas/algos.pyx":1435 * minpair.death = window * * count = 0 # <<<<<<<<<<<<<< * for i0 in range(n0): * ai = a[i0] */ __pyx_v_count = 0; /* "pandas/algos.pyx":1436 * * count = 0 * for i0 in range(n0): # <<<<<<<<<<<<<< * ai = a[i0] * if ai == ai: */ __pyx_t_11 = __pyx_v_n0; for (__pyx_t_10 = 0; __pyx_t_10 < __pyx_t_11; __pyx_t_10+=1) { __pyx_v_i0 = __pyx_t_10; /* "pandas/algos.pyx":1437 * count = 0 * for i0 in range(n0): * ai = a[i0] # <<<<<<<<<<<<<< * if ai == ai: * count += 1 */ __pyx_t_13 = __pyx_v_i0; __pyx_v_ai = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_a.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_a.diminfo[0].strides)); /* "pandas/algos.pyx":1438 * for i0 in range(n0): * ai = a[i0] * if ai == ai: # <<<<<<<<<<<<<< * count += 1 * else: */ __pyx_t_4 = ((__pyx_v_ai == __pyx_v_ai) != 0); if (__pyx_t_4) { /* "pandas/algos.pyx":1439 * ai = a[i0] * if ai == ai: * count += 1 # <<<<<<<<<<<<<< * else: * ai = MINfloat64 */ __pyx_v_count = (__pyx_v_count + 1); goto __pyx_L8; } /*else*/ { /* "pandas/algos.pyx":1441 * count += 1 * else: * ai = MINfloat64 # <<<<<<<<<<<<<< * if i0 >= window: * aold = a[i0 - window] */ __pyx_v_ai = __pyx_v_6pandas_5algos_MINfloat64; } __pyx_L8:; /* "pandas/algos.pyx":1442 * else: * ai = MINfloat64 * if i0 >= window: # <<<<<<<<<<<<<< * aold = a[i0 - window] * if aold == aold: */ __pyx_t_4 = ((__pyx_v_i0 >= __pyx_v_window) != 0); if (__pyx_t_4) { /* "pandas/algos.pyx":1443 * ai = MINfloat64 * if i0 >= window: * aold = a[i0 - window] # <<<<<<<<<<<<<< * if aold == aold: * count -= 1 */ __pyx_t_14 = (__pyx_v_i0 - __pyx_v_window); __pyx_v_aold = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_a.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_a.diminfo[0].strides)); /* "pandas/algos.pyx":1444 * if i0 >= window: * aold = a[i0 - window] * if aold == aold: # <<<<<<<<<<<<<< * count -= 1 * if minpair.death == i0: */ __pyx_t_4 = ((__pyx_v_aold == __pyx_v_aold) != 0); if (__pyx_t_4) { /* "pandas/algos.pyx":1445 * aold = a[i0 - window] * if aold == aold: * count -= 1 # <<<<<<<<<<<<<< * if minpair.death == i0: * minpair += 1 */ __pyx_v_count = (__pyx_v_count - 1); goto __pyx_L10; } __pyx_L10:; goto __pyx_L9; } __pyx_L9:; /* "pandas/algos.pyx":1446 * if aold == aold: * count -= 1 * if minpair.death == i0: # <<<<<<<<<<<<<< * minpair += 1 * if minpair >= end: */ __pyx_t_4 = ((__pyx_v_minpair->death == __pyx_v_i0) != 0); if (__pyx_t_4) { /* "pandas/algos.pyx":1447 * count -= 1 * if minpair.death == i0: * minpair += 1 # <<<<<<<<<<<<<< * if minpair >= end: * minpair = ring */ __pyx_v_minpair = (__pyx_v_minpair + 1); /* "pandas/algos.pyx":1448 * if minpair.death == i0: * minpair += 1 * if minpair >= end: # <<<<<<<<<<<<<< * minpair = ring * if ai >= minpair.value: */ __pyx_t_4 = ((__pyx_v_minpair >= __pyx_v_end) != 0); if (__pyx_t_4) { /* "pandas/algos.pyx":1449 * minpair += 1 * if minpair >= end: * minpair = ring # <<<<<<<<<<<<<< * if ai >= minpair.value: * minpair.value = ai */ __pyx_v_minpair = __pyx_v_ring; goto __pyx_L12; } __pyx_L12:; goto __pyx_L11; } __pyx_L11:; /* "pandas/algos.pyx":1450 * if minpair >= end: * minpair = ring * if ai >= minpair.value: # <<<<<<<<<<<<<< * minpair.value = ai * minpair.death = i0 + window */ __pyx_t_4 = ((__pyx_v_ai >= __pyx_v_minpair->value) != 0); if (__pyx_t_4) { /* "pandas/algos.pyx":1451 * minpair = ring * if ai >= minpair.value: * minpair.value = ai # <<<<<<<<<<<<<< * minpair.death = i0 + window * last = minpair */ __pyx_v_minpair->value = __pyx_v_ai; /* "pandas/algos.pyx":1452 * if ai >= minpair.value: * minpair.value = ai * minpair.death = i0 + window # <<<<<<<<<<<<<< * last = minpair * else: */ __pyx_v_minpair->death = (__pyx_v_i0 + __pyx_v_window); /* "pandas/algos.pyx":1453 * minpair.value = ai * minpair.death = i0 + window * last = minpair # <<<<<<<<<<<<<< * else: * while last.value <= ai: */ __pyx_v_last = __pyx_v_minpair; goto __pyx_L13; } /*else*/ { /* "pandas/algos.pyx":1455 * last = minpair * else: * while last.value <= ai: # <<<<<<<<<<<<<< * if last == ring: * last = end */ while (1) { __pyx_t_4 = ((__pyx_v_last->value <= __pyx_v_ai) != 0); if (!__pyx_t_4) break; /* "pandas/algos.pyx":1456 * else: * while last.value <= ai: * if last == ring: # <<<<<<<<<<<<<< * last = end * last -= 1 */ __pyx_t_4 = ((__pyx_v_last == __pyx_v_ring) != 0); if (__pyx_t_4) { /* "pandas/algos.pyx":1457 * while last.value <= ai: * if last == ring: * last = end # <<<<<<<<<<<<<< * last -= 1 * last += 1 */ __pyx_v_last = __pyx_v_end; goto __pyx_L16; } __pyx_L16:; /* "pandas/algos.pyx":1458 * if last == ring: * last = end * last -= 1 # <<<<<<<<<<<<<< * last += 1 * if last == end: */ __pyx_v_last = (__pyx_v_last - 1); } /* "pandas/algos.pyx":1459 * last = end * last -= 1 * last += 1 # <<<<<<<<<<<<<< * if last == end: * last = ring */ __pyx_v_last = (__pyx_v_last + 1); /* "pandas/algos.pyx":1460 * last -= 1 * last += 1 * if last == end: # <<<<<<<<<<<<<< * last = ring * last.value = ai */ __pyx_t_4 = ((__pyx_v_last == __pyx_v_end) != 0); if (__pyx_t_4) { /* "pandas/algos.pyx":1461 * last += 1 * if last == end: * last = ring # <<<<<<<<<<<<<< * last.value = ai * last.death = i0 + window */ __pyx_v_last = __pyx_v_ring; goto __pyx_L17; } __pyx_L17:; /* "pandas/algos.pyx":1462 * if last == end: * last = ring * last.value = ai # <<<<<<<<<<<<<< * last.death = i0 + window * if count >= minp: */ __pyx_v_last->value = __pyx_v_ai; /* "pandas/algos.pyx":1463 * last = ring * last.value = ai * last.death = i0 + window # <<<<<<<<<<<<<< * if count >= minp: * y[i0] = minpair.value */ __pyx_v_last->death = (__pyx_v_i0 + __pyx_v_window); } __pyx_L13:; /* "pandas/algos.pyx":1464 * last.value = ai * last.death = i0 + window * if count >= minp: # <<<<<<<<<<<<<< * y[i0] = minpair.value * else: */ __pyx_t_4 = ((__pyx_v_count >= __pyx_v_minp) != 0); if (__pyx_t_4) { /* "pandas/algos.pyx":1465 * last.death = i0 + window * if count >= minp: * y[i0] = minpair.value # <<<<<<<<<<<<<< * else: * y[i0] = NaN */ __pyx_t_15 = __pyx_v_minpair->value; __pyx_t_16 = __pyx_v_i0; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_y.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_y.diminfo[0].strides) = __pyx_t_15; goto __pyx_L18; } /*else*/ { /* "pandas/algos.pyx":1467 * y[i0] = minpair.value * else: * y[i0] = NaN # <<<<<<<<<<<<<< * * for i0 in range(minp - 1): */ __pyx_t_17 = __pyx_v_i0; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_y.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_y.diminfo[0].strides) = __pyx_v_6pandas_5algos_NaN; } __pyx_L18:; } /* "pandas/algos.pyx":1469 * y[i0] = NaN * * for i0 in range(minp - 1): # <<<<<<<<<<<<<< * y[i0] = NaN * */ __pyx_t_18 = (__pyx_v_minp - 1); for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_18; __pyx_t_11+=1) { __pyx_v_i0 = __pyx_t_11; /* "pandas/algos.pyx":1470 * * for i0 in range(minp - 1): * y[i0] = NaN # <<<<<<<<<<<<<< * * stdlib.free(ring) */ __pyx_t_10 = __pyx_v_i0; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_y.rcbuffer->pybuffer.buf, __pyx_t_10, __pyx_pybuffernd_y.diminfo[0].strides) = __pyx_v_6pandas_5algos_NaN; } /* "pandas/algos.pyx":1472 * y[i0] = NaN * * stdlib.free(ring) # <<<<<<<<<<<<<< * return y * */ free(__pyx_v_ring); /* "pandas/algos.pyx":1473 * * stdlib.free(ring) * return y # <<<<<<<<<<<<<< * * def roll_max(ndarray input, int win, int minp): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_y)); __pyx_r = ((PyObject *)__pyx_v_y); goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __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_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_a.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.roll_max2", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_a.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_y); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_45roll_max(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6pandas_5algos_44roll_max[] = "\n O(N log(window)) implementation using skip list\n "; static PyMethodDef __pyx_mdef_6pandas_5algos_45roll_max = {__Pyx_NAMESTR("roll_max"), (PyCFunction)__pyx_pw_6pandas_5algos_45roll_max, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_5algos_44roll_max)}; static PyObject *__pyx_pw_6pandas_5algos_45roll_max(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_input = 0; int __pyx_v_win; int __pyx_v_minp; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("roll_max (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__input,&__pyx_n_s__win,&__pyx_n_s__minp,0}; PyObject* values[3] = {0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__input)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__win)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("roll_max", 1, 3, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1475; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__minp)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("roll_max", 1, 3, 3, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1475; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "roll_max") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1475; __pyx_clineno = __LINE__; goto __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_input = ((PyArrayObject *)values[0]); __pyx_v_win = __Pyx_PyInt_AsInt(values[1]); if (unlikely((__pyx_v_win == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1475; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_minp = __Pyx_PyInt_AsInt(values[2]); if (unlikely((__pyx_v_minp == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1475; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("roll_max", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1475; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.roll_max", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_input), __pyx_ptype_5numpy_ndarray, 1, "input", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1475; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_44roll_max(__pyx_self, __pyx_v_input, __pyx_v_win, __pyx_v_minp); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/algos.pyx":1475 * return y * * def roll_max(ndarray input, int win, int minp): # <<<<<<<<<<<<<< * ''' * O(N log(window)) implementation using skip list */ static PyObject *__pyx_pf_6pandas_5algos_44roll_max(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_input, int __pyx_v_win, int __pyx_v_minp) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("roll_max", 0); /* "pandas/algos.pyx":1479 * O(N log(window)) implementation using skip list * ''' * return _roll_skiplist_op(input, win, minp, _get_max) # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_6pandas_5algos__roll_skiplist_op(__pyx_v_input, __pyx_v_win, __pyx_v_minp, __pyx_f_6pandas_5algos__get_max); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1479; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas.algos.roll_max", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/algos.pyx":1482 * * * cdef double_t _get_max(object skiplist, int nobs, int minp): # <<<<<<<<<<<<<< * if nobs >= minp: * return skiplist.get(nobs - 1) */ static __pyx_t_5numpy_double_t __pyx_f_6pandas_5algos__get_max(PyObject *__pyx_v_skiplist, int __pyx_v_nobs, int __pyx_v_minp) { __pyx_t_5numpy_double_t __pyx_r; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; __pyx_t_5numpy_double_t __pyx_t_5; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_get_max", 0); /* "pandas/algos.pyx":1483 * * cdef double_t _get_max(object skiplist, int nobs, int minp): * if nobs >= minp: # <<<<<<<<<<<<<< * return skiplist.get(nobs - 1) * else: */ __pyx_t_1 = ((__pyx_v_nobs >= __pyx_v_minp) != 0); if (__pyx_t_1) { /* "pandas/algos.pyx":1484 * cdef double_t _get_max(object skiplist, int nobs, int minp): * if nobs >= minp: * return skiplist.get(nobs - 1) # <<<<<<<<<<<<<< * else: * return NaN */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_skiplist, __pyx_n_s__get); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1484; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyInt_FromLong((__pyx_v_nobs - 1)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1484; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1484; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1484; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __pyx_t_5 = __pyx_PyFloat_AsDouble(__pyx_t_3); if (unlikely((__pyx_t_5 == (npy_double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1484; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_r = __pyx_t_5; goto __pyx_L0; goto __pyx_L3; } /*else*/ { /* "pandas/algos.pyx":1486 * return skiplist.get(nobs - 1) * else: * return NaN # <<<<<<<<<<<<<< * * def roll_min(ndarray input, int win, int minp): */ __pyx_r = __pyx_v_6pandas_5algos_NaN; goto __pyx_L0; } __pyx_L3:; __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_WriteUnraisable("pandas.algos._get_max", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_47roll_min(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6pandas_5algos_46roll_min[] = "\n O(N log(window)) implementation using skip list\n "; static PyMethodDef __pyx_mdef_6pandas_5algos_47roll_min = {__Pyx_NAMESTR("roll_min"), (PyCFunction)__pyx_pw_6pandas_5algos_47roll_min, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_5algos_46roll_min)}; static PyObject *__pyx_pw_6pandas_5algos_47roll_min(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_input = 0; int __pyx_v_win; int __pyx_v_minp; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("roll_min (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__input,&__pyx_n_s__win,&__pyx_n_s__minp,0}; PyObject* values[3] = {0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__input)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__win)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("roll_min", 1, 3, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1488; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__minp)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("roll_min", 1, 3, 3, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1488; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "roll_min") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1488; __pyx_clineno = __LINE__; goto __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_input = ((PyArrayObject *)values[0]); __pyx_v_win = __Pyx_PyInt_AsInt(values[1]); if (unlikely((__pyx_v_win == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1488; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_minp = __Pyx_PyInt_AsInt(values[2]); if (unlikely((__pyx_v_minp == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1488; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("roll_min", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1488; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.roll_min", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_input), __pyx_ptype_5numpy_ndarray, 1, "input", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1488; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_46roll_min(__pyx_self, __pyx_v_input, __pyx_v_win, __pyx_v_minp); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/algos.pyx":1488 * return NaN * * def roll_min(ndarray input, int win, int minp): # <<<<<<<<<<<<<< * ''' * O(N log(window)) implementation using skip list */ static PyObject *__pyx_pf_6pandas_5algos_46roll_min(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_input, int __pyx_v_win, int __pyx_v_minp) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("roll_min", 0); /* "pandas/algos.pyx":1492 * O(N log(window)) implementation using skip list * ''' * return _roll_skiplist_op(input, win, minp, _get_min) # <<<<<<<<<<<<<< * * @cython.boundscheck(False) */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_6pandas_5algos__roll_skiplist_op(__pyx_v_input, __pyx_v_win, __pyx_v_minp, __pyx_f_6pandas_5algos__get_min); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1492; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas.algos.roll_min", __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_5algos_49roll_min2(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6pandas_5algos_48roll_min2[] = "Moving min of 1d array of dtype=float64 along axis=0 ignoring NaNs."; static PyMethodDef __pyx_mdef_6pandas_5algos_49roll_min2 = {__Pyx_NAMESTR("roll_min2"), (PyCFunction)__pyx_pw_6pandas_5algos_49roll_min2, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_5algos_48roll_min2)}; static PyObject *__pyx_pw_6pandas_5algos_49roll_min2(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_a = 0; int __pyx_v_window; int __pyx_v_minp; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("roll_min2 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__a,&__pyx_n_s__window,&__pyx_n_s__minp,0}; PyObject* values[3] = {0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__a)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__window)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("roll_min2", 1, 3, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1496; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__minp)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("roll_min2", 1, 3, 3, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1496; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "roll_min2") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1496; __pyx_clineno = __LINE__; goto __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_a = ((PyArrayObject *)values[0]); __pyx_v_window = __Pyx_PyInt_AsInt(values[1]); if (unlikely((__pyx_v_window == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1496; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_minp = __Pyx_PyInt_AsInt(values[2]); if (unlikely((__pyx_v_minp == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1496; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("roll_min2", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1496; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.roll_min2", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_a), __pyx_ptype_5numpy_ndarray, 1, "a", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1496; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_48roll_min2(__pyx_self, __pyx_v_a, __pyx_v_window, __pyx_v_minp); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/algos.pyx":1496 * @cython.boundscheck(False) * @cython.wraparound(False) * def roll_min2(np.ndarray[np.float64_t, ndim=1] a, int window, int minp): # <<<<<<<<<<<<<< * "Moving min of 1d array of dtype=float64 along axis=0 ignoring NaNs." * cdef np.float64_t ai, aold */ static PyObject *__pyx_pf_6pandas_5algos_48roll_min2(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_a, int __pyx_v_window, int __pyx_v_minp) { __pyx_t_5numpy_float64_t __pyx_v_ai; __pyx_t_5numpy_float64_t __pyx_v_aold; Py_ssize_t __pyx_v_count; struct __pyx_t_6pandas_5algos_pairs *__pyx_v_ring; struct __pyx_t_6pandas_5algos_pairs *__pyx_v_minpair; struct __pyx_t_6pandas_5algos_pairs *__pyx_v_end; struct __pyx_t_6pandas_5algos_pairs *__pyx_v_last; Py_ssize_t __pyx_v_i0; npy_intp *__pyx_v_dim; Py_ssize_t __pyx_v_n0; npy_intp *__pyx_v_dims; PyArrayObject *__pyx_v_y = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_a; __Pyx_Buffer __pyx_pybuffer_a; __Pyx_LocalBuf_ND __pyx_pybuffernd_y; __Pyx_Buffer __pyx_pybuffer_y; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations npy_intp __pyx_t_1[1]; PyObject *__pyx_t_2 = NULL; PyArrayObject *__pyx_t_3 = NULL; int __pyx_t_4; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; Py_ssize_t __pyx_t_7; int __pyx_t_8; Py_ssize_t __pyx_t_9; PyObject *__pyx_t_10 = NULL; PyObject *__pyx_t_11 = NULL; long __pyx_t_12; Py_ssize_t __pyx_t_13; Py_ssize_t __pyx_t_14; double __pyx_t_15; Py_ssize_t __pyx_t_16; Py_ssize_t __pyx_t_17; long __pyx_t_18; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("roll_min2", 0); __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_a.pybuffer.buf = NULL; __pyx_pybuffer_a.refcount = 0; __pyx_pybuffernd_a.data = NULL; __pyx_pybuffernd_a.rcbuffer = &__pyx_pybuffer_a; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_a.rcbuffer->pybuffer, (PyObject*)__pyx_v_a, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1496; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_a.diminfo[0].strides = __pyx_pybuffernd_a.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_a.diminfo[0].shape = __pyx_pybuffernd_a.rcbuffer->pybuffer.shape[0]; /* "pandas/algos.pyx":1506 * cdef Py_ssize_t i0 * cdef np.npy_intp *dim * dim = PyArray_DIMS(a) # <<<<<<<<<<<<<< * cdef Py_ssize_t n0 = dim[0] * cdef np.npy_intp *dims = [n0] */ __pyx_v_dim = PyArray_DIMS(((PyArrayObject *)__pyx_v_a)); /* "pandas/algos.pyx":1507 * cdef np.npy_intp *dim * dim = PyArray_DIMS(a) * cdef Py_ssize_t n0 = dim[0] # <<<<<<<<<<<<<< * cdef np.npy_intp *dims = [n0] * cdef np.ndarray[np.float64_t, ndim=1] y = PyArray_EMPTY(1, dims, */ __pyx_v_n0 = (__pyx_v_dim[0]); /* "pandas/algos.pyx":1508 * dim = PyArray_DIMS(a) * cdef Py_ssize_t n0 = dim[0] * cdef np.npy_intp *dims = [n0] # <<<<<<<<<<<<<< * cdef np.ndarray[np.float64_t, ndim=1] y = PyArray_EMPTY(1, dims, * NPY_float64, 0) */ __pyx_t_1[0] = __pyx_v_n0; __pyx_v_dims = __pyx_t_1; /* "pandas/algos.pyx":1510 * cdef np.npy_intp *dims = [n0] * cdef np.ndarray[np.float64_t, ndim=1] y = PyArray_EMPTY(1, dims, * NPY_float64, 0) # <<<<<<<<<<<<<< * * if window < 1: */ __pyx_t_2 = PyArray_EMPTY(1, __pyx_v_dims, NPY_FLOAT64, 0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1509; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 1509; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_3 = ((PyArrayObject *)__pyx_t_2); { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_y.rcbuffer->pybuffer, (PyObject*)__pyx_t_3, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { __pyx_v_y = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_y.rcbuffer->pybuffer.buf = NULL; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1509; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } else {__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_t_3 = 0; __pyx_v_y = ((PyArrayObject *)__pyx_t_2); __pyx_t_2 = 0; /* "pandas/algos.pyx":1512 * NPY_float64, 0) * * if window < 1: # <<<<<<<<<<<<<< * raise ValueError('Invalid window size %d' * % (window)) */ __pyx_t_4 = ((__pyx_v_window < 1) != 0); if (__pyx_t_4) { /* "pandas/algos.pyx":1514 * if window < 1: * raise ValueError('Invalid window size %d' * % (window)) # <<<<<<<<<<<<<< * * if minp > window: */ __pyx_t_2 = PyInt_FromLong(__pyx_v_window); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1514; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_40), __pyx_t_2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1514; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_5)); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1513; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_t_5)); __Pyx_GIVEREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; __pyx_t_5 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1513; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __Pyx_Raise(__pyx_t_5, 0, 0, 0); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1513; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L3; } __pyx_L3:; /* "pandas/algos.pyx":1516 * % (window)) * * if minp > window: # <<<<<<<<<<<<<< * raise ValueError('Invalid min_periods size %d greater than window %d' * % (minp, window)) */ __pyx_t_4 = ((__pyx_v_minp > __pyx_v_window) != 0); if (__pyx_t_4) { /* "pandas/algos.pyx":1518 * if minp > window: * raise ValueError('Invalid min_periods size %d greater than window %d' * % (minp, window)) # <<<<<<<<<<<<<< * * window = min(window, n0) */ __pyx_t_5 = PyInt_FromLong(__pyx_v_minp); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1518; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_2 = PyInt_FromLong(__pyx_v_window); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1518; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1518; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_5 = 0; __pyx_t_2 = 0; __pyx_t_2 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_41), ((PyObject *)__pyx_t_6)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1518; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_2)); __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0; __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1517; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_t_2)); __Pyx_GIVEREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1517; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0; __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1517; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L4; } __pyx_L4:; /* "pandas/algos.pyx":1520 * % (minp, window)) * * window = min(window, n0) # <<<<<<<<<<<<<< * * minp = _check_minp(window, minp, n0) */ __pyx_t_7 = __pyx_v_n0; __pyx_t_8 = __pyx_v_window; if (((__pyx_t_7 < __pyx_t_8) != 0)) { __pyx_t_9 = __pyx_t_7; } else { __pyx_t_9 = __pyx_t_8; } __pyx_v_window = __pyx_t_9; /* "pandas/algos.pyx":1522 * window = min(window, n0) * * minp = _check_minp(window, minp, n0) # <<<<<<<<<<<<<< * * ring = stdlib.malloc(window * sizeof(pairs)) */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s___check_minp); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1522; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_6 = PyInt_FromLong(__pyx_v_window); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1522; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_5 = PyInt_FromLong(__pyx_v_minp); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1522; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_10 = PyInt_FromSsize_t(__pyx_v_n0); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1522; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __pyx_t_11 = PyTuple_New(3); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1522; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_11, 1, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_11, 2, __pyx_t_10); __Pyx_GIVEREF(__pyx_t_10); __pyx_t_6 = 0; __pyx_t_5 = 0; __pyx_t_10 = 0; __pyx_t_10 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_11), NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1522; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_11)); __pyx_t_11 = 0; __pyx_t_8 = __Pyx_PyInt_AsInt(__pyx_t_10); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1522; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_v_minp = __pyx_t_8; /* "pandas/algos.pyx":1524 * minp = _check_minp(window, minp, n0) * * ring = stdlib.malloc(window * sizeof(pairs)) # <<<<<<<<<<<<<< * end = ring + window * last = ring */ __pyx_v_ring = ((struct __pyx_t_6pandas_5algos_pairs *)malloc((__pyx_v_window * (sizeof(struct __pyx_t_6pandas_5algos_pairs))))); /* "pandas/algos.pyx":1525 * * ring = stdlib.malloc(window * sizeof(pairs)) * end = ring + window # <<<<<<<<<<<<<< * last = ring * */ __pyx_v_end = (__pyx_v_ring + __pyx_v_window); /* "pandas/algos.pyx":1526 * ring = stdlib.malloc(window * sizeof(pairs)) * end = ring + window * last = ring # <<<<<<<<<<<<<< * * minpair = ring */ __pyx_v_last = __pyx_v_ring; /* "pandas/algos.pyx":1528 * last = ring * * minpair = ring # <<<<<<<<<<<<<< * ai = a[0] * if ai == ai: */ __pyx_v_minpair = __pyx_v_ring; /* "pandas/algos.pyx":1529 * * minpair = ring * ai = a[0] # <<<<<<<<<<<<<< * if ai == ai: * minpair.value = ai */ __pyx_t_12 = 0; __pyx_v_ai = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_a.rcbuffer->pybuffer.buf, __pyx_t_12, __pyx_pybuffernd_a.diminfo[0].strides)); /* "pandas/algos.pyx":1530 * minpair = ring * ai = a[0] * if ai == ai: # <<<<<<<<<<<<<< * minpair.value = ai * else: */ __pyx_t_4 = ((__pyx_v_ai == __pyx_v_ai) != 0); if (__pyx_t_4) { /* "pandas/algos.pyx":1531 * ai = a[0] * if ai == ai: * minpair.value = ai # <<<<<<<<<<<<<< * else: * minpair.value = MAXfloat64 */ __pyx_v_minpair->value = __pyx_v_ai; goto __pyx_L5; } /*else*/ { /* "pandas/algos.pyx":1533 * minpair.value = ai * else: * minpair.value = MAXfloat64 # <<<<<<<<<<<<<< * minpair.death = window * */ __pyx_v_minpair->value = __pyx_v_6pandas_5algos_MAXfloat64; } __pyx_L5:; /* "pandas/algos.pyx":1534 * else: * minpair.value = MAXfloat64 * minpair.death = window # <<<<<<<<<<<<<< * * count = 0 */ __pyx_v_minpair->death = __pyx_v_window; /* "pandas/algos.pyx":1536 * minpair.death = window * * count = 0 # <<<<<<<<<<<<<< * for i0 in range(n0): * ai = a[i0] */ __pyx_v_count = 0; /* "pandas/algos.pyx":1537 * * count = 0 * for i0 in range(n0): # <<<<<<<<<<<<<< * ai = a[i0] * if ai == ai: */ __pyx_t_9 = __pyx_v_n0; for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_9; __pyx_t_7+=1) { __pyx_v_i0 = __pyx_t_7; /* "pandas/algos.pyx":1538 * count = 0 * for i0 in range(n0): * ai = a[i0] # <<<<<<<<<<<<<< * if ai == ai: * count += 1 */ __pyx_t_13 = __pyx_v_i0; __pyx_v_ai = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_a.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_a.diminfo[0].strides)); /* "pandas/algos.pyx":1539 * for i0 in range(n0): * ai = a[i0] * if ai == ai: # <<<<<<<<<<<<<< * count += 1 * else: */ __pyx_t_4 = ((__pyx_v_ai == __pyx_v_ai) != 0); if (__pyx_t_4) { /* "pandas/algos.pyx":1540 * ai = a[i0] * if ai == ai: * count += 1 # <<<<<<<<<<<<<< * else: * ai = MAXfloat64 */ __pyx_v_count = (__pyx_v_count + 1); goto __pyx_L8; } /*else*/ { /* "pandas/algos.pyx":1542 * count += 1 * else: * ai = MAXfloat64 # <<<<<<<<<<<<<< * if i0 >= window: * aold = a[i0 - window] */ __pyx_v_ai = __pyx_v_6pandas_5algos_MAXfloat64; } __pyx_L8:; /* "pandas/algos.pyx":1543 * else: * ai = MAXfloat64 * if i0 >= window: # <<<<<<<<<<<<<< * aold = a[i0 - window] * if aold == aold: */ __pyx_t_4 = ((__pyx_v_i0 >= __pyx_v_window) != 0); if (__pyx_t_4) { /* "pandas/algos.pyx":1544 * ai = MAXfloat64 * if i0 >= window: * aold = a[i0 - window] # <<<<<<<<<<<<<< * if aold == aold: * count -= 1 */ __pyx_t_14 = (__pyx_v_i0 - __pyx_v_window); __pyx_v_aold = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_a.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_a.diminfo[0].strides)); /* "pandas/algos.pyx":1545 * if i0 >= window: * aold = a[i0 - window] * if aold == aold: # <<<<<<<<<<<<<< * count -= 1 * if minpair.death == i0: */ __pyx_t_4 = ((__pyx_v_aold == __pyx_v_aold) != 0); if (__pyx_t_4) { /* "pandas/algos.pyx":1546 * aold = a[i0 - window] * if aold == aold: * count -= 1 # <<<<<<<<<<<<<< * if minpair.death == i0: * minpair += 1 */ __pyx_v_count = (__pyx_v_count - 1); goto __pyx_L10; } __pyx_L10:; goto __pyx_L9; } __pyx_L9:; /* "pandas/algos.pyx":1547 * if aold == aold: * count -= 1 * if minpair.death == i0: # <<<<<<<<<<<<<< * minpair += 1 * if minpair >= end: */ __pyx_t_4 = ((__pyx_v_minpair->death == __pyx_v_i0) != 0); if (__pyx_t_4) { /* "pandas/algos.pyx":1548 * count -= 1 * if minpair.death == i0: * minpair += 1 # <<<<<<<<<<<<<< * if minpair >= end: * minpair = ring */ __pyx_v_minpair = (__pyx_v_minpair + 1); /* "pandas/algos.pyx":1549 * if minpair.death == i0: * minpair += 1 * if minpair >= end: # <<<<<<<<<<<<<< * minpair = ring * if ai <= minpair.value: */ __pyx_t_4 = ((__pyx_v_minpair >= __pyx_v_end) != 0); if (__pyx_t_4) { /* "pandas/algos.pyx":1550 * minpair += 1 * if minpair >= end: * minpair = ring # <<<<<<<<<<<<<< * if ai <= minpair.value: * minpair.value = ai */ __pyx_v_minpair = __pyx_v_ring; goto __pyx_L12; } __pyx_L12:; goto __pyx_L11; } __pyx_L11:; /* "pandas/algos.pyx":1551 * if minpair >= end: * minpair = ring * if ai <= minpair.value: # <<<<<<<<<<<<<< * minpair.value = ai * minpair.death = i0 + window */ __pyx_t_4 = ((__pyx_v_ai <= __pyx_v_minpair->value) != 0); if (__pyx_t_4) { /* "pandas/algos.pyx":1552 * minpair = ring * if ai <= minpair.value: * minpair.value = ai # <<<<<<<<<<<<<< * minpair.death = i0 + window * last = minpair */ __pyx_v_minpair->value = __pyx_v_ai; /* "pandas/algos.pyx":1553 * if ai <= minpair.value: * minpair.value = ai * minpair.death = i0 + window # <<<<<<<<<<<<<< * last = minpair * else: */ __pyx_v_minpair->death = (__pyx_v_i0 + __pyx_v_window); /* "pandas/algos.pyx":1554 * minpair.value = ai * minpair.death = i0 + window * last = minpair # <<<<<<<<<<<<<< * else: * while last.value >= ai: */ __pyx_v_last = __pyx_v_minpair; goto __pyx_L13; } /*else*/ { /* "pandas/algos.pyx":1556 * last = minpair * else: * while last.value >= ai: # <<<<<<<<<<<<<< * if last == ring: * last = end */ while (1) { __pyx_t_4 = ((__pyx_v_last->value >= __pyx_v_ai) != 0); if (!__pyx_t_4) break; /* "pandas/algos.pyx":1557 * else: * while last.value >= ai: * if last == ring: # <<<<<<<<<<<<<< * last = end * last -= 1 */ __pyx_t_4 = ((__pyx_v_last == __pyx_v_ring) != 0); if (__pyx_t_4) { /* "pandas/algos.pyx":1558 * while last.value >= ai: * if last == ring: * last = end # <<<<<<<<<<<<<< * last -= 1 * last += 1 */ __pyx_v_last = __pyx_v_end; goto __pyx_L16; } __pyx_L16:; /* "pandas/algos.pyx":1559 * if last == ring: * last = end * last -= 1 # <<<<<<<<<<<<<< * last += 1 * if last == end: */ __pyx_v_last = (__pyx_v_last - 1); } /* "pandas/algos.pyx":1560 * last = end * last -= 1 * last += 1 # <<<<<<<<<<<<<< * if last == end: * last = ring */ __pyx_v_last = (__pyx_v_last + 1); /* "pandas/algos.pyx":1561 * last -= 1 * last += 1 * if last == end: # <<<<<<<<<<<<<< * last = ring * last.value = ai */ __pyx_t_4 = ((__pyx_v_last == __pyx_v_end) != 0); if (__pyx_t_4) { /* "pandas/algos.pyx":1562 * last += 1 * if last == end: * last = ring # <<<<<<<<<<<<<< * last.value = ai * last.death = i0 + window */ __pyx_v_last = __pyx_v_ring; goto __pyx_L17; } __pyx_L17:; /* "pandas/algos.pyx":1563 * if last == end: * last = ring * last.value = ai # <<<<<<<<<<<<<< * last.death = i0 + window * if count >= minp: */ __pyx_v_last->value = __pyx_v_ai; /* "pandas/algos.pyx":1564 * last = ring * last.value = ai * last.death = i0 + window # <<<<<<<<<<<<<< * if count >= minp: * y[i0] = minpair.value */ __pyx_v_last->death = (__pyx_v_i0 + __pyx_v_window); } __pyx_L13:; /* "pandas/algos.pyx":1565 * last.value = ai * last.death = i0 + window * if count >= minp: # <<<<<<<<<<<<<< * y[i0] = minpair.value * else: */ __pyx_t_4 = ((__pyx_v_count >= __pyx_v_minp) != 0); if (__pyx_t_4) { /* "pandas/algos.pyx":1566 * last.death = i0 + window * if count >= minp: * y[i0] = minpair.value # <<<<<<<<<<<<<< * else: * y[i0] = NaN */ __pyx_t_15 = __pyx_v_minpair->value; __pyx_t_16 = __pyx_v_i0; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_y.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_y.diminfo[0].strides) = __pyx_t_15; goto __pyx_L18; } /*else*/ { /* "pandas/algos.pyx":1568 * y[i0] = minpair.value * else: * y[i0] = NaN # <<<<<<<<<<<<<< * * for i0 in range(minp - 1): */ __pyx_t_17 = __pyx_v_i0; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_y.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_y.diminfo[0].strides) = __pyx_v_6pandas_5algos_NaN; } __pyx_L18:; } /* "pandas/algos.pyx":1570 * y[i0] = NaN * * for i0 in range(minp - 1): # <<<<<<<<<<<<<< * y[i0] = NaN * */ __pyx_t_18 = (__pyx_v_minp - 1); for (__pyx_t_9 = 0; __pyx_t_9 < __pyx_t_18; __pyx_t_9+=1) { __pyx_v_i0 = __pyx_t_9; /* "pandas/algos.pyx":1571 * * for i0 in range(minp - 1): * y[i0] = NaN # <<<<<<<<<<<<<< * * stdlib.free(ring) */ __pyx_t_7 = __pyx_v_i0; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_y.rcbuffer->pybuffer.buf, __pyx_t_7, __pyx_pybuffernd_y.diminfo[0].strides) = __pyx_v_6pandas_5algos_NaN; } /* "pandas/algos.pyx":1573 * y[i0] = NaN * * stdlib.free(ring) # <<<<<<<<<<<<<< * return y * */ free(__pyx_v_ring); /* "pandas/algos.pyx":1574 * * stdlib.free(ring) * return y # <<<<<<<<<<<<<< * * cdef double_t _get_min(object skiplist, int nobs, int minp): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_y)); __pyx_r = ((PyObject *)__pyx_v_y); goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_10); __Pyx_XDECREF(__pyx_t_11); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_a.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.roll_min2", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_a.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_y); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/algos.pyx":1576 * return y * * cdef double_t _get_min(object skiplist, int nobs, int minp): # <<<<<<<<<<<<<< * if nobs >= minp: * return skiplist.get(0) */ static __pyx_t_5numpy_double_t __pyx_f_6pandas_5algos__get_min(PyObject *__pyx_v_skiplist, int __pyx_v_nobs, int __pyx_v_minp) { __pyx_t_5numpy_double_t __pyx_r; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; __pyx_t_5numpy_double_t __pyx_t_4; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_get_min", 0); /* "pandas/algos.pyx":1577 * * cdef double_t _get_min(object skiplist, int nobs, int minp): * if nobs >= minp: # <<<<<<<<<<<<<< * return skiplist.get(0) * else: */ __pyx_t_1 = ((__pyx_v_nobs >= __pyx_v_minp) != 0); if (__pyx_t_1) { /* "pandas/algos.pyx":1578 * cdef double_t _get_min(object skiplist, int nobs, int minp): * if nobs >= minp: * return skiplist.get(0) # <<<<<<<<<<<<<< * else: * return NaN */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_skiplist, __pyx_n_s__get); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1578; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_k_tuple_42), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1578; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_4 = __pyx_PyFloat_AsDouble(__pyx_t_3); if (unlikely((__pyx_t_4 == (npy_double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1578; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_r = __pyx_t_4; goto __pyx_L0; goto __pyx_L3; } /*else*/ { /* "pandas/algos.pyx":1580 * return skiplist.get(0) * else: * return NaN # <<<<<<<<<<<<<< * * def roll_quantile(ndarray[float64_t, cast=True] input, int win, */ __pyx_r = __pyx_v_6pandas_5algos_NaN; goto __pyx_L0; } __pyx_L3:; __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_WriteUnraisable("pandas.algos._get_min", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_51roll_quantile(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6pandas_5algos_50roll_quantile[] = "\n O(N log(window)) implementation using skip list\n "; static PyMethodDef __pyx_mdef_6pandas_5algos_51roll_quantile = {__Pyx_NAMESTR("roll_quantile"), (PyCFunction)__pyx_pw_6pandas_5algos_51roll_quantile, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_5algos_50roll_quantile)}; static PyObject *__pyx_pw_6pandas_5algos_51roll_quantile(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_input = 0; int __pyx_v_win; int __pyx_v_minp; double __pyx_v_quantile; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("roll_quantile (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__input,&__pyx_n_s__win,&__pyx_n_s__minp,&__pyx_n_s__quantile,0}; PyObject* values[4] = {0,0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__input)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__win)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("roll_quantile", 1, 4, 4, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1582; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__minp)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("roll_quantile", 1, 4, 4, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1582; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__quantile)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("roll_quantile", 1, 4, 4, 3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1582; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "roll_quantile") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1582; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 4) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[3] = PyTuple_GET_ITEM(__pyx_args, 3); } __pyx_v_input = ((PyArrayObject *)values[0]); __pyx_v_win = __Pyx_PyInt_AsInt(values[1]); if (unlikely((__pyx_v_win == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1582; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_minp = __Pyx_PyInt_AsInt(values[2]); if (unlikely((__pyx_v_minp == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1583; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_quantile = __pyx_PyFloat_AsDouble(values[3]); if (unlikely((__pyx_v_quantile == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1583; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("roll_quantile", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1582; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.roll_quantile", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_input), __pyx_ptype_5numpy_ndarray, 1, "input", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1582; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_50roll_quantile(__pyx_self, __pyx_v_input, __pyx_v_win, __pyx_v_minp, __pyx_v_quantile); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/algos.pyx":1582 * return NaN * * def roll_quantile(ndarray[float64_t, cast=True] input, int win, # <<<<<<<<<<<<<< * int minp, double quantile): * ''' */ static PyObject *__pyx_pf_6pandas_5algos_50roll_quantile(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_input, int __pyx_v_win, int __pyx_v_minp, double __pyx_v_quantile) { double __pyx_v_val; double __pyx_v_prev; struct __pyx_obj_6pandas_5algos_IndexableSkiplist *__pyx_v_skiplist = 0; Py_ssize_t __pyx_v_nobs; Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_N; PyArrayObject *__pyx_v_output = 0; PyObject *__pyx_v_idx = NULL; __Pyx_LocalBuf_ND __pyx_pybuffernd_input; __Pyx_Buffer __pyx_pybuffer_input; __Pyx_LocalBuf_ND __pyx_pybuffernd_output; __Pyx_Buffer __pyx_pybuffer_output; 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; PyArrayObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; int __pyx_t_8; long __pyx_t_9; int __pyx_t_10; Py_ssize_t __pyx_t_11; Py_ssize_t __pyx_t_12; Py_ssize_t __pyx_t_13; Py_ssize_t __pyx_t_14; Py_ssize_t __pyx_t_15; __pyx_t_5numpy_double_t __pyx_t_16; Py_ssize_t __pyx_t_17; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("roll_quantile", 0); __pyx_pybuffer_output.pybuffer.buf = NULL; __pyx_pybuffer_output.refcount = 0; __pyx_pybuffernd_output.data = NULL; __pyx_pybuffernd_output.rcbuffer = &__pyx_pybuffer_output; __pyx_pybuffer_input.pybuffer.buf = NULL; __pyx_pybuffer_input.refcount = 0; __pyx_pybuffernd_input.data = NULL; __pyx_pybuffernd_input.rcbuffer = &__pyx_pybuffer_input; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_input.rcbuffer->pybuffer, (PyObject*)__pyx_v_input, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 1, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1582; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_input.diminfo[0].strides = __pyx_pybuffernd_input.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_input.diminfo[0].shape = __pyx_pybuffernd_input.rcbuffer->pybuffer.shape[0]; /* "pandas/algos.pyx":1589 * cdef double val, prev, midpoint * cdef IndexableSkiplist skiplist * cdef Py_ssize_t nobs = 0, i # <<<<<<<<<<<<<< * cdef Py_ssize_t N = len(input) * cdef ndarray[double_t] output = np.empty(N, dtype=float) */ __pyx_v_nobs = 0; /* "pandas/algos.pyx":1590 * cdef IndexableSkiplist skiplist * cdef Py_ssize_t nobs = 0, i * cdef Py_ssize_t N = len(input) # <<<<<<<<<<<<<< * cdef ndarray[double_t] output = np.empty(N, dtype=float) * */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_input)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1590; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_N = __pyx_t_1; /* "pandas/algos.pyx":1591 * cdef Py_ssize_t nobs = 0, i * cdef Py_ssize_t N = len(input) * cdef ndarray[double_t] output = np.empty(N, dtype=float) # <<<<<<<<<<<<<< * * skiplist = IndexableSkiplist(win) */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1591; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 1591; __pyx_clineno = __LINE__; goto __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_N); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1591; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1591; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1591; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_2)); if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__dtype), ((PyObject *)((PyObject*)(&PyFloat_Type)))) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1591; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_5 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1591; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1591; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_6 = ((PyArrayObject *)__pyx_t_5); { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_output.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_nn___pyx_t_5numpy_double_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { __pyx_v_output = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_output.rcbuffer->pybuffer.buf = NULL; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1591; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } else {__pyx_pybuffernd_output.diminfo[0].strides = __pyx_pybuffernd_output.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_output.diminfo[0].shape = __pyx_pybuffernd_output.rcbuffer->pybuffer.shape[0]; } } __pyx_t_6 = 0; __pyx_v_output = ((PyArrayObject *)__pyx_t_5); __pyx_t_5 = 0; /* "pandas/algos.pyx":1593 * cdef ndarray[double_t] output = np.empty(N, dtype=float) * * skiplist = IndexableSkiplist(win) # <<<<<<<<<<<<<< * * minp = _check_minp(win, minp, N) */ __pyx_t_5 = PyInt_FromLong(__pyx_v_win); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1593; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1593; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_6pandas_5algos_IndexableSkiplist)), ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1593; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __pyx_v_skiplist = ((struct __pyx_obj_6pandas_5algos_IndexableSkiplist *)__pyx_t_5); __pyx_t_5 = 0; /* "pandas/algos.pyx":1595 * skiplist = IndexableSkiplist(win) * * minp = _check_minp(win, minp, N) # <<<<<<<<<<<<<< * * for i from 0 <= i < minp - 1: */ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s___check_minp); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1595; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_2 = PyInt_FromLong(__pyx_v_win); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1595; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = PyInt_FromLong(__pyx_v_minp); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1595; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = PyInt_FromSsize_t(__pyx_v_N); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1595; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_7 = PyTuple_New(3); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1595; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_7, 2, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_2 = 0; __pyx_t_4 = 0; __pyx_t_3 = 0; __pyx_t_3 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_7), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1595; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0; __pyx_t_8 = __Pyx_PyInt_AsInt(__pyx_t_3); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1595; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_minp = __pyx_t_8; /* "pandas/algos.pyx":1597 * minp = _check_minp(win, minp, N) * * for i from 0 <= i < minp - 1: # <<<<<<<<<<<<<< * val = input[i] * */ __pyx_t_9 = (__pyx_v_minp - 1); for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_9; __pyx_v_i++) { /* "pandas/algos.pyx":1598 * * for i from 0 <= i < minp - 1: * val = input[i] # <<<<<<<<<<<<<< * * # Not NaN */ __pyx_t_1 = __pyx_v_i; __pyx_t_8 = -1; if (__pyx_t_1 < 0) { __pyx_t_1 += __pyx_pybuffernd_input.diminfo[0].shape; if (unlikely(__pyx_t_1 < 0)) __pyx_t_8 = 0; } else if (unlikely(__pyx_t_1 >= __pyx_pybuffernd_input.diminfo[0].shape)) __pyx_t_8 = 0; if (unlikely(__pyx_t_8 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_8); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1598; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_val = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_input.rcbuffer->pybuffer.buf, __pyx_t_1, __pyx_pybuffernd_input.diminfo[0].strides)); /* "pandas/algos.pyx":1601 * * # Not NaN * if val == val: # <<<<<<<<<<<<<< * nobs += 1 * skiplist.insert(val) */ __pyx_t_10 = ((__pyx_v_val == __pyx_v_val) != 0); if (__pyx_t_10) { /* "pandas/algos.pyx":1602 * # Not NaN * if val == val: * nobs += 1 # <<<<<<<<<<<<<< * skiplist.insert(val) * */ __pyx_v_nobs = (__pyx_v_nobs + 1); /* "pandas/algos.pyx":1603 * if val == val: * nobs += 1 * skiplist.insert(val) # <<<<<<<<<<<<<< * * output[i] = NaN */ __pyx_t_3 = ((struct __pyx_vtabstruct_6pandas_5algos_IndexableSkiplist *)__pyx_v_skiplist->__pyx_vtab)->insert(__pyx_v_skiplist, __pyx_v_val, 0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1603; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L5; } __pyx_L5:; /* "pandas/algos.pyx":1605 * skiplist.insert(val) * * output[i] = NaN # <<<<<<<<<<<<<< * * for i from minp - 1 <= i < N: */ __pyx_t_11 = __pyx_v_i; __pyx_t_8 = -1; if (__pyx_t_11 < 0) { __pyx_t_11 += __pyx_pybuffernd_output.diminfo[0].shape; if (unlikely(__pyx_t_11 < 0)) __pyx_t_8 = 0; } else if (unlikely(__pyx_t_11 >= __pyx_pybuffernd_output.diminfo[0].shape)) __pyx_t_8 = 0; if (unlikely(__pyx_t_8 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_8); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1605; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_double_t *, __pyx_pybuffernd_output.rcbuffer->pybuffer.buf, __pyx_t_11, __pyx_pybuffernd_output.diminfo[0].strides) = __pyx_v_6pandas_5algos_NaN; } /* "pandas/algos.pyx":1607 * output[i] = NaN * * for i from minp - 1 <= i < N: # <<<<<<<<<<<<<< * val = input[i] * */ __pyx_t_12 = __pyx_v_N; for (__pyx_v_i = (__pyx_v_minp - 1); __pyx_v_i < __pyx_t_12; __pyx_v_i++) { /* "pandas/algos.pyx":1608 * * for i from minp - 1 <= i < N: * val = input[i] # <<<<<<<<<<<<<< * * if i > win - 1: */ __pyx_t_13 = __pyx_v_i; __pyx_t_8 = -1; if (__pyx_t_13 < 0) { __pyx_t_13 += __pyx_pybuffernd_input.diminfo[0].shape; if (unlikely(__pyx_t_13 < 0)) __pyx_t_8 = 0; } else if (unlikely(__pyx_t_13 >= __pyx_pybuffernd_input.diminfo[0].shape)) __pyx_t_8 = 0; if (unlikely(__pyx_t_8 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_8); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1608; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_val = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_input.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_input.diminfo[0].strides)); /* "pandas/algos.pyx":1610 * val = input[i] * * if i > win - 1: # <<<<<<<<<<<<<< * prev = input[i - win] * */ __pyx_t_10 = ((__pyx_v_i > (__pyx_v_win - 1)) != 0); if (__pyx_t_10) { /* "pandas/algos.pyx":1611 * * if i > win - 1: * prev = input[i - win] # <<<<<<<<<<<<<< * * if prev == prev: */ __pyx_t_14 = (__pyx_v_i - __pyx_v_win); __pyx_t_8 = -1; if (__pyx_t_14 < 0) { __pyx_t_14 += __pyx_pybuffernd_input.diminfo[0].shape; if (unlikely(__pyx_t_14 < 0)) __pyx_t_8 = 0; } else if (unlikely(__pyx_t_14 >= __pyx_pybuffernd_input.diminfo[0].shape)) __pyx_t_8 = 0; if (unlikely(__pyx_t_8 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_8); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1611; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_prev = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_input.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_input.diminfo[0].strides)); /* "pandas/algos.pyx":1613 * prev = input[i - win] * * if prev == prev: # <<<<<<<<<<<<<< * skiplist.remove(prev) * nobs -= 1 */ __pyx_t_10 = ((__pyx_v_prev == __pyx_v_prev) != 0); if (__pyx_t_10) { /* "pandas/algos.pyx":1614 * * if prev == prev: * skiplist.remove(prev) # <<<<<<<<<<<<<< * nobs -= 1 * */ __pyx_t_3 = ((struct __pyx_vtabstruct_6pandas_5algos_IndexableSkiplist *)__pyx_v_skiplist->__pyx_vtab)->remove(__pyx_v_skiplist, __pyx_v_prev, 0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1614; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/algos.pyx":1615 * if prev == prev: * skiplist.remove(prev) * nobs -= 1 # <<<<<<<<<<<<<< * * if val == val: */ __pyx_v_nobs = (__pyx_v_nobs - 1); goto __pyx_L9; } __pyx_L9:; goto __pyx_L8; } __pyx_L8:; /* "pandas/algos.pyx":1617 * nobs -= 1 * * if val == val: # <<<<<<<<<<<<<< * nobs += 1 * skiplist.insert(val) */ __pyx_t_10 = ((__pyx_v_val == __pyx_v_val) != 0); if (__pyx_t_10) { /* "pandas/algos.pyx":1618 * * if val == val: * nobs += 1 # <<<<<<<<<<<<<< * skiplist.insert(val) * */ __pyx_v_nobs = (__pyx_v_nobs + 1); /* "pandas/algos.pyx":1619 * if val == val: * nobs += 1 * skiplist.insert(val) # <<<<<<<<<<<<<< * * if nobs >= minp: */ __pyx_t_3 = ((struct __pyx_vtabstruct_6pandas_5algos_IndexableSkiplist *)__pyx_v_skiplist->__pyx_vtab)->insert(__pyx_v_skiplist, __pyx_v_val, 0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1619; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L10; } __pyx_L10:; /* "pandas/algos.pyx":1621 * skiplist.insert(val) * * if nobs >= minp: # <<<<<<<<<<<<<< * idx = int((quantile / 1.) * (nobs - 1)) * output[i] = skiplist.get(idx) */ __pyx_t_10 = ((__pyx_v_nobs >= __pyx_v_minp) != 0); if (__pyx_t_10) { /* "pandas/algos.pyx":1622 * * if nobs >= minp: * idx = int((quantile / 1.) * (nobs - 1)) # <<<<<<<<<<<<<< * output[i] = skiplist.get(idx) * else: */ __pyx_t_3 = PyFloat_FromDouble(((__pyx_v_quantile / 1.) * (__pyx_v_nobs - 1))); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1622; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1622; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyObject_Call(((PyObject *)((PyObject*)(&PyInt_Type))), ((PyObject *)__pyx_t_7), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1622; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0; __Pyx_XDECREF_SET(__pyx_v_idx, __pyx_t_3); __pyx_t_3 = 0; /* "pandas/algos.pyx":1623 * if nobs >= minp: * idx = int((quantile / 1.) * (nobs - 1)) * output[i] = skiplist.get(idx) # <<<<<<<<<<<<<< * else: * output[i] = NaN */ __pyx_t_15 = __Pyx_PyIndex_AsSsize_t(__pyx_v_idx); if (unlikely((__pyx_t_15 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1623; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_3 = ((struct __pyx_vtabstruct_6pandas_5algos_IndexableSkiplist *)__pyx_v_skiplist->__pyx_vtab)->get(__pyx_v_skiplist, __pyx_t_15, 0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1623; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_16 = __pyx_PyFloat_AsDouble(__pyx_t_3); if (unlikely((__pyx_t_16 == (npy_double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1623; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_15 = __pyx_v_i; __pyx_t_8 = -1; if (__pyx_t_15 < 0) { __pyx_t_15 += __pyx_pybuffernd_output.diminfo[0].shape; if (unlikely(__pyx_t_15 < 0)) __pyx_t_8 = 0; } else if (unlikely(__pyx_t_15 >= __pyx_pybuffernd_output.diminfo[0].shape)) __pyx_t_8 = 0; if (unlikely(__pyx_t_8 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_8); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1623; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_double_t *, __pyx_pybuffernd_output.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_output.diminfo[0].strides) = __pyx_t_16; goto __pyx_L11; } /*else*/ { /* "pandas/algos.pyx":1625 * output[i] = skiplist.get(idx) * else: * output[i] = NaN # <<<<<<<<<<<<<< * * return output */ __pyx_t_17 = __pyx_v_i; __pyx_t_8 = -1; if (__pyx_t_17 < 0) { __pyx_t_17 += __pyx_pybuffernd_output.diminfo[0].shape; if (unlikely(__pyx_t_17 < 0)) __pyx_t_8 = 0; } else if (unlikely(__pyx_t_17 >= __pyx_pybuffernd_output.diminfo[0].shape)) __pyx_t_8 = 0; if (unlikely(__pyx_t_8 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_8); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1625; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_double_t *, __pyx_pybuffernd_output.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_output.diminfo[0].strides) = __pyx_v_6pandas_5algos_NaN; } __pyx_L11:; } /* "pandas/algos.pyx":1627 * output[i] = NaN * * return output # <<<<<<<<<<<<<< * * def roll_generic(ndarray[float64_t, cast=True] input, int win, */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_output)); __pyx_r = ((PyObject *)__pyx_v_output); goto __pyx_L0; __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_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_7); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_input.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_output.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.roll_quantile", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_input.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_output.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_skiplist); __Pyx_XDECREF((PyObject *)__pyx_v_output); __Pyx_XDECREF(__pyx_v_idx); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_53roll_generic(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_53roll_generic = {__Pyx_NAMESTR("roll_generic"), (PyCFunction)__pyx_pw_6pandas_5algos_53roll_generic, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_53roll_generic(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_input = 0; int __pyx_v_win; int __pyx_v_minp; PyObject *__pyx_v_func = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("roll_generic (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__input,&__pyx_n_s__win,&__pyx_n_s__minp,&__pyx_n_s__func,0}; PyObject* values[4] = {0,0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__input)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__win)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("roll_generic", 1, 4, 4, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1629; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__minp)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("roll_generic", 1, 4, 4, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1629; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__func)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("roll_generic", 1, 4, 4, 3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1629; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "roll_generic") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1629; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 4) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[3] = PyTuple_GET_ITEM(__pyx_args, 3); } __pyx_v_input = ((PyArrayObject *)values[0]); __pyx_v_win = __Pyx_PyInt_AsInt(values[1]); if (unlikely((__pyx_v_win == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1629; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_minp = __Pyx_PyInt_AsInt(values[2]); if (unlikely((__pyx_v_minp == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1630; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_func = values[3]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("roll_generic", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1629; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.roll_generic", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_input), __pyx_ptype_5numpy_ndarray, 1, "input", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1629; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_52roll_generic(__pyx_self, __pyx_v_input, __pyx_v_win, __pyx_v_minp, __pyx_v_func); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/algos.pyx":1629 * return output * * def roll_generic(ndarray[float64_t, cast=True] input, int win, # <<<<<<<<<<<<<< * int minp, object func): * cdef ndarray[double_t] output, counts, bufarr */ static PyObject *__pyx_pf_6pandas_5algos_52roll_generic(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_input, int __pyx_v_win, int __pyx_v_minp, PyObject *__pyx_v_func) { PyArrayObject *__pyx_v_output = 0; PyArrayObject *__pyx_v_counts = 0; PyArrayObject *__pyx_v_bufarr = 0; Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_n; __pyx_t_5numpy_float64_t *__pyx_v_buf; __pyx_t_5numpy_float64_t *__pyx_v_oldbuf; __Pyx_LocalBuf_ND __pyx_pybuffernd_bufarr; __Pyx_Buffer __pyx_pybuffer_bufarr; __Pyx_LocalBuf_ND __pyx_pybuffernd_counts; __Pyx_Buffer __pyx_pybuffer_counts; __Pyx_LocalBuf_ND __pyx_pybuffernd_input; __Pyx_Buffer __pyx_pybuffer_input; __Pyx_LocalBuf_ND __pyx_pybuffernd_output; __Pyx_Buffer __pyx_pybuffer_output; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_t_3; int __pyx_t_4; PyArrayObject *__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; PyObject *__pyx_t_11 = NULL; PyObject *__pyx_t_12 = NULL; PyObject *__pyx_t_13 = NULL; PyArrayObject *__pyx_t_14 = NULL; int __pyx_t_15; __pyx_t_5numpy_double_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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("roll_generic", 0); __Pyx_INCREF((PyObject *)__pyx_v_input); __pyx_pybuffer_output.pybuffer.buf = NULL; __pyx_pybuffer_output.refcount = 0; __pyx_pybuffernd_output.data = NULL; __pyx_pybuffernd_output.rcbuffer = &__pyx_pybuffer_output; __pyx_pybuffer_counts.pybuffer.buf = NULL; __pyx_pybuffer_counts.refcount = 0; __pyx_pybuffernd_counts.data = NULL; __pyx_pybuffernd_counts.rcbuffer = &__pyx_pybuffer_counts; __pyx_pybuffer_bufarr.pybuffer.buf = NULL; __pyx_pybuffer_bufarr.refcount = 0; __pyx_pybuffernd_bufarr.data = NULL; __pyx_pybuffernd_bufarr.rcbuffer = &__pyx_pybuffer_bufarr; __pyx_pybuffer_input.pybuffer.buf = NULL; __pyx_pybuffer_input.refcount = 0; __pyx_pybuffernd_input.data = NULL; __pyx_pybuffernd_input.rcbuffer = &__pyx_pybuffer_input; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_input.rcbuffer->pybuffer, (PyObject*)__pyx_v_input, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 1, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1629; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_input.diminfo[0].strides = __pyx_pybuffernd_input.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_input.diminfo[0].shape = __pyx_pybuffernd_input.rcbuffer->pybuffer.shape[0]; /* "pandas/algos.pyx":1635 * cdef float64_t *buf, *oldbuf * * if not input.flags.c_contiguous: # <<<<<<<<<<<<<< * input = input.copy('C') * */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_input), __pyx_n_s__flags); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1635; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s__c_contiguous); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1635; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1635; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_4 = ((!__pyx_t_3) != 0); if (__pyx_t_4) { /* "pandas/algos.pyx":1636 * * if not input.flags.c_contiguous: * input = input.copy('C') # <<<<<<<<<<<<<< * * buf = input.data */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_input), __pyx_n_s__copy); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1636; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_k_tuple_43), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1636; __pyx_clineno = __LINE__; goto __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_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1636; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_5 = ((PyArrayObject *)__pyx_t_1); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_input.rcbuffer->pybuffer); __pyx_t_6 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_input.rcbuffer->pybuffer, (PyObject*)__pyx_t_5, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 1, __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_input.rcbuffer->pybuffer, (PyObject*)__pyx_v_input, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 1, __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_pybuffernd_input.diminfo[0].strides = __pyx_pybuffernd_input.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_input.diminfo[0].shape = __pyx_pybuffernd_input.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1636; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_5 = 0; __Pyx_DECREF_SET(__pyx_v_input, ((PyArrayObject *)__pyx_t_1)); __pyx_t_1 = 0; goto __pyx_L3; } __pyx_L3:; /* "pandas/algos.pyx":1638 * input = input.copy('C') * * buf = input.data # <<<<<<<<<<<<<< * * n = len(input) */ __pyx_v_buf = ((__pyx_t_5numpy_float64_t *)__pyx_v_input->data); /* "pandas/algos.pyx":1640 * buf = input.data * * n = len(input) # <<<<<<<<<<<<<< * if n == 0: * return input */ __pyx_t_10 = PyObject_Length(((PyObject *)__pyx_v_input)); if (unlikely(__pyx_t_10 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1640; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_10; /* "pandas/algos.pyx":1641 * * n = len(input) * if n == 0: # <<<<<<<<<<<<<< * return input * */ __pyx_t_4 = ((__pyx_v_n == 0) != 0); if (__pyx_t_4) { /* "pandas/algos.pyx":1642 * n = len(input) * if n == 0: * return input # <<<<<<<<<<<<<< * * minp = _check_minp(win, minp, n) */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_input)); __pyx_r = ((PyObject *)__pyx_v_input); goto __pyx_L0; goto __pyx_L4; } __pyx_L4:; /* "pandas/algos.pyx":1644 * return input * * minp = _check_minp(win, minp, n) # <<<<<<<<<<<<<< * output = np.empty(n, dtype=float) * counts = roll_sum(np.isfinite(input).astype(float), win, minp) */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s___check_minp); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1644; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyInt_FromLong(__pyx_v_win); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1644; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_11 = PyInt_FromLong(__pyx_v_minp); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1644; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __pyx_t_12 = PyInt_FromSsize_t(__pyx_v_n); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1644; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __pyx_t_13 = PyTuple_New(3); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1644; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_13, 1, __pyx_t_11); __Pyx_GIVEREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_13, 2, __pyx_t_12); __Pyx_GIVEREF(__pyx_t_12); __pyx_t_2 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_12 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_13), NULL); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1644; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_13)); __pyx_t_13 = 0; __pyx_t_6 = __Pyx_PyInt_AsInt(__pyx_t_12); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1644; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __pyx_v_minp = __pyx_t_6; /* "pandas/algos.pyx":1645 * * minp = _check_minp(win, minp, n) * output = np.empty(n, dtype=float) # <<<<<<<<<<<<<< * counts = roll_sum(np.isfinite(input).astype(float), win, minp) * */ __pyx_t_12 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1645; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s__empty); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1645; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __pyx_t_12 = PyInt_FromSsize_t(__pyx_v_n); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1645; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1645; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_12); __Pyx_GIVEREF(__pyx_t_12); __pyx_t_12 = 0; __pyx_t_12 = PyDict_New(); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1645; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_12)); if (PyDict_SetItem(__pyx_t_12, ((PyObject *)__pyx_n_s__dtype), ((PyObject *)((PyObject*)(&PyFloat_Type)))) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1645; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_11 = PyObject_Call(__pyx_t_13, ((PyObject *)__pyx_t_1), ((PyObject *)__pyx_t_12)); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1645; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_12)); __pyx_t_12 = 0; if (!(likely(((__pyx_t_11) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_11, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1645; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_14 = ((PyArrayObject *)__pyx_t_11); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_output.rcbuffer->pybuffer); __pyx_t_6 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_output.rcbuffer->pybuffer, (PyObject*)__pyx_t_14, &__Pyx_TypeInfo_nn___pyx_t_5numpy_double_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 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_output.rcbuffer->pybuffer, (PyObject*)__pyx_v_output, &__Pyx_TypeInfo_nn___pyx_t_5numpy_double_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 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_pybuffernd_output.diminfo[0].strides = __pyx_pybuffernd_output.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_output.diminfo[0].shape = __pyx_pybuffernd_output.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1645; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_14 = 0; __pyx_v_output = ((PyArrayObject *)__pyx_t_11); __pyx_t_11 = 0; /* "pandas/algos.pyx":1646 * minp = _check_minp(win, minp, n) * output = np.empty(n, dtype=float) * counts = roll_sum(np.isfinite(input).astype(float), win, minp) # <<<<<<<<<<<<<< * * bufarr = np.empty(win, dtype=float) */ __pyx_t_11 = __Pyx_GetModuleGlobalName(__pyx_n_s__roll_sum); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1646; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __pyx_t_12 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1646; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s__isfinite); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1646; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __pyx_t_12 = PyTuple_New(1); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1646; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __Pyx_INCREF(((PyObject *)__pyx_v_input)); PyTuple_SET_ITEM(__pyx_t_12, 0, ((PyObject *)__pyx_v_input)); __Pyx_GIVEREF(((PyObject *)__pyx_v_input)); __pyx_t_13 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_12), NULL); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1646; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_12)); __pyx_t_12 = 0; __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_13, __pyx_n_s__astype); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1646; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_13 = PyTuple_New(1); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1646; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __Pyx_INCREF(((PyObject *)((PyObject*)(&PyFloat_Type)))); PyTuple_SET_ITEM(__pyx_t_13, 0, ((PyObject *)((PyObject*)(&PyFloat_Type)))); __Pyx_GIVEREF(((PyObject *)((PyObject*)(&PyFloat_Type)))); __pyx_t_1 = PyObject_Call(__pyx_t_12, ((PyObject *)__pyx_t_13), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1646; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_13)); __pyx_t_13 = 0; __pyx_t_13 = PyInt_FromLong(__pyx_v_win); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1646; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __pyx_t_12 = PyInt_FromLong(__pyx_v_minp); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1646; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1646; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_13); __Pyx_GIVEREF(__pyx_t_13); PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_t_12); __Pyx_GIVEREF(__pyx_t_12); __pyx_t_1 = 0; __pyx_t_13 = 0; __pyx_t_12 = 0; __pyx_t_12 = PyObject_Call(__pyx_t_11, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1646; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; if (!(likely(((__pyx_t_12) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_12, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1646; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_14 = ((PyArrayObject *)__pyx_t_12); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_counts.rcbuffer->pybuffer); __pyx_t_6 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_counts.rcbuffer->pybuffer, (PyObject*)__pyx_t_14, &__Pyx_TypeInfo_nn___pyx_t_5numpy_double_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_counts.rcbuffer->pybuffer, (PyObject*)__pyx_v_counts, &__Pyx_TypeInfo_nn___pyx_t_5numpy_double_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_pybuffernd_counts.diminfo[0].strides = __pyx_pybuffernd_counts.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_counts.diminfo[0].shape = __pyx_pybuffernd_counts.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1646; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_14 = 0; __pyx_v_counts = ((PyArrayObject *)__pyx_t_12); __pyx_t_12 = 0; /* "pandas/algos.pyx":1648 * counts = roll_sum(np.isfinite(input).astype(float), win, minp) * * bufarr = np.empty(win, dtype=float) # <<<<<<<<<<<<<< * oldbuf = bufarr.data * */ __pyx_t_12 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1648; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s__empty); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1648; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __pyx_t_12 = PyInt_FromLong(__pyx_v_win); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1648; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __pyx_t_11 = PyTuple_New(1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1648; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_12); __Pyx_GIVEREF(__pyx_t_12); __pyx_t_12 = 0; __pyx_t_12 = PyDict_New(); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1648; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_12)); if (PyDict_SetItem(__pyx_t_12, ((PyObject *)__pyx_n_s__dtype), ((PyObject *)((PyObject*)(&PyFloat_Type)))) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1648; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_13 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_11), ((PyObject *)__pyx_t_12)); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1648; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_11)); __pyx_t_11 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_12)); __pyx_t_12 = 0; if (!(likely(((__pyx_t_13) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_13, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1648; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_14 = ((PyArrayObject *)__pyx_t_13); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_bufarr.rcbuffer->pybuffer); __pyx_t_6 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_bufarr.rcbuffer->pybuffer, (PyObject*)__pyx_t_14, &__Pyx_TypeInfo_nn___pyx_t_5numpy_double_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_bufarr.rcbuffer->pybuffer, (PyObject*)__pyx_v_bufarr, &__Pyx_TypeInfo_nn___pyx_t_5numpy_double_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_pybuffernd_bufarr.diminfo[0].strides = __pyx_pybuffernd_bufarr.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_bufarr.diminfo[0].shape = __pyx_pybuffernd_bufarr.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1648; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_14 = 0; __pyx_v_bufarr = ((PyArrayObject *)__pyx_t_13); __pyx_t_13 = 0; /* "pandas/algos.pyx":1649 * * bufarr = np.empty(win, dtype=float) * oldbuf = bufarr.data # <<<<<<<<<<<<<< * * n = len(input) */ __pyx_v_oldbuf = ((__pyx_t_5numpy_float64_t *)__pyx_v_bufarr->data); /* "pandas/algos.pyx":1651 * oldbuf = bufarr.data * * n = len(input) # <<<<<<<<<<<<<< * for i from 0 <= i < int_min(win, n): * if counts[i] >= minp: */ __pyx_t_10 = PyObject_Length(((PyObject *)__pyx_v_input)); if (unlikely(__pyx_t_10 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1651; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_10; /* "pandas/algos.pyx":1652 * * n = len(input) * for i from 0 <= i < int_min(win, n): # <<<<<<<<<<<<<< * if counts[i] >= minp: * output[i] = func(input[int_max(i - win + 1, 0) : i + 1]) */ __pyx_t_6 = __pyx_f_6pandas_5algos_int_min(__pyx_v_win, __pyx_v_n); for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_6; __pyx_v_i++) { /* "pandas/algos.pyx":1653 * n = len(input) * for i from 0 <= i < int_min(win, n): * if counts[i] >= minp: # <<<<<<<<<<<<<< * output[i] = func(input[int_max(i - win + 1, 0) : i + 1]) * else: */ __pyx_t_10 = __pyx_v_i; __pyx_t_15 = -1; if (__pyx_t_10 < 0) { __pyx_t_10 += __pyx_pybuffernd_counts.diminfo[0].shape; if (unlikely(__pyx_t_10 < 0)) __pyx_t_15 = 0; } else if (unlikely(__pyx_t_10 >= __pyx_pybuffernd_counts.diminfo[0].shape)) __pyx_t_15 = 0; if (unlikely(__pyx_t_15 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_15); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1653; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_4 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_double_t *, __pyx_pybuffernd_counts.rcbuffer->pybuffer.buf, __pyx_t_10, __pyx_pybuffernd_counts.diminfo[0].strides)) >= __pyx_v_minp) != 0); if (__pyx_t_4) { /* "pandas/algos.pyx":1654 * for i from 0 <= i < int_min(win, n): * if counts[i] >= minp: * output[i] = func(input[int_max(i - win + 1, 0) : i + 1]) # <<<<<<<<<<<<<< * else: * output[i] = NaN */ __pyx_t_13 = __Pyx_PyObject_GetSlice(((PyObject *)__pyx_v_input), __pyx_f_6pandas_5algos_int_max(((__pyx_v_i - __pyx_v_win) + 1), 0), (__pyx_v_i + 1), NULL, NULL, NULL, 1, 1, 1); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1654; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __pyx_t_12 = PyTuple_New(1); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1654; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_13); __Pyx_GIVEREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_13 = PyObject_Call(__pyx_v_func, ((PyObject *)__pyx_t_12), NULL); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1654; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(((PyObject *)__pyx_t_12)); __pyx_t_12 = 0; __pyx_t_16 = __pyx_PyFloat_AsDouble(__pyx_t_13); if (unlikely((__pyx_t_16 == (npy_double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1654; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_17 = __pyx_v_i; __pyx_t_15 = -1; if (__pyx_t_17 < 0) { __pyx_t_17 += __pyx_pybuffernd_output.diminfo[0].shape; if (unlikely(__pyx_t_17 < 0)) __pyx_t_15 = 0; } else if (unlikely(__pyx_t_17 >= __pyx_pybuffernd_output.diminfo[0].shape)) __pyx_t_15 = 0; if (unlikely(__pyx_t_15 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_15); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1654; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_double_t *, __pyx_pybuffernd_output.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_output.diminfo[0].strides) = __pyx_t_16; goto __pyx_L7; } /*else*/ { /* "pandas/algos.pyx":1656 * output[i] = func(input[int_max(i - win + 1, 0) : i + 1]) * else: * output[i] = NaN # <<<<<<<<<<<<<< * * for i from win <= i < n: */ __pyx_t_18 = __pyx_v_i; __pyx_t_15 = -1; if (__pyx_t_18 < 0) { __pyx_t_18 += __pyx_pybuffernd_output.diminfo[0].shape; if (unlikely(__pyx_t_18 < 0)) __pyx_t_15 = 0; } else if (unlikely(__pyx_t_18 >= __pyx_pybuffernd_output.diminfo[0].shape)) __pyx_t_15 = 0; if (unlikely(__pyx_t_15 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_15); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1656; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_double_t *, __pyx_pybuffernd_output.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_output.diminfo[0].strides) = __pyx_v_6pandas_5algos_NaN; } __pyx_L7:; } /* "pandas/algos.pyx":1658 * output[i] = NaN * * for i from win <= i < n: # <<<<<<<<<<<<<< * buf = buf + 1 * bufarr.data = buf */ __pyx_t_19 = __pyx_v_n; for (__pyx_v_i = __pyx_v_win; __pyx_v_i < __pyx_t_19; __pyx_v_i++) { /* "pandas/algos.pyx":1659 * * for i from win <= i < n: * buf = buf + 1 # <<<<<<<<<<<<<< * bufarr.data = buf * if counts[i] >= minp: */ __pyx_v_buf = (__pyx_v_buf + 1); /* "pandas/algos.pyx":1660 * for i from win <= i < n: * buf = buf + 1 * bufarr.data = buf # <<<<<<<<<<<<<< * if counts[i] >= minp: * output[i] = func(bufarr) */ __pyx_v_bufarr->data = ((char *)__pyx_v_buf); /* "pandas/algos.pyx":1661 * buf = buf + 1 * bufarr.data = buf * if counts[i] >= minp: # <<<<<<<<<<<<<< * output[i] = func(bufarr) * else: */ __pyx_t_20 = __pyx_v_i; __pyx_t_6 = -1; if (__pyx_t_20 < 0) { __pyx_t_20 += __pyx_pybuffernd_counts.diminfo[0].shape; if (unlikely(__pyx_t_20 < 0)) __pyx_t_6 = 0; } else if (unlikely(__pyx_t_20 >= __pyx_pybuffernd_counts.diminfo[0].shape)) __pyx_t_6 = 0; if (unlikely(__pyx_t_6 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_6); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1661; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_4 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_double_t *, __pyx_pybuffernd_counts.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_counts.diminfo[0].strides)) >= __pyx_v_minp) != 0); if (__pyx_t_4) { /* "pandas/algos.pyx":1662 * bufarr.data = buf * if counts[i] >= minp: * output[i] = func(bufarr) # <<<<<<<<<<<<<< * else: * output[i] = NaN */ __pyx_t_13 = PyTuple_New(1); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1662; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __Pyx_INCREF(((PyObject *)__pyx_v_bufarr)); PyTuple_SET_ITEM(__pyx_t_13, 0, ((PyObject *)__pyx_v_bufarr)); __Pyx_GIVEREF(((PyObject *)__pyx_v_bufarr)); __pyx_t_12 = PyObject_Call(__pyx_v_func, ((PyObject *)__pyx_t_13), NULL); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1662; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(((PyObject *)__pyx_t_13)); __pyx_t_13 = 0; __pyx_t_16 = __pyx_PyFloat_AsDouble(__pyx_t_12); if (unlikely((__pyx_t_16 == (npy_double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1662; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __pyx_t_21 = __pyx_v_i; __pyx_t_6 = -1; if (__pyx_t_21 < 0) { __pyx_t_21 += __pyx_pybuffernd_output.diminfo[0].shape; if (unlikely(__pyx_t_21 < 0)) __pyx_t_6 = 0; } else if (unlikely(__pyx_t_21 >= __pyx_pybuffernd_output.diminfo[0].shape)) __pyx_t_6 = 0; if (unlikely(__pyx_t_6 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_6); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1662; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_double_t *, __pyx_pybuffernd_output.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_output.diminfo[0].strides) = __pyx_t_16; goto __pyx_L10; } /*else*/ { /* "pandas/algos.pyx":1664 * output[i] = func(bufarr) * else: * output[i] = NaN # <<<<<<<<<<<<<< * * bufarr.data = oldbuf */ __pyx_t_22 = __pyx_v_i; __pyx_t_6 = -1; if (__pyx_t_22 < 0) { __pyx_t_22 += __pyx_pybuffernd_output.diminfo[0].shape; if (unlikely(__pyx_t_22 < 0)) __pyx_t_6 = 0; } else if (unlikely(__pyx_t_22 >= __pyx_pybuffernd_output.diminfo[0].shape)) __pyx_t_6 = 0; if (unlikely(__pyx_t_6 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_6); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1664; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_double_t *, __pyx_pybuffernd_output.rcbuffer->pybuffer.buf, __pyx_t_22, __pyx_pybuffernd_output.diminfo[0].strides) = __pyx_v_6pandas_5algos_NaN; } __pyx_L10:; } /* "pandas/algos.pyx":1666 * output[i] = NaN * * bufarr.data = oldbuf # <<<<<<<<<<<<<< * * return output */ __pyx_v_bufarr->data = ((char *)__pyx_v_oldbuf); /* "pandas/algos.pyx":1668 * bufarr.data = oldbuf * * return output # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_output)); __pyx_r = ((PyObject *)__pyx_v_output); goto __pyx_L0; __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_11); __Pyx_XDECREF(__pyx_t_12); __Pyx_XDECREF(__pyx_t_13); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_bufarr.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_counts.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_input.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_output.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.roll_generic", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_bufarr.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_counts.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_input.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_output.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_output); __Pyx_XDECREF((PyObject *)__pyx_v_counts); __Pyx_XDECREF((PyObject *)__pyx_v_bufarr); __Pyx_XDECREF((PyObject *)__pyx_v_input); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_55roll_window(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6pandas_5algos_54roll_window[] = "\n Assume len(weights) << len(input)\n "; static PyMethodDef __pyx_mdef_6pandas_5algos_55roll_window = {__Pyx_NAMESTR("roll_window"), (PyCFunction)__pyx_pw_6pandas_5algos_55roll_window, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_5algos_54roll_window)}; static PyObject *__pyx_pw_6pandas_5algos_55roll_window(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_input = 0; PyArrayObject *__pyx_v_weights = 0; int __pyx_v_minp; int __pyx_v_avg; int __pyx_v_avg_wgt; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("roll_window (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__input,&__pyx_n_s__weights,&__pyx_n_s__minp,&__pyx_n_s__avg,&__pyx_n_s__avg_wgt,0}; PyObject* values[5] = {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 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__input)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__weights)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("roll_window", 0, 3, 5, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1671; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__minp)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("roll_window", 0, 3, 5, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1671; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__avg); if (value) { values[3] = value; kw_args--; } } case 4: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__avg_wgt); if (value) { values[4] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "roll_window") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1671; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_input = ((PyArrayObject *)values[0]); __pyx_v_weights = ((PyArrayObject *)values[1]); __pyx_v_minp = __Pyx_PyInt_AsInt(values[2]); if (unlikely((__pyx_v_minp == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1673; __pyx_clineno = __LINE__; goto __pyx_L3_error;} if (values[3]) { __pyx_v_avg = __Pyx_PyObject_IsTrue(values[3]); if (unlikely((__pyx_v_avg == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1673; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } else { /* "pandas/algos.pyx":1673 * def roll_window(ndarray[float64_t, ndim=1, cast=True] input, * ndarray[float64_t, ndim=1, cast=True] weights, * int minp, bint avg=True, bint avg_wgt=False): # <<<<<<<<<<<<<< * """ * Assume len(weights) << len(input) */ __pyx_v_avg = ((int)1); } if (values[4]) { __pyx_v_avg_wgt = __Pyx_PyObject_IsTrue(values[4]); if (unlikely((__pyx_v_avg_wgt == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1673; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } else { __pyx_v_avg_wgt = ((int)0); } } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("roll_window", 0, 3, 5, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1671; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.roll_window", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_input), __pyx_ptype_5numpy_ndarray, 1, "input", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1671; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_weights), __pyx_ptype_5numpy_ndarray, 1, "weights", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1672; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_54roll_window(__pyx_self, __pyx_v_input, __pyx_v_weights, __pyx_v_minp, __pyx_v_avg, __pyx_v_avg_wgt); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/algos.pyx":1671 * * * def roll_window(ndarray[float64_t, ndim=1, cast=True] input, # <<<<<<<<<<<<<< * ndarray[float64_t, ndim=1, cast=True] weights, * int minp, bint avg=True, bint avg_wgt=False): */ static PyObject *__pyx_pf_6pandas_5algos_54roll_window(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_input, PyArrayObject *__pyx_v_weights, int __pyx_v_minp, int __pyx_v_avg, int __pyx_v_avg_wgt) { PyArrayObject *__pyx_v_output = 0; PyArrayObject *__pyx_v_tot_wgt = 0; PyArrayObject *__pyx_v_counts = 0; Py_ssize_t __pyx_v_in_i; Py_ssize_t __pyx_v_win_i; Py_ssize_t __pyx_v_win_n; Py_ssize_t __pyx_v_in_n; __pyx_t_5numpy_float64_t __pyx_v_val_in; __pyx_t_5numpy_float64_t __pyx_v_val_win; __pyx_t_5numpy_float64_t __pyx_v_c; __pyx_t_5numpy_float64_t __pyx_v_w; __Pyx_LocalBuf_ND __pyx_pybuffernd_counts; __Pyx_Buffer __pyx_pybuffer_counts; __Pyx_LocalBuf_ND __pyx_pybuffernd_input; __Pyx_Buffer __pyx_pybuffer_input; __Pyx_LocalBuf_ND __pyx_pybuffernd_output; __Pyx_Buffer __pyx_pybuffer_output; __Pyx_LocalBuf_ND __pyx_pybuffernd_tot_wgt; __Pyx_Buffer __pyx_pybuffer_tot_wgt; __Pyx_LocalBuf_ND __pyx_pybuffernd_weights; __Pyx_Buffer __pyx_pybuffer_weights; 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; PyArrayObject *__pyx_t_6 = NULL; int __pyx_t_7; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; int __pyx_t_11; PyObject *__pyx_t_12 = NULL; 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; 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("roll_window", 0); __pyx_pybuffer_output.pybuffer.buf = NULL; __pyx_pybuffer_output.refcount = 0; __pyx_pybuffernd_output.data = NULL; __pyx_pybuffernd_output.rcbuffer = &__pyx_pybuffer_output; __pyx_pybuffer_tot_wgt.pybuffer.buf = NULL; __pyx_pybuffer_tot_wgt.refcount = 0; __pyx_pybuffernd_tot_wgt.data = NULL; __pyx_pybuffernd_tot_wgt.rcbuffer = &__pyx_pybuffer_tot_wgt; __pyx_pybuffer_counts.pybuffer.buf = NULL; __pyx_pybuffer_counts.refcount = 0; __pyx_pybuffernd_counts.data = NULL; __pyx_pybuffernd_counts.rcbuffer = &__pyx_pybuffer_counts; __pyx_pybuffer_input.pybuffer.buf = NULL; __pyx_pybuffer_input.refcount = 0; __pyx_pybuffernd_input.data = NULL; __pyx_pybuffernd_input.rcbuffer = &__pyx_pybuffer_input; __pyx_pybuffer_weights.pybuffer.buf = NULL; __pyx_pybuffer_weights.refcount = 0; __pyx_pybuffernd_weights.data = NULL; __pyx_pybuffernd_weights.rcbuffer = &__pyx_pybuffer_weights; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_input.rcbuffer->pybuffer, (PyObject*)__pyx_v_input, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 1, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1671; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_input.diminfo[0].strides = __pyx_pybuffernd_input.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_input.diminfo[0].shape = __pyx_pybuffernd_input.rcbuffer->pybuffer.shape[0]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_weights.rcbuffer->pybuffer, (PyObject*)__pyx_v_weights, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 1, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1671; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_weights.diminfo[0].strides = __pyx_pybuffernd_weights.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_weights.diminfo[0].shape = __pyx_pybuffernd_weights.rcbuffer->pybuffer.shape[0]; /* "pandas/algos.pyx":1682 * float64_t val_in, val_win, c, w * * in_n = len(input) # <<<<<<<<<<<<<< * win_n = len(weights) * output = np.zeros(in_n, dtype=float) */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_input)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1682; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_in_n = __pyx_t_1; /* "pandas/algos.pyx":1683 * * in_n = len(input) * win_n = len(weights) # <<<<<<<<<<<<<< * output = np.zeros(in_n, dtype=float) * counts = np.zeros(in_n, dtype=float) */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_weights)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1683; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_win_n = __pyx_t_1; /* "pandas/algos.pyx":1684 * in_n = len(input) * win_n = len(weights) * output = np.zeros(in_n, dtype=float) # <<<<<<<<<<<<<< * counts = np.zeros(in_n, dtype=float) * if avg: */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1684; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__zeros); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1684; __pyx_clineno = __LINE__; goto __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_in_n); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1684; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1684; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1684; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_2)); if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__dtype), ((PyObject *)((PyObject*)(&PyFloat_Type)))) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1684; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_5 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1684; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1684; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_6 = ((PyArrayObject *)__pyx_t_5); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_output.rcbuffer->pybuffer); __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_output.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_nn___pyx_t_5numpy_double_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_output.rcbuffer->pybuffer, (PyObject*)__pyx_v_output, &__Pyx_TypeInfo_nn___pyx_t_5numpy_double_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_pybuffernd_output.diminfo[0].strides = __pyx_pybuffernd_output.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_output.diminfo[0].shape = __pyx_pybuffernd_output.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1684; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_6 = 0; __pyx_v_output = ((PyArrayObject *)__pyx_t_5); __pyx_t_5 = 0; /* "pandas/algos.pyx":1685 * win_n = len(weights) * output = np.zeros(in_n, dtype=float) * counts = np.zeros(in_n, dtype=float) # <<<<<<<<<<<<<< * if avg: * tot_wgt = np.zeros(in_n, dtype=float) */ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1685; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s__zeros); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1685; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyInt_FromSsize_t(__pyx_v_in_n); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1685; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1685; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyDict_New(); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1685; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_5)); if (PyDict_SetItem(__pyx_t_5, ((PyObject *)__pyx_n_s__dtype), ((PyObject *)((PyObject*)(&PyFloat_Type)))) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1685; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_3 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_5)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1685; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1685; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_6 = ((PyArrayObject *)__pyx_t_3); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_counts.rcbuffer->pybuffer); __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_counts.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_nn___pyx_t_5numpy_double_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_counts.rcbuffer->pybuffer, (PyObject*)__pyx_v_counts, &__Pyx_TypeInfo_nn___pyx_t_5numpy_double_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_pybuffernd_counts.diminfo[0].strides = __pyx_pybuffernd_counts.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_counts.diminfo[0].shape = __pyx_pybuffernd_counts.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1685; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_6 = 0; __pyx_v_counts = ((PyArrayObject *)__pyx_t_3); __pyx_t_3 = 0; /* "pandas/algos.pyx":1686 * output = np.zeros(in_n, dtype=float) * counts = np.zeros(in_n, dtype=float) * if avg: # <<<<<<<<<<<<<< * tot_wgt = np.zeros(in_n, dtype=float) * */ __pyx_t_11 = (__pyx_v_avg != 0); if (__pyx_t_11) { /* "pandas/algos.pyx":1687 * counts = np.zeros(in_n, dtype=float) * if avg: * tot_wgt = np.zeros(in_n, dtype=float) # <<<<<<<<<<<<<< * * minp = _check_minp(len(weights), minp, in_n) */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1687; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s__zeros); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1687; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyInt_FromSsize_t(__pyx_v_in_n); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1687; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1687; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1687; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_3)); if (PyDict_SetItem(__pyx_t_3, ((PyObject *)__pyx_n_s__dtype), ((PyObject *)((PyObject*)(&PyFloat_Type)))) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1687; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_2 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_3)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1687; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __Pyx_DECREF(((PyObject *)__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_filename = __pyx_f[0]; __pyx_lineno = 1687; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_6 = ((PyArrayObject *)__pyx_t_2); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tot_wgt.rcbuffer->pybuffer); __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tot_wgt.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_nn___pyx_t_5numpy_double_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_tot_wgt.rcbuffer->pybuffer, (PyObject*)__pyx_v_tot_wgt, &__Pyx_TypeInfo_nn___pyx_t_5numpy_double_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_pybuffernd_tot_wgt.diminfo[0].strides = __pyx_pybuffernd_tot_wgt.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_tot_wgt.diminfo[0].shape = __pyx_pybuffernd_tot_wgt.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1687; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_6 = 0; __pyx_v_tot_wgt = ((PyArrayObject *)__pyx_t_2); __pyx_t_2 = 0; goto __pyx_L3; } __pyx_L3:; /* "pandas/algos.pyx":1689 * tot_wgt = np.zeros(in_n, dtype=float) * * minp = _check_minp(len(weights), minp, in_n) # <<<<<<<<<<<<<< * * if avg_wgt: */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s___check_minp); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1689; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_weights)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1689; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_3 = PyInt_FromSsize_t(__pyx_t_1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1689; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PyInt_FromLong(__pyx_v_minp); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1689; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = PyInt_FromSsize_t(__pyx_v_in_n); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1689; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_12 = PyTuple_New(3); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1689; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_12, 1, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_12, 2, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __pyx_t_3 = 0; __pyx_t_4 = 0; __pyx_t_5 = 0; __pyx_t_5 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_12), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1689; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_12)); __pyx_t_12 = 0; __pyx_t_7 = __Pyx_PyInt_AsInt(__pyx_t_5); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1689; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_v_minp = __pyx_t_7; /* "pandas/algos.pyx":1691 * minp = _check_minp(len(weights), minp, in_n) * * if avg_wgt: # <<<<<<<<<<<<<< * for win_i from 0 <= win_i < win_n: * val_win = weights[win_i] */ __pyx_t_11 = (__pyx_v_avg_wgt != 0); if (__pyx_t_11) { /* "pandas/algos.pyx":1692 * * if avg_wgt: * for win_i from 0 <= win_i < win_n: # <<<<<<<<<<<<<< * val_win = weights[win_i] * if val_win != val_win: */ __pyx_t_1 = __pyx_v_win_n; for (__pyx_v_win_i = 0; __pyx_v_win_i < __pyx_t_1; __pyx_v_win_i++) { /* "pandas/algos.pyx":1693 * if avg_wgt: * for win_i from 0 <= win_i < win_n: * val_win = weights[win_i] # <<<<<<<<<<<<<< * if val_win != val_win: * continue */ __pyx_t_13 = __pyx_v_win_i; __pyx_t_7 = -1; if (__pyx_t_13 < 0) { __pyx_t_13 += __pyx_pybuffernd_weights.diminfo[0].shape; if (unlikely(__pyx_t_13 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_13 >= __pyx_pybuffernd_weights.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1693; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_val_win = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_weights.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_weights.diminfo[0].strides)); /* "pandas/algos.pyx":1694 * for win_i from 0 <= win_i < win_n: * val_win = weights[win_i] * if val_win != val_win: # <<<<<<<<<<<<<< * continue * */ __pyx_t_11 = ((__pyx_v_val_win != __pyx_v_val_win) != 0); if (__pyx_t_11) { /* "pandas/algos.pyx":1695 * val_win = weights[win_i] * if val_win != val_win: * continue # <<<<<<<<<<<<<< * * for in_i from 0 <= in_i < in_n - (win_n - win_i) + 1: */ goto __pyx_L5_continue; goto __pyx_L7; } __pyx_L7:; /* "pandas/algos.pyx":1697 * continue * * for in_i from 0 <= in_i < in_n - (win_n - win_i) + 1: # <<<<<<<<<<<<<< * val_in = input[in_i] * if val_in == val_in: */ __pyx_t_14 = ((__pyx_v_in_n - (__pyx_v_win_n - __pyx_v_win_i)) + 1); for (__pyx_v_in_i = 0; __pyx_v_in_i < __pyx_t_14; __pyx_v_in_i++) { /* "pandas/algos.pyx":1698 * * for in_i from 0 <= in_i < in_n - (win_n - win_i) + 1: * val_in = input[in_i] # <<<<<<<<<<<<<< * if val_in == val_in: * output[in_i + (win_n - win_i) - 1] += val_in * val_win */ __pyx_t_15 = __pyx_v_in_i; __pyx_t_7 = -1; if (__pyx_t_15 < 0) { __pyx_t_15 += __pyx_pybuffernd_input.diminfo[0].shape; if (unlikely(__pyx_t_15 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_15 >= __pyx_pybuffernd_input.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1698; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_val_in = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_input.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_input.diminfo[0].strides)); /* "pandas/algos.pyx":1699 * for in_i from 0 <= in_i < in_n - (win_n - win_i) + 1: * val_in = input[in_i] * if val_in == val_in: # <<<<<<<<<<<<<< * output[in_i + (win_n - win_i) - 1] += val_in * val_win * counts[in_i + (win_n - win_i) - 1] += 1 */ __pyx_t_11 = ((__pyx_v_val_in == __pyx_v_val_in) != 0); if (__pyx_t_11) { /* "pandas/algos.pyx":1700 * val_in = input[in_i] * if val_in == val_in: * output[in_i + (win_n - win_i) - 1] += val_in * val_win # <<<<<<<<<<<<<< * counts[in_i + (win_n - win_i) - 1] += 1 * tot_wgt[in_i + (win_n - win_i) - 1] += val_win */ __pyx_t_16 = ((__pyx_v_in_i + (__pyx_v_win_n - __pyx_v_win_i)) - 1); __pyx_t_7 = -1; if (__pyx_t_16 < 0) { __pyx_t_16 += __pyx_pybuffernd_output.diminfo[0].shape; if (unlikely(__pyx_t_16 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_16 >= __pyx_pybuffernd_output.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1700; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_double_t *, __pyx_pybuffernd_output.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_output.diminfo[0].strides) += (__pyx_v_val_in * __pyx_v_val_win); /* "pandas/algos.pyx":1701 * if val_in == val_in: * output[in_i + (win_n - win_i) - 1] += val_in * val_win * counts[in_i + (win_n - win_i) - 1] += 1 # <<<<<<<<<<<<<< * tot_wgt[in_i + (win_n - win_i) - 1] += val_win * */ __pyx_t_17 = ((__pyx_v_in_i + (__pyx_v_win_n - __pyx_v_win_i)) - 1); __pyx_t_7 = -1; if (__pyx_t_17 < 0) { __pyx_t_17 += __pyx_pybuffernd_counts.diminfo[0].shape; if (unlikely(__pyx_t_17 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_17 >= __pyx_pybuffernd_counts.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1701; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_double_t *, __pyx_pybuffernd_counts.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_counts.diminfo[0].strides) += 1.0; /* "pandas/algos.pyx":1702 * output[in_i + (win_n - win_i) - 1] += val_in * val_win * counts[in_i + (win_n - win_i) - 1] += 1 * tot_wgt[in_i + (win_n - win_i) - 1] += val_win # <<<<<<<<<<<<<< * * for in_i from 0 <= in_i < in_n: */ __pyx_t_18 = ((__pyx_v_in_i + (__pyx_v_win_n - __pyx_v_win_i)) - 1); __pyx_t_7 = -1; if (__pyx_t_18 < 0) { __pyx_t_18 += __pyx_pybuffernd_tot_wgt.diminfo[0].shape; if (unlikely(__pyx_t_18 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_18 >= __pyx_pybuffernd_tot_wgt.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1702; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_double_t *, __pyx_pybuffernd_tot_wgt.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_tot_wgt.diminfo[0].strides) += __pyx_v_val_win; goto __pyx_L10; } __pyx_L10:; } __pyx_L5_continue:; } /* "pandas/algos.pyx":1704 * tot_wgt[in_i + (win_n - win_i) - 1] += val_win * * for in_i from 0 <= in_i < in_n: # <<<<<<<<<<<<<< * c = counts[in_i] * if c < minp: */ __pyx_t_1 = __pyx_v_in_n; for (__pyx_v_in_i = 0; __pyx_v_in_i < __pyx_t_1; __pyx_v_in_i++) { /* "pandas/algos.pyx":1705 * * for in_i from 0 <= in_i < in_n: * c = counts[in_i] # <<<<<<<<<<<<<< * if c < minp: * output[in_i] = NaN */ __pyx_t_14 = __pyx_v_in_i; __pyx_t_7 = -1; if (__pyx_t_14 < 0) { __pyx_t_14 += __pyx_pybuffernd_counts.diminfo[0].shape; if (unlikely(__pyx_t_14 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_14 >= __pyx_pybuffernd_counts.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1705; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_c = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_double_t *, __pyx_pybuffernd_counts.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_counts.diminfo[0].strides)); /* "pandas/algos.pyx":1706 * for in_i from 0 <= in_i < in_n: * c = counts[in_i] * if c < minp: # <<<<<<<<<<<<<< * output[in_i] = NaN * else: */ __pyx_t_11 = ((__pyx_v_c < __pyx_v_minp) != 0); if (__pyx_t_11) { /* "pandas/algos.pyx":1707 * c = counts[in_i] * if c < minp: * output[in_i] = NaN # <<<<<<<<<<<<<< * else: * w = tot_wgt[in_i] */ __pyx_t_19 = __pyx_v_in_i; __pyx_t_7 = -1; if (__pyx_t_19 < 0) { __pyx_t_19 += __pyx_pybuffernd_output.diminfo[0].shape; if (unlikely(__pyx_t_19 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_19 >= __pyx_pybuffernd_output.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1707; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_double_t *, __pyx_pybuffernd_output.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_output.diminfo[0].strides) = __pyx_v_6pandas_5algos_NaN; goto __pyx_L13; } /*else*/ { /* "pandas/algos.pyx":1709 * output[in_i] = NaN * else: * w = tot_wgt[in_i] # <<<<<<<<<<<<<< * if w == 0: * output[in_i] = NaN */ __pyx_t_20 = __pyx_v_in_i; __pyx_t_7 = -1; if (__pyx_t_20 < 0) { __pyx_t_20 += __pyx_pybuffernd_tot_wgt.diminfo[0].shape; if (unlikely(__pyx_t_20 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_20 >= __pyx_pybuffernd_tot_wgt.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1709; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_w = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_double_t *, __pyx_pybuffernd_tot_wgt.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_tot_wgt.diminfo[0].strides)); /* "pandas/algos.pyx":1710 * else: * w = tot_wgt[in_i] * if w == 0: # <<<<<<<<<<<<<< * output[in_i] = NaN * else: */ __pyx_t_11 = ((__pyx_v_w == 0.0) != 0); if (__pyx_t_11) { /* "pandas/algos.pyx":1711 * w = tot_wgt[in_i] * if w == 0: * output[in_i] = NaN # <<<<<<<<<<<<<< * else: * output[in_i] /= tot_wgt[in_i] */ __pyx_t_21 = __pyx_v_in_i; __pyx_t_7 = -1; if (__pyx_t_21 < 0) { __pyx_t_21 += __pyx_pybuffernd_output.diminfo[0].shape; if (unlikely(__pyx_t_21 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_21 >= __pyx_pybuffernd_output.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1711; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_double_t *, __pyx_pybuffernd_output.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_output.diminfo[0].strides) = __pyx_v_6pandas_5algos_NaN; goto __pyx_L14; } /*else*/ { /* "pandas/algos.pyx":1713 * output[in_i] = NaN * else: * output[in_i] /= tot_wgt[in_i] # <<<<<<<<<<<<<< * * else: */ __pyx_t_22 = __pyx_v_in_i; __pyx_t_7 = -1; if (__pyx_t_22 < 0) { __pyx_t_22 += __pyx_pybuffernd_tot_wgt.diminfo[0].shape; if (unlikely(__pyx_t_22 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_22 >= __pyx_pybuffernd_tot_wgt.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1713; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_23 = __pyx_v_in_i; __pyx_t_7 = -1; if (__pyx_t_23 < 0) { __pyx_t_23 += __pyx_pybuffernd_output.diminfo[0].shape; if (unlikely(__pyx_t_23 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_23 >= __pyx_pybuffernd_output.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1713; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_double_t *, __pyx_pybuffernd_output.rcbuffer->pybuffer.buf, __pyx_t_23, __pyx_pybuffernd_output.diminfo[0].strides) /= (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_double_t *, __pyx_pybuffernd_tot_wgt.rcbuffer->pybuffer.buf, __pyx_t_22, __pyx_pybuffernd_tot_wgt.diminfo[0].strides)); } __pyx_L14:; } __pyx_L13:; } goto __pyx_L4; } /*else*/ { /* "pandas/algos.pyx":1716 * * else: * for win_i from 0 <= win_i < win_n: # <<<<<<<<<<<<<< * val_win = weights[win_i] * if val_win != val_win: */ __pyx_t_1 = __pyx_v_win_n; for (__pyx_v_win_i = 0; __pyx_v_win_i < __pyx_t_1; __pyx_v_win_i++) { /* "pandas/algos.pyx":1717 * else: * for win_i from 0 <= win_i < win_n: * val_win = weights[win_i] # <<<<<<<<<<<<<< * if val_win != val_win: * continue */ __pyx_t_24 = __pyx_v_win_i; __pyx_t_7 = -1; if (__pyx_t_24 < 0) { __pyx_t_24 += __pyx_pybuffernd_weights.diminfo[0].shape; if (unlikely(__pyx_t_24 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_24 >= __pyx_pybuffernd_weights.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1717; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_val_win = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_weights.rcbuffer->pybuffer.buf, __pyx_t_24, __pyx_pybuffernd_weights.diminfo[0].strides)); /* "pandas/algos.pyx":1718 * for win_i from 0 <= win_i < win_n: * val_win = weights[win_i] * if val_win != val_win: # <<<<<<<<<<<<<< * continue * */ __pyx_t_11 = ((__pyx_v_val_win != __pyx_v_val_win) != 0); if (__pyx_t_11) { /* "pandas/algos.pyx":1719 * val_win = weights[win_i] * if val_win != val_win: * continue # <<<<<<<<<<<<<< * * for in_i from 0 <= in_i < in_n - (win_n - win_i) + 1: */ goto __pyx_L15_continue; goto __pyx_L17; } __pyx_L17:; /* "pandas/algos.pyx":1721 * continue * * for in_i from 0 <= in_i < in_n - (win_n - win_i) + 1: # <<<<<<<<<<<<<< * val_in = input[in_i] * */ __pyx_t_25 = ((__pyx_v_in_n - (__pyx_v_win_n - __pyx_v_win_i)) + 1); for (__pyx_v_in_i = 0; __pyx_v_in_i < __pyx_t_25; __pyx_v_in_i++) { /* "pandas/algos.pyx":1722 * * for in_i from 0 <= in_i < in_n - (win_n - win_i) + 1: * val_in = input[in_i] # <<<<<<<<<<<<<< * * if val_in == val_in: */ __pyx_t_26 = __pyx_v_in_i; __pyx_t_7 = -1; if (__pyx_t_26 < 0) { __pyx_t_26 += __pyx_pybuffernd_input.diminfo[0].shape; if (unlikely(__pyx_t_26 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_26 >= __pyx_pybuffernd_input.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1722; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_val_in = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_input.rcbuffer->pybuffer.buf, __pyx_t_26, __pyx_pybuffernd_input.diminfo[0].strides)); /* "pandas/algos.pyx":1724 * val_in = input[in_i] * * if val_in == val_in: # <<<<<<<<<<<<<< * output[in_i + (win_n - win_i) - 1] += val_in * val_win * counts[in_i + (win_n - win_i) - 1] += 1 */ __pyx_t_11 = ((__pyx_v_val_in == __pyx_v_val_in) != 0); if (__pyx_t_11) { /* "pandas/algos.pyx":1725 * * if val_in == val_in: * output[in_i + (win_n - win_i) - 1] += val_in * val_win # <<<<<<<<<<<<<< * counts[in_i + (win_n - win_i) - 1] += 1 * */ __pyx_t_27 = ((__pyx_v_in_i + (__pyx_v_win_n - __pyx_v_win_i)) - 1); __pyx_t_7 = -1; if (__pyx_t_27 < 0) { __pyx_t_27 += __pyx_pybuffernd_output.diminfo[0].shape; if (unlikely(__pyx_t_27 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_27 >= __pyx_pybuffernd_output.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1725; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_double_t *, __pyx_pybuffernd_output.rcbuffer->pybuffer.buf, __pyx_t_27, __pyx_pybuffernd_output.diminfo[0].strides) += (__pyx_v_val_in * __pyx_v_val_win); /* "pandas/algos.pyx":1726 * if val_in == val_in: * output[in_i + (win_n - win_i) - 1] += val_in * val_win * counts[in_i + (win_n - win_i) - 1] += 1 # <<<<<<<<<<<<<< * * for in_i from 0 <= in_i < in_n: */ __pyx_t_28 = ((__pyx_v_in_i + (__pyx_v_win_n - __pyx_v_win_i)) - 1); __pyx_t_7 = -1; if (__pyx_t_28 < 0) { __pyx_t_28 += __pyx_pybuffernd_counts.diminfo[0].shape; if (unlikely(__pyx_t_28 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_28 >= __pyx_pybuffernd_counts.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1726; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_double_t *, __pyx_pybuffernd_counts.rcbuffer->pybuffer.buf, __pyx_t_28, __pyx_pybuffernd_counts.diminfo[0].strides) += 1.0; goto __pyx_L20; } __pyx_L20:; } __pyx_L15_continue:; } /* "pandas/algos.pyx":1728 * counts[in_i + (win_n - win_i) - 1] += 1 * * for in_i from 0 <= in_i < in_n: # <<<<<<<<<<<<<< * c = counts[in_i] * if c < minp: */ __pyx_t_1 = __pyx_v_in_n; for (__pyx_v_in_i = 0; __pyx_v_in_i < __pyx_t_1; __pyx_v_in_i++) { /* "pandas/algos.pyx":1729 * * for in_i from 0 <= in_i < in_n: * c = counts[in_i] # <<<<<<<<<<<<<< * if c < minp: * output[in_i] = NaN */ __pyx_t_25 = __pyx_v_in_i; __pyx_t_7 = -1; if (__pyx_t_25 < 0) { __pyx_t_25 += __pyx_pybuffernd_counts.diminfo[0].shape; if (unlikely(__pyx_t_25 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_25 >= __pyx_pybuffernd_counts.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1729; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_c = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_double_t *, __pyx_pybuffernd_counts.rcbuffer->pybuffer.buf, __pyx_t_25, __pyx_pybuffernd_counts.diminfo[0].strides)); /* "pandas/algos.pyx":1730 * for in_i from 0 <= in_i < in_n: * c = counts[in_i] * if c < minp: # <<<<<<<<<<<<<< * output[in_i] = NaN * elif avg: */ __pyx_t_11 = ((__pyx_v_c < __pyx_v_minp) != 0); if (__pyx_t_11) { /* "pandas/algos.pyx":1731 * c = counts[in_i] * if c < minp: * output[in_i] = NaN # <<<<<<<<<<<<<< * elif avg: * output[in_i] /= c */ __pyx_t_29 = __pyx_v_in_i; __pyx_t_7 = -1; if (__pyx_t_29 < 0) { __pyx_t_29 += __pyx_pybuffernd_output.diminfo[0].shape; if (unlikely(__pyx_t_29 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_29 >= __pyx_pybuffernd_output.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1731; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_double_t *, __pyx_pybuffernd_output.rcbuffer->pybuffer.buf, __pyx_t_29, __pyx_pybuffernd_output.diminfo[0].strides) = __pyx_v_6pandas_5algos_NaN; goto __pyx_L23; } /* "pandas/algos.pyx":1732 * if c < minp: * output[in_i] = NaN * elif avg: # <<<<<<<<<<<<<< * output[in_i] /= c * */ __pyx_t_11 = (__pyx_v_avg != 0); if (__pyx_t_11) { /* "pandas/algos.pyx":1733 * output[in_i] = NaN * elif avg: * output[in_i] /= c # <<<<<<<<<<<<<< * * return output */ __pyx_t_30 = __pyx_v_in_i; __pyx_t_7 = -1; if (__pyx_t_30 < 0) { __pyx_t_30 += __pyx_pybuffernd_output.diminfo[0].shape; if (unlikely(__pyx_t_30 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_30 >= __pyx_pybuffernd_output.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1733; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_double_t *, __pyx_pybuffernd_output.rcbuffer->pybuffer.buf, __pyx_t_30, __pyx_pybuffernd_output.diminfo[0].strides) /= __pyx_v_c; goto __pyx_L23; } __pyx_L23:; } } __pyx_L4:; /* "pandas/algos.pyx":1735 * output[in_i] /= c * * return output # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_output)); __pyx_r = ((PyObject *)__pyx_v_output); goto __pyx_L0; __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_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_12); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_counts.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_input.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_output.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tot_wgt.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_weights.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.roll_window", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_counts.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_input.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_output.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tot_wgt.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_weights.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_output); __Pyx_XDECREF((PyObject *)__pyx_v_tot_wgt); __Pyx_XDECREF((PyObject *)__pyx_v_counts); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_57is_lexsorted(PyObject *__pyx_self, PyObject *__pyx_v_list_of_arrays); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_57is_lexsorted = {__Pyx_NAMESTR("is_lexsorted"), (PyCFunction)__pyx_pw_6pandas_5algos_57is_lexsorted, METH_O, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_57is_lexsorted(PyObject *__pyx_self, PyObject *__pyx_v_list_of_arrays) { CYTHON_UNUSED int __pyx_lineno = 0; CYTHON_UNUSED const char *__pyx_filename = NULL; CYTHON_UNUSED int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("is_lexsorted (wrapper)", 0); if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_list_of_arrays), (&PyList_Type), 1, "list_of_arrays", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1744; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_56is_lexsorted(__pyx_self, ((PyObject*)__pyx_v_list_of_arrays)); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/algos.pyx":1744 * @cython.wraparound(False) * @cython.boundscheck(False) * def is_lexsorted(list list_of_arrays): # <<<<<<<<<<<<<< * cdef: * int i */ static PyObject *__pyx_pf_6pandas_5algos_56is_lexsorted(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_list_of_arrays) { int __pyx_v_i; Py_ssize_t __pyx_v_n; Py_ssize_t __pyx_v_nlevels; __pyx_t_5numpy_int64_t __pyx_v_k; __pyx_t_5numpy_int64_t __pyx_v_cur; __pyx_t_5numpy_int64_t __pyx_v_pre; PyArrayObject *__pyx_v_arr = 0; __pyx_t_5numpy_int64_t **__pyx_v_vecs; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; PyObject *__pyx_t_2 = NULL; Py_ssize_t __pyx_t_3; int __pyx_t_4; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("is_lexsorted", 0); /* "pandas/algos.pyx":1751 * ndarray arr * * nlevels = len(list_of_arrays) # <<<<<<<<<<<<<< * n = len(list_of_arrays[0]) * */ if (unlikely(((PyObject *)__pyx_v_list_of_arrays) == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1751; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_1 = PyList_GET_SIZE(((PyObject *)__pyx_v_list_of_arrays)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1751; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_nlevels = __pyx_t_1; /* "pandas/algos.pyx":1752 * * nlevels = len(list_of_arrays) * n = len(list_of_arrays[0]) # <<<<<<<<<<<<<< * * cdef int64_t **vecs = malloc(nlevels * sizeof(int64_t*)) */ if (unlikely(((PyObject *)__pyx_v_list_of_arrays) == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1752; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_2 = PyList_GET_ITEM(__pyx_v_list_of_arrays, 0); __Pyx_INCREF(__pyx_t_2); __pyx_t_1 = PyObject_Length(__pyx_t_2); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1752; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_n = __pyx_t_1; /* "pandas/algos.pyx":1754 * n = len(list_of_arrays[0]) * * cdef int64_t **vecs = malloc(nlevels * sizeof(int64_t*)) # <<<<<<<<<<<<<< * for i from 0 <= i < nlevels: * # vecs[i] = ( list_of_arrays[i]).data */ __pyx_v_vecs = ((__pyx_t_5numpy_int64_t **)malloc((__pyx_v_nlevels * (sizeof(__pyx_t_5numpy_int64_t *))))); /* "pandas/algos.pyx":1755 * * cdef int64_t **vecs = malloc(nlevels * sizeof(int64_t*)) * for i from 0 <= i < nlevels: # <<<<<<<<<<<<<< * # vecs[i] = ( list_of_arrays[i]).data * */ __pyx_t_1 = __pyx_v_nlevels; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_1; __pyx_v_i++) { /* "pandas/algos.pyx":1758 * # vecs[i] = ( list_of_arrays[i]).data * * arr = list_of_arrays[i] # <<<<<<<<<<<<<< * vecs[i] = arr.data * # assume uniqueness?? */ if (unlikely(((PyObject *)__pyx_v_list_of_arrays) == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1758; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } if (!(likely(((PyList_GET_ITEM(__pyx_v_list_of_arrays, __pyx_v_i)) == Py_None) || likely(__Pyx_TypeTest(PyList_GET_ITEM(__pyx_v_list_of_arrays, __pyx_v_i), __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1758; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_2 = PyList_GET_ITEM(__pyx_v_list_of_arrays, __pyx_v_i); __Pyx_INCREF(__pyx_t_2); __Pyx_XDECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_2)); __pyx_t_2 = 0; /* "pandas/algos.pyx":1759 * * arr = list_of_arrays[i] * vecs[i] = arr.data # <<<<<<<<<<<<<< * # assume uniqueness?? * */ (__pyx_v_vecs[__pyx_v_i]) = ((__pyx_t_5numpy_int64_t *)__pyx_v_arr->data); } /* "pandas/algos.pyx":1762 * # assume uniqueness?? * * for i from 1 <= i < n: # <<<<<<<<<<<<<< * for k from 0 <= k < nlevels: * cur = vecs[k][i] */ __pyx_t_1 = __pyx_v_n; for (__pyx_v_i = 1; __pyx_v_i < __pyx_t_1; __pyx_v_i++) { /* "pandas/algos.pyx":1763 * * for i from 1 <= i < n: * for k from 0 <= k < nlevels: # <<<<<<<<<<<<<< * cur = vecs[k][i] * pre = vecs[k][i-1] */ __pyx_t_3 = __pyx_v_nlevels; for (__pyx_v_k = 0; __pyx_v_k < __pyx_t_3; __pyx_v_k++) { /* "pandas/algos.pyx":1764 * for i from 1 <= i < n: * for k from 0 <= k < nlevels: * cur = vecs[k][i] # <<<<<<<<<<<<<< * pre = vecs[k][i-1] * if cur == pre: */ __pyx_v_cur = ((__pyx_v_vecs[__pyx_v_k])[__pyx_v_i]); /* "pandas/algos.pyx":1765 * for k from 0 <= k < nlevels: * cur = vecs[k][i] * pre = vecs[k][i-1] # <<<<<<<<<<<<<< * if cur == pre: * continue */ __pyx_v_pre = ((__pyx_v_vecs[__pyx_v_k])[(__pyx_v_i - 1)]); /* "pandas/algos.pyx":1766 * cur = vecs[k][i] * pre = vecs[k][i-1] * if cur == pre: # <<<<<<<<<<<<<< * continue * elif cur > pre: */ __pyx_t_4 = ((__pyx_v_cur == __pyx_v_pre) != 0); if (__pyx_t_4) { /* "pandas/algos.pyx":1767 * pre = vecs[k][i-1] * if cur == pre: * continue # <<<<<<<<<<<<<< * elif cur > pre: * break */ goto __pyx_L7_continue; goto __pyx_L9; } /* "pandas/algos.pyx":1768 * if cur == pre: * continue * elif cur > pre: # <<<<<<<<<<<<<< * break * else: */ __pyx_t_4 = ((__pyx_v_cur > __pyx_v_pre) != 0); if (__pyx_t_4) { /* "pandas/algos.pyx":1769 * continue * elif cur > pre: * break # <<<<<<<<<<<<<< * else: * return False */ goto __pyx_L8_break; goto __pyx_L9; } /*else*/ { /* "pandas/algos.pyx":1771 * break * else: * return False # <<<<<<<<<<<<<< * free(vecs) * return True */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1771; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; } __pyx_L9:; __pyx_L7_continue:; } __pyx_L8_break:; } /* "pandas/algos.pyx":1772 * else: * return False * free(vecs) # <<<<<<<<<<<<<< * return True * */ free(__pyx_v_vecs); /* "pandas/algos.pyx":1773 * return False * free(vecs) * return True # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1773; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("pandas.algos.is_lexsorted", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_arr); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_59groupby_indices(PyObject *__pyx_self, PyObject *__pyx_v_values); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_59groupby_indices = {__Pyx_NAMESTR("groupby_indices"), (PyCFunction)__pyx_pw_6pandas_5algos_59groupby_indices, METH_O, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_59groupby_indices(PyObject *__pyx_self, PyObject *__pyx_v_values) { CYTHON_UNUSED int __pyx_lineno = 0; CYTHON_UNUSED const char *__pyx_filename = NULL; CYTHON_UNUSED int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("groupby_indices (wrapper)", 0); if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1777; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_58groupby_indices(__pyx_self, ((PyArrayObject *)__pyx_v_values)); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/algos.pyx":1777 * * @cython.boundscheck(False) * def groupby_indices(ndarray values): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = len(values) */ static PyObject *__pyx_pf_6pandas_5algos_58groupby_indices(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_n; PyArrayObject *__pyx_v_labels = 0; PyArrayObject *__pyx_v_counts = 0; PyArrayObject *__pyx_v_arr = 0; PyArrayObject *__pyx_v_seen = 0; __pyx_t_5numpy_int64_t __pyx_v_loc; PyObject *__pyx_v_ids = 0; __pyx_t_5numpy_int64_t __pyx_v_k; __pyx_t_5numpy_int64_t **__pyx_v_vecs; PyObject *__pyx_v_result = NULL; __Pyx_LocalBuf_ND __pyx_pybuffernd_arr; __Pyx_Buffer __pyx_pybuffer_arr; __Pyx_LocalBuf_ND __pyx_pybuffernd_counts; __Pyx_Buffer __pyx_pybuffer_counts; __Pyx_LocalBuf_ND __pyx_pybuffernd_labels; __Pyx_Buffer __pyx_pybuffer_labels; __Pyx_LocalBuf_ND __pyx_pybuffernd_seen; __Pyx_Buffer __pyx_pybuffer_seen; 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; PyObject *(*__pyx_t_7)(PyObject *); PyArrayObject *__pyx_t_8 = NULL; int __pyx_t_9; PyObject *__pyx_t_10 = NULL; PyObject *__pyx_t_11 = NULL; PyObject *__pyx_t_12 = NULL; Py_ssize_t __pyx_t_13; Py_ssize_t __pyx_t_14; int __pyx_t_15; __pyx_t_5numpy_int64_t __pyx_t_16; __pyx_t_5numpy_int64_t __pyx_t_17; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("groupby_indices", 0); __pyx_pybuffer_labels.pybuffer.buf = NULL; __pyx_pybuffer_labels.refcount = 0; __pyx_pybuffernd_labels.data = NULL; __pyx_pybuffernd_labels.rcbuffer = &__pyx_pybuffer_labels; __pyx_pybuffer_counts.pybuffer.buf = NULL; __pyx_pybuffer_counts.refcount = 0; __pyx_pybuffernd_counts.data = NULL; __pyx_pybuffernd_counts.rcbuffer = &__pyx_pybuffer_counts; __pyx_pybuffer_arr.pybuffer.buf = NULL; __pyx_pybuffer_arr.refcount = 0; __pyx_pybuffernd_arr.data = NULL; __pyx_pybuffernd_arr.rcbuffer = &__pyx_pybuffer_arr; __pyx_pybuffer_seen.pybuffer.buf = NULL; __pyx_pybuffer_seen.refcount = 0; __pyx_pybuffernd_seen.data = NULL; __pyx_pybuffernd_seen.rcbuffer = &__pyx_pybuffer_seen; /* "pandas/algos.pyx":1779 * def groupby_indices(ndarray values): * cdef: * Py_ssize_t i, n = len(values) # <<<<<<<<<<<<<< * ndarray[int64_t] labels, counts, arr, seen * int64_t loc */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1779; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/algos.pyx":1782 * ndarray[int64_t] labels, counts, arr, seen * int64_t loc * dict ids = {} # <<<<<<<<<<<<<< * object val * int64_t k */ __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1782; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_2)); __pyx_v_ids = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; /* "pandas/algos.pyx":1786 * int64_t k * * ids, labels, counts = group_labels(values) # <<<<<<<<<<<<<< * seen = np.zeros_like(counts) * */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__group_labels); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1786; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1786; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(((PyObject *)__pyx_v_values)); PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_v_values)); __Pyx_GIVEREF(((PyObject *)__pyx_v_values)); __pyx_t_4 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1786; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; if ((likely(PyTuple_CheckExact(__pyx_t_4))) || (PyList_CheckExact(__pyx_t_4))) { PyObject* sequence = __pyx_t_4; #if CYTHON_COMPILING_IN_CPYTHON Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 3)) { if (size > 3) __Pyx_RaiseTooManyValuesError(3); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1786; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_2 = PyTuple_GET_ITEM(sequence, 1); __pyx_t_5 = PyTuple_GET_ITEM(sequence, 2); } else { __pyx_t_3 = PyList_GET_ITEM(sequence, 0); __pyx_t_2 = PyList_GET_ITEM(sequence, 1); __pyx_t_5 = PyList_GET_ITEM(sequence, 2); } __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(__pyx_t_5); #else __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1786; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1786; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1786; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); #endif __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else { Py_ssize_t index = -1; __pyx_t_6 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1786; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_7 = Py_TYPE(__pyx_t_6)->tp_iternext; index = 0; __pyx_t_3 = __pyx_t_7(__pyx_t_6); if (unlikely(!__pyx_t_3)) goto __pyx_L3_unpacking_failed; __Pyx_GOTREF(__pyx_t_3); index = 1; __pyx_t_2 = __pyx_t_7(__pyx_t_6); if (unlikely(!__pyx_t_2)) goto __pyx_L3_unpacking_failed; __Pyx_GOTREF(__pyx_t_2); index = 2; __pyx_t_5 = __pyx_t_7(__pyx_t_6); if (unlikely(!__pyx_t_5)) goto __pyx_L3_unpacking_failed; __Pyx_GOTREF(__pyx_t_5); if (__Pyx_IternextUnpackEndCheck(__pyx_t_7(__pyx_t_6), 3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1786; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_7 = NULL; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; goto __pyx_L4_unpacking_done; __pyx_L3_unpacking_failed:; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_7 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1786; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_L4_unpacking_done:; } if (!(likely(PyDict_CheckExact(__pyx_t_3))||((__pyx_t_3) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected dict, got %.200s", Py_TYPE(__pyx_t_3)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1786; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1786; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1786; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF_SET(__pyx_v_ids, ((PyObject*)__pyx_t_3)); __pyx_t_3 = 0; __pyx_t_8 = ((PyArrayObject *)__pyx_t_2); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_labels.rcbuffer->pybuffer); __pyx_t_9 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_labels.rcbuffer->pybuffer, (PyObject*)__pyx_t_8, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_9 < 0)) { PyErr_Fetch(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_labels.rcbuffer->pybuffer, (PyObject*)__pyx_v_labels, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_11); Py_XDECREF(__pyx_t_12); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_10, __pyx_t_11, __pyx_t_12); } } __pyx_pybuffernd_labels.diminfo[0].strides = __pyx_pybuffernd_labels.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_labels.diminfo[0].shape = __pyx_pybuffernd_labels.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1786; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_8 = 0; __pyx_v_labels = ((PyArrayObject *)__pyx_t_2); __pyx_t_2 = 0; __pyx_t_8 = ((PyArrayObject *)__pyx_t_5); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_counts.rcbuffer->pybuffer); __pyx_t_9 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_counts.rcbuffer->pybuffer, (PyObject*)__pyx_t_8, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_9 < 0)) { PyErr_Fetch(&__pyx_t_12, &__pyx_t_11, &__pyx_t_10); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_counts.rcbuffer->pybuffer, (PyObject*)__pyx_v_counts, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_12); Py_XDECREF(__pyx_t_11); Py_XDECREF(__pyx_t_10); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_12, __pyx_t_11, __pyx_t_10); } } __pyx_pybuffernd_counts.diminfo[0].strides = __pyx_pybuffernd_counts.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_counts.diminfo[0].shape = __pyx_pybuffernd_counts.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1786; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_8 = 0; __pyx_v_counts = ((PyArrayObject *)__pyx_t_5); __pyx_t_5 = 0; /* "pandas/algos.pyx":1787 * * ids, labels, counts = group_labels(values) * seen = np.zeros_like(counts) # <<<<<<<<<<<<<< * * # try not to get in trouble here... */ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1787; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s__zeros_like); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1787; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1787; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(((PyObject *)__pyx_v_counts)); PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_v_counts)); __Pyx_GIVEREF(((PyObject *)__pyx_v_counts)); __pyx_t_2 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1787; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(((PyObject *)__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_filename = __pyx_f[0]; __pyx_lineno = 1787; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_8 = ((PyArrayObject *)__pyx_t_2); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_seen.rcbuffer->pybuffer); __pyx_t_9 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_seen.rcbuffer->pybuffer, (PyObject*)__pyx_t_8, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_9 < 0)) { PyErr_Fetch(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_seen.rcbuffer->pybuffer, (PyObject*)__pyx_v_seen, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_11); Py_XDECREF(__pyx_t_12); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_10, __pyx_t_11, __pyx_t_12); } } __pyx_pybuffernd_seen.diminfo[0].strides = __pyx_pybuffernd_seen.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_seen.diminfo[0].shape = __pyx_pybuffernd_seen.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1787; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_8 = 0; __pyx_v_seen = ((PyArrayObject *)__pyx_t_2); __pyx_t_2 = 0; /* "pandas/algos.pyx":1790 * * # try not to get in trouble here... * cdef int64_t **vecs = malloc(len(ids) * sizeof(int64_t*)) # <<<<<<<<<<<<<< * result = {} * for i from 0 <= i < len(counts): */ if (unlikely(((PyObject *)__pyx_v_ids) == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1790; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_1 = PyDict_Size(((PyObject *)__pyx_v_ids)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1790; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_vecs = ((__pyx_t_5numpy_int64_t **)malloc((__pyx_t_1 * (sizeof(__pyx_t_5numpy_int64_t *))))); /* "pandas/algos.pyx":1791 * # try not to get in trouble here... * cdef int64_t **vecs = malloc(len(ids) * sizeof(int64_t*)) * result = {} # <<<<<<<<<<<<<< * for i from 0 <= i < len(counts): * arr = np.empty(counts[i], dtype=np.int64) */ __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1791; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_2)); __pyx_v_result = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; /* "pandas/algos.pyx":1792 * cdef int64_t **vecs = malloc(len(ids) * sizeof(int64_t*)) * result = {} * for i from 0 <= i < len(counts): # <<<<<<<<<<<<<< * arr = np.empty(counts[i], dtype=np.int64) * result[ids[i]] = arr */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_counts)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1792; __pyx_clineno = __LINE__; goto __pyx_L1_error;} for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_1; __pyx_v_i++) { /* "pandas/algos.pyx":1793 * result = {} * for i from 0 <= i < len(counts): * arr = np.empty(counts[i], dtype=np.int64) # <<<<<<<<<<<<<< * result[ids[i]] = arr * vecs[i] = arr.data */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1793; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__empty); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1793; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_13 = __pyx_v_i; if (__pyx_t_13 < 0) __pyx_t_13 += __pyx_pybuffernd_counts.diminfo[0].shape; __pyx_t_2 = __Pyx_PyInt_to_py_npy_int64((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_counts.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_counts.diminfo[0].strides))); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1793; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1793; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1793; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_2)); __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1793; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s__int64); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1793; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__dtype), __pyx_t_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1793; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_5), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1793; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; __Pyx_DECREF(((PyObject *)__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_filename = __pyx_f[0]; __pyx_lineno = 1793; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_8 = ((PyArrayObject *)__pyx_t_6); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_arr.rcbuffer->pybuffer); __pyx_t_9 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_arr.rcbuffer->pybuffer, (PyObject*)__pyx_t_8, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_9 < 0)) { PyErr_Fetch(&__pyx_t_12, &__pyx_t_11, &__pyx_t_10); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_arr.rcbuffer->pybuffer, (PyObject*)__pyx_v_arr, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_12); Py_XDECREF(__pyx_t_11); Py_XDECREF(__pyx_t_10); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_12, __pyx_t_11, __pyx_t_10); } } __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]; if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1793; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_8 = 0; __Pyx_XDECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_6)); __pyx_t_6 = 0; /* "pandas/algos.pyx":1794 * for i from 0 <= i < len(counts): * arr = np.empty(counts[i], dtype=np.int64) * result[ids[i]] = arr # <<<<<<<<<<<<<< * vecs[i] = arr.data * */ if (unlikely(((PyObject *)__pyx_v_ids) == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1794; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_6 = __Pyx_GetItemInt(((PyObject *)__pyx_v_ids), __pyx_v_i, sizeof(Py_ssize_t), PyInt_FromSsize_t, 0, 1, 0); if (!__pyx_t_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1794; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); if (PyDict_SetItem(((PyObject *)__pyx_v_result), __pyx_t_6, ((PyObject *)__pyx_v_arr)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1794; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; /* "pandas/algos.pyx":1795 * arr = np.empty(counts[i], dtype=np.int64) * result[ids[i]] = arr * vecs[i] = arr.data # <<<<<<<<<<<<<< * * for i from 0 <= i < n: */ (__pyx_v_vecs[__pyx_v_i]) = ((__pyx_t_5numpy_int64_t *)__pyx_v_arr->data); } /* "pandas/algos.pyx":1797 * vecs[i] = arr.data * * for i from 0 <= i < n: # <<<<<<<<<<<<<< * k = labels[i] * */ __pyx_t_1 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_1; __pyx_v_i++) { /* "pandas/algos.pyx":1798 * * for i from 0 <= i < n: * k = labels[i] # <<<<<<<<<<<<<< * * # was NaN */ __pyx_t_14 = __pyx_v_i; if (__pyx_t_14 < 0) __pyx_t_14 += __pyx_pybuffernd_labels.diminfo[0].shape; __pyx_v_k = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_labels.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_labels.diminfo[0].strides)); /* "pandas/algos.pyx":1801 * * # was NaN * if k == -1: # <<<<<<<<<<<<<< * continue * */ __pyx_t_15 = ((__pyx_v_k == -1) != 0); if (__pyx_t_15) { /* "pandas/algos.pyx":1802 * # was NaN * if k == -1: * continue # <<<<<<<<<<<<<< * * loc = seen[k] */ goto __pyx_L7_continue; goto __pyx_L9; } __pyx_L9:; /* "pandas/algos.pyx":1804 * continue * * loc = seen[k] # <<<<<<<<<<<<<< * vecs[k][loc] = i * seen[k] = loc + 1 */ __pyx_t_16 = __pyx_v_k; if (__pyx_t_16 < 0) __pyx_t_16 += __pyx_pybuffernd_seen.diminfo[0].shape; __pyx_v_loc = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_seen.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_seen.diminfo[0].strides)); /* "pandas/algos.pyx":1805 * * loc = seen[k] * vecs[k][loc] = i # <<<<<<<<<<<<<< * seen[k] = loc + 1 * */ ((__pyx_v_vecs[__pyx_v_k])[__pyx_v_loc]) = __pyx_v_i; /* "pandas/algos.pyx":1806 * loc = seen[k] * vecs[k][loc] = i * seen[k] = loc + 1 # <<<<<<<<<<<<<< * * free(vecs) */ __pyx_t_17 = __pyx_v_k; if (__pyx_t_17 < 0) __pyx_t_17 += __pyx_pybuffernd_seen.diminfo[0].shape; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_seen.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_seen.diminfo[0].strides) = (__pyx_v_loc + 1); __pyx_L7_continue:; } /* "pandas/algos.pyx":1808 * seen[k] = loc + 1 * * free(vecs) # <<<<<<<<<<<<<< * * return result */ free(__pyx_v_vecs); /* "pandas/algos.pyx":1810 * free(vecs) * * return result # <<<<<<<<<<<<<< * * @cython.wraparound(False) */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_result)); __pyx_r = ((PyObject *)__pyx_v_result); goto __pyx_L0; __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_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_arr.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_counts.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_labels.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_seen.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.groupby_indices", __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_counts.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_labels.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_seen.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_labels); __Pyx_XDECREF((PyObject *)__pyx_v_counts); __Pyx_XDECREF((PyObject *)__pyx_v_arr); __Pyx_XDECREF((PyObject *)__pyx_v_seen); __Pyx_XDECREF(__pyx_v_ids); __Pyx_XDECREF(__pyx_v_result); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_61group_labels(PyObject *__pyx_self, PyObject *__pyx_v_values); /*proto*/ static char __pyx_doc_6pandas_5algos_60group_labels[] = "\n Compute label vector from input values and associated useful data\n\n Returns\n -------\n "; static PyMethodDef __pyx_mdef_6pandas_5algos_61group_labels = {__Pyx_NAMESTR("group_labels"), (PyCFunction)__pyx_pw_6pandas_5algos_61group_labels, METH_O, __Pyx_DOCSTR(__pyx_doc_6pandas_5algos_60group_labels)}; static PyObject *__pyx_pw_6pandas_5algos_61group_labels(PyObject *__pyx_self, PyObject *__pyx_v_values) { CYTHON_UNUSED int __pyx_lineno = 0; CYTHON_UNUSED const char *__pyx_filename = NULL; CYTHON_UNUSED int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("group_labels (wrapper)", 0); if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1814; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_60group_labels(__pyx_self, ((PyArrayObject *)__pyx_v_values)); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/algos.pyx":1814 * @cython.wraparound(False) * @cython.boundscheck(False) * def group_labels(ndarray[object] values): # <<<<<<<<<<<<<< * ''' * Compute label vector from input values and associated useful data */ static PyObject *__pyx_pf_6pandas_5algos_60group_labels(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_n; PyArrayObject *__pyx_v_labels = 0; PyArrayObject *__pyx_v_counts = 0; PyObject *__pyx_v_ids = 0; PyObject *__pyx_v_reverse = 0; __pyx_t_5numpy_int64_t __pyx_v_idx; PyObject *__pyx_v_val = 0; __pyx_t_5numpy_int64_t __pyx_v_count; __Pyx_LocalBuf_ND __pyx_pybuffernd_counts; __Pyx_Buffer __pyx_pybuffer_counts; __Pyx_LocalBuf_ND __pyx_pybuffernd_labels; __Pyx_Buffer __pyx_pybuffer_labels; __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; PyArrayObject *__pyx_t_8 = NULL; Py_ssize_t __pyx_t_9; int __pyx_t_10; Py_ssize_t __pyx_t_11; int __pyx_t_12; __pyx_t_5numpy_int64_t __pyx_t_13; Py_ssize_t __pyx_t_14; __pyx_t_5numpy_int64_t __pyx_t_15; Py_ssize_t __pyx_t_16; __pyx_t_5numpy_int64_t __pyx_t_17; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("group_labels", 0); __pyx_pybuffer_labels.pybuffer.buf = NULL; __pyx_pybuffer_labels.refcount = 0; __pyx_pybuffernd_labels.data = NULL; __pyx_pybuffernd_labels.rcbuffer = &__pyx_pybuffer_labels; __pyx_pybuffer_counts.pybuffer.buf = NULL; __pyx_pybuffer_counts.refcount = 0; __pyx_pybuffernd_counts.data = NULL; __pyx_pybuffernd_counts.rcbuffer = &__pyx_pybuffer_counts; __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_filename = __pyx_f[0]; __pyx_lineno = 1814; __pyx_clineno = __LINE__; goto __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/algos.pyx":1822 * ''' * cdef: * Py_ssize_t i, n = len(values) # <<<<<<<<<<<<<< * ndarray[int64_t] labels = np.empty(n, dtype=np.int64) * ndarray[int64_t] counts = np.empty(n, dtype=np.int64) */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1822; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/algos.pyx":1823 * cdef: * Py_ssize_t i, n = len(values) * ndarray[int64_t] labels = np.empty(n, dtype=np.int64) # <<<<<<<<<<<<<< * ndarray[int64_t] counts = np.empty(n, dtype=np.int64) * dict ids = {}, reverse = {} */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1823; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 1823; __pyx_clineno = __LINE__; goto __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_n); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1823; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1823; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1823; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_2)); __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1823; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s__int64); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1823; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__dtype), __pyx_t_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1823; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1823; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __Pyx_DECREF(((PyObject *)__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_filename = __pyx_f[0]; __pyx_lineno = 1823; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_7 = ((PyArrayObject *)__pyx_t_6); { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_labels.rcbuffer->pybuffer, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { __pyx_v_labels = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_labels.rcbuffer->pybuffer.buf = NULL; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1823; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } else {__pyx_pybuffernd_labels.diminfo[0].strides = __pyx_pybuffernd_labels.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_labels.diminfo[0].shape = __pyx_pybuffernd_labels.rcbuffer->pybuffer.shape[0]; } } __pyx_t_7 = 0; __pyx_v_labels = ((PyArrayObject *)__pyx_t_6); __pyx_t_6 = 0; /* "pandas/algos.pyx":1824 * Py_ssize_t i, n = len(values) * ndarray[int64_t] labels = np.empty(n, dtype=np.int64) * ndarray[int64_t] counts = np.empty(n, dtype=np.int64) # <<<<<<<<<<<<<< * dict ids = {}, reverse = {} * int64_t idx */ __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1824; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s__empty); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1824; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyInt_FromSsize_t(__pyx_v_n); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1824; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1824; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyDict_New(); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1824; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_6)); __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1824; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s__int64); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1824; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (PyDict_SetItem(__pyx_t_6, ((PyObject *)__pyx_n_s__dtype), __pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1824; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_6)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1824; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0; if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1824; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_8 = ((PyArrayObject *)__pyx_t_5); { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_counts.rcbuffer->pybuffer, (PyObject*)__pyx_t_8, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { __pyx_v_counts = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_counts.rcbuffer->pybuffer.buf = NULL; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1824; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } else {__pyx_pybuffernd_counts.diminfo[0].strides = __pyx_pybuffernd_counts.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_counts.diminfo[0].shape = __pyx_pybuffernd_counts.rcbuffer->pybuffer.shape[0]; } } __pyx_t_8 = 0; __pyx_v_counts = ((PyArrayObject *)__pyx_t_5); __pyx_t_5 = 0; /* "pandas/algos.pyx":1825 * ndarray[int64_t] labels = np.empty(n, dtype=np.int64) * ndarray[int64_t] counts = np.empty(n, dtype=np.int64) * dict ids = {}, reverse = {} # <<<<<<<<<<<<<< * int64_t idx * object val */ __pyx_t_5 = PyDict_New(); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1825; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_5)); __pyx_v_ids = ((PyObject*)__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyDict_New(); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1825; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_5)); __pyx_v_reverse = ((PyObject*)__pyx_t_5); __pyx_t_5 = 0; /* "pandas/algos.pyx":1828 * int64_t idx * object val * int64_t count = 0 # <<<<<<<<<<<<<< * * for i from 0 <= i < n: */ __pyx_v_count = 0; /* "pandas/algos.pyx":1830 * int64_t count = 0 * * for i from 0 <= i < n: # <<<<<<<<<<<<<< * val = values[i] * */ __pyx_t_1 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_1; __pyx_v_i++) { /* "pandas/algos.pyx":1831 * * for i from 0 <= i < n: * val = values[i] # <<<<<<<<<<<<<< * * # is NaN */ __pyx_t_9 = __pyx_v_i; __pyx_t_5 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_9, __pyx_pybuffernd_values.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_5); __Pyx_XDECREF_SET(__pyx_v_val, __pyx_t_5); __pyx_t_5 = 0; /* "pandas/algos.pyx":1834 * * # is NaN * if val != val: # <<<<<<<<<<<<<< * labels[i] = -1 * continue */ __pyx_t_5 = PyObject_RichCompare(__pyx_v_val, __pyx_v_val, Py_NE); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1834; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1834; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_10) { /* "pandas/algos.pyx":1835 * # is NaN * if val != val: * labels[i] = -1 # <<<<<<<<<<<<<< * continue * */ __pyx_t_11 = __pyx_v_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_labels.rcbuffer->pybuffer.buf, __pyx_t_11, __pyx_pybuffernd_labels.diminfo[0].strides) = -1; /* "pandas/algos.pyx":1836 * if val != val: * labels[i] = -1 * continue # <<<<<<<<<<<<<< * * # for large number of groups, not doing try: except: makes a big */ goto __pyx_L3_continue; goto __pyx_L5; } __pyx_L5:; /* "pandas/algos.pyx":1840 * # for large number of groups, not doing try: except: makes a big * # difference * if val in ids: # <<<<<<<<<<<<<< * idx = ids[val] * labels[i] = idx */ __pyx_t_10 = (__Pyx_PyDict_Contains(__pyx_v_val, ((PyObject *)__pyx_v_ids), Py_EQ)); if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1840; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_12 = (__pyx_t_10 != 0); if (__pyx_t_12) { /* "pandas/algos.pyx":1841 * # difference * if val in ids: * idx = ids[val] # <<<<<<<<<<<<<< * labels[i] = idx * counts[idx] = counts[idx] + 1 */ __pyx_t_5 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_ids), __pyx_v_val); if (!__pyx_t_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1841; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_13 = __Pyx_PyInt_from_py_npy_int64(__pyx_t_5); if (unlikely((__pyx_t_13 == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1841; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_v_idx = __pyx_t_13; /* "pandas/algos.pyx":1842 * if val in ids: * idx = ids[val] * labels[i] = idx # <<<<<<<<<<<<<< * counts[idx] = counts[idx] + 1 * else: */ __pyx_t_14 = __pyx_v_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_labels.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_labels.diminfo[0].strides) = __pyx_v_idx; /* "pandas/algos.pyx":1843 * idx = ids[val] * labels[i] = idx * counts[idx] = counts[idx] + 1 # <<<<<<<<<<<<<< * else: * ids[val] = count */ __pyx_t_13 = __pyx_v_idx; __pyx_t_15 = __pyx_v_idx; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_counts.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_counts.diminfo[0].strides) = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_counts.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_counts.diminfo[0].strides)) + 1); goto __pyx_L6; } /*else*/ { /* "pandas/algos.pyx":1845 * counts[idx] = counts[idx] + 1 * else: * ids[val] = count # <<<<<<<<<<<<<< * reverse[count] = val * labels[i] = count */ __pyx_t_5 = __Pyx_PyInt_to_py_npy_int64(__pyx_v_count); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1845; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); if (PyDict_SetItem(((PyObject *)__pyx_v_ids), __pyx_v_val, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1845; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "pandas/algos.pyx":1846 * else: * ids[val] = count * reverse[count] = val # <<<<<<<<<<<<<< * labels[i] = count * counts[count] = 1 */ if (__Pyx_SetItemInt(((PyObject *)__pyx_v_reverse), __pyx_v_count, __pyx_v_val, sizeof(__pyx_t_5numpy_int64_t), __Pyx_PyInt_to_py_npy_int64, 0, 0, 0) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1846; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/algos.pyx":1847 * ids[val] = count * reverse[count] = val * labels[i] = count # <<<<<<<<<<<<<< * counts[count] = 1 * count += 1 */ __pyx_t_16 = __pyx_v_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_labels.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_labels.diminfo[0].strides) = __pyx_v_count; /* "pandas/algos.pyx":1848 * reverse[count] = val * labels[i] = count * counts[count] = 1 # <<<<<<<<<<<<<< * count += 1 * */ __pyx_t_17 = __pyx_v_count; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_counts.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_counts.diminfo[0].strides) = 1; /* "pandas/algos.pyx":1849 * labels[i] = count * counts[count] = 1 * count += 1 # <<<<<<<<<<<<<< * * return reverse, labels, counts[:count].copy() */ __pyx_v_count = (__pyx_v_count + 1); } __pyx_L6:; __pyx_L3_continue:; } /* "pandas/algos.pyx":1851 * count += 1 * * return reverse, labels, counts[:count].copy() # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_5 = __Pyx_PyObject_GetSlice(((PyObject *)__pyx_v_counts), 0, __pyx_v_count, NULL, NULL, NULL, 0, 1, 0); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1851; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s__copy); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1851; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1851; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1851; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(((PyObject *)__pyx_v_reverse)); PyTuple_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_v_reverse)); __Pyx_GIVEREF(((PyObject *)__pyx_v_reverse)); __Pyx_INCREF(((PyObject *)__pyx_v_labels)); PyTuple_SET_ITEM(__pyx_t_6, 1, ((PyObject *)__pyx_v_labels)); __Pyx_GIVEREF(((PyObject *)__pyx_v_labels)); PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_r = ((PyObject *)__pyx_t_6); __pyx_t_6 = 0; goto __pyx_L0; __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_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_counts.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_labels.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.group_labels", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_counts.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_labels.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_labels); __Pyx_XDECREF((PyObject *)__pyx_v_counts); __Pyx_XDECREF(__pyx_v_ids); __Pyx_XDECREF(__pyx_v_reverse); __Pyx_XDECREF(__pyx_v_val); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_63groupsort_indexer(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_63groupsort_indexer = {__Pyx_NAMESTR("groupsort_indexer"), (PyCFunction)__pyx_pw_6pandas_5algos_63groupsort_indexer, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_63groupsort_indexer(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_index = 0; Py_ssize_t __pyx_v_ngroups; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("groupsort_indexer (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__index,&__pyx_n_s__ngroups,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__index)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__ngroups)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("groupsort_indexer", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1856; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "groupsort_indexer") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1856; __pyx_clineno = __LINE__; goto __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_index = ((PyArrayObject *)values[0]); __pyx_v_ngroups = __Pyx_PyIndex_AsSsize_t(values[1]); if (unlikely((__pyx_v_ngroups == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1856; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("groupsort_indexer", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1856; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.groupsort_indexer", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_index), __pyx_ptype_5numpy_ndarray, 1, "index", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1856; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_62groupsort_indexer(__pyx_self, __pyx_v_index, __pyx_v_ngroups); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/algos.pyx":1856 * @cython.boundscheck(False) * @cython.wraparound(False) * def groupsort_indexer(ndarray[int64_t] index, Py_ssize_t ngroups): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, loc, label, n */ static PyObject *__pyx_pf_6pandas_5algos_62groupsort_indexer(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_index, Py_ssize_t __pyx_v_ngroups) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_label; Py_ssize_t __pyx_v_n; PyArrayObject *__pyx_v_counts = 0; PyArrayObject *__pyx_v_where = 0; PyArrayObject *__pyx_v_result = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_counts; __Pyx_Buffer __pyx_pybuffer_counts; __Pyx_LocalBuf_ND __pyx_pybuffernd_index; __Pyx_Buffer __pyx_pybuffer_index; __Pyx_LocalBuf_ND __pyx_pybuffernd_result; __Pyx_Buffer __pyx_pybuffer_result; __Pyx_LocalBuf_ND __pyx_pybuffernd_where; __Pyx_Buffer __pyx_pybuffer_where; 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; Py_ssize_t __pyx_t_11; Py_ssize_t __pyx_t_12; __pyx_t_5numpy_int64_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; __pyx_t_5numpy_int64_t __pyx_t_19; Py_ssize_t __pyx_t_20; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("groupsort_indexer", 0); __pyx_pybuffer_counts.pybuffer.buf = NULL; __pyx_pybuffer_counts.refcount = 0; __pyx_pybuffernd_counts.data = NULL; __pyx_pybuffernd_counts.rcbuffer = &__pyx_pybuffer_counts; __pyx_pybuffer_where.pybuffer.buf = NULL; __pyx_pybuffer_where.refcount = 0; __pyx_pybuffernd_where.data = NULL; __pyx_pybuffernd_where.rcbuffer = &__pyx_pybuffer_where; __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_index.pybuffer.buf = NULL; __pyx_pybuffer_index.refcount = 0; __pyx_pybuffernd_index.data = NULL; __pyx_pybuffernd_index.rcbuffer = &__pyx_pybuffer_index; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_index.rcbuffer->pybuffer, (PyObject*)__pyx_v_index, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1856; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_index.diminfo[0].strides = __pyx_pybuffernd_index.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_index.diminfo[0].shape = __pyx_pybuffernd_index.rcbuffer->pybuffer.shape[0]; /* "pandas/algos.pyx":1862 * * # count group sizes, location 0 for NA * counts = np.zeros(ngroups + 1, dtype=np.int64) # <<<<<<<<<<<<<< * n = len(index) * for i from 0 <= i < n: */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1862; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s__zeros); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1862; __pyx_clineno = __LINE__; goto __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_ngroups + 1)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1862; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1862; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1862; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1862; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s__int64); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1862; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__dtype), __pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1862; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_3), ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1862; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__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_filename = __pyx_f[0]; __pyx_lineno = 1862; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_6 = ((PyArrayObject *)__pyx_t_5); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_counts.rcbuffer->pybuffer); __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_counts.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_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_counts.rcbuffer->pybuffer, (PyObject*)__pyx_v_counts, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_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_pybuffernd_counts.diminfo[0].strides = __pyx_pybuffernd_counts.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_counts.diminfo[0].shape = __pyx_pybuffernd_counts.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1862; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_6 = 0; __pyx_v_counts = ((PyArrayObject *)__pyx_t_5); __pyx_t_5 = 0; /* "pandas/algos.pyx":1863 * # count group sizes, location 0 for NA * counts = np.zeros(ngroups + 1, dtype=np.int64) * n = len(index) # <<<<<<<<<<<<<< * for i from 0 <= i < n: * counts[index[i] + 1] += 1 */ __pyx_t_11 = PyObject_Length(((PyObject *)__pyx_v_index)); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1863; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_11; /* "pandas/algos.pyx":1864 * counts = np.zeros(ngroups + 1, dtype=np.int64) * n = len(index) * for i from 0 <= i < n: # <<<<<<<<<<<<<< * counts[index[i] + 1] += 1 * */ __pyx_t_11 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_11; __pyx_v_i++) { /* "pandas/algos.pyx":1865 * n = len(index) * for i from 0 <= i < n: * counts[index[i] + 1] += 1 # <<<<<<<<<<<<<< * * # mark the start of each contiguous group of like-indexed data */ __pyx_t_12 = __pyx_v_i; __pyx_t_13 = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_index.rcbuffer->pybuffer.buf, __pyx_t_12, __pyx_pybuffernd_index.diminfo[0].strides)) + 1); *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_counts.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_counts.diminfo[0].strides) += 1; } /* "pandas/algos.pyx":1868 * * # mark the start of each contiguous group of like-indexed data * where = np.zeros(ngroups + 1, dtype=np.int64) # <<<<<<<<<<<<<< * for i from 1 <= i < ngroups + 1: * where[i] = where[i - 1] + counts[i - 1] */ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1868; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s__zeros); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1868; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyInt_FromSsize_t((__pyx_v_ngroups + 1)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1868; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1868; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyDict_New(); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1868; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_5)); __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1868; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__int64); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1868; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (PyDict_SetItem(__pyx_t_5, ((PyObject *)__pyx_n_s__dtype), __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1868; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_3), ((PyObject *)__pyx_t_5)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1868; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__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_filename = __pyx_f[0]; __pyx_lineno = 1868; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_6 = ((PyArrayObject *)__pyx_t_4); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_where.rcbuffer->pybuffer); __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_where.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_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_where.rcbuffer->pybuffer, (PyObject*)__pyx_v_where, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_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_pybuffernd_where.diminfo[0].strides = __pyx_pybuffernd_where.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_where.diminfo[0].shape = __pyx_pybuffernd_where.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1868; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_6 = 0; __pyx_v_where = ((PyArrayObject *)__pyx_t_4); __pyx_t_4 = 0; /* "pandas/algos.pyx":1869 * # mark the start of each contiguous group of like-indexed data * where = np.zeros(ngroups + 1, dtype=np.int64) * for i from 1 <= i < ngroups + 1: # <<<<<<<<<<<<<< * where[i] = where[i - 1] + counts[i - 1] * */ __pyx_t_11 = (__pyx_v_ngroups + 1); for (__pyx_v_i = 1; __pyx_v_i < __pyx_t_11; __pyx_v_i++) { /* "pandas/algos.pyx":1870 * where = np.zeros(ngroups + 1, dtype=np.int64) * for i from 1 <= i < ngroups + 1: * where[i] = where[i - 1] + counts[i - 1] # <<<<<<<<<<<<<< * * # this is our indexer */ __pyx_t_14 = (__pyx_v_i - 1); __pyx_t_15 = (__pyx_v_i - 1); __pyx_t_16 = __pyx_v_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_where.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_where.diminfo[0].strides) = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_where.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_where.diminfo[0].strides)) + (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_counts.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_counts.diminfo[0].strides))); } /* "pandas/algos.pyx":1873 * * # this is our indexer * result = np.zeros(n, dtype=np.int64) # <<<<<<<<<<<<<< * for i from 0 <= i < n: * label = index[i] + 1 */ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1873; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s__zeros); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1873; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyInt_FromSsize_t(__pyx_v_n); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1873; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1873; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyDict_New(); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1873; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_4)); __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1873; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s__int64); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1873; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (PyDict_SetItem(__pyx_t_4, ((PyObject *)__pyx_n_s__dtype), __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1873; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_3), ((PyObject *)__pyx_t_4)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1873; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__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_filename = __pyx_f[0]; __pyx_lineno = 1873; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_6 = ((PyArrayObject *)__pyx_t_2); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_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_result.rcbuffer->pybuffer, (PyObject*)__pyx_v_result, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_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_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_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1873; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_6 = 0; __pyx_v_result = ((PyArrayObject *)__pyx_t_2); __pyx_t_2 = 0; /* "pandas/algos.pyx":1874 * # this is our indexer * result = np.zeros(n, dtype=np.int64) * for i from 0 <= i < n: # <<<<<<<<<<<<<< * label = index[i] + 1 * result[where[label]] = i */ __pyx_t_11 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_11; __pyx_v_i++) { /* "pandas/algos.pyx":1875 * result = np.zeros(n, dtype=np.int64) * for i from 0 <= i < n: * label = index[i] + 1 # <<<<<<<<<<<<<< * result[where[label]] = i * where[label] += 1 */ __pyx_t_17 = __pyx_v_i; __pyx_v_label = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_index.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_index.diminfo[0].strides)) + 1); /* "pandas/algos.pyx":1876 * for i from 0 <= i < n: * label = index[i] + 1 * result[where[label]] = i # <<<<<<<<<<<<<< * where[label] += 1 * */ __pyx_t_18 = __pyx_v_label; __pyx_t_19 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_where.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_where.diminfo[0].strides)); *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_result.diminfo[0].strides) = __pyx_v_i; /* "pandas/algos.pyx":1877 * label = index[i] + 1 * result[where[label]] = i * where[label] += 1 # <<<<<<<<<<<<<< * * return result, counts */ __pyx_t_20 = __pyx_v_label; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_where.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_where.diminfo[0].strides) += 1; } /* "pandas/algos.pyx":1879 * where[label] += 1 * * return result, counts # <<<<<<<<<<<<<< * * # TODO: aggregate multiple columns in single pass */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1879; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(((PyObject *)__pyx_v_result)); PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_result)); __Pyx_GIVEREF(((PyObject *)__pyx_v_result)); __Pyx_INCREF(((PyObject *)__pyx_v_counts)); PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)__pyx_v_counts)); __Pyx_GIVEREF(((PyObject *)__pyx_v_counts)); __pyx_r = ((PyObject *)__pyx_t_2); __pyx_t_2 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_counts.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_index.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_where.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.groupsort_indexer", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_counts.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_index.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_where.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_counts); __Pyx_XDECREF((PyObject *)__pyx_v_where); __Pyx_XDECREF((PyObject *)__pyx_v_result); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_65group_nth_object(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6pandas_5algos_64group_nth_object[] = "\n Only aggregates on axis=0\n "; static PyMethodDef __pyx_mdef_6pandas_5algos_65group_nth_object = {__Pyx_NAMESTR("group_nth_object"), (PyCFunction)__pyx_pw_6pandas_5algos_65group_nth_object, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_5algos_64group_nth_object)}; static PyObject *__pyx_pw_6pandas_5algos_65group_nth_object(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_out = 0; PyArrayObject *__pyx_v_counts = 0; PyArrayObject *__pyx_v_values = 0; PyArrayObject *__pyx_v_labels = 0; __pyx_t_5numpy_int64_t __pyx_v_rank; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("group_nth_object (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__out,&__pyx_n_s__counts,&__pyx_n_s__values,&__pyx_n_s__labels,&__pyx_n_s__rank,0}; PyObject* values[5] = {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 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__out)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__counts)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("group_nth_object", 1, 5, 5, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1887; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__values)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("group_nth_object", 1, 5, 5, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1887; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__labels)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("group_nth_object", 1, 5, 5, 3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1887; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 4: if (likely((values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__rank)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("group_nth_object", 1, 5, 5, 4); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1887; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "group_nth_object") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1887; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 5) { 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); } __pyx_v_out = ((PyArrayObject *)values[0]); __pyx_v_counts = ((PyArrayObject *)values[1]); __pyx_v_values = ((PyArrayObject *)values[2]); __pyx_v_labels = ((PyArrayObject *)values[3]); __pyx_v_rank = __Pyx_PyInt_from_py_npy_int64(values[4]); if (unlikely((__pyx_v_rank == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1891; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("group_nth_object", 1, 5, 5, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1887; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.group_nth_object", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_5numpy_ndarray, 1, "out", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1887; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_counts), __pyx_ptype_5numpy_ndarray, 1, "counts", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1888; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1889; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_labels), __pyx_ptype_5numpy_ndarray, 1, "labels", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1890; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_64group_nth_object(__pyx_self, __pyx_v_out, __pyx_v_counts, __pyx_v_values, __pyx_v_labels, __pyx_v_rank); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/algos.pyx":1887 * @cython.boundscheck(False) * @cython.wraparound(False) * def group_nth_object(ndarray[object, ndim=2] out, # <<<<<<<<<<<<<< * ndarray[int64_t] counts, * ndarray[object, ndim=2] values, */ static PyObject *__pyx_pf_6pandas_5algos_64group_nth_object(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_out, PyArrayObject *__pyx_v_counts, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_labels, __pyx_t_5numpy_int64_t __pyx_v_rank) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_N; Py_ssize_t __pyx_v_K; Py_ssize_t __pyx_v_lab; PyObject *__pyx_v_val = 0; PyArrayObject *__pyx_v_nobs = 0; PyArrayObject *__pyx_v_resx = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_counts; __Pyx_Buffer __pyx_pybuffer_counts; __Pyx_LocalBuf_ND __pyx_pybuffernd_labels; __Pyx_Buffer __pyx_pybuffer_labels; __Pyx_LocalBuf_ND __pyx_pybuffernd_nobs; __Pyx_Buffer __pyx_pybuffer_nobs; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_resx; __Pyx_Buffer __pyx_pybuffer_resx; __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; 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; PyArrayObject *__pyx_t_11 = NULL; PyObject *(*__pyx_t_12)(PyObject *); Py_ssize_t __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; 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; PyObject **__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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("group_nth_object", 0); __pyx_pybuffer_nobs.pybuffer.buf = NULL; __pyx_pybuffer_nobs.refcount = 0; __pyx_pybuffernd_nobs.data = NULL; __pyx_pybuffernd_nobs.rcbuffer = &__pyx_pybuffer_nobs; __pyx_pybuffer_resx.pybuffer.buf = NULL; __pyx_pybuffer_resx.refcount = 0; __pyx_pybuffernd_resx.data = NULL; __pyx_pybuffernd_resx.rcbuffer = &__pyx_pybuffer_resx; __pyx_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; __pyx_pybuffer_counts.pybuffer.buf = NULL; __pyx_pybuffer_counts.refcount = 0; __pyx_pybuffernd_counts.data = NULL; __pyx_pybuffernd_counts.rcbuffer = &__pyx_pybuffer_counts; __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_labels.pybuffer.buf = NULL; __pyx_pybuffer_labels.refcount = 0; __pyx_pybuffernd_labels.data = NULL; __pyx_pybuffernd_labels.rcbuffer = &__pyx_pybuffer_labels; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_v_out, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1887; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; __pyx_pybuffernd_out.diminfo[1].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_out.diminfo[1].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[1]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_counts.rcbuffer->pybuffer, (PyObject*)__pyx_v_counts, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1887; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_counts.diminfo[0].strides = __pyx_pybuffernd_counts.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_counts.diminfo[0].shape = __pyx_pybuffernd_counts.rcbuffer->pybuffer.shape[0]; { __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, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1887; __pyx_clineno = __LINE__; goto __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_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_labels.rcbuffer->pybuffer, (PyObject*)__pyx_v_labels, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1887; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_labels.diminfo[0].strides = __pyx_pybuffernd_labels.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_labels.diminfo[0].shape = __pyx_pybuffernd_labels.rcbuffer->pybuffer.shape[0]; /* "pandas/algos.pyx":1902 * ndarray[object, ndim=2] resx * * nobs = np.zeros(( out).shape, dtype=np.int64) # <<<<<<<<<<<<<< * resx = np.empty(( out).shape, dtype=object) * */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1902; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s__zeros); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1902; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_out), __pyx_n_s__shape); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1902; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1902; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1902; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1902; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s__int64); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1902; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__dtype), __pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1902; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_3), ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1902; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__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_filename = __pyx_f[0]; __pyx_lineno = 1902; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_6 = ((PyArrayObject *)__pyx_t_5); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer); __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_nobs.rcbuffer->pybuffer, (PyObject*)__pyx_v_nobs, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_pybuffernd_nobs.diminfo[0].strides = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_nobs.diminfo[0].shape = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_nobs.diminfo[1].strides = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_nobs.diminfo[1].shape = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.shape[1]; if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1902; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_6 = 0; __pyx_v_nobs = ((PyArrayObject *)__pyx_t_5); __pyx_t_5 = 0; /* "pandas/algos.pyx":1903 * * nobs = np.zeros(( out).shape, dtype=np.int64) * resx = np.empty(( out).shape, dtype=object) # <<<<<<<<<<<<<< * * N, K = ( values).shape */ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1903; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s__empty); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1903; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_out), __pyx_n_s__shape); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1903; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1903; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyDict_New(); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1903; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_5)); if (PyDict_SetItem(__pyx_t_5, ((PyObject *)__pyx_n_s__dtype), __pyx_builtin_object) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1903; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_3), ((PyObject *)__pyx_t_5)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1903; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1903; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_11 = ((PyArrayObject *)__pyx_t_2); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_resx.rcbuffer->pybuffer); __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_resx.rcbuffer->pybuffer, (PyObject*)__pyx_t_11, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_resx.rcbuffer->pybuffer, (PyObject*)__pyx_v_resx, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_pybuffernd_resx.diminfo[0].strides = __pyx_pybuffernd_resx.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_resx.diminfo[0].shape = __pyx_pybuffernd_resx.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_resx.diminfo[1].strides = __pyx_pybuffernd_resx.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_resx.diminfo[1].shape = __pyx_pybuffernd_resx.rcbuffer->pybuffer.shape[1]; if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1903; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_11 = 0; __pyx_v_resx = ((PyArrayObject *)__pyx_t_2); __pyx_t_2 = 0; /* "pandas/algos.pyx":1905 * resx = np.empty(( out).shape, dtype=object) * * N, K = ( values).shape # <<<<<<<<<<<<<< * * for i in range(N): */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_values), __pyx_n_s__shape); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1905; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if ((likely(PyTuple_CheckExact(__pyx_t_2))) || (PyList_CheckExact(__pyx_t_2))) { PyObject* sequence = __pyx_t_2; #if CYTHON_COMPILING_IN_CPYTHON Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1905; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_5 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1); } else { __pyx_t_5 = PyList_GET_ITEM(sequence, 0); __pyx_t_3 = PyList_GET_ITEM(sequence, 1); } __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(__pyx_t_3); #else __pyx_t_5 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1905; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1905; __pyx_clineno = __LINE__; goto __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_1 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1905; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_12 = Py_TYPE(__pyx_t_1)->tp_iternext; index = 0; __pyx_t_5 = __pyx_t_12(__pyx_t_1); if (unlikely(!__pyx_t_5)) goto __pyx_L3_unpacking_failed; __Pyx_GOTREF(__pyx_t_5); index = 1; __pyx_t_3 = __pyx_t_12(__pyx_t_1); if (unlikely(!__pyx_t_3)) goto __pyx_L3_unpacking_failed; __Pyx_GOTREF(__pyx_t_3); if (__Pyx_IternextUnpackEndCheck(__pyx_t_12(__pyx_t_1), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1905; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_12 = NULL; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L4_unpacking_done; __pyx_L3_unpacking_failed:; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_12 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1905; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_L4_unpacking_done:; } __pyx_t_13 = __Pyx_PyIndex_AsSsize_t(__pyx_t_5); if (unlikely((__pyx_t_13 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1905; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_14 = __Pyx_PyIndex_AsSsize_t(__pyx_t_3); if (unlikely((__pyx_t_14 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1905; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_N = __pyx_t_13; __pyx_v_K = __pyx_t_14; /* "pandas/algos.pyx":1907 * N, K = ( values).shape * * for i in range(N): # <<<<<<<<<<<<<< * lab = labels[i] * if lab < 0: */ __pyx_t_14 = __pyx_v_N; for (__pyx_t_13 = 0; __pyx_t_13 < __pyx_t_14; __pyx_t_13+=1) { __pyx_v_i = __pyx_t_13; /* "pandas/algos.pyx":1908 * * for i in range(N): * lab = labels[i] # <<<<<<<<<<<<<< * if lab < 0: * continue */ __pyx_t_15 = __pyx_v_i; __pyx_v_lab = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_labels.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_labels.diminfo[0].strides)); /* "pandas/algos.pyx":1909 * for i in range(N): * lab = labels[i] * if lab < 0: # <<<<<<<<<<<<<< * continue * */ __pyx_t_16 = ((__pyx_v_lab < 0) != 0); if (__pyx_t_16) { /* "pandas/algos.pyx":1910 * lab = labels[i] * if lab < 0: * continue # <<<<<<<<<<<<<< * * counts[lab] += 1 */ goto __pyx_L5_continue; goto __pyx_L7; } __pyx_L7:; /* "pandas/algos.pyx":1912 * continue * * counts[lab] += 1 # <<<<<<<<<<<<<< * for j in range(K): * val = values[i, j] */ __pyx_t_17 = __pyx_v_lab; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_counts.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_counts.diminfo[0].strides) += 1; /* "pandas/algos.pyx":1913 * * counts[lab] += 1 * for j in range(K): # <<<<<<<<<<<<<< * val = values[i, j] * */ __pyx_t_18 = __pyx_v_K; for (__pyx_t_19 = 0; __pyx_t_19 < __pyx_t_18; __pyx_t_19+=1) { __pyx_v_j = __pyx_t_19; /* "pandas/algos.pyx":1914 * counts[lab] += 1 * for j in range(K): * val = values[i, j] # <<<<<<<<<<<<<< * * # not nan */ __pyx_t_20 = __pyx_v_i; __pyx_t_21 = __pyx_v_j; __pyx_t_2 = (PyObject *) *__Pyx_BufPtrStrided2d(PyObject **, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_21, __pyx_pybuffernd_values.diminfo[1].strides); __Pyx_INCREF((PyObject*)__pyx_t_2); __Pyx_XDECREF_SET(__pyx_v_val, __pyx_t_2); __pyx_t_2 = 0; /* "pandas/algos.pyx":1917 * * # not nan * if val == val: # <<<<<<<<<<<<<< * nobs[lab, j] += 1 * if nobs[lab, j] == rank: */ __pyx_t_2 = PyObject_RichCompare(__pyx_v_val, __pyx_v_val, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1917; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_16 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_16 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1917; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_16) { /* "pandas/algos.pyx":1918 * # not nan * if val == val: * nobs[lab, j] += 1 # <<<<<<<<<<<<<< * if nobs[lab, j] == rank: * resx[lab, j] = val */ __pyx_t_22 = __pyx_v_lab; __pyx_t_23 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_nobs.rcbuffer->pybuffer.buf, __pyx_t_22, __pyx_pybuffernd_nobs.diminfo[0].strides, __pyx_t_23, __pyx_pybuffernd_nobs.diminfo[1].strides) += 1; /* "pandas/algos.pyx":1919 * if val == val: * nobs[lab, j] += 1 * if nobs[lab, j] == rank: # <<<<<<<<<<<<<< * resx[lab, j] = val * */ __pyx_t_24 = __pyx_v_lab; __pyx_t_25 = __pyx_v_j; __pyx_t_16 = (((*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_nobs.rcbuffer->pybuffer.buf, __pyx_t_24, __pyx_pybuffernd_nobs.diminfo[0].strides, __pyx_t_25, __pyx_pybuffernd_nobs.diminfo[1].strides)) == __pyx_v_rank) != 0); if (__pyx_t_16) { /* "pandas/algos.pyx":1920 * nobs[lab, j] += 1 * if nobs[lab, j] == rank: * resx[lab, j] = val # <<<<<<<<<<<<<< * * for i in range(len(counts)): */ __pyx_t_26 = __pyx_v_lab; __pyx_t_27 = __pyx_v_j; __pyx_t_28 = __Pyx_BufPtrStrided2d(PyObject **, __pyx_pybuffernd_resx.rcbuffer->pybuffer.buf, __pyx_t_26, __pyx_pybuffernd_resx.diminfo[0].strides, __pyx_t_27, __pyx_pybuffernd_resx.diminfo[1].strides); __Pyx_GOTREF(*__pyx_t_28); __Pyx_INCREF(__pyx_v_val); __Pyx_DECREF(*__pyx_t_28); *__pyx_t_28 = __pyx_v_val; __Pyx_GIVEREF(*__pyx_t_28); goto __pyx_L11; } __pyx_L11:; goto __pyx_L10; } __pyx_L10:; } __pyx_L5_continue:; } /* "pandas/algos.pyx":1922 * resx[lab, j] = val * * for i in range(len(counts)): # <<<<<<<<<<<<<< * for j in range(K): * if nobs[i, j] == 0: */ __pyx_t_14 = PyObject_Length(((PyObject *)__pyx_v_counts)); if (unlikely(__pyx_t_14 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1922; __pyx_clineno = __LINE__; goto __pyx_L1_error;} for (__pyx_t_13 = 0; __pyx_t_13 < __pyx_t_14; __pyx_t_13+=1) { __pyx_v_i = __pyx_t_13; /* "pandas/algos.pyx":1923 * * for i in range(len(counts)): * for j in range(K): # <<<<<<<<<<<<<< * if nobs[i, j] == 0: * out[i, j] = nan */ __pyx_t_18 = __pyx_v_K; for (__pyx_t_19 = 0; __pyx_t_19 < __pyx_t_18; __pyx_t_19+=1) { __pyx_v_j = __pyx_t_19; /* "pandas/algos.pyx":1924 * for i in range(len(counts)): * for j in range(K): * if nobs[i, j] == 0: # <<<<<<<<<<<<<< * out[i, j] = nan * else: */ __pyx_t_29 = __pyx_v_i; __pyx_t_30 = __pyx_v_j; __pyx_t_16 = (((*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_nobs.rcbuffer->pybuffer.buf, __pyx_t_29, __pyx_pybuffernd_nobs.diminfo[0].strides, __pyx_t_30, __pyx_pybuffernd_nobs.diminfo[1].strides)) == 0) != 0); if (__pyx_t_16) { /* "pandas/algos.pyx":1925 * for j in range(K): * if nobs[i, j] == 0: * out[i, j] = nan # <<<<<<<<<<<<<< * else: * out[i, j] = resx[i, j] */ __pyx_t_2 = PyFloat_FromDouble(__pyx_v_6pandas_5algos_nan); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1925; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_31 = __pyx_v_i; __pyx_t_32 = __pyx_v_j; __pyx_t_28 = __Pyx_BufPtrStrided2d(PyObject **, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_31, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_32, __pyx_pybuffernd_out.diminfo[1].strides); __Pyx_GOTREF(*__pyx_t_28); __Pyx_INCREF(((PyObject *)__pyx_t_2)); __Pyx_DECREF(*__pyx_t_28); *__pyx_t_28 = ((PyObject *)__pyx_t_2); __Pyx_GIVEREF(*__pyx_t_28); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; goto __pyx_L16; } /*else*/ { /* "pandas/algos.pyx":1927 * out[i, j] = nan * else: * out[i, j] = resx[i, j] # <<<<<<<<<<<<<< * * @cython.boundscheck(False) */ __pyx_t_33 = __pyx_v_i; __pyx_t_34 = __pyx_v_j; __pyx_t_2 = (PyObject *) *__Pyx_BufPtrStrided2d(PyObject **, __pyx_pybuffernd_resx.rcbuffer->pybuffer.buf, __pyx_t_33, __pyx_pybuffernd_resx.diminfo[0].strides, __pyx_t_34, __pyx_pybuffernd_resx.diminfo[1].strides); __Pyx_INCREF((PyObject*)__pyx_t_2); __pyx_t_35 = __pyx_v_i; __pyx_t_36 = __pyx_v_j; __pyx_t_28 = __Pyx_BufPtrStrided2d(PyObject **, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_35, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_36, __pyx_pybuffernd_out.diminfo[1].strides); __Pyx_GOTREF(*__pyx_t_28); __Pyx_INCREF(__pyx_t_2); __Pyx_DECREF(*__pyx_t_28); *__pyx_t_28 = __pyx_t_2; __Pyx_GIVEREF(*__pyx_t_28); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } __pyx_L16:; } } __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_counts.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_labels.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_resx.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.group_nth_object", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_counts.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_labels.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_resx.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF(__pyx_v_val); __Pyx_XDECREF((PyObject *)__pyx_v_nobs); __Pyx_XDECREF((PyObject *)__pyx_v_resx); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_67group_nth_bin_object(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6pandas_5algos_66group_nth_bin_object[] = "\n Only aggregates on axis=0\n "; static PyMethodDef __pyx_mdef_6pandas_5algos_67group_nth_bin_object = {__Pyx_NAMESTR("group_nth_bin_object"), (PyCFunction)__pyx_pw_6pandas_5algos_67group_nth_bin_object, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_5algos_66group_nth_bin_object)}; static PyObject *__pyx_pw_6pandas_5algos_67group_nth_bin_object(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_out = 0; PyArrayObject *__pyx_v_counts = 0; PyArrayObject *__pyx_v_values = 0; PyArrayObject *__pyx_v_bins = 0; __pyx_t_5numpy_int64_t __pyx_v_rank; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("group_nth_bin_object (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__out,&__pyx_n_s__counts,&__pyx_n_s__values,&__pyx_n_s__bins,&__pyx_n_s__rank,0}; PyObject* values[5] = {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 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__out)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__counts)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("group_nth_bin_object", 1, 5, 5, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1931; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__values)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("group_nth_bin_object", 1, 5, 5, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1931; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__bins)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("group_nth_bin_object", 1, 5, 5, 3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1931; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 4: if (likely((values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__rank)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("group_nth_bin_object", 1, 5, 5, 4); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1931; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "group_nth_bin_object") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1931; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 5) { 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); } __pyx_v_out = ((PyArrayObject *)values[0]); __pyx_v_counts = ((PyArrayObject *)values[1]); __pyx_v_values = ((PyArrayObject *)values[2]); __pyx_v_bins = ((PyArrayObject *)values[3]); __pyx_v_rank = __Pyx_PyInt_from_py_npy_int64(values[4]); if (unlikely((__pyx_v_rank == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1934; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("group_nth_bin_object", 1, 5, 5, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1931; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.group_nth_bin_object", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_5numpy_ndarray, 1, "out", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1931; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_counts), __pyx_ptype_5numpy_ndarray, 1, "counts", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1932; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1933; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_bins), __pyx_ptype_5numpy_ndarray, 1, "bins", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1934; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_66group_nth_bin_object(__pyx_self, __pyx_v_out, __pyx_v_counts, __pyx_v_values, __pyx_v_bins, __pyx_v_rank); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/algos.pyx":1931 * @cython.boundscheck(False) * @cython.wraparound(False) * def group_nth_bin_object(ndarray[object, ndim=2] out, # <<<<<<<<<<<<<< * ndarray[int64_t] counts, * ndarray[object, ndim=2] values, */ static PyObject *__pyx_pf_6pandas_5algos_66group_nth_bin_object(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_out, PyArrayObject *__pyx_v_counts, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_bins, __pyx_t_5numpy_int64_t __pyx_v_rank) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_N; Py_ssize_t __pyx_v_K; Py_ssize_t __pyx_v_ngroups; Py_ssize_t __pyx_v_b; PyObject *__pyx_v_val = 0; PyArrayObject *__pyx_v_resx = 0; PyArrayObject *__pyx_v_nobs = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_bins; __Pyx_Buffer __pyx_pybuffer_bins; __Pyx_LocalBuf_ND __pyx_pybuffernd_counts; __Pyx_Buffer __pyx_pybuffer_counts; __Pyx_LocalBuf_ND __pyx_pybuffernd_nobs; __Pyx_Buffer __pyx_pybuffer_nobs; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_resx; __Pyx_Buffer __pyx_pybuffer_resx; __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; 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; PyArrayObject *__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; PyObject *(*__pyx_t_16)(PyObject *); Py_ssize_t __pyx_t_17; int __pyx_t_18; int __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; PyObject **__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; Py_ssize_t __pyx_t_37; Py_ssize_t __pyx_t_38; Py_ssize_t __pyx_t_39; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("group_nth_bin_object", 0); __pyx_pybuffer_resx.pybuffer.buf = NULL; __pyx_pybuffer_resx.refcount = 0; __pyx_pybuffernd_resx.data = NULL; __pyx_pybuffernd_resx.rcbuffer = &__pyx_pybuffer_resx; __pyx_pybuffer_nobs.pybuffer.buf = NULL; __pyx_pybuffer_nobs.refcount = 0; __pyx_pybuffernd_nobs.data = NULL; __pyx_pybuffernd_nobs.rcbuffer = &__pyx_pybuffer_nobs; __pyx_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; __pyx_pybuffer_counts.pybuffer.buf = NULL; __pyx_pybuffer_counts.refcount = 0; __pyx_pybuffernd_counts.data = NULL; __pyx_pybuffernd_counts.rcbuffer = &__pyx_pybuffer_counts; __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_bins.pybuffer.buf = NULL; __pyx_pybuffer_bins.refcount = 0; __pyx_pybuffernd_bins.data = NULL; __pyx_pybuffernd_bins.rcbuffer = &__pyx_pybuffer_bins; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_v_out, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1931; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; __pyx_pybuffernd_out.diminfo[1].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_out.diminfo[1].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[1]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_counts.rcbuffer->pybuffer, (PyObject*)__pyx_v_counts, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1931; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_counts.diminfo[0].strides = __pyx_pybuffernd_counts.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_counts.diminfo[0].shape = __pyx_pybuffernd_counts.rcbuffer->pybuffer.shape[0]; { __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, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1931; __pyx_clineno = __LINE__; goto __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_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_bins.rcbuffer->pybuffer, (PyObject*)__pyx_v_bins, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1931; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_bins.diminfo[0].strides = __pyx_pybuffernd_bins.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_bins.diminfo[0].shape = __pyx_pybuffernd_bins.rcbuffer->pybuffer.shape[0]; /* "pandas/algos.pyx":1945 * ndarray[float64_t, ndim=2] nobs * * nobs = np.zeros(( out).shape, dtype=np.float64) # <<<<<<<<<<<<<< * resx = np.empty(( out).shape, dtype=object) * */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1945; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s__zeros); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1945; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_out), __pyx_n_s__shape); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1945; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1945; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1945; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1945; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s__float64); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1945; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__dtype), __pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1945; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_3), ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1945; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__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_filename = __pyx_f[0]; __pyx_lineno = 1945; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_6 = ((PyArrayObject *)__pyx_t_5); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer); __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_nobs.rcbuffer->pybuffer, (PyObject*)__pyx_v_nobs, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_pybuffernd_nobs.diminfo[0].strides = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_nobs.diminfo[0].shape = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_nobs.diminfo[1].strides = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_nobs.diminfo[1].shape = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.shape[1]; if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1945; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_6 = 0; __pyx_v_nobs = ((PyArrayObject *)__pyx_t_5); __pyx_t_5 = 0; /* "pandas/algos.pyx":1946 * * nobs = np.zeros(( out).shape, dtype=np.float64) * resx = np.empty(( out).shape, dtype=object) # <<<<<<<<<<<<<< * * if bins[len(bins) - 1] == len(values): */ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1946; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s__empty); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1946; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_out), __pyx_n_s__shape); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1946; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1946; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyDict_New(); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1946; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_5)); if (PyDict_SetItem(__pyx_t_5, ((PyObject *)__pyx_n_s__dtype), __pyx_builtin_object) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1946; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_3), ((PyObject *)__pyx_t_5)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1946; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1946; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_11 = ((PyArrayObject *)__pyx_t_2); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_resx.rcbuffer->pybuffer); __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_resx.rcbuffer->pybuffer, (PyObject*)__pyx_t_11, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_resx.rcbuffer->pybuffer, (PyObject*)__pyx_v_resx, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_pybuffernd_resx.diminfo[0].strides = __pyx_pybuffernd_resx.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_resx.diminfo[0].shape = __pyx_pybuffernd_resx.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_resx.diminfo[1].strides = __pyx_pybuffernd_resx.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_resx.diminfo[1].shape = __pyx_pybuffernd_resx.rcbuffer->pybuffer.shape[1]; if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1946; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_11 = 0; __pyx_v_resx = ((PyArrayObject *)__pyx_t_2); __pyx_t_2 = 0; /* "pandas/algos.pyx":1948 * resx = np.empty(( out).shape, dtype=object) * * if bins[len(bins) - 1] == len(values): # <<<<<<<<<<<<<< * ngroups = len(bins) * else: */ __pyx_t_12 = PyObject_Length(((PyObject *)__pyx_v_bins)); if (unlikely(__pyx_t_12 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1948; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_13 = (__pyx_t_12 - 1); __pyx_t_14 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_14 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1948; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_15 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_bins.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_bins.diminfo[0].strides)) == __pyx_t_14) != 0); if (__pyx_t_15) { /* "pandas/algos.pyx":1949 * * if bins[len(bins) - 1] == len(values): * ngroups = len(bins) # <<<<<<<<<<<<<< * else: * ngroups = len(bins) + 1 */ __pyx_t_14 = PyObject_Length(((PyObject *)__pyx_v_bins)); if (unlikely(__pyx_t_14 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1949; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_ngroups = __pyx_t_14; goto __pyx_L3; } /*else*/ { /* "pandas/algos.pyx":1951 * ngroups = len(bins) * else: * ngroups = len(bins) + 1 # <<<<<<<<<<<<<< * * N, K = ( values).shape */ __pyx_t_14 = PyObject_Length(((PyObject *)__pyx_v_bins)); if (unlikely(__pyx_t_14 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1951; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_ngroups = (__pyx_t_14 + 1); } __pyx_L3:; /* "pandas/algos.pyx":1953 * ngroups = len(bins) + 1 * * N, K = ( values).shape # <<<<<<<<<<<<<< * * b = 0 */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_values), __pyx_n_s__shape); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1953; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if ((likely(PyTuple_CheckExact(__pyx_t_2))) || (PyList_CheckExact(__pyx_t_2))) { PyObject* sequence = __pyx_t_2; #if CYTHON_COMPILING_IN_CPYTHON Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1953; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_5 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1); } else { __pyx_t_5 = PyList_GET_ITEM(sequence, 0); __pyx_t_3 = PyList_GET_ITEM(sequence, 1); } __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(__pyx_t_3); #else __pyx_t_5 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1953; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1953; __pyx_clineno = __LINE__; goto __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_1 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1953; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_16 = Py_TYPE(__pyx_t_1)->tp_iternext; index = 0; __pyx_t_5 = __pyx_t_16(__pyx_t_1); if (unlikely(!__pyx_t_5)) goto __pyx_L4_unpacking_failed; __Pyx_GOTREF(__pyx_t_5); index = 1; __pyx_t_3 = __pyx_t_16(__pyx_t_1); if (unlikely(!__pyx_t_3)) goto __pyx_L4_unpacking_failed; __Pyx_GOTREF(__pyx_t_3); if (__Pyx_IternextUnpackEndCheck(__pyx_t_16(__pyx_t_1), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1953; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_16 = NULL; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L5_unpacking_done; __pyx_L4_unpacking_failed:; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_16 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1953; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_L5_unpacking_done:; } __pyx_t_14 = __Pyx_PyIndex_AsSsize_t(__pyx_t_5); if (unlikely((__pyx_t_14 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1953; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_12 = __Pyx_PyIndex_AsSsize_t(__pyx_t_3); if (unlikely((__pyx_t_12 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1953; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_N = __pyx_t_14; __pyx_v_K = __pyx_t_12; /* "pandas/algos.pyx":1955 * N, K = ( values).shape * * b = 0 # <<<<<<<<<<<<<< * for i in range(N): * while b < ngroups - 1 and i >= bins[b]: */ __pyx_v_b = 0; /* "pandas/algos.pyx":1956 * * b = 0 * for i in range(N): # <<<<<<<<<<<<<< * while b < ngroups - 1 and i >= bins[b]: * b += 1 */ __pyx_t_12 = __pyx_v_N; for (__pyx_t_14 = 0; __pyx_t_14 < __pyx_t_12; __pyx_t_14+=1) { __pyx_v_i = __pyx_t_14; /* "pandas/algos.pyx":1957 * b = 0 * for i in range(N): * while b < ngroups - 1 and i >= bins[b]: # <<<<<<<<<<<<<< * b += 1 * */ while (1) { __pyx_t_15 = ((__pyx_v_b < (__pyx_v_ngroups - 1)) != 0); if (__pyx_t_15) { __pyx_t_17 = __pyx_v_b; __pyx_t_18 = ((__pyx_v_i >= (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_bins.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_bins.diminfo[0].strides))) != 0); __pyx_t_19 = __pyx_t_18; } else { __pyx_t_19 = __pyx_t_15; } if (!__pyx_t_19) break; /* "pandas/algos.pyx":1958 * for i in range(N): * while b < ngroups - 1 and i >= bins[b]: * b += 1 # <<<<<<<<<<<<<< * * counts[b] += 1 */ __pyx_v_b = (__pyx_v_b + 1); } /* "pandas/algos.pyx":1960 * b += 1 * * counts[b] += 1 # <<<<<<<<<<<<<< * for j in range(K): * val = values[i, j] */ __pyx_t_20 = __pyx_v_b; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_counts.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_counts.diminfo[0].strides) += 1; /* "pandas/algos.pyx":1961 * * counts[b] += 1 * for j in range(K): # <<<<<<<<<<<<<< * val = values[i, j] * */ __pyx_t_21 = __pyx_v_K; for (__pyx_t_22 = 0; __pyx_t_22 < __pyx_t_21; __pyx_t_22+=1) { __pyx_v_j = __pyx_t_22; /* "pandas/algos.pyx":1962 * counts[b] += 1 * for j in range(K): * val = values[i, j] # <<<<<<<<<<<<<< * * # not nan */ __pyx_t_23 = __pyx_v_i; __pyx_t_24 = __pyx_v_j; __pyx_t_2 = (PyObject *) *__Pyx_BufPtrStrided2d(PyObject **, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_23, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_24, __pyx_pybuffernd_values.diminfo[1].strides); __Pyx_INCREF((PyObject*)__pyx_t_2); __Pyx_XDECREF_SET(__pyx_v_val, __pyx_t_2); __pyx_t_2 = 0; /* "pandas/algos.pyx":1965 * * # not nan * if val == val: # <<<<<<<<<<<<<< * nobs[b, j] += 1 * if nobs[b, j] == rank: */ __pyx_t_2 = PyObject_RichCompare(__pyx_v_val, __pyx_v_val, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1965; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_19 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_19 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1965; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_19) { /* "pandas/algos.pyx":1966 * # not nan * if val == val: * nobs[b, j] += 1 # <<<<<<<<<<<<<< * if nobs[b, j] == rank: * resx[b, j] = val */ __pyx_t_25 = __pyx_v_b; __pyx_t_26 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_nobs.rcbuffer->pybuffer.buf, __pyx_t_25, __pyx_pybuffernd_nobs.diminfo[0].strides, __pyx_t_26, __pyx_pybuffernd_nobs.diminfo[1].strides) += 1.0; /* "pandas/algos.pyx":1967 * if val == val: * nobs[b, j] += 1 * if nobs[b, j] == rank: # <<<<<<<<<<<<<< * resx[b, j] = val * */ __pyx_t_27 = __pyx_v_b; __pyx_t_28 = __pyx_v_j; __pyx_t_19 = (((*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_nobs.rcbuffer->pybuffer.buf, __pyx_t_27, __pyx_pybuffernd_nobs.diminfo[0].strides, __pyx_t_28, __pyx_pybuffernd_nobs.diminfo[1].strides)) == __pyx_v_rank) != 0); if (__pyx_t_19) { /* "pandas/algos.pyx":1968 * nobs[b, j] += 1 * if nobs[b, j] == rank: * resx[b, j] = val # <<<<<<<<<<<<<< * * for i in range(ngroups): */ __pyx_t_29 = __pyx_v_b; __pyx_t_30 = __pyx_v_j; __pyx_t_31 = __Pyx_BufPtrStrided2d(PyObject **, __pyx_pybuffernd_resx.rcbuffer->pybuffer.buf, __pyx_t_29, __pyx_pybuffernd_resx.diminfo[0].strides, __pyx_t_30, __pyx_pybuffernd_resx.diminfo[1].strides); __Pyx_GOTREF(*__pyx_t_31); __Pyx_INCREF(__pyx_v_val); __Pyx_DECREF(*__pyx_t_31); *__pyx_t_31 = __pyx_v_val; __Pyx_GIVEREF(*__pyx_t_31); goto __pyx_L13; } __pyx_L13:; goto __pyx_L12; } __pyx_L12:; } } /* "pandas/algos.pyx":1970 * resx[b, j] = val * * for i in range(ngroups): # <<<<<<<<<<<<<< * for j in range(K): * if nobs[i, j] == 0: */ __pyx_t_12 = __pyx_v_ngroups; for (__pyx_t_14 = 0; __pyx_t_14 < __pyx_t_12; __pyx_t_14+=1) { __pyx_v_i = __pyx_t_14; /* "pandas/algos.pyx":1971 * * for i in range(ngroups): * for j in range(K): # <<<<<<<<<<<<<< * if nobs[i, j] == 0: * out[i, j] = nan */ __pyx_t_21 = __pyx_v_K; for (__pyx_t_22 = 0; __pyx_t_22 < __pyx_t_21; __pyx_t_22+=1) { __pyx_v_j = __pyx_t_22; /* "pandas/algos.pyx":1972 * for i in range(ngroups): * for j in range(K): * if nobs[i, j] == 0: # <<<<<<<<<<<<<< * out[i, j] = nan * else: */ __pyx_t_32 = __pyx_v_i; __pyx_t_33 = __pyx_v_j; __pyx_t_19 = (((*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_nobs.rcbuffer->pybuffer.buf, __pyx_t_32, __pyx_pybuffernd_nobs.diminfo[0].strides, __pyx_t_33, __pyx_pybuffernd_nobs.diminfo[1].strides)) == 0.0) != 0); if (__pyx_t_19) { /* "pandas/algos.pyx":1973 * for j in range(K): * if nobs[i, j] == 0: * out[i, j] = nan # <<<<<<<<<<<<<< * else: * out[i, j] = resx[i, j] */ __pyx_t_2 = PyFloat_FromDouble(__pyx_v_6pandas_5algos_nan); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1973; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_34 = __pyx_v_i; __pyx_t_35 = __pyx_v_j; __pyx_t_31 = __Pyx_BufPtrStrided2d(PyObject **, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_34, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_35, __pyx_pybuffernd_out.diminfo[1].strides); __Pyx_GOTREF(*__pyx_t_31); __Pyx_INCREF(__pyx_t_2); __Pyx_DECREF(*__pyx_t_31); *__pyx_t_31 = __pyx_t_2; __Pyx_GIVEREF(*__pyx_t_31); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; goto __pyx_L18; } /*else*/ { /* "pandas/algos.pyx":1975 * out[i, j] = nan * else: * out[i, j] = resx[i, j] # <<<<<<<<<<<<<< * * @cython.boundscheck(False) */ __pyx_t_36 = __pyx_v_i; __pyx_t_37 = __pyx_v_j; __pyx_t_2 = (PyObject *) *__Pyx_BufPtrStrided2d(PyObject **, __pyx_pybuffernd_resx.rcbuffer->pybuffer.buf, __pyx_t_36, __pyx_pybuffernd_resx.diminfo[0].strides, __pyx_t_37, __pyx_pybuffernd_resx.diminfo[1].strides); __Pyx_INCREF((PyObject*)__pyx_t_2); __pyx_t_38 = __pyx_v_i; __pyx_t_39 = __pyx_v_j; __pyx_t_31 = __Pyx_BufPtrStrided2d(PyObject **, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_38, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_39, __pyx_pybuffernd_out.diminfo[1].strides); __Pyx_GOTREF(*__pyx_t_31); __Pyx_INCREF(__pyx_t_2); __Pyx_DECREF(*__pyx_t_31); *__pyx_t_31 = __pyx_t_2; __Pyx_GIVEREF(*__pyx_t_31); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } __pyx_L18:; } } __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_bins.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_counts.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_resx.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.group_nth_bin_object", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_bins.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_counts.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_resx.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF(__pyx_v_val); __Pyx_XDECREF((PyObject *)__pyx_v_resx); __Pyx_XDECREF((PyObject *)__pyx_v_nobs); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_69group_last_object(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6pandas_5algos_68group_last_object[] = "\n Only aggregates on axis=0\n "; static PyMethodDef __pyx_mdef_6pandas_5algos_69group_last_object = {__Pyx_NAMESTR("group_last_object"), (PyCFunction)__pyx_pw_6pandas_5algos_69group_last_object, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_5algos_68group_last_object)}; static PyObject *__pyx_pw_6pandas_5algos_69group_last_object(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_out = 0; PyArrayObject *__pyx_v_counts = 0; PyArrayObject *__pyx_v_values = 0; PyArrayObject *__pyx_v_labels = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("group_last_object (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__out,&__pyx_n_s__counts,&__pyx_n_s__values,&__pyx_n_s__labels,0}; PyObject* values[4] = {0,0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__out)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__counts)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("group_last_object", 1, 4, 4, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1979; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__values)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("group_last_object", 1, 4, 4, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1979; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__labels)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("group_last_object", 1, 4, 4, 3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1979; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "group_last_object") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1979; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 4) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[3] = PyTuple_GET_ITEM(__pyx_args, 3); } __pyx_v_out = ((PyArrayObject *)values[0]); __pyx_v_counts = ((PyArrayObject *)values[1]); __pyx_v_values = ((PyArrayObject *)values[2]); __pyx_v_labels = ((PyArrayObject *)values[3]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("group_last_object", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1979; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.group_last_object", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_5numpy_ndarray, 1, "out", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1979; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_counts), __pyx_ptype_5numpy_ndarray, 1, "counts", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1980; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1981; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_labels), __pyx_ptype_5numpy_ndarray, 1, "labels", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1982; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_68group_last_object(__pyx_self, __pyx_v_out, __pyx_v_counts, __pyx_v_values, __pyx_v_labels); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/algos.pyx":1979 * @cython.boundscheck(False) * @cython.wraparound(False) * def group_last_object(ndarray[object, ndim=2] out, # <<<<<<<<<<<<<< * ndarray[int64_t] counts, * ndarray[object, ndim=2] values, */ static PyObject *__pyx_pf_6pandas_5algos_68group_last_object(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_out, PyArrayObject *__pyx_v_counts, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_labels) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_N; Py_ssize_t __pyx_v_K; Py_ssize_t __pyx_v_lab; PyObject *__pyx_v_val = 0; PyArrayObject *__pyx_v_resx = 0; PyArrayObject *__pyx_v_nobs = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_counts; __Pyx_Buffer __pyx_pybuffer_counts; __Pyx_LocalBuf_ND __pyx_pybuffernd_labels; __Pyx_Buffer __pyx_pybuffer_labels; __Pyx_LocalBuf_ND __pyx_pybuffernd_nobs; __Pyx_Buffer __pyx_pybuffer_nobs; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_resx; __Pyx_Buffer __pyx_pybuffer_resx; __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; 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; PyArrayObject *__pyx_t_11 = NULL; PyObject *(*__pyx_t_12)(PyObject *); Py_ssize_t __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; Py_ssize_t __pyx_t_23; Py_ssize_t __pyx_t_24; Py_ssize_t __pyx_t_25; PyObject **__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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("group_last_object", 0); __pyx_pybuffer_resx.pybuffer.buf = NULL; __pyx_pybuffer_resx.refcount = 0; __pyx_pybuffernd_resx.data = NULL; __pyx_pybuffernd_resx.rcbuffer = &__pyx_pybuffer_resx; __pyx_pybuffer_nobs.pybuffer.buf = NULL; __pyx_pybuffer_nobs.refcount = 0; __pyx_pybuffernd_nobs.data = NULL; __pyx_pybuffernd_nobs.rcbuffer = &__pyx_pybuffer_nobs; __pyx_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; __pyx_pybuffer_counts.pybuffer.buf = NULL; __pyx_pybuffer_counts.refcount = 0; __pyx_pybuffernd_counts.data = NULL; __pyx_pybuffernd_counts.rcbuffer = &__pyx_pybuffer_counts; __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_labels.pybuffer.buf = NULL; __pyx_pybuffer_labels.refcount = 0; __pyx_pybuffernd_labels.data = NULL; __pyx_pybuffernd_labels.rcbuffer = &__pyx_pybuffer_labels; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_v_out, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1979; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; __pyx_pybuffernd_out.diminfo[1].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_out.diminfo[1].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[1]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_counts.rcbuffer->pybuffer, (PyObject*)__pyx_v_counts, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1979; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_counts.diminfo[0].strides = __pyx_pybuffernd_counts.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_counts.diminfo[0].shape = __pyx_pybuffernd_counts.rcbuffer->pybuffer.shape[0]; { __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, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1979; __pyx_clineno = __LINE__; goto __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_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_labels.rcbuffer->pybuffer, (PyObject*)__pyx_v_labels, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1979; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_labels.diminfo[0].strides = __pyx_pybuffernd_labels.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_labels.diminfo[0].shape = __pyx_pybuffernd_labels.rcbuffer->pybuffer.shape[0]; /* "pandas/algos.pyx":1993 * ndarray[int64_t, ndim=2] nobs * * nobs = np.zeros(( out).shape, dtype=np.int64) # <<<<<<<<<<<<<< * resx = np.empty(( out).shape, dtype=object) * */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1993; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s__zeros); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1993; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_out), __pyx_n_s__shape); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1993; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1993; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1993; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1993; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s__int64); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1993; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__dtype), __pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1993; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_3), ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1993; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__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_filename = __pyx_f[0]; __pyx_lineno = 1993; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_6 = ((PyArrayObject *)__pyx_t_5); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer); __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_nobs.rcbuffer->pybuffer, (PyObject*)__pyx_v_nobs, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_pybuffernd_nobs.diminfo[0].strides = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_nobs.diminfo[0].shape = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_nobs.diminfo[1].strides = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_nobs.diminfo[1].shape = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.shape[1]; if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1993; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_6 = 0; __pyx_v_nobs = ((PyArrayObject *)__pyx_t_5); __pyx_t_5 = 0; /* "pandas/algos.pyx":1994 * * nobs = np.zeros(( out).shape, dtype=np.int64) * resx = np.empty(( out).shape, dtype=object) # <<<<<<<<<<<<<< * * N, K = ( values).shape */ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1994; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s__empty); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1994; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_out), __pyx_n_s__shape); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1994; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1994; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyDict_New(); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1994; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_5)); if (PyDict_SetItem(__pyx_t_5, ((PyObject *)__pyx_n_s__dtype), __pyx_builtin_object) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1994; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_3), ((PyObject *)__pyx_t_5)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1994; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1994; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_11 = ((PyArrayObject *)__pyx_t_2); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_resx.rcbuffer->pybuffer); __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_resx.rcbuffer->pybuffer, (PyObject*)__pyx_t_11, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_resx.rcbuffer->pybuffer, (PyObject*)__pyx_v_resx, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_pybuffernd_resx.diminfo[0].strides = __pyx_pybuffernd_resx.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_resx.diminfo[0].shape = __pyx_pybuffernd_resx.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_resx.diminfo[1].strides = __pyx_pybuffernd_resx.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_resx.diminfo[1].shape = __pyx_pybuffernd_resx.rcbuffer->pybuffer.shape[1]; if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1994; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_11 = 0; __pyx_v_resx = ((PyArrayObject *)__pyx_t_2); __pyx_t_2 = 0; /* "pandas/algos.pyx":1996 * resx = np.empty(( out).shape, dtype=object) * * N, K = ( values).shape # <<<<<<<<<<<<<< * * for i in range(N): */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_values), __pyx_n_s__shape); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1996; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if ((likely(PyTuple_CheckExact(__pyx_t_2))) || (PyList_CheckExact(__pyx_t_2))) { PyObject* sequence = __pyx_t_2; #if CYTHON_COMPILING_IN_CPYTHON Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1996; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_5 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1); } else { __pyx_t_5 = PyList_GET_ITEM(sequence, 0); __pyx_t_3 = PyList_GET_ITEM(sequence, 1); } __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(__pyx_t_3); #else __pyx_t_5 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1996; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1996; __pyx_clineno = __LINE__; goto __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_1 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1996; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_12 = Py_TYPE(__pyx_t_1)->tp_iternext; index = 0; __pyx_t_5 = __pyx_t_12(__pyx_t_1); if (unlikely(!__pyx_t_5)) goto __pyx_L3_unpacking_failed; __Pyx_GOTREF(__pyx_t_5); index = 1; __pyx_t_3 = __pyx_t_12(__pyx_t_1); if (unlikely(!__pyx_t_3)) goto __pyx_L3_unpacking_failed; __Pyx_GOTREF(__pyx_t_3); if (__Pyx_IternextUnpackEndCheck(__pyx_t_12(__pyx_t_1), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1996; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_12 = NULL; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L4_unpacking_done; __pyx_L3_unpacking_failed:; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_12 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1996; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_L4_unpacking_done:; } __pyx_t_13 = __Pyx_PyIndex_AsSsize_t(__pyx_t_5); if (unlikely((__pyx_t_13 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1996; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_14 = __Pyx_PyIndex_AsSsize_t(__pyx_t_3); if (unlikely((__pyx_t_14 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1996; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_N = __pyx_t_13; __pyx_v_K = __pyx_t_14; /* "pandas/algos.pyx":1998 * N, K = ( values).shape * * for i in range(N): # <<<<<<<<<<<<<< * lab = labels[i] * if lab < 0: */ __pyx_t_14 = __pyx_v_N; for (__pyx_t_13 = 0; __pyx_t_13 < __pyx_t_14; __pyx_t_13+=1) { __pyx_v_i = __pyx_t_13; /* "pandas/algos.pyx":1999 * * for i in range(N): * lab = labels[i] # <<<<<<<<<<<<<< * if lab < 0: * continue */ __pyx_t_15 = __pyx_v_i; __pyx_v_lab = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_labels.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_labels.diminfo[0].strides)); /* "pandas/algos.pyx":2000 * for i in range(N): * lab = labels[i] * if lab < 0: # <<<<<<<<<<<<<< * continue * */ __pyx_t_16 = ((__pyx_v_lab < 0) != 0); if (__pyx_t_16) { /* "pandas/algos.pyx":2001 * lab = labels[i] * if lab < 0: * continue # <<<<<<<<<<<<<< * * counts[lab] += 1 */ goto __pyx_L5_continue; goto __pyx_L7; } __pyx_L7:; /* "pandas/algos.pyx":2003 * continue * * counts[lab] += 1 # <<<<<<<<<<<<<< * for j in range(K): * val = values[i, j] */ __pyx_t_17 = __pyx_v_lab; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_counts.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_counts.diminfo[0].strides) += 1; /* "pandas/algos.pyx":2004 * * counts[lab] += 1 * for j in range(K): # <<<<<<<<<<<<<< * val = values[i, j] * */ __pyx_t_18 = __pyx_v_K; for (__pyx_t_19 = 0; __pyx_t_19 < __pyx_t_18; __pyx_t_19+=1) { __pyx_v_j = __pyx_t_19; /* "pandas/algos.pyx":2005 * counts[lab] += 1 * for j in range(K): * val = values[i, j] # <<<<<<<<<<<<<< * * # not nan */ __pyx_t_20 = __pyx_v_i; __pyx_t_21 = __pyx_v_j; __pyx_t_2 = (PyObject *) *__Pyx_BufPtrStrided2d(PyObject **, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_21, __pyx_pybuffernd_values.diminfo[1].strides); __Pyx_INCREF((PyObject*)__pyx_t_2); __Pyx_XDECREF_SET(__pyx_v_val, __pyx_t_2); __pyx_t_2 = 0; /* "pandas/algos.pyx":2008 * * # not nan * if val == val: # <<<<<<<<<<<<<< * nobs[lab, j] += 1 * resx[lab, j] = val */ __pyx_t_2 = PyObject_RichCompare(__pyx_v_val, __pyx_v_val, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2008; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_16 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_16 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2008; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_16) { /* "pandas/algos.pyx":2009 * # not nan * if val == val: * nobs[lab, j] += 1 # <<<<<<<<<<<<<< * resx[lab, j] = val * */ __pyx_t_22 = __pyx_v_lab; __pyx_t_23 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_nobs.rcbuffer->pybuffer.buf, __pyx_t_22, __pyx_pybuffernd_nobs.diminfo[0].strides, __pyx_t_23, __pyx_pybuffernd_nobs.diminfo[1].strides) += 1; /* "pandas/algos.pyx":2010 * if val == val: * nobs[lab, j] += 1 * resx[lab, j] = val # <<<<<<<<<<<<<< * * for i in range(len(counts)): */ __pyx_t_24 = __pyx_v_lab; __pyx_t_25 = __pyx_v_j; __pyx_t_26 = __Pyx_BufPtrStrided2d(PyObject **, __pyx_pybuffernd_resx.rcbuffer->pybuffer.buf, __pyx_t_24, __pyx_pybuffernd_resx.diminfo[0].strides, __pyx_t_25, __pyx_pybuffernd_resx.diminfo[1].strides); __Pyx_GOTREF(*__pyx_t_26); __Pyx_INCREF(__pyx_v_val); __Pyx_DECREF(*__pyx_t_26); *__pyx_t_26 = __pyx_v_val; __Pyx_GIVEREF(*__pyx_t_26); goto __pyx_L10; } __pyx_L10:; } __pyx_L5_continue:; } /* "pandas/algos.pyx":2012 * resx[lab, j] = val * * for i in range(len(counts)): # <<<<<<<<<<<<<< * for j in range(K): * if nobs[i, j] == 0: */ __pyx_t_14 = PyObject_Length(((PyObject *)__pyx_v_counts)); if (unlikely(__pyx_t_14 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2012; __pyx_clineno = __LINE__; goto __pyx_L1_error;} for (__pyx_t_13 = 0; __pyx_t_13 < __pyx_t_14; __pyx_t_13+=1) { __pyx_v_i = __pyx_t_13; /* "pandas/algos.pyx":2013 * * for i in range(len(counts)): * for j in range(K): # <<<<<<<<<<<<<< * if nobs[i, j] == 0: * out[i, j] = nan */ __pyx_t_18 = __pyx_v_K; for (__pyx_t_19 = 0; __pyx_t_19 < __pyx_t_18; __pyx_t_19+=1) { __pyx_v_j = __pyx_t_19; /* "pandas/algos.pyx":2014 * for i in range(len(counts)): * for j in range(K): * if nobs[i, j] == 0: # <<<<<<<<<<<<<< * out[i, j] = nan * else: */ __pyx_t_27 = __pyx_v_i; __pyx_t_28 = __pyx_v_j; __pyx_t_16 = (((*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_nobs.rcbuffer->pybuffer.buf, __pyx_t_27, __pyx_pybuffernd_nobs.diminfo[0].strides, __pyx_t_28, __pyx_pybuffernd_nobs.diminfo[1].strides)) == 0) != 0); if (__pyx_t_16) { /* "pandas/algos.pyx":2015 * for j in range(K): * if nobs[i, j] == 0: * out[i, j] = nan # <<<<<<<<<<<<<< * else: * out[i, j] = resx[i, j] */ __pyx_t_2 = PyFloat_FromDouble(__pyx_v_6pandas_5algos_nan); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2015; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_29 = __pyx_v_i; __pyx_t_30 = __pyx_v_j; __pyx_t_26 = __Pyx_BufPtrStrided2d(PyObject **, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_29, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_30, __pyx_pybuffernd_out.diminfo[1].strides); __Pyx_GOTREF(*__pyx_t_26); __Pyx_INCREF(__pyx_t_2); __Pyx_DECREF(*__pyx_t_26); *__pyx_t_26 = __pyx_t_2; __Pyx_GIVEREF(*__pyx_t_26); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; goto __pyx_L15; } /*else*/ { /* "pandas/algos.pyx":2017 * out[i, j] = nan * else: * out[i, j] = resx[i, j] # <<<<<<<<<<<<<< * * @cython.boundscheck(False) */ __pyx_t_31 = __pyx_v_i; __pyx_t_32 = __pyx_v_j; __pyx_t_2 = (PyObject *) *__Pyx_BufPtrStrided2d(PyObject **, __pyx_pybuffernd_resx.rcbuffer->pybuffer.buf, __pyx_t_31, __pyx_pybuffernd_resx.diminfo[0].strides, __pyx_t_32, __pyx_pybuffernd_resx.diminfo[1].strides); __Pyx_INCREF((PyObject*)__pyx_t_2); __pyx_t_33 = __pyx_v_i; __pyx_t_34 = __pyx_v_j; __pyx_t_26 = __Pyx_BufPtrStrided2d(PyObject **, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_33, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_34, __pyx_pybuffernd_out.diminfo[1].strides); __Pyx_GOTREF(*__pyx_t_26); __Pyx_INCREF(__pyx_t_2); __Pyx_DECREF(*__pyx_t_26); *__pyx_t_26 = __pyx_t_2; __Pyx_GIVEREF(*__pyx_t_26); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } __pyx_L15:; } } __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_counts.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_labels.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_resx.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.group_last_object", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_counts.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_labels.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_resx.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF(__pyx_v_val); __Pyx_XDECREF((PyObject *)__pyx_v_resx); __Pyx_XDECREF((PyObject *)__pyx_v_nobs); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_71group_last_bin_object(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6pandas_5algos_70group_last_bin_object[] = "\n Only aggregates on axis=0\n "; static PyMethodDef __pyx_mdef_6pandas_5algos_71group_last_bin_object = {__Pyx_NAMESTR("group_last_bin_object"), (PyCFunction)__pyx_pw_6pandas_5algos_71group_last_bin_object, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_5algos_70group_last_bin_object)}; static PyObject *__pyx_pw_6pandas_5algos_71group_last_bin_object(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_out = 0; PyArrayObject *__pyx_v_counts = 0; PyArrayObject *__pyx_v_values = 0; PyArrayObject *__pyx_v_bins = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("group_last_bin_object (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__out,&__pyx_n_s__counts,&__pyx_n_s__values,&__pyx_n_s__bins,0}; PyObject* values[4] = {0,0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__out)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__counts)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("group_last_bin_object", 1, 4, 4, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2021; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__values)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("group_last_bin_object", 1, 4, 4, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2021; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__bins)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("group_last_bin_object", 1, 4, 4, 3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2021; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "group_last_bin_object") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2021; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 4) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[3] = PyTuple_GET_ITEM(__pyx_args, 3); } __pyx_v_out = ((PyArrayObject *)values[0]); __pyx_v_counts = ((PyArrayObject *)values[1]); __pyx_v_values = ((PyArrayObject *)values[2]); __pyx_v_bins = ((PyArrayObject *)values[3]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("group_last_bin_object", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2021; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.group_last_bin_object", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_5numpy_ndarray, 1, "out", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2021; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_counts), __pyx_ptype_5numpy_ndarray, 1, "counts", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2022; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2023; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_bins), __pyx_ptype_5numpy_ndarray, 1, "bins", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2024; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_70group_last_bin_object(__pyx_self, __pyx_v_out, __pyx_v_counts, __pyx_v_values, __pyx_v_bins); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/algos.pyx":2021 * @cython.boundscheck(False) * @cython.wraparound(False) * def group_last_bin_object(ndarray[object, ndim=2] out, # <<<<<<<<<<<<<< * ndarray[int64_t] counts, * ndarray[object, ndim=2] values, */ static PyObject *__pyx_pf_6pandas_5algos_70group_last_bin_object(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_out, PyArrayObject *__pyx_v_counts, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_bins) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_N; Py_ssize_t __pyx_v_K; Py_ssize_t __pyx_v_ngroups; Py_ssize_t __pyx_v_b; PyObject *__pyx_v_val = 0; PyArrayObject *__pyx_v_resx = 0; PyArrayObject *__pyx_v_nobs = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_bins; __Pyx_Buffer __pyx_pybuffer_bins; __Pyx_LocalBuf_ND __pyx_pybuffernd_counts; __Pyx_Buffer __pyx_pybuffer_counts; __Pyx_LocalBuf_ND __pyx_pybuffernd_nobs; __Pyx_Buffer __pyx_pybuffer_nobs; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_resx; __Pyx_Buffer __pyx_pybuffer_resx; __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; 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; PyArrayObject *__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; PyObject *(*__pyx_t_16)(PyObject *); Py_ssize_t __pyx_t_17; int __pyx_t_18; int __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; PyObject **__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; Py_ssize_t __pyx_t_37; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("group_last_bin_object", 0); __pyx_pybuffer_resx.pybuffer.buf = NULL; __pyx_pybuffer_resx.refcount = 0; __pyx_pybuffernd_resx.data = NULL; __pyx_pybuffernd_resx.rcbuffer = &__pyx_pybuffer_resx; __pyx_pybuffer_nobs.pybuffer.buf = NULL; __pyx_pybuffer_nobs.refcount = 0; __pyx_pybuffernd_nobs.data = NULL; __pyx_pybuffernd_nobs.rcbuffer = &__pyx_pybuffer_nobs; __pyx_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; __pyx_pybuffer_counts.pybuffer.buf = NULL; __pyx_pybuffer_counts.refcount = 0; __pyx_pybuffernd_counts.data = NULL; __pyx_pybuffernd_counts.rcbuffer = &__pyx_pybuffer_counts; __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_bins.pybuffer.buf = NULL; __pyx_pybuffer_bins.refcount = 0; __pyx_pybuffernd_bins.data = NULL; __pyx_pybuffernd_bins.rcbuffer = &__pyx_pybuffer_bins; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_v_out, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2021; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; __pyx_pybuffernd_out.diminfo[1].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_out.diminfo[1].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[1]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_counts.rcbuffer->pybuffer, (PyObject*)__pyx_v_counts, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2021; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_counts.diminfo[0].strides = __pyx_pybuffernd_counts.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_counts.diminfo[0].shape = __pyx_pybuffernd_counts.rcbuffer->pybuffer.shape[0]; { __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, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2021; __pyx_clineno = __LINE__; goto __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_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_bins.rcbuffer->pybuffer, (PyObject*)__pyx_v_bins, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2021; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_bins.diminfo[0].strides = __pyx_pybuffernd_bins.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_bins.diminfo[0].shape = __pyx_pybuffernd_bins.rcbuffer->pybuffer.shape[0]; /* "pandas/algos.pyx":2035 * ndarray[float64_t, ndim=2] nobs * * nobs = np.zeros(( out).shape, dtype=np.float64) # <<<<<<<<<<<<<< * resx = np.empty(( out).shape, dtype=object) * */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2035; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s__zeros); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2035; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_out), __pyx_n_s__shape); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2035; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2035; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2035; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2035; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s__float64); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2035; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__dtype), __pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2035; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_3), ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2035; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__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_filename = __pyx_f[0]; __pyx_lineno = 2035; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_6 = ((PyArrayObject *)__pyx_t_5); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer); __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_nobs.rcbuffer->pybuffer, (PyObject*)__pyx_v_nobs, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_pybuffernd_nobs.diminfo[0].strides = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_nobs.diminfo[0].shape = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_nobs.diminfo[1].strides = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_nobs.diminfo[1].shape = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.shape[1]; if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2035; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_6 = 0; __pyx_v_nobs = ((PyArrayObject *)__pyx_t_5); __pyx_t_5 = 0; /* "pandas/algos.pyx":2036 * * nobs = np.zeros(( out).shape, dtype=np.float64) * resx = np.empty(( out).shape, dtype=object) # <<<<<<<<<<<<<< * * if bins[len(bins) - 1] == len(values): */ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2036; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s__empty); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2036; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_out), __pyx_n_s__shape); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2036; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2036; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyDict_New(); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2036; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_5)); if (PyDict_SetItem(__pyx_t_5, ((PyObject *)__pyx_n_s__dtype), __pyx_builtin_object) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2036; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_3), ((PyObject *)__pyx_t_5)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2036; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2036; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_11 = ((PyArrayObject *)__pyx_t_2); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_resx.rcbuffer->pybuffer); __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_resx.rcbuffer->pybuffer, (PyObject*)__pyx_t_11, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_resx.rcbuffer->pybuffer, (PyObject*)__pyx_v_resx, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_pybuffernd_resx.diminfo[0].strides = __pyx_pybuffernd_resx.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_resx.diminfo[0].shape = __pyx_pybuffernd_resx.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_resx.diminfo[1].strides = __pyx_pybuffernd_resx.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_resx.diminfo[1].shape = __pyx_pybuffernd_resx.rcbuffer->pybuffer.shape[1]; if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2036; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_11 = 0; __pyx_v_resx = ((PyArrayObject *)__pyx_t_2); __pyx_t_2 = 0; /* "pandas/algos.pyx":2038 * resx = np.empty(( out).shape, dtype=object) * * if bins[len(bins) - 1] == len(values): # <<<<<<<<<<<<<< * ngroups = len(bins) * else: */ __pyx_t_12 = PyObject_Length(((PyObject *)__pyx_v_bins)); if (unlikely(__pyx_t_12 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2038; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_13 = (__pyx_t_12 - 1); __pyx_t_14 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_14 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2038; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_15 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_bins.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_bins.diminfo[0].strides)) == __pyx_t_14) != 0); if (__pyx_t_15) { /* "pandas/algos.pyx":2039 * * if bins[len(bins) - 1] == len(values): * ngroups = len(bins) # <<<<<<<<<<<<<< * else: * ngroups = len(bins) + 1 */ __pyx_t_14 = PyObject_Length(((PyObject *)__pyx_v_bins)); if (unlikely(__pyx_t_14 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2039; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_ngroups = __pyx_t_14; goto __pyx_L3; } /*else*/ { /* "pandas/algos.pyx":2041 * ngroups = len(bins) * else: * ngroups = len(bins) + 1 # <<<<<<<<<<<<<< * * N, K = ( values).shape */ __pyx_t_14 = PyObject_Length(((PyObject *)__pyx_v_bins)); if (unlikely(__pyx_t_14 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2041; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_ngroups = (__pyx_t_14 + 1); } __pyx_L3:; /* "pandas/algos.pyx":2043 * ngroups = len(bins) + 1 * * N, K = ( values).shape # <<<<<<<<<<<<<< * * b = 0 */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_values), __pyx_n_s__shape); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2043; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if ((likely(PyTuple_CheckExact(__pyx_t_2))) || (PyList_CheckExact(__pyx_t_2))) { PyObject* sequence = __pyx_t_2; #if CYTHON_COMPILING_IN_CPYTHON Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2043; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_5 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1); } else { __pyx_t_5 = PyList_GET_ITEM(sequence, 0); __pyx_t_3 = PyList_GET_ITEM(sequence, 1); } __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(__pyx_t_3); #else __pyx_t_5 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2043; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2043; __pyx_clineno = __LINE__; goto __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_1 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2043; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_16 = Py_TYPE(__pyx_t_1)->tp_iternext; index = 0; __pyx_t_5 = __pyx_t_16(__pyx_t_1); if (unlikely(!__pyx_t_5)) goto __pyx_L4_unpacking_failed; __Pyx_GOTREF(__pyx_t_5); index = 1; __pyx_t_3 = __pyx_t_16(__pyx_t_1); if (unlikely(!__pyx_t_3)) goto __pyx_L4_unpacking_failed; __Pyx_GOTREF(__pyx_t_3); if (__Pyx_IternextUnpackEndCheck(__pyx_t_16(__pyx_t_1), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2043; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_16 = NULL; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L5_unpacking_done; __pyx_L4_unpacking_failed:; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_16 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2043; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_L5_unpacking_done:; } __pyx_t_14 = __Pyx_PyIndex_AsSsize_t(__pyx_t_5); if (unlikely((__pyx_t_14 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2043; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_12 = __Pyx_PyIndex_AsSsize_t(__pyx_t_3); if (unlikely((__pyx_t_12 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2043; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_N = __pyx_t_14; __pyx_v_K = __pyx_t_12; /* "pandas/algos.pyx":2045 * N, K = ( values).shape * * b = 0 # <<<<<<<<<<<<<< * for i in range(N): * while b < ngroups - 1 and i >= bins[b]: */ __pyx_v_b = 0; /* "pandas/algos.pyx":2046 * * b = 0 * for i in range(N): # <<<<<<<<<<<<<< * while b < ngroups - 1 and i >= bins[b]: * b += 1 */ __pyx_t_12 = __pyx_v_N; for (__pyx_t_14 = 0; __pyx_t_14 < __pyx_t_12; __pyx_t_14+=1) { __pyx_v_i = __pyx_t_14; /* "pandas/algos.pyx":2047 * b = 0 * for i in range(N): * while b < ngroups - 1 and i >= bins[b]: # <<<<<<<<<<<<<< * b += 1 * */ while (1) { __pyx_t_15 = ((__pyx_v_b < (__pyx_v_ngroups - 1)) != 0); if (__pyx_t_15) { __pyx_t_17 = __pyx_v_b; __pyx_t_18 = ((__pyx_v_i >= (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_bins.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_bins.diminfo[0].strides))) != 0); __pyx_t_19 = __pyx_t_18; } else { __pyx_t_19 = __pyx_t_15; } if (!__pyx_t_19) break; /* "pandas/algos.pyx":2048 * for i in range(N): * while b < ngroups - 1 and i >= bins[b]: * b += 1 # <<<<<<<<<<<<<< * * counts[b] += 1 */ __pyx_v_b = (__pyx_v_b + 1); } /* "pandas/algos.pyx":2050 * b += 1 * * counts[b] += 1 # <<<<<<<<<<<<<< * for j in range(K): * val = values[i, j] */ __pyx_t_20 = __pyx_v_b; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_counts.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_counts.diminfo[0].strides) += 1; /* "pandas/algos.pyx":2051 * * counts[b] += 1 * for j in range(K): # <<<<<<<<<<<<<< * val = values[i, j] * */ __pyx_t_21 = __pyx_v_K; for (__pyx_t_22 = 0; __pyx_t_22 < __pyx_t_21; __pyx_t_22+=1) { __pyx_v_j = __pyx_t_22; /* "pandas/algos.pyx":2052 * counts[b] += 1 * for j in range(K): * val = values[i, j] # <<<<<<<<<<<<<< * * # not nan */ __pyx_t_23 = __pyx_v_i; __pyx_t_24 = __pyx_v_j; __pyx_t_2 = (PyObject *) *__Pyx_BufPtrStrided2d(PyObject **, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_23, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_24, __pyx_pybuffernd_values.diminfo[1].strides); __Pyx_INCREF((PyObject*)__pyx_t_2); __Pyx_XDECREF_SET(__pyx_v_val, __pyx_t_2); __pyx_t_2 = 0; /* "pandas/algos.pyx":2055 * * # not nan * if val == val: # <<<<<<<<<<<<<< * nobs[b, j] += 1 * resx[b, j] = val */ __pyx_t_2 = PyObject_RichCompare(__pyx_v_val, __pyx_v_val, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2055; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_19 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_19 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2055; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_19) { /* "pandas/algos.pyx":2056 * # not nan * if val == val: * nobs[b, j] += 1 # <<<<<<<<<<<<<< * resx[b, j] = val * */ __pyx_t_25 = __pyx_v_b; __pyx_t_26 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_nobs.rcbuffer->pybuffer.buf, __pyx_t_25, __pyx_pybuffernd_nobs.diminfo[0].strides, __pyx_t_26, __pyx_pybuffernd_nobs.diminfo[1].strides) += 1.0; /* "pandas/algos.pyx":2057 * if val == val: * nobs[b, j] += 1 * resx[b, j] = val # <<<<<<<<<<<<<< * * for i in range(ngroups): */ __pyx_t_27 = __pyx_v_b; __pyx_t_28 = __pyx_v_j; __pyx_t_29 = __Pyx_BufPtrStrided2d(PyObject **, __pyx_pybuffernd_resx.rcbuffer->pybuffer.buf, __pyx_t_27, __pyx_pybuffernd_resx.diminfo[0].strides, __pyx_t_28, __pyx_pybuffernd_resx.diminfo[1].strides); __Pyx_GOTREF(*__pyx_t_29); __Pyx_INCREF(__pyx_v_val); __Pyx_DECREF(*__pyx_t_29); *__pyx_t_29 = __pyx_v_val; __Pyx_GIVEREF(*__pyx_t_29); goto __pyx_L12; } __pyx_L12:; } } /* "pandas/algos.pyx":2059 * resx[b, j] = val * * for i in range(ngroups): # <<<<<<<<<<<<<< * for j in range(K): * if nobs[i, j] == 0: */ __pyx_t_12 = __pyx_v_ngroups; for (__pyx_t_14 = 0; __pyx_t_14 < __pyx_t_12; __pyx_t_14+=1) { __pyx_v_i = __pyx_t_14; /* "pandas/algos.pyx":2060 * * for i in range(ngroups): * for j in range(K): # <<<<<<<<<<<<<< * if nobs[i, j] == 0: * out[i, j] = nan */ __pyx_t_21 = __pyx_v_K; for (__pyx_t_22 = 0; __pyx_t_22 < __pyx_t_21; __pyx_t_22+=1) { __pyx_v_j = __pyx_t_22; /* "pandas/algos.pyx":2061 * for i in range(ngroups): * for j in range(K): * if nobs[i, j] == 0: # <<<<<<<<<<<<<< * out[i, j] = nan * else: */ __pyx_t_30 = __pyx_v_i; __pyx_t_31 = __pyx_v_j; __pyx_t_19 = (((*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_nobs.rcbuffer->pybuffer.buf, __pyx_t_30, __pyx_pybuffernd_nobs.diminfo[0].strides, __pyx_t_31, __pyx_pybuffernd_nobs.diminfo[1].strides)) == 0.0) != 0); if (__pyx_t_19) { /* "pandas/algos.pyx":2062 * for j in range(K): * if nobs[i, j] == 0: * out[i, j] = nan # <<<<<<<<<<<<<< * else: * out[i, j] = resx[i, j] */ __pyx_t_2 = PyFloat_FromDouble(__pyx_v_6pandas_5algos_nan); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2062; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_32 = __pyx_v_i; __pyx_t_33 = __pyx_v_j; __pyx_t_29 = __Pyx_BufPtrStrided2d(PyObject **, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_32, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_33, __pyx_pybuffernd_out.diminfo[1].strides); __Pyx_GOTREF(*__pyx_t_29); __Pyx_INCREF(__pyx_t_2); __Pyx_DECREF(*__pyx_t_29); *__pyx_t_29 = __pyx_t_2; __Pyx_GIVEREF(*__pyx_t_29); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; goto __pyx_L17; } /*else*/ { /* "pandas/algos.pyx":2064 * out[i, j] = nan * else: * out[i, j] = resx[i, j] # <<<<<<<<<<<<<< * * */ __pyx_t_34 = __pyx_v_i; __pyx_t_35 = __pyx_v_j; __pyx_t_2 = (PyObject *) *__Pyx_BufPtrStrided2d(PyObject **, __pyx_pybuffernd_resx.rcbuffer->pybuffer.buf, __pyx_t_34, __pyx_pybuffernd_resx.diminfo[0].strides, __pyx_t_35, __pyx_pybuffernd_resx.diminfo[1].strides); __Pyx_INCREF((PyObject*)__pyx_t_2); __pyx_t_36 = __pyx_v_i; __pyx_t_37 = __pyx_v_j; __pyx_t_29 = __Pyx_BufPtrStrided2d(PyObject **, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_36, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_37, __pyx_pybuffernd_out.diminfo[1].strides); __Pyx_GOTREF(*__pyx_t_29); __Pyx_INCREF(__pyx_t_2); __Pyx_DECREF(*__pyx_t_29); *__pyx_t_29 = __pyx_t_2; __Pyx_GIVEREF(*__pyx_t_29); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } __pyx_L17:; } } __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_bins.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_counts.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_resx.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.group_last_bin_object", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_bins.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_counts.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_resx.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF(__pyx_v_val); __Pyx_XDECREF((PyObject *)__pyx_v_resx); __Pyx_XDECREF((PyObject *)__pyx_v_nobs); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_73group_median(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6pandas_5algos_72group_median[] = "\n Only aggregates on axis=0\n "; static PyMethodDef __pyx_mdef_6pandas_5algos_73group_median = {__Pyx_NAMESTR("group_median"), (PyCFunction)__pyx_pw_6pandas_5algos_73group_median, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_5algos_72group_median)}; static PyObject *__pyx_pw_6pandas_5algos_73group_median(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_out = 0; PyArrayObject *__pyx_v_counts = 0; PyArrayObject *__pyx_v_values = 0; PyArrayObject *__pyx_v_labels = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("group_median (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__out,&__pyx_n_s__counts,&__pyx_n_s__values,&__pyx_n_s__labels,0}; PyObject* values[4] = {0,0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__out)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__counts)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("group_median", 1, 4, 4, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2071; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__values)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("group_median", 1, 4, 4, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2071; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__labels)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("group_median", 1, 4, 4, 3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2071; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "group_median") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2071; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 4) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[3] = PyTuple_GET_ITEM(__pyx_args, 3); } __pyx_v_out = ((PyArrayObject *)values[0]); __pyx_v_counts = ((PyArrayObject *)values[1]); __pyx_v_values = ((PyArrayObject *)values[2]); __pyx_v_labels = ((PyArrayObject *)values[3]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("group_median", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2071; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.group_median", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_5numpy_ndarray, 1, "out", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2071; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_counts), __pyx_ptype_5numpy_ndarray, 1, "counts", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2072; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2073; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_labels), __pyx_ptype_5numpy_ndarray, 1, "labels", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2074; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_72group_median(__pyx_self, __pyx_v_out, __pyx_v_counts, __pyx_v_values, __pyx_v_labels); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/algos.pyx":2071 * # median * * def group_median(ndarray[float64_t, ndim=2] out, # <<<<<<<<<<<<<< * ndarray[int64_t] counts, * ndarray[float64_t, ndim=2] values, */ static PyObject *__pyx_pf_6pandas_5algos_72group_median(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_out, PyArrayObject *__pyx_v_counts, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_labels) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_N; Py_ssize_t __pyx_v_K; Py_ssize_t __pyx_v_ngroups; Py_ssize_t __pyx_v_size; PyArrayObject *__pyx_v__counts = 0; PyArrayObject *__pyx_v_data = 0; __pyx_t_5numpy_float64_t *__pyx_v_ptr; PyObject *__pyx_v_indexer = NULL; __Pyx_LocalBuf_ND __pyx_pybuffernd__counts; __Pyx_Buffer __pyx_pybuffer__counts; __Pyx_LocalBuf_ND __pyx_pybuffernd_counts; __Pyx_Buffer __pyx_pybuffer_counts; __Pyx_LocalBuf_ND __pyx_pybuffernd_labels; __Pyx_Buffer __pyx_pybuffer_labels; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __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)(PyObject *); Py_ssize_t __pyx_t_7; PyArrayObject *__pyx_t_8 = NULL; int __pyx_t_9; PyObject *__pyx_t_10 = NULL; PyObject *__pyx_t_11 = NULL; PyObject *__pyx_t_12 = NULL; PyObject *__pyx_t_13 = NULL; long __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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("group_median", 0); __pyx_pybuffer__counts.pybuffer.buf = NULL; __pyx_pybuffer__counts.refcount = 0; __pyx_pybuffernd__counts.data = NULL; __pyx_pybuffernd__counts.rcbuffer = &__pyx_pybuffer__counts; __pyx_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; __pyx_pybuffer_counts.pybuffer.buf = NULL; __pyx_pybuffer_counts.refcount = 0; __pyx_pybuffernd_counts.data = NULL; __pyx_pybuffernd_counts.rcbuffer = &__pyx_pybuffer_counts; __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_labels.pybuffer.buf = NULL; __pyx_pybuffer_labels.refcount = 0; __pyx_pybuffernd_labels.data = NULL; __pyx_pybuffernd_labels.rcbuffer = &__pyx_pybuffer_labels; { __Pyx_BufFmt_StackElem __pyx_stack[1]; 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, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2071; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; __pyx_pybuffernd_out.diminfo[1].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_out.diminfo[1].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[1]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_counts.rcbuffer->pybuffer, (PyObject*)__pyx_v_counts, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2071; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_counts.diminfo[0].strides = __pyx_pybuffernd_counts.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_counts.diminfo[0].shape = __pyx_pybuffernd_counts.rcbuffer->pybuffer.shape[0]; { __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, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2071; __pyx_clineno = __LINE__; goto __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_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_labels.rcbuffer->pybuffer, (PyObject*)__pyx_v_labels, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2071; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_labels.diminfo[0].strides = __pyx_pybuffernd_labels.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_labels.diminfo[0].shape = __pyx_pybuffernd_labels.rcbuffer->pybuffer.shape[0]; /* "pandas/algos.pyx":2083 * ndarray data * float64_t* ptr * ngroups = len(counts) # <<<<<<<<<<<<<< * N, K = ( values).shape * */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_counts)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2083; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_ngroups = __pyx_t_1; /* "pandas/algos.pyx":2084 * float64_t* ptr * ngroups = len(counts) * N, K = ( values).shape # <<<<<<<<<<<<<< * * indexer, _counts = groupsort_indexer(labels, ngroups) */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_values), __pyx_n_s__shape); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2084; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if ((likely(PyTuple_CheckExact(__pyx_t_2))) || (PyList_CheckExact(__pyx_t_2))) { PyObject* sequence = __pyx_t_2; #if CYTHON_COMPILING_IN_CPYTHON Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2084; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_4 = PyTuple_GET_ITEM(sequence, 1); } else { __pyx_t_3 = PyList_GET_ITEM(sequence, 0); __pyx_t_4 = PyList_GET_ITEM(sequence, 1); } __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(__pyx_t_4); #else __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2084; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2084; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); #endif __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } else { Py_ssize_t index = -1; __pyx_t_5 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2084; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_6 = Py_TYPE(__pyx_t_5)->tp_iternext; index = 0; __pyx_t_3 = __pyx_t_6(__pyx_t_5); if (unlikely(!__pyx_t_3)) goto __pyx_L3_unpacking_failed; __Pyx_GOTREF(__pyx_t_3); index = 1; __pyx_t_4 = __pyx_t_6(__pyx_t_5); if (unlikely(!__pyx_t_4)) goto __pyx_L3_unpacking_failed; __Pyx_GOTREF(__pyx_t_4); if (__Pyx_IternextUnpackEndCheck(__pyx_t_6(__pyx_t_5), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2084; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_6 = NULL; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; goto __pyx_L4_unpacking_done; __pyx_L3_unpacking_failed:; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_6 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2084; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_L4_unpacking_done:; } __pyx_t_1 = __Pyx_PyIndex_AsSsize_t(__pyx_t_3); if (unlikely((__pyx_t_1 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2084; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_7 = __Pyx_PyIndex_AsSsize_t(__pyx_t_4); if (unlikely((__pyx_t_7 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2084; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_N = __pyx_t_1; __pyx_v_K = __pyx_t_7; /* "pandas/algos.pyx":2086 * N, K = ( values).shape * * indexer, _counts = groupsort_indexer(labels, ngroups) # <<<<<<<<<<<<<< * counts[:] = _counts[1:] * */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__groupsort_indexer); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2086; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = PyInt_FromSsize_t(__pyx_v_ngroups); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2086; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2086; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(((PyObject *)__pyx_v_labels)); PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_v_labels)); __Pyx_GIVEREF(((PyObject *)__pyx_v_labels)); PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2086; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; if ((likely(PyTuple_CheckExact(__pyx_t_4))) || (PyList_CheckExact(__pyx_t_4))) { PyObject* sequence = __pyx_t_4; #if CYTHON_COMPILING_IN_CPYTHON Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2086; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_2 = PyTuple_GET_ITEM(sequence, 1); } else { __pyx_t_3 = PyList_GET_ITEM(sequence, 0); __pyx_t_2 = PyList_GET_ITEM(sequence, 1); } __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(__pyx_t_2); #else __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2086; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2086; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); #endif __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else { Py_ssize_t index = -1; __pyx_t_5 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2086; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_6 = Py_TYPE(__pyx_t_5)->tp_iternext; index = 0; __pyx_t_3 = __pyx_t_6(__pyx_t_5); if (unlikely(!__pyx_t_3)) goto __pyx_L5_unpacking_failed; __Pyx_GOTREF(__pyx_t_3); index = 1; __pyx_t_2 = __pyx_t_6(__pyx_t_5); if (unlikely(!__pyx_t_2)) goto __pyx_L5_unpacking_failed; __Pyx_GOTREF(__pyx_t_2); if (__Pyx_IternextUnpackEndCheck(__pyx_t_6(__pyx_t_5), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2086; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_6 = NULL; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; goto __pyx_L6_unpacking_done; __pyx_L5_unpacking_failed:; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_6 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2086; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_L6_unpacking_done:; } if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2086; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_indexer = __pyx_t_3; __pyx_t_3 = 0; __pyx_t_8 = ((PyArrayObject *)__pyx_t_2); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd__counts.rcbuffer->pybuffer); __pyx_t_9 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd__counts.rcbuffer->pybuffer, (PyObject*)__pyx_t_8, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_9 < 0)) { PyErr_Fetch(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd__counts.rcbuffer->pybuffer, (PyObject*)__pyx_v__counts, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_11); Py_XDECREF(__pyx_t_12); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_10, __pyx_t_11, __pyx_t_12); } } __pyx_pybuffernd__counts.diminfo[0].strides = __pyx_pybuffernd__counts.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd__counts.diminfo[0].shape = __pyx_pybuffernd__counts.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2086; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_8 = 0; __pyx_v__counts = ((PyArrayObject *)__pyx_t_2); __pyx_t_2 = 0; /* "pandas/algos.pyx":2087 * * indexer, _counts = groupsort_indexer(labels, ngroups) * counts[:] = _counts[1:] # <<<<<<<<<<<<<< * * data = np.empty((K, N), dtype=np.float64) */ __pyx_t_4 = __Pyx_PyObject_GetSlice(((PyObject *)__pyx_v__counts), 1, 0, NULL, NULL, &__pyx_k_slice_44, 1, 0, 1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2087; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); if (__Pyx_PyObject_SetSlice(((PyObject *)__pyx_v_counts), __pyx_t_4, 0, 0, NULL, NULL, &__pyx_k_slice_45, 0, 0, 1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2087; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "pandas/algos.pyx":2089 * counts[:] = _counts[1:] * * data = np.empty((K, N), dtype=np.float64) # <<<<<<<<<<<<<< * ptr = data.data * */ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2089; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s__empty); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2089; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyInt_FromSsize_t(__pyx_v_K); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2089; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = PyInt_FromSsize_t(__pyx_v_N); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2089; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2089; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_4 = 0; __pyx_t_3 = 0; __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2089; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_t_5)); __Pyx_GIVEREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; __pyx_t_5 = PyDict_New(); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2089; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_5)); __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2089; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s__float64); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2089; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (PyDict_SetItem(__pyx_t_5, ((PyObject *)__pyx_n_s__dtype), __pyx_t_13) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2089; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_13 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_3), ((PyObject *)__pyx_t_5)); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2089; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; if (!(likely(((__pyx_t_13) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_13, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2089; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_data = ((PyArrayObject *)__pyx_t_13); __pyx_t_13 = 0; /* "pandas/algos.pyx":2090 * * data = np.empty((K, N), dtype=np.float64) * ptr = data.data # <<<<<<<<<<<<<< * * take_2d_axis1_float64_float64(values.T, indexer, out=data) */ __pyx_v_ptr = ((__pyx_t_5numpy_float64_t *)__pyx_v_data->data); /* "pandas/algos.pyx":2092 * ptr = data.data * * take_2d_axis1_float64_float64(values.T, indexer, out=data) # <<<<<<<<<<<<<< * * for i in range(K): */ __pyx_t_13 = __Pyx_GetModuleGlobalName(__pyx_n_s_46); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2092; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_values), __pyx_n_s__T); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2092; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2092; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __Pyx_INCREF(__pyx_v_indexer); PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_indexer); __Pyx_GIVEREF(__pyx_v_indexer); __pyx_t_5 = 0; __pyx_t_5 = PyDict_New(); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2092; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_5)); if (PyDict_SetItem(__pyx_t_5, ((PyObject *)__pyx_n_s__out), ((PyObject *)__pyx_v_data)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2092; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_2 = PyObject_Call(__pyx_t_13, ((PyObject *)__pyx_t_3), ((PyObject *)__pyx_t_5)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2092; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/algos.pyx":2094 * take_2d_axis1_float64_float64(values.T, indexer, out=data) * * for i in range(K): # <<<<<<<<<<<<<< * # exclude NA group * ptr += _counts[0] */ __pyx_t_7 = __pyx_v_K; for (__pyx_t_1 = 0; __pyx_t_1 < __pyx_t_7; __pyx_t_1+=1) { __pyx_v_i = __pyx_t_1; /* "pandas/algos.pyx":2096 * for i in range(K): * # exclude NA group * ptr += _counts[0] # <<<<<<<<<<<<<< * for j in range(ngroups): * size = _counts[j + 1] */ __pyx_t_14 = 0; __pyx_t_9 = -1; if (__pyx_t_14 < 0) { __pyx_t_14 += __pyx_pybuffernd__counts.diminfo[0].shape; if (unlikely(__pyx_t_14 < 0)) __pyx_t_9 = 0; } else if (unlikely(__pyx_t_14 >= __pyx_pybuffernd__counts.diminfo[0].shape)) __pyx_t_9 = 0; if (unlikely(__pyx_t_9 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_9); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2096; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_ptr = (__pyx_v_ptr + (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd__counts.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd__counts.diminfo[0].strides))); /* "pandas/algos.pyx":2097 * # exclude NA group * ptr += _counts[0] * for j in range(ngroups): # <<<<<<<<<<<<<< * size = _counts[j + 1] * out[j, i] = _median_linear(ptr, size) */ __pyx_t_15 = __pyx_v_ngroups; for (__pyx_t_16 = 0; __pyx_t_16 < __pyx_t_15; __pyx_t_16+=1) { __pyx_v_j = __pyx_t_16; /* "pandas/algos.pyx":2098 * ptr += _counts[0] * for j in range(ngroups): * size = _counts[j + 1] # <<<<<<<<<<<<<< * out[j, i] = _median_linear(ptr, size) * ptr += size */ __pyx_t_17 = (__pyx_v_j + 1); __pyx_t_9 = -1; if (__pyx_t_17 < 0) { __pyx_t_17 += __pyx_pybuffernd__counts.diminfo[0].shape; if (unlikely(__pyx_t_17 < 0)) __pyx_t_9 = 0; } else if (unlikely(__pyx_t_17 >= __pyx_pybuffernd__counts.diminfo[0].shape)) __pyx_t_9 = 0; if (unlikely(__pyx_t_9 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_9); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2098; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_size = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd__counts.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd__counts.diminfo[0].strides)); /* "pandas/algos.pyx":2099 * for j in range(ngroups): * size = _counts[j + 1] * out[j, i] = _median_linear(ptr, size) # <<<<<<<<<<<<<< * ptr += size * */ __pyx_t_18 = __pyx_v_j; __pyx_t_19 = __pyx_v_i; __pyx_t_9 = -1; if (__pyx_t_18 < 0) { __pyx_t_18 += __pyx_pybuffernd_out.diminfo[0].shape; if (unlikely(__pyx_t_18 < 0)) __pyx_t_9 = 0; } else if (unlikely(__pyx_t_18 >= __pyx_pybuffernd_out.diminfo[0].shape)) __pyx_t_9 = 0; if (__pyx_t_19 < 0) { __pyx_t_19 += __pyx_pybuffernd_out.diminfo[1].shape; if (unlikely(__pyx_t_19 < 0)) __pyx_t_9 = 1; } else if (unlikely(__pyx_t_19 >= __pyx_pybuffernd_out.diminfo[1].shape)) __pyx_t_9 = 1; if (unlikely(__pyx_t_9 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_9); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2099; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_19, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_f_6pandas_5algos__median_linear(__pyx_v_ptr, __pyx_v_size); /* "pandas/algos.pyx":2100 * size = _counts[j + 1] * out[j, i] = _median_linear(ptr, size) * ptr += size # <<<<<<<<<<<<<< * * */ __pyx_v_ptr = (__pyx_v_ptr + __pyx_v_size); } } __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_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_13); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd__counts.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_counts.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_labels.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.group_median", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd__counts.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_counts.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_labels.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v__counts); __Pyx_XDECREF((PyObject *)__pyx_v_data); __Pyx_XDECREF(__pyx_v_indexer); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/algos.pyx":2103 * * * cdef inline float64_t _median_linear(float64_t* a, int n): # <<<<<<<<<<<<<< * cdef int i, j, na_count = 0 * cdef float64_t result */ static CYTHON_INLINE __pyx_t_5numpy_float64_t __pyx_f_6pandas_5algos__median_linear(__pyx_t_5numpy_float64_t *__pyx_v_a, int __pyx_v_n) { int __pyx_v_i; int __pyx_v_j; int __pyx_v_na_count; __pyx_t_5numpy_float64_t __pyx_v_result; __pyx_t_5numpy_float64_t *__pyx_v_tmp; __pyx_t_5numpy_float64_t __pyx_r; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; __pyx_t_5numpy_float64_t __pyx_t_5; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_median_linear", 0); /* "pandas/algos.pyx":2104 * * cdef inline float64_t _median_linear(float64_t* a, int n): * cdef int i, j, na_count = 0 # <<<<<<<<<<<<<< * cdef float64_t result * cdef float64_t* tmp */ __pyx_v_na_count = 0; /* "pandas/algos.pyx":2109 * * # count NAs * for i in range(n): # <<<<<<<<<<<<<< * if a[i] != a[i]: * na_count += 1 */ __pyx_t_1 = __pyx_v_n; for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) { __pyx_v_i = __pyx_t_2; /* "pandas/algos.pyx":2110 * # count NAs * for i in range(n): * if a[i] != a[i]: # <<<<<<<<<<<<<< * na_count += 1 * */ __pyx_t_3 = (((__pyx_v_a[__pyx_v_i]) != (__pyx_v_a[__pyx_v_i])) != 0); if (__pyx_t_3) { /* "pandas/algos.pyx":2111 * for i in range(n): * if a[i] != a[i]: * na_count += 1 # <<<<<<<<<<<<<< * * if na_count: */ __pyx_v_na_count = (__pyx_v_na_count + 1); goto __pyx_L5; } __pyx_L5:; } /* "pandas/algos.pyx":2113 * na_count += 1 * * if na_count: # <<<<<<<<<<<<<< * if na_count == n: * return NaN */ __pyx_t_3 = (__pyx_v_na_count != 0); if (__pyx_t_3) { /* "pandas/algos.pyx":2114 * * if na_count: * if na_count == n: # <<<<<<<<<<<<<< * return NaN * */ __pyx_t_3 = ((__pyx_v_na_count == __pyx_v_n) != 0); if (__pyx_t_3) { /* "pandas/algos.pyx":2115 * if na_count: * if na_count == n: * return NaN # <<<<<<<<<<<<<< * * tmp = malloc((n - na_count) * sizeof(float64_t)) */ __pyx_r = __pyx_v_6pandas_5algos_NaN; goto __pyx_L0; goto __pyx_L7; } __pyx_L7:; /* "pandas/algos.pyx":2117 * return NaN * * tmp = malloc((n - na_count) * sizeof(float64_t)) # <<<<<<<<<<<<<< * * j = 0 */ __pyx_v_tmp = ((__pyx_t_5numpy_float64_t *)malloc(((__pyx_v_n - __pyx_v_na_count) * (sizeof(__pyx_t_5numpy_float64_t))))); /* "pandas/algos.pyx":2119 * tmp = malloc((n - na_count) * sizeof(float64_t)) * * j = 0 # <<<<<<<<<<<<<< * for i in range(n): * if a[i] == a[i]: */ __pyx_v_j = 0; /* "pandas/algos.pyx":2120 * * j = 0 * for i in range(n): # <<<<<<<<<<<<<< * if a[i] == a[i]: * tmp[j] = a[i] */ __pyx_t_1 = __pyx_v_n; for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) { __pyx_v_i = __pyx_t_2; /* "pandas/algos.pyx":2121 * j = 0 * for i in range(n): * if a[i] == a[i]: # <<<<<<<<<<<<<< * tmp[j] = a[i] * j += 1 */ __pyx_t_3 = (((__pyx_v_a[__pyx_v_i]) == (__pyx_v_a[__pyx_v_i])) != 0); if (__pyx_t_3) { /* "pandas/algos.pyx":2122 * for i in range(n): * if a[i] == a[i]: * tmp[j] = a[i] # <<<<<<<<<<<<<< * j += 1 * */ (__pyx_v_tmp[__pyx_v_j]) = (__pyx_v_a[__pyx_v_i]); /* "pandas/algos.pyx":2123 * if a[i] == a[i]: * tmp[j] = a[i] * j += 1 # <<<<<<<<<<<<<< * * a = tmp */ __pyx_v_j = (__pyx_v_j + 1); goto __pyx_L10; } __pyx_L10:; } /* "pandas/algos.pyx":2125 * j += 1 * * a = tmp # <<<<<<<<<<<<<< * n -= na_count * */ __pyx_v_a = __pyx_v_tmp; /* "pandas/algos.pyx":2126 * * a = tmp * n -= na_count # <<<<<<<<<<<<<< * * */ __pyx_v_n = (__pyx_v_n - __pyx_v_na_count); goto __pyx_L6; } __pyx_L6:; /* "pandas/algos.pyx":2129 * * * if n % 2: # <<<<<<<<<<<<<< * result = kth_smallest_c(a, n / 2, n) * else: */ __pyx_t_3 = (__Pyx_mod_long(__pyx_v_n, 2) != 0); if (__pyx_t_3) { /* "pandas/algos.pyx":2130 * * if n % 2: * result = kth_smallest_c(a, n / 2, n) # <<<<<<<<<<<<<< * else: * result = (kth_smallest_c(a, n / 2, n) + */ __pyx_t_4 = __pyx_f_6pandas_5algos_kth_smallest_c(__pyx_v_a, __Pyx_div_long(__pyx_v_n, 2), __pyx_v_n); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2130; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __pyx_PyFloat_AsDouble(__pyx_t_4); if (unlikely((__pyx_t_5 == (npy_float64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2130; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_result = __pyx_t_5; goto __pyx_L11; } /*else*/ { /* "pandas/algos.pyx":2132 * result = kth_smallest_c(a, n / 2, n) * else: * result = (kth_smallest_c(a, n / 2, n) + # <<<<<<<<<<<<<< * kth_smallest_c(a, n / 2 - 1, n)) / 2 * */ __pyx_t_4 = __pyx_f_6pandas_5algos_kth_smallest_c(__pyx_v_a, __Pyx_div_long(__pyx_v_n, 2), __pyx_v_n); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2132; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); /* "pandas/algos.pyx":2133 * else: * result = (kth_smallest_c(a, n / 2, n) + * kth_smallest_c(a, n / 2 - 1, n)) / 2 # <<<<<<<<<<<<<< * * if na_count: */ __pyx_t_6 = __pyx_f_6pandas_5algos_kth_smallest_c(__pyx_v_a, (__Pyx_div_long(__pyx_v_n, 2) - 1), __pyx_v_n); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2133; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = PyNumber_Add(__pyx_t_4, __pyx_t_6); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2132; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = __Pyx_PyNumber_Divide(__pyx_t_7, __pyx_int_2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2133; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_5 = __pyx_PyFloat_AsDouble(__pyx_t_6); if (unlikely((__pyx_t_5 == (npy_float64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2133; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_v_result = __pyx_t_5; } __pyx_L11:; /* "pandas/algos.pyx":2135 * kth_smallest_c(a, n / 2 - 1, n)) / 2 * * if na_count: # <<<<<<<<<<<<<< * free(a) * */ __pyx_t_3 = (__pyx_v_na_count != 0); if (__pyx_t_3) { /* "pandas/algos.pyx":2136 * * if na_count: * free(a) # <<<<<<<<<<<<<< * * return result */ free(__pyx_v_a); goto __pyx_L12; } __pyx_L12:; /* "pandas/algos.pyx":2138 * free(a) * * return result # <<<<<<<<<<<<<< * * include "join.pyx" */ __pyx_r = __pyx_v_result; goto __pyx_L0; __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_WriteUnraisable("pandas.algos._median_linear", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_75inner_join(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_75inner_join = {__Pyx_NAMESTR("inner_join"), (PyCFunction)__pyx_pw_6pandas_5algos_75inner_join, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_75inner_join(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_left = 0; PyArrayObject *__pyx_v_right = 0; Py_ssize_t __pyx_v_max_groups; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("inner_join (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__left,&__pyx_n_s__right,&__pyx_n_s__max_groups,0}; PyObject* values[3] = {0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__left)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__right)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("inner_join", 1, 3, 3, 1); {__pyx_filename = __pyx_f[3]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__max_groups)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("inner_join", 1, 3, 3, 2); {__pyx_filename = __pyx_f[3]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "inner_join") < 0)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __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_left = ((PyArrayObject *)values[0]); __pyx_v_right = ((PyArrayObject *)values[1]); __pyx_v_max_groups = __Pyx_PyIndex_AsSsize_t(values[2]); if (unlikely((__pyx_v_max_groups == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("inner_join", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[3]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.inner_join", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_left), __pyx_ptype_5numpy_ndarray, 1, "left", 0))) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_right), __pyx_ptype_5numpy_ndarray, 1, "right", 0))) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_74inner_join(__pyx_self, __pyx_v_left, __pyx_v_right, __pyx_v_max_groups); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/join.pyx":1 * def inner_join(ndarray[int64_t] left, ndarray[int64_t] right, # <<<<<<<<<<<<<< * Py_ssize_t max_groups): * cdef: */ static PyObject *__pyx_pf_6pandas_5algos_74inner_join(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_left, PyArrayObject *__pyx_v_right, Py_ssize_t __pyx_v_max_groups) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_k; Py_ssize_t __pyx_v_count; PyArrayObject *__pyx_v_left_count = 0; PyArrayObject *__pyx_v_right_count = 0; PyArrayObject *__pyx_v_left_sorter = 0; PyArrayObject *__pyx_v_right_sorter = 0; PyArrayObject *__pyx_v_left_indexer = 0; PyArrayObject *__pyx_v_right_indexer = 0; __pyx_t_5numpy_int64_t __pyx_v_lc; __pyx_t_5numpy_int64_t __pyx_v_rc; Py_ssize_t __pyx_v_left_pos; Py_ssize_t __pyx_v_right_pos; Py_ssize_t __pyx_v_position; Py_ssize_t __pyx_v_offset; __Pyx_LocalBuf_ND __pyx_pybuffernd_left; __Pyx_Buffer __pyx_pybuffer_left; __Pyx_LocalBuf_ND __pyx_pybuffernd_left_count; __Pyx_Buffer __pyx_pybuffer_left_count; __Pyx_LocalBuf_ND __pyx_pybuffernd_left_indexer; __Pyx_Buffer __pyx_pybuffer_left_indexer; __Pyx_LocalBuf_ND __pyx_pybuffernd_left_sorter; __Pyx_Buffer __pyx_pybuffer_left_sorter; __Pyx_LocalBuf_ND __pyx_pybuffernd_right; __Pyx_Buffer __pyx_pybuffer_right; __Pyx_LocalBuf_ND __pyx_pybuffernd_right_count; __Pyx_Buffer __pyx_pybuffer_right_count; __Pyx_LocalBuf_ND __pyx_pybuffernd_right_indexer; __Pyx_Buffer __pyx_pybuffer_right_indexer; __Pyx_LocalBuf_ND __pyx_pybuffernd_right_sorter; __Pyx_Buffer __pyx_pybuffer_right_sorter; 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 *); PyArrayObject *__pyx_t_6 = NULL; 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; Py_ssize_t __pyx_t_14; int __pyx_t_15; int __pyx_t_16; int __pyx_t_17; long __pyx_t_18; long __pyx_t_19; PyObject *__pyx_t_20 = NULL; PyArrayObject *__pyx_t_21 = NULL; Py_ssize_t __pyx_t_22; Py_ssize_t __pyx_t_23; __pyx_t_5numpy_int64_t __pyx_t_24; Py_ssize_t __pyx_t_25; __pyx_t_5numpy_int64_t __pyx_t_26; Py_ssize_t __pyx_t_27; Py_ssize_t __pyx_t_28; Py_ssize_t __pyx_t_29; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("inner_join", 0); __pyx_pybuffer_left_count.pybuffer.buf = NULL; __pyx_pybuffer_left_count.refcount = 0; __pyx_pybuffernd_left_count.data = NULL; __pyx_pybuffernd_left_count.rcbuffer = &__pyx_pybuffer_left_count; __pyx_pybuffer_right_count.pybuffer.buf = NULL; __pyx_pybuffer_right_count.refcount = 0; __pyx_pybuffernd_right_count.data = NULL; __pyx_pybuffernd_right_count.rcbuffer = &__pyx_pybuffer_right_count; __pyx_pybuffer_left_sorter.pybuffer.buf = NULL; __pyx_pybuffer_left_sorter.refcount = 0; __pyx_pybuffernd_left_sorter.data = NULL; __pyx_pybuffernd_left_sorter.rcbuffer = &__pyx_pybuffer_left_sorter; __pyx_pybuffer_right_sorter.pybuffer.buf = NULL; __pyx_pybuffer_right_sorter.refcount = 0; __pyx_pybuffernd_right_sorter.data = NULL; __pyx_pybuffernd_right_sorter.rcbuffer = &__pyx_pybuffer_right_sorter; __pyx_pybuffer_left_indexer.pybuffer.buf = NULL; __pyx_pybuffer_left_indexer.refcount = 0; __pyx_pybuffernd_left_indexer.data = NULL; __pyx_pybuffernd_left_indexer.rcbuffer = &__pyx_pybuffer_left_indexer; __pyx_pybuffer_right_indexer.pybuffer.buf = NULL; __pyx_pybuffer_right_indexer.refcount = 0; __pyx_pybuffernd_right_indexer.data = NULL; __pyx_pybuffernd_right_indexer.rcbuffer = &__pyx_pybuffer_right_indexer; __pyx_pybuffer_left.pybuffer.buf = NULL; __pyx_pybuffer_left.refcount = 0; __pyx_pybuffernd_left.data = NULL; __pyx_pybuffernd_left.rcbuffer = &__pyx_pybuffer_left; __pyx_pybuffer_right.pybuffer.buf = NULL; __pyx_pybuffer_right.refcount = 0; __pyx_pybuffernd_right.data = NULL; __pyx_pybuffernd_right.rcbuffer = &__pyx_pybuffer_right; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_left.rcbuffer->pybuffer, (PyObject*)__pyx_v_left, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_left.diminfo[0].strides = __pyx_pybuffernd_left.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_left.diminfo[0].shape = __pyx_pybuffernd_left.rcbuffer->pybuffer.shape[0]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_right.rcbuffer->pybuffer, (PyObject*)__pyx_v_right, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_right.diminfo[0].strides = __pyx_pybuffernd_right.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_right.diminfo[0].shape = __pyx_pybuffernd_right.rcbuffer->pybuffer.shape[0]; /* "pandas/src/join.pyx":4 * Py_ssize_t max_groups): * cdef: * Py_ssize_t i, j, k, count = 0 # <<<<<<<<<<<<<< * ndarray[int64_t] left_count, right_count, left_sorter, right_sorter * ndarray[int64_t] left_indexer, right_indexer */ __pyx_v_count = 0; /* "pandas/src/join.pyx":11 * # NA group in location 0 * * left_sorter, left_count = groupsort_indexer(left, max_groups) # <<<<<<<<<<<<<< * right_sorter, right_count = groupsort_indexer(right, max_groups) * */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__groupsort_indexer); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 11; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_max_groups); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 11; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 11; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(((PyObject *)__pyx_v_left)); PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_v_left)); __Pyx_GIVEREF(((PyObject *)__pyx_v_left)); PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 11; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; if ((likely(PyTuple_CheckExact(__pyx_t_2))) || (PyList_CheckExact(__pyx_t_2))) { PyObject* sequence = __pyx_t_2; #if CYTHON_COMPILING_IN_CPYTHON Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); {__pyx_filename = __pyx_f[3]; __pyx_lineno = 11; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_1 = PyTuple_GET_ITEM(sequence, 1); } else { __pyx_t_3 = PyList_GET_ITEM(sequence, 0); __pyx_t_1 = PyList_GET_ITEM(sequence, 1); } __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(__pyx_t_1); #else __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 11; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 11; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); #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_filename = __pyx_f[3]; __pyx_lineno = 11; __pyx_clineno = __LINE__; goto __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_3 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_3)) goto __pyx_L3_unpacking_failed; __Pyx_GOTREF(__pyx_t_3); index = 1; __pyx_t_1 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_1)) goto __pyx_L3_unpacking_failed; __Pyx_GOTREF(__pyx_t_1); if (__Pyx_IternextUnpackEndCheck(__pyx_t_5(__pyx_t_4), 2) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 11; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[3]; __pyx_lineno = 11; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_L4_unpacking_done:; } if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 11; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 11; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_6 = ((PyArrayObject *)__pyx_t_3); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_left_sorter.rcbuffer->pybuffer); __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_left_sorter.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_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_left_sorter.rcbuffer->pybuffer, (PyObject*)__pyx_v_left_sorter, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_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_pybuffernd_left_sorter.diminfo[0].strides = __pyx_pybuffernd_left_sorter.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_left_sorter.diminfo[0].shape = __pyx_pybuffernd_left_sorter.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 11; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_6 = 0; __pyx_v_left_sorter = ((PyArrayObject *)__pyx_t_3); __pyx_t_3 = 0; __pyx_t_6 = ((PyArrayObject *)__pyx_t_1); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_left_count.rcbuffer->pybuffer); __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_left_count.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_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_left_count.rcbuffer->pybuffer, (PyObject*)__pyx_v_left_count, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_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_pybuffernd_left_count.diminfo[0].strides = __pyx_pybuffernd_left_count.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_left_count.diminfo[0].shape = __pyx_pybuffernd_left_count.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 11; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_6 = 0; __pyx_v_left_count = ((PyArrayObject *)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/join.pyx":12 * * left_sorter, left_count = groupsort_indexer(left, max_groups) * right_sorter, right_count = groupsort_indexer(right, max_groups) # <<<<<<<<<<<<<< * * # First pass, determine size of result set, do not use the NA group */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__groupsort_indexer); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 12; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_max_groups); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 12; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 12; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(((PyObject *)__pyx_v_right)); PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_v_right)); __Pyx_GIVEREF(((PyObject *)__pyx_v_right)); PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 12; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) { PyObject* sequence = __pyx_t_1; #if CYTHON_COMPILING_IN_CPYTHON Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); {__pyx_filename = __pyx_f[3]; __pyx_lineno = 12; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_2 = PyTuple_GET_ITEM(sequence, 1); } else { __pyx_t_3 = PyList_GET_ITEM(sequence, 0); __pyx_t_2 = PyList_GET_ITEM(sequence, 1); } __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(__pyx_t_2); #else __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 12; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 12; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } else { Py_ssize_t index = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 12; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_5 = Py_TYPE(__pyx_t_4)->tp_iternext; index = 0; __pyx_t_3 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_3)) goto __pyx_L5_unpacking_failed; __Pyx_GOTREF(__pyx_t_3); index = 1; __pyx_t_2 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_2)) goto __pyx_L5_unpacking_failed; __Pyx_GOTREF(__pyx_t_2); if (__Pyx_IternextUnpackEndCheck(__pyx_t_5(__pyx_t_4), 2) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 12; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_5 = NULL; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; goto __pyx_L6_unpacking_done; __pyx_L5_unpacking_failed:; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_5 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); {__pyx_filename = __pyx_f[3]; __pyx_lineno = 12; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_L6_unpacking_done:; } if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 12; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 12; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_6 = ((PyArrayObject *)__pyx_t_3); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_right_sorter.rcbuffer->pybuffer); __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_right_sorter.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_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_right_sorter.rcbuffer->pybuffer, (PyObject*)__pyx_v_right_sorter, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_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_pybuffernd_right_sorter.diminfo[0].strides = __pyx_pybuffernd_right_sorter.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_right_sorter.diminfo[0].shape = __pyx_pybuffernd_right_sorter.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 12; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_6 = 0; __pyx_v_right_sorter = ((PyArrayObject *)__pyx_t_3); __pyx_t_3 = 0; __pyx_t_6 = ((PyArrayObject *)__pyx_t_2); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_right_count.rcbuffer->pybuffer); __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_right_count.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_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_right_count.rcbuffer->pybuffer, (PyObject*)__pyx_v_right_count, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_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_pybuffernd_right_count.diminfo[0].strides = __pyx_pybuffernd_right_count.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_right_count.diminfo[0].shape = __pyx_pybuffernd_right_count.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 12; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_6 = 0; __pyx_v_right_count = ((PyArrayObject *)__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/join.pyx":15 * * # First pass, determine size of result set, do not use the NA group * for i in range(1, max_groups + 1): # <<<<<<<<<<<<<< * lc = left_count[i] * rc = right_count[i] */ __pyx_t_11 = (__pyx_v_max_groups + 1); for (__pyx_t_12 = 1; __pyx_t_12 < __pyx_t_11; __pyx_t_12+=1) { __pyx_v_i = __pyx_t_12; /* "pandas/src/join.pyx":16 * # First pass, determine size of result set, do not use the NA group * for i in range(1, max_groups + 1): * lc = left_count[i] # <<<<<<<<<<<<<< * rc = right_count[i] * */ __pyx_t_13 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_13 < 0) { __pyx_t_13 += __pyx_pybuffernd_left_count.diminfo[0].shape; if (unlikely(__pyx_t_13 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_13 >= __pyx_pybuffernd_left_count.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[3]; __pyx_lineno = 16; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_lc = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_left_count.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_left_count.diminfo[0].strides)); /* "pandas/src/join.pyx":17 * for i in range(1, max_groups + 1): * lc = left_count[i] * rc = right_count[i] # <<<<<<<<<<<<<< * * if rc > 0 and lc > 0: */ __pyx_t_14 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_14 < 0) { __pyx_t_14 += __pyx_pybuffernd_right_count.diminfo[0].shape; if (unlikely(__pyx_t_14 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_14 >= __pyx_pybuffernd_right_count.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[3]; __pyx_lineno = 17; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_rc = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_right_count.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_right_count.diminfo[0].strides)); /* "pandas/src/join.pyx":19 * rc = right_count[i] * * if rc > 0 and lc > 0: # <<<<<<<<<<<<<< * count += lc * rc * */ __pyx_t_15 = ((__pyx_v_rc > 0) != 0); if (__pyx_t_15) { __pyx_t_16 = ((__pyx_v_lc > 0) != 0); __pyx_t_17 = __pyx_t_16; } else { __pyx_t_17 = __pyx_t_15; } if (__pyx_t_17) { /* "pandas/src/join.pyx":20 * * if rc > 0 and lc > 0: * count += lc * rc # <<<<<<<<<<<<<< * * # group 0 is the NA group */ __pyx_v_count = (__pyx_v_count + (__pyx_v_lc * __pyx_v_rc)); goto __pyx_L9; } __pyx_L9:; } /* "pandas/src/join.pyx":24 * # group 0 is the NA group * cdef: * Py_ssize_t loc, left_pos = 0, right_pos = 0, position = 0 # <<<<<<<<<<<<<< * Py_ssize_t offset * */ __pyx_v_left_pos = 0; __pyx_v_right_pos = 0; __pyx_v_position = 0; /* "pandas/src/join.pyx":28 * * # exclude the NA group * left_pos = left_count[0] # <<<<<<<<<<<<<< * right_pos = right_count[0] * */ __pyx_t_18 = 0; __pyx_t_7 = -1; if (__pyx_t_18 < 0) { __pyx_t_18 += __pyx_pybuffernd_left_count.diminfo[0].shape; if (unlikely(__pyx_t_18 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_18 >= __pyx_pybuffernd_left_count.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[3]; __pyx_lineno = 28; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_left_pos = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_left_count.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_left_count.diminfo[0].strides)); /* "pandas/src/join.pyx":29 * # exclude the NA group * left_pos = left_count[0] * right_pos = right_count[0] # <<<<<<<<<<<<<< * * left_indexer = np.empty(count, dtype=np.int64) */ __pyx_t_19 = 0; __pyx_t_7 = -1; if (__pyx_t_19 < 0) { __pyx_t_19 += __pyx_pybuffernd_right_count.diminfo[0].shape; if (unlikely(__pyx_t_19 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_19 >= __pyx_pybuffernd_right_count.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[3]; __pyx_lineno = 29; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_right_pos = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_right_count.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_right_count.diminfo[0].strides)); /* "pandas/src/join.pyx":31 * right_pos = right_count[0] * * left_indexer = np.empty(count, dtype=np.int64) # <<<<<<<<<<<<<< * right_indexer = np.empty(count, dtype=np.int64) * */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 31; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[3]; __pyx_lineno = 31; __pyx_clineno = __LINE__; goto __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_count); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 31; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 31; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 31; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 31; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_20 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s__int64); if (unlikely(!__pyx_t_20)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 31; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_20); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__dtype), __pyx_t_20) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 31; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0; __pyx_t_20 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_3), ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_20)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 31; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_20); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; if (!(likely(((__pyx_t_20) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_20, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 31; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_21 = ((PyArrayObject *)__pyx_t_20); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_left_indexer.rcbuffer->pybuffer); __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_left_indexer.rcbuffer->pybuffer, (PyObject*)__pyx_t_21, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_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_left_indexer.rcbuffer->pybuffer, (PyObject*)__pyx_v_left_indexer, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_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_pybuffernd_left_indexer.diminfo[0].strides = __pyx_pybuffernd_left_indexer.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_left_indexer.diminfo[0].shape = __pyx_pybuffernd_left_indexer.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 31; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_21 = 0; __pyx_v_left_indexer = ((PyArrayObject *)__pyx_t_20); __pyx_t_20 = 0; /* "pandas/src/join.pyx":32 * * left_indexer = np.empty(count, dtype=np.int64) * right_indexer = np.empty(count, dtype=np.int64) # <<<<<<<<<<<<<< * * for i in range(1, max_groups + 1): */ __pyx_t_20 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_20)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 32; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_20); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_20, __pyx_n_s__empty); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 32; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0; __pyx_t_20 = PyInt_FromSsize_t(__pyx_v_count); if (unlikely(!__pyx_t_20)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 32; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_20); __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 32; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_20); __Pyx_GIVEREF(__pyx_t_20); __pyx_t_20 = 0; __pyx_t_20 = PyDict_New(); if (unlikely(!__pyx_t_20)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 32; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_20)); __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 32; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__int64); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 32; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (PyDict_SetItem(__pyx_t_20, ((PyObject *)__pyx_n_s__dtype), __pyx_t_4) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 32; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_3), ((PyObject *)__pyx_t_20)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 32; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_20)); __pyx_t_20 = 0; if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 32; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_21 = ((PyArrayObject *)__pyx_t_4); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_right_indexer.rcbuffer->pybuffer); __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_right_indexer.rcbuffer->pybuffer, (PyObject*)__pyx_t_21, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_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_right_indexer.rcbuffer->pybuffer, (PyObject*)__pyx_v_right_indexer, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_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_pybuffernd_right_indexer.diminfo[0].strides = __pyx_pybuffernd_right_indexer.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_right_indexer.diminfo[0].shape = __pyx_pybuffernd_right_indexer.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 32; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_21 = 0; __pyx_v_right_indexer = ((PyArrayObject *)__pyx_t_4); __pyx_t_4 = 0; /* "pandas/src/join.pyx":34 * right_indexer = np.empty(count, dtype=np.int64) * * for i in range(1, max_groups + 1): # <<<<<<<<<<<<<< * lc = left_count[i] * rc = right_count[i] */ __pyx_t_11 = (__pyx_v_max_groups + 1); for (__pyx_t_12 = 1; __pyx_t_12 < __pyx_t_11; __pyx_t_12+=1) { __pyx_v_i = __pyx_t_12; /* "pandas/src/join.pyx":35 * * for i in range(1, max_groups + 1): * lc = left_count[i] # <<<<<<<<<<<<<< * rc = right_count[i] * */ __pyx_t_22 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_22 < 0) { __pyx_t_22 += __pyx_pybuffernd_left_count.diminfo[0].shape; if (unlikely(__pyx_t_22 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_22 >= __pyx_pybuffernd_left_count.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[3]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_lc = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_left_count.rcbuffer->pybuffer.buf, __pyx_t_22, __pyx_pybuffernd_left_count.diminfo[0].strides)); /* "pandas/src/join.pyx":36 * for i in range(1, max_groups + 1): * lc = left_count[i] * rc = right_count[i] # <<<<<<<<<<<<<< * * if rc > 0 and lc > 0: */ __pyx_t_23 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_23 < 0) { __pyx_t_23 += __pyx_pybuffernd_right_count.diminfo[0].shape; if (unlikely(__pyx_t_23 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_23 >= __pyx_pybuffernd_right_count.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[3]; __pyx_lineno = 36; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_rc = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_right_count.rcbuffer->pybuffer.buf, __pyx_t_23, __pyx_pybuffernd_right_count.diminfo[0].strides)); /* "pandas/src/join.pyx":38 * rc = right_count[i] * * if rc > 0 and lc > 0: # <<<<<<<<<<<<<< * for j in range(lc): * offset = position + j * rc */ __pyx_t_17 = ((__pyx_v_rc > 0) != 0); if (__pyx_t_17) { __pyx_t_15 = ((__pyx_v_lc > 0) != 0); __pyx_t_16 = __pyx_t_15; } else { __pyx_t_16 = __pyx_t_17; } if (__pyx_t_16) { /* "pandas/src/join.pyx":39 * * if rc > 0 and lc > 0: * for j in range(lc): # <<<<<<<<<<<<<< * offset = position + j * rc * for k in range(rc): */ __pyx_t_24 = __pyx_v_lc; for (__pyx_t_25 = 0; __pyx_t_25 < __pyx_t_24; __pyx_t_25+=1) { __pyx_v_j = __pyx_t_25; /* "pandas/src/join.pyx":40 * if rc > 0 and lc > 0: * for j in range(lc): * offset = position + j * rc # <<<<<<<<<<<<<< * for k in range(rc): * left_indexer[offset + k] = left_pos + j */ __pyx_v_offset = (__pyx_v_position + (__pyx_v_j * __pyx_v_rc)); /* "pandas/src/join.pyx":41 * for j in range(lc): * offset = position + j * rc * for k in range(rc): # <<<<<<<<<<<<<< * left_indexer[offset + k] = left_pos + j * right_indexer[offset + k] = right_pos + k */ __pyx_t_26 = __pyx_v_rc; for (__pyx_t_27 = 0; __pyx_t_27 < __pyx_t_26; __pyx_t_27+=1) { __pyx_v_k = __pyx_t_27; /* "pandas/src/join.pyx":42 * offset = position + j * rc * for k in range(rc): * left_indexer[offset + k] = left_pos + j # <<<<<<<<<<<<<< * right_indexer[offset + k] = right_pos + k * position += lc * rc */ __pyx_t_28 = (__pyx_v_offset + __pyx_v_k); __pyx_t_7 = -1; if (__pyx_t_28 < 0) { __pyx_t_28 += __pyx_pybuffernd_left_indexer.diminfo[0].shape; if (unlikely(__pyx_t_28 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_28 >= __pyx_pybuffernd_left_indexer.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[3]; __pyx_lineno = 42; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_left_indexer.rcbuffer->pybuffer.buf, __pyx_t_28, __pyx_pybuffernd_left_indexer.diminfo[0].strides) = (__pyx_v_left_pos + __pyx_v_j); /* "pandas/src/join.pyx":43 * for k in range(rc): * left_indexer[offset + k] = left_pos + j * right_indexer[offset + k] = right_pos + k # <<<<<<<<<<<<<< * position += lc * rc * left_pos += lc */ __pyx_t_29 = (__pyx_v_offset + __pyx_v_k); __pyx_t_7 = -1; if (__pyx_t_29 < 0) { __pyx_t_29 += __pyx_pybuffernd_right_indexer.diminfo[0].shape; if (unlikely(__pyx_t_29 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_29 >= __pyx_pybuffernd_right_indexer.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[3]; __pyx_lineno = 43; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_right_indexer.rcbuffer->pybuffer.buf, __pyx_t_29, __pyx_pybuffernd_right_indexer.diminfo[0].strides) = (__pyx_v_right_pos + __pyx_v_k); } } /* "pandas/src/join.pyx":44 * left_indexer[offset + k] = left_pos + j * right_indexer[offset + k] = right_pos + k * position += lc * rc # <<<<<<<<<<<<<< * left_pos += lc * right_pos += rc */ __pyx_v_position = (__pyx_v_position + (__pyx_v_lc * __pyx_v_rc)); goto __pyx_L12; } __pyx_L12:; /* "pandas/src/join.pyx":45 * right_indexer[offset + k] = right_pos + k * position += lc * rc * left_pos += lc # <<<<<<<<<<<<<< * right_pos += rc * */ __pyx_v_left_pos = (__pyx_v_left_pos + __pyx_v_lc); /* "pandas/src/join.pyx":46 * position += lc * rc * left_pos += lc * right_pos += rc # <<<<<<<<<<<<<< * * return (_get_result_indexer(left_sorter, left_indexer), */ __pyx_v_right_pos = (__pyx_v_right_pos + __pyx_v_rc); } /* "pandas/src/join.pyx":48 * right_pos += rc * * return (_get_result_indexer(left_sorter, left_indexer), # <<<<<<<<<<<<<< * _get_result_indexer(right_sorter, right_indexer)) * */ __Pyx_XDECREF(__pyx_r); __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s___get_result_indexer); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_20 = PyTuple_New(2); if (unlikely(!__pyx_t_20)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_20); __Pyx_INCREF(((PyObject *)__pyx_v_left_sorter)); PyTuple_SET_ITEM(__pyx_t_20, 0, ((PyObject *)__pyx_v_left_sorter)); __Pyx_GIVEREF(((PyObject *)__pyx_v_left_sorter)); __Pyx_INCREF(((PyObject *)__pyx_v_left_indexer)); PyTuple_SET_ITEM(__pyx_t_20, 1, ((PyObject *)__pyx_v_left_indexer)); __Pyx_GIVEREF(((PyObject *)__pyx_v_left_indexer)); __pyx_t_3 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_20), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_20)); __pyx_t_20 = 0; /* "pandas/src/join.pyx":49 * * return (_get_result_indexer(left_sorter, left_indexer), * _get_result_indexer(right_sorter, right_indexer)) # <<<<<<<<<<<<<< * * def left_outer_join(ndarray[int64_t] left, ndarray[int64_t] right, */ __pyx_t_20 = __Pyx_GetModuleGlobalName(__pyx_n_s___get_result_indexer); if (unlikely(!__pyx_t_20)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_20); __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(((PyObject *)__pyx_v_right_sorter)); PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_v_right_sorter)); __Pyx_GIVEREF(((PyObject *)__pyx_v_right_sorter)); __Pyx_INCREF(((PyObject *)__pyx_v_right_indexer)); PyTuple_SET_ITEM(__pyx_t_4, 1, ((PyObject *)__pyx_v_right_indexer)); __Pyx_GIVEREF(((PyObject *)__pyx_v_right_indexer)); __pyx_t_1 = PyObject_Call(__pyx_t_20, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_3 = 0; __pyx_t_1 = 0; __pyx_r = ((PyObject *)__pyx_t_4); __pyx_t_4 = 0; goto __pyx_L0; __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_20); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_left.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_left_count.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_left_indexer.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_left_sorter.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_right.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_right_count.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_right_indexer.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_right_sorter.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.inner_join", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_left.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_left_count.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_left_indexer.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_left_sorter.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_right.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_right_count.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_right_indexer.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_right_sorter.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_left_count); __Pyx_XDECREF((PyObject *)__pyx_v_right_count); __Pyx_XDECREF((PyObject *)__pyx_v_left_sorter); __Pyx_XDECREF((PyObject *)__pyx_v_right_sorter); __Pyx_XDECREF((PyObject *)__pyx_v_left_indexer); __Pyx_XDECREF((PyObject *)__pyx_v_right_indexer); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_77left_outer_join(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_77left_outer_join = {__Pyx_NAMESTR("left_outer_join"), (PyCFunction)__pyx_pw_6pandas_5algos_77left_outer_join, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_77left_outer_join(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_left = 0; PyArrayObject *__pyx_v_right = 0; Py_ssize_t __pyx_v_max_groups; PyObject *__pyx_v_sort = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("left_outer_join (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__left,&__pyx_n_s__right,&__pyx_n_s__max_groups,&__pyx_n_s__sort,0}; PyObject* values[4] = {0,0,0,0}; values[3] = __pyx_k_47; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__left)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__right)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("left_outer_join", 0, 3, 4, 1); {__pyx_filename = __pyx_f[3]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__max_groups)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("left_outer_join", 0, 3, 4, 2); {__pyx_filename = __pyx_f[3]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__sort); if (value) { values[3] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "left_outer_join") < 0)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_left = ((PyArrayObject *)values[0]); __pyx_v_right = ((PyArrayObject *)values[1]); __pyx_v_max_groups = __Pyx_PyIndex_AsSsize_t(values[2]); if (unlikely((__pyx_v_max_groups == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 52; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_sort = values[3]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("left_outer_join", 0, 3, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[3]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.left_outer_join", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_left), __pyx_ptype_5numpy_ndarray, 1, "left", 0))) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_right), __pyx_ptype_5numpy_ndarray, 1, "right", 0))) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_76left_outer_join(__pyx_self, __pyx_v_left, __pyx_v_right, __pyx_v_max_groups, __pyx_v_sort); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/join.pyx":51 * _get_result_indexer(right_sorter, right_indexer)) * * def left_outer_join(ndarray[int64_t] left, ndarray[int64_t] right, # <<<<<<<<<<<<<< * Py_ssize_t max_groups, sort=True): * cdef: */ static PyObject *__pyx_pf_6pandas_5algos_76left_outer_join(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_left, PyArrayObject *__pyx_v_right, Py_ssize_t __pyx_v_max_groups, PyObject *__pyx_v_sort) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_k; Py_ssize_t __pyx_v_count; PyArrayObject *__pyx_v_left_count = 0; PyArrayObject *__pyx_v_right_count = 0; PyArrayObject *__pyx_v_left_sorter = 0; PyArrayObject *__pyx_v_right_sorter = 0; PyArrayObject *__pyx_v_rev = 0; PyArrayObject *__pyx_v_left_indexer = 0; PyArrayObject *__pyx_v_right_indexer = 0; __pyx_t_5numpy_int64_t __pyx_v_lc; __pyx_t_5numpy_int64_t __pyx_v_rc; Py_ssize_t __pyx_v_left_pos; Py_ssize_t __pyx_v_right_pos; Py_ssize_t __pyx_v_position; Py_ssize_t __pyx_v_offset; __Pyx_LocalBuf_ND __pyx_pybuffernd_left; __Pyx_Buffer __pyx_pybuffer_left; __Pyx_LocalBuf_ND __pyx_pybuffernd_left_count; __Pyx_Buffer __pyx_pybuffer_left_count; __Pyx_LocalBuf_ND __pyx_pybuffernd_left_indexer; __Pyx_Buffer __pyx_pybuffer_left_indexer; __Pyx_LocalBuf_ND __pyx_pybuffernd_right; __Pyx_Buffer __pyx_pybuffer_right; __Pyx_LocalBuf_ND __pyx_pybuffernd_right_count; __Pyx_Buffer __pyx_pybuffer_right_count; __Pyx_LocalBuf_ND __pyx_pybuffernd_right_indexer; __Pyx_Buffer __pyx_pybuffer_right_indexer; 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 *); PyArrayObject *__pyx_t_6 = NULL; 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; int __pyx_t_14; Py_ssize_t __pyx_t_15; Py_ssize_t __pyx_t_16; Py_ssize_t __pyx_t_17; long __pyx_t_18; long __pyx_t_19; PyObject *__pyx_t_20 = NULL; PyArrayObject *__pyx_t_21 = NULL; Py_ssize_t __pyx_t_22; Py_ssize_t __pyx_t_23; __pyx_t_5numpy_int64_t __pyx_t_24; Py_ssize_t __pyx_t_25; Py_ssize_t __pyx_t_26; Py_ssize_t __pyx_t_27; __pyx_t_5numpy_int64_t __pyx_t_28; Py_ssize_t __pyx_t_29; Py_ssize_t __pyx_t_30; Py_ssize_t __pyx_t_31; int __pyx_t_32; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("left_outer_join", 0); __pyx_pybuffer_left_count.pybuffer.buf = NULL; __pyx_pybuffer_left_count.refcount = 0; __pyx_pybuffernd_left_count.data = NULL; __pyx_pybuffernd_left_count.rcbuffer = &__pyx_pybuffer_left_count; __pyx_pybuffer_right_count.pybuffer.buf = NULL; __pyx_pybuffer_right_count.refcount = 0; __pyx_pybuffernd_right_count.data = NULL; __pyx_pybuffernd_right_count.rcbuffer = &__pyx_pybuffer_right_count; __pyx_pybuffer_left_indexer.pybuffer.buf = NULL; __pyx_pybuffer_left_indexer.refcount = 0; __pyx_pybuffernd_left_indexer.data = NULL; __pyx_pybuffernd_left_indexer.rcbuffer = &__pyx_pybuffer_left_indexer; __pyx_pybuffer_right_indexer.pybuffer.buf = NULL; __pyx_pybuffer_right_indexer.refcount = 0; __pyx_pybuffernd_right_indexer.data = NULL; __pyx_pybuffernd_right_indexer.rcbuffer = &__pyx_pybuffer_right_indexer; __pyx_pybuffer_left.pybuffer.buf = NULL; __pyx_pybuffer_left.refcount = 0; __pyx_pybuffernd_left.data = NULL; __pyx_pybuffernd_left.rcbuffer = &__pyx_pybuffer_left; __pyx_pybuffer_right.pybuffer.buf = NULL; __pyx_pybuffer_right.refcount = 0; __pyx_pybuffernd_right.data = NULL; __pyx_pybuffernd_right.rcbuffer = &__pyx_pybuffer_right; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_left.rcbuffer->pybuffer, (PyObject*)__pyx_v_left, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_left.diminfo[0].strides = __pyx_pybuffernd_left.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_left.diminfo[0].shape = __pyx_pybuffernd_left.rcbuffer->pybuffer.shape[0]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_right.rcbuffer->pybuffer, (PyObject*)__pyx_v_right, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_right.diminfo[0].strides = __pyx_pybuffernd_right.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_right.diminfo[0].shape = __pyx_pybuffernd_right.rcbuffer->pybuffer.shape[0]; /* "pandas/src/join.pyx":54 * Py_ssize_t max_groups, sort=True): * cdef: * Py_ssize_t i, j, k, count = 0 # <<<<<<<<<<<<<< * ndarray[int64_t] left_count, right_count * ndarray left_sorter, right_sorter, rev */ __pyx_v_count = 0; /* "pandas/src/join.pyx":62 * # NA group in location 0 * * left_sorter, left_count = groupsort_indexer(left, max_groups) # <<<<<<<<<<<<<< * right_sorter, right_count = groupsort_indexer(right, max_groups) * */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__groupsort_indexer); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_max_groups); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(((PyObject *)__pyx_v_left)); PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_v_left)); __Pyx_GIVEREF(((PyObject *)__pyx_v_left)); PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; if ((likely(PyTuple_CheckExact(__pyx_t_2))) || (PyList_CheckExact(__pyx_t_2))) { PyObject* sequence = __pyx_t_2; #if CYTHON_COMPILING_IN_CPYTHON Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); {__pyx_filename = __pyx_f[3]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_1 = PyTuple_GET_ITEM(sequence, 1); } else { __pyx_t_3 = PyList_GET_ITEM(sequence, 0); __pyx_t_1 = PyList_GET_ITEM(sequence, 1); } __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(__pyx_t_1); #else __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); #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_filename = __pyx_f[3]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __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_3 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_3)) goto __pyx_L3_unpacking_failed; __Pyx_GOTREF(__pyx_t_3); index = 1; __pyx_t_1 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_1)) goto __pyx_L3_unpacking_failed; __Pyx_GOTREF(__pyx_t_1); if (__Pyx_IternextUnpackEndCheck(__pyx_t_5(__pyx_t_4), 2) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[3]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_L4_unpacking_done:; } if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_left_sorter = ((PyArrayObject *)__pyx_t_3); __pyx_t_3 = 0; __pyx_t_6 = ((PyArrayObject *)__pyx_t_1); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_left_count.rcbuffer->pybuffer); __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_left_count.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_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_left_count.rcbuffer->pybuffer, (PyObject*)__pyx_v_left_count, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_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_pybuffernd_left_count.diminfo[0].strides = __pyx_pybuffernd_left_count.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_left_count.diminfo[0].shape = __pyx_pybuffernd_left_count.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_6 = 0; __pyx_v_left_count = ((PyArrayObject *)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/join.pyx":63 * * left_sorter, left_count = groupsort_indexer(left, max_groups) * right_sorter, right_count = groupsort_indexer(right, max_groups) # <<<<<<<<<<<<<< * * # First pass, determine size of result set, do not use the NA group */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__groupsort_indexer); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_max_groups); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(((PyObject *)__pyx_v_right)); PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_v_right)); __Pyx_GIVEREF(((PyObject *)__pyx_v_right)); PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) { PyObject* sequence = __pyx_t_1; #if CYTHON_COMPILING_IN_CPYTHON Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); {__pyx_filename = __pyx_f[3]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_2 = PyTuple_GET_ITEM(sequence, 1); } else { __pyx_t_3 = PyList_GET_ITEM(sequence, 0); __pyx_t_2 = PyList_GET_ITEM(sequence, 1); } __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(__pyx_t_2); #else __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } else { Py_ssize_t index = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_5 = Py_TYPE(__pyx_t_4)->tp_iternext; index = 0; __pyx_t_3 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_3)) goto __pyx_L5_unpacking_failed; __Pyx_GOTREF(__pyx_t_3); index = 1; __pyx_t_2 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_2)) goto __pyx_L5_unpacking_failed; __Pyx_GOTREF(__pyx_t_2); if (__Pyx_IternextUnpackEndCheck(__pyx_t_5(__pyx_t_4), 2) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_5 = NULL; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; goto __pyx_L6_unpacking_done; __pyx_L5_unpacking_failed:; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_5 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); {__pyx_filename = __pyx_f[3]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_L6_unpacking_done:; } if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_right_sorter = ((PyArrayObject *)__pyx_t_3); __pyx_t_3 = 0; __pyx_t_6 = ((PyArrayObject *)__pyx_t_2); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_right_count.rcbuffer->pybuffer); __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_right_count.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_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_right_count.rcbuffer->pybuffer, (PyObject*)__pyx_v_right_count, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_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_pybuffernd_right_count.diminfo[0].strides = __pyx_pybuffernd_right_count.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_right_count.diminfo[0].shape = __pyx_pybuffernd_right_count.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_6 = 0; __pyx_v_right_count = ((PyArrayObject *)__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/join.pyx":66 * * # First pass, determine size of result set, do not use the NA group * for i in range(1, max_groups + 1): # <<<<<<<<<<<<<< * if right_count[i] > 0: * count += left_count[i] * right_count[i] */ __pyx_t_11 = (__pyx_v_max_groups + 1); for (__pyx_t_12 = 1; __pyx_t_12 < __pyx_t_11; __pyx_t_12+=1) { __pyx_v_i = __pyx_t_12; /* "pandas/src/join.pyx":67 * # First pass, determine size of result set, do not use the NA group * for i in range(1, max_groups + 1): * if right_count[i] > 0: # <<<<<<<<<<<<<< * count += left_count[i] * right_count[i] * else: */ __pyx_t_13 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_13 < 0) { __pyx_t_13 += __pyx_pybuffernd_right_count.diminfo[0].shape; if (unlikely(__pyx_t_13 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_13 >= __pyx_pybuffernd_right_count.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[3]; __pyx_lineno = 67; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_14 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_right_count.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_right_count.diminfo[0].strides)) > 0) != 0); if (__pyx_t_14) { /* "pandas/src/join.pyx":68 * for i in range(1, max_groups + 1): * if right_count[i] > 0: * count += left_count[i] * right_count[i] # <<<<<<<<<<<<<< * else: * count += left_count[i] */ __pyx_t_15 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_15 < 0) { __pyx_t_15 += __pyx_pybuffernd_left_count.diminfo[0].shape; if (unlikely(__pyx_t_15 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_15 >= __pyx_pybuffernd_left_count.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[3]; __pyx_lineno = 68; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_16 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_16 < 0) { __pyx_t_16 += __pyx_pybuffernd_right_count.diminfo[0].shape; if (unlikely(__pyx_t_16 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_16 >= __pyx_pybuffernd_right_count.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[3]; __pyx_lineno = 68; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_count = (__pyx_v_count + ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_left_count.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_left_count.diminfo[0].strides)) * (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_right_count.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_right_count.diminfo[0].strides)))); goto __pyx_L9; } /*else*/ { /* "pandas/src/join.pyx":70 * count += left_count[i] * right_count[i] * else: * count += left_count[i] # <<<<<<<<<<<<<< * * # group 0 is the NA group */ __pyx_t_17 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_17 < 0) { __pyx_t_17 += __pyx_pybuffernd_left_count.diminfo[0].shape; if (unlikely(__pyx_t_17 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_17 >= __pyx_pybuffernd_left_count.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[3]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_count = (__pyx_v_count + (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_left_count.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_left_count.diminfo[0].strides))); } __pyx_L9:; } /* "pandas/src/join.pyx":74 * # group 0 is the NA group * cdef: * Py_ssize_t loc, left_pos = 0, right_pos = 0, position = 0 # <<<<<<<<<<<<<< * Py_ssize_t offset * */ __pyx_v_left_pos = 0; __pyx_v_right_pos = 0; __pyx_v_position = 0; /* "pandas/src/join.pyx":78 * * # exclude the NA group * left_pos = left_count[0] # <<<<<<<<<<<<<< * right_pos = right_count[0] * */ __pyx_t_18 = 0; __pyx_t_7 = -1; if (__pyx_t_18 < 0) { __pyx_t_18 += __pyx_pybuffernd_left_count.diminfo[0].shape; if (unlikely(__pyx_t_18 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_18 >= __pyx_pybuffernd_left_count.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[3]; __pyx_lineno = 78; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_left_pos = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_left_count.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_left_count.diminfo[0].strides)); /* "pandas/src/join.pyx":79 * # exclude the NA group * left_pos = left_count[0] * right_pos = right_count[0] # <<<<<<<<<<<<<< * * left_indexer = np.empty(count, dtype=np.int64) */ __pyx_t_19 = 0; __pyx_t_7 = -1; if (__pyx_t_19 < 0) { __pyx_t_19 += __pyx_pybuffernd_right_count.diminfo[0].shape; if (unlikely(__pyx_t_19 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_19 >= __pyx_pybuffernd_right_count.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[3]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_right_pos = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_right_count.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_right_count.diminfo[0].strides)); /* "pandas/src/join.pyx":81 * right_pos = right_count[0] * * left_indexer = np.empty(count, dtype=np.int64) # <<<<<<<<<<<<<< * right_indexer = np.empty(count, dtype=np.int64) * */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[3]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __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_count); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_20 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s__int64); if (unlikely(!__pyx_t_20)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_20); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__dtype), __pyx_t_20) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0; __pyx_t_20 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_3), ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_20)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_20); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; if (!(likely(((__pyx_t_20) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_20, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_21 = ((PyArrayObject *)__pyx_t_20); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_left_indexer.rcbuffer->pybuffer); __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_left_indexer.rcbuffer->pybuffer, (PyObject*)__pyx_t_21, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_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_left_indexer.rcbuffer->pybuffer, (PyObject*)__pyx_v_left_indexer, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_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_pybuffernd_left_indexer.diminfo[0].strides = __pyx_pybuffernd_left_indexer.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_left_indexer.diminfo[0].shape = __pyx_pybuffernd_left_indexer.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_21 = 0; __pyx_v_left_indexer = ((PyArrayObject *)__pyx_t_20); __pyx_t_20 = 0; /* "pandas/src/join.pyx":82 * * left_indexer = np.empty(count, dtype=np.int64) * right_indexer = np.empty(count, dtype=np.int64) # <<<<<<<<<<<<<< * * for i in range(1, max_groups + 1): */ __pyx_t_20 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_20)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_20); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_20, __pyx_n_s__empty); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0; __pyx_t_20 = PyInt_FromSsize_t(__pyx_v_count); if (unlikely(!__pyx_t_20)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_20); __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_20); __Pyx_GIVEREF(__pyx_t_20); __pyx_t_20 = 0; __pyx_t_20 = PyDict_New(); if (unlikely(!__pyx_t_20)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_20)); __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__int64); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (PyDict_SetItem(__pyx_t_20, ((PyObject *)__pyx_n_s__dtype), __pyx_t_4) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_3), ((PyObject *)__pyx_t_20)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_20)); __pyx_t_20 = 0; if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_21 = ((PyArrayObject *)__pyx_t_4); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_right_indexer.rcbuffer->pybuffer); __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_right_indexer.rcbuffer->pybuffer, (PyObject*)__pyx_t_21, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_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_right_indexer.rcbuffer->pybuffer, (PyObject*)__pyx_v_right_indexer, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_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_pybuffernd_right_indexer.diminfo[0].strides = __pyx_pybuffernd_right_indexer.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_right_indexer.diminfo[0].shape = __pyx_pybuffernd_right_indexer.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_21 = 0; __pyx_v_right_indexer = ((PyArrayObject *)__pyx_t_4); __pyx_t_4 = 0; /* "pandas/src/join.pyx":84 * right_indexer = np.empty(count, dtype=np.int64) * * for i in range(1, max_groups + 1): # <<<<<<<<<<<<<< * lc = left_count[i] * rc = right_count[i] */ __pyx_t_11 = (__pyx_v_max_groups + 1); for (__pyx_t_12 = 1; __pyx_t_12 < __pyx_t_11; __pyx_t_12+=1) { __pyx_v_i = __pyx_t_12; /* "pandas/src/join.pyx":85 * * for i in range(1, max_groups + 1): * lc = left_count[i] # <<<<<<<<<<<<<< * rc = right_count[i] * */ __pyx_t_22 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_22 < 0) { __pyx_t_22 += __pyx_pybuffernd_left_count.diminfo[0].shape; if (unlikely(__pyx_t_22 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_22 >= __pyx_pybuffernd_left_count.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[3]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_lc = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_left_count.rcbuffer->pybuffer.buf, __pyx_t_22, __pyx_pybuffernd_left_count.diminfo[0].strides)); /* "pandas/src/join.pyx":86 * for i in range(1, max_groups + 1): * lc = left_count[i] * rc = right_count[i] # <<<<<<<<<<<<<< * * if rc == 0: */ __pyx_t_23 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_23 < 0) { __pyx_t_23 += __pyx_pybuffernd_right_count.diminfo[0].shape; if (unlikely(__pyx_t_23 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_23 >= __pyx_pybuffernd_right_count.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[3]; __pyx_lineno = 86; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_rc = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_right_count.rcbuffer->pybuffer.buf, __pyx_t_23, __pyx_pybuffernd_right_count.diminfo[0].strides)); /* "pandas/src/join.pyx":88 * rc = right_count[i] * * if rc == 0: # <<<<<<<<<<<<<< * for j in range(lc): * left_indexer[position + j] = left_pos + j */ __pyx_t_14 = ((__pyx_v_rc == 0) != 0); if (__pyx_t_14) { /* "pandas/src/join.pyx":89 * * if rc == 0: * for j in range(lc): # <<<<<<<<<<<<<< * left_indexer[position + j] = left_pos + j * right_indexer[position + j] = -1 */ __pyx_t_24 = __pyx_v_lc; for (__pyx_t_25 = 0; __pyx_t_25 < __pyx_t_24; __pyx_t_25+=1) { __pyx_v_j = __pyx_t_25; /* "pandas/src/join.pyx":90 * if rc == 0: * for j in range(lc): * left_indexer[position + j] = left_pos + j # <<<<<<<<<<<<<< * right_indexer[position + j] = -1 * position += lc */ __pyx_t_26 = (__pyx_v_position + __pyx_v_j); __pyx_t_7 = -1; if (__pyx_t_26 < 0) { __pyx_t_26 += __pyx_pybuffernd_left_indexer.diminfo[0].shape; if (unlikely(__pyx_t_26 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_26 >= __pyx_pybuffernd_left_indexer.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[3]; __pyx_lineno = 90; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_left_indexer.rcbuffer->pybuffer.buf, __pyx_t_26, __pyx_pybuffernd_left_indexer.diminfo[0].strides) = (__pyx_v_left_pos + __pyx_v_j); /* "pandas/src/join.pyx":91 * for j in range(lc): * left_indexer[position + j] = left_pos + j * right_indexer[position + j] = -1 # <<<<<<<<<<<<<< * position += lc * else: */ __pyx_t_27 = (__pyx_v_position + __pyx_v_j); __pyx_t_7 = -1; if (__pyx_t_27 < 0) { __pyx_t_27 += __pyx_pybuffernd_right_indexer.diminfo[0].shape; if (unlikely(__pyx_t_27 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_27 >= __pyx_pybuffernd_right_indexer.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[3]; __pyx_lineno = 91; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_right_indexer.rcbuffer->pybuffer.buf, __pyx_t_27, __pyx_pybuffernd_right_indexer.diminfo[0].strides) = -1; } /* "pandas/src/join.pyx":92 * left_indexer[position + j] = left_pos + j * right_indexer[position + j] = -1 * position += lc # <<<<<<<<<<<<<< * else: * for j in range(lc): */ __pyx_v_position = (__pyx_v_position + __pyx_v_lc); goto __pyx_L12; } /*else*/ { /* "pandas/src/join.pyx":94 * position += lc * else: * for j in range(lc): # <<<<<<<<<<<<<< * offset = position + j * rc * for k in range(rc): */ __pyx_t_24 = __pyx_v_lc; for (__pyx_t_25 = 0; __pyx_t_25 < __pyx_t_24; __pyx_t_25+=1) { __pyx_v_j = __pyx_t_25; /* "pandas/src/join.pyx":95 * else: * for j in range(lc): * offset = position + j * rc # <<<<<<<<<<<<<< * for k in range(rc): * left_indexer[offset + k] = left_pos + j */ __pyx_v_offset = (__pyx_v_position + (__pyx_v_j * __pyx_v_rc)); /* "pandas/src/join.pyx":96 * for j in range(lc): * offset = position + j * rc * for k in range(rc): # <<<<<<<<<<<<<< * left_indexer[offset + k] = left_pos + j * right_indexer[offset + k] = right_pos + k */ __pyx_t_28 = __pyx_v_rc; for (__pyx_t_29 = 0; __pyx_t_29 < __pyx_t_28; __pyx_t_29+=1) { __pyx_v_k = __pyx_t_29; /* "pandas/src/join.pyx":97 * offset = position + j * rc * for k in range(rc): * left_indexer[offset + k] = left_pos + j # <<<<<<<<<<<<<< * right_indexer[offset + k] = right_pos + k * position += lc * rc */ __pyx_t_30 = (__pyx_v_offset + __pyx_v_k); __pyx_t_7 = -1; if (__pyx_t_30 < 0) { __pyx_t_30 += __pyx_pybuffernd_left_indexer.diminfo[0].shape; if (unlikely(__pyx_t_30 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_30 >= __pyx_pybuffernd_left_indexer.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[3]; __pyx_lineno = 97; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_left_indexer.rcbuffer->pybuffer.buf, __pyx_t_30, __pyx_pybuffernd_left_indexer.diminfo[0].strides) = (__pyx_v_left_pos + __pyx_v_j); /* "pandas/src/join.pyx":98 * for k in range(rc): * left_indexer[offset + k] = left_pos + j * right_indexer[offset + k] = right_pos + k # <<<<<<<<<<<<<< * position += lc * rc * left_pos += lc */ __pyx_t_31 = (__pyx_v_offset + __pyx_v_k); __pyx_t_7 = -1; if (__pyx_t_31 < 0) { __pyx_t_31 += __pyx_pybuffernd_right_indexer.diminfo[0].shape; if (unlikely(__pyx_t_31 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_31 >= __pyx_pybuffernd_right_indexer.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[3]; __pyx_lineno = 98; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_right_indexer.rcbuffer->pybuffer.buf, __pyx_t_31, __pyx_pybuffernd_right_indexer.diminfo[0].strides) = (__pyx_v_right_pos + __pyx_v_k); } } /* "pandas/src/join.pyx":99 * left_indexer[offset + k] = left_pos + j * right_indexer[offset + k] = right_pos + k * position += lc * rc # <<<<<<<<<<<<<< * left_pos += lc * right_pos += rc */ __pyx_v_position = (__pyx_v_position + (__pyx_v_lc * __pyx_v_rc)); } __pyx_L12:; /* "pandas/src/join.pyx":100 * right_indexer[offset + k] = right_pos + k * position += lc * rc * left_pos += lc # <<<<<<<<<<<<<< * right_pos += rc * */ __pyx_v_left_pos = (__pyx_v_left_pos + __pyx_v_lc); /* "pandas/src/join.pyx":101 * position += lc * rc * left_pos += lc * right_pos += rc # <<<<<<<<<<<<<< * * left_indexer = _get_result_indexer(left_sorter, left_indexer) */ __pyx_v_right_pos = (__pyx_v_right_pos + __pyx_v_rc); } /* "pandas/src/join.pyx":103 * right_pos += rc * * left_indexer = _get_result_indexer(left_sorter, left_indexer) # <<<<<<<<<<<<<< * right_indexer = _get_result_indexer(right_sorter, right_indexer) * */ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s___get_result_indexer); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_20 = PyTuple_New(2); if (unlikely(!__pyx_t_20)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_20); __Pyx_INCREF(((PyObject *)__pyx_v_left_sorter)); PyTuple_SET_ITEM(__pyx_t_20, 0, ((PyObject *)__pyx_v_left_sorter)); __Pyx_GIVEREF(((PyObject *)__pyx_v_left_sorter)); __Pyx_INCREF(((PyObject *)__pyx_v_left_indexer)); PyTuple_SET_ITEM(__pyx_t_20, 1, ((PyObject *)__pyx_v_left_indexer)); __Pyx_GIVEREF(((PyObject *)__pyx_v_left_indexer)); __pyx_t_3 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_20), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_20)); __pyx_t_20 = 0; if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_21 = ((PyArrayObject *)__pyx_t_3); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_left_indexer.rcbuffer->pybuffer); __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_left_indexer.rcbuffer->pybuffer, (PyObject*)__pyx_t_21, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_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_left_indexer.rcbuffer->pybuffer, (PyObject*)__pyx_v_left_indexer, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_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_pybuffernd_left_indexer.diminfo[0].strides = __pyx_pybuffernd_left_indexer.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_left_indexer.diminfo[0].shape = __pyx_pybuffernd_left_indexer.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_21 = 0; __Pyx_DECREF_SET(__pyx_v_left_indexer, ((PyArrayObject *)__pyx_t_3)); __pyx_t_3 = 0; /* "pandas/src/join.pyx":104 * * left_indexer = _get_result_indexer(left_sorter, left_indexer) * right_indexer = _get_result_indexer(right_sorter, right_indexer) # <<<<<<<<<<<<<< * * if not sort: */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s___get_result_indexer); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_20 = PyTuple_New(2); if (unlikely(!__pyx_t_20)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_20); __Pyx_INCREF(((PyObject *)__pyx_v_right_sorter)); PyTuple_SET_ITEM(__pyx_t_20, 0, ((PyObject *)__pyx_v_right_sorter)); __Pyx_GIVEREF(((PyObject *)__pyx_v_right_sorter)); __Pyx_INCREF(((PyObject *)__pyx_v_right_indexer)); PyTuple_SET_ITEM(__pyx_t_20, 1, ((PyObject *)__pyx_v_right_indexer)); __Pyx_GIVEREF(((PyObject *)__pyx_v_right_indexer)); __pyx_t_4 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_20), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_20)); __pyx_t_20 = 0; if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_21 = ((PyArrayObject *)__pyx_t_4); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_right_indexer.rcbuffer->pybuffer); __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_right_indexer.rcbuffer->pybuffer, (PyObject*)__pyx_t_21, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_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_right_indexer.rcbuffer->pybuffer, (PyObject*)__pyx_v_right_indexer, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_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_pybuffernd_right_indexer.diminfo[0].strides = __pyx_pybuffernd_right_indexer.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_right_indexer.diminfo[0].shape = __pyx_pybuffernd_right_indexer.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_21 = 0; __Pyx_DECREF_SET(__pyx_v_right_indexer, ((PyArrayObject *)__pyx_t_4)); __pyx_t_4 = 0; /* "pandas/src/join.pyx":106 * right_indexer = _get_result_indexer(right_sorter, right_indexer) * * if not sort: # <<<<<<<<<<<<<< * if left_sorter.dtype != np.int_: * left_sorter = left_sorter.astype(np.int_) */ __pyx_t_14 = __Pyx_PyObject_IsTrue(__pyx_v_sort); if (unlikely(__pyx_t_14 < 0)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 106; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_32 = ((!__pyx_t_14) != 0); if (__pyx_t_32) { /* "pandas/src/join.pyx":107 * * if not sort: * if left_sorter.dtype != np.int_: # <<<<<<<<<<<<<< * left_sorter = left_sorter.astype(np.int_) * */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_left_sorter), __pyx_n_s__dtype); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_20 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_20)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_20); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_20, __pyx_n_s__int_); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0; __pyx_t_20 = PyObject_RichCompare(__pyx_t_4, __pyx_t_3, Py_NE); __Pyx_XGOTREF(__pyx_t_20); if (unlikely(!__pyx_t_20)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_32 = __Pyx_PyObject_IsTrue(__pyx_t_20); if (unlikely(__pyx_t_32 < 0)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0; if (__pyx_t_32) { /* "pandas/src/join.pyx":108 * if not sort: * if left_sorter.dtype != np.int_: * left_sorter = left_sorter.astype(np.int_) # <<<<<<<<<<<<<< * * rev = np.empty(len(left), dtype=np.int_) */ __pyx_t_20 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_left_sorter), __pyx_n_s__astype); if (unlikely(!__pyx_t_20)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 108; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_20); __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 108; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s__int_); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 108; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 108; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyObject_Call(__pyx_t_20, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 108; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 108; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF_SET(__pyx_v_left_sorter, ((PyArrayObject *)__pyx_t_4)); __pyx_t_4 = 0; goto __pyx_L20; } __pyx_L20:; /* "pandas/src/join.pyx":110 * left_sorter = left_sorter.astype(np.int_) * * rev = np.empty(len(left), dtype=np.int_) # <<<<<<<<<<<<<< * rev.put(left_sorter, np.arange(len(left))) * */ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 110; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s__empty); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 110; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_11 = PyObject_Length(((PyObject *)__pyx_v_left)); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 110; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_4 = PyInt_FromSsize_t(__pyx_t_11); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 110; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_20 = PyTuple_New(1); if (unlikely(!__pyx_t_20)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 110; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_20); PyTuple_SET_ITEM(__pyx_t_20, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyDict_New(); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 110; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_4)); __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 110; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s__int_); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 110; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (PyDict_SetItem(__pyx_t_4, ((PyObject *)__pyx_n_s__dtype), __pyx_t_2) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 110; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_20), ((PyObject *)__pyx_t_4)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 110; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_20)); __pyx_t_20 = 0; __Pyx_DECREF(((PyObject *)__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_filename = __pyx_f[3]; __pyx_lineno = 110; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_rev = ((PyArrayObject *)__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/join.pyx":111 * * rev = np.empty(len(left), dtype=np.int_) * rev.put(left_sorter, np.arange(len(left))) # <<<<<<<<<<<<<< * * right_indexer = right_indexer.take(rev) */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_rev), __pyx_n_s__put); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 111; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 111; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_20 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s__arange); if (unlikely(!__pyx_t_20)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 111; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_20); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_11 = PyObject_Length(((PyObject *)__pyx_v_left)); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 111; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_4 = PyInt_FromSsize_t(__pyx_t_11); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 111; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 111; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyObject_Call(__pyx_t_20, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 111; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 111; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(((PyObject *)__pyx_v_left_sorter)); PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_v_left_sorter)); __Pyx_GIVEREF(((PyObject *)__pyx_v_left_sorter)); PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 111; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "pandas/src/join.pyx":113 * rev.put(left_sorter, np.arange(len(left))) * * right_indexer = right_indexer.take(rev) # <<<<<<<<<<<<<< * left_indexer = left_indexer.take(rev) * */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_right_indexer), __pyx_n_s__take); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 113; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 113; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(((PyObject *)__pyx_v_rev)); PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_v_rev)); __Pyx_GIVEREF(((PyObject *)__pyx_v_rev)); __pyx_t_2 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 113; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(((PyObject *)__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_filename = __pyx_f[3]; __pyx_lineno = 113; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_21 = ((PyArrayObject *)__pyx_t_2); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_right_indexer.rcbuffer->pybuffer); __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_right_indexer.rcbuffer->pybuffer, (PyObject*)__pyx_t_21, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_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_right_indexer.rcbuffer->pybuffer, (PyObject*)__pyx_v_right_indexer, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_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_pybuffernd_right_indexer.diminfo[0].strides = __pyx_pybuffernd_right_indexer.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_right_indexer.diminfo[0].shape = __pyx_pybuffernd_right_indexer.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 113; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_21 = 0; __Pyx_DECREF_SET(__pyx_v_right_indexer, ((PyArrayObject *)__pyx_t_2)); __pyx_t_2 = 0; /* "pandas/src/join.pyx":114 * * right_indexer = right_indexer.take(rev) * left_indexer = left_indexer.take(rev) # <<<<<<<<<<<<<< * * return left_indexer, right_indexer */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_left_indexer), __pyx_n_s__take); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 114; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 114; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(((PyObject *)__pyx_v_rev)); PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_v_rev)); __Pyx_GIVEREF(((PyObject *)__pyx_v_rev)); __pyx_t_4 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 114; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 114; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_21 = ((PyArrayObject *)__pyx_t_4); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_left_indexer.rcbuffer->pybuffer); __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_left_indexer.rcbuffer->pybuffer, (PyObject*)__pyx_t_21, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_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_left_indexer.rcbuffer->pybuffer, (PyObject*)__pyx_v_left_indexer, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_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_pybuffernd_left_indexer.diminfo[0].strides = __pyx_pybuffernd_left_indexer.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_left_indexer.diminfo[0].shape = __pyx_pybuffernd_left_indexer.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 114; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_21 = 0; __Pyx_DECREF_SET(__pyx_v_left_indexer, ((PyArrayObject *)__pyx_t_4)); __pyx_t_4 = 0; goto __pyx_L19; } __pyx_L19:; /* "pandas/src/join.pyx":116 * left_indexer = left_indexer.take(rev) * * return left_indexer, right_indexer # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 116; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(((PyObject *)__pyx_v_left_indexer)); PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_v_left_indexer)); __Pyx_GIVEREF(((PyObject *)__pyx_v_left_indexer)); __Pyx_INCREF(((PyObject *)__pyx_v_right_indexer)); PyTuple_SET_ITEM(__pyx_t_4, 1, ((PyObject *)__pyx_v_right_indexer)); __Pyx_GIVEREF(((PyObject *)__pyx_v_right_indexer)); __pyx_r = ((PyObject *)__pyx_t_4); __pyx_t_4 = 0; goto __pyx_L0; __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_20); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_left.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_left_count.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_left_indexer.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_right.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_right_count.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_right_indexer.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.left_outer_join", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_left.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_left_count.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_left_indexer.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_right.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_right_count.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_right_indexer.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_left_count); __Pyx_XDECREF((PyObject *)__pyx_v_right_count); __Pyx_XDECREF((PyObject *)__pyx_v_left_sorter); __Pyx_XDECREF((PyObject *)__pyx_v_right_sorter); __Pyx_XDECREF((PyObject *)__pyx_v_rev); __Pyx_XDECREF((PyObject *)__pyx_v_left_indexer); __Pyx_XDECREF((PyObject *)__pyx_v_right_indexer); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_79full_outer_join(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_79full_outer_join = {__Pyx_NAMESTR("full_outer_join"), (PyCFunction)__pyx_pw_6pandas_5algos_79full_outer_join, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_79full_outer_join(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_left = 0; PyArrayObject *__pyx_v_right = 0; Py_ssize_t __pyx_v_max_groups; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("full_outer_join (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__left,&__pyx_n_s__right,&__pyx_n_s__max_groups,0}; PyObject* values[3] = {0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__left)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__right)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("full_outer_join", 1, 3, 3, 1); {__pyx_filename = __pyx_f[3]; __pyx_lineno = 120; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__max_groups)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("full_outer_join", 1, 3, 3, 2); {__pyx_filename = __pyx_f[3]; __pyx_lineno = 120; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "full_outer_join") < 0)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 120; __pyx_clineno = __LINE__; goto __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_left = ((PyArrayObject *)values[0]); __pyx_v_right = ((PyArrayObject *)values[1]); __pyx_v_max_groups = __Pyx_PyIndex_AsSsize_t(values[2]); if (unlikely((__pyx_v_max_groups == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 121; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("full_outer_join", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[3]; __pyx_lineno = 120; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.full_outer_join", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_left), __pyx_ptype_5numpy_ndarray, 1, "left", 0))) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 120; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_right), __pyx_ptype_5numpy_ndarray, 1, "right", 0))) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 120; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_78full_outer_join(__pyx_self, __pyx_v_left, __pyx_v_right, __pyx_v_max_groups); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/join.pyx":120 * * * def full_outer_join(ndarray[int64_t] left, ndarray[int64_t] right, # <<<<<<<<<<<<<< * Py_ssize_t max_groups): * cdef: */ static PyObject *__pyx_pf_6pandas_5algos_78full_outer_join(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_left, PyArrayObject *__pyx_v_right, Py_ssize_t __pyx_v_max_groups) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_k; Py_ssize_t __pyx_v_count; PyArrayObject *__pyx_v_left_count = 0; PyArrayObject *__pyx_v_right_count = 0; PyArrayObject *__pyx_v_left_sorter = 0; PyArrayObject *__pyx_v_right_sorter = 0; PyArrayObject *__pyx_v_left_indexer = 0; PyArrayObject *__pyx_v_right_indexer = 0; __pyx_t_5numpy_int64_t __pyx_v_lc; __pyx_t_5numpy_int64_t __pyx_v_rc; __pyx_t_5numpy_int64_t __pyx_v_left_pos; __pyx_t_5numpy_int64_t __pyx_v_right_pos; Py_ssize_t __pyx_v_offset; Py_ssize_t __pyx_v_position; __Pyx_LocalBuf_ND __pyx_pybuffernd_left; __Pyx_Buffer __pyx_pybuffer_left; __Pyx_LocalBuf_ND __pyx_pybuffernd_left_count; __Pyx_Buffer __pyx_pybuffer_left_count; __Pyx_LocalBuf_ND __pyx_pybuffernd_left_indexer; __Pyx_Buffer __pyx_pybuffer_left_indexer; __Pyx_LocalBuf_ND __pyx_pybuffernd_left_sorter; __Pyx_Buffer __pyx_pybuffer_left_sorter; __Pyx_LocalBuf_ND __pyx_pybuffernd_right; __Pyx_Buffer __pyx_pybuffer_right; __Pyx_LocalBuf_ND __pyx_pybuffernd_right_count; __Pyx_Buffer __pyx_pybuffer_right_count; __Pyx_LocalBuf_ND __pyx_pybuffernd_right_indexer; __Pyx_Buffer __pyx_pybuffer_right_indexer; __Pyx_LocalBuf_ND __pyx_pybuffernd_right_sorter; __Pyx_Buffer __pyx_pybuffer_right_sorter; 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 *); PyArrayObject *__pyx_t_6 = NULL; 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; Py_ssize_t __pyx_t_14; int __pyx_t_15; int __pyx_t_16; int __pyx_t_17; long __pyx_t_18; long __pyx_t_19; PyObject *__pyx_t_20 = NULL; PyArrayObject *__pyx_t_21 = NULL; Py_ssize_t __pyx_t_22; Py_ssize_t __pyx_t_23; __pyx_t_5numpy_int64_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; __pyx_t_5numpy_int64_t __pyx_t_30; Py_ssize_t __pyx_t_31; Py_ssize_t __pyx_t_32; Py_ssize_t __pyx_t_33; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("full_outer_join", 0); __pyx_pybuffer_left_count.pybuffer.buf = NULL; __pyx_pybuffer_left_count.refcount = 0; __pyx_pybuffernd_left_count.data = NULL; __pyx_pybuffernd_left_count.rcbuffer = &__pyx_pybuffer_left_count; __pyx_pybuffer_right_count.pybuffer.buf = NULL; __pyx_pybuffer_right_count.refcount = 0; __pyx_pybuffernd_right_count.data = NULL; __pyx_pybuffernd_right_count.rcbuffer = &__pyx_pybuffer_right_count; __pyx_pybuffer_left_sorter.pybuffer.buf = NULL; __pyx_pybuffer_left_sorter.refcount = 0; __pyx_pybuffernd_left_sorter.data = NULL; __pyx_pybuffernd_left_sorter.rcbuffer = &__pyx_pybuffer_left_sorter; __pyx_pybuffer_right_sorter.pybuffer.buf = NULL; __pyx_pybuffer_right_sorter.refcount = 0; __pyx_pybuffernd_right_sorter.data = NULL; __pyx_pybuffernd_right_sorter.rcbuffer = &__pyx_pybuffer_right_sorter; __pyx_pybuffer_left_indexer.pybuffer.buf = NULL; __pyx_pybuffer_left_indexer.refcount = 0; __pyx_pybuffernd_left_indexer.data = NULL; __pyx_pybuffernd_left_indexer.rcbuffer = &__pyx_pybuffer_left_indexer; __pyx_pybuffer_right_indexer.pybuffer.buf = NULL; __pyx_pybuffer_right_indexer.refcount = 0; __pyx_pybuffernd_right_indexer.data = NULL; __pyx_pybuffernd_right_indexer.rcbuffer = &__pyx_pybuffer_right_indexer; __pyx_pybuffer_left.pybuffer.buf = NULL; __pyx_pybuffer_left.refcount = 0; __pyx_pybuffernd_left.data = NULL; __pyx_pybuffernd_left.rcbuffer = &__pyx_pybuffer_left; __pyx_pybuffer_right.pybuffer.buf = NULL; __pyx_pybuffer_right.refcount = 0; __pyx_pybuffernd_right.data = NULL; __pyx_pybuffernd_right.rcbuffer = &__pyx_pybuffer_right; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_left.rcbuffer->pybuffer, (PyObject*)__pyx_v_left, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 120; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_left.diminfo[0].strides = __pyx_pybuffernd_left.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_left.diminfo[0].shape = __pyx_pybuffernd_left.rcbuffer->pybuffer.shape[0]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_right.rcbuffer->pybuffer, (PyObject*)__pyx_v_right, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 120; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_right.diminfo[0].strides = __pyx_pybuffernd_right.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_right.diminfo[0].shape = __pyx_pybuffernd_right.rcbuffer->pybuffer.shape[0]; /* "pandas/src/join.pyx":123 * Py_ssize_t max_groups): * cdef: * Py_ssize_t i, j, k, count = 0 # <<<<<<<<<<<<<< * ndarray[int64_t] left_count, right_count, left_sorter, right_sorter * ndarray[int64_t] left_indexer, right_indexer */ __pyx_v_count = 0; /* "pandas/src/join.pyx":130 * # NA group in location 0 * * left_sorter, left_count = groupsort_indexer(left, max_groups) # <<<<<<<<<<<<<< * right_sorter, right_count = groupsort_indexer(right, max_groups) * */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__groupsort_indexer); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 130; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_max_groups); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 130; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 130; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(((PyObject *)__pyx_v_left)); PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_v_left)); __Pyx_GIVEREF(((PyObject *)__pyx_v_left)); PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 130; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; if ((likely(PyTuple_CheckExact(__pyx_t_2))) || (PyList_CheckExact(__pyx_t_2))) { PyObject* sequence = __pyx_t_2; #if CYTHON_COMPILING_IN_CPYTHON Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); {__pyx_filename = __pyx_f[3]; __pyx_lineno = 130; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_1 = PyTuple_GET_ITEM(sequence, 1); } else { __pyx_t_3 = PyList_GET_ITEM(sequence, 0); __pyx_t_1 = PyList_GET_ITEM(sequence, 1); } __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(__pyx_t_1); #else __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 130; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 130; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); #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_filename = __pyx_f[3]; __pyx_lineno = 130; __pyx_clineno = __LINE__; goto __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_3 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_3)) goto __pyx_L3_unpacking_failed; __Pyx_GOTREF(__pyx_t_3); index = 1; __pyx_t_1 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_1)) goto __pyx_L3_unpacking_failed; __Pyx_GOTREF(__pyx_t_1); if (__Pyx_IternextUnpackEndCheck(__pyx_t_5(__pyx_t_4), 2) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 130; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[3]; __pyx_lineno = 130; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_L4_unpacking_done:; } if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 130; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 130; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_6 = ((PyArrayObject *)__pyx_t_3); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_left_sorter.rcbuffer->pybuffer); __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_left_sorter.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_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_left_sorter.rcbuffer->pybuffer, (PyObject*)__pyx_v_left_sorter, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_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_pybuffernd_left_sorter.diminfo[0].strides = __pyx_pybuffernd_left_sorter.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_left_sorter.diminfo[0].shape = __pyx_pybuffernd_left_sorter.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 130; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_6 = 0; __pyx_v_left_sorter = ((PyArrayObject *)__pyx_t_3); __pyx_t_3 = 0; __pyx_t_6 = ((PyArrayObject *)__pyx_t_1); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_left_count.rcbuffer->pybuffer); __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_left_count.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_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_left_count.rcbuffer->pybuffer, (PyObject*)__pyx_v_left_count, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_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_pybuffernd_left_count.diminfo[0].strides = __pyx_pybuffernd_left_count.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_left_count.diminfo[0].shape = __pyx_pybuffernd_left_count.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 130; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_6 = 0; __pyx_v_left_count = ((PyArrayObject *)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/join.pyx":131 * * left_sorter, left_count = groupsort_indexer(left, max_groups) * right_sorter, right_count = groupsort_indexer(right, max_groups) # <<<<<<<<<<<<<< * * # First pass, determine size of result set, do not use the NA group */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__groupsort_indexer); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 131; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_max_groups); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 131; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 131; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(((PyObject *)__pyx_v_right)); PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_v_right)); __Pyx_GIVEREF(((PyObject *)__pyx_v_right)); PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 131; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) { PyObject* sequence = __pyx_t_1; #if CYTHON_COMPILING_IN_CPYTHON Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); {__pyx_filename = __pyx_f[3]; __pyx_lineno = 131; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_2 = PyTuple_GET_ITEM(sequence, 1); } else { __pyx_t_3 = PyList_GET_ITEM(sequence, 0); __pyx_t_2 = PyList_GET_ITEM(sequence, 1); } __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(__pyx_t_2); #else __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 131; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 131; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } else { Py_ssize_t index = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 131; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_5 = Py_TYPE(__pyx_t_4)->tp_iternext; index = 0; __pyx_t_3 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_3)) goto __pyx_L5_unpacking_failed; __Pyx_GOTREF(__pyx_t_3); index = 1; __pyx_t_2 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_2)) goto __pyx_L5_unpacking_failed; __Pyx_GOTREF(__pyx_t_2); if (__Pyx_IternextUnpackEndCheck(__pyx_t_5(__pyx_t_4), 2) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 131; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_5 = NULL; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; goto __pyx_L6_unpacking_done; __pyx_L5_unpacking_failed:; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_5 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); {__pyx_filename = __pyx_f[3]; __pyx_lineno = 131; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_L6_unpacking_done:; } if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 131; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 131; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_6 = ((PyArrayObject *)__pyx_t_3); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_right_sorter.rcbuffer->pybuffer); __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_right_sorter.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_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_right_sorter.rcbuffer->pybuffer, (PyObject*)__pyx_v_right_sorter, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_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_pybuffernd_right_sorter.diminfo[0].strides = __pyx_pybuffernd_right_sorter.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_right_sorter.diminfo[0].shape = __pyx_pybuffernd_right_sorter.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 131; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_6 = 0; __pyx_v_right_sorter = ((PyArrayObject *)__pyx_t_3); __pyx_t_3 = 0; __pyx_t_6 = ((PyArrayObject *)__pyx_t_2); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_right_count.rcbuffer->pybuffer); __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_right_count.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_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_right_count.rcbuffer->pybuffer, (PyObject*)__pyx_v_right_count, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_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_pybuffernd_right_count.diminfo[0].strides = __pyx_pybuffernd_right_count.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_right_count.diminfo[0].shape = __pyx_pybuffernd_right_count.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 131; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_6 = 0; __pyx_v_right_count = ((PyArrayObject *)__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/join.pyx":134 * * # First pass, determine size of result set, do not use the NA group * for i in range(1, max_groups + 1): # <<<<<<<<<<<<<< * lc = left_count[i] * rc = right_count[i] */ __pyx_t_11 = (__pyx_v_max_groups + 1); for (__pyx_t_12 = 1; __pyx_t_12 < __pyx_t_11; __pyx_t_12+=1) { __pyx_v_i = __pyx_t_12; /* "pandas/src/join.pyx":135 * # First pass, determine size of result set, do not use the NA group * for i in range(1, max_groups + 1): * lc = left_count[i] # <<<<<<<<<<<<<< * rc = right_count[i] * */ __pyx_t_13 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_13 < 0) { __pyx_t_13 += __pyx_pybuffernd_left_count.diminfo[0].shape; if (unlikely(__pyx_t_13 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_13 >= __pyx_pybuffernd_left_count.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[3]; __pyx_lineno = 135; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_lc = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_left_count.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_left_count.diminfo[0].strides)); /* "pandas/src/join.pyx":136 * for i in range(1, max_groups + 1): * lc = left_count[i] * rc = right_count[i] # <<<<<<<<<<<<<< * * if rc > 0 and lc > 0: */ __pyx_t_14 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_14 < 0) { __pyx_t_14 += __pyx_pybuffernd_right_count.diminfo[0].shape; if (unlikely(__pyx_t_14 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_14 >= __pyx_pybuffernd_right_count.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[3]; __pyx_lineno = 136; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_rc = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_right_count.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_right_count.diminfo[0].strides)); /* "pandas/src/join.pyx":138 * rc = right_count[i] * * if rc > 0 and lc > 0: # <<<<<<<<<<<<<< * count += lc * rc * else: */ __pyx_t_15 = ((__pyx_v_rc > 0) != 0); if (__pyx_t_15) { __pyx_t_16 = ((__pyx_v_lc > 0) != 0); __pyx_t_17 = __pyx_t_16; } else { __pyx_t_17 = __pyx_t_15; } if (__pyx_t_17) { /* "pandas/src/join.pyx":139 * * if rc > 0 and lc > 0: * count += lc * rc # <<<<<<<<<<<<<< * else: * count += lc + rc */ __pyx_v_count = (__pyx_v_count + (__pyx_v_lc * __pyx_v_rc)); goto __pyx_L9; } /*else*/ { /* "pandas/src/join.pyx":141 * count += lc * rc * else: * count += lc + rc # <<<<<<<<<<<<<< * * # group 0 is the NA group */ __pyx_v_count = (__pyx_v_count + (__pyx_v_lc + __pyx_v_rc)); } __pyx_L9:; } /* "pandas/src/join.pyx":145 * # group 0 is the NA group * cdef: * int64_t left_pos = 0, right_pos = 0 # <<<<<<<<<<<<<< * Py_ssize_t offset, position = 0 * */ __pyx_v_left_pos = 0; __pyx_v_right_pos = 0; /* "pandas/src/join.pyx":146 * cdef: * int64_t left_pos = 0, right_pos = 0 * Py_ssize_t offset, position = 0 # <<<<<<<<<<<<<< * * # exclude the NA group */ __pyx_v_position = 0; /* "pandas/src/join.pyx":149 * * # exclude the NA group * left_pos = left_count[0] # <<<<<<<<<<<<<< * right_pos = right_count[0] * */ __pyx_t_18 = 0; __pyx_t_7 = -1; if (__pyx_t_18 < 0) { __pyx_t_18 += __pyx_pybuffernd_left_count.diminfo[0].shape; if (unlikely(__pyx_t_18 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_18 >= __pyx_pybuffernd_left_count.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[3]; __pyx_lineno = 149; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_left_pos = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_left_count.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_left_count.diminfo[0].strides)); /* "pandas/src/join.pyx":150 * # exclude the NA group * left_pos = left_count[0] * right_pos = right_count[0] # <<<<<<<<<<<<<< * * left_indexer = np.empty(count, dtype=np.int64) */ __pyx_t_19 = 0; __pyx_t_7 = -1; if (__pyx_t_19 < 0) { __pyx_t_19 += __pyx_pybuffernd_right_count.diminfo[0].shape; if (unlikely(__pyx_t_19 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_19 >= __pyx_pybuffernd_right_count.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[3]; __pyx_lineno = 150; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_right_pos = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_right_count.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_right_count.diminfo[0].strides)); /* "pandas/src/join.pyx":152 * right_pos = right_count[0] * * left_indexer = np.empty(count, dtype=np.int64) # <<<<<<<<<<<<<< * right_indexer = np.empty(count, dtype=np.int64) * */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 152; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[3]; __pyx_lineno = 152; __pyx_clineno = __LINE__; goto __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_count); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 152; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 152; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 152; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 152; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_20 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s__int64); if (unlikely(!__pyx_t_20)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 152; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_20); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__dtype), __pyx_t_20) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 152; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0; __pyx_t_20 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_3), ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_20)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 152; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_20); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; if (!(likely(((__pyx_t_20) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_20, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 152; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_21 = ((PyArrayObject *)__pyx_t_20); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_left_indexer.rcbuffer->pybuffer); __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_left_indexer.rcbuffer->pybuffer, (PyObject*)__pyx_t_21, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_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_left_indexer.rcbuffer->pybuffer, (PyObject*)__pyx_v_left_indexer, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_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_pybuffernd_left_indexer.diminfo[0].strides = __pyx_pybuffernd_left_indexer.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_left_indexer.diminfo[0].shape = __pyx_pybuffernd_left_indexer.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 152; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_21 = 0; __pyx_v_left_indexer = ((PyArrayObject *)__pyx_t_20); __pyx_t_20 = 0; /* "pandas/src/join.pyx":153 * * left_indexer = np.empty(count, dtype=np.int64) * right_indexer = np.empty(count, dtype=np.int64) # <<<<<<<<<<<<<< * * for i in range(1, max_groups + 1): */ __pyx_t_20 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_20)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 153; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_20); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_20, __pyx_n_s__empty); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 153; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0; __pyx_t_20 = PyInt_FromSsize_t(__pyx_v_count); if (unlikely(!__pyx_t_20)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 153; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_20); __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 153; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_20); __Pyx_GIVEREF(__pyx_t_20); __pyx_t_20 = 0; __pyx_t_20 = PyDict_New(); if (unlikely(!__pyx_t_20)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 153; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_20)); __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 153; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__int64); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 153; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (PyDict_SetItem(__pyx_t_20, ((PyObject *)__pyx_n_s__dtype), __pyx_t_4) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 153; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_3), ((PyObject *)__pyx_t_20)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 153; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_20)); __pyx_t_20 = 0; if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 153; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_21 = ((PyArrayObject *)__pyx_t_4); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_right_indexer.rcbuffer->pybuffer); __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_right_indexer.rcbuffer->pybuffer, (PyObject*)__pyx_t_21, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_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_right_indexer.rcbuffer->pybuffer, (PyObject*)__pyx_v_right_indexer, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_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_pybuffernd_right_indexer.diminfo[0].strides = __pyx_pybuffernd_right_indexer.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_right_indexer.diminfo[0].shape = __pyx_pybuffernd_right_indexer.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 153; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_21 = 0; __pyx_v_right_indexer = ((PyArrayObject *)__pyx_t_4); __pyx_t_4 = 0; /* "pandas/src/join.pyx":155 * right_indexer = np.empty(count, dtype=np.int64) * * for i in range(1, max_groups + 1): # <<<<<<<<<<<<<< * lc = left_count[i] * rc = right_count[i] */ __pyx_t_11 = (__pyx_v_max_groups + 1); for (__pyx_t_12 = 1; __pyx_t_12 < __pyx_t_11; __pyx_t_12+=1) { __pyx_v_i = __pyx_t_12; /* "pandas/src/join.pyx":156 * * for i in range(1, max_groups + 1): * lc = left_count[i] # <<<<<<<<<<<<<< * rc = right_count[i] * */ __pyx_t_22 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_22 < 0) { __pyx_t_22 += __pyx_pybuffernd_left_count.diminfo[0].shape; if (unlikely(__pyx_t_22 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_22 >= __pyx_pybuffernd_left_count.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[3]; __pyx_lineno = 156; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_lc = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_left_count.rcbuffer->pybuffer.buf, __pyx_t_22, __pyx_pybuffernd_left_count.diminfo[0].strides)); /* "pandas/src/join.pyx":157 * for i in range(1, max_groups + 1): * lc = left_count[i] * rc = right_count[i] # <<<<<<<<<<<<<< * * if rc == 0: */ __pyx_t_23 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_23 < 0) { __pyx_t_23 += __pyx_pybuffernd_right_count.diminfo[0].shape; if (unlikely(__pyx_t_23 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_23 >= __pyx_pybuffernd_right_count.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[3]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_rc = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_right_count.rcbuffer->pybuffer.buf, __pyx_t_23, __pyx_pybuffernd_right_count.diminfo[0].strides)); /* "pandas/src/join.pyx":159 * rc = right_count[i] * * if rc == 0: # <<<<<<<<<<<<<< * for j in range(lc): * left_indexer[position + j] = left_pos + j */ __pyx_t_17 = ((__pyx_v_rc == 0) != 0); if (__pyx_t_17) { /* "pandas/src/join.pyx":160 * * if rc == 0: * for j in range(lc): # <<<<<<<<<<<<<< * left_indexer[position + j] = left_pos + j * right_indexer[position + j] = -1 */ __pyx_t_24 = __pyx_v_lc; for (__pyx_t_25 = 0; __pyx_t_25 < __pyx_t_24; __pyx_t_25+=1) { __pyx_v_j = __pyx_t_25; /* "pandas/src/join.pyx":161 * if rc == 0: * for j in range(lc): * left_indexer[position + j] = left_pos + j # <<<<<<<<<<<<<< * right_indexer[position + j] = -1 * position += lc */ __pyx_t_26 = (__pyx_v_position + __pyx_v_j); __pyx_t_7 = -1; if (__pyx_t_26 < 0) { __pyx_t_26 += __pyx_pybuffernd_left_indexer.diminfo[0].shape; if (unlikely(__pyx_t_26 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_26 >= __pyx_pybuffernd_left_indexer.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[3]; __pyx_lineno = 161; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_left_indexer.rcbuffer->pybuffer.buf, __pyx_t_26, __pyx_pybuffernd_left_indexer.diminfo[0].strides) = (__pyx_v_left_pos + __pyx_v_j); /* "pandas/src/join.pyx":162 * for j in range(lc): * left_indexer[position + j] = left_pos + j * right_indexer[position + j] = -1 # <<<<<<<<<<<<<< * position += lc * elif lc == 0: */ __pyx_t_27 = (__pyx_v_position + __pyx_v_j); __pyx_t_7 = -1; if (__pyx_t_27 < 0) { __pyx_t_27 += __pyx_pybuffernd_right_indexer.diminfo[0].shape; if (unlikely(__pyx_t_27 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_27 >= __pyx_pybuffernd_right_indexer.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[3]; __pyx_lineno = 162; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_right_indexer.rcbuffer->pybuffer.buf, __pyx_t_27, __pyx_pybuffernd_right_indexer.diminfo[0].strides) = -1; } /* "pandas/src/join.pyx":163 * left_indexer[position + j] = left_pos + j * right_indexer[position + j] = -1 * position += lc # <<<<<<<<<<<<<< * elif lc == 0: * for j in range(rc): */ __pyx_v_position = (__pyx_v_position + __pyx_v_lc); goto __pyx_L12; } /* "pandas/src/join.pyx":164 * right_indexer[position + j] = -1 * position += lc * elif lc == 0: # <<<<<<<<<<<<<< * for j in range(rc): * left_indexer[position + j] = -1 */ __pyx_t_17 = ((__pyx_v_lc == 0) != 0); if (__pyx_t_17) { /* "pandas/src/join.pyx":165 * position += lc * elif lc == 0: * for j in range(rc): # <<<<<<<<<<<<<< * left_indexer[position + j] = -1 * right_indexer[position + j] = right_pos + j */ __pyx_t_24 = __pyx_v_rc; for (__pyx_t_25 = 0; __pyx_t_25 < __pyx_t_24; __pyx_t_25+=1) { __pyx_v_j = __pyx_t_25; /* "pandas/src/join.pyx":166 * elif lc == 0: * for j in range(rc): * left_indexer[position + j] = -1 # <<<<<<<<<<<<<< * right_indexer[position + j] = right_pos + j * position += rc */ __pyx_t_28 = (__pyx_v_position + __pyx_v_j); __pyx_t_7 = -1; if (__pyx_t_28 < 0) { __pyx_t_28 += __pyx_pybuffernd_left_indexer.diminfo[0].shape; if (unlikely(__pyx_t_28 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_28 >= __pyx_pybuffernd_left_indexer.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[3]; __pyx_lineno = 166; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_left_indexer.rcbuffer->pybuffer.buf, __pyx_t_28, __pyx_pybuffernd_left_indexer.diminfo[0].strides) = -1; /* "pandas/src/join.pyx":167 * for j in range(rc): * left_indexer[position + j] = -1 * right_indexer[position + j] = right_pos + j # <<<<<<<<<<<<<< * position += rc * else: */ __pyx_t_29 = (__pyx_v_position + __pyx_v_j); __pyx_t_7 = -1; if (__pyx_t_29 < 0) { __pyx_t_29 += __pyx_pybuffernd_right_indexer.diminfo[0].shape; if (unlikely(__pyx_t_29 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_29 >= __pyx_pybuffernd_right_indexer.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[3]; __pyx_lineno = 167; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_right_indexer.rcbuffer->pybuffer.buf, __pyx_t_29, __pyx_pybuffernd_right_indexer.diminfo[0].strides) = (__pyx_v_right_pos + __pyx_v_j); } /* "pandas/src/join.pyx":168 * left_indexer[position + j] = -1 * right_indexer[position + j] = right_pos + j * position += rc # <<<<<<<<<<<<<< * else: * for j in range(lc): */ __pyx_v_position = (__pyx_v_position + __pyx_v_rc); goto __pyx_L12; } /*else*/ { /* "pandas/src/join.pyx":170 * position += rc * else: * for j in range(lc): # <<<<<<<<<<<<<< * offset = position + j * rc * for k in range(rc): */ __pyx_t_24 = __pyx_v_lc; for (__pyx_t_25 = 0; __pyx_t_25 < __pyx_t_24; __pyx_t_25+=1) { __pyx_v_j = __pyx_t_25; /* "pandas/src/join.pyx":171 * else: * for j in range(lc): * offset = position + j * rc # <<<<<<<<<<<<<< * for k in range(rc): * left_indexer[offset + k] = left_pos + j */ __pyx_v_offset = (__pyx_v_position + (__pyx_v_j * __pyx_v_rc)); /* "pandas/src/join.pyx":172 * for j in range(lc): * offset = position + j * rc * for k in range(rc): # <<<<<<<<<<<<<< * left_indexer[offset + k] = left_pos + j * right_indexer[offset + k] = right_pos + k */ __pyx_t_30 = __pyx_v_rc; for (__pyx_t_31 = 0; __pyx_t_31 < __pyx_t_30; __pyx_t_31+=1) { __pyx_v_k = __pyx_t_31; /* "pandas/src/join.pyx":173 * offset = position + j * rc * for k in range(rc): * left_indexer[offset + k] = left_pos + j # <<<<<<<<<<<<<< * right_indexer[offset + k] = right_pos + k * position += lc * rc */ __pyx_t_32 = (__pyx_v_offset + __pyx_v_k); __pyx_t_7 = -1; if (__pyx_t_32 < 0) { __pyx_t_32 += __pyx_pybuffernd_left_indexer.diminfo[0].shape; if (unlikely(__pyx_t_32 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_32 >= __pyx_pybuffernd_left_indexer.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[3]; __pyx_lineno = 173; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_left_indexer.rcbuffer->pybuffer.buf, __pyx_t_32, __pyx_pybuffernd_left_indexer.diminfo[0].strides) = (__pyx_v_left_pos + __pyx_v_j); /* "pandas/src/join.pyx":174 * for k in range(rc): * left_indexer[offset + k] = left_pos + j * right_indexer[offset + k] = right_pos + k # <<<<<<<<<<<<<< * position += lc * rc * left_pos += lc */ __pyx_t_33 = (__pyx_v_offset + __pyx_v_k); __pyx_t_7 = -1; if (__pyx_t_33 < 0) { __pyx_t_33 += __pyx_pybuffernd_right_indexer.diminfo[0].shape; if (unlikely(__pyx_t_33 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_33 >= __pyx_pybuffernd_right_indexer.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[3]; __pyx_lineno = 174; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_right_indexer.rcbuffer->pybuffer.buf, __pyx_t_33, __pyx_pybuffernd_right_indexer.diminfo[0].strides) = (__pyx_v_right_pos + __pyx_v_k); } } /* "pandas/src/join.pyx":175 * left_indexer[offset + k] = left_pos + j * right_indexer[offset + k] = right_pos + k * position += lc * rc # <<<<<<<<<<<<<< * left_pos += lc * right_pos += rc */ __pyx_v_position = (__pyx_v_position + (__pyx_v_lc * __pyx_v_rc)); } __pyx_L12:; /* "pandas/src/join.pyx":176 * right_indexer[offset + k] = right_pos + k * position += lc * rc * left_pos += lc # <<<<<<<<<<<<<< * right_pos += rc * */ __pyx_v_left_pos = (__pyx_v_left_pos + __pyx_v_lc); /* "pandas/src/join.pyx":177 * position += lc * rc * left_pos += lc * right_pos += rc # <<<<<<<<<<<<<< * * return (_get_result_indexer(left_sorter, left_indexer), */ __pyx_v_right_pos = (__pyx_v_right_pos + __pyx_v_rc); } /* "pandas/src/join.pyx":179 * right_pos += rc * * return (_get_result_indexer(left_sorter, left_indexer), # <<<<<<<<<<<<<< * _get_result_indexer(right_sorter, right_indexer)) * */ __Pyx_XDECREF(__pyx_r); __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s___get_result_indexer); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 179; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_20 = PyTuple_New(2); if (unlikely(!__pyx_t_20)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 179; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_20); __Pyx_INCREF(((PyObject *)__pyx_v_left_sorter)); PyTuple_SET_ITEM(__pyx_t_20, 0, ((PyObject *)__pyx_v_left_sorter)); __Pyx_GIVEREF(((PyObject *)__pyx_v_left_sorter)); __Pyx_INCREF(((PyObject *)__pyx_v_left_indexer)); PyTuple_SET_ITEM(__pyx_t_20, 1, ((PyObject *)__pyx_v_left_indexer)); __Pyx_GIVEREF(((PyObject *)__pyx_v_left_indexer)); __pyx_t_3 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_20), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 179; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_20)); __pyx_t_20 = 0; /* "pandas/src/join.pyx":180 * * return (_get_result_indexer(left_sorter, left_indexer), * _get_result_indexer(right_sorter, right_indexer)) # <<<<<<<<<<<<<< * * */ __pyx_t_20 = __Pyx_GetModuleGlobalName(__pyx_n_s___get_result_indexer); if (unlikely(!__pyx_t_20)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_20); __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(((PyObject *)__pyx_v_right_sorter)); PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_v_right_sorter)); __Pyx_GIVEREF(((PyObject *)__pyx_v_right_sorter)); __Pyx_INCREF(((PyObject *)__pyx_v_right_indexer)); PyTuple_SET_ITEM(__pyx_t_4, 1, ((PyObject *)__pyx_v_right_indexer)); __Pyx_GIVEREF(((PyObject *)__pyx_v_right_indexer)); __pyx_t_1 = PyObject_Call(__pyx_t_20, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 179; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_3 = 0; __pyx_t_1 = 0; __pyx_r = ((PyObject *)__pyx_t_4); __pyx_t_4 = 0; goto __pyx_L0; __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_20); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_left.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_left_count.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_left_indexer.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_left_sorter.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_right.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_right_count.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_right_indexer.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_right_sorter.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.full_outer_join", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_left.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_left_count.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_left_indexer.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_left_sorter.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_right.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_right_count.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_right_indexer.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_right_sorter.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_left_count); __Pyx_XDECREF((PyObject *)__pyx_v_right_count); __Pyx_XDECREF((PyObject *)__pyx_v_left_sorter); __Pyx_XDECREF((PyObject *)__pyx_v_right_sorter); __Pyx_XDECREF((PyObject *)__pyx_v_left_indexer); __Pyx_XDECREF((PyObject *)__pyx_v_right_indexer); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_81_get_result_indexer(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_81_get_result_indexer = {__Pyx_NAMESTR("_get_result_indexer"), (PyCFunction)__pyx_pw_6pandas_5algos_81_get_result_indexer, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_81_get_result_indexer(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_sorter = 0; PyObject *__pyx_v_indexer = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_get_result_indexer (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__sorter,&__pyx_n_s__indexer,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__sorter)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__indexer)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("_get_result_indexer", 1, 2, 2, 1); {__pyx_filename = __pyx_f[3]; __pyx_lineno = 184; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_get_result_indexer") < 0)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 184; __pyx_clineno = __LINE__; goto __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_sorter = values[0]; __pyx_v_indexer = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("_get_result_indexer", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[3]; __pyx_lineno = 184; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos._get_result_indexer", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pandas_5algos_80_get_result_indexer(__pyx_self, __pyx_v_sorter, __pyx_v_indexer); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/join.pyx":184 * * * def _get_result_indexer(sorter, indexer): # <<<<<<<<<<<<<< * if indexer.dtype != np.int_: * indexer = indexer.astype(np.int_) */ static PyObject *__pyx_pf_6pandas_5algos_80_get_result_indexer(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_sorter, PyObject *__pyx_v_indexer) { PyObject *__pyx_v_res = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_t_4; Py_ssize_t __pyx_t_5; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_get_result_indexer", 0); __Pyx_INCREF(__pyx_v_indexer); /* "pandas/src/join.pyx":185 * * def _get_result_indexer(sorter, indexer): * if indexer.dtype != np.int_: # <<<<<<<<<<<<<< * indexer = indexer.astype(np.int_) * if len(sorter) > 0: */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_indexer, __pyx_n_s__dtype); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 185; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 185; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__int_); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 185; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_RichCompare(__pyx_t_1, __pyx_t_3, Py_NE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 185; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 185; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_4) { /* "pandas/src/join.pyx":186 * def _get_result_indexer(sorter, indexer): * if indexer.dtype != np.int_: * indexer = indexer.astype(np.int_) # <<<<<<<<<<<<<< * if len(sorter) > 0: * res = sorter.take(indexer) */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_indexer, __pyx_n_s__astype); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 186; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 186; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s__int_); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 186; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 186; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 186; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; __Pyx_DECREF_SET(__pyx_v_indexer, __pyx_t_1); __pyx_t_1 = 0; goto __pyx_L3; } __pyx_L3:; /* "pandas/src/join.pyx":187 * if indexer.dtype != np.int_: * indexer = indexer.astype(np.int_) * if len(sorter) > 0: # <<<<<<<<<<<<<< * res = sorter.take(indexer) * np.putmask(res, indexer == -1, -1) */ __pyx_t_5 = PyObject_Length(__pyx_v_sorter); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 187; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_4 = ((__pyx_t_5 > 0) != 0); if (__pyx_t_4) { /* "pandas/src/join.pyx":188 * indexer = indexer.astype(np.int_) * if len(sorter) > 0: * res = sorter.take(indexer) # <<<<<<<<<<<<<< * np.putmask(res, indexer == -1, -1) * else: */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_sorter, __pyx_n_s__take); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 188; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 188; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_v_indexer); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_indexer); __Pyx_GIVEREF(__pyx_v_indexer); __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 188; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; __pyx_v_res = __pyx_t_2; __pyx_t_2 = 0; /* "pandas/src/join.pyx":189 * if len(sorter) > 0: * res = sorter.take(indexer) * np.putmask(res, indexer == -1, -1) # <<<<<<<<<<<<<< * else: * # length-0 case */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 189; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__putmask); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 189; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_RichCompare(__pyx_v_indexer, __pyx_int_neg_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 189; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 189; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_res); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_res); __Pyx_GIVEREF(__pyx_v_res); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __Pyx_INCREF(__pyx_int_neg_1); PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_int_neg_1); __Pyx_GIVEREF(__pyx_int_neg_1); __pyx_t_2 = 0; __pyx_t_2 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 189; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; goto __pyx_L4; } /*else*/ { /* "pandas/src/join.pyx":192 * else: * # length-0 case * res = np.empty(len(indexer), dtype=np.int64) # <<<<<<<<<<<<<< * res.fill(-1) * */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 192; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__empty); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 192; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_5 = PyObject_Length(__pyx_v_indexer); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 192; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_2 = PyInt_FromSsize_t(__pyx_t_5); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 192; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 192; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 192; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_2)); __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 192; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s__int64); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 192; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__dtype), __pyx_t_7) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 192; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_7 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_3), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 192; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __pyx_v_res = __pyx_t_7; __pyx_t_7 = 0; /* "pandas/src/join.pyx":193 * # length-0 case * res = np.empty(len(indexer), dtype=np.int64) * res.fill(-1) # <<<<<<<<<<<<<< * * return res */ __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_res, __pyx_n_s__fill); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 193; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_t_2 = PyObject_Call(__pyx_t_7, ((PyObject *)__pyx_k_tuple_48), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 193; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } __pyx_L4:; /* "pandas/src/join.pyx":195 * res.fill(-1) * * return res # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_res); __pyx_r = __pyx_v_res; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_AddTraceback("pandas.algos._get_result_indexer", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_res); __Pyx_XDECREF(__pyx_v_indexer); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_83ffill_indexer(PyObject *__pyx_self, PyObject *__pyx_v_indexer); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_83ffill_indexer = {__Pyx_NAMESTR("ffill_indexer"), (PyCFunction)__pyx_pw_6pandas_5algos_83ffill_indexer, METH_O, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_83ffill_indexer(PyObject *__pyx_self, PyObject *__pyx_v_indexer) { CYTHON_UNUSED int __pyx_lineno = 0; CYTHON_UNUSED const char *__pyx_filename = NULL; CYTHON_UNUSED int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("ffill_indexer (wrapper)", 0); if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_indexer), __pyx_ptype_5numpy_ndarray, 1, "indexer", 0))) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 199; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_82ffill_indexer(__pyx_self, ((PyArrayObject *)__pyx_v_indexer)); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/join.pyx":199 * * * def ffill_indexer(ndarray[int64_t] indexer): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = len(indexer) */ static PyObject *__pyx_pf_6pandas_5algos_82ffill_indexer(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_indexer) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_n; PyArrayObject *__pyx_v_result = 0; __pyx_t_5numpy_int64_t __pyx_v_val; __pyx_t_5numpy_int64_t __pyx_v_last_obs; __Pyx_LocalBuf_ND __pyx_pybuffernd_indexer; __Pyx_Buffer __pyx_pybuffer_indexer; __Pyx_LocalBuf_ND __pyx_pybuffernd_result; __Pyx_Buffer __pyx_pybuffer_result; 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; int __pyx_t_14; Py_ssize_t __pyx_t_15; Py_ssize_t __pyx_t_16; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("ffill_indexer", 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_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_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 199; __pyx_clineno = __LINE__; goto __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]; /* "pandas/src/join.pyx":201 * def ffill_indexer(ndarray[int64_t] indexer): * cdef: * Py_ssize_t i, n = len(indexer) # <<<<<<<<<<<<<< * ndarray[int64_t] result * int64_t val, last_obs */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_indexer)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 201; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/src/join.pyx":205 * int64_t val, last_obs * * result = np.empty(n, dtype=np.int64) # <<<<<<<<<<<<<< * last_obs = -1 * */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 205; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[3]; __pyx_lineno = 205; __pyx_clineno = __LINE__; goto __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_n); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 205; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 205; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 205; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_2)); __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 205; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s__int64); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 205; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__dtype), __pyx_t_6) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 205; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 205; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __Pyx_DECREF(((PyObject *)__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_filename = __pyx_f[3]; __pyx_lineno = 205; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_7 = ((PyArrayObject *)__pyx_t_6); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_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_result.rcbuffer->pybuffer, (PyObject*)__pyx_v_result, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_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_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_8 < 0)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 205; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_7 = 0; __pyx_v_result = ((PyArrayObject *)__pyx_t_6); __pyx_t_6 = 0; /* "pandas/src/join.pyx":206 * * result = np.empty(n, dtype=np.int64) * last_obs = -1 # <<<<<<<<<<<<<< * * for i in range(n): */ __pyx_v_last_obs = -1; /* "pandas/src/join.pyx":208 * last_obs = -1 * * for i in range(n): # <<<<<<<<<<<<<< * val = indexer[i] * if val == -1: */ __pyx_t_1 = __pyx_v_n; for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_1; __pyx_t_12+=1) { __pyx_v_i = __pyx_t_12; /* "pandas/src/join.pyx":209 * * for i in range(n): * val = indexer[i] # <<<<<<<<<<<<<< * if val == -1: * result[i] = last_obs */ __pyx_t_13 = __pyx_v_i; __pyx_t_8 = -1; if (__pyx_t_13 < 0) { __pyx_t_13 += __pyx_pybuffernd_indexer.diminfo[0].shape; if (unlikely(__pyx_t_13 < 0)) __pyx_t_8 = 0; } else if (unlikely(__pyx_t_13 >= __pyx_pybuffernd_indexer.diminfo[0].shape)) __pyx_t_8 = 0; if (unlikely(__pyx_t_8 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_8); {__pyx_filename = __pyx_f[3]; __pyx_lineno = 209; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_val = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_indexer.diminfo[0].strides)); /* "pandas/src/join.pyx":210 * for i in range(n): * val = indexer[i] * if val == -1: # <<<<<<<<<<<<<< * result[i] = last_obs * else: */ __pyx_t_14 = ((__pyx_v_val == -1) != 0); if (__pyx_t_14) { /* "pandas/src/join.pyx":211 * val = indexer[i] * if val == -1: * result[i] = last_obs # <<<<<<<<<<<<<< * else: * result[i] = val */ __pyx_t_15 = __pyx_v_i; __pyx_t_8 = -1; if (__pyx_t_15 < 0) { __pyx_t_15 += __pyx_pybuffernd_result.diminfo[0].shape; if (unlikely(__pyx_t_15 < 0)) __pyx_t_8 = 0; } else if (unlikely(__pyx_t_15 >= __pyx_pybuffernd_result.diminfo[0].shape)) __pyx_t_8 = 0; if (unlikely(__pyx_t_8 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_8); {__pyx_filename = __pyx_f[3]; __pyx_lineno = 211; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_result.diminfo[0].strides) = __pyx_v_last_obs; goto __pyx_L5; } /*else*/ { /* "pandas/src/join.pyx":213 * result[i] = last_obs * else: * result[i] = val # <<<<<<<<<<<<<< * last_obs = val * */ __pyx_t_16 = __pyx_v_i; __pyx_t_8 = -1; if (__pyx_t_16 < 0) { __pyx_t_16 += __pyx_pybuffernd_result.diminfo[0].shape; if (unlikely(__pyx_t_16 < 0)) __pyx_t_8 = 0; } else if (unlikely(__pyx_t_16 >= __pyx_pybuffernd_result.diminfo[0].shape)) __pyx_t_8 = 0; if (unlikely(__pyx_t_8 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_8); {__pyx_filename = __pyx_f[3]; __pyx_lineno = 213; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_result.diminfo[0].strides) = __pyx_v_val; /* "pandas/src/join.pyx":214 * else: * result[i] = val * last_obs = val # <<<<<<<<<<<<<< * * return result */ __pyx_v_last_obs = __pyx_v_val; } __pyx_L5:; } /* "pandas/src/join.pyx":216 * last_obs = val * * return result # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_result)); __pyx_r = ((PyObject *)__pyx_v_result); goto __pyx_L0; __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_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.ffill_indexer", __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_result.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_result); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_85ffill_by_group(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_85ffill_by_group = {__Pyx_NAMESTR("ffill_by_group"), (PyCFunction)__pyx_pw_6pandas_5algos_85ffill_by_group, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_85ffill_by_group(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_indexer = 0; PyArrayObject *__pyx_v_group_ids = 0; __pyx_t_5numpy_int64_t __pyx_v_max_group; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("ffill_by_group (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__indexer,&__pyx_n_s__group_ids,&__pyx_n_s__max_group,0}; PyObject* values[3] = {0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__indexer)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__group_ids)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("ffill_by_group", 1, 3, 3, 1); {__pyx_filename = __pyx_f[3]; __pyx_lineno = 219; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__max_group)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("ffill_by_group", 1, 3, 3, 2); {__pyx_filename = __pyx_f[3]; __pyx_lineno = 219; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "ffill_by_group") < 0)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 219; __pyx_clineno = __LINE__; goto __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_indexer = ((PyArrayObject *)values[0]); __pyx_v_group_ids = ((PyArrayObject *)values[1]); __pyx_v_max_group = __Pyx_PyInt_from_py_npy_int64(values[2]); if (unlikely((__pyx_v_max_group == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 220; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("ffill_by_group", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[3]; __pyx_lineno = 219; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.ffill_by_group", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_indexer), __pyx_ptype_5numpy_ndarray, 1, "indexer", 0))) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 219; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_group_ids), __pyx_ptype_5numpy_ndarray, 1, "group_ids", 0))) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 219; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_84ffill_by_group(__pyx_self, __pyx_v_indexer, __pyx_v_group_ids, __pyx_v_max_group); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/join.pyx":219 * * * def ffill_by_group(ndarray[int64_t] indexer, ndarray[int64_t] group_ids, # <<<<<<<<<<<<<< * int64_t max_group): * cdef: */ static PyObject *__pyx_pf_6pandas_5algos_84ffill_by_group(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_indexer, PyArrayObject *__pyx_v_group_ids, __pyx_t_5numpy_int64_t __pyx_v_max_group) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_n; PyArrayObject *__pyx_v_result = 0; PyArrayObject *__pyx_v_last_obs = 0; __pyx_t_5numpy_int64_t __pyx_v_gid; __pyx_t_5numpy_int64_t __pyx_v_val; __Pyx_LocalBuf_ND __pyx_pybuffernd_group_ids; __Pyx_Buffer __pyx_pybuffer_group_ids; __Pyx_LocalBuf_ND __pyx_pybuffernd_indexer; __Pyx_Buffer __pyx_pybuffer_indexer; __Pyx_LocalBuf_ND __pyx_pybuffernd_last_obs; __Pyx_Buffer __pyx_pybuffer_last_obs; __Pyx_LocalBuf_ND __pyx_pybuffernd_result; __Pyx_Buffer __pyx_pybuffer_result; 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; __pyx_t_5numpy_int64_t __pyx_t_16; Py_ssize_t __pyx_t_17; Py_ssize_t __pyx_t_18; __pyx_t_5numpy_int64_t __pyx_t_19; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("ffill_by_group", 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_last_obs.pybuffer.buf = NULL; __pyx_pybuffer_last_obs.refcount = 0; __pyx_pybuffernd_last_obs.data = NULL; __pyx_pybuffernd_last_obs.rcbuffer = &__pyx_pybuffer_last_obs; __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_group_ids.pybuffer.buf = NULL; __pyx_pybuffer_group_ids.refcount = 0; __pyx_pybuffernd_group_ids.data = NULL; __pyx_pybuffernd_group_ids.rcbuffer = &__pyx_pybuffer_group_ids; { __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_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 219; __pyx_clineno = __LINE__; goto __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_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_group_ids.rcbuffer->pybuffer, (PyObject*)__pyx_v_group_ids, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 219; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_group_ids.diminfo[0].strides = __pyx_pybuffernd_group_ids.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_group_ids.diminfo[0].shape = __pyx_pybuffernd_group_ids.rcbuffer->pybuffer.shape[0]; /* "pandas/src/join.pyx":222 * int64_t max_group): * cdef: * Py_ssize_t i, n = len(indexer) # <<<<<<<<<<<<<< * ndarray[int64_t] result, last_obs * int64_t gid, val */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_indexer)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 222; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/src/join.pyx":226 * int64_t gid, val * * result = np.empty(n, dtype=np.int64) # <<<<<<<<<<<<<< * * last_obs = np.empty(max_group, dtype=np.int64) */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 226; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[3]; __pyx_lineno = 226; __pyx_clineno = __LINE__; goto __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_n); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 226; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 226; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 226; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_2)); __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 226; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s__int64); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 226; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__dtype), __pyx_t_6) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 226; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 226; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __Pyx_DECREF(((PyObject *)__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_filename = __pyx_f[3]; __pyx_lineno = 226; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_7 = ((PyArrayObject *)__pyx_t_6); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_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_result.rcbuffer->pybuffer, (PyObject*)__pyx_v_result, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_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_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_8 < 0)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 226; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_7 = 0; __pyx_v_result = ((PyArrayObject *)__pyx_t_6); __pyx_t_6 = 0; /* "pandas/src/join.pyx":228 * result = np.empty(n, dtype=np.int64) * * last_obs = np.empty(max_group, dtype=np.int64) # <<<<<<<<<<<<<< * last_obs.fill(-1) * */ __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 228; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s__empty); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 228; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = __Pyx_PyInt_to_py_npy_int64(__pyx_v_max_group); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 228; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 228; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyDict_New(); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 228; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_6)); __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 228; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s__int64); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 228; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (PyDict_SetItem(__pyx_t_6, ((PyObject *)__pyx_n_s__dtype), __pyx_t_5) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 228; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_6)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 228; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0; if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 228; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_7 = ((PyArrayObject *)__pyx_t_5); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_last_obs.rcbuffer->pybuffer); __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_last_obs.rcbuffer->pybuffer, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 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_last_obs.rcbuffer->pybuffer, (PyObject*)__pyx_v_last_obs, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 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_pybuffernd_last_obs.diminfo[0].strides = __pyx_pybuffernd_last_obs.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_last_obs.diminfo[0].shape = __pyx_pybuffernd_last_obs.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 228; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_7 = 0; __pyx_v_last_obs = ((PyArrayObject *)__pyx_t_5); __pyx_t_5 = 0; /* "pandas/src/join.pyx":229 * * last_obs = np.empty(max_group, dtype=np.int64) * last_obs.fill(-1) # <<<<<<<<<<<<<< * * for i in range(n): */ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_last_obs), __pyx_n_s__fill); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 229; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_k_tuple_49), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 229; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; /* "pandas/src/join.pyx":231 * last_obs.fill(-1) * * for i in range(n): # <<<<<<<<<<<<<< * gid = group_ids[i] * val = indexer[i] */ __pyx_t_1 = __pyx_v_n; for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_1; __pyx_t_12+=1) { __pyx_v_i = __pyx_t_12; /* "pandas/src/join.pyx":232 * * for i in range(n): * gid = group_ids[i] # <<<<<<<<<<<<<< * val = indexer[i] * if val == -1: */ __pyx_t_13 = __pyx_v_i; __pyx_t_8 = -1; if (__pyx_t_13 < 0) { __pyx_t_13 += __pyx_pybuffernd_group_ids.diminfo[0].shape; if (unlikely(__pyx_t_13 < 0)) __pyx_t_8 = 0; } else if (unlikely(__pyx_t_13 >= __pyx_pybuffernd_group_ids.diminfo[0].shape)) __pyx_t_8 = 0; if (unlikely(__pyx_t_8 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_8); {__pyx_filename = __pyx_f[3]; __pyx_lineno = 232; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_gid = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_group_ids.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_group_ids.diminfo[0].strides)); /* "pandas/src/join.pyx":233 * for i in range(n): * gid = group_ids[i] * val = indexer[i] # <<<<<<<<<<<<<< * if val == -1: * result[i] = last_obs[gid] */ __pyx_t_14 = __pyx_v_i; __pyx_t_8 = -1; if (__pyx_t_14 < 0) { __pyx_t_14 += __pyx_pybuffernd_indexer.diminfo[0].shape; if (unlikely(__pyx_t_14 < 0)) __pyx_t_8 = 0; } else if (unlikely(__pyx_t_14 >= __pyx_pybuffernd_indexer.diminfo[0].shape)) __pyx_t_8 = 0; if (unlikely(__pyx_t_8 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_8); {__pyx_filename = __pyx_f[3]; __pyx_lineno = 233; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_val = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_indexer.diminfo[0].strides)); /* "pandas/src/join.pyx":234 * gid = group_ids[i] * val = indexer[i] * if val == -1: # <<<<<<<<<<<<<< * result[i] = last_obs[gid] * else: */ __pyx_t_15 = ((__pyx_v_val == -1) != 0); if (__pyx_t_15) { /* "pandas/src/join.pyx":235 * val = indexer[i] * if val == -1: * result[i] = last_obs[gid] # <<<<<<<<<<<<<< * else: * result[i] = val */ __pyx_t_16 = __pyx_v_gid; __pyx_t_8 = -1; if (__pyx_t_16 < 0) { __pyx_t_16 += __pyx_pybuffernd_last_obs.diminfo[0].shape; if (unlikely(__pyx_t_16 < 0)) __pyx_t_8 = 0; } else if (unlikely(__pyx_t_16 >= __pyx_pybuffernd_last_obs.diminfo[0].shape)) __pyx_t_8 = 0; if (unlikely(__pyx_t_8 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_8); {__pyx_filename = __pyx_f[3]; __pyx_lineno = 235; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_17 = __pyx_v_i; __pyx_t_8 = -1; if (__pyx_t_17 < 0) { __pyx_t_17 += __pyx_pybuffernd_result.diminfo[0].shape; if (unlikely(__pyx_t_17 < 0)) __pyx_t_8 = 0; } else if (unlikely(__pyx_t_17 >= __pyx_pybuffernd_result.diminfo[0].shape)) __pyx_t_8 = 0; if (unlikely(__pyx_t_8 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_8); {__pyx_filename = __pyx_f[3]; __pyx_lineno = 235; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_result.diminfo[0].strides) = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_last_obs.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_last_obs.diminfo[0].strides)); goto __pyx_L5; } /*else*/ { /* "pandas/src/join.pyx":237 * result[i] = last_obs[gid] * else: * result[i] = val # <<<<<<<<<<<<<< * last_obs[gid] = val * */ __pyx_t_18 = __pyx_v_i; __pyx_t_8 = -1; if (__pyx_t_18 < 0) { __pyx_t_18 += __pyx_pybuffernd_result.diminfo[0].shape; if (unlikely(__pyx_t_18 < 0)) __pyx_t_8 = 0; } else if (unlikely(__pyx_t_18 >= __pyx_pybuffernd_result.diminfo[0].shape)) __pyx_t_8 = 0; if (unlikely(__pyx_t_8 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_8); {__pyx_filename = __pyx_f[3]; __pyx_lineno = 237; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_result.diminfo[0].strides) = __pyx_v_val; /* "pandas/src/join.pyx":238 * else: * result[i] = val * last_obs[gid] = val # <<<<<<<<<<<<<< * * return result */ __pyx_t_19 = __pyx_v_gid; __pyx_t_8 = -1; if (__pyx_t_19 < 0) { __pyx_t_19 += __pyx_pybuffernd_last_obs.diminfo[0].shape; if (unlikely(__pyx_t_19 < 0)) __pyx_t_8 = 0; } else if (unlikely(__pyx_t_19 >= __pyx_pybuffernd_last_obs.diminfo[0].shape)) __pyx_t_8 = 0; if (unlikely(__pyx_t_8 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_8); {__pyx_filename = __pyx_f[3]; __pyx_lineno = 238; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_last_obs.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_last_obs.diminfo[0].strides) = __pyx_v_val; } __pyx_L5:; } /* "pandas/src/join.pyx":240 * last_obs[gid] = val * * return result # <<<<<<<<<<<<<< * */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_result)); __pyx_r = ((PyObject *)__pyx_v_result); goto __pyx_L0; __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_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_group_ids.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_last_obs.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.ffill_by_group", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_group_ids.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_last_obs.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_result); __Pyx_XDECREF((PyObject *)__pyx_v_last_obs); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":41 * cdef int PLATFORM_INT = ( np.arange(0, dtype=np.int_)).descr.type_num * * cpdef ensure_platform_int(object arr): # <<<<<<<<<<<<<< * if util.is_array(arr): * if ( arr).descr.type_num == PLATFORM_INT: */ static PyObject *__pyx_pw_6pandas_5algos_87ensure_platform_int(PyObject *__pyx_self, PyObject *__pyx_v_arr); /*proto*/ static PyObject *__pyx_f_6pandas_5algos_ensure_platform_int(PyObject *__pyx_v_arr, CYTHON_UNUSED int __pyx_skip_dispatch) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("ensure_platform_int", 0); /* "pandas/src/generated.pyx":42 * * cpdef ensure_platform_int(object arr): * if util.is_array(arr): # <<<<<<<<<<<<<< * if ( arr).descr.type_num == PLATFORM_INT: * return arr */ __pyx_t_1 = __pyx_f_4util_is_array(__pyx_v_arr); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 42; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 42; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_2) { /* "pandas/src/generated.pyx":43 * cpdef ensure_platform_int(object arr): * if util.is_array(arr): * if ( arr).descr.type_num == PLATFORM_INT: # <<<<<<<<<<<<<< * return arr * else: */ __pyx_t_2 = ((((PyArrayObject *)__pyx_v_arr)->descr->type_num == __pyx_v_6pandas_5algos_PLATFORM_INT) != 0); if (__pyx_t_2) { /* "pandas/src/generated.pyx":44 * if util.is_array(arr): * if ( arr).descr.type_num == PLATFORM_INT: * return arr # <<<<<<<<<<<<<< * else: * return arr.astype(np.int_) */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_arr); __pyx_r = __pyx_v_arr; goto __pyx_L0; goto __pyx_L4; } /*else*/ { /* "pandas/src/generated.pyx":46 * return arr * else: * return arr.astype(np.int_) # <<<<<<<<<<<<<< * else: * return np.array(arr, dtype=np.int_) */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_arr, __pyx_n_s__astype); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 46; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 46; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s__int_); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 46; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 46; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 46; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; } __pyx_L4:; goto __pyx_L3; } /*else*/ { /* "pandas/src/generated.pyx":48 * return arr.astype(np.int_) * else: * return np.array(arr, dtype=np.int_) # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s__array); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_v_arr); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_arr); __Pyx_GIVEREF(__pyx_v_arr); __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s__int_); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__dtype), __pyx_t_6) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_r = __pyx_t_6; __pyx_t_6 = 0; goto __pyx_L0; } __pyx_L3:; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("pandas.algos.ensure_platform_int", __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_5algos_87ensure_platform_int(PyObject *__pyx_self, PyObject *__pyx_v_arr); /*proto*/ static PyObject *__pyx_pw_6pandas_5algos_87ensure_platform_int(PyObject *__pyx_self, PyObject *__pyx_v_arr) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("ensure_platform_int (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_5algos_86ensure_platform_int(__pyx_self, ((PyObject *)__pyx_v_arr)); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":41 * cdef int PLATFORM_INT = ( np.arange(0, dtype=np.int_)).descr.type_num * * cpdef ensure_platform_int(object arr): # <<<<<<<<<<<<<< * if util.is_array(arr): * if ( arr).descr.type_num == PLATFORM_INT: */ static PyObject *__pyx_pf_6pandas_5algos_86ensure_platform_int(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_arr) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("ensure_platform_int", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_6pandas_5algos_ensure_platform_int(__pyx_v_arr, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 41; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas.algos.ensure_platform_int", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":52 * * * cpdef ensure_float64(object arr): # <<<<<<<<<<<<<< * if util.is_array(arr): * if ( arr).descr.type_num == NPY_FLOAT64: */ static PyObject *__pyx_pw_6pandas_5algos_89ensure_float64(PyObject *__pyx_self, PyObject *__pyx_v_arr); /*proto*/ static PyObject *__pyx_f_6pandas_5algos_ensure_float64(PyObject *__pyx_v_arr, CYTHON_UNUSED int __pyx_skip_dispatch) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("ensure_float64", 0); /* "pandas/src/generated.pyx":53 * * cpdef ensure_float64(object arr): * if util.is_array(arr): # <<<<<<<<<<<<<< * if ( arr).descr.type_num == NPY_FLOAT64: * return arr */ __pyx_t_1 = __pyx_f_4util_is_array(__pyx_v_arr); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 53; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 53; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_2) { /* "pandas/src/generated.pyx":54 * cpdef ensure_float64(object arr): * if util.is_array(arr): * if ( arr).descr.type_num == NPY_FLOAT64: # <<<<<<<<<<<<<< * return arr * else: */ __pyx_t_2 = ((((PyArrayObject *)__pyx_v_arr)->descr->type_num == NPY_FLOAT64) != 0); if (__pyx_t_2) { /* "pandas/src/generated.pyx":55 * if util.is_array(arr): * if ( arr).descr.type_num == NPY_FLOAT64: * return arr # <<<<<<<<<<<<<< * else: * return arr.astype(np.float64) */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_arr); __pyx_r = __pyx_v_arr; goto __pyx_L0; goto __pyx_L4; } /*else*/ { /* "pandas/src/generated.pyx":57 * return arr * else: * return arr.astype(np.float64) # <<<<<<<<<<<<<< * else: * return np.array(arr, dtype=np.float64) */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_arr, __pyx_n_s__astype); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 57; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 57; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s__float64); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 57; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 57; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 57; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; } __pyx_L4:; goto __pyx_L3; } /*else*/ { /* "pandas/src/generated.pyx":59 * return arr.astype(np.float64) * else: * return np.array(arr, dtype=np.float64) # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 59; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s__array); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 59; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 59; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_v_arr); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_arr); __Pyx_GIVEREF(__pyx_v_arr); __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 59; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 59; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s__float64); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 59; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__dtype), __pyx_t_6) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 59; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 59; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_r = __pyx_t_6; __pyx_t_6 = 0; goto __pyx_L0; } __pyx_L3:; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("pandas.algos.ensure_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_5algos_89ensure_float64(PyObject *__pyx_self, PyObject *__pyx_v_arr); /*proto*/ static PyObject *__pyx_pw_6pandas_5algos_89ensure_float64(PyObject *__pyx_self, PyObject *__pyx_v_arr) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("ensure_float64 (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_5algos_88ensure_float64(__pyx_self, ((PyObject *)__pyx_v_arr)); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":52 * * * cpdef ensure_float64(object arr): # <<<<<<<<<<<<<< * if util.is_array(arr): * if ( arr).descr.type_num == NPY_FLOAT64: */ static PyObject *__pyx_pf_6pandas_5algos_88ensure_float64(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_arr) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("ensure_float64", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_6pandas_5algos_ensure_float64(__pyx_v_arr, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 52; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas.algos.ensure_float64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":62 * * * cpdef ensure_float32(object arr): # <<<<<<<<<<<<<< * if util.is_array(arr): * if ( arr).descr.type_num == NPY_FLOAT32: */ static PyObject *__pyx_pw_6pandas_5algos_91ensure_float32(PyObject *__pyx_self, PyObject *__pyx_v_arr); /*proto*/ static PyObject *__pyx_f_6pandas_5algos_ensure_float32(PyObject *__pyx_v_arr, CYTHON_UNUSED int __pyx_skip_dispatch) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("ensure_float32", 0); /* "pandas/src/generated.pyx":63 * * cpdef ensure_float32(object arr): * if util.is_array(arr): # <<<<<<<<<<<<<< * if ( arr).descr.type_num == NPY_FLOAT32: * return arr */ __pyx_t_1 = __pyx_f_4util_is_array(__pyx_v_arr); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_2) { /* "pandas/src/generated.pyx":64 * cpdef ensure_float32(object arr): * if util.is_array(arr): * if ( arr).descr.type_num == NPY_FLOAT32: # <<<<<<<<<<<<<< * return arr * else: */ __pyx_t_2 = ((((PyArrayObject *)__pyx_v_arr)->descr->type_num == NPY_FLOAT32) != 0); if (__pyx_t_2) { /* "pandas/src/generated.pyx":65 * if util.is_array(arr): * if ( arr).descr.type_num == NPY_FLOAT32: * return arr # <<<<<<<<<<<<<< * else: * return arr.astype(np.float32) */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_arr); __pyx_r = __pyx_v_arr; goto __pyx_L0; goto __pyx_L4; } /*else*/ { /* "pandas/src/generated.pyx":67 * return arr * else: * return arr.astype(np.float32) # <<<<<<<<<<<<<< * else: * return np.array(arr, dtype=np.float32) */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_arr, __pyx_n_s__astype); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 67; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 67; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s__float32); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 67; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 67; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 67; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; } __pyx_L4:; goto __pyx_L3; } /*else*/ { /* "pandas/src/generated.pyx":69 * return arr.astype(np.float32) * else: * return np.array(arr, dtype=np.float32) # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s__array); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_v_arr); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_arr); __Pyx_GIVEREF(__pyx_v_arr); __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s__float32); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__dtype), __pyx_t_6) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_r = __pyx_t_6; __pyx_t_6 = 0; goto __pyx_L0; } __pyx_L3:; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("pandas.algos.ensure_float32", __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_5algos_91ensure_float32(PyObject *__pyx_self, PyObject *__pyx_v_arr); /*proto*/ static PyObject *__pyx_pw_6pandas_5algos_91ensure_float32(PyObject *__pyx_self, PyObject *__pyx_v_arr) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("ensure_float32 (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_5algos_90ensure_float32(__pyx_self, ((PyObject *)__pyx_v_arr)); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":62 * * * cpdef ensure_float32(object arr): # <<<<<<<<<<<<<< * if util.is_array(arr): * if ( arr).descr.type_num == NPY_FLOAT32: */ static PyObject *__pyx_pf_6pandas_5algos_90ensure_float32(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_arr) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("ensure_float32", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_6pandas_5algos_ensure_float32(__pyx_v_arr, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas.algos.ensure_float32", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":72 * * * cpdef ensure_int8(object arr): # <<<<<<<<<<<<<< * if util.is_array(arr): * if ( arr).descr.type_num == NPY_INT8: */ static PyObject *__pyx_pw_6pandas_5algos_93ensure_int8(PyObject *__pyx_self, PyObject *__pyx_v_arr); /*proto*/ static PyObject *__pyx_f_6pandas_5algos_ensure_int8(PyObject *__pyx_v_arr, CYTHON_UNUSED int __pyx_skip_dispatch) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("ensure_int8", 0); /* "pandas/src/generated.pyx":73 * * cpdef ensure_int8(object arr): * if util.is_array(arr): # <<<<<<<<<<<<<< * if ( arr).descr.type_num == NPY_INT8: * return arr */ __pyx_t_1 = __pyx_f_4util_is_array(__pyx_v_arr); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 73; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 73; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_2) { /* "pandas/src/generated.pyx":74 * cpdef ensure_int8(object arr): * if util.is_array(arr): * if ( arr).descr.type_num == NPY_INT8: # <<<<<<<<<<<<<< * return arr * else: */ __pyx_t_2 = ((((PyArrayObject *)__pyx_v_arr)->descr->type_num == NPY_INT8) != 0); if (__pyx_t_2) { /* "pandas/src/generated.pyx":75 * if util.is_array(arr): * if ( arr).descr.type_num == NPY_INT8: * return arr # <<<<<<<<<<<<<< * else: * return arr.astype(np.int8) */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_arr); __pyx_r = __pyx_v_arr; goto __pyx_L0; goto __pyx_L4; } /*else*/ { /* "pandas/src/generated.pyx":77 * return arr * else: * return arr.astype(np.int8) # <<<<<<<<<<<<<< * else: * return np.array(arr, dtype=np.int8) */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_arr, __pyx_n_s__astype); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 77; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 77; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s__int8); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 77; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 77; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 77; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; } __pyx_L4:; goto __pyx_L3; } /*else*/ { /* "pandas/src/generated.pyx":79 * return arr.astype(np.int8) * else: * return np.array(arr, dtype=np.int8) # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s__array); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_v_arr); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_arr); __Pyx_GIVEREF(__pyx_v_arr); __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__dtype), __pyx_t_6) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_r = __pyx_t_6; __pyx_t_6 = 0; goto __pyx_L0; } __pyx_L3:; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("pandas.algos.ensure_int8", __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_5algos_93ensure_int8(PyObject *__pyx_self, PyObject *__pyx_v_arr); /*proto*/ static PyObject *__pyx_pw_6pandas_5algos_93ensure_int8(PyObject *__pyx_self, PyObject *__pyx_v_arr) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("ensure_int8 (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_5algos_92ensure_int8(__pyx_self, ((PyObject *)__pyx_v_arr)); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":72 * * * cpdef ensure_int8(object arr): # <<<<<<<<<<<<<< * if util.is_array(arr): * if ( arr).descr.type_num == NPY_INT8: */ static PyObject *__pyx_pf_6pandas_5algos_92ensure_int8(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_arr) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("ensure_int8", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_6pandas_5algos_ensure_int8(__pyx_v_arr, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 72; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas.algos.ensure_int8", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":82 * * * cpdef ensure_int16(object arr): # <<<<<<<<<<<<<< * if util.is_array(arr): * if ( arr).descr.type_num == NPY_INT16: */ static PyObject *__pyx_pw_6pandas_5algos_95ensure_int16(PyObject *__pyx_self, PyObject *__pyx_v_arr); /*proto*/ static PyObject *__pyx_f_6pandas_5algos_ensure_int16(PyObject *__pyx_v_arr, CYTHON_UNUSED int __pyx_skip_dispatch) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("ensure_int16", 0); /* "pandas/src/generated.pyx":83 * * cpdef ensure_int16(object arr): * if util.is_array(arr): # <<<<<<<<<<<<<< * if ( arr).descr.type_num == NPY_INT16: * return arr */ __pyx_t_1 = __pyx_f_4util_is_array(__pyx_v_arr); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_2) { /* "pandas/src/generated.pyx":84 * cpdef ensure_int16(object arr): * if util.is_array(arr): * if ( arr).descr.type_num == NPY_INT16: # <<<<<<<<<<<<<< * return arr * else: */ __pyx_t_2 = ((((PyArrayObject *)__pyx_v_arr)->descr->type_num == NPY_INT16) != 0); if (__pyx_t_2) { /* "pandas/src/generated.pyx":85 * if util.is_array(arr): * if ( arr).descr.type_num == NPY_INT16: * return arr # <<<<<<<<<<<<<< * else: * return arr.astype(np.int16) */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_arr); __pyx_r = __pyx_v_arr; goto __pyx_L0; goto __pyx_L4; } /*else*/ { /* "pandas/src/generated.pyx":87 * return arr * else: * return arr.astype(np.int16) # <<<<<<<<<<<<<< * else: * return np.array(arr, dtype=np.int16) */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_arr, __pyx_n_s__astype); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 87; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 87; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s__int16); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 87; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 87; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 87; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; } __pyx_L4:; goto __pyx_L3; } /*else*/ { /* "pandas/src/generated.pyx":89 * return arr.astype(np.int16) * else: * return np.array(arr, dtype=np.int16) # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 89; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s__array); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 89; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 89; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_v_arr); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_arr); __Pyx_GIVEREF(__pyx_v_arr); __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 89; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 89; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s__int16); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 89; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__dtype), __pyx_t_6) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 89; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 89; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_r = __pyx_t_6; __pyx_t_6 = 0; goto __pyx_L0; } __pyx_L3:; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("pandas.algos.ensure_int16", __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_5algos_95ensure_int16(PyObject *__pyx_self, PyObject *__pyx_v_arr); /*proto*/ static PyObject *__pyx_pw_6pandas_5algos_95ensure_int16(PyObject *__pyx_self, PyObject *__pyx_v_arr) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("ensure_int16 (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_5algos_94ensure_int16(__pyx_self, ((PyObject *)__pyx_v_arr)); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":82 * * * cpdef ensure_int16(object arr): # <<<<<<<<<<<<<< * if util.is_array(arr): * if ( arr).descr.type_num == NPY_INT16: */ static PyObject *__pyx_pf_6pandas_5algos_94ensure_int16(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_arr) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("ensure_int16", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_6pandas_5algos_ensure_int16(__pyx_v_arr, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas.algos.ensure_int16", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":92 * * * cpdef ensure_int32(object arr): # <<<<<<<<<<<<<< * if util.is_array(arr): * if ( arr).descr.type_num == NPY_INT32: */ static PyObject *__pyx_pw_6pandas_5algos_97ensure_int32(PyObject *__pyx_self, PyObject *__pyx_v_arr); /*proto*/ static PyObject *__pyx_f_6pandas_5algos_ensure_int32(PyObject *__pyx_v_arr, CYTHON_UNUSED int __pyx_skip_dispatch) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("ensure_int32", 0); /* "pandas/src/generated.pyx":93 * * cpdef ensure_int32(object arr): * if util.is_array(arr): # <<<<<<<<<<<<<< * if ( arr).descr.type_num == NPY_INT32: * return arr */ __pyx_t_1 = __pyx_f_4util_is_array(__pyx_v_arr); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 93; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 93; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_2) { /* "pandas/src/generated.pyx":94 * cpdef ensure_int32(object arr): * if util.is_array(arr): * if ( arr).descr.type_num == NPY_INT32: # <<<<<<<<<<<<<< * return arr * else: */ __pyx_t_2 = ((((PyArrayObject *)__pyx_v_arr)->descr->type_num == NPY_INT32) != 0); if (__pyx_t_2) { /* "pandas/src/generated.pyx":95 * if util.is_array(arr): * if ( arr).descr.type_num == NPY_INT32: * return arr # <<<<<<<<<<<<<< * else: * return arr.astype(np.int32) */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_arr); __pyx_r = __pyx_v_arr; goto __pyx_L0; goto __pyx_L4; } /*else*/ { /* "pandas/src/generated.pyx":97 * return arr * else: * return arr.astype(np.int32) # <<<<<<<<<<<<<< * else: * return np.array(arr, dtype=np.int32) */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_arr, __pyx_n_s__astype); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 97; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 97; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s__int32); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 97; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 97; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 97; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; } __pyx_L4:; goto __pyx_L3; } /*else*/ { /* "pandas/src/generated.pyx":99 * return arr.astype(np.int32) * else: * return np.array(arr, dtype=np.int32) # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 99; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s__array); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 99; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 99; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_v_arr); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_arr); __Pyx_GIVEREF(__pyx_v_arr); __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 99; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 99; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 99; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__dtype), __pyx_t_6) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 99; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 99; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_r = __pyx_t_6; __pyx_t_6 = 0; goto __pyx_L0; } __pyx_L3:; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("pandas.algos.ensure_int32", __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_5algos_97ensure_int32(PyObject *__pyx_self, PyObject *__pyx_v_arr); /*proto*/ static PyObject *__pyx_pw_6pandas_5algos_97ensure_int32(PyObject *__pyx_self, PyObject *__pyx_v_arr) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("ensure_int32 (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_5algos_96ensure_int32(__pyx_self, ((PyObject *)__pyx_v_arr)); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":92 * * * cpdef ensure_int32(object arr): # <<<<<<<<<<<<<< * if util.is_array(arr): * if ( arr).descr.type_num == NPY_INT32: */ static PyObject *__pyx_pf_6pandas_5algos_96ensure_int32(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_arr) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("ensure_int32", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_6pandas_5algos_ensure_int32(__pyx_v_arr, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 92; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas.algos.ensure_int32", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":102 * * * cpdef ensure_int64(object arr): # <<<<<<<<<<<<<< * if util.is_array(arr): * if ( arr).descr.type_num == NPY_INT64: */ static PyObject *__pyx_pw_6pandas_5algos_99ensure_int64(PyObject *__pyx_self, PyObject *__pyx_v_arr); /*proto*/ static PyObject *__pyx_f_6pandas_5algos_ensure_int64(PyObject *__pyx_v_arr, CYTHON_UNUSED int __pyx_skip_dispatch) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("ensure_int64", 0); /* "pandas/src/generated.pyx":103 * * cpdef ensure_int64(object arr): * if util.is_array(arr): # <<<<<<<<<<<<<< * if ( arr).descr.type_num == NPY_INT64: * return arr */ __pyx_t_1 = __pyx_f_4util_is_array(__pyx_v_arr); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_2) { /* "pandas/src/generated.pyx":104 * cpdef ensure_int64(object arr): * if util.is_array(arr): * if ( arr).descr.type_num == NPY_INT64: # <<<<<<<<<<<<<< * return arr * else: */ __pyx_t_2 = ((((PyArrayObject *)__pyx_v_arr)->descr->type_num == NPY_INT64) != 0); if (__pyx_t_2) { /* "pandas/src/generated.pyx":105 * if util.is_array(arr): * if ( arr).descr.type_num == NPY_INT64: * return arr # <<<<<<<<<<<<<< * else: * return arr.astype(np.int64) */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_arr); __pyx_r = __pyx_v_arr; goto __pyx_L0; goto __pyx_L4; } /*else*/ { /* "pandas/src/generated.pyx":107 * return arr * else: * return arr.astype(np.int64) # <<<<<<<<<<<<<< * else: * return np.array(arr, dtype=np.int64) */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_arr, __pyx_n_s__astype); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s__int64); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; } __pyx_L4:; goto __pyx_L3; } /*else*/ { /* "pandas/src/generated.pyx":109 * return arr.astype(np.int64) * else: * return np.array(arr, dtype=np.int64) # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 109; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s__array); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 109; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 109; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_v_arr); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_arr); __Pyx_GIVEREF(__pyx_v_arr); __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 109; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 109; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s__int64); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 109; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__dtype), __pyx_t_6) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 109; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 109; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_r = __pyx_t_6; __pyx_t_6 = 0; goto __pyx_L0; } __pyx_L3:; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("pandas.algos.ensure_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_5algos_99ensure_int64(PyObject *__pyx_self, PyObject *__pyx_v_arr); /*proto*/ static PyObject *__pyx_pw_6pandas_5algos_99ensure_int64(PyObject *__pyx_self, PyObject *__pyx_v_arr) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("ensure_int64 (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_5algos_98ensure_int64(__pyx_self, ((PyObject *)__pyx_v_arr)); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":102 * * * cpdef ensure_int64(object arr): # <<<<<<<<<<<<<< * if util.is_array(arr): * if ( arr).descr.type_num == NPY_INT64: */ static PyObject *__pyx_pf_6pandas_5algos_98ensure_int64(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_arr) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("ensure_int64", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_6pandas_5algos_ensure_int64(__pyx_v_arr, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas.algos.ensure_int64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":112 * * * cpdef ensure_object(object arr): # <<<<<<<<<<<<<< * if util.is_array(arr): * if ( arr).descr.type_num == NPY_OBJECT: */ static PyObject *__pyx_pw_6pandas_5algos_101ensure_object(PyObject *__pyx_self, PyObject *__pyx_v_arr); /*proto*/ static PyObject *__pyx_f_6pandas_5algos_ensure_object(PyObject *__pyx_v_arr, CYTHON_UNUSED int __pyx_skip_dispatch) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("ensure_object", 0); /* "pandas/src/generated.pyx":113 * * cpdef ensure_object(object arr): * if util.is_array(arr): # <<<<<<<<<<<<<< * if ( arr).descr.type_num == NPY_OBJECT: * return arr */ __pyx_t_1 = __pyx_f_4util_is_array(__pyx_v_arr); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 113; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 113; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_2) { /* "pandas/src/generated.pyx":114 * cpdef ensure_object(object arr): * if util.is_array(arr): * if ( arr).descr.type_num == NPY_OBJECT: # <<<<<<<<<<<<<< * return arr * else: */ __pyx_t_2 = ((((PyArrayObject *)__pyx_v_arr)->descr->type_num == NPY_OBJECT) != 0); if (__pyx_t_2) { /* "pandas/src/generated.pyx":115 * if util.is_array(arr): * if ( arr).descr.type_num == NPY_OBJECT: * return arr # <<<<<<<<<<<<<< * else: * return arr.astype(np.object_) */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_arr); __pyx_r = __pyx_v_arr; goto __pyx_L0; goto __pyx_L4; } /*else*/ { /* "pandas/src/generated.pyx":117 * return arr * else: * return arr.astype(np.object_) # <<<<<<<<<<<<<< * else: * return np.array(arr, dtype=np.object_) */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_arr, __pyx_n_s__astype); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 117; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 117; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s__object_); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 117; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 117; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 117; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; } __pyx_L4:; goto __pyx_L3; } /*else*/ { /* "pandas/src/generated.pyx":119 * return arr.astype(np.object_) * else: * return np.array(arr, dtype=np.object_) # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 119; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s__array); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 119; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 119; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_v_arr); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_arr); __Pyx_GIVEREF(__pyx_v_arr); __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 119; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 119; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s__object_); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 119; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__dtype), __pyx_t_6) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 119; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 119; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_r = __pyx_t_6; __pyx_t_6 = 0; goto __pyx_L0; } __pyx_L3:; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("pandas.algos.ensure_object", __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_5algos_101ensure_object(PyObject *__pyx_self, PyObject *__pyx_v_arr); /*proto*/ static PyObject *__pyx_pw_6pandas_5algos_101ensure_object(PyObject *__pyx_self, PyObject *__pyx_v_arr) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("ensure_object (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_5algos_100ensure_object(__pyx_self, ((PyObject *)__pyx_v_arr)); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":112 * * * cpdef ensure_object(object arr): # <<<<<<<<<<<<<< * if util.is_array(arr): * if ( arr).descr.type_num == NPY_OBJECT: */ static PyObject *__pyx_pf_6pandas_5algos_100ensure_object(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_arr) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("ensure_object", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_6pandas_5algos_ensure_object(__pyx_v_arr, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 112; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas.algos.ensure_object", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":124 * @cython.wraparound(False) * @cython.boundscheck(False) * cpdef map_indices_float64(ndarray[float64_t] index): # <<<<<<<<<<<<<< * ''' * Produce a dict mapping the values of the input array to their respective */ static PyObject *__pyx_pw_6pandas_5algos_103map_indices_float64(PyObject *__pyx_self, PyObject *__pyx_v_index); /*proto*/ static PyObject *__pyx_f_6pandas_5algos_map_indices_float64(PyArrayObject *__pyx_v_index, CYTHON_UNUSED int __pyx_skip_dispatch) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_length; PyObject *__pyx_v_result = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_index; __Pyx_Buffer __pyx_pybuffer_index; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; Py_ssize_t __pyx_t_2; Py_ssize_t __pyx_t_3; Py_ssize_t __pyx_t_4; PyObject *__pyx_t_5 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("map_indices_float64", 0); __pyx_pybuffer_index.pybuffer.buf = NULL; __pyx_pybuffer_index.refcount = 0; __pyx_pybuffernd_index.data = NULL; __pyx_pybuffernd_index.rcbuffer = &__pyx_pybuffer_index; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_index.rcbuffer->pybuffer, (PyObject*)__pyx_v_index, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 124; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_index.diminfo[0].strides = __pyx_pybuffernd_index.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_index.diminfo[0].shape = __pyx_pybuffernd_index.rcbuffer->pybuffer.shape[0]; /* "pandas/src/generated.pyx":135 * ''' * cdef Py_ssize_t i, length * cdef dict result = {} # <<<<<<<<<<<<<< * * length = len(index) */ __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 135; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_v_result = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/generated.pyx":137 * cdef dict result = {} * * length = len(index) # <<<<<<<<<<<<<< * * for i in range(length): */ __pyx_t_2 = PyObject_Length(((PyObject *)__pyx_v_index)); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 137; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_length = __pyx_t_2; /* "pandas/src/generated.pyx":139 * length = len(index) * * for i in range(length): # <<<<<<<<<<<<<< * result[index[i]] = i * */ __pyx_t_2 = __pyx_v_length; for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) { __pyx_v_i = __pyx_t_3; /* "pandas/src/generated.pyx":140 * * for i in range(length): * result[index[i]] = i # <<<<<<<<<<<<<< * * return result */ __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_i); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 140; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = __pyx_v_i; __pyx_t_5 = PyFloat_FromDouble((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_index.rcbuffer->pybuffer.buf, __pyx_t_4, __pyx_pybuffernd_index.diminfo[0].strides))); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 140; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); if (PyDict_SetItem(((PyObject *)__pyx_v_result), __pyx_t_5, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 140; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } /* "pandas/src/generated.pyx":142 * result[index[i]] = i * * return result # <<<<<<<<<<<<<< * * @cython.wraparound(False) */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_result)); __pyx_r = ((PyObject *)__pyx_v_result); goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_5); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_index.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.map_indices_float64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_index.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF(__pyx_v_result); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_103map_indices_float64(PyObject *__pyx_self, PyObject *__pyx_v_index); /*proto*/ static char __pyx_doc_6pandas_5algos_102map_indices_float64[] = "\n Produce a dict mapping the values of the input array to their respective\n locations.\n\n Example:\n array(['hi', 'there']) --> {'hi' : 0 , 'there' : 1}\n\n Better to do this with Cython because of the enormous speed boost.\n "; static PyObject *__pyx_pw_6pandas_5algos_103map_indices_float64(PyObject *__pyx_self, PyObject *__pyx_v_index) { CYTHON_UNUSED int __pyx_lineno = 0; CYTHON_UNUSED const char *__pyx_filename = NULL; CYTHON_UNUSED int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("map_indices_float64 (wrapper)", 0); if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_index), __pyx_ptype_5numpy_ndarray, 1, "index", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 124; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_102map_indices_float64(__pyx_self, ((PyArrayObject *)__pyx_v_index)); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":124 * @cython.wraparound(False) * @cython.boundscheck(False) * cpdef map_indices_float64(ndarray[float64_t] index): # <<<<<<<<<<<<<< * ''' * Produce a dict mapping the values of the input array to their respective */ static PyObject *__pyx_pf_6pandas_5algos_102map_indices_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_index) { __Pyx_LocalBuf_ND __pyx_pybuffernd_index; __Pyx_Buffer __pyx_pybuffer_index; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("map_indices_float64", 0); __pyx_pybuffer_index.pybuffer.buf = NULL; __pyx_pybuffer_index.refcount = 0; __pyx_pybuffernd_index.data = NULL; __pyx_pybuffernd_index.rcbuffer = &__pyx_pybuffer_index; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_index.rcbuffer->pybuffer, (PyObject*)__pyx_v_index, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 124; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_index.diminfo[0].strides = __pyx_pybuffernd_index.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_index.diminfo[0].shape = __pyx_pybuffernd_index.rcbuffer->pybuffer.shape[0]; __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_6pandas_5algos_map_indices_float64(__pyx_v_index, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 124; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_index.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.map_indices_float64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_index.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":146 * @cython.wraparound(False) * @cython.boundscheck(False) * cpdef map_indices_float32(ndarray[float32_t] index): # <<<<<<<<<<<<<< * ''' * Produce a dict mapping the values of the input array to their respective */ static PyObject *__pyx_pw_6pandas_5algos_105map_indices_float32(PyObject *__pyx_self, PyObject *__pyx_v_index); /*proto*/ static PyObject *__pyx_f_6pandas_5algos_map_indices_float32(PyArrayObject *__pyx_v_index, CYTHON_UNUSED int __pyx_skip_dispatch) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_length; PyObject *__pyx_v_result = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_index; __Pyx_Buffer __pyx_pybuffer_index; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; Py_ssize_t __pyx_t_2; Py_ssize_t __pyx_t_3; Py_ssize_t __pyx_t_4; PyObject *__pyx_t_5 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("map_indices_float32", 0); __pyx_pybuffer_index.pybuffer.buf = NULL; __pyx_pybuffer_index.refcount = 0; __pyx_pybuffernd_index.data = NULL; __pyx_pybuffernd_index.rcbuffer = &__pyx_pybuffer_index; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_index.rcbuffer->pybuffer, (PyObject*)__pyx_v_index, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 146; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_index.diminfo[0].strides = __pyx_pybuffernd_index.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_index.diminfo[0].shape = __pyx_pybuffernd_index.rcbuffer->pybuffer.shape[0]; /* "pandas/src/generated.pyx":157 * ''' * cdef Py_ssize_t i, length * cdef dict result = {} # <<<<<<<<<<<<<< * * length = len(index) */ __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_v_result = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/generated.pyx":159 * cdef dict result = {} * * length = len(index) # <<<<<<<<<<<<<< * * for i in range(length): */ __pyx_t_2 = PyObject_Length(((PyObject *)__pyx_v_index)); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 159; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_length = __pyx_t_2; /* "pandas/src/generated.pyx":161 * length = len(index) * * for i in range(length): # <<<<<<<<<<<<<< * result[index[i]] = i * */ __pyx_t_2 = __pyx_v_length; for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) { __pyx_v_i = __pyx_t_3; /* "pandas/src/generated.pyx":162 * * for i in range(length): * result[index[i]] = i # <<<<<<<<<<<<<< * * return result */ __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_i); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 162; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = __pyx_v_i; __pyx_t_5 = PyFloat_FromDouble((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_index.rcbuffer->pybuffer.buf, __pyx_t_4, __pyx_pybuffernd_index.diminfo[0].strides))); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 162; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); if (PyDict_SetItem(((PyObject *)__pyx_v_result), __pyx_t_5, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 162; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } /* "pandas/src/generated.pyx":164 * result[index[i]] = i * * return result # <<<<<<<<<<<<<< * * @cython.wraparound(False) */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_result)); __pyx_r = ((PyObject *)__pyx_v_result); goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_5); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_index.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.map_indices_float32", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_index.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF(__pyx_v_result); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_105map_indices_float32(PyObject *__pyx_self, PyObject *__pyx_v_index); /*proto*/ static char __pyx_doc_6pandas_5algos_104map_indices_float32[] = "\n Produce a dict mapping the values of the input array to their respective\n locations.\n\n Example:\n array(['hi', 'there']) --> {'hi' : 0 , 'there' : 1}\n\n Better to do this with Cython because of the enormous speed boost.\n "; static PyObject *__pyx_pw_6pandas_5algos_105map_indices_float32(PyObject *__pyx_self, PyObject *__pyx_v_index) { CYTHON_UNUSED int __pyx_lineno = 0; CYTHON_UNUSED const char *__pyx_filename = NULL; CYTHON_UNUSED int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("map_indices_float32 (wrapper)", 0); if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_index), __pyx_ptype_5numpy_ndarray, 1, "index", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 146; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_104map_indices_float32(__pyx_self, ((PyArrayObject *)__pyx_v_index)); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":146 * @cython.wraparound(False) * @cython.boundscheck(False) * cpdef map_indices_float32(ndarray[float32_t] index): # <<<<<<<<<<<<<< * ''' * Produce a dict mapping the values of the input array to their respective */ static PyObject *__pyx_pf_6pandas_5algos_104map_indices_float32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_index) { __Pyx_LocalBuf_ND __pyx_pybuffernd_index; __Pyx_Buffer __pyx_pybuffer_index; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("map_indices_float32", 0); __pyx_pybuffer_index.pybuffer.buf = NULL; __pyx_pybuffer_index.refcount = 0; __pyx_pybuffernd_index.data = NULL; __pyx_pybuffernd_index.rcbuffer = &__pyx_pybuffer_index; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_index.rcbuffer->pybuffer, (PyObject*)__pyx_v_index, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 146; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_index.diminfo[0].strides = __pyx_pybuffernd_index.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_index.diminfo[0].shape = __pyx_pybuffernd_index.rcbuffer->pybuffer.shape[0]; __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_6pandas_5algos_map_indices_float32(__pyx_v_index, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 146; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_index.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.map_indices_float32", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_index.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":168 * @cython.wraparound(False) * @cython.boundscheck(False) * cpdef map_indices_object(ndarray[object] index): # <<<<<<<<<<<<<< * ''' * Produce a dict mapping the values of the input array to their respective */ static PyObject *__pyx_pw_6pandas_5algos_107map_indices_object(PyObject *__pyx_self, PyObject *__pyx_v_index); /*proto*/ static PyObject *__pyx_f_6pandas_5algos_map_indices_object(PyArrayObject *__pyx_v_index, CYTHON_UNUSED int __pyx_skip_dispatch) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_length; PyObject *__pyx_v_result = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_index; __Pyx_Buffer __pyx_pybuffer_index; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; Py_ssize_t __pyx_t_2; Py_ssize_t __pyx_t_3; PyObject *__pyx_t_4 = NULL; Py_ssize_t __pyx_t_5; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("map_indices_object", 0); __pyx_pybuffer_index.pybuffer.buf = NULL; __pyx_pybuffer_index.refcount = 0; __pyx_pybuffernd_index.data = NULL; __pyx_pybuffernd_index.rcbuffer = &__pyx_pybuffer_index; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_index.rcbuffer->pybuffer, (PyObject*)__pyx_v_index, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_index.diminfo[0].strides = __pyx_pybuffernd_index.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_index.diminfo[0].shape = __pyx_pybuffernd_index.rcbuffer->pybuffer.shape[0]; /* "pandas/src/generated.pyx":179 * ''' * cdef Py_ssize_t i, length * cdef dict result = {} # <<<<<<<<<<<<<< * * length = len(index) */ __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 179; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_v_result = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/generated.pyx":181 * cdef dict result = {} * * length = len(index) # <<<<<<<<<<<<<< * * for i in range(length): */ __pyx_t_2 = PyObject_Length(((PyObject *)__pyx_v_index)); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 181; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_length = __pyx_t_2; /* "pandas/src/generated.pyx":183 * length = len(index) * * for i in range(length): # <<<<<<<<<<<<<< * result[index[i]] = i * */ __pyx_t_2 = __pyx_v_length; for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) { __pyx_v_i = __pyx_t_3; /* "pandas/src/generated.pyx":184 * * for i in range(length): * result[index[i]] = i # <<<<<<<<<<<<<< * * return result */ __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_i); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 184; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_5 = __pyx_v_i; __pyx_t_4 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_index.rcbuffer->pybuffer.buf, __pyx_t_5, __pyx_pybuffernd_index.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_4); if (PyDict_SetItem(((PyObject *)__pyx_v_result), __pyx_t_4, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 184; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } /* "pandas/src/generated.pyx":186 * result[index[i]] = i * * return result # <<<<<<<<<<<<<< * * @cython.wraparound(False) */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_result)); __pyx_r = ((PyObject *)__pyx_v_result); goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_4); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_index.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.map_indices_object", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_index.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF(__pyx_v_result); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_107map_indices_object(PyObject *__pyx_self, PyObject *__pyx_v_index); /*proto*/ static char __pyx_doc_6pandas_5algos_106map_indices_object[] = "\n Produce a dict mapping the values of the input array to their respective\n locations.\n\n Example:\n array(['hi', 'there']) --> {'hi' : 0 , 'there' : 1}\n\n Better to do this with Cython because of the enormous speed boost.\n "; static PyObject *__pyx_pw_6pandas_5algos_107map_indices_object(PyObject *__pyx_self, PyObject *__pyx_v_index) { CYTHON_UNUSED int __pyx_lineno = 0; CYTHON_UNUSED const char *__pyx_filename = NULL; CYTHON_UNUSED int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("map_indices_object (wrapper)", 0); if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_index), __pyx_ptype_5numpy_ndarray, 1, "index", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_106map_indices_object(__pyx_self, ((PyArrayObject *)__pyx_v_index)); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":168 * @cython.wraparound(False) * @cython.boundscheck(False) * cpdef map_indices_object(ndarray[object] index): # <<<<<<<<<<<<<< * ''' * Produce a dict mapping the values of the input array to their respective */ static PyObject *__pyx_pf_6pandas_5algos_106map_indices_object(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_index) { __Pyx_LocalBuf_ND __pyx_pybuffernd_index; __Pyx_Buffer __pyx_pybuffer_index; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("map_indices_object", 0); __pyx_pybuffer_index.pybuffer.buf = NULL; __pyx_pybuffer_index.refcount = 0; __pyx_pybuffernd_index.data = NULL; __pyx_pybuffernd_index.rcbuffer = &__pyx_pybuffer_index; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_index.rcbuffer->pybuffer, (PyObject*)__pyx_v_index, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_index.diminfo[0].strides = __pyx_pybuffernd_index.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_index.diminfo[0].shape = __pyx_pybuffernd_index.rcbuffer->pybuffer.shape[0]; __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_6pandas_5algos_map_indices_object(__pyx_v_index, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_index.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.map_indices_object", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_index.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":190 * @cython.wraparound(False) * @cython.boundscheck(False) * cpdef map_indices_int32(ndarray[int32_t] index): # <<<<<<<<<<<<<< * ''' * Produce a dict mapping the values of the input array to their respective */ static PyObject *__pyx_pw_6pandas_5algos_109map_indices_int32(PyObject *__pyx_self, PyObject *__pyx_v_index); /*proto*/ static PyObject *__pyx_f_6pandas_5algos_map_indices_int32(PyArrayObject *__pyx_v_index, CYTHON_UNUSED int __pyx_skip_dispatch) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_length; PyObject *__pyx_v_result = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_index; __Pyx_Buffer __pyx_pybuffer_index; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; Py_ssize_t __pyx_t_2; Py_ssize_t __pyx_t_3; Py_ssize_t __pyx_t_4; __pyx_t_5numpy_int32_t __pyx_t_5; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("map_indices_int32", 0); __pyx_pybuffer_index.pybuffer.buf = NULL; __pyx_pybuffer_index.refcount = 0; __pyx_pybuffernd_index.data = NULL; __pyx_pybuffernd_index.rcbuffer = &__pyx_pybuffer_index; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_index.rcbuffer->pybuffer, (PyObject*)__pyx_v_index, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 190; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_index.diminfo[0].strides = __pyx_pybuffernd_index.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_index.diminfo[0].shape = __pyx_pybuffernd_index.rcbuffer->pybuffer.shape[0]; /* "pandas/src/generated.pyx":201 * ''' * cdef Py_ssize_t i, length * cdef dict result = {} # <<<<<<<<<<<<<< * * length = len(index) */ __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 201; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_v_result = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/generated.pyx":203 * cdef dict result = {} * * length = len(index) # <<<<<<<<<<<<<< * * for i in range(length): */ __pyx_t_2 = PyObject_Length(((PyObject *)__pyx_v_index)); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 203; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_length = __pyx_t_2; /* "pandas/src/generated.pyx":205 * length = len(index) * * for i in range(length): # <<<<<<<<<<<<<< * result[index[i]] = i * */ __pyx_t_2 = __pyx_v_length; for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) { __pyx_v_i = __pyx_t_3; /* "pandas/src/generated.pyx":206 * * for i in range(length): * result[index[i]] = i # <<<<<<<<<<<<<< * * return result */ __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_i); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 206; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = __pyx_v_i; __pyx_t_5 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_index.rcbuffer->pybuffer.buf, __pyx_t_4, __pyx_pybuffernd_index.diminfo[0].strides)); if (__Pyx_SetItemInt(((PyObject *)__pyx_v_result), __pyx_t_5, __pyx_t_1, sizeof(__pyx_t_5numpy_int32_t), __Pyx_PyInt_to_py_npy_int32, 0, 0, 0) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 206; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } /* "pandas/src/generated.pyx":208 * result[index[i]] = i * * return result # <<<<<<<<<<<<<< * * @cython.wraparound(False) */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_result)); __pyx_r = ((PyObject *)__pyx_v_result); goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_index.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.map_indices_int32", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_index.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF(__pyx_v_result); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_109map_indices_int32(PyObject *__pyx_self, PyObject *__pyx_v_index); /*proto*/ static char __pyx_doc_6pandas_5algos_108map_indices_int32[] = "\n Produce a dict mapping the values of the input array to their respective\n locations.\n\n Example:\n array(['hi', 'there']) --> {'hi' : 0 , 'there' : 1}\n\n Better to do this with Cython because of the enormous speed boost.\n "; static PyObject *__pyx_pw_6pandas_5algos_109map_indices_int32(PyObject *__pyx_self, PyObject *__pyx_v_index) { CYTHON_UNUSED int __pyx_lineno = 0; CYTHON_UNUSED const char *__pyx_filename = NULL; CYTHON_UNUSED int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("map_indices_int32 (wrapper)", 0); if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_index), __pyx_ptype_5numpy_ndarray, 1, "index", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 190; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_108map_indices_int32(__pyx_self, ((PyArrayObject *)__pyx_v_index)); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":190 * @cython.wraparound(False) * @cython.boundscheck(False) * cpdef map_indices_int32(ndarray[int32_t] index): # <<<<<<<<<<<<<< * ''' * Produce a dict mapping the values of the input array to their respective */ static PyObject *__pyx_pf_6pandas_5algos_108map_indices_int32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_index) { __Pyx_LocalBuf_ND __pyx_pybuffernd_index; __Pyx_Buffer __pyx_pybuffer_index; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("map_indices_int32", 0); __pyx_pybuffer_index.pybuffer.buf = NULL; __pyx_pybuffer_index.refcount = 0; __pyx_pybuffernd_index.data = NULL; __pyx_pybuffernd_index.rcbuffer = &__pyx_pybuffer_index; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_index.rcbuffer->pybuffer, (PyObject*)__pyx_v_index, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 190; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_index.diminfo[0].strides = __pyx_pybuffernd_index.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_index.diminfo[0].shape = __pyx_pybuffernd_index.rcbuffer->pybuffer.shape[0]; __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_6pandas_5algos_map_indices_int32(__pyx_v_index, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 190; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_index.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.map_indices_int32", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_index.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":212 * @cython.wraparound(False) * @cython.boundscheck(False) * cpdef map_indices_int64(ndarray[int64_t] index): # <<<<<<<<<<<<<< * ''' * Produce a dict mapping the values of the input array to their respective */ static PyObject *__pyx_pw_6pandas_5algos_111map_indices_int64(PyObject *__pyx_self, PyObject *__pyx_v_index); /*proto*/ static PyObject *__pyx_f_6pandas_5algos_map_indices_int64(PyArrayObject *__pyx_v_index, CYTHON_UNUSED int __pyx_skip_dispatch) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_length; PyObject *__pyx_v_result = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_index; __Pyx_Buffer __pyx_pybuffer_index; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; Py_ssize_t __pyx_t_2; Py_ssize_t __pyx_t_3; Py_ssize_t __pyx_t_4; __pyx_t_5numpy_int64_t __pyx_t_5; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("map_indices_int64", 0); __pyx_pybuffer_index.pybuffer.buf = NULL; __pyx_pybuffer_index.refcount = 0; __pyx_pybuffernd_index.data = NULL; __pyx_pybuffernd_index.rcbuffer = &__pyx_pybuffer_index; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_index.rcbuffer->pybuffer, (PyObject*)__pyx_v_index, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 212; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_index.diminfo[0].strides = __pyx_pybuffernd_index.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_index.diminfo[0].shape = __pyx_pybuffernd_index.rcbuffer->pybuffer.shape[0]; /* "pandas/src/generated.pyx":223 * ''' * cdef Py_ssize_t i, length * cdef dict result = {} # <<<<<<<<<<<<<< * * length = len(index) */ __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 223; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_v_result = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/generated.pyx":225 * cdef dict result = {} * * length = len(index) # <<<<<<<<<<<<<< * * for i in range(length): */ __pyx_t_2 = PyObject_Length(((PyObject *)__pyx_v_index)); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 225; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_length = __pyx_t_2; /* "pandas/src/generated.pyx":227 * length = len(index) * * for i in range(length): # <<<<<<<<<<<<<< * result[index[i]] = i * */ __pyx_t_2 = __pyx_v_length; for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) { __pyx_v_i = __pyx_t_3; /* "pandas/src/generated.pyx":228 * * for i in range(length): * result[index[i]] = i # <<<<<<<<<<<<<< * * return result */ __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_i); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 228; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = __pyx_v_i; __pyx_t_5 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_index.rcbuffer->pybuffer.buf, __pyx_t_4, __pyx_pybuffernd_index.diminfo[0].strides)); if (__Pyx_SetItemInt(((PyObject *)__pyx_v_result), __pyx_t_5, __pyx_t_1, sizeof(__pyx_t_5numpy_int64_t), __Pyx_PyInt_to_py_npy_int64, 0, 0, 0) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 228; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } /* "pandas/src/generated.pyx":230 * result[index[i]] = i * * return result # <<<<<<<<<<<<<< * * @cython.wraparound(False) */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_result)); __pyx_r = ((PyObject *)__pyx_v_result); goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_index.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.map_indices_int64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_index.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF(__pyx_v_result); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_111map_indices_int64(PyObject *__pyx_self, PyObject *__pyx_v_index); /*proto*/ static char __pyx_doc_6pandas_5algos_110map_indices_int64[] = "\n Produce a dict mapping the values of the input array to their respective\n locations.\n\n Example:\n array(['hi', 'there']) --> {'hi' : 0 , 'there' : 1}\n\n Better to do this with Cython because of the enormous speed boost.\n "; static PyObject *__pyx_pw_6pandas_5algos_111map_indices_int64(PyObject *__pyx_self, PyObject *__pyx_v_index) { CYTHON_UNUSED int __pyx_lineno = 0; CYTHON_UNUSED const char *__pyx_filename = NULL; CYTHON_UNUSED int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("map_indices_int64 (wrapper)", 0); if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_index), __pyx_ptype_5numpy_ndarray, 1, "index", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 212; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_110map_indices_int64(__pyx_self, ((PyArrayObject *)__pyx_v_index)); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":212 * @cython.wraparound(False) * @cython.boundscheck(False) * cpdef map_indices_int64(ndarray[int64_t] index): # <<<<<<<<<<<<<< * ''' * Produce a dict mapping the values of the input array to their respective */ static PyObject *__pyx_pf_6pandas_5algos_110map_indices_int64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_index) { __Pyx_LocalBuf_ND __pyx_pybuffernd_index; __Pyx_Buffer __pyx_pybuffer_index; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("map_indices_int64", 0); __pyx_pybuffer_index.pybuffer.buf = NULL; __pyx_pybuffer_index.refcount = 0; __pyx_pybuffernd_index.data = NULL; __pyx_pybuffernd_index.rcbuffer = &__pyx_pybuffer_index; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_index.rcbuffer->pybuffer, (PyObject*)__pyx_v_index, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 212; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_index.diminfo[0].strides = __pyx_pybuffernd_index.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_index.diminfo[0].shape = __pyx_pybuffernd_index.rcbuffer->pybuffer.shape[0]; __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_6pandas_5algos_map_indices_int64(__pyx_v_index, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 212; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_index.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.map_indices_int64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_index.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":234 * @cython.wraparound(False) * @cython.boundscheck(False) * cpdef map_indices_bool(ndarray[uint8_t] index): # <<<<<<<<<<<<<< * ''' * Produce a dict mapping the values of the input array to their respective */ static PyObject *__pyx_pw_6pandas_5algos_113map_indices_bool(PyObject *__pyx_self, PyObject *__pyx_v_index); /*proto*/ static PyObject *__pyx_f_6pandas_5algos_map_indices_bool(PyArrayObject *__pyx_v_index, CYTHON_UNUSED int __pyx_skip_dispatch) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_length; PyObject *__pyx_v_result = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_index; __Pyx_Buffer __pyx_pybuffer_index; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; Py_ssize_t __pyx_t_2; Py_ssize_t __pyx_t_3; Py_ssize_t __pyx_t_4; __pyx_t_5numpy_uint8_t __pyx_t_5; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("map_indices_bool", 0); __pyx_pybuffer_index.pybuffer.buf = NULL; __pyx_pybuffer_index.refcount = 0; __pyx_pybuffernd_index.data = NULL; __pyx_pybuffernd_index.rcbuffer = &__pyx_pybuffer_index; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_index.rcbuffer->pybuffer, (PyObject*)__pyx_v_index, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 234; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_index.diminfo[0].strides = __pyx_pybuffernd_index.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_index.diminfo[0].shape = __pyx_pybuffernd_index.rcbuffer->pybuffer.shape[0]; /* "pandas/src/generated.pyx":245 * ''' * cdef Py_ssize_t i, length * cdef dict result = {} # <<<<<<<<<<<<<< * * length = len(index) */ __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 245; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_v_result = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/generated.pyx":247 * cdef dict result = {} * * length = len(index) # <<<<<<<<<<<<<< * * for i in range(length): */ __pyx_t_2 = PyObject_Length(((PyObject *)__pyx_v_index)); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 247; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_length = __pyx_t_2; /* "pandas/src/generated.pyx":249 * length = len(index) * * for i in range(length): # <<<<<<<<<<<<<< * result[index[i]] = i * */ __pyx_t_2 = __pyx_v_length; for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) { __pyx_v_i = __pyx_t_3; /* "pandas/src/generated.pyx":250 * * for i in range(length): * result[index[i]] = i # <<<<<<<<<<<<<< * * return result */ __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_i); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 250; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = __pyx_v_i; __pyx_t_5 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_index.rcbuffer->pybuffer.buf, __pyx_t_4, __pyx_pybuffernd_index.diminfo[0].strides)); if (__Pyx_SetItemInt(((PyObject *)__pyx_v_result), __pyx_t_5, __pyx_t_1, sizeof(__pyx_t_5numpy_uint8_t)+1, __Pyx_PyInt_to_py_npy_uint8, 0, 0, 0) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 250; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } /* "pandas/src/generated.pyx":252 * result[index[i]] = i * * return result # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_result)); __pyx_r = ((PyObject *)__pyx_v_result); goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_index.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.map_indices_bool", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_index.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF(__pyx_v_result); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_113map_indices_bool(PyObject *__pyx_self, PyObject *__pyx_v_index); /*proto*/ static char __pyx_doc_6pandas_5algos_112map_indices_bool[] = "\n Produce a dict mapping the values of the input array to their respective\n locations.\n\n Example:\n array(['hi', 'there']) --> {'hi' : 0 , 'there' : 1}\n\n Better to do this with Cython because of the enormous speed boost.\n "; static PyObject *__pyx_pw_6pandas_5algos_113map_indices_bool(PyObject *__pyx_self, PyObject *__pyx_v_index) { CYTHON_UNUSED int __pyx_lineno = 0; CYTHON_UNUSED const char *__pyx_filename = NULL; CYTHON_UNUSED int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("map_indices_bool (wrapper)", 0); if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_index), __pyx_ptype_5numpy_ndarray, 1, "index", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 234; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_112map_indices_bool(__pyx_self, ((PyArrayObject *)__pyx_v_index)); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":234 * @cython.wraparound(False) * @cython.boundscheck(False) * cpdef map_indices_bool(ndarray[uint8_t] index): # <<<<<<<<<<<<<< * ''' * Produce a dict mapping the values of the input array to their respective */ static PyObject *__pyx_pf_6pandas_5algos_112map_indices_bool(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_index) { __Pyx_LocalBuf_ND __pyx_pybuffernd_index; __Pyx_Buffer __pyx_pybuffer_index; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("map_indices_bool", 0); __pyx_pybuffer_index.pybuffer.buf = NULL; __pyx_pybuffer_index.refcount = 0; __pyx_pybuffernd_index.data = NULL; __pyx_pybuffernd_index.rcbuffer = &__pyx_pybuffer_index; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_index.rcbuffer->pybuffer, (PyObject*)__pyx_v_index, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 234; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_index.diminfo[0].strides = __pyx_pybuffernd_index.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_index.diminfo[0].shape = __pyx_pybuffernd_index.rcbuffer->pybuffer.shape[0]; __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_6pandas_5algos_map_indices_bool(__pyx_v_index, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 234; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_index.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.map_indices_bool", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_index.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_115pad_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_115pad_float64 = {__Pyx_NAMESTR("pad_float64"), (PyCFunction)__pyx_pw_6pandas_5algos_115pad_float64, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_115pad_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_old = 0; PyArrayObject *__pyx_v_new = 0; PyObject *__pyx_v_limit = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("pad_float64 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__old,&__pyx_n_s__new,&__pyx_n_s__limit,0}; PyObject* values[3] = {0,0,0}; /* "pandas/src/generated.pyx":258 * @cython.wraparound(False) * def pad_float64(ndarray[float64_t] old, ndarray[float64_t] new, * limit=None): # <<<<<<<<<<<<<< * cdef Py_ssize_t i, j, nleft, nright * cdef ndarray[int64_t, ndim=1] indexer */ values[2] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__old)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__new)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("pad_float64", 0, 2, 3, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 257; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__limit); if (value) { values[2] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "pad_float64") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 257; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_old = ((PyArrayObject *)values[0]); __pyx_v_new = ((PyArrayObject *)values[1]); __pyx_v_limit = values[2]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("pad_float64", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 257; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.pad_float64", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_old), __pyx_ptype_5numpy_ndarray, 1, "old", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 257; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_new), __pyx_ptype_5numpy_ndarray, 1, "new", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 257; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_114pad_float64(__pyx_self, __pyx_v_old, __pyx_v_new, __pyx_v_limit); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":257 * @cython.boundscheck(False) * @cython.wraparound(False) * def pad_float64(ndarray[float64_t] old, ndarray[float64_t] new, # <<<<<<<<<<<<<< * limit=None): * cdef Py_ssize_t i, j, nleft, nright */ static PyObject *__pyx_pf_6pandas_5algos_114pad_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_old, PyArrayObject *__pyx_v_new, PyObject *__pyx_v_limit) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_nleft; Py_ssize_t __pyx_v_nright; PyArrayObject *__pyx_v_indexer = 0; __pyx_t_5numpy_float64_t __pyx_v_cur; __pyx_t_5numpy_float64_t __pyx_v_next; int __pyx_v_lim; int __pyx_v_fill_count; __Pyx_LocalBuf_ND __pyx_pybuffernd_indexer; __Pyx_Buffer __pyx_pybuffer_indexer; __Pyx_LocalBuf_ND __pyx_pybuffernd_new; __Pyx_Buffer __pyx_pybuffer_new; __Pyx_LocalBuf_ND __pyx_pybuffernd_old; __Pyx_Buffer __pyx_pybuffer_old; 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; int __pyx_t_12; int __pyx_t_13; long __pyx_t_14; int __pyx_t_15; int __pyx_t_16; long __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; __pyx_t_5numpy_float64_t __pyx_t_25; Py_ssize_t __pyx_t_26; Py_ssize_t __pyx_t_27; Py_ssize_t __pyx_t_28; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("pad_float64", 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_old.pybuffer.buf = NULL; __pyx_pybuffer_old.refcount = 0; __pyx_pybuffernd_old.data = NULL; __pyx_pybuffernd_old.rcbuffer = &__pyx_pybuffer_old; __pyx_pybuffer_new.pybuffer.buf = NULL; __pyx_pybuffer_new.refcount = 0; __pyx_pybuffernd_new.data = NULL; __pyx_pybuffernd_new.rcbuffer = &__pyx_pybuffer_new; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_old.rcbuffer->pybuffer, (PyObject*)__pyx_v_old, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 257; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_old.diminfo[0].strides = __pyx_pybuffernd_old.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_old.diminfo[0].shape = __pyx_pybuffernd_old.rcbuffer->pybuffer.shape[0]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_new.rcbuffer->pybuffer, (PyObject*)__pyx_v_new, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 257; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_new.diminfo[0].strides = __pyx_pybuffernd_new.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_new.diminfo[0].shape = __pyx_pybuffernd_new.rcbuffer->pybuffer.shape[0]; /* "pandas/src/generated.pyx":262 * cdef ndarray[int64_t, ndim=1] indexer * cdef float64_t cur, next * cdef int lim, fill_count = 0 # <<<<<<<<<<<<<< * * nleft = len(old) */ __pyx_v_fill_count = 0; /* "pandas/src/generated.pyx":264 * cdef int lim, fill_count = 0 * * nleft = len(old) # <<<<<<<<<<<<<< * nright = len(new) * indexer = np.empty(nright, dtype=np.int64) */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_old)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 264; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_nleft = __pyx_t_1; /* "pandas/src/generated.pyx":265 * * nleft = len(old) * nright = len(new) # <<<<<<<<<<<<<< * indexer = np.empty(nright, dtype=np.int64) * indexer.fill(-1) */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_new)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 265; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_nright = __pyx_t_1; /* "pandas/src/generated.pyx":266 * nleft = len(old) * nright = len(new) * indexer = np.empty(nright, dtype=np.int64) # <<<<<<<<<<<<<< * indexer.fill(-1) * */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 266; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 266; __pyx_clineno = __LINE__; goto __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_nright); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 266; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 266; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 266; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_2)); __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 266; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s__int64); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 266; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__dtype), __pyx_t_6) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 266; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 266; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __Pyx_DECREF(((PyObject *)__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_filename = __pyx_f[2]; __pyx_lineno = 266; __pyx_clineno = __LINE__; goto __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_int64_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_int64_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_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_filename = __pyx_f[2]; __pyx_lineno = 266; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_7 = 0; __pyx_v_indexer = ((PyArrayObject *)__pyx_t_6); __pyx_t_6 = 0; /* "pandas/src/generated.pyx":267 * nright = len(new) * indexer = np.empty(nright, dtype=np.int64) * indexer.fill(-1) # <<<<<<<<<<<<<< * * if limit is None: */ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_indexer), __pyx_n_s__fill); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 267; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_2 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_k_tuple_50), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 267; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":269 * indexer.fill(-1) * * if limit is None: # <<<<<<<<<<<<<< * lim = nright * else: */ __pyx_t_12 = (__pyx_v_limit == Py_None); __pyx_t_13 = (__pyx_t_12 != 0); if (__pyx_t_13) { /* "pandas/src/generated.pyx":270 * * if limit is None: * lim = nright # <<<<<<<<<<<<<< * else: * if limit < 0: */ __pyx_v_lim = __pyx_v_nright; goto __pyx_L3; } /*else*/ { /* "pandas/src/generated.pyx":272 * lim = nright * else: * if limit < 0: # <<<<<<<<<<<<<< * raise ValueError('Limit must be non-negative') * lim = limit */ __pyx_t_2 = PyObject_RichCompare(__pyx_v_limit, __pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 272; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_13 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 272; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_13) { /* "pandas/src/generated.pyx":273 * else: * if limit < 0: * raise ValueError('Limit must be non-negative') # <<<<<<<<<<<<<< * lim = limit * */ __pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_52), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 273; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 273; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L4; } __pyx_L4:; /* "pandas/src/generated.pyx":274 * if limit < 0: * raise ValueError('Limit must be non-negative') * lim = limit # <<<<<<<<<<<<<< * * if nleft == 0 or nright == 0 or new[nright - 1] < old[0]: */ __pyx_t_8 = __Pyx_PyInt_AsInt(__pyx_v_limit); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 274; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_lim = __pyx_t_8; } __pyx_L3:; /* "pandas/src/generated.pyx":276 * lim = limit * * if nleft == 0 or nright == 0 or new[nright - 1] < old[0]: # <<<<<<<<<<<<<< * return indexer * */ __pyx_t_13 = ((__pyx_v_nleft == 0) != 0); if (!__pyx_t_13) { __pyx_t_12 = ((__pyx_v_nright == 0) != 0); if (!__pyx_t_12) { __pyx_t_1 = (__pyx_v_nright - 1); __pyx_t_14 = 0; __pyx_t_15 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_new.rcbuffer->pybuffer.buf, __pyx_t_1, __pyx_pybuffernd_new.diminfo[0].strides)) < (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_old.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_old.diminfo[0].strides))) != 0); __pyx_t_16 = __pyx_t_15; } else { __pyx_t_16 = __pyx_t_12; } __pyx_t_12 = __pyx_t_16; } else { __pyx_t_12 = __pyx_t_13; } if (__pyx_t_12) { /* "pandas/src/generated.pyx":277 * * if nleft == 0 or nright == 0 or new[nright - 1] < old[0]: * return indexer # <<<<<<<<<<<<<< * * i = j = 0 */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_indexer)); __pyx_r = ((PyObject *)__pyx_v_indexer); goto __pyx_L0; goto __pyx_L5; } __pyx_L5:; /* "pandas/src/generated.pyx":279 * return indexer * * i = j = 0 # <<<<<<<<<<<<<< * * cur = old[0] */ __pyx_v_i = 0; __pyx_v_j = 0; /* "pandas/src/generated.pyx":281 * i = j = 0 * * cur = old[0] # <<<<<<<<<<<<<< * * while j <= nright - 1 and new[j] < cur: */ __pyx_t_17 = 0; __pyx_v_cur = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_old.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_old.diminfo[0].strides)); /* "pandas/src/generated.pyx":283 * cur = old[0] * * while j <= nright - 1 and new[j] < cur: # <<<<<<<<<<<<<< * j += 1 * */ while (1) { __pyx_t_12 = ((__pyx_v_j <= (__pyx_v_nright - 1)) != 0); if (__pyx_t_12) { __pyx_t_18 = __pyx_v_j; __pyx_t_13 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_new.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_new.diminfo[0].strides)) < __pyx_v_cur) != 0); __pyx_t_16 = __pyx_t_13; } else { __pyx_t_16 = __pyx_t_12; } if (!__pyx_t_16) break; /* "pandas/src/generated.pyx":284 * * while j <= nright - 1 and new[j] < cur: * j += 1 # <<<<<<<<<<<<<< * * while True: */ __pyx_v_j = (__pyx_v_j + 1); } /* "pandas/src/generated.pyx":286 * j += 1 * * while True: # <<<<<<<<<<<<<< * if j == nright: * break */ while (1) { if (!1) break; /* "pandas/src/generated.pyx":287 * * while True: * if j == nright: # <<<<<<<<<<<<<< * break * */ __pyx_t_16 = ((__pyx_v_j == __pyx_v_nright) != 0); if (__pyx_t_16) { /* "pandas/src/generated.pyx":288 * while True: * if j == nright: * break # <<<<<<<<<<<<<< * * if i == nleft - 1: */ goto __pyx_L9_break; goto __pyx_L10; } __pyx_L10:; /* "pandas/src/generated.pyx":290 * break * * if i == nleft - 1: # <<<<<<<<<<<<<< * while j < nright: * if new[j] == cur: */ __pyx_t_16 = ((__pyx_v_i == (__pyx_v_nleft - 1)) != 0); if (__pyx_t_16) { /* "pandas/src/generated.pyx":291 * * if i == nleft - 1: * while j < nright: # <<<<<<<<<<<<<< * if new[j] == cur: * indexer[j] = i */ while (1) { __pyx_t_16 = ((__pyx_v_j < __pyx_v_nright) != 0); if (!__pyx_t_16) break; /* "pandas/src/generated.pyx":292 * if i == nleft - 1: * while j < nright: * if new[j] == cur: # <<<<<<<<<<<<<< * indexer[j] = i * elif new[j] > cur and fill_count < lim: */ __pyx_t_19 = __pyx_v_j; __pyx_t_16 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_new.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_new.diminfo[0].strides)) == __pyx_v_cur) != 0); if (__pyx_t_16) { /* "pandas/src/generated.pyx":293 * while j < nright: * if new[j] == cur: * indexer[j] = i # <<<<<<<<<<<<<< * elif new[j] > cur and fill_count < lim: * indexer[j] = i */ __pyx_t_20 = __pyx_v_j; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_indexer.diminfo[0].strides) = __pyx_v_i; goto __pyx_L14; } /* "pandas/src/generated.pyx":294 * if new[j] == cur: * indexer[j] = i * elif new[j] > cur and fill_count < lim: # <<<<<<<<<<<<<< * indexer[j] = i * fill_count += 1 */ __pyx_t_21 = __pyx_v_j; __pyx_t_16 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_new.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_new.diminfo[0].strides)) > __pyx_v_cur) != 0); if (__pyx_t_16) { __pyx_t_12 = ((__pyx_v_fill_count < __pyx_v_lim) != 0); __pyx_t_13 = __pyx_t_12; } else { __pyx_t_13 = __pyx_t_16; } if (__pyx_t_13) { /* "pandas/src/generated.pyx":295 * indexer[j] = i * elif new[j] > cur and fill_count < lim: * indexer[j] = i # <<<<<<<<<<<<<< * fill_count += 1 * j += 1 */ __pyx_t_22 = __pyx_v_j; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_22, __pyx_pybuffernd_indexer.diminfo[0].strides) = __pyx_v_i; /* "pandas/src/generated.pyx":296 * elif new[j] > cur and fill_count < lim: * indexer[j] = i * fill_count += 1 # <<<<<<<<<<<<<< * j += 1 * break */ __pyx_v_fill_count = (__pyx_v_fill_count + 1); goto __pyx_L14; } __pyx_L14:; /* "pandas/src/generated.pyx":297 * indexer[j] = i * fill_count += 1 * j += 1 # <<<<<<<<<<<<<< * break * */ __pyx_v_j = (__pyx_v_j + 1); } /* "pandas/src/generated.pyx":298 * fill_count += 1 * j += 1 * break # <<<<<<<<<<<<<< * * next = old[i + 1] */ goto __pyx_L9_break; goto __pyx_L11; } __pyx_L11:; /* "pandas/src/generated.pyx":300 * break * * next = old[i + 1] # <<<<<<<<<<<<<< * * while j < nright and cur <= new[j] < next: */ __pyx_t_23 = (__pyx_v_i + 1); __pyx_v_next = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_old.rcbuffer->pybuffer.buf, __pyx_t_23, __pyx_pybuffernd_old.diminfo[0].strides)); /* "pandas/src/generated.pyx":302 * next = old[i + 1] * * while j < nright and cur <= new[j] < next: # <<<<<<<<<<<<<< * if new[j] == cur: * indexer[j] = i */ while (1) { __pyx_t_13 = ((__pyx_v_j < __pyx_v_nright) != 0); if (__pyx_t_13) { __pyx_t_24 = __pyx_v_j; __pyx_t_25 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_new.rcbuffer->pybuffer.buf, __pyx_t_24, __pyx_pybuffernd_new.diminfo[0].strides)); __pyx_t_16 = (__pyx_v_cur <= __pyx_t_25); if (__pyx_t_16) { __pyx_t_16 = (__pyx_t_25 < __pyx_v_next); } __pyx_t_12 = (__pyx_t_16 != 0); } else { __pyx_t_12 = __pyx_t_13; } if (!__pyx_t_12) break; /* "pandas/src/generated.pyx":303 * * while j < nright and cur <= new[j] < next: * if new[j] == cur: # <<<<<<<<<<<<<< * indexer[j] = i * elif fill_count < lim: */ __pyx_t_26 = __pyx_v_j; __pyx_t_12 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_new.rcbuffer->pybuffer.buf, __pyx_t_26, __pyx_pybuffernd_new.diminfo[0].strides)) == __pyx_v_cur) != 0); if (__pyx_t_12) { /* "pandas/src/generated.pyx":304 * while j < nright and cur <= new[j] < next: * if new[j] == cur: * indexer[j] = i # <<<<<<<<<<<<<< * elif fill_count < lim: * indexer[j] = i */ __pyx_t_27 = __pyx_v_j; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_27, __pyx_pybuffernd_indexer.diminfo[0].strides) = __pyx_v_i; goto __pyx_L17; } /* "pandas/src/generated.pyx":305 * if new[j] == cur: * indexer[j] = i * elif fill_count < lim: # <<<<<<<<<<<<<< * indexer[j] = i * fill_count += 1 */ __pyx_t_12 = ((__pyx_v_fill_count < __pyx_v_lim) != 0); if (__pyx_t_12) { /* "pandas/src/generated.pyx":306 * indexer[j] = i * elif fill_count < lim: * indexer[j] = i # <<<<<<<<<<<<<< * fill_count += 1 * j += 1 */ __pyx_t_28 = __pyx_v_j; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_28, __pyx_pybuffernd_indexer.diminfo[0].strides) = __pyx_v_i; /* "pandas/src/generated.pyx":307 * elif fill_count < lim: * indexer[j] = i * fill_count += 1 # <<<<<<<<<<<<<< * j += 1 * */ __pyx_v_fill_count = (__pyx_v_fill_count + 1); goto __pyx_L17; } __pyx_L17:; /* "pandas/src/generated.pyx":308 * indexer[j] = i * fill_count += 1 * j += 1 # <<<<<<<<<<<<<< * * fill_count = 0 */ __pyx_v_j = (__pyx_v_j + 1); } /* "pandas/src/generated.pyx":310 * j += 1 * * fill_count = 0 # <<<<<<<<<<<<<< * i += 1 * cur = next */ __pyx_v_fill_count = 0; /* "pandas/src/generated.pyx":311 * * fill_count = 0 * i += 1 # <<<<<<<<<<<<<< * cur = next * */ __pyx_v_i = (__pyx_v_i + 1); /* "pandas/src/generated.pyx":312 * fill_count = 0 * i += 1 * cur = next # <<<<<<<<<<<<<< * * return indexer */ __pyx_v_cur = __pyx_v_next; } __pyx_L9_break:; /* "pandas/src/generated.pyx":314 * cur = next * * return indexer # <<<<<<<<<<<<<< * * @cython.boundscheck(False) */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_indexer)); __pyx_r = ((PyObject *)__pyx_v_indexer); goto __pyx_L0; __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_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_new.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_old.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.pad_float64", __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_new.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_old.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_indexer); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_117pad_float32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_117pad_float32 = {__Pyx_NAMESTR("pad_float32"), (PyCFunction)__pyx_pw_6pandas_5algos_117pad_float32, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_117pad_float32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_old = 0; PyArrayObject *__pyx_v_new = 0; PyObject *__pyx_v_limit = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("pad_float32 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__old,&__pyx_n_s__new,&__pyx_n_s__limit,0}; PyObject* values[3] = {0,0,0}; /* "pandas/src/generated.pyx":319 * @cython.wraparound(False) * def pad_float32(ndarray[float32_t] old, ndarray[float32_t] new, * limit=None): # <<<<<<<<<<<<<< * cdef Py_ssize_t i, j, nleft, nright * cdef ndarray[int64_t, ndim=1] indexer */ values[2] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__old)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__new)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("pad_float32", 0, 2, 3, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 318; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__limit); if (value) { values[2] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "pad_float32") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 318; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_old = ((PyArrayObject *)values[0]); __pyx_v_new = ((PyArrayObject *)values[1]); __pyx_v_limit = values[2]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("pad_float32", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 318; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.pad_float32", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_old), __pyx_ptype_5numpy_ndarray, 1, "old", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 318; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_new), __pyx_ptype_5numpy_ndarray, 1, "new", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 318; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_116pad_float32(__pyx_self, __pyx_v_old, __pyx_v_new, __pyx_v_limit); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":318 * @cython.boundscheck(False) * @cython.wraparound(False) * def pad_float32(ndarray[float32_t] old, ndarray[float32_t] new, # <<<<<<<<<<<<<< * limit=None): * cdef Py_ssize_t i, j, nleft, nright */ static PyObject *__pyx_pf_6pandas_5algos_116pad_float32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_old, PyArrayObject *__pyx_v_new, PyObject *__pyx_v_limit) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_nleft; Py_ssize_t __pyx_v_nright; PyArrayObject *__pyx_v_indexer = 0; __pyx_t_5numpy_float32_t __pyx_v_cur; __pyx_t_5numpy_float32_t __pyx_v_next; int __pyx_v_lim; int __pyx_v_fill_count; __Pyx_LocalBuf_ND __pyx_pybuffernd_indexer; __Pyx_Buffer __pyx_pybuffer_indexer; __Pyx_LocalBuf_ND __pyx_pybuffernd_new; __Pyx_Buffer __pyx_pybuffer_new; __Pyx_LocalBuf_ND __pyx_pybuffernd_old; __Pyx_Buffer __pyx_pybuffer_old; 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; int __pyx_t_12; int __pyx_t_13; long __pyx_t_14; int __pyx_t_15; int __pyx_t_16; long __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; __pyx_t_5numpy_float32_t __pyx_t_25; Py_ssize_t __pyx_t_26; Py_ssize_t __pyx_t_27; Py_ssize_t __pyx_t_28; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("pad_float32", 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_old.pybuffer.buf = NULL; __pyx_pybuffer_old.refcount = 0; __pyx_pybuffernd_old.data = NULL; __pyx_pybuffernd_old.rcbuffer = &__pyx_pybuffer_old; __pyx_pybuffer_new.pybuffer.buf = NULL; __pyx_pybuffer_new.refcount = 0; __pyx_pybuffernd_new.data = NULL; __pyx_pybuffernd_new.rcbuffer = &__pyx_pybuffer_new; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_old.rcbuffer->pybuffer, (PyObject*)__pyx_v_old, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 318; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_old.diminfo[0].strides = __pyx_pybuffernd_old.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_old.diminfo[0].shape = __pyx_pybuffernd_old.rcbuffer->pybuffer.shape[0]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_new.rcbuffer->pybuffer, (PyObject*)__pyx_v_new, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 318; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_new.diminfo[0].strides = __pyx_pybuffernd_new.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_new.diminfo[0].shape = __pyx_pybuffernd_new.rcbuffer->pybuffer.shape[0]; /* "pandas/src/generated.pyx":323 * cdef ndarray[int64_t, ndim=1] indexer * cdef float32_t cur, next * cdef int lim, fill_count = 0 # <<<<<<<<<<<<<< * * nleft = len(old) */ __pyx_v_fill_count = 0; /* "pandas/src/generated.pyx":325 * cdef int lim, fill_count = 0 * * nleft = len(old) # <<<<<<<<<<<<<< * nright = len(new) * indexer = np.empty(nright, dtype=np.int64) */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_old)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 325; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_nleft = __pyx_t_1; /* "pandas/src/generated.pyx":326 * * nleft = len(old) * nright = len(new) # <<<<<<<<<<<<<< * indexer = np.empty(nright, dtype=np.int64) * indexer.fill(-1) */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_new)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 326; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_nright = __pyx_t_1; /* "pandas/src/generated.pyx":327 * nleft = len(old) * nright = len(new) * indexer = np.empty(nright, dtype=np.int64) # <<<<<<<<<<<<<< * indexer.fill(-1) * */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 327; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 327; __pyx_clineno = __LINE__; goto __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_nright); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 327; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 327; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 327; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_2)); __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 327; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s__int64); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 327; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__dtype), __pyx_t_6) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 327; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 327; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __Pyx_DECREF(((PyObject *)__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_filename = __pyx_f[2]; __pyx_lineno = 327; __pyx_clineno = __LINE__; goto __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_int64_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_int64_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_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_filename = __pyx_f[2]; __pyx_lineno = 327; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_7 = 0; __pyx_v_indexer = ((PyArrayObject *)__pyx_t_6); __pyx_t_6 = 0; /* "pandas/src/generated.pyx":328 * nright = len(new) * indexer = np.empty(nright, dtype=np.int64) * indexer.fill(-1) # <<<<<<<<<<<<<< * * if limit is None: */ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_indexer), __pyx_n_s__fill); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 328; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_2 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_k_tuple_53), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 328; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":330 * indexer.fill(-1) * * if limit is None: # <<<<<<<<<<<<<< * lim = nright * else: */ __pyx_t_12 = (__pyx_v_limit == Py_None); __pyx_t_13 = (__pyx_t_12 != 0); if (__pyx_t_13) { /* "pandas/src/generated.pyx":331 * * if limit is None: * lim = nright # <<<<<<<<<<<<<< * else: * if limit < 0: */ __pyx_v_lim = __pyx_v_nright; goto __pyx_L3; } /*else*/ { /* "pandas/src/generated.pyx":333 * lim = nright * else: * if limit < 0: # <<<<<<<<<<<<<< * raise ValueError('Limit must be non-negative') * lim = limit */ __pyx_t_2 = PyObject_RichCompare(__pyx_v_limit, __pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 333; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_13 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 333; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_13) { /* "pandas/src/generated.pyx":334 * else: * if limit < 0: * raise ValueError('Limit must be non-negative') # <<<<<<<<<<<<<< * lim = limit * */ __pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_54), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 334; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 334; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L4; } __pyx_L4:; /* "pandas/src/generated.pyx":335 * if limit < 0: * raise ValueError('Limit must be non-negative') * lim = limit # <<<<<<<<<<<<<< * * if nleft == 0 or nright == 0 or new[nright - 1] < old[0]: */ __pyx_t_8 = __Pyx_PyInt_AsInt(__pyx_v_limit); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 335; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_lim = __pyx_t_8; } __pyx_L3:; /* "pandas/src/generated.pyx":337 * lim = limit * * if nleft == 0 or nright == 0 or new[nright - 1] < old[0]: # <<<<<<<<<<<<<< * return indexer * */ __pyx_t_13 = ((__pyx_v_nleft == 0) != 0); if (!__pyx_t_13) { __pyx_t_12 = ((__pyx_v_nright == 0) != 0); if (!__pyx_t_12) { __pyx_t_1 = (__pyx_v_nright - 1); __pyx_t_14 = 0; __pyx_t_15 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_new.rcbuffer->pybuffer.buf, __pyx_t_1, __pyx_pybuffernd_new.diminfo[0].strides)) < (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_old.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_old.diminfo[0].strides))) != 0); __pyx_t_16 = __pyx_t_15; } else { __pyx_t_16 = __pyx_t_12; } __pyx_t_12 = __pyx_t_16; } else { __pyx_t_12 = __pyx_t_13; } if (__pyx_t_12) { /* "pandas/src/generated.pyx":338 * * if nleft == 0 or nright == 0 or new[nright - 1] < old[0]: * return indexer # <<<<<<<<<<<<<< * * i = j = 0 */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_indexer)); __pyx_r = ((PyObject *)__pyx_v_indexer); goto __pyx_L0; goto __pyx_L5; } __pyx_L5:; /* "pandas/src/generated.pyx":340 * return indexer * * i = j = 0 # <<<<<<<<<<<<<< * * cur = old[0] */ __pyx_v_i = 0; __pyx_v_j = 0; /* "pandas/src/generated.pyx":342 * i = j = 0 * * cur = old[0] # <<<<<<<<<<<<<< * * while j <= nright - 1 and new[j] < cur: */ __pyx_t_17 = 0; __pyx_v_cur = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_old.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_old.diminfo[0].strides)); /* "pandas/src/generated.pyx":344 * cur = old[0] * * while j <= nright - 1 and new[j] < cur: # <<<<<<<<<<<<<< * j += 1 * */ while (1) { __pyx_t_12 = ((__pyx_v_j <= (__pyx_v_nright - 1)) != 0); if (__pyx_t_12) { __pyx_t_18 = __pyx_v_j; __pyx_t_13 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_new.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_new.diminfo[0].strides)) < __pyx_v_cur) != 0); __pyx_t_16 = __pyx_t_13; } else { __pyx_t_16 = __pyx_t_12; } if (!__pyx_t_16) break; /* "pandas/src/generated.pyx":345 * * while j <= nright - 1 and new[j] < cur: * j += 1 # <<<<<<<<<<<<<< * * while True: */ __pyx_v_j = (__pyx_v_j + 1); } /* "pandas/src/generated.pyx":347 * j += 1 * * while True: # <<<<<<<<<<<<<< * if j == nright: * break */ while (1) { if (!1) break; /* "pandas/src/generated.pyx":348 * * while True: * if j == nright: # <<<<<<<<<<<<<< * break * */ __pyx_t_16 = ((__pyx_v_j == __pyx_v_nright) != 0); if (__pyx_t_16) { /* "pandas/src/generated.pyx":349 * while True: * if j == nright: * break # <<<<<<<<<<<<<< * * if i == nleft - 1: */ goto __pyx_L9_break; goto __pyx_L10; } __pyx_L10:; /* "pandas/src/generated.pyx":351 * break * * if i == nleft - 1: # <<<<<<<<<<<<<< * while j < nright: * if new[j] == cur: */ __pyx_t_16 = ((__pyx_v_i == (__pyx_v_nleft - 1)) != 0); if (__pyx_t_16) { /* "pandas/src/generated.pyx":352 * * if i == nleft - 1: * while j < nright: # <<<<<<<<<<<<<< * if new[j] == cur: * indexer[j] = i */ while (1) { __pyx_t_16 = ((__pyx_v_j < __pyx_v_nright) != 0); if (!__pyx_t_16) break; /* "pandas/src/generated.pyx":353 * if i == nleft - 1: * while j < nright: * if new[j] == cur: # <<<<<<<<<<<<<< * indexer[j] = i * elif new[j] > cur and fill_count < lim: */ __pyx_t_19 = __pyx_v_j; __pyx_t_16 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_new.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_new.diminfo[0].strides)) == __pyx_v_cur) != 0); if (__pyx_t_16) { /* "pandas/src/generated.pyx":354 * while j < nright: * if new[j] == cur: * indexer[j] = i # <<<<<<<<<<<<<< * elif new[j] > cur and fill_count < lim: * indexer[j] = i */ __pyx_t_20 = __pyx_v_j; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_indexer.diminfo[0].strides) = __pyx_v_i; goto __pyx_L14; } /* "pandas/src/generated.pyx":355 * if new[j] == cur: * indexer[j] = i * elif new[j] > cur and fill_count < lim: # <<<<<<<<<<<<<< * indexer[j] = i * fill_count += 1 */ __pyx_t_21 = __pyx_v_j; __pyx_t_16 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_new.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_new.diminfo[0].strides)) > __pyx_v_cur) != 0); if (__pyx_t_16) { __pyx_t_12 = ((__pyx_v_fill_count < __pyx_v_lim) != 0); __pyx_t_13 = __pyx_t_12; } else { __pyx_t_13 = __pyx_t_16; } if (__pyx_t_13) { /* "pandas/src/generated.pyx":356 * indexer[j] = i * elif new[j] > cur and fill_count < lim: * indexer[j] = i # <<<<<<<<<<<<<< * fill_count += 1 * j += 1 */ __pyx_t_22 = __pyx_v_j; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_22, __pyx_pybuffernd_indexer.diminfo[0].strides) = __pyx_v_i; /* "pandas/src/generated.pyx":357 * elif new[j] > cur and fill_count < lim: * indexer[j] = i * fill_count += 1 # <<<<<<<<<<<<<< * j += 1 * break */ __pyx_v_fill_count = (__pyx_v_fill_count + 1); goto __pyx_L14; } __pyx_L14:; /* "pandas/src/generated.pyx":358 * indexer[j] = i * fill_count += 1 * j += 1 # <<<<<<<<<<<<<< * break * */ __pyx_v_j = (__pyx_v_j + 1); } /* "pandas/src/generated.pyx":359 * fill_count += 1 * j += 1 * break # <<<<<<<<<<<<<< * * next = old[i + 1] */ goto __pyx_L9_break; goto __pyx_L11; } __pyx_L11:; /* "pandas/src/generated.pyx":361 * break * * next = old[i + 1] # <<<<<<<<<<<<<< * * while j < nright and cur <= new[j] < next: */ __pyx_t_23 = (__pyx_v_i + 1); __pyx_v_next = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_old.rcbuffer->pybuffer.buf, __pyx_t_23, __pyx_pybuffernd_old.diminfo[0].strides)); /* "pandas/src/generated.pyx":363 * next = old[i + 1] * * while j < nright and cur <= new[j] < next: # <<<<<<<<<<<<<< * if new[j] == cur: * indexer[j] = i */ while (1) { __pyx_t_13 = ((__pyx_v_j < __pyx_v_nright) != 0); if (__pyx_t_13) { __pyx_t_24 = __pyx_v_j; __pyx_t_25 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_new.rcbuffer->pybuffer.buf, __pyx_t_24, __pyx_pybuffernd_new.diminfo[0].strides)); __pyx_t_16 = (__pyx_v_cur <= __pyx_t_25); if (__pyx_t_16) { __pyx_t_16 = (__pyx_t_25 < __pyx_v_next); } __pyx_t_12 = (__pyx_t_16 != 0); } else { __pyx_t_12 = __pyx_t_13; } if (!__pyx_t_12) break; /* "pandas/src/generated.pyx":364 * * while j < nright and cur <= new[j] < next: * if new[j] == cur: # <<<<<<<<<<<<<< * indexer[j] = i * elif fill_count < lim: */ __pyx_t_26 = __pyx_v_j; __pyx_t_12 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_new.rcbuffer->pybuffer.buf, __pyx_t_26, __pyx_pybuffernd_new.diminfo[0].strides)) == __pyx_v_cur) != 0); if (__pyx_t_12) { /* "pandas/src/generated.pyx":365 * while j < nright and cur <= new[j] < next: * if new[j] == cur: * indexer[j] = i # <<<<<<<<<<<<<< * elif fill_count < lim: * indexer[j] = i */ __pyx_t_27 = __pyx_v_j; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_27, __pyx_pybuffernd_indexer.diminfo[0].strides) = __pyx_v_i; goto __pyx_L17; } /* "pandas/src/generated.pyx":366 * if new[j] == cur: * indexer[j] = i * elif fill_count < lim: # <<<<<<<<<<<<<< * indexer[j] = i * fill_count += 1 */ __pyx_t_12 = ((__pyx_v_fill_count < __pyx_v_lim) != 0); if (__pyx_t_12) { /* "pandas/src/generated.pyx":367 * indexer[j] = i * elif fill_count < lim: * indexer[j] = i # <<<<<<<<<<<<<< * fill_count += 1 * j += 1 */ __pyx_t_28 = __pyx_v_j; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_28, __pyx_pybuffernd_indexer.diminfo[0].strides) = __pyx_v_i; /* "pandas/src/generated.pyx":368 * elif fill_count < lim: * indexer[j] = i * fill_count += 1 # <<<<<<<<<<<<<< * j += 1 * */ __pyx_v_fill_count = (__pyx_v_fill_count + 1); goto __pyx_L17; } __pyx_L17:; /* "pandas/src/generated.pyx":369 * indexer[j] = i * fill_count += 1 * j += 1 # <<<<<<<<<<<<<< * * fill_count = 0 */ __pyx_v_j = (__pyx_v_j + 1); } /* "pandas/src/generated.pyx":371 * j += 1 * * fill_count = 0 # <<<<<<<<<<<<<< * i += 1 * cur = next */ __pyx_v_fill_count = 0; /* "pandas/src/generated.pyx":372 * * fill_count = 0 * i += 1 # <<<<<<<<<<<<<< * cur = next * */ __pyx_v_i = (__pyx_v_i + 1); /* "pandas/src/generated.pyx":373 * fill_count = 0 * i += 1 * cur = next # <<<<<<<<<<<<<< * * return indexer */ __pyx_v_cur = __pyx_v_next; } __pyx_L9_break:; /* "pandas/src/generated.pyx":375 * cur = next * * return indexer # <<<<<<<<<<<<<< * * @cython.boundscheck(False) */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_indexer)); __pyx_r = ((PyObject *)__pyx_v_indexer); goto __pyx_L0; __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_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_new.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_old.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.pad_float32", __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_new.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_old.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_indexer); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_119pad_object(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_119pad_object = {__Pyx_NAMESTR("pad_object"), (PyCFunction)__pyx_pw_6pandas_5algos_119pad_object, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_119pad_object(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_old = 0; PyArrayObject *__pyx_v_new = 0; PyObject *__pyx_v_limit = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("pad_object (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__old,&__pyx_n_s__new,&__pyx_n_s__limit,0}; PyObject* values[3] = {0,0,0}; /* "pandas/src/generated.pyx":380 * @cython.wraparound(False) * def pad_object(ndarray[object] old, ndarray[object] new, * limit=None): # <<<<<<<<<<<<<< * cdef Py_ssize_t i, j, nleft, nright * cdef ndarray[int64_t, ndim=1] indexer */ values[2] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__old)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__new)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("pad_object", 0, 2, 3, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 379; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__limit); if (value) { values[2] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "pad_object") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 379; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_old = ((PyArrayObject *)values[0]); __pyx_v_new = ((PyArrayObject *)values[1]); __pyx_v_limit = values[2]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("pad_object", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 379; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.pad_object", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_old), __pyx_ptype_5numpy_ndarray, 1, "old", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 379; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_new), __pyx_ptype_5numpy_ndarray, 1, "new", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 379; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_118pad_object(__pyx_self, __pyx_v_old, __pyx_v_new, __pyx_v_limit); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":379 * @cython.boundscheck(False) * @cython.wraparound(False) * def pad_object(ndarray[object] old, ndarray[object] new, # <<<<<<<<<<<<<< * limit=None): * cdef Py_ssize_t i, j, nleft, nright */ static PyObject *__pyx_pf_6pandas_5algos_118pad_object(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_old, PyArrayObject *__pyx_v_new, PyObject *__pyx_v_limit) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_nleft; Py_ssize_t __pyx_v_nright; PyArrayObject *__pyx_v_indexer = 0; PyObject *__pyx_v_cur = 0; PyObject *__pyx_v_next = 0; int __pyx_v_lim; int __pyx_v_fill_count; __Pyx_LocalBuf_ND __pyx_pybuffernd_indexer; __Pyx_Buffer __pyx_pybuffer_indexer; __Pyx_LocalBuf_ND __pyx_pybuffernd_new; __Pyx_Buffer __pyx_pybuffer_new; __Pyx_LocalBuf_ND __pyx_pybuffernd_old; __Pyx_Buffer __pyx_pybuffer_old; 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; int __pyx_t_12; int __pyx_t_13; long __pyx_t_14; int __pyx_t_15; int __pyx_t_16; long __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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("pad_object", 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_old.pybuffer.buf = NULL; __pyx_pybuffer_old.refcount = 0; __pyx_pybuffernd_old.data = NULL; __pyx_pybuffernd_old.rcbuffer = &__pyx_pybuffer_old; __pyx_pybuffer_new.pybuffer.buf = NULL; __pyx_pybuffer_new.refcount = 0; __pyx_pybuffernd_new.data = NULL; __pyx_pybuffernd_new.rcbuffer = &__pyx_pybuffer_new; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_old.rcbuffer->pybuffer, (PyObject*)__pyx_v_old, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 379; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_old.diminfo[0].strides = __pyx_pybuffernd_old.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_old.diminfo[0].shape = __pyx_pybuffernd_old.rcbuffer->pybuffer.shape[0]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_new.rcbuffer->pybuffer, (PyObject*)__pyx_v_new, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 379; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_new.diminfo[0].strides = __pyx_pybuffernd_new.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_new.diminfo[0].shape = __pyx_pybuffernd_new.rcbuffer->pybuffer.shape[0]; /* "pandas/src/generated.pyx":384 * cdef ndarray[int64_t, ndim=1] indexer * cdef object cur, next * cdef int lim, fill_count = 0 # <<<<<<<<<<<<<< * * nleft = len(old) */ __pyx_v_fill_count = 0; /* "pandas/src/generated.pyx":386 * cdef int lim, fill_count = 0 * * nleft = len(old) # <<<<<<<<<<<<<< * nright = len(new) * indexer = np.empty(nright, dtype=np.int64) */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_old)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 386; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_nleft = __pyx_t_1; /* "pandas/src/generated.pyx":387 * * nleft = len(old) * nright = len(new) # <<<<<<<<<<<<<< * indexer = np.empty(nright, dtype=np.int64) * indexer.fill(-1) */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_new)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 387; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_nright = __pyx_t_1; /* "pandas/src/generated.pyx":388 * nleft = len(old) * nright = len(new) * indexer = np.empty(nright, dtype=np.int64) # <<<<<<<<<<<<<< * indexer.fill(-1) * */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 388; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 388; __pyx_clineno = __LINE__; goto __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_nright); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 388; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 388; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 388; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_2)); __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 388; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s__int64); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 388; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__dtype), __pyx_t_6) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 388; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 388; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __Pyx_DECREF(((PyObject *)__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_filename = __pyx_f[2]; __pyx_lineno = 388; __pyx_clineno = __LINE__; goto __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_int64_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_int64_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_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_filename = __pyx_f[2]; __pyx_lineno = 388; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_7 = 0; __pyx_v_indexer = ((PyArrayObject *)__pyx_t_6); __pyx_t_6 = 0; /* "pandas/src/generated.pyx":389 * nright = len(new) * indexer = np.empty(nright, dtype=np.int64) * indexer.fill(-1) # <<<<<<<<<<<<<< * * if limit is None: */ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_indexer), __pyx_n_s__fill); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 389; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_2 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_k_tuple_55), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 389; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":391 * indexer.fill(-1) * * if limit is None: # <<<<<<<<<<<<<< * lim = nright * else: */ __pyx_t_12 = (__pyx_v_limit == Py_None); __pyx_t_13 = (__pyx_t_12 != 0); if (__pyx_t_13) { /* "pandas/src/generated.pyx":392 * * if limit is None: * lim = nright # <<<<<<<<<<<<<< * else: * if limit < 0: */ __pyx_v_lim = __pyx_v_nright; goto __pyx_L3; } /*else*/ { /* "pandas/src/generated.pyx":394 * lim = nright * else: * if limit < 0: # <<<<<<<<<<<<<< * raise ValueError('Limit must be non-negative') * lim = limit */ __pyx_t_2 = PyObject_RichCompare(__pyx_v_limit, __pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 394; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_13 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 394; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_13) { /* "pandas/src/generated.pyx":395 * else: * if limit < 0: * raise ValueError('Limit must be non-negative') # <<<<<<<<<<<<<< * lim = limit * */ __pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_56), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 395; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 395; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L4; } __pyx_L4:; /* "pandas/src/generated.pyx":396 * if limit < 0: * raise ValueError('Limit must be non-negative') * lim = limit # <<<<<<<<<<<<<< * * if nleft == 0 or nright == 0 or new[nright - 1] < old[0]: */ __pyx_t_8 = __Pyx_PyInt_AsInt(__pyx_v_limit); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 396; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_lim = __pyx_t_8; } __pyx_L3:; /* "pandas/src/generated.pyx":398 * lim = limit * * if nleft == 0 or nright == 0 or new[nright - 1] < old[0]: # <<<<<<<<<<<<<< * return indexer * */ __pyx_t_13 = (__pyx_v_nleft == 0); if (!__pyx_t_13) { __pyx_t_12 = (__pyx_v_nright == 0); if (!__pyx_t_12) { __pyx_t_1 = (__pyx_v_nright - 1); __pyx_t_2 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_new.rcbuffer->pybuffer.buf, __pyx_t_1, __pyx_pybuffernd_new.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_2); __pyx_t_14 = 0; __pyx_t_6 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_old.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_old.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_6); __pyx_t_4 = PyObject_RichCompare(__pyx_t_2, __pyx_t_6, Py_LT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 398; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_15 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_15 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 398; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_16 = __pyx_t_15; } else { __pyx_t_16 = __pyx_t_12; } __pyx_t_12 = __pyx_t_16; } else { __pyx_t_12 = __pyx_t_13; } if (__pyx_t_12) { /* "pandas/src/generated.pyx":399 * * if nleft == 0 or nright == 0 or new[nright - 1] < old[0]: * return indexer # <<<<<<<<<<<<<< * * i = j = 0 */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_indexer)); __pyx_r = ((PyObject *)__pyx_v_indexer); goto __pyx_L0; goto __pyx_L5; } __pyx_L5:; /* "pandas/src/generated.pyx":401 * return indexer * * i = j = 0 # <<<<<<<<<<<<<< * * cur = old[0] */ __pyx_v_i = 0; __pyx_v_j = 0; /* "pandas/src/generated.pyx":403 * i = j = 0 * * cur = old[0] # <<<<<<<<<<<<<< * * while j <= nright - 1 and new[j] < cur: */ __pyx_t_17 = 0; __pyx_t_4 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_old.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_old.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_4); __pyx_v_cur = __pyx_t_4; __pyx_t_4 = 0; /* "pandas/src/generated.pyx":405 * cur = old[0] * * while j <= nright - 1 and new[j] < cur: # <<<<<<<<<<<<<< * j += 1 * */ while (1) { __pyx_t_12 = (__pyx_v_j <= (__pyx_v_nright - 1)); if (__pyx_t_12) { __pyx_t_18 = __pyx_v_j; __pyx_t_4 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_new.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_new.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_4); __pyx_t_6 = PyObject_RichCompare(__pyx_t_4, __pyx_v_cur, Py_LT); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 405; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_13 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 405; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_16 = __pyx_t_13; } else { __pyx_t_16 = __pyx_t_12; } if (!__pyx_t_16) break; /* "pandas/src/generated.pyx":406 * * while j <= nright - 1 and new[j] < cur: * j += 1 # <<<<<<<<<<<<<< * * while True: */ __pyx_v_j = (__pyx_v_j + 1); } /* "pandas/src/generated.pyx":408 * j += 1 * * while True: # <<<<<<<<<<<<<< * if j == nright: * break */ while (1) { if (!1) break; /* "pandas/src/generated.pyx":409 * * while True: * if j == nright: # <<<<<<<<<<<<<< * break * */ __pyx_t_16 = ((__pyx_v_j == __pyx_v_nright) != 0); if (__pyx_t_16) { /* "pandas/src/generated.pyx":410 * while True: * if j == nright: * break # <<<<<<<<<<<<<< * * if i == nleft - 1: */ goto __pyx_L9_break; goto __pyx_L10; } __pyx_L10:; /* "pandas/src/generated.pyx":412 * break * * if i == nleft - 1: # <<<<<<<<<<<<<< * while j < nright: * if new[j] == cur: */ __pyx_t_16 = ((__pyx_v_i == (__pyx_v_nleft - 1)) != 0); if (__pyx_t_16) { /* "pandas/src/generated.pyx":413 * * if i == nleft - 1: * while j < nright: # <<<<<<<<<<<<<< * if new[j] == cur: * indexer[j] = i */ while (1) { __pyx_t_16 = ((__pyx_v_j < __pyx_v_nright) != 0); if (!__pyx_t_16) break; /* "pandas/src/generated.pyx":414 * if i == nleft - 1: * while j < nright: * if new[j] == cur: # <<<<<<<<<<<<<< * indexer[j] = i * elif new[j] > cur and fill_count < lim: */ __pyx_t_19 = __pyx_v_j; __pyx_t_6 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_new.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_new.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_6); __pyx_t_4 = PyObject_RichCompare(__pyx_t_6, __pyx_v_cur, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 414; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_16 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_16 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 414; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_16) { /* "pandas/src/generated.pyx":415 * while j < nright: * if new[j] == cur: * indexer[j] = i # <<<<<<<<<<<<<< * elif new[j] > cur and fill_count < lim: * indexer[j] = i */ __pyx_t_20 = __pyx_v_j; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_indexer.diminfo[0].strides) = __pyx_v_i; goto __pyx_L14; } /* "pandas/src/generated.pyx":416 * if new[j] == cur: * indexer[j] = i * elif new[j] > cur and fill_count < lim: # <<<<<<<<<<<<<< * indexer[j] = i * fill_count += 1 */ __pyx_t_21 = __pyx_v_j; __pyx_t_4 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_new.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_new.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_4); __pyx_t_6 = PyObject_RichCompare(__pyx_t_4, __pyx_v_cur, Py_GT); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 416; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_16 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_16 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 416; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (__pyx_t_16) { __pyx_t_12 = (__pyx_v_fill_count < __pyx_v_lim); __pyx_t_13 = __pyx_t_12; } else { __pyx_t_13 = __pyx_t_16; } if (__pyx_t_13) { /* "pandas/src/generated.pyx":417 * indexer[j] = i * elif new[j] > cur and fill_count < lim: * indexer[j] = i # <<<<<<<<<<<<<< * fill_count += 1 * j += 1 */ __pyx_t_22 = __pyx_v_j; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_22, __pyx_pybuffernd_indexer.diminfo[0].strides) = __pyx_v_i; /* "pandas/src/generated.pyx":418 * elif new[j] > cur and fill_count < lim: * indexer[j] = i * fill_count += 1 # <<<<<<<<<<<<<< * j += 1 * break */ __pyx_v_fill_count = (__pyx_v_fill_count + 1); goto __pyx_L14; } __pyx_L14:; /* "pandas/src/generated.pyx":419 * indexer[j] = i * fill_count += 1 * j += 1 # <<<<<<<<<<<<<< * break * */ __pyx_v_j = (__pyx_v_j + 1); } /* "pandas/src/generated.pyx":420 * fill_count += 1 * j += 1 * break # <<<<<<<<<<<<<< * * next = old[i + 1] */ goto __pyx_L9_break; goto __pyx_L11; } __pyx_L11:; /* "pandas/src/generated.pyx":422 * break * * next = old[i + 1] # <<<<<<<<<<<<<< * * while j < nright and cur <= new[j] < next: */ __pyx_t_23 = (__pyx_v_i + 1); __pyx_t_6 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_old.rcbuffer->pybuffer.buf, __pyx_t_23, __pyx_pybuffernd_old.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_6); __Pyx_XDECREF_SET(__pyx_v_next, __pyx_t_6); __pyx_t_6 = 0; /* "pandas/src/generated.pyx":424 * next = old[i + 1] * * while j < nright and cur <= new[j] < next: # <<<<<<<<<<<<<< * if new[j] == cur: * indexer[j] = i */ while (1) { __pyx_t_13 = (__pyx_v_j < __pyx_v_nright); if (__pyx_t_13) { __pyx_t_24 = __pyx_v_j; __pyx_t_6 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_new.rcbuffer->pybuffer.buf, __pyx_t_24, __pyx_pybuffernd_new.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_6); __pyx_t_4 = PyObject_RichCompare(__pyx_v_cur, __pyx_t_6, Py_LE); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 424; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__Pyx_PyObject_IsTrue(__pyx_t_4)) { __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = PyObject_RichCompare(__pyx_t_6, __pyx_v_next, Py_LT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 424; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_16 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_16 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 424; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_12 = __pyx_t_16; } else { __pyx_t_12 = __pyx_t_13; } if (!__pyx_t_12) break; /* "pandas/src/generated.pyx":425 * * while j < nright and cur <= new[j] < next: * if new[j] == cur: # <<<<<<<<<<<<<< * indexer[j] = i * elif fill_count < lim: */ __pyx_t_25 = __pyx_v_j; __pyx_t_4 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_new.rcbuffer->pybuffer.buf, __pyx_t_25, __pyx_pybuffernd_new.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_4); __pyx_t_6 = PyObject_RichCompare(__pyx_t_4, __pyx_v_cur, Py_EQ); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 425; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_12 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 425; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (__pyx_t_12) { /* "pandas/src/generated.pyx":426 * while j < nright and cur <= new[j] < next: * if new[j] == cur: * indexer[j] = i # <<<<<<<<<<<<<< * elif fill_count < lim: * indexer[j] = i */ __pyx_t_26 = __pyx_v_j; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_26, __pyx_pybuffernd_indexer.diminfo[0].strides) = __pyx_v_i; goto __pyx_L17; } /* "pandas/src/generated.pyx":427 * if new[j] == cur: * indexer[j] = i * elif fill_count < lim: # <<<<<<<<<<<<<< * indexer[j] = i * fill_count += 1 */ __pyx_t_12 = ((__pyx_v_fill_count < __pyx_v_lim) != 0); if (__pyx_t_12) { /* "pandas/src/generated.pyx":428 * indexer[j] = i * elif fill_count < lim: * indexer[j] = i # <<<<<<<<<<<<<< * fill_count += 1 * j += 1 */ __pyx_t_27 = __pyx_v_j; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_27, __pyx_pybuffernd_indexer.diminfo[0].strides) = __pyx_v_i; /* "pandas/src/generated.pyx":429 * elif fill_count < lim: * indexer[j] = i * fill_count += 1 # <<<<<<<<<<<<<< * j += 1 * */ __pyx_v_fill_count = (__pyx_v_fill_count + 1); goto __pyx_L17; } __pyx_L17:; /* "pandas/src/generated.pyx":430 * indexer[j] = i * fill_count += 1 * j += 1 # <<<<<<<<<<<<<< * * fill_count = 0 */ __pyx_v_j = (__pyx_v_j + 1); } /* "pandas/src/generated.pyx":432 * j += 1 * * fill_count = 0 # <<<<<<<<<<<<<< * i += 1 * cur = next */ __pyx_v_fill_count = 0; /* "pandas/src/generated.pyx":433 * * fill_count = 0 * i += 1 # <<<<<<<<<<<<<< * cur = next * */ __pyx_v_i = (__pyx_v_i + 1); /* "pandas/src/generated.pyx":434 * fill_count = 0 * i += 1 * cur = next # <<<<<<<<<<<<<< * * return indexer */ __Pyx_INCREF(__pyx_v_next); __Pyx_DECREF_SET(__pyx_v_cur, __pyx_v_next); } __pyx_L9_break:; /* "pandas/src/generated.pyx":436 * cur = next * * return indexer # <<<<<<<<<<<<<< * * @cython.boundscheck(False) */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_indexer)); __pyx_r = ((PyObject *)__pyx_v_indexer); goto __pyx_L0; __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_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_new.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_old.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.pad_object", __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_new.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_old.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_indexer); __Pyx_XDECREF(__pyx_v_cur); __Pyx_XDECREF(__pyx_v_next); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_121pad_int32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_121pad_int32 = {__Pyx_NAMESTR("pad_int32"), (PyCFunction)__pyx_pw_6pandas_5algos_121pad_int32, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_121pad_int32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_old = 0; PyArrayObject *__pyx_v_new = 0; PyObject *__pyx_v_limit = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("pad_int32 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__old,&__pyx_n_s__new,&__pyx_n_s__limit,0}; PyObject* values[3] = {0,0,0}; /* "pandas/src/generated.pyx":441 * @cython.wraparound(False) * def pad_int32(ndarray[int32_t] old, ndarray[int32_t] new, * limit=None): # <<<<<<<<<<<<<< * cdef Py_ssize_t i, j, nleft, nright * cdef ndarray[int64_t, ndim=1] indexer */ values[2] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__old)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__new)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("pad_int32", 0, 2, 3, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 440; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__limit); if (value) { values[2] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "pad_int32") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 440; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_old = ((PyArrayObject *)values[0]); __pyx_v_new = ((PyArrayObject *)values[1]); __pyx_v_limit = values[2]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("pad_int32", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 440; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.pad_int32", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_old), __pyx_ptype_5numpy_ndarray, 1, "old", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 440; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_new), __pyx_ptype_5numpy_ndarray, 1, "new", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 440; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_120pad_int32(__pyx_self, __pyx_v_old, __pyx_v_new, __pyx_v_limit); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":440 * @cython.boundscheck(False) * @cython.wraparound(False) * def pad_int32(ndarray[int32_t] old, ndarray[int32_t] new, # <<<<<<<<<<<<<< * limit=None): * cdef Py_ssize_t i, j, nleft, nright */ static PyObject *__pyx_pf_6pandas_5algos_120pad_int32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_old, PyArrayObject *__pyx_v_new, PyObject *__pyx_v_limit) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_nleft; Py_ssize_t __pyx_v_nright; PyArrayObject *__pyx_v_indexer = 0; __pyx_t_5numpy_int32_t __pyx_v_cur; __pyx_t_5numpy_int32_t __pyx_v_next; int __pyx_v_lim; int __pyx_v_fill_count; __Pyx_LocalBuf_ND __pyx_pybuffernd_indexer; __Pyx_Buffer __pyx_pybuffer_indexer; __Pyx_LocalBuf_ND __pyx_pybuffernd_new; __Pyx_Buffer __pyx_pybuffer_new; __Pyx_LocalBuf_ND __pyx_pybuffernd_old; __Pyx_Buffer __pyx_pybuffer_old; 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; int __pyx_t_12; int __pyx_t_13; long __pyx_t_14; int __pyx_t_15; int __pyx_t_16; long __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; __pyx_t_5numpy_int32_t __pyx_t_25; Py_ssize_t __pyx_t_26; Py_ssize_t __pyx_t_27; Py_ssize_t __pyx_t_28; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("pad_int32", 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_old.pybuffer.buf = NULL; __pyx_pybuffer_old.refcount = 0; __pyx_pybuffernd_old.data = NULL; __pyx_pybuffernd_old.rcbuffer = &__pyx_pybuffer_old; __pyx_pybuffer_new.pybuffer.buf = NULL; __pyx_pybuffer_new.refcount = 0; __pyx_pybuffernd_new.data = NULL; __pyx_pybuffernd_new.rcbuffer = &__pyx_pybuffer_new; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_old.rcbuffer->pybuffer, (PyObject*)__pyx_v_old, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 440; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_old.diminfo[0].strides = __pyx_pybuffernd_old.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_old.diminfo[0].shape = __pyx_pybuffernd_old.rcbuffer->pybuffer.shape[0]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_new.rcbuffer->pybuffer, (PyObject*)__pyx_v_new, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 440; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_new.diminfo[0].strides = __pyx_pybuffernd_new.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_new.diminfo[0].shape = __pyx_pybuffernd_new.rcbuffer->pybuffer.shape[0]; /* "pandas/src/generated.pyx":445 * cdef ndarray[int64_t, ndim=1] indexer * cdef int32_t cur, next * cdef int lim, fill_count = 0 # <<<<<<<<<<<<<< * * nleft = len(old) */ __pyx_v_fill_count = 0; /* "pandas/src/generated.pyx":447 * cdef int lim, fill_count = 0 * * nleft = len(old) # <<<<<<<<<<<<<< * nright = len(new) * indexer = np.empty(nright, dtype=np.int64) */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_old)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 447; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_nleft = __pyx_t_1; /* "pandas/src/generated.pyx":448 * * nleft = len(old) * nright = len(new) # <<<<<<<<<<<<<< * indexer = np.empty(nright, dtype=np.int64) * indexer.fill(-1) */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_new)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 448; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_nright = __pyx_t_1; /* "pandas/src/generated.pyx":449 * nleft = len(old) * nright = len(new) * indexer = np.empty(nright, dtype=np.int64) # <<<<<<<<<<<<<< * indexer.fill(-1) * */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 449; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 449; __pyx_clineno = __LINE__; goto __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_nright); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 449; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 449; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 449; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_2)); __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 449; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s__int64); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 449; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__dtype), __pyx_t_6) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 449; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 449; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __Pyx_DECREF(((PyObject *)__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_filename = __pyx_f[2]; __pyx_lineno = 449; __pyx_clineno = __LINE__; goto __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_int64_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_int64_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_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_filename = __pyx_f[2]; __pyx_lineno = 449; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_7 = 0; __pyx_v_indexer = ((PyArrayObject *)__pyx_t_6); __pyx_t_6 = 0; /* "pandas/src/generated.pyx":450 * nright = len(new) * indexer = np.empty(nright, dtype=np.int64) * indexer.fill(-1) # <<<<<<<<<<<<<< * * if limit is None: */ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_indexer), __pyx_n_s__fill); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 450; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_2 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_k_tuple_57), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 450; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":452 * indexer.fill(-1) * * if limit is None: # <<<<<<<<<<<<<< * lim = nright * else: */ __pyx_t_12 = (__pyx_v_limit == Py_None); __pyx_t_13 = (__pyx_t_12 != 0); if (__pyx_t_13) { /* "pandas/src/generated.pyx":453 * * if limit is None: * lim = nright # <<<<<<<<<<<<<< * else: * if limit < 0: */ __pyx_v_lim = __pyx_v_nright; goto __pyx_L3; } /*else*/ { /* "pandas/src/generated.pyx":455 * lim = nright * else: * if limit < 0: # <<<<<<<<<<<<<< * raise ValueError('Limit must be non-negative') * lim = limit */ __pyx_t_2 = PyObject_RichCompare(__pyx_v_limit, __pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 455; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_13 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 455; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_13) { /* "pandas/src/generated.pyx":456 * else: * if limit < 0: * raise ValueError('Limit must be non-negative') # <<<<<<<<<<<<<< * lim = limit * */ __pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_58), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 456; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 456; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L4; } __pyx_L4:; /* "pandas/src/generated.pyx":457 * if limit < 0: * raise ValueError('Limit must be non-negative') * lim = limit # <<<<<<<<<<<<<< * * if nleft == 0 or nright == 0 or new[nright - 1] < old[0]: */ __pyx_t_8 = __Pyx_PyInt_AsInt(__pyx_v_limit); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 457; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_lim = __pyx_t_8; } __pyx_L3:; /* "pandas/src/generated.pyx":459 * lim = limit * * if nleft == 0 or nright == 0 or new[nright - 1] < old[0]: # <<<<<<<<<<<<<< * return indexer * */ __pyx_t_13 = ((__pyx_v_nleft == 0) != 0); if (!__pyx_t_13) { __pyx_t_12 = ((__pyx_v_nright == 0) != 0); if (!__pyx_t_12) { __pyx_t_1 = (__pyx_v_nright - 1); __pyx_t_14 = 0; __pyx_t_15 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_new.rcbuffer->pybuffer.buf, __pyx_t_1, __pyx_pybuffernd_new.diminfo[0].strides)) < (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_old.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_old.diminfo[0].strides))) != 0); __pyx_t_16 = __pyx_t_15; } else { __pyx_t_16 = __pyx_t_12; } __pyx_t_12 = __pyx_t_16; } else { __pyx_t_12 = __pyx_t_13; } if (__pyx_t_12) { /* "pandas/src/generated.pyx":460 * * if nleft == 0 or nright == 0 or new[nright - 1] < old[0]: * return indexer # <<<<<<<<<<<<<< * * i = j = 0 */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_indexer)); __pyx_r = ((PyObject *)__pyx_v_indexer); goto __pyx_L0; goto __pyx_L5; } __pyx_L5:; /* "pandas/src/generated.pyx":462 * return indexer * * i = j = 0 # <<<<<<<<<<<<<< * * cur = old[0] */ __pyx_v_i = 0; __pyx_v_j = 0; /* "pandas/src/generated.pyx":464 * i = j = 0 * * cur = old[0] # <<<<<<<<<<<<<< * * while j <= nright - 1 and new[j] < cur: */ __pyx_t_17 = 0; __pyx_v_cur = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_old.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_old.diminfo[0].strides)); /* "pandas/src/generated.pyx":466 * cur = old[0] * * while j <= nright - 1 and new[j] < cur: # <<<<<<<<<<<<<< * j += 1 * */ while (1) { __pyx_t_12 = ((__pyx_v_j <= (__pyx_v_nright - 1)) != 0); if (__pyx_t_12) { __pyx_t_18 = __pyx_v_j; __pyx_t_13 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_new.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_new.diminfo[0].strides)) < __pyx_v_cur) != 0); __pyx_t_16 = __pyx_t_13; } else { __pyx_t_16 = __pyx_t_12; } if (!__pyx_t_16) break; /* "pandas/src/generated.pyx":467 * * while j <= nright - 1 and new[j] < cur: * j += 1 # <<<<<<<<<<<<<< * * while True: */ __pyx_v_j = (__pyx_v_j + 1); } /* "pandas/src/generated.pyx":469 * j += 1 * * while True: # <<<<<<<<<<<<<< * if j == nright: * break */ while (1) { if (!1) break; /* "pandas/src/generated.pyx":470 * * while True: * if j == nright: # <<<<<<<<<<<<<< * break * */ __pyx_t_16 = ((__pyx_v_j == __pyx_v_nright) != 0); if (__pyx_t_16) { /* "pandas/src/generated.pyx":471 * while True: * if j == nright: * break # <<<<<<<<<<<<<< * * if i == nleft - 1: */ goto __pyx_L9_break; goto __pyx_L10; } __pyx_L10:; /* "pandas/src/generated.pyx":473 * break * * if i == nleft - 1: # <<<<<<<<<<<<<< * while j < nright: * if new[j] == cur: */ __pyx_t_16 = ((__pyx_v_i == (__pyx_v_nleft - 1)) != 0); if (__pyx_t_16) { /* "pandas/src/generated.pyx":474 * * if i == nleft - 1: * while j < nright: # <<<<<<<<<<<<<< * if new[j] == cur: * indexer[j] = i */ while (1) { __pyx_t_16 = ((__pyx_v_j < __pyx_v_nright) != 0); if (!__pyx_t_16) break; /* "pandas/src/generated.pyx":475 * if i == nleft - 1: * while j < nright: * if new[j] == cur: # <<<<<<<<<<<<<< * indexer[j] = i * elif new[j] > cur and fill_count < lim: */ __pyx_t_19 = __pyx_v_j; __pyx_t_16 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_new.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_new.diminfo[0].strides)) == __pyx_v_cur) != 0); if (__pyx_t_16) { /* "pandas/src/generated.pyx":476 * while j < nright: * if new[j] == cur: * indexer[j] = i # <<<<<<<<<<<<<< * elif new[j] > cur and fill_count < lim: * indexer[j] = i */ __pyx_t_20 = __pyx_v_j; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_indexer.diminfo[0].strides) = __pyx_v_i; goto __pyx_L14; } /* "pandas/src/generated.pyx":477 * if new[j] == cur: * indexer[j] = i * elif new[j] > cur and fill_count < lim: # <<<<<<<<<<<<<< * indexer[j] = i * fill_count += 1 */ __pyx_t_21 = __pyx_v_j; __pyx_t_16 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_new.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_new.diminfo[0].strides)) > __pyx_v_cur) != 0); if (__pyx_t_16) { __pyx_t_12 = ((__pyx_v_fill_count < __pyx_v_lim) != 0); __pyx_t_13 = __pyx_t_12; } else { __pyx_t_13 = __pyx_t_16; } if (__pyx_t_13) { /* "pandas/src/generated.pyx":478 * indexer[j] = i * elif new[j] > cur and fill_count < lim: * indexer[j] = i # <<<<<<<<<<<<<< * fill_count += 1 * j += 1 */ __pyx_t_22 = __pyx_v_j; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_22, __pyx_pybuffernd_indexer.diminfo[0].strides) = __pyx_v_i; /* "pandas/src/generated.pyx":479 * elif new[j] > cur and fill_count < lim: * indexer[j] = i * fill_count += 1 # <<<<<<<<<<<<<< * j += 1 * break */ __pyx_v_fill_count = (__pyx_v_fill_count + 1); goto __pyx_L14; } __pyx_L14:; /* "pandas/src/generated.pyx":480 * indexer[j] = i * fill_count += 1 * j += 1 # <<<<<<<<<<<<<< * break * */ __pyx_v_j = (__pyx_v_j + 1); } /* "pandas/src/generated.pyx":481 * fill_count += 1 * j += 1 * break # <<<<<<<<<<<<<< * * next = old[i + 1] */ goto __pyx_L9_break; goto __pyx_L11; } __pyx_L11:; /* "pandas/src/generated.pyx":483 * break * * next = old[i + 1] # <<<<<<<<<<<<<< * * while j < nright and cur <= new[j] < next: */ __pyx_t_23 = (__pyx_v_i + 1); __pyx_v_next = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_old.rcbuffer->pybuffer.buf, __pyx_t_23, __pyx_pybuffernd_old.diminfo[0].strides)); /* "pandas/src/generated.pyx":485 * next = old[i + 1] * * while j < nright and cur <= new[j] < next: # <<<<<<<<<<<<<< * if new[j] == cur: * indexer[j] = i */ while (1) { __pyx_t_13 = ((__pyx_v_j < __pyx_v_nright) != 0); if (__pyx_t_13) { __pyx_t_24 = __pyx_v_j; __pyx_t_25 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_new.rcbuffer->pybuffer.buf, __pyx_t_24, __pyx_pybuffernd_new.diminfo[0].strides)); __pyx_t_16 = (__pyx_v_cur <= __pyx_t_25); if (__pyx_t_16) { __pyx_t_16 = (__pyx_t_25 < __pyx_v_next); } __pyx_t_12 = (__pyx_t_16 != 0); } else { __pyx_t_12 = __pyx_t_13; } if (!__pyx_t_12) break; /* "pandas/src/generated.pyx":486 * * while j < nright and cur <= new[j] < next: * if new[j] == cur: # <<<<<<<<<<<<<< * indexer[j] = i * elif fill_count < lim: */ __pyx_t_26 = __pyx_v_j; __pyx_t_12 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_new.rcbuffer->pybuffer.buf, __pyx_t_26, __pyx_pybuffernd_new.diminfo[0].strides)) == __pyx_v_cur) != 0); if (__pyx_t_12) { /* "pandas/src/generated.pyx":487 * while j < nright and cur <= new[j] < next: * if new[j] == cur: * indexer[j] = i # <<<<<<<<<<<<<< * elif fill_count < lim: * indexer[j] = i */ __pyx_t_27 = __pyx_v_j; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_27, __pyx_pybuffernd_indexer.diminfo[0].strides) = __pyx_v_i; goto __pyx_L17; } /* "pandas/src/generated.pyx":488 * if new[j] == cur: * indexer[j] = i * elif fill_count < lim: # <<<<<<<<<<<<<< * indexer[j] = i * fill_count += 1 */ __pyx_t_12 = ((__pyx_v_fill_count < __pyx_v_lim) != 0); if (__pyx_t_12) { /* "pandas/src/generated.pyx":489 * indexer[j] = i * elif fill_count < lim: * indexer[j] = i # <<<<<<<<<<<<<< * fill_count += 1 * j += 1 */ __pyx_t_28 = __pyx_v_j; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_28, __pyx_pybuffernd_indexer.diminfo[0].strides) = __pyx_v_i; /* "pandas/src/generated.pyx":490 * elif fill_count < lim: * indexer[j] = i * fill_count += 1 # <<<<<<<<<<<<<< * j += 1 * */ __pyx_v_fill_count = (__pyx_v_fill_count + 1); goto __pyx_L17; } __pyx_L17:; /* "pandas/src/generated.pyx":491 * indexer[j] = i * fill_count += 1 * j += 1 # <<<<<<<<<<<<<< * * fill_count = 0 */ __pyx_v_j = (__pyx_v_j + 1); } /* "pandas/src/generated.pyx":493 * j += 1 * * fill_count = 0 # <<<<<<<<<<<<<< * i += 1 * cur = next */ __pyx_v_fill_count = 0; /* "pandas/src/generated.pyx":494 * * fill_count = 0 * i += 1 # <<<<<<<<<<<<<< * cur = next * */ __pyx_v_i = (__pyx_v_i + 1); /* "pandas/src/generated.pyx":495 * fill_count = 0 * i += 1 * cur = next # <<<<<<<<<<<<<< * * return indexer */ __pyx_v_cur = __pyx_v_next; } __pyx_L9_break:; /* "pandas/src/generated.pyx":497 * cur = next * * return indexer # <<<<<<<<<<<<<< * * @cython.boundscheck(False) */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_indexer)); __pyx_r = ((PyObject *)__pyx_v_indexer); goto __pyx_L0; __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_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_new.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_old.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.pad_int32", __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_new.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_old.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_indexer); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_123pad_int64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_123pad_int64 = {__Pyx_NAMESTR("pad_int64"), (PyCFunction)__pyx_pw_6pandas_5algos_123pad_int64, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_123pad_int64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_old = 0; PyArrayObject *__pyx_v_new = 0; PyObject *__pyx_v_limit = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("pad_int64 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__old,&__pyx_n_s__new,&__pyx_n_s__limit,0}; PyObject* values[3] = {0,0,0}; /* "pandas/src/generated.pyx":502 * @cython.wraparound(False) * def pad_int64(ndarray[int64_t] old, ndarray[int64_t] new, * limit=None): # <<<<<<<<<<<<<< * cdef Py_ssize_t i, j, nleft, nright * cdef ndarray[int64_t, ndim=1] indexer */ values[2] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__old)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__new)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("pad_int64", 0, 2, 3, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 501; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__limit); if (value) { values[2] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "pad_int64") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 501; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_old = ((PyArrayObject *)values[0]); __pyx_v_new = ((PyArrayObject *)values[1]); __pyx_v_limit = values[2]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("pad_int64", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 501; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.pad_int64", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_old), __pyx_ptype_5numpy_ndarray, 1, "old", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 501; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_new), __pyx_ptype_5numpy_ndarray, 1, "new", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 501; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_122pad_int64(__pyx_self, __pyx_v_old, __pyx_v_new, __pyx_v_limit); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":501 * @cython.boundscheck(False) * @cython.wraparound(False) * def pad_int64(ndarray[int64_t] old, ndarray[int64_t] new, # <<<<<<<<<<<<<< * limit=None): * cdef Py_ssize_t i, j, nleft, nright */ static PyObject *__pyx_pf_6pandas_5algos_122pad_int64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_old, PyArrayObject *__pyx_v_new, PyObject *__pyx_v_limit) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_nleft; Py_ssize_t __pyx_v_nright; PyArrayObject *__pyx_v_indexer = 0; __pyx_t_5numpy_int64_t __pyx_v_cur; __pyx_t_5numpy_int64_t __pyx_v_next; int __pyx_v_lim; int __pyx_v_fill_count; __Pyx_LocalBuf_ND __pyx_pybuffernd_indexer; __Pyx_Buffer __pyx_pybuffer_indexer; __Pyx_LocalBuf_ND __pyx_pybuffernd_new; __Pyx_Buffer __pyx_pybuffer_new; __Pyx_LocalBuf_ND __pyx_pybuffernd_old; __Pyx_Buffer __pyx_pybuffer_old; 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; int __pyx_t_12; int __pyx_t_13; long __pyx_t_14; int __pyx_t_15; int __pyx_t_16; long __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; __pyx_t_5numpy_int64_t __pyx_t_25; Py_ssize_t __pyx_t_26; Py_ssize_t __pyx_t_27; Py_ssize_t __pyx_t_28; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("pad_int64", 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_old.pybuffer.buf = NULL; __pyx_pybuffer_old.refcount = 0; __pyx_pybuffernd_old.data = NULL; __pyx_pybuffernd_old.rcbuffer = &__pyx_pybuffer_old; __pyx_pybuffer_new.pybuffer.buf = NULL; __pyx_pybuffer_new.refcount = 0; __pyx_pybuffernd_new.data = NULL; __pyx_pybuffernd_new.rcbuffer = &__pyx_pybuffer_new; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_old.rcbuffer->pybuffer, (PyObject*)__pyx_v_old, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 501; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_old.diminfo[0].strides = __pyx_pybuffernd_old.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_old.diminfo[0].shape = __pyx_pybuffernd_old.rcbuffer->pybuffer.shape[0]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_new.rcbuffer->pybuffer, (PyObject*)__pyx_v_new, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 501; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_new.diminfo[0].strides = __pyx_pybuffernd_new.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_new.diminfo[0].shape = __pyx_pybuffernd_new.rcbuffer->pybuffer.shape[0]; /* "pandas/src/generated.pyx":506 * cdef ndarray[int64_t, ndim=1] indexer * cdef int64_t cur, next * cdef int lim, fill_count = 0 # <<<<<<<<<<<<<< * * nleft = len(old) */ __pyx_v_fill_count = 0; /* "pandas/src/generated.pyx":508 * cdef int lim, fill_count = 0 * * nleft = len(old) # <<<<<<<<<<<<<< * nright = len(new) * indexer = np.empty(nright, dtype=np.int64) */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_old)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 508; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_nleft = __pyx_t_1; /* "pandas/src/generated.pyx":509 * * nleft = len(old) * nright = len(new) # <<<<<<<<<<<<<< * indexer = np.empty(nright, dtype=np.int64) * indexer.fill(-1) */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_new)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 509; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_nright = __pyx_t_1; /* "pandas/src/generated.pyx":510 * nleft = len(old) * nright = len(new) * indexer = np.empty(nright, dtype=np.int64) # <<<<<<<<<<<<<< * indexer.fill(-1) * */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 510; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 510; __pyx_clineno = __LINE__; goto __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_nright); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 510; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 510; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 510; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_2)); __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 510; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s__int64); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 510; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__dtype), __pyx_t_6) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 510; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 510; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __Pyx_DECREF(((PyObject *)__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_filename = __pyx_f[2]; __pyx_lineno = 510; __pyx_clineno = __LINE__; goto __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_int64_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_int64_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_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_filename = __pyx_f[2]; __pyx_lineno = 510; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_7 = 0; __pyx_v_indexer = ((PyArrayObject *)__pyx_t_6); __pyx_t_6 = 0; /* "pandas/src/generated.pyx":511 * nright = len(new) * indexer = np.empty(nright, dtype=np.int64) * indexer.fill(-1) # <<<<<<<<<<<<<< * * if limit is None: */ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_indexer), __pyx_n_s__fill); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 511; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_2 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_k_tuple_59), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 511; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":513 * indexer.fill(-1) * * if limit is None: # <<<<<<<<<<<<<< * lim = nright * else: */ __pyx_t_12 = (__pyx_v_limit == Py_None); __pyx_t_13 = (__pyx_t_12 != 0); if (__pyx_t_13) { /* "pandas/src/generated.pyx":514 * * if limit is None: * lim = nright # <<<<<<<<<<<<<< * else: * if limit < 0: */ __pyx_v_lim = __pyx_v_nright; goto __pyx_L3; } /*else*/ { /* "pandas/src/generated.pyx":516 * lim = nright * else: * if limit < 0: # <<<<<<<<<<<<<< * raise ValueError('Limit must be non-negative') * lim = limit */ __pyx_t_2 = PyObject_RichCompare(__pyx_v_limit, __pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 516; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_13 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 516; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_13) { /* "pandas/src/generated.pyx":517 * else: * if limit < 0: * raise ValueError('Limit must be non-negative') # <<<<<<<<<<<<<< * lim = limit * */ __pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_60), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 517; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 517; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L4; } __pyx_L4:; /* "pandas/src/generated.pyx":518 * if limit < 0: * raise ValueError('Limit must be non-negative') * lim = limit # <<<<<<<<<<<<<< * * if nleft == 0 or nright == 0 or new[nright - 1] < old[0]: */ __pyx_t_8 = __Pyx_PyInt_AsInt(__pyx_v_limit); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 518; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_lim = __pyx_t_8; } __pyx_L3:; /* "pandas/src/generated.pyx":520 * lim = limit * * if nleft == 0 or nright == 0 or new[nright - 1] < old[0]: # <<<<<<<<<<<<<< * return indexer * */ __pyx_t_13 = ((__pyx_v_nleft == 0) != 0); if (!__pyx_t_13) { __pyx_t_12 = ((__pyx_v_nright == 0) != 0); if (!__pyx_t_12) { __pyx_t_1 = (__pyx_v_nright - 1); __pyx_t_14 = 0; __pyx_t_15 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_new.rcbuffer->pybuffer.buf, __pyx_t_1, __pyx_pybuffernd_new.diminfo[0].strides)) < (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_old.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_old.diminfo[0].strides))) != 0); __pyx_t_16 = __pyx_t_15; } else { __pyx_t_16 = __pyx_t_12; } __pyx_t_12 = __pyx_t_16; } else { __pyx_t_12 = __pyx_t_13; } if (__pyx_t_12) { /* "pandas/src/generated.pyx":521 * * if nleft == 0 or nright == 0 or new[nright - 1] < old[0]: * return indexer # <<<<<<<<<<<<<< * * i = j = 0 */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_indexer)); __pyx_r = ((PyObject *)__pyx_v_indexer); goto __pyx_L0; goto __pyx_L5; } __pyx_L5:; /* "pandas/src/generated.pyx":523 * return indexer * * i = j = 0 # <<<<<<<<<<<<<< * * cur = old[0] */ __pyx_v_i = 0; __pyx_v_j = 0; /* "pandas/src/generated.pyx":525 * i = j = 0 * * cur = old[0] # <<<<<<<<<<<<<< * * while j <= nright - 1 and new[j] < cur: */ __pyx_t_17 = 0; __pyx_v_cur = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_old.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_old.diminfo[0].strides)); /* "pandas/src/generated.pyx":527 * cur = old[0] * * while j <= nright - 1 and new[j] < cur: # <<<<<<<<<<<<<< * j += 1 * */ while (1) { __pyx_t_12 = ((__pyx_v_j <= (__pyx_v_nright - 1)) != 0); if (__pyx_t_12) { __pyx_t_18 = __pyx_v_j; __pyx_t_13 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_new.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_new.diminfo[0].strides)) < __pyx_v_cur) != 0); __pyx_t_16 = __pyx_t_13; } else { __pyx_t_16 = __pyx_t_12; } if (!__pyx_t_16) break; /* "pandas/src/generated.pyx":528 * * while j <= nright - 1 and new[j] < cur: * j += 1 # <<<<<<<<<<<<<< * * while True: */ __pyx_v_j = (__pyx_v_j + 1); } /* "pandas/src/generated.pyx":530 * j += 1 * * while True: # <<<<<<<<<<<<<< * if j == nright: * break */ while (1) { if (!1) break; /* "pandas/src/generated.pyx":531 * * while True: * if j == nright: # <<<<<<<<<<<<<< * break * */ __pyx_t_16 = ((__pyx_v_j == __pyx_v_nright) != 0); if (__pyx_t_16) { /* "pandas/src/generated.pyx":532 * while True: * if j == nright: * break # <<<<<<<<<<<<<< * * if i == nleft - 1: */ goto __pyx_L9_break; goto __pyx_L10; } __pyx_L10:; /* "pandas/src/generated.pyx":534 * break * * if i == nleft - 1: # <<<<<<<<<<<<<< * while j < nright: * if new[j] == cur: */ __pyx_t_16 = ((__pyx_v_i == (__pyx_v_nleft - 1)) != 0); if (__pyx_t_16) { /* "pandas/src/generated.pyx":535 * * if i == nleft - 1: * while j < nright: # <<<<<<<<<<<<<< * if new[j] == cur: * indexer[j] = i */ while (1) { __pyx_t_16 = ((__pyx_v_j < __pyx_v_nright) != 0); if (!__pyx_t_16) break; /* "pandas/src/generated.pyx":536 * if i == nleft - 1: * while j < nright: * if new[j] == cur: # <<<<<<<<<<<<<< * indexer[j] = i * elif new[j] > cur and fill_count < lim: */ __pyx_t_19 = __pyx_v_j; __pyx_t_16 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_new.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_new.diminfo[0].strides)) == __pyx_v_cur) != 0); if (__pyx_t_16) { /* "pandas/src/generated.pyx":537 * while j < nright: * if new[j] == cur: * indexer[j] = i # <<<<<<<<<<<<<< * elif new[j] > cur and fill_count < lim: * indexer[j] = i */ __pyx_t_20 = __pyx_v_j; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_indexer.diminfo[0].strides) = __pyx_v_i; goto __pyx_L14; } /* "pandas/src/generated.pyx":538 * if new[j] == cur: * indexer[j] = i * elif new[j] > cur and fill_count < lim: # <<<<<<<<<<<<<< * indexer[j] = i * fill_count += 1 */ __pyx_t_21 = __pyx_v_j; __pyx_t_16 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_new.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_new.diminfo[0].strides)) > __pyx_v_cur) != 0); if (__pyx_t_16) { __pyx_t_12 = ((__pyx_v_fill_count < __pyx_v_lim) != 0); __pyx_t_13 = __pyx_t_12; } else { __pyx_t_13 = __pyx_t_16; } if (__pyx_t_13) { /* "pandas/src/generated.pyx":539 * indexer[j] = i * elif new[j] > cur and fill_count < lim: * indexer[j] = i # <<<<<<<<<<<<<< * fill_count += 1 * j += 1 */ __pyx_t_22 = __pyx_v_j; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_22, __pyx_pybuffernd_indexer.diminfo[0].strides) = __pyx_v_i; /* "pandas/src/generated.pyx":540 * elif new[j] > cur and fill_count < lim: * indexer[j] = i * fill_count += 1 # <<<<<<<<<<<<<< * j += 1 * break */ __pyx_v_fill_count = (__pyx_v_fill_count + 1); goto __pyx_L14; } __pyx_L14:; /* "pandas/src/generated.pyx":541 * indexer[j] = i * fill_count += 1 * j += 1 # <<<<<<<<<<<<<< * break * */ __pyx_v_j = (__pyx_v_j + 1); } /* "pandas/src/generated.pyx":542 * fill_count += 1 * j += 1 * break # <<<<<<<<<<<<<< * * next = old[i + 1] */ goto __pyx_L9_break; goto __pyx_L11; } __pyx_L11:; /* "pandas/src/generated.pyx":544 * break * * next = old[i + 1] # <<<<<<<<<<<<<< * * while j < nright and cur <= new[j] < next: */ __pyx_t_23 = (__pyx_v_i + 1); __pyx_v_next = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_old.rcbuffer->pybuffer.buf, __pyx_t_23, __pyx_pybuffernd_old.diminfo[0].strides)); /* "pandas/src/generated.pyx":546 * next = old[i + 1] * * while j < nright and cur <= new[j] < next: # <<<<<<<<<<<<<< * if new[j] == cur: * indexer[j] = i */ while (1) { __pyx_t_13 = ((__pyx_v_j < __pyx_v_nright) != 0); if (__pyx_t_13) { __pyx_t_24 = __pyx_v_j; __pyx_t_25 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_new.rcbuffer->pybuffer.buf, __pyx_t_24, __pyx_pybuffernd_new.diminfo[0].strides)); __pyx_t_16 = (__pyx_v_cur <= __pyx_t_25); if (__pyx_t_16) { __pyx_t_16 = (__pyx_t_25 < __pyx_v_next); } __pyx_t_12 = (__pyx_t_16 != 0); } else { __pyx_t_12 = __pyx_t_13; } if (!__pyx_t_12) break; /* "pandas/src/generated.pyx":547 * * while j < nright and cur <= new[j] < next: * if new[j] == cur: # <<<<<<<<<<<<<< * indexer[j] = i * elif fill_count < lim: */ __pyx_t_26 = __pyx_v_j; __pyx_t_12 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_new.rcbuffer->pybuffer.buf, __pyx_t_26, __pyx_pybuffernd_new.diminfo[0].strides)) == __pyx_v_cur) != 0); if (__pyx_t_12) { /* "pandas/src/generated.pyx":548 * while j < nright and cur <= new[j] < next: * if new[j] == cur: * indexer[j] = i # <<<<<<<<<<<<<< * elif fill_count < lim: * indexer[j] = i */ __pyx_t_27 = __pyx_v_j; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_27, __pyx_pybuffernd_indexer.diminfo[0].strides) = __pyx_v_i; goto __pyx_L17; } /* "pandas/src/generated.pyx":549 * if new[j] == cur: * indexer[j] = i * elif fill_count < lim: # <<<<<<<<<<<<<< * indexer[j] = i * fill_count += 1 */ __pyx_t_12 = ((__pyx_v_fill_count < __pyx_v_lim) != 0); if (__pyx_t_12) { /* "pandas/src/generated.pyx":550 * indexer[j] = i * elif fill_count < lim: * indexer[j] = i # <<<<<<<<<<<<<< * fill_count += 1 * j += 1 */ __pyx_t_28 = __pyx_v_j; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_28, __pyx_pybuffernd_indexer.diminfo[0].strides) = __pyx_v_i; /* "pandas/src/generated.pyx":551 * elif fill_count < lim: * indexer[j] = i * fill_count += 1 # <<<<<<<<<<<<<< * j += 1 * */ __pyx_v_fill_count = (__pyx_v_fill_count + 1); goto __pyx_L17; } __pyx_L17:; /* "pandas/src/generated.pyx":552 * indexer[j] = i * fill_count += 1 * j += 1 # <<<<<<<<<<<<<< * * fill_count = 0 */ __pyx_v_j = (__pyx_v_j + 1); } /* "pandas/src/generated.pyx":554 * j += 1 * * fill_count = 0 # <<<<<<<<<<<<<< * i += 1 * cur = next */ __pyx_v_fill_count = 0; /* "pandas/src/generated.pyx":555 * * fill_count = 0 * i += 1 # <<<<<<<<<<<<<< * cur = next * */ __pyx_v_i = (__pyx_v_i + 1); /* "pandas/src/generated.pyx":556 * fill_count = 0 * i += 1 * cur = next # <<<<<<<<<<<<<< * * return indexer */ __pyx_v_cur = __pyx_v_next; } __pyx_L9_break:; /* "pandas/src/generated.pyx":558 * cur = next * * return indexer # <<<<<<<<<<<<<< * * @cython.boundscheck(False) */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_indexer)); __pyx_r = ((PyObject *)__pyx_v_indexer); goto __pyx_L0; __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_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_new.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_old.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.pad_int64", __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_new.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_old.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_indexer); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_125pad_bool(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_125pad_bool = {__Pyx_NAMESTR("pad_bool"), (PyCFunction)__pyx_pw_6pandas_5algos_125pad_bool, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_125pad_bool(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_old = 0; PyArrayObject *__pyx_v_new = 0; PyObject *__pyx_v_limit = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("pad_bool (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__old,&__pyx_n_s__new,&__pyx_n_s__limit,0}; PyObject* values[3] = {0,0,0}; /* "pandas/src/generated.pyx":563 * @cython.wraparound(False) * def pad_bool(ndarray[uint8_t] old, ndarray[uint8_t] new, * limit=None): # <<<<<<<<<<<<<< * cdef Py_ssize_t i, j, nleft, nright * cdef ndarray[int64_t, ndim=1] indexer */ values[2] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__old)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__new)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("pad_bool", 0, 2, 3, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 562; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__limit); if (value) { values[2] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "pad_bool") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 562; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_old = ((PyArrayObject *)values[0]); __pyx_v_new = ((PyArrayObject *)values[1]); __pyx_v_limit = values[2]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("pad_bool", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 562; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.pad_bool", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_old), __pyx_ptype_5numpy_ndarray, 1, "old", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 562; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_new), __pyx_ptype_5numpy_ndarray, 1, "new", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 562; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_124pad_bool(__pyx_self, __pyx_v_old, __pyx_v_new, __pyx_v_limit); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":562 * @cython.boundscheck(False) * @cython.wraparound(False) * def pad_bool(ndarray[uint8_t] old, ndarray[uint8_t] new, # <<<<<<<<<<<<<< * limit=None): * cdef Py_ssize_t i, j, nleft, nright */ static PyObject *__pyx_pf_6pandas_5algos_124pad_bool(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_old, PyArrayObject *__pyx_v_new, PyObject *__pyx_v_limit) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_nleft; Py_ssize_t __pyx_v_nright; PyArrayObject *__pyx_v_indexer = 0; __pyx_t_5numpy_uint8_t __pyx_v_cur; __pyx_t_5numpy_uint8_t __pyx_v_next; int __pyx_v_lim; int __pyx_v_fill_count; __Pyx_LocalBuf_ND __pyx_pybuffernd_indexer; __Pyx_Buffer __pyx_pybuffer_indexer; __Pyx_LocalBuf_ND __pyx_pybuffernd_new; __Pyx_Buffer __pyx_pybuffer_new; __Pyx_LocalBuf_ND __pyx_pybuffernd_old; __Pyx_Buffer __pyx_pybuffer_old; 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; int __pyx_t_12; int __pyx_t_13; long __pyx_t_14; int __pyx_t_15; int __pyx_t_16; long __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; __pyx_t_5numpy_uint8_t __pyx_t_25; Py_ssize_t __pyx_t_26; Py_ssize_t __pyx_t_27; Py_ssize_t __pyx_t_28; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("pad_bool", 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_old.pybuffer.buf = NULL; __pyx_pybuffer_old.refcount = 0; __pyx_pybuffernd_old.data = NULL; __pyx_pybuffernd_old.rcbuffer = &__pyx_pybuffer_old; __pyx_pybuffer_new.pybuffer.buf = NULL; __pyx_pybuffer_new.refcount = 0; __pyx_pybuffernd_new.data = NULL; __pyx_pybuffernd_new.rcbuffer = &__pyx_pybuffer_new; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_old.rcbuffer->pybuffer, (PyObject*)__pyx_v_old, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 562; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_old.diminfo[0].strides = __pyx_pybuffernd_old.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_old.diminfo[0].shape = __pyx_pybuffernd_old.rcbuffer->pybuffer.shape[0]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_new.rcbuffer->pybuffer, (PyObject*)__pyx_v_new, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 562; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_new.diminfo[0].strides = __pyx_pybuffernd_new.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_new.diminfo[0].shape = __pyx_pybuffernd_new.rcbuffer->pybuffer.shape[0]; /* "pandas/src/generated.pyx":567 * cdef ndarray[int64_t, ndim=1] indexer * cdef uint8_t cur, next * cdef int lim, fill_count = 0 # <<<<<<<<<<<<<< * * nleft = len(old) */ __pyx_v_fill_count = 0; /* "pandas/src/generated.pyx":569 * cdef int lim, fill_count = 0 * * nleft = len(old) # <<<<<<<<<<<<<< * nright = len(new) * indexer = np.empty(nright, dtype=np.int64) */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_old)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 569; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_nleft = __pyx_t_1; /* "pandas/src/generated.pyx":570 * * nleft = len(old) * nright = len(new) # <<<<<<<<<<<<<< * indexer = np.empty(nright, dtype=np.int64) * indexer.fill(-1) */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_new)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 570; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_nright = __pyx_t_1; /* "pandas/src/generated.pyx":571 * nleft = len(old) * nright = len(new) * indexer = np.empty(nright, dtype=np.int64) # <<<<<<<<<<<<<< * indexer.fill(-1) * */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 571; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 571; __pyx_clineno = __LINE__; goto __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_nright); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 571; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 571; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 571; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_2)); __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 571; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s__int64); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 571; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__dtype), __pyx_t_6) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 571; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 571; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __Pyx_DECREF(((PyObject *)__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_filename = __pyx_f[2]; __pyx_lineno = 571; __pyx_clineno = __LINE__; goto __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_int64_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_int64_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_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_filename = __pyx_f[2]; __pyx_lineno = 571; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_7 = 0; __pyx_v_indexer = ((PyArrayObject *)__pyx_t_6); __pyx_t_6 = 0; /* "pandas/src/generated.pyx":572 * nright = len(new) * indexer = np.empty(nright, dtype=np.int64) * indexer.fill(-1) # <<<<<<<<<<<<<< * * if limit is None: */ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_indexer), __pyx_n_s__fill); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 572; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_2 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_k_tuple_61), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 572; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":574 * indexer.fill(-1) * * if limit is None: # <<<<<<<<<<<<<< * lim = nright * else: */ __pyx_t_12 = (__pyx_v_limit == Py_None); __pyx_t_13 = (__pyx_t_12 != 0); if (__pyx_t_13) { /* "pandas/src/generated.pyx":575 * * if limit is None: * lim = nright # <<<<<<<<<<<<<< * else: * if limit < 0: */ __pyx_v_lim = __pyx_v_nright; goto __pyx_L3; } /*else*/ { /* "pandas/src/generated.pyx":577 * lim = nright * else: * if limit < 0: # <<<<<<<<<<<<<< * raise ValueError('Limit must be non-negative') * lim = limit */ __pyx_t_2 = PyObject_RichCompare(__pyx_v_limit, __pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 577; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_13 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 577; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_13) { /* "pandas/src/generated.pyx":578 * else: * if limit < 0: * raise ValueError('Limit must be non-negative') # <<<<<<<<<<<<<< * lim = limit * */ __pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_62), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 578; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 578; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L4; } __pyx_L4:; /* "pandas/src/generated.pyx":579 * if limit < 0: * raise ValueError('Limit must be non-negative') * lim = limit # <<<<<<<<<<<<<< * * if nleft == 0 or nright == 0 or new[nright - 1] < old[0]: */ __pyx_t_8 = __Pyx_PyInt_AsInt(__pyx_v_limit); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 579; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_lim = __pyx_t_8; } __pyx_L3:; /* "pandas/src/generated.pyx":581 * lim = limit * * if nleft == 0 or nright == 0 or new[nright - 1] < old[0]: # <<<<<<<<<<<<<< * return indexer * */ __pyx_t_13 = ((__pyx_v_nleft == 0) != 0); if (!__pyx_t_13) { __pyx_t_12 = ((__pyx_v_nright == 0) != 0); if (!__pyx_t_12) { __pyx_t_1 = (__pyx_v_nright - 1); __pyx_t_14 = 0; __pyx_t_15 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_new.rcbuffer->pybuffer.buf, __pyx_t_1, __pyx_pybuffernd_new.diminfo[0].strides)) < (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_old.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_old.diminfo[0].strides))) != 0); __pyx_t_16 = __pyx_t_15; } else { __pyx_t_16 = __pyx_t_12; } __pyx_t_12 = __pyx_t_16; } else { __pyx_t_12 = __pyx_t_13; } if (__pyx_t_12) { /* "pandas/src/generated.pyx":582 * * if nleft == 0 or nright == 0 or new[nright - 1] < old[0]: * return indexer # <<<<<<<<<<<<<< * * i = j = 0 */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_indexer)); __pyx_r = ((PyObject *)__pyx_v_indexer); goto __pyx_L0; goto __pyx_L5; } __pyx_L5:; /* "pandas/src/generated.pyx":584 * return indexer * * i = j = 0 # <<<<<<<<<<<<<< * * cur = old[0] */ __pyx_v_i = 0; __pyx_v_j = 0; /* "pandas/src/generated.pyx":586 * i = j = 0 * * cur = old[0] # <<<<<<<<<<<<<< * * while j <= nright - 1 and new[j] < cur: */ __pyx_t_17 = 0; __pyx_v_cur = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_old.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_old.diminfo[0].strides)); /* "pandas/src/generated.pyx":588 * cur = old[0] * * while j <= nright - 1 and new[j] < cur: # <<<<<<<<<<<<<< * j += 1 * */ while (1) { __pyx_t_12 = ((__pyx_v_j <= (__pyx_v_nright - 1)) != 0); if (__pyx_t_12) { __pyx_t_18 = __pyx_v_j; __pyx_t_13 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_new.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_new.diminfo[0].strides)) < __pyx_v_cur) != 0); __pyx_t_16 = __pyx_t_13; } else { __pyx_t_16 = __pyx_t_12; } if (!__pyx_t_16) break; /* "pandas/src/generated.pyx":589 * * while j <= nright - 1 and new[j] < cur: * j += 1 # <<<<<<<<<<<<<< * * while True: */ __pyx_v_j = (__pyx_v_j + 1); } /* "pandas/src/generated.pyx":591 * j += 1 * * while True: # <<<<<<<<<<<<<< * if j == nright: * break */ while (1) { if (!1) break; /* "pandas/src/generated.pyx":592 * * while True: * if j == nright: # <<<<<<<<<<<<<< * break * */ __pyx_t_16 = ((__pyx_v_j == __pyx_v_nright) != 0); if (__pyx_t_16) { /* "pandas/src/generated.pyx":593 * while True: * if j == nright: * break # <<<<<<<<<<<<<< * * if i == nleft - 1: */ goto __pyx_L9_break; goto __pyx_L10; } __pyx_L10:; /* "pandas/src/generated.pyx":595 * break * * if i == nleft - 1: # <<<<<<<<<<<<<< * while j < nright: * if new[j] == cur: */ __pyx_t_16 = ((__pyx_v_i == (__pyx_v_nleft - 1)) != 0); if (__pyx_t_16) { /* "pandas/src/generated.pyx":596 * * if i == nleft - 1: * while j < nright: # <<<<<<<<<<<<<< * if new[j] == cur: * indexer[j] = i */ while (1) { __pyx_t_16 = ((__pyx_v_j < __pyx_v_nright) != 0); if (!__pyx_t_16) break; /* "pandas/src/generated.pyx":597 * if i == nleft - 1: * while j < nright: * if new[j] == cur: # <<<<<<<<<<<<<< * indexer[j] = i * elif new[j] > cur and fill_count < lim: */ __pyx_t_19 = __pyx_v_j; __pyx_t_16 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_new.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_new.diminfo[0].strides)) == __pyx_v_cur) != 0); if (__pyx_t_16) { /* "pandas/src/generated.pyx":598 * while j < nright: * if new[j] == cur: * indexer[j] = i # <<<<<<<<<<<<<< * elif new[j] > cur and fill_count < lim: * indexer[j] = i */ __pyx_t_20 = __pyx_v_j; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_indexer.diminfo[0].strides) = __pyx_v_i; goto __pyx_L14; } /* "pandas/src/generated.pyx":599 * if new[j] == cur: * indexer[j] = i * elif new[j] > cur and fill_count < lim: # <<<<<<<<<<<<<< * indexer[j] = i * fill_count += 1 */ __pyx_t_21 = __pyx_v_j; __pyx_t_16 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_new.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_new.diminfo[0].strides)) > __pyx_v_cur) != 0); if (__pyx_t_16) { __pyx_t_12 = ((__pyx_v_fill_count < __pyx_v_lim) != 0); __pyx_t_13 = __pyx_t_12; } else { __pyx_t_13 = __pyx_t_16; } if (__pyx_t_13) { /* "pandas/src/generated.pyx":600 * indexer[j] = i * elif new[j] > cur and fill_count < lim: * indexer[j] = i # <<<<<<<<<<<<<< * fill_count += 1 * j += 1 */ __pyx_t_22 = __pyx_v_j; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_22, __pyx_pybuffernd_indexer.diminfo[0].strides) = __pyx_v_i; /* "pandas/src/generated.pyx":601 * elif new[j] > cur and fill_count < lim: * indexer[j] = i * fill_count += 1 # <<<<<<<<<<<<<< * j += 1 * break */ __pyx_v_fill_count = (__pyx_v_fill_count + 1); goto __pyx_L14; } __pyx_L14:; /* "pandas/src/generated.pyx":602 * indexer[j] = i * fill_count += 1 * j += 1 # <<<<<<<<<<<<<< * break * */ __pyx_v_j = (__pyx_v_j + 1); } /* "pandas/src/generated.pyx":603 * fill_count += 1 * j += 1 * break # <<<<<<<<<<<<<< * * next = old[i + 1] */ goto __pyx_L9_break; goto __pyx_L11; } __pyx_L11:; /* "pandas/src/generated.pyx":605 * break * * next = old[i + 1] # <<<<<<<<<<<<<< * * while j < nright and cur <= new[j] < next: */ __pyx_t_23 = (__pyx_v_i + 1); __pyx_v_next = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_old.rcbuffer->pybuffer.buf, __pyx_t_23, __pyx_pybuffernd_old.diminfo[0].strides)); /* "pandas/src/generated.pyx":607 * next = old[i + 1] * * while j < nright and cur <= new[j] < next: # <<<<<<<<<<<<<< * if new[j] == cur: * indexer[j] = i */ while (1) { __pyx_t_13 = ((__pyx_v_j < __pyx_v_nright) != 0); if (__pyx_t_13) { __pyx_t_24 = __pyx_v_j; __pyx_t_25 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_new.rcbuffer->pybuffer.buf, __pyx_t_24, __pyx_pybuffernd_new.diminfo[0].strides)); __pyx_t_16 = (__pyx_v_cur <= __pyx_t_25); if (__pyx_t_16) { __pyx_t_16 = (__pyx_t_25 < __pyx_v_next); } __pyx_t_12 = (__pyx_t_16 != 0); } else { __pyx_t_12 = __pyx_t_13; } if (!__pyx_t_12) break; /* "pandas/src/generated.pyx":608 * * while j < nright and cur <= new[j] < next: * if new[j] == cur: # <<<<<<<<<<<<<< * indexer[j] = i * elif fill_count < lim: */ __pyx_t_26 = __pyx_v_j; __pyx_t_12 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_new.rcbuffer->pybuffer.buf, __pyx_t_26, __pyx_pybuffernd_new.diminfo[0].strides)) == __pyx_v_cur) != 0); if (__pyx_t_12) { /* "pandas/src/generated.pyx":609 * while j < nright and cur <= new[j] < next: * if new[j] == cur: * indexer[j] = i # <<<<<<<<<<<<<< * elif fill_count < lim: * indexer[j] = i */ __pyx_t_27 = __pyx_v_j; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_27, __pyx_pybuffernd_indexer.diminfo[0].strides) = __pyx_v_i; goto __pyx_L17; } /* "pandas/src/generated.pyx":610 * if new[j] == cur: * indexer[j] = i * elif fill_count < lim: # <<<<<<<<<<<<<< * indexer[j] = i * fill_count += 1 */ __pyx_t_12 = ((__pyx_v_fill_count < __pyx_v_lim) != 0); if (__pyx_t_12) { /* "pandas/src/generated.pyx":611 * indexer[j] = i * elif fill_count < lim: * indexer[j] = i # <<<<<<<<<<<<<< * fill_count += 1 * j += 1 */ __pyx_t_28 = __pyx_v_j; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_28, __pyx_pybuffernd_indexer.diminfo[0].strides) = __pyx_v_i; /* "pandas/src/generated.pyx":612 * elif fill_count < lim: * indexer[j] = i * fill_count += 1 # <<<<<<<<<<<<<< * j += 1 * */ __pyx_v_fill_count = (__pyx_v_fill_count + 1); goto __pyx_L17; } __pyx_L17:; /* "pandas/src/generated.pyx":613 * indexer[j] = i * fill_count += 1 * j += 1 # <<<<<<<<<<<<<< * * fill_count = 0 */ __pyx_v_j = (__pyx_v_j + 1); } /* "pandas/src/generated.pyx":615 * j += 1 * * fill_count = 0 # <<<<<<<<<<<<<< * i += 1 * cur = next */ __pyx_v_fill_count = 0; /* "pandas/src/generated.pyx":616 * * fill_count = 0 * i += 1 # <<<<<<<<<<<<<< * cur = next * */ __pyx_v_i = (__pyx_v_i + 1); /* "pandas/src/generated.pyx":617 * fill_count = 0 * i += 1 * cur = next # <<<<<<<<<<<<<< * * return indexer */ __pyx_v_cur = __pyx_v_next; } __pyx_L9_break:; /* "pandas/src/generated.pyx":619 * cur = next * * return indexer # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_indexer)); __pyx_r = ((PyObject *)__pyx_v_indexer); goto __pyx_L0; __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_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_new.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_old.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.pad_bool", __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_new.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_old.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_indexer); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_127backfill_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_127backfill_float64 = {__Pyx_NAMESTR("backfill_float64"), (PyCFunction)__pyx_pw_6pandas_5algos_127backfill_float64, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_127backfill_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_old = 0; PyArrayObject *__pyx_v_new = 0; PyObject *__pyx_v_limit = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("backfill_float64 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__old,&__pyx_n_s__new,&__pyx_n_s__limit,0}; PyObject* values[3] = {0,0,0}; /* "pandas/src/generated.pyx":625 * @cython.wraparound(False) * def backfill_float64(ndarray[float64_t] old, ndarray[float64_t] new, * limit=None): # <<<<<<<<<<<<<< * cdef Py_ssize_t i, j, nleft, nright * cdef ndarray[int64_t, ndim=1] indexer */ values[2] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__old)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__new)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("backfill_float64", 0, 2, 3, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 624; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__limit); if (value) { values[2] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "backfill_float64") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 624; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_old = ((PyArrayObject *)values[0]); __pyx_v_new = ((PyArrayObject *)values[1]); __pyx_v_limit = values[2]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("backfill_float64", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 624; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.backfill_float64", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_old), __pyx_ptype_5numpy_ndarray, 1, "old", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 624; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_new), __pyx_ptype_5numpy_ndarray, 1, "new", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 624; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_126backfill_float64(__pyx_self, __pyx_v_old, __pyx_v_new, __pyx_v_limit); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":624 * @cython.boundscheck(False) * @cython.wraparound(False) * def backfill_float64(ndarray[float64_t] old, ndarray[float64_t] new, # <<<<<<<<<<<<<< * limit=None): * cdef Py_ssize_t i, j, nleft, nright */ static PyObject *__pyx_pf_6pandas_5algos_126backfill_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_old, PyArrayObject *__pyx_v_new, PyObject *__pyx_v_limit) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_nleft; Py_ssize_t __pyx_v_nright; PyArrayObject *__pyx_v_indexer = 0; __pyx_t_5numpy_float64_t __pyx_v_cur; __pyx_t_5numpy_float64_t __pyx_v_prev; int __pyx_v_lim; int __pyx_v_fill_count; __Pyx_LocalBuf_ND __pyx_pybuffernd_indexer; __Pyx_Buffer __pyx_pybuffer_indexer; __Pyx_LocalBuf_ND __pyx_pybuffernd_new; __Pyx_Buffer __pyx_pybuffer_new; __Pyx_LocalBuf_ND __pyx_pybuffernd_old; __Pyx_Buffer __pyx_pybuffer_old; 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; int __pyx_t_12; int __pyx_t_13; long __pyx_t_14; 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; __pyx_t_5numpy_float64_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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("backfill_float64", 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_old.pybuffer.buf = NULL; __pyx_pybuffer_old.refcount = 0; __pyx_pybuffernd_old.data = NULL; __pyx_pybuffernd_old.rcbuffer = &__pyx_pybuffer_old; __pyx_pybuffer_new.pybuffer.buf = NULL; __pyx_pybuffer_new.refcount = 0; __pyx_pybuffernd_new.data = NULL; __pyx_pybuffernd_new.rcbuffer = &__pyx_pybuffer_new; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_old.rcbuffer->pybuffer, (PyObject*)__pyx_v_old, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 624; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_old.diminfo[0].strides = __pyx_pybuffernd_old.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_old.diminfo[0].shape = __pyx_pybuffernd_old.rcbuffer->pybuffer.shape[0]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_new.rcbuffer->pybuffer, (PyObject*)__pyx_v_new, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 624; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_new.diminfo[0].strides = __pyx_pybuffernd_new.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_new.diminfo[0].shape = __pyx_pybuffernd_new.rcbuffer->pybuffer.shape[0]; /* "pandas/src/generated.pyx":629 * cdef ndarray[int64_t, ndim=1] indexer * cdef float64_t cur, prev * cdef int lim, fill_count = 0 # <<<<<<<<<<<<<< * * nleft = len(old) */ __pyx_v_fill_count = 0; /* "pandas/src/generated.pyx":631 * cdef int lim, fill_count = 0 * * nleft = len(old) # <<<<<<<<<<<<<< * nright = len(new) * indexer = np.empty(nright, dtype=np.int64) */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_old)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 631; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_nleft = __pyx_t_1; /* "pandas/src/generated.pyx":632 * * nleft = len(old) * nright = len(new) # <<<<<<<<<<<<<< * indexer = np.empty(nright, dtype=np.int64) * indexer.fill(-1) */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_new)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 632; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_nright = __pyx_t_1; /* "pandas/src/generated.pyx":633 * nleft = len(old) * nright = len(new) * indexer = np.empty(nright, dtype=np.int64) # <<<<<<<<<<<<<< * indexer.fill(-1) * */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 633; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 633; __pyx_clineno = __LINE__; goto __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_nright); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 633; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 633; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 633; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_2)); __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 633; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s__int64); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 633; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__dtype), __pyx_t_6) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 633; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 633; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __Pyx_DECREF(((PyObject *)__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_filename = __pyx_f[2]; __pyx_lineno = 633; __pyx_clineno = __LINE__; goto __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_int64_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_int64_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_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_filename = __pyx_f[2]; __pyx_lineno = 633; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_7 = 0; __pyx_v_indexer = ((PyArrayObject *)__pyx_t_6); __pyx_t_6 = 0; /* "pandas/src/generated.pyx":634 * nright = len(new) * indexer = np.empty(nright, dtype=np.int64) * indexer.fill(-1) # <<<<<<<<<<<<<< * * if limit is None: */ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_indexer), __pyx_n_s__fill); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 634; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_2 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_k_tuple_63), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 634; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":636 * indexer.fill(-1) * * if limit is None: # <<<<<<<<<<<<<< * lim = nright * else: */ __pyx_t_12 = (__pyx_v_limit == Py_None); __pyx_t_13 = (__pyx_t_12 != 0); if (__pyx_t_13) { /* "pandas/src/generated.pyx":637 * * if limit is None: * lim = nright # <<<<<<<<<<<<<< * else: * if limit < 0: */ __pyx_v_lim = __pyx_v_nright; goto __pyx_L3; } /*else*/ { /* "pandas/src/generated.pyx":639 * lim = nright * else: * if limit < 0: # <<<<<<<<<<<<<< * raise ValueError('Limit must be non-negative') * lim = limit */ __pyx_t_2 = PyObject_RichCompare(__pyx_v_limit, __pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 639; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_13 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 639; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_13) { /* "pandas/src/generated.pyx":640 * else: * if limit < 0: * raise ValueError('Limit must be non-negative') # <<<<<<<<<<<<<< * lim = limit * */ __pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_64), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 640; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 640; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L4; } __pyx_L4:; /* "pandas/src/generated.pyx":641 * if limit < 0: * raise ValueError('Limit must be non-negative') * lim = limit # <<<<<<<<<<<<<< * * if nleft == 0 or nright == 0 or new[0] > old[nleft - 1]: */ __pyx_t_8 = __Pyx_PyInt_AsInt(__pyx_v_limit); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 641; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_lim = __pyx_t_8; } __pyx_L3:; /* "pandas/src/generated.pyx":643 * lim = limit * * if nleft == 0 or nright == 0 or new[0] > old[nleft - 1]: # <<<<<<<<<<<<<< * return indexer * */ __pyx_t_13 = ((__pyx_v_nleft == 0) != 0); if (!__pyx_t_13) { __pyx_t_12 = ((__pyx_v_nright == 0) != 0); if (!__pyx_t_12) { __pyx_t_14 = 0; __pyx_t_1 = (__pyx_v_nleft - 1); __pyx_t_15 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_new.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_new.diminfo[0].strides)) > (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_old.rcbuffer->pybuffer.buf, __pyx_t_1, __pyx_pybuffernd_old.diminfo[0].strides))) != 0); __pyx_t_16 = __pyx_t_15; } else { __pyx_t_16 = __pyx_t_12; } __pyx_t_12 = __pyx_t_16; } else { __pyx_t_12 = __pyx_t_13; } if (__pyx_t_12) { /* "pandas/src/generated.pyx":644 * * if nleft == 0 or nright == 0 or new[0] > old[nleft - 1]: * return indexer # <<<<<<<<<<<<<< * * i = nleft - 1 */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_indexer)); __pyx_r = ((PyObject *)__pyx_v_indexer); goto __pyx_L0; goto __pyx_L5; } __pyx_L5:; /* "pandas/src/generated.pyx":646 * return indexer * * i = nleft - 1 # <<<<<<<<<<<<<< * j = nright - 1 * */ __pyx_v_i = (__pyx_v_nleft - 1); /* "pandas/src/generated.pyx":647 * * i = nleft - 1 * j = nright - 1 # <<<<<<<<<<<<<< * * cur = old[nleft - 1] */ __pyx_v_j = (__pyx_v_nright - 1); /* "pandas/src/generated.pyx":649 * j = nright - 1 * * cur = old[nleft - 1] # <<<<<<<<<<<<<< * * while j >= 0 and new[j] > cur: */ __pyx_t_17 = (__pyx_v_nleft - 1); __pyx_v_cur = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_old.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_old.diminfo[0].strides)); /* "pandas/src/generated.pyx":651 * cur = old[nleft - 1] * * while j >= 0 and new[j] > cur: # <<<<<<<<<<<<<< * j -= 1 * */ while (1) { __pyx_t_12 = ((__pyx_v_j >= 0) != 0); if (__pyx_t_12) { __pyx_t_18 = __pyx_v_j; __pyx_t_13 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_new.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_new.diminfo[0].strides)) > __pyx_v_cur) != 0); __pyx_t_16 = __pyx_t_13; } else { __pyx_t_16 = __pyx_t_12; } if (!__pyx_t_16) break; /* "pandas/src/generated.pyx":652 * * while j >= 0 and new[j] > cur: * j -= 1 # <<<<<<<<<<<<<< * * while True: */ __pyx_v_j = (__pyx_v_j - 1); } /* "pandas/src/generated.pyx":654 * j -= 1 * * while True: # <<<<<<<<<<<<<< * if j < 0: * break */ while (1) { if (!1) break; /* "pandas/src/generated.pyx":655 * * while True: * if j < 0: # <<<<<<<<<<<<<< * break * */ __pyx_t_16 = ((__pyx_v_j < 0) != 0); if (__pyx_t_16) { /* "pandas/src/generated.pyx":656 * while True: * if j < 0: * break # <<<<<<<<<<<<<< * * if i == 0: */ goto __pyx_L9_break; goto __pyx_L10; } __pyx_L10:; /* "pandas/src/generated.pyx":658 * break * * if i == 0: # <<<<<<<<<<<<<< * while j >= 0: * if new[j] == cur: */ __pyx_t_16 = ((__pyx_v_i == 0) != 0); if (__pyx_t_16) { /* "pandas/src/generated.pyx":659 * * if i == 0: * while j >= 0: # <<<<<<<<<<<<<< * if new[j] == cur: * indexer[j] = i */ while (1) { __pyx_t_16 = ((__pyx_v_j >= 0) != 0); if (!__pyx_t_16) break; /* "pandas/src/generated.pyx":660 * if i == 0: * while j >= 0: * if new[j] == cur: # <<<<<<<<<<<<<< * indexer[j] = i * elif new[j] < cur and fill_count < lim: */ __pyx_t_19 = __pyx_v_j; __pyx_t_16 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_new.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_new.diminfo[0].strides)) == __pyx_v_cur) != 0); if (__pyx_t_16) { /* "pandas/src/generated.pyx":661 * while j >= 0: * if new[j] == cur: * indexer[j] = i # <<<<<<<<<<<<<< * elif new[j] < cur and fill_count < lim: * indexer[j] = i */ __pyx_t_20 = __pyx_v_j; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_indexer.diminfo[0].strides) = __pyx_v_i; goto __pyx_L14; } /* "pandas/src/generated.pyx":662 * if new[j] == cur: * indexer[j] = i * elif new[j] < cur and fill_count < lim: # <<<<<<<<<<<<<< * indexer[j] = i * fill_count += 1 */ __pyx_t_21 = __pyx_v_j; __pyx_t_16 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_new.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_new.diminfo[0].strides)) < __pyx_v_cur) != 0); if (__pyx_t_16) { __pyx_t_12 = ((__pyx_v_fill_count < __pyx_v_lim) != 0); __pyx_t_13 = __pyx_t_12; } else { __pyx_t_13 = __pyx_t_16; } if (__pyx_t_13) { /* "pandas/src/generated.pyx":663 * indexer[j] = i * elif new[j] < cur and fill_count < lim: * indexer[j] = i # <<<<<<<<<<<<<< * fill_count += 1 * j -= 1 */ __pyx_t_22 = __pyx_v_j; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_22, __pyx_pybuffernd_indexer.diminfo[0].strides) = __pyx_v_i; /* "pandas/src/generated.pyx":664 * elif new[j] < cur and fill_count < lim: * indexer[j] = i * fill_count += 1 # <<<<<<<<<<<<<< * j -= 1 * break */ __pyx_v_fill_count = (__pyx_v_fill_count + 1); goto __pyx_L14; } __pyx_L14:; /* "pandas/src/generated.pyx":665 * indexer[j] = i * fill_count += 1 * j -= 1 # <<<<<<<<<<<<<< * break * */ __pyx_v_j = (__pyx_v_j - 1); } /* "pandas/src/generated.pyx":666 * fill_count += 1 * j -= 1 * break # <<<<<<<<<<<<<< * * prev = old[i - 1] */ goto __pyx_L9_break; goto __pyx_L11; } __pyx_L11:; /* "pandas/src/generated.pyx":668 * break * * prev = old[i - 1] # <<<<<<<<<<<<<< * * while j >= 0 and prev < new[j] <= cur: */ __pyx_t_23 = (__pyx_v_i - 1); __pyx_v_prev = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_old.rcbuffer->pybuffer.buf, __pyx_t_23, __pyx_pybuffernd_old.diminfo[0].strides)); /* "pandas/src/generated.pyx":670 * prev = old[i - 1] * * while j >= 0 and prev < new[j] <= cur: # <<<<<<<<<<<<<< * if new[j] == cur: * indexer[j] = i */ while (1) { __pyx_t_13 = ((__pyx_v_j >= 0) != 0); if (__pyx_t_13) { __pyx_t_24 = __pyx_v_j; __pyx_t_25 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_new.rcbuffer->pybuffer.buf, __pyx_t_24, __pyx_pybuffernd_new.diminfo[0].strides)); __pyx_t_16 = (__pyx_v_prev < __pyx_t_25); if (__pyx_t_16) { __pyx_t_16 = (__pyx_t_25 <= __pyx_v_cur); } __pyx_t_12 = (__pyx_t_16 != 0); } else { __pyx_t_12 = __pyx_t_13; } if (!__pyx_t_12) break; /* "pandas/src/generated.pyx":671 * * while j >= 0 and prev < new[j] <= cur: * if new[j] == cur: # <<<<<<<<<<<<<< * indexer[j] = i * elif new[j] < cur and fill_count < lim: */ __pyx_t_26 = __pyx_v_j; __pyx_t_12 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_new.rcbuffer->pybuffer.buf, __pyx_t_26, __pyx_pybuffernd_new.diminfo[0].strides)) == __pyx_v_cur) != 0); if (__pyx_t_12) { /* "pandas/src/generated.pyx":672 * while j >= 0 and prev < new[j] <= cur: * if new[j] == cur: * indexer[j] = i # <<<<<<<<<<<<<< * elif new[j] < cur and fill_count < lim: * indexer[j] = i */ __pyx_t_27 = __pyx_v_j; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_27, __pyx_pybuffernd_indexer.diminfo[0].strides) = __pyx_v_i; goto __pyx_L17; } /* "pandas/src/generated.pyx":673 * if new[j] == cur: * indexer[j] = i * elif new[j] < cur and fill_count < lim: # <<<<<<<<<<<<<< * indexer[j] = i * fill_count += 1 */ __pyx_t_28 = __pyx_v_j; __pyx_t_12 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_new.rcbuffer->pybuffer.buf, __pyx_t_28, __pyx_pybuffernd_new.diminfo[0].strides)) < __pyx_v_cur) != 0); if (__pyx_t_12) { __pyx_t_13 = ((__pyx_v_fill_count < __pyx_v_lim) != 0); __pyx_t_16 = __pyx_t_13; } else { __pyx_t_16 = __pyx_t_12; } if (__pyx_t_16) { /* "pandas/src/generated.pyx":674 * indexer[j] = i * elif new[j] < cur and fill_count < lim: * indexer[j] = i # <<<<<<<<<<<<<< * fill_count += 1 * j -= 1 */ __pyx_t_29 = __pyx_v_j; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_29, __pyx_pybuffernd_indexer.diminfo[0].strides) = __pyx_v_i; /* "pandas/src/generated.pyx":675 * elif new[j] < cur and fill_count < lim: * indexer[j] = i * fill_count += 1 # <<<<<<<<<<<<<< * j -= 1 * */ __pyx_v_fill_count = (__pyx_v_fill_count + 1); goto __pyx_L17; } __pyx_L17:; /* "pandas/src/generated.pyx":676 * indexer[j] = i * fill_count += 1 * j -= 1 # <<<<<<<<<<<<<< * * fill_count = 0 */ __pyx_v_j = (__pyx_v_j - 1); } /* "pandas/src/generated.pyx":678 * j -= 1 * * fill_count = 0 # <<<<<<<<<<<<<< * i -= 1 * cur = prev */ __pyx_v_fill_count = 0; /* "pandas/src/generated.pyx":679 * * fill_count = 0 * i -= 1 # <<<<<<<<<<<<<< * cur = prev * */ __pyx_v_i = (__pyx_v_i - 1); /* "pandas/src/generated.pyx":680 * fill_count = 0 * i -= 1 * cur = prev # <<<<<<<<<<<<<< * * return indexer */ __pyx_v_cur = __pyx_v_prev; } __pyx_L9_break:; /* "pandas/src/generated.pyx":682 * cur = prev * * return indexer # <<<<<<<<<<<<<< * * @cython.boundscheck(False) */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_indexer)); __pyx_r = ((PyObject *)__pyx_v_indexer); goto __pyx_L0; __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_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_new.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_old.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.backfill_float64", __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_new.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_old.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_indexer); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_129backfill_float32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_129backfill_float32 = {__Pyx_NAMESTR("backfill_float32"), (PyCFunction)__pyx_pw_6pandas_5algos_129backfill_float32, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_129backfill_float32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_old = 0; PyArrayObject *__pyx_v_new = 0; PyObject *__pyx_v_limit = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("backfill_float32 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__old,&__pyx_n_s__new,&__pyx_n_s__limit,0}; PyObject* values[3] = {0,0,0}; /* "pandas/src/generated.pyx":687 * @cython.wraparound(False) * def backfill_float32(ndarray[float32_t] old, ndarray[float32_t] new, * limit=None): # <<<<<<<<<<<<<< * cdef Py_ssize_t i, j, nleft, nright * cdef ndarray[int64_t, ndim=1] indexer */ values[2] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__old)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__new)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("backfill_float32", 0, 2, 3, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 686; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__limit); if (value) { values[2] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "backfill_float32") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 686; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_old = ((PyArrayObject *)values[0]); __pyx_v_new = ((PyArrayObject *)values[1]); __pyx_v_limit = values[2]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("backfill_float32", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 686; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.backfill_float32", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_old), __pyx_ptype_5numpy_ndarray, 1, "old", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 686; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_new), __pyx_ptype_5numpy_ndarray, 1, "new", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 686; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_128backfill_float32(__pyx_self, __pyx_v_old, __pyx_v_new, __pyx_v_limit); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":686 * @cython.boundscheck(False) * @cython.wraparound(False) * def backfill_float32(ndarray[float32_t] old, ndarray[float32_t] new, # <<<<<<<<<<<<<< * limit=None): * cdef Py_ssize_t i, j, nleft, nright */ static PyObject *__pyx_pf_6pandas_5algos_128backfill_float32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_old, PyArrayObject *__pyx_v_new, PyObject *__pyx_v_limit) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_nleft; Py_ssize_t __pyx_v_nright; PyArrayObject *__pyx_v_indexer = 0; __pyx_t_5numpy_float32_t __pyx_v_cur; __pyx_t_5numpy_float32_t __pyx_v_prev; int __pyx_v_lim; int __pyx_v_fill_count; __Pyx_LocalBuf_ND __pyx_pybuffernd_indexer; __Pyx_Buffer __pyx_pybuffer_indexer; __Pyx_LocalBuf_ND __pyx_pybuffernd_new; __Pyx_Buffer __pyx_pybuffer_new; __Pyx_LocalBuf_ND __pyx_pybuffernd_old; __Pyx_Buffer __pyx_pybuffer_old; 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; int __pyx_t_12; int __pyx_t_13; long __pyx_t_14; 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; __pyx_t_5numpy_float32_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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("backfill_float32", 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_old.pybuffer.buf = NULL; __pyx_pybuffer_old.refcount = 0; __pyx_pybuffernd_old.data = NULL; __pyx_pybuffernd_old.rcbuffer = &__pyx_pybuffer_old; __pyx_pybuffer_new.pybuffer.buf = NULL; __pyx_pybuffer_new.refcount = 0; __pyx_pybuffernd_new.data = NULL; __pyx_pybuffernd_new.rcbuffer = &__pyx_pybuffer_new; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_old.rcbuffer->pybuffer, (PyObject*)__pyx_v_old, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 686; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_old.diminfo[0].strides = __pyx_pybuffernd_old.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_old.diminfo[0].shape = __pyx_pybuffernd_old.rcbuffer->pybuffer.shape[0]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_new.rcbuffer->pybuffer, (PyObject*)__pyx_v_new, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 686; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_new.diminfo[0].strides = __pyx_pybuffernd_new.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_new.diminfo[0].shape = __pyx_pybuffernd_new.rcbuffer->pybuffer.shape[0]; /* "pandas/src/generated.pyx":691 * cdef ndarray[int64_t, ndim=1] indexer * cdef float32_t cur, prev * cdef int lim, fill_count = 0 # <<<<<<<<<<<<<< * * nleft = len(old) */ __pyx_v_fill_count = 0; /* "pandas/src/generated.pyx":693 * cdef int lim, fill_count = 0 * * nleft = len(old) # <<<<<<<<<<<<<< * nright = len(new) * indexer = np.empty(nright, dtype=np.int64) */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_old)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 693; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_nleft = __pyx_t_1; /* "pandas/src/generated.pyx":694 * * nleft = len(old) * nright = len(new) # <<<<<<<<<<<<<< * indexer = np.empty(nright, dtype=np.int64) * indexer.fill(-1) */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_new)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 694; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_nright = __pyx_t_1; /* "pandas/src/generated.pyx":695 * nleft = len(old) * nright = len(new) * indexer = np.empty(nright, dtype=np.int64) # <<<<<<<<<<<<<< * indexer.fill(-1) * */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 695; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 695; __pyx_clineno = __LINE__; goto __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_nright); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 695; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 695; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 695; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_2)); __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 695; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s__int64); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 695; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__dtype), __pyx_t_6) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 695; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 695; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __Pyx_DECREF(((PyObject *)__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_filename = __pyx_f[2]; __pyx_lineno = 695; __pyx_clineno = __LINE__; goto __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_int64_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_int64_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_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_filename = __pyx_f[2]; __pyx_lineno = 695; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_7 = 0; __pyx_v_indexer = ((PyArrayObject *)__pyx_t_6); __pyx_t_6 = 0; /* "pandas/src/generated.pyx":696 * nright = len(new) * indexer = np.empty(nright, dtype=np.int64) * indexer.fill(-1) # <<<<<<<<<<<<<< * * if limit is None: */ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_indexer), __pyx_n_s__fill); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 696; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_2 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_k_tuple_65), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 696; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":698 * indexer.fill(-1) * * if limit is None: # <<<<<<<<<<<<<< * lim = nright * else: */ __pyx_t_12 = (__pyx_v_limit == Py_None); __pyx_t_13 = (__pyx_t_12 != 0); if (__pyx_t_13) { /* "pandas/src/generated.pyx":699 * * if limit is None: * lim = nright # <<<<<<<<<<<<<< * else: * if limit < 0: */ __pyx_v_lim = __pyx_v_nright; goto __pyx_L3; } /*else*/ { /* "pandas/src/generated.pyx":701 * lim = nright * else: * if limit < 0: # <<<<<<<<<<<<<< * raise ValueError('Limit must be non-negative') * lim = limit */ __pyx_t_2 = PyObject_RichCompare(__pyx_v_limit, __pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 701; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_13 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 701; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_13) { /* "pandas/src/generated.pyx":702 * else: * if limit < 0: * raise ValueError('Limit must be non-negative') # <<<<<<<<<<<<<< * lim = limit * */ __pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_66), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 702; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 702; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L4; } __pyx_L4:; /* "pandas/src/generated.pyx":703 * if limit < 0: * raise ValueError('Limit must be non-negative') * lim = limit # <<<<<<<<<<<<<< * * if nleft == 0 or nright == 0 or new[0] > old[nleft - 1]: */ __pyx_t_8 = __Pyx_PyInt_AsInt(__pyx_v_limit); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 703; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_lim = __pyx_t_8; } __pyx_L3:; /* "pandas/src/generated.pyx":705 * lim = limit * * if nleft == 0 or nright == 0 or new[0] > old[nleft - 1]: # <<<<<<<<<<<<<< * return indexer * */ __pyx_t_13 = ((__pyx_v_nleft == 0) != 0); if (!__pyx_t_13) { __pyx_t_12 = ((__pyx_v_nright == 0) != 0); if (!__pyx_t_12) { __pyx_t_14 = 0; __pyx_t_1 = (__pyx_v_nleft - 1); __pyx_t_15 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_new.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_new.diminfo[0].strides)) > (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_old.rcbuffer->pybuffer.buf, __pyx_t_1, __pyx_pybuffernd_old.diminfo[0].strides))) != 0); __pyx_t_16 = __pyx_t_15; } else { __pyx_t_16 = __pyx_t_12; } __pyx_t_12 = __pyx_t_16; } else { __pyx_t_12 = __pyx_t_13; } if (__pyx_t_12) { /* "pandas/src/generated.pyx":706 * * if nleft == 0 or nright == 0 or new[0] > old[nleft - 1]: * return indexer # <<<<<<<<<<<<<< * * i = nleft - 1 */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_indexer)); __pyx_r = ((PyObject *)__pyx_v_indexer); goto __pyx_L0; goto __pyx_L5; } __pyx_L5:; /* "pandas/src/generated.pyx":708 * return indexer * * i = nleft - 1 # <<<<<<<<<<<<<< * j = nright - 1 * */ __pyx_v_i = (__pyx_v_nleft - 1); /* "pandas/src/generated.pyx":709 * * i = nleft - 1 * j = nright - 1 # <<<<<<<<<<<<<< * * cur = old[nleft - 1] */ __pyx_v_j = (__pyx_v_nright - 1); /* "pandas/src/generated.pyx":711 * j = nright - 1 * * cur = old[nleft - 1] # <<<<<<<<<<<<<< * * while j >= 0 and new[j] > cur: */ __pyx_t_17 = (__pyx_v_nleft - 1); __pyx_v_cur = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_old.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_old.diminfo[0].strides)); /* "pandas/src/generated.pyx":713 * cur = old[nleft - 1] * * while j >= 0 and new[j] > cur: # <<<<<<<<<<<<<< * j -= 1 * */ while (1) { __pyx_t_12 = ((__pyx_v_j >= 0) != 0); if (__pyx_t_12) { __pyx_t_18 = __pyx_v_j; __pyx_t_13 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_new.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_new.diminfo[0].strides)) > __pyx_v_cur) != 0); __pyx_t_16 = __pyx_t_13; } else { __pyx_t_16 = __pyx_t_12; } if (!__pyx_t_16) break; /* "pandas/src/generated.pyx":714 * * while j >= 0 and new[j] > cur: * j -= 1 # <<<<<<<<<<<<<< * * while True: */ __pyx_v_j = (__pyx_v_j - 1); } /* "pandas/src/generated.pyx":716 * j -= 1 * * while True: # <<<<<<<<<<<<<< * if j < 0: * break */ while (1) { if (!1) break; /* "pandas/src/generated.pyx":717 * * while True: * if j < 0: # <<<<<<<<<<<<<< * break * */ __pyx_t_16 = ((__pyx_v_j < 0) != 0); if (__pyx_t_16) { /* "pandas/src/generated.pyx":718 * while True: * if j < 0: * break # <<<<<<<<<<<<<< * * if i == 0: */ goto __pyx_L9_break; goto __pyx_L10; } __pyx_L10:; /* "pandas/src/generated.pyx":720 * break * * if i == 0: # <<<<<<<<<<<<<< * while j >= 0: * if new[j] == cur: */ __pyx_t_16 = ((__pyx_v_i == 0) != 0); if (__pyx_t_16) { /* "pandas/src/generated.pyx":721 * * if i == 0: * while j >= 0: # <<<<<<<<<<<<<< * if new[j] == cur: * indexer[j] = i */ while (1) { __pyx_t_16 = ((__pyx_v_j >= 0) != 0); if (!__pyx_t_16) break; /* "pandas/src/generated.pyx":722 * if i == 0: * while j >= 0: * if new[j] == cur: # <<<<<<<<<<<<<< * indexer[j] = i * elif new[j] < cur and fill_count < lim: */ __pyx_t_19 = __pyx_v_j; __pyx_t_16 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_new.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_new.diminfo[0].strides)) == __pyx_v_cur) != 0); if (__pyx_t_16) { /* "pandas/src/generated.pyx":723 * while j >= 0: * if new[j] == cur: * indexer[j] = i # <<<<<<<<<<<<<< * elif new[j] < cur and fill_count < lim: * indexer[j] = i */ __pyx_t_20 = __pyx_v_j; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_indexer.diminfo[0].strides) = __pyx_v_i; goto __pyx_L14; } /* "pandas/src/generated.pyx":724 * if new[j] == cur: * indexer[j] = i * elif new[j] < cur and fill_count < lim: # <<<<<<<<<<<<<< * indexer[j] = i * fill_count += 1 */ __pyx_t_21 = __pyx_v_j; __pyx_t_16 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_new.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_new.diminfo[0].strides)) < __pyx_v_cur) != 0); if (__pyx_t_16) { __pyx_t_12 = ((__pyx_v_fill_count < __pyx_v_lim) != 0); __pyx_t_13 = __pyx_t_12; } else { __pyx_t_13 = __pyx_t_16; } if (__pyx_t_13) { /* "pandas/src/generated.pyx":725 * indexer[j] = i * elif new[j] < cur and fill_count < lim: * indexer[j] = i # <<<<<<<<<<<<<< * fill_count += 1 * j -= 1 */ __pyx_t_22 = __pyx_v_j; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_22, __pyx_pybuffernd_indexer.diminfo[0].strides) = __pyx_v_i; /* "pandas/src/generated.pyx":726 * elif new[j] < cur and fill_count < lim: * indexer[j] = i * fill_count += 1 # <<<<<<<<<<<<<< * j -= 1 * break */ __pyx_v_fill_count = (__pyx_v_fill_count + 1); goto __pyx_L14; } __pyx_L14:; /* "pandas/src/generated.pyx":727 * indexer[j] = i * fill_count += 1 * j -= 1 # <<<<<<<<<<<<<< * break * */ __pyx_v_j = (__pyx_v_j - 1); } /* "pandas/src/generated.pyx":728 * fill_count += 1 * j -= 1 * break # <<<<<<<<<<<<<< * * prev = old[i - 1] */ goto __pyx_L9_break; goto __pyx_L11; } __pyx_L11:; /* "pandas/src/generated.pyx":730 * break * * prev = old[i - 1] # <<<<<<<<<<<<<< * * while j >= 0 and prev < new[j] <= cur: */ __pyx_t_23 = (__pyx_v_i - 1); __pyx_v_prev = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_old.rcbuffer->pybuffer.buf, __pyx_t_23, __pyx_pybuffernd_old.diminfo[0].strides)); /* "pandas/src/generated.pyx":732 * prev = old[i - 1] * * while j >= 0 and prev < new[j] <= cur: # <<<<<<<<<<<<<< * if new[j] == cur: * indexer[j] = i */ while (1) { __pyx_t_13 = ((__pyx_v_j >= 0) != 0); if (__pyx_t_13) { __pyx_t_24 = __pyx_v_j; __pyx_t_25 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_new.rcbuffer->pybuffer.buf, __pyx_t_24, __pyx_pybuffernd_new.diminfo[0].strides)); __pyx_t_16 = (__pyx_v_prev < __pyx_t_25); if (__pyx_t_16) { __pyx_t_16 = (__pyx_t_25 <= __pyx_v_cur); } __pyx_t_12 = (__pyx_t_16 != 0); } else { __pyx_t_12 = __pyx_t_13; } if (!__pyx_t_12) break; /* "pandas/src/generated.pyx":733 * * while j >= 0 and prev < new[j] <= cur: * if new[j] == cur: # <<<<<<<<<<<<<< * indexer[j] = i * elif new[j] < cur and fill_count < lim: */ __pyx_t_26 = __pyx_v_j; __pyx_t_12 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_new.rcbuffer->pybuffer.buf, __pyx_t_26, __pyx_pybuffernd_new.diminfo[0].strides)) == __pyx_v_cur) != 0); if (__pyx_t_12) { /* "pandas/src/generated.pyx":734 * while j >= 0 and prev < new[j] <= cur: * if new[j] == cur: * indexer[j] = i # <<<<<<<<<<<<<< * elif new[j] < cur and fill_count < lim: * indexer[j] = i */ __pyx_t_27 = __pyx_v_j; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_27, __pyx_pybuffernd_indexer.diminfo[0].strides) = __pyx_v_i; goto __pyx_L17; } /* "pandas/src/generated.pyx":735 * if new[j] == cur: * indexer[j] = i * elif new[j] < cur and fill_count < lim: # <<<<<<<<<<<<<< * indexer[j] = i * fill_count += 1 */ __pyx_t_28 = __pyx_v_j; __pyx_t_12 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_new.rcbuffer->pybuffer.buf, __pyx_t_28, __pyx_pybuffernd_new.diminfo[0].strides)) < __pyx_v_cur) != 0); if (__pyx_t_12) { __pyx_t_13 = ((__pyx_v_fill_count < __pyx_v_lim) != 0); __pyx_t_16 = __pyx_t_13; } else { __pyx_t_16 = __pyx_t_12; } if (__pyx_t_16) { /* "pandas/src/generated.pyx":736 * indexer[j] = i * elif new[j] < cur and fill_count < lim: * indexer[j] = i # <<<<<<<<<<<<<< * fill_count += 1 * j -= 1 */ __pyx_t_29 = __pyx_v_j; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_29, __pyx_pybuffernd_indexer.diminfo[0].strides) = __pyx_v_i; /* "pandas/src/generated.pyx":737 * elif new[j] < cur and fill_count < lim: * indexer[j] = i * fill_count += 1 # <<<<<<<<<<<<<< * j -= 1 * */ __pyx_v_fill_count = (__pyx_v_fill_count + 1); goto __pyx_L17; } __pyx_L17:; /* "pandas/src/generated.pyx":738 * indexer[j] = i * fill_count += 1 * j -= 1 # <<<<<<<<<<<<<< * * fill_count = 0 */ __pyx_v_j = (__pyx_v_j - 1); } /* "pandas/src/generated.pyx":740 * j -= 1 * * fill_count = 0 # <<<<<<<<<<<<<< * i -= 1 * cur = prev */ __pyx_v_fill_count = 0; /* "pandas/src/generated.pyx":741 * * fill_count = 0 * i -= 1 # <<<<<<<<<<<<<< * cur = prev * */ __pyx_v_i = (__pyx_v_i - 1); /* "pandas/src/generated.pyx":742 * fill_count = 0 * i -= 1 * cur = prev # <<<<<<<<<<<<<< * * return indexer */ __pyx_v_cur = __pyx_v_prev; } __pyx_L9_break:; /* "pandas/src/generated.pyx":744 * cur = prev * * return indexer # <<<<<<<<<<<<<< * * @cython.boundscheck(False) */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_indexer)); __pyx_r = ((PyObject *)__pyx_v_indexer); goto __pyx_L0; __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_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_new.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_old.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.backfill_float32", __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_new.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_old.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_indexer); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_131backfill_object(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_131backfill_object = {__Pyx_NAMESTR("backfill_object"), (PyCFunction)__pyx_pw_6pandas_5algos_131backfill_object, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_131backfill_object(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_old = 0; PyArrayObject *__pyx_v_new = 0; PyObject *__pyx_v_limit = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("backfill_object (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__old,&__pyx_n_s__new,&__pyx_n_s__limit,0}; PyObject* values[3] = {0,0,0}; /* "pandas/src/generated.pyx":749 * @cython.wraparound(False) * def backfill_object(ndarray[object] old, ndarray[object] new, * limit=None): # <<<<<<<<<<<<<< * cdef Py_ssize_t i, j, nleft, nright * cdef ndarray[int64_t, ndim=1] indexer */ values[2] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__old)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__new)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("backfill_object", 0, 2, 3, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 748; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__limit); if (value) { values[2] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "backfill_object") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 748; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_old = ((PyArrayObject *)values[0]); __pyx_v_new = ((PyArrayObject *)values[1]); __pyx_v_limit = values[2]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("backfill_object", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 748; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.backfill_object", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_old), __pyx_ptype_5numpy_ndarray, 1, "old", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 748; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_new), __pyx_ptype_5numpy_ndarray, 1, "new", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 748; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_130backfill_object(__pyx_self, __pyx_v_old, __pyx_v_new, __pyx_v_limit); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":748 * @cython.boundscheck(False) * @cython.wraparound(False) * def backfill_object(ndarray[object] old, ndarray[object] new, # <<<<<<<<<<<<<< * limit=None): * cdef Py_ssize_t i, j, nleft, nright */ static PyObject *__pyx_pf_6pandas_5algos_130backfill_object(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_old, PyArrayObject *__pyx_v_new, PyObject *__pyx_v_limit) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_nleft; Py_ssize_t __pyx_v_nright; PyArrayObject *__pyx_v_indexer = 0; PyObject *__pyx_v_cur = 0; PyObject *__pyx_v_prev = 0; int __pyx_v_lim; int __pyx_v_fill_count; __Pyx_LocalBuf_ND __pyx_pybuffernd_indexer; __Pyx_Buffer __pyx_pybuffer_indexer; __Pyx_LocalBuf_ND __pyx_pybuffernd_new; __Pyx_Buffer __pyx_pybuffer_new; __Pyx_LocalBuf_ND __pyx_pybuffernd_old; __Pyx_Buffer __pyx_pybuffer_old; 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; int __pyx_t_12; int __pyx_t_13; long __pyx_t_14; 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; Py_ssize_t __pyx_t_27; Py_ssize_t __pyx_t_28; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("backfill_object", 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_old.pybuffer.buf = NULL; __pyx_pybuffer_old.refcount = 0; __pyx_pybuffernd_old.data = NULL; __pyx_pybuffernd_old.rcbuffer = &__pyx_pybuffer_old; __pyx_pybuffer_new.pybuffer.buf = NULL; __pyx_pybuffer_new.refcount = 0; __pyx_pybuffernd_new.data = NULL; __pyx_pybuffernd_new.rcbuffer = &__pyx_pybuffer_new; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_old.rcbuffer->pybuffer, (PyObject*)__pyx_v_old, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 748; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_old.diminfo[0].strides = __pyx_pybuffernd_old.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_old.diminfo[0].shape = __pyx_pybuffernd_old.rcbuffer->pybuffer.shape[0]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_new.rcbuffer->pybuffer, (PyObject*)__pyx_v_new, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 748; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_new.diminfo[0].strides = __pyx_pybuffernd_new.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_new.diminfo[0].shape = __pyx_pybuffernd_new.rcbuffer->pybuffer.shape[0]; /* "pandas/src/generated.pyx":753 * cdef ndarray[int64_t, ndim=1] indexer * cdef object cur, prev * cdef int lim, fill_count = 0 # <<<<<<<<<<<<<< * * nleft = len(old) */ __pyx_v_fill_count = 0; /* "pandas/src/generated.pyx":755 * cdef int lim, fill_count = 0 * * nleft = len(old) # <<<<<<<<<<<<<< * nright = len(new) * indexer = np.empty(nright, dtype=np.int64) */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_old)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 755; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_nleft = __pyx_t_1; /* "pandas/src/generated.pyx":756 * * nleft = len(old) * nright = len(new) # <<<<<<<<<<<<<< * indexer = np.empty(nright, dtype=np.int64) * indexer.fill(-1) */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_new)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 756; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_nright = __pyx_t_1; /* "pandas/src/generated.pyx":757 * nleft = len(old) * nright = len(new) * indexer = np.empty(nright, dtype=np.int64) # <<<<<<<<<<<<<< * indexer.fill(-1) * */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 757; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 757; __pyx_clineno = __LINE__; goto __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_nright); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 757; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 757; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 757; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_2)); __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 757; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s__int64); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 757; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__dtype), __pyx_t_6) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 757; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 757; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __Pyx_DECREF(((PyObject *)__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_filename = __pyx_f[2]; __pyx_lineno = 757; __pyx_clineno = __LINE__; goto __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_int64_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_int64_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_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_filename = __pyx_f[2]; __pyx_lineno = 757; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_7 = 0; __pyx_v_indexer = ((PyArrayObject *)__pyx_t_6); __pyx_t_6 = 0; /* "pandas/src/generated.pyx":758 * nright = len(new) * indexer = np.empty(nright, dtype=np.int64) * indexer.fill(-1) # <<<<<<<<<<<<<< * * if limit is None: */ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_indexer), __pyx_n_s__fill); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 758; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_2 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_k_tuple_67), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 758; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":760 * indexer.fill(-1) * * if limit is None: # <<<<<<<<<<<<<< * lim = nright * else: */ __pyx_t_12 = (__pyx_v_limit == Py_None); __pyx_t_13 = (__pyx_t_12 != 0); if (__pyx_t_13) { /* "pandas/src/generated.pyx":761 * * if limit is None: * lim = nright # <<<<<<<<<<<<<< * else: * if limit < 0: */ __pyx_v_lim = __pyx_v_nright; goto __pyx_L3; } /*else*/ { /* "pandas/src/generated.pyx":763 * lim = nright * else: * if limit < 0: # <<<<<<<<<<<<<< * raise ValueError('Limit must be non-negative') * lim = limit */ __pyx_t_2 = PyObject_RichCompare(__pyx_v_limit, __pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 763; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_13 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 763; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_13) { /* "pandas/src/generated.pyx":764 * else: * if limit < 0: * raise ValueError('Limit must be non-negative') # <<<<<<<<<<<<<< * lim = limit * */ __pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_68), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 764; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 764; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L4; } __pyx_L4:; /* "pandas/src/generated.pyx":765 * if limit < 0: * raise ValueError('Limit must be non-negative') * lim = limit # <<<<<<<<<<<<<< * * if nleft == 0 or nright == 0 or new[0] > old[nleft - 1]: */ __pyx_t_8 = __Pyx_PyInt_AsInt(__pyx_v_limit); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 765; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_lim = __pyx_t_8; } __pyx_L3:; /* "pandas/src/generated.pyx":767 * lim = limit * * if nleft == 0 or nright == 0 or new[0] > old[nleft - 1]: # <<<<<<<<<<<<<< * return indexer * */ __pyx_t_13 = (__pyx_v_nleft == 0); if (!__pyx_t_13) { __pyx_t_12 = (__pyx_v_nright == 0); if (!__pyx_t_12) { __pyx_t_14 = 0; __pyx_t_2 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_new.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_new.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_2); __pyx_t_1 = (__pyx_v_nleft - 1); __pyx_t_6 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_old.rcbuffer->pybuffer.buf, __pyx_t_1, __pyx_pybuffernd_old.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_6); __pyx_t_4 = PyObject_RichCompare(__pyx_t_2, __pyx_t_6, Py_GT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 767; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_15 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_15 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 767; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_16 = __pyx_t_15; } else { __pyx_t_16 = __pyx_t_12; } __pyx_t_12 = __pyx_t_16; } else { __pyx_t_12 = __pyx_t_13; } if (__pyx_t_12) { /* "pandas/src/generated.pyx":768 * * if nleft == 0 or nright == 0 or new[0] > old[nleft - 1]: * return indexer # <<<<<<<<<<<<<< * * i = nleft - 1 */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_indexer)); __pyx_r = ((PyObject *)__pyx_v_indexer); goto __pyx_L0; goto __pyx_L5; } __pyx_L5:; /* "pandas/src/generated.pyx":770 * return indexer * * i = nleft - 1 # <<<<<<<<<<<<<< * j = nright - 1 * */ __pyx_v_i = (__pyx_v_nleft - 1); /* "pandas/src/generated.pyx":771 * * i = nleft - 1 * j = nright - 1 # <<<<<<<<<<<<<< * * cur = old[nleft - 1] */ __pyx_v_j = (__pyx_v_nright - 1); /* "pandas/src/generated.pyx":773 * j = nright - 1 * * cur = old[nleft - 1] # <<<<<<<<<<<<<< * * while j >= 0 and new[j] > cur: */ __pyx_t_17 = (__pyx_v_nleft - 1); __pyx_t_4 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_old.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_old.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_4); __pyx_v_cur = __pyx_t_4; __pyx_t_4 = 0; /* "pandas/src/generated.pyx":775 * cur = old[nleft - 1] * * while j >= 0 and new[j] > cur: # <<<<<<<<<<<<<< * j -= 1 * */ while (1) { __pyx_t_12 = (__pyx_v_j >= 0); if (__pyx_t_12) { __pyx_t_18 = __pyx_v_j; __pyx_t_4 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_new.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_new.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_4); __pyx_t_6 = PyObject_RichCompare(__pyx_t_4, __pyx_v_cur, Py_GT); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 775; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_13 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 775; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_16 = __pyx_t_13; } else { __pyx_t_16 = __pyx_t_12; } if (!__pyx_t_16) break; /* "pandas/src/generated.pyx":776 * * while j >= 0 and new[j] > cur: * j -= 1 # <<<<<<<<<<<<<< * * while True: */ __pyx_v_j = (__pyx_v_j - 1); } /* "pandas/src/generated.pyx":778 * j -= 1 * * while True: # <<<<<<<<<<<<<< * if j < 0: * break */ while (1) { if (!1) break; /* "pandas/src/generated.pyx":779 * * while True: * if j < 0: # <<<<<<<<<<<<<< * break * */ __pyx_t_16 = ((__pyx_v_j < 0) != 0); if (__pyx_t_16) { /* "pandas/src/generated.pyx":780 * while True: * if j < 0: * break # <<<<<<<<<<<<<< * * if i == 0: */ goto __pyx_L9_break; goto __pyx_L10; } __pyx_L10:; /* "pandas/src/generated.pyx":782 * break * * if i == 0: # <<<<<<<<<<<<<< * while j >= 0: * if new[j] == cur: */ __pyx_t_16 = ((__pyx_v_i == 0) != 0); if (__pyx_t_16) { /* "pandas/src/generated.pyx":783 * * if i == 0: * while j >= 0: # <<<<<<<<<<<<<< * if new[j] == cur: * indexer[j] = i */ while (1) { __pyx_t_16 = ((__pyx_v_j >= 0) != 0); if (!__pyx_t_16) break; /* "pandas/src/generated.pyx":784 * if i == 0: * while j >= 0: * if new[j] == cur: # <<<<<<<<<<<<<< * indexer[j] = i * elif new[j] < cur and fill_count < lim: */ __pyx_t_19 = __pyx_v_j; __pyx_t_6 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_new.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_new.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_6); __pyx_t_4 = PyObject_RichCompare(__pyx_t_6, __pyx_v_cur, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 784; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_16 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_16 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 784; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_16) { /* "pandas/src/generated.pyx":785 * while j >= 0: * if new[j] == cur: * indexer[j] = i # <<<<<<<<<<<<<< * elif new[j] < cur and fill_count < lim: * indexer[j] = i */ __pyx_t_20 = __pyx_v_j; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_indexer.diminfo[0].strides) = __pyx_v_i; goto __pyx_L14; } /* "pandas/src/generated.pyx":786 * if new[j] == cur: * indexer[j] = i * elif new[j] < cur and fill_count < lim: # <<<<<<<<<<<<<< * indexer[j] = i * fill_count += 1 */ __pyx_t_21 = __pyx_v_j; __pyx_t_4 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_new.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_new.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_4); __pyx_t_6 = PyObject_RichCompare(__pyx_t_4, __pyx_v_cur, Py_LT); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 786; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_16 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_16 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 786; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (__pyx_t_16) { __pyx_t_12 = (__pyx_v_fill_count < __pyx_v_lim); __pyx_t_13 = __pyx_t_12; } else { __pyx_t_13 = __pyx_t_16; } if (__pyx_t_13) { /* "pandas/src/generated.pyx":787 * indexer[j] = i * elif new[j] < cur and fill_count < lim: * indexer[j] = i # <<<<<<<<<<<<<< * fill_count += 1 * j -= 1 */ __pyx_t_22 = __pyx_v_j; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_22, __pyx_pybuffernd_indexer.diminfo[0].strides) = __pyx_v_i; /* "pandas/src/generated.pyx":788 * elif new[j] < cur and fill_count < lim: * indexer[j] = i * fill_count += 1 # <<<<<<<<<<<<<< * j -= 1 * break */ __pyx_v_fill_count = (__pyx_v_fill_count + 1); goto __pyx_L14; } __pyx_L14:; /* "pandas/src/generated.pyx":789 * indexer[j] = i * fill_count += 1 * j -= 1 # <<<<<<<<<<<<<< * break * */ __pyx_v_j = (__pyx_v_j - 1); } /* "pandas/src/generated.pyx":790 * fill_count += 1 * j -= 1 * break # <<<<<<<<<<<<<< * * prev = old[i - 1] */ goto __pyx_L9_break; goto __pyx_L11; } __pyx_L11:; /* "pandas/src/generated.pyx":792 * break * * prev = old[i - 1] # <<<<<<<<<<<<<< * * while j >= 0 and prev < new[j] <= cur: */ __pyx_t_23 = (__pyx_v_i - 1); __pyx_t_6 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_old.rcbuffer->pybuffer.buf, __pyx_t_23, __pyx_pybuffernd_old.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_6); __Pyx_XDECREF_SET(__pyx_v_prev, __pyx_t_6); __pyx_t_6 = 0; /* "pandas/src/generated.pyx":794 * prev = old[i - 1] * * while j >= 0 and prev < new[j] <= cur: # <<<<<<<<<<<<<< * if new[j] == cur: * indexer[j] = i */ while (1) { __pyx_t_13 = (__pyx_v_j >= 0); if (__pyx_t_13) { __pyx_t_24 = __pyx_v_j; __pyx_t_6 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_new.rcbuffer->pybuffer.buf, __pyx_t_24, __pyx_pybuffernd_new.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_6); __pyx_t_4 = PyObject_RichCompare(__pyx_v_prev, __pyx_t_6, Py_LT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 794; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__Pyx_PyObject_IsTrue(__pyx_t_4)) { __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = PyObject_RichCompare(__pyx_t_6, __pyx_v_cur, Py_LE); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 794; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_16 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_16 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 794; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_12 = __pyx_t_16; } else { __pyx_t_12 = __pyx_t_13; } if (!__pyx_t_12) break; /* "pandas/src/generated.pyx":795 * * while j >= 0 and prev < new[j] <= cur: * if new[j] == cur: # <<<<<<<<<<<<<< * indexer[j] = i * elif new[j] < cur and fill_count < lim: */ __pyx_t_25 = __pyx_v_j; __pyx_t_4 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_new.rcbuffer->pybuffer.buf, __pyx_t_25, __pyx_pybuffernd_new.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_4); __pyx_t_6 = PyObject_RichCompare(__pyx_t_4, __pyx_v_cur, Py_EQ); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 795; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_12 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 795; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (__pyx_t_12) { /* "pandas/src/generated.pyx":796 * while j >= 0 and prev < new[j] <= cur: * if new[j] == cur: * indexer[j] = i # <<<<<<<<<<<<<< * elif new[j] < cur and fill_count < lim: * indexer[j] = i */ __pyx_t_26 = __pyx_v_j; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_26, __pyx_pybuffernd_indexer.diminfo[0].strides) = __pyx_v_i; goto __pyx_L17; } /* "pandas/src/generated.pyx":797 * if new[j] == cur: * indexer[j] = i * elif new[j] < cur and fill_count < lim: # <<<<<<<<<<<<<< * indexer[j] = i * fill_count += 1 */ __pyx_t_27 = __pyx_v_j; __pyx_t_6 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_new.rcbuffer->pybuffer.buf, __pyx_t_27, __pyx_pybuffernd_new.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_6); __pyx_t_4 = PyObject_RichCompare(__pyx_t_6, __pyx_v_cur, Py_LT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 797; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_12 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 797; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_12) { __pyx_t_13 = (__pyx_v_fill_count < __pyx_v_lim); __pyx_t_16 = __pyx_t_13; } else { __pyx_t_16 = __pyx_t_12; } if (__pyx_t_16) { /* "pandas/src/generated.pyx":798 * indexer[j] = i * elif new[j] < cur and fill_count < lim: * indexer[j] = i # <<<<<<<<<<<<<< * fill_count += 1 * j -= 1 */ __pyx_t_28 = __pyx_v_j; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_28, __pyx_pybuffernd_indexer.diminfo[0].strides) = __pyx_v_i; /* "pandas/src/generated.pyx":799 * elif new[j] < cur and fill_count < lim: * indexer[j] = i * fill_count += 1 # <<<<<<<<<<<<<< * j -= 1 * */ __pyx_v_fill_count = (__pyx_v_fill_count + 1); goto __pyx_L17; } __pyx_L17:; /* "pandas/src/generated.pyx":800 * indexer[j] = i * fill_count += 1 * j -= 1 # <<<<<<<<<<<<<< * * fill_count = 0 */ __pyx_v_j = (__pyx_v_j - 1); } /* "pandas/src/generated.pyx":802 * j -= 1 * * fill_count = 0 # <<<<<<<<<<<<<< * i -= 1 * cur = prev */ __pyx_v_fill_count = 0; /* "pandas/src/generated.pyx":803 * * fill_count = 0 * i -= 1 # <<<<<<<<<<<<<< * cur = prev * */ __pyx_v_i = (__pyx_v_i - 1); /* "pandas/src/generated.pyx":804 * fill_count = 0 * i -= 1 * cur = prev # <<<<<<<<<<<<<< * * return indexer */ __Pyx_INCREF(__pyx_v_prev); __Pyx_DECREF_SET(__pyx_v_cur, __pyx_v_prev); } __pyx_L9_break:; /* "pandas/src/generated.pyx":806 * cur = prev * * return indexer # <<<<<<<<<<<<<< * * @cython.boundscheck(False) */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_indexer)); __pyx_r = ((PyObject *)__pyx_v_indexer); goto __pyx_L0; __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_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_new.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_old.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.backfill_object", __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_new.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_old.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_indexer); __Pyx_XDECREF(__pyx_v_cur); __Pyx_XDECREF(__pyx_v_prev); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_133backfill_int32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_133backfill_int32 = {__Pyx_NAMESTR("backfill_int32"), (PyCFunction)__pyx_pw_6pandas_5algos_133backfill_int32, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_133backfill_int32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_old = 0; PyArrayObject *__pyx_v_new = 0; PyObject *__pyx_v_limit = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("backfill_int32 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__old,&__pyx_n_s__new,&__pyx_n_s__limit,0}; PyObject* values[3] = {0,0,0}; /* "pandas/src/generated.pyx":811 * @cython.wraparound(False) * def backfill_int32(ndarray[int32_t] old, ndarray[int32_t] new, * limit=None): # <<<<<<<<<<<<<< * cdef Py_ssize_t i, j, nleft, nright * cdef ndarray[int64_t, ndim=1] indexer */ values[2] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__old)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__new)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("backfill_int32", 0, 2, 3, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 810; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__limit); if (value) { values[2] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "backfill_int32") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 810; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_old = ((PyArrayObject *)values[0]); __pyx_v_new = ((PyArrayObject *)values[1]); __pyx_v_limit = values[2]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("backfill_int32", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 810; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.backfill_int32", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_old), __pyx_ptype_5numpy_ndarray, 1, "old", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 810; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_new), __pyx_ptype_5numpy_ndarray, 1, "new", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 810; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_132backfill_int32(__pyx_self, __pyx_v_old, __pyx_v_new, __pyx_v_limit); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":810 * @cython.boundscheck(False) * @cython.wraparound(False) * def backfill_int32(ndarray[int32_t] old, ndarray[int32_t] new, # <<<<<<<<<<<<<< * limit=None): * cdef Py_ssize_t i, j, nleft, nright */ static PyObject *__pyx_pf_6pandas_5algos_132backfill_int32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_old, PyArrayObject *__pyx_v_new, PyObject *__pyx_v_limit) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_nleft; Py_ssize_t __pyx_v_nright; PyArrayObject *__pyx_v_indexer = 0; __pyx_t_5numpy_int32_t __pyx_v_cur; __pyx_t_5numpy_int32_t __pyx_v_prev; int __pyx_v_lim; int __pyx_v_fill_count; __Pyx_LocalBuf_ND __pyx_pybuffernd_indexer; __Pyx_Buffer __pyx_pybuffer_indexer; __Pyx_LocalBuf_ND __pyx_pybuffernd_new; __Pyx_Buffer __pyx_pybuffer_new; __Pyx_LocalBuf_ND __pyx_pybuffernd_old; __Pyx_Buffer __pyx_pybuffer_old; 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; int __pyx_t_12; int __pyx_t_13; long __pyx_t_14; 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; __pyx_t_5numpy_int32_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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("backfill_int32", 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_old.pybuffer.buf = NULL; __pyx_pybuffer_old.refcount = 0; __pyx_pybuffernd_old.data = NULL; __pyx_pybuffernd_old.rcbuffer = &__pyx_pybuffer_old; __pyx_pybuffer_new.pybuffer.buf = NULL; __pyx_pybuffer_new.refcount = 0; __pyx_pybuffernd_new.data = NULL; __pyx_pybuffernd_new.rcbuffer = &__pyx_pybuffer_new; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_old.rcbuffer->pybuffer, (PyObject*)__pyx_v_old, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 810; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_old.diminfo[0].strides = __pyx_pybuffernd_old.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_old.diminfo[0].shape = __pyx_pybuffernd_old.rcbuffer->pybuffer.shape[0]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_new.rcbuffer->pybuffer, (PyObject*)__pyx_v_new, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 810; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_new.diminfo[0].strides = __pyx_pybuffernd_new.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_new.diminfo[0].shape = __pyx_pybuffernd_new.rcbuffer->pybuffer.shape[0]; /* "pandas/src/generated.pyx":815 * cdef ndarray[int64_t, ndim=1] indexer * cdef int32_t cur, prev * cdef int lim, fill_count = 0 # <<<<<<<<<<<<<< * * nleft = len(old) */ __pyx_v_fill_count = 0; /* "pandas/src/generated.pyx":817 * cdef int lim, fill_count = 0 * * nleft = len(old) # <<<<<<<<<<<<<< * nright = len(new) * indexer = np.empty(nright, dtype=np.int64) */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_old)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 817; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_nleft = __pyx_t_1; /* "pandas/src/generated.pyx":818 * * nleft = len(old) * nright = len(new) # <<<<<<<<<<<<<< * indexer = np.empty(nright, dtype=np.int64) * indexer.fill(-1) */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_new)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 818; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_nright = __pyx_t_1; /* "pandas/src/generated.pyx":819 * nleft = len(old) * nright = len(new) * indexer = np.empty(nright, dtype=np.int64) # <<<<<<<<<<<<<< * indexer.fill(-1) * */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 819; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 819; __pyx_clineno = __LINE__; goto __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_nright); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 819; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 819; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 819; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_2)); __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 819; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s__int64); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 819; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__dtype), __pyx_t_6) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 819; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 819; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __Pyx_DECREF(((PyObject *)__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_filename = __pyx_f[2]; __pyx_lineno = 819; __pyx_clineno = __LINE__; goto __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_int64_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_int64_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_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_filename = __pyx_f[2]; __pyx_lineno = 819; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_7 = 0; __pyx_v_indexer = ((PyArrayObject *)__pyx_t_6); __pyx_t_6 = 0; /* "pandas/src/generated.pyx":820 * nright = len(new) * indexer = np.empty(nright, dtype=np.int64) * indexer.fill(-1) # <<<<<<<<<<<<<< * * if limit is None: */ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_indexer), __pyx_n_s__fill); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 820; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_2 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_k_tuple_69), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 820; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":822 * indexer.fill(-1) * * if limit is None: # <<<<<<<<<<<<<< * lim = nright * else: */ __pyx_t_12 = (__pyx_v_limit == Py_None); __pyx_t_13 = (__pyx_t_12 != 0); if (__pyx_t_13) { /* "pandas/src/generated.pyx":823 * * if limit is None: * lim = nright # <<<<<<<<<<<<<< * else: * if limit < 0: */ __pyx_v_lim = __pyx_v_nright; goto __pyx_L3; } /*else*/ { /* "pandas/src/generated.pyx":825 * lim = nright * else: * if limit < 0: # <<<<<<<<<<<<<< * raise ValueError('Limit must be non-negative') * lim = limit */ __pyx_t_2 = PyObject_RichCompare(__pyx_v_limit, __pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 825; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_13 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 825; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_13) { /* "pandas/src/generated.pyx":826 * else: * if limit < 0: * raise ValueError('Limit must be non-negative') # <<<<<<<<<<<<<< * lim = limit * */ __pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_70), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 826; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 826; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L4; } __pyx_L4:; /* "pandas/src/generated.pyx":827 * if limit < 0: * raise ValueError('Limit must be non-negative') * lim = limit # <<<<<<<<<<<<<< * * if nleft == 0 or nright == 0 or new[0] > old[nleft - 1]: */ __pyx_t_8 = __Pyx_PyInt_AsInt(__pyx_v_limit); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 827; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_lim = __pyx_t_8; } __pyx_L3:; /* "pandas/src/generated.pyx":829 * lim = limit * * if nleft == 0 or nright == 0 or new[0] > old[nleft - 1]: # <<<<<<<<<<<<<< * return indexer * */ __pyx_t_13 = ((__pyx_v_nleft == 0) != 0); if (!__pyx_t_13) { __pyx_t_12 = ((__pyx_v_nright == 0) != 0); if (!__pyx_t_12) { __pyx_t_14 = 0; __pyx_t_1 = (__pyx_v_nleft - 1); __pyx_t_15 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_new.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_new.diminfo[0].strides)) > (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_old.rcbuffer->pybuffer.buf, __pyx_t_1, __pyx_pybuffernd_old.diminfo[0].strides))) != 0); __pyx_t_16 = __pyx_t_15; } else { __pyx_t_16 = __pyx_t_12; } __pyx_t_12 = __pyx_t_16; } else { __pyx_t_12 = __pyx_t_13; } if (__pyx_t_12) { /* "pandas/src/generated.pyx":830 * * if nleft == 0 or nright == 0 or new[0] > old[nleft - 1]: * return indexer # <<<<<<<<<<<<<< * * i = nleft - 1 */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_indexer)); __pyx_r = ((PyObject *)__pyx_v_indexer); goto __pyx_L0; goto __pyx_L5; } __pyx_L5:; /* "pandas/src/generated.pyx":832 * return indexer * * i = nleft - 1 # <<<<<<<<<<<<<< * j = nright - 1 * */ __pyx_v_i = (__pyx_v_nleft - 1); /* "pandas/src/generated.pyx":833 * * i = nleft - 1 * j = nright - 1 # <<<<<<<<<<<<<< * * cur = old[nleft - 1] */ __pyx_v_j = (__pyx_v_nright - 1); /* "pandas/src/generated.pyx":835 * j = nright - 1 * * cur = old[nleft - 1] # <<<<<<<<<<<<<< * * while j >= 0 and new[j] > cur: */ __pyx_t_17 = (__pyx_v_nleft - 1); __pyx_v_cur = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_old.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_old.diminfo[0].strides)); /* "pandas/src/generated.pyx":837 * cur = old[nleft - 1] * * while j >= 0 and new[j] > cur: # <<<<<<<<<<<<<< * j -= 1 * */ while (1) { __pyx_t_12 = ((__pyx_v_j >= 0) != 0); if (__pyx_t_12) { __pyx_t_18 = __pyx_v_j; __pyx_t_13 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_new.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_new.diminfo[0].strides)) > __pyx_v_cur) != 0); __pyx_t_16 = __pyx_t_13; } else { __pyx_t_16 = __pyx_t_12; } if (!__pyx_t_16) break; /* "pandas/src/generated.pyx":838 * * while j >= 0 and new[j] > cur: * j -= 1 # <<<<<<<<<<<<<< * * while True: */ __pyx_v_j = (__pyx_v_j - 1); } /* "pandas/src/generated.pyx":840 * j -= 1 * * while True: # <<<<<<<<<<<<<< * if j < 0: * break */ while (1) { if (!1) break; /* "pandas/src/generated.pyx":841 * * while True: * if j < 0: # <<<<<<<<<<<<<< * break * */ __pyx_t_16 = ((__pyx_v_j < 0) != 0); if (__pyx_t_16) { /* "pandas/src/generated.pyx":842 * while True: * if j < 0: * break # <<<<<<<<<<<<<< * * if i == 0: */ goto __pyx_L9_break; goto __pyx_L10; } __pyx_L10:; /* "pandas/src/generated.pyx":844 * break * * if i == 0: # <<<<<<<<<<<<<< * while j >= 0: * if new[j] == cur: */ __pyx_t_16 = ((__pyx_v_i == 0) != 0); if (__pyx_t_16) { /* "pandas/src/generated.pyx":845 * * if i == 0: * while j >= 0: # <<<<<<<<<<<<<< * if new[j] == cur: * indexer[j] = i */ while (1) { __pyx_t_16 = ((__pyx_v_j >= 0) != 0); if (!__pyx_t_16) break; /* "pandas/src/generated.pyx":846 * if i == 0: * while j >= 0: * if new[j] == cur: # <<<<<<<<<<<<<< * indexer[j] = i * elif new[j] < cur and fill_count < lim: */ __pyx_t_19 = __pyx_v_j; __pyx_t_16 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_new.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_new.diminfo[0].strides)) == __pyx_v_cur) != 0); if (__pyx_t_16) { /* "pandas/src/generated.pyx":847 * while j >= 0: * if new[j] == cur: * indexer[j] = i # <<<<<<<<<<<<<< * elif new[j] < cur and fill_count < lim: * indexer[j] = i */ __pyx_t_20 = __pyx_v_j; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_indexer.diminfo[0].strides) = __pyx_v_i; goto __pyx_L14; } /* "pandas/src/generated.pyx":848 * if new[j] == cur: * indexer[j] = i * elif new[j] < cur and fill_count < lim: # <<<<<<<<<<<<<< * indexer[j] = i * fill_count += 1 */ __pyx_t_21 = __pyx_v_j; __pyx_t_16 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_new.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_new.diminfo[0].strides)) < __pyx_v_cur) != 0); if (__pyx_t_16) { __pyx_t_12 = ((__pyx_v_fill_count < __pyx_v_lim) != 0); __pyx_t_13 = __pyx_t_12; } else { __pyx_t_13 = __pyx_t_16; } if (__pyx_t_13) { /* "pandas/src/generated.pyx":849 * indexer[j] = i * elif new[j] < cur and fill_count < lim: * indexer[j] = i # <<<<<<<<<<<<<< * fill_count += 1 * j -= 1 */ __pyx_t_22 = __pyx_v_j; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_22, __pyx_pybuffernd_indexer.diminfo[0].strides) = __pyx_v_i; /* "pandas/src/generated.pyx":850 * elif new[j] < cur and fill_count < lim: * indexer[j] = i * fill_count += 1 # <<<<<<<<<<<<<< * j -= 1 * break */ __pyx_v_fill_count = (__pyx_v_fill_count + 1); goto __pyx_L14; } __pyx_L14:; /* "pandas/src/generated.pyx":851 * indexer[j] = i * fill_count += 1 * j -= 1 # <<<<<<<<<<<<<< * break * */ __pyx_v_j = (__pyx_v_j - 1); } /* "pandas/src/generated.pyx":852 * fill_count += 1 * j -= 1 * break # <<<<<<<<<<<<<< * * prev = old[i - 1] */ goto __pyx_L9_break; goto __pyx_L11; } __pyx_L11:; /* "pandas/src/generated.pyx":854 * break * * prev = old[i - 1] # <<<<<<<<<<<<<< * * while j >= 0 and prev < new[j] <= cur: */ __pyx_t_23 = (__pyx_v_i - 1); __pyx_v_prev = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_old.rcbuffer->pybuffer.buf, __pyx_t_23, __pyx_pybuffernd_old.diminfo[0].strides)); /* "pandas/src/generated.pyx":856 * prev = old[i - 1] * * while j >= 0 and prev < new[j] <= cur: # <<<<<<<<<<<<<< * if new[j] == cur: * indexer[j] = i */ while (1) { __pyx_t_13 = ((__pyx_v_j >= 0) != 0); if (__pyx_t_13) { __pyx_t_24 = __pyx_v_j; __pyx_t_25 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_new.rcbuffer->pybuffer.buf, __pyx_t_24, __pyx_pybuffernd_new.diminfo[0].strides)); __pyx_t_16 = (__pyx_v_prev < __pyx_t_25); if (__pyx_t_16) { __pyx_t_16 = (__pyx_t_25 <= __pyx_v_cur); } __pyx_t_12 = (__pyx_t_16 != 0); } else { __pyx_t_12 = __pyx_t_13; } if (!__pyx_t_12) break; /* "pandas/src/generated.pyx":857 * * while j >= 0 and prev < new[j] <= cur: * if new[j] == cur: # <<<<<<<<<<<<<< * indexer[j] = i * elif new[j] < cur and fill_count < lim: */ __pyx_t_26 = __pyx_v_j; __pyx_t_12 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_new.rcbuffer->pybuffer.buf, __pyx_t_26, __pyx_pybuffernd_new.diminfo[0].strides)) == __pyx_v_cur) != 0); if (__pyx_t_12) { /* "pandas/src/generated.pyx":858 * while j >= 0 and prev < new[j] <= cur: * if new[j] == cur: * indexer[j] = i # <<<<<<<<<<<<<< * elif new[j] < cur and fill_count < lim: * indexer[j] = i */ __pyx_t_27 = __pyx_v_j; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_27, __pyx_pybuffernd_indexer.diminfo[0].strides) = __pyx_v_i; goto __pyx_L17; } /* "pandas/src/generated.pyx":859 * if new[j] == cur: * indexer[j] = i * elif new[j] < cur and fill_count < lim: # <<<<<<<<<<<<<< * indexer[j] = i * fill_count += 1 */ __pyx_t_28 = __pyx_v_j; __pyx_t_12 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_new.rcbuffer->pybuffer.buf, __pyx_t_28, __pyx_pybuffernd_new.diminfo[0].strides)) < __pyx_v_cur) != 0); if (__pyx_t_12) { __pyx_t_13 = ((__pyx_v_fill_count < __pyx_v_lim) != 0); __pyx_t_16 = __pyx_t_13; } else { __pyx_t_16 = __pyx_t_12; } if (__pyx_t_16) { /* "pandas/src/generated.pyx":860 * indexer[j] = i * elif new[j] < cur and fill_count < lim: * indexer[j] = i # <<<<<<<<<<<<<< * fill_count += 1 * j -= 1 */ __pyx_t_29 = __pyx_v_j; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_29, __pyx_pybuffernd_indexer.diminfo[0].strides) = __pyx_v_i; /* "pandas/src/generated.pyx":861 * elif new[j] < cur and fill_count < lim: * indexer[j] = i * fill_count += 1 # <<<<<<<<<<<<<< * j -= 1 * */ __pyx_v_fill_count = (__pyx_v_fill_count + 1); goto __pyx_L17; } __pyx_L17:; /* "pandas/src/generated.pyx":862 * indexer[j] = i * fill_count += 1 * j -= 1 # <<<<<<<<<<<<<< * * fill_count = 0 */ __pyx_v_j = (__pyx_v_j - 1); } /* "pandas/src/generated.pyx":864 * j -= 1 * * fill_count = 0 # <<<<<<<<<<<<<< * i -= 1 * cur = prev */ __pyx_v_fill_count = 0; /* "pandas/src/generated.pyx":865 * * fill_count = 0 * i -= 1 # <<<<<<<<<<<<<< * cur = prev * */ __pyx_v_i = (__pyx_v_i - 1); /* "pandas/src/generated.pyx":866 * fill_count = 0 * i -= 1 * cur = prev # <<<<<<<<<<<<<< * * return indexer */ __pyx_v_cur = __pyx_v_prev; } __pyx_L9_break:; /* "pandas/src/generated.pyx":868 * cur = prev * * return indexer # <<<<<<<<<<<<<< * * @cython.boundscheck(False) */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_indexer)); __pyx_r = ((PyObject *)__pyx_v_indexer); goto __pyx_L0; __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_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_new.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_old.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.backfill_int32", __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_new.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_old.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_indexer); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_135backfill_int64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_135backfill_int64 = {__Pyx_NAMESTR("backfill_int64"), (PyCFunction)__pyx_pw_6pandas_5algos_135backfill_int64, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_135backfill_int64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_old = 0; PyArrayObject *__pyx_v_new = 0; PyObject *__pyx_v_limit = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("backfill_int64 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__old,&__pyx_n_s__new,&__pyx_n_s__limit,0}; PyObject* values[3] = {0,0,0}; /* "pandas/src/generated.pyx":873 * @cython.wraparound(False) * def backfill_int64(ndarray[int64_t] old, ndarray[int64_t] new, * limit=None): # <<<<<<<<<<<<<< * cdef Py_ssize_t i, j, nleft, nright * cdef ndarray[int64_t, ndim=1] indexer */ values[2] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__old)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__new)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("backfill_int64", 0, 2, 3, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 872; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__limit); if (value) { values[2] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "backfill_int64") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 872; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_old = ((PyArrayObject *)values[0]); __pyx_v_new = ((PyArrayObject *)values[1]); __pyx_v_limit = values[2]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("backfill_int64", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 872; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.backfill_int64", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_old), __pyx_ptype_5numpy_ndarray, 1, "old", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 872; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_new), __pyx_ptype_5numpy_ndarray, 1, "new", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 872; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_134backfill_int64(__pyx_self, __pyx_v_old, __pyx_v_new, __pyx_v_limit); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":872 * @cython.boundscheck(False) * @cython.wraparound(False) * def backfill_int64(ndarray[int64_t] old, ndarray[int64_t] new, # <<<<<<<<<<<<<< * limit=None): * cdef Py_ssize_t i, j, nleft, nright */ static PyObject *__pyx_pf_6pandas_5algos_134backfill_int64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_old, PyArrayObject *__pyx_v_new, PyObject *__pyx_v_limit) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_nleft; Py_ssize_t __pyx_v_nright; PyArrayObject *__pyx_v_indexer = 0; __pyx_t_5numpy_int64_t __pyx_v_cur; __pyx_t_5numpy_int64_t __pyx_v_prev; int __pyx_v_lim; int __pyx_v_fill_count; __Pyx_LocalBuf_ND __pyx_pybuffernd_indexer; __Pyx_Buffer __pyx_pybuffer_indexer; __Pyx_LocalBuf_ND __pyx_pybuffernd_new; __Pyx_Buffer __pyx_pybuffer_new; __Pyx_LocalBuf_ND __pyx_pybuffernd_old; __Pyx_Buffer __pyx_pybuffer_old; 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; int __pyx_t_12; int __pyx_t_13; long __pyx_t_14; 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; __pyx_t_5numpy_int64_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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("backfill_int64", 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_old.pybuffer.buf = NULL; __pyx_pybuffer_old.refcount = 0; __pyx_pybuffernd_old.data = NULL; __pyx_pybuffernd_old.rcbuffer = &__pyx_pybuffer_old; __pyx_pybuffer_new.pybuffer.buf = NULL; __pyx_pybuffer_new.refcount = 0; __pyx_pybuffernd_new.data = NULL; __pyx_pybuffernd_new.rcbuffer = &__pyx_pybuffer_new; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_old.rcbuffer->pybuffer, (PyObject*)__pyx_v_old, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 872; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_old.diminfo[0].strides = __pyx_pybuffernd_old.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_old.diminfo[0].shape = __pyx_pybuffernd_old.rcbuffer->pybuffer.shape[0]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_new.rcbuffer->pybuffer, (PyObject*)__pyx_v_new, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 872; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_new.diminfo[0].strides = __pyx_pybuffernd_new.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_new.diminfo[0].shape = __pyx_pybuffernd_new.rcbuffer->pybuffer.shape[0]; /* "pandas/src/generated.pyx":877 * cdef ndarray[int64_t, ndim=1] indexer * cdef int64_t cur, prev * cdef int lim, fill_count = 0 # <<<<<<<<<<<<<< * * nleft = len(old) */ __pyx_v_fill_count = 0; /* "pandas/src/generated.pyx":879 * cdef int lim, fill_count = 0 * * nleft = len(old) # <<<<<<<<<<<<<< * nright = len(new) * indexer = np.empty(nright, dtype=np.int64) */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_old)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 879; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_nleft = __pyx_t_1; /* "pandas/src/generated.pyx":880 * * nleft = len(old) * nright = len(new) # <<<<<<<<<<<<<< * indexer = np.empty(nright, dtype=np.int64) * indexer.fill(-1) */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_new)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 880; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_nright = __pyx_t_1; /* "pandas/src/generated.pyx":881 * nleft = len(old) * nright = len(new) * indexer = np.empty(nright, dtype=np.int64) # <<<<<<<<<<<<<< * indexer.fill(-1) * */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 881; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 881; __pyx_clineno = __LINE__; goto __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_nright); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 881; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 881; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 881; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_2)); __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 881; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s__int64); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 881; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__dtype), __pyx_t_6) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 881; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 881; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __Pyx_DECREF(((PyObject *)__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_filename = __pyx_f[2]; __pyx_lineno = 881; __pyx_clineno = __LINE__; goto __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_int64_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_int64_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_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_filename = __pyx_f[2]; __pyx_lineno = 881; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_7 = 0; __pyx_v_indexer = ((PyArrayObject *)__pyx_t_6); __pyx_t_6 = 0; /* "pandas/src/generated.pyx":882 * nright = len(new) * indexer = np.empty(nright, dtype=np.int64) * indexer.fill(-1) # <<<<<<<<<<<<<< * * if limit is None: */ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_indexer), __pyx_n_s__fill); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 882; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_2 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_k_tuple_71), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 882; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":884 * indexer.fill(-1) * * if limit is None: # <<<<<<<<<<<<<< * lim = nright * else: */ __pyx_t_12 = (__pyx_v_limit == Py_None); __pyx_t_13 = (__pyx_t_12 != 0); if (__pyx_t_13) { /* "pandas/src/generated.pyx":885 * * if limit is None: * lim = nright # <<<<<<<<<<<<<< * else: * if limit < 0: */ __pyx_v_lim = __pyx_v_nright; goto __pyx_L3; } /*else*/ { /* "pandas/src/generated.pyx":887 * lim = nright * else: * if limit < 0: # <<<<<<<<<<<<<< * raise ValueError('Limit must be non-negative') * lim = limit */ __pyx_t_2 = PyObject_RichCompare(__pyx_v_limit, __pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 887; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_13 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 887; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_13) { /* "pandas/src/generated.pyx":888 * else: * if limit < 0: * raise ValueError('Limit must be non-negative') # <<<<<<<<<<<<<< * lim = limit * */ __pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_72), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 888; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 888; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L4; } __pyx_L4:; /* "pandas/src/generated.pyx":889 * if limit < 0: * raise ValueError('Limit must be non-negative') * lim = limit # <<<<<<<<<<<<<< * * if nleft == 0 or nright == 0 or new[0] > old[nleft - 1]: */ __pyx_t_8 = __Pyx_PyInt_AsInt(__pyx_v_limit); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 889; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_lim = __pyx_t_8; } __pyx_L3:; /* "pandas/src/generated.pyx":891 * lim = limit * * if nleft == 0 or nright == 0 or new[0] > old[nleft - 1]: # <<<<<<<<<<<<<< * return indexer * */ __pyx_t_13 = ((__pyx_v_nleft == 0) != 0); if (!__pyx_t_13) { __pyx_t_12 = ((__pyx_v_nright == 0) != 0); if (!__pyx_t_12) { __pyx_t_14 = 0; __pyx_t_1 = (__pyx_v_nleft - 1); __pyx_t_15 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_new.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_new.diminfo[0].strides)) > (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_old.rcbuffer->pybuffer.buf, __pyx_t_1, __pyx_pybuffernd_old.diminfo[0].strides))) != 0); __pyx_t_16 = __pyx_t_15; } else { __pyx_t_16 = __pyx_t_12; } __pyx_t_12 = __pyx_t_16; } else { __pyx_t_12 = __pyx_t_13; } if (__pyx_t_12) { /* "pandas/src/generated.pyx":892 * * if nleft == 0 or nright == 0 or new[0] > old[nleft - 1]: * return indexer # <<<<<<<<<<<<<< * * i = nleft - 1 */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_indexer)); __pyx_r = ((PyObject *)__pyx_v_indexer); goto __pyx_L0; goto __pyx_L5; } __pyx_L5:; /* "pandas/src/generated.pyx":894 * return indexer * * i = nleft - 1 # <<<<<<<<<<<<<< * j = nright - 1 * */ __pyx_v_i = (__pyx_v_nleft - 1); /* "pandas/src/generated.pyx":895 * * i = nleft - 1 * j = nright - 1 # <<<<<<<<<<<<<< * * cur = old[nleft - 1] */ __pyx_v_j = (__pyx_v_nright - 1); /* "pandas/src/generated.pyx":897 * j = nright - 1 * * cur = old[nleft - 1] # <<<<<<<<<<<<<< * * while j >= 0 and new[j] > cur: */ __pyx_t_17 = (__pyx_v_nleft - 1); __pyx_v_cur = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_old.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_old.diminfo[0].strides)); /* "pandas/src/generated.pyx":899 * cur = old[nleft - 1] * * while j >= 0 and new[j] > cur: # <<<<<<<<<<<<<< * j -= 1 * */ while (1) { __pyx_t_12 = ((__pyx_v_j >= 0) != 0); if (__pyx_t_12) { __pyx_t_18 = __pyx_v_j; __pyx_t_13 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_new.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_new.diminfo[0].strides)) > __pyx_v_cur) != 0); __pyx_t_16 = __pyx_t_13; } else { __pyx_t_16 = __pyx_t_12; } if (!__pyx_t_16) break; /* "pandas/src/generated.pyx":900 * * while j >= 0 and new[j] > cur: * j -= 1 # <<<<<<<<<<<<<< * * while True: */ __pyx_v_j = (__pyx_v_j - 1); } /* "pandas/src/generated.pyx":902 * j -= 1 * * while True: # <<<<<<<<<<<<<< * if j < 0: * break */ while (1) { if (!1) break; /* "pandas/src/generated.pyx":903 * * while True: * if j < 0: # <<<<<<<<<<<<<< * break * */ __pyx_t_16 = ((__pyx_v_j < 0) != 0); if (__pyx_t_16) { /* "pandas/src/generated.pyx":904 * while True: * if j < 0: * break # <<<<<<<<<<<<<< * * if i == 0: */ goto __pyx_L9_break; goto __pyx_L10; } __pyx_L10:; /* "pandas/src/generated.pyx":906 * break * * if i == 0: # <<<<<<<<<<<<<< * while j >= 0: * if new[j] == cur: */ __pyx_t_16 = ((__pyx_v_i == 0) != 0); if (__pyx_t_16) { /* "pandas/src/generated.pyx":907 * * if i == 0: * while j >= 0: # <<<<<<<<<<<<<< * if new[j] == cur: * indexer[j] = i */ while (1) { __pyx_t_16 = ((__pyx_v_j >= 0) != 0); if (!__pyx_t_16) break; /* "pandas/src/generated.pyx":908 * if i == 0: * while j >= 0: * if new[j] == cur: # <<<<<<<<<<<<<< * indexer[j] = i * elif new[j] < cur and fill_count < lim: */ __pyx_t_19 = __pyx_v_j; __pyx_t_16 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_new.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_new.diminfo[0].strides)) == __pyx_v_cur) != 0); if (__pyx_t_16) { /* "pandas/src/generated.pyx":909 * while j >= 0: * if new[j] == cur: * indexer[j] = i # <<<<<<<<<<<<<< * elif new[j] < cur and fill_count < lim: * indexer[j] = i */ __pyx_t_20 = __pyx_v_j; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_indexer.diminfo[0].strides) = __pyx_v_i; goto __pyx_L14; } /* "pandas/src/generated.pyx":910 * if new[j] == cur: * indexer[j] = i * elif new[j] < cur and fill_count < lim: # <<<<<<<<<<<<<< * indexer[j] = i * fill_count += 1 */ __pyx_t_21 = __pyx_v_j; __pyx_t_16 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_new.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_new.diminfo[0].strides)) < __pyx_v_cur) != 0); if (__pyx_t_16) { __pyx_t_12 = ((__pyx_v_fill_count < __pyx_v_lim) != 0); __pyx_t_13 = __pyx_t_12; } else { __pyx_t_13 = __pyx_t_16; } if (__pyx_t_13) { /* "pandas/src/generated.pyx":911 * indexer[j] = i * elif new[j] < cur and fill_count < lim: * indexer[j] = i # <<<<<<<<<<<<<< * fill_count += 1 * j -= 1 */ __pyx_t_22 = __pyx_v_j; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_22, __pyx_pybuffernd_indexer.diminfo[0].strides) = __pyx_v_i; /* "pandas/src/generated.pyx":912 * elif new[j] < cur and fill_count < lim: * indexer[j] = i * fill_count += 1 # <<<<<<<<<<<<<< * j -= 1 * break */ __pyx_v_fill_count = (__pyx_v_fill_count + 1); goto __pyx_L14; } __pyx_L14:; /* "pandas/src/generated.pyx":913 * indexer[j] = i * fill_count += 1 * j -= 1 # <<<<<<<<<<<<<< * break * */ __pyx_v_j = (__pyx_v_j - 1); } /* "pandas/src/generated.pyx":914 * fill_count += 1 * j -= 1 * break # <<<<<<<<<<<<<< * * prev = old[i - 1] */ goto __pyx_L9_break; goto __pyx_L11; } __pyx_L11:; /* "pandas/src/generated.pyx":916 * break * * prev = old[i - 1] # <<<<<<<<<<<<<< * * while j >= 0 and prev < new[j] <= cur: */ __pyx_t_23 = (__pyx_v_i - 1); __pyx_v_prev = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_old.rcbuffer->pybuffer.buf, __pyx_t_23, __pyx_pybuffernd_old.diminfo[0].strides)); /* "pandas/src/generated.pyx":918 * prev = old[i - 1] * * while j >= 0 and prev < new[j] <= cur: # <<<<<<<<<<<<<< * if new[j] == cur: * indexer[j] = i */ while (1) { __pyx_t_13 = ((__pyx_v_j >= 0) != 0); if (__pyx_t_13) { __pyx_t_24 = __pyx_v_j; __pyx_t_25 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_new.rcbuffer->pybuffer.buf, __pyx_t_24, __pyx_pybuffernd_new.diminfo[0].strides)); __pyx_t_16 = (__pyx_v_prev < __pyx_t_25); if (__pyx_t_16) { __pyx_t_16 = (__pyx_t_25 <= __pyx_v_cur); } __pyx_t_12 = (__pyx_t_16 != 0); } else { __pyx_t_12 = __pyx_t_13; } if (!__pyx_t_12) break; /* "pandas/src/generated.pyx":919 * * while j >= 0 and prev < new[j] <= cur: * if new[j] == cur: # <<<<<<<<<<<<<< * indexer[j] = i * elif new[j] < cur and fill_count < lim: */ __pyx_t_26 = __pyx_v_j; __pyx_t_12 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_new.rcbuffer->pybuffer.buf, __pyx_t_26, __pyx_pybuffernd_new.diminfo[0].strides)) == __pyx_v_cur) != 0); if (__pyx_t_12) { /* "pandas/src/generated.pyx":920 * while j >= 0 and prev < new[j] <= cur: * if new[j] == cur: * indexer[j] = i # <<<<<<<<<<<<<< * elif new[j] < cur and fill_count < lim: * indexer[j] = i */ __pyx_t_27 = __pyx_v_j; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_27, __pyx_pybuffernd_indexer.diminfo[0].strides) = __pyx_v_i; goto __pyx_L17; } /* "pandas/src/generated.pyx":921 * if new[j] == cur: * indexer[j] = i * elif new[j] < cur and fill_count < lim: # <<<<<<<<<<<<<< * indexer[j] = i * fill_count += 1 */ __pyx_t_28 = __pyx_v_j; __pyx_t_12 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_new.rcbuffer->pybuffer.buf, __pyx_t_28, __pyx_pybuffernd_new.diminfo[0].strides)) < __pyx_v_cur) != 0); if (__pyx_t_12) { __pyx_t_13 = ((__pyx_v_fill_count < __pyx_v_lim) != 0); __pyx_t_16 = __pyx_t_13; } else { __pyx_t_16 = __pyx_t_12; } if (__pyx_t_16) { /* "pandas/src/generated.pyx":922 * indexer[j] = i * elif new[j] < cur and fill_count < lim: * indexer[j] = i # <<<<<<<<<<<<<< * fill_count += 1 * j -= 1 */ __pyx_t_29 = __pyx_v_j; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_29, __pyx_pybuffernd_indexer.diminfo[0].strides) = __pyx_v_i; /* "pandas/src/generated.pyx":923 * elif new[j] < cur and fill_count < lim: * indexer[j] = i * fill_count += 1 # <<<<<<<<<<<<<< * j -= 1 * */ __pyx_v_fill_count = (__pyx_v_fill_count + 1); goto __pyx_L17; } __pyx_L17:; /* "pandas/src/generated.pyx":924 * indexer[j] = i * fill_count += 1 * j -= 1 # <<<<<<<<<<<<<< * * fill_count = 0 */ __pyx_v_j = (__pyx_v_j - 1); } /* "pandas/src/generated.pyx":926 * j -= 1 * * fill_count = 0 # <<<<<<<<<<<<<< * i -= 1 * cur = prev */ __pyx_v_fill_count = 0; /* "pandas/src/generated.pyx":927 * * fill_count = 0 * i -= 1 # <<<<<<<<<<<<<< * cur = prev * */ __pyx_v_i = (__pyx_v_i - 1); /* "pandas/src/generated.pyx":928 * fill_count = 0 * i -= 1 * cur = prev # <<<<<<<<<<<<<< * * return indexer */ __pyx_v_cur = __pyx_v_prev; } __pyx_L9_break:; /* "pandas/src/generated.pyx":930 * cur = prev * * return indexer # <<<<<<<<<<<<<< * * @cython.boundscheck(False) */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_indexer)); __pyx_r = ((PyObject *)__pyx_v_indexer); goto __pyx_L0; __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_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_new.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_old.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.backfill_int64", __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_new.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_old.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_indexer); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_137backfill_bool(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_137backfill_bool = {__Pyx_NAMESTR("backfill_bool"), (PyCFunction)__pyx_pw_6pandas_5algos_137backfill_bool, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_137backfill_bool(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_old = 0; PyArrayObject *__pyx_v_new = 0; PyObject *__pyx_v_limit = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("backfill_bool (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__old,&__pyx_n_s__new,&__pyx_n_s__limit,0}; PyObject* values[3] = {0,0,0}; /* "pandas/src/generated.pyx":935 * @cython.wraparound(False) * def backfill_bool(ndarray[uint8_t] old, ndarray[uint8_t] new, * limit=None): # <<<<<<<<<<<<<< * cdef Py_ssize_t i, j, nleft, nright * cdef ndarray[int64_t, ndim=1] indexer */ values[2] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__old)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__new)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("backfill_bool", 0, 2, 3, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 934; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__limit); if (value) { values[2] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "backfill_bool") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 934; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_old = ((PyArrayObject *)values[0]); __pyx_v_new = ((PyArrayObject *)values[1]); __pyx_v_limit = values[2]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("backfill_bool", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 934; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.backfill_bool", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_old), __pyx_ptype_5numpy_ndarray, 1, "old", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 934; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_new), __pyx_ptype_5numpy_ndarray, 1, "new", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 934; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_136backfill_bool(__pyx_self, __pyx_v_old, __pyx_v_new, __pyx_v_limit); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":934 * @cython.boundscheck(False) * @cython.wraparound(False) * def backfill_bool(ndarray[uint8_t] old, ndarray[uint8_t] new, # <<<<<<<<<<<<<< * limit=None): * cdef Py_ssize_t i, j, nleft, nright */ static PyObject *__pyx_pf_6pandas_5algos_136backfill_bool(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_old, PyArrayObject *__pyx_v_new, PyObject *__pyx_v_limit) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_nleft; Py_ssize_t __pyx_v_nright; PyArrayObject *__pyx_v_indexer = 0; __pyx_t_5numpy_uint8_t __pyx_v_cur; __pyx_t_5numpy_uint8_t __pyx_v_prev; int __pyx_v_lim; int __pyx_v_fill_count; __Pyx_LocalBuf_ND __pyx_pybuffernd_indexer; __Pyx_Buffer __pyx_pybuffer_indexer; __Pyx_LocalBuf_ND __pyx_pybuffernd_new; __Pyx_Buffer __pyx_pybuffer_new; __Pyx_LocalBuf_ND __pyx_pybuffernd_old; __Pyx_Buffer __pyx_pybuffer_old; 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; int __pyx_t_12; int __pyx_t_13; long __pyx_t_14; 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; __pyx_t_5numpy_uint8_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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("backfill_bool", 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_old.pybuffer.buf = NULL; __pyx_pybuffer_old.refcount = 0; __pyx_pybuffernd_old.data = NULL; __pyx_pybuffernd_old.rcbuffer = &__pyx_pybuffer_old; __pyx_pybuffer_new.pybuffer.buf = NULL; __pyx_pybuffer_new.refcount = 0; __pyx_pybuffernd_new.data = NULL; __pyx_pybuffernd_new.rcbuffer = &__pyx_pybuffer_new; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_old.rcbuffer->pybuffer, (PyObject*)__pyx_v_old, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 934; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_old.diminfo[0].strides = __pyx_pybuffernd_old.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_old.diminfo[0].shape = __pyx_pybuffernd_old.rcbuffer->pybuffer.shape[0]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_new.rcbuffer->pybuffer, (PyObject*)__pyx_v_new, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 934; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_new.diminfo[0].strides = __pyx_pybuffernd_new.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_new.diminfo[0].shape = __pyx_pybuffernd_new.rcbuffer->pybuffer.shape[0]; /* "pandas/src/generated.pyx":939 * cdef ndarray[int64_t, ndim=1] indexer * cdef uint8_t cur, prev * cdef int lim, fill_count = 0 # <<<<<<<<<<<<<< * * nleft = len(old) */ __pyx_v_fill_count = 0; /* "pandas/src/generated.pyx":941 * cdef int lim, fill_count = 0 * * nleft = len(old) # <<<<<<<<<<<<<< * nright = len(new) * indexer = np.empty(nright, dtype=np.int64) */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_old)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 941; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_nleft = __pyx_t_1; /* "pandas/src/generated.pyx":942 * * nleft = len(old) * nright = len(new) # <<<<<<<<<<<<<< * indexer = np.empty(nright, dtype=np.int64) * indexer.fill(-1) */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_new)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 942; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_nright = __pyx_t_1; /* "pandas/src/generated.pyx":943 * nleft = len(old) * nright = len(new) * indexer = np.empty(nright, dtype=np.int64) # <<<<<<<<<<<<<< * indexer.fill(-1) * */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 943; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 943; __pyx_clineno = __LINE__; goto __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_nright); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 943; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 943; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 943; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_2)); __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 943; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s__int64); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 943; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__dtype), __pyx_t_6) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 943; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 943; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __Pyx_DECREF(((PyObject *)__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_filename = __pyx_f[2]; __pyx_lineno = 943; __pyx_clineno = __LINE__; goto __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_int64_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_int64_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_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_filename = __pyx_f[2]; __pyx_lineno = 943; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_7 = 0; __pyx_v_indexer = ((PyArrayObject *)__pyx_t_6); __pyx_t_6 = 0; /* "pandas/src/generated.pyx":944 * nright = len(new) * indexer = np.empty(nright, dtype=np.int64) * indexer.fill(-1) # <<<<<<<<<<<<<< * * if limit is None: */ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_indexer), __pyx_n_s__fill); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 944; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_2 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_k_tuple_73), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 944; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":946 * indexer.fill(-1) * * if limit is None: # <<<<<<<<<<<<<< * lim = nright * else: */ __pyx_t_12 = (__pyx_v_limit == Py_None); __pyx_t_13 = (__pyx_t_12 != 0); if (__pyx_t_13) { /* "pandas/src/generated.pyx":947 * * if limit is None: * lim = nright # <<<<<<<<<<<<<< * else: * if limit < 0: */ __pyx_v_lim = __pyx_v_nright; goto __pyx_L3; } /*else*/ { /* "pandas/src/generated.pyx":949 * lim = nright * else: * if limit < 0: # <<<<<<<<<<<<<< * raise ValueError('Limit must be non-negative') * lim = limit */ __pyx_t_2 = PyObject_RichCompare(__pyx_v_limit, __pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 949; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_13 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 949; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_13) { /* "pandas/src/generated.pyx":950 * else: * if limit < 0: * raise ValueError('Limit must be non-negative') # <<<<<<<<<<<<<< * lim = limit * */ __pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_74), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 950; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 950; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L4; } __pyx_L4:; /* "pandas/src/generated.pyx":951 * if limit < 0: * raise ValueError('Limit must be non-negative') * lim = limit # <<<<<<<<<<<<<< * * if nleft == 0 or nright == 0 or new[0] > old[nleft - 1]: */ __pyx_t_8 = __Pyx_PyInt_AsInt(__pyx_v_limit); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 951; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_lim = __pyx_t_8; } __pyx_L3:; /* "pandas/src/generated.pyx":953 * lim = limit * * if nleft == 0 or nright == 0 or new[0] > old[nleft - 1]: # <<<<<<<<<<<<<< * return indexer * */ __pyx_t_13 = ((__pyx_v_nleft == 0) != 0); if (!__pyx_t_13) { __pyx_t_12 = ((__pyx_v_nright == 0) != 0); if (!__pyx_t_12) { __pyx_t_14 = 0; __pyx_t_1 = (__pyx_v_nleft - 1); __pyx_t_15 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_new.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_new.diminfo[0].strides)) > (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_old.rcbuffer->pybuffer.buf, __pyx_t_1, __pyx_pybuffernd_old.diminfo[0].strides))) != 0); __pyx_t_16 = __pyx_t_15; } else { __pyx_t_16 = __pyx_t_12; } __pyx_t_12 = __pyx_t_16; } else { __pyx_t_12 = __pyx_t_13; } if (__pyx_t_12) { /* "pandas/src/generated.pyx":954 * * if nleft == 0 or nright == 0 or new[0] > old[nleft - 1]: * return indexer # <<<<<<<<<<<<<< * * i = nleft - 1 */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_indexer)); __pyx_r = ((PyObject *)__pyx_v_indexer); goto __pyx_L0; goto __pyx_L5; } __pyx_L5:; /* "pandas/src/generated.pyx":956 * return indexer * * i = nleft - 1 # <<<<<<<<<<<<<< * j = nright - 1 * */ __pyx_v_i = (__pyx_v_nleft - 1); /* "pandas/src/generated.pyx":957 * * i = nleft - 1 * j = nright - 1 # <<<<<<<<<<<<<< * * cur = old[nleft - 1] */ __pyx_v_j = (__pyx_v_nright - 1); /* "pandas/src/generated.pyx":959 * j = nright - 1 * * cur = old[nleft - 1] # <<<<<<<<<<<<<< * * while j >= 0 and new[j] > cur: */ __pyx_t_17 = (__pyx_v_nleft - 1); __pyx_v_cur = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_old.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_old.diminfo[0].strides)); /* "pandas/src/generated.pyx":961 * cur = old[nleft - 1] * * while j >= 0 and new[j] > cur: # <<<<<<<<<<<<<< * j -= 1 * */ while (1) { __pyx_t_12 = ((__pyx_v_j >= 0) != 0); if (__pyx_t_12) { __pyx_t_18 = __pyx_v_j; __pyx_t_13 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_new.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_new.diminfo[0].strides)) > __pyx_v_cur) != 0); __pyx_t_16 = __pyx_t_13; } else { __pyx_t_16 = __pyx_t_12; } if (!__pyx_t_16) break; /* "pandas/src/generated.pyx":962 * * while j >= 0 and new[j] > cur: * j -= 1 # <<<<<<<<<<<<<< * * while True: */ __pyx_v_j = (__pyx_v_j - 1); } /* "pandas/src/generated.pyx":964 * j -= 1 * * while True: # <<<<<<<<<<<<<< * if j < 0: * break */ while (1) { if (!1) break; /* "pandas/src/generated.pyx":965 * * while True: * if j < 0: # <<<<<<<<<<<<<< * break * */ __pyx_t_16 = ((__pyx_v_j < 0) != 0); if (__pyx_t_16) { /* "pandas/src/generated.pyx":966 * while True: * if j < 0: * break # <<<<<<<<<<<<<< * * if i == 0: */ goto __pyx_L9_break; goto __pyx_L10; } __pyx_L10:; /* "pandas/src/generated.pyx":968 * break * * if i == 0: # <<<<<<<<<<<<<< * while j >= 0: * if new[j] == cur: */ __pyx_t_16 = ((__pyx_v_i == 0) != 0); if (__pyx_t_16) { /* "pandas/src/generated.pyx":969 * * if i == 0: * while j >= 0: # <<<<<<<<<<<<<< * if new[j] == cur: * indexer[j] = i */ while (1) { __pyx_t_16 = ((__pyx_v_j >= 0) != 0); if (!__pyx_t_16) break; /* "pandas/src/generated.pyx":970 * if i == 0: * while j >= 0: * if new[j] == cur: # <<<<<<<<<<<<<< * indexer[j] = i * elif new[j] < cur and fill_count < lim: */ __pyx_t_19 = __pyx_v_j; __pyx_t_16 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_new.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_new.diminfo[0].strides)) == __pyx_v_cur) != 0); if (__pyx_t_16) { /* "pandas/src/generated.pyx":971 * while j >= 0: * if new[j] == cur: * indexer[j] = i # <<<<<<<<<<<<<< * elif new[j] < cur and fill_count < lim: * indexer[j] = i */ __pyx_t_20 = __pyx_v_j; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_indexer.diminfo[0].strides) = __pyx_v_i; goto __pyx_L14; } /* "pandas/src/generated.pyx":972 * if new[j] == cur: * indexer[j] = i * elif new[j] < cur and fill_count < lim: # <<<<<<<<<<<<<< * indexer[j] = i * fill_count += 1 */ __pyx_t_21 = __pyx_v_j; __pyx_t_16 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_new.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_new.diminfo[0].strides)) < __pyx_v_cur) != 0); if (__pyx_t_16) { __pyx_t_12 = ((__pyx_v_fill_count < __pyx_v_lim) != 0); __pyx_t_13 = __pyx_t_12; } else { __pyx_t_13 = __pyx_t_16; } if (__pyx_t_13) { /* "pandas/src/generated.pyx":973 * indexer[j] = i * elif new[j] < cur and fill_count < lim: * indexer[j] = i # <<<<<<<<<<<<<< * fill_count += 1 * j -= 1 */ __pyx_t_22 = __pyx_v_j; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_22, __pyx_pybuffernd_indexer.diminfo[0].strides) = __pyx_v_i; /* "pandas/src/generated.pyx":974 * elif new[j] < cur and fill_count < lim: * indexer[j] = i * fill_count += 1 # <<<<<<<<<<<<<< * j -= 1 * break */ __pyx_v_fill_count = (__pyx_v_fill_count + 1); goto __pyx_L14; } __pyx_L14:; /* "pandas/src/generated.pyx":975 * indexer[j] = i * fill_count += 1 * j -= 1 # <<<<<<<<<<<<<< * break * */ __pyx_v_j = (__pyx_v_j - 1); } /* "pandas/src/generated.pyx":976 * fill_count += 1 * j -= 1 * break # <<<<<<<<<<<<<< * * prev = old[i - 1] */ goto __pyx_L9_break; goto __pyx_L11; } __pyx_L11:; /* "pandas/src/generated.pyx":978 * break * * prev = old[i - 1] # <<<<<<<<<<<<<< * * while j >= 0 and prev < new[j] <= cur: */ __pyx_t_23 = (__pyx_v_i - 1); __pyx_v_prev = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_old.rcbuffer->pybuffer.buf, __pyx_t_23, __pyx_pybuffernd_old.diminfo[0].strides)); /* "pandas/src/generated.pyx":980 * prev = old[i - 1] * * while j >= 0 and prev < new[j] <= cur: # <<<<<<<<<<<<<< * if new[j] == cur: * indexer[j] = i */ while (1) { __pyx_t_13 = ((__pyx_v_j >= 0) != 0); if (__pyx_t_13) { __pyx_t_24 = __pyx_v_j; __pyx_t_25 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_new.rcbuffer->pybuffer.buf, __pyx_t_24, __pyx_pybuffernd_new.diminfo[0].strides)); __pyx_t_16 = (__pyx_v_prev < __pyx_t_25); if (__pyx_t_16) { __pyx_t_16 = (__pyx_t_25 <= __pyx_v_cur); } __pyx_t_12 = (__pyx_t_16 != 0); } else { __pyx_t_12 = __pyx_t_13; } if (!__pyx_t_12) break; /* "pandas/src/generated.pyx":981 * * while j >= 0 and prev < new[j] <= cur: * if new[j] == cur: # <<<<<<<<<<<<<< * indexer[j] = i * elif new[j] < cur and fill_count < lim: */ __pyx_t_26 = __pyx_v_j; __pyx_t_12 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_new.rcbuffer->pybuffer.buf, __pyx_t_26, __pyx_pybuffernd_new.diminfo[0].strides)) == __pyx_v_cur) != 0); if (__pyx_t_12) { /* "pandas/src/generated.pyx":982 * while j >= 0 and prev < new[j] <= cur: * if new[j] == cur: * indexer[j] = i # <<<<<<<<<<<<<< * elif new[j] < cur and fill_count < lim: * indexer[j] = i */ __pyx_t_27 = __pyx_v_j; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_27, __pyx_pybuffernd_indexer.diminfo[0].strides) = __pyx_v_i; goto __pyx_L17; } /* "pandas/src/generated.pyx":983 * if new[j] == cur: * indexer[j] = i * elif new[j] < cur and fill_count < lim: # <<<<<<<<<<<<<< * indexer[j] = i * fill_count += 1 */ __pyx_t_28 = __pyx_v_j; __pyx_t_12 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_new.rcbuffer->pybuffer.buf, __pyx_t_28, __pyx_pybuffernd_new.diminfo[0].strides)) < __pyx_v_cur) != 0); if (__pyx_t_12) { __pyx_t_13 = ((__pyx_v_fill_count < __pyx_v_lim) != 0); __pyx_t_16 = __pyx_t_13; } else { __pyx_t_16 = __pyx_t_12; } if (__pyx_t_16) { /* "pandas/src/generated.pyx":984 * indexer[j] = i * elif new[j] < cur and fill_count < lim: * indexer[j] = i # <<<<<<<<<<<<<< * fill_count += 1 * j -= 1 */ __pyx_t_29 = __pyx_v_j; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_29, __pyx_pybuffernd_indexer.diminfo[0].strides) = __pyx_v_i; /* "pandas/src/generated.pyx":985 * elif new[j] < cur and fill_count < lim: * indexer[j] = i * fill_count += 1 # <<<<<<<<<<<<<< * j -= 1 * */ __pyx_v_fill_count = (__pyx_v_fill_count + 1); goto __pyx_L17; } __pyx_L17:; /* "pandas/src/generated.pyx":986 * indexer[j] = i * fill_count += 1 * j -= 1 # <<<<<<<<<<<<<< * * fill_count = 0 */ __pyx_v_j = (__pyx_v_j - 1); } /* "pandas/src/generated.pyx":988 * j -= 1 * * fill_count = 0 # <<<<<<<<<<<<<< * i -= 1 * cur = prev */ __pyx_v_fill_count = 0; /* "pandas/src/generated.pyx":989 * * fill_count = 0 * i -= 1 # <<<<<<<<<<<<<< * cur = prev * */ __pyx_v_i = (__pyx_v_i - 1); /* "pandas/src/generated.pyx":990 * fill_count = 0 * i -= 1 * cur = prev # <<<<<<<<<<<<<< * * return indexer */ __pyx_v_cur = __pyx_v_prev; } __pyx_L9_break:; /* "pandas/src/generated.pyx":992 * cur = prev * * return indexer # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_indexer)); __pyx_r = ((PyObject *)__pyx_v_indexer); goto __pyx_L0; __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_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_new.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_old.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.backfill_bool", __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_new.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_old.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_indexer); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_139pad_inplace_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_139pad_inplace_float64 = {__Pyx_NAMESTR("pad_inplace_float64"), (PyCFunction)__pyx_pw_6pandas_5algos_139pad_inplace_float64, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_139pad_inplace_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_values = 0; PyArrayObject *__pyx_v_mask = 0; PyObject *__pyx_v_limit = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("pad_inplace_float64 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__values,&__pyx_n_s__mask,&__pyx_n_s__limit,0}; PyObject* values[3] = {0,0,0}; /* "pandas/src/generated.pyx":999 * def pad_inplace_float64(ndarray[float64_t] values, * ndarray[uint8_t, cast=True] mask, * limit=None): # <<<<<<<<<<<<<< * cdef Py_ssize_t i, N * cdef float64_t val */ values[2] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__values)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__mask)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("pad_inplace_float64", 0, 2, 3, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 997; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__limit); if (value) { values[2] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "pad_inplace_float64") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 997; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_values = ((PyArrayObject *)values[0]); __pyx_v_mask = ((PyArrayObject *)values[1]); __pyx_v_limit = values[2]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("pad_inplace_float64", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 997; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.pad_inplace_float64", __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_filename = __pyx_f[2]; __pyx_lineno = 997; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_mask), __pyx_ptype_5numpy_ndarray, 1, "mask", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 998; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_138pad_inplace_float64(__pyx_self, __pyx_v_values, __pyx_v_mask, __pyx_v_limit); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":997 * @cython.boundscheck(False) * @cython.wraparound(False) * def pad_inplace_float64(ndarray[float64_t] values, # <<<<<<<<<<<<<< * ndarray[uint8_t, cast=True] mask, * limit=None): */ static PyObject *__pyx_pf_6pandas_5algos_138pad_inplace_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_mask, PyObject *__pyx_v_limit) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_N; __pyx_t_5numpy_float64_t __pyx_v_val; int __pyx_v_lim; int __pyx_v_fill_count; __Pyx_LocalBuf_ND __pyx_pybuffernd_mask; __Pyx_Buffer __pyx_pybuffer_mask; __Pyx_LocalBuf_ND __pyx_pybuffernd_values; __Pyx_Buffer __pyx_pybuffer_values; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; int __pyx_t_2; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; int __pyx_t_5; long __pyx_t_6; Py_ssize_t __pyx_t_7; Py_ssize_t __pyx_t_8; Py_ssize_t __pyx_t_9; Py_ssize_t __pyx_t_10; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("pad_inplace_float64", 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_mask.pybuffer.buf = NULL; __pyx_pybuffer_mask.refcount = 0; __pyx_pybuffernd_mask.data = NULL; __pyx_pybuffernd_mask.rcbuffer = &__pyx_pybuffer_mask; { __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| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 997; __pyx_clineno = __LINE__; goto __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_mask.rcbuffer->pybuffer, (PyObject*)__pyx_v_mask, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 1, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 997; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; /* "pandas/src/generated.pyx":1002 * cdef Py_ssize_t i, N * cdef float64_t val * cdef int lim, fill_count = 0 # <<<<<<<<<<<<<< * * N = len(values) */ __pyx_v_fill_count = 0; /* "pandas/src/generated.pyx":1004 * cdef int lim, fill_count = 0 * * N = len(values) # <<<<<<<<<<<<<< * * # GH 2778 */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1004; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_N = __pyx_t_1; /* "pandas/src/generated.pyx":1007 * * # GH 2778 * if N == 0: # <<<<<<<<<<<<<< * return * */ __pyx_t_2 = ((__pyx_v_N == 0) != 0); if (__pyx_t_2) { /* "pandas/src/generated.pyx":1008 * # GH 2778 * if N == 0: * return # <<<<<<<<<<<<<< * * if limit is None: */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; goto __pyx_L3; } __pyx_L3:; /* "pandas/src/generated.pyx":1010 * return * * if limit is None: # <<<<<<<<<<<<<< * lim = N * else: */ __pyx_t_2 = (__pyx_v_limit == Py_None); __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":1011 * * if limit is None: * lim = N # <<<<<<<<<<<<<< * else: * if limit < 0: */ __pyx_v_lim = __pyx_v_N; goto __pyx_L4; } /*else*/ { /* "pandas/src/generated.pyx":1013 * lim = N * else: * if limit < 0: # <<<<<<<<<<<<<< * raise ValueError('Limit must be non-negative') * lim = limit */ __pyx_t_4 = PyObject_RichCompare(__pyx_v_limit, __pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1013; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1013; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_3) { /* "pandas/src/generated.pyx":1014 * else: * if limit < 0: * raise ValueError('Limit must be non-negative') # <<<<<<<<<<<<<< * lim = limit * */ __pyx_t_4 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_75), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1014; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 1014; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L5; } __pyx_L5:; /* "pandas/src/generated.pyx":1015 * if limit < 0: * raise ValueError('Limit must be non-negative') * lim = limit # <<<<<<<<<<<<<< * * val = values[0] */ __pyx_t_5 = __Pyx_PyInt_AsInt(__pyx_v_limit); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1015; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_lim = __pyx_t_5; } __pyx_L4:; /* "pandas/src/generated.pyx":1017 * lim = limit * * val = values[0] # <<<<<<<<<<<<<< * for i in range(N): * if mask[i]: */ __pyx_t_6 = 0; __pyx_v_val = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_6, __pyx_pybuffernd_values.diminfo[0].strides)); /* "pandas/src/generated.pyx":1018 * * val = values[0] * for i in range(N): # <<<<<<<<<<<<<< * if mask[i]: * if fill_count >= lim: */ __pyx_t_1 = __pyx_v_N; for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_1; __pyx_t_7+=1) { __pyx_v_i = __pyx_t_7; /* "pandas/src/generated.pyx":1019 * val = values[0] * for i in range(N): * if mask[i]: # <<<<<<<<<<<<<< * if fill_count >= lim: * continue */ __pyx_t_8 = __pyx_v_i; __pyx_t_3 = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_mask.rcbuffer->pybuffer.buf, __pyx_t_8, __pyx_pybuffernd_mask.diminfo[0].strides)) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":1020 * for i in range(N): * if mask[i]: * if fill_count >= lim: # <<<<<<<<<<<<<< * continue * fill_count += 1 */ __pyx_t_3 = ((__pyx_v_fill_count >= __pyx_v_lim) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":1021 * if mask[i]: * if fill_count >= lim: * continue # <<<<<<<<<<<<<< * fill_count += 1 * values[i] = val */ goto __pyx_L6_continue; goto __pyx_L9; } __pyx_L9:; /* "pandas/src/generated.pyx":1022 * if fill_count >= lim: * continue * fill_count += 1 # <<<<<<<<<<<<<< * values[i] = val * else: */ __pyx_v_fill_count = (__pyx_v_fill_count + 1); /* "pandas/src/generated.pyx":1023 * continue * fill_count += 1 * values[i] = val # <<<<<<<<<<<<<< * else: * fill_count = 0 */ __pyx_t_9 = __pyx_v_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_9, __pyx_pybuffernd_values.diminfo[0].strides) = __pyx_v_val; goto __pyx_L8; } /*else*/ { /* "pandas/src/generated.pyx":1025 * values[i] = val * else: * fill_count = 0 # <<<<<<<<<<<<<< * val = values[i] * */ __pyx_v_fill_count = 0; /* "pandas/src/generated.pyx":1026 * else: * fill_count = 0 * val = values[i] # <<<<<<<<<<<<<< * * @cython.boundscheck(False) */ __pyx_t_10 = __pyx_v_i; __pyx_v_val = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_10, __pyx_pybuffernd_values.diminfo[0].strides)); } __pyx_L8:; __pyx_L6_continue:; } __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_4); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_mask.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.pad_inplace_float64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_mask.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_141pad_inplace_float32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_141pad_inplace_float32 = {__Pyx_NAMESTR("pad_inplace_float32"), (PyCFunction)__pyx_pw_6pandas_5algos_141pad_inplace_float32, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_141pad_inplace_float32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_values = 0; PyArrayObject *__pyx_v_mask = 0; PyObject *__pyx_v_limit = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("pad_inplace_float32 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__values,&__pyx_n_s__mask,&__pyx_n_s__limit,0}; PyObject* values[3] = {0,0,0}; /* "pandas/src/generated.pyx":1032 * def pad_inplace_float32(ndarray[float32_t] values, * ndarray[uint8_t, cast=True] mask, * limit=None): # <<<<<<<<<<<<<< * cdef Py_ssize_t i, N * cdef float32_t val */ values[2] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__values)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__mask)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("pad_inplace_float32", 0, 2, 3, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1030; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__limit); if (value) { values[2] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "pad_inplace_float32") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1030; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_values = ((PyArrayObject *)values[0]); __pyx_v_mask = ((PyArrayObject *)values[1]); __pyx_v_limit = values[2]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("pad_inplace_float32", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1030; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.pad_inplace_float32", __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_filename = __pyx_f[2]; __pyx_lineno = 1030; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_mask), __pyx_ptype_5numpy_ndarray, 1, "mask", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1031; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_140pad_inplace_float32(__pyx_self, __pyx_v_values, __pyx_v_mask, __pyx_v_limit); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":1030 * @cython.boundscheck(False) * @cython.wraparound(False) * def pad_inplace_float32(ndarray[float32_t] values, # <<<<<<<<<<<<<< * ndarray[uint8_t, cast=True] mask, * limit=None): */ static PyObject *__pyx_pf_6pandas_5algos_140pad_inplace_float32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_mask, PyObject *__pyx_v_limit) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_N; __pyx_t_5numpy_float32_t __pyx_v_val; int __pyx_v_lim; int __pyx_v_fill_count; __Pyx_LocalBuf_ND __pyx_pybuffernd_mask; __Pyx_Buffer __pyx_pybuffer_mask; __Pyx_LocalBuf_ND __pyx_pybuffernd_values; __Pyx_Buffer __pyx_pybuffer_values; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; int __pyx_t_2; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; int __pyx_t_5; long __pyx_t_6; Py_ssize_t __pyx_t_7; Py_ssize_t __pyx_t_8; Py_ssize_t __pyx_t_9; Py_ssize_t __pyx_t_10; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("pad_inplace_float32", 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_mask.pybuffer.buf = NULL; __pyx_pybuffer_mask.refcount = 0; __pyx_pybuffernd_mask.data = NULL; __pyx_pybuffernd_mask.rcbuffer = &__pyx_pybuffer_mask; { __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_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1030; __pyx_clineno = __LINE__; goto __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_mask.rcbuffer->pybuffer, (PyObject*)__pyx_v_mask, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 1, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1030; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; /* "pandas/src/generated.pyx":1035 * cdef Py_ssize_t i, N * cdef float32_t val * cdef int lim, fill_count = 0 # <<<<<<<<<<<<<< * * N = len(values) */ __pyx_v_fill_count = 0; /* "pandas/src/generated.pyx":1037 * cdef int lim, fill_count = 0 * * N = len(values) # <<<<<<<<<<<<<< * * # GH 2778 */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1037; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_N = __pyx_t_1; /* "pandas/src/generated.pyx":1040 * * # GH 2778 * if N == 0: # <<<<<<<<<<<<<< * return * */ __pyx_t_2 = ((__pyx_v_N == 0) != 0); if (__pyx_t_2) { /* "pandas/src/generated.pyx":1041 * # GH 2778 * if N == 0: * return # <<<<<<<<<<<<<< * * if limit is None: */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; goto __pyx_L3; } __pyx_L3:; /* "pandas/src/generated.pyx":1043 * return * * if limit is None: # <<<<<<<<<<<<<< * lim = N * else: */ __pyx_t_2 = (__pyx_v_limit == Py_None); __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":1044 * * if limit is None: * lim = N # <<<<<<<<<<<<<< * else: * if limit < 0: */ __pyx_v_lim = __pyx_v_N; goto __pyx_L4; } /*else*/ { /* "pandas/src/generated.pyx":1046 * lim = N * else: * if limit < 0: # <<<<<<<<<<<<<< * raise ValueError('Limit must be non-negative') * lim = limit */ __pyx_t_4 = PyObject_RichCompare(__pyx_v_limit, __pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1046; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1046; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_3) { /* "pandas/src/generated.pyx":1047 * else: * if limit < 0: * raise ValueError('Limit must be non-negative') # <<<<<<<<<<<<<< * lim = limit * */ __pyx_t_4 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_76), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1047; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 1047; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L5; } __pyx_L5:; /* "pandas/src/generated.pyx":1048 * if limit < 0: * raise ValueError('Limit must be non-negative') * lim = limit # <<<<<<<<<<<<<< * * val = values[0] */ __pyx_t_5 = __Pyx_PyInt_AsInt(__pyx_v_limit); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1048; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_lim = __pyx_t_5; } __pyx_L4:; /* "pandas/src/generated.pyx":1050 * lim = limit * * val = values[0] # <<<<<<<<<<<<<< * for i in range(N): * if mask[i]: */ __pyx_t_6 = 0; __pyx_v_val = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_6, __pyx_pybuffernd_values.diminfo[0].strides)); /* "pandas/src/generated.pyx":1051 * * val = values[0] * for i in range(N): # <<<<<<<<<<<<<< * if mask[i]: * if fill_count >= lim: */ __pyx_t_1 = __pyx_v_N; for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_1; __pyx_t_7+=1) { __pyx_v_i = __pyx_t_7; /* "pandas/src/generated.pyx":1052 * val = values[0] * for i in range(N): * if mask[i]: # <<<<<<<<<<<<<< * if fill_count >= lim: * continue */ __pyx_t_8 = __pyx_v_i; __pyx_t_3 = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_mask.rcbuffer->pybuffer.buf, __pyx_t_8, __pyx_pybuffernd_mask.diminfo[0].strides)) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":1053 * for i in range(N): * if mask[i]: * if fill_count >= lim: # <<<<<<<<<<<<<< * continue * fill_count += 1 */ __pyx_t_3 = ((__pyx_v_fill_count >= __pyx_v_lim) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":1054 * if mask[i]: * if fill_count >= lim: * continue # <<<<<<<<<<<<<< * fill_count += 1 * values[i] = val */ goto __pyx_L6_continue; goto __pyx_L9; } __pyx_L9:; /* "pandas/src/generated.pyx":1055 * if fill_count >= lim: * continue * fill_count += 1 # <<<<<<<<<<<<<< * values[i] = val * else: */ __pyx_v_fill_count = (__pyx_v_fill_count + 1); /* "pandas/src/generated.pyx":1056 * continue * fill_count += 1 * values[i] = val # <<<<<<<<<<<<<< * else: * fill_count = 0 */ __pyx_t_9 = __pyx_v_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_9, __pyx_pybuffernd_values.diminfo[0].strides) = __pyx_v_val; goto __pyx_L8; } /*else*/ { /* "pandas/src/generated.pyx":1058 * values[i] = val * else: * fill_count = 0 # <<<<<<<<<<<<<< * val = values[i] * */ __pyx_v_fill_count = 0; /* "pandas/src/generated.pyx":1059 * else: * fill_count = 0 * val = values[i] # <<<<<<<<<<<<<< * * @cython.boundscheck(False) */ __pyx_t_10 = __pyx_v_i; __pyx_v_val = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_10, __pyx_pybuffernd_values.diminfo[0].strides)); } __pyx_L8:; __pyx_L6_continue:; } __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_4); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_mask.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.pad_inplace_float32", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_mask.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_143pad_inplace_object(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_143pad_inplace_object = {__Pyx_NAMESTR("pad_inplace_object"), (PyCFunction)__pyx_pw_6pandas_5algos_143pad_inplace_object, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_143pad_inplace_object(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_values = 0; PyArrayObject *__pyx_v_mask = 0; PyObject *__pyx_v_limit = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("pad_inplace_object (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__values,&__pyx_n_s__mask,&__pyx_n_s__limit,0}; PyObject* values[3] = {0,0,0}; /* "pandas/src/generated.pyx":1065 * def pad_inplace_object(ndarray[object] values, * ndarray[uint8_t, cast=True] mask, * limit=None): # <<<<<<<<<<<<<< * cdef Py_ssize_t i, N * cdef object val */ values[2] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__values)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__mask)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("pad_inplace_object", 0, 2, 3, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1063; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__limit); if (value) { values[2] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "pad_inplace_object") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1063; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_values = ((PyArrayObject *)values[0]); __pyx_v_mask = ((PyArrayObject *)values[1]); __pyx_v_limit = values[2]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("pad_inplace_object", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1063; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.pad_inplace_object", __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_filename = __pyx_f[2]; __pyx_lineno = 1063; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_mask), __pyx_ptype_5numpy_ndarray, 1, "mask", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1064; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_142pad_inplace_object(__pyx_self, __pyx_v_values, __pyx_v_mask, __pyx_v_limit); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":1063 * @cython.boundscheck(False) * @cython.wraparound(False) * def pad_inplace_object(ndarray[object] values, # <<<<<<<<<<<<<< * ndarray[uint8_t, cast=True] mask, * limit=None): */ static PyObject *__pyx_pf_6pandas_5algos_142pad_inplace_object(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_mask, PyObject *__pyx_v_limit) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_N; PyObject *__pyx_v_val = 0; int __pyx_v_lim; int __pyx_v_fill_count; __Pyx_LocalBuf_ND __pyx_pybuffernd_mask; __Pyx_Buffer __pyx_pybuffer_mask; __Pyx_LocalBuf_ND __pyx_pybuffernd_values; __Pyx_Buffer __pyx_pybuffer_values; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; int __pyx_t_2; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; int __pyx_t_5; long __pyx_t_6; Py_ssize_t __pyx_t_7; Py_ssize_t __pyx_t_8; Py_ssize_t __pyx_t_9; PyObject **__pyx_t_10; Py_ssize_t __pyx_t_11; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("pad_inplace_object", 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_mask.pybuffer.buf = NULL; __pyx_pybuffer_mask.refcount = 0; __pyx_pybuffernd_mask.data = NULL; __pyx_pybuffernd_mask.rcbuffer = &__pyx_pybuffer_mask; { __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| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1063; __pyx_clineno = __LINE__; goto __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_mask.rcbuffer->pybuffer, (PyObject*)__pyx_v_mask, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 1, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1063; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; /* "pandas/src/generated.pyx":1068 * cdef Py_ssize_t i, N * cdef object val * cdef int lim, fill_count = 0 # <<<<<<<<<<<<<< * * N = len(values) */ __pyx_v_fill_count = 0; /* "pandas/src/generated.pyx":1070 * cdef int lim, fill_count = 0 * * N = len(values) # <<<<<<<<<<<<<< * * # GH 2778 */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1070; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_N = __pyx_t_1; /* "pandas/src/generated.pyx":1073 * * # GH 2778 * if N == 0: # <<<<<<<<<<<<<< * return * */ __pyx_t_2 = ((__pyx_v_N == 0) != 0); if (__pyx_t_2) { /* "pandas/src/generated.pyx":1074 * # GH 2778 * if N == 0: * return # <<<<<<<<<<<<<< * * if limit is None: */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; goto __pyx_L3; } __pyx_L3:; /* "pandas/src/generated.pyx":1076 * return * * if limit is None: # <<<<<<<<<<<<<< * lim = N * else: */ __pyx_t_2 = (__pyx_v_limit == Py_None); __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":1077 * * if limit is None: * lim = N # <<<<<<<<<<<<<< * else: * if limit < 0: */ __pyx_v_lim = __pyx_v_N; goto __pyx_L4; } /*else*/ { /* "pandas/src/generated.pyx":1079 * lim = N * else: * if limit < 0: # <<<<<<<<<<<<<< * raise ValueError('Limit must be non-negative') * lim = limit */ __pyx_t_4 = PyObject_RichCompare(__pyx_v_limit, __pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1079; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1079; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_3) { /* "pandas/src/generated.pyx":1080 * else: * if limit < 0: * raise ValueError('Limit must be non-negative') # <<<<<<<<<<<<<< * lim = limit * */ __pyx_t_4 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_77), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1080; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 1080; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L5; } __pyx_L5:; /* "pandas/src/generated.pyx":1081 * if limit < 0: * raise ValueError('Limit must be non-negative') * lim = limit # <<<<<<<<<<<<<< * * val = values[0] */ __pyx_t_5 = __Pyx_PyInt_AsInt(__pyx_v_limit); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1081; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_lim = __pyx_t_5; } __pyx_L4:; /* "pandas/src/generated.pyx":1083 * lim = limit * * val = values[0] # <<<<<<<<<<<<<< * for i in range(N): * if mask[i]: */ __pyx_t_6 = 0; __pyx_t_4 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_6, __pyx_pybuffernd_values.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_4); __pyx_v_val = __pyx_t_4; __pyx_t_4 = 0; /* "pandas/src/generated.pyx":1084 * * val = values[0] * for i in range(N): # <<<<<<<<<<<<<< * if mask[i]: * if fill_count >= lim: */ __pyx_t_1 = __pyx_v_N; for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_1; __pyx_t_7+=1) { __pyx_v_i = __pyx_t_7; /* "pandas/src/generated.pyx":1085 * val = values[0] * for i in range(N): * if mask[i]: # <<<<<<<<<<<<<< * if fill_count >= lim: * continue */ __pyx_t_8 = __pyx_v_i; __pyx_t_3 = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_mask.rcbuffer->pybuffer.buf, __pyx_t_8, __pyx_pybuffernd_mask.diminfo[0].strides)) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":1086 * for i in range(N): * if mask[i]: * if fill_count >= lim: # <<<<<<<<<<<<<< * continue * fill_count += 1 */ __pyx_t_3 = ((__pyx_v_fill_count >= __pyx_v_lim) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":1087 * if mask[i]: * if fill_count >= lim: * continue # <<<<<<<<<<<<<< * fill_count += 1 * values[i] = val */ goto __pyx_L6_continue; goto __pyx_L9; } __pyx_L9:; /* "pandas/src/generated.pyx":1088 * if fill_count >= lim: * continue * fill_count += 1 # <<<<<<<<<<<<<< * values[i] = val * else: */ __pyx_v_fill_count = (__pyx_v_fill_count + 1); /* "pandas/src/generated.pyx":1089 * continue * fill_count += 1 * values[i] = val # <<<<<<<<<<<<<< * else: * fill_count = 0 */ __pyx_t_9 = __pyx_v_i; __pyx_t_10 = __Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_9, __pyx_pybuffernd_values.diminfo[0].strides); __Pyx_GOTREF(*__pyx_t_10); __Pyx_INCREF(__pyx_v_val); __Pyx_DECREF(*__pyx_t_10); *__pyx_t_10 = __pyx_v_val; __Pyx_GIVEREF(*__pyx_t_10); goto __pyx_L8; } /*else*/ { /* "pandas/src/generated.pyx":1091 * values[i] = val * else: * fill_count = 0 # <<<<<<<<<<<<<< * val = values[i] * */ __pyx_v_fill_count = 0; /* "pandas/src/generated.pyx":1092 * else: * fill_count = 0 * val = values[i] # <<<<<<<<<<<<<< * * @cython.boundscheck(False) */ __pyx_t_11 = __pyx_v_i; __pyx_t_4 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_11, __pyx_pybuffernd_values.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_4); __Pyx_DECREF_SET(__pyx_v_val, __pyx_t_4); __pyx_t_4 = 0; } __pyx_L8:; __pyx_L6_continue:; } __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_4); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_mask.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.pad_inplace_object", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_mask.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF(__pyx_v_val); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_145pad_inplace_int32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_145pad_inplace_int32 = {__Pyx_NAMESTR("pad_inplace_int32"), (PyCFunction)__pyx_pw_6pandas_5algos_145pad_inplace_int32, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_145pad_inplace_int32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_values = 0; PyArrayObject *__pyx_v_mask = 0; PyObject *__pyx_v_limit = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("pad_inplace_int32 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__values,&__pyx_n_s__mask,&__pyx_n_s__limit,0}; PyObject* values[3] = {0,0,0}; /* "pandas/src/generated.pyx":1098 * def pad_inplace_int32(ndarray[int32_t] values, * ndarray[uint8_t, cast=True] mask, * limit=None): # <<<<<<<<<<<<<< * cdef Py_ssize_t i, N * cdef int32_t val */ values[2] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__values)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__mask)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("pad_inplace_int32", 0, 2, 3, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1096; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__limit); if (value) { values[2] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "pad_inplace_int32") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1096; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_values = ((PyArrayObject *)values[0]); __pyx_v_mask = ((PyArrayObject *)values[1]); __pyx_v_limit = values[2]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("pad_inplace_int32", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1096; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.pad_inplace_int32", __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_filename = __pyx_f[2]; __pyx_lineno = 1096; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_mask), __pyx_ptype_5numpy_ndarray, 1, "mask", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1097; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_144pad_inplace_int32(__pyx_self, __pyx_v_values, __pyx_v_mask, __pyx_v_limit); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":1096 * @cython.boundscheck(False) * @cython.wraparound(False) * def pad_inplace_int32(ndarray[int32_t] values, # <<<<<<<<<<<<<< * ndarray[uint8_t, cast=True] mask, * limit=None): */ static PyObject *__pyx_pf_6pandas_5algos_144pad_inplace_int32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_mask, PyObject *__pyx_v_limit) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_N; __pyx_t_5numpy_int32_t __pyx_v_val; int __pyx_v_lim; int __pyx_v_fill_count; __Pyx_LocalBuf_ND __pyx_pybuffernd_mask; __Pyx_Buffer __pyx_pybuffer_mask; __Pyx_LocalBuf_ND __pyx_pybuffernd_values; __Pyx_Buffer __pyx_pybuffer_values; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; int __pyx_t_2; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; int __pyx_t_5; long __pyx_t_6; Py_ssize_t __pyx_t_7; Py_ssize_t __pyx_t_8; Py_ssize_t __pyx_t_9; Py_ssize_t __pyx_t_10; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("pad_inplace_int32", 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_mask.pybuffer.buf = NULL; __pyx_pybuffer_mask.refcount = 0; __pyx_pybuffernd_mask.data = NULL; __pyx_pybuffernd_mask.rcbuffer = &__pyx_pybuffer_mask; { __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_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1096; __pyx_clineno = __LINE__; goto __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_mask.rcbuffer->pybuffer, (PyObject*)__pyx_v_mask, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 1, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1096; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; /* "pandas/src/generated.pyx":1101 * cdef Py_ssize_t i, N * cdef int32_t val * cdef int lim, fill_count = 0 # <<<<<<<<<<<<<< * * N = len(values) */ __pyx_v_fill_count = 0; /* "pandas/src/generated.pyx":1103 * cdef int lim, fill_count = 0 * * N = len(values) # <<<<<<<<<<<<<< * * # GH 2778 */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1103; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_N = __pyx_t_1; /* "pandas/src/generated.pyx":1106 * * # GH 2778 * if N == 0: # <<<<<<<<<<<<<< * return * */ __pyx_t_2 = ((__pyx_v_N == 0) != 0); if (__pyx_t_2) { /* "pandas/src/generated.pyx":1107 * # GH 2778 * if N == 0: * return # <<<<<<<<<<<<<< * * if limit is None: */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; goto __pyx_L3; } __pyx_L3:; /* "pandas/src/generated.pyx":1109 * return * * if limit is None: # <<<<<<<<<<<<<< * lim = N * else: */ __pyx_t_2 = (__pyx_v_limit == Py_None); __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":1110 * * if limit is None: * lim = N # <<<<<<<<<<<<<< * else: * if limit < 0: */ __pyx_v_lim = __pyx_v_N; goto __pyx_L4; } /*else*/ { /* "pandas/src/generated.pyx":1112 * lim = N * else: * if limit < 0: # <<<<<<<<<<<<<< * raise ValueError('Limit must be non-negative') * lim = limit */ __pyx_t_4 = PyObject_RichCompare(__pyx_v_limit, __pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1112; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1112; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_3) { /* "pandas/src/generated.pyx":1113 * else: * if limit < 0: * raise ValueError('Limit must be non-negative') # <<<<<<<<<<<<<< * lim = limit * */ __pyx_t_4 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_78), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1113; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 1113; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L5; } __pyx_L5:; /* "pandas/src/generated.pyx":1114 * if limit < 0: * raise ValueError('Limit must be non-negative') * lim = limit # <<<<<<<<<<<<<< * * val = values[0] */ __pyx_t_5 = __Pyx_PyInt_AsInt(__pyx_v_limit); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1114; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_lim = __pyx_t_5; } __pyx_L4:; /* "pandas/src/generated.pyx":1116 * lim = limit * * val = values[0] # <<<<<<<<<<<<<< * for i in range(N): * if mask[i]: */ __pyx_t_6 = 0; __pyx_v_val = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_6, __pyx_pybuffernd_values.diminfo[0].strides)); /* "pandas/src/generated.pyx":1117 * * val = values[0] * for i in range(N): # <<<<<<<<<<<<<< * if mask[i]: * if fill_count >= lim: */ __pyx_t_1 = __pyx_v_N; for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_1; __pyx_t_7+=1) { __pyx_v_i = __pyx_t_7; /* "pandas/src/generated.pyx":1118 * val = values[0] * for i in range(N): * if mask[i]: # <<<<<<<<<<<<<< * if fill_count >= lim: * continue */ __pyx_t_8 = __pyx_v_i; __pyx_t_3 = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_mask.rcbuffer->pybuffer.buf, __pyx_t_8, __pyx_pybuffernd_mask.diminfo[0].strides)) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":1119 * for i in range(N): * if mask[i]: * if fill_count >= lim: # <<<<<<<<<<<<<< * continue * fill_count += 1 */ __pyx_t_3 = ((__pyx_v_fill_count >= __pyx_v_lim) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":1120 * if mask[i]: * if fill_count >= lim: * continue # <<<<<<<<<<<<<< * fill_count += 1 * values[i] = val */ goto __pyx_L6_continue; goto __pyx_L9; } __pyx_L9:; /* "pandas/src/generated.pyx":1121 * if fill_count >= lim: * continue * fill_count += 1 # <<<<<<<<<<<<<< * values[i] = val * else: */ __pyx_v_fill_count = (__pyx_v_fill_count + 1); /* "pandas/src/generated.pyx":1122 * continue * fill_count += 1 * values[i] = val # <<<<<<<<<<<<<< * else: * fill_count = 0 */ __pyx_t_9 = __pyx_v_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_9, __pyx_pybuffernd_values.diminfo[0].strides) = __pyx_v_val; goto __pyx_L8; } /*else*/ { /* "pandas/src/generated.pyx":1124 * values[i] = val * else: * fill_count = 0 # <<<<<<<<<<<<<< * val = values[i] * */ __pyx_v_fill_count = 0; /* "pandas/src/generated.pyx":1125 * else: * fill_count = 0 * val = values[i] # <<<<<<<<<<<<<< * * @cython.boundscheck(False) */ __pyx_t_10 = __pyx_v_i; __pyx_v_val = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_10, __pyx_pybuffernd_values.diminfo[0].strides)); } __pyx_L8:; __pyx_L6_continue:; } __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_4); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_mask.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.pad_inplace_int32", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_mask.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_147pad_inplace_int64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_147pad_inplace_int64 = {__Pyx_NAMESTR("pad_inplace_int64"), (PyCFunction)__pyx_pw_6pandas_5algos_147pad_inplace_int64, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_147pad_inplace_int64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_values = 0; PyArrayObject *__pyx_v_mask = 0; PyObject *__pyx_v_limit = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("pad_inplace_int64 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__values,&__pyx_n_s__mask,&__pyx_n_s__limit,0}; PyObject* values[3] = {0,0,0}; /* "pandas/src/generated.pyx":1131 * def pad_inplace_int64(ndarray[int64_t] values, * ndarray[uint8_t, cast=True] mask, * limit=None): # <<<<<<<<<<<<<< * cdef Py_ssize_t i, N * cdef int64_t val */ values[2] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__values)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__mask)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("pad_inplace_int64", 0, 2, 3, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1129; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__limit); if (value) { values[2] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "pad_inplace_int64") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1129; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_values = ((PyArrayObject *)values[0]); __pyx_v_mask = ((PyArrayObject *)values[1]); __pyx_v_limit = values[2]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("pad_inplace_int64", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1129; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.pad_inplace_int64", __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_filename = __pyx_f[2]; __pyx_lineno = 1129; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_mask), __pyx_ptype_5numpy_ndarray, 1, "mask", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1130; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_146pad_inplace_int64(__pyx_self, __pyx_v_values, __pyx_v_mask, __pyx_v_limit); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":1129 * @cython.boundscheck(False) * @cython.wraparound(False) * def pad_inplace_int64(ndarray[int64_t] values, # <<<<<<<<<<<<<< * ndarray[uint8_t, cast=True] mask, * limit=None): */ static PyObject *__pyx_pf_6pandas_5algos_146pad_inplace_int64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_mask, PyObject *__pyx_v_limit) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_N; __pyx_t_5numpy_int64_t __pyx_v_val; int __pyx_v_lim; int __pyx_v_fill_count; __Pyx_LocalBuf_ND __pyx_pybuffernd_mask; __Pyx_Buffer __pyx_pybuffer_mask; __Pyx_LocalBuf_ND __pyx_pybuffernd_values; __Pyx_Buffer __pyx_pybuffer_values; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; int __pyx_t_2; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; int __pyx_t_5; long __pyx_t_6; Py_ssize_t __pyx_t_7; Py_ssize_t __pyx_t_8; Py_ssize_t __pyx_t_9; Py_ssize_t __pyx_t_10; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("pad_inplace_int64", 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_mask.pybuffer.buf = NULL; __pyx_pybuffer_mask.refcount = 0; __pyx_pybuffernd_mask.data = NULL; __pyx_pybuffernd_mask.rcbuffer = &__pyx_pybuffer_mask; { __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_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1129; __pyx_clineno = __LINE__; goto __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_mask.rcbuffer->pybuffer, (PyObject*)__pyx_v_mask, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 1, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1129; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; /* "pandas/src/generated.pyx":1134 * cdef Py_ssize_t i, N * cdef int64_t val * cdef int lim, fill_count = 0 # <<<<<<<<<<<<<< * * N = len(values) */ __pyx_v_fill_count = 0; /* "pandas/src/generated.pyx":1136 * cdef int lim, fill_count = 0 * * N = len(values) # <<<<<<<<<<<<<< * * # GH 2778 */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1136; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_N = __pyx_t_1; /* "pandas/src/generated.pyx":1139 * * # GH 2778 * if N == 0: # <<<<<<<<<<<<<< * return * */ __pyx_t_2 = ((__pyx_v_N == 0) != 0); if (__pyx_t_2) { /* "pandas/src/generated.pyx":1140 * # GH 2778 * if N == 0: * return # <<<<<<<<<<<<<< * * if limit is None: */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; goto __pyx_L3; } __pyx_L3:; /* "pandas/src/generated.pyx":1142 * return * * if limit is None: # <<<<<<<<<<<<<< * lim = N * else: */ __pyx_t_2 = (__pyx_v_limit == Py_None); __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":1143 * * if limit is None: * lim = N # <<<<<<<<<<<<<< * else: * if limit < 0: */ __pyx_v_lim = __pyx_v_N; goto __pyx_L4; } /*else*/ { /* "pandas/src/generated.pyx":1145 * lim = N * else: * if limit < 0: # <<<<<<<<<<<<<< * raise ValueError('Limit must be non-negative') * lim = limit */ __pyx_t_4 = PyObject_RichCompare(__pyx_v_limit, __pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1145; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1145; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_3) { /* "pandas/src/generated.pyx":1146 * else: * if limit < 0: * raise ValueError('Limit must be non-negative') # <<<<<<<<<<<<<< * lim = limit * */ __pyx_t_4 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_79), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1146; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 1146; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L5; } __pyx_L5:; /* "pandas/src/generated.pyx":1147 * if limit < 0: * raise ValueError('Limit must be non-negative') * lim = limit # <<<<<<<<<<<<<< * * val = values[0] */ __pyx_t_5 = __Pyx_PyInt_AsInt(__pyx_v_limit); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1147; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_lim = __pyx_t_5; } __pyx_L4:; /* "pandas/src/generated.pyx":1149 * lim = limit * * val = values[0] # <<<<<<<<<<<<<< * for i in range(N): * if mask[i]: */ __pyx_t_6 = 0; __pyx_v_val = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_6, __pyx_pybuffernd_values.diminfo[0].strides)); /* "pandas/src/generated.pyx":1150 * * val = values[0] * for i in range(N): # <<<<<<<<<<<<<< * if mask[i]: * if fill_count >= lim: */ __pyx_t_1 = __pyx_v_N; for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_1; __pyx_t_7+=1) { __pyx_v_i = __pyx_t_7; /* "pandas/src/generated.pyx":1151 * val = values[0] * for i in range(N): * if mask[i]: # <<<<<<<<<<<<<< * if fill_count >= lim: * continue */ __pyx_t_8 = __pyx_v_i; __pyx_t_3 = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_mask.rcbuffer->pybuffer.buf, __pyx_t_8, __pyx_pybuffernd_mask.diminfo[0].strides)) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":1152 * for i in range(N): * if mask[i]: * if fill_count >= lim: # <<<<<<<<<<<<<< * continue * fill_count += 1 */ __pyx_t_3 = ((__pyx_v_fill_count >= __pyx_v_lim) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":1153 * if mask[i]: * if fill_count >= lim: * continue # <<<<<<<<<<<<<< * fill_count += 1 * values[i] = val */ goto __pyx_L6_continue; goto __pyx_L9; } __pyx_L9:; /* "pandas/src/generated.pyx":1154 * if fill_count >= lim: * continue * fill_count += 1 # <<<<<<<<<<<<<< * values[i] = val * else: */ __pyx_v_fill_count = (__pyx_v_fill_count + 1); /* "pandas/src/generated.pyx":1155 * continue * fill_count += 1 * values[i] = val # <<<<<<<<<<<<<< * else: * fill_count = 0 */ __pyx_t_9 = __pyx_v_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_9, __pyx_pybuffernd_values.diminfo[0].strides) = __pyx_v_val; goto __pyx_L8; } /*else*/ { /* "pandas/src/generated.pyx":1157 * values[i] = val * else: * fill_count = 0 # <<<<<<<<<<<<<< * val = values[i] * */ __pyx_v_fill_count = 0; /* "pandas/src/generated.pyx":1158 * else: * fill_count = 0 * val = values[i] # <<<<<<<<<<<<<< * * @cython.boundscheck(False) */ __pyx_t_10 = __pyx_v_i; __pyx_v_val = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_10, __pyx_pybuffernd_values.diminfo[0].strides)); } __pyx_L8:; __pyx_L6_continue:; } __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_4); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_mask.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.pad_inplace_int64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_mask.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_149pad_inplace_bool(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_149pad_inplace_bool = {__Pyx_NAMESTR("pad_inplace_bool"), (PyCFunction)__pyx_pw_6pandas_5algos_149pad_inplace_bool, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_149pad_inplace_bool(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_values = 0; PyArrayObject *__pyx_v_mask = 0; PyObject *__pyx_v_limit = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("pad_inplace_bool (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__values,&__pyx_n_s__mask,&__pyx_n_s__limit,0}; PyObject* values[3] = {0,0,0}; /* "pandas/src/generated.pyx":1164 * def pad_inplace_bool(ndarray[uint8_t] values, * ndarray[uint8_t, cast=True] mask, * limit=None): # <<<<<<<<<<<<<< * cdef Py_ssize_t i, N * cdef uint8_t val */ values[2] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__values)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__mask)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("pad_inplace_bool", 0, 2, 3, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1162; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__limit); if (value) { values[2] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "pad_inplace_bool") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1162; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_values = ((PyArrayObject *)values[0]); __pyx_v_mask = ((PyArrayObject *)values[1]); __pyx_v_limit = values[2]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("pad_inplace_bool", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1162; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.pad_inplace_bool", __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_filename = __pyx_f[2]; __pyx_lineno = 1162; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_mask), __pyx_ptype_5numpy_ndarray, 1, "mask", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1163; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_148pad_inplace_bool(__pyx_self, __pyx_v_values, __pyx_v_mask, __pyx_v_limit); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":1162 * @cython.boundscheck(False) * @cython.wraparound(False) * def pad_inplace_bool(ndarray[uint8_t] values, # <<<<<<<<<<<<<< * ndarray[uint8_t, cast=True] mask, * limit=None): */ static PyObject *__pyx_pf_6pandas_5algos_148pad_inplace_bool(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_mask, PyObject *__pyx_v_limit) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_N; __pyx_t_5numpy_uint8_t __pyx_v_val; int __pyx_v_lim; int __pyx_v_fill_count; __Pyx_LocalBuf_ND __pyx_pybuffernd_mask; __Pyx_Buffer __pyx_pybuffer_mask; __Pyx_LocalBuf_ND __pyx_pybuffernd_values; __Pyx_Buffer __pyx_pybuffer_values; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; int __pyx_t_2; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; int __pyx_t_5; long __pyx_t_6; Py_ssize_t __pyx_t_7; Py_ssize_t __pyx_t_8; Py_ssize_t __pyx_t_9; Py_ssize_t __pyx_t_10; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("pad_inplace_bool", 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_mask.pybuffer.buf = NULL; __pyx_pybuffer_mask.refcount = 0; __pyx_pybuffernd_mask.data = NULL; __pyx_pybuffernd_mask.rcbuffer = &__pyx_pybuffer_mask; { __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_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1162; __pyx_clineno = __LINE__; goto __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_mask.rcbuffer->pybuffer, (PyObject*)__pyx_v_mask, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 1, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1162; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; /* "pandas/src/generated.pyx":1167 * cdef Py_ssize_t i, N * cdef uint8_t val * cdef int lim, fill_count = 0 # <<<<<<<<<<<<<< * * N = len(values) */ __pyx_v_fill_count = 0; /* "pandas/src/generated.pyx":1169 * cdef int lim, fill_count = 0 * * N = len(values) # <<<<<<<<<<<<<< * * # GH 2778 */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1169; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_N = __pyx_t_1; /* "pandas/src/generated.pyx":1172 * * # GH 2778 * if N == 0: # <<<<<<<<<<<<<< * return * */ __pyx_t_2 = ((__pyx_v_N == 0) != 0); if (__pyx_t_2) { /* "pandas/src/generated.pyx":1173 * # GH 2778 * if N == 0: * return # <<<<<<<<<<<<<< * * if limit is None: */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; goto __pyx_L3; } __pyx_L3:; /* "pandas/src/generated.pyx":1175 * return * * if limit is None: # <<<<<<<<<<<<<< * lim = N * else: */ __pyx_t_2 = (__pyx_v_limit == Py_None); __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":1176 * * if limit is None: * lim = N # <<<<<<<<<<<<<< * else: * if limit < 0: */ __pyx_v_lim = __pyx_v_N; goto __pyx_L4; } /*else*/ { /* "pandas/src/generated.pyx":1178 * lim = N * else: * if limit < 0: # <<<<<<<<<<<<<< * raise ValueError('Limit must be non-negative') * lim = limit */ __pyx_t_4 = PyObject_RichCompare(__pyx_v_limit, __pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1178; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1178; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_3) { /* "pandas/src/generated.pyx":1179 * else: * if limit < 0: * raise ValueError('Limit must be non-negative') # <<<<<<<<<<<<<< * lim = limit * */ __pyx_t_4 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_80), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1179; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 1179; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L5; } __pyx_L5:; /* "pandas/src/generated.pyx":1180 * if limit < 0: * raise ValueError('Limit must be non-negative') * lim = limit # <<<<<<<<<<<<<< * * val = values[0] */ __pyx_t_5 = __Pyx_PyInt_AsInt(__pyx_v_limit); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1180; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_lim = __pyx_t_5; } __pyx_L4:; /* "pandas/src/generated.pyx":1182 * lim = limit * * val = values[0] # <<<<<<<<<<<<<< * for i in range(N): * if mask[i]: */ __pyx_t_6 = 0; __pyx_v_val = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_6, __pyx_pybuffernd_values.diminfo[0].strides)); /* "pandas/src/generated.pyx":1183 * * val = values[0] * for i in range(N): # <<<<<<<<<<<<<< * if mask[i]: * if fill_count >= lim: */ __pyx_t_1 = __pyx_v_N; for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_1; __pyx_t_7+=1) { __pyx_v_i = __pyx_t_7; /* "pandas/src/generated.pyx":1184 * val = values[0] * for i in range(N): * if mask[i]: # <<<<<<<<<<<<<< * if fill_count >= lim: * continue */ __pyx_t_8 = __pyx_v_i; __pyx_t_3 = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_mask.rcbuffer->pybuffer.buf, __pyx_t_8, __pyx_pybuffernd_mask.diminfo[0].strides)) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":1185 * for i in range(N): * if mask[i]: * if fill_count >= lim: # <<<<<<<<<<<<<< * continue * fill_count += 1 */ __pyx_t_3 = ((__pyx_v_fill_count >= __pyx_v_lim) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":1186 * if mask[i]: * if fill_count >= lim: * continue # <<<<<<<<<<<<<< * fill_count += 1 * values[i] = val */ goto __pyx_L6_continue; goto __pyx_L9; } __pyx_L9:; /* "pandas/src/generated.pyx":1187 * if fill_count >= lim: * continue * fill_count += 1 # <<<<<<<<<<<<<< * values[i] = val * else: */ __pyx_v_fill_count = (__pyx_v_fill_count + 1); /* "pandas/src/generated.pyx":1188 * continue * fill_count += 1 * values[i] = val # <<<<<<<<<<<<<< * else: * fill_count = 0 */ __pyx_t_9 = __pyx_v_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_9, __pyx_pybuffernd_values.diminfo[0].strides) = __pyx_v_val; goto __pyx_L8; } /*else*/ { /* "pandas/src/generated.pyx":1190 * values[i] = val * else: * fill_count = 0 # <<<<<<<<<<<<<< * val = values[i] * */ __pyx_v_fill_count = 0; /* "pandas/src/generated.pyx":1191 * else: * fill_count = 0 * val = values[i] # <<<<<<<<<<<<<< * * */ __pyx_t_10 = __pyx_v_i; __pyx_v_val = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_10, __pyx_pybuffernd_values.diminfo[0].strides)); } __pyx_L8:; __pyx_L6_continue:; } __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_4); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_mask.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.pad_inplace_bool", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_mask.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_151backfill_inplace_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_151backfill_inplace_float64 = {__Pyx_NAMESTR("backfill_inplace_float64"), (PyCFunction)__pyx_pw_6pandas_5algos_151backfill_inplace_float64, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_151backfill_inplace_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_values = 0; PyArrayObject *__pyx_v_mask = 0; PyObject *__pyx_v_limit = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("backfill_inplace_float64 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__values,&__pyx_n_s__mask,&__pyx_n_s__limit,0}; PyObject* values[3] = {0,0,0}; /* "pandas/src/generated.pyx":1198 * def backfill_inplace_float64(ndarray[float64_t] values, * ndarray[uint8_t, cast=True] mask, * limit=None): # <<<<<<<<<<<<<< * cdef Py_ssize_t i, N * cdef float64_t val */ values[2] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__values)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__mask)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("backfill_inplace_float64", 0, 2, 3, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1196; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__limit); if (value) { values[2] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "backfill_inplace_float64") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1196; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_values = ((PyArrayObject *)values[0]); __pyx_v_mask = ((PyArrayObject *)values[1]); __pyx_v_limit = values[2]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("backfill_inplace_float64", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1196; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.backfill_inplace_float64", __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_filename = __pyx_f[2]; __pyx_lineno = 1196; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_mask), __pyx_ptype_5numpy_ndarray, 1, "mask", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1197; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_150backfill_inplace_float64(__pyx_self, __pyx_v_values, __pyx_v_mask, __pyx_v_limit); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":1196 * @cython.boundscheck(False) * @cython.wraparound(False) * def backfill_inplace_float64(ndarray[float64_t] values, # <<<<<<<<<<<<<< * ndarray[uint8_t, cast=True] mask, * limit=None): */ static PyObject *__pyx_pf_6pandas_5algos_150backfill_inplace_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_mask, PyObject *__pyx_v_limit) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_N; __pyx_t_5numpy_float64_t __pyx_v_val; int __pyx_v_lim; int __pyx_v_fill_count; __Pyx_LocalBuf_ND __pyx_pybuffernd_mask; __Pyx_Buffer __pyx_pybuffer_mask; __Pyx_LocalBuf_ND __pyx_pybuffernd_values; __Pyx_Buffer __pyx_pybuffer_values; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; int __pyx_t_2; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; int __pyx_t_5; Py_ssize_t __pyx_t_6; Py_ssize_t __pyx_t_7; Py_ssize_t __pyx_t_8; Py_ssize_t __pyx_t_9; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("backfill_inplace_float64", 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_mask.pybuffer.buf = NULL; __pyx_pybuffer_mask.refcount = 0; __pyx_pybuffernd_mask.data = NULL; __pyx_pybuffernd_mask.rcbuffer = &__pyx_pybuffer_mask; { __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| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1196; __pyx_clineno = __LINE__; goto __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_mask.rcbuffer->pybuffer, (PyObject*)__pyx_v_mask, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 1, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1196; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; /* "pandas/src/generated.pyx":1201 * cdef Py_ssize_t i, N * cdef float64_t val * cdef int lim, fill_count = 0 # <<<<<<<<<<<<<< * * N = len(values) */ __pyx_v_fill_count = 0; /* "pandas/src/generated.pyx":1203 * cdef int lim, fill_count = 0 * * N = len(values) # <<<<<<<<<<<<<< * * # GH 2778 */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1203; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_N = __pyx_t_1; /* "pandas/src/generated.pyx":1206 * * # GH 2778 * if N == 0: # <<<<<<<<<<<<<< * return * */ __pyx_t_2 = ((__pyx_v_N == 0) != 0); if (__pyx_t_2) { /* "pandas/src/generated.pyx":1207 * # GH 2778 * if N == 0: * return # <<<<<<<<<<<<<< * * if limit is None: */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; goto __pyx_L3; } __pyx_L3:; /* "pandas/src/generated.pyx":1209 * return * * if limit is None: # <<<<<<<<<<<<<< * lim = N * else: */ __pyx_t_2 = (__pyx_v_limit == Py_None); __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":1210 * * if limit is None: * lim = N # <<<<<<<<<<<<<< * else: * if limit < 0: */ __pyx_v_lim = __pyx_v_N; goto __pyx_L4; } /*else*/ { /* "pandas/src/generated.pyx":1212 * lim = N * else: * if limit < 0: # <<<<<<<<<<<<<< * raise ValueError('Limit must be non-negative') * lim = limit */ __pyx_t_4 = PyObject_RichCompare(__pyx_v_limit, __pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1212; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1212; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_3) { /* "pandas/src/generated.pyx":1213 * else: * if limit < 0: * raise ValueError('Limit must be non-negative') # <<<<<<<<<<<<<< * lim = limit * */ __pyx_t_4 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_81), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1213; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 1213; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L5; } __pyx_L5:; /* "pandas/src/generated.pyx":1214 * if limit < 0: * raise ValueError('Limit must be non-negative') * lim = limit # <<<<<<<<<<<<<< * * val = values[N - 1] */ __pyx_t_5 = __Pyx_PyInt_AsInt(__pyx_v_limit); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1214; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_lim = __pyx_t_5; } __pyx_L4:; /* "pandas/src/generated.pyx":1216 * lim = limit * * val = values[N - 1] # <<<<<<<<<<<<<< * for i in range(N - 1, -1 , -1): * if mask[i]: */ __pyx_t_1 = (__pyx_v_N - 1); __pyx_v_val = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_1, __pyx_pybuffernd_values.diminfo[0].strides)); /* "pandas/src/generated.pyx":1217 * * val = values[N - 1] * for i in range(N - 1, -1 , -1): # <<<<<<<<<<<<<< * if mask[i]: * if fill_count >= lim: */ for (__pyx_t_6 = (__pyx_v_N - 1); __pyx_t_6 > -1; __pyx_t_6-=1) { __pyx_v_i = __pyx_t_6; /* "pandas/src/generated.pyx":1218 * val = values[N - 1] * for i in range(N - 1, -1 , -1): * if mask[i]: # <<<<<<<<<<<<<< * if fill_count >= lim: * continue */ __pyx_t_7 = __pyx_v_i; __pyx_t_3 = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_mask.rcbuffer->pybuffer.buf, __pyx_t_7, __pyx_pybuffernd_mask.diminfo[0].strides)) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":1219 * for i in range(N - 1, -1 , -1): * if mask[i]: * if fill_count >= lim: # <<<<<<<<<<<<<< * continue * fill_count += 1 */ __pyx_t_3 = ((__pyx_v_fill_count >= __pyx_v_lim) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":1220 * if mask[i]: * if fill_count >= lim: * continue # <<<<<<<<<<<<<< * fill_count += 1 * values[i] = val */ goto __pyx_L6_continue; goto __pyx_L9; } __pyx_L9:; /* "pandas/src/generated.pyx":1221 * if fill_count >= lim: * continue * fill_count += 1 # <<<<<<<<<<<<<< * values[i] = val * else: */ __pyx_v_fill_count = (__pyx_v_fill_count + 1); /* "pandas/src/generated.pyx":1222 * continue * fill_count += 1 * values[i] = val # <<<<<<<<<<<<<< * else: * fill_count = 0 */ __pyx_t_8 = __pyx_v_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_8, __pyx_pybuffernd_values.diminfo[0].strides) = __pyx_v_val; goto __pyx_L8; } /*else*/ { /* "pandas/src/generated.pyx":1224 * values[i] = val * else: * fill_count = 0 # <<<<<<<<<<<<<< * val = values[i] * @cython.boundscheck(False) */ __pyx_v_fill_count = 0; /* "pandas/src/generated.pyx":1225 * else: * fill_count = 0 * val = values[i] # <<<<<<<<<<<<<< * @cython.boundscheck(False) * @cython.wraparound(False) */ __pyx_t_9 = __pyx_v_i; __pyx_v_val = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_9, __pyx_pybuffernd_values.diminfo[0].strides)); } __pyx_L8:; __pyx_L6_continue:; } __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_4); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_mask.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.backfill_inplace_float64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_mask.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_153backfill_inplace_float32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_153backfill_inplace_float32 = {__Pyx_NAMESTR("backfill_inplace_float32"), (PyCFunction)__pyx_pw_6pandas_5algos_153backfill_inplace_float32, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_153backfill_inplace_float32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_values = 0; PyArrayObject *__pyx_v_mask = 0; PyObject *__pyx_v_limit = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("backfill_inplace_float32 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__values,&__pyx_n_s__mask,&__pyx_n_s__limit,0}; PyObject* values[3] = {0,0,0}; /* "pandas/src/generated.pyx":1230 * def backfill_inplace_float32(ndarray[float32_t] values, * ndarray[uint8_t, cast=True] mask, * limit=None): # <<<<<<<<<<<<<< * cdef Py_ssize_t i, N * cdef float32_t val */ values[2] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__values)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__mask)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("backfill_inplace_float32", 0, 2, 3, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1228; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__limit); if (value) { values[2] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "backfill_inplace_float32") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1228; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_values = ((PyArrayObject *)values[0]); __pyx_v_mask = ((PyArrayObject *)values[1]); __pyx_v_limit = values[2]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("backfill_inplace_float32", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1228; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.backfill_inplace_float32", __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_filename = __pyx_f[2]; __pyx_lineno = 1228; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_mask), __pyx_ptype_5numpy_ndarray, 1, "mask", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1229; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_152backfill_inplace_float32(__pyx_self, __pyx_v_values, __pyx_v_mask, __pyx_v_limit); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":1228 * @cython.boundscheck(False) * @cython.wraparound(False) * def backfill_inplace_float32(ndarray[float32_t] values, # <<<<<<<<<<<<<< * ndarray[uint8_t, cast=True] mask, * limit=None): */ static PyObject *__pyx_pf_6pandas_5algos_152backfill_inplace_float32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_mask, PyObject *__pyx_v_limit) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_N; __pyx_t_5numpy_float32_t __pyx_v_val; int __pyx_v_lim; int __pyx_v_fill_count; __Pyx_LocalBuf_ND __pyx_pybuffernd_mask; __Pyx_Buffer __pyx_pybuffer_mask; __Pyx_LocalBuf_ND __pyx_pybuffernd_values; __Pyx_Buffer __pyx_pybuffer_values; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; int __pyx_t_2; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; int __pyx_t_5; Py_ssize_t __pyx_t_6; Py_ssize_t __pyx_t_7; Py_ssize_t __pyx_t_8; Py_ssize_t __pyx_t_9; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("backfill_inplace_float32", 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_mask.pybuffer.buf = NULL; __pyx_pybuffer_mask.refcount = 0; __pyx_pybuffernd_mask.data = NULL; __pyx_pybuffernd_mask.rcbuffer = &__pyx_pybuffer_mask; { __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_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1228; __pyx_clineno = __LINE__; goto __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_mask.rcbuffer->pybuffer, (PyObject*)__pyx_v_mask, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 1, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1228; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; /* "pandas/src/generated.pyx":1233 * cdef Py_ssize_t i, N * cdef float32_t val * cdef int lim, fill_count = 0 # <<<<<<<<<<<<<< * * N = len(values) */ __pyx_v_fill_count = 0; /* "pandas/src/generated.pyx":1235 * cdef int lim, fill_count = 0 * * N = len(values) # <<<<<<<<<<<<<< * * # GH 2778 */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1235; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_N = __pyx_t_1; /* "pandas/src/generated.pyx":1238 * * # GH 2778 * if N == 0: # <<<<<<<<<<<<<< * return * */ __pyx_t_2 = ((__pyx_v_N == 0) != 0); if (__pyx_t_2) { /* "pandas/src/generated.pyx":1239 * # GH 2778 * if N == 0: * return # <<<<<<<<<<<<<< * * if limit is None: */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; goto __pyx_L3; } __pyx_L3:; /* "pandas/src/generated.pyx":1241 * return * * if limit is None: # <<<<<<<<<<<<<< * lim = N * else: */ __pyx_t_2 = (__pyx_v_limit == Py_None); __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":1242 * * if limit is None: * lim = N # <<<<<<<<<<<<<< * else: * if limit < 0: */ __pyx_v_lim = __pyx_v_N; goto __pyx_L4; } /*else*/ { /* "pandas/src/generated.pyx":1244 * lim = N * else: * if limit < 0: # <<<<<<<<<<<<<< * raise ValueError('Limit must be non-negative') * lim = limit */ __pyx_t_4 = PyObject_RichCompare(__pyx_v_limit, __pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1244; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1244; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_3) { /* "pandas/src/generated.pyx":1245 * else: * if limit < 0: * raise ValueError('Limit must be non-negative') # <<<<<<<<<<<<<< * lim = limit * */ __pyx_t_4 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_82), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1245; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 1245; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L5; } __pyx_L5:; /* "pandas/src/generated.pyx":1246 * if limit < 0: * raise ValueError('Limit must be non-negative') * lim = limit # <<<<<<<<<<<<<< * * val = values[N - 1] */ __pyx_t_5 = __Pyx_PyInt_AsInt(__pyx_v_limit); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1246; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_lim = __pyx_t_5; } __pyx_L4:; /* "pandas/src/generated.pyx":1248 * lim = limit * * val = values[N - 1] # <<<<<<<<<<<<<< * for i in range(N - 1, -1 , -1): * if mask[i]: */ __pyx_t_1 = (__pyx_v_N - 1); __pyx_v_val = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_1, __pyx_pybuffernd_values.diminfo[0].strides)); /* "pandas/src/generated.pyx":1249 * * val = values[N - 1] * for i in range(N - 1, -1 , -1): # <<<<<<<<<<<<<< * if mask[i]: * if fill_count >= lim: */ for (__pyx_t_6 = (__pyx_v_N - 1); __pyx_t_6 > -1; __pyx_t_6-=1) { __pyx_v_i = __pyx_t_6; /* "pandas/src/generated.pyx":1250 * val = values[N - 1] * for i in range(N - 1, -1 , -1): * if mask[i]: # <<<<<<<<<<<<<< * if fill_count >= lim: * continue */ __pyx_t_7 = __pyx_v_i; __pyx_t_3 = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_mask.rcbuffer->pybuffer.buf, __pyx_t_7, __pyx_pybuffernd_mask.diminfo[0].strides)) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":1251 * for i in range(N - 1, -1 , -1): * if mask[i]: * if fill_count >= lim: # <<<<<<<<<<<<<< * continue * fill_count += 1 */ __pyx_t_3 = ((__pyx_v_fill_count >= __pyx_v_lim) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":1252 * if mask[i]: * if fill_count >= lim: * continue # <<<<<<<<<<<<<< * fill_count += 1 * values[i] = val */ goto __pyx_L6_continue; goto __pyx_L9; } __pyx_L9:; /* "pandas/src/generated.pyx":1253 * if fill_count >= lim: * continue * fill_count += 1 # <<<<<<<<<<<<<< * values[i] = val * else: */ __pyx_v_fill_count = (__pyx_v_fill_count + 1); /* "pandas/src/generated.pyx":1254 * continue * fill_count += 1 * values[i] = val # <<<<<<<<<<<<<< * else: * fill_count = 0 */ __pyx_t_8 = __pyx_v_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_8, __pyx_pybuffernd_values.diminfo[0].strides) = __pyx_v_val; goto __pyx_L8; } /*else*/ { /* "pandas/src/generated.pyx":1256 * values[i] = val * else: * fill_count = 0 # <<<<<<<<<<<<<< * val = values[i] * @cython.boundscheck(False) */ __pyx_v_fill_count = 0; /* "pandas/src/generated.pyx":1257 * else: * fill_count = 0 * val = values[i] # <<<<<<<<<<<<<< * @cython.boundscheck(False) * @cython.wraparound(False) */ __pyx_t_9 = __pyx_v_i; __pyx_v_val = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_9, __pyx_pybuffernd_values.diminfo[0].strides)); } __pyx_L8:; __pyx_L6_continue:; } __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_4); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_mask.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.backfill_inplace_float32", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_mask.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_155backfill_inplace_object(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_155backfill_inplace_object = {__Pyx_NAMESTR("backfill_inplace_object"), (PyCFunction)__pyx_pw_6pandas_5algos_155backfill_inplace_object, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_155backfill_inplace_object(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_values = 0; PyArrayObject *__pyx_v_mask = 0; PyObject *__pyx_v_limit = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("backfill_inplace_object (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__values,&__pyx_n_s__mask,&__pyx_n_s__limit,0}; PyObject* values[3] = {0,0,0}; /* "pandas/src/generated.pyx":1262 * def backfill_inplace_object(ndarray[object] values, * ndarray[uint8_t, cast=True] mask, * limit=None): # <<<<<<<<<<<<<< * cdef Py_ssize_t i, N * cdef object val */ values[2] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__values)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__mask)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("backfill_inplace_object", 0, 2, 3, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1260; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__limit); if (value) { values[2] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "backfill_inplace_object") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1260; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_values = ((PyArrayObject *)values[0]); __pyx_v_mask = ((PyArrayObject *)values[1]); __pyx_v_limit = values[2]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("backfill_inplace_object", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1260; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.backfill_inplace_object", __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_filename = __pyx_f[2]; __pyx_lineno = 1260; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_mask), __pyx_ptype_5numpy_ndarray, 1, "mask", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1261; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_154backfill_inplace_object(__pyx_self, __pyx_v_values, __pyx_v_mask, __pyx_v_limit); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":1260 * @cython.boundscheck(False) * @cython.wraparound(False) * def backfill_inplace_object(ndarray[object] values, # <<<<<<<<<<<<<< * ndarray[uint8_t, cast=True] mask, * limit=None): */ static PyObject *__pyx_pf_6pandas_5algos_154backfill_inplace_object(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_mask, PyObject *__pyx_v_limit) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_N; PyObject *__pyx_v_val = 0; int __pyx_v_lim; int __pyx_v_fill_count; __Pyx_LocalBuf_ND __pyx_pybuffernd_mask; __Pyx_Buffer __pyx_pybuffer_mask; __Pyx_LocalBuf_ND __pyx_pybuffernd_values; __Pyx_Buffer __pyx_pybuffer_values; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; int __pyx_t_2; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; int __pyx_t_5; Py_ssize_t __pyx_t_6; Py_ssize_t __pyx_t_7; Py_ssize_t __pyx_t_8; PyObject **__pyx_t_9; Py_ssize_t __pyx_t_10; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("backfill_inplace_object", 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_mask.pybuffer.buf = NULL; __pyx_pybuffer_mask.refcount = 0; __pyx_pybuffernd_mask.data = NULL; __pyx_pybuffernd_mask.rcbuffer = &__pyx_pybuffer_mask; { __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| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1260; __pyx_clineno = __LINE__; goto __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_mask.rcbuffer->pybuffer, (PyObject*)__pyx_v_mask, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 1, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1260; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; /* "pandas/src/generated.pyx":1265 * cdef Py_ssize_t i, N * cdef object val * cdef int lim, fill_count = 0 # <<<<<<<<<<<<<< * * N = len(values) */ __pyx_v_fill_count = 0; /* "pandas/src/generated.pyx":1267 * cdef int lim, fill_count = 0 * * N = len(values) # <<<<<<<<<<<<<< * * # GH 2778 */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1267; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_N = __pyx_t_1; /* "pandas/src/generated.pyx":1270 * * # GH 2778 * if N == 0: # <<<<<<<<<<<<<< * return * */ __pyx_t_2 = ((__pyx_v_N == 0) != 0); if (__pyx_t_2) { /* "pandas/src/generated.pyx":1271 * # GH 2778 * if N == 0: * return # <<<<<<<<<<<<<< * * if limit is None: */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; goto __pyx_L3; } __pyx_L3:; /* "pandas/src/generated.pyx":1273 * return * * if limit is None: # <<<<<<<<<<<<<< * lim = N * else: */ __pyx_t_2 = (__pyx_v_limit == Py_None); __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":1274 * * if limit is None: * lim = N # <<<<<<<<<<<<<< * else: * if limit < 0: */ __pyx_v_lim = __pyx_v_N; goto __pyx_L4; } /*else*/ { /* "pandas/src/generated.pyx":1276 * lim = N * else: * if limit < 0: # <<<<<<<<<<<<<< * raise ValueError('Limit must be non-negative') * lim = limit */ __pyx_t_4 = PyObject_RichCompare(__pyx_v_limit, __pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1276; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1276; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_3) { /* "pandas/src/generated.pyx":1277 * else: * if limit < 0: * raise ValueError('Limit must be non-negative') # <<<<<<<<<<<<<< * lim = limit * */ __pyx_t_4 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_83), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1277; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 1277; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L5; } __pyx_L5:; /* "pandas/src/generated.pyx":1278 * if limit < 0: * raise ValueError('Limit must be non-negative') * lim = limit # <<<<<<<<<<<<<< * * val = values[N - 1] */ __pyx_t_5 = __Pyx_PyInt_AsInt(__pyx_v_limit); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1278; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_lim = __pyx_t_5; } __pyx_L4:; /* "pandas/src/generated.pyx":1280 * lim = limit * * val = values[N - 1] # <<<<<<<<<<<<<< * for i in range(N - 1, -1 , -1): * if mask[i]: */ __pyx_t_1 = (__pyx_v_N - 1); __pyx_t_4 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_1, __pyx_pybuffernd_values.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_4); __pyx_v_val = __pyx_t_4; __pyx_t_4 = 0; /* "pandas/src/generated.pyx":1281 * * val = values[N - 1] * for i in range(N - 1, -1 , -1): # <<<<<<<<<<<<<< * if mask[i]: * if fill_count >= lim: */ for (__pyx_t_6 = (__pyx_v_N - 1); __pyx_t_6 > -1; __pyx_t_6-=1) { __pyx_v_i = __pyx_t_6; /* "pandas/src/generated.pyx":1282 * val = values[N - 1] * for i in range(N - 1, -1 , -1): * if mask[i]: # <<<<<<<<<<<<<< * if fill_count >= lim: * continue */ __pyx_t_7 = __pyx_v_i; __pyx_t_3 = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_mask.rcbuffer->pybuffer.buf, __pyx_t_7, __pyx_pybuffernd_mask.diminfo[0].strides)) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":1283 * for i in range(N - 1, -1 , -1): * if mask[i]: * if fill_count >= lim: # <<<<<<<<<<<<<< * continue * fill_count += 1 */ __pyx_t_3 = ((__pyx_v_fill_count >= __pyx_v_lim) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":1284 * if mask[i]: * if fill_count >= lim: * continue # <<<<<<<<<<<<<< * fill_count += 1 * values[i] = val */ goto __pyx_L6_continue; goto __pyx_L9; } __pyx_L9:; /* "pandas/src/generated.pyx":1285 * if fill_count >= lim: * continue * fill_count += 1 # <<<<<<<<<<<<<< * values[i] = val * else: */ __pyx_v_fill_count = (__pyx_v_fill_count + 1); /* "pandas/src/generated.pyx":1286 * continue * fill_count += 1 * values[i] = val # <<<<<<<<<<<<<< * else: * fill_count = 0 */ __pyx_t_8 = __pyx_v_i; __pyx_t_9 = __Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_8, __pyx_pybuffernd_values.diminfo[0].strides); __Pyx_GOTREF(*__pyx_t_9); __Pyx_INCREF(__pyx_v_val); __Pyx_DECREF(*__pyx_t_9); *__pyx_t_9 = __pyx_v_val; __Pyx_GIVEREF(*__pyx_t_9); goto __pyx_L8; } /*else*/ { /* "pandas/src/generated.pyx":1288 * values[i] = val * else: * fill_count = 0 # <<<<<<<<<<<<<< * val = values[i] * @cython.boundscheck(False) */ __pyx_v_fill_count = 0; /* "pandas/src/generated.pyx":1289 * else: * fill_count = 0 * val = values[i] # <<<<<<<<<<<<<< * @cython.boundscheck(False) * @cython.wraparound(False) */ __pyx_t_10 = __pyx_v_i; __pyx_t_4 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_10, __pyx_pybuffernd_values.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_4); __Pyx_DECREF_SET(__pyx_v_val, __pyx_t_4); __pyx_t_4 = 0; } __pyx_L8:; __pyx_L6_continue:; } __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_4); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_mask.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.backfill_inplace_object", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_mask.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF(__pyx_v_val); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_157backfill_inplace_int32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_157backfill_inplace_int32 = {__Pyx_NAMESTR("backfill_inplace_int32"), (PyCFunction)__pyx_pw_6pandas_5algos_157backfill_inplace_int32, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_157backfill_inplace_int32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_values = 0; PyArrayObject *__pyx_v_mask = 0; PyObject *__pyx_v_limit = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("backfill_inplace_int32 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__values,&__pyx_n_s__mask,&__pyx_n_s__limit,0}; PyObject* values[3] = {0,0,0}; /* "pandas/src/generated.pyx":1294 * def backfill_inplace_int32(ndarray[int32_t] values, * ndarray[uint8_t, cast=True] mask, * limit=None): # <<<<<<<<<<<<<< * cdef Py_ssize_t i, N * cdef int32_t val */ values[2] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__values)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__mask)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("backfill_inplace_int32", 0, 2, 3, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1292; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__limit); if (value) { values[2] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "backfill_inplace_int32") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1292; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_values = ((PyArrayObject *)values[0]); __pyx_v_mask = ((PyArrayObject *)values[1]); __pyx_v_limit = values[2]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("backfill_inplace_int32", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1292; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.backfill_inplace_int32", __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_filename = __pyx_f[2]; __pyx_lineno = 1292; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_mask), __pyx_ptype_5numpy_ndarray, 1, "mask", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1293; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_156backfill_inplace_int32(__pyx_self, __pyx_v_values, __pyx_v_mask, __pyx_v_limit); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":1292 * @cython.boundscheck(False) * @cython.wraparound(False) * def backfill_inplace_int32(ndarray[int32_t] values, # <<<<<<<<<<<<<< * ndarray[uint8_t, cast=True] mask, * limit=None): */ static PyObject *__pyx_pf_6pandas_5algos_156backfill_inplace_int32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_mask, PyObject *__pyx_v_limit) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_N; __pyx_t_5numpy_int32_t __pyx_v_val; int __pyx_v_lim; int __pyx_v_fill_count; __Pyx_LocalBuf_ND __pyx_pybuffernd_mask; __Pyx_Buffer __pyx_pybuffer_mask; __Pyx_LocalBuf_ND __pyx_pybuffernd_values; __Pyx_Buffer __pyx_pybuffer_values; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; int __pyx_t_2; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; int __pyx_t_5; Py_ssize_t __pyx_t_6; Py_ssize_t __pyx_t_7; Py_ssize_t __pyx_t_8; Py_ssize_t __pyx_t_9; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("backfill_inplace_int32", 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_mask.pybuffer.buf = NULL; __pyx_pybuffer_mask.refcount = 0; __pyx_pybuffernd_mask.data = NULL; __pyx_pybuffernd_mask.rcbuffer = &__pyx_pybuffer_mask; { __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_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1292; __pyx_clineno = __LINE__; goto __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_mask.rcbuffer->pybuffer, (PyObject*)__pyx_v_mask, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 1, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1292; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; /* "pandas/src/generated.pyx":1297 * cdef Py_ssize_t i, N * cdef int32_t val * cdef int lim, fill_count = 0 # <<<<<<<<<<<<<< * * N = len(values) */ __pyx_v_fill_count = 0; /* "pandas/src/generated.pyx":1299 * cdef int lim, fill_count = 0 * * N = len(values) # <<<<<<<<<<<<<< * * # GH 2778 */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1299; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_N = __pyx_t_1; /* "pandas/src/generated.pyx":1302 * * # GH 2778 * if N == 0: # <<<<<<<<<<<<<< * return * */ __pyx_t_2 = ((__pyx_v_N == 0) != 0); if (__pyx_t_2) { /* "pandas/src/generated.pyx":1303 * # GH 2778 * if N == 0: * return # <<<<<<<<<<<<<< * * if limit is None: */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; goto __pyx_L3; } __pyx_L3:; /* "pandas/src/generated.pyx":1305 * return * * if limit is None: # <<<<<<<<<<<<<< * lim = N * else: */ __pyx_t_2 = (__pyx_v_limit == Py_None); __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":1306 * * if limit is None: * lim = N # <<<<<<<<<<<<<< * else: * if limit < 0: */ __pyx_v_lim = __pyx_v_N; goto __pyx_L4; } /*else*/ { /* "pandas/src/generated.pyx":1308 * lim = N * else: * if limit < 0: # <<<<<<<<<<<<<< * raise ValueError('Limit must be non-negative') * lim = limit */ __pyx_t_4 = PyObject_RichCompare(__pyx_v_limit, __pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1308; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1308; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_3) { /* "pandas/src/generated.pyx":1309 * else: * if limit < 0: * raise ValueError('Limit must be non-negative') # <<<<<<<<<<<<<< * lim = limit * */ __pyx_t_4 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_84), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1309; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 1309; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L5; } __pyx_L5:; /* "pandas/src/generated.pyx":1310 * if limit < 0: * raise ValueError('Limit must be non-negative') * lim = limit # <<<<<<<<<<<<<< * * val = values[N - 1] */ __pyx_t_5 = __Pyx_PyInt_AsInt(__pyx_v_limit); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1310; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_lim = __pyx_t_5; } __pyx_L4:; /* "pandas/src/generated.pyx":1312 * lim = limit * * val = values[N - 1] # <<<<<<<<<<<<<< * for i in range(N - 1, -1 , -1): * if mask[i]: */ __pyx_t_1 = (__pyx_v_N - 1); __pyx_v_val = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_1, __pyx_pybuffernd_values.diminfo[0].strides)); /* "pandas/src/generated.pyx":1313 * * val = values[N - 1] * for i in range(N - 1, -1 , -1): # <<<<<<<<<<<<<< * if mask[i]: * if fill_count >= lim: */ for (__pyx_t_6 = (__pyx_v_N - 1); __pyx_t_6 > -1; __pyx_t_6-=1) { __pyx_v_i = __pyx_t_6; /* "pandas/src/generated.pyx":1314 * val = values[N - 1] * for i in range(N - 1, -1 , -1): * if mask[i]: # <<<<<<<<<<<<<< * if fill_count >= lim: * continue */ __pyx_t_7 = __pyx_v_i; __pyx_t_3 = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_mask.rcbuffer->pybuffer.buf, __pyx_t_7, __pyx_pybuffernd_mask.diminfo[0].strides)) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":1315 * for i in range(N - 1, -1 , -1): * if mask[i]: * if fill_count >= lim: # <<<<<<<<<<<<<< * continue * fill_count += 1 */ __pyx_t_3 = ((__pyx_v_fill_count >= __pyx_v_lim) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":1316 * if mask[i]: * if fill_count >= lim: * continue # <<<<<<<<<<<<<< * fill_count += 1 * values[i] = val */ goto __pyx_L6_continue; goto __pyx_L9; } __pyx_L9:; /* "pandas/src/generated.pyx":1317 * if fill_count >= lim: * continue * fill_count += 1 # <<<<<<<<<<<<<< * values[i] = val * else: */ __pyx_v_fill_count = (__pyx_v_fill_count + 1); /* "pandas/src/generated.pyx":1318 * continue * fill_count += 1 * values[i] = val # <<<<<<<<<<<<<< * else: * fill_count = 0 */ __pyx_t_8 = __pyx_v_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_8, __pyx_pybuffernd_values.diminfo[0].strides) = __pyx_v_val; goto __pyx_L8; } /*else*/ { /* "pandas/src/generated.pyx":1320 * values[i] = val * else: * fill_count = 0 # <<<<<<<<<<<<<< * val = values[i] * @cython.boundscheck(False) */ __pyx_v_fill_count = 0; /* "pandas/src/generated.pyx":1321 * else: * fill_count = 0 * val = values[i] # <<<<<<<<<<<<<< * @cython.boundscheck(False) * @cython.wraparound(False) */ __pyx_t_9 = __pyx_v_i; __pyx_v_val = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_9, __pyx_pybuffernd_values.diminfo[0].strides)); } __pyx_L8:; __pyx_L6_continue:; } __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_4); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_mask.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.backfill_inplace_int32", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_mask.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_159backfill_inplace_int64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_159backfill_inplace_int64 = {__Pyx_NAMESTR("backfill_inplace_int64"), (PyCFunction)__pyx_pw_6pandas_5algos_159backfill_inplace_int64, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_159backfill_inplace_int64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_values = 0; PyArrayObject *__pyx_v_mask = 0; PyObject *__pyx_v_limit = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("backfill_inplace_int64 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__values,&__pyx_n_s__mask,&__pyx_n_s__limit,0}; PyObject* values[3] = {0,0,0}; /* "pandas/src/generated.pyx":1326 * def backfill_inplace_int64(ndarray[int64_t] values, * ndarray[uint8_t, cast=True] mask, * limit=None): # <<<<<<<<<<<<<< * cdef Py_ssize_t i, N * cdef int64_t val */ values[2] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__values)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__mask)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("backfill_inplace_int64", 0, 2, 3, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1324; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__limit); if (value) { values[2] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "backfill_inplace_int64") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1324; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_values = ((PyArrayObject *)values[0]); __pyx_v_mask = ((PyArrayObject *)values[1]); __pyx_v_limit = values[2]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("backfill_inplace_int64", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1324; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.backfill_inplace_int64", __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_filename = __pyx_f[2]; __pyx_lineno = 1324; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_mask), __pyx_ptype_5numpy_ndarray, 1, "mask", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1325; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_158backfill_inplace_int64(__pyx_self, __pyx_v_values, __pyx_v_mask, __pyx_v_limit); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":1324 * @cython.boundscheck(False) * @cython.wraparound(False) * def backfill_inplace_int64(ndarray[int64_t] values, # <<<<<<<<<<<<<< * ndarray[uint8_t, cast=True] mask, * limit=None): */ static PyObject *__pyx_pf_6pandas_5algos_158backfill_inplace_int64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_mask, PyObject *__pyx_v_limit) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_N; __pyx_t_5numpy_int64_t __pyx_v_val; int __pyx_v_lim; int __pyx_v_fill_count; __Pyx_LocalBuf_ND __pyx_pybuffernd_mask; __Pyx_Buffer __pyx_pybuffer_mask; __Pyx_LocalBuf_ND __pyx_pybuffernd_values; __Pyx_Buffer __pyx_pybuffer_values; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; int __pyx_t_2; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; int __pyx_t_5; Py_ssize_t __pyx_t_6; Py_ssize_t __pyx_t_7; Py_ssize_t __pyx_t_8; Py_ssize_t __pyx_t_9; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("backfill_inplace_int64", 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_mask.pybuffer.buf = NULL; __pyx_pybuffer_mask.refcount = 0; __pyx_pybuffernd_mask.data = NULL; __pyx_pybuffernd_mask.rcbuffer = &__pyx_pybuffer_mask; { __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_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1324; __pyx_clineno = __LINE__; goto __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_mask.rcbuffer->pybuffer, (PyObject*)__pyx_v_mask, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 1, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1324; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; /* "pandas/src/generated.pyx":1329 * cdef Py_ssize_t i, N * cdef int64_t val * cdef int lim, fill_count = 0 # <<<<<<<<<<<<<< * * N = len(values) */ __pyx_v_fill_count = 0; /* "pandas/src/generated.pyx":1331 * cdef int lim, fill_count = 0 * * N = len(values) # <<<<<<<<<<<<<< * * # GH 2778 */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1331; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_N = __pyx_t_1; /* "pandas/src/generated.pyx":1334 * * # GH 2778 * if N == 0: # <<<<<<<<<<<<<< * return * */ __pyx_t_2 = ((__pyx_v_N == 0) != 0); if (__pyx_t_2) { /* "pandas/src/generated.pyx":1335 * # GH 2778 * if N == 0: * return # <<<<<<<<<<<<<< * * if limit is None: */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; goto __pyx_L3; } __pyx_L3:; /* "pandas/src/generated.pyx":1337 * return * * if limit is None: # <<<<<<<<<<<<<< * lim = N * else: */ __pyx_t_2 = (__pyx_v_limit == Py_None); __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":1338 * * if limit is None: * lim = N # <<<<<<<<<<<<<< * else: * if limit < 0: */ __pyx_v_lim = __pyx_v_N; goto __pyx_L4; } /*else*/ { /* "pandas/src/generated.pyx":1340 * lim = N * else: * if limit < 0: # <<<<<<<<<<<<<< * raise ValueError('Limit must be non-negative') * lim = limit */ __pyx_t_4 = PyObject_RichCompare(__pyx_v_limit, __pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1340; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1340; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_3) { /* "pandas/src/generated.pyx":1341 * else: * if limit < 0: * raise ValueError('Limit must be non-negative') # <<<<<<<<<<<<<< * lim = limit * */ __pyx_t_4 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_85), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1341; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 1341; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L5; } __pyx_L5:; /* "pandas/src/generated.pyx":1342 * if limit < 0: * raise ValueError('Limit must be non-negative') * lim = limit # <<<<<<<<<<<<<< * * val = values[N - 1] */ __pyx_t_5 = __Pyx_PyInt_AsInt(__pyx_v_limit); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1342; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_lim = __pyx_t_5; } __pyx_L4:; /* "pandas/src/generated.pyx":1344 * lim = limit * * val = values[N - 1] # <<<<<<<<<<<<<< * for i in range(N - 1, -1 , -1): * if mask[i]: */ __pyx_t_1 = (__pyx_v_N - 1); __pyx_v_val = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_1, __pyx_pybuffernd_values.diminfo[0].strides)); /* "pandas/src/generated.pyx":1345 * * val = values[N - 1] * for i in range(N - 1, -1 , -1): # <<<<<<<<<<<<<< * if mask[i]: * if fill_count >= lim: */ for (__pyx_t_6 = (__pyx_v_N - 1); __pyx_t_6 > -1; __pyx_t_6-=1) { __pyx_v_i = __pyx_t_6; /* "pandas/src/generated.pyx":1346 * val = values[N - 1] * for i in range(N - 1, -1 , -1): * if mask[i]: # <<<<<<<<<<<<<< * if fill_count >= lim: * continue */ __pyx_t_7 = __pyx_v_i; __pyx_t_3 = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_mask.rcbuffer->pybuffer.buf, __pyx_t_7, __pyx_pybuffernd_mask.diminfo[0].strides)) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":1347 * for i in range(N - 1, -1 , -1): * if mask[i]: * if fill_count >= lim: # <<<<<<<<<<<<<< * continue * fill_count += 1 */ __pyx_t_3 = ((__pyx_v_fill_count >= __pyx_v_lim) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":1348 * if mask[i]: * if fill_count >= lim: * continue # <<<<<<<<<<<<<< * fill_count += 1 * values[i] = val */ goto __pyx_L6_continue; goto __pyx_L9; } __pyx_L9:; /* "pandas/src/generated.pyx":1349 * if fill_count >= lim: * continue * fill_count += 1 # <<<<<<<<<<<<<< * values[i] = val * else: */ __pyx_v_fill_count = (__pyx_v_fill_count + 1); /* "pandas/src/generated.pyx":1350 * continue * fill_count += 1 * values[i] = val # <<<<<<<<<<<<<< * else: * fill_count = 0 */ __pyx_t_8 = __pyx_v_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_8, __pyx_pybuffernd_values.diminfo[0].strides) = __pyx_v_val; goto __pyx_L8; } /*else*/ { /* "pandas/src/generated.pyx":1352 * values[i] = val * else: * fill_count = 0 # <<<<<<<<<<<<<< * val = values[i] * @cython.boundscheck(False) */ __pyx_v_fill_count = 0; /* "pandas/src/generated.pyx":1353 * else: * fill_count = 0 * val = values[i] # <<<<<<<<<<<<<< * @cython.boundscheck(False) * @cython.wraparound(False) */ __pyx_t_9 = __pyx_v_i; __pyx_v_val = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_9, __pyx_pybuffernd_values.diminfo[0].strides)); } __pyx_L8:; __pyx_L6_continue:; } __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_4); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_mask.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.backfill_inplace_int64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_mask.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_161backfill_inplace_bool(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_161backfill_inplace_bool = {__Pyx_NAMESTR("backfill_inplace_bool"), (PyCFunction)__pyx_pw_6pandas_5algos_161backfill_inplace_bool, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_161backfill_inplace_bool(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_values = 0; PyArrayObject *__pyx_v_mask = 0; PyObject *__pyx_v_limit = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("backfill_inplace_bool (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__values,&__pyx_n_s__mask,&__pyx_n_s__limit,0}; PyObject* values[3] = {0,0,0}; /* "pandas/src/generated.pyx":1358 * def backfill_inplace_bool(ndarray[uint8_t] values, * ndarray[uint8_t, cast=True] mask, * limit=None): # <<<<<<<<<<<<<< * cdef Py_ssize_t i, N * cdef uint8_t val */ values[2] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__values)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__mask)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("backfill_inplace_bool", 0, 2, 3, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1356; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__limit); if (value) { values[2] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "backfill_inplace_bool") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1356; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_values = ((PyArrayObject *)values[0]); __pyx_v_mask = ((PyArrayObject *)values[1]); __pyx_v_limit = values[2]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("backfill_inplace_bool", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1356; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.backfill_inplace_bool", __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_filename = __pyx_f[2]; __pyx_lineno = 1356; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_mask), __pyx_ptype_5numpy_ndarray, 1, "mask", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1357; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_160backfill_inplace_bool(__pyx_self, __pyx_v_values, __pyx_v_mask, __pyx_v_limit); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":1356 * @cython.boundscheck(False) * @cython.wraparound(False) * def backfill_inplace_bool(ndarray[uint8_t] values, # <<<<<<<<<<<<<< * ndarray[uint8_t, cast=True] mask, * limit=None): */ static PyObject *__pyx_pf_6pandas_5algos_160backfill_inplace_bool(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_mask, PyObject *__pyx_v_limit) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_N; __pyx_t_5numpy_uint8_t __pyx_v_val; int __pyx_v_lim; int __pyx_v_fill_count; __Pyx_LocalBuf_ND __pyx_pybuffernd_mask; __Pyx_Buffer __pyx_pybuffer_mask; __Pyx_LocalBuf_ND __pyx_pybuffernd_values; __Pyx_Buffer __pyx_pybuffer_values; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; int __pyx_t_2; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; int __pyx_t_5; Py_ssize_t __pyx_t_6; Py_ssize_t __pyx_t_7; Py_ssize_t __pyx_t_8; Py_ssize_t __pyx_t_9; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("backfill_inplace_bool", 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_mask.pybuffer.buf = NULL; __pyx_pybuffer_mask.refcount = 0; __pyx_pybuffernd_mask.data = NULL; __pyx_pybuffernd_mask.rcbuffer = &__pyx_pybuffer_mask; { __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_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1356; __pyx_clineno = __LINE__; goto __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_mask.rcbuffer->pybuffer, (PyObject*)__pyx_v_mask, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 1, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1356; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; /* "pandas/src/generated.pyx":1361 * cdef Py_ssize_t i, N * cdef uint8_t val * cdef int lim, fill_count = 0 # <<<<<<<<<<<<<< * * N = len(values) */ __pyx_v_fill_count = 0; /* "pandas/src/generated.pyx":1363 * cdef int lim, fill_count = 0 * * N = len(values) # <<<<<<<<<<<<<< * * # GH 2778 */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1363; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_N = __pyx_t_1; /* "pandas/src/generated.pyx":1366 * * # GH 2778 * if N == 0: # <<<<<<<<<<<<<< * return * */ __pyx_t_2 = ((__pyx_v_N == 0) != 0); if (__pyx_t_2) { /* "pandas/src/generated.pyx":1367 * # GH 2778 * if N == 0: * return # <<<<<<<<<<<<<< * * if limit is None: */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; goto __pyx_L3; } __pyx_L3:; /* "pandas/src/generated.pyx":1369 * return * * if limit is None: # <<<<<<<<<<<<<< * lim = N * else: */ __pyx_t_2 = (__pyx_v_limit == Py_None); __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":1370 * * if limit is None: * lim = N # <<<<<<<<<<<<<< * else: * if limit < 0: */ __pyx_v_lim = __pyx_v_N; goto __pyx_L4; } /*else*/ { /* "pandas/src/generated.pyx":1372 * lim = N * else: * if limit < 0: # <<<<<<<<<<<<<< * raise ValueError('Limit must be non-negative') * lim = limit */ __pyx_t_4 = PyObject_RichCompare(__pyx_v_limit, __pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1372; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1372; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_3) { /* "pandas/src/generated.pyx":1373 * else: * if limit < 0: * raise ValueError('Limit must be non-negative') # <<<<<<<<<<<<<< * lim = limit * */ __pyx_t_4 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_86), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1373; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 1373; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L5; } __pyx_L5:; /* "pandas/src/generated.pyx":1374 * if limit < 0: * raise ValueError('Limit must be non-negative') * lim = limit # <<<<<<<<<<<<<< * * val = values[N - 1] */ __pyx_t_5 = __Pyx_PyInt_AsInt(__pyx_v_limit); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1374; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_lim = __pyx_t_5; } __pyx_L4:; /* "pandas/src/generated.pyx":1376 * lim = limit * * val = values[N - 1] # <<<<<<<<<<<<<< * for i in range(N - 1, -1 , -1): * if mask[i]: */ __pyx_t_1 = (__pyx_v_N - 1); __pyx_v_val = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_1, __pyx_pybuffernd_values.diminfo[0].strides)); /* "pandas/src/generated.pyx":1377 * * val = values[N - 1] * for i in range(N - 1, -1 , -1): # <<<<<<<<<<<<<< * if mask[i]: * if fill_count >= lim: */ for (__pyx_t_6 = (__pyx_v_N - 1); __pyx_t_6 > -1; __pyx_t_6-=1) { __pyx_v_i = __pyx_t_6; /* "pandas/src/generated.pyx":1378 * val = values[N - 1] * for i in range(N - 1, -1 , -1): * if mask[i]: # <<<<<<<<<<<<<< * if fill_count >= lim: * continue */ __pyx_t_7 = __pyx_v_i; __pyx_t_3 = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_mask.rcbuffer->pybuffer.buf, __pyx_t_7, __pyx_pybuffernd_mask.diminfo[0].strides)) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":1379 * for i in range(N - 1, -1 , -1): * if mask[i]: * if fill_count >= lim: # <<<<<<<<<<<<<< * continue * fill_count += 1 */ __pyx_t_3 = ((__pyx_v_fill_count >= __pyx_v_lim) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":1380 * if mask[i]: * if fill_count >= lim: * continue # <<<<<<<<<<<<<< * fill_count += 1 * values[i] = val */ goto __pyx_L6_continue; goto __pyx_L9; } __pyx_L9:; /* "pandas/src/generated.pyx":1381 * if fill_count >= lim: * continue * fill_count += 1 # <<<<<<<<<<<<<< * values[i] = val * else: */ __pyx_v_fill_count = (__pyx_v_fill_count + 1); /* "pandas/src/generated.pyx":1382 * continue * fill_count += 1 * values[i] = val # <<<<<<<<<<<<<< * else: * fill_count = 0 */ __pyx_t_8 = __pyx_v_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_8, __pyx_pybuffernd_values.diminfo[0].strides) = __pyx_v_val; goto __pyx_L8; } /*else*/ { /* "pandas/src/generated.pyx":1384 * values[i] = val * else: * fill_count = 0 # <<<<<<<<<<<<<< * val = values[i] * */ __pyx_v_fill_count = 0; /* "pandas/src/generated.pyx":1385 * else: * fill_count = 0 * val = values[i] # <<<<<<<<<<<<<< * * @cython.boundscheck(False) */ __pyx_t_9 = __pyx_v_i; __pyx_v_val = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_9, __pyx_pybuffernd_values.diminfo[0].strides)); } __pyx_L8:; __pyx_L6_continue:; } __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_4); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_mask.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.backfill_inplace_bool", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_mask.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_163pad_2d_inplace_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_163pad_2d_inplace_float64 = {__Pyx_NAMESTR("pad_2d_inplace_float64"), (PyCFunction)__pyx_pw_6pandas_5algos_163pad_2d_inplace_float64, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_163pad_2d_inplace_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_values = 0; PyArrayObject *__pyx_v_mask = 0; PyObject *__pyx_v_limit = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("pad_2d_inplace_float64 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__values,&__pyx_n_s__mask,&__pyx_n_s__limit,0}; PyObject* values[3] = {0,0,0}; /* "pandas/src/generated.pyx":1391 * def pad_2d_inplace_float64(ndarray[float64_t, ndim=2] values, * ndarray[uint8_t, ndim=2] mask, * limit=None): # <<<<<<<<<<<<<< * cdef Py_ssize_t i, j, N, K * cdef float64_t val */ values[2] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__values)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__mask)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("pad_2d_inplace_float64", 0, 2, 3, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1389; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__limit); if (value) { values[2] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "pad_2d_inplace_float64") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1389; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_values = ((PyArrayObject *)values[0]); __pyx_v_mask = ((PyArrayObject *)values[1]); __pyx_v_limit = values[2]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("pad_2d_inplace_float64", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1389; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.pad_2d_inplace_float64", __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_filename = __pyx_f[2]; __pyx_lineno = 1389; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_mask), __pyx_ptype_5numpy_ndarray, 1, "mask", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1390; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_162pad_2d_inplace_float64(__pyx_self, __pyx_v_values, __pyx_v_mask, __pyx_v_limit); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":1389 * @cython.boundscheck(False) * @cython.wraparound(False) * def pad_2d_inplace_float64(ndarray[float64_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[uint8_t, ndim=2] mask, * limit=None): */ static PyObject *__pyx_pf_6pandas_5algos_162pad_2d_inplace_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_mask, PyObject *__pyx_v_limit) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_N; Py_ssize_t __pyx_v_K; __pyx_t_5numpy_float64_t __pyx_v_val; int __pyx_v_lim; int __pyx_v_fill_count; __Pyx_LocalBuf_ND __pyx_pybuffernd_mask; __Pyx_Buffer __pyx_pybuffer_mask; __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; PyObject *(*__pyx_t_5)(PyObject *); Py_ssize_t __pyx_t_6; Py_ssize_t __pyx_t_7; int __pyx_t_8; int __pyx_t_9; int __pyx_t_10; Py_ssize_t __pyx_t_11; long __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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("pad_2d_inplace_float64", 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_mask.pybuffer.buf = NULL; __pyx_pybuffer_mask.refcount = 0; __pyx_pybuffernd_mask.data = NULL; __pyx_pybuffernd_mask.rcbuffer = &__pyx_pybuffer_mask; { __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| PyBUF_WRITABLE, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1389; __pyx_clineno = __LINE__; goto __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_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; 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, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1389; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; __pyx_pybuffernd_mask.diminfo[1].strides = __pyx_pybuffernd_mask.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_mask.diminfo[1].shape = __pyx_pybuffernd_mask.rcbuffer->pybuffer.shape[1]; /* "pandas/src/generated.pyx":1394 * cdef Py_ssize_t i, j, N, K * cdef float64_t val * cdef int lim, fill_count = 0 # <<<<<<<<<<<<<< * * K, N = ( values).shape */ __pyx_v_fill_count = 0; /* "pandas/src/generated.pyx":1396 * cdef int lim, fill_count = 0 * * K, N = ( values).shape # <<<<<<<<<<<<<< * * # GH 2778 */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_values), __pyx_n_s__shape); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1396; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) { PyObject* sequence = __pyx_t_1; #if CYTHON_COMPILING_IN_CPYTHON Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1396; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1); } else { __pyx_t_2 = PyList_GET_ITEM(sequence, 0); __pyx_t_3 = PyList_GET_ITEM(sequence, 1); } __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); #else __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1396; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1396; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } else { Py_ssize_t index = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1396; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_5 = Py_TYPE(__pyx_t_4)->tp_iternext; index = 0; __pyx_t_2 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_2)) goto __pyx_L3_unpacking_failed; __Pyx_GOTREF(__pyx_t_2); index = 1; __pyx_t_3 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_3)) goto __pyx_L3_unpacking_failed; __Pyx_GOTREF(__pyx_t_3); if (__Pyx_IternextUnpackEndCheck(__pyx_t_5(__pyx_t_4), 2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1396; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 1396; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_L4_unpacking_done:; } __pyx_t_6 = __Pyx_PyIndex_AsSsize_t(__pyx_t_2); if (unlikely((__pyx_t_6 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1396; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_7 = __Pyx_PyIndex_AsSsize_t(__pyx_t_3); if (unlikely((__pyx_t_7 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1396; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_K = __pyx_t_6; __pyx_v_N = __pyx_t_7; /* "pandas/src/generated.pyx":1399 * * # GH 2778 * if N == 0: # <<<<<<<<<<<<<< * return * */ __pyx_t_8 = ((__pyx_v_N == 0) != 0); if (__pyx_t_8) { /* "pandas/src/generated.pyx":1400 * # GH 2778 * if N == 0: * return # <<<<<<<<<<<<<< * * if limit is None: */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; goto __pyx_L5; } __pyx_L5:; /* "pandas/src/generated.pyx":1402 * return * * if limit is None: # <<<<<<<<<<<<<< * lim = N * else: */ __pyx_t_8 = (__pyx_v_limit == Py_None); __pyx_t_9 = (__pyx_t_8 != 0); if (__pyx_t_9) { /* "pandas/src/generated.pyx":1403 * * if limit is None: * lim = N # <<<<<<<<<<<<<< * else: * if limit < 0: */ __pyx_v_lim = __pyx_v_N; goto __pyx_L6; } /*else*/ { /* "pandas/src/generated.pyx":1405 * lim = N * else: * if limit < 0: # <<<<<<<<<<<<<< * raise ValueError('Limit must be non-negative') * lim = limit */ __pyx_t_1 = PyObject_RichCompare(__pyx_v_limit, __pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1405; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1405; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_9) { /* "pandas/src/generated.pyx":1406 * else: * if limit < 0: * raise ValueError('Limit must be non-negative') # <<<<<<<<<<<<<< * lim = limit * */ __pyx_t_1 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_87), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1406; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 1406; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L7; } __pyx_L7:; /* "pandas/src/generated.pyx":1407 * if limit < 0: * raise ValueError('Limit must be non-negative') * lim = limit # <<<<<<<<<<<<<< * * for j in range(K): */ __pyx_t_10 = __Pyx_PyInt_AsInt(__pyx_v_limit); if (unlikely((__pyx_t_10 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1407; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_lim = __pyx_t_10; } __pyx_L6:; /* "pandas/src/generated.pyx":1409 * lim = limit * * for j in range(K): # <<<<<<<<<<<<<< * fill_count = 0 * val = values[j, 0] */ __pyx_t_7 = __pyx_v_K; for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_7; __pyx_t_6+=1) { __pyx_v_j = __pyx_t_6; /* "pandas/src/generated.pyx":1410 * * for j in range(K): * fill_count = 0 # <<<<<<<<<<<<<< * val = values[j, 0] * for i in range(N): */ __pyx_v_fill_count = 0; /* "pandas/src/generated.pyx":1411 * for j in range(K): * fill_count = 0 * val = values[j, 0] # <<<<<<<<<<<<<< * for i in range(N): * if mask[j, i]: */ __pyx_t_11 = __pyx_v_j; __pyx_t_12 = 0; __pyx_v_val = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_11, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_12, __pyx_pybuffernd_values.diminfo[1].strides)); /* "pandas/src/generated.pyx":1412 * fill_count = 0 * val = values[j, 0] * for i in range(N): # <<<<<<<<<<<<<< * if mask[j, i]: * if fill_count >= lim: */ __pyx_t_13 = __pyx_v_N; for (__pyx_t_14 = 0; __pyx_t_14 < __pyx_t_13; __pyx_t_14+=1) { __pyx_v_i = __pyx_t_14; /* "pandas/src/generated.pyx":1413 * val = values[j, 0] * for i in range(N): * if mask[j, i]: # <<<<<<<<<<<<<< * if fill_count >= lim: * continue */ __pyx_t_15 = __pyx_v_j; __pyx_t_16 = __pyx_v_i; __pyx_t_9 = ((*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_mask.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_mask.diminfo[0].strides, __pyx_t_16, __pyx_pybuffernd_mask.diminfo[1].strides)) != 0); if (__pyx_t_9) { /* "pandas/src/generated.pyx":1414 * for i in range(N): * if mask[j, i]: * if fill_count >= lim: # <<<<<<<<<<<<<< * continue * fill_count += 1 */ __pyx_t_9 = ((__pyx_v_fill_count >= __pyx_v_lim) != 0); if (__pyx_t_9) { /* "pandas/src/generated.pyx":1415 * if mask[j, i]: * if fill_count >= lim: * continue # <<<<<<<<<<<<<< * fill_count += 1 * values[j, i] = val */ goto __pyx_L10_continue; goto __pyx_L13; } __pyx_L13:; /* "pandas/src/generated.pyx":1416 * if fill_count >= lim: * continue * fill_count += 1 # <<<<<<<<<<<<<< * values[j, i] = val * else: */ __pyx_v_fill_count = (__pyx_v_fill_count + 1); /* "pandas/src/generated.pyx":1417 * continue * fill_count += 1 * values[j, i] = val # <<<<<<<<<<<<<< * else: * fill_count = 0 */ __pyx_t_17 = __pyx_v_j; __pyx_t_18 = __pyx_v_i; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_18, __pyx_pybuffernd_values.diminfo[1].strides) = __pyx_v_val; goto __pyx_L12; } /*else*/ { /* "pandas/src/generated.pyx":1419 * values[j, i] = val * else: * fill_count = 0 # <<<<<<<<<<<<<< * val = values[j, i] * @cython.boundscheck(False) */ __pyx_v_fill_count = 0; /* "pandas/src/generated.pyx":1420 * else: * fill_count = 0 * val = values[j, i] # <<<<<<<<<<<<<< * @cython.boundscheck(False) * @cython.wraparound(False) */ __pyx_t_19 = __pyx_v_j; __pyx_t_20 = __pyx_v_i; __pyx_v_val = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_20, __pyx_pybuffernd_values.diminfo[1].strides)); } __pyx_L12:; __pyx_L10_continue:; } } __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_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_mask.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.pad_2d_inplace_float64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_mask.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_165pad_2d_inplace_float32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_165pad_2d_inplace_float32 = {__Pyx_NAMESTR("pad_2d_inplace_float32"), (PyCFunction)__pyx_pw_6pandas_5algos_165pad_2d_inplace_float32, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_165pad_2d_inplace_float32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_values = 0; PyArrayObject *__pyx_v_mask = 0; PyObject *__pyx_v_limit = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("pad_2d_inplace_float32 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__values,&__pyx_n_s__mask,&__pyx_n_s__limit,0}; PyObject* values[3] = {0,0,0}; /* "pandas/src/generated.pyx":1425 * def pad_2d_inplace_float32(ndarray[float32_t, ndim=2] values, * ndarray[uint8_t, ndim=2] mask, * limit=None): # <<<<<<<<<<<<<< * cdef Py_ssize_t i, j, N, K * cdef float32_t val */ values[2] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__values)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__mask)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("pad_2d_inplace_float32", 0, 2, 3, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1423; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__limit); if (value) { values[2] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "pad_2d_inplace_float32") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1423; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_values = ((PyArrayObject *)values[0]); __pyx_v_mask = ((PyArrayObject *)values[1]); __pyx_v_limit = values[2]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("pad_2d_inplace_float32", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1423; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.pad_2d_inplace_float32", __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_filename = __pyx_f[2]; __pyx_lineno = 1423; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_mask), __pyx_ptype_5numpy_ndarray, 1, "mask", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1424; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_164pad_2d_inplace_float32(__pyx_self, __pyx_v_values, __pyx_v_mask, __pyx_v_limit); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":1423 * @cython.boundscheck(False) * @cython.wraparound(False) * def pad_2d_inplace_float32(ndarray[float32_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[uint8_t, ndim=2] mask, * limit=None): */ static PyObject *__pyx_pf_6pandas_5algos_164pad_2d_inplace_float32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_mask, PyObject *__pyx_v_limit) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_N; Py_ssize_t __pyx_v_K; __pyx_t_5numpy_float32_t __pyx_v_val; int __pyx_v_lim; int __pyx_v_fill_count; __Pyx_LocalBuf_ND __pyx_pybuffernd_mask; __Pyx_Buffer __pyx_pybuffer_mask; __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; PyObject *(*__pyx_t_5)(PyObject *); Py_ssize_t __pyx_t_6; Py_ssize_t __pyx_t_7; int __pyx_t_8; int __pyx_t_9; int __pyx_t_10; Py_ssize_t __pyx_t_11; long __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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("pad_2d_inplace_float32", 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_mask.pybuffer.buf = NULL; __pyx_pybuffer_mask.refcount = 0; __pyx_pybuffernd_mask.data = NULL; __pyx_pybuffernd_mask.rcbuffer = &__pyx_pybuffer_mask; { __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_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1423; __pyx_clineno = __LINE__; goto __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_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; 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, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1423; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; __pyx_pybuffernd_mask.diminfo[1].strides = __pyx_pybuffernd_mask.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_mask.diminfo[1].shape = __pyx_pybuffernd_mask.rcbuffer->pybuffer.shape[1]; /* "pandas/src/generated.pyx":1428 * cdef Py_ssize_t i, j, N, K * cdef float32_t val * cdef int lim, fill_count = 0 # <<<<<<<<<<<<<< * * K, N = ( values).shape */ __pyx_v_fill_count = 0; /* "pandas/src/generated.pyx":1430 * cdef int lim, fill_count = 0 * * K, N = ( values).shape # <<<<<<<<<<<<<< * * # GH 2778 */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_values), __pyx_n_s__shape); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1430; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) { PyObject* sequence = __pyx_t_1; #if CYTHON_COMPILING_IN_CPYTHON Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1430; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1); } else { __pyx_t_2 = PyList_GET_ITEM(sequence, 0); __pyx_t_3 = PyList_GET_ITEM(sequence, 1); } __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); #else __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1430; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1430; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } else { Py_ssize_t index = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1430; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_5 = Py_TYPE(__pyx_t_4)->tp_iternext; index = 0; __pyx_t_2 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_2)) goto __pyx_L3_unpacking_failed; __Pyx_GOTREF(__pyx_t_2); index = 1; __pyx_t_3 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_3)) goto __pyx_L3_unpacking_failed; __Pyx_GOTREF(__pyx_t_3); if (__Pyx_IternextUnpackEndCheck(__pyx_t_5(__pyx_t_4), 2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1430; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 1430; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_L4_unpacking_done:; } __pyx_t_6 = __Pyx_PyIndex_AsSsize_t(__pyx_t_2); if (unlikely((__pyx_t_6 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1430; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_7 = __Pyx_PyIndex_AsSsize_t(__pyx_t_3); if (unlikely((__pyx_t_7 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1430; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_K = __pyx_t_6; __pyx_v_N = __pyx_t_7; /* "pandas/src/generated.pyx":1433 * * # GH 2778 * if N == 0: # <<<<<<<<<<<<<< * return * */ __pyx_t_8 = ((__pyx_v_N == 0) != 0); if (__pyx_t_8) { /* "pandas/src/generated.pyx":1434 * # GH 2778 * if N == 0: * return # <<<<<<<<<<<<<< * * if limit is None: */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; goto __pyx_L5; } __pyx_L5:; /* "pandas/src/generated.pyx":1436 * return * * if limit is None: # <<<<<<<<<<<<<< * lim = N * else: */ __pyx_t_8 = (__pyx_v_limit == Py_None); __pyx_t_9 = (__pyx_t_8 != 0); if (__pyx_t_9) { /* "pandas/src/generated.pyx":1437 * * if limit is None: * lim = N # <<<<<<<<<<<<<< * else: * if limit < 0: */ __pyx_v_lim = __pyx_v_N; goto __pyx_L6; } /*else*/ { /* "pandas/src/generated.pyx":1439 * lim = N * else: * if limit < 0: # <<<<<<<<<<<<<< * raise ValueError('Limit must be non-negative') * lim = limit */ __pyx_t_1 = PyObject_RichCompare(__pyx_v_limit, __pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1439; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1439; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_9) { /* "pandas/src/generated.pyx":1440 * else: * if limit < 0: * raise ValueError('Limit must be non-negative') # <<<<<<<<<<<<<< * lim = limit * */ __pyx_t_1 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_88), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1440; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 1440; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L7; } __pyx_L7:; /* "pandas/src/generated.pyx":1441 * if limit < 0: * raise ValueError('Limit must be non-negative') * lim = limit # <<<<<<<<<<<<<< * * for j in range(K): */ __pyx_t_10 = __Pyx_PyInt_AsInt(__pyx_v_limit); if (unlikely((__pyx_t_10 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1441; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_lim = __pyx_t_10; } __pyx_L6:; /* "pandas/src/generated.pyx":1443 * lim = limit * * for j in range(K): # <<<<<<<<<<<<<< * fill_count = 0 * val = values[j, 0] */ __pyx_t_7 = __pyx_v_K; for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_7; __pyx_t_6+=1) { __pyx_v_j = __pyx_t_6; /* "pandas/src/generated.pyx":1444 * * for j in range(K): * fill_count = 0 # <<<<<<<<<<<<<< * val = values[j, 0] * for i in range(N): */ __pyx_v_fill_count = 0; /* "pandas/src/generated.pyx":1445 * for j in range(K): * fill_count = 0 * val = values[j, 0] # <<<<<<<<<<<<<< * for i in range(N): * if mask[j, i]: */ __pyx_t_11 = __pyx_v_j; __pyx_t_12 = 0; __pyx_v_val = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_11, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_12, __pyx_pybuffernd_values.diminfo[1].strides)); /* "pandas/src/generated.pyx":1446 * fill_count = 0 * val = values[j, 0] * for i in range(N): # <<<<<<<<<<<<<< * if mask[j, i]: * if fill_count >= lim: */ __pyx_t_13 = __pyx_v_N; for (__pyx_t_14 = 0; __pyx_t_14 < __pyx_t_13; __pyx_t_14+=1) { __pyx_v_i = __pyx_t_14; /* "pandas/src/generated.pyx":1447 * val = values[j, 0] * for i in range(N): * if mask[j, i]: # <<<<<<<<<<<<<< * if fill_count >= lim: * continue */ __pyx_t_15 = __pyx_v_j; __pyx_t_16 = __pyx_v_i; __pyx_t_9 = ((*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_mask.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_mask.diminfo[0].strides, __pyx_t_16, __pyx_pybuffernd_mask.diminfo[1].strides)) != 0); if (__pyx_t_9) { /* "pandas/src/generated.pyx":1448 * for i in range(N): * if mask[j, i]: * if fill_count >= lim: # <<<<<<<<<<<<<< * continue * fill_count += 1 */ __pyx_t_9 = ((__pyx_v_fill_count >= __pyx_v_lim) != 0); if (__pyx_t_9) { /* "pandas/src/generated.pyx":1449 * if mask[j, i]: * if fill_count >= lim: * continue # <<<<<<<<<<<<<< * fill_count += 1 * values[j, i] = val */ goto __pyx_L10_continue; goto __pyx_L13; } __pyx_L13:; /* "pandas/src/generated.pyx":1450 * if fill_count >= lim: * continue * fill_count += 1 # <<<<<<<<<<<<<< * values[j, i] = val * else: */ __pyx_v_fill_count = (__pyx_v_fill_count + 1); /* "pandas/src/generated.pyx":1451 * continue * fill_count += 1 * values[j, i] = val # <<<<<<<<<<<<<< * else: * fill_count = 0 */ __pyx_t_17 = __pyx_v_j; __pyx_t_18 = __pyx_v_i; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_18, __pyx_pybuffernd_values.diminfo[1].strides) = __pyx_v_val; goto __pyx_L12; } /*else*/ { /* "pandas/src/generated.pyx":1453 * values[j, i] = val * else: * fill_count = 0 # <<<<<<<<<<<<<< * val = values[j, i] * @cython.boundscheck(False) */ __pyx_v_fill_count = 0; /* "pandas/src/generated.pyx":1454 * else: * fill_count = 0 * val = values[j, i] # <<<<<<<<<<<<<< * @cython.boundscheck(False) * @cython.wraparound(False) */ __pyx_t_19 = __pyx_v_j; __pyx_t_20 = __pyx_v_i; __pyx_v_val = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_20, __pyx_pybuffernd_values.diminfo[1].strides)); } __pyx_L12:; __pyx_L10_continue:; } } __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_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_mask.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.pad_2d_inplace_float32", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_mask.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_167pad_2d_inplace_object(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_167pad_2d_inplace_object = {__Pyx_NAMESTR("pad_2d_inplace_object"), (PyCFunction)__pyx_pw_6pandas_5algos_167pad_2d_inplace_object, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_167pad_2d_inplace_object(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_values = 0; PyArrayObject *__pyx_v_mask = 0; PyObject *__pyx_v_limit = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("pad_2d_inplace_object (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__values,&__pyx_n_s__mask,&__pyx_n_s__limit,0}; PyObject* values[3] = {0,0,0}; /* "pandas/src/generated.pyx":1459 * def pad_2d_inplace_object(ndarray[object, ndim=2] values, * ndarray[uint8_t, ndim=2] mask, * limit=None): # <<<<<<<<<<<<<< * cdef Py_ssize_t i, j, N, K * cdef object val */ values[2] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__values)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__mask)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("pad_2d_inplace_object", 0, 2, 3, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1457; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__limit); if (value) { values[2] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "pad_2d_inplace_object") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1457; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_values = ((PyArrayObject *)values[0]); __pyx_v_mask = ((PyArrayObject *)values[1]); __pyx_v_limit = values[2]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("pad_2d_inplace_object", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1457; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.pad_2d_inplace_object", __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_filename = __pyx_f[2]; __pyx_lineno = 1457; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_mask), __pyx_ptype_5numpy_ndarray, 1, "mask", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1458; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_166pad_2d_inplace_object(__pyx_self, __pyx_v_values, __pyx_v_mask, __pyx_v_limit); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":1457 * @cython.boundscheck(False) * @cython.wraparound(False) * def pad_2d_inplace_object(ndarray[object, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[uint8_t, ndim=2] mask, * limit=None): */ static PyObject *__pyx_pf_6pandas_5algos_166pad_2d_inplace_object(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_mask, PyObject *__pyx_v_limit) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_N; Py_ssize_t __pyx_v_K; PyObject *__pyx_v_val = 0; int __pyx_v_lim; int __pyx_v_fill_count; __Pyx_LocalBuf_ND __pyx_pybuffernd_mask; __Pyx_Buffer __pyx_pybuffer_mask; __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; PyObject *(*__pyx_t_5)(PyObject *); Py_ssize_t __pyx_t_6; Py_ssize_t __pyx_t_7; int __pyx_t_8; int __pyx_t_9; int __pyx_t_10; Py_ssize_t __pyx_t_11; long __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; PyObject **__pyx_t_19; Py_ssize_t __pyx_t_20; Py_ssize_t __pyx_t_21; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("pad_2d_inplace_object", 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_mask.pybuffer.buf = NULL; __pyx_pybuffer_mask.refcount = 0; __pyx_pybuffernd_mask.data = NULL; __pyx_pybuffernd_mask.rcbuffer = &__pyx_pybuffer_mask; { __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| PyBUF_WRITABLE, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1457; __pyx_clineno = __LINE__; goto __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_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; 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, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1457; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; __pyx_pybuffernd_mask.diminfo[1].strides = __pyx_pybuffernd_mask.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_mask.diminfo[1].shape = __pyx_pybuffernd_mask.rcbuffer->pybuffer.shape[1]; /* "pandas/src/generated.pyx":1462 * cdef Py_ssize_t i, j, N, K * cdef object val * cdef int lim, fill_count = 0 # <<<<<<<<<<<<<< * * K, N = ( values).shape */ __pyx_v_fill_count = 0; /* "pandas/src/generated.pyx":1464 * cdef int lim, fill_count = 0 * * K, N = ( values).shape # <<<<<<<<<<<<<< * * # GH 2778 */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_values), __pyx_n_s__shape); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1464; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) { PyObject* sequence = __pyx_t_1; #if CYTHON_COMPILING_IN_CPYTHON Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1464; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1); } else { __pyx_t_2 = PyList_GET_ITEM(sequence, 0); __pyx_t_3 = PyList_GET_ITEM(sequence, 1); } __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); #else __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1464; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1464; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } else { Py_ssize_t index = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1464; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_5 = Py_TYPE(__pyx_t_4)->tp_iternext; index = 0; __pyx_t_2 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_2)) goto __pyx_L3_unpacking_failed; __Pyx_GOTREF(__pyx_t_2); index = 1; __pyx_t_3 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_3)) goto __pyx_L3_unpacking_failed; __Pyx_GOTREF(__pyx_t_3); if (__Pyx_IternextUnpackEndCheck(__pyx_t_5(__pyx_t_4), 2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1464; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 1464; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_L4_unpacking_done:; } __pyx_t_6 = __Pyx_PyIndex_AsSsize_t(__pyx_t_2); if (unlikely((__pyx_t_6 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1464; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_7 = __Pyx_PyIndex_AsSsize_t(__pyx_t_3); if (unlikely((__pyx_t_7 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1464; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_K = __pyx_t_6; __pyx_v_N = __pyx_t_7; /* "pandas/src/generated.pyx":1467 * * # GH 2778 * if N == 0: # <<<<<<<<<<<<<< * return * */ __pyx_t_8 = ((__pyx_v_N == 0) != 0); if (__pyx_t_8) { /* "pandas/src/generated.pyx":1468 * # GH 2778 * if N == 0: * return # <<<<<<<<<<<<<< * * if limit is None: */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; goto __pyx_L5; } __pyx_L5:; /* "pandas/src/generated.pyx":1470 * return * * if limit is None: # <<<<<<<<<<<<<< * lim = N * else: */ __pyx_t_8 = (__pyx_v_limit == Py_None); __pyx_t_9 = (__pyx_t_8 != 0); if (__pyx_t_9) { /* "pandas/src/generated.pyx":1471 * * if limit is None: * lim = N # <<<<<<<<<<<<<< * else: * if limit < 0: */ __pyx_v_lim = __pyx_v_N; goto __pyx_L6; } /*else*/ { /* "pandas/src/generated.pyx":1473 * lim = N * else: * if limit < 0: # <<<<<<<<<<<<<< * raise ValueError('Limit must be non-negative') * lim = limit */ __pyx_t_1 = PyObject_RichCompare(__pyx_v_limit, __pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1473; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1473; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_9) { /* "pandas/src/generated.pyx":1474 * else: * if limit < 0: * raise ValueError('Limit must be non-negative') # <<<<<<<<<<<<<< * lim = limit * */ __pyx_t_1 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_89), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1474; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 1474; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L7; } __pyx_L7:; /* "pandas/src/generated.pyx":1475 * if limit < 0: * raise ValueError('Limit must be non-negative') * lim = limit # <<<<<<<<<<<<<< * * for j in range(K): */ __pyx_t_10 = __Pyx_PyInt_AsInt(__pyx_v_limit); if (unlikely((__pyx_t_10 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1475; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_lim = __pyx_t_10; } __pyx_L6:; /* "pandas/src/generated.pyx":1477 * lim = limit * * for j in range(K): # <<<<<<<<<<<<<< * fill_count = 0 * val = values[j, 0] */ __pyx_t_7 = __pyx_v_K; for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_7; __pyx_t_6+=1) { __pyx_v_j = __pyx_t_6; /* "pandas/src/generated.pyx":1478 * * for j in range(K): * fill_count = 0 # <<<<<<<<<<<<<< * val = values[j, 0] * for i in range(N): */ __pyx_v_fill_count = 0; /* "pandas/src/generated.pyx":1479 * for j in range(K): * fill_count = 0 * val = values[j, 0] # <<<<<<<<<<<<<< * for i in range(N): * if mask[j, i]: */ __pyx_t_11 = __pyx_v_j; __pyx_t_12 = 0; __pyx_t_1 = (PyObject *) *__Pyx_BufPtrStrided2d(PyObject **, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_11, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_12, __pyx_pybuffernd_values.diminfo[1].strides); __Pyx_INCREF((PyObject*)__pyx_t_1); __Pyx_XDECREF_SET(__pyx_v_val, __pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/generated.pyx":1480 * fill_count = 0 * val = values[j, 0] * for i in range(N): # <<<<<<<<<<<<<< * if mask[j, i]: * if fill_count >= lim: */ __pyx_t_13 = __pyx_v_N; for (__pyx_t_14 = 0; __pyx_t_14 < __pyx_t_13; __pyx_t_14+=1) { __pyx_v_i = __pyx_t_14; /* "pandas/src/generated.pyx":1481 * val = values[j, 0] * for i in range(N): * if mask[j, i]: # <<<<<<<<<<<<<< * if fill_count >= lim: * continue */ __pyx_t_15 = __pyx_v_j; __pyx_t_16 = __pyx_v_i; __pyx_t_9 = ((*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_mask.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_mask.diminfo[0].strides, __pyx_t_16, __pyx_pybuffernd_mask.diminfo[1].strides)) != 0); if (__pyx_t_9) { /* "pandas/src/generated.pyx":1482 * for i in range(N): * if mask[j, i]: * if fill_count >= lim: # <<<<<<<<<<<<<< * continue * fill_count += 1 */ __pyx_t_9 = ((__pyx_v_fill_count >= __pyx_v_lim) != 0); if (__pyx_t_9) { /* "pandas/src/generated.pyx":1483 * if mask[j, i]: * if fill_count >= lim: * continue # <<<<<<<<<<<<<< * fill_count += 1 * values[j, i] = val */ goto __pyx_L10_continue; goto __pyx_L13; } __pyx_L13:; /* "pandas/src/generated.pyx":1484 * if fill_count >= lim: * continue * fill_count += 1 # <<<<<<<<<<<<<< * values[j, i] = val * else: */ __pyx_v_fill_count = (__pyx_v_fill_count + 1); /* "pandas/src/generated.pyx":1485 * continue * fill_count += 1 * values[j, i] = val # <<<<<<<<<<<<<< * else: * fill_count = 0 */ __pyx_t_17 = __pyx_v_j; __pyx_t_18 = __pyx_v_i; __pyx_t_19 = __Pyx_BufPtrStrided2d(PyObject **, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_18, __pyx_pybuffernd_values.diminfo[1].strides); __Pyx_GOTREF(*__pyx_t_19); __Pyx_INCREF(__pyx_v_val); __Pyx_DECREF(*__pyx_t_19); *__pyx_t_19 = __pyx_v_val; __Pyx_GIVEREF(*__pyx_t_19); goto __pyx_L12; } /*else*/ { /* "pandas/src/generated.pyx":1487 * values[j, i] = val * else: * fill_count = 0 # <<<<<<<<<<<<<< * val = values[j, i] * @cython.boundscheck(False) */ __pyx_v_fill_count = 0; /* "pandas/src/generated.pyx":1488 * else: * fill_count = 0 * val = values[j, i] # <<<<<<<<<<<<<< * @cython.boundscheck(False) * @cython.wraparound(False) */ __pyx_t_20 = __pyx_v_j; __pyx_t_21 = __pyx_v_i; __pyx_t_1 = (PyObject *) *__Pyx_BufPtrStrided2d(PyObject **, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_21, __pyx_pybuffernd_values.diminfo[1].strides); __Pyx_INCREF((PyObject*)__pyx_t_1); __Pyx_DECREF_SET(__pyx_v_val, __pyx_t_1); __pyx_t_1 = 0; } __pyx_L12:; __pyx_L10_continue:; } } __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_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_mask.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.pad_2d_inplace_object", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_mask.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF(__pyx_v_val); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_169pad_2d_inplace_int32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_169pad_2d_inplace_int32 = {__Pyx_NAMESTR("pad_2d_inplace_int32"), (PyCFunction)__pyx_pw_6pandas_5algos_169pad_2d_inplace_int32, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_169pad_2d_inplace_int32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_values = 0; PyArrayObject *__pyx_v_mask = 0; PyObject *__pyx_v_limit = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("pad_2d_inplace_int32 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__values,&__pyx_n_s__mask,&__pyx_n_s__limit,0}; PyObject* values[3] = {0,0,0}; /* "pandas/src/generated.pyx":1493 * def pad_2d_inplace_int32(ndarray[int32_t, ndim=2] values, * ndarray[uint8_t, ndim=2] mask, * limit=None): # <<<<<<<<<<<<<< * cdef Py_ssize_t i, j, N, K * cdef int32_t val */ values[2] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__values)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__mask)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("pad_2d_inplace_int32", 0, 2, 3, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1491; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__limit); if (value) { values[2] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "pad_2d_inplace_int32") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1491; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_values = ((PyArrayObject *)values[0]); __pyx_v_mask = ((PyArrayObject *)values[1]); __pyx_v_limit = values[2]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("pad_2d_inplace_int32", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1491; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.pad_2d_inplace_int32", __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_filename = __pyx_f[2]; __pyx_lineno = 1491; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_mask), __pyx_ptype_5numpy_ndarray, 1, "mask", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1492; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_168pad_2d_inplace_int32(__pyx_self, __pyx_v_values, __pyx_v_mask, __pyx_v_limit); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":1491 * @cython.boundscheck(False) * @cython.wraparound(False) * def pad_2d_inplace_int32(ndarray[int32_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[uint8_t, ndim=2] mask, * limit=None): */ static PyObject *__pyx_pf_6pandas_5algos_168pad_2d_inplace_int32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_mask, PyObject *__pyx_v_limit) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_N; Py_ssize_t __pyx_v_K; __pyx_t_5numpy_int32_t __pyx_v_val; int __pyx_v_lim; int __pyx_v_fill_count; __Pyx_LocalBuf_ND __pyx_pybuffernd_mask; __Pyx_Buffer __pyx_pybuffer_mask; __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; PyObject *(*__pyx_t_5)(PyObject *); Py_ssize_t __pyx_t_6; Py_ssize_t __pyx_t_7; int __pyx_t_8; int __pyx_t_9; int __pyx_t_10; Py_ssize_t __pyx_t_11; long __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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("pad_2d_inplace_int32", 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_mask.pybuffer.buf = NULL; __pyx_pybuffer_mask.refcount = 0; __pyx_pybuffernd_mask.data = NULL; __pyx_pybuffernd_mask.rcbuffer = &__pyx_pybuffer_mask; { __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_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1491; __pyx_clineno = __LINE__; goto __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_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; 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, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1491; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; __pyx_pybuffernd_mask.diminfo[1].strides = __pyx_pybuffernd_mask.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_mask.diminfo[1].shape = __pyx_pybuffernd_mask.rcbuffer->pybuffer.shape[1]; /* "pandas/src/generated.pyx":1496 * cdef Py_ssize_t i, j, N, K * cdef int32_t val * cdef int lim, fill_count = 0 # <<<<<<<<<<<<<< * * K, N = ( values).shape */ __pyx_v_fill_count = 0; /* "pandas/src/generated.pyx":1498 * cdef int lim, fill_count = 0 * * K, N = ( values).shape # <<<<<<<<<<<<<< * * # GH 2778 */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_values), __pyx_n_s__shape); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1498; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) { PyObject* sequence = __pyx_t_1; #if CYTHON_COMPILING_IN_CPYTHON Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1498; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1); } else { __pyx_t_2 = PyList_GET_ITEM(sequence, 0); __pyx_t_3 = PyList_GET_ITEM(sequence, 1); } __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); #else __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1498; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1498; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } else { Py_ssize_t index = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1498; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_5 = Py_TYPE(__pyx_t_4)->tp_iternext; index = 0; __pyx_t_2 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_2)) goto __pyx_L3_unpacking_failed; __Pyx_GOTREF(__pyx_t_2); index = 1; __pyx_t_3 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_3)) goto __pyx_L3_unpacking_failed; __Pyx_GOTREF(__pyx_t_3); if (__Pyx_IternextUnpackEndCheck(__pyx_t_5(__pyx_t_4), 2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1498; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 1498; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_L4_unpacking_done:; } __pyx_t_6 = __Pyx_PyIndex_AsSsize_t(__pyx_t_2); if (unlikely((__pyx_t_6 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1498; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_7 = __Pyx_PyIndex_AsSsize_t(__pyx_t_3); if (unlikely((__pyx_t_7 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1498; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_K = __pyx_t_6; __pyx_v_N = __pyx_t_7; /* "pandas/src/generated.pyx":1501 * * # GH 2778 * if N == 0: # <<<<<<<<<<<<<< * return * */ __pyx_t_8 = ((__pyx_v_N == 0) != 0); if (__pyx_t_8) { /* "pandas/src/generated.pyx":1502 * # GH 2778 * if N == 0: * return # <<<<<<<<<<<<<< * * if limit is None: */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; goto __pyx_L5; } __pyx_L5:; /* "pandas/src/generated.pyx":1504 * return * * if limit is None: # <<<<<<<<<<<<<< * lim = N * else: */ __pyx_t_8 = (__pyx_v_limit == Py_None); __pyx_t_9 = (__pyx_t_8 != 0); if (__pyx_t_9) { /* "pandas/src/generated.pyx":1505 * * if limit is None: * lim = N # <<<<<<<<<<<<<< * else: * if limit < 0: */ __pyx_v_lim = __pyx_v_N; goto __pyx_L6; } /*else*/ { /* "pandas/src/generated.pyx":1507 * lim = N * else: * if limit < 0: # <<<<<<<<<<<<<< * raise ValueError('Limit must be non-negative') * lim = limit */ __pyx_t_1 = PyObject_RichCompare(__pyx_v_limit, __pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1507; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1507; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_9) { /* "pandas/src/generated.pyx":1508 * else: * if limit < 0: * raise ValueError('Limit must be non-negative') # <<<<<<<<<<<<<< * lim = limit * */ __pyx_t_1 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_90), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1508; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 1508; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L7; } __pyx_L7:; /* "pandas/src/generated.pyx":1509 * if limit < 0: * raise ValueError('Limit must be non-negative') * lim = limit # <<<<<<<<<<<<<< * * for j in range(K): */ __pyx_t_10 = __Pyx_PyInt_AsInt(__pyx_v_limit); if (unlikely((__pyx_t_10 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1509; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_lim = __pyx_t_10; } __pyx_L6:; /* "pandas/src/generated.pyx":1511 * lim = limit * * for j in range(K): # <<<<<<<<<<<<<< * fill_count = 0 * val = values[j, 0] */ __pyx_t_7 = __pyx_v_K; for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_7; __pyx_t_6+=1) { __pyx_v_j = __pyx_t_6; /* "pandas/src/generated.pyx":1512 * * for j in range(K): * fill_count = 0 # <<<<<<<<<<<<<< * val = values[j, 0] * for i in range(N): */ __pyx_v_fill_count = 0; /* "pandas/src/generated.pyx":1513 * for j in range(K): * fill_count = 0 * val = values[j, 0] # <<<<<<<<<<<<<< * for i in range(N): * if mask[j, i]: */ __pyx_t_11 = __pyx_v_j; __pyx_t_12 = 0; __pyx_v_val = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_11, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_12, __pyx_pybuffernd_values.diminfo[1].strides)); /* "pandas/src/generated.pyx":1514 * fill_count = 0 * val = values[j, 0] * for i in range(N): # <<<<<<<<<<<<<< * if mask[j, i]: * if fill_count >= lim: */ __pyx_t_13 = __pyx_v_N; for (__pyx_t_14 = 0; __pyx_t_14 < __pyx_t_13; __pyx_t_14+=1) { __pyx_v_i = __pyx_t_14; /* "pandas/src/generated.pyx":1515 * val = values[j, 0] * for i in range(N): * if mask[j, i]: # <<<<<<<<<<<<<< * if fill_count >= lim: * continue */ __pyx_t_15 = __pyx_v_j; __pyx_t_16 = __pyx_v_i; __pyx_t_9 = ((*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_mask.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_mask.diminfo[0].strides, __pyx_t_16, __pyx_pybuffernd_mask.diminfo[1].strides)) != 0); if (__pyx_t_9) { /* "pandas/src/generated.pyx":1516 * for i in range(N): * if mask[j, i]: * if fill_count >= lim: # <<<<<<<<<<<<<< * continue * fill_count += 1 */ __pyx_t_9 = ((__pyx_v_fill_count >= __pyx_v_lim) != 0); if (__pyx_t_9) { /* "pandas/src/generated.pyx":1517 * if mask[j, i]: * if fill_count >= lim: * continue # <<<<<<<<<<<<<< * fill_count += 1 * values[j, i] = val */ goto __pyx_L10_continue; goto __pyx_L13; } __pyx_L13:; /* "pandas/src/generated.pyx":1518 * if fill_count >= lim: * continue * fill_count += 1 # <<<<<<<<<<<<<< * values[j, i] = val * else: */ __pyx_v_fill_count = (__pyx_v_fill_count + 1); /* "pandas/src/generated.pyx":1519 * continue * fill_count += 1 * values[j, i] = val # <<<<<<<<<<<<<< * else: * fill_count = 0 */ __pyx_t_17 = __pyx_v_j; __pyx_t_18 = __pyx_v_i; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_18, __pyx_pybuffernd_values.diminfo[1].strides) = __pyx_v_val; goto __pyx_L12; } /*else*/ { /* "pandas/src/generated.pyx":1521 * values[j, i] = val * else: * fill_count = 0 # <<<<<<<<<<<<<< * val = values[j, i] * @cython.boundscheck(False) */ __pyx_v_fill_count = 0; /* "pandas/src/generated.pyx":1522 * else: * fill_count = 0 * val = values[j, i] # <<<<<<<<<<<<<< * @cython.boundscheck(False) * @cython.wraparound(False) */ __pyx_t_19 = __pyx_v_j; __pyx_t_20 = __pyx_v_i; __pyx_v_val = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_20, __pyx_pybuffernd_values.diminfo[1].strides)); } __pyx_L12:; __pyx_L10_continue:; } } __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_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_mask.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.pad_2d_inplace_int32", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_mask.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_171pad_2d_inplace_int64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_171pad_2d_inplace_int64 = {__Pyx_NAMESTR("pad_2d_inplace_int64"), (PyCFunction)__pyx_pw_6pandas_5algos_171pad_2d_inplace_int64, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_171pad_2d_inplace_int64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_values = 0; PyArrayObject *__pyx_v_mask = 0; PyObject *__pyx_v_limit = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("pad_2d_inplace_int64 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__values,&__pyx_n_s__mask,&__pyx_n_s__limit,0}; PyObject* values[3] = {0,0,0}; /* "pandas/src/generated.pyx":1527 * def pad_2d_inplace_int64(ndarray[int64_t, ndim=2] values, * ndarray[uint8_t, ndim=2] mask, * limit=None): # <<<<<<<<<<<<<< * cdef Py_ssize_t i, j, N, K * cdef int64_t val */ values[2] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__values)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__mask)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("pad_2d_inplace_int64", 0, 2, 3, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1525; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__limit); if (value) { values[2] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "pad_2d_inplace_int64") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1525; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_values = ((PyArrayObject *)values[0]); __pyx_v_mask = ((PyArrayObject *)values[1]); __pyx_v_limit = values[2]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("pad_2d_inplace_int64", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1525; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.pad_2d_inplace_int64", __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_filename = __pyx_f[2]; __pyx_lineno = 1525; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_mask), __pyx_ptype_5numpy_ndarray, 1, "mask", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1526; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_170pad_2d_inplace_int64(__pyx_self, __pyx_v_values, __pyx_v_mask, __pyx_v_limit); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":1525 * @cython.boundscheck(False) * @cython.wraparound(False) * def pad_2d_inplace_int64(ndarray[int64_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[uint8_t, ndim=2] mask, * limit=None): */ static PyObject *__pyx_pf_6pandas_5algos_170pad_2d_inplace_int64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_mask, PyObject *__pyx_v_limit) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_N; Py_ssize_t __pyx_v_K; __pyx_t_5numpy_int64_t __pyx_v_val; int __pyx_v_lim; int __pyx_v_fill_count; __Pyx_LocalBuf_ND __pyx_pybuffernd_mask; __Pyx_Buffer __pyx_pybuffer_mask; __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; PyObject *(*__pyx_t_5)(PyObject *); Py_ssize_t __pyx_t_6; Py_ssize_t __pyx_t_7; int __pyx_t_8; int __pyx_t_9; int __pyx_t_10; Py_ssize_t __pyx_t_11; long __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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("pad_2d_inplace_int64", 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_mask.pybuffer.buf = NULL; __pyx_pybuffer_mask.refcount = 0; __pyx_pybuffernd_mask.data = NULL; __pyx_pybuffernd_mask.rcbuffer = &__pyx_pybuffer_mask; { __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_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1525; __pyx_clineno = __LINE__; goto __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_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; 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, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1525; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; __pyx_pybuffernd_mask.diminfo[1].strides = __pyx_pybuffernd_mask.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_mask.diminfo[1].shape = __pyx_pybuffernd_mask.rcbuffer->pybuffer.shape[1]; /* "pandas/src/generated.pyx":1530 * cdef Py_ssize_t i, j, N, K * cdef int64_t val * cdef int lim, fill_count = 0 # <<<<<<<<<<<<<< * * K, N = ( values).shape */ __pyx_v_fill_count = 0; /* "pandas/src/generated.pyx":1532 * cdef int lim, fill_count = 0 * * K, N = ( values).shape # <<<<<<<<<<<<<< * * # GH 2778 */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_values), __pyx_n_s__shape); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1532; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) { PyObject* sequence = __pyx_t_1; #if CYTHON_COMPILING_IN_CPYTHON Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1532; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1); } else { __pyx_t_2 = PyList_GET_ITEM(sequence, 0); __pyx_t_3 = PyList_GET_ITEM(sequence, 1); } __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); #else __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1532; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1532; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } else { Py_ssize_t index = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1532; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_5 = Py_TYPE(__pyx_t_4)->tp_iternext; index = 0; __pyx_t_2 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_2)) goto __pyx_L3_unpacking_failed; __Pyx_GOTREF(__pyx_t_2); index = 1; __pyx_t_3 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_3)) goto __pyx_L3_unpacking_failed; __Pyx_GOTREF(__pyx_t_3); if (__Pyx_IternextUnpackEndCheck(__pyx_t_5(__pyx_t_4), 2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1532; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 1532; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_L4_unpacking_done:; } __pyx_t_6 = __Pyx_PyIndex_AsSsize_t(__pyx_t_2); if (unlikely((__pyx_t_6 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1532; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_7 = __Pyx_PyIndex_AsSsize_t(__pyx_t_3); if (unlikely((__pyx_t_7 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1532; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_K = __pyx_t_6; __pyx_v_N = __pyx_t_7; /* "pandas/src/generated.pyx":1535 * * # GH 2778 * if N == 0: # <<<<<<<<<<<<<< * return * */ __pyx_t_8 = ((__pyx_v_N == 0) != 0); if (__pyx_t_8) { /* "pandas/src/generated.pyx":1536 * # GH 2778 * if N == 0: * return # <<<<<<<<<<<<<< * * if limit is None: */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; goto __pyx_L5; } __pyx_L5:; /* "pandas/src/generated.pyx":1538 * return * * if limit is None: # <<<<<<<<<<<<<< * lim = N * else: */ __pyx_t_8 = (__pyx_v_limit == Py_None); __pyx_t_9 = (__pyx_t_8 != 0); if (__pyx_t_9) { /* "pandas/src/generated.pyx":1539 * * if limit is None: * lim = N # <<<<<<<<<<<<<< * else: * if limit < 0: */ __pyx_v_lim = __pyx_v_N; goto __pyx_L6; } /*else*/ { /* "pandas/src/generated.pyx":1541 * lim = N * else: * if limit < 0: # <<<<<<<<<<<<<< * raise ValueError('Limit must be non-negative') * lim = limit */ __pyx_t_1 = PyObject_RichCompare(__pyx_v_limit, __pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1541; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1541; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_9) { /* "pandas/src/generated.pyx":1542 * else: * if limit < 0: * raise ValueError('Limit must be non-negative') # <<<<<<<<<<<<<< * lim = limit * */ __pyx_t_1 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_91), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1542; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 1542; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L7; } __pyx_L7:; /* "pandas/src/generated.pyx":1543 * if limit < 0: * raise ValueError('Limit must be non-negative') * lim = limit # <<<<<<<<<<<<<< * * for j in range(K): */ __pyx_t_10 = __Pyx_PyInt_AsInt(__pyx_v_limit); if (unlikely((__pyx_t_10 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1543; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_lim = __pyx_t_10; } __pyx_L6:; /* "pandas/src/generated.pyx":1545 * lim = limit * * for j in range(K): # <<<<<<<<<<<<<< * fill_count = 0 * val = values[j, 0] */ __pyx_t_7 = __pyx_v_K; for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_7; __pyx_t_6+=1) { __pyx_v_j = __pyx_t_6; /* "pandas/src/generated.pyx":1546 * * for j in range(K): * fill_count = 0 # <<<<<<<<<<<<<< * val = values[j, 0] * for i in range(N): */ __pyx_v_fill_count = 0; /* "pandas/src/generated.pyx":1547 * for j in range(K): * fill_count = 0 * val = values[j, 0] # <<<<<<<<<<<<<< * for i in range(N): * if mask[j, i]: */ __pyx_t_11 = __pyx_v_j; __pyx_t_12 = 0; __pyx_v_val = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_11, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_12, __pyx_pybuffernd_values.diminfo[1].strides)); /* "pandas/src/generated.pyx":1548 * fill_count = 0 * val = values[j, 0] * for i in range(N): # <<<<<<<<<<<<<< * if mask[j, i]: * if fill_count >= lim: */ __pyx_t_13 = __pyx_v_N; for (__pyx_t_14 = 0; __pyx_t_14 < __pyx_t_13; __pyx_t_14+=1) { __pyx_v_i = __pyx_t_14; /* "pandas/src/generated.pyx":1549 * val = values[j, 0] * for i in range(N): * if mask[j, i]: # <<<<<<<<<<<<<< * if fill_count >= lim: * continue */ __pyx_t_15 = __pyx_v_j; __pyx_t_16 = __pyx_v_i; __pyx_t_9 = ((*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_mask.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_mask.diminfo[0].strides, __pyx_t_16, __pyx_pybuffernd_mask.diminfo[1].strides)) != 0); if (__pyx_t_9) { /* "pandas/src/generated.pyx":1550 * for i in range(N): * if mask[j, i]: * if fill_count >= lim: # <<<<<<<<<<<<<< * continue * fill_count += 1 */ __pyx_t_9 = ((__pyx_v_fill_count >= __pyx_v_lim) != 0); if (__pyx_t_9) { /* "pandas/src/generated.pyx":1551 * if mask[j, i]: * if fill_count >= lim: * continue # <<<<<<<<<<<<<< * fill_count += 1 * values[j, i] = val */ goto __pyx_L10_continue; goto __pyx_L13; } __pyx_L13:; /* "pandas/src/generated.pyx":1552 * if fill_count >= lim: * continue * fill_count += 1 # <<<<<<<<<<<<<< * values[j, i] = val * else: */ __pyx_v_fill_count = (__pyx_v_fill_count + 1); /* "pandas/src/generated.pyx":1553 * continue * fill_count += 1 * values[j, i] = val # <<<<<<<<<<<<<< * else: * fill_count = 0 */ __pyx_t_17 = __pyx_v_j; __pyx_t_18 = __pyx_v_i; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_18, __pyx_pybuffernd_values.diminfo[1].strides) = __pyx_v_val; goto __pyx_L12; } /*else*/ { /* "pandas/src/generated.pyx":1555 * values[j, i] = val * else: * fill_count = 0 # <<<<<<<<<<<<<< * val = values[j, i] * @cython.boundscheck(False) */ __pyx_v_fill_count = 0; /* "pandas/src/generated.pyx":1556 * else: * fill_count = 0 * val = values[j, i] # <<<<<<<<<<<<<< * @cython.boundscheck(False) * @cython.wraparound(False) */ __pyx_t_19 = __pyx_v_j; __pyx_t_20 = __pyx_v_i; __pyx_v_val = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_20, __pyx_pybuffernd_values.diminfo[1].strides)); } __pyx_L12:; __pyx_L10_continue:; } } __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_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_mask.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.pad_2d_inplace_int64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_mask.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_173pad_2d_inplace_bool(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_173pad_2d_inplace_bool = {__Pyx_NAMESTR("pad_2d_inplace_bool"), (PyCFunction)__pyx_pw_6pandas_5algos_173pad_2d_inplace_bool, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_173pad_2d_inplace_bool(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_values = 0; PyArrayObject *__pyx_v_mask = 0; PyObject *__pyx_v_limit = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("pad_2d_inplace_bool (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__values,&__pyx_n_s__mask,&__pyx_n_s__limit,0}; PyObject* values[3] = {0,0,0}; /* "pandas/src/generated.pyx":1561 * def pad_2d_inplace_bool(ndarray[uint8_t, ndim=2] values, * ndarray[uint8_t, ndim=2] mask, * limit=None): # <<<<<<<<<<<<<< * cdef Py_ssize_t i, j, N, K * cdef uint8_t val */ values[2] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__values)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__mask)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("pad_2d_inplace_bool", 0, 2, 3, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1559; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__limit); if (value) { values[2] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "pad_2d_inplace_bool") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1559; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_values = ((PyArrayObject *)values[0]); __pyx_v_mask = ((PyArrayObject *)values[1]); __pyx_v_limit = values[2]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("pad_2d_inplace_bool", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1559; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.pad_2d_inplace_bool", __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_filename = __pyx_f[2]; __pyx_lineno = 1559; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_mask), __pyx_ptype_5numpy_ndarray, 1, "mask", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1560; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_172pad_2d_inplace_bool(__pyx_self, __pyx_v_values, __pyx_v_mask, __pyx_v_limit); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":1559 * @cython.boundscheck(False) * @cython.wraparound(False) * def pad_2d_inplace_bool(ndarray[uint8_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[uint8_t, ndim=2] mask, * limit=None): */ static PyObject *__pyx_pf_6pandas_5algos_172pad_2d_inplace_bool(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_mask, PyObject *__pyx_v_limit) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_N; Py_ssize_t __pyx_v_K; __pyx_t_5numpy_uint8_t __pyx_v_val; int __pyx_v_lim; int __pyx_v_fill_count; __Pyx_LocalBuf_ND __pyx_pybuffernd_mask; __Pyx_Buffer __pyx_pybuffer_mask; __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; PyObject *(*__pyx_t_5)(PyObject *); Py_ssize_t __pyx_t_6; Py_ssize_t __pyx_t_7; int __pyx_t_8; int __pyx_t_9; int __pyx_t_10; Py_ssize_t __pyx_t_11; long __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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("pad_2d_inplace_bool", 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_mask.pybuffer.buf = NULL; __pyx_pybuffer_mask.refcount = 0; __pyx_pybuffernd_mask.data = NULL; __pyx_pybuffernd_mask.rcbuffer = &__pyx_pybuffer_mask; { __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_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1559; __pyx_clineno = __LINE__; goto __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_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; 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, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1559; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; __pyx_pybuffernd_mask.diminfo[1].strides = __pyx_pybuffernd_mask.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_mask.diminfo[1].shape = __pyx_pybuffernd_mask.rcbuffer->pybuffer.shape[1]; /* "pandas/src/generated.pyx":1564 * cdef Py_ssize_t i, j, N, K * cdef uint8_t val * cdef int lim, fill_count = 0 # <<<<<<<<<<<<<< * * K, N = ( values).shape */ __pyx_v_fill_count = 0; /* "pandas/src/generated.pyx":1566 * cdef int lim, fill_count = 0 * * K, N = ( values).shape # <<<<<<<<<<<<<< * * # GH 2778 */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_values), __pyx_n_s__shape); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1566; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) { PyObject* sequence = __pyx_t_1; #if CYTHON_COMPILING_IN_CPYTHON Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1566; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1); } else { __pyx_t_2 = PyList_GET_ITEM(sequence, 0); __pyx_t_3 = PyList_GET_ITEM(sequence, 1); } __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); #else __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1566; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1566; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } else { Py_ssize_t index = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1566; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_5 = Py_TYPE(__pyx_t_4)->tp_iternext; index = 0; __pyx_t_2 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_2)) goto __pyx_L3_unpacking_failed; __Pyx_GOTREF(__pyx_t_2); index = 1; __pyx_t_3 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_3)) goto __pyx_L3_unpacking_failed; __Pyx_GOTREF(__pyx_t_3); if (__Pyx_IternextUnpackEndCheck(__pyx_t_5(__pyx_t_4), 2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1566; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 1566; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_L4_unpacking_done:; } __pyx_t_6 = __Pyx_PyIndex_AsSsize_t(__pyx_t_2); if (unlikely((__pyx_t_6 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1566; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_7 = __Pyx_PyIndex_AsSsize_t(__pyx_t_3); if (unlikely((__pyx_t_7 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1566; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_K = __pyx_t_6; __pyx_v_N = __pyx_t_7; /* "pandas/src/generated.pyx":1569 * * # GH 2778 * if N == 0: # <<<<<<<<<<<<<< * return * */ __pyx_t_8 = ((__pyx_v_N == 0) != 0); if (__pyx_t_8) { /* "pandas/src/generated.pyx":1570 * # GH 2778 * if N == 0: * return # <<<<<<<<<<<<<< * * if limit is None: */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; goto __pyx_L5; } __pyx_L5:; /* "pandas/src/generated.pyx":1572 * return * * if limit is None: # <<<<<<<<<<<<<< * lim = N * else: */ __pyx_t_8 = (__pyx_v_limit == Py_None); __pyx_t_9 = (__pyx_t_8 != 0); if (__pyx_t_9) { /* "pandas/src/generated.pyx":1573 * * if limit is None: * lim = N # <<<<<<<<<<<<<< * else: * if limit < 0: */ __pyx_v_lim = __pyx_v_N; goto __pyx_L6; } /*else*/ { /* "pandas/src/generated.pyx":1575 * lim = N * else: * if limit < 0: # <<<<<<<<<<<<<< * raise ValueError('Limit must be non-negative') * lim = limit */ __pyx_t_1 = PyObject_RichCompare(__pyx_v_limit, __pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1575; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1575; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_9) { /* "pandas/src/generated.pyx":1576 * else: * if limit < 0: * raise ValueError('Limit must be non-negative') # <<<<<<<<<<<<<< * lim = limit * */ __pyx_t_1 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_92), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1576; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 1576; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L7; } __pyx_L7:; /* "pandas/src/generated.pyx":1577 * if limit < 0: * raise ValueError('Limit must be non-negative') * lim = limit # <<<<<<<<<<<<<< * * for j in range(K): */ __pyx_t_10 = __Pyx_PyInt_AsInt(__pyx_v_limit); if (unlikely((__pyx_t_10 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1577; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_lim = __pyx_t_10; } __pyx_L6:; /* "pandas/src/generated.pyx":1579 * lim = limit * * for j in range(K): # <<<<<<<<<<<<<< * fill_count = 0 * val = values[j, 0] */ __pyx_t_7 = __pyx_v_K; for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_7; __pyx_t_6+=1) { __pyx_v_j = __pyx_t_6; /* "pandas/src/generated.pyx":1580 * * for j in range(K): * fill_count = 0 # <<<<<<<<<<<<<< * val = values[j, 0] * for i in range(N): */ __pyx_v_fill_count = 0; /* "pandas/src/generated.pyx":1581 * for j in range(K): * fill_count = 0 * val = values[j, 0] # <<<<<<<<<<<<<< * for i in range(N): * if mask[j, i]: */ __pyx_t_11 = __pyx_v_j; __pyx_t_12 = 0; __pyx_v_val = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_11, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_12, __pyx_pybuffernd_values.diminfo[1].strides)); /* "pandas/src/generated.pyx":1582 * fill_count = 0 * val = values[j, 0] * for i in range(N): # <<<<<<<<<<<<<< * if mask[j, i]: * if fill_count >= lim: */ __pyx_t_13 = __pyx_v_N; for (__pyx_t_14 = 0; __pyx_t_14 < __pyx_t_13; __pyx_t_14+=1) { __pyx_v_i = __pyx_t_14; /* "pandas/src/generated.pyx":1583 * val = values[j, 0] * for i in range(N): * if mask[j, i]: # <<<<<<<<<<<<<< * if fill_count >= lim: * continue */ __pyx_t_15 = __pyx_v_j; __pyx_t_16 = __pyx_v_i; __pyx_t_9 = ((*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_mask.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_mask.diminfo[0].strides, __pyx_t_16, __pyx_pybuffernd_mask.diminfo[1].strides)) != 0); if (__pyx_t_9) { /* "pandas/src/generated.pyx":1584 * for i in range(N): * if mask[j, i]: * if fill_count >= lim: # <<<<<<<<<<<<<< * continue * fill_count += 1 */ __pyx_t_9 = ((__pyx_v_fill_count >= __pyx_v_lim) != 0); if (__pyx_t_9) { /* "pandas/src/generated.pyx":1585 * if mask[j, i]: * if fill_count >= lim: * continue # <<<<<<<<<<<<<< * fill_count += 1 * values[j, i] = val */ goto __pyx_L10_continue; goto __pyx_L13; } __pyx_L13:; /* "pandas/src/generated.pyx":1586 * if fill_count >= lim: * continue * fill_count += 1 # <<<<<<<<<<<<<< * values[j, i] = val * else: */ __pyx_v_fill_count = (__pyx_v_fill_count + 1); /* "pandas/src/generated.pyx":1587 * continue * fill_count += 1 * values[j, i] = val # <<<<<<<<<<<<<< * else: * fill_count = 0 */ __pyx_t_17 = __pyx_v_j; __pyx_t_18 = __pyx_v_i; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_18, __pyx_pybuffernd_values.diminfo[1].strides) = __pyx_v_val; goto __pyx_L12; } /*else*/ { /* "pandas/src/generated.pyx":1589 * values[j, i] = val * else: * fill_count = 0 # <<<<<<<<<<<<<< * val = values[j, i] * */ __pyx_v_fill_count = 0; /* "pandas/src/generated.pyx":1590 * else: * fill_count = 0 * val = values[j, i] # <<<<<<<<<<<<<< * * @cython.boundscheck(False) */ __pyx_t_19 = __pyx_v_j; __pyx_t_20 = __pyx_v_i; __pyx_v_val = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_20, __pyx_pybuffernd_values.diminfo[1].strides)); } __pyx_L12:; __pyx_L10_continue:; } } __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_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_mask.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.pad_2d_inplace_bool", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_mask.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_175backfill_2d_inplace_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_175backfill_2d_inplace_float64 = {__Pyx_NAMESTR("backfill_2d_inplace_float64"), (PyCFunction)__pyx_pw_6pandas_5algos_175backfill_2d_inplace_float64, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_175backfill_2d_inplace_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_values = 0; PyArrayObject *__pyx_v_mask = 0; PyObject *__pyx_v_limit = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("backfill_2d_inplace_float64 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__values,&__pyx_n_s__mask,&__pyx_n_s__limit,0}; PyObject* values[3] = {0,0,0}; /* "pandas/src/generated.pyx":1596 * def backfill_2d_inplace_float64(ndarray[float64_t, ndim=2] values, * ndarray[uint8_t, ndim=2] mask, * limit=None): # <<<<<<<<<<<<<< * cdef Py_ssize_t i, j, N, K * cdef float64_t val */ values[2] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__values)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__mask)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("backfill_2d_inplace_float64", 0, 2, 3, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1594; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__limit); if (value) { values[2] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "backfill_2d_inplace_float64") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1594; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_values = ((PyArrayObject *)values[0]); __pyx_v_mask = ((PyArrayObject *)values[1]); __pyx_v_limit = values[2]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("backfill_2d_inplace_float64", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1594; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.backfill_2d_inplace_float64", __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_filename = __pyx_f[2]; __pyx_lineno = 1594; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_mask), __pyx_ptype_5numpy_ndarray, 1, "mask", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1595; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_174backfill_2d_inplace_float64(__pyx_self, __pyx_v_values, __pyx_v_mask, __pyx_v_limit); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":1594 * @cython.boundscheck(False) * @cython.wraparound(False) * def backfill_2d_inplace_float64(ndarray[float64_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[uint8_t, ndim=2] mask, * limit=None): */ static PyObject *__pyx_pf_6pandas_5algos_174backfill_2d_inplace_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_mask, PyObject *__pyx_v_limit) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_N; Py_ssize_t __pyx_v_K; __pyx_t_5numpy_float64_t __pyx_v_val; int __pyx_v_lim; int __pyx_v_fill_count; __Pyx_LocalBuf_ND __pyx_pybuffernd_mask; __Pyx_Buffer __pyx_pybuffer_mask; __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; PyObject *(*__pyx_t_5)(PyObject *); Py_ssize_t __pyx_t_6; Py_ssize_t __pyx_t_7; int __pyx_t_8; int __pyx_t_9; int __pyx_t_10; Py_ssize_t __pyx_t_11; Py_ssize_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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("backfill_2d_inplace_float64", 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_mask.pybuffer.buf = NULL; __pyx_pybuffer_mask.refcount = 0; __pyx_pybuffernd_mask.data = NULL; __pyx_pybuffernd_mask.rcbuffer = &__pyx_pybuffer_mask; { __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| PyBUF_WRITABLE, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1594; __pyx_clineno = __LINE__; goto __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_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; 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, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1594; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; __pyx_pybuffernd_mask.diminfo[1].strides = __pyx_pybuffernd_mask.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_mask.diminfo[1].shape = __pyx_pybuffernd_mask.rcbuffer->pybuffer.shape[1]; /* "pandas/src/generated.pyx":1599 * cdef Py_ssize_t i, j, N, K * cdef float64_t val * cdef int lim, fill_count = 0 # <<<<<<<<<<<<<< * * K, N = ( values).shape */ __pyx_v_fill_count = 0; /* "pandas/src/generated.pyx":1601 * cdef int lim, fill_count = 0 * * K, N = ( values).shape # <<<<<<<<<<<<<< * * # GH 2778 */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_values), __pyx_n_s__shape); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1601; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) { PyObject* sequence = __pyx_t_1; #if CYTHON_COMPILING_IN_CPYTHON Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1601; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1); } else { __pyx_t_2 = PyList_GET_ITEM(sequence, 0); __pyx_t_3 = PyList_GET_ITEM(sequence, 1); } __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); #else __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1601; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1601; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } else { Py_ssize_t index = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1601; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_5 = Py_TYPE(__pyx_t_4)->tp_iternext; index = 0; __pyx_t_2 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_2)) goto __pyx_L3_unpacking_failed; __Pyx_GOTREF(__pyx_t_2); index = 1; __pyx_t_3 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_3)) goto __pyx_L3_unpacking_failed; __Pyx_GOTREF(__pyx_t_3); if (__Pyx_IternextUnpackEndCheck(__pyx_t_5(__pyx_t_4), 2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1601; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 1601; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_L4_unpacking_done:; } __pyx_t_6 = __Pyx_PyIndex_AsSsize_t(__pyx_t_2); if (unlikely((__pyx_t_6 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1601; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_7 = __Pyx_PyIndex_AsSsize_t(__pyx_t_3); if (unlikely((__pyx_t_7 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1601; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_K = __pyx_t_6; __pyx_v_N = __pyx_t_7; /* "pandas/src/generated.pyx":1604 * * # GH 2778 * if N == 0: # <<<<<<<<<<<<<< * return * */ __pyx_t_8 = ((__pyx_v_N == 0) != 0); if (__pyx_t_8) { /* "pandas/src/generated.pyx":1605 * # GH 2778 * if N == 0: * return # <<<<<<<<<<<<<< * * if limit is None: */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; goto __pyx_L5; } __pyx_L5:; /* "pandas/src/generated.pyx":1607 * return * * if limit is None: # <<<<<<<<<<<<<< * lim = N * else: */ __pyx_t_8 = (__pyx_v_limit == Py_None); __pyx_t_9 = (__pyx_t_8 != 0); if (__pyx_t_9) { /* "pandas/src/generated.pyx":1608 * * if limit is None: * lim = N # <<<<<<<<<<<<<< * else: * if limit < 0: */ __pyx_v_lim = __pyx_v_N; goto __pyx_L6; } /*else*/ { /* "pandas/src/generated.pyx":1610 * lim = N * else: * if limit < 0: # <<<<<<<<<<<<<< * raise ValueError('Limit must be non-negative') * lim = limit */ __pyx_t_1 = PyObject_RichCompare(__pyx_v_limit, __pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1610; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1610; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_9) { /* "pandas/src/generated.pyx":1611 * else: * if limit < 0: * raise ValueError('Limit must be non-negative') # <<<<<<<<<<<<<< * lim = limit * */ __pyx_t_1 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_93), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1611; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 1611; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L7; } __pyx_L7:; /* "pandas/src/generated.pyx":1612 * if limit < 0: * raise ValueError('Limit must be non-negative') * lim = limit # <<<<<<<<<<<<<< * * for j in range(K): */ __pyx_t_10 = __Pyx_PyInt_AsInt(__pyx_v_limit); if (unlikely((__pyx_t_10 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1612; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_lim = __pyx_t_10; } __pyx_L6:; /* "pandas/src/generated.pyx":1614 * lim = limit * * for j in range(K): # <<<<<<<<<<<<<< * fill_count = 0 * val = values[j, N - 1] */ __pyx_t_7 = __pyx_v_K; for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_7; __pyx_t_6+=1) { __pyx_v_j = __pyx_t_6; /* "pandas/src/generated.pyx":1615 * * for j in range(K): * fill_count = 0 # <<<<<<<<<<<<<< * val = values[j, N - 1] * for i in range(N - 1, -1 , -1): */ __pyx_v_fill_count = 0; /* "pandas/src/generated.pyx":1616 * for j in range(K): * fill_count = 0 * val = values[j, N - 1] # <<<<<<<<<<<<<< * for i in range(N - 1, -1 , -1): * if mask[j, i]: */ __pyx_t_11 = __pyx_v_j; __pyx_t_12 = (__pyx_v_N - 1); __pyx_v_val = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_11, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_12, __pyx_pybuffernd_values.diminfo[1].strides)); /* "pandas/src/generated.pyx":1617 * fill_count = 0 * val = values[j, N - 1] * for i in range(N - 1, -1 , -1): # <<<<<<<<<<<<<< * if mask[j, i]: * if fill_count >= lim: */ for (__pyx_t_13 = (__pyx_v_N - 1); __pyx_t_13 > -1; __pyx_t_13-=1) { __pyx_v_i = __pyx_t_13; /* "pandas/src/generated.pyx":1618 * val = values[j, N - 1] * for i in range(N - 1, -1 , -1): * if mask[j, i]: # <<<<<<<<<<<<<< * if fill_count >= lim: * continue */ __pyx_t_14 = __pyx_v_j; __pyx_t_15 = __pyx_v_i; __pyx_t_9 = ((*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_mask.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_mask.diminfo[0].strides, __pyx_t_15, __pyx_pybuffernd_mask.diminfo[1].strides)) != 0); if (__pyx_t_9) { /* "pandas/src/generated.pyx":1619 * for i in range(N - 1, -1 , -1): * if mask[j, i]: * if fill_count >= lim: # <<<<<<<<<<<<<< * continue * fill_count += 1 */ __pyx_t_9 = ((__pyx_v_fill_count >= __pyx_v_lim) != 0); if (__pyx_t_9) { /* "pandas/src/generated.pyx":1620 * if mask[j, i]: * if fill_count >= lim: * continue # <<<<<<<<<<<<<< * fill_count += 1 * values[j, i] = val */ goto __pyx_L10_continue; goto __pyx_L13; } __pyx_L13:; /* "pandas/src/generated.pyx":1621 * if fill_count >= lim: * continue * fill_count += 1 # <<<<<<<<<<<<<< * values[j, i] = val * else: */ __pyx_v_fill_count = (__pyx_v_fill_count + 1); /* "pandas/src/generated.pyx":1622 * continue * fill_count += 1 * values[j, i] = val # <<<<<<<<<<<<<< * else: * fill_count = 0 */ __pyx_t_16 = __pyx_v_j; __pyx_t_17 = __pyx_v_i; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_17, __pyx_pybuffernd_values.diminfo[1].strides) = __pyx_v_val; goto __pyx_L12; } /*else*/ { /* "pandas/src/generated.pyx":1624 * values[j, i] = val * else: * fill_count = 0 # <<<<<<<<<<<<<< * val = values[j, i] * @cython.boundscheck(False) */ __pyx_v_fill_count = 0; /* "pandas/src/generated.pyx":1625 * else: * fill_count = 0 * val = values[j, i] # <<<<<<<<<<<<<< * @cython.boundscheck(False) * @cython.wraparound(False) */ __pyx_t_18 = __pyx_v_j; __pyx_t_19 = __pyx_v_i; __pyx_v_val = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_19, __pyx_pybuffernd_values.diminfo[1].strides)); } __pyx_L12:; __pyx_L10_continue:; } } __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_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_mask.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.backfill_2d_inplace_float64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_mask.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_177backfill_2d_inplace_float32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_177backfill_2d_inplace_float32 = {__Pyx_NAMESTR("backfill_2d_inplace_float32"), (PyCFunction)__pyx_pw_6pandas_5algos_177backfill_2d_inplace_float32, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_177backfill_2d_inplace_float32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_values = 0; PyArrayObject *__pyx_v_mask = 0; PyObject *__pyx_v_limit = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("backfill_2d_inplace_float32 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__values,&__pyx_n_s__mask,&__pyx_n_s__limit,0}; PyObject* values[3] = {0,0,0}; /* "pandas/src/generated.pyx":1630 * def backfill_2d_inplace_float32(ndarray[float32_t, ndim=2] values, * ndarray[uint8_t, ndim=2] mask, * limit=None): # <<<<<<<<<<<<<< * cdef Py_ssize_t i, j, N, K * cdef float32_t val */ values[2] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__values)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__mask)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("backfill_2d_inplace_float32", 0, 2, 3, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1628; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__limit); if (value) { values[2] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "backfill_2d_inplace_float32") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1628; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_values = ((PyArrayObject *)values[0]); __pyx_v_mask = ((PyArrayObject *)values[1]); __pyx_v_limit = values[2]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("backfill_2d_inplace_float32", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1628; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.backfill_2d_inplace_float32", __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_filename = __pyx_f[2]; __pyx_lineno = 1628; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_mask), __pyx_ptype_5numpy_ndarray, 1, "mask", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1629; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_176backfill_2d_inplace_float32(__pyx_self, __pyx_v_values, __pyx_v_mask, __pyx_v_limit); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":1628 * @cython.boundscheck(False) * @cython.wraparound(False) * def backfill_2d_inplace_float32(ndarray[float32_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[uint8_t, ndim=2] mask, * limit=None): */ static PyObject *__pyx_pf_6pandas_5algos_176backfill_2d_inplace_float32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_mask, PyObject *__pyx_v_limit) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_N; Py_ssize_t __pyx_v_K; __pyx_t_5numpy_float32_t __pyx_v_val; int __pyx_v_lim; int __pyx_v_fill_count; __Pyx_LocalBuf_ND __pyx_pybuffernd_mask; __Pyx_Buffer __pyx_pybuffer_mask; __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; PyObject *(*__pyx_t_5)(PyObject *); Py_ssize_t __pyx_t_6; Py_ssize_t __pyx_t_7; int __pyx_t_8; int __pyx_t_9; int __pyx_t_10; Py_ssize_t __pyx_t_11; Py_ssize_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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("backfill_2d_inplace_float32", 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_mask.pybuffer.buf = NULL; __pyx_pybuffer_mask.refcount = 0; __pyx_pybuffernd_mask.data = NULL; __pyx_pybuffernd_mask.rcbuffer = &__pyx_pybuffer_mask; { __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_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1628; __pyx_clineno = __LINE__; goto __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_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; 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, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1628; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; __pyx_pybuffernd_mask.diminfo[1].strides = __pyx_pybuffernd_mask.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_mask.diminfo[1].shape = __pyx_pybuffernd_mask.rcbuffer->pybuffer.shape[1]; /* "pandas/src/generated.pyx":1633 * cdef Py_ssize_t i, j, N, K * cdef float32_t val * cdef int lim, fill_count = 0 # <<<<<<<<<<<<<< * * K, N = ( values).shape */ __pyx_v_fill_count = 0; /* "pandas/src/generated.pyx":1635 * cdef int lim, fill_count = 0 * * K, N = ( values).shape # <<<<<<<<<<<<<< * * # GH 2778 */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_values), __pyx_n_s__shape); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1635; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) { PyObject* sequence = __pyx_t_1; #if CYTHON_COMPILING_IN_CPYTHON Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1635; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1); } else { __pyx_t_2 = PyList_GET_ITEM(sequence, 0); __pyx_t_3 = PyList_GET_ITEM(sequence, 1); } __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); #else __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1635; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1635; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } else { Py_ssize_t index = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1635; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_5 = Py_TYPE(__pyx_t_4)->tp_iternext; index = 0; __pyx_t_2 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_2)) goto __pyx_L3_unpacking_failed; __Pyx_GOTREF(__pyx_t_2); index = 1; __pyx_t_3 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_3)) goto __pyx_L3_unpacking_failed; __Pyx_GOTREF(__pyx_t_3); if (__Pyx_IternextUnpackEndCheck(__pyx_t_5(__pyx_t_4), 2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1635; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 1635; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_L4_unpacking_done:; } __pyx_t_6 = __Pyx_PyIndex_AsSsize_t(__pyx_t_2); if (unlikely((__pyx_t_6 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1635; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_7 = __Pyx_PyIndex_AsSsize_t(__pyx_t_3); if (unlikely((__pyx_t_7 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1635; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_K = __pyx_t_6; __pyx_v_N = __pyx_t_7; /* "pandas/src/generated.pyx":1638 * * # GH 2778 * if N == 0: # <<<<<<<<<<<<<< * return * */ __pyx_t_8 = ((__pyx_v_N == 0) != 0); if (__pyx_t_8) { /* "pandas/src/generated.pyx":1639 * # GH 2778 * if N == 0: * return # <<<<<<<<<<<<<< * * if limit is None: */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; goto __pyx_L5; } __pyx_L5:; /* "pandas/src/generated.pyx":1641 * return * * if limit is None: # <<<<<<<<<<<<<< * lim = N * else: */ __pyx_t_8 = (__pyx_v_limit == Py_None); __pyx_t_9 = (__pyx_t_8 != 0); if (__pyx_t_9) { /* "pandas/src/generated.pyx":1642 * * if limit is None: * lim = N # <<<<<<<<<<<<<< * else: * if limit < 0: */ __pyx_v_lim = __pyx_v_N; goto __pyx_L6; } /*else*/ { /* "pandas/src/generated.pyx":1644 * lim = N * else: * if limit < 0: # <<<<<<<<<<<<<< * raise ValueError('Limit must be non-negative') * lim = limit */ __pyx_t_1 = PyObject_RichCompare(__pyx_v_limit, __pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1644; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1644; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_9) { /* "pandas/src/generated.pyx":1645 * else: * if limit < 0: * raise ValueError('Limit must be non-negative') # <<<<<<<<<<<<<< * lim = limit * */ __pyx_t_1 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_94), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1645; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 1645; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L7; } __pyx_L7:; /* "pandas/src/generated.pyx":1646 * if limit < 0: * raise ValueError('Limit must be non-negative') * lim = limit # <<<<<<<<<<<<<< * * for j in range(K): */ __pyx_t_10 = __Pyx_PyInt_AsInt(__pyx_v_limit); if (unlikely((__pyx_t_10 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1646; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_lim = __pyx_t_10; } __pyx_L6:; /* "pandas/src/generated.pyx":1648 * lim = limit * * for j in range(K): # <<<<<<<<<<<<<< * fill_count = 0 * val = values[j, N - 1] */ __pyx_t_7 = __pyx_v_K; for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_7; __pyx_t_6+=1) { __pyx_v_j = __pyx_t_6; /* "pandas/src/generated.pyx":1649 * * for j in range(K): * fill_count = 0 # <<<<<<<<<<<<<< * val = values[j, N - 1] * for i in range(N - 1, -1 , -1): */ __pyx_v_fill_count = 0; /* "pandas/src/generated.pyx":1650 * for j in range(K): * fill_count = 0 * val = values[j, N - 1] # <<<<<<<<<<<<<< * for i in range(N - 1, -1 , -1): * if mask[j, i]: */ __pyx_t_11 = __pyx_v_j; __pyx_t_12 = (__pyx_v_N - 1); __pyx_v_val = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_11, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_12, __pyx_pybuffernd_values.diminfo[1].strides)); /* "pandas/src/generated.pyx":1651 * fill_count = 0 * val = values[j, N - 1] * for i in range(N - 1, -1 , -1): # <<<<<<<<<<<<<< * if mask[j, i]: * if fill_count >= lim: */ for (__pyx_t_13 = (__pyx_v_N - 1); __pyx_t_13 > -1; __pyx_t_13-=1) { __pyx_v_i = __pyx_t_13; /* "pandas/src/generated.pyx":1652 * val = values[j, N - 1] * for i in range(N - 1, -1 , -1): * if mask[j, i]: # <<<<<<<<<<<<<< * if fill_count >= lim: * continue */ __pyx_t_14 = __pyx_v_j; __pyx_t_15 = __pyx_v_i; __pyx_t_9 = ((*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_mask.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_mask.diminfo[0].strides, __pyx_t_15, __pyx_pybuffernd_mask.diminfo[1].strides)) != 0); if (__pyx_t_9) { /* "pandas/src/generated.pyx":1653 * for i in range(N - 1, -1 , -1): * if mask[j, i]: * if fill_count >= lim: # <<<<<<<<<<<<<< * continue * fill_count += 1 */ __pyx_t_9 = ((__pyx_v_fill_count >= __pyx_v_lim) != 0); if (__pyx_t_9) { /* "pandas/src/generated.pyx":1654 * if mask[j, i]: * if fill_count >= lim: * continue # <<<<<<<<<<<<<< * fill_count += 1 * values[j, i] = val */ goto __pyx_L10_continue; goto __pyx_L13; } __pyx_L13:; /* "pandas/src/generated.pyx":1655 * if fill_count >= lim: * continue * fill_count += 1 # <<<<<<<<<<<<<< * values[j, i] = val * else: */ __pyx_v_fill_count = (__pyx_v_fill_count + 1); /* "pandas/src/generated.pyx":1656 * continue * fill_count += 1 * values[j, i] = val # <<<<<<<<<<<<<< * else: * fill_count = 0 */ __pyx_t_16 = __pyx_v_j; __pyx_t_17 = __pyx_v_i; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_17, __pyx_pybuffernd_values.diminfo[1].strides) = __pyx_v_val; goto __pyx_L12; } /*else*/ { /* "pandas/src/generated.pyx":1658 * values[j, i] = val * else: * fill_count = 0 # <<<<<<<<<<<<<< * val = values[j, i] * @cython.boundscheck(False) */ __pyx_v_fill_count = 0; /* "pandas/src/generated.pyx":1659 * else: * fill_count = 0 * val = values[j, i] # <<<<<<<<<<<<<< * @cython.boundscheck(False) * @cython.wraparound(False) */ __pyx_t_18 = __pyx_v_j; __pyx_t_19 = __pyx_v_i; __pyx_v_val = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_19, __pyx_pybuffernd_values.diminfo[1].strides)); } __pyx_L12:; __pyx_L10_continue:; } } __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_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_mask.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.backfill_2d_inplace_float32", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_mask.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_179backfill_2d_inplace_object(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_179backfill_2d_inplace_object = {__Pyx_NAMESTR("backfill_2d_inplace_object"), (PyCFunction)__pyx_pw_6pandas_5algos_179backfill_2d_inplace_object, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_179backfill_2d_inplace_object(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_values = 0; PyArrayObject *__pyx_v_mask = 0; PyObject *__pyx_v_limit = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("backfill_2d_inplace_object (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__values,&__pyx_n_s__mask,&__pyx_n_s__limit,0}; PyObject* values[3] = {0,0,0}; /* "pandas/src/generated.pyx":1664 * def backfill_2d_inplace_object(ndarray[object, ndim=2] values, * ndarray[uint8_t, ndim=2] mask, * limit=None): # <<<<<<<<<<<<<< * cdef Py_ssize_t i, j, N, K * cdef object val */ values[2] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__values)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__mask)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("backfill_2d_inplace_object", 0, 2, 3, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1662; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__limit); if (value) { values[2] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "backfill_2d_inplace_object") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1662; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_values = ((PyArrayObject *)values[0]); __pyx_v_mask = ((PyArrayObject *)values[1]); __pyx_v_limit = values[2]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("backfill_2d_inplace_object", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1662; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.backfill_2d_inplace_object", __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_filename = __pyx_f[2]; __pyx_lineno = 1662; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_mask), __pyx_ptype_5numpy_ndarray, 1, "mask", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1663; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_178backfill_2d_inplace_object(__pyx_self, __pyx_v_values, __pyx_v_mask, __pyx_v_limit); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":1662 * @cython.boundscheck(False) * @cython.wraparound(False) * def backfill_2d_inplace_object(ndarray[object, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[uint8_t, ndim=2] mask, * limit=None): */ static PyObject *__pyx_pf_6pandas_5algos_178backfill_2d_inplace_object(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_mask, PyObject *__pyx_v_limit) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_N; Py_ssize_t __pyx_v_K; PyObject *__pyx_v_val = 0; int __pyx_v_lim; int __pyx_v_fill_count; __Pyx_LocalBuf_ND __pyx_pybuffernd_mask; __Pyx_Buffer __pyx_pybuffer_mask; __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; PyObject *(*__pyx_t_5)(PyObject *); Py_ssize_t __pyx_t_6; Py_ssize_t __pyx_t_7; int __pyx_t_8; int __pyx_t_9; int __pyx_t_10; Py_ssize_t __pyx_t_11; Py_ssize_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; PyObject **__pyx_t_18; Py_ssize_t __pyx_t_19; Py_ssize_t __pyx_t_20; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("backfill_2d_inplace_object", 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_mask.pybuffer.buf = NULL; __pyx_pybuffer_mask.refcount = 0; __pyx_pybuffernd_mask.data = NULL; __pyx_pybuffernd_mask.rcbuffer = &__pyx_pybuffer_mask; { __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| PyBUF_WRITABLE, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1662; __pyx_clineno = __LINE__; goto __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_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; 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, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1662; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; __pyx_pybuffernd_mask.diminfo[1].strides = __pyx_pybuffernd_mask.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_mask.diminfo[1].shape = __pyx_pybuffernd_mask.rcbuffer->pybuffer.shape[1]; /* "pandas/src/generated.pyx":1667 * cdef Py_ssize_t i, j, N, K * cdef object val * cdef int lim, fill_count = 0 # <<<<<<<<<<<<<< * * K, N = ( values).shape */ __pyx_v_fill_count = 0; /* "pandas/src/generated.pyx":1669 * cdef int lim, fill_count = 0 * * K, N = ( values).shape # <<<<<<<<<<<<<< * * # GH 2778 */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_values), __pyx_n_s__shape); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1669; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) { PyObject* sequence = __pyx_t_1; #if CYTHON_COMPILING_IN_CPYTHON Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1669; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1); } else { __pyx_t_2 = PyList_GET_ITEM(sequence, 0); __pyx_t_3 = PyList_GET_ITEM(sequence, 1); } __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); #else __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1669; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1669; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } else { Py_ssize_t index = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1669; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_5 = Py_TYPE(__pyx_t_4)->tp_iternext; index = 0; __pyx_t_2 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_2)) goto __pyx_L3_unpacking_failed; __Pyx_GOTREF(__pyx_t_2); index = 1; __pyx_t_3 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_3)) goto __pyx_L3_unpacking_failed; __Pyx_GOTREF(__pyx_t_3); if (__Pyx_IternextUnpackEndCheck(__pyx_t_5(__pyx_t_4), 2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1669; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 1669; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_L4_unpacking_done:; } __pyx_t_6 = __Pyx_PyIndex_AsSsize_t(__pyx_t_2); if (unlikely((__pyx_t_6 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1669; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_7 = __Pyx_PyIndex_AsSsize_t(__pyx_t_3); if (unlikely((__pyx_t_7 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1669; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_K = __pyx_t_6; __pyx_v_N = __pyx_t_7; /* "pandas/src/generated.pyx":1672 * * # GH 2778 * if N == 0: # <<<<<<<<<<<<<< * return * */ __pyx_t_8 = ((__pyx_v_N == 0) != 0); if (__pyx_t_8) { /* "pandas/src/generated.pyx":1673 * # GH 2778 * if N == 0: * return # <<<<<<<<<<<<<< * * if limit is None: */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; goto __pyx_L5; } __pyx_L5:; /* "pandas/src/generated.pyx":1675 * return * * if limit is None: # <<<<<<<<<<<<<< * lim = N * else: */ __pyx_t_8 = (__pyx_v_limit == Py_None); __pyx_t_9 = (__pyx_t_8 != 0); if (__pyx_t_9) { /* "pandas/src/generated.pyx":1676 * * if limit is None: * lim = N # <<<<<<<<<<<<<< * else: * if limit < 0: */ __pyx_v_lim = __pyx_v_N; goto __pyx_L6; } /*else*/ { /* "pandas/src/generated.pyx":1678 * lim = N * else: * if limit < 0: # <<<<<<<<<<<<<< * raise ValueError('Limit must be non-negative') * lim = limit */ __pyx_t_1 = PyObject_RichCompare(__pyx_v_limit, __pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1678; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1678; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_9) { /* "pandas/src/generated.pyx":1679 * else: * if limit < 0: * raise ValueError('Limit must be non-negative') # <<<<<<<<<<<<<< * lim = limit * */ __pyx_t_1 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_95), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1679; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 1679; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L7; } __pyx_L7:; /* "pandas/src/generated.pyx":1680 * if limit < 0: * raise ValueError('Limit must be non-negative') * lim = limit # <<<<<<<<<<<<<< * * for j in range(K): */ __pyx_t_10 = __Pyx_PyInt_AsInt(__pyx_v_limit); if (unlikely((__pyx_t_10 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1680; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_lim = __pyx_t_10; } __pyx_L6:; /* "pandas/src/generated.pyx":1682 * lim = limit * * for j in range(K): # <<<<<<<<<<<<<< * fill_count = 0 * val = values[j, N - 1] */ __pyx_t_7 = __pyx_v_K; for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_7; __pyx_t_6+=1) { __pyx_v_j = __pyx_t_6; /* "pandas/src/generated.pyx":1683 * * for j in range(K): * fill_count = 0 # <<<<<<<<<<<<<< * val = values[j, N - 1] * for i in range(N - 1, -1 , -1): */ __pyx_v_fill_count = 0; /* "pandas/src/generated.pyx":1684 * for j in range(K): * fill_count = 0 * val = values[j, N - 1] # <<<<<<<<<<<<<< * for i in range(N - 1, -1 , -1): * if mask[j, i]: */ __pyx_t_11 = __pyx_v_j; __pyx_t_12 = (__pyx_v_N - 1); __pyx_t_1 = (PyObject *) *__Pyx_BufPtrStrided2d(PyObject **, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_11, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_12, __pyx_pybuffernd_values.diminfo[1].strides); __Pyx_INCREF((PyObject*)__pyx_t_1); __Pyx_XDECREF_SET(__pyx_v_val, __pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/generated.pyx":1685 * fill_count = 0 * val = values[j, N - 1] * for i in range(N - 1, -1 , -1): # <<<<<<<<<<<<<< * if mask[j, i]: * if fill_count >= lim: */ for (__pyx_t_13 = (__pyx_v_N - 1); __pyx_t_13 > -1; __pyx_t_13-=1) { __pyx_v_i = __pyx_t_13; /* "pandas/src/generated.pyx":1686 * val = values[j, N - 1] * for i in range(N - 1, -1 , -1): * if mask[j, i]: # <<<<<<<<<<<<<< * if fill_count >= lim: * continue */ __pyx_t_14 = __pyx_v_j; __pyx_t_15 = __pyx_v_i; __pyx_t_9 = ((*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_mask.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_mask.diminfo[0].strides, __pyx_t_15, __pyx_pybuffernd_mask.diminfo[1].strides)) != 0); if (__pyx_t_9) { /* "pandas/src/generated.pyx":1687 * for i in range(N - 1, -1 , -1): * if mask[j, i]: * if fill_count >= lim: # <<<<<<<<<<<<<< * continue * fill_count += 1 */ __pyx_t_9 = ((__pyx_v_fill_count >= __pyx_v_lim) != 0); if (__pyx_t_9) { /* "pandas/src/generated.pyx":1688 * if mask[j, i]: * if fill_count >= lim: * continue # <<<<<<<<<<<<<< * fill_count += 1 * values[j, i] = val */ goto __pyx_L10_continue; goto __pyx_L13; } __pyx_L13:; /* "pandas/src/generated.pyx":1689 * if fill_count >= lim: * continue * fill_count += 1 # <<<<<<<<<<<<<< * values[j, i] = val * else: */ __pyx_v_fill_count = (__pyx_v_fill_count + 1); /* "pandas/src/generated.pyx":1690 * continue * fill_count += 1 * values[j, i] = val # <<<<<<<<<<<<<< * else: * fill_count = 0 */ __pyx_t_16 = __pyx_v_j; __pyx_t_17 = __pyx_v_i; __pyx_t_18 = __Pyx_BufPtrStrided2d(PyObject **, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_17, __pyx_pybuffernd_values.diminfo[1].strides); __Pyx_GOTREF(*__pyx_t_18); __Pyx_INCREF(__pyx_v_val); __Pyx_DECREF(*__pyx_t_18); *__pyx_t_18 = __pyx_v_val; __Pyx_GIVEREF(*__pyx_t_18); goto __pyx_L12; } /*else*/ { /* "pandas/src/generated.pyx":1692 * values[j, i] = val * else: * fill_count = 0 # <<<<<<<<<<<<<< * val = values[j, i] * @cython.boundscheck(False) */ __pyx_v_fill_count = 0; /* "pandas/src/generated.pyx":1693 * else: * fill_count = 0 * val = values[j, i] # <<<<<<<<<<<<<< * @cython.boundscheck(False) * @cython.wraparound(False) */ __pyx_t_19 = __pyx_v_j; __pyx_t_20 = __pyx_v_i; __pyx_t_1 = (PyObject *) *__Pyx_BufPtrStrided2d(PyObject **, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_20, __pyx_pybuffernd_values.diminfo[1].strides); __Pyx_INCREF((PyObject*)__pyx_t_1); __Pyx_DECREF_SET(__pyx_v_val, __pyx_t_1); __pyx_t_1 = 0; } __pyx_L12:; __pyx_L10_continue:; } } __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_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_mask.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.backfill_2d_inplace_object", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_mask.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF(__pyx_v_val); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_181backfill_2d_inplace_int32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_181backfill_2d_inplace_int32 = {__Pyx_NAMESTR("backfill_2d_inplace_int32"), (PyCFunction)__pyx_pw_6pandas_5algos_181backfill_2d_inplace_int32, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_181backfill_2d_inplace_int32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_values = 0; PyArrayObject *__pyx_v_mask = 0; PyObject *__pyx_v_limit = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("backfill_2d_inplace_int32 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__values,&__pyx_n_s__mask,&__pyx_n_s__limit,0}; PyObject* values[3] = {0,0,0}; /* "pandas/src/generated.pyx":1698 * def backfill_2d_inplace_int32(ndarray[int32_t, ndim=2] values, * ndarray[uint8_t, ndim=2] mask, * limit=None): # <<<<<<<<<<<<<< * cdef Py_ssize_t i, j, N, K * cdef int32_t val */ values[2] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__values)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__mask)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("backfill_2d_inplace_int32", 0, 2, 3, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1696; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__limit); if (value) { values[2] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "backfill_2d_inplace_int32") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1696; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_values = ((PyArrayObject *)values[0]); __pyx_v_mask = ((PyArrayObject *)values[1]); __pyx_v_limit = values[2]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("backfill_2d_inplace_int32", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1696; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.backfill_2d_inplace_int32", __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_filename = __pyx_f[2]; __pyx_lineno = 1696; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_mask), __pyx_ptype_5numpy_ndarray, 1, "mask", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1697; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_180backfill_2d_inplace_int32(__pyx_self, __pyx_v_values, __pyx_v_mask, __pyx_v_limit); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":1696 * @cython.boundscheck(False) * @cython.wraparound(False) * def backfill_2d_inplace_int32(ndarray[int32_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[uint8_t, ndim=2] mask, * limit=None): */ static PyObject *__pyx_pf_6pandas_5algos_180backfill_2d_inplace_int32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_mask, PyObject *__pyx_v_limit) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_N; Py_ssize_t __pyx_v_K; __pyx_t_5numpy_int32_t __pyx_v_val; int __pyx_v_lim; int __pyx_v_fill_count; __Pyx_LocalBuf_ND __pyx_pybuffernd_mask; __Pyx_Buffer __pyx_pybuffer_mask; __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; PyObject *(*__pyx_t_5)(PyObject *); Py_ssize_t __pyx_t_6; Py_ssize_t __pyx_t_7; int __pyx_t_8; int __pyx_t_9; int __pyx_t_10; Py_ssize_t __pyx_t_11; Py_ssize_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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("backfill_2d_inplace_int32", 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_mask.pybuffer.buf = NULL; __pyx_pybuffer_mask.refcount = 0; __pyx_pybuffernd_mask.data = NULL; __pyx_pybuffernd_mask.rcbuffer = &__pyx_pybuffer_mask; { __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_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1696; __pyx_clineno = __LINE__; goto __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_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; 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, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1696; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; __pyx_pybuffernd_mask.diminfo[1].strides = __pyx_pybuffernd_mask.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_mask.diminfo[1].shape = __pyx_pybuffernd_mask.rcbuffer->pybuffer.shape[1]; /* "pandas/src/generated.pyx":1701 * cdef Py_ssize_t i, j, N, K * cdef int32_t val * cdef int lim, fill_count = 0 # <<<<<<<<<<<<<< * * K, N = ( values).shape */ __pyx_v_fill_count = 0; /* "pandas/src/generated.pyx":1703 * cdef int lim, fill_count = 0 * * K, N = ( values).shape # <<<<<<<<<<<<<< * * # GH 2778 */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_values), __pyx_n_s__shape); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1703; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) { PyObject* sequence = __pyx_t_1; #if CYTHON_COMPILING_IN_CPYTHON Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1703; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1); } else { __pyx_t_2 = PyList_GET_ITEM(sequence, 0); __pyx_t_3 = PyList_GET_ITEM(sequence, 1); } __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); #else __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1703; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1703; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } else { Py_ssize_t index = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1703; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_5 = Py_TYPE(__pyx_t_4)->tp_iternext; index = 0; __pyx_t_2 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_2)) goto __pyx_L3_unpacking_failed; __Pyx_GOTREF(__pyx_t_2); index = 1; __pyx_t_3 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_3)) goto __pyx_L3_unpacking_failed; __Pyx_GOTREF(__pyx_t_3); if (__Pyx_IternextUnpackEndCheck(__pyx_t_5(__pyx_t_4), 2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1703; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 1703; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_L4_unpacking_done:; } __pyx_t_6 = __Pyx_PyIndex_AsSsize_t(__pyx_t_2); if (unlikely((__pyx_t_6 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1703; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_7 = __Pyx_PyIndex_AsSsize_t(__pyx_t_3); if (unlikely((__pyx_t_7 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1703; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_K = __pyx_t_6; __pyx_v_N = __pyx_t_7; /* "pandas/src/generated.pyx":1706 * * # GH 2778 * if N == 0: # <<<<<<<<<<<<<< * return * */ __pyx_t_8 = ((__pyx_v_N == 0) != 0); if (__pyx_t_8) { /* "pandas/src/generated.pyx":1707 * # GH 2778 * if N == 0: * return # <<<<<<<<<<<<<< * * if limit is None: */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; goto __pyx_L5; } __pyx_L5:; /* "pandas/src/generated.pyx":1709 * return * * if limit is None: # <<<<<<<<<<<<<< * lim = N * else: */ __pyx_t_8 = (__pyx_v_limit == Py_None); __pyx_t_9 = (__pyx_t_8 != 0); if (__pyx_t_9) { /* "pandas/src/generated.pyx":1710 * * if limit is None: * lim = N # <<<<<<<<<<<<<< * else: * if limit < 0: */ __pyx_v_lim = __pyx_v_N; goto __pyx_L6; } /*else*/ { /* "pandas/src/generated.pyx":1712 * lim = N * else: * if limit < 0: # <<<<<<<<<<<<<< * raise ValueError('Limit must be non-negative') * lim = limit */ __pyx_t_1 = PyObject_RichCompare(__pyx_v_limit, __pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1712; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1712; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_9) { /* "pandas/src/generated.pyx":1713 * else: * if limit < 0: * raise ValueError('Limit must be non-negative') # <<<<<<<<<<<<<< * lim = limit * */ __pyx_t_1 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_96), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1713; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 1713; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L7; } __pyx_L7:; /* "pandas/src/generated.pyx":1714 * if limit < 0: * raise ValueError('Limit must be non-negative') * lim = limit # <<<<<<<<<<<<<< * * for j in range(K): */ __pyx_t_10 = __Pyx_PyInt_AsInt(__pyx_v_limit); if (unlikely((__pyx_t_10 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1714; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_lim = __pyx_t_10; } __pyx_L6:; /* "pandas/src/generated.pyx":1716 * lim = limit * * for j in range(K): # <<<<<<<<<<<<<< * fill_count = 0 * val = values[j, N - 1] */ __pyx_t_7 = __pyx_v_K; for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_7; __pyx_t_6+=1) { __pyx_v_j = __pyx_t_6; /* "pandas/src/generated.pyx":1717 * * for j in range(K): * fill_count = 0 # <<<<<<<<<<<<<< * val = values[j, N - 1] * for i in range(N - 1, -1 , -1): */ __pyx_v_fill_count = 0; /* "pandas/src/generated.pyx":1718 * for j in range(K): * fill_count = 0 * val = values[j, N - 1] # <<<<<<<<<<<<<< * for i in range(N - 1, -1 , -1): * if mask[j, i]: */ __pyx_t_11 = __pyx_v_j; __pyx_t_12 = (__pyx_v_N - 1); __pyx_v_val = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_11, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_12, __pyx_pybuffernd_values.diminfo[1].strides)); /* "pandas/src/generated.pyx":1719 * fill_count = 0 * val = values[j, N - 1] * for i in range(N - 1, -1 , -1): # <<<<<<<<<<<<<< * if mask[j, i]: * if fill_count >= lim: */ for (__pyx_t_13 = (__pyx_v_N - 1); __pyx_t_13 > -1; __pyx_t_13-=1) { __pyx_v_i = __pyx_t_13; /* "pandas/src/generated.pyx":1720 * val = values[j, N - 1] * for i in range(N - 1, -1 , -1): * if mask[j, i]: # <<<<<<<<<<<<<< * if fill_count >= lim: * continue */ __pyx_t_14 = __pyx_v_j; __pyx_t_15 = __pyx_v_i; __pyx_t_9 = ((*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_mask.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_mask.diminfo[0].strides, __pyx_t_15, __pyx_pybuffernd_mask.diminfo[1].strides)) != 0); if (__pyx_t_9) { /* "pandas/src/generated.pyx":1721 * for i in range(N - 1, -1 , -1): * if mask[j, i]: * if fill_count >= lim: # <<<<<<<<<<<<<< * continue * fill_count += 1 */ __pyx_t_9 = ((__pyx_v_fill_count >= __pyx_v_lim) != 0); if (__pyx_t_9) { /* "pandas/src/generated.pyx":1722 * if mask[j, i]: * if fill_count >= lim: * continue # <<<<<<<<<<<<<< * fill_count += 1 * values[j, i] = val */ goto __pyx_L10_continue; goto __pyx_L13; } __pyx_L13:; /* "pandas/src/generated.pyx":1723 * if fill_count >= lim: * continue * fill_count += 1 # <<<<<<<<<<<<<< * values[j, i] = val * else: */ __pyx_v_fill_count = (__pyx_v_fill_count + 1); /* "pandas/src/generated.pyx":1724 * continue * fill_count += 1 * values[j, i] = val # <<<<<<<<<<<<<< * else: * fill_count = 0 */ __pyx_t_16 = __pyx_v_j; __pyx_t_17 = __pyx_v_i; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_17, __pyx_pybuffernd_values.diminfo[1].strides) = __pyx_v_val; goto __pyx_L12; } /*else*/ { /* "pandas/src/generated.pyx":1726 * values[j, i] = val * else: * fill_count = 0 # <<<<<<<<<<<<<< * val = values[j, i] * @cython.boundscheck(False) */ __pyx_v_fill_count = 0; /* "pandas/src/generated.pyx":1727 * else: * fill_count = 0 * val = values[j, i] # <<<<<<<<<<<<<< * @cython.boundscheck(False) * @cython.wraparound(False) */ __pyx_t_18 = __pyx_v_j; __pyx_t_19 = __pyx_v_i; __pyx_v_val = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_19, __pyx_pybuffernd_values.diminfo[1].strides)); } __pyx_L12:; __pyx_L10_continue:; } } __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_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_mask.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.backfill_2d_inplace_int32", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_mask.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_183backfill_2d_inplace_int64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_183backfill_2d_inplace_int64 = {__Pyx_NAMESTR("backfill_2d_inplace_int64"), (PyCFunction)__pyx_pw_6pandas_5algos_183backfill_2d_inplace_int64, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_183backfill_2d_inplace_int64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_values = 0; PyArrayObject *__pyx_v_mask = 0; PyObject *__pyx_v_limit = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("backfill_2d_inplace_int64 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__values,&__pyx_n_s__mask,&__pyx_n_s__limit,0}; PyObject* values[3] = {0,0,0}; /* "pandas/src/generated.pyx":1732 * def backfill_2d_inplace_int64(ndarray[int64_t, ndim=2] values, * ndarray[uint8_t, ndim=2] mask, * limit=None): # <<<<<<<<<<<<<< * cdef Py_ssize_t i, j, N, K * cdef int64_t val */ values[2] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__values)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__mask)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("backfill_2d_inplace_int64", 0, 2, 3, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1730; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__limit); if (value) { values[2] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "backfill_2d_inplace_int64") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1730; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_values = ((PyArrayObject *)values[0]); __pyx_v_mask = ((PyArrayObject *)values[1]); __pyx_v_limit = values[2]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("backfill_2d_inplace_int64", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1730; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.backfill_2d_inplace_int64", __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_filename = __pyx_f[2]; __pyx_lineno = 1730; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_mask), __pyx_ptype_5numpy_ndarray, 1, "mask", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1731; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_182backfill_2d_inplace_int64(__pyx_self, __pyx_v_values, __pyx_v_mask, __pyx_v_limit); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":1730 * @cython.boundscheck(False) * @cython.wraparound(False) * def backfill_2d_inplace_int64(ndarray[int64_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[uint8_t, ndim=2] mask, * limit=None): */ static PyObject *__pyx_pf_6pandas_5algos_182backfill_2d_inplace_int64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_mask, PyObject *__pyx_v_limit) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_N; Py_ssize_t __pyx_v_K; __pyx_t_5numpy_int64_t __pyx_v_val; int __pyx_v_lim; int __pyx_v_fill_count; __Pyx_LocalBuf_ND __pyx_pybuffernd_mask; __Pyx_Buffer __pyx_pybuffer_mask; __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; PyObject *(*__pyx_t_5)(PyObject *); Py_ssize_t __pyx_t_6; Py_ssize_t __pyx_t_7; int __pyx_t_8; int __pyx_t_9; int __pyx_t_10; Py_ssize_t __pyx_t_11; Py_ssize_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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("backfill_2d_inplace_int64", 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_mask.pybuffer.buf = NULL; __pyx_pybuffer_mask.refcount = 0; __pyx_pybuffernd_mask.data = NULL; __pyx_pybuffernd_mask.rcbuffer = &__pyx_pybuffer_mask; { __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_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1730; __pyx_clineno = __LINE__; goto __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_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; 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, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1730; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; __pyx_pybuffernd_mask.diminfo[1].strides = __pyx_pybuffernd_mask.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_mask.diminfo[1].shape = __pyx_pybuffernd_mask.rcbuffer->pybuffer.shape[1]; /* "pandas/src/generated.pyx":1735 * cdef Py_ssize_t i, j, N, K * cdef int64_t val * cdef int lim, fill_count = 0 # <<<<<<<<<<<<<< * * K, N = ( values).shape */ __pyx_v_fill_count = 0; /* "pandas/src/generated.pyx":1737 * cdef int lim, fill_count = 0 * * K, N = ( values).shape # <<<<<<<<<<<<<< * * # GH 2778 */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_values), __pyx_n_s__shape); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1737; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) { PyObject* sequence = __pyx_t_1; #if CYTHON_COMPILING_IN_CPYTHON Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1737; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1); } else { __pyx_t_2 = PyList_GET_ITEM(sequence, 0); __pyx_t_3 = PyList_GET_ITEM(sequence, 1); } __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); #else __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1737; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1737; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } else { Py_ssize_t index = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1737; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_5 = Py_TYPE(__pyx_t_4)->tp_iternext; index = 0; __pyx_t_2 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_2)) goto __pyx_L3_unpacking_failed; __Pyx_GOTREF(__pyx_t_2); index = 1; __pyx_t_3 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_3)) goto __pyx_L3_unpacking_failed; __Pyx_GOTREF(__pyx_t_3); if (__Pyx_IternextUnpackEndCheck(__pyx_t_5(__pyx_t_4), 2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1737; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 1737; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_L4_unpacking_done:; } __pyx_t_6 = __Pyx_PyIndex_AsSsize_t(__pyx_t_2); if (unlikely((__pyx_t_6 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1737; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_7 = __Pyx_PyIndex_AsSsize_t(__pyx_t_3); if (unlikely((__pyx_t_7 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1737; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_K = __pyx_t_6; __pyx_v_N = __pyx_t_7; /* "pandas/src/generated.pyx":1740 * * # GH 2778 * if N == 0: # <<<<<<<<<<<<<< * return * */ __pyx_t_8 = ((__pyx_v_N == 0) != 0); if (__pyx_t_8) { /* "pandas/src/generated.pyx":1741 * # GH 2778 * if N == 0: * return # <<<<<<<<<<<<<< * * if limit is None: */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; goto __pyx_L5; } __pyx_L5:; /* "pandas/src/generated.pyx":1743 * return * * if limit is None: # <<<<<<<<<<<<<< * lim = N * else: */ __pyx_t_8 = (__pyx_v_limit == Py_None); __pyx_t_9 = (__pyx_t_8 != 0); if (__pyx_t_9) { /* "pandas/src/generated.pyx":1744 * * if limit is None: * lim = N # <<<<<<<<<<<<<< * else: * if limit < 0: */ __pyx_v_lim = __pyx_v_N; goto __pyx_L6; } /*else*/ { /* "pandas/src/generated.pyx":1746 * lim = N * else: * if limit < 0: # <<<<<<<<<<<<<< * raise ValueError('Limit must be non-negative') * lim = limit */ __pyx_t_1 = PyObject_RichCompare(__pyx_v_limit, __pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1746; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1746; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_9) { /* "pandas/src/generated.pyx":1747 * else: * if limit < 0: * raise ValueError('Limit must be non-negative') # <<<<<<<<<<<<<< * lim = limit * */ __pyx_t_1 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_97), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1747; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 1747; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L7; } __pyx_L7:; /* "pandas/src/generated.pyx":1748 * if limit < 0: * raise ValueError('Limit must be non-negative') * lim = limit # <<<<<<<<<<<<<< * * for j in range(K): */ __pyx_t_10 = __Pyx_PyInt_AsInt(__pyx_v_limit); if (unlikely((__pyx_t_10 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1748; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_lim = __pyx_t_10; } __pyx_L6:; /* "pandas/src/generated.pyx":1750 * lim = limit * * for j in range(K): # <<<<<<<<<<<<<< * fill_count = 0 * val = values[j, N - 1] */ __pyx_t_7 = __pyx_v_K; for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_7; __pyx_t_6+=1) { __pyx_v_j = __pyx_t_6; /* "pandas/src/generated.pyx":1751 * * for j in range(K): * fill_count = 0 # <<<<<<<<<<<<<< * val = values[j, N - 1] * for i in range(N - 1, -1 , -1): */ __pyx_v_fill_count = 0; /* "pandas/src/generated.pyx":1752 * for j in range(K): * fill_count = 0 * val = values[j, N - 1] # <<<<<<<<<<<<<< * for i in range(N - 1, -1 , -1): * if mask[j, i]: */ __pyx_t_11 = __pyx_v_j; __pyx_t_12 = (__pyx_v_N - 1); __pyx_v_val = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_11, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_12, __pyx_pybuffernd_values.diminfo[1].strides)); /* "pandas/src/generated.pyx":1753 * fill_count = 0 * val = values[j, N - 1] * for i in range(N - 1, -1 , -1): # <<<<<<<<<<<<<< * if mask[j, i]: * if fill_count >= lim: */ for (__pyx_t_13 = (__pyx_v_N - 1); __pyx_t_13 > -1; __pyx_t_13-=1) { __pyx_v_i = __pyx_t_13; /* "pandas/src/generated.pyx":1754 * val = values[j, N - 1] * for i in range(N - 1, -1 , -1): * if mask[j, i]: # <<<<<<<<<<<<<< * if fill_count >= lim: * continue */ __pyx_t_14 = __pyx_v_j; __pyx_t_15 = __pyx_v_i; __pyx_t_9 = ((*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_mask.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_mask.diminfo[0].strides, __pyx_t_15, __pyx_pybuffernd_mask.diminfo[1].strides)) != 0); if (__pyx_t_9) { /* "pandas/src/generated.pyx":1755 * for i in range(N - 1, -1 , -1): * if mask[j, i]: * if fill_count >= lim: # <<<<<<<<<<<<<< * continue * fill_count += 1 */ __pyx_t_9 = ((__pyx_v_fill_count >= __pyx_v_lim) != 0); if (__pyx_t_9) { /* "pandas/src/generated.pyx":1756 * if mask[j, i]: * if fill_count >= lim: * continue # <<<<<<<<<<<<<< * fill_count += 1 * values[j, i] = val */ goto __pyx_L10_continue; goto __pyx_L13; } __pyx_L13:; /* "pandas/src/generated.pyx":1757 * if fill_count >= lim: * continue * fill_count += 1 # <<<<<<<<<<<<<< * values[j, i] = val * else: */ __pyx_v_fill_count = (__pyx_v_fill_count + 1); /* "pandas/src/generated.pyx":1758 * continue * fill_count += 1 * values[j, i] = val # <<<<<<<<<<<<<< * else: * fill_count = 0 */ __pyx_t_16 = __pyx_v_j; __pyx_t_17 = __pyx_v_i; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_17, __pyx_pybuffernd_values.diminfo[1].strides) = __pyx_v_val; goto __pyx_L12; } /*else*/ { /* "pandas/src/generated.pyx":1760 * values[j, i] = val * else: * fill_count = 0 # <<<<<<<<<<<<<< * val = values[j, i] * @cython.boundscheck(False) */ __pyx_v_fill_count = 0; /* "pandas/src/generated.pyx":1761 * else: * fill_count = 0 * val = values[j, i] # <<<<<<<<<<<<<< * @cython.boundscheck(False) * @cython.wraparound(False) */ __pyx_t_18 = __pyx_v_j; __pyx_t_19 = __pyx_v_i; __pyx_v_val = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_19, __pyx_pybuffernd_values.diminfo[1].strides)); } __pyx_L12:; __pyx_L10_continue:; } } __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_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_mask.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.backfill_2d_inplace_int64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_mask.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_185backfill_2d_inplace_bool(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_185backfill_2d_inplace_bool = {__Pyx_NAMESTR("backfill_2d_inplace_bool"), (PyCFunction)__pyx_pw_6pandas_5algos_185backfill_2d_inplace_bool, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_185backfill_2d_inplace_bool(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_values = 0; PyArrayObject *__pyx_v_mask = 0; PyObject *__pyx_v_limit = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("backfill_2d_inplace_bool (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__values,&__pyx_n_s__mask,&__pyx_n_s__limit,0}; PyObject* values[3] = {0,0,0}; /* "pandas/src/generated.pyx":1766 * def backfill_2d_inplace_bool(ndarray[uint8_t, ndim=2] values, * ndarray[uint8_t, ndim=2] mask, * limit=None): # <<<<<<<<<<<<<< * cdef Py_ssize_t i, j, N, K * cdef uint8_t val */ values[2] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__values)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__mask)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("backfill_2d_inplace_bool", 0, 2, 3, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1764; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__limit); if (value) { values[2] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "backfill_2d_inplace_bool") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1764; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_values = ((PyArrayObject *)values[0]); __pyx_v_mask = ((PyArrayObject *)values[1]); __pyx_v_limit = values[2]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("backfill_2d_inplace_bool", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1764; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.backfill_2d_inplace_bool", __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_filename = __pyx_f[2]; __pyx_lineno = 1764; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_mask), __pyx_ptype_5numpy_ndarray, 1, "mask", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1765; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_184backfill_2d_inplace_bool(__pyx_self, __pyx_v_values, __pyx_v_mask, __pyx_v_limit); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":1764 * @cython.boundscheck(False) * @cython.wraparound(False) * def backfill_2d_inplace_bool(ndarray[uint8_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[uint8_t, ndim=2] mask, * limit=None): */ static PyObject *__pyx_pf_6pandas_5algos_184backfill_2d_inplace_bool(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_mask, PyObject *__pyx_v_limit) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_N; Py_ssize_t __pyx_v_K; __pyx_t_5numpy_uint8_t __pyx_v_val; int __pyx_v_lim; int __pyx_v_fill_count; __Pyx_LocalBuf_ND __pyx_pybuffernd_mask; __Pyx_Buffer __pyx_pybuffer_mask; __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; PyObject *(*__pyx_t_5)(PyObject *); Py_ssize_t __pyx_t_6; Py_ssize_t __pyx_t_7; int __pyx_t_8; int __pyx_t_9; int __pyx_t_10; Py_ssize_t __pyx_t_11; Py_ssize_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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("backfill_2d_inplace_bool", 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_mask.pybuffer.buf = NULL; __pyx_pybuffer_mask.refcount = 0; __pyx_pybuffernd_mask.data = NULL; __pyx_pybuffernd_mask.rcbuffer = &__pyx_pybuffer_mask; { __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_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1764; __pyx_clineno = __LINE__; goto __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_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; 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, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1764; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; __pyx_pybuffernd_mask.diminfo[1].strides = __pyx_pybuffernd_mask.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_mask.diminfo[1].shape = __pyx_pybuffernd_mask.rcbuffer->pybuffer.shape[1]; /* "pandas/src/generated.pyx":1769 * cdef Py_ssize_t i, j, N, K * cdef uint8_t val * cdef int lim, fill_count = 0 # <<<<<<<<<<<<<< * * K, N = ( values).shape */ __pyx_v_fill_count = 0; /* "pandas/src/generated.pyx":1771 * cdef int lim, fill_count = 0 * * K, N = ( values).shape # <<<<<<<<<<<<<< * * # GH 2778 */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_values), __pyx_n_s__shape); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1771; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) { PyObject* sequence = __pyx_t_1; #if CYTHON_COMPILING_IN_CPYTHON Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1771; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1); } else { __pyx_t_2 = PyList_GET_ITEM(sequence, 0); __pyx_t_3 = PyList_GET_ITEM(sequence, 1); } __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); #else __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1771; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1771; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } else { Py_ssize_t index = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1771; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_5 = Py_TYPE(__pyx_t_4)->tp_iternext; index = 0; __pyx_t_2 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_2)) goto __pyx_L3_unpacking_failed; __Pyx_GOTREF(__pyx_t_2); index = 1; __pyx_t_3 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_3)) goto __pyx_L3_unpacking_failed; __Pyx_GOTREF(__pyx_t_3); if (__Pyx_IternextUnpackEndCheck(__pyx_t_5(__pyx_t_4), 2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1771; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 1771; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_L4_unpacking_done:; } __pyx_t_6 = __Pyx_PyIndex_AsSsize_t(__pyx_t_2); if (unlikely((__pyx_t_6 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1771; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_7 = __Pyx_PyIndex_AsSsize_t(__pyx_t_3); if (unlikely((__pyx_t_7 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1771; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_K = __pyx_t_6; __pyx_v_N = __pyx_t_7; /* "pandas/src/generated.pyx":1774 * * # GH 2778 * if N == 0: # <<<<<<<<<<<<<< * return * */ __pyx_t_8 = ((__pyx_v_N == 0) != 0); if (__pyx_t_8) { /* "pandas/src/generated.pyx":1775 * # GH 2778 * if N == 0: * return # <<<<<<<<<<<<<< * * if limit is None: */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; goto __pyx_L5; } __pyx_L5:; /* "pandas/src/generated.pyx":1777 * return * * if limit is None: # <<<<<<<<<<<<<< * lim = N * else: */ __pyx_t_8 = (__pyx_v_limit == Py_None); __pyx_t_9 = (__pyx_t_8 != 0); if (__pyx_t_9) { /* "pandas/src/generated.pyx":1778 * * if limit is None: * lim = N # <<<<<<<<<<<<<< * else: * if limit < 0: */ __pyx_v_lim = __pyx_v_N; goto __pyx_L6; } /*else*/ { /* "pandas/src/generated.pyx":1780 * lim = N * else: * if limit < 0: # <<<<<<<<<<<<<< * raise ValueError('Limit must be non-negative') * lim = limit */ __pyx_t_1 = PyObject_RichCompare(__pyx_v_limit, __pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1780; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1780; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_9) { /* "pandas/src/generated.pyx":1781 * else: * if limit < 0: * raise ValueError('Limit must be non-negative') # <<<<<<<<<<<<<< * lim = limit * */ __pyx_t_1 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_98), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1781; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 1781; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L7; } __pyx_L7:; /* "pandas/src/generated.pyx":1782 * if limit < 0: * raise ValueError('Limit must be non-negative') * lim = limit # <<<<<<<<<<<<<< * * for j in range(K): */ __pyx_t_10 = __Pyx_PyInt_AsInt(__pyx_v_limit); if (unlikely((__pyx_t_10 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1782; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_lim = __pyx_t_10; } __pyx_L6:; /* "pandas/src/generated.pyx":1784 * lim = limit * * for j in range(K): # <<<<<<<<<<<<<< * fill_count = 0 * val = values[j, N - 1] */ __pyx_t_7 = __pyx_v_K; for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_7; __pyx_t_6+=1) { __pyx_v_j = __pyx_t_6; /* "pandas/src/generated.pyx":1785 * * for j in range(K): * fill_count = 0 # <<<<<<<<<<<<<< * val = values[j, N - 1] * for i in range(N - 1, -1 , -1): */ __pyx_v_fill_count = 0; /* "pandas/src/generated.pyx":1786 * for j in range(K): * fill_count = 0 * val = values[j, N - 1] # <<<<<<<<<<<<<< * for i in range(N - 1, -1 , -1): * if mask[j, i]: */ __pyx_t_11 = __pyx_v_j; __pyx_t_12 = (__pyx_v_N - 1); __pyx_v_val = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_11, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_12, __pyx_pybuffernd_values.diminfo[1].strides)); /* "pandas/src/generated.pyx":1787 * fill_count = 0 * val = values[j, N - 1] * for i in range(N - 1, -1 , -1): # <<<<<<<<<<<<<< * if mask[j, i]: * if fill_count >= lim: */ for (__pyx_t_13 = (__pyx_v_N - 1); __pyx_t_13 > -1; __pyx_t_13-=1) { __pyx_v_i = __pyx_t_13; /* "pandas/src/generated.pyx":1788 * val = values[j, N - 1] * for i in range(N - 1, -1 , -1): * if mask[j, i]: # <<<<<<<<<<<<<< * if fill_count >= lim: * continue */ __pyx_t_14 = __pyx_v_j; __pyx_t_15 = __pyx_v_i; __pyx_t_9 = ((*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_mask.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_mask.diminfo[0].strides, __pyx_t_15, __pyx_pybuffernd_mask.diminfo[1].strides)) != 0); if (__pyx_t_9) { /* "pandas/src/generated.pyx":1789 * for i in range(N - 1, -1 , -1): * if mask[j, i]: * if fill_count >= lim: # <<<<<<<<<<<<<< * continue * fill_count += 1 */ __pyx_t_9 = ((__pyx_v_fill_count >= __pyx_v_lim) != 0); if (__pyx_t_9) { /* "pandas/src/generated.pyx":1790 * if mask[j, i]: * if fill_count >= lim: * continue # <<<<<<<<<<<<<< * fill_count += 1 * values[j, i] = val */ goto __pyx_L10_continue; goto __pyx_L13; } __pyx_L13:; /* "pandas/src/generated.pyx":1791 * if fill_count >= lim: * continue * fill_count += 1 # <<<<<<<<<<<<<< * values[j, i] = val * else: */ __pyx_v_fill_count = (__pyx_v_fill_count + 1); /* "pandas/src/generated.pyx":1792 * continue * fill_count += 1 * values[j, i] = val # <<<<<<<<<<<<<< * else: * fill_count = 0 */ __pyx_t_16 = __pyx_v_j; __pyx_t_17 = __pyx_v_i; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_17, __pyx_pybuffernd_values.diminfo[1].strides) = __pyx_v_val; goto __pyx_L12; } /*else*/ { /* "pandas/src/generated.pyx":1794 * values[j, i] = val * else: * fill_count = 0 # <<<<<<<<<<<<<< * val = values[j, i] * */ __pyx_v_fill_count = 0; /* "pandas/src/generated.pyx":1795 * else: * fill_count = 0 * val = values[j, i] # <<<<<<<<<<<<<< * * @cython.boundscheck(False) */ __pyx_t_18 = __pyx_v_j; __pyx_t_19 = __pyx_v_i; __pyx_v_val = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_19, __pyx_pybuffernd_values.diminfo[1].strides)); } __pyx_L12:; __pyx_L10_continue:; } } __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_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_mask.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.backfill_2d_inplace_bool", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_mask.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_187is_monotonic_float64(PyObject *__pyx_self, PyObject *__pyx_v_arr); /*proto*/ static char __pyx_doc_6pandas_5algos_186is_monotonic_float64[] = "\n Returns\n -------\n is_monotonic, is_unique\n "; static PyMethodDef __pyx_mdef_6pandas_5algos_187is_monotonic_float64 = {__Pyx_NAMESTR("is_monotonic_float64"), (PyCFunction)__pyx_pw_6pandas_5algos_187is_monotonic_float64, METH_O, __Pyx_DOCSTR(__pyx_doc_6pandas_5algos_186is_monotonic_float64)}; static PyObject *__pyx_pw_6pandas_5algos_187is_monotonic_float64(PyObject *__pyx_self, PyObject *__pyx_v_arr) { CYTHON_UNUSED int __pyx_lineno = 0; CYTHON_UNUSED const char *__pyx_filename = NULL; CYTHON_UNUSED int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("is_monotonic_float64 (wrapper)", 0); if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_arr), __pyx_ptype_5numpy_ndarray, 1, "arr", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1799; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_186is_monotonic_float64(__pyx_self, ((PyArrayObject *)__pyx_v_arr)); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":1799 * @cython.boundscheck(False) * @cython.wraparound(False) * def is_monotonic_float64(ndarray[float64_t] arr): # <<<<<<<<<<<<<< * ''' * Returns */ static PyObject *__pyx_pf_6pandas_5algos_186is_monotonic_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_arr) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_n; __pyx_t_5numpy_float64_t __pyx_v_prev; __pyx_t_5numpy_float64_t __pyx_v_cur; int __pyx_v_is_unique; __Pyx_LocalBuf_ND __pyx_pybuffernd_arr; __Pyx_Buffer __pyx_pybuffer_arr; 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; long __pyx_t_6; Py_ssize_t __pyx_t_7; Py_ssize_t __pyx_t_8; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("is_monotonic_float64", 0); __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_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1799; __pyx_clineno = __LINE__; goto __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/src/generated.pyx":1808 * Py_ssize_t i, n * float64_t prev, cur * bint is_unique = 1 # <<<<<<<<<<<<<< * * n = len(arr) */ __pyx_v_is_unique = 1; /* "pandas/src/generated.pyx":1810 * bint is_unique = 1 * * n = len(arr) # <<<<<<<<<<<<<< * * if n < 2: */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_arr)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1810; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/src/generated.pyx":1812 * n = len(arr) * * if n < 2: # <<<<<<<<<<<<<< * return True, True * */ __pyx_t_2 = ((__pyx_v_n < 2) != 0); if (__pyx_t_2) { /* "pandas/src/generated.pyx":1813 * * if n < 2: * return True, True # <<<<<<<<<<<<<< * * prev = arr[0] */ __Pyx_XDECREF(__pyx_r); __pyx_t_3 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1813; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1813; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1813; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_3 = 0; __pyx_t_4 = 0; __pyx_r = ((PyObject *)__pyx_t_5); __pyx_t_5 = 0; goto __pyx_L0; goto __pyx_L3; } __pyx_L3:; /* "pandas/src/generated.pyx":1815 * return True, True * * prev = arr[0] # <<<<<<<<<<<<<< * for i in range(1, n): * cur = arr[i] */ __pyx_t_6 = 0; __pyx_v_prev = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_arr.rcbuffer->pybuffer.buf, __pyx_t_6, __pyx_pybuffernd_arr.diminfo[0].strides)); /* "pandas/src/generated.pyx":1816 * * prev = arr[0] * for i in range(1, n): # <<<<<<<<<<<<<< * cur = arr[i] * if cur < prev: */ __pyx_t_1 = __pyx_v_n; for (__pyx_t_7 = 1; __pyx_t_7 < __pyx_t_1; __pyx_t_7+=1) { __pyx_v_i = __pyx_t_7; /* "pandas/src/generated.pyx":1817 * prev = arr[0] * for i in range(1, n): * cur = arr[i] # <<<<<<<<<<<<<< * if cur < prev: * return False, None */ __pyx_t_8 = __pyx_v_i; __pyx_v_cur = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_arr.rcbuffer->pybuffer.buf, __pyx_t_8, __pyx_pybuffernd_arr.diminfo[0].strides)); /* "pandas/src/generated.pyx":1818 * for i in range(1, n): * cur = arr[i] * if cur < prev: # <<<<<<<<<<<<<< * return False, None * elif cur == prev: */ __pyx_t_2 = ((__pyx_v_cur < __pyx_v_prev) != 0); if (__pyx_t_2) { /* "pandas/src/generated.pyx":1819 * cur = arr[i] * if cur < prev: * return False, None # <<<<<<<<<<<<<< * elif cur == prev: * is_unique = 0 */ __Pyx_XDECREF(__pyx_r); __pyx_t_5 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1819; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1819; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __Pyx_INCREF(Py_None); PyTuple_SET_ITEM(__pyx_t_4, 1, Py_None); __Pyx_GIVEREF(Py_None); __pyx_t_5 = 0; __pyx_r = ((PyObject *)__pyx_t_4); __pyx_t_4 = 0; goto __pyx_L0; goto __pyx_L6; } /* "pandas/src/generated.pyx":1820 * if cur < prev: * return False, None * elif cur == prev: # <<<<<<<<<<<<<< * is_unique = 0 * prev = cur */ __pyx_t_2 = ((__pyx_v_cur == __pyx_v_prev) != 0); if (__pyx_t_2) { /* "pandas/src/generated.pyx":1821 * return False, None * elif cur == prev: * is_unique = 0 # <<<<<<<<<<<<<< * prev = cur * return True, is_unique */ __pyx_v_is_unique = 0; goto __pyx_L6; } __pyx_L6:; /* "pandas/src/generated.pyx":1822 * elif cur == prev: * is_unique = 0 * prev = cur # <<<<<<<<<<<<<< * return True, is_unique * @cython.boundscheck(False) */ __pyx_v_prev = __pyx_v_cur; } /* "pandas/src/generated.pyx":1823 * is_unique = 0 * prev = cur * return True, is_unique # <<<<<<<<<<<<<< * @cython.boundscheck(False) * @cython.wraparound(False) */ __Pyx_XDECREF(__pyx_r); __pyx_t_4 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1823; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyBool_FromLong(__pyx_v_is_unique); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1823; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1823; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __pyx_t_4 = 0; __pyx_t_5 = 0; __pyx_r = ((PyObject *)__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_arr.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.is_monotonic_float64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_arr.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_189is_monotonic_float32(PyObject *__pyx_self, PyObject *__pyx_v_arr); /*proto*/ static char __pyx_doc_6pandas_5algos_188is_monotonic_float32[] = "\n Returns\n -------\n is_monotonic, is_unique\n "; static PyMethodDef __pyx_mdef_6pandas_5algos_189is_monotonic_float32 = {__Pyx_NAMESTR("is_monotonic_float32"), (PyCFunction)__pyx_pw_6pandas_5algos_189is_monotonic_float32, METH_O, __Pyx_DOCSTR(__pyx_doc_6pandas_5algos_188is_monotonic_float32)}; static PyObject *__pyx_pw_6pandas_5algos_189is_monotonic_float32(PyObject *__pyx_self, PyObject *__pyx_v_arr) { CYTHON_UNUSED int __pyx_lineno = 0; CYTHON_UNUSED const char *__pyx_filename = NULL; CYTHON_UNUSED int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("is_monotonic_float32 (wrapper)", 0); if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_arr), __pyx_ptype_5numpy_ndarray, 1, "arr", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1826; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_188is_monotonic_float32(__pyx_self, ((PyArrayObject *)__pyx_v_arr)); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":1826 * @cython.boundscheck(False) * @cython.wraparound(False) * def is_monotonic_float32(ndarray[float32_t] arr): # <<<<<<<<<<<<<< * ''' * Returns */ static PyObject *__pyx_pf_6pandas_5algos_188is_monotonic_float32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_arr) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_n; __pyx_t_5numpy_float32_t __pyx_v_prev; __pyx_t_5numpy_float32_t __pyx_v_cur; int __pyx_v_is_unique; __Pyx_LocalBuf_ND __pyx_pybuffernd_arr; __Pyx_Buffer __pyx_pybuffer_arr; 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; long __pyx_t_6; Py_ssize_t __pyx_t_7; Py_ssize_t __pyx_t_8; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("is_monotonic_float32", 0); __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_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1826; __pyx_clineno = __LINE__; goto __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/src/generated.pyx":1835 * Py_ssize_t i, n * float32_t prev, cur * bint is_unique = 1 # <<<<<<<<<<<<<< * * n = len(arr) */ __pyx_v_is_unique = 1; /* "pandas/src/generated.pyx":1837 * bint is_unique = 1 * * n = len(arr) # <<<<<<<<<<<<<< * * if n < 2: */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_arr)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1837; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/src/generated.pyx":1839 * n = len(arr) * * if n < 2: # <<<<<<<<<<<<<< * return True, True * */ __pyx_t_2 = ((__pyx_v_n < 2) != 0); if (__pyx_t_2) { /* "pandas/src/generated.pyx":1840 * * if n < 2: * return True, True # <<<<<<<<<<<<<< * * prev = arr[0] */ __Pyx_XDECREF(__pyx_r); __pyx_t_3 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1840; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1840; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1840; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_3 = 0; __pyx_t_4 = 0; __pyx_r = ((PyObject *)__pyx_t_5); __pyx_t_5 = 0; goto __pyx_L0; goto __pyx_L3; } __pyx_L3:; /* "pandas/src/generated.pyx":1842 * return True, True * * prev = arr[0] # <<<<<<<<<<<<<< * for i in range(1, n): * cur = arr[i] */ __pyx_t_6 = 0; __pyx_v_prev = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_arr.rcbuffer->pybuffer.buf, __pyx_t_6, __pyx_pybuffernd_arr.diminfo[0].strides)); /* "pandas/src/generated.pyx":1843 * * prev = arr[0] * for i in range(1, n): # <<<<<<<<<<<<<< * cur = arr[i] * if cur < prev: */ __pyx_t_1 = __pyx_v_n; for (__pyx_t_7 = 1; __pyx_t_7 < __pyx_t_1; __pyx_t_7+=1) { __pyx_v_i = __pyx_t_7; /* "pandas/src/generated.pyx":1844 * prev = arr[0] * for i in range(1, n): * cur = arr[i] # <<<<<<<<<<<<<< * if cur < prev: * return False, None */ __pyx_t_8 = __pyx_v_i; __pyx_v_cur = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_arr.rcbuffer->pybuffer.buf, __pyx_t_8, __pyx_pybuffernd_arr.diminfo[0].strides)); /* "pandas/src/generated.pyx":1845 * for i in range(1, n): * cur = arr[i] * if cur < prev: # <<<<<<<<<<<<<< * return False, None * elif cur == prev: */ __pyx_t_2 = ((__pyx_v_cur < __pyx_v_prev) != 0); if (__pyx_t_2) { /* "pandas/src/generated.pyx":1846 * cur = arr[i] * if cur < prev: * return False, None # <<<<<<<<<<<<<< * elif cur == prev: * is_unique = 0 */ __Pyx_XDECREF(__pyx_r); __pyx_t_5 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1846; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1846; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __Pyx_INCREF(Py_None); PyTuple_SET_ITEM(__pyx_t_4, 1, Py_None); __Pyx_GIVEREF(Py_None); __pyx_t_5 = 0; __pyx_r = ((PyObject *)__pyx_t_4); __pyx_t_4 = 0; goto __pyx_L0; goto __pyx_L6; } /* "pandas/src/generated.pyx":1847 * if cur < prev: * return False, None * elif cur == prev: # <<<<<<<<<<<<<< * is_unique = 0 * prev = cur */ __pyx_t_2 = ((__pyx_v_cur == __pyx_v_prev) != 0); if (__pyx_t_2) { /* "pandas/src/generated.pyx":1848 * return False, None * elif cur == prev: * is_unique = 0 # <<<<<<<<<<<<<< * prev = cur * return True, is_unique */ __pyx_v_is_unique = 0; goto __pyx_L6; } __pyx_L6:; /* "pandas/src/generated.pyx":1849 * elif cur == prev: * is_unique = 0 * prev = cur # <<<<<<<<<<<<<< * return True, is_unique * @cython.boundscheck(False) */ __pyx_v_prev = __pyx_v_cur; } /* "pandas/src/generated.pyx":1850 * is_unique = 0 * prev = cur * return True, is_unique # <<<<<<<<<<<<<< * @cython.boundscheck(False) * @cython.wraparound(False) */ __Pyx_XDECREF(__pyx_r); __pyx_t_4 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1850; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyBool_FromLong(__pyx_v_is_unique); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1850; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1850; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __pyx_t_4 = 0; __pyx_t_5 = 0; __pyx_r = ((PyObject *)__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_arr.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.is_monotonic_float32", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_arr.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_191is_monotonic_object(PyObject *__pyx_self, PyObject *__pyx_v_arr); /*proto*/ static char __pyx_doc_6pandas_5algos_190is_monotonic_object[] = "\n Returns\n -------\n is_monotonic, is_unique\n "; static PyMethodDef __pyx_mdef_6pandas_5algos_191is_monotonic_object = {__Pyx_NAMESTR("is_monotonic_object"), (PyCFunction)__pyx_pw_6pandas_5algos_191is_monotonic_object, METH_O, __Pyx_DOCSTR(__pyx_doc_6pandas_5algos_190is_monotonic_object)}; static PyObject *__pyx_pw_6pandas_5algos_191is_monotonic_object(PyObject *__pyx_self, PyObject *__pyx_v_arr) { CYTHON_UNUSED int __pyx_lineno = 0; CYTHON_UNUSED const char *__pyx_filename = NULL; CYTHON_UNUSED int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("is_monotonic_object (wrapper)", 0); if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_arr), __pyx_ptype_5numpy_ndarray, 1, "arr", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1853; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_190is_monotonic_object(__pyx_self, ((PyArrayObject *)__pyx_v_arr)); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":1853 * @cython.boundscheck(False) * @cython.wraparound(False) * def is_monotonic_object(ndarray[object] arr): # <<<<<<<<<<<<<< * ''' * Returns */ static PyObject *__pyx_pf_6pandas_5algos_190is_monotonic_object(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_arr) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_n; PyObject *__pyx_v_prev = 0; PyObject *__pyx_v_cur = 0; int __pyx_v_is_unique; __Pyx_LocalBuf_ND __pyx_pybuffernd_arr; __Pyx_Buffer __pyx_pybuffer_arr; 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; long __pyx_t_6; Py_ssize_t __pyx_t_7; Py_ssize_t __pyx_t_8; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("is_monotonic_object", 0); __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_filename = __pyx_f[2]; __pyx_lineno = 1853; __pyx_clineno = __LINE__; goto __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/src/generated.pyx":1862 * Py_ssize_t i, n * object prev, cur * bint is_unique = 1 # <<<<<<<<<<<<<< * * n = len(arr) */ __pyx_v_is_unique = 1; /* "pandas/src/generated.pyx":1864 * bint is_unique = 1 * * n = len(arr) # <<<<<<<<<<<<<< * * if n < 2: */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_arr)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1864; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/src/generated.pyx":1866 * n = len(arr) * * if n < 2: # <<<<<<<<<<<<<< * return True, True * */ __pyx_t_2 = ((__pyx_v_n < 2) != 0); if (__pyx_t_2) { /* "pandas/src/generated.pyx":1867 * * if n < 2: * return True, True # <<<<<<<<<<<<<< * * prev = arr[0] */ __Pyx_XDECREF(__pyx_r); __pyx_t_3 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1867; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1867; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1867; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_3 = 0; __pyx_t_4 = 0; __pyx_r = ((PyObject *)__pyx_t_5); __pyx_t_5 = 0; goto __pyx_L0; goto __pyx_L3; } __pyx_L3:; /* "pandas/src/generated.pyx":1869 * return True, True * * prev = arr[0] # <<<<<<<<<<<<<< * for i in range(1, n): * cur = arr[i] */ __pyx_t_6 = 0; __pyx_t_5 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_arr.rcbuffer->pybuffer.buf, __pyx_t_6, __pyx_pybuffernd_arr.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_5); __pyx_v_prev = __pyx_t_5; __pyx_t_5 = 0; /* "pandas/src/generated.pyx":1870 * * prev = arr[0] * for i in range(1, n): # <<<<<<<<<<<<<< * cur = arr[i] * if cur < prev: */ __pyx_t_1 = __pyx_v_n; for (__pyx_t_7 = 1; __pyx_t_7 < __pyx_t_1; __pyx_t_7+=1) { __pyx_v_i = __pyx_t_7; /* "pandas/src/generated.pyx":1871 * prev = arr[0] * for i in range(1, n): * cur = arr[i] # <<<<<<<<<<<<<< * if cur < prev: * return False, None */ __pyx_t_8 = __pyx_v_i; __pyx_t_5 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_arr.rcbuffer->pybuffer.buf, __pyx_t_8, __pyx_pybuffernd_arr.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_5); __Pyx_XDECREF_SET(__pyx_v_cur, __pyx_t_5); __pyx_t_5 = 0; /* "pandas/src/generated.pyx":1872 * for i in range(1, n): * cur = arr[i] * if cur < prev: # <<<<<<<<<<<<<< * return False, None * elif cur == prev: */ __pyx_t_5 = PyObject_RichCompare(__pyx_v_cur, __pyx_v_prev, Py_LT); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1872; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1872; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_2) { /* "pandas/src/generated.pyx":1873 * cur = arr[i] * if cur < prev: * return False, None # <<<<<<<<<<<<<< * elif cur == prev: * is_unique = 0 */ __Pyx_XDECREF(__pyx_r); __pyx_t_5 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1873; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1873; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __Pyx_INCREF(Py_None); PyTuple_SET_ITEM(__pyx_t_4, 1, Py_None); __Pyx_GIVEREF(Py_None); __pyx_t_5 = 0; __pyx_r = ((PyObject *)__pyx_t_4); __pyx_t_4 = 0; goto __pyx_L0; goto __pyx_L6; } /* "pandas/src/generated.pyx":1874 * if cur < prev: * return False, None * elif cur == prev: # <<<<<<<<<<<<<< * is_unique = 0 * prev = cur */ __pyx_t_4 = PyObject_RichCompare(__pyx_v_cur, __pyx_v_prev, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1874; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1874; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_2) { /* "pandas/src/generated.pyx":1875 * return False, None * elif cur == prev: * is_unique = 0 # <<<<<<<<<<<<<< * prev = cur * return True, is_unique */ __pyx_v_is_unique = 0; goto __pyx_L6; } __pyx_L6:; /* "pandas/src/generated.pyx":1876 * elif cur == prev: * is_unique = 0 * prev = cur # <<<<<<<<<<<<<< * return True, is_unique * @cython.boundscheck(False) */ __Pyx_INCREF(__pyx_v_cur); __Pyx_DECREF_SET(__pyx_v_prev, __pyx_v_cur); } /* "pandas/src/generated.pyx":1877 * is_unique = 0 * prev = cur * return True, is_unique # <<<<<<<<<<<<<< * @cython.boundscheck(False) * @cython.wraparound(False) */ __Pyx_XDECREF(__pyx_r); __pyx_t_4 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1877; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyBool_FromLong(__pyx_v_is_unique); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1877; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1877; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __pyx_t_4 = 0; __pyx_t_5 = 0; __pyx_r = ((PyObject *)__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_arr.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.is_monotonic_object", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_arr.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF(__pyx_v_prev); __Pyx_XDECREF(__pyx_v_cur); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_193is_monotonic_int32(PyObject *__pyx_self, PyObject *__pyx_v_arr); /*proto*/ static char __pyx_doc_6pandas_5algos_192is_monotonic_int32[] = "\n Returns\n -------\n is_monotonic, is_unique\n "; static PyMethodDef __pyx_mdef_6pandas_5algos_193is_monotonic_int32 = {__Pyx_NAMESTR("is_monotonic_int32"), (PyCFunction)__pyx_pw_6pandas_5algos_193is_monotonic_int32, METH_O, __Pyx_DOCSTR(__pyx_doc_6pandas_5algos_192is_monotonic_int32)}; static PyObject *__pyx_pw_6pandas_5algos_193is_monotonic_int32(PyObject *__pyx_self, PyObject *__pyx_v_arr) { CYTHON_UNUSED int __pyx_lineno = 0; CYTHON_UNUSED const char *__pyx_filename = NULL; CYTHON_UNUSED int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("is_monotonic_int32 (wrapper)", 0); if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_arr), __pyx_ptype_5numpy_ndarray, 1, "arr", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1880; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_192is_monotonic_int32(__pyx_self, ((PyArrayObject *)__pyx_v_arr)); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":1880 * @cython.boundscheck(False) * @cython.wraparound(False) * def is_monotonic_int32(ndarray[int32_t] arr): # <<<<<<<<<<<<<< * ''' * Returns */ static PyObject *__pyx_pf_6pandas_5algos_192is_monotonic_int32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_arr) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_n; __pyx_t_5numpy_int32_t __pyx_v_prev; __pyx_t_5numpy_int32_t __pyx_v_cur; int __pyx_v_is_unique; __Pyx_LocalBuf_ND __pyx_pybuffernd_arr; __Pyx_Buffer __pyx_pybuffer_arr; 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; long __pyx_t_6; Py_ssize_t __pyx_t_7; Py_ssize_t __pyx_t_8; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("is_monotonic_int32", 0); __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_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1880; __pyx_clineno = __LINE__; goto __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/src/generated.pyx":1889 * Py_ssize_t i, n * int32_t prev, cur * bint is_unique = 1 # <<<<<<<<<<<<<< * * n = len(arr) */ __pyx_v_is_unique = 1; /* "pandas/src/generated.pyx":1891 * bint is_unique = 1 * * n = len(arr) # <<<<<<<<<<<<<< * * if n < 2: */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_arr)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1891; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/src/generated.pyx":1893 * n = len(arr) * * if n < 2: # <<<<<<<<<<<<<< * return True, True * */ __pyx_t_2 = ((__pyx_v_n < 2) != 0); if (__pyx_t_2) { /* "pandas/src/generated.pyx":1894 * * if n < 2: * return True, True # <<<<<<<<<<<<<< * * prev = arr[0] */ __Pyx_XDECREF(__pyx_r); __pyx_t_3 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1894; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1894; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1894; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_3 = 0; __pyx_t_4 = 0; __pyx_r = ((PyObject *)__pyx_t_5); __pyx_t_5 = 0; goto __pyx_L0; goto __pyx_L3; } __pyx_L3:; /* "pandas/src/generated.pyx":1896 * return True, True * * prev = arr[0] # <<<<<<<<<<<<<< * for i in range(1, n): * cur = arr[i] */ __pyx_t_6 = 0; __pyx_v_prev = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_arr.rcbuffer->pybuffer.buf, __pyx_t_6, __pyx_pybuffernd_arr.diminfo[0].strides)); /* "pandas/src/generated.pyx":1897 * * prev = arr[0] * for i in range(1, n): # <<<<<<<<<<<<<< * cur = arr[i] * if cur < prev: */ __pyx_t_1 = __pyx_v_n; for (__pyx_t_7 = 1; __pyx_t_7 < __pyx_t_1; __pyx_t_7+=1) { __pyx_v_i = __pyx_t_7; /* "pandas/src/generated.pyx":1898 * prev = arr[0] * for i in range(1, n): * cur = arr[i] # <<<<<<<<<<<<<< * if cur < prev: * return False, None */ __pyx_t_8 = __pyx_v_i; __pyx_v_cur = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_arr.rcbuffer->pybuffer.buf, __pyx_t_8, __pyx_pybuffernd_arr.diminfo[0].strides)); /* "pandas/src/generated.pyx":1899 * for i in range(1, n): * cur = arr[i] * if cur < prev: # <<<<<<<<<<<<<< * return False, None * elif cur == prev: */ __pyx_t_2 = ((__pyx_v_cur < __pyx_v_prev) != 0); if (__pyx_t_2) { /* "pandas/src/generated.pyx":1900 * cur = arr[i] * if cur < prev: * return False, None # <<<<<<<<<<<<<< * elif cur == prev: * is_unique = 0 */ __Pyx_XDECREF(__pyx_r); __pyx_t_5 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1900; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1900; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __Pyx_INCREF(Py_None); PyTuple_SET_ITEM(__pyx_t_4, 1, Py_None); __Pyx_GIVEREF(Py_None); __pyx_t_5 = 0; __pyx_r = ((PyObject *)__pyx_t_4); __pyx_t_4 = 0; goto __pyx_L0; goto __pyx_L6; } /* "pandas/src/generated.pyx":1901 * if cur < prev: * return False, None * elif cur == prev: # <<<<<<<<<<<<<< * is_unique = 0 * prev = cur */ __pyx_t_2 = ((__pyx_v_cur == __pyx_v_prev) != 0); if (__pyx_t_2) { /* "pandas/src/generated.pyx":1902 * return False, None * elif cur == prev: * is_unique = 0 # <<<<<<<<<<<<<< * prev = cur * return True, is_unique */ __pyx_v_is_unique = 0; goto __pyx_L6; } __pyx_L6:; /* "pandas/src/generated.pyx":1903 * elif cur == prev: * is_unique = 0 * prev = cur # <<<<<<<<<<<<<< * return True, is_unique * @cython.boundscheck(False) */ __pyx_v_prev = __pyx_v_cur; } /* "pandas/src/generated.pyx":1904 * is_unique = 0 * prev = cur * return True, is_unique # <<<<<<<<<<<<<< * @cython.boundscheck(False) * @cython.wraparound(False) */ __Pyx_XDECREF(__pyx_r); __pyx_t_4 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1904; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyBool_FromLong(__pyx_v_is_unique); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1904; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1904; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __pyx_t_4 = 0; __pyx_t_5 = 0; __pyx_r = ((PyObject *)__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_arr.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.is_monotonic_int32", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_arr.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_195is_monotonic_int64(PyObject *__pyx_self, PyObject *__pyx_v_arr); /*proto*/ static char __pyx_doc_6pandas_5algos_194is_monotonic_int64[] = "\n Returns\n -------\n is_monotonic, is_unique\n "; static PyMethodDef __pyx_mdef_6pandas_5algos_195is_monotonic_int64 = {__Pyx_NAMESTR("is_monotonic_int64"), (PyCFunction)__pyx_pw_6pandas_5algos_195is_monotonic_int64, METH_O, __Pyx_DOCSTR(__pyx_doc_6pandas_5algos_194is_monotonic_int64)}; static PyObject *__pyx_pw_6pandas_5algos_195is_monotonic_int64(PyObject *__pyx_self, PyObject *__pyx_v_arr) { CYTHON_UNUSED int __pyx_lineno = 0; CYTHON_UNUSED const char *__pyx_filename = NULL; CYTHON_UNUSED int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("is_monotonic_int64 (wrapper)", 0); if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_arr), __pyx_ptype_5numpy_ndarray, 1, "arr", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1907; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_194is_monotonic_int64(__pyx_self, ((PyArrayObject *)__pyx_v_arr)); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":1907 * @cython.boundscheck(False) * @cython.wraparound(False) * def is_monotonic_int64(ndarray[int64_t] arr): # <<<<<<<<<<<<<< * ''' * Returns */ static PyObject *__pyx_pf_6pandas_5algos_194is_monotonic_int64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_arr) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_n; __pyx_t_5numpy_int64_t __pyx_v_prev; __pyx_t_5numpy_int64_t __pyx_v_cur; int __pyx_v_is_unique; __Pyx_LocalBuf_ND __pyx_pybuffernd_arr; __Pyx_Buffer __pyx_pybuffer_arr; 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; long __pyx_t_6; Py_ssize_t __pyx_t_7; Py_ssize_t __pyx_t_8; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("is_monotonic_int64", 0); __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_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1907; __pyx_clineno = __LINE__; goto __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/src/generated.pyx":1916 * Py_ssize_t i, n * int64_t prev, cur * bint is_unique = 1 # <<<<<<<<<<<<<< * * n = len(arr) */ __pyx_v_is_unique = 1; /* "pandas/src/generated.pyx":1918 * bint is_unique = 1 * * n = len(arr) # <<<<<<<<<<<<<< * * if n < 2: */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_arr)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1918; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/src/generated.pyx":1920 * n = len(arr) * * if n < 2: # <<<<<<<<<<<<<< * return True, True * */ __pyx_t_2 = ((__pyx_v_n < 2) != 0); if (__pyx_t_2) { /* "pandas/src/generated.pyx":1921 * * if n < 2: * return True, True # <<<<<<<<<<<<<< * * prev = arr[0] */ __Pyx_XDECREF(__pyx_r); __pyx_t_3 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1921; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1921; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1921; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_3 = 0; __pyx_t_4 = 0; __pyx_r = ((PyObject *)__pyx_t_5); __pyx_t_5 = 0; goto __pyx_L0; goto __pyx_L3; } __pyx_L3:; /* "pandas/src/generated.pyx":1923 * return True, True * * prev = arr[0] # <<<<<<<<<<<<<< * for i in range(1, n): * cur = arr[i] */ __pyx_t_6 = 0; __pyx_v_prev = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_arr.rcbuffer->pybuffer.buf, __pyx_t_6, __pyx_pybuffernd_arr.diminfo[0].strides)); /* "pandas/src/generated.pyx":1924 * * prev = arr[0] * for i in range(1, n): # <<<<<<<<<<<<<< * cur = arr[i] * if cur < prev: */ __pyx_t_1 = __pyx_v_n; for (__pyx_t_7 = 1; __pyx_t_7 < __pyx_t_1; __pyx_t_7+=1) { __pyx_v_i = __pyx_t_7; /* "pandas/src/generated.pyx":1925 * prev = arr[0] * for i in range(1, n): * cur = arr[i] # <<<<<<<<<<<<<< * if cur < prev: * return False, None */ __pyx_t_8 = __pyx_v_i; __pyx_v_cur = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_arr.rcbuffer->pybuffer.buf, __pyx_t_8, __pyx_pybuffernd_arr.diminfo[0].strides)); /* "pandas/src/generated.pyx":1926 * for i in range(1, n): * cur = arr[i] * if cur < prev: # <<<<<<<<<<<<<< * return False, None * elif cur == prev: */ __pyx_t_2 = ((__pyx_v_cur < __pyx_v_prev) != 0); if (__pyx_t_2) { /* "pandas/src/generated.pyx":1927 * cur = arr[i] * if cur < prev: * return False, None # <<<<<<<<<<<<<< * elif cur == prev: * is_unique = 0 */ __Pyx_XDECREF(__pyx_r); __pyx_t_5 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1927; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1927; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __Pyx_INCREF(Py_None); PyTuple_SET_ITEM(__pyx_t_4, 1, Py_None); __Pyx_GIVEREF(Py_None); __pyx_t_5 = 0; __pyx_r = ((PyObject *)__pyx_t_4); __pyx_t_4 = 0; goto __pyx_L0; goto __pyx_L6; } /* "pandas/src/generated.pyx":1928 * if cur < prev: * return False, None * elif cur == prev: # <<<<<<<<<<<<<< * is_unique = 0 * prev = cur */ __pyx_t_2 = ((__pyx_v_cur == __pyx_v_prev) != 0); if (__pyx_t_2) { /* "pandas/src/generated.pyx":1929 * return False, None * elif cur == prev: * is_unique = 0 # <<<<<<<<<<<<<< * prev = cur * return True, is_unique */ __pyx_v_is_unique = 0; goto __pyx_L6; } __pyx_L6:; /* "pandas/src/generated.pyx":1930 * elif cur == prev: * is_unique = 0 * prev = cur # <<<<<<<<<<<<<< * return True, is_unique * @cython.boundscheck(False) */ __pyx_v_prev = __pyx_v_cur; } /* "pandas/src/generated.pyx":1931 * is_unique = 0 * prev = cur * return True, is_unique # <<<<<<<<<<<<<< * @cython.boundscheck(False) * @cython.wraparound(False) */ __Pyx_XDECREF(__pyx_r); __pyx_t_4 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1931; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyBool_FromLong(__pyx_v_is_unique); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1931; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1931; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __pyx_t_4 = 0; __pyx_t_5 = 0; __pyx_r = ((PyObject *)__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_arr.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.is_monotonic_int64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_arr.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_197is_monotonic_bool(PyObject *__pyx_self, PyObject *__pyx_v_arr); /*proto*/ static char __pyx_doc_6pandas_5algos_196is_monotonic_bool[] = "\n Returns\n -------\n is_monotonic, is_unique\n "; static PyMethodDef __pyx_mdef_6pandas_5algos_197is_monotonic_bool = {__Pyx_NAMESTR("is_monotonic_bool"), (PyCFunction)__pyx_pw_6pandas_5algos_197is_monotonic_bool, METH_O, __Pyx_DOCSTR(__pyx_doc_6pandas_5algos_196is_monotonic_bool)}; static PyObject *__pyx_pw_6pandas_5algos_197is_monotonic_bool(PyObject *__pyx_self, PyObject *__pyx_v_arr) { CYTHON_UNUSED int __pyx_lineno = 0; CYTHON_UNUSED const char *__pyx_filename = NULL; CYTHON_UNUSED int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("is_monotonic_bool (wrapper)", 0); if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_arr), __pyx_ptype_5numpy_ndarray, 1, "arr", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1934; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_196is_monotonic_bool(__pyx_self, ((PyArrayObject *)__pyx_v_arr)); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":1934 * @cython.boundscheck(False) * @cython.wraparound(False) * def is_monotonic_bool(ndarray[uint8_t] arr): # <<<<<<<<<<<<<< * ''' * Returns */ static PyObject *__pyx_pf_6pandas_5algos_196is_monotonic_bool(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_arr) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_n; __pyx_t_5numpy_uint8_t __pyx_v_prev; __pyx_t_5numpy_uint8_t __pyx_v_cur; int __pyx_v_is_unique; __Pyx_LocalBuf_ND __pyx_pybuffernd_arr; __Pyx_Buffer __pyx_pybuffer_arr; 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; long __pyx_t_6; Py_ssize_t __pyx_t_7; Py_ssize_t __pyx_t_8; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("is_monotonic_bool", 0); __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_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1934; __pyx_clineno = __LINE__; goto __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/src/generated.pyx":1943 * Py_ssize_t i, n * uint8_t prev, cur * bint is_unique = 1 # <<<<<<<<<<<<<< * * n = len(arr) */ __pyx_v_is_unique = 1; /* "pandas/src/generated.pyx":1945 * bint is_unique = 1 * * n = len(arr) # <<<<<<<<<<<<<< * * if n < 2: */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_arr)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1945; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/src/generated.pyx":1947 * n = len(arr) * * if n < 2: # <<<<<<<<<<<<<< * return True, True * */ __pyx_t_2 = ((__pyx_v_n < 2) != 0); if (__pyx_t_2) { /* "pandas/src/generated.pyx":1948 * * if n < 2: * return True, True # <<<<<<<<<<<<<< * * prev = arr[0] */ __Pyx_XDECREF(__pyx_r); __pyx_t_3 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1948; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1948; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1948; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_3 = 0; __pyx_t_4 = 0; __pyx_r = ((PyObject *)__pyx_t_5); __pyx_t_5 = 0; goto __pyx_L0; goto __pyx_L3; } __pyx_L3:; /* "pandas/src/generated.pyx":1950 * return True, True * * prev = arr[0] # <<<<<<<<<<<<<< * for i in range(1, n): * cur = arr[i] */ __pyx_t_6 = 0; __pyx_v_prev = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_arr.rcbuffer->pybuffer.buf, __pyx_t_6, __pyx_pybuffernd_arr.diminfo[0].strides)); /* "pandas/src/generated.pyx":1951 * * prev = arr[0] * for i in range(1, n): # <<<<<<<<<<<<<< * cur = arr[i] * if cur < prev: */ __pyx_t_1 = __pyx_v_n; for (__pyx_t_7 = 1; __pyx_t_7 < __pyx_t_1; __pyx_t_7+=1) { __pyx_v_i = __pyx_t_7; /* "pandas/src/generated.pyx":1952 * prev = arr[0] * for i in range(1, n): * cur = arr[i] # <<<<<<<<<<<<<< * if cur < prev: * return False, None */ __pyx_t_8 = __pyx_v_i; __pyx_v_cur = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_arr.rcbuffer->pybuffer.buf, __pyx_t_8, __pyx_pybuffernd_arr.diminfo[0].strides)); /* "pandas/src/generated.pyx":1953 * for i in range(1, n): * cur = arr[i] * if cur < prev: # <<<<<<<<<<<<<< * return False, None * elif cur == prev: */ __pyx_t_2 = ((__pyx_v_cur < __pyx_v_prev) != 0); if (__pyx_t_2) { /* "pandas/src/generated.pyx":1954 * cur = arr[i] * if cur < prev: * return False, None # <<<<<<<<<<<<<< * elif cur == prev: * is_unique = 0 */ __Pyx_XDECREF(__pyx_r); __pyx_t_5 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1954; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1954; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __Pyx_INCREF(Py_None); PyTuple_SET_ITEM(__pyx_t_4, 1, Py_None); __Pyx_GIVEREF(Py_None); __pyx_t_5 = 0; __pyx_r = ((PyObject *)__pyx_t_4); __pyx_t_4 = 0; goto __pyx_L0; goto __pyx_L6; } /* "pandas/src/generated.pyx":1955 * if cur < prev: * return False, None * elif cur == prev: # <<<<<<<<<<<<<< * is_unique = 0 * prev = cur */ __pyx_t_2 = ((__pyx_v_cur == __pyx_v_prev) != 0); if (__pyx_t_2) { /* "pandas/src/generated.pyx":1956 * return False, None * elif cur == prev: * is_unique = 0 # <<<<<<<<<<<<<< * prev = cur * return True, is_unique */ __pyx_v_is_unique = 0; goto __pyx_L6; } __pyx_L6:; /* "pandas/src/generated.pyx":1957 * elif cur == prev: * is_unique = 0 * prev = cur # <<<<<<<<<<<<<< * return True, is_unique * */ __pyx_v_prev = __pyx_v_cur; } /* "pandas/src/generated.pyx":1958 * is_unique = 0 * prev = cur * return True, is_unique # <<<<<<<<<<<<<< * * @cython.wraparound(False) */ __Pyx_XDECREF(__pyx_r); __pyx_t_4 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1958; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyBool_FromLong(__pyx_v_is_unique); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1958; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1958; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __pyx_t_4 = 0; __pyx_t_5 = 0; __pyx_r = ((PyObject *)__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_arr.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.is_monotonic_bool", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_arr.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_199groupby_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_199groupby_float64 = {__Pyx_NAMESTR("groupby_float64"), (PyCFunction)__pyx_pw_6pandas_5algos_199groupby_float64, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_199groupby_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_index = 0; PyArrayObject *__pyx_v_labels = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("groupby_float64 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__index,&__pyx_n_s__labels,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__index)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__labels)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("groupby_float64", 1, 2, 2, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1962; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "groupby_float64") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1962; __pyx_clineno = __LINE__; goto __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_index = ((PyArrayObject *)values[0]); __pyx_v_labels = ((PyArrayObject *)values[1]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("groupby_float64", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1962; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.groupby_float64", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_index), __pyx_ptype_5numpy_ndarray, 1, "index", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1962; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_labels), __pyx_ptype_5numpy_ndarray, 1, "labels", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1962; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_198groupby_float64(__pyx_self, __pyx_v_index, __pyx_v_labels); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":1962 * @cython.wraparound(False) * @cython.boundscheck(False) * def groupby_float64(ndarray[float64_t] index, ndarray labels): # <<<<<<<<<<<<<< * cdef dict result = {} * cdef Py_ssize_t i, length */ static PyObject *__pyx_pf_6pandas_5algos_198groupby_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_index, PyArrayObject *__pyx_v_labels) { PyObject *__pyx_v_result = 0; Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_length; PyObject *__pyx_v_members = 0; PyObject *__pyx_v_idx = 0; PyObject *__pyx_v_key = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_index; __Pyx_Buffer __pyx_pybuffer_index; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; Py_ssize_t __pyx_t_2; int __pyx_t_3; Py_ssize_t __pyx_t_4; Py_ssize_t __pyx_t_5; int __pyx_t_6; int __pyx_t_7; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("groupby_float64", 0); __pyx_pybuffer_index.pybuffer.buf = NULL; __pyx_pybuffer_index.refcount = 0; __pyx_pybuffernd_index.data = NULL; __pyx_pybuffernd_index.rcbuffer = &__pyx_pybuffer_index; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_index.rcbuffer->pybuffer, (PyObject*)__pyx_v_index, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1962; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_index.diminfo[0].strides = __pyx_pybuffernd_index.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_index.diminfo[0].shape = __pyx_pybuffernd_index.rcbuffer->pybuffer.shape[0]; /* "pandas/src/generated.pyx":1963 * @cython.boundscheck(False) * def groupby_float64(ndarray[float64_t] index, ndarray labels): * cdef dict result = {} # <<<<<<<<<<<<<< * cdef Py_ssize_t i, length * cdef list members */ __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1963; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_v_result = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/generated.pyx":1968 * cdef object idx, key * * length = len(index) # <<<<<<<<<<<<<< * * if not length == len(labels): */ __pyx_t_2 = PyObject_Length(((PyObject *)__pyx_v_index)); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1968; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_length = __pyx_t_2; /* "pandas/src/generated.pyx":1970 * length = len(index) * * if not length == len(labels): # <<<<<<<<<<<<<< * raise AssertionError("len(index) != len(labels)") * */ __pyx_t_2 = PyObject_Length(((PyObject *)__pyx_v_labels)); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1970; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_3 = ((!((__pyx_v_length == __pyx_t_2) != 0)) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":1971 * * if not length == len(labels): * raise AssertionError("len(index) != len(labels)") # <<<<<<<<<<<<<< * * for i in range(length): */ __pyx_t_1 = PyObject_Call(__pyx_builtin_AssertionError, ((PyObject *)__pyx_k_tuple_100), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1971; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 1971; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L3; } __pyx_L3:; /* "pandas/src/generated.pyx":1973 * raise AssertionError("len(index) != len(labels)") * * for i in range(length): # <<<<<<<<<<<<<< * key = util.get_value_1d(labels, i) * */ __pyx_t_2 = __pyx_v_length; for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_2; __pyx_t_4+=1) { __pyx_v_i = __pyx_t_4; /* "pandas/src/generated.pyx":1974 * * for i in range(length): * key = util.get_value_1d(labels, i) # <<<<<<<<<<<<<< * * if _checknull(key): */ __pyx_t_1 = get_value_1d(__pyx_v_labels, __pyx_v_i); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1974; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_XDECREF_SET(__pyx_v_key, __pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/generated.pyx":1976 * key = util.get_value_1d(labels, i) * * if _checknull(key): # <<<<<<<<<<<<<< * continue * */ __pyx_t_3 = (__pyx_f_4util__checknull(__pyx_v_key) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":1977 * * if _checknull(key): * continue # <<<<<<<<<<<<<< * * idx = index[i] */ goto __pyx_L4_continue; goto __pyx_L6; } __pyx_L6:; /* "pandas/src/generated.pyx":1979 * continue * * idx = index[i] # <<<<<<<<<<<<<< * if key in result: * members = result[key] */ __pyx_t_5 = __pyx_v_i; __pyx_t_1 = PyFloat_FromDouble((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_index.rcbuffer->pybuffer.buf, __pyx_t_5, __pyx_pybuffernd_index.diminfo[0].strides))); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1979; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_XDECREF_SET(__pyx_v_idx, __pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/generated.pyx":1980 * * idx = index[i] * if key in result: # <<<<<<<<<<<<<< * members = result[key] * members.append(idx) */ __pyx_t_3 = (__Pyx_PyDict_Contains(__pyx_v_key, ((PyObject *)__pyx_v_result), Py_EQ)); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1980; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_6 = (__pyx_t_3 != 0); if (__pyx_t_6) { /* "pandas/src/generated.pyx":1981 * idx = index[i] * if key in result: * members = result[key] # <<<<<<<<<<<<<< * members.append(idx) * else: */ __pyx_t_1 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_result), __pyx_v_key); if (!__pyx_t_1) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1981; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (!(likely(PyList_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected list, got %.200s", Py_TYPE(__pyx_t_1)->tp_name), 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1981; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_XDECREF_SET(__pyx_v_members, ((PyObject*)__pyx_t_1)); __pyx_t_1 = 0; /* "pandas/src/generated.pyx":1982 * if key in result: * members = result[key] * members.append(idx) # <<<<<<<<<<<<<< * else: * result[key] = [idx] */ if (unlikely(((PyObject *)__pyx_v_members) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "append"); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1982; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_7 = __Pyx_PyList_Append(__pyx_v_members, __pyx_v_idx); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1982; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L7; } /*else*/ { /* "pandas/src/generated.pyx":1984 * members.append(idx) * else: * result[key] = [idx] # <<<<<<<<<<<<<< * * return result */ __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1984; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_idx); PyList_SET_ITEM(__pyx_t_1, 0, __pyx_v_idx); __Pyx_GIVEREF(__pyx_v_idx); if (PyDict_SetItem(((PyObject *)__pyx_v_result), __pyx_v_key, ((PyObject *)__pyx_t_1)) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1984; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; } __pyx_L7:; __pyx_L4_continue:; } /* "pandas/src/generated.pyx":1986 * result[key] = [idx] * * return result # <<<<<<<<<<<<<< * * @cython.wraparound(False) */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_result)); __pyx_r = ((PyObject *)__pyx_v_result); goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_index.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.groupby_float64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_index.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF(__pyx_v_result); __Pyx_XDECREF(__pyx_v_members); __Pyx_XDECREF(__pyx_v_idx); __Pyx_XDECREF(__pyx_v_key); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_201groupby_float32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_201groupby_float32 = {__Pyx_NAMESTR("groupby_float32"), (PyCFunction)__pyx_pw_6pandas_5algos_201groupby_float32, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_201groupby_float32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_index = 0; PyArrayObject *__pyx_v_labels = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("groupby_float32 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__index,&__pyx_n_s__labels,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__index)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__labels)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("groupby_float32", 1, 2, 2, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1990; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "groupby_float32") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1990; __pyx_clineno = __LINE__; goto __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_index = ((PyArrayObject *)values[0]); __pyx_v_labels = ((PyArrayObject *)values[1]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("groupby_float32", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1990; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.groupby_float32", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_index), __pyx_ptype_5numpy_ndarray, 1, "index", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1990; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_labels), __pyx_ptype_5numpy_ndarray, 1, "labels", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1990; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_200groupby_float32(__pyx_self, __pyx_v_index, __pyx_v_labels); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":1990 * @cython.wraparound(False) * @cython.boundscheck(False) * def groupby_float32(ndarray[float32_t] index, ndarray labels): # <<<<<<<<<<<<<< * cdef dict result = {} * cdef Py_ssize_t i, length */ static PyObject *__pyx_pf_6pandas_5algos_200groupby_float32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_index, PyArrayObject *__pyx_v_labels) { PyObject *__pyx_v_result = 0; Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_length; PyObject *__pyx_v_members = 0; PyObject *__pyx_v_idx = 0; PyObject *__pyx_v_key = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_index; __Pyx_Buffer __pyx_pybuffer_index; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; Py_ssize_t __pyx_t_2; int __pyx_t_3; Py_ssize_t __pyx_t_4; Py_ssize_t __pyx_t_5; int __pyx_t_6; int __pyx_t_7; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("groupby_float32", 0); __pyx_pybuffer_index.pybuffer.buf = NULL; __pyx_pybuffer_index.refcount = 0; __pyx_pybuffernd_index.data = NULL; __pyx_pybuffernd_index.rcbuffer = &__pyx_pybuffer_index; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_index.rcbuffer->pybuffer, (PyObject*)__pyx_v_index, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1990; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_index.diminfo[0].strides = __pyx_pybuffernd_index.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_index.diminfo[0].shape = __pyx_pybuffernd_index.rcbuffer->pybuffer.shape[0]; /* "pandas/src/generated.pyx":1991 * @cython.boundscheck(False) * def groupby_float32(ndarray[float32_t] index, ndarray labels): * cdef dict result = {} # <<<<<<<<<<<<<< * cdef Py_ssize_t i, length * cdef list members */ __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1991; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_v_result = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/generated.pyx":1996 * cdef object idx, key * * length = len(index) # <<<<<<<<<<<<<< * * if not length == len(labels): */ __pyx_t_2 = PyObject_Length(((PyObject *)__pyx_v_index)); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1996; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_length = __pyx_t_2; /* "pandas/src/generated.pyx":1998 * length = len(index) * * if not length == len(labels): # <<<<<<<<<<<<<< * raise AssertionError("len(index) != len(labels)") * */ __pyx_t_2 = PyObject_Length(((PyObject *)__pyx_v_labels)); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1998; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_3 = ((!((__pyx_v_length == __pyx_t_2) != 0)) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":1999 * * if not length == len(labels): * raise AssertionError("len(index) != len(labels)") # <<<<<<<<<<<<<< * * for i in range(length): */ __pyx_t_1 = PyObject_Call(__pyx_builtin_AssertionError, ((PyObject *)__pyx_k_tuple_101), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1999; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 1999; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L3; } __pyx_L3:; /* "pandas/src/generated.pyx":2001 * raise AssertionError("len(index) != len(labels)") * * for i in range(length): # <<<<<<<<<<<<<< * key = util.get_value_1d(labels, i) * */ __pyx_t_2 = __pyx_v_length; for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_2; __pyx_t_4+=1) { __pyx_v_i = __pyx_t_4; /* "pandas/src/generated.pyx":2002 * * for i in range(length): * key = util.get_value_1d(labels, i) # <<<<<<<<<<<<<< * * if _checknull(key): */ __pyx_t_1 = get_value_1d(__pyx_v_labels, __pyx_v_i); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2002; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_XDECREF_SET(__pyx_v_key, __pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/generated.pyx":2004 * key = util.get_value_1d(labels, i) * * if _checknull(key): # <<<<<<<<<<<<<< * continue * */ __pyx_t_3 = (__pyx_f_4util__checknull(__pyx_v_key) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":2005 * * if _checknull(key): * continue # <<<<<<<<<<<<<< * * idx = index[i] */ goto __pyx_L4_continue; goto __pyx_L6; } __pyx_L6:; /* "pandas/src/generated.pyx":2007 * continue * * idx = index[i] # <<<<<<<<<<<<<< * if key in result: * members = result[key] */ __pyx_t_5 = __pyx_v_i; __pyx_t_1 = PyFloat_FromDouble((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_index.rcbuffer->pybuffer.buf, __pyx_t_5, __pyx_pybuffernd_index.diminfo[0].strides))); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2007; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_XDECREF_SET(__pyx_v_idx, __pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/generated.pyx":2008 * * idx = index[i] * if key in result: # <<<<<<<<<<<<<< * members = result[key] * members.append(idx) */ __pyx_t_3 = (__Pyx_PyDict_Contains(__pyx_v_key, ((PyObject *)__pyx_v_result), Py_EQ)); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2008; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_6 = (__pyx_t_3 != 0); if (__pyx_t_6) { /* "pandas/src/generated.pyx":2009 * idx = index[i] * if key in result: * members = result[key] # <<<<<<<<<<<<<< * members.append(idx) * else: */ __pyx_t_1 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_result), __pyx_v_key); if (!__pyx_t_1) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2009; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (!(likely(PyList_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected list, got %.200s", Py_TYPE(__pyx_t_1)->tp_name), 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2009; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_XDECREF_SET(__pyx_v_members, ((PyObject*)__pyx_t_1)); __pyx_t_1 = 0; /* "pandas/src/generated.pyx":2010 * if key in result: * members = result[key] * members.append(idx) # <<<<<<<<<<<<<< * else: * result[key] = [idx] */ if (unlikely(((PyObject *)__pyx_v_members) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "append"); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2010; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_7 = __Pyx_PyList_Append(__pyx_v_members, __pyx_v_idx); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2010; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L7; } /*else*/ { /* "pandas/src/generated.pyx":2012 * members.append(idx) * else: * result[key] = [idx] # <<<<<<<<<<<<<< * * return result */ __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2012; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_idx); PyList_SET_ITEM(__pyx_t_1, 0, __pyx_v_idx); __Pyx_GIVEREF(__pyx_v_idx); if (PyDict_SetItem(((PyObject *)__pyx_v_result), __pyx_v_key, ((PyObject *)__pyx_t_1)) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2012; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; } __pyx_L7:; __pyx_L4_continue:; } /* "pandas/src/generated.pyx":2014 * result[key] = [idx] * * return result # <<<<<<<<<<<<<< * * @cython.wraparound(False) */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_result)); __pyx_r = ((PyObject *)__pyx_v_result); goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_index.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.groupby_float32", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_index.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF(__pyx_v_result); __Pyx_XDECREF(__pyx_v_members); __Pyx_XDECREF(__pyx_v_idx); __Pyx_XDECREF(__pyx_v_key); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_203groupby_object(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_203groupby_object = {__Pyx_NAMESTR("groupby_object"), (PyCFunction)__pyx_pw_6pandas_5algos_203groupby_object, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_203groupby_object(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_index = 0; PyArrayObject *__pyx_v_labels = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("groupby_object (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__index,&__pyx_n_s__labels,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__index)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__labels)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("groupby_object", 1, 2, 2, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2018; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "groupby_object") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2018; __pyx_clineno = __LINE__; goto __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_index = ((PyArrayObject *)values[0]); __pyx_v_labels = ((PyArrayObject *)values[1]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("groupby_object", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2018; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.groupby_object", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_index), __pyx_ptype_5numpy_ndarray, 1, "index", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2018; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_labels), __pyx_ptype_5numpy_ndarray, 1, "labels", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2018; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_202groupby_object(__pyx_self, __pyx_v_index, __pyx_v_labels); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":2018 * @cython.wraparound(False) * @cython.boundscheck(False) * def groupby_object(ndarray[object] index, ndarray labels): # <<<<<<<<<<<<<< * cdef dict result = {} * cdef Py_ssize_t i, length */ static PyObject *__pyx_pf_6pandas_5algos_202groupby_object(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_index, PyArrayObject *__pyx_v_labels) { PyObject *__pyx_v_result = 0; Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_length; PyObject *__pyx_v_members = 0; PyObject *__pyx_v_idx = 0; PyObject *__pyx_v_key = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_index; __Pyx_Buffer __pyx_pybuffer_index; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; Py_ssize_t __pyx_t_2; int __pyx_t_3; Py_ssize_t __pyx_t_4; Py_ssize_t __pyx_t_5; int __pyx_t_6; int __pyx_t_7; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("groupby_object", 0); __pyx_pybuffer_index.pybuffer.buf = NULL; __pyx_pybuffer_index.refcount = 0; __pyx_pybuffernd_index.data = NULL; __pyx_pybuffernd_index.rcbuffer = &__pyx_pybuffer_index; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_index.rcbuffer->pybuffer, (PyObject*)__pyx_v_index, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2018; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_index.diminfo[0].strides = __pyx_pybuffernd_index.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_index.diminfo[0].shape = __pyx_pybuffernd_index.rcbuffer->pybuffer.shape[0]; /* "pandas/src/generated.pyx":2019 * @cython.boundscheck(False) * def groupby_object(ndarray[object] index, ndarray labels): * cdef dict result = {} # <<<<<<<<<<<<<< * cdef Py_ssize_t i, length * cdef list members */ __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2019; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_v_result = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/generated.pyx":2024 * cdef object idx, key * * length = len(index) # <<<<<<<<<<<<<< * * if not length == len(labels): */ __pyx_t_2 = PyObject_Length(((PyObject *)__pyx_v_index)); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2024; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_length = __pyx_t_2; /* "pandas/src/generated.pyx":2026 * length = len(index) * * if not length == len(labels): # <<<<<<<<<<<<<< * raise AssertionError("len(index) != len(labels)") * */ __pyx_t_2 = PyObject_Length(((PyObject *)__pyx_v_labels)); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2026; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_3 = ((!((__pyx_v_length == __pyx_t_2) != 0)) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":2027 * * if not length == len(labels): * raise AssertionError("len(index) != len(labels)") # <<<<<<<<<<<<<< * * for i in range(length): */ __pyx_t_1 = PyObject_Call(__pyx_builtin_AssertionError, ((PyObject *)__pyx_k_tuple_102), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2027; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 2027; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L3; } __pyx_L3:; /* "pandas/src/generated.pyx":2029 * raise AssertionError("len(index) != len(labels)") * * for i in range(length): # <<<<<<<<<<<<<< * key = util.get_value_1d(labels, i) * */ __pyx_t_2 = __pyx_v_length; for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_2; __pyx_t_4+=1) { __pyx_v_i = __pyx_t_4; /* "pandas/src/generated.pyx":2030 * * for i in range(length): * key = util.get_value_1d(labels, i) # <<<<<<<<<<<<<< * * if _checknull(key): */ __pyx_t_1 = get_value_1d(__pyx_v_labels, __pyx_v_i); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2030; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_XDECREF_SET(__pyx_v_key, __pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/generated.pyx":2032 * key = util.get_value_1d(labels, i) * * if _checknull(key): # <<<<<<<<<<<<<< * continue * */ __pyx_t_3 = (__pyx_f_4util__checknull(__pyx_v_key) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":2033 * * if _checknull(key): * continue # <<<<<<<<<<<<<< * * idx = index[i] */ goto __pyx_L4_continue; goto __pyx_L6; } __pyx_L6:; /* "pandas/src/generated.pyx":2035 * continue * * idx = index[i] # <<<<<<<<<<<<<< * if key in result: * members = result[key] */ __pyx_t_5 = __pyx_v_i; __pyx_t_1 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_index.rcbuffer->pybuffer.buf, __pyx_t_5, __pyx_pybuffernd_index.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_1); __Pyx_XDECREF_SET(__pyx_v_idx, __pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/generated.pyx":2036 * * idx = index[i] * if key in result: # <<<<<<<<<<<<<< * members = result[key] * members.append(idx) */ __pyx_t_3 = (__Pyx_PyDict_Contains(__pyx_v_key, ((PyObject *)__pyx_v_result), Py_EQ)); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2036; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_6 = (__pyx_t_3 != 0); if (__pyx_t_6) { /* "pandas/src/generated.pyx":2037 * idx = index[i] * if key in result: * members = result[key] # <<<<<<<<<<<<<< * members.append(idx) * else: */ __pyx_t_1 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_result), __pyx_v_key); if (!__pyx_t_1) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2037; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (!(likely(PyList_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected list, got %.200s", Py_TYPE(__pyx_t_1)->tp_name), 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2037; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_XDECREF_SET(__pyx_v_members, ((PyObject*)__pyx_t_1)); __pyx_t_1 = 0; /* "pandas/src/generated.pyx":2038 * if key in result: * members = result[key] * members.append(idx) # <<<<<<<<<<<<<< * else: * result[key] = [idx] */ if (unlikely(((PyObject *)__pyx_v_members) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "append"); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2038; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_7 = __Pyx_PyList_Append(__pyx_v_members, __pyx_v_idx); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2038; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L7; } /*else*/ { /* "pandas/src/generated.pyx":2040 * members.append(idx) * else: * result[key] = [idx] # <<<<<<<<<<<<<< * * return result */ __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2040; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_idx); PyList_SET_ITEM(__pyx_t_1, 0, __pyx_v_idx); __Pyx_GIVEREF(__pyx_v_idx); if (PyDict_SetItem(((PyObject *)__pyx_v_result), __pyx_v_key, ((PyObject *)__pyx_t_1)) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2040; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; } __pyx_L7:; __pyx_L4_continue:; } /* "pandas/src/generated.pyx":2042 * result[key] = [idx] * * return result # <<<<<<<<<<<<<< * * @cython.wraparound(False) */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_result)); __pyx_r = ((PyObject *)__pyx_v_result); goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_index.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.groupby_object", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_index.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF(__pyx_v_result); __Pyx_XDECREF(__pyx_v_members); __Pyx_XDECREF(__pyx_v_idx); __Pyx_XDECREF(__pyx_v_key); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_205groupby_int32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_205groupby_int32 = {__Pyx_NAMESTR("groupby_int32"), (PyCFunction)__pyx_pw_6pandas_5algos_205groupby_int32, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_205groupby_int32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_index = 0; PyArrayObject *__pyx_v_labels = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("groupby_int32 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__index,&__pyx_n_s__labels,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__index)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__labels)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("groupby_int32", 1, 2, 2, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2046; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "groupby_int32") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2046; __pyx_clineno = __LINE__; goto __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_index = ((PyArrayObject *)values[0]); __pyx_v_labels = ((PyArrayObject *)values[1]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("groupby_int32", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2046; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.groupby_int32", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_index), __pyx_ptype_5numpy_ndarray, 1, "index", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2046; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_labels), __pyx_ptype_5numpy_ndarray, 1, "labels", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2046; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_204groupby_int32(__pyx_self, __pyx_v_index, __pyx_v_labels); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":2046 * @cython.wraparound(False) * @cython.boundscheck(False) * def groupby_int32(ndarray[int32_t] index, ndarray labels): # <<<<<<<<<<<<<< * cdef dict result = {} * cdef Py_ssize_t i, length */ static PyObject *__pyx_pf_6pandas_5algos_204groupby_int32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_index, PyArrayObject *__pyx_v_labels) { PyObject *__pyx_v_result = 0; Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_length; PyObject *__pyx_v_members = 0; PyObject *__pyx_v_idx = 0; PyObject *__pyx_v_key = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_index; __Pyx_Buffer __pyx_pybuffer_index; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; Py_ssize_t __pyx_t_2; int __pyx_t_3; Py_ssize_t __pyx_t_4; Py_ssize_t __pyx_t_5; int __pyx_t_6; int __pyx_t_7; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("groupby_int32", 0); __pyx_pybuffer_index.pybuffer.buf = NULL; __pyx_pybuffer_index.refcount = 0; __pyx_pybuffernd_index.data = NULL; __pyx_pybuffernd_index.rcbuffer = &__pyx_pybuffer_index; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_index.rcbuffer->pybuffer, (PyObject*)__pyx_v_index, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2046; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_index.diminfo[0].strides = __pyx_pybuffernd_index.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_index.diminfo[0].shape = __pyx_pybuffernd_index.rcbuffer->pybuffer.shape[0]; /* "pandas/src/generated.pyx":2047 * @cython.boundscheck(False) * def groupby_int32(ndarray[int32_t] index, ndarray labels): * cdef dict result = {} # <<<<<<<<<<<<<< * cdef Py_ssize_t i, length * cdef list members */ __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2047; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_v_result = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/generated.pyx":2052 * cdef object idx, key * * length = len(index) # <<<<<<<<<<<<<< * * if not length == len(labels): */ __pyx_t_2 = PyObject_Length(((PyObject *)__pyx_v_index)); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2052; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_length = __pyx_t_2; /* "pandas/src/generated.pyx":2054 * length = len(index) * * if not length == len(labels): # <<<<<<<<<<<<<< * raise AssertionError("len(index) != len(labels)") * */ __pyx_t_2 = PyObject_Length(((PyObject *)__pyx_v_labels)); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2054; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_3 = ((!((__pyx_v_length == __pyx_t_2) != 0)) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":2055 * * if not length == len(labels): * raise AssertionError("len(index) != len(labels)") # <<<<<<<<<<<<<< * * for i in range(length): */ __pyx_t_1 = PyObject_Call(__pyx_builtin_AssertionError, ((PyObject *)__pyx_k_tuple_103), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2055; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 2055; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L3; } __pyx_L3:; /* "pandas/src/generated.pyx":2057 * raise AssertionError("len(index) != len(labels)") * * for i in range(length): # <<<<<<<<<<<<<< * key = util.get_value_1d(labels, i) * */ __pyx_t_2 = __pyx_v_length; for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_2; __pyx_t_4+=1) { __pyx_v_i = __pyx_t_4; /* "pandas/src/generated.pyx":2058 * * for i in range(length): * key = util.get_value_1d(labels, i) # <<<<<<<<<<<<<< * * if _checknull(key): */ __pyx_t_1 = get_value_1d(__pyx_v_labels, __pyx_v_i); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2058; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_XDECREF_SET(__pyx_v_key, __pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/generated.pyx":2060 * key = util.get_value_1d(labels, i) * * if _checknull(key): # <<<<<<<<<<<<<< * continue * */ __pyx_t_3 = (__pyx_f_4util__checknull(__pyx_v_key) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":2061 * * if _checknull(key): * continue # <<<<<<<<<<<<<< * * idx = index[i] */ goto __pyx_L4_continue; goto __pyx_L6; } __pyx_L6:; /* "pandas/src/generated.pyx":2063 * continue * * idx = index[i] # <<<<<<<<<<<<<< * if key in result: * members = result[key] */ __pyx_t_5 = __pyx_v_i; __pyx_t_1 = __Pyx_PyInt_to_py_npy_int32((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_index.rcbuffer->pybuffer.buf, __pyx_t_5, __pyx_pybuffernd_index.diminfo[0].strides))); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2063; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_XDECREF_SET(__pyx_v_idx, __pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/generated.pyx":2064 * * idx = index[i] * if key in result: # <<<<<<<<<<<<<< * members = result[key] * members.append(idx) */ __pyx_t_3 = (__Pyx_PyDict_Contains(__pyx_v_key, ((PyObject *)__pyx_v_result), Py_EQ)); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2064; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_6 = (__pyx_t_3 != 0); if (__pyx_t_6) { /* "pandas/src/generated.pyx":2065 * idx = index[i] * if key in result: * members = result[key] # <<<<<<<<<<<<<< * members.append(idx) * else: */ __pyx_t_1 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_result), __pyx_v_key); if (!__pyx_t_1) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2065; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (!(likely(PyList_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected list, got %.200s", Py_TYPE(__pyx_t_1)->tp_name), 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2065; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_XDECREF_SET(__pyx_v_members, ((PyObject*)__pyx_t_1)); __pyx_t_1 = 0; /* "pandas/src/generated.pyx":2066 * if key in result: * members = result[key] * members.append(idx) # <<<<<<<<<<<<<< * else: * result[key] = [idx] */ if (unlikely(((PyObject *)__pyx_v_members) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "append"); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2066; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_7 = __Pyx_PyList_Append(__pyx_v_members, __pyx_v_idx); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2066; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L7; } /*else*/ { /* "pandas/src/generated.pyx":2068 * members.append(idx) * else: * result[key] = [idx] # <<<<<<<<<<<<<< * * return result */ __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2068; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_idx); PyList_SET_ITEM(__pyx_t_1, 0, __pyx_v_idx); __Pyx_GIVEREF(__pyx_v_idx); if (PyDict_SetItem(((PyObject *)__pyx_v_result), __pyx_v_key, ((PyObject *)__pyx_t_1)) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2068; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; } __pyx_L7:; __pyx_L4_continue:; } /* "pandas/src/generated.pyx":2070 * result[key] = [idx] * * return result # <<<<<<<<<<<<<< * * @cython.wraparound(False) */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_result)); __pyx_r = ((PyObject *)__pyx_v_result); goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_index.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.groupby_int32", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_index.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF(__pyx_v_result); __Pyx_XDECREF(__pyx_v_members); __Pyx_XDECREF(__pyx_v_idx); __Pyx_XDECREF(__pyx_v_key); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_207groupby_int64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_207groupby_int64 = {__Pyx_NAMESTR("groupby_int64"), (PyCFunction)__pyx_pw_6pandas_5algos_207groupby_int64, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_207groupby_int64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_index = 0; PyArrayObject *__pyx_v_labels = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("groupby_int64 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__index,&__pyx_n_s__labels,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__index)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__labels)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("groupby_int64", 1, 2, 2, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2074; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "groupby_int64") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2074; __pyx_clineno = __LINE__; goto __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_index = ((PyArrayObject *)values[0]); __pyx_v_labels = ((PyArrayObject *)values[1]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("groupby_int64", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2074; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.groupby_int64", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_index), __pyx_ptype_5numpy_ndarray, 1, "index", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2074; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_labels), __pyx_ptype_5numpy_ndarray, 1, "labels", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2074; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_206groupby_int64(__pyx_self, __pyx_v_index, __pyx_v_labels); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":2074 * @cython.wraparound(False) * @cython.boundscheck(False) * def groupby_int64(ndarray[int64_t] index, ndarray labels): # <<<<<<<<<<<<<< * cdef dict result = {} * cdef Py_ssize_t i, length */ static PyObject *__pyx_pf_6pandas_5algos_206groupby_int64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_index, PyArrayObject *__pyx_v_labels) { PyObject *__pyx_v_result = 0; Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_length; PyObject *__pyx_v_members = 0; PyObject *__pyx_v_idx = 0; PyObject *__pyx_v_key = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_index; __Pyx_Buffer __pyx_pybuffer_index; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; Py_ssize_t __pyx_t_2; int __pyx_t_3; Py_ssize_t __pyx_t_4; Py_ssize_t __pyx_t_5; int __pyx_t_6; int __pyx_t_7; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("groupby_int64", 0); __pyx_pybuffer_index.pybuffer.buf = NULL; __pyx_pybuffer_index.refcount = 0; __pyx_pybuffernd_index.data = NULL; __pyx_pybuffernd_index.rcbuffer = &__pyx_pybuffer_index; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_index.rcbuffer->pybuffer, (PyObject*)__pyx_v_index, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2074; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_index.diminfo[0].strides = __pyx_pybuffernd_index.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_index.diminfo[0].shape = __pyx_pybuffernd_index.rcbuffer->pybuffer.shape[0]; /* "pandas/src/generated.pyx":2075 * @cython.boundscheck(False) * def groupby_int64(ndarray[int64_t] index, ndarray labels): * cdef dict result = {} # <<<<<<<<<<<<<< * cdef Py_ssize_t i, length * cdef list members */ __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2075; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_v_result = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/generated.pyx":2080 * cdef object idx, key * * length = len(index) # <<<<<<<<<<<<<< * * if not length == len(labels): */ __pyx_t_2 = PyObject_Length(((PyObject *)__pyx_v_index)); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2080; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_length = __pyx_t_2; /* "pandas/src/generated.pyx":2082 * length = len(index) * * if not length == len(labels): # <<<<<<<<<<<<<< * raise AssertionError("len(index) != len(labels)") * */ __pyx_t_2 = PyObject_Length(((PyObject *)__pyx_v_labels)); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2082; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_3 = ((!((__pyx_v_length == __pyx_t_2) != 0)) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":2083 * * if not length == len(labels): * raise AssertionError("len(index) != len(labels)") # <<<<<<<<<<<<<< * * for i in range(length): */ __pyx_t_1 = PyObject_Call(__pyx_builtin_AssertionError, ((PyObject *)__pyx_k_tuple_104), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2083; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 2083; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L3; } __pyx_L3:; /* "pandas/src/generated.pyx":2085 * raise AssertionError("len(index) != len(labels)") * * for i in range(length): # <<<<<<<<<<<<<< * key = util.get_value_1d(labels, i) * */ __pyx_t_2 = __pyx_v_length; for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_2; __pyx_t_4+=1) { __pyx_v_i = __pyx_t_4; /* "pandas/src/generated.pyx":2086 * * for i in range(length): * key = util.get_value_1d(labels, i) # <<<<<<<<<<<<<< * * if _checknull(key): */ __pyx_t_1 = get_value_1d(__pyx_v_labels, __pyx_v_i); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2086; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_XDECREF_SET(__pyx_v_key, __pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/generated.pyx":2088 * key = util.get_value_1d(labels, i) * * if _checknull(key): # <<<<<<<<<<<<<< * continue * */ __pyx_t_3 = (__pyx_f_4util__checknull(__pyx_v_key) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":2089 * * if _checknull(key): * continue # <<<<<<<<<<<<<< * * idx = index[i] */ goto __pyx_L4_continue; goto __pyx_L6; } __pyx_L6:; /* "pandas/src/generated.pyx":2091 * continue * * idx = index[i] # <<<<<<<<<<<<<< * if key in result: * members = result[key] */ __pyx_t_5 = __pyx_v_i; __pyx_t_1 = __Pyx_PyInt_to_py_npy_int64((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_index.rcbuffer->pybuffer.buf, __pyx_t_5, __pyx_pybuffernd_index.diminfo[0].strides))); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2091; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_XDECREF_SET(__pyx_v_idx, __pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/generated.pyx":2092 * * idx = index[i] * if key in result: # <<<<<<<<<<<<<< * members = result[key] * members.append(idx) */ __pyx_t_3 = (__Pyx_PyDict_Contains(__pyx_v_key, ((PyObject *)__pyx_v_result), Py_EQ)); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2092; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_6 = (__pyx_t_3 != 0); if (__pyx_t_6) { /* "pandas/src/generated.pyx":2093 * idx = index[i] * if key in result: * members = result[key] # <<<<<<<<<<<<<< * members.append(idx) * else: */ __pyx_t_1 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_result), __pyx_v_key); if (!__pyx_t_1) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2093; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (!(likely(PyList_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected list, got %.200s", Py_TYPE(__pyx_t_1)->tp_name), 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2093; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_XDECREF_SET(__pyx_v_members, ((PyObject*)__pyx_t_1)); __pyx_t_1 = 0; /* "pandas/src/generated.pyx":2094 * if key in result: * members = result[key] * members.append(idx) # <<<<<<<<<<<<<< * else: * result[key] = [idx] */ if (unlikely(((PyObject *)__pyx_v_members) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "append"); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2094; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_7 = __Pyx_PyList_Append(__pyx_v_members, __pyx_v_idx); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2094; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L7; } /*else*/ { /* "pandas/src/generated.pyx":2096 * members.append(idx) * else: * result[key] = [idx] # <<<<<<<<<<<<<< * * return result */ __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2096; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_idx); PyList_SET_ITEM(__pyx_t_1, 0, __pyx_v_idx); __Pyx_GIVEREF(__pyx_v_idx); if (PyDict_SetItem(((PyObject *)__pyx_v_result), __pyx_v_key, ((PyObject *)__pyx_t_1)) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2096; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; } __pyx_L7:; __pyx_L4_continue:; } /* "pandas/src/generated.pyx":2098 * result[key] = [idx] * * return result # <<<<<<<<<<<<<< * * @cython.wraparound(False) */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_result)); __pyx_r = ((PyObject *)__pyx_v_result); goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_index.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.groupby_int64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_index.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF(__pyx_v_result); __Pyx_XDECREF(__pyx_v_members); __Pyx_XDECREF(__pyx_v_idx); __Pyx_XDECREF(__pyx_v_key); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_209groupby_bool(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_209groupby_bool = {__Pyx_NAMESTR("groupby_bool"), (PyCFunction)__pyx_pw_6pandas_5algos_209groupby_bool, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_209groupby_bool(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_index = 0; PyArrayObject *__pyx_v_labels = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("groupby_bool (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__index,&__pyx_n_s__labels,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__index)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__labels)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("groupby_bool", 1, 2, 2, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2102; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "groupby_bool") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2102; __pyx_clineno = __LINE__; goto __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_index = ((PyArrayObject *)values[0]); __pyx_v_labels = ((PyArrayObject *)values[1]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("groupby_bool", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2102; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.groupby_bool", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_index), __pyx_ptype_5numpy_ndarray, 1, "index", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2102; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_labels), __pyx_ptype_5numpy_ndarray, 1, "labels", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2102; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_208groupby_bool(__pyx_self, __pyx_v_index, __pyx_v_labels); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":2102 * @cython.wraparound(False) * @cython.boundscheck(False) * def groupby_bool(ndarray[uint8_t] index, ndarray labels): # <<<<<<<<<<<<<< * cdef dict result = {} * cdef Py_ssize_t i, length */ static PyObject *__pyx_pf_6pandas_5algos_208groupby_bool(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_index, PyArrayObject *__pyx_v_labels) { PyObject *__pyx_v_result = 0; Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_length; PyObject *__pyx_v_members = 0; PyObject *__pyx_v_idx = 0; PyObject *__pyx_v_key = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_index; __Pyx_Buffer __pyx_pybuffer_index; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; Py_ssize_t __pyx_t_2; int __pyx_t_3; Py_ssize_t __pyx_t_4; Py_ssize_t __pyx_t_5; int __pyx_t_6; int __pyx_t_7; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("groupby_bool", 0); __pyx_pybuffer_index.pybuffer.buf = NULL; __pyx_pybuffer_index.refcount = 0; __pyx_pybuffernd_index.data = NULL; __pyx_pybuffernd_index.rcbuffer = &__pyx_pybuffer_index; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_index.rcbuffer->pybuffer, (PyObject*)__pyx_v_index, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2102; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_index.diminfo[0].strides = __pyx_pybuffernd_index.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_index.diminfo[0].shape = __pyx_pybuffernd_index.rcbuffer->pybuffer.shape[0]; /* "pandas/src/generated.pyx":2103 * @cython.boundscheck(False) * def groupby_bool(ndarray[uint8_t] index, ndarray labels): * cdef dict result = {} # <<<<<<<<<<<<<< * cdef Py_ssize_t i, length * cdef list members */ __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2103; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_v_result = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/generated.pyx":2108 * cdef object idx, key * * length = len(index) # <<<<<<<<<<<<<< * * if not length == len(labels): */ __pyx_t_2 = PyObject_Length(((PyObject *)__pyx_v_index)); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2108; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_length = __pyx_t_2; /* "pandas/src/generated.pyx":2110 * length = len(index) * * if not length == len(labels): # <<<<<<<<<<<<<< * raise AssertionError("len(index) != len(labels)") * */ __pyx_t_2 = PyObject_Length(((PyObject *)__pyx_v_labels)); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2110; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_3 = ((!((__pyx_v_length == __pyx_t_2) != 0)) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":2111 * * if not length == len(labels): * raise AssertionError("len(index) != len(labels)") # <<<<<<<<<<<<<< * * for i in range(length): */ __pyx_t_1 = PyObject_Call(__pyx_builtin_AssertionError, ((PyObject *)__pyx_k_tuple_105), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2111; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 2111; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L3; } __pyx_L3:; /* "pandas/src/generated.pyx":2113 * raise AssertionError("len(index) != len(labels)") * * for i in range(length): # <<<<<<<<<<<<<< * key = util.get_value_1d(labels, i) * */ __pyx_t_2 = __pyx_v_length; for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_2; __pyx_t_4+=1) { __pyx_v_i = __pyx_t_4; /* "pandas/src/generated.pyx":2114 * * for i in range(length): * key = util.get_value_1d(labels, i) # <<<<<<<<<<<<<< * * if _checknull(key): */ __pyx_t_1 = get_value_1d(__pyx_v_labels, __pyx_v_i); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2114; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_XDECREF_SET(__pyx_v_key, __pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/generated.pyx":2116 * key = util.get_value_1d(labels, i) * * if _checknull(key): # <<<<<<<<<<<<<< * continue * */ __pyx_t_3 = (__pyx_f_4util__checknull(__pyx_v_key) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":2117 * * if _checknull(key): * continue # <<<<<<<<<<<<<< * * idx = index[i] */ goto __pyx_L4_continue; goto __pyx_L6; } __pyx_L6:; /* "pandas/src/generated.pyx":2119 * continue * * idx = index[i] # <<<<<<<<<<<<<< * if key in result: * members = result[key] */ __pyx_t_5 = __pyx_v_i; __pyx_t_1 = __Pyx_PyInt_to_py_npy_uint8((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_index.rcbuffer->pybuffer.buf, __pyx_t_5, __pyx_pybuffernd_index.diminfo[0].strides))); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2119; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_XDECREF_SET(__pyx_v_idx, __pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/generated.pyx":2120 * * idx = index[i] * if key in result: # <<<<<<<<<<<<<< * members = result[key] * members.append(idx) */ __pyx_t_3 = (__Pyx_PyDict_Contains(__pyx_v_key, ((PyObject *)__pyx_v_result), Py_EQ)); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2120; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_6 = (__pyx_t_3 != 0); if (__pyx_t_6) { /* "pandas/src/generated.pyx":2121 * idx = index[i] * if key in result: * members = result[key] # <<<<<<<<<<<<<< * members.append(idx) * else: */ __pyx_t_1 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_result), __pyx_v_key); if (!__pyx_t_1) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2121; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (!(likely(PyList_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected list, got %.200s", Py_TYPE(__pyx_t_1)->tp_name), 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2121; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_XDECREF_SET(__pyx_v_members, ((PyObject*)__pyx_t_1)); __pyx_t_1 = 0; /* "pandas/src/generated.pyx":2122 * if key in result: * members = result[key] * members.append(idx) # <<<<<<<<<<<<<< * else: * result[key] = [idx] */ if (unlikely(((PyObject *)__pyx_v_members) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "append"); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2122; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_7 = __Pyx_PyList_Append(__pyx_v_members, __pyx_v_idx); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2122; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L7; } /*else*/ { /* "pandas/src/generated.pyx":2124 * members.append(idx) * else: * result[key] = [idx] # <<<<<<<<<<<<<< * * return result */ __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2124; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_idx); PyList_SET_ITEM(__pyx_t_1, 0, __pyx_v_idx); __Pyx_GIVEREF(__pyx_v_idx); if (PyDict_SetItem(((PyObject *)__pyx_v_result), __pyx_v_key, ((PyObject *)__pyx_t_1)) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2124; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; } __pyx_L7:; __pyx_L4_continue:; } /* "pandas/src/generated.pyx":2126 * result[key] = [idx] * * return result # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_result)); __pyx_r = ((PyObject *)__pyx_v_result); goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_index.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.groupby_bool", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_index.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF(__pyx_v_result); __Pyx_XDECREF(__pyx_v_members); __Pyx_XDECREF(__pyx_v_idx); __Pyx_XDECREF(__pyx_v_key); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_211arrmap_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_211arrmap_float64 = {__Pyx_NAMESTR("arrmap_float64"), (PyCFunction)__pyx_pw_6pandas_5algos_211arrmap_float64, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_211arrmap_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_index = 0; PyObject *__pyx_v_func = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("arrmap_float64 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__index,&__pyx_n_s__func,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__index)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__func)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("arrmap_float64", 1, 2, 2, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2131; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "arrmap_float64") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2131; __pyx_clineno = __LINE__; goto __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_index = ((PyArrayObject *)values[0]); __pyx_v_func = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("arrmap_float64", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2131; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.arrmap_float64", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_index), __pyx_ptype_5numpy_ndarray, 1, "index", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2131; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_210arrmap_float64(__pyx_self, __pyx_v_index, __pyx_v_func); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":2131 * @cython.wraparound(False) * @cython.boundscheck(False) * def arrmap_float64(ndarray[float64_t] index, object func): # <<<<<<<<<<<<<< * cdef Py_ssize_t length = index.shape[0] * cdef Py_ssize_t i = 0 */ static PyObject *__pyx_pf_6pandas_5algos_210arrmap_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_index, PyObject *__pyx_v_func) { Py_ssize_t __pyx_v_length; Py_ssize_t __pyx_v_i; PyArrayObject *__pyx_v_result = 0; PyObject *__pyx_v_maybe_convert_objects = NULL; __Pyx_LocalBuf_ND __pyx_pybuffernd_index; __Pyx_Buffer __pyx_pybuffer_index; __Pyx_LocalBuf_ND __pyx_pybuffernd_result; __Pyx_Buffer __pyx_pybuffer_result; 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; Py_ssize_t __pyx_t_7; Py_ssize_t __pyx_t_8; Py_ssize_t __pyx_t_9; Py_ssize_t __pyx_t_10; PyObject **__pyx_t_11; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("arrmap_float64", 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_index.pybuffer.buf = NULL; __pyx_pybuffer_index.refcount = 0; __pyx_pybuffernd_index.data = NULL; __pyx_pybuffernd_index.rcbuffer = &__pyx_pybuffer_index; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_index.rcbuffer->pybuffer, (PyObject*)__pyx_v_index, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2131; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_index.diminfo[0].strides = __pyx_pybuffernd_index.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_index.diminfo[0].shape = __pyx_pybuffernd_index.rcbuffer->pybuffer.shape[0]; /* "pandas/src/generated.pyx":2132 * @cython.boundscheck(False) * def arrmap_float64(ndarray[float64_t] index, object func): * cdef Py_ssize_t length = index.shape[0] # <<<<<<<<<<<<<< * cdef Py_ssize_t i = 0 * */ __pyx_v_length = (__pyx_v_index->dimensions[0]); /* "pandas/src/generated.pyx":2133 * def arrmap_float64(ndarray[float64_t] index, object func): * cdef Py_ssize_t length = index.shape[0] * cdef Py_ssize_t i = 0 # <<<<<<<<<<<<<< * * cdef ndarray[object] result = np.empty(length, dtype=np.object_) */ __pyx_v_i = 0; /* "pandas/src/generated.pyx":2135 * cdef Py_ssize_t i = 0 * * cdef ndarray[object] result = np.empty(length, dtype=np.object_) # <<<<<<<<<<<<<< * * from pandas.lib import maybe_convert_objects */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2135; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 2135; __pyx_clineno = __LINE__; goto __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_length); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2135; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2135; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2135; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2135; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s__object_); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2135; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__dtype), __pyx_t_5) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2135; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_3), ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2135; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__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_filename = __pyx_f[2]; __pyx_lineno = 2135; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_6 = ((PyArrayObject *)__pyx_t_5); { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { __pyx_v_result = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_result.rcbuffer->pybuffer.buf = NULL; {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2135; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } else {__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]; } } __pyx_t_6 = 0; __pyx_v_result = ((PyArrayObject *)__pyx_t_5); __pyx_t_5 = 0; /* "pandas/src/generated.pyx":2137 * cdef ndarray[object] result = np.empty(length, dtype=np.object_) * * from pandas.lib import maybe_convert_objects # <<<<<<<<<<<<<< * * for i in range(length): */ __pyx_t_5 = PyList_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2137; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(((PyObject *)__pyx_n_s_107)); PyList_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_n_s_107)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s_107)); __pyx_t_1 = __Pyx_Import(((PyObject *)__pyx_n_s_106), ((PyObject *)__pyx_t_5), -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2137; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_107); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2137; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_t_5); __pyx_v_maybe_convert_objects = __pyx_t_5; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/generated.pyx":2139 * from pandas.lib import maybe_convert_objects * * for i in range(length): # <<<<<<<<<<<<<< * result[i] = func(index[i]) * */ __pyx_t_7 = __pyx_v_length; for (__pyx_t_8 = 0; __pyx_t_8 < __pyx_t_7; __pyx_t_8+=1) { __pyx_v_i = __pyx_t_8; /* "pandas/src/generated.pyx":2140 * * for i in range(length): * result[i] = func(index[i]) # <<<<<<<<<<<<<< * * return maybe_convert_objects(result) */ __pyx_t_9 = __pyx_v_i; __pyx_t_1 = PyFloat_FromDouble((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_index.rcbuffer->pybuffer.buf, __pyx_t_9, __pyx_pybuffernd_index.diminfo[0].strides))); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2140; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2140; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyObject_Call(__pyx_v_func, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2140; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; __pyx_t_10 = __pyx_v_i; __pyx_t_11 = __Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_10, __pyx_pybuffernd_result.diminfo[0].strides); __Pyx_GOTREF(*__pyx_t_11); __Pyx_INCREF(__pyx_t_1); __Pyx_DECREF(*__pyx_t_11); *__pyx_t_11 = __pyx_t_1; __Pyx_GIVEREF(*__pyx_t_11); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } /* "pandas/src/generated.pyx":2142 * result[i] = func(index[i]) * * return maybe_convert_objects(result) # <<<<<<<<<<<<<< * * @cython.wraparound(False) */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2142; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)__pyx_v_result)); PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_result)); __Pyx_GIVEREF(((PyObject *)__pyx_v_result)); __pyx_t_5 = PyObject_Call(__pyx_v_maybe_convert_objects, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2142; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_r = __pyx_t_5; __pyx_t_5 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_index.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.arrmap_float64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_index.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_result); __Pyx_XDECREF(__pyx_v_maybe_convert_objects); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_213arrmap_float32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_213arrmap_float32 = {__Pyx_NAMESTR("arrmap_float32"), (PyCFunction)__pyx_pw_6pandas_5algos_213arrmap_float32, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_213arrmap_float32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_index = 0; PyObject *__pyx_v_func = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("arrmap_float32 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__index,&__pyx_n_s__func,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__index)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__func)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("arrmap_float32", 1, 2, 2, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2146; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "arrmap_float32") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2146; __pyx_clineno = __LINE__; goto __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_index = ((PyArrayObject *)values[0]); __pyx_v_func = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("arrmap_float32", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2146; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.arrmap_float32", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_index), __pyx_ptype_5numpy_ndarray, 1, "index", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2146; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_212arrmap_float32(__pyx_self, __pyx_v_index, __pyx_v_func); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":2146 * @cython.wraparound(False) * @cython.boundscheck(False) * def arrmap_float32(ndarray[float32_t] index, object func): # <<<<<<<<<<<<<< * cdef Py_ssize_t length = index.shape[0] * cdef Py_ssize_t i = 0 */ static PyObject *__pyx_pf_6pandas_5algos_212arrmap_float32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_index, PyObject *__pyx_v_func) { Py_ssize_t __pyx_v_length; Py_ssize_t __pyx_v_i; PyArrayObject *__pyx_v_result = 0; PyObject *__pyx_v_maybe_convert_objects = NULL; __Pyx_LocalBuf_ND __pyx_pybuffernd_index; __Pyx_Buffer __pyx_pybuffer_index; __Pyx_LocalBuf_ND __pyx_pybuffernd_result; __Pyx_Buffer __pyx_pybuffer_result; 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; Py_ssize_t __pyx_t_7; Py_ssize_t __pyx_t_8; Py_ssize_t __pyx_t_9; Py_ssize_t __pyx_t_10; PyObject **__pyx_t_11; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("arrmap_float32", 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_index.pybuffer.buf = NULL; __pyx_pybuffer_index.refcount = 0; __pyx_pybuffernd_index.data = NULL; __pyx_pybuffernd_index.rcbuffer = &__pyx_pybuffer_index; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_index.rcbuffer->pybuffer, (PyObject*)__pyx_v_index, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2146; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_index.diminfo[0].strides = __pyx_pybuffernd_index.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_index.diminfo[0].shape = __pyx_pybuffernd_index.rcbuffer->pybuffer.shape[0]; /* "pandas/src/generated.pyx":2147 * @cython.boundscheck(False) * def arrmap_float32(ndarray[float32_t] index, object func): * cdef Py_ssize_t length = index.shape[0] # <<<<<<<<<<<<<< * cdef Py_ssize_t i = 0 * */ __pyx_v_length = (__pyx_v_index->dimensions[0]); /* "pandas/src/generated.pyx":2148 * def arrmap_float32(ndarray[float32_t] index, object func): * cdef Py_ssize_t length = index.shape[0] * cdef Py_ssize_t i = 0 # <<<<<<<<<<<<<< * * cdef ndarray[object] result = np.empty(length, dtype=np.object_) */ __pyx_v_i = 0; /* "pandas/src/generated.pyx":2150 * cdef Py_ssize_t i = 0 * * cdef ndarray[object] result = np.empty(length, dtype=np.object_) # <<<<<<<<<<<<<< * * from pandas.lib import maybe_convert_objects */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2150; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 2150; __pyx_clineno = __LINE__; goto __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_length); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2150; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2150; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2150; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2150; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s__object_); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2150; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__dtype), __pyx_t_5) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2150; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_3), ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2150; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__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_filename = __pyx_f[2]; __pyx_lineno = 2150; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_6 = ((PyArrayObject *)__pyx_t_5); { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { __pyx_v_result = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_result.rcbuffer->pybuffer.buf = NULL; {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2150; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } else {__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]; } } __pyx_t_6 = 0; __pyx_v_result = ((PyArrayObject *)__pyx_t_5); __pyx_t_5 = 0; /* "pandas/src/generated.pyx":2152 * cdef ndarray[object] result = np.empty(length, dtype=np.object_) * * from pandas.lib import maybe_convert_objects # <<<<<<<<<<<<<< * * for i in range(length): */ __pyx_t_5 = PyList_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2152; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(((PyObject *)__pyx_n_s_107)); PyList_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_n_s_107)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s_107)); __pyx_t_1 = __Pyx_Import(((PyObject *)__pyx_n_s_106), ((PyObject *)__pyx_t_5), -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2152; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_107); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2152; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_t_5); __pyx_v_maybe_convert_objects = __pyx_t_5; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/generated.pyx":2154 * from pandas.lib import maybe_convert_objects * * for i in range(length): # <<<<<<<<<<<<<< * result[i] = func(index[i]) * */ __pyx_t_7 = __pyx_v_length; for (__pyx_t_8 = 0; __pyx_t_8 < __pyx_t_7; __pyx_t_8+=1) { __pyx_v_i = __pyx_t_8; /* "pandas/src/generated.pyx":2155 * * for i in range(length): * result[i] = func(index[i]) # <<<<<<<<<<<<<< * * return maybe_convert_objects(result) */ __pyx_t_9 = __pyx_v_i; __pyx_t_1 = PyFloat_FromDouble((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_index.rcbuffer->pybuffer.buf, __pyx_t_9, __pyx_pybuffernd_index.diminfo[0].strides))); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2155; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2155; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyObject_Call(__pyx_v_func, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2155; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; __pyx_t_10 = __pyx_v_i; __pyx_t_11 = __Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_10, __pyx_pybuffernd_result.diminfo[0].strides); __Pyx_GOTREF(*__pyx_t_11); __Pyx_INCREF(__pyx_t_1); __Pyx_DECREF(*__pyx_t_11); *__pyx_t_11 = __pyx_t_1; __Pyx_GIVEREF(*__pyx_t_11); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } /* "pandas/src/generated.pyx":2157 * result[i] = func(index[i]) * * return maybe_convert_objects(result) # <<<<<<<<<<<<<< * * @cython.wraparound(False) */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2157; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)__pyx_v_result)); PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_result)); __Pyx_GIVEREF(((PyObject *)__pyx_v_result)); __pyx_t_5 = PyObject_Call(__pyx_v_maybe_convert_objects, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2157; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_r = __pyx_t_5; __pyx_t_5 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_index.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.arrmap_float32", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_index.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_result); __Pyx_XDECREF(__pyx_v_maybe_convert_objects); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_215arrmap_object(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_215arrmap_object = {__Pyx_NAMESTR("arrmap_object"), (PyCFunction)__pyx_pw_6pandas_5algos_215arrmap_object, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_215arrmap_object(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_index = 0; PyObject *__pyx_v_func = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("arrmap_object (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__index,&__pyx_n_s__func,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__index)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__func)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("arrmap_object", 1, 2, 2, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2161; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "arrmap_object") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2161; __pyx_clineno = __LINE__; goto __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_index = ((PyArrayObject *)values[0]); __pyx_v_func = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("arrmap_object", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2161; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.arrmap_object", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_index), __pyx_ptype_5numpy_ndarray, 1, "index", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2161; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_214arrmap_object(__pyx_self, __pyx_v_index, __pyx_v_func); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":2161 * @cython.wraparound(False) * @cython.boundscheck(False) * def arrmap_object(ndarray[object] index, object func): # <<<<<<<<<<<<<< * cdef Py_ssize_t length = index.shape[0] * cdef Py_ssize_t i = 0 */ static PyObject *__pyx_pf_6pandas_5algos_214arrmap_object(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_index, PyObject *__pyx_v_func) { Py_ssize_t __pyx_v_length; Py_ssize_t __pyx_v_i; PyArrayObject *__pyx_v_result = 0; PyObject *__pyx_v_maybe_convert_objects = NULL; __Pyx_LocalBuf_ND __pyx_pybuffernd_index; __Pyx_Buffer __pyx_pybuffer_index; __Pyx_LocalBuf_ND __pyx_pybuffernd_result; __Pyx_Buffer __pyx_pybuffer_result; 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; Py_ssize_t __pyx_t_7; Py_ssize_t __pyx_t_8; Py_ssize_t __pyx_t_9; Py_ssize_t __pyx_t_10; PyObject **__pyx_t_11; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("arrmap_object", 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_index.pybuffer.buf = NULL; __pyx_pybuffer_index.refcount = 0; __pyx_pybuffernd_index.data = NULL; __pyx_pybuffernd_index.rcbuffer = &__pyx_pybuffer_index; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_index.rcbuffer->pybuffer, (PyObject*)__pyx_v_index, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2161; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_index.diminfo[0].strides = __pyx_pybuffernd_index.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_index.diminfo[0].shape = __pyx_pybuffernd_index.rcbuffer->pybuffer.shape[0]; /* "pandas/src/generated.pyx":2162 * @cython.boundscheck(False) * def arrmap_object(ndarray[object] index, object func): * cdef Py_ssize_t length = index.shape[0] # <<<<<<<<<<<<<< * cdef Py_ssize_t i = 0 * */ __pyx_v_length = (__pyx_v_index->dimensions[0]); /* "pandas/src/generated.pyx":2163 * def arrmap_object(ndarray[object] index, object func): * cdef Py_ssize_t length = index.shape[0] * cdef Py_ssize_t i = 0 # <<<<<<<<<<<<<< * * cdef ndarray[object] result = np.empty(length, dtype=np.object_) */ __pyx_v_i = 0; /* "pandas/src/generated.pyx":2165 * cdef Py_ssize_t i = 0 * * cdef ndarray[object] result = np.empty(length, dtype=np.object_) # <<<<<<<<<<<<<< * * from pandas.lib import maybe_convert_objects */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2165; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 2165; __pyx_clineno = __LINE__; goto __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_length); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2165; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2165; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2165; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2165; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s__object_); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2165; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__dtype), __pyx_t_5) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2165; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_3), ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2165; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__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_filename = __pyx_f[2]; __pyx_lineno = 2165; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_6 = ((PyArrayObject *)__pyx_t_5); { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { __pyx_v_result = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_result.rcbuffer->pybuffer.buf = NULL; {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2165; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } else {__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]; } } __pyx_t_6 = 0; __pyx_v_result = ((PyArrayObject *)__pyx_t_5); __pyx_t_5 = 0; /* "pandas/src/generated.pyx":2167 * cdef ndarray[object] result = np.empty(length, dtype=np.object_) * * from pandas.lib import maybe_convert_objects # <<<<<<<<<<<<<< * * for i in range(length): */ __pyx_t_5 = PyList_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2167; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(((PyObject *)__pyx_n_s_107)); PyList_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_n_s_107)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s_107)); __pyx_t_1 = __Pyx_Import(((PyObject *)__pyx_n_s_106), ((PyObject *)__pyx_t_5), -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2167; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_107); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2167; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_t_5); __pyx_v_maybe_convert_objects = __pyx_t_5; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/generated.pyx":2169 * from pandas.lib import maybe_convert_objects * * for i in range(length): # <<<<<<<<<<<<<< * result[i] = func(index[i]) * */ __pyx_t_7 = __pyx_v_length; for (__pyx_t_8 = 0; __pyx_t_8 < __pyx_t_7; __pyx_t_8+=1) { __pyx_v_i = __pyx_t_8; /* "pandas/src/generated.pyx":2170 * * for i in range(length): * result[i] = func(index[i]) # <<<<<<<<<<<<<< * * return maybe_convert_objects(result) */ __pyx_t_9 = __pyx_v_i; __pyx_t_1 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_index.rcbuffer->pybuffer.buf, __pyx_t_9, __pyx_pybuffernd_index.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_1); __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2170; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyObject_Call(__pyx_v_func, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2170; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; __pyx_t_10 = __pyx_v_i; __pyx_t_11 = __Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_10, __pyx_pybuffernd_result.diminfo[0].strides); __Pyx_GOTREF(*__pyx_t_11); __Pyx_INCREF(__pyx_t_1); __Pyx_DECREF(*__pyx_t_11); *__pyx_t_11 = __pyx_t_1; __Pyx_GIVEREF(*__pyx_t_11); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } /* "pandas/src/generated.pyx":2172 * result[i] = func(index[i]) * * return maybe_convert_objects(result) # <<<<<<<<<<<<<< * * @cython.wraparound(False) */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2172; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)__pyx_v_result)); PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_result)); __Pyx_GIVEREF(((PyObject *)__pyx_v_result)); __pyx_t_5 = PyObject_Call(__pyx_v_maybe_convert_objects, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2172; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_r = __pyx_t_5; __pyx_t_5 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_index.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.arrmap_object", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_index.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_result); __Pyx_XDECREF(__pyx_v_maybe_convert_objects); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_217arrmap_int32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_217arrmap_int32 = {__Pyx_NAMESTR("arrmap_int32"), (PyCFunction)__pyx_pw_6pandas_5algos_217arrmap_int32, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_217arrmap_int32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_index = 0; PyObject *__pyx_v_func = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("arrmap_int32 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__index,&__pyx_n_s__func,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__index)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__func)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("arrmap_int32", 1, 2, 2, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2176; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "arrmap_int32") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2176; __pyx_clineno = __LINE__; goto __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_index = ((PyArrayObject *)values[0]); __pyx_v_func = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("arrmap_int32", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2176; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.arrmap_int32", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_index), __pyx_ptype_5numpy_ndarray, 1, "index", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2176; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_216arrmap_int32(__pyx_self, __pyx_v_index, __pyx_v_func); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":2176 * @cython.wraparound(False) * @cython.boundscheck(False) * def arrmap_int32(ndarray[int32_t] index, object func): # <<<<<<<<<<<<<< * cdef Py_ssize_t length = index.shape[0] * cdef Py_ssize_t i = 0 */ static PyObject *__pyx_pf_6pandas_5algos_216arrmap_int32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_index, PyObject *__pyx_v_func) { Py_ssize_t __pyx_v_length; Py_ssize_t __pyx_v_i; PyArrayObject *__pyx_v_result = 0; PyObject *__pyx_v_maybe_convert_objects = NULL; __Pyx_LocalBuf_ND __pyx_pybuffernd_index; __Pyx_Buffer __pyx_pybuffer_index; __Pyx_LocalBuf_ND __pyx_pybuffernd_result; __Pyx_Buffer __pyx_pybuffer_result; 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; Py_ssize_t __pyx_t_7; Py_ssize_t __pyx_t_8; Py_ssize_t __pyx_t_9; Py_ssize_t __pyx_t_10; PyObject **__pyx_t_11; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("arrmap_int32", 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_index.pybuffer.buf = NULL; __pyx_pybuffer_index.refcount = 0; __pyx_pybuffernd_index.data = NULL; __pyx_pybuffernd_index.rcbuffer = &__pyx_pybuffer_index; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_index.rcbuffer->pybuffer, (PyObject*)__pyx_v_index, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2176; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_index.diminfo[0].strides = __pyx_pybuffernd_index.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_index.diminfo[0].shape = __pyx_pybuffernd_index.rcbuffer->pybuffer.shape[0]; /* "pandas/src/generated.pyx":2177 * @cython.boundscheck(False) * def arrmap_int32(ndarray[int32_t] index, object func): * cdef Py_ssize_t length = index.shape[0] # <<<<<<<<<<<<<< * cdef Py_ssize_t i = 0 * */ __pyx_v_length = (__pyx_v_index->dimensions[0]); /* "pandas/src/generated.pyx":2178 * def arrmap_int32(ndarray[int32_t] index, object func): * cdef Py_ssize_t length = index.shape[0] * cdef Py_ssize_t i = 0 # <<<<<<<<<<<<<< * * cdef ndarray[object] result = np.empty(length, dtype=np.object_) */ __pyx_v_i = 0; /* "pandas/src/generated.pyx":2180 * cdef Py_ssize_t i = 0 * * cdef ndarray[object] result = np.empty(length, dtype=np.object_) # <<<<<<<<<<<<<< * * from pandas.lib import maybe_convert_objects */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2180; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 2180; __pyx_clineno = __LINE__; goto __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_length); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2180; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2180; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2180; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2180; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s__object_); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2180; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__dtype), __pyx_t_5) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2180; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_3), ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2180; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__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_filename = __pyx_f[2]; __pyx_lineno = 2180; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_6 = ((PyArrayObject *)__pyx_t_5); { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { __pyx_v_result = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_result.rcbuffer->pybuffer.buf = NULL; {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2180; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } else {__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]; } } __pyx_t_6 = 0; __pyx_v_result = ((PyArrayObject *)__pyx_t_5); __pyx_t_5 = 0; /* "pandas/src/generated.pyx":2182 * cdef ndarray[object] result = np.empty(length, dtype=np.object_) * * from pandas.lib import maybe_convert_objects # <<<<<<<<<<<<<< * * for i in range(length): */ __pyx_t_5 = PyList_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2182; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(((PyObject *)__pyx_n_s_107)); PyList_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_n_s_107)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s_107)); __pyx_t_1 = __Pyx_Import(((PyObject *)__pyx_n_s_106), ((PyObject *)__pyx_t_5), -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2182; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_107); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2182; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_t_5); __pyx_v_maybe_convert_objects = __pyx_t_5; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/generated.pyx":2184 * from pandas.lib import maybe_convert_objects * * for i in range(length): # <<<<<<<<<<<<<< * result[i] = func(index[i]) * */ __pyx_t_7 = __pyx_v_length; for (__pyx_t_8 = 0; __pyx_t_8 < __pyx_t_7; __pyx_t_8+=1) { __pyx_v_i = __pyx_t_8; /* "pandas/src/generated.pyx":2185 * * for i in range(length): * result[i] = func(index[i]) # <<<<<<<<<<<<<< * * return maybe_convert_objects(result) */ __pyx_t_9 = __pyx_v_i; __pyx_t_1 = __Pyx_PyInt_to_py_npy_int32((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_index.rcbuffer->pybuffer.buf, __pyx_t_9, __pyx_pybuffernd_index.diminfo[0].strides))); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2185; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2185; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyObject_Call(__pyx_v_func, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2185; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; __pyx_t_10 = __pyx_v_i; __pyx_t_11 = __Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_10, __pyx_pybuffernd_result.diminfo[0].strides); __Pyx_GOTREF(*__pyx_t_11); __Pyx_INCREF(__pyx_t_1); __Pyx_DECREF(*__pyx_t_11); *__pyx_t_11 = __pyx_t_1; __Pyx_GIVEREF(*__pyx_t_11); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } /* "pandas/src/generated.pyx":2187 * result[i] = func(index[i]) * * return maybe_convert_objects(result) # <<<<<<<<<<<<<< * * @cython.wraparound(False) */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2187; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)__pyx_v_result)); PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_result)); __Pyx_GIVEREF(((PyObject *)__pyx_v_result)); __pyx_t_5 = PyObject_Call(__pyx_v_maybe_convert_objects, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2187; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_r = __pyx_t_5; __pyx_t_5 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_index.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.arrmap_int32", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_index.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_result); __Pyx_XDECREF(__pyx_v_maybe_convert_objects); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_219arrmap_int64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_219arrmap_int64 = {__Pyx_NAMESTR("arrmap_int64"), (PyCFunction)__pyx_pw_6pandas_5algos_219arrmap_int64, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_219arrmap_int64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_index = 0; PyObject *__pyx_v_func = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("arrmap_int64 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__index,&__pyx_n_s__func,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__index)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__func)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("arrmap_int64", 1, 2, 2, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2191; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "arrmap_int64") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2191; __pyx_clineno = __LINE__; goto __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_index = ((PyArrayObject *)values[0]); __pyx_v_func = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("arrmap_int64", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2191; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.arrmap_int64", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_index), __pyx_ptype_5numpy_ndarray, 1, "index", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2191; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_218arrmap_int64(__pyx_self, __pyx_v_index, __pyx_v_func); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":2191 * @cython.wraparound(False) * @cython.boundscheck(False) * def arrmap_int64(ndarray[int64_t] index, object func): # <<<<<<<<<<<<<< * cdef Py_ssize_t length = index.shape[0] * cdef Py_ssize_t i = 0 */ static PyObject *__pyx_pf_6pandas_5algos_218arrmap_int64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_index, PyObject *__pyx_v_func) { Py_ssize_t __pyx_v_length; Py_ssize_t __pyx_v_i; PyArrayObject *__pyx_v_result = 0; PyObject *__pyx_v_maybe_convert_objects = NULL; __Pyx_LocalBuf_ND __pyx_pybuffernd_index; __Pyx_Buffer __pyx_pybuffer_index; __Pyx_LocalBuf_ND __pyx_pybuffernd_result; __Pyx_Buffer __pyx_pybuffer_result; 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; Py_ssize_t __pyx_t_7; Py_ssize_t __pyx_t_8; Py_ssize_t __pyx_t_9; Py_ssize_t __pyx_t_10; PyObject **__pyx_t_11; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("arrmap_int64", 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_index.pybuffer.buf = NULL; __pyx_pybuffer_index.refcount = 0; __pyx_pybuffernd_index.data = NULL; __pyx_pybuffernd_index.rcbuffer = &__pyx_pybuffer_index; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_index.rcbuffer->pybuffer, (PyObject*)__pyx_v_index, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2191; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_index.diminfo[0].strides = __pyx_pybuffernd_index.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_index.diminfo[0].shape = __pyx_pybuffernd_index.rcbuffer->pybuffer.shape[0]; /* "pandas/src/generated.pyx":2192 * @cython.boundscheck(False) * def arrmap_int64(ndarray[int64_t] index, object func): * cdef Py_ssize_t length = index.shape[0] # <<<<<<<<<<<<<< * cdef Py_ssize_t i = 0 * */ __pyx_v_length = (__pyx_v_index->dimensions[0]); /* "pandas/src/generated.pyx":2193 * def arrmap_int64(ndarray[int64_t] index, object func): * cdef Py_ssize_t length = index.shape[0] * cdef Py_ssize_t i = 0 # <<<<<<<<<<<<<< * * cdef ndarray[object] result = np.empty(length, dtype=np.object_) */ __pyx_v_i = 0; /* "pandas/src/generated.pyx":2195 * cdef Py_ssize_t i = 0 * * cdef ndarray[object] result = np.empty(length, dtype=np.object_) # <<<<<<<<<<<<<< * * from pandas.lib import maybe_convert_objects */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2195; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 2195; __pyx_clineno = __LINE__; goto __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_length); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2195; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2195; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2195; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2195; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s__object_); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2195; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__dtype), __pyx_t_5) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2195; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_3), ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2195; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__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_filename = __pyx_f[2]; __pyx_lineno = 2195; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_6 = ((PyArrayObject *)__pyx_t_5); { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { __pyx_v_result = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_result.rcbuffer->pybuffer.buf = NULL; {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2195; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } else {__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]; } } __pyx_t_6 = 0; __pyx_v_result = ((PyArrayObject *)__pyx_t_5); __pyx_t_5 = 0; /* "pandas/src/generated.pyx":2197 * cdef ndarray[object] result = np.empty(length, dtype=np.object_) * * from pandas.lib import maybe_convert_objects # <<<<<<<<<<<<<< * * for i in range(length): */ __pyx_t_5 = PyList_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2197; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(((PyObject *)__pyx_n_s_107)); PyList_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_n_s_107)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s_107)); __pyx_t_1 = __Pyx_Import(((PyObject *)__pyx_n_s_106), ((PyObject *)__pyx_t_5), -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2197; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_107); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2197; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_t_5); __pyx_v_maybe_convert_objects = __pyx_t_5; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/generated.pyx":2199 * from pandas.lib import maybe_convert_objects * * for i in range(length): # <<<<<<<<<<<<<< * result[i] = func(index[i]) * */ __pyx_t_7 = __pyx_v_length; for (__pyx_t_8 = 0; __pyx_t_8 < __pyx_t_7; __pyx_t_8+=1) { __pyx_v_i = __pyx_t_8; /* "pandas/src/generated.pyx":2200 * * for i in range(length): * result[i] = func(index[i]) # <<<<<<<<<<<<<< * * return maybe_convert_objects(result) */ __pyx_t_9 = __pyx_v_i; __pyx_t_1 = __Pyx_PyInt_to_py_npy_int64((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_index.rcbuffer->pybuffer.buf, __pyx_t_9, __pyx_pybuffernd_index.diminfo[0].strides))); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2200; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2200; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyObject_Call(__pyx_v_func, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2200; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; __pyx_t_10 = __pyx_v_i; __pyx_t_11 = __Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_10, __pyx_pybuffernd_result.diminfo[0].strides); __Pyx_GOTREF(*__pyx_t_11); __Pyx_INCREF(__pyx_t_1); __Pyx_DECREF(*__pyx_t_11); *__pyx_t_11 = __pyx_t_1; __Pyx_GIVEREF(*__pyx_t_11); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } /* "pandas/src/generated.pyx":2202 * result[i] = func(index[i]) * * return maybe_convert_objects(result) # <<<<<<<<<<<<<< * * @cython.wraparound(False) */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2202; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)__pyx_v_result)); PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_result)); __Pyx_GIVEREF(((PyObject *)__pyx_v_result)); __pyx_t_5 = PyObject_Call(__pyx_v_maybe_convert_objects, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2202; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_r = __pyx_t_5; __pyx_t_5 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_index.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.arrmap_int64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_index.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_result); __Pyx_XDECREF(__pyx_v_maybe_convert_objects); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_221arrmap_bool(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_221arrmap_bool = {__Pyx_NAMESTR("arrmap_bool"), (PyCFunction)__pyx_pw_6pandas_5algos_221arrmap_bool, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_221arrmap_bool(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_index = 0; PyObject *__pyx_v_func = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("arrmap_bool (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__index,&__pyx_n_s__func,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__index)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__func)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("arrmap_bool", 1, 2, 2, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2206; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "arrmap_bool") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2206; __pyx_clineno = __LINE__; goto __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_index = ((PyArrayObject *)values[0]); __pyx_v_func = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("arrmap_bool", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2206; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.arrmap_bool", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_index), __pyx_ptype_5numpy_ndarray, 1, "index", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2206; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_220arrmap_bool(__pyx_self, __pyx_v_index, __pyx_v_func); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":2206 * @cython.wraparound(False) * @cython.boundscheck(False) * def arrmap_bool(ndarray[uint8_t] index, object func): # <<<<<<<<<<<<<< * cdef Py_ssize_t length = index.shape[0] * cdef Py_ssize_t i = 0 */ static PyObject *__pyx_pf_6pandas_5algos_220arrmap_bool(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_index, PyObject *__pyx_v_func) { Py_ssize_t __pyx_v_length; Py_ssize_t __pyx_v_i; PyArrayObject *__pyx_v_result = 0; PyObject *__pyx_v_maybe_convert_objects = NULL; __Pyx_LocalBuf_ND __pyx_pybuffernd_index; __Pyx_Buffer __pyx_pybuffer_index; __Pyx_LocalBuf_ND __pyx_pybuffernd_result; __Pyx_Buffer __pyx_pybuffer_result; 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; Py_ssize_t __pyx_t_7; Py_ssize_t __pyx_t_8; Py_ssize_t __pyx_t_9; Py_ssize_t __pyx_t_10; PyObject **__pyx_t_11; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("arrmap_bool", 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_index.pybuffer.buf = NULL; __pyx_pybuffer_index.refcount = 0; __pyx_pybuffernd_index.data = NULL; __pyx_pybuffernd_index.rcbuffer = &__pyx_pybuffer_index; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_index.rcbuffer->pybuffer, (PyObject*)__pyx_v_index, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2206; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_index.diminfo[0].strides = __pyx_pybuffernd_index.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_index.diminfo[0].shape = __pyx_pybuffernd_index.rcbuffer->pybuffer.shape[0]; /* "pandas/src/generated.pyx":2207 * @cython.boundscheck(False) * def arrmap_bool(ndarray[uint8_t] index, object func): * cdef Py_ssize_t length = index.shape[0] # <<<<<<<<<<<<<< * cdef Py_ssize_t i = 0 * */ __pyx_v_length = (__pyx_v_index->dimensions[0]); /* "pandas/src/generated.pyx":2208 * def arrmap_bool(ndarray[uint8_t] index, object func): * cdef Py_ssize_t length = index.shape[0] * cdef Py_ssize_t i = 0 # <<<<<<<<<<<<<< * * cdef ndarray[object] result = np.empty(length, dtype=np.object_) */ __pyx_v_i = 0; /* "pandas/src/generated.pyx":2210 * cdef Py_ssize_t i = 0 * * cdef ndarray[object] result = np.empty(length, dtype=np.object_) # <<<<<<<<<<<<<< * * from pandas.lib import maybe_convert_objects */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2210; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 2210; __pyx_clineno = __LINE__; goto __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_length); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2210; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2210; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2210; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2210; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s__object_); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2210; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__dtype), __pyx_t_5) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2210; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_3), ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2210; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__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_filename = __pyx_f[2]; __pyx_lineno = 2210; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_6 = ((PyArrayObject *)__pyx_t_5); { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { __pyx_v_result = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_result.rcbuffer->pybuffer.buf = NULL; {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2210; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } else {__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]; } } __pyx_t_6 = 0; __pyx_v_result = ((PyArrayObject *)__pyx_t_5); __pyx_t_5 = 0; /* "pandas/src/generated.pyx":2212 * cdef ndarray[object] result = np.empty(length, dtype=np.object_) * * from pandas.lib import maybe_convert_objects # <<<<<<<<<<<<<< * * for i in range(length): */ __pyx_t_5 = PyList_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2212; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(((PyObject *)__pyx_n_s_107)); PyList_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_n_s_107)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s_107)); __pyx_t_1 = __Pyx_Import(((PyObject *)__pyx_n_s_106), ((PyObject *)__pyx_t_5), -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2212; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_107); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2212; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_t_5); __pyx_v_maybe_convert_objects = __pyx_t_5; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/generated.pyx":2214 * from pandas.lib import maybe_convert_objects * * for i in range(length): # <<<<<<<<<<<<<< * result[i] = func(index[i]) * */ __pyx_t_7 = __pyx_v_length; for (__pyx_t_8 = 0; __pyx_t_8 < __pyx_t_7; __pyx_t_8+=1) { __pyx_v_i = __pyx_t_8; /* "pandas/src/generated.pyx":2215 * * for i in range(length): * result[i] = func(index[i]) # <<<<<<<<<<<<<< * * return maybe_convert_objects(result) */ __pyx_t_9 = __pyx_v_i; __pyx_t_1 = __Pyx_PyInt_to_py_npy_uint8((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_index.rcbuffer->pybuffer.buf, __pyx_t_9, __pyx_pybuffernd_index.diminfo[0].strides))); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2215; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2215; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyObject_Call(__pyx_v_func, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2215; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; __pyx_t_10 = __pyx_v_i; __pyx_t_11 = __Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_10, __pyx_pybuffernd_result.diminfo[0].strides); __Pyx_GOTREF(*__pyx_t_11); __Pyx_INCREF(__pyx_t_1); __Pyx_DECREF(*__pyx_t_11); *__pyx_t_11 = __pyx_t_1; __Pyx_GIVEREF(*__pyx_t_11); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } /* "pandas/src/generated.pyx":2217 * result[i] = func(index[i]) * * return maybe_convert_objects(result) # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2217; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)__pyx_v_result)); PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_result)); __Pyx_GIVEREF(((PyObject *)__pyx_v_result)); __pyx_t_5 = PyObject_Call(__pyx_v_maybe_convert_objects, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2217; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_r = __pyx_t_5; __pyx_t_5 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_index.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.arrmap_bool", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_index.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_result); __Pyx_XDECREF(__pyx_v_maybe_convert_objects); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_223take_1d_bool_bool(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_223take_1d_bool_bool = {__Pyx_NAMESTR("take_1d_bool_bool"), (PyCFunction)__pyx_pw_6pandas_5algos_223take_1d_bool_bool, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_223take_1d_bool_bool(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_values = 0; PyArrayObject *__pyx_v_indexer = 0; PyArrayObject *__pyx_v_out = 0; PyObject *__pyx_v_fill_value = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("take_1d_bool_bool (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__values,&__pyx_n_s__indexer,&__pyx_n_s__out,&__pyx_n_s__fill_value,0}; PyObject* values[4] = {0,0,0,0}; values[3] = __pyx_k_108; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__values)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__indexer)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_1d_bool_bool", 0, 3, 4, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2221; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__out)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_1d_bool_bool", 0, 3, 4, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2221; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__fill_value); if (value) { values[3] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "take_1d_bool_bool") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2221; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_values = ((PyArrayObject *)values[0]); __pyx_v_indexer = ((PyArrayObject *)values[1]); __pyx_v_out = ((PyArrayObject *)values[2]); __pyx_v_fill_value = values[3]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("take_1d_bool_bool", 0, 3, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2221; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.take_1d_bool_bool", __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_filename = __pyx_f[2]; __pyx_lineno = 2221; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_indexer), __pyx_ptype_5numpy_ndarray, 1, "indexer", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2222; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_5numpy_ndarray, 1, "out", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2223; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_222take_1d_bool_bool(__pyx_self, __pyx_v_values, __pyx_v_indexer, __pyx_v_out, __pyx_v_fill_value); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":2221 * * @cython.wraparound(False) * def take_1d_bool_bool(ndarray[uint8_t] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[uint8_t] out, */ static PyObject *__pyx_pf_6pandas_5algos_222take_1d_bool_bool(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_n; Py_ssize_t __pyx_v_idx; __pyx_t_5numpy_uint8_t __pyx_v_fv; __Pyx_LocalBuf_ND __pyx_pybuffernd_indexer; __Pyx_Buffer __pyx_pybuffer_indexer; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_values; __Pyx_Buffer __pyx_pybuffer_values; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; __pyx_t_5numpy_uint8_t __pyx_t_2; Py_ssize_t __pyx_t_3; int __pyx_t_4; int __pyx_t_5; Py_ssize_t __pyx_t_6; Py_ssize_t __pyx_t_7; Py_ssize_t __pyx_t_8; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("take_1d_bool_bool", 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_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; { __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_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2221; __pyx_clineno = __LINE__; goto __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_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2221; __pyx_clineno = __LINE__; goto __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_BufFmt_StackElem __pyx_stack[1]; 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)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2221; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; /* "pandas/src/generated.pyx":2229 * uint8_t fv * * n = len(indexer) # <<<<<<<<<<<<<< * * fv = fill_value */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_indexer)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2229; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/src/generated.pyx":2231 * n = len(indexer) * * fv = fill_value # <<<<<<<<<<<<<< * for i from 0 <= i < n: * idx = indexer[i] */ __pyx_t_2 = __Pyx_PyInt_from_py_npy_uint8(__pyx_v_fill_value); if (unlikely((__pyx_t_2 == (npy_uint8)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2231; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_fv = __pyx_t_2; /* "pandas/src/generated.pyx":2232 * * fv = fill_value * for i from 0 <= i < n: # <<<<<<<<<<<<<< * idx = indexer[i] * if idx == -1: */ __pyx_t_1 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_1; __pyx_v_i++) { /* "pandas/src/generated.pyx":2233 * fv = fill_value * for i from 0 <= i < n: * idx = indexer[i] # <<<<<<<<<<<<<< * if idx == -1: * out[i] = fv */ __pyx_t_3 = __pyx_v_i; __pyx_t_4 = -1; if (__pyx_t_3 < 0) { __pyx_t_4 = 0; } else if (unlikely(__pyx_t_3 >= __pyx_pybuffernd_indexer.diminfo[0].shape)) __pyx_t_4 = 0; if (unlikely(__pyx_t_4 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_4); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2233; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_idx = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_3, __pyx_pybuffernd_indexer.diminfo[0].strides)); /* "pandas/src/generated.pyx":2234 * for i from 0 <= i < n: * idx = indexer[i] * if idx == -1: # <<<<<<<<<<<<<< * out[i] = fv * else: */ __pyx_t_5 = ((__pyx_v_idx == -1) != 0); if (__pyx_t_5) { /* "pandas/src/generated.pyx":2235 * idx = indexer[i] * if idx == -1: * out[i] = fv # <<<<<<<<<<<<<< * else: * out[i] = values[idx] */ __pyx_t_6 = __pyx_v_i; __pyx_t_4 = -1; if (__pyx_t_6 < 0) { __pyx_t_4 = 0; } else if (unlikely(__pyx_t_6 >= __pyx_pybuffernd_out.diminfo[0].shape)) __pyx_t_4 = 0; if (unlikely(__pyx_t_4 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_4); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2235; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_6, __pyx_pybuffernd_out.diminfo[0].strides) = __pyx_v_fv; goto __pyx_L5; } /*else*/ { /* "pandas/src/generated.pyx":2237 * out[i] = fv * else: * out[i] = values[idx] # <<<<<<<<<<<<<< * * @cython.wraparound(False) */ __pyx_t_7 = __pyx_v_idx; __pyx_t_4 = -1; if (__pyx_t_7 < 0) { __pyx_t_4 = 0; } else if (unlikely(__pyx_t_7 >= __pyx_pybuffernd_values.diminfo[0].shape)) __pyx_t_4 = 0; if (unlikely(__pyx_t_4 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_4); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2237; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_8 = __pyx_v_i; __pyx_t_4 = -1; if (__pyx_t_8 < 0) { __pyx_t_4 = 0; } else if (unlikely(__pyx_t_8 >= __pyx_pybuffernd_out.diminfo[0].shape)) __pyx_t_4 = 0; if (unlikely(__pyx_t_4 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_4); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2237; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_8, __pyx_pybuffernd_out.diminfo[0].strides) = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_7, __pyx_pybuffernd_values.diminfo[0].strides)); } __pyx_L5:; } __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.take_1d_bool_bool", __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_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_225take_1d_bool_object(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_225take_1d_bool_object = {__Pyx_NAMESTR("take_1d_bool_object"), (PyCFunction)__pyx_pw_6pandas_5algos_225take_1d_bool_object, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_225take_1d_bool_object(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_values = 0; PyArrayObject *__pyx_v_indexer = 0; PyArrayObject *__pyx_v_out = 0; PyObject *__pyx_v_fill_value = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("take_1d_bool_object (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__values,&__pyx_n_s__indexer,&__pyx_n_s__out,&__pyx_n_s__fill_value,0}; PyObject* values[4] = {0,0,0,0}; values[3] = __pyx_k_109; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__values)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__indexer)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_1d_bool_object", 0, 3, 4, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2240; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__out)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_1d_bool_object", 0, 3, 4, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2240; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__fill_value); if (value) { values[3] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "take_1d_bool_object") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2240; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_values = ((PyArrayObject *)values[0]); __pyx_v_indexer = ((PyArrayObject *)values[1]); __pyx_v_out = ((PyArrayObject *)values[2]); __pyx_v_fill_value = values[3]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("take_1d_bool_object", 0, 3, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2240; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.take_1d_bool_object", __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_filename = __pyx_f[2]; __pyx_lineno = 2240; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_indexer), __pyx_ptype_5numpy_ndarray, 1, "indexer", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2241; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_5numpy_ndarray, 1, "out", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2242; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_224take_1d_bool_object(__pyx_self, __pyx_v_values, __pyx_v_indexer, __pyx_v_out, __pyx_v_fill_value); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":2240 * * @cython.wraparound(False) * def take_1d_bool_object(ndarray[uint8_t] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[object] out, */ static PyObject *__pyx_pf_6pandas_5algos_224take_1d_bool_object(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_n; Py_ssize_t __pyx_v_idx; PyObject *__pyx_v_fv = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_indexer; __Pyx_Buffer __pyx_pybuffer_indexer; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_values; __Pyx_Buffer __pyx_pybuffer_values; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; Py_ssize_t __pyx_t_2; int __pyx_t_3; int __pyx_t_4; Py_ssize_t __pyx_t_5; PyObject **__pyx_t_6; Py_ssize_t __pyx_t_7; PyObject *__pyx_t_8 = NULL; Py_ssize_t __pyx_t_9; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("take_1d_bool_object", 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_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; { __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_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2240; __pyx_clineno = __LINE__; goto __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_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2240; __pyx_clineno = __LINE__; goto __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_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_v_out, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2240; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; /* "pandas/src/generated.pyx":2248 * object fv * * n = len(indexer) # <<<<<<<<<<<<<< * * fv = fill_value */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_indexer)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2248; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/src/generated.pyx":2250 * n = len(indexer) * * fv = fill_value # <<<<<<<<<<<<<< * for i from 0 <= i < n: * idx = indexer[i] */ __Pyx_INCREF(__pyx_v_fill_value); __pyx_v_fv = __pyx_v_fill_value; /* "pandas/src/generated.pyx":2251 * * fv = fill_value * for i from 0 <= i < n: # <<<<<<<<<<<<<< * idx = indexer[i] * if idx == -1: */ __pyx_t_1 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_1; __pyx_v_i++) { /* "pandas/src/generated.pyx":2252 * fv = fill_value * for i from 0 <= i < n: * idx = indexer[i] # <<<<<<<<<<<<<< * if idx == -1: * out[i] = fv */ __pyx_t_2 = __pyx_v_i; __pyx_t_3 = -1; if (__pyx_t_2 < 0) { __pyx_t_3 = 0; } else if (unlikely(__pyx_t_2 >= __pyx_pybuffernd_indexer.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2252; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_idx = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_2, __pyx_pybuffernd_indexer.diminfo[0].strides)); /* "pandas/src/generated.pyx":2253 * for i from 0 <= i < n: * idx = indexer[i] * if idx == -1: # <<<<<<<<<<<<<< * out[i] = fv * else: */ __pyx_t_4 = ((__pyx_v_idx == -1) != 0); if (__pyx_t_4) { /* "pandas/src/generated.pyx":2254 * idx = indexer[i] * if idx == -1: * out[i] = fv # <<<<<<<<<<<<<< * else: * out[i] = True if values[idx] > 0 else False */ __pyx_t_5 = __pyx_v_i; __pyx_t_3 = -1; if (__pyx_t_5 < 0) { __pyx_t_3 = 0; } else if (unlikely(__pyx_t_5 >= __pyx_pybuffernd_out.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2254; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_6 = __Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_5, __pyx_pybuffernd_out.diminfo[0].strides); __Pyx_GOTREF(*__pyx_t_6); __Pyx_INCREF(__pyx_v_fv); __Pyx_DECREF(*__pyx_t_6); *__pyx_t_6 = __pyx_v_fv; __Pyx_GIVEREF(*__pyx_t_6); goto __pyx_L5; } /*else*/ { /* "pandas/src/generated.pyx":2256 * out[i] = fv * else: * out[i] = True if values[idx] > 0 else False # <<<<<<<<<<<<<< * * @cython.wraparound(False) */ __pyx_t_7 = __pyx_v_idx; __pyx_t_3 = -1; if (__pyx_t_7 < 0) { __pyx_t_3 = 0; } else if (unlikely(__pyx_t_7 >= __pyx_pybuffernd_values.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2256; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } if ((((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_7, __pyx_pybuffernd_values.diminfo[0].strides)) > 0) != 0)) { __pyx_t_4 = 1; } else { __pyx_t_4 = 0; } __pyx_t_8 = __Pyx_PyBool_FromLong(__pyx_t_4); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2256; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_9 = __pyx_v_i; __pyx_t_3 = -1; if (__pyx_t_9 < 0) { __pyx_t_3 = 0; } else if (unlikely(__pyx_t_9 >= __pyx_pybuffernd_out.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2256; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_6 = __Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_9, __pyx_pybuffernd_out.diminfo[0].strides); __Pyx_GOTREF(*__pyx_t_6); __Pyx_INCREF(__pyx_t_8); __Pyx_DECREF(*__pyx_t_6); *__pyx_t_6 = __pyx_t_8; __Pyx_GIVEREF(*__pyx_t_6); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } __pyx_L5:; } __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_8); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.take_1d_bool_object", __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_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF(__pyx_v_fv); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_227take_1d_int8_int8(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_227take_1d_int8_int8 = {__Pyx_NAMESTR("take_1d_int8_int8"), (PyCFunction)__pyx_pw_6pandas_5algos_227take_1d_int8_int8, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_227take_1d_int8_int8(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_values = 0; PyArrayObject *__pyx_v_indexer = 0; PyArrayObject *__pyx_v_out = 0; PyObject *__pyx_v_fill_value = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("take_1d_int8_int8 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__values,&__pyx_n_s__indexer,&__pyx_n_s__out,&__pyx_n_s__fill_value,0}; PyObject* values[4] = {0,0,0,0}; values[3] = __pyx_k_110; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__values)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__indexer)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_1d_int8_int8", 0, 3, 4, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2259; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__out)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_1d_int8_int8", 0, 3, 4, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2259; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__fill_value); if (value) { values[3] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "take_1d_int8_int8") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2259; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_values = ((PyArrayObject *)values[0]); __pyx_v_indexer = ((PyArrayObject *)values[1]); __pyx_v_out = ((PyArrayObject *)values[2]); __pyx_v_fill_value = values[3]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("take_1d_int8_int8", 0, 3, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2259; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.take_1d_int8_int8", __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_filename = __pyx_f[2]; __pyx_lineno = 2259; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_indexer), __pyx_ptype_5numpy_ndarray, 1, "indexer", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2260; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_5numpy_ndarray, 1, "out", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2261; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_226take_1d_int8_int8(__pyx_self, __pyx_v_values, __pyx_v_indexer, __pyx_v_out, __pyx_v_fill_value); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":2259 * * @cython.wraparound(False) * def take_1d_int8_int8(ndarray[int8_t] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[int8_t] out, */ static PyObject *__pyx_pf_6pandas_5algos_226take_1d_int8_int8(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_n; Py_ssize_t __pyx_v_idx; __pyx_t_5numpy_int8_t __pyx_v_fv; __Pyx_LocalBuf_ND __pyx_pybuffernd_indexer; __Pyx_Buffer __pyx_pybuffer_indexer; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_values; __Pyx_Buffer __pyx_pybuffer_values; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; __pyx_t_5numpy_int8_t __pyx_t_2; Py_ssize_t __pyx_t_3; int __pyx_t_4; int __pyx_t_5; Py_ssize_t __pyx_t_6; Py_ssize_t __pyx_t_7; Py_ssize_t __pyx_t_8; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("take_1d_int8_int8", 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_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; { __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_int8_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2259; __pyx_clineno = __LINE__; goto __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_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2259; __pyx_clineno = __LINE__; goto __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_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_v_out, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int8_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2259; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; /* "pandas/src/generated.pyx":2267 * int8_t fv * * n = len(indexer) # <<<<<<<<<<<<<< * * fv = fill_value */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_indexer)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2267; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/src/generated.pyx":2269 * n = len(indexer) * * fv = fill_value # <<<<<<<<<<<<<< * for i from 0 <= i < n: * idx = indexer[i] */ __pyx_t_2 = __Pyx_PyInt_from_py_npy_int8(__pyx_v_fill_value); if (unlikely((__pyx_t_2 == (npy_int8)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2269; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_fv = __pyx_t_2; /* "pandas/src/generated.pyx":2270 * * fv = fill_value * for i from 0 <= i < n: # <<<<<<<<<<<<<< * idx = indexer[i] * if idx == -1: */ __pyx_t_1 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_1; __pyx_v_i++) { /* "pandas/src/generated.pyx":2271 * fv = fill_value * for i from 0 <= i < n: * idx = indexer[i] # <<<<<<<<<<<<<< * if idx == -1: * out[i] = fv */ __pyx_t_3 = __pyx_v_i; __pyx_t_4 = -1; if (__pyx_t_3 < 0) { __pyx_t_4 = 0; } else if (unlikely(__pyx_t_3 >= __pyx_pybuffernd_indexer.diminfo[0].shape)) __pyx_t_4 = 0; if (unlikely(__pyx_t_4 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_4); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2271; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_idx = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_3, __pyx_pybuffernd_indexer.diminfo[0].strides)); /* "pandas/src/generated.pyx":2272 * for i from 0 <= i < n: * idx = indexer[i] * if idx == -1: # <<<<<<<<<<<<<< * out[i] = fv * else: */ __pyx_t_5 = ((__pyx_v_idx == -1) != 0); if (__pyx_t_5) { /* "pandas/src/generated.pyx":2273 * idx = indexer[i] * if idx == -1: * out[i] = fv # <<<<<<<<<<<<<< * else: * out[i] = values[idx] */ __pyx_t_6 = __pyx_v_i; __pyx_t_4 = -1; if (__pyx_t_6 < 0) { __pyx_t_4 = 0; } else if (unlikely(__pyx_t_6 >= __pyx_pybuffernd_out.diminfo[0].shape)) __pyx_t_4 = 0; if (unlikely(__pyx_t_4 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_4); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2273; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int8_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_6, __pyx_pybuffernd_out.diminfo[0].strides) = __pyx_v_fv; goto __pyx_L5; } /*else*/ { /* "pandas/src/generated.pyx":2275 * out[i] = fv * else: * out[i] = values[idx] # <<<<<<<<<<<<<< * * @cython.wraparound(False) */ __pyx_t_7 = __pyx_v_idx; __pyx_t_4 = -1; if (__pyx_t_7 < 0) { __pyx_t_4 = 0; } else if (unlikely(__pyx_t_7 >= __pyx_pybuffernd_values.diminfo[0].shape)) __pyx_t_4 = 0; if (unlikely(__pyx_t_4 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_4); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2275; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_8 = __pyx_v_i; __pyx_t_4 = -1; if (__pyx_t_8 < 0) { __pyx_t_4 = 0; } else if (unlikely(__pyx_t_8 >= __pyx_pybuffernd_out.diminfo[0].shape)) __pyx_t_4 = 0; if (unlikely(__pyx_t_4 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_4); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2275; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int8_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_8, __pyx_pybuffernd_out.diminfo[0].strides) = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int8_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_7, __pyx_pybuffernd_values.diminfo[0].strides)); } __pyx_L5:; } __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.take_1d_int8_int8", __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_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_229take_1d_int8_int32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_229take_1d_int8_int32 = {__Pyx_NAMESTR("take_1d_int8_int32"), (PyCFunction)__pyx_pw_6pandas_5algos_229take_1d_int8_int32, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_229take_1d_int8_int32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_values = 0; PyArrayObject *__pyx_v_indexer = 0; PyArrayObject *__pyx_v_out = 0; PyObject *__pyx_v_fill_value = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("take_1d_int8_int32 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__values,&__pyx_n_s__indexer,&__pyx_n_s__out,&__pyx_n_s__fill_value,0}; PyObject* values[4] = {0,0,0,0}; values[3] = __pyx_k_111; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__values)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__indexer)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_1d_int8_int32", 0, 3, 4, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2278; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__out)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_1d_int8_int32", 0, 3, 4, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2278; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__fill_value); if (value) { values[3] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "take_1d_int8_int32") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2278; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_values = ((PyArrayObject *)values[0]); __pyx_v_indexer = ((PyArrayObject *)values[1]); __pyx_v_out = ((PyArrayObject *)values[2]); __pyx_v_fill_value = values[3]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("take_1d_int8_int32", 0, 3, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2278; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.take_1d_int8_int32", __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_filename = __pyx_f[2]; __pyx_lineno = 2278; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_indexer), __pyx_ptype_5numpy_ndarray, 1, "indexer", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2279; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_5numpy_ndarray, 1, "out", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2280; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_228take_1d_int8_int32(__pyx_self, __pyx_v_values, __pyx_v_indexer, __pyx_v_out, __pyx_v_fill_value); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":2278 * * @cython.wraparound(False) * def take_1d_int8_int32(ndarray[int8_t] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[int32_t] out, */ static PyObject *__pyx_pf_6pandas_5algos_228take_1d_int8_int32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_n; Py_ssize_t __pyx_v_idx; __pyx_t_5numpy_int32_t __pyx_v_fv; __Pyx_LocalBuf_ND __pyx_pybuffernd_indexer; __Pyx_Buffer __pyx_pybuffer_indexer; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_values; __Pyx_Buffer __pyx_pybuffer_values; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; __pyx_t_5numpy_int32_t __pyx_t_2; Py_ssize_t __pyx_t_3; int __pyx_t_4; int __pyx_t_5; Py_ssize_t __pyx_t_6; Py_ssize_t __pyx_t_7; Py_ssize_t __pyx_t_8; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("take_1d_int8_int32", 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_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; { __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_int8_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2278; __pyx_clineno = __LINE__; goto __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_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2278; __pyx_clineno = __LINE__; goto __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_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_v_out, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2278; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; /* "pandas/src/generated.pyx":2286 * int32_t fv * * n = len(indexer) # <<<<<<<<<<<<<< * * fv = fill_value */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_indexer)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2286; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/src/generated.pyx":2288 * n = len(indexer) * * fv = fill_value # <<<<<<<<<<<<<< * for i from 0 <= i < n: * idx = indexer[i] */ __pyx_t_2 = __Pyx_PyInt_from_py_npy_int32(__pyx_v_fill_value); if (unlikely((__pyx_t_2 == (npy_int32)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2288; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_fv = __pyx_t_2; /* "pandas/src/generated.pyx":2289 * * fv = fill_value * for i from 0 <= i < n: # <<<<<<<<<<<<<< * idx = indexer[i] * if idx == -1: */ __pyx_t_1 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_1; __pyx_v_i++) { /* "pandas/src/generated.pyx":2290 * fv = fill_value * for i from 0 <= i < n: * idx = indexer[i] # <<<<<<<<<<<<<< * if idx == -1: * out[i] = fv */ __pyx_t_3 = __pyx_v_i; __pyx_t_4 = -1; if (__pyx_t_3 < 0) { __pyx_t_4 = 0; } else if (unlikely(__pyx_t_3 >= __pyx_pybuffernd_indexer.diminfo[0].shape)) __pyx_t_4 = 0; if (unlikely(__pyx_t_4 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_4); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2290; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_idx = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_3, __pyx_pybuffernd_indexer.diminfo[0].strides)); /* "pandas/src/generated.pyx":2291 * for i from 0 <= i < n: * idx = indexer[i] * if idx == -1: # <<<<<<<<<<<<<< * out[i] = fv * else: */ __pyx_t_5 = ((__pyx_v_idx == -1) != 0); if (__pyx_t_5) { /* "pandas/src/generated.pyx":2292 * idx = indexer[i] * if idx == -1: * out[i] = fv # <<<<<<<<<<<<<< * else: * out[i] = values[idx] */ __pyx_t_6 = __pyx_v_i; __pyx_t_4 = -1; if (__pyx_t_6 < 0) { __pyx_t_4 = 0; } else if (unlikely(__pyx_t_6 >= __pyx_pybuffernd_out.diminfo[0].shape)) __pyx_t_4 = 0; if (unlikely(__pyx_t_4 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_4); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2292; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_6, __pyx_pybuffernd_out.diminfo[0].strides) = __pyx_v_fv; goto __pyx_L5; } /*else*/ { /* "pandas/src/generated.pyx":2294 * out[i] = fv * else: * out[i] = values[idx] # <<<<<<<<<<<<<< * * @cython.wraparound(False) */ __pyx_t_7 = __pyx_v_idx; __pyx_t_4 = -1; if (__pyx_t_7 < 0) { __pyx_t_4 = 0; } else if (unlikely(__pyx_t_7 >= __pyx_pybuffernd_values.diminfo[0].shape)) __pyx_t_4 = 0; if (unlikely(__pyx_t_4 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_4); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2294; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_8 = __pyx_v_i; __pyx_t_4 = -1; if (__pyx_t_8 < 0) { __pyx_t_4 = 0; } else if (unlikely(__pyx_t_8 >= __pyx_pybuffernd_out.diminfo[0].shape)) __pyx_t_4 = 0; if (unlikely(__pyx_t_4 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_4); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2294; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_8, __pyx_pybuffernd_out.diminfo[0].strides) = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int8_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_7, __pyx_pybuffernd_values.diminfo[0].strides)); } __pyx_L5:; } __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.take_1d_int8_int32", __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_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_231take_1d_int8_int64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_231take_1d_int8_int64 = {__Pyx_NAMESTR("take_1d_int8_int64"), (PyCFunction)__pyx_pw_6pandas_5algos_231take_1d_int8_int64, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_231take_1d_int8_int64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_values = 0; PyArrayObject *__pyx_v_indexer = 0; PyArrayObject *__pyx_v_out = 0; PyObject *__pyx_v_fill_value = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("take_1d_int8_int64 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__values,&__pyx_n_s__indexer,&__pyx_n_s__out,&__pyx_n_s__fill_value,0}; PyObject* values[4] = {0,0,0,0}; values[3] = __pyx_k_112; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__values)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__indexer)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_1d_int8_int64", 0, 3, 4, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2297; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__out)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_1d_int8_int64", 0, 3, 4, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2297; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__fill_value); if (value) { values[3] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "take_1d_int8_int64") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2297; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_values = ((PyArrayObject *)values[0]); __pyx_v_indexer = ((PyArrayObject *)values[1]); __pyx_v_out = ((PyArrayObject *)values[2]); __pyx_v_fill_value = values[3]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("take_1d_int8_int64", 0, 3, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2297; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.take_1d_int8_int64", __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_filename = __pyx_f[2]; __pyx_lineno = 2297; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_indexer), __pyx_ptype_5numpy_ndarray, 1, "indexer", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2298; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_5numpy_ndarray, 1, "out", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2299; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_230take_1d_int8_int64(__pyx_self, __pyx_v_values, __pyx_v_indexer, __pyx_v_out, __pyx_v_fill_value); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":2297 * * @cython.wraparound(False) * def take_1d_int8_int64(ndarray[int8_t] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[int64_t] out, */ static PyObject *__pyx_pf_6pandas_5algos_230take_1d_int8_int64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_n; Py_ssize_t __pyx_v_idx; __pyx_t_5numpy_int64_t __pyx_v_fv; __Pyx_LocalBuf_ND __pyx_pybuffernd_indexer; __Pyx_Buffer __pyx_pybuffer_indexer; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_values; __Pyx_Buffer __pyx_pybuffer_values; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; __pyx_t_5numpy_int64_t __pyx_t_2; Py_ssize_t __pyx_t_3; int __pyx_t_4; int __pyx_t_5; Py_ssize_t __pyx_t_6; Py_ssize_t __pyx_t_7; Py_ssize_t __pyx_t_8; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("take_1d_int8_int64", 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_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; { __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_int8_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2297; __pyx_clineno = __LINE__; goto __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_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2297; __pyx_clineno = __LINE__; goto __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_BufFmt_StackElem __pyx_stack[1]; 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)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2297; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; /* "pandas/src/generated.pyx":2305 * int64_t fv * * n = len(indexer) # <<<<<<<<<<<<<< * * fv = fill_value */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_indexer)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2305; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/src/generated.pyx":2307 * n = len(indexer) * * fv = fill_value # <<<<<<<<<<<<<< * for i from 0 <= i < n: * idx = indexer[i] */ __pyx_t_2 = __Pyx_PyInt_from_py_npy_int64(__pyx_v_fill_value); if (unlikely((__pyx_t_2 == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2307; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_fv = __pyx_t_2; /* "pandas/src/generated.pyx":2308 * * fv = fill_value * for i from 0 <= i < n: # <<<<<<<<<<<<<< * idx = indexer[i] * if idx == -1: */ __pyx_t_1 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_1; __pyx_v_i++) { /* "pandas/src/generated.pyx":2309 * fv = fill_value * for i from 0 <= i < n: * idx = indexer[i] # <<<<<<<<<<<<<< * if idx == -1: * out[i] = fv */ __pyx_t_3 = __pyx_v_i; __pyx_t_4 = -1; if (__pyx_t_3 < 0) { __pyx_t_4 = 0; } else if (unlikely(__pyx_t_3 >= __pyx_pybuffernd_indexer.diminfo[0].shape)) __pyx_t_4 = 0; if (unlikely(__pyx_t_4 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_4); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2309; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_idx = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_3, __pyx_pybuffernd_indexer.diminfo[0].strides)); /* "pandas/src/generated.pyx":2310 * for i from 0 <= i < n: * idx = indexer[i] * if idx == -1: # <<<<<<<<<<<<<< * out[i] = fv * else: */ __pyx_t_5 = ((__pyx_v_idx == -1) != 0); if (__pyx_t_5) { /* "pandas/src/generated.pyx":2311 * idx = indexer[i] * if idx == -1: * out[i] = fv # <<<<<<<<<<<<<< * else: * out[i] = values[idx] */ __pyx_t_6 = __pyx_v_i; __pyx_t_4 = -1; if (__pyx_t_6 < 0) { __pyx_t_4 = 0; } else if (unlikely(__pyx_t_6 >= __pyx_pybuffernd_out.diminfo[0].shape)) __pyx_t_4 = 0; if (unlikely(__pyx_t_4 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_4); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2311; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_6, __pyx_pybuffernd_out.diminfo[0].strides) = __pyx_v_fv; goto __pyx_L5; } /*else*/ { /* "pandas/src/generated.pyx":2313 * out[i] = fv * else: * out[i] = values[idx] # <<<<<<<<<<<<<< * * @cython.wraparound(False) */ __pyx_t_7 = __pyx_v_idx; __pyx_t_4 = -1; if (__pyx_t_7 < 0) { __pyx_t_4 = 0; } else if (unlikely(__pyx_t_7 >= __pyx_pybuffernd_values.diminfo[0].shape)) __pyx_t_4 = 0; if (unlikely(__pyx_t_4 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_4); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2313; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_8 = __pyx_v_i; __pyx_t_4 = -1; if (__pyx_t_8 < 0) { __pyx_t_4 = 0; } else if (unlikely(__pyx_t_8 >= __pyx_pybuffernd_out.diminfo[0].shape)) __pyx_t_4 = 0; if (unlikely(__pyx_t_4 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_4); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2313; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_8, __pyx_pybuffernd_out.diminfo[0].strides) = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int8_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_7, __pyx_pybuffernd_values.diminfo[0].strides)); } __pyx_L5:; } __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.take_1d_int8_int64", __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_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_233take_1d_int8_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_233take_1d_int8_float64 = {__Pyx_NAMESTR("take_1d_int8_float64"), (PyCFunction)__pyx_pw_6pandas_5algos_233take_1d_int8_float64, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_233take_1d_int8_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_values = 0; PyArrayObject *__pyx_v_indexer = 0; PyArrayObject *__pyx_v_out = 0; PyObject *__pyx_v_fill_value = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("take_1d_int8_float64 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__values,&__pyx_n_s__indexer,&__pyx_n_s__out,&__pyx_n_s__fill_value,0}; PyObject* values[4] = {0,0,0,0}; values[3] = __pyx_k_113; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__values)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__indexer)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_1d_int8_float64", 0, 3, 4, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2316; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__out)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_1d_int8_float64", 0, 3, 4, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2316; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__fill_value); if (value) { values[3] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "take_1d_int8_float64") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2316; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_values = ((PyArrayObject *)values[0]); __pyx_v_indexer = ((PyArrayObject *)values[1]); __pyx_v_out = ((PyArrayObject *)values[2]); __pyx_v_fill_value = values[3]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("take_1d_int8_float64", 0, 3, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2316; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.take_1d_int8_float64", __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_filename = __pyx_f[2]; __pyx_lineno = 2316; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_indexer), __pyx_ptype_5numpy_ndarray, 1, "indexer", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2317; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_5numpy_ndarray, 1, "out", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2318; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_232take_1d_int8_float64(__pyx_self, __pyx_v_values, __pyx_v_indexer, __pyx_v_out, __pyx_v_fill_value); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":2316 * * @cython.wraparound(False) * def take_1d_int8_float64(ndarray[int8_t] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[float64_t] out, */ static PyObject *__pyx_pf_6pandas_5algos_232take_1d_int8_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_n; Py_ssize_t __pyx_v_idx; __pyx_t_5numpy_float64_t __pyx_v_fv; __Pyx_LocalBuf_ND __pyx_pybuffernd_indexer; __Pyx_Buffer __pyx_pybuffer_indexer; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_values; __Pyx_Buffer __pyx_pybuffer_values; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; __pyx_t_5numpy_float64_t __pyx_t_2; Py_ssize_t __pyx_t_3; int __pyx_t_4; int __pyx_t_5; Py_ssize_t __pyx_t_6; Py_ssize_t __pyx_t_7; Py_ssize_t __pyx_t_8; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("take_1d_int8_float64", 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_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; { __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_int8_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2316; __pyx_clineno = __LINE__; goto __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_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2316; __pyx_clineno = __LINE__; goto __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_BufFmt_StackElem __pyx_stack[1]; 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)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2316; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; /* "pandas/src/generated.pyx":2324 * float64_t fv * * n = len(indexer) # <<<<<<<<<<<<<< * * fv = fill_value */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_indexer)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2324; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/src/generated.pyx":2326 * n = len(indexer) * * fv = fill_value # <<<<<<<<<<<<<< * for i from 0 <= i < n: * idx = indexer[i] */ __pyx_t_2 = __pyx_PyFloat_AsDouble(__pyx_v_fill_value); if (unlikely((__pyx_t_2 == (npy_float64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2326; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_fv = __pyx_t_2; /* "pandas/src/generated.pyx":2327 * * fv = fill_value * for i from 0 <= i < n: # <<<<<<<<<<<<<< * idx = indexer[i] * if idx == -1: */ __pyx_t_1 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_1; __pyx_v_i++) { /* "pandas/src/generated.pyx":2328 * fv = fill_value * for i from 0 <= i < n: * idx = indexer[i] # <<<<<<<<<<<<<< * if idx == -1: * out[i] = fv */ __pyx_t_3 = __pyx_v_i; __pyx_t_4 = -1; if (__pyx_t_3 < 0) { __pyx_t_4 = 0; } else if (unlikely(__pyx_t_3 >= __pyx_pybuffernd_indexer.diminfo[0].shape)) __pyx_t_4 = 0; if (unlikely(__pyx_t_4 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_4); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2328; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_idx = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_3, __pyx_pybuffernd_indexer.diminfo[0].strides)); /* "pandas/src/generated.pyx":2329 * for i from 0 <= i < n: * idx = indexer[i] * if idx == -1: # <<<<<<<<<<<<<< * out[i] = fv * else: */ __pyx_t_5 = ((__pyx_v_idx == -1) != 0); if (__pyx_t_5) { /* "pandas/src/generated.pyx":2330 * idx = indexer[i] * if idx == -1: * out[i] = fv # <<<<<<<<<<<<<< * else: * out[i] = values[idx] */ __pyx_t_6 = __pyx_v_i; __pyx_t_4 = -1; if (__pyx_t_6 < 0) { __pyx_t_4 = 0; } else if (unlikely(__pyx_t_6 >= __pyx_pybuffernd_out.diminfo[0].shape)) __pyx_t_4 = 0; if (unlikely(__pyx_t_4 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_4); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2330; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_6, __pyx_pybuffernd_out.diminfo[0].strides) = __pyx_v_fv; goto __pyx_L5; } /*else*/ { /* "pandas/src/generated.pyx":2332 * out[i] = fv * else: * out[i] = values[idx] # <<<<<<<<<<<<<< * * @cython.wraparound(False) */ __pyx_t_7 = __pyx_v_idx; __pyx_t_4 = -1; if (__pyx_t_7 < 0) { __pyx_t_4 = 0; } else if (unlikely(__pyx_t_7 >= __pyx_pybuffernd_values.diminfo[0].shape)) __pyx_t_4 = 0; if (unlikely(__pyx_t_4 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_4); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2332; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_8 = __pyx_v_i; __pyx_t_4 = -1; if (__pyx_t_8 < 0) { __pyx_t_4 = 0; } else if (unlikely(__pyx_t_8 >= __pyx_pybuffernd_out.diminfo[0].shape)) __pyx_t_4 = 0; if (unlikely(__pyx_t_4 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_4); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2332; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_8, __pyx_pybuffernd_out.diminfo[0].strides) = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int8_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_7, __pyx_pybuffernd_values.diminfo[0].strides)); } __pyx_L5:; } __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.take_1d_int8_float64", __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_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_235take_1d_int16_int16(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_235take_1d_int16_int16 = {__Pyx_NAMESTR("take_1d_int16_int16"), (PyCFunction)__pyx_pw_6pandas_5algos_235take_1d_int16_int16, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_235take_1d_int16_int16(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_values = 0; PyArrayObject *__pyx_v_indexer = 0; PyArrayObject *__pyx_v_out = 0; PyObject *__pyx_v_fill_value = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("take_1d_int16_int16 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__values,&__pyx_n_s__indexer,&__pyx_n_s__out,&__pyx_n_s__fill_value,0}; PyObject* values[4] = {0,0,0,0}; values[3] = __pyx_k_114; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__values)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__indexer)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_1d_int16_int16", 0, 3, 4, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2335; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__out)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_1d_int16_int16", 0, 3, 4, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2335; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__fill_value); if (value) { values[3] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "take_1d_int16_int16") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2335; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_values = ((PyArrayObject *)values[0]); __pyx_v_indexer = ((PyArrayObject *)values[1]); __pyx_v_out = ((PyArrayObject *)values[2]); __pyx_v_fill_value = values[3]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("take_1d_int16_int16", 0, 3, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2335; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.take_1d_int16_int16", __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_filename = __pyx_f[2]; __pyx_lineno = 2335; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_indexer), __pyx_ptype_5numpy_ndarray, 1, "indexer", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2336; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_5numpy_ndarray, 1, "out", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2337; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_234take_1d_int16_int16(__pyx_self, __pyx_v_values, __pyx_v_indexer, __pyx_v_out, __pyx_v_fill_value); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":2335 * * @cython.wraparound(False) * def take_1d_int16_int16(ndarray[int16_t] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[int16_t] out, */ static PyObject *__pyx_pf_6pandas_5algos_234take_1d_int16_int16(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_n; Py_ssize_t __pyx_v_idx; __pyx_t_5numpy_int16_t __pyx_v_fv; __Pyx_LocalBuf_ND __pyx_pybuffernd_indexer; __Pyx_Buffer __pyx_pybuffer_indexer; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_values; __Pyx_Buffer __pyx_pybuffer_values; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; __pyx_t_5numpy_int16_t __pyx_t_2; Py_ssize_t __pyx_t_3; int __pyx_t_4; int __pyx_t_5; Py_ssize_t __pyx_t_6; Py_ssize_t __pyx_t_7; Py_ssize_t __pyx_t_8; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("take_1d_int16_int16", 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_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; { __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_int16_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2335; __pyx_clineno = __LINE__; goto __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_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2335; __pyx_clineno = __LINE__; goto __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_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_v_out, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int16_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2335; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; /* "pandas/src/generated.pyx":2343 * int16_t fv * * n = len(indexer) # <<<<<<<<<<<<<< * * fv = fill_value */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_indexer)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2343; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/src/generated.pyx":2345 * n = len(indexer) * * fv = fill_value # <<<<<<<<<<<<<< * for i from 0 <= i < n: * idx = indexer[i] */ __pyx_t_2 = __Pyx_PyInt_from_py_npy_int16(__pyx_v_fill_value); if (unlikely((__pyx_t_2 == (npy_int16)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2345; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_fv = __pyx_t_2; /* "pandas/src/generated.pyx":2346 * * fv = fill_value * for i from 0 <= i < n: # <<<<<<<<<<<<<< * idx = indexer[i] * if idx == -1: */ __pyx_t_1 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_1; __pyx_v_i++) { /* "pandas/src/generated.pyx":2347 * fv = fill_value * for i from 0 <= i < n: * idx = indexer[i] # <<<<<<<<<<<<<< * if idx == -1: * out[i] = fv */ __pyx_t_3 = __pyx_v_i; __pyx_t_4 = -1; if (__pyx_t_3 < 0) { __pyx_t_4 = 0; } else if (unlikely(__pyx_t_3 >= __pyx_pybuffernd_indexer.diminfo[0].shape)) __pyx_t_4 = 0; if (unlikely(__pyx_t_4 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_4); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2347; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_idx = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_3, __pyx_pybuffernd_indexer.diminfo[0].strides)); /* "pandas/src/generated.pyx":2348 * for i from 0 <= i < n: * idx = indexer[i] * if idx == -1: # <<<<<<<<<<<<<< * out[i] = fv * else: */ __pyx_t_5 = ((__pyx_v_idx == -1) != 0); if (__pyx_t_5) { /* "pandas/src/generated.pyx":2349 * idx = indexer[i] * if idx == -1: * out[i] = fv # <<<<<<<<<<<<<< * else: * out[i] = values[idx] */ __pyx_t_6 = __pyx_v_i; __pyx_t_4 = -1; if (__pyx_t_6 < 0) { __pyx_t_4 = 0; } else if (unlikely(__pyx_t_6 >= __pyx_pybuffernd_out.diminfo[0].shape)) __pyx_t_4 = 0; if (unlikely(__pyx_t_4 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_4); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2349; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int16_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_6, __pyx_pybuffernd_out.diminfo[0].strides) = __pyx_v_fv; goto __pyx_L5; } /*else*/ { /* "pandas/src/generated.pyx":2351 * out[i] = fv * else: * out[i] = values[idx] # <<<<<<<<<<<<<< * * @cython.wraparound(False) */ __pyx_t_7 = __pyx_v_idx; __pyx_t_4 = -1; if (__pyx_t_7 < 0) { __pyx_t_4 = 0; } else if (unlikely(__pyx_t_7 >= __pyx_pybuffernd_values.diminfo[0].shape)) __pyx_t_4 = 0; if (unlikely(__pyx_t_4 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_4); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2351; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_8 = __pyx_v_i; __pyx_t_4 = -1; if (__pyx_t_8 < 0) { __pyx_t_4 = 0; } else if (unlikely(__pyx_t_8 >= __pyx_pybuffernd_out.diminfo[0].shape)) __pyx_t_4 = 0; if (unlikely(__pyx_t_4 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_4); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2351; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int16_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_8, __pyx_pybuffernd_out.diminfo[0].strides) = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int16_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_7, __pyx_pybuffernd_values.diminfo[0].strides)); } __pyx_L5:; } __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.take_1d_int16_int16", __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_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_237take_1d_int16_int32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_237take_1d_int16_int32 = {__Pyx_NAMESTR("take_1d_int16_int32"), (PyCFunction)__pyx_pw_6pandas_5algos_237take_1d_int16_int32, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_237take_1d_int16_int32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_values = 0; PyArrayObject *__pyx_v_indexer = 0; PyArrayObject *__pyx_v_out = 0; PyObject *__pyx_v_fill_value = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("take_1d_int16_int32 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__values,&__pyx_n_s__indexer,&__pyx_n_s__out,&__pyx_n_s__fill_value,0}; PyObject* values[4] = {0,0,0,0}; values[3] = __pyx_k_115; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__values)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__indexer)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_1d_int16_int32", 0, 3, 4, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2354; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__out)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_1d_int16_int32", 0, 3, 4, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2354; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__fill_value); if (value) { values[3] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "take_1d_int16_int32") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2354; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_values = ((PyArrayObject *)values[0]); __pyx_v_indexer = ((PyArrayObject *)values[1]); __pyx_v_out = ((PyArrayObject *)values[2]); __pyx_v_fill_value = values[3]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("take_1d_int16_int32", 0, 3, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2354; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.take_1d_int16_int32", __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_filename = __pyx_f[2]; __pyx_lineno = 2354; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_indexer), __pyx_ptype_5numpy_ndarray, 1, "indexer", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2355; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_5numpy_ndarray, 1, "out", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2356; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_236take_1d_int16_int32(__pyx_self, __pyx_v_values, __pyx_v_indexer, __pyx_v_out, __pyx_v_fill_value); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":2354 * * @cython.wraparound(False) * def take_1d_int16_int32(ndarray[int16_t] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[int32_t] out, */ static PyObject *__pyx_pf_6pandas_5algos_236take_1d_int16_int32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_n; Py_ssize_t __pyx_v_idx; __pyx_t_5numpy_int32_t __pyx_v_fv; __Pyx_LocalBuf_ND __pyx_pybuffernd_indexer; __Pyx_Buffer __pyx_pybuffer_indexer; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_values; __Pyx_Buffer __pyx_pybuffer_values; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; __pyx_t_5numpy_int32_t __pyx_t_2; Py_ssize_t __pyx_t_3; int __pyx_t_4; int __pyx_t_5; Py_ssize_t __pyx_t_6; Py_ssize_t __pyx_t_7; Py_ssize_t __pyx_t_8; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("take_1d_int16_int32", 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_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; { __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_int16_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2354; __pyx_clineno = __LINE__; goto __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_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2354; __pyx_clineno = __LINE__; goto __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_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_v_out, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2354; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; /* "pandas/src/generated.pyx":2362 * int32_t fv * * n = len(indexer) # <<<<<<<<<<<<<< * * fv = fill_value */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_indexer)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2362; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/src/generated.pyx":2364 * n = len(indexer) * * fv = fill_value # <<<<<<<<<<<<<< * for i from 0 <= i < n: * idx = indexer[i] */ __pyx_t_2 = __Pyx_PyInt_from_py_npy_int32(__pyx_v_fill_value); if (unlikely((__pyx_t_2 == (npy_int32)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2364; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_fv = __pyx_t_2; /* "pandas/src/generated.pyx":2365 * * fv = fill_value * for i from 0 <= i < n: # <<<<<<<<<<<<<< * idx = indexer[i] * if idx == -1: */ __pyx_t_1 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_1; __pyx_v_i++) { /* "pandas/src/generated.pyx":2366 * fv = fill_value * for i from 0 <= i < n: * idx = indexer[i] # <<<<<<<<<<<<<< * if idx == -1: * out[i] = fv */ __pyx_t_3 = __pyx_v_i; __pyx_t_4 = -1; if (__pyx_t_3 < 0) { __pyx_t_4 = 0; } else if (unlikely(__pyx_t_3 >= __pyx_pybuffernd_indexer.diminfo[0].shape)) __pyx_t_4 = 0; if (unlikely(__pyx_t_4 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_4); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2366; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_idx = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_3, __pyx_pybuffernd_indexer.diminfo[0].strides)); /* "pandas/src/generated.pyx":2367 * for i from 0 <= i < n: * idx = indexer[i] * if idx == -1: # <<<<<<<<<<<<<< * out[i] = fv * else: */ __pyx_t_5 = ((__pyx_v_idx == -1) != 0); if (__pyx_t_5) { /* "pandas/src/generated.pyx":2368 * idx = indexer[i] * if idx == -1: * out[i] = fv # <<<<<<<<<<<<<< * else: * out[i] = values[idx] */ __pyx_t_6 = __pyx_v_i; __pyx_t_4 = -1; if (__pyx_t_6 < 0) { __pyx_t_4 = 0; } else if (unlikely(__pyx_t_6 >= __pyx_pybuffernd_out.diminfo[0].shape)) __pyx_t_4 = 0; if (unlikely(__pyx_t_4 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_4); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2368; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_6, __pyx_pybuffernd_out.diminfo[0].strides) = __pyx_v_fv; goto __pyx_L5; } /*else*/ { /* "pandas/src/generated.pyx":2370 * out[i] = fv * else: * out[i] = values[idx] # <<<<<<<<<<<<<< * * @cython.wraparound(False) */ __pyx_t_7 = __pyx_v_idx; __pyx_t_4 = -1; if (__pyx_t_7 < 0) { __pyx_t_4 = 0; } else if (unlikely(__pyx_t_7 >= __pyx_pybuffernd_values.diminfo[0].shape)) __pyx_t_4 = 0; if (unlikely(__pyx_t_4 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_4); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2370; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_8 = __pyx_v_i; __pyx_t_4 = -1; if (__pyx_t_8 < 0) { __pyx_t_4 = 0; } else if (unlikely(__pyx_t_8 >= __pyx_pybuffernd_out.diminfo[0].shape)) __pyx_t_4 = 0; if (unlikely(__pyx_t_4 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_4); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2370; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_8, __pyx_pybuffernd_out.diminfo[0].strides) = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int16_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_7, __pyx_pybuffernd_values.diminfo[0].strides)); } __pyx_L5:; } __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.take_1d_int16_int32", __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_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_239take_1d_int16_int64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_239take_1d_int16_int64 = {__Pyx_NAMESTR("take_1d_int16_int64"), (PyCFunction)__pyx_pw_6pandas_5algos_239take_1d_int16_int64, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_239take_1d_int16_int64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_values = 0; PyArrayObject *__pyx_v_indexer = 0; PyArrayObject *__pyx_v_out = 0; PyObject *__pyx_v_fill_value = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("take_1d_int16_int64 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__values,&__pyx_n_s__indexer,&__pyx_n_s__out,&__pyx_n_s__fill_value,0}; PyObject* values[4] = {0,0,0,0}; values[3] = __pyx_k_116; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__values)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__indexer)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_1d_int16_int64", 0, 3, 4, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2373; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__out)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_1d_int16_int64", 0, 3, 4, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2373; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__fill_value); if (value) { values[3] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "take_1d_int16_int64") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2373; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_values = ((PyArrayObject *)values[0]); __pyx_v_indexer = ((PyArrayObject *)values[1]); __pyx_v_out = ((PyArrayObject *)values[2]); __pyx_v_fill_value = values[3]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("take_1d_int16_int64", 0, 3, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2373; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.take_1d_int16_int64", __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_filename = __pyx_f[2]; __pyx_lineno = 2373; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_indexer), __pyx_ptype_5numpy_ndarray, 1, "indexer", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2374; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_5numpy_ndarray, 1, "out", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2375; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_238take_1d_int16_int64(__pyx_self, __pyx_v_values, __pyx_v_indexer, __pyx_v_out, __pyx_v_fill_value); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":2373 * * @cython.wraparound(False) * def take_1d_int16_int64(ndarray[int16_t] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[int64_t] out, */ static PyObject *__pyx_pf_6pandas_5algos_238take_1d_int16_int64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_n; Py_ssize_t __pyx_v_idx; __pyx_t_5numpy_int64_t __pyx_v_fv; __Pyx_LocalBuf_ND __pyx_pybuffernd_indexer; __Pyx_Buffer __pyx_pybuffer_indexer; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_values; __Pyx_Buffer __pyx_pybuffer_values; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; __pyx_t_5numpy_int64_t __pyx_t_2; Py_ssize_t __pyx_t_3; int __pyx_t_4; int __pyx_t_5; Py_ssize_t __pyx_t_6; Py_ssize_t __pyx_t_7; Py_ssize_t __pyx_t_8; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("take_1d_int16_int64", 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_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; { __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_int16_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2373; __pyx_clineno = __LINE__; goto __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_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2373; __pyx_clineno = __LINE__; goto __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_BufFmt_StackElem __pyx_stack[1]; 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)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2373; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; /* "pandas/src/generated.pyx":2381 * int64_t fv * * n = len(indexer) # <<<<<<<<<<<<<< * * fv = fill_value */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_indexer)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2381; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/src/generated.pyx":2383 * n = len(indexer) * * fv = fill_value # <<<<<<<<<<<<<< * for i from 0 <= i < n: * idx = indexer[i] */ __pyx_t_2 = __Pyx_PyInt_from_py_npy_int64(__pyx_v_fill_value); if (unlikely((__pyx_t_2 == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2383; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_fv = __pyx_t_2; /* "pandas/src/generated.pyx":2384 * * fv = fill_value * for i from 0 <= i < n: # <<<<<<<<<<<<<< * idx = indexer[i] * if idx == -1: */ __pyx_t_1 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_1; __pyx_v_i++) { /* "pandas/src/generated.pyx":2385 * fv = fill_value * for i from 0 <= i < n: * idx = indexer[i] # <<<<<<<<<<<<<< * if idx == -1: * out[i] = fv */ __pyx_t_3 = __pyx_v_i; __pyx_t_4 = -1; if (__pyx_t_3 < 0) { __pyx_t_4 = 0; } else if (unlikely(__pyx_t_3 >= __pyx_pybuffernd_indexer.diminfo[0].shape)) __pyx_t_4 = 0; if (unlikely(__pyx_t_4 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_4); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2385; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_idx = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_3, __pyx_pybuffernd_indexer.diminfo[0].strides)); /* "pandas/src/generated.pyx":2386 * for i from 0 <= i < n: * idx = indexer[i] * if idx == -1: # <<<<<<<<<<<<<< * out[i] = fv * else: */ __pyx_t_5 = ((__pyx_v_idx == -1) != 0); if (__pyx_t_5) { /* "pandas/src/generated.pyx":2387 * idx = indexer[i] * if idx == -1: * out[i] = fv # <<<<<<<<<<<<<< * else: * out[i] = values[idx] */ __pyx_t_6 = __pyx_v_i; __pyx_t_4 = -1; if (__pyx_t_6 < 0) { __pyx_t_4 = 0; } else if (unlikely(__pyx_t_6 >= __pyx_pybuffernd_out.diminfo[0].shape)) __pyx_t_4 = 0; if (unlikely(__pyx_t_4 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_4); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2387; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_6, __pyx_pybuffernd_out.diminfo[0].strides) = __pyx_v_fv; goto __pyx_L5; } /*else*/ { /* "pandas/src/generated.pyx":2389 * out[i] = fv * else: * out[i] = values[idx] # <<<<<<<<<<<<<< * * @cython.wraparound(False) */ __pyx_t_7 = __pyx_v_idx; __pyx_t_4 = -1; if (__pyx_t_7 < 0) { __pyx_t_4 = 0; } else if (unlikely(__pyx_t_7 >= __pyx_pybuffernd_values.diminfo[0].shape)) __pyx_t_4 = 0; if (unlikely(__pyx_t_4 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_4); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2389; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_8 = __pyx_v_i; __pyx_t_4 = -1; if (__pyx_t_8 < 0) { __pyx_t_4 = 0; } else if (unlikely(__pyx_t_8 >= __pyx_pybuffernd_out.diminfo[0].shape)) __pyx_t_4 = 0; if (unlikely(__pyx_t_4 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_4); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2389; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_8, __pyx_pybuffernd_out.diminfo[0].strides) = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int16_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_7, __pyx_pybuffernd_values.diminfo[0].strides)); } __pyx_L5:; } __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.take_1d_int16_int64", __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_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_241take_1d_int16_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_241take_1d_int16_float64 = {__Pyx_NAMESTR("take_1d_int16_float64"), (PyCFunction)__pyx_pw_6pandas_5algos_241take_1d_int16_float64, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_241take_1d_int16_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_values = 0; PyArrayObject *__pyx_v_indexer = 0; PyArrayObject *__pyx_v_out = 0; PyObject *__pyx_v_fill_value = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("take_1d_int16_float64 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__values,&__pyx_n_s__indexer,&__pyx_n_s__out,&__pyx_n_s__fill_value,0}; PyObject* values[4] = {0,0,0,0}; values[3] = __pyx_k_117; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__values)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__indexer)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_1d_int16_float64", 0, 3, 4, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2392; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__out)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_1d_int16_float64", 0, 3, 4, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2392; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__fill_value); if (value) { values[3] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "take_1d_int16_float64") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2392; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_values = ((PyArrayObject *)values[0]); __pyx_v_indexer = ((PyArrayObject *)values[1]); __pyx_v_out = ((PyArrayObject *)values[2]); __pyx_v_fill_value = values[3]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("take_1d_int16_float64", 0, 3, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2392; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.take_1d_int16_float64", __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_filename = __pyx_f[2]; __pyx_lineno = 2392; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_indexer), __pyx_ptype_5numpy_ndarray, 1, "indexer", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2393; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_5numpy_ndarray, 1, "out", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2394; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_240take_1d_int16_float64(__pyx_self, __pyx_v_values, __pyx_v_indexer, __pyx_v_out, __pyx_v_fill_value); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":2392 * * @cython.wraparound(False) * def take_1d_int16_float64(ndarray[int16_t] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[float64_t] out, */ static PyObject *__pyx_pf_6pandas_5algos_240take_1d_int16_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_n; Py_ssize_t __pyx_v_idx; __pyx_t_5numpy_float64_t __pyx_v_fv; __Pyx_LocalBuf_ND __pyx_pybuffernd_indexer; __Pyx_Buffer __pyx_pybuffer_indexer; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_values; __Pyx_Buffer __pyx_pybuffer_values; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; __pyx_t_5numpy_float64_t __pyx_t_2; Py_ssize_t __pyx_t_3; int __pyx_t_4; int __pyx_t_5; Py_ssize_t __pyx_t_6; Py_ssize_t __pyx_t_7; Py_ssize_t __pyx_t_8; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("take_1d_int16_float64", 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_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; { __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_int16_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2392; __pyx_clineno = __LINE__; goto __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_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2392; __pyx_clineno = __LINE__; goto __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_BufFmt_StackElem __pyx_stack[1]; 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)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2392; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; /* "pandas/src/generated.pyx":2400 * float64_t fv * * n = len(indexer) # <<<<<<<<<<<<<< * * fv = fill_value */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_indexer)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2400; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/src/generated.pyx":2402 * n = len(indexer) * * fv = fill_value # <<<<<<<<<<<<<< * for i from 0 <= i < n: * idx = indexer[i] */ __pyx_t_2 = __pyx_PyFloat_AsDouble(__pyx_v_fill_value); if (unlikely((__pyx_t_2 == (npy_float64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2402; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_fv = __pyx_t_2; /* "pandas/src/generated.pyx":2403 * * fv = fill_value * for i from 0 <= i < n: # <<<<<<<<<<<<<< * idx = indexer[i] * if idx == -1: */ __pyx_t_1 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_1; __pyx_v_i++) { /* "pandas/src/generated.pyx":2404 * fv = fill_value * for i from 0 <= i < n: * idx = indexer[i] # <<<<<<<<<<<<<< * if idx == -1: * out[i] = fv */ __pyx_t_3 = __pyx_v_i; __pyx_t_4 = -1; if (__pyx_t_3 < 0) { __pyx_t_4 = 0; } else if (unlikely(__pyx_t_3 >= __pyx_pybuffernd_indexer.diminfo[0].shape)) __pyx_t_4 = 0; if (unlikely(__pyx_t_4 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_4); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2404; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_idx = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_3, __pyx_pybuffernd_indexer.diminfo[0].strides)); /* "pandas/src/generated.pyx":2405 * for i from 0 <= i < n: * idx = indexer[i] * if idx == -1: # <<<<<<<<<<<<<< * out[i] = fv * else: */ __pyx_t_5 = ((__pyx_v_idx == -1) != 0); if (__pyx_t_5) { /* "pandas/src/generated.pyx":2406 * idx = indexer[i] * if idx == -1: * out[i] = fv # <<<<<<<<<<<<<< * else: * out[i] = values[idx] */ __pyx_t_6 = __pyx_v_i; __pyx_t_4 = -1; if (__pyx_t_6 < 0) { __pyx_t_4 = 0; } else if (unlikely(__pyx_t_6 >= __pyx_pybuffernd_out.diminfo[0].shape)) __pyx_t_4 = 0; if (unlikely(__pyx_t_4 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_4); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2406; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_6, __pyx_pybuffernd_out.diminfo[0].strides) = __pyx_v_fv; goto __pyx_L5; } /*else*/ { /* "pandas/src/generated.pyx":2408 * out[i] = fv * else: * out[i] = values[idx] # <<<<<<<<<<<<<< * * @cython.wraparound(False) */ __pyx_t_7 = __pyx_v_idx; __pyx_t_4 = -1; if (__pyx_t_7 < 0) { __pyx_t_4 = 0; } else if (unlikely(__pyx_t_7 >= __pyx_pybuffernd_values.diminfo[0].shape)) __pyx_t_4 = 0; if (unlikely(__pyx_t_4 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_4); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2408; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_8 = __pyx_v_i; __pyx_t_4 = -1; if (__pyx_t_8 < 0) { __pyx_t_4 = 0; } else if (unlikely(__pyx_t_8 >= __pyx_pybuffernd_out.diminfo[0].shape)) __pyx_t_4 = 0; if (unlikely(__pyx_t_4 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_4); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2408; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_8, __pyx_pybuffernd_out.diminfo[0].strides) = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int16_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_7, __pyx_pybuffernd_values.diminfo[0].strides)); } __pyx_L5:; } __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.take_1d_int16_float64", __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_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_243take_1d_int32_int32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_243take_1d_int32_int32 = {__Pyx_NAMESTR("take_1d_int32_int32"), (PyCFunction)__pyx_pw_6pandas_5algos_243take_1d_int32_int32, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_243take_1d_int32_int32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_values = 0; PyArrayObject *__pyx_v_indexer = 0; PyArrayObject *__pyx_v_out = 0; PyObject *__pyx_v_fill_value = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("take_1d_int32_int32 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__values,&__pyx_n_s__indexer,&__pyx_n_s__out,&__pyx_n_s__fill_value,0}; PyObject* values[4] = {0,0,0,0}; values[3] = __pyx_k_118; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__values)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__indexer)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_1d_int32_int32", 0, 3, 4, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2411; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__out)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_1d_int32_int32", 0, 3, 4, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2411; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__fill_value); if (value) { values[3] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "take_1d_int32_int32") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2411; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_values = ((PyArrayObject *)values[0]); __pyx_v_indexer = ((PyArrayObject *)values[1]); __pyx_v_out = ((PyArrayObject *)values[2]); __pyx_v_fill_value = values[3]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("take_1d_int32_int32", 0, 3, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2411; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.take_1d_int32_int32", __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_filename = __pyx_f[2]; __pyx_lineno = 2411; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_indexer), __pyx_ptype_5numpy_ndarray, 1, "indexer", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2412; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_5numpy_ndarray, 1, "out", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2413; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_242take_1d_int32_int32(__pyx_self, __pyx_v_values, __pyx_v_indexer, __pyx_v_out, __pyx_v_fill_value); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":2411 * * @cython.wraparound(False) * def take_1d_int32_int32(ndarray[int32_t] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[int32_t] out, */ static PyObject *__pyx_pf_6pandas_5algos_242take_1d_int32_int32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_n; Py_ssize_t __pyx_v_idx; __pyx_t_5numpy_int32_t __pyx_v_fv; __Pyx_LocalBuf_ND __pyx_pybuffernd_indexer; __Pyx_Buffer __pyx_pybuffer_indexer; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_values; __Pyx_Buffer __pyx_pybuffer_values; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; __pyx_t_5numpy_int32_t __pyx_t_2; Py_ssize_t __pyx_t_3; int __pyx_t_4; int __pyx_t_5; Py_ssize_t __pyx_t_6; Py_ssize_t __pyx_t_7; Py_ssize_t __pyx_t_8; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("take_1d_int32_int32", 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_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; { __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_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2411; __pyx_clineno = __LINE__; goto __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_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2411; __pyx_clineno = __LINE__; goto __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_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_v_out, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2411; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; /* "pandas/src/generated.pyx":2419 * int32_t fv * * n = len(indexer) # <<<<<<<<<<<<<< * * fv = fill_value */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_indexer)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2419; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/src/generated.pyx":2421 * n = len(indexer) * * fv = fill_value # <<<<<<<<<<<<<< * for i from 0 <= i < n: * idx = indexer[i] */ __pyx_t_2 = __Pyx_PyInt_from_py_npy_int32(__pyx_v_fill_value); if (unlikely((__pyx_t_2 == (npy_int32)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2421; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_fv = __pyx_t_2; /* "pandas/src/generated.pyx":2422 * * fv = fill_value * for i from 0 <= i < n: # <<<<<<<<<<<<<< * idx = indexer[i] * if idx == -1: */ __pyx_t_1 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_1; __pyx_v_i++) { /* "pandas/src/generated.pyx":2423 * fv = fill_value * for i from 0 <= i < n: * idx = indexer[i] # <<<<<<<<<<<<<< * if idx == -1: * out[i] = fv */ __pyx_t_3 = __pyx_v_i; __pyx_t_4 = -1; if (__pyx_t_3 < 0) { __pyx_t_4 = 0; } else if (unlikely(__pyx_t_3 >= __pyx_pybuffernd_indexer.diminfo[0].shape)) __pyx_t_4 = 0; if (unlikely(__pyx_t_4 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_4); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2423; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_idx = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_3, __pyx_pybuffernd_indexer.diminfo[0].strides)); /* "pandas/src/generated.pyx":2424 * for i from 0 <= i < n: * idx = indexer[i] * if idx == -1: # <<<<<<<<<<<<<< * out[i] = fv * else: */ __pyx_t_5 = ((__pyx_v_idx == -1) != 0); if (__pyx_t_5) { /* "pandas/src/generated.pyx":2425 * idx = indexer[i] * if idx == -1: * out[i] = fv # <<<<<<<<<<<<<< * else: * out[i] = values[idx] */ __pyx_t_6 = __pyx_v_i; __pyx_t_4 = -1; if (__pyx_t_6 < 0) { __pyx_t_4 = 0; } else if (unlikely(__pyx_t_6 >= __pyx_pybuffernd_out.diminfo[0].shape)) __pyx_t_4 = 0; if (unlikely(__pyx_t_4 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_4); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2425; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_6, __pyx_pybuffernd_out.diminfo[0].strides) = __pyx_v_fv; goto __pyx_L5; } /*else*/ { /* "pandas/src/generated.pyx":2427 * out[i] = fv * else: * out[i] = values[idx] # <<<<<<<<<<<<<< * * @cython.wraparound(False) */ __pyx_t_7 = __pyx_v_idx; __pyx_t_4 = -1; if (__pyx_t_7 < 0) { __pyx_t_4 = 0; } else if (unlikely(__pyx_t_7 >= __pyx_pybuffernd_values.diminfo[0].shape)) __pyx_t_4 = 0; if (unlikely(__pyx_t_4 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_4); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2427; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_8 = __pyx_v_i; __pyx_t_4 = -1; if (__pyx_t_8 < 0) { __pyx_t_4 = 0; } else if (unlikely(__pyx_t_8 >= __pyx_pybuffernd_out.diminfo[0].shape)) __pyx_t_4 = 0; if (unlikely(__pyx_t_4 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_4); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2427; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_8, __pyx_pybuffernd_out.diminfo[0].strides) = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_7, __pyx_pybuffernd_values.diminfo[0].strides)); } __pyx_L5:; } __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.take_1d_int32_int32", __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_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_245take_1d_int32_int64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_245take_1d_int32_int64 = {__Pyx_NAMESTR("take_1d_int32_int64"), (PyCFunction)__pyx_pw_6pandas_5algos_245take_1d_int32_int64, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_245take_1d_int32_int64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_values = 0; PyArrayObject *__pyx_v_indexer = 0; PyArrayObject *__pyx_v_out = 0; PyObject *__pyx_v_fill_value = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("take_1d_int32_int64 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__values,&__pyx_n_s__indexer,&__pyx_n_s__out,&__pyx_n_s__fill_value,0}; PyObject* values[4] = {0,0,0,0}; values[3] = __pyx_k_119; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__values)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__indexer)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_1d_int32_int64", 0, 3, 4, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2430; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__out)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_1d_int32_int64", 0, 3, 4, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2430; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__fill_value); if (value) { values[3] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "take_1d_int32_int64") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2430; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_values = ((PyArrayObject *)values[0]); __pyx_v_indexer = ((PyArrayObject *)values[1]); __pyx_v_out = ((PyArrayObject *)values[2]); __pyx_v_fill_value = values[3]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("take_1d_int32_int64", 0, 3, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2430; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.take_1d_int32_int64", __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_filename = __pyx_f[2]; __pyx_lineno = 2430; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_indexer), __pyx_ptype_5numpy_ndarray, 1, "indexer", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2431; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_5numpy_ndarray, 1, "out", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2432; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_244take_1d_int32_int64(__pyx_self, __pyx_v_values, __pyx_v_indexer, __pyx_v_out, __pyx_v_fill_value); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":2430 * * @cython.wraparound(False) * def take_1d_int32_int64(ndarray[int32_t] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[int64_t] out, */ static PyObject *__pyx_pf_6pandas_5algos_244take_1d_int32_int64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_n; Py_ssize_t __pyx_v_idx; __pyx_t_5numpy_int64_t __pyx_v_fv; __Pyx_LocalBuf_ND __pyx_pybuffernd_indexer; __Pyx_Buffer __pyx_pybuffer_indexer; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_values; __Pyx_Buffer __pyx_pybuffer_values; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; __pyx_t_5numpy_int64_t __pyx_t_2; Py_ssize_t __pyx_t_3; int __pyx_t_4; int __pyx_t_5; Py_ssize_t __pyx_t_6; Py_ssize_t __pyx_t_7; Py_ssize_t __pyx_t_8; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("take_1d_int32_int64", 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_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; { __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_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2430; __pyx_clineno = __LINE__; goto __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_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2430; __pyx_clineno = __LINE__; goto __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_BufFmt_StackElem __pyx_stack[1]; 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)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2430; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; /* "pandas/src/generated.pyx":2438 * int64_t fv * * n = len(indexer) # <<<<<<<<<<<<<< * * fv = fill_value */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_indexer)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2438; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/src/generated.pyx":2440 * n = len(indexer) * * fv = fill_value # <<<<<<<<<<<<<< * for i from 0 <= i < n: * idx = indexer[i] */ __pyx_t_2 = __Pyx_PyInt_from_py_npy_int64(__pyx_v_fill_value); if (unlikely((__pyx_t_2 == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2440; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_fv = __pyx_t_2; /* "pandas/src/generated.pyx":2441 * * fv = fill_value * for i from 0 <= i < n: # <<<<<<<<<<<<<< * idx = indexer[i] * if idx == -1: */ __pyx_t_1 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_1; __pyx_v_i++) { /* "pandas/src/generated.pyx":2442 * fv = fill_value * for i from 0 <= i < n: * idx = indexer[i] # <<<<<<<<<<<<<< * if idx == -1: * out[i] = fv */ __pyx_t_3 = __pyx_v_i; __pyx_t_4 = -1; if (__pyx_t_3 < 0) { __pyx_t_4 = 0; } else if (unlikely(__pyx_t_3 >= __pyx_pybuffernd_indexer.diminfo[0].shape)) __pyx_t_4 = 0; if (unlikely(__pyx_t_4 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_4); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2442; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_idx = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_3, __pyx_pybuffernd_indexer.diminfo[0].strides)); /* "pandas/src/generated.pyx":2443 * for i from 0 <= i < n: * idx = indexer[i] * if idx == -1: # <<<<<<<<<<<<<< * out[i] = fv * else: */ __pyx_t_5 = ((__pyx_v_idx == -1) != 0); if (__pyx_t_5) { /* "pandas/src/generated.pyx":2444 * idx = indexer[i] * if idx == -1: * out[i] = fv # <<<<<<<<<<<<<< * else: * out[i] = values[idx] */ __pyx_t_6 = __pyx_v_i; __pyx_t_4 = -1; if (__pyx_t_6 < 0) { __pyx_t_4 = 0; } else if (unlikely(__pyx_t_6 >= __pyx_pybuffernd_out.diminfo[0].shape)) __pyx_t_4 = 0; if (unlikely(__pyx_t_4 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_4); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2444; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_6, __pyx_pybuffernd_out.diminfo[0].strides) = __pyx_v_fv; goto __pyx_L5; } /*else*/ { /* "pandas/src/generated.pyx":2446 * out[i] = fv * else: * out[i] = values[idx] # <<<<<<<<<<<<<< * * @cython.wraparound(False) */ __pyx_t_7 = __pyx_v_idx; __pyx_t_4 = -1; if (__pyx_t_7 < 0) { __pyx_t_4 = 0; } else if (unlikely(__pyx_t_7 >= __pyx_pybuffernd_values.diminfo[0].shape)) __pyx_t_4 = 0; if (unlikely(__pyx_t_4 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_4); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2446; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_8 = __pyx_v_i; __pyx_t_4 = -1; if (__pyx_t_8 < 0) { __pyx_t_4 = 0; } else if (unlikely(__pyx_t_8 >= __pyx_pybuffernd_out.diminfo[0].shape)) __pyx_t_4 = 0; if (unlikely(__pyx_t_4 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_4); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2446; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_8, __pyx_pybuffernd_out.diminfo[0].strides) = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_7, __pyx_pybuffernd_values.diminfo[0].strides)); } __pyx_L5:; } __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.take_1d_int32_int64", __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_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_247take_1d_int32_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_247take_1d_int32_float64 = {__Pyx_NAMESTR("take_1d_int32_float64"), (PyCFunction)__pyx_pw_6pandas_5algos_247take_1d_int32_float64, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_247take_1d_int32_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_values = 0; PyArrayObject *__pyx_v_indexer = 0; PyArrayObject *__pyx_v_out = 0; PyObject *__pyx_v_fill_value = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("take_1d_int32_float64 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__values,&__pyx_n_s__indexer,&__pyx_n_s__out,&__pyx_n_s__fill_value,0}; PyObject* values[4] = {0,0,0,0}; values[3] = __pyx_k_120; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__values)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__indexer)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_1d_int32_float64", 0, 3, 4, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2449; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__out)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_1d_int32_float64", 0, 3, 4, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2449; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__fill_value); if (value) { values[3] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "take_1d_int32_float64") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2449; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_values = ((PyArrayObject *)values[0]); __pyx_v_indexer = ((PyArrayObject *)values[1]); __pyx_v_out = ((PyArrayObject *)values[2]); __pyx_v_fill_value = values[3]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("take_1d_int32_float64", 0, 3, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2449; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.take_1d_int32_float64", __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_filename = __pyx_f[2]; __pyx_lineno = 2449; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_indexer), __pyx_ptype_5numpy_ndarray, 1, "indexer", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2450; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_5numpy_ndarray, 1, "out", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2451; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_246take_1d_int32_float64(__pyx_self, __pyx_v_values, __pyx_v_indexer, __pyx_v_out, __pyx_v_fill_value); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":2449 * * @cython.wraparound(False) * def take_1d_int32_float64(ndarray[int32_t] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[float64_t] out, */ static PyObject *__pyx_pf_6pandas_5algos_246take_1d_int32_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_n; Py_ssize_t __pyx_v_idx; __pyx_t_5numpy_float64_t __pyx_v_fv; __Pyx_LocalBuf_ND __pyx_pybuffernd_indexer; __Pyx_Buffer __pyx_pybuffer_indexer; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_values; __Pyx_Buffer __pyx_pybuffer_values; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; __pyx_t_5numpy_float64_t __pyx_t_2; Py_ssize_t __pyx_t_3; int __pyx_t_4; int __pyx_t_5; Py_ssize_t __pyx_t_6; Py_ssize_t __pyx_t_7; Py_ssize_t __pyx_t_8; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("take_1d_int32_float64", 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_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; { __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_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2449; __pyx_clineno = __LINE__; goto __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_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2449; __pyx_clineno = __LINE__; goto __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_BufFmt_StackElem __pyx_stack[1]; 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)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2449; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; /* "pandas/src/generated.pyx":2457 * float64_t fv * * n = len(indexer) # <<<<<<<<<<<<<< * * fv = fill_value */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_indexer)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2457; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/src/generated.pyx":2459 * n = len(indexer) * * fv = fill_value # <<<<<<<<<<<<<< * for i from 0 <= i < n: * idx = indexer[i] */ __pyx_t_2 = __pyx_PyFloat_AsDouble(__pyx_v_fill_value); if (unlikely((__pyx_t_2 == (npy_float64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2459; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_fv = __pyx_t_2; /* "pandas/src/generated.pyx":2460 * * fv = fill_value * for i from 0 <= i < n: # <<<<<<<<<<<<<< * idx = indexer[i] * if idx == -1: */ __pyx_t_1 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_1; __pyx_v_i++) { /* "pandas/src/generated.pyx":2461 * fv = fill_value * for i from 0 <= i < n: * idx = indexer[i] # <<<<<<<<<<<<<< * if idx == -1: * out[i] = fv */ __pyx_t_3 = __pyx_v_i; __pyx_t_4 = -1; if (__pyx_t_3 < 0) { __pyx_t_4 = 0; } else if (unlikely(__pyx_t_3 >= __pyx_pybuffernd_indexer.diminfo[0].shape)) __pyx_t_4 = 0; if (unlikely(__pyx_t_4 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_4); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2461; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_idx = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_3, __pyx_pybuffernd_indexer.diminfo[0].strides)); /* "pandas/src/generated.pyx":2462 * for i from 0 <= i < n: * idx = indexer[i] * if idx == -1: # <<<<<<<<<<<<<< * out[i] = fv * else: */ __pyx_t_5 = ((__pyx_v_idx == -1) != 0); if (__pyx_t_5) { /* "pandas/src/generated.pyx":2463 * idx = indexer[i] * if idx == -1: * out[i] = fv # <<<<<<<<<<<<<< * else: * out[i] = values[idx] */ __pyx_t_6 = __pyx_v_i; __pyx_t_4 = -1; if (__pyx_t_6 < 0) { __pyx_t_4 = 0; } else if (unlikely(__pyx_t_6 >= __pyx_pybuffernd_out.diminfo[0].shape)) __pyx_t_4 = 0; if (unlikely(__pyx_t_4 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_4); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2463; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_6, __pyx_pybuffernd_out.diminfo[0].strides) = __pyx_v_fv; goto __pyx_L5; } /*else*/ { /* "pandas/src/generated.pyx":2465 * out[i] = fv * else: * out[i] = values[idx] # <<<<<<<<<<<<<< * * @cython.wraparound(False) */ __pyx_t_7 = __pyx_v_idx; __pyx_t_4 = -1; if (__pyx_t_7 < 0) { __pyx_t_4 = 0; } else if (unlikely(__pyx_t_7 >= __pyx_pybuffernd_values.diminfo[0].shape)) __pyx_t_4 = 0; if (unlikely(__pyx_t_4 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_4); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2465; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_8 = __pyx_v_i; __pyx_t_4 = -1; if (__pyx_t_8 < 0) { __pyx_t_4 = 0; } else if (unlikely(__pyx_t_8 >= __pyx_pybuffernd_out.diminfo[0].shape)) __pyx_t_4 = 0; if (unlikely(__pyx_t_4 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_4); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2465; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_8, __pyx_pybuffernd_out.diminfo[0].strides) = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_7, __pyx_pybuffernd_values.diminfo[0].strides)); } __pyx_L5:; } __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.take_1d_int32_float64", __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_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_249take_1d_int64_int64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_249take_1d_int64_int64 = {__Pyx_NAMESTR("take_1d_int64_int64"), (PyCFunction)__pyx_pw_6pandas_5algos_249take_1d_int64_int64, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_249take_1d_int64_int64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_values = 0; PyArrayObject *__pyx_v_indexer = 0; PyArrayObject *__pyx_v_out = 0; PyObject *__pyx_v_fill_value = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("take_1d_int64_int64 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__values,&__pyx_n_s__indexer,&__pyx_n_s__out,&__pyx_n_s__fill_value,0}; PyObject* values[4] = {0,0,0,0}; values[3] = __pyx_k_121; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__values)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__indexer)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_1d_int64_int64", 0, 3, 4, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2468; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__out)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_1d_int64_int64", 0, 3, 4, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2468; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__fill_value); if (value) { values[3] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "take_1d_int64_int64") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2468; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_values = ((PyArrayObject *)values[0]); __pyx_v_indexer = ((PyArrayObject *)values[1]); __pyx_v_out = ((PyArrayObject *)values[2]); __pyx_v_fill_value = values[3]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("take_1d_int64_int64", 0, 3, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2468; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.take_1d_int64_int64", __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_filename = __pyx_f[2]; __pyx_lineno = 2468; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_indexer), __pyx_ptype_5numpy_ndarray, 1, "indexer", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2469; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_5numpy_ndarray, 1, "out", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2470; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_248take_1d_int64_int64(__pyx_self, __pyx_v_values, __pyx_v_indexer, __pyx_v_out, __pyx_v_fill_value); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":2468 * * @cython.wraparound(False) * def take_1d_int64_int64(ndarray[int64_t] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[int64_t] out, */ static PyObject *__pyx_pf_6pandas_5algos_248take_1d_int64_int64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_n; Py_ssize_t __pyx_v_idx; __pyx_t_5numpy_int64_t __pyx_v_fv; __Pyx_LocalBuf_ND __pyx_pybuffernd_indexer; __Pyx_Buffer __pyx_pybuffer_indexer; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_values; __Pyx_Buffer __pyx_pybuffer_values; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; __pyx_t_5numpy_int64_t __pyx_t_2; Py_ssize_t __pyx_t_3; int __pyx_t_4; int __pyx_t_5; Py_ssize_t __pyx_t_6; Py_ssize_t __pyx_t_7; Py_ssize_t __pyx_t_8; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("take_1d_int64_int64", 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_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; { __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_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2468; __pyx_clineno = __LINE__; goto __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_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2468; __pyx_clineno = __LINE__; goto __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_BufFmt_StackElem __pyx_stack[1]; 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)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2468; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; /* "pandas/src/generated.pyx":2476 * int64_t fv * * n = len(indexer) # <<<<<<<<<<<<<< * * fv = fill_value */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_indexer)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2476; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/src/generated.pyx":2478 * n = len(indexer) * * fv = fill_value # <<<<<<<<<<<<<< * for i from 0 <= i < n: * idx = indexer[i] */ __pyx_t_2 = __Pyx_PyInt_from_py_npy_int64(__pyx_v_fill_value); if (unlikely((__pyx_t_2 == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2478; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_fv = __pyx_t_2; /* "pandas/src/generated.pyx":2479 * * fv = fill_value * for i from 0 <= i < n: # <<<<<<<<<<<<<< * idx = indexer[i] * if idx == -1: */ __pyx_t_1 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_1; __pyx_v_i++) { /* "pandas/src/generated.pyx":2480 * fv = fill_value * for i from 0 <= i < n: * idx = indexer[i] # <<<<<<<<<<<<<< * if idx == -1: * out[i] = fv */ __pyx_t_3 = __pyx_v_i; __pyx_t_4 = -1; if (__pyx_t_3 < 0) { __pyx_t_4 = 0; } else if (unlikely(__pyx_t_3 >= __pyx_pybuffernd_indexer.diminfo[0].shape)) __pyx_t_4 = 0; if (unlikely(__pyx_t_4 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_4); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2480; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_idx = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_3, __pyx_pybuffernd_indexer.diminfo[0].strides)); /* "pandas/src/generated.pyx":2481 * for i from 0 <= i < n: * idx = indexer[i] * if idx == -1: # <<<<<<<<<<<<<< * out[i] = fv * else: */ __pyx_t_5 = ((__pyx_v_idx == -1) != 0); if (__pyx_t_5) { /* "pandas/src/generated.pyx":2482 * idx = indexer[i] * if idx == -1: * out[i] = fv # <<<<<<<<<<<<<< * else: * out[i] = values[idx] */ __pyx_t_6 = __pyx_v_i; __pyx_t_4 = -1; if (__pyx_t_6 < 0) { __pyx_t_4 = 0; } else if (unlikely(__pyx_t_6 >= __pyx_pybuffernd_out.diminfo[0].shape)) __pyx_t_4 = 0; if (unlikely(__pyx_t_4 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_4); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2482; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_6, __pyx_pybuffernd_out.diminfo[0].strides) = __pyx_v_fv; goto __pyx_L5; } /*else*/ { /* "pandas/src/generated.pyx":2484 * out[i] = fv * else: * out[i] = values[idx] # <<<<<<<<<<<<<< * * @cython.wraparound(False) */ __pyx_t_7 = __pyx_v_idx; __pyx_t_4 = -1; if (__pyx_t_7 < 0) { __pyx_t_4 = 0; } else if (unlikely(__pyx_t_7 >= __pyx_pybuffernd_values.diminfo[0].shape)) __pyx_t_4 = 0; if (unlikely(__pyx_t_4 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_4); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2484; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_8 = __pyx_v_i; __pyx_t_4 = -1; if (__pyx_t_8 < 0) { __pyx_t_4 = 0; } else if (unlikely(__pyx_t_8 >= __pyx_pybuffernd_out.diminfo[0].shape)) __pyx_t_4 = 0; if (unlikely(__pyx_t_4 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_4); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2484; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_8, __pyx_pybuffernd_out.diminfo[0].strides) = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_7, __pyx_pybuffernd_values.diminfo[0].strides)); } __pyx_L5:; } __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.take_1d_int64_int64", __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_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_251take_1d_int64_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_251take_1d_int64_float64 = {__Pyx_NAMESTR("take_1d_int64_float64"), (PyCFunction)__pyx_pw_6pandas_5algos_251take_1d_int64_float64, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_251take_1d_int64_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_values = 0; PyArrayObject *__pyx_v_indexer = 0; PyArrayObject *__pyx_v_out = 0; PyObject *__pyx_v_fill_value = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("take_1d_int64_float64 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__values,&__pyx_n_s__indexer,&__pyx_n_s__out,&__pyx_n_s__fill_value,0}; PyObject* values[4] = {0,0,0,0}; values[3] = __pyx_k_122; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__values)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__indexer)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_1d_int64_float64", 0, 3, 4, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2487; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__out)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_1d_int64_float64", 0, 3, 4, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2487; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__fill_value); if (value) { values[3] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "take_1d_int64_float64") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2487; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_values = ((PyArrayObject *)values[0]); __pyx_v_indexer = ((PyArrayObject *)values[1]); __pyx_v_out = ((PyArrayObject *)values[2]); __pyx_v_fill_value = values[3]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("take_1d_int64_float64", 0, 3, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2487; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.take_1d_int64_float64", __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_filename = __pyx_f[2]; __pyx_lineno = 2487; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_indexer), __pyx_ptype_5numpy_ndarray, 1, "indexer", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2488; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_5numpy_ndarray, 1, "out", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2489; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_250take_1d_int64_float64(__pyx_self, __pyx_v_values, __pyx_v_indexer, __pyx_v_out, __pyx_v_fill_value); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":2487 * * @cython.wraparound(False) * def take_1d_int64_float64(ndarray[int64_t] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[float64_t] out, */ static PyObject *__pyx_pf_6pandas_5algos_250take_1d_int64_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_n; Py_ssize_t __pyx_v_idx; __pyx_t_5numpy_float64_t __pyx_v_fv; __Pyx_LocalBuf_ND __pyx_pybuffernd_indexer; __Pyx_Buffer __pyx_pybuffer_indexer; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_values; __Pyx_Buffer __pyx_pybuffer_values; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; __pyx_t_5numpy_float64_t __pyx_t_2; Py_ssize_t __pyx_t_3; int __pyx_t_4; int __pyx_t_5; Py_ssize_t __pyx_t_6; Py_ssize_t __pyx_t_7; Py_ssize_t __pyx_t_8; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("take_1d_int64_float64", 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_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; { __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_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2487; __pyx_clineno = __LINE__; goto __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_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2487; __pyx_clineno = __LINE__; goto __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_BufFmt_StackElem __pyx_stack[1]; 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)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2487; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; /* "pandas/src/generated.pyx":2495 * float64_t fv * * n = len(indexer) # <<<<<<<<<<<<<< * * fv = fill_value */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_indexer)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2495; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/src/generated.pyx":2497 * n = len(indexer) * * fv = fill_value # <<<<<<<<<<<<<< * for i from 0 <= i < n: * idx = indexer[i] */ __pyx_t_2 = __pyx_PyFloat_AsDouble(__pyx_v_fill_value); if (unlikely((__pyx_t_2 == (npy_float64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2497; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_fv = __pyx_t_2; /* "pandas/src/generated.pyx":2498 * * fv = fill_value * for i from 0 <= i < n: # <<<<<<<<<<<<<< * idx = indexer[i] * if idx == -1: */ __pyx_t_1 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_1; __pyx_v_i++) { /* "pandas/src/generated.pyx":2499 * fv = fill_value * for i from 0 <= i < n: * idx = indexer[i] # <<<<<<<<<<<<<< * if idx == -1: * out[i] = fv */ __pyx_t_3 = __pyx_v_i; __pyx_t_4 = -1; if (__pyx_t_3 < 0) { __pyx_t_4 = 0; } else if (unlikely(__pyx_t_3 >= __pyx_pybuffernd_indexer.diminfo[0].shape)) __pyx_t_4 = 0; if (unlikely(__pyx_t_4 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_4); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2499; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_idx = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_3, __pyx_pybuffernd_indexer.diminfo[0].strides)); /* "pandas/src/generated.pyx":2500 * for i from 0 <= i < n: * idx = indexer[i] * if idx == -1: # <<<<<<<<<<<<<< * out[i] = fv * else: */ __pyx_t_5 = ((__pyx_v_idx == -1) != 0); if (__pyx_t_5) { /* "pandas/src/generated.pyx":2501 * idx = indexer[i] * if idx == -1: * out[i] = fv # <<<<<<<<<<<<<< * else: * out[i] = values[idx] */ __pyx_t_6 = __pyx_v_i; __pyx_t_4 = -1; if (__pyx_t_6 < 0) { __pyx_t_4 = 0; } else if (unlikely(__pyx_t_6 >= __pyx_pybuffernd_out.diminfo[0].shape)) __pyx_t_4 = 0; if (unlikely(__pyx_t_4 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_4); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2501; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_6, __pyx_pybuffernd_out.diminfo[0].strides) = __pyx_v_fv; goto __pyx_L5; } /*else*/ { /* "pandas/src/generated.pyx":2503 * out[i] = fv * else: * out[i] = values[idx] # <<<<<<<<<<<<<< * * @cython.wraparound(False) */ __pyx_t_7 = __pyx_v_idx; __pyx_t_4 = -1; if (__pyx_t_7 < 0) { __pyx_t_4 = 0; } else if (unlikely(__pyx_t_7 >= __pyx_pybuffernd_values.diminfo[0].shape)) __pyx_t_4 = 0; if (unlikely(__pyx_t_4 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_4); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2503; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_8 = __pyx_v_i; __pyx_t_4 = -1; if (__pyx_t_8 < 0) { __pyx_t_4 = 0; } else if (unlikely(__pyx_t_8 >= __pyx_pybuffernd_out.diminfo[0].shape)) __pyx_t_4 = 0; if (unlikely(__pyx_t_4 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_4); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2503; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_8, __pyx_pybuffernd_out.diminfo[0].strides) = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_7, __pyx_pybuffernd_values.diminfo[0].strides)); } __pyx_L5:; } __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.take_1d_int64_float64", __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_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_253take_1d_float32_float32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_253take_1d_float32_float32 = {__Pyx_NAMESTR("take_1d_float32_float32"), (PyCFunction)__pyx_pw_6pandas_5algos_253take_1d_float32_float32, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_253take_1d_float32_float32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_values = 0; PyArrayObject *__pyx_v_indexer = 0; PyArrayObject *__pyx_v_out = 0; PyObject *__pyx_v_fill_value = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("take_1d_float32_float32 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__values,&__pyx_n_s__indexer,&__pyx_n_s__out,&__pyx_n_s__fill_value,0}; PyObject* values[4] = {0,0,0,0}; values[3] = __pyx_k_123; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__values)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__indexer)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_1d_float32_float32", 0, 3, 4, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2506; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__out)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_1d_float32_float32", 0, 3, 4, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2506; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__fill_value); if (value) { values[3] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "take_1d_float32_float32") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2506; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_values = ((PyArrayObject *)values[0]); __pyx_v_indexer = ((PyArrayObject *)values[1]); __pyx_v_out = ((PyArrayObject *)values[2]); __pyx_v_fill_value = values[3]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("take_1d_float32_float32", 0, 3, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2506; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.take_1d_float32_float32", __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_filename = __pyx_f[2]; __pyx_lineno = 2506; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_indexer), __pyx_ptype_5numpy_ndarray, 1, "indexer", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2507; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_5numpy_ndarray, 1, "out", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2508; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_252take_1d_float32_float32(__pyx_self, __pyx_v_values, __pyx_v_indexer, __pyx_v_out, __pyx_v_fill_value); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":2506 * * @cython.wraparound(False) * def take_1d_float32_float32(ndarray[float32_t] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[float32_t] out, */ static PyObject *__pyx_pf_6pandas_5algos_252take_1d_float32_float32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_n; Py_ssize_t __pyx_v_idx; __pyx_t_5numpy_float32_t __pyx_v_fv; __Pyx_LocalBuf_ND __pyx_pybuffernd_indexer; __Pyx_Buffer __pyx_pybuffer_indexer; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_values; __Pyx_Buffer __pyx_pybuffer_values; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; __pyx_t_5numpy_float32_t __pyx_t_2; Py_ssize_t __pyx_t_3; int __pyx_t_4; int __pyx_t_5; Py_ssize_t __pyx_t_6; Py_ssize_t __pyx_t_7; Py_ssize_t __pyx_t_8; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("take_1d_float32_float32", 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_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; { __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_float32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2506; __pyx_clineno = __LINE__; goto __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_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2506; __pyx_clineno = __LINE__; goto __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_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_v_out, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2506; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; /* "pandas/src/generated.pyx":2514 * float32_t fv * * n = len(indexer) # <<<<<<<<<<<<<< * * fv = fill_value */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_indexer)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2514; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/src/generated.pyx":2516 * n = len(indexer) * * fv = fill_value # <<<<<<<<<<<<<< * for i from 0 <= i < n: * idx = indexer[i] */ __pyx_t_2 = __pyx_PyFloat_AsFloat(__pyx_v_fill_value); if (unlikely((__pyx_t_2 == (npy_float32)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2516; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_fv = __pyx_t_2; /* "pandas/src/generated.pyx":2517 * * fv = fill_value * for i from 0 <= i < n: # <<<<<<<<<<<<<< * idx = indexer[i] * if idx == -1: */ __pyx_t_1 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_1; __pyx_v_i++) { /* "pandas/src/generated.pyx":2518 * fv = fill_value * for i from 0 <= i < n: * idx = indexer[i] # <<<<<<<<<<<<<< * if idx == -1: * out[i] = fv */ __pyx_t_3 = __pyx_v_i; __pyx_t_4 = -1; if (__pyx_t_3 < 0) { __pyx_t_4 = 0; } else if (unlikely(__pyx_t_3 >= __pyx_pybuffernd_indexer.diminfo[0].shape)) __pyx_t_4 = 0; if (unlikely(__pyx_t_4 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_4); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2518; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_idx = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_3, __pyx_pybuffernd_indexer.diminfo[0].strides)); /* "pandas/src/generated.pyx":2519 * for i from 0 <= i < n: * idx = indexer[i] * if idx == -1: # <<<<<<<<<<<<<< * out[i] = fv * else: */ __pyx_t_5 = ((__pyx_v_idx == -1) != 0); if (__pyx_t_5) { /* "pandas/src/generated.pyx":2520 * idx = indexer[i] * if idx == -1: * out[i] = fv # <<<<<<<<<<<<<< * else: * out[i] = values[idx] */ __pyx_t_6 = __pyx_v_i; __pyx_t_4 = -1; if (__pyx_t_6 < 0) { __pyx_t_4 = 0; } else if (unlikely(__pyx_t_6 >= __pyx_pybuffernd_out.diminfo[0].shape)) __pyx_t_4 = 0; if (unlikely(__pyx_t_4 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_4); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2520; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_6, __pyx_pybuffernd_out.diminfo[0].strides) = __pyx_v_fv; goto __pyx_L5; } /*else*/ { /* "pandas/src/generated.pyx":2522 * out[i] = fv * else: * out[i] = values[idx] # <<<<<<<<<<<<<< * * @cython.wraparound(False) */ __pyx_t_7 = __pyx_v_idx; __pyx_t_4 = -1; if (__pyx_t_7 < 0) { __pyx_t_4 = 0; } else if (unlikely(__pyx_t_7 >= __pyx_pybuffernd_values.diminfo[0].shape)) __pyx_t_4 = 0; if (unlikely(__pyx_t_4 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_4); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2522; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_8 = __pyx_v_i; __pyx_t_4 = -1; if (__pyx_t_8 < 0) { __pyx_t_4 = 0; } else if (unlikely(__pyx_t_8 >= __pyx_pybuffernd_out.diminfo[0].shape)) __pyx_t_4 = 0; if (unlikely(__pyx_t_4 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_4); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2522; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_8, __pyx_pybuffernd_out.diminfo[0].strides) = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_7, __pyx_pybuffernd_values.diminfo[0].strides)); } __pyx_L5:; } __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.take_1d_float32_float32", __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_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_255take_1d_float32_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_255take_1d_float32_float64 = {__Pyx_NAMESTR("take_1d_float32_float64"), (PyCFunction)__pyx_pw_6pandas_5algos_255take_1d_float32_float64, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_255take_1d_float32_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_values = 0; PyArrayObject *__pyx_v_indexer = 0; PyArrayObject *__pyx_v_out = 0; PyObject *__pyx_v_fill_value = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("take_1d_float32_float64 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__values,&__pyx_n_s__indexer,&__pyx_n_s__out,&__pyx_n_s__fill_value,0}; PyObject* values[4] = {0,0,0,0}; values[3] = __pyx_k_124; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__values)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__indexer)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_1d_float32_float64", 0, 3, 4, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2525; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__out)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_1d_float32_float64", 0, 3, 4, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2525; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__fill_value); if (value) { values[3] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "take_1d_float32_float64") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2525; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_values = ((PyArrayObject *)values[0]); __pyx_v_indexer = ((PyArrayObject *)values[1]); __pyx_v_out = ((PyArrayObject *)values[2]); __pyx_v_fill_value = values[3]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("take_1d_float32_float64", 0, 3, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2525; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.take_1d_float32_float64", __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_filename = __pyx_f[2]; __pyx_lineno = 2525; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_indexer), __pyx_ptype_5numpy_ndarray, 1, "indexer", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2526; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_5numpy_ndarray, 1, "out", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2527; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_254take_1d_float32_float64(__pyx_self, __pyx_v_values, __pyx_v_indexer, __pyx_v_out, __pyx_v_fill_value); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":2525 * * @cython.wraparound(False) * def take_1d_float32_float64(ndarray[float32_t] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[float64_t] out, */ static PyObject *__pyx_pf_6pandas_5algos_254take_1d_float32_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_n; Py_ssize_t __pyx_v_idx; __pyx_t_5numpy_float64_t __pyx_v_fv; __Pyx_LocalBuf_ND __pyx_pybuffernd_indexer; __Pyx_Buffer __pyx_pybuffer_indexer; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_values; __Pyx_Buffer __pyx_pybuffer_values; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; __pyx_t_5numpy_float64_t __pyx_t_2; Py_ssize_t __pyx_t_3; int __pyx_t_4; int __pyx_t_5; Py_ssize_t __pyx_t_6; Py_ssize_t __pyx_t_7; Py_ssize_t __pyx_t_8; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("take_1d_float32_float64", 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_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; { __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_float32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2525; __pyx_clineno = __LINE__; goto __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_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2525; __pyx_clineno = __LINE__; goto __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_BufFmt_StackElem __pyx_stack[1]; 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)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2525; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; /* "pandas/src/generated.pyx":2533 * float64_t fv * * n = len(indexer) # <<<<<<<<<<<<<< * * fv = fill_value */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_indexer)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2533; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/src/generated.pyx":2535 * n = len(indexer) * * fv = fill_value # <<<<<<<<<<<<<< * for i from 0 <= i < n: * idx = indexer[i] */ __pyx_t_2 = __pyx_PyFloat_AsDouble(__pyx_v_fill_value); if (unlikely((__pyx_t_2 == (npy_float64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2535; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_fv = __pyx_t_2; /* "pandas/src/generated.pyx":2536 * * fv = fill_value * for i from 0 <= i < n: # <<<<<<<<<<<<<< * idx = indexer[i] * if idx == -1: */ __pyx_t_1 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_1; __pyx_v_i++) { /* "pandas/src/generated.pyx":2537 * fv = fill_value * for i from 0 <= i < n: * idx = indexer[i] # <<<<<<<<<<<<<< * if idx == -1: * out[i] = fv */ __pyx_t_3 = __pyx_v_i; __pyx_t_4 = -1; if (__pyx_t_3 < 0) { __pyx_t_4 = 0; } else if (unlikely(__pyx_t_3 >= __pyx_pybuffernd_indexer.diminfo[0].shape)) __pyx_t_4 = 0; if (unlikely(__pyx_t_4 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_4); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2537; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_idx = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_3, __pyx_pybuffernd_indexer.diminfo[0].strides)); /* "pandas/src/generated.pyx":2538 * for i from 0 <= i < n: * idx = indexer[i] * if idx == -1: # <<<<<<<<<<<<<< * out[i] = fv * else: */ __pyx_t_5 = ((__pyx_v_idx == -1) != 0); if (__pyx_t_5) { /* "pandas/src/generated.pyx":2539 * idx = indexer[i] * if idx == -1: * out[i] = fv # <<<<<<<<<<<<<< * else: * out[i] = values[idx] */ __pyx_t_6 = __pyx_v_i; __pyx_t_4 = -1; if (__pyx_t_6 < 0) { __pyx_t_4 = 0; } else if (unlikely(__pyx_t_6 >= __pyx_pybuffernd_out.diminfo[0].shape)) __pyx_t_4 = 0; if (unlikely(__pyx_t_4 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_4); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2539; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_6, __pyx_pybuffernd_out.diminfo[0].strides) = __pyx_v_fv; goto __pyx_L5; } /*else*/ { /* "pandas/src/generated.pyx":2541 * out[i] = fv * else: * out[i] = values[idx] # <<<<<<<<<<<<<< * * @cython.wraparound(False) */ __pyx_t_7 = __pyx_v_idx; __pyx_t_4 = -1; if (__pyx_t_7 < 0) { __pyx_t_4 = 0; } else if (unlikely(__pyx_t_7 >= __pyx_pybuffernd_values.diminfo[0].shape)) __pyx_t_4 = 0; if (unlikely(__pyx_t_4 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_4); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2541; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_8 = __pyx_v_i; __pyx_t_4 = -1; if (__pyx_t_8 < 0) { __pyx_t_4 = 0; } else if (unlikely(__pyx_t_8 >= __pyx_pybuffernd_out.diminfo[0].shape)) __pyx_t_4 = 0; if (unlikely(__pyx_t_4 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_4); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2541; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_8, __pyx_pybuffernd_out.diminfo[0].strides) = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_7, __pyx_pybuffernd_values.diminfo[0].strides)); } __pyx_L5:; } __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.take_1d_float32_float64", __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_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_257take_1d_float64_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_257take_1d_float64_float64 = {__Pyx_NAMESTR("take_1d_float64_float64"), (PyCFunction)__pyx_pw_6pandas_5algos_257take_1d_float64_float64, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_257take_1d_float64_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_values = 0; PyArrayObject *__pyx_v_indexer = 0; PyArrayObject *__pyx_v_out = 0; PyObject *__pyx_v_fill_value = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("take_1d_float64_float64 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__values,&__pyx_n_s__indexer,&__pyx_n_s__out,&__pyx_n_s__fill_value,0}; PyObject* values[4] = {0,0,0,0}; values[3] = __pyx_k_125; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__values)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__indexer)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_1d_float64_float64", 0, 3, 4, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2544; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__out)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_1d_float64_float64", 0, 3, 4, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2544; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__fill_value); if (value) { values[3] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "take_1d_float64_float64") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2544; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_values = ((PyArrayObject *)values[0]); __pyx_v_indexer = ((PyArrayObject *)values[1]); __pyx_v_out = ((PyArrayObject *)values[2]); __pyx_v_fill_value = values[3]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("take_1d_float64_float64", 0, 3, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2544; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.take_1d_float64_float64", __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_filename = __pyx_f[2]; __pyx_lineno = 2544; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_indexer), __pyx_ptype_5numpy_ndarray, 1, "indexer", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2545; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_5numpy_ndarray, 1, "out", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2546; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_256take_1d_float64_float64(__pyx_self, __pyx_v_values, __pyx_v_indexer, __pyx_v_out, __pyx_v_fill_value); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":2544 * * @cython.wraparound(False) * def take_1d_float64_float64(ndarray[float64_t] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[float64_t] out, */ static PyObject *__pyx_pf_6pandas_5algos_256take_1d_float64_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_n; Py_ssize_t __pyx_v_idx; __pyx_t_5numpy_float64_t __pyx_v_fv; __Pyx_LocalBuf_ND __pyx_pybuffernd_indexer; __Pyx_Buffer __pyx_pybuffer_indexer; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_values; __Pyx_Buffer __pyx_pybuffer_values; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; __pyx_t_5numpy_float64_t __pyx_t_2; Py_ssize_t __pyx_t_3; int __pyx_t_4; int __pyx_t_5; Py_ssize_t __pyx_t_6; Py_ssize_t __pyx_t_7; Py_ssize_t __pyx_t_8; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("take_1d_float64_float64", 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_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; { __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_filename = __pyx_f[2]; __pyx_lineno = 2544; __pyx_clineno = __LINE__; goto __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_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2544; __pyx_clineno = __LINE__; goto __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_BufFmt_StackElem __pyx_stack[1]; 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)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2544; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; /* "pandas/src/generated.pyx":2552 * float64_t fv * * n = len(indexer) # <<<<<<<<<<<<<< * * fv = fill_value */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_indexer)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2552; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/src/generated.pyx":2554 * n = len(indexer) * * fv = fill_value # <<<<<<<<<<<<<< * for i from 0 <= i < n: * idx = indexer[i] */ __pyx_t_2 = __pyx_PyFloat_AsDouble(__pyx_v_fill_value); if (unlikely((__pyx_t_2 == (npy_float64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2554; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_fv = __pyx_t_2; /* "pandas/src/generated.pyx":2555 * * fv = fill_value * for i from 0 <= i < n: # <<<<<<<<<<<<<< * idx = indexer[i] * if idx == -1: */ __pyx_t_1 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_1; __pyx_v_i++) { /* "pandas/src/generated.pyx":2556 * fv = fill_value * for i from 0 <= i < n: * idx = indexer[i] # <<<<<<<<<<<<<< * if idx == -1: * out[i] = fv */ __pyx_t_3 = __pyx_v_i; __pyx_t_4 = -1; if (__pyx_t_3 < 0) { __pyx_t_4 = 0; } else if (unlikely(__pyx_t_3 >= __pyx_pybuffernd_indexer.diminfo[0].shape)) __pyx_t_4 = 0; if (unlikely(__pyx_t_4 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_4); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2556; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_idx = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_3, __pyx_pybuffernd_indexer.diminfo[0].strides)); /* "pandas/src/generated.pyx":2557 * for i from 0 <= i < n: * idx = indexer[i] * if idx == -1: # <<<<<<<<<<<<<< * out[i] = fv * else: */ __pyx_t_5 = ((__pyx_v_idx == -1) != 0); if (__pyx_t_5) { /* "pandas/src/generated.pyx":2558 * idx = indexer[i] * if idx == -1: * out[i] = fv # <<<<<<<<<<<<<< * else: * out[i] = values[idx] */ __pyx_t_6 = __pyx_v_i; __pyx_t_4 = -1; if (__pyx_t_6 < 0) { __pyx_t_4 = 0; } else if (unlikely(__pyx_t_6 >= __pyx_pybuffernd_out.diminfo[0].shape)) __pyx_t_4 = 0; if (unlikely(__pyx_t_4 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_4); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2558; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_6, __pyx_pybuffernd_out.diminfo[0].strides) = __pyx_v_fv; goto __pyx_L5; } /*else*/ { /* "pandas/src/generated.pyx":2560 * out[i] = fv * else: * out[i] = values[idx] # <<<<<<<<<<<<<< * * @cython.wraparound(False) */ __pyx_t_7 = __pyx_v_idx; __pyx_t_4 = -1; if (__pyx_t_7 < 0) { __pyx_t_4 = 0; } else if (unlikely(__pyx_t_7 >= __pyx_pybuffernd_values.diminfo[0].shape)) __pyx_t_4 = 0; if (unlikely(__pyx_t_4 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_4); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2560; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_8 = __pyx_v_i; __pyx_t_4 = -1; if (__pyx_t_8 < 0) { __pyx_t_4 = 0; } else if (unlikely(__pyx_t_8 >= __pyx_pybuffernd_out.diminfo[0].shape)) __pyx_t_4 = 0; if (unlikely(__pyx_t_4 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_4); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2560; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_8, __pyx_pybuffernd_out.diminfo[0].strides) = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_7, __pyx_pybuffernd_values.diminfo[0].strides)); } __pyx_L5:; } __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.take_1d_float64_float64", __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_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_259take_1d_object_object(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_259take_1d_object_object = {__Pyx_NAMESTR("take_1d_object_object"), (PyCFunction)__pyx_pw_6pandas_5algos_259take_1d_object_object, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_259take_1d_object_object(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_values = 0; PyArrayObject *__pyx_v_indexer = 0; PyArrayObject *__pyx_v_out = 0; PyObject *__pyx_v_fill_value = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("take_1d_object_object (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__values,&__pyx_n_s__indexer,&__pyx_n_s__out,&__pyx_n_s__fill_value,0}; PyObject* values[4] = {0,0,0,0}; values[3] = __pyx_k_126; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__values)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__indexer)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_1d_object_object", 0, 3, 4, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2563; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__out)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_1d_object_object", 0, 3, 4, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2563; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__fill_value); if (value) { values[3] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "take_1d_object_object") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2563; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_values = ((PyArrayObject *)values[0]); __pyx_v_indexer = ((PyArrayObject *)values[1]); __pyx_v_out = ((PyArrayObject *)values[2]); __pyx_v_fill_value = values[3]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("take_1d_object_object", 0, 3, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2563; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.take_1d_object_object", __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_filename = __pyx_f[2]; __pyx_lineno = 2563; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_indexer), __pyx_ptype_5numpy_ndarray, 1, "indexer", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2564; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_5numpy_ndarray, 1, "out", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2565; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_258take_1d_object_object(__pyx_self, __pyx_v_values, __pyx_v_indexer, __pyx_v_out, __pyx_v_fill_value); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":2563 * * @cython.wraparound(False) * def take_1d_object_object(ndarray[object] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[object] out, */ static PyObject *__pyx_pf_6pandas_5algos_258take_1d_object_object(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_n; Py_ssize_t __pyx_v_idx; PyObject *__pyx_v_fv = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_indexer; __Pyx_Buffer __pyx_pybuffer_indexer; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_values; __Pyx_Buffer __pyx_pybuffer_values; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; Py_ssize_t __pyx_t_2; int __pyx_t_3; int __pyx_t_4; Py_ssize_t __pyx_t_5; PyObject **__pyx_t_6; PyObject *__pyx_t_7 = NULL; Py_ssize_t __pyx_t_8; Py_ssize_t __pyx_t_9; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("take_1d_object_object", 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_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; { __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_filename = __pyx_f[2]; __pyx_lineno = 2563; __pyx_clineno = __LINE__; goto __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_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2563; __pyx_clineno = __LINE__; goto __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_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_v_out, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2563; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; /* "pandas/src/generated.pyx":2571 * object fv * * n = len(indexer) # <<<<<<<<<<<<<< * * fv = fill_value */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_indexer)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2571; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/src/generated.pyx":2573 * n = len(indexer) * * fv = fill_value # <<<<<<<<<<<<<< * for i from 0 <= i < n: * idx = indexer[i] */ __Pyx_INCREF(__pyx_v_fill_value); __pyx_v_fv = __pyx_v_fill_value; /* "pandas/src/generated.pyx":2574 * * fv = fill_value * for i from 0 <= i < n: # <<<<<<<<<<<<<< * idx = indexer[i] * if idx == -1: */ __pyx_t_1 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_1; __pyx_v_i++) { /* "pandas/src/generated.pyx":2575 * fv = fill_value * for i from 0 <= i < n: * idx = indexer[i] # <<<<<<<<<<<<<< * if idx == -1: * out[i] = fv */ __pyx_t_2 = __pyx_v_i; __pyx_t_3 = -1; if (__pyx_t_2 < 0) { __pyx_t_3 = 0; } else if (unlikely(__pyx_t_2 >= __pyx_pybuffernd_indexer.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2575; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_idx = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_2, __pyx_pybuffernd_indexer.diminfo[0].strides)); /* "pandas/src/generated.pyx":2576 * for i from 0 <= i < n: * idx = indexer[i] * if idx == -1: # <<<<<<<<<<<<<< * out[i] = fv * else: */ __pyx_t_4 = ((__pyx_v_idx == -1) != 0); if (__pyx_t_4) { /* "pandas/src/generated.pyx":2577 * idx = indexer[i] * if idx == -1: * out[i] = fv # <<<<<<<<<<<<<< * else: * out[i] = values[idx] */ __pyx_t_5 = __pyx_v_i; __pyx_t_3 = -1; if (__pyx_t_5 < 0) { __pyx_t_3 = 0; } else if (unlikely(__pyx_t_5 >= __pyx_pybuffernd_out.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2577; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_6 = __Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_5, __pyx_pybuffernd_out.diminfo[0].strides); __Pyx_GOTREF(*__pyx_t_6); __Pyx_INCREF(__pyx_v_fv); __Pyx_DECREF(*__pyx_t_6); *__pyx_t_6 = __pyx_v_fv; __Pyx_GIVEREF(*__pyx_t_6); goto __pyx_L5; } /*else*/ { /* "pandas/src/generated.pyx":2579 * out[i] = fv * else: * out[i] = values[idx] # <<<<<<<<<<<<<< * * */ __pyx_t_8 = __pyx_v_idx; __pyx_t_3 = -1; if (__pyx_t_8 < 0) { __pyx_t_3 = 0; } else if (unlikely(__pyx_t_8 >= __pyx_pybuffernd_values.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2579; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_7 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_8, __pyx_pybuffernd_values.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_7); __pyx_t_9 = __pyx_v_i; __pyx_t_3 = -1; if (__pyx_t_9 < 0) { __pyx_t_3 = 0; } else if (unlikely(__pyx_t_9 >= __pyx_pybuffernd_out.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2579; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_6 = __Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_9, __pyx_pybuffernd_out.diminfo[0].strides); __Pyx_GOTREF(*__pyx_t_6); __Pyx_INCREF(__pyx_t_7); __Pyx_DECREF(*__pyx_t_6); *__pyx_t_6 = __pyx_t_7; __Pyx_GIVEREF(*__pyx_t_6); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } __pyx_L5:; } __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_7); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.take_1d_object_object", __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_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF(__pyx_v_fv); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_261take_2d_axis0_bool_bool(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_261take_2d_axis0_bool_bool = {__Pyx_NAMESTR("take_2d_axis0_bool_bool"), (PyCFunction)__pyx_pw_6pandas_5algos_261take_2d_axis0_bool_bool, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_261take_2d_axis0_bool_bool(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_values = 0; PyArrayObject *__pyx_v_indexer = 0; PyArrayObject *__pyx_v_out = 0; PyObject *__pyx_v_fill_value = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("take_2d_axis0_bool_bool (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__values,&__pyx_n_s__indexer,&__pyx_n_s__out,&__pyx_n_s__fill_value,0}; PyObject* values[4] = {0,0,0,0}; values[3] = __pyx_k_127; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__values)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__indexer)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_2d_axis0_bool_bool", 0, 3, 4, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2584; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__out)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_2d_axis0_bool_bool", 0, 3, 4, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2584; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__fill_value); if (value) { values[3] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "take_2d_axis0_bool_bool") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2584; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_values = ((PyArrayObject *)values[0]); __pyx_v_indexer = ((PyArrayObject *)values[1]); __pyx_v_out = ((PyArrayObject *)values[2]); __pyx_v_fill_value = values[3]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("take_2d_axis0_bool_bool", 0, 3, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2584; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.take_2d_axis0_bool_bool", __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_filename = __pyx_f[2]; __pyx_lineno = 2584; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_indexer), __pyx_ptype_5numpy_ndarray, 1, "indexer", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2585; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_5numpy_ndarray, 1, "out", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2586; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_260take_2d_axis0_bool_bool(__pyx_self, __pyx_v_values, __pyx_v_indexer, __pyx_v_out, __pyx_v_fill_value); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":2584 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_axis0_bool_bool(ndarray[uint8_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[uint8_t, ndim=2] out, */ static PyObject *__pyx_pf_6pandas_5algos_260take_2d_axis0_bool_bool(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_k; Py_ssize_t __pyx_v_n; Py_ssize_t __pyx_v_idx; __pyx_t_5numpy_uint8_t __pyx_v_fv; __pyx_t_5numpy_uint8_t *__pyx_v_v; __pyx_t_5numpy_uint8_t *__pyx_v_o; __Pyx_LocalBuf_ND __pyx_pybuffernd_indexer; __Pyx_Buffer __pyx_pybuffer_indexer; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_values; __Pyx_Buffer __pyx_pybuffer_values; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; __pyx_t_5numpy_uint8_t __pyx_t_2; int __pyx_t_3; int __pyx_t_4; int __pyx_t_5; int __pyx_t_6; Py_ssize_t __pyx_t_7; Py_ssize_t __pyx_t_8; Py_ssize_t __pyx_t_9; Py_ssize_t __pyx_t_10; long __pyx_t_11; Py_ssize_t __pyx_t_12; long __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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("take_2d_axis0_bool_bool", 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_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; { __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_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2584; __pyx_clineno = __LINE__; goto __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_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1]; { __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_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2584; __pyx_clineno = __LINE__; goto __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_BufFmt_StackElem __pyx_stack[1]; 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, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2584; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; __pyx_pybuffernd_out.diminfo[1].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_out.diminfo[1].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[1]; /* "pandas/src/generated.pyx":2592 * uint8_t fv * * n = len(indexer) # <<<<<<<<<<<<<< * k = values.shape[1] * */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_indexer)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2592; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/src/generated.pyx":2593 * * n = len(indexer) * k = values.shape[1] # <<<<<<<<<<<<<< * * fv = fill_value */ __pyx_v_k = (__pyx_v_values->dimensions[1]); /* "pandas/src/generated.pyx":2595 * k = values.shape[1] * * fv = fill_value # <<<<<<<<<<<<<< * * IF True: */ __pyx_t_2 = __Pyx_PyInt_from_py_npy_uint8(__pyx_v_fill_value); if (unlikely((__pyx_t_2 == (npy_uint8)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2595; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_fv = __pyx_t_2; /* "pandas/src/generated.pyx":2601 * uint8_t *v, *o * * if (values.strides[1] == out.strides[1] and # <<<<<<<<<<<<<< * values.strides[1] == sizeof(uint8_t) and * sizeof(uint8_t) * n >= 256): */ __pyx_t_3 = (((__pyx_v_values->strides[1]) == (__pyx_v_out->strides[1])) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":2602 * * if (values.strides[1] == out.strides[1] and * values.strides[1] == sizeof(uint8_t) and # <<<<<<<<<<<<<< * sizeof(uint8_t) * n >= 256): * */ __pyx_t_4 = (((__pyx_v_values->strides[1]) == (sizeof(__pyx_t_5numpy_uint8_t))) != 0); if (__pyx_t_4) { /* "pandas/src/generated.pyx":2603 * if (values.strides[1] == out.strides[1] and * values.strides[1] == sizeof(uint8_t) and * sizeof(uint8_t) * n >= 256): # <<<<<<<<<<<<<< * * for i from 0 <= i < n: */ __pyx_t_5 = ((((sizeof(__pyx_t_5numpy_uint8_t)) * __pyx_v_n) >= 256) != 0); __pyx_t_6 = __pyx_t_5; } else { __pyx_t_6 = __pyx_t_4; } __pyx_t_4 = __pyx_t_6; } else { __pyx_t_4 = __pyx_t_3; } if (__pyx_t_4) { /* "pandas/src/generated.pyx":2605 * sizeof(uint8_t) * n >= 256): * * for i from 0 <= i < n: # <<<<<<<<<<<<<< * idx = indexer[i] * if idx == -1: */ __pyx_t_1 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_1; __pyx_v_i++) { /* "pandas/src/generated.pyx":2606 * * for i from 0 <= i < n: * idx = indexer[i] # <<<<<<<<<<<<<< * if idx == -1: * for j from 0 <= j < k: */ __pyx_t_7 = __pyx_v_i; __pyx_v_idx = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_7, __pyx_pybuffernd_indexer.diminfo[0].strides)); /* "pandas/src/generated.pyx":2607 * for i from 0 <= i < n: * idx = indexer[i] * if idx == -1: # <<<<<<<<<<<<<< * for j from 0 <= j < k: * out[i, j] = fv */ __pyx_t_4 = ((__pyx_v_idx == -1) != 0); if (__pyx_t_4) { /* "pandas/src/generated.pyx":2608 * idx = indexer[i] * if idx == -1: * for j from 0 <= j < k: # <<<<<<<<<<<<<< * out[i, j] = fv * else: */ __pyx_t_8 = __pyx_v_k; for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_8; __pyx_v_j++) { /* "pandas/src/generated.pyx":2609 * if idx == -1: * for j from 0 <= j < k: * out[i, j] = fv # <<<<<<<<<<<<<< * else: * v = &values[idx, 0] */ __pyx_t_9 = __pyx_v_i; __pyx_t_10 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_9, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_10, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_fv; } goto __pyx_L6; } /*else*/ { /* "pandas/src/generated.pyx":2611 * out[i, j] = fv * else: * v = &values[idx, 0] # <<<<<<<<<<<<<< * o = &out[i, 0] * memmove(o, v, (sizeof(uint8_t) * k)) */ __pyx_t_8 = __pyx_v_idx; __pyx_t_11 = 0; __pyx_v_v = (&(*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_8, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_11, __pyx_pybuffernd_values.diminfo[1].strides))); /* "pandas/src/generated.pyx":2612 * else: * v = &values[idx, 0] * o = &out[i, 0] # <<<<<<<<<<<<<< * memmove(o, v, (sizeof(uint8_t) * k)) * return */ __pyx_t_12 = __pyx_v_i; __pyx_t_13 = 0; __pyx_v_o = (&(*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_12, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_13, __pyx_pybuffernd_out.diminfo[1].strides))); /* "pandas/src/generated.pyx":2613 * v = &values[idx, 0] * o = &out[i, 0] * memmove(o, v, (sizeof(uint8_t) * k)) # <<<<<<<<<<<<<< * return * */ memmove(__pyx_v_o, __pyx_v_v, ((size_t)((sizeof(__pyx_t_5numpy_uint8_t)) * __pyx_v_k))); } __pyx_L6:; } /* "pandas/src/generated.pyx":2614 * o = &out[i, 0] * memmove(o, v, (sizeof(uint8_t) * k)) * return # <<<<<<<<<<<<<< * * for i from 0 <= i < n: */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; goto __pyx_L3; } __pyx_L3:; /* "pandas/src/generated.pyx":2616 * return * * for i from 0 <= i < n: # <<<<<<<<<<<<<< * idx = indexer[i] * if idx == -1: */ __pyx_t_1 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_1; __pyx_v_i++) { /* "pandas/src/generated.pyx":2617 * * for i from 0 <= i < n: * idx = indexer[i] # <<<<<<<<<<<<<< * if idx == -1: * for j from 0 <= j < k: */ __pyx_t_14 = __pyx_v_i; __pyx_v_idx = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_indexer.diminfo[0].strides)); /* "pandas/src/generated.pyx":2618 * for i from 0 <= i < n: * idx = indexer[i] * if idx == -1: # <<<<<<<<<<<<<< * for j from 0 <= j < k: * out[i, j] = fv */ __pyx_t_4 = ((__pyx_v_idx == -1) != 0); if (__pyx_t_4) { /* "pandas/src/generated.pyx":2619 * idx = indexer[i] * if idx == -1: * for j from 0 <= j < k: # <<<<<<<<<<<<<< * out[i, j] = fv * else: */ __pyx_t_15 = __pyx_v_k; for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_15; __pyx_v_j++) { /* "pandas/src/generated.pyx":2620 * if idx == -1: * for j from 0 <= j < k: * out[i, j] = fv # <<<<<<<<<<<<<< * else: * for j from 0 <= j < k: */ __pyx_t_16 = __pyx_v_i; __pyx_t_17 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_17, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_fv; } goto __pyx_L11; } /*else*/ { /* "pandas/src/generated.pyx":2622 * out[i, j] = fv * else: * for j from 0 <= j < k: # <<<<<<<<<<<<<< * out[i, j] = values[idx, j] * */ __pyx_t_15 = __pyx_v_k; for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_15; __pyx_v_j++) { /* "pandas/src/generated.pyx":2623 * else: * for j from 0 <= j < k: * out[i, j] = values[idx, j] # <<<<<<<<<<<<<< * * @cython.wraparound(False) */ __pyx_t_18 = __pyx_v_idx; __pyx_t_19 = __pyx_v_j; __pyx_t_20 = __pyx_v_i; __pyx_t_21 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_21, __pyx_pybuffernd_out.diminfo[1].strides) = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_19, __pyx_pybuffernd_values.diminfo[1].strides)); } } __pyx_L11:; } __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.take_2d_axis0_bool_bool", __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_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_263take_2d_axis0_bool_object(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_263take_2d_axis0_bool_object = {__Pyx_NAMESTR("take_2d_axis0_bool_object"), (PyCFunction)__pyx_pw_6pandas_5algos_263take_2d_axis0_bool_object, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_263take_2d_axis0_bool_object(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_values = 0; PyArrayObject *__pyx_v_indexer = 0; PyArrayObject *__pyx_v_out = 0; PyObject *__pyx_v_fill_value = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("take_2d_axis0_bool_object (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__values,&__pyx_n_s__indexer,&__pyx_n_s__out,&__pyx_n_s__fill_value,0}; PyObject* values[4] = {0,0,0,0}; values[3] = __pyx_k_128; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__values)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__indexer)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_2d_axis0_bool_object", 0, 3, 4, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2627; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__out)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_2d_axis0_bool_object", 0, 3, 4, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2627; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__fill_value); if (value) { values[3] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "take_2d_axis0_bool_object") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2627; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_values = ((PyArrayObject *)values[0]); __pyx_v_indexer = ((PyArrayObject *)values[1]); __pyx_v_out = ((PyArrayObject *)values[2]); __pyx_v_fill_value = values[3]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("take_2d_axis0_bool_object", 0, 3, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2627; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.take_2d_axis0_bool_object", __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_filename = __pyx_f[2]; __pyx_lineno = 2627; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_indexer), __pyx_ptype_5numpy_ndarray, 1, "indexer", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2628; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_5numpy_ndarray, 1, "out", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2629; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_262take_2d_axis0_bool_object(__pyx_self, __pyx_v_values, __pyx_v_indexer, __pyx_v_out, __pyx_v_fill_value); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":2627 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_axis0_bool_object(ndarray[uint8_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[object, ndim=2] out, */ static PyObject *__pyx_pf_6pandas_5algos_262take_2d_axis0_bool_object(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_k; Py_ssize_t __pyx_v_n; Py_ssize_t __pyx_v_idx; PyObject *__pyx_v_fv = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_indexer; __Pyx_Buffer __pyx_pybuffer_indexer; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_values; __Pyx_Buffer __pyx_pybuffer_values; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; Py_ssize_t __pyx_t_2; int __pyx_t_3; Py_ssize_t __pyx_t_4; Py_ssize_t __pyx_t_5; Py_ssize_t __pyx_t_6; PyObject **__pyx_t_7; Py_ssize_t __pyx_t_8; Py_ssize_t __pyx_t_9; PyObject *__pyx_t_10 = NULL; Py_ssize_t __pyx_t_11; Py_ssize_t __pyx_t_12; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("take_2d_axis0_bool_object", 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_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; { __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_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2627; __pyx_clineno = __LINE__; goto __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_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1]; { __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_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2627; __pyx_clineno = __LINE__; goto __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_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_v_out, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2627; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; __pyx_pybuffernd_out.diminfo[1].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_out.diminfo[1].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[1]; /* "pandas/src/generated.pyx":2635 * object fv * * n = len(indexer) # <<<<<<<<<<<<<< * k = values.shape[1] * */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_indexer)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2635; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/src/generated.pyx":2636 * * n = len(indexer) * k = values.shape[1] # <<<<<<<<<<<<<< * * fv = fill_value */ __pyx_v_k = (__pyx_v_values->dimensions[1]); /* "pandas/src/generated.pyx":2638 * k = values.shape[1] * * fv = fill_value # <<<<<<<<<<<<<< * * IF False: */ __Pyx_INCREF(__pyx_v_fill_value); __pyx_v_fv = __pyx_v_fill_value; /* "pandas/src/generated.pyx":2659 * return * * for i from 0 <= i < n: # <<<<<<<<<<<<<< * idx = indexer[i] * if idx == -1: */ __pyx_t_1 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_1; __pyx_v_i++) { /* "pandas/src/generated.pyx":2660 * * for i from 0 <= i < n: * idx = indexer[i] # <<<<<<<<<<<<<< * if idx == -1: * for j from 0 <= j < k: */ __pyx_t_2 = __pyx_v_i; __pyx_v_idx = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_2, __pyx_pybuffernd_indexer.diminfo[0].strides)); /* "pandas/src/generated.pyx":2661 * for i from 0 <= i < n: * idx = indexer[i] * if idx == -1: # <<<<<<<<<<<<<< * for j from 0 <= j < k: * out[i, j] = fv */ __pyx_t_3 = ((__pyx_v_idx == -1) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":2662 * idx = indexer[i] * if idx == -1: * for j from 0 <= j < k: # <<<<<<<<<<<<<< * out[i, j] = fv * else: */ __pyx_t_4 = __pyx_v_k; for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_4; __pyx_v_j++) { /* "pandas/src/generated.pyx":2663 * if idx == -1: * for j from 0 <= j < k: * out[i, j] = fv # <<<<<<<<<<<<<< * else: * for j from 0 <= j < k: */ __pyx_t_5 = __pyx_v_i; __pyx_t_6 = __pyx_v_j; __pyx_t_7 = __Pyx_BufPtrStrided2d(PyObject **, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_5, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_6, __pyx_pybuffernd_out.diminfo[1].strides); __Pyx_GOTREF(*__pyx_t_7); __Pyx_INCREF(__pyx_v_fv); __Pyx_DECREF(*__pyx_t_7); *__pyx_t_7 = __pyx_v_fv; __Pyx_GIVEREF(*__pyx_t_7); } goto __pyx_L5; } /*else*/ { /* "pandas/src/generated.pyx":2665 * out[i, j] = fv * else: * for j from 0 <= j < k: # <<<<<<<<<<<<<< * out[i, j] = True if values[idx, j] > 0 else False * */ __pyx_t_4 = __pyx_v_k; for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_4; __pyx_v_j++) { /* "pandas/src/generated.pyx":2666 * else: * for j from 0 <= j < k: * out[i, j] = True if values[idx, j] > 0 else False # <<<<<<<<<<<<<< * * @cython.wraparound(False) */ __pyx_t_8 = __pyx_v_idx; __pyx_t_9 = __pyx_v_j; if ((((*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_8, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_9, __pyx_pybuffernd_values.diminfo[1].strides)) > 0) != 0)) { __pyx_t_3 = 1; } else { __pyx_t_3 = 0; } __pyx_t_10 = __Pyx_PyBool_FromLong(__pyx_t_3); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2666; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __pyx_t_11 = __pyx_v_i; __pyx_t_12 = __pyx_v_j; __pyx_t_7 = __Pyx_BufPtrStrided2d(PyObject **, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_11, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_12, __pyx_pybuffernd_out.diminfo[1].strides); __Pyx_GOTREF(*__pyx_t_7); __Pyx_INCREF(__pyx_t_10); __Pyx_DECREF(*__pyx_t_7); *__pyx_t_7 = __pyx_t_10; __Pyx_GIVEREF(*__pyx_t_7); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; } } __pyx_L5:; } __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_10); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.take_2d_axis0_bool_object", __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_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF(__pyx_v_fv); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_265take_2d_axis0_int8_int8(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_265take_2d_axis0_int8_int8 = {__Pyx_NAMESTR("take_2d_axis0_int8_int8"), (PyCFunction)__pyx_pw_6pandas_5algos_265take_2d_axis0_int8_int8, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_265take_2d_axis0_int8_int8(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_values = 0; PyArrayObject *__pyx_v_indexer = 0; PyArrayObject *__pyx_v_out = 0; PyObject *__pyx_v_fill_value = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("take_2d_axis0_int8_int8 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__values,&__pyx_n_s__indexer,&__pyx_n_s__out,&__pyx_n_s__fill_value,0}; PyObject* values[4] = {0,0,0,0}; values[3] = __pyx_k_129; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__values)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__indexer)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_2d_axis0_int8_int8", 0, 3, 4, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2670; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__out)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_2d_axis0_int8_int8", 0, 3, 4, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2670; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__fill_value); if (value) { values[3] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "take_2d_axis0_int8_int8") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2670; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_values = ((PyArrayObject *)values[0]); __pyx_v_indexer = ((PyArrayObject *)values[1]); __pyx_v_out = ((PyArrayObject *)values[2]); __pyx_v_fill_value = values[3]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("take_2d_axis0_int8_int8", 0, 3, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2670; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.take_2d_axis0_int8_int8", __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_filename = __pyx_f[2]; __pyx_lineno = 2670; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_indexer), __pyx_ptype_5numpy_ndarray, 1, "indexer", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2671; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_5numpy_ndarray, 1, "out", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2672; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_264take_2d_axis0_int8_int8(__pyx_self, __pyx_v_values, __pyx_v_indexer, __pyx_v_out, __pyx_v_fill_value); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":2670 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_axis0_int8_int8(ndarray[int8_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[int8_t, ndim=2] out, */ static PyObject *__pyx_pf_6pandas_5algos_264take_2d_axis0_int8_int8(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_k; Py_ssize_t __pyx_v_n; Py_ssize_t __pyx_v_idx; __pyx_t_5numpy_int8_t __pyx_v_fv; __pyx_t_5numpy_int8_t *__pyx_v_v; __pyx_t_5numpy_int8_t *__pyx_v_o; __Pyx_LocalBuf_ND __pyx_pybuffernd_indexer; __Pyx_Buffer __pyx_pybuffer_indexer; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_values; __Pyx_Buffer __pyx_pybuffer_values; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; __pyx_t_5numpy_int8_t __pyx_t_2; int __pyx_t_3; int __pyx_t_4; int __pyx_t_5; int __pyx_t_6; Py_ssize_t __pyx_t_7; Py_ssize_t __pyx_t_8; Py_ssize_t __pyx_t_9; Py_ssize_t __pyx_t_10; long __pyx_t_11; Py_ssize_t __pyx_t_12; long __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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("take_2d_axis0_int8_int8", 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_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; { __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_int8_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2670; __pyx_clineno = __LINE__; goto __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_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1]; { __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_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2670; __pyx_clineno = __LINE__; goto __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_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_v_out, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int8_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2670; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; __pyx_pybuffernd_out.diminfo[1].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_out.diminfo[1].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[1]; /* "pandas/src/generated.pyx":2678 * int8_t fv * * n = len(indexer) # <<<<<<<<<<<<<< * k = values.shape[1] * */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_indexer)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2678; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/src/generated.pyx":2679 * * n = len(indexer) * k = values.shape[1] # <<<<<<<<<<<<<< * * fv = fill_value */ __pyx_v_k = (__pyx_v_values->dimensions[1]); /* "pandas/src/generated.pyx":2681 * k = values.shape[1] * * fv = fill_value # <<<<<<<<<<<<<< * * IF True: */ __pyx_t_2 = __Pyx_PyInt_from_py_npy_int8(__pyx_v_fill_value); if (unlikely((__pyx_t_2 == (npy_int8)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2681; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_fv = __pyx_t_2; /* "pandas/src/generated.pyx":2687 * int8_t *v, *o * * if (values.strides[1] == out.strides[1] and # <<<<<<<<<<<<<< * values.strides[1] == sizeof(int8_t) and * sizeof(int8_t) * n >= 256): */ __pyx_t_3 = (((__pyx_v_values->strides[1]) == (__pyx_v_out->strides[1])) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":2688 * * if (values.strides[1] == out.strides[1] and * values.strides[1] == sizeof(int8_t) and # <<<<<<<<<<<<<< * sizeof(int8_t) * n >= 256): * */ __pyx_t_4 = (((__pyx_v_values->strides[1]) == (sizeof(__pyx_t_5numpy_int8_t))) != 0); if (__pyx_t_4) { /* "pandas/src/generated.pyx":2689 * if (values.strides[1] == out.strides[1] and * values.strides[1] == sizeof(int8_t) and * sizeof(int8_t) * n >= 256): # <<<<<<<<<<<<<< * * for i from 0 <= i < n: */ __pyx_t_5 = ((((sizeof(__pyx_t_5numpy_int8_t)) * __pyx_v_n) >= 256) != 0); __pyx_t_6 = __pyx_t_5; } else { __pyx_t_6 = __pyx_t_4; } __pyx_t_4 = __pyx_t_6; } else { __pyx_t_4 = __pyx_t_3; } if (__pyx_t_4) { /* "pandas/src/generated.pyx":2691 * sizeof(int8_t) * n >= 256): * * for i from 0 <= i < n: # <<<<<<<<<<<<<< * idx = indexer[i] * if idx == -1: */ __pyx_t_1 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_1; __pyx_v_i++) { /* "pandas/src/generated.pyx":2692 * * for i from 0 <= i < n: * idx = indexer[i] # <<<<<<<<<<<<<< * if idx == -1: * for j from 0 <= j < k: */ __pyx_t_7 = __pyx_v_i; __pyx_v_idx = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_7, __pyx_pybuffernd_indexer.diminfo[0].strides)); /* "pandas/src/generated.pyx":2693 * for i from 0 <= i < n: * idx = indexer[i] * if idx == -1: # <<<<<<<<<<<<<< * for j from 0 <= j < k: * out[i, j] = fv */ __pyx_t_4 = ((__pyx_v_idx == -1) != 0); if (__pyx_t_4) { /* "pandas/src/generated.pyx":2694 * idx = indexer[i] * if idx == -1: * for j from 0 <= j < k: # <<<<<<<<<<<<<< * out[i, j] = fv * else: */ __pyx_t_8 = __pyx_v_k; for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_8; __pyx_v_j++) { /* "pandas/src/generated.pyx":2695 * if idx == -1: * for j from 0 <= j < k: * out[i, j] = fv # <<<<<<<<<<<<<< * else: * v = &values[idx, 0] */ __pyx_t_9 = __pyx_v_i; __pyx_t_10 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int8_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_9, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_10, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_fv; } goto __pyx_L6; } /*else*/ { /* "pandas/src/generated.pyx":2697 * out[i, j] = fv * else: * v = &values[idx, 0] # <<<<<<<<<<<<<< * o = &out[i, 0] * memmove(o, v, (sizeof(int8_t) * k)) */ __pyx_t_8 = __pyx_v_idx; __pyx_t_11 = 0; __pyx_v_v = (&(*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int8_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_8, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_11, __pyx_pybuffernd_values.diminfo[1].strides))); /* "pandas/src/generated.pyx":2698 * else: * v = &values[idx, 0] * o = &out[i, 0] # <<<<<<<<<<<<<< * memmove(o, v, (sizeof(int8_t) * k)) * return */ __pyx_t_12 = __pyx_v_i; __pyx_t_13 = 0; __pyx_v_o = (&(*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int8_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_12, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_13, __pyx_pybuffernd_out.diminfo[1].strides))); /* "pandas/src/generated.pyx":2699 * v = &values[idx, 0] * o = &out[i, 0] * memmove(o, v, (sizeof(int8_t) * k)) # <<<<<<<<<<<<<< * return * */ memmove(__pyx_v_o, __pyx_v_v, ((size_t)((sizeof(__pyx_t_5numpy_int8_t)) * __pyx_v_k))); } __pyx_L6:; } /* "pandas/src/generated.pyx":2700 * o = &out[i, 0] * memmove(o, v, (sizeof(int8_t) * k)) * return # <<<<<<<<<<<<<< * * for i from 0 <= i < n: */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; goto __pyx_L3; } __pyx_L3:; /* "pandas/src/generated.pyx":2702 * return * * for i from 0 <= i < n: # <<<<<<<<<<<<<< * idx = indexer[i] * if idx == -1: */ __pyx_t_1 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_1; __pyx_v_i++) { /* "pandas/src/generated.pyx":2703 * * for i from 0 <= i < n: * idx = indexer[i] # <<<<<<<<<<<<<< * if idx == -1: * for j from 0 <= j < k: */ __pyx_t_14 = __pyx_v_i; __pyx_v_idx = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_indexer.diminfo[0].strides)); /* "pandas/src/generated.pyx":2704 * for i from 0 <= i < n: * idx = indexer[i] * if idx == -1: # <<<<<<<<<<<<<< * for j from 0 <= j < k: * out[i, j] = fv */ __pyx_t_4 = ((__pyx_v_idx == -1) != 0); if (__pyx_t_4) { /* "pandas/src/generated.pyx":2705 * idx = indexer[i] * if idx == -1: * for j from 0 <= j < k: # <<<<<<<<<<<<<< * out[i, j] = fv * else: */ __pyx_t_15 = __pyx_v_k; for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_15; __pyx_v_j++) { /* "pandas/src/generated.pyx":2706 * if idx == -1: * for j from 0 <= j < k: * out[i, j] = fv # <<<<<<<<<<<<<< * else: * for j from 0 <= j < k: */ __pyx_t_16 = __pyx_v_i; __pyx_t_17 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int8_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_17, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_fv; } goto __pyx_L11; } /*else*/ { /* "pandas/src/generated.pyx":2708 * out[i, j] = fv * else: * for j from 0 <= j < k: # <<<<<<<<<<<<<< * out[i, j] = values[idx, j] * */ __pyx_t_15 = __pyx_v_k; for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_15; __pyx_v_j++) { /* "pandas/src/generated.pyx":2709 * else: * for j from 0 <= j < k: * out[i, j] = values[idx, j] # <<<<<<<<<<<<<< * * @cython.wraparound(False) */ __pyx_t_18 = __pyx_v_idx; __pyx_t_19 = __pyx_v_j; __pyx_t_20 = __pyx_v_i; __pyx_t_21 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int8_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_21, __pyx_pybuffernd_out.diminfo[1].strides) = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int8_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_19, __pyx_pybuffernd_values.diminfo[1].strides)); } } __pyx_L11:; } __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.take_2d_axis0_int8_int8", __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_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_267take_2d_axis0_int8_int32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_267take_2d_axis0_int8_int32 = {__Pyx_NAMESTR("take_2d_axis0_int8_int32"), (PyCFunction)__pyx_pw_6pandas_5algos_267take_2d_axis0_int8_int32, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_267take_2d_axis0_int8_int32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_values = 0; PyArrayObject *__pyx_v_indexer = 0; PyArrayObject *__pyx_v_out = 0; PyObject *__pyx_v_fill_value = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("take_2d_axis0_int8_int32 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__values,&__pyx_n_s__indexer,&__pyx_n_s__out,&__pyx_n_s__fill_value,0}; PyObject* values[4] = {0,0,0,0}; values[3] = __pyx_k_130; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__values)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__indexer)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_2d_axis0_int8_int32", 0, 3, 4, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2713; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__out)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_2d_axis0_int8_int32", 0, 3, 4, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2713; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__fill_value); if (value) { values[3] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "take_2d_axis0_int8_int32") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2713; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_values = ((PyArrayObject *)values[0]); __pyx_v_indexer = ((PyArrayObject *)values[1]); __pyx_v_out = ((PyArrayObject *)values[2]); __pyx_v_fill_value = values[3]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("take_2d_axis0_int8_int32", 0, 3, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2713; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.take_2d_axis0_int8_int32", __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_filename = __pyx_f[2]; __pyx_lineno = 2713; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_indexer), __pyx_ptype_5numpy_ndarray, 1, "indexer", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2714; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_5numpy_ndarray, 1, "out", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2715; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_266take_2d_axis0_int8_int32(__pyx_self, __pyx_v_values, __pyx_v_indexer, __pyx_v_out, __pyx_v_fill_value); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":2713 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_axis0_int8_int32(ndarray[int8_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[int32_t, ndim=2] out, */ static PyObject *__pyx_pf_6pandas_5algos_266take_2d_axis0_int8_int32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_k; Py_ssize_t __pyx_v_n; Py_ssize_t __pyx_v_idx; __pyx_t_5numpy_int32_t __pyx_v_fv; __Pyx_LocalBuf_ND __pyx_pybuffernd_indexer; __Pyx_Buffer __pyx_pybuffer_indexer; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_values; __Pyx_Buffer __pyx_pybuffer_values; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; __pyx_t_5numpy_int32_t __pyx_t_2; Py_ssize_t __pyx_t_3; int __pyx_t_4; Py_ssize_t __pyx_t_5; Py_ssize_t __pyx_t_6; Py_ssize_t __pyx_t_7; Py_ssize_t __pyx_t_8; Py_ssize_t __pyx_t_9; Py_ssize_t __pyx_t_10; Py_ssize_t __pyx_t_11; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("take_2d_axis0_int8_int32", 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_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; { __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_int8_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2713; __pyx_clineno = __LINE__; goto __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_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1]; { __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_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2713; __pyx_clineno = __LINE__; goto __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_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_v_out, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2713; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; __pyx_pybuffernd_out.diminfo[1].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_out.diminfo[1].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[1]; /* "pandas/src/generated.pyx":2721 * int32_t fv * * n = len(indexer) # <<<<<<<<<<<<<< * k = values.shape[1] * */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_indexer)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2721; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/src/generated.pyx":2722 * * n = len(indexer) * k = values.shape[1] # <<<<<<<<<<<<<< * * fv = fill_value */ __pyx_v_k = (__pyx_v_values->dimensions[1]); /* "pandas/src/generated.pyx":2724 * k = values.shape[1] * * fv = fill_value # <<<<<<<<<<<<<< * * IF False: */ __pyx_t_2 = __Pyx_PyInt_from_py_npy_int32(__pyx_v_fill_value); if (unlikely((__pyx_t_2 == (npy_int32)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2724; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_fv = __pyx_t_2; /* "pandas/src/generated.pyx":2745 * return * * for i from 0 <= i < n: # <<<<<<<<<<<<<< * idx = indexer[i] * if idx == -1: */ __pyx_t_1 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_1; __pyx_v_i++) { /* "pandas/src/generated.pyx":2746 * * for i from 0 <= i < n: * idx = indexer[i] # <<<<<<<<<<<<<< * if idx == -1: * for j from 0 <= j < k: */ __pyx_t_3 = __pyx_v_i; __pyx_v_idx = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_3, __pyx_pybuffernd_indexer.diminfo[0].strides)); /* "pandas/src/generated.pyx":2747 * for i from 0 <= i < n: * idx = indexer[i] * if idx == -1: # <<<<<<<<<<<<<< * for j from 0 <= j < k: * out[i, j] = fv */ __pyx_t_4 = ((__pyx_v_idx == -1) != 0); if (__pyx_t_4) { /* "pandas/src/generated.pyx":2748 * idx = indexer[i] * if idx == -1: * for j from 0 <= j < k: # <<<<<<<<<<<<<< * out[i, j] = fv * else: */ __pyx_t_5 = __pyx_v_k; for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_5; __pyx_v_j++) { /* "pandas/src/generated.pyx":2749 * if idx == -1: * for j from 0 <= j < k: * out[i, j] = fv # <<<<<<<<<<<<<< * else: * for j from 0 <= j < k: */ __pyx_t_6 = __pyx_v_i; __pyx_t_7 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_6, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_7, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_fv; } goto __pyx_L5; } /*else*/ { /* "pandas/src/generated.pyx":2751 * out[i, j] = fv * else: * for j from 0 <= j < k: # <<<<<<<<<<<<<< * out[i, j] = values[idx, j] * */ __pyx_t_5 = __pyx_v_k; for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_5; __pyx_v_j++) { /* "pandas/src/generated.pyx":2752 * else: * for j from 0 <= j < k: * out[i, j] = values[idx, j] # <<<<<<<<<<<<<< * * @cython.wraparound(False) */ __pyx_t_8 = __pyx_v_idx; __pyx_t_9 = __pyx_v_j; __pyx_t_10 = __pyx_v_i; __pyx_t_11 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_10, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_11, __pyx_pybuffernd_out.diminfo[1].strides) = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int8_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_8, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_9, __pyx_pybuffernd_values.diminfo[1].strides)); } } __pyx_L5:; } __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.take_2d_axis0_int8_int32", __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_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_269take_2d_axis0_int8_int64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_269take_2d_axis0_int8_int64 = {__Pyx_NAMESTR("take_2d_axis0_int8_int64"), (PyCFunction)__pyx_pw_6pandas_5algos_269take_2d_axis0_int8_int64, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_269take_2d_axis0_int8_int64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_values = 0; PyArrayObject *__pyx_v_indexer = 0; PyArrayObject *__pyx_v_out = 0; PyObject *__pyx_v_fill_value = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("take_2d_axis0_int8_int64 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__values,&__pyx_n_s__indexer,&__pyx_n_s__out,&__pyx_n_s__fill_value,0}; PyObject* values[4] = {0,0,0,0}; values[3] = __pyx_k_131; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__values)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__indexer)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_2d_axis0_int8_int64", 0, 3, 4, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2756; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__out)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_2d_axis0_int8_int64", 0, 3, 4, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2756; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__fill_value); if (value) { values[3] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "take_2d_axis0_int8_int64") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2756; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_values = ((PyArrayObject *)values[0]); __pyx_v_indexer = ((PyArrayObject *)values[1]); __pyx_v_out = ((PyArrayObject *)values[2]); __pyx_v_fill_value = values[3]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("take_2d_axis0_int8_int64", 0, 3, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2756; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.take_2d_axis0_int8_int64", __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_filename = __pyx_f[2]; __pyx_lineno = 2756; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_indexer), __pyx_ptype_5numpy_ndarray, 1, "indexer", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2757; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_5numpy_ndarray, 1, "out", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2758; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_268take_2d_axis0_int8_int64(__pyx_self, __pyx_v_values, __pyx_v_indexer, __pyx_v_out, __pyx_v_fill_value); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":2756 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_axis0_int8_int64(ndarray[int8_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[int64_t, ndim=2] out, */ static PyObject *__pyx_pf_6pandas_5algos_268take_2d_axis0_int8_int64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_k; Py_ssize_t __pyx_v_n; Py_ssize_t __pyx_v_idx; __pyx_t_5numpy_int64_t __pyx_v_fv; __Pyx_LocalBuf_ND __pyx_pybuffernd_indexer; __Pyx_Buffer __pyx_pybuffer_indexer; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_values; __Pyx_Buffer __pyx_pybuffer_values; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; __pyx_t_5numpy_int64_t __pyx_t_2; Py_ssize_t __pyx_t_3; int __pyx_t_4; Py_ssize_t __pyx_t_5; Py_ssize_t __pyx_t_6; Py_ssize_t __pyx_t_7; Py_ssize_t __pyx_t_8; Py_ssize_t __pyx_t_9; Py_ssize_t __pyx_t_10; Py_ssize_t __pyx_t_11; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("take_2d_axis0_int8_int64", 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_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; { __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_int8_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2756; __pyx_clineno = __LINE__; goto __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_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1]; { __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_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2756; __pyx_clineno = __LINE__; goto __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_BufFmt_StackElem __pyx_stack[1]; 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, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2756; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; __pyx_pybuffernd_out.diminfo[1].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_out.diminfo[1].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[1]; /* "pandas/src/generated.pyx":2764 * int64_t fv * * n = len(indexer) # <<<<<<<<<<<<<< * k = values.shape[1] * */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_indexer)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2764; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/src/generated.pyx":2765 * * n = len(indexer) * k = values.shape[1] # <<<<<<<<<<<<<< * * fv = fill_value */ __pyx_v_k = (__pyx_v_values->dimensions[1]); /* "pandas/src/generated.pyx":2767 * k = values.shape[1] * * fv = fill_value # <<<<<<<<<<<<<< * * IF False: */ __pyx_t_2 = __Pyx_PyInt_from_py_npy_int64(__pyx_v_fill_value); if (unlikely((__pyx_t_2 == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2767; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_fv = __pyx_t_2; /* "pandas/src/generated.pyx":2788 * return * * for i from 0 <= i < n: # <<<<<<<<<<<<<< * idx = indexer[i] * if idx == -1: */ __pyx_t_1 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_1; __pyx_v_i++) { /* "pandas/src/generated.pyx":2789 * * for i from 0 <= i < n: * idx = indexer[i] # <<<<<<<<<<<<<< * if idx == -1: * for j from 0 <= j < k: */ __pyx_t_3 = __pyx_v_i; __pyx_v_idx = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_3, __pyx_pybuffernd_indexer.diminfo[0].strides)); /* "pandas/src/generated.pyx":2790 * for i from 0 <= i < n: * idx = indexer[i] * if idx == -1: # <<<<<<<<<<<<<< * for j from 0 <= j < k: * out[i, j] = fv */ __pyx_t_4 = ((__pyx_v_idx == -1) != 0); if (__pyx_t_4) { /* "pandas/src/generated.pyx":2791 * idx = indexer[i] * if idx == -1: * for j from 0 <= j < k: # <<<<<<<<<<<<<< * out[i, j] = fv * else: */ __pyx_t_5 = __pyx_v_k; for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_5; __pyx_v_j++) { /* "pandas/src/generated.pyx":2792 * if idx == -1: * for j from 0 <= j < k: * out[i, j] = fv # <<<<<<<<<<<<<< * else: * for j from 0 <= j < k: */ __pyx_t_6 = __pyx_v_i; __pyx_t_7 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_6, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_7, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_fv; } goto __pyx_L5; } /*else*/ { /* "pandas/src/generated.pyx":2794 * out[i, j] = fv * else: * for j from 0 <= j < k: # <<<<<<<<<<<<<< * out[i, j] = values[idx, j] * */ __pyx_t_5 = __pyx_v_k; for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_5; __pyx_v_j++) { /* "pandas/src/generated.pyx":2795 * else: * for j from 0 <= j < k: * out[i, j] = values[idx, j] # <<<<<<<<<<<<<< * * @cython.wraparound(False) */ __pyx_t_8 = __pyx_v_idx; __pyx_t_9 = __pyx_v_j; __pyx_t_10 = __pyx_v_i; __pyx_t_11 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_10, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_11, __pyx_pybuffernd_out.diminfo[1].strides) = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int8_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_8, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_9, __pyx_pybuffernd_values.diminfo[1].strides)); } } __pyx_L5:; } __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.take_2d_axis0_int8_int64", __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_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_271take_2d_axis0_int8_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_271take_2d_axis0_int8_float64 = {__Pyx_NAMESTR("take_2d_axis0_int8_float64"), (PyCFunction)__pyx_pw_6pandas_5algos_271take_2d_axis0_int8_float64, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_271take_2d_axis0_int8_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_values = 0; PyArrayObject *__pyx_v_indexer = 0; PyArrayObject *__pyx_v_out = 0; PyObject *__pyx_v_fill_value = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("take_2d_axis0_int8_float64 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__values,&__pyx_n_s__indexer,&__pyx_n_s__out,&__pyx_n_s__fill_value,0}; PyObject* values[4] = {0,0,0,0}; values[3] = __pyx_k_132; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__values)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__indexer)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_2d_axis0_int8_float64", 0, 3, 4, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2799; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__out)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_2d_axis0_int8_float64", 0, 3, 4, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2799; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__fill_value); if (value) { values[3] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "take_2d_axis0_int8_float64") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2799; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_values = ((PyArrayObject *)values[0]); __pyx_v_indexer = ((PyArrayObject *)values[1]); __pyx_v_out = ((PyArrayObject *)values[2]); __pyx_v_fill_value = values[3]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("take_2d_axis0_int8_float64", 0, 3, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2799; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.take_2d_axis0_int8_float64", __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_filename = __pyx_f[2]; __pyx_lineno = 2799; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_indexer), __pyx_ptype_5numpy_ndarray, 1, "indexer", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2800; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_5numpy_ndarray, 1, "out", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2801; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_270take_2d_axis0_int8_float64(__pyx_self, __pyx_v_values, __pyx_v_indexer, __pyx_v_out, __pyx_v_fill_value); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":2799 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_axis0_int8_float64(ndarray[int8_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[float64_t, ndim=2] out, */ static PyObject *__pyx_pf_6pandas_5algos_270take_2d_axis0_int8_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_k; Py_ssize_t __pyx_v_n; Py_ssize_t __pyx_v_idx; __pyx_t_5numpy_float64_t __pyx_v_fv; __Pyx_LocalBuf_ND __pyx_pybuffernd_indexer; __Pyx_Buffer __pyx_pybuffer_indexer; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_values; __Pyx_Buffer __pyx_pybuffer_values; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; __pyx_t_5numpy_float64_t __pyx_t_2; Py_ssize_t __pyx_t_3; int __pyx_t_4; Py_ssize_t __pyx_t_5; Py_ssize_t __pyx_t_6; Py_ssize_t __pyx_t_7; Py_ssize_t __pyx_t_8; Py_ssize_t __pyx_t_9; Py_ssize_t __pyx_t_10; Py_ssize_t __pyx_t_11; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("take_2d_axis0_int8_float64", 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_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; { __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_int8_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2799; __pyx_clineno = __LINE__; goto __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_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1]; { __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_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2799; __pyx_clineno = __LINE__; goto __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_BufFmt_StackElem __pyx_stack[1]; 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, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2799; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; __pyx_pybuffernd_out.diminfo[1].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_out.diminfo[1].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[1]; /* "pandas/src/generated.pyx":2807 * float64_t fv * * n = len(indexer) # <<<<<<<<<<<<<< * k = values.shape[1] * */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_indexer)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2807; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/src/generated.pyx":2808 * * n = len(indexer) * k = values.shape[1] # <<<<<<<<<<<<<< * * fv = fill_value */ __pyx_v_k = (__pyx_v_values->dimensions[1]); /* "pandas/src/generated.pyx":2810 * k = values.shape[1] * * fv = fill_value # <<<<<<<<<<<<<< * * IF False: */ __pyx_t_2 = __pyx_PyFloat_AsDouble(__pyx_v_fill_value); if (unlikely((__pyx_t_2 == (npy_float64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2810; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_fv = __pyx_t_2; /* "pandas/src/generated.pyx":2831 * return * * for i from 0 <= i < n: # <<<<<<<<<<<<<< * idx = indexer[i] * if idx == -1: */ __pyx_t_1 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_1; __pyx_v_i++) { /* "pandas/src/generated.pyx":2832 * * for i from 0 <= i < n: * idx = indexer[i] # <<<<<<<<<<<<<< * if idx == -1: * for j from 0 <= j < k: */ __pyx_t_3 = __pyx_v_i; __pyx_v_idx = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_3, __pyx_pybuffernd_indexer.diminfo[0].strides)); /* "pandas/src/generated.pyx":2833 * for i from 0 <= i < n: * idx = indexer[i] * if idx == -1: # <<<<<<<<<<<<<< * for j from 0 <= j < k: * out[i, j] = fv */ __pyx_t_4 = ((__pyx_v_idx == -1) != 0); if (__pyx_t_4) { /* "pandas/src/generated.pyx":2834 * idx = indexer[i] * if idx == -1: * for j from 0 <= j < k: # <<<<<<<<<<<<<< * out[i, j] = fv * else: */ __pyx_t_5 = __pyx_v_k; for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_5; __pyx_v_j++) { /* "pandas/src/generated.pyx":2835 * if idx == -1: * for j from 0 <= j < k: * out[i, j] = fv # <<<<<<<<<<<<<< * else: * for j from 0 <= j < k: */ __pyx_t_6 = __pyx_v_i; __pyx_t_7 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_6, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_7, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_fv; } goto __pyx_L5; } /*else*/ { /* "pandas/src/generated.pyx":2837 * out[i, j] = fv * else: * for j from 0 <= j < k: # <<<<<<<<<<<<<< * out[i, j] = values[idx, j] * */ __pyx_t_5 = __pyx_v_k; for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_5; __pyx_v_j++) { /* "pandas/src/generated.pyx":2838 * else: * for j from 0 <= j < k: * out[i, j] = values[idx, j] # <<<<<<<<<<<<<< * * @cython.wraparound(False) */ __pyx_t_8 = __pyx_v_idx; __pyx_t_9 = __pyx_v_j; __pyx_t_10 = __pyx_v_i; __pyx_t_11 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_10, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_11, __pyx_pybuffernd_out.diminfo[1].strides) = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int8_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_8, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_9, __pyx_pybuffernd_values.diminfo[1].strides)); } } __pyx_L5:; } __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.take_2d_axis0_int8_float64", __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_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_273take_2d_axis0_int16_int16(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_273take_2d_axis0_int16_int16 = {__Pyx_NAMESTR("take_2d_axis0_int16_int16"), (PyCFunction)__pyx_pw_6pandas_5algos_273take_2d_axis0_int16_int16, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_273take_2d_axis0_int16_int16(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_values = 0; PyArrayObject *__pyx_v_indexer = 0; PyArrayObject *__pyx_v_out = 0; PyObject *__pyx_v_fill_value = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("take_2d_axis0_int16_int16 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__values,&__pyx_n_s__indexer,&__pyx_n_s__out,&__pyx_n_s__fill_value,0}; PyObject* values[4] = {0,0,0,0}; values[3] = __pyx_k_133; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__values)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__indexer)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_2d_axis0_int16_int16", 0, 3, 4, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2842; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__out)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_2d_axis0_int16_int16", 0, 3, 4, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2842; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__fill_value); if (value) { values[3] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "take_2d_axis0_int16_int16") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2842; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_values = ((PyArrayObject *)values[0]); __pyx_v_indexer = ((PyArrayObject *)values[1]); __pyx_v_out = ((PyArrayObject *)values[2]); __pyx_v_fill_value = values[3]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("take_2d_axis0_int16_int16", 0, 3, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2842; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.take_2d_axis0_int16_int16", __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_filename = __pyx_f[2]; __pyx_lineno = 2842; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_indexer), __pyx_ptype_5numpy_ndarray, 1, "indexer", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2843; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_5numpy_ndarray, 1, "out", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2844; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_272take_2d_axis0_int16_int16(__pyx_self, __pyx_v_values, __pyx_v_indexer, __pyx_v_out, __pyx_v_fill_value); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":2842 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_axis0_int16_int16(ndarray[int16_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[int16_t, ndim=2] out, */ static PyObject *__pyx_pf_6pandas_5algos_272take_2d_axis0_int16_int16(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_k; Py_ssize_t __pyx_v_n; Py_ssize_t __pyx_v_idx; __pyx_t_5numpy_int16_t __pyx_v_fv; __pyx_t_5numpy_int16_t *__pyx_v_v; __pyx_t_5numpy_int16_t *__pyx_v_o; __Pyx_LocalBuf_ND __pyx_pybuffernd_indexer; __Pyx_Buffer __pyx_pybuffer_indexer; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_values; __Pyx_Buffer __pyx_pybuffer_values; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; __pyx_t_5numpy_int16_t __pyx_t_2; int __pyx_t_3; int __pyx_t_4; int __pyx_t_5; int __pyx_t_6; Py_ssize_t __pyx_t_7; Py_ssize_t __pyx_t_8; Py_ssize_t __pyx_t_9; Py_ssize_t __pyx_t_10; long __pyx_t_11; Py_ssize_t __pyx_t_12; long __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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("take_2d_axis0_int16_int16", 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_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; { __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_int16_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2842; __pyx_clineno = __LINE__; goto __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_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1]; { __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_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2842; __pyx_clineno = __LINE__; goto __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_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_v_out, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int16_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2842; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; __pyx_pybuffernd_out.diminfo[1].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_out.diminfo[1].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[1]; /* "pandas/src/generated.pyx":2850 * int16_t fv * * n = len(indexer) # <<<<<<<<<<<<<< * k = values.shape[1] * */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_indexer)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2850; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/src/generated.pyx":2851 * * n = len(indexer) * k = values.shape[1] # <<<<<<<<<<<<<< * * fv = fill_value */ __pyx_v_k = (__pyx_v_values->dimensions[1]); /* "pandas/src/generated.pyx":2853 * k = values.shape[1] * * fv = fill_value # <<<<<<<<<<<<<< * * IF True: */ __pyx_t_2 = __Pyx_PyInt_from_py_npy_int16(__pyx_v_fill_value); if (unlikely((__pyx_t_2 == (npy_int16)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2853; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_fv = __pyx_t_2; /* "pandas/src/generated.pyx":2859 * int16_t *v, *o * * if (values.strides[1] == out.strides[1] and # <<<<<<<<<<<<<< * values.strides[1] == sizeof(int16_t) and * sizeof(int16_t) * n >= 256): */ __pyx_t_3 = (((__pyx_v_values->strides[1]) == (__pyx_v_out->strides[1])) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":2860 * * if (values.strides[1] == out.strides[1] and * values.strides[1] == sizeof(int16_t) and # <<<<<<<<<<<<<< * sizeof(int16_t) * n >= 256): * */ __pyx_t_4 = (((__pyx_v_values->strides[1]) == (sizeof(__pyx_t_5numpy_int16_t))) != 0); if (__pyx_t_4) { /* "pandas/src/generated.pyx":2861 * if (values.strides[1] == out.strides[1] and * values.strides[1] == sizeof(int16_t) and * sizeof(int16_t) * n >= 256): # <<<<<<<<<<<<<< * * for i from 0 <= i < n: */ __pyx_t_5 = ((((sizeof(__pyx_t_5numpy_int16_t)) * __pyx_v_n) >= 256) != 0); __pyx_t_6 = __pyx_t_5; } else { __pyx_t_6 = __pyx_t_4; } __pyx_t_4 = __pyx_t_6; } else { __pyx_t_4 = __pyx_t_3; } if (__pyx_t_4) { /* "pandas/src/generated.pyx":2863 * sizeof(int16_t) * n >= 256): * * for i from 0 <= i < n: # <<<<<<<<<<<<<< * idx = indexer[i] * if idx == -1: */ __pyx_t_1 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_1; __pyx_v_i++) { /* "pandas/src/generated.pyx":2864 * * for i from 0 <= i < n: * idx = indexer[i] # <<<<<<<<<<<<<< * if idx == -1: * for j from 0 <= j < k: */ __pyx_t_7 = __pyx_v_i; __pyx_v_idx = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_7, __pyx_pybuffernd_indexer.diminfo[0].strides)); /* "pandas/src/generated.pyx":2865 * for i from 0 <= i < n: * idx = indexer[i] * if idx == -1: # <<<<<<<<<<<<<< * for j from 0 <= j < k: * out[i, j] = fv */ __pyx_t_4 = ((__pyx_v_idx == -1) != 0); if (__pyx_t_4) { /* "pandas/src/generated.pyx":2866 * idx = indexer[i] * if idx == -1: * for j from 0 <= j < k: # <<<<<<<<<<<<<< * out[i, j] = fv * else: */ __pyx_t_8 = __pyx_v_k; for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_8; __pyx_v_j++) { /* "pandas/src/generated.pyx":2867 * if idx == -1: * for j from 0 <= j < k: * out[i, j] = fv # <<<<<<<<<<<<<< * else: * v = &values[idx, 0] */ __pyx_t_9 = __pyx_v_i; __pyx_t_10 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int16_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_9, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_10, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_fv; } goto __pyx_L6; } /*else*/ { /* "pandas/src/generated.pyx":2869 * out[i, j] = fv * else: * v = &values[idx, 0] # <<<<<<<<<<<<<< * o = &out[i, 0] * memmove(o, v, (sizeof(int16_t) * k)) */ __pyx_t_8 = __pyx_v_idx; __pyx_t_11 = 0; __pyx_v_v = (&(*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int16_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_8, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_11, __pyx_pybuffernd_values.diminfo[1].strides))); /* "pandas/src/generated.pyx":2870 * else: * v = &values[idx, 0] * o = &out[i, 0] # <<<<<<<<<<<<<< * memmove(o, v, (sizeof(int16_t) * k)) * return */ __pyx_t_12 = __pyx_v_i; __pyx_t_13 = 0; __pyx_v_o = (&(*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int16_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_12, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_13, __pyx_pybuffernd_out.diminfo[1].strides))); /* "pandas/src/generated.pyx":2871 * v = &values[idx, 0] * o = &out[i, 0] * memmove(o, v, (sizeof(int16_t) * k)) # <<<<<<<<<<<<<< * return * */ memmove(__pyx_v_o, __pyx_v_v, ((size_t)((sizeof(__pyx_t_5numpy_int16_t)) * __pyx_v_k))); } __pyx_L6:; } /* "pandas/src/generated.pyx":2872 * o = &out[i, 0] * memmove(o, v, (sizeof(int16_t) * k)) * return # <<<<<<<<<<<<<< * * for i from 0 <= i < n: */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; goto __pyx_L3; } __pyx_L3:; /* "pandas/src/generated.pyx":2874 * return * * for i from 0 <= i < n: # <<<<<<<<<<<<<< * idx = indexer[i] * if idx == -1: */ __pyx_t_1 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_1; __pyx_v_i++) { /* "pandas/src/generated.pyx":2875 * * for i from 0 <= i < n: * idx = indexer[i] # <<<<<<<<<<<<<< * if idx == -1: * for j from 0 <= j < k: */ __pyx_t_14 = __pyx_v_i; __pyx_v_idx = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_indexer.diminfo[0].strides)); /* "pandas/src/generated.pyx":2876 * for i from 0 <= i < n: * idx = indexer[i] * if idx == -1: # <<<<<<<<<<<<<< * for j from 0 <= j < k: * out[i, j] = fv */ __pyx_t_4 = ((__pyx_v_idx == -1) != 0); if (__pyx_t_4) { /* "pandas/src/generated.pyx":2877 * idx = indexer[i] * if idx == -1: * for j from 0 <= j < k: # <<<<<<<<<<<<<< * out[i, j] = fv * else: */ __pyx_t_15 = __pyx_v_k; for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_15; __pyx_v_j++) { /* "pandas/src/generated.pyx":2878 * if idx == -1: * for j from 0 <= j < k: * out[i, j] = fv # <<<<<<<<<<<<<< * else: * for j from 0 <= j < k: */ __pyx_t_16 = __pyx_v_i; __pyx_t_17 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int16_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_17, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_fv; } goto __pyx_L11; } /*else*/ { /* "pandas/src/generated.pyx":2880 * out[i, j] = fv * else: * for j from 0 <= j < k: # <<<<<<<<<<<<<< * out[i, j] = values[idx, j] * */ __pyx_t_15 = __pyx_v_k; for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_15; __pyx_v_j++) { /* "pandas/src/generated.pyx":2881 * else: * for j from 0 <= j < k: * out[i, j] = values[idx, j] # <<<<<<<<<<<<<< * * @cython.wraparound(False) */ __pyx_t_18 = __pyx_v_idx; __pyx_t_19 = __pyx_v_j; __pyx_t_20 = __pyx_v_i; __pyx_t_21 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int16_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_21, __pyx_pybuffernd_out.diminfo[1].strides) = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int16_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_19, __pyx_pybuffernd_values.diminfo[1].strides)); } } __pyx_L11:; } __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.take_2d_axis0_int16_int16", __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_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_275take_2d_axis0_int16_int32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_275take_2d_axis0_int16_int32 = {__Pyx_NAMESTR("take_2d_axis0_int16_int32"), (PyCFunction)__pyx_pw_6pandas_5algos_275take_2d_axis0_int16_int32, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_275take_2d_axis0_int16_int32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_values = 0; PyArrayObject *__pyx_v_indexer = 0; PyArrayObject *__pyx_v_out = 0; PyObject *__pyx_v_fill_value = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("take_2d_axis0_int16_int32 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__values,&__pyx_n_s__indexer,&__pyx_n_s__out,&__pyx_n_s__fill_value,0}; PyObject* values[4] = {0,0,0,0}; values[3] = __pyx_k_134; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__values)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__indexer)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_2d_axis0_int16_int32", 0, 3, 4, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2885; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__out)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_2d_axis0_int16_int32", 0, 3, 4, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2885; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__fill_value); if (value) { values[3] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "take_2d_axis0_int16_int32") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2885; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_values = ((PyArrayObject *)values[0]); __pyx_v_indexer = ((PyArrayObject *)values[1]); __pyx_v_out = ((PyArrayObject *)values[2]); __pyx_v_fill_value = values[3]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("take_2d_axis0_int16_int32", 0, 3, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2885; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.take_2d_axis0_int16_int32", __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_filename = __pyx_f[2]; __pyx_lineno = 2885; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_indexer), __pyx_ptype_5numpy_ndarray, 1, "indexer", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2886; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_5numpy_ndarray, 1, "out", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2887; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_274take_2d_axis0_int16_int32(__pyx_self, __pyx_v_values, __pyx_v_indexer, __pyx_v_out, __pyx_v_fill_value); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":2885 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_axis0_int16_int32(ndarray[int16_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[int32_t, ndim=2] out, */ static PyObject *__pyx_pf_6pandas_5algos_274take_2d_axis0_int16_int32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_k; Py_ssize_t __pyx_v_n; Py_ssize_t __pyx_v_idx; __pyx_t_5numpy_int32_t __pyx_v_fv; __Pyx_LocalBuf_ND __pyx_pybuffernd_indexer; __Pyx_Buffer __pyx_pybuffer_indexer; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_values; __Pyx_Buffer __pyx_pybuffer_values; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; __pyx_t_5numpy_int32_t __pyx_t_2; Py_ssize_t __pyx_t_3; int __pyx_t_4; Py_ssize_t __pyx_t_5; Py_ssize_t __pyx_t_6; Py_ssize_t __pyx_t_7; Py_ssize_t __pyx_t_8; Py_ssize_t __pyx_t_9; Py_ssize_t __pyx_t_10; Py_ssize_t __pyx_t_11; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("take_2d_axis0_int16_int32", 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_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; { __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_int16_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2885; __pyx_clineno = __LINE__; goto __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_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1]; { __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_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2885; __pyx_clineno = __LINE__; goto __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_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_v_out, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2885; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; __pyx_pybuffernd_out.diminfo[1].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_out.diminfo[1].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[1]; /* "pandas/src/generated.pyx":2893 * int32_t fv * * n = len(indexer) # <<<<<<<<<<<<<< * k = values.shape[1] * */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_indexer)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2893; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/src/generated.pyx":2894 * * n = len(indexer) * k = values.shape[1] # <<<<<<<<<<<<<< * * fv = fill_value */ __pyx_v_k = (__pyx_v_values->dimensions[1]); /* "pandas/src/generated.pyx":2896 * k = values.shape[1] * * fv = fill_value # <<<<<<<<<<<<<< * * IF False: */ __pyx_t_2 = __Pyx_PyInt_from_py_npy_int32(__pyx_v_fill_value); if (unlikely((__pyx_t_2 == (npy_int32)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2896; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_fv = __pyx_t_2; /* "pandas/src/generated.pyx":2917 * return * * for i from 0 <= i < n: # <<<<<<<<<<<<<< * idx = indexer[i] * if idx == -1: */ __pyx_t_1 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_1; __pyx_v_i++) { /* "pandas/src/generated.pyx":2918 * * for i from 0 <= i < n: * idx = indexer[i] # <<<<<<<<<<<<<< * if idx == -1: * for j from 0 <= j < k: */ __pyx_t_3 = __pyx_v_i; __pyx_v_idx = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_3, __pyx_pybuffernd_indexer.diminfo[0].strides)); /* "pandas/src/generated.pyx":2919 * for i from 0 <= i < n: * idx = indexer[i] * if idx == -1: # <<<<<<<<<<<<<< * for j from 0 <= j < k: * out[i, j] = fv */ __pyx_t_4 = ((__pyx_v_idx == -1) != 0); if (__pyx_t_4) { /* "pandas/src/generated.pyx":2920 * idx = indexer[i] * if idx == -1: * for j from 0 <= j < k: # <<<<<<<<<<<<<< * out[i, j] = fv * else: */ __pyx_t_5 = __pyx_v_k; for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_5; __pyx_v_j++) { /* "pandas/src/generated.pyx":2921 * if idx == -1: * for j from 0 <= j < k: * out[i, j] = fv # <<<<<<<<<<<<<< * else: * for j from 0 <= j < k: */ __pyx_t_6 = __pyx_v_i; __pyx_t_7 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_6, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_7, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_fv; } goto __pyx_L5; } /*else*/ { /* "pandas/src/generated.pyx":2923 * out[i, j] = fv * else: * for j from 0 <= j < k: # <<<<<<<<<<<<<< * out[i, j] = values[idx, j] * */ __pyx_t_5 = __pyx_v_k; for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_5; __pyx_v_j++) { /* "pandas/src/generated.pyx":2924 * else: * for j from 0 <= j < k: * out[i, j] = values[idx, j] # <<<<<<<<<<<<<< * * @cython.wraparound(False) */ __pyx_t_8 = __pyx_v_idx; __pyx_t_9 = __pyx_v_j; __pyx_t_10 = __pyx_v_i; __pyx_t_11 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_10, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_11, __pyx_pybuffernd_out.diminfo[1].strides) = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int16_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_8, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_9, __pyx_pybuffernd_values.diminfo[1].strides)); } } __pyx_L5:; } __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.take_2d_axis0_int16_int32", __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_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_277take_2d_axis0_int16_int64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_277take_2d_axis0_int16_int64 = {__Pyx_NAMESTR("take_2d_axis0_int16_int64"), (PyCFunction)__pyx_pw_6pandas_5algos_277take_2d_axis0_int16_int64, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_277take_2d_axis0_int16_int64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_values = 0; PyArrayObject *__pyx_v_indexer = 0; PyArrayObject *__pyx_v_out = 0; PyObject *__pyx_v_fill_value = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("take_2d_axis0_int16_int64 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__values,&__pyx_n_s__indexer,&__pyx_n_s__out,&__pyx_n_s__fill_value,0}; PyObject* values[4] = {0,0,0,0}; values[3] = __pyx_k_135; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__values)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__indexer)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_2d_axis0_int16_int64", 0, 3, 4, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2928; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__out)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_2d_axis0_int16_int64", 0, 3, 4, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2928; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__fill_value); if (value) { values[3] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "take_2d_axis0_int16_int64") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2928; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_values = ((PyArrayObject *)values[0]); __pyx_v_indexer = ((PyArrayObject *)values[1]); __pyx_v_out = ((PyArrayObject *)values[2]); __pyx_v_fill_value = values[3]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("take_2d_axis0_int16_int64", 0, 3, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2928; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.take_2d_axis0_int16_int64", __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_filename = __pyx_f[2]; __pyx_lineno = 2928; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_indexer), __pyx_ptype_5numpy_ndarray, 1, "indexer", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2929; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_5numpy_ndarray, 1, "out", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2930; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_276take_2d_axis0_int16_int64(__pyx_self, __pyx_v_values, __pyx_v_indexer, __pyx_v_out, __pyx_v_fill_value); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":2928 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_axis0_int16_int64(ndarray[int16_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[int64_t, ndim=2] out, */ static PyObject *__pyx_pf_6pandas_5algos_276take_2d_axis0_int16_int64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_k; Py_ssize_t __pyx_v_n; Py_ssize_t __pyx_v_idx; __pyx_t_5numpy_int64_t __pyx_v_fv; __Pyx_LocalBuf_ND __pyx_pybuffernd_indexer; __Pyx_Buffer __pyx_pybuffer_indexer; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_values; __Pyx_Buffer __pyx_pybuffer_values; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; __pyx_t_5numpy_int64_t __pyx_t_2; Py_ssize_t __pyx_t_3; int __pyx_t_4; Py_ssize_t __pyx_t_5; Py_ssize_t __pyx_t_6; Py_ssize_t __pyx_t_7; Py_ssize_t __pyx_t_8; Py_ssize_t __pyx_t_9; Py_ssize_t __pyx_t_10; Py_ssize_t __pyx_t_11; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("take_2d_axis0_int16_int64", 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_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; { __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_int16_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2928; __pyx_clineno = __LINE__; goto __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_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1]; { __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_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2928; __pyx_clineno = __LINE__; goto __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_BufFmt_StackElem __pyx_stack[1]; 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, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2928; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; __pyx_pybuffernd_out.diminfo[1].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_out.diminfo[1].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[1]; /* "pandas/src/generated.pyx":2936 * int64_t fv * * n = len(indexer) # <<<<<<<<<<<<<< * k = values.shape[1] * */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_indexer)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2936; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/src/generated.pyx":2937 * * n = len(indexer) * k = values.shape[1] # <<<<<<<<<<<<<< * * fv = fill_value */ __pyx_v_k = (__pyx_v_values->dimensions[1]); /* "pandas/src/generated.pyx":2939 * k = values.shape[1] * * fv = fill_value # <<<<<<<<<<<<<< * * IF False: */ __pyx_t_2 = __Pyx_PyInt_from_py_npy_int64(__pyx_v_fill_value); if (unlikely((__pyx_t_2 == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2939; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_fv = __pyx_t_2; /* "pandas/src/generated.pyx":2960 * return * * for i from 0 <= i < n: # <<<<<<<<<<<<<< * idx = indexer[i] * if idx == -1: */ __pyx_t_1 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_1; __pyx_v_i++) { /* "pandas/src/generated.pyx":2961 * * for i from 0 <= i < n: * idx = indexer[i] # <<<<<<<<<<<<<< * if idx == -1: * for j from 0 <= j < k: */ __pyx_t_3 = __pyx_v_i; __pyx_v_idx = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_3, __pyx_pybuffernd_indexer.diminfo[0].strides)); /* "pandas/src/generated.pyx":2962 * for i from 0 <= i < n: * idx = indexer[i] * if idx == -1: # <<<<<<<<<<<<<< * for j from 0 <= j < k: * out[i, j] = fv */ __pyx_t_4 = ((__pyx_v_idx == -1) != 0); if (__pyx_t_4) { /* "pandas/src/generated.pyx":2963 * idx = indexer[i] * if idx == -1: * for j from 0 <= j < k: # <<<<<<<<<<<<<< * out[i, j] = fv * else: */ __pyx_t_5 = __pyx_v_k; for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_5; __pyx_v_j++) { /* "pandas/src/generated.pyx":2964 * if idx == -1: * for j from 0 <= j < k: * out[i, j] = fv # <<<<<<<<<<<<<< * else: * for j from 0 <= j < k: */ __pyx_t_6 = __pyx_v_i; __pyx_t_7 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_6, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_7, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_fv; } goto __pyx_L5; } /*else*/ { /* "pandas/src/generated.pyx":2966 * out[i, j] = fv * else: * for j from 0 <= j < k: # <<<<<<<<<<<<<< * out[i, j] = values[idx, j] * */ __pyx_t_5 = __pyx_v_k; for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_5; __pyx_v_j++) { /* "pandas/src/generated.pyx":2967 * else: * for j from 0 <= j < k: * out[i, j] = values[idx, j] # <<<<<<<<<<<<<< * * @cython.wraparound(False) */ __pyx_t_8 = __pyx_v_idx; __pyx_t_9 = __pyx_v_j; __pyx_t_10 = __pyx_v_i; __pyx_t_11 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_10, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_11, __pyx_pybuffernd_out.diminfo[1].strides) = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int16_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_8, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_9, __pyx_pybuffernd_values.diminfo[1].strides)); } } __pyx_L5:; } __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.take_2d_axis0_int16_int64", __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_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_279take_2d_axis0_int16_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_279take_2d_axis0_int16_float64 = {__Pyx_NAMESTR("take_2d_axis0_int16_float64"), (PyCFunction)__pyx_pw_6pandas_5algos_279take_2d_axis0_int16_float64, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_279take_2d_axis0_int16_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_values = 0; PyArrayObject *__pyx_v_indexer = 0; PyArrayObject *__pyx_v_out = 0; PyObject *__pyx_v_fill_value = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("take_2d_axis0_int16_float64 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__values,&__pyx_n_s__indexer,&__pyx_n_s__out,&__pyx_n_s__fill_value,0}; PyObject* values[4] = {0,0,0,0}; values[3] = __pyx_k_136; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__values)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__indexer)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_2d_axis0_int16_float64", 0, 3, 4, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2971; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__out)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_2d_axis0_int16_float64", 0, 3, 4, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2971; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__fill_value); if (value) { values[3] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "take_2d_axis0_int16_float64") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2971; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_values = ((PyArrayObject *)values[0]); __pyx_v_indexer = ((PyArrayObject *)values[1]); __pyx_v_out = ((PyArrayObject *)values[2]); __pyx_v_fill_value = values[3]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("take_2d_axis0_int16_float64", 0, 3, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2971; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.take_2d_axis0_int16_float64", __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_filename = __pyx_f[2]; __pyx_lineno = 2971; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_indexer), __pyx_ptype_5numpy_ndarray, 1, "indexer", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2972; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_5numpy_ndarray, 1, "out", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2973; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_278take_2d_axis0_int16_float64(__pyx_self, __pyx_v_values, __pyx_v_indexer, __pyx_v_out, __pyx_v_fill_value); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":2971 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_axis0_int16_float64(ndarray[int16_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[float64_t, ndim=2] out, */ static PyObject *__pyx_pf_6pandas_5algos_278take_2d_axis0_int16_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_k; Py_ssize_t __pyx_v_n; Py_ssize_t __pyx_v_idx; __pyx_t_5numpy_float64_t __pyx_v_fv; __Pyx_LocalBuf_ND __pyx_pybuffernd_indexer; __Pyx_Buffer __pyx_pybuffer_indexer; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_values; __Pyx_Buffer __pyx_pybuffer_values; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; __pyx_t_5numpy_float64_t __pyx_t_2; Py_ssize_t __pyx_t_3; int __pyx_t_4; Py_ssize_t __pyx_t_5; Py_ssize_t __pyx_t_6; Py_ssize_t __pyx_t_7; Py_ssize_t __pyx_t_8; Py_ssize_t __pyx_t_9; Py_ssize_t __pyx_t_10; Py_ssize_t __pyx_t_11; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("take_2d_axis0_int16_float64", 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_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; { __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_int16_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2971; __pyx_clineno = __LINE__; goto __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_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1]; { __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_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2971; __pyx_clineno = __LINE__; goto __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_BufFmt_StackElem __pyx_stack[1]; 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, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2971; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; __pyx_pybuffernd_out.diminfo[1].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_out.diminfo[1].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[1]; /* "pandas/src/generated.pyx":2979 * float64_t fv * * n = len(indexer) # <<<<<<<<<<<<<< * k = values.shape[1] * */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_indexer)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2979; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/src/generated.pyx":2980 * * n = len(indexer) * k = values.shape[1] # <<<<<<<<<<<<<< * * fv = fill_value */ __pyx_v_k = (__pyx_v_values->dimensions[1]); /* "pandas/src/generated.pyx":2982 * k = values.shape[1] * * fv = fill_value # <<<<<<<<<<<<<< * * IF False: */ __pyx_t_2 = __pyx_PyFloat_AsDouble(__pyx_v_fill_value); if (unlikely((__pyx_t_2 == (npy_float64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2982; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_fv = __pyx_t_2; /* "pandas/src/generated.pyx":3003 * return * * for i from 0 <= i < n: # <<<<<<<<<<<<<< * idx = indexer[i] * if idx == -1: */ __pyx_t_1 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_1; __pyx_v_i++) { /* "pandas/src/generated.pyx":3004 * * for i from 0 <= i < n: * idx = indexer[i] # <<<<<<<<<<<<<< * if idx == -1: * for j from 0 <= j < k: */ __pyx_t_3 = __pyx_v_i; __pyx_v_idx = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_3, __pyx_pybuffernd_indexer.diminfo[0].strides)); /* "pandas/src/generated.pyx":3005 * for i from 0 <= i < n: * idx = indexer[i] * if idx == -1: # <<<<<<<<<<<<<< * for j from 0 <= j < k: * out[i, j] = fv */ __pyx_t_4 = ((__pyx_v_idx == -1) != 0); if (__pyx_t_4) { /* "pandas/src/generated.pyx":3006 * idx = indexer[i] * if idx == -1: * for j from 0 <= j < k: # <<<<<<<<<<<<<< * out[i, j] = fv * else: */ __pyx_t_5 = __pyx_v_k; for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_5; __pyx_v_j++) { /* "pandas/src/generated.pyx":3007 * if idx == -1: * for j from 0 <= j < k: * out[i, j] = fv # <<<<<<<<<<<<<< * else: * for j from 0 <= j < k: */ __pyx_t_6 = __pyx_v_i; __pyx_t_7 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_6, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_7, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_fv; } goto __pyx_L5; } /*else*/ { /* "pandas/src/generated.pyx":3009 * out[i, j] = fv * else: * for j from 0 <= j < k: # <<<<<<<<<<<<<< * out[i, j] = values[idx, j] * */ __pyx_t_5 = __pyx_v_k; for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_5; __pyx_v_j++) { /* "pandas/src/generated.pyx":3010 * else: * for j from 0 <= j < k: * out[i, j] = values[idx, j] # <<<<<<<<<<<<<< * * @cython.wraparound(False) */ __pyx_t_8 = __pyx_v_idx; __pyx_t_9 = __pyx_v_j; __pyx_t_10 = __pyx_v_i; __pyx_t_11 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_10, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_11, __pyx_pybuffernd_out.diminfo[1].strides) = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int16_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_8, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_9, __pyx_pybuffernd_values.diminfo[1].strides)); } } __pyx_L5:; } __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.take_2d_axis0_int16_float64", __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_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_281take_2d_axis0_int32_int32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_281take_2d_axis0_int32_int32 = {__Pyx_NAMESTR("take_2d_axis0_int32_int32"), (PyCFunction)__pyx_pw_6pandas_5algos_281take_2d_axis0_int32_int32, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_281take_2d_axis0_int32_int32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_values = 0; PyArrayObject *__pyx_v_indexer = 0; PyArrayObject *__pyx_v_out = 0; PyObject *__pyx_v_fill_value = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("take_2d_axis0_int32_int32 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__values,&__pyx_n_s__indexer,&__pyx_n_s__out,&__pyx_n_s__fill_value,0}; PyObject* values[4] = {0,0,0,0}; values[3] = __pyx_k_137; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__values)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__indexer)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_2d_axis0_int32_int32", 0, 3, 4, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3014; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__out)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_2d_axis0_int32_int32", 0, 3, 4, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3014; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__fill_value); if (value) { values[3] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "take_2d_axis0_int32_int32") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3014; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_values = ((PyArrayObject *)values[0]); __pyx_v_indexer = ((PyArrayObject *)values[1]); __pyx_v_out = ((PyArrayObject *)values[2]); __pyx_v_fill_value = values[3]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("take_2d_axis0_int32_int32", 0, 3, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3014; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.take_2d_axis0_int32_int32", __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_filename = __pyx_f[2]; __pyx_lineno = 3014; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_indexer), __pyx_ptype_5numpy_ndarray, 1, "indexer", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3015; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_5numpy_ndarray, 1, "out", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3016; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_280take_2d_axis0_int32_int32(__pyx_self, __pyx_v_values, __pyx_v_indexer, __pyx_v_out, __pyx_v_fill_value); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":3014 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_axis0_int32_int32(ndarray[int32_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[int32_t, ndim=2] out, */ static PyObject *__pyx_pf_6pandas_5algos_280take_2d_axis0_int32_int32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_k; Py_ssize_t __pyx_v_n; Py_ssize_t __pyx_v_idx; __pyx_t_5numpy_int32_t __pyx_v_fv; __pyx_t_5numpy_int32_t *__pyx_v_v; __pyx_t_5numpy_int32_t *__pyx_v_o; __Pyx_LocalBuf_ND __pyx_pybuffernd_indexer; __Pyx_Buffer __pyx_pybuffer_indexer; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_values; __Pyx_Buffer __pyx_pybuffer_values; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; __pyx_t_5numpy_int32_t __pyx_t_2; int __pyx_t_3; int __pyx_t_4; int __pyx_t_5; int __pyx_t_6; Py_ssize_t __pyx_t_7; Py_ssize_t __pyx_t_8; Py_ssize_t __pyx_t_9; Py_ssize_t __pyx_t_10; long __pyx_t_11; Py_ssize_t __pyx_t_12; long __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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("take_2d_axis0_int32_int32", 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_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; { __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_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3014; __pyx_clineno = __LINE__; goto __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_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1]; { __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_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3014; __pyx_clineno = __LINE__; goto __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_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_v_out, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3014; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; __pyx_pybuffernd_out.diminfo[1].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_out.diminfo[1].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[1]; /* "pandas/src/generated.pyx":3022 * int32_t fv * * n = len(indexer) # <<<<<<<<<<<<<< * k = values.shape[1] * */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_indexer)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3022; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/src/generated.pyx":3023 * * n = len(indexer) * k = values.shape[1] # <<<<<<<<<<<<<< * * fv = fill_value */ __pyx_v_k = (__pyx_v_values->dimensions[1]); /* "pandas/src/generated.pyx":3025 * k = values.shape[1] * * fv = fill_value # <<<<<<<<<<<<<< * * IF True: */ __pyx_t_2 = __Pyx_PyInt_from_py_npy_int32(__pyx_v_fill_value); if (unlikely((__pyx_t_2 == (npy_int32)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3025; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_fv = __pyx_t_2; /* "pandas/src/generated.pyx":3031 * int32_t *v, *o * * if (values.strides[1] == out.strides[1] and # <<<<<<<<<<<<<< * values.strides[1] == sizeof(int32_t) and * sizeof(int32_t) * n >= 256): */ __pyx_t_3 = (((__pyx_v_values->strides[1]) == (__pyx_v_out->strides[1])) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":3032 * * if (values.strides[1] == out.strides[1] and * values.strides[1] == sizeof(int32_t) and # <<<<<<<<<<<<<< * sizeof(int32_t) * n >= 256): * */ __pyx_t_4 = (((__pyx_v_values->strides[1]) == (sizeof(__pyx_t_5numpy_int32_t))) != 0); if (__pyx_t_4) { /* "pandas/src/generated.pyx":3033 * if (values.strides[1] == out.strides[1] and * values.strides[1] == sizeof(int32_t) and * sizeof(int32_t) * n >= 256): # <<<<<<<<<<<<<< * * for i from 0 <= i < n: */ __pyx_t_5 = ((((sizeof(__pyx_t_5numpy_int32_t)) * __pyx_v_n) >= 256) != 0); __pyx_t_6 = __pyx_t_5; } else { __pyx_t_6 = __pyx_t_4; } __pyx_t_4 = __pyx_t_6; } else { __pyx_t_4 = __pyx_t_3; } if (__pyx_t_4) { /* "pandas/src/generated.pyx":3035 * sizeof(int32_t) * n >= 256): * * for i from 0 <= i < n: # <<<<<<<<<<<<<< * idx = indexer[i] * if idx == -1: */ __pyx_t_1 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_1; __pyx_v_i++) { /* "pandas/src/generated.pyx":3036 * * for i from 0 <= i < n: * idx = indexer[i] # <<<<<<<<<<<<<< * if idx == -1: * for j from 0 <= j < k: */ __pyx_t_7 = __pyx_v_i; __pyx_v_idx = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_7, __pyx_pybuffernd_indexer.diminfo[0].strides)); /* "pandas/src/generated.pyx":3037 * for i from 0 <= i < n: * idx = indexer[i] * if idx == -1: # <<<<<<<<<<<<<< * for j from 0 <= j < k: * out[i, j] = fv */ __pyx_t_4 = ((__pyx_v_idx == -1) != 0); if (__pyx_t_4) { /* "pandas/src/generated.pyx":3038 * idx = indexer[i] * if idx == -1: * for j from 0 <= j < k: # <<<<<<<<<<<<<< * out[i, j] = fv * else: */ __pyx_t_8 = __pyx_v_k; for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_8; __pyx_v_j++) { /* "pandas/src/generated.pyx":3039 * if idx == -1: * for j from 0 <= j < k: * out[i, j] = fv # <<<<<<<<<<<<<< * else: * v = &values[idx, 0] */ __pyx_t_9 = __pyx_v_i; __pyx_t_10 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_9, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_10, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_fv; } goto __pyx_L6; } /*else*/ { /* "pandas/src/generated.pyx":3041 * out[i, j] = fv * else: * v = &values[idx, 0] # <<<<<<<<<<<<<< * o = &out[i, 0] * memmove(o, v, (sizeof(int32_t) * k)) */ __pyx_t_8 = __pyx_v_idx; __pyx_t_11 = 0; __pyx_v_v = (&(*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_8, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_11, __pyx_pybuffernd_values.diminfo[1].strides))); /* "pandas/src/generated.pyx":3042 * else: * v = &values[idx, 0] * o = &out[i, 0] # <<<<<<<<<<<<<< * memmove(o, v, (sizeof(int32_t) * k)) * return */ __pyx_t_12 = __pyx_v_i; __pyx_t_13 = 0; __pyx_v_o = (&(*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_12, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_13, __pyx_pybuffernd_out.diminfo[1].strides))); /* "pandas/src/generated.pyx":3043 * v = &values[idx, 0] * o = &out[i, 0] * memmove(o, v, (sizeof(int32_t) * k)) # <<<<<<<<<<<<<< * return * */ memmove(__pyx_v_o, __pyx_v_v, ((size_t)((sizeof(__pyx_t_5numpy_int32_t)) * __pyx_v_k))); } __pyx_L6:; } /* "pandas/src/generated.pyx":3044 * o = &out[i, 0] * memmove(o, v, (sizeof(int32_t) * k)) * return # <<<<<<<<<<<<<< * * for i from 0 <= i < n: */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; goto __pyx_L3; } __pyx_L3:; /* "pandas/src/generated.pyx":3046 * return * * for i from 0 <= i < n: # <<<<<<<<<<<<<< * idx = indexer[i] * if idx == -1: */ __pyx_t_1 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_1; __pyx_v_i++) { /* "pandas/src/generated.pyx":3047 * * for i from 0 <= i < n: * idx = indexer[i] # <<<<<<<<<<<<<< * if idx == -1: * for j from 0 <= j < k: */ __pyx_t_14 = __pyx_v_i; __pyx_v_idx = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_indexer.diminfo[0].strides)); /* "pandas/src/generated.pyx":3048 * for i from 0 <= i < n: * idx = indexer[i] * if idx == -1: # <<<<<<<<<<<<<< * for j from 0 <= j < k: * out[i, j] = fv */ __pyx_t_4 = ((__pyx_v_idx == -1) != 0); if (__pyx_t_4) { /* "pandas/src/generated.pyx":3049 * idx = indexer[i] * if idx == -1: * for j from 0 <= j < k: # <<<<<<<<<<<<<< * out[i, j] = fv * else: */ __pyx_t_15 = __pyx_v_k; for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_15; __pyx_v_j++) { /* "pandas/src/generated.pyx":3050 * if idx == -1: * for j from 0 <= j < k: * out[i, j] = fv # <<<<<<<<<<<<<< * else: * for j from 0 <= j < k: */ __pyx_t_16 = __pyx_v_i; __pyx_t_17 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_17, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_fv; } goto __pyx_L11; } /*else*/ { /* "pandas/src/generated.pyx":3052 * out[i, j] = fv * else: * for j from 0 <= j < k: # <<<<<<<<<<<<<< * out[i, j] = values[idx, j] * */ __pyx_t_15 = __pyx_v_k; for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_15; __pyx_v_j++) { /* "pandas/src/generated.pyx":3053 * else: * for j from 0 <= j < k: * out[i, j] = values[idx, j] # <<<<<<<<<<<<<< * * @cython.wraparound(False) */ __pyx_t_18 = __pyx_v_idx; __pyx_t_19 = __pyx_v_j; __pyx_t_20 = __pyx_v_i; __pyx_t_21 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_21, __pyx_pybuffernd_out.diminfo[1].strides) = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_19, __pyx_pybuffernd_values.diminfo[1].strides)); } } __pyx_L11:; } __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.take_2d_axis0_int32_int32", __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_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_283take_2d_axis0_int32_int64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_283take_2d_axis0_int32_int64 = {__Pyx_NAMESTR("take_2d_axis0_int32_int64"), (PyCFunction)__pyx_pw_6pandas_5algos_283take_2d_axis0_int32_int64, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_283take_2d_axis0_int32_int64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_values = 0; PyArrayObject *__pyx_v_indexer = 0; PyArrayObject *__pyx_v_out = 0; PyObject *__pyx_v_fill_value = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("take_2d_axis0_int32_int64 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__values,&__pyx_n_s__indexer,&__pyx_n_s__out,&__pyx_n_s__fill_value,0}; PyObject* values[4] = {0,0,0,0}; values[3] = __pyx_k_138; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__values)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__indexer)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_2d_axis0_int32_int64", 0, 3, 4, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3057; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__out)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_2d_axis0_int32_int64", 0, 3, 4, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3057; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__fill_value); if (value) { values[3] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "take_2d_axis0_int32_int64") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3057; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_values = ((PyArrayObject *)values[0]); __pyx_v_indexer = ((PyArrayObject *)values[1]); __pyx_v_out = ((PyArrayObject *)values[2]); __pyx_v_fill_value = values[3]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("take_2d_axis0_int32_int64", 0, 3, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3057; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.take_2d_axis0_int32_int64", __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_filename = __pyx_f[2]; __pyx_lineno = 3057; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_indexer), __pyx_ptype_5numpy_ndarray, 1, "indexer", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3058; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_5numpy_ndarray, 1, "out", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3059; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_282take_2d_axis0_int32_int64(__pyx_self, __pyx_v_values, __pyx_v_indexer, __pyx_v_out, __pyx_v_fill_value); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":3057 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_axis0_int32_int64(ndarray[int32_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[int64_t, ndim=2] out, */ static PyObject *__pyx_pf_6pandas_5algos_282take_2d_axis0_int32_int64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_k; Py_ssize_t __pyx_v_n; Py_ssize_t __pyx_v_idx; __pyx_t_5numpy_int64_t __pyx_v_fv; __Pyx_LocalBuf_ND __pyx_pybuffernd_indexer; __Pyx_Buffer __pyx_pybuffer_indexer; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_values; __Pyx_Buffer __pyx_pybuffer_values; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; __pyx_t_5numpy_int64_t __pyx_t_2; Py_ssize_t __pyx_t_3; int __pyx_t_4; Py_ssize_t __pyx_t_5; Py_ssize_t __pyx_t_6; Py_ssize_t __pyx_t_7; Py_ssize_t __pyx_t_8; Py_ssize_t __pyx_t_9; Py_ssize_t __pyx_t_10; Py_ssize_t __pyx_t_11; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("take_2d_axis0_int32_int64", 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_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; { __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_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3057; __pyx_clineno = __LINE__; goto __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_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1]; { __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_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3057; __pyx_clineno = __LINE__; goto __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_BufFmt_StackElem __pyx_stack[1]; 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, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3057; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; __pyx_pybuffernd_out.diminfo[1].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_out.diminfo[1].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[1]; /* "pandas/src/generated.pyx":3065 * int64_t fv * * n = len(indexer) # <<<<<<<<<<<<<< * k = values.shape[1] * */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_indexer)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3065; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/src/generated.pyx":3066 * * n = len(indexer) * k = values.shape[1] # <<<<<<<<<<<<<< * * fv = fill_value */ __pyx_v_k = (__pyx_v_values->dimensions[1]); /* "pandas/src/generated.pyx":3068 * k = values.shape[1] * * fv = fill_value # <<<<<<<<<<<<<< * * IF False: */ __pyx_t_2 = __Pyx_PyInt_from_py_npy_int64(__pyx_v_fill_value); if (unlikely((__pyx_t_2 == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3068; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_fv = __pyx_t_2; /* "pandas/src/generated.pyx":3089 * return * * for i from 0 <= i < n: # <<<<<<<<<<<<<< * idx = indexer[i] * if idx == -1: */ __pyx_t_1 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_1; __pyx_v_i++) { /* "pandas/src/generated.pyx":3090 * * for i from 0 <= i < n: * idx = indexer[i] # <<<<<<<<<<<<<< * if idx == -1: * for j from 0 <= j < k: */ __pyx_t_3 = __pyx_v_i; __pyx_v_idx = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_3, __pyx_pybuffernd_indexer.diminfo[0].strides)); /* "pandas/src/generated.pyx":3091 * for i from 0 <= i < n: * idx = indexer[i] * if idx == -1: # <<<<<<<<<<<<<< * for j from 0 <= j < k: * out[i, j] = fv */ __pyx_t_4 = ((__pyx_v_idx == -1) != 0); if (__pyx_t_4) { /* "pandas/src/generated.pyx":3092 * idx = indexer[i] * if idx == -1: * for j from 0 <= j < k: # <<<<<<<<<<<<<< * out[i, j] = fv * else: */ __pyx_t_5 = __pyx_v_k; for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_5; __pyx_v_j++) { /* "pandas/src/generated.pyx":3093 * if idx == -1: * for j from 0 <= j < k: * out[i, j] = fv # <<<<<<<<<<<<<< * else: * for j from 0 <= j < k: */ __pyx_t_6 = __pyx_v_i; __pyx_t_7 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_6, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_7, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_fv; } goto __pyx_L5; } /*else*/ { /* "pandas/src/generated.pyx":3095 * out[i, j] = fv * else: * for j from 0 <= j < k: # <<<<<<<<<<<<<< * out[i, j] = values[idx, j] * */ __pyx_t_5 = __pyx_v_k; for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_5; __pyx_v_j++) { /* "pandas/src/generated.pyx":3096 * else: * for j from 0 <= j < k: * out[i, j] = values[idx, j] # <<<<<<<<<<<<<< * * @cython.wraparound(False) */ __pyx_t_8 = __pyx_v_idx; __pyx_t_9 = __pyx_v_j; __pyx_t_10 = __pyx_v_i; __pyx_t_11 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_10, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_11, __pyx_pybuffernd_out.diminfo[1].strides) = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_8, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_9, __pyx_pybuffernd_values.diminfo[1].strides)); } } __pyx_L5:; } __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.take_2d_axis0_int32_int64", __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_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_285take_2d_axis0_int32_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_285take_2d_axis0_int32_float64 = {__Pyx_NAMESTR("take_2d_axis0_int32_float64"), (PyCFunction)__pyx_pw_6pandas_5algos_285take_2d_axis0_int32_float64, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_285take_2d_axis0_int32_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_values = 0; PyArrayObject *__pyx_v_indexer = 0; PyArrayObject *__pyx_v_out = 0; PyObject *__pyx_v_fill_value = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("take_2d_axis0_int32_float64 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__values,&__pyx_n_s__indexer,&__pyx_n_s__out,&__pyx_n_s__fill_value,0}; PyObject* values[4] = {0,0,0,0}; values[3] = __pyx_k_139; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__values)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__indexer)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_2d_axis0_int32_float64", 0, 3, 4, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3100; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__out)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_2d_axis0_int32_float64", 0, 3, 4, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3100; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__fill_value); if (value) { values[3] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "take_2d_axis0_int32_float64") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3100; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_values = ((PyArrayObject *)values[0]); __pyx_v_indexer = ((PyArrayObject *)values[1]); __pyx_v_out = ((PyArrayObject *)values[2]); __pyx_v_fill_value = values[3]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("take_2d_axis0_int32_float64", 0, 3, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3100; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.take_2d_axis0_int32_float64", __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_filename = __pyx_f[2]; __pyx_lineno = 3100; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_indexer), __pyx_ptype_5numpy_ndarray, 1, "indexer", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3101; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_5numpy_ndarray, 1, "out", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3102; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_284take_2d_axis0_int32_float64(__pyx_self, __pyx_v_values, __pyx_v_indexer, __pyx_v_out, __pyx_v_fill_value); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":3100 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_axis0_int32_float64(ndarray[int32_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[float64_t, ndim=2] out, */ static PyObject *__pyx_pf_6pandas_5algos_284take_2d_axis0_int32_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_k; Py_ssize_t __pyx_v_n; Py_ssize_t __pyx_v_idx; __pyx_t_5numpy_float64_t __pyx_v_fv; __Pyx_LocalBuf_ND __pyx_pybuffernd_indexer; __Pyx_Buffer __pyx_pybuffer_indexer; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_values; __Pyx_Buffer __pyx_pybuffer_values; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; __pyx_t_5numpy_float64_t __pyx_t_2; Py_ssize_t __pyx_t_3; int __pyx_t_4; Py_ssize_t __pyx_t_5; Py_ssize_t __pyx_t_6; Py_ssize_t __pyx_t_7; Py_ssize_t __pyx_t_8; Py_ssize_t __pyx_t_9; Py_ssize_t __pyx_t_10; Py_ssize_t __pyx_t_11; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("take_2d_axis0_int32_float64", 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_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; { __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_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3100; __pyx_clineno = __LINE__; goto __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_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1]; { __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_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3100; __pyx_clineno = __LINE__; goto __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_BufFmt_StackElem __pyx_stack[1]; 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, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3100; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; __pyx_pybuffernd_out.diminfo[1].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_out.diminfo[1].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[1]; /* "pandas/src/generated.pyx":3108 * float64_t fv * * n = len(indexer) # <<<<<<<<<<<<<< * k = values.shape[1] * */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_indexer)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3108; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/src/generated.pyx":3109 * * n = len(indexer) * k = values.shape[1] # <<<<<<<<<<<<<< * * fv = fill_value */ __pyx_v_k = (__pyx_v_values->dimensions[1]); /* "pandas/src/generated.pyx":3111 * k = values.shape[1] * * fv = fill_value # <<<<<<<<<<<<<< * * IF False: */ __pyx_t_2 = __pyx_PyFloat_AsDouble(__pyx_v_fill_value); if (unlikely((__pyx_t_2 == (npy_float64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3111; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_fv = __pyx_t_2; /* "pandas/src/generated.pyx":3132 * return * * for i from 0 <= i < n: # <<<<<<<<<<<<<< * idx = indexer[i] * if idx == -1: */ __pyx_t_1 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_1; __pyx_v_i++) { /* "pandas/src/generated.pyx":3133 * * for i from 0 <= i < n: * idx = indexer[i] # <<<<<<<<<<<<<< * if idx == -1: * for j from 0 <= j < k: */ __pyx_t_3 = __pyx_v_i; __pyx_v_idx = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_3, __pyx_pybuffernd_indexer.diminfo[0].strides)); /* "pandas/src/generated.pyx":3134 * for i from 0 <= i < n: * idx = indexer[i] * if idx == -1: # <<<<<<<<<<<<<< * for j from 0 <= j < k: * out[i, j] = fv */ __pyx_t_4 = ((__pyx_v_idx == -1) != 0); if (__pyx_t_4) { /* "pandas/src/generated.pyx":3135 * idx = indexer[i] * if idx == -1: * for j from 0 <= j < k: # <<<<<<<<<<<<<< * out[i, j] = fv * else: */ __pyx_t_5 = __pyx_v_k; for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_5; __pyx_v_j++) { /* "pandas/src/generated.pyx":3136 * if idx == -1: * for j from 0 <= j < k: * out[i, j] = fv # <<<<<<<<<<<<<< * else: * for j from 0 <= j < k: */ __pyx_t_6 = __pyx_v_i; __pyx_t_7 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_6, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_7, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_fv; } goto __pyx_L5; } /*else*/ { /* "pandas/src/generated.pyx":3138 * out[i, j] = fv * else: * for j from 0 <= j < k: # <<<<<<<<<<<<<< * out[i, j] = values[idx, j] * */ __pyx_t_5 = __pyx_v_k; for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_5; __pyx_v_j++) { /* "pandas/src/generated.pyx":3139 * else: * for j from 0 <= j < k: * out[i, j] = values[idx, j] # <<<<<<<<<<<<<< * * @cython.wraparound(False) */ __pyx_t_8 = __pyx_v_idx; __pyx_t_9 = __pyx_v_j; __pyx_t_10 = __pyx_v_i; __pyx_t_11 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_10, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_11, __pyx_pybuffernd_out.diminfo[1].strides) = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_8, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_9, __pyx_pybuffernd_values.diminfo[1].strides)); } } __pyx_L5:; } __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.take_2d_axis0_int32_float64", __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_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_287take_2d_axis0_int64_int64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_287take_2d_axis0_int64_int64 = {__Pyx_NAMESTR("take_2d_axis0_int64_int64"), (PyCFunction)__pyx_pw_6pandas_5algos_287take_2d_axis0_int64_int64, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_287take_2d_axis0_int64_int64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_values = 0; PyArrayObject *__pyx_v_indexer = 0; PyArrayObject *__pyx_v_out = 0; PyObject *__pyx_v_fill_value = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("take_2d_axis0_int64_int64 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__values,&__pyx_n_s__indexer,&__pyx_n_s__out,&__pyx_n_s__fill_value,0}; PyObject* values[4] = {0,0,0,0}; values[3] = __pyx_k_140; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__values)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__indexer)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_2d_axis0_int64_int64", 0, 3, 4, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3143; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__out)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_2d_axis0_int64_int64", 0, 3, 4, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3143; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__fill_value); if (value) { values[3] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "take_2d_axis0_int64_int64") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3143; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_values = ((PyArrayObject *)values[0]); __pyx_v_indexer = ((PyArrayObject *)values[1]); __pyx_v_out = ((PyArrayObject *)values[2]); __pyx_v_fill_value = values[3]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("take_2d_axis0_int64_int64", 0, 3, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3143; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.take_2d_axis0_int64_int64", __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_filename = __pyx_f[2]; __pyx_lineno = 3143; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_indexer), __pyx_ptype_5numpy_ndarray, 1, "indexer", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3144; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_5numpy_ndarray, 1, "out", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3145; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_286take_2d_axis0_int64_int64(__pyx_self, __pyx_v_values, __pyx_v_indexer, __pyx_v_out, __pyx_v_fill_value); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":3143 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_axis0_int64_int64(ndarray[int64_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[int64_t, ndim=2] out, */ static PyObject *__pyx_pf_6pandas_5algos_286take_2d_axis0_int64_int64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_k; Py_ssize_t __pyx_v_n; Py_ssize_t __pyx_v_idx; __pyx_t_5numpy_int64_t __pyx_v_fv; __pyx_t_5numpy_int64_t *__pyx_v_v; __pyx_t_5numpy_int64_t *__pyx_v_o; __Pyx_LocalBuf_ND __pyx_pybuffernd_indexer; __Pyx_Buffer __pyx_pybuffer_indexer; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_values; __Pyx_Buffer __pyx_pybuffer_values; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; __pyx_t_5numpy_int64_t __pyx_t_2; int __pyx_t_3; int __pyx_t_4; int __pyx_t_5; int __pyx_t_6; Py_ssize_t __pyx_t_7; Py_ssize_t __pyx_t_8; Py_ssize_t __pyx_t_9; Py_ssize_t __pyx_t_10; long __pyx_t_11; Py_ssize_t __pyx_t_12; long __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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("take_2d_axis0_int64_int64", 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_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; { __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_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3143; __pyx_clineno = __LINE__; goto __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_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1]; { __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_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3143; __pyx_clineno = __LINE__; goto __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_BufFmt_StackElem __pyx_stack[1]; 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, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3143; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; __pyx_pybuffernd_out.diminfo[1].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_out.diminfo[1].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[1]; /* "pandas/src/generated.pyx":3151 * int64_t fv * * n = len(indexer) # <<<<<<<<<<<<<< * k = values.shape[1] * */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_indexer)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3151; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/src/generated.pyx":3152 * * n = len(indexer) * k = values.shape[1] # <<<<<<<<<<<<<< * * fv = fill_value */ __pyx_v_k = (__pyx_v_values->dimensions[1]); /* "pandas/src/generated.pyx":3154 * k = values.shape[1] * * fv = fill_value # <<<<<<<<<<<<<< * * IF True: */ __pyx_t_2 = __Pyx_PyInt_from_py_npy_int64(__pyx_v_fill_value); if (unlikely((__pyx_t_2 == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3154; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_fv = __pyx_t_2; /* "pandas/src/generated.pyx":3160 * int64_t *v, *o * * if (values.strides[1] == out.strides[1] and # <<<<<<<<<<<<<< * values.strides[1] == sizeof(int64_t) and * sizeof(int64_t) * n >= 256): */ __pyx_t_3 = (((__pyx_v_values->strides[1]) == (__pyx_v_out->strides[1])) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":3161 * * if (values.strides[1] == out.strides[1] and * values.strides[1] == sizeof(int64_t) and # <<<<<<<<<<<<<< * sizeof(int64_t) * n >= 256): * */ __pyx_t_4 = (((__pyx_v_values->strides[1]) == (sizeof(__pyx_t_5numpy_int64_t))) != 0); if (__pyx_t_4) { /* "pandas/src/generated.pyx":3162 * if (values.strides[1] == out.strides[1] and * values.strides[1] == sizeof(int64_t) and * sizeof(int64_t) * n >= 256): # <<<<<<<<<<<<<< * * for i from 0 <= i < n: */ __pyx_t_5 = ((((sizeof(__pyx_t_5numpy_int64_t)) * __pyx_v_n) >= 256) != 0); __pyx_t_6 = __pyx_t_5; } else { __pyx_t_6 = __pyx_t_4; } __pyx_t_4 = __pyx_t_6; } else { __pyx_t_4 = __pyx_t_3; } if (__pyx_t_4) { /* "pandas/src/generated.pyx":3164 * sizeof(int64_t) * n >= 256): * * for i from 0 <= i < n: # <<<<<<<<<<<<<< * idx = indexer[i] * if idx == -1: */ __pyx_t_1 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_1; __pyx_v_i++) { /* "pandas/src/generated.pyx":3165 * * for i from 0 <= i < n: * idx = indexer[i] # <<<<<<<<<<<<<< * if idx == -1: * for j from 0 <= j < k: */ __pyx_t_7 = __pyx_v_i; __pyx_v_idx = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_7, __pyx_pybuffernd_indexer.diminfo[0].strides)); /* "pandas/src/generated.pyx":3166 * for i from 0 <= i < n: * idx = indexer[i] * if idx == -1: # <<<<<<<<<<<<<< * for j from 0 <= j < k: * out[i, j] = fv */ __pyx_t_4 = ((__pyx_v_idx == -1) != 0); if (__pyx_t_4) { /* "pandas/src/generated.pyx":3167 * idx = indexer[i] * if idx == -1: * for j from 0 <= j < k: # <<<<<<<<<<<<<< * out[i, j] = fv * else: */ __pyx_t_8 = __pyx_v_k; for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_8; __pyx_v_j++) { /* "pandas/src/generated.pyx":3168 * if idx == -1: * for j from 0 <= j < k: * out[i, j] = fv # <<<<<<<<<<<<<< * else: * v = &values[idx, 0] */ __pyx_t_9 = __pyx_v_i; __pyx_t_10 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_9, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_10, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_fv; } goto __pyx_L6; } /*else*/ { /* "pandas/src/generated.pyx":3170 * out[i, j] = fv * else: * v = &values[idx, 0] # <<<<<<<<<<<<<< * o = &out[i, 0] * memmove(o, v, (sizeof(int64_t) * k)) */ __pyx_t_8 = __pyx_v_idx; __pyx_t_11 = 0; __pyx_v_v = (&(*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_8, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_11, __pyx_pybuffernd_values.diminfo[1].strides))); /* "pandas/src/generated.pyx":3171 * else: * v = &values[idx, 0] * o = &out[i, 0] # <<<<<<<<<<<<<< * memmove(o, v, (sizeof(int64_t) * k)) * return */ __pyx_t_12 = __pyx_v_i; __pyx_t_13 = 0; __pyx_v_o = (&(*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_12, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_13, __pyx_pybuffernd_out.diminfo[1].strides))); /* "pandas/src/generated.pyx":3172 * v = &values[idx, 0] * o = &out[i, 0] * memmove(o, v, (sizeof(int64_t) * k)) # <<<<<<<<<<<<<< * return * */ memmove(__pyx_v_o, __pyx_v_v, ((size_t)((sizeof(__pyx_t_5numpy_int64_t)) * __pyx_v_k))); } __pyx_L6:; } /* "pandas/src/generated.pyx":3173 * o = &out[i, 0] * memmove(o, v, (sizeof(int64_t) * k)) * return # <<<<<<<<<<<<<< * * for i from 0 <= i < n: */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; goto __pyx_L3; } __pyx_L3:; /* "pandas/src/generated.pyx":3175 * return * * for i from 0 <= i < n: # <<<<<<<<<<<<<< * idx = indexer[i] * if idx == -1: */ __pyx_t_1 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_1; __pyx_v_i++) { /* "pandas/src/generated.pyx":3176 * * for i from 0 <= i < n: * idx = indexer[i] # <<<<<<<<<<<<<< * if idx == -1: * for j from 0 <= j < k: */ __pyx_t_14 = __pyx_v_i; __pyx_v_idx = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_indexer.diminfo[0].strides)); /* "pandas/src/generated.pyx":3177 * for i from 0 <= i < n: * idx = indexer[i] * if idx == -1: # <<<<<<<<<<<<<< * for j from 0 <= j < k: * out[i, j] = fv */ __pyx_t_4 = ((__pyx_v_idx == -1) != 0); if (__pyx_t_4) { /* "pandas/src/generated.pyx":3178 * idx = indexer[i] * if idx == -1: * for j from 0 <= j < k: # <<<<<<<<<<<<<< * out[i, j] = fv * else: */ __pyx_t_15 = __pyx_v_k; for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_15; __pyx_v_j++) { /* "pandas/src/generated.pyx":3179 * if idx == -1: * for j from 0 <= j < k: * out[i, j] = fv # <<<<<<<<<<<<<< * else: * for j from 0 <= j < k: */ __pyx_t_16 = __pyx_v_i; __pyx_t_17 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_17, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_fv; } goto __pyx_L11; } /*else*/ { /* "pandas/src/generated.pyx":3181 * out[i, j] = fv * else: * for j from 0 <= j < k: # <<<<<<<<<<<<<< * out[i, j] = values[idx, j] * */ __pyx_t_15 = __pyx_v_k; for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_15; __pyx_v_j++) { /* "pandas/src/generated.pyx":3182 * else: * for j from 0 <= j < k: * out[i, j] = values[idx, j] # <<<<<<<<<<<<<< * * @cython.wraparound(False) */ __pyx_t_18 = __pyx_v_idx; __pyx_t_19 = __pyx_v_j; __pyx_t_20 = __pyx_v_i; __pyx_t_21 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_21, __pyx_pybuffernd_out.diminfo[1].strides) = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_19, __pyx_pybuffernd_values.diminfo[1].strides)); } } __pyx_L11:; } __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.take_2d_axis0_int64_int64", __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_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_289take_2d_axis0_int64_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_289take_2d_axis0_int64_float64 = {__Pyx_NAMESTR("take_2d_axis0_int64_float64"), (PyCFunction)__pyx_pw_6pandas_5algos_289take_2d_axis0_int64_float64, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_289take_2d_axis0_int64_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_values = 0; PyArrayObject *__pyx_v_indexer = 0; PyArrayObject *__pyx_v_out = 0; PyObject *__pyx_v_fill_value = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("take_2d_axis0_int64_float64 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__values,&__pyx_n_s__indexer,&__pyx_n_s__out,&__pyx_n_s__fill_value,0}; PyObject* values[4] = {0,0,0,0}; values[3] = __pyx_k_141; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__values)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__indexer)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_2d_axis0_int64_float64", 0, 3, 4, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3186; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__out)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_2d_axis0_int64_float64", 0, 3, 4, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3186; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__fill_value); if (value) { values[3] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "take_2d_axis0_int64_float64") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3186; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_values = ((PyArrayObject *)values[0]); __pyx_v_indexer = ((PyArrayObject *)values[1]); __pyx_v_out = ((PyArrayObject *)values[2]); __pyx_v_fill_value = values[3]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("take_2d_axis0_int64_float64", 0, 3, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3186; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.take_2d_axis0_int64_float64", __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_filename = __pyx_f[2]; __pyx_lineno = 3186; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_indexer), __pyx_ptype_5numpy_ndarray, 1, "indexer", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3187; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_5numpy_ndarray, 1, "out", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3188; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_288take_2d_axis0_int64_float64(__pyx_self, __pyx_v_values, __pyx_v_indexer, __pyx_v_out, __pyx_v_fill_value); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":3186 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_axis0_int64_float64(ndarray[int64_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[float64_t, ndim=2] out, */ static PyObject *__pyx_pf_6pandas_5algos_288take_2d_axis0_int64_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_k; Py_ssize_t __pyx_v_n; Py_ssize_t __pyx_v_idx; __pyx_t_5numpy_float64_t __pyx_v_fv; __Pyx_LocalBuf_ND __pyx_pybuffernd_indexer; __Pyx_Buffer __pyx_pybuffer_indexer; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_values; __Pyx_Buffer __pyx_pybuffer_values; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; __pyx_t_5numpy_float64_t __pyx_t_2; Py_ssize_t __pyx_t_3; int __pyx_t_4; Py_ssize_t __pyx_t_5; Py_ssize_t __pyx_t_6; Py_ssize_t __pyx_t_7; Py_ssize_t __pyx_t_8; Py_ssize_t __pyx_t_9; Py_ssize_t __pyx_t_10; Py_ssize_t __pyx_t_11; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("take_2d_axis0_int64_float64", 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_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; { __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_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3186; __pyx_clineno = __LINE__; goto __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_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1]; { __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_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3186; __pyx_clineno = __LINE__; goto __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_BufFmt_StackElem __pyx_stack[1]; 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, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3186; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; __pyx_pybuffernd_out.diminfo[1].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_out.diminfo[1].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[1]; /* "pandas/src/generated.pyx":3194 * float64_t fv * * n = len(indexer) # <<<<<<<<<<<<<< * k = values.shape[1] * */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_indexer)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3194; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/src/generated.pyx":3195 * * n = len(indexer) * k = values.shape[1] # <<<<<<<<<<<<<< * * fv = fill_value */ __pyx_v_k = (__pyx_v_values->dimensions[1]); /* "pandas/src/generated.pyx":3197 * k = values.shape[1] * * fv = fill_value # <<<<<<<<<<<<<< * * IF False: */ __pyx_t_2 = __pyx_PyFloat_AsDouble(__pyx_v_fill_value); if (unlikely((__pyx_t_2 == (npy_float64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3197; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_fv = __pyx_t_2; /* "pandas/src/generated.pyx":3218 * return * * for i from 0 <= i < n: # <<<<<<<<<<<<<< * idx = indexer[i] * if idx == -1: */ __pyx_t_1 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_1; __pyx_v_i++) { /* "pandas/src/generated.pyx":3219 * * for i from 0 <= i < n: * idx = indexer[i] # <<<<<<<<<<<<<< * if idx == -1: * for j from 0 <= j < k: */ __pyx_t_3 = __pyx_v_i; __pyx_v_idx = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_3, __pyx_pybuffernd_indexer.diminfo[0].strides)); /* "pandas/src/generated.pyx":3220 * for i from 0 <= i < n: * idx = indexer[i] * if idx == -1: # <<<<<<<<<<<<<< * for j from 0 <= j < k: * out[i, j] = fv */ __pyx_t_4 = ((__pyx_v_idx == -1) != 0); if (__pyx_t_4) { /* "pandas/src/generated.pyx":3221 * idx = indexer[i] * if idx == -1: * for j from 0 <= j < k: # <<<<<<<<<<<<<< * out[i, j] = fv * else: */ __pyx_t_5 = __pyx_v_k; for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_5; __pyx_v_j++) { /* "pandas/src/generated.pyx":3222 * if idx == -1: * for j from 0 <= j < k: * out[i, j] = fv # <<<<<<<<<<<<<< * else: * for j from 0 <= j < k: */ __pyx_t_6 = __pyx_v_i; __pyx_t_7 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_6, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_7, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_fv; } goto __pyx_L5; } /*else*/ { /* "pandas/src/generated.pyx":3224 * out[i, j] = fv * else: * for j from 0 <= j < k: # <<<<<<<<<<<<<< * out[i, j] = values[idx, j] * */ __pyx_t_5 = __pyx_v_k; for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_5; __pyx_v_j++) { /* "pandas/src/generated.pyx":3225 * else: * for j from 0 <= j < k: * out[i, j] = values[idx, j] # <<<<<<<<<<<<<< * * @cython.wraparound(False) */ __pyx_t_8 = __pyx_v_idx; __pyx_t_9 = __pyx_v_j; __pyx_t_10 = __pyx_v_i; __pyx_t_11 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_10, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_11, __pyx_pybuffernd_out.diminfo[1].strides) = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_8, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_9, __pyx_pybuffernd_values.diminfo[1].strides)); } } __pyx_L5:; } __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.take_2d_axis0_int64_float64", __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_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_291take_2d_axis0_float32_float32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_291take_2d_axis0_float32_float32 = {__Pyx_NAMESTR("take_2d_axis0_float32_float32"), (PyCFunction)__pyx_pw_6pandas_5algos_291take_2d_axis0_float32_float32, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_291take_2d_axis0_float32_float32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_values = 0; PyArrayObject *__pyx_v_indexer = 0; PyArrayObject *__pyx_v_out = 0; PyObject *__pyx_v_fill_value = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("take_2d_axis0_float32_float32 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__values,&__pyx_n_s__indexer,&__pyx_n_s__out,&__pyx_n_s__fill_value,0}; PyObject* values[4] = {0,0,0,0}; values[3] = __pyx_k_142; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__values)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__indexer)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_2d_axis0_float32_float32", 0, 3, 4, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3229; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__out)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_2d_axis0_float32_float32", 0, 3, 4, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3229; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__fill_value); if (value) { values[3] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "take_2d_axis0_float32_float32") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3229; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_values = ((PyArrayObject *)values[0]); __pyx_v_indexer = ((PyArrayObject *)values[1]); __pyx_v_out = ((PyArrayObject *)values[2]); __pyx_v_fill_value = values[3]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("take_2d_axis0_float32_float32", 0, 3, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3229; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.take_2d_axis0_float32_float32", __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_filename = __pyx_f[2]; __pyx_lineno = 3229; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_indexer), __pyx_ptype_5numpy_ndarray, 1, "indexer", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3230; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_5numpy_ndarray, 1, "out", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3231; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_290take_2d_axis0_float32_float32(__pyx_self, __pyx_v_values, __pyx_v_indexer, __pyx_v_out, __pyx_v_fill_value); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":3229 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_axis0_float32_float32(ndarray[float32_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[float32_t, ndim=2] out, */ static PyObject *__pyx_pf_6pandas_5algos_290take_2d_axis0_float32_float32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_k; Py_ssize_t __pyx_v_n; Py_ssize_t __pyx_v_idx; __pyx_t_5numpy_float32_t __pyx_v_fv; __pyx_t_5numpy_float32_t *__pyx_v_v; __pyx_t_5numpy_float32_t *__pyx_v_o; __Pyx_LocalBuf_ND __pyx_pybuffernd_indexer; __Pyx_Buffer __pyx_pybuffer_indexer; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_values; __Pyx_Buffer __pyx_pybuffer_values; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; __pyx_t_5numpy_float32_t __pyx_t_2; int __pyx_t_3; int __pyx_t_4; int __pyx_t_5; int __pyx_t_6; Py_ssize_t __pyx_t_7; Py_ssize_t __pyx_t_8; Py_ssize_t __pyx_t_9; Py_ssize_t __pyx_t_10; long __pyx_t_11; Py_ssize_t __pyx_t_12; long __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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("take_2d_axis0_float32_float32", 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_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; { __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_float32_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3229; __pyx_clineno = __LINE__; goto __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_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1]; { __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_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3229; __pyx_clineno = __LINE__; goto __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_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_v_out, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3229; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; __pyx_pybuffernd_out.diminfo[1].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_out.diminfo[1].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[1]; /* "pandas/src/generated.pyx":3237 * float32_t fv * * n = len(indexer) # <<<<<<<<<<<<<< * k = values.shape[1] * */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_indexer)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3237; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/src/generated.pyx":3238 * * n = len(indexer) * k = values.shape[1] # <<<<<<<<<<<<<< * * fv = fill_value */ __pyx_v_k = (__pyx_v_values->dimensions[1]); /* "pandas/src/generated.pyx":3240 * k = values.shape[1] * * fv = fill_value # <<<<<<<<<<<<<< * * IF True: */ __pyx_t_2 = __pyx_PyFloat_AsFloat(__pyx_v_fill_value); if (unlikely((__pyx_t_2 == (npy_float32)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3240; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_fv = __pyx_t_2; /* "pandas/src/generated.pyx":3246 * float32_t *v, *o * * if (values.strides[1] == out.strides[1] and # <<<<<<<<<<<<<< * values.strides[1] == sizeof(float32_t) and * sizeof(float32_t) * n >= 256): */ __pyx_t_3 = (((__pyx_v_values->strides[1]) == (__pyx_v_out->strides[1])) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":3247 * * if (values.strides[1] == out.strides[1] and * values.strides[1] == sizeof(float32_t) and # <<<<<<<<<<<<<< * sizeof(float32_t) * n >= 256): * */ __pyx_t_4 = (((__pyx_v_values->strides[1]) == (sizeof(__pyx_t_5numpy_float32_t))) != 0); if (__pyx_t_4) { /* "pandas/src/generated.pyx":3248 * if (values.strides[1] == out.strides[1] and * values.strides[1] == sizeof(float32_t) and * sizeof(float32_t) * n >= 256): # <<<<<<<<<<<<<< * * for i from 0 <= i < n: */ __pyx_t_5 = ((((sizeof(__pyx_t_5numpy_float32_t)) * __pyx_v_n) >= 256) != 0); __pyx_t_6 = __pyx_t_5; } else { __pyx_t_6 = __pyx_t_4; } __pyx_t_4 = __pyx_t_6; } else { __pyx_t_4 = __pyx_t_3; } if (__pyx_t_4) { /* "pandas/src/generated.pyx":3250 * sizeof(float32_t) * n >= 256): * * for i from 0 <= i < n: # <<<<<<<<<<<<<< * idx = indexer[i] * if idx == -1: */ __pyx_t_1 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_1; __pyx_v_i++) { /* "pandas/src/generated.pyx":3251 * * for i from 0 <= i < n: * idx = indexer[i] # <<<<<<<<<<<<<< * if idx == -1: * for j from 0 <= j < k: */ __pyx_t_7 = __pyx_v_i; __pyx_v_idx = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_7, __pyx_pybuffernd_indexer.diminfo[0].strides)); /* "pandas/src/generated.pyx":3252 * for i from 0 <= i < n: * idx = indexer[i] * if idx == -1: # <<<<<<<<<<<<<< * for j from 0 <= j < k: * out[i, j] = fv */ __pyx_t_4 = ((__pyx_v_idx == -1) != 0); if (__pyx_t_4) { /* "pandas/src/generated.pyx":3253 * idx = indexer[i] * if idx == -1: * for j from 0 <= j < k: # <<<<<<<<<<<<<< * out[i, j] = fv * else: */ __pyx_t_8 = __pyx_v_k; for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_8; __pyx_v_j++) { /* "pandas/src/generated.pyx":3254 * if idx == -1: * for j from 0 <= j < k: * out[i, j] = fv # <<<<<<<<<<<<<< * else: * v = &values[idx, 0] */ __pyx_t_9 = __pyx_v_i; __pyx_t_10 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_9, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_10, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_fv; } goto __pyx_L6; } /*else*/ { /* "pandas/src/generated.pyx":3256 * out[i, j] = fv * else: * v = &values[idx, 0] # <<<<<<<<<<<<<< * o = &out[i, 0] * memmove(o, v, (sizeof(float32_t) * k)) */ __pyx_t_8 = __pyx_v_idx; __pyx_t_11 = 0; __pyx_v_v = (&(*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_8, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_11, __pyx_pybuffernd_values.diminfo[1].strides))); /* "pandas/src/generated.pyx":3257 * else: * v = &values[idx, 0] * o = &out[i, 0] # <<<<<<<<<<<<<< * memmove(o, v, (sizeof(float32_t) * k)) * return */ __pyx_t_12 = __pyx_v_i; __pyx_t_13 = 0; __pyx_v_o = (&(*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_12, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_13, __pyx_pybuffernd_out.diminfo[1].strides))); /* "pandas/src/generated.pyx":3258 * v = &values[idx, 0] * o = &out[i, 0] * memmove(o, v, (sizeof(float32_t) * k)) # <<<<<<<<<<<<<< * return * */ memmove(__pyx_v_o, __pyx_v_v, ((size_t)((sizeof(__pyx_t_5numpy_float32_t)) * __pyx_v_k))); } __pyx_L6:; } /* "pandas/src/generated.pyx":3259 * o = &out[i, 0] * memmove(o, v, (sizeof(float32_t) * k)) * return # <<<<<<<<<<<<<< * * for i from 0 <= i < n: */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; goto __pyx_L3; } __pyx_L3:; /* "pandas/src/generated.pyx":3261 * return * * for i from 0 <= i < n: # <<<<<<<<<<<<<< * idx = indexer[i] * if idx == -1: */ __pyx_t_1 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_1; __pyx_v_i++) { /* "pandas/src/generated.pyx":3262 * * for i from 0 <= i < n: * idx = indexer[i] # <<<<<<<<<<<<<< * if idx == -1: * for j from 0 <= j < k: */ __pyx_t_14 = __pyx_v_i; __pyx_v_idx = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_indexer.diminfo[0].strides)); /* "pandas/src/generated.pyx":3263 * for i from 0 <= i < n: * idx = indexer[i] * if idx == -1: # <<<<<<<<<<<<<< * for j from 0 <= j < k: * out[i, j] = fv */ __pyx_t_4 = ((__pyx_v_idx == -1) != 0); if (__pyx_t_4) { /* "pandas/src/generated.pyx":3264 * idx = indexer[i] * if idx == -1: * for j from 0 <= j < k: # <<<<<<<<<<<<<< * out[i, j] = fv * else: */ __pyx_t_15 = __pyx_v_k; for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_15; __pyx_v_j++) { /* "pandas/src/generated.pyx":3265 * if idx == -1: * for j from 0 <= j < k: * out[i, j] = fv # <<<<<<<<<<<<<< * else: * for j from 0 <= j < k: */ __pyx_t_16 = __pyx_v_i; __pyx_t_17 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_17, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_fv; } goto __pyx_L11; } /*else*/ { /* "pandas/src/generated.pyx":3267 * out[i, j] = fv * else: * for j from 0 <= j < k: # <<<<<<<<<<<<<< * out[i, j] = values[idx, j] * */ __pyx_t_15 = __pyx_v_k; for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_15; __pyx_v_j++) { /* "pandas/src/generated.pyx":3268 * else: * for j from 0 <= j < k: * out[i, j] = values[idx, j] # <<<<<<<<<<<<<< * * @cython.wraparound(False) */ __pyx_t_18 = __pyx_v_idx; __pyx_t_19 = __pyx_v_j; __pyx_t_20 = __pyx_v_i; __pyx_t_21 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_21, __pyx_pybuffernd_out.diminfo[1].strides) = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_19, __pyx_pybuffernd_values.diminfo[1].strides)); } } __pyx_L11:; } __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.take_2d_axis0_float32_float32", __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_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_293take_2d_axis0_float32_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_293take_2d_axis0_float32_float64 = {__Pyx_NAMESTR("take_2d_axis0_float32_float64"), (PyCFunction)__pyx_pw_6pandas_5algos_293take_2d_axis0_float32_float64, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_293take_2d_axis0_float32_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_values = 0; PyArrayObject *__pyx_v_indexer = 0; PyArrayObject *__pyx_v_out = 0; PyObject *__pyx_v_fill_value = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("take_2d_axis0_float32_float64 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__values,&__pyx_n_s__indexer,&__pyx_n_s__out,&__pyx_n_s__fill_value,0}; PyObject* values[4] = {0,0,0,0}; values[3] = __pyx_k_143; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__values)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__indexer)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_2d_axis0_float32_float64", 0, 3, 4, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3272; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__out)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_2d_axis0_float32_float64", 0, 3, 4, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3272; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__fill_value); if (value) { values[3] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "take_2d_axis0_float32_float64") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3272; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_values = ((PyArrayObject *)values[0]); __pyx_v_indexer = ((PyArrayObject *)values[1]); __pyx_v_out = ((PyArrayObject *)values[2]); __pyx_v_fill_value = values[3]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("take_2d_axis0_float32_float64", 0, 3, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3272; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.take_2d_axis0_float32_float64", __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_filename = __pyx_f[2]; __pyx_lineno = 3272; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_indexer), __pyx_ptype_5numpy_ndarray, 1, "indexer", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3273; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_5numpy_ndarray, 1, "out", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3274; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_292take_2d_axis0_float32_float64(__pyx_self, __pyx_v_values, __pyx_v_indexer, __pyx_v_out, __pyx_v_fill_value); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":3272 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_axis0_float32_float64(ndarray[float32_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[float64_t, ndim=2] out, */ static PyObject *__pyx_pf_6pandas_5algos_292take_2d_axis0_float32_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_k; Py_ssize_t __pyx_v_n; Py_ssize_t __pyx_v_idx; __pyx_t_5numpy_float64_t __pyx_v_fv; __Pyx_LocalBuf_ND __pyx_pybuffernd_indexer; __Pyx_Buffer __pyx_pybuffer_indexer; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_values; __Pyx_Buffer __pyx_pybuffer_values; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; __pyx_t_5numpy_float64_t __pyx_t_2; Py_ssize_t __pyx_t_3; int __pyx_t_4; Py_ssize_t __pyx_t_5; Py_ssize_t __pyx_t_6; Py_ssize_t __pyx_t_7; Py_ssize_t __pyx_t_8; Py_ssize_t __pyx_t_9; Py_ssize_t __pyx_t_10; Py_ssize_t __pyx_t_11; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("take_2d_axis0_float32_float64", 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_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; { __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_float32_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3272; __pyx_clineno = __LINE__; goto __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_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1]; { __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_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3272; __pyx_clineno = __LINE__; goto __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_BufFmt_StackElem __pyx_stack[1]; 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, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3272; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; __pyx_pybuffernd_out.diminfo[1].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_out.diminfo[1].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[1]; /* "pandas/src/generated.pyx":3280 * float64_t fv * * n = len(indexer) # <<<<<<<<<<<<<< * k = values.shape[1] * */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_indexer)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3280; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/src/generated.pyx":3281 * * n = len(indexer) * k = values.shape[1] # <<<<<<<<<<<<<< * * fv = fill_value */ __pyx_v_k = (__pyx_v_values->dimensions[1]); /* "pandas/src/generated.pyx":3283 * k = values.shape[1] * * fv = fill_value # <<<<<<<<<<<<<< * * IF False: */ __pyx_t_2 = __pyx_PyFloat_AsDouble(__pyx_v_fill_value); if (unlikely((__pyx_t_2 == (npy_float64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3283; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_fv = __pyx_t_2; /* "pandas/src/generated.pyx":3304 * return * * for i from 0 <= i < n: # <<<<<<<<<<<<<< * idx = indexer[i] * if idx == -1: */ __pyx_t_1 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_1; __pyx_v_i++) { /* "pandas/src/generated.pyx":3305 * * for i from 0 <= i < n: * idx = indexer[i] # <<<<<<<<<<<<<< * if idx == -1: * for j from 0 <= j < k: */ __pyx_t_3 = __pyx_v_i; __pyx_v_idx = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_3, __pyx_pybuffernd_indexer.diminfo[0].strides)); /* "pandas/src/generated.pyx":3306 * for i from 0 <= i < n: * idx = indexer[i] * if idx == -1: # <<<<<<<<<<<<<< * for j from 0 <= j < k: * out[i, j] = fv */ __pyx_t_4 = ((__pyx_v_idx == -1) != 0); if (__pyx_t_4) { /* "pandas/src/generated.pyx":3307 * idx = indexer[i] * if idx == -1: * for j from 0 <= j < k: # <<<<<<<<<<<<<< * out[i, j] = fv * else: */ __pyx_t_5 = __pyx_v_k; for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_5; __pyx_v_j++) { /* "pandas/src/generated.pyx":3308 * if idx == -1: * for j from 0 <= j < k: * out[i, j] = fv # <<<<<<<<<<<<<< * else: * for j from 0 <= j < k: */ __pyx_t_6 = __pyx_v_i; __pyx_t_7 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_6, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_7, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_fv; } goto __pyx_L5; } /*else*/ { /* "pandas/src/generated.pyx":3310 * out[i, j] = fv * else: * for j from 0 <= j < k: # <<<<<<<<<<<<<< * out[i, j] = values[idx, j] * */ __pyx_t_5 = __pyx_v_k; for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_5; __pyx_v_j++) { /* "pandas/src/generated.pyx":3311 * else: * for j from 0 <= j < k: * out[i, j] = values[idx, j] # <<<<<<<<<<<<<< * * @cython.wraparound(False) */ __pyx_t_8 = __pyx_v_idx; __pyx_t_9 = __pyx_v_j; __pyx_t_10 = __pyx_v_i; __pyx_t_11 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_10, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_11, __pyx_pybuffernd_out.diminfo[1].strides) = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_8, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_9, __pyx_pybuffernd_values.diminfo[1].strides)); } } __pyx_L5:; } __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.take_2d_axis0_float32_float64", __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_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_295take_2d_axis0_float64_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_295take_2d_axis0_float64_float64 = {__Pyx_NAMESTR("take_2d_axis0_float64_float64"), (PyCFunction)__pyx_pw_6pandas_5algos_295take_2d_axis0_float64_float64, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_295take_2d_axis0_float64_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_values = 0; PyArrayObject *__pyx_v_indexer = 0; PyArrayObject *__pyx_v_out = 0; PyObject *__pyx_v_fill_value = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("take_2d_axis0_float64_float64 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__values,&__pyx_n_s__indexer,&__pyx_n_s__out,&__pyx_n_s__fill_value,0}; PyObject* values[4] = {0,0,0,0}; values[3] = __pyx_k_144; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__values)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__indexer)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_2d_axis0_float64_float64", 0, 3, 4, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3315; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__out)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_2d_axis0_float64_float64", 0, 3, 4, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3315; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__fill_value); if (value) { values[3] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "take_2d_axis0_float64_float64") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3315; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_values = ((PyArrayObject *)values[0]); __pyx_v_indexer = ((PyArrayObject *)values[1]); __pyx_v_out = ((PyArrayObject *)values[2]); __pyx_v_fill_value = values[3]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("take_2d_axis0_float64_float64", 0, 3, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3315; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.take_2d_axis0_float64_float64", __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_filename = __pyx_f[2]; __pyx_lineno = 3315; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_indexer), __pyx_ptype_5numpy_ndarray, 1, "indexer", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3316; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_5numpy_ndarray, 1, "out", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3317; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_294take_2d_axis0_float64_float64(__pyx_self, __pyx_v_values, __pyx_v_indexer, __pyx_v_out, __pyx_v_fill_value); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":3315 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_axis0_float64_float64(ndarray[float64_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[float64_t, ndim=2] out, */ static PyObject *__pyx_pf_6pandas_5algos_294take_2d_axis0_float64_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_k; Py_ssize_t __pyx_v_n; Py_ssize_t __pyx_v_idx; __pyx_t_5numpy_float64_t __pyx_v_fv; __pyx_t_5numpy_float64_t *__pyx_v_v; __pyx_t_5numpy_float64_t *__pyx_v_o; __Pyx_LocalBuf_ND __pyx_pybuffernd_indexer; __Pyx_Buffer __pyx_pybuffer_indexer; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_values; __Pyx_Buffer __pyx_pybuffer_values; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; __pyx_t_5numpy_float64_t __pyx_t_2; int __pyx_t_3; int __pyx_t_4; int __pyx_t_5; int __pyx_t_6; Py_ssize_t __pyx_t_7; Py_ssize_t __pyx_t_8; Py_ssize_t __pyx_t_9; Py_ssize_t __pyx_t_10; long __pyx_t_11; Py_ssize_t __pyx_t_12; long __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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("take_2d_axis0_float64_float64", 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_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; { __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, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3315; __pyx_clineno = __LINE__; goto __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_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1]; { __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_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3315; __pyx_clineno = __LINE__; goto __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_BufFmt_StackElem __pyx_stack[1]; 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, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3315; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; __pyx_pybuffernd_out.diminfo[1].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_out.diminfo[1].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[1]; /* "pandas/src/generated.pyx":3323 * float64_t fv * * n = len(indexer) # <<<<<<<<<<<<<< * k = values.shape[1] * */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_indexer)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3323; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/src/generated.pyx":3324 * * n = len(indexer) * k = values.shape[1] # <<<<<<<<<<<<<< * * fv = fill_value */ __pyx_v_k = (__pyx_v_values->dimensions[1]); /* "pandas/src/generated.pyx":3326 * k = values.shape[1] * * fv = fill_value # <<<<<<<<<<<<<< * * IF True: */ __pyx_t_2 = __pyx_PyFloat_AsDouble(__pyx_v_fill_value); if (unlikely((__pyx_t_2 == (npy_float64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3326; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_fv = __pyx_t_2; /* "pandas/src/generated.pyx":3332 * float64_t *v, *o * * if (values.strides[1] == out.strides[1] and # <<<<<<<<<<<<<< * values.strides[1] == sizeof(float64_t) and * sizeof(float64_t) * n >= 256): */ __pyx_t_3 = (((__pyx_v_values->strides[1]) == (__pyx_v_out->strides[1])) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":3333 * * if (values.strides[1] == out.strides[1] and * values.strides[1] == sizeof(float64_t) and # <<<<<<<<<<<<<< * sizeof(float64_t) * n >= 256): * */ __pyx_t_4 = (((__pyx_v_values->strides[1]) == (sizeof(__pyx_t_5numpy_float64_t))) != 0); if (__pyx_t_4) { /* "pandas/src/generated.pyx":3334 * if (values.strides[1] == out.strides[1] and * values.strides[1] == sizeof(float64_t) and * sizeof(float64_t) * n >= 256): # <<<<<<<<<<<<<< * * for i from 0 <= i < n: */ __pyx_t_5 = ((((sizeof(__pyx_t_5numpy_float64_t)) * __pyx_v_n) >= 256) != 0); __pyx_t_6 = __pyx_t_5; } else { __pyx_t_6 = __pyx_t_4; } __pyx_t_4 = __pyx_t_6; } else { __pyx_t_4 = __pyx_t_3; } if (__pyx_t_4) { /* "pandas/src/generated.pyx":3336 * sizeof(float64_t) * n >= 256): * * for i from 0 <= i < n: # <<<<<<<<<<<<<< * idx = indexer[i] * if idx == -1: */ __pyx_t_1 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_1; __pyx_v_i++) { /* "pandas/src/generated.pyx":3337 * * for i from 0 <= i < n: * idx = indexer[i] # <<<<<<<<<<<<<< * if idx == -1: * for j from 0 <= j < k: */ __pyx_t_7 = __pyx_v_i; __pyx_v_idx = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_7, __pyx_pybuffernd_indexer.diminfo[0].strides)); /* "pandas/src/generated.pyx":3338 * for i from 0 <= i < n: * idx = indexer[i] * if idx == -1: # <<<<<<<<<<<<<< * for j from 0 <= j < k: * out[i, j] = fv */ __pyx_t_4 = ((__pyx_v_idx == -1) != 0); if (__pyx_t_4) { /* "pandas/src/generated.pyx":3339 * idx = indexer[i] * if idx == -1: * for j from 0 <= j < k: # <<<<<<<<<<<<<< * out[i, j] = fv * else: */ __pyx_t_8 = __pyx_v_k; for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_8; __pyx_v_j++) { /* "pandas/src/generated.pyx":3340 * if idx == -1: * for j from 0 <= j < k: * out[i, j] = fv # <<<<<<<<<<<<<< * else: * v = &values[idx, 0] */ __pyx_t_9 = __pyx_v_i; __pyx_t_10 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_9, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_10, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_fv; } goto __pyx_L6; } /*else*/ { /* "pandas/src/generated.pyx":3342 * out[i, j] = fv * else: * v = &values[idx, 0] # <<<<<<<<<<<<<< * o = &out[i, 0] * memmove(o, v, (sizeof(float64_t) * k)) */ __pyx_t_8 = __pyx_v_idx; __pyx_t_11 = 0; __pyx_v_v = (&(*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_8, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_11, __pyx_pybuffernd_values.diminfo[1].strides))); /* "pandas/src/generated.pyx":3343 * else: * v = &values[idx, 0] * o = &out[i, 0] # <<<<<<<<<<<<<< * memmove(o, v, (sizeof(float64_t) * k)) * return */ __pyx_t_12 = __pyx_v_i; __pyx_t_13 = 0; __pyx_v_o = (&(*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_12, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_13, __pyx_pybuffernd_out.diminfo[1].strides))); /* "pandas/src/generated.pyx":3344 * v = &values[idx, 0] * o = &out[i, 0] * memmove(o, v, (sizeof(float64_t) * k)) # <<<<<<<<<<<<<< * return * */ memmove(__pyx_v_o, __pyx_v_v, ((size_t)((sizeof(__pyx_t_5numpy_float64_t)) * __pyx_v_k))); } __pyx_L6:; } /* "pandas/src/generated.pyx":3345 * o = &out[i, 0] * memmove(o, v, (sizeof(float64_t) * k)) * return # <<<<<<<<<<<<<< * * for i from 0 <= i < n: */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; goto __pyx_L3; } __pyx_L3:; /* "pandas/src/generated.pyx":3347 * return * * for i from 0 <= i < n: # <<<<<<<<<<<<<< * idx = indexer[i] * if idx == -1: */ __pyx_t_1 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_1; __pyx_v_i++) { /* "pandas/src/generated.pyx":3348 * * for i from 0 <= i < n: * idx = indexer[i] # <<<<<<<<<<<<<< * if idx == -1: * for j from 0 <= j < k: */ __pyx_t_14 = __pyx_v_i; __pyx_v_idx = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_indexer.diminfo[0].strides)); /* "pandas/src/generated.pyx":3349 * for i from 0 <= i < n: * idx = indexer[i] * if idx == -1: # <<<<<<<<<<<<<< * for j from 0 <= j < k: * out[i, j] = fv */ __pyx_t_4 = ((__pyx_v_idx == -1) != 0); if (__pyx_t_4) { /* "pandas/src/generated.pyx":3350 * idx = indexer[i] * if idx == -1: * for j from 0 <= j < k: # <<<<<<<<<<<<<< * out[i, j] = fv * else: */ __pyx_t_15 = __pyx_v_k; for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_15; __pyx_v_j++) { /* "pandas/src/generated.pyx":3351 * if idx == -1: * for j from 0 <= j < k: * out[i, j] = fv # <<<<<<<<<<<<<< * else: * for j from 0 <= j < k: */ __pyx_t_16 = __pyx_v_i; __pyx_t_17 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_17, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_fv; } goto __pyx_L11; } /*else*/ { /* "pandas/src/generated.pyx":3353 * out[i, j] = fv * else: * for j from 0 <= j < k: # <<<<<<<<<<<<<< * out[i, j] = values[idx, j] * */ __pyx_t_15 = __pyx_v_k; for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_15; __pyx_v_j++) { /* "pandas/src/generated.pyx":3354 * else: * for j from 0 <= j < k: * out[i, j] = values[idx, j] # <<<<<<<<<<<<<< * * @cython.wraparound(False) */ __pyx_t_18 = __pyx_v_idx; __pyx_t_19 = __pyx_v_j; __pyx_t_20 = __pyx_v_i; __pyx_t_21 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_21, __pyx_pybuffernd_out.diminfo[1].strides) = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_19, __pyx_pybuffernd_values.diminfo[1].strides)); } } __pyx_L11:; } __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.take_2d_axis0_float64_float64", __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_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_297take_2d_axis0_object_object(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_297take_2d_axis0_object_object = {__Pyx_NAMESTR("take_2d_axis0_object_object"), (PyCFunction)__pyx_pw_6pandas_5algos_297take_2d_axis0_object_object, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_297take_2d_axis0_object_object(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_values = 0; PyArrayObject *__pyx_v_indexer = 0; PyArrayObject *__pyx_v_out = 0; PyObject *__pyx_v_fill_value = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("take_2d_axis0_object_object (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__values,&__pyx_n_s__indexer,&__pyx_n_s__out,&__pyx_n_s__fill_value,0}; PyObject* values[4] = {0,0,0,0}; values[3] = __pyx_k_145; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__values)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__indexer)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_2d_axis0_object_object", 0, 3, 4, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3358; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__out)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_2d_axis0_object_object", 0, 3, 4, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3358; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__fill_value); if (value) { values[3] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "take_2d_axis0_object_object") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3358; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_values = ((PyArrayObject *)values[0]); __pyx_v_indexer = ((PyArrayObject *)values[1]); __pyx_v_out = ((PyArrayObject *)values[2]); __pyx_v_fill_value = values[3]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("take_2d_axis0_object_object", 0, 3, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3358; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.take_2d_axis0_object_object", __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_filename = __pyx_f[2]; __pyx_lineno = 3358; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_indexer), __pyx_ptype_5numpy_ndarray, 1, "indexer", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3359; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_5numpy_ndarray, 1, "out", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3360; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_296take_2d_axis0_object_object(__pyx_self, __pyx_v_values, __pyx_v_indexer, __pyx_v_out, __pyx_v_fill_value); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":3358 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_axis0_object_object(ndarray[object, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[object, ndim=2] out, */ static PyObject *__pyx_pf_6pandas_5algos_296take_2d_axis0_object_object(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_k; Py_ssize_t __pyx_v_n; Py_ssize_t __pyx_v_idx; PyObject *__pyx_v_fv = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_indexer; __Pyx_Buffer __pyx_pybuffer_indexer; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_values; __Pyx_Buffer __pyx_pybuffer_values; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; Py_ssize_t __pyx_t_2; int __pyx_t_3; Py_ssize_t __pyx_t_4; Py_ssize_t __pyx_t_5; Py_ssize_t __pyx_t_6; PyObject **__pyx_t_7; PyObject *__pyx_t_8 = NULL; Py_ssize_t __pyx_t_9; Py_ssize_t __pyx_t_10; Py_ssize_t __pyx_t_11; Py_ssize_t __pyx_t_12; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("take_2d_axis0_object_object", 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_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; { __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, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3358; __pyx_clineno = __LINE__; goto __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_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1]; { __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_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3358; __pyx_clineno = __LINE__; goto __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_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_v_out, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3358; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; __pyx_pybuffernd_out.diminfo[1].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_out.diminfo[1].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[1]; /* "pandas/src/generated.pyx":3366 * object fv * * n = len(indexer) # <<<<<<<<<<<<<< * k = values.shape[1] * */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_indexer)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3366; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/src/generated.pyx":3367 * * n = len(indexer) * k = values.shape[1] # <<<<<<<<<<<<<< * * fv = fill_value */ __pyx_v_k = (__pyx_v_values->dimensions[1]); /* "pandas/src/generated.pyx":3369 * k = values.shape[1] * * fv = fill_value # <<<<<<<<<<<<<< * * IF False: */ __Pyx_INCREF(__pyx_v_fill_value); __pyx_v_fv = __pyx_v_fill_value; /* "pandas/src/generated.pyx":3390 * return * * for i from 0 <= i < n: # <<<<<<<<<<<<<< * idx = indexer[i] * if idx == -1: */ __pyx_t_1 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_1; __pyx_v_i++) { /* "pandas/src/generated.pyx":3391 * * for i from 0 <= i < n: * idx = indexer[i] # <<<<<<<<<<<<<< * if idx == -1: * for j from 0 <= j < k: */ __pyx_t_2 = __pyx_v_i; __pyx_v_idx = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_2, __pyx_pybuffernd_indexer.diminfo[0].strides)); /* "pandas/src/generated.pyx":3392 * for i from 0 <= i < n: * idx = indexer[i] * if idx == -1: # <<<<<<<<<<<<<< * for j from 0 <= j < k: * out[i, j] = fv */ __pyx_t_3 = ((__pyx_v_idx == -1) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":3393 * idx = indexer[i] * if idx == -1: * for j from 0 <= j < k: # <<<<<<<<<<<<<< * out[i, j] = fv * else: */ __pyx_t_4 = __pyx_v_k; for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_4; __pyx_v_j++) { /* "pandas/src/generated.pyx":3394 * if idx == -1: * for j from 0 <= j < k: * out[i, j] = fv # <<<<<<<<<<<<<< * else: * for j from 0 <= j < k: */ __pyx_t_5 = __pyx_v_i; __pyx_t_6 = __pyx_v_j; __pyx_t_7 = __Pyx_BufPtrStrided2d(PyObject **, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_5, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_6, __pyx_pybuffernd_out.diminfo[1].strides); __Pyx_GOTREF(*__pyx_t_7); __Pyx_INCREF(__pyx_v_fv); __Pyx_DECREF(*__pyx_t_7); *__pyx_t_7 = __pyx_v_fv; __Pyx_GIVEREF(*__pyx_t_7); } goto __pyx_L5; } /*else*/ { /* "pandas/src/generated.pyx":3396 * out[i, j] = fv * else: * for j from 0 <= j < k: # <<<<<<<<<<<<<< * out[i, j] = values[idx, j] * */ __pyx_t_4 = __pyx_v_k; for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_4; __pyx_v_j++) { /* "pandas/src/generated.pyx":3397 * else: * for j from 0 <= j < k: * out[i, j] = values[idx, j] # <<<<<<<<<<<<<< * * */ __pyx_t_9 = __pyx_v_idx; __pyx_t_10 = __pyx_v_j; __pyx_t_8 = (PyObject *) *__Pyx_BufPtrStrided2d(PyObject **, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_9, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_10, __pyx_pybuffernd_values.diminfo[1].strides); __Pyx_INCREF((PyObject*)__pyx_t_8); __pyx_t_11 = __pyx_v_i; __pyx_t_12 = __pyx_v_j; __pyx_t_7 = __Pyx_BufPtrStrided2d(PyObject **, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_11, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_12, __pyx_pybuffernd_out.diminfo[1].strides); __Pyx_GOTREF(*__pyx_t_7); __Pyx_INCREF(__pyx_t_8); __Pyx_DECREF(*__pyx_t_7); *__pyx_t_7 = __pyx_t_8; __Pyx_GIVEREF(*__pyx_t_7); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } } __pyx_L5:; } __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_8); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.take_2d_axis0_object_object", __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_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF(__pyx_v_fv); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_299take_2d_axis1_bool_bool(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_299take_2d_axis1_bool_bool = {__Pyx_NAMESTR("take_2d_axis1_bool_bool"), (PyCFunction)__pyx_pw_6pandas_5algos_299take_2d_axis1_bool_bool, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_299take_2d_axis1_bool_bool(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_values = 0; PyArrayObject *__pyx_v_indexer = 0; PyArrayObject *__pyx_v_out = 0; PyObject *__pyx_v_fill_value = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("take_2d_axis1_bool_bool (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__values,&__pyx_n_s__indexer,&__pyx_n_s__out,&__pyx_n_s__fill_value,0}; PyObject* values[4] = {0,0,0,0}; values[3] = __pyx_k_146; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__values)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__indexer)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_2d_axis1_bool_bool", 0, 3, 4, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3402; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__out)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_2d_axis1_bool_bool", 0, 3, 4, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3402; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__fill_value); if (value) { values[3] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "take_2d_axis1_bool_bool") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3402; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_values = ((PyArrayObject *)values[0]); __pyx_v_indexer = ((PyArrayObject *)values[1]); __pyx_v_out = ((PyArrayObject *)values[2]); __pyx_v_fill_value = values[3]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("take_2d_axis1_bool_bool", 0, 3, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3402; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.take_2d_axis1_bool_bool", __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_filename = __pyx_f[2]; __pyx_lineno = 3402; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_indexer), __pyx_ptype_5numpy_ndarray, 1, "indexer", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3403; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_5numpy_ndarray, 1, "out", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3404; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_298take_2d_axis1_bool_bool(__pyx_self, __pyx_v_values, __pyx_v_indexer, __pyx_v_out, __pyx_v_fill_value); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":3402 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_axis1_bool_bool(ndarray[uint8_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[uint8_t, ndim=2] out, */ static PyObject *__pyx_pf_6pandas_5algos_298take_2d_axis1_bool_bool(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_k; Py_ssize_t __pyx_v_n; Py_ssize_t __pyx_v_idx; __pyx_t_5numpy_uint8_t __pyx_v_fv; __pyx_t_5numpy_uint8_t *__pyx_v_v; __pyx_t_5numpy_uint8_t *__pyx_v_o; __Pyx_LocalBuf_ND __pyx_pybuffernd_indexer; __Pyx_Buffer __pyx_pybuffer_indexer; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_values; __Pyx_Buffer __pyx_pybuffer_values; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; int __pyx_t_2; int __pyx_t_3; int __pyx_t_4; __pyx_t_5numpy_uint8_t __pyx_t_5; int __pyx_t_6; Py_ssize_t __pyx_t_7; Py_ssize_t __pyx_t_8; Py_ssize_t __pyx_t_9; Py_ssize_t __pyx_t_10; long __pyx_t_11; long __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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("take_2d_axis1_bool_bool", 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_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; { __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_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3402; __pyx_clineno = __LINE__; goto __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_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1]; { __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_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3402; __pyx_clineno = __LINE__; goto __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_BufFmt_StackElem __pyx_stack[1]; 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, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3402; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; __pyx_pybuffernd_out.diminfo[1].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_out.diminfo[1].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[1]; /* "pandas/src/generated.pyx":3410 * uint8_t fv * * n = len(values) # <<<<<<<<<<<<<< * k = len(indexer) * */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3410; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/src/generated.pyx":3411 * * n = len(values) * k = len(indexer) # <<<<<<<<<<<<<< * * if n == 0 or k == 0: */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_indexer)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3411; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_k = __pyx_t_1; /* "pandas/src/generated.pyx":3413 * k = len(indexer) * * if n == 0 or k == 0: # <<<<<<<<<<<<<< * return * */ __pyx_t_2 = ((__pyx_v_n == 0) != 0); if (!__pyx_t_2) { __pyx_t_3 = ((__pyx_v_k == 0) != 0); __pyx_t_4 = __pyx_t_3; } else { __pyx_t_4 = __pyx_t_2; } if (__pyx_t_4) { /* "pandas/src/generated.pyx":3414 * * if n == 0 or k == 0: * return # <<<<<<<<<<<<<< * * fv = fill_value */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; goto __pyx_L3; } __pyx_L3:; /* "pandas/src/generated.pyx":3416 * return * * fv = fill_value # <<<<<<<<<<<<<< * * IF True: */ __pyx_t_5 = __Pyx_PyInt_from_py_npy_uint8(__pyx_v_fill_value); if (unlikely((__pyx_t_5 == (npy_uint8)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3416; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_fv = __pyx_t_5; /* "pandas/src/generated.pyx":3422 * uint8_t *v, *o * * if (values.strides[0] == out.strides[0] and # <<<<<<<<<<<<<< * values.strides[0] == sizeof(uint8_t) and * sizeof(uint8_t) * n >= 256): */ __pyx_t_4 = (((__pyx_v_values->strides[0]) == (__pyx_v_out->strides[0])) != 0); if (__pyx_t_4) { /* "pandas/src/generated.pyx":3423 * * if (values.strides[0] == out.strides[0] and * values.strides[0] == sizeof(uint8_t) and # <<<<<<<<<<<<<< * sizeof(uint8_t) * n >= 256): * */ __pyx_t_2 = (((__pyx_v_values->strides[0]) == (sizeof(__pyx_t_5numpy_uint8_t))) != 0); if (__pyx_t_2) { /* "pandas/src/generated.pyx":3424 * if (values.strides[0] == out.strides[0] and * values.strides[0] == sizeof(uint8_t) and * sizeof(uint8_t) * n >= 256): # <<<<<<<<<<<<<< * * for j from 0 <= j < k: */ __pyx_t_3 = ((((sizeof(__pyx_t_5numpy_uint8_t)) * __pyx_v_n) >= 256) != 0); __pyx_t_6 = __pyx_t_3; } else { __pyx_t_6 = __pyx_t_2; } __pyx_t_2 = __pyx_t_6; } else { __pyx_t_2 = __pyx_t_4; } if (__pyx_t_2) { /* "pandas/src/generated.pyx":3426 * sizeof(uint8_t) * n >= 256): * * for j from 0 <= j < k: # <<<<<<<<<<<<<< * idx = indexer[j] * if idx == -1: */ __pyx_t_1 = __pyx_v_k; for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_1; __pyx_v_j++) { /* "pandas/src/generated.pyx":3427 * * for j from 0 <= j < k: * idx = indexer[j] # <<<<<<<<<<<<<< * if idx == -1: * for i from 0 <= i < n: */ __pyx_t_7 = __pyx_v_j; __pyx_v_idx = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_7, __pyx_pybuffernd_indexer.diminfo[0].strides)); /* "pandas/src/generated.pyx":3428 * for j from 0 <= j < k: * idx = indexer[j] * if idx == -1: # <<<<<<<<<<<<<< * for i from 0 <= i < n: * out[i, j] = fv */ __pyx_t_2 = ((__pyx_v_idx == -1) != 0); if (__pyx_t_2) { /* "pandas/src/generated.pyx":3429 * idx = indexer[j] * if idx == -1: * for i from 0 <= i < n: # <<<<<<<<<<<<<< * out[i, j] = fv * else: */ __pyx_t_8 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_8; __pyx_v_i++) { /* "pandas/src/generated.pyx":3430 * if idx == -1: * for i from 0 <= i < n: * out[i, j] = fv # <<<<<<<<<<<<<< * else: * v = &values[0, idx] */ __pyx_t_9 = __pyx_v_i; __pyx_t_10 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_9, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_10, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_fv; } goto __pyx_L7; } /*else*/ { /* "pandas/src/generated.pyx":3432 * out[i, j] = fv * else: * v = &values[0, idx] # <<<<<<<<<<<<<< * o = &out[0, j] * memmove(o, v, (sizeof(uint8_t) * n)) */ __pyx_t_11 = 0; __pyx_t_8 = __pyx_v_idx; __pyx_v_v = (&(*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_11, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_8, __pyx_pybuffernd_values.diminfo[1].strides))); /* "pandas/src/generated.pyx":3433 * else: * v = &values[0, idx] * o = &out[0, j] # <<<<<<<<<<<<<< * memmove(o, v, (sizeof(uint8_t) * n)) * return */ __pyx_t_12 = 0; __pyx_t_13 = __pyx_v_j; __pyx_v_o = (&(*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_12, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_13, __pyx_pybuffernd_out.diminfo[1].strides))); /* "pandas/src/generated.pyx":3434 * v = &values[0, idx] * o = &out[0, j] * memmove(o, v, (sizeof(uint8_t) * n)) # <<<<<<<<<<<<<< * return * */ memmove(__pyx_v_o, __pyx_v_v, ((size_t)((sizeof(__pyx_t_5numpy_uint8_t)) * __pyx_v_n))); } __pyx_L7:; } /* "pandas/src/generated.pyx":3435 * o = &out[0, j] * memmove(o, v, (sizeof(uint8_t) * n)) * return # <<<<<<<<<<<<<< * * for j from 0 <= j < k: */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; goto __pyx_L4; } __pyx_L4:; /* "pandas/src/generated.pyx":3437 * return * * for j from 0 <= j < k: # <<<<<<<<<<<<<< * idx = indexer[j] * if idx == -1: */ __pyx_t_1 = __pyx_v_k; for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_1; __pyx_v_j++) { /* "pandas/src/generated.pyx":3438 * * for j from 0 <= j < k: * idx = indexer[j] # <<<<<<<<<<<<<< * if idx == -1: * for i from 0 <= i < n: */ __pyx_t_14 = __pyx_v_j; __pyx_v_idx = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_indexer.diminfo[0].strides)); /* "pandas/src/generated.pyx":3439 * for j from 0 <= j < k: * idx = indexer[j] * if idx == -1: # <<<<<<<<<<<<<< * for i from 0 <= i < n: * out[i, j] = fv */ __pyx_t_2 = ((__pyx_v_idx == -1) != 0); if (__pyx_t_2) { /* "pandas/src/generated.pyx":3440 * idx = indexer[j] * if idx == -1: * for i from 0 <= i < n: # <<<<<<<<<<<<<< * out[i, j] = fv * else: */ __pyx_t_15 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_15; __pyx_v_i++) { /* "pandas/src/generated.pyx":3441 * if idx == -1: * for i from 0 <= i < n: * out[i, j] = fv # <<<<<<<<<<<<<< * else: * for i from 0 <= i < n: */ __pyx_t_16 = __pyx_v_i; __pyx_t_17 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_17, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_fv; } goto __pyx_L12; } /*else*/ { /* "pandas/src/generated.pyx":3443 * out[i, j] = fv * else: * for i from 0 <= i < n: # <<<<<<<<<<<<<< * out[i, j] = values[i, idx] * */ __pyx_t_15 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_15; __pyx_v_i++) { /* "pandas/src/generated.pyx":3444 * else: * for i from 0 <= i < n: * out[i, j] = values[i, idx] # <<<<<<<<<<<<<< * * @cython.wraparound(False) */ __pyx_t_18 = __pyx_v_i; __pyx_t_19 = __pyx_v_idx; __pyx_t_20 = __pyx_v_i; __pyx_t_21 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_21, __pyx_pybuffernd_out.diminfo[1].strides) = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_19, __pyx_pybuffernd_values.diminfo[1].strides)); } } __pyx_L12:; } __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.take_2d_axis1_bool_bool", __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_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_301take_2d_axis1_bool_object(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_301take_2d_axis1_bool_object = {__Pyx_NAMESTR("take_2d_axis1_bool_object"), (PyCFunction)__pyx_pw_6pandas_5algos_301take_2d_axis1_bool_object, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_301take_2d_axis1_bool_object(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_values = 0; PyArrayObject *__pyx_v_indexer = 0; PyArrayObject *__pyx_v_out = 0; PyObject *__pyx_v_fill_value = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("take_2d_axis1_bool_object (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__values,&__pyx_n_s__indexer,&__pyx_n_s__out,&__pyx_n_s__fill_value,0}; PyObject* values[4] = {0,0,0,0}; values[3] = __pyx_k_147; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__values)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__indexer)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_2d_axis1_bool_object", 0, 3, 4, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3448; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__out)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_2d_axis1_bool_object", 0, 3, 4, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3448; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__fill_value); if (value) { values[3] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "take_2d_axis1_bool_object") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3448; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_values = ((PyArrayObject *)values[0]); __pyx_v_indexer = ((PyArrayObject *)values[1]); __pyx_v_out = ((PyArrayObject *)values[2]); __pyx_v_fill_value = values[3]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("take_2d_axis1_bool_object", 0, 3, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3448; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.take_2d_axis1_bool_object", __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_filename = __pyx_f[2]; __pyx_lineno = 3448; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_indexer), __pyx_ptype_5numpy_ndarray, 1, "indexer", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3449; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_5numpy_ndarray, 1, "out", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3450; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_300take_2d_axis1_bool_object(__pyx_self, __pyx_v_values, __pyx_v_indexer, __pyx_v_out, __pyx_v_fill_value); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":3448 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_axis1_bool_object(ndarray[uint8_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[object, ndim=2] out, */ static PyObject *__pyx_pf_6pandas_5algos_300take_2d_axis1_bool_object(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_k; Py_ssize_t __pyx_v_n; Py_ssize_t __pyx_v_idx; PyObject *__pyx_v_fv = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_indexer; __Pyx_Buffer __pyx_pybuffer_indexer; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_values; __Pyx_Buffer __pyx_pybuffer_values; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; int __pyx_t_2; int __pyx_t_3; int __pyx_t_4; Py_ssize_t __pyx_t_5; Py_ssize_t __pyx_t_6; Py_ssize_t __pyx_t_7; Py_ssize_t __pyx_t_8; PyObject **__pyx_t_9; Py_ssize_t __pyx_t_10; Py_ssize_t __pyx_t_11; PyObject *__pyx_t_12 = NULL; Py_ssize_t __pyx_t_13; Py_ssize_t __pyx_t_14; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("take_2d_axis1_bool_object", 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_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; { __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_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3448; __pyx_clineno = __LINE__; goto __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_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1]; { __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_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3448; __pyx_clineno = __LINE__; goto __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_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_v_out, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3448; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; __pyx_pybuffernd_out.diminfo[1].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_out.diminfo[1].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[1]; /* "pandas/src/generated.pyx":3456 * object fv * * n = len(values) # <<<<<<<<<<<<<< * k = len(indexer) * */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3456; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/src/generated.pyx":3457 * * n = len(values) * k = len(indexer) # <<<<<<<<<<<<<< * * if n == 0 or k == 0: */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_indexer)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3457; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_k = __pyx_t_1; /* "pandas/src/generated.pyx":3459 * k = len(indexer) * * if n == 0 or k == 0: # <<<<<<<<<<<<<< * return * */ __pyx_t_2 = ((__pyx_v_n == 0) != 0); if (!__pyx_t_2) { __pyx_t_3 = ((__pyx_v_k == 0) != 0); __pyx_t_4 = __pyx_t_3; } else { __pyx_t_4 = __pyx_t_2; } if (__pyx_t_4) { /* "pandas/src/generated.pyx":3460 * * if n == 0 or k == 0: * return # <<<<<<<<<<<<<< * * fv = fill_value */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; goto __pyx_L3; } __pyx_L3:; /* "pandas/src/generated.pyx":3462 * return * * fv = fill_value # <<<<<<<<<<<<<< * * IF False: */ __Pyx_INCREF(__pyx_v_fill_value); __pyx_v_fv = __pyx_v_fill_value; /* "pandas/src/generated.pyx":3483 * return * * for j from 0 <= j < k: # <<<<<<<<<<<<<< * idx = indexer[j] * if idx == -1: */ __pyx_t_1 = __pyx_v_k; for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_1; __pyx_v_j++) { /* "pandas/src/generated.pyx":3484 * * for j from 0 <= j < k: * idx = indexer[j] # <<<<<<<<<<<<<< * if idx == -1: * for i from 0 <= i < n: */ __pyx_t_5 = __pyx_v_j; __pyx_v_idx = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_5, __pyx_pybuffernd_indexer.diminfo[0].strides)); /* "pandas/src/generated.pyx":3485 * for j from 0 <= j < k: * idx = indexer[j] * if idx == -1: # <<<<<<<<<<<<<< * for i from 0 <= i < n: * out[i, j] = fv */ __pyx_t_4 = ((__pyx_v_idx == -1) != 0); if (__pyx_t_4) { /* "pandas/src/generated.pyx":3486 * idx = indexer[j] * if idx == -1: * for i from 0 <= i < n: # <<<<<<<<<<<<<< * out[i, j] = fv * else: */ __pyx_t_6 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_6; __pyx_v_i++) { /* "pandas/src/generated.pyx":3487 * if idx == -1: * for i from 0 <= i < n: * out[i, j] = fv # <<<<<<<<<<<<<< * else: * for i from 0 <= i < n: */ __pyx_t_7 = __pyx_v_i; __pyx_t_8 = __pyx_v_j; __pyx_t_9 = __Pyx_BufPtrStrided2d(PyObject **, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_7, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_8, __pyx_pybuffernd_out.diminfo[1].strides); __Pyx_GOTREF(*__pyx_t_9); __Pyx_INCREF(__pyx_v_fv); __Pyx_DECREF(*__pyx_t_9); *__pyx_t_9 = __pyx_v_fv; __Pyx_GIVEREF(*__pyx_t_9); } goto __pyx_L6; } /*else*/ { /* "pandas/src/generated.pyx":3489 * out[i, j] = fv * else: * for i from 0 <= i < n: # <<<<<<<<<<<<<< * out[i, j] = True if values[i, idx] > 0 else False * */ __pyx_t_6 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_6; __pyx_v_i++) { /* "pandas/src/generated.pyx":3490 * else: * for i from 0 <= i < n: * out[i, j] = True if values[i, idx] > 0 else False # <<<<<<<<<<<<<< * * @cython.wraparound(False) */ __pyx_t_10 = __pyx_v_i; __pyx_t_11 = __pyx_v_idx; if ((((*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_10, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_11, __pyx_pybuffernd_values.diminfo[1].strides)) > 0) != 0)) { __pyx_t_4 = 1; } else { __pyx_t_4 = 0; } __pyx_t_12 = __Pyx_PyBool_FromLong(__pyx_t_4); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3490; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __pyx_t_13 = __pyx_v_i; __pyx_t_14 = __pyx_v_j; __pyx_t_9 = __Pyx_BufPtrStrided2d(PyObject **, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_14, __pyx_pybuffernd_out.diminfo[1].strides); __Pyx_GOTREF(*__pyx_t_9); __Pyx_INCREF(__pyx_t_12); __Pyx_DECREF(*__pyx_t_9); *__pyx_t_9 = __pyx_t_12; __Pyx_GIVEREF(*__pyx_t_9); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; } } __pyx_L6:; } __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_12); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.take_2d_axis1_bool_object", __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_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF(__pyx_v_fv); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_303take_2d_axis1_int8_int8(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_303take_2d_axis1_int8_int8 = {__Pyx_NAMESTR("take_2d_axis1_int8_int8"), (PyCFunction)__pyx_pw_6pandas_5algos_303take_2d_axis1_int8_int8, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_303take_2d_axis1_int8_int8(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_values = 0; PyArrayObject *__pyx_v_indexer = 0; PyArrayObject *__pyx_v_out = 0; PyObject *__pyx_v_fill_value = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("take_2d_axis1_int8_int8 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__values,&__pyx_n_s__indexer,&__pyx_n_s__out,&__pyx_n_s__fill_value,0}; PyObject* values[4] = {0,0,0,0}; values[3] = __pyx_k_148; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__values)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__indexer)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_2d_axis1_int8_int8", 0, 3, 4, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3494; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__out)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_2d_axis1_int8_int8", 0, 3, 4, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3494; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__fill_value); if (value) { values[3] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "take_2d_axis1_int8_int8") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3494; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_values = ((PyArrayObject *)values[0]); __pyx_v_indexer = ((PyArrayObject *)values[1]); __pyx_v_out = ((PyArrayObject *)values[2]); __pyx_v_fill_value = values[3]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("take_2d_axis1_int8_int8", 0, 3, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3494; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.take_2d_axis1_int8_int8", __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_filename = __pyx_f[2]; __pyx_lineno = 3494; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_indexer), __pyx_ptype_5numpy_ndarray, 1, "indexer", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3495; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_5numpy_ndarray, 1, "out", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3496; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_302take_2d_axis1_int8_int8(__pyx_self, __pyx_v_values, __pyx_v_indexer, __pyx_v_out, __pyx_v_fill_value); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":3494 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_axis1_int8_int8(ndarray[int8_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[int8_t, ndim=2] out, */ static PyObject *__pyx_pf_6pandas_5algos_302take_2d_axis1_int8_int8(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_k; Py_ssize_t __pyx_v_n; Py_ssize_t __pyx_v_idx; __pyx_t_5numpy_int8_t __pyx_v_fv; __pyx_t_5numpy_int8_t *__pyx_v_v; __pyx_t_5numpy_int8_t *__pyx_v_o; __Pyx_LocalBuf_ND __pyx_pybuffernd_indexer; __Pyx_Buffer __pyx_pybuffer_indexer; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_values; __Pyx_Buffer __pyx_pybuffer_values; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; int __pyx_t_2; int __pyx_t_3; int __pyx_t_4; __pyx_t_5numpy_int8_t __pyx_t_5; int __pyx_t_6; Py_ssize_t __pyx_t_7; Py_ssize_t __pyx_t_8; Py_ssize_t __pyx_t_9; Py_ssize_t __pyx_t_10; long __pyx_t_11; long __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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("take_2d_axis1_int8_int8", 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_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; { __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_int8_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3494; __pyx_clineno = __LINE__; goto __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_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1]; { __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_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3494; __pyx_clineno = __LINE__; goto __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_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_v_out, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int8_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3494; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; __pyx_pybuffernd_out.diminfo[1].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_out.diminfo[1].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[1]; /* "pandas/src/generated.pyx":3502 * int8_t fv * * n = len(values) # <<<<<<<<<<<<<< * k = len(indexer) * */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3502; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/src/generated.pyx":3503 * * n = len(values) * k = len(indexer) # <<<<<<<<<<<<<< * * if n == 0 or k == 0: */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_indexer)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3503; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_k = __pyx_t_1; /* "pandas/src/generated.pyx":3505 * k = len(indexer) * * if n == 0 or k == 0: # <<<<<<<<<<<<<< * return * */ __pyx_t_2 = ((__pyx_v_n == 0) != 0); if (!__pyx_t_2) { __pyx_t_3 = ((__pyx_v_k == 0) != 0); __pyx_t_4 = __pyx_t_3; } else { __pyx_t_4 = __pyx_t_2; } if (__pyx_t_4) { /* "pandas/src/generated.pyx":3506 * * if n == 0 or k == 0: * return # <<<<<<<<<<<<<< * * fv = fill_value */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; goto __pyx_L3; } __pyx_L3:; /* "pandas/src/generated.pyx":3508 * return * * fv = fill_value # <<<<<<<<<<<<<< * * IF True: */ __pyx_t_5 = __Pyx_PyInt_from_py_npy_int8(__pyx_v_fill_value); if (unlikely((__pyx_t_5 == (npy_int8)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3508; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_fv = __pyx_t_5; /* "pandas/src/generated.pyx":3514 * int8_t *v, *o * * if (values.strides[0] == out.strides[0] and # <<<<<<<<<<<<<< * values.strides[0] == sizeof(int8_t) and * sizeof(int8_t) * n >= 256): */ __pyx_t_4 = (((__pyx_v_values->strides[0]) == (__pyx_v_out->strides[0])) != 0); if (__pyx_t_4) { /* "pandas/src/generated.pyx":3515 * * if (values.strides[0] == out.strides[0] and * values.strides[0] == sizeof(int8_t) and # <<<<<<<<<<<<<< * sizeof(int8_t) * n >= 256): * */ __pyx_t_2 = (((__pyx_v_values->strides[0]) == (sizeof(__pyx_t_5numpy_int8_t))) != 0); if (__pyx_t_2) { /* "pandas/src/generated.pyx":3516 * if (values.strides[0] == out.strides[0] and * values.strides[0] == sizeof(int8_t) and * sizeof(int8_t) * n >= 256): # <<<<<<<<<<<<<< * * for j from 0 <= j < k: */ __pyx_t_3 = ((((sizeof(__pyx_t_5numpy_int8_t)) * __pyx_v_n) >= 256) != 0); __pyx_t_6 = __pyx_t_3; } else { __pyx_t_6 = __pyx_t_2; } __pyx_t_2 = __pyx_t_6; } else { __pyx_t_2 = __pyx_t_4; } if (__pyx_t_2) { /* "pandas/src/generated.pyx":3518 * sizeof(int8_t) * n >= 256): * * for j from 0 <= j < k: # <<<<<<<<<<<<<< * idx = indexer[j] * if idx == -1: */ __pyx_t_1 = __pyx_v_k; for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_1; __pyx_v_j++) { /* "pandas/src/generated.pyx":3519 * * for j from 0 <= j < k: * idx = indexer[j] # <<<<<<<<<<<<<< * if idx == -1: * for i from 0 <= i < n: */ __pyx_t_7 = __pyx_v_j; __pyx_v_idx = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_7, __pyx_pybuffernd_indexer.diminfo[0].strides)); /* "pandas/src/generated.pyx":3520 * for j from 0 <= j < k: * idx = indexer[j] * if idx == -1: # <<<<<<<<<<<<<< * for i from 0 <= i < n: * out[i, j] = fv */ __pyx_t_2 = ((__pyx_v_idx == -1) != 0); if (__pyx_t_2) { /* "pandas/src/generated.pyx":3521 * idx = indexer[j] * if idx == -1: * for i from 0 <= i < n: # <<<<<<<<<<<<<< * out[i, j] = fv * else: */ __pyx_t_8 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_8; __pyx_v_i++) { /* "pandas/src/generated.pyx":3522 * if idx == -1: * for i from 0 <= i < n: * out[i, j] = fv # <<<<<<<<<<<<<< * else: * v = &values[0, idx] */ __pyx_t_9 = __pyx_v_i; __pyx_t_10 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int8_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_9, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_10, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_fv; } goto __pyx_L7; } /*else*/ { /* "pandas/src/generated.pyx":3524 * out[i, j] = fv * else: * v = &values[0, idx] # <<<<<<<<<<<<<< * o = &out[0, j] * memmove(o, v, (sizeof(int8_t) * n)) */ __pyx_t_11 = 0; __pyx_t_8 = __pyx_v_idx; __pyx_v_v = (&(*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int8_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_11, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_8, __pyx_pybuffernd_values.diminfo[1].strides))); /* "pandas/src/generated.pyx":3525 * else: * v = &values[0, idx] * o = &out[0, j] # <<<<<<<<<<<<<< * memmove(o, v, (sizeof(int8_t) * n)) * return */ __pyx_t_12 = 0; __pyx_t_13 = __pyx_v_j; __pyx_v_o = (&(*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int8_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_12, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_13, __pyx_pybuffernd_out.diminfo[1].strides))); /* "pandas/src/generated.pyx":3526 * v = &values[0, idx] * o = &out[0, j] * memmove(o, v, (sizeof(int8_t) * n)) # <<<<<<<<<<<<<< * return * */ memmove(__pyx_v_o, __pyx_v_v, ((size_t)((sizeof(__pyx_t_5numpy_int8_t)) * __pyx_v_n))); } __pyx_L7:; } /* "pandas/src/generated.pyx":3527 * o = &out[0, j] * memmove(o, v, (sizeof(int8_t) * n)) * return # <<<<<<<<<<<<<< * * for j from 0 <= j < k: */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; goto __pyx_L4; } __pyx_L4:; /* "pandas/src/generated.pyx":3529 * return * * for j from 0 <= j < k: # <<<<<<<<<<<<<< * idx = indexer[j] * if idx == -1: */ __pyx_t_1 = __pyx_v_k; for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_1; __pyx_v_j++) { /* "pandas/src/generated.pyx":3530 * * for j from 0 <= j < k: * idx = indexer[j] # <<<<<<<<<<<<<< * if idx == -1: * for i from 0 <= i < n: */ __pyx_t_14 = __pyx_v_j; __pyx_v_idx = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_indexer.diminfo[0].strides)); /* "pandas/src/generated.pyx":3531 * for j from 0 <= j < k: * idx = indexer[j] * if idx == -1: # <<<<<<<<<<<<<< * for i from 0 <= i < n: * out[i, j] = fv */ __pyx_t_2 = ((__pyx_v_idx == -1) != 0); if (__pyx_t_2) { /* "pandas/src/generated.pyx":3532 * idx = indexer[j] * if idx == -1: * for i from 0 <= i < n: # <<<<<<<<<<<<<< * out[i, j] = fv * else: */ __pyx_t_15 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_15; __pyx_v_i++) { /* "pandas/src/generated.pyx":3533 * if idx == -1: * for i from 0 <= i < n: * out[i, j] = fv # <<<<<<<<<<<<<< * else: * for i from 0 <= i < n: */ __pyx_t_16 = __pyx_v_i; __pyx_t_17 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int8_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_17, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_fv; } goto __pyx_L12; } /*else*/ { /* "pandas/src/generated.pyx":3535 * out[i, j] = fv * else: * for i from 0 <= i < n: # <<<<<<<<<<<<<< * out[i, j] = values[i, idx] * */ __pyx_t_15 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_15; __pyx_v_i++) { /* "pandas/src/generated.pyx":3536 * else: * for i from 0 <= i < n: * out[i, j] = values[i, idx] # <<<<<<<<<<<<<< * * @cython.wraparound(False) */ __pyx_t_18 = __pyx_v_i; __pyx_t_19 = __pyx_v_idx; __pyx_t_20 = __pyx_v_i; __pyx_t_21 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int8_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_21, __pyx_pybuffernd_out.diminfo[1].strides) = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int8_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_19, __pyx_pybuffernd_values.diminfo[1].strides)); } } __pyx_L12:; } __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.take_2d_axis1_int8_int8", __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_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_305take_2d_axis1_int8_int32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_305take_2d_axis1_int8_int32 = {__Pyx_NAMESTR("take_2d_axis1_int8_int32"), (PyCFunction)__pyx_pw_6pandas_5algos_305take_2d_axis1_int8_int32, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_305take_2d_axis1_int8_int32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_values = 0; PyArrayObject *__pyx_v_indexer = 0; PyArrayObject *__pyx_v_out = 0; PyObject *__pyx_v_fill_value = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("take_2d_axis1_int8_int32 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__values,&__pyx_n_s__indexer,&__pyx_n_s__out,&__pyx_n_s__fill_value,0}; PyObject* values[4] = {0,0,0,0}; values[3] = __pyx_k_149; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__values)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__indexer)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_2d_axis1_int8_int32", 0, 3, 4, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3540; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__out)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_2d_axis1_int8_int32", 0, 3, 4, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3540; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__fill_value); if (value) { values[3] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "take_2d_axis1_int8_int32") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3540; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_values = ((PyArrayObject *)values[0]); __pyx_v_indexer = ((PyArrayObject *)values[1]); __pyx_v_out = ((PyArrayObject *)values[2]); __pyx_v_fill_value = values[3]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("take_2d_axis1_int8_int32", 0, 3, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3540; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.take_2d_axis1_int8_int32", __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_filename = __pyx_f[2]; __pyx_lineno = 3540; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_indexer), __pyx_ptype_5numpy_ndarray, 1, "indexer", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3541; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_5numpy_ndarray, 1, "out", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3542; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_304take_2d_axis1_int8_int32(__pyx_self, __pyx_v_values, __pyx_v_indexer, __pyx_v_out, __pyx_v_fill_value); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":3540 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_axis1_int8_int32(ndarray[int8_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[int32_t, ndim=2] out, */ static PyObject *__pyx_pf_6pandas_5algos_304take_2d_axis1_int8_int32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_k; Py_ssize_t __pyx_v_n; Py_ssize_t __pyx_v_idx; __pyx_t_5numpy_int32_t __pyx_v_fv; __Pyx_LocalBuf_ND __pyx_pybuffernd_indexer; __Pyx_Buffer __pyx_pybuffer_indexer; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_values; __Pyx_Buffer __pyx_pybuffer_values; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; int __pyx_t_2; int __pyx_t_3; int __pyx_t_4; __pyx_t_5numpy_int32_t __pyx_t_5; Py_ssize_t __pyx_t_6; Py_ssize_t __pyx_t_7; Py_ssize_t __pyx_t_8; Py_ssize_t __pyx_t_9; Py_ssize_t __pyx_t_10; Py_ssize_t __pyx_t_11; Py_ssize_t __pyx_t_12; Py_ssize_t __pyx_t_13; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("take_2d_axis1_int8_int32", 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_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; { __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_int8_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3540; __pyx_clineno = __LINE__; goto __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_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1]; { __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_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3540; __pyx_clineno = __LINE__; goto __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_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_v_out, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3540; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; __pyx_pybuffernd_out.diminfo[1].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_out.diminfo[1].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[1]; /* "pandas/src/generated.pyx":3548 * int32_t fv * * n = len(values) # <<<<<<<<<<<<<< * k = len(indexer) * */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3548; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/src/generated.pyx":3549 * * n = len(values) * k = len(indexer) # <<<<<<<<<<<<<< * * if n == 0 or k == 0: */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_indexer)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3549; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_k = __pyx_t_1; /* "pandas/src/generated.pyx":3551 * k = len(indexer) * * if n == 0 or k == 0: # <<<<<<<<<<<<<< * return * */ __pyx_t_2 = ((__pyx_v_n == 0) != 0); if (!__pyx_t_2) { __pyx_t_3 = ((__pyx_v_k == 0) != 0); __pyx_t_4 = __pyx_t_3; } else { __pyx_t_4 = __pyx_t_2; } if (__pyx_t_4) { /* "pandas/src/generated.pyx":3552 * * if n == 0 or k == 0: * return # <<<<<<<<<<<<<< * * fv = fill_value */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; goto __pyx_L3; } __pyx_L3:; /* "pandas/src/generated.pyx":3554 * return * * fv = fill_value # <<<<<<<<<<<<<< * * IF False: */ __pyx_t_5 = __Pyx_PyInt_from_py_npy_int32(__pyx_v_fill_value); if (unlikely((__pyx_t_5 == (npy_int32)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3554; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_fv = __pyx_t_5; /* "pandas/src/generated.pyx":3575 * return * * for j from 0 <= j < k: # <<<<<<<<<<<<<< * idx = indexer[j] * if idx == -1: */ __pyx_t_1 = __pyx_v_k; for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_1; __pyx_v_j++) { /* "pandas/src/generated.pyx":3576 * * for j from 0 <= j < k: * idx = indexer[j] # <<<<<<<<<<<<<< * if idx == -1: * for i from 0 <= i < n: */ __pyx_t_6 = __pyx_v_j; __pyx_v_idx = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_6, __pyx_pybuffernd_indexer.diminfo[0].strides)); /* "pandas/src/generated.pyx":3577 * for j from 0 <= j < k: * idx = indexer[j] * if idx == -1: # <<<<<<<<<<<<<< * for i from 0 <= i < n: * out[i, j] = fv */ __pyx_t_4 = ((__pyx_v_idx == -1) != 0); if (__pyx_t_4) { /* "pandas/src/generated.pyx":3578 * idx = indexer[j] * if idx == -1: * for i from 0 <= i < n: # <<<<<<<<<<<<<< * out[i, j] = fv * else: */ __pyx_t_7 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_7; __pyx_v_i++) { /* "pandas/src/generated.pyx":3579 * if idx == -1: * for i from 0 <= i < n: * out[i, j] = fv # <<<<<<<<<<<<<< * else: * for i from 0 <= i < n: */ __pyx_t_8 = __pyx_v_i; __pyx_t_9 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_8, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_9, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_fv; } goto __pyx_L6; } /*else*/ { /* "pandas/src/generated.pyx":3581 * out[i, j] = fv * else: * for i from 0 <= i < n: # <<<<<<<<<<<<<< * out[i, j] = values[i, idx] * */ __pyx_t_7 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_7; __pyx_v_i++) { /* "pandas/src/generated.pyx":3582 * else: * for i from 0 <= i < n: * out[i, j] = values[i, idx] # <<<<<<<<<<<<<< * * @cython.wraparound(False) */ __pyx_t_10 = __pyx_v_i; __pyx_t_11 = __pyx_v_idx; __pyx_t_12 = __pyx_v_i; __pyx_t_13 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_12, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_13, __pyx_pybuffernd_out.diminfo[1].strides) = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int8_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_10, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_11, __pyx_pybuffernd_values.diminfo[1].strides)); } } __pyx_L6:; } __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.take_2d_axis1_int8_int32", __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_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_307take_2d_axis1_int8_int64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_307take_2d_axis1_int8_int64 = {__Pyx_NAMESTR("take_2d_axis1_int8_int64"), (PyCFunction)__pyx_pw_6pandas_5algos_307take_2d_axis1_int8_int64, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_307take_2d_axis1_int8_int64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_values = 0; PyArrayObject *__pyx_v_indexer = 0; PyArrayObject *__pyx_v_out = 0; PyObject *__pyx_v_fill_value = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("take_2d_axis1_int8_int64 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__values,&__pyx_n_s__indexer,&__pyx_n_s__out,&__pyx_n_s__fill_value,0}; PyObject* values[4] = {0,0,0,0}; values[3] = __pyx_k_150; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__values)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__indexer)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_2d_axis1_int8_int64", 0, 3, 4, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3586; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__out)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_2d_axis1_int8_int64", 0, 3, 4, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3586; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__fill_value); if (value) { values[3] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "take_2d_axis1_int8_int64") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3586; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_values = ((PyArrayObject *)values[0]); __pyx_v_indexer = ((PyArrayObject *)values[1]); __pyx_v_out = ((PyArrayObject *)values[2]); __pyx_v_fill_value = values[3]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("take_2d_axis1_int8_int64", 0, 3, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3586; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.take_2d_axis1_int8_int64", __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_filename = __pyx_f[2]; __pyx_lineno = 3586; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_indexer), __pyx_ptype_5numpy_ndarray, 1, "indexer", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3587; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_5numpy_ndarray, 1, "out", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3588; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_306take_2d_axis1_int8_int64(__pyx_self, __pyx_v_values, __pyx_v_indexer, __pyx_v_out, __pyx_v_fill_value); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":3586 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_axis1_int8_int64(ndarray[int8_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[int64_t, ndim=2] out, */ static PyObject *__pyx_pf_6pandas_5algos_306take_2d_axis1_int8_int64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_k; Py_ssize_t __pyx_v_n; Py_ssize_t __pyx_v_idx; __pyx_t_5numpy_int64_t __pyx_v_fv; __Pyx_LocalBuf_ND __pyx_pybuffernd_indexer; __Pyx_Buffer __pyx_pybuffer_indexer; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_values; __Pyx_Buffer __pyx_pybuffer_values; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; int __pyx_t_2; int __pyx_t_3; int __pyx_t_4; __pyx_t_5numpy_int64_t __pyx_t_5; Py_ssize_t __pyx_t_6; Py_ssize_t __pyx_t_7; Py_ssize_t __pyx_t_8; Py_ssize_t __pyx_t_9; Py_ssize_t __pyx_t_10; Py_ssize_t __pyx_t_11; Py_ssize_t __pyx_t_12; Py_ssize_t __pyx_t_13; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("take_2d_axis1_int8_int64", 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_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; { __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_int8_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3586; __pyx_clineno = __LINE__; goto __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_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1]; { __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_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3586; __pyx_clineno = __LINE__; goto __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_BufFmt_StackElem __pyx_stack[1]; 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, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3586; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; __pyx_pybuffernd_out.diminfo[1].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_out.diminfo[1].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[1]; /* "pandas/src/generated.pyx":3594 * int64_t fv * * n = len(values) # <<<<<<<<<<<<<< * k = len(indexer) * */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3594; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/src/generated.pyx":3595 * * n = len(values) * k = len(indexer) # <<<<<<<<<<<<<< * * if n == 0 or k == 0: */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_indexer)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3595; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_k = __pyx_t_1; /* "pandas/src/generated.pyx":3597 * k = len(indexer) * * if n == 0 or k == 0: # <<<<<<<<<<<<<< * return * */ __pyx_t_2 = ((__pyx_v_n == 0) != 0); if (!__pyx_t_2) { __pyx_t_3 = ((__pyx_v_k == 0) != 0); __pyx_t_4 = __pyx_t_3; } else { __pyx_t_4 = __pyx_t_2; } if (__pyx_t_4) { /* "pandas/src/generated.pyx":3598 * * if n == 0 or k == 0: * return # <<<<<<<<<<<<<< * * fv = fill_value */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; goto __pyx_L3; } __pyx_L3:; /* "pandas/src/generated.pyx":3600 * return * * fv = fill_value # <<<<<<<<<<<<<< * * IF False: */ __pyx_t_5 = __Pyx_PyInt_from_py_npy_int64(__pyx_v_fill_value); if (unlikely((__pyx_t_5 == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3600; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_fv = __pyx_t_5; /* "pandas/src/generated.pyx":3621 * return * * for j from 0 <= j < k: # <<<<<<<<<<<<<< * idx = indexer[j] * if idx == -1: */ __pyx_t_1 = __pyx_v_k; for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_1; __pyx_v_j++) { /* "pandas/src/generated.pyx":3622 * * for j from 0 <= j < k: * idx = indexer[j] # <<<<<<<<<<<<<< * if idx == -1: * for i from 0 <= i < n: */ __pyx_t_6 = __pyx_v_j; __pyx_v_idx = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_6, __pyx_pybuffernd_indexer.diminfo[0].strides)); /* "pandas/src/generated.pyx":3623 * for j from 0 <= j < k: * idx = indexer[j] * if idx == -1: # <<<<<<<<<<<<<< * for i from 0 <= i < n: * out[i, j] = fv */ __pyx_t_4 = ((__pyx_v_idx == -1) != 0); if (__pyx_t_4) { /* "pandas/src/generated.pyx":3624 * idx = indexer[j] * if idx == -1: * for i from 0 <= i < n: # <<<<<<<<<<<<<< * out[i, j] = fv * else: */ __pyx_t_7 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_7; __pyx_v_i++) { /* "pandas/src/generated.pyx":3625 * if idx == -1: * for i from 0 <= i < n: * out[i, j] = fv # <<<<<<<<<<<<<< * else: * for i from 0 <= i < n: */ __pyx_t_8 = __pyx_v_i; __pyx_t_9 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_8, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_9, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_fv; } goto __pyx_L6; } /*else*/ { /* "pandas/src/generated.pyx":3627 * out[i, j] = fv * else: * for i from 0 <= i < n: # <<<<<<<<<<<<<< * out[i, j] = values[i, idx] * */ __pyx_t_7 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_7; __pyx_v_i++) { /* "pandas/src/generated.pyx":3628 * else: * for i from 0 <= i < n: * out[i, j] = values[i, idx] # <<<<<<<<<<<<<< * * @cython.wraparound(False) */ __pyx_t_10 = __pyx_v_i; __pyx_t_11 = __pyx_v_idx; __pyx_t_12 = __pyx_v_i; __pyx_t_13 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_12, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_13, __pyx_pybuffernd_out.diminfo[1].strides) = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int8_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_10, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_11, __pyx_pybuffernd_values.diminfo[1].strides)); } } __pyx_L6:; } __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.take_2d_axis1_int8_int64", __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_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_309take_2d_axis1_int8_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_309take_2d_axis1_int8_float64 = {__Pyx_NAMESTR("take_2d_axis1_int8_float64"), (PyCFunction)__pyx_pw_6pandas_5algos_309take_2d_axis1_int8_float64, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_309take_2d_axis1_int8_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_values = 0; PyArrayObject *__pyx_v_indexer = 0; PyArrayObject *__pyx_v_out = 0; PyObject *__pyx_v_fill_value = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("take_2d_axis1_int8_float64 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__values,&__pyx_n_s__indexer,&__pyx_n_s__out,&__pyx_n_s__fill_value,0}; PyObject* values[4] = {0,0,0,0}; values[3] = __pyx_k_151; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__values)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__indexer)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_2d_axis1_int8_float64", 0, 3, 4, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3632; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__out)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_2d_axis1_int8_float64", 0, 3, 4, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3632; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__fill_value); if (value) { values[3] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "take_2d_axis1_int8_float64") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3632; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_values = ((PyArrayObject *)values[0]); __pyx_v_indexer = ((PyArrayObject *)values[1]); __pyx_v_out = ((PyArrayObject *)values[2]); __pyx_v_fill_value = values[3]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("take_2d_axis1_int8_float64", 0, 3, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3632; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.take_2d_axis1_int8_float64", __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_filename = __pyx_f[2]; __pyx_lineno = 3632; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_indexer), __pyx_ptype_5numpy_ndarray, 1, "indexer", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3633; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_5numpy_ndarray, 1, "out", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3634; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_308take_2d_axis1_int8_float64(__pyx_self, __pyx_v_values, __pyx_v_indexer, __pyx_v_out, __pyx_v_fill_value); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":3632 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_axis1_int8_float64(ndarray[int8_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[float64_t, ndim=2] out, */ static PyObject *__pyx_pf_6pandas_5algos_308take_2d_axis1_int8_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_k; Py_ssize_t __pyx_v_n; Py_ssize_t __pyx_v_idx; __pyx_t_5numpy_float64_t __pyx_v_fv; __Pyx_LocalBuf_ND __pyx_pybuffernd_indexer; __Pyx_Buffer __pyx_pybuffer_indexer; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_values; __Pyx_Buffer __pyx_pybuffer_values; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; int __pyx_t_2; int __pyx_t_3; int __pyx_t_4; __pyx_t_5numpy_float64_t __pyx_t_5; Py_ssize_t __pyx_t_6; Py_ssize_t __pyx_t_7; Py_ssize_t __pyx_t_8; Py_ssize_t __pyx_t_9; Py_ssize_t __pyx_t_10; Py_ssize_t __pyx_t_11; Py_ssize_t __pyx_t_12; Py_ssize_t __pyx_t_13; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("take_2d_axis1_int8_float64", 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_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; { __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_int8_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3632; __pyx_clineno = __LINE__; goto __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_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1]; { __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_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3632; __pyx_clineno = __LINE__; goto __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_BufFmt_StackElem __pyx_stack[1]; 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, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3632; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; __pyx_pybuffernd_out.diminfo[1].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_out.diminfo[1].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[1]; /* "pandas/src/generated.pyx":3640 * float64_t fv * * n = len(values) # <<<<<<<<<<<<<< * k = len(indexer) * */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3640; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/src/generated.pyx":3641 * * n = len(values) * k = len(indexer) # <<<<<<<<<<<<<< * * if n == 0 or k == 0: */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_indexer)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3641; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_k = __pyx_t_1; /* "pandas/src/generated.pyx":3643 * k = len(indexer) * * if n == 0 or k == 0: # <<<<<<<<<<<<<< * return * */ __pyx_t_2 = ((__pyx_v_n == 0) != 0); if (!__pyx_t_2) { __pyx_t_3 = ((__pyx_v_k == 0) != 0); __pyx_t_4 = __pyx_t_3; } else { __pyx_t_4 = __pyx_t_2; } if (__pyx_t_4) { /* "pandas/src/generated.pyx":3644 * * if n == 0 or k == 0: * return # <<<<<<<<<<<<<< * * fv = fill_value */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; goto __pyx_L3; } __pyx_L3:; /* "pandas/src/generated.pyx":3646 * return * * fv = fill_value # <<<<<<<<<<<<<< * * IF False: */ __pyx_t_5 = __pyx_PyFloat_AsDouble(__pyx_v_fill_value); if (unlikely((__pyx_t_5 == (npy_float64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3646; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_fv = __pyx_t_5; /* "pandas/src/generated.pyx":3667 * return * * for j from 0 <= j < k: # <<<<<<<<<<<<<< * idx = indexer[j] * if idx == -1: */ __pyx_t_1 = __pyx_v_k; for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_1; __pyx_v_j++) { /* "pandas/src/generated.pyx":3668 * * for j from 0 <= j < k: * idx = indexer[j] # <<<<<<<<<<<<<< * if idx == -1: * for i from 0 <= i < n: */ __pyx_t_6 = __pyx_v_j; __pyx_v_idx = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_6, __pyx_pybuffernd_indexer.diminfo[0].strides)); /* "pandas/src/generated.pyx":3669 * for j from 0 <= j < k: * idx = indexer[j] * if idx == -1: # <<<<<<<<<<<<<< * for i from 0 <= i < n: * out[i, j] = fv */ __pyx_t_4 = ((__pyx_v_idx == -1) != 0); if (__pyx_t_4) { /* "pandas/src/generated.pyx":3670 * idx = indexer[j] * if idx == -1: * for i from 0 <= i < n: # <<<<<<<<<<<<<< * out[i, j] = fv * else: */ __pyx_t_7 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_7; __pyx_v_i++) { /* "pandas/src/generated.pyx":3671 * if idx == -1: * for i from 0 <= i < n: * out[i, j] = fv # <<<<<<<<<<<<<< * else: * for i from 0 <= i < n: */ __pyx_t_8 = __pyx_v_i; __pyx_t_9 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_8, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_9, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_fv; } goto __pyx_L6; } /*else*/ { /* "pandas/src/generated.pyx":3673 * out[i, j] = fv * else: * for i from 0 <= i < n: # <<<<<<<<<<<<<< * out[i, j] = values[i, idx] * */ __pyx_t_7 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_7; __pyx_v_i++) { /* "pandas/src/generated.pyx":3674 * else: * for i from 0 <= i < n: * out[i, j] = values[i, idx] # <<<<<<<<<<<<<< * * @cython.wraparound(False) */ __pyx_t_10 = __pyx_v_i; __pyx_t_11 = __pyx_v_idx; __pyx_t_12 = __pyx_v_i; __pyx_t_13 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_12, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_13, __pyx_pybuffernd_out.diminfo[1].strides) = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int8_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_10, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_11, __pyx_pybuffernd_values.diminfo[1].strides)); } } __pyx_L6:; } __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.take_2d_axis1_int8_float64", __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_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_311take_2d_axis1_int16_int16(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_311take_2d_axis1_int16_int16 = {__Pyx_NAMESTR("take_2d_axis1_int16_int16"), (PyCFunction)__pyx_pw_6pandas_5algos_311take_2d_axis1_int16_int16, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_311take_2d_axis1_int16_int16(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_values = 0; PyArrayObject *__pyx_v_indexer = 0; PyArrayObject *__pyx_v_out = 0; PyObject *__pyx_v_fill_value = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("take_2d_axis1_int16_int16 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__values,&__pyx_n_s__indexer,&__pyx_n_s__out,&__pyx_n_s__fill_value,0}; PyObject* values[4] = {0,0,0,0}; values[3] = __pyx_k_152; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__values)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__indexer)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_2d_axis1_int16_int16", 0, 3, 4, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3678; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__out)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_2d_axis1_int16_int16", 0, 3, 4, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3678; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__fill_value); if (value) { values[3] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "take_2d_axis1_int16_int16") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3678; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_values = ((PyArrayObject *)values[0]); __pyx_v_indexer = ((PyArrayObject *)values[1]); __pyx_v_out = ((PyArrayObject *)values[2]); __pyx_v_fill_value = values[3]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("take_2d_axis1_int16_int16", 0, 3, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3678; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.take_2d_axis1_int16_int16", __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_filename = __pyx_f[2]; __pyx_lineno = 3678; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_indexer), __pyx_ptype_5numpy_ndarray, 1, "indexer", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3679; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_5numpy_ndarray, 1, "out", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3680; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_310take_2d_axis1_int16_int16(__pyx_self, __pyx_v_values, __pyx_v_indexer, __pyx_v_out, __pyx_v_fill_value); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":3678 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_axis1_int16_int16(ndarray[int16_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[int16_t, ndim=2] out, */ static PyObject *__pyx_pf_6pandas_5algos_310take_2d_axis1_int16_int16(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_k; Py_ssize_t __pyx_v_n; Py_ssize_t __pyx_v_idx; __pyx_t_5numpy_int16_t __pyx_v_fv; __pyx_t_5numpy_int16_t *__pyx_v_v; __pyx_t_5numpy_int16_t *__pyx_v_o; __Pyx_LocalBuf_ND __pyx_pybuffernd_indexer; __Pyx_Buffer __pyx_pybuffer_indexer; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_values; __Pyx_Buffer __pyx_pybuffer_values; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; int __pyx_t_2; int __pyx_t_3; int __pyx_t_4; __pyx_t_5numpy_int16_t __pyx_t_5; int __pyx_t_6; Py_ssize_t __pyx_t_7; Py_ssize_t __pyx_t_8; Py_ssize_t __pyx_t_9; Py_ssize_t __pyx_t_10; long __pyx_t_11; long __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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("take_2d_axis1_int16_int16", 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_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; { __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_int16_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3678; __pyx_clineno = __LINE__; goto __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_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1]; { __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_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3678; __pyx_clineno = __LINE__; goto __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_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_v_out, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int16_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3678; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; __pyx_pybuffernd_out.diminfo[1].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_out.diminfo[1].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[1]; /* "pandas/src/generated.pyx":3686 * int16_t fv * * n = len(values) # <<<<<<<<<<<<<< * k = len(indexer) * */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3686; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/src/generated.pyx":3687 * * n = len(values) * k = len(indexer) # <<<<<<<<<<<<<< * * if n == 0 or k == 0: */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_indexer)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3687; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_k = __pyx_t_1; /* "pandas/src/generated.pyx":3689 * k = len(indexer) * * if n == 0 or k == 0: # <<<<<<<<<<<<<< * return * */ __pyx_t_2 = ((__pyx_v_n == 0) != 0); if (!__pyx_t_2) { __pyx_t_3 = ((__pyx_v_k == 0) != 0); __pyx_t_4 = __pyx_t_3; } else { __pyx_t_4 = __pyx_t_2; } if (__pyx_t_4) { /* "pandas/src/generated.pyx":3690 * * if n == 0 or k == 0: * return # <<<<<<<<<<<<<< * * fv = fill_value */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; goto __pyx_L3; } __pyx_L3:; /* "pandas/src/generated.pyx":3692 * return * * fv = fill_value # <<<<<<<<<<<<<< * * IF True: */ __pyx_t_5 = __Pyx_PyInt_from_py_npy_int16(__pyx_v_fill_value); if (unlikely((__pyx_t_5 == (npy_int16)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3692; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_fv = __pyx_t_5; /* "pandas/src/generated.pyx":3698 * int16_t *v, *o * * if (values.strides[0] == out.strides[0] and # <<<<<<<<<<<<<< * values.strides[0] == sizeof(int16_t) and * sizeof(int16_t) * n >= 256): */ __pyx_t_4 = (((__pyx_v_values->strides[0]) == (__pyx_v_out->strides[0])) != 0); if (__pyx_t_4) { /* "pandas/src/generated.pyx":3699 * * if (values.strides[0] == out.strides[0] and * values.strides[0] == sizeof(int16_t) and # <<<<<<<<<<<<<< * sizeof(int16_t) * n >= 256): * */ __pyx_t_2 = (((__pyx_v_values->strides[0]) == (sizeof(__pyx_t_5numpy_int16_t))) != 0); if (__pyx_t_2) { /* "pandas/src/generated.pyx":3700 * if (values.strides[0] == out.strides[0] and * values.strides[0] == sizeof(int16_t) and * sizeof(int16_t) * n >= 256): # <<<<<<<<<<<<<< * * for j from 0 <= j < k: */ __pyx_t_3 = ((((sizeof(__pyx_t_5numpy_int16_t)) * __pyx_v_n) >= 256) != 0); __pyx_t_6 = __pyx_t_3; } else { __pyx_t_6 = __pyx_t_2; } __pyx_t_2 = __pyx_t_6; } else { __pyx_t_2 = __pyx_t_4; } if (__pyx_t_2) { /* "pandas/src/generated.pyx":3702 * sizeof(int16_t) * n >= 256): * * for j from 0 <= j < k: # <<<<<<<<<<<<<< * idx = indexer[j] * if idx == -1: */ __pyx_t_1 = __pyx_v_k; for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_1; __pyx_v_j++) { /* "pandas/src/generated.pyx":3703 * * for j from 0 <= j < k: * idx = indexer[j] # <<<<<<<<<<<<<< * if idx == -1: * for i from 0 <= i < n: */ __pyx_t_7 = __pyx_v_j; __pyx_v_idx = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_7, __pyx_pybuffernd_indexer.diminfo[0].strides)); /* "pandas/src/generated.pyx":3704 * for j from 0 <= j < k: * idx = indexer[j] * if idx == -1: # <<<<<<<<<<<<<< * for i from 0 <= i < n: * out[i, j] = fv */ __pyx_t_2 = ((__pyx_v_idx == -1) != 0); if (__pyx_t_2) { /* "pandas/src/generated.pyx":3705 * idx = indexer[j] * if idx == -1: * for i from 0 <= i < n: # <<<<<<<<<<<<<< * out[i, j] = fv * else: */ __pyx_t_8 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_8; __pyx_v_i++) { /* "pandas/src/generated.pyx":3706 * if idx == -1: * for i from 0 <= i < n: * out[i, j] = fv # <<<<<<<<<<<<<< * else: * v = &values[0, idx] */ __pyx_t_9 = __pyx_v_i; __pyx_t_10 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int16_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_9, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_10, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_fv; } goto __pyx_L7; } /*else*/ { /* "pandas/src/generated.pyx":3708 * out[i, j] = fv * else: * v = &values[0, idx] # <<<<<<<<<<<<<< * o = &out[0, j] * memmove(o, v, (sizeof(int16_t) * n)) */ __pyx_t_11 = 0; __pyx_t_8 = __pyx_v_idx; __pyx_v_v = (&(*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int16_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_11, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_8, __pyx_pybuffernd_values.diminfo[1].strides))); /* "pandas/src/generated.pyx":3709 * else: * v = &values[0, idx] * o = &out[0, j] # <<<<<<<<<<<<<< * memmove(o, v, (sizeof(int16_t) * n)) * return */ __pyx_t_12 = 0; __pyx_t_13 = __pyx_v_j; __pyx_v_o = (&(*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int16_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_12, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_13, __pyx_pybuffernd_out.diminfo[1].strides))); /* "pandas/src/generated.pyx":3710 * v = &values[0, idx] * o = &out[0, j] * memmove(o, v, (sizeof(int16_t) * n)) # <<<<<<<<<<<<<< * return * */ memmove(__pyx_v_o, __pyx_v_v, ((size_t)((sizeof(__pyx_t_5numpy_int16_t)) * __pyx_v_n))); } __pyx_L7:; } /* "pandas/src/generated.pyx":3711 * o = &out[0, j] * memmove(o, v, (sizeof(int16_t) * n)) * return # <<<<<<<<<<<<<< * * for j from 0 <= j < k: */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; goto __pyx_L4; } __pyx_L4:; /* "pandas/src/generated.pyx":3713 * return * * for j from 0 <= j < k: # <<<<<<<<<<<<<< * idx = indexer[j] * if idx == -1: */ __pyx_t_1 = __pyx_v_k; for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_1; __pyx_v_j++) { /* "pandas/src/generated.pyx":3714 * * for j from 0 <= j < k: * idx = indexer[j] # <<<<<<<<<<<<<< * if idx == -1: * for i from 0 <= i < n: */ __pyx_t_14 = __pyx_v_j; __pyx_v_idx = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_indexer.diminfo[0].strides)); /* "pandas/src/generated.pyx":3715 * for j from 0 <= j < k: * idx = indexer[j] * if idx == -1: # <<<<<<<<<<<<<< * for i from 0 <= i < n: * out[i, j] = fv */ __pyx_t_2 = ((__pyx_v_idx == -1) != 0); if (__pyx_t_2) { /* "pandas/src/generated.pyx":3716 * idx = indexer[j] * if idx == -1: * for i from 0 <= i < n: # <<<<<<<<<<<<<< * out[i, j] = fv * else: */ __pyx_t_15 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_15; __pyx_v_i++) { /* "pandas/src/generated.pyx":3717 * if idx == -1: * for i from 0 <= i < n: * out[i, j] = fv # <<<<<<<<<<<<<< * else: * for i from 0 <= i < n: */ __pyx_t_16 = __pyx_v_i; __pyx_t_17 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int16_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_17, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_fv; } goto __pyx_L12; } /*else*/ { /* "pandas/src/generated.pyx":3719 * out[i, j] = fv * else: * for i from 0 <= i < n: # <<<<<<<<<<<<<< * out[i, j] = values[i, idx] * */ __pyx_t_15 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_15; __pyx_v_i++) { /* "pandas/src/generated.pyx":3720 * else: * for i from 0 <= i < n: * out[i, j] = values[i, idx] # <<<<<<<<<<<<<< * * @cython.wraparound(False) */ __pyx_t_18 = __pyx_v_i; __pyx_t_19 = __pyx_v_idx; __pyx_t_20 = __pyx_v_i; __pyx_t_21 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int16_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_21, __pyx_pybuffernd_out.diminfo[1].strides) = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int16_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_19, __pyx_pybuffernd_values.diminfo[1].strides)); } } __pyx_L12:; } __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.take_2d_axis1_int16_int16", __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_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_313take_2d_axis1_int16_int32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_313take_2d_axis1_int16_int32 = {__Pyx_NAMESTR("take_2d_axis1_int16_int32"), (PyCFunction)__pyx_pw_6pandas_5algos_313take_2d_axis1_int16_int32, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_313take_2d_axis1_int16_int32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_values = 0; PyArrayObject *__pyx_v_indexer = 0; PyArrayObject *__pyx_v_out = 0; PyObject *__pyx_v_fill_value = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("take_2d_axis1_int16_int32 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__values,&__pyx_n_s__indexer,&__pyx_n_s__out,&__pyx_n_s__fill_value,0}; PyObject* values[4] = {0,0,0,0}; values[3] = __pyx_k_153; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__values)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__indexer)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_2d_axis1_int16_int32", 0, 3, 4, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3724; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__out)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_2d_axis1_int16_int32", 0, 3, 4, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3724; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__fill_value); if (value) { values[3] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "take_2d_axis1_int16_int32") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3724; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_values = ((PyArrayObject *)values[0]); __pyx_v_indexer = ((PyArrayObject *)values[1]); __pyx_v_out = ((PyArrayObject *)values[2]); __pyx_v_fill_value = values[3]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("take_2d_axis1_int16_int32", 0, 3, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3724; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.take_2d_axis1_int16_int32", __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_filename = __pyx_f[2]; __pyx_lineno = 3724; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_indexer), __pyx_ptype_5numpy_ndarray, 1, "indexer", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3725; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_5numpy_ndarray, 1, "out", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3726; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_312take_2d_axis1_int16_int32(__pyx_self, __pyx_v_values, __pyx_v_indexer, __pyx_v_out, __pyx_v_fill_value); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":3724 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_axis1_int16_int32(ndarray[int16_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[int32_t, ndim=2] out, */ static PyObject *__pyx_pf_6pandas_5algos_312take_2d_axis1_int16_int32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_k; Py_ssize_t __pyx_v_n; Py_ssize_t __pyx_v_idx; __pyx_t_5numpy_int32_t __pyx_v_fv; __Pyx_LocalBuf_ND __pyx_pybuffernd_indexer; __Pyx_Buffer __pyx_pybuffer_indexer; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_values; __Pyx_Buffer __pyx_pybuffer_values; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; int __pyx_t_2; int __pyx_t_3; int __pyx_t_4; __pyx_t_5numpy_int32_t __pyx_t_5; Py_ssize_t __pyx_t_6; Py_ssize_t __pyx_t_7; Py_ssize_t __pyx_t_8; Py_ssize_t __pyx_t_9; Py_ssize_t __pyx_t_10; Py_ssize_t __pyx_t_11; Py_ssize_t __pyx_t_12; Py_ssize_t __pyx_t_13; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("take_2d_axis1_int16_int32", 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_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; { __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_int16_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3724; __pyx_clineno = __LINE__; goto __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_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1]; { __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_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3724; __pyx_clineno = __LINE__; goto __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_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_v_out, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3724; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; __pyx_pybuffernd_out.diminfo[1].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_out.diminfo[1].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[1]; /* "pandas/src/generated.pyx":3732 * int32_t fv * * n = len(values) # <<<<<<<<<<<<<< * k = len(indexer) * */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3732; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/src/generated.pyx":3733 * * n = len(values) * k = len(indexer) # <<<<<<<<<<<<<< * * if n == 0 or k == 0: */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_indexer)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3733; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_k = __pyx_t_1; /* "pandas/src/generated.pyx":3735 * k = len(indexer) * * if n == 0 or k == 0: # <<<<<<<<<<<<<< * return * */ __pyx_t_2 = ((__pyx_v_n == 0) != 0); if (!__pyx_t_2) { __pyx_t_3 = ((__pyx_v_k == 0) != 0); __pyx_t_4 = __pyx_t_3; } else { __pyx_t_4 = __pyx_t_2; } if (__pyx_t_4) { /* "pandas/src/generated.pyx":3736 * * if n == 0 or k == 0: * return # <<<<<<<<<<<<<< * * fv = fill_value */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; goto __pyx_L3; } __pyx_L3:; /* "pandas/src/generated.pyx":3738 * return * * fv = fill_value # <<<<<<<<<<<<<< * * IF False: */ __pyx_t_5 = __Pyx_PyInt_from_py_npy_int32(__pyx_v_fill_value); if (unlikely((__pyx_t_5 == (npy_int32)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3738; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_fv = __pyx_t_5; /* "pandas/src/generated.pyx":3759 * return * * for j from 0 <= j < k: # <<<<<<<<<<<<<< * idx = indexer[j] * if idx == -1: */ __pyx_t_1 = __pyx_v_k; for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_1; __pyx_v_j++) { /* "pandas/src/generated.pyx":3760 * * for j from 0 <= j < k: * idx = indexer[j] # <<<<<<<<<<<<<< * if idx == -1: * for i from 0 <= i < n: */ __pyx_t_6 = __pyx_v_j; __pyx_v_idx = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_6, __pyx_pybuffernd_indexer.diminfo[0].strides)); /* "pandas/src/generated.pyx":3761 * for j from 0 <= j < k: * idx = indexer[j] * if idx == -1: # <<<<<<<<<<<<<< * for i from 0 <= i < n: * out[i, j] = fv */ __pyx_t_4 = ((__pyx_v_idx == -1) != 0); if (__pyx_t_4) { /* "pandas/src/generated.pyx":3762 * idx = indexer[j] * if idx == -1: * for i from 0 <= i < n: # <<<<<<<<<<<<<< * out[i, j] = fv * else: */ __pyx_t_7 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_7; __pyx_v_i++) { /* "pandas/src/generated.pyx":3763 * if idx == -1: * for i from 0 <= i < n: * out[i, j] = fv # <<<<<<<<<<<<<< * else: * for i from 0 <= i < n: */ __pyx_t_8 = __pyx_v_i; __pyx_t_9 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_8, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_9, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_fv; } goto __pyx_L6; } /*else*/ { /* "pandas/src/generated.pyx":3765 * out[i, j] = fv * else: * for i from 0 <= i < n: # <<<<<<<<<<<<<< * out[i, j] = values[i, idx] * */ __pyx_t_7 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_7; __pyx_v_i++) { /* "pandas/src/generated.pyx":3766 * else: * for i from 0 <= i < n: * out[i, j] = values[i, idx] # <<<<<<<<<<<<<< * * @cython.wraparound(False) */ __pyx_t_10 = __pyx_v_i; __pyx_t_11 = __pyx_v_idx; __pyx_t_12 = __pyx_v_i; __pyx_t_13 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_12, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_13, __pyx_pybuffernd_out.diminfo[1].strides) = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int16_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_10, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_11, __pyx_pybuffernd_values.diminfo[1].strides)); } } __pyx_L6:; } __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.take_2d_axis1_int16_int32", __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_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_315take_2d_axis1_int16_int64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_315take_2d_axis1_int16_int64 = {__Pyx_NAMESTR("take_2d_axis1_int16_int64"), (PyCFunction)__pyx_pw_6pandas_5algos_315take_2d_axis1_int16_int64, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_315take_2d_axis1_int16_int64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_values = 0; PyArrayObject *__pyx_v_indexer = 0; PyArrayObject *__pyx_v_out = 0; PyObject *__pyx_v_fill_value = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("take_2d_axis1_int16_int64 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__values,&__pyx_n_s__indexer,&__pyx_n_s__out,&__pyx_n_s__fill_value,0}; PyObject* values[4] = {0,0,0,0}; values[3] = __pyx_k_154; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__values)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__indexer)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_2d_axis1_int16_int64", 0, 3, 4, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3770; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__out)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_2d_axis1_int16_int64", 0, 3, 4, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3770; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__fill_value); if (value) { values[3] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "take_2d_axis1_int16_int64") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3770; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_values = ((PyArrayObject *)values[0]); __pyx_v_indexer = ((PyArrayObject *)values[1]); __pyx_v_out = ((PyArrayObject *)values[2]); __pyx_v_fill_value = values[3]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("take_2d_axis1_int16_int64", 0, 3, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3770; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.take_2d_axis1_int16_int64", __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_filename = __pyx_f[2]; __pyx_lineno = 3770; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_indexer), __pyx_ptype_5numpy_ndarray, 1, "indexer", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3771; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_5numpy_ndarray, 1, "out", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3772; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_314take_2d_axis1_int16_int64(__pyx_self, __pyx_v_values, __pyx_v_indexer, __pyx_v_out, __pyx_v_fill_value); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":3770 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_axis1_int16_int64(ndarray[int16_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[int64_t, ndim=2] out, */ static PyObject *__pyx_pf_6pandas_5algos_314take_2d_axis1_int16_int64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_k; Py_ssize_t __pyx_v_n; Py_ssize_t __pyx_v_idx; __pyx_t_5numpy_int64_t __pyx_v_fv; __Pyx_LocalBuf_ND __pyx_pybuffernd_indexer; __Pyx_Buffer __pyx_pybuffer_indexer; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_values; __Pyx_Buffer __pyx_pybuffer_values; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; int __pyx_t_2; int __pyx_t_3; int __pyx_t_4; __pyx_t_5numpy_int64_t __pyx_t_5; Py_ssize_t __pyx_t_6; Py_ssize_t __pyx_t_7; Py_ssize_t __pyx_t_8; Py_ssize_t __pyx_t_9; Py_ssize_t __pyx_t_10; Py_ssize_t __pyx_t_11; Py_ssize_t __pyx_t_12; Py_ssize_t __pyx_t_13; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("take_2d_axis1_int16_int64", 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_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; { __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_int16_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3770; __pyx_clineno = __LINE__; goto __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_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1]; { __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_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3770; __pyx_clineno = __LINE__; goto __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_BufFmt_StackElem __pyx_stack[1]; 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, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3770; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; __pyx_pybuffernd_out.diminfo[1].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_out.diminfo[1].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[1]; /* "pandas/src/generated.pyx":3778 * int64_t fv * * n = len(values) # <<<<<<<<<<<<<< * k = len(indexer) * */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3778; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/src/generated.pyx":3779 * * n = len(values) * k = len(indexer) # <<<<<<<<<<<<<< * * if n == 0 or k == 0: */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_indexer)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3779; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_k = __pyx_t_1; /* "pandas/src/generated.pyx":3781 * k = len(indexer) * * if n == 0 or k == 0: # <<<<<<<<<<<<<< * return * */ __pyx_t_2 = ((__pyx_v_n == 0) != 0); if (!__pyx_t_2) { __pyx_t_3 = ((__pyx_v_k == 0) != 0); __pyx_t_4 = __pyx_t_3; } else { __pyx_t_4 = __pyx_t_2; } if (__pyx_t_4) { /* "pandas/src/generated.pyx":3782 * * if n == 0 or k == 0: * return # <<<<<<<<<<<<<< * * fv = fill_value */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; goto __pyx_L3; } __pyx_L3:; /* "pandas/src/generated.pyx":3784 * return * * fv = fill_value # <<<<<<<<<<<<<< * * IF False: */ __pyx_t_5 = __Pyx_PyInt_from_py_npy_int64(__pyx_v_fill_value); if (unlikely((__pyx_t_5 == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3784; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_fv = __pyx_t_5; /* "pandas/src/generated.pyx":3805 * return * * for j from 0 <= j < k: # <<<<<<<<<<<<<< * idx = indexer[j] * if idx == -1: */ __pyx_t_1 = __pyx_v_k; for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_1; __pyx_v_j++) { /* "pandas/src/generated.pyx":3806 * * for j from 0 <= j < k: * idx = indexer[j] # <<<<<<<<<<<<<< * if idx == -1: * for i from 0 <= i < n: */ __pyx_t_6 = __pyx_v_j; __pyx_v_idx = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_6, __pyx_pybuffernd_indexer.diminfo[0].strides)); /* "pandas/src/generated.pyx":3807 * for j from 0 <= j < k: * idx = indexer[j] * if idx == -1: # <<<<<<<<<<<<<< * for i from 0 <= i < n: * out[i, j] = fv */ __pyx_t_4 = ((__pyx_v_idx == -1) != 0); if (__pyx_t_4) { /* "pandas/src/generated.pyx":3808 * idx = indexer[j] * if idx == -1: * for i from 0 <= i < n: # <<<<<<<<<<<<<< * out[i, j] = fv * else: */ __pyx_t_7 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_7; __pyx_v_i++) { /* "pandas/src/generated.pyx":3809 * if idx == -1: * for i from 0 <= i < n: * out[i, j] = fv # <<<<<<<<<<<<<< * else: * for i from 0 <= i < n: */ __pyx_t_8 = __pyx_v_i; __pyx_t_9 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_8, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_9, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_fv; } goto __pyx_L6; } /*else*/ { /* "pandas/src/generated.pyx":3811 * out[i, j] = fv * else: * for i from 0 <= i < n: # <<<<<<<<<<<<<< * out[i, j] = values[i, idx] * */ __pyx_t_7 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_7; __pyx_v_i++) { /* "pandas/src/generated.pyx":3812 * else: * for i from 0 <= i < n: * out[i, j] = values[i, idx] # <<<<<<<<<<<<<< * * @cython.wraparound(False) */ __pyx_t_10 = __pyx_v_i; __pyx_t_11 = __pyx_v_idx; __pyx_t_12 = __pyx_v_i; __pyx_t_13 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_12, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_13, __pyx_pybuffernd_out.diminfo[1].strides) = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int16_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_10, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_11, __pyx_pybuffernd_values.diminfo[1].strides)); } } __pyx_L6:; } __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.take_2d_axis1_int16_int64", __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_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_317take_2d_axis1_int16_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_317take_2d_axis1_int16_float64 = {__Pyx_NAMESTR("take_2d_axis1_int16_float64"), (PyCFunction)__pyx_pw_6pandas_5algos_317take_2d_axis1_int16_float64, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_317take_2d_axis1_int16_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_values = 0; PyArrayObject *__pyx_v_indexer = 0; PyArrayObject *__pyx_v_out = 0; PyObject *__pyx_v_fill_value = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("take_2d_axis1_int16_float64 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__values,&__pyx_n_s__indexer,&__pyx_n_s__out,&__pyx_n_s__fill_value,0}; PyObject* values[4] = {0,0,0,0}; values[3] = __pyx_k_155; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__values)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__indexer)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_2d_axis1_int16_float64", 0, 3, 4, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3816; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__out)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_2d_axis1_int16_float64", 0, 3, 4, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3816; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__fill_value); if (value) { values[3] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "take_2d_axis1_int16_float64") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3816; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_values = ((PyArrayObject *)values[0]); __pyx_v_indexer = ((PyArrayObject *)values[1]); __pyx_v_out = ((PyArrayObject *)values[2]); __pyx_v_fill_value = values[3]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("take_2d_axis1_int16_float64", 0, 3, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3816; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.take_2d_axis1_int16_float64", __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_filename = __pyx_f[2]; __pyx_lineno = 3816; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_indexer), __pyx_ptype_5numpy_ndarray, 1, "indexer", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3817; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_5numpy_ndarray, 1, "out", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3818; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_316take_2d_axis1_int16_float64(__pyx_self, __pyx_v_values, __pyx_v_indexer, __pyx_v_out, __pyx_v_fill_value); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":3816 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_axis1_int16_float64(ndarray[int16_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[float64_t, ndim=2] out, */ static PyObject *__pyx_pf_6pandas_5algos_316take_2d_axis1_int16_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_k; Py_ssize_t __pyx_v_n; Py_ssize_t __pyx_v_idx; __pyx_t_5numpy_float64_t __pyx_v_fv; __Pyx_LocalBuf_ND __pyx_pybuffernd_indexer; __Pyx_Buffer __pyx_pybuffer_indexer; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_values; __Pyx_Buffer __pyx_pybuffer_values; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; int __pyx_t_2; int __pyx_t_3; int __pyx_t_4; __pyx_t_5numpy_float64_t __pyx_t_5; Py_ssize_t __pyx_t_6; Py_ssize_t __pyx_t_7; Py_ssize_t __pyx_t_8; Py_ssize_t __pyx_t_9; Py_ssize_t __pyx_t_10; Py_ssize_t __pyx_t_11; Py_ssize_t __pyx_t_12; Py_ssize_t __pyx_t_13; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("take_2d_axis1_int16_float64", 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_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; { __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_int16_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3816; __pyx_clineno = __LINE__; goto __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_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1]; { __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_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3816; __pyx_clineno = __LINE__; goto __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_BufFmt_StackElem __pyx_stack[1]; 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, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3816; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; __pyx_pybuffernd_out.diminfo[1].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_out.diminfo[1].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[1]; /* "pandas/src/generated.pyx":3824 * float64_t fv * * n = len(values) # <<<<<<<<<<<<<< * k = len(indexer) * */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3824; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/src/generated.pyx":3825 * * n = len(values) * k = len(indexer) # <<<<<<<<<<<<<< * * if n == 0 or k == 0: */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_indexer)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3825; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_k = __pyx_t_1; /* "pandas/src/generated.pyx":3827 * k = len(indexer) * * if n == 0 or k == 0: # <<<<<<<<<<<<<< * return * */ __pyx_t_2 = ((__pyx_v_n == 0) != 0); if (!__pyx_t_2) { __pyx_t_3 = ((__pyx_v_k == 0) != 0); __pyx_t_4 = __pyx_t_3; } else { __pyx_t_4 = __pyx_t_2; } if (__pyx_t_4) { /* "pandas/src/generated.pyx":3828 * * if n == 0 or k == 0: * return # <<<<<<<<<<<<<< * * fv = fill_value */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; goto __pyx_L3; } __pyx_L3:; /* "pandas/src/generated.pyx":3830 * return * * fv = fill_value # <<<<<<<<<<<<<< * * IF False: */ __pyx_t_5 = __pyx_PyFloat_AsDouble(__pyx_v_fill_value); if (unlikely((__pyx_t_5 == (npy_float64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3830; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_fv = __pyx_t_5; /* "pandas/src/generated.pyx":3851 * return * * for j from 0 <= j < k: # <<<<<<<<<<<<<< * idx = indexer[j] * if idx == -1: */ __pyx_t_1 = __pyx_v_k; for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_1; __pyx_v_j++) { /* "pandas/src/generated.pyx":3852 * * for j from 0 <= j < k: * idx = indexer[j] # <<<<<<<<<<<<<< * if idx == -1: * for i from 0 <= i < n: */ __pyx_t_6 = __pyx_v_j; __pyx_v_idx = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_6, __pyx_pybuffernd_indexer.diminfo[0].strides)); /* "pandas/src/generated.pyx":3853 * for j from 0 <= j < k: * idx = indexer[j] * if idx == -1: # <<<<<<<<<<<<<< * for i from 0 <= i < n: * out[i, j] = fv */ __pyx_t_4 = ((__pyx_v_idx == -1) != 0); if (__pyx_t_4) { /* "pandas/src/generated.pyx":3854 * idx = indexer[j] * if idx == -1: * for i from 0 <= i < n: # <<<<<<<<<<<<<< * out[i, j] = fv * else: */ __pyx_t_7 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_7; __pyx_v_i++) { /* "pandas/src/generated.pyx":3855 * if idx == -1: * for i from 0 <= i < n: * out[i, j] = fv # <<<<<<<<<<<<<< * else: * for i from 0 <= i < n: */ __pyx_t_8 = __pyx_v_i; __pyx_t_9 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_8, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_9, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_fv; } goto __pyx_L6; } /*else*/ { /* "pandas/src/generated.pyx":3857 * out[i, j] = fv * else: * for i from 0 <= i < n: # <<<<<<<<<<<<<< * out[i, j] = values[i, idx] * */ __pyx_t_7 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_7; __pyx_v_i++) { /* "pandas/src/generated.pyx":3858 * else: * for i from 0 <= i < n: * out[i, j] = values[i, idx] # <<<<<<<<<<<<<< * * @cython.wraparound(False) */ __pyx_t_10 = __pyx_v_i; __pyx_t_11 = __pyx_v_idx; __pyx_t_12 = __pyx_v_i; __pyx_t_13 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_12, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_13, __pyx_pybuffernd_out.diminfo[1].strides) = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int16_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_10, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_11, __pyx_pybuffernd_values.diminfo[1].strides)); } } __pyx_L6:; } __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.take_2d_axis1_int16_float64", __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_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_319take_2d_axis1_int32_int32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_319take_2d_axis1_int32_int32 = {__Pyx_NAMESTR("take_2d_axis1_int32_int32"), (PyCFunction)__pyx_pw_6pandas_5algos_319take_2d_axis1_int32_int32, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_319take_2d_axis1_int32_int32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_values = 0; PyArrayObject *__pyx_v_indexer = 0; PyArrayObject *__pyx_v_out = 0; PyObject *__pyx_v_fill_value = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("take_2d_axis1_int32_int32 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__values,&__pyx_n_s__indexer,&__pyx_n_s__out,&__pyx_n_s__fill_value,0}; PyObject* values[4] = {0,0,0,0}; values[3] = __pyx_k_156; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__values)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__indexer)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_2d_axis1_int32_int32", 0, 3, 4, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3862; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__out)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_2d_axis1_int32_int32", 0, 3, 4, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3862; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__fill_value); if (value) { values[3] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "take_2d_axis1_int32_int32") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3862; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_values = ((PyArrayObject *)values[0]); __pyx_v_indexer = ((PyArrayObject *)values[1]); __pyx_v_out = ((PyArrayObject *)values[2]); __pyx_v_fill_value = values[3]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("take_2d_axis1_int32_int32", 0, 3, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3862; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.take_2d_axis1_int32_int32", __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_filename = __pyx_f[2]; __pyx_lineno = 3862; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_indexer), __pyx_ptype_5numpy_ndarray, 1, "indexer", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3863; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_5numpy_ndarray, 1, "out", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3864; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_318take_2d_axis1_int32_int32(__pyx_self, __pyx_v_values, __pyx_v_indexer, __pyx_v_out, __pyx_v_fill_value); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":3862 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_axis1_int32_int32(ndarray[int32_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[int32_t, ndim=2] out, */ static PyObject *__pyx_pf_6pandas_5algos_318take_2d_axis1_int32_int32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_k; Py_ssize_t __pyx_v_n; Py_ssize_t __pyx_v_idx; __pyx_t_5numpy_int32_t __pyx_v_fv; __pyx_t_5numpy_int32_t *__pyx_v_v; __pyx_t_5numpy_int32_t *__pyx_v_o; __Pyx_LocalBuf_ND __pyx_pybuffernd_indexer; __Pyx_Buffer __pyx_pybuffer_indexer; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_values; __Pyx_Buffer __pyx_pybuffer_values; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; int __pyx_t_2; int __pyx_t_3; int __pyx_t_4; __pyx_t_5numpy_int32_t __pyx_t_5; int __pyx_t_6; Py_ssize_t __pyx_t_7; Py_ssize_t __pyx_t_8; Py_ssize_t __pyx_t_9; Py_ssize_t __pyx_t_10; long __pyx_t_11; long __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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("take_2d_axis1_int32_int32", 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_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; { __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_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3862; __pyx_clineno = __LINE__; goto __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_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1]; { __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_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3862; __pyx_clineno = __LINE__; goto __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_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_v_out, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3862; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; __pyx_pybuffernd_out.diminfo[1].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_out.diminfo[1].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[1]; /* "pandas/src/generated.pyx":3870 * int32_t fv * * n = len(values) # <<<<<<<<<<<<<< * k = len(indexer) * */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3870; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/src/generated.pyx":3871 * * n = len(values) * k = len(indexer) # <<<<<<<<<<<<<< * * if n == 0 or k == 0: */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_indexer)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3871; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_k = __pyx_t_1; /* "pandas/src/generated.pyx":3873 * k = len(indexer) * * if n == 0 or k == 0: # <<<<<<<<<<<<<< * return * */ __pyx_t_2 = ((__pyx_v_n == 0) != 0); if (!__pyx_t_2) { __pyx_t_3 = ((__pyx_v_k == 0) != 0); __pyx_t_4 = __pyx_t_3; } else { __pyx_t_4 = __pyx_t_2; } if (__pyx_t_4) { /* "pandas/src/generated.pyx":3874 * * if n == 0 or k == 0: * return # <<<<<<<<<<<<<< * * fv = fill_value */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; goto __pyx_L3; } __pyx_L3:; /* "pandas/src/generated.pyx":3876 * return * * fv = fill_value # <<<<<<<<<<<<<< * * IF True: */ __pyx_t_5 = __Pyx_PyInt_from_py_npy_int32(__pyx_v_fill_value); if (unlikely((__pyx_t_5 == (npy_int32)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3876; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_fv = __pyx_t_5; /* "pandas/src/generated.pyx":3882 * int32_t *v, *o * * if (values.strides[0] == out.strides[0] and # <<<<<<<<<<<<<< * values.strides[0] == sizeof(int32_t) and * sizeof(int32_t) * n >= 256): */ __pyx_t_4 = (((__pyx_v_values->strides[0]) == (__pyx_v_out->strides[0])) != 0); if (__pyx_t_4) { /* "pandas/src/generated.pyx":3883 * * if (values.strides[0] == out.strides[0] and * values.strides[0] == sizeof(int32_t) and # <<<<<<<<<<<<<< * sizeof(int32_t) * n >= 256): * */ __pyx_t_2 = (((__pyx_v_values->strides[0]) == (sizeof(__pyx_t_5numpy_int32_t))) != 0); if (__pyx_t_2) { /* "pandas/src/generated.pyx":3884 * if (values.strides[0] == out.strides[0] and * values.strides[0] == sizeof(int32_t) and * sizeof(int32_t) * n >= 256): # <<<<<<<<<<<<<< * * for j from 0 <= j < k: */ __pyx_t_3 = ((((sizeof(__pyx_t_5numpy_int32_t)) * __pyx_v_n) >= 256) != 0); __pyx_t_6 = __pyx_t_3; } else { __pyx_t_6 = __pyx_t_2; } __pyx_t_2 = __pyx_t_6; } else { __pyx_t_2 = __pyx_t_4; } if (__pyx_t_2) { /* "pandas/src/generated.pyx":3886 * sizeof(int32_t) * n >= 256): * * for j from 0 <= j < k: # <<<<<<<<<<<<<< * idx = indexer[j] * if idx == -1: */ __pyx_t_1 = __pyx_v_k; for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_1; __pyx_v_j++) { /* "pandas/src/generated.pyx":3887 * * for j from 0 <= j < k: * idx = indexer[j] # <<<<<<<<<<<<<< * if idx == -1: * for i from 0 <= i < n: */ __pyx_t_7 = __pyx_v_j; __pyx_v_idx = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_7, __pyx_pybuffernd_indexer.diminfo[0].strides)); /* "pandas/src/generated.pyx":3888 * for j from 0 <= j < k: * idx = indexer[j] * if idx == -1: # <<<<<<<<<<<<<< * for i from 0 <= i < n: * out[i, j] = fv */ __pyx_t_2 = ((__pyx_v_idx == -1) != 0); if (__pyx_t_2) { /* "pandas/src/generated.pyx":3889 * idx = indexer[j] * if idx == -1: * for i from 0 <= i < n: # <<<<<<<<<<<<<< * out[i, j] = fv * else: */ __pyx_t_8 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_8; __pyx_v_i++) { /* "pandas/src/generated.pyx":3890 * if idx == -1: * for i from 0 <= i < n: * out[i, j] = fv # <<<<<<<<<<<<<< * else: * v = &values[0, idx] */ __pyx_t_9 = __pyx_v_i; __pyx_t_10 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_9, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_10, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_fv; } goto __pyx_L7; } /*else*/ { /* "pandas/src/generated.pyx":3892 * out[i, j] = fv * else: * v = &values[0, idx] # <<<<<<<<<<<<<< * o = &out[0, j] * memmove(o, v, (sizeof(int32_t) * n)) */ __pyx_t_11 = 0; __pyx_t_8 = __pyx_v_idx; __pyx_v_v = (&(*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_11, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_8, __pyx_pybuffernd_values.diminfo[1].strides))); /* "pandas/src/generated.pyx":3893 * else: * v = &values[0, idx] * o = &out[0, j] # <<<<<<<<<<<<<< * memmove(o, v, (sizeof(int32_t) * n)) * return */ __pyx_t_12 = 0; __pyx_t_13 = __pyx_v_j; __pyx_v_o = (&(*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_12, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_13, __pyx_pybuffernd_out.diminfo[1].strides))); /* "pandas/src/generated.pyx":3894 * v = &values[0, idx] * o = &out[0, j] * memmove(o, v, (sizeof(int32_t) * n)) # <<<<<<<<<<<<<< * return * */ memmove(__pyx_v_o, __pyx_v_v, ((size_t)((sizeof(__pyx_t_5numpy_int32_t)) * __pyx_v_n))); } __pyx_L7:; } /* "pandas/src/generated.pyx":3895 * o = &out[0, j] * memmove(o, v, (sizeof(int32_t) * n)) * return # <<<<<<<<<<<<<< * * for j from 0 <= j < k: */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; goto __pyx_L4; } __pyx_L4:; /* "pandas/src/generated.pyx":3897 * return * * for j from 0 <= j < k: # <<<<<<<<<<<<<< * idx = indexer[j] * if idx == -1: */ __pyx_t_1 = __pyx_v_k; for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_1; __pyx_v_j++) { /* "pandas/src/generated.pyx":3898 * * for j from 0 <= j < k: * idx = indexer[j] # <<<<<<<<<<<<<< * if idx == -1: * for i from 0 <= i < n: */ __pyx_t_14 = __pyx_v_j; __pyx_v_idx = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_indexer.diminfo[0].strides)); /* "pandas/src/generated.pyx":3899 * for j from 0 <= j < k: * idx = indexer[j] * if idx == -1: # <<<<<<<<<<<<<< * for i from 0 <= i < n: * out[i, j] = fv */ __pyx_t_2 = ((__pyx_v_idx == -1) != 0); if (__pyx_t_2) { /* "pandas/src/generated.pyx":3900 * idx = indexer[j] * if idx == -1: * for i from 0 <= i < n: # <<<<<<<<<<<<<< * out[i, j] = fv * else: */ __pyx_t_15 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_15; __pyx_v_i++) { /* "pandas/src/generated.pyx":3901 * if idx == -1: * for i from 0 <= i < n: * out[i, j] = fv # <<<<<<<<<<<<<< * else: * for i from 0 <= i < n: */ __pyx_t_16 = __pyx_v_i; __pyx_t_17 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_17, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_fv; } goto __pyx_L12; } /*else*/ { /* "pandas/src/generated.pyx":3903 * out[i, j] = fv * else: * for i from 0 <= i < n: # <<<<<<<<<<<<<< * out[i, j] = values[i, idx] * */ __pyx_t_15 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_15; __pyx_v_i++) { /* "pandas/src/generated.pyx":3904 * else: * for i from 0 <= i < n: * out[i, j] = values[i, idx] # <<<<<<<<<<<<<< * * @cython.wraparound(False) */ __pyx_t_18 = __pyx_v_i; __pyx_t_19 = __pyx_v_idx; __pyx_t_20 = __pyx_v_i; __pyx_t_21 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_21, __pyx_pybuffernd_out.diminfo[1].strides) = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_19, __pyx_pybuffernd_values.diminfo[1].strides)); } } __pyx_L12:; } __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.take_2d_axis1_int32_int32", __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_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_321take_2d_axis1_int32_int64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_321take_2d_axis1_int32_int64 = {__Pyx_NAMESTR("take_2d_axis1_int32_int64"), (PyCFunction)__pyx_pw_6pandas_5algos_321take_2d_axis1_int32_int64, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_321take_2d_axis1_int32_int64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_values = 0; PyArrayObject *__pyx_v_indexer = 0; PyArrayObject *__pyx_v_out = 0; PyObject *__pyx_v_fill_value = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("take_2d_axis1_int32_int64 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__values,&__pyx_n_s__indexer,&__pyx_n_s__out,&__pyx_n_s__fill_value,0}; PyObject* values[4] = {0,0,0,0}; values[3] = __pyx_k_157; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__values)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__indexer)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_2d_axis1_int32_int64", 0, 3, 4, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3908; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__out)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_2d_axis1_int32_int64", 0, 3, 4, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3908; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__fill_value); if (value) { values[3] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "take_2d_axis1_int32_int64") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3908; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_values = ((PyArrayObject *)values[0]); __pyx_v_indexer = ((PyArrayObject *)values[1]); __pyx_v_out = ((PyArrayObject *)values[2]); __pyx_v_fill_value = values[3]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("take_2d_axis1_int32_int64", 0, 3, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3908; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.take_2d_axis1_int32_int64", __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_filename = __pyx_f[2]; __pyx_lineno = 3908; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_indexer), __pyx_ptype_5numpy_ndarray, 1, "indexer", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3909; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_5numpy_ndarray, 1, "out", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3910; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_320take_2d_axis1_int32_int64(__pyx_self, __pyx_v_values, __pyx_v_indexer, __pyx_v_out, __pyx_v_fill_value); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":3908 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_axis1_int32_int64(ndarray[int32_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[int64_t, ndim=2] out, */ static PyObject *__pyx_pf_6pandas_5algos_320take_2d_axis1_int32_int64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_k; Py_ssize_t __pyx_v_n; Py_ssize_t __pyx_v_idx; __pyx_t_5numpy_int64_t __pyx_v_fv; __Pyx_LocalBuf_ND __pyx_pybuffernd_indexer; __Pyx_Buffer __pyx_pybuffer_indexer; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_values; __Pyx_Buffer __pyx_pybuffer_values; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; int __pyx_t_2; int __pyx_t_3; int __pyx_t_4; __pyx_t_5numpy_int64_t __pyx_t_5; Py_ssize_t __pyx_t_6; Py_ssize_t __pyx_t_7; Py_ssize_t __pyx_t_8; Py_ssize_t __pyx_t_9; Py_ssize_t __pyx_t_10; Py_ssize_t __pyx_t_11; Py_ssize_t __pyx_t_12; Py_ssize_t __pyx_t_13; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("take_2d_axis1_int32_int64", 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_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; { __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_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3908; __pyx_clineno = __LINE__; goto __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_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1]; { __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_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3908; __pyx_clineno = __LINE__; goto __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_BufFmt_StackElem __pyx_stack[1]; 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, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3908; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; __pyx_pybuffernd_out.diminfo[1].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_out.diminfo[1].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[1]; /* "pandas/src/generated.pyx":3916 * int64_t fv * * n = len(values) # <<<<<<<<<<<<<< * k = len(indexer) * */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3916; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/src/generated.pyx":3917 * * n = len(values) * k = len(indexer) # <<<<<<<<<<<<<< * * if n == 0 or k == 0: */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_indexer)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3917; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_k = __pyx_t_1; /* "pandas/src/generated.pyx":3919 * k = len(indexer) * * if n == 0 or k == 0: # <<<<<<<<<<<<<< * return * */ __pyx_t_2 = ((__pyx_v_n == 0) != 0); if (!__pyx_t_2) { __pyx_t_3 = ((__pyx_v_k == 0) != 0); __pyx_t_4 = __pyx_t_3; } else { __pyx_t_4 = __pyx_t_2; } if (__pyx_t_4) { /* "pandas/src/generated.pyx":3920 * * if n == 0 or k == 0: * return # <<<<<<<<<<<<<< * * fv = fill_value */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; goto __pyx_L3; } __pyx_L3:; /* "pandas/src/generated.pyx":3922 * return * * fv = fill_value # <<<<<<<<<<<<<< * * IF False: */ __pyx_t_5 = __Pyx_PyInt_from_py_npy_int64(__pyx_v_fill_value); if (unlikely((__pyx_t_5 == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3922; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_fv = __pyx_t_5; /* "pandas/src/generated.pyx":3943 * return * * for j from 0 <= j < k: # <<<<<<<<<<<<<< * idx = indexer[j] * if idx == -1: */ __pyx_t_1 = __pyx_v_k; for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_1; __pyx_v_j++) { /* "pandas/src/generated.pyx":3944 * * for j from 0 <= j < k: * idx = indexer[j] # <<<<<<<<<<<<<< * if idx == -1: * for i from 0 <= i < n: */ __pyx_t_6 = __pyx_v_j; __pyx_v_idx = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_6, __pyx_pybuffernd_indexer.diminfo[0].strides)); /* "pandas/src/generated.pyx":3945 * for j from 0 <= j < k: * idx = indexer[j] * if idx == -1: # <<<<<<<<<<<<<< * for i from 0 <= i < n: * out[i, j] = fv */ __pyx_t_4 = ((__pyx_v_idx == -1) != 0); if (__pyx_t_4) { /* "pandas/src/generated.pyx":3946 * idx = indexer[j] * if idx == -1: * for i from 0 <= i < n: # <<<<<<<<<<<<<< * out[i, j] = fv * else: */ __pyx_t_7 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_7; __pyx_v_i++) { /* "pandas/src/generated.pyx":3947 * if idx == -1: * for i from 0 <= i < n: * out[i, j] = fv # <<<<<<<<<<<<<< * else: * for i from 0 <= i < n: */ __pyx_t_8 = __pyx_v_i; __pyx_t_9 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_8, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_9, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_fv; } goto __pyx_L6; } /*else*/ { /* "pandas/src/generated.pyx":3949 * out[i, j] = fv * else: * for i from 0 <= i < n: # <<<<<<<<<<<<<< * out[i, j] = values[i, idx] * */ __pyx_t_7 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_7; __pyx_v_i++) { /* "pandas/src/generated.pyx":3950 * else: * for i from 0 <= i < n: * out[i, j] = values[i, idx] # <<<<<<<<<<<<<< * * @cython.wraparound(False) */ __pyx_t_10 = __pyx_v_i; __pyx_t_11 = __pyx_v_idx; __pyx_t_12 = __pyx_v_i; __pyx_t_13 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_12, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_13, __pyx_pybuffernd_out.diminfo[1].strides) = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_10, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_11, __pyx_pybuffernd_values.diminfo[1].strides)); } } __pyx_L6:; } __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.take_2d_axis1_int32_int64", __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_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_323take_2d_axis1_int32_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_323take_2d_axis1_int32_float64 = {__Pyx_NAMESTR("take_2d_axis1_int32_float64"), (PyCFunction)__pyx_pw_6pandas_5algos_323take_2d_axis1_int32_float64, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_323take_2d_axis1_int32_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_values = 0; PyArrayObject *__pyx_v_indexer = 0; PyArrayObject *__pyx_v_out = 0; PyObject *__pyx_v_fill_value = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("take_2d_axis1_int32_float64 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__values,&__pyx_n_s__indexer,&__pyx_n_s__out,&__pyx_n_s__fill_value,0}; PyObject* values[4] = {0,0,0,0}; values[3] = __pyx_k_158; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__values)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__indexer)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_2d_axis1_int32_float64", 0, 3, 4, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3954; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__out)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_2d_axis1_int32_float64", 0, 3, 4, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3954; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__fill_value); if (value) { values[3] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "take_2d_axis1_int32_float64") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3954; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_values = ((PyArrayObject *)values[0]); __pyx_v_indexer = ((PyArrayObject *)values[1]); __pyx_v_out = ((PyArrayObject *)values[2]); __pyx_v_fill_value = values[3]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("take_2d_axis1_int32_float64", 0, 3, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3954; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.take_2d_axis1_int32_float64", __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_filename = __pyx_f[2]; __pyx_lineno = 3954; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_indexer), __pyx_ptype_5numpy_ndarray, 1, "indexer", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3955; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_5numpy_ndarray, 1, "out", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3956; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_322take_2d_axis1_int32_float64(__pyx_self, __pyx_v_values, __pyx_v_indexer, __pyx_v_out, __pyx_v_fill_value); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":3954 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_axis1_int32_float64(ndarray[int32_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[float64_t, ndim=2] out, */ static PyObject *__pyx_pf_6pandas_5algos_322take_2d_axis1_int32_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_k; Py_ssize_t __pyx_v_n; Py_ssize_t __pyx_v_idx; __pyx_t_5numpy_float64_t __pyx_v_fv; __Pyx_LocalBuf_ND __pyx_pybuffernd_indexer; __Pyx_Buffer __pyx_pybuffer_indexer; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_values; __Pyx_Buffer __pyx_pybuffer_values; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; int __pyx_t_2; int __pyx_t_3; int __pyx_t_4; __pyx_t_5numpy_float64_t __pyx_t_5; Py_ssize_t __pyx_t_6; Py_ssize_t __pyx_t_7; Py_ssize_t __pyx_t_8; Py_ssize_t __pyx_t_9; Py_ssize_t __pyx_t_10; Py_ssize_t __pyx_t_11; Py_ssize_t __pyx_t_12; Py_ssize_t __pyx_t_13; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("take_2d_axis1_int32_float64", 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_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; { __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_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3954; __pyx_clineno = __LINE__; goto __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_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1]; { __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_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3954; __pyx_clineno = __LINE__; goto __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_BufFmt_StackElem __pyx_stack[1]; 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, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3954; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; __pyx_pybuffernd_out.diminfo[1].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_out.diminfo[1].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[1]; /* "pandas/src/generated.pyx":3962 * float64_t fv * * n = len(values) # <<<<<<<<<<<<<< * k = len(indexer) * */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3962; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/src/generated.pyx":3963 * * n = len(values) * k = len(indexer) # <<<<<<<<<<<<<< * * if n == 0 or k == 0: */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_indexer)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3963; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_k = __pyx_t_1; /* "pandas/src/generated.pyx":3965 * k = len(indexer) * * if n == 0 or k == 0: # <<<<<<<<<<<<<< * return * */ __pyx_t_2 = ((__pyx_v_n == 0) != 0); if (!__pyx_t_2) { __pyx_t_3 = ((__pyx_v_k == 0) != 0); __pyx_t_4 = __pyx_t_3; } else { __pyx_t_4 = __pyx_t_2; } if (__pyx_t_4) { /* "pandas/src/generated.pyx":3966 * * if n == 0 or k == 0: * return # <<<<<<<<<<<<<< * * fv = fill_value */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; goto __pyx_L3; } __pyx_L3:; /* "pandas/src/generated.pyx":3968 * return * * fv = fill_value # <<<<<<<<<<<<<< * * IF False: */ __pyx_t_5 = __pyx_PyFloat_AsDouble(__pyx_v_fill_value); if (unlikely((__pyx_t_5 == (npy_float64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3968; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_fv = __pyx_t_5; /* "pandas/src/generated.pyx":3989 * return * * for j from 0 <= j < k: # <<<<<<<<<<<<<< * idx = indexer[j] * if idx == -1: */ __pyx_t_1 = __pyx_v_k; for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_1; __pyx_v_j++) { /* "pandas/src/generated.pyx":3990 * * for j from 0 <= j < k: * idx = indexer[j] # <<<<<<<<<<<<<< * if idx == -1: * for i from 0 <= i < n: */ __pyx_t_6 = __pyx_v_j; __pyx_v_idx = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_6, __pyx_pybuffernd_indexer.diminfo[0].strides)); /* "pandas/src/generated.pyx":3991 * for j from 0 <= j < k: * idx = indexer[j] * if idx == -1: # <<<<<<<<<<<<<< * for i from 0 <= i < n: * out[i, j] = fv */ __pyx_t_4 = ((__pyx_v_idx == -1) != 0); if (__pyx_t_4) { /* "pandas/src/generated.pyx":3992 * idx = indexer[j] * if idx == -1: * for i from 0 <= i < n: # <<<<<<<<<<<<<< * out[i, j] = fv * else: */ __pyx_t_7 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_7; __pyx_v_i++) { /* "pandas/src/generated.pyx":3993 * if idx == -1: * for i from 0 <= i < n: * out[i, j] = fv # <<<<<<<<<<<<<< * else: * for i from 0 <= i < n: */ __pyx_t_8 = __pyx_v_i; __pyx_t_9 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_8, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_9, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_fv; } goto __pyx_L6; } /*else*/ { /* "pandas/src/generated.pyx":3995 * out[i, j] = fv * else: * for i from 0 <= i < n: # <<<<<<<<<<<<<< * out[i, j] = values[i, idx] * */ __pyx_t_7 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_7; __pyx_v_i++) { /* "pandas/src/generated.pyx":3996 * else: * for i from 0 <= i < n: * out[i, j] = values[i, idx] # <<<<<<<<<<<<<< * * @cython.wraparound(False) */ __pyx_t_10 = __pyx_v_i; __pyx_t_11 = __pyx_v_idx; __pyx_t_12 = __pyx_v_i; __pyx_t_13 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_12, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_13, __pyx_pybuffernd_out.diminfo[1].strides) = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_10, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_11, __pyx_pybuffernd_values.diminfo[1].strides)); } } __pyx_L6:; } __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.take_2d_axis1_int32_float64", __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_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_325take_2d_axis1_int64_int64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_325take_2d_axis1_int64_int64 = {__Pyx_NAMESTR("take_2d_axis1_int64_int64"), (PyCFunction)__pyx_pw_6pandas_5algos_325take_2d_axis1_int64_int64, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_325take_2d_axis1_int64_int64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_values = 0; PyArrayObject *__pyx_v_indexer = 0; PyArrayObject *__pyx_v_out = 0; PyObject *__pyx_v_fill_value = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("take_2d_axis1_int64_int64 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__values,&__pyx_n_s__indexer,&__pyx_n_s__out,&__pyx_n_s__fill_value,0}; PyObject* values[4] = {0,0,0,0}; values[3] = __pyx_k_159; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__values)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__indexer)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_2d_axis1_int64_int64", 0, 3, 4, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4000; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__out)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_2d_axis1_int64_int64", 0, 3, 4, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4000; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__fill_value); if (value) { values[3] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "take_2d_axis1_int64_int64") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4000; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_values = ((PyArrayObject *)values[0]); __pyx_v_indexer = ((PyArrayObject *)values[1]); __pyx_v_out = ((PyArrayObject *)values[2]); __pyx_v_fill_value = values[3]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("take_2d_axis1_int64_int64", 0, 3, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4000; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.take_2d_axis1_int64_int64", __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_filename = __pyx_f[2]; __pyx_lineno = 4000; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_indexer), __pyx_ptype_5numpy_ndarray, 1, "indexer", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4001; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_5numpy_ndarray, 1, "out", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4002; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_324take_2d_axis1_int64_int64(__pyx_self, __pyx_v_values, __pyx_v_indexer, __pyx_v_out, __pyx_v_fill_value); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":4000 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_axis1_int64_int64(ndarray[int64_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[int64_t, ndim=2] out, */ static PyObject *__pyx_pf_6pandas_5algos_324take_2d_axis1_int64_int64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_k; Py_ssize_t __pyx_v_n; Py_ssize_t __pyx_v_idx; __pyx_t_5numpy_int64_t __pyx_v_fv; __pyx_t_5numpy_int64_t *__pyx_v_v; __pyx_t_5numpy_int64_t *__pyx_v_o; __Pyx_LocalBuf_ND __pyx_pybuffernd_indexer; __Pyx_Buffer __pyx_pybuffer_indexer; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_values; __Pyx_Buffer __pyx_pybuffer_values; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; int __pyx_t_2; int __pyx_t_3; int __pyx_t_4; __pyx_t_5numpy_int64_t __pyx_t_5; int __pyx_t_6; Py_ssize_t __pyx_t_7; Py_ssize_t __pyx_t_8; Py_ssize_t __pyx_t_9; Py_ssize_t __pyx_t_10; long __pyx_t_11; long __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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("take_2d_axis1_int64_int64", 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_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; { __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_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4000; __pyx_clineno = __LINE__; goto __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_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1]; { __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_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4000; __pyx_clineno = __LINE__; goto __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_BufFmt_StackElem __pyx_stack[1]; 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, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4000; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; __pyx_pybuffernd_out.diminfo[1].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_out.diminfo[1].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[1]; /* "pandas/src/generated.pyx":4008 * int64_t fv * * n = len(values) # <<<<<<<<<<<<<< * k = len(indexer) * */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4008; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/src/generated.pyx":4009 * * n = len(values) * k = len(indexer) # <<<<<<<<<<<<<< * * if n == 0 or k == 0: */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_indexer)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4009; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_k = __pyx_t_1; /* "pandas/src/generated.pyx":4011 * k = len(indexer) * * if n == 0 or k == 0: # <<<<<<<<<<<<<< * return * */ __pyx_t_2 = ((__pyx_v_n == 0) != 0); if (!__pyx_t_2) { __pyx_t_3 = ((__pyx_v_k == 0) != 0); __pyx_t_4 = __pyx_t_3; } else { __pyx_t_4 = __pyx_t_2; } if (__pyx_t_4) { /* "pandas/src/generated.pyx":4012 * * if n == 0 or k == 0: * return # <<<<<<<<<<<<<< * * fv = fill_value */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; goto __pyx_L3; } __pyx_L3:; /* "pandas/src/generated.pyx":4014 * return * * fv = fill_value # <<<<<<<<<<<<<< * * IF True: */ __pyx_t_5 = __Pyx_PyInt_from_py_npy_int64(__pyx_v_fill_value); if (unlikely((__pyx_t_5 == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4014; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_fv = __pyx_t_5; /* "pandas/src/generated.pyx":4020 * int64_t *v, *o * * if (values.strides[0] == out.strides[0] and # <<<<<<<<<<<<<< * values.strides[0] == sizeof(int64_t) and * sizeof(int64_t) * n >= 256): */ __pyx_t_4 = (((__pyx_v_values->strides[0]) == (__pyx_v_out->strides[0])) != 0); if (__pyx_t_4) { /* "pandas/src/generated.pyx":4021 * * if (values.strides[0] == out.strides[0] and * values.strides[0] == sizeof(int64_t) and # <<<<<<<<<<<<<< * sizeof(int64_t) * n >= 256): * */ __pyx_t_2 = (((__pyx_v_values->strides[0]) == (sizeof(__pyx_t_5numpy_int64_t))) != 0); if (__pyx_t_2) { /* "pandas/src/generated.pyx":4022 * if (values.strides[0] == out.strides[0] and * values.strides[0] == sizeof(int64_t) and * sizeof(int64_t) * n >= 256): # <<<<<<<<<<<<<< * * for j from 0 <= j < k: */ __pyx_t_3 = ((((sizeof(__pyx_t_5numpy_int64_t)) * __pyx_v_n) >= 256) != 0); __pyx_t_6 = __pyx_t_3; } else { __pyx_t_6 = __pyx_t_2; } __pyx_t_2 = __pyx_t_6; } else { __pyx_t_2 = __pyx_t_4; } if (__pyx_t_2) { /* "pandas/src/generated.pyx":4024 * sizeof(int64_t) * n >= 256): * * for j from 0 <= j < k: # <<<<<<<<<<<<<< * idx = indexer[j] * if idx == -1: */ __pyx_t_1 = __pyx_v_k; for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_1; __pyx_v_j++) { /* "pandas/src/generated.pyx":4025 * * for j from 0 <= j < k: * idx = indexer[j] # <<<<<<<<<<<<<< * if idx == -1: * for i from 0 <= i < n: */ __pyx_t_7 = __pyx_v_j; __pyx_v_idx = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_7, __pyx_pybuffernd_indexer.diminfo[0].strides)); /* "pandas/src/generated.pyx":4026 * for j from 0 <= j < k: * idx = indexer[j] * if idx == -1: # <<<<<<<<<<<<<< * for i from 0 <= i < n: * out[i, j] = fv */ __pyx_t_2 = ((__pyx_v_idx == -1) != 0); if (__pyx_t_2) { /* "pandas/src/generated.pyx":4027 * idx = indexer[j] * if idx == -1: * for i from 0 <= i < n: # <<<<<<<<<<<<<< * out[i, j] = fv * else: */ __pyx_t_8 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_8; __pyx_v_i++) { /* "pandas/src/generated.pyx":4028 * if idx == -1: * for i from 0 <= i < n: * out[i, j] = fv # <<<<<<<<<<<<<< * else: * v = &values[0, idx] */ __pyx_t_9 = __pyx_v_i; __pyx_t_10 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_9, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_10, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_fv; } goto __pyx_L7; } /*else*/ { /* "pandas/src/generated.pyx":4030 * out[i, j] = fv * else: * v = &values[0, idx] # <<<<<<<<<<<<<< * o = &out[0, j] * memmove(o, v, (sizeof(int64_t) * n)) */ __pyx_t_11 = 0; __pyx_t_8 = __pyx_v_idx; __pyx_v_v = (&(*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_11, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_8, __pyx_pybuffernd_values.diminfo[1].strides))); /* "pandas/src/generated.pyx":4031 * else: * v = &values[0, idx] * o = &out[0, j] # <<<<<<<<<<<<<< * memmove(o, v, (sizeof(int64_t) * n)) * return */ __pyx_t_12 = 0; __pyx_t_13 = __pyx_v_j; __pyx_v_o = (&(*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_12, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_13, __pyx_pybuffernd_out.diminfo[1].strides))); /* "pandas/src/generated.pyx":4032 * v = &values[0, idx] * o = &out[0, j] * memmove(o, v, (sizeof(int64_t) * n)) # <<<<<<<<<<<<<< * return * */ memmove(__pyx_v_o, __pyx_v_v, ((size_t)((sizeof(__pyx_t_5numpy_int64_t)) * __pyx_v_n))); } __pyx_L7:; } /* "pandas/src/generated.pyx":4033 * o = &out[0, j] * memmove(o, v, (sizeof(int64_t) * n)) * return # <<<<<<<<<<<<<< * * for j from 0 <= j < k: */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; goto __pyx_L4; } __pyx_L4:; /* "pandas/src/generated.pyx":4035 * return * * for j from 0 <= j < k: # <<<<<<<<<<<<<< * idx = indexer[j] * if idx == -1: */ __pyx_t_1 = __pyx_v_k; for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_1; __pyx_v_j++) { /* "pandas/src/generated.pyx":4036 * * for j from 0 <= j < k: * idx = indexer[j] # <<<<<<<<<<<<<< * if idx == -1: * for i from 0 <= i < n: */ __pyx_t_14 = __pyx_v_j; __pyx_v_idx = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_indexer.diminfo[0].strides)); /* "pandas/src/generated.pyx":4037 * for j from 0 <= j < k: * idx = indexer[j] * if idx == -1: # <<<<<<<<<<<<<< * for i from 0 <= i < n: * out[i, j] = fv */ __pyx_t_2 = ((__pyx_v_idx == -1) != 0); if (__pyx_t_2) { /* "pandas/src/generated.pyx":4038 * idx = indexer[j] * if idx == -1: * for i from 0 <= i < n: # <<<<<<<<<<<<<< * out[i, j] = fv * else: */ __pyx_t_15 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_15; __pyx_v_i++) { /* "pandas/src/generated.pyx":4039 * if idx == -1: * for i from 0 <= i < n: * out[i, j] = fv # <<<<<<<<<<<<<< * else: * for i from 0 <= i < n: */ __pyx_t_16 = __pyx_v_i; __pyx_t_17 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_17, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_fv; } goto __pyx_L12; } /*else*/ { /* "pandas/src/generated.pyx":4041 * out[i, j] = fv * else: * for i from 0 <= i < n: # <<<<<<<<<<<<<< * out[i, j] = values[i, idx] * */ __pyx_t_15 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_15; __pyx_v_i++) { /* "pandas/src/generated.pyx":4042 * else: * for i from 0 <= i < n: * out[i, j] = values[i, idx] # <<<<<<<<<<<<<< * * @cython.wraparound(False) */ __pyx_t_18 = __pyx_v_i; __pyx_t_19 = __pyx_v_idx; __pyx_t_20 = __pyx_v_i; __pyx_t_21 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_21, __pyx_pybuffernd_out.diminfo[1].strides) = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_19, __pyx_pybuffernd_values.diminfo[1].strides)); } } __pyx_L12:; } __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.take_2d_axis1_int64_int64", __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_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_327take_2d_axis1_int64_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_327take_2d_axis1_int64_float64 = {__Pyx_NAMESTR("take_2d_axis1_int64_float64"), (PyCFunction)__pyx_pw_6pandas_5algos_327take_2d_axis1_int64_float64, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_327take_2d_axis1_int64_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_values = 0; PyArrayObject *__pyx_v_indexer = 0; PyArrayObject *__pyx_v_out = 0; PyObject *__pyx_v_fill_value = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("take_2d_axis1_int64_float64 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__values,&__pyx_n_s__indexer,&__pyx_n_s__out,&__pyx_n_s__fill_value,0}; PyObject* values[4] = {0,0,0,0}; values[3] = __pyx_k_160; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__values)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__indexer)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_2d_axis1_int64_float64", 0, 3, 4, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4046; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__out)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_2d_axis1_int64_float64", 0, 3, 4, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4046; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__fill_value); if (value) { values[3] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "take_2d_axis1_int64_float64") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4046; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_values = ((PyArrayObject *)values[0]); __pyx_v_indexer = ((PyArrayObject *)values[1]); __pyx_v_out = ((PyArrayObject *)values[2]); __pyx_v_fill_value = values[3]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("take_2d_axis1_int64_float64", 0, 3, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4046; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.take_2d_axis1_int64_float64", __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_filename = __pyx_f[2]; __pyx_lineno = 4046; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_indexer), __pyx_ptype_5numpy_ndarray, 1, "indexer", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4047; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_5numpy_ndarray, 1, "out", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4048; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_326take_2d_axis1_int64_float64(__pyx_self, __pyx_v_values, __pyx_v_indexer, __pyx_v_out, __pyx_v_fill_value); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":4046 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_axis1_int64_float64(ndarray[int64_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[float64_t, ndim=2] out, */ static PyObject *__pyx_pf_6pandas_5algos_326take_2d_axis1_int64_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_k; Py_ssize_t __pyx_v_n; Py_ssize_t __pyx_v_idx; __pyx_t_5numpy_float64_t __pyx_v_fv; __Pyx_LocalBuf_ND __pyx_pybuffernd_indexer; __Pyx_Buffer __pyx_pybuffer_indexer; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_values; __Pyx_Buffer __pyx_pybuffer_values; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; int __pyx_t_2; int __pyx_t_3; int __pyx_t_4; __pyx_t_5numpy_float64_t __pyx_t_5; Py_ssize_t __pyx_t_6; Py_ssize_t __pyx_t_7; Py_ssize_t __pyx_t_8; Py_ssize_t __pyx_t_9; Py_ssize_t __pyx_t_10; Py_ssize_t __pyx_t_11; Py_ssize_t __pyx_t_12; Py_ssize_t __pyx_t_13; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("take_2d_axis1_int64_float64", 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_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; { __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_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4046; __pyx_clineno = __LINE__; goto __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_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1]; { __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_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4046; __pyx_clineno = __LINE__; goto __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_BufFmt_StackElem __pyx_stack[1]; 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, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4046; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; __pyx_pybuffernd_out.diminfo[1].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_out.diminfo[1].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[1]; /* "pandas/src/generated.pyx":4054 * float64_t fv * * n = len(values) # <<<<<<<<<<<<<< * k = len(indexer) * */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4054; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/src/generated.pyx":4055 * * n = len(values) * k = len(indexer) # <<<<<<<<<<<<<< * * if n == 0 or k == 0: */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_indexer)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4055; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_k = __pyx_t_1; /* "pandas/src/generated.pyx":4057 * k = len(indexer) * * if n == 0 or k == 0: # <<<<<<<<<<<<<< * return * */ __pyx_t_2 = ((__pyx_v_n == 0) != 0); if (!__pyx_t_2) { __pyx_t_3 = ((__pyx_v_k == 0) != 0); __pyx_t_4 = __pyx_t_3; } else { __pyx_t_4 = __pyx_t_2; } if (__pyx_t_4) { /* "pandas/src/generated.pyx":4058 * * if n == 0 or k == 0: * return # <<<<<<<<<<<<<< * * fv = fill_value */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; goto __pyx_L3; } __pyx_L3:; /* "pandas/src/generated.pyx":4060 * return * * fv = fill_value # <<<<<<<<<<<<<< * * IF False: */ __pyx_t_5 = __pyx_PyFloat_AsDouble(__pyx_v_fill_value); if (unlikely((__pyx_t_5 == (npy_float64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4060; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_fv = __pyx_t_5; /* "pandas/src/generated.pyx":4081 * return * * for j from 0 <= j < k: # <<<<<<<<<<<<<< * idx = indexer[j] * if idx == -1: */ __pyx_t_1 = __pyx_v_k; for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_1; __pyx_v_j++) { /* "pandas/src/generated.pyx":4082 * * for j from 0 <= j < k: * idx = indexer[j] # <<<<<<<<<<<<<< * if idx == -1: * for i from 0 <= i < n: */ __pyx_t_6 = __pyx_v_j; __pyx_v_idx = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_6, __pyx_pybuffernd_indexer.diminfo[0].strides)); /* "pandas/src/generated.pyx":4083 * for j from 0 <= j < k: * idx = indexer[j] * if idx == -1: # <<<<<<<<<<<<<< * for i from 0 <= i < n: * out[i, j] = fv */ __pyx_t_4 = ((__pyx_v_idx == -1) != 0); if (__pyx_t_4) { /* "pandas/src/generated.pyx":4084 * idx = indexer[j] * if idx == -1: * for i from 0 <= i < n: # <<<<<<<<<<<<<< * out[i, j] = fv * else: */ __pyx_t_7 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_7; __pyx_v_i++) { /* "pandas/src/generated.pyx":4085 * if idx == -1: * for i from 0 <= i < n: * out[i, j] = fv # <<<<<<<<<<<<<< * else: * for i from 0 <= i < n: */ __pyx_t_8 = __pyx_v_i; __pyx_t_9 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_8, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_9, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_fv; } goto __pyx_L6; } /*else*/ { /* "pandas/src/generated.pyx":4087 * out[i, j] = fv * else: * for i from 0 <= i < n: # <<<<<<<<<<<<<< * out[i, j] = values[i, idx] * */ __pyx_t_7 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_7; __pyx_v_i++) { /* "pandas/src/generated.pyx":4088 * else: * for i from 0 <= i < n: * out[i, j] = values[i, idx] # <<<<<<<<<<<<<< * * @cython.wraparound(False) */ __pyx_t_10 = __pyx_v_i; __pyx_t_11 = __pyx_v_idx; __pyx_t_12 = __pyx_v_i; __pyx_t_13 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_12, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_13, __pyx_pybuffernd_out.diminfo[1].strides) = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_10, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_11, __pyx_pybuffernd_values.diminfo[1].strides)); } } __pyx_L6:; } __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.take_2d_axis1_int64_float64", __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_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_329take_2d_axis1_float32_float32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_329take_2d_axis1_float32_float32 = {__Pyx_NAMESTR("take_2d_axis1_float32_float32"), (PyCFunction)__pyx_pw_6pandas_5algos_329take_2d_axis1_float32_float32, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_329take_2d_axis1_float32_float32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_values = 0; PyArrayObject *__pyx_v_indexer = 0; PyArrayObject *__pyx_v_out = 0; PyObject *__pyx_v_fill_value = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("take_2d_axis1_float32_float32 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__values,&__pyx_n_s__indexer,&__pyx_n_s__out,&__pyx_n_s__fill_value,0}; PyObject* values[4] = {0,0,0,0}; values[3] = __pyx_k_161; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__values)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__indexer)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_2d_axis1_float32_float32", 0, 3, 4, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4092; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__out)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_2d_axis1_float32_float32", 0, 3, 4, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4092; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__fill_value); if (value) { values[3] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "take_2d_axis1_float32_float32") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4092; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_values = ((PyArrayObject *)values[0]); __pyx_v_indexer = ((PyArrayObject *)values[1]); __pyx_v_out = ((PyArrayObject *)values[2]); __pyx_v_fill_value = values[3]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("take_2d_axis1_float32_float32", 0, 3, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4092; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.take_2d_axis1_float32_float32", __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_filename = __pyx_f[2]; __pyx_lineno = 4092; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_indexer), __pyx_ptype_5numpy_ndarray, 1, "indexer", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4093; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_5numpy_ndarray, 1, "out", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4094; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_328take_2d_axis1_float32_float32(__pyx_self, __pyx_v_values, __pyx_v_indexer, __pyx_v_out, __pyx_v_fill_value); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":4092 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_axis1_float32_float32(ndarray[float32_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[float32_t, ndim=2] out, */ static PyObject *__pyx_pf_6pandas_5algos_328take_2d_axis1_float32_float32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_k; Py_ssize_t __pyx_v_n; Py_ssize_t __pyx_v_idx; __pyx_t_5numpy_float32_t __pyx_v_fv; __pyx_t_5numpy_float32_t *__pyx_v_v; __pyx_t_5numpy_float32_t *__pyx_v_o; __Pyx_LocalBuf_ND __pyx_pybuffernd_indexer; __Pyx_Buffer __pyx_pybuffer_indexer; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_values; __Pyx_Buffer __pyx_pybuffer_values; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; int __pyx_t_2; int __pyx_t_3; int __pyx_t_4; __pyx_t_5numpy_float32_t __pyx_t_5; int __pyx_t_6; Py_ssize_t __pyx_t_7; Py_ssize_t __pyx_t_8; Py_ssize_t __pyx_t_9; Py_ssize_t __pyx_t_10; long __pyx_t_11; long __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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("take_2d_axis1_float32_float32", 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_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; { __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_float32_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4092; __pyx_clineno = __LINE__; goto __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_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1]; { __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_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4092; __pyx_clineno = __LINE__; goto __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_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_v_out, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4092; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; __pyx_pybuffernd_out.diminfo[1].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_out.diminfo[1].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[1]; /* "pandas/src/generated.pyx":4100 * float32_t fv * * n = len(values) # <<<<<<<<<<<<<< * k = len(indexer) * */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4100; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/src/generated.pyx":4101 * * n = len(values) * k = len(indexer) # <<<<<<<<<<<<<< * * if n == 0 or k == 0: */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_indexer)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4101; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_k = __pyx_t_1; /* "pandas/src/generated.pyx":4103 * k = len(indexer) * * if n == 0 or k == 0: # <<<<<<<<<<<<<< * return * */ __pyx_t_2 = ((__pyx_v_n == 0) != 0); if (!__pyx_t_2) { __pyx_t_3 = ((__pyx_v_k == 0) != 0); __pyx_t_4 = __pyx_t_3; } else { __pyx_t_4 = __pyx_t_2; } if (__pyx_t_4) { /* "pandas/src/generated.pyx":4104 * * if n == 0 or k == 0: * return # <<<<<<<<<<<<<< * * fv = fill_value */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; goto __pyx_L3; } __pyx_L3:; /* "pandas/src/generated.pyx":4106 * return * * fv = fill_value # <<<<<<<<<<<<<< * * IF True: */ __pyx_t_5 = __pyx_PyFloat_AsFloat(__pyx_v_fill_value); if (unlikely((__pyx_t_5 == (npy_float32)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4106; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_fv = __pyx_t_5; /* "pandas/src/generated.pyx":4112 * float32_t *v, *o * * if (values.strides[0] == out.strides[0] and # <<<<<<<<<<<<<< * values.strides[0] == sizeof(float32_t) and * sizeof(float32_t) * n >= 256): */ __pyx_t_4 = (((__pyx_v_values->strides[0]) == (__pyx_v_out->strides[0])) != 0); if (__pyx_t_4) { /* "pandas/src/generated.pyx":4113 * * if (values.strides[0] == out.strides[0] and * values.strides[0] == sizeof(float32_t) and # <<<<<<<<<<<<<< * sizeof(float32_t) * n >= 256): * */ __pyx_t_2 = (((__pyx_v_values->strides[0]) == (sizeof(__pyx_t_5numpy_float32_t))) != 0); if (__pyx_t_2) { /* "pandas/src/generated.pyx":4114 * if (values.strides[0] == out.strides[0] and * values.strides[0] == sizeof(float32_t) and * sizeof(float32_t) * n >= 256): # <<<<<<<<<<<<<< * * for j from 0 <= j < k: */ __pyx_t_3 = ((((sizeof(__pyx_t_5numpy_float32_t)) * __pyx_v_n) >= 256) != 0); __pyx_t_6 = __pyx_t_3; } else { __pyx_t_6 = __pyx_t_2; } __pyx_t_2 = __pyx_t_6; } else { __pyx_t_2 = __pyx_t_4; } if (__pyx_t_2) { /* "pandas/src/generated.pyx":4116 * sizeof(float32_t) * n >= 256): * * for j from 0 <= j < k: # <<<<<<<<<<<<<< * idx = indexer[j] * if idx == -1: */ __pyx_t_1 = __pyx_v_k; for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_1; __pyx_v_j++) { /* "pandas/src/generated.pyx":4117 * * for j from 0 <= j < k: * idx = indexer[j] # <<<<<<<<<<<<<< * if idx == -1: * for i from 0 <= i < n: */ __pyx_t_7 = __pyx_v_j; __pyx_v_idx = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_7, __pyx_pybuffernd_indexer.diminfo[0].strides)); /* "pandas/src/generated.pyx":4118 * for j from 0 <= j < k: * idx = indexer[j] * if idx == -1: # <<<<<<<<<<<<<< * for i from 0 <= i < n: * out[i, j] = fv */ __pyx_t_2 = ((__pyx_v_idx == -1) != 0); if (__pyx_t_2) { /* "pandas/src/generated.pyx":4119 * idx = indexer[j] * if idx == -1: * for i from 0 <= i < n: # <<<<<<<<<<<<<< * out[i, j] = fv * else: */ __pyx_t_8 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_8; __pyx_v_i++) { /* "pandas/src/generated.pyx":4120 * if idx == -1: * for i from 0 <= i < n: * out[i, j] = fv # <<<<<<<<<<<<<< * else: * v = &values[0, idx] */ __pyx_t_9 = __pyx_v_i; __pyx_t_10 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_9, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_10, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_fv; } goto __pyx_L7; } /*else*/ { /* "pandas/src/generated.pyx":4122 * out[i, j] = fv * else: * v = &values[0, idx] # <<<<<<<<<<<<<< * o = &out[0, j] * memmove(o, v, (sizeof(float32_t) * n)) */ __pyx_t_11 = 0; __pyx_t_8 = __pyx_v_idx; __pyx_v_v = (&(*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_11, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_8, __pyx_pybuffernd_values.diminfo[1].strides))); /* "pandas/src/generated.pyx":4123 * else: * v = &values[0, idx] * o = &out[0, j] # <<<<<<<<<<<<<< * memmove(o, v, (sizeof(float32_t) * n)) * return */ __pyx_t_12 = 0; __pyx_t_13 = __pyx_v_j; __pyx_v_o = (&(*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_12, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_13, __pyx_pybuffernd_out.diminfo[1].strides))); /* "pandas/src/generated.pyx":4124 * v = &values[0, idx] * o = &out[0, j] * memmove(o, v, (sizeof(float32_t) * n)) # <<<<<<<<<<<<<< * return * */ memmove(__pyx_v_o, __pyx_v_v, ((size_t)((sizeof(__pyx_t_5numpy_float32_t)) * __pyx_v_n))); } __pyx_L7:; } /* "pandas/src/generated.pyx":4125 * o = &out[0, j] * memmove(o, v, (sizeof(float32_t) * n)) * return # <<<<<<<<<<<<<< * * for j from 0 <= j < k: */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; goto __pyx_L4; } __pyx_L4:; /* "pandas/src/generated.pyx":4127 * return * * for j from 0 <= j < k: # <<<<<<<<<<<<<< * idx = indexer[j] * if idx == -1: */ __pyx_t_1 = __pyx_v_k; for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_1; __pyx_v_j++) { /* "pandas/src/generated.pyx":4128 * * for j from 0 <= j < k: * idx = indexer[j] # <<<<<<<<<<<<<< * if idx == -1: * for i from 0 <= i < n: */ __pyx_t_14 = __pyx_v_j; __pyx_v_idx = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_indexer.diminfo[0].strides)); /* "pandas/src/generated.pyx":4129 * for j from 0 <= j < k: * idx = indexer[j] * if idx == -1: # <<<<<<<<<<<<<< * for i from 0 <= i < n: * out[i, j] = fv */ __pyx_t_2 = ((__pyx_v_idx == -1) != 0); if (__pyx_t_2) { /* "pandas/src/generated.pyx":4130 * idx = indexer[j] * if idx == -1: * for i from 0 <= i < n: # <<<<<<<<<<<<<< * out[i, j] = fv * else: */ __pyx_t_15 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_15; __pyx_v_i++) { /* "pandas/src/generated.pyx":4131 * if idx == -1: * for i from 0 <= i < n: * out[i, j] = fv # <<<<<<<<<<<<<< * else: * for i from 0 <= i < n: */ __pyx_t_16 = __pyx_v_i; __pyx_t_17 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_17, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_fv; } goto __pyx_L12; } /*else*/ { /* "pandas/src/generated.pyx":4133 * out[i, j] = fv * else: * for i from 0 <= i < n: # <<<<<<<<<<<<<< * out[i, j] = values[i, idx] * */ __pyx_t_15 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_15; __pyx_v_i++) { /* "pandas/src/generated.pyx":4134 * else: * for i from 0 <= i < n: * out[i, j] = values[i, idx] # <<<<<<<<<<<<<< * * @cython.wraparound(False) */ __pyx_t_18 = __pyx_v_i; __pyx_t_19 = __pyx_v_idx; __pyx_t_20 = __pyx_v_i; __pyx_t_21 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_21, __pyx_pybuffernd_out.diminfo[1].strides) = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_19, __pyx_pybuffernd_values.diminfo[1].strides)); } } __pyx_L12:; } __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.take_2d_axis1_float32_float32", __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_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_331take_2d_axis1_float32_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_331take_2d_axis1_float32_float64 = {__Pyx_NAMESTR("take_2d_axis1_float32_float64"), (PyCFunction)__pyx_pw_6pandas_5algos_331take_2d_axis1_float32_float64, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_331take_2d_axis1_float32_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_values = 0; PyArrayObject *__pyx_v_indexer = 0; PyArrayObject *__pyx_v_out = 0; PyObject *__pyx_v_fill_value = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("take_2d_axis1_float32_float64 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__values,&__pyx_n_s__indexer,&__pyx_n_s__out,&__pyx_n_s__fill_value,0}; PyObject* values[4] = {0,0,0,0}; values[3] = __pyx_k_162; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__values)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__indexer)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_2d_axis1_float32_float64", 0, 3, 4, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4138; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__out)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_2d_axis1_float32_float64", 0, 3, 4, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4138; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__fill_value); if (value) { values[3] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "take_2d_axis1_float32_float64") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4138; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_values = ((PyArrayObject *)values[0]); __pyx_v_indexer = ((PyArrayObject *)values[1]); __pyx_v_out = ((PyArrayObject *)values[2]); __pyx_v_fill_value = values[3]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("take_2d_axis1_float32_float64", 0, 3, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4138; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.take_2d_axis1_float32_float64", __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_filename = __pyx_f[2]; __pyx_lineno = 4138; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_indexer), __pyx_ptype_5numpy_ndarray, 1, "indexer", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4139; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_5numpy_ndarray, 1, "out", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4140; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_330take_2d_axis1_float32_float64(__pyx_self, __pyx_v_values, __pyx_v_indexer, __pyx_v_out, __pyx_v_fill_value); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":4138 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_axis1_float32_float64(ndarray[float32_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[float64_t, ndim=2] out, */ static PyObject *__pyx_pf_6pandas_5algos_330take_2d_axis1_float32_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_k; Py_ssize_t __pyx_v_n; Py_ssize_t __pyx_v_idx; __pyx_t_5numpy_float64_t __pyx_v_fv; __Pyx_LocalBuf_ND __pyx_pybuffernd_indexer; __Pyx_Buffer __pyx_pybuffer_indexer; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_values; __Pyx_Buffer __pyx_pybuffer_values; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; int __pyx_t_2; int __pyx_t_3; int __pyx_t_4; __pyx_t_5numpy_float64_t __pyx_t_5; Py_ssize_t __pyx_t_6; Py_ssize_t __pyx_t_7; Py_ssize_t __pyx_t_8; Py_ssize_t __pyx_t_9; Py_ssize_t __pyx_t_10; Py_ssize_t __pyx_t_11; Py_ssize_t __pyx_t_12; Py_ssize_t __pyx_t_13; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("take_2d_axis1_float32_float64", 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_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; { __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_float32_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4138; __pyx_clineno = __LINE__; goto __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_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1]; { __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_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4138; __pyx_clineno = __LINE__; goto __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_BufFmt_StackElem __pyx_stack[1]; 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, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4138; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; __pyx_pybuffernd_out.diminfo[1].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_out.diminfo[1].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[1]; /* "pandas/src/generated.pyx":4146 * float64_t fv * * n = len(values) # <<<<<<<<<<<<<< * k = len(indexer) * */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4146; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/src/generated.pyx":4147 * * n = len(values) * k = len(indexer) # <<<<<<<<<<<<<< * * if n == 0 or k == 0: */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_indexer)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4147; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_k = __pyx_t_1; /* "pandas/src/generated.pyx":4149 * k = len(indexer) * * if n == 0 or k == 0: # <<<<<<<<<<<<<< * return * */ __pyx_t_2 = ((__pyx_v_n == 0) != 0); if (!__pyx_t_2) { __pyx_t_3 = ((__pyx_v_k == 0) != 0); __pyx_t_4 = __pyx_t_3; } else { __pyx_t_4 = __pyx_t_2; } if (__pyx_t_4) { /* "pandas/src/generated.pyx":4150 * * if n == 0 or k == 0: * return # <<<<<<<<<<<<<< * * fv = fill_value */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; goto __pyx_L3; } __pyx_L3:; /* "pandas/src/generated.pyx":4152 * return * * fv = fill_value # <<<<<<<<<<<<<< * * IF False: */ __pyx_t_5 = __pyx_PyFloat_AsDouble(__pyx_v_fill_value); if (unlikely((__pyx_t_5 == (npy_float64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4152; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_fv = __pyx_t_5; /* "pandas/src/generated.pyx":4173 * return * * for j from 0 <= j < k: # <<<<<<<<<<<<<< * idx = indexer[j] * if idx == -1: */ __pyx_t_1 = __pyx_v_k; for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_1; __pyx_v_j++) { /* "pandas/src/generated.pyx":4174 * * for j from 0 <= j < k: * idx = indexer[j] # <<<<<<<<<<<<<< * if idx == -1: * for i from 0 <= i < n: */ __pyx_t_6 = __pyx_v_j; __pyx_v_idx = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_6, __pyx_pybuffernd_indexer.diminfo[0].strides)); /* "pandas/src/generated.pyx":4175 * for j from 0 <= j < k: * idx = indexer[j] * if idx == -1: # <<<<<<<<<<<<<< * for i from 0 <= i < n: * out[i, j] = fv */ __pyx_t_4 = ((__pyx_v_idx == -1) != 0); if (__pyx_t_4) { /* "pandas/src/generated.pyx":4176 * idx = indexer[j] * if idx == -1: * for i from 0 <= i < n: # <<<<<<<<<<<<<< * out[i, j] = fv * else: */ __pyx_t_7 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_7; __pyx_v_i++) { /* "pandas/src/generated.pyx":4177 * if idx == -1: * for i from 0 <= i < n: * out[i, j] = fv # <<<<<<<<<<<<<< * else: * for i from 0 <= i < n: */ __pyx_t_8 = __pyx_v_i; __pyx_t_9 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_8, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_9, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_fv; } goto __pyx_L6; } /*else*/ { /* "pandas/src/generated.pyx":4179 * out[i, j] = fv * else: * for i from 0 <= i < n: # <<<<<<<<<<<<<< * out[i, j] = values[i, idx] * */ __pyx_t_7 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_7; __pyx_v_i++) { /* "pandas/src/generated.pyx":4180 * else: * for i from 0 <= i < n: * out[i, j] = values[i, idx] # <<<<<<<<<<<<<< * * @cython.wraparound(False) */ __pyx_t_10 = __pyx_v_i; __pyx_t_11 = __pyx_v_idx; __pyx_t_12 = __pyx_v_i; __pyx_t_13 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_12, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_13, __pyx_pybuffernd_out.diminfo[1].strides) = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_10, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_11, __pyx_pybuffernd_values.diminfo[1].strides)); } } __pyx_L6:; } __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.take_2d_axis1_float32_float64", __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_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_333take_2d_axis1_float64_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_333take_2d_axis1_float64_float64 = {__Pyx_NAMESTR("take_2d_axis1_float64_float64"), (PyCFunction)__pyx_pw_6pandas_5algos_333take_2d_axis1_float64_float64, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_333take_2d_axis1_float64_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_values = 0; PyArrayObject *__pyx_v_indexer = 0; PyArrayObject *__pyx_v_out = 0; PyObject *__pyx_v_fill_value = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("take_2d_axis1_float64_float64 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__values,&__pyx_n_s__indexer,&__pyx_n_s__out,&__pyx_n_s__fill_value,0}; PyObject* values[4] = {0,0,0,0}; values[3] = __pyx_k_163; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__values)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__indexer)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_2d_axis1_float64_float64", 0, 3, 4, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4184; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__out)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_2d_axis1_float64_float64", 0, 3, 4, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4184; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__fill_value); if (value) { values[3] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "take_2d_axis1_float64_float64") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4184; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_values = ((PyArrayObject *)values[0]); __pyx_v_indexer = ((PyArrayObject *)values[1]); __pyx_v_out = ((PyArrayObject *)values[2]); __pyx_v_fill_value = values[3]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("take_2d_axis1_float64_float64", 0, 3, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4184; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.take_2d_axis1_float64_float64", __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_filename = __pyx_f[2]; __pyx_lineno = 4184; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_indexer), __pyx_ptype_5numpy_ndarray, 1, "indexer", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4185; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_5numpy_ndarray, 1, "out", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4186; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_332take_2d_axis1_float64_float64(__pyx_self, __pyx_v_values, __pyx_v_indexer, __pyx_v_out, __pyx_v_fill_value); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":4184 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_axis1_float64_float64(ndarray[float64_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[float64_t, ndim=2] out, */ static PyObject *__pyx_pf_6pandas_5algos_332take_2d_axis1_float64_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_k; Py_ssize_t __pyx_v_n; Py_ssize_t __pyx_v_idx; __pyx_t_5numpy_float64_t __pyx_v_fv; __pyx_t_5numpy_float64_t *__pyx_v_v; __pyx_t_5numpy_float64_t *__pyx_v_o; __Pyx_LocalBuf_ND __pyx_pybuffernd_indexer; __Pyx_Buffer __pyx_pybuffer_indexer; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_values; __Pyx_Buffer __pyx_pybuffer_values; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; int __pyx_t_2; int __pyx_t_3; int __pyx_t_4; __pyx_t_5numpy_float64_t __pyx_t_5; int __pyx_t_6; Py_ssize_t __pyx_t_7; Py_ssize_t __pyx_t_8; Py_ssize_t __pyx_t_9; Py_ssize_t __pyx_t_10; long __pyx_t_11; long __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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("take_2d_axis1_float64_float64", 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_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; { __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, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4184; __pyx_clineno = __LINE__; goto __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_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1]; { __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_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4184; __pyx_clineno = __LINE__; goto __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_BufFmt_StackElem __pyx_stack[1]; 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, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4184; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; __pyx_pybuffernd_out.diminfo[1].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_out.diminfo[1].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[1]; /* "pandas/src/generated.pyx":4192 * float64_t fv * * n = len(values) # <<<<<<<<<<<<<< * k = len(indexer) * */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4192; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/src/generated.pyx":4193 * * n = len(values) * k = len(indexer) # <<<<<<<<<<<<<< * * if n == 0 or k == 0: */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_indexer)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4193; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_k = __pyx_t_1; /* "pandas/src/generated.pyx":4195 * k = len(indexer) * * if n == 0 or k == 0: # <<<<<<<<<<<<<< * return * */ __pyx_t_2 = ((__pyx_v_n == 0) != 0); if (!__pyx_t_2) { __pyx_t_3 = ((__pyx_v_k == 0) != 0); __pyx_t_4 = __pyx_t_3; } else { __pyx_t_4 = __pyx_t_2; } if (__pyx_t_4) { /* "pandas/src/generated.pyx":4196 * * if n == 0 or k == 0: * return # <<<<<<<<<<<<<< * * fv = fill_value */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; goto __pyx_L3; } __pyx_L3:; /* "pandas/src/generated.pyx":4198 * return * * fv = fill_value # <<<<<<<<<<<<<< * * IF True: */ __pyx_t_5 = __pyx_PyFloat_AsDouble(__pyx_v_fill_value); if (unlikely((__pyx_t_5 == (npy_float64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4198; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_fv = __pyx_t_5; /* "pandas/src/generated.pyx":4204 * float64_t *v, *o * * if (values.strides[0] == out.strides[0] and # <<<<<<<<<<<<<< * values.strides[0] == sizeof(float64_t) and * sizeof(float64_t) * n >= 256): */ __pyx_t_4 = (((__pyx_v_values->strides[0]) == (__pyx_v_out->strides[0])) != 0); if (__pyx_t_4) { /* "pandas/src/generated.pyx":4205 * * if (values.strides[0] == out.strides[0] and * values.strides[0] == sizeof(float64_t) and # <<<<<<<<<<<<<< * sizeof(float64_t) * n >= 256): * */ __pyx_t_2 = (((__pyx_v_values->strides[0]) == (sizeof(__pyx_t_5numpy_float64_t))) != 0); if (__pyx_t_2) { /* "pandas/src/generated.pyx":4206 * if (values.strides[0] == out.strides[0] and * values.strides[0] == sizeof(float64_t) and * sizeof(float64_t) * n >= 256): # <<<<<<<<<<<<<< * * for j from 0 <= j < k: */ __pyx_t_3 = ((((sizeof(__pyx_t_5numpy_float64_t)) * __pyx_v_n) >= 256) != 0); __pyx_t_6 = __pyx_t_3; } else { __pyx_t_6 = __pyx_t_2; } __pyx_t_2 = __pyx_t_6; } else { __pyx_t_2 = __pyx_t_4; } if (__pyx_t_2) { /* "pandas/src/generated.pyx":4208 * sizeof(float64_t) * n >= 256): * * for j from 0 <= j < k: # <<<<<<<<<<<<<< * idx = indexer[j] * if idx == -1: */ __pyx_t_1 = __pyx_v_k; for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_1; __pyx_v_j++) { /* "pandas/src/generated.pyx":4209 * * for j from 0 <= j < k: * idx = indexer[j] # <<<<<<<<<<<<<< * if idx == -1: * for i from 0 <= i < n: */ __pyx_t_7 = __pyx_v_j; __pyx_v_idx = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_7, __pyx_pybuffernd_indexer.diminfo[0].strides)); /* "pandas/src/generated.pyx":4210 * for j from 0 <= j < k: * idx = indexer[j] * if idx == -1: # <<<<<<<<<<<<<< * for i from 0 <= i < n: * out[i, j] = fv */ __pyx_t_2 = ((__pyx_v_idx == -1) != 0); if (__pyx_t_2) { /* "pandas/src/generated.pyx":4211 * idx = indexer[j] * if idx == -1: * for i from 0 <= i < n: # <<<<<<<<<<<<<< * out[i, j] = fv * else: */ __pyx_t_8 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_8; __pyx_v_i++) { /* "pandas/src/generated.pyx":4212 * if idx == -1: * for i from 0 <= i < n: * out[i, j] = fv # <<<<<<<<<<<<<< * else: * v = &values[0, idx] */ __pyx_t_9 = __pyx_v_i; __pyx_t_10 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_9, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_10, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_fv; } goto __pyx_L7; } /*else*/ { /* "pandas/src/generated.pyx":4214 * out[i, j] = fv * else: * v = &values[0, idx] # <<<<<<<<<<<<<< * o = &out[0, j] * memmove(o, v, (sizeof(float64_t) * n)) */ __pyx_t_11 = 0; __pyx_t_8 = __pyx_v_idx; __pyx_v_v = (&(*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_11, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_8, __pyx_pybuffernd_values.diminfo[1].strides))); /* "pandas/src/generated.pyx":4215 * else: * v = &values[0, idx] * o = &out[0, j] # <<<<<<<<<<<<<< * memmove(o, v, (sizeof(float64_t) * n)) * return */ __pyx_t_12 = 0; __pyx_t_13 = __pyx_v_j; __pyx_v_o = (&(*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_12, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_13, __pyx_pybuffernd_out.diminfo[1].strides))); /* "pandas/src/generated.pyx":4216 * v = &values[0, idx] * o = &out[0, j] * memmove(o, v, (sizeof(float64_t) * n)) # <<<<<<<<<<<<<< * return * */ memmove(__pyx_v_o, __pyx_v_v, ((size_t)((sizeof(__pyx_t_5numpy_float64_t)) * __pyx_v_n))); } __pyx_L7:; } /* "pandas/src/generated.pyx":4217 * o = &out[0, j] * memmove(o, v, (sizeof(float64_t) * n)) * return # <<<<<<<<<<<<<< * * for j from 0 <= j < k: */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; goto __pyx_L4; } __pyx_L4:; /* "pandas/src/generated.pyx":4219 * return * * for j from 0 <= j < k: # <<<<<<<<<<<<<< * idx = indexer[j] * if idx == -1: */ __pyx_t_1 = __pyx_v_k; for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_1; __pyx_v_j++) { /* "pandas/src/generated.pyx":4220 * * for j from 0 <= j < k: * idx = indexer[j] # <<<<<<<<<<<<<< * if idx == -1: * for i from 0 <= i < n: */ __pyx_t_14 = __pyx_v_j; __pyx_v_idx = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_indexer.diminfo[0].strides)); /* "pandas/src/generated.pyx":4221 * for j from 0 <= j < k: * idx = indexer[j] * if idx == -1: # <<<<<<<<<<<<<< * for i from 0 <= i < n: * out[i, j] = fv */ __pyx_t_2 = ((__pyx_v_idx == -1) != 0); if (__pyx_t_2) { /* "pandas/src/generated.pyx":4222 * idx = indexer[j] * if idx == -1: * for i from 0 <= i < n: # <<<<<<<<<<<<<< * out[i, j] = fv * else: */ __pyx_t_15 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_15; __pyx_v_i++) { /* "pandas/src/generated.pyx":4223 * if idx == -1: * for i from 0 <= i < n: * out[i, j] = fv # <<<<<<<<<<<<<< * else: * for i from 0 <= i < n: */ __pyx_t_16 = __pyx_v_i; __pyx_t_17 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_17, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_fv; } goto __pyx_L12; } /*else*/ { /* "pandas/src/generated.pyx":4225 * out[i, j] = fv * else: * for i from 0 <= i < n: # <<<<<<<<<<<<<< * out[i, j] = values[i, idx] * */ __pyx_t_15 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_15; __pyx_v_i++) { /* "pandas/src/generated.pyx":4226 * else: * for i from 0 <= i < n: * out[i, j] = values[i, idx] # <<<<<<<<<<<<<< * * @cython.wraparound(False) */ __pyx_t_18 = __pyx_v_i; __pyx_t_19 = __pyx_v_idx; __pyx_t_20 = __pyx_v_i; __pyx_t_21 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_21, __pyx_pybuffernd_out.diminfo[1].strides) = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_19, __pyx_pybuffernd_values.diminfo[1].strides)); } } __pyx_L12:; } __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.take_2d_axis1_float64_float64", __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_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_335take_2d_axis1_object_object(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_335take_2d_axis1_object_object = {__Pyx_NAMESTR("take_2d_axis1_object_object"), (PyCFunction)__pyx_pw_6pandas_5algos_335take_2d_axis1_object_object, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_335take_2d_axis1_object_object(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_values = 0; PyArrayObject *__pyx_v_indexer = 0; PyArrayObject *__pyx_v_out = 0; PyObject *__pyx_v_fill_value = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("take_2d_axis1_object_object (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__values,&__pyx_n_s__indexer,&__pyx_n_s__out,&__pyx_n_s__fill_value,0}; PyObject* values[4] = {0,0,0,0}; values[3] = __pyx_k_164; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__values)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__indexer)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_2d_axis1_object_object", 0, 3, 4, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4230; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__out)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_2d_axis1_object_object", 0, 3, 4, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4230; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__fill_value); if (value) { values[3] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "take_2d_axis1_object_object") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4230; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_values = ((PyArrayObject *)values[0]); __pyx_v_indexer = ((PyArrayObject *)values[1]); __pyx_v_out = ((PyArrayObject *)values[2]); __pyx_v_fill_value = values[3]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("take_2d_axis1_object_object", 0, 3, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4230; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.take_2d_axis1_object_object", __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_filename = __pyx_f[2]; __pyx_lineno = 4230; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_indexer), __pyx_ptype_5numpy_ndarray, 1, "indexer", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4231; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_5numpy_ndarray, 1, "out", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4232; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_334take_2d_axis1_object_object(__pyx_self, __pyx_v_values, __pyx_v_indexer, __pyx_v_out, __pyx_v_fill_value); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":4230 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_axis1_object_object(ndarray[object, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[object, ndim=2] out, */ static PyObject *__pyx_pf_6pandas_5algos_334take_2d_axis1_object_object(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_k; Py_ssize_t __pyx_v_n; Py_ssize_t __pyx_v_idx; PyObject *__pyx_v_fv = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_indexer; __Pyx_Buffer __pyx_pybuffer_indexer; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_values; __Pyx_Buffer __pyx_pybuffer_values; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; int __pyx_t_2; int __pyx_t_3; int __pyx_t_4; Py_ssize_t __pyx_t_5; Py_ssize_t __pyx_t_6; Py_ssize_t __pyx_t_7; Py_ssize_t __pyx_t_8; PyObject **__pyx_t_9; PyObject *__pyx_t_10 = NULL; Py_ssize_t __pyx_t_11; Py_ssize_t __pyx_t_12; Py_ssize_t __pyx_t_13; Py_ssize_t __pyx_t_14; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("take_2d_axis1_object_object", 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_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; { __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, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4230; __pyx_clineno = __LINE__; goto __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_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1]; { __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_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4230; __pyx_clineno = __LINE__; goto __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_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_v_out, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4230; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; __pyx_pybuffernd_out.diminfo[1].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_out.diminfo[1].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[1]; /* "pandas/src/generated.pyx":4238 * object fv * * n = len(values) # <<<<<<<<<<<<<< * k = len(indexer) * */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4238; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/src/generated.pyx":4239 * * n = len(values) * k = len(indexer) # <<<<<<<<<<<<<< * * if n == 0 or k == 0: */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_indexer)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4239; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_k = __pyx_t_1; /* "pandas/src/generated.pyx":4241 * k = len(indexer) * * if n == 0 or k == 0: # <<<<<<<<<<<<<< * return * */ __pyx_t_2 = ((__pyx_v_n == 0) != 0); if (!__pyx_t_2) { __pyx_t_3 = ((__pyx_v_k == 0) != 0); __pyx_t_4 = __pyx_t_3; } else { __pyx_t_4 = __pyx_t_2; } if (__pyx_t_4) { /* "pandas/src/generated.pyx":4242 * * if n == 0 or k == 0: * return # <<<<<<<<<<<<<< * * fv = fill_value */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; goto __pyx_L3; } __pyx_L3:; /* "pandas/src/generated.pyx":4244 * return * * fv = fill_value # <<<<<<<<<<<<<< * * IF False: */ __Pyx_INCREF(__pyx_v_fill_value); __pyx_v_fv = __pyx_v_fill_value; /* "pandas/src/generated.pyx":4265 * return * * for j from 0 <= j < k: # <<<<<<<<<<<<<< * idx = indexer[j] * if idx == -1: */ __pyx_t_1 = __pyx_v_k; for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_1; __pyx_v_j++) { /* "pandas/src/generated.pyx":4266 * * for j from 0 <= j < k: * idx = indexer[j] # <<<<<<<<<<<<<< * if idx == -1: * for i from 0 <= i < n: */ __pyx_t_5 = __pyx_v_j; __pyx_v_idx = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_5, __pyx_pybuffernd_indexer.diminfo[0].strides)); /* "pandas/src/generated.pyx":4267 * for j from 0 <= j < k: * idx = indexer[j] * if idx == -1: # <<<<<<<<<<<<<< * for i from 0 <= i < n: * out[i, j] = fv */ __pyx_t_4 = ((__pyx_v_idx == -1) != 0); if (__pyx_t_4) { /* "pandas/src/generated.pyx":4268 * idx = indexer[j] * if idx == -1: * for i from 0 <= i < n: # <<<<<<<<<<<<<< * out[i, j] = fv * else: */ __pyx_t_6 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_6; __pyx_v_i++) { /* "pandas/src/generated.pyx":4269 * if idx == -1: * for i from 0 <= i < n: * out[i, j] = fv # <<<<<<<<<<<<<< * else: * for i from 0 <= i < n: */ __pyx_t_7 = __pyx_v_i; __pyx_t_8 = __pyx_v_j; __pyx_t_9 = __Pyx_BufPtrStrided2d(PyObject **, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_7, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_8, __pyx_pybuffernd_out.diminfo[1].strides); __Pyx_GOTREF(*__pyx_t_9); __Pyx_INCREF(__pyx_v_fv); __Pyx_DECREF(*__pyx_t_9); *__pyx_t_9 = __pyx_v_fv; __Pyx_GIVEREF(*__pyx_t_9); } goto __pyx_L6; } /*else*/ { /* "pandas/src/generated.pyx":4271 * out[i, j] = fv * else: * for i from 0 <= i < n: # <<<<<<<<<<<<<< * out[i, j] = values[i, idx] * */ __pyx_t_6 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_6; __pyx_v_i++) { /* "pandas/src/generated.pyx":4272 * else: * for i from 0 <= i < n: * out[i, j] = values[i, idx] # <<<<<<<<<<<<<< * * */ __pyx_t_11 = __pyx_v_i; __pyx_t_12 = __pyx_v_idx; __pyx_t_10 = (PyObject *) *__Pyx_BufPtrStrided2d(PyObject **, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_11, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_12, __pyx_pybuffernd_values.diminfo[1].strides); __Pyx_INCREF((PyObject*)__pyx_t_10); __pyx_t_13 = __pyx_v_i; __pyx_t_14 = __pyx_v_j; __pyx_t_9 = __Pyx_BufPtrStrided2d(PyObject **, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_14, __pyx_pybuffernd_out.diminfo[1].strides); __Pyx_GOTREF(*__pyx_t_9); __Pyx_INCREF(__pyx_t_10); __Pyx_DECREF(*__pyx_t_9); *__pyx_t_9 = __pyx_t_10; __Pyx_GIVEREF(*__pyx_t_9); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; } } __pyx_L6:; } __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_10); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.take_2d_axis1_object_object", __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_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF(__pyx_v_fv); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_337take_2d_multi_bool_bool(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_337take_2d_multi_bool_bool = {__Pyx_NAMESTR("take_2d_multi_bool_bool"), (PyCFunction)__pyx_pw_6pandas_5algos_337take_2d_multi_bool_bool, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_337take_2d_multi_bool_bool(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_values = 0; PyObject *__pyx_v_indexer = 0; PyArrayObject *__pyx_v_out = 0; PyObject *__pyx_v_fill_value = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("take_2d_multi_bool_bool (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__values,&__pyx_n_s__indexer,&__pyx_n_s__out,&__pyx_n_s__fill_value,0}; PyObject* values[4] = {0,0,0,0}; values[3] = __pyx_k_165; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__values)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__indexer)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_2d_multi_bool_bool", 0, 3, 4, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4277; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__out)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_2d_multi_bool_bool", 0, 3, 4, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4277; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__fill_value); if (value) { values[3] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "take_2d_multi_bool_bool") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4277; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_values = ((PyArrayObject *)values[0]); __pyx_v_indexer = values[1]; __pyx_v_out = ((PyArrayObject *)values[2]); __pyx_v_fill_value = values[3]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("take_2d_multi_bool_bool", 0, 3, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4277; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.take_2d_multi_bool_bool", __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_filename = __pyx_f[2]; __pyx_lineno = 4277; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_5numpy_ndarray, 1, "out", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4279; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_336take_2d_multi_bool_bool(__pyx_self, __pyx_v_values, __pyx_v_indexer, __pyx_v_out, __pyx_v_fill_value); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":4277 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_multi_bool_bool(ndarray[uint8_t, ndim=2] values, # <<<<<<<<<<<<<< * indexer, * ndarray[uint8_t, ndim=2] out, */ static PyObject *__pyx_pf_6pandas_5algos_336take_2d_multi_bool_bool(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_k; Py_ssize_t __pyx_v_n; Py_ssize_t __pyx_v_idx; PyArrayObject *__pyx_v_idx0 = 0; PyArrayObject *__pyx_v_idx1 = 0; __pyx_t_5numpy_uint8_t __pyx_v_fv; __Pyx_LocalBuf_ND __pyx_pybuffernd_idx0; __Pyx_Buffer __pyx_pybuffer_idx0; __Pyx_LocalBuf_ND __pyx_pybuffernd_idx1; __Pyx_Buffer __pyx_pybuffer_idx1; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_values; __Pyx_Buffer __pyx_pybuffer_values; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyArrayObject *__pyx_t_2 = NULL; PyArrayObject *__pyx_t_3 = NULL; Py_ssize_t __pyx_t_4; __pyx_t_5numpy_uint8_t __pyx_t_5; Py_ssize_t __pyx_t_6; int __pyx_t_7; Py_ssize_t __pyx_t_8; Py_ssize_t __pyx_t_9; Py_ssize_t __pyx_t_10; Py_ssize_t __pyx_t_11; Py_ssize_t __pyx_t_12; Py_ssize_t __pyx_t_13; Py_ssize_t __pyx_t_14; Py_ssize_t __pyx_t_15; __pyx_t_5numpy_int64_t __pyx_t_16; Py_ssize_t __pyx_t_17; Py_ssize_t __pyx_t_18; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("take_2d_multi_bool_bool", 0); __pyx_pybuffer_idx0.pybuffer.buf = NULL; __pyx_pybuffer_idx0.refcount = 0; __pyx_pybuffernd_idx0.data = NULL; __pyx_pybuffernd_idx0.rcbuffer = &__pyx_pybuffer_idx0; __pyx_pybuffer_idx1.pybuffer.buf = NULL; __pyx_pybuffer_idx1.refcount = 0; __pyx_pybuffernd_idx1.data = NULL; __pyx_pybuffernd_idx1.rcbuffer = &__pyx_pybuffer_idx1; __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_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; { __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_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4277; __pyx_clineno = __LINE__; goto __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_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; 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, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4277; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; __pyx_pybuffernd_out.diminfo[1].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_out.diminfo[1].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[1]; /* "pandas/src/generated.pyx":4283 * cdef: * Py_ssize_t i, j, k, n, idx * ndarray[int64_t] idx0 = indexer[0] # <<<<<<<<<<<<<< * ndarray[int64_t] idx1 = indexer[1] * uint8_t fv */ __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_indexer, 0, sizeof(long), PyInt_FromLong, 0, 0, 0); if (!__pyx_t_1) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4283; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 4283; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_2 = ((PyArrayObject *)__pyx_t_1); { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_idx0.rcbuffer->pybuffer, (PyObject*)__pyx_t_2, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { __pyx_v_idx0 = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_idx0.rcbuffer->pybuffer.buf = NULL; {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4283; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } else {__pyx_pybuffernd_idx0.diminfo[0].strides = __pyx_pybuffernd_idx0.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_idx0.diminfo[0].shape = __pyx_pybuffernd_idx0.rcbuffer->pybuffer.shape[0]; } } __pyx_t_2 = 0; __pyx_v_idx0 = ((PyArrayObject *)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/generated.pyx":4284 * Py_ssize_t i, j, k, n, idx * ndarray[int64_t] idx0 = indexer[0] * ndarray[int64_t] idx1 = indexer[1] # <<<<<<<<<<<<<< * uint8_t fv * */ __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_indexer, 1, sizeof(long), PyInt_FromLong, 0, 0, 0); if (!__pyx_t_1) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4284; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 4284; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_3 = ((PyArrayObject *)__pyx_t_1); { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_idx1.rcbuffer->pybuffer, (PyObject*)__pyx_t_3, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { __pyx_v_idx1 = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_idx1.rcbuffer->pybuffer.buf = NULL; {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4284; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } else {__pyx_pybuffernd_idx1.diminfo[0].strides = __pyx_pybuffernd_idx1.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_idx1.diminfo[0].shape = __pyx_pybuffernd_idx1.rcbuffer->pybuffer.shape[0]; } } __pyx_t_3 = 0; __pyx_v_idx1 = ((PyArrayObject *)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/generated.pyx":4287 * uint8_t fv * * n = len(idx0) # <<<<<<<<<<<<<< * k = len(idx1) * */ __pyx_t_4 = PyObject_Length(((PyObject *)__pyx_v_idx0)); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4287; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_4; /* "pandas/src/generated.pyx":4288 * * n = len(idx0) * k = len(idx1) # <<<<<<<<<<<<<< * * fv = fill_value */ __pyx_t_4 = PyObject_Length(((PyObject *)__pyx_v_idx1)); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4288; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_k = __pyx_t_4; /* "pandas/src/generated.pyx":4290 * k = len(idx1) * * fv = fill_value # <<<<<<<<<<<<<< * for i from 0 <= i < n: * idx = idx0[i] */ __pyx_t_5 = __Pyx_PyInt_from_py_npy_uint8(__pyx_v_fill_value); if (unlikely((__pyx_t_5 == (npy_uint8)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4290; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_fv = __pyx_t_5; /* "pandas/src/generated.pyx":4291 * * fv = fill_value * for i from 0 <= i < n: # <<<<<<<<<<<<<< * idx = idx0[i] * if idx == -1: */ __pyx_t_4 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_4; __pyx_v_i++) { /* "pandas/src/generated.pyx":4292 * fv = fill_value * for i from 0 <= i < n: * idx = idx0[i] # <<<<<<<<<<<<<< * if idx == -1: * for j from 0 <= j < k: */ __pyx_t_6 = __pyx_v_i; __pyx_v_idx = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_idx0.rcbuffer->pybuffer.buf, __pyx_t_6, __pyx_pybuffernd_idx0.diminfo[0].strides)); /* "pandas/src/generated.pyx":4293 * for i from 0 <= i < n: * idx = idx0[i] * if idx == -1: # <<<<<<<<<<<<<< * for j from 0 <= j < k: * out[i, j] = fv */ __pyx_t_7 = ((__pyx_v_idx == -1) != 0); if (__pyx_t_7) { /* "pandas/src/generated.pyx":4294 * idx = idx0[i] * if idx == -1: * for j from 0 <= j < k: # <<<<<<<<<<<<<< * out[i, j] = fv * else: */ __pyx_t_8 = __pyx_v_k; for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_8; __pyx_v_j++) { /* "pandas/src/generated.pyx":4295 * if idx == -1: * for j from 0 <= j < k: * out[i, j] = fv # <<<<<<<<<<<<<< * else: * for j from 0 <= j < k: */ __pyx_t_9 = __pyx_v_i; __pyx_t_10 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_9, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_10, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_fv; } goto __pyx_L5; } /*else*/ { /* "pandas/src/generated.pyx":4297 * out[i, j] = fv * else: * for j from 0 <= j < k: # <<<<<<<<<<<<<< * if idx1[j] == -1: * out[i, j] = fv */ __pyx_t_8 = __pyx_v_k; for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_8; __pyx_v_j++) { /* "pandas/src/generated.pyx":4298 * else: * for j from 0 <= j < k: * if idx1[j] == -1: # <<<<<<<<<<<<<< * out[i, j] = fv * else: */ __pyx_t_11 = __pyx_v_j; __pyx_t_7 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_idx1.rcbuffer->pybuffer.buf, __pyx_t_11, __pyx_pybuffernd_idx1.diminfo[0].strides)) == -1) != 0); if (__pyx_t_7) { /* "pandas/src/generated.pyx":4299 * for j from 0 <= j < k: * if idx1[j] == -1: * out[i, j] = fv # <<<<<<<<<<<<<< * else: * out[i, j] = values[idx, idx1[j]] */ __pyx_t_12 = __pyx_v_i; __pyx_t_13 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_12, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_13, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_fv; goto __pyx_L10; } /*else*/ { /* "pandas/src/generated.pyx":4301 * out[i, j] = fv * else: * out[i, j] = values[idx, idx1[j]] # <<<<<<<<<<<<<< * * @cython.wraparound(False) */ __pyx_t_14 = __pyx_v_j; __pyx_t_15 = __pyx_v_idx; __pyx_t_16 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_idx1.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_idx1.diminfo[0].strides)); __pyx_t_17 = __pyx_v_i; __pyx_t_18 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_18, __pyx_pybuffernd_out.diminfo[1].strides) = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_16, __pyx_pybuffernd_values.diminfo[1].strides)); } __pyx_L10:; } } __pyx_L5:; } __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_idx0.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_idx1.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.take_2d_multi_bool_bool", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_idx0.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_idx1.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_idx0); __Pyx_XDECREF((PyObject *)__pyx_v_idx1); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_339take_2d_multi_bool_object(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_339take_2d_multi_bool_object = {__Pyx_NAMESTR("take_2d_multi_bool_object"), (PyCFunction)__pyx_pw_6pandas_5algos_339take_2d_multi_bool_object, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_339take_2d_multi_bool_object(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_values = 0; PyObject *__pyx_v_indexer = 0; PyArrayObject *__pyx_v_out = 0; PyObject *__pyx_v_fill_value = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("take_2d_multi_bool_object (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__values,&__pyx_n_s__indexer,&__pyx_n_s__out,&__pyx_n_s__fill_value,0}; PyObject* values[4] = {0,0,0,0}; values[3] = __pyx_k_166; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__values)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__indexer)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_2d_multi_bool_object", 0, 3, 4, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4305; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__out)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_2d_multi_bool_object", 0, 3, 4, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4305; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__fill_value); if (value) { values[3] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "take_2d_multi_bool_object") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4305; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_values = ((PyArrayObject *)values[0]); __pyx_v_indexer = values[1]; __pyx_v_out = ((PyArrayObject *)values[2]); __pyx_v_fill_value = values[3]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("take_2d_multi_bool_object", 0, 3, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4305; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.take_2d_multi_bool_object", __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_filename = __pyx_f[2]; __pyx_lineno = 4305; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_5numpy_ndarray, 1, "out", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4307; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_338take_2d_multi_bool_object(__pyx_self, __pyx_v_values, __pyx_v_indexer, __pyx_v_out, __pyx_v_fill_value); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":4305 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_multi_bool_object(ndarray[uint8_t, ndim=2] values, # <<<<<<<<<<<<<< * indexer, * ndarray[object, ndim=2] out, */ static PyObject *__pyx_pf_6pandas_5algos_338take_2d_multi_bool_object(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_k; Py_ssize_t __pyx_v_n; Py_ssize_t __pyx_v_idx; PyArrayObject *__pyx_v_idx0 = 0; PyArrayObject *__pyx_v_idx1 = 0; PyObject *__pyx_v_fv = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_idx0; __Pyx_Buffer __pyx_pybuffer_idx0; __Pyx_LocalBuf_ND __pyx_pybuffernd_idx1; __Pyx_Buffer __pyx_pybuffer_idx1; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_values; __Pyx_Buffer __pyx_pybuffer_values; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyArrayObject *__pyx_t_2 = NULL; PyArrayObject *__pyx_t_3 = NULL; Py_ssize_t __pyx_t_4; Py_ssize_t __pyx_t_5; int __pyx_t_6; Py_ssize_t __pyx_t_7; Py_ssize_t __pyx_t_8; Py_ssize_t __pyx_t_9; PyObject **__pyx_t_10; Py_ssize_t __pyx_t_11; Py_ssize_t __pyx_t_12; Py_ssize_t __pyx_t_13; Py_ssize_t __pyx_t_14; Py_ssize_t __pyx_t_15; __pyx_t_5numpy_int64_t __pyx_t_16; Py_ssize_t __pyx_t_17; Py_ssize_t __pyx_t_18; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("take_2d_multi_bool_object", 0); __pyx_pybuffer_idx0.pybuffer.buf = NULL; __pyx_pybuffer_idx0.refcount = 0; __pyx_pybuffernd_idx0.data = NULL; __pyx_pybuffernd_idx0.rcbuffer = &__pyx_pybuffer_idx0; __pyx_pybuffer_idx1.pybuffer.buf = NULL; __pyx_pybuffer_idx1.refcount = 0; __pyx_pybuffernd_idx1.data = NULL; __pyx_pybuffernd_idx1.rcbuffer = &__pyx_pybuffer_idx1; __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_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; { __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_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4305; __pyx_clineno = __LINE__; goto __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_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_v_out, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4305; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; __pyx_pybuffernd_out.diminfo[1].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_out.diminfo[1].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[1]; /* "pandas/src/generated.pyx":4311 * cdef: * Py_ssize_t i, j, k, n, idx * ndarray[int64_t] idx0 = indexer[0] # <<<<<<<<<<<<<< * ndarray[int64_t] idx1 = indexer[1] * object fv */ __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_indexer, 0, sizeof(long), PyInt_FromLong, 0, 0, 0); if (!__pyx_t_1) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4311; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 4311; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_2 = ((PyArrayObject *)__pyx_t_1); { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_idx0.rcbuffer->pybuffer, (PyObject*)__pyx_t_2, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { __pyx_v_idx0 = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_idx0.rcbuffer->pybuffer.buf = NULL; {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4311; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } else {__pyx_pybuffernd_idx0.diminfo[0].strides = __pyx_pybuffernd_idx0.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_idx0.diminfo[0].shape = __pyx_pybuffernd_idx0.rcbuffer->pybuffer.shape[0]; } } __pyx_t_2 = 0; __pyx_v_idx0 = ((PyArrayObject *)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/generated.pyx":4312 * Py_ssize_t i, j, k, n, idx * ndarray[int64_t] idx0 = indexer[0] * ndarray[int64_t] idx1 = indexer[1] # <<<<<<<<<<<<<< * object fv * */ __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_indexer, 1, sizeof(long), PyInt_FromLong, 0, 0, 0); if (!__pyx_t_1) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4312; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 4312; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_3 = ((PyArrayObject *)__pyx_t_1); { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_idx1.rcbuffer->pybuffer, (PyObject*)__pyx_t_3, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { __pyx_v_idx1 = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_idx1.rcbuffer->pybuffer.buf = NULL; {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4312; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } else {__pyx_pybuffernd_idx1.diminfo[0].strides = __pyx_pybuffernd_idx1.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_idx1.diminfo[0].shape = __pyx_pybuffernd_idx1.rcbuffer->pybuffer.shape[0]; } } __pyx_t_3 = 0; __pyx_v_idx1 = ((PyArrayObject *)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/generated.pyx":4315 * object fv * * n = len(idx0) # <<<<<<<<<<<<<< * k = len(idx1) * */ __pyx_t_4 = PyObject_Length(((PyObject *)__pyx_v_idx0)); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4315; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_4; /* "pandas/src/generated.pyx":4316 * * n = len(idx0) * k = len(idx1) # <<<<<<<<<<<<<< * * fv = fill_value */ __pyx_t_4 = PyObject_Length(((PyObject *)__pyx_v_idx1)); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4316; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_k = __pyx_t_4; /* "pandas/src/generated.pyx":4318 * k = len(idx1) * * fv = fill_value # <<<<<<<<<<<<<< * for i from 0 <= i < n: * idx = idx0[i] */ __Pyx_INCREF(__pyx_v_fill_value); __pyx_v_fv = __pyx_v_fill_value; /* "pandas/src/generated.pyx":4319 * * fv = fill_value * for i from 0 <= i < n: # <<<<<<<<<<<<<< * idx = idx0[i] * if idx == -1: */ __pyx_t_4 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_4; __pyx_v_i++) { /* "pandas/src/generated.pyx":4320 * fv = fill_value * for i from 0 <= i < n: * idx = idx0[i] # <<<<<<<<<<<<<< * if idx == -1: * for j from 0 <= j < k: */ __pyx_t_5 = __pyx_v_i; __pyx_v_idx = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_idx0.rcbuffer->pybuffer.buf, __pyx_t_5, __pyx_pybuffernd_idx0.diminfo[0].strides)); /* "pandas/src/generated.pyx":4321 * for i from 0 <= i < n: * idx = idx0[i] * if idx == -1: # <<<<<<<<<<<<<< * for j from 0 <= j < k: * out[i, j] = fv */ __pyx_t_6 = ((__pyx_v_idx == -1) != 0); if (__pyx_t_6) { /* "pandas/src/generated.pyx":4322 * idx = idx0[i] * if idx == -1: * for j from 0 <= j < k: # <<<<<<<<<<<<<< * out[i, j] = fv * else: */ __pyx_t_7 = __pyx_v_k; for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_7; __pyx_v_j++) { /* "pandas/src/generated.pyx":4323 * if idx == -1: * for j from 0 <= j < k: * out[i, j] = fv # <<<<<<<<<<<<<< * else: * for j from 0 <= j < k: */ __pyx_t_8 = __pyx_v_i; __pyx_t_9 = __pyx_v_j; __pyx_t_10 = __Pyx_BufPtrStrided2d(PyObject **, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_8, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_9, __pyx_pybuffernd_out.diminfo[1].strides); __Pyx_GOTREF(*__pyx_t_10); __Pyx_INCREF(__pyx_v_fv); __Pyx_DECREF(*__pyx_t_10); *__pyx_t_10 = __pyx_v_fv; __Pyx_GIVEREF(*__pyx_t_10); } goto __pyx_L5; } /*else*/ { /* "pandas/src/generated.pyx":4325 * out[i, j] = fv * else: * for j from 0 <= j < k: # <<<<<<<<<<<<<< * if idx1[j] == -1: * out[i, j] = fv */ __pyx_t_7 = __pyx_v_k; for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_7; __pyx_v_j++) { /* "pandas/src/generated.pyx":4326 * else: * for j from 0 <= j < k: * if idx1[j] == -1: # <<<<<<<<<<<<<< * out[i, j] = fv * else: */ __pyx_t_11 = __pyx_v_j; __pyx_t_6 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_idx1.rcbuffer->pybuffer.buf, __pyx_t_11, __pyx_pybuffernd_idx1.diminfo[0].strides)) == -1) != 0); if (__pyx_t_6) { /* "pandas/src/generated.pyx":4327 * for j from 0 <= j < k: * if idx1[j] == -1: * out[i, j] = fv # <<<<<<<<<<<<<< * else: * out[i, j] = True if values[idx, idx1[j]] > 0 else False */ __pyx_t_12 = __pyx_v_i; __pyx_t_13 = __pyx_v_j; __pyx_t_10 = __Pyx_BufPtrStrided2d(PyObject **, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_12, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_13, __pyx_pybuffernd_out.diminfo[1].strides); __Pyx_GOTREF(*__pyx_t_10); __Pyx_INCREF(__pyx_v_fv); __Pyx_DECREF(*__pyx_t_10); *__pyx_t_10 = __pyx_v_fv; __Pyx_GIVEREF(*__pyx_t_10); goto __pyx_L10; } /*else*/ { /* "pandas/src/generated.pyx":4329 * out[i, j] = fv * else: * out[i, j] = True if values[idx, idx1[j]] > 0 else False # <<<<<<<<<<<<<< * * @cython.wraparound(False) */ __pyx_t_14 = __pyx_v_j; __pyx_t_15 = __pyx_v_idx; __pyx_t_16 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_idx1.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_idx1.diminfo[0].strides)); if ((((*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_16, __pyx_pybuffernd_values.diminfo[1].strides)) > 0) != 0)) { __pyx_t_6 = 1; } else { __pyx_t_6 = 0; } __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_t_6); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4329; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_17 = __pyx_v_i; __pyx_t_18 = __pyx_v_j; __pyx_t_10 = __Pyx_BufPtrStrided2d(PyObject **, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_18, __pyx_pybuffernd_out.diminfo[1].strides); __Pyx_GOTREF(*__pyx_t_10); __Pyx_INCREF(__pyx_t_1); __Pyx_DECREF(*__pyx_t_10); *__pyx_t_10 = __pyx_t_1; __Pyx_GIVEREF(*__pyx_t_10); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } __pyx_L10:; } } __pyx_L5:; } __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_idx0.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_idx1.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.take_2d_multi_bool_object", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_idx0.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_idx1.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_idx0); __Pyx_XDECREF((PyObject *)__pyx_v_idx1); __Pyx_XDECREF(__pyx_v_fv); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_341take_2d_multi_int8_int8(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_341take_2d_multi_int8_int8 = {__Pyx_NAMESTR("take_2d_multi_int8_int8"), (PyCFunction)__pyx_pw_6pandas_5algos_341take_2d_multi_int8_int8, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_341take_2d_multi_int8_int8(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_values = 0; PyObject *__pyx_v_indexer = 0; PyArrayObject *__pyx_v_out = 0; PyObject *__pyx_v_fill_value = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("take_2d_multi_int8_int8 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__values,&__pyx_n_s__indexer,&__pyx_n_s__out,&__pyx_n_s__fill_value,0}; PyObject* values[4] = {0,0,0,0}; values[3] = __pyx_k_167; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__values)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__indexer)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_2d_multi_int8_int8", 0, 3, 4, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4333; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__out)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_2d_multi_int8_int8", 0, 3, 4, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4333; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__fill_value); if (value) { values[3] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "take_2d_multi_int8_int8") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4333; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_values = ((PyArrayObject *)values[0]); __pyx_v_indexer = values[1]; __pyx_v_out = ((PyArrayObject *)values[2]); __pyx_v_fill_value = values[3]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("take_2d_multi_int8_int8", 0, 3, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4333; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.take_2d_multi_int8_int8", __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_filename = __pyx_f[2]; __pyx_lineno = 4333; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_5numpy_ndarray, 1, "out", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4335; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_340take_2d_multi_int8_int8(__pyx_self, __pyx_v_values, __pyx_v_indexer, __pyx_v_out, __pyx_v_fill_value); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":4333 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_multi_int8_int8(ndarray[int8_t, ndim=2] values, # <<<<<<<<<<<<<< * indexer, * ndarray[int8_t, ndim=2] out, */ static PyObject *__pyx_pf_6pandas_5algos_340take_2d_multi_int8_int8(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_k; Py_ssize_t __pyx_v_n; Py_ssize_t __pyx_v_idx; PyArrayObject *__pyx_v_idx0 = 0; PyArrayObject *__pyx_v_idx1 = 0; __pyx_t_5numpy_int8_t __pyx_v_fv; __Pyx_LocalBuf_ND __pyx_pybuffernd_idx0; __Pyx_Buffer __pyx_pybuffer_idx0; __Pyx_LocalBuf_ND __pyx_pybuffernd_idx1; __Pyx_Buffer __pyx_pybuffer_idx1; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_values; __Pyx_Buffer __pyx_pybuffer_values; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyArrayObject *__pyx_t_2 = NULL; PyArrayObject *__pyx_t_3 = NULL; Py_ssize_t __pyx_t_4; __pyx_t_5numpy_int8_t __pyx_t_5; Py_ssize_t __pyx_t_6; int __pyx_t_7; Py_ssize_t __pyx_t_8; Py_ssize_t __pyx_t_9; Py_ssize_t __pyx_t_10; Py_ssize_t __pyx_t_11; Py_ssize_t __pyx_t_12; Py_ssize_t __pyx_t_13; Py_ssize_t __pyx_t_14; Py_ssize_t __pyx_t_15; __pyx_t_5numpy_int64_t __pyx_t_16; Py_ssize_t __pyx_t_17; Py_ssize_t __pyx_t_18; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("take_2d_multi_int8_int8", 0); __pyx_pybuffer_idx0.pybuffer.buf = NULL; __pyx_pybuffer_idx0.refcount = 0; __pyx_pybuffernd_idx0.data = NULL; __pyx_pybuffernd_idx0.rcbuffer = &__pyx_pybuffer_idx0; __pyx_pybuffer_idx1.pybuffer.buf = NULL; __pyx_pybuffer_idx1.refcount = 0; __pyx_pybuffernd_idx1.data = NULL; __pyx_pybuffernd_idx1.rcbuffer = &__pyx_pybuffer_idx1; __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_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; { __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_int8_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4333; __pyx_clineno = __LINE__; goto __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_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_v_out, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int8_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4333; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; __pyx_pybuffernd_out.diminfo[1].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_out.diminfo[1].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[1]; /* "pandas/src/generated.pyx":4339 * cdef: * Py_ssize_t i, j, k, n, idx * ndarray[int64_t] idx0 = indexer[0] # <<<<<<<<<<<<<< * ndarray[int64_t] idx1 = indexer[1] * int8_t fv */ __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_indexer, 0, sizeof(long), PyInt_FromLong, 0, 0, 0); if (!__pyx_t_1) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4339; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 4339; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_2 = ((PyArrayObject *)__pyx_t_1); { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_idx0.rcbuffer->pybuffer, (PyObject*)__pyx_t_2, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { __pyx_v_idx0 = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_idx0.rcbuffer->pybuffer.buf = NULL; {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4339; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } else {__pyx_pybuffernd_idx0.diminfo[0].strides = __pyx_pybuffernd_idx0.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_idx0.diminfo[0].shape = __pyx_pybuffernd_idx0.rcbuffer->pybuffer.shape[0]; } } __pyx_t_2 = 0; __pyx_v_idx0 = ((PyArrayObject *)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/generated.pyx":4340 * Py_ssize_t i, j, k, n, idx * ndarray[int64_t] idx0 = indexer[0] * ndarray[int64_t] idx1 = indexer[1] # <<<<<<<<<<<<<< * int8_t fv * */ __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_indexer, 1, sizeof(long), PyInt_FromLong, 0, 0, 0); if (!__pyx_t_1) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4340; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 4340; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_3 = ((PyArrayObject *)__pyx_t_1); { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_idx1.rcbuffer->pybuffer, (PyObject*)__pyx_t_3, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { __pyx_v_idx1 = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_idx1.rcbuffer->pybuffer.buf = NULL; {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4340; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } else {__pyx_pybuffernd_idx1.diminfo[0].strides = __pyx_pybuffernd_idx1.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_idx1.diminfo[0].shape = __pyx_pybuffernd_idx1.rcbuffer->pybuffer.shape[0]; } } __pyx_t_3 = 0; __pyx_v_idx1 = ((PyArrayObject *)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/generated.pyx":4343 * int8_t fv * * n = len(idx0) # <<<<<<<<<<<<<< * k = len(idx1) * */ __pyx_t_4 = PyObject_Length(((PyObject *)__pyx_v_idx0)); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4343; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_4; /* "pandas/src/generated.pyx":4344 * * n = len(idx0) * k = len(idx1) # <<<<<<<<<<<<<< * * fv = fill_value */ __pyx_t_4 = PyObject_Length(((PyObject *)__pyx_v_idx1)); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4344; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_k = __pyx_t_4; /* "pandas/src/generated.pyx":4346 * k = len(idx1) * * fv = fill_value # <<<<<<<<<<<<<< * for i from 0 <= i < n: * idx = idx0[i] */ __pyx_t_5 = __Pyx_PyInt_from_py_npy_int8(__pyx_v_fill_value); if (unlikely((__pyx_t_5 == (npy_int8)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4346; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_fv = __pyx_t_5; /* "pandas/src/generated.pyx":4347 * * fv = fill_value * for i from 0 <= i < n: # <<<<<<<<<<<<<< * idx = idx0[i] * if idx == -1: */ __pyx_t_4 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_4; __pyx_v_i++) { /* "pandas/src/generated.pyx":4348 * fv = fill_value * for i from 0 <= i < n: * idx = idx0[i] # <<<<<<<<<<<<<< * if idx == -1: * for j from 0 <= j < k: */ __pyx_t_6 = __pyx_v_i; __pyx_v_idx = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_idx0.rcbuffer->pybuffer.buf, __pyx_t_6, __pyx_pybuffernd_idx0.diminfo[0].strides)); /* "pandas/src/generated.pyx":4349 * for i from 0 <= i < n: * idx = idx0[i] * if idx == -1: # <<<<<<<<<<<<<< * for j from 0 <= j < k: * out[i, j] = fv */ __pyx_t_7 = ((__pyx_v_idx == -1) != 0); if (__pyx_t_7) { /* "pandas/src/generated.pyx":4350 * idx = idx0[i] * if idx == -1: * for j from 0 <= j < k: # <<<<<<<<<<<<<< * out[i, j] = fv * else: */ __pyx_t_8 = __pyx_v_k; for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_8; __pyx_v_j++) { /* "pandas/src/generated.pyx":4351 * if idx == -1: * for j from 0 <= j < k: * out[i, j] = fv # <<<<<<<<<<<<<< * else: * for j from 0 <= j < k: */ __pyx_t_9 = __pyx_v_i; __pyx_t_10 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int8_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_9, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_10, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_fv; } goto __pyx_L5; } /*else*/ { /* "pandas/src/generated.pyx":4353 * out[i, j] = fv * else: * for j from 0 <= j < k: # <<<<<<<<<<<<<< * if idx1[j] == -1: * out[i, j] = fv */ __pyx_t_8 = __pyx_v_k; for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_8; __pyx_v_j++) { /* "pandas/src/generated.pyx":4354 * else: * for j from 0 <= j < k: * if idx1[j] == -1: # <<<<<<<<<<<<<< * out[i, j] = fv * else: */ __pyx_t_11 = __pyx_v_j; __pyx_t_7 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_idx1.rcbuffer->pybuffer.buf, __pyx_t_11, __pyx_pybuffernd_idx1.diminfo[0].strides)) == -1) != 0); if (__pyx_t_7) { /* "pandas/src/generated.pyx":4355 * for j from 0 <= j < k: * if idx1[j] == -1: * out[i, j] = fv # <<<<<<<<<<<<<< * else: * out[i, j] = values[idx, idx1[j]] */ __pyx_t_12 = __pyx_v_i; __pyx_t_13 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int8_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_12, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_13, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_fv; goto __pyx_L10; } /*else*/ { /* "pandas/src/generated.pyx":4357 * out[i, j] = fv * else: * out[i, j] = values[idx, idx1[j]] # <<<<<<<<<<<<<< * * @cython.wraparound(False) */ __pyx_t_14 = __pyx_v_j; __pyx_t_15 = __pyx_v_idx; __pyx_t_16 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_idx1.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_idx1.diminfo[0].strides)); __pyx_t_17 = __pyx_v_i; __pyx_t_18 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int8_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_18, __pyx_pybuffernd_out.diminfo[1].strides) = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int8_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_16, __pyx_pybuffernd_values.diminfo[1].strides)); } __pyx_L10:; } } __pyx_L5:; } __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_idx0.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_idx1.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.take_2d_multi_int8_int8", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_idx0.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_idx1.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_idx0); __Pyx_XDECREF((PyObject *)__pyx_v_idx1); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_343take_2d_multi_int8_int32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_343take_2d_multi_int8_int32 = {__Pyx_NAMESTR("take_2d_multi_int8_int32"), (PyCFunction)__pyx_pw_6pandas_5algos_343take_2d_multi_int8_int32, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_343take_2d_multi_int8_int32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_values = 0; PyObject *__pyx_v_indexer = 0; PyArrayObject *__pyx_v_out = 0; PyObject *__pyx_v_fill_value = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("take_2d_multi_int8_int32 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__values,&__pyx_n_s__indexer,&__pyx_n_s__out,&__pyx_n_s__fill_value,0}; PyObject* values[4] = {0,0,0,0}; values[3] = __pyx_k_168; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__values)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__indexer)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_2d_multi_int8_int32", 0, 3, 4, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4361; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__out)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_2d_multi_int8_int32", 0, 3, 4, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4361; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__fill_value); if (value) { values[3] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "take_2d_multi_int8_int32") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4361; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_values = ((PyArrayObject *)values[0]); __pyx_v_indexer = values[1]; __pyx_v_out = ((PyArrayObject *)values[2]); __pyx_v_fill_value = values[3]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("take_2d_multi_int8_int32", 0, 3, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4361; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.take_2d_multi_int8_int32", __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_filename = __pyx_f[2]; __pyx_lineno = 4361; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_5numpy_ndarray, 1, "out", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4363; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_342take_2d_multi_int8_int32(__pyx_self, __pyx_v_values, __pyx_v_indexer, __pyx_v_out, __pyx_v_fill_value); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":4361 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_multi_int8_int32(ndarray[int8_t, ndim=2] values, # <<<<<<<<<<<<<< * indexer, * ndarray[int32_t, ndim=2] out, */ static PyObject *__pyx_pf_6pandas_5algos_342take_2d_multi_int8_int32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_k; Py_ssize_t __pyx_v_n; Py_ssize_t __pyx_v_idx; PyArrayObject *__pyx_v_idx0 = 0; PyArrayObject *__pyx_v_idx1 = 0; __pyx_t_5numpy_int32_t __pyx_v_fv; __Pyx_LocalBuf_ND __pyx_pybuffernd_idx0; __Pyx_Buffer __pyx_pybuffer_idx0; __Pyx_LocalBuf_ND __pyx_pybuffernd_idx1; __Pyx_Buffer __pyx_pybuffer_idx1; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_values; __Pyx_Buffer __pyx_pybuffer_values; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyArrayObject *__pyx_t_2 = NULL; PyArrayObject *__pyx_t_3 = NULL; Py_ssize_t __pyx_t_4; __pyx_t_5numpy_int32_t __pyx_t_5; Py_ssize_t __pyx_t_6; int __pyx_t_7; Py_ssize_t __pyx_t_8; Py_ssize_t __pyx_t_9; Py_ssize_t __pyx_t_10; Py_ssize_t __pyx_t_11; Py_ssize_t __pyx_t_12; Py_ssize_t __pyx_t_13; Py_ssize_t __pyx_t_14; Py_ssize_t __pyx_t_15; __pyx_t_5numpy_int64_t __pyx_t_16; Py_ssize_t __pyx_t_17; Py_ssize_t __pyx_t_18; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("take_2d_multi_int8_int32", 0); __pyx_pybuffer_idx0.pybuffer.buf = NULL; __pyx_pybuffer_idx0.refcount = 0; __pyx_pybuffernd_idx0.data = NULL; __pyx_pybuffernd_idx0.rcbuffer = &__pyx_pybuffer_idx0; __pyx_pybuffer_idx1.pybuffer.buf = NULL; __pyx_pybuffer_idx1.refcount = 0; __pyx_pybuffernd_idx1.data = NULL; __pyx_pybuffernd_idx1.rcbuffer = &__pyx_pybuffer_idx1; __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_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; { __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_int8_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4361; __pyx_clineno = __LINE__; goto __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_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_v_out, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4361; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; __pyx_pybuffernd_out.diminfo[1].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_out.diminfo[1].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[1]; /* "pandas/src/generated.pyx":4367 * cdef: * Py_ssize_t i, j, k, n, idx * ndarray[int64_t] idx0 = indexer[0] # <<<<<<<<<<<<<< * ndarray[int64_t] idx1 = indexer[1] * int32_t fv */ __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_indexer, 0, sizeof(long), PyInt_FromLong, 0, 0, 0); if (!__pyx_t_1) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4367; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 4367; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_2 = ((PyArrayObject *)__pyx_t_1); { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_idx0.rcbuffer->pybuffer, (PyObject*)__pyx_t_2, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { __pyx_v_idx0 = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_idx0.rcbuffer->pybuffer.buf = NULL; {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4367; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } else {__pyx_pybuffernd_idx0.diminfo[0].strides = __pyx_pybuffernd_idx0.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_idx0.diminfo[0].shape = __pyx_pybuffernd_idx0.rcbuffer->pybuffer.shape[0]; } } __pyx_t_2 = 0; __pyx_v_idx0 = ((PyArrayObject *)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/generated.pyx":4368 * Py_ssize_t i, j, k, n, idx * ndarray[int64_t] idx0 = indexer[0] * ndarray[int64_t] idx1 = indexer[1] # <<<<<<<<<<<<<< * int32_t fv * */ __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_indexer, 1, sizeof(long), PyInt_FromLong, 0, 0, 0); if (!__pyx_t_1) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4368; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 4368; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_3 = ((PyArrayObject *)__pyx_t_1); { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_idx1.rcbuffer->pybuffer, (PyObject*)__pyx_t_3, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { __pyx_v_idx1 = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_idx1.rcbuffer->pybuffer.buf = NULL; {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4368; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } else {__pyx_pybuffernd_idx1.diminfo[0].strides = __pyx_pybuffernd_idx1.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_idx1.diminfo[0].shape = __pyx_pybuffernd_idx1.rcbuffer->pybuffer.shape[0]; } } __pyx_t_3 = 0; __pyx_v_idx1 = ((PyArrayObject *)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/generated.pyx":4371 * int32_t fv * * n = len(idx0) # <<<<<<<<<<<<<< * k = len(idx1) * */ __pyx_t_4 = PyObject_Length(((PyObject *)__pyx_v_idx0)); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4371; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_4; /* "pandas/src/generated.pyx":4372 * * n = len(idx0) * k = len(idx1) # <<<<<<<<<<<<<< * * fv = fill_value */ __pyx_t_4 = PyObject_Length(((PyObject *)__pyx_v_idx1)); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4372; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_k = __pyx_t_4; /* "pandas/src/generated.pyx":4374 * k = len(idx1) * * fv = fill_value # <<<<<<<<<<<<<< * for i from 0 <= i < n: * idx = idx0[i] */ __pyx_t_5 = __Pyx_PyInt_from_py_npy_int32(__pyx_v_fill_value); if (unlikely((__pyx_t_5 == (npy_int32)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4374; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_fv = __pyx_t_5; /* "pandas/src/generated.pyx":4375 * * fv = fill_value * for i from 0 <= i < n: # <<<<<<<<<<<<<< * idx = idx0[i] * if idx == -1: */ __pyx_t_4 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_4; __pyx_v_i++) { /* "pandas/src/generated.pyx":4376 * fv = fill_value * for i from 0 <= i < n: * idx = idx0[i] # <<<<<<<<<<<<<< * if idx == -1: * for j from 0 <= j < k: */ __pyx_t_6 = __pyx_v_i; __pyx_v_idx = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_idx0.rcbuffer->pybuffer.buf, __pyx_t_6, __pyx_pybuffernd_idx0.diminfo[0].strides)); /* "pandas/src/generated.pyx":4377 * for i from 0 <= i < n: * idx = idx0[i] * if idx == -1: # <<<<<<<<<<<<<< * for j from 0 <= j < k: * out[i, j] = fv */ __pyx_t_7 = ((__pyx_v_idx == -1) != 0); if (__pyx_t_7) { /* "pandas/src/generated.pyx":4378 * idx = idx0[i] * if idx == -1: * for j from 0 <= j < k: # <<<<<<<<<<<<<< * out[i, j] = fv * else: */ __pyx_t_8 = __pyx_v_k; for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_8; __pyx_v_j++) { /* "pandas/src/generated.pyx":4379 * if idx == -1: * for j from 0 <= j < k: * out[i, j] = fv # <<<<<<<<<<<<<< * else: * for j from 0 <= j < k: */ __pyx_t_9 = __pyx_v_i; __pyx_t_10 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_9, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_10, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_fv; } goto __pyx_L5; } /*else*/ { /* "pandas/src/generated.pyx":4381 * out[i, j] = fv * else: * for j from 0 <= j < k: # <<<<<<<<<<<<<< * if idx1[j] == -1: * out[i, j] = fv */ __pyx_t_8 = __pyx_v_k; for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_8; __pyx_v_j++) { /* "pandas/src/generated.pyx":4382 * else: * for j from 0 <= j < k: * if idx1[j] == -1: # <<<<<<<<<<<<<< * out[i, j] = fv * else: */ __pyx_t_11 = __pyx_v_j; __pyx_t_7 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_idx1.rcbuffer->pybuffer.buf, __pyx_t_11, __pyx_pybuffernd_idx1.diminfo[0].strides)) == -1) != 0); if (__pyx_t_7) { /* "pandas/src/generated.pyx":4383 * for j from 0 <= j < k: * if idx1[j] == -1: * out[i, j] = fv # <<<<<<<<<<<<<< * else: * out[i, j] = values[idx, idx1[j]] */ __pyx_t_12 = __pyx_v_i; __pyx_t_13 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_12, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_13, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_fv; goto __pyx_L10; } /*else*/ { /* "pandas/src/generated.pyx":4385 * out[i, j] = fv * else: * out[i, j] = values[idx, idx1[j]] # <<<<<<<<<<<<<< * * @cython.wraparound(False) */ __pyx_t_14 = __pyx_v_j; __pyx_t_15 = __pyx_v_idx; __pyx_t_16 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_idx1.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_idx1.diminfo[0].strides)); __pyx_t_17 = __pyx_v_i; __pyx_t_18 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_18, __pyx_pybuffernd_out.diminfo[1].strides) = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int8_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_16, __pyx_pybuffernd_values.diminfo[1].strides)); } __pyx_L10:; } } __pyx_L5:; } __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_idx0.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_idx1.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.take_2d_multi_int8_int32", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_idx0.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_idx1.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_idx0); __Pyx_XDECREF((PyObject *)__pyx_v_idx1); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_345take_2d_multi_int8_int64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_345take_2d_multi_int8_int64 = {__Pyx_NAMESTR("take_2d_multi_int8_int64"), (PyCFunction)__pyx_pw_6pandas_5algos_345take_2d_multi_int8_int64, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_345take_2d_multi_int8_int64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_values = 0; PyObject *__pyx_v_indexer = 0; PyArrayObject *__pyx_v_out = 0; PyObject *__pyx_v_fill_value = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("take_2d_multi_int8_int64 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__values,&__pyx_n_s__indexer,&__pyx_n_s__out,&__pyx_n_s__fill_value,0}; PyObject* values[4] = {0,0,0,0}; values[3] = __pyx_k_169; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__values)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__indexer)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_2d_multi_int8_int64", 0, 3, 4, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4389; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__out)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_2d_multi_int8_int64", 0, 3, 4, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4389; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__fill_value); if (value) { values[3] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "take_2d_multi_int8_int64") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4389; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_values = ((PyArrayObject *)values[0]); __pyx_v_indexer = values[1]; __pyx_v_out = ((PyArrayObject *)values[2]); __pyx_v_fill_value = values[3]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("take_2d_multi_int8_int64", 0, 3, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4389; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.take_2d_multi_int8_int64", __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_filename = __pyx_f[2]; __pyx_lineno = 4389; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_5numpy_ndarray, 1, "out", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4391; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_344take_2d_multi_int8_int64(__pyx_self, __pyx_v_values, __pyx_v_indexer, __pyx_v_out, __pyx_v_fill_value); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":4389 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_multi_int8_int64(ndarray[int8_t, ndim=2] values, # <<<<<<<<<<<<<< * indexer, * ndarray[int64_t, ndim=2] out, */ static PyObject *__pyx_pf_6pandas_5algos_344take_2d_multi_int8_int64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_k; Py_ssize_t __pyx_v_n; Py_ssize_t __pyx_v_idx; PyArrayObject *__pyx_v_idx0 = 0; PyArrayObject *__pyx_v_idx1 = 0; __pyx_t_5numpy_int64_t __pyx_v_fv; __Pyx_LocalBuf_ND __pyx_pybuffernd_idx0; __Pyx_Buffer __pyx_pybuffer_idx0; __Pyx_LocalBuf_ND __pyx_pybuffernd_idx1; __Pyx_Buffer __pyx_pybuffer_idx1; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_values; __Pyx_Buffer __pyx_pybuffer_values; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyArrayObject *__pyx_t_2 = NULL; PyArrayObject *__pyx_t_3 = NULL; Py_ssize_t __pyx_t_4; __pyx_t_5numpy_int64_t __pyx_t_5; Py_ssize_t __pyx_t_6; int __pyx_t_7; Py_ssize_t __pyx_t_8; Py_ssize_t __pyx_t_9; Py_ssize_t __pyx_t_10; Py_ssize_t __pyx_t_11; Py_ssize_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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("take_2d_multi_int8_int64", 0); __pyx_pybuffer_idx0.pybuffer.buf = NULL; __pyx_pybuffer_idx0.refcount = 0; __pyx_pybuffernd_idx0.data = NULL; __pyx_pybuffernd_idx0.rcbuffer = &__pyx_pybuffer_idx0; __pyx_pybuffer_idx1.pybuffer.buf = NULL; __pyx_pybuffer_idx1.refcount = 0; __pyx_pybuffernd_idx1.data = NULL; __pyx_pybuffernd_idx1.rcbuffer = &__pyx_pybuffer_idx1; __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_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; { __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_int8_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4389; __pyx_clineno = __LINE__; goto __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_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; 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, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4389; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; __pyx_pybuffernd_out.diminfo[1].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_out.diminfo[1].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[1]; /* "pandas/src/generated.pyx":4395 * cdef: * Py_ssize_t i, j, k, n, idx * ndarray[int64_t] idx0 = indexer[0] # <<<<<<<<<<<<<< * ndarray[int64_t] idx1 = indexer[1] * int64_t fv */ __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_indexer, 0, sizeof(long), PyInt_FromLong, 0, 0, 0); if (!__pyx_t_1) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4395; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 4395; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_2 = ((PyArrayObject *)__pyx_t_1); { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_idx0.rcbuffer->pybuffer, (PyObject*)__pyx_t_2, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { __pyx_v_idx0 = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_idx0.rcbuffer->pybuffer.buf = NULL; {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4395; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } else {__pyx_pybuffernd_idx0.diminfo[0].strides = __pyx_pybuffernd_idx0.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_idx0.diminfo[0].shape = __pyx_pybuffernd_idx0.rcbuffer->pybuffer.shape[0]; } } __pyx_t_2 = 0; __pyx_v_idx0 = ((PyArrayObject *)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/generated.pyx":4396 * Py_ssize_t i, j, k, n, idx * ndarray[int64_t] idx0 = indexer[0] * ndarray[int64_t] idx1 = indexer[1] # <<<<<<<<<<<<<< * int64_t fv * */ __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_indexer, 1, sizeof(long), PyInt_FromLong, 0, 0, 0); if (!__pyx_t_1) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4396; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 4396; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_3 = ((PyArrayObject *)__pyx_t_1); { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_idx1.rcbuffer->pybuffer, (PyObject*)__pyx_t_3, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { __pyx_v_idx1 = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_idx1.rcbuffer->pybuffer.buf = NULL; {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4396; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } else {__pyx_pybuffernd_idx1.diminfo[0].strides = __pyx_pybuffernd_idx1.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_idx1.diminfo[0].shape = __pyx_pybuffernd_idx1.rcbuffer->pybuffer.shape[0]; } } __pyx_t_3 = 0; __pyx_v_idx1 = ((PyArrayObject *)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/generated.pyx":4399 * int64_t fv * * n = len(idx0) # <<<<<<<<<<<<<< * k = len(idx1) * */ __pyx_t_4 = PyObject_Length(((PyObject *)__pyx_v_idx0)); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4399; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_4; /* "pandas/src/generated.pyx":4400 * * n = len(idx0) * k = len(idx1) # <<<<<<<<<<<<<< * * fv = fill_value */ __pyx_t_4 = PyObject_Length(((PyObject *)__pyx_v_idx1)); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4400; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_k = __pyx_t_4; /* "pandas/src/generated.pyx":4402 * k = len(idx1) * * fv = fill_value # <<<<<<<<<<<<<< * for i from 0 <= i < n: * idx = idx0[i] */ __pyx_t_5 = __Pyx_PyInt_from_py_npy_int64(__pyx_v_fill_value); if (unlikely((__pyx_t_5 == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4402; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_fv = __pyx_t_5; /* "pandas/src/generated.pyx":4403 * * fv = fill_value * for i from 0 <= i < n: # <<<<<<<<<<<<<< * idx = idx0[i] * if idx == -1: */ __pyx_t_4 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_4; __pyx_v_i++) { /* "pandas/src/generated.pyx":4404 * fv = fill_value * for i from 0 <= i < n: * idx = idx0[i] # <<<<<<<<<<<<<< * if idx == -1: * for j from 0 <= j < k: */ __pyx_t_6 = __pyx_v_i; __pyx_v_idx = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_idx0.rcbuffer->pybuffer.buf, __pyx_t_6, __pyx_pybuffernd_idx0.diminfo[0].strides)); /* "pandas/src/generated.pyx":4405 * for i from 0 <= i < n: * idx = idx0[i] * if idx == -1: # <<<<<<<<<<<<<< * for j from 0 <= j < k: * out[i, j] = fv */ __pyx_t_7 = ((__pyx_v_idx == -1) != 0); if (__pyx_t_7) { /* "pandas/src/generated.pyx":4406 * idx = idx0[i] * if idx == -1: * for j from 0 <= j < k: # <<<<<<<<<<<<<< * out[i, j] = fv * else: */ __pyx_t_8 = __pyx_v_k; for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_8; __pyx_v_j++) { /* "pandas/src/generated.pyx":4407 * if idx == -1: * for j from 0 <= j < k: * out[i, j] = fv # <<<<<<<<<<<<<< * else: * for j from 0 <= j < k: */ __pyx_t_9 = __pyx_v_i; __pyx_t_10 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_9, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_10, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_fv; } goto __pyx_L5; } /*else*/ { /* "pandas/src/generated.pyx":4409 * out[i, j] = fv * else: * for j from 0 <= j < k: # <<<<<<<<<<<<<< * if idx1[j] == -1: * out[i, j] = fv */ __pyx_t_8 = __pyx_v_k; for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_8; __pyx_v_j++) { /* "pandas/src/generated.pyx":4410 * else: * for j from 0 <= j < k: * if idx1[j] == -1: # <<<<<<<<<<<<<< * out[i, j] = fv * else: */ __pyx_t_11 = __pyx_v_j; __pyx_t_7 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_idx1.rcbuffer->pybuffer.buf, __pyx_t_11, __pyx_pybuffernd_idx1.diminfo[0].strides)) == -1) != 0); if (__pyx_t_7) { /* "pandas/src/generated.pyx":4411 * for j from 0 <= j < k: * if idx1[j] == -1: * out[i, j] = fv # <<<<<<<<<<<<<< * else: * out[i, j] = values[idx, idx1[j]] */ __pyx_t_12 = __pyx_v_i; __pyx_t_13 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_12, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_13, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_fv; goto __pyx_L10; } /*else*/ { /* "pandas/src/generated.pyx":4413 * out[i, j] = fv * else: * out[i, j] = values[idx, idx1[j]] # <<<<<<<<<<<<<< * * @cython.wraparound(False) */ __pyx_t_14 = __pyx_v_j; __pyx_t_15 = __pyx_v_idx; __pyx_t_5 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_idx1.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_idx1.diminfo[0].strides)); __pyx_t_16 = __pyx_v_i; __pyx_t_17 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_17, __pyx_pybuffernd_out.diminfo[1].strides) = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int8_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_5, __pyx_pybuffernd_values.diminfo[1].strides)); } __pyx_L10:; } } __pyx_L5:; } __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_idx0.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_idx1.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.take_2d_multi_int8_int64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_idx0.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_idx1.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_idx0); __Pyx_XDECREF((PyObject *)__pyx_v_idx1); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_347take_2d_multi_int8_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_347take_2d_multi_int8_float64 = {__Pyx_NAMESTR("take_2d_multi_int8_float64"), (PyCFunction)__pyx_pw_6pandas_5algos_347take_2d_multi_int8_float64, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_347take_2d_multi_int8_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_values = 0; PyObject *__pyx_v_indexer = 0; PyArrayObject *__pyx_v_out = 0; PyObject *__pyx_v_fill_value = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("take_2d_multi_int8_float64 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__values,&__pyx_n_s__indexer,&__pyx_n_s__out,&__pyx_n_s__fill_value,0}; PyObject* values[4] = {0,0,0,0}; values[3] = __pyx_k_170; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__values)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__indexer)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_2d_multi_int8_float64", 0, 3, 4, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4417; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__out)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_2d_multi_int8_float64", 0, 3, 4, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4417; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__fill_value); if (value) { values[3] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "take_2d_multi_int8_float64") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4417; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_values = ((PyArrayObject *)values[0]); __pyx_v_indexer = values[1]; __pyx_v_out = ((PyArrayObject *)values[2]); __pyx_v_fill_value = values[3]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("take_2d_multi_int8_float64", 0, 3, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4417; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.take_2d_multi_int8_float64", __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_filename = __pyx_f[2]; __pyx_lineno = 4417; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_5numpy_ndarray, 1, "out", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4419; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_346take_2d_multi_int8_float64(__pyx_self, __pyx_v_values, __pyx_v_indexer, __pyx_v_out, __pyx_v_fill_value); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":4417 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_multi_int8_float64(ndarray[int8_t, ndim=2] values, # <<<<<<<<<<<<<< * indexer, * ndarray[float64_t, ndim=2] out, */ static PyObject *__pyx_pf_6pandas_5algos_346take_2d_multi_int8_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_k; Py_ssize_t __pyx_v_n; Py_ssize_t __pyx_v_idx; PyArrayObject *__pyx_v_idx0 = 0; PyArrayObject *__pyx_v_idx1 = 0; __pyx_t_5numpy_float64_t __pyx_v_fv; __Pyx_LocalBuf_ND __pyx_pybuffernd_idx0; __Pyx_Buffer __pyx_pybuffer_idx0; __Pyx_LocalBuf_ND __pyx_pybuffernd_idx1; __Pyx_Buffer __pyx_pybuffer_idx1; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_values; __Pyx_Buffer __pyx_pybuffer_values; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyArrayObject *__pyx_t_2 = NULL; PyArrayObject *__pyx_t_3 = NULL; Py_ssize_t __pyx_t_4; __pyx_t_5numpy_float64_t __pyx_t_5; Py_ssize_t __pyx_t_6; int __pyx_t_7; Py_ssize_t __pyx_t_8; Py_ssize_t __pyx_t_9; Py_ssize_t __pyx_t_10; Py_ssize_t __pyx_t_11; Py_ssize_t __pyx_t_12; Py_ssize_t __pyx_t_13; Py_ssize_t __pyx_t_14; Py_ssize_t __pyx_t_15; __pyx_t_5numpy_int64_t __pyx_t_16; Py_ssize_t __pyx_t_17; Py_ssize_t __pyx_t_18; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("take_2d_multi_int8_float64", 0); __pyx_pybuffer_idx0.pybuffer.buf = NULL; __pyx_pybuffer_idx0.refcount = 0; __pyx_pybuffernd_idx0.data = NULL; __pyx_pybuffernd_idx0.rcbuffer = &__pyx_pybuffer_idx0; __pyx_pybuffer_idx1.pybuffer.buf = NULL; __pyx_pybuffer_idx1.refcount = 0; __pyx_pybuffernd_idx1.data = NULL; __pyx_pybuffernd_idx1.rcbuffer = &__pyx_pybuffer_idx1; __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_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; { __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_int8_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4417; __pyx_clineno = __LINE__; goto __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_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; 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, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4417; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; __pyx_pybuffernd_out.diminfo[1].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_out.diminfo[1].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[1]; /* "pandas/src/generated.pyx":4423 * cdef: * Py_ssize_t i, j, k, n, idx * ndarray[int64_t] idx0 = indexer[0] # <<<<<<<<<<<<<< * ndarray[int64_t] idx1 = indexer[1] * float64_t fv */ __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_indexer, 0, sizeof(long), PyInt_FromLong, 0, 0, 0); if (!__pyx_t_1) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4423; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 4423; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_2 = ((PyArrayObject *)__pyx_t_1); { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_idx0.rcbuffer->pybuffer, (PyObject*)__pyx_t_2, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { __pyx_v_idx0 = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_idx0.rcbuffer->pybuffer.buf = NULL; {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4423; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } else {__pyx_pybuffernd_idx0.diminfo[0].strides = __pyx_pybuffernd_idx0.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_idx0.diminfo[0].shape = __pyx_pybuffernd_idx0.rcbuffer->pybuffer.shape[0]; } } __pyx_t_2 = 0; __pyx_v_idx0 = ((PyArrayObject *)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/generated.pyx":4424 * Py_ssize_t i, j, k, n, idx * ndarray[int64_t] idx0 = indexer[0] * ndarray[int64_t] idx1 = indexer[1] # <<<<<<<<<<<<<< * float64_t fv * */ __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_indexer, 1, sizeof(long), PyInt_FromLong, 0, 0, 0); if (!__pyx_t_1) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4424; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 4424; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_3 = ((PyArrayObject *)__pyx_t_1); { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_idx1.rcbuffer->pybuffer, (PyObject*)__pyx_t_3, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { __pyx_v_idx1 = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_idx1.rcbuffer->pybuffer.buf = NULL; {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4424; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } else {__pyx_pybuffernd_idx1.diminfo[0].strides = __pyx_pybuffernd_idx1.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_idx1.diminfo[0].shape = __pyx_pybuffernd_idx1.rcbuffer->pybuffer.shape[0]; } } __pyx_t_3 = 0; __pyx_v_idx1 = ((PyArrayObject *)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/generated.pyx":4427 * float64_t fv * * n = len(idx0) # <<<<<<<<<<<<<< * k = len(idx1) * */ __pyx_t_4 = PyObject_Length(((PyObject *)__pyx_v_idx0)); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4427; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_4; /* "pandas/src/generated.pyx":4428 * * n = len(idx0) * k = len(idx1) # <<<<<<<<<<<<<< * * fv = fill_value */ __pyx_t_4 = PyObject_Length(((PyObject *)__pyx_v_idx1)); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4428; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_k = __pyx_t_4; /* "pandas/src/generated.pyx":4430 * k = len(idx1) * * fv = fill_value # <<<<<<<<<<<<<< * for i from 0 <= i < n: * idx = idx0[i] */ __pyx_t_5 = __pyx_PyFloat_AsDouble(__pyx_v_fill_value); if (unlikely((__pyx_t_5 == (npy_float64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4430; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_fv = __pyx_t_5; /* "pandas/src/generated.pyx":4431 * * fv = fill_value * for i from 0 <= i < n: # <<<<<<<<<<<<<< * idx = idx0[i] * if idx == -1: */ __pyx_t_4 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_4; __pyx_v_i++) { /* "pandas/src/generated.pyx":4432 * fv = fill_value * for i from 0 <= i < n: * idx = idx0[i] # <<<<<<<<<<<<<< * if idx == -1: * for j from 0 <= j < k: */ __pyx_t_6 = __pyx_v_i; __pyx_v_idx = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_idx0.rcbuffer->pybuffer.buf, __pyx_t_6, __pyx_pybuffernd_idx0.diminfo[0].strides)); /* "pandas/src/generated.pyx":4433 * for i from 0 <= i < n: * idx = idx0[i] * if idx == -1: # <<<<<<<<<<<<<< * for j from 0 <= j < k: * out[i, j] = fv */ __pyx_t_7 = ((__pyx_v_idx == -1) != 0); if (__pyx_t_7) { /* "pandas/src/generated.pyx":4434 * idx = idx0[i] * if idx == -1: * for j from 0 <= j < k: # <<<<<<<<<<<<<< * out[i, j] = fv * else: */ __pyx_t_8 = __pyx_v_k; for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_8; __pyx_v_j++) { /* "pandas/src/generated.pyx":4435 * if idx == -1: * for j from 0 <= j < k: * out[i, j] = fv # <<<<<<<<<<<<<< * else: * for j from 0 <= j < k: */ __pyx_t_9 = __pyx_v_i; __pyx_t_10 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_9, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_10, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_fv; } goto __pyx_L5; } /*else*/ { /* "pandas/src/generated.pyx":4437 * out[i, j] = fv * else: * for j from 0 <= j < k: # <<<<<<<<<<<<<< * if idx1[j] == -1: * out[i, j] = fv */ __pyx_t_8 = __pyx_v_k; for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_8; __pyx_v_j++) { /* "pandas/src/generated.pyx":4438 * else: * for j from 0 <= j < k: * if idx1[j] == -1: # <<<<<<<<<<<<<< * out[i, j] = fv * else: */ __pyx_t_11 = __pyx_v_j; __pyx_t_7 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_idx1.rcbuffer->pybuffer.buf, __pyx_t_11, __pyx_pybuffernd_idx1.diminfo[0].strides)) == -1) != 0); if (__pyx_t_7) { /* "pandas/src/generated.pyx":4439 * for j from 0 <= j < k: * if idx1[j] == -1: * out[i, j] = fv # <<<<<<<<<<<<<< * else: * out[i, j] = values[idx, idx1[j]] */ __pyx_t_12 = __pyx_v_i; __pyx_t_13 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_12, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_13, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_fv; goto __pyx_L10; } /*else*/ { /* "pandas/src/generated.pyx":4441 * out[i, j] = fv * else: * out[i, j] = values[idx, idx1[j]] # <<<<<<<<<<<<<< * * @cython.wraparound(False) */ __pyx_t_14 = __pyx_v_j; __pyx_t_15 = __pyx_v_idx; __pyx_t_16 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_idx1.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_idx1.diminfo[0].strides)); __pyx_t_17 = __pyx_v_i; __pyx_t_18 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_18, __pyx_pybuffernd_out.diminfo[1].strides) = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int8_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_16, __pyx_pybuffernd_values.diminfo[1].strides)); } __pyx_L10:; } } __pyx_L5:; } __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_idx0.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_idx1.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.take_2d_multi_int8_float64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_idx0.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_idx1.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_idx0); __Pyx_XDECREF((PyObject *)__pyx_v_idx1); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_349take_2d_multi_int16_int16(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_349take_2d_multi_int16_int16 = {__Pyx_NAMESTR("take_2d_multi_int16_int16"), (PyCFunction)__pyx_pw_6pandas_5algos_349take_2d_multi_int16_int16, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_349take_2d_multi_int16_int16(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_values = 0; PyObject *__pyx_v_indexer = 0; PyArrayObject *__pyx_v_out = 0; PyObject *__pyx_v_fill_value = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("take_2d_multi_int16_int16 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__values,&__pyx_n_s__indexer,&__pyx_n_s__out,&__pyx_n_s__fill_value,0}; PyObject* values[4] = {0,0,0,0}; values[3] = __pyx_k_171; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__values)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__indexer)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_2d_multi_int16_int16", 0, 3, 4, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4445; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__out)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_2d_multi_int16_int16", 0, 3, 4, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4445; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__fill_value); if (value) { values[3] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "take_2d_multi_int16_int16") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4445; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_values = ((PyArrayObject *)values[0]); __pyx_v_indexer = values[1]; __pyx_v_out = ((PyArrayObject *)values[2]); __pyx_v_fill_value = values[3]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("take_2d_multi_int16_int16", 0, 3, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4445; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.take_2d_multi_int16_int16", __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_filename = __pyx_f[2]; __pyx_lineno = 4445; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_5numpy_ndarray, 1, "out", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4447; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_348take_2d_multi_int16_int16(__pyx_self, __pyx_v_values, __pyx_v_indexer, __pyx_v_out, __pyx_v_fill_value); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":4445 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_multi_int16_int16(ndarray[int16_t, ndim=2] values, # <<<<<<<<<<<<<< * indexer, * ndarray[int16_t, ndim=2] out, */ static PyObject *__pyx_pf_6pandas_5algos_348take_2d_multi_int16_int16(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_k; Py_ssize_t __pyx_v_n; Py_ssize_t __pyx_v_idx; PyArrayObject *__pyx_v_idx0 = 0; PyArrayObject *__pyx_v_idx1 = 0; __pyx_t_5numpy_int16_t __pyx_v_fv; __Pyx_LocalBuf_ND __pyx_pybuffernd_idx0; __Pyx_Buffer __pyx_pybuffer_idx0; __Pyx_LocalBuf_ND __pyx_pybuffernd_idx1; __Pyx_Buffer __pyx_pybuffer_idx1; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_values; __Pyx_Buffer __pyx_pybuffer_values; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyArrayObject *__pyx_t_2 = NULL; PyArrayObject *__pyx_t_3 = NULL; Py_ssize_t __pyx_t_4; __pyx_t_5numpy_int16_t __pyx_t_5; Py_ssize_t __pyx_t_6; int __pyx_t_7; Py_ssize_t __pyx_t_8; Py_ssize_t __pyx_t_9; Py_ssize_t __pyx_t_10; Py_ssize_t __pyx_t_11; Py_ssize_t __pyx_t_12; Py_ssize_t __pyx_t_13; Py_ssize_t __pyx_t_14; Py_ssize_t __pyx_t_15; __pyx_t_5numpy_int64_t __pyx_t_16; Py_ssize_t __pyx_t_17; Py_ssize_t __pyx_t_18; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("take_2d_multi_int16_int16", 0); __pyx_pybuffer_idx0.pybuffer.buf = NULL; __pyx_pybuffer_idx0.refcount = 0; __pyx_pybuffernd_idx0.data = NULL; __pyx_pybuffernd_idx0.rcbuffer = &__pyx_pybuffer_idx0; __pyx_pybuffer_idx1.pybuffer.buf = NULL; __pyx_pybuffer_idx1.refcount = 0; __pyx_pybuffernd_idx1.data = NULL; __pyx_pybuffernd_idx1.rcbuffer = &__pyx_pybuffer_idx1; __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_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; { __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_int16_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4445; __pyx_clineno = __LINE__; goto __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_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_v_out, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int16_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4445; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; __pyx_pybuffernd_out.diminfo[1].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_out.diminfo[1].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[1]; /* "pandas/src/generated.pyx":4451 * cdef: * Py_ssize_t i, j, k, n, idx * ndarray[int64_t] idx0 = indexer[0] # <<<<<<<<<<<<<< * ndarray[int64_t] idx1 = indexer[1] * int16_t fv */ __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_indexer, 0, sizeof(long), PyInt_FromLong, 0, 0, 0); if (!__pyx_t_1) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4451; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 4451; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_2 = ((PyArrayObject *)__pyx_t_1); { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_idx0.rcbuffer->pybuffer, (PyObject*)__pyx_t_2, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { __pyx_v_idx0 = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_idx0.rcbuffer->pybuffer.buf = NULL; {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4451; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } else {__pyx_pybuffernd_idx0.diminfo[0].strides = __pyx_pybuffernd_idx0.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_idx0.diminfo[0].shape = __pyx_pybuffernd_idx0.rcbuffer->pybuffer.shape[0]; } } __pyx_t_2 = 0; __pyx_v_idx0 = ((PyArrayObject *)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/generated.pyx":4452 * Py_ssize_t i, j, k, n, idx * ndarray[int64_t] idx0 = indexer[0] * ndarray[int64_t] idx1 = indexer[1] # <<<<<<<<<<<<<< * int16_t fv * */ __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_indexer, 1, sizeof(long), PyInt_FromLong, 0, 0, 0); if (!__pyx_t_1) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4452; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 4452; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_3 = ((PyArrayObject *)__pyx_t_1); { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_idx1.rcbuffer->pybuffer, (PyObject*)__pyx_t_3, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { __pyx_v_idx1 = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_idx1.rcbuffer->pybuffer.buf = NULL; {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4452; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } else {__pyx_pybuffernd_idx1.diminfo[0].strides = __pyx_pybuffernd_idx1.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_idx1.diminfo[0].shape = __pyx_pybuffernd_idx1.rcbuffer->pybuffer.shape[0]; } } __pyx_t_3 = 0; __pyx_v_idx1 = ((PyArrayObject *)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/generated.pyx":4455 * int16_t fv * * n = len(idx0) # <<<<<<<<<<<<<< * k = len(idx1) * */ __pyx_t_4 = PyObject_Length(((PyObject *)__pyx_v_idx0)); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4455; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_4; /* "pandas/src/generated.pyx":4456 * * n = len(idx0) * k = len(idx1) # <<<<<<<<<<<<<< * * fv = fill_value */ __pyx_t_4 = PyObject_Length(((PyObject *)__pyx_v_idx1)); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4456; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_k = __pyx_t_4; /* "pandas/src/generated.pyx":4458 * k = len(idx1) * * fv = fill_value # <<<<<<<<<<<<<< * for i from 0 <= i < n: * idx = idx0[i] */ __pyx_t_5 = __Pyx_PyInt_from_py_npy_int16(__pyx_v_fill_value); if (unlikely((__pyx_t_5 == (npy_int16)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4458; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_fv = __pyx_t_5; /* "pandas/src/generated.pyx":4459 * * fv = fill_value * for i from 0 <= i < n: # <<<<<<<<<<<<<< * idx = idx0[i] * if idx == -1: */ __pyx_t_4 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_4; __pyx_v_i++) { /* "pandas/src/generated.pyx":4460 * fv = fill_value * for i from 0 <= i < n: * idx = idx0[i] # <<<<<<<<<<<<<< * if idx == -1: * for j from 0 <= j < k: */ __pyx_t_6 = __pyx_v_i; __pyx_v_idx = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_idx0.rcbuffer->pybuffer.buf, __pyx_t_6, __pyx_pybuffernd_idx0.diminfo[0].strides)); /* "pandas/src/generated.pyx":4461 * for i from 0 <= i < n: * idx = idx0[i] * if idx == -1: # <<<<<<<<<<<<<< * for j from 0 <= j < k: * out[i, j] = fv */ __pyx_t_7 = ((__pyx_v_idx == -1) != 0); if (__pyx_t_7) { /* "pandas/src/generated.pyx":4462 * idx = idx0[i] * if idx == -1: * for j from 0 <= j < k: # <<<<<<<<<<<<<< * out[i, j] = fv * else: */ __pyx_t_8 = __pyx_v_k; for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_8; __pyx_v_j++) { /* "pandas/src/generated.pyx":4463 * if idx == -1: * for j from 0 <= j < k: * out[i, j] = fv # <<<<<<<<<<<<<< * else: * for j from 0 <= j < k: */ __pyx_t_9 = __pyx_v_i; __pyx_t_10 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int16_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_9, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_10, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_fv; } goto __pyx_L5; } /*else*/ { /* "pandas/src/generated.pyx":4465 * out[i, j] = fv * else: * for j from 0 <= j < k: # <<<<<<<<<<<<<< * if idx1[j] == -1: * out[i, j] = fv */ __pyx_t_8 = __pyx_v_k; for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_8; __pyx_v_j++) { /* "pandas/src/generated.pyx":4466 * else: * for j from 0 <= j < k: * if idx1[j] == -1: # <<<<<<<<<<<<<< * out[i, j] = fv * else: */ __pyx_t_11 = __pyx_v_j; __pyx_t_7 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_idx1.rcbuffer->pybuffer.buf, __pyx_t_11, __pyx_pybuffernd_idx1.diminfo[0].strides)) == -1) != 0); if (__pyx_t_7) { /* "pandas/src/generated.pyx":4467 * for j from 0 <= j < k: * if idx1[j] == -1: * out[i, j] = fv # <<<<<<<<<<<<<< * else: * out[i, j] = values[idx, idx1[j]] */ __pyx_t_12 = __pyx_v_i; __pyx_t_13 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int16_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_12, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_13, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_fv; goto __pyx_L10; } /*else*/ { /* "pandas/src/generated.pyx":4469 * out[i, j] = fv * else: * out[i, j] = values[idx, idx1[j]] # <<<<<<<<<<<<<< * * @cython.wraparound(False) */ __pyx_t_14 = __pyx_v_j; __pyx_t_15 = __pyx_v_idx; __pyx_t_16 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_idx1.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_idx1.diminfo[0].strides)); __pyx_t_17 = __pyx_v_i; __pyx_t_18 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int16_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_18, __pyx_pybuffernd_out.diminfo[1].strides) = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int16_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_16, __pyx_pybuffernd_values.diminfo[1].strides)); } __pyx_L10:; } } __pyx_L5:; } __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_idx0.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_idx1.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.take_2d_multi_int16_int16", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_idx0.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_idx1.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_idx0); __Pyx_XDECREF((PyObject *)__pyx_v_idx1); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_351take_2d_multi_int16_int32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_351take_2d_multi_int16_int32 = {__Pyx_NAMESTR("take_2d_multi_int16_int32"), (PyCFunction)__pyx_pw_6pandas_5algos_351take_2d_multi_int16_int32, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_351take_2d_multi_int16_int32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_values = 0; PyObject *__pyx_v_indexer = 0; PyArrayObject *__pyx_v_out = 0; PyObject *__pyx_v_fill_value = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("take_2d_multi_int16_int32 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__values,&__pyx_n_s__indexer,&__pyx_n_s__out,&__pyx_n_s__fill_value,0}; PyObject* values[4] = {0,0,0,0}; values[3] = __pyx_k_172; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__values)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__indexer)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_2d_multi_int16_int32", 0, 3, 4, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4473; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__out)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_2d_multi_int16_int32", 0, 3, 4, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4473; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__fill_value); if (value) { values[3] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "take_2d_multi_int16_int32") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4473; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_values = ((PyArrayObject *)values[0]); __pyx_v_indexer = values[1]; __pyx_v_out = ((PyArrayObject *)values[2]); __pyx_v_fill_value = values[3]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("take_2d_multi_int16_int32", 0, 3, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4473; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.take_2d_multi_int16_int32", __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_filename = __pyx_f[2]; __pyx_lineno = 4473; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_5numpy_ndarray, 1, "out", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4475; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_350take_2d_multi_int16_int32(__pyx_self, __pyx_v_values, __pyx_v_indexer, __pyx_v_out, __pyx_v_fill_value); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":4473 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_multi_int16_int32(ndarray[int16_t, ndim=2] values, # <<<<<<<<<<<<<< * indexer, * ndarray[int32_t, ndim=2] out, */ static PyObject *__pyx_pf_6pandas_5algos_350take_2d_multi_int16_int32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_k; Py_ssize_t __pyx_v_n; Py_ssize_t __pyx_v_idx; PyArrayObject *__pyx_v_idx0 = 0; PyArrayObject *__pyx_v_idx1 = 0; __pyx_t_5numpy_int32_t __pyx_v_fv; __Pyx_LocalBuf_ND __pyx_pybuffernd_idx0; __Pyx_Buffer __pyx_pybuffer_idx0; __Pyx_LocalBuf_ND __pyx_pybuffernd_idx1; __Pyx_Buffer __pyx_pybuffer_idx1; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_values; __Pyx_Buffer __pyx_pybuffer_values; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyArrayObject *__pyx_t_2 = NULL; PyArrayObject *__pyx_t_3 = NULL; Py_ssize_t __pyx_t_4; __pyx_t_5numpy_int32_t __pyx_t_5; Py_ssize_t __pyx_t_6; int __pyx_t_7; Py_ssize_t __pyx_t_8; Py_ssize_t __pyx_t_9; Py_ssize_t __pyx_t_10; Py_ssize_t __pyx_t_11; Py_ssize_t __pyx_t_12; Py_ssize_t __pyx_t_13; Py_ssize_t __pyx_t_14; Py_ssize_t __pyx_t_15; __pyx_t_5numpy_int64_t __pyx_t_16; Py_ssize_t __pyx_t_17; Py_ssize_t __pyx_t_18; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("take_2d_multi_int16_int32", 0); __pyx_pybuffer_idx0.pybuffer.buf = NULL; __pyx_pybuffer_idx0.refcount = 0; __pyx_pybuffernd_idx0.data = NULL; __pyx_pybuffernd_idx0.rcbuffer = &__pyx_pybuffer_idx0; __pyx_pybuffer_idx1.pybuffer.buf = NULL; __pyx_pybuffer_idx1.refcount = 0; __pyx_pybuffernd_idx1.data = NULL; __pyx_pybuffernd_idx1.rcbuffer = &__pyx_pybuffer_idx1; __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_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; { __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_int16_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4473; __pyx_clineno = __LINE__; goto __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_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_v_out, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4473; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; __pyx_pybuffernd_out.diminfo[1].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_out.diminfo[1].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[1]; /* "pandas/src/generated.pyx":4479 * cdef: * Py_ssize_t i, j, k, n, idx * ndarray[int64_t] idx0 = indexer[0] # <<<<<<<<<<<<<< * ndarray[int64_t] idx1 = indexer[1] * int32_t fv */ __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_indexer, 0, sizeof(long), PyInt_FromLong, 0, 0, 0); if (!__pyx_t_1) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4479; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 4479; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_2 = ((PyArrayObject *)__pyx_t_1); { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_idx0.rcbuffer->pybuffer, (PyObject*)__pyx_t_2, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { __pyx_v_idx0 = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_idx0.rcbuffer->pybuffer.buf = NULL; {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4479; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } else {__pyx_pybuffernd_idx0.diminfo[0].strides = __pyx_pybuffernd_idx0.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_idx0.diminfo[0].shape = __pyx_pybuffernd_idx0.rcbuffer->pybuffer.shape[0]; } } __pyx_t_2 = 0; __pyx_v_idx0 = ((PyArrayObject *)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/generated.pyx":4480 * Py_ssize_t i, j, k, n, idx * ndarray[int64_t] idx0 = indexer[0] * ndarray[int64_t] idx1 = indexer[1] # <<<<<<<<<<<<<< * int32_t fv * */ __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_indexer, 1, sizeof(long), PyInt_FromLong, 0, 0, 0); if (!__pyx_t_1) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4480; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 4480; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_3 = ((PyArrayObject *)__pyx_t_1); { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_idx1.rcbuffer->pybuffer, (PyObject*)__pyx_t_3, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { __pyx_v_idx1 = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_idx1.rcbuffer->pybuffer.buf = NULL; {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4480; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } else {__pyx_pybuffernd_idx1.diminfo[0].strides = __pyx_pybuffernd_idx1.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_idx1.diminfo[0].shape = __pyx_pybuffernd_idx1.rcbuffer->pybuffer.shape[0]; } } __pyx_t_3 = 0; __pyx_v_idx1 = ((PyArrayObject *)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/generated.pyx":4483 * int32_t fv * * n = len(idx0) # <<<<<<<<<<<<<< * k = len(idx1) * */ __pyx_t_4 = PyObject_Length(((PyObject *)__pyx_v_idx0)); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4483; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_4; /* "pandas/src/generated.pyx":4484 * * n = len(idx0) * k = len(idx1) # <<<<<<<<<<<<<< * * fv = fill_value */ __pyx_t_4 = PyObject_Length(((PyObject *)__pyx_v_idx1)); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4484; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_k = __pyx_t_4; /* "pandas/src/generated.pyx":4486 * k = len(idx1) * * fv = fill_value # <<<<<<<<<<<<<< * for i from 0 <= i < n: * idx = idx0[i] */ __pyx_t_5 = __Pyx_PyInt_from_py_npy_int32(__pyx_v_fill_value); if (unlikely((__pyx_t_5 == (npy_int32)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4486; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_fv = __pyx_t_5; /* "pandas/src/generated.pyx":4487 * * fv = fill_value * for i from 0 <= i < n: # <<<<<<<<<<<<<< * idx = idx0[i] * if idx == -1: */ __pyx_t_4 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_4; __pyx_v_i++) { /* "pandas/src/generated.pyx":4488 * fv = fill_value * for i from 0 <= i < n: * idx = idx0[i] # <<<<<<<<<<<<<< * if idx == -1: * for j from 0 <= j < k: */ __pyx_t_6 = __pyx_v_i; __pyx_v_idx = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_idx0.rcbuffer->pybuffer.buf, __pyx_t_6, __pyx_pybuffernd_idx0.diminfo[0].strides)); /* "pandas/src/generated.pyx":4489 * for i from 0 <= i < n: * idx = idx0[i] * if idx == -1: # <<<<<<<<<<<<<< * for j from 0 <= j < k: * out[i, j] = fv */ __pyx_t_7 = ((__pyx_v_idx == -1) != 0); if (__pyx_t_7) { /* "pandas/src/generated.pyx":4490 * idx = idx0[i] * if idx == -1: * for j from 0 <= j < k: # <<<<<<<<<<<<<< * out[i, j] = fv * else: */ __pyx_t_8 = __pyx_v_k; for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_8; __pyx_v_j++) { /* "pandas/src/generated.pyx":4491 * if idx == -1: * for j from 0 <= j < k: * out[i, j] = fv # <<<<<<<<<<<<<< * else: * for j from 0 <= j < k: */ __pyx_t_9 = __pyx_v_i; __pyx_t_10 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_9, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_10, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_fv; } goto __pyx_L5; } /*else*/ { /* "pandas/src/generated.pyx":4493 * out[i, j] = fv * else: * for j from 0 <= j < k: # <<<<<<<<<<<<<< * if idx1[j] == -1: * out[i, j] = fv */ __pyx_t_8 = __pyx_v_k; for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_8; __pyx_v_j++) { /* "pandas/src/generated.pyx":4494 * else: * for j from 0 <= j < k: * if idx1[j] == -1: # <<<<<<<<<<<<<< * out[i, j] = fv * else: */ __pyx_t_11 = __pyx_v_j; __pyx_t_7 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_idx1.rcbuffer->pybuffer.buf, __pyx_t_11, __pyx_pybuffernd_idx1.diminfo[0].strides)) == -1) != 0); if (__pyx_t_7) { /* "pandas/src/generated.pyx":4495 * for j from 0 <= j < k: * if idx1[j] == -1: * out[i, j] = fv # <<<<<<<<<<<<<< * else: * out[i, j] = values[idx, idx1[j]] */ __pyx_t_12 = __pyx_v_i; __pyx_t_13 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_12, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_13, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_fv; goto __pyx_L10; } /*else*/ { /* "pandas/src/generated.pyx":4497 * out[i, j] = fv * else: * out[i, j] = values[idx, idx1[j]] # <<<<<<<<<<<<<< * * @cython.wraparound(False) */ __pyx_t_14 = __pyx_v_j; __pyx_t_15 = __pyx_v_idx; __pyx_t_16 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_idx1.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_idx1.diminfo[0].strides)); __pyx_t_17 = __pyx_v_i; __pyx_t_18 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_18, __pyx_pybuffernd_out.diminfo[1].strides) = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int16_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_16, __pyx_pybuffernd_values.diminfo[1].strides)); } __pyx_L10:; } } __pyx_L5:; } __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_idx0.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_idx1.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.take_2d_multi_int16_int32", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_idx0.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_idx1.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_idx0); __Pyx_XDECREF((PyObject *)__pyx_v_idx1); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_353take_2d_multi_int16_int64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_353take_2d_multi_int16_int64 = {__Pyx_NAMESTR("take_2d_multi_int16_int64"), (PyCFunction)__pyx_pw_6pandas_5algos_353take_2d_multi_int16_int64, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_353take_2d_multi_int16_int64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_values = 0; PyObject *__pyx_v_indexer = 0; PyArrayObject *__pyx_v_out = 0; PyObject *__pyx_v_fill_value = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("take_2d_multi_int16_int64 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__values,&__pyx_n_s__indexer,&__pyx_n_s__out,&__pyx_n_s__fill_value,0}; PyObject* values[4] = {0,0,0,0}; values[3] = __pyx_k_173; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__values)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__indexer)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_2d_multi_int16_int64", 0, 3, 4, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4501; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__out)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_2d_multi_int16_int64", 0, 3, 4, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4501; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__fill_value); if (value) { values[3] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "take_2d_multi_int16_int64") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4501; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_values = ((PyArrayObject *)values[0]); __pyx_v_indexer = values[1]; __pyx_v_out = ((PyArrayObject *)values[2]); __pyx_v_fill_value = values[3]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("take_2d_multi_int16_int64", 0, 3, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4501; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.take_2d_multi_int16_int64", __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_filename = __pyx_f[2]; __pyx_lineno = 4501; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_5numpy_ndarray, 1, "out", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4503; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_352take_2d_multi_int16_int64(__pyx_self, __pyx_v_values, __pyx_v_indexer, __pyx_v_out, __pyx_v_fill_value); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":4501 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_multi_int16_int64(ndarray[int16_t, ndim=2] values, # <<<<<<<<<<<<<< * indexer, * ndarray[int64_t, ndim=2] out, */ static PyObject *__pyx_pf_6pandas_5algos_352take_2d_multi_int16_int64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_k; Py_ssize_t __pyx_v_n; Py_ssize_t __pyx_v_idx; PyArrayObject *__pyx_v_idx0 = 0; PyArrayObject *__pyx_v_idx1 = 0; __pyx_t_5numpy_int64_t __pyx_v_fv; __Pyx_LocalBuf_ND __pyx_pybuffernd_idx0; __Pyx_Buffer __pyx_pybuffer_idx0; __Pyx_LocalBuf_ND __pyx_pybuffernd_idx1; __Pyx_Buffer __pyx_pybuffer_idx1; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_values; __Pyx_Buffer __pyx_pybuffer_values; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyArrayObject *__pyx_t_2 = NULL; PyArrayObject *__pyx_t_3 = NULL; Py_ssize_t __pyx_t_4; __pyx_t_5numpy_int64_t __pyx_t_5; Py_ssize_t __pyx_t_6; int __pyx_t_7; Py_ssize_t __pyx_t_8; Py_ssize_t __pyx_t_9; Py_ssize_t __pyx_t_10; Py_ssize_t __pyx_t_11; Py_ssize_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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("take_2d_multi_int16_int64", 0); __pyx_pybuffer_idx0.pybuffer.buf = NULL; __pyx_pybuffer_idx0.refcount = 0; __pyx_pybuffernd_idx0.data = NULL; __pyx_pybuffernd_idx0.rcbuffer = &__pyx_pybuffer_idx0; __pyx_pybuffer_idx1.pybuffer.buf = NULL; __pyx_pybuffer_idx1.refcount = 0; __pyx_pybuffernd_idx1.data = NULL; __pyx_pybuffernd_idx1.rcbuffer = &__pyx_pybuffer_idx1; __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_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; { __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_int16_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4501; __pyx_clineno = __LINE__; goto __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_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; 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, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4501; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; __pyx_pybuffernd_out.diminfo[1].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_out.diminfo[1].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[1]; /* "pandas/src/generated.pyx":4507 * cdef: * Py_ssize_t i, j, k, n, idx * ndarray[int64_t] idx0 = indexer[0] # <<<<<<<<<<<<<< * ndarray[int64_t] idx1 = indexer[1] * int64_t fv */ __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_indexer, 0, sizeof(long), PyInt_FromLong, 0, 0, 0); if (!__pyx_t_1) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4507; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 4507; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_2 = ((PyArrayObject *)__pyx_t_1); { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_idx0.rcbuffer->pybuffer, (PyObject*)__pyx_t_2, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { __pyx_v_idx0 = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_idx0.rcbuffer->pybuffer.buf = NULL; {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4507; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } else {__pyx_pybuffernd_idx0.diminfo[0].strides = __pyx_pybuffernd_idx0.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_idx0.diminfo[0].shape = __pyx_pybuffernd_idx0.rcbuffer->pybuffer.shape[0]; } } __pyx_t_2 = 0; __pyx_v_idx0 = ((PyArrayObject *)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/generated.pyx":4508 * Py_ssize_t i, j, k, n, idx * ndarray[int64_t] idx0 = indexer[0] * ndarray[int64_t] idx1 = indexer[1] # <<<<<<<<<<<<<< * int64_t fv * */ __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_indexer, 1, sizeof(long), PyInt_FromLong, 0, 0, 0); if (!__pyx_t_1) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4508; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 4508; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_3 = ((PyArrayObject *)__pyx_t_1); { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_idx1.rcbuffer->pybuffer, (PyObject*)__pyx_t_3, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { __pyx_v_idx1 = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_idx1.rcbuffer->pybuffer.buf = NULL; {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4508; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } else {__pyx_pybuffernd_idx1.diminfo[0].strides = __pyx_pybuffernd_idx1.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_idx1.diminfo[0].shape = __pyx_pybuffernd_idx1.rcbuffer->pybuffer.shape[0]; } } __pyx_t_3 = 0; __pyx_v_idx1 = ((PyArrayObject *)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/generated.pyx":4511 * int64_t fv * * n = len(idx0) # <<<<<<<<<<<<<< * k = len(idx1) * */ __pyx_t_4 = PyObject_Length(((PyObject *)__pyx_v_idx0)); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4511; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_4; /* "pandas/src/generated.pyx":4512 * * n = len(idx0) * k = len(idx1) # <<<<<<<<<<<<<< * * fv = fill_value */ __pyx_t_4 = PyObject_Length(((PyObject *)__pyx_v_idx1)); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4512; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_k = __pyx_t_4; /* "pandas/src/generated.pyx":4514 * k = len(idx1) * * fv = fill_value # <<<<<<<<<<<<<< * for i from 0 <= i < n: * idx = idx0[i] */ __pyx_t_5 = __Pyx_PyInt_from_py_npy_int64(__pyx_v_fill_value); if (unlikely((__pyx_t_5 == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4514; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_fv = __pyx_t_5; /* "pandas/src/generated.pyx":4515 * * fv = fill_value * for i from 0 <= i < n: # <<<<<<<<<<<<<< * idx = idx0[i] * if idx == -1: */ __pyx_t_4 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_4; __pyx_v_i++) { /* "pandas/src/generated.pyx":4516 * fv = fill_value * for i from 0 <= i < n: * idx = idx0[i] # <<<<<<<<<<<<<< * if idx == -1: * for j from 0 <= j < k: */ __pyx_t_6 = __pyx_v_i; __pyx_v_idx = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_idx0.rcbuffer->pybuffer.buf, __pyx_t_6, __pyx_pybuffernd_idx0.diminfo[0].strides)); /* "pandas/src/generated.pyx":4517 * for i from 0 <= i < n: * idx = idx0[i] * if idx == -1: # <<<<<<<<<<<<<< * for j from 0 <= j < k: * out[i, j] = fv */ __pyx_t_7 = ((__pyx_v_idx == -1) != 0); if (__pyx_t_7) { /* "pandas/src/generated.pyx":4518 * idx = idx0[i] * if idx == -1: * for j from 0 <= j < k: # <<<<<<<<<<<<<< * out[i, j] = fv * else: */ __pyx_t_8 = __pyx_v_k; for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_8; __pyx_v_j++) { /* "pandas/src/generated.pyx":4519 * if idx == -1: * for j from 0 <= j < k: * out[i, j] = fv # <<<<<<<<<<<<<< * else: * for j from 0 <= j < k: */ __pyx_t_9 = __pyx_v_i; __pyx_t_10 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_9, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_10, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_fv; } goto __pyx_L5; } /*else*/ { /* "pandas/src/generated.pyx":4521 * out[i, j] = fv * else: * for j from 0 <= j < k: # <<<<<<<<<<<<<< * if idx1[j] == -1: * out[i, j] = fv */ __pyx_t_8 = __pyx_v_k; for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_8; __pyx_v_j++) { /* "pandas/src/generated.pyx":4522 * else: * for j from 0 <= j < k: * if idx1[j] == -1: # <<<<<<<<<<<<<< * out[i, j] = fv * else: */ __pyx_t_11 = __pyx_v_j; __pyx_t_7 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_idx1.rcbuffer->pybuffer.buf, __pyx_t_11, __pyx_pybuffernd_idx1.diminfo[0].strides)) == -1) != 0); if (__pyx_t_7) { /* "pandas/src/generated.pyx":4523 * for j from 0 <= j < k: * if idx1[j] == -1: * out[i, j] = fv # <<<<<<<<<<<<<< * else: * out[i, j] = values[idx, idx1[j]] */ __pyx_t_12 = __pyx_v_i; __pyx_t_13 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_12, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_13, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_fv; goto __pyx_L10; } /*else*/ { /* "pandas/src/generated.pyx":4525 * out[i, j] = fv * else: * out[i, j] = values[idx, idx1[j]] # <<<<<<<<<<<<<< * * @cython.wraparound(False) */ __pyx_t_14 = __pyx_v_j; __pyx_t_15 = __pyx_v_idx; __pyx_t_5 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_idx1.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_idx1.diminfo[0].strides)); __pyx_t_16 = __pyx_v_i; __pyx_t_17 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_17, __pyx_pybuffernd_out.diminfo[1].strides) = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int16_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_5, __pyx_pybuffernd_values.diminfo[1].strides)); } __pyx_L10:; } } __pyx_L5:; } __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_idx0.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_idx1.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.take_2d_multi_int16_int64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_idx0.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_idx1.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_idx0); __Pyx_XDECREF((PyObject *)__pyx_v_idx1); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_355take_2d_multi_int16_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_355take_2d_multi_int16_float64 = {__Pyx_NAMESTR("take_2d_multi_int16_float64"), (PyCFunction)__pyx_pw_6pandas_5algos_355take_2d_multi_int16_float64, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_355take_2d_multi_int16_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_values = 0; PyObject *__pyx_v_indexer = 0; PyArrayObject *__pyx_v_out = 0; PyObject *__pyx_v_fill_value = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("take_2d_multi_int16_float64 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__values,&__pyx_n_s__indexer,&__pyx_n_s__out,&__pyx_n_s__fill_value,0}; PyObject* values[4] = {0,0,0,0}; values[3] = __pyx_k_174; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__values)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__indexer)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_2d_multi_int16_float64", 0, 3, 4, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4529; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__out)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_2d_multi_int16_float64", 0, 3, 4, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4529; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__fill_value); if (value) { values[3] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "take_2d_multi_int16_float64") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4529; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_values = ((PyArrayObject *)values[0]); __pyx_v_indexer = values[1]; __pyx_v_out = ((PyArrayObject *)values[2]); __pyx_v_fill_value = values[3]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("take_2d_multi_int16_float64", 0, 3, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4529; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.take_2d_multi_int16_float64", __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_filename = __pyx_f[2]; __pyx_lineno = 4529; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_5numpy_ndarray, 1, "out", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4531; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_354take_2d_multi_int16_float64(__pyx_self, __pyx_v_values, __pyx_v_indexer, __pyx_v_out, __pyx_v_fill_value); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":4529 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_multi_int16_float64(ndarray[int16_t, ndim=2] values, # <<<<<<<<<<<<<< * indexer, * ndarray[float64_t, ndim=2] out, */ static PyObject *__pyx_pf_6pandas_5algos_354take_2d_multi_int16_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_k; Py_ssize_t __pyx_v_n; Py_ssize_t __pyx_v_idx; PyArrayObject *__pyx_v_idx0 = 0; PyArrayObject *__pyx_v_idx1 = 0; __pyx_t_5numpy_float64_t __pyx_v_fv; __Pyx_LocalBuf_ND __pyx_pybuffernd_idx0; __Pyx_Buffer __pyx_pybuffer_idx0; __Pyx_LocalBuf_ND __pyx_pybuffernd_idx1; __Pyx_Buffer __pyx_pybuffer_idx1; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_values; __Pyx_Buffer __pyx_pybuffer_values; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyArrayObject *__pyx_t_2 = NULL; PyArrayObject *__pyx_t_3 = NULL; Py_ssize_t __pyx_t_4; __pyx_t_5numpy_float64_t __pyx_t_5; Py_ssize_t __pyx_t_6; int __pyx_t_7; Py_ssize_t __pyx_t_8; Py_ssize_t __pyx_t_9; Py_ssize_t __pyx_t_10; Py_ssize_t __pyx_t_11; Py_ssize_t __pyx_t_12; Py_ssize_t __pyx_t_13; Py_ssize_t __pyx_t_14; Py_ssize_t __pyx_t_15; __pyx_t_5numpy_int64_t __pyx_t_16; Py_ssize_t __pyx_t_17; Py_ssize_t __pyx_t_18; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("take_2d_multi_int16_float64", 0); __pyx_pybuffer_idx0.pybuffer.buf = NULL; __pyx_pybuffer_idx0.refcount = 0; __pyx_pybuffernd_idx0.data = NULL; __pyx_pybuffernd_idx0.rcbuffer = &__pyx_pybuffer_idx0; __pyx_pybuffer_idx1.pybuffer.buf = NULL; __pyx_pybuffer_idx1.refcount = 0; __pyx_pybuffernd_idx1.data = NULL; __pyx_pybuffernd_idx1.rcbuffer = &__pyx_pybuffer_idx1; __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_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; { __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_int16_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4529; __pyx_clineno = __LINE__; goto __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_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; 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, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4529; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; __pyx_pybuffernd_out.diminfo[1].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_out.diminfo[1].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[1]; /* "pandas/src/generated.pyx":4535 * cdef: * Py_ssize_t i, j, k, n, idx * ndarray[int64_t] idx0 = indexer[0] # <<<<<<<<<<<<<< * ndarray[int64_t] idx1 = indexer[1] * float64_t fv */ __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_indexer, 0, sizeof(long), PyInt_FromLong, 0, 0, 0); if (!__pyx_t_1) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4535; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 4535; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_2 = ((PyArrayObject *)__pyx_t_1); { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_idx0.rcbuffer->pybuffer, (PyObject*)__pyx_t_2, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { __pyx_v_idx0 = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_idx0.rcbuffer->pybuffer.buf = NULL; {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4535; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } else {__pyx_pybuffernd_idx0.diminfo[0].strides = __pyx_pybuffernd_idx0.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_idx0.diminfo[0].shape = __pyx_pybuffernd_idx0.rcbuffer->pybuffer.shape[0]; } } __pyx_t_2 = 0; __pyx_v_idx0 = ((PyArrayObject *)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/generated.pyx":4536 * Py_ssize_t i, j, k, n, idx * ndarray[int64_t] idx0 = indexer[0] * ndarray[int64_t] idx1 = indexer[1] # <<<<<<<<<<<<<< * float64_t fv * */ __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_indexer, 1, sizeof(long), PyInt_FromLong, 0, 0, 0); if (!__pyx_t_1) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4536; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 4536; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_3 = ((PyArrayObject *)__pyx_t_1); { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_idx1.rcbuffer->pybuffer, (PyObject*)__pyx_t_3, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { __pyx_v_idx1 = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_idx1.rcbuffer->pybuffer.buf = NULL; {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4536; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } else {__pyx_pybuffernd_idx1.diminfo[0].strides = __pyx_pybuffernd_idx1.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_idx1.diminfo[0].shape = __pyx_pybuffernd_idx1.rcbuffer->pybuffer.shape[0]; } } __pyx_t_3 = 0; __pyx_v_idx1 = ((PyArrayObject *)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/generated.pyx":4539 * float64_t fv * * n = len(idx0) # <<<<<<<<<<<<<< * k = len(idx1) * */ __pyx_t_4 = PyObject_Length(((PyObject *)__pyx_v_idx0)); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4539; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_4; /* "pandas/src/generated.pyx":4540 * * n = len(idx0) * k = len(idx1) # <<<<<<<<<<<<<< * * fv = fill_value */ __pyx_t_4 = PyObject_Length(((PyObject *)__pyx_v_idx1)); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4540; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_k = __pyx_t_4; /* "pandas/src/generated.pyx":4542 * k = len(idx1) * * fv = fill_value # <<<<<<<<<<<<<< * for i from 0 <= i < n: * idx = idx0[i] */ __pyx_t_5 = __pyx_PyFloat_AsDouble(__pyx_v_fill_value); if (unlikely((__pyx_t_5 == (npy_float64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4542; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_fv = __pyx_t_5; /* "pandas/src/generated.pyx":4543 * * fv = fill_value * for i from 0 <= i < n: # <<<<<<<<<<<<<< * idx = idx0[i] * if idx == -1: */ __pyx_t_4 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_4; __pyx_v_i++) { /* "pandas/src/generated.pyx":4544 * fv = fill_value * for i from 0 <= i < n: * idx = idx0[i] # <<<<<<<<<<<<<< * if idx == -1: * for j from 0 <= j < k: */ __pyx_t_6 = __pyx_v_i; __pyx_v_idx = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_idx0.rcbuffer->pybuffer.buf, __pyx_t_6, __pyx_pybuffernd_idx0.diminfo[0].strides)); /* "pandas/src/generated.pyx":4545 * for i from 0 <= i < n: * idx = idx0[i] * if idx == -1: # <<<<<<<<<<<<<< * for j from 0 <= j < k: * out[i, j] = fv */ __pyx_t_7 = ((__pyx_v_idx == -1) != 0); if (__pyx_t_7) { /* "pandas/src/generated.pyx":4546 * idx = idx0[i] * if idx == -1: * for j from 0 <= j < k: # <<<<<<<<<<<<<< * out[i, j] = fv * else: */ __pyx_t_8 = __pyx_v_k; for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_8; __pyx_v_j++) { /* "pandas/src/generated.pyx":4547 * if idx == -1: * for j from 0 <= j < k: * out[i, j] = fv # <<<<<<<<<<<<<< * else: * for j from 0 <= j < k: */ __pyx_t_9 = __pyx_v_i; __pyx_t_10 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_9, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_10, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_fv; } goto __pyx_L5; } /*else*/ { /* "pandas/src/generated.pyx":4549 * out[i, j] = fv * else: * for j from 0 <= j < k: # <<<<<<<<<<<<<< * if idx1[j] == -1: * out[i, j] = fv */ __pyx_t_8 = __pyx_v_k; for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_8; __pyx_v_j++) { /* "pandas/src/generated.pyx":4550 * else: * for j from 0 <= j < k: * if idx1[j] == -1: # <<<<<<<<<<<<<< * out[i, j] = fv * else: */ __pyx_t_11 = __pyx_v_j; __pyx_t_7 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_idx1.rcbuffer->pybuffer.buf, __pyx_t_11, __pyx_pybuffernd_idx1.diminfo[0].strides)) == -1) != 0); if (__pyx_t_7) { /* "pandas/src/generated.pyx":4551 * for j from 0 <= j < k: * if idx1[j] == -1: * out[i, j] = fv # <<<<<<<<<<<<<< * else: * out[i, j] = values[idx, idx1[j]] */ __pyx_t_12 = __pyx_v_i; __pyx_t_13 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_12, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_13, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_fv; goto __pyx_L10; } /*else*/ { /* "pandas/src/generated.pyx":4553 * out[i, j] = fv * else: * out[i, j] = values[idx, idx1[j]] # <<<<<<<<<<<<<< * * @cython.wraparound(False) */ __pyx_t_14 = __pyx_v_j; __pyx_t_15 = __pyx_v_idx; __pyx_t_16 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_idx1.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_idx1.diminfo[0].strides)); __pyx_t_17 = __pyx_v_i; __pyx_t_18 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_18, __pyx_pybuffernd_out.diminfo[1].strides) = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int16_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_16, __pyx_pybuffernd_values.diminfo[1].strides)); } __pyx_L10:; } } __pyx_L5:; } __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_idx0.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_idx1.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.take_2d_multi_int16_float64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_idx0.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_idx1.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_idx0); __Pyx_XDECREF((PyObject *)__pyx_v_idx1); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_357take_2d_multi_int32_int32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_357take_2d_multi_int32_int32 = {__Pyx_NAMESTR("take_2d_multi_int32_int32"), (PyCFunction)__pyx_pw_6pandas_5algos_357take_2d_multi_int32_int32, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_357take_2d_multi_int32_int32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_values = 0; PyObject *__pyx_v_indexer = 0; PyArrayObject *__pyx_v_out = 0; PyObject *__pyx_v_fill_value = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("take_2d_multi_int32_int32 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__values,&__pyx_n_s__indexer,&__pyx_n_s__out,&__pyx_n_s__fill_value,0}; PyObject* values[4] = {0,0,0,0}; values[3] = __pyx_k_175; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__values)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__indexer)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_2d_multi_int32_int32", 0, 3, 4, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4557; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__out)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_2d_multi_int32_int32", 0, 3, 4, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4557; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__fill_value); if (value) { values[3] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "take_2d_multi_int32_int32") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4557; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_values = ((PyArrayObject *)values[0]); __pyx_v_indexer = values[1]; __pyx_v_out = ((PyArrayObject *)values[2]); __pyx_v_fill_value = values[3]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("take_2d_multi_int32_int32", 0, 3, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4557; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.take_2d_multi_int32_int32", __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_filename = __pyx_f[2]; __pyx_lineno = 4557; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_5numpy_ndarray, 1, "out", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4559; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_356take_2d_multi_int32_int32(__pyx_self, __pyx_v_values, __pyx_v_indexer, __pyx_v_out, __pyx_v_fill_value); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":4557 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_multi_int32_int32(ndarray[int32_t, ndim=2] values, # <<<<<<<<<<<<<< * indexer, * ndarray[int32_t, ndim=2] out, */ static PyObject *__pyx_pf_6pandas_5algos_356take_2d_multi_int32_int32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_k; Py_ssize_t __pyx_v_n; Py_ssize_t __pyx_v_idx; PyArrayObject *__pyx_v_idx0 = 0; PyArrayObject *__pyx_v_idx1 = 0; __pyx_t_5numpy_int32_t __pyx_v_fv; __Pyx_LocalBuf_ND __pyx_pybuffernd_idx0; __Pyx_Buffer __pyx_pybuffer_idx0; __Pyx_LocalBuf_ND __pyx_pybuffernd_idx1; __Pyx_Buffer __pyx_pybuffer_idx1; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_values; __Pyx_Buffer __pyx_pybuffer_values; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyArrayObject *__pyx_t_2 = NULL; PyArrayObject *__pyx_t_3 = NULL; Py_ssize_t __pyx_t_4; __pyx_t_5numpy_int32_t __pyx_t_5; Py_ssize_t __pyx_t_6; int __pyx_t_7; Py_ssize_t __pyx_t_8; Py_ssize_t __pyx_t_9; Py_ssize_t __pyx_t_10; Py_ssize_t __pyx_t_11; Py_ssize_t __pyx_t_12; Py_ssize_t __pyx_t_13; Py_ssize_t __pyx_t_14; Py_ssize_t __pyx_t_15; __pyx_t_5numpy_int64_t __pyx_t_16; Py_ssize_t __pyx_t_17; Py_ssize_t __pyx_t_18; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("take_2d_multi_int32_int32", 0); __pyx_pybuffer_idx0.pybuffer.buf = NULL; __pyx_pybuffer_idx0.refcount = 0; __pyx_pybuffernd_idx0.data = NULL; __pyx_pybuffernd_idx0.rcbuffer = &__pyx_pybuffer_idx0; __pyx_pybuffer_idx1.pybuffer.buf = NULL; __pyx_pybuffer_idx1.refcount = 0; __pyx_pybuffernd_idx1.data = NULL; __pyx_pybuffernd_idx1.rcbuffer = &__pyx_pybuffer_idx1; __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_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; { __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_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4557; __pyx_clineno = __LINE__; goto __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_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_v_out, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4557; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; __pyx_pybuffernd_out.diminfo[1].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_out.diminfo[1].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[1]; /* "pandas/src/generated.pyx":4563 * cdef: * Py_ssize_t i, j, k, n, idx * ndarray[int64_t] idx0 = indexer[0] # <<<<<<<<<<<<<< * ndarray[int64_t] idx1 = indexer[1] * int32_t fv */ __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_indexer, 0, sizeof(long), PyInt_FromLong, 0, 0, 0); if (!__pyx_t_1) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4563; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 4563; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_2 = ((PyArrayObject *)__pyx_t_1); { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_idx0.rcbuffer->pybuffer, (PyObject*)__pyx_t_2, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { __pyx_v_idx0 = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_idx0.rcbuffer->pybuffer.buf = NULL; {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4563; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } else {__pyx_pybuffernd_idx0.diminfo[0].strides = __pyx_pybuffernd_idx0.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_idx0.diminfo[0].shape = __pyx_pybuffernd_idx0.rcbuffer->pybuffer.shape[0]; } } __pyx_t_2 = 0; __pyx_v_idx0 = ((PyArrayObject *)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/generated.pyx":4564 * Py_ssize_t i, j, k, n, idx * ndarray[int64_t] idx0 = indexer[0] * ndarray[int64_t] idx1 = indexer[1] # <<<<<<<<<<<<<< * int32_t fv * */ __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_indexer, 1, sizeof(long), PyInt_FromLong, 0, 0, 0); if (!__pyx_t_1) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4564; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 4564; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_3 = ((PyArrayObject *)__pyx_t_1); { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_idx1.rcbuffer->pybuffer, (PyObject*)__pyx_t_3, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { __pyx_v_idx1 = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_idx1.rcbuffer->pybuffer.buf = NULL; {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4564; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } else {__pyx_pybuffernd_idx1.diminfo[0].strides = __pyx_pybuffernd_idx1.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_idx1.diminfo[0].shape = __pyx_pybuffernd_idx1.rcbuffer->pybuffer.shape[0]; } } __pyx_t_3 = 0; __pyx_v_idx1 = ((PyArrayObject *)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/generated.pyx":4567 * int32_t fv * * n = len(idx0) # <<<<<<<<<<<<<< * k = len(idx1) * */ __pyx_t_4 = PyObject_Length(((PyObject *)__pyx_v_idx0)); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4567; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_4; /* "pandas/src/generated.pyx":4568 * * n = len(idx0) * k = len(idx1) # <<<<<<<<<<<<<< * * fv = fill_value */ __pyx_t_4 = PyObject_Length(((PyObject *)__pyx_v_idx1)); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4568; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_k = __pyx_t_4; /* "pandas/src/generated.pyx":4570 * k = len(idx1) * * fv = fill_value # <<<<<<<<<<<<<< * for i from 0 <= i < n: * idx = idx0[i] */ __pyx_t_5 = __Pyx_PyInt_from_py_npy_int32(__pyx_v_fill_value); if (unlikely((__pyx_t_5 == (npy_int32)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4570; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_fv = __pyx_t_5; /* "pandas/src/generated.pyx":4571 * * fv = fill_value * for i from 0 <= i < n: # <<<<<<<<<<<<<< * idx = idx0[i] * if idx == -1: */ __pyx_t_4 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_4; __pyx_v_i++) { /* "pandas/src/generated.pyx":4572 * fv = fill_value * for i from 0 <= i < n: * idx = idx0[i] # <<<<<<<<<<<<<< * if idx == -1: * for j from 0 <= j < k: */ __pyx_t_6 = __pyx_v_i; __pyx_v_idx = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_idx0.rcbuffer->pybuffer.buf, __pyx_t_6, __pyx_pybuffernd_idx0.diminfo[0].strides)); /* "pandas/src/generated.pyx":4573 * for i from 0 <= i < n: * idx = idx0[i] * if idx == -1: # <<<<<<<<<<<<<< * for j from 0 <= j < k: * out[i, j] = fv */ __pyx_t_7 = ((__pyx_v_idx == -1) != 0); if (__pyx_t_7) { /* "pandas/src/generated.pyx":4574 * idx = idx0[i] * if idx == -1: * for j from 0 <= j < k: # <<<<<<<<<<<<<< * out[i, j] = fv * else: */ __pyx_t_8 = __pyx_v_k; for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_8; __pyx_v_j++) { /* "pandas/src/generated.pyx":4575 * if idx == -1: * for j from 0 <= j < k: * out[i, j] = fv # <<<<<<<<<<<<<< * else: * for j from 0 <= j < k: */ __pyx_t_9 = __pyx_v_i; __pyx_t_10 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_9, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_10, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_fv; } goto __pyx_L5; } /*else*/ { /* "pandas/src/generated.pyx":4577 * out[i, j] = fv * else: * for j from 0 <= j < k: # <<<<<<<<<<<<<< * if idx1[j] == -1: * out[i, j] = fv */ __pyx_t_8 = __pyx_v_k; for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_8; __pyx_v_j++) { /* "pandas/src/generated.pyx":4578 * else: * for j from 0 <= j < k: * if idx1[j] == -1: # <<<<<<<<<<<<<< * out[i, j] = fv * else: */ __pyx_t_11 = __pyx_v_j; __pyx_t_7 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_idx1.rcbuffer->pybuffer.buf, __pyx_t_11, __pyx_pybuffernd_idx1.diminfo[0].strides)) == -1) != 0); if (__pyx_t_7) { /* "pandas/src/generated.pyx":4579 * for j from 0 <= j < k: * if idx1[j] == -1: * out[i, j] = fv # <<<<<<<<<<<<<< * else: * out[i, j] = values[idx, idx1[j]] */ __pyx_t_12 = __pyx_v_i; __pyx_t_13 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_12, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_13, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_fv; goto __pyx_L10; } /*else*/ { /* "pandas/src/generated.pyx":4581 * out[i, j] = fv * else: * out[i, j] = values[idx, idx1[j]] # <<<<<<<<<<<<<< * * @cython.wraparound(False) */ __pyx_t_14 = __pyx_v_j; __pyx_t_15 = __pyx_v_idx; __pyx_t_16 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_idx1.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_idx1.diminfo[0].strides)); __pyx_t_17 = __pyx_v_i; __pyx_t_18 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_18, __pyx_pybuffernd_out.diminfo[1].strides) = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_16, __pyx_pybuffernd_values.diminfo[1].strides)); } __pyx_L10:; } } __pyx_L5:; } __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_idx0.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_idx1.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.take_2d_multi_int32_int32", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_idx0.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_idx1.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_idx0); __Pyx_XDECREF((PyObject *)__pyx_v_idx1); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_359take_2d_multi_int32_int64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_359take_2d_multi_int32_int64 = {__Pyx_NAMESTR("take_2d_multi_int32_int64"), (PyCFunction)__pyx_pw_6pandas_5algos_359take_2d_multi_int32_int64, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_359take_2d_multi_int32_int64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_values = 0; PyObject *__pyx_v_indexer = 0; PyArrayObject *__pyx_v_out = 0; PyObject *__pyx_v_fill_value = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("take_2d_multi_int32_int64 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__values,&__pyx_n_s__indexer,&__pyx_n_s__out,&__pyx_n_s__fill_value,0}; PyObject* values[4] = {0,0,0,0}; values[3] = __pyx_k_176; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__values)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__indexer)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_2d_multi_int32_int64", 0, 3, 4, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4585; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__out)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_2d_multi_int32_int64", 0, 3, 4, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4585; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__fill_value); if (value) { values[3] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "take_2d_multi_int32_int64") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4585; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_values = ((PyArrayObject *)values[0]); __pyx_v_indexer = values[1]; __pyx_v_out = ((PyArrayObject *)values[2]); __pyx_v_fill_value = values[3]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("take_2d_multi_int32_int64", 0, 3, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4585; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.take_2d_multi_int32_int64", __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_filename = __pyx_f[2]; __pyx_lineno = 4585; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_5numpy_ndarray, 1, "out", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4587; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_358take_2d_multi_int32_int64(__pyx_self, __pyx_v_values, __pyx_v_indexer, __pyx_v_out, __pyx_v_fill_value); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":4585 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_multi_int32_int64(ndarray[int32_t, ndim=2] values, # <<<<<<<<<<<<<< * indexer, * ndarray[int64_t, ndim=2] out, */ static PyObject *__pyx_pf_6pandas_5algos_358take_2d_multi_int32_int64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_k; Py_ssize_t __pyx_v_n; Py_ssize_t __pyx_v_idx; PyArrayObject *__pyx_v_idx0 = 0; PyArrayObject *__pyx_v_idx1 = 0; __pyx_t_5numpy_int64_t __pyx_v_fv; __Pyx_LocalBuf_ND __pyx_pybuffernd_idx0; __Pyx_Buffer __pyx_pybuffer_idx0; __Pyx_LocalBuf_ND __pyx_pybuffernd_idx1; __Pyx_Buffer __pyx_pybuffer_idx1; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_values; __Pyx_Buffer __pyx_pybuffer_values; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyArrayObject *__pyx_t_2 = NULL; PyArrayObject *__pyx_t_3 = NULL; Py_ssize_t __pyx_t_4; __pyx_t_5numpy_int64_t __pyx_t_5; Py_ssize_t __pyx_t_6; int __pyx_t_7; Py_ssize_t __pyx_t_8; Py_ssize_t __pyx_t_9; Py_ssize_t __pyx_t_10; Py_ssize_t __pyx_t_11; Py_ssize_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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("take_2d_multi_int32_int64", 0); __pyx_pybuffer_idx0.pybuffer.buf = NULL; __pyx_pybuffer_idx0.refcount = 0; __pyx_pybuffernd_idx0.data = NULL; __pyx_pybuffernd_idx0.rcbuffer = &__pyx_pybuffer_idx0; __pyx_pybuffer_idx1.pybuffer.buf = NULL; __pyx_pybuffer_idx1.refcount = 0; __pyx_pybuffernd_idx1.data = NULL; __pyx_pybuffernd_idx1.rcbuffer = &__pyx_pybuffer_idx1; __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_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; { __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_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4585; __pyx_clineno = __LINE__; goto __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_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; 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, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4585; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; __pyx_pybuffernd_out.diminfo[1].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_out.diminfo[1].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[1]; /* "pandas/src/generated.pyx":4591 * cdef: * Py_ssize_t i, j, k, n, idx * ndarray[int64_t] idx0 = indexer[0] # <<<<<<<<<<<<<< * ndarray[int64_t] idx1 = indexer[1] * int64_t fv */ __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_indexer, 0, sizeof(long), PyInt_FromLong, 0, 0, 0); if (!__pyx_t_1) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4591; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 4591; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_2 = ((PyArrayObject *)__pyx_t_1); { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_idx0.rcbuffer->pybuffer, (PyObject*)__pyx_t_2, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { __pyx_v_idx0 = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_idx0.rcbuffer->pybuffer.buf = NULL; {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4591; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } else {__pyx_pybuffernd_idx0.diminfo[0].strides = __pyx_pybuffernd_idx0.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_idx0.diminfo[0].shape = __pyx_pybuffernd_idx0.rcbuffer->pybuffer.shape[0]; } } __pyx_t_2 = 0; __pyx_v_idx0 = ((PyArrayObject *)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/generated.pyx":4592 * Py_ssize_t i, j, k, n, idx * ndarray[int64_t] idx0 = indexer[0] * ndarray[int64_t] idx1 = indexer[1] # <<<<<<<<<<<<<< * int64_t fv * */ __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_indexer, 1, sizeof(long), PyInt_FromLong, 0, 0, 0); if (!__pyx_t_1) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4592; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 4592; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_3 = ((PyArrayObject *)__pyx_t_1); { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_idx1.rcbuffer->pybuffer, (PyObject*)__pyx_t_3, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { __pyx_v_idx1 = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_idx1.rcbuffer->pybuffer.buf = NULL; {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4592; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } else {__pyx_pybuffernd_idx1.diminfo[0].strides = __pyx_pybuffernd_idx1.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_idx1.diminfo[0].shape = __pyx_pybuffernd_idx1.rcbuffer->pybuffer.shape[0]; } } __pyx_t_3 = 0; __pyx_v_idx1 = ((PyArrayObject *)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/generated.pyx":4595 * int64_t fv * * n = len(idx0) # <<<<<<<<<<<<<< * k = len(idx1) * */ __pyx_t_4 = PyObject_Length(((PyObject *)__pyx_v_idx0)); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4595; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_4; /* "pandas/src/generated.pyx":4596 * * n = len(idx0) * k = len(idx1) # <<<<<<<<<<<<<< * * fv = fill_value */ __pyx_t_4 = PyObject_Length(((PyObject *)__pyx_v_idx1)); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4596; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_k = __pyx_t_4; /* "pandas/src/generated.pyx":4598 * k = len(idx1) * * fv = fill_value # <<<<<<<<<<<<<< * for i from 0 <= i < n: * idx = idx0[i] */ __pyx_t_5 = __Pyx_PyInt_from_py_npy_int64(__pyx_v_fill_value); if (unlikely((__pyx_t_5 == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4598; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_fv = __pyx_t_5; /* "pandas/src/generated.pyx":4599 * * fv = fill_value * for i from 0 <= i < n: # <<<<<<<<<<<<<< * idx = idx0[i] * if idx == -1: */ __pyx_t_4 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_4; __pyx_v_i++) { /* "pandas/src/generated.pyx":4600 * fv = fill_value * for i from 0 <= i < n: * idx = idx0[i] # <<<<<<<<<<<<<< * if idx == -1: * for j from 0 <= j < k: */ __pyx_t_6 = __pyx_v_i; __pyx_v_idx = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_idx0.rcbuffer->pybuffer.buf, __pyx_t_6, __pyx_pybuffernd_idx0.diminfo[0].strides)); /* "pandas/src/generated.pyx":4601 * for i from 0 <= i < n: * idx = idx0[i] * if idx == -1: # <<<<<<<<<<<<<< * for j from 0 <= j < k: * out[i, j] = fv */ __pyx_t_7 = ((__pyx_v_idx == -1) != 0); if (__pyx_t_7) { /* "pandas/src/generated.pyx":4602 * idx = idx0[i] * if idx == -1: * for j from 0 <= j < k: # <<<<<<<<<<<<<< * out[i, j] = fv * else: */ __pyx_t_8 = __pyx_v_k; for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_8; __pyx_v_j++) { /* "pandas/src/generated.pyx":4603 * if idx == -1: * for j from 0 <= j < k: * out[i, j] = fv # <<<<<<<<<<<<<< * else: * for j from 0 <= j < k: */ __pyx_t_9 = __pyx_v_i; __pyx_t_10 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_9, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_10, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_fv; } goto __pyx_L5; } /*else*/ { /* "pandas/src/generated.pyx":4605 * out[i, j] = fv * else: * for j from 0 <= j < k: # <<<<<<<<<<<<<< * if idx1[j] == -1: * out[i, j] = fv */ __pyx_t_8 = __pyx_v_k; for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_8; __pyx_v_j++) { /* "pandas/src/generated.pyx":4606 * else: * for j from 0 <= j < k: * if idx1[j] == -1: # <<<<<<<<<<<<<< * out[i, j] = fv * else: */ __pyx_t_11 = __pyx_v_j; __pyx_t_7 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_idx1.rcbuffer->pybuffer.buf, __pyx_t_11, __pyx_pybuffernd_idx1.diminfo[0].strides)) == -1) != 0); if (__pyx_t_7) { /* "pandas/src/generated.pyx":4607 * for j from 0 <= j < k: * if idx1[j] == -1: * out[i, j] = fv # <<<<<<<<<<<<<< * else: * out[i, j] = values[idx, idx1[j]] */ __pyx_t_12 = __pyx_v_i; __pyx_t_13 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_12, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_13, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_fv; goto __pyx_L10; } /*else*/ { /* "pandas/src/generated.pyx":4609 * out[i, j] = fv * else: * out[i, j] = values[idx, idx1[j]] # <<<<<<<<<<<<<< * * @cython.wraparound(False) */ __pyx_t_14 = __pyx_v_j; __pyx_t_15 = __pyx_v_idx; __pyx_t_5 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_idx1.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_idx1.diminfo[0].strides)); __pyx_t_16 = __pyx_v_i; __pyx_t_17 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_17, __pyx_pybuffernd_out.diminfo[1].strides) = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_5, __pyx_pybuffernd_values.diminfo[1].strides)); } __pyx_L10:; } } __pyx_L5:; } __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_idx0.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_idx1.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.take_2d_multi_int32_int64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_idx0.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_idx1.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_idx0); __Pyx_XDECREF((PyObject *)__pyx_v_idx1); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_361take_2d_multi_int32_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_361take_2d_multi_int32_float64 = {__Pyx_NAMESTR("take_2d_multi_int32_float64"), (PyCFunction)__pyx_pw_6pandas_5algos_361take_2d_multi_int32_float64, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_361take_2d_multi_int32_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_values = 0; PyObject *__pyx_v_indexer = 0; PyArrayObject *__pyx_v_out = 0; PyObject *__pyx_v_fill_value = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("take_2d_multi_int32_float64 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__values,&__pyx_n_s__indexer,&__pyx_n_s__out,&__pyx_n_s__fill_value,0}; PyObject* values[4] = {0,0,0,0}; values[3] = __pyx_k_177; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__values)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__indexer)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_2d_multi_int32_float64", 0, 3, 4, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4613; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__out)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_2d_multi_int32_float64", 0, 3, 4, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4613; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__fill_value); if (value) { values[3] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "take_2d_multi_int32_float64") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4613; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_values = ((PyArrayObject *)values[0]); __pyx_v_indexer = values[1]; __pyx_v_out = ((PyArrayObject *)values[2]); __pyx_v_fill_value = values[3]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("take_2d_multi_int32_float64", 0, 3, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4613; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.take_2d_multi_int32_float64", __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_filename = __pyx_f[2]; __pyx_lineno = 4613; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_5numpy_ndarray, 1, "out", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4615; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_360take_2d_multi_int32_float64(__pyx_self, __pyx_v_values, __pyx_v_indexer, __pyx_v_out, __pyx_v_fill_value); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":4613 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_multi_int32_float64(ndarray[int32_t, ndim=2] values, # <<<<<<<<<<<<<< * indexer, * ndarray[float64_t, ndim=2] out, */ static PyObject *__pyx_pf_6pandas_5algos_360take_2d_multi_int32_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_k; Py_ssize_t __pyx_v_n; Py_ssize_t __pyx_v_idx; PyArrayObject *__pyx_v_idx0 = 0; PyArrayObject *__pyx_v_idx1 = 0; __pyx_t_5numpy_float64_t __pyx_v_fv; __Pyx_LocalBuf_ND __pyx_pybuffernd_idx0; __Pyx_Buffer __pyx_pybuffer_idx0; __Pyx_LocalBuf_ND __pyx_pybuffernd_idx1; __Pyx_Buffer __pyx_pybuffer_idx1; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_values; __Pyx_Buffer __pyx_pybuffer_values; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyArrayObject *__pyx_t_2 = NULL; PyArrayObject *__pyx_t_3 = NULL; Py_ssize_t __pyx_t_4; __pyx_t_5numpy_float64_t __pyx_t_5; Py_ssize_t __pyx_t_6; int __pyx_t_7; Py_ssize_t __pyx_t_8; Py_ssize_t __pyx_t_9; Py_ssize_t __pyx_t_10; Py_ssize_t __pyx_t_11; Py_ssize_t __pyx_t_12; Py_ssize_t __pyx_t_13; Py_ssize_t __pyx_t_14; Py_ssize_t __pyx_t_15; __pyx_t_5numpy_int64_t __pyx_t_16; Py_ssize_t __pyx_t_17; Py_ssize_t __pyx_t_18; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("take_2d_multi_int32_float64", 0); __pyx_pybuffer_idx0.pybuffer.buf = NULL; __pyx_pybuffer_idx0.refcount = 0; __pyx_pybuffernd_idx0.data = NULL; __pyx_pybuffernd_idx0.rcbuffer = &__pyx_pybuffer_idx0; __pyx_pybuffer_idx1.pybuffer.buf = NULL; __pyx_pybuffer_idx1.refcount = 0; __pyx_pybuffernd_idx1.data = NULL; __pyx_pybuffernd_idx1.rcbuffer = &__pyx_pybuffer_idx1; __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_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; { __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_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4613; __pyx_clineno = __LINE__; goto __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_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; 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, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4613; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; __pyx_pybuffernd_out.diminfo[1].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_out.diminfo[1].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[1]; /* "pandas/src/generated.pyx":4619 * cdef: * Py_ssize_t i, j, k, n, idx * ndarray[int64_t] idx0 = indexer[0] # <<<<<<<<<<<<<< * ndarray[int64_t] idx1 = indexer[1] * float64_t fv */ __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_indexer, 0, sizeof(long), PyInt_FromLong, 0, 0, 0); if (!__pyx_t_1) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4619; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 4619; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_2 = ((PyArrayObject *)__pyx_t_1); { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_idx0.rcbuffer->pybuffer, (PyObject*)__pyx_t_2, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { __pyx_v_idx0 = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_idx0.rcbuffer->pybuffer.buf = NULL; {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4619; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } else {__pyx_pybuffernd_idx0.diminfo[0].strides = __pyx_pybuffernd_idx0.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_idx0.diminfo[0].shape = __pyx_pybuffernd_idx0.rcbuffer->pybuffer.shape[0]; } } __pyx_t_2 = 0; __pyx_v_idx0 = ((PyArrayObject *)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/generated.pyx":4620 * Py_ssize_t i, j, k, n, idx * ndarray[int64_t] idx0 = indexer[0] * ndarray[int64_t] idx1 = indexer[1] # <<<<<<<<<<<<<< * float64_t fv * */ __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_indexer, 1, sizeof(long), PyInt_FromLong, 0, 0, 0); if (!__pyx_t_1) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4620; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 4620; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_3 = ((PyArrayObject *)__pyx_t_1); { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_idx1.rcbuffer->pybuffer, (PyObject*)__pyx_t_3, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { __pyx_v_idx1 = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_idx1.rcbuffer->pybuffer.buf = NULL; {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4620; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } else {__pyx_pybuffernd_idx1.diminfo[0].strides = __pyx_pybuffernd_idx1.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_idx1.diminfo[0].shape = __pyx_pybuffernd_idx1.rcbuffer->pybuffer.shape[0]; } } __pyx_t_3 = 0; __pyx_v_idx1 = ((PyArrayObject *)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/generated.pyx":4623 * float64_t fv * * n = len(idx0) # <<<<<<<<<<<<<< * k = len(idx1) * */ __pyx_t_4 = PyObject_Length(((PyObject *)__pyx_v_idx0)); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4623; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_4; /* "pandas/src/generated.pyx":4624 * * n = len(idx0) * k = len(idx1) # <<<<<<<<<<<<<< * * fv = fill_value */ __pyx_t_4 = PyObject_Length(((PyObject *)__pyx_v_idx1)); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4624; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_k = __pyx_t_4; /* "pandas/src/generated.pyx":4626 * k = len(idx1) * * fv = fill_value # <<<<<<<<<<<<<< * for i from 0 <= i < n: * idx = idx0[i] */ __pyx_t_5 = __pyx_PyFloat_AsDouble(__pyx_v_fill_value); if (unlikely((__pyx_t_5 == (npy_float64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4626; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_fv = __pyx_t_5; /* "pandas/src/generated.pyx":4627 * * fv = fill_value * for i from 0 <= i < n: # <<<<<<<<<<<<<< * idx = idx0[i] * if idx == -1: */ __pyx_t_4 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_4; __pyx_v_i++) { /* "pandas/src/generated.pyx":4628 * fv = fill_value * for i from 0 <= i < n: * idx = idx0[i] # <<<<<<<<<<<<<< * if idx == -1: * for j from 0 <= j < k: */ __pyx_t_6 = __pyx_v_i; __pyx_v_idx = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_idx0.rcbuffer->pybuffer.buf, __pyx_t_6, __pyx_pybuffernd_idx0.diminfo[0].strides)); /* "pandas/src/generated.pyx":4629 * for i from 0 <= i < n: * idx = idx0[i] * if idx == -1: # <<<<<<<<<<<<<< * for j from 0 <= j < k: * out[i, j] = fv */ __pyx_t_7 = ((__pyx_v_idx == -1) != 0); if (__pyx_t_7) { /* "pandas/src/generated.pyx":4630 * idx = idx0[i] * if idx == -1: * for j from 0 <= j < k: # <<<<<<<<<<<<<< * out[i, j] = fv * else: */ __pyx_t_8 = __pyx_v_k; for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_8; __pyx_v_j++) { /* "pandas/src/generated.pyx":4631 * if idx == -1: * for j from 0 <= j < k: * out[i, j] = fv # <<<<<<<<<<<<<< * else: * for j from 0 <= j < k: */ __pyx_t_9 = __pyx_v_i; __pyx_t_10 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_9, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_10, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_fv; } goto __pyx_L5; } /*else*/ { /* "pandas/src/generated.pyx":4633 * out[i, j] = fv * else: * for j from 0 <= j < k: # <<<<<<<<<<<<<< * if idx1[j] == -1: * out[i, j] = fv */ __pyx_t_8 = __pyx_v_k; for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_8; __pyx_v_j++) { /* "pandas/src/generated.pyx":4634 * else: * for j from 0 <= j < k: * if idx1[j] == -1: # <<<<<<<<<<<<<< * out[i, j] = fv * else: */ __pyx_t_11 = __pyx_v_j; __pyx_t_7 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_idx1.rcbuffer->pybuffer.buf, __pyx_t_11, __pyx_pybuffernd_idx1.diminfo[0].strides)) == -1) != 0); if (__pyx_t_7) { /* "pandas/src/generated.pyx":4635 * for j from 0 <= j < k: * if idx1[j] == -1: * out[i, j] = fv # <<<<<<<<<<<<<< * else: * out[i, j] = values[idx, idx1[j]] */ __pyx_t_12 = __pyx_v_i; __pyx_t_13 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_12, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_13, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_fv; goto __pyx_L10; } /*else*/ { /* "pandas/src/generated.pyx":4637 * out[i, j] = fv * else: * out[i, j] = values[idx, idx1[j]] # <<<<<<<<<<<<<< * * @cython.wraparound(False) */ __pyx_t_14 = __pyx_v_j; __pyx_t_15 = __pyx_v_idx; __pyx_t_16 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_idx1.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_idx1.diminfo[0].strides)); __pyx_t_17 = __pyx_v_i; __pyx_t_18 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_18, __pyx_pybuffernd_out.diminfo[1].strides) = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_16, __pyx_pybuffernd_values.diminfo[1].strides)); } __pyx_L10:; } } __pyx_L5:; } __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_idx0.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_idx1.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.take_2d_multi_int32_float64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_idx0.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_idx1.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_idx0); __Pyx_XDECREF((PyObject *)__pyx_v_idx1); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_363take_2d_multi_int64_int64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_363take_2d_multi_int64_int64 = {__Pyx_NAMESTR("take_2d_multi_int64_int64"), (PyCFunction)__pyx_pw_6pandas_5algos_363take_2d_multi_int64_int64, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_363take_2d_multi_int64_int64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_values = 0; PyObject *__pyx_v_indexer = 0; PyArrayObject *__pyx_v_out = 0; PyObject *__pyx_v_fill_value = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("take_2d_multi_int64_int64 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__values,&__pyx_n_s__indexer,&__pyx_n_s__out,&__pyx_n_s__fill_value,0}; PyObject* values[4] = {0,0,0,0}; values[3] = __pyx_k_178; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__values)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__indexer)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_2d_multi_int64_int64", 0, 3, 4, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4641; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__out)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_2d_multi_int64_int64", 0, 3, 4, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4641; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__fill_value); if (value) { values[3] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "take_2d_multi_int64_int64") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4641; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_values = ((PyArrayObject *)values[0]); __pyx_v_indexer = values[1]; __pyx_v_out = ((PyArrayObject *)values[2]); __pyx_v_fill_value = values[3]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("take_2d_multi_int64_int64", 0, 3, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4641; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.take_2d_multi_int64_int64", __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_filename = __pyx_f[2]; __pyx_lineno = 4641; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_5numpy_ndarray, 1, "out", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4643; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_362take_2d_multi_int64_int64(__pyx_self, __pyx_v_values, __pyx_v_indexer, __pyx_v_out, __pyx_v_fill_value); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":4641 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_multi_int64_int64(ndarray[int64_t, ndim=2] values, # <<<<<<<<<<<<<< * indexer, * ndarray[int64_t, ndim=2] out, */ static PyObject *__pyx_pf_6pandas_5algos_362take_2d_multi_int64_int64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_k; Py_ssize_t __pyx_v_n; Py_ssize_t __pyx_v_idx; PyArrayObject *__pyx_v_idx0 = 0; PyArrayObject *__pyx_v_idx1 = 0; __pyx_t_5numpy_int64_t __pyx_v_fv; __Pyx_LocalBuf_ND __pyx_pybuffernd_idx0; __Pyx_Buffer __pyx_pybuffer_idx0; __Pyx_LocalBuf_ND __pyx_pybuffernd_idx1; __Pyx_Buffer __pyx_pybuffer_idx1; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_values; __Pyx_Buffer __pyx_pybuffer_values; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyArrayObject *__pyx_t_2 = NULL; PyArrayObject *__pyx_t_3 = NULL; Py_ssize_t __pyx_t_4; __pyx_t_5numpy_int64_t __pyx_t_5; Py_ssize_t __pyx_t_6; int __pyx_t_7; Py_ssize_t __pyx_t_8; Py_ssize_t __pyx_t_9; Py_ssize_t __pyx_t_10; Py_ssize_t __pyx_t_11; Py_ssize_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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("take_2d_multi_int64_int64", 0); __pyx_pybuffer_idx0.pybuffer.buf = NULL; __pyx_pybuffer_idx0.refcount = 0; __pyx_pybuffernd_idx0.data = NULL; __pyx_pybuffernd_idx0.rcbuffer = &__pyx_pybuffer_idx0; __pyx_pybuffer_idx1.pybuffer.buf = NULL; __pyx_pybuffer_idx1.refcount = 0; __pyx_pybuffernd_idx1.data = NULL; __pyx_pybuffernd_idx1.rcbuffer = &__pyx_pybuffer_idx1; __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_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; { __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_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4641; __pyx_clineno = __LINE__; goto __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_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; 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, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4641; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; __pyx_pybuffernd_out.diminfo[1].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_out.diminfo[1].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[1]; /* "pandas/src/generated.pyx":4647 * cdef: * Py_ssize_t i, j, k, n, idx * ndarray[int64_t] idx0 = indexer[0] # <<<<<<<<<<<<<< * ndarray[int64_t] idx1 = indexer[1] * int64_t fv */ __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_indexer, 0, sizeof(long), PyInt_FromLong, 0, 0, 0); if (!__pyx_t_1) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4647; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 4647; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_2 = ((PyArrayObject *)__pyx_t_1); { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_idx0.rcbuffer->pybuffer, (PyObject*)__pyx_t_2, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { __pyx_v_idx0 = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_idx0.rcbuffer->pybuffer.buf = NULL; {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4647; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } else {__pyx_pybuffernd_idx0.diminfo[0].strides = __pyx_pybuffernd_idx0.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_idx0.diminfo[0].shape = __pyx_pybuffernd_idx0.rcbuffer->pybuffer.shape[0]; } } __pyx_t_2 = 0; __pyx_v_idx0 = ((PyArrayObject *)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/generated.pyx":4648 * Py_ssize_t i, j, k, n, idx * ndarray[int64_t] idx0 = indexer[0] * ndarray[int64_t] idx1 = indexer[1] # <<<<<<<<<<<<<< * int64_t fv * */ __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_indexer, 1, sizeof(long), PyInt_FromLong, 0, 0, 0); if (!__pyx_t_1) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4648; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 4648; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_3 = ((PyArrayObject *)__pyx_t_1); { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_idx1.rcbuffer->pybuffer, (PyObject*)__pyx_t_3, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { __pyx_v_idx1 = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_idx1.rcbuffer->pybuffer.buf = NULL; {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4648; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } else {__pyx_pybuffernd_idx1.diminfo[0].strides = __pyx_pybuffernd_idx1.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_idx1.diminfo[0].shape = __pyx_pybuffernd_idx1.rcbuffer->pybuffer.shape[0]; } } __pyx_t_3 = 0; __pyx_v_idx1 = ((PyArrayObject *)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/generated.pyx":4651 * int64_t fv * * n = len(idx0) # <<<<<<<<<<<<<< * k = len(idx1) * */ __pyx_t_4 = PyObject_Length(((PyObject *)__pyx_v_idx0)); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4651; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_4; /* "pandas/src/generated.pyx":4652 * * n = len(idx0) * k = len(idx1) # <<<<<<<<<<<<<< * * fv = fill_value */ __pyx_t_4 = PyObject_Length(((PyObject *)__pyx_v_idx1)); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4652; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_k = __pyx_t_4; /* "pandas/src/generated.pyx":4654 * k = len(idx1) * * fv = fill_value # <<<<<<<<<<<<<< * for i from 0 <= i < n: * idx = idx0[i] */ __pyx_t_5 = __Pyx_PyInt_from_py_npy_int64(__pyx_v_fill_value); if (unlikely((__pyx_t_5 == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4654; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_fv = __pyx_t_5; /* "pandas/src/generated.pyx":4655 * * fv = fill_value * for i from 0 <= i < n: # <<<<<<<<<<<<<< * idx = idx0[i] * if idx == -1: */ __pyx_t_4 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_4; __pyx_v_i++) { /* "pandas/src/generated.pyx":4656 * fv = fill_value * for i from 0 <= i < n: * idx = idx0[i] # <<<<<<<<<<<<<< * if idx == -1: * for j from 0 <= j < k: */ __pyx_t_6 = __pyx_v_i; __pyx_v_idx = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_idx0.rcbuffer->pybuffer.buf, __pyx_t_6, __pyx_pybuffernd_idx0.diminfo[0].strides)); /* "pandas/src/generated.pyx":4657 * for i from 0 <= i < n: * idx = idx0[i] * if idx == -1: # <<<<<<<<<<<<<< * for j from 0 <= j < k: * out[i, j] = fv */ __pyx_t_7 = ((__pyx_v_idx == -1) != 0); if (__pyx_t_7) { /* "pandas/src/generated.pyx":4658 * idx = idx0[i] * if idx == -1: * for j from 0 <= j < k: # <<<<<<<<<<<<<< * out[i, j] = fv * else: */ __pyx_t_8 = __pyx_v_k; for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_8; __pyx_v_j++) { /* "pandas/src/generated.pyx":4659 * if idx == -1: * for j from 0 <= j < k: * out[i, j] = fv # <<<<<<<<<<<<<< * else: * for j from 0 <= j < k: */ __pyx_t_9 = __pyx_v_i; __pyx_t_10 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_9, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_10, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_fv; } goto __pyx_L5; } /*else*/ { /* "pandas/src/generated.pyx":4661 * out[i, j] = fv * else: * for j from 0 <= j < k: # <<<<<<<<<<<<<< * if idx1[j] == -1: * out[i, j] = fv */ __pyx_t_8 = __pyx_v_k; for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_8; __pyx_v_j++) { /* "pandas/src/generated.pyx":4662 * else: * for j from 0 <= j < k: * if idx1[j] == -1: # <<<<<<<<<<<<<< * out[i, j] = fv * else: */ __pyx_t_11 = __pyx_v_j; __pyx_t_7 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_idx1.rcbuffer->pybuffer.buf, __pyx_t_11, __pyx_pybuffernd_idx1.diminfo[0].strides)) == -1) != 0); if (__pyx_t_7) { /* "pandas/src/generated.pyx":4663 * for j from 0 <= j < k: * if idx1[j] == -1: * out[i, j] = fv # <<<<<<<<<<<<<< * else: * out[i, j] = values[idx, idx1[j]] */ __pyx_t_12 = __pyx_v_i; __pyx_t_13 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_12, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_13, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_fv; goto __pyx_L10; } /*else*/ { /* "pandas/src/generated.pyx":4665 * out[i, j] = fv * else: * out[i, j] = values[idx, idx1[j]] # <<<<<<<<<<<<<< * * @cython.wraparound(False) */ __pyx_t_14 = __pyx_v_j; __pyx_t_15 = __pyx_v_idx; __pyx_t_5 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_idx1.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_idx1.diminfo[0].strides)); __pyx_t_16 = __pyx_v_i; __pyx_t_17 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_17, __pyx_pybuffernd_out.diminfo[1].strides) = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_5, __pyx_pybuffernd_values.diminfo[1].strides)); } __pyx_L10:; } } __pyx_L5:; } __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_idx0.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_idx1.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.take_2d_multi_int64_int64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_idx0.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_idx1.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_idx0); __Pyx_XDECREF((PyObject *)__pyx_v_idx1); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_365take_2d_multi_int64_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_365take_2d_multi_int64_float64 = {__Pyx_NAMESTR("take_2d_multi_int64_float64"), (PyCFunction)__pyx_pw_6pandas_5algos_365take_2d_multi_int64_float64, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_365take_2d_multi_int64_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_values = 0; PyObject *__pyx_v_indexer = 0; PyArrayObject *__pyx_v_out = 0; PyObject *__pyx_v_fill_value = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("take_2d_multi_int64_float64 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__values,&__pyx_n_s__indexer,&__pyx_n_s__out,&__pyx_n_s__fill_value,0}; PyObject* values[4] = {0,0,0,0}; values[3] = __pyx_k_179; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__values)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__indexer)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_2d_multi_int64_float64", 0, 3, 4, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4669; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__out)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_2d_multi_int64_float64", 0, 3, 4, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4669; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__fill_value); if (value) { values[3] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "take_2d_multi_int64_float64") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4669; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_values = ((PyArrayObject *)values[0]); __pyx_v_indexer = values[1]; __pyx_v_out = ((PyArrayObject *)values[2]); __pyx_v_fill_value = values[3]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("take_2d_multi_int64_float64", 0, 3, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4669; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.take_2d_multi_int64_float64", __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_filename = __pyx_f[2]; __pyx_lineno = 4669; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_5numpy_ndarray, 1, "out", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4671; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_364take_2d_multi_int64_float64(__pyx_self, __pyx_v_values, __pyx_v_indexer, __pyx_v_out, __pyx_v_fill_value); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":4669 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_multi_int64_float64(ndarray[int64_t, ndim=2] values, # <<<<<<<<<<<<<< * indexer, * ndarray[float64_t, ndim=2] out, */ static PyObject *__pyx_pf_6pandas_5algos_364take_2d_multi_int64_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_k; Py_ssize_t __pyx_v_n; Py_ssize_t __pyx_v_idx; PyArrayObject *__pyx_v_idx0 = 0; PyArrayObject *__pyx_v_idx1 = 0; __pyx_t_5numpy_float64_t __pyx_v_fv; __Pyx_LocalBuf_ND __pyx_pybuffernd_idx0; __Pyx_Buffer __pyx_pybuffer_idx0; __Pyx_LocalBuf_ND __pyx_pybuffernd_idx1; __Pyx_Buffer __pyx_pybuffer_idx1; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_values; __Pyx_Buffer __pyx_pybuffer_values; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyArrayObject *__pyx_t_2 = NULL; PyArrayObject *__pyx_t_3 = NULL; Py_ssize_t __pyx_t_4; __pyx_t_5numpy_float64_t __pyx_t_5; Py_ssize_t __pyx_t_6; int __pyx_t_7; Py_ssize_t __pyx_t_8; Py_ssize_t __pyx_t_9; Py_ssize_t __pyx_t_10; Py_ssize_t __pyx_t_11; Py_ssize_t __pyx_t_12; Py_ssize_t __pyx_t_13; Py_ssize_t __pyx_t_14; Py_ssize_t __pyx_t_15; __pyx_t_5numpy_int64_t __pyx_t_16; Py_ssize_t __pyx_t_17; Py_ssize_t __pyx_t_18; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("take_2d_multi_int64_float64", 0); __pyx_pybuffer_idx0.pybuffer.buf = NULL; __pyx_pybuffer_idx0.refcount = 0; __pyx_pybuffernd_idx0.data = NULL; __pyx_pybuffernd_idx0.rcbuffer = &__pyx_pybuffer_idx0; __pyx_pybuffer_idx1.pybuffer.buf = NULL; __pyx_pybuffer_idx1.refcount = 0; __pyx_pybuffernd_idx1.data = NULL; __pyx_pybuffernd_idx1.rcbuffer = &__pyx_pybuffer_idx1; __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_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; { __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_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4669; __pyx_clineno = __LINE__; goto __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_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; 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, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4669; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; __pyx_pybuffernd_out.diminfo[1].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_out.diminfo[1].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[1]; /* "pandas/src/generated.pyx":4675 * cdef: * Py_ssize_t i, j, k, n, idx * ndarray[int64_t] idx0 = indexer[0] # <<<<<<<<<<<<<< * ndarray[int64_t] idx1 = indexer[1] * float64_t fv */ __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_indexer, 0, sizeof(long), PyInt_FromLong, 0, 0, 0); if (!__pyx_t_1) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4675; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 4675; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_2 = ((PyArrayObject *)__pyx_t_1); { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_idx0.rcbuffer->pybuffer, (PyObject*)__pyx_t_2, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { __pyx_v_idx0 = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_idx0.rcbuffer->pybuffer.buf = NULL; {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4675; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } else {__pyx_pybuffernd_idx0.diminfo[0].strides = __pyx_pybuffernd_idx0.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_idx0.diminfo[0].shape = __pyx_pybuffernd_idx0.rcbuffer->pybuffer.shape[0]; } } __pyx_t_2 = 0; __pyx_v_idx0 = ((PyArrayObject *)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/generated.pyx":4676 * Py_ssize_t i, j, k, n, idx * ndarray[int64_t] idx0 = indexer[0] * ndarray[int64_t] idx1 = indexer[1] # <<<<<<<<<<<<<< * float64_t fv * */ __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_indexer, 1, sizeof(long), PyInt_FromLong, 0, 0, 0); if (!__pyx_t_1) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4676; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 4676; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_3 = ((PyArrayObject *)__pyx_t_1); { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_idx1.rcbuffer->pybuffer, (PyObject*)__pyx_t_3, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { __pyx_v_idx1 = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_idx1.rcbuffer->pybuffer.buf = NULL; {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4676; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } else {__pyx_pybuffernd_idx1.diminfo[0].strides = __pyx_pybuffernd_idx1.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_idx1.diminfo[0].shape = __pyx_pybuffernd_idx1.rcbuffer->pybuffer.shape[0]; } } __pyx_t_3 = 0; __pyx_v_idx1 = ((PyArrayObject *)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/generated.pyx":4679 * float64_t fv * * n = len(idx0) # <<<<<<<<<<<<<< * k = len(idx1) * */ __pyx_t_4 = PyObject_Length(((PyObject *)__pyx_v_idx0)); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4679; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_4; /* "pandas/src/generated.pyx":4680 * * n = len(idx0) * k = len(idx1) # <<<<<<<<<<<<<< * * fv = fill_value */ __pyx_t_4 = PyObject_Length(((PyObject *)__pyx_v_idx1)); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4680; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_k = __pyx_t_4; /* "pandas/src/generated.pyx":4682 * k = len(idx1) * * fv = fill_value # <<<<<<<<<<<<<< * for i from 0 <= i < n: * idx = idx0[i] */ __pyx_t_5 = __pyx_PyFloat_AsDouble(__pyx_v_fill_value); if (unlikely((__pyx_t_5 == (npy_float64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4682; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_fv = __pyx_t_5; /* "pandas/src/generated.pyx":4683 * * fv = fill_value * for i from 0 <= i < n: # <<<<<<<<<<<<<< * idx = idx0[i] * if idx == -1: */ __pyx_t_4 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_4; __pyx_v_i++) { /* "pandas/src/generated.pyx":4684 * fv = fill_value * for i from 0 <= i < n: * idx = idx0[i] # <<<<<<<<<<<<<< * if idx == -1: * for j from 0 <= j < k: */ __pyx_t_6 = __pyx_v_i; __pyx_v_idx = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_idx0.rcbuffer->pybuffer.buf, __pyx_t_6, __pyx_pybuffernd_idx0.diminfo[0].strides)); /* "pandas/src/generated.pyx":4685 * for i from 0 <= i < n: * idx = idx0[i] * if idx == -1: # <<<<<<<<<<<<<< * for j from 0 <= j < k: * out[i, j] = fv */ __pyx_t_7 = ((__pyx_v_idx == -1) != 0); if (__pyx_t_7) { /* "pandas/src/generated.pyx":4686 * idx = idx0[i] * if idx == -1: * for j from 0 <= j < k: # <<<<<<<<<<<<<< * out[i, j] = fv * else: */ __pyx_t_8 = __pyx_v_k; for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_8; __pyx_v_j++) { /* "pandas/src/generated.pyx":4687 * if idx == -1: * for j from 0 <= j < k: * out[i, j] = fv # <<<<<<<<<<<<<< * else: * for j from 0 <= j < k: */ __pyx_t_9 = __pyx_v_i; __pyx_t_10 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_9, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_10, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_fv; } goto __pyx_L5; } /*else*/ { /* "pandas/src/generated.pyx":4689 * out[i, j] = fv * else: * for j from 0 <= j < k: # <<<<<<<<<<<<<< * if idx1[j] == -1: * out[i, j] = fv */ __pyx_t_8 = __pyx_v_k; for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_8; __pyx_v_j++) { /* "pandas/src/generated.pyx":4690 * else: * for j from 0 <= j < k: * if idx1[j] == -1: # <<<<<<<<<<<<<< * out[i, j] = fv * else: */ __pyx_t_11 = __pyx_v_j; __pyx_t_7 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_idx1.rcbuffer->pybuffer.buf, __pyx_t_11, __pyx_pybuffernd_idx1.diminfo[0].strides)) == -1) != 0); if (__pyx_t_7) { /* "pandas/src/generated.pyx":4691 * for j from 0 <= j < k: * if idx1[j] == -1: * out[i, j] = fv # <<<<<<<<<<<<<< * else: * out[i, j] = values[idx, idx1[j]] */ __pyx_t_12 = __pyx_v_i; __pyx_t_13 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_12, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_13, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_fv; goto __pyx_L10; } /*else*/ { /* "pandas/src/generated.pyx":4693 * out[i, j] = fv * else: * out[i, j] = values[idx, idx1[j]] # <<<<<<<<<<<<<< * * @cython.wraparound(False) */ __pyx_t_14 = __pyx_v_j; __pyx_t_15 = __pyx_v_idx; __pyx_t_16 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_idx1.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_idx1.diminfo[0].strides)); __pyx_t_17 = __pyx_v_i; __pyx_t_18 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_18, __pyx_pybuffernd_out.diminfo[1].strides) = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_16, __pyx_pybuffernd_values.diminfo[1].strides)); } __pyx_L10:; } } __pyx_L5:; } __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_idx0.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_idx1.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.take_2d_multi_int64_float64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_idx0.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_idx1.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_idx0); __Pyx_XDECREF((PyObject *)__pyx_v_idx1); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_367take_2d_multi_float32_float32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_367take_2d_multi_float32_float32 = {__Pyx_NAMESTR("take_2d_multi_float32_float32"), (PyCFunction)__pyx_pw_6pandas_5algos_367take_2d_multi_float32_float32, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_367take_2d_multi_float32_float32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_values = 0; PyObject *__pyx_v_indexer = 0; PyArrayObject *__pyx_v_out = 0; PyObject *__pyx_v_fill_value = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("take_2d_multi_float32_float32 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__values,&__pyx_n_s__indexer,&__pyx_n_s__out,&__pyx_n_s__fill_value,0}; PyObject* values[4] = {0,0,0,0}; values[3] = __pyx_k_180; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__values)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__indexer)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_2d_multi_float32_float32", 0, 3, 4, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4697; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__out)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_2d_multi_float32_float32", 0, 3, 4, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4697; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__fill_value); if (value) { values[3] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "take_2d_multi_float32_float32") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4697; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_values = ((PyArrayObject *)values[0]); __pyx_v_indexer = values[1]; __pyx_v_out = ((PyArrayObject *)values[2]); __pyx_v_fill_value = values[3]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("take_2d_multi_float32_float32", 0, 3, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4697; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.take_2d_multi_float32_float32", __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_filename = __pyx_f[2]; __pyx_lineno = 4697; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_5numpy_ndarray, 1, "out", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4699; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_366take_2d_multi_float32_float32(__pyx_self, __pyx_v_values, __pyx_v_indexer, __pyx_v_out, __pyx_v_fill_value); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":4697 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_multi_float32_float32(ndarray[float32_t, ndim=2] values, # <<<<<<<<<<<<<< * indexer, * ndarray[float32_t, ndim=2] out, */ static PyObject *__pyx_pf_6pandas_5algos_366take_2d_multi_float32_float32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_k; Py_ssize_t __pyx_v_n; Py_ssize_t __pyx_v_idx; PyArrayObject *__pyx_v_idx0 = 0; PyArrayObject *__pyx_v_idx1 = 0; __pyx_t_5numpy_float32_t __pyx_v_fv; __Pyx_LocalBuf_ND __pyx_pybuffernd_idx0; __Pyx_Buffer __pyx_pybuffer_idx0; __Pyx_LocalBuf_ND __pyx_pybuffernd_idx1; __Pyx_Buffer __pyx_pybuffer_idx1; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_values; __Pyx_Buffer __pyx_pybuffer_values; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyArrayObject *__pyx_t_2 = NULL; PyArrayObject *__pyx_t_3 = NULL; Py_ssize_t __pyx_t_4; __pyx_t_5numpy_float32_t __pyx_t_5; Py_ssize_t __pyx_t_6; int __pyx_t_7; Py_ssize_t __pyx_t_8; Py_ssize_t __pyx_t_9; Py_ssize_t __pyx_t_10; Py_ssize_t __pyx_t_11; Py_ssize_t __pyx_t_12; Py_ssize_t __pyx_t_13; Py_ssize_t __pyx_t_14; Py_ssize_t __pyx_t_15; __pyx_t_5numpy_int64_t __pyx_t_16; Py_ssize_t __pyx_t_17; Py_ssize_t __pyx_t_18; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("take_2d_multi_float32_float32", 0); __pyx_pybuffer_idx0.pybuffer.buf = NULL; __pyx_pybuffer_idx0.refcount = 0; __pyx_pybuffernd_idx0.data = NULL; __pyx_pybuffernd_idx0.rcbuffer = &__pyx_pybuffer_idx0; __pyx_pybuffer_idx1.pybuffer.buf = NULL; __pyx_pybuffer_idx1.refcount = 0; __pyx_pybuffernd_idx1.data = NULL; __pyx_pybuffernd_idx1.rcbuffer = &__pyx_pybuffer_idx1; __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_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; { __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_float32_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4697; __pyx_clineno = __LINE__; goto __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_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_v_out, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4697; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; __pyx_pybuffernd_out.diminfo[1].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_out.diminfo[1].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[1]; /* "pandas/src/generated.pyx":4703 * cdef: * Py_ssize_t i, j, k, n, idx * ndarray[int64_t] idx0 = indexer[0] # <<<<<<<<<<<<<< * ndarray[int64_t] idx1 = indexer[1] * float32_t fv */ __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_indexer, 0, sizeof(long), PyInt_FromLong, 0, 0, 0); if (!__pyx_t_1) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4703; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 4703; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_2 = ((PyArrayObject *)__pyx_t_1); { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_idx0.rcbuffer->pybuffer, (PyObject*)__pyx_t_2, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { __pyx_v_idx0 = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_idx0.rcbuffer->pybuffer.buf = NULL; {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4703; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } else {__pyx_pybuffernd_idx0.diminfo[0].strides = __pyx_pybuffernd_idx0.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_idx0.diminfo[0].shape = __pyx_pybuffernd_idx0.rcbuffer->pybuffer.shape[0]; } } __pyx_t_2 = 0; __pyx_v_idx0 = ((PyArrayObject *)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/generated.pyx":4704 * Py_ssize_t i, j, k, n, idx * ndarray[int64_t] idx0 = indexer[0] * ndarray[int64_t] idx1 = indexer[1] # <<<<<<<<<<<<<< * float32_t fv * */ __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_indexer, 1, sizeof(long), PyInt_FromLong, 0, 0, 0); if (!__pyx_t_1) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4704; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 4704; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_3 = ((PyArrayObject *)__pyx_t_1); { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_idx1.rcbuffer->pybuffer, (PyObject*)__pyx_t_3, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { __pyx_v_idx1 = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_idx1.rcbuffer->pybuffer.buf = NULL; {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4704; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } else {__pyx_pybuffernd_idx1.diminfo[0].strides = __pyx_pybuffernd_idx1.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_idx1.diminfo[0].shape = __pyx_pybuffernd_idx1.rcbuffer->pybuffer.shape[0]; } } __pyx_t_3 = 0; __pyx_v_idx1 = ((PyArrayObject *)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/generated.pyx":4707 * float32_t fv * * n = len(idx0) # <<<<<<<<<<<<<< * k = len(idx1) * */ __pyx_t_4 = PyObject_Length(((PyObject *)__pyx_v_idx0)); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4707; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_4; /* "pandas/src/generated.pyx":4708 * * n = len(idx0) * k = len(idx1) # <<<<<<<<<<<<<< * * fv = fill_value */ __pyx_t_4 = PyObject_Length(((PyObject *)__pyx_v_idx1)); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4708; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_k = __pyx_t_4; /* "pandas/src/generated.pyx":4710 * k = len(idx1) * * fv = fill_value # <<<<<<<<<<<<<< * for i from 0 <= i < n: * idx = idx0[i] */ __pyx_t_5 = __pyx_PyFloat_AsFloat(__pyx_v_fill_value); if (unlikely((__pyx_t_5 == (npy_float32)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4710; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_fv = __pyx_t_5; /* "pandas/src/generated.pyx":4711 * * fv = fill_value * for i from 0 <= i < n: # <<<<<<<<<<<<<< * idx = idx0[i] * if idx == -1: */ __pyx_t_4 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_4; __pyx_v_i++) { /* "pandas/src/generated.pyx":4712 * fv = fill_value * for i from 0 <= i < n: * idx = idx0[i] # <<<<<<<<<<<<<< * if idx == -1: * for j from 0 <= j < k: */ __pyx_t_6 = __pyx_v_i; __pyx_v_idx = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_idx0.rcbuffer->pybuffer.buf, __pyx_t_6, __pyx_pybuffernd_idx0.diminfo[0].strides)); /* "pandas/src/generated.pyx":4713 * for i from 0 <= i < n: * idx = idx0[i] * if idx == -1: # <<<<<<<<<<<<<< * for j from 0 <= j < k: * out[i, j] = fv */ __pyx_t_7 = ((__pyx_v_idx == -1) != 0); if (__pyx_t_7) { /* "pandas/src/generated.pyx":4714 * idx = idx0[i] * if idx == -1: * for j from 0 <= j < k: # <<<<<<<<<<<<<< * out[i, j] = fv * else: */ __pyx_t_8 = __pyx_v_k; for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_8; __pyx_v_j++) { /* "pandas/src/generated.pyx":4715 * if idx == -1: * for j from 0 <= j < k: * out[i, j] = fv # <<<<<<<<<<<<<< * else: * for j from 0 <= j < k: */ __pyx_t_9 = __pyx_v_i; __pyx_t_10 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_9, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_10, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_fv; } goto __pyx_L5; } /*else*/ { /* "pandas/src/generated.pyx":4717 * out[i, j] = fv * else: * for j from 0 <= j < k: # <<<<<<<<<<<<<< * if idx1[j] == -1: * out[i, j] = fv */ __pyx_t_8 = __pyx_v_k; for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_8; __pyx_v_j++) { /* "pandas/src/generated.pyx":4718 * else: * for j from 0 <= j < k: * if idx1[j] == -1: # <<<<<<<<<<<<<< * out[i, j] = fv * else: */ __pyx_t_11 = __pyx_v_j; __pyx_t_7 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_idx1.rcbuffer->pybuffer.buf, __pyx_t_11, __pyx_pybuffernd_idx1.diminfo[0].strides)) == -1) != 0); if (__pyx_t_7) { /* "pandas/src/generated.pyx":4719 * for j from 0 <= j < k: * if idx1[j] == -1: * out[i, j] = fv # <<<<<<<<<<<<<< * else: * out[i, j] = values[idx, idx1[j]] */ __pyx_t_12 = __pyx_v_i; __pyx_t_13 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_12, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_13, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_fv; goto __pyx_L10; } /*else*/ { /* "pandas/src/generated.pyx":4721 * out[i, j] = fv * else: * out[i, j] = values[idx, idx1[j]] # <<<<<<<<<<<<<< * * @cython.wraparound(False) */ __pyx_t_14 = __pyx_v_j; __pyx_t_15 = __pyx_v_idx; __pyx_t_16 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_idx1.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_idx1.diminfo[0].strides)); __pyx_t_17 = __pyx_v_i; __pyx_t_18 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_18, __pyx_pybuffernd_out.diminfo[1].strides) = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_16, __pyx_pybuffernd_values.diminfo[1].strides)); } __pyx_L10:; } } __pyx_L5:; } __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_idx0.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_idx1.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.take_2d_multi_float32_float32", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_idx0.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_idx1.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_idx0); __Pyx_XDECREF((PyObject *)__pyx_v_idx1); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_369take_2d_multi_float32_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_369take_2d_multi_float32_float64 = {__Pyx_NAMESTR("take_2d_multi_float32_float64"), (PyCFunction)__pyx_pw_6pandas_5algos_369take_2d_multi_float32_float64, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_369take_2d_multi_float32_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_values = 0; PyObject *__pyx_v_indexer = 0; PyArrayObject *__pyx_v_out = 0; PyObject *__pyx_v_fill_value = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("take_2d_multi_float32_float64 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__values,&__pyx_n_s__indexer,&__pyx_n_s__out,&__pyx_n_s__fill_value,0}; PyObject* values[4] = {0,0,0,0}; values[3] = __pyx_k_181; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__values)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__indexer)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_2d_multi_float32_float64", 0, 3, 4, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4725; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__out)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_2d_multi_float32_float64", 0, 3, 4, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4725; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__fill_value); if (value) { values[3] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "take_2d_multi_float32_float64") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4725; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_values = ((PyArrayObject *)values[0]); __pyx_v_indexer = values[1]; __pyx_v_out = ((PyArrayObject *)values[2]); __pyx_v_fill_value = values[3]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("take_2d_multi_float32_float64", 0, 3, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4725; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.take_2d_multi_float32_float64", __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_filename = __pyx_f[2]; __pyx_lineno = 4725; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_5numpy_ndarray, 1, "out", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4727; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_368take_2d_multi_float32_float64(__pyx_self, __pyx_v_values, __pyx_v_indexer, __pyx_v_out, __pyx_v_fill_value); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":4725 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_multi_float32_float64(ndarray[float32_t, ndim=2] values, # <<<<<<<<<<<<<< * indexer, * ndarray[float64_t, ndim=2] out, */ static PyObject *__pyx_pf_6pandas_5algos_368take_2d_multi_float32_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_k; Py_ssize_t __pyx_v_n; Py_ssize_t __pyx_v_idx; PyArrayObject *__pyx_v_idx0 = 0; PyArrayObject *__pyx_v_idx1 = 0; __pyx_t_5numpy_float64_t __pyx_v_fv; __Pyx_LocalBuf_ND __pyx_pybuffernd_idx0; __Pyx_Buffer __pyx_pybuffer_idx0; __Pyx_LocalBuf_ND __pyx_pybuffernd_idx1; __Pyx_Buffer __pyx_pybuffer_idx1; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_values; __Pyx_Buffer __pyx_pybuffer_values; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyArrayObject *__pyx_t_2 = NULL; PyArrayObject *__pyx_t_3 = NULL; Py_ssize_t __pyx_t_4; __pyx_t_5numpy_float64_t __pyx_t_5; Py_ssize_t __pyx_t_6; int __pyx_t_7; Py_ssize_t __pyx_t_8; Py_ssize_t __pyx_t_9; Py_ssize_t __pyx_t_10; Py_ssize_t __pyx_t_11; Py_ssize_t __pyx_t_12; Py_ssize_t __pyx_t_13; Py_ssize_t __pyx_t_14; Py_ssize_t __pyx_t_15; __pyx_t_5numpy_int64_t __pyx_t_16; Py_ssize_t __pyx_t_17; Py_ssize_t __pyx_t_18; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("take_2d_multi_float32_float64", 0); __pyx_pybuffer_idx0.pybuffer.buf = NULL; __pyx_pybuffer_idx0.refcount = 0; __pyx_pybuffernd_idx0.data = NULL; __pyx_pybuffernd_idx0.rcbuffer = &__pyx_pybuffer_idx0; __pyx_pybuffer_idx1.pybuffer.buf = NULL; __pyx_pybuffer_idx1.refcount = 0; __pyx_pybuffernd_idx1.data = NULL; __pyx_pybuffernd_idx1.rcbuffer = &__pyx_pybuffer_idx1; __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_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; { __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_float32_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4725; __pyx_clineno = __LINE__; goto __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_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; 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, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4725; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; __pyx_pybuffernd_out.diminfo[1].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_out.diminfo[1].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[1]; /* "pandas/src/generated.pyx":4731 * cdef: * Py_ssize_t i, j, k, n, idx * ndarray[int64_t] idx0 = indexer[0] # <<<<<<<<<<<<<< * ndarray[int64_t] idx1 = indexer[1] * float64_t fv */ __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_indexer, 0, sizeof(long), PyInt_FromLong, 0, 0, 0); if (!__pyx_t_1) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4731; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 4731; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_2 = ((PyArrayObject *)__pyx_t_1); { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_idx0.rcbuffer->pybuffer, (PyObject*)__pyx_t_2, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { __pyx_v_idx0 = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_idx0.rcbuffer->pybuffer.buf = NULL; {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4731; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } else {__pyx_pybuffernd_idx0.diminfo[0].strides = __pyx_pybuffernd_idx0.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_idx0.diminfo[0].shape = __pyx_pybuffernd_idx0.rcbuffer->pybuffer.shape[0]; } } __pyx_t_2 = 0; __pyx_v_idx0 = ((PyArrayObject *)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/generated.pyx":4732 * Py_ssize_t i, j, k, n, idx * ndarray[int64_t] idx0 = indexer[0] * ndarray[int64_t] idx1 = indexer[1] # <<<<<<<<<<<<<< * float64_t fv * */ __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_indexer, 1, sizeof(long), PyInt_FromLong, 0, 0, 0); if (!__pyx_t_1) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4732; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 4732; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_3 = ((PyArrayObject *)__pyx_t_1); { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_idx1.rcbuffer->pybuffer, (PyObject*)__pyx_t_3, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { __pyx_v_idx1 = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_idx1.rcbuffer->pybuffer.buf = NULL; {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4732; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } else {__pyx_pybuffernd_idx1.diminfo[0].strides = __pyx_pybuffernd_idx1.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_idx1.diminfo[0].shape = __pyx_pybuffernd_idx1.rcbuffer->pybuffer.shape[0]; } } __pyx_t_3 = 0; __pyx_v_idx1 = ((PyArrayObject *)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/generated.pyx":4735 * float64_t fv * * n = len(idx0) # <<<<<<<<<<<<<< * k = len(idx1) * */ __pyx_t_4 = PyObject_Length(((PyObject *)__pyx_v_idx0)); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4735; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_4; /* "pandas/src/generated.pyx":4736 * * n = len(idx0) * k = len(idx1) # <<<<<<<<<<<<<< * * fv = fill_value */ __pyx_t_4 = PyObject_Length(((PyObject *)__pyx_v_idx1)); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4736; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_k = __pyx_t_4; /* "pandas/src/generated.pyx":4738 * k = len(idx1) * * fv = fill_value # <<<<<<<<<<<<<< * for i from 0 <= i < n: * idx = idx0[i] */ __pyx_t_5 = __pyx_PyFloat_AsDouble(__pyx_v_fill_value); if (unlikely((__pyx_t_5 == (npy_float64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4738; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_fv = __pyx_t_5; /* "pandas/src/generated.pyx":4739 * * fv = fill_value * for i from 0 <= i < n: # <<<<<<<<<<<<<< * idx = idx0[i] * if idx == -1: */ __pyx_t_4 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_4; __pyx_v_i++) { /* "pandas/src/generated.pyx":4740 * fv = fill_value * for i from 0 <= i < n: * idx = idx0[i] # <<<<<<<<<<<<<< * if idx == -1: * for j from 0 <= j < k: */ __pyx_t_6 = __pyx_v_i; __pyx_v_idx = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_idx0.rcbuffer->pybuffer.buf, __pyx_t_6, __pyx_pybuffernd_idx0.diminfo[0].strides)); /* "pandas/src/generated.pyx":4741 * for i from 0 <= i < n: * idx = idx0[i] * if idx == -1: # <<<<<<<<<<<<<< * for j from 0 <= j < k: * out[i, j] = fv */ __pyx_t_7 = ((__pyx_v_idx == -1) != 0); if (__pyx_t_7) { /* "pandas/src/generated.pyx":4742 * idx = idx0[i] * if idx == -1: * for j from 0 <= j < k: # <<<<<<<<<<<<<< * out[i, j] = fv * else: */ __pyx_t_8 = __pyx_v_k; for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_8; __pyx_v_j++) { /* "pandas/src/generated.pyx":4743 * if idx == -1: * for j from 0 <= j < k: * out[i, j] = fv # <<<<<<<<<<<<<< * else: * for j from 0 <= j < k: */ __pyx_t_9 = __pyx_v_i; __pyx_t_10 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_9, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_10, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_fv; } goto __pyx_L5; } /*else*/ { /* "pandas/src/generated.pyx":4745 * out[i, j] = fv * else: * for j from 0 <= j < k: # <<<<<<<<<<<<<< * if idx1[j] == -1: * out[i, j] = fv */ __pyx_t_8 = __pyx_v_k; for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_8; __pyx_v_j++) { /* "pandas/src/generated.pyx":4746 * else: * for j from 0 <= j < k: * if idx1[j] == -1: # <<<<<<<<<<<<<< * out[i, j] = fv * else: */ __pyx_t_11 = __pyx_v_j; __pyx_t_7 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_idx1.rcbuffer->pybuffer.buf, __pyx_t_11, __pyx_pybuffernd_idx1.diminfo[0].strides)) == -1) != 0); if (__pyx_t_7) { /* "pandas/src/generated.pyx":4747 * for j from 0 <= j < k: * if idx1[j] == -1: * out[i, j] = fv # <<<<<<<<<<<<<< * else: * out[i, j] = values[idx, idx1[j]] */ __pyx_t_12 = __pyx_v_i; __pyx_t_13 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_12, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_13, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_fv; goto __pyx_L10; } /*else*/ { /* "pandas/src/generated.pyx":4749 * out[i, j] = fv * else: * out[i, j] = values[idx, idx1[j]] # <<<<<<<<<<<<<< * * @cython.wraparound(False) */ __pyx_t_14 = __pyx_v_j; __pyx_t_15 = __pyx_v_idx; __pyx_t_16 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_idx1.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_idx1.diminfo[0].strides)); __pyx_t_17 = __pyx_v_i; __pyx_t_18 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_18, __pyx_pybuffernd_out.diminfo[1].strides) = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_16, __pyx_pybuffernd_values.diminfo[1].strides)); } __pyx_L10:; } } __pyx_L5:; } __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_idx0.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_idx1.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.take_2d_multi_float32_float64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_idx0.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_idx1.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_idx0); __Pyx_XDECREF((PyObject *)__pyx_v_idx1); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_371take_2d_multi_float64_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_371take_2d_multi_float64_float64 = {__Pyx_NAMESTR("take_2d_multi_float64_float64"), (PyCFunction)__pyx_pw_6pandas_5algos_371take_2d_multi_float64_float64, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_371take_2d_multi_float64_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_values = 0; PyObject *__pyx_v_indexer = 0; PyArrayObject *__pyx_v_out = 0; PyObject *__pyx_v_fill_value = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("take_2d_multi_float64_float64 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__values,&__pyx_n_s__indexer,&__pyx_n_s__out,&__pyx_n_s__fill_value,0}; PyObject* values[4] = {0,0,0,0}; values[3] = __pyx_k_182; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__values)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__indexer)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_2d_multi_float64_float64", 0, 3, 4, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4753; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__out)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_2d_multi_float64_float64", 0, 3, 4, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4753; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__fill_value); if (value) { values[3] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "take_2d_multi_float64_float64") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4753; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_values = ((PyArrayObject *)values[0]); __pyx_v_indexer = values[1]; __pyx_v_out = ((PyArrayObject *)values[2]); __pyx_v_fill_value = values[3]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("take_2d_multi_float64_float64", 0, 3, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4753; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.take_2d_multi_float64_float64", __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_filename = __pyx_f[2]; __pyx_lineno = 4753; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_5numpy_ndarray, 1, "out", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4755; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_370take_2d_multi_float64_float64(__pyx_self, __pyx_v_values, __pyx_v_indexer, __pyx_v_out, __pyx_v_fill_value); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":4753 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_multi_float64_float64(ndarray[float64_t, ndim=2] values, # <<<<<<<<<<<<<< * indexer, * ndarray[float64_t, ndim=2] out, */ static PyObject *__pyx_pf_6pandas_5algos_370take_2d_multi_float64_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_k; Py_ssize_t __pyx_v_n; Py_ssize_t __pyx_v_idx; PyArrayObject *__pyx_v_idx0 = 0; PyArrayObject *__pyx_v_idx1 = 0; __pyx_t_5numpy_float64_t __pyx_v_fv; __Pyx_LocalBuf_ND __pyx_pybuffernd_idx0; __Pyx_Buffer __pyx_pybuffer_idx0; __Pyx_LocalBuf_ND __pyx_pybuffernd_idx1; __Pyx_Buffer __pyx_pybuffer_idx1; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_values; __Pyx_Buffer __pyx_pybuffer_values; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyArrayObject *__pyx_t_2 = NULL; PyArrayObject *__pyx_t_3 = NULL; Py_ssize_t __pyx_t_4; __pyx_t_5numpy_float64_t __pyx_t_5; Py_ssize_t __pyx_t_6; int __pyx_t_7; Py_ssize_t __pyx_t_8; Py_ssize_t __pyx_t_9; Py_ssize_t __pyx_t_10; Py_ssize_t __pyx_t_11; Py_ssize_t __pyx_t_12; Py_ssize_t __pyx_t_13; Py_ssize_t __pyx_t_14; Py_ssize_t __pyx_t_15; __pyx_t_5numpy_int64_t __pyx_t_16; Py_ssize_t __pyx_t_17; Py_ssize_t __pyx_t_18; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("take_2d_multi_float64_float64", 0); __pyx_pybuffer_idx0.pybuffer.buf = NULL; __pyx_pybuffer_idx0.refcount = 0; __pyx_pybuffernd_idx0.data = NULL; __pyx_pybuffernd_idx0.rcbuffer = &__pyx_pybuffer_idx0; __pyx_pybuffer_idx1.pybuffer.buf = NULL; __pyx_pybuffer_idx1.refcount = 0; __pyx_pybuffernd_idx1.data = NULL; __pyx_pybuffernd_idx1.rcbuffer = &__pyx_pybuffer_idx1; __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_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; { __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, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4753; __pyx_clineno = __LINE__; goto __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_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; 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, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4753; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; __pyx_pybuffernd_out.diminfo[1].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_out.diminfo[1].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[1]; /* "pandas/src/generated.pyx":4759 * cdef: * Py_ssize_t i, j, k, n, idx * ndarray[int64_t] idx0 = indexer[0] # <<<<<<<<<<<<<< * ndarray[int64_t] idx1 = indexer[1] * float64_t fv */ __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_indexer, 0, sizeof(long), PyInt_FromLong, 0, 0, 0); if (!__pyx_t_1) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4759; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 4759; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_2 = ((PyArrayObject *)__pyx_t_1); { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_idx0.rcbuffer->pybuffer, (PyObject*)__pyx_t_2, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { __pyx_v_idx0 = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_idx0.rcbuffer->pybuffer.buf = NULL; {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4759; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } else {__pyx_pybuffernd_idx0.diminfo[0].strides = __pyx_pybuffernd_idx0.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_idx0.diminfo[0].shape = __pyx_pybuffernd_idx0.rcbuffer->pybuffer.shape[0]; } } __pyx_t_2 = 0; __pyx_v_idx0 = ((PyArrayObject *)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/generated.pyx":4760 * Py_ssize_t i, j, k, n, idx * ndarray[int64_t] idx0 = indexer[0] * ndarray[int64_t] idx1 = indexer[1] # <<<<<<<<<<<<<< * float64_t fv * */ __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_indexer, 1, sizeof(long), PyInt_FromLong, 0, 0, 0); if (!__pyx_t_1) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4760; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 4760; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_3 = ((PyArrayObject *)__pyx_t_1); { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_idx1.rcbuffer->pybuffer, (PyObject*)__pyx_t_3, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { __pyx_v_idx1 = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_idx1.rcbuffer->pybuffer.buf = NULL; {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4760; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } else {__pyx_pybuffernd_idx1.diminfo[0].strides = __pyx_pybuffernd_idx1.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_idx1.diminfo[0].shape = __pyx_pybuffernd_idx1.rcbuffer->pybuffer.shape[0]; } } __pyx_t_3 = 0; __pyx_v_idx1 = ((PyArrayObject *)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/generated.pyx":4763 * float64_t fv * * n = len(idx0) # <<<<<<<<<<<<<< * k = len(idx1) * */ __pyx_t_4 = PyObject_Length(((PyObject *)__pyx_v_idx0)); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4763; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_4; /* "pandas/src/generated.pyx":4764 * * n = len(idx0) * k = len(idx1) # <<<<<<<<<<<<<< * * fv = fill_value */ __pyx_t_4 = PyObject_Length(((PyObject *)__pyx_v_idx1)); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4764; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_k = __pyx_t_4; /* "pandas/src/generated.pyx":4766 * k = len(idx1) * * fv = fill_value # <<<<<<<<<<<<<< * for i from 0 <= i < n: * idx = idx0[i] */ __pyx_t_5 = __pyx_PyFloat_AsDouble(__pyx_v_fill_value); if (unlikely((__pyx_t_5 == (npy_float64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4766; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_fv = __pyx_t_5; /* "pandas/src/generated.pyx":4767 * * fv = fill_value * for i from 0 <= i < n: # <<<<<<<<<<<<<< * idx = idx0[i] * if idx == -1: */ __pyx_t_4 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_4; __pyx_v_i++) { /* "pandas/src/generated.pyx":4768 * fv = fill_value * for i from 0 <= i < n: * idx = idx0[i] # <<<<<<<<<<<<<< * if idx == -1: * for j from 0 <= j < k: */ __pyx_t_6 = __pyx_v_i; __pyx_v_idx = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_idx0.rcbuffer->pybuffer.buf, __pyx_t_6, __pyx_pybuffernd_idx0.diminfo[0].strides)); /* "pandas/src/generated.pyx":4769 * for i from 0 <= i < n: * idx = idx0[i] * if idx == -1: # <<<<<<<<<<<<<< * for j from 0 <= j < k: * out[i, j] = fv */ __pyx_t_7 = ((__pyx_v_idx == -1) != 0); if (__pyx_t_7) { /* "pandas/src/generated.pyx":4770 * idx = idx0[i] * if idx == -1: * for j from 0 <= j < k: # <<<<<<<<<<<<<< * out[i, j] = fv * else: */ __pyx_t_8 = __pyx_v_k; for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_8; __pyx_v_j++) { /* "pandas/src/generated.pyx":4771 * if idx == -1: * for j from 0 <= j < k: * out[i, j] = fv # <<<<<<<<<<<<<< * else: * for j from 0 <= j < k: */ __pyx_t_9 = __pyx_v_i; __pyx_t_10 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_9, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_10, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_fv; } goto __pyx_L5; } /*else*/ { /* "pandas/src/generated.pyx":4773 * out[i, j] = fv * else: * for j from 0 <= j < k: # <<<<<<<<<<<<<< * if idx1[j] == -1: * out[i, j] = fv */ __pyx_t_8 = __pyx_v_k; for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_8; __pyx_v_j++) { /* "pandas/src/generated.pyx":4774 * else: * for j from 0 <= j < k: * if idx1[j] == -1: # <<<<<<<<<<<<<< * out[i, j] = fv * else: */ __pyx_t_11 = __pyx_v_j; __pyx_t_7 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_idx1.rcbuffer->pybuffer.buf, __pyx_t_11, __pyx_pybuffernd_idx1.diminfo[0].strides)) == -1) != 0); if (__pyx_t_7) { /* "pandas/src/generated.pyx":4775 * for j from 0 <= j < k: * if idx1[j] == -1: * out[i, j] = fv # <<<<<<<<<<<<<< * else: * out[i, j] = values[idx, idx1[j]] */ __pyx_t_12 = __pyx_v_i; __pyx_t_13 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_12, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_13, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_fv; goto __pyx_L10; } /*else*/ { /* "pandas/src/generated.pyx":4777 * out[i, j] = fv * else: * out[i, j] = values[idx, idx1[j]] # <<<<<<<<<<<<<< * * @cython.wraparound(False) */ __pyx_t_14 = __pyx_v_j; __pyx_t_15 = __pyx_v_idx; __pyx_t_16 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_idx1.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_idx1.diminfo[0].strides)); __pyx_t_17 = __pyx_v_i; __pyx_t_18 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_18, __pyx_pybuffernd_out.diminfo[1].strides) = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_16, __pyx_pybuffernd_values.diminfo[1].strides)); } __pyx_L10:; } } __pyx_L5:; } __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_idx0.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_idx1.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.take_2d_multi_float64_float64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_idx0.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_idx1.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_idx0); __Pyx_XDECREF((PyObject *)__pyx_v_idx1); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_373take_2d_multi_object_object(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_373take_2d_multi_object_object = {__Pyx_NAMESTR("take_2d_multi_object_object"), (PyCFunction)__pyx_pw_6pandas_5algos_373take_2d_multi_object_object, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_373take_2d_multi_object_object(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_values = 0; PyObject *__pyx_v_indexer = 0; PyArrayObject *__pyx_v_out = 0; PyObject *__pyx_v_fill_value = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("take_2d_multi_object_object (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__values,&__pyx_n_s__indexer,&__pyx_n_s__out,&__pyx_n_s__fill_value,0}; PyObject* values[4] = {0,0,0,0}; values[3] = __pyx_k_183; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__values)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__indexer)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_2d_multi_object_object", 0, 3, 4, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4781; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__out)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take_2d_multi_object_object", 0, 3, 4, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4781; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__fill_value); if (value) { values[3] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "take_2d_multi_object_object") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4781; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_values = ((PyArrayObject *)values[0]); __pyx_v_indexer = values[1]; __pyx_v_out = ((PyArrayObject *)values[2]); __pyx_v_fill_value = values[3]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("take_2d_multi_object_object", 0, 3, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4781; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.take_2d_multi_object_object", __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_filename = __pyx_f[2]; __pyx_lineno = 4781; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_5numpy_ndarray, 1, "out", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4783; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_372take_2d_multi_object_object(__pyx_self, __pyx_v_values, __pyx_v_indexer, __pyx_v_out, __pyx_v_fill_value); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":4781 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_multi_object_object(ndarray[object, ndim=2] values, # <<<<<<<<<<<<<< * indexer, * ndarray[object, ndim=2] out, */ static PyObject *__pyx_pf_6pandas_5algos_372take_2d_multi_object_object(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyObject *__pyx_v_indexer, PyArrayObject *__pyx_v_out, PyObject *__pyx_v_fill_value) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_k; Py_ssize_t __pyx_v_n; Py_ssize_t __pyx_v_idx; PyArrayObject *__pyx_v_idx0 = 0; PyArrayObject *__pyx_v_idx1 = 0; PyObject *__pyx_v_fv = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_idx0; __Pyx_Buffer __pyx_pybuffer_idx0; __Pyx_LocalBuf_ND __pyx_pybuffernd_idx1; __Pyx_Buffer __pyx_pybuffer_idx1; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_values; __Pyx_Buffer __pyx_pybuffer_values; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyArrayObject *__pyx_t_2 = NULL; PyArrayObject *__pyx_t_3 = NULL; Py_ssize_t __pyx_t_4; Py_ssize_t __pyx_t_5; int __pyx_t_6; Py_ssize_t __pyx_t_7; Py_ssize_t __pyx_t_8; Py_ssize_t __pyx_t_9; PyObject **__pyx_t_10; Py_ssize_t __pyx_t_11; Py_ssize_t __pyx_t_12; Py_ssize_t __pyx_t_13; Py_ssize_t __pyx_t_14; Py_ssize_t __pyx_t_15; __pyx_t_5numpy_int64_t __pyx_t_16; Py_ssize_t __pyx_t_17; Py_ssize_t __pyx_t_18; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("take_2d_multi_object_object", 0); __pyx_pybuffer_idx0.pybuffer.buf = NULL; __pyx_pybuffer_idx0.refcount = 0; __pyx_pybuffernd_idx0.data = NULL; __pyx_pybuffernd_idx0.rcbuffer = &__pyx_pybuffer_idx0; __pyx_pybuffer_idx1.pybuffer.buf = NULL; __pyx_pybuffer_idx1.refcount = 0; __pyx_pybuffernd_idx1.data = NULL; __pyx_pybuffernd_idx1.rcbuffer = &__pyx_pybuffer_idx1; __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_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; { __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, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4781; __pyx_clineno = __LINE__; goto __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_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_v_out, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4781; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; __pyx_pybuffernd_out.diminfo[1].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_out.diminfo[1].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[1]; /* "pandas/src/generated.pyx":4787 * cdef: * Py_ssize_t i, j, k, n, idx * ndarray[int64_t] idx0 = indexer[0] # <<<<<<<<<<<<<< * ndarray[int64_t] idx1 = indexer[1] * object fv */ __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_indexer, 0, sizeof(long), PyInt_FromLong, 0, 0, 0); if (!__pyx_t_1) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4787; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 4787; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_2 = ((PyArrayObject *)__pyx_t_1); { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_idx0.rcbuffer->pybuffer, (PyObject*)__pyx_t_2, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { __pyx_v_idx0 = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_idx0.rcbuffer->pybuffer.buf = NULL; {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4787; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } else {__pyx_pybuffernd_idx0.diminfo[0].strides = __pyx_pybuffernd_idx0.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_idx0.diminfo[0].shape = __pyx_pybuffernd_idx0.rcbuffer->pybuffer.shape[0]; } } __pyx_t_2 = 0; __pyx_v_idx0 = ((PyArrayObject *)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/generated.pyx":4788 * Py_ssize_t i, j, k, n, idx * ndarray[int64_t] idx0 = indexer[0] * ndarray[int64_t] idx1 = indexer[1] # <<<<<<<<<<<<<< * object fv * */ __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_indexer, 1, sizeof(long), PyInt_FromLong, 0, 0, 0); if (!__pyx_t_1) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4788; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 4788; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_3 = ((PyArrayObject *)__pyx_t_1); { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_idx1.rcbuffer->pybuffer, (PyObject*)__pyx_t_3, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { __pyx_v_idx1 = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_idx1.rcbuffer->pybuffer.buf = NULL; {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4788; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } else {__pyx_pybuffernd_idx1.diminfo[0].strides = __pyx_pybuffernd_idx1.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_idx1.diminfo[0].shape = __pyx_pybuffernd_idx1.rcbuffer->pybuffer.shape[0]; } } __pyx_t_3 = 0; __pyx_v_idx1 = ((PyArrayObject *)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/generated.pyx":4791 * object fv * * n = len(idx0) # <<<<<<<<<<<<<< * k = len(idx1) * */ __pyx_t_4 = PyObject_Length(((PyObject *)__pyx_v_idx0)); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4791; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_4; /* "pandas/src/generated.pyx":4792 * * n = len(idx0) * k = len(idx1) # <<<<<<<<<<<<<< * * fv = fill_value */ __pyx_t_4 = PyObject_Length(((PyObject *)__pyx_v_idx1)); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4792; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_k = __pyx_t_4; /* "pandas/src/generated.pyx":4794 * k = len(idx1) * * fv = fill_value # <<<<<<<<<<<<<< * for i from 0 <= i < n: * idx = idx0[i] */ __Pyx_INCREF(__pyx_v_fill_value); __pyx_v_fv = __pyx_v_fill_value; /* "pandas/src/generated.pyx":4795 * * fv = fill_value * for i from 0 <= i < n: # <<<<<<<<<<<<<< * idx = idx0[i] * if idx == -1: */ __pyx_t_4 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_4; __pyx_v_i++) { /* "pandas/src/generated.pyx":4796 * fv = fill_value * for i from 0 <= i < n: * idx = idx0[i] # <<<<<<<<<<<<<< * if idx == -1: * for j from 0 <= j < k: */ __pyx_t_5 = __pyx_v_i; __pyx_v_idx = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_idx0.rcbuffer->pybuffer.buf, __pyx_t_5, __pyx_pybuffernd_idx0.diminfo[0].strides)); /* "pandas/src/generated.pyx":4797 * for i from 0 <= i < n: * idx = idx0[i] * if idx == -1: # <<<<<<<<<<<<<< * for j from 0 <= j < k: * out[i, j] = fv */ __pyx_t_6 = ((__pyx_v_idx == -1) != 0); if (__pyx_t_6) { /* "pandas/src/generated.pyx":4798 * idx = idx0[i] * if idx == -1: * for j from 0 <= j < k: # <<<<<<<<<<<<<< * out[i, j] = fv * else: */ __pyx_t_7 = __pyx_v_k; for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_7; __pyx_v_j++) { /* "pandas/src/generated.pyx":4799 * if idx == -1: * for j from 0 <= j < k: * out[i, j] = fv # <<<<<<<<<<<<<< * else: * for j from 0 <= j < k: */ __pyx_t_8 = __pyx_v_i; __pyx_t_9 = __pyx_v_j; __pyx_t_10 = __Pyx_BufPtrStrided2d(PyObject **, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_8, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_9, __pyx_pybuffernd_out.diminfo[1].strides); __Pyx_GOTREF(*__pyx_t_10); __Pyx_INCREF(__pyx_v_fv); __Pyx_DECREF(*__pyx_t_10); *__pyx_t_10 = __pyx_v_fv; __Pyx_GIVEREF(*__pyx_t_10); } goto __pyx_L5; } /*else*/ { /* "pandas/src/generated.pyx":4801 * out[i, j] = fv * else: * for j from 0 <= j < k: # <<<<<<<<<<<<<< * if idx1[j] == -1: * out[i, j] = fv */ __pyx_t_7 = __pyx_v_k; for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_7; __pyx_v_j++) { /* "pandas/src/generated.pyx":4802 * else: * for j from 0 <= j < k: * if idx1[j] == -1: # <<<<<<<<<<<<<< * out[i, j] = fv * else: */ __pyx_t_11 = __pyx_v_j; __pyx_t_6 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_idx1.rcbuffer->pybuffer.buf, __pyx_t_11, __pyx_pybuffernd_idx1.diminfo[0].strides)) == -1) != 0); if (__pyx_t_6) { /* "pandas/src/generated.pyx":4803 * for j from 0 <= j < k: * if idx1[j] == -1: * out[i, j] = fv # <<<<<<<<<<<<<< * else: * out[i, j] = values[idx, idx1[j]] */ __pyx_t_12 = __pyx_v_i; __pyx_t_13 = __pyx_v_j; __pyx_t_10 = __Pyx_BufPtrStrided2d(PyObject **, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_12, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_13, __pyx_pybuffernd_out.diminfo[1].strides); __Pyx_GOTREF(*__pyx_t_10); __Pyx_INCREF(__pyx_v_fv); __Pyx_DECREF(*__pyx_t_10); *__pyx_t_10 = __pyx_v_fv; __Pyx_GIVEREF(*__pyx_t_10); goto __pyx_L10; } /*else*/ { /* "pandas/src/generated.pyx":4805 * out[i, j] = fv * else: * out[i, j] = values[idx, idx1[j]] # <<<<<<<<<<<<<< * * */ __pyx_t_14 = __pyx_v_j; __pyx_t_15 = __pyx_v_idx; __pyx_t_16 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_idx1.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_idx1.diminfo[0].strides)); __pyx_t_1 = (PyObject *) *__Pyx_BufPtrStrided2d(PyObject **, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_16, __pyx_pybuffernd_values.diminfo[1].strides); __Pyx_INCREF((PyObject*)__pyx_t_1); __pyx_t_17 = __pyx_v_i; __pyx_t_18 = __pyx_v_j; __pyx_t_10 = __Pyx_BufPtrStrided2d(PyObject **, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_18, __pyx_pybuffernd_out.diminfo[1].strides); __Pyx_GOTREF(*__pyx_t_10); __Pyx_INCREF(__pyx_t_1); __Pyx_DECREF(*__pyx_t_10); *__pyx_t_10 = __pyx_t_1; __Pyx_GIVEREF(*__pyx_t_10); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } __pyx_L10:; } } __pyx_L5:; } __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_idx0.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_idx1.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.take_2d_multi_object_object", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_idx0.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_idx1.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_idx0); __Pyx_XDECREF((PyObject *)__pyx_v_idx1); __Pyx_XDECREF(__pyx_v_fv); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_375diff_2d_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_375diff_2d_float64 = {__Pyx_NAMESTR("diff_2d_float64"), (PyCFunction)__pyx_pw_6pandas_5algos_375diff_2d_float64, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_375diff_2d_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_arr = 0; PyArrayObject *__pyx_v_out = 0; Py_ssize_t __pyx_v_periods; int __pyx_v_axis; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("diff_2d_float64 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__arr,&__pyx_n_s__out,&__pyx_n_s__periods,&__pyx_n_s__axis,0}; PyObject* values[4] = {0,0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__arr)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__out)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("diff_2d_float64", 1, 4, 4, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4810; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__periods)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("diff_2d_float64", 1, 4, 4, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4810; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__axis)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("diff_2d_float64", 1, 4, 4, 3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4810; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "diff_2d_float64") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4810; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 4) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[3] = PyTuple_GET_ITEM(__pyx_args, 3); } __pyx_v_arr = ((PyArrayObject *)values[0]); __pyx_v_out = ((PyArrayObject *)values[1]); __pyx_v_periods = __Pyx_PyIndex_AsSsize_t(values[2]); if (unlikely((__pyx_v_periods == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4812; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_axis = __Pyx_PyInt_AsInt(values[3]); if (unlikely((__pyx_v_axis == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4812; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("diff_2d_float64", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4810; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.diff_2d_float64", __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_filename = __pyx_f[2]; __pyx_lineno = 4810; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_5numpy_ndarray, 1, "out", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4811; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_374diff_2d_float64(__pyx_self, __pyx_v_arr, __pyx_v_out, __pyx_v_periods, __pyx_v_axis); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":4810 * @cython.boundscheck(False) * @cython.wraparound(False) * def diff_2d_float64(ndarray[float64_t, ndim=2] arr, # <<<<<<<<<<<<<< * ndarray[float64_t, ndim=2] out, * Py_ssize_t periods, int axis): */ static PyObject *__pyx_pf_6pandas_5algos_374diff_2d_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_arr, PyArrayObject *__pyx_v_out, Py_ssize_t __pyx_v_periods, int __pyx_v_axis) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_sx; Py_ssize_t __pyx_v_sy; Py_ssize_t __pyx_v_start; Py_ssize_t __pyx_v_stop; __Pyx_LocalBuf_ND __pyx_pybuffernd_arr; __Pyx_Buffer __pyx_pybuffer_arr; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; 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 *); Py_ssize_t __pyx_t_6; Py_ssize_t __pyx_t_7; int __pyx_t_8; Py_ssize_t __pyx_t_9; Py_ssize_t __pyx_t_10; Py_ssize_t __pyx_t_11; Py_ssize_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; 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("diff_2d_float64", 0); __pyx_pybuffer_arr.pybuffer.buf = NULL; __pyx_pybuffer_arr.refcount = 0; __pyx_pybuffernd_arr.data = NULL; __pyx_pybuffernd_arr.rcbuffer = &__pyx_pybuffer_arr; __pyx_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_arr.rcbuffer->pybuffer, (PyObject*)__pyx_v_arr, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4810; __pyx_clineno = __LINE__; goto __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]; __pyx_pybuffernd_arr.diminfo[1].strides = __pyx_pybuffernd_arr.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_arr.diminfo[1].shape = __pyx_pybuffernd_arr.rcbuffer->pybuffer.shape[1]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; 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, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4810; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; __pyx_pybuffernd_out.diminfo[1].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_out.diminfo[1].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[1]; /* "pandas/src/generated.pyx":4816 * Py_ssize_t i, j, sx, sy * * sx, sy = ( arr).shape # <<<<<<<<<<<<<< * if arr.flags.f_contiguous: * if axis == 0: */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_arr), __pyx_n_s__shape); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4816; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) { PyObject* sequence = __pyx_t_1; #if CYTHON_COMPILING_IN_CPYTHON Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4816; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1); } else { __pyx_t_2 = PyList_GET_ITEM(sequence, 0); __pyx_t_3 = PyList_GET_ITEM(sequence, 1); } __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); #else __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4816; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4816; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } else { Py_ssize_t index = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4816; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_5 = Py_TYPE(__pyx_t_4)->tp_iternext; index = 0; __pyx_t_2 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_2)) goto __pyx_L3_unpacking_failed; __Pyx_GOTREF(__pyx_t_2); index = 1; __pyx_t_3 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_3)) goto __pyx_L3_unpacking_failed; __Pyx_GOTREF(__pyx_t_3); if (__Pyx_IternextUnpackEndCheck(__pyx_t_5(__pyx_t_4), 2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4816; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 4816; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_L4_unpacking_done:; } __pyx_t_6 = __Pyx_PyIndex_AsSsize_t(__pyx_t_2); if (unlikely((__pyx_t_6 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4816; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_7 = __Pyx_PyIndex_AsSsize_t(__pyx_t_3); if (unlikely((__pyx_t_7 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4816; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_sx = __pyx_t_6; __pyx_v_sy = __pyx_t_7; /* "pandas/src/generated.pyx":4817 * * sx, sy = ( arr).shape * if arr.flags.f_contiguous: # <<<<<<<<<<<<<< * if axis == 0: * if periods >= 0: */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_arr), __pyx_n_s__flags); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4817; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s__f_contiguous); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4817; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4817; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_8) { /* "pandas/src/generated.pyx":4818 * sx, sy = ( arr).shape * if arr.flags.f_contiguous: * if axis == 0: # <<<<<<<<<<<<<< * if periods >= 0: * start, stop = periods, sx */ __pyx_t_8 = ((__pyx_v_axis == 0) != 0); if (__pyx_t_8) { /* "pandas/src/generated.pyx":4819 * if arr.flags.f_contiguous: * if axis == 0: * if periods >= 0: # <<<<<<<<<<<<<< * start, stop = periods, sx * else: */ __pyx_t_8 = ((__pyx_v_periods >= 0) != 0); if (__pyx_t_8) { /* "pandas/src/generated.pyx":4820 * if axis == 0: * if periods >= 0: * start, stop = periods, sx # <<<<<<<<<<<<<< * else: * start, stop = 0, sx + periods */ __pyx_t_7 = __pyx_v_periods; __pyx_t_6 = __pyx_v_sx; __pyx_v_start = __pyx_t_7; __pyx_v_stop = __pyx_t_6; goto __pyx_L7; } /*else*/ { /* "pandas/src/generated.pyx":4822 * start, stop = periods, sx * else: * start, stop = 0, sx + periods # <<<<<<<<<<<<<< * for j in range(sy): * for i in range(start, stop): */ __pyx_t_6 = 0; __pyx_t_7 = (__pyx_v_sx + __pyx_v_periods); __pyx_v_start = __pyx_t_6; __pyx_v_stop = __pyx_t_7; } __pyx_L7:; /* "pandas/src/generated.pyx":4823 * else: * start, stop = 0, sx + periods * for j in range(sy): # <<<<<<<<<<<<<< * for i in range(start, stop): * out[i, j] = arr[i, j] - arr[i - periods, j] */ __pyx_t_7 = __pyx_v_sy; for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_7; __pyx_t_6+=1) { __pyx_v_j = __pyx_t_6; /* "pandas/src/generated.pyx":4824 * start, stop = 0, sx + periods * for j in range(sy): * for i in range(start, stop): # <<<<<<<<<<<<<< * out[i, j] = arr[i, j] - arr[i - periods, j] * else: */ __pyx_t_9 = __pyx_v_stop; for (__pyx_t_10 = __pyx_v_start; __pyx_t_10 < __pyx_t_9; __pyx_t_10+=1) { __pyx_v_i = __pyx_t_10; /* "pandas/src/generated.pyx":4825 * for j in range(sy): * for i in range(start, stop): * out[i, j] = arr[i, j] - arr[i - periods, j] # <<<<<<<<<<<<<< * else: * if periods >= 0: */ __pyx_t_11 = __pyx_v_i; __pyx_t_12 = __pyx_v_j; __pyx_t_13 = (__pyx_v_i - __pyx_v_periods); __pyx_t_14 = __pyx_v_j; __pyx_t_15 = __pyx_v_i; __pyx_t_16 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_16, __pyx_pybuffernd_out.diminfo[1].strides) = ((*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_arr.rcbuffer->pybuffer.buf, __pyx_t_11, __pyx_pybuffernd_arr.diminfo[0].strides, __pyx_t_12, __pyx_pybuffernd_arr.diminfo[1].strides)) - (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_arr.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_arr.diminfo[0].strides, __pyx_t_14, __pyx_pybuffernd_arr.diminfo[1].strides))); } } goto __pyx_L6; } /*else*/ { /* "pandas/src/generated.pyx":4827 * out[i, j] = arr[i, j] - arr[i - periods, j] * else: * if periods >= 0: # <<<<<<<<<<<<<< * start, stop = periods, sy * else: */ __pyx_t_8 = ((__pyx_v_periods >= 0) != 0); if (__pyx_t_8) { /* "pandas/src/generated.pyx":4828 * else: * if periods >= 0: * start, stop = periods, sy # <<<<<<<<<<<<<< * else: * start, stop = 0, sy + periods */ __pyx_t_7 = __pyx_v_periods; __pyx_t_6 = __pyx_v_sy; __pyx_v_start = __pyx_t_7; __pyx_v_stop = __pyx_t_6; goto __pyx_L12; } /*else*/ { /* "pandas/src/generated.pyx":4830 * start, stop = periods, sy * else: * start, stop = 0, sy + periods # <<<<<<<<<<<<<< * for j in range(start, stop): * for i in range(sx): */ __pyx_t_6 = 0; __pyx_t_7 = (__pyx_v_sy + __pyx_v_periods); __pyx_v_start = __pyx_t_6; __pyx_v_stop = __pyx_t_7; } __pyx_L12:; /* "pandas/src/generated.pyx":4831 * else: * start, stop = 0, sy + periods * for j in range(start, stop): # <<<<<<<<<<<<<< * for i in range(sx): * out[i, j] = arr[i, j] - arr[i, j - periods] */ __pyx_t_7 = __pyx_v_stop; for (__pyx_t_6 = __pyx_v_start; __pyx_t_6 < __pyx_t_7; __pyx_t_6+=1) { __pyx_v_j = __pyx_t_6; /* "pandas/src/generated.pyx":4832 * start, stop = 0, sy + periods * for j in range(start, stop): * for i in range(sx): # <<<<<<<<<<<<<< * out[i, j] = arr[i, j] - arr[i, j - periods] * else: */ __pyx_t_9 = __pyx_v_sx; for (__pyx_t_10 = 0; __pyx_t_10 < __pyx_t_9; __pyx_t_10+=1) { __pyx_v_i = __pyx_t_10; /* "pandas/src/generated.pyx":4833 * for j in range(start, stop): * for i in range(sx): * out[i, j] = arr[i, j] - arr[i, j - periods] # <<<<<<<<<<<<<< * else: * if axis == 0: */ __pyx_t_17 = __pyx_v_i; __pyx_t_18 = __pyx_v_j; __pyx_t_19 = __pyx_v_i; __pyx_t_20 = (__pyx_v_j - __pyx_v_periods); __pyx_t_21 = __pyx_v_i; __pyx_t_22 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_22, __pyx_pybuffernd_out.diminfo[1].strides) = ((*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_arr.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_arr.diminfo[0].strides, __pyx_t_18, __pyx_pybuffernd_arr.diminfo[1].strides)) - (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_arr.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_arr.diminfo[0].strides, __pyx_t_20, __pyx_pybuffernd_arr.diminfo[1].strides))); } } } __pyx_L6:; goto __pyx_L5; } /*else*/ { /* "pandas/src/generated.pyx":4835 * out[i, j] = arr[i, j] - arr[i, j - periods] * else: * if axis == 0: # <<<<<<<<<<<<<< * if periods >= 0: * start, stop = periods, sx */ __pyx_t_8 = ((__pyx_v_axis == 0) != 0); if (__pyx_t_8) { /* "pandas/src/generated.pyx":4836 * else: * if axis == 0: * if periods >= 0: # <<<<<<<<<<<<<< * start, stop = periods, sx * else: */ __pyx_t_8 = ((__pyx_v_periods >= 0) != 0); if (__pyx_t_8) { /* "pandas/src/generated.pyx":4837 * if axis == 0: * if periods >= 0: * start, stop = periods, sx # <<<<<<<<<<<<<< * else: * start, stop = 0, sx + periods */ __pyx_t_7 = __pyx_v_periods; __pyx_t_6 = __pyx_v_sx; __pyx_v_start = __pyx_t_7; __pyx_v_stop = __pyx_t_6; goto __pyx_L18; } /*else*/ { /* "pandas/src/generated.pyx":4839 * start, stop = periods, sx * else: * start, stop = 0, sx + periods # <<<<<<<<<<<<<< * for i in range(start, stop): * for j in range(sy): */ __pyx_t_6 = 0; __pyx_t_7 = (__pyx_v_sx + __pyx_v_periods); __pyx_v_start = __pyx_t_6; __pyx_v_stop = __pyx_t_7; } __pyx_L18:; /* "pandas/src/generated.pyx":4840 * else: * start, stop = 0, sx + periods * for i in range(start, stop): # <<<<<<<<<<<<<< * for j in range(sy): * out[i, j] = arr[i, j] - arr[i - periods, j] */ __pyx_t_7 = __pyx_v_stop; for (__pyx_t_6 = __pyx_v_start; __pyx_t_6 < __pyx_t_7; __pyx_t_6+=1) { __pyx_v_i = __pyx_t_6; /* "pandas/src/generated.pyx":4841 * start, stop = 0, sx + periods * for i in range(start, stop): * for j in range(sy): # <<<<<<<<<<<<<< * out[i, j] = arr[i, j] - arr[i - periods, j] * else: */ __pyx_t_9 = __pyx_v_sy; for (__pyx_t_10 = 0; __pyx_t_10 < __pyx_t_9; __pyx_t_10+=1) { __pyx_v_j = __pyx_t_10; /* "pandas/src/generated.pyx":4842 * for i in range(start, stop): * for j in range(sy): * out[i, j] = arr[i, j] - arr[i - periods, j] # <<<<<<<<<<<<<< * else: * if periods >= 0: */ __pyx_t_23 = __pyx_v_i; __pyx_t_24 = __pyx_v_j; __pyx_t_25 = (__pyx_v_i - __pyx_v_periods); __pyx_t_26 = __pyx_v_j; __pyx_t_27 = __pyx_v_i; __pyx_t_28 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_27, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_28, __pyx_pybuffernd_out.diminfo[1].strides) = ((*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_arr.rcbuffer->pybuffer.buf, __pyx_t_23, __pyx_pybuffernd_arr.diminfo[0].strides, __pyx_t_24, __pyx_pybuffernd_arr.diminfo[1].strides)) - (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_arr.rcbuffer->pybuffer.buf, __pyx_t_25, __pyx_pybuffernd_arr.diminfo[0].strides, __pyx_t_26, __pyx_pybuffernd_arr.diminfo[1].strides))); } } goto __pyx_L17; } /*else*/ { /* "pandas/src/generated.pyx":4844 * out[i, j] = arr[i, j] - arr[i - periods, j] * else: * if periods >= 0: # <<<<<<<<<<<<<< * start, stop = periods, sy * else: */ __pyx_t_8 = ((__pyx_v_periods >= 0) != 0); if (__pyx_t_8) { /* "pandas/src/generated.pyx":4845 * else: * if periods >= 0: * start, stop = periods, sy # <<<<<<<<<<<<<< * else: * start, stop = 0, sy + periods */ __pyx_t_7 = __pyx_v_periods; __pyx_t_6 = __pyx_v_sy; __pyx_v_start = __pyx_t_7; __pyx_v_stop = __pyx_t_6; goto __pyx_L23; } /*else*/ { /* "pandas/src/generated.pyx":4847 * start, stop = periods, sy * else: * start, stop = 0, sy + periods # <<<<<<<<<<<<<< * for i in range(sx): * for j in range(start, stop): */ __pyx_t_6 = 0; __pyx_t_7 = (__pyx_v_sy + __pyx_v_periods); __pyx_v_start = __pyx_t_6; __pyx_v_stop = __pyx_t_7; } __pyx_L23:; /* "pandas/src/generated.pyx":4848 * else: * start, stop = 0, sy + periods * for i in range(sx): # <<<<<<<<<<<<<< * for j in range(start, stop): * out[i, j] = arr[i, j] - arr[i, j - periods] */ __pyx_t_7 = __pyx_v_sx; for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_7; __pyx_t_6+=1) { __pyx_v_i = __pyx_t_6; /* "pandas/src/generated.pyx":4849 * start, stop = 0, sy + periods * for i in range(sx): * for j in range(start, stop): # <<<<<<<<<<<<<< * out[i, j] = arr[i, j] - arr[i, j - periods] * @cython.boundscheck(False) */ __pyx_t_9 = __pyx_v_stop; for (__pyx_t_10 = __pyx_v_start; __pyx_t_10 < __pyx_t_9; __pyx_t_10+=1) { __pyx_v_j = __pyx_t_10; /* "pandas/src/generated.pyx":4850 * for i in range(sx): * for j in range(start, stop): * out[i, j] = arr[i, j] - arr[i, j - periods] # <<<<<<<<<<<<<< * @cython.boundscheck(False) * @cython.wraparound(False) */ __pyx_t_29 = __pyx_v_i; __pyx_t_30 = __pyx_v_j; __pyx_t_31 = __pyx_v_i; __pyx_t_32 = (__pyx_v_j - __pyx_v_periods); __pyx_t_33 = __pyx_v_i; __pyx_t_34 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_33, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_34, __pyx_pybuffernd_out.diminfo[1].strides) = ((*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_arr.rcbuffer->pybuffer.buf, __pyx_t_29, __pyx_pybuffernd_arr.diminfo[0].strides, __pyx_t_30, __pyx_pybuffernd_arr.diminfo[1].strides)) - (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_arr.rcbuffer->pybuffer.buf, __pyx_t_31, __pyx_pybuffernd_arr.diminfo[0].strides, __pyx_t_32, __pyx_pybuffernd_arr.diminfo[1].strides))); } } } __pyx_L17:; } __pyx_L5:; __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_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_arr.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.diff_2d_float64", __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_out.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_377diff_2d_float32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_377diff_2d_float32 = {__Pyx_NAMESTR("diff_2d_float32"), (PyCFunction)__pyx_pw_6pandas_5algos_377diff_2d_float32, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_377diff_2d_float32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_arr = 0; PyArrayObject *__pyx_v_out = 0; Py_ssize_t __pyx_v_periods; int __pyx_v_axis; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("diff_2d_float32 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__arr,&__pyx_n_s__out,&__pyx_n_s__periods,&__pyx_n_s__axis,0}; PyObject* values[4] = {0,0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__arr)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__out)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("diff_2d_float32", 1, 4, 4, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4853; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__periods)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("diff_2d_float32", 1, 4, 4, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4853; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__axis)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("diff_2d_float32", 1, 4, 4, 3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4853; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "diff_2d_float32") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4853; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 4) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[3] = PyTuple_GET_ITEM(__pyx_args, 3); } __pyx_v_arr = ((PyArrayObject *)values[0]); __pyx_v_out = ((PyArrayObject *)values[1]); __pyx_v_periods = __Pyx_PyIndex_AsSsize_t(values[2]); if (unlikely((__pyx_v_periods == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4855; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_axis = __Pyx_PyInt_AsInt(values[3]); if (unlikely((__pyx_v_axis == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4855; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("diff_2d_float32", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4853; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.diff_2d_float32", __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_filename = __pyx_f[2]; __pyx_lineno = 4853; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_5numpy_ndarray, 1, "out", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4854; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_376diff_2d_float32(__pyx_self, __pyx_v_arr, __pyx_v_out, __pyx_v_periods, __pyx_v_axis); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":4853 * @cython.boundscheck(False) * @cython.wraparound(False) * def diff_2d_float32(ndarray[float32_t, ndim=2] arr, # <<<<<<<<<<<<<< * ndarray[float32_t, ndim=2] out, * Py_ssize_t periods, int axis): */ static PyObject *__pyx_pf_6pandas_5algos_376diff_2d_float32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_arr, PyArrayObject *__pyx_v_out, Py_ssize_t __pyx_v_periods, int __pyx_v_axis) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_sx; Py_ssize_t __pyx_v_sy; Py_ssize_t __pyx_v_start; Py_ssize_t __pyx_v_stop; __Pyx_LocalBuf_ND __pyx_pybuffernd_arr; __Pyx_Buffer __pyx_pybuffer_arr; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; 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 *); Py_ssize_t __pyx_t_6; Py_ssize_t __pyx_t_7; int __pyx_t_8; Py_ssize_t __pyx_t_9; Py_ssize_t __pyx_t_10; Py_ssize_t __pyx_t_11; Py_ssize_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; 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("diff_2d_float32", 0); __pyx_pybuffer_arr.pybuffer.buf = NULL; __pyx_pybuffer_arr.refcount = 0; __pyx_pybuffernd_arr.data = NULL; __pyx_pybuffernd_arr.rcbuffer = &__pyx_pybuffer_arr; __pyx_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_arr.rcbuffer->pybuffer, (PyObject*)__pyx_v_arr, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4853; __pyx_clineno = __LINE__; goto __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]; __pyx_pybuffernd_arr.diminfo[1].strides = __pyx_pybuffernd_arr.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_arr.diminfo[1].shape = __pyx_pybuffernd_arr.rcbuffer->pybuffer.shape[1]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_v_out, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4853; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; __pyx_pybuffernd_out.diminfo[1].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_out.diminfo[1].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[1]; /* "pandas/src/generated.pyx":4859 * Py_ssize_t i, j, sx, sy * * sx, sy = ( arr).shape # <<<<<<<<<<<<<< * if arr.flags.f_contiguous: * if axis == 0: */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_arr), __pyx_n_s__shape); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4859; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) { PyObject* sequence = __pyx_t_1; #if CYTHON_COMPILING_IN_CPYTHON Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4859; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1); } else { __pyx_t_2 = PyList_GET_ITEM(sequence, 0); __pyx_t_3 = PyList_GET_ITEM(sequence, 1); } __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); #else __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4859; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4859; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } else { Py_ssize_t index = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4859; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_5 = Py_TYPE(__pyx_t_4)->tp_iternext; index = 0; __pyx_t_2 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_2)) goto __pyx_L3_unpacking_failed; __Pyx_GOTREF(__pyx_t_2); index = 1; __pyx_t_3 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_3)) goto __pyx_L3_unpacking_failed; __Pyx_GOTREF(__pyx_t_3); if (__Pyx_IternextUnpackEndCheck(__pyx_t_5(__pyx_t_4), 2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4859; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 4859; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_L4_unpacking_done:; } __pyx_t_6 = __Pyx_PyIndex_AsSsize_t(__pyx_t_2); if (unlikely((__pyx_t_6 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4859; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_7 = __Pyx_PyIndex_AsSsize_t(__pyx_t_3); if (unlikely((__pyx_t_7 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4859; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_sx = __pyx_t_6; __pyx_v_sy = __pyx_t_7; /* "pandas/src/generated.pyx":4860 * * sx, sy = ( arr).shape * if arr.flags.f_contiguous: # <<<<<<<<<<<<<< * if axis == 0: * if periods >= 0: */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_arr), __pyx_n_s__flags); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4860; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s__f_contiguous); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4860; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4860; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_8) { /* "pandas/src/generated.pyx":4861 * sx, sy = ( arr).shape * if arr.flags.f_contiguous: * if axis == 0: # <<<<<<<<<<<<<< * if periods >= 0: * start, stop = periods, sx */ __pyx_t_8 = ((__pyx_v_axis == 0) != 0); if (__pyx_t_8) { /* "pandas/src/generated.pyx":4862 * if arr.flags.f_contiguous: * if axis == 0: * if periods >= 0: # <<<<<<<<<<<<<< * start, stop = periods, sx * else: */ __pyx_t_8 = ((__pyx_v_periods >= 0) != 0); if (__pyx_t_8) { /* "pandas/src/generated.pyx":4863 * if axis == 0: * if periods >= 0: * start, stop = periods, sx # <<<<<<<<<<<<<< * else: * start, stop = 0, sx + periods */ __pyx_t_7 = __pyx_v_periods; __pyx_t_6 = __pyx_v_sx; __pyx_v_start = __pyx_t_7; __pyx_v_stop = __pyx_t_6; goto __pyx_L7; } /*else*/ { /* "pandas/src/generated.pyx":4865 * start, stop = periods, sx * else: * start, stop = 0, sx + periods # <<<<<<<<<<<<<< * for j in range(sy): * for i in range(start, stop): */ __pyx_t_6 = 0; __pyx_t_7 = (__pyx_v_sx + __pyx_v_periods); __pyx_v_start = __pyx_t_6; __pyx_v_stop = __pyx_t_7; } __pyx_L7:; /* "pandas/src/generated.pyx":4866 * else: * start, stop = 0, sx + periods * for j in range(sy): # <<<<<<<<<<<<<< * for i in range(start, stop): * out[i, j] = arr[i, j] - arr[i - periods, j] */ __pyx_t_7 = __pyx_v_sy; for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_7; __pyx_t_6+=1) { __pyx_v_j = __pyx_t_6; /* "pandas/src/generated.pyx":4867 * start, stop = 0, sx + periods * for j in range(sy): * for i in range(start, stop): # <<<<<<<<<<<<<< * out[i, j] = arr[i, j] - arr[i - periods, j] * else: */ __pyx_t_9 = __pyx_v_stop; for (__pyx_t_10 = __pyx_v_start; __pyx_t_10 < __pyx_t_9; __pyx_t_10+=1) { __pyx_v_i = __pyx_t_10; /* "pandas/src/generated.pyx":4868 * for j in range(sy): * for i in range(start, stop): * out[i, j] = arr[i, j] - arr[i - periods, j] # <<<<<<<<<<<<<< * else: * if periods >= 0: */ __pyx_t_11 = __pyx_v_i; __pyx_t_12 = __pyx_v_j; __pyx_t_13 = (__pyx_v_i - __pyx_v_periods); __pyx_t_14 = __pyx_v_j; __pyx_t_15 = __pyx_v_i; __pyx_t_16 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_16, __pyx_pybuffernd_out.diminfo[1].strides) = ((*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_arr.rcbuffer->pybuffer.buf, __pyx_t_11, __pyx_pybuffernd_arr.diminfo[0].strides, __pyx_t_12, __pyx_pybuffernd_arr.diminfo[1].strides)) - (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_arr.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_arr.diminfo[0].strides, __pyx_t_14, __pyx_pybuffernd_arr.diminfo[1].strides))); } } goto __pyx_L6; } /*else*/ { /* "pandas/src/generated.pyx":4870 * out[i, j] = arr[i, j] - arr[i - periods, j] * else: * if periods >= 0: # <<<<<<<<<<<<<< * start, stop = periods, sy * else: */ __pyx_t_8 = ((__pyx_v_periods >= 0) != 0); if (__pyx_t_8) { /* "pandas/src/generated.pyx":4871 * else: * if periods >= 0: * start, stop = periods, sy # <<<<<<<<<<<<<< * else: * start, stop = 0, sy + periods */ __pyx_t_7 = __pyx_v_periods; __pyx_t_6 = __pyx_v_sy; __pyx_v_start = __pyx_t_7; __pyx_v_stop = __pyx_t_6; goto __pyx_L12; } /*else*/ { /* "pandas/src/generated.pyx":4873 * start, stop = periods, sy * else: * start, stop = 0, sy + periods # <<<<<<<<<<<<<< * for j in range(start, stop): * for i in range(sx): */ __pyx_t_6 = 0; __pyx_t_7 = (__pyx_v_sy + __pyx_v_periods); __pyx_v_start = __pyx_t_6; __pyx_v_stop = __pyx_t_7; } __pyx_L12:; /* "pandas/src/generated.pyx":4874 * else: * start, stop = 0, sy + periods * for j in range(start, stop): # <<<<<<<<<<<<<< * for i in range(sx): * out[i, j] = arr[i, j] - arr[i, j - periods] */ __pyx_t_7 = __pyx_v_stop; for (__pyx_t_6 = __pyx_v_start; __pyx_t_6 < __pyx_t_7; __pyx_t_6+=1) { __pyx_v_j = __pyx_t_6; /* "pandas/src/generated.pyx":4875 * start, stop = 0, sy + periods * for j in range(start, stop): * for i in range(sx): # <<<<<<<<<<<<<< * out[i, j] = arr[i, j] - arr[i, j - periods] * else: */ __pyx_t_9 = __pyx_v_sx; for (__pyx_t_10 = 0; __pyx_t_10 < __pyx_t_9; __pyx_t_10+=1) { __pyx_v_i = __pyx_t_10; /* "pandas/src/generated.pyx":4876 * for j in range(start, stop): * for i in range(sx): * out[i, j] = arr[i, j] - arr[i, j - periods] # <<<<<<<<<<<<<< * else: * if axis == 0: */ __pyx_t_17 = __pyx_v_i; __pyx_t_18 = __pyx_v_j; __pyx_t_19 = __pyx_v_i; __pyx_t_20 = (__pyx_v_j - __pyx_v_periods); __pyx_t_21 = __pyx_v_i; __pyx_t_22 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_22, __pyx_pybuffernd_out.diminfo[1].strides) = ((*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_arr.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_arr.diminfo[0].strides, __pyx_t_18, __pyx_pybuffernd_arr.diminfo[1].strides)) - (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_arr.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_arr.diminfo[0].strides, __pyx_t_20, __pyx_pybuffernd_arr.diminfo[1].strides))); } } } __pyx_L6:; goto __pyx_L5; } /*else*/ { /* "pandas/src/generated.pyx":4878 * out[i, j] = arr[i, j] - arr[i, j - periods] * else: * if axis == 0: # <<<<<<<<<<<<<< * if periods >= 0: * start, stop = periods, sx */ __pyx_t_8 = ((__pyx_v_axis == 0) != 0); if (__pyx_t_8) { /* "pandas/src/generated.pyx":4879 * else: * if axis == 0: * if periods >= 0: # <<<<<<<<<<<<<< * start, stop = periods, sx * else: */ __pyx_t_8 = ((__pyx_v_periods >= 0) != 0); if (__pyx_t_8) { /* "pandas/src/generated.pyx":4880 * if axis == 0: * if periods >= 0: * start, stop = periods, sx # <<<<<<<<<<<<<< * else: * start, stop = 0, sx + periods */ __pyx_t_7 = __pyx_v_periods; __pyx_t_6 = __pyx_v_sx; __pyx_v_start = __pyx_t_7; __pyx_v_stop = __pyx_t_6; goto __pyx_L18; } /*else*/ { /* "pandas/src/generated.pyx":4882 * start, stop = periods, sx * else: * start, stop = 0, sx + periods # <<<<<<<<<<<<<< * for i in range(start, stop): * for j in range(sy): */ __pyx_t_6 = 0; __pyx_t_7 = (__pyx_v_sx + __pyx_v_periods); __pyx_v_start = __pyx_t_6; __pyx_v_stop = __pyx_t_7; } __pyx_L18:; /* "pandas/src/generated.pyx":4883 * else: * start, stop = 0, sx + periods * for i in range(start, stop): # <<<<<<<<<<<<<< * for j in range(sy): * out[i, j] = arr[i, j] - arr[i - periods, j] */ __pyx_t_7 = __pyx_v_stop; for (__pyx_t_6 = __pyx_v_start; __pyx_t_6 < __pyx_t_7; __pyx_t_6+=1) { __pyx_v_i = __pyx_t_6; /* "pandas/src/generated.pyx":4884 * start, stop = 0, sx + periods * for i in range(start, stop): * for j in range(sy): # <<<<<<<<<<<<<< * out[i, j] = arr[i, j] - arr[i - periods, j] * else: */ __pyx_t_9 = __pyx_v_sy; for (__pyx_t_10 = 0; __pyx_t_10 < __pyx_t_9; __pyx_t_10+=1) { __pyx_v_j = __pyx_t_10; /* "pandas/src/generated.pyx":4885 * for i in range(start, stop): * for j in range(sy): * out[i, j] = arr[i, j] - arr[i - periods, j] # <<<<<<<<<<<<<< * else: * if periods >= 0: */ __pyx_t_23 = __pyx_v_i; __pyx_t_24 = __pyx_v_j; __pyx_t_25 = (__pyx_v_i - __pyx_v_periods); __pyx_t_26 = __pyx_v_j; __pyx_t_27 = __pyx_v_i; __pyx_t_28 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_27, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_28, __pyx_pybuffernd_out.diminfo[1].strides) = ((*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_arr.rcbuffer->pybuffer.buf, __pyx_t_23, __pyx_pybuffernd_arr.diminfo[0].strides, __pyx_t_24, __pyx_pybuffernd_arr.diminfo[1].strides)) - (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_arr.rcbuffer->pybuffer.buf, __pyx_t_25, __pyx_pybuffernd_arr.diminfo[0].strides, __pyx_t_26, __pyx_pybuffernd_arr.diminfo[1].strides))); } } goto __pyx_L17; } /*else*/ { /* "pandas/src/generated.pyx":4887 * out[i, j] = arr[i, j] - arr[i - periods, j] * else: * if periods >= 0: # <<<<<<<<<<<<<< * start, stop = periods, sy * else: */ __pyx_t_8 = ((__pyx_v_periods >= 0) != 0); if (__pyx_t_8) { /* "pandas/src/generated.pyx":4888 * else: * if periods >= 0: * start, stop = periods, sy # <<<<<<<<<<<<<< * else: * start, stop = 0, sy + periods */ __pyx_t_7 = __pyx_v_periods; __pyx_t_6 = __pyx_v_sy; __pyx_v_start = __pyx_t_7; __pyx_v_stop = __pyx_t_6; goto __pyx_L23; } /*else*/ { /* "pandas/src/generated.pyx":4890 * start, stop = periods, sy * else: * start, stop = 0, sy + periods # <<<<<<<<<<<<<< * for i in range(sx): * for j in range(start, stop): */ __pyx_t_6 = 0; __pyx_t_7 = (__pyx_v_sy + __pyx_v_periods); __pyx_v_start = __pyx_t_6; __pyx_v_stop = __pyx_t_7; } __pyx_L23:; /* "pandas/src/generated.pyx":4891 * else: * start, stop = 0, sy + periods * for i in range(sx): # <<<<<<<<<<<<<< * for j in range(start, stop): * out[i, j] = arr[i, j] - arr[i, j - periods] */ __pyx_t_7 = __pyx_v_sx; for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_7; __pyx_t_6+=1) { __pyx_v_i = __pyx_t_6; /* "pandas/src/generated.pyx":4892 * start, stop = 0, sy + periods * for i in range(sx): * for j in range(start, stop): # <<<<<<<<<<<<<< * out[i, j] = arr[i, j] - arr[i, j - periods] * @cython.boundscheck(False) */ __pyx_t_9 = __pyx_v_stop; for (__pyx_t_10 = __pyx_v_start; __pyx_t_10 < __pyx_t_9; __pyx_t_10+=1) { __pyx_v_j = __pyx_t_10; /* "pandas/src/generated.pyx":4893 * for i in range(sx): * for j in range(start, stop): * out[i, j] = arr[i, j] - arr[i, j - periods] # <<<<<<<<<<<<<< * @cython.boundscheck(False) * @cython.wraparound(False) */ __pyx_t_29 = __pyx_v_i; __pyx_t_30 = __pyx_v_j; __pyx_t_31 = __pyx_v_i; __pyx_t_32 = (__pyx_v_j - __pyx_v_periods); __pyx_t_33 = __pyx_v_i; __pyx_t_34 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_33, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_34, __pyx_pybuffernd_out.diminfo[1].strides) = ((*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_arr.rcbuffer->pybuffer.buf, __pyx_t_29, __pyx_pybuffernd_arr.diminfo[0].strides, __pyx_t_30, __pyx_pybuffernd_arr.diminfo[1].strides)) - (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_arr.rcbuffer->pybuffer.buf, __pyx_t_31, __pyx_pybuffernd_arr.diminfo[0].strides, __pyx_t_32, __pyx_pybuffernd_arr.diminfo[1].strides))); } } } __pyx_L17:; } __pyx_L5:; __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_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_arr.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.diff_2d_float32", __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_out.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_379diff_2d_int8(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_379diff_2d_int8 = {__Pyx_NAMESTR("diff_2d_int8"), (PyCFunction)__pyx_pw_6pandas_5algos_379diff_2d_int8, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_379diff_2d_int8(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_arr = 0; PyArrayObject *__pyx_v_out = 0; Py_ssize_t __pyx_v_periods; int __pyx_v_axis; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("diff_2d_int8 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__arr,&__pyx_n_s__out,&__pyx_n_s__periods,&__pyx_n_s__axis,0}; PyObject* values[4] = {0,0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__arr)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__out)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("diff_2d_int8", 1, 4, 4, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4896; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__periods)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("diff_2d_int8", 1, 4, 4, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4896; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__axis)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("diff_2d_int8", 1, 4, 4, 3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4896; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "diff_2d_int8") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4896; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 4) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[3] = PyTuple_GET_ITEM(__pyx_args, 3); } __pyx_v_arr = ((PyArrayObject *)values[0]); __pyx_v_out = ((PyArrayObject *)values[1]); __pyx_v_periods = __Pyx_PyIndex_AsSsize_t(values[2]); if (unlikely((__pyx_v_periods == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4898; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_axis = __Pyx_PyInt_AsInt(values[3]); if (unlikely((__pyx_v_axis == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4898; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("diff_2d_int8", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4896; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.diff_2d_int8", __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_filename = __pyx_f[2]; __pyx_lineno = 4896; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_5numpy_ndarray, 1, "out", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4897; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_378diff_2d_int8(__pyx_self, __pyx_v_arr, __pyx_v_out, __pyx_v_periods, __pyx_v_axis); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":4896 * @cython.boundscheck(False) * @cython.wraparound(False) * def diff_2d_int8(ndarray[int8_t, ndim=2] arr, # <<<<<<<<<<<<<< * ndarray[float32_t, ndim=2] out, * Py_ssize_t periods, int axis): */ static PyObject *__pyx_pf_6pandas_5algos_378diff_2d_int8(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_arr, PyArrayObject *__pyx_v_out, Py_ssize_t __pyx_v_periods, int __pyx_v_axis) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_sx; Py_ssize_t __pyx_v_sy; Py_ssize_t __pyx_v_start; Py_ssize_t __pyx_v_stop; __Pyx_LocalBuf_ND __pyx_pybuffernd_arr; __Pyx_Buffer __pyx_pybuffer_arr; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; 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 *); Py_ssize_t __pyx_t_6; Py_ssize_t __pyx_t_7; int __pyx_t_8; Py_ssize_t __pyx_t_9; Py_ssize_t __pyx_t_10; Py_ssize_t __pyx_t_11; Py_ssize_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; 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("diff_2d_int8", 0); __pyx_pybuffer_arr.pybuffer.buf = NULL; __pyx_pybuffer_arr.refcount = 0; __pyx_pybuffernd_arr.data = NULL; __pyx_pybuffernd_arr.rcbuffer = &__pyx_pybuffer_arr; __pyx_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_arr.rcbuffer->pybuffer, (PyObject*)__pyx_v_arr, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int8_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4896; __pyx_clineno = __LINE__; goto __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]; __pyx_pybuffernd_arr.diminfo[1].strides = __pyx_pybuffernd_arr.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_arr.diminfo[1].shape = __pyx_pybuffernd_arr.rcbuffer->pybuffer.shape[1]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_v_out, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4896; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; __pyx_pybuffernd_out.diminfo[1].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_out.diminfo[1].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[1]; /* "pandas/src/generated.pyx":4902 * Py_ssize_t i, j, sx, sy * * sx, sy = ( arr).shape # <<<<<<<<<<<<<< * if arr.flags.f_contiguous: * if axis == 0: */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_arr), __pyx_n_s__shape); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4902; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) { PyObject* sequence = __pyx_t_1; #if CYTHON_COMPILING_IN_CPYTHON Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4902; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1); } else { __pyx_t_2 = PyList_GET_ITEM(sequence, 0); __pyx_t_3 = PyList_GET_ITEM(sequence, 1); } __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); #else __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4902; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4902; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } else { Py_ssize_t index = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4902; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_5 = Py_TYPE(__pyx_t_4)->tp_iternext; index = 0; __pyx_t_2 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_2)) goto __pyx_L3_unpacking_failed; __Pyx_GOTREF(__pyx_t_2); index = 1; __pyx_t_3 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_3)) goto __pyx_L3_unpacking_failed; __Pyx_GOTREF(__pyx_t_3); if (__Pyx_IternextUnpackEndCheck(__pyx_t_5(__pyx_t_4), 2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4902; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 4902; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_L4_unpacking_done:; } __pyx_t_6 = __Pyx_PyIndex_AsSsize_t(__pyx_t_2); if (unlikely((__pyx_t_6 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4902; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_7 = __Pyx_PyIndex_AsSsize_t(__pyx_t_3); if (unlikely((__pyx_t_7 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4902; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_sx = __pyx_t_6; __pyx_v_sy = __pyx_t_7; /* "pandas/src/generated.pyx":4903 * * sx, sy = ( arr).shape * if arr.flags.f_contiguous: # <<<<<<<<<<<<<< * if axis == 0: * if periods >= 0: */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_arr), __pyx_n_s__flags); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4903; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s__f_contiguous); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4903; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4903; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_8) { /* "pandas/src/generated.pyx":4904 * sx, sy = ( arr).shape * if arr.flags.f_contiguous: * if axis == 0: # <<<<<<<<<<<<<< * if periods >= 0: * start, stop = periods, sx */ __pyx_t_8 = ((__pyx_v_axis == 0) != 0); if (__pyx_t_8) { /* "pandas/src/generated.pyx":4905 * if arr.flags.f_contiguous: * if axis == 0: * if periods >= 0: # <<<<<<<<<<<<<< * start, stop = periods, sx * else: */ __pyx_t_8 = ((__pyx_v_periods >= 0) != 0); if (__pyx_t_8) { /* "pandas/src/generated.pyx":4906 * if axis == 0: * if periods >= 0: * start, stop = periods, sx # <<<<<<<<<<<<<< * else: * start, stop = 0, sx + periods */ __pyx_t_7 = __pyx_v_periods; __pyx_t_6 = __pyx_v_sx; __pyx_v_start = __pyx_t_7; __pyx_v_stop = __pyx_t_6; goto __pyx_L7; } /*else*/ { /* "pandas/src/generated.pyx":4908 * start, stop = periods, sx * else: * start, stop = 0, sx + periods # <<<<<<<<<<<<<< * for j in range(sy): * for i in range(start, stop): */ __pyx_t_6 = 0; __pyx_t_7 = (__pyx_v_sx + __pyx_v_periods); __pyx_v_start = __pyx_t_6; __pyx_v_stop = __pyx_t_7; } __pyx_L7:; /* "pandas/src/generated.pyx":4909 * else: * start, stop = 0, sx + periods * for j in range(sy): # <<<<<<<<<<<<<< * for i in range(start, stop): * out[i, j] = arr[i, j] - arr[i - periods, j] */ __pyx_t_7 = __pyx_v_sy; for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_7; __pyx_t_6+=1) { __pyx_v_j = __pyx_t_6; /* "pandas/src/generated.pyx":4910 * start, stop = 0, sx + periods * for j in range(sy): * for i in range(start, stop): # <<<<<<<<<<<<<< * out[i, j] = arr[i, j] - arr[i - periods, j] * else: */ __pyx_t_9 = __pyx_v_stop; for (__pyx_t_10 = __pyx_v_start; __pyx_t_10 < __pyx_t_9; __pyx_t_10+=1) { __pyx_v_i = __pyx_t_10; /* "pandas/src/generated.pyx":4911 * for j in range(sy): * for i in range(start, stop): * out[i, j] = arr[i, j] - arr[i - periods, j] # <<<<<<<<<<<<<< * else: * if periods >= 0: */ __pyx_t_11 = __pyx_v_i; __pyx_t_12 = __pyx_v_j; __pyx_t_13 = (__pyx_v_i - __pyx_v_periods); __pyx_t_14 = __pyx_v_j; __pyx_t_15 = __pyx_v_i; __pyx_t_16 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_16, __pyx_pybuffernd_out.diminfo[1].strides) = ((*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int8_t *, __pyx_pybuffernd_arr.rcbuffer->pybuffer.buf, __pyx_t_11, __pyx_pybuffernd_arr.diminfo[0].strides, __pyx_t_12, __pyx_pybuffernd_arr.diminfo[1].strides)) - (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int8_t *, __pyx_pybuffernd_arr.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_arr.diminfo[0].strides, __pyx_t_14, __pyx_pybuffernd_arr.diminfo[1].strides))); } } goto __pyx_L6; } /*else*/ { /* "pandas/src/generated.pyx":4913 * out[i, j] = arr[i, j] - arr[i - periods, j] * else: * if periods >= 0: # <<<<<<<<<<<<<< * start, stop = periods, sy * else: */ __pyx_t_8 = ((__pyx_v_periods >= 0) != 0); if (__pyx_t_8) { /* "pandas/src/generated.pyx":4914 * else: * if periods >= 0: * start, stop = periods, sy # <<<<<<<<<<<<<< * else: * start, stop = 0, sy + periods */ __pyx_t_7 = __pyx_v_periods; __pyx_t_6 = __pyx_v_sy; __pyx_v_start = __pyx_t_7; __pyx_v_stop = __pyx_t_6; goto __pyx_L12; } /*else*/ { /* "pandas/src/generated.pyx":4916 * start, stop = periods, sy * else: * start, stop = 0, sy + periods # <<<<<<<<<<<<<< * for j in range(start, stop): * for i in range(sx): */ __pyx_t_6 = 0; __pyx_t_7 = (__pyx_v_sy + __pyx_v_periods); __pyx_v_start = __pyx_t_6; __pyx_v_stop = __pyx_t_7; } __pyx_L12:; /* "pandas/src/generated.pyx":4917 * else: * start, stop = 0, sy + periods * for j in range(start, stop): # <<<<<<<<<<<<<< * for i in range(sx): * out[i, j] = arr[i, j] - arr[i, j - periods] */ __pyx_t_7 = __pyx_v_stop; for (__pyx_t_6 = __pyx_v_start; __pyx_t_6 < __pyx_t_7; __pyx_t_6+=1) { __pyx_v_j = __pyx_t_6; /* "pandas/src/generated.pyx":4918 * start, stop = 0, sy + periods * for j in range(start, stop): * for i in range(sx): # <<<<<<<<<<<<<< * out[i, j] = arr[i, j] - arr[i, j - periods] * else: */ __pyx_t_9 = __pyx_v_sx; for (__pyx_t_10 = 0; __pyx_t_10 < __pyx_t_9; __pyx_t_10+=1) { __pyx_v_i = __pyx_t_10; /* "pandas/src/generated.pyx":4919 * for j in range(start, stop): * for i in range(sx): * out[i, j] = arr[i, j] - arr[i, j - periods] # <<<<<<<<<<<<<< * else: * if axis == 0: */ __pyx_t_17 = __pyx_v_i; __pyx_t_18 = __pyx_v_j; __pyx_t_19 = __pyx_v_i; __pyx_t_20 = (__pyx_v_j - __pyx_v_periods); __pyx_t_21 = __pyx_v_i; __pyx_t_22 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_22, __pyx_pybuffernd_out.diminfo[1].strides) = ((*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int8_t *, __pyx_pybuffernd_arr.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_arr.diminfo[0].strides, __pyx_t_18, __pyx_pybuffernd_arr.diminfo[1].strides)) - (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int8_t *, __pyx_pybuffernd_arr.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_arr.diminfo[0].strides, __pyx_t_20, __pyx_pybuffernd_arr.diminfo[1].strides))); } } } __pyx_L6:; goto __pyx_L5; } /*else*/ { /* "pandas/src/generated.pyx":4921 * out[i, j] = arr[i, j] - arr[i, j - periods] * else: * if axis == 0: # <<<<<<<<<<<<<< * if periods >= 0: * start, stop = periods, sx */ __pyx_t_8 = ((__pyx_v_axis == 0) != 0); if (__pyx_t_8) { /* "pandas/src/generated.pyx":4922 * else: * if axis == 0: * if periods >= 0: # <<<<<<<<<<<<<< * start, stop = periods, sx * else: */ __pyx_t_8 = ((__pyx_v_periods >= 0) != 0); if (__pyx_t_8) { /* "pandas/src/generated.pyx":4923 * if axis == 0: * if periods >= 0: * start, stop = periods, sx # <<<<<<<<<<<<<< * else: * start, stop = 0, sx + periods */ __pyx_t_7 = __pyx_v_periods; __pyx_t_6 = __pyx_v_sx; __pyx_v_start = __pyx_t_7; __pyx_v_stop = __pyx_t_6; goto __pyx_L18; } /*else*/ { /* "pandas/src/generated.pyx":4925 * start, stop = periods, sx * else: * start, stop = 0, sx + periods # <<<<<<<<<<<<<< * for i in range(start, stop): * for j in range(sy): */ __pyx_t_6 = 0; __pyx_t_7 = (__pyx_v_sx + __pyx_v_periods); __pyx_v_start = __pyx_t_6; __pyx_v_stop = __pyx_t_7; } __pyx_L18:; /* "pandas/src/generated.pyx":4926 * else: * start, stop = 0, sx + periods * for i in range(start, stop): # <<<<<<<<<<<<<< * for j in range(sy): * out[i, j] = arr[i, j] - arr[i - periods, j] */ __pyx_t_7 = __pyx_v_stop; for (__pyx_t_6 = __pyx_v_start; __pyx_t_6 < __pyx_t_7; __pyx_t_6+=1) { __pyx_v_i = __pyx_t_6; /* "pandas/src/generated.pyx":4927 * start, stop = 0, sx + periods * for i in range(start, stop): * for j in range(sy): # <<<<<<<<<<<<<< * out[i, j] = arr[i, j] - arr[i - periods, j] * else: */ __pyx_t_9 = __pyx_v_sy; for (__pyx_t_10 = 0; __pyx_t_10 < __pyx_t_9; __pyx_t_10+=1) { __pyx_v_j = __pyx_t_10; /* "pandas/src/generated.pyx":4928 * for i in range(start, stop): * for j in range(sy): * out[i, j] = arr[i, j] - arr[i - periods, j] # <<<<<<<<<<<<<< * else: * if periods >= 0: */ __pyx_t_23 = __pyx_v_i; __pyx_t_24 = __pyx_v_j; __pyx_t_25 = (__pyx_v_i - __pyx_v_periods); __pyx_t_26 = __pyx_v_j; __pyx_t_27 = __pyx_v_i; __pyx_t_28 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_27, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_28, __pyx_pybuffernd_out.diminfo[1].strides) = ((*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int8_t *, __pyx_pybuffernd_arr.rcbuffer->pybuffer.buf, __pyx_t_23, __pyx_pybuffernd_arr.diminfo[0].strides, __pyx_t_24, __pyx_pybuffernd_arr.diminfo[1].strides)) - (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int8_t *, __pyx_pybuffernd_arr.rcbuffer->pybuffer.buf, __pyx_t_25, __pyx_pybuffernd_arr.diminfo[0].strides, __pyx_t_26, __pyx_pybuffernd_arr.diminfo[1].strides))); } } goto __pyx_L17; } /*else*/ { /* "pandas/src/generated.pyx":4930 * out[i, j] = arr[i, j] - arr[i - periods, j] * else: * if periods >= 0: # <<<<<<<<<<<<<< * start, stop = periods, sy * else: */ __pyx_t_8 = ((__pyx_v_periods >= 0) != 0); if (__pyx_t_8) { /* "pandas/src/generated.pyx":4931 * else: * if periods >= 0: * start, stop = periods, sy # <<<<<<<<<<<<<< * else: * start, stop = 0, sy + periods */ __pyx_t_7 = __pyx_v_periods; __pyx_t_6 = __pyx_v_sy; __pyx_v_start = __pyx_t_7; __pyx_v_stop = __pyx_t_6; goto __pyx_L23; } /*else*/ { /* "pandas/src/generated.pyx":4933 * start, stop = periods, sy * else: * start, stop = 0, sy + periods # <<<<<<<<<<<<<< * for i in range(sx): * for j in range(start, stop): */ __pyx_t_6 = 0; __pyx_t_7 = (__pyx_v_sy + __pyx_v_periods); __pyx_v_start = __pyx_t_6; __pyx_v_stop = __pyx_t_7; } __pyx_L23:; /* "pandas/src/generated.pyx":4934 * else: * start, stop = 0, sy + periods * for i in range(sx): # <<<<<<<<<<<<<< * for j in range(start, stop): * out[i, j] = arr[i, j] - arr[i, j - periods] */ __pyx_t_7 = __pyx_v_sx; for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_7; __pyx_t_6+=1) { __pyx_v_i = __pyx_t_6; /* "pandas/src/generated.pyx":4935 * start, stop = 0, sy + periods * for i in range(sx): * for j in range(start, stop): # <<<<<<<<<<<<<< * out[i, j] = arr[i, j] - arr[i, j - periods] * @cython.boundscheck(False) */ __pyx_t_9 = __pyx_v_stop; for (__pyx_t_10 = __pyx_v_start; __pyx_t_10 < __pyx_t_9; __pyx_t_10+=1) { __pyx_v_j = __pyx_t_10; /* "pandas/src/generated.pyx":4936 * for i in range(sx): * for j in range(start, stop): * out[i, j] = arr[i, j] - arr[i, j - periods] # <<<<<<<<<<<<<< * @cython.boundscheck(False) * @cython.wraparound(False) */ __pyx_t_29 = __pyx_v_i; __pyx_t_30 = __pyx_v_j; __pyx_t_31 = __pyx_v_i; __pyx_t_32 = (__pyx_v_j - __pyx_v_periods); __pyx_t_33 = __pyx_v_i; __pyx_t_34 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_33, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_34, __pyx_pybuffernd_out.diminfo[1].strides) = ((*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int8_t *, __pyx_pybuffernd_arr.rcbuffer->pybuffer.buf, __pyx_t_29, __pyx_pybuffernd_arr.diminfo[0].strides, __pyx_t_30, __pyx_pybuffernd_arr.diminfo[1].strides)) - (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int8_t *, __pyx_pybuffernd_arr.rcbuffer->pybuffer.buf, __pyx_t_31, __pyx_pybuffernd_arr.diminfo[0].strides, __pyx_t_32, __pyx_pybuffernd_arr.diminfo[1].strides))); } } } __pyx_L17:; } __pyx_L5:; __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_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_arr.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.diff_2d_int8", __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_out.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_381diff_2d_int16(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_381diff_2d_int16 = {__Pyx_NAMESTR("diff_2d_int16"), (PyCFunction)__pyx_pw_6pandas_5algos_381diff_2d_int16, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_381diff_2d_int16(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_arr = 0; PyArrayObject *__pyx_v_out = 0; Py_ssize_t __pyx_v_periods; int __pyx_v_axis; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("diff_2d_int16 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__arr,&__pyx_n_s__out,&__pyx_n_s__periods,&__pyx_n_s__axis,0}; PyObject* values[4] = {0,0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__arr)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__out)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("diff_2d_int16", 1, 4, 4, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4939; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__periods)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("diff_2d_int16", 1, 4, 4, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4939; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__axis)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("diff_2d_int16", 1, 4, 4, 3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4939; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "diff_2d_int16") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4939; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 4) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[3] = PyTuple_GET_ITEM(__pyx_args, 3); } __pyx_v_arr = ((PyArrayObject *)values[0]); __pyx_v_out = ((PyArrayObject *)values[1]); __pyx_v_periods = __Pyx_PyIndex_AsSsize_t(values[2]); if (unlikely((__pyx_v_periods == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4941; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_axis = __Pyx_PyInt_AsInt(values[3]); if (unlikely((__pyx_v_axis == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4941; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("diff_2d_int16", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4939; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.diff_2d_int16", __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_filename = __pyx_f[2]; __pyx_lineno = 4939; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_5numpy_ndarray, 1, "out", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4940; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_380diff_2d_int16(__pyx_self, __pyx_v_arr, __pyx_v_out, __pyx_v_periods, __pyx_v_axis); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":4939 * @cython.boundscheck(False) * @cython.wraparound(False) * def diff_2d_int16(ndarray[int16_t, ndim=2] arr, # <<<<<<<<<<<<<< * ndarray[float32_t, ndim=2] out, * Py_ssize_t periods, int axis): */ static PyObject *__pyx_pf_6pandas_5algos_380diff_2d_int16(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_arr, PyArrayObject *__pyx_v_out, Py_ssize_t __pyx_v_periods, int __pyx_v_axis) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_sx; Py_ssize_t __pyx_v_sy; Py_ssize_t __pyx_v_start; Py_ssize_t __pyx_v_stop; __Pyx_LocalBuf_ND __pyx_pybuffernd_arr; __Pyx_Buffer __pyx_pybuffer_arr; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; 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 *); Py_ssize_t __pyx_t_6; Py_ssize_t __pyx_t_7; int __pyx_t_8; Py_ssize_t __pyx_t_9; Py_ssize_t __pyx_t_10; Py_ssize_t __pyx_t_11; Py_ssize_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; 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("diff_2d_int16", 0); __pyx_pybuffer_arr.pybuffer.buf = NULL; __pyx_pybuffer_arr.refcount = 0; __pyx_pybuffernd_arr.data = NULL; __pyx_pybuffernd_arr.rcbuffer = &__pyx_pybuffer_arr; __pyx_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_arr.rcbuffer->pybuffer, (PyObject*)__pyx_v_arr, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int16_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4939; __pyx_clineno = __LINE__; goto __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]; __pyx_pybuffernd_arr.diminfo[1].strides = __pyx_pybuffernd_arr.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_arr.diminfo[1].shape = __pyx_pybuffernd_arr.rcbuffer->pybuffer.shape[1]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_v_out, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4939; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; __pyx_pybuffernd_out.diminfo[1].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_out.diminfo[1].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[1]; /* "pandas/src/generated.pyx":4945 * Py_ssize_t i, j, sx, sy * * sx, sy = ( arr).shape # <<<<<<<<<<<<<< * if arr.flags.f_contiguous: * if axis == 0: */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_arr), __pyx_n_s__shape); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4945; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) { PyObject* sequence = __pyx_t_1; #if CYTHON_COMPILING_IN_CPYTHON Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4945; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1); } else { __pyx_t_2 = PyList_GET_ITEM(sequence, 0); __pyx_t_3 = PyList_GET_ITEM(sequence, 1); } __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); #else __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4945; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4945; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } else { Py_ssize_t index = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4945; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_5 = Py_TYPE(__pyx_t_4)->tp_iternext; index = 0; __pyx_t_2 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_2)) goto __pyx_L3_unpacking_failed; __Pyx_GOTREF(__pyx_t_2); index = 1; __pyx_t_3 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_3)) goto __pyx_L3_unpacking_failed; __Pyx_GOTREF(__pyx_t_3); if (__Pyx_IternextUnpackEndCheck(__pyx_t_5(__pyx_t_4), 2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4945; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 4945; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_L4_unpacking_done:; } __pyx_t_6 = __Pyx_PyIndex_AsSsize_t(__pyx_t_2); if (unlikely((__pyx_t_6 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4945; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_7 = __Pyx_PyIndex_AsSsize_t(__pyx_t_3); if (unlikely((__pyx_t_7 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4945; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_sx = __pyx_t_6; __pyx_v_sy = __pyx_t_7; /* "pandas/src/generated.pyx":4946 * * sx, sy = ( arr).shape * if arr.flags.f_contiguous: # <<<<<<<<<<<<<< * if axis == 0: * if periods >= 0: */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_arr), __pyx_n_s__flags); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4946; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s__f_contiguous); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4946; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4946; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_8) { /* "pandas/src/generated.pyx":4947 * sx, sy = ( arr).shape * if arr.flags.f_contiguous: * if axis == 0: # <<<<<<<<<<<<<< * if periods >= 0: * start, stop = periods, sx */ __pyx_t_8 = ((__pyx_v_axis == 0) != 0); if (__pyx_t_8) { /* "pandas/src/generated.pyx":4948 * if arr.flags.f_contiguous: * if axis == 0: * if periods >= 0: # <<<<<<<<<<<<<< * start, stop = periods, sx * else: */ __pyx_t_8 = ((__pyx_v_periods >= 0) != 0); if (__pyx_t_8) { /* "pandas/src/generated.pyx":4949 * if axis == 0: * if periods >= 0: * start, stop = periods, sx # <<<<<<<<<<<<<< * else: * start, stop = 0, sx + periods */ __pyx_t_7 = __pyx_v_periods; __pyx_t_6 = __pyx_v_sx; __pyx_v_start = __pyx_t_7; __pyx_v_stop = __pyx_t_6; goto __pyx_L7; } /*else*/ { /* "pandas/src/generated.pyx":4951 * start, stop = periods, sx * else: * start, stop = 0, sx + periods # <<<<<<<<<<<<<< * for j in range(sy): * for i in range(start, stop): */ __pyx_t_6 = 0; __pyx_t_7 = (__pyx_v_sx + __pyx_v_periods); __pyx_v_start = __pyx_t_6; __pyx_v_stop = __pyx_t_7; } __pyx_L7:; /* "pandas/src/generated.pyx":4952 * else: * start, stop = 0, sx + periods * for j in range(sy): # <<<<<<<<<<<<<< * for i in range(start, stop): * out[i, j] = arr[i, j] - arr[i - periods, j] */ __pyx_t_7 = __pyx_v_sy; for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_7; __pyx_t_6+=1) { __pyx_v_j = __pyx_t_6; /* "pandas/src/generated.pyx":4953 * start, stop = 0, sx + periods * for j in range(sy): * for i in range(start, stop): # <<<<<<<<<<<<<< * out[i, j] = arr[i, j] - arr[i - periods, j] * else: */ __pyx_t_9 = __pyx_v_stop; for (__pyx_t_10 = __pyx_v_start; __pyx_t_10 < __pyx_t_9; __pyx_t_10+=1) { __pyx_v_i = __pyx_t_10; /* "pandas/src/generated.pyx":4954 * for j in range(sy): * for i in range(start, stop): * out[i, j] = arr[i, j] - arr[i - periods, j] # <<<<<<<<<<<<<< * else: * if periods >= 0: */ __pyx_t_11 = __pyx_v_i; __pyx_t_12 = __pyx_v_j; __pyx_t_13 = (__pyx_v_i - __pyx_v_periods); __pyx_t_14 = __pyx_v_j; __pyx_t_15 = __pyx_v_i; __pyx_t_16 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_16, __pyx_pybuffernd_out.diminfo[1].strides) = ((*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int16_t *, __pyx_pybuffernd_arr.rcbuffer->pybuffer.buf, __pyx_t_11, __pyx_pybuffernd_arr.diminfo[0].strides, __pyx_t_12, __pyx_pybuffernd_arr.diminfo[1].strides)) - (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int16_t *, __pyx_pybuffernd_arr.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_arr.diminfo[0].strides, __pyx_t_14, __pyx_pybuffernd_arr.diminfo[1].strides))); } } goto __pyx_L6; } /*else*/ { /* "pandas/src/generated.pyx":4956 * out[i, j] = arr[i, j] - arr[i - periods, j] * else: * if periods >= 0: # <<<<<<<<<<<<<< * start, stop = periods, sy * else: */ __pyx_t_8 = ((__pyx_v_periods >= 0) != 0); if (__pyx_t_8) { /* "pandas/src/generated.pyx":4957 * else: * if periods >= 0: * start, stop = periods, sy # <<<<<<<<<<<<<< * else: * start, stop = 0, sy + periods */ __pyx_t_7 = __pyx_v_periods; __pyx_t_6 = __pyx_v_sy; __pyx_v_start = __pyx_t_7; __pyx_v_stop = __pyx_t_6; goto __pyx_L12; } /*else*/ { /* "pandas/src/generated.pyx":4959 * start, stop = periods, sy * else: * start, stop = 0, sy + periods # <<<<<<<<<<<<<< * for j in range(start, stop): * for i in range(sx): */ __pyx_t_6 = 0; __pyx_t_7 = (__pyx_v_sy + __pyx_v_periods); __pyx_v_start = __pyx_t_6; __pyx_v_stop = __pyx_t_7; } __pyx_L12:; /* "pandas/src/generated.pyx":4960 * else: * start, stop = 0, sy + periods * for j in range(start, stop): # <<<<<<<<<<<<<< * for i in range(sx): * out[i, j] = arr[i, j] - arr[i, j - periods] */ __pyx_t_7 = __pyx_v_stop; for (__pyx_t_6 = __pyx_v_start; __pyx_t_6 < __pyx_t_7; __pyx_t_6+=1) { __pyx_v_j = __pyx_t_6; /* "pandas/src/generated.pyx":4961 * start, stop = 0, sy + periods * for j in range(start, stop): * for i in range(sx): # <<<<<<<<<<<<<< * out[i, j] = arr[i, j] - arr[i, j - periods] * else: */ __pyx_t_9 = __pyx_v_sx; for (__pyx_t_10 = 0; __pyx_t_10 < __pyx_t_9; __pyx_t_10+=1) { __pyx_v_i = __pyx_t_10; /* "pandas/src/generated.pyx":4962 * for j in range(start, stop): * for i in range(sx): * out[i, j] = arr[i, j] - arr[i, j - periods] # <<<<<<<<<<<<<< * else: * if axis == 0: */ __pyx_t_17 = __pyx_v_i; __pyx_t_18 = __pyx_v_j; __pyx_t_19 = __pyx_v_i; __pyx_t_20 = (__pyx_v_j - __pyx_v_periods); __pyx_t_21 = __pyx_v_i; __pyx_t_22 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_22, __pyx_pybuffernd_out.diminfo[1].strides) = ((*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int16_t *, __pyx_pybuffernd_arr.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_arr.diminfo[0].strides, __pyx_t_18, __pyx_pybuffernd_arr.diminfo[1].strides)) - (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int16_t *, __pyx_pybuffernd_arr.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_arr.diminfo[0].strides, __pyx_t_20, __pyx_pybuffernd_arr.diminfo[1].strides))); } } } __pyx_L6:; goto __pyx_L5; } /*else*/ { /* "pandas/src/generated.pyx":4964 * out[i, j] = arr[i, j] - arr[i, j - periods] * else: * if axis == 0: # <<<<<<<<<<<<<< * if periods >= 0: * start, stop = periods, sx */ __pyx_t_8 = ((__pyx_v_axis == 0) != 0); if (__pyx_t_8) { /* "pandas/src/generated.pyx":4965 * else: * if axis == 0: * if periods >= 0: # <<<<<<<<<<<<<< * start, stop = periods, sx * else: */ __pyx_t_8 = ((__pyx_v_periods >= 0) != 0); if (__pyx_t_8) { /* "pandas/src/generated.pyx":4966 * if axis == 0: * if periods >= 0: * start, stop = periods, sx # <<<<<<<<<<<<<< * else: * start, stop = 0, sx + periods */ __pyx_t_7 = __pyx_v_periods; __pyx_t_6 = __pyx_v_sx; __pyx_v_start = __pyx_t_7; __pyx_v_stop = __pyx_t_6; goto __pyx_L18; } /*else*/ { /* "pandas/src/generated.pyx":4968 * start, stop = periods, sx * else: * start, stop = 0, sx + periods # <<<<<<<<<<<<<< * for i in range(start, stop): * for j in range(sy): */ __pyx_t_6 = 0; __pyx_t_7 = (__pyx_v_sx + __pyx_v_periods); __pyx_v_start = __pyx_t_6; __pyx_v_stop = __pyx_t_7; } __pyx_L18:; /* "pandas/src/generated.pyx":4969 * else: * start, stop = 0, sx + periods * for i in range(start, stop): # <<<<<<<<<<<<<< * for j in range(sy): * out[i, j] = arr[i, j] - arr[i - periods, j] */ __pyx_t_7 = __pyx_v_stop; for (__pyx_t_6 = __pyx_v_start; __pyx_t_6 < __pyx_t_7; __pyx_t_6+=1) { __pyx_v_i = __pyx_t_6; /* "pandas/src/generated.pyx":4970 * start, stop = 0, sx + periods * for i in range(start, stop): * for j in range(sy): # <<<<<<<<<<<<<< * out[i, j] = arr[i, j] - arr[i - periods, j] * else: */ __pyx_t_9 = __pyx_v_sy; for (__pyx_t_10 = 0; __pyx_t_10 < __pyx_t_9; __pyx_t_10+=1) { __pyx_v_j = __pyx_t_10; /* "pandas/src/generated.pyx":4971 * for i in range(start, stop): * for j in range(sy): * out[i, j] = arr[i, j] - arr[i - periods, j] # <<<<<<<<<<<<<< * else: * if periods >= 0: */ __pyx_t_23 = __pyx_v_i; __pyx_t_24 = __pyx_v_j; __pyx_t_25 = (__pyx_v_i - __pyx_v_periods); __pyx_t_26 = __pyx_v_j; __pyx_t_27 = __pyx_v_i; __pyx_t_28 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_27, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_28, __pyx_pybuffernd_out.diminfo[1].strides) = ((*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int16_t *, __pyx_pybuffernd_arr.rcbuffer->pybuffer.buf, __pyx_t_23, __pyx_pybuffernd_arr.diminfo[0].strides, __pyx_t_24, __pyx_pybuffernd_arr.diminfo[1].strides)) - (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int16_t *, __pyx_pybuffernd_arr.rcbuffer->pybuffer.buf, __pyx_t_25, __pyx_pybuffernd_arr.diminfo[0].strides, __pyx_t_26, __pyx_pybuffernd_arr.diminfo[1].strides))); } } goto __pyx_L17; } /*else*/ { /* "pandas/src/generated.pyx":4973 * out[i, j] = arr[i, j] - arr[i - periods, j] * else: * if periods >= 0: # <<<<<<<<<<<<<< * start, stop = periods, sy * else: */ __pyx_t_8 = ((__pyx_v_periods >= 0) != 0); if (__pyx_t_8) { /* "pandas/src/generated.pyx":4974 * else: * if periods >= 0: * start, stop = periods, sy # <<<<<<<<<<<<<< * else: * start, stop = 0, sy + periods */ __pyx_t_7 = __pyx_v_periods; __pyx_t_6 = __pyx_v_sy; __pyx_v_start = __pyx_t_7; __pyx_v_stop = __pyx_t_6; goto __pyx_L23; } /*else*/ { /* "pandas/src/generated.pyx":4976 * start, stop = periods, sy * else: * start, stop = 0, sy + periods # <<<<<<<<<<<<<< * for i in range(sx): * for j in range(start, stop): */ __pyx_t_6 = 0; __pyx_t_7 = (__pyx_v_sy + __pyx_v_periods); __pyx_v_start = __pyx_t_6; __pyx_v_stop = __pyx_t_7; } __pyx_L23:; /* "pandas/src/generated.pyx":4977 * else: * start, stop = 0, sy + periods * for i in range(sx): # <<<<<<<<<<<<<< * for j in range(start, stop): * out[i, j] = arr[i, j] - arr[i, j - periods] */ __pyx_t_7 = __pyx_v_sx; for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_7; __pyx_t_6+=1) { __pyx_v_i = __pyx_t_6; /* "pandas/src/generated.pyx":4978 * start, stop = 0, sy + periods * for i in range(sx): * for j in range(start, stop): # <<<<<<<<<<<<<< * out[i, j] = arr[i, j] - arr[i, j - periods] * @cython.boundscheck(False) */ __pyx_t_9 = __pyx_v_stop; for (__pyx_t_10 = __pyx_v_start; __pyx_t_10 < __pyx_t_9; __pyx_t_10+=1) { __pyx_v_j = __pyx_t_10; /* "pandas/src/generated.pyx":4979 * for i in range(sx): * for j in range(start, stop): * out[i, j] = arr[i, j] - arr[i, j - periods] # <<<<<<<<<<<<<< * @cython.boundscheck(False) * @cython.wraparound(False) */ __pyx_t_29 = __pyx_v_i; __pyx_t_30 = __pyx_v_j; __pyx_t_31 = __pyx_v_i; __pyx_t_32 = (__pyx_v_j - __pyx_v_periods); __pyx_t_33 = __pyx_v_i; __pyx_t_34 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_33, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_34, __pyx_pybuffernd_out.diminfo[1].strides) = ((*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int16_t *, __pyx_pybuffernd_arr.rcbuffer->pybuffer.buf, __pyx_t_29, __pyx_pybuffernd_arr.diminfo[0].strides, __pyx_t_30, __pyx_pybuffernd_arr.diminfo[1].strides)) - (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int16_t *, __pyx_pybuffernd_arr.rcbuffer->pybuffer.buf, __pyx_t_31, __pyx_pybuffernd_arr.diminfo[0].strides, __pyx_t_32, __pyx_pybuffernd_arr.diminfo[1].strides))); } } } __pyx_L17:; } __pyx_L5:; __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_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_arr.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.diff_2d_int16", __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_out.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_383diff_2d_int32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_383diff_2d_int32 = {__Pyx_NAMESTR("diff_2d_int32"), (PyCFunction)__pyx_pw_6pandas_5algos_383diff_2d_int32, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_383diff_2d_int32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_arr = 0; PyArrayObject *__pyx_v_out = 0; Py_ssize_t __pyx_v_periods; int __pyx_v_axis; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("diff_2d_int32 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__arr,&__pyx_n_s__out,&__pyx_n_s__periods,&__pyx_n_s__axis,0}; PyObject* values[4] = {0,0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__arr)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__out)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("diff_2d_int32", 1, 4, 4, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4982; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__periods)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("diff_2d_int32", 1, 4, 4, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4982; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__axis)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("diff_2d_int32", 1, 4, 4, 3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4982; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "diff_2d_int32") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4982; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 4) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[3] = PyTuple_GET_ITEM(__pyx_args, 3); } __pyx_v_arr = ((PyArrayObject *)values[0]); __pyx_v_out = ((PyArrayObject *)values[1]); __pyx_v_periods = __Pyx_PyIndex_AsSsize_t(values[2]); if (unlikely((__pyx_v_periods == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4984; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_axis = __Pyx_PyInt_AsInt(values[3]); if (unlikely((__pyx_v_axis == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4984; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("diff_2d_int32", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4982; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.diff_2d_int32", __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_filename = __pyx_f[2]; __pyx_lineno = 4982; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_5numpy_ndarray, 1, "out", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4983; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_382diff_2d_int32(__pyx_self, __pyx_v_arr, __pyx_v_out, __pyx_v_periods, __pyx_v_axis); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":4982 * @cython.boundscheck(False) * @cython.wraparound(False) * def diff_2d_int32(ndarray[int32_t, ndim=2] arr, # <<<<<<<<<<<<<< * ndarray[float64_t, ndim=2] out, * Py_ssize_t periods, int axis): */ static PyObject *__pyx_pf_6pandas_5algos_382diff_2d_int32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_arr, PyArrayObject *__pyx_v_out, Py_ssize_t __pyx_v_periods, int __pyx_v_axis) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_sx; Py_ssize_t __pyx_v_sy; Py_ssize_t __pyx_v_start; Py_ssize_t __pyx_v_stop; __Pyx_LocalBuf_ND __pyx_pybuffernd_arr; __Pyx_Buffer __pyx_pybuffer_arr; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; 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 *); Py_ssize_t __pyx_t_6; Py_ssize_t __pyx_t_7; int __pyx_t_8; Py_ssize_t __pyx_t_9; Py_ssize_t __pyx_t_10; Py_ssize_t __pyx_t_11; Py_ssize_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; 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("diff_2d_int32", 0); __pyx_pybuffer_arr.pybuffer.buf = NULL; __pyx_pybuffer_arr.refcount = 0; __pyx_pybuffernd_arr.data = NULL; __pyx_pybuffernd_arr.rcbuffer = &__pyx_pybuffer_arr; __pyx_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_arr.rcbuffer->pybuffer, (PyObject*)__pyx_v_arr, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4982; __pyx_clineno = __LINE__; goto __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]; __pyx_pybuffernd_arr.diminfo[1].strides = __pyx_pybuffernd_arr.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_arr.diminfo[1].shape = __pyx_pybuffernd_arr.rcbuffer->pybuffer.shape[1]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; 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, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4982; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; __pyx_pybuffernd_out.diminfo[1].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_out.diminfo[1].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[1]; /* "pandas/src/generated.pyx":4988 * Py_ssize_t i, j, sx, sy * * sx, sy = ( arr).shape # <<<<<<<<<<<<<< * if arr.flags.f_contiguous: * if axis == 0: */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_arr), __pyx_n_s__shape); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4988; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) { PyObject* sequence = __pyx_t_1; #if CYTHON_COMPILING_IN_CPYTHON Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4988; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1); } else { __pyx_t_2 = PyList_GET_ITEM(sequence, 0); __pyx_t_3 = PyList_GET_ITEM(sequence, 1); } __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); #else __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4988; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4988; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } else { Py_ssize_t index = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4988; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_5 = Py_TYPE(__pyx_t_4)->tp_iternext; index = 0; __pyx_t_2 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_2)) goto __pyx_L3_unpacking_failed; __Pyx_GOTREF(__pyx_t_2); index = 1; __pyx_t_3 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_3)) goto __pyx_L3_unpacking_failed; __Pyx_GOTREF(__pyx_t_3); if (__Pyx_IternextUnpackEndCheck(__pyx_t_5(__pyx_t_4), 2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4988; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 4988; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_L4_unpacking_done:; } __pyx_t_6 = __Pyx_PyIndex_AsSsize_t(__pyx_t_2); if (unlikely((__pyx_t_6 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4988; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_7 = __Pyx_PyIndex_AsSsize_t(__pyx_t_3); if (unlikely((__pyx_t_7 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4988; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_sx = __pyx_t_6; __pyx_v_sy = __pyx_t_7; /* "pandas/src/generated.pyx":4989 * * sx, sy = ( arr).shape * if arr.flags.f_contiguous: # <<<<<<<<<<<<<< * if axis == 0: * if periods >= 0: */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_arr), __pyx_n_s__flags); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4989; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s__f_contiguous); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4989; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4989; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_8) { /* "pandas/src/generated.pyx":4990 * sx, sy = ( arr).shape * if arr.flags.f_contiguous: * if axis == 0: # <<<<<<<<<<<<<< * if periods >= 0: * start, stop = periods, sx */ __pyx_t_8 = ((__pyx_v_axis == 0) != 0); if (__pyx_t_8) { /* "pandas/src/generated.pyx":4991 * if arr.flags.f_contiguous: * if axis == 0: * if periods >= 0: # <<<<<<<<<<<<<< * start, stop = periods, sx * else: */ __pyx_t_8 = ((__pyx_v_periods >= 0) != 0); if (__pyx_t_8) { /* "pandas/src/generated.pyx":4992 * if axis == 0: * if periods >= 0: * start, stop = periods, sx # <<<<<<<<<<<<<< * else: * start, stop = 0, sx + periods */ __pyx_t_7 = __pyx_v_periods; __pyx_t_6 = __pyx_v_sx; __pyx_v_start = __pyx_t_7; __pyx_v_stop = __pyx_t_6; goto __pyx_L7; } /*else*/ { /* "pandas/src/generated.pyx":4994 * start, stop = periods, sx * else: * start, stop = 0, sx + periods # <<<<<<<<<<<<<< * for j in range(sy): * for i in range(start, stop): */ __pyx_t_6 = 0; __pyx_t_7 = (__pyx_v_sx + __pyx_v_periods); __pyx_v_start = __pyx_t_6; __pyx_v_stop = __pyx_t_7; } __pyx_L7:; /* "pandas/src/generated.pyx":4995 * else: * start, stop = 0, sx + periods * for j in range(sy): # <<<<<<<<<<<<<< * for i in range(start, stop): * out[i, j] = arr[i, j] - arr[i - periods, j] */ __pyx_t_7 = __pyx_v_sy; for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_7; __pyx_t_6+=1) { __pyx_v_j = __pyx_t_6; /* "pandas/src/generated.pyx":4996 * start, stop = 0, sx + periods * for j in range(sy): * for i in range(start, stop): # <<<<<<<<<<<<<< * out[i, j] = arr[i, j] - arr[i - periods, j] * else: */ __pyx_t_9 = __pyx_v_stop; for (__pyx_t_10 = __pyx_v_start; __pyx_t_10 < __pyx_t_9; __pyx_t_10+=1) { __pyx_v_i = __pyx_t_10; /* "pandas/src/generated.pyx":4997 * for j in range(sy): * for i in range(start, stop): * out[i, j] = arr[i, j] - arr[i - periods, j] # <<<<<<<<<<<<<< * else: * if periods >= 0: */ __pyx_t_11 = __pyx_v_i; __pyx_t_12 = __pyx_v_j; __pyx_t_13 = (__pyx_v_i - __pyx_v_periods); __pyx_t_14 = __pyx_v_j; __pyx_t_15 = __pyx_v_i; __pyx_t_16 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_16, __pyx_pybuffernd_out.diminfo[1].strides) = ((*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_arr.rcbuffer->pybuffer.buf, __pyx_t_11, __pyx_pybuffernd_arr.diminfo[0].strides, __pyx_t_12, __pyx_pybuffernd_arr.diminfo[1].strides)) - (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_arr.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_arr.diminfo[0].strides, __pyx_t_14, __pyx_pybuffernd_arr.diminfo[1].strides))); } } goto __pyx_L6; } /*else*/ { /* "pandas/src/generated.pyx":4999 * out[i, j] = arr[i, j] - arr[i - periods, j] * else: * if periods >= 0: # <<<<<<<<<<<<<< * start, stop = periods, sy * else: */ __pyx_t_8 = ((__pyx_v_periods >= 0) != 0); if (__pyx_t_8) { /* "pandas/src/generated.pyx":5000 * else: * if periods >= 0: * start, stop = periods, sy # <<<<<<<<<<<<<< * else: * start, stop = 0, sy + periods */ __pyx_t_7 = __pyx_v_periods; __pyx_t_6 = __pyx_v_sy; __pyx_v_start = __pyx_t_7; __pyx_v_stop = __pyx_t_6; goto __pyx_L12; } /*else*/ { /* "pandas/src/generated.pyx":5002 * start, stop = periods, sy * else: * start, stop = 0, sy + periods # <<<<<<<<<<<<<< * for j in range(start, stop): * for i in range(sx): */ __pyx_t_6 = 0; __pyx_t_7 = (__pyx_v_sy + __pyx_v_periods); __pyx_v_start = __pyx_t_6; __pyx_v_stop = __pyx_t_7; } __pyx_L12:; /* "pandas/src/generated.pyx":5003 * else: * start, stop = 0, sy + periods * for j in range(start, stop): # <<<<<<<<<<<<<< * for i in range(sx): * out[i, j] = arr[i, j] - arr[i, j - periods] */ __pyx_t_7 = __pyx_v_stop; for (__pyx_t_6 = __pyx_v_start; __pyx_t_6 < __pyx_t_7; __pyx_t_6+=1) { __pyx_v_j = __pyx_t_6; /* "pandas/src/generated.pyx":5004 * start, stop = 0, sy + periods * for j in range(start, stop): * for i in range(sx): # <<<<<<<<<<<<<< * out[i, j] = arr[i, j] - arr[i, j - periods] * else: */ __pyx_t_9 = __pyx_v_sx; for (__pyx_t_10 = 0; __pyx_t_10 < __pyx_t_9; __pyx_t_10+=1) { __pyx_v_i = __pyx_t_10; /* "pandas/src/generated.pyx":5005 * for j in range(start, stop): * for i in range(sx): * out[i, j] = arr[i, j] - arr[i, j - periods] # <<<<<<<<<<<<<< * else: * if axis == 0: */ __pyx_t_17 = __pyx_v_i; __pyx_t_18 = __pyx_v_j; __pyx_t_19 = __pyx_v_i; __pyx_t_20 = (__pyx_v_j - __pyx_v_periods); __pyx_t_21 = __pyx_v_i; __pyx_t_22 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_22, __pyx_pybuffernd_out.diminfo[1].strides) = ((*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_arr.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_arr.diminfo[0].strides, __pyx_t_18, __pyx_pybuffernd_arr.diminfo[1].strides)) - (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_arr.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_arr.diminfo[0].strides, __pyx_t_20, __pyx_pybuffernd_arr.diminfo[1].strides))); } } } __pyx_L6:; goto __pyx_L5; } /*else*/ { /* "pandas/src/generated.pyx":5007 * out[i, j] = arr[i, j] - arr[i, j - periods] * else: * if axis == 0: # <<<<<<<<<<<<<< * if periods >= 0: * start, stop = periods, sx */ __pyx_t_8 = ((__pyx_v_axis == 0) != 0); if (__pyx_t_8) { /* "pandas/src/generated.pyx":5008 * else: * if axis == 0: * if periods >= 0: # <<<<<<<<<<<<<< * start, stop = periods, sx * else: */ __pyx_t_8 = ((__pyx_v_periods >= 0) != 0); if (__pyx_t_8) { /* "pandas/src/generated.pyx":5009 * if axis == 0: * if periods >= 0: * start, stop = periods, sx # <<<<<<<<<<<<<< * else: * start, stop = 0, sx + periods */ __pyx_t_7 = __pyx_v_periods; __pyx_t_6 = __pyx_v_sx; __pyx_v_start = __pyx_t_7; __pyx_v_stop = __pyx_t_6; goto __pyx_L18; } /*else*/ { /* "pandas/src/generated.pyx":5011 * start, stop = periods, sx * else: * start, stop = 0, sx + periods # <<<<<<<<<<<<<< * for i in range(start, stop): * for j in range(sy): */ __pyx_t_6 = 0; __pyx_t_7 = (__pyx_v_sx + __pyx_v_periods); __pyx_v_start = __pyx_t_6; __pyx_v_stop = __pyx_t_7; } __pyx_L18:; /* "pandas/src/generated.pyx":5012 * else: * start, stop = 0, sx + periods * for i in range(start, stop): # <<<<<<<<<<<<<< * for j in range(sy): * out[i, j] = arr[i, j] - arr[i - periods, j] */ __pyx_t_7 = __pyx_v_stop; for (__pyx_t_6 = __pyx_v_start; __pyx_t_6 < __pyx_t_7; __pyx_t_6+=1) { __pyx_v_i = __pyx_t_6; /* "pandas/src/generated.pyx":5013 * start, stop = 0, sx + periods * for i in range(start, stop): * for j in range(sy): # <<<<<<<<<<<<<< * out[i, j] = arr[i, j] - arr[i - periods, j] * else: */ __pyx_t_9 = __pyx_v_sy; for (__pyx_t_10 = 0; __pyx_t_10 < __pyx_t_9; __pyx_t_10+=1) { __pyx_v_j = __pyx_t_10; /* "pandas/src/generated.pyx":5014 * for i in range(start, stop): * for j in range(sy): * out[i, j] = arr[i, j] - arr[i - periods, j] # <<<<<<<<<<<<<< * else: * if periods >= 0: */ __pyx_t_23 = __pyx_v_i; __pyx_t_24 = __pyx_v_j; __pyx_t_25 = (__pyx_v_i - __pyx_v_periods); __pyx_t_26 = __pyx_v_j; __pyx_t_27 = __pyx_v_i; __pyx_t_28 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_27, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_28, __pyx_pybuffernd_out.diminfo[1].strides) = ((*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_arr.rcbuffer->pybuffer.buf, __pyx_t_23, __pyx_pybuffernd_arr.diminfo[0].strides, __pyx_t_24, __pyx_pybuffernd_arr.diminfo[1].strides)) - (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_arr.rcbuffer->pybuffer.buf, __pyx_t_25, __pyx_pybuffernd_arr.diminfo[0].strides, __pyx_t_26, __pyx_pybuffernd_arr.diminfo[1].strides))); } } goto __pyx_L17; } /*else*/ { /* "pandas/src/generated.pyx":5016 * out[i, j] = arr[i, j] - arr[i - periods, j] * else: * if periods >= 0: # <<<<<<<<<<<<<< * start, stop = periods, sy * else: */ __pyx_t_8 = ((__pyx_v_periods >= 0) != 0); if (__pyx_t_8) { /* "pandas/src/generated.pyx":5017 * else: * if periods >= 0: * start, stop = periods, sy # <<<<<<<<<<<<<< * else: * start, stop = 0, sy + periods */ __pyx_t_7 = __pyx_v_periods; __pyx_t_6 = __pyx_v_sy; __pyx_v_start = __pyx_t_7; __pyx_v_stop = __pyx_t_6; goto __pyx_L23; } /*else*/ { /* "pandas/src/generated.pyx":5019 * start, stop = periods, sy * else: * start, stop = 0, sy + periods # <<<<<<<<<<<<<< * for i in range(sx): * for j in range(start, stop): */ __pyx_t_6 = 0; __pyx_t_7 = (__pyx_v_sy + __pyx_v_periods); __pyx_v_start = __pyx_t_6; __pyx_v_stop = __pyx_t_7; } __pyx_L23:; /* "pandas/src/generated.pyx":5020 * else: * start, stop = 0, sy + periods * for i in range(sx): # <<<<<<<<<<<<<< * for j in range(start, stop): * out[i, j] = arr[i, j] - arr[i, j - periods] */ __pyx_t_7 = __pyx_v_sx; for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_7; __pyx_t_6+=1) { __pyx_v_i = __pyx_t_6; /* "pandas/src/generated.pyx":5021 * start, stop = 0, sy + periods * for i in range(sx): * for j in range(start, stop): # <<<<<<<<<<<<<< * out[i, j] = arr[i, j] - arr[i, j - periods] * @cython.boundscheck(False) */ __pyx_t_9 = __pyx_v_stop; for (__pyx_t_10 = __pyx_v_start; __pyx_t_10 < __pyx_t_9; __pyx_t_10+=1) { __pyx_v_j = __pyx_t_10; /* "pandas/src/generated.pyx":5022 * for i in range(sx): * for j in range(start, stop): * out[i, j] = arr[i, j] - arr[i, j - periods] # <<<<<<<<<<<<<< * @cython.boundscheck(False) * @cython.wraparound(False) */ __pyx_t_29 = __pyx_v_i; __pyx_t_30 = __pyx_v_j; __pyx_t_31 = __pyx_v_i; __pyx_t_32 = (__pyx_v_j - __pyx_v_periods); __pyx_t_33 = __pyx_v_i; __pyx_t_34 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_33, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_34, __pyx_pybuffernd_out.diminfo[1].strides) = ((*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_arr.rcbuffer->pybuffer.buf, __pyx_t_29, __pyx_pybuffernd_arr.diminfo[0].strides, __pyx_t_30, __pyx_pybuffernd_arr.diminfo[1].strides)) - (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_arr.rcbuffer->pybuffer.buf, __pyx_t_31, __pyx_pybuffernd_arr.diminfo[0].strides, __pyx_t_32, __pyx_pybuffernd_arr.diminfo[1].strides))); } } } __pyx_L17:; } __pyx_L5:; __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_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_arr.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.diff_2d_int32", __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_out.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_385diff_2d_int64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_385diff_2d_int64 = {__Pyx_NAMESTR("diff_2d_int64"), (PyCFunction)__pyx_pw_6pandas_5algos_385diff_2d_int64, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_385diff_2d_int64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_arr = 0; PyArrayObject *__pyx_v_out = 0; Py_ssize_t __pyx_v_periods; int __pyx_v_axis; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("diff_2d_int64 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__arr,&__pyx_n_s__out,&__pyx_n_s__periods,&__pyx_n_s__axis,0}; PyObject* values[4] = {0,0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__arr)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__out)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("diff_2d_int64", 1, 4, 4, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5025; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__periods)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("diff_2d_int64", 1, 4, 4, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5025; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__axis)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("diff_2d_int64", 1, 4, 4, 3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5025; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "diff_2d_int64") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5025; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 4) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[3] = PyTuple_GET_ITEM(__pyx_args, 3); } __pyx_v_arr = ((PyArrayObject *)values[0]); __pyx_v_out = ((PyArrayObject *)values[1]); __pyx_v_periods = __Pyx_PyIndex_AsSsize_t(values[2]); if (unlikely((__pyx_v_periods == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5027; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_axis = __Pyx_PyInt_AsInt(values[3]); if (unlikely((__pyx_v_axis == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5027; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("diff_2d_int64", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5025; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.diff_2d_int64", __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_filename = __pyx_f[2]; __pyx_lineno = 5025; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_5numpy_ndarray, 1, "out", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5026; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_384diff_2d_int64(__pyx_self, __pyx_v_arr, __pyx_v_out, __pyx_v_periods, __pyx_v_axis); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":5025 * @cython.boundscheck(False) * @cython.wraparound(False) * def diff_2d_int64(ndarray[int64_t, ndim=2] arr, # <<<<<<<<<<<<<< * ndarray[float64_t, ndim=2] out, * Py_ssize_t periods, int axis): */ static PyObject *__pyx_pf_6pandas_5algos_384diff_2d_int64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_arr, PyArrayObject *__pyx_v_out, Py_ssize_t __pyx_v_periods, int __pyx_v_axis) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_sx; Py_ssize_t __pyx_v_sy; Py_ssize_t __pyx_v_start; Py_ssize_t __pyx_v_stop; __Pyx_LocalBuf_ND __pyx_pybuffernd_arr; __Pyx_Buffer __pyx_pybuffer_arr; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; 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 *); Py_ssize_t __pyx_t_6; Py_ssize_t __pyx_t_7; int __pyx_t_8; Py_ssize_t __pyx_t_9; Py_ssize_t __pyx_t_10; Py_ssize_t __pyx_t_11; Py_ssize_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; 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("diff_2d_int64", 0); __pyx_pybuffer_arr.pybuffer.buf = NULL; __pyx_pybuffer_arr.refcount = 0; __pyx_pybuffernd_arr.data = NULL; __pyx_pybuffernd_arr.rcbuffer = &__pyx_pybuffer_arr; __pyx_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_arr.rcbuffer->pybuffer, (PyObject*)__pyx_v_arr, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5025; __pyx_clineno = __LINE__; goto __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]; __pyx_pybuffernd_arr.diminfo[1].strides = __pyx_pybuffernd_arr.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_arr.diminfo[1].shape = __pyx_pybuffernd_arr.rcbuffer->pybuffer.shape[1]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; 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, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5025; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; __pyx_pybuffernd_out.diminfo[1].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_out.diminfo[1].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[1]; /* "pandas/src/generated.pyx":5031 * Py_ssize_t i, j, sx, sy * * sx, sy = ( arr).shape # <<<<<<<<<<<<<< * if arr.flags.f_contiguous: * if axis == 0: */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_arr), __pyx_n_s__shape); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5031; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) { PyObject* sequence = __pyx_t_1; #if CYTHON_COMPILING_IN_CPYTHON Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5031; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1); } else { __pyx_t_2 = PyList_GET_ITEM(sequence, 0); __pyx_t_3 = PyList_GET_ITEM(sequence, 1); } __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); #else __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5031; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5031; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } else { Py_ssize_t index = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5031; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_5 = Py_TYPE(__pyx_t_4)->tp_iternext; index = 0; __pyx_t_2 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_2)) goto __pyx_L3_unpacking_failed; __Pyx_GOTREF(__pyx_t_2); index = 1; __pyx_t_3 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_3)) goto __pyx_L3_unpacking_failed; __Pyx_GOTREF(__pyx_t_3); if (__Pyx_IternextUnpackEndCheck(__pyx_t_5(__pyx_t_4), 2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5031; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 5031; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_L4_unpacking_done:; } __pyx_t_6 = __Pyx_PyIndex_AsSsize_t(__pyx_t_2); if (unlikely((__pyx_t_6 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5031; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_7 = __Pyx_PyIndex_AsSsize_t(__pyx_t_3); if (unlikely((__pyx_t_7 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5031; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_sx = __pyx_t_6; __pyx_v_sy = __pyx_t_7; /* "pandas/src/generated.pyx":5032 * * sx, sy = ( arr).shape * if arr.flags.f_contiguous: # <<<<<<<<<<<<<< * if axis == 0: * if periods >= 0: */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_arr), __pyx_n_s__flags); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5032; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s__f_contiguous); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5032; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5032; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_8) { /* "pandas/src/generated.pyx":5033 * sx, sy = ( arr).shape * if arr.flags.f_contiguous: * if axis == 0: # <<<<<<<<<<<<<< * if periods >= 0: * start, stop = periods, sx */ __pyx_t_8 = ((__pyx_v_axis == 0) != 0); if (__pyx_t_8) { /* "pandas/src/generated.pyx":5034 * if arr.flags.f_contiguous: * if axis == 0: * if periods >= 0: # <<<<<<<<<<<<<< * start, stop = periods, sx * else: */ __pyx_t_8 = ((__pyx_v_periods >= 0) != 0); if (__pyx_t_8) { /* "pandas/src/generated.pyx":5035 * if axis == 0: * if periods >= 0: * start, stop = periods, sx # <<<<<<<<<<<<<< * else: * start, stop = 0, sx + periods */ __pyx_t_7 = __pyx_v_periods; __pyx_t_6 = __pyx_v_sx; __pyx_v_start = __pyx_t_7; __pyx_v_stop = __pyx_t_6; goto __pyx_L7; } /*else*/ { /* "pandas/src/generated.pyx":5037 * start, stop = periods, sx * else: * start, stop = 0, sx + periods # <<<<<<<<<<<<<< * for j in range(sy): * for i in range(start, stop): */ __pyx_t_6 = 0; __pyx_t_7 = (__pyx_v_sx + __pyx_v_periods); __pyx_v_start = __pyx_t_6; __pyx_v_stop = __pyx_t_7; } __pyx_L7:; /* "pandas/src/generated.pyx":5038 * else: * start, stop = 0, sx + periods * for j in range(sy): # <<<<<<<<<<<<<< * for i in range(start, stop): * out[i, j] = arr[i, j] - arr[i - periods, j] */ __pyx_t_7 = __pyx_v_sy; for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_7; __pyx_t_6+=1) { __pyx_v_j = __pyx_t_6; /* "pandas/src/generated.pyx":5039 * start, stop = 0, sx + periods * for j in range(sy): * for i in range(start, stop): # <<<<<<<<<<<<<< * out[i, j] = arr[i, j] - arr[i - periods, j] * else: */ __pyx_t_9 = __pyx_v_stop; for (__pyx_t_10 = __pyx_v_start; __pyx_t_10 < __pyx_t_9; __pyx_t_10+=1) { __pyx_v_i = __pyx_t_10; /* "pandas/src/generated.pyx":5040 * for j in range(sy): * for i in range(start, stop): * out[i, j] = arr[i, j] - arr[i - periods, j] # <<<<<<<<<<<<<< * else: * if periods >= 0: */ __pyx_t_11 = __pyx_v_i; __pyx_t_12 = __pyx_v_j; __pyx_t_13 = (__pyx_v_i - __pyx_v_periods); __pyx_t_14 = __pyx_v_j; __pyx_t_15 = __pyx_v_i; __pyx_t_16 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_16, __pyx_pybuffernd_out.diminfo[1].strides) = ((*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_arr.rcbuffer->pybuffer.buf, __pyx_t_11, __pyx_pybuffernd_arr.diminfo[0].strides, __pyx_t_12, __pyx_pybuffernd_arr.diminfo[1].strides)) - (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_arr.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_arr.diminfo[0].strides, __pyx_t_14, __pyx_pybuffernd_arr.diminfo[1].strides))); } } goto __pyx_L6; } /*else*/ { /* "pandas/src/generated.pyx":5042 * out[i, j] = arr[i, j] - arr[i - periods, j] * else: * if periods >= 0: # <<<<<<<<<<<<<< * start, stop = periods, sy * else: */ __pyx_t_8 = ((__pyx_v_periods >= 0) != 0); if (__pyx_t_8) { /* "pandas/src/generated.pyx":5043 * else: * if periods >= 0: * start, stop = periods, sy # <<<<<<<<<<<<<< * else: * start, stop = 0, sy + periods */ __pyx_t_7 = __pyx_v_periods; __pyx_t_6 = __pyx_v_sy; __pyx_v_start = __pyx_t_7; __pyx_v_stop = __pyx_t_6; goto __pyx_L12; } /*else*/ { /* "pandas/src/generated.pyx":5045 * start, stop = periods, sy * else: * start, stop = 0, sy + periods # <<<<<<<<<<<<<< * for j in range(start, stop): * for i in range(sx): */ __pyx_t_6 = 0; __pyx_t_7 = (__pyx_v_sy + __pyx_v_periods); __pyx_v_start = __pyx_t_6; __pyx_v_stop = __pyx_t_7; } __pyx_L12:; /* "pandas/src/generated.pyx":5046 * else: * start, stop = 0, sy + periods * for j in range(start, stop): # <<<<<<<<<<<<<< * for i in range(sx): * out[i, j] = arr[i, j] - arr[i, j - periods] */ __pyx_t_7 = __pyx_v_stop; for (__pyx_t_6 = __pyx_v_start; __pyx_t_6 < __pyx_t_7; __pyx_t_6+=1) { __pyx_v_j = __pyx_t_6; /* "pandas/src/generated.pyx":5047 * start, stop = 0, sy + periods * for j in range(start, stop): * for i in range(sx): # <<<<<<<<<<<<<< * out[i, j] = arr[i, j] - arr[i, j - periods] * else: */ __pyx_t_9 = __pyx_v_sx; for (__pyx_t_10 = 0; __pyx_t_10 < __pyx_t_9; __pyx_t_10+=1) { __pyx_v_i = __pyx_t_10; /* "pandas/src/generated.pyx":5048 * for j in range(start, stop): * for i in range(sx): * out[i, j] = arr[i, j] - arr[i, j - periods] # <<<<<<<<<<<<<< * else: * if axis == 0: */ __pyx_t_17 = __pyx_v_i; __pyx_t_18 = __pyx_v_j; __pyx_t_19 = __pyx_v_i; __pyx_t_20 = (__pyx_v_j - __pyx_v_periods); __pyx_t_21 = __pyx_v_i; __pyx_t_22 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_22, __pyx_pybuffernd_out.diminfo[1].strides) = ((*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_arr.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_arr.diminfo[0].strides, __pyx_t_18, __pyx_pybuffernd_arr.diminfo[1].strides)) - (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_arr.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_arr.diminfo[0].strides, __pyx_t_20, __pyx_pybuffernd_arr.diminfo[1].strides))); } } } __pyx_L6:; goto __pyx_L5; } /*else*/ { /* "pandas/src/generated.pyx":5050 * out[i, j] = arr[i, j] - arr[i, j - periods] * else: * if axis == 0: # <<<<<<<<<<<<<< * if periods >= 0: * start, stop = periods, sx */ __pyx_t_8 = ((__pyx_v_axis == 0) != 0); if (__pyx_t_8) { /* "pandas/src/generated.pyx":5051 * else: * if axis == 0: * if periods >= 0: # <<<<<<<<<<<<<< * start, stop = periods, sx * else: */ __pyx_t_8 = ((__pyx_v_periods >= 0) != 0); if (__pyx_t_8) { /* "pandas/src/generated.pyx":5052 * if axis == 0: * if periods >= 0: * start, stop = periods, sx # <<<<<<<<<<<<<< * else: * start, stop = 0, sx + periods */ __pyx_t_7 = __pyx_v_periods; __pyx_t_6 = __pyx_v_sx; __pyx_v_start = __pyx_t_7; __pyx_v_stop = __pyx_t_6; goto __pyx_L18; } /*else*/ { /* "pandas/src/generated.pyx":5054 * start, stop = periods, sx * else: * start, stop = 0, sx + periods # <<<<<<<<<<<<<< * for i in range(start, stop): * for j in range(sy): */ __pyx_t_6 = 0; __pyx_t_7 = (__pyx_v_sx + __pyx_v_periods); __pyx_v_start = __pyx_t_6; __pyx_v_stop = __pyx_t_7; } __pyx_L18:; /* "pandas/src/generated.pyx":5055 * else: * start, stop = 0, sx + periods * for i in range(start, stop): # <<<<<<<<<<<<<< * for j in range(sy): * out[i, j] = arr[i, j] - arr[i - periods, j] */ __pyx_t_7 = __pyx_v_stop; for (__pyx_t_6 = __pyx_v_start; __pyx_t_6 < __pyx_t_7; __pyx_t_6+=1) { __pyx_v_i = __pyx_t_6; /* "pandas/src/generated.pyx":5056 * start, stop = 0, sx + periods * for i in range(start, stop): * for j in range(sy): # <<<<<<<<<<<<<< * out[i, j] = arr[i, j] - arr[i - periods, j] * else: */ __pyx_t_9 = __pyx_v_sy; for (__pyx_t_10 = 0; __pyx_t_10 < __pyx_t_9; __pyx_t_10+=1) { __pyx_v_j = __pyx_t_10; /* "pandas/src/generated.pyx":5057 * for i in range(start, stop): * for j in range(sy): * out[i, j] = arr[i, j] - arr[i - periods, j] # <<<<<<<<<<<<<< * else: * if periods >= 0: */ __pyx_t_23 = __pyx_v_i; __pyx_t_24 = __pyx_v_j; __pyx_t_25 = (__pyx_v_i - __pyx_v_periods); __pyx_t_26 = __pyx_v_j; __pyx_t_27 = __pyx_v_i; __pyx_t_28 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_27, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_28, __pyx_pybuffernd_out.diminfo[1].strides) = ((*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_arr.rcbuffer->pybuffer.buf, __pyx_t_23, __pyx_pybuffernd_arr.diminfo[0].strides, __pyx_t_24, __pyx_pybuffernd_arr.diminfo[1].strides)) - (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_arr.rcbuffer->pybuffer.buf, __pyx_t_25, __pyx_pybuffernd_arr.diminfo[0].strides, __pyx_t_26, __pyx_pybuffernd_arr.diminfo[1].strides))); } } goto __pyx_L17; } /*else*/ { /* "pandas/src/generated.pyx":5059 * out[i, j] = arr[i, j] - arr[i - periods, j] * else: * if periods >= 0: # <<<<<<<<<<<<<< * start, stop = periods, sy * else: */ __pyx_t_8 = ((__pyx_v_periods >= 0) != 0); if (__pyx_t_8) { /* "pandas/src/generated.pyx":5060 * else: * if periods >= 0: * start, stop = periods, sy # <<<<<<<<<<<<<< * else: * start, stop = 0, sy + periods */ __pyx_t_7 = __pyx_v_periods; __pyx_t_6 = __pyx_v_sy; __pyx_v_start = __pyx_t_7; __pyx_v_stop = __pyx_t_6; goto __pyx_L23; } /*else*/ { /* "pandas/src/generated.pyx":5062 * start, stop = periods, sy * else: * start, stop = 0, sy + periods # <<<<<<<<<<<<<< * for i in range(sx): * for j in range(start, stop): */ __pyx_t_6 = 0; __pyx_t_7 = (__pyx_v_sy + __pyx_v_periods); __pyx_v_start = __pyx_t_6; __pyx_v_stop = __pyx_t_7; } __pyx_L23:; /* "pandas/src/generated.pyx":5063 * else: * start, stop = 0, sy + periods * for i in range(sx): # <<<<<<<<<<<<<< * for j in range(start, stop): * out[i, j] = arr[i, j] - arr[i, j - periods] */ __pyx_t_7 = __pyx_v_sx; for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_7; __pyx_t_6+=1) { __pyx_v_i = __pyx_t_6; /* "pandas/src/generated.pyx":5064 * start, stop = 0, sy + periods * for i in range(sx): * for j in range(start, stop): # <<<<<<<<<<<<<< * out[i, j] = arr[i, j] - arr[i, j - periods] * */ __pyx_t_9 = __pyx_v_stop; for (__pyx_t_10 = __pyx_v_start; __pyx_t_10 < __pyx_t_9; __pyx_t_10+=1) { __pyx_v_j = __pyx_t_10; /* "pandas/src/generated.pyx":5065 * for i in range(sx): * for j in range(start, stop): * out[i, j] = arr[i, j] - arr[i, j - periods] # <<<<<<<<<<<<<< * * @cython.wraparound(False) */ __pyx_t_29 = __pyx_v_i; __pyx_t_30 = __pyx_v_j; __pyx_t_31 = __pyx_v_i; __pyx_t_32 = (__pyx_v_j - __pyx_v_periods); __pyx_t_33 = __pyx_v_i; __pyx_t_34 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_33, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_34, __pyx_pybuffernd_out.diminfo[1].strides) = ((*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_arr.rcbuffer->pybuffer.buf, __pyx_t_29, __pyx_pybuffernd_arr.diminfo[0].strides, __pyx_t_30, __pyx_pybuffernd_arr.diminfo[1].strides)) - (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_arr.rcbuffer->pybuffer.buf, __pyx_t_31, __pyx_pybuffernd_arr.diminfo[0].strides, __pyx_t_32, __pyx_pybuffernd_arr.diminfo[1].strides))); } } } __pyx_L17:; } __pyx_L5:; __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_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_arr.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.diff_2d_int64", __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_out.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_387group_last_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6pandas_5algos_386group_last_float64[] = "\n Only aggregates on axis=0\n "; static PyMethodDef __pyx_mdef_6pandas_5algos_387group_last_float64 = {__Pyx_NAMESTR("group_last_float64"), (PyCFunction)__pyx_pw_6pandas_5algos_387group_last_float64, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_5algos_386group_last_float64)}; static PyObject *__pyx_pw_6pandas_5algos_387group_last_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_out = 0; PyArrayObject *__pyx_v_counts = 0; PyArrayObject *__pyx_v_values = 0; PyArrayObject *__pyx_v_labels = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("group_last_float64 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__out,&__pyx_n_s__counts,&__pyx_n_s__values,&__pyx_n_s__labels,0}; PyObject* values[4] = {0,0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__out)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__counts)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("group_last_float64", 1, 4, 4, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5069; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__values)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("group_last_float64", 1, 4, 4, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5069; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__labels)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("group_last_float64", 1, 4, 4, 3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5069; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "group_last_float64") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5069; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 4) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[3] = PyTuple_GET_ITEM(__pyx_args, 3); } __pyx_v_out = ((PyArrayObject *)values[0]); __pyx_v_counts = ((PyArrayObject *)values[1]); __pyx_v_values = ((PyArrayObject *)values[2]); __pyx_v_labels = ((PyArrayObject *)values[3]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("group_last_float64", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5069; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.group_last_float64", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_5numpy_ndarray, 1, "out", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5069; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_counts), __pyx_ptype_5numpy_ndarray, 1, "counts", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5070; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5071; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_labels), __pyx_ptype_5numpy_ndarray, 1, "labels", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5072; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_386group_last_float64(__pyx_self, __pyx_v_out, __pyx_v_counts, __pyx_v_values, __pyx_v_labels); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":5069 * @cython.wraparound(False) * @cython.wraparound(False) * def group_last_float64(ndarray[float64_t, ndim=2] out, # <<<<<<<<<<<<<< * ndarray[int64_t] counts, * ndarray[float64_t, ndim=2] values, */ static PyObject *__pyx_pf_6pandas_5algos_386group_last_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_out, PyArrayObject *__pyx_v_counts, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_labels) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_N; Py_ssize_t __pyx_v_K; Py_ssize_t __pyx_v_lab; __pyx_t_5numpy_float64_t __pyx_v_val; PyArrayObject *__pyx_v_resx = 0; PyArrayObject *__pyx_v_nobs = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_counts; __Pyx_Buffer __pyx_pybuffer_counts; __Pyx_LocalBuf_ND __pyx_pybuffernd_labels; __Pyx_Buffer __pyx_pybuffer_labels; __Pyx_LocalBuf_ND __pyx_pybuffernd_nobs; __Pyx_Buffer __pyx_pybuffer_nobs; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_resx; __Pyx_Buffer __pyx_pybuffer_resx; __Pyx_LocalBuf_ND __pyx_pybuffernd_values; __Pyx_Buffer __pyx_pybuffer_values; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; Py_ssize_t __pyx_t_2; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; 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; PyArrayObject *__pyx_t_14 = NULL; PyObject *(*__pyx_t_15)(PyObject *); 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; 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("group_last_float64", 0); __pyx_pybuffer_resx.pybuffer.buf = NULL; __pyx_pybuffer_resx.refcount = 0; __pyx_pybuffernd_resx.data = NULL; __pyx_pybuffernd_resx.rcbuffer = &__pyx_pybuffer_resx; __pyx_pybuffer_nobs.pybuffer.buf = NULL; __pyx_pybuffer_nobs.refcount = 0; __pyx_pybuffernd_nobs.data = NULL; __pyx_pybuffernd_nobs.rcbuffer = &__pyx_pybuffer_nobs; __pyx_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; __pyx_pybuffer_counts.pybuffer.buf = NULL; __pyx_pybuffer_counts.refcount = 0; __pyx_pybuffernd_counts.data = NULL; __pyx_pybuffernd_counts.rcbuffer = &__pyx_pybuffer_counts; __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_labels.pybuffer.buf = NULL; __pyx_pybuffer_labels.refcount = 0; __pyx_pybuffernd_labels.data = NULL; __pyx_pybuffernd_labels.rcbuffer = &__pyx_pybuffer_labels; { __Pyx_BufFmt_StackElem __pyx_stack[1]; 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, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5069; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; __pyx_pybuffernd_out.diminfo[1].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_out.diminfo[1].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[1]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_counts.rcbuffer->pybuffer, (PyObject*)__pyx_v_counts, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5069; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_counts.diminfo[0].strides = __pyx_pybuffernd_counts.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_counts.diminfo[0].shape = __pyx_pybuffernd_counts.rcbuffer->pybuffer.shape[0]; { __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, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5069; __pyx_clineno = __LINE__; goto __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_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_labels.rcbuffer->pybuffer, (PyObject*)__pyx_v_labels, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5069; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_labels.diminfo[0].strides = __pyx_pybuffernd_labels.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_labels.diminfo[0].shape = __pyx_pybuffernd_labels.rcbuffer->pybuffer.shape[0]; /* "pandas/src/generated.pyx":5082 * ndarray[int64_t, ndim=2] nobs * * if not len(values) == len(labels): # <<<<<<<<<<<<<< * raise AssertionError("len(index) != len(labels)") * */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5082; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_2 = PyObject_Length(((PyObject *)__pyx_v_labels)); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5082; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_3 = ((!((__pyx_t_1 == __pyx_t_2) != 0)) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":5083 * * if not len(values) == len(labels): * raise AssertionError("len(index) != len(labels)") # <<<<<<<<<<<<<< * * nobs = np.zeros(( out).shape, dtype=np.int64) */ __pyx_t_4 = PyObject_Call(__pyx_builtin_AssertionError, ((PyObject *)__pyx_k_tuple_184), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5083; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 5083; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L3; } __pyx_L3:; /* "pandas/src/generated.pyx":5085 * raise AssertionError("len(index) != len(labels)") * * nobs = np.zeros(( out).shape, dtype=np.int64) # <<<<<<<<<<<<<< * resx = np.empty_like(out) * */ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5085; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s__zeros); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5085; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_out), __pyx_n_s__shape); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5085; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5085; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyDict_New(); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5085; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_4)); __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5085; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s__int64); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5085; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (PyDict_SetItem(__pyx_t_4, ((PyObject *)__pyx_n_s__dtype), __pyx_t_8) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5085; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_8 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_6), ((PyObject *)__pyx_t_4)); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5085; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; if (!(likely(((__pyx_t_8) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_8, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5085; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_9 = ((PyArrayObject *)__pyx_t_8); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer); __pyx_t_10 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer, (PyObject*)__pyx_t_9, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_nobs.rcbuffer->pybuffer, (PyObject*)__pyx_v_nobs, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_pybuffernd_nobs.diminfo[0].strides = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_nobs.diminfo[0].shape = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_nobs.diminfo[1].strides = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_nobs.diminfo[1].shape = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.shape[1]; if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5085; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_9 = 0; __pyx_v_nobs = ((PyArrayObject *)__pyx_t_8); __pyx_t_8 = 0; /* "pandas/src/generated.pyx":5086 * * nobs = np.zeros(( out).shape, dtype=np.int64) * resx = np.empty_like(out) # <<<<<<<<<<<<<< * * N, K = ( values).shape */ __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5086; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s__empty_like); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5086; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5086; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_INCREF(((PyObject *)__pyx_v_out)); PyTuple_SET_ITEM(__pyx_t_8, 0, ((PyObject *)__pyx_v_out)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out)); __pyx_t_6 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_8), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5086; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0; if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5086; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_14 = ((PyArrayObject *)__pyx_t_6); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_resx.rcbuffer->pybuffer); __pyx_t_10 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_resx.rcbuffer->pybuffer, (PyObject*)__pyx_t_14, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_resx.rcbuffer->pybuffer, (PyObject*)__pyx_v_resx, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_pybuffernd_resx.diminfo[0].strides = __pyx_pybuffernd_resx.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_resx.diminfo[0].shape = __pyx_pybuffernd_resx.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_resx.diminfo[1].strides = __pyx_pybuffernd_resx.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_resx.diminfo[1].shape = __pyx_pybuffernd_resx.rcbuffer->pybuffer.shape[1]; if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5086; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_14 = 0; __pyx_v_resx = ((PyArrayObject *)__pyx_t_6); __pyx_t_6 = 0; /* "pandas/src/generated.pyx":5088 * resx = np.empty_like(out) * * N, K = ( values).shape # <<<<<<<<<<<<<< * * for i in range(N): */ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_values), __pyx_n_s__shape); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5088; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); if ((likely(PyTuple_CheckExact(__pyx_t_6))) || (PyList_CheckExact(__pyx_t_6))) { PyObject* sequence = __pyx_t_6; #if CYTHON_COMPILING_IN_CPYTHON Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5088; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_8 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_4 = PyTuple_GET_ITEM(sequence, 1); } else { __pyx_t_8 = PyList_GET_ITEM(sequence, 0); __pyx_t_4 = PyList_GET_ITEM(sequence, 1); } __Pyx_INCREF(__pyx_t_8); __Pyx_INCREF(__pyx_t_4); #else __pyx_t_8 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5088; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5088; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); #endif __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } else { Py_ssize_t index = -1; __pyx_t_5 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5088; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_15 = Py_TYPE(__pyx_t_5)->tp_iternext; index = 0; __pyx_t_8 = __pyx_t_15(__pyx_t_5); if (unlikely(!__pyx_t_8)) goto __pyx_L4_unpacking_failed; __Pyx_GOTREF(__pyx_t_8); index = 1; __pyx_t_4 = __pyx_t_15(__pyx_t_5); if (unlikely(!__pyx_t_4)) goto __pyx_L4_unpacking_failed; __Pyx_GOTREF(__pyx_t_4); if (__Pyx_IternextUnpackEndCheck(__pyx_t_15(__pyx_t_5), 2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5088; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_15 = NULL; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; goto __pyx_L5_unpacking_done; __pyx_L4_unpacking_failed:; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_15 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5088; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_L5_unpacking_done:; } __pyx_t_2 = __Pyx_PyIndex_AsSsize_t(__pyx_t_8); if (unlikely((__pyx_t_2 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5088; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_1 = __Pyx_PyIndex_AsSsize_t(__pyx_t_4); if (unlikely((__pyx_t_1 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5088; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_N = __pyx_t_2; __pyx_v_K = __pyx_t_1; /* "pandas/src/generated.pyx":5090 * N, K = ( values).shape * * for i in range(N): # <<<<<<<<<<<<<< * lab = labels[i] * if lab < 0: */ __pyx_t_1 = __pyx_v_N; for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) { __pyx_v_i = __pyx_t_2; /* "pandas/src/generated.pyx":5091 * * for i in range(N): * lab = labels[i] # <<<<<<<<<<<<<< * if lab < 0: * continue */ __pyx_t_16 = __pyx_v_i; __pyx_t_10 = -1; if (__pyx_t_16 < 0) { __pyx_t_10 = 0; } else if (unlikely(__pyx_t_16 >= __pyx_pybuffernd_labels.diminfo[0].shape)) __pyx_t_10 = 0; if (unlikely(__pyx_t_10 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_10); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5091; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_lab = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_labels.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_labels.diminfo[0].strides)); /* "pandas/src/generated.pyx":5092 * for i in range(N): * lab = labels[i] * if lab < 0: # <<<<<<<<<<<<<< * continue * */ __pyx_t_3 = ((__pyx_v_lab < 0) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":5093 * lab = labels[i] * if lab < 0: * continue # <<<<<<<<<<<<<< * * counts[lab] += 1 */ goto __pyx_L6_continue; goto __pyx_L8; } __pyx_L8:; /* "pandas/src/generated.pyx":5095 * continue * * counts[lab] += 1 # <<<<<<<<<<<<<< * for j in range(K): * val = values[i, j] */ __pyx_t_17 = __pyx_v_lab; __pyx_t_10 = -1; if (__pyx_t_17 < 0) { __pyx_t_10 = 0; } else if (unlikely(__pyx_t_17 >= __pyx_pybuffernd_counts.diminfo[0].shape)) __pyx_t_10 = 0; if (unlikely(__pyx_t_10 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_10); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5095; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_counts.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_counts.diminfo[0].strides) += 1; /* "pandas/src/generated.pyx":5096 * * counts[lab] += 1 * for j in range(K): # <<<<<<<<<<<<<< * val = values[i, j] * */ __pyx_t_18 = __pyx_v_K; for (__pyx_t_19 = 0; __pyx_t_19 < __pyx_t_18; __pyx_t_19+=1) { __pyx_v_j = __pyx_t_19; /* "pandas/src/generated.pyx":5097 * counts[lab] += 1 * for j in range(K): * val = values[i, j] # <<<<<<<<<<<<<< * * # not nan */ __pyx_t_20 = __pyx_v_i; __pyx_t_21 = __pyx_v_j; __pyx_t_10 = -1; if (__pyx_t_20 < 0) { __pyx_t_10 = 0; } else if (unlikely(__pyx_t_20 >= __pyx_pybuffernd_values.diminfo[0].shape)) __pyx_t_10 = 0; if (__pyx_t_21 < 0) { __pyx_t_10 = 1; } else if (unlikely(__pyx_t_21 >= __pyx_pybuffernd_values.diminfo[1].shape)) __pyx_t_10 = 1; if (unlikely(__pyx_t_10 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_10); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5097; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_val = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_21, __pyx_pybuffernd_values.diminfo[1].strides)); /* "pandas/src/generated.pyx":5100 * * # not nan * if val == val: # <<<<<<<<<<<<<< * nobs[lab, j] += 1 * resx[lab, j] = val */ __pyx_t_3 = ((__pyx_v_val == __pyx_v_val) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":5101 * # not nan * if val == val: * nobs[lab, j] += 1 # <<<<<<<<<<<<<< * resx[lab, j] = val * */ __pyx_t_22 = __pyx_v_lab; __pyx_t_23 = __pyx_v_j; __pyx_t_10 = -1; if (__pyx_t_22 < 0) { __pyx_t_10 = 0; } else if (unlikely(__pyx_t_22 >= __pyx_pybuffernd_nobs.diminfo[0].shape)) __pyx_t_10 = 0; if (__pyx_t_23 < 0) { __pyx_t_10 = 1; } else if (unlikely(__pyx_t_23 >= __pyx_pybuffernd_nobs.diminfo[1].shape)) __pyx_t_10 = 1; if (unlikely(__pyx_t_10 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_10); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5101; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_nobs.rcbuffer->pybuffer.buf, __pyx_t_22, __pyx_pybuffernd_nobs.diminfo[0].strides, __pyx_t_23, __pyx_pybuffernd_nobs.diminfo[1].strides) += 1; /* "pandas/src/generated.pyx":5102 * if val == val: * nobs[lab, j] += 1 * resx[lab, j] = val # <<<<<<<<<<<<<< * * for i in range(len(counts)): */ __pyx_t_24 = __pyx_v_lab; __pyx_t_25 = __pyx_v_j; __pyx_t_10 = -1; if (__pyx_t_24 < 0) { __pyx_t_10 = 0; } else if (unlikely(__pyx_t_24 >= __pyx_pybuffernd_resx.diminfo[0].shape)) __pyx_t_10 = 0; if (__pyx_t_25 < 0) { __pyx_t_10 = 1; } else if (unlikely(__pyx_t_25 >= __pyx_pybuffernd_resx.diminfo[1].shape)) __pyx_t_10 = 1; if (unlikely(__pyx_t_10 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_10); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5102; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_resx.rcbuffer->pybuffer.buf, __pyx_t_24, __pyx_pybuffernd_resx.diminfo[0].strides, __pyx_t_25, __pyx_pybuffernd_resx.diminfo[1].strides) = __pyx_v_val; goto __pyx_L11; } __pyx_L11:; } __pyx_L6_continue:; } /* "pandas/src/generated.pyx":5104 * resx[lab, j] = val * * for i in range(len(counts)): # <<<<<<<<<<<<<< * for j in range(K): * if nobs[i, j] == 0: */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_counts)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5104; __pyx_clineno = __LINE__; goto __pyx_L1_error;} for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) { __pyx_v_i = __pyx_t_2; /* "pandas/src/generated.pyx":5105 * * for i in range(len(counts)): * for j in range(K): # <<<<<<<<<<<<<< * if nobs[i, j] == 0: * out[i, j] = nan */ __pyx_t_18 = __pyx_v_K; for (__pyx_t_19 = 0; __pyx_t_19 < __pyx_t_18; __pyx_t_19+=1) { __pyx_v_j = __pyx_t_19; /* "pandas/src/generated.pyx":5106 * for i in range(len(counts)): * for j in range(K): * if nobs[i, j] == 0: # <<<<<<<<<<<<<< * out[i, j] = nan * else: */ __pyx_t_26 = __pyx_v_i; __pyx_t_27 = __pyx_v_j; __pyx_t_10 = -1; if (__pyx_t_26 < 0) { __pyx_t_10 = 0; } else if (unlikely(__pyx_t_26 >= __pyx_pybuffernd_nobs.diminfo[0].shape)) __pyx_t_10 = 0; if (__pyx_t_27 < 0) { __pyx_t_10 = 1; } else if (unlikely(__pyx_t_27 >= __pyx_pybuffernd_nobs.diminfo[1].shape)) __pyx_t_10 = 1; if (unlikely(__pyx_t_10 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_10); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5106; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_3 = (((*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_nobs.rcbuffer->pybuffer.buf, __pyx_t_26, __pyx_pybuffernd_nobs.diminfo[0].strides, __pyx_t_27, __pyx_pybuffernd_nobs.diminfo[1].strides)) == 0) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":5107 * for j in range(K): * if nobs[i, j] == 0: * out[i, j] = nan # <<<<<<<<<<<<<< * else: * out[i, j] = resx[i, j] */ __pyx_t_28 = __pyx_v_i; __pyx_t_29 = __pyx_v_j; __pyx_t_10 = -1; if (__pyx_t_28 < 0) { __pyx_t_10 = 0; } else if (unlikely(__pyx_t_28 >= __pyx_pybuffernd_out.diminfo[0].shape)) __pyx_t_10 = 0; if (__pyx_t_29 < 0) { __pyx_t_10 = 1; } else if (unlikely(__pyx_t_29 >= __pyx_pybuffernd_out.diminfo[1].shape)) __pyx_t_10 = 1; if (unlikely(__pyx_t_10 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_10); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5107; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_28, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_29, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_6pandas_5algos_nan; goto __pyx_L16; } /*else*/ { /* "pandas/src/generated.pyx":5109 * out[i, j] = nan * else: * out[i, j] = resx[i, j] # <<<<<<<<<<<<<< * @cython.wraparound(False) * @cython.wraparound(False) */ __pyx_t_30 = __pyx_v_i; __pyx_t_31 = __pyx_v_j; __pyx_t_10 = -1; if (__pyx_t_30 < 0) { __pyx_t_10 = 0; } else if (unlikely(__pyx_t_30 >= __pyx_pybuffernd_resx.diminfo[0].shape)) __pyx_t_10 = 0; if (__pyx_t_31 < 0) { __pyx_t_10 = 1; } else if (unlikely(__pyx_t_31 >= __pyx_pybuffernd_resx.diminfo[1].shape)) __pyx_t_10 = 1; if (unlikely(__pyx_t_10 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_10); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5109; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_32 = __pyx_v_i; __pyx_t_33 = __pyx_v_j; __pyx_t_10 = -1; if (__pyx_t_32 < 0) { __pyx_t_10 = 0; } else if (unlikely(__pyx_t_32 >= __pyx_pybuffernd_out.diminfo[0].shape)) __pyx_t_10 = 0; if (__pyx_t_33 < 0) { __pyx_t_10 = 1; } else if (unlikely(__pyx_t_33 >= __pyx_pybuffernd_out.diminfo[1].shape)) __pyx_t_10 = 1; if (unlikely(__pyx_t_10 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_10); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5109; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_32, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_33, __pyx_pybuffernd_out.diminfo[1].strides) = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_resx.rcbuffer->pybuffer.buf, __pyx_t_30, __pyx_pybuffernd_resx.diminfo[0].strides, __pyx_t_31, __pyx_pybuffernd_resx.diminfo[1].strides)); } __pyx_L16:; } } __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_counts.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_labels.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_resx.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.group_last_float64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_counts.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_labels.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_resx.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_resx); __Pyx_XDECREF((PyObject *)__pyx_v_nobs); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_389group_last_float32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6pandas_5algos_388group_last_float32[] = "\n Only aggregates on axis=0\n "; static PyMethodDef __pyx_mdef_6pandas_5algos_389group_last_float32 = {__Pyx_NAMESTR("group_last_float32"), (PyCFunction)__pyx_pw_6pandas_5algos_389group_last_float32, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_5algos_388group_last_float32)}; static PyObject *__pyx_pw_6pandas_5algos_389group_last_float32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_out = 0; PyArrayObject *__pyx_v_counts = 0; PyArrayObject *__pyx_v_values = 0; PyArrayObject *__pyx_v_labels = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("group_last_float32 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__out,&__pyx_n_s__counts,&__pyx_n_s__values,&__pyx_n_s__labels,0}; PyObject* values[4] = {0,0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__out)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__counts)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("group_last_float32", 1, 4, 4, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5112; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__values)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("group_last_float32", 1, 4, 4, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5112; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__labels)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("group_last_float32", 1, 4, 4, 3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5112; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "group_last_float32") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5112; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 4) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[3] = PyTuple_GET_ITEM(__pyx_args, 3); } __pyx_v_out = ((PyArrayObject *)values[0]); __pyx_v_counts = ((PyArrayObject *)values[1]); __pyx_v_values = ((PyArrayObject *)values[2]); __pyx_v_labels = ((PyArrayObject *)values[3]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("group_last_float32", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5112; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.group_last_float32", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_5numpy_ndarray, 1, "out", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5112; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_counts), __pyx_ptype_5numpy_ndarray, 1, "counts", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5113; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5114; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_labels), __pyx_ptype_5numpy_ndarray, 1, "labels", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5115; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_388group_last_float32(__pyx_self, __pyx_v_out, __pyx_v_counts, __pyx_v_values, __pyx_v_labels); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":5112 * @cython.wraparound(False) * @cython.wraparound(False) * def group_last_float32(ndarray[float32_t, ndim=2] out, # <<<<<<<<<<<<<< * ndarray[int64_t] counts, * ndarray[float32_t, ndim=2] values, */ static PyObject *__pyx_pf_6pandas_5algos_388group_last_float32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_out, PyArrayObject *__pyx_v_counts, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_labels) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_N; Py_ssize_t __pyx_v_K; Py_ssize_t __pyx_v_lab; __pyx_t_5numpy_float32_t __pyx_v_val; PyArrayObject *__pyx_v_resx = 0; PyArrayObject *__pyx_v_nobs = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_counts; __Pyx_Buffer __pyx_pybuffer_counts; __Pyx_LocalBuf_ND __pyx_pybuffernd_labels; __Pyx_Buffer __pyx_pybuffer_labels; __Pyx_LocalBuf_ND __pyx_pybuffernd_nobs; __Pyx_Buffer __pyx_pybuffer_nobs; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_resx; __Pyx_Buffer __pyx_pybuffer_resx; __Pyx_LocalBuf_ND __pyx_pybuffernd_values; __Pyx_Buffer __pyx_pybuffer_values; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; Py_ssize_t __pyx_t_2; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; 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; PyArrayObject *__pyx_t_14 = NULL; PyObject *(*__pyx_t_15)(PyObject *); 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; 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("group_last_float32", 0); __pyx_pybuffer_resx.pybuffer.buf = NULL; __pyx_pybuffer_resx.refcount = 0; __pyx_pybuffernd_resx.data = NULL; __pyx_pybuffernd_resx.rcbuffer = &__pyx_pybuffer_resx; __pyx_pybuffer_nobs.pybuffer.buf = NULL; __pyx_pybuffer_nobs.refcount = 0; __pyx_pybuffernd_nobs.data = NULL; __pyx_pybuffernd_nobs.rcbuffer = &__pyx_pybuffer_nobs; __pyx_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; __pyx_pybuffer_counts.pybuffer.buf = NULL; __pyx_pybuffer_counts.refcount = 0; __pyx_pybuffernd_counts.data = NULL; __pyx_pybuffernd_counts.rcbuffer = &__pyx_pybuffer_counts; __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_labels.pybuffer.buf = NULL; __pyx_pybuffer_labels.refcount = 0; __pyx_pybuffernd_labels.data = NULL; __pyx_pybuffernd_labels.rcbuffer = &__pyx_pybuffer_labels; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_v_out, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5112; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; __pyx_pybuffernd_out.diminfo[1].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_out.diminfo[1].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[1]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_counts.rcbuffer->pybuffer, (PyObject*)__pyx_v_counts, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5112; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_counts.diminfo[0].strides = __pyx_pybuffernd_counts.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_counts.diminfo[0].shape = __pyx_pybuffernd_counts.rcbuffer->pybuffer.shape[0]; { __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_float32_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5112; __pyx_clineno = __LINE__; goto __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_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_labels.rcbuffer->pybuffer, (PyObject*)__pyx_v_labels, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5112; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_labels.diminfo[0].strides = __pyx_pybuffernd_labels.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_labels.diminfo[0].shape = __pyx_pybuffernd_labels.rcbuffer->pybuffer.shape[0]; /* "pandas/src/generated.pyx":5125 * ndarray[int64_t, ndim=2] nobs * * if not len(values) == len(labels): # <<<<<<<<<<<<<< * raise AssertionError("len(index) != len(labels)") * */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5125; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_2 = PyObject_Length(((PyObject *)__pyx_v_labels)); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5125; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_3 = ((!((__pyx_t_1 == __pyx_t_2) != 0)) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":5126 * * if not len(values) == len(labels): * raise AssertionError("len(index) != len(labels)") # <<<<<<<<<<<<<< * * nobs = np.zeros(( out).shape, dtype=np.int64) */ __pyx_t_4 = PyObject_Call(__pyx_builtin_AssertionError, ((PyObject *)__pyx_k_tuple_185), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5126; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 5126; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L3; } __pyx_L3:; /* "pandas/src/generated.pyx":5128 * raise AssertionError("len(index) != len(labels)") * * nobs = np.zeros(( out).shape, dtype=np.int64) # <<<<<<<<<<<<<< * resx = np.empty_like(out) * */ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5128; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s__zeros); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5128; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_out), __pyx_n_s__shape); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5128; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5128; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyDict_New(); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5128; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_4)); __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5128; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s__int64); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5128; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (PyDict_SetItem(__pyx_t_4, ((PyObject *)__pyx_n_s__dtype), __pyx_t_8) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5128; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_8 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_6), ((PyObject *)__pyx_t_4)); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5128; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; if (!(likely(((__pyx_t_8) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_8, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5128; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_9 = ((PyArrayObject *)__pyx_t_8); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer); __pyx_t_10 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer, (PyObject*)__pyx_t_9, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_nobs.rcbuffer->pybuffer, (PyObject*)__pyx_v_nobs, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_pybuffernd_nobs.diminfo[0].strides = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_nobs.diminfo[0].shape = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_nobs.diminfo[1].strides = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_nobs.diminfo[1].shape = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.shape[1]; if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5128; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_9 = 0; __pyx_v_nobs = ((PyArrayObject *)__pyx_t_8); __pyx_t_8 = 0; /* "pandas/src/generated.pyx":5129 * * nobs = np.zeros(( out).shape, dtype=np.int64) * resx = np.empty_like(out) # <<<<<<<<<<<<<< * * N, K = ( values).shape */ __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5129; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s__empty_like); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5129; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5129; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_INCREF(((PyObject *)__pyx_v_out)); PyTuple_SET_ITEM(__pyx_t_8, 0, ((PyObject *)__pyx_v_out)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out)); __pyx_t_6 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_8), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5129; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0; if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5129; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_14 = ((PyArrayObject *)__pyx_t_6); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_resx.rcbuffer->pybuffer); __pyx_t_10 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_resx.rcbuffer->pybuffer, (PyObject*)__pyx_t_14, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_resx.rcbuffer->pybuffer, (PyObject*)__pyx_v_resx, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_pybuffernd_resx.diminfo[0].strides = __pyx_pybuffernd_resx.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_resx.diminfo[0].shape = __pyx_pybuffernd_resx.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_resx.diminfo[1].strides = __pyx_pybuffernd_resx.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_resx.diminfo[1].shape = __pyx_pybuffernd_resx.rcbuffer->pybuffer.shape[1]; if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5129; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_14 = 0; __pyx_v_resx = ((PyArrayObject *)__pyx_t_6); __pyx_t_6 = 0; /* "pandas/src/generated.pyx":5131 * resx = np.empty_like(out) * * N, K = ( values).shape # <<<<<<<<<<<<<< * * for i in range(N): */ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_values), __pyx_n_s__shape); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5131; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); if ((likely(PyTuple_CheckExact(__pyx_t_6))) || (PyList_CheckExact(__pyx_t_6))) { PyObject* sequence = __pyx_t_6; #if CYTHON_COMPILING_IN_CPYTHON Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5131; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_8 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_4 = PyTuple_GET_ITEM(sequence, 1); } else { __pyx_t_8 = PyList_GET_ITEM(sequence, 0); __pyx_t_4 = PyList_GET_ITEM(sequence, 1); } __Pyx_INCREF(__pyx_t_8); __Pyx_INCREF(__pyx_t_4); #else __pyx_t_8 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5131; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5131; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); #endif __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } else { Py_ssize_t index = -1; __pyx_t_5 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5131; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_15 = Py_TYPE(__pyx_t_5)->tp_iternext; index = 0; __pyx_t_8 = __pyx_t_15(__pyx_t_5); if (unlikely(!__pyx_t_8)) goto __pyx_L4_unpacking_failed; __Pyx_GOTREF(__pyx_t_8); index = 1; __pyx_t_4 = __pyx_t_15(__pyx_t_5); if (unlikely(!__pyx_t_4)) goto __pyx_L4_unpacking_failed; __Pyx_GOTREF(__pyx_t_4); if (__Pyx_IternextUnpackEndCheck(__pyx_t_15(__pyx_t_5), 2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5131; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_15 = NULL; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; goto __pyx_L5_unpacking_done; __pyx_L4_unpacking_failed:; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_15 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5131; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_L5_unpacking_done:; } __pyx_t_2 = __Pyx_PyIndex_AsSsize_t(__pyx_t_8); if (unlikely((__pyx_t_2 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5131; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_1 = __Pyx_PyIndex_AsSsize_t(__pyx_t_4); if (unlikely((__pyx_t_1 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5131; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_N = __pyx_t_2; __pyx_v_K = __pyx_t_1; /* "pandas/src/generated.pyx":5133 * N, K = ( values).shape * * for i in range(N): # <<<<<<<<<<<<<< * lab = labels[i] * if lab < 0: */ __pyx_t_1 = __pyx_v_N; for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) { __pyx_v_i = __pyx_t_2; /* "pandas/src/generated.pyx":5134 * * for i in range(N): * lab = labels[i] # <<<<<<<<<<<<<< * if lab < 0: * continue */ __pyx_t_16 = __pyx_v_i; __pyx_t_10 = -1; if (__pyx_t_16 < 0) { __pyx_t_10 = 0; } else if (unlikely(__pyx_t_16 >= __pyx_pybuffernd_labels.diminfo[0].shape)) __pyx_t_10 = 0; if (unlikely(__pyx_t_10 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_10); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5134; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_lab = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_labels.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_labels.diminfo[0].strides)); /* "pandas/src/generated.pyx":5135 * for i in range(N): * lab = labels[i] * if lab < 0: # <<<<<<<<<<<<<< * continue * */ __pyx_t_3 = ((__pyx_v_lab < 0) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":5136 * lab = labels[i] * if lab < 0: * continue # <<<<<<<<<<<<<< * * counts[lab] += 1 */ goto __pyx_L6_continue; goto __pyx_L8; } __pyx_L8:; /* "pandas/src/generated.pyx":5138 * continue * * counts[lab] += 1 # <<<<<<<<<<<<<< * for j in range(K): * val = values[i, j] */ __pyx_t_17 = __pyx_v_lab; __pyx_t_10 = -1; if (__pyx_t_17 < 0) { __pyx_t_10 = 0; } else if (unlikely(__pyx_t_17 >= __pyx_pybuffernd_counts.diminfo[0].shape)) __pyx_t_10 = 0; if (unlikely(__pyx_t_10 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_10); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5138; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_counts.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_counts.diminfo[0].strides) += 1; /* "pandas/src/generated.pyx":5139 * * counts[lab] += 1 * for j in range(K): # <<<<<<<<<<<<<< * val = values[i, j] * */ __pyx_t_18 = __pyx_v_K; for (__pyx_t_19 = 0; __pyx_t_19 < __pyx_t_18; __pyx_t_19+=1) { __pyx_v_j = __pyx_t_19; /* "pandas/src/generated.pyx":5140 * counts[lab] += 1 * for j in range(K): * val = values[i, j] # <<<<<<<<<<<<<< * * # not nan */ __pyx_t_20 = __pyx_v_i; __pyx_t_21 = __pyx_v_j; __pyx_t_10 = -1; if (__pyx_t_20 < 0) { __pyx_t_10 = 0; } else if (unlikely(__pyx_t_20 >= __pyx_pybuffernd_values.diminfo[0].shape)) __pyx_t_10 = 0; if (__pyx_t_21 < 0) { __pyx_t_10 = 1; } else if (unlikely(__pyx_t_21 >= __pyx_pybuffernd_values.diminfo[1].shape)) __pyx_t_10 = 1; if (unlikely(__pyx_t_10 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_10); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5140; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_val = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_21, __pyx_pybuffernd_values.diminfo[1].strides)); /* "pandas/src/generated.pyx":5143 * * # not nan * if val == val: # <<<<<<<<<<<<<< * nobs[lab, j] += 1 * resx[lab, j] = val */ __pyx_t_3 = ((__pyx_v_val == __pyx_v_val) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":5144 * # not nan * if val == val: * nobs[lab, j] += 1 # <<<<<<<<<<<<<< * resx[lab, j] = val * */ __pyx_t_22 = __pyx_v_lab; __pyx_t_23 = __pyx_v_j; __pyx_t_10 = -1; if (__pyx_t_22 < 0) { __pyx_t_10 = 0; } else if (unlikely(__pyx_t_22 >= __pyx_pybuffernd_nobs.diminfo[0].shape)) __pyx_t_10 = 0; if (__pyx_t_23 < 0) { __pyx_t_10 = 1; } else if (unlikely(__pyx_t_23 >= __pyx_pybuffernd_nobs.diminfo[1].shape)) __pyx_t_10 = 1; if (unlikely(__pyx_t_10 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_10); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5144; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_nobs.rcbuffer->pybuffer.buf, __pyx_t_22, __pyx_pybuffernd_nobs.diminfo[0].strides, __pyx_t_23, __pyx_pybuffernd_nobs.diminfo[1].strides) += 1; /* "pandas/src/generated.pyx":5145 * if val == val: * nobs[lab, j] += 1 * resx[lab, j] = val # <<<<<<<<<<<<<< * * for i in range(len(counts)): */ __pyx_t_24 = __pyx_v_lab; __pyx_t_25 = __pyx_v_j; __pyx_t_10 = -1; if (__pyx_t_24 < 0) { __pyx_t_10 = 0; } else if (unlikely(__pyx_t_24 >= __pyx_pybuffernd_resx.diminfo[0].shape)) __pyx_t_10 = 0; if (__pyx_t_25 < 0) { __pyx_t_10 = 1; } else if (unlikely(__pyx_t_25 >= __pyx_pybuffernd_resx.diminfo[1].shape)) __pyx_t_10 = 1; if (unlikely(__pyx_t_10 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_10); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5145; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_resx.rcbuffer->pybuffer.buf, __pyx_t_24, __pyx_pybuffernd_resx.diminfo[0].strides, __pyx_t_25, __pyx_pybuffernd_resx.diminfo[1].strides) = __pyx_v_val; goto __pyx_L11; } __pyx_L11:; } __pyx_L6_continue:; } /* "pandas/src/generated.pyx":5147 * resx[lab, j] = val * * for i in range(len(counts)): # <<<<<<<<<<<<<< * for j in range(K): * if nobs[i, j] == 0: */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_counts)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5147; __pyx_clineno = __LINE__; goto __pyx_L1_error;} for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) { __pyx_v_i = __pyx_t_2; /* "pandas/src/generated.pyx":5148 * * for i in range(len(counts)): * for j in range(K): # <<<<<<<<<<<<<< * if nobs[i, j] == 0: * out[i, j] = nan */ __pyx_t_18 = __pyx_v_K; for (__pyx_t_19 = 0; __pyx_t_19 < __pyx_t_18; __pyx_t_19+=1) { __pyx_v_j = __pyx_t_19; /* "pandas/src/generated.pyx":5149 * for i in range(len(counts)): * for j in range(K): * if nobs[i, j] == 0: # <<<<<<<<<<<<<< * out[i, j] = nan * else: */ __pyx_t_26 = __pyx_v_i; __pyx_t_27 = __pyx_v_j; __pyx_t_10 = -1; if (__pyx_t_26 < 0) { __pyx_t_10 = 0; } else if (unlikely(__pyx_t_26 >= __pyx_pybuffernd_nobs.diminfo[0].shape)) __pyx_t_10 = 0; if (__pyx_t_27 < 0) { __pyx_t_10 = 1; } else if (unlikely(__pyx_t_27 >= __pyx_pybuffernd_nobs.diminfo[1].shape)) __pyx_t_10 = 1; if (unlikely(__pyx_t_10 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_10); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5149; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_3 = (((*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_nobs.rcbuffer->pybuffer.buf, __pyx_t_26, __pyx_pybuffernd_nobs.diminfo[0].strides, __pyx_t_27, __pyx_pybuffernd_nobs.diminfo[1].strides)) == 0) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":5150 * for j in range(K): * if nobs[i, j] == 0: * out[i, j] = nan # <<<<<<<<<<<<<< * else: * out[i, j] = resx[i, j] */ __pyx_t_28 = __pyx_v_i; __pyx_t_29 = __pyx_v_j; __pyx_t_10 = -1; if (__pyx_t_28 < 0) { __pyx_t_10 = 0; } else if (unlikely(__pyx_t_28 >= __pyx_pybuffernd_out.diminfo[0].shape)) __pyx_t_10 = 0; if (__pyx_t_29 < 0) { __pyx_t_10 = 1; } else if (unlikely(__pyx_t_29 >= __pyx_pybuffernd_out.diminfo[1].shape)) __pyx_t_10 = 1; if (unlikely(__pyx_t_10 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_10); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5150; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_28, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_29, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_6pandas_5algos_nan; goto __pyx_L16; } /*else*/ { /* "pandas/src/generated.pyx":5152 * out[i, j] = nan * else: * out[i, j] = resx[i, j] # <<<<<<<<<<<<<< * * @cython.wraparound(False) */ __pyx_t_30 = __pyx_v_i; __pyx_t_31 = __pyx_v_j; __pyx_t_10 = -1; if (__pyx_t_30 < 0) { __pyx_t_10 = 0; } else if (unlikely(__pyx_t_30 >= __pyx_pybuffernd_resx.diminfo[0].shape)) __pyx_t_10 = 0; if (__pyx_t_31 < 0) { __pyx_t_10 = 1; } else if (unlikely(__pyx_t_31 >= __pyx_pybuffernd_resx.diminfo[1].shape)) __pyx_t_10 = 1; if (unlikely(__pyx_t_10 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_10); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5152; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_32 = __pyx_v_i; __pyx_t_33 = __pyx_v_j; __pyx_t_10 = -1; if (__pyx_t_32 < 0) { __pyx_t_10 = 0; } else if (unlikely(__pyx_t_32 >= __pyx_pybuffernd_out.diminfo[0].shape)) __pyx_t_10 = 0; if (__pyx_t_33 < 0) { __pyx_t_10 = 1; } else if (unlikely(__pyx_t_33 >= __pyx_pybuffernd_out.diminfo[1].shape)) __pyx_t_10 = 1; if (unlikely(__pyx_t_10 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_10); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5152; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_32, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_33, __pyx_pybuffernd_out.diminfo[1].strides) = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_resx.rcbuffer->pybuffer.buf, __pyx_t_30, __pyx_pybuffernd_resx.diminfo[0].strides, __pyx_t_31, __pyx_pybuffernd_resx.diminfo[1].strides)); } __pyx_L16:; } } __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_counts.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_labels.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_resx.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.group_last_float32", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_counts.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_labels.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_resx.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_resx); __Pyx_XDECREF((PyObject *)__pyx_v_nobs); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_391group_last_bin_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6pandas_5algos_390group_last_bin_float64[] = "\n Only aggregates on axis=0\n "; static PyMethodDef __pyx_mdef_6pandas_5algos_391group_last_bin_float64 = {__Pyx_NAMESTR("group_last_bin_float64"), (PyCFunction)__pyx_pw_6pandas_5algos_391group_last_bin_float64, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_5algos_390group_last_bin_float64)}; static PyObject *__pyx_pw_6pandas_5algos_391group_last_bin_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_out = 0; PyArrayObject *__pyx_v_counts = 0; PyArrayObject *__pyx_v_values = 0; PyArrayObject *__pyx_v_bins = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("group_last_bin_float64 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__out,&__pyx_n_s__counts,&__pyx_n_s__values,&__pyx_n_s__bins,0}; PyObject* values[4] = {0,0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__out)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__counts)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("group_last_bin_float64", 1, 4, 4, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5156; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__values)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("group_last_bin_float64", 1, 4, 4, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5156; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__bins)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("group_last_bin_float64", 1, 4, 4, 3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5156; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "group_last_bin_float64") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5156; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 4) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[3] = PyTuple_GET_ITEM(__pyx_args, 3); } __pyx_v_out = ((PyArrayObject *)values[0]); __pyx_v_counts = ((PyArrayObject *)values[1]); __pyx_v_values = ((PyArrayObject *)values[2]); __pyx_v_bins = ((PyArrayObject *)values[3]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("group_last_bin_float64", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5156; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.group_last_bin_float64", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_5numpy_ndarray, 1, "out", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5156; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_counts), __pyx_ptype_5numpy_ndarray, 1, "counts", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5157; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5158; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_bins), __pyx_ptype_5numpy_ndarray, 1, "bins", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5159; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_390group_last_bin_float64(__pyx_self, __pyx_v_out, __pyx_v_counts, __pyx_v_values, __pyx_v_bins); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":5156 * @cython.wraparound(False) * @cython.wraparound(False) * def group_last_bin_float64(ndarray[float64_t, ndim=2] out, # <<<<<<<<<<<<<< * ndarray[int64_t] counts, * ndarray[float64_t, ndim=2] values, */ static PyObject *__pyx_pf_6pandas_5algos_390group_last_bin_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_out, PyArrayObject *__pyx_v_counts, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_bins) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_N; Py_ssize_t __pyx_v_K; Py_ssize_t __pyx_v_ngroups; Py_ssize_t __pyx_v_b; __pyx_t_5numpy_float64_t __pyx_v_val; PyArrayObject *__pyx_v_resx = 0; PyArrayObject *__pyx_v_nobs = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_bins; __Pyx_Buffer __pyx_pybuffer_bins; __Pyx_LocalBuf_ND __pyx_pybuffernd_counts; __Pyx_Buffer __pyx_pybuffer_counts; __Pyx_LocalBuf_ND __pyx_pybuffernd_nobs; __Pyx_Buffer __pyx_pybuffer_nobs; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_resx; __Pyx_Buffer __pyx_pybuffer_resx; __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; PyArrayObject *__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; Py_ssize_t __pyx_t_11; int __pyx_t_12; PyObject *__pyx_t_13 = NULL; PyObject *(*__pyx_t_14)(PyObject *); Py_ssize_t __pyx_t_15; int __pyx_t_16; int __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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("group_last_bin_float64", 0); __pyx_pybuffer_resx.pybuffer.buf = NULL; __pyx_pybuffer_resx.refcount = 0; __pyx_pybuffernd_resx.data = NULL; __pyx_pybuffernd_resx.rcbuffer = &__pyx_pybuffer_resx; __pyx_pybuffer_nobs.pybuffer.buf = NULL; __pyx_pybuffer_nobs.refcount = 0; __pyx_pybuffernd_nobs.data = NULL; __pyx_pybuffernd_nobs.rcbuffer = &__pyx_pybuffer_nobs; __pyx_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; __pyx_pybuffer_counts.pybuffer.buf = NULL; __pyx_pybuffer_counts.refcount = 0; __pyx_pybuffernd_counts.data = NULL; __pyx_pybuffernd_counts.rcbuffer = &__pyx_pybuffer_counts; __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_bins.pybuffer.buf = NULL; __pyx_pybuffer_bins.refcount = 0; __pyx_pybuffernd_bins.data = NULL; __pyx_pybuffernd_bins.rcbuffer = &__pyx_pybuffer_bins; { __Pyx_BufFmt_StackElem __pyx_stack[1]; 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, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5156; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; __pyx_pybuffernd_out.diminfo[1].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_out.diminfo[1].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[1]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_counts.rcbuffer->pybuffer, (PyObject*)__pyx_v_counts, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5156; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_counts.diminfo[0].strides = __pyx_pybuffernd_counts.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_counts.diminfo[0].shape = __pyx_pybuffernd_counts.rcbuffer->pybuffer.shape[0]; { __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, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5156; __pyx_clineno = __LINE__; goto __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_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_bins.rcbuffer->pybuffer, (PyObject*)__pyx_v_bins, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5156; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_bins.diminfo[0].strides = __pyx_pybuffernd_bins.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_bins.diminfo[0].shape = __pyx_pybuffernd_bins.rcbuffer->pybuffer.shape[0]; /* "pandas/src/generated.pyx":5168 * ndarray[float64_t, ndim=2] resx, nobs * * nobs = np.zeros_like(out) # <<<<<<<<<<<<<< * resx = np.empty_like(out) * */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5168; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s__zeros_like); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5168; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 5168; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)__pyx_v_out)); PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_out)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out)); __pyx_t_3 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5168; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(((PyObject *)__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_filename = __pyx_f[2]; __pyx_lineno = 5168; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_4 = ((PyArrayObject *)__pyx_t_3); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer); __pyx_t_5 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer, (PyObject*)__pyx_t_4, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_nobs.rcbuffer->pybuffer, (PyObject*)__pyx_v_nobs, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_pybuffernd_nobs.diminfo[0].strides = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_nobs.diminfo[0].shape = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_nobs.diminfo[1].strides = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_nobs.diminfo[1].shape = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.shape[1]; if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5168; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_4 = 0; __pyx_v_nobs = ((PyArrayObject *)__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/generated.pyx":5169 * * nobs = np.zeros_like(out) * resx = np.empty_like(out) # <<<<<<<<<<<<<< * * if bins[len(bins) - 1] == len(values): */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5169; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s__empty_like); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5169; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5169; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(((PyObject *)__pyx_v_out)); PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_v_out)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out)); __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5169; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(((PyObject *)__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_filename = __pyx_f[2]; __pyx_lineno = 5169; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_4 = ((PyArrayObject *)__pyx_t_2); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_resx.rcbuffer->pybuffer); __pyx_t_5 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_resx.rcbuffer->pybuffer, (PyObject*)__pyx_t_4, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_resx.rcbuffer->pybuffer, (PyObject*)__pyx_v_resx, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_pybuffernd_resx.diminfo[0].strides = __pyx_pybuffernd_resx.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_resx.diminfo[0].shape = __pyx_pybuffernd_resx.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_resx.diminfo[1].strides = __pyx_pybuffernd_resx.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_resx.diminfo[1].shape = __pyx_pybuffernd_resx.rcbuffer->pybuffer.shape[1]; if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5169; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_4 = 0; __pyx_v_resx = ((PyArrayObject *)__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":5171 * resx = np.empty_like(out) * * if bins[len(bins) - 1] == len(values): # <<<<<<<<<<<<<< * ngroups = len(bins) * else: */ __pyx_t_9 = PyObject_Length(((PyObject *)__pyx_v_bins)); if (unlikely(__pyx_t_9 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5171; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_10 = (__pyx_t_9 - 1); __pyx_t_5 = -1; if (__pyx_t_10 < 0) { __pyx_t_5 = 0; } else if (unlikely(__pyx_t_10 >= __pyx_pybuffernd_bins.diminfo[0].shape)) __pyx_t_5 = 0; if (unlikely(__pyx_t_5 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_5); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5171; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_11 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5171; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_12 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_bins.rcbuffer->pybuffer.buf, __pyx_t_10, __pyx_pybuffernd_bins.diminfo[0].strides)) == __pyx_t_11) != 0); if (__pyx_t_12) { /* "pandas/src/generated.pyx":5172 * * if bins[len(bins) - 1] == len(values): * ngroups = len(bins) # <<<<<<<<<<<<<< * else: * ngroups = len(bins) + 1 */ __pyx_t_11 = PyObject_Length(((PyObject *)__pyx_v_bins)); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5172; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_ngroups = __pyx_t_11; goto __pyx_L3; } /*else*/ { /* "pandas/src/generated.pyx":5174 * ngroups = len(bins) * else: * ngroups = len(bins) + 1 # <<<<<<<<<<<<<< * * N, K = ( values).shape */ __pyx_t_11 = PyObject_Length(((PyObject *)__pyx_v_bins)); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5174; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_ngroups = (__pyx_t_11 + 1); } __pyx_L3:; /* "pandas/src/generated.pyx":5176 * ngroups = len(bins) + 1 * * N, K = ( values).shape # <<<<<<<<<<<<<< * * b = 0 */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_values), __pyx_n_s__shape); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5176; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if ((likely(PyTuple_CheckExact(__pyx_t_2))) || (PyList_CheckExact(__pyx_t_2))) { PyObject* sequence = __pyx_t_2; #if CYTHON_COMPILING_IN_CPYTHON Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5176; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_1 = PyTuple_GET_ITEM(sequence, 1); } else { __pyx_t_3 = PyList_GET_ITEM(sequence, 0); __pyx_t_1 = PyList_GET_ITEM(sequence, 1); } __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(__pyx_t_1); #else __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5176; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5176; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); #endif __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } else { Py_ssize_t index = -1; __pyx_t_13 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5176; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_14 = Py_TYPE(__pyx_t_13)->tp_iternext; index = 0; __pyx_t_3 = __pyx_t_14(__pyx_t_13); if (unlikely(!__pyx_t_3)) goto __pyx_L4_unpacking_failed; __Pyx_GOTREF(__pyx_t_3); index = 1; __pyx_t_1 = __pyx_t_14(__pyx_t_13); if (unlikely(!__pyx_t_1)) goto __pyx_L4_unpacking_failed; __Pyx_GOTREF(__pyx_t_1); if (__Pyx_IternextUnpackEndCheck(__pyx_t_14(__pyx_t_13), 2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5176; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_14 = NULL; __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; goto __pyx_L5_unpacking_done; __pyx_L4_unpacking_failed:; __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_14 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5176; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_L5_unpacking_done:; } __pyx_t_11 = __Pyx_PyIndex_AsSsize_t(__pyx_t_3); if (unlikely((__pyx_t_11 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5176; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_9 = __Pyx_PyIndex_AsSsize_t(__pyx_t_1); if (unlikely((__pyx_t_9 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5176; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_N = __pyx_t_11; __pyx_v_K = __pyx_t_9; /* "pandas/src/generated.pyx":5178 * N, K = ( values).shape * * b = 0 # <<<<<<<<<<<<<< * for i in range(N): * while b < ngroups - 1 and i >= bins[b]: */ __pyx_v_b = 0; /* "pandas/src/generated.pyx":5179 * * b = 0 * for i in range(N): # <<<<<<<<<<<<<< * while b < ngroups - 1 and i >= bins[b]: * b += 1 */ __pyx_t_9 = __pyx_v_N; for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_9; __pyx_t_11+=1) { __pyx_v_i = __pyx_t_11; /* "pandas/src/generated.pyx":5180 * b = 0 * for i in range(N): * while b < ngroups - 1 and i >= bins[b]: # <<<<<<<<<<<<<< * b += 1 * */ while (1) { __pyx_t_12 = ((__pyx_v_b < (__pyx_v_ngroups - 1)) != 0); if (__pyx_t_12) { __pyx_t_15 = __pyx_v_b; __pyx_t_5 = -1; if (__pyx_t_15 < 0) { __pyx_t_5 = 0; } else if (unlikely(__pyx_t_15 >= __pyx_pybuffernd_bins.diminfo[0].shape)) __pyx_t_5 = 0; if (unlikely(__pyx_t_5 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_5); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5180; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_16 = ((__pyx_v_i >= (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_bins.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_bins.diminfo[0].strides))) != 0); __pyx_t_17 = __pyx_t_16; } else { __pyx_t_17 = __pyx_t_12; } if (!__pyx_t_17) break; /* "pandas/src/generated.pyx":5181 * for i in range(N): * while b < ngroups - 1 and i >= bins[b]: * b += 1 # <<<<<<<<<<<<<< * * counts[b] += 1 */ __pyx_v_b = (__pyx_v_b + 1); } /* "pandas/src/generated.pyx":5183 * b += 1 * * counts[b] += 1 # <<<<<<<<<<<<<< * for j in range(K): * val = values[i, j] */ __pyx_t_18 = __pyx_v_b; __pyx_t_5 = -1; if (__pyx_t_18 < 0) { __pyx_t_5 = 0; } else if (unlikely(__pyx_t_18 >= __pyx_pybuffernd_counts.diminfo[0].shape)) __pyx_t_5 = 0; if (unlikely(__pyx_t_5 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_5); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5183; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_counts.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_counts.diminfo[0].strides) += 1; /* "pandas/src/generated.pyx":5184 * * counts[b] += 1 * for j in range(K): # <<<<<<<<<<<<<< * val = values[i, j] * */ __pyx_t_19 = __pyx_v_K; for (__pyx_t_20 = 0; __pyx_t_20 < __pyx_t_19; __pyx_t_20+=1) { __pyx_v_j = __pyx_t_20; /* "pandas/src/generated.pyx":5185 * counts[b] += 1 * for j in range(K): * val = values[i, j] # <<<<<<<<<<<<<< * * # not nan */ __pyx_t_21 = __pyx_v_i; __pyx_t_22 = __pyx_v_j; __pyx_t_5 = -1; if (__pyx_t_21 < 0) { __pyx_t_5 = 0; } else if (unlikely(__pyx_t_21 >= __pyx_pybuffernd_values.diminfo[0].shape)) __pyx_t_5 = 0; if (__pyx_t_22 < 0) { __pyx_t_5 = 1; } else if (unlikely(__pyx_t_22 >= __pyx_pybuffernd_values.diminfo[1].shape)) __pyx_t_5 = 1; if (unlikely(__pyx_t_5 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_5); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5185; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_val = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_22, __pyx_pybuffernd_values.diminfo[1].strides)); /* "pandas/src/generated.pyx":5188 * * # not nan * if val == val: # <<<<<<<<<<<<<< * nobs[b, j] += 1 * resx[b, j] = val */ __pyx_t_17 = ((__pyx_v_val == __pyx_v_val) != 0); if (__pyx_t_17) { /* "pandas/src/generated.pyx":5189 * # not nan * if val == val: * nobs[b, j] += 1 # <<<<<<<<<<<<<< * resx[b, j] = val * */ __pyx_t_23 = __pyx_v_b; __pyx_t_24 = __pyx_v_j; __pyx_t_5 = -1; if (__pyx_t_23 < 0) { __pyx_t_5 = 0; } else if (unlikely(__pyx_t_23 >= __pyx_pybuffernd_nobs.diminfo[0].shape)) __pyx_t_5 = 0; if (__pyx_t_24 < 0) { __pyx_t_5 = 1; } else if (unlikely(__pyx_t_24 >= __pyx_pybuffernd_nobs.diminfo[1].shape)) __pyx_t_5 = 1; if (unlikely(__pyx_t_5 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_5); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5189; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_nobs.rcbuffer->pybuffer.buf, __pyx_t_23, __pyx_pybuffernd_nobs.diminfo[0].strides, __pyx_t_24, __pyx_pybuffernd_nobs.diminfo[1].strides) += 1.0; /* "pandas/src/generated.pyx":5190 * if val == val: * nobs[b, j] += 1 * resx[b, j] = val # <<<<<<<<<<<<<< * * for i in range(ngroups): */ __pyx_t_25 = __pyx_v_b; __pyx_t_26 = __pyx_v_j; __pyx_t_5 = -1; if (__pyx_t_25 < 0) { __pyx_t_5 = 0; } else if (unlikely(__pyx_t_25 >= __pyx_pybuffernd_resx.diminfo[0].shape)) __pyx_t_5 = 0; if (__pyx_t_26 < 0) { __pyx_t_5 = 1; } else if (unlikely(__pyx_t_26 >= __pyx_pybuffernd_resx.diminfo[1].shape)) __pyx_t_5 = 1; if (unlikely(__pyx_t_5 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_5); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5190; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_resx.rcbuffer->pybuffer.buf, __pyx_t_25, __pyx_pybuffernd_resx.diminfo[0].strides, __pyx_t_26, __pyx_pybuffernd_resx.diminfo[1].strides) = __pyx_v_val; goto __pyx_L12; } __pyx_L12:; } } /* "pandas/src/generated.pyx":5192 * resx[b, j] = val * * for i in range(ngroups): # <<<<<<<<<<<<<< * for j in range(K): * if nobs[i, j] == 0: */ __pyx_t_9 = __pyx_v_ngroups; for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_9; __pyx_t_11+=1) { __pyx_v_i = __pyx_t_11; /* "pandas/src/generated.pyx":5193 * * for i in range(ngroups): * for j in range(K): # <<<<<<<<<<<<<< * if nobs[i, j] == 0: * out[i, j] = nan */ __pyx_t_19 = __pyx_v_K; for (__pyx_t_20 = 0; __pyx_t_20 < __pyx_t_19; __pyx_t_20+=1) { __pyx_v_j = __pyx_t_20; /* "pandas/src/generated.pyx":5194 * for i in range(ngroups): * for j in range(K): * if nobs[i, j] == 0: # <<<<<<<<<<<<<< * out[i, j] = nan * else: */ __pyx_t_27 = __pyx_v_i; __pyx_t_28 = __pyx_v_j; __pyx_t_5 = -1; if (__pyx_t_27 < 0) { __pyx_t_5 = 0; } else if (unlikely(__pyx_t_27 >= __pyx_pybuffernd_nobs.diminfo[0].shape)) __pyx_t_5 = 0; if (__pyx_t_28 < 0) { __pyx_t_5 = 1; } else if (unlikely(__pyx_t_28 >= __pyx_pybuffernd_nobs.diminfo[1].shape)) __pyx_t_5 = 1; if (unlikely(__pyx_t_5 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_5); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5194; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_17 = (((*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_nobs.rcbuffer->pybuffer.buf, __pyx_t_27, __pyx_pybuffernd_nobs.diminfo[0].strides, __pyx_t_28, __pyx_pybuffernd_nobs.diminfo[1].strides)) == 0.0) != 0); if (__pyx_t_17) { /* "pandas/src/generated.pyx":5195 * for j in range(K): * if nobs[i, j] == 0: * out[i, j] = nan # <<<<<<<<<<<<<< * else: * out[i, j] = resx[i, j] */ __pyx_t_29 = __pyx_v_i; __pyx_t_30 = __pyx_v_j; __pyx_t_5 = -1; if (__pyx_t_29 < 0) { __pyx_t_5 = 0; } else if (unlikely(__pyx_t_29 >= __pyx_pybuffernd_out.diminfo[0].shape)) __pyx_t_5 = 0; if (__pyx_t_30 < 0) { __pyx_t_5 = 1; } else if (unlikely(__pyx_t_30 >= __pyx_pybuffernd_out.diminfo[1].shape)) __pyx_t_5 = 1; if (unlikely(__pyx_t_5 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_5); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5195; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_29, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_30, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_6pandas_5algos_nan; goto __pyx_L17; } /*else*/ { /* "pandas/src/generated.pyx":5197 * out[i, j] = nan * else: * out[i, j] = resx[i, j] # <<<<<<<<<<<<<< * @cython.wraparound(False) * @cython.wraparound(False) */ __pyx_t_31 = __pyx_v_i; __pyx_t_32 = __pyx_v_j; __pyx_t_5 = -1; if (__pyx_t_31 < 0) { __pyx_t_5 = 0; } else if (unlikely(__pyx_t_31 >= __pyx_pybuffernd_resx.diminfo[0].shape)) __pyx_t_5 = 0; if (__pyx_t_32 < 0) { __pyx_t_5 = 1; } else if (unlikely(__pyx_t_32 >= __pyx_pybuffernd_resx.diminfo[1].shape)) __pyx_t_5 = 1; if (unlikely(__pyx_t_5 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_5); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5197; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_33 = __pyx_v_i; __pyx_t_34 = __pyx_v_j; __pyx_t_5 = -1; if (__pyx_t_33 < 0) { __pyx_t_5 = 0; } else if (unlikely(__pyx_t_33 >= __pyx_pybuffernd_out.diminfo[0].shape)) __pyx_t_5 = 0; if (__pyx_t_34 < 0) { __pyx_t_5 = 1; } else if (unlikely(__pyx_t_34 >= __pyx_pybuffernd_out.diminfo[1].shape)) __pyx_t_5 = 1; if (unlikely(__pyx_t_5 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_5); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5197; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_33, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_34, __pyx_pybuffernd_out.diminfo[1].strides) = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_resx.rcbuffer->pybuffer.buf, __pyx_t_31, __pyx_pybuffernd_resx.diminfo[0].strides, __pyx_t_32, __pyx_pybuffernd_resx.diminfo[1].strides)); } __pyx_L17:; } } __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_13); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_bins.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_counts.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_resx.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.group_last_bin_float64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_bins.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_counts.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_resx.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_resx); __Pyx_XDECREF((PyObject *)__pyx_v_nobs); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_393group_last_bin_float32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6pandas_5algos_392group_last_bin_float32[] = "\n Only aggregates on axis=0\n "; static PyMethodDef __pyx_mdef_6pandas_5algos_393group_last_bin_float32 = {__Pyx_NAMESTR("group_last_bin_float32"), (PyCFunction)__pyx_pw_6pandas_5algos_393group_last_bin_float32, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_5algos_392group_last_bin_float32)}; static PyObject *__pyx_pw_6pandas_5algos_393group_last_bin_float32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_out = 0; PyArrayObject *__pyx_v_counts = 0; PyArrayObject *__pyx_v_values = 0; PyArrayObject *__pyx_v_bins = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("group_last_bin_float32 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__out,&__pyx_n_s__counts,&__pyx_n_s__values,&__pyx_n_s__bins,0}; PyObject* values[4] = {0,0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__out)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__counts)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("group_last_bin_float32", 1, 4, 4, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5200; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__values)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("group_last_bin_float32", 1, 4, 4, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5200; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__bins)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("group_last_bin_float32", 1, 4, 4, 3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5200; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "group_last_bin_float32") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5200; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 4) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[3] = PyTuple_GET_ITEM(__pyx_args, 3); } __pyx_v_out = ((PyArrayObject *)values[0]); __pyx_v_counts = ((PyArrayObject *)values[1]); __pyx_v_values = ((PyArrayObject *)values[2]); __pyx_v_bins = ((PyArrayObject *)values[3]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("group_last_bin_float32", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5200; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.group_last_bin_float32", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_5numpy_ndarray, 1, "out", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5200; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_counts), __pyx_ptype_5numpy_ndarray, 1, "counts", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5201; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5202; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_bins), __pyx_ptype_5numpy_ndarray, 1, "bins", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5203; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_392group_last_bin_float32(__pyx_self, __pyx_v_out, __pyx_v_counts, __pyx_v_values, __pyx_v_bins); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":5200 * @cython.wraparound(False) * @cython.wraparound(False) * def group_last_bin_float32(ndarray[float32_t, ndim=2] out, # <<<<<<<<<<<<<< * ndarray[int64_t] counts, * ndarray[float32_t, ndim=2] values, */ static PyObject *__pyx_pf_6pandas_5algos_392group_last_bin_float32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_out, PyArrayObject *__pyx_v_counts, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_bins) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_N; Py_ssize_t __pyx_v_K; Py_ssize_t __pyx_v_ngroups; Py_ssize_t __pyx_v_b; __pyx_t_5numpy_float32_t __pyx_v_val; PyArrayObject *__pyx_v_resx = 0; PyArrayObject *__pyx_v_nobs = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_bins; __Pyx_Buffer __pyx_pybuffer_bins; __Pyx_LocalBuf_ND __pyx_pybuffernd_counts; __Pyx_Buffer __pyx_pybuffer_counts; __Pyx_LocalBuf_ND __pyx_pybuffernd_nobs; __Pyx_Buffer __pyx_pybuffer_nobs; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_resx; __Pyx_Buffer __pyx_pybuffer_resx; __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; PyArrayObject *__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; Py_ssize_t __pyx_t_11; int __pyx_t_12; PyObject *__pyx_t_13 = NULL; PyObject *(*__pyx_t_14)(PyObject *); Py_ssize_t __pyx_t_15; int __pyx_t_16; int __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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("group_last_bin_float32", 0); __pyx_pybuffer_resx.pybuffer.buf = NULL; __pyx_pybuffer_resx.refcount = 0; __pyx_pybuffernd_resx.data = NULL; __pyx_pybuffernd_resx.rcbuffer = &__pyx_pybuffer_resx; __pyx_pybuffer_nobs.pybuffer.buf = NULL; __pyx_pybuffer_nobs.refcount = 0; __pyx_pybuffernd_nobs.data = NULL; __pyx_pybuffernd_nobs.rcbuffer = &__pyx_pybuffer_nobs; __pyx_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; __pyx_pybuffer_counts.pybuffer.buf = NULL; __pyx_pybuffer_counts.refcount = 0; __pyx_pybuffernd_counts.data = NULL; __pyx_pybuffernd_counts.rcbuffer = &__pyx_pybuffer_counts; __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_bins.pybuffer.buf = NULL; __pyx_pybuffer_bins.refcount = 0; __pyx_pybuffernd_bins.data = NULL; __pyx_pybuffernd_bins.rcbuffer = &__pyx_pybuffer_bins; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_v_out, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5200; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; __pyx_pybuffernd_out.diminfo[1].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_out.diminfo[1].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[1]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_counts.rcbuffer->pybuffer, (PyObject*)__pyx_v_counts, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5200; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_counts.diminfo[0].strides = __pyx_pybuffernd_counts.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_counts.diminfo[0].shape = __pyx_pybuffernd_counts.rcbuffer->pybuffer.shape[0]; { __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_float32_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5200; __pyx_clineno = __LINE__; goto __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_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_bins.rcbuffer->pybuffer, (PyObject*)__pyx_v_bins, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5200; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_bins.diminfo[0].strides = __pyx_pybuffernd_bins.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_bins.diminfo[0].shape = __pyx_pybuffernd_bins.rcbuffer->pybuffer.shape[0]; /* "pandas/src/generated.pyx":5212 * ndarray[float32_t, ndim=2] resx, nobs * * nobs = np.zeros_like(out) # <<<<<<<<<<<<<< * resx = np.empty_like(out) * */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5212; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s__zeros_like); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5212; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 5212; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)__pyx_v_out)); PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_out)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out)); __pyx_t_3 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5212; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(((PyObject *)__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_filename = __pyx_f[2]; __pyx_lineno = 5212; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_4 = ((PyArrayObject *)__pyx_t_3); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer); __pyx_t_5 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer, (PyObject*)__pyx_t_4, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_nobs.rcbuffer->pybuffer, (PyObject*)__pyx_v_nobs, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_pybuffernd_nobs.diminfo[0].strides = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_nobs.diminfo[0].shape = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_nobs.diminfo[1].strides = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_nobs.diminfo[1].shape = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.shape[1]; if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5212; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_4 = 0; __pyx_v_nobs = ((PyArrayObject *)__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/generated.pyx":5213 * * nobs = np.zeros_like(out) * resx = np.empty_like(out) # <<<<<<<<<<<<<< * * if bins[len(bins) - 1] == len(values): */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5213; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s__empty_like); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5213; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5213; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(((PyObject *)__pyx_v_out)); PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_v_out)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out)); __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5213; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(((PyObject *)__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_filename = __pyx_f[2]; __pyx_lineno = 5213; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_4 = ((PyArrayObject *)__pyx_t_2); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_resx.rcbuffer->pybuffer); __pyx_t_5 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_resx.rcbuffer->pybuffer, (PyObject*)__pyx_t_4, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_resx.rcbuffer->pybuffer, (PyObject*)__pyx_v_resx, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_pybuffernd_resx.diminfo[0].strides = __pyx_pybuffernd_resx.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_resx.diminfo[0].shape = __pyx_pybuffernd_resx.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_resx.diminfo[1].strides = __pyx_pybuffernd_resx.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_resx.diminfo[1].shape = __pyx_pybuffernd_resx.rcbuffer->pybuffer.shape[1]; if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5213; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_4 = 0; __pyx_v_resx = ((PyArrayObject *)__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":5215 * resx = np.empty_like(out) * * if bins[len(bins) - 1] == len(values): # <<<<<<<<<<<<<< * ngroups = len(bins) * else: */ __pyx_t_9 = PyObject_Length(((PyObject *)__pyx_v_bins)); if (unlikely(__pyx_t_9 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5215; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_10 = (__pyx_t_9 - 1); __pyx_t_5 = -1; if (__pyx_t_10 < 0) { __pyx_t_5 = 0; } else if (unlikely(__pyx_t_10 >= __pyx_pybuffernd_bins.diminfo[0].shape)) __pyx_t_5 = 0; if (unlikely(__pyx_t_5 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_5); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5215; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_11 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5215; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_12 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_bins.rcbuffer->pybuffer.buf, __pyx_t_10, __pyx_pybuffernd_bins.diminfo[0].strides)) == __pyx_t_11) != 0); if (__pyx_t_12) { /* "pandas/src/generated.pyx":5216 * * if bins[len(bins) - 1] == len(values): * ngroups = len(bins) # <<<<<<<<<<<<<< * else: * ngroups = len(bins) + 1 */ __pyx_t_11 = PyObject_Length(((PyObject *)__pyx_v_bins)); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5216; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_ngroups = __pyx_t_11; goto __pyx_L3; } /*else*/ { /* "pandas/src/generated.pyx":5218 * ngroups = len(bins) * else: * ngroups = len(bins) + 1 # <<<<<<<<<<<<<< * * N, K = ( values).shape */ __pyx_t_11 = PyObject_Length(((PyObject *)__pyx_v_bins)); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5218; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_ngroups = (__pyx_t_11 + 1); } __pyx_L3:; /* "pandas/src/generated.pyx":5220 * ngroups = len(bins) + 1 * * N, K = ( values).shape # <<<<<<<<<<<<<< * * b = 0 */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_values), __pyx_n_s__shape); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5220; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if ((likely(PyTuple_CheckExact(__pyx_t_2))) || (PyList_CheckExact(__pyx_t_2))) { PyObject* sequence = __pyx_t_2; #if CYTHON_COMPILING_IN_CPYTHON Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5220; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_1 = PyTuple_GET_ITEM(sequence, 1); } else { __pyx_t_3 = PyList_GET_ITEM(sequence, 0); __pyx_t_1 = PyList_GET_ITEM(sequence, 1); } __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(__pyx_t_1); #else __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5220; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5220; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); #endif __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } else { Py_ssize_t index = -1; __pyx_t_13 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5220; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_14 = Py_TYPE(__pyx_t_13)->tp_iternext; index = 0; __pyx_t_3 = __pyx_t_14(__pyx_t_13); if (unlikely(!__pyx_t_3)) goto __pyx_L4_unpacking_failed; __Pyx_GOTREF(__pyx_t_3); index = 1; __pyx_t_1 = __pyx_t_14(__pyx_t_13); if (unlikely(!__pyx_t_1)) goto __pyx_L4_unpacking_failed; __Pyx_GOTREF(__pyx_t_1); if (__Pyx_IternextUnpackEndCheck(__pyx_t_14(__pyx_t_13), 2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5220; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_14 = NULL; __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; goto __pyx_L5_unpacking_done; __pyx_L4_unpacking_failed:; __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_14 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5220; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_L5_unpacking_done:; } __pyx_t_11 = __Pyx_PyIndex_AsSsize_t(__pyx_t_3); if (unlikely((__pyx_t_11 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5220; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_9 = __Pyx_PyIndex_AsSsize_t(__pyx_t_1); if (unlikely((__pyx_t_9 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5220; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_N = __pyx_t_11; __pyx_v_K = __pyx_t_9; /* "pandas/src/generated.pyx":5222 * N, K = ( values).shape * * b = 0 # <<<<<<<<<<<<<< * for i in range(N): * while b < ngroups - 1 and i >= bins[b]: */ __pyx_v_b = 0; /* "pandas/src/generated.pyx":5223 * * b = 0 * for i in range(N): # <<<<<<<<<<<<<< * while b < ngroups - 1 and i >= bins[b]: * b += 1 */ __pyx_t_9 = __pyx_v_N; for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_9; __pyx_t_11+=1) { __pyx_v_i = __pyx_t_11; /* "pandas/src/generated.pyx":5224 * b = 0 * for i in range(N): * while b < ngroups - 1 and i >= bins[b]: # <<<<<<<<<<<<<< * b += 1 * */ while (1) { __pyx_t_12 = ((__pyx_v_b < (__pyx_v_ngroups - 1)) != 0); if (__pyx_t_12) { __pyx_t_15 = __pyx_v_b; __pyx_t_5 = -1; if (__pyx_t_15 < 0) { __pyx_t_5 = 0; } else if (unlikely(__pyx_t_15 >= __pyx_pybuffernd_bins.diminfo[0].shape)) __pyx_t_5 = 0; if (unlikely(__pyx_t_5 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_5); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5224; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_16 = ((__pyx_v_i >= (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_bins.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_bins.diminfo[0].strides))) != 0); __pyx_t_17 = __pyx_t_16; } else { __pyx_t_17 = __pyx_t_12; } if (!__pyx_t_17) break; /* "pandas/src/generated.pyx":5225 * for i in range(N): * while b < ngroups - 1 and i >= bins[b]: * b += 1 # <<<<<<<<<<<<<< * * counts[b] += 1 */ __pyx_v_b = (__pyx_v_b + 1); } /* "pandas/src/generated.pyx":5227 * b += 1 * * counts[b] += 1 # <<<<<<<<<<<<<< * for j in range(K): * val = values[i, j] */ __pyx_t_18 = __pyx_v_b; __pyx_t_5 = -1; if (__pyx_t_18 < 0) { __pyx_t_5 = 0; } else if (unlikely(__pyx_t_18 >= __pyx_pybuffernd_counts.diminfo[0].shape)) __pyx_t_5 = 0; if (unlikely(__pyx_t_5 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_5); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5227; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_counts.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_counts.diminfo[0].strides) += 1; /* "pandas/src/generated.pyx":5228 * * counts[b] += 1 * for j in range(K): # <<<<<<<<<<<<<< * val = values[i, j] * */ __pyx_t_19 = __pyx_v_K; for (__pyx_t_20 = 0; __pyx_t_20 < __pyx_t_19; __pyx_t_20+=1) { __pyx_v_j = __pyx_t_20; /* "pandas/src/generated.pyx":5229 * counts[b] += 1 * for j in range(K): * val = values[i, j] # <<<<<<<<<<<<<< * * # not nan */ __pyx_t_21 = __pyx_v_i; __pyx_t_22 = __pyx_v_j; __pyx_t_5 = -1; if (__pyx_t_21 < 0) { __pyx_t_5 = 0; } else if (unlikely(__pyx_t_21 >= __pyx_pybuffernd_values.diminfo[0].shape)) __pyx_t_5 = 0; if (__pyx_t_22 < 0) { __pyx_t_5 = 1; } else if (unlikely(__pyx_t_22 >= __pyx_pybuffernd_values.diminfo[1].shape)) __pyx_t_5 = 1; if (unlikely(__pyx_t_5 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_5); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5229; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_val = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_22, __pyx_pybuffernd_values.diminfo[1].strides)); /* "pandas/src/generated.pyx":5232 * * # not nan * if val == val: # <<<<<<<<<<<<<< * nobs[b, j] += 1 * resx[b, j] = val */ __pyx_t_17 = ((__pyx_v_val == __pyx_v_val) != 0); if (__pyx_t_17) { /* "pandas/src/generated.pyx":5233 * # not nan * if val == val: * nobs[b, j] += 1 # <<<<<<<<<<<<<< * resx[b, j] = val * */ __pyx_t_23 = __pyx_v_b; __pyx_t_24 = __pyx_v_j; __pyx_t_5 = -1; if (__pyx_t_23 < 0) { __pyx_t_5 = 0; } else if (unlikely(__pyx_t_23 >= __pyx_pybuffernd_nobs.diminfo[0].shape)) __pyx_t_5 = 0; if (__pyx_t_24 < 0) { __pyx_t_5 = 1; } else if (unlikely(__pyx_t_24 >= __pyx_pybuffernd_nobs.diminfo[1].shape)) __pyx_t_5 = 1; if (unlikely(__pyx_t_5 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_5); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5233; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_nobs.rcbuffer->pybuffer.buf, __pyx_t_23, __pyx_pybuffernd_nobs.diminfo[0].strides, __pyx_t_24, __pyx_pybuffernd_nobs.diminfo[1].strides) += 1.0; /* "pandas/src/generated.pyx":5234 * if val == val: * nobs[b, j] += 1 * resx[b, j] = val # <<<<<<<<<<<<<< * * for i in range(ngroups): */ __pyx_t_25 = __pyx_v_b; __pyx_t_26 = __pyx_v_j; __pyx_t_5 = -1; if (__pyx_t_25 < 0) { __pyx_t_5 = 0; } else if (unlikely(__pyx_t_25 >= __pyx_pybuffernd_resx.diminfo[0].shape)) __pyx_t_5 = 0; if (__pyx_t_26 < 0) { __pyx_t_5 = 1; } else if (unlikely(__pyx_t_26 >= __pyx_pybuffernd_resx.diminfo[1].shape)) __pyx_t_5 = 1; if (unlikely(__pyx_t_5 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_5); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5234; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_resx.rcbuffer->pybuffer.buf, __pyx_t_25, __pyx_pybuffernd_resx.diminfo[0].strides, __pyx_t_26, __pyx_pybuffernd_resx.diminfo[1].strides) = __pyx_v_val; goto __pyx_L12; } __pyx_L12:; } } /* "pandas/src/generated.pyx":5236 * resx[b, j] = val * * for i in range(ngroups): # <<<<<<<<<<<<<< * for j in range(K): * if nobs[i, j] == 0: */ __pyx_t_9 = __pyx_v_ngroups; for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_9; __pyx_t_11+=1) { __pyx_v_i = __pyx_t_11; /* "pandas/src/generated.pyx":5237 * * for i in range(ngroups): * for j in range(K): # <<<<<<<<<<<<<< * if nobs[i, j] == 0: * out[i, j] = nan */ __pyx_t_19 = __pyx_v_K; for (__pyx_t_20 = 0; __pyx_t_20 < __pyx_t_19; __pyx_t_20+=1) { __pyx_v_j = __pyx_t_20; /* "pandas/src/generated.pyx":5238 * for i in range(ngroups): * for j in range(K): * if nobs[i, j] == 0: # <<<<<<<<<<<<<< * out[i, j] = nan * else: */ __pyx_t_27 = __pyx_v_i; __pyx_t_28 = __pyx_v_j; __pyx_t_5 = -1; if (__pyx_t_27 < 0) { __pyx_t_5 = 0; } else if (unlikely(__pyx_t_27 >= __pyx_pybuffernd_nobs.diminfo[0].shape)) __pyx_t_5 = 0; if (__pyx_t_28 < 0) { __pyx_t_5 = 1; } else if (unlikely(__pyx_t_28 >= __pyx_pybuffernd_nobs.diminfo[1].shape)) __pyx_t_5 = 1; if (unlikely(__pyx_t_5 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_5); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5238; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_17 = (((*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_nobs.rcbuffer->pybuffer.buf, __pyx_t_27, __pyx_pybuffernd_nobs.diminfo[0].strides, __pyx_t_28, __pyx_pybuffernd_nobs.diminfo[1].strides)) == 0.0) != 0); if (__pyx_t_17) { /* "pandas/src/generated.pyx":5239 * for j in range(K): * if nobs[i, j] == 0: * out[i, j] = nan # <<<<<<<<<<<<<< * else: * out[i, j] = resx[i, j] */ __pyx_t_29 = __pyx_v_i; __pyx_t_30 = __pyx_v_j; __pyx_t_5 = -1; if (__pyx_t_29 < 0) { __pyx_t_5 = 0; } else if (unlikely(__pyx_t_29 >= __pyx_pybuffernd_out.diminfo[0].shape)) __pyx_t_5 = 0; if (__pyx_t_30 < 0) { __pyx_t_5 = 1; } else if (unlikely(__pyx_t_30 >= __pyx_pybuffernd_out.diminfo[1].shape)) __pyx_t_5 = 1; if (unlikely(__pyx_t_5 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_5); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5239; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_29, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_30, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_6pandas_5algos_nan; goto __pyx_L17; } /*else*/ { /* "pandas/src/generated.pyx":5241 * out[i, j] = nan * else: * out[i, j] = resx[i, j] # <<<<<<<<<<<<<< * * @cython.boundscheck(False) */ __pyx_t_31 = __pyx_v_i; __pyx_t_32 = __pyx_v_j; __pyx_t_5 = -1; if (__pyx_t_31 < 0) { __pyx_t_5 = 0; } else if (unlikely(__pyx_t_31 >= __pyx_pybuffernd_resx.diminfo[0].shape)) __pyx_t_5 = 0; if (__pyx_t_32 < 0) { __pyx_t_5 = 1; } else if (unlikely(__pyx_t_32 >= __pyx_pybuffernd_resx.diminfo[1].shape)) __pyx_t_5 = 1; if (unlikely(__pyx_t_5 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_5); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5241; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_33 = __pyx_v_i; __pyx_t_34 = __pyx_v_j; __pyx_t_5 = -1; if (__pyx_t_33 < 0) { __pyx_t_5 = 0; } else if (unlikely(__pyx_t_33 >= __pyx_pybuffernd_out.diminfo[0].shape)) __pyx_t_5 = 0; if (__pyx_t_34 < 0) { __pyx_t_5 = 1; } else if (unlikely(__pyx_t_34 >= __pyx_pybuffernd_out.diminfo[1].shape)) __pyx_t_5 = 1; if (unlikely(__pyx_t_5 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_5); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5241; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_33, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_34, __pyx_pybuffernd_out.diminfo[1].strides) = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_resx.rcbuffer->pybuffer.buf, __pyx_t_31, __pyx_pybuffernd_resx.diminfo[0].strides, __pyx_t_32, __pyx_pybuffernd_resx.diminfo[1].strides)); } __pyx_L17:; } } __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_13); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_bins.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_counts.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_resx.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.group_last_bin_float32", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_bins.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_counts.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_resx.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_resx); __Pyx_XDECREF((PyObject *)__pyx_v_nobs); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_395group_nth_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6pandas_5algos_394group_nth_float64[] = "\n Only aggregates on axis=0\n "; static PyMethodDef __pyx_mdef_6pandas_5algos_395group_nth_float64 = {__Pyx_NAMESTR("group_nth_float64"), (PyCFunction)__pyx_pw_6pandas_5algos_395group_nth_float64, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_5algos_394group_nth_float64)}; static PyObject *__pyx_pw_6pandas_5algos_395group_nth_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_out = 0; PyArrayObject *__pyx_v_counts = 0; PyArrayObject *__pyx_v_values = 0; PyArrayObject *__pyx_v_labels = 0; __pyx_t_5numpy_int64_t __pyx_v_rank; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("group_nth_float64 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__out,&__pyx_n_s__counts,&__pyx_n_s__values,&__pyx_n_s__labels,&__pyx_n_s__rank,0}; PyObject* values[5] = {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 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__out)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__counts)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("group_nth_float64", 1, 5, 5, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5245; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__values)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("group_nth_float64", 1, 5, 5, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5245; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__labels)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("group_nth_float64", 1, 5, 5, 3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5245; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 4: if (likely((values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__rank)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("group_nth_float64", 1, 5, 5, 4); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5245; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "group_nth_float64") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5245; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 5) { 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); } __pyx_v_out = ((PyArrayObject *)values[0]); __pyx_v_counts = ((PyArrayObject *)values[1]); __pyx_v_values = ((PyArrayObject *)values[2]); __pyx_v_labels = ((PyArrayObject *)values[3]); __pyx_v_rank = __Pyx_PyInt_from_py_npy_int64(values[4]); if (unlikely((__pyx_v_rank == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5248; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("group_nth_float64", 1, 5, 5, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5245; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.group_nth_float64", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_5numpy_ndarray, 1, "out", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5245; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_counts), __pyx_ptype_5numpy_ndarray, 1, "counts", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5246; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5247; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_labels), __pyx_ptype_5numpy_ndarray, 1, "labels", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5248; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_394group_nth_float64(__pyx_self, __pyx_v_out, __pyx_v_counts, __pyx_v_values, __pyx_v_labels, __pyx_v_rank); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":5245 * @cython.boundscheck(False) * @cython.wraparound(False) * def group_nth_float64(ndarray[float64_t, ndim=2] out, # <<<<<<<<<<<<<< * ndarray[int64_t] counts, * ndarray[float64_t, ndim=2] values, */ static PyObject *__pyx_pf_6pandas_5algos_394group_nth_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_out, PyArrayObject *__pyx_v_counts, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_labels, __pyx_t_5numpy_int64_t __pyx_v_rank) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_N; Py_ssize_t __pyx_v_K; Py_ssize_t __pyx_v_lab; __pyx_t_5numpy_float64_t __pyx_v_val; PyArrayObject *__pyx_v_resx = 0; PyArrayObject *__pyx_v_nobs = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_counts; __Pyx_Buffer __pyx_pybuffer_counts; __Pyx_LocalBuf_ND __pyx_pybuffernd_labels; __Pyx_Buffer __pyx_pybuffer_labels; __Pyx_LocalBuf_ND __pyx_pybuffernd_nobs; __Pyx_Buffer __pyx_pybuffer_nobs; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_resx; __Pyx_Buffer __pyx_pybuffer_resx; __Pyx_LocalBuf_ND __pyx_pybuffernd_values; __Pyx_Buffer __pyx_pybuffer_values; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; Py_ssize_t __pyx_t_2; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; 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; PyArrayObject *__pyx_t_14 = NULL; PyObject *(*__pyx_t_15)(PyObject *); 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; 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("group_nth_float64", 0); __pyx_pybuffer_resx.pybuffer.buf = NULL; __pyx_pybuffer_resx.refcount = 0; __pyx_pybuffernd_resx.data = NULL; __pyx_pybuffernd_resx.rcbuffer = &__pyx_pybuffer_resx; __pyx_pybuffer_nobs.pybuffer.buf = NULL; __pyx_pybuffer_nobs.refcount = 0; __pyx_pybuffernd_nobs.data = NULL; __pyx_pybuffernd_nobs.rcbuffer = &__pyx_pybuffer_nobs; __pyx_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; __pyx_pybuffer_counts.pybuffer.buf = NULL; __pyx_pybuffer_counts.refcount = 0; __pyx_pybuffernd_counts.data = NULL; __pyx_pybuffernd_counts.rcbuffer = &__pyx_pybuffer_counts; __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_labels.pybuffer.buf = NULL; __pyx_pybuffer_labels.refcount = 0; __pyx_pybuffernd_labels.data = NULL; __pyx_pybuffernd_labels.rcbuffer = &__pyx_pybuffer_labels; { __Pyx_BufFmt_StackElem __pyx_stack[1]; 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, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5245; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; __pyx_pybuffernd_out.diminfo[1].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_out.diminfo[1].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[1]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_counts.rcbuffer->pybuffer, (PyObject*)__pyx_v_counts, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5245; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_counts.diminfo[0].strides = __pyx_pybuffernd_counts.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_counts.diminfo[0].shape = __pyx_pybuffernd_counts.rcbuffer->pybuffer.shape[0]; { __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, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5245; __pyx_clineno = __LINE__; goto __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_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_labels.rcbuffer->pybuffer, (PyObject*)__pyx_v_labels, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5245; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_labels.diminfo[0].strides = __pyx_pybuffernd_labels.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_labels.diminfo[0].shape = __pyx_pybuffernd_labels.rcbuffer->pybuffer.shape[0]; /* "pandas/src/generated.pyx":5258 * ndarray[int64_t, ndim=2] nobs * * if not len(values) == len(labels): # <<<<<<<<<<<<<< * raise AssertionError("len(index) != len(labels)") * */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5258; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_2 = PyObject_Length(((PyObject *)__pyx_v_labels)); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5258; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_3 = ((!((__pyx_t_1 == __pyx_t_2) != 0)) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":5259 * * if not len(values) == len(labels): * raise AssertionError("len(index) != len(labels)") # <<<<<<<<<<<<<< * * nobs = np.zeros(( out).shape, dtype=np.int64) */ __pyx_t_4 = PyObject_Call(__pyx_builtin_AssertionError, ((PyObject *)__pyx_k_tuple_186), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5259; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 5259; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L3; } __pyx_L3:; /* "pandas/src/generated.pyx":5261 * raise AssertionError("len(index) != len(labels)") * * nobs = np.zeros(( out).shape, dtype=np.int64) # <<<<<<<<<<<<<< * resx = np.empty_like(out) * */ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5261; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s__zeros); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5261; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_out), __pyx_n_s__shape); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5261; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5261; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyDict_New(); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5261; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_4)); __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5261; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s__int64); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5261; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (PyDict_SetItem(__pyx_t_4, ((PyObject *)__pyx_n_s__dtype), __pyx_t_8) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5261; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_8 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_6), ((PyObject *)__pyx_t_4)); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5261; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; if (!(likely(((__pyx_t_8) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_8, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5261; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_9 = ((PyArrayObject *)__pyx_t_8); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer); __pyx_t_10 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer, (PyObject*)__pyx_t_9, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_nobs.rcbuffer->pybuffer, (PyObject*)__pyx_v_nobs, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_pybuffernd_nobs.diminfo[0].strides = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_nobs.diminfo[0].shape = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_nobs.diminfo[1].strides = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_nobs.diminfo[1].shape = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.shape[1]; if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5261; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_9 = 0; __pyx_v_nobs = ((PyArrayObject *)__pyx_t_8); __pyx_t_8 = 0; /* "pandas/src/generated.pyx":5262 * * nobs = np.zeros(( out).shape, dtype=np.int64) * resx = np.empty_like(out) # <<<<<<<<<<<<<< * * N, K = ( values).shape */ __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5262; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s__empty_like); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5262; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5262; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_INCREF(((PyObject *)__pyx_v_out)); PyTuple_SET_ITEM(__pyx_t_8, 0, ((PyObject *)__pyx_v_out)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out)); __pyx_t_6 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_8), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5262; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0; if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5262; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_14 = ((PyArrayObject *)__pyx_t_6); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_resx.rcbuffer->pybuffer); __pyx_t_10 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_resx.rcbuffer->pybuffer, (PyObject*)__pyx_t_14, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_resx.rcbuffer->pybuffer, (PyObject*)__pyx_v_resx, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_pybuffernd_resx.diminfo[0].strides = __pyx_pybuffernd_resx.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_resx.diminfo[0].shape = __pyx_pybuffernd_resx.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_resx.diminfo[1].strides = __pyx_pybuffernd_resx.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_resx.diminfo[1].shape = __pyx_pybuffernd_resx.rcbuffer->pybuffer.shape[1]; if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5262; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_14 = 0; __pyx_v_resx = ((PyArrayObject *)__pyx_t_6); __pyx_t_6 = 0; /* "pandas/src/generated.pyx":5264 * resx = np.empty_like(out) * * N, K = ( values).shape # <<<<<<<<<<<<<< * * for i in range(N): */ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_values), __pyx_n_s__shape); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5264; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); if ((likely(PyTuple_CheckExact(__pyx_t_6))) || (PyList_CheckExact(__pyx_t_6))) { PyObject* sequence = __pyx_t_6; #if CYTHON_COMPILING_IN_CPYTHON Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5264; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_8 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_4 = PyTuple_GET_ITEM(sequence, 1); } else { __pyx_t_8 = PyList_GET_ITEM(sequence, 0); __pyx_t_4 = PyList_GET_ITEM(sequence, 1); } __Pyx_INCREF(__pyx_t_8); __Pyx_INCREF(__pyx_t_4); #else __pyx_t_8 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5264; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5264; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); #endif __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } else { Py_ssize_t index = -1; __pyx_t_5 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5264; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_15 = Py_TYPE(__pyx_t_5)->tp_iternext; index = 0; __pyx_t_8 = __pyx_t_15(__pyx_t_5); if (unlikely(!__pyx_t_8)) goto __pyx_L4_unpacking_failed; __Pyx_GOTREF(__pyx_t_8); index = 1; __pyx_t_4 = __pyx_t_15(__pyx_t_5); if (unlikely(!__pyx_t_4)) goto __pyx_L4_unpacking_failed; __Pyx_GOTREF(__pyx_t_4); if (__Pyx_IternextUnpackEndCheck(__pyx_t_15(__pyx_t_5), 2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5264; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_15 = NULL; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; goto __pyx_L5_unpacking_done; __pyx_L4_unpacking_failed:; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_15 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5264; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_L5_unpacking_done:; } __pyx_t_2 = __Pyx_PyIndex_AsSsize_t(__pyx_t_8); if (unlikely((__pyx_t_2 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5264; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_1 = __Pyx_PyIndex_AsSsize_t(__pyx_t_4); if (unlikely((__pyx_t_1 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5264; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_N = __pyx_t_2; __pyx_v_K = __pyx_t_1; /* "pandas/src/generated.pyx":5266 * N, K = ( values).shape * * for i in range(N): # <<<<<<<<<<<<<< * lab = labels[i] * if lab < 0: */ __pyx_t_1 = __pyx_v_N; for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) { __pyx_v_i = __pyx_t_2; /* "pandas/src/generated.pyx":5267 * * for i in range(N): * lab = labels[i] # <<<<<<<<<<<<<< * if lab < 0: * continue */ __pyx_t_16 = __pyx_v_i; __pyx_v_lab = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_labels.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_labels.diminfo[0].strides)); /* "pandas/src/generated.pyx":5268 * for i in range(N): * lab = labels[i] * if lab < 0: # <<<<<<<<<<<<<< * continue * */ __pyx_t_3 = ((__pyx_v_lab < 0) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":5269 * lab = labels[i] * if lab < 0: * continue # <<<<<<<<<<<<<< * * counts[lab] += 1 */ goto __pyx_L6_continue; goto __pyx_L8; } __pyx_L8:; /* "pandas/src/generated.pyx":5271 * continue * * counts[lab] += 1 # <<<<<<<<<<<<<< * for j in range(K): * val = values[i, j] */ __pyx_t_17 = __pyx_v_lab; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_counts.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_counts.diminfo[0].strides) += 1; /* "pandas/src/generated.pyx":5272 * * counts[lab] += 1 * for j in range(K): # <<<<<<<<<<<<<< * val = values[i, j] * */ __pyx_t_18 = __pyx_v_K; for (__pyx_t_19 = 0; __pyx_t_19 < __pyx_t_18; __pyx_t_19+=1) { __pyx_v_j = __pyx_t_19; /* "pandas/src/generated.pyx":5273 * counts[lab] += 1 * for j in range(K): * val = values[i, j] # <<<<<<<<<<<<<< * * # not nan */ __pyx_t_20 = __pyx_v_i; __pyx_t_21 = __pyx_v_j; __pyx_v_val = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_21, __pyx_pybuffernd_values.diminfo[1].strides)); /* "pandas/src/generated.pyx":5276 * * # not nan * if val == val: # <<<<<<<<<<<<<< * nobs[lab, j] += 1 * if nobs[lab, j] == rank: */ __pyx_t_3 = ((__pyx_v_val == __pyx_v_val) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":5277 * # not nan * if val == val: * nobs[lab, j] += 1 # <<<<<<<<<<<<<< * if nobs[lab, j] == rank: * resx[lab, j] = val */ __pyx_t_22 = __pyx_v_lab; __pyx_t_23 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_nobs.rcbuffer->pybuffer.buf, __pyx_t_22, __pyx_pybuffernd_nobs.diminfo[0].strides, __pyx_t_23, __pyx_pybuffernd_nobs.diminfo[1].strides) += 1; /* "pandas/src/generated.pyx":5278 * if val == val: * nobs[lab, j] += 1 * if nobs[lab, j] == rank: # <<<<<<<<<<<<<< * resx[lab, j] = val * */ __pyx_t_24 = __pyx_v_lab; __pyx_t_25 = __pyx_v_j; __pyx_t_3 = (((*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_nobs.rcbuffer->pybuffer.buf, __pyx_t_24, __pyx_pybuffernd_nobs.diminfo[0].strides, __pyx_t_25, __pyx_pybuffernd_nobs.diminfo[1].strides)) == __pyx_v_rank) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":5279 * nobs[lab, j] += 1 * if nobs[lab, j] == rank: * resx[lab, j] = val # <<<<<<<<<<<<<< * * for i in range(len(counts)): */ __pyx_t_26 = __pyx_v_lab; __pyx_t_27 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_resx.rcbuffer->pybuffer.buf, __pyx_t_26, __pyx_pybuffernd_resx.diminfo[0].strides, __pyx_t_27, __pyx_pybuffernd_resx.diminfo[1].strides) = __pyx_v_val; goto __pyx_L12; } __pyx_L12:; goto __pyx_L11; } __pyx_L11:; } __pyx_L6_continue:; } /* "pandas/src/generated.pyx":5281 * resx[lab, j] = val * * for i in range(len(counts)): # <<<<<<<<<<<<<< * for j in range(K): * if nobs[i, j] == 0: */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_counts)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5281; __pyx_clineno = __LINE__; goto __pyx_L1_error;} for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) { __pyx_v_i = __pyx_t_2; /* "pandas/src/generated.pyx":5282 * * for i in range(len(counts)): * for j in range(K): # <<<<<<<<<<<<<< * if nobs[i, j] == 0: * out[i, j] = nan */ __pyx_t_18 = __pyx_v_K; for (__pyx_t_19 = 0; __pyx_t_19 < __pyx_t_18; __pyx_t_19+=1) { __pyx_v_j = __pyx_t_19; /* "pandas/src/generated.pyx":5283 * for i in range(len(counts)): * for j in range(K): * if nobs[i, j] == 0: # <<<<<<<<<<<<<< * out[i, j] = nan * else: */ __pyx_t_28 = __pyx_v_i; __pyx_t_29 = __pyx_v_j; __pyx_t_3 = (((*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_nobs.rcbuffer->pybuffer.buf, __pyx_t_28, __pyx_pybuffernd_nobs.diminfo[0].strides, __pyx_t_29, __pyx_pybuffernd_nobs.diminfo[1].strides)) == 0) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":5284 * for j in range(K): * if nobs[i, j] == 0: * out[i, j] = nan # <<<<<<<<<<<<<< * else: * out[i, j] = resx[i, j] */ __pyx_t_30 = __pyx_v_i; __pyx_t_31 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_30, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_31, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_6pandas_5algos_nan; goto __pyx_L17; } /*else*/ { /* "pandas/src/generated.pyx":5286 * out[i, j] = nan * else: * out[i, j] = resx[i, j] # <<<<<<<<<<<<<< * @cython.boundscheck(False) * @cython.wraparound(False) */ __pyx_t_32 = __pyx_v_i; __pyx_t_33 = __pyx_v_j; __pyx_t_34 = __pyx_v_i; __pyx_t_35 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_34, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_35, __pyx_pybuffernd_out.diminfo[1].strides) = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_resx.rcbuffer->pybuffer.buf, __pyx_t_32, __pyx_pybuffernd_resx.diminfo[0].strides, __pyx_t_33, __pyx_pybuffernd_resx.diminfo[1].strides)); } __pyx_L17:; } } __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_counts.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_labels.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_resx.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.group_nth_float64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_counts.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_labels.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_resx.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_resx); __Pyx_XDECREF((PyObject *)__pyx_v_nobs); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_397group_nth_float32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6pandas_5algos_396group_nth_float32[] = "\n Only aggregates on axis=0\n "; static PyMethodDef __pyx_mdef_6pandas_5algos_397group_nth_float32 = {__Pyx_NAMESTR("group_nth_float32"), (PyCFunction)__pyx_pw_6pandas_5algos_397group_nth_float32, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_5algos_396group_nth_float32)}; static PyObject *__pyx_pw_6pandas_5algos_397group_nth_float32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_out = 0; PyArrayObject *__pyx_v_counts = 0; PyArrayObject *__pyx_v_values = 0; PyArrayObject *__pyx_v_labels = 0; __pyx_t_5numpy_int64_t __pyx_v_rank; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("group_nth_float32 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__out,&__pyx_n_s__counts,&__pyx_n_s__values,&__pyx_n_s__labels,&__pyx_n_s__rank,0}; PyObject* values[5] = {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 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__out)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__counts)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("group_nth_float32", 1, 5, 5, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5289; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__values)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("group_nth_float32", 1, 5, 5, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5289; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__labels)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("group_nth_float32", 1, 5, 5, 3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5289; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 4: if (likely((values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__rank)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("group_nth_float32", 1, 5, 5, 4); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5289; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "group_nth_float32") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5289; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 5) { 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); } __pyx_v_out = ((PyArrayObject *)values[0]); __pyx_v_counts = ((PyArrayObject *)values[1]); __pyx_v_values = ((PyArrayObject *)values[2]); __pyx_v_labels = ((PyArrayObject *)values[3]); __pyx_v_rank = __Pyx_PyInt_from_py_npy_int64(values[4]); if (unlikely((__pyx_v_rank == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5292; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("group_nth_float32", 1, 5, 5, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5289; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.group_nth_float32", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_5numpy_ndarray, 1, "out", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5289; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_counts), __pyx_ptype_5numpy_ndarray, 1, "counts", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5290; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5291; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_labels), __pyx_ptype_5numpy_ndarray, 1, "labels", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5292; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_396group_nth_float32(__pyx_self, __pyx_v_out, __pyx_v_counts, __pyx_v_values, __pyx_v_labels, __pyx_v_rank); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":5289 * @cython.boundscheck(False) * @cython.wraparound(False) * def group_nth_float32(ndarray[float32_t, ndim=2] out, # <<<<<<<<<<<<<< * ndarray[int64_t] counts, * ndarray[float32_t, ndim=2] values, */ static PyObject *__pyx_pf_6pandas_5algos_396group_nth_float32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_out, PyArrayObject *__pyx_v_counts, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_labels, __pyx_t_5numpy_int64_t __pyx_v_rank) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_N; Py_ssize_t __pyx_v_K; Py_ssize_t __pyx_v_lab; __pyx_t_5numpy_float32_t __pyx_v_val; PyArrayObject *__pyx_v_resx = 0; PyArrayObject *__pyx_v_nobs = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_counts; __Pyx_Buffer __pyx_pybuffer_counts; __Pyx_LocalBuf_ND __pyx_pybuffernd_labels; __Pyx_Buffer __pyx_pybuffer_labels; __Pyx_LocalBuf_ND __pyx_pybuffernd_nobs; __Pyx_Buffer __pyx_pybuffer_nobs; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_resx; __Pyx_Buffer __pyx_pybuffer_resx; __Pyx_LocalBuf_ND __pyx_pybuffernd_values; __Pyx_Buffer __pyx_pybuffer_values; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; Py_ssize_t __pyx_t_2; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; 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; PyArrayObject *__pyx_t_14 = NULL; PyObject *(*__pyx_t_15)(PyObject *); 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; 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("group_nth_float32", 0); __pyx_pybuffer_resx.pybuffer.buf = NULL; __pyx_pybuffer_resx.refcount = 0; __pyx_pybuffernd_resx.data = NULL; __pyx_pybuffernd_resx.rcbuffer = &__pyx_pybuffer_resx; __pyx_pybuffer_nobs.pybuffer.buf = NULL; __pyx_pybuffer_nobs.refcount = 0; __pyx_pybuffernd_nobs.data = NULL; __pyx_pybuffernd_nobs.rcbuffer = &__pyx_pybuffer_nobs; __pyx_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; __pyx_pybuffer_counts.pybuffer.buf = NULL; __pyx_pybuffer_counts.refcount = 0; __pyx_pybuffernd_counts.data = NULL; __pyx_pybuffernd_counts.rcbuffer = &__pyx_pybuffer_counts; __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_labels.pybuffer.buf = NULL; __pyx_pybuffer_labels.refcount = 0; __pyx_pybuffernd_labels.data = NULL; __pyx_pybuffernd_labels.rcbuffer = &__pyx_pybuffer_labels; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_v_out, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5289; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; __pyx_pybuffernd_out.diminfo[1].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_out.diminfo[1].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[1]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_counts.rcbuffer->pybuffer, (PyObject*)__pyx_v_counts, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5289; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_counts.diminfo[0].strides = __pyx_pybuffernd_counts.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_counts.diminfo[0].shape = __pyx_pybuffernd_counts.rcbuffer->pybuffer.shape[0]; { __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_float32_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5289; __pyx_clineno = __LINE__; goto __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_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_labels.rcbuffer->pybuffer, (PyObject*)__pyx_v_labels, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5289; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_labels.diminfo[0].strides = __pyx_pybuffernd_labels.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_labels.diminfo[0].shape = __pyx_pybuffernd_labels.rcbuffer->pybuffer.shape[0]; /* "pandas/src/generated.pyx":5302 * ndarray[int64_t, ndim=2] nobs * * if not len(values) == len(labels): # <<<<<<<<<<<<<< * raise AssertionError("len(index) != len(labels)") * */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5302; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_2 = PyObject_Length(((PyObject *)__pyx_v_labels)); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5302; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_3 = ((!((__pyx_t_1 == __pyx_t_2) != 0)) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":5303 * * if not len(values) == len(labels): * raise AssertionError("len(index) != len(labels)") # <<<<<<<<<<<<<< * * nobs = np.zeros(( out).shape, dtype=np.int64) */ __pyx_t_4 = PyObject_Call(__pyx_builtin_AssertionError, ((PyObject *)__pyx_k_tuple_187), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5303; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 5303; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L3; } __pyx_L3:; /* "pandas/src/generated.pyx":5305 * raise AssertionError("len(index) != len(labels)") * * nobs = np.zeros(( out).shape, dtype=np.int64) # <<<<<<<<<<<<<< * resx = np.empty_like(out) * */ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5305; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s__zeros); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5305; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_out), __pyx_n_s__shape); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5305; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5305; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyDict_New(); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5305; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_4)); __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5305; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s__int64); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5305; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (PyDict_SetItem(__pyx_t_4, ((PyObject *)__pyx_n_s__dtype), __pyx_t_8) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5305; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_8 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_6), ((PyObject *)__pyx_t_4)); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5305; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; if (!(likely(((__pyx_t_8) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_8, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5305; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_9 = ((PyArrayObject *)__pyx_t_8); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer); __pyx_t_10 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer, (PyObject*)__pyx_t_9, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_nobs.rcbuffer->pybuffer, (PyObject*)__pyx_v_nobs, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_pybuffernd_nobs.diminfo[0].strides = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_nobs.diminfo[0].shape = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_nobs.diminfo[1].strides = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_nobs.diminfo[1].shape = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.shape[1]; if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5305; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_9 = 0; __pyx_v_nobs = ((PyArrayObject *)__pyx_t_8); __pyx_t_8 = 0; /* "pandas/src/generated.pyx":5306 * * nobs = np.zeros(( out).shape, dtype=np.int64) * resx = np.empty_like(out) # <<<<<<<<<<<<<< * * N, K = ( values).shape */ __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5306; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s__empty_like); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5306; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5306; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_INCREF(((PyObject *)__pyx_v_out)); PyTuple_SET_ITEM(__pyx_t_8, 0, ((PyObject *)__pyx_v_out)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out)); __pyx_t_6 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_8), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5306; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0; if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5306; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_14 = ((PyArrayObject *)__pyx_t_6); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_resx.rcbuffer->pybuffer); __pyx_t_10 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_resx.rcbuffer->pybuffer, (PyObject*)__pyx_t_14, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_resx.rcbuffer->pybuffer, (PyObject*)__pyx_v_resx, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_pybuffernd_resx.diminfo[0].strides = __pyx_pybuffernd_resx.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_resx.diminfo[0].shape = __pyx_pybuffernd_resx.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_resx.diminfo[1].strides = __pyx_pybuffernd_resx.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_resx.diminfo[1].shape = __pyx_pybuffernd_resx.rcbuffer->pybuffer.shape[1]; if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5306; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_14 = 0; __pyx_v_resx = ((PyArrayObject *)__pyx_t_6); __pyx_t_6 = 0; /* "pandas/src/generated.pyx":5308 * resx = np.empty_like(out) * * N, K = ( values).shape # <<<<<<<<<<<<<< * * for i in range(N): */ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_values), __pyx_n_s__shape); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5308; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); if ((likely(PyTuple_CheckExact(__pyx_t_6))) || (PyList_CheckExact(__pyx_t_6))) { PyObject* sequence = __pyx_t_6; #if CYTHON_COMPILING_IN_CPYTHON Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5308; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_8 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_4 = PyTuple_GET_ITEM(sequence, 1); } else { __pyx_t_8 = PyList_GET_ITEM(sequence, 0); __pyx_t_4 = PyList_GET_ITEM(sequence, 1); } __Pyx_INCREF(__pyx_t_8); __Pyx_INCREF(__pyx_t_4); #else __pyx_t_8 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5308; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5308; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); #endif __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } else { Py_ssize_t index = -1; __pyx_t_5 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5308; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_15 = Py_TYPE(__pyx_t_5)->tp_iternext; index = 0; __pyx_t_8 = __pyx_t_15(__pyx_t_5); if (unlikely(!__pyx_t_8)) goto __pyx_L4_unpacking_failed; __Pyx_GOTREF(__pyx_t_8); index = 1; __pyx_t_4 = __pyx_t_15(__pyx_t_5); if (unlikely(!__pyx_t_4)) goto __pyx_L4_unpacking_failed; __Pyx_GOTREF(__pyx_t_4); if (__Pyx_IternextUnpackEndCheck(__pyx_t_15(__pyx_t_5), 2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5308; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_15 = NULL; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; goto __pyx_L5_unpacking_done; __pyx_L4_unpacking_failed:; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_15 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5308; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_L5_unpacking_done:; } __pyx_t_2 = __Pyx_PyIndex_AsSsize_t(__pyx_t_8); if (unlikely((__pyx_t_2 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5308; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_1 = __Pyx_PyIndex_AsSsize_t(__pyx_t_4); if (unlikely((__pyx_t_1 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5308; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_N = __pyx_t_2; __pyx_v_K = __pyx_t_1; /* "pandas/src/generated.pyx":5310 * N, K = ( values).shape * * for i in range(N): # <<<<<<<<<<<<<< * lab = labels[i] * if lab < 0: */ __pyx_t_1 = __pyx_v_N; for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) { __pyx_v_i = __pyx_t_2; /* "pandas/src/generated.pyx":5311 * * for i in range(N): * lab = labels[i] # <<<<<<<<<<<<<< * if lab < 0: * continue */ __pyx_t_16 = __pyx_v_i; __pyx_v_lab = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_labels.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_labels.diminfo[0].strides)); /* "pandas/src/generated.pyx":5312 * for i in range(N): * lab = labels[i] * if lab < 0: # <<<<<<<<<<<<<< * continue * */ __pyx_t_3 = ((__pyx_v_lab < 0) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":5313 * lab = labels[i] * if lab < 0: * continue # <<<<<<<<<<<<<< * * counts[lab] += 1 */ goto __pyx_L6_continue; goto __pyx_L8; } __pyx_L8:; /* "pandas/src/generated.pyx":5315 * continue * * counts[lab] += 1 # <<<<<<<<<<<<<< * for j in range(K): * val = values[i, j] */ __pyx_t_17 = __pyx_v_lab; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_counts.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_counts.diminfo[0].strides) += 1; /* "pandas/src/generated.pyx":5316 * * counts[lab] += 1 * for j in range(K): # <<<<<<<<<<<<<< * val = values[i, j] * */ __pyx_t_18 = __pyx_v_K; for (__pyx_t_19 = 0; __pyx_t_19 < __pyx_t_18; __pyx_t_19+=1) { __pyx_v_j = __pyx_t_19; /* "pandas/src/generated.pyx":5317 * counts[lab] += 1 * for j in range(K): * val = values[i, j] # <<<<<<<<<<<<<< * * # not nan */ __pyx_t_20 = __pyx_v_i; __pyx_t_21 = __pyx_v_j; __pyx_v_val = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_21, __pyx_pybuffernd_values.diminfo[1].strides)); /* "pandas/src/generated.pyx":5320 * * # not nan * if val == val: # <<<<<<<<<<<<<< * nobs[lab, j] += 1 * if nobs[lab, j] == rank: */ __pyx_t_3 = ((__pyx_v_val == __pyx_v_val) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":5321 * # not nan * if val == val: * nobs[lab, j] += 1 # <<<<<<<<<<<<<< * if nobs[lab, j] == rank: * resx[lab, j] = val */ __pyx_t_22 = __pyx_v_lab; __pyx_t_23 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_nobs.rcbuffer->pybuffer.buf, __pyx_t_22, __pyx_pybuffernd_nobs.diminfo[0].strides, __pyx_t_23, __pyx_pybuffernd_nobs.diminfo[1].strides) += 1; /* "pandas/src/generated.pyx":5322 * if val == val: * nobs[lab, j] += 1 * if nobs[lab, j] == rank: # <<<<<<<<<<<<<< * resx[lab, j] = val * */ __pyx_t_24 = __pyx_v_lab; __pyx_t_25 = __pyx_v_j; __pyx_t_3 = (((*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_nobs.rcbuffer->pybuffer.buf, __pyx_t_24, __pyx_pybuffernd_nobs.diminfo[0].strides, __pyx_t_25, __pyx_pybuffernd_nobs.diminfo[1].strides)) == __pyx_v_rank) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":5323 * nobs[lab, j] += 1 * if nobs[lab, j] == rank: * resx[lab, j] = val # <<<<<<<<<<<<<< * * for i in range(len(counts)): */ __pyx_t_26 = __pyx_v_lab; __pyx_t_27 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_resx.rcbuffer->pybuffer.buf, __pyx_t_26, __pyx_pybuffernd_resx.diminfo[0].strides, __pyx_t_27, __pyx_pybuffernd_resx.diminfo[1].strides) = __pyx_v_val; goto __pyx_L12; } __pyx_L12:; goto __pyx_L11; } __pyx_L11:; } __pyx_L6_continue:; } /* "pandas/src/generated.pyx":5325 * resx[lab, j] = val * * for i in range(len(counts)): # <<<<<<<<<<<<<< * for j in range(K): * if nobs[i, j] == 0: */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_counts)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5325; __pyx_clineno = __LINE__; goto __pyx_L1_error;} for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) { __pyx_v_i = __pyx_t_2; /* "pandas/src/generated.pyx":5326 * * for i in range(len(counts)): * for j in range(K): # <<<<<<<<<<<<<< * if nobs[i, j] == 0: * out[i, j] = nan */ __pyx_t_18 = __pyx_v_K; for (__pyx_t_19 = 0; __pyx_t_19 < __pyx_t_18; __pyx_t_19+=1) { __pyx_v_j = __pyx_t_19; /* "pandas/src/generated.pyx":5327 * for i in range(len(counts)): * for j in range(K): * if nobs[i, j] == 0: # <<<<<<<<<<<<<< * out[i, j] = nan * else: */ __pyx_t_28 = __pyx_v_i; __pyx_t_29 = __pyx_v_j; __pyx_t_3 = (((*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_nobs.rcbuffer->pybuffer.buf, __pyx_t_28, __pyx_pybuffernd_nobs.diminfo[0].strides, __pyx_t_29, __pyx_pybuffernd_nobs.diminfo[1].strides)) == 0) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":5328 * for j in range(K): * if nobs[i, j] == 0: * out[i, j] = nan # <<<<<<<<<<<<<< * else: * out[i, j] = resx[i, j] */ __pyx_t_30 = __pyx_v_i; __pyx_t_31 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_30, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_31, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_6pandas_5algos_nan; goto __pyx_L17; } /*else*/ { /* "pandas/src/generated.pyx":5330 * out[i, j] = nan * else: * out[i, j] = resx[i, j] # <<<<<<<<<<<<<< * * @cython.boundscheck(False) */ __pyx_t_32 = __pyx_v_i; __pyx_t_33 = __pyx_v_j; __pyx_t_34 = __pyx_v_i; __pyx_t_35 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_34, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_35, __pyx_pybuffernd_out.diminfo[1].strides) = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_resx.rcbuffer->pybuffer.buf, __pyx_t_32, __pyx_pybuffernd_resx.diminfo[0].strides, __pyx_t_33, __pyx_pybuffernd_resx.diminfo[1].strides)); } __pyx_L17:; } } __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_counts.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_labels.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_resx.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.group_nth_float32", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_counts.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_labels.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_resx.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_resx); __Pyx_XDECREF((PyObject *)__pyx_v_nobs); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_399group_nth_bin_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6pandas_5algos_398group_nth_bin_float64[] = "\n Only aggregates on axis=0\n "; static PyMethodDef __pyx_mdef_6pandas_5algos_399group_nth_bin_float64 = {__Pyx_NAMESTR("group_nth_bin_float64"), (PyCFunction)__pyx_pw_6pandas_5algos_399group_nth_bin_float64, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_5algos_398group_nth_bin_float64)}; static PyObject *__pyx_pw_6pandas_5algos_399group_nth_bin_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_out = 0; PyArrayObject *__pyx_v_counts = 0; PyArrayObject *__pyx_v_values = 0; PyArrayObject *__pyx_v_bins = 0; __pyx_t_5numpy_int64_t __pyx_v_rank; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("group_nth_bin_float64 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__out,&__pyx_n_s__counts,&__pyx_n_s__values,&__pyx_n_s__bins,&__pyx_n_s__rank,0}; PyObject* values[5] = {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 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__out)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__counts)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("group_nth_bin_float64", 1, 5, 5, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5334; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__values)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("group_nth_bin_float64", 1, 5, 5, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5334; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__bins)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("group_nth_bin_float64", 1, 5, 5, 3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5334; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 4: if (likely((values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__rank)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("group_nth_bin_float64", 1, 5, 5, 4); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5334; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "group_nth_bin_float64") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5334; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 5) { 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); } __pyx_v_out = ((PyArrayObject *)values[0]); __pyx_v_counts = ((PyArrayObject *)values[1]); __pyx_v_values = ((PyArrayObject *)values[2]); __pyx_v_bins = ((PyArrayObject *)values[3]); __pyx_v_rank = __Pyx_PyInt_from_py_npy_int64(values[4]); if (unlikely((__pyx_v_rank == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5337; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("group_nth_bin_float64", 1, 5, 5, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5334; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.group_nth_bin_float64", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_5numpy_ndarray, 1, "out", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5334; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_counts), __pyx_ptype_5numpy_ndarray, 1, "counts", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5335; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5336; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_bins), __pyx_ptype_5numpy_ndarray, 1, "bins", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5337; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_398group_nth_bin_float64(__pyx_self, __pyx_v_out, __pyx_v_counts, __pyx_v_values, __pyx_v_bins, __pyx_v_rank); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":5334 * @cython.boundscheck(False) * @cython.wraparound(False) * def group_nth_bin_float64(ndarray[float64_t, ndim=2] out, # <<<<<<<<<<<<<< * ndarray[int64_t] counts, * ndarray[float64_t, ndim=2] values, */ static PyObject *__pyx_pf_6pandas_5algos_398group_nth_bin_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_out, PyArrayObject *__pyx_v_counts, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_bins, __pyx_t_5numpy_int64_t __pyx_v_rank) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_N; Py_ssize_t __pyx_v_K; Py_ssize_t __pyx_v_ngroups; Py_ssize_t __pyx_v_b; __pyx_t_5numpy_float64_t __pyx_v_val; PyArrayObject *__pyx_v_resx = 0; PyArrayObject *__pyx_v_nobs = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_bins; __Pyx_Buffer __pyx_pybuffer_bins; __Pyx_LocalBuf_ND __pyx_pybuffernd_counts; __Pyx_Buffer __pyx_pybuffer_counts; __Pyx_LocalBuf_ND __pyx_pybuffernd_nobs; __Pyx_Buffer __pyx_pybuffer_nobs; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_resx; __Pyx_Buffer __pyx_pybuffer_resx; __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; PyArrayObject *__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; Py_ssize_t __pyx_t_11; int __pyx_t_12; PyObject *__pyx_t_13 = NULL; PyObject *(*__pyx_t_14)(PyObject *); Py_ssize_t __pyx_t_15; int __pyx_t_16; int __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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("group_nth_bin_float64", 0); __pyx_pybuffer_resx.pybuffer.buf = NULL; __pyx_pybuffer_resx.refcount = 0; __pyx_pybuffernd_resx.data = NULL; __pyx_pybuffernd_resx.rcbuffer = &__pyx_pybuffer_resx; __pyx_pybuffer_nobs.pybuffer.buf = NULL; __pyx_pybuffer_nobs.refcount = 0; __pyx_pybuffernd_nobs.data = NULL; __pyx_pybuffernd_nobs.rcbuffer = &__pyx_pybuffer_nobs; __pyx_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; __pyx_pybuffer_counts.pybuffer.buf = NULL; __pyx_pybuffer_counts.refcount = 0; __pyx_pybuffernd_counts.data = NULL; __pyx_pybuffernd_counts.rcbuffer = &__pyx_pybuffer_counts; __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_bins.pybuffer.buf = NULL; __pyx_pybuffer_bins.refcount = 0; __pyx_pybuffernd_bins.data = NULL; __pyx_pybuffernd_bins.rcbuffer = &__pyx_pybuffer_bins; { __Pyx_BufFmt_StackElem __pyx_stack[1]; 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, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5334; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; __pyx_pybuffernd_out.diminfo[1].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_out.diminfo[1].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[1]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_counts.rcbuffer->pybuffer, (PyObject*)__pyx_v_counts, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5334; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_counts.diminfo[0].strides = __pyx_pybuffernd_counts.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_counts.diminfo[0].shape = __pyx_pybuffernd_counts.rcbuffer->pybuffer.shape[0]; { __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, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5334; __pyx_clineno = __LINE__; goto __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_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_bins.rcbuffer->pybuffer, (PyObject*)__pyx_v_bins, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5334; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_bins.diminfo[0].strides = __pyx_pybuffernd_bins.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_bins.diminfo[0].shape = __pyx_pybuffernd_bins.rcbuffer->pybuffer.shape[0]; /* "pandas/src/generated.pyx":5346 * ndarray[float64_t, ndim=2] resx, nobs * * nobs = np.zeros_like(out) # <<<<<<<<<<<<<< * resx = np.empty_like(out) * */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5346; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s__zeros_like); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5346; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 5346; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)__pyx_v_out)); PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_out)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out)); __pyx_t_3 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5346; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(((PyObject *)__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_filename = __pyx_f[2]; __pyx_lineno = 5346; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_4 = ((PyArrayObject *)__pyx_t_3); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer); __pyx_t_5 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer, (PyObject*)__pyx_t_4, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_nobs.rcbuffer->pybuffer, (PyObject*)__pyx_v_nobs, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_pybuffernd_nobs.diminfo[0].strides = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_nobs.diminfo[0].shape = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_nobs.diminfo[1].strides = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_nobs.diminfo[1].shape = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.shape[1]; if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5346; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_4 = 0; __pyx_v_nobs = ((PyArrayObject *)__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/generated.pyx":5347 * * nobs = np.zeros_like(out) * resx = np.empty_like(out) # <<<<<<<<<<<<<< * * if bins[len(bins) - 1] == len(values): */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5347; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s__empty_like); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5347; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5347; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(((PyObject *)__pyx_v_out)); PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_v_out)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out)); __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5347; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(((PyObject *)__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_filename = __pyx_f[2]; __pyx_lineno = 5347; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_4 = ((PyArrayObject *)__pyx_t_2); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_resx.rcbuffer->pybuffer); __pyx_t_5 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_resx.rcbuffer->pybuffer, (PyObject*)__pyx_t_4, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_resx.rcbuffer->pybuffer, (PyObject*)__pyx_v_resx, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_pybuffernd_resx.diminfo[0].strides = __pyx_pybuffernd_resx.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_resx.diminfo[0].shape = __pyx_pybuffernd_resx.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_resx.diminfo[1].strides = __pyx_pybuffernd_resx.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_resx.diminfo[1].shape = __pyx_pybuffernd_resx.rcbuffer->pybuffer.shape[1]; if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5347; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_4 = 0; __pyx_v_resx = ((PyArrayObject *)__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":5349 * resx = np.empty_like(out) * * if bins[len(bins) - 1] == len(values): # <<<<<<<<<<<<<< * ngroups = len(bins) * else: */ __pyx_t_9 = PyObject_Length(((PyObject *)__pyx_v_bins)); if (unlikely(__pyx_t_9 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5349; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_10 = (__pyx_t_9 - 1); __pyx_t_11 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5349; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_12 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_bins.rcbuffer->pybuffer.buf, __pyx_t_10, __pyx_pybuffernd_bins.diminfo[0].strides)) == __pyx_t_11) != 0); if (__pyx_t_12) { /* "pandas/src/generated.pyx":5350 * * if bins[len(bins) - 1] == len(values): * ngroups = len(bins) # <<<<<<<<<<<<<< * else: * ngroups = len(bins) + 1 */ __pyx_t_11 = PyObject_Length(((PyObject *)__pyx_v_bins)); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5350; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_ngroups = __pyx_t_11; goto __pyx_L3; } /*else*/ { /* "pandas/src/generated.pyx":5352 * ngroups = len(bins) * else: * ngroups = len(bins) + 1 # <<<<<<<<<<<<<< * * N, K = ( values).shape */ __pyx_t_11 = PyObject_Length(((PyObject *)__pyx_v_bins)); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5352; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_ngroups = (__pyx_t_11 + 1); } __pyx_L3:; /* "pandas/src/generated.pyx":5354 * ngroups = len(bins) + 1 * * N, K = ( values).shape # <<<<<<<<<<<<<< * * b = 0 */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_values), __pyx_n_s__shape); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5354; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if ((likely(PyTuple_CheckExact(__pyx_t_2))) || (PyList_CheckExact(__pyx_t_2))) { PyObject* sequence = __pyx_t_2; #if CYTHON_COMPILING_IN_CPYTHON Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5354; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_1 = PyTuple_GET_ITEM(sequence, 1); } else { __pyx_t_3 = PyList_GET_ITEM(sequence, 0); __pyx_t_1 = PyList_GET_ITEM(sequence, 1); } __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(__pyx_t_1); #else __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5354; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5354; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); #endif __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } else { Py_ssize_t index = -1; __pyx_t_13 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5354; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_14 = Py_TYPE(__pyx_t_13)->tp_iternext; index = 0; __pyx_t_3 = __pyx_t_14(__pyx_t_13); if (unlikely(!__pyx_t_3)) goto __pyx_L4_unpacking_failed; __Pyx_GOTREF(__pyx_t_3); index = 1; __pyx_t_1 = __pyx_t_14(__pyx_t_13); if (unlikely(!__pyx_t_1)) goto __pyx_L4_unpacking_failed; __Pyx_GOTREF(__pyx_t_1); if (__Pyx_IternextUnpackEndCheck(__pyx_t_14(__pyx_t_13), 2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5354; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_14 = NULL; __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; goto __pyx_L5_unpacking_done; __pyx_L4_unpacking_failed:; __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_14 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5354; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_L5_unpacking_done:; } __pyx_t_11 = __Pyx_PyIndex_AsSsize_t(__pyx_t_3); if (unlikely((__pyx_t_11 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5354; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_9 = __Pyx_PyIndex_AsSsize_t(__pyx_t_1); if (unlikely((__pyx_t_9 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5354; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_N = __pyx_t_11; __pyx_v_K = __pyx_t_9; /* "pandas/src/generated.pyx":5356 * N, K = ( values).shape * * b = 0 # <<<<<<<<<<<<<< * for i in range(N): * while b < ngroups - 1 and i >= bins[b]: */ __pyx_v_b = 0; /* "pandas/src/generated.pyx":5357 * * b = 0 * for i in range(N): # <<<<<<<<<<<<<< * while b < ngroups - 1 and i >= bins[b]: * b += 1 */ __pyx_t_9 = __pyx_v_N; for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_9; __pyx_t_11+=1) { __pyx_v_i = __pyx_t_11; /* "pandas/src/generated.pyx":5358 * b = 0 * for i in range(N): * while b < ngroups - 1 and i >= bins[b]: # <<<<<<<<<<<<<< * b += 1 * */ while (1) { __pyx_t_12 = ((__pyx_v_b < (__pyx_v_ngroups - 1)) != 0); if (__pyx_t_12) { __pyx_t_15 = __pyx_v_b; __pyx_t_16 = ((__pyx_v_i >= (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_bins.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_bins.diminfo[0].strides))) != 0); __pyx_t_17 = __pyx_t_16; } else { __pyx_t_17 = __pyx_t_12; } if (!__pyx_t_17) break; /* "pandas/src/generated.pyx":5359 * for i in range(N): * while b < ngroups - 1 and i >= bins[b]: * b += 1 # <<<<<<<<<<<<<< * * counts[b] += 1 */ __pyx_v_b = (__pyx_v_b + 1); } /* "pandas/src/generated.pyx":5361 * b += 1 * * counts[b] += 1 # <<<<<<<<<<<<<< * for j in range(K): * val = values[i, j] */ __pyx_t_18 = __pyx_v_b; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_counts.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_counts.diminfo[0].strides) += 1; /* "pandas/src/generated.pyx":5362 * * counts[b] += 1 * for j in range(K): # <<<<<<<<<<<<<< * val = values[i, j] * */ __pyx_t_19 = __pyx_v_K; for (__pyx_t_20 = 0; __pyx_t_20 < __pyx_t_19; __pyx_t_20+=1) { __pyx_v_j = __pyx_t_20; /* "pandas/src/generated.pyx":5363 * counts[b] += 1 * for j in range(K): * val = values[i, j] # <<<<<<<<<<<<<< * * # not nan */ __pyx_t_21 = __pyx_v_i; __pyx_t_22 = __pyx_v_j; __pyx_v_val = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_22, __pyx_pybuffernd_values.diminfo[1].strides)); /* "pandas/src/generated.pyx":5366 * * # not nan * if val == val: # <<<<<<<<<<<<<< * nobs[b, j] += 1 * if nobs[b, j] == rank: */ __pyx_t_17 = ((__pyx_v_val == __pyx_v_val) != 0); if (__pyx_t_17) { /* "pandas/src/generated.pyx":5367 * # not nan * if val == val: * nobs[b, j] += 1 # <<<<<<<<<<<<<< * if nobs[b, j] == rank: * resx[b, j] = val */ __pyx_t_23 = __pyx_v_b; __pyx_t_24 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_nobs.rcbuffer->pybuffer.buf, __pyx_t_23, __pyx_pybuffernd_nobs.diminfo[0].strides, __pyx_t_24, __pyx_pybuffernd_nobs.diminfo[1].strides) += 1.0; /* "pandas/src/generated.pyx":5368 * if val == val: * nobs[b, j] += 1 * if nobs[b, j] == rank: # <<<<<<<<<<<<<< * resx[b, j] = val * */ __pyx_t_25 = __pyx_v_b; __pyx_t_26 = __pyx_v_j; __pyx_t_17 = (((*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_nobs.rcbuffer->pybuffer.buf, __pyx_t_25, __pyx_pybuffernd_nobs.diminfo[0].strides, __pyx_t_26, __pyx_pybuffernd_nobs.diminfo[1].strides)) == __pyx_v_rank) != 0); if (__pyx_t_17) { /* "pandas/src/generated.pyx":5369 * nobs[b, j] += 1 * if nobs[b, j] == rank: * resx[b, j] = val # <<<<<<<<<<<<<< * * for i in range(ngroups): */ __pyx_t_27 = __pyx_v_b; __pyx_t_28 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_resx.rcbuffer->pybuffer.buf, __pyx_t_27, __pyx_pybuffernd_resx.diminfo[0].strides, __pyx_t_28, __pyx_pybuffernd_resx.diminfo[1].strides) = __pyx_v_val; goto __pyx_L13; } __pyx_L13:; goto __pyx_L12; } __pyx_L12:; } } /* "pandas/src/generated.pyx":5371 * resx[b, j] = val * * for i in range(ngroups): # <<<<<<<<<<<<<< * for j in range(K): * if nobs[i, j] == 0: */ __pyx_t_9 = __pyx_v_ngroups; for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_9; __pyx_t_11+=1) { __pyx_v_i = __pyx_t_11; /* "pandas/src/generated.pyx":5372 * * for i in range(ngroups): * for j in range(K): # <<<<<<<<<<<<<< * if nobs[i, j] == 0: * out[i, j] = nan */ __pyx_t_19 = __pyx_v_K; for (__pyx_t_20 = 0; __pyx_t_20 < __pyx_t_19; __pyx_t_20+=1) { __pyx_v_j = __pyx_t_20; /* "pandas/src/generated.pyx":5373 * for i in range(ngroups): * for j in range(K): * if nobs[i, j] == 0: # <<<<<<<<<<<<<< * out[i, j] = nan * else: */ __pyx_t_29 = __pyx_v_i; __pyx_t_30 = __pyx_v_j; __pyx_t_17 = (((*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_nobs.rcbuffer->pybuffer.buf, __pyx_t_29, __pyx_pybuffernd_nobs.diminfo[0].strides, __pyx_t_30, __pyx_pybuffernd_nobs.diminfo[1].strides)) == 0.0) != 0); if (__pyx_t_17) { /* "pandas/src/generated.pyx":5374 * for j in range(K): * if nobs[i, j] == 0: * out[i, j] = nan # <<<<<<<<<<<<<< * else: * out[i, j] = resx[i, j] */ __pyx_t_31 = __pyx_v_i; __pyx_t_32 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_31, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_32, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_6pandas_5algos_nan; goto __pyx_L18; } /*else*/ { /* "pandas/src/generated.pyx":5376 * out[i, j] = nan * else: * out[i, j] = resx[i, j] # <<<<<<<<<<<<<< * @cython.boundscheck(False) * @cython.wraparound(False) */ __pyx_t_33 = __pyx_v_i; __pyx_t_34 = __pyx_v_j; __pyx_t_35 = __pyx_v_i; __pyx_t_36 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_35, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_36, __pyx_pybuffernd_out.diminfo[1].strides) = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_resx.rcbuffer->pybuffer.buf, __pyx_t_33, __pyx_pybuffernd_resx.diminfo[0].strides, __pyx_t_34, __pyx_pybuffernd_resx.diminfo[1].strides)); } __pyx_L18:; } } __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_13); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_bins.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_counts.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_resx.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.group_nth_bin_float64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_bins.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_counts.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_resx.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_resx); __Pyx_XDECREF((PyObject *)__pyx_v_nobs); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_401group_nth_bin_float32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6pandas_5algos_400group_nth_bin_float32[] = "\n Only aggregates on axis=0\n "; static PyMethodDef __pyx_mdef_6pandas_5algos_401group_nth_bin_float32 = {__Pyx_NAMESTR("group_nth_bin_float32"), (PyCFunction)__pyx_pw_6pandas_5algos_401group_nth_bin_float32, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_5algos_400group_nth_bin_float32)}; static PyObject *__pyx_pw_6pandas_5algos_401group_nth_bin_float32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_out = 0; PyArrayObject *__pyx_v_counts = 0; PyArrayObject *__pyx_v_values = 0; PyArrayObject *__pyx_v_bins = 0; __pyx_t_5numpy_int64_t __pyx_v_rank; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("group_nth_bin_float32 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__out,&__pyx_n_s__counts,&__pyx_n_s__values,&__pyx_n_s__bins,&__pyx_n_s__rank,0}; PyObject* values[5] = {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 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__out)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__counts)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("group_nth_bin_float32", 1, 5, 5, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5379; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__values)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("group_nth_bin_float32", 1, 5, 5, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5379; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__bins)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("group_nth_bin_float32", 1, 5, 5, 3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5379; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 4: if (likely((values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__rank)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("group_nth_bin_float32", 1, 5, 5, 4); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5379; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "group_nth_bin_float32") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5379; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 5) { 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); } __pyx_v_out = ((PyArrayObject *)values[0]); __pyx_v_counts = ((PyArrayObject *)values[1]); __pyx_v_values = ((PyArrayObject *)values[2]); __pyx_v_bins = ((PyArrayObject *)values[3]); __pyx_v_rank = __Pyx_PyInt_from_py_npy_int64(values[4]); if (unlikely((__pyx_v_rank == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5382; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("group_nth_bin_float32", 1, 5, 5, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5379; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.group_nth_bin_float32", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_5numpy_ndarray, 1, "out", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5379; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_counts), __pyx_ptype_5numpy_ndarray, 1, "counts", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5380; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5381; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_bins), __pyx_ptype_5numpy_ndarray, 1, "bins", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5382; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_400group_nth_bin_float32(__pyx_self, __pyx_v_out, __pyx_v_counts, __pyx_v_values, __pyx_v_bins, __pyx_v_rank); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":5379 * @cython.boundscheck(False) * @cython.wraparound(False) * def group_nth_bin_float32(ndarray[float32_t, ndim=2] out, # <<<<<<<<<<<<<< * ndarray[int64_t] counts, * ndarray[float32_t, ndim=2] values, */ static PyObject *__pyx_pf_6pandas_5algos_400group_nth_bin_float32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_out, PyArrayObject *__pyx_v_counts, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_bins, __pyx_t_5numpy_int64_t __pyx_v_rank) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_N; Py_ssize_t __pyx_v_K; Py_ssize_t __pyx_v_ngroups; Py_ssize_t __pyx_v_b; __pyx_t_5numpy_float32_t __pyx_v_val; PyArrayObject *__pyx_v_resx = 0; PyArrayObject *__pyx_v_nobs = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_bins; __Pyx_Buffer __pyx_pybuffer_bins; __Pyx_LocalBuf_ND __pyx_pybuffernd_counts; __Pyx_Buffer __pyx_pybuffer_counts; __Pyx_LocalBuf_ND __pyx_pybuffernd_nobs; __Pyx_Buffer __pyx_pybuffer_nobs; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_resx; __Pyx_Buffer __pyx_pybuffer_resx; __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; PyArrayObject *__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; Py_ssize_t __pyx_t_11; int __pyx_t_12; PyObject *__pyx_t_13 = NULL; PyObject *(*__pyx_t_14)(PyObject *); Py_ssize_t __pyx_t_15; int __pyx_t_16; int __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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("group_nth_bin_float32", 0); __pyx_pybuffer_resx.pybuffer.buf = NULL; __pyx_pybuffer_resx.refcount = 0; __pyx_pybuffernd_resx.data = NULL; __pyx_pybuffernd_resx.rcbuffer = &__pyx_pybuffer_resx; __pyx_pybuffer_nobs.pybuffer.buf = NULL; __pyx_pybuffer_nobs.refcount = 0; __pyx_pybuffernd_nobs.data = NULL; __pyx_pybuffernd_nobs.rcbuffer = &__pyx_pybuffer_nobs; __pyx_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; __pyx_pybuffer_counts.pybuffer.buf = NULL; __pyx_pybuffer_counts.refcount = 0; __pyx_pybuffernd_counts.data = NULL; __pyx_pybuffernd_counts.rcbuffer = &__pyx_pybuffer_counts; __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_bins.pybuffer.buf = NULL; __pyx_pybuffer_bins.refcount = 0; __pyx_pybuffernd_bins.data = NULL; __pyx_pybuffernd_bins.rcbuffer = &__pyx_pybuffer_bins; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_v_out, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5379; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; __pyx_pybuffernd_out.diminfo[1].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_out.diminfo[1].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[1]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_counts.rcbuffer->pybuffer, (PyObject*)__pyx_v_counts, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5379; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_counts.diminfo[0].strides = __pyx_pybuffernd_counts.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_counts.diminfo[0].shape = __pyx_pybuffernd_counts.rcbuffer->pybuffer.shape[0]; { __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_float32_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5379; __pyx_clineno = __LINE__; goto __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_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_bins.rcbuffer->pybuffer, (PyObject*)__pyx_v_bins, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5379; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_bins.diminfo[0].strides = __pyx_pybuffernd_bins.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_bins.diminfo[0].shape = __pyx_pybuffernd_bins.rcbuffer->pybuffer.shape[0]; /* "pandas/src/generated.pyx":5391 * ndarray[float32_t, ndim=2] resx, nobs * * nobs = np.zeros_like(out) # <<<<<<<<<<<<<< * resx = np.empty_like(out) * */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5391; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s__zeros_like); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5391; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 5391; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)__pyx_v_out)); PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_out)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out)); __pyx_t_3 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5391; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(((PyObject *)__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_filename = __pyx_f[2]; __pyx_lineno = 5391; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_4 = ((PyArrayObject *)__pyx_t_3); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer); __pyx_t_5 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer, (PyObject*)__pyx_t_4, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_nobs.rcbuffer->pybuffer, (PyObject*)__pyx_v_nobs, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_pybuffernd_nobs.diminfo[0].strides = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_nobs.diminfo[0].shape = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_nobs.diminfo[1].strides = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_nobs.diminfo[1].shape = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.shape[1]; if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5391; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_4 = 0; __pyx_v_nobs = ((PyArrayObject *)__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/generated.pyx":5392 * * nobs = np.zeros_like(out) * resx = np.empty_like(out) # <<<<<<<<<<<<<< * * if bins[len(bins) - 1] == len(values): */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5392; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s__empty_like); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5392; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5392; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(((PyObject *)__pyx_v_out)); PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_v_out)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out)); __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5392; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(((PyObject *)__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_filename = __pyx_f[2]; __pyx_lineno = 5392; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_4 = ((PyArrayObject *)__pyx_t_2); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_resx.rcbuffer->pybuffer); __pyx_t_5 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_resx.rcbuffer->pybuffer, (PyObject*)__pyx_t_4, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_resx.rcbuffer->pybuffer, (PyObject*)__pyx_v_resx, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_pybuffernd_resx.diminfo[0].strides = __pyx_pybuffernd_resx.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_resx.diminfo[0].shape = __pyx_pybuffernd_resx.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_resx.diminfo[1].strides = __pyx_pybuffernd_resx.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_resx.diminfo[1].shape = __pyx_pybuffernd_resx.rcbuffer->pybuffer.shape[1]; if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5392; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_4 = 0; __pyx_v_resx = ((PyArrayObject *)__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":5394 * resx = np.empty_like(out) * * if bins[len(bins) - 1] == len(values): # <<<<<<<<<<<<<< * ngroups = len(bins) * else: */ __pyx_t_9 = PyObject_Length(((PyObject *)__pyx_v_bins)); if (unlikely(__pyx_t_9 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5394; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_10 = (__pyx_t_9 - 1); __pyx_t_11 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5394; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_12 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_bins.rcbuffer->pybuffer.buf, __pyx_t_10, __pyx_pybuffernd_bins.diminfo[0].strides)) == __pyx_t_11) != 0); if (__pyx_t_12) { /* "pandas/src/generated.pyx":5395 * * if bins[len(bins) - 1] == len(values): * ngroups = len(bins) # <<<<<<<<<<<<<< * else: * ngroups = len(bins) + 1 */ __pyx_t_11 = PyObject_Length(((PyObject *)__pyx_v_bins)); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5395; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_ngroups = __pyx_t_11; goto __pyx_L3; } /*else*/ { /* "pandas/src/generated.pyx":5397 * ngroups = len(bins) * else: * ngroups = len(bins) + 1 # <<<<<<<<<<<<<< * * N, K = ( values).shape */ __pyx_t_11 = PyObject_Length(((PyObject *)__pyx_v_bins)); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5397; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_ngroups = (__pyx_t_11 + 1); } __pyx_L3:; /* "pandas/src/generated.pyx":5399 * ngroups = len(bins) + 1 * * N, K = ( values).shape # <<<<<<<<<<<<<< * * b = 0 */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_values), __pyx_n_s__shape); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5399; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if ((likely(PyTuple_CheckExact(__pyx_t_2))) || (PyList_CheckExact(__pyx_t_2))) { PyObject* sequence = __pyx_t_2; #if CYTHON_COMPILING_IN_CPYTHON Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5399; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_1 = PyTuple_GET_ITEM(sequence, 1); } else { __pyx_t_3 = PyList_GET_ITEM(sequence, 0); __pyx_t_1 = PyList_GET_ITEM(sequence, 1); } __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(__pyx_t_1); #else __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5399; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5399; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); #endif __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } else { Py_ssize_t index = -1; __pyx_t_13 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5399; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_14 = Py_TYPE(__pyx_t_13)->tp_iternext; index = 0; __pyx_t_3 = __pyx_t_14(__pyx_t_13); if (unlikely(!__pyx_t_3)) goto __pyx_L4_unpacking_failed; __Pyx_GOTREF(__pyx_t_3); index = 1; __pyx_t_1 = __pyx_t_14(__pyx_t_13); if (unlikely(!__pyx_t_1)) goto __pyx_L4_unpacking_failed; __Pyx_GOTREF(__pyx_t_1); if (__Pyx_IternextUnpackEndCheck(__pyx_t_14(__pyx_t_13), 2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5399; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_14 = NULL; __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; goto __pyx_L5_unpacking_done; __pyx_L4_unpacking_failed:; __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_14 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5399; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_L5_unpacking_done:; } __pyx_t_11 = __Pyx_PyIndex_AsSsize_t(__pyx_t_3); if (unlikely((__pyx_t_11 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5399; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_9 = __Pyx_PyIndex_AsSsize_t(__pyx_t_1); if (unlikely((__pyx_t_9 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5399; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_N = __pyx_t_11; __pyx_v_K = __pyx_t_9; /* "pandas/src/generated.pyx":5401 * N, K = ( values).shape * * b = 0 # <<<<<<<<<<<<<< * for i in range(N): * while b < ngroups - 1 and i >= bins[b]: */ __pyx_v_b = 0; /* "pandas/src/generated.pyx":5402 * * b = 0 * for i in range(N): # <<<<<<<<<<<<<< * while b < ngroups - 1 and i >= bins[b]: * b += 1 */ __pyx_t_9 = __pyx_v_N; for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_9; __pyx_t_11+=1) { __pyx_v_i = __pyx_t_11; /* "pandas/src/generated.pyx":5403 * b = 0 * for i in range(N): * while b < ngroups - 1 and i >= bins[b]: # <<<<<<<<<<<<<< * b += 1 * */ while (1) { __pyx_t_12 = ((__pyx_v_b < (__pyx_v_ngroups - 1)) != 0); if (__pyx_t_12) { __pyx_t_15 = __pyx_v_b; __pyx_t_16 = ((__pyx_v_i >= (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_bins.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_bins.diminfo[0].strides))) != 0); __pyx_t_17 = __pyx_t_16; } else { __pyx_t_17 = __pyx_t_12; } if (!__pyx_t_17) break; /* "pandas/src/generated.pyx":5404 * for i in range(N): * while b < ngroups - 1 and i >= bins[b]: * b += 1 # <<<<<<<<<<<<<< * * counts[b] += 1 */ __pyx_v_b = (__pyx_v_b + 1); } /* "pandas/src/generated.pyx":5406 * b += 1 * * counts[b] += 1 # <<<<<<<<<<<<<< * for j in range(K): * val = values[i, j] */ __pyx_t_18 = __pyx_v_b; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_counts.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_counts.diminfo[0].strides) += 1; /* "pandas/src/generated.pyx":5407 * * counts[b] += 1 * for j in range(K): # <<<<<<<<<<<<<< * val = values[i, j] * */ __pyx_t_19 = __pyx_v_K; for (__pyx_t_20 = 0; __pyx_t_20 < __pyx_t_19; __pyx_t_20+=1) { __pyx_v_j = __pyx_t_20; /* "pandas/src/generated.pyx":5408 * counts[b] += 1 * for j in range(K): * val = values[i, j] # <<<<<<<<<<<<<< * * # not nan */ __pyx_t_21 = __pyx_v_i; __pyx_t_22 = __pyx_v_j; __pyx_v_val = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_22, __pyx_pybuffernd_values.diminfo[1].strides)); /* "pandas/src/generated.pyx":5411 * * # not nan * if val == val: # <<<<<<<<<<<<<< * nobs[b, j] += 1 * if nobs[b, j] == rank: */ __pyx_t_17 = ((__pyx_v_val == __pyx_v_val) != 0); if (__pyx_t_17) { /* "pandas/src/generated.pyx":5412 * # not nan * if val == val: * nobs[b, j] += 1 # <<<<<<<<<<<<<< * if nobs[b, j] == rank: * resx[b, j] = val */ __pyx_t_23 = __pyx_v_b; __pyx_t_24 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_nobs.rcbuffer->pybuffer.buf, __pyx_t_23, __pyx_pybuffernd_nobs.diminfo[0].strides, __pyx_t_24, __pyx_pybuffernd_nobs.diminfo[1].strides) += 1.0; /* "pandas/src/generated.pyx":5413 * if val == val: * nobs[b, j] += 1 * if nobs[b, j] == rank: # <<<<<<<<<<<<<< * resx[b, j] = val * */ __pyx_t_25 = __pyx_v_b; __pyx_t_26 = __pyx_v_j; __pyx_t_17 = (((*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_nobs.rcbuffer->pybuffer.buf, __pyx_t_25, __pyx_pybuffernd_nobs.diminfo[0].strides, __pyx_t_26, __pyx_pybuffernd_nobs.diminfo[1].strides)) == __pyx_v_rank) != 0); if (__pyx_t_17) { /* "pandas/src/generated.pyx":5414 * nobs[b, j] += 1 * if nobs[b, j] == rank: * resx[b, j] = val # <<<<<<<<<<<<<< * * for i in range(ngroups): */ __pyx_t_27 = __pyx_v_b; __pyx_t_28 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_resx.rcbuffer->pybuffer.buf, __pyx_t_27, __pyx_pybuffernd_resx.diminfo[0].strides, __pyx_t_28, __pyx_pybuffernd_resx.diminfo[1].strides) = __pyx_v_val; goto __pyx_L13; } __pyx_L13:; goto __pyx_L12; } __pyx_L12:; } } /* "pandas/src/generated.pyx":5416 * resx[b, j] = val * * for i in range(ngroups): # <<<<<<<<<<<<<< * for j in range(K): * if nobs[i, j] == 0: */ __pyx_t_9 = __pyx_v_ngroups; for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_9; __pyx_t_11+=1) { __pyx_v_i = __pyx_t_11; /* "pandas/src/generated.pyx":5417 * * for i in range(ngroups): * for j in range(K): # <<<<<<<<<<<<<< * if nobs[i, j] == 0: * out[i, j] = nan */ __pyx_t_19 = __pyx_v_K; for (__pyx_t_20 = 0; __pyx_t_20 < __pyx_t_19; __pyx_t_20+=1) { __pyx_v_j = __pyx_t_20; /* "pandas/src/generated.pyx":5418 * for i in range(ngroups): * for j in range(K): * if nobs[i, j] == 0: # <<<<<<<<<<<<<< * out[i, j] = nan * else: */ __pyx_t_29 = __pyx_v_i; __pyx_t_30 = __pyx_v_j; __pyx_t_17 = (((*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_nobs.rcbuffer->pybuffer.buf, __pyx_t_29, __pyx_pybuffernd_nobs.diminfo[0].strides, __pyx_t_30, __pyx_pybuffernd_nobs.diminfo[1].strides)) == 0.0) != 0); if (__pyx_t_17) { /* "pandas/src/generated.pyx":5419 * for j in range(K): * if nobs[i, j] == 0: * out[i, j] = nan # <<<<<<<<<<<<<< * else: * out[i, j] = resx[i, j] */ __pyx_t_31 = __pyx_v_i; __pyx_t_32 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_31, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_32, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_6pandas_5algos_nan; goto __pyx_L18; } /*else*/ { /* "pandas/src/generated.pyx":5421 * out[i, j] = nan * else: * out[i, j] = resx[i, j] # <<<<<<<<<<<<<< * * @cython.boundscheck(False) */ __pyx_t_33 = __pyx_v_i; __pyx_t_34 = __pyx_v_j; __pyx_t_35 = __pyx_v_i; __pyx_t_36 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_35, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_36, __pyx_pybuffernd_out.diminfo[1].strides) = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_resx.rcbuffer->pybuffer.buf, __pyx_t_33, __pyx_pybuffernd_resx.diminfo[0].strides, __pyx_t_34, __pyx_pybuffernd_resx.diminfo[1].strides)); } __pyx_L18:; } } __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_13); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_bins.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_counts.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_resx.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.group_nth_bin_float32", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_bins.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_counts.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_resx.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_resx); __Pyx_XDECREF((PyObject *)__pyx_v_nobs); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_403group_add_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6pandas_5algos_402group_add_float64[] = "\n Only aggregates on axis=0\n "; static PyMethodDef __pyx_mdef_6pandas_5algos_403group_add_float64 = {__Pyx_NAMESTR("group_add_float64"), (PyCFunction)__pyx_pw_6pandas_5algos_403group_add_float64, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_5algos_402group_add_float64)}; static PyObject *__pyx_pw_6pandas_5algos_403group_add_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_out = 0; PyArrayObject *__pyx_v_counts = 0; PyArrayObject *__pyx_v_values = 0; PyArrayObject *__pyx_v_labels = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("group_add_float64 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__out,&__pyx_n_s__counts,&__pyx_n_s__values,&__pyx_n_s__labels,0}; PyObject* values[4] = {0,0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__out)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__counts)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("group_add_float64", 1, 4, 4, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5425; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__values)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("group_add_float64", 1, 4, 4, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5425; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__labels)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("group_add_float64", 1, 4, 4, 3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5425; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "group_add_float64") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5425; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 4) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[3] = PyTuple_GET_ITEM(__pyx_args, 3); } __pyx_v_out = ((PyArrayObject *)values[0]); __pyx_v_counts = ((PyArrayObject *)values[1]); __pyx_v_values = ((PyArrayObject *)values[2]); __pyx_v_labels = ((PyArrayObject *)values[3]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("group_add_float64", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5425; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.group_add_float64", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_5numpy_ndarray, 1, "out", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5425; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_counts), __pyx_ptype_5numpy_ndarray, 1, "counts", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5426; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5427; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_labels), __pyx_ptype_5numpy_ndarray, 1, "labels", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5428; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_402group_add_float64(__pyx_self, __pyx_v_out, __pyx_v_counts, __pyx_v_values, __pyx_v_labels); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":5425 * @cython.boundscheck(False) * @cython.wraparound(False) * def group_add_float64(ndarray[float64_t, ndim=2] out, # <<<<<<<<<<<<<< * ndarray[int64_t] counts, * ndarray[float64_t, ndim=2] values, */ static PyObject *__pyx_pf_6pandas_5algos_402group_add_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_out, PyArrayObject *__pyx_v_counts, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_labels) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_N; Py_ssize_t __pyx_v_K; Py_ssize_t __pyx_v_lab; __pyx_t_5numpy_float64_t __pyx_v_val; PyArrayObject *__pyx_v_sumx = 0; PyArrayObject *__pyx_v_nobs = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_counts; __Pyx_Buffer __pyx_pybuffer_counts; __Pyx_LocalBuf_ND __pyx_pybuffernd_labels; __Pyx_Buffer __pyx_pybuffer_labels; __Pyx_LocalBuf_ND __pyx_pybuffernd_nobs; __Pyx_Buffer __pyx_pybuffer_nobs; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_sumx; __Pyx_Buffer __pyx_pybuffer_sumx; __Pyx_LocalBuf_ND __pyx_pybuffernd_values; __Pyx_Buffer __pyx_pybuffer_values; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; Py_ssize_t __pyx_t_2; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyArrayObject *__pyx_t_7 = NULL; int __pyx_t_8; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; PyObject *__pyx_t_11 = NULL; PyObject *__pyx_t_12 = NULL; PyObject *(*__pyx_t_13)(PyObject *); 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; long __pyx_t_25; Py_ssize_t __pyx_t_26; long __pyx_t_27; Py_ssize_t __pyx_t_28; long __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; Py_ssize_t __pyx_t_37; Py_ssize_t __pyx_t_38; Py_ssize_t __pyx_t_39; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("group_add_float64", 0); __pyx_pybuffer_sumx.pybuffer.buf = NULL; __pyx_pybuffer_sumx.refcount = 0; __pyx_pybuffernd_sumx.data = NULL; __pyx_pybuffernd_sumx.rcbuffer = &__pyx_pybuffer_sumx; __pyx_pybuffer_nobs.pybuffer.buf = NULL; __pyx_pybuffer_nobs.refcount = 0; __pyx_pybuffernd_nobs.data = NULL; __pyx_pybuffernd_nobs.rcbuffer = &__pyx_pybuffer_nobs; __pyx_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; __pyx_pybuffer_counts.pybuffer.buf = NULL; __pyx_pybuffer_counts.refcount = 0; __pyx_pybuffernd_counts.data = NULL; __pyx_pybuffernd_counts.rcbuffer = &__pyx_pybuffer_counts; __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_labels.pybuffer.buf = NULL; __pyx_pybuffer_labels.refcount = 0; __pyx_pybuffernd_labels.data = NULL; __pyx_pybuffernd_labels.rcbuffer = &__pyx_pybuffer_labels; { __Pyx_BufFmt_StackElem __pyx_stack[1]; 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, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5425; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; __pyx_pybuffernd_out.diminfo[1].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_out.diminfo[1].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[1]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_counts.rcbuffer->pybuffer, (PyObject*)__pyx_v_counts, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5425; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_counts.diminfo[0].strides = __pyx_pybuffernd_counts.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_counts.diminfo[0].shape = __pyx_pybuffernd_counts.rcbuffer->pybuffer.shape[0]; { __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, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5425; __pyx_clineno = __LINE__; goto __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_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_labels.rcbuffer->pybuffer, (PyObject*)__pyx_v_labels, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5425; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_labels.diminfo[0].strides = __pyx_pybuffernd_labels.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_labels.diminfo[0].shape = __pyx_pybuffernd_labels.rcbuffer->pybuffer.shape[0]; /* "pandas/src/generated.pyx":5437 * ndarray[float64_t, ndim=2] sumx, nobs * * if not len(values) == len(labels): # <<<<<<<<<<<<<< * raise AssertionError("len(index) != len(labels)") * */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5437; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_2 = PyObject_Length(((PyObject *)__pyx_v_labels)); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5437; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_3 = ((!((__pyx_t_1 == __pyx_t_2) != 0)) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":5438 * * if not len(values) == len(labels): * raise AssertionError("len(index) != len(labels)") # <<<<<<<<<<<<<< * * nobs = np.zeros_like(out) */ __pyx_t_4 = PyObject_Call(__pyx_builtin_AssertionError, ((PyObject *)__pyx_k_tuple_188), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5438; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 5438; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L3; } __pyx_L3:; /* "pandas/src/generated.pyx":5440 * raise AssertionError("len(index) != len(labels)") * * nobs = np.zeros_like(out) # <<<<<<<<<<<<<< * sumx = np.zeros_like(out) * */ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5440; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s__zeros_like); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5440; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5440; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(((PyObject *)__pyx_v_out)); PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_v_out)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out)); __pyx_t_6 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5440; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5440; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_7 = ((PyArrayObject *)__pyx_t_6); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer); __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_nobs.rcbuffer->pybuffer, (PyObject*)__pyx_v_nobs, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_pybuffernd_nobs.diminfo[0].strides = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_nobs.diminfo[0].shape = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_nobs.diminfo[1].strides = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_nobs.diminfo[1].shape = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.shape[1]; if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5440; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_7 = 0; __pyx_v_nobs = ((PyArrayObject *)__pyx_t_6); __pyx_t_6 = 0; /* "pandas/src/generated.pyx":5441 * * nobs = np.zeros_like(out) * sumx = np.zeros_like(out) # <<<<<<<<<<<<<< * * N, K = ( values).shape */ __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5441; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s__zeros_like); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5441; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5441; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(((PyObject *)__pyx_v_out)); PyTuple_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_v_out)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out)); __pyx_t_5 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5441; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0; if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5441; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_7 = ((PyArrayObject *)__pyx_t_5); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_sumx.rcbuffer->pybuffer); __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_sumx.rcbuffer->pybuffer, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_sumx.rcbuffer->pybuffer, (PyObject*)__pyx_v_sumx, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_pybuffernd_sumx.diminfo[0].strides = __pyx_pybuffernd_sumx.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_sumx.diminfo[0].shape = __pyx_pybuffernd_sumx.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_sumx.diminfo[1].strides = __pyx_pybuffernd_sumx.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_sumx.diminfo[1].shape = __pyx_pybuffernd_sumx.rcbuffer->pybuffer.shape[1]; if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5441; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_7 = 0; __pyx_v_sumx = ((PyArrayObject *)__pyx_t_5); __pyx_t_5 = 0; /* "pandas/src/generated.pyx":5443 * sumx = np.zeros_like(out) * * N, K = ( values).shape # <<<<<<<<<<<<<< * * if K > 1: */ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_values), __pyx_n_s__shape); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5443; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); if ((likely(PyTuple_CheckExact(__pyx_t_5))) || (PyList_CheckExact(__pyx_t_5))) { PyObject* sequence = __pyx_t_5; #if CYTHON_COMPILING_IN_CPYTHON Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5443; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_6 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_4 = PyTuple_GET_ITEM(sequence, 1); } else { __pyx_t_6 = PyList_GET_ITEM(sequence, 0); __pyx_t_4 = PyList_GET_ITEM(sequence, 1); } __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(__pyx_t_4); #else __pyx_t_6 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5443; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5443; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); #endif __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } else { Py_ssize_t index = -1; __pyx_t_12 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5443; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_13 = Py_TYPE(__pyx_t_12)->tp_iternext; index = 0; __pyx_t_6 = __pyx_t_13(__pyx_t_12); if (unlikely(!__pyx_t_6)) goto __pyx_L4_unpacking_failed; __Pyx_GOTREF(__pyx_t_6); index = 1; __pyx_t_4 = __pyx_t_13(__pyx_t_12); if (unlikely(!__pyx_t_4)) goto __pyx_L4_unpacking_failed; __Pyx_GOTREF(__pyx_t_4); if (__Pyx_IternextUnpackEndCheck(__pyx_t_13(__pyx_t_12), 2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5443; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_13 = NULL; __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; goto __pyx_L5_unpacking_done; __pyx_L4_unpacking_failed:; __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __pyx_t_13 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5443; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_L5_unpacking_done:; } __pyx_t_2 = __Pyx_PyIndex_AsSsize_t(__pyx_t_6); if (unlikely((__pyx_t_2 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5443; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_1 = __Pyx_PyIndex_AsSsize_t(__pyx_t_4); if (unlikely((__pyx_t_1 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5443; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_N = __pyx_t_2; __pyx_v_K = __pyx_t_1; /* "pandas/src/generated.pyx":5445 * N, K = ( values).shape * * if K > 1: # <<<<<<<<<<<<<< * for i in range(N): * lab = labels[i] */ __pyx_t_3 = ((__pyx_v_K > 1) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":5446 * * if K > 1: * for i in range(N): # <<<<<<<<<<<<<< * lab = labels[i] * if lab < 0: */ __pyx_t_1 = __pyx_v_N; for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) { __pyx_v_i = __pyx_t_2; /* "pandas/src/generated.pyx":5447 * if K > 1: * for i in range(N): * lab = labels[i] # <<<<<<<<<<<<<< * if lab < 0: * continue */ __pyx_t_14 = __pyx_v_i; __pyx_v_lab = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_labels.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_labels.diminfo[0].strides)); /* "pandas/src/generated.pyx":5448 * for i in range(N): * lab = labels[i] * if lab < 0: # <<<<<<<<<<<<<< * continue * */ __pyx_t_3 = ((__pyx_v_lab < 0) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":5449 * lab = labels[i] * if lab < 0: * continue # <<<<<<<<<<<<<< * * counts[lab] += 1 */ goto __pyx_L7_continue; goto __pyx_L9; } __pyx_L9:; /* "pandas/src/generated.pyx":5451 * continue * * counts[lab] += 1 # <<<<<<<<<<<<<< * for j in range(K): * val = values[i, j] */ __pyx_t_15 = __pyx_v_lab; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_counts.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_counts.diminfo[0].strides) += 1; /* "pandas/src/generated.pyx":5452 * * counts[lab] += 1 * for j in range(K): # <<<<<<<<<<<<<< * val = values[i, j] * */ __pyx_t_16 = __pyx_v_K; for (__pyx_t_17 = 0; __pyx_t_17 < __pyx_t_16; __pyx_t_17+=1) { __pyx_v_j = __pyx_t_17; /* "pandas/src/generated.pyx":5453 * counts[lab] += 1 * for j in range(K): * val = values[i, j] # <<<<<<<<<<<<<< * * # not nan */ __pyx_t_18 = __pyx_v_i; __pyx_t_19 = __pyx_v_j; __pyx_v_val = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_19, __pyx_pybuffernd_values.diminfo[1].strides)); /* "pandas/src/generated.pyx":5456 * * # not nan * if val == val: # <<<<<<<<<<<<<< * nobs[lab, j] += 1 * sumx[lab, j] += val */ __pyx_t_3 = ((__pyx_v_val == __pyx_v_val) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":5457 * # not nan * if val == val: * nobs[lab, j] += 1 # <<<<<<<<<<<<<< * sumx[lab, j] += val * else: */ __pyx_t_20 = __pyx_v_lab; __pyx_t_21 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_nobs.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_nobs.diminfo[0].strides, __pyx_t_21, __pyx_pybuffernd_nobs.diminfo[1].strides) += 1.0; /* "pandas/src/generated.pyx":5458 * if val == val: * nobs[lab, j] += 1 * sumx[lab, j] += val # <<<<<<<<<<<<<< * else: * for i in range(N): */ __pyx_t_22 = __pyx_v_lab; __pyx_t_23 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_sumx.rcbuffer->pybuffer.buf, __pyx_t_22, __pyx_pybuffernd_sumx.diminfo[0].strides, __pyx_t_23, __pyx_pybuffernd_sumx.diminfo[1].strides) += __pyx_v_val; goto __pyx_L12; } __pyx_L12:; } __pyx_L7_continue:; } goto __pyx_L6; } /*else*/ { /* "pandas/src/generated.pyx":5460 * sumx[lab, j] += val * else: * for i in range(N): # <<<<<<<<<<<<<< * lab = labels[i] * if lab < 0: */ __pyx_t_1 = __pyx_v_N; for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) { __pyx_v_i = __pyx_t_2; /* "pandas/src/generated.pyx":5461 * else: * for i in range(N): * lab = labels[i] # <<<<<<<<<<<<<< * if lab < 0: * continue */ __pyx_t_16 = __pyx_v_i; __pyx_v_lab = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_labels.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_labels.diminfo[0].strides)); /* "pandas/src/generated.pyx":5462 * for i in range(N): * lab = labels[i] * if lab < 0: # <<<<<<<<<<<<<< * continue * */ __pyx_t_3 = ((__pyx_v_lab < 0) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":5463 * lab = labels[i] * if lab < 0: * continue # <<<<<<<<<<<<<< * * counts[lab] += 1 */ goto __pyx_L13_continue; goto __pyx_L15; } __pyx_L15:; /* "pandas/src/generated.pyx":5465 * continue * * counts[lab] += 1 # <<<<<<<<<<<<<< * val = values[i, 0] * */ __pyx_t_17 = __pyx_v_lab; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_counts.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_counts.diminfo[0].strides) += 1; /* "pandas/src/generated.pyx":5466 * * counts[lab] += 1 * val = values[i, 0] # <<<<<<<<<<<<<< * * # not nan */ __pyx_t_24 = __pyx_v_i; __pyx_t_25 = 0; __pyx_v_val = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_24, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_25, __pyx_pybuffernd_values.diminfo[1].strides)); /* "pandas/src/generated.pyx":5469 * * # not nan * if val == val: # <<<<<<<<<<<<<< * nobs[lab, 0] += 1 * sumx[lab, 0] += val */ __pyx_t_3 = ((__pyx_v_val == __pyx_v_val) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":5470 * # not nan * if val == val: * nobs[lab, 0] += 1 # <<<<<<<<<<<<<< * sumx[lab, 0] += val * */ __pyx_t_26 = __pyx_v_lab; __pyx_t_27 = 0; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_nobs.rcbuffer->pybuffer.buf, __pyx_t_26, __pyx_pybuffernd_nobs.diminfo[0].strides, __pyx_t_27, __pyx_pybuffernd_nobs.diminfo[1].strides) += 1.0; /* "pandas/src/generated.pyx":5471 * if val == val: * nobs[lab, 0] += 1 * sumx[lab, 0] += val # <<<<<<<<<<<<<< * * for i in range(len(counts)): */ __pyx_t_28 = __pyx_v_lab; __pyx_t_29 = 0; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_sumx.rcbuffer->pybuffer.buf, __pyx_t_28, __pyx_pybuffernd_sumx.diminfo[0].strides, __pyx_t_29, __pyx_pybuffernd_sumx.diminfo[1].strides) += __pyx_v_val; goto __pyx_L16; } __pyx_L16:; __pyx_L13_continue:; } } __pyx_L6:; /* "pandas/src/generated.pyx":5473 * sumx[lab, 0] += val * * for i in range(len(counts)): # <<<<<<<<<<<<<< * for j in range(K): * if nobs[i, j] == 0: */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_counts)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5473; __pyx_clineno = __LINE__; goto __pyx_L1_error;} for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) { __pyx_v_i = __pyx_t_2; /* "pandas/src/generated.pyx":5474 * * for i in range(len(counts)): * for j in range(K): # <<<<<<<<<<<<<< * if nobs[i, j] == 0: * out[i, j] = nan */ __pyx_t_30 = __pyx_v_K; for (__pyx_t_31 = 0; __pyx_t_31 < __pyx_t_30; __pyx_t_31+=1) { __pyx_v_j = __pyx_t_31; /* "pandas/src/generated.pyx":5475 * for i in range(len(counts)): * for j in range(K): * if nobs[i, j] == 0: # <<<<<<<<<<<<<< * out[i, j] = nan * else: */ __pyx_t_32 = __pyx_v_i; __pyx_t_33 = __pyx_v_j; __pyx_t_3 = (((*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_nobs.rcbuffer->pybuffer.buf, __pyx_t_32, __pyx_pybuffernd_nobs.diminfo[0].strides, __pyx_t_33, __pyx_pybuffernd_nobs.diminfo[1].strides)) == 0.0) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":5476 * for j in range(K): * if nobs[i, j] == 0: * out[i, j] = nan # <<<<<<<<<<<<<< * else: * out[i, j] = sumx[i, j] */ __pyx_t_34 = __pyx_v_i; __pyx_t_35 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_34, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_35, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_6pandas_5algos_nan; goto __pyx_L21; } /*else*/ { /* "pandas/src/generated.pyx":5478 * out[i, j] = nan * else: * out[i, j] = sumx[i, j] # <<<<<<<<<<<<<< * @cython.boundscheck(False) * @cython.wraparound(False) */ __pyx_t_36 = __pyx_v_i; __pyx_t_37 = __pyx_v_j; __pyx_t_38 = __pyx_v_i; __pyx_t_39 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_38, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_39, __pyx_pybuffernd_out.diminfo[1].strides) = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_sumx.rcbuffer->pybuffer.buf, __pyx_t_36, __pyx_pybuffernd_sumx.diminfo[0].strides, __pyx_t_37, __pyx_pybuffernd_sumx.diminfo[1].strides)); } __pyx_L21:; } } __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_12); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_counts.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_labels.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_sumx.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.group_add_float64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_counts.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_labels.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_sumx.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_sumx); __Pyx_XDECREF((PyObject *)__pyx_v_nobs); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_405group_add_float32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6pandas_5algos_404group_add_float32[] = "\n Only aggregates on axis=0\n "; static PyMethodDef __pyx_mdef_6pandas_5algos_405group_add_float32 = {__Pyx_NAMESTR("group_add_float32"), (PyCFunction)__pyx_pw_6pandas_5algos_405group_add_float32, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_5algos_404group_add_float32)}; static PyObject *__pyx_pw_6pandas_5algos_405group_add_float32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_out = 0; PyArrayObject *__pyx_v_counts = 0; PyArrayObject *__pyx_v_values = 0; PyArrayObject *__pyx_v_labels = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("group_add_float32 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__out,&__pyx_n_s__counts,&__pyx_n_s__values,&__pyx_n_s__labels,0}; PyObject* values[4] = {0,0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__out)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__counts)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("group_add_float32", 1, 4, 4, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5481; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__values)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("group_add_float32", 1, 4, 4, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5481; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__labels)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("group_add_float32", 1, 4, 4, 3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5481; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "group_add_float32") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5481; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 4) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[3] = PyTuple_GET_ITEM(__pyx_args, 3); } __pyx_v_out = ((PyArrayObject *)values[0]); __pyx_v_counts = ((PyArrayObject *)values[1]); __pyx_v_values = ((PyArrayObject *)values[2]); __pyx_v_labels = ((PyArrayObject *)values[3]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("group_add_float32", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5481; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.group_add_float32", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_5numpy_ndarray, 1, "out", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5481; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_counts), __pyx_ptype_5numpy_ndarray, 1, "counts", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5482; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5483; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_labels), __pyx_ptype_5numpy_ndarray, 1, "labels", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5484; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_404group_add_float32(__pyx_self, __pyx_v_out, __pyx_v_counts, __pyx_v_values, __pyx_v_labels); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":5481 * @cython.boundscheck(False) * @cython.wraparound(False) * def group_add_float32(ndarray[float32_t, ndim=2] out, # <<<<<<<<<<<<<< * ndarray[int64_t] counts, * ndarray[float32_t, ndim=2] values, */ static PyObject *__pyx_pf_6pandas_5algos_404group_add_float32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_out, PyArrayObject *__pyx_v_counts, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_labels) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_N; Py_ssize_t __pyx_v_K; Py_ssize_t __pyx_v_lab; __pyx_t_5numpy_float32_t __pyx_v_val; PyArrayObject *__pyx_v_sumx = 0; PyArrayObject *__pyx_v_nobs = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_counts; __Pyx_Buffer __pyx_pybuffer_counts; __Pyx_LocalBuf_ND __pyx_pybuffernd_labels; __Pyx_Buffer __pyx_pybuffer_labels; __Pyx_LocalBuf_ND __pyx_pybuffernd_nobs; __Pyx_Buffer __pyx_pybuffer_nobs; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_sumx; __Pyx_Buffer __pyx_pybuffer_sumx; __Pyx_LocalBuf_ND __pyx_pybuffernd_values; __Pyx_Buffer __pyx_pybuffer_values; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; Py_ssize_t __pyx_t_2; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyArrayObject *__pyx_t_7 = NULL; int __pyx_t_8; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; PyObject *__pyx_t_11 = NULL; PyObject *__pyx_t_12 = NULL; PyObject *(*__pyx_t_13)(PyObject *); 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; long __pyx_t_25; Py_ssize_t __pyx_t_26; long __pyx_t_27; Py_ssize_t __pyx_t_28; long __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; Py_ssize_t __pyx_t_37; Py_ssize_t __pyx_t_38; Py_ssize_t __pyx_t_39; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("group_add_float32", 0); __pyx_pybuffer_sumx.pybuffer.buf = NULL; __pyx_pybuffer_sumx.refcount = 0; __pyx_pybuffernd_sumx.data = NULL; __pyx_pybuffernd_sumx.rcbuffer = &__pyx_pybuffer_sumx; __pyx_pybuffer_nobs.pybuffer.buf = NULL; __pyx_pybuffer_nobs.refcount = 0; __pyx_pybuffernd_nobs.data = NULL; __pyx_pybuffernd_nobs.rcbuffer = &__pyx_pybuffer_nobs; __pyx_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; __pyx_pybuffer_counts.pybuffer.buf = NULL; __pyx_pybuffer_counts.refcount = 0; __pyx_pybuffernd_counts.data = NULL; __pyx_pybuffernd_counts.rcbuffer = &__pyx_pybuffer_counts; __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_labels.pybuffer.buf = NULL; __pyx_pybuffer_labels.refcount = 0; __pyx_pybuffernd_labels.data = NULL; __pyx_pybuffernd_labels.rcbuffer = &__pyx_pybuffer_labels; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_v_out, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5481; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; __pyx_pybuffernd_out.diminfo[1].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_out.diminfo[1].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[1]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_counts.rcbuffer->pybuffer, (PyObject*)__pyx_v_counts, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5481; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_counts.diminfo[0].strides = __pyx_pybuffernd_counts.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_counts.diminfo[0].shape = __pyx_pybuffernd_counts.rcbuffer->pybuffer.shape[0]; { __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_float32_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5481; __pyx_clineno = __LINE__; goto __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_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_labels.rcbuffer->pybuffer, (PyObject*)__pyx_v_labels, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5481; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_labels.diminfo[0].strides = __pyx_pybuffernd_labels.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_labels.diminfo[0].shape = __pyx_pybuffernd_labels.rcbuffer->pybuffer.shape[0]; /* "pandas/src/generated.pyx":5493 * ndarray[float32_t, ndim=2] sumx, nobs * * if not len(values) == len(labels): # <<<<<<<<<<<<<< * raise AssertionError("len(index) != len(labels)") * */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5493; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_2 = PyObject_Length(((PyObject *)__pyx_v_labels)); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5493; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_3 = ((!((__pyx_t_1 == __pyx_t_2) != 0)) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":5494 * * if not len(values) == len(labels): * raise AssertionError("len(index) != len(labels)") # <<<<<<<<<<<<<< * * nobs = np.zeros_like(out) */ __pyx_t_4 = PyObject_Call(__pyx_builtin_AssertionError, ((PyObject *)__pyx_k_tuple_189), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5494; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 5494; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L3; } __pyx_L3:; /* "pandas/src/generated.pyx":5496 * raise AssertionError("len(index) != len(labels)") * * nobs = np.zeros_like(out) # <<<<<<<<<<<<<< * sumx = np.zeros_like(out) * */ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5496; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s__zeros_like); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5496; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5496; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(((PyObject *)__pyx_v_out)); PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_v_out)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out)); __pyx_t_6 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5496; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5496; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_7 = ((PyArrayObject *)__pyx_t_6); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer); __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_nobs.rcbuffer->pybuffer, (PyObject*)__pyx_v_nobs, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_pybuffernd_nobs.diminfo[0].strides = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_nobs.diminfo[0].shape = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_nobs.diminfo[1].strides = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_nobs.diminfo[1].shape = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.shape[1]; if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5496; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_7 = 0; __pyx_v_nobs = ((PyArrayObject *)__pyx_t_6); __pyx_t_6 = 0; /* "pandas/src/generated.pyx":5497 * * nobs = np.zeros_like(out) * sumx = np.zeros_like(out) # <<<<<<<<<<<<<< * * N, K = ( values).shape */ __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5497; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s__zeros_like); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5497; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5497; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(((PyObject *)__pyx_v_out)); PyTuple_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_v_out)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out)); __pyx_t_5 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5497; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0; if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5497; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_7 = ((PyArrayObject *)__pyx_t_5); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_sumx.rcbuffer->pybuffer); __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_sumx.rcbuffer->pybuffer, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_sumx.rcbuffer->pybuffer, (PyObject*)__pyx_v_sumx, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_pybuffernd_sumx.diminfo[0].strides = __pyx_pybuffernd_sumx.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_sumx.diminfo[0].shape = __pyx_pybuffernd_sumx.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_sumx.diminfo[1].strides = __pyx_pybuffernd_sumx.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_sumx.diminfo[1].shape = __pyx_pybuffernd_sumx.rcbuffer->pybuffer.shape[1]; if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5497; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_7 = 0; __pyx_v_sumx = ((PyArrayObject *)__pyx_t_5); __pyx_t_5 = 0; /* "pandas/src/generated.pyx":5499 * sumx = np.zeros_like(out) * * N, K = ( values).shape # <<<<<<<<<<<<<< * * if K > 1: */ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_values), __pyx_n_s__shape); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5499; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); if ((likely(PyTuple_CheckExact(__pyx_t_5))) || (PyList_CheckExact(__pyx_t_5))) { PyObject* sequence = __pyx_t_5; #if CYTHON_COMPILING_IN_CPYTHON Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5499; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_6 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_4 = PyTuple_GET_ITEM(sequence, 1); } else { __pyx_t_6 = PyList_GET_ITEM(sequence, 0); __pyx_t_4 = PyList_GET_ITEM(sequence, 1); } __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(__pyx_t_4); #else __pyx_t_6 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5499; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5499; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); #endif __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } else { Py_ssize_t index = -1; __pyx_t_12 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5499; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_13 = Py_TYPE(__pyx_t_12)->tp_iternext; index = 0; __pyx_t_6 = __pyx_t_13(__pyx_t_12); if (unlikely(!__pyx_t_6)) goto __pyx_L4_unpacking_failed; __Pyx_GOTREF(__pyx_t_6); index = 1; __pyx_t_4 = __pyx_t_13(__pyx_t_12); if (unlikely(!__pyx_t_4)) goto __pyx_L4_unpacking_failed; __Pyx_GOTREF(__pyx_t_4); if (__Pyx_IternextUnpackEndCheck(__pyx_t_13(__pyx_t_12), 2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5499; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_13 = NULL; __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; goto __pyx_L5_unpacking_done; __pyx_L4_unpacking_failed:; __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __pyx_t_13 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5499; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_L5_unpacking_done:; } __pyx_t_2 = __Pyx_PyIndex_AsSsize_t(__pyx_t_6); if (unlikely((__pyx_t_2 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5499; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_1 = __Pyx_PyIndex_AsSsize_t(__pyx_t_4); if (unlikely((__pyx_t_1 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5499; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_N = __pyx_t_2; __pyx_v_K = __pyx_t_1; /* "pandas/src/generated.pyx":5501 * N, K = ( values).shape * * if K > 1: # <<<<<<<<<<<<<< * for i in range(N): * lab = labels[i] */ __pyx_t_3 = ((__pyx_v_K > 1) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":5502 * * if K > 1: * for i in range(N): # <<<<<<<<<<<<<< * lab = labels[i] * if lab < 0: */ __pyx_t_1 = __pyx_v_N; for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) { __pyx_v_i = __pyx_t_2; /* "pandas/src/generated.pyx":5503 * if K > 1: * for i in range(N): * lab = labels[i] # <<<<<<<<<<<<<< * if lab < 0: * continue */ __pyx_t_14 = __pyx_v_i; __pyx_v_lab = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_labels.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_labels.diminfo[0].strides)); /* "pandas/src/generated.pyx":5504 * for i in range(N): * lab = labels[i] * if lab < 0: # <<<<<<<<<<<<<< * continue * */ __pyx_t_3 = ((__pyx_v_lab < 0) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":5505 * lab = labels[i] * if lab < 0: * continue # <<<<<<<<<<<<<< * * counts[lab] += 1 */ goto __pyx_L7_continue; goto __pyx_L9; } __pyx_L9:; /* "pandas/src/generated.pyx":5507 * continue * * counts[lab] += 1 # <<<<<<<<<<<<<< * for j in range(K): * val = values[i, j] */ __pyx_t_15 = __pyx_v_lab; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_counts.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_counts.diminfo[0].strides) += 1; /* "pandas/src/generated.pyx":5508 * * counts[lab] += 1 * for j in range(K): # <<<<<<<<<<<<<< * val = values[i, j] * */ __pyx_t_16 = __pyx_v_K; for (__pyx_t_17 = 0; __pyx_t_17 < __pyx_t_16; __pyx_t_17+=1) { __pyx_v_j = __pyx_t_17; /* "pandas/src/generated.pyx":5509 * counts[lab] += 1 * for j in range(K): * val = values[i, j] # <<<<<<<<<<<<<< * * # not nan */ __pyx_t_18 = __pyx_v_i; __pyx_t_19 = __pyx_v_j; __pyx_v_val = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_19, __pyx_pybuffernd_values.diminfo[1].strides)); /* "pandas/src/generated.pyx":5512 * * # not nan * if val == val: # <<<<<<<<<<<<<< * nobs[lab, j] += 1 * sumx[lab, j] += val */ __pyx_t_3 = ((__pyx_v_val == __pyx_v_val) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":5513 * # not nan * if val == val: * nobs[lab, j] += 1 # <<<<<<<<<<<<<< * sumx[lab, j] += val * else: */ __pyx_t_20 = __pyx_v_lab; __pyx_t_21 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_nobs.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_nobs.diminfo[0].strides, __pyx_t_21, __pyx_pybuffernd_nobs.diminfo[1].strides) += 1.0; /* "pandas/src/generated.pyx":5514 * if val == val: * nobs[lab, j] += 1 * sumx[lab, j] += val # <<<<<<<<<<<<<< * else: * for i in range(N): */ __pyx_t_22 = __pyx_v_lab; __pyx_t_23 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_sumx.rcbuffer->pybuffer.buf, __pyx_t_22, __pyx_pybuffernd_sumx.diminfo[0].strides, __pyx_t_23, __pyx_pybuffernd_sumx.diminfo[1].strides) += __pyx_v_val; goto __pyx_L12; } __pyx_L12:; } __pyx_L7_continue:; } goto __pyx_L6; } /*else*/ { /* "pandas/src/generated.pyx":5516 * sumx[lab, j] += val * else: * for i in range(N): # <<<<<<<<<<<<<< * lab = labels[i] * if lab < 0: */ __pyx_t_1 = __pyx_v_N; for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) { __pyx_v_i = __pyx_t_2; /* "pandas/src/generated.pyx":5517 * else: * for i in range(N): * lab = labels[i] # <<<<<<<<<<<<<< * if lab < 0: * continue */ __pyx_t_16 = __pyx_v_i; __pyx_v_lab = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_labels.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_labels.diminfo[0].strides)); /* "pandas/src/generated.pyx":5518 * for i in range(N): * lab = labels[i] * if lab < 0: # <<<<<<<<<<<<<< * continue * */ __pyx_t_3 = ((__pyx_v_lab < 0) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":5519 * lab = labels[i] * if lab < 0: * continue # <<<<<<<<<<<<<< * * counts[lab] += 1 */ goto __pyx_L13_continue; goto __pyx_L15; } __pyx_L15:; /* "pandas/src/generated.pyx":5521 * continue * * counts[lab] += 1 # <<<<<<<<<<<<<< * val = values[i, 0] * */ __pyx_t_17 = __pyx_v_lab; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_counts.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_counts.diminfo[0].strides) += 1; /* "pandas/src/generated.pyx":5522 * * counts[lab] += 1 * val = values[i, 0] # <<<<<<<<<<<<<< * * # not nan */ __pyx_t_24 = __pyx_v_i; __pyx_t_25 = 0; __pyx_v_val = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_24, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_25, __pyx_pybuffernd_values.diminfo[1].strides)); /* "pandas/src/generated.pyx":5525 * * # not nan * if val == val: # <<<<<<<<<<<<<< * nobs[lab, 0] += 1 * sumx[lab, 0] += val */ __pyx_t_3 = ((__pyx_v_val == __pyx_v_val) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":5526 * # not nan * if val == val: * nobs[lab, 0] += 1 # <<<<<<<<<<<<<< * sumx[lab, 0] += val * */ __pyx_t_26 = __pyx_v_lab; __pyx_t_27 = 0; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_nobs.rcbuffer->pybuffer.buf, __pyx_t_26, __pyx_pybuffernd_nobs.diminfo[0].strides, __pyx_t_27, __pyx_pybuffernd_nobs.diminfo[1].strides) += 1.0; /* "pandas/src/generated.pyx":5527 * if val == val: * nobs[lab, 0] += 1 * sumx[lab, 0] += val # <<<<<<<<<<<<<< * * for i in range(len(counts)): */ __pyx_t_28 = __pyx_v_lab; __pyx_t_29 = 0; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_sumx.rcbuffer->pybuffer.buf, __pyx_t_28, __pyx_pybuffernd_sumx.diminfo[0].strides, __pyx_t_29, __pyx_pybuffernd_sumx.diminfo[1].strides) += __pyx_v_val; goto __pyx_L16; } __pyx_L16:; __pyx_L13_continue:; } } __pyx_L6:; /* "pandas/src/generated.pyx":5529 * sumx[lab, 0] += val * * for i in range(len(counts)): # <<<<<<<<<<<<<< * for j in range(K): * if nobs[i, j] == 0: */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_counts)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5529; __pyx_clineno = __LINE__; goto __pyx_L1_error;} for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) { __pyx_v_i = __pyx_t_2; /* "pandas/src/generated.pyx":5530 * * for i in range(len(counts)): * for j in range(K): # <<<<<<<<<<<<<< * if nobs[i, j] == 0: * out[i, j] = nan */ __pyx_t_30 = __pyx_v_K; for (__pyx_t_31 = 0; __pyx_t_31 < __pyx_t_30; __pyx_t_31+=1) { __pyx_v_j = __pyx_t_31; /* "pandas/src/generated.pyx":5531 * for i in range(len(counts)): * for j in range(K): * if nobs[i, j] == 0: # <<<<<<<<<<<<<< * out[i, j] = nan * else: */ __pyx_t_32 = __pyx_v_i; __pyx_t_33 = __pyx_v_j; __pyx_t_3 = (((*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_nobs.rcbuffer->pybuffer.buf, __pyx_t_32, __pyx_pybuffernd_nobs.diminfo[0].strides, __pyx_t_33, __pyx_pybuffernd_nobs.diminfo[1].strides)) == 0.0) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":5532 * for j in range(K): * if nobs[i, j] == 0: * out[i, j] = nan # <<<<<<<<<<<<<< * else: * out[i, j] = sumx[i, j] */ __pyx_t_34 = __pyx_v_i; __pyx_t_35 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_34, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_35, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_6pandas_5algos_nan; goto __pyx_L21; } /*else*/ { /* "pandas/src/generated.pyx":5534 * out[i, j] = nan * else: * out[i, j] = sumx[i, j] # <<<<<<<<<<<<<< * * @cython.boundscheck(False) */ __pyx_t_36 = __pyx_v_i; __pyx_t_37 = __pyx_v_j; __pyx_t_38 = __pyx_v_i; __pyx_t_39 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_38, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_39, __pyx_pybuffernd_out.diminfo[1].strides) = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_sumx.rcbuffer->pybuffer.buf, __pyx_t_36, __pyx_pybuffernd_sumx.diminfo[0].strides, __pyx_t_37, __pyx_pybuffernd_sumx.diminfo[1].strides)); } __pyx_L21:; } } __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_12); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_counts.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_labels.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_sumx.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.group_add_float32", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_counts.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_labels.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_sumx.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_sumx); __Pyx_XDECREF((PyObject *)__pyx_v_nobs); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_407group_add_bin_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6pandas_5algos_406group_add_bin_float64[] = "\n Only aggregates on axis=0\n "; static PyMethodDef __pyx_mdef_6pandas_5algos_407group_add_bin_float64 = {__Pyx_NAMESTR("group_add_bin_float64"), (PyCFunction)__pyx_pw_6pandas_5algos_407group_add_bin_float64, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_5algos_406group_add_bin_float64)}; static PyObject *__pyx_pw_6pandas_5algos_407group_add_bin_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_out = 0; PyArrayObject *__pyx_v_counts = 0; PyArrayObject *__pyx_v_values = 0; PyArrayObject *__pyx_v_bins = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("group_add_bin_float64 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__out,&__pyx_n_s__counts,&__pyx_n_s__values,&__pyx_n_s__bins,0}; PyObject* values[4] = {0,0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__out)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__counts)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("group_add_bin_float64", 1, 4, 4, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5538; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__values)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("group_add_bin_float64", 1, 4, 4, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5538; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__bins)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("group_add_bin_float64", 1, 4, 4, 3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5538; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "group_add_bin_float64") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5538; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 4) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[3] = PyTuple_GET_ITEM(__pyx_args, 3); } __pyx_v_out = ((PyArrayObject *)values[0]); __pyx_v_counts = ((PyArrayObject *)values[1]); __pyx_v_values = ((PyArrayObject *)values[2]); __pyx_v_bins = ((PyArrayObject *)values[3]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("group_add_bin_float64", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5538; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.group_add_bin_float64", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_5numpy_ndarray, 1, "out", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5538; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_counts), __pyx_ptype_5numpy_ndarray, 1, "counts", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5539; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5540; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_bins), __pyx_ptype_5numpy_ndarray, 1, "bins", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5541; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_406group_add_bin_float64(__pyx_self, __pyx_v_out, __pyx_v_counts, __pyx_v_values, __pyx_v_bins); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":5538 * @cython.boundscheck(False) * @cython.wraparound(False) * def group_add_bin_float64(ndarray[float64_t, ndim=2] out, # <<<<<<<<<<<<<< * ndarray[int64_t] counts, * ndarray[float64_t, ndim=2] values, */ static PyObject *__pyx_pf_6pandas_5algos_406group_add_bin_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_out, PyArrayObject *__pyx_v_counts, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_bins) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_N; Py_ssize_t __pyx_v_K; Py_ssize_t __pyx_v_ngroups; Py_ssize_t __pyx_v_b; __pyx_t_5numpy_float64_t __pyx_v_val; PyArrayObject *__pyx_v_sumx = 0; PyArrayObject *__pyx_v_nobs = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_bins; __Pyx_Buffer __pyx_pybuffer_bins; __Pyx_LocalBuf_ND __pyx_pybuffernd_counts; __Pyx_Buffer __pyx_pybuffer_counts; __Pyx_LocalBuf_ND __pyx_pybuffernd_nobs; __Pyx_Buffer __pyx_pybuffer_nobs; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_sumx; __Pyx_Buffer __pyx_pybuffer_sumx; __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; PyArrayObject *__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; Py_ssize_t __pyx_t_11; int __pyx_t_12; PyObject *__pyx_t_13 = NULL; PyObject *(*__pyx_t_14)(PyObject *); Py_ssize_t __pyx_t_15; int __pyx_t_16; int __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; long __pyx_t_28; Py_ssize_t __pyx_t_29; long __pyx_t_30; Py_ssize_t __pyx_t_31; long __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; Py_ssize_t __pyx_t_37; Py_ssize_t __pyx_t_38; Py_ssize_t __pyx_t_39; Py_ssize_t __pyx_t_40; Py_ssize_t __pyx_t_41; Py_ssize_t __pyx_t_42; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("group_add_bin_float64", 0); __pyx_pybuffer_sumx.pybuffer.buf = NULL; __pyx_pybuffer_sumx.refcount = 0; __pyx_pybuffernd_sumx.data = NULL; __pyx_pybuffernd_sumx.rcbuffer = &__pyx_pybuffer_sumx; __pyx_pybuffer_nobs.pybuffer.buf = NULL; __pyx_pybuffer_nobs.refcount = 0; __pyx_pybuffernd_nobs.data = NULL; __pyx_pybuffernd_nobs.rcbuffer = &__pyx_pybuffer_nobs; __pyx_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; __pyx_pybuffer_counts.pybuffer.buf = NULL; __pyx_pybuffer_counts.refcount = 0; __pyx_pybuffernd_counts.data = NULL; __pyx_pybuffernd_counts.rcbuffer = &__pyx_pybuffer_counts; __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_bins.pybuffer.buf = NULL; __pyx_pybuffer_bins.refcount = 0; __pyx_pybuffernd_bins.data = NULL; __pyx_pybuffernd_bins.rcbuffer = &__pyx_pybuffer_bins; { __Pyx_BufFmt_StackElem __pyx_stack[1]; 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, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5538; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; __pyx_pybuffernd_out.diminfo[1].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_out.diminfo[1].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[1]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_counts.rcbuffer->pybuffer, (PyObject*)__pyx_v_counts, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5538; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_counts.diminfo[0].strides = __pyx_pybuffernd_counts.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_counts.diminfo[0].shape = __pyx_pybuffernd_counts.rcbuffer->pybuffer.shape[0]; { __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, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5538; __pyx_clineno = __LINE__; goto __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_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_bins.rcbuffer->pybuffer, (PyObject*)__pyx_v_bins, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5538; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_bins.diminfo[0].strides = __pyx_pybuffernd_bins.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_bins.diminfo[0].shape = __pyx_pybuffernd_bins.rcbuffer->pybuffer.shape[0]; /* "pandas/src/generated.pyx":5550 * ndarray[float64_t, ndim=2] sumx, nobs * * nobs = np.zeros_like(out) # <<<<<<<<<<<<<< * sumx = np.zeros_like(out) * */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5550; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s__zeros_like); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5550; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 5550; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)__pyx_v_out)); PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_out)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out)); __pyx_t_3 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5550; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(((PyObject *)__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_filename = __pyx_f[2]; __pyx_lineno = 5550; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_4 = ((PyArrayObject *)__pyx_t_3); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer); __pyx_t_5 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer, (PyObject*)__pyx_t_4, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_nobs.rcbuffer->pybuffer, (PyObject*)__pyx_v_nobs, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_pybuffernd_nobs.diminfo[0].strides = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_nobs.diminfo[0].shape = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_nobs.diminfo[1].strides = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_nobs.diminfo[1].shape = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.shape[1]; if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5550; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_4 = 0; __pyx_v_nobs = ((PyArrayObject *)__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/generated.pyx":5551 * * nobs = np.zeros_like(out) * sumx = np.zeros_like(out) # <<<<<<<<<<<<<< * * if bins[len(bins) - 1] == len(values): */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5551; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s__zeros_like); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5551; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5551; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(((PyObject *)__pyx_v_out)); PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_v_out)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out)); __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5551; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(((PyObject *)__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_filename = __pyx_f[2]; __pyx_lineno = 5551; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_4 = ((PyArrayObject *)__pyx_t_2); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_sumx.rcbuffer->pybuffer); __pyx_t_5 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_sumx.rcbuffer->pybuffer, (PyObject*)__pyx_t_4, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_sumx.rcbuffer->pybuffer, (PyObject*)__pyx_v_sumx, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_pybuffernd_sumx.diminfo[0].strides = __pyx_pybuffernd_sumx.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_sumx.diminfo[0].shape = __pyx_pybuffernd_sumx.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_sumx.diminfo[1].strides = __pyx_pybuffernd_sumx.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_sumx.diminfo[1].shape = __pyx_pybuffernd_sumx.rcbuffer->pybuffer.shape[1]; if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5551; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_4 = 0; __pyx_v_sumx = ((PyArrayObject *)__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":5553 * sumx = np.zeros_like(out) * * if bins[len(bins) - 1] == len(values): # <<<<<<<<<<<<<< * ngroups = len(bins) * else: */ __pyx_t_9 = PyObject_Length(((PyObject *)__pyx_v_bins)); if (unlikely(__pyx_t_9 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5553; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_10 = (__pyx_t_9 - 1); __pyx_t_11 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5553; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_12 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_bins.rcbuffer->pybuffer.buf, __pyx_t_10, __pyx_pybuffernd_bins.diminfo[0].strides)) == __pyx_t_11) != 0); if (__pyx_t_12) { /* "pandas/src/generated.pyx":5554 * * if bins[len(bins) - 1] == len(values): * ngroups = len(bins) # <<<<<<<<<<<<<< * else: * ngroups = len(bins) + 1 */ __pyx_t_11 = PyObject_Length(((PyObject *)__pyx_v_bins)); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5554; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_ngroups = __pyx_t_11; goto __pyx_L3; } /*else*/ { /* "pandas/src/generated.pyx":5556 * ngroups = len(bins) * else: * ngroups = len(bins) + 1 # <<<<<<<<<<<<<< * N, K = ( values).shape * */ __pyx_t_11 = PyObject_Length(((PyObject *)__pyx_v_bins)); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5556; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_ngroups = (__pyx_t_11 + 1); } __pyx_L3:; /* "pandas/src/generated.pyx":5557 * else: * ngroups = len(bins) + 1 * N, K = ( values).shape # <<<<<<<<<<<<<< * * b = 0 */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_values), __pyx_n_s__shape); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5557; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if ((likely(PyTuple_CheckExact(__pyx_t_2))) || (PyList_CheckExact(__pyx_t_2))) { PyObject* sequence = __pyx_t_2; #if CYTHON_COMPILING_IN_CPYTHON Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5557; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_1 = PyTuple_GET_ITEM(sequence, 1); } else { __pyx_t_3 = PyList_GET_ITEM(sequence, 0); __pyx_t_1 = PyList_GET_ITEM(sequence, 1); } __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(__pyx_t_1); #else __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5557; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5557; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); #endif __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } else { Py_ssize_t index = -1; __pyx_t_13 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5557; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_14 = Py_TYPE(__pyx_t_13)->tp_iternext; index = 0; __pyx_t_3 = __pyx_t_14(__pyx_t_13); if (unlikely(!__pyx_t_3)) goto __pyx_L4_unpacking_failed; __Pyx_GOTREF(__pyx_t_3); index = 1; __pyx_t_1 = __pyx_t_14(__pyx_t_13); if (unlikely(!__pyx_t_1)) goto __pyx_L4_unpacking_failed; __Pyx_GOTREF(__pyx_t_1); if (__Pyx_IternextUnpackEndCheck(__pyx_t_14(__pyx_t_13), 2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5557; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_14 = NULL; __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; goto __pyx_L5_unpacking_done; __pyx_L4_unpacking_failed:; __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_14 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5557; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_L5_unpacking_done:; } __pyx_t_11 = __Pyx_PyIndex_AsSsize_t(__pyx_t_3); if (unlikely((__pyx_t_11 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5557; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_9 = __Pyx_PyIndex_AsSsize_t(__pyx_t_1); if (unlikely((__pyx_t_9 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5557; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_N = __pyx_t_11; __pyx_v_K = __pyx_t_9; /* "pandas/src/generated.pyx":5559 * N, K = ( values).shape * * b = 0 # <<<<<<<<<<<<<< * if K > 1: * for i in range(N): */ __pyx_v_b = 0; /* "pandas/src/generated.pyx":5560 * * b = 0 * if K > 1: # <<<<<<<<<<<<<< * for i in range(N): * while b < ngroups - 1 and i >= bins[b]: */ __pyx_t_12 = ((__pyx_v_K > 1) != 0); if (__pyx_t_12) { /* "pandas/src/generated.pyx":5561 * b = 0 * if K > 1: * for i in range(N): # <<<<<<<<<<<<<< * while b < ngroups - 1 and i >= bins[b]: * b += 1 */ __pyx_t_9 = __pyx_v_N; for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_9; __pyx_t_11+=1) { __pyx_v_i = __pyx_t_11; /* "pandas/src/generated.pyx":5562 * if K > 1: * for i in range(N): * while b < ngroups - 1 and i >= bins[b]: # <<<<<<<<<<<<<< * b += 1 * */ while (1) { __pyx_t_12 = ((__pyx_v_b < (__pyx_v_ngroups - 1)) != 0); if (__pyx_t_12) { __pyx_t_15 = __pyx_v_b; __pyx_t_16 = ((__pyx_v_i >= (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_bins.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_bins.diminfo[0].strides))) != 0); __pyx_t_17 = __pyx_t_16; } else { __pyx_t_17 = __pyx_t_12; } if (!__pyx_t_17) break; /* "pandas/src/generated.pyx":5563 * for i in range(N): * while b < ngroups - 1 and i >= bins[b]: * b += 1 # <<<<<<<<<<<<<< * * counts[b] += 1 */ __pyx_v_b = (__pyx_v_b + 1); } /* "pandas/src/generated.pyx":5565 * b += 1 * * counts[b] += 1 # <<<<<<<<<<<<<< * for j in range(K): * val = values[i, j] */ __pyx_t_18 = __pyx_v_b; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_counts.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_counts.diminfo[0].strides) += 1; /* "pandas/src/generated.pyx":5566 * * counts[b] += 1 * for j in range(K): # <<<<<<<<<<<<<< * val = values[i, j] * */ __pyx_t_19 = __pyx_v_K; for (__pyx_t_20 = 0; __pyx_t_20 < __pyx_t_19; __pyx_t_20+=1) { __pyx_v_j = __pyx_t_20; /* "pandas/src/generated.pyx":5567 * counts[b] += 1 * for j in range(K): * val = values[i, j] # <<<<<<<<<<<<<< * * # not nan */ __pyx_t_21 = __pyx_v_i; __pyx_t_22 = __pyx_v_j; __pyx_v_val = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_22, __pyx_pybuffernd_values.diminfo[1].strides)); /* "pandas/src/generated.pyx":5570 * * # not nan * if val == val: # <<<<<<<<<<<<<< * nobs[b, j] += 1 * sumx[b, j] += val */ __pyx_t_17 = ((__pyx_v_val == __pyx_v_val) != 0); if (__pyx_t_17) { /* "pandas/src/generated.pyx":5571 * # not nan * if val == val: * nobs[b, j] += 1 # <<<<<<<<<<<<<< * sumx[b, j] += val * else: */ __pyx_t_23 = __pyx_v_b; __pyx_t_24 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_nobs.rcbuffer->pybuffer.buf, __pyx_t_23, __pyx_pybuffernd_nobs.diminfo[0].strides, __pyx_t_24, __pyx_pybuffernd_nobs.diminfo[1].strides) += 1.0; /* "pandas/src/generated.pyx":5572 * if val == val: * nobs[b, j] += 1 * sumx[b, j] += val # <<<<<<<<<<<<<< * else: * for i in range(N): */ __pyx_t_25 = __pyx_v_b; __pyx_t_26 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_sumx.rcbuffer->pybuffer.buf, __pyx_t_25, __pyx_pybuffernd_sumx.diminfo[0].strides, __pyx_t_26, __pyx_pybuffernd_sumx.diminfo[1].strides) += __pyx_v_val; goto __pyx_L13; } __pyx_L13:; } } goto __pyx_L6; } /*else*/ { /* "pandas/src/generated.pyx":5574 * sumx[b, j] += val * else: * for i in range(N): # <<<<<<<<<<<<<< * while b < ngroups - 1 and i >= bins[b]: * b += 1 */ __pyx_t_9 = __pyx_v_N; for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_9; __pyx_t_11+=1) { __pyx_v_i = __pyx_t_11; /* "pandas/src/generated.pyx":5575 * else: * for i in range(N): * while b < ngroups - 1 and i >= bins[b]: # <<<<<<<<<<<<<< * b += 1 * */ while (1) { __pyx_t_17 = ((__pyx_v_b < (__pyx_v_ngroups - 1)) != 0); if (__pyx_t_17) { __pyx_t_19 = __pyx_v_b; __pyx_t_12 = ((__pyx_v_i >= (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_bins.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_bins.diminfo[0].strides))) != 0); __pyx_t_16 = __pyx_t_12; } else { __pyx_t_16 = __pyx_t_17; } if (!__pyx_t_16) break; /* "pandas/src/generated.pyx":5576 * for i in range(N): * while b < ngroups - 1 and i >= bins[b]: * b += 1 # <<<<<<<<<<<<<< * * counts[b] += 1 */ __pyx_v_b = (__pyx_v_b + 1); } /* "pandas/src/generated.pyx":5578 * b += 1 * * counts[b] += 1 # <<<<<<<<<<<<<< * val = values[i, 0] * */ __pyx_t_20 = __pyx_v_b; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_counts.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_counts.diminfo[0].strides) += 1; /* "pandas/src/generated.pyx":5579 * * counts[b] += 1 * val = values[i, 0] # <<<<<<<<<<<<<< * * # not nan */ __pyx_t_27 = __pyx_v_i; __pyx_t_28 = 0; __pyx_v_val = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_27, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_28, __pyx_pybuffernd_values.diminfo[1].strides)); /* "pandas/src/generated.pyx":5582 * * # not nan * if val == val: # <<<<<<<<<<<<<< * nobs[b, 0] += 1 * sumx[b, 0] += val */ __pyx_t_16 = ((__pyx_v_val == __pyx_v_val) != 0); if (__pyx_t_16) { /* "pandas/src/generated.pyx":5583 * # not nan * if val == val: * nobs[b, 0] += 1 # <<<<<<<<<<<<<< * sumx[b, 0] += val * */ __pyx_t_29 = __pyx_v_b; __pyx_t_30 = 0; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_nobs.rcbuffer->pybuffer.buf, __pyx_t_29, __pyx_pybuffernd_nobs.diminfo[0].strides, __pyx_t_30, __pyx_pybuffernd_nobs.diminfo[1].strides) += 1.0; /* "pandas/src/generated.pyx":5584 * if val == val: * nobs[b, 0] += 1 * sumx[b, 0] += val # <<<<<<<<<<<<<< * * for i in range(ngroups): */ __pyx_t_31 = __pyx_v_b; __pyx_t_32 = 0; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_sumx.rcbuffer->pybuffer.buf, __pyx_t_31, __pyx_pybuffernd_sumx.diminfo[0].strides, __pyx_t_32, __pyx_pybuffernd_sumx.diminfo[1].strides) += __pyx_v_val; goto __pyx_L18; } __pyx_L18:; } } __pyx_L6:; /* "pandas/src/generated.pyx":5586 * sumx[b, 0] += val * * for i in range(ngroups): # <<<<<<<<<<<<<< * for j in range(K): * if nobs[i, j] == 0: */ __pyx_t_9 = __pyx_v_ngroups; for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_9; __pyx_t_11+=1) { __pyx_v_i = __pyx_t_11; /* "pandas/src/generated.pyx":5587 * * for i in range(ngroups): * for j in range(K): # <<<<<<<<<<<<<< * if nobs[i, j] == 0: * out[i, j] = nan */ __pyx_t_33 = __pyx_v_K; for (__pyx_t_34 = 0; __pyx_t_34 < __pyx_t_33; __pyx_t_34+=1) { __pyx_v_j = __pyx_t_34; /* "pandas/src/generated.pyx":5588 * for i in range(ngroups): * for j in range(K): * if nobs[i, j] == 0: # <<<<<<<<<<<<<< * out[i, j] = nan * else: */ __pyx_t_35 = __pyx_v_i; __pyx_t_36 = __pyx_v_j; __pyx_t_16 = (((*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_nobs.rcbuffer->pybuffer.buf, __pyx_t_35, __pyx_pybuffernd_nobs.diminfo[0].strides, __pyx_t_36, __pyx_pybuffernd_nobs.diminfo[1].strides)) == 0.0) != 0); if (__pyx_t_16) { /* "pandas/src/generated.pyx":5589 * for j in range(K): * if nobs[i, j] == 0: * out[i, j] = nan # <<<<<<<<<<<<<< * else: * out[i, j] = sumx[i, j] */ __pyx_t_37 = __pyx_v_i; __pyx_t_38 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_37, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_38, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_6pandas_5algos_nan; goto __pyx_L23; } /*else*/ { /* "pandas/src/generated.pyx":5591 * out[i, j] = nan * else: * out[i, j] = sumx[i, j] # <<<<<<<<<<<<<< * @cython.boundscheck(False) * @cython.wraparound(False) */ __pyx_t_39 = __pyx_v_i; __pyx_t_40 = __pyx_v_j; __pyx_t_41 = __pyx_v_i; __pyx_t_42 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_41, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_42, __pyx_pybuffernd_out.diminfo[1].strides) = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_sumx.rcbuffer->pybuffer.buf, __pyx_t_39, __pyx_pybuffernd_sumx.diminfo[0].strides, __pyx_t_40, __pyx_pybuffernd_sumx.diminfo[1].strides)); } __pyx_L23:; } } __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_13); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_bins.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_counts.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_sumx.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.group_add_bin_float64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_bins.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_counts.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_sumx.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_sumx); __Pyx_XDECREF((PyObject *)__pyx_v_nobs); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_409group_add_bin_float32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6pandas_5algos_408group_add_bin_float32[] = "\n Only aggregates on axis=0\n "; static PyMethodDef __pyx_mdef_6pandas_5algos_409group_add_bin_float32 = {__Pyx_NAMESTR("group_add_bin_float32"), (PyCFunction)__pyx_pw_6pandas_5algos_409group_add_bin_float32, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_5algos_408group_add_bin_float32)}; static PyObject *__pyx_pw_6pandas_5algos_409group_add_bin_float32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_out = 0; PyArrayObject *__pyx_v_counts = 0; PyArrayObject *__pyx_v_values = 0; PyArrayObject *__pyx_v_bins = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("group_add_bin_float32 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__out,&__pyx_n_s__counts,&__pyx_n_s__values,&__pyx_n_s__bins,0}; PyObject* values[4] = {0,0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__out)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__counts)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("group_add_bin_float32", 1, 4, 4, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5594; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__values)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("group_add_bin_float32", 1, 4, 4, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5594; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__bins)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("group_add_bin_float32", 1, 4, 4, 3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5594; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "group_add_bin_float32") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5594; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 4) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[3] = PyTuple_GET_ITEM(__pyx_args, 3); } __pyx_v_out = ((PyArrayObject *)values[0]); __pyx_v_counts = ((PyArrayObject *)values[1]); __pyx_v_values = ((PyArrayObject *)values[2]); __pyx_v_bins = ((PyArrayObject *)values[3]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("group_add_bin_float32", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5594; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.group_add_bin_float32", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_5numpy_ndarray, 1, "out", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5594; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_counts), __pyx_ptype_5numpy_ndarray, 1, "counts", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5595; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5596; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_bins), __pyx_ptype_5numpy_ndarray, 1, "bins", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5597; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_408group_add_bin_float32(__pyx_self, __pyx_v_out, __pyx_v_counts, __pyx_v_values, __pyx_v_bins); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":5594 * @cython.boundscheck(False) * @cython.wraparound(False) * def group_add_bin_float32(ndarray[float32_t, ndim=2] out, # <<<<<<<<<<<<<< * ndarray[int64_t] counts, * ndarray[float32_t, ndim=2] values, */ static PyObject *__pyx_pf_6pandas_5algos_408group_add_bin_float32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_out, PyArrayObject *__pyx_v_counts, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_bins) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_N; Py_ssize_t __pyx_v_K; Py_ssize_t __pyx_v_ngroups; Py_ssize_t __pyx_v_b; __pyx_t_5numpy_float32_t __pyx_v_val; PyArrayObject *__pyx_v_sumx = 0; PyArrayObject *__pyx_v_nobs = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_bins; __Pyx_Buffer __pyx_pybuffer_bins; __Pyx_LocalBuf_ND __pyx_pybuffernd_counts; __Pyx_Buffer __pyx_pybuffer_counts; __Pyx_LocalBuf_ND __pyx_pybuffernd_nobs; __Pyx_Buffer __pyx_pybuffer_nobs; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_sumx; __Pyx_Buffer __pyx_pybuffer_sumx; __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; PyArrayObject *__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; Py_ssize_t __pyx_t_11; int __pyx_t_12; PyObject *__pyx_t_13 = NULL; PyObject *(*__pyx_t_14)(PyObject *); Py_ssize_t __pyx_t_15; int __pyx_t_16; int __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; long __pyx_t_28; Py_ssize_t __pyx_t_29; long __pyx_t_30; Py_ssize_t __pyx_t_31; long __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; Py_ssize_t __pyx_t_37; Py_ssize_t __pyx_t_38; Py_ssize_t __pyx_t_39; Py_ssize_t __pyx_t_40; Py_ssize_t __pyx_t_41; Py_ssize_t __pyx_t_42; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("group_add_bin_float32", 0); __pyx_pybuffer_sumx.pybuffer.buf = NULL; __pyx_pybuffer_sumx.refcount = 0; __pyx_pybuffernd_sumx.data = NULL; __pyx_pybuffernd_sumx.rcbuffer = &__pyx_pybuffer_sumx; __pyx_pybuffer_nobs.pybuffer.buf = NULL; __pyx_pybuffer_nobs.refcount = 0; __pyx_pybuffernd_nobs.data = NULL; __pyx_pybuffernd_nobs.rcbuffer = &__pyx_pybuffer_nobs; __pyx_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; __pyx_pybuffer_counts.pybuffer.buf = NULL; __pyx_pybuffer_counts.refcount = 0; __pyx_pybuffernd_counts.data = NULL; __pyx_pybuffernd_counts.rcbuffer = &__pyx_pybuffer_counts; __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_bins.pybuffer.buf = NULL; __pyx_pybuffer_bins.refcount = 0; __pyx_pybuffernd_bins.data = NULL; __pyx_pybuffernd_bins.rcbuffer = &__pyx_pybuffer_bins; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_v_out, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5594; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; __pyx_pybuffernd_out.diminfo[1].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_out.diminfo[1].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[1]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_counts.rcbuffer->pybuffer, (PyObject*)__pyx_v_counts, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5594; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_counts.diminfo[0].strides = __pyx_pybuffernd_counts.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_counts.diminfo[0].shape = __pyx_pybuffernd_counts.rcbuffer->pybuffer.shape[0]; { __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_float32_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5594; __pyx_clineno = __LINE__; goto __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_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_bins.rcbuffer->pybuffer, (PyObject*)__pyx_v_bins, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5594; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_bins.diminfo[0].strides = __pyx_pybuffernd_bins.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_bins.diminfo[0].shape = __pyx_pybuffernd_bins.rcbuffer->pybuffer.shape[0]; /* "pandas/src/generated.pyx":5606 * ndarray[float32_t, ndim=2] sumx, nobs * * nobs = np.zeros_like(out) # <<<<<<<<<<<<<< * sumx = np.zeros_like(out) * */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5606; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s__zeros_like); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5606; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 5606; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)__pyx_v_out)); PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_out)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out)); __pyx_t_3 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5606; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(((PyObject *)__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_filename = __pyx_f[2]; __pyx_lineno = 5606; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_4 = ((PyArrayObject *)__pyx_t_3); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer); __pyx_t_5 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer, (PyObject*)__pyx_t_4, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_nobs.rcbuffer->pybuffer, (PyObject*)__pyx_v_nobs, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_pybuffernd_nobs.diminfo[0].strides = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_nobs.diminfo[0].shape = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_nobs.diminfo[1].strides = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_nobs.diminfo[1].shape = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.shape[1]; if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5606; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_4 = 0; __pyx_v_nobs = ((PyArrayObject *)__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/generated.pyx":5607 * * nobs = np.zeros_like(out) * sumx = np.zeros_like(out) # <<<<<<<<<<<<<< * * if bins[len(bins) - 1] == len(values): */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5607; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s__zeros_like); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5607; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5607; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(((PyObject *)__pyx_v_out)); PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_v_out)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out)); __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5607; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(((PyObject *)__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_filename = __pyx_f[2]; __pyx_lineno = 5607; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_4 = ((PyArrayObject *)__pyx_t_2); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_sumx.rcbuffer->pybuffer); __pyx_t_5 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_sumx.rcbuffer->pybuffer, (PyObject*)__pyx_t_4, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_sumx.rcbuffer->pybuffer, (PyObject*)__pyx_v_sumx, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_pybuffernd_sumx.diminfo[0].strides = __pyx_pybuffernd_sumx.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_sumx.diminfo[0].shape = __pyx_pybuffernd_sumx.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_sumx.diminfo[1].strides = __pyx_pybuffernd_sumx.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_sumx.diminfo[1].shape = __pyx_pybuffernd_sumx.rcbuffer->pybuffer.shape[1]; if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5607; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_4 = 0; __pyx_v_sumx = ((PyArrayObject *)__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":5609 * sumx = np.zeros_like(out) * * if bins[len(bins) - 1] == len(values): # <<<<<<<<<<<<<< * ngroups = len(bins) * else: */ __pyx_t_9 = PyObject_Length(((PyObject *)__pyx_v_bins)); if (unlikely(__pyx_t_9 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5609; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_10 = (__pyx_t_9 - 1); __pyx_t_11 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5609; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_12 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_bins.rcbuffer->pybuffer.buf, __pyx_t_10, __pyx_pybuffernd_bins.diminfo[0].strides)) == __pyx_t_11) != 0); if (__pyx_t_12) { /* "pandas/src/generated.pyx":5610 * * if bins[len(bins) - 1] == len(values): * ngroups = len(bins) # <<<<<<<<<<<<<< * else: * ngroups = len(bins) + 1 */ __pyx_t_11 = PyObject_Length(((PyObject *)__pyx_v_bins)); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5610; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_ngroups = __pyx_t_11; goto __pyx_L3; } /*else*/ { /* "pandas/src/generated.pyx":5612 * ngroups = len(bins) * else: * ngroups = len(bins) + 1 # <<<<<<<<<<<<<< * N, K = ( values).shape * */ __pyx_t_11 = PyObject_Length(((PyObject *)__pyx_v_bins)); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5612; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_ngroups = (__pyx_t_11 + 1); } __pyx_L3:; /* "pandas/src/generated.pyx":5613 * else: * ngroups = len(bins) + 1 * N, K = ( values).shape # <<<<<<<<<<<<<< * * b = 0 */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_values), __pyx_n_s__shape); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5613; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if ((likely(PyTuple_CheckExact(__pyx_t_2))) || (PyList_CheckExact(__pyx_t_2))) { PyObject* sequence = __pyx_t_2; #if CYTHON_COMPILING_IN_CPYTHON Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5613; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_1 = PyTuple_GET_ITEM(sequence, 1); } else { __pyx_t_3 = PyList_GET_ITEM(sequence, 0); __pyx_t_1 = PyList_GET_ITEM(sequence, 1); } __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(__pyx_t_1); #else __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5613; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5613; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); #endif __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } else { Py_ssize_t index = -1; __pyx_t_13 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5613; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_14 = Py_TYPE(__pyx_t_13)->tp_iternext; index = 0; __pyx_t_3 = __pyx_t_14(__pyx_t_13); if (unlikely(!__pyx_t_3)) goto __pyx_L4_unpacking_failed; __Pyx_GOTREF(__pyx_t_3); index = 1; __pyx_t_1 = __pyx_t_14(__pyx_t_13); if (unlikely(!__pyx_t_1)) goto __pyx_L4_unpacking_failed; __Pyx_GOTREF(__pyx_t_1); if (__Pyx_IternextUnpackEndCheck(__pyx_t_14(__pyx_t_13), 2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5613; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_14 = NULL; __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; goto __pyx_L5_unpacking_done; __pyx_L4_unpacking_failed:; __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_14 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5613; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_L5_unpacking_done:; } __pyx_t_11 = __Pyx_PyIndex_AsSsize_t(__pyx_t_3); if (unlikely((__pyx_t_11 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5613; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_9 = __Pyx_PyIndex_AsSsize_t(__pyx_t_1); if (unlikely((__pyx_t_9 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5613; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_N = __pyx_t_11; __pyx_v_K = __pyx_t_9; /* "pandas/src/generated.pyx":5615 * N, K = ( values).shape * * b = 0 # <<<<<<<<<<<<<< * if K > 1: * for i in range(N): */ __pyx_v_b = 0; /* "pandas/src/generated.pyx":5616 * * b = 0 * if K > 1: # <<<<<<<<<<<<<< * for i in range(N): * while b < ngroups - 1 and i >= bins[b]: */ __pyx_t_12 = ((__pyx_v_K > 1) != 0); if (__pyx_t_12) { /* "pandas/src/generated.pyx":5617 * b = 0 * if K > 1: * for i in range(N): # <<<<<<<<<<<<<< * while b < ngroups - 1 and i >= bins[b]: * b += 1 */ __pyx_t_9 = __pyx_v_N; for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_9; __pyx_t_11+=1) { __pyx_v_i = __pyx_t_11; /* "pandas/src/generated.pyx":5618 * if K > 1: * for i in range(N): * while b < ngroups - 1 and i >= bins[b]: # <<<<<<<<<<<<<< * b += 1 * */ while (1) { __pyx_t_12 = ((__pyx_v_b < (__pyx_v_ngroups - 1)) != 0); if (__pyx_t_12) { __pyx_t_15 = __pyx_v_b; __pyx_t_16 = ((__pyx_v_i >= (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_bins.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_bins.diminfo[0].strides))) != 0); __pyx_t_17 = __pyx_t_16; } else { __pyx_t_17 = __pyx_t_12; } if (!__pyx_t_17) break; /* "pandas/src/generated.pyx":5619 * for i in range(N): * while b < ngroups - 1 and i >= bins[b]: * b += 1 # <<<<<<<<<<<<<< * * counts[b] += 1 */ __pyx_v_b = (__pyx_v_b + 1); } /* "pandas/src/generated.pyx":5621 * b += 1 * * counts[b] += 1 # <<<<<<<<<<<<<< * for j in range(K): * val = values[i, j] */ __pyx_t_18 = __pyx_v_b; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_counts.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_counts.diminfo[0].strides) += 1; /* "pandas/src/generated.pyx":5622 * * counts[b] += 1 * for j in range(K): # <<<<<<<<<<<<<< * val = values[i, j] * */ __pyx_t_19 = __pyx_v_K; for (__pyx_t_20 = 0; __pyx_t_20 < __pyx_t_19; __pyx_t_20+=1) { __pyx_v_j = __pyx_t_20; /* "pandas/src/generated.pyx":5623 * counts[b] += 1 * for j in range(K): * val = values[i, j] # <<<<<<<<<<<<<< * * # not nan */ __pyx_t_21 = __pyx_v_i; __pyx_t_22 = __pyx_v_j; __pyx_v_val = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_22, __pyx_pybuffernd_values.diminfo[1].strides)); /* "pandas/src/generated.pyx":5626 * * # not nan * if val == val: # <<<<<<<<<<<<<< * nobs[b, j] += 1 * sumx[b, j] += val */ __pyx_t_17 = ((__pyx_v_val == __pyx_v_val) != 0); if (__pyx_t_17) { /* "pandas/src/generated.pyx":5627 * # not nan * if val == val: * nobs[b, j] += 1 # <<<<<<<<<<<<<< * sumx[b, j] += val * else: */ __pyx_t_23 = __pyx_v_b; __pyx_t_24 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_nobs.rcbuffer->pybuffer.buf, __pyx_t_23, __pyx_pybuffernd_nobs.diminfo[0].strides, __pyx_t_24, __pyx_pybuffernd_nobs.diminfo[1].strides) += 1.0; /* "pandas/src/generated.pyx":5628 * if val == val: * nobs[b, j] += 1 * sumx[b, j] += val # <<<<<<<<<<<<<< * else: * for i in range(N): */ __pyx_t_25 = __pyx_v_b; __pyx_t_26 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_sumx.rcbuffer->pybuffer.buf, __pyx_t_25, __pyx_pybuffernd_sumx.diminfo[0].strides, __pyx_t_26, __pyx_pybuffernd_sumx.diminfo[1].strides) += __pyx_v_val; goto __pyx_L13; } __pyx_L13:; } } goto __pyx_L6; } /*else*/ { /* "pandas/src/generated.pyx":5630 * sumx[b, j] += val * else: * for i in range(N): # <<<<<<<<<<<<<< * while b < ngroups - 1 and i >= bins[b]: * b += 1 */ __pyx_t_9 = __pyx_v_N; for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_9; __pyx_t_11+=1) { __pyx_v_i = __pyx_t_11; /* "pandas/src/generated.pyx":5631 * else: * for i in range(N): * while b < ngroups - 1 and i >= bins[b]: # <<<<<<<<<<<<<< * b += 1 * */ while (1) { __pyx_t_17 = ((__pyx_v_b < (__pyx_v_ngroups - 1)) != 0); if (__pyx_t_17) { __pyx_t_19 = __pyx_v_b; __pyx_t_12 = ((__pyx_v_i >= (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_bins.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_bins.diminfo[0].strides))) != 0); __pyx_t_16 = __pyx_t_12; } else { __pyx_t_16 = __pyx_t_17; } if (!__pyx_t_16) break; /* "pandas/src/generated.pyx":5632 * for i in range(N): * while b < ngroups - 1 and i >= bins[b]: * b += 1 # <<<<<<<<<<<<<< * * counts[b] += 1 */ __pyx_v_b = (__pyx_v_b + 1); } /* "pandas/src/generated.pyx":5634 * b += 1 * * counts[b] += 1 # <<<<<<<<<<<<<< * val = values[i, 0] * */ __pyx_t_20 = __pyx_v_b; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_counts.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_counts.diminfo[0].strides) += 1; /* "pandas/src/generated.pyx":5635 * * counts[b] += 1 * val = values[i, 0] # <<<<<<<<<<<<<< * * # not nan */ __pyx_t_27 = __pyx_v_i; __pyx_t_28 = 0; __pyx_v_val = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_27, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_28, __pyx_pybuffernd_values.diminfo[1].strides)); /* "pandas/src/generated.pyx":5638 * * # not nan * if val == val: # <<<<<<<<<<<<<< * nobs[b, 0] += 1 * sumx[b, 0] += val */ __pyx_t_16 = ((__pyx_v_val == __pyx_v_val) != 0); if (__pyx_t_16) { /* "pandas/src/generated.pyx":5639 * # not nan * if val == val: * nobs[b, 0] += 1 # <<<<<<<<<<<<<< * sumx[b, 0] += val * */ __pyx_t_29 = __pyx_v_b; __pyx_t_30 = 0; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_nobs.rcbuffer->pybuffer.buf, __pyx_t_29, __pyx_pybuffernd_nobs.diminfo[0].strides, __pyx_t_30, __pyx_pybuffernd_nobs.diminfo[1].strides) += 1.0; /* "pandas/src/generated.pyx":5640 * if val == val: * nobs[b, 0] += 1 * sumx[b, 0] += val # <<<<<<<<<<<<<< * * for i in range(ngroups): */ __pyx_t_31 = __pyx_v_b; __pyx_t_32 = 0; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_sumx.rcbuffer->pybuffer.buf, __pyx_t_31, __pyx_pybuffernd_sumx.diminfo[0].strides, __pyx_t_32, __pyx_pybuffernd_sumx.diminfo[1].strides) += __pyx_v_val; goto __pyx_L18; } __pyx_L18:; } } __pyx_L6:; /* "pandas/src/generated.pyx":5642 * sumx[b, 0] += val * * for i in range(ngroups): # <<<<<<<<<<<<<< * for j in range(K): * if nobs[i, j] == 0: */ __pyx_t_9 = __pyx_v_ngroups; for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_9; __pyx_t_11+=1) { __pyx_v_i = __pyx_t_11; /* "pandas/src/generated.pyx":5643 * * for i in range(ngroups): * for j in range(K): # <<<<<<<<<<<<<< * if nobs[i, j] == 0: * out[i, j] = nan */ __pyx_t_33 = __pyx_v_K; for (__pyx_t_34 = 0; __pyx_t_34 < __pyx_t_33; __pyx_t_34+=1) { __pyx_v_j = __pyx_t_34; /* "pandas/src/generated.pyx":5644 * for i in range(ngroups): * for j in range(K): * if nobs[i, j] == 0: # <<<<<<<<<<<<<< * out[i, j] = nan * else: */ __pyx_t_35 = __pyx_v_i; __pyx_t_36 = __pyx_v_j; __pyx_t_16 = (((*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_nobs.rcbuffer->pybuffer.buf, __pyx_t_35, __pyx_pybuffernd_nobs.diminfo[0].strides, __pyx_t_36, __pyx_pybuffernd_nobs.diminfo[1].strides)) == 0.0) != 0); if (__pyx_t_16) { /* "pandas/src/generated.pyx":5645 * for j in range(K): * if nobs[i, j] == 0: * out[i, j] = nan # <<<<<<<<<<<<<< * else: * out[i, j] = sumx[i, j] */ __pyx_t_37 = __pyx_v_i; __pyx_t_38 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_37, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_38, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_6pandas_5algos_nan; goto __pyx_L23; } /*else*/ { /* "pandas/src/generated.pyx":5647 * out[i, j] = nan * else: * out[i, j] = sumx[i, j] # <<<<<<<<<<<<<< * * @cython.boundscheck(False) */ __pyx_t_39 = __pyx_v_i; __pyx_t_40 = __pyx_v_j; __pyx_t_41 = __pyx_v_i; __pyx_t_42 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_41, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_42, __pyx_pybuffernd_out.diminfo[1].strides) = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_sumx.rcbuffer->pybuffer.buf, __pyx_t_39, __pyx_pybuffernd_sumx.diminfo[0].strides, __pyx_t_40, __pyx_pybuffernd_sumx.diminfo[1].strides)); } __pyx_L23:; } } __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_13); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_bins.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_counts.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_sumx.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.group_add_bin_float32", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_bins.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_counts.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_sumx.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_sumx); __Pyx_XDECREF((PyObject *)__pyx_v_nobs); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_411group_prod_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6pandas_5algos_410group_prod_float64[] = "\n Only aggregates on axis=0\n "; static PyMethodDef __pyx_mdef_6pandas_5algos_411group_prod_float64 = {__Pyx_NAMESTR("group_prod_float64"), (PyCFunction)__pyx_pw_6pandas_5algos_411group_prod_float64, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_5algos_410group_prod_float64)}; static PyObject *__pyx_pw_6pandas_5algos_411group_prod_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_out = 0; PyArrayObject *__pyx_v_counts = 0; PyArrayObject *__pyx_v_values = 0; PyArrayObject *__pyx_v_labels = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("group_prod_float64 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__out,&__pyx_n_s__counts,&__pyx_n_s__values,&__pyx_n_s__labels,0}; PyObject* values[4] = {0,0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__out)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__counts)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("group_prod_float64", 1, 4, 4, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5651; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__values)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("group_prod_float64", 1, 4, 4, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5651; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__labels)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("group_prod_float64", 1, 4, 4, 3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5651; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "group_prod_float64") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5651; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 4) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[3] = PyTuple_GET_ITEM(__pyx_args, 3); } __pyx_v_out = ((PyArrayObject *)values[0]); __pyx_v_counts = ((PyArrayObject *)values[1]); __pyx_v_values = ((PyArrayObject *)values[2]); __pyx_v_labels = ((PyArrayObject *)values[3]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("group_prod_float64", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5651; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.group_prod_float64", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_5numpy_ndarray, 1, "out", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5651; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_counts), __pyx_ptype_5numpy_ndarray, 1, "counts", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5652; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5653; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_labels), __pyx_ptype_5numpy_ndarray, 1, "labels", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5654; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_410group_prod_float64(__pyx_self, __pyx_v_out, __pyx_v_counts, __pyx_v_values, __pyx_v_labels); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":5651 * @cython.boundscheck(False) * @cython.wraparound(False) * def group_prod_float64(ndarray[float64_t, ndim=2] out, # <<<<<<<<<<<<<< * ndarray[int64_t] counts, * ndarray[float64_t, ndim=2] values, */ static PyObject *__pyx_pf_6pandas_5algos_410group_prod_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_out, PyArrayObject *__pyx_v_counts, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_labels) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_N; Py_ssize_t __pyx_v_K; Py_ssize_t __pyx_v_lab; __pyx_t_5numpy_float64_t __pyx_v_val; PyArrayObject *__pyx_v_prodx = 0; PyArrayObject *__pyx_v_nobs = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_counts; __Pyx_Buffer __pyx_pybuffer_counts; __Pyx_LocalBuf_ND __pyx_pybuffernd_labels; __Pyx_Buffer __pyx_pybuffer_labels; __Pyx_LocalBuf_ND __pyx_pybuffernd_nobs; __Pyx_Buffer __pyx_pybuffer_nobs; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_prodx; __Pyx_Buffer __pyx_pybuffer_prodx; __Pyx_LocalBuf_ND __pyx_pybuffernd_values; __Pyx_Buffer __pyx_pybuffer_values; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; Py_ssize_t __pyx_t_2; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyArrayObject *__pyx_t_7 = NULL; int __pyx_t_8; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; PyObject *__pyx_t_11 = NULL; PyObject *__pyx_t_12 = NULL; PyObject *(*__pyx_t_13)(PyObject *); 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; long __pyx_t_25; Py_ssize_t __pyx_t_26; long __pyx_t_27; Py_ssize_t __pyx_t_28; long __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; Py_ssize_t __pyx_t_37; Py_ssize_t __pyx_t_38; Py_ssize_t __pyx_t_39; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("group_prod_float64", 0); __pyx_pybuffer_prodx.pybuffer.buf = NULL; __pyx_pybuffer_prodx.refcount = 0; __pyx_pybuffernd_prodx.data = NULL; __pyx_pybuffernd_prodx.rcbuffer = &__pyx_pybuffer_prodx; __pyx_pybuffer_nobs.pybuffer.buf = NULL; __pyx_pybuffer_nobs.refcount = 0; __pyx_pybuffernd_nobs.data = NULL; __pyx_pybuffernd_nobs.rcbuffer = &__pyx_pybuffer_nobs; __pyx_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; __pyx_pybuffer_counts.pybuffer.buf = NULL; __pyx_pybuffer_counts.refcount = 0; __pyx_pybuffernd_counts.data = NULL; __pyx_pybuffernd_counts.rcbuffer = &__pyx_pybuffer_counts; __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_labels.pybuffer.buf = NULL; __pyx_pybuffer_labels.refcount = 0; __pyx_pybuffernd_labels.data = NULL; __pyx_pybuffernd_labels.rcbuffer = &__pyx_pybuffer_labels; { __Pyx_BufFmt_StackElem __pyx_stack[1]; 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, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5651; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; __pyx_pybuffernd_out.diminfo[1].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_out.diminfo[1].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[1]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_counts.rcbuffer->pybuffer, (PyObject*)__pyx_v_counts, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5651; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_counts.diminfo[0].strides = __pyx_pybuffernd_counts.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_counts.diminfo[0].shape = __pyx_pybuffernd_counts.rcbuffer->pybuffer.shape[0]; { __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, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5651; __pyx_clineno = __LINE__; goto __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_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_labels.rcbuffer->pybuffer, (PyObject*)__pyx_v_labels, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5651; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_labels.diminfo[0].strides = __pyx_pybuffernd_labels.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_labels.diminfo[0].shape = __pyx_pybuffernd_labels.rcbuffer->pybuffer.shape[0]; /* "pandas/src/generated.pyx":5663 * ndarray[float64_t, ndim=2] prodx, nobs * * if not len(values) == len(labels): # <<<<<<<<<<<<<< * raise AssertionError("len(index) != len(labels)") * */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5663; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_2 = PyObject_Length(((PyObject *)__pyx_v_labels)); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5663; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_3 = ((!((__pyx_t_1 == __pyx_t_2) != 0)) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":5664 * * if not len(values) == len(labels): * raise AssertionError("len(index) != len(labels)") # <<<<<<<<<<<<<< * * nobs = np.zeros_like(out) */ __pyx_t_4 = PyObject_Call(__pyx_builtin_AssertionError, ((PyObject *)__pyx_k_tuple_190), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5664; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 5664; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L3; } __pyx_L3:; /* "pandas/src/generated.pyx":5666 * raise AssertionError("len(index) != len(labels)") * * nobs = np.zeros_like(out) # <<<<<<<<<<<<<< * prodx = np.ones_like(out) * */ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5666; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s__zeros_like); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5666; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5666; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(((PyObject *)__pyx_v_out)); PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_v_out)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out)); __pyx_t_6 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5666; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5666; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_7 = ((PyArrayObject *)__pyx_t_6); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer); __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_nobs.rcbuffer->pybuffer, (PyObject*)__pyx_v_nobs, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_pybuffernd_nobs.diminfo[0].strides = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_nobs.diminfo[0].shape = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_nobs.diminfo[1].strides = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_nobs.diminfo[1].shape = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.shape[1]; if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5666; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_7 = 0; __pyx_v_nobs = ((PyArrayObject *)__pyx_t_6); __pyx_t_6 = 0; /* "pandas/src/generated.pyx":5667 * * nobs = np.zeros_like(out) * prodx = np.ones_like(out) # <<<<<<<<<<<<<< * * N, K = ( values).shape */ __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5667; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s__ones_like); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5667; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5667; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(((PyObject *)__pyx_v_out)); PyTuple_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_v_out)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out)); __pyx_t_5 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5667; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0; if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5667; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_7 = ((PyArrayObject *)__pyx_t_5); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_prodx.rcbuffer->pybuffer); __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_prodx.rcbuffer->pybuffer, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_prodx.rcbuffer->pybuffer, (PyObject*)__pyx_v_prodx, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_pybuffernd_prodx.diminfo[0].strides = __pyx_pybuffernd_prodx.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_prodx.diminfo[0].shape = __pyx_pybuffernd_prodx.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_prodx.diminfo[1].strides = __pyx_pybuffernd_prodx.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_prodx.diminfo[1].shape = __pyx_pybuffernd_prodx.rcbuffer->pybuffer.shape[1]; if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5667; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_7 = 0; __pyx_v_prodx = ((PyArrayObject *)__pyx_t_5); __pyx_t_5 = 0; /* "pandas/src/generated.pyx":5669 * prodx = np.ones_like(out) * * N, K = ( values).shape # <<<<<<<<<<<<<< * * if K > 1: */ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_values), __pyx_n_s__shape); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5669; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); if ((likely(PyTuple_CheckExact(__pyx_t_5))) || (PyList_CheckExact(__pyx_t_5))) { PyObject* sequence = __pyx_t_5; #if CYTHON_COMPILING_IN_CPYTHON Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5669; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_6 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_4 = PyTuple_GET_ITEM(sequence, 1); } else { __pyx_t_6 = PyList_GET_ITEM(sequence, 0); __pyx_t_4 = PyList_GET_ITEM(sequence, 1); } __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(__pyx_t_4); #else __pyx_t_6 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5669; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5669; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); #endif __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } else { Py_ssize_t index = -1; __pyx_t_12 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5669; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_13 = Py_TYPE(__pyx_t_12)->tp_iternext; index = 0; __pyx_t_6 = __pyx_t_13(__pyx_t_12); if (unlikely(!__pyx_t_6)) goto __pyx_L4_unpacking_failed; __Pyx_GOTREF(__pyx_t_6); index = 1; __pyx_t_4 = __pyx_t_13(__pyx_t_12); if (unlikely(!__pyx_t_4)) goto __pyx_L4_unpacking_failed; __Pyx_GOTREF(__pyx_t_4); if (__Pyx_IternextUnpackEndCheck(__pyx_t_13(__pyx_t_12), 2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5669; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_13 = NULL; __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; goto __pyx_L5_unpacking_done; __pyx_L4_unpacking_failed:; __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __pyx_t_13 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5669; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_L5_unpacking_done:; } __pyx_t_2 = __Pyx_PyIndex_AsSsize_t(__pyx_t_6); if (unlikely((__pyx_t_2 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5669; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_1 = __Pyx_PyIndex_AsSsize_t(__pyx_t_4); if (unlikely((__pyx_t_1 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5669; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_N = __pyx_t_2; __pyx_v_K = __pyx_t_1; /* "pandas/src/generated.pyx":5671 * N, K = ( values).shape * * if K > 1: # <<<<<<<<<<<<<< * for i in range(N): * lab = labels[i] */ __pyx_t_3 = ((__pyx_v_K > 1) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":5672 * * if K > 1: * for i in range(N): # <<<<<<<<<<<<<< * lab = labels[i] * if lab < 0: */ __pyx_t_1 = __pyx_v_N; for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) { __pyx_v_i = __pyx_t_2; /* "pandas/src/generated.pyx":5673 * if K > 1: * for i in range(N): * lab = labels[i] # <<<<<<<<<<<<<< * if lab < 0: * continue */ __pyx_t_14 = __pyx_v_i; __pyx_v_lab = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_labels.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_labels.diminfo[0].strides)); /* "pandas/src/generated.pyx":5674 * for i in range(N): * lab = labels[i] * if lab < 0: # <<<<<<<<<<<<<< * continue * */ __pyx_t_3 = ((__pyx_v_lab < 0) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":5675 * lab = labels[i] * if lab < 0: * continue # <<<<<<<<<<<<<< * * counts[lab] += 1 */ goto __pyx_L7_continue; goto __pyx_L9; } __pyx_L9:; /* "pandas/src/generated.pyx":5677 * continue * * counts[lab] += 1 # <<<<<<<<<<<<<< * for j in range(K): * val = values[i, j] */ __pyx_t_15 = __pyx_v_lab; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_counts.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_counts.diminfo[0].strides) += 1; /* "pandas/src/generated.pyx":5678 * * counts[lab] += 1 * for j in range(K): # <<<<<<<<<<<<<< * val = values[i, j] * */ __pyx_t_16 = __pyx_v_K; for (__pyx_t_17 = 0; __pyx_t_17 < __pyx_t_16; __pyx_t_17+=1) { __pyx_v_j = __pyx_t_17; /* "pandas/src/generated.pyx":5679 * counts[lab] += 1 * for j in range(K): * val = values[i, j] # <<<<<<<<<<<<<< * * # not nan */ __pyx_t_18 = __pyx_v_i; __pyx_t_19 = __pyx_v_j; __pyx_v_val = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_19, __pyx_pybuffernd_values.diminfo[1].strides)); /* "pandas/src/generated.pyx":5682 * * # not nan * if val == val: # <<<<<<<<<<<<<< * nobs[lab, j] += 1 * prodx[lab, j] *= val */ __pyx_t_3 = ((__pyx_v_val == __pyx_v_val) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":5683 * # not nan * if val == val: * nobs[lab, j] += 1 # <<<<<<<<<<<<<< * prodx[lab, j] *= val * else: */ __pyx_t_20 = __pyx_v_lab; __pyx_t_21 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_nobs.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_nobs.diminfo[0].strides, __pyx_t_21, __pyx_pybuffernd_nobs.diminfo[1].strides) += 1.0; /* "pandas/src/generated.pyx":5684 * if val == val: * nobs[lab, j] += 1 * prodx[lab, j] *= val # <<<<<<<<<<<<<< * else: * for i in range(N): */ __pyx_t_22 = __pyx_v_lab; __pyx_t_23 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_prodx.rcbuffer->pybuffer.buf, __pyx_t_22, __pyx_pybuffernd_prodx.diminfo[0].strides, __pyx_t_23, __pyx_pybuffernd_prodx.diminfo[1].strides) *= __pyx_v_val; goto __pyx_L12; } __pyx_L12:; } __pyx_L7_continue:; } goto __pyx_L6; } /*else*/ { /* "pandas/src/generated.pyx":5686 * prodx[lab, j] *= val * else: * for i in range(N): # <<<<<<<<<<<<<< * lab = labels[i] * if lab < 0: */ __pyx_t_1 = __pyx_v_N; for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) { __pyx_v_i = __pyx_t_2; /* "pandas/src/generated.pyx":5687 * else: * for i in range(N): * lab = labels[i] # <<<<<<<<<<<<<< * if lab < 0: * continue */ __pyx_t_16 = __pyx_v_i; __pyx_v_lab = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_labels.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_labels.diminfo[0].strides)); /* "pandas/src/generated.pyx":5688 * for i in range(N): * lab = labels[i] * if lab < 0: # <<<<<<<<<<<<<< * continue * */ __pyx_t_3 = ((__pyx_v_lab < 0) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":5689 * lab = labels[i] * if lab < 0: * continue # <<<<<<<<<<<<<< * * counts[lab] += 1 */ goto __pyx_L13_continue; goto __pyx_L15; } __pyx_L15:; /* "pandas/src/generated.pyx":5691 * continue * * counts[lab] += 1 # <<<<<<<<<<<<<< * val = values[i, 0] * */ __pyx_t_17 = __pyx_v_lab; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_counts.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_counts.diminfo[0].strides) += 1; /* "pandas/src/generated.pyx":5692 * * counts[lab] += 1 * val = values[i, 0] # <<<<<<<<<<<<<< * * # not nan */ __pyx_t_24 = __pyx_v_i; __pyx_t_25 = 0; __pyx_v_val = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_24, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_25, __pyx_pybuffernd_values.diminfo[1].strides)); /* "pandas/src/generated.pyx":5695 * * # not nan * if val == val: # <<<<<<<<<<<<<< * nobs[lab, 0] += 1 * prodx[lab, 0] *= val */ __pyx_t_3 = ((__pyx_v_val == __pyx_v_val) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":5696 * # not nan * if val == val: * nobs[lab, 0] += 1 # <<<<<<<<<<<<<< * prodx[lab, 0] *= val * */ __pyx_t_26 = __pyx_v_lab; __pyx_t_27 = 0; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_nobs.rcbuffer->pybuffer.buf, __pyx_t_26, __pyx_pybuffernd_nobs.diminfo[0].strides, __pyx_t_27, __pyx_pybuffernd_nobs.diminfo[1].strides) += 1.0; /* "pandas/src/generated.pyx":5697 * if val == val: * nobs[lab, 0] += 1 * prodx[lab, 0] *= val # <<<<<<<<<<<<<< * * for i in range(len(counts)): */ __pyx_t_28 = __pyx_v_lab; __pyx_t_29 = 0; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_prodx.rcbuffer->pybuffer.buf, __pyx_t_28, __pyx_pybuffernd_prodx.diminfo[0].strides, __pyx_t_29, __pyx_pybuffernd_prodx.diminfo[1].strides) *= __pyx_v_val; goto __pyx_L16; } __pyx_L16:; __pyx_L13_continue:; } } __pyx_L6:; /* "pandas/src/generated.pyx":5699 * prodx[lab, 0] *= val * * for i in range(len(counts)): # <<<<<<<<<<<<<< * for j in range(K): * if nobs[i, j] == 0: */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_counts)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5699; __pyx_clineno = __LINE__; goto __pyx_L1_error;} for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) { __pyx_v_i = __pyx_t_2; /* "pandas/src/generated.pyx":5700 * * for i in range(len(counts)): * for j in range(K): # <<<<<<<<<<<<<< * if nobs[i, j] == 0: * out[i, j] = nan */ __pyx_t_30 = __pyx_v_K; for (__pyx_t_31 = 0; __pyx_t_31 < __pyx_t_30; __pyx_t_31+=1) { __pyx_v_j = __pyx_t_31; /* "pandas/src/generated.pyx":5701 * for i in range(len(counts)): * for j in range(K): * if nobs[i, j] == 0: # <<<<<<<<<<<<<< * out[i, j] = nan * else: */ __pyx_t_32 = __pyx_v_i; __pyx_t_33 = __pyx_v_j; __pyx_t_3 = (((*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_nobs.rcbuffer->pybuffer.buf, __pyx_t_32, __pyx_pybuffernd_nobs.diminfo[0].strides, __pyx_t_33, __pyx_pybuffernd_nobs.diminfo[1].strides)) == 0.0) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":5702 * for j in range(K): * if nobs[i, j] == 0: * out[i, j] = nan # <<<<<<<<<<<<<< * else: * out[i, j] = prodx[i, j] */ __pyx_t_34 = __pyx_v_i; __pyx_t_35 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_34, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_35, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_6pandas_5algos_nan; goto __pyx_L21; } /*else*/ { /* "pandas/src/generated.pyx":5704 * out[i, j] = nan * else: * out[i, j] = prodx[i, j] # <<<<<<<<<<<<<< * @cython.boundscheck(False) * @cython.wraparound(False) */ __pyx_t_36 = __pyx_v_i; __pyx_t_37 = __pyx_v_j; __pyx_t_38 = __pyx_v_i; __pyx_t_39 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_38, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_39, __pyx_pybuffernd_out.diminfo[1].strides) = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_prodx.rcbuffer->pybuffer.buf, __pyx_t_36, __pyx_pybuffernd_prodx.diminfo[0].strides, __pyx_t_37, __pyx_pybuffernd_prodx.diminfo[1].strides)); } __pyx_L21:; } } __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_12); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_counts.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_labels.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_prodx.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.group_prod_float64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_counts.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_labels.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_prodx.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_prodx); __Pyx_XDECREF((PyObject *)__pyx_v_nobs); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_413group_prod_float32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6pandas_5algos_412group_prod_float32[] = "\n Only aggregates on axis=0\n "; static PyMethodDef __pyx_mdef_6pandas_5algos_413group_prod_float32 = {__Pyx_NAMESTR("group_prod_float32"), (PyCFunction)__pyx_pw_6pandas_5algos_413group_prod_float32, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_5algos_412group_prod_float32)}; static PyObject *__pyx_pw_6pandas_5algos_413group_prod_float32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_out = 0; PyArrayObject *__pyx_v_counts = 0; PyArrayObject *__pyx_v_values = 0; PyArrayObject *__pyx_v_labels = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("group_prod_float32 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__out,&__pyx_n_s__counts,&__pyx_n_s__values,&__pyx_n_s__labels,0}; PyObject* values[4] = {0,0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__out)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__counts)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("group_prod_float32", 1, 4, 4, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5707; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__values)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("group_prod_float32", 1, 4, 4, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5707; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__labels)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("group_prod_float32", 1, 4, 4, 3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5707; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "group_prod_float32") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5707; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 4) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[3] = PyTuple_GET_ITEM(__pyx_args, 3); } __pyx_v_out = ((PyArrayObject *)values[0]); __pyx_v_counts = ((PyArrayObject *)values[1]); __pyx_v_values = ((PyArrayObject *)values[2]); __pyx_v_labels = ((PyArrayObject *)values[3]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("group_prod_float32", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5707; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.group_prod_float32", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_5numpy_ndarray, 1, "out", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5707; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_counts), __pyx_ptype_5numpy_ndarray, 1, "counts", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5708; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5709; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_labels), __pyx_ptype_5numpy_ndarray, 1, "labels", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5710; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_412group_prod_float32(__pyx_self, __pyx_v_out, __pyx_v_counts, __pyx_v_values, __pyx_v_labels); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":5707 * @cython.boundscheck(False) * @cython.wraparound(False) * def group_prod_float32(ndarray[float32_t, ndim=2] out, # <<<<<<<<<<<<<< * ndarray[int64_t] counts, * ndarray[float32_t, ndim=2] values, */ static PyObject *__pyx_pf_6pandas_5algos_412group_prod_float32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_out, PyArrayObject *__pyx_v_counts, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_labels) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_N; Py_ssize_t __pyx_v_K; Py_ssize_t __pyx_v_lab; __pyx_t_5numpy_float32_t __pyx_v_val; PyArrayObject *__pyx_v_prodx = 0; PyArrayObject *__pyx_v_nobs = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_counts; __Pyx_Buffer __pyx_pybuffer_counts; __Pyx_LocalBuf_ND __pyx_pybuffernd_labels; __Pyx_Buffer __pyx_pybuffer_labels; __Pyx_LocalBuf_ND __pyx_pybuffernd_nobs; __Pyx_Buffer __pyx_pybuffer_nobs; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_prodx; __Pyx_Buffer __pyx_pybuffer_prodx; __Pyx_LocalBuf_ND __pyx_pybuffernd_values; __Pyx_Buffer __pyx_pybuffer_values; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; Py_ssize_t __pyx_t_2; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyArrayObject *__pyx_t_7 = NULL; int __pyx_t_8; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; PyObject *__pyx_t_11 = NULL; PyObject *__pyx_t_12 = NULL; PyObject *(*__pyx_t_13)(PyObject *); 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; long __pyx_t_25; Py_ssize_t __pyx_t_26; long __pyx_t_27; Py_ssize_t __pyx_t_28; long __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; Py_ssize_t __pyx_t_37; Py_ssize_t __pyx_t_38; Py_ssize_t __pyx_t_39; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("group_prod_float32", 0); __pyx_pybuffer_prodx.pybuffer.buf = NULL; __pyx_pybuffer_prodx.refcount = 0; __pyx_pybuffernd_prodx.data = NULL; __pyx_pybuffernd_prodx.rcbuffer = &__pyx_pybuffer_prodx; __pyx_pybuffer_nobs.pybuffer.buf = NULL; __pyx_pybuffer_nobs.refcount = 0; __pyx_pybuffernd_nobs.data = NULL; __pyx_pybuffernd_nobs.rcbuffer = &__pyx_pybuffer_nobs; __pyx_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; __pyx_pybuffer_counts.pybuffer.buf = NULL; __pyx_pybuffer_counts.refcount = 0; __pyx_pybuffernd_counts.data = NULL; __pyx_pybuffernd_counts.rcbuffer = &__pyx_pybuffer_counts; __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_labels.pybuffer.buf = NULL; __pyx_pybuffer_labels.refcount = 0; __pyx_pybuffernd_labels.data = NULL; __pyx_pybuffernd_labels.rcbuffer = &__pyx_pybuffer_labels; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_v_out, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5707; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; __pyx_pybuffernd_out.diminfo[1].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_out.diminfo[1].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[1]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_counts.rcbuffer->pybuffer, (PyObject*)__pyx_v_counts, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5707; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_counts.diminfo[0].strides = __pyx_pybuffernd_counts.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_counts.diminfo[0].shape = __pyx_pybuffernd_counts.rcbuffer->pybuffer.shape[0]; { __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_float32_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5707; __pyx_clineno = __LINE__; goto __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_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_labels.rcbuffer->pybuffer, (PyObject*)__pyx_v_labels, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5707; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_labels.diminfo[0].strides = __pyx_pybuffernd_labels.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_labels.diminfo[0].shape = __pyx_pybuffernd_labels.rcbuffer->pybuffer.shape[0]; /* "pandas/src/generated.pyx":5719 * ndarray[float32_t, ndim=2] prodx, nobs * * if not len(values) == len(labels): # <<<<<<<<<<<<<< * raise AssertionError("len(index) != len(labels)") * */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5719; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_2 = PyObject_Length(((PyObject *)__pyx_v_labels)); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5719; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_3 = ((!((__pyx_t_1 == __pyx_t_2) != 0)) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":5720 * * if not len(values) == len(labels): * raise AssertionError("len(index) != len(labels)") # <<<<<<<<<<<<<< * * nobs = np.zeros_like(out) */ __pyx_t_4 = PyObject_Call(__pyx_builtin_AssertionError, ((PyObject *)__pyx_k_tuple_191), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5720; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 5720; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L3; } __pyx_L3:; /* "pandas/src/generated.pyx":5722 * raise AssertionError("len(index) != len(labels)") * * nobs = np.zeros_like(out) # <<<<<<<<<<<<<< * prodx = np.ones_like(out) * */ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5722; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s__zeros_like); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5722; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5722; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(((PyObject *)__pyx_v_out)); PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_v_out)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out)); __pyx_t_6 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5722; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5722; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_7 = ((PyArrayObject *)__pyx_t_6); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer); __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_nobs.rcbuffer->pybuffer, (PyObject*)__pyx_v_nobs, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_pybuffernd_nobs.diminfo[0].strides = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_nobs.diminfo[0].shape = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_nobs.diminfo[1].strides = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_nobs.diminfo[1].shape = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.shape[1]; if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5722; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_7 = 0; __pyx_v_nobs = ((PyArrayObject *)__pyx_t_6); __pyx_t_6 = 0; /* "pandas/src/generated.pyx":5723 * * nobs = np.zeros_like(out) * prodx = np.ones_like(out) # <<<<<<<<<<<<<< * * N, K = ( values).shape */ __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5723; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s__ones_like); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5723; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5723; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(((PyObject *)__pyx_v_out)); PyTuple_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_v_out)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out)); __pyx_t_5 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5723; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0; if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5723; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_7 = ((PyArrayObject *)__pyx_t_5); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_prodx.rcbuffer->pybuffer); __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_prodx.rcbuffer->pybuffer, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_prodx.rcbuffer->pybuffer, (PyObject*)__pyx_v_prodx, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_pybuffernd_prodx.diminfo[0].strides = __pyx_pybuffernd_prodx.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_prodx.diminfo[0].shape = __pyx_pybuffernd_prodx.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_prodx.diminfo[1].strides = __pyx_pybuffernd_prodx.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_prodx.diminfo[1].shape = __pyx_pybuffernd_prodx.rcbuffer->pybuffer.shape[1]; if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5723; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_7 = 0; __pyx_v_prodx = ((PyArrayObject *)__pyx_t_5); __pyx_t_5 = 0; /* "pandas/src/generated.pyx":5725 * prodx = np.ones_like(out) * * N, K = ( values).shape # <<<<<<<<<<<<<< * * if K > 1: */ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_values), __pyx_n_s__shape); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5725; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); if ((likely(PyTuple_CheckExact(__pyx_t_5))) || (PyList_CheckExact(__pyx_t_5))) { PyObject* sequence = __pyx_t_5; #if CYTHON_COMPILING_IN_CPYTHON Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5725; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_6 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_4 = PyTuple_GET_ITEM(sequence, 1); } else { __pyx_t_6 = PyList_GET_ITEM(sequence, 0); __pyx_t_4 = PyList_GET_ITEM(sequence, 1); } __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(__pyx_t_4); #else __pyx_t_6 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5725; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5725; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); #endif __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } else { Py_ssize_t index = -1; __pyx_t_12 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5725; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_13 = Py_TYPE(__pyx_t_12)->tp_iternext; index = 0; __pyx_t_6 = __pyx_t_13(__pyx_t_12); if (unlikely(!__pyx_t_6)) goto __pyx_L4_unpacking_failed; __Pyx_GOTREF(__pyx_t_6); index = 1; __pyx_t_4 = __pyx_t_13(__pyx_t_12); if (unlikely(!__pyx_t_4)) goto __pyx_L4_unpacking_failed; __Pyx_GOTREF(__pyx_t_4); if (__Pyx_IternextUnpackEndCheck(__pyx_t_13(__pyx_t_12), 2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5725; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_13 = NULL; __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; goto __pyx_L5_unpacking_done; __pyx_L4_unpacking_failed:; __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __pyx_t_13 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5725; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_L5_unpacking_done:; } __pyx_t_2 = __Pyx_PyIndex_AsSsize_t(__pyx_t_6); if (unlikely((__pyx_t_2 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5725; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_1 = __Pyx_PyIndex_AsSsize_t(__pyx_t_4); if (unlikely((__pyx_t_1 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5725; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_N = __pyx_t_2; __pyx_v_K = __pyx_t_1; /* "pandas/src/generated.pyx":5727 * N, K = ( values).shape * * if K > 1: # <<<<<<<<<<<<<< * for i in range(N): * lab = labels[i] */ __pyx_t_3 = ((__pyx_v_K > 1) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":5728 * * if K > 1: * for i in range(N): # <<<<<<<<<<<<<< * lab = labels[i] * if lab < 0: */ __pyx_t_1 = __pyx_v_N; for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) { __pyx_v_i = __pyx_t_2; /* "pandas/src/generated.pyx":5729 * if K > 1: * for i in range(N): * lab = labels[i] # <<<<<<<<<<<<<< * if lab < 0: * continue */ __pyx_t_14 = __pyx_v_i; __pyx_v_lab = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_labels.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_labels.diminfo[0].strides)); /* "pandas/src/generated.pyx":5730 * for i in range(N): * lab = labels[i] * if lab < 0: # <<<<<<<<<<<<<< * continue * */ __pyx_t_3 = ((__pyx_v_lab < 0) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":5731 * lab = labels[i] * if lab < 0: * continue # <<<<<<<<<<<<<< * * counts[lab] += 1 */ goto __pyx_L7_continue; goto __pyx_L9; } __pyx_L9:; /* "pandas/src/generated.pyx":5733 * continue * * counts[lab] += 1 # <<<<<<<<<<<<<< * for j in range(K): * val = values[i, j] */ __pyx_t_15 = __pyx_v_lab; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_counts.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_counts.diminfo[0].strides) += 1; /* "pandas/src/generated.pyx":5734 * * counts[lab] += 1 * for j in range(K): # <<<<<<<<<<<<<< * val = values[i, j] * */ __pyx_t_16 = __pyx_v_K; for (__pyx_t_17 = 0; __pyx_t_17 < __pyx_t_16; __pyx_t_17+=1) { __pyx_v_j = __pyx_t_17; /* "pandas/src/generated.pyx":5735 * counts[lab] += 1 * for j in range(K): * val = values[i, j] # <<<<<<<<<<<<<< * * # not nan */ __pyx_t_18 = __pyx_v_i; __pyx_t_19 = __pyx_v_j; __pyx_v_val = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_19, __pyx_pybuffernd_values.diminfo[1].strides)); /* "pandas/src/generated.pyx":5738 * * # not nan * if val == val: # <<<<<<<<<<<<<< * nobs[lab, j] += 1 * prodx[lab, j] *= val */ __pyx_t_3 = ((__pyx_v_val == __pyx_v_val) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":5739 * # not nan * if val == val: * nobs[lab, j] += 1 # <<<<<<<<<<<<<< * prodx[lab, j] *= val * else: */ __pyx_t_20 = __pyx_v_lab; __pyx_t_21 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_nobs.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_nobs.diminfo[0].strides, __pyx_t_21, __pyx_pybuffernd_nobs.diminfo[1].strides) += 1.0; /* "pandas/src/generated.pyx":5740 * if val == val: * nobs[lab, j] += 1 * prodx[lab, j] *= val # <<<<<<<<<<<<<< * else: * for i in range(N): */ __pyx_t_22 = __pyx_v_lab; __pyx_t_23 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_prodx.rcbuffer->pybuffer.buf, __pyx_t_22, __pyx_pybuffernd_prodx.diminfo[0].strides, __pyx_t_23, __pyx_pybuffernd_prodx.diminfo[1].strides) *= __pyx_v_val; goto __pyx_L12; } __pyx_L12:; } __pyx_L7_continue:; } goto __pyx_L6; } /*else*/ { /* "pandas/src/generated.pyx":5742 * prodx[lab, j] *= val * else: * for i in range(N): # <<<<<<<<<<<<<< * lab = labels[i] * if lab < 0: */ __pyx_t_1 = __pyx_v_N; for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) { __pyx_v_i = __pyx_t_2; /* "pandas/src/generated.pyx":5743 * else: * for i in range(N): * lab = labels[i] # <<<<<<<<<<<<<< * if lab < 0: * continue */ __pyx_t_16 = __pyx_v_i; __pyx_v_lab = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_labels.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_labels.diminfo[0].strides)); /* "pandas/src/generated.pyx":5744 * for i in range(N): * lab = labels[i] * if lab < 0: # <<<<<<<<<<<<<< * continue * */ __pyx_t_3 = ((__pyx_v_lab < 0) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":5745 * lab = labels[i] * if lab < 0: * continue # <<<<<<<<<<<<<< * * counts[lab] += 1 */ goto __pyx_L13_continue; goto __pyx_L15; } __pyx_L15:; /* "pandas/src/generated.pyx":5747 * continue * * counts[lab] += 1 # <<<<<<<<<<<<<< * val = values[i, 0] * */ __pyx_t_17 = __pyx_v_lab; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_counts.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_counts.diminfo[0].strides) += 1; /* "pandas/src/generated.pyx":5748 * * counts[lab] += 1 * val = values[i, 0] # <<<<<<<<<<<<<< * * # not nan */ __pyx_t_24 = __pyx_v_i; __pyx_t_25 = 0; __pyx_v_val = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_24, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_25, __pyx_pybuffernd_values.diminfo[1].strides)); /* "pandas/src/generated.pyx":5751 * * # not nan * if val == val: # <<<<<<<<<<<<<< * nobs[lab, 0] += 1 * prodx[lab, 0] *= val */ __pyx_t_3 = ((__pyx_v_val == __pyx_v_val) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":5752 * # not nan * if val == val: * nobs[lab, 0] += 1 # <<<<<<<<<<<<<< * prodx[lab, 0] *= val * */ __pyx_t_26 = __pyx_v_lab; __pyx_t_27 = 0; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_nobs.rcbuffer->pybuffer.buf, __pyx_t_26, __pyx_pybuffernd_nobs.diminfo[0].strides, __pyx_t_27, __pyx_pybuffernd_nobs.diminfo[1].strides) += 1.0; /* "pandas/src/generated.pyx":5753 * if val == val: * nobs[lab, 0] += 1 * prodx[lab, 0] *= val # <<<<<<<<<<<<<< * * for i in range(len(counts)): */ __pyx_t_28 = __pyx_v_lab; __pyx_t_29 = 0; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_prodx.rcbuffer->pybuffer.buf, __pyx_t_28, __pyx_pybuffernd_prodx.diminfo[0].strides, __pyx_t_29, __pyx_pybuffernd_prodx.diminfo[1].strides) *= __pyx_v_val; goto __pyx_L16; } __pyx_L16:; __pyx_L13_continue:; } } __pyx_L6:; /* "pandas/src/generated.pyx":5755 * prodx[lab, 0] *= val * * for i in range(len(counts)): # <<<<<<<<<<<<<< * for j in range(K): * if nobs[i, j] == 0: */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_counts)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5755; __pyx_clineno = __LINE__; goto __pyx_L1_error;} for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) { __pyx_v_i = __pyx_t_2; /* "pandas/src/generated.pyx":5756 * * for i in range(len(counts)): * for j in range(K): # <<<<<<<<<<<<<< * if nobs[i, j] == 0: * out[i, j] = nan */ __pyx_t_30 = __pyx_v_K; for (__pyx_t_31 = 0; __pyx_t_31 < __pyx_t_30; __pyx_t_31+=1) { __pyx_v_j = __pyx_t_31; /* "pandas/src/generated.pyx":5757 * for i in range(len(counts)): * for j in range(K): * if nobs[i, j] == 0: # <<<<<<<<<<<<<< * out[i, j] = nan * else: */ __pyx_t_32 = __pyx_v_i; __pyx_t_33 = __pyx_v_j; __pyx_t_3 = (((*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_nobs.rcbuffer->pybuffer.buf, __pyx_t_32, __pyx_pybuffernd_nobs.diminfo[0].strides, __pyx_t_33, __pyx_pybuffernd_nobs.diminfo[1].strides)) == 0.0) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":5758 * for j in range(K): * if nobs[i, j] == 0: * out[i, j] = nan # <<<<<<<<<<<<<< * else: * out[i, j] = prodx[i, j] */ __pyx_t_34 = __pyx_v_i; __pyx_t_35 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_34, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_35, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_6pandas_5algos_nan; goto __pyx_L21; } /*else*/ { /* "pandas/src/generated.pyx":5760 * out[i, j] = nan * else: * out[i, j] = prodx[i, j] # <<<<<<<<<<<<<< * * @cython.boundscheck(False) */ __pyx_t_36 = __pyx_v_i; __pyx_t_37 = __pyx_v_j; __pyx_t_38 = __pyx_v_i; __pyx_t_39 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_38, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_39, __pyx_pybuffernd_out.diminfo[1].strides) = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_prodx.rcbuffer->pybuffer.buf, __pyx_t_36, __pyx_pybuffernd_prodx.diminfo[0].strides, __pyx_t_37, __pyx_pybuffernd_prodx.diminfo[1].strides)); } __pyx_L21:; } } __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_12); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_counts.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_labels.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_prodx.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.group_prod_float32", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_counts.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_labels.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_prodx.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_prodx); __Pyx_XDECREF((PyObject *)__pyx_v_nobs); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_415group_prod_bin_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6pandas_5algos_414group_prod_bin_float64[] = "\n Only aggregates on axis=0\n "; static PyMethodDef __pyx_mdef_6pandas_5algos_415group_prod_bin_float64 = {__Pyx_NAMESTR("group_prod_bin_float64"), (PyCFunction)__pyx_pw_6pandas_5algos_415group_prod_bin_float64, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_5algos_414group_prod_bin_float64)}; static PyObject *__pyx_pw_6pandas_5algos_415group_prod_bin_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_out = 0; PyArrayObject *__pyx_v_counts = 0; PyArrayObject *__pyx_v_values = 0; PyArrayObject *__pyx_v_bins = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("group_prod_bin_float64 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__out,&__pyx_n_s__counts,&__pyx_n_s__values,&__pyx_n_s__bins,0}; PyObject* values[4] = {0,0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__out)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__counts)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("group_prod_bin_float64", 1, 4, 4, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5764; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__values)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("group_prod_bin_float64", 1, 4, 4, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5764; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__bins)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("group_prod_bin_float64", 1, 4, 4, 3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5764; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "group_prod_bin_float64") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5764; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 4) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[3] = PyTuple_GET_ITEM(__pyx_args, 3); } __pyx_v_out = ((PyArrayObject *)values[0]); __pyx_v_counts = ((PyArrayObject *)values[1]); __pyx_v_values = ((PyArrayObject *)values[2]); __pyx_v_bins = ((PyArrayObject *)values[3]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("group_prod_bin_float64", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5764; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.group_prod_bin_float64", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_5numpy_ndarray, 1, "out", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5764; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_counts), __pyx_ptype_5numpy_ndarray, 1, "counts", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5765; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5766; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_bins), __pyx_ptype_5numpy_ndarray, 1, "bins", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5767; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_414group_prod_bin_float64(__pyx_self, __pyx_v_out, __pyx_v_counts, __pyx_v_values, __pyx_v_bins); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":5764 * @cython.boundscheck(False) * @cython.wraparound(False) * def group_prod_bin_float64(ndarray[float64_t, ndim=2] out, # <<<<<<<<<<<<<< * ndarray[int64_t] counts, * ndarray[float64_t, ndim=2] values, */ static PyObject *__pyx_pf_6pandas_5algos_414group_prod_bin_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_out, PyArrayObject *__pyx_v_counts, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_bins) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_N; Py_ssize_t __pyx_v_K; Py_ssize_t __pyx_v_ngroups; Py_ssize_t __pyx_v_b; __pyx_t_5numpy_float64_t __pyx_v_val; PyArrayObject *__pyx_v_prodx = 0; PyArrayObject *__pyx_v_nobs = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_bins; __Pyx_Buffer __pyx_pybuffer_bins; __Pyx_LocalBuf_ND __pyx_pybuffernd_counts; __Pyx_Buffer __pyx_pybuffer_counts; __Pyx_LocalBuf_ND __pyx_pybuffernd_nobs; __Pyx_Buffer __pyx_pybuffer_nobs; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_prodx; __Pyx_Buffer __pyx_pybuffer_prodx; __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; PyArrayObject *__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; Py_ssize_t __pyx_t_11; int __pyx_t_12; PyObject *__pyx_t_13 = NULL; PyObject *(*__pyx_t_14)(PyObject *); Py_ssize_t __pyx_t_15; int __pyx_t_16; int __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; long __pyx_t_28; Py_ssize_t __pyx_t_29; long __pyx_t_30; Py_ssize_t __pyx_t_31; long __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; Py_ssize_t __pyx_t_37; Py_ssize_t __pyx_t_38; Py_ssize_t __pyx_t_39; Py_ssize_t __pyx_t_40; Py_ssize_t __pyx_t_41; Py_ssize_t __pyx_t_42; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("group_prod_bin_float64", 0); __pyx_pybuffer_prodx.pybuffer.buf = NULL; __pyx_pybuffer_prodx.refcount = 0; __pyx_pybuffernd_prodx.data = NULL; __pyx_pybuffernd_prodx.rcbuffer = &__pyx_pybuffer_prodx; __pyx_pybuffer_nobs.pybuffer.buf = NULL; __pyx_pybuffer_nobs.refcount = 0; __pyx_pybuffernd_nobs.data = NULL; __pyx_pybuffernd_nobs.rcbuffer = &__pyx_pybuffer_nobs; __pyx_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; __pyx_pybuffer_counts.pybuffer.buf = NULL; __pyx_pybuffer_counts.refcount = 0; __pyx_pybuffernd_counts.data = NULL; __pyx_pybuffernd_counts.rcbuffer = &__pyx_pybuffer_counts; __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_bins.pybuffer.buf = NULL; __pyx_pybuffer_bins.refcount = 0; __pyx_pybuffernd_bins.data = NULL; __pyx_pybuffernd_bins.rcbuffer = &__pyx_pybuffer_bins; { __Pyx_BufFmt_StackElem __pyx_stack[1]; 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, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5764; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; __pyx_pybuffernd_out.diminfo[1].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_out.diminfo[1].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[1]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_counts.rcbuffer->pybuffer, (PyObject*)__pyx_v_counts, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5764; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_counts.diminfo[0].strides = __pyx_pybuffernd_counts.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_counts.diminfo[0].shape = __pyx_pybuffernd_counts.rcbuffer->pybuffer.shape[0]; { __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, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5764; __pyx_clineno = __LINE__; goto __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_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_bins.rcbuffer->pybuffer, (PyObject*)__pyx_v_bins, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5764; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_bins.diminfo[0].strides = __pyx_pybuffernd_bins.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_bins.diminfo[0].shape = __pyx_pybuffernd_bins.rcbuffer->pybuffer.shape[0]; /* "pandas/src/generated.pyx":5776 * ndarray[float64_t, ndim=2] prodx, nobs * * nobs = np.zeros_like(out) # <<<<<<<<<<<<<< * prodx = np.ones_like(out) * */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5776; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s__zeros_like); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5776; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 5776; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)__pyx_v_out)); PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_out)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out)); __pyx_t_3 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5776; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(((PyObject *)__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_filename = __pyx_f[2]; __pyx_lineno = 5776; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_4 = ((PyArrayObject *)__pyx_t_3); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer); __pyx_t_5 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer, (PyObject*)__pyx_t_4, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_nobs.rcbuffer->pybuffer, (PyObject*)__pyx_v_nobs, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_pybuffernd_nobs.diminfo[0].strides = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_nobs.diminfo[0].shape = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_nobs.diminfo[1].strides = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_nobs.diminfo[1].shape = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.shape[1]; if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5776; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_4 = 0; __pyx_v_nobs = ((PyArrayObject *)__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/generated.pyx":5777 * * nobs = np.zeros_like(out) * prodx = np.ones_like(out) # <<<<<<<<<<<<<< * * if bins[len(bins) - 1] == len(values): */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5777; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s__ones_like); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5777; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5777; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(((PyObject *)__pyx_v_out)); PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_v_out)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out)); __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5777; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(((PyObject *)__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_filename = __pyx_f[2]; __pyx_lineno = 5777; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_4 = ((PyArrayObject *)__pyx_t_2); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_prodx.rcbuffer->pybuffer); __pyx_t_5 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_prodx.rcbuffer->pybuffer, (PyObject*)__pyx_t_4, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_prodx.rcbuffer->pybuffer, (PyObject*)__pyx_v_prodx, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_pybuffernd_prodx.diminfo[0].strides = __pyx_pybuffernd_prodx.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_prodx.diminfo[0].shape = __pyx_pybuffernd_prodx.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_prodx.diminfo[1].strides = __pyx_pybuffernd_prodx.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_prodx.diminfo[1].shape = __pyx_pybuffernd_prodx.rcbuffer->pybuffer.shape[1]; if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5777; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_4 = 0; __pyx_v_prodx = ((PyArrayObject *)__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":5779 * prodx = np.ones_like(out) * * if bins[len(bins) - 1] == len(values): # <<<<<<<<<<<<<< * ngroups = len(bins) * else: */ __pyx_t_9 = PyObject_Length(((PyObject *)__pyx_v_bins)); if (unlikely(__pyx_t_9 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5779; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_10 = (__pyx_t_9 - 1); __pyx_t_11 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5779; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_12 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_bins.rcbuffer->pybuffer.buf, __pyx_t_10, __pyx_pybuffernd_bins.diminfo[0].strides)) == __pyx_t_11) != 0); if (__pyx_t_12) { /* "pandas/src/generated.pyx":5780 * * if bins[len(bins) - 1] == len(values): * ngroups = len(bins) # <<<<<<<<<<<<<< * else: * ngroups = len(bins) + 1 */ __pyx_t_11 = PyObject_Length(((PyObject *)__pyx_v_bins)); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5780; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_ngroups = __pyx_t_11; goto __pyx_L3; } /*else*/ { /* "pandas/src/generated.pyx":5782 * ngroups = len(bins) * else: * ngroups = len(bins) + 1 # <<<<<<<<<<<<<< * N, K = ( values).shape * */ __pyx_t_11 = PyObject_Length(((PyObject *)__pyx_v_bins)); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5782; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_ngroups = (__pyx_t_11 + 1); } __pyx_L3:; /* "pandas/src/generated.pyx":5783 * else: * ngroups = len(bins) + 1 * N, K = ( values).shape # <<<<<<<<<<<<<< * * b = 0 */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_values), __pyx_n_s__shape); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5783; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if ((likely(PyTuple_CheckExact(__pyx_t_2))) || (PyList_CheckExact(__pyx_t_2))) { PyObject* sequence = __pyx_t_2; #if CYTHON_COMPILING_IN_CPYTHON Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5783; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_1 = PyTuple_GET_ITEM(sequence, 1); } else { __pyx_t_3 = PyList_GET_ITEM(sequence, 0); __pyx_t_1 = PyList_GET_ITEM(sequence, 1); } __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(__pyx_t_1); #else __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5783; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5783; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); #endif __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } else { Py_ssize_t index = -1; __pyx_t_13 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5783; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_14 = Py_TYPE(__pyx_t_13)->tp_iternext; index = 0; __pyx_t_3 = __pyx_t_14(__pyx_t_13); if (unlikely(!__pyx_t_3)) goto __pyx_L4_unpacking_failed; __Pyx_GOTREF(__pyx_t_3); index = 1; __pyx_t_1 = __pyx_t_14(__pyx_t_13); if (unlikely(!__pyx_t_1)) goto __pyx_L4_unpacking_failed; __Pyx_GOTREF(__pyx_t_1); if (__Pyx_IternextUnpackEndCheck(__pyx_t_14(__pyx_t_13), 2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5783; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_14 = NULL; __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; goto __pyx_L5_unpacking_done; __pyx_L4_unpacking_failed:; __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_14 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5783; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_L5_unpacking_done:; } __pyx_t_11 = __Pyx_PyIndex_AsSsize_t(__pyx_t_3); if (unlikely((__pyx_t_11 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5783; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_9 = __Pyx_PyIndex_AsSsize_t(__pyx_t_1); if (unlikely((__pyx_t_9 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5783; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_N = __pyx_t_11; __pyx_v_K = __pyx_t_9; /* "pandas/src/generated.pyx":5785 * N, K = ( values).shape * * b = 0 # <<<<<<<<<<<<<< * if K > 1: * for i in range(N): */ __pyx_v_b = 0; /* "pandas/src/generated.pyx":5786 * * b = 0 * if K > 1: # <<<<<<<<<<<<<< * for i in range(N): * while b < ngroups - 1 and i >= bins[b]: */ __pyx_t_12 = ((__pyx_v_K > 1) != 0); if (__pyx_t_12) { /* "pandas/src/generated.pyx":5787 * b = 0 * if K > 1: * for i in range(N): # <<<<<<<<<<<<<< * while b < ngroups - 1 and i >= bins[b]: * b += 1 */ __pyx_t_9 = __pyx_v_N; for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_9; __pyx_t_11+=1) { __pyx_v_i = __pyx_t_11; /* "pandas/src/generated.pyx":5788 * if K > 1: * for i in range(N): * while b < ngroups - 1 and i >= bins[b]: # <<<<<<<<<<<<<< * b += 1 * */ while (1) { __pyx_t_12 = ((__pyx_v_b < (__pyx_v_ngroups - 1)) != 0); if (__pyx_t_12) { __pyx_t_15 = __pyx_v_b; __pyx_t_16 = ((__pyx_v_i >= (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_bins.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_bins.diminfo[0].strides))) != 0); __pyx_t_17 = __pyx_t_16; } else { __pyx_t_17 = __pyx_t_12; } if (!__pyx_t_17) break; /* "pandas/src/generated.pyx":5789 * for i in range(N): * while b < ngroups - 1 and i >= bins[b]: * b += 1 # <<<<<<<<<<<<<< * * counts[b] += 1 */ __pyx_v_b = (__pyx_v_b + 1); } /* "pandas/src/generated.pyx":5791 * b += 1 * * counts[b] += 1 # <<<<<<<<<<<<<< * for j in range(K): * val = values[i, j] */ __pyx_t_18 = __pyx_v_b; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_counts.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_counts.diminfo[0].strides) += 1; /* "pandas/src/generated.pyx":5792 * * counts[b] += 1 * for j in range(K): # <<<<<<<<<<<<<< * val = values[i, j] * */ __pyx_t_19 = __pyx_v_K; for (__pyx_t_20 = 0; __pyx_t_20 < __pyx_t_19; __pyx_t_20+=1) { __pyx_v_j = __pyx_t_20; /* "pandas/src/generated.pyx":5793 * counts[b] += 1 * for j in range(K): * val = values[i, j] # <<<<<<<<<<<<<< * * # not nan */ __pyx_t_21 = __pyx_v_i; __pyx_t_22 = __pyx_v_j; __pyx_v_val = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_22, __pyx_pybuffernd_values.diminfo[1].strides)); /* "pandas/src/generated.pyx":5796 * * # not nan * if val == val: # <<<<<<<<<<<<<< * nobs[b, j] += 1 * prodx[b, j] *= val */ __pyx_t_17 = ((__pyx_v_val == __pyx_v_val) != 0); if (__pyx_t_17) { /* "pandas/src/generated.pyx":5797 * # not nan * if val == val: * nobs[b, j] += 1 # <<<<<<<<<<<<<< * prodx[b, j] *= val * else: */ __pyx_t_23 = __pyx_v_b; __pyx_t_24 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_nobs.rcbuffer->pybuffer.buf, __pyx_t_23, __pyx_pybuffernd_nobs.diminfo[0].strides, __pyx_t_24, __pyx_pybuffernd_nobs.diminfo[1].strides) += 1.0; /* "pandas/src/generated.pyx":5798 * if val == val: * nobs[b, j] += 1 * prodx[b, j] *= val # <<<<<<<<<<<<<< * else: * for i in range(N): */ __pyx_t_25 = __pyx_v_b; __pyx_t_26 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_prodx.rcbuffer->pybuffer.buf, __pyx_t_25, __pyx_pybuffernd_prodx.diminfo[0].strides, __pyx_t_26, __pyx_pybuffernd_prodx.diminfo[1].strides) *= __pyx_v_val; goto __pyx_L13; } __pyx_L13:; } } goto __pyx_L6; } /*else*/ { /* "pandas/src/generated.pyx":5800 * prodx[b, j] *= val * else: * for i in range(N): # <<<<<<<<<<<<<< * while b < ngroups - 1 and i >= bins[b]: * b += 1 */ __pyx_t_9 = __pyx_v_N; for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_9; __pyx_t_11+=1) { __pyx_v_i = __pyx_t_11; /* "pandas/src/generated.pyx":5801 * else: * for i in range(N): * while b < ngroups - 1 and i >= bins[b]: # <<<<<<<<<<<<<< * b += 1 * */ while (1) { __pyx_t_17 = ((__pyx_v_b < (__pyx_v_ngroups - 1)) != 0); if (__pyx_t_17) { __pyx_t_19 = __pyx_v_b; __pyx_t_12 = ((__pyx_v_i >= (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_bins.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_bins.diminfo[0].strides))) != 0); __pyx_t_16 = __pyx_t_12; } else { __pyx_t_16 = __pyx_t_17; } if (!__pyx_t_16) break; /* "pandas/src/generated.pyx":5802 * for i in range(N): * while b < ngroups - 1 and i >= bins[b]: * b += 1 # <<<<<<<<<<<<<< * * counts[b] += 1 */ __pyx_v_b = (__pyx_v_b + 1); } /* "pandas/src/generated.pyx":5804 * b += 1 * * counts[b] += 1 # <<<<<<<<<<<<<< * val = values[i, 0] * */ __pyx_t_20 = __pyx_v_b; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_counts.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_counts.diminfo[0].strides) += 1; /* "pandas/src/generated.pyx":5805 * * counts[b] += 1 * val = values[i, 0] # <<<<<<<<<<<<<< * * # not nan */ __pyx_t_27 = __pyx_v_i; __pyx_t_28 = 0; __pyx_v_val = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_27, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_28, __pyx_pybuffernd_values.diminfo[1].strides)); /* "pandas/src/generated.pyx":5808 * * # not nan * if val == val: # <<<<<<<<<<<<<< * nobs[b, 0] += 1 * prodx[b, 0] *= val */ __pyx_t_16 = ((__pyx_v_val == __pyx_v_val) != 0); if (__pyx_t_16) { /* "pandas/src/generated.pyx":5809 * # not nan * if val == val: * nobs[b, 0] += 1 # <<<<<<<<<<<<<< * prodx[b, 0] *= val * */ __pyx_t_29 = __pyx_v_b; __pyx_t_30 = 0; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_nobs.rcbuffer->pybuffer.buf, __pyx_t_29, __pyx_pybuffernd_nobs.diminfo[0].strides, __pyx_t_30, __pyx_pybuffernd_nobs.diminfo[1].strides) += 1.0; /* "pandas/src/generated.pyx":5810 * if val == val: * nobs[b, 0] += 1 * prodx[b, 0] *= val # <<<<<<<<<<<<<< * * for i in range(ngroups): */ __pyx_t_31 = __pyx_v_b; __pyx_t_32 = 0; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_prodx.rcbuffer->pybuffer.buf, __pyx_t_31, __pyx_pybuffernd_prodx.diminfo[0].strides, __pyx_t_32, __pyx_pybuffernd_prodx.diminfo[1].strides) *= __pyx_v_val; goto __pyx_L18; } __pyx_L18:; } } __pyx_L6:; /* "pandas/src/generated.pyx":5812 * prodx[b, 0] *= val * * for i in range(ngroups): # <<<<<<<<<<<<<< * for j in range(K): * if nobs[i, j] == 0: */ __pyx_t_9 = __pyx_v_ngroups; for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_9; __pyx_t_11+=1) { __pyx_v_i = __pyx_t_11; /* "pandas/src/generated.pyx":5813 * * for i in range(ngroups): * for j in range(K): # <<<<<<<<<<<<<< * if nobs[i, j] == 0: * out[i, j] = nan */ __pyx_t_33 = __pyx_v_K; for (__pyx_t_34 = 0; __pyx_t_34 < __pyx_t_33; __pyx_t_34+=1) { __pyx_v_j = __pyx_t_34; /* "pandas/src/generated.pyx":5814 * for i in range(ngroups): * for j in range(K): * if nobs[i, j] == 0: # <<<<<<<<<<<<<< * out[i, j] = nan * else: */ __pyx_t_35 = __pyx_v_i; __pyx_t_36 = __pyx_v_j; __pyx_t_16 = (((*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_nobs.rcbuffer->pybuffer.buf, __pyx_t_35, __pyx_pybuffernd_nobs.diminfo[0].strides, __pyx_t_36, __pyx_pybuffernd_nobs.diminfo[1].strides)) == 0.0) != 0); if (__pyx_t_16) { /* "pandas/src/generated.pyx":5815 * for j in range(K): * if nobs[i, j] == 0: * out[i, j] = nan # <<<<<<<<<<<<<< * else: * out[i, j] = prodx[i, j] */ __pyx_t_37 = __pyx_v_i; __pyx_t_38 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_37, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_38, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_6pandas_5algos_nan; goto __pyx_L23; } /*else*/ { /* "pandas/src/generated.pyx":5817 * out[i, j] = nan * else: * out[i, j] = prodx[i, j] # <<<<<<<<<<<<<< * @cython.boundscheck(False) * @cython.wraparound(False) */ __pyx_t_39 = __pyx_v_i; __pyx_t_40 = __pyx_v_j; __pyx_t_41 = __pyx_v_i; __pyx_t_42 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_41, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_42, __pyx_pybuffernd_out.diminfo[1].strides) = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_prodx.rcbuffer->pybuffer.buf, __pyx_t_39, __pyx_pybuffernd_prodx.diminfo[0].strides, __pyx_t_40, __pyx_pybuffernd_prodx.diminfo[1].strides)); } __pyx_L23:; } } __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_13); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_bins.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_counts.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_prodx.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.group_prod_bin_float64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_bins.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_counts.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_prodx.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_prodx); __Pyx_XDECREF((PyObject *)__pyx_v_nobs); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_417group_prod_bin_float32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6pandas_5algos_416group_prod_bin_float32[] = "\n Only aggregates on axis=0\n "; static PyMethodDef __pyx_mdef_6pandas_5algos_417group_prod_bin_float32 = {__Pyx_NAMESTR("group_prod_bin_float32"), (PyCFunction)__pyx_pw_6pandas_5algos_417group_prod_bin_float32, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_5algos_416group_prod_bin_float32)}; static PyObject *__pyx_pw_6pandas_5algos_417group_prod_bin_float32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_out = 0; PyArrayObject *__pyx_v_counts = 0; PyArrayObject *__pyx_v_values = 0; PyArrayObject *__pyx_v_bins = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("group_prod_bin_float32 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__out,&__pyx_n_s__counts,&__pyx_n_s__values,&__pyx_n_s__bins,0}; PyObject* values[4] = {0,0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__out)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__counts)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("group_prod_bin_float32", 1, 4, 4, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5820; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__values)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("group_prod_bin_float32", 1, 4, 4, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5820; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__bins)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("group_prod_bin_float32", 1, 4, 4, 3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5820; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "group_prod_bin_float32") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5820; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 4) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[3] = PyTuple_GET_ITEM(__pyx_args, 3); } __pyx_v_out = ((PyArrayObject *)values[0]); __pyx_v_counts = ((PyArrayObject *)values[1]); __pyx_v_values = ((PyArrayObject *)values[2]); __pyx_v_bins = ((PyArrayObject *)values[3]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("group_prod_bin_float32", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5820; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.group_prod_bin_float32", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_5numpy_ndarray, 1, "out", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5820; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_counts), __pyx_ptype_5numpy_ndarray, 1, "counts", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5821; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5822; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_bins), __pyx_ptype_5numpy_ndarray, 1, "bins", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5823; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_416group_prod_bin_float32(__pyx_self, __pyx_v_out, __pyx_v_counts, __pyx_v_values, __pyx_v_bins); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":5820 * @cython.boundscheck(False) * @cython.wraparound(False) * def group_prod_bin_float32(ndarray[float32_t, ndim=2] out, # <<<<<<<<<<<<<< * ndarray[int64_t] counts, * ndarray[float32_t, ndim=2] values, */ static PyObject *__pyx_pf_6pandas_5algos_416group_prod_bin_float32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_out, PyArrayObject *__pyx_v_counts, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_bins) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_N; Py_ssize_t __pyx_v_K; Py_ssize_t __pyx_v_ngroups; Py_ssize_t __pyx_v_b; __pyx_t_5numpy_float32_t __pyx_v_val; PyArrayObject *__pyx_v_prodx = 0; PyArrayObject *__pyx_v_nobs = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_bins; __Pyx_Buffer __pyx_pybuffer_bins; __Pyx_LocalBuf_ND __pyx_pybuffernd_counts; __Pyx_Buffer __pyx_pybuffer_counts; __Pyx_LocalBuf_ND __pyx_pybuffernd_nobs; __Pyx_Buffer __pyx_pybuffer_nobs; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_prodx; __Pyx_Buffer __pyx_pybuffer_prodx; __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; PyArrayObject *__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; Py_ssize_t __pyx_t_11; int __pyx_t_12; PyObject *__pyx_t_13 = NULL; PyObject *(*__pyx_t_14)(PyObject *); Py_ssize_t __pyx_t_15; int __pyx_t_16; int __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; long __pyx_t_28; Py_ssize_t __pyx_t_29; long __pyx_t_30; Py_ssize_t __pyx_t_31; long __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; Py_ssize_t __pyx_t_37; Py_ssize_t __pyx_t_38; Py_ssize_t __pyx_t_39; Py_ssize_t __pyx_t_40; Py_ssize_t __pyx_t_41; Py_ssize_t __pyx_t_42; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("group_prod_bin_float32", 0); __pyx_pybuffer_prodx.pybuffer.buf = NULL; __pyx_pybuffer_prodx.refcount = 0; __pyx_pybuffernd_prodx.data = NULL; __pyx_pybuffernd_prodx.rcbuffer = &__pyx_pybuffer_prodx; __pyx_pybuffer_nobs.pybuffer.buf = NULL; __pyx_pybuffer_nobs.refcount = 0; __pyx_pybuffernd_nobs.data = NULL; __pyx_pybuffernd_nobs.rcbuffer = &__pyx_pybuffer_nobs; __pyx_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; __pyx_pybuffer_counts.pybuffer.buf = NULL; __pyx_pybuffer_counts.refcount = 0; __pyx_pybuffernd_counts.data = NULL; __pyx_pybuffernd_counts.rcbuffer = &__pyx_pybuffer_counts; __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_bins.pybuffer.buf = NULL; __pyx_pybuffer_bins.refcount = 0; __pyx_pybuffernd_bins.data = NULL; __pyx_pybuffernd_bins.rcbuffer = &__pyx_pybuffer_bins; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_v_out, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5820; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; __pyx_pybuffernd_out.diminfo[1].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_out.diminfo[1].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[1]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_counts.rcbuffer->pybuffer, (PyObject*)__pyx_v_counts, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5820; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_counts.diminfo[0].strides = __pyx_pybuffernd_counts.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_counts.diminfo[0].shape = __pyx_pybuffernd_counts.rcbuffer->pybuffer.shape[0]; { __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_float32_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5820; __pyx_clineno = __LINE__; goto __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_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_bins.rcbuffer->pybuffer, (PyObject*)__pyx_v_bins, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5820; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_bins.diminfo[0].strides = __pyx_pybuffernd_bins.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_bins.diminfo[0].shape = __pyx_pybuffernd_bins.rcbuffer->pybuffer.shape[0]; /* "pandas/src/generated.pyx":5832 * ndarray[float32_t, ndim=2] prodx, nobs * * nobs = np.zeros_like(out) # <<<<<<<<<<<<<< * prodx = np.ones_like(out) * */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5832; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s__zeros_like); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5832; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 5832; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)__pyx_v_out)); PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_out)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out)); __pyx_t_3 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5832; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(((PyObject *)__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_filename = __pyx_f[2]; __pyx_lineno = 5832; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_4 = ((PyArrayObject *)__pyx_t_3); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer); __pyx_t_5 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer, (PyObject*)__pyx_t_4, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_nobs.rcbuffer->pybuffer, (PyObject*)__pyx_v_nobs, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_pybuffernd_nobs.diminfo[0].strides = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_nobs.diminfo[0].shape = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_nobs.diminfo[1].strides = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_nobs.diminfo[1].shape = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.shape[1]; if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5832; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_4 = 0; __pyx_v_nobs = ((PyArrayObject *)__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/generated.pyx":5833 * * nobs = np.zeros_like(out) * prodx = np.ones_like(out) # <<<<<<<<<<<<<< * * if bins[len(bins) - 1] == len(values): */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5833; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s__ones_like); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5833; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5833; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(((PyObject *)__pyx_v_out)); PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_v_out)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out)); __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5833; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(((PyObject *)__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_filename = __pyx_f[2]; __pyx_lineno = 5833; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_4 = ((PyArrayObject *)__pyx_t_2); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_prodx.rcbuffer->pybuffer); __pyx_t_5 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_prodx.rcbuffer->pybuffer, (PyObject*)__pyx_t_4, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_prodx.rcbuffer->pybuffer, (PyObject*)__pyx_v_prodx, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_pybuffernd_prodx.diminfo[0].strides = __pyx_pybuffernd_prodx.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_prodx.diminfo[0].shape = __pyx_pybuffernd_prodx.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_prodx.diminfo[1].strides = __pyx_pybuffernd_prodx.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_prodx.diminfo[1].shape = __pyx_pybuffernd_prodx.rcbuffer->pybuffer.shape[1]; if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5833; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_4 = 0; __pyx_v_prodx = ((PyArrayObject *)__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":5835 * prodx = np.ones_like(out) * * if bins[len(bins) - 1] == len(values): # <<<<<<<<<<<<<< * ngroups = len(bins) * else: */ __pyx_t_9 = PyObject_Length(((PyObject *)__pyx_v_bins)); if (unlikely(__pyx_t_9 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5835; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_10 = (__pyx_t_9 - 1); __pyx_t_11 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5835; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_12 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_bins.rcbuffer->pybuffer.buf, __pyx_t_10, __pyx_pybuffernd_bins.diminfo[0].strides)) == __pyx_t_11) != 0); if (__pyx_t_12) { /* "pandas/src/generated.pyx":5836 * * if bins[len(bins) - 1] == len(values): * ngroups = len(bins) # <<<<<<<<<<<<<< * else: * ngroups = len(bins) + 1 */ __pyx_t_11 = PyObject_Length(((PyObject *)__pyx_v_bins)); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5836; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_ngroups = __pyx_t_11; goto __pyx_L3; } /*else*/ { /* "pandas/src/generated.pyx":5838 * ngroups = len(bins) * else: * ngroups = len(bins) + 1 # <<<<<<<<<<<<<< * N, K = ( values).shape * */ __pyx_t_11 = PyObject_Length(((PyObject *)__pyx_v_bins)); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5838; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_ngroups = (__pyx_t_11 + 1); } __pyx_L3:; /* "pandas/src/generated.pyx":5839 * else: * ngroups = len(bins) + 1 * N, K = ( values).shape # <<<<<<<<<<<<<< * * b = 0 */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_values), __pyx_n_s__shape); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5839; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if ((likely(PyTuple_CheckExact(__pyx_t_2))) || (PyList_CheckExact(__pyx_t_2))) { PyObject* sequence = __pyx_t_2; #if CYTHON_COMPILING_IN_CPYTHON Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5839; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_1 = PyTuple_GET_ITEM(sequence, 1); } else { __pyx_t_3 = PyList_GET_ITEM(sequence, 0); __pyx_t_1 = PyList_GET_ITEM(sequence, 1); } __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(__pyx_t_1); #else __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5839; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5839; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); #endif __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } else { Py_ssize_t index = -1; __pyx_t_13 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5839; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_14 = Py_TYPE(__pyx_t_13)->tp_iternext; index = 0; __pyx_t_3 = __pyx_t_14(__pyx_t_13); if (unlikely(!__pyx_t_3)) goto __pyx_L4_unpacking_failed; __Pyx_GOTREF(__pyx_t_3); index = 1; __pyx_t_1 = __pyx_t_14(__pyx_t_13); if (unlikely(!__pyx_t_1)) goto __pyx_L4_unpacking_failed; __Pyx_GOTREF(__pyx_t_1); if (__Pyx_IternextUnpackEndCheck(__pyx_t_14(__pyx_t_13), 2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5839; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_14 = NULL; __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; goto __pyx_L5_unpacking_done; __pyx_L4_unpacking_failed:; __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_14 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5839; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_L5_unpacking_done:; } __pyx_t_11 = __Pyx_PyIndex_AsSsize_t(__pyx_t_3); if (unlikely((__pyx_t_11 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5839; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_9 = __Pyx_PyIndex_AsSsize_t(__pyx_t_1); if (unlikely((__pyx_t_9 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5839; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_N = __pyx_t_11; __pyx_v_K = __pyx_t_9; /* "pandas/src/generated.pyx":5841 * N, K = ( values).shape * * b = 0 # <<<<<<<<<<<<<< * if K > 1: * for i in range(N): */ __pyx_v_b = 0; /* "pandas/src/generated.pyx":5842 * * b = 0 * if K > 1: # <<<<<<<<<<<<<< * for i in range(N): * while b < ngroups - 1 and i >= bins[b]: */ __pyx_t_12 = ((__pyx_v_K > 1) != 0); if (__pyx_t_12) { /* "pandas/src/generated.pyx":5843 * b = 0 * if K > 1: * for i in range(N): # <<<<<<<<<<<<<< * while b < ngroups - 1 and i >= bins[b]: * b += 1 */ __pyx_t_9 = __pyx_v_N; for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_9; __pyx_t_11+=1) { __pyx_v_i = __pyx_t_11; /* "pandas/src/generated.pyx":5844 * if K > 1: * for i in range(N): * while b < ngroups - 1 and i >= bins[b]: # <<<<<<<<<<<<<< * b += 1 * */ while (1) { __pyx_t_12 = ((__pyx_v_b < (__pyx_v_ngroups - 1)) != 0); if (__pyx_t_12) { __pyx_t_15 = __pyx_v_b; __pyx_t_16 = ((__pyx_v_i >= (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_bins.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_bins.diminfo[0].strides))) != 0); __pyx_t_17 = __pyx_t_16; } else { __pyx_t_17 = __pyx_t_12; } if (!__pyx_t_17) break; /* "pandas/src/generated.pyx":5845 * for i in range(N): * while b < ngroups - 1 and i >= bins[b]: * b += 1 # <<<<<<<<<<<<<< * * counts[b] += 1 */ __pyx_v_b = (__pyx_v_b + 1); } /* "pandas/src/generated.pyx":5847 * b += 1 * * counts[b] += 1 # <<<<<<<<<<<<<< * for j in range(K): * val = values[i, j] */ __pyx_t_18 = __pyx_v_b; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_counts.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_counts.diminfo[0].strides) += 1; /* "pandas/src/generated.pyx":5848 * * counts[b] += 1 * for j in range(K): # <<<<<<<<<<<<<< * val = values[i, j] * */ __pyx_t_19 = __pyx_v_K; for (__pyx_t_20 = 0; __pyx_t_20 < __pyx_t_19; __pyx_t_20+=1) { __pyx_v_j = __pyx_t_20; /* "pandas/src/generated.pyx":5849 * counts[b] += 1 * for j in range(K): * val = values[i, j] # <<<<<<<<<<<<<< * * # not nan */ __pyx_t_21 = __pyx_v_i; __pyx_t_22 = __pyx_v_j; __pyx_v_val = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_22, __pyx_pybuffernd_values.diminfo[1].strides)); /* "pandas/src/generated.pyx":5852 * * # not nan * if val == val: # <<<<<<<<<<<<<< * nobs[b, j] += 1 * prodx[b, j] *= val */ __pyx_t_17 = ((__pyx_v_val == __pyx_v_val) != 0); if (__pyx_t_17) { /* "pandas/src/generated.pyx":5853 * # not nan * if val == val: * nobs[b, j] += 1 # <<<<<<<<<<<<<< * prodx[b, j] *= val * else: */ __pyx_t_23 = __pyx_v_b; __pyx_t_24 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_nobs.rcbuffer->pybuffer.buf, __pyx_t_23, __pyx_pybuffernd_nobs.diminfo[0].strides, __pyx_t_24, __pyx_pybuffernd_nobs.diminfo[1].strides) += 1.0; /* "pandas/src/generated.pyx":5854 * if val == val: * nobs[b, j] += 1 * prodx[b, j] *= val # <<<<<<<<<<<<<< * else: * for i in range(N): */ __pyx_t_25 = __pyx_v_b; __pyx_t_26 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_prodx.rcbuffer->pybuffer.buf, __pyx_t_25, __pyx_pybuffernd_prodx.diminfo[0].strides, __pyx_t_26, __pyx_pybuffernd_prodx.diminfo[1].strides) *= __pyx_v_val; goto __pyx_L13; } __pyx_L13:; } } goto __pyx_L6; } /*else*/ { /* "pandas/src/generated.pyx":5856 * prodx[b, j] *= val * else: * for i in range(N): # <<<<<<<<<<<<<< * while b < ngroups - 1 and i >= bins[b]: * b += 1 */ __pyx_t_9 = __pyx_v_N; for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_9; __pyx_t_11+=1) { __pyx_v_i = __pyx_t_11; /* "pandas/src/generated.pyx":5857 * else: * for i in range(N): * while b < ngroups - 1 and i >= bins[b]: # <<<<<<<<<<<<<< * b += 1 * */ while (1) { __pyx_t_17 = ((__pyx_v_b < (__pyx_v_ngroups - 1)) != 0); if (__pyx_t_17) { __pyx_t_19 = __pyx_v_b; __pyx_t_12 = ((__pyx_v_i >= (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_bins.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_bins.diminfo[0].strides))) != 0); __pyx_t_16 = __pyx_t_12; } else { __pyx_t_16 = __pyx_t_17; } if (!__pyx_t_16) break; /* "pandas/src/generated.pyx":5858 * for i in range(N): * while b < ngroups - 1 and i >= bins[b]: * b += 1 # <<<<<<<<<<<<<< * * counts[b] += 1 */ __pyx_v_b = (__pyx_v_b + 1); } /* "pandas/src/generated.pyx":5860 * b += 1 * * counts[b] += 1 # <<<<<<<<<<<<<< * val = values[i, 0] * */ __pyx_t_20 = __pyx_v_b; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_counts.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_counts.diminfo[0].strides) += 1; /* "pandas/src/generated.pyx":5861 * * counts[b] += 1 * val = values[i, 0] # <<<<<<<<<<<<<< * * # not nan */ __pyx_t_27 = __pyx_v_i; __pyx_t_28 = 0; __pyx_v_val = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_27, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_28, __pyx_pybuffernd_values.diminfo[1].strides)); /* "pandas/src/generated.pyx":5864 * * # not nan * if val == val: # <<<<<<<<<<<<<< * nobs[b, 0] += 1 * prodx[b, 0] *= val */ __pyx_t_16 = ((__pyx_v_val == __pyx_v_val) != 0); if (__pyx_t_16) { /* "pandas/src/generated.pyx":5865 * # not nan * if val == val: * nobs[b, 0] += 1 # <<<<<<<<<<<<<< * prodx[b, 0] *= val * */ __pyx_t_29 = __pyx_v_b; __pyx_t_30 = 0; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_nobs.rcbuffer->pybuffer.buf, __pyx_t_29, __pyx_pybuffernd_nobs.diminfo[0].strides, __pyx_t_30, __pyx_pybuffernd_nobs.diminfo[1].strides) += 1.0; /* "pandas/src/generated.pyx":5866 * if val == val: * nobs[b, 0] += 1 * prodx[b, 0] *= val # <<<<<<<<<<<<<< * * for i in range(ngroups): */ __pyx_t_31 = __pyx_v_b; __pyx_t_32 = 0; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_prodx.rcbuffer->pybuffer.buf, __pyx_t_31, __pyx_pybuffernd_prodx.diminfo[0].strides, __pyx_t_32, __pyx_pybuffernd_prodx.diminfo[1].strides) *= __pyx_v_val; goto __pyx_L18; } __pyx_L18:; } } __pyx_L6:; /* "pandas/src/generated.pyx":5868 * prodx[b, 0] *= val * * for i in range(ngroups): # <<<<<<<<<<<<<< * for j in range(K): * if nobs[i, j] == 0: */ __pyx_t_9 = __pyx_v_ngroups; for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_9; __pyx_t_11+=1) { __pyx_v_i = __pyx_t_11; /* "pandas/src/generated.pyx":5869 * * for i in range(ngroups): * for j in range(K): # <<<<<<<<<<<<<< * if nobs[i, j] == 0: * out[i, j] = nan */ __pyx_t_33 = __pyx_v_K; for (__pyx_t_34 = 0; __pyx_t_34 < __pyx_t_33; __pyx_t_34+=1) { __pyx_v_j = __pyx_t_34; /* "pandas/src/generated.pyx":5870 * for i in range(ngroups): * for j in range(K): * if nobs[i, j] == 0: # <<<<<<<<<<<<<< * out[i, j] = nan * else: */ __pyx_t_35 = __pyx_v_i; __pyx_t_36 = __pyx_v_j; __pyx_t_16 = (((*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_nobs.rcbuffer->pybuffer.buf, __pyx_t_35, __pyx_pybuffernd_nobs.diminfo[0].strides, __pyx_t_36, __pyx_pybuffernd_nobs.diminfo[1].strides)) == 0.0) != 0); if (__pyx_t_16) { /* "pandas/src/generated.pyx":5871 * for j in range(K): * if nobs[i, j] == 0: * out[i, j] = nan # <<<<<<<<<<<<<< * else: * out[i, j] = prodx[i, j] */ __pyx_t_37 = __pyx_v_i; __pyx_t_38 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_37, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_38, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_6pandas_5algos_nan; goto __pyx_L23; } /*else*/ { /* "pandas/src/generated.pyx":5873 * out[i, j] = nan * else: * out[i, j] = prodx[i, j] # <<<<<<<<<<<<<< * * @cython.wraparound(False) */ __pyx_t_39 = __pyx_v_i; __pyx_t_40 = __pyx_v_j; __pyx_t_41 = __pyx_v_i; __pyx_t_42 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_41, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_42, __pyx_pybuffernd_out.diminfo[1].strides) = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_prodx.rcbuffer->pybuffer.buf, __pyx_t_39, __pyx_pybuffernd_prodx.diminfo[0].strides, __pyx_t_40, __pyx_pybuffernd_prodx.diminfo[1].strides)); } __pyx_L23:; } } __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_13); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_bins.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_counts.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_prodx.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.group_prod_bin_float32", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_bins.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_counts.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_prodx.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_prodx); __Pyx_XDECREF((PyObject *)__pyx_v_nobs); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_419group_var_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_419group_var_float64 = {__Pyx_NAMESTR("group_var_float64"), (PyCFunction)__pyx_pw_6pandas_5algos_419group_var_float64, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_419group_var_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_out = 0; PyArrayObject *__pyx_v_counts = 0; PyArrayObject *__pyx_v_values = 0; PyArrayObject *__pyx_v_labels = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("group_var_float64 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__out,&__pyx_n_s__counts,&__pyx_n_s__values,&__pyx_n_s__labels,0}; PyObject* values[4] = {0,0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__out)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__counts)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("group_var_float64", 1, 4, 4, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5877; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__values)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("group_var_float64", 1, 4, 4, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5877; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__labels)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("group_var_float64", 1, 4, 4, 3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5877; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "group_var_float64") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5877; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 4) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[3] = PyTuple_GET_ITEM(__pyx_args, 3); } __pyx_v_out = ((PyArrayObject *)values[0]); __pyx_v_counts = ((PyArrayObject *)values[1]); __pyx_v_values = ((PyArrayObject *)values[2]); __pyx_v_labels = ((PyArrayObject *)values[3]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("group_var_float64", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5877; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.group_var_float64", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_5numpy_ndarray, 1, "out", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5877; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_counts), __pyx_ptype_5numpy_ndarray, 1, "counts", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5878; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5879; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_labels), __pyx_ptype_5numpy_ndarray, 1, "labels", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5880; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_418group_var_float64(__pyx_self, __pyx_v_out, __pyx_v_counts, __pyx_v_values, __pyx_v_labels); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":5877 * @cython.wraparound(False) * @cython.boundscheck(False) * def group_var_float64(ndarray[float64_t, ndim=2] out, # <<<<<<<<<<<<<< * ndarray[int64_t] counts, * ndarray[float64_t, ndim=2] values, */ static PyObject *__pyx_pf_6pandas_5algos_418group_var_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_out, PyArrayObject *__pyx_v_counts, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_labels) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_N; Py_ssize_t __pyx_v_K; Py_ssize_t __pyx_v_lab; __pyx_t_5numpy_float64_t __pyx_v_val; __pyx_t_5numpy_float64_t __pyx_v_ct; PyArrayObject *__pyx_v_nobs = 0; PyArrayObject *__pyx_v_sumx = 0; PyArrayObject *__pyx_v_sumxx = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_counts; __Pyx_Buffer __pyx_pybuffer_counts; __Pyx_LocalBuf_ND __pyx_pybuffernd_labels; __Pyx_Buffer __pyx_pybuffer_labels; __Pyx_LocalBuf_ND __pyx_pybuffernd_nobs; __Pyx_Buffer __pyx_pybuffer_nobs; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_sumx; __Pyx_Buffer __pyx_pybuffer_sumx; __Pyx_LocalBuf_ND __pyx_pybuffernd_sumxx; __Pyx_Buffer __pyx_pybuffer_sumxx; __Pyx_LocalBuf_ND __pyx_pybuffernd_values; __Pyx_Buffer __pyx_pybuffer_values; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; Py_ssize_t __pyx_t_2; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyArrayObject *__pyx_t_7 = NULL; int __pyx_t_8; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; PyObject *__pyx_t_11 = NULL; PyObject *__pyx_t_12 = NULL; PyObject *(*__pyx_t_13)(PyObject *); 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; Py_ssize_t __pyx_t_26; long __pyx_t_27; Py_ssize_t __pyx_t_28; long __pyx_t_29; Py_ssize_t __pyx_t_30; long __pyx_t_31; Py_ssize_t __pyx_t_32; long __pyx_t_33; Py_ssize_t __pyx_t_34; Py_ssize_t __pyx_t_35; Py_ssize_t __pyx_t_36; Py_ssize_t __pyx_t_37; Py_ssize_t __pyx_t_38; Py_ssize_t __pyx_t_39; Py_ssize_t __pyx_t_40; Py_ssize_t __pyx_t_41; Py_ssize_t __pyx_t_42; Py_ssize_t __pyx_t_43; Py_ssize_t __pyx_t_44; Py_ssize_t __pyx_t_45; __pyx_t_5numpy_float64_t __pyx_t_46; __pyx_t_5numpy_float64_t __pyx_t_47; Py_ssize_t __pyx_t_48; Py_ssize_t __pyx_t_49; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("group_var_float64", 0); __pyx_pybuffer_nobs.pybuffer.buf = NULL; __pyx_pybuffer_nobs.refcount = 0; __pyx_pybuffernd_nobs.data = NULL; __pyx_pybuffernd_nobs.rcbuffer = &__pyx_pybuffer_nobs; __pyx_pybuffer_sumx.pybuffer.buf = NULL; __pyx_pybuffer_sumx.refcount = 0; __pyx_pybuffernd_sumx.data = NULL; __pyx_pybuffernd_sumx.rcbuffer = &__pyx_pybuffer_sumx; __pyx_pybuffer_sumxx.pybuffer.buf = NULL; __pyx_pybuffer_sumxx.refcount = 0; __pyx_pybuffernd_sumxx.data = NULL; __pyx_pybuffernd_sumxx.rcbuffer = &__pyx_pybuffer_sumxx; __pyx_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; __pyx_pybuffer_counts.pybuffer.buf = NULL; __pyx_pybuffer_counts.refcount = 0; __pyx_pybuffernd_counts.data = NULL; __pyx_pybuffernd_counts.rcbuffer = &__pyx_pybuffer_counts; __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_labels.pybuffer.buf = NULL; __pyx_pybuffer_labels.refcount = 0; __pyx_pybuffernd_labels.data = NULL; __pyx_pybuffernd_labels.rcbuffer = &__pyx_pybuffer_labels; { __Pyx_BufFmt_StackElem __pyx_stack[1]; 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, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5877; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; __pyx_pybuffernd_out.diminfo[1].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_out.diminfo[1].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[1]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_counts.rcbuffer->pybuffer, (PyObject*)__pyx_v_counts, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5877; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_counts.diminfo[0].strides = __pyx_pybuffernd_counts.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_counts.diminfo[0].shape = __pyx_pybuffernd_counts.rcbuffer->pybuffer.shape[0]; { __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, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5877; __pyx_clineno = __LINE__; goto __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_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_labels.rcbuffer->pybuffer, (PyObject*)__pyx_v_labels, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5877; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_labels.diminfo[0].strides = __pyx_pybuffernd_labels.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_labels.diminfo[0].shape = __pyx_pybuffernd_labels.rcbuffer->pybuffer.shape[0]; /* "pandas/src/generated.pyx":5886 * ndarray[float64_t, ndim=2] nobs, sumx, sumxx * * if not len(values) == len(labels): # <<<<<<<<<<<<<< * raise AssertionError("len(index) != len(labels)") * */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5886; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_2 = PyObject_Length(((PyObject *)__pyx_v_labels)); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5886; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_3 = ((!((__pyx_t_1 == __pyx_t_2) != 0)) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":5887 * * if not len(values) == len(labels): * raise AssertionError("len(index) != len(labels)") # <<<<<<<<<<<<<< * * nobs = np.zeros_like(out) */ __pyx_t_4 = PyObject_Call(__pyx_builtin_AssertionError, ((PyObject *)__pyx_k_tuple_192), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5887; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 5887; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L3; } __pyx_L3:; /* "pandas/src/generated.pyx":5889 * raise AssertionError("len(index) != len(labels)") * * nobs = np.zeros_like(out) # <<<<<<<<<<<<<< * sumx = np.zeros_like(out) * sumxx = np.zeros_like(out) */ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5889; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s__zeros_like); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5889; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5889; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(((PyObject *)__pyx_v_out)); PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_v_out)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out)); __pyx_t_6 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5889; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5889; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_7 = ((PyArrayObject *)__pyx_t_6); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer); __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_nobs.rcbuffer->pybuffer, (PyObject*)__pyx_v_nobs, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_pybuffernd_nobs.diminfo[0].strides = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_nobs.diminfo[0].shape = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_nobs.diminfo[1].strides = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_nobs.diminfo[1].shape = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.shape[1]; if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5889; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_7 = 0; __pyx_v_nobs = ((PyArrayObject *)__pyx_t_6); __pyx_t_6 = 0; /* "pandas/src/generated.pyx":5890 * * nobs = np.zeros_like(out) * sumx = np.zeros_like(out) # <<<<<<<<<<<<<< * sumxx = np.zeros_like(out) * */ __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5890; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s__zeros_like); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5890; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5890; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(((PyObject *)__pyx_v_out)); PyTuple_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_v_out)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out)); __pyx_t_5 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5890; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0; if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5890; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_7 = ((PyArrayObject *)__pyx_t_5); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_sumx.rcbuffer->pybuffer); __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_sumx.rcbuffer->pybuffer, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_sumx.rcbuffer->pybuffer, (PyObject*)__pyx_v_sumx, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_pybuffernd_sumx.diminfo[0].strides = __pyx_pybuffernd_sumx.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_sumx.diminfo[0].shape = __pyx_pybuffernd_sumx.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_sumx.diminfo[1].strides = __pyx_pybuffernd_sumx.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_sumx.diminfo[1].shape = __pyx_pybuffernd_sumx.rcbuffer->pybuffer.shape[1]; if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5890; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_7 = 0; __pyx_v_sumx = ((PyArrayObject *)__pyx_t_5); __pyx_t_5 = 0; /* "pandas/src/generated.pyx":5891 * nobs = np.zeros_like(out) * sumx = np.zeros_like(out) * sumxx = np.zeros_like(out) # <<<<<<<<<<<<<< * * N, K = ( values).shape */ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5891; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s__zeros_like); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5891; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5891; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(((PyObject *)__pyx_v_out)); PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_v_out)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out)); __pyx_t_4 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5891; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(((PyObject *)__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_filename = __pyx_f[2]; __pyx_lineno = 5891; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_7 = ((PyArrayObject *)__pyx_t_4); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_sumxx.rcbuffer->pybuffer); __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_sumxx.rcbuffer->pybuffer, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_sumxx.rcbuffer->pybuffer, (PyObject*)__pyx_v_sumxx, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_pybuffernd_sumxx.diminfo[0].strides = __pyx_pybuffernd_sumxx.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_sumxx.diminfo[0].shape = __pyx_pybuffernd_sumxx.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_sumxx.diminfo[1].strides = __pyx_pybuffernd_sumxx.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_sumxx.diminfo[1].shape = __pyx_pybuffernd_sumxx.rcbuffer->pybuffer.shape[1]; if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5891; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_7 = 0; __pyx_v_sumxx = ((PyArrayObject *)__pyx_t_4); __pyx_t_4 = 0; /* "pandas/src/generated.pyx":5893 * sumxx = np.zeros_like(out) * * N, K = ( values).shape # <<<<<<<<<<<<<< * * if K > 1: */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_values), __pyx_n_s__shape); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5893; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); if ((likely(PyTuple_CheckExact(__pyx_t_4))) || (PyList_CheckExact(__pyx_t_4))) { PyObject* sequence = __pyx_t_4; #if CYTHON_COMPILING_IN_CPYTHON Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5893; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_5 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_6 = PyTuple_GET_ITEM(sequence, 1); } else { __pyx_t_5 = PyList_GET_ITEM(sequence, 0); __pyx_t_6 = PyList_GET_ITEM(sequence, 1); } __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(__pyx_t_6); #else __pyx_t_5 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5893; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5893; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); #endif __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else { Py_ssize_t index = -1; __pyx_t_12 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5893; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_13 = Py_TYPE(__pyx_t_12)->tp_iternext; index = 0; __pyx_t_5 = __pyx_t_13(__pyx_t_12); if (unlikely(!__pyx_t_5)) goto __pyx_L4_unpacking_failed; __Pyx_GOTREF(__pyx_t_5); index = 1; __pyx_t_6 = __pyx_t_13(__pyx_t_12); if (unlikely(!__pyx_t_6)) goto __pyx_L4_unpacking_failed; __Pyx_GOTREF(__pyx_t_6); if (__Pyx_IternextUnpackEndCheck(__pyx_t_13(__pyx_t_12), 2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5893; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_13 = NULL; __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; goto __pyx_L5_unpacking_done; __pyx_L4_unpacking_failed:; __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __pyx_t_13 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5893; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_L5_unpacking_done:; } __pyx_t_2 = __Pyx_PyIndex_AsSsize_t(__pyx_t_5); if (unlikely((__pyx_t_2 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5893; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_1 = __Pyx_PyIndex_AsSsize_t(__pyx_t_6); if (unlikely((__pyx_t_1 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5893; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_v_N = __pyx_t_2; __pyx_v_K = __pyx_t_1; /* "pandas/src/generated.pyx":5895 * N, K = ( values).shape * * if K > 1: # <<<<<<<<<<<<<< * for i in range(N): * */ __pyx_t_3 = ((__pyx_v_K > 1) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":5896 * * if K > 1: * for i in range(N): # <<<<<<<<<<<<<< * * lab = labels[i] */ __pyx_t_1 = __pyx_v_N; for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) { __pyx_v_i = __pyx_t_2; /* "pandas/src/generated.pyx":5898 * for i in range(N): * * lab = labels[i] # <<<<<<<<<<<<<< * if lab < 0: * continue */ __pyx_t_14 = __pyx_v_i; __pyx_v_lab = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_labels.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_labels.diminfo[0].strides)); /* "pandas/src/generated.pyx":5899 * * lab = labels[i] * if lab < 0: # <<<<<<<<<<<<<< * continue * */ __pyx_t_3 = ((__pyx_v_lab < 0) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":5900 * lab = labels[i] * if lab < 0: * continue # <<<<<<<<<<<<<< * * counts[lab] += 1 */ goto __pyx_L7_continue; goto __pyx_L9; } __pyx_L9:; /* "pandas/src/generated.pyx":5902 * continue * * counts[lab] += 1 # <<<<<<<<<<<<<< * * for j in range(K): */ __pyx_t_15 = __pyx_v_lab; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_counts.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_counts.diminfo[0].strides) += 1; /* "pandas/src/generated.pyx":5904 * counts[lab] += 1 * * for j in range(K): # <<<<<<<<<<<<<< * val = values[i, j] * */ __pyx_t_16 = __pyx_v_K; for (__pyx_t_17 = 0; __pyx_t_17 < __pyx_t_16; __pyx_t_17+=1) { __pyx_v_j = __pyx_t_17; /* "pandas/src/generated.pyx":5905 * * for j in range(K): * val = values[i, j] # <<<<<<<<<<<<<< * * # not nan */ __pyx_t_18 = __pyx_v_i; __pyx_t_19 = __pyx_v_j; __pyx_v_val = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_19, __pyx_pybuffernd_values.diminfo[1].strides)); /* "pandas/src/generated.pyx":5908 * * # not nan * if val == val: # <<<<<<<<<<<<<< * nobs[lab, j] += 1 * sumx[lab, j] += val */ __pyx_t_3 = ((__pyx_v_val == __pyx_v_val) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":5909 * # not nan * if val == val: * nobs[lab, j] += 1 # <<<<<<<<<<<<<< * sumx[lab, j] += val * sumxx[lab, j] += val * val */ __pyx_t_20 = __pyx_v_lab; __pyx_t_21 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_nobs.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_nobs.diminfo[0].strides, __pyx_t_21, __pyx_pybuffernd_nobs.diminfo[1].strides) += 1.0; /* "pandas/src/generated.pyx":5910 * if val == val: * nobs[lab, j] += 1 * sumx[lab, j] += val # <<<<<<<<<<<<<< * sumxx[lab, j] += val * val * else: */ __pyx_t_22 = __pyx_v_lab; __pyx_t_23 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_sumx.rcbuffer->pybuffer.buf, __pyx_t_22, __pyx_pybuffernd_sumx.diminfo[0].strides, __pyx_t_23, __pyx_pybuffernd_sumx.diminfo[1].strides) += __pyx_v_val; /* "pandas/src/generated.pyx":5911 * nobs[lab, j] += 1 * sumx[lab, j] += val * sumxx[lab, j] += val * val # <<<<<<<<<<<<<< * else: * for i in range(N): */ __pyx_t_24 = __pyx_v_lab; __pyx_t_25 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_sumxx.rcbuffer->pybuffer.buf, __pyx_t_24, __pyx_pybuffernd_sumxx.diminfo[0].strides, __pyx_t_25, __pyx_pybuffernd_sumxx.diminfo[1].strides) += (__pyx_v_val * __pyx_v_val); goto __pyx_L12; } __pyx_L12:; } __pyx_L7_continue:; } goto __pyx_L6; } /*else*/ { /* "pandas/src/generated.pyx":5913 * sumxx[lab, j] += val * val * else: * for i in range(N): # <<<<<<<<<<<<<< * * lab = labels[i] */ __pyx_t_1 = __pyx_v_N; for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) { __pyx_v_i = __pyx_t_2; /* "pandas/src/generated.pyx":5915 * for i in range(N): * * lab = labels[i] # <<<<<<<<<<<<<< * if lab < 0: * continue */ __pyx_t_16 = __pyx_v_i; __pyx_v_lab = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_labels.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_labels.diminfo[0].strides)); /* "pandas/src/generated.pyx":5916 * * lab = labels[i] * if lab < 0: # <<<<<<<<<<<<<< * continue * */ __pyx_t_3 = ((__pyx_v_lab < 0) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":5917 * lab = labels[i] * if lab < 0: * continue # <<<<<<<<<<<<<< * * counts[lab] += 1 */ goto __pyx_L13_continue; goto __pyx_L15; } __pyx_L15:; /* "pandas/src/generated.pyx":5919 * continue * * counts[lab] += 1 # <<<<<<<<<<<<<< * val = values[i, 0] * # not nan */ __pyx_t_17 = __pyx_v_lab; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_counts.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_counts.diminfo[0].strides) += 1; /* "pandas/src/generated.pyx":5920 * * counts[lab] += 1 * val = values[i, 0] # <<<<<<<<<<<<<< * # not nan * if val == val: */ __pyx_t_26 = __pyx_v_i; __pyx_t_27 = 0; __pyx_v_val = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_26, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_27, __pyx_pybuffernd_values.diminfo[1].strides)); /* "pandas/src/generated.pyx":5922 * val = values[i, 0] * # not nan * if val == val: # <<<<<<<<<<<<<< * nobs[lab, 0] += 1 * sumx[lab, 0] += val */ __pyx_t_3 = ((__pyx_v_val == __pyx_v_val) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":5923 * # not nan * if val == val: * nobs[lab, 0] += 1 # <<<<<<<<<<<<<< * sumx[lab, 0] += val * sumxx[lab, 0] += val * val */ __pyx_t_28 = __pyx_v_lab; __pyx_t_29 = 0; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_nobs.rcbuffer->pybuffer.buf, __pyx_t_28, __pyx_pybuffernd_nobs.diminfo[0].strides, __pyx_t_29, __pyx_pybuffernd_nobs.diminfo[1].strides) += 1.0; /* "pandas/src/generated.pyx":5924 * if val == val: * nobs[lab, 0] += 1 * sumx[lab, 0] += val # <<<<<<<<<<<<<< * sumxx[lab, 0] += val * val * */ __pyx_t_30 = __pyx_v_lab; __pyx_t_31 = 0; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_sumx.rcbuffer->pybuffer.buf, __pyx_t_30, __pyx_pybuffernd_sumx.diminfo[0].strides, __pyx_t_31, __pyx_pybuffernd_sumx.diminfo[1].strides) += __pyx_v_val; /* "pandas/src/generated.pyx":5925 * nobs[lab, 0] += 1 * sumx[lab, 0] += val * sumxx[lab, 0] += val * val # <<<<<<<<<<<<<< * * */ __pyx_t_32 = __pyx_v_lab; __pyx_t_33 = 0; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_sumxx.rcbuffer->pybuffer.buf, __pyx_t_32, __pyx_pybuffernd_sumxx.diminfo[0].strides, __pyx_t_33, __pyx_pybuffernd_sumxx.diminfo[1].strides) += (__pyx_v_val * __pyx_v_val); goto __pyx_L16; } __pyx_L16:; __pyx_L13_continue:; } } __pyx_L6:; /* "pandas/src/generated.pyx":5928 * * * for i in range(len(counts)): # <<<<<<<<<<<<<< * for j in range(K): * ct = nobs[i, j] */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_counts)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5928; __pyx_clineno = __LINE__; goto __pyx_L1_error;} for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) { __pyx_v_i = __pyx_t_2; /* "pandas/src/generated.pyx":5929 * * for i in range(len(counts)): * for j in range(K): # <<<<<<<<<<<<<< * ct = nobs[i, j] * if ct < 2: */ __pyx_t_34 = __pyx_v_K; for (__pyx_t_35 = 0; __pyx_t_35 < __pyx_t_34; __pyx_t_35+=1) { __pyx_v_j = __pyx_t_35; /* "pandas/src/generated.pyx":5930 * for i in range(len(counts)): * for j in range(K): * ct = nobs[i, j] # <<<<<<<<<<<<<< * if ct < 2: * out[i, j] = nan */ __pyx_t_36 = __pyx_v_i; __pyx_t_37 = __pyx_v_j; __pyx_v_ct = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_nobs.rcbuffer->pybuffer.buf, __pyx_t_36, __pyx_pybuffernd_nobs.diminfo[0].strides, __pyx_t_37, __pyx_pybuffernd_nobs.diminfo[1].strides)); /* "pandas/src/generated.pyx":5931 * for j in range(K): * ct = nobs[i, j] * if ct < 2: # <<<<<<<<<<<<<< * out[i, j] = nan * else: */ __pyx_t_3 = ((__pyx_v_ct < 2.0) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":5932 * ct = nobs[i, j] * if ct < 2: * out[i, j] = nan # <<<<<<<<<<<<<< * else: * out[i, j] = ((ct * sumxx[i, j] - sumx[i, j] * sumx[i, j]) / */ __pyx_t_38 = __pyx_v_i; __pyx_t_39 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_38, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_39, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_6pandas_5algos_nan; goto __pyx_L21; } /*else*/ { /* "pandas/src/generated.pyx":5934 * out[i, j] = nan * else: * out[i, j] = ((ct * sumxx[i, j] - sumx[i, j] * sumx[i, j]) / # <<<<<<<<<<<<<< * (ct * ct - ct)) * @cython.wraparound(False) */ __pyx_t_40 = __pyx_v_i; __pyx_t_41 = __pyx_v_j; __pyx_t_42 = __pyx_v_i; __pyx_t_43 = __pyx_v_j; __pyx_t_44 = __pyx_v_i; __pyx_t_45 = __pyx_v_j; __pyx_t_46 = ((__pyx_v_ct * (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_sumxx.rcbuffer->pybuffer.buf, __pyx_t_40, __pyx_pybuffernd_sumxx.diminfo[0].strides, __pyx_t_41, __pyx_pybuffernd_sumxx.diminfo[1].strides))) - ((*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_sumx.rcbuffer->pybuffer.buf, __pyx_t_42, __pyx_pybuffernd_sumx.diminfo[0].strides, __pyx_t_43, __pyx_pybuffernd_sumx.diminfo[1].strides)) * (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_sumx.rcbuffer->pybuffer.buf, __pyx_t_44, __pyx_pybuffernd_sumx.diminfo[0].strides, __pyx_t_45, __pyx_pybuffernd_sumx.diminfo[1].strides)))); /* "pandas/src/generated.pyx":5935 * else: * out[i, j] = ((ct * sumxx[i, j] - sumx[i, j] * sumx[i, j]) / * (ct * ct - ct)) # <<<<<<<<<<<<<< * @cython.wraparound(False) * @cython.boundscheck(False) */ __pyx_t_47 = ((__pyx_v_ct * __pyx_v_ct) - __pyx_v_ct); if (unlikely(__pyx_t_47 == 0)) { #ifdef WITH_THREAD PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure(); #endif PyErr_Format(PyExc_ZeroDivisionError, "float division"); #ifdef WITH_THREAD PyGILState_Release(__pyx_gilstate_save); #endif {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5934; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } /* "pandas/src/generated.pyx":5934 * out[i, j] = nan * else: * out[i, j] = ((ct * sumxx[i, j] - sumx[i, j] * sumx[i, j]) / # <<<<<<<<<<<<<< * (ct * ct - ct)) * @cython.wraparound(False) */ __pyx_t_48 = __pyx_v_i; __pyx_t_49 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_48, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_49, __pyx_pybuffernd_out.diminfo[1].strides) = (__pyx_t_46 / __pyx_t_47); } __pyx_L21:; } } __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_12); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_counts.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_labels.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_sumx.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_sumxx.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.group_var_float64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_counts.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_labels.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_sumx.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_sumxx.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_nobs); __Pyx_XDECREF((PyObject *)__pyx_v_sumx); __Pyx_XDECREF((PyObject *)__pyx_v_sumxx); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_421group_var_float32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_421group_var_float32 = {__Pyx_NAMESTR("group_var_float32"), (PyCFunction)__pyx_pw_6pandas_5algos_421group_var_float32, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_421group_var_float32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_out = 0; PyArrayObject *__pyx_v_counts = 0; PyArrayObject *__pyx_v_values = 0; PyArrayObject *__pyx_v_labels = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("group_var_float32 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__out,&__pyx_n_s__counts,&__pyx_n_s__values,&__pyx_n_s__labels,0}; PyObject* values[4] = {0,0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__out)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__counts)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("group_var_float32", 1, 4, 4, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5938; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__values)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("group_var_float32", 1, 4, 4, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5938; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__labels)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("group_var_float32", 1, 4, 4, 3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5938; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "group_var_float32") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5938; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 4) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[3] = PyTuple_GET_ITEM(__pyx_args, 3); } __pyx_v_out = ((PyArrayObject *)values[0]); __pyx_v_counts = ((PyArrayObject *)values[1]); __pyx_v_values = ((PyArrayObject *)values[2]); __pyx_v_labels = ((PyArrayObject *)values[3]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("group_var_float32", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5938; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.group_var_float32", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_5numpy_ndarray, 1, "out", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5938; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_counts), __pyx_ptype_5numpy_ndarray, 1, "counts", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5939; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5940; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_labels), __pyx_ptype_5numpy_ndarray, 1, "labels", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5941; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_420group_var_float32(__pyx_self, __pyx_v_out, __pyx_v_counts, __pyx_v_values, __pyx_v_labels); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":5938 * @cython.wraparound(False) * @cython.boundscheck(False) * def group_var_float32(ndarray[float32_t, ndim=2] out, # <<<<<<<<<<<<<< * ndarray[int64_t] counts, * ndarray[float32_t, ndim=2] values, */ static PyObject *__pyx_pf_6pandas_5algos_420group_var_float32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_out, PyArrayObject *__pyx_v_counts, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_labels) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_N; Py_ssize_t __pyx_v_K; Py_ssize_t __pyx_v_lab; __pyx_t_5numpy_float32_t __pyx_v_val; __pyx_t_5numpy_float32_t __pyx_v_ct; PyArrayObject *__pyx_v_nobs = 0; PyArrayObject *__pyx_v_sumx = 0; PyArrayObject *__pyx_v_sumxx = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_counts; __Pyx_Buffer __pyx_pybuffer_counts; __Pyx_LocalBuf_ND __pyx_pybuffernd_labels; __Pyx_Buffer __pyx_pybuffer_labels; __Pyx_LocalBuf_ND __pyx_pybuffernd_nobs; __Pyx_Buffer __pyx_pybuffer_nobs; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_sumx; __Pyx_Buffer __pyx_pybuffer_sumx; __Pyx_LocalBuf_ND __pyx_pybuffernd_sumxx; __Pyx_Buffer __pyx_pybuffer_sumxx; __Pyx_LocalBuf_ND __pyx_pybuffernd_values; __Pyx_Buffer __pyx_pybuffer_values; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; Py_ssize_t __pyx_t_2; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyArrayObject *__pyx_t_7 = NULL; int __pyx_t_8; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; PyObject *__pyx_t_11 = NULL; PyObject *__pyx_t_12 = NULL; PyObject *(*__pyx_t_13)(PyObject *); 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; Py_ssize_t __pyx_t_26; long __pyx_t_27; Py_ssize_t __pyx_t_28; long __pyx_t_29; Py_ssize_t __pyx_t_30; long __pyx_t_31; Py_ssize_t __pyx_t_32; long __pyx_t_33; Py_ssize_t __pyx_t_34; Py_ssize_t __pyx_t_35; Py_ssize_t __pyx_t_36; Py_ssize_t __pyx_t_37; Py_ssize_t __pyx_t_38; Py_ssize_t __pyx_t_39; Py_ssize_t __pyx_t_40; Py_ssize_t __pyx_t_41; Py_ssize_t __pyx_t_42; Py_ssize_t __pyx_t_43; Py_ssize_t __pyx_t_44; Py_ssize_t __pyx_t_45; __pyx_t_5numpy_float32_t __pyx_t_46; __pyx_t_5numpy_float32_t __pyx_t_47; Py_ssize_t __pyx_t_48; Py_ssize_t __pyx_t_49; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("group_var_float32", 0); __pyx_pybuffer_nobs.pybuffer.buf = NULL; __pyx_pybuffer_nobs.refcount = 0; __pyx_pybuffernd_nobs.data = NULL; __pyx_pybuffernd_nobs.rcbuffer = &__pyx_pybuffer_nobs; __pyx_pybuffer_sumx.pybuffer.buf = NULL; __pyx_pybuffer_sumx.refcount = 0; __pyx_pybuffernd_sumx.data = NULL; __pyx_pybuffernd_sumx.rcbuffer = &__pyx_pybuffer_sumx; __pyx_pybuffer_sumxx.pybuffer.buf = NULL; __pyx_pybuffer_sumxx.refcount = 0; __pyx_pybuffernd_sumxx.data = NULL; __pyx_pybuffernd_sumxx.rcbuffer = &__pyx_pybuffer_sumxx; __pyx_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; __pyx_pybuffer_counts.pybuffer.buf = NULL; __pyx_pybuffer_counts.refcount = 0; __pyx_pybuffernd_counts.data = NULL; __pyx_pybuffernd_counts.rcbuffer = &__pyx_pybuffer_counts; __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_labels.pybuffer.buf = NULL; __pyx_pybuffer_labels.refcount = 0; __pyx_pybuffernd_labels.data = NULL; __pyx_pybuffernd_labels.rcbuffer = &__pyx_pybuffer_labels; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_v_out, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5938; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; __pyx_pybuffernd_out.diminfo[1].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_out.diminfo[1].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[1]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_counts.rcbuffer->pybuffer, (PyObject*)__pyx_v_counts, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5938; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_counts.diminfo[0].strides = __pyx_pybuffernd_counts.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_counts.diminfo[0].shape = __pyx_pybuffernd_counts.rcbuffer->pybuffer.shape[0]; { __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_float32_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5938; __pyx_clineno = __LINE__; goto __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_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_labels.rcbuffer->pybuffer, (PyObject*)__pyx_v_labels, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5938; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_labels.diminfo[0].strides = __pyx_pybuffernd_labels.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_labels.diminfo[0].shape = __pyx_pybuffernd_labels.rcbuffer->pybuffer.shape[0]; /* "pandas/src/generated.pyx":5947 * ndarray[float32_t, ndim=2] nobs, sumx, sumxx * * if not len(values) == len(labels): # <<<<<<<<<<<<<< * raise AssertionError("len(index) != len(labels)") * */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5947; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_2 = PyObject_Length(((PyObject *)__pyx_v_labels)); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5947; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_3 = ((!((__pyx_t_1 == __pyx_t_2) != 0)) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":5948 * * if not len(values) == len(labels): * raise AssertionError("len(index) != len(labels)") # <<<<<<<<<<<<<< * * nobs = np.zeros_like(out) */ __pyx_t_4 = PyObject_Call(__pyx_builtin_AssertionError, ((PyObject *)__pyx_k_tuple_193), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5948; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 5948; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L3; } __pyx_L3:; /* "pandas/src/generated.pyx":5950 * raise AssertionError("len(index) != len(labels)") * * nobs = np.zeros_like(out) # <<<<<<<<<<<<<< * sumx = np.zeros_like(out) * sumxx = np.zeros_like(out) */ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5950; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s__zeros_like); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5950; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5950; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(((PyObject *)__pyx_v_out)); PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_v_out)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out)); __pyx_t_6 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5950; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5950; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_7 = ((PyArrayObject *)__pyx_t_6); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer); __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_nobs.rcbuffer->pybuffer, (PyObject*)__pyx_v_nobs, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_pybuffernd_nobs.diminfo[0].strides = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_nobs.diminfo[0].shape = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_nobs.diminfo[1].strides = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_nobs.diminfo[1].shape = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.shape[1]; if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5950; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_7 = 0; __pyx_v_nobs = ((PyArrayObject *)__pyx_t_6); __pyx_t_6 = 0; /* "pandas/src/generated.pyx":5951 * * nobs = np.zeros_like(out) * sumx = np.zeros_like(out) # <<<<<<<<<<<<<< * sumxx = np.zeros_like(out) * */ __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5951; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s__zeros_like); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5951; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5951; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(((PyObject *)__pyx_v_out)); PyTuple_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_v_out)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out)); __pyx_t_5 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5951; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0; if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5951; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_7 = ((PyArrayObject *)__pyx_t_5); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_sumx.rcbuffer->pybuffer); __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_sumx.rcbuffer->pybuffer, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_sumx.rcbuffer->pybuffer, (PyObject*)__pyx_v_sumx, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_pybuffernd_sumx.diminfo[0].strides = __pyx_pybuffernd_sumx.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_sumx.diminfo[0].shape = __pyx_pybuffernd_sumx.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_sumx.diminfo[1].strides = __pyx_pybuffernd_sumx.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_sumx.diminfo[1].shape = __pyx_pybuffernd_sumx.rcbuffer->pybuffer.shape[1]; if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5951; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_7 = 0; __pyx_v_sumx = ((PyArrayObject *)__pyx_t_5); __pyx_t_5 = 0; /* "pandas/src/generated.pyx":5952 * nobs = np.zeros_like(out) * sumx = np.zeros_like(out) * sumxx = np.zeros_like(out) # <<<<<<<<<<<<<< * * N, K = ( values).shape */ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5952; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s__zeros_like); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5952; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5952; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(((PyObject *)__pyx_v_out)); PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_v_out)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out)); __pyx_t_4 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5952; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(((PyObject *)__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_filename = __pyx_f[2]; __pyx_lineno = 5952; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_7 = ((PyArrayObject *)__pyx_t_4); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_sumxx.rcbuffer->pybuffer); __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_sumxx.rcbuffer->pybuffer, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_sumxx.rcbuffer->pybuffer, (PyObject*)__pyx_v_sumxx, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_pybuffernd_sumxx.diminfo[0].strides = __pyx_pybuffernd_sumxx.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_sumxx.diminfo[0].shape = __pyx_pybuffernd_sumxx.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_sumxx.diminfo[1].strides = __pyx_pybuffernd_sumxx.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_sumxx.diminfo[1].shape = __pyx_pybuffernd_sumxx.rcbuffer->pybuffer.shape[1]; if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5952; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_7 = 0; __pyx_v_sumxx = ((PyArrayObject *)__pyx_t_4); __pyx_t_4 = 0; /* "pandas/src/generated.pyx":5954 * sumxx = np.zeros_like(out) * * N, K = ( values).shape # <<<<<<<<<<<<<< * * if K > 1: */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_values), __pyx_n_s__shape); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5954; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); if ((likely(PyTuple_CheckExact(__pyx_t_4))) || (PyList_CheckExact(__pyx_t_4))) { PyObject* sequence = __pyx_t_4; #if CYTHON_COMPILING_IN_CPYTHON Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5954; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_5 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_6 = PyTuple_GET_ITEM(sequence, 1); } else { __pyx_t_5 = PyList_GET_ITEM(sequence, 0); __pyx_t_6 = PyList_GET_ITEM(sequence, 1); } __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(__pyx_t_6); #else __pyx_t_5 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5954; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5954; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); #endif __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else { Py_ssize_t index = -1; __pyx_t_12 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5954; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_13 = Py_TYPE(__pyx_t_12)->tp_iternext; index = 0; __pyx_t_5 = __pyx_t_13(__pyx_t_12); if (unlikely(!__pyx_t_5)) goto __pyx_L4_unpacking_failed; __Pyx_GOTREF(__pyx_t_5); index = 1; __pyx_t_6 = __pyx_t_13(__pyx_t_12); if (unlikely(!__pyx_t_6)) goto __pyx_L4_unpacking_failed; __Pyx_GOTREF(__pyx_t_6); if (__Pyx_IternextUnpackEndCheck(__pyx_t_13(__pyx_t_12), 2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5954; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_13 = NULL; __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; goto __pyx_L5_unpacking_done; __pyx_L4_unpacking_failed:; __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __pyx_t_13 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5954; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_L5_unpacking_done:; } __pyx_t_2 = __Pyx_PyIndex_AsSsize_t(__pyx_t_5); if (unlikely((__pyx_t_2 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5954; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_1 = __Pyx_PyIndex_AsSsize_t(__pyx_t_6); if (unlikely((__pyx_t_1 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5954; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_v_N = __pyx_t_2; __pyx_v_K = __pyx_t_1; /* "pandas/src/generated.pyx":5956 * N, K = ( values).shape * * if K > 1: # <<<<<<<<<<<<<< * for i in range(N): * */ __pyx_t_3 = ((__pyx_v_K > 1) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":5957 * * if K > 1: * for i in range(N): # <<<<<<<<<<<<<< * * lab = labels[i] */ __pyx_t_1 = __pyx_v_N; for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) { __pyx_v_i = __pyx_t_2; /* "pandas/src/generated.pyx":5959 * for i in range(N): * * lab = labels[i] # <<<<<<<<<<<<<< * if lab < 0: * continue */ __pyx_t_14 = __pyx_v_i; __pyx_v_lab = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_labels.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_labels.diminfo[0].strides)); /* "pandas/src/generated.pyx":5960 * * lab = labels[i] * if lab < 0: # <<<<<<<<<<<<<< * continue * */ __pyx_t_3 = ((__pyx_v_lab < 0) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":5961 * lab = labels[i] * if lab < 0: * continue # <<<<<<<<<<<<<< * * counts[lab] += 1 */ goto __pyx_L7_continue; goto __pyx_L9; } __pyx_L9:; /* "pandas/src/generated.pyx":5963 * continue * * counts[lab] += 1 # <<<<<<<<<<<<<< * * for j in range(K): */ __pyx_t_15 = __pyx_v_lab; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_counts.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_counts.diminfo[0].strides) += 1; /* "pandas/src/generated.pyx":5965 * counts[lab] += 1 * * for j in range(K): # <<<<<<<<<<<<<< * val = values[i, j] * */ __pyx_t_16 = __pyx_v_K; for (__pyx_t_17 = 0; __pyx_t_17 < __pyx_t_16; __pyx_t_17+=1) { __pyx_v_j = __pyx_t_17; /* "pandas/src/generated.pyx":5966 * * for j in range(K): * val = values[i, j] # <<<<<<<<<<<<<< * * # not nan */ __pyx_t_18 = __pyx_v_i; __pyx_t_19 = __pyx_v_j; __pyx_v_val = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_19, __pyx_pybuffernd_values.diminfo[1].strides)); /* "pandas/src/generated.pyx":5969 * * # not nan * if val == val: # <<<<<<<<<<<<<< * nobs[lab, j] += 1 * sumx[lab, j] += val */ __pyx_t_3 = ((__pyx_v_val == __pyx_v_val) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":5970 * # not nan * if val == val: * nobs[lab, j] += 1 # <<<<<<<<<<<<<< * sumx[lab, j] += val * sumxx[lab, j] += val * val */ __pyx_t_20 = __pyx_v_lab; __pyx_t_21 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_nobs.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_nobs.diminfo[0].strides, __pyx_t_21, __pyx_pybuffernd_nobs.diminfo[1].strides) += 1.0; /* "pandas/src/generated.pyx":5971 * if val == val: * nobs[lab, j] += 1 * sumx[lab, j] += val # <<<<<<<<<<<<<< * sumxx[lab, j] += val * val * else: */ __pyx_t_22 = __pyx_v_lab; __pyx_t_23 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_sumx.rcbuffer->pybuffer.buf, __pyx_t_22, __pyx_pybuffernd_sumx.diminfo[0].strides, __pyx_t_23, __pyx_pybuffernd_sumx.diminfo[1].strides) += __pyx_v_val; /* "pandas/src/generated.pyx":5972 * nobs[lab, j] += 1 * sumx[lab, j] += val * sumxx[lab, j] += val * val # <<<<<<<<<<<<<< * else: * for i in range(N): */ __pyx_t_24 = __pyx_v_lab; __pyx_t_25 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_sumxx.rcbuffer->pybuffer.buf, __pyx_t_24, __pyx_pybuffernd_sumxx.diminfo[0].strides, __pyx_t_25, __pyx_pybuffernd_sumxx.diminfo[1].strides) += (__pyx_v_val * __pyx_v_val); goto __pyx_L12; } __pyx_L12:; } __pyx_L7_continue:; } goto __pyx_L6; } /*else*/ { /* "pandas/src/generated.pyx":5974 * sumxx[lab, j] += val * val * else: * for i in range(N): # <<<<<<<<<<<<<< * * lab = labels[i] */ __pyx_t_1 = __pyx_v_N; for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) { __pyx_v_i = __pyx_t_2; /* "pandas/src/generated.pyx":5976 * for i in range(N): * * lab = labels[i] # <<<<<<<<<<<<<< * if lab < 0: * continue */ __pyx_t_16 = __pyx_v_i; __pyx_v_lab = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_labels.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_labels.diminfo[0].strides)); /* "pandas/src/generated.pyx":5977 * * lab = labels[i] * if lab < 0: # <<<<<<<<<<<<<< * continue * */ __pyx_t_3 = ((__pyx_v_lab < 0) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":5978 * lab = labels[i] * if lab < 0: * continue # <<<<<<<<<<<<<< * * counts[lab] += 1 */ goto __pyx_L13_continue; goto __pyx_L15; } __pyx_L15:; /* "pandas/src/generated.pyx":5980 * continue * * counts[lab] += 1 # <<<<<<<<<<<<<< * val = values[i, 0] * # not nan */ __pyx_t_17 = __pyx_v_lab; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_counts.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_counts.diminfo[0].strides) += 1; /* "pandas/src/generated.pyx":5981 * * counts[lab] += 1 * val = values[i, 0] # <<<<<<<<<<<<<< * # not nan * if val == val: */ __pyx_t_26 = __pyx_v_i; __pyx_t_27 = 0; __pyx_v_val = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_26, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_27, __pyx_pybuffernd_values.diminfo[1].strides)); /* "pandas/src/generated.pyx":5983 * val = values[i, 0] * # not nan * if val == val: # <<<<<<<<<<<<<< * nobs[lab, 0] += 1 * sumx[lab, 0] += val */ __pyx_t_3 = ((__pyx_v_val == __pyx_v_val) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":5984 * # not nan * if val == val: * nobs[lab, 0] += 1 # <<<<<<<<<<<<<< * sumx[lab, 0] += val * sumxx[lab, 0] += val * val */ __pyx_t_28 = __pyx_v_lab; __pyx_t_29 = 0; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_nobs.rcbuffer->pybuffer.buf, __pyx_t_28, __pyx_pybuffernd_nobs.diminfo[0].strides, __pyx_t_29, __pyx_pybuffernd_nobs.diminfo[1].strides) += 1.0; /* "pandas/src/generated.pyx":5985 * if val == val: * nobs[lab, 0] += 1 * sumx[lab, 0] += val # <<<<<<<<<<<<<< * sumxx[lab, 0] += val * val * */ __pyx_t_30 = __pyx_v_lab; __pyx_t_31 = 0; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_sumx.rcbuffer->pybuffer.buf, __pyx_t_30, __pyx_pybuffernd_sumx.diminfo[0].strides, __pyx_t_31, __pyx_pybuffernd_sumx.diminfo[1].strides) += __pyx_v_val; /* "pandas/src/generated.pyx":5986 * nobs[lab, 0] += 1 * sumx[lab, 0] += val * sumxx[lab, 0] += val * val # <<<<<<<<<<<<<< * * */ __pyx_t_32 = __pyx_v_lab; __pyx_t_33 = 0; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_sumxx.rcbuffer->pybuffer.buf, __pyx_t_32, __pyx_pybuffernd_sumxx.diminfo[0].strides, __pyx_t_33, __pyx_pybuffernd_sumxx.diminfo[1].strides) += (__pyx_v_val * __pyx_v_val); goto __pyx_L16; } __pyx_L16:; __pyx_L13_continue:; } } __pyx_L6:; /* "pandas/src/generated.pyx":5989 * * * for i in range(len(counts)): # <<<<<<<<<<<<<< * for j in range(K): * ct = nobs[i, j] */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_counts)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5989; __pyx_clineno = __LINE__; goto __pyx_L1_error;} for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) { __pyx_v_i = __pyx_t_2; /* "pandas/src/generated.pyx":5990 * * for i in range(len(counts)): * for j in range(K): # <<<<<<<<<<<<<< * ct = nobs[i, j] * if ct < 2: */ __pyx_t_34 = __pyx_v_K; for (__pyx_t_35 = 0; __pyx_t_35 < __pyx_t_34; __pyx_t_35+=1) { __pyx_v_j = __pyx_t_35; /* "pandas/src/generated.pyx":5991 * for i in range(len(counts)): * for j in range(K): * ct = nobs[i, j] # <<<<<<<<<<<<<< * if ct < 2: * out[i, j] = nan */ __pyx_t_36 = __pyx_v_i; __pyx_t_37 = __pyx_v_j; __pyx_v_ct = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_nobs.rcbuffer->pybuffer.buf, __pyx_t_36, __pyx_pybuffernd_nobs.diminfo[0].strides, __pyx_t_37, __pyx_pybuffernd_nobs.diminfo[1].strides)); /* "pandas/src/generated.pyx":5992 * for j in range(K): * ct = nobs[i, j] * if ct < 2: # <<<<<<<<<<<<<< * out[i, j] = nan * else: */ __pyx_t_3 = ((__pyx_v_ct < 2.0) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":5993 * ct = nobs[i, j] * if ct < 2: * out[i, j] = nan # <<<<<<<<<<<<<< * else: * out[i, j] = ((ct * sumxx[i, j] - sumx[i, j] * sumx[i, j]) / */ __pyx_t_38 = __pyx_v_i; __pyx_t_39 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_38, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_39, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_6pandas_5algos_nan; goto __pyx_L21; } /*else*/ { /* "pandas/src/generated.pyx":5995 * out[i, j] = nan * else: * out[i, j] = ((ct * sumxx[i, j] - sumx[i, j] * sumx[i, j]) / # <<<<<<<<<<<<<< * (ct * ct - ct)) * */ __pyx_t_40 = __pyx_v_i; __pyx_t_41 = __pyx_v_j; __pyx_t_42 = __pyx_v_i; __pyx_t_43 = __pyx_v_j; __pyx_t_44 = __pyx_v_i; __pyx_t_45 = __pyx_v_j; __pyx_t_46 = ((__pyx_v_ct * (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_sumxx.rcbuffer->pybuffer.buf, __pyx_t_40, __pyx_pybuffernd_sumxx.diminfo[0].strides, __pyx_t_41, __pyx_pybuffernd_sumxx.diminfo[1].strides))) - ((*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_sumx.rcbuffer->pybuffer.buf, __pyx_t_42, __pyx_pybuffernd_sumx.diminfo[0].strides, __pyx_t_43, __pyx_pybuffernd_sumx.diminfo[1].strides)) * (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_sumx.rcbuffer->pybuffer.buf, __pyx_t_44, __pyx_pybuffernd_sumx.diminfo[0].strides, __pyx_t_45, __pyx_pybuffernd_sumx.diminfo[1].strides)))); /* "pandas/src/generated.pyx":5996 * else: * out[i, j] = ((ct * sumxx[i, j] - sumx[i, j] * sumx[i, j]) / * (ct * ct - ct)) # <<<<<<<<<<<<<< * * @cython.wraparound(False) */ __pyx_t_47 = ((__pyx_v_ct * __pyx_v_ct) - __pyx_v_ct); if (unlikely(__pyx_t_47 == 0)) { #ifdef WITH_THREAD PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure(); #endif PyErr_Format(PyExc_ZeroDivisionError, "float division"); #ifdef WITH_THREAD PyGILState_Release(__pyx_gilstate_save); #endif {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5995; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } /* "pandas/src/generated.pyx":5995 * out[i, j] = nan * else: * out[i, j] = ((ct * sumxx[i, j] - sumx[i, j] * sumx[i, j]) / # <<<<<<<<<<<<<< * (ct * ct - ct)) * */ __pyx_t_48 = __pyx_v_i; __pyx_t_49 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_48, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_49, __pyx_pybuffernd_out.diminfo[1].strides) = (__pyx_t_46 / __pyx_t_47); } __pyx_L21:; } } __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_12); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_counts.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_labels.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_sumx.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_sumxx.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.group_var_float32", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_counts.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_labels.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_sumx.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_sumxx.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_nobs); __Pyx_XDECREF((PyObject *)__pyx_v_sumx); __Pyx_XDECREF((PyObject *)__pyx_v_sumxx); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_423group_var_bin_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_423group_var_bin_float64 = {__Pyx_NAMESTR("group_var_bin_float64"), (PyCFunction)__pyx_pw_6pandas_5algos_423group_var_bin_float64, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_423group_var_bin_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_out = 0; PyArrayObject *__pyx_v_counts = 0; PyArrayObject *__pyx_v_values = 0; PyArrayObject *__pyx_v_bins = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("group_var_bin_float64 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__out,&__pyx_n_s__counts,&__pyx_n_s__values,&__pyx_n_s__bins,0}; PyObject* values[4] = {0,0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__out)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__counts)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("group_var_bin_float64", 1, 4, 4, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6000; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__values)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("group_var_bin_float64", 1, 4, 4, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6000; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__bins)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("group_var_bin_float64", 1, 4, 4, 3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6000; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "group_var_bin_float64") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6000; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 4) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[3] = PyTuple_GET_ITEM(__pyx_args, 3); } __pyx_v_out = ((PyArrayObject *)values[0]); __pyx_v_counts = ((PyArrayObject *)values[1]); __pyx_v_values = ((PyArrayObject *)values[2]); __pyx_v_bins = ((PyArrayObject *)values[3]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("group_var_bin_float64", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6000; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.group_var_bin_float64", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_5numpy_ndarray, 1, "out", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6000; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_counts), __pyx_ptype_5numpy_ndarray, 1, "counts", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6001; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6002; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_bins), __pyx_ptype_5numpy_ndarray, 1, "bins", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6003; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_422group_var_bin_float64(__pyx_self, __pyx_v_out, __pyx_v_counts, __pyx_v_values, __pyx_v_bins); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":6000 * @cython.wraparound(False) * @cython.boundscheck(False) * def group_var_bin_float64(ndarray[float64_t, ndim=2] out, # <<<<<<<<<<<<<< * ndarray[int64_t] counts, * ndarray[float64_t, ndim=2] values, */ static PyObject *__pyx_pf_6pandas_5algos_422group_var_bin_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_out, PyArrayObject *__pyx_v_counts, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_bins) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_N; Py_ssize_t __pyx_v_K; Py_ssize_t __pyx_v_ngroups; Py_ssize_t __pyx_v_b; __pyx_t_5numpy_float64_t __pyx_v_val; __pyx_t_5numpy_float64_t __pyx_v_ct; PyArrayObject *__pyx_v_nobs = 0; PyArrayObject *__pyx_v_sumx = 0; PyArrayObject *__pyx_v_sumxx = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_bins; __Pyx_Buffer __pyx_pybuffer_bins; __Pyx_LocalBuf_ND __pyx_pybuffernd_counts; __Pyx_Buffer __pyx_pybuffer_counts; __Pyx_LocalBuf_ND __pyx_pybuffernd_nobs; __Pyx_Buffer __pyx_pybuffer_nobs; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_sumx; __Pyx_Buffer __pyx_pybuffer_sumx; __Pyx_LocalBuf_ND __pyx_pybuffernd_sumxx; __Pyx_Buffer __pyx_pybuffer_sumxx; __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; PyArrayObject *__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; Py_ssize_t __pyx_t_11; int __pyx_t_12; PyObject *__pyx_t_13 = NULL; PyObject *(*__pyx_t_14)(PyObject *); Py_ssize_t __pyx_t_15; int __pyx_t_16; int __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; long __pyx_t_30; Py_ssize_t __pyx_t_31; long __pyx_t_32; Py_ssize_t __pyx_t_33; long __pyx_t_34; Py_ssize_t __pyx_t_35; long __pyx_t_36; Py_ssize_t __pyx_t_37; Py_ssize_t __pyx_t_38; Py_ssize_t __pyx_t_39; Py_ssize_t __pyx_t_40; Py_ssize_t __pyx_t_41; Py_ssize_t __pyx_t_42; Py_ssize_t __pyx_t_43; Py_ssize_t __pyx_t_44; Py_ssize_t __pyx_t_45; Py_ssize_t __pyx_t_46; Py_ssize_t __pyx_t_47; Py_ssize_t __pyx_t_48; __pyx_t_5numpy_float64_t __pyx_t_49; __pyx_t_5numpy_float64_t __pyx_t_50; Py_ssize_t __pyx_t_51; Py_ssize_t __pyx_t_52; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("group_var_bin_float64", 0); __pyx_pybuffer_nobs.pybuffer.buf = NULL; __pyx_pybuffer_nobs.refcount = 0; __pyx_pybuffernd_nobs.data = NULL; __pyx_pybuffernd_nobs.rcbuffer = &__pyx_pybuffer_nobs; __pyx_pybuffer_sumx.pybuffer.buf = NULL; __pyx_pybuffer_sumx.refcount = 0; __pyx_pybuffernd_sumx.data = NULL; __pyx_pybuffernd_sumx.rcbuffer = &__pyx_pybuffer_sumx; __pyx_pybuffer_sumxx.pybuffer.buf = NULL; __pyx_pybuffer_sumxx.refcount = 0; __pyx_pybuffernd_sumxx.data = NULL; __pyx_pybuffernd_sumxx.rcbuffer = &__pyx_pybuffer_sumxx; __pyx_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; __pyx_pybuffer_counts.pybuffer.buf = NULL; __pyx_pybuffer_counts.refcount = 0; __pyx_pybuffernd_counts.data = NULL; __pyx_pybuffernd_counts.rcbuffer = &__pyx_pybuffer_counts; __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_bins.pybuffer.buf = NULL; __pyx_pybuffer_bins.refcount = 0; __pyx_pybuffernd_bins.data = NULL; __pyx_pybuffernd_bins.rcbuffer = &__pyx_pybuffer_bins; { __Pyx_BufFmt_StackElem __pyx_stack[1]; 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, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6000; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; __pyx_pybuffernd_out.diminfo[1].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_out.diminfo[1].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[1]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_counts.rcbuffer->pybuffer, (PyObject*)__pyx_v_counts, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6000; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_counts.diminfo[0].strides = __pyx_pybuffernd_counts.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_counts.diminfo[0].shape = __pyx_pybuffernd_counts.rcbuffer->pybuffer.shape[0]; { __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, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6000; __pyx_clineno = __LINE__; goto __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_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_bins.rcbuffer->pybuffer, (PyObject*)__pyx_v_bins, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6000; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_bins.diminfo[0].strides = __pyx_pybuffernd_bins.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_bins.diminfo[0].shape = __pyx_pybuffernd_bins.rcbuffer->pybuffer.shape[0]; /* "pandas/src/generated.pyx":6010 * ndarray[float64_t, ndim=2] nobs, sumx, sumxx * * nobs = np.zeros_like(out) # <<<<<<<<<<<<<< * sumx = np.zeros_like(out) * sumxx = np.zeros_like(out) */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6010; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s__zeros_like); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6010; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 6010; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)__pyx_v_out)); PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_out)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out)); __pyx_t_3 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6010; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(((PyObject *)__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_filename = __pyx_f[2]; __pyx_lineno = 6010; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_4 = ((PyArrayObject *)__pyx_t_3); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer); __pyx_t_5 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer, (PyObject*)__pyx_t_4, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_nobs.rcbuffer->pybuffer, (PyObject*)__pyx_v_nobs, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_pybuffernd_nobs.diminfo[0].strides = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_nobs.diminfo[0].shape = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_nobs.diminfo[1].strides = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_nobs.diminfo[1].shape = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.shape[1]; if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6010; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_4 = 0; __pyx_v_nobs = ((PyArrayObject *)__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/generated.pyx":6011 * * nobs = np.zeros_like(out) * sumx = np.zeros_like(out) # <<<<<<<<<<<<<< * sumxx = np.zeros_like(out) * */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6011; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s__zeros_like); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6011; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6011; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(((PyObject *)__pyx_v_out)); PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_v_out)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out)); __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6011; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(((PyObject *)__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_filename = __pyx_f[2]; __pyx_lineno = 6011; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_4 = ((PyArrayObject *)__pyx_t_2); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_sumx.rcbuffer->pybuffer); __pyx_t_5 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_sumx.rcbuffer->pybuffer, (PyObject*)__pyx_t_4, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_sumx.rcbuffer->pybuffer, (PyObject*)__pyx_v_sumx, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_pybuffernd_sumx.diminfo[0].strides = __pyx_pybuffernd_sumx.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_sumx.diminfo[0].shape = __pyx_pybuffernd_sumx.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_sumx.diminfo[1].strides = __pyx_pybuffernd_sumx.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_sumx.diminfo[1].shape = __pyx_pybuffernd_sumx.rcbuffer->pybuffer.shape[1]; if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6011; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_4 = 0; __pyx_v_sumx = ((PyArrayObject *)__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":6012 * nobs = np.zeros_like(out) * sumx = np.zeros_like(out) * sumxx = np.zeros_like(out) # <<<<<<<<<<<<<< * * if bins[len(bins) - 1] == len(values): */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6012; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__zeros_like); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6012; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6012; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(((PyObject *)__pyx_v_out)); PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_out)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out)); __pyx_t_1 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6012; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6012; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_4 = ((PyArrayObject *)__pyx_t_1); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_sumxx.rcbuffer->pybuffer); __pyx_t_5 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_sumxx.rcbuffer->pybuffer, (PyObject*)__pyx_t_4, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_sumxx.rcbuffer->pybuffer, (PyObject*)__pyx_v_sumxx, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_pybuffernd_sumxx.diminfo[0].strides = __pyx_pybuffernd_sumxx.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_sumxx.diminfo[0].shape = __pyx_pybuffernd_sumxx.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_sumxx.diminfo[1].strides = __pyx_pybuffernd_sumxx.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_sumxx.diminfo[1].shape = __pyx_pybuffernd_sumxx.rcbuffer->pybuffer.shape[1]; if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6012; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_4 = 0; __pyx_v_sumxx = ((PyArrayObject *)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/generated.pyx":6014 * sumxx = np.zeros_like(out) * * if bins[len(bins) - 1] == len(values): # <<<<<<<<<<<<<< * ngroups = len(bins) * else: */ __pyx_t_9 = PyObject_Length(((PyObject *)__pyx_v_bins)); if (unlikely(__pyx_t_9 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6014; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_10 = (__pyx_t_9 - 1); __pyx_t_11 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6014; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_12 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_bins.rcbuffer->pybuffer.buf, __pyx_t_10, __pyx_pybuffernd_bins.diminfo[0].strides)) == __pyx_t_11) != 0); if (__pyx_t_12) { /* "pandas/src/generated.pyx":6015 * * if bins[len(bins) - 1] == len(values): * ngroups = len(bins) # <<<<<<<<<<<<<< * else: * ngroups = len(bins) + 1 */ __pyx_t_11 = PyObject_Length(((PyObject *)__pyx_v_bins)); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6015; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_ngroups = __pyx_t_11; goto __pyx_L3; } /*else*/ { /* "pandas/src/generated.pyx":6017 * ngroups = len(bins) * else: * ngroups = len(bins) + 1 # <<<<<<<<<<<<<< * * N, K = ( values).shape */ __pyx_t_11 = PyObject_Length(((PyObject *)__pyx_v_bins)); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6017; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_ngroups = (__pyx_t_11 + 1); } __pyx_L3:; /* "pandas/src/generated.pyx":6019 * ngroups = len(bins) + 1 * * N, K = ( values).shape # <<<<<<<<<<<<<< * * b = 0 */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_values), __pyx_n_s__shape); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6019; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) { PyObject* sequence = __pyx_t_1; #if CYTHON_COMPILING_IN_CPYTHON Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6019; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1); } else { __pyx_t_2 = PyList_GET_ITEM(sequence, 0); __pyx_t_3 = PyList_GET_ITEM(sequence, 1); } __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); #else __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6019; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6019; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } else { Py_ssize_t index = -1; __pyx_t_13 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6019; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_14 = Py_TYPE(__pyx_t_13)->tp_iternext; index = 0; __pyx_t_2 = __pyx_t_14(__pyx_t_13); if (unlikely(!__pyx_t_2)) goto __pyx_L4_unpacking_failed; __Pyx_GOTREF(__pyx_t_2); index = 1; __pyx_t_3 = __pyx_t_14(__pyx_t_13); if (unlikely(!__pyx_t_3)) goto __pyx_L4_unpacking_failed; __Pyx_GOTREF(__pyx_t_3); if (__Pyx_IternextUnpackEndCheck(__pyx_t_14(__pyx_t_13), 2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6019; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_14 = NULL; __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; goto __pyx_L5_unpacking_done; __pyx_L4_unpacking_failed:; __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_14 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6019; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_L5_unpacking_done:; } __pyx_t_11 = __Pyx_PyIndex_AsSsize_t(__pyx_t_2); if (unlikely((__pyx_t_11 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6019; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_9 = __Pyx_PyIndex_AsSsize_t(__pyx_t_3); if (unlikely((__pyx_t_9 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6019; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_N = __pyx_t_11; __pyx_v_K = __pyx_t_9; /* "pandas/src/generated.pyx":6021 * N, K = ( values).shape * * b = 0 # <<<<<<<<<<<<<< * if K > 1: * for i in range(N): */ __pyx_v_b = 0; /* "pandas/src/generated.pyx":6022 * * b = 0 * if K > 1: # <<<<<<<<<<<<<< * for i in range(N): * while b < ngroups - 1 and i >= bins[b]: */ __pyx_t_12 = ((__pyx_v_K > 1) != 0); if (__pyx_t_12) { /* "pandas/src/generated.pyx":6023 * b = 0 * if K > 1: * for i in range(N): # <<<<<<<<<<<<<< * while b < ngroups - 1 and i >= bins[b]: * b += 1 */ __pyx_t_9 = __pyx_v_N; for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_9; __pyx_t_11+=1) { __pyx_v_i = __pyx_t_11; /* "pandas/src/generated.pyx":6024 * if K > 1: * for i in range(N): * while b < ngroups - 1 and i >= bins[b]: # <<<<<<<<<<<<<< * b += 1 * */ while (1) { __pyx_t_12 = ((__pyx_v_b < (__pyx_v_ngroups - 1)) != 0); if (__pyx_t_12) { __pyx_t_15 = __pyx_v_b; __pyx_t_16 = ((__pyx_v_i >= (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_bins.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_bins.diminfo[0].strides))) != 0); __pyx_t_17 = __pyx_t_16; } else { __pyx_t_17 = __pyx_t_12; } if (!__pyx_t_17) break; /* "pandas/src/generated.pyx":6025 * for i in range(N): * while b < ngroups - 1 and i >= bins[b]: * b += 1 # <<<<<<<<<<<<<< * * counts[b] += 1 */ __pyx_v_b = (__pyx_v_b + 1); } /* "pandas/src/generated.pyx":6027 * b += 1 * * counts[b] += 1 # <<<<<<<<<<<<<< * * for j in range(K): */ __pyx_t_18 = __pyx_v_b; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_counts.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_counts.diminfo[0].strides) += 1; /* "pandas/src/generated.pyx":6029 * counts[b] += 1 * * for j in range(K): # <<<<<<<<<<<<<< * val = values[i, j] * */ __pyx_t_19 = __pyx_v_K; for (__pyx_t_20 = 0; __pyx_t_20 < __pyx_t_19; __pyx_t_20+=1) { __pyx_v_j = __pyx_t_20; /* "pandas/src/generated.pyx":6030 * * for j in range(K): * val = values[i, j] # <<<<<<<<<<<<<< * * # not nan */ __pyx_t_21 = __pyx_v_i; __pyx_t_22 = __pyx_v_j; __pyx_v_val = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_22, __pyx_pybuffernd_values.diminfo[1].strides)); /* "pandas/src/generated.pyx":6033 * * # not nan * if val == val: # <<<<<<<<<<<<<< * nobs[b, j] += 1 * sumx[b, j] += val */ __pyx_t_17 = ((__pyx_v_val == __pyx_v_val) != 0); if (__pyx_t_17) { /* "pandas/src/generated.pyx":6034 * # not nan * if val == val: * nobs[b, j] += 1 # <<<<<<<<<<<<<< * sumx[b, j] += val * sumxx[b, j] += val * val */ __pyx_t_23 = __pyx_v_b; __pyx_t_24 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_nobs.rcbuffer->pybuffer.buf, __pyx_t_23, __pyx_pybuffernd_nobs.diminfo[0].strides, __pyx_t_24, __pyx_pybuffernd_nobs.diminfo[1].strides) += 1.0; /* "pandas/src/generated.pyx":6035 * if val == val: * nobs[b, j] += 1 * sumx[b, j] += val # <<<<<<<<<<<<<< * sumxx[b, j] += val * val * else: */ __pyx_t_25 = __pyx_v_b; __pyx_t_26 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_sumx.rcbuffer->pybuffer.buf, __pyx_t_25, __pyx_pybuffernd_sumx.diminfo[0].strides, __pyx_t_26, __pyx_pybuffernd_sumx.diminfo[1].strides) += __pyx_v_val; /* "pandas/src/generated.pyx":6036 * nobs[b, j] += 1 * sumx[b, j] += val * sumxx[b, j] += val * val # <<<<<<<<<<<<<< * else: * for i in range(N): */ __pyx_t_27 = __pyx_v_b; __pyx_t_28 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_sumxx.rcbuffer->pybuffer.buf, __pyx_t_27, __pyx_pybuffernd_sumxx.diminfo[0].strides, __pyx_t_28, __pyx_pybuffernd_sumxx.diminfo[1].strides) += (__pyx_v_val * __pyx_v_val); goto __pyx_L13; } __pyx_L13:; } } goto __pyx_L6; } /*else*/ { /* "pandas/src/generated.pyx":6038 * sumxx[b, j] += val * val * else: * for i in range(N): # <<<<<<<<<<<<<< * while b < ngroups - 1 and i >= bins[b]: * b += 1 */ __pyx_t_9 = __pyx_v_N; for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_9; __pyx_t_11+=1) { __pyx_v_i = __pyx_t_11; /* "pandas/src/generated.pyx":6039 * else: * for i in range(N): * while b < ngroups - 1 and i >= bins[b]: # <<<<<<<<<<<<<< * b += 1 * */ while (1) { __pyx_t_17 = ((__pyx_v_b < (__pyx_v_ngroups - 1)) != 0); if (__pyx_t_17) { __pyx_t_19 = __pyx_v_b; __pyx_t_12 = ((__pyx_v_i >= (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_bins.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_bins.diminfo[0].strides))) != 0); __pyx_t_16 = __pyx_t_12; } else { __pyx_t_16 = __pyx_t_17; } if (!__pyx_t_16) break; /* "pandas/src/generated.pyx":6040 * for i in range(N): * while b < ngroups - 1 and i >= bins[b]: * b += 1 # <<<<<<<<<<<<<< * * counts[b] += 1 */ __pyx_v_b = (__pyx_v_b + 1); } /* "pandas/src/generated.pyx":6042 * b += 1 * * counts[b] += 1 # <<<<<<<<<<<<<< * val = values[i, 0] * */ __pyx_t_20 = __pyx_v_b; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_counts.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_counts.diminfo[0].strides) += 1; /* "pandas/src/generated.pyx":6043 * * counts[b] += 1 * val = values[i, 0] # <<<<<<<<<<<<<< * * # not nan */ __pyx_t_29 = __pyx_v_i; __pyx_t_30 = 0; __pyx_v_val = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_29, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_30, __pyx_pybuffernd_values.diminfo[1].strides)); /* "pandas/src/generated.pyx":6046 * * # not nan * if val == val: # <<<<<<<<<<<<<< * nobs[b, 0] += 1 * sumx[b, 0] += val */ __pyx_t_16 = ((__pyx_v_val == __pyx_v_val) != 0); if (__pyx_t_16) { /* "pandas/src/generated.pyx":6047 * # not nan * if val == val: * nobs[b, 0] += 1 # <<<<<<<<<<<<<< * sumx[b, 0] += val * sumxx[b, 0] += val * val */ __pyx_t_31 = __pyx_v_b; __pyx_t_32 = 0; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_nobs.rcbuffer->pybuffer.buf, __pyx_t_31, __pyx_pybuffernd_nobs.diminfo[0].strides, __pyx_t_32, __pyx_pybuffernd_nobs.diminfo[1].strides) += 1.0; /* "pandas/src/generated.pyx":6048 * if val == val: * nobs[b, 0] += 1 * sumx[b, 0] += val # <<<<<<<<<<<<<< * sumxx[b, 0] += val * val * */ __pyx_t_33 = __pyx_v_b; __pyx_t_34 = 0; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_sumx.rcbuffer->pybuffer.buf, __pyx_t_33, __pyx_pybuffernd_sumx.diminfo[0].strides, __pyx_t_34, __pyx_pybuffernd_sumx.diminfo[1].strides) += __pyx_v_val; /* "pandas/src/generated.pyx":6049 * nobs[b, 0] += 1 * sumx[b, 0] += val * sumxx[b, 0] += val * val # <<<<<<<<<<<<<< * * for i in range(ngroups): */ __pyx_t_35 = __pyx_v_b; __pyx_t_36 = 0; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_sumxx.rcbuffer->pybuffer.buf, __pyx_t_35, __pyx_pybuffernd_sumxx.diminfo[0].strides, __pyx_t_36, __pyx_pybuffernd_sumxx.diminfo[1].strides) += (__pyx_v_val * __pyx_v_val); goto __pyx_L18; } __pyx_L18:; } } __pyx_L6:; /* "pandas/src/generated.pyx":6051 * sumxx[b, 0] += val * val * * for i in range(ngroups): # <<<<<<<<<<<<<< * for j in range(K): * ct = nobs[i, j] */ __pyx_t_9 = __pyx_v_ngroups; for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_9; __pyx_t_11+=1) { __pyx_v_i = __pyx_t_11; /* "pandas/src/generated.pyx":6052 * * for i in range(ngroups): * for j in range(K): # <<<<<<<<<<<<<< * ct = nobs[i, j] * if ct < 2: */ __pyx_t_37 = __pyx_v_K; for (__pyx_t_38 = 0; __pyx_t_38 < __pyx_t_37; __pyx_t_38+=1) { __pyx_v_j = __pyx_t_38; /* "pandas/src/generated.pyx":6053 * for i in range(ngroups): * for j in range(K): * ct = nobs[i, j] # <<<<<<<<<<<<<< * if ct < 2: * out[i, j] = nan */ __pyx_t_39 = __pyx_v_i; __pyx_t_40 = __pyx_v_j; __pyx_v_ct = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_nobs.rcbuffer->pybuffer.buf, __pyx_t_39, __pyx_pybuffernd_nobs.diminfo[0].strides, __pyx_t_40, __pyx_pybuffernd_nobs.diminfo[1].strides)); /* "pandas/src/generated.pyx":6054 * for j in range(K): * ct = nobs[i, j] * if ct < 2: # <<<<<<<<<<<<<< * out[i, j] = nan * else: */ __pyx_t_16 = ((__pyx_v_ct < 2.0) != 0); if (__pyx_t_16) { /* "pandas/src/generated.pyx":6055 * ct = nobs[i, j] * if ct < 2: * out[i, j] = nan # <<<<<<<<<<<<<< * else: * out[i, j] = ((ct * sumxx[i, j] - sumx[i, j] * sumx[i, j]) / */ __pyx_t_41 = __pyx_v_i; __pyx_t_42 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_41, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_42, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_6pandas_5algos_nan; goto __pyx_L23; } /*else*/ { /* "pandas/src/generated.pyx":6057 * out[i, j] = nan * else: * out[i, j] = ((ct * sumxx[i, j] - sumx[i, j] * sumx[i, j]) / # <<<<<<<<<<<<<< * (ct * ct - ct)) * @cython.wraparound(False) */ __pyx_t_43 = __pyx_v_i; __pyx_t_44 = __pyx_v_j; __pyx_t_45 = __pyx_v_i; __pyx_t_46 = __pyx_v_j; __pyx_t_47 = __pyx_v_i; __pyx_t_48 = __pyx_v_j; __pyx_t_49 = ((__pyx_v_ct * (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_sumxx.rcbuffer->pybuffer.buf, __pyx_t_43, __pyx_pybuffernd_sumxx.diminfo[0].strides, __pyx_t_44, __pyx_pybuffernd_sumxx.diminfo[1].strides))) - ((*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_sumx.rcbuffer->pybuffer.buf, __pyx_t_45, __pyx_pybuffernd_sumx.diminfo[0].strides, __pyx_t_46, __pyx_pybuffernd_sumx.diminfo[1].strides)) * (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_sumx.rcbuffer->pybuffer.buf, __pyx_t_47, __pyx_pybuffernd_sumx.diminfo[0].strides, __pyx_t_48, __pyx_pybuffernd_sumx.diminfo[1].strides)))); /* "pandas/src/generated.pyx":6058 * else: * out[i, j] = ((ct * sumxx[i, j] - sumx[i, j] * sumx[i, j]) / * (ct * ct - ct)) # <<<<<<<<<<<<<< * @cython.wraparound(False) * @cython.boundscheck(False) */ __pyx_t_50 = ((__pyx_v_ct * __pyx_v_ct) - __pyx_v_ct); if (unlikely(__pyx_t_50 == 0)) { #ifdef WITH_THREAD PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure(); #endif PyErr_Format(PyExc_ZeroDivisionError, "float division"); #ifdef WITH_THREAD PyGILState_Release(__pyx_gilstate_save); #endif {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6057; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } /* "pandas/src/generated.pyx":6057 * out[i, j] = nan * else: * out[i, j] = ((ct * sumxx[i, j] - sumx[i, j] * sumx[i, j]) / # <<<<<<<<<<<<<< * (ct * ct - ct)) * @cython.wraparound(False) */ __pyx_t_51 = __pyx_v_i; __pyx_t_52 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_51, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_52, __pyx_pybuffernd_out.diminfo[1].strides) = (__pyx_t_49 / __pyx_t_50); } __pyx_L23:; } } __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_13); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_bins.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_counts.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_sumx.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_sumxx.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.group_var_bin_float64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_bins.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_counts.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_sumx.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_sumxx.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_nobs); __Pyx_XDECREF((PyObject *)__pyx_v_sumx); __Pyx_XDECREF((PyObject *)__pyx_v_sumxx); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_425group_var_bin_float32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_425group_var_bin_float32 = {__Pyx_NAMESTR("group_var_bin_float32"), (PyCFunction)__pyx_pw_6pandas_5algos_425group_var_bin_float32, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_425group_var_bin_float32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_out = 0; PyArrayObject *__pyx_v_counts = 0; PyArrayObject *__pyx_v_values = 0; PyArrayObject *__pyx_v_bins = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("group_var_bin_float32 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__out,&__pyx_n_s__counts,&__pyx_n_s__values,&__pyx_n_s__bins,0}; PyObject* values[4] = {0,0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__out)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__counts)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("group_var_bin_float32", 1, 4, 4, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6061; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__values)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("group_var_bin_float32", 1, 4, 4, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6061; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__bins)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("group_var_bin_float32", 1, 4, 4, 3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6061; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "group_var_bin_float32") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6061; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 4) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[3] = PyTuple_GET_ITEM(__pyx_args, 3); } __pyx_v_out = ((PyArrayObject *)values[0]); __pyx_v_counts = ((PyArrayObject *)values[1]); __pyx_v_values = ((PyArrayObject *)values[2]); __pyx_v_bins = ((PyArrayObject *)values[3]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("group_var_bin_float32", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6061; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.group_var_bin_float32", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_5numpy_ndarray, 1, "out", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6061; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_counts), __pyx_ptype_5numpy_ndarray, 1, "counts", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6062; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6063; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_bins), __pyx_ptype_5numpy_ndarray, 1, "bins", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6064; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_424group_var_bin_float32(__pyx_self, __pyx_v_out, __pyx_v_counts, __pyx_v_values, __pyx_v_bins); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":6061 * @cython.wraparound(False) * @cython.boundscheck(False) * def group_var_bin_float32(ndarray[float32_t, ndim=2] out, # <<<<<<<<<<<<<< * ndarray[int64_t] counts, * ndarray[float32_t, ndim=2] values, */ static PyObject *__pyx_pf_6pandas_5algos_424group_var_bin_float32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_out, PyArrayObject *__pyx_v_counts, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_bins) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_N; Py_ssize_t __pyx_v_K; Py_ssize_t __pyx_v_ngroups; Py_ssize_t __pyx_v_b; __pyx_t_5numpy_float32_t __pyx_v_val; __pyx_t_5numpy_float32_t __pyx_v_ct; PyArrayObject *__pyx_v_nobs = 0; PyArrayObject *__pyx_v_sumx = 0; PyArrayObject *__pyx_v_sumxx = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_bins; __Pyx_Buffer __pyx_pybuffer_bins; __Pyx_LocalBuf_ND __pyx_pybuffernd_counts; __Pyx_Buffer __pyx_pybuffer_counts; __Pyx_LocalBuf_ND __pyx_pybuffernd_nobs; __Pyx_Buffer __pyx_pybuffer_nobs; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_sumx; __Pyx_Buffer __pyx_pybuffer_sumx; __Pyx_LocalBuf_ND __pyx_pybuffernd_sumxx; __Pyx_Buffer __pyx_pybuffer_sumxx; __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; PyArrayObject *__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; Py_ssize_t __pyx_t_11; int __pyx_t_12; PyObject *__pyx_t_13 = NULL; PyObject *(*__pyx_t_14)(PyObject *); Py_ssize_t __pyx_t_15; int __pyx_t_16; int __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; long __pyx_t_30; Py_ssize_t __pyx_t_31; long __pyx_t_32; Py_ssize_t __pyx_t_33; long __pyx_t_34; Py_ssize_t __pyx_t_35; long __pyx_t_36; Py_ssize_t __pyx_t_37; Py_ssize_t __pyx_t_38; Py_ssize_t __pyx_t_39; Py_ssize_t __pyx_t_40; Py_ssize_t __pyx_t_41; Py_ssize_t __pyx_t_42; Py_ssize_t __pyx_t_43; Py_ssize_t __pyx_t_44; Py_ssize_t __pyx_t_45; Py_ssize_t __pyx_t_46; Py_ssize_t __pyx_t_47; Py_ssize_t __pyx_t_48; __pyx_t_5numpy_float32_t __pyx_t_49; __pyx_t_5numpy_float32_t __pyx_t_50; Py_ssize_t __pyx_t_51; Py_ssize_t __pyx_t_52; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("group_var_bin_float32", 0); __pyx_pybuffer_nobs.pybuffer.buf = NULL; __pyx_pybuffer_nobs.refcount = 0; __pyx_pybuffernd_nobs.data = NULL; __pyx_pybuffernd_nobs.rcbuffer = &__pyx_pybuffer_nobs; __pyx_pybuffer_sumx.pybuffer.buf = NULL; __pyx_pybuffer_sumx.refcount = 0; __pyx_pybuffernd_sumx.data = NULL; __pyx_pybuffernd_sumx.rcbuffer = &__pyx_pybuffer_sumx; __pyx_pybuffer_sumxx.pybuffer.buf = NULL; __pyx_pybuffer_sumxx.refcount = 0; __pyx_pybuffernd_sumxx.data = NULL; __pyx_pybuffernd_sumxx.rcbuffer = &__pyx_pybuffer_sumxx; __pyx_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; __pyx_pybuffer_counts.pybuffer.buf = NULL; __pyx_pybuffer_counts.refcount = 0; __pyx_pybuffernd_counts.data = NULL; __pyx_pybuffernd_counts.rcbuffer = &__pyx_pybuffer_counts; __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_bins.pybuffer.buf = NULL; __pyx_pybuffer_bins.refcount = 0; __pyx_pybuffernd_bins.data = NULL; __pyx_pybuffernd_bins.rcbuffer = &__pyx_pybuffer_bins; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_v_out, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6061; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; __pyx_pybuffernd_out.diminfo[1].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_out.diminfo[1].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[1]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_counts.rcbuffer->pybuffer, (PyObject*)__pyx_v_counts, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6061; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_counts.diminfo[0].strides = __pyx_pybuffernd_counts.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_counts.diminfo[0].shape = __pyx_pybuffernd_counts.rcbuffer->pybuffer.shape[0]; { __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_float32_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6061; __pyx_clineno = __LINE__; goto __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_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_bins.rcbuffer->pybuffer, (PyObject*)__pyx_v_bins, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6061; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_bins.diminfo[0].strides = __pyx_pybuffernd_bins.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_bins.diminfo[0].shape = __pyx_pybuffernd_bins.rcbuffer->pybuffer.shape[0]; /* "pandas/src/generated.pyx":6071 * ndarray[float32_t, ndim=2] nobs, sumx, sumxx * * nobs = np.zeros_like(out) # <<<<<<<<<<<<<< * sumx = np.zeros_like(out) * sumxx = np.zeros_like(out) */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6071; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s__zeros_like); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6071; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 6071; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)__pyx_v_out)); PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_out)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out)); __pyx_t_3 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6071; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(((PyObject *)__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_filename = __pyx_f[2]; __pyx_lineno = 6071; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_4 = ((PyArrayObject *)__pyx_t_3); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer); __pyx_t_5 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer, (PyObject*)__pyx_t_4, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_nobs.rcbuffer->pybuffer, (PyObject*)__pyx_v_nobs, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_pybuffernd_nobs.diminfo[0].strides = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_nobs.diminfo[0].shape = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_nobs.diminfo[1].strides = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_nobs.diminfo[1].shape = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.shape[1]; if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6071; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_4 = 0; __pyx_v_nobs = ((PyArrayObject *)__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/generated.pyx":6072 * * nobs = np.zeros_like(out) * sumx = np.zeros_like(out) # <<<<<<<<<<<<<< * sumxx = np.zeros_like(out) * */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6072; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s__zeros_like); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6072; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6072; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(((PyObject *)__pyx_v_out)); PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_v_out)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out)); __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6072; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(((PyObject *)__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_filename = __pyx_f[2]; __pyx_lineno = 6072; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_4 = ((PyArrayObject *)__pyx_t_2); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_sumx.rcbuffer->pybuffer); __pyx_t_5 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_sumx.rcbuffer->pybuffer, (PyObject*)__pyx_t_4, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_sumx.rcbuffer->pybuffer, (PyObject*)__pyx_v_sumx, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_pybuffernd_sumx.diminfo[0].strides = __pyx_pybuffernd_sumx.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_sumx.diminfo[0].shape = __pyx_pybuffernd_sumx.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_sumx.diminfo[1].strides = __pyx_pybuffernd_sumx.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_sumx.diminfo[1].shape = __pyx_pybuffernd_sumx.rcbuffer->pybuffer.shape[1]; if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6072; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_4 = 0; __pyx_v_sumx = ((PyArrayObject *)__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":6073 * nobs = np.zeros_like(out) * sumx = np.zeros_like(out) * sumxx = np.zeros_like(out) # <<<<<<<<<<<<<< * * if bins[len(bins) - 1] == len(values): */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6073; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__zeros_like); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6073; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6073; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(((PyObject *)__pyx_v_out)); PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_out)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out)); __pyx_t_1 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6073; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6073; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_4 = ((PyArrayObject *)__pyx_t_1); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_sumxx.rcbuffer->pybuffer); __pyx_t_5 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_sumxx.rcbuffer->pybuffer, (PyObject*)__pyx_t_4, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_sumxx.rcbuffer->pybuffer, (PyObject*)__pyx_v_sumxx, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_pybuffernd_sumxx.diminfo[0].strides = __pyx_pybuffernd_sumxx.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_sumxx.diminfo[0].shape = __pyx_pybuffernd_sumxx.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_sumxx.diminfo[1].strides = __pyx_pybuffernd_sumxx.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_sumxx.diminfo[1].shape = __pyx_pybuffernd_sumxx.rcbuffer->pybuffer.shape[1]; if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6073; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_4 = 0; __pyx_v_sumxx = ((PyArrayObject *)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/generated.pyx":6075 * sumxx = np.zeros_like(out) * * if bins[len(bins) - 1] == len(values): # <<<<<<<<<<<<<< * ngroups = len(bins) * else: */ __pyx_t_9 = PyObject_Length(((PyObject *)__pyx_v_bins)); if (unlikely(__pyx_t_9 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6075; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_10 = (__pyx_t_9 - 1); __pyx_t_11 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6075; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_12 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_bins.rcbuffer->pybuffer.buf, __pyx_t_10, __pyx_pybuffernd_bins.diminfo[0].strides)) == __pyx_t_11) != 0); if (__pyx_t_12) { /* "pandas/src/generated.pyx":6076 * * if bins[len(bins) - 1] == len(values): * ngroups = len(bins) # <<<<<<<<<<<<<< * else: * ngroups = len(bins) + 1 */ __pyx_t_11 = PyObject_Length(((PyObject *)__pyx_v_bins)); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6076; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_ngroups = __pyx_t_11; goto __pyx_L3; } /*else*/ { /* "pandas/src/generated.pyx":6078 * ngroups = len(bins) * else: * ngroups = len(bins) + 1 # <<<<<<<<<<<<<< * * N, K = ( values).shape */ __pyx_t_11 = PyObject_Length(((PyObject *)__pyx_v_bins)); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6078; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_ngroups = (__pyx_t_11 + 1); } __pyx_L3:; /* "pandas/src/generated.pyx":6080 * ngroups = len(bins) + 1 * * N, K = ( values).shape # <<<<<<<<<<<<<< * * b = 0 */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_values), __pyx_n_s__shape); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6080; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) { PyObject* sequence = __pyx_t_1; #if CYTHON_COMPILING_IN_CPYTHON Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6080; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1); } else { __pyx_t_2 = PyList_GET_ITEM(sequence, 0); __pyx_t_3 = PyList_GET_ITEM(sequence, 1); } __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); #else __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6080; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6080; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } else { Py_ssize_t index = -1; __pyx_t_13 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6080; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_14 = Py_TYPE(__pyx_t_13)->tp_iternext; index = 0; __pyx_t_2 = __pyx_t_14(__pyx_t_13); if (unlikely(!__pyx_t_2)) goto __pyx_L4_unpacking_failed; __Pyx_GOTREF(__pyx_t_2); index = 1; __pyx_t_3 = __pyx_t_14(__pyx_t_13); if (unlikely(!__pyx_t_3)) goto __pyx_L4_unpacking_failed; __Pyx_GOTREF(__pyx_t_3); if (__Pyx_IternextUnpackEndCheck(__pyx_t_14(__pyx_t_13), 2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6080; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_14 = NULL; __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; goto __pyx_L5_unpacking_done; __pyx_L4_unpacking_failed:; __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_14 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6080; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_L5_unpacking_done:; } __pyx_t_11 = __Pyx_PyIndex_AsSsize_t(__pyx_t_2); if (unlikely((__pyx_t_11 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6080; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_9 = __Pyx_PyIndex_AsSsize_t(__pyx_t_3); if (unlikely((__pyx_t_9 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6080; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_N = __pyx_t_11; __pyx_v_K = __pyx_t_9; /* "pandas/src/generated.pyx":6082 * N, K = ( values).shape * * b = 0 # <<<<<<<<<<<<<< * if K > 1: * for i in range(N): */ __pyx_v_b = 0; /* "pandas/src/generated.pyx":6083 * * b = 0 * if K > 1: # <<<<<<<<<<<<<< * for i in range(N): * while b < ngroups - 1 and i >= bins[b]: */ __pyx_t_12 = ((__pyx_v_K > 1) != 0); if (__pyx_t_12) { /* "pandas/src/generated.pyx":6084 * b = 0 * if K > 1: * for i in range(N): # <<<<<<<<<<<<<< * while b < ngroups - 1 and i >= bins[b]: * b += 1 */ __pyx_t_9 = __pyx_v_N; for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_9; __pyx_t_11+=1) { __pyx_v_i = __pyx_t_11; /* "pandas/src/generated.pyx":6085 * if K > 1: * for i in range(N): * while b < ngroups - 1 and i >= bins[b]: # <<<<<<<<<<<<<< * b += 1 * */ while (1) { __pyx_t_12 = ((__pyx_v_b < (__pyx_v_ngroups - 1)) != 0); if (__pyx_t_12) { __pyx_t_15 = __pyx_v_b; __pyx_t_16 = ((__pyx_v_i >= (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_bins.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_bins.diminfo[0].strides))) != 0); __pyx_t_17 = __pyx_t_16; } else { __pyx_t_17 = __pyx_t_12; } if (!__pyx_t_17) break; /* "pandas/src/generated.pyx":6086 * for i in range(N): * while b < ngroups - 1 and i >= bins[b]: * b += 1 # <<<<<<<<<<<<<< * * counts[b] += 1 */ __pyx_v_b = (__pyx_v_b + 1); } /* "pandas/src/generated.pyx":6088 * b += 1 * * counts[b] += 1 # <<<<<<<<<<<<<< * * for j in range(K): */ __pyx_t_18 = __pyx_v_b; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_counts.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_counts.diminfo[0].strides) += 1; /* "pandas/src/generated.pyx":6090 * counts[b] += 1 * * for j in range(K): # <<<<<<<<<<<<<< * val = values[i, j] * */ __pyx_t_19 = __pyx_v_K; for (__pyx_t_20 = 0; __pyx_t_20 < __pyx_t_19; __pyx_t_20+=1) { __pyx_v_j = __pyx_t_20; /* "pandas/src/generated.pyx":6091 * * for j in range(K): * val = values[i, j] # <<<<<<<<<<<<<< * * # not nan */ __pyx_t_21 = __pyx_v_i; __pyx_t_22 = __pyx_v_j; __pyx_v_val = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_22, __pyx_pybuffernd_values.diminfo[1].strides)); /* "pandas/src/generated.pyx":6094 * * # not nan * if val == val: # <<<<<<<<<<<<<< * nobs[b, j] += 1 * sumx[b, j] += val */ __pyx_t_17 = ((__pyx_v_val == __pyx_v_val) != 0); if (__pyx_t_17) { /* "pandas/src/generated.pyx":6095 * # not nan * if val == val: * nobs[b, j] += 1 # <<<<<<<<<<<<<< * sumx[b, j] += val * sumxx[b, j] += val * val */ __pyx_t_23 = __pyx_v_b; __pyx_t_24 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_nobs.rcbuffer->pybuffer.buf, __pyx_t_23, __pyx_pybuffernd_nobs.diminfo[0].strides, __pyx_t_24, __pyx_pybuffernd_nobs.diminfo[1].strides) += 1.0; /* "pandas/src/generated.pyx":6096 * if val == val: * nobs[b, j] += 1 * sumx[b, j] += val # <<<<<<<<<<<<<< * sumxx[b, j] += val * val * else: */ __pyx_t_25 = __pyx_v_b; __pyx_t_26 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_sumx.rcbuffer->pybuffer.buf, __pyx_t_25, __pyx_pybuffernd_sumx.diminfo[0].strides, __pyx_t_26, __pyx_pybuffernd_sumx.diminfo[1].strides) += __pyx_v_val; /* "pandas/src/generated.pyx":6097 * nobs[b, j] += 1 * sumx[b, j] += val * sumxx[b, j] += val * val # <<<<<<<<<<<<<< * else: * for i in range(N): */ __pyx_t_27 = __pyx_v_b; __pyx_t_28 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_sumxx.rcbuffer->pybuffer.buf, __pyx_t_27, __pyx_pybuffernd_sumxx.diminfo[0].strides, __pyx_t_28, __pyx_pybuffernd_sumxx.diminfo[1].strides) += (__pyx_v_val * __pyx_v_val); goto __pyx_L13; } __pyx_L13:; } } goto __pyx_L6; } /*else*/ { /* "pandas/src/generated.pyx":6099 * sumxx[b, j] += val * val * else: * for i in range(N): # <<<<<<<<<<<<<< * while b < ngroups - 1 and i >= bins[b]: * b += 1 */ __pyx_t_9 = __pyx_v_N; for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_9; __pyx_t_11+=1) { __pyx_v_i = __pyx_t_11; /* "pandas/src/generated.pyx":6100 * else: * for i in range(N): * while b < ngroups - 1 and i >= bins[b]: # <<<<<<<<<<<<<< * b += 1 * */ while (1) { __pyx_t_17 = ((__pyx_v_b < (__pyx_v_ngroups - 1)) != 0); if (__pyx_t_17) { __pyx_t_19 = __pyx_v_b; __pyx_t_12 = ((__pyx_v_i >= (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_bins.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_bins.diminfo[0].strides))) != 0); __pyx_t_16 = __pyx_t_12; } else { __pyx_t_16 = __pyx_t_17; } if (!__pyx_t_16) break; /* "pandas/src/generated.pyx":6101 * for i in range(N): * while b < ngroups - 1 and i >= bins[b]: * b += 1 # <<<<<<<<<<<<<< * * counts[b] += 1 */ __pyx_v_b = (__pyx_v_b + 1); } /* "pandas/src/generated.pyx":6103 * b += 1 * * counts[b] += 1 # <<<<<<<<<<<<<< * val = values[i, 0] * */ __pyx_t_20 = __pyx_v_b; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_counts.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_counts.diminfo[0].strides) += 1; /* "pandas/src/generated.pyx":6104 * * counts[b] += 1 * val = values[i, 0] # <<<<<<<<<<<<<< * * # not nan */ __pyx_t_29 = __pyx_v_i; __pyx_t_30 = 0; __pyx_v_val = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_29, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_30, __pyx_pybuffernd_values.diminfo[1].strides)); /* "pandas/src/generated.pyx":6107 * * # not nan * if val == val: # <<<<<<<<<<<<<< * nobs[b, 0] += 1 * sumx[b, 0] += val */ __pyx_t_16 = ((__pyx_v_val == __pyx_v_val) != 0); if (__pyx_t_16) { /* "pandas/src/generated.pyx":6108 * # not nan * if val == val: * nobs[b, 0] += 1 # <<<<<<<<<<<<<< * sumx[b, 0] += val * sumxx[b, 0] += val * val */ __pyx_t_31 = __pyx_v_b; __pyx_t_32 = 0; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_nobs.rcbuffer->pybuffer.buf, __pyx_t_31, __pyx_pybuffernd_nobs.diminfo[0].strides, __pyx_t_32, __pyx_pybuffernd_nobs.diminfo[1].strides) += 1.0; /* "pandas/src/generated.pyx":6109 * if val == val: * nobs[b, 0] += 1 * sumx[b, 0] += val # <<<<<<<<<<<<<< * sumxx[b, 0] += val * val * */ __pyx_t_33 = __pyx_v_b; __pyx_t_34 = 0; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_sumx.rcbuffer->pybuffer.buf, __pyx_t_33, __pyx_pybuffernd_sumx.diminfo[0].strides, __pyx_t_34, __pyx_pybuffernd_sumx.diminfo[1].strides) += __pyx_v_val; /* "pandas/src/generated.pyx":6110 * nobs[b, 0] += 1 * sumx[b, 0] += val * sumxx[b, 0] += val * val # <<<<<<<<<<<<<< * * for i in range(ngroups): */ __pyx_t_35 = __pyx_v_b; __pyx_t_36 = 0; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_sumxx.rcbuffer->pybuffer.buf, __pyx_t_35, __pyx_pybuffernd_sumxx.diminfo[0].strides, __pyx_t_36, __pyx_pybuffernd_sumxx.diminfo[1].strides) += (__pyx_v_val * __pyx_v_val); goto __pyx_L18; } __pyx_L18:; } } __pyx_L6:; /* "pandas/src/generated.pyx":6112 * sumxx[b, 0] += val * val * * for i in range(ngroups): # <<<<<<<<<<<<<< * for j in range(K): * ct = nobs[i, j] */ __pyx_t_9 = __pyx_v_ngroups; for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_9; __pyx_t_11+=1) { __pyx_v_i = __pyx_t_11; /* "pandas/src/generated.pyx":6113 * * for i in range(ngroups): * for j in range(K): # <<<<<<<<<<<<<< * ct = nobs[i, j] * if ct < 2: */ __pyx_t_37 = __pyx_v_K; for (__pyx_t_38 = 0; __pyx_t_38 < __pyx_t_37; __pyx_t_38+=1) { __pyx_v_j = __pyx_t_38; /* "pandas/src/generated.pyx":6114 * for i in range(ngroups): * for j in range(K): * ct = nobs[i, j] # <<<<<<<<<<<<<< * if ct < 2: * out[i, j] = nan */ __pyx_t_39 = __pyx_v_i; __pyx_t_40 = __pyx_v_j; __pyx_v_ct = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_nobs.rcbuffer->pybuffer.buf, __pyx_t_39, __pyx_pybuffernd_nobs.diminfo[0].strides, __pyx_t_40, __pyx_pybuffernd_nobs.diminfo[1].strides)); /* "pandas/src/generated.pyx":6115 * for j in range(K): * ct = nobs[i, j] * if ct < 2: # <<<<<<<<<<<<<< * out[i, j] = nan * else: */ __pyx_t_16 = ((__pyx_v_ct < 2.0) != 0); if (__pyx_t_16) { /* "pandas/src/generated.pyx":6116 * ct = nobs[i, j] * if ct < 2: * out[i, j] = nan # <<<<<<<<<<<<<< * else: * out[i, j] = ((ct * sumxx[i, j] - sumx[i, j] * sumx[i, j]) / */ __pyx_t_41 = __pyx_v_i; __pyx_t_42 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_41, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_42, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_6pandas_5algos_nan; goto __pyx_L23; } /*else*/ { /* "pandas/src/generated.pyx":6118 * out[i, j] = nan * else: * out[i, j] = ((ct * sumxx[i, j] - sumx[i, j] * sumx[i, j]) / # <<<<<<<<<<<<<< * (ct * ct - ct)) * */ __pyx_t_43 = __pyx_v_i; __pyx_t_44 = __pyx_v_j; __pyx_t_45 = __pyx_v_i; __pyx_t_46 = __pyx_v_j; __pyx_t_47 = __pyx_v_i; __pyx_t_48 = __pyx_v_j; __pyx_t_49 = ((__pyx_v_ct * (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_sumxx.rcbuffer->pybuffer.buf, __pyx_t_43, __pyx_pybuffernd_sumxx.diminfo[0].strides, __pyx_t_44, __pyx_pybuffernd_sumxx.diminfo[1].strides))) - ((*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_sumx.rcbuffer->pybuffer.buf, __pyx_t_45, __pyx_pybuffernd_sumx.diminfo[0].strides, __pyx_t_46, __pyx_pybuffernd_sumx.diminfo[1].strides)) * (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_sumx.rcbuffer->pybuffer.buf, __pyx_t_47, __pyx_pybuffernd_sumx.diminfo[0].strides, __pyx_t_48, __pyx_pybuffernd_sumx.diminfo[1].strides)))); /* "pandas/src/generated.pyx":6119 * else: * out[i, j] = ((ct * sumxx[i, j] - sumx[i, j] * sumx[i, j]) / * (ct * ct - ct)) # <<<<<<<<<<<<<< * * @cython.wraparound(False) */ __pyx_t_50 = ((__pyx_v_ct * __pyx_v_ct) - __pyx_v_ct); if (unlikely(__pyx_t_50 == 0)) { #ifdef WITH_THREAD PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure(); #endif PyErr_Format(PyExc_ZeroDivisionError, "float division"); #ifdef WITH_THREAD PyGILState_Release(__pyx_gilstate_save); #endif {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6118; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } /* "pandas/src/generated.pyx":6118 * out[i, j] = nan * else: * out[i, j] = ((ct * sumxx[i, j] - sumx[i, j] * sumx[i, j]) / # <<<<<<<<<<<<<< * (ct * ct - ct)) * */ __pyx_t_51 = __pyx_v_i; __pyx_t_52 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_51, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_52, __pyx_pybuffernd_out.diminfo[1].strides) = (__pyx_t_49 / __pyx_t_50); } __pyx_L23:; } } __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_13); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_bins.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_counts.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_sumx.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_sumxx.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.group_var_bin_float32", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_bins.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_counts.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_sumx.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_sumxx.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_nobs); __Pyx_XDECREF((PyObject *)__pyx_v_sumx); __Pyx_XDECREF((PyObject *)__pyx_v_sumxx); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_427group_mean_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_427group_mean_float64 = {__Pyx_NAMESTR("group_mean_float64"), (PyCFunction)__pyx_pw_6pandas_5algos_427group_mean_float64, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_427group_mean_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_out = 0; PyArrayObject *__pyx_v_counts = 0; PyArrayObject *__pyx_v_values = 0; PyArrayObject *__pyx_v_labels = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("group_mean_float64 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__out,&__pyx_n_s__counts,&__pyx_n_s__values,&__pyx_n_s__labels,0}; PyObject* values[4] = {0,0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__out)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__counts)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("group_mean_float64", 1, 4, 4, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6123; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__values)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("group_mean_float64", 1, 4, 4, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6123; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__labels)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("group_mean_float64", 1, 4, 4, 3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6123; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "group_mean_float64") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6123; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 4) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[3] = PyTuple_GET_ITEM(__pyx_args, 3); } __pyx_v_out = ((PyArrayObject *)values[0]); __pyx_v_counts = ((PyArrayObject *)values[1]); __pyx_v_values = ((PyArrayObject *)values[2]); __pyx_v_labels = ((PyArrayObject *)values[3]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("group_mean_float64", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6123; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.group_mean_float64", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_5numpy_ndarray, 1, "out", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6123; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_counts), __pyx_ptype_5numpy_ndarray, 1, "counts", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6124; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6125; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_labels), __pyx_ptype_5numpy_ndarray, 1, "labels", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6126; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_426group_mean_float64(__pyx_self, __pyx_v_out, __pyx_v_counts, __pyx_v_values, __pyx_v_labels); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":6123 * @cython.wraparound(False) * @cython.boundscheck(False) * def group_mean_float64(ndarray[float64_t, ndim=2] out, # <<<<<<<<<<<<<< * ndarray[int64_t] counts, * ndarray[float64_t, ndim=2] values, */ static PyObject *__pyx_pf_6pandas_5algos_426group_mean_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_out, PyArrayObject *__pyx_v_counts, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_labels) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_N; Py_ssize_t __pyx_v_K; Py_ssize_t __pyx_v_lab; __pyx_t_5numpy_float64_t __pyx_v_val; __pyx_t_5numpy_float64_t __pyx_v_count; PyArrayObject *__pyx_v_sumx = 0; PyArrayObject *__pyx_v_nobs = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_counts; __Pyx_Buffer __pyx_pybuffer_counts; __Pyx_LocalBuf_ND __pyx_pybuffernd_labels; __Pyx_Buffer __pyx_pybuffer_labels; __Pyx_LocalBuf_ND __pyx_pybuffernd_nobs; __Pyx_Buffer __pyx_pybuffer_nobs; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_sumx; __Pyx_Buffer __pyx_pybuffer_sumx; __Pyx_LocalBuf_ND __pyx_pybuffernd_values; __Pyx_Buffer __pyx_pybuffer_values; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; Py_ssize_t __pyx_t_2; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyArrayObject *__pyx_t_7 = NULL; int __pyx_t_8; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; PyObject *__pyx_t_11 = NULL; PyObject *__pyx_t_12 = NULL; PyObject *(*__pyx_t_13)(PyObject *); 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; long __pyx_t_25; Py_ssize_t __pyx_t_26; long __pyx_t_27; Py_ssize_t __pyx_t_28; long __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; Py_ssize_t __pyx_t_37; Py_ssize_t __pyx_t_38; Py_ssize_t __pyx_t_39; __pyx_t_5numpy_float64_t __pyx_t_40; Py_ssize_t __pyx_t_41; Py_ssize_t __pyx_t_42; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("group_mean_float64", 0); __pyx_pybuffer_sumx.pybuffer.buf = NULL; __pyx_pybuffer_sumx.refcount = 0; __pyx_pybuffernd_sumx.data = NULL; __pyx_pybuffernd_sumx.rcbuffer = &__pyx_pybuffer_sumx; __pyx_pybuffer_nobs.pybuffer.buf = NULL; __pyx_pybuffer_nobs.refcount = 0; __pyx_pybuffernd_nobs.data = NULL; __pyx_pybuffernd_nobs.rcbuffer = &__pyx_pybuffer_nobs; __pyx_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; __pyx_pybuffer_counts.pybuffer.buf = NULL; __pyx_pybuffer_counts.refcount = 0; __pyx_pybuffernd_counts.data = NULL; __pyx_pybuffernd_counts.rcbuffer = &__pyx_pybuffer_counts; __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_labels.pybuffer.buf = NULL; __pyx_pybuffer_labels.refcount = 0; __pyx_pybuffernd_labels.data = NULL; __pyx_pybuffernd_labels.rcbuffer = &__pyx_pybuffer_labels; { __Pyx_BufFmt_StackElem __pyx_stack[1]; 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, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6123; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; __pyx_pybuffernd_out.diminfo[1].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_out.diminfo[1].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[1]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_counts.rcbuffer->pybuffer, (PyObject*)__pyx_v_counts, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6123; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_counts.diminfo[0].strides = __pyx_pybuffernd_counts.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_counts.diminfo[0].shape = __pyx_pybuffernd_counts.rcbuffer->pybuffer.shape[0]; { __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, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6123; __pyx_clineno = __LINE__; goto __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_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_labels.rcbuffer->pybuffer, (PyObject*)__pyx_v_labels, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6123; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_labels.diminfo[0].strides = __pyx_pybuffernd_labels.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_labels.diminfo[0].shape = __pyx_pybuffernd_labels.rcbuffer->pybuffer.shape[0]; /* "pandas/src/generated.pyx":6132 * ndarray[float64_t, ndim=2] sumx, nobs * * if not len(values) == len(labels): # <<<<<<<<<<<<<< * raise AssertionError("len(index) != len(labels)") * */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6132; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_2 = PyObject_Length(((PyObject *)__pyx_v_labels)); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6132; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_3 = ((!((__pyx_t_1 == __pyx_t_2) != 0)) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":6133 * * if not len(values) == len(labels): * raise AssertionError("len(index) != len(labels)") # <<<<<<<<<<<<<< * * nobs = np.zeros_like(out) */ __pyx_t_4 = PyObject_Call(__pyx_builtin_AssertionError, ((PyObject *)__pyx_k_tuple_194), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6133; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 6133; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L3; } __pyx_L3:; /* "pandas/src/generated.pyx":6135 * raise AssertionError("len(index) != len(labels)") * * nobs = np.zeros_like(out) # <<<<<<<<<<<<<< * sumx = np.zeros_like(out) * */ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6135; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s__zeros_like); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6135; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6135; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(((PyObject *)__pyx_v_out)); PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_v_out)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out)); __pyx_t_6 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6135; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6135; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_7 = ((PyArrayObject *)__pyx_t_6); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer); __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_nobs.rcbuffer->pybuffer, (PyObject*)__pyx_v_nobs, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_pybuffernd_nobs.diminfo[0].strides = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_nobs.diminfo[0].shape = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_nobs.diminfo[1].strides = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_nobs.diminfo[1].shape = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.shape[1]; if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6135; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_7 = 0; __pyx_v_nobs = ((PyArrayObject *)__pyx_t_6); __pyx_t_6 = 0; /* "pandas/src/generated.pyx":6136 * * nobs = np.zeros_like(out) * sumx = np.zeros_like(out) # <<<<<<<<<<<<<< * * N, K = ( values).shape */ __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6136; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s__zeros_like); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6136; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6136; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(((PyObject *)__pyx_v_out)); PyTuple_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_v_out)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out)); __pyx_t_5 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6136; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0; if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6136; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_7 = ((PyArrayObject *)__pyx_t_5); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_sumx.rcbuffer->pybuffer); __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_sumx.rcbuffer->pybuffer, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_sumx.rcbuffer->pybuffer, (PyObject*)__pyx_v_sumx, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_pybuffernd_sumx.diminfo[0].strides = __pyx_pybuffernd_sumx.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_sumx.diminfo[0].shape = __pyx_pybuffernd_sumx.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_sumx.diminfo[1].strides = __pyx_pybuffernd_sumx.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_sumx.diminfo[1].shape = __pyx_pybuffernd_sumx.rcbuffer->pybuffer.shape[1]; if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6136; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_7 = 0; __pyx_v_sumx = ((PyArrayObject *)__pyx_t_5); __pyx_t_5 = 0; /* "pandas/src/generated.pyx":6138 * sumx = np.zeros_like(out) * * N, K = ( values).shape # <<<<<<<<<<<<<< * * if K > 1: */ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_values), __pyx_n_s__shape); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6138; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); if ((likely(PyTuple_CheckExact(__pyx_t_5))) || (PyList_CheckExact(__pyx_t_5))) { PyObject* sequence = __pyx_t_5; #if CYTHON_COMPILING_IN_CPYTHON Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6138; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_6 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_4 = PyTuple_GET_ITEM(sequence, 1); } else { __pyx_t_6 = PyList_GET_ITEM(sequence, 0); __pyx_t_4 = PyList_GET_ITEM(sequence, 1); } __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(__pyx_t_4); #else __pyx_t_6 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6138; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6138; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); #endif __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } else { Py_ssize_t index = -1; __pyx_t_12 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6138; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_13 = Py_TYPE(__pyx_t_12)->tp_iternext; index = 0; __pyx_t_6 = __pyx_t_13(__pyx_t_12); if (unlikely(!__pyx_t_6)) goto __pyx_L4_unpacking_failed; __Pyx_GOTREF(__pyx_t_6); index = 1; __pyx_t_4 = __pyx_t_13(__pyx_t_12); if (unlikely(!__pyx_t_4)) goto __pyx_L4_unpacking_failed; __Pyx_GOTREF(__pyx_t_4); if (__Pyx_IternextUnpackEndCheck(__pyx_t_13(__pyx_t_12), 2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6138; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_13 = NULL; __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; goto __pyx_L5_unpacking_done; __pyx_L4_unpacking_failed:; __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __pyx_t_13 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6138; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_L5_unpacking_done:; } __pyx_t_2 = __Pyx_PyIndex_AsSsize_t(__pyx_t_6); if (unlikely((__pyx_t_2 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6138; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_1 = __Pyx_PyIndex_AsSsize_t(__pyx_t_4); if (unlikely((__pyx_t_1 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6138; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_N = __pyx_t_2; __pyx_v_K = __pyx_t_1; /* "pandas/src/generated.pyx":6140 * N, K = ( values).shape * * if K > 1: # <<<<<<<<<<<<<< * for i in range(N): * lab = labels[i] */ __pyx_t_3 = ((__pyx_v_K > 1) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":6141 * * if K > 1: * for i in range(N): # <<<<<<<<<<<<<< * lab = labels[i] * if lab < 0: */ __pyx_t_1 = __pyx_v_N; for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) { __pyx_v_i = __pyx_t_2; /* "pandas/src/generated.pyx":6142 * if K > 1: * for i in range(N): * lab = labels[i] # <<<<<<<<<<<<<< * if lab < 0: * continue */ __pyx_t_14 = __pyx_v_i; __pyx_v_lab = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_labels.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_labels.diminfo[0].strides)); /* "pandas/src/generated.pyx":6143 * for i in range(N): * lab = labels[i] * if lab < 0: # <<<<<<<<<<<<<< * continue * */ __pyx_t_3 = ((__pyx_v_lab < 0) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":6144 * lab = labels[i] * if lab < 0: * continue # <<<<<<<<<<<<<< * * counts[lab] += 1 */ goto __pyx_L7_continue; goto __pyx_L9; } __pyx_L9:; /* "pandas/src/generated.pyx":6146 * continue * * counts[lab] += 1 # <<<<<<<<<<<<<< * for j in range(K): * val = values[i, j] */ __pyx_t_15 = __pyx_v_lab; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_counts.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_counts.diminfo[0].strides) += 1; /* "pandas/src/generated.pyx":6147 * * counts[lab] += 1 * for j in range(K): # <<<<<<<<<<<<<< * val = values[i, j] * # not nan */ __pyx_t_16 = __pyx_v_K; for (__pyx_t_17 = 0; __pyx_t_17 < __pyx_t_16; __pyx_t_17+=1) { __pyx_v_j = __pyx_t_17; /* "pandas/src/generated.pyx":6148 * counts[lab] += 1 * for j in range(K): * val = values[i, j] # <<<<<<<<<<<<<< * # not nan * if val == val: */ __pyx_t_18 = __pyx_v_i; __pyx_t_19 = __pyx_v_j; __pyx_v_val = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_19, __pyx_pybuffernd_values.diminfo[1].strides)); /* "pandas/src/generated.pyx":6150 * val = values[i, j] * # not nan * if val == val: # <<<<<<<<<<<<<< * nobs[lab, j] += 1 * sumx[lab, j] += val */ __pyx_t_3 = ((__pyx_v_val == __pyx_v_val) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":6151 * # not nan * if val == val: * nobs[lab, j] += 1 # <<<<<<<<<<<<<< * sumx[lab, j] += val * else: */ __pyx_t_20 = __pyx_v_lab; __pyx_t_21 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_nobs.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_nobs.diminfo[0].strides, __pyx_t_21, __pyx_pybuffernd_nobs.diminfo[1].strides) += 1.0; /* "pandas/src/generated.pyx":6152 * if val == val: * nobs[lab, j] += 1 * sumx[lab, j] += val # <<<<<<<<<<<<<< * else: * for i in range(N): */ __pyx_t_22 = __pyx_v_lab; __pyx_t_23 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_sumx.rcbuffer->pybuffer.buf, __pyx_t_22, __pyx_pybuffernd_sumx.diminfo[0].strides, __pyx_t_23, __pyx_pybuffernd_sumx.diminfo[1].strides) += __pyx_v_val; goto __pyx_L12; } __pyx_L12:; } __pyx_L7_continue:; } goto __pyx_L6; } /*else*/ { /* "pandas/src/generated.pyx":6154 * sumx[lab, j] += val * else: * for i in range(N): # <<<<<<<<<<<<<< * lab = labels[i] * if lab < 0: */ __pyx_t_1 = __pyx_v_N; for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) { __pyx_v_i = __pyx_t_2; /* "pandas/src/generated.pyx":6155 * else: * for i in range(N): * lab = labels[i] # <<<<<<<<<<<<<< * if lab < 0: * continue */ __pyx_t_16 = __pyx_v_i; __pyx_v_lab = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_labels.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_labels.diminfo[0].strides)); /* "pandas/src/generated.pyx":6156 * for i in range(N): * lab = labels[i] * if lab < 0: # <<<<<<<<<<<<<< * continue * */ __pyx_t_3 = ((__pyx_v_lab < 0) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":6157 * lab = labels[i] * if lab < 0: * continue # <<<<<<<<<<<<<< * * counts[lab] += 1 */ goto __pyx_L13_continue; goto __pyx_L15; } __pyx_L15:; /* "pandas/src/generated.pyx":6159 * continue * * counts[lab] += 1 # <<<<<<<<<<<<<< * val = values[i, 0] * # not nan */ __pyx_t_17 = __pyx_v_lab; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_counts.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_counts.diminfo[0].strides) += 1; /* "pandas/src/generated.pyx":6160 * * counts[lab] += 1 * val = values[i, 0] # <<<<<<<<<<<<<< * # not nan * if val == val: */ __pyx_t_24 = __pyx_v_i; __pyx_t_25 = 0; __pyx_v_val = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_24, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_25, __pyx_pybuffernd_values.diminfo[1].strides)); /* "pandas/src/generated.pyx":6162 * val = values[i, 0] * # not nan * if val == val: # <<<<<<<<<<<<<< * nobs[lab, 0] += 1 * sumx[lab, 0] += val */ __pyx_t_3 = ((__pyx_v_val == __pyx_v_val) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":6163 * # not nan * if val == val: * nobs[lab, 0] += 1 # <<<<<<<<<<<<<< * sumx[lab, 0] += val * */ __pyx_t_26 = __pyx_v_lab; __pyx_t_27 = 0; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_nobs.rcbuffer->pybuffer.buf, __pyx_t_26, __pyx_pybuffernd_nobs.diminfo[0].strides, __pyx_t_27, __pyx_pybuffernd_nobs.diminfo[1].strides) += 1.0; /* "pandas/src/generated.pyx":6164 * if val == val: * nobs[lab, 0] += 1 * sumx[lab, 0] += val # <<<<<<<<<<<<<< * * for i in range(len(counts)): */ __pyx_t_28 = __pyx_v_lab; __pyx_t_29 = 0; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_sumx.rcbuffer->pybuffer.buf, __pyx_t_28, __pyx_pybuffernd_sumx.diminfo[0].strides, __pyx_t_29, __pyx_pybuffernd_sumx.diminfo[1].strides) += __pyx_v_val; goto __pyx_L16; } __pyx_L16:; __pyx_L13_continue:; } } __pyx_L6:; /* "pandas/src/generated.pyx":6166 * sumx[lab, 0] += val * * for i in range(len(counts)): # <<<<<<<<<<<<<< * for j in range(K): * count = nobs[i, j] */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_counts)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6166; __pyx_clineno = __LINE__; goto __pyx_L1_error;} for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) { __pyx_v_i = __pyx_t_2; /* "pandas/src/generated.pyx":6167 * * for i in range(len(counts)): * for j in range(K): # <<<<<<<<<<<<<< * count = nobs[i, j] * if nobs[i, j] == 0: */ __pyx_t_30 = __pyx_v_K; for (__pyx_t_31 = 0; __pyx_t_31 < __pyx_t_30; __pyx_t_31+=1) { __pyx_v_j = __pyx_t_31; /* "pandas/src/generated.pyx":6168 * for i in range(len(counts)): * for j in range(K): * count = nobs[i, j] # <<<<<<<<<<<<<< * if nobs[i, j] == 0: * out[i, j] = nan */ __pyx_t_32 = __pyx_v_i; __pyx_t_33 = __pyx_v_j; __pyx_v_count = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_nobs.rcbuffer->pybuffer.buf, __pyx_t_32, __pyx_pybuffernd_nobs.diminfo[0].strides, __pyx_t_33, __pyx_pybuffernd_nobs.diminfo[1].strides)); /* "pandas/src/generated.pyx":6169 * for j in range(K): * count = nobs[i, j] * if nobs[i, j] == 0: # <<<<<<<<<<<<<< * out[i, j] = nan * else: */ __pyx_t_34 = __pyx_v_i; __pyx_t_35 = __pyx_v_j; __pyx_t_3 = (((*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_nobs.rcbuffer->pybuffer.buf, __pyx_t_34, __pyx_pybuffernd_nobs.diminfo[0].strides, __pyx_t_35, __pyx_pybuffernd_nobs.diminfo[1].strides)) == 0.0) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":6170 * count = nobs[i, j] * if nobs[i, j] == 0: * out[i, j] = nan # <<<<<<<<<<<<<< * else: * out[i, j] = sumx[i, j] / count */ __pyx_t_36 = __pyx_v_i; __pyx_t_37 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_36, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_37, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_6pandas_5algos_nan; goto __pyx_L21; } /*else*/ { /* "pandas/src/generated.pyx":6172 * out[i, j] = nan * else: * out[i, j] = sumx[i, j] / count # <<<<<<<<<<<<<< * @cython.wraparound(False) * @cython.boundscheck(False) */ __pyx_t_38 = __pyx_v_i; __pyx_t_39 = __pyx_v_j; __pyx_t_40 = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_sumx.rcbuffer->pybuffer.buf, __pyx_t_38, __pyx_pybuffernd_sumx.diminfo[0].strides, __pyx_t_39, __pyx_pybuffernd_sumx.diminfo[1].strides)); if (unlikely(__pyx_v_count == 0)) { #ifdef WITH_THREAD PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure(); #endif PyErr_Format(PyExc_ZeroDivisionError, "float division"); #ifdef WITH_THREAD PyGILState_Release(__pyx_gilstate_save); #endif {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6172; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_41 = __pyx_v_i; __pyx_t_42 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_41, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_42, __pyx_pybuffernd_out.diminfo[1].strides) = (__pyx_t_40 / __pyx_v_count); } __pyx_L21:; } } __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_12); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_counts.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_labels.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_sumx.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.group_mean_float64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_counts.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_labels.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_sumx.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_sumx); __Pyx_XDECREF((PyObject *)__pyx_v_nobs); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_429group_mean_float32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_429group_mean_float32 = {__Pyx_NAMESTR("group_mean_float32"), (PyCFunction)__pyx_pw_6pandas_5algos_429group_mean_float32, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_429group_mean_float32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_out = 0; PyArrayObject *__pyx_v_counts = 0; PyArrayObject *__pyx_v_values = 0; PyArrayObject *__pyx_v_labels = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("group_mean_float32 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__out,&__pyx_n_s__counts,&__pyx_n_s__values,&__pyx_n_s__labels,0}; PyObject* values[4] = {0,0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__out)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__counts)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("group_mean_float32", 1, 4, 4, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6175; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__values)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("group_mean_float32", 1, 4, 4, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6175; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__labels)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("group_mean_float32", 1, 4, 4, 3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6175; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "group_mean_float32") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6175; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 4) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[3] = PyTuple_GET_ITEM(__pyx_args, 3); } __pyx_v_out = ((PyArrayObject *)values[0]); __pyx_v_counts = ((PyArrayObject *)values[1]); __pyx_v_values = ((PyArrayObject *)values[2]); __pyx_v_labels = ((PyArrayObject *)values[3]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("group_mean_float32", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6175; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.group_mean_float32", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_5numpy_ndarray, 1, "out", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6175; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_counts), __pyx_ptype_5numpy_ndarray, 1, "counts", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6176; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6177; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_labels), __pyx_ptype_5numpy_ndarray, 1, "labels", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6178; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_428group_mean_float32(__pyx_self, __pyx_v_out, __pyx_v_counts, __pyx_v_values, __pyx_v_labels); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":6175 * @cython.wraparound(False) * @cython.boundscheck(False) * def group_mean_float32(ndarray[float32_t, ndim=2] out, # <<<<<<<<<<<<<< * ndarray[int64_t] counts, * ndarray[float32_t, ndim=2] values, */ static PyObject *__pyx_pf_6pandas_5algos_428group_mean_float32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_out, PyArrayObject *__pyx_v_counts, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_labels) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_N; Py_ssize_t __pyx_v_K; Py_ssize_t __pyx_v_lab; __pyx_t_5numpy_float32_t __pyx_v_val; __pyx_t_5numpy_float32_t __pyx_v_count; PyArrayObject *__pyx_v_sumx = 0; PyArrayObject *__pyx_v_nobs = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_counts; __Pyx_Buffer __pyx_pybuffer_counts; __Pyx_LocalBuf_ND __pyx_pybuffernd_labels; __Pyx_Buffer __pyx_pybuffer_labels; __Pyx_LocalBuf_ND __pyx_pybuffernd_nobs; __Pyx_Buffer __pyx_pybuffer_nobs; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_sumx; __Pyx_Buffer __pyx_pybuffer_sumx; __Pyx_LocalBuf_ND __pyx_pybuffernd_values; __Pyx_Buffer __pyx_pybuffer_values; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; Py_ssize_t __pyx_t_2; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyArrayObject *__pyx_t_7 = NULL; int __pyx_t_8; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; PyObject *__pyx_t_11 = NULL; PyObject *__pyx_t_12 = NULL; PyObject *(*__pyx_t_13)(PyObject *); 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; long __pyx_t_25; Py_ssize_t __pyx_t_26; long __pyx_t_27; Py_ssize_t __pyx_t_28; long __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; Py_ssize_t __pyx_t_37; Py_ssize_t __pyx_t_38; Py_ssize_t __pyx_t_39; __pyx_t_5numpy_float32_t __pyx_t_40; Py_ssize_t __pyx_t_41; Py_ssize_t __pyx_t_42; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("group_mean_float32", 0); __pyx_pybuffer_sumx.pybuffer.buf = NULL; __pyx_pybuffer_sumx.refcount = 0; __pyx_pybuffernd_sumx.data = NULL; __pyx_pybuffernd_sumx.rcbuffer = &__pyx_pybuffer_sumx; __pyx_pybuffer_nobs.pybuffer.buf = NULL; __pyx_pybuffer_nobs.refcount = 0; __pyx_pybuffernd_nobs.data = NULL; __pyx_pybuffernd_nobs.rcbuffer = &__pyx_pybuffer_nobs; __pyx_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; __pyx_pybuffer_counts.pybuffer.buf = NULL; __pyx_pybuffer_counts.refcount = 0; __pyx_pybuffernd_counts.data = NULL; __pyx_pybuffernd_counts.rcbuffer = &__pyx_pybuffer_counts; __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_labels.pybuffer.buf = NULL; __pyx_pybuffer_labels.refcount = 0; __pyx_pybuffernd_labels.data = NULL; __pyx_pybuffernd_labels.rcbuffer = &__pyx_pybuffer_labels; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_v_out, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6175; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; __pyx_pybuffernd_out.diminfo[1].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_out.diminfo[1].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[1]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_counts.rcbuffer->pybuffer, (PyObject*)__pyx_v_counts, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6175; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_counts.diminfo[0].strides = __pyx_pybuffernd_counts.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_counts.diminfo[0].shape = __pyx_pybuffernd_counts.rcbuffer->pybuffer.shape[0]; { __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_float32_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6175; __pyx_clineno = __LINE__; goto __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_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_labels.rcbuffer->pybuffer, (PyObject*)__pyx_v_labels, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6175; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_labels.diminfo[0].strides = __pyx_pybuffernd_labels.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_labels.diminfo[0].shape = __pyx_pybuffernd_labels.rcbuffer->pybuffer.shape[0]; /* "pandas/src/generated.pyx":6184 * ndarray[float32_t, ndim=2] sumx, nobs * * if not len(values) == len(labels): # <<<<<<<<<<<<<< * raise AssertionError("len(index) != len(labels)") * */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6184; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_2 = PyObject_Length(((PyObject *)__pyx_v_labels)); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6184; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_3 = ((!((__pyx_t_1 == __pyx_t_2) != 0)) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":6185 * * if not len(values) == len(labels): * raise AssertionError("len(index) != len(labels)") # <<<<<<<<<<<<<< * * nobs = np.zeros_like(out) */ __pyx_t_4 = PyObject_Call(__pyx_builtin_AssertionError, ((PyObject *)__pyx_k_tuple_195), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6185; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 6185; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L3; } __pyx_L3:; /* "pandas/src/generated.pyx":6187 * raise AssertionError("len(index) != len(labels)") * * nobs = np.zeros_like(out) # <<<<<<<<<<<<<< * sumx = np.zeros_like(out) * */ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6187; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s__zeros_like); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6187; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6187; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(((PyObject *)__pyx_v_out)); PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_v_out)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out)); __pyx_t_6 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6187; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6187; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_7 = ((PyArrayObject *)__pyx_t_6); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer); __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_nobs.rcbuffer->pybuffer, (PyObject*)__pyx_v_nobs, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_pybuffernd_nobs.diminfo[0].strides = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_nobs.diminfo[0].shape = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_nobs.diminfo[1].strides = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_nobs.diminfo[1].shape = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.shape[1]; if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6187; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_7 = 0; __pyx_v_nobs = ((PyArrayObject *)__pyx_t_6); __pyx_t_6 = 0; /* "pandas/src/generated.pyx":6188 * * nobs = np.zeros_like(out) * sumx = np.zeros_like(out) # <<<<<<<<<<<<<< * * N, K = ( values).shape */ __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6188; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s__zeros_like); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6188; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6188; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(((PyObject *)__pyx_v_out)); PyTuple_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_v_out)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out)); __pyx_t_5 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6188; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0; if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6188; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_7 = ((PyArrayObject *)__pyx_t_5); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_sumx.rcbuffer->pybuffer); __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_sumx.rcbuffer->pybuffer, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_sumx.rcbuffer->pybuffer, (PyObject*)__pyx_v_sumx, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_pybuffernd_sumx.diminfo[0].strides = __pyx_pybuffernd_sumx.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_sumx.diminfo[0].shape = __pyx_pybuffernd_sumx.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_sumx.diminfo[1].strides = __pyx_pybuffernd_sumx.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_sumx.diminfo[1].shape = __pyx_pybuffernd_sumx.rcbuffer->pybuffer.shape[1]; if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6188; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_7 = 0; __pyx_v_sumx = ((PyArrayObject *)__pyx_t_5); __pyx_t_5 = 0; /* "pandas/src/generated.pyx":6190 * sumx = np.zeros_like(out) * * N, K = ( values).shape # <<<<<<<<<<<<<< * * if K > 1: */ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_values), __pyx_n_s__shape); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6190; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); if ((likely(PyTuple_CheckExact(__pyx_t_5))) || (PyList_CheckExact(__pyx_t_5))) { PyObject* sequence = __pyx_t_5; #if CYTHON_COMPILING_IN_CPYTHON Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6190; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_6 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_4 = PyTuple_GET_ITEM(sequence, 1); } else { __pyx_t_6 = PyList_GET_ITEM(sequence, 0); __pyx_t_4 = PyList_GET_ITEM(sequence, 1); } __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(__pyx_t_4); #else __pyx_t_6 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6190; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6190; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); #endif __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } else { Py_ssize_t index = -1; __pyx_t_12 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6190; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_13 = Py_TYPE(__pyx_t_12)->tp_iternext; index = 0; __pyx_t_6 = __pyx_t_13(__pyx_t_12); if (unlikely(!__pyx_t_6)) goto __pyx_L4_unpacking_failed; __Pyx_GOTREF(__pyx_t_6); index = 1; __pyx_t_4 = __pyx_t_13(__pyx_t_12); if (unlikely(!__pyx_t_4)) goto __pyx_L4_unpacking_failed; __Pyx_GOTREF(__pyx_t_4); if (__Pyx_IternextUnpackEndCheck(__pyx_t_13(__pyx_t_12), 2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6190; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_13 = NULL; __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; goto __pyx_L5_unpacking_done; __pyx_L4_unpacking_failed:; __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __pyx_t_13 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6190; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_L5_unpacking_done:; } __pyx_t_2 = __Pyx_PyIndex_AsSsize_t(__pyx_t_6); if (unlikely((__pyx_t_2 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6190; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_1 = __Pyx_PyIndex_AsSsize_t(__pyx_t_4); if (unlikely((__pyx_t_1 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6190; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_N = __pyx_t_2; __pyx_v_K = __pyx_t_1; /* "pandas/src/generated.pyx":6192 * N, K = ( values).shape * * if K > 1: # <<<<<<<<<<<<<< * for i in range(N): * lab = labels[i] */ __pyx_t_3 = ((__pyx_v_K > 1) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":6193 * * if K > 1: * for i in range(N): # <<<<<<<<<<<<<< * lab = labels[i] * if lab < 0: */ __pyx_t_1 = __pyx_v_N; for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) { __pyx_v_i = __pyx_t_2; /* "pandas/src/generated.pyx":6194 * if K > 1: * for i in range(N): * lab = labels[i] # <<<<<<<<<<<<<< * if lab < 0: * continue */ __pyx_t_14 = __pyx_v_i; __pyx_v_lab = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_labels.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_labels.diminfo[0].strides)); /* "pandas/src/generated.pyx":6195 * for i in range(N): * lab = labels[i] * if lab < 0: # <<<<<<<<<<<<<< * continue * */ __pyx_t_3 = ((__pyx_v_lab < 0) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":6196 * lab = labels[i] * if lab < 0: * continue # <<<<<<<<<<<<<< * * counts[lab] += 1 */ goto __pyx_L7_continue; goto __pyx_L9; } __pyx_L9:; /* "pandas/src/generated.pyx":6198 * continue * * counts[lab] += 1 # <<<<<<<<<<<<<< * for j in range(K): * val = values[i, j] */ __pyx_t_15 = __pyx_v_lab; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_counts.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_counts.diminfo[0].strides) += 1; /* "pandas/src/generated.pyx":6199 * * counts[lab] += 1 * for j in range(K): # <<<<<<<<<<<<<< * val = values[i, j] * # not nan */ __pyx_t_16 = __pyx_v_K; for (__pyx_t_17 = 0; __pyx_t_17 < __pyx_t_16; __pyx_t_17+=1) { __pyx_v_j = __pyx_t_17; /* "pandas/src/generated.pyx":6200 * counts[lab] += 1 * for j in range(K): * val = values[i, j] # <<<<<<<<<<<<<< * # not nan * if val == val: */ __pyx_t_18 = __pyx_v_i; __pyx_t_19 = __pyx_v_j; __pyx_v_val = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_19, __pyx_pybuffernd_values.diminfo[1].strides)); /* "pandas/src/generated.pyx":6202 * val = values[i, j] * # not nan * if val == val: # <<<<<<<<<<<<<< * nobs[lab, j] += 1 * sumx[lab, j] += val */ __pyx_t_3 = ((__pyx_v_val == __pyx_v_val) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":6203 * # not nan * if val == val: * nobs[lab, j] += 1 # <<<<<<<<<<<<<< * sumx[lab, j] += val * else: */ __pyx_t_20 = __pyx_v_lab; __pyx_t_21 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_nobs.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_nobs.diminfo[0].strides, __pyx_t_21, __pyx_pybuffernd_nobs.diminfo[1].strides) += 1.0; /* "pandas/src/generated.pyx":6204 * if val == val: * nobs[lab, j] += 1 * sumx[lab, j] += val # <<<<<<<<<<<<<< * else: * for i in range(N): */ __pyx_t_22 = __pyx_v_lab; __pyx_t_23 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_sumx.rcbuffer->pybuffer.buf, __pyx_t_22, __pyx_pybuffernd_sumx.diminfo[0].strides, __pyx_t_23, __pyx_pybuffernd_sumx.diminfo[1].strides) += __pyx_v_val; goto __pyx_L12; } __pyx_L12:; } __pyx_L7_continue:; } goto __pyx_L6; } /*else*/ { /* "pandas/src/generated.pyx":6206 * sumx[lab, j] += val * else: * for i in range(N): # <<<<<<<<<<<<<< * lab = labels[i] * if lab < 0: */ __pyx_t_1 = __pyx_v_N; for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) { __pyx_v_i = __pyx_t_2; /* "pandas/src/generated.pyx":6207 * else: * for i in range(N): * lab = labels[i] # <<<<<<<<<<<<<< * if lab < 0: * continue */ __pyx_t_16 = __pyx_v_i; __pyx_v_lab = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_labels.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_labels.diminfo[0].strides)); /* "pandas/src/generated.pyx":6208 * for i in range(N): * lab = labels[i] * if lab < 0: # <<<<<<<<<<<<<< * continue * */ __pyx_t_3 = ((__pyx_v_lab < 0) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":6209 * lab = labels[i] * if lab < 0: * continue # <<<<<<<<<<<<<< * * counts[lab] += 1 */ goto __pyx_L13_continue; goto __pyx_L15; } __pyx_L15:; /* "pandas/src/generated.pyx":6211 * continue * * counts[lab] += 1 # <<<<<<<<<<<<<< * val = values[i, 0] * # not nan */ __pyx_t_17 = __pyx_v_lab; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_counts.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_counts.diminfo[0].strides) += 1; /* "pandas/src/generated.pyx":6212 * * counts[lab] += 1 * val = values[i, 0] # <<<<<<<<<<<<<< * # not nan * if val == val: */ __pyx_t_24 = __pyx_v_i; __pyx_t_25 = 0; __pyx_v_val = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_24, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_25, __pyx_pybuffernd_values.diminfo[1].strides)); /* "pandas/src/generated.pyx":6214 * val = values[i, 0] * # not nan * if val == val: # <<<<<<<<<<<<<< * nobs[lab, 0] += 1 * sumx[lab, 0] += val */ __pyx_t_3 = ((__pyx_v_val == __pyx_v_val) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":6215 * # not nan * if val == val: * nobs[lab, 0] += 1 # <<<<<<<<<<<<<< * sumx[lab, 0] += val * */ __pyx_t_26 = __pyx_v_lab; __pyx_t_27 = 0; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_nobs.rcbuffer->pybuffer.buf, __pyx_t_26, __pyx_pybuffernd_nobs.diminfo[0].strides, __pyx_t_27, __pyx_pybuffernd_nobs.diminfo[1].strides) += 1.0; /* "pandas/src/generated.pyx":6216 * if val == val: * nobs[lab, 0] += 1 * sumx[lab, 0] += val # <<<<<<<<<<<<<< * * for i in range(len(counts)): */ __pyx_t_28 = __pyx_v_lab; __pyx_t_29 = 0; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_sumx.rcbuffer->pybuffer.buf, __pyx_t_28, __pyx_pybuffernd_sumx.diminfo[0].strides, __pyx_t_29, __pyx_pybuffernd_sumx.diminfo[1].strides) += __pyx_v_val; goto __pyx_L16; } __pyx_L16:; __pyx_L13_continue:; } } __pyx_L6:; /* "pandas/src/generated.pyx":6218 * sumx[lab, 0] += val * * for i in range(len(counts)): # <<<<<<<<<<<<<< * for j in range(K): * count = nobs[i, j] */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_counts)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6218; __pyx_clineno = __LINE__; goto __pyx_L1_error;} for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) { __pyx_v_i = __pyx_t_2; /* "pandas/src/generated.pyx":6219 * * for i in range(len(counts)): * for j in range(K): # <<<<<<<<<<<<<< * count = nobs[i, j] * if nobs[i, j] == 0: */ __pyx_t_30 = __pyx_v_K; for (__pyx_t_31 = 0; __pyx_t_31 < __pyx_t_30; __pyx_t_31+=1) { __pyx_v_j = __pyx_t_31; /* "pandas/src/generated.pyx":6220 * for i in range(len(counts)): * for j in range(K): * count = nobs[i, j] # <<<<<<<<<<<<<< * if nobs[i, j] == 0: * out[i, j] = nan */ __pyx_t_32 = __pyx_v_i; __pyx_t_33 = __pyx_v_j; __pyx_v_count = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_nobs.rcbuffer->pybuffer.buf, __pyx_t_32, __pyx_pybuffernd_nobs.diminfo[0].strides, __pyx_t_33, __pyx_pybuffernd_nobs.diminfo[1].strides)); /* "pandas/src/generated.pyx":6221 * for j in range(K): * count = nobs[i, j] * if nobs[i, j] == 0: # <<<<<<<<<<<<<< * out[i, j] = nan * else: */ __pyx_t_34 = __pyx_v_i; __pyx_t_35 = __pyx_v_j; __pyx_t_3 = (((*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_nobs.rcbuffer->pybuffer.buf, __pyx_t_34, __pyx_pybuffernd_nobs.diminfo[0].strides, __pyx_t_35, __pyx_pybuffernd_nobs.diminfo[1].strides)) == 0.0) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":6222 * count = nobs[i, j] * if nobs[i, j] == 0: * out[i, j] = nan # <<<<<<<<<<<<<< * else: * out[i, j] = sumx[i, j] / count */ __pyx_t_36 = __pyx_v_i; __pyx_t_37 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_36, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_37, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_6pandas_5algos_nan; goto __pyx_L21; } /*else*/ { /* "pandas/src/generated.pyx":6224 * out[i, j] = nan * else: * out[i, j] = sumx[i, j] / count # <<<<<<<<<<<<<< * * */ __pyx_t_38 = __pyx_v_i; __pyx_t_39 = __pyx_v_j; __pyx_t_40 = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_sumx.rcbuffer->pybuffer.buf, __pyx_t_38, __pyx_pybuffernd_sumx.diminfo[0].strides, __pyx_t_39, __pyx_pybuffernd_sumx.diminfo[1].strides)); if (unlikely(__pyx_v_count == 0)) { #ifdef WITH_THREAD PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure(); #endif PyErr_Format(PyExc_ZeroDivisionError, "float division"); #ifdef WITH_THREAD PyGILState_Release(__pyx_gilstate_save); #endif {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6224; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_41 = __pyx_v_i; __pyx_t_42 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_41, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_42, __pyx_pybuffernd_out.diminfo[1].strides) = (__pyx_t_40 / __pyx_v_count); } __pyx_L21:; } } __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_12); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_counts.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_labels.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_sumx.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.group_mean_float32", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_counts.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_labels.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_sumx.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_sumx); __Pyx_XDECREF((PyObject *)__pyx_v_nobs); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_431group_mean_bin_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_431group_mean_bin_float64 = {__Pyx_NAMESTR("group_mean_bin_float64"), (PyCFunction)__pyx_pw_6pandas_5algos_431group_mean_bin_float64, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_431group_mean_bin_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_out = 0; PyArrayObject *__pyx_v_counts = 0; PyArrayObject *__pyx_v_values = 0; PyArrayObject *__pyx_v_bins = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("group_mean_bin_float64 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__out,&__pyx_n_s__counts,&__pyx_n_s__values,&__pyx_n_s__bins,0}; PyObject* values[4] = {0,0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__out)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__counts)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("group_mean_bin_float64", 1, 4, 4, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6227; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__values)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("group_mean_bin_float64", 1, 4, 4, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6227; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__bins)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("group_mean_bin_float64", 1, 4, 4, 3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6227; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "group_mean_bin_float64") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6227; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 4) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[3] = PyTuple_GET_ITEM(__pyx_args, 3); } __pyx_v_out = ((PyArrayObject *)values[0]); __pyx_v_counts = ((PyArrayObject *)values[1]); __pyx_v_values = ((PyArrayObject *)values[2]); __pyx_v_bins = ((PyArrayObject *)values[3]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("group_mean_bin_float64", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6227; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.group_mean_bin_float64", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_5numpy_ndarray, 1, "out", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6227; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_counts), __pyx_ptype_5numpy_ndarray, 1, "counts", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6228; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6229; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_bins), __pyx_ptype_5numpy_ndarray, 1, "bins", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6230; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_430group_mean_bin_float64(__pyx_self, __pyx_v_out, __pyx_v_counts, __pyx_v_values, __pyx_v_bins); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":6227 * * * def group_mean_bin_float64(ndarray[float64_t, ndim=2] out, # <<<<<<<<<<<<<< * ndarray[int64_t] counts, * ndarray[float64_t, ndim=2] values, */ static PyObject *__pyx_pf_6pandas_5algos_430group_mean_bin_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_out, PyArrayObject *__pyx_v_counts, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_bins) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_N; Py_ssize_t __pyx_v_K; Py_ssize_t __pyx_v_ngroups; Py_ssize_t __pyx_v_b; __pyx_t_5numpy_float64_t __pyx_v_val; __pyx_t_5numpy_float64_t __pyx_v_count; PyArrayObject *__pyx_v_sumx = 0; PyArrayObject *__pyx_v_nobs = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_bins; __Pyx_Buffer __pyx_pybuffer_bins; __Pyx_LocalBuf_ND __pyx_pybuffernd_counts; __Pyx_Buffer __pyx_pybuffer_counts; __Pyx_LocalBuf_ND __pyx_pybuffernd_nobs; __Pyx_Buffer __pyx_pybuffer_nobs; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_sumx; __Pyx_Buffer __pyx_pybuffer_sumx; __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; PyArrayObject *__pyx_t_4 = NULL; int __pyx_t_5; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; PyObject *(*__pyx_t_10)(PyObject *); Py_ssize_t __pyx_t_11; Py_ssize_t __pyx_t_12; Py_ssize_t __pyx_t_13; int __pyx_t_14; Py_ssize_t __pyx_t_15; int __pyx_t_16; int __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; long __pyx_t_28; Py_ssize_t __pyx_t_29; long __pyx_t_30; Py_ssize_t __pyx_t_31; long __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; Py_ssize_t __pyx_t_37; Py_ssize_t __pyx_t_38; Py_ssize_t __pyx_t_39; Py_ssize_t __pyx_t_40; Py_ssize_t __pyx_t_41; Py_ssize_t __pyx_t_42; __pyx_t_5numpy_float64_t __pyx_t_43; Py_ssize_t __pyx_t_44; Py_ssize_t __pyx_t_45; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("group_mean_bin_float64", 0); __pyx_pybuffer_sumx.pybuffer.buf = NULL; __pyx_pybuffer_sumx.refcount = 0; __pyx_pybuffernd_sumx.data = NULL; __pyx_pybuffernd_sumx.rcbuffer = &__pyx_pybuffer_sumx; __pyx_pybuffer_nobs.pybuffer.buf = NULL; __pyx_pybuffer_nobs.refcount = 0; __pyx_pybuffernd_nobs.data = NULL; __pyx_pybuffernd_nobs.rcbuffer = &__pyx_pybuffer_nobs; __pyx_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; __pyx_pybuffer_counts.pybuffer.buf = NULL; __pyx_pybuffer_counts.refcount = 0; __pyx_pybuffernd_counts.data = NULL; __pyx_pybuffernd_counts.rcbuffer = &__pyx_pybuffer_counts; __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_bins.pybuffer.buf = NULL; __pyx_pybuffer_bins.refcount = 0; __pyx_pybuffernd_bins.data = NULL; __pyx_pybuffernd_bins.rcbuffer = &__pyx_pybuffer_bins; { __Pyx_BufFmt_StackElem __pyx_stack[1]; 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, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6227; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; __pyx_pybuffernd_out.diminfo[1].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_out.diminfo[1].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[1]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_counts.rcbuffer->pybuffer, (PyObject*)__pyx_v_counts, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6227; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_counts.diminfo[0].strides = __pyx_pybuffernd_counts.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_counts.diminfo[0].shape = __pyx_pybuffernd_counts.rcbuffer->pybuffer.shape[0]; { __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, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6227; __pyx_clineno = __LINE__; goto __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_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_bins.rcbuffer->pybuffer, (PyObject*)__pyx_v_bins, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6227; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_bins.diminfo[0].strides = __pyx_pybuffernd_bins.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_bins.diminfo[0].shape = __pyx_pybuffernd_bins.rcbuffer->pybuffer.shape[0]; /* "pandas/src/generated.pyx":6236 * ndarray[float64_t, ndim=2] sumx, nobs * * nobs = np.zeros_like(out) # <<<<<<<<<<<<<< * sumx = np.zeros_like(out) * */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6236; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s__zeros_like); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6236; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 6236; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)__pyx_v_out)); PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_out)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out)); __pyx_t_3 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6236; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(((PyObject *)__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_filename = __pyx_f[2]; __pyx_lineno = 6236; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_4 = ((PyArrayObject *)__pyx_t_3); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer); __pyx_t_5 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer, (PyObject*)__pyx_t_4, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_nobs.rcbuffer->pybuffer, (PyObject*)__pyx_v_nobs, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_pybuffernd_nobs.diminfo[0].strides = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_nobs.diminfo[0].shape = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_nobs.diminfo[1].strides = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_nobs.diminfo[1].shape = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.shape[1]; if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6236; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_4 = 0; __pyx_v_nobs = ((PyArrayObject *)__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/generated.pyx":6237 * * nobs = np.zeros_like(out) * sumx = np.zeros_like(out) # <<<<<<<<<<<<<< * * N, K = ( values).shape */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6237; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s__zeros_like); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6237; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6237; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(((PyObject *)__pyx_v_out)); PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_v_out)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out)); __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6237; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(((PyObject *)__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_filename = __pyx_f[2]; __pyx_lineno = 6237; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_4 = ((PyArrayObject *)__pyx_t_2); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_sumx.rcbuffer->pybuffer); __pyx_t_5 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_sumx.rcbuffer->pybuffer, (PyObject*)__pyx_t_4, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_sumx.rcbuffer->pybuffer, (PyObject*)__pyx_v_sumx, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_pybuffernd_sumx.diminfo[0].strides = __pyx_pybuffernd_sumx.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_sumx.diminfo[0].shape = __pyx_pybuffernd_sumx.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_sumx.diminfo[1].strides = __pyx_pybuffernd_sumx.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_sumx.diminfo[1].shape = __pyx_pybuffernd_sumx.rcbuffer->pybuffer.shape[1]; if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6237; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_4 = 0; __pyx_v_sumx = ((PyArrayObject *)__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":6239 * sumx = np.zeros_like(out) * * N, K = ( values).shape # <<<<<<<<<<<<<< * if bins[len(bins) - 1] == len(values): * ngroups = len(bins) */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_values), __pyx_n_s__shape); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6239; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if ((likely(PyTuple_CheckExact(__pyx_t_2))) || (PyList_CheckExact(__pyx_t_2))) { PyObject* sequence = __pyx_t_2; #if CYTHON_COMPILING_IN_CPYTHON Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6239; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_1 = PyTuple_GET_ITEM(sequence, 1); } else { __pyx_t_3 = PyList_GET_ITEM(sequence, 0); __pyx_t_1 = PyList_GET_ITEM(sequence, 1); } __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(__pyx_t_1); #else __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6239; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6239; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); #endif __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } else { Py_ssize_t index = -1; __pyx_t_9 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6239; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_10 = Py_TYPE(__pyx_t_9)->tp_iternext; index = 0; __pyx_t_3 = __pyx_t_10(__pyx_t_9); if (unlikely(!__pyx_t_3)) goto __pyx_L3_unpacking_failed; __Pyx_GOTREF(__pyx_t_3); index = 1; __pyx_t_1 = __pyx_t_10(__pyx_t_9); if (unlikely(!__pyx_t_1)) goto __pyx_L3_unpacking_failed; __Pyx_GOTREF(__pyx_t_1); if (__Pyx_IternextUnpackEndCheck(__pyx_t_10(__pyx_t_9), 2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6239; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_10 = NULL; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; goto __pyx_L4_unpacking_done; __pyx_L3_unpacking_failed:; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_10 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6239; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_L4_unpacking_done:; } __pyx_t_11 = __Pyx_PyIndex_AsSsize_t(__pyx_t_3); if (unlikely((__pyx_t_11 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6239; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_12 = __Pyx_PyIndex_AsSsize_t(__pyx_t_1); if (unlikely((__pyx_t_12 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6239; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_N = __pyx_t_11; __pyx_v_K = __pyx_t_12; /* "pandas/src/generated.pyx":6240 * * N, K = ( values).shape * if bins[len(bins) - 1] == len(values): # <<<<<<<<<<<<<< * ngroups = len(bins) * else: */ __pyx_t_12 = PyObject_Length(((PyObject *)__pyx_v_bins)); if (unlikely(__pyx_t_12 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6240; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_11 = (__pyx_t_12 - 1); __pyx_t_5 = -1; if (__pyx_t_11 < 0) { __pyx_t_11 += __pyx_pybuffernd_bins.diminfo[0].shape; if (unlikely(__pyx_t_11 < 0)) __pyx_t_5 = 0; } else if (unlikely(__pyx_t_11 >= __pyx_pybuffernd_bins.diminfo[0].shape)) __pyx_t_5 = 0; if (unlikely(__pyx_t_5 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_5); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6240; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_13 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_13 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6240; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_14 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_bins.rcbuffer->pybuffer.buf, __pyx_t_11, __pyx_pybuffernd_bins.diminfo[0].strides)) == __pyx_t_13) != 0); if (__pyx_t_14) { /* "pandas/src/generated.pyx":6241 * N, K = ( values).shape * if bins[len(bins) - 1] == len(values): * ngroups = len(bins) # <<<<<<<<<<<<<< * else: * ngroups = len(bins) + 1 */ __pyx_t_13 = PyObject_Length(((PyObject *)__pyx_v_bins)); if (unlikely(__pyx_t_13 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6241; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_ngroups = __pyx_t_13; goto __pyx_L5; } /*else*/ { /* "pandas/src/generated.pyx":6243 * ngroups = len(bins) * else: * ngroups = len(bins) + 1 # <<<<<<<<<<<<<< * * b = 0 */ __pyx_t_13 = PyObject_Length(((PyObject *)__pyx_v_bins)); if (unlikely(__pyx_t_13 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6243; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_ngroups = (__pyx_t_13 + 1); } __pyx_L5:; /* "pandas/src/generated.pyx":6245 * ngroups = len(bins) + 1 * * b = 0 # <<<<<<<<<<<<<< * if K > 1: * for i in range(N): */ __pyx_v_b = 0; /* "pandas/src/generated.pyx":6246 * * b = 0 * if K > 1: # <<<<<<<<<<<<<< * for i in range(N): * while b < ngroups - 1 and i >= bins[b]: */ __pyx_t_14 = ((__pyx_v_K > 1) != 0); if (__pyx_t_14) { /* "pandas/src/generated.pyx":6247 * b = 0 * if K > 1: * for i in range(N): # <<<<<<<<<<<<<< * while b < ngroups - 1 and i >= bins[b]: * b += 1 */ __pyx_t_13 = __pyx_v_N; for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_13; __pyx_t_12+=1) { __pyx_v_i = __pyx_t_12; /* "pandas/src/generated.pyx":6248 * if K > 1: * for i in range(N): * while b < ngroups - 1 and i >= bins[b]: # <<<<<<<<<<<<<< * b += 1 * */ while (1) { __pyx_t_14 = ((__pyx_v_b < (__pyx_v_ngroups - 1)) != 0); if (__pyx_t_14) { __pyx_t_15 = __pyx_v_b; __pyx_t_5 = -1; if (__pyx_t_15 < 0) { __pyx_t_15 += __pyx_pybuffernd_bins.diminfo[0].shape; if (unlikely(__pyx_t_15 < 0)) __pyx_t_5 = 0; } else if (unlikely(__pyx_t_15 >= __pyx_pybuffernd_bins.diminfo[0].shape)) __pyx_t_5 = 0; if (unlikely(__pyx_t_5 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_5); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6248; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_16 = ((__pyx_v_i >= (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_bins.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_bins.diminfo[0].strides))) != 0); __pyx_t_17 = __pyx_t_16; } else { __pyx_t_17 = __pyx_t_14; } if (!__pyx_t_17) break; /* "pandas/src/generated.pyx":6249 * for i in range(N): * while b < ngroups - 1 and i >= bins[b]: * b += 1 # <<<<<<<<<<<<<< * * counts[b] += 1 */ __pyx_v_b = (__pyx_v_b + 1); } /* "pandas/src/generated.pyx":6251 * b += 1 * * counts[b] += 1 # <<<<<<<<<<<<<< * for j in range(K): * val = values[i, j] */ __pyx_t_18 = __pyx_v_b; __pyx_t_5 = -1; if (__pyx_t_18 < 0) { __pyx_t_18 += __pyx_pybuffernd_counts.diminfo[0].shape; if (unlikely(__pyx_t_18 < 0)) __pyx_t_5 = 0; } else if (unlikely(__pyx_t_18 >= __pyx_pybuffernd_counts.diminfo[0].shape)) __pyx_t_5 = 0; if (unlikely(__pyx_t_5 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_5); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6251; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_counts.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_counts.diminfo[0].strides) += 1; /* "pandas/src/generated.pyx":6252 * * counts[b] += 1 * for j in range(K): # <<<<<<<<<<<<<< * val = values[i, j] * */ __pyx_t_19 = __pyx_v_K; for (__pyx_t_20 = 0; __pyx_t_20 < __pyx_t_19; __pyx_t_20+=1) { __pyx_v_j = __pyx_t_20; /* "pandas/src/generated.pyx":6253 * counts[b] += 1 * for j in range(K): * val = values[i, j] # <<<<<<<<<<<<<< * * # not nan */ __pyx_t_21 = __pyx_v_i; __pyx_t_22 = __pyx_v_j; __pyx_t_5 = -1; if (__pyx_t_21 < 0) { __pyx_t_21 += __pyx_pybuffernd_values.diminfo[0].shape; if (unlikely(__pyx_t_21 < 0)) __pyx_t_5 = 0; } else if (unlikely(__pyx_t_21 >= __pyx_pybuffernd_values.diminfo[0].shape)) __pyx_t_5 = 0; if (__pyx_t_22 < 0) { __pyx_t_22 += __pyx_pybuffernd_values.diminfo[1].shape; if (unlikely(__pyx_t_22 < 0)) __pyx_t_5 = 1; } else if (unlikely(__pyx_t_22 >= __pyx_pybuffernd_values.diminfo[1].shape)) __pyx_t_5 = 1; if (unlikely(__pyx_t_5 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_5); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6253; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_val = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_22, __pyx_pybuffernd_values.diminfo[1].strides)); /* "pandas/src/generated.pyx":6256 * * # not nan * if val == val: # <<<<<<<<<<<<<< * nobs[b, j] += 1 * sumx[b, j] += val */ __pyx_t_17 = ((__pyx_v_val == __pyx_v_val) != 0); if (__pyx_t_17) { /* "pandas/src/generated.pyx":6257 * # not nan * if val == val: * nobs[b, j] += 1 # <<<<<<<<<<<<<< * sumx[b, j] += val * else: */ __pyx_t_23 = __pyx_v_b; __pyx_t_24 = __pyx_v_j; __pyx_t_5 = -1; if (__pyx_t_23 < 0) { __pyx_t_23 += __pyx_pybuffernd_nobs.diminfo[0].shape; if (unlikely(__pyx_t_23 < 0)) __pyx_t_5 = 0; } else if (unlikely(__pyx_t_23 >= __pyx_pybuffernd_nobs.diminfo[0].shape)) __pyx_t_5 = 0; if (__pyx_t_24 < 0) { __pyx_t_24 += __pyx_pybuffernd_nobs.diminfo[1].shape; if (unlikely(__pyx_t_24 < 0)) __pyx_t_5 = 1; } else if (unlikely(__pyx_t_24 >= __pyx_pybuffernd_nobs.diminfo[1].shape)) __pyx_t_5 = 1; if (unlikely(__pyx_t_5 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_5); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6257; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_nobs.rcbuffer->pybuffer.buf, __pyx_t_23, __pyx_pybuffernd_nobs.diminfo[0].strides, __pyx_t_24, __pyx_pybuffernd_nobs.diminfo[1].strides) += 1.0; /* "pandas/src/generated.pyx":6258 * if val == val: * nobs[b, j] += 1 * sumx[b, j] += val # <<<<<<<<<<<<<< * else: * for i in range(N): */ __pyx_t_25 = __pyx_v_b; __pyx_t_26 = __pyx_v_j; __pyx_t_5 = -1; if (__pyx_t_25 < 0) { __pyx_t_25 += __pyx_pybuffernd_sumx.diminfo[0].shape; if (unlikely(__pyx_t_25 < 0)) __pyx_t_5 = 0; } else if (unlikely(__pyx_t_25 >= __pyx_pybuffernd_sumx.diminfo[0].shape)) __pyx_t_5 = 0; if (__pyx_t_26 < 0) { __pyx_t_26 += __pyx_pybuffernd_sumx.diminfo[1].shape; if (unlikely(__pyx_t_26 < 0)) __pyx_t_5 = 1; } else if (unlikely(__pyx_t_26 >= __pyx_pybuffernd_sumx.diminfo[1].shape)) __pyx_t_5 = 1; if (unlikely(__pyx_t_5 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_5); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6258; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_sumx.rcbuffer->pybuffer.buf, __pyx_t_25, __pyx_pybuffernd_sumx.diminfo[0].strides, __pyx_t_26, __pyx_pybuffernd_sumx.diminfo[1].strides) += __pyx_v_val; goto __pyx_L13; } __pyx_L13:; } } goto __pyx_L6; } /*else*/ { /* "pandas/src/generated.pyx":6260 * sumx[b, j] += val * else: * for i in range(N): # <<<<<<<<<<<<<< * while b < ngroups - 1 and i >= bins[b]: * b += 1 */ __pyx_t_13 = __pyx_v_N; for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_13; __pyx_t_12+=1) { __pyx_v_i = __pyx_t_12; /* "pandas/src/generated.pyx":6261 * else: * for i in range(N): * while b < ngroups - 1 and i >= bins[b]: # <<<<<<<<<<<<<< * b += 1 * */ while (1) { __pyx_t_17 = ((__pyx_v_b < (__pyx_v_ngroups - 1)) != 0); if (__pyx_t_17) { __pyx_t_19 = __pyx_v_b; __pyx_t_5 = -1; if (__pyx_t_19 < 0) { __pyx_t_19 += __pyx_pybuffernd_bins.diminfo[0].shape; if (unlikely(__pyx_t_19 < 0)) __pyx_t_5 = 0; } else if (unlikely(__pyx_t_19 >= __pyx_pybuffernd_bins.diminfo[0].shape)) __pyx_t_5 = 0; if (unlikely(__pyx_t_5 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_5); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6261; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_14 = ((__pyx_v_i >= (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_bins.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_bins.diminfo[0].strides))) != 0); __pyx_t_16 = __pyx_t_14; } else { __pyx_t_16 = __pyx_t_17; } if (!__pyx_t_16) break; /* "pandas/src/generated.pyx":6262 * for i in range(N): * while b < ngroups - 1 and i >= bins[b]: * b += 1 # <<<<<<<<<<<<<< * * counts[b] += 1 */ __pyx_v_b = (__pyx_v_b + 1); } /* "pandas/src/generated.pyx":6264 * b += 1 * * counts[b] += 1 # <<<<<<<<<<<<<< * val = values[i, 0] * */ __pyx_t_20 = __pyx_v_b; __pyx_t_5 = -1; if (__pyx_t_20 < 0) { __pyx_t_20 += __pyx_pybuffernd_counts.diminfo[0].shape; if (unlikely(__pyx_t_20 < 0)) __pyx_t_5 = 0; } else if (unlikely(__pyx_t_20 >= __pyx_pybuffernd_counts.diminfo[0].shape)) __pyx_t_5 = 0; if (unlikely(__pyx_t_5 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_5); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6264; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_counts.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_counts.diminfo[0].strides) += 1; /* "pandas/src/generated.pyx":6265 * * counts[b] += 1 * val = values[i, 0] # <<<<<<<<<<<<<< * * # not nan */ __pyx_t_27 = __pyx_v_i; __pyx_t_28 = 0; __pyx_t_5 = -1; if (__pyx_t_27 < 0) { __pyx_t_27 += __pyx_pybuffernd_values.diminfo[0].shape; if (unlikely(__pyx_t_27 < 0)) __pyx_t_5 = 0; } else if (unlikely(__pyx_t_27 >= __pyx_pybuffernd_values.diminfo[0].shape)) __pyx_t_5 = 0; if (__pyx_t_28 < 0) { __pyx_t_28 += __pyx_pybuffernd_values.diminfo[1].shape; if (unlikely(__pyx_t_28 < 0)) __pyx_t_5 = 1; } else if (unlikely(__pyx_t_28 >= __pyx_pybuffernd_values.diminfo[1].shape)) __pyx_t_5 = 1; if (unlikely(__pyx_t_5 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_5); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6265; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_val = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_27, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_28, __pyx_pybuffernd_values.diminfo[1].strides)); /* "pandas/src/generated.pyx":6268 * * # not nan * if val == val: # <<<<<<<<<<<<<< * nobs[b, 0] += 1 * sumx[b, 0] += val */ __pyx_t_16 = ((__pyx_v_val == __pyx_v_val) != 0); if (__pyx_t_16) { /* "pandas/src/generated.pyx":6269 * # not nan * if val == val: * nobs[b, 0] += 1 # <<<<<<<<<<<<<< * sumx[b, 0] += val * */ __pyx_t_29 = __pyx_v_b; __pyx_t_30 = 0; __pyx_t_5 = -1; if (__pyx_t_29 < 0) { __pyx_t_29 += __pyx_pybuffernd_nobs.diminfo[0].shape; if (unlikely(__pyx_t_29 < 0)) __pyx_t_5 = 0; } else if (unlikely(__pyx_t_29 >= __pyx_pybuffernd_nobs.diminfo[0].shape)) __pyx_t_5 = 0; if (__pyx_t_30 < 0) { __pyx_t_30 += __pyx_pybuffernd_nobs.diminfo[1].shape; if (unlikely(__pyx_t_30 < 0)) __pyx_t_5 = 1; } else if (unlikely(__pyx_t_30 >= __pyx_pybuffernd_nobs.diminfo[1].shape)) __pyx_t_5 = 1; if (unlikely(__pyx_t_5 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_5); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6269; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_nobs.rcbuffer->pybuffer.buf, __pyx_t_29, __pyx_pybuffernd_nobs.diminfo[0].strides, __pyx_t_30, __pyx_pybuffernd_nobs.diminfo[1].strides) += 1.0; /* "pandas/src/generated.pyx":6270 * if val == val: * nobs[b, 0] += 1 * sumx[b, 0] += val # <<<<<<<<<<<<<< * * for i in range(ngroups): */ __pyx_t_31 = __pyx_v_b; __pyx_t_32 = 0; __pyx_t_5 = -1; if (__pyx_t_31 < 0) { __pyx_t_31 += __pyx_pybuffernd_sumx.diminfo[0].shape; if (unlikely(__pyx_t_31 < 0)) __pyx_t_5 = 0; } else if (unlikely(__pyx_t_31 >= __pyx_pybuffernd_sumx.diminfo[0].shape)) __pyx_t_5 = 0; if (__pyx_t_32 < 0) { __pyx_t_32 += __pyx_pybuffernd_sumx.diminfo[1].shape; if (unlikely(__pyx_t_32 < 0)) __pyx_t_5 = 1; } else if (unlikely(__pyx_t_32 >= __pyx_pybuffernd_sumx.diminfo[1].shape)) __pyx_t_5 = 1; if (unlikely(__pyx_t_5 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_5); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6270; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_sumx.rcbuffer->pybuffer.buf, __pyx_t_31, __pyx_pybuffernd_sumx.diminfo[0].strides, __pyx_t_32, __pyx_pybuffernd_sumx.diminfo[1].strides) += __pyx_v_val; goto __pyx_L18; } __pyx_L18:; } } __pyx_L6:; /* "pandas/src/generated.pyx":6272 * sumx[b, 0] += val * * for i in range(ngroups): # <<<<<<<<<<<<<< * for j in range(K): * count = nobs[i, j] */ __pyx_t_13 = __pyx_v_ngroups; for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_13; __pyx_t_12+=1) { __pyx_v_i = __pyx_t_12; /* "pandas/src/generated.pyx":6273 * * for i in range(ngroups): * for j in range(K): # <<<<<<<<<<<<<< * count = nobs[i, j] * if nobs[i, j] == 0: */ __pyx_t_33 = __pyx_v_K; for (__pyx_t_34 = 0; __pyx_t_34 < __pyx_t_33; __pyx_t_34+=1) { __pyx_v_j = __pyx_t_34; /* "pandas/src/generated.pyx":6274 * for i in range(ngroups): * for j in range(K): * count = nobs[i, j] # <<<<<<<<<<<<<< * if nobs[i, j] == 0: * out[i, j] = nan */ __pyx_t_35 = __pyx_v_i; __pyx_t_36 = __pyx_v_j; __pyx_t_5 = -1; if (__pyx_t_35 < 0) { __pyx_t_35 += __pyx_pybuffernd_nobs.diminfo[0].shape; if (unlikely(__pyx_t_35 < 0)) __pyx_t_5 = 0; } else if (unlikely(__pyx_t_35 >= __pyx_pybuffernd_nobs.diminfo[0].shape)) __pyx_t_5 = 0; if (__pyx_t_36 < 0) { __pyx_t_36 += __pyx_pybuffernd_nobs.diminfo[1].shape; if (unlikely(__pyx_t_36 < 0)) __pyx_t_5 = 1; } else if (unlikely(__pyx_t_36 >= __pyx_pybuffernd_nobs.diminfo[1].shape)) __pyx_t_5 = 1; if (unlikely(__pyx_t_5 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_5); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6274; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_count = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_nobs.rcbuffer->pybuffer.buf, __pyx_t_35, __pyx_pybuffernd_nobs.diminfo[0].strides, __pyx_t_36, __pyx_pybuffernd_nobs.diminfo[1].strides)); /* "pandas/src/generated.pyx":6275 * for j in range(K): * count = nobs[i, j] * if nobs[i, j] == 0: # <<<<<<<<<<<<<< * out[i, j] = nan * else: */ __pyx_t_37 = __pyx_v_i; __pyx_t_38 = __pyx_v_j; __pyx_t_5 = -1; if (__pyx_t_37 < 0) { __pyx_t_37 += __pyx_pybuffernd_nobs.diminfo[0].shape; if (unlikely(__pyx_t_37 < 0)) __pyx_t_5 = 0; } else if (unlikely(__pyx_t_37 >= __pyx_pybuffernd_nobs.diminfo[0].shape)) __pyx_t_5 = 0; if (__pyx_t_38 < 0) { __pyx_t_38 += __pyx_pybuffernd_nobs.diminfo[1].shape; if (unlikely(__pyx_t_38 < 0)) __pyx_t_5 = 1; } else if (unlikely(__pyx_t_38 >= __pyx_pybuffernd_nobs.diminfo[1].shape)) __pyx_t_5 = 1; if (unlikely(__pyx_t_5 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_5); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6275; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_16 = (((*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_nobs.rcbuffer->pybuffer.buf, __pyx_t_37, __pyx_pybuffernd_nobs.diminfo[0].strides, __pyx_t_38, __pyx_pybuffernd_nobs.diminfo[1].strides)) == 0.0) != 0); if (__pyx_t_16) { /* "pandas/src/generated.pyx":6276 * count = nobs[i, j] * if nobs[i, j] == 0: * out[i, j] = nan # <<<<<<<<<<<<<< * else: * out[i, j] = sumx[i, j] / count */ __pyx_t_39 = __pyx_v_i; __pyx_t_40 = __pyx_v_j; __pyx_t_5 = -1; if (__pyx_t_39 < 0) { __pyx_t_39 += __pyx_pybuffernd_out.diminfo[0].shape; if (unlikely(__pyx_t_39 < 0)) __pyx_t_5 = 0; } else if (unlikely(__pyx_t_39 >= __pyx_pybuffernd_out.diminfo[0].shape)) __pyx_t_5 = 0; if (__pyx_t_40 < 0) { __pyx_t_40 += __pyx_pybuffernd_out.diminfo[1].shape; if (unlikely(__pyx_t_40 < 0)) __pyx_t_5 = 1; } else if (unlikely(__pyx_t_40 >= __pyx_pybuffernd_out.diminfo[1].shape)) __pyx_t_5 = 1; if (unlikely(__pyx_t_5 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_5); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6276; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_39, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_40, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_6pandas_5algos_nan; goto __pyx_L23; } /*else*/ { /* "pandas/src/generated.pyx":6278 * out[i, j] = nan * else: * out[i, j] = sumx[i, j] / count # <<<<<<<<<<<<<< * * def group_mean_bin_float32(ndarray[float32_t, ndim=2] out, */ __pyx_t_41 = __pyx_v_i; __pyx_t_42 = __pyx_v_j; __pyx_t_5 = -1; if (__pyx_t_41 < 0) { __pyx_t_41 += __pyx_pybuffernd_sumx.diminfo[0].shape; if (unlikely(__pyx_t_41 < 0)) __pyx_t_5 = 0; } else if (unlikely(__pyx_t_41 >= __pyx_pybuffernd_sumx.diminfo[0].shape)) __pyx_t_5 = 0; if (__pyx_t_42 < 0) { __pyx_t_42 += __pyx_pybuffernd_sumx.diminfo[1].shape; if (unlikely(__pyx_t_42 < 0)) __pyx_t_5 = 1; } else if (unlikely(__pyx_t_42 >= __pyx_pybuffernd_sumx.diminfo[1].shape)) __pyx_t_5 = 1; if (unlikely(__pyx_t_5 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_5); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6278; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_43 = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_sumx.rcbuffer->pybuffer.buf, __pyx_t_41, __pyx_pybuffernd_sumx.diminfo[0].strides, __pyx_t_42, __pyx_pybuffernd_sumx.diminfo[1].strides)); if (unlikely(__pyx_v_count == 0)) { #ifdef WITH_THREAD PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure(); #endif PyErr_Format(PyExc_ZeroDivisionError, "float division"); #ifdef WITH_THREAD PyGILState_Release(__pyx_gilstate_save); #endif {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6278; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_44 = __pyx_v_i; __pyx_t_45 = __pyx_v_j; __pyx_t_5 = -1; if (__pyx_t_44 < 0) { __pyx_t_44 += __pyx_pybuffernd_out.diminfo[0].shape; if (unlikely(__pyx_t_44 < 0)) __pyx_t_5 = 0; } else if (unlikely(__pyx_t_44 >= __pyx_pybuffernd_out.diminfo[0].shape)) __pyx_t_5 = 0; if (__pyx_t_45 < 0) { __pyx_t_45 += __pyx_pybuffernd_out.diminfo[1].shape; if (unlikely(__pyx_t_45 < 0)) __pyx_t_5 = 1; } else if (unlikely(__pyx_t_45 >= __pyx_pybuffernd_out.diminfo[1].shape)) __pyx_t_5 = 1; if (unlikely(__pyx_t_5 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_5); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6278; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_44, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_45, __pyx_pybuffernd_out.diminfo[1].strides) = (__pyx_t_43 / __pyx_v_count); } __pyx_L23:; } } __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_9); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_bins.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_counts.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_sumx.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.group_mean_bin_float64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_bins.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_counts.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_sumx.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_sumx); __Pyx_XDECREF((PyObject *)__pyx_v_nobs); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_433group_mean_bin_float32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_433group_mean_bin_float32 = {__Pyx_NAMESTR("group_mean_bin_float32"), (PyCFunction)__pyx_pw_6pandas_5algos_433group_mean_bin_float32, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_433group_mean_bin_float32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_out = 0; PyArrayObject *__pyx_v_counts = 0; PyArrayObject *__pyx_v_values = 0; PyArrayObject *__pyx_v_bins = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("group_mean_bin_float32 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__out,&__pyx_n_s__counts,&__pyx_n_s__values,&__pyx_n_s__bins,0}; PyObject* values[4] = {0,0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__out)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__counts)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("group_mean_bin_float32", 1, 4, 4, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6280; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__values)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("group_mean_bin_float32", 1, 4, 4, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6280; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__bins)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("group_mean_bin_float32", 1, 4, 4, 3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6280; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "group_mean_bin_float32") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6280; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 4) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[3] = PyTuple_GET_ITEM(__pyx_args, 3); } __pyx_v_out = ((PyArrayObject *)values[0]); __pyx_v_counts = ((PyArrayObject *)values[1]); __pyx_v_values = ((PyArrayObject *)values[2]); __pyx_v_bins = ((PyArrayObject *)values[3]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("group_mean_bin_float32", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6280; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.group_mean_bin_float32", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_5numpy_ndarray, 1, "out", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6280; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_counts), __pyx_ptype_5numpy_ndarray, 1, "counts", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6281; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6282; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_bins), __pyx_ptype_5numpy_ndarray, 1, "bins", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6283; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_432group_mean_bin_float32(__pyx_self, __pyx_v_out, __pyx_v_counts, __pyx_v_values, __pyx_v_bins); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":6280 * out[i, j] = sumx[i, j] / count * * def group_mean_bin_float32(ndarray[float32_t, ndim=2] out, # <<<<<<<<<<<<<< * ndarray[int64_t] counts, * ndarray[float32_t, ndim=2] values, */ static PyObject *__pyx_pf_6pandas_5algos_432group_mean_bin_float32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_out, PyArrayObject *__pyx_v_counts, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_bins) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_N; Py_ssize_t __pyx_v_K; Py_ssize_t __pyx_v_ngroups; Py_ssize_t __pyx_v_b; __pyx_t_5numpy_float32_t __pyx_v_val; __pyx_t_5numpy_float32_t __pyx_v_count; PyArrayObject *__pyx_v_sumx = 0; PyArrayObject *__pyx_v_nobs = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_bins; __Pyx_Buffer __pyx_pybuffer_bins; __Pyx_LocalBuf_ND __pyx_pybuffernd_counts; __Pyx_Buffer __pyx_pybuffer_counts; __Pyx_LocalBuf_ND __pyx_pybuffernd_nobs; __Pyx_Buffer __pyx_pybuffer_nobs; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_sumx; __Pyx_Buffer __pyx_pybuffer_sumx; __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; PyArrayObject *__pyx_t_4 = NULL; int __pyx_t_5; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; PyObject *(*__pyx_t_10)(PyObject *); Py_ssize_t __pyx_t_11; Py_ssize_t __pyx_t_12; Py_ssize_t __pyx_t_13; int __pyx_t_14; Py_ssize_t __pyx_t_15; int __pyx_t_16; int __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; long __pyx_t_28; Py_ssize_t __pyx_t_29; long __pyx_t_30; Py_ssize_t __pyx_t_31; long __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; Py_ssize_t __pyx_t_37; Py_ssize_t __pyx_t_38; Py_ssize_t __pyx_t_39; Py_ssize_t __pyx_t_40; Py_ssize_t __pyx_t_41; Py_ssize_t __pyx_t_42; __pyx_t_5numpy_float32_t __pyx_t_43; Py_ssize_t __pyx_t_44; Py_ssize_t __pyx_t_45; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("group_mean_bin_float32", 0); __pyx_pybuffer_sumx.pybuffer.buf = NULL; __pyx_pybuffer_sumx.refcount = 0; __pyx_pybuffernd_sumx.data = NULL; __pyx_pybuffernd_sumx.rcbuffer = &__pyx_pybuffer_sumx; __pyx_pybuffer_nobs.pybuffer.buf = NULL; __pyx_pybuffer_nobs.refcount = 0; __pyx_pybuffernd_nobs.data = NULL; __pyx_pybuffernd_nobs.rcbuffer = &__pyx_pybuffer_nobs; __pyx_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; __pyx_pybuffer_counts.pybuffer.buf = NULL; __pyx_pybuffer_counts.refcount = 0; __pyx_pybuffernd_counts.data = NULL; __pyx_pybuffernd_counts.rcbuffer = &__pyx_pybuffer_counts; __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_bins.pybuffer.buf = NULL; __pyx_pybuffer_bins.refcount = 0; __pyx_pybuffernd_bins.data = NULL; __pyx_pybuffernd_bins.rcbuffer = &__pyx_pybuffer_bins; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_v_out, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6280; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; __pyx_pybuffernd_out.diminfo[1].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_out.diminfo[1].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[1]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_counts.rcbuffer->pybuffer, (PyObject*)__pyx_v_counts, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6280; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_counts.diminfo[0].strides = __pyx_pybuffernd_counts.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_counts.diminfo[0].shape = __pyx_pybuffernd_counts.rcbuffer->pybuffer.shape[0]; { __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_float32_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6280; __pyx_clineno = __LINE__; goto __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_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_bins.rcbuffer->pybuffer, (PyObject*)__pyx_v_bins, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6280; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_bins.diminfo[0].strides = __pyx_pybuffernd_bins.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_bins.diminfo[0].shape = __pyx_pybuffernd_bins.rcbuffer->pybuffer.shape[0]; /* "pandas/src/generated.pyx":6289 * ndarray[float32_t, ndim=2] sumx, nobs * * nobs = np.zeros_like(out) # <<<<<<<<<<<<<< * sumx = np.zeros_like(out) * */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6289; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s__zeros_like); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6289; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 6289; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)__pyx_v_out)); PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_out)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out)); __pyx_t_3 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6289; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(((PyObject *)__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_filename = __pyx_f[2]; __pyx_lineno = 6289; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_4 = ((PyArrayObject *)__pyx_t_3); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer); __pyx_t_5 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer, (PyObject*)__pyx_t_4, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_nobs.rcbuffer->pybuffer, (PyObject*)__pyx_v_nobs, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_pybuffernd_nobs.diminfo[0].strides = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_nobs.diminfo[0].shape = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_nobs.diminfo[1].strides = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_nobs.diminfo[1].shape = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.shape[1]; if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6289; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_4 = 0; __pyx_v_nobs = ((PyArrayObject *)__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/generated.pyx":6290 * * nobs = np.zeros_like(out) * sumx = np.zeros_like(out) # <<<<<<<<<<<<<< * * N, K = ( values).shape */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6290; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s__zeros_like); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6290; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6290; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(((PyObject *)__pyx_v_out)); PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_v_out)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out)); __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6290; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(((PyObject *)__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_filename = __pyx_f[2]; __pyx_lineno = 6290; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_4 = ((PyArrayObject *)__pyx_t_2); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_sumx.rcbuffer->pybuffer); __pyx_t_5 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_sumx.rcbuffer->pybuffer, (PyObject*)__pyx_t_4, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_sumx.rcbuffer->pybuffer, (PyObject*)__pyx_v_sumx, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_pybuffernd_sumx.diminfo[0].strides = __pyx_pybuffernd_sumx.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_sumx.diminfo[0].shape = __pyx_pybuffernd_sumx.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_sumx.diminfo[1].strides = __pyx_pybuffernd_sumx.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_sumx.diminfo[1].shape = __pyx_pybuffernd_sumx.rcbuffer->pybuffer.shape[1]; if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6290; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_4 = 0; __pyx_v_sumx = ((PyArrayObject *)__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":6292 * sumx = np.zeros_like(out) * * N, K = ( values).shape # <<<<<<<<<<<<<< * if bins[len(bins) - 1] == len(values): * ngroups = len(bins) */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_values), __pyx_n_s__shape); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6292; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if ((likely(PyTuple_CheckExact(__pyx_t_2))) || (PyList_CheckExact(__pyx_t_2))) { PyObject* sequence = __pyx_t_2; #if CYTHON_COMPILING_IN_CPYTHON Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6292; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_1 = PyTuple_GET_ITEM(sequence, 1); } else { __pyx_t_3 = PyList_GET_ITEM(sequence, 0); __pyx_t_1 = PyList_GET_ITEM(sequence, 1); } __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(__pyx_t_1); #else __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6292; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6292; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); #endif __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } else { Py_ssize_t index = -1; __pyx_t_9 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6292; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_10 = Py_TYPE(__pyx_t_9)->tp_iternext; index = 0; __pyx_t_3 = __pyx_t_10(__pyx_t_9); if (unlikely(!__pyx_t_3)) goto __pyx_L3_unpacking_failed; __Pyx_GOTREF(__pyx_t_3); index = 1; __pyx_t_1 = __pyx_t_10(__pyx_t_9); if (unlikely(!__pyx_t_1)) goto __pyx_L3_unpacking_failed; __Pyx_GOTREF(__pyx_t_1); if (__Pyx_IternextUnpackEndCheck(__pyx_t_10(__pyx_t_9), 2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6292; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_10 = NULL; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; goto __pyx_L4_unpacking_done; __pyx_L3_unpacking_failed:; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_10 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6292; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_L4_unpacking_done:; } __pyx_t_11 = __Pyx_PyIndex_AsSsize_t(__pyx_t_3); if (unlikely((__pyx_t_11 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6292; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_12 = __Pyx_PyIndex_AsSsize_t(__pyx_t_1); if (unlikely((__pyx_t_12 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6292; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_N = __pyx_t_11; __pyx_v_K = __pyx_t_12; /* "pandas/src/generated.pyx":6293 * * N, K = ( values).shape * if bins[len(bins) - 1] == len(values): # <<<<<<<<<<<<<< * ngroups = len(bins) * else: */ __pyx_t_12 = PyObject_Length(((PyObject *)__pyx_v_bins)); if (unlikely(__pyx_t_12 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6293; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_11 = (__pyx_t_12 - 1); __pyx_t_5 = -1; if (__pyx_t_11 < 0) { __pyx_t_11 += __pyx_pybuffernd_bins.diminfo[0].shape; if (unlikely(__pyx_t_11 < 0)) __pyx_t_5 = 0; } else if (unlikely(__pyx_t_11 >= __pyx_pybuffernd_bins.diminfo[0].shape)) __pyx_t_5 = 0; if (unlikely(__pyx_t_5 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_5); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6293; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_13 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_13 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6293; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_14 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_bins.rcbuffer->pybuffer.buf, __pyx_t_11, __pyx_pybuffernd_bins.diminfo[0].strides)) == __pyx_t_13) != 0); if (__pyx_t_14) { /* "pandas/src/generated.pyx":6294 * N, K = ( values).shape * if bins[len(bins) - 1] == len(values): * ngroups = len(bins) # <<<<<<<<<<<<<< * else: * ngroups = len(bins) + 1 */ __pyx_t_13 = PyObject_Length(((PyObject *)__pyx_v_bins)); if (unlikely(__pyx_t_13 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6294; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_ngroups = __pyx_t_13; goto __pyx_L5; } /*else*/ { /* "pandas/src/generated.pyx":6296 * ngroups = len(bins) * else: * ngroups = len(bins) + 1 # <<<<<<<<<<<<<< * * b = 0 */ __pyx_t_13 = PyObject_Length(((PyObject *)__pyx_v_bins)); if (unlikely(__pyx_t_13 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6296; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_ngroups = (__pyx_t_13 + 1); } __pyx_L5:; /* "pandas/src/generated.pyx":6298 * ngroups = len(bins) + 1 * * b = 0 # <<<<<<<<<<<<<< * if K > 1: * for i in range(N): */ __pyx_v_b = 0; /* "pandas/src/generated.pyx":6299 * * b = 0 * if K > 1: # <<<<<<<<<<<<<< * for i in range(N): * while b < ngroups - 1 and i >= bins[b]: */ __pyx_t_14 = ((__pyx_v_K > 1) != 0); if (__pyx_t_14) { /* "pandas/src/generated.pyx":6300 * b = 0 * if K > 1: * for i in range(N): # <<<<<<<<<<<<<< * while b < ngroups - 1 and i >= bins[b]: * b += 1 */ __pyx_t_13 = __pyx_v_N; for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_13; __pyx_t_12+=1) { __pyx_v_i = __pyx_t_12; /* "pandas/src/generated.pyx":6301 * if K > 1: * for i in range(N): * while b < ngroups - 1 and i >= bins[b]: # <<<<<<<<<<<<<< * b += 1 * */ while (1) { __pyx_t_14 = ((__pyx_v_b < (__pyx_v_ngroups - 1)) != 0); if (__pyx_t_14) { __pyx_t_15 = __pyx_v_b; __pyx_t_5 = -1; if (__pyx_t_15 < 0) { __pyx_t_15 += __pyx_pybuffernd_bins.diminfo[0].shape; if (unlikely(__pyx_t_15 < 0)) __pyx_t_5 = 0; } else if (unlikely(__pyx_t_15 >= __pyx_pybuffernd_bins.diminfo[0].shape)) __pyx_t_5 = 0; if (unlikely(__pyx_t_5 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_5); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6301; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_16 = ((__pyx_v_i >= (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_bins.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_bins.diminfo[0].strides))) != 0); __pyx_t_17 = __pyx_t_16; } else { __pyx_t_17 = __pyx_t_14; } if (!__pyx_t_17) break; /* "pandas/src/generated.pyx":6302 * for i in range(N): * while b < ngroups - 1 and i >= bins[b]: * b += 1 # <<<<<<<<<<<<<< * * counts[b] += 1 */ __pyx_v_b = (__pyx_v_b + 1); } /* "pandas/src/generated.pyx":6304 * b += 1 * * counts[b] += 1 # <<<<<<<<<<<<<< * for j in range(K): * val = values[i, j] */ __pyx_t_18 = __pyx_v_b; __pyx_t_5 = -1; if (__pyx_t_18 < 0) { __pyx_t_18 += __pyx_pybuffernd_counts.diminfo[0].shape; if (unlikely(__pyx_t_18 < 0)) __pyx_t_5 = 0; } else if (unlikely(__pyx_t_18 >= __pyx_pybuffernd_counts.diminfo[0].shape)) __pyx_t_5 = 0; if (unlikely(__pyx_t_5 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_5); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6304; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_counts.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_counts.diminfo[0].strides) += 1; /* "pandas/src/generated.pyx":6305 * * counts[b] += 1 * for j in range(K): # <<<<<<<<<<<<<< * val = values[i, j] * */ __pyx_t_19 = __pyx_v_K; for (__pyx_t_20 = 0; __pyx_t_20 < __pyx_t_19; __pyx_t_20+=1) { __pyx_v_j = __pyx_t_20; /* "pandas/src/generated.pyx":6306 * counts[b] += 1 * for j in range(K): * val = values[i, j] # <<<<<<<<<<<<<< * * # not nan */ __pyx_t_21 = __pyx_v_i; __pyx_t_22 = __pyx_v_j; __pyx_t_5 = -1; if (__pyx_t_21 < 0) { __pyx_t_21 += __pyx_pybuffernd_values.diminfo[0].shape; if (unlikely(__pyx_t_21 < 0)) __pyx_t_5 = 0; } else if (unlikely(__pyx_t_21 >= __pyx_pybuffernd_values.diminfo[0].shape)) __pyx_t_5 = 0; if (__pyx_t_22 < 0) { __pyx_t_22 += __pyx_pybuffernd_values.diminfo[1].shape; if (unlikely(__pyx_t_22 < 0)) __pyx_t_5 = 1; } else if (unlikely(__pyx_t_22 >= __pyx_pybuffernd_values.diminfo[1].shape)) __pyx_t_5 = 1; if (unlikely(__pyx_t_5 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_5); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6306; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_val = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_22, __pyx_pybuffernd_values.diminfo[1].strides)); /* "pandas/src/generated.pyx":6309 * * # not nan * if val == val: # <<<<<<<<<<<<<< * nobs[b, j] += 1 * sumx[b, j] += val */ __pyx_t_17 = ((__pyx_v_val == __pyx_v_val) != 0); if (__pyx_t_17) { /* "pandas/src/generated.pyx":6310 * # not nan * if val == val: * nobs[b, j] += 1 # <<<<<<<<<<<<<< * sumx[b, j] += val * else: */ __pyx_t_23 = __pyx_v_b; __pyx_t_24 = __pyx_v_j; __pyx_t_5 = -1; if (__pyx_t_23 < 0) { __pyx_t_23 += __pyx_pybuffernd_nobs.diminfo[0].shape; if (unlikely(__pyx_t_23 < 0)) __pyx_t_5 = 0; } else if (unlikely(__pyx_t_23 >= __pyx_pybuffernd_nobs.diminfo[0].shape)) __pyx_t_5 = 0; if (__pyx_t_24 < 0) { __pyx_t_24 += __pyx_pybuffernd_nobs.diminfo[1].shape; if (unlikely(__pyx_t_24 < 0)) __pyx_t_5 = 1; } else if (unlikely(__pyx_t_24 >= __pyx_pybuffernd_nobs.diminfo[1].shape)) __pyx_t_5 = 1; if (unlikely(__pyx_t_5 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_5); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6310; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_nobs.rcbuffer->pybuffer.buf, __pyx_t_23, __pyx_pybuffernd_nobs.diminfo[0].strides, __pyx_t_24, __pyx_pybuffernd_nobs.diminfo[1].strides) += 1.0; /* "pandas/src/generated.pyx":6311 * if val == val: * nobs[b, j] += 1 * sumx[b, j] += val # <<<<<<<<<<<<<< * else: * for i in range(N): */ __pyx_t_25 = __pyx_v_b; __pyx_t_26 = __pyx_v_j; __pyx_t_5 = -1; if (__pyx_t_25 < 0) { __pyx_t_25 += __pyx_pybuffernd_sumx.diminfo[0].shape; if (unlikely(__pyx_t_25 < 0)) __pyx_t_5 = 0; } else if (unlikely(__pyx_t_25 >= __pyx_pybuffernd_sumx.diminfo[0].shape)) __pyx_t_5 = 0; if (__pyx_t_26 < 0) { __pyx_t_26 += __pyx_pybuffernd_sumx.diminfo[1].shape; if (unlikely(__pyx_t_26 < 0)) __pyx_t_5 = 1; } else if (unlikely(__pyx_t_26 >= __pyx_pybuffernd_sumx.diminfo[1].shape)) __pyx_t_5 = 1; if (unlikely(__pyx_t_5 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_5); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6311; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_sumx.rcbuffer->pybuffer.buf, __pyx_t_25, __pyx_pybuffernd_sumx.diminfo[0].strides, __pyx_t_26, __pyx_pybuffernd_sumx.diminfo[1].strides) += __pyx_v_val; goto __pyx_L13; } __pyx_L13:; } } goto __pyx_L6; } /*else*/ { /* "pandas/src/generated.pyx":6313 * sumx[b, j] += val * else: * for i in range(N): # <<<<<<<<<<<<<< * while b < ngroups - 1 and i >= bins[b]: * b += 1 */ __pyx_t_13 = __pyx_v_N; for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_13; __pyx_t_12+=1) { __pyx_v_i = __pyx_t_12; /* "pandas/src/generated.pyx":6314 * else: * for i in range(N): * while b < ngroups - 1 and i >= bins[b]: # <<<<<<<<<<<<<< * b += 1 * */ while (1) { __pyx_t_17 = ((__pyx_v_b < (__pyx_v_ngroups - 1)) != 0); if (__pyx_t_17) { __pyx_t_19 = __pyx_v_b; __pyx_t_5 = -1; if (__pyx_t_19 < 0) { __pyx_t_19 += __pyx_pybuffernd_bins.diminfo[0].shape; if (unlikely(__pyx_t_19 < 0)) __pyx_t_5 = 0; } else if (unlikely(__pyx_t_19 >= __pyx_pybuffernd_bins.diminfo[0].shape)) __pyx_t_5 = 0; if (unlikely(__pyx_t_5 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_5); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6314; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_14 = ((__pyx_v_i >= (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_bins.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_bins.diminfo[0].strides))) != 0); __pyx_t_16 = __pyx_t_14; } else { __pyx_t_16 = __pyx_t_17; } if (!__pyx_t_16) break; /* "pandas/src/generated.pyx":6315 * for i in range(N): * while b < ngroups - 1 and i >= bins[b]: * b += 1 # <<<<<<<<<<<<<< * * counts[b] += 1 */ __pyx_v_b = (__pyx_v_b + 1); } /* "pandas/src/generated.pyx":6317 * b += 1 * * counts[b] += 1 # <<<<<<<<<<<<<< * val = values[i, 0] * */ __pyx_t_20 = __pyx_v_b; __pyx_t_5 = -1; if (__pyx_t_20 < 0) { __pyx_t_20 += __pyx_pybuffernd_counts.diminfo[0].shape; if (unlikely(__pyx_t_20 < 0)) __pyx_t_5 = 0; } else if (unlikely(__pyx_t_20 >= __pyx_pybuffernd_counts.diminfo[0].shape)) __pyx_t_5 = 0; if (unlikely(__pyx_t_5 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_5); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6317; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_counts.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_counts.diminfo[0].strides) += 1; /* "pandas/src/generated.pyx":6318 * * counts[b] += 1 * val = values[i, 0] # <<<<<<<<<<<<<< * * # not nan */ __pyx_t_27 = __pyx_v_i; __pyx_t_28 = 0; __pyx_t_5 = -1; if (__pyx_t_27 < 0) { __pyx_t_27 += __pyx_pybuffernd_values.diminfo[0].shape; if (unlikely(__pyx_t_27 < 0)) __pyx_t_5 = 0; } else if (unlikely(__pyx_t_27 >= __pyx_pybuffernd_values.diminfo[0].shape)) __pyx_t_5 = 0; if (__pyx_t_28 < 0) { __pyx_t_28 += __pyx_pybuffernd_values.diminfo[1].shape; if (unlikely(__pyx_t_28 < 0)) __pyx_t_5 = 1; } else if (unlikely(__pyx_t_28 >= __pyx_pybuffernd_values.diminfo[1].shape)) __pyx_t_5 = 1; if (unlikely(__pyx_t_5 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_5); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6318; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_val = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_27, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_28, __pyx_pybuffernd_values.diminfo[1].strides)); /* "pandas/src/generated.pyx":6321 * * # not nan * if val == val: # <<<<<<<<<<<<<< * nobs[b, 0] += 1 * sumx[b, 0] += val */ __pyx_t_16 = ((__pyx_v_val == __pyx_v_val) != 0); if (__pyx_t_16) { /* "pandas/src/generated.pyx":6322 * # not nan * if val == val: * nobs[b, 0] += 1 # <<<<<<<<<<<<<< * sumx[b, 0] += val * */ __pyx_t_29 = __pyx_v_b; __pyx_t_30 = 0; __pyx_t_5 = -1; if (__pyx_t_29 < 0) { __pyx_t_29 += __pyx_pybuffernd_nobs.diminfo[0].shape; if (unlikely(__pyx_t_29 < 0)) __pyx_t_5 = 0; } else if (unlikely(__pyx_t_29 >= __pyx_pybuffernd_nobs.diminfo[0].shape)) __pyx_t_5 = 0; if (__pyx_t_30 < 0) { __pyx_t_30 += __pyx_pybuffernd_nobs.diminfo[1].shape; if (unlikely(__pyx_t_30 < 0)) __pyx_t_5 = 1; } else if (unlikely(__pyx_t_30 >= __pyx_pybuffernd_nobs.diminfo[1].shape)) __pyx_t_5 = 1; if (unlikely(__pyx_t_5 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_5); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6322; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_nobs.rcbuffer->pybuffer.buf, __pyx_t_29, __pyx_pybuffernd_nobs.diminfo[0].strides, __pyx_t_30, __pyx_pybuffernd_nobs.diminfo[1].strides) += 1.0; /* "pandas/src/generated.pyx":6323 * if val == val: * nobs[b, 0] += 1 * sumx[b, 0] += val # <<<<<<<<<<<<<< * * for i in range(ngroups): */ __pyx_t_31 = __pyx_v_b; __pyx_t_32 = 0; __pyx_t_5 = -1; if (__pyx_t_31 < 0) { __pyx_t_31 += __pyx_pybuffernd_sumx.diminfo[0].shape; if (unlikely(__pyx_t_31 < 0)) __pyx_t_5 = 0; } else if (unlikely(__pyx_t_31 >= __pyx_pybuffernd_sumx.diminfo[0].shape)) __pyx_t_5 = 0; if (__pyx_t_32 < 0) { __pyx_t_32 += __pyx_pybuffernd_sumx.diminfo[1].shape; if (unlikely(__pyx_t_32 < 0)) __pyx_t_5 = 1; } else if (unlikely(__pyx_t_32 >= __pyx_pybuffernd_sumx.diminfo[1].shape)) __pyx_t_5 = 1; if (unlikely(__pyx_t_5 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_5); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6323; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_sumx.rcbuffer->pybuffer.buf, __pyx_t_31, __pyx_pybuffernd_sumx.diminfo[0].strides, __pyx_t_32, __pyx_pybuffernd_sumx.diminfo[1].strides) += __pyx_v_val; goto __pyx_L18; } __pyx_L18:; } } __pyx_L6:; /* "pandas/src/generated.pyx":6325 * sumx[b, 0] += val * * for i in range(ngroups): # <<<<<<<<<<<<<< * for j in range(K): * count = nobs[i, j] */ __pyx_t_13 = __pyx_v_ngroups; for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_13; __pyx_t_12+=1) { __pyx_v_i = __pyx_t_12; /* "pandas/src/generated.pyx":6326 * * for i in range(ngroups): * for j in range(K): # <<<<<<<<<<<<<< * count = nobs[i, j] * if nobs[i, j] == 0: */ __pyx_t_33 = __pyx_v_K; for (__pyx_t_34 = 0; __pyx_t_34 < __pyx_t_33; __pyx_t_34+=1) { __pyx_v_j = __pyx_t_34; /* "pandas/src/generated.pyx":6327 * for i in range(ngroups): * for j in range(K): * count = nobs[i, j] # <<<<<<<<<<<<<< * if nobs[i, j] == 0: * out[i, j] = nan */ __pyx_t_35 = __pyx_v_i; __pyx_t_36 = __pyx_v_j; __pyx_t_5 = -1; if (__pyx_t_35 < 0) { __pyx_t_35 += __pyx_pybuffernd_nobs.diminfo[0].shape; if (unlikely(__pyx_t_35 < 0)) __pyx_t_5 = 0; } else if (unlikely(__pyx_t_35 >= __pyx_pybuffernd_nobs.diminfo[0].shape)) __pyx_t_5 = 0; if (__pyx_t_36 < 0) { __pyx_t_36 += __pyx_pybuffernd_nobs.diminfo[1].shape; if (unlikely(__pyx_t_36 < 0)) __pyx_t_5 = 1; } else if (unlikely(__pyx_t_36 >= __pyx_pybuffernd_nobs.diminfo[1].shape)) __pyx_t_5 = 1; if (unlikely(__pyx_t_5 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_5); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6327; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_count = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_nobs.rcbuffer->pybuffer.buf, __pyx_t_35, __pyx_pybuffernd_nobs.diminfo[0].strides, __pyx_t_36, __pyx_pybuffernd_nobs.diminfo[1].strides)); /* "pandas/src/generated.pyx":6328 * for j in range(K): * count = nobs[i, j] * if nobs[i, j] == 0: # <<<<<<<<<<<<<< * out[i, j] = nan * else: */ __pyx_t_37 = __pyx_v_i; __pyx_t_38 = __pyx_v_j; __pyx_t_5 = -1; if (__pyx_t_37 < 0) { __pyx_t_37 += __pyx_pybuffernd_nobs.diminfo[0].shape; if (unlikely(__pyx_t_37 < 0)) __pyx_t_5 = 0; } else if (unlikely(__pyx_t_37 >= __pyx_pybuffernd_nobs.diminfo[0].shape)) __pyx_t_5 = 0; if (__pyx_t_38 < 0) { __pyx_t_38 += __pyx_pybuffernd_nobs.diminfo[1].shape; if (unlikely(__pyx_t_38 < 0)) __pyx_t_5 = 1; } else if (unlikely(__pyx_t_38 >= __pyx_pybuffernd_nobs.diminfo[1].shape)) __pyx_t_5 = 1; if (unlikely(__pyx_t_5 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_5); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6328; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_16 = (((*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_nobs.rcbuffer->pybuffer.buf, __pyx_t_37, __pyx_pybuffernd_nobs.diminfo[0].strides, __pyx_t_38, __pyx_pybuffernd_nobs.diminfo[1].strides)) == 0.0) != 0); if (__pyx_t_16) { /* "pandas/src/generated.pyx":6329 * count = nobs[i, j] * if nobs[i, j] == 0: * out[i, j] = nan # <<<<<<<<<<<<<< * else: * out[i, j] = sumx[i, j] / count */ __pyx_t_39 = __pyx_v_i; __pyx_t_40 = __pyx_v_j; __pyx_t_5 = -1; if (__pyx_t_39 < 0) { __pyx_t_39 += __pyx_pybuffernd_out.diminfo[0].shape; if (unlikely(__pyx_t_39 < 0)) __pyx_t_5 = 0; } else if (unlikely(__pyx_t_39 >= __pyx_pybuffernd_out.diminfo[0].shape)) __pyx_t_5 = 0; if (__pyx_t_40 < 0) { __pyx_t_40 += __pyx_pybuffernd_out.diminfo[1].shape; if (unlikely(__pyx_t_40 < 0)) __pyx_t_5 = 1; } else if (unlikely(__pyx_t_40 >= __pyx_pybuffernd_out.diminfo[1].shape)) __pyx_t_5 = 1; if (unlikely(__pyx_t_5 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_5); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6329; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_39, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_40, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_6pandas_5algos_nan; goto __pyx_L23; } /*else*/ { /* "pandas/src/generated.pyx":6331 * out[i, j] = nan * else: * out[i, j] = sumx[i, j] / count # <<<<<<<<<<<<<< * * @cython.wraparound(False) */ __pyx_t_41 = __pyx_v_i; __pyx_t_42 = __pyx_v_j; __pyx_t_5 = -1; if (__pyx_t_41 < 0) { __pyx_t_41 += __pyx_pybuffernd_sumx.diminfo[0].shape; if (unlikely(__pyx_t_41 < 0)) __pyx_t_5 = 0; } else if (unlikely(__pyx_t_41 >= __pyx_pybuffernd_sumx.diminfo[0].shape)) __pyx_t_5 = 0; if (__pyx_t_42 < 0) { __pyx_t_42 += __pyx_pybuffernd_sumx.diminfo[1].shape; if (unlikely(__pyx_t_42 < 0)) __pyx_t_5 = 1; } else if (unlikely(__pyx_t_42 >= __pyx_pybuffernd_sumx.diminfo[1].shape)) __pyx_t_5 = 1; if (unlikely(__pyx_t_5 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_5); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6331; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_43 = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_sumx.rcbuffer->pybuffer.buf, __pyx_t_41, __pyx_pybuffernd_sumx.diminfo[0].strides, __pyx_t_42, __pyx_pybuffernd_sumx.diminfo[1].strides)); if (unlikely(__pyx_v_count == 0)) { #ifdef WITH_THREAD PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure(); #endif PyErr_Format(PyExc_ZeroDivisionError, "float division"); #ifdef WITH_THREAD PyGILState_Release(__pyx_gilstate_save); #endif {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6331; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_44 = __pyx_v_i; __pyx_t_45 = __pyx_v_j; __pyx_t_5 = -1; if (__pyx_t_44 < 0) { __pyx_t_44 += __pyx_pybuffernd_out.diminfo[0].shape; if (unlikely(__pyx_t_44 < 0)) __pyx_t_5 = 0; } else if (unlikely(__pyx_t_44 >= __pyx_pybuffernd_out.diminfo[0].shape)) __pyx_t_5 = 0; if (__pyx_t_45 < 0) { __pyx_t_45 += __pyx_pybuffernd_out.diminfo[1].shape; if (unlikely(__pyx_t_45 < 0)) __pyx_t_5 = 1; } else if (unlikely(__pyx_t_45 >= __pyx_pybuffernd_out.diminfo[1].shape)) __pyx_t_5 = 1; if (unlikely(__pyx_t_5 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_5); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6331; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_44, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_45, __pyx_pybuffernd_out.diminfo[1].strides) = (__pyx_t_43 / __pyx_v_count); } __pyx_L23:; } } __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_9); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_bins.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_counts.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_sumx.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.group_mean_bin_float32", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_bins.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_counts.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_sumx.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_sumx); __Pyx_XDECREF((PyObject *)__pyx_v_nobs); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_435group_min_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6pandas_5algos_434group_min_float64[] = "\n Only aggregates on axis=0\n "; static PyMethodDef __pyx_mdef_6pandas_5algos_435group_min_float64 = {__Pyx_NAMESTR("group_min_float64"), (PyCFunction)__pyx_pw_6pandas_5algos_435group_min_float64, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_5algos_434group_min_float64)}; static PyObject *__pyx_pw_6pandas_5algos_435group_min_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_out = 0; PyArrayObject *__pyx_v_counts = 0; PyArrayObject *__pyx_v_values = 0; PyArrayObject *__pyx_v_labels = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("group_min_float64 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__out,&__pyx_n_s__counts,&__pyx_n_s__values,&__pyx_n_s__labels,0}; PyObject* values[4] = {0,0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__out)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__counts)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("group_min_float64", 1, 4, 4, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6335; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__values)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("group_min_float64", 1, 4, 4, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6335; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__labels)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("group_min_float64", 1, 4, 4, 3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6335; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "group_min_float64") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6335; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 4) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[3] = PyTuple_GET_ITEM(__pyx_args, 3); } __pyx_v_out = ((PyArrayObject *)values[0]); __pyx_v_counts = ((PyArrayObject *)values[1]); __pyx_v_values = ((PyArrayObject *)values[2]); __pyx_v_labels = ((PyArrayObject *)values[3]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("group_min_float64", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6335; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.group_min_float64", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_5numpy_ndarray, 1, "out", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6335; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_counts), __pyx_ptype_5numpy_ndarray, 1, "counts", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6336; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6337; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_labels), __pyx_ptype_5numpy_ndarray, 1, "labels", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6338; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_434group_min_float64(__pyx_self, __pyx_v_out, __pyx_v_counts, __pyx_v_values, __pyx_v_labels); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":6335 * @cython.wraparound(False) * @cython.boundscheck(False) * def group_min_float64(ndarray[float64_t, ndim=2] out, # <<<<<<<<<<<<<< * ndarray[int64_t] counts, * ndarray[float64_t, ndim=2] values, */ static PyObject *__pyx_pf_6pandas_5algos_434group_min_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_out, PyArrayObject *__pyx_v_counts, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_labels) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_N; Py_ssize_t __pyx_v_K; Py_ssize_t __pyx_v_lab; __pyx_t_5numpy_float64_t __pyx_v_val; PyArrayObject *__pyx_v_minx = 0; PyArrayObject *__pyx_v_nobs = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_counts; __Pyx_Buffer __pyx_pybuffer_counts; __Pyx_LocalBuf_ND __pyx_pybuffernd_labels; __Pyx_Buffer __pyx_pybuffer_labels; __Pyx_LocalBuf_ND __pyx_pybuffernd_minx; __Pyx_Buffer __pyx_pybuffer_minx; __Pyx_LocalBuf_ND __pyx_pybuffernd_nobs; __Pyx_Buffer __pyx_pybuffer_nobs; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_values; __Pyx_Buffer __pyx_pybuffer_values; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; Py_ssize_t __pyx_t_2; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyArrayObject *__pyx_t_7 = NULL; int __pyx_t_8; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; PyObject *__pyx_t_11 = NULL; PyObject *__pyx_t_12 = NULL; PyObject *(*__pyx_t_13)(PyObject *); 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; Py_ssize_t __pyx_t_26; long __pyx_t_27; Py_ssize_t __pyx_t_28; long __pyx_t_29; Py_ssize_t __pyx_t_30; long __pyx_t_31; Py_ssize_t __pyx_t_32; long __pyx_t_33; Py_ssize_t __pyx_t_34; Py_ssize_t __pyx_t_35; Py_ssize_t __pyx_t_36; Py_ssize_t __pyx_t_37; Py_ssize_t __pyx_t_38; Py_ssize_t __pyx_t_39; Py_ssize_t __pyx_t_40; Py_ssize_t __pyx_t_41; Py_ssize_t __pyx_t_42; Py_ssize_t __pyx_t_43; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("group_min_float64", 0); __pyx_pybuffer_minx.pybuffer.buf = NULL; __pyx_pybuffer_minx.refcount = 0; __pyx_pybuffernd_minx.data = NULL; __pyx_pybuffernd_minx.rcbuffer = &__pyx_pybuffer_minx; __pyx_pybuffer_nobs.pybuffer.buf = NULL; __pyx_pybuffer_nobs.refcount = 0; __pyx_pybuffernd_nobs.data = NULL; __pyx_pybuffernd_nobs.rcbuffer = &__pyx_pybuffer_nobs; __pyx_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; __pyx_pybuffer_counts.pybuffer.buf = NULL; __pyx_pybuffer_counts.refcount = 0; __pyx_pybuffernd_counts.data = NULL; __pyx_pybuffernd_counts.rcbuffer = &__pyx_pybuffer_counts; __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_labels.pybuffer.buf = NULL; __pyx_pybuffer_labels.refcount = 0; __pyx_pybuffernd_labels.data = NULL; __pyx_pybuffernd_labels.rcbuffer = &__pyx_pybuffer_labels; { __Pyx_BufFmt_StackElem __pyx_stack[1]; 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, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6335; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; __pyx_pybuffernd_out.diminfo[1].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_out.diminfo[1].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[1]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_counts.rcbuffer->pybuffer, (PyObject*)__pyx_v_counts, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6335; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_counts.diminfo[0].strides = __pyx_pybuffernd_counts.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_counts.diminfo[0].shape = __pyx_pybuffernd_counts.rcbuffer->pybuffer.shape[0]; { __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, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6335; __pyx_clineno = __LINE__; goto __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_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_labels.rcbuffer->pybuffer, (PyObject*)__pyx_v_labels, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6335; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_labels.diminfo[0].strides = __pyx_pybuffernd_labels.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_labels.diminfo[0].shape = __pyx_pybuffernd_labels.rcbuffer->pybuffer.shape[0]; /* "pandas/src/generated.pyx":6347 * ndarray[float64_t, ndim=2] minx, nobs * * if not len(values) == len(labels): # <<<<<<<<<<<<<< * raise AssertionError("len(index) != len(labels)") * */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6347; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_2 = PyObject_Length(((PyObject *)__pyx_v_labels)); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6347; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_3 = ((!((__pyx_t_1 == __pyx_t_2) != 0)) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":6348 * * if not len(values) == len(labels): * raise AssertionError("len(index) != len(labels)") # <<<<<<<<<<<<<< * * nobs = np.zeros_like(out) */ __pyx_t_4 = PyObject_Call(__pyx_builtin_AssertionError, ((PyObject *)__pyx_k_tuple_196), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6348; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 6348; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L3; } __pyx_L3:; /* "pandas/src/generated.pyx":6350 * raise AssertionError("len(index) != len(labels)") * * nobs = np.zeros_like(out) # <<<<<<<<<<<<<< * * minx = np.empty_like(out) */ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6350; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s__zeros_like); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6350; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6350; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(((PyObject *)__pyx_v_out)); PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_v_out)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out)); __pyx_t_6 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6350; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6350; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_7 = ((PyArrayObject *)__pyx_t_6); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer); __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_nobs.rcbuffer->pybuffer, (PyObject*)__pyx_v_nobs, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_pybuffernd_nobs.diminfo[0].strides = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_nobs.diminfo[0].shape = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_nobs.diminfo[1].strides = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_nobs.diminfo[1].shape = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.shape[1]; if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6350; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_7 = 0; __pyx_v_nobs = ((PyArrayObject *)__pyx_t_6); __pyx_t_6 = 0; /* "pandas/src/generated.pyx":6352 * nobs = np.zeros_like(out) * * minx = np.empty_like(out) # <<<<<<<<<<<<<< * minx.fill(np.inf) * */ __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6352; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s__empty_like); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6352; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6352; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(((PyObject *)__pyx_v_out)); PyTuple_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_v_out)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out)); __pyx_t_5 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6352; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0; if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6352; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_7 = ((PyArrayObject *)__pyx_t_5); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_minx.rcbuffer->pybuffer); __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_minx.rcbuffer->pybuffer, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_minx.rcbuffer->pybuffer, (PyObject*)__pyx_v_minx, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_pybuffernd_minx.diminfo[0].strides = __pyx_pybuffernd_minx.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_minx.diminfo[0].shape = __pyx_pybuffernd_minx.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_minx.diminfo[1].strides = __pyx_pybuffernd_minx.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_minx.diminfo[1].shape = __pyx_pybuffernd_minx.rcbuffer->pybuffer.shape[1]; if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6352; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_7 = 0; __pyx_v_minx = ((PyArrayObject *)__pyx_t_5); __pyx_t_5 = 0; /* "pandas/src/generated.pyx":6353 * * minx = np.empty_like(out) * minx.fill(np.inf) # <<<<<<<<<<<<<< * * N, K = ( values).shape */ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_minx), __pyx_n_s__fill); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6353; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6353; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s__inf); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6353; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6353; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6353; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "pandas/src/generated.pyx":6355 * minx.fill(np.inf) * * N, K = ( values).shape # <<<<<<<<<<<<<< * * if K > 1: */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_values), __pyx_n_s__shape); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6355; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); if ((likely(PyTuple_CheckExact(__pyx_t_4))) || (PyList_CheckExact(__pyx_t_4))) { PyObject* sequence = __pyx_t_4; #if CYTHON_COMPILING_IN_CPYTHON Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6355; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_6 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_5 = PyTuple_GET_ITEM(sequence, 1); } else { __pyx_t_6 = PyList_GET_ITEM(sequence, 0); __pyx_t_5 = PyList_GET_ITEM(sequence, 1); } __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(__pyx_t_5); #else __pyx_t_6 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6355; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_5 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6355; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); #endif __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else { Py_ssize_t index = -1; __pyx_t_12 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6355; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_13 = Py_TYPE(__pyx_t_12)->tp_iternext; index = 0; __pyx_t_6 = __pyx_t_13(__pyx_t_12); if (unlikely(!__pyx_t_6)) goto __pyx_L4_unpacking_failed; __Pyx_GOTREF(__pyx_t_6); index = 1; __pyx_t_5 = __pyx_t_13(__pyx_t_12); if (unlikely(!__pyx_t_5)) goto __pyx_L4_unpacking_failed; __Pyx_GOTREF(__pyx_t_5); if (__Pyx_IternextUnpackEndCheck(__pyx_t_13(__pyx_t_12), 2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6355; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_13 = NULL; __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; goto __pyx_L5_unpacking_done; __pyx_L4_unpacking_failed:; __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __pyx_t_13 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6355; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_L5_unpacking_done:; } __pyx_t_2 = __Pyx_PyIndex_AsSsize_t(__pyx_t_6); if (unlikely((__pyx_t_2 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6355; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_1 = __Pyx_PyIndex_AsSsize_t(__pyx_t_5); if (unlikely((__pyx_t_1 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6355; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_v_N = __pyx_t_2; __pyx_v_K = __pyx_t_1; /* "pandas/src/generated.pyx":6357 * N, K = ( values).shape * * if K > 1: # <<<<<<<<<<<<<< * for i in range(N): * lab = labels[i] */ __pyx_t_3 = ((__pyx_v_K > 1) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":6358 * * if K > 1: * for i in range(N): # <<<<<<<<<<<<<< * lab = labels[i] * if lab < 0: */ __pyx_t_1 = __pyx_v_N; for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) { __pyx_v_i = __pyx_t_2; /* "pandas/src/generated.pyx":6359 * if K > 1: * for i in range(N): * lab = labels[i] # <<<<<<<<<<<<<< * if lab < 0: * continue */ __pyx_t_14 = __pyx_v_i; __pyx_v_lab = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_labels.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_labels.diminfo[0].strides)); /* "pandas/src/generated.pyx":6360 * for i in range(N): * lab = labels[i] * if lab < 0: # <<<<<<<<<<<<<< * continue * */ __pyx_t_3 = ((__pyx_v_lab < 0) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":6361 * lab = labels[i] * if lab < 0: * continue # <<<<<<<<<<<<<< * * counts[lab] += 1 */ goto __pyx_L7_continue; goto __pyx_L9; } __pyx_L9:; /* "pandas/src/generated.pyx":6363 * continue * * counts[lab] += 1 # <<<<<<<<<<<<<< * for j in range(K): * val = values[i, j] */ __pyx_t_15 = __pyx_v_lab; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_counts.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_counts.diminfo[0].strides) += 1; /* "pandas/src/generated.pyx":6364 * * counts[lab] += 1 * for j in range(K): # <<<<<<<<<<<<<< * val = values[i, j] * */ __pyx_t_16 = __pyx_v_K; for (__pyx_t_17 = 0; __pyx_t_17 < __pyx_t_16; __pyx_t_17+=1) { __pyx_v_j = __pyx_t_17; /* "pandas/src/generated.pyx":6365 * counts[lab] += 1 * for j in range(K): * val = values[i, j] # <<<<<<<<<<<<<< * * # not nan */ __pyx_t_18 = __pyx_v_i; __pyx_t_19 = __pyx_v_j; __pyx_v_val = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_19, __pyx_pybuffernd_values.diminfo[1].strides)); /* "pandas/src/generated.pyx":6368 * * # not nan * if val == val: # <<<<<<<<<<<<<< * nobs[lab, j] += 1 * if val < minx[lab, j]: */ __pyx_t_3 = ((__pyx_v_val == __pyx_v_val) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":6369 * # not nan * if val == val: * nobs[lab, j] += 1 # <<<<<<<<<<<<<< * if val < minx[lab, j]: * minx[lab, j] = val */ __pyx_t_20 = __pyx_v_lab; __pyx_t_21 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_nobs.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_nobs.diminfo[0].strides, __pyx_t_21, __pyx_pybuffernd_nobs.diminfo[1].strides) += 1.0; /* "pandas/src/generated.pyx":6370 * if val == val: * nobs[lab, j] += 1 * if val < minx[lab, j]: # <<<<<<<<<<<<<< * minx[lab, j] = val * else: */ __pyx_t_22 = __pyx_v_lab; __pyx_t_23 = __pyx_v_j; __pyx_t_3 = ((__pyx_v_val < (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_minx.rcbuffer->pybuffer.buf, __pyx_t_22, __pyx_pybuffernd_minx.diminfo[0].strides, __pyx_t_23, __pyx_pybuffernd_minx.diminfo[1].strides))) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":6371 * nobs[lab, j] += 1 * if val < minx[lab, j]: * minx[lab, j] = val # <<<<<<<<<<<<<< * else: * for i in range(N): */ __pyx_t_24 = __pyx_v_lab; __pyx_t_25 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_minx.rcbuffer->pybuffer.buf, __pyx_t_24, __pyx_pybuffernd_minx.diminfo[0].strides, __pyx_t_25, __pyx_pybuffernd_minx.diminfo[1].strides) = __pyx_v_val; goto __pyx_L13; } __pyx_L13:; goto __pyx_L12; } __pyx_L12:; } __pyx_L7_continue:; } goto __pyx_L6; } /*else*/ { /* "pandas/src/generated.pyx":6373 * minx[lab, j] = val * else: * for i in range(N): # <<<<<<<<<<<<<< * lab = labels[i] * if lab < 0: */ __pyx_t_1 = __pyx_v_N; for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) { __pyx_v_i = __pyx_t_2; /* "pandas/src/generated.pyx":6374 * else: * for i in range(N): * lab = labels[i] # <<<<<<<<<<<<<< * if lab < 0: * continue */ __pyx_t_16 = __pyx_v_i; __pyx_v_lab = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_labels.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_labels.diminfo[0].strides)); /* "pandas/src/generated.pyx":6375 * for i in range(N): * lab = labels[i] * if lab < 0: # <<<<<<<<<<<<<< * continue * */ __pyx_t_3 = ((__pyx_v_lab < 0) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":6376 * lab = labels[i] * if lab < 0: * continue # <<<<<<<<<<<<<< * * counts[lab] += 1 */ goto __pyx_L14_continue; goto __pyx_L16; } __pyx_L16:; /* "pandas/src/generated.pyx":6378 * continue * * counts[lab] += 1 # <<<<<<<<<<<<<< * val = values[i, 0] * */ __pyx_t_17 = __pyx_v_lab; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_counts.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_counts.diminfo[0].strides) += 1; /* "pandas/src/generated.pyx":6379 * * counts[lab] += 1 * val = values[i, 0] # <<<<<<<<<<<<<< * * # not nan */ __pyx_t_26 = __pyx_v_i; __pyx_t_27 = 0; __pyx_v_val = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_26, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_27, __pyx_pybuffernd_values.diminfo[1].strides)); /* "pandas/src/generated.pyx":6382 * * # not nan * if val == val: # <<<<<<<<<<<<<< * nobs[lab, 0] += 1 * if val < minx[lab, 0]: */ __pyx_t_3 = ((__pyx_v_val == __pyx_v_val) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":6383 * # not nan * if val == val: * nobs[lab, 0] += 1 # <<<<<<<<<<<<<< * if val < minx[lab, 0]: * minx[lab, 0] = val */ __pyx_t_28 = __pyx_v_lab; __pyx_t_29 = 0; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_nobs.rcbuffer->pybuffer.buf, __pyx_t_28, __pyx_pybuffernd_nobs.diminfo[0].strides, __pyx_t_29, __pyx_pybuffernd_nobs.diminfo[1].strides) += 1.0; /* "pandas/src/generated.pyx":6384 * if val == val: * nobs[lab, 0] += 1 * if val < minx[lab, 0]: # <<<<<<<<<<<<<< * minx[lab, 0] = val * */ __pyx_t_30 = __pyx_v_lab; __pyx_t_31 = 0; __pyx_t_3 = ((__pyx_v_val < (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_minx.rcbuffer->pybuffer.buf, __pyx_t_30, __pyx_pybuffernd_minx.diminfo[0].strides, __pyx_t_31, __pyx_pybuffernd_minx.diminfo[1].strides))) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":6385 * nobs[lab, 0] += 1 * if val < minx[lab, 0]: * minx[lab, 0] = val # <<<<<<<<<<<<<< * * for i in range(len(counts)): */ __pyx_t_32 = __pyx_v_lab; __pyx_t_33 = 0; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_minx.rcbuffer->pybuffer.buf, __pyx_t_32, __pyx_pybuffernd_minx.diminfo[0].strides, __pyx_t_33, __pyx_pybuffernd_minx.diminfo[1].strides) = __pyx_v_val; goto __pyx_L18; } __pyx_L18:; goto __pyx_L17; } __pyx_L17:; __pyx_L14_continue:; } } __pyx_L6:; /* "pandas/src/generated.pyx":6387 * minx[lab, 0] = val * * for i in range(len(counts)): # <<<<<<<<<<<<<< * for j in range(K): * if nobs[i, j] == 0: */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_counts)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6387; __pyx_clineno = __LINE__; goto __pyx_L1_error;} for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) { __pyx_v_i = __pyx_t_2; /* "pandas/src/generated.pyx":6388 * * for i in range(len(counts)): * for j in range(K): # <<<<<<<<<<<<<< * if nobs[i, j] == 0: * out[i, j] = nan */ __pyx_t_34 = __pyx_v_K; for (__pyx_t_35 = 0; __pyx_t_35 < __pyx_t_34; __pyx_t_35+=1) { __pyx_v_j = __pyx_t_35; /* "pandas/src/generated.pyx":6389 * for i in range(len(counts)): * for j in range(K): * if nobs[i, j] == 0: # <<<<<<<<<<<<<< * out[i, j] = nan * else: */ __pyx_t_36 = __pyx_v_i; __pyx_t_37 = __pyx_v_j; __pyx_t_3 = (((*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_nobs.rcbuffer->pybuffer.buf, __pyx_t_36, __pyx_pybuffernd_nobs.diminfo[0].strides, __pyx_t_37, __pyx_pybuffernd_nobs.diminfo[1].strides)) == 0.0) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":6390 * for j in range(K): * if nobs[i, j] == 0: * out[i, j] = nan # <<<<<<<<<<<<<< * else: * out[i, j] = minx[i, j] */ __pyx_t_38 = __pyx_v_i; __pyx_t_39 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_38, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_39, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_6pandas_5algos_nan; goto __pyx_L23; } /*else*/ { /* "pandas/src/generated.pyx":6392 * out[i, j] = nan * else: * out[i, j] = minx[i, j] # <<<<<<<<<<<<<< * @cython.wraparound(False) * @cython.boundscheck(False) */ __pyx_t_40 = __pyx_v_i; __pyx_t_41 = __pyx_v_j; __pyx_t_42 = __pyx_v_i; __pyx_t_43 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_42, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_43, __pyx_pybuffernd_out.diminfo[1].strides) = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_minx.rcbuffer->pybuffer.buf, __pyx_t_40, __pyx_pybuffernd_minx.diminfo[0].strides, __pyx_t_41, __pyx_pybuffernd_minx.diminfo[1].strides)); } __pyx_L23:; } } __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_12); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_counts.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_labels.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_minx.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.group_min_float64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_counts.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_labels.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_minx.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_minx); __Pyx_XDECREF((PyObject *)__pyx_v_nobs); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_437group_min_float32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6pandas_5algos_436group_min_float32[] = "\n Only aggregates on axis=0\n "; static PyMethodDef __pyx_mdef_6pandas_5algos_437group_min_float32 = {__Pyx_NAMESTR("group_min_float32"), (PyCFunction)__pyx_pw_6pandas_5algos_437group_min_float32, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_5algos_436group_min_float32)}; static PyObject *__pyx_pw_6pandas_5algos_437group_min_float32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_out = 0; PyArrayObject *__pyx_v_counts = 0; PyArrayObject *__pyx_v_values = 0; PyArrayObject *__pyx_v_labels = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("group_min_float32 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__out,&__pyx_n_s__counts,&__pyx_n_s__values,&__pyx_n_s__labels,0}; PyObject* values[4] = {0,0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__out)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__counts)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("group_min_float32", 1, 4, 4, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6395; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__values)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("group_min_float32", 1, 4, 4, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6395; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__labels)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("group_min_float32", 1, 4, 4, 3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6395; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "group_min_float32") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6395; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 4) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[3] = PyTuple_GET_ITEM(__pyx_args, 3); } __pyx_v_out = ((PyArrayObject *)values[0]); __pyx_v_counts = ((PyArrayObject *)values[1]); __pyx_v_values = ((PyArrayObject *)values[2]); __pyx_v_labels = ((PyArrayObject *)values[3]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("group_min_float32", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6395; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.group_min_float32", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_5numpy_ndarray, 1, "out", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6395; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_counts), __pyx_ptype_5numpy_ndarray, 1, "counts", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6396; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6397; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_labels), __pyx_ptype_5numpy_ndarray, 1, "labels", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6398; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_436group_min_float32(__pyx_self, __pyx_v_out, __pyx_v_counts, __pyx_v_values, __pyx_v_labels); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":6395 * @cython.wraparound(False) * @cython.boundscheck(False) * def group_min_float32(ndarray[float32_t, ndim=2] out, # <<<<<<<<<<<<<< * ndarray[int64_t] counts, * ndarray[float32_t, ndim=2] values, */ static PyObject *__pyx_pf_6pandas_5algos_436group_min_float32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_out, PyArrayObject *__pyx_v_counts, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_labels) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_N; Py_ssize_t __pyx_v_K; Py_ssize_t __pyx_v_lab; __pyx_t_5numpy_float32_t __pyx_v_val; PyArrayObject *__pyx_v_minx = 0; PyArrayObject *__pyx_v_nobs = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_counts; __Pyx_Buffer __pyx_pybuffer_counts; __Pyx_LocalBuf_ND __pyx_pybuffernd_labels; __Pyx_Buffer __pyx_pybuffer_labels; __Pyx_LocalBuf_ND __pyx_pybuffernd_minx; __Pyx_Buffer __pyx_pybuffer_minx; __Pyx_LocalBuf_ND __pyx_pybuffernd_nobs; __Pyx_Buffer __pyx_pybuffer_nobs; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_values; __Pyx_Buffer __pyx_pybuffer_values; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; Py_ssize_t __pyx_t_2; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyArrayObject *__pyx_t_7 = NULL; int __pyx_t_8; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; PyObject *__pyx_t_11 = NULL; PyObject *__pyx_t_12 = NULL; PyObject *(*__pyx_t_13)(PyObject *); 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; Py_ssize_t __pyx_t_26; long __pyx_t_27; Py_ssize_t __pyx_t_28; long __pyx_t_29; Py_ssize_t __pyx_t_30; long __pyx_t_31; Py_ssize_t __pyx_t_32; long __pyx_t_33; Py_ssize_t __pyx_t_34; Py_ssize_t __pyx_t_35; Py_ssize_t __pyx_t_36; Py_ssize_t __pyx_t_37; Py_ssize_t __pyx_t_38; Py_ssize_t __pyx_t_39; Py_ssize_t __pyx_t_40; Py_ssize_t __pyx_t_41; Py_ssize_t __pyx_t_42; Py_ssize_t __pyx_t_43; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("group_min_float32", 0); __pyx_pybuffer_minx.pybuffer.buf = NULL; __pyx_pybuffer_minx.refcount = 0; __pyx_pybuffernd_minx.data = NULL; __pyx_pybuffernd_minx.rcbuffer = &__pyx_pybuffer_minx; __pyx_pybuffer_nobs.pybuffer.buf = NULL; __pyx_pybuffer_nobs.refcount = 0; __pyx_pybuffernd_nobs.data = NULL; __pyx_pybuffernd_nobs.rcbuffer = &__pyx_pybuffer_nobs; __pyx_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; __pyx_pybuffer_counts.pybuffer.buf = NULL; __pyx_pybuffer_counts.refcount = 0; __pyx_pybuffernd_counts.data = NULL; __pyx_pybuffernd_counts.rcbuffer = &__pyx_pybuffer_counts; __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_labels.pybuffer.buf = NULL; __pyx_pybuffer_labels.refcount = 0; __pyx_pybuffernd_labels.data = NULL; __pyx_pybuffernd_labels.rcbuffer = &__pyx_pybuffer_labels; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_v_out, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6395; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; __pyx_pybuffernd_out.diminfo[1].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_out.diminfo[1].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[1]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_counts.rcbuffer->pybuffer, (PyObject*)__pyx_v_counts, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6395; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_counts.diminfo[0].strides = __pyx_pybuffernd_counts.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_counts.diminfo[0].shape = __pyx_pybuffernd_counts.rcbuffer->pybuffer.shape[0]; { __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_float32_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6395; __pyx_clineno = __LINE__; goto __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_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_labels.rcbuffer->pybuffer, (PyObject*)__pyx_v_labels, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6395; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_labels.diminfo[0].strides = __pyx_pybuffernd_labels.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_labels.diminfo[0].shape = __pyx_pybuffernd_labels.rcbuffer->pybuffer.shape[0]; /* "pandas/src/generated.pyx":6407 * ndarray[float32_t, ndim=2] minx, nobs * * if not len(values) == len(labels): # <<<<<<<<<<<<<< * raise AssertionError("len(index) != len(labels)") * */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6407; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_2 = PyObject_Length(((PyObject *)__pyx_v_labels)); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6407; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_3 = ((!((__pyx_t_1 == __pyx_t_2) != 0)) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":6408 * * if not len(values) == len(labels): * raise AssertionError("len(index) != len(labels)") # <<<<<<<<<<<<<< * * nobs = np.zeros_like(out) */ __pyx_t_4 = PyObject_Call(__pyx_builtin_AssertionError, ((PyObject *)__pyx_k_tuple_197), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6408; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 6408; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L3; } __pyx_L3:; /* "pandas/src/generated.pyx":6410 * raise AssertionError("len(index) != len(labels)") * * nobs = np.zeros_like(out) # <<<<<<<<<<<<<< * * minx = np.empty_like(out) */ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6410; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s__zeros_like); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6410; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6410; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(((PyObject *)__pyx_v_out)); PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_v_out)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out)); __pyx_t_6 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6410; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6410; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_7 = ((PyArrayObject *)__pyx_t_6); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer); __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_nobs.rcbuffer->pybuffer, (PyObject*)__pyx_v_nobs, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_pybuffernd_nobs.diminfo[0].strides = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_nobs.diminfo[0].shape = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_nobs.diminfo[1].strides = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_nobs.diminfo[1].shape = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.shape[1]; if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6410; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_7 = 0; __pyx_v_nobs = ((PyArrayObject *)__pyx_t_6); __pyx_t_6 = 0; /* "pandas/src/generated.pyx":6412 * nobs = np.zeros_like(out) * * minx = np.empty_like(out) # <<<<<<<<<<<<<< * minx.fill(np.inf) * */ __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6412; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s__empty_like); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6412; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6412; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(((PyObject *)__pyx_v_out)); PyTuple_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_v_out)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out)); __pyx_t_5 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6412; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0; if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6412; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_7 = ((PyArrayObject *)__pyx_t_5); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_minx.rcbuffer->pybuffer); __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_minx.rcbuffer->pybuffer, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_minx.rcbuffer->pybuffer, (PyObject*)__pyx_v_minx, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_pybuffernd_minx.diminfo[0].strides = __pyx_pybuffernd_minx.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_minx.diminfo[0].shape = __pyx_pybuffernd_minx.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_minx.diminfo[1].strides = __pyx_pybuffernd_minx.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_minx.diminfo[1].shape = __pyx_pybuffernd_minx.rcbuffer->pybuffer.shape[1]; if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6412; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_7 = 0; __pyx_v_minx = ((PyArrayObject *)__pyx_t_5); __pyx_t_5 = 0; /* "pandas/src/generated.pyx":6413 * * minx = np.empty_like(out) * minx.fill(np.inf) # <<<<<<<<<<<<<< * * N, K = ( values).shape */ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_minx), __pyx_n_s__fill); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6413; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6413; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s__inf); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6413; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6413; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6413; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "pandas/src/generated.pyx":6415 * minx.fill(np.inf) * * N, K = ( values).shape # <<<<<<<<<<<<<< * * if K > 1: */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_values), __pyx_n_s__shape); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6415; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); if ((likely(PyTuple_CheckExact(__pyx_t_4))) || (PyList_CheckExact(__pyx_t_4))) { PyObject* sequence = __pyx_t_4; #if CYTHON_COMPILING_IN_CPYTHON Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6415; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_6 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_5 = PyTuple_GET_ITEM(sequence, 1); } else { __pyx_t_6 = PyList_GET_ITEM(sequence, 0); __pyx_t_5 = PyList_GET_ITEM(sequence, 1); } __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(__pyx_t_5); #else __pyx_t_6 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6415; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_5 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6415; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); #endif __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else { Py_ssize_t index = -1; __pyx_t_12 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6415; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_13 = Py_TYPE(__pyx_t_12)->tp_iternext; index = 0; __pyx_t_6 = __pyx_t_13(__pyx_t_12); if (unlikely(!__pyx_t_6)) goto __pyx_L4_unpacking_failed; __Pyx_GOTREF(__pyx_t_6); index = 1; __pyx_t_5 = __pyx_t_13(__pyx_t_12); if (unlikely(!__pyx_t_5)) goto __pyx_L4_unpacking_failed; __Pyx_GOTREF(__pyx_t_5); if (__Pyx_IternextUnpackEndCheck(__pyx_t_13(__pyx_t_12), 2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6415; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_13 = NULL; __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; goto __pyx_L5_unpacking_done; __pyx_L4_unpacking_failed:; __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __pyx_t_13 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6415; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_L5_unpacking_done:; } __pyx_t_2 = __Pyx_PyIndex_AsSsize_t(__pyx_t_6); if (unlikely((__pyx_t_2 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6415; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_1 = __Pyx_PyIndex_AsSsize_t(__pyx_t_5); if (unlikely((__pyx_t_1 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6415; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_v_N = __pyx_t_2; __pyx_v_K = __pyx_t_1; /* "pandas/src/generated.pyx":6417 * N, K = ( values).shape * * if K > 1: # <<<<<<<<<<<<<< * for i in range(N): * lab = labels[i] */ __pyx_t_3 = ((__pyx_v_K > 1) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":6418 * * if K > 1: * for i in range(N): # <<<<<<<<<<<<<< * lab = labels[i] * if lab < 0: */ __pyx_t_1 = __pyx_v_N; for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) { __pyx_v_i = __pyx_t_2; /* "pandas/src/generated.pyx":6419 * if K > 1: * for i in range(N): * lab = labels[i] # <<<<<<<<<<<<<< * if lab < 0: * continue */ __pyx_t_14 = __pyx_v_i; __pyx_v_lab = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_labels.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_labels.diminfo[0].strides)); /* "pandas/src/generated.pyx":6420 * for i in range(N): * lab = labels[i] * if lab < 0: # <<<<<<<<<<<<<< * continue * */ __pyx_t_3 = ((__pyx_v_lab < 0) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":6421 * lab = labels[i] * if lab < 0: * continue # <<<<<<<<<<<<<< * * counts[lab] += 1 */ goto __pyx_L7_continue; goto __pyx_L9; } __pyx_L9:; /* "pandas/src/generated.pyx":6423 * continue * * counts[lab] += 1 # <<<<<<<<<<<<<< * for j in range(K): * val = values[i, j] */ __pyx_t_15 = __pyx_v_lab; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_counts.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_counts.diminfo[0].strides) += 1; /* "pandas/src/generated.pyx":6424 * * counts[lab] += 1 * for j in range(K): # <<<<<<<<<<<<<< * val = values[i, j] * */ __pyx_t_16 = __pyx_v_K; for (__pyx_t_17 = 0; __pyx_t_17 < __pyx_t_16; __pyx_t_17+=1) { __pyx_v_j = __pyx_t_17; /* "pandas/src/generated.pyx":6425 * counts[lab] += 1 * for j in range(K): * val = values[i, j] # <<<<<<<<<<<<<< * * # not nan */ __pyx_t_18 = __pyx_v_i; __pyx_t_19 = __pyx_v_j; __pyx_v_val = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_19, __pyx_pybuffernd_values.diminfo[1].strides)); /* "pandas/src/generated.pyx":6428 * * # not nan * if val == val: # <<<<<<<<<<<<<< * nobs[lab, j] += 1 * if val < minx[lab, j]: */ __pyx_t_3 = ((__pyx_v_val == __pyx_v_val) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":6429 * # not nan * if val == val: * nobs[lab, j] += 1 # <<<<<<<<<<<<<< * if val < minx[lab, j]: * minx[lab, j] = val */ __pyx_t_20 = __pyx_v_lab; __pyx_t_21 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_nobs.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_nobs.diminfo[0].strides, __pyx_t_21, __pyx_pybuffernd_nobs.diminfo[1].strides) += 1.0; /* "pandas/src/generated.pyx":6430 * if val == val: * nobs[lab, j] += 1 * if val < minx[lab, j]: # <<<<<<<<<<<<<< * minx[lab, j] = val * else: */ __pyx_t_22 = __pyx_v_lab; __pyx_t_23 = __pyx_v_j; __pyx_t_3 = ((__pyx_v_val < (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_minx.rcbuffer->pybuffer.buf, __pyx_t_22, __pyx_pybuffernd_minx.diminfo[0].strides, __pyx_t_23, __pyx_pybuffernd_minx.diminfo[1].strides))) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":6431 * nobs[lab, j] += 1 * if val < minx[lab, j]: * minx[lab, j] = val # <<<<<<<<<<<<<< * else: * for i in range(N): */ __pyx_t_24 = __pyx_v_lab; __pyx_t_25 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_minx.rcbuffer->pybuffer.buf, __pyx_t_24, __pyx_pybuffernd_minx.diminfo[0].strides, __pyx_t_25, __pyx_pybuffernd_minx.diminfo[1].strides) = __pyx_v_val; goto __pyx_L13; } __pyx_L13:; goto __pyx_L12; } __pyx_L12:; } __pyx_L7_continue:; } goto __pyx_L6; } /*else*/ { /* "pandas/src/generated.pyx":6433 * minx[lab, j] = val * else: * for i in range(N): # <<<<<<<<<<<<<< * lab = labels[i] * if lab < 0: */ __pyx_t_1 = __pyx_v_N; for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) { __pyx_v_i = __pyx_t_2; /* "pandas/src/generated.pyx":6434 * else: * for i in range(N): * lab = labels[i] # <<<<<<<<<<<<<< * if lab < 0: * continue */ __pyx_t_16 = __pyx_v_i; __pyx_v_lab = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_labels.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_labels.diminfo[0].strides)); /* "pandas/src/generated.pyx":6435 * for i in range(N): * lab = labels[i] * if lab < 0: # <<<<<<<<<<<<<< * continue * */ __pyx_t_3 = ((__pyx_v_lab < 0) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":6436 * lab = labels[i] * if lab < 0: * continue # <<<<<<<<<<<<<< * * counts[lab] += 1 */ goto __pyx_L14_continue; goto __pyx_L16; } __pyx_L16:; /* "pandas/src/generated.pyx":6438 * continue * * counts[lab] += 1 # <<<<<<<<<<<<<< * val = values[i, 0] * */ __pyx_t_17 = __pyx_v_lab; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_counts.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_counts.diminfo[0].strides) += 1; /* "pandas/src/generated.pyx":6439 * * counts[lab] += 1 * val = values[i, 0] # <<<<<<<<<<<<<< * * # not nan */ __pyx_t_26 = __pyx_v_i; __pyx_t_27 = 0; __pyx_v_val = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_26, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_27, __pyx_pybuffernd_values.diminfo[1].strides)); /* "pandas/src/generated.pyx":6442 * * # not nan * if val == val: # <<<<<<<<<<<<<< * nobs[lab, 0] += 1 * if val < minx[lab, 0]: */ __pyx_t_3 = ((__pyx_v_val == __pyx_v_val) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":6443 * # not nan * if val == val: * nobs[lab, 0] += 1 # <<<<<<<<<<<<<< * if val < minx[lab, 0]: * minx[lab, 0] = val */ __pyx_t_28 = __pyx_v_lab; __pyx_t_29 = 0; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_nobs.rcbuffer->pybuffer.buf, __pyx_t_28, __pyx_pybuffernd_nobs.diminfo[0].strides, __pyx_t_29, __pyx_pybuffernd_nobs.diminfo[1].strides) += 1.0; /* "pandas/src/generated.pyx":6444 * if val == val: * nobs[lab, 0] += 1 * if val < minx[lab, 0]: # <<<<<<<<<<<<<< * minx[lab, 0] = val * */ __pyx_t_30 = __pyx_v_lab; __pyx_t_31 = 0; __pyx_t_3 = ((__pyx_v_val < (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_minx.rcbuffer->pybuffer.buf, __pyx_t_30, __pyx_pybuffernd_minx.diminfo[0].strides, __pyx_t_31, __pyx_pybuffernd_minx.diminfo[1].strides))) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":6445 * nobs[lab, 0] += 1 * if val < minx[lab, 0]: * minx[lab, 0] = val # <<<<<<<<<<<<<< * * for i in range(len(counts)): */ __pyx_t_32 = __pyx_v_lab; __pyx_t_33 = 0; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_minx.rcbuffer->pybuffer.buf, __pyx_t_32, __pyx_pybuffernd_minx.diminfo[0].strides, __pyx_t_33, __pyx_pybuffernd_minx.diminfo[1].strides) = __pyx_v_val; goto __pyx_L18; } __pyx_L18:; goto __pyx_L17; } __pyx_L17:; __pyx_L14_continue:; } } __pyx_L6:; /* "pandas/src/generated.pyx":6447 * minx[lab, 0] = val * * for i in range(len(counts)): # <<<<<<<<<<<<<< * for j in range(K): * if nobs[i, j] == 0: */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_counts)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6447; __pyx_clineno = __LINE__; goto __pyx_L1_error;} for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) { __pyx_v_i = __pyx_t_2; /* "pandas/src/generated.pyx":6448 * * for i in range(len(counts)): * for j in range(K): # <<<<<<<<<<<<<< * if nobs[i, j] == 0: * out[i, j] = nan */ __pyx_t_34 = __pyx_v_K; for (__pyx_t_35 = 0; __pyx_t_35 < __pyx_t_34; __pyx_t_35+=1) { __pyx_v_j = __pyx_t_35; /* "pandas/src/generated.pyx":6449 * for i in range(len(counts)): * for j in range(K): * if nobs[i, j] == 0: # <<<<<<<<<<<<<< * out[i, j] = nan * else: */ __pyx_t_36 = __pyx_v_i; __pyx_t_37 = __pyx_v_j; __pyx_t_3 = (((*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_nobs.rcbuffer->pybuffer.buf, __pyx_t_36, __pyx_pybuffernd_nobs.diminfo[0].strides, __pyx_t_37, __pyx_pybuffernd_nobs.diminfo[1].strides)) == 0.0) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":6450 * for j in range(K): * if nobs[i, j] == 0: * out[i, j] = nan # <<<<<<<<<<<<<< * else: * out[i, j] = minx[i, j] */ __pyx_t_38 = __pyx_v_i; __pyx_t_39 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_38, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_39, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_6pandas_5algos_nan; goto __pyx_L23; } /*else*/ { /* "pandas/src/generated.pyx":6452 * out[i, j] = nan * else: * out[i, j] = minx[i, j] # <<<<<<<<<<<<<< * * @cython.wraparound(False) */ __pyx_t_40 = __pyx_v_i; __pyx_t_41 = __pyx_v_j; __pyx_t_42 = __pyx_v_i; __pyx_t_43 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_42, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_43, __pyx_pybuffernd_out.diminfo[1].strides) = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_minx.rcbuffer->pybuffer.buf, __pyx_t_40, __pyx_pybuffernd_minx.diminfo[0].strides, __pyx_t_41, __pyx_pybuffernd_minx.diminfo[1].strides)); } __pyx_L23:; } } __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_12); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_counts.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_labels.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_minx.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.group_min_float32", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_counts.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_labels.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_minx.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_minx); __Pyx_XDECREF((PyObject *)__pyx_v_nobs); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_439group_min_bin_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6pandas_5algos_438group_min_bin_float64[] = "\n Only aggregates on axis=0\n "; static PyMethodDef __pyx_mdef_6pandas_5algos_439group_min_bin_float64 = {__Pyx_NAMESTR("group_min_bin_float64"), (PyCFunction)__pyx_pw_6pandas_5algos_439group_min_bin_float64, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_5algos_438group_min_bin_float64)}; static PyObject *__pyx_pw_6pandas_5algos_439group_min_bin_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_out = 0; PyArrayObject *__pyx_v_counts = 0; PyArrayObject *__pyx_v_values = 0; PyArrayObject *__pyx_v_bins = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("group_min_bin_float64 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__out,&__pyx_n_s__counts,&__pyx_n_s__values,&__pyx_n_s__bins,0}; PyObject* values[4] = {0,0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__out)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__counts)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("group_min_bin_float64", 1, 4, 4, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6456; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__values)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("group_min_bin_float64", 1, 4, 4, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6456; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__bins)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("group_min_bin_float64", 1, 4, 4, 3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6456; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "group_min_bin_float64") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6456; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 4) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[3] = PyTuple_GET_ITEM(__pyx_args, 3); } __pyx_v_out = ((PyArrayObject *)values[0]); __pyx_v_counts = ((PyArrayObject *)values[1]); __pyx_v_values = ((PyArrayObject *)values[2]); __pyx_v_bins = ((PyArrayObject *)values[3]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("group_min_bin_float64", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6456; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.group_min_bin_float64", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_5numpy_ndarray, 1, "out", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6456; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_counts), __pyx_ptype_5numpy_ndarray, 1, "counts", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6457; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6458; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_bins), __pyx_ptype_5numpy_ndarray, 1, "bins", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6459; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_438group_min_bin_float64(__pyx_self, __pyx_v_out, __pyx_v_counts, __pyx_v_values, __pyx_v_bins); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":6456 * @cython.wraparound(False) * @cython.boundscheck(False) * def group_min_bin_float64(ndarray[float64_t, ndim=2] out, # <<<<<<<<<<<<<< * ndarray[int64_t] counts, * ndarray[float64_t, ndim=2] values, */ static PyObject *__pyx_pf_6pandas_5algos_438group_min_bin_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_out, PyArrayObject *__pyx_v_counts, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_bins) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_N; Py_ssize_t __pyx_v_K; Py_ssize_t __pyx_v_ngroups; Py_ssize_t __pyx_v_b; __pyx_t_5numpy_float64_t __pyx_v_val; PyArrayObject *__pyx_v_minx = 0; PyArrayObject *__pyx_v_nobs = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_bins; __Pyx_Buffer __pyx_pybuffer_bins; __Pyx_LocalBuf_ND __pyx_pybuffernd_counts; __Pyx_Buffer __pyx_pybuffer_counts; __Pyx_LocalBuf_ND __pyx_pybuffernd_minx; __Pyx_Buffer __pyx_pybuffer_minx; __Pyx_LocalBuf_ND __pyx_pybuffernd_nobs; __Pyx_Buffer __pyx_pybuffer_nobs; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __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; PyArrayObject *__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; Py_ssize_t __pyx_t_11; int __pyx_t_12; PyObject *__pyx_t_13 = NULL; PyObject *(*__pyx_t_14)(PyObject *); Py_ssize_t __pyx_t_15; int __pyx_t_16; int __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; long __pyx_t_30; Py_ssize_t __pyx_t_31; long __pyx_t_32; Py_ssize_t __pyx_t_33; long __pyx_t_34; Py_ssize_t __pyx_t_35; long __pyx_t_36; Py_ssize_t __pyx_t_37; Py_ssize_t __pyx_t_38; Py_ssize_t __pyx_t_39; Py_ssize_t __pyx_t_40; Py_ssize_t __pyx_t_41; Py_ssize_t __pyx_t_42; Py_ssize_t __pyx_t_43; Py_ssize_t __pyx_t_44; Py_ssize_t __pyx_t_45; Py_ssize_t __pyx_t_46; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("group_min_bin_float64", 0); __pyx_pybuffer_minx.pybuffer.buf = NULL; __pyx_pybuffer_minx.refcount = 0; __pyx_pybuffernd_minx.data = NULL; __pyx_pybuffernd_minx.rcbuffer = &__pyx_pybuffer_minx; __pyx_pybuffer_nobs.pybuffer.buf = NULL; __pyx_pybuffer_nobs.refcount = 0; __pyx_pybuffernd_nobs.data = NULL; __pyx_pybuffernd_nobs.rcbuffer = &__pyx_pybuffer_nobs; __pyx_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; __pyx_pybuffer_counts.pybuffer.buf = NULL; __pyx_pybuffer_counts.refcount = 0; __pyx_pybuffernd_counts.data = NULL; __pyx_pybuffernd_counts.rcbuffer = &__pyx_pybuffer_counts; __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_bins.pybuffer.buf = NULL; __pyx_pybuffer_bins.refcount = 0; __pyx_pybuffernd_bins.data = NULL; __pyx_pybuffernd_bins.rcbuffer = &__pyx_pybuffer_bins; { __Pyx_BufFmt_StackElem __pyx_stack[1]; 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, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6456; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; __pyx_pybuffernd_out.diminfo[1].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_out.diminfo[1].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[1]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_counts.rcbuffer->pybuffer, (PyObject*)__pyx_v_counts, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6456; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_counts.diminfo[0].strides = __pyx_pybuffernd_counts.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_counts.diminfo[0].shape = __pyx_pybuffernd_counts.rcbuffer->pybuffer.shape[0]; { __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, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6456; __pyx_clineno = __LINE__; goto __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_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_bins.rcbuffer->pybuffer, (PyObject*)__pyx_v_bins, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6456; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_bins.diminfo[0].strides = __pyx_pybuffernd_bins.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_bins.diminfo[0].shape = __pyx_pybuffernd_bins.rcbuffer->pybuffer.shape[0]; /* "pandas/src/generated.pyx":6468 * ndarray[float64_t, ndim=2] minx, nobs * * nobs = np.zeros_like(out) # <<<<<<<<<<<<<< * * minx = np.empty_like(out) */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6468; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s__zeros_like); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6468; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 6468; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)__pyx_v_out)); PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_out)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out)); __pyx_t_3 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6468; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(((PyObject *)__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_filename = __pyx_f[2]; __pyx_lineno = 6468; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_4 = ((PyArrayObject *)__pyx_t_3); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer); __pyx_t_5 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer, (PyObject*)__pyx_t_4, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_nobs.rcbuffer->pybuffer, (PyObject*)__pyx_v_nobs, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_pybuffernd_nobs.diminfo[0].strides = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_nobs.diminfo[0].shape = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_nobs.diminfo[1].strides = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_nobs.diminfo[1].shape = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.shape[1]; if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6468; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_4 = 0; __pyx_v_nobs = ((PyArrayObject *)__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/generated.pyx":6470 * nobs = np.zeros_like(out) * * minx = np.empty_like(out) # <<<<<<<<<<<<<< * minx.fill(np.inf) * */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6470; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s__empty_like); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6470; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6470; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(((PyObject *)__pyx_v_out)); PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_v_out)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out)); __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6470; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(((PyObject *)__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_filename = __pyx_f[2]; __pyx_lineno = 6470; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_4 = ((PyArrayObject *)__pyx_t_2); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_minx.rcbuffer->pybuffer); __pyx_t_5 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_minx.rcbuffer->pybuffer, (PyObject*)__pyx_t_4, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_minx.rcbuffer->pybuffer, (PyObject*)__pyx_v_minx, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_pybuffernd_minx.diminfo[0].strides = __pyx_pybuffernd_minx.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_minx.diminfo[0].shape = __pyx_pybuffernd_minx.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_minx.diminfo[1].strides = __pyx_pybuffernd_minx.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_minx.diminfo[1].shape = __pyx_pybuffernd_minx.rcbuffer->pybuffer.shape[1]; if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6470; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_4 = 0; __pyx_v_minx = ((PyArrayObject *)__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":6471 * * minx = np.empty_like(out) * minx.fill(np.inf) # <<<<<<<<<<<<<< * * if bins[len(bins) - 1] == len(values): */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_minx), __pyx_n_s__fill); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6471; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6471; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s__inf); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6471; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6471; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6471; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/generated.pyx":6473 * minx.fill(np.inf) * * if bins[len(bins) - 1] == len(values): # <<<<<<<<<<<<<< * ngroups = len(bins) * else: */ __pyx_t_9 = PyObject_Length(((PyObject *)__pyx_v_bins)); if (unlikely(__pyx_t_9 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6473; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_10 = (__pyx_t_9 - 1); __pyx_t_11 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6473; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_12 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_bins.rcbuffer->pybuffer.buf, __pyx_t_10, __pyx_pybuffernd_bins.diminfo[0].strides)) == __pyx_t_11) != 0); if (__pyx_t_12) { /* "pandas/src/generated.pyx":6474 * * if bins[len(bins) - 1] == len(values): * ngroups = len(bins) # <<<<<<<<<<<<<< * else: * ngroups = len(bins) + 1 */ __pyx_t_11 = PyObject_Length(((PyObject *)__pyx_v_bins)); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6474; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_ngroups = __pyx_t_11; goto __pyx_L3; } /*else*/ { /* "pandas/src/generated.pyx":6476 * ngroups = len(bins) * else: * ngroups = len(bins) + 1 # <<<<<<<<<<<<<< * * N, K = ( values).shape */ __pyx_t_11 = PyObject_Length(((PyObject *)__pyx_v_bins)); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6476; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_ngroups = (__pyx_t_11 + 1); } __pyx_L3:; /* "pandas/src/generated.pyx":6478 * ngroups = len(bins) + 1 * * N, K = ( values).shape # <<<<<<<<<<<<<< * * b = 0 */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_values), __pyx_n_s__shape); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6478; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) { PyObject* sequence = __pyx_t_1; #if CYTHON_COMPILING_IN_CPYTHON Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6478; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_2 = PyTuple_GET_ITEM(sequence, 1); } else { __pyx_t_3 = PyList_GET_ITEM(sequence, 0); __pyx_t_2 = PyList_GET_ITEM(sequence, 1); } __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(__pyx_t_2); #else __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6478; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6478; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } else { Py_ssize_t index = -1; __pyx_t_13 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6478; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_14 = Py_TYPE(__pyx_t_13)->tp_iternext; index = 0; __pyx_t_3 = __pyx_t_14(__pyx_t_13); if (unlikely(!__pyx_t_3)) goto __pyx_L4_unpacking_failed; __Pyx_GOTREF(__pyx_t_3); index = 1; __pyx_t_2 = __pyx_t_14(__pyx_t_13); if (unlikely(!__pyx_t_2)) goto __pyx_L4_unpacking_failed; __Pyx_GOTREF(__pyx_t_2); if (__Pyx_IternextUnpackEndCheck(__pyx_t_14(__pyx_t_13), 2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6478; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_14 = NULL; __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; goto __pyx_L5_unpacking_done; __pyx_L4_unpacking_failed:; __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_14 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6478; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_L5_unpacking_done:; } __pyx_t_11 = __Pyx_PyIndex_AsSsize_t(__pyx_t_3); if (unlikely((__pyx_t_11 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6478; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_9 = __Pyx_PyIndex_AsSsize_t(__pyx_t_2); if (unlikely((__pyx_t_9 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6478; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_N = __pyx_t_11; __pyx_v_K = __pyx_t_9; /* "pandas/src/generated.pyx":6480 * N, K = ( values).shape * * b = 0 # <<<<<<<<<<<<<< * if K > 1: * for i in range(N): */ __pyx_v_b = 0; /* "pandas/src/generated.pyx":6481 * * b = 0 * if K > 1: # <<<<<<<<<<<<<< * for i in range(N): * while b < ngroups - 1 and i >= bins[b]: */ __pyx_t_12 = ((__pyx_v_K > 1) != 0); if (__pyx_t_12) { /* "pandas/src/generated.pyx":6482 * b = 0 * if K > 1: * for i in range(N): # <<<<<<<<<<<<<< * while b < ngroups - 1 and i >= bins[b]: * b += 1 */ __pyx_t_9 = __pyx_v_N; for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_9; __pyx_t_11+=1) { __pyx_v_i = __pyx_t_11; /* "pandas/src/generated.pyx":6483 * if K > 1: * for i in range(N): * while b < ngroups - 1 and i >= bins[b]: # <<<<<<<<<<<<<< * b += 1 * */ while (1) { __pyx_t_12 = ((__pyx_v_b < (__pyx_v_ngroups - 1)) != 0); if (__pyx_t_12) { __pyx_t_15 = __pyx_v_b; __pyx_t_16 = ((__pyx_v_i >= (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_bins.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_bins.diminfo[0].strides))) != 0); __pyx_t_17 = __pyx_t_16; } else { __pyx_t_17 = __pyx_t_12; } if (!__pyx_t_17) break; /* "pandas/src/generated.pyx":6484 * for i in range(N): * while b < ngroups - 1 and i >= bins[b]: * b += 1 # <<<<<<<<<<<<<< * * counts[b] += 1 */ __pyx_v_b = (__pyx_v_b + 1); } /* "pandas/src/generated.pyx":6486 * b += 1 * * counts[b] += 1 # <<<<<<<<<<<<<< * for j in range(K): * val = values[i, j] */ __pyx_t_18 = __pyx_v_b; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_counts.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_counts.diminfo[0].strides) += 1; /* "pandas/src/generated.pyx":6487 * * counts[b] += 1 * for j in range(K): # <<<<<<<<<<<<<< * val = values[i, j] * */ __pyx_t_19 = __pyx_v_K; for (__pyx_t_20 = 0; __pyx_t_20 < __pyx_t_19; __pyx_t_20+=1) { __pyx_v_j = __pyx_t_20; /* "pandas/src/generated.pyx":6488 * counts[b] += 1 * for j in range(K): * val = values[i, j] # <<<<<<<<<<<<<< * * # not nan */ __pyx_t_21 = __pyx_v_i; __pyx_t_22 = __pyx_v_j; __pyx_v_val = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_22, __pyx_pybuffernd_values.diminfo[1].strides)); /* "pandas/src/generated.pyx":6491 * * # not nan * if val == val: # <<<<<<<<<<<<<< * nobs[b, j] += 1 * if val < minx[b, j]: */ __pyx_t_17 = ((__pyx_v_val == __pyx_v_val) != 0); if (__pyx_t_17) { /* "pandas/src/generated.pyx":6492 * # not nan * if val == val: * nobs[b, j] += 1 # <<<<<<<<<<<<<< * if val < minx[b, j]: * minx[b, j] = val */ __pyx_t_23 = __pyx_v_b; __pyx_t_24 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_nobs.rcbuffer->pybuffer.buf, __pyx_t_23, __pyx_pybuffernd_nobs.diminfo[0].strides, __pyx_t_24, __pyx_pybuffernd_nobs.diminfo[1].strides) += 1.0; /* "pandas/src/generated.pyx":6493 * if val == val: * nobs[b, j] += 1 * if val < minx[b, j]: # <<<<<<<<<<<<<< * minx[b, j] = val * else: */ __pyx_t_25 = __pyx_v_b; __pyx_t_26 = __pyx_v_j; __pyx_t_17 = ((__pyx_v_val < (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_minx.rcbuffer->pybuffer.buf, __pyx_t_25, __pyx_pybuffernd_minx.diminfo[0].strides, __pyx_t_26, __pyx_pybuffernd_minx.diminfo[1].strides))) != 0); if (__pyx_t_17) { /* "pandas/src/generated.pyx":6494 * nobs[b, j] += 1 * if val < minx[b, j]: * minx[b, j] = val # <<<<<<<<<<<<<< * else: * for i in range(N): */ __pyx_t_27 = __pyx_v_b; __pyx_t_28 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_minx.rcbuffer->pybuffer.buf, __pyx_t_27, __pyx_pybuffernd_minx.diminfo[0].strides, __pyx_t_28, __pyx_pybuffernd_minx.diminfo[1].strides) = __pyx_v_val; goto __pyx_L14; } __pyx_L14:; goto __pyx_L13; } __pyx_L13:; } } goto __pyx_L6; } /*else*/ { /* "pandas/src/generated.pyx":6496 * minx[b, j] = val * else: * for i in range(N): # <<<<<<<<<<<<<< * while b < ngroups - 1 and i >= bins[b]: * b += 1 */ __pyx_t_9 = __pyx_v_N; for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_9; __pyx_t_11+=1) { __pyx_v_i = __pyx_t_11; /* "pandas/src/generated.pyx":6497 * else: * for i in range(N): * while b < ngroups - 1 and i >= bins[b]: # <<<<<<<<<<<<<< * b += 1 * */ while (1) { __pyx_t_17 = ((__pyx_v_b < (__pyx_v_ngroups - 1)) != 0); if (__pyx_t_17) { __pyx_t_19 = __pyx_v_b; __pyx_t_12 = ((__pyx_v_i >= (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_bins.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_bins.diminfo[0].strides))) != 0); __pyx_t_16 = __pyx_t_12; } else { __pyx_t_16 = __pyx_t_17; } if (!__pyx_t_16) break; /* "pandas/src/generated.pyx":6498 * for i in range(N): * while b < ngroups - 1 and i >= bins[b]: * b += 1 # <<<<<<<<<<<<<< * * counts[b] += 1 */ __pyx_v_b = (__pyx_v_b + 1); } /* "pandas/src/generated.pyx":6500 * b += 1 * * counts[b] += 1 # <<<<<<<<<<<<<< * val = values[i, 0] * */ __pyx_t_20 = __pyx_v_b; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_counts.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_counts.diminfo[0].strides) += 1; /* "pandas/src/generated.pyx":6501 * * counts[b] += 1 * val = values[i, 0] # <<<<<<<<<<<<<< * * # not nan */ __pyx_t_29 = __pyx_v_i; __pyx_t_30 = 0; __pyx_v_val = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_29, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_30, __pyx_pybuffernd_values.diminfo[1].strides)); /* "pandas/src/generated.pyx":6504 * * # not nan * if val == val: # <<<<<<<<<<<<<< * nobs[b, 0] += 1 * if val < minx[b, 0]: */ __pyx_t_16 = ((__pyx_v_val == __pyx_v_val) != 0); if (__pyx_t_16) { /* "pandas/src/generated.pyx":6505 * # not nan * if val == val: * nobs[b, 0] += 1 # <<<<<<<<<<<<<< * if val < minx[b, 0]: * minx[b, 0] = val */ __pyx_t_31 = __pyx_v_b; __pyx_t_32 = 0; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_nobs.rcbuffer->pybuffer.buf, __pyx_t_31, __pyx_pybuffernd_nobs.diminfo[0].strides, __pyx_t_32, __pyx_pybuffernd_nobs.diminfo[1].strides) += 1.0; /* "pandas/src/generated.pyx":6506 * if val == val: * nobs[b, 0] += 1 * if val < minx[b, 0]: # <<<<<<<<<<<<<< * minx[b, 0] = val * */ __pyx_t_33 = __pyx_v_b; __pyx_t_34 = 0; __pyx_t_16 = ((__pyx_v_val < (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_minx.rcbuffer->pybuffer.buf, __pyx_t_33, __pyx_pybuffernd_minx.diminfo[0].strides, __pyx_t_34, __pyx_pybuffernd_minx.diminfo[1].strides))) != 0); if (__pyx_t_16) { /* "pandas/src/generated.pyx":6507 * nobs[b, 0] += 1 * if val < minx[b, 0]: * minx[b, 0] = val # <<<<<<<<<<<<<< * * for i in range(ngroups): */ __pyx_t_35 = __pyx_v_b; __pyx_t_36 = 0; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_minx.rcbuffer->pybuffer.buf, __pyx_t_35, __pyx_pybuffernd_minx.diminfo[0].strides, __pyx_t_36, __pyx_pybuffernd_minx.diminfo[1].strides) = __pyx_v_val; goto __pyx_L20; } __pyx_L20:; goto __pyx_L19; } __pyx_L19:; } } __pyx_L6:; /* "pandas/src/generated.pyx":6509 * minx[b, 0] = val * * for i in range(ngroups): # <<<<<<<<<<<<<< * for j in range(K): * if nobs[i, j] == 0: */ __pyx_t_9 = __pyx_v_ngroups; for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_9; __pyx_t_11+=1) { __pyx_v_i = __pyx_t_11; /* "pandas/src/generated.pyx":6510 * * for i in range(ngroups): * for j in range(K): # <<<<<<<<<<<<<< * if nobs[i, j] == 0: * out[i, j] = nan */ __pyx_t_37 = __pyx_v_K; for (__pyx_t_38 = 0; __pyx_t_38 < __pyx_t_37; __pyx_t_38+=1) { __pyx_v_j = __pyx_t_38; /* "pandas/src/generated.pyx":6511 * for i in range(ngroups): * for j in range(K): * if nobs[i, j] == 0: # <<<<<<<<<<<<<< * out[i, j] = nan * else: */ __pyx_t_39 = __pyx_v_i; __pyx_t_40 = __pyx_v_j; __pyx_t_16 = (((*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_nobs.rcbuffer->pybuffer.buf, __pyx_t_39, __pyx_pybuffernd_nobs.diminfo[0].strides, __pyx_t_40, __pyx_pybuffernd_nobs.diminfo[1].strides)) == 0.0) != 0); if (__pyx_t_16) { /* "pandas/src/generated.pyx":6512 * for j in range(K): * if nobs[i, j] == 0: * out[i, j] = nan # <<<<<<<<<<<<<< * else: * out[i, j] = minx[i, j] */ __pyx_t_41 = __pyx_v_i; __pyx_t_42 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_41, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_42, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_6pandas_5algos_nan; goto __pyx_L25; } /*else*/ { /* "pandas/src/generated.pyx":6514 * out[i, j] = nan * else: * out[i, j] = minx[i, j] # <<<<<<<<<<<<<< * @cython.wraparound(False) * @cython.boundscheck(False) */ __pyx_t_43 = __pyx_v_i; __pyx_t_44 = __pyx_v_j; __pyx_t_45 = __pyx_v_i; __pyx_t_46 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_45, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_46, __pyx_pybuffernd_out.diminfo[1].strides) = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_minx.rcbuffer->pybuffer.buf, __pyx_t_43, __pyx_pybuffernd_minx.diminfo[0].strides, __pyx_t_44, __pyx_pybuffernd_minx.diminfo[1].strides)); } __pyx_L25:; } } __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_13); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_bins.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_counts.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_minx.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.group_min_bin_float64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_bins.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_counts.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_minx.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_minx); __Pyx_XDECREF((PyObject *)__pyx_v_nobs); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_441group_min_bin_float32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6pandas_5algos_440group_min_bin_float32[] = "\n Only aggregates on axis=0\n "; static PyMethodDef __pyx_mdef_6pandas_5algos_441group_min_bin_float32 = {__Pyx_NAMESTR("group_min_bin_float32"), (PyCFunction)__pyx_pw_6pandas_5algos_441group_min_bin_float32, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_5algos_440group_min_bin_float32)}; static PyObject *__pyx_pw_6pandas_5algos_441group_min_bin_float32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_out = 0; PyArrayObject *__pyx_v_counts = 0; PyArrayObject *__pyx_v_values = 0; PyArrayObject *__pyx_v_bins = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("group_min_bin_float32 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__out,&__pyx_n_s__counts,&__pyx_n_s__values,&__pyx_n_s__bins,0}; PyObject* values[4] = {0,0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__out)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__counts)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("group_min_bin_float32", 1, 4, 4, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6517; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__values)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("group_min_bin_float32", 1, 4, 4, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6517; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__bins)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("group_min_bin_float32", 1, 4, 4, 3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6517; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "group_min_bin_float32") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6517; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 4) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[3] = PyTuple_GET_ITEM(__pyx_args, 3); } __pyx_v_out = ((PyArrayObject *)values[0]); __pyx_v_counts = ((PyArrayObject *)values[1]); __pyx_v_values = ((PyArrayObject *)values[2]); __pyx_v_bins = ((PyArrayObject *)values[3]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("group_min_bin_float32", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6517; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.group_min_bin_float32", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_5numpy_ndarray, 1, "out", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6517; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_counts), __pyx_ptype_5numpy_ndarray, 1, "counts", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6518; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6519; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_bins), __pyx_ptype_5numpy_ndarray, 1, "bins", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6520; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_440group_min_bin_float32(__pyx_self, __pyx_v_out, __pyx_v_counts, __pyx_v_values, __pyx_v_bins); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":6517 * @cython.wraparound(False) * @cython.boundscheck(False) * def group_min_bin_float32(ndarray[float32_t, ndim=2] out, # <<<<<<<<<<<<<< * ndarray[int64_t] counts, * ndarray[float32_t, ndim=2] values, */ static PyObject *__pyx_pf_6pandas_5algos_440group_min_bin_float32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_out, PyArrayObject *__pyx_v_counts, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_bins) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_N; Py_ssize_t __pyx_v_K; Py_ssize_t __pyx_v_ngroups; Py_ssize_t __pyx_v_b; __pyx_t_5numpy_float32_t __pyx_v_val; PyArrayObject *__pyx_v_minx = 0; PyArrayObject *__pyx_v_nobs = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_bins; __Pyx_Buffer __pyx_pybuffer_bins; __Pyx_LocalBuf_ND __pyx_pybuffernd_counts; __Pyx_Buffer __pyx_pybuffer_counts; __Pyx_LocalBuf_ND __pyx_pybuffernd_minx; __Pyx_Buffer __pyx_pybuffer_minx; __Pyx_LocalBuf_ND __pyx_pybuffernd_nobs; __Pyx_Buffer __pyx_pybuffer_nobs; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __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; PyArrayObject *__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; Py_ssize_t __pyx_t_11; int __pyx_t_12; PyObject *__pyx_t_13 = NULL; PyObject *(*__pyx_t_14)(PyObject *); Py_ssize_t __pyx_t_15; int __pyx_t_16; int __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; long __pyx_t_30; Py_ssize_t __pyx_t_31; long __pyx_t_32; Py_ssize_t __pyx_t_33; long __pyx_t_34; Py_ssize_t __pyx_t_35; long __pyx_t_36; Py_ssize_t __pyx_t_37; Py_ssize_t __pyx_t_38; Py_ssize_t __pyx_t_39; Py_ssize_t __pyx_t_40; Py_ssize_t __pyx_t_41; Py_ssize_t __pyx_t_42; Py_ssize_t __pyx_t_43; Py_ssize_t __pyx_t_44; Py_ssize_t __pyx_t_45; Py_ssize_t __pyx_t_46; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("group_min_bin_float32", 0); __pyx_pybuffer_minx.pybuffer.buf = NULL; __pyx_pybuffer_minx.refcount = 0; __pyx_pybuffernd_minx.data = NULL; __pyx_pybuffernd_minx.rcbuffer = &__pyx_pybuffer_minx; __pyx_pybuffer_nobs.pybuffer.buf = NULL; __pyx_pybuffer_nobs.refcount = 0; __pyx_pybuffernd_nobs.data = NULL; __pyx_pybuffernd_nobs.rcbuffer = &__pyx_pybuffer_nobs; __pyx_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; __pyx_pybuffer_counts.pybuffer.buf = NULL; __pyx_pybuffer_counts.refcount = 0; __pyx_pybuffernd_counts.data = NULL; __pyx_pybuffernd_counts.rcbuffer = &__pyx_pybuffer_counts; __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_bins.pybuffer.buf = NULL; __pyx_pybuffer_bins.refcount = 0; __pyx_pybuffernd_bins.data = NULL; __pyx_pybuffernd_bins.rcbuffer = &__pyx_pybuffer_bins; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_v_out, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6517; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; __pyx_pybuffernd_out.diminfo[1].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_out.diminfo[1].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[1]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_counts.rcbuffer->pybuffer, (PyObject*)__pyx_v_counts, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6517; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_counts.diminfo[0].strides = __pyx_pybuffernd_counts.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_counts.diminfo[0].shape = __pyx_pybuffernd_counts.rcbuffer->pybuffer.shape[0]; { __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_float32_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6517; __pyx_clineno = __LINE__; goto __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_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_bins.rcbuffer->pybuffer, (PyObject*)__pyx_v_bins, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6517; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_bins.diminfo[0].strides = __pyx_pybuffernd_bins.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_bins.diminfo[0].shape = __pyx_pybuffernd_bins.rcbuffer->pybuffer.shape[0]; /* "pandas/src/generated.pyx":6529 * ndarray[float32_t, ndim=2] minx, nobs * * nobs = np.zeros_like(out) # <<<<<<<<<<<<<< * * minx = np.empty_like(out) */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6529; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s__zeros_like); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6529; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 6529; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)__pyx_v_out)); PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_out)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out)); __pyx_t_3 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6529; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(((PyObject *)__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_filename = __pyx_f[2]; __pyx_lineno = 6529; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_4 = ((PyArrayObject *)__pyx_t_3); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer); __pyx_t_5 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer, (PyObject*)__pyx_t_4, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_nobs.rcbuffer->pybuffer, (PyObject*)__pyx_v_nobs, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_pybuffernd_nobs.diminfo[0].strides = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_nobs.diminfo[0].shape = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_nobs.diminfo[1].strides = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_nobs.diminfo[1].shape = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.shape[1]; if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6529; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_4 = 0; __pyx_v_nobs = ((PyArrayObject *)__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/generated.pyx":6531 * nobs = np.zeros_like(out) * * minx = np.empty_like(out) # <<<<<<<<<<<<<< * minx.fill(np.inf) * */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6531; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s__empty_like); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6531; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6531; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(((PyObject *)__pyx_v_out)); PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_v_out)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out)); __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6531; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(((PyObject *)__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_filename = __pyx_f[2]; __pyx_lineno = 6531; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_4 = ((PyArrayObject *)__pyx_t_2); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_minx.rcbuffer->pybuffer); __pyx_t_5 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_minx.rcbuffer->pybuffer, (PyObject*)__pyx_t_4, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_minx.rcbuffer->pybuffer, (PyObject*)__pyx_v_minx, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_pybuffernd_minx.diminfo[0].strides = __pyx_pybuffernd_minx.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_minx.diminfo[0].shape = __pyx_pybuffernd_minx.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_minx.diminfo[1].strides = __pyx_pybuffernd_minx.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_minx.diminfo[1].shape = __pyx_pybuffernd_minx.rcbuffer->pybuffer.shape[1]; if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6531; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_4 = 0; __pyx_v_minx = ((PyArrayObject *)__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":6532 * * minx = np.empty_like(out) * minx.fill(np.inf) # <<<<<<<<<<<<<< * * if bins[len(bins) - 1] == len(values): */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_minx), __pyx_n_s__fill); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6532; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6532; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s__inf); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6532; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6532; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6532; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/generated.pyx":6534 * minx.fill(np.inf) * * if bins[len(bins) - 1] == len(values): # <<<<<<<<<<<<<< * ngroups = len(bins) * else: */ __pyx_t_9 = PyObject_Length(((PyObject *)__pyx_v_bins)); if (unlikely(__pyx_t_9 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6534; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_10 = (__pyx_t_9 - 1); __pyx_t_11 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6534; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_12 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_bins.rcbuffer->pybuffer.buf, __pyx_t_10, __pyx_pybuffernd_bins.diminfo[0].strides)) == __pyx_t_11) != 0); if (__pyx_t_12) { /* "pandas/src/generated.pyx":6535 * * if bins[len(bins) - 1] == len(values): * ngroups = len(bins) # <<<<<<<<<<<<<< * else: * ngroups = len(bins) + 1 */ __pyx_t_11 = PyObject_Length(((PyObject *)__pyx_v_bins)); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6535; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_ngroups = __pyx_t_11; goto __pyx_L3; } /*else*/ { /* "pandas/src/generated.pyx":6537 * ngroups = len(bins) * else: * ngroups = len(bins) + 1 # <<<<<<<<<<<<<< * * N, K = ( values).shape */ __pyx_t_11 = PyObject_Length(((PyObject *)__pyx_v_bins)); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6537; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_ngroups = (__pyx_t_11 + 1); } __pyx_L3:; /* "pandas/src/generated.pyx":6539 * ngroups = len(bins) + 1 * * N, K = ( values).shape # <<<<<<<<<<<<<< * * b = 0 */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_values), __pyx_n_s__shape); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6539; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) { PyObject* sequence = __pyx_t_1; #if CYTHON_COMPILING_IN_CPYTHON Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6539; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_2 = PyTuple_GET_ITEM(sequence, 1); } else { __pyx_t_3 = PyList_GET_ITEM(sequence, 0); __pyx_t_2 = PyList_GET_ITEM(sequence, 1); } __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(__pyx_t_2); #else __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6539; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6539; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } else { Py_ssize_t index = -1; __pyx_t_13 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6539; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_14 = Py_TYPE(__pyx_t_13)->tp_iternext; index = 0; __pyx_t_3 = __pyx_t_14(__pyx_t_13); if (unlikely(!__pyx_t_3)) goto __pyx_L4_unpacking_failed; __Pyx_GOTREF(__pyx_t_3); index = 1; __pyx_t_2 = __pyx_t_14(__pyx_t_13); if (unlikely(!__pyx_t_2)) goto __pyx_L4_unpacking_failed; __Pyx_GOTREF(__pyx_t_2); if (__Pyx_IternextUnpackEndCheck(__pyx_t_14(__pyx_t_13), 2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6539; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_14 = NULL; __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; goto __pyx_L5_unpacking_done; __pyx_L4_unpacking_failed:; __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_14 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6539; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_L5_unpacking_done:; } __pyx_t_11 = __Pyx_PyIndex_AsSsize_t(__pyx_t_3); if (unlikely((__pyx_t_11 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6539; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_9 = __Pyx_PyIndex_AsSsize_t(__pyx_t_2); if (unlikely((__pyx_t_9 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6539; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_N = __pyx_t_11; __pyx_v_K = __pyx_t_9; /* "pandas/src/generated.pyx":6541 * N, K = ( values).shape * * b = 0 # <<<<<<<<<<<<<< * if K > 1: * for i in range(N): */ __pyx_v_b = 0; /* "pandas/src/generated.pyx":6542 * * b = 0 * if K > 1: # <<<<<<<<<<<<<< * for i in range(N): * while b < ngroups - 1 and i >= bins[b]: */ __pyx_t_12 = ((__pyx_v_K > 1) != 0); if (__pyx_t_12) { /* "pandas/src/generated.pyx":6543 * b = 0 * if K > 1: * for i in range(N): # <<<<<<<<<<<<<< * while b < ngroups - 1 and i >= bins[b]: * b += 1 */ __pyx_t_9 = __pyx_v_N; for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_9; __pyx_t_11+=1) { __pyx_v_i = __pyx_t_11; /* "pandas/src/generated.pyx":6544 * if K > 1: * for i in range(N): * while b < ngroups - 1 and i >= bins[b]: # <<<<<<<<<<<<<< * b += 1 * */ while (1) { __pyx_t_12 = ((__pyx_v_b < (__pyx_v_ngroups - 1)) != 0); if (__pyx_t_12) { __pyx_t_15 = __pyx_v_b; __pyx_t_16 = ((__pyx_v_i >= (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_bins.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_bins.diminfo[0].strides))) != 0); __pyx_t_17 = __pyx_t_16; } else { __pyx_t_17 = __pyx_t_12; } if (!__pyx_t_17) break; /* "pandas/src/generated.pyx":6545 * for i in range(N): * while b < ngroups - 1 and i >= bins[b]: * b += 1 # <<<<<<<<<<<<<< * * counts[b] += 1 */ __pyx_v_b = (__pyx_v_b + 1); } /* "pandas/src/generated.pyx":6547 * b += 1 * * counts[b] += 1 # <<<<<<<<<<<<<< * for j in range(K): * val = values[i, j] */ __pyx_t_18 = __pyx_v_b; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_counts.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_counts.diminfo[0].strides) += 1; /* "pandas/src/generated.pyx":6548 * * counts[b] += 1 * for j in range(K): # <<<<<<<<<<<<<< * val = values[i, j] * */ __pyx_t_19 = __pyx_v_K; for (__pyx_t_20 = 0; __pyx_t_20 < __pyx_t_19; __pyx_t_20+=1) { __pyx_v_j = __pyx_t_20; /* "pandas/src/generated.pyx":6549 * counts[b] += 1 * for j in range(K): * val = values[i, j] # <<<<<<<<<<<<<< * * # not nan */ __pyx_t_21 = __pyx_v_i; __pyx_t_22 = __pyx_v_j; __pyx_v_val = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_22, __pyx_pybuffernd_values.diminfo[1].strides)); /* "pandas/src/generated.pyx":6552 * * # not nan * if val == val: # <<<<<<<<<<<<<< * nobs[b, j] += 1 * if val < minx[b, j]: */ __pyx_t_17 = ((__pyx_v_val == __pyx_v_val) != 0); if (__pyx_t_17) { /* "pandas/src/generated.pyx":6553 * # not nan * if val == val: * nobs[b, j] += 1 # <<<<<<<<<<<<<< * if val < minx[b, j]: * minx[b, j] = val */ __pyx_t_23 = __pyx_v_b; __pyx_t_24 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_nobs.rcbuffer->pybuffer.buf, __pyx_t_23, __pyx_pybuffernd_nobs.diminfo[0].strides, __pyx_t_24, __pyx_pybuffernd_nobs.diminfo[1].strides) += 1.0; /* "pandas/src/generated.pyx":6554 * if val == val: * nobs[b, j] += 1 * if val < minx[b, j]: # <<<<<<<<<<<<<< * minx[b, j] = val * else: */ __pyx_t_25 = __pyx_v_b; __pyx_t_26 = __pyx_v_j; __pyx_t_17 = ((__pyx_v_val < (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_minx.rcbuffer->pybuffer.buf, __pyx_t_25, __pyx_pybuffernd_minx.diminfo[0].strides, __pyx_t_26, __pyx_pybuffernd_minx.diminfo[1].strides))) != 0); if (__pyx_t_17) { /* "pandas/src/generated.pyx":6555 * nobs[b, j] += 1 * if val < minx[b, j]: * minx[b, j] = val # <<<<<<<<<<<<<< * else: * for i in range(N): */ __pyx_t_27 = __pyx_v_b; __pyx_t_28 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_minx.rcbuffer->pybuffer.buf, __pyx_t_27, __pyx_pybuffernd_minx.diminfo[0].strides, __pyx_t_28, __pyx_pybuffernd_minx.diminfo[1].strides) = __pyx_v_val; goto __pyx_L14; } __pyx_L14:; goto __pyx_L13; } __pyx_L13:; } } goto __pyx_L6; } /*else*/ { /* "pandas/src/generated.pyx":6557 * minx[b, j] = val * else: * for i in range(N): # <<<<<<<<<<<<<< * while b < ngroups - 1 and i >= bins[b]: * b += 1 */ __pyx_t_9 = __pyx_v_N; for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_9; __pyx_t_11+=1) { __pyx_v_i = __pyx_t_11; /* "pandas/src/generated.pyx":6558 * else: * for i in range(N): * while b < ngroups - 1 and i >= bins[b]: # <<<<<<<<<<<<<< * b += 1 * */ while (1) { __pyx_t_17 = ((__pyx_v_b < (__pyx_v_ngroups - 1)) != 0); if (__pyx_t_17) { __pyx_t_19 = __pyx_v_b; __pyx_t_12 = ((__pyx_v_i >= (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_bins.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_bins.diminfo[0].strides))) != 0); __pyx_t_16 = __pyx_t_12; } else { __pyx_t_16 = __pyx_t_17; } if (!__pyx_t_16) break; /* "pandas/src/generated.pyx":6559 * for i in range(N): * while b < ngroups - 1 and i >= bins[b]: * b += 1 # <<<<<<<<<<<<<< * * counts[b] += 1 */ __pyx_v_b = (__pyx_v_b + 1); } /* "pandas/src/generated.pyx":6561 * b += 1 * * counts[b] += 1 # <<<<<<<<<<<<<< * val = values[i, 0] * */ __pyx_t_20 = __pyx_v_b; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_counts.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_counts.diminfo[0].strides) += 1; /* "pandas/src/generated.pyx":6562 * * counts[b] += 1 * val = values[i, 0] # <<<<<<<<<<<<<< * * # not nan */ __pyx_t_29 = __pyx_v_i; __pyx_t_30 = 0; __pyx_v_val = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_29, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_30, __pyx_pybuffernd_values.diminfo[1].strides)); /* "pandas/src/generated.pyx":6565 * * # not nan * if val == val: # <<<<<<<<<<<<<< * nobs[b, 0] += 1 * if val < minx[b, 0]: */ __pyx_t_16 = ((__pyx_v_val == __pyx_v_val) != 0); if (__pyx_t_16) { /* "pandas/src/generated.pyx":6566 * # not nan * if val == val: * nobs[b, 0] += 1 # <<<<<<<<<<<<<< * if val < minx[b, 0]: * minx[b, 0] = val */ __pyx_t_31 = __pyx_v_b; __pyx_t_32 = 0; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_nobs.rcbuffer->pybuffer.buf, __pyx_t_31, __pyx_pybuffernd_nobs.diminfo[0].strides, __pyx_t_32, __pyx_pybuffernd_nobs.diminfo[1].strides) += 1.0; /* "pandas/src/generated.pyx":6567 * if val == val: * nobs[b, 0] += 1 * if val < minx[b, 0]: # <<<<<<<<<<<<<< * minx[b, 0] = val * */ __pyx_t_33 = __pyx_v_b; __pyx_t_34 = 0; __pyx_t_16 = ((__pyx_v_val < (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_minx.rcbuffer->pybuffer.buf, __pyx_t_33, __pyx_pybuffernd_minx.diminfo[0].strides, __pyx_t_34, __pyx_pybuffernd_minx.diminfo[1].strides))) != 0); if (__pyx_t_16) { /* "pandas/src/generated.pyx":6568 * nobs[b, 0] += 1 * if val < minx[b, 0]: * minx[b, 0] = val # <<<<<<<<<<<<<< * * for i in range(ngroups): */ __pyx_t_35 = __pyx_v_b; __pyx_t_36 = 0; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_minx.rcbuffer->pybuffer.buf, __pyx_t_35, __pyx_pybuffernd_minx.diminfo[0].strides, __pyx_t_36, __pyx_pybuffernd_minx.diminfo[1].strides) = __pyx_v_val; goto __pyx_L20; } __pyx_L20:; goto __pyx_L19; } __pyx_L19:; } } __pyx_L6:; /* "pandas/src/generated.pyx":6570 * minx[b, 0] = val * * for i in range(ngroups): # <<<<<<<<<<<<<< * for j in range(K): * if nobs[i, j] == 0: */ __pyx_t_9 = __pyx_v_ngroups; for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_9; __pyx_t_11+=1) { __pyx_v_i = __pyx_t_11; /* "pandas/src/generated.pyx":6571 * * for i in range(ngroups): * for j in range(K): # <<<<<<<<<<<<<< * if nobs[i, j] == 0: * out[i, j] = nan */ __pyx_t_37 = __pyx_v_K; for (__pyx_t_38 = 0; __pyx_t_38 < __pyx_t_37; __pyx_t_38+=1) { __pyx_v_j = __pyx_t_38; /* "pandas/src/generated.pyx":6572 * for i in range(ngroups): * for j in range(K): * if nobs[i, j] == 0: # <<<<<<<<<<<<<< * out[i, j] = nan * else: */ __pyx_t_39 = __pyx_v_i; __pyx_t_40 = __pyx_v_j; __pyx_t_16 = (((*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_nobs.rcbuffer->pybuffer.buf, __pyx_t_39, __pyx_pybuffernd_nobs.diminfo[0].strides, __pyx_t_40, __pyx_pybuffernd_nobs.diminfo[1].strides)) == 0.0) != 0); if (__pyx_t_16) { /* "pandas/src/generated.pyx":6573 * for j in range(K): * if nobs[i, j] == 0: * out[i, j] = nan # <<<<<<<<<<<<<< * else: * out[i, j] = minx[i, j] */ __pyx_t_41 = __pyx_v_i; __pyx_t_42 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_41, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_42, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_6pandas_5algos_nan; goto __pyx_L25; } /*else*/ { /* "pandas/src/generated.pyx":6575 * out[i, j] = nan * else: * out[i, j] = minx[i, j] # <<<<<<<<<<<<<< * * @cython.wraparound(False) */ __pyx_t_43 = __pyx_v_i; __pyx_t_44 = __pyx_v_j; __pyx_t_45 = __pyx_v_i; __pyx_t_46 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_45, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_46, __pyx_pybuffernd_out.diminfo[1].strides) = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_minx.rcbuffer->pybuffer.buf, __pyx_t_43, __pyx_pybuffernd_minx.diminfo[0].strides, __pyx_t_44, __pyx_pybuffernd_minx.diminfo[1].strides)); } __pyx_L25:; } } __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_13); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_bins.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_counts.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_minx.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.group_min_bin_float32", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_bins.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_counts.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_minx.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_minx); __Pyx_XDECREF((PyObject *)__pyx_v_nobs); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_443group_max_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6pandas_5algos_442group_max_float64[] = "\n Only aggregates on axis=0\n "; static PyMethodDef __pyx_mdef_6pandas_5algos_443group_max_float64 = {__Pyx_NAMESTR("group_max_float64"), (PyCFunction)__pyx_pw_6pandas_5algos_443group_max_float64, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_5algos_442group_max_float64)}; static PyObject *__pyx_pw_6pandas_5algos_443group_max_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_out = 0; PyArrayObject *__pyx_v_counts = 0; PyArrayObject *__pyx_v_values = 0; PyArrayObject *__pyx_v_labels = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("group_max_float64 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__out,&__pyx_n_s__counts,&__pyx_n_s__values,&__pyx_n_s__labels,0}; PyObject* values[4] = {0,0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__out)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__counts)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("group_max_float64", 1, 4, 4, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6579; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__values)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("group_max_float64", 1, 4, 4, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6579; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__labels)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("group_max_float64", 1, 4, 4, 3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6579; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "group_max_float64") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6579; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 4) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[3] = PyTuple_GET_ITEM(__pyx_args, 3); } __pyx_v_out = ((PyArrayObject *)values[0]); __pyx_v_counts = ((PyArrayObject *)values[1]); __pyx_v_values = ((PyArrayObject *)values[2]); __pyx_v_labels = ((PyArrayObject *)values[3]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("group_max_float64", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6579; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.group_max_float64", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_5numpy_ndarray, 1, "out", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6579; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_counts), __pyx_ptype_5numpy_ndarray, 1, "counts", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6580; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6581; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_labels), __pyx_ptype_5numpy_ndarray, 1, "labels", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6582; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_442group_max_float64(__pyx_self, __pyx_v_out, __pyx_v_counts, __pyx_v_values, __pyx_v_labels); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":6579 * @cython.wraparound(False) * @cython.boundscheck(False) * def group_max_float64(ndarray[float64_t, ndim=2] out, # <<<<<<<<<<<<<< * ndarray[int64_t] counts, * ndarray[float64_t, ndim=2] values, */ static PyObject *__pyx_pf_6pandas_5algos_442group_max_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_out, PyArrayObject *__pyx_v_counts, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_labels) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_N; Py_ssize_t __pyx_v_K; Py_ssize_t __pyx_v_lab; __pyx_t_5numpy_float64_t __pyx_v_val; PyArrayObject *__pyx_v_maxx = 0; PyArrayObject *__pyx_v_nobs = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_counts; __Pyx_Buffer __pyx_pybuffer_counts; __Pyx_LocalBuf_ND __pyx_pybuffernd_labels; __Pyx_Buffer __pyx_pybuffer_labels; __Pyx_LocalBuf_ND __pyx_pybuffernd_maxx; __Pyx_Buffer __pyx_pybuffer_maxx; __Pyx_LocalBuf_ND __pyx_pybuffernd_nobs; __Pyx_Buffer __pyx_pybuffer_nobs; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_values; __Pyx_Buffer __pyx_pybuffer_values; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; Py_ssize_t __pyx_t_2; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyArrayObject *__pyx_t_7 = NULL; int __pyx_t_8; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; PyObject *__pyx_t_11 = NULL; PyObject *__pyx_t_12 = NULL; PyObject *(*__pyx_t_13)(PyObject *); 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; Py_ssize_t __pyx_t_26; long __pyx_t_27; Py_ssize_t __pyx_t_28; long __pyx_t_29; Py_ssize_t __pyx_t_30; long __pyx_t_31; Py_ssize_t __pyx_t_32; long __pyx_t_33; Py_ssize_t __pyx_t_34; Py_ssize_t __pyx_t_35; Py_ssize_t __pyx_t_36; Py_ssize_t __pyx_t_37; Py_ssize_t __pyx_t_38; Py_ssize_t __pyx_t_39; Py_ssize_t __pyx_t_40; Py_ssize_t __pyx_t_41; Py_ssize_t __pyx_t_42; Py_ssize_t __pyx_t_43; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("group_max_float64", 0); __pyx_pybuffer_maxx.pybuffer.buf = NULL; __pyx_pybuffer_maxx.refcount = 0; __pyx_pybuffernd_maxx.data = NULL; __pyx_pybuffernd_maxx.rcbuffer = &__pyx_pybuffer_maxx; __pyx_pybuffer_nobs.pybuffer.buf = NULL; __pyx_pybuffer_nobs.refcount = 0; __pyx_pybuffernd_nobs.data = NULL; __pyx_pybuffernd_nobs.rcbuffer = &__pyx_pybuffer_nobs; __pyx_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; __pyx_pybuffer_counts.pybuffer.buf = NULL; __pyx_pybuffer_counts.refcount = 0; __pyx_pybuffernd_counts.data = NULL; __pyx_pybuffernd_counts.rcbuffer = &__pyx_pybuffer_counts; __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_labels.pybuffer.buf = NULL; __pyx_pybuffer_labels.refcount = 0; __pyx_pybuffernd_labels.data = NULL; __pyx_pybuffernd_labels.rcbuffer = &__pyx_pybuffer_labels; { __Pyx_BufFmt_StackElem __pyx_stack[1]; 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, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6579; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; __pyx_pybuffernd_out.diminfo[1].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_out.diminfo[1].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[1]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_counts.rcbuffer->pybuffer, (PyObject*)__pyx_v_counts, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6579; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_counts.diminfo[0].strides = __pyx_pybuffernd_counts.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_counts.diminfo[0].shape = __pyx_pybuffernd_counts.rcbuffer->pybuffer.shape[0]; { __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, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6579; __pyx_clineno = __LINE__; goto __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_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_labels.rcbuffer->pybuffer, (PyObject*)__pyx_v_labels, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6579; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_labels.diminfo[0].strides = __pyx_pybuffernd_labels.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_labels.diminfo[0].shape = __pyx_pybuffernd_labels.rcbuffer->pybuffer.shape[0]; /* "pandas/src/generated.pyx":6591 * ndarray[float64_t, ndim=2] maxx, nobs * * if not len(values) == len(labels): # <<<<<<<<<<<<<< * raise AssertionError("len(index) != len(labels)") * */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6591; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_2 = PyObject_Length(((PyObject *)__pyx_v_labels)); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6591; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_3 = ((!((__pyx_t_1 == __pyx_t_2) != 0)) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":6592 * * if not len(values) == len(labels): * raise AssertionError("len(index) != len(labels)") # <<<<<<<<<<<<<< * * nobs = np.zeros_like(out) */ __pyx_t_4 = PyObject_Call(__pyx_builtin_AssertionError, ((PyObject *)__pyx_k_tuple_198), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6592; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 6592; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L3; } __pyx_L3:; /* "pandas/src/generated.pyx":6594 * raise AssertionError("len(index) != len(labels)") * * nobs = np.zeros_like(out) # <<<<<<<<<<<<<< * * maxx = np.empty_like(out) */ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6594; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s__zeros_like); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6594; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6594; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(((PyObject *)__pyx_v_out)); PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_v_out)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out)); __pyx_t_6 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6594; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6594; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_7 = ((PyArrayObject *)__pyx_t_6); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer); __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_nobs.rcbuffer->pybuffer, (PyObject*)__pyx_v_nobs, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_pybuffernd_nobs.diminfo[0].strides = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_nobs.diminfo[0].shape = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_nobs.diminfo[1].strides = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_nobs.diminfo[1].shape = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.shape[1]; if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6594; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_7 = 0; __pyx_v_nobs = ((PyArrayObject *)__pyx_t_6); __pyx_t_6 = 0; /* "pandas/src/generated.pyx":6596 * nobs = np.zeros_like(out) * * maxx = np.empty_like(out) # <<<<<<<<<<<<<< * maxx.fill(-np.inf) * */ __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6596; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s__empty_like); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6596; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6596; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(((PyObject *)__pyx_v_out)); PyTuple_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_v_out)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out)); __pyx_t_5 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6596; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0; if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6596; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_7 = ((PyArrayObject *)__pyx_t_5); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_maxx.rcbuffer->pybuffer); __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_maxx.rcbuffer->pybuffer, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_maxx.rcbuffer->pybuffer, (PyObject*)__pyx_v_maxx, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_pybuffernd_maxx.diminfo[0].strides = __pyx_pybuffernd_maxx.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_maxx.diminfo[0].shape = __pyx_pybuffernd_maxx.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_maxx.diminfo[1].strides = __pyx_pybuffernd_maxx.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_maxx.diminfo[1].shape = __pyx_pybuffernd_maxx.rcbuffer->pybuffer.shape[1]; if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6596; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_7 = 0; __pyx_v_maxx = ((PyArrayObject *)__pyx_t_5); __pyx_t_5 = 0; /* "pandas/src/generated.pyx":6597 * * maxx = np.empty_like(out) * maxx.fill(-np.inf) # <<<<<<<<<<<<<< * * N, K = ( values).shape */ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_maxx), __pyx_n_s__fill); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6597; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6597; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s__inf); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6597; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyNumber_Negative(__pyx_t_4); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6597; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6597; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6597; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; /* "pandas/src/generated.pyx":6599 * maxx.fill(-np.inf) * * N, K = ( values).shape # <<<<<<<<<<<<<< * * if K > 1: */ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_values), __pyx_n_s__shape); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6599; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); if ((likely(PyTuple_CheckExact(__pyx_t_6))) || (PyList_CheckExact(__pyx_t_6))) { PyObject* sequence = __pyx_t_6; #if CYTHON_COMPILING_IN_CPYTHON Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6599; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_4 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_5 = PyTuple_GET_ITEM(sequence, 1); } else { __pyx_t_4 = PyList_GET_ITEM(sequence, 0); __pyx_t_5 = PyList_GET_ITEM(sequence, 1); } __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(__pyx_t_5); #else __pyx_t_4 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6599; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6599; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); #endif __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } else { Py_ssize_t index = -1; __pyx_t_12 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6599; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_13 = Py_TYPE(__pyx_t_12)->tp_iternext; index = 0; __pyx_t_4 = __pyx_t_13(__pyx_t_12); if (unlikely(!__pyx_t_4)) goto __pyx_L4_unpacking_failed; __Pyx_GOTREF(__pyx_t_4); index = 1; __pyx_t_5 = __pyx_t_13(__pyx_t_12); if (unlikely(!__pyx_t_5)) goto __pyx_L4_unpacking_failed; __Pyx_GOTREF(__pyx_t_5); if (__Pyx_IternextUnpackEndCheck(__pyx_t_13(__pyx_t_12), 2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6599; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_13 = NULL; __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; goto __pyx_L5_unpacking_done; __pyx_L4_unpacking_failed:; __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __pyx_t_13 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6599; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_L5_unpacking_done:; } __pyx_t_2 = __Pyx_PyIndex_AsSsize_t(__pyx_t_4); if (unlikely((__pyx_t_2 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6599; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_1 = __Pyx_PyIndex_AsSsize_t(__pyx_t_5); if (unlikely((__pyx_t_1 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6599; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_v_N = __pyx_t_2; __pyx_v_K = __pyx_t_1; /* "pandas/src/generated.pyx":6601 * N, K = ( values).shape * * if K > 1: # <<<<<<<<<<<<<< * for i in range(N): * lab = labels[i] */ __pyx_t_3 = ((__pyx_v_K > 1) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":6602 * * if K > 1: * for i in range(N): # <<<<<<<<<<<<<< * lab = labels[i] * if lab < 0: */ __pyx_t_1 = __pyx_v_N; for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) { __pyx_v_i = __pyx_t_2; /* "pandas/src/generated.pyx":6603 * if K > 1: * for i in range(N): * lab = labels[i] # <<<<<<<<<<<<<< * if lab < 0: * continue */ __pyx_t_14 = __pyx_v_i; __pyx_v_lab = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_labels.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_labels.diminfo[0].strides)); /* "pandas/src/generated.pyx":6604 * for i in range(N): * lab = labels[i] * if lab < 0: # <<<<<<<<<<<<<< * continue * */ __pyx_t_3 = ((__pyx_v_lab < 0) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":6605 * lab = labels[i] * if lab < 0: * continue # <<<<<<<<<<<<<< * * counts[lab] += 1 */ goto __pyx_L7_continue; goto __pyx_L9; } __pyx_L9:; /* "pandas/src/generated.pyx":6607 * continue * * counts[lab] += 1 # <<<<<<<<<<<<<< * for j in range(K): * val = values[i, j] */ __pyx_t_15 = __pyx_v_lab; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_counts.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_counts.diminfo[0].strides) += 1; /* "pandas/src/generated.pyx":6608 * * counts[lab] += 1 * for j in range(K): # <<<<<<<<<<<<<< * val = values[i, j] * */ __pyx_t_16 = __pyx_v_K; for (__pyx_t_17 = 0; __pyx_t_17 < __pyx_t_16; __pyx_t_17+=1) { __pyx_v_j = __pyx_t_17; /* "pandas/src/generated.pyx":6609 * counts[lab] += 1 * for j in range(K): * val = values[i, j] # <<<<<<<<<<<<<< * * # not nan */ __pyx_t_18 = __pyx_v_i; __pyx_t_19 = __pyx_v_j; __pyx_v_val = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_19, __pyx_pybuffernd_values.diminfo[1].strides)); /* "pandas/src/generated.pyx":6612 * * # not nan * if val == val: # <<<<<<<<<<<<<< * nobs[lab, j] += 1 * if val > maxx[lab, j]: */ __pyx_t_3 = ((__pyx_v_val == __pyx_v_val) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":6613 * # not nan * if val == val: * nobs[lab, j] += 1 # <<<<<<<<<<<<<< * if val > maxx[lab, j]: * maxx[lab, j] = val */ __pyx_t_20 = __pyx_v_lab; __pyx_t_21 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_nobs.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_nobs.diminfo[0].strides, __pyx_t_21, __pyx_pybuffernd_nobs.diminfo[1].strides) += 1.0; /* "pandas/src/generated.pyx":6614 * if val == val: * nobs[lab, j] += 1 * if val > maxx[lab, j]: # <<<<<<<<<<<<<< * maxx[lab, j] = val * else: */ __pyx_t_22 = __pyx_v_lab; __pyx_t_23 = __pyx_v_j; __pyx_t_3 = ((__pyx_v_val > (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_maxx.rcbuffer->pybuffer.buf, __pyx_t_22, __pyx_pybuffernd_maxx.diminfo[0].strides, __pyx_t_23, __pyx_pybuffernd_maxx.diminfo[1].strides))) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":6615 * nobs[lab, j] += 1 * if val > maxx[lab, j]: * maxx[lab, j] = val # <<<<<<<<<<<<<< * else: * for i in range(N): */ __pyx_t_24 = __pyx_v_lab; __pyx_t_25 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_maxx.rcbuffer->pybuffer.buf, __pyx_t_24, __pyx_pybuffernd_maxx.diminfo[0].strides, __pyx_t_25, __pyx_pybuffernd_maxx.diminfo[1].strides) = __pyx_v_val; goto __pyx_L13; } __pyx_L13:; goto __pyx_L12; } __pyx_L12:; } __pyx_L7_continue:; } goto __pyx_L6; } /*else*/ { /* "pandas/src/generated.pyx":6617 * maxx[lab, j] = val * else: * for i in range(N): # <<<<<<<<<<<<<< * lab = labels[i] * if lab < 0: */ __pyx_t_1 = __pyx_v_N; for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) { __pyx_v_i = __pyx_t_2; /* "pandas/src/generated.pyx":6618 * else: * for i in range(N): * lab = labels[i] # <<<<<<<<<<<<<< * if lab < 0: * continue */ __pyx_t_16 = __pyx_v_i; __pyx_v_lab = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_labels.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_labels.diminfo[0].strides)); /* "pandas/src/generated.pyx":6619 * for i in range(N): * lab = labels[i] * if lab < 0: # <<<<<<<<<<<<<< * continue * */ __pyx_t_3 = ((__pyx_v_lab < 0) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":6620 * lab = labels[i] * if lab < 0: * continue # <<<<<<<<<<<<<< * * counts[lab] += 1 */ goto __pyx_L14_continue; goto __pyx_L16; } __pyx_L16:; /* "pandas/src/generated.pyx":6622 * continue * * counts[lab] += 1 # <<<<<<<<<<<<<< * val = values[i, 0] * */ __pyx_t_17 = __pyx_v_lab; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_counts.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_counts.diminfo[0].strides) += 1; /* "pandas/src/generated.pyx":6623 * * counts[lab] += 1 * val = values[i, 0] # <<<<<<<<<<<<<< * * # not nan */ __pyx_t_26 = __pyx_v_i; __pyx_t_27 = 0; __pyx_v_val = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_26, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_27, __pyx_pybuffernd_values.diminfo[1].strides)); /* "pandas/src/generated.pyx":6626 * * # not nan * if val == val: # <<<<<<<<<<<<<< * nobs[lab, 0] += 1 * if val > maxx[lab, 0]: */ __pyx_t_3 = ((__pyx_v_val == __pyx_v_val) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":6627 * # not nan * if val == val: * nobs[lab, 0] += 1 # <<<<<<<<<<<<<< * if val > maxx[lab, 0]: * maxx[lab, 0] = val */ __pyx_t_28 = __pyx_v_lab; __pyx_t_29 = 0; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_nobs.rcbuffer->pybuffer.buf, __pyx_t_28, __pyx_pybuffernd_nobs.diminfo[0].strides, __pyx_t_29, __pyx_pybuffernd_nobs.diminfo[1].strides) += 1.0; /* "pandas/src/generated.pyx":6628 * if val == val: * nobs[lab, 0] += 1 * if val > maxx[lab, 0]: # <<<<<<<<<<<<<< * maxx[lab, 0] = val * */ __pyx_t_30 = __pyx_v_lab; __pyx_t_31 = 0; __pyx_t_3 = ((__pyx_v_val > (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_maxx.rcbuffer->pybuffer.buf, __pyx_t_30, __pyx_pybuffernd_maxx.diminfo[0].strides, __pyx_t_31, __pyx_pybuffernd_maxx.diminfo[1].strides))) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":6629 * nobs[lab, 0] += 1 * if val > maxx[lab, 0]: * maxx[lab, 0] = val # <<<<<<<<<<<<<< * * for i in range(len(counts)): */ __pyx_t_32 = __pyx_v_lab; __pyx_t_33 = 0; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_maxx.rcbuffer->pybuffer.buf, __pyx_t_32, __pyx_pybuffernd_maxx.diminfo[0].strides, __pyx_t_33, __pyx_pybuffernd_maxx.diminfo[1].strides) = __pyx_v_val; goto __pyx_L18; } __pyx_L18:; goto __pyx_L17; } __pyx_L17:; __pyx_L14_continue:; } } __pyx_L6:; /* "pandas/src/generated.pyx":6631 * maxx[lab, 0] = val * * for i in range(len(counts)): # <<<<<<<<<<<<<< * for j in range(K): * if nobs[i, j] == 0: */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_counts)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6631; __pyx_clineno = __LINE__; goto __pyx_L1_error;} for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) { __pyx_v_i = __pyx_t_2; /* "pandas/src/generated.pyx":6632 * * for i in range(len(counts)): * for j in range(K): # <<<<<<<<<<<<<< * if nobs[i, j] == 0: * out[i, j] = nan */ __pyx_t_34 = __pyx_v_K; for (__pyx_t_35 = 0; __pyx_t_35 < __pyx_t_34; __pyx_t_35+=1) { __pyx_v_j = __pyx_t_35; /* "pandas/src/generated.pyx":6633 * for i in range(len(counts)): * for j in range(K): * if nobs[i, j] == 0: # <<<<<<<<<<<<<< * out[i, j] = nan * else: */ __pyx_t_36 = __pyx_v_i; __pyx_t_37 = __pyx_v_j; __pyx_t_3 = (((*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_nobs.rcbuffer->pybuffer.buf, __pyx_t_36, __pyx_pybuffernd_nobs.diminfo[0].strides, __pyx_t_37, __pyx_pybuffernd_nobs.diminfo[1].strides)) == 0.0) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":6634 * for j in range(K): * if nobs[i, j] == 0: * out[i, j] = nan # <<<<<<<<<<<<<< * else: * out[i, j] = maxx[i, j] */ __pyx_t_38 = __pyx_v_i; __pyx_t_39 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_38, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_39, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_6pandas_5algos_nan; goto __pyx_L23; } /*else*/ { /* "pandas/src/generated.pyx":6636 * out[i, j] = nan * else: * out[i, j] = maxx[i, j] # <<<<<<<<<<<<<< * @cython.wraparound(False) * @cython.boundscheck(False) */ __pyx_t_40 = __pyx_v_i; __pyx_t_41 = __pyx_v_j; __pyx_t_42 = __pyx_v_i; __pyx_t_43 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_42, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_43, __pyx_pybuffernd_out.diminfo[1].strides) = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_maxx.rcbuffer->pybuffer.buf, __pyx_t_40, __pyx_pybuffernd_maxx.diminfo[0].strides, __pyx_t_41, __pyx_pybuffernd_maxx.diminfo[1].strides)); } __pyx_L23:; } } __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_12); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_counts.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_labels.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_maxx.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.group_max_float64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_counts.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_labels.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_maxx.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_maxx); __Pyx_XDECREF((PyObject *)__pyx_v_nobs); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_445group_max_float32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6pandas_5algos_444group_max_float32[] = "\n Only aggregates on axis=0\n "; static PyMethodDef __pyx_mdef_6pandas_5algos_445group_max_float32 = {__Pyx_NAMESTR("group_max_float32"), (PyCFunction)__pyx_pw_6pandas_5algos_445group_max_float32, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_5algos_444group_max_float32)}; static PyObject *__pyx_pw_6pandas_5algos_445group_max_float32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_out = 0; PyArrayObject *__pyx_v_counts = 0; PyArrayObject *__pyx_v_values = 0; PyArrayObject *__pyx_v_labels = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("group_max_float32 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__out,&__pyx_n_s__counts,&__pyx_n_s__values,&__pyx_n_s__labels,0}; PyObject* values[4] = {0,0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__out)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__counts)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("group_max_float32", 1, 4, 4, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6639; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__values)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("group_max_float32", 1, 4, 4, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6639; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__labels)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("group_max_float32", 1, 4, 4, 3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6639; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "group_max_float32") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6639; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 4) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[3] = PyTuple_GET_ITEM(__pyx_args, 3); } __pyx_v_out = ((PyArrayObject *)values[0]); __pyx_v_counts = ((PyArrayObject *)values[1]); __pyx_v_values = ((PyArrayObject *)values[2]); __pyx_v_labels = ((PyArrayObject *)values[3]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("group_max_float32", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6639; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.group_max_float32", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_5numpy_ndarray, 1, "out", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6639; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_counts), __pyx_ptype_5numpy_ndarray, 1, "counts", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6640; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6641; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_labels), __pyx_ptype_5numpy_ndarray, 1, "labels", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6642; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_444group_max_float32(__pyx_self, __pyx_v_out, __pyx_v_counts, __pyx_v_values, __pyx_v_labels); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":6639 * @cython.wraparound(False) * @cython.boundscheck(False) * def group_max_float32(ndarray[float32_t, ndim=2] out, # <<<<<<<<<<<<<< * ndarray[int64_t] counts, * ndarray[float32_t, ndim=2] values, */ static PyObject *__pyx_pf_6pandas_5algos_444group_max_float32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_out, PyArrayObject *__pyx_v_counts, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_labels) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_N; Py_ssize_t __pyx_v_K; Py_ssize_t __pyx_v_lab; __pyx_t_5numpy_float32_t __pyx_v_val; PyArrayObject *__pyx_v_maxx = 0; PyArrayObject *__pyx_v_nobs = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_counts; __Pyx_Buffer __pyx_pybuffer_counts; __Pyx_LocalBuf_ND __pyx_pybuffernd_labels; __Pyx_Buffer __pyx_pybuffer_labels; __Pyx_LocalBuf_ND __pyx_pybuffernd_maxx; __Pyx_Buffer __pyx_pybuffer_maxx; __Pyx_LocalBuf_ND __pyx_pybuffernd_nobs; __Pyx_Buffer __pyx_pybuffer_nobs; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_values; __Pyx_Buffer __pyx_pybuffer_values; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; Py_ssize_t __pyx_t_2; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyArrayObject *__pyx_t_7 = NULL; int __pyx_t_8; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; PyObject *__pyx_t_11 = NULL; PyObject *__pyx_t_12 = NULL; PyObject *(*__pyx_t_13)(PyObject *); 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; Py_ssize_t __pyx_t_26; long __pyx_t_27; Py_ssize_t __pyx_t_28; long __pyx_t_29; Py_ssize_t __pyx_t_30; long __pyx_t_31; Py_ssize_t __pyx_t_32; long __pyx_t_33; Py_ssize_t __pyx_t_34; Py_ssize_t __pyx_t_35; Py_ssize_t __pyx_t_36; Py_ssize_t __pyx_t_37; Py_ssize_t __pyx_t_38; Py_ssize_t __pyx_t_39; Py_ssize_t __pyx_t_40; Py_ssize_t __pyx_t_41; Py_ssize_t __pyx_t_42; Py_ssize_t __pyx_t_43; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("group_max_float32", 0); __pyx_pybuffer_maxx.pybuffer.buf = NULL; __pyx_pybuffer_maxx.refcount = 0; __pyx_pybuffernd_maxx.data = NULL; __pyx_pybuffernd_maxx.rcbuffer = &__pyx_pybuffer_maxx; __pyx_pybuffer_nobs.pybuffer.buf = NULL; __pyx_pybuffer_nobs.refcount = 0; __pyx_pybuffernd_nobs.data = NULL; __pyx_pybuffernd_nobs.rcbuffer = &__pyx_pybuffer_nobs; __pyx_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; __pyx_pybuffer_counts.pybuffer.buf = NULL; __pyx_pybuffer_counts.refcount = 0; __pyx_pybuffernd_counts.data = NULL; __pyx_pybuffernd_counts.rcbuffer = &__pyx_pybuffer_counts; __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_labels.pybuffer.buf = NULL; __pyx_pybuffer_labels.refcount = 0; __pyx_pybuffernd_labels.data = NULL; __pyx_pybuffernd_labels.rcbuffer = &__pyx_pybuffer_labels; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_v_out, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6639; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; __pyx_pybuffernd_out.diminfo[1].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_out.diminfo[1].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[1]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_counts.rcbuffer->pybuffer, (PyObject*)__pyx_v_counts, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6639; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_counts.diminfo[0].strides = __pyx_pybuffernd_counts.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_counts.diminfo[0].shape = __pyx_pybuffernd_counts.rcbuffer->pybuffer.shape[0]; { __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_float32_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6639; __pyx_clineno = __LINE__; goto __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_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_labels.rcbuffer->pybuffer, (PyObject*)__pyx_v_labels, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6639; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_labels.diminfo[0].strides = __pyx_pybuffernd_labels.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_labels.diminfo[0].shape = __pyx_pybuffernd_labels.rcbuffer->pybuffer.shape[0]; /* "pandas/src/generated.pyx":6651 * ndarray[float32_t, ndim=2] maxx, nobs * * if not len(values) == len(labels): # <<<<<<<<<<<<<< * raise AssertionError("len(index) != len(labels)") * */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6651; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_2 = PyObject_Length(((PyObject *)__pyx_v_labels)); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6651; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_3 = ((!((__pyx_t_1 == __pyx_t_2) != 0)) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":6652 * * if not len(values) == len(labels): * raise AssertionError("len(index) != len(labels)") # <<<<<<<<<<<<<< * * nobs = np.zeros_like(out) */ __pyx_t_4 = PyObject_Call(__pyx_builtin_AssertionError, ((PyObject *)__pyx_k_tuple_199), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6652; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 6652; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L3; } __pyx_L3:; /* "pandas/src/generated.pyx":6654 * raise AssertionError("len(index) != len(labels)") * * nobs = np.zeros_like(out) # <<<<<<<<<<<<<< * * maxx = np.empty_like(out) */ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6654; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s__zeros_like); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6654; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6654; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(((PyObject *)__pyx_v_out)); PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_v_out)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out)); __pyx_t_6 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6654; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6654; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_7 = ((PyArrayObject *)__pyx_t_6); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer); __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_nobs.rcbuffer->pybuffer, (PyObject*)__pyx_v_nobs, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_pybuffernd_nobs.diminfo[0].strides = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_nobs.diminfo[0].shape = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_nobs.diminfo[1].strides = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_nobs.diminfo[1].shape = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.shape[1]; if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6654; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_7 = 0; __pyx_v_nobs = ((PyArrayObject *)__pyx_t_6); __pyx_t_6 = 0; /* "pandas/src/generated.pyx":6656 * nobs = np.zeros_like(out) * * maxx = np.empty_like(out) # <<<<<<<<<<<<<< * maxx.fill(-np.inf) * */ __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6656; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s__empty_like); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6656; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6656; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(((PyObject *)__pyx_v_out)); PyTuple_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_v_out)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out)); __pyx_t_5 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6656; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0; if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6656; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_7 = ((PyArrayObject *)__pyx_t_5); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_maxx.rcbuffer->pybuffer); __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_maxx.rcbuffer->pybuffer, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_maxx.rcbuffer->pybuffer, (PyObject*)__pyx_v_maxx, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_pybuffernd_maxx.diminfo[0].strides = __pyx_pybuffernd_maxx.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_maxx.diminfo[0].shape = __pyx_pybuffernd_maxx.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_maxx.diminfo[1].strides = __pyx_pybuffernd_maxx.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_maxx.diminfo[1].shape = __pyx_pybuffernd_maxx.rcbuffer->pybuffer.shape[1]; if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6656; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_7 = 0; __pyx_v_maxx = ((PyArrayObject *)__pyx_t_5); __pyx_t_5 = 0; /* "pandas/src/generated.pyx":6657 * * maxx = np.empty_like(out) * maxx.fill(-np.inf) # <<<<<<<<<<<<<< * * N, K = ( values).shape */ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_maxx), __pyx_n_s__fill); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6657; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6657; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s__inf); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6657; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyNumber_Negative(__pyx_t_4); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6657; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6657; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6657; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; /* "pandas/src/generated.pyx":6659 * maxx.fill(-np.inf) * * N, K = ( values).shape # <<<<<<<<<<<<<< * * if K > 1: */ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_values), __pyx_n_s__shape); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6659; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); if ((likely(PyTuple_CheckExact(__pyx_t_6))) || (PyList_CheckExact(__pyx_t_6))) { PyObject* sequence = __pyx_t_6; #if CYTHON_COMPILING_IN_CPYTHON Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6659; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_4 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_5 = PyTuple_GET_ITEM(sequence, 1); } else { __pyx_t_4 = PyList_GET_ITEM(sequence, 0); __pyx_t_5 = PyList_GET_ITEM(sequence, 1); } __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(__pyx_t_5); #else __pyx_t_4 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6659; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6659; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); #endif __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } else { Py_ssize_t index = -1; __pyx_t_12 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6659; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_13 = Py_TYPE(__pyx_t_12)->tp_iternext; index = 0; __pyx_t_4 = __pyx_t_13(__pyx_t_12); if (unlikely(!__pyx_t_4)) goto __pyx_L4_unpacking_failed; __Pyx_GOTREF(__pyx_t_4); index = 1; __pyx_t_5 = __pyx_t_13(__pyx_t_12); if (unlikely(!__pyx_t_5)) goto __pyx_L4_unpacking_failed; __Pyx_GOTREF(__pyx_t_5); if (__Pyx_IternextUnpackEndCheck(__pyx_t_13(__pyx_t_12), 2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6659; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_13 = NULL; __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; goto __pyx_L5_unpacking_done; __pyx_L4_unpacking_failed:; __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __pyx_t_13 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6659; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_L5_unpacking_done:; } __pyx_t_2 = __Pyx_PyIndex_AsSsize_t(__pyx_t_4); if (unlikely((__pyx_t_2 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6659; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_1 = __Pyx_PyIndex_AsSsize_t(__pyx_t_5); if (unlikely((__pyx_t_1 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6659; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_v_N = __pyx_t_2; __pyx_v_K = __pyx_t_1; /* "pandas/src/generated.pyx":6661 * N, K = ( values).shape * * if K > 1: # <<<<<<<<<<<<<< * for i in range(N): * lab = labels[i] */ __pyx_t_3 = ((__pyx_v_K > 1) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":6662 * * if K > 1: * for i in range(N): # <<<<<<<<<<<<<< * lab = labels[i] * if lab < 0: */ __pyx_t_1 = __pyx_v_N; for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) { __pyx_v_i = __pyx_t_2; /* "pandas/src/generated.pyx":6663 * if K > 1: * for i in range(N): * lab = labels[i] # <<<<<<<<<<<<<< * if lab < 0: * continue */ __pyx_t_14 = __pyx_v_i; __pyx_v_lab = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_labels.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_labels.diminfo[0].strides)); /* "pandas/src/generated.pyx":6664 * for i in range(N): * lab = labels[i] * if lab < 0: # <<<<<<<<<<<<<< * continue * */ __pyx_t_3 = ((__pyx_v_lab < 0) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":6665 * lab = labels[i] * if lab < 0: * continue # <<<<<<<<<<<<<< * * counts[lab] += 1 */ goto __pyx_L7_continue; goto __pyx_L9; } __pyx_L9:; /* "pandas/src/generated.pyx":6667 * continue * * counts[lab] += 1 # <<<<<<<<<<<<<< * for j in range(K): * val = values[i, j] */ __pyx_t_15 = __pyx_v_lab; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_counts.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_counts.diminfo[0].strides) += 1; /* "pandas/src/generated.pyx":6668 * * counts[lab] += 1 * for j in range(K): # <<<<<<<<<<<<<< * val = values[i, j] * */ __pyx_t_16 = __pyx_v_K; for (__pyx_t_17 = 0; __pyx_t_17 < __pyx_t_16; __pyx_t_17+=1) { __pyx_v_j = __pyx_t_17; /* "pandas/src/generated.pyx":6669 * counts[lab] += 1 * for j in range(K): * val = values[i, j] # <<<<<<<<<<<<<< * * # not nan */ __pyx_t_18 = __pyx_v_i; __pyx_t_19 = __pyx_v_j; __pyx_v_val = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_19, __pyx_pybuffernd_values.diminfo[1].strides)); /* "pandas/src/generated.pyx":6672 * * # not nan * if val == val: # <<<<<<<<<<<<<< * nobs[lab, j] += 1 * if val > maxx[lab, j]: */ __pyx_t_3 = ((__pyx_v_val == __pyx_v_val) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":6673 * # not nan * if val == val: * nobs[lab, j] += 1 # <<<<<<<<<<<<<< * if val > maxx[lab, j]: * maxx[lab, j] = val */ __pyx_t_20 = __pyx_v_lab; __pyx_t_21 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_nobs.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_nobs.diminfo[0].strides, __pyx_t_21, __pyx_pybuffernd_nobs.diminfo[1].strides) += 1.0; /* "pandas/src/generated.pyx":6674 * if val == val: * nobs[lab, j] += 1 * if val > maxx[lab, j]: # <<<<<<<<<<<<<< * maxx[lab, j] = val * else: */ __pyx_t_22 = __pyx_v_lab; __pyx_t_23 = __pyx_v_j; __pyx_t_3 = ((__pyx_v_val > (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_maxx.rcbuffer->pybuffer.buf, __pyx_t_22, __pyx_pybuffernd_maxx.diminfo[0].strides, __pyx_t_23, __pyx_pybuffernd_maxx.diminfo[1].strides))) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":6675 * nobs[lab, j] += 1 * if val > maxx[lab, j]: * maxx[lab, j] = val # <<<<<<<<<<<<<< * else: * for i in range(N): */ __pyx_t_24 = __pyx_v_lab; __pyx_t_25 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_maxx.rcbuffer->pybuffer.buf, __pyx_t_24, __pyx_pybuffernd_maxx.diminfo[0].strides, __pyx_t_25, __pyx_pybuffernd_maxx.diminfo[1].strides) = __pyx_v_val; goto __pyx_L13; } __pyx_L13:; goto __pyx_L12; } __pyx_L12:; } __pyx_L7_continue:; } goto __pyx_L6; } /*else*/ { /* "pandas/src/generated.pyx":6677 * maxx[lab, j] = val * else: * for i in range(N): # <<<<<<<<<<<<<< * lab = labels[i] * if lab < 0: */ __pyx_t_1 = __pyx_v_N; for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) { __pyx_v_i = __pyx_t_2; /* "pandas/src/generated.pyx":6678 * else: * for i in range(N): * lab = labels[i] # <<<<<<<<<<<<<< * if lab < 0: * continue */ __pyx_t_16 = __pyx_v_i; __pyx_v_lab = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_labels.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_labels.diminfo[0].strides)); /* "pandas/src/generated.pyx":6679 * for i in range(N): * lab = labels[i] * if lab < 0: # <<<<<<<<<<<<<< * continue * */ __pyx_t_3 = ((__pyx_v_lab < 0) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":6680 * lab = labels[i] * if lab < 0: * continue # <<<<<<<<<<<<<< * * counts[lab] += 1 */ goto __pyx_L14_continue; goto __pyx_L16; } __pyx_L16:; /* "pandas/src/generated.pyx":6682 * continue * * counts[lab] += 1 # <<<<<<<<<<<<<< * val = values[i, 0] * */ __pyx_t_17 = __pyx_v_lab; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_counts.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_counts.diminfo[0].strides) += 1; /* "pandas/src/generated.pyx":6683 * * counts[lab] += 1 * val = values[i, 0] # <<<<<<<<<<<<<< * * # not nan */ __pyx_t_26 = __pyx_v_i; __pyx_t_27 = 0; __pyx_v_val = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_26, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_27, __pyx_pybuffernd_values.diminfo[1].strides)); /* "pandas/src/generated.pyx":6686 * * # not nan * if val == val: # <<<<<<<<<<<<<< * nobs[lab, 0] += 1 * if val > maxx[lab, 0]: */ __pyx_t_3 = ((__pyx_v_val == __pyx_v_val) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":6687 * # not nan * if val == val: * nobs[lab, 0] += 1 # <<<<<<<<<<<<<< * if val > maxx[lab, 0]: * maxx[lab, 0] = val */ __pyx_t_28 = __pyx_v_lab; __pyx_t_29 = 0; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_nobs.rcbuffer->pybuffer.buf, __pyx_t_28, __pyx_pybuffernd_nobs.diminfo[0].strides, __pyx_t_29, __pyx_pybuffernd_nobs.diminfo[1].strides) += 1.0; /* "pandas/src/generated.pyx":6688 * if val == val: * nobs[lab, 0] += 1 * if val > maxx[lab, 0]: # <<<<<<<<<<<<<< * maxx[lab, 0] = val * */ __pyx_t_30 = __pyx_v_lab; __pyx_t_31 = 0; __pyx_t_3 = ((__pyx_v_val > (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_maxx.rcbuffer->pybuffer.buf, __pyx_t_30, __pyx_pybuffernd_maxx.diminfo[0].strides, __pyx_t_31, __pyx_pybuffernd_maxx.diminfo[1].strides))) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":6689 * nobs[lab, 0] += 1 * if val > maxx[lab, 0]: * maxx[lab, 0] = val # <<<<<<<<<<<<<< * * for i in range(len(counts)): */ __pyx_t_32 = __pyx_v_lab; __pyx_t_33 = 0; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_maxx.rcbuffer->pybuffer.buf, __pyx_t_32, __pyx_pybuffernd_maxx.diminfo[0].strides, __pyx_t_33, __pyx_pybuffernd_maxx.diminfo[1].strides) = __pyx_v_val; goto __pyx_L18; } __pyx_L18:; goto __pyx_L17; } __pyx_L17:; __pyx_L14_continue:; } } __pyx_L6:; /* "pandas/src/generated.pyx":6691 * maxx[lab, 0] = val * * for i in range(len(counts)): # <<<<<<<<<<<<<< * for j in range(K): * if nobs[i, j] == 0: */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_counts)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6691; __pyx_clineno = __LINE__; goto __pyx_L1_error;} for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) { __pyx_v_i = __pyx_t_2; /* "pandas/src/generated.pyx":6692 * * for i in range(len(counts)): * for j in range(K): # <<<<<<<<<<<<<< * if nobs[i, j] == 0: * out[i, j] = nan */ __pyx_t_34 = __pyx_v_K; for (__pyx_t_35 = 0; __pyx_t_35 < __pyx_t_34; __pyx_t_35+=1) { __pyx_v_j = __pyx_t_35; /* "pandas/src/generated.pyx":6693 * for i in range(len(counts)): * for j in range(K): * if nobs[i, j] == 0: # <<<<<<<<<<<<<< * out[i, j] = nan * else: */ __pyx_t_36 = __pyx_v_i; __pyx_t_37 = __pyx_v_j; __pyx_t_3 = (((*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_nobs.rcbuffer->pybuffer.buf, __pyx_t_36, __pyx_pybuffernd_nobs.diminfo[0].strides, __pyx_t_37, __pyx_pybuffernd_nobs.diminfo[1].strides)) == 0.0) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":6694 * for j in range(K): * if nobs[i, j] == 0: * out[i, j] = nan # <<<<<<<<<<<<<< * else: * out[i, j] = maxx[i, j] */ __pyx_t_38 = __pyx_v_i; __pyx_t_39 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_38, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_39, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_6pandas_5algos_nan; goto __pyx_L23; } /*else*/ { /* "pandas/src/generated.pyx":6696 * out[i, j] = nan * else: * out[i, j] = maxx[i, j] # <<<<<<<<<<<<<< * * @cython.wraparound(False) */ __pyx_t_40 = __pyx_v_i; __pyx_t_41 = __pyx_v_j; __pyx_t_42 = __pyx_v_i; __pyx_t_43 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_42, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_43, __pyx_pybuffernd_out.diminfo[1].strides) = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_maxx.rcbuffer->pybuffer.buf, __pyx_t_40, __pyx_pybuffernd_maxx.diminfo[0].strides, __pyx_t_41, __pyx_pybuffernd_maxx.diminfo[1].strides)); } __pyx_L23:; } } __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_12); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_counts.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_labels.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_maxx.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.group_max_float32", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_counts.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_labels.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_maxx.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_maxx); __Pyx_XDECREF((PyObject *)__pyx_v_nobs); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_447group_max_bin_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6pandas_5algos_446group_max_bin_float64[] = "\n Only aggregates on axis=0\n "; static PyMethodDef __pyx_mdef_6pandas_5algos_447group_max_bin_float64 = {__Pyx_NAMESTR("group_max_bin_float64"), (PyCFunction)__pyx_pw_6pandas_5algos_447group_max_bin_float64, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_5algos_446group_max_bin_float64)}; static PyObject *__pyx_pw_6pandas_5algos_447group_max_bin_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_out = 0; PyArrayObject *__pyx_v_counts = 0; PyArrayObject *__pyx_v_values = 0; PyArrayObject *__pyx_v_bins = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("group_max_bin_float64 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__out,&__pyx_n_s__counts,&__pyx_n_s__values,&__pyx_n_s__bins,0}; PyObject* values[4] = {0,0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__out)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__counts)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("group_max_bin_float64", 1, 4, 4, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6700; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__values)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("group_max_bin_float64", 1, 4, 4, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6700; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__bins)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("group_max_bin_float64", 1, 4, 4, 3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6700; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "group_max_bin_float64") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6700; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 4) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[3] = PyTuple_GET_ITEM(__pyx_args, 3); } __pyx_v_out = ((PyArrayObject *)values[0]); __pyx_v_counts = ((PyArrayObject *)values[1]); __pyx_v_values = ((PyArrayObject *)values[2]); __pyx_v_bins = ((PyArrayObject *)values[3]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("group_max_bin_float64", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6700; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.group_max_bin_float64", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_5numpy_ndarray, 1, "out", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6700; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_counts), __pyx_ptype_5numpy_ndarray, 1, "counts", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6701; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6702; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_bins), __pyx_ptype_5numpy_ndarray, 1, "bins", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6703; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_446group_max_bin_float64(__pyx_self, __pyx_v_out, __pyx_v_counts, __pyx_v_values, __pyx_v_bins); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":6700 * @cython.wraparound(False) * @cython.boundscheck(False) * def group_max_bin_float64(ndarray[float64_t, ndim=2] out, # <<<<<<<<<<<<<< * ndarray[int64_t] counts, * ndarray[float64_t, ndim=2] values, */ static PyObject *__pyx_pf_6pandas_5algos_446group_max_bin_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_out, PyArrayObject *__pyx_v_counts, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_bins) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_N; Py_ssize_t __pyx_v_K; Py_ssize_t __pyx_v_ngroups; Py_ssize_t __pyx_v_b; __pyx_t_5numpy_float64_t __pyx_v_val; PyArrayObject *__pyx_v_maxx = 0; PyArrayObject *__pyx_v_nobs = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_bins; __Pyx_Buffer __pyx_pybuffer_bins; __Pyx_LocalBuf_ND __pyx_pybuffernd_counts; __Pyx_Buffer __pyx_pybuffer_counts; __Pyx_LocalBuf_ND __pyx_pybuffernd_maxx; __Pyx_Buffer __pyx_pybuffer_maxx; __Pyx_LocalBuf_ND __pyx_pybuffernd_nobs; __Pyx_Buffer __pyx_pybuffer_nobs; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __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; PyArrayObject *__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; Py_ssize_t __pyx_t_11; int __pyx_t_12; PyObject *__pyx_t_13 = NULL; PyObject *(*__pyx_t_14)(PyObject *); Py_ssize_t __pyx_t_15; int __pyx_t_16; int __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; long __pyx_t_30; Py_ssize_t __pyx_t_31; long __pyx_t_32; Py_ssize_t __pyx_t_33; long __pyx_t_34; Py_ssize_t __pyx_t_35; long __pyx_t_36; Py_ssize_t __pyx_t_37; Py_ssize_t __pyx_t_38; Py_ssize_t __pyx_t_39; Py_ssize_t __pyx_t_40; Py_ssize_t __pyx_t_41; Py_ssize_t __pyx_t_42; Py_ssize_t __pyx_t_43; Py_ssize_t __pyx_t_44; Py_ssize_t __pyx_t_45; Py_ssize_t __pyx_t_46; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("group_max_bin_float64", 0); __pyx_pybuffer_maxx.pybuffer.buf = NULL; __pyx_pybuffer_maxx.refcount = 0; __pyx_pybuffernd_maxx.data = NULL; __pyx_pybuffernd_maxx.rcbuffer = &__pyx_pybuffer_maxx; __pyx_pybuffer_nobs.pybuffer.buf = NULL; __pyx_pybuffer_nobs.refcount = 0; __pyx_pybuffernd_nobs.data = NULL; __pyx_pybuffernd_nobs.rcbuffer = &__pyx_pybuffer_nobs; __pyx_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; __pyx_pybuffer_counts.pybuffer.buf = NULL; __pyx_pybuffer_counts.refcount = 0; __pyx_pybuffernd_counts.data = NULL; __pyx_pybuffernd_counts.rcbuffer = &__pyx_pybuffer_counts; __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_bins.pybuffer.buf = NULL; __pyx_pybuffer_bins.refcount = 0; __pyx_pybuffernd_bins.data = NULL; __pyx_pybuffernd_bins.rcbuffer = &__pyx_pybuffer_bins; { __Pyx_BufFmt_StackElem __pyx_stack[1]; 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, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6700; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; __pyx_pybuffernd_out.diminfo[1].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_out.diminfo[1].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[1]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_counts.rcbuffer->pybuffer, (PyObject*)__pyx_v_counts, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6700; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_counts.diminfo[0].strides = __pyx_pybuffernd_counts.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_counts.diminfo[0].shape = __pyx_pybuffernd_counts.rcbuffer->pybuffer.shape[0]; { __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, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6700; __pyx_clineno = __LINE__; goto __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_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_bins.rcbuffer->pybuffer, (PyObject*)__pyx_v_bins, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6700; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_bins.diminfo[0].strides = __pyx_pybuffernd_bins.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_bins.diminfo[0].shape = __pyx_pybuffernd_bins.rcbuffer->pybuffer.shape[0]; /* "pandas/src/generated.pyx":6712 * ndarray[float64_t, ndim=2] maxx, nobs * * nobs = np.zeros_like(out) # <<<<<<<<<<<<<< * maxx = np.empty_like(out) * maxx.fill(-np.inf) */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6712; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s__zeros_like); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6712; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 6712; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)__pyx_v_out)); PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_out)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out)); __pyx_t_3 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6712; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(((PyObject *)__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_filename = __pyx_f[2]; __pyx_lineno = 6712; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_4 = ((PyArrayObject *)__pyx_t_3); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer); __pyx_t_5 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer, (PyObject*)__pyx_t_4, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_nobs.rcbuffer->pybuffer, (PyObject*)__pyx_v_nobs, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_pybuffernd_nobs.diminfo[0].strides = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_nobs.diminfo[0].shape = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_nobs.diminfo[1].strides = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_nobs.diminfo[1].shape = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.shape[1]; if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6712; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_4 = 0; __pyx_v_nobs = ((PyArrayObject *)__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/generated.pyx":6713 * * nobs = np.zeros_like(out) * maxx = np.empty_like(out) # <<<<<<<<<<<<<< * maxx.fill(-np.inf) * */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6713; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s__empty_like); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6713; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6713; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(((PyObject *)__pyx_v_out)); PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_v_out)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out)); __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6713; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(((PyObject *)__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_filename = __pyx_f[2]; __pyx_lineno = 6713; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_4 = ((PyArrayObject *)__pyx_t_2); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_maxx.rcbuffer->pybuffer); __pyx_t_5 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_maxx.rcbuffer->pybuffer, (PyObject*)__pyx_t_4, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_maxx.rcbuffer->pybuffer, (PyObject*)__pyx_v_maxx, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_pybuffernd_maxx.diminfo[0].strides = __pyx_pybuffernd_maxx.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_maxx.diminfo[0].shape = __pyx_pybuffernd_maxx.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_maxx.diminfo[1].strides = __pyx_pybuffernd_maxx.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_maxx.diminfo[1].shape = __pyx_pybuffernd_maxx.rcbuffer->pybuffer.shape[1]; if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6713; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_4 = 0; __pyx_v_maxx = ((PyArrayObject *)__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":6714 * nobs = np.zeros_like(out) * maxx = np.empty_like(out) * maxx.fill(-np.inf) # <<<<<<<<<<<<<< * * if bins[len(bins) - 1] == len(values): */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_maxx), __pyx_n_s__fill); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6714; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6714; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s__inf); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6714; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyNumber_Negative(__pyx_t_1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6714; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6714; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6714; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/generated.pyx":6716 * maxx.fill(-np.inf) * * if bins[len(bins) - 1] == len(values): # <<<<<<<<<<<<<< * ngroups = len(bins) * else: */ __pyx_t_9 = PyObject_Length(((PyObject *)__pyx_v_bins)); if (unlikely(__pyx_t_9 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6716; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_10 = (__pyx_t_9 - 1); __pyx_t_11 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6716; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_12 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_bins.rcbuffer->pybuffer.buf, __pyx_t_10, __pyx_pybuffernd_bins.diminfo[0].strides)) == __pyx_t_11) != 0); if (__pyx_t_12) { /* "pandas/src/generated.pyx":6717 * * if bins[len(bins) - 1] == len(values): * ngroups = len(bins) # <<<<<<<<<<<<<< * else: * ngroups = len(bins) + 1 */ __pyx_t_11 = PyObject_Length(((PyObject *)__pyx_v_bins)); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6717; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_ngroups = __pyx_t_11; goto __pyx_L3; } /*else*/ { /* "pandas/src/generated.pyx":6719 * ngroups = len(bins) * else: * ngroups = len(bins) + 1 # <<<<<<<<<<<<<< * * N, K = ( values).shape */ __pyx_t_11 = PyObject_Length(((PyObject *)__pyx_v_bins)); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6719; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_ngroups = (__pyx_t_11 + 1); } __pyx_L3:; /* "pandas/src/generated.pyx":6721 * ngroups = len(bins) + 1 * * N, K = ( values).shape # <<<<<<<<<<<<<< * * b = 0 */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_values), __pyx_n_s__shape); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6721; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if ((likely(PyTuple_CheckExact(__pyx_t_3))) || (PyList_CheckExact(__pyx_t_3))) { PyObject* sequence = __pyx_t_3; #if CYTHON_COMPILING_IN_CPYTHON Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6721; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_1 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_2 = PyTuple_GET_ITEM(sequence, 1); } else { __pyx_t_1 = PyList_GET_ITEM(sequence, 0); __pyx_t_2 = PyList_GET_ITEM(sequence, 1); } __Pyx_INCREF(__pyx_t_1); __Pyx_INCREF(__pyx_t_2); #else __pyx_t_1 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6721; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6721; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); #endif __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else { Py_ssize_t index = -1; __pyx_t_13 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6721; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_14 = Py_TYPE(__pyx_t_13)->tp_iternext; index = 0; __pyx_t_1 = __pyx_t_14(__pyx_t_13); if (unlikely(!__pyx_t_1)) goto __pyx_L4_unpacking_failed; __Pyx_GOTREF(__pyx_t_1); index = 1; __pyx_t_2 = __pyx_t_14(__pyx_t_13); if (unlikely(!__pyx_t_2)) goto __pyx_L4_unpacking_failed; __Pyx_GOTREF(__pyx_t_2); if (__Pyx_IternextUnpackEndCheck(__pyx_t_14(__pyx_t_13), 2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6721; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_14 = NULL; __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; goto __pyx_L5_unpacking_done; __pyx_L4_unpacking_failed:; __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_14 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6721; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_L5_unpacking_done:; } __pyx_t_11 = __Pyx_PyIndex_AsSsize_t(__pyx_t_1); if (unlikely((__pyx_t_11 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6721; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_9 = __Pyx_PyIndex_AsSsize_t(__pyx_t_2); if (unlikely((__pyx_t_9 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6721; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_N = __pyx_t_11; __pyx_v_K = __pyx_t_9; /* "pandas/src/generated.pyx":6723 * N, K = ( values).shape * * b = 0 # <<<<<<<<<<<<<< * if K > 1: * for i in range(N): */ __pyx_v_b = 0; /* "pandas/src/generated.pyx":6724 * * b = 0 * if K > 1: # <<<<<<<<<<<<<< * for i in range(N): * while b < ngroups - 1 and i >= bins[b]: */ __pyx_t_12 = ((__pyx_v_K > 1) != 0); if (__pyx_t_12) { /* "pandas/src/generated.pyx":6725 * b = 0 * if K > 1: * for i in range(N): # <<<<<<<<<<<<<< * while b < ngroups - 1 and i >= bins[b]: * b += 1 */ __pyx_t_9 = __pyx_v_N; for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_9; __pyx_t_11+=1) { __pyx_v_i = __pyx_t_11; /* "pandas/src/generated.pyx":6726 * if K > 1: * for i in range(N): * while b < ngroups - 1 and i >= bins[b]: # <<<<<<<<<<<<<< * b += 1 * */ while (1) { __pyx_t_12 = ((__pyx_v_b < (__pyx_v_ngroups - 1)) != 0); if (__pyx_t_12) { __pyx_t_15 = __pyx_v_b; __pyx_t_16 = ((__pyx_v_i >= (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_bins.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_bins.diminfo[0].strides))) != 0); __pyx_t_17 = __pyx_t_16; } else { __pyx_t_17 = __pyx_t_12; } if (!__pyx_t_17) break; /* "pandas/src/generated.pyx":6727 * for i in range(N): * while b < ngroups - 1 and i >= bins[b]: * b += 1 # <<<<<<<<<<<<<< * * counts[b] += 1 */ __pyx_v_b = (__pyx_v_b + 1); } /* "pandas/src/generated.pyx":6729 * b += 1 * * counts[b] += 1 # <<<<<<<<<<<<<< * for j in range(K): * val = values[i, j] */ __pyx_t_18 = __pyx_v_b; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_counts.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_counts.diminfo[0].strides) += 1; /* "pandas/src/generated.pyx":6730 * * counts[b] += 1 * for j in range(K): # <<<<<<<<<<<<<< * val = values[i, j] * */ __pyx_t_19 = __pyx_v_K; for (__pyx_t_20 = 0; __pyx_t_20 < __pyx_t_19; __pyx_t_20+=1) { __pyx_v_j = __pyx_t_20; /* "pandas/src/generated.pyx":6731 * counts[b] += 1 * for j in range(K): * val = values[i, j] # <<<<<<<<<<<<<< * * # not nan */ __pyx_t_21 = __pyx_v_i; __pyx_t_22 = __pyx_v_j; __pyx_v_val = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_22, __pyx_pybuffernd_values.diminfo[1].strides)); /* "pandas/src/generated.pyx":6734 * * # not nan * if val == val: # <<<<<<<<<<<<<< * nobs[b, j] += 1 * if val > maxx[b, j]: */ __pyx_t_17 = ((__pyx_v_val == __pyx_v_val) != 0); if (__pyx_t_17) { /* "pandas/src/generated.pyx":6735 * # not nan * if val == val: * nobs[b, j] += 1 # <<<<<<<<<<<<<< * if val > maxx[b, j]: * maxx[b, j] = val */ __pyx_t_23 = __pyx_v_b; __pyx_t_24 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_nobs.rcbuffer->pybuffer.buf, __pyx_t_23, __pyx_pybuffernd_nobs.diminfo[0].strides, __pyx_t_24, __pyx_pybuffernd_nobs.diminfo[1].strides) += 1.0; /* "pandas/src/generated.pyx":6736 * if val == val: * nobs[b, j] += 1 * if val > maxx[b, j]: # <<<<<<<<<<<<<< * maxx[b, j] = val * else: */ __pyx_t_25 = __pyx_v_b; __pyx_t_26 = __pyx_v_j; __pyx_t_17 = ((__pyx_v_val > (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_maxx.rcbuffer->pybuffer.buf, __pyx_t_25, __pyx_pybuffernd_maxx.diminfo[0].strides, __pyx_t_26, __pyx_pybuffernd_maxx.diminfo[1].strides))) != 0); if (__pyx_t_17) { /* "pandas/src/generated.pyx":6737 * nobs[b, j] += 1 * if val > maxx[b, j]: * maxx[b, j] = val # <<<<<<<<<<<<<< * else: * for i in range(N): */ __pyx_t_27 = __pyx_v_b; __pyx_t_28 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_maxx.rcbuffer->pybuffer.buf, __pyx_t_27, __pyx_pybuffernd_maxx.diminfo[0].strides, __pyx_t_28, __pyx_pybuffernd_maxx.diminfo[1].strides) = __pyx_v_val; goto __pyx_L14; } __pyx_L14:; goto __pyx_L13; } __pyx_L13:; } } goto __pyx_L6; } /*else*/ { /* "pandas/src/generated.pyx":6739 * maxx[b, j] = val * else: * for i in range(N): # <<<<<<<<<<<<<< * while b < ngroups - 1 and i >= bins[b]: * b += 1 */ __pyx_t_9 = __pyx_v_N; for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_9; __pyx_t_11+=1) { __pyx_v_i = __pyx_t_11; /* "pandas/src/generated.pyx":6740 * else: * for i in range(N): * while b < ngroups - 1 and i >= bins[b]: # <<<<<<<<<<<<<< * b += 1 * */ while (1) { __pyx_t_17 = ((__pyx_v_b < (__pyx_v_ngroups - 1)) != 0); if (__pyx_t_17) { __pyx_t_19 = __pyx_v_b; __pyx_t_12 = ((__pyx_v_i >= (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_bins.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_bins.diminfo[0].strides))) != 0); __pyx_t_16 = __pyx_t_12; } else { __pyx_t_16 = __pyx_t_17; } if (!__pyx_t_16) break; /* "pandas/src/generated.pyx":6741 * for i in range(N): * while b < ngroups - 1 and i >= bins[b]: * b += 1 # <<<<<<<<<<<<<< * * counts[b] += 1 */ __pyx_v_b = (__pyx_v_b + 1); } /* "pandas/src/generated.pyx":6743 * b += 1 * * counts[b] += 1 # <<<<<<<<<<<<<< * val = values[i, 0] * */ __pyx_t_20 = __pyx_v_b; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_counts.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_counts.diminfo[0].strides) += 1; /* "pandas/src/generated.pyx":6744 * * counts[b] += 1 * val = values[i, 0] # <<<<<<<<<<<<<< * * # not nan */ __pyx_t_29 = __pyx_v_i; __pyx_t_30 = 0; __pyx_v_val = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_29, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_30, __pyx_pybuffernd_values.diminfo[1].strides)); /* "pandas/src/generated.pyx":6747 * * # not nan * if val == val: # <<<<<<<<<<<<<< * nobs[b, 0] += 1 * if val > maxx[b, 0]: */ __pyx_t_16 = ((__pyx_v_val == __pyx_v_val) != 0); if (__pyx_t_16) { /* "pandas/src/generated.pyx":6748 * # not nan * if val == val: * nobs[b, 0] += 1 # <<<<<<<<<<<<<< * if val > maxx[b, 0]: * maxx[b, 0] = val */ __pyx_t_31 = __pyx_v_b; __pyx_t_32 = 0; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_nobs.rcbuffer->pybuffer.buf, __pyx_t_31, __pyx_pybuffernd_nobs.diminfo[0].strides, __pyx_t_32, __pyx_pybuffernd_nobs.diminfo[1].strides) += 1.0; /* "pandas/src/generated.pyx":6749 * if val == val: * nobs[b, 0] += 1 * if val > maxx[b, 0]: # <<<<<<<<<<<<<< * maxx[b, 0] = val * */ __pyx_t_33 = __pyx_v_b; __pyx_t_34 = 0; __pyx_t_16 = ((__pyx_v_val > (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_maxx.rcbuffer->pybuffer.buf, __pyx_t_33, __pyx_pybuffernd_maxx.diminfo[0].strides, __pyx_t_34, __pyx_pybuffernd_maxx.diminfo[1].strides))) != 0); if (__pyx_t_16) { /* "pandas/src/generated.pyx":6750 * nobs[b, 0] += 1 * if val > maxx[b, 0]: * maxx[b, 0] = val # <<<<<<<<<<<<<< * * for i in range(ngroups): */ __pyx_t_35 = __pyx_v_b; __pyx_t_36 = 0; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_maxx.rcbuffer->pybuffer.buf, __pyx_t_35, __pyx_pybuffernd_maxx.diminfo[0].strides, __pyx_t_36, __pyx_pybuffernd_maxx.diminfo[1].strides) = __pyx_v_val; goto __pyx_L20; } __pyx_L20:; goto __pyx_L19; } __pyx_L19:; } } __pyx_L6:; /* "pandas/src/generated.pyx":6752 * maxx[b, 0] = val * * for i in range(ngroups): # <<<<<<<<<<<<<< * for j in range(K): * if nobs[i, j] == 0: */ __pyx_t_9 = __pyx_v_ngroups; for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_9; __pyx_t_11+=1) { __pyx_v_i = __pyx_t_11; /* "pandas/src/generated.pyx":6753 * * for i in range(ngroups): * for j in range(K): # <<<<<<<<<<<<<< * if nobs[i, j] == 0: * out[i, j] = nan */ __pyx_t_37 = __pyx_v_K; for (__pyx_t_38 = 0; __pyx_t_38 < __pyx_t_37; __pyx_t_38+=1) { __pyx_v_j = __pyx_t_38; /* "pandas/src/generated.pyx":6754 * for i in range(ngroups): * for j in range(K): * if nobs[i, j] == 0: # <<<<<<<<<<<<<< * out[i, j] = nan * else: */ __pyx_t_39 = __pyx_v_i; __pyx_t_40 = __pyx_v_j; __pyx_t_16 = (((*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_nobs.rcbuffer->pybuffer.buf, __pyx_t_39, __pyx_pybuffernd_nobs.diminfo[0].strides, __pyx_t_40, __pyx_pybuffernd_nobs.diminfo[1].strides)) == 0.0) != 0); if (__pyx_t_16) { /* "pandas/src/generated.pyx":6755 * for j in range(K): * if nobs[i, j] == 0: * out[i, j] = nan # <<<<<<<<<<<<<< * else: * out[i, j] = maxx[i, j] */ __pyx_t_41 = __pyx_v_i; __pyx_t_42 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_41, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_42, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_6pandas_5algos_nan; goto __pyx_L25; } /*else*/ { /* "pandas/src/generated.pyx":6757 * out[i, j] = nan * else: * out[i, j] = maxx[i, j] # <<<<<<<<<<<<<< * @cython.wraparound(False) * @cython.boundscheck(False) */ __pyx_t_43 = __pyx_v_i; __pyx_t_44 = __pyx_v_j; __pyx_t_45 = __pyx_v_i; __pyx_t_46 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_45, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_46, __pyx_pybuffernd_out.diminfo[1].strides) = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_maxx.rcbuffer->pybuffer.buf, __pyx_t_43, __pyx_pybuffernd_maxx.diminfo[0].strides, __pyx_t_44, __pyx_pybuffernd_maxx.diminfo[1].strides)); } __pyx_L25:; } } __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_13); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_bins.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_counts.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_maxx.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.group_max_bin_float64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_bins.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_counts.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_maxx.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_maxx); __Pyx_XDECREF((PyObject *)__pyx_v_nobs); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_449group_max_bin_float32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6pandas_5algos_448group_max_bin_float32[] = "\n Only aggregates on axis=0\n "; static PyMethodDef __pyx_mdef_6pandas_5algos_449group_max_bin_float32 = {__Pyx_NAMESTR("group_max_bin_float32"), (PyCFunction)__pyx_pw_6pandas_5algos_449group_max_bin_float32, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_5algos_448group_max_bin_float32)}; static PyObject *__pyx_pw_6pandas_5algos_449group_max_bin_float32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_out = 0; PyArrayObject *__pyx_v_counts = 0; PyArrayObject *__pyx_v_values = 0; PyArrayObject *__pyx_v_bins = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("group_max_bin_float32 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__out,&__pyx_n_s__counts,&__pyx_n_s__values,&__pyx_n_s__bins,0}; PyObject* values[4] = {0,0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__out)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__counts)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("group_max_bin_float32", 1, 4, 4, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6760; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__values)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("group_max_bin_float32", 1, 4, 4, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6760; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__bins)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("group_max_bin_float32", 1, 4, 4, 3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6760; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "group_max_bin_float32") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6760; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 4) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[3] = PyTuple_GET_ITEM(__pyx_args, 3); } __pyx_v_out = ((PyArrayObject *)values[0]); __pyx_v_counts = ((PyArrayObject *)values[1]); __pyx_v_values = ((PyArrayObject *)values[2]); __pyx_v_bins = ((PyArrayObject *)values[3]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("group_max_bin_float32", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6760; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.group_max_bin_float32", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_5numpy_ndarray, 1, "out", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6760; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_counts), __pyx_ptype_5numpy_ndarray, 1, "counts", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6761; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6762; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_bins), __pyx_ptype_5numpy_ndarray, 1, "bins", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6763; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_448group_max_bin_float32(__pyx_self, __pyx_v_out, __pyx_v_counts, __pyx_v_values, __pyx_v_bins); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":6760 * @cython.wraparound(False) * @cython.boundscheck(False) * def group_max_bin_float32(ndarray[float32_t, ndim=2] out, # <<<<<<<<<<<<<< * ndarray[int64_t] counts, * ndarray[float32_t, ndim=2] values, */ static PyObject *__pyx_pf_6pandas_5algos_448group_max_bin_float32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_out, PyArrayObject *__pyx_v_counts, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_bins) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_N; Py_ssize_t __pyx_v_K; Py_ssize_t __pyx_v_ngroups; Py_ssize_t __pyx_v_b; __pyx_t_5numpy_float32_t __pyx_v_val; PyArrayObject *__pyx_v_maxx = 0; PyArrayObject *__pyx_v_nobs = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_bins; __Pyx_Buffer __pyx_pybuffer_bins; __Pyx_LocalBuf_ND __pyx_pybuffernd_counts; __Pyx_Buffer __pyx_pybuffer_counts; __Pyx_LocalBuf_ND __pyx_pybuffernd_maxx; __Pyx_Buffer __pyx_pybuffer_maxx; __Pyx_LocalBuf_ND __pyx_pybuffernd_nobs; __Pyx_Buffer __pyx_pybuffer_nobs; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __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; PyArrayObject *__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; Py_ssize_t __pyx_t_11; int __pyx_t_12; PyObject *__pyx_t_13 = NULL; PyObject *(*__pyx_t_14)(PyObject *); Py_ssize_t __pyx_t_15; int __pyx_t_16; int __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; long __pyx_t_30; Py_ssize_t __pyx_t_31; long __pyx_t_32; Py_ssize_t __pyx_t_33; long __pyx_t_34; Py_ssize_t __pyx_t_35; long __pyx_t_36; Py_ssize_t __pyx_t_37; Py_ssize_t __pyx_t_38; Py_ssize_t __pyx_t_39; Py_ssize_t __pyx_t_40; Py_ssize_t __pyx_t_41; Py_ssize_t __pyx_t_42; Py_ssize_t __pyx_t_43; Py_ssize_t __pyx_t_44; Py_ssize_t __pyx_t_45; Py_ssize_t __pyx_t_46; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("group_max_bin_float32", 0); __pyx_pybuffer_maxx.pybuffer.buf = NULL; __pyx_pybuffer_maxx.refcount = 0; __pyx_pybuffernd_maxx.data = NULL; __pyx_pybuffernd_maxx.rcbuffer = &__pyx_pybuffer_maxx; __pyx_pybuffer_nobs.pybuffer.buf = NULL; __pyx_pybuffer_nobs.refcount = 0; __pyx_pybuffernd_nobs.data = NULL; __pyx_pybuffernd_nobs.rcbuffer = &__pyx_pybuffer_nobs; __pyx_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; __pyx_pybuffer_counts.pybuffer.buf = NULL; __pyx_pybuffer_counts.refcount = 0; __pyx_pybuffernd_counts.data = NULL; __pyx_pybuffernd_counts.rcbuffer = &__pyx_pybuffer_counts; __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_bins.pybuffer.buf = NULL; __pyx_pybuffer_bins.refcount = 0; __pyx_pybuffernd_bins.data = NULL; __pyx_pybuffernd_bins.rcbuffer = &__pyx_pybuffer_bins; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_v_out, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6760; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; __pyx_pybuffernd_out.diminfo[1].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_out.diminfo[1].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[1]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_counts.rcbuffer->pybuffer, (PyObject*)__pyx_v_counts, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6760; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_counts.diminfo[0].strides = __pyx_pybuffernd_counts.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_counts.diminfo[0].shape = __pyx_pybuffernd_counts.rcbuffer->pybuffer.shape[0]; { __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_float32_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6760; __pyx_clineno = __LINE__; goto __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_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_bins.rcbuffer->pybuffer, (PyObject*)__pyx_v_bins, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6760; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_bins.diminfo[0].strides = __pyx_pybuffernd_bins.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_bins.diminfo[0].shape = __pyx_pybuffernd_bins.rcbuffer->pybuffer.shape[0]; /* "pandas/src/generated.pyx":6772 * ndarray[float32_t, ndim=2] maxx, nobs * * nobs = np.zeros_like(out) # <<<<<<<<<<<<<< * maxx = np.empty_like(out) * maxx.fill(-np.inf) */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6772; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s__zeros_like); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6772; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 6772; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)__pyx_v_out)); PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_out)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out)); __pyx_t_3 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6772; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(((PyObject *)__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_filename = __pyx_f[2]; __pyx_lineno = 6772; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_4 = ((PyArrayObject *)__pyx_t_3); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer); __pyx_t_5 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer, (PyObject*)__pyx_t_4, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_nobs.rcbuffer->pybuffer, (PyObject*)__pyx_v_nobs, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_pybuffernd_nobs.diminfo[0].strides = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_nobs.diminfo[0].shape = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_nobs.diminfo[1].strides = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_nobs.diminfo[1].shape = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.shape[1]; if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6772; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_4 = 0; __pyx_v_nobs = ((PyArrayObject *)__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/generated.pyx":6773 * * nobs = np.zeros_like(out) * maxx = np.empty_like(out) # <<<<<<<<<<<<<< * maxx.fill(-np.inf) * */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6773; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s__empty_like); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6773; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6773; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(((PyObject *)__pyx_v_out)); PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_v_out)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out)); __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6773; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(((PyObject *)__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_filename = __pyx_f[2]; __pyx_lineno = 6773; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_4 = ((PyArrayObject *)__pyx_t_2); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_maxx.rcbuffer->pybuffer); __pyx_t_5 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_maxx.rcbuffer->pybuffer, (PyObject*)__pyx_t_4, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_maxx.rcbuffer->pybuffer, (PyObject*)__pyx_v_maxx, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 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_pybuffernd_maxx.diminfo[0].strides = __pyx_pybuffernd_maxx.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_maxx.diminfo[0].shape = __pyx_pybuffernd_maxx.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_maxx.diminfo[1].strides = __pyx_pybuffernd_maxx.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_maxx.diminfo[1].shape = __pyx_pybuffernd_maxx.rcbuffer->pybuffer.shape[1]; if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6773; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_4 = 0; __pyx_v_maxx = ((PyArrayObject *)__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":6774 * nobs = np.zeros_like(out) * maxx = np.empty_like(out) * maxx.fill(-np.inf) # <<<<<<<<<<<<<< * * if bins[len(bins) - 1] == len(values): */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_maxx), __pyx_n_s__fill); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6774; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6774; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s__inf); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6774; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyNumber_Negative(__pyx_t_1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6774; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6774; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6774; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/generated.pyx":6776 * maxx.fill(-np.inf) * * if bins[len(bins) - 1] == len(values): # <<<<<<<<<<<<<< * ngroups = len(bins) * else: */ __pyx_t_9 = PyObject_Length(((PyObject *)__pyx_v_bins)); if (unlikely(__pyx_t_9 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6776; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_10 = (__pyx_t_9 - 1); __pyx_t_11 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6776; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_12 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_bins.rcbuffer->pybuffer.buf, __pyx_t_10, __pyx_pybuffernd_bins.diminfo[0].strides)) == __pyx_t_11) != 0); if (__pyx_t_12) { /* "pandas/src/generated.pyx":6777 * * if bins[len(bins) - 1] == len(values): * ngroups = len(bins) # <<<<<<<<<<<<<< * else: * ngroups = len(bins) + 1 */ __pyx_t_11 = PyObject_Length(((PyObject *)__pyx_v_bins)); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6777; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_ngroups = __pyx_t_11; goto __pyx_L3; } /*else*/ { /* "pandas/src/generated.pyx":6779 * ngroups = len(bins) * else: * ngroups = len(bins) + 1 # <<<<<<<<<<<<<< * * N, K = ( values).shape */ __pyx_t_11 = PyObject_Length(((PyObject *)__pyx_v_bins)); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6779; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_ngroups = (__pyx_t_11 + 1); } __pyx_L3:; /* "pandas/src/generated.pyx":6781 * ngroups = len(bins) + 1 * * N, K = ( values).shape # <<<<<<<<<<<<<< * * b = 0 */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_values), __pyx_n_s__shape); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6781; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if ((likely(PyTuple_CheckExact(__pyx_t_3))) || (PyList_CheckExact(__pyx_t_3))) { PyObject* sequence = __pyx_t_3; #if CYTHON_COMPILING_IN_CPYTHON Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6781; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_1 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_2 = PyTuple_GET_ITEM(sequence, 1); } else { __pyx_t_1 = PyList_GET_ITEM(sequence, 0); __pyx_t_2 = PyList_GET_ITEM(sequence, 1); } __Pyx_INCREF(__pyx_t_1); __Pyx_INCREF(__pyx_t_2); #else __pyx_t_1 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6781; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6781; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); #endif __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else { Py_ssize_t index = -1; __pyx_t_13 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6781; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_14 = Py_TYPE(__pyx_t_13)->tp_iternext; index = 0; __pyx_t_1 = __pyx_t_14(__pyx_t_13); if (unlikely(!__pyx_t_1)) goto __pyx_L4_unpacking_failed; __Pyx_GOTREF(__pyx_t_1); index = 1; __pyx_t_2 = __pyx_t_14(__pyx_t_13); if (unlikely(!__pyx_t_2)) goto __pyx_L4_unpacking_failed; __Pyx_GOTREF(__pyx_t_2); if (__Pyx_IternextUnpackEndCheck(__pyx_t_14(__pyx_t_13), 2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6781; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_14 = NULL; __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; goto __pyx_L5_unpacking_done; __pyx_L4_unpacking_failed:; __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_14 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6781; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_L5_unpacking_done:; } __pyx_t_11 = __Pyx_PyIndex_AsSsize_t(__pyx_t_1); if (unlikely((__pyx_t_11 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6781; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_9 = __Pyx_PyIndex_AsSsize_t(__pyx_t_2); if (unlikely((__pyx_t_9 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6781; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_N = __pyx_t_11; __pyx_v_K = __pyx_t_9; /* "pandas/src/generated.pyx":6783 * N, K = ( values).shape * * b = 0 # <<<<<<<<<<<<<< * if K > 1: * for i in range(N): */ __pyx_v_b = 0; /* "pandas/src/generated.pyx":6784 * * b = 0 * if K > 1: # <<<<<<<<<<<<<< * for i in range(N): * while b < ngroups - 1 and i >= bins[b]: */ __pyx_t_12 = ((__pyx_v_K > 1) != 0); if (__pyx_t_12) { /* "pandas/src/generated.pyx":6785 * b = 0 * if K > 1: * for i in range(N): # <<<<<<<<<<<<<< * while b < ngroups - 1 and i >= bins[b]: * b += 1 */ __pyx_t_9 = __pyx_v_N; for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_9; __pyx_t_11+=1) { __pyx_v_i = __pyx_t_11; /* "pandas/src/generated.pyx":6786 * if K > 1: * for i in range(N): * while b < ngroups - 1 and i >= bins[b]: # <<<<<<<<<<<<<< * b += 1 * */ while (1) { __pyx_t_12 = ((__pyx_v_b < (__pyx_v_ngroups - 1)) != 0); if (__pyx_t_12) { __pyx_t_15 = __pyx_v_b; __pyx_t_16 = ((__pyx_v_i >= (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_bins.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_bins.diminfo[0].strides))) != 0); __pyx_t_17 = __pyx_t_16; } else { __pyx_t_17 = __pyx_t_12; } if (!__pyx_t_17) break; /* "pandas/src/generated.pyx":6787 * for i in range(N): * while b < ngroups - 1 and i >= bins[b]: * b += 1 # <<<<<<<<<<<<<< * * counts[b] += 1 */ __pyx_v_b = (__pyx_v_b + 1); } /* "pandas/src/generated.pyx":6789 * b += 1 * * counts[b] += 1 # <<<<<<<<<<<<<< * for j in range(K): * val = values[i, j] */ __pyx_t_18 = __pyx_v_b; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_counts.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_counts.diminfo[0].strides) += 1; /* "pandas/src/generated.pyx":6790 * * counts[b] += 1 * for j in range(K): # <<<<<<<<<<<<<< * val = values[i, j] * */ __pyx_t_19 = __pyx_v_K; for (__pyx_t_20 = 0; __pyx_t_20 < __pyx_t_19; __pyx_t_20+=1) { __pyx_v_j = __pyx_t_20; /* "pandas/src/generated.pyx":6791 * counts[b] += 1 * for j in range(K): * val = values[i, j] # <<<<<<<<<<<<<< * * # not nan */ __pyx_t_21 = __pyx_v_i; __pyx_t_22 = __pyx_v_j; __pyx_v_val = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_22, __pyx_pybuffernd_values.diminfo[1].strides)); /* "pandas/src/generated.pyx":6794 * * # not nan * if val == val: # <<<<<<<<<<<<<< * nobs[b, j] += 1 * if val > maxx[b, j]: */ __pyx_t_17 = ((__pyx_v_val == __pyx_v_val) != 0); if (__pyx_t_17) { /* "pandas/src/generated.pyx":6795 * # not nan * if val == val: * nobs[b, j] += 1 # <<<<<<<<<<<<<< * if val > maxx[b, j]: * maxx[b, j] = val */ __pyx_t_23 = __pyx_v_b; __pyx_t_24 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_nobs.rcbuffer->pybuffer.buf, __pyx_t_23, __pyx_pybuffernd_nobs.diminfo[0].strides, __pyx_t_24, __pyx_pybuffernd_nobs.diminfo[1].strides) += 1.0; /* "pandas/src/generated.pyx":6796 * if val == val: * nobs[b, j] += 1 * if val > maxx[b, j]: # <<<<<<<<<<<<<< * maxx[b, j] = val * else: */ __pyx_t_25 = __pyx_v_b; __pyx_t_26 = __pyx_v_j; __pyx_t_17 = ((__pyx_v_val > (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_maxx.rcbuffer->pybuffer.buf, __pyx_t_25, __pyx_pybuffernd_maxx.diminfo[0].strides, __pyx_t_26, __pyx_pybuffernd_maxx.diminfo[1].strides))) != 0); if (__pyx_t_17) { /* "pandas/src/generated.pyx":6797 * nobs[b, j] += 1 * if val > maxx[b, j]: * maxx[b, j] = val # <<<<<<<<<<<<<< * else: * for i in range(N): */ __pyx_t_27 = __pyx_v_b; __pyx_t_28 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_maxx.rcbuffer->pybuffer.buf, __pyx_t_27, __pyx_pybuffernd_maxx.diminfo[0].strides, __pyx_t_28, __pyx_pybuffernd_maxx.diminfo[1].strides) = __pyx_v_val; goto __pyx_L14; } __pyx_L14:; goto __pyx_L13; } __pyx_L13:; } } goto __pyx_L6; } /*else*/ { /* "pandas/src/generated.pyx":6799 * maxx[b, j] = val * else: * for i in range(N): # <<<<<<<<<<<<<< * while b < ngroups - 1 and i >= bins[b]: * b += 1 */ __pyx_t_9 = __pyx_v_N; for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_9; __pyx_t_11+=1) { __pyx_v_i = __pyx_t_11; /* "pandas/src/generated.pyx":6800 * else: * for i in range(N): * while b < ngroups - 1 and i >= bins[b]: # <<<<<<<<<<<<<< * b += 1 * */ while (1) { __pyx_t_17 = ((__pyx_v_b < (__pyx_v_ngroups - 1)) != 0); if (__pyx_t_17) { __pyx_t_19 = __pyx_v_b; __pyx_t_12 = ((__pyx_v_i >= (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_bins.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_bins.diminfo[0].strides))) != 0); __pyx_t_16 = __pyx_t_12; } else { __pyx_t_16 = __pyx_t_17; } if (!__pyx_t_16) break; /* "pandas/src/generated.pyx":6801 * for i in range(N): * while b < ngroups - 1 and i >= bins[b]: * b += 1 # <<<<<<<<<<<<<< * * counts[b] += 1 */ __pyx_v_b = (__pyx_v_b + 1); } /* "pandas/src/generated.pyx":6803 * b += 1 * * counts[b] += 1 # <<<<<<<<<<<<<< * val = values[i, 0] * */ __pyx_t_20 = __pyx_v_b; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_counts.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_counts.diminfo[0].strides) += 1; /* "pandas/src/generated.pyx":6804 * * counts[b] += 1 * val = values[i, 0] # <<<<<<<<<<<<<< * * # not nan */ __pyx_t_29 = __pyx_v_i; __pyx_t_30 = 0; __pyx_v_val = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_29, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_30, __pyx_pybuffernd_values.diminfo[1].strides)); /* "pandas/src/generated.pyx":6807 * * # not nan * if val == val: # <<<<<<<<<<<<<< * nobs[b, 0] += 1 * if val > maxx[b, 0]: */ __pyx_t_16 = ((__pyx_v_val == __pyx_v_val) != 0); if (__pyx_t_16) { /* "pandas/src/generated.pyx":6808 * # not nan * if val == val: * nobs[b, 0] += 1 # <<<<<<<<<<<<<< * if val > maxx[b, 0]: * maxx[b, 0] = val */ __pyx_t_31 = __pyx_v_b; __pyx_t_32 = 0; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_nobs.rcbuffer->pybuffer.buf, __pyx_t_31, __pyx_pybuffernd_nobs.diminfo[0].strides, __pyx_t_32, __pyx_pybuffernd_nobs.diminfo[1].strides) += 1.0; /* "pandas/src/generated.pyx":6809 * if val == val: * nobs[b, 0] += 1 * if val > maxx[b, 0]: # <<<<<<<<<<<<<< * maxx[b, 0] = val * */ __pyx_t_33 = __pyx_v_b; __pyx_t_34 = 0; __pyx_t_16 = ((__pyx_v_val > (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_maxx.rcbuffer->pybuffer.buf, __pyx_t_33, __pyx_pybuffernd_maxx.diminfo[0].strides, __pyx_t_34, __pyx_pybuffernd_maxx.diminfo[1].strides))) != 0); if (__pyx_t_16) { /* "pandas/src/generated.pyx":6810 * nobs[b, 0] += 1 * if val > maxx[b, 0]: * maxx[b, 0] = val # <<<<<<<<<<<<<< * * for i in range(ngroups): */ __pyx_t_35 = __pyx_v_b; __pyx_t_36 = 0; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_maxx.rcbuffer->pybuffer.buf, __pyx_t_35, __pyx_pybuffernd_maxx.diminfo[0].strides, __pyx_t_36, __pyx_pybuffernd_maxx.diminfo[1].strides) = __pyx_v_val; goto __pyx_L20; } __pyx_L20:; goto __pyx_L19; } __pyx_L19:; } } __pyx_L6:; /* "pandas/src/generated.pyx":6812 * maxx[b, 0] = val * * for i in range(ngroups): # <<<<<<<<<<<<<< * for j in range(K): * if nobs[i, j] == 0: */ __pyx_t_9 = __pyx_v_ngroups; for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_9; __pyx_t_11+=1) { __pyx_v_i = __pyx_t_11; /* "pandas/src/generated.pyx":6813 * * for i in range(ngroups): * for j in range(K): # <<<<<<<<<<<<<< * if nobs[i, j] == 0: * out[i, j] = nan */ __pyx_t_37 = __pyx_v_K; for (__pyx_t_38 = 0; __pyx_t_38 < __pyx_t_37; __pyx_t_38+=1) { __pyx_v_j = __pyx_t_38; /* "pandas/src/generated.pyx":6814 * for i in range(ngroups): * for j in range(K): * if nobs[i, j] == 0: # <<<<<<<<<<<<<< * out[i, j] = nan * else: */ __pyx_t_39 = __pyx_v_i; __pyx_t_40 = __pyx_v_j; __pyx_t_16 = (((*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_nobs.rcbuffer->pybuffer.buf, __pyx_t_39, __pyx_pybuffernd_nobs.diminfo[0].strides, __pyx_t_40, __pyx_pybuffernd_nobs.diminfo[1].strides)) == 0.0) != 0); if (__pyx_t_16) { /* "pandas/src/generated.pyx":6815 * for j in range(K): * if nobs[i, j] == 0: * out[i, j] = nan # <<<<<<<<<<<<<< * else: * out[i, j] = maxx[i, j] */ __pyx_t_41 = __pyx_v_i; __pyx_t_42 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_41, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_42, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_6pandas_5algos_nan; goto __pyx_L25; } /*else*/ { /* "pandas/src/generated.pyx":6817 * out[i, j] = nan * else: * out[i, j] = maxx[i, j] # <<<<<<<<<<<<<< * * @cython.wraparound(False) */ __pyx_t_43 = __pyx_v_i; __pyx_t_44 = __pyx_v_j; __pyx_t_45 = __pyx_v_i; __pyx_t_46 = __pyx_v_j; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_45, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_46, __pyx_pybuffernd_out.diminfo[1].strides) = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_maxx.rcbuffer->pybuffer.buf, __pyx_t_43, __pyx_pybuffernd_maxx.diminfo[0].strides, __pyx_t_44, __pyx_pybuffernd_maxx.diminfo[1].strides)); } __pyx_L25:; } } __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_13); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_bins.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_counts.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_maxx.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.group_max_bin_float32", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_bins.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_counts.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_maxx.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_maxx); __Pyx_XDECREF((PyObject *)__pyx_v_nobs); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_451group_ohlc_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6pandas_5algos_450group_ohlc_float64[] = "\n Only aggregates on axis=0\n "; static PyMethodDef __pyx_mdef_6pandas_5algos_451group_ohlc_float64 = {__Pyx_NAMESTR("group_ohlc_float64"), (PyCFunction)__pyx_pw_6pandas_5algos_451group_ohlc_float64, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_5algos_450group_ohlc_float64)}; static PyObject *__pyx_pw_6pandas_5algos_451group_ohlc_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_out = 0; PyArrayObject *__pyx_v_counts = 0; PyArrayObject *__pyx_v_values = 0; PyArrayObject *__pyx_v_bins = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("group_ohlc_float64 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__out,&__pyx_n_s__counts,&__pyx_n_s__values,&__pyx_n_s__bins,0}; PyObject* values[4] = {0,0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__out)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__counts)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("group_ohlc_float64", 1, 4, 4, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6821; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__values)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("group_ohlc_float64", 1, 4, 4, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6821; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__bins)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("group_ohlc_float64", 1, 4, 4, 3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6821; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "group_ohlc_float64") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6821; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 4) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[3] = PyTuple_GET_ITEM(__pyx_args, 3); } __pyx_v_out = ((PyArrayObject *)values[0]); __pyx_v_counts = ((PyArrayObject *)values[1]); __pyx_v_values = ((PyArrayObject *)values[2]); __pyx_v_bins = ((PyArrayObject *)values[3]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("group_ohlc_float64", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6821; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.group_ohlc_float64", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_5numpy_ndarray, 1, "out", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6821; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_counts), __pyx_ptype_5numpy_ndarray, 1, "counts", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6822; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6823; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_bins), __pyx_ptype_5numpy_ndarray, 1, "bins", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6824; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_450group_ohlc_float64(__pyx_self, __pyx_v_out, __pyx_v_counts, __pyx_v_values, __pyx_v_bins); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":6821 * @cython.wraparound(False) * @cython.boundscheck(False) * def group_ohlc_float64(ndarray[float64_t, ndim=2] out, # <<<<<<<<<<<<<< * ndarray[int64_t] counts, * ndarray[float64_t, ndim=2] values, */ static PyObject *__pyx_pf_6pandas_5algos_450group_ohlc_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_out, PyArrayObject *__pyx_v_counts, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_bins) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_N; Py_ssize_t __pyx_v_K; Py_ssize_t __pyx_v_ngroups; Py_ssize_t __pyx_v_b; __pyx_t_5numpy_float64_t __pyx_v_val; __pyx_t_5numpy_float64_t __pyx_v_vopen; __pyx_t_5numpy_float64_t __pyx_v_vhigh; __pyx_t_5numpy_float64_t __pyx_v_vlow; __pyx_t_5numpy_float64_t __pyx_v_vclose; __pyx_t_5numpy_float64_t __pyx_v_NA; int __pyx_v_got_first; __Pyx_LocalBuf_ND __pyx_pybuffernd_bins; __Pyx_Buffer __pyx_pybuffer_bins; __Pyx_LocalBuf_ND __pyx_pybuffernd_counts; __Pyx_Buffer __pyx_pybuffer_counts; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_values; __Pyx_Buffer __pyx_pybuffer_values; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; Py_ssize_t __pyx_t_2; Py_ssize_t __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)(PyObject *); __pyx_t_5numpy_float64_t __pyx_t_10; Py_ssize_t __pyx_t_11; int __pyx_t_12; int __pyx_t_13; Py_ssize_t __pyx_t_14; long __pyx_t_15; Py_ssize_t __pyx_t_16; long __pyx_t_17; Py_ssize_t __pyx_t_18; long __pyx_t_19; Py_ssize_t __pyx_t_20; long __pyx_t_21; Py_ssize_t __pyx_t_22; long __pyx_t_23; Py_ssize_t __pyx_t_24; long __pyx_t_25; Py_ssize_t __pyx_t_26; long __pyx_t_27; Py_ssize_t __pyx_t_28; long __pyx_t_29; Py_ssize_t __pyx_t_30; Py_ssize_t __pyx_t_31; long __pyx_t_32; long __pyx_t_33; long __pyx_t_34; Py_ssize_t __pyx_t_35; long __pyx_t_36; Py_ssize_t __pyx_t_37; long __pyx_t_38; Py_ssize_t __pyx_t_39; long __pyx_t_40; Py_ssize_t __pyx_t_41; long __pyx_t_42; Py_ssize_t __pyx_t_43; long __pyx_t_44; Py_ssize_t __pyx_t_45; long __pyx_t_46; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("group_ohlc_float64", 0); __pyx_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; __pyx_pybuffer_counts.pybuffer.buf = NULL; __pyx_pybuffer_counts.refcount = 0; __pyx_pybuffernd_counts.data = NULL; __pyx_pybuffernd_counts.rcbuffer = &__pyx_pybuffer_counts; __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_bins.pybuffer.buf = NULL; __pyx_pybuffer_bins.refcount = 0; __pyx_pybuffernd_bins.data = NULL; __pyx_pybuffernd_bins.rcbuffer = &__pyx_pybuffer_bins; { __Pyx_BufFmt_StackElem __pyx_stack[1]; 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, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6821; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; __pyx_pybuffernd_out.diminfo[1].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_out.diminfo[1].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[1]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_counts.rcbuffer->pybuffer, (PyObject*)__pyx_v_counts, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6821; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_counts.diminfo[0].strides = __pyx_pybuffernd_counts.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_counts.diminfo[0].shape = __pyx_pybuffernd_counts.rcbuffer->pybuffer.shape[0]; { __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, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6821; __pyx_clineno = __LINE__; goto __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_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_bins.rcbuffer->pybuffer, (PyObject*)__pyx_v_bins, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6821; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_bins.diminfo[0].strides = __pyx_pybuffernd_bins.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_bins.diminfo[0].shape = __pyx_pybuffernd_bins.rcbuffer->pybuffer.shape[0]; /* "pandas/src/generated.pyx":6832 * float64_t val, count * float64_t vopen, vhigh, vlow, vclose, NA * bint got_first = 0 # <<<<<<<<<<<<<< * * if bins[len(bins) - 1] == len(values): */ __pyx_v_got_first = 0; /* "pandas/src/generated.pyx":6834 * bint got_first = 0 * * if bins[len(bins) - 1] == len(values): # <<<<<<<<<<<<<< * ngroups = len(bins) * else: */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_bins)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6834; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_2 = (__pyx_t_1 - 1); __pyx_t_3 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6834; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_4 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_bins.rcbuffer->pybuffer.buf, __pyx_t_2, __pyx_pybuffernd_bins.diminfo[0].strides)) == __pyx_t_3) != 0); if (__pyx_t_4) { /* "pandas/src/generated.pyx":6835 * * if bins[len(bins) - 1] == len(values): * ngroups = len(bins) # <<<<<<<<<<<<<< * else: * ngroups = len(bins) + 1 */ __pyx_t_3 = PyObject_Length(((PyObject *)__pyx_v_bins)); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6835; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_ngroups = __pyx_t_3; goto __pyx_L3; } /*else*/ { /* "pandas/src/generated.pyx":6837 * ngroups = len(bins) * else: * ngroups = len(bins) + 1 # <<<<<<<<<<<<<< * * N, K = ( values).shape */ __pyx_t_3 = PyObject_Length(((PyObject *)__pyx_v_bins)); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6837; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_ngroups = (__pyx_t_3 + 1); } __pyx_L3:; /* "pandas/src/generated.pyx":6839 * ngroups = len(bins) + 1 * * N, K = ( values).shape # <<<<<<<<<<<<<< * * if out.shape[1] != 4: */ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_values), __pyx_n_s__shape); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6839; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); if ((likely(PyTuple_CheckExact(__pyx_t_5))) || (PyList_CheckExact(__pyx_t_5))) { PyObject* sequence = __pyx_t_5; #if CYTHON_COMPILING_IN_CPYTHON Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6839; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_6 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_7 = PyTuple_GET_ITEM(sequence, 1); } else { __pyx_t_6 = PyList_GET_ITEM(sequence, 0); __pyx_t_7 = PyList_GET_ITEM(sequence, 1); } __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(__pyx_t_7); #else __pyx_t_6 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6839; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6839; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); #endif __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } else { Py_ssize_t index = -1; __pyx_t_8 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6839; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_9 = Py_TYPE(__pyx_t_8)->tp_iternext; index = 0; __pyx_t_6 = __pyx_t_9(__pyx_t_8); if (unlikely(!__pyx_t_6)) goto __pyx_L4_unpacking_failed; __Pyx_GOTREF(__pyx_t_6); index = 1; __pyx_t_7 = __pyx_t_9(__pyx_t_8); if (unlikely(!__pyx_t_7)) goto __pyx_L4_unpacking_failed; __Pyx_GOTREF(__pyx_t_7); if (__Pyx_IternextUnpackEndCheck(__pyx_t_9(__pyx_t_8), 2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6839; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_9 = NULL; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; goto __pyx_L5_unpacking_done; __pyx_L4_unpacking_failed:; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_9 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6839; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_L5_unpacking_done:; } __pyx_t_3 = __Pyx_PyIndex_AsSsize_t(__pyx_t_6); if (unlikely((__pyx_t_3 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6839; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_1 = __Pyx_PyIndex_AsSsize_t(__pyx_t_7); if (unlikely((__pyx_t_1 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6839; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_v_N = __pyx_t_3; __pyx_v_K = __pyx_t_1; /* "pandas/src/generated.pyx":6841 * N, K = ( values).shape * * if out.shape[1] != 4: # <<<<<<<<<<<<<< * raise ValueError('Output array must have 4 columns') * */ __pyx_t_4 = (((__pyx_v_out->dimensions[1]) != 4) != 0); if (__pyx_t_4) { /* "pandas/src/generated.pyx":6842 * * if out.shape[1] != 4: * raise ValueError('Output array must have 4 columns') # <<<<<<<<<<<<<< * * NA = np.nan */ __pyx_t_5 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_201), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6842; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_Raise(__pyx_t_5, 0, 0, 0); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6842; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L6; } __pyx_L6:; /* "pandas/src/generated.pyx":6844 * raise ValueError('Output array must have 4 columns') * * NA = np.nan # <<<<<<<<<<<<<< * * b = 0 */ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6844; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s__nan); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6844; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_10 = __pyx_PyFloat_AsDouble(__pyx_t_7); if (unlikely((__pyx_t_10 == (npy_float64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6844; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_v_NA = __pyx_t_10; /* "pandas/src/generated.pyx":6846 * NA = np.nan * * b = 0 # <<<<<<<<<<<<<< * if K > 1: * raise NotImplementedError */ __pyx_v_b = 0; /* "pandas/src/generated.pyx":6847 * * b = 0 * if K > 1: # <<<<<<<<<<<<<< * raise NotImplementedError * else: */ __pyx_t_4 = ((__pyx_v_K > 1) != 0); if (__pyx_t_4) { /* "pandas/src/generated.pyx":6848 * b = 0 * if K > 1: * raise NotImplementedError # <<<<<<<<<<<<<< * else: * for i in range(N): */ __Pyx_Raise(__pyx_builtin_NotImplementedError, 0, 0, 0); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6848; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L7; } /*else*/ { /* "pandas/src/generated.pyx":6850 * raise NotImplementedError * else: * for i in range(N): # <<<<<<<<<<<<<< * while b < ngroups - 1 and i >= bins[b]: * if not got_first: */ __pyx_t_1 = __pyx_v_N; for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_1; __pyx_t_3+=1) { __pyx_v_i = __pyx_t_3; /* "pandas/src/generated.pyx":6851 * else: * for i in range(N): * while b < ngroups - 1 and i >= bins[b]: # <<<<<<<<<<<<<< * if not got_first: * out[b, 0] = NA */ while (1) { __pyx_t_4 = ((__pyx_v_b < (__pyx_v_ngroups - 1)) != 0); if (__pyx_t_4) { __pyx_t_11 = __pyx_v_b; __pyx_t_12 = ((__pyx_v_i >= (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_bins.rcbuffer->pybuffer.buf, __pyx_t_11, __pyx_pybuffernd_bins.diminfo[0].strides))) != 0); __pyx_t_13 = __pyx_t_12; } else { __pyx_t_13 = __pyx_t_4; } if (!__pyx_t_13) break; /* "pandas/src/generated.pyx":6852 * for i in range(N): * while b < ngroups - 1 and i >= bins[b]: * if not got_first: # <<<<<<<<<<<<<< * out[b, 0] = NA * out[b, 1] = NA */ __pyx_t_13 = ((!(__pyx_v_got_first != 0)) != 0); if (__pyx_t_13) { /* "pandas/src/generated.pyx":6853 * while b < ngroups - 1 and i >= bins[b]: * if not got_first: * out[b, 0] = NA # <<<<<<<<<<<<<< * out[b, 1] = NA * out[b, 2] = NA */ __pyx_t_14 = __pyx_v_b; __pyx_t_15 = 0; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_15, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_NA; /* "pandas/src/generated.pyx":6854 * if not got_first: * out[b, 0] = NA * out[b, 1] = NA # <<<<<<<<<<<<<< * out[b, 2] = NA * out[b, 3] = NA */ __pyx_t_16 = __pyx_v_b; __pyx_t_17 = 1; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_17, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_NA; /* "pandas/src/generated.pyx":6855 * out[b, 0] = NA * out[b, 1] = NA * out[b, 2] = NA # <<<<<<<<<<<<<< * out[b, 3] = NA * else: */ __pyx_t_18 = __pyx_v_b; __pyx_t_19 = 2; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_19, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_NA; /* "pandas/src/generated.pyx":6856 * out[b, 1] = NA * out[b, 2] = NA * out[b, 3] = NA # <<<<<<<<<<<<<< * else: * out[b, 0] = vopen */ __pyx_t_20 = __pyx_v_b; __pyx_t_21 = 3; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_21, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_NA; goto __pyx_L12; } /*else*/ { /* "pandas/src/generated.pyx":6858 * out[b, 3] = NA * else: * out[b, 0] = vopen # <<<<<<<<<<<<<< * out[b, 1] = vhigh * out[b, 2] = vlow */ __pyx_t_22 = __pyx_v_b; __pyx_t_23 = 0; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_22, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_23, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_vopen; /* "pandas/src/generated.pyx":6859 * else: * out[b, 0] = vopen * out[b, 1] = vhigh # <<<<<<<<<<<<<< * out[b, 2] = vlow * out[b, 3] = vclose */ __pyx_t_24 = __pyx_v_b; __pyx_t_25 = 1; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_24, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_25, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_vhigh; /* "pandas/src/generated.pyx":6860 * out[b, 0] = vopen * out[b, 1] = vhigh * out[b, 2] = vlow # <<<<<<<<<<<<<< * out[b, 3] = vclose * b += 1 */ __pyx_t_26 = __pyx_v_b; __pyx_t_27 = 2; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_26, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_27, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_vlow; /* "pandas/src/generated.pyx":6861 * out[b, 1] = vhigh * out[b, 2] = vlow * out[b, 3] = vclose # <<<<<<<<<<<<<< * b += 1 * got_first = 0 */ __pyx_t_28 = __pyx_v_b; __pyx_t_29 = 3; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_28, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_29, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_vclose; } __pyx_L12:; /* "pandas/src/generated.pyx":6862 * out[b, 2] = vlow * out[b, 3] = vclose * b += 1 # <<<<<<<<<<<<<< * got_first = 0 * */ __pyx_v_b = (__pyx_v_b + 1); /* "pandas/src/generated.pyx":6863 * out[b, 3] = vclose * b += 1 * got_first = 0 # <<<<<<<<<<<<<< * * counts[b] += 1 */ __pyx_v_got_first = 0; } /* "pandas/src/generated.pyx":6865 * got_first = 0 * * counts[b] += 1 # <<<<<<<<<<<<<< * val = values[i, 0] * */ __pyx_t_30 = __pyx_v_b; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_counts.rcbuffer->pybuffer.buf, __pyx_t_30, __pyx_pybuffernd_counts.diminfo[0].strides) += 1; /* "pandas/src/generated.pyx":6866 * * counts[b] += 1 * val = values[i, 0] # <<<<<<<<<<<<<< * * # not nan */ __pyx_t_31 = __pyx_v_i; __pyx_t_32 = 0; __pyx_v_val = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_31, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_32, __pyx_pybuffernd_values.diminfo[1].strides)); /* "pandas/src/generated.pyx":6869 * * # not nan * if val == val: # <<<<<<<<<<<<<< * if not got_first: * got_first = 1 */ __pyx_t_13 = ((__pyx_v_val == __pyx_v_val) != 0); if (__pyx_t_13) { /* "pandas/src/generated.pyx":6870 * # not nan * if val == val: * if not got_first: # <<<<<<<<<<<<<< * got_first = 1 * vopen = val */ __pyx_t_13 = ((!(__pyx_v_got_first != 0)) != 0); if (__pyx_t_13) { /* "pandas/src/generated.pyx":6871 * if val == val: * if not got_first: * got_first = 1 # <<<<<<<<<<<<<< * vopen = val * vlow = val */ __pyx_v_got_first = 1; /* "pandas/src/generated.pyx":6872 * if not got_first: * got_first = 1 * vopen = val # <<<<<<<<<<<<<< * vlow = val * vhigh = val */ __pyx_v_vopen = __pyx_v_val; /* "pandas/src/generated.pyx":6873 * got_first = 1 * vopen = val * vlow = val # <<<<<<<<<<<<<< * vhigh = val * else: */ __pyx_v_vlow = __pyx_v_val; /* "pandas/src/generated.pyx":6874 * vopen = val * vlow = val * vhigh = val # <<<<<<<<<<<<<< * else: * if val < vlow: */ __pyx_v_vhigh = __pyx_v_val; goto __pyx_L14; } /*else*/ { /* "pandas/src/generated.pyx":6876 * vhigh = val * else: * if val < vlow: # <<<<<<<<<<<<<< * vlow = val * if val > vhigh: */ __pyx_t_13 = ((__pyx_v_val < __pyx_v_vlow) != 0); if (__pyx_t_13) { /* "pandas/src/generated.pyx":6877 * else: * if val < vlow: * vlow = val # <<<<<<<<<<<<<< * if val > vhigh: * vhigh = val */ __pyx_v_vlow = __pyx_v_val; goto __pyx_L15; } __pyx_L15:; /* "pandas/src/generated.pyx":6878 * if val < vlow: * vlow = val * if val > vhigh: # <<<<<<<<<<<<<< * vhigh = val * vclose = val */ __pyx_t_13 = ((__pyx_v_val > __pyx_v_vhigh) != 0); if (__pyx_t_13) { /* "pandas/src/generated.pyx":6879 * vlow = val * if val > vhigh: * vhigh = val # <<<<<<<<<<<<<< * vclose = val * */ __pyx_v_vhigh = __pyx_v_val; goto __pyx_L16; } __pyx_L16:; } __pyx_L14:; /* "pandas/src/generated.pyx":6880 * if val > vhigh: * vhigh = val * vclose = val # <<<<<<<<<<<<<< * * if not got_first: */ __pyx_v_vclose = __pyx_v_val; goto __pyx_L13; } __pyx_L13:; } /* "pandas/src/generated.pyx":6882 * vclose = val * * if not got_first: # <<<<<<<<<<<<<< * out[b, 0] = NA * out[b, 1] = NA */ __pyx_t_13 = ((!(__pyx_v_got_first != 0)) != 0); if (__pyx_t_13) { /* "pandas/src/generated.pyx":6883 * * if not got_first: * out[b, 0] = NA # <<<<<<<<<<<<<< * out[b, 1] = NA * out[b, 2] = NA */ __pyx_t_1 = __pyx_v_b; __pyx_t_33 = 0; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_1, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_33, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_NA; /* "pandas/src/generated.pyx":6884 * if not got_first: * out[b, 0] = NA * out[b, 1] = NA # <<<<<<<<<<<<<< * out[b, 2] = NA * out[b, 3] = NA */ __pyx_t_3 = __pyx_v_b; __pyx_t_34 = 1; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_3, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_34, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_NA; /* "pandas/src/generated.pyx":6885 * out[b, 0] = NA * out[b, 1] = NA * out[b, 2] = NA # <<<<<<<<<<<<<< * out[b, 3] = NA * else: */ __pyx_t_35 = __pyx_v_b; __pyx_t_36 = 2; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_35, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_36, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_NA; /* "pandas/src/generated.pyx":6886 * out[b, 1] = NA * out[b, 2] = NA * out[b, 3] = NA # <<<<<<<<<<<<<< * else: * out[b, 0] = vopen */ __pyx_t_37 = __pyx_v_b; __pyx_t_38 = 3; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_37, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_38, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_NA; goto __pyx_L17; } /*else*/ { /* "pandas/src/generated.pyx":6888 * out[b, 3] = NA * else: * out[b, 0] = vopen # <<<<<<<<<<<<<< * out[b, 1] = vhigh * out[b, 2] = vlow */ __pyx_t_39 = __pyx_v_b; __pyx_t_40 = 0; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_39, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_40, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_vopen; /* "pandas/src/generated.pyx":6889 * else: * out[b, 0] = vopen * out[b, 1] = vhigh # <<<<<<<<<<<<<< * out[b, 2] = vlow * out[b, 3] = vclose */ __pyx_t_41 = __pyx_v_b; __pyx_t_42 = 1; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_41, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_42, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_vhigh; /* "pandas/src/generated.pyx":6890 * out[b, 0] = vopen * out[b, 1] = vhigh * out[b, 2] = vlow # <<<<<<<<<<<<<< * out[b, 3] = vclose * @cython.wraparound(False) */ __pyx_t_43 = __pyx_v_b; __pyx_t_44 = 2; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_43, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_44, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_vlow; /* "pandas/src/generated.pyx":6891 * out[b, 1] = vhigh * out[b, 2] = vlow * out[b, 3] = vclose # <<<<<<<<<<<<<< * @cython.wraparound(False) * @cython.boundscheck(False) */ __pyx_t_45 = __pyx_v_b; __pyx_t_46 = 3; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_45, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_46, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_vclose; } __pyx_L17:; } __pyx_L7:; __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); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_bins.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_counts.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.group_ohlc_float64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_bins.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_counts.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_453group_ohlc_float32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6pandas_5algos_452group_ohlc_float32[] = "\n Only aggregates on axis=0\n "; static PyMethodDef __pyx_mdef_6pandas_5algos_453group_ohlc_float32 = {__Pyx_NAMESTR("group_ohlc_float32"), (PyCFunction)__pyx_pw_6pandas_5algos_453group_ohlc_float32, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_5algos_452group_ohlc_float32)}; static PyObject *__pyx_pw_6pandas_5algos_453group_ohlc_float32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_out = 0; PyArrayObject *__pyx_v_counts = 0; PyArrayObject *__pyx_v_values = 0; PyArrayObject *__pyx_v_bins = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("group_ohlc_float32 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__out,&__pyx_n_s__counts,&__pyx_n_s__values,&__pyx_n_s__bins,0}; PyObject* values[4] = {0,0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__out)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__counts)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("group_ohlc_float32", 1, 4, 4, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6894; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__values)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("group_ohlc_float32", 1, 4, 4, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6894; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__bins)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("group_ohlc_float32", 1, 4, 4, 3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6894; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "group_ohlc_float32") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6894; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 4) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[3] = PyTuple_GET_ITEM(__pyx_args, 3); } __pyx_v_out = ((PyArrayObject *)values[0]); __pyx_v_counts = ((PyArrayObject *)values[1]); __pyx_v_values = ((PyArrayObject *)values[2]); __pyx_v_bins = ((PyArrayObject *)values[3]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("group_ohlc_float32", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6894; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.group_ohlc_float32", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_5numpy_ndarray, 1, "out", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6894; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_counts), __pyx_ptype_5numpy_ndarray, 1, "counts", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6895; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6896; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_bins), __pyx_ptype_5numpy_ndarray, 1, "bins", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6897; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_452group_ohlc_float32(__pyx_self, __pyx_v_out, __pyx_v_counts, __pyx_v_values, __pyx_v_bins); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":6894 * @cython.wraparound(False) * @cython.boundscheck(False) * def group_ohlc_float32(ndarray[float32_t, ndim=2] out, # <<<<<<<<<<<<<< * ndarray[int64_t] counts, * ndarray[float32_t, ndim=2] values, */ static PyObject *__pyx_pf_6pandas_5algos_452group_ohlc_float32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_out, PyArrayObject *__pyx_v_counts, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_bins) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_N; Py_ssize_t __pyx_v_K; Py_ssize_t __pyx_v_ngroups; Py_ssize_t __pyx_v_b; __pyx_t_5numpy_float32_t __pyx_v_val; __pyx_t_5numpy_float32_t __pyx_v_vopen; __pyx_t_5numpy_float32_t __pyx_v_vhigh; __pyx_t_5numpy_float32_t __pyx_v_vlow; __pyx_t_5numpy_float32_t __pyx_v_vclose; __pyx_t_5numpy_float32_t __pyx_v_NA; int __pyx_v_got_first; __Pyx_LocalBuf_ND __pyx_pybuffernd_bins; __Pyx_Buffer __pyx_pybuffer_bins; __Pyx_LocalBuf_ND __pyx_pybuffernd_counts; __Pyx_Buffer __pyx_pybuffer_counts; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_values; __Pyx_Buffer __pyx_pybuffer_values; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; Py_ssize_t __pyx_t_2; Py_ssize_t __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)(PyObject *); __pyx_t_5numpy_float32_t __pyx_t_10; Py_ssize_t __pyx_t_11; int __pyx_t_12; int __pyx_t_13; Py_ssize_t __pyx_t_14; long __pyx_t_15; Py_ssize_t __pyx_t_16; long __pyx_t_17; Py_ssize_t __pyx_t_18; long __pyx_t_19; Py_ssize_t __pyx_t_20; long __pyx_t_21; Py_ssize_t __pyx_t_22; long __pyx_t_23; Py_ssize_t __pyx_t_24; long __pyx_t_25; Py_ssize_t __pyx_t_26; long __pyx_t_27; Py_ssize_t __pyx_t_28; long __pyx_t_29; Py_ssize_t __pyx_t_30; Py_ssize_t __pyx_t_31; long __pyx_t_32; long __pyx_t_33; long __pyx_t_34; Py_ssize_t __pyx_t_35; long __pyx_t_36; Py_ssize_t __pyx_t_37; long __pyx_t_38; Py_ssize_t __pyx_t_39; long __pyx_t_40; Py_ssize_t __pyx_t_41; long __pyx_t_42; Py_ssize_t __pyx_t_43; long __pyx_t_44; Py_ssize_t __pyx_t_45; long __pyx_t_46; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("group_ohlc_float32", 0); __pyx_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; __pyx_pybuffer_counts.pybuffer.buf = NULL; __pyx_pybuffer_counts.refcount = 0; __pyx_pybuffernd_counts.data = NULL; __pyx_pybuffernd_counts.rcbuffer = &__pyx_pybuffer_counts; __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_bins.pybuffer.buf = NULL; __pyx_pybuffer_bins.refcount = 0; __pyx_pybuffernd_bins.data = NULL; __pyx_pybuffernd_bins.rcbuffer = &__pyx_pybuffer_bins; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_v_out, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6894; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; __pyx_pybuffernd_out.diminfo[1].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_out.diminfo[1].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[1]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_counts.rcbuffer->pybuffer, (PyObject*)__pyx_v_counts, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6894; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_counts.diminfo[0].strides = __pyx_pybuffernd_counts.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_counts.diminfo[0].shape = __pyx_pybuffernd_counts.rcbuffer->pybuffer.shape[0]; { __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_float32_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6894; __pyx_clineno = __LINE__; goto __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_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_bins.rcbuffer->pybuffer, (PyObject*)__pyx_v_bins, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6894; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_bins.diminfo[0].strides = __pyx_pybuffernd_bins.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_bins.diminfo[0].shape = __pyx_pybuffernd_bins.rcbuffer->pybuffer.shape[0]; /* "pandas/src/generated.pyx":6905 * float32_t val, count * float32_t vopen, vhigh, vlow, vclose, NA * bint got_first = 0 # <<<<<<<<<<<<<< * * if bins[len(bins) - 1] == len(values): */ __pyx_v_got_first = 0; /* "pandas/src/generated.pyx":6907 * bint got_first = 0 * * if bins[len(bins) - 1] == len(values): # <<<<<<<<<<<<<< * ngroups = len(bins) * else: */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_bins)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6907; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_2 = (__pyx_t_1 - 1); __pyx_t_3 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6907; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_4 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_bins.rcbuffer->pybuffer.buf, __pyx_t_2, __pyx_pybuffernd_bins.diminfo[0].strides)) == __pyx_t_3) != 0); if (__pyx_t_4) { /* "pandas/src/generated.pyx":6908 * * if bins[len(bins) - 1] == len(values): * ngroups = len(bins) # <<<<<<<<<<<<<< * else: * ngroups = len(bins) + 1 */ __pyx_t_3 = PyObject_Length(((PyObject *)__pyx_v_bins)); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6908; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_ngroups = __pyx_t_3; goto __pyx_L3; } /*else*/ { /* "pandas/src/generated.pyx":6910 * ngroups = len(bins) * else: * ngroups = len(bins) + 1 # <<<<<<<<<<<<<< * * N, K = ( values).shape */ __pyx_t_3 = PyObject_Length(((PyObject *)__pyx_v_bins)); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6910; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_ngroups = (__pyx_t_3 + 1); } __pyx_L3:; /* "pandas/src/generated.pyx":6912 * ngroups = len(bins) + 1 * * N, K = ( values).shape # <<<<<<<<<<<<<< * * if out.shape[1] != 4: */ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_values), __pyx_n_s__shape); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6912; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); if ((likely(PyTuple_CheckExact(__pyx_t_5))) || (PyList_CheckExact(__pyx_t_5))) { PyObject* sequence = __pyx_t_5; #if CYTHON_COMPILING_IN_CPYTHON Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6912; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_6 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_7 = PyTuple_GET_ITEM(sequence, 1); } else { __pyx_t_6 = PyList_GET_ITEM(sequence, 0); __pyx_t_7 = PyList_GET_ITEM(sequence, 1); } __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(__pyx_t_7); #else __pyx_t_6 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6912; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6912; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); #endif __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } else { Py_ssize_t index = -1; __pyx_t_8 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6912; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_9 = Py_TYPE(__pyx_t_8)->tp_iternext; index = 0; __pyx_t_6 = __pyx_t_9(__pyx_t_8); if (unlikely(!__pyx_t_6)) goto __pyx_L4_unpacking_failed; __Pyx_GOTREF(__pyx_t_6); index = 1; __pyx_t_7 = __pyx_t_9(__pyx_t_8); if (unlikely(!__pyx_t_7)) goto __pyx_L4_unpacking_failed; __Pyx_GOTREF(__pyx_t_7); if (__Pyx_IternextUnpackEndCheck(__pyx_t_9(__pyx_t_8), 2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6912; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_9 = NULL; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; goto __pyx_L5_unpacking_done; __pyx_L4_unpacking_failed:; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_9 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6912; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_L5_unpacking_done:; } __pyx_t_3 = __Pyx_PyIndex_AsSsize_t(__pyx_t_6); if (unlikely((__pyx_t_3 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6912; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_1 = __Pyx_PyIndex_AsSsize_t(__pyx_t_7); if (unlikely((__pyx_t_1 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6912; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_v_N = __pyx_t_3; __pyx_v_K = __pyx_t_1; /* "pandas/src/generated.pyx":6914 * N, K = ( values).shape * * if out.shape[1] != 4: # <<<<<<<<<<<<<< * raise ValueError('Output array must have 4 columns') * */ __pyx_t_4 = (((__pyx_v_out->dimensions[1]) != 4) != 0); if (__pyx_t_4) { /* "pandas/src/generated.pyx":6915 * * if out.shape[1] != 4: * raise ValueError('Output array must have 4 columns') # <<<<<<<<<<<<<< * * NA = np.nan */ __pyx_t_5 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_202), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6915; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_Raise(__pyx_t_5, 0, 0, 0); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6915; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L6; } __pyx_L6:; /* "pandas/src/generated.pyx":6917 * raise ValueError('Output array must have 4 columns') * * NA = np.nan # <<<<<<<<<<<<<< * * b = 0 */ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6917; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s__nan); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6917; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_10 = __pyx_PyFloat_AsFloat(__pyx_t_7); if (unlikely((__pyx_t_10 == (npy_float32)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6917; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_v_NA = __pyx_t_10; /* "pandas/src/generated.pyx":6919 * NA = np.nan * * b = 0 # <<<<<<<<<<<<<< * if K > 1: * raise NotImplementedError */ __pyx_v_b = 0; /* "pandas/src/generated.pyx":6920 * * b = 0 * if K > 1: # <<<<<<<<<<<<<< * raise NotImplementedError * else: */ __pyx_t_4 = ((__pyx_v_K > 1) != 0); if (__pyx_t_4) { /* "pandas/src/generated.pyx":6921 * b = 0 * if K > 1: * raise NotImplementedError # <<<<<<<<<<<<<< * else: * for i in range(N): */ __Pyx_Raise(__pyx_builtin_NotImplementedError, 0, 0, 0); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6921; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L7; } /*else*/ { /* "pandas/src/generated.pyx":6923 * raise NotImplementedError * else: * for i in range(N): # <<<<<<<<<<<<<< * while b < ngroups - 1 and i >= bins[b]: * if not got_first: */ __pyx_t_1 = __pyx_v_N; for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_1; __pyx_t_3+=1) { __pyx_v_i = __pyx_t_3; /* "pandas/src/generated.pyx":6924 * else: * for i in range(N): * while b < ngroups - 1 and i >= bins[b]: # <<<<<<<<<<<<<< * if not got_first: * out[b, 0] = NA */ while (1) { __pyx_t_4 = ((__pyx_v_b < (__pyx_v_ngroups - 1)) != 0); if (__pyx_t_4) { __pyx_t_11 = __pyx_v_b; __pyx_t_12 = ((__pyx_v_i >= (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_bins.rcbuffer->pybuffer.buf, __pyx_t_11, __pyx_pybuffernd_bins.diminfo[0].strides))) != 0); __pyx_t_13 = __pyx_t_12; } else { __pyx_t_13 = __pyx_t_4; } if (!__pyx_t_13) break; /* "pandas/src/generated.pyx":6925 * for i in range(N): * while b < ngroups - 1 and i >= bins[b]: * if not got_first: # <<<<<<<<<<<<<< * out[b, 0] = NA * out[b, 1] = NA */ __pyx_t_13 = ((!(__pyx_v_got_first != 0)) != 0); if (__pyx_t_13) { /* "pandas/src/generated.pyx":6926 * while b < ngroups - 1 and i >= bins[b]: * if not got_first: * out[b, 0] = NA # <<<<<<<<<<<<<< * out[b, 1] = NA * out[b, 2] = NA */ __pyx_t_14 = __pyx_v_b; __pyx_t_15 = 0; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_15, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_NA; /* "pandas/src/generated.pyx":6927 * if not got_first: * out[b, 0] = NA * out[b, 1] = NA # <<<<<<<<<<<<<< * out[b, 2] = NA * out[b, 3] = NA */ __pyx_t_16 = __pyx_v_b; __pyx_t_17 = 1; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_17, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_NA; /* "pandas/src/generated.pyx":6928 * out[b, 0] = NA * out[b, 1] = NA * out[b, 2] = NA # <<<<<<<<<<<<<< * out[b, 3] = NA * else: */ __pyx_t_18 = __pyx_v_b; __pyx_t_19 = 2; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_19, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_NA; /* "pandas/src/generated.pyx":6929 * out[b, 1] = NA * out[b, 2] = NA * out[b, 3] = NA # <<<<<<<<<<<<<< * else: * out[b, 0] = vopen */ __pyx_t_20 = __pyx_v_b; __pyx_t_21 = 3; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_21, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_NA; goto __pyx_L12; } /*else*/ { /* "pandas/src/generated.pyx":6931 * out[b, 3] = NA * else: * out[b, 0] = vopen # <<<<<<<<<<<<<< * out[b, 1] = vhigh * out[b, 2] = vlow */ __pyx_t_22 = __pyx_v_b; __pyx_t_23 = 0; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_22, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_23, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_vopen; /* "pandas/src/generated.pyx":6932 * else: * out[b, 0] = vopen * out[b, 1] = vhigh # <<<<<<<<<<<<<< * out[b, 2] = vlow * out[b, 3] = vclose */ __pyx_t_24 = __pyx_v_b; __pyx_t_25 = 1; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_24, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_25, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_vhigh; /* "pandas/src/generated.pyx":6933 * out[b, 0] = vopen * out[b, 1] = vhigh * out[b, 2] = vlow # <<<<<<<<<<<<<< * out[b, 3] = vclose * b += 1 */ __pyx_t_26 = __pyx_v_b; __pyx_t_27 = 2; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_26, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_27, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_vlow; /* "pandas/src/generated.pyx":6934 * out[b, 1] = vhigh * out[b, 2] = vlow * out[b, 3] = vclose # <<<<<<<<<<<<<< * b += 1 * got_first = 0 */ __pyx_t_28 = __pyx_v_b; __pyx_t_29 = 3; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_28, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_29, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_vclose; } __pyx_L12:; /* "pandas/src/generated.pyx":6935 * out[b, 2] = vlow * out[b, 3] = vclose * b += 1 # <<<<<<<<<<<<<< * got_first = 0 * */ __pyx_v_b = (__pyx_v_b + 1); /* "pandas/src/generated.pyx":6936 * out[b, 3] = vclose * b += 1 * got_first = 0 # <<<<<<<<<<<<<< * * counts[b] += 1 */ __pyx_v_got_first = 0; } /* "pandas/src/generated.pyx":6938 * got_first = 0 * * counts[b] += 1 # <<<<<<<<<<<<<< * val = values[i, 0] * */ __pyx_t_30 = __pyx_v_b; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_counts.rcbuffer->pybuffer.buf, __pyx_t_30, __pyx_pybuffernd_counts.diminfo[0].strides) += 1; /* "pandas/src/generated.pyx":6939 * * counts[b] += 1 * val = values[i, 0] # <<<<<<<<<<<<<< * * # not nan */ __pyx_t_31 = __pyx_v_i; __pyx_t_32 = 0; __pyx_v_val = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_31, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_32, __pyx_pybuffernd_values.diminfo[1].strides)); /* "pandas/src/generated.pyx":6942 * * # not nan * if val == val: # <<<<<<<<<<<<<< * if not got_first: * got_first = 1 */ __pyx_t_13 = ((__pyx_v_val == __pyx_v_val) != 0); if (__pyx_t_13) { /* "pandas/src/generated.pyx":6943 * # not nan * if val == val: * if not got_first: # <<<<<<<<<<<<<< * got_first = 1 * vopen = val */ __pyx_t_13 = ((!(__pyx_v_got_first != 0)) != 0); if (__pyx_t_13) { /* "pandas/src/generated.pyx":6944 * if val == val: * if not got_first: * got_first = 1 # <<<<<<<<<<<<<< * vopen = val * vlow = val */ __pyx_v_got_first = 1; /* "pandas/src/generated.pyx":6945 * if not got_first: * got_first = 1 * vopen = val # <<<<<<<<<<<<<< * vlow = val * vhigh = val */ __pyx_v_vopen = __pyx_v_val; /* "pandas/src/generated.pyx":6946 * got_first = 1 * vopen = val * vlow = val # <<<<<<<<<<<<<< * vhigh = val * else: */ __pyx_v_vlow = __pyx_v_val; /* "pandas/src/generated.pyx":6947 * vopen = val * vlow = val * vhigh = val # <<<<<<<<<<<<<< * else: * if val < vlow: */ __pyx_v_vhigh = __pyx_v_val; goto __pyx_L14; } /*else*/ { /* "pandas/src/generated.pyx":6949 * vhigh = val * else: * if val < vlow: # <<<<<<<<<<<<<< * vlow = val * if val > vhigh: */ __pyx_t_13 = ((__pyx_v_val < __pyx_v_vlow) != 0); if (__pyx_t_13) { /* "pandas/src/generated.pyx":6950 * else: * if val < vlow: * vlow = val # <<<<<<<<<<<<<< * if val > vhigh: * vhigh = val */ __pyx_v_vlow = __pyx_v_val; goto __pyx_L15; } __pyx_L15:; /* "pandas/src/generated.pyx":6951 * if val < vlow: * vlow = val * if val > vhigh: # <<<<<<<<<<<<<< * vhigh = val * vclose = val */ __pyx_t_13 = ((__pyx_v_val > __pyx_v_vhigh) != 0); if (__pyx_t_13) { /* "pandas/src/generated.pyx":6952 * vlow = val * if val > vhigh: * vhigh = val # <<<<<<<<<<<<<< * vclose = val * */ __pyx_v_vhigh = __pyx_v_val; goto __pyx_L16; } __pyx_L16:; } __pyx_L14:; /* "pandas/src/generated.pyx":6953 * if val > vhigh: * vhigh = val * vclose = val # <<<<<<<<<<<<<< * * if not got_first: */ __pyx_v_vclose = __pyx_v_val; goto __pyx_L13; } __pyx_L13:; } /* "pandas/src/generated.pyx":6955 * vclose = val * * if not got_first: # <<<<<<<<<<<<<< * out[b, 0] = NA * out[b, 1] = NA */ __pyx_t_13 = ((!(__pyx_v_got_first != 0)) != 0); if (__pyx_t_13) { /* "pandas/src/generated.pyx":6956 * * if not got_first: * out[b, 0] = NA # <<<<<<<<<<<<<< * out[b, 1] = NA * out[b, 2] = NA */ __pyx_t_1 = __pyx_v_b; __pyx_t_33 = 0; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_1, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_33, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_NA; /* "pandas/src/generated.pyx":6957 * if not got_first: * out[b, 0] = NA * out[b, 1] = NA # <<<<<<<<<<<<<< * out[b, 2] = NA * out[b, 3] = NA */ __pyx_t_3 = __pyx_v_b; __pyx_t_34 = 1; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_3, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_34, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_NA; /* "pandas/src/generated.pyx":6958 * out[b, 0] = NA * out[b, 1] = NA * out[b, 2] = NA # <<<<<<<<<<<<<< * out[b, 3] = NA * else: */ __pyx_t_35 = __pyx_v_b; __pyx_t_36 = 2; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_35, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_36, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_NA; /* "pandas/src/generated.pyx":6959 * out[b, 1] = NA * out[b, 2] = NA * out[b, 3] = NA # <<<<<<<<<<<<<< * else: * out[b, 0] = vopen */ __pyx_t_37 = __pyx_v_b; __pyx_t_38 = 3; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_37, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_38, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_NA; goto __pyx_L17; } /*else*/ { /* "pandas/src/generated.pyx":6961 * out[b, 3] = NA * else: * out[b, 0] = vopen # <<<<<<<<<<<<<< * out[b, 1] = vhigh * out[b, 2] = vlow */ __pyx_t_39 = __pyx_v_b; __pyx_t_40 = 0; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_39, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_40, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_vopen; /* "pandas/src/generated.pyx":6962 * else: * out[b, 0] = vopen * out[b, 1] = vhigh # <<<<<<<<<<<<<< * out[b, 2] = vlow * out[b, 3] = vclose */ __pyx_t_41 = __pyx_v_b; __pyx_t_42 = 1; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_41, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_42, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_vhigh; /* "pandas/src/generated.pyx":6963 * out[b, 0] = vopen * out[b, 1] = vhigh * out[b, 2] = vlow # <<<<<<<<<<<<<< * out[b, 3] = vclose * */ __pyx_t_43 = __pyx_v_b; __pyx_t_44 = 2; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_43, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_44, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_vlow; /* "pandas/src/generated.pyx":6964 * out[b, 1] = vhigh * out[b, 2] = vlow * out[b, 3] = vclose # <<<<<<<<<<<<<< * * @cython.wraparound(False) */ __pyx_t_45 = __pyx_v_b; __pyx_t_46 = 3; *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_45, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_46, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_vclose; } __pyx_L17:; } __pyx_L7:; __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); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_bins.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_counts.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.group_ohlc_float32", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_bins.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_counts.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_455left_join_indexer_unique_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_455left_join_indexer_unique_float64 = {__Pyx_NAMESTR("left_join_indexer_unique_float64"), (PyCFunction)__pyx_pw_6pandas_5algos_455left_join_indexer_unique_float64, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_455left_join_indexer_unique_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_left = 0; PyArrayObject *__pyx_v_right = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("left_join_indexer_unique_float64 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__left,&__pyx_n_s__right,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__left)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__right)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("left_join_indexer_unique_float64", 1, 2, 2, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6968; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "left_join_indexer_unique_float64") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6968; __pyx_clineno = __LINE__; goto __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_left = ((PyArrayObject *)values[0]); __pyx_v_right = ((PyArrayObject *)values[1]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("left_join_indexer_unique_float64", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6968; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.left_join_indexer_unique_float64", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_left), __pyx_ptype_5numpy_ndarray, 1, "left", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6968; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_right), __pyx_ptype_5numpy_ndarray, 1, "right", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6969; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_454left_join_indexer_unique_float64(__pyx_self, __pyx_v_left, __pyx_v_right); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":6968 * @cython.wraparound(False) * @cython.boundscheck(False) * def left_join_indexer_unique_float64(ndarray[float64_t] left, # <<<<<<<<<<<<<< * ndarray[float64_t] right): * cdef: */ static PyObject *__pyx_pf_6pandas_5algos_454left_join_indexer_unique_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_left, PyArrayObject *__pyx_v_right) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_nleft; Py_ssize_t __pyx_v_nright; PyArrayObject *__pyx_v_indexer = 0; __pyx_t_5numpy_float64_t __pyx_v_rval; __Pyx_LocalBuf_ND __pyx_pybuffernd_indexer; __Pyx_Buffer __pyx_pybuffer_indexer; __Pyx_LocalBuf_ND __pyx_pybuffernd_left; __Pyx_Buffer __pyx_pybuffer_left; __Pyx_LocalBuf_ND __pyx_pybuffernd_right; __Pyx_Buffer __pyx_pybuffer_right; 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; int __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; 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("left_join_indexer_unique_float64", 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_left.pybuffer.buf = NULL; __pyx_pybuffer_left.refcount = 0; __pyx_pybuffernd_left.data = NULL; __pyx_pybuffernd_left.rcbuffer = &__pyx_pybuffer_left; __pyx_pybuffer_right.pybuffer.buf = NULL; __pyx_pybuffer_right.refcount = 0; __pyx_pybuffernd_right.data = NULL; __pyx_pybuffernd_right.rcbuffer = &__pyx_pybuffer_right; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_left.rcbuffer->pybuffer, (PyObject*)__pyx_v_left, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6968; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_left.diminfo[0].strides = __pyx_pybuffernd_left.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_left.diminfo[0].shape = __pyx_pybuffernd_left.rcbuffer->pybuffer.shape[0]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_right.rcbuffer->pybuffer, (PyObject*)__pyx_v_right, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6968; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_right.diminfo[0].strides = __pyx_pybuffernd_right.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_right.diminfo[0].shape = __pyx_pybuffernd_right.rcbuffer->pybuffer.shape[0]; /* "pandas/src/generated.pyx":6975 * float64_t lval, rval * * i = 0 # <<<<<<<<<<<<<< * j = 0 * nleft = len(left) */ __pyx_v_i = 0; /* "pandas/src/generated.pyx":6976 * * i = 0 * j = 0 # <<<<<<<<<<<<<< * nleft = len(left) * nright = len(right) */ __pyx_v_j = 0; /* "pandas/src/generated.pyx":6977 * i = 0 * j = 0 * nleft = len(left) # <<<<<<<<<<<<<< * nright = len(right) * */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_left)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6977; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_nleft = __pyx_t_1; /* "pandas/src/generated.pyx":6978 * j = 0 * nleft = len(left) * nright = len(right) # <<<<<<<<<<<<<< * * indexer = np.empty(nleft, dtype=np.int64) */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_right)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6978; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_nright = __pyx_t_1; /* "pandas/src/generated.pyx":6980 * nright = len(right) * * indexer = np.empty(nleft, dtype=np.int64) # <<<<<<<<<<<<<< * while True: * if i == nleft: */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6980; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 6980; __pyx_clineno = __LINE__; goto __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_nleft); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6980; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6980; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6980; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_2)); __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6980; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s__int64); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6980; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__dtype), __pyx_t_6) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6980; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6980; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __Pyx_DECREF(((PyObject *)__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_filename = __pyx_f[2]; __pyx_lineno = 6980; __pyx_clineno = __LINE__; goto __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_int64_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_int64_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_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_filename = __pyx_f[2]; __pyx_lineno = 6980; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_7 = 0; __pyx_v_indexer = ((PyArrayObject *)__pyx_t_6); __pyx_t_6 = 0; /* "pandas/src/generated.pyx":6981 * * indexer = np.empty(nleft, dtype=np.int64) * while True: # <<<<<<<<<<<<<< * if i == nleft: * break */ while (1) { if (!1) break; /* "pandas/src/generated.pyx":6982 * indexer = np.empty(nleft, dtype=np.int64) * while True: * if i == nleft: # <<<<<<<<<<<<<< * break * */ __pyx_t_12 = ((__pyx_v_i == __pyx_v_nleft) != 0); if (__pyx_t_12) { /* "pandas/src/generated.pyx":6983 * while True: * if i == nleft: * break # <<<<<<<<<<<<<< * * if j == nright: */ goto __pyx_L4_break; goto __pyx_L5; } __pyx_L5:; /* "pandas/src/generated.pyx":6985 * break * * if j == nright: # <<<<<<<<<<<<<< * indexer[i] = -1 * i += 1 */ __pyx_t_12 = ((__pyx_v_j == __pyx_v_nright) != 0); if (__pyx_t_12) { /* "pandas/src/generated.pyx":6986 * * if j == nright: * indexer[i] = -1 # <<<<<<<<<<<<<< * i += 1 * continue */ __pyx_t_1 = __pyx_v_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_1, __pyx_pybuffernd_indexer.diminfo[0].strides) = -1; /* "pandas/src/generated.pyx":6987 * if j == nright: * indexer[i] = -1 * i += 1 # <<<<<<<<<<<<<< * continue * */ __pyx_v_i = (__pyx_v_i + 1); /* "pandas/src/generated.pyx":6988 * indexer[i] = -1 * i += 1 * continue # <<<<<<<<<<<<<< * * rval = right[j] */ goto __pyx_L3_continue; goto __pyx_L6; } __pyx_L6:; /* "pandas/src/generated.pyx":6990 * continue * * rval = right[j] # <<<<<<<<<<<<<< * * while i < nleft - 1 and left[i] == rval: */ __pyx_t_13 = __pyx_v_j; __pyx_v_rval = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_right.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_right.diminfo[0].strides)); /* "pandas/src/generated.pyx":6992 * rval = right[j] * * while i < nleft - 1 and left[i] == rval: # <<<<<<<<<<<<<< * indexer[i] = j * i += 1 */ while (1) { __pyx_t_12 = ((__pyx_v_i < (__pyx_v_nleft - 1)) != 0); if (__pyx_t_12) { __pyx_t_14 = __pyx_v_i; __pyx_t_15 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_left.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_left.diminfo[0].strides)) == __pyx_v_rval) != 0); __pyx_t_16 = __pyx_t_15; } else { __pyx_t_16 = __pyx_t_12; } if (!__pyx_t_16) break; /* "pandas/src/generated.pyx":6993 * * while i < nleft - 1 and left[i] == rval: * indexer[i] = j # <<<<<<<<<<<<<< * i += 1 * */ __pyx_t_17 = __pyx_v_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_indexer.diminfo[0].strides) = __pyx_v_j; /* "pandas/src/generated.pyx":6994 * while i < nleft - 1 and left[i] == rval: * indexer[i] = j * i += 1 # <<<<<<<<<<<<<< * * if left[i] == right[j]: */ __pyx_v_i = (__pyx_v_i + 1); } /* "pandas/src/generated.pyx":6996 * i += 1 * * if left[i] == right[j]: # <<<<<<<<<<<<<< * indexer[i] = j * i += 1 */ __pyx_t_18 = __pyx_v_i; __pyx_t_19 = __pyx_v_j; __pyx_t_16 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_left.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_left.diminfo[0].strides)) == (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_right.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_right.diminfo[0].strides))) != 0); if (__pyx_t_16) { /* "pandas/src/generated.pyx":6997 * * if left[i] == right[j]: * indexer[i] = j # <<<<<<<<<<<<<< * i += 1 * while i < nleft - 1 and left[i] == rval: */ __pyx_t_20 = __pyx_v_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_indexer.diminfo[0].strides) = __pyx_v_j; /* "pandas/src/generated.pyx":6998 * if left[i] == right[j]: * indexer[i] = j * i += 1 # <<<<<<<<<<<<<< * while i < nleft - 1 and left[i] == rval: * indexer[i] = j */ __pyx_v_i = (__pyx_v_i + 1); /* "pandas/src/generated.pyx":6999 * indexer[i] = j * i += 1 * while i < nleft - 1 and left[i] == rval: # <<<<<<<<<<<<<< * indexer[i] = j * i += 1 */ while (1) { __pyx_t_16 = ((__pyx_v_i < (__pyx_v_nleft - 1)) != 0); if (__pyx_t_16) { __pyx_t_21 = __pyx_v_i; __pyx_t_12 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_left.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_left.diminfo[0].strides)) == __pyx_v_rval) != 0); __pyx_t_15 = __pyx_t_12; } else { __pyx_t_15 = __pyx_t_16; } if (!__pyx_t_15) break; /* "pandas/src/generated.pyx":7000 * i += 1 * while i < nleft - 1 and left[i] == rval: * indexer[i] = j # <<<<<<<<<<<<<< * i += 1 * j += 1 */ __pyx_t_22 = __pyx_v_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_22, __pyx_pybuffernd_indexer.diminfo[0].strides) = __pyx_v_j; /* "pandas/src/generated.pyx":7001 * while i < nleft - 1 and left[i] == rval: * indexer[i] = j * i += 1 # <<<<<<<<<<<<<< * j += 1 * elif left[i] > rval: */ __pyx_v_i = (__pyx_v_i + 1); } /* "pandas/src/generated.pyx":7002 * indexer[i] = j * i += 1 * j += 1 # <<<<<<<<<<<<<< * elif left[i] > rval: * indexer[i] = -1 */ __pyx_v_j = (__pyx_v_j + 1); goto __pyx_L9; } /* "pandas/src/generated.pyx":7003 * i += 1 * j += 1 * elif left[i] > rval: # <<<<<<<<<<<<<< * indexer[i] = -1 * j += 1 */ __pyx_t_23 = __pyx_v_i; __pyx_t_15 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_left.rcbuffer->pybuffer.buf, __pyx_t_23, __pyx_pybuffernd_left.diminfo[0].strides)) > __pyx_v_rval) != 0); if (__pyx_t_15) { /* "pandas/src/generated.pyx":7004 * j += 1 * elif left[i] > rval: * indexer[i] = -1 # <<<<<<<<<<<<<< * j += 1 * else: */ __pyx_t_24 = __pyx_v_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_24, __pyx_pybuffernd_indexer.diminfo[0].strides) = -1; /* "pandas/src/generated.pyx":7005 * elif left[i] > rval: * indexer[i] = -1 * j += 1 # <<<<<<<<<<<<<< * else: * indexer[i] = -1 */ __pyx_v_j = (__pyx_v_j + 1); goto __pyx_L9; } /*else*/ { /* "pandas/src/generated.pyx":7007 * j += 1 * else: * indexer[i] = -1 # <<<<<<<<<<<<<< * i += 1 * return indexer */ __pyx_t_25 = __pyx_v_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_25, __pyx_pybuffernd_indexer.diminfo[0].strides) = -1; /* "pandas/src/generated.pyx":7008 * else: * indexer[i] = -1 * i += 1 # <<<<<<<<<<<<<< * return indexer * */ __pyx_v_i = (__pyx_v_i + 1); } __pyx_L9:; __pyx_L3_continue:; } __pyx_L4_break:; /* "pandas/src/generated.pyx":7009 * indexer[i] = -1 * i += 1 * return indexer # <<<<<<<<<<<<<< * * @cython.wraparound(False) */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_indexer)); __pyx_r = ((PyObject *)__pyx_v_indexer); goto __pyx_L0; __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_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_left.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_right.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.left_join_indexer_unique_float64", __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_left.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_right.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_indexer); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_457left_join_indexer_unique_float32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_457left_join_indexer_unique_float32 = {__Pyx_NAMESTR("left_join_indexer_unique_float32"), (PyCFunction)__pyx_pw_6pandas_5algos_457left_join_indexer_unique_float32, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_457left_join_indexer_unique_float32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_left = 0; PyArrayObject *__pyx_v_right = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("left_join_indexer_unique_float32 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__left,&__pyx_n_s__right,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__left)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__right)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("left_join_indexer_unique_float32", 1, 2, 2, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7013; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "left_join_indexer_unique_float32") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7013; __pyx_clineno = __LINE__; goto __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_left = ((PyArrayObject *)values[0]); __pyx_v_right = ((PyArrayObject *)values[1]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("left_join_indexer_unique_float32", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7013; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.left_join_indexer_unique_float32", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_left), __pyx_ptype_5numpy_ndarray, 1, "left", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7013; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_right), __pyx_ptype_5numpy_ndarray, 1, "right", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7014; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_456left_join_indexer_unique_float32(__pyx_self, __pyx_v_left, __pyx_v_right); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":7013 * @cython.wraparound(False) * @cython.boundscheck(False) * def left_join_indexer_unique_float32(ndarray[float32_t] left, # <<<<<<<<<<<<<< * ndarray[float32_t] right): * cdef: */ static PyObject *__pyx_pf_6pandas_5algos_456left_join_indexer_unique_float32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_left, PyArrayObject *__pyx_v_right) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_nleft; Py_ssize_t __pyx_v_nright; PyArrayObject *__pyx_v_indexer = 0; __pyx_t_5numpy_float32_t __pyx_v_rval; __Pyx_LocalBuf_ND __pyx_pybuffernd_indexer; __Pyx_Buffer __pyx_pybuffer_indexer; __Pyx_LocalBuf_ND __pyx_pybuffernd_left; __Pyx_Buffer __pyx_pybuffer_left; __Pyx_LocalBuf_ND __pyx_pybuffernd_right; __Pyx_Buffer __pyx_pybuffer_right; 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; int __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; 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("left_join_indexer_unique_float32", 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_left.pybuffer.buf = NULL; __pyx_pybuffer_left.refcount = 0; __pyx_pybuffernd_left.data = NULL; __pyx_pybuffernd_left.rcbuffer = &__pyx_pybuffer_left; __pyx_pybuffer_right.pybuffer.buf = NULL; __pyx_pybuffer_right.refcount = 0; __pyx_pybuffernd_right.data = NULL; __pyx_pybuffernd_right.rcbuffer = &__pyx_pybuffer_right; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_left.rcbuffer->pybuffer, (PyObject*)__pyx_v_left, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7013; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_left.diminfo[0].strides = __pyx_pybuffernd_left.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_left.diminfo[0].shape = __pyx_pybuffernd_left.rcbuffer->pybuffer.shape[0]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_right.rcbuffer->pybuffer, (PyObject*)__pyx_v_right, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7013; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_right.diminfo[0].strides = __pyx_pybuffernd_right.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_right.diminfo[0].shape = __pyx_pybuffernd_right.rcbuffer->pybuffer.shape[0]; /* "pandas/src/generated.pyx":7020 * float32_t lval, rval * * i = 0 # <<<<<<<<<<<<<< * j = 0 * nleft = len(left) */ __pyx_v_i = 0; /* "pandas/src/generated.pyx":7021 * * i = 0 * j = 0 # <<<<<<<<<<<<<< * nleft = len(left) * nright = len(right) */ __pyx_v_j = 0; /* "pandas/src/generated.pyx":7022 * i = 0 * j = 0 * nleft = len(left) # <<<<<<<<<<<<<< * nright = len(right) * */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_left)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7022; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_nleft = __pyx_t_1; /* "pandas/src/generated.pyx":7023 * j = 0 * nleft = len(left) * nright = len(right) # <<<<<<<<<<<<<< * * indexer = np.empty(nleft, dtype=np.int64) */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_right)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7023; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_nright = __pyx_t_1; /* "pandas/src/generated.pyx":7025 * nright = len(right) * * indexer = np.empty(nleft, dtype=np.int64) # <<<<<<<<<<<<<< * while True: * if i == nleft: */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7025; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 7025; __pyx_clineno = __LINE__; goto __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_nleft); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7025; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7025; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7025; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_2)); __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7025; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s__int64); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7025; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__dtype), __pyx_t_6) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7025; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7025; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __Pyx_DECREF(((PyObject *)__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_filename = __pyx_f[2]; __pyx_lineno = 7025; __pyx_clineno = __LINE__; goto __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_int64_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_int64_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_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_filename = __pyx_f[2]; __pyx_lineno = 7025; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_7 = 0; __pyx_v_indexer = ((PyArrayObject *)__pyx_t_6); __pyx_t_6 = 0; /* "pandas/src/generated.pyx":7026 * * indexer = np.empty(nleft, dtype=np.int64) * while True: # <<<<<<<<<<<<<< * if i == nleft: * break */ while (1) { if (!1) break; /* "pandas/src/generated.pyx":7027 * indexer = np.empty(nleft, dtype=np.int64) * while True: * if i == nleft: # <<<<<<<<<<<<<< * break * */ __pyx_t_12 = ((__pyx_v_i == __pyx_v_nleft) != 0); if (__pyx_t_12) { /* "pandas/src/generated.pyx":7028 * while True: * if i == nleft: * break # <<<<<<<<<<<<<< * * if j == nright: */ goto __pyx_L4_break; goto __pyx_L5; } __pyx_L5:; /* "pandas/src/generated.pyx":7030 * break * * if j == nright: # <<<<<<<<<<<<<< * indexer[i] = -1 * i += 1 */ __pyx_t_12 = ((__pyx_v_j == __pyx_v_nright) != 0); if (__pyx_t_12) { /* "pandas/src/generated.pyx":7031 * * if j == nright: * indexer[i] = -1 # <<<<<<<<<<<<<< * i += 1 * continue */ __pyx_t_1 = __pyx_v_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_1, __pyx_pybuffernd_indexer.diminfo[0].strides) = -1; /* "pandas/src/generated.pyx":7032 * if j == nright: * indexer[i] = -1 * i += 1 # <<<<<<<<<<<<<< * continue * */ __pyx_v_i = (__pyx_v_i + 1); /* "pandas/src/generated.pyx":7033 * indexer[i] = -1 * i += 1 * continue # <<<<<<<<<<<<<< * * rval = right[j] */ goto __pyx_L3_continue; goto __pyx_L6; } __pyx_L6:; /* "pandas/src/generated.pyx":7035 * continue * * rval = right[j] # <<<<<<<<<<<<<< * * while i < nleft - 1 and left[i] == rval: */ __pyx_t_13 = __pyx_v_j; __pyx_v_rval = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_right.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_right.diminfo[0].strides)); /* "pandas/src/generated.pyx":7037 * rval = right[j] * * while i < nleft - 1 and left[i] == rval: # <<<<<<<<<<<<<< * indexer[i] = j * i += 1 */ while (1) { __pyx_t_12 = ((__pyx_v_i < (__pyx_v_nleft - 1)) != 0); if (__pyx_t_12) { __pyx_t_14 = __pyx_v_i; __pyx_t_15 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_left.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_left.diminfo[0].strides)) == __pyx_v_rval) != 0); __pyx_t_16 = __pyx_t_15; } else { __pyx_t_16 = __pyx_t_12; } if (!__pyx_t_16) break; /* "pandas/src/generated.pyx":7038 * * while i < nleft - 1 and left[i] == rval: * indexer[i] = j # <<<<<<<<<<<<<< * i += 1 * */ __pyx_t_17 = __pyx_v_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_indexer.diminfo[0].strides) = __pyx_v_j; /* "pandas/src/generated.pyx":7039 * while i < nleft - 1 and left[i] == rval: * indexer[i] = j * i += 1 # <<<<<<<<<<<<<< * * if left[i] == right[j]: */ __pyx_v_i = (__pyx_v_i + 1); } /* "pandas/src/generated.pyx":7041 * i += 1 * * if left[i] == right[j]: # <<<<<<<<<<<<<< * indexer[i] = j * i += 1 */ __pyx_t_18 = __pyx_v_i; __pyx_t_19 = __pyx_v_j; __pyx_t_16 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_left.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_left.diminfo[0].strides)) == (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_right.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_right.diminfo[0].strides))) != 0); if (__pyx_t_16) { /* "pandas/src/generated.pyx":7042 * * if left[i] == right[j]: * indexer[i] = j # <<<<<<<<<<<<<< * i += 1 * while i < nleft - 1 and left[i] == rval: */ __pyx_t_20 = __pyx_v_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_indexer.diminfo[0].strides) = __pyx_v_j; /* "pandas/src/generated.pyx":7043 * if left[i] == right[j]: * indexer[i] = j * i += 1 # <<<<<<<<<<<<<< * while i < nleft - 1 and left[i] == rval: * indexer[i] = j */ __pyx_v_i = (__pyx_v_i + 1); /* "pandas/src/generated.pyx":7044 * indexer[i] = j * i += 1 * while i < nleft - 1 and left[i] == rval: # <<<<<<<<<<<<<< * indexer[i] = j * i += 1 */ while (1) { __pyx_t_16 = ((__pyx_v_i < (__pyx_v_nleft - 1)) != 0); if (__pyx_t_16) { __pyx_t_21 = __pyx_v_i; __pyx_t_12 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_left.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_left.diminfo[0].strides)) == __pyx_v_rval) != 0); __pyx_t_15 = __pyx_t_12; } else { __pyx_t_15 = __pyx_t_16; } if (!__pyx_t_15) break; /* "pandas/src/generated.pyx":7045 * i += 1 * while i < nleft - 1 and left[i] == rval: * indexer[i] = j # <<<<<<<<<<<<<< * i += 1 * j += 1 */ __pyx_t_22 = __pyx_v_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_22, __pyx_pybuffernd_indexer.diminfo[0].strides) = __pyx_v_j; /* "pandas/src/generated.pyx":7046 * while i < nleft - 1 and left[i] == rval: * indexer[i] = j * i += 1 # <<<<<<<<<<<<<< * j += 1 * elif left[i] > rval: */ __pyx_v_i = (__pyx_v_i + 1); } /* "pandas/src/generated.pyx":7047 * indexer[i] = j * i += 1 * j += 1 # <<<<<<<<<<<<<< * elif left[i] > rval: * indexer[i] = -1 */ __pyx_v_j = (__pyx_v_j + 1); goto __pyx_L9; } /* "pandas/src/generated.pyx":7048 * i += 1 * j += 1 * elif left[i] > rval: # <<<<<<<<<<<<<< * indexer[i] = -1 * j += 1 */ __pyx_t_23 = __pyx_v_i; __pyx_t_15 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_left.rcbuffer->pybuffer.buf, __pyx_t_23, __pyx_pybuffernd_left.diminfo[0].strides)) > __pyx_v_rval) != 0); if (__pyx_t_15) { /* "pandas/src/generated.pyx":7049 * j += 1 * elif left[i] > rval: * indexer[i] = -1 # <<<<<<<<<<<<<< * j += 1 * else: */ __pyx_t_24 = __pyx_v_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_24, __pyx_pybuffernd_indexer.diminfo[0].strides) = -1; /* "pandas/src/generated.pyx":7050 * elif left[i] > rval: * indexer[i] = -1 * j += 1 # <<<<<<<<<<<<<< * else: * indexer[i] = -1 */ __pyx_v_j = (__pyx_v_j + 1); goto __pyx_L9; } /*else*/ { /* "pandas/src/generated.pyx":7052 * j += 1 * else: * indexer[i] = -1 # <<<<<<<<<<<<<< * i += 1 * return indexer */ __pyx_t_25 = __pyx_v_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_25, __pyx_pybuffernd_indexer.diminfo[0].strides) = -1; /* "pandas/src/generated.pyx":7053 * else: * indexer[i] = -1 * i += 1 # <<<<<<<<<<<<<< * return indexer * */ __pyx_v_i = (__pyx_v_i + 1); } __pyx_L9:; __pyx_L3_continue:; } __pyx_L4_break:; /* "pandas/src/generated.pyx":7054 * indexer[i] = -1 * i += 1 * return indexer # <<<<<<<<<<<<<< * * @cython.wraparound(False) */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_indexer)); __pyx_r = ((PyObject *)__pyx_v_indexer); goto __pyx_L0; __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_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_left.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_right.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.left_join_indexer_unique_float32", __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_left.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_right.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_indexer); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_459left_join_indexer_unique_object(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_459left_join_indexer_unique_object = {__Pyx_NAMESTR("left_join_indexer_unique_object"), (PyCFunction)__pyx_pw_6pandas_5algos_459left_join_indexer_unique_object, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_459left_join_indexer_unique_object(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_left = 0; PyArrayObject *__pyx_v_right = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("left_join_indexer_unique_object (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__left,&__pyx_n_s__right,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__left)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__right)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("left_join_indexer_unique_object", 1, 2, 2, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7058; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "left_join_indexer_unique_object") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7058; __pyx_clineno = __LINE__; goto __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_left = ((PyArrayObject *)values[0]); __pyx_v_right = ((PyArrayObject *)values[1]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("left_join_indexer_unique_object", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7058; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.left_join_indexer_unique_object", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_left), __pyx_ptype_5numpy_ndarray, 1, "left", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7058; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_right), __pyx_ptype_5numpy_ndarray, 1, "right", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7059; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_458left_join_indexer_unique_object(__pyx_self, __pyx_v_left, __pyx_v_right); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":7058 * @cython.wraparound(False) * @cython.boundscheck(False) * def left_join_indexer_unique_object(ndarray[object] left, # <<<<<<<<<<<<<< * ndarray[object] right): * cdef: */ static PyObject *__pyx_pf_6pandas_5algos_458left_join_indexer_unique_object(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_left, PyArrayObject *__pyx_v_right) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_nleft; Py_ssize_t __pyx_v_nright; PyArrayObject *__pyx_v_indexer = 0; PyObject *__pyx_v_rval = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_indexer; __Pyx_Buffer __pyx_pybuffer_indexer; __Pyx_LocalBuf_ND __pyx_pybuffernd_left; __Pyx_Buffer __pyx_pybuffer_left; __Pyx_LocalBuf_ND __pyx_pybuffernd_right; __Pyx_Buffer __pyx_pybuffer_right; 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; int __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; 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("left_join_indexer_unique_object", 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_left.pybuffer.buf = NULL; __pyx_pybuffer_left.refcount = 0; __pyx_pybuffernd_left.data = NULL; __pyx_pybuffernd_left.rcbuffer = &__pyx_pybuffer_left; __pyx_pybuffer_right.pybuffer.buf = NULL; __pyx_pybuffer_right.refcount = 0; __pyx_pybuffernd_right.data = NULL; __pyx_pybuffernd_right.rcbuffer = &__pyx_pybuffer_right; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_left.rcbuffer->pybuffer, (PyObject*)__pyx_v_left, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7058; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_left.diminfo[0].strides = __pyx_pybuffernd_left.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_left.diminfo[0].shape = __pyx_pybuffernd_left.rcbuffer->pybuffer.shape[0]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_right.rcbuffer->pybuffer, (PyObject*)__pyx_v_right, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7058; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_right.diminfo[0].strides = __pyx_pybuffernd_right.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_right.diminfo[0].shape = __pyx_pybuffernd_right.rcbuffer->pybuffer.shape[0]; /* "pandas/src/generated.pyx":7065 * object lval, rval * * i = 0 # <<<<<<<<<<<<<< * j = 0 * nleft = len(left) */ __pyx_v_i = 0; /* "pandas/src/generated.pyx":7066 * * i = 0 * j = 0 # <<<<<<<<<<<<<< * nleft = len(left) * nright = len(right) */ __pyx_v_j = 0; /* "pandas/src/generated.pyx":7067 * i = 0 * j = 0 * nleft = len(left) # <<<<<<<<<<<<<< * nright = len(right) * */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_left)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7067; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_nleft = __pyx_t_1; /* "pandas/src/generated.pyx":7068 * j = 0 * nleft = len(left) * nright = len(right) # <<<<<<<<<<<<<< * * indexer = np.empty(nleft, dtype=np.int64) */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_right)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7068; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_nright = __pyx_t_1; /* "pandas/src/generated.pyx":7070 * nright = len(right) * * indexer = np.empty(nleft, dtype=np.int64) # <<<<<<<<<<<<<< * while True: * if i == nleft: */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7070; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 7070; __pyx_clineno = __LINE__; goto __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_nleft); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7070; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7070; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7070; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_2)); __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7070; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s__int64); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7070; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__dtype), __pyx_t_6) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7070; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7070; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __Pyx_DECREF(((PyObject *)__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_filename = __pyx_f[2]; __pyx_lineno = 7070; __pyx_clineno = __LINE__; goto __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_int64_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_int64_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_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_filename = __pyx_f[2]; __pyx_lineno = 7070; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_7 = 0; __pyx_v_indexer = ((PyArrayObject *)__pyx_t_6); __pyx_t_6 = 0; /* "pandas/src/generated.pyx":7071 * * indexer = np.empty(nleft, dtype=np.int64) * while True: # <<<<<<<<<<<<<< * if i == nleft: * break */ while (1) { if (!1) break; /* "pandas/src/generated.pyx":7072 * indexer = np.empty(nleft, dtype=np.int64) * while True: * if i == nleft: # <<<<<<<<<<<<<< * break * */ __pyx_t_12 = ((__pyx_v_i == __pyx_v_nleft) != 0); if (__pyx_t_12) { /* "pandas/src/generated.pyx":7073 * while True: * if i == nleft: * break # <<<<<<<<<<<<<< * * if j == nright: */ goto __pyx_L4_break; goto __pyx_L5; } __pyx_L5:; /* "pandas/src/generated.pyx":7075 * break * * if j == nright: # <<<<<<<<<<<<<< * indexer[i] = -1 * i += 1 */ __pyx_t_12 = ((__pyx_v_j == __pyx_v_nright) != 0); if (__pyx_t_12) { /* "pandas/src/generated.pyx":7076 * * if j == nright: * indexer[i] = -1 # <<<<<<<<<<<<<< * i += 1 * continue */ __pyx_t_1 = __pyx_v_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_1, __pyx_pybuffernd_indexer.diminfo[0].strides) = -1; /* "pandas/src/generated.pyx":7077 * if j == nright: * indexer[i] = -1 * i += 1 # <<<<<<<<<<<<<< * continue * */ __pyx_v_i = (__pyx_v_i + 1); /* "pandas/src/generated.pyx":7078 * indexer[i] = -1 * i += 1 * continue # <<<<<<<<<<<<<< * * rval = right[j] */ goto __pyx_L3_continue; goto __pyx_L6; } __pyx_L6:; /* "pandas/src/generated.pyx":7080 * continue * * rval = right[j] # <<<<<<<<<<<<<< * * while i < nleft - 1 and left[i] == rval: */ __pyx_t_13 = __pyx_v_j; __pyx_t_6 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_right.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_right.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_6); __Pyx_XDECREF_SET(__pyx_v_rval, __pyx_t_6); __pyx_t_6 = 0; /* "pandas/src/generated.pyx":7082 * rval = right[j] * * while i < nleft - 1 and left[i] == rval: # <<<<<<<<<<<<<< * indexer[i] = j * i += 1 */ while (1) { __pyx_t_12 = (__pyx_v_i < (__pyx_v_nleft - 1)); if (__pyx_t_12) { __pyx_t_14 = __pyx_v_i; __pyx_t_6 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_left.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_left.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_6); __pyx_t_2 = PyObject_RichCompare(__pyx_t_6, __pyx_v_rval, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7082; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_15 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_15 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7082; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_16 = __pyx_t_15; } else { __pyx_t_16 = __pyx_t_12; } if (!__pyx_t_16) break; /* "pandas/src/generated.pyx":7083 * * while i < nleft - 1 and left[i] == rval: * indexer[i] = j # <<<<<<<<<<<<<< * i += 1 * */ __pyx_t_17 = __pyx_v_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_indexer.diminfo[0].strides) = __pyx_v_j; /* "pandas/src/generated.pyx":7084 * while i < nleft - 1 and left[i] == rval: * indexer[i] = j * i += 1 # <<<<<<<<<<<<<< * * if left[i] == right[j]: */ __pyx_v_i = (__pyx_v_i + 1); } /* "pandas/src/generated.pyx":7086 * i += 1 * * if left[i] == right[j]: # <<<<<<<<<<<<<< * indexer[i] = j * i += 1 */ __pyx_t_18 = __pyx_v_i; __pyx_t_2 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_left.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_left.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_2); __pyx_t_19 = __pyx_v_j; __pyx_t_6 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_right.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_right.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_6); __pyx_t_4 = PyObject_RichCompare(__pyx_t_2, __pyx_t_6, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7086; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_16 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_16 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7086; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_16) { /* "pandas/src/generated.pyx":7087 * * if left[i] == right[j]: * indexer[i] = j # <<<<<<<<<<<<<< * i += 1 * while i < nleft - 1 and left[i] == rval: */ __pyx_t_20 = __pyx_v_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_indexer.diminfo[0].strides) = __pyx_v_j; /* "pandas/src/generated.pyx":7088 * if left[i] == right[j]: * indexer[i] = j * i += 1 # <<<<<<<<<<<<<< * while i < nleft - 1 and left[i] == rval: * indexer[i] = j */ __pyx_v_i = (__pyx_v_i + 1); /* "pandas/src/generated.pyx":7089 * indexer[i] = j * i += 1 * while i < nleft - 1 and left[i] == rval: # <<<<<<<<<<<<<< * indexer[i] = j * i += 1 */ while (1) { __pyx_t_16 = (__pyx_v_i < (__pyx_v_nleft - 1)); if (__pyx_t_16) { __pyx_t_21 = __pyx_v_i; __pyx_t_4 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_left.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_left.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_4); __pyx_t_6 = PyObject_RichCompare(__pyx_t_4, __pyx_v_rval, Py_EQ); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7089; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_12 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7089; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_15 = __pyx_t_12; } else { __pyx_t_15 = __pyx_t_16; } if (!__pyx_t_15) break; /* "pandas/src/generated.pyx":7090 * i += 1 * while i < nleft - 1 and left[i] == rval: * indexer[i] = j # <<<<<<<<<<<<<< * i += 1 * j += 1 */ __pyx_t_22 = __pyx_v_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_22, __pyx_pybuffernd_indexer.diminfo[0].strides) = __pyx_v_j; /* "pandas/src/generated.pyx":7091 * while i < nleft - 1 and left[i] == rval: * indexer[i] = j * i += 1 # <<<<<<<<<<<<<< * j += 1 * elif left[i] > rval: */ __pyx_v_i = (__pyx_v_i + 1); } /* "pandas/src/generated.pyx":7092 * indexer[i] = j * i += 1 * j += 1 # <<<<<<<<<<<<<< * elif left[i] > rval: * indexer[i] = -1 */ __pyx_v_j = (__pyx_v_j + 1); goto __pyx_L9; } /* "pandas/src/generated.pyx":7093 * i += 1 * j += 1 * elif left[i] > rval: # <<<<<<<<<<<<<< * indexer[i] = -1 * j += 1 */ __pyx_t_23 = __pyx_v_i; __pyx_t_6 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_left.rcbuffer->pybuffer.buf, __pyx_t_23, __pyx_pybuffernd_left.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_6); __pyx_t_4 = PyObject_RichCompare(__pyx_t_6, __pyx_v_rval, Py_GT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7093; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_15 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_15 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7093; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_15) { /* "pandas/src/generated.pyx":7094 * j += 1 * elif left[i] > rval: * indexer[i] = -1 # <<<<<<<<<<<<<< * j += 1 * else: */ __pyx_t_24 = __pyx_v_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_24, __pyx_pybuffernd_indexer.diminfo[0].strides) = -1; /* "pandas/src/generated.pyx":7095 * elif left[i] > rval: * indexer[i] = -1 * j += 1 # <<<<<<<<<<<<<< * else: * indexer[i] = -1 */ __pyx_v_j = (__pyx_v_j + 1); goto __pyx_L9; } /*else*/ { /* "pandas/src/generated.pyx":7097 * j += 1 * else: * indexer[i] = -1 # <<<<<<<<<<<<<< * i += 1 * return indexer */ __pyx_t_25 = __pyx_v_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_25, __pyx_pybuffernd_indexer.diminfo[0].strides) = -1; /* "pandas/src/generated.pyx":7098 * else: * indexer[i] = -1 * i += 1 # <<<<<<<<<<<<<< * return indexer * */ __pyx_v_i = (__pyx_v_i + 1); } __pyx_L9:; __pyx_L3_continue:; } __pyx_L4_break:; /* "pandas/src/generated.pyx":7099 * indexer[i] = -1 * i += 1 * return indexer # <<<<<<<<<<<<<< * * @cython.wraparound(False) */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_indexer)); __pyx_r = ((PyObject *)__pyx_v_indexer); goto __pyx_L0; __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_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_left.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_right.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.left_join_indexer_unique_object", __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_left.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_right.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_indexer); __Pyx_XDECREF(__pyx_v_rval); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_461left_join_indexer_unique_int32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_461left_join_indexer_unique_int32 = {__Pyx_NAMESTR("left_join_indexer_unique_int32"), (PyCFunction)__pyx_pw_6pandas_5algos_461left_join_indexer_unique_int32, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_461left_join_indexer_unique_int32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_left = 0; PyArrayObject *__pyx_v_right = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("left_join_indexer_unique_int32 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__left,&__pyx_n_s__right,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__left)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__right)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("left_join_indexer_unique_int32", 1, 2, 2, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7103; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "left_join_indexer_unique_int32") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7103; __pyx_clineno = __LINE__; goto __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_left = ((PyArrayObject *)values[0]); __pyx_v_right = ((PyArrayObject *)values[1]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("left_join_indexer_unique_int32", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7103; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.left_join_indexer_unique_int32", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_left), __pyx_ptype_5numpy_ndarray, 1, "left", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7103; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_right), __pyx_ptype_5numpy_ndarray, 1, "right", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7104; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_460left_join_indexer_unique_int32(__pyx_self, __pyx_v_left, __pyx_v_right); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":7103 * @cython.wraparound(False) * @cython.boundscheck(False) * def left_join_indexer_unique_int32(ndarray[int32_t] left, # <<<<<<<<<<<<<< * ndarray[int32_t] right): * cdef: */ static PyObject *__pyx_pf_6pandas_5algos_460left_join_indexer_unique_int32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_left, PyArrayObject *__pyx_v_right) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_nleft; Py_ssize_t __pyx_v_nright; PyArrayObject *__pyx_v_indexer = 0; __pyx_t_5numpy_int32_t __pyx_v_rval; __Pyx_LocalBuf_ND __pyx_pybuffernd_indexer; __Pyx_Buffer __pyx_pybuffer_indexer; __Pyx_LocalBuf_ND __pyx_pybuffernd_left; __Pyx_Buffer __pyx_pybuffer_left; __Pyx_LocalBuf_ND __pyx_pybuffernd_right; __Pyx_Buffer __pyx_pybuffer_right; 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; int __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; 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("left_join_indexer_unique_int32", 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_left.pybuffer.buf = NULL; __pyx_pybuffer_left.refcount = 0; __pyx_pybuffernd_left.data = NULL; __pyx_pybuffernd_left.rcbuffer = &__pyx_pybuffer_left; __pyx_pybuffer_right.pybuffer.buf = NULL; __pyx_pybuffer_right.refcount = 0; __pyx_pybuffernd_right.data = NULL; __pyx_pybuffernd_right.rcbuffer = &__pyx_pybuffer_right; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_left.rcbuffer->pybuffer, (PyObject*)__pyx_v_left, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7103; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_left.diminfo[0].strides = __pyx_pybuffernd_left.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_left.diminfo[0].shape = __pyx_pybuffernd_left.rcbuffer->pybuffer.shape[0]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_right.rcbuffer->pybuffer, (PyObject*)__pyx_v_right, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7103; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_right.diminfo[0].strides = __pyx_pybuffernd_right.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_right.diminfo[0].shape = __pyx_pybuffernd_right.rcbuffer->pybuffer.shape[0]; /* "pandas/src/generated.pyx":7110 * int32_t lval, rval * * i = 0 # <<<<<<<<<<<<<< * j = 0 * nleft = len(left) */ __pyx_v_i = 0; /* "pandas/src/generated.pyx":7111 * * i = 0 * j = 0 # <<<<<<<<<<<<<< * nleft = len(left) * nright = len(right) */ __pyx_v_j = 0; /* "pandas/src/generated.pyx":7112 * i = 0 * j = 0 * nleft = len(left) # <<<<<<<<<<<<<< * nright = len(right) * */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_left)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7112; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_nleft = __pyx_t_1; /* "pandas/src/generated.pyx":7113 * j = 0 * nleft = len(left) * nright = len(right) # <<<<<<<<<<<<<< * * indexer = np.empty(nleft, dtype=np.int64) */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_right)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7113; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_nright = __pyx_t_1; /* "pandas/src/generated.pyx":7115 * nright = len(right) * * indexer = np.empty(nleft, dtype=np.int64) # <<<<<<<<<<<<<< * while True: * if i == nleft: */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7115; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 7115; __pyx_clineno = __LINE__; goto __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_nleft); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7115; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7115; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7115; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_2)); __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7115; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s__int64); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7115; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__dtype), __pyx_t_6) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7115; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7115; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __Pyx_DECREF(((PyObject *)__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_filename = __pyx_f[2]; __pyx_lineno = 7115; __pyx_clineno = __LINE__; goto __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_int64_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_int64_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_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_filename = __pyx_f[2]; __pyx_lineno = 7115; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_7 = 0; __pyx_v_indexer = ((PyArrayObject *)__pyx_t_6); __pyx_t_6 = 0; /* "pandas/src/generated.pyx":7116 * * indexer = np.empty(nleft, dtype=np.int64) * while True: # <<<<<<<<<<<<<< * if i == nleft: * break */ while (1) { if (!1) break; /* "pandas/src/generated.pyx":7117 * indexer = np.empty(nleft, dtype=np.int64) * while True: * if i == nleft: # <<<<<<<<<<<<<< * break * */ __pyx_t_12 = ((__pyx_v_i == __pyx_v_nleft) != 0); if (__pyx_t_12) { /* "pandas/src/generated.pyx":7118 * while True: * if i == nleft: * break # <<<<<<<<<<<<<< * * if j == nright: */ goto __pyx_L4_break; goto __pyx_L5; } __pyx_L5:; /* "pandas/src/generated.pyx":7120 * break * * if j == nright: # <<<<<<<<<<<<<< * indexer[i] = -1 * i += 1 */ __pyx_t_12 = ((__pyx_v_j == __pyx_v_nright) != 0); if (__pyx_t_12) { /* "pandas/src/generated.pyx":7121 * * if j == nright: * indexer[i] = -1 # <<<<<<<<<<<<<< * i += 1 * continue */ __pyx_t_1 = __pyx_v_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_1, __pyx_pybuffernd_indexer.diminfo[0].strides) = -1; /* "pandas/src/generated.pyx":7122 * if j == nright: * indexer[i] = -1 * i += 1 # <<<<<<<<<<<<<< * continue * */ __pyx_v_i = (__pyx_v_i + 1); /* "pandas/src/generated.pyx":7123 * indexer[i] = -1 * i += 1 * continue # <<<<<<<<<<<<<< * * rval = right[j] */ goto __pyx_L3_continue; goto __pyx_L6; } __pyx_L6:; /* "pandas/src/generated.pyx":7125 * continue * * rval = right[j] # <<<<<<<<<<<<<< * * while i < nleft - 1 and left[i] == rval: */ __pyx_t_13 = __pyx_v_j; __pyx_v_rval = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_right.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_right.diminfo[0].strides)); /* "pandas/src/generated.pyx":7127 * rval = right[j] * * while i < nleft - 1 and left[i] == rval: # <<<<<<<<<<<<<< * indexer[i] = j * i += 1 */ while (1) { __pyx_t_12 = ((__pyx_v_i < (__pyx_v_nleft - 1)) != 0); if (__pyx_t_12) { __pyx_t_14 = __pyx_v_i; __pyx_t_15 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_left.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_left.diminfo[0].strides)) == __pyx_v_rval) != 0); __pyx_t_16 = __pyx_t_15; } else { __pyx_t_16 = __pyx_t_12; } if (!__pyx_t_16) break; /* "pandas/src/generated.pyx":7128 * * while i < nleft - 1 and left[i] == rval: * indexer[i] = j # <<<<<<<<<<<<<< * i += 1 * */ __pyx_t_17 = __pyx_v_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_indexer.diminfo[0].strides) = __pyx_v_j; /* "pandas/src/generated.pyx":7129 * while i < nleft - 1 and left[i] == rval: * indexer[i] = j * i += 1 # <<<<<<<<<<<<<< * * if left[i] == right[j]: */ __pyx_v_i = (__pyx_v_i + 1); } /* "pandas/src/generated.pyx":7131 * i += 1 * * if left[i] == right[j]: # <<<<<<<<<<<<<< * indexer[i] = j * i += 1 */ __pyx_t_18 = __pyx_v_i; __pyx_t_19 = __pyx_v_j; __pyx_t_16 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_left.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_left.diminfo[0].strides)) == (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_right.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_right.diminfo[0].strides))) != 0); if (__pyx_t_16) { /* "pandas/src/generated.pyx":7132 * * if left[i] == right[j]: * indexer[i] = j # <<<<<<<<<<<<<< * i += 1 * while i < nleft - 1 and left[i] == rval: */ __pyx_t_20 = __pyx_v_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_indexer.diminfo[0].strides) = __pyx_v_j; /* "pandas/src/generated.pyx":7133 * if left[i] == right[j]: * indexer[i] = j * i += 1 # <<<<<<<<<<<<<< * while i < nleft - 1 and left[i] == rval: * indexer[i] = j */ __pyx_v_i = (__pyx_v_i + 1); /* "pandas/src/generated.pyx":7134 * indexer[i] = j * i += 1 * while i < nleft - 1 and left[i] == rval: # <<<<<<<<<<<<<< * indexer[i] = j * i += 1 */ while (1) { __pyx_t_16 = ((__pyx_v_i < (__pyx_v_nleft - 1)) != 0); if (__pyx_t_16) { __pyx_t_21 = __pyx_v_i; __pyx_t_12 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_left.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_left.diminfo[0].strides)) == __pyx_v_rval) != 0); __pyx_t_15 = __pyx_t_12; } else { __pyx_t_15 = __pyx_t_16; } if (!__pyx_t_15) break; /* "pandas/src/generated.pyx":7135 * i += 1 * while i < nleft - 1 and left[i] == rval: * indexer[i] = j # <<<<<<<<<<<<<< * i += 1 * j += 1 */ __pyx_t_22 = __pyx_v_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_22, __pyx_pybuffernd_indexer.diminfo[0].strides) = __pyx_v_j; /* "pandas/src/generated.pyx":7136 * while i < nleft - 1 and left[i] == rval: * indexer[i] = j * i += 1 # <<<<<<<<<<<<<< * j += 1 * elif left[i] > rval: */ __pyx_v_i = (__pyx_v_i + 1); } /* "pandas/src/generated.pyx":7137 * indexer[i] = j * i += 1 * j += 1 # <<<<<<<<<<<<<< * elif left[i] > rval: * indexer[i] = -1 */ __pyx_v_j = (__pyx_v_j + 1); goto __pyx_L9; } /* "pandas/src/generated.pyx":7138 * i += 1 * j += 1 * elif left[i] > rval: # <<<<<<<<<<<<<< * indexer[i] = -1 * j += 1 */ __pyx_t_23 = __pyx_v_i; __pyx_t_15 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_left.rcbuffer->pybuffer.buf, __pyx_t_23, __pyx_pybuffernd_left.diminfo[0].strides)) > __pyx_v_rval) != 0); if (__pyx_t_15) { /* "pandas/src/generated.pyx":7139 * j += 1 * elif left[i] > rval: * indexer[i] = -1 # <<<<<<<<<<<<<< * j += 1 * else: */ __pyx_t_24 = __pyx_v_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_24, __pyx_pybuffernd_indexer.diminfo[0].strides) = -1; /* "pandas/src/generated.pyx":7140 * elif left[i] > rval: * indexer[i] = -1 * j += 1 # <<<<<<<<<<<<<< * else: * indexer[i] = -1 */ __pyx_v_j = (__pyx_v_j + 1); goto __pyx_L9; } /*else*/ { /* "pandas/src/generated.pyx":7142 * j += 1 * else: * indexer[i] = -1 # <<<<<<<<<<<<<< * i += 1 * return indexer */ __pyx_t_25 = __pyx_v_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_25, __pyx_pybuffernd_indexer.diminfo[0].strides) = -1; /* "pandas/src/generated.pyx":7143 * else: * indexer[i] = -1 * i += 1 # <<<<<<<<<<<<<< * return indexer * */ __pyx_v_i = (__pyx_v_i + 1); } __pyx_L9:; __pyx_L3_continue:; } __pyx_L4_break:; /* "pandas/src/generated.pyx":7144 * indexer[i] = -1 * i += 1 * return indexer # <<<<<<<<<<<<<< * * @cython.wraparound(False) */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_indexer)); __pyx_r = ((PyObject *)__pyx_v_indexer); goto __pyx_L0; __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_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_left.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_right.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.left_join_indexer_unique_int32", __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_left.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_right.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_indexer); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_463left_join_indexer_unique_int64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_463left_join_indexer_unique_int64 = {__Pyx_NAMESTR("left_join_indexer_unique_int64"), (PyCFunction)__pyx_pw_6pandas_5algos_463left_join_indexer_unique_int64, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_463left_join_indexer_unique_int64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_left = 0; PyArrayObject *__pyx_v_right = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("left_join_indexer_unique_int64 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__left,&__pyx_n_s__right,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__left)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__right)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("left_join_indexer_unique_int64", 1, 2, 2, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7148; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "left_join_indexer_unique_int64") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7148; __pyx_clineno = __LINE__; goto __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_left = ((PyArrayObject *)values[0]); __pyx_v_right = ((PyArrayObject *)values[1]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("left_join_indexer_unique_int64", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7148; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.left_join_indexer_unique_int64", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_left), __pyx_ptype_5numpy_ndarray, 1, "left", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7148; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_right), __pyx_ptype_5numpy_ndarray, 1, "right", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7149; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_462left_join_indexer_unique_int64(__pyx_self, __pyx_v_left, __pyx_v_right); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":7148 * @cython.wraparound(False) * @cython.boundscheck(False) * def left_join_indexer_unique_int64(ndarray[int64_t] left, # <<<<<<<<<<<<<< * ndarray[int64_t] right): * cdef: */ static PyObject *__pyx_pf_6pandas_5algos_462left_join_indexer_unique_int64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_left, PyArrayObject *__pyx_v_right) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_nleft; Py_ssize_t __pyx_v_nright; PyArrayObject *__pyx_v_indexer = 0; __pyx_t_5numpy_int64_t __pyx_v_rval; __Pyx_LocalBuf_ND __pyx_pybuffernd_indexer; __Pyx_Buffer __pyx_pybuffer_indexer; __Pyx_LocalBuf_ND __pyx_pybuffernd_left; __Pyx_Buffer __pyx_pybuffer_left; __Pyx_LocalBuf_ND __pyx_pybuffernd_right; __Pyx_Buffer __pyx_pybuffer_right; 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; int __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; 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("left_join_indexer_unique_int64", 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_left.pybuffer.buf = NULL; __pyx_pybuffer_left.refcount = 0; __pyx_pybuffernd_left.data = NULL; __pyx_pybuffernd_left.rcbuffer = &__pyx_pybuffer_left; __pyx_pybuffer_right.pybuffer.buf = NULL; __pyx_pybuffer_right.refcount = 0; __pyx_pybuffernd_right.data = NULL; __pyx_pybuffernd_right.rcbuffer = &__pyx_pybuffer_right; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_left.rcbuffer->pybuffer, (PyObject*)__pyx_v_left, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7148; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_left.diminfo[0].strides = __pyx_pybuffernd_left.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_left.diminfo[0].shape = __pyx_pybuffernd_left.rcbuffer->pybuffer.shape[0]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_right.rcbuffer->pybuffer, (PyObject*)__pyx_v_right, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7148; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_right.diminfo[0].strides = __pyx_pybuffernd_right.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_right.diminfo[0].shape = __pyx_pybuffernd_right.rcbuffer->pybuffer.shape[0]; /* "pandas/src/generated.pyx":7155 * int64_t lval, rval * * i = 0 # <<<<<<<<<<<<<< * j = 0 * nleft = len(left) */ __pyx_v_i = 0; /* "pandas/src/generated.pyx":7156 * * i = 0 * j = 0 # <<<<<<<<<<<<<< * nleft = len(left) * nright = len(right) */ __pyx_v_j = 0; /* "pandas/src/generated.pyx":7157 * i = 0 * j = 0 * nleft = len(left) # <<<<<<<<<<<<<< * nright = len(right) * */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_left)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7157; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_nleft = __pyx_t_1; /* "pandas/src/generated.pyx":7158 * j = 0 * nleft = len(left) * nright = len(right) # <<<<<<<<<<<<<< * * indexer = np.empty(nleft, dtype=np.int64) */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_right)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7158; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_nright = __pyx_t_1; /* "pandas/src/generated.pyx":7160 * nright = len(right) * * indexer = np.empty(nleft, dtype=np.int64) # <<<<<<<<<<<<<< * while True: * if i == nleft: */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7160; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 7160; __pyx_clineno = __LINE__; goto __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_nleft); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7160; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7160; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7160; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_2)); __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7160; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s__int64); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7160; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__dtype), __pyx_t_6) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7160; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7160; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __Pyx_DECREF(((PyObject *)__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_filename = __pyx_f[2]; __pyx_lineno = 7160; __pyx_clineno = __LINE__; goto __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_int64_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_int64_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_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_filename = __pyx_f[2]; __pyx_lineno = 7160; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_7 = 0; __pyx_v_indexer = ((PyArrayObject *)__pyx_t_6); __pyx_t_6 = 0; /* "pandas/src/generated.pyx":7161 * * indexer = np.empty(nleft, dtype=np.int64) * while True: # <<<<<<<<<<<<<< * if i == nleft: * break */ while (1) { if (!1) break; /* "pandas/src/generated.pyx":7162 * indexer = np.empty(nleft, dtype=np.int64) * while True: * if i == nleft: # <<<<<<<<<<<<<< * break * */ __pyx_t_12 = ((__pyx_v_i == __pyx_v_nleft) != 0); if (__pyx_t_12) { /* "pandas/src/generated.pyx":7163 * while True: * if i == nleft: * break # <<<<<<<<<<<<<< * * if j == nright: */ goto __pyx_L4_break; goto __pyx_L5; } __pyx_L5:; /* "pandas/src/generated.pyx":7165 * break * * if j == nright: # <<<<<<<<<<<<<< * indexer[i] = -1 * i += 1 */ __pyx_t_12 = ((__pyx_v_j == __pyx_v_nright) != 0); if (__pyx_t_12) { /* "pandas/src/generated.pyx":7166 * * if j == nright: * indexer[i] = -1 # <<<<<<<<<<<<<< * i += 1 * continue */ __pyx_t_1 = __pyx_v_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_1, __pyx_pybuffernd_indexer.diminfo[0].strides) = -1; /* "pandas/src/generated.pyx":7167 * if j == nright: * indexer[i] = -1 * i += 1 # <<<<<<<<<<<<<< * continue * */ __pyx_v_i = (__pyx_v_i + 1); /* "pandas/src/generated.pyx":7168 * indexer[i] = -1 * i += 1 * continue # <<<<<<<<<<<<<< * * rval = right[j] */ goto __pyx_L3_continue; goto __pyx_L6; } __pyx_L6:; /* "pandas/src/generated.pyx":7170 * continue * * rval = right[j] # <<<<<<<<<<<<<< * * while i < nleft - 1 and left[i] == rval: */ __pyx_t_13 = __pyx_v_j; __pyx_v_rval = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_right.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_right.diminfo[0].strides)); /* "pandas/src/generated.pyx":7172 * rval = right[j] * * while i < nleft - 1 and left[i] == rval: # <<<<<<<<<<<<<< * indexer[i] = j * i += 1 */ while (1) { __pyx_t_12 = ((__pyx_v_i < (__pyx_v_nleft - 1)) != 0); if (__pyx_t_12) { __pyx_t_14 = __pyx_v_i; __pyx_t_15 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_left.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_left.diminfo[0].strides)) == __pyx_v_rval) != 0); __pyx_t_16 = __pyx_t_15; } else { __pyx_t_16 = __pyx_t_12; } if (!__pyx_t_16) break; /* "pandas/src/generated.pyx":7173 * * while i < nleft - 1 and left[i] == rval: * indexer[i] = j # <<<<<<<<<<<<<< * i += 1 * */ __pyx_t_17 = __pyx_v_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_indexer.diminfo[0].strides) = __pyx_v_j; /* "pandas/src/generated.pyx":7174 * while i < nleft - 1 and left[i] == rval: * indexer[i] = j * i += 1 # <<<<<<<<<<<<<< * * if left[i] == right[j]: */ __pyx_v_i = (__pyx_v_i + 1); } /* "pandas/src/generated.pyx":7176 * i += 1 * * if left[i] == right[j]: # <<<<<<<<<<<<<< * indexer[i] = j * i += 1 */ __pyx_t_18 = __pyx_v_i; __pyx_t_19 = __pyx_v_j; __pyx_t_16 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_left.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_left.diminfo[0].strides)) == (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_right.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_right.diminfo[0].strides))) != 0); if (__pyx_t_16) { /* "pandas/src/generated.pyx":7177 * * if left[i] == right[j]: * indexer[i] = j # <<<<<<<<<<<<<< * i += 1 * while i < nleft - 1 and left[i] == rval: */ __pyx_t_20 = __pyx_v_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_indexer.diminfo[0].strides) = __pyx_v_j; /* "pandas/src/generated.pyx":7178 * if left[i] == right[j]: * indexer[i] = j * i += 1 # <<<<<<<<<<<<<< * while i < nleft - 1 and left[i] == rval: * indexer[i] = j */ __pyx_v_i = (__pyx_v_i + 1); /* "pandas/src/generated.pyx":7179 * indexer[i] = j * i += 1 * while i < nleft - 1 and left[i] == rval: # <<<<<<<<<<<<<< * indexer[i] = j * i += 1 */ while (1) { __pyx_t_16 = ((__pyx_v_i < (__pyx_v_nleft - 1)) != 0); if (__pyx_t_16) { __pyx_t_21 = __pyx_v_i; __pyx_t_12 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_left.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_left.diminfo[0].strides)) == __pyx_v_rval) != 0); __pyx_t_15 = __pyx_t_12; } else { __pyx_t_15 = __pyx_t_16; } if (!__pyx_t_15) break; /* "pandas/src/generated.pyx":7180 * i += 1 * while i < nleft - 1 and left[i] == rval: * indexer[i] = j # <<<<<<<<<<<<<< * i += 1 * j += 1 */ __pyx_t_22 = __pyx_v_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_22, __pyx_pybuffernd_indexer.diminfo[0].strides) = __pyx_v_j; /* "pandas/src/generated.pyx":7181 * while i < nleft - 1 and left[i] == rval: * indexer[i] = j * i += 1 # <<<<<<<<<<<<<< * j += 1 * elif left[i] > rval: */ __pyx_v_i = (__pyx_v_i + 1); } /* "pandas/src/generated.pyx":7182 * indexer[i] = j * i += 1 * j += 1 # <<<<<<<<<<<<<< * elif left[i] > rval: * indexer[i] = -1 */ __pyx_v_j = (__pyx_v_j + 1); goto __pyx_L9; } /* "pandas/src/generated.pyx":7183 * i += 1 * j += 1 * elif left[i] > rval: # <<<<<<<<<<<<<< * indexer[i] = -1 * j += 1 */ __pyx_t_23 = __pyx_v_i; __pyx_t_15 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_left.rcbuffer->pybuffer.buf, __pyx_t_23, __pyx_pybuffernd_left.diminfo[0].strides)) > __pyx_v_rval) != 0); if (__pyx_t_15) { /* "pandas/src/generated.pyx":7184 * j += 1 * elif left[i] > rval: * indexer[i] = -1 # <<<<<<<<<<<<<< * j += 1 * else: */ __pyx_t_24 = __pyx_v_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_24, __pyx_pybuffernd_indexer.diminfo[0].strides) = -1; /* "pandas/src/generated.pyx":7185 * elif left[i] > rval: * indexer[i] = -1 * j += 1 # <<<<<<<<<<<<<< * else: * indexer[i] = -1 */ __pyx_v_j = (__pyx_v_j + 1); goto __pyx_L9; } /*else*/ { /* "pandas/src/generated.pyx":7187 * j += 1 * else: * indexer[i] = -1 # <<<<<<<<<<<<<< * i += 1 * return indexer */ __pyx_t_25 = __pyx_v_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_25, __pyx_pybuffernd_indexer.diminfo[0].strides) = -1; /* "pandas/src/generated.pyx":7188 * else: * indexer[i] = -1 * i += 1 # <<<<<<<<<<<<<< * return indexer * */ __pyx_v_i = (__pyx_v_i + 1); } __pyx_L9:; __pyx_L3_continue:; } __pyx_L4_break:; /* "pandas/src/generated.pyx":7189 * indexer[i] = -1 * i += 1 * return indexer # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_indexer)); __pyx_r = ((PyObject *)__pyx_v_indexer); goto __pyx_L0; __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_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_left.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_right.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.left_join_indexer_unique_int64", __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_left.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_right.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_indexer); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_465left_join_indexer_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6pandas_5algos_464left_join_indexer_float64[] = "\n Two-pass algorithm for monotonic indexes. Handles many-to-one merges\n "; static PyMethodDef __pyx_mdef_6pandas_5algos_465left_join_indexer_float64 = {__Pyx_NAMESTR("left_join_indexer_float64"), (PyCFunction)__pyx_pw_6pandas_5algos_465left_join_indexer_float64, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_5algos_464left_join_indexer_float64)}; static PyObject *__pyx_pw_6pandas_5algos_465left_join_indexer_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_left = 0; PyArrayObject *__pyx_v_right = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("left_join_indexer_float64 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__left,&__pyx_n_s__right,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__left)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__right)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("left_join_indexer_float64", 1, 2, 2, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7193; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "left_join_indexer_float64") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7193; __pyx_clineno = __LINE__; goto __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_left = ((PyArrayObject *)values[0]); __pyx_v_right = ((PyArrayObject *)values[1]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("left_join_indexer_float64", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7193; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.left_join_indexer_float64", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_left), __pyx_ptype_5numpy_ndarray, 1, "left", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7193; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_right), __pyx_ptype_5numpy_ndarray, 1, "right", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7194; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_464left_join_indexer_float64(__pyx_self, __pyx_v_left, __pyx_v_right); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":7193 * * * def left_join_indexer_float64(ndarray[float64_t] left, # <<<<<<<<<<<<<< * ndarray[float64_t] right): * ''' */ static PyObject *__pyx_pf_6pandas_5algos_464left_join_indexer_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_left, PyArrayObject *__pyx_v_right) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_nright; Py_ssize_t __pyx_v_nleft; Py_ssize_t __pyx_v_count; __pyx_t_5numpy_float64_t __pyx_v_lval; __pyx_t_5numpy_float64_t __pyx_v_rval; PyArrayObject *__pyx_v_lindexer = 0; PyArrayObject *__pyx_v_rindexer = 0; PyArrayObject *__pyx_v_result = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_left; __Pyx_Buffer __pyx_pybuffer_left; __Pyx_LocalBuf_ND __pyx_pybuffernd_lindexer; __Pyx_Buffer __pyx_pybuffer_lindexer; __Pyx_LocalBuf_ND __pyx_pybuffernd_result; __Pyx_Buffer __pyx_pybuffer_result; __Pyx_LocalBuf_ND __pyx_pybuffernd_right; __Pyx_Buffer __pyx_pybuffer_right; __Pyx_LocalBuf_ND __pyx_pybuffernd_rindexer; __Pyx_Buffer __pyx_pybuffer_rindexer; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; int __pyx_t_2; int __pyx_t_3; Py_ssize_t __pyx_t_4; Py_ssize_t __pyx_t_5; int __pyx_t_6; int __pyx_t_7; Py_ssize_t __pyx_t_8; Py_ssize_t __pyx_t_9; PyObject *__pyx_t_10 = NULL; PyObject *__pyx_t_11 = NULL; PyObject *__pyx_t_12 = NULL; PyObject *__pyx_t_13 = NULL; PyObject *__pyx_t_14 = NULL; PyArrayObject *__pyx_t_15 = NULL; PyObject *__pyx_t_16 = NULL; PyObject *__pyx_t_17 = NULL; PyObject *__pyx_t_18 = NULL; PyArrayObject *__pyx_t_19 = NULL; 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("left_join_indexer_float64", 0); __pyx_pybuffer_lindexer.pybuffer.buf = NULL; __pyx_pybuffer_lindexer.refcount = 0; __pyx_pybuffernd_lindexer.data = NULL; __pyx_pybuffernd_lindexer.rcbuffer = &__pyx_pybuffer_lindexer; __pyx_pybuffer_rindexer.pybuffer.buf = NULL; __pyx_pybuffer_rindexer.refcount = 0; __pyx_pybuffernd_rindexer.data = NULL; __pyx_pybuffernd_rindexer.rcbuffer = &__pyx_pybuffer_rindexer; __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_left.pybuffer.buf = NULL; __pyx_pybuffer_left.refcount = 0; __pyx_pybuffernd_left.data = NULL; __pyx_pybuffernd_left.rcbuffer = &__pyx_pybuffer_left; __pyx_pybuffer_right.pybuffer.buf = NULL; __pyx_pybuffer_right.refcount = 0; __pyx_pybuffernd_right.data = NULL; __pyx_pybuffernd_right.rcbuffer = &__pyx_pybuffer_right; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_left.rcbuffer->pybuffer, (PyObject*)__pyx_v_left, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7193; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_left.diminfo[0].strides = __pyx_pybuffernd_left.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_left.diminfo[0].shape = __pyx_pybuffernd_left.rcbuffer->pybuffer.shape[0]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_right.rcbuffer->pybuffer, (PyObject*)__pyx_v_right, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7193; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_right.diminfo[0].strides = __pyx_pybuffernd_right.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_right.diminfo[0].shape = __pyx_pybuffernd_right.rcbuffer->pybuffer.shape[0]; /* "pandas/src/generated.pyx":7204 * ndarray[float64_t] result * * nleft = len(left) # <<<<<<<<<<<<<< * nright = len(right) * */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_left)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7204; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_nleft = __pyx_t_1; /* "pandas/src/generated.pyx":7205 * * nleft = len(left) * nright = len(right) # <<<<<<<<<<<<<< * * i = 0 */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_right)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7205; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_nright = __pyx_t_1; /* "pandas/src/generated.pyx":7207 * nright = len(right) * * i = 0 # <<<<<<<<<<<<<< * j = 0 * count = 0 */ __pyx_v_i = 0; /* "pandas/src/generated.pyx":7208 * * i = 0 * j = 0 # <<<<<<<<<<<<<< * count = 0 * if nleft > 0: */ __pyx_v_j = 0; /* "pandas/src/generated.pyx":7209 * i = 0 * j = 0 * count = 0 # <<<<<<<<<<<<<< * if nleft > 0: * while i < nleft: */ __pyx_v_count = 0; /* "pandas/src/generated.pyx":7210 * j = 0 * count = 0 * if nleft > 0: # <<<<<<<<<<<<<< * while i < nleft: * if j == nright: */ __pyx_t_2 = ((__pyx_v_nleft > 0) != 0); if (__pyx_t_2) { /* "pandas/src/generated.pyx":7211 * count = 0 * if nleft > 0: * while i < nleft: # <<<<<<<<<<<<<< * if j == nright: * count += nleft - i */ while (1) { __pyx_t_2 = ((__pyx_v_i < __pyx_v_nleft) != 0); if (!__pyx_t_2) break; /* "pandas/src/generated.pyx":7212 * if nleft > 0: * while i < nleft: * if j == nright: # <<<<<<<<<<<<<< * count += nleft - i * break */ __pyx_t_2 = ((__pyx_v_j == __pyx_v_nright) != 0); if (__pyx_t_2) { /* "pandas/src/generated.pyx":7213 * while i < nleft: * if j == nright: * count += nleft - i # <<<<<<<<<<<<<< * break * */ __pyx_v_count = (__pyx_v_count + (__pyx_v_nleft - __pyx_v_i)); /* "pandas/src/generated.pyx":7214 * if j == nright: * count += nleft - i * break # <<<<<<<<<<<<<< * * lval = left[i] */ goto __pyx_L5_break; goto __pyx_L6; } __pyx_L6:; /* "pandas/src/generated.pyx":7216 * break * * lval = left[i] # <<<<<<<<<<<<<< * rval = right[j] * */ __pyx_t_1 = __pyx_v_i; __pyx_t_3 = -1; if (__pyx_t_1 < 0) { __pyx_t_1 += __pyx_pybuffernd_left.diminfo[0].shape; if (unlikely(__pyx_t_1 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_1 >= __pyx_pybuffernd_left.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7216; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_lval = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_left.rcbuffer->pybuffer.buf, __pyx_t_1, __pyx_pybuffernd_left.diminfo[0].strides)); /* "pandas/src/generated.pyx":7217 * * lval = left[i] * rval = right[j] # <<<<<<<<<<<<<< * * if lval == rval: */ __pyx_t_4 = __pyx_v_j; __pyx_t_3 = -1; if (__pyx_t_4 < 0) { __pyx_t_4 += __pyx_pybuffernd_right.diminfo[0].shape; if (unlikely(__pyx_t_4 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_4 >= __pyx_pybuffernd_right.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7217; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_rval = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_right.rcbuffer->pybuffer.buf, __pyx_t_4, __pyx_pybuffernd_right.diminfo[0].strides)); /* "pandas/src/generated.pyx":7219 * rval = right[j] * * if lval == rval: # <<<<<<<<<<<<<< * count += 1 * if i < nleft - 1: */ __pyx_t_2 = ((__pyx_v_lval == __pyx_v_rval) != 0); if (__pyx_t_2) { /* "pandas/src/generated.pyx":7220 * * if lval == rval: * count += 1 # <<<<<<<<<<<<<< * if i < nleft - 1: * if j < nright - 1 and right[j + 1] == rval: */ __pyx_v_count = (__pyx_v_count + 1); /* "pandas/src/generated.pyx":7221 * if lval == rval: * count += 1 * if i < nleft - 1: # <<<<<<<<<<<<<< * if j < nright - 1 and right[j + 1] == rval: * j += 1 */ __pyx_t_2 = ((__pyx_v_i < (__pyx_v_nleft - 1)) != 0); if (__pyx_t_2) { /* "pandas/src/generated.pyx":7222 * count += 1 * if i < nleft - 1: * if j < nright - 1 and right[j + 1] == rval: # <<<<<<<<<<<<<< * j += 1 * else: */ __pyx_t_2 = ((__pyx_v_j < (__pyx_v_nright - 1)) != 0); if (__pyx_t_2) { __pyx_t_5 = (__pyx_v_j + 1); __pyx_t_3 = -1; if (__pyx_t_5 < 0) { __pyx_t_5 += __pyx_pybuffernd_right.diminfo[0].shape; if (unlikely(__pyx_t_5 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_5 >= __pyx_pybuffernd_right.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7222; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_6 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_right.rcbuffer->pybuffer.buf, __pyx_t_5, __pyx_pybuffernd_right.diminfo[0].strides)) == __pyx_v_rval) != 0); __pyx_t_7 = __pyx_t_6; } else { __pyx_t_7 = __pyx_t_2; } if (__pyx_t_7) { /* "pandas/src/generated.pyx":7223 * if i < nleft - 1: * if j < nright - 1 and right[j + 1] == rval: * j += 1 # <<<<<<<<<<<<<< * else: * i += 1 */ __pyx_v_j = (__pyx_v_j + 1); goto __pyx_L9; } /*else*/ { /* "pandas/src/generated.pyx":7225 * j += 1 * else: * i += 1 # <<<<<<<<<<<<<< * if left[i] != rval: * j += 1 */ __pyx_v_i = (__pyx_v_i + 1); /* "pandas/src/generated.pyx":7226 * else: * i += 1 * if left[i] != rval: # <<<<<<<<<<<<<< * j += 1 * elif j < nright - 1: */ __pyx_t_8 = __pyx_v_i; __pyx_t_3 = -1; if (__pyx_t_8 < 0) { __pyx_t_8 += __pyx_pybuffernd_left.diminfo[0].shape; if (unlikely(__pyx_t_8 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_8 >= __pyx_pybuffernd_left.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7226; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_7 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_left.rcbuffer->pybuffer.buf, __pyx_t_8, __pyx_pybuffernd_left.diminfo[0].strides)) != __pyx_v_rval) != 0); if (__pyx_t_7) { /* "pandas/src/generated.pyx":7227 * i += 1 * if left[i] != rval: * j += 1 # <<<<<<<<<<<<<< * elif j < nright - 1: * j += 1 */ __pyx_v_j = (__pyx_v_j + 1); goto __pyx_L10; } __pyx_L10:; } __pyx_L9:; goto __pyx_L8; } /* "pandas/src/generated.pyx":7228 * if left[i] != rval: * j += 1 * elif j < nright - 1: # <<<<<<<<<<<<<< * j += 1 * if lval != right[j]: */ __pyx_t_7 = ((__pyx_v_j < (__pyx_v_nright - 1)) != 0); if (__pyx_t_7) { /* "pandas/src/generated.pyx":7229 * j += 1 * elif j < nright - 1: * j += 1 # <<<<<<<<<<<<<< * if lval != right[j]: * i += 1 */ __pyx_v_j = (__pyx_v_j + 1); /* "pandas/src/generated.pyx":7230 * elif j < nright - 1: * j += 1 * if lval != right[j]: # <<<<<<<<<<<<<< * i += 1 * else: */ __pyx_t_9 = __pyx_v_j; __pyx_t_3 = -1; if (__pyx_t_9 < 0) { __pyx_t_9 += __pyx_pybuffernd_right.diminfo[0].shape; if (unlikely(__pyx_t_9 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_9 >= __pyx_pybuffernd_right.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7230; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_7 = ((__pyx_v_lval != (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_right.rcbuffer->pybuffer.buf, __pyx_t_9, __pyx_pybuffernd_right.diminfo[0].strides))) != 0); if (__pyx_t_7) { /* "pandas/src/generated.pyx":7231 * j += 1 * if lval != right[j]: * i += 1 # <<<<<<<<<<<<<< * else: * # end of the road */ __pyx_v_i = (__pyx_v_i + 1); goto __pyx_L11; } __pyx_L11:; goto __pyx_L8; } /*else*/ { /* "pandas/src/generated.pyx":7234 * else: * # end of the road * break # <<<<<<<<<<<<<< * elif lval < rval: * count += 1 */ goto __pyx_L5_break; } __pyx_L8:; goto __pyx_L7; } /* "pandas/src/generated.pyx":7235 * # end of the road * break * elif lval < rval: # <<<<<<<<<<<<<< * count += 1 * i += 1 */ __pyx_t_7 = ((__pyx_v_lval < __pyx_v_rval) != 0); if (__pyx_t_7) { /* "pandas/src/generated.pyx":7236 * break * elif lval < rval: * count += 1 # <<<<<<<<<<<<<< * i += 1 * else: */ __pyx_v_count = (__pyx_v_count + 1); /* "pandas/src/generated.pyx":7237 * elif lval < rval: * count += 1 * i += 1 # <<<<<<<<<<<<<< * else: * j += 1 */ __pyx_v_i = (__pyx_v_i + 1); goto __pyx_L7; } /*else*/ { /* "pandas/src/generated.pyx":7239 * i += 1 * else: * j += 1 # <<<<<<<<<<<<<< * * # do it again now that result size is known */ __pyx_v_j = (__pyx_v_j + 1); } __pyx_L7:; } __pyx_L5_break:; goto __pyx_L3; } __pyx_L3:; /* "pandas/src/generated.pyx":7243 * # do it again now that result size is known * * lindexer = np.empty(count, dtype=np.int64) # <<<<<<<<<<<<<< * rindexer = np.empty(count, dtype=np.int64) * result = np.empty(count, dtype=np.float64) */ __pyx_t_10 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7243; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s__empty); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7243; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_t_10 = PyInt_FromSsize_t(__pyx_v_count); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7243; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __pyx_t_12 = PyTuple_New(1); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7243; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_10); __Pyx_GIVEREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_t_10 = PyDict_New(); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7243; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_10)); __pyx_t_13 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7243; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_t_13, __pyx_n_s__int64); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7243; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_14); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; if (PyDict_SetItem(__pyx_t_10, ((PyObject *)__pyx_n_s__dtype), __pyx_t_14) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7243; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; __pyx_t_14 = PyObject_Call(__pyx_t_11, ((PyObject *)__pyx_t_12), ((PyObject *)__pyx_t_10)); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7243; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_14); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_12)); __pyx_t_12 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_10)); __pyx_t_10 = 0; if (!(likely(((__pyx_t_14) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_14, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7243; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_15 = ((PyArrayObject *)__pyx_t_14); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_lindexer.rcbuffer->pybuffer); __pyx_t_3 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_lindexer.rcbuffer->pybuffer, (PyObject*)__pyx_t_15, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_3 < 0)) { PyErr_Fetch(&__pyx_t_16, &__pyx_t_17, &__pyx_t_18); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_lindexer.rcbuffer->pybuffer, (PyObject*)__pyx_v_lindexer, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_16); Py_XDECREF(__pyx_t_17); Py_XDECREF(__pyx_t_18); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_16, __pyx_t_17, __pyx_t_18); } } __pyx_pybuffernd_lindexer.diminfo[0].strides = __pyx_pybuffernd_lindexer.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_lindexer.diminfo[0].shape = __pyx_pybuffernd_lindexer.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7243; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_15 = 0; __pyx_v_lindexer = ((PyArrayObject *)__pyx_t_14); __pyx_t_14 = 0; /* "pandas/src/generated.pyx":7244 * * lindexer = np.empty(count, dtype=np.int64) * rindexer = np.empty(count, dtype=np.int64) # <<<<<<<<<<<<<< * result = np.empty(count, dtype=np.float64) * */ __pyx_t_14 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7244; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_14); __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_14, __pyx_n_s__empty); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7244; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; __pyx_t_14 = PyInt_FromSsize_t(__pyx_v_count); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7244; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_14); __pyx_t_12 = PyTuple_New(1); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7244; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_14); __Pyx_GIVEREF(__pyx_t_14); __pyx_t_14 = 0; __pyx_t_14 = PyDict_New(); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7244; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_14)); __pyx_t_11 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7244; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s__int64); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7244; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; if (PyDict_SetItem(__pyx_t_14, ((PyObject *)__pyx_n_s__dtype), __pyx_t_13) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7244; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_13 = PyObject_Call(__pyx_t_10, ((PyObject *)__pyx_t_12), ((PyObject *)__pyx_t_14)); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7244; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_12)); __pyx_t_12 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_14)); __pyx_t_14 = 0; if (!(likely(((__pyx_t_13) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_13, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7244; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_15 = ((PyArrayObject *)__pyx_t_13); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_rindexer.rcbuffer->pybuffer); __pyx_t_3 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_rindexer.rcbuffer->pybuffer, (PyObject*)__pyx_t_15, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_3 < 0)) { PyErr_Fetch(&__pyx_t_18, &__pyx_t_17, &__pyx_t_16); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_rindexer.rcbuffer->pybuffer, (PyObject*)__pyx_v_rindexer, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_18); Py_XDECREF(__pyx_t_17); Py_XDECREF(__pyx_t_16); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_18, __pyx_t_17, __pyx_t_16); } } __pyx_pybuffernd_rindexer.diminfo[0].strides = __pyx_pybuffernd_rindexer.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_rindexer.diminfo[0].shape = __pyx_pybuffernd_rindexer.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7244; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_15 = 0; __pyx_v_rindexer = ((PyArrayObject *)__pyx_t_13); __pyx_t_13 = 0; /* "pandas/src/generated.pyx":7245 * lindexer = np.empty(count, dtype=np.int64) * rindexer = np.empty(count, dtype=np.int64) * result = np.empty(count, dtype=np.float64) # <<<<<<<<<<<<<< * * i = 0 */ __pyx_t_13 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7245; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_t_13, __pyx_n_s__empty); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7245; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_14); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_13 = PyInt_FromSsize_t(__pyx_v_count); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7245; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __pyx_t_12 = PyTuple_New(1); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7245; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_13); __Pyx_GIVEREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_13 = PyDict_New(); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7245; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_13)); __pyx_t_10 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7245; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s__float64); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7245; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; if (PyDict_SetItem(__pyx_t_13, ((PyObject *)__pyx_n_s__dtype), __pyx_t_11) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7245; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __pyx_t_11 = PyObject_Call(__pyx_t_14, ((PyObject *)__pyx_t_12), ((PyObject *)__pyx_t_13)); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7245; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_12)); __pyx_t_12 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_13)); __pyx_t_13 = 0; if (!(likely(((__pyx_t_11) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_11, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7245; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_19 = ((PyArrayObject *)__pyx_t_11); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __pyx_t_3 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_t_19, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_3 < 0)) { PyErr_Fetch(&__pyx_t_16, &__pyx_t_17, &__pyx_t_18); 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_16); Py_XDECREF(__pyx_t_17); Py_XDECREF(__pyx_t_18); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_16, __pyx_t_17, __pyx_t_18); } } __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_3 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7245; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_19 = 0; __pyx_v_result = ((PyArrayObject *)__pyx_t_11); __pyx_t_11 = 0; /* "pandas/src/generated.pyx":7247 * result = np.empty(count, dtype=np.float64) * * i = 0 # <<<<<<<<<<<<<< * j = 0 * count = 0 */ __pyx_v_i = 0; /* "pandas/src/generated.pyx":7248 * * i = 0 * j = 0 # <<<<<<<<<<<<<< * count = 0 * if nleft > 0: */ __pyx_v_j = 0; /* "pandas/src/generated.pyx":7249 * i = 0 * j = 0 * count = 0 # <<<<<<<<<<<<<< * if nleft > 0: * while i < nleft: */ __pyx_v_count = 0; /* "pandas/src/generated.pyx":7250 * j = 0 * count = 0 * if nleft > 0: # <<<<<<<<<<<<<< * while i < nleft: * if j == nright: */ __pyx_t_7 = ((__pyx_v_nleft > 0) != 0); if (__pyx_t_7) { /* "pandas/src/generated.pyx":7251 * count = 0 * if nleft > 0: * while i < nleft: # <<<<<<<<<<<<<< * if j == nright: * while i < nleft: */ while (1) { __pyx_t_7 = ((__pyx_v_i < __pyx_v_nleft) != 0); if (!__pyx_t_7) break; /* "pandas/src/generated.pyx":7252 * if nleft > 0: * while i < nleft: * if j == nright: # <<<<<<<<<<<<<< * while i < nleft: * lindexer[count] = i */ __pyx_t_7 = ((__pyx_v_j == __pyx_v_nright) != 0); if (__pyx_t_7) { /* "pandas/src/generated.pyx":7253 * while i < nleft: * if j == nright: * while i < nleft: # <<<<<<<<<<<<<< * lindexer[count] = i * rindexer[count] = -1 */ while (1) { __pyx_t_7 = ((__pyx_v_i < __pyx_v_nleft) != 0); if (!__pyx_t_7) break; /* "pandas/src/generated.pyx":7254 * if j == nright: * while i < nleft: * lindexer[count] = i # <<<<<<<<<<<<<< * rindexer[count] = -1 * result[count] = left[i] */ __pyx_t_20 = __pyx_v_count; __pyx_t_3 = -1; if (__pyx_t_20 < 0) { __pyx_t_20 += __pyx_pybuffernd_lindexer.diminfo[0].shape; if (unlikely(__pyx_t_20 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_20 >= __pyx_pybuffernd_lindexer.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7254; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_lindexer.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_lindexer.diminfo[0].strides) = __pyx_v_i; /* "pandas/src/generated.pyx":7255 * while i < nleft: * lindexer[count] = i * rindexer[count] = -1 # <<<<<<<<<<<<<< * result[count] = left[i] * i += 1 */ __pyx_t_21 = __pyx_v_count; __pyx_t_3 = -1; if (__pyx_t_21 < 0) { __pyx_t_21 += __pyx_pybuffernd_rindexer.diminfo[0].shape; if (unlikely(__pyx_t_21 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_21 >= __pyx_pybuffernd_rindexer.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7255; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_rindexer.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_rindexer.diminfo[0].strides) = -1; /* "pandas/src/generated.pyx":7256 * lindexer[count] = i * rindexer[count] = -1 * result[count] = left[i] # <<<<<<<<<<<<<< * i += 1 * count += 1 */ __pyx_t_22 = __pyx_v_i; __pyx_t_3 = -1; if (__pyx_t_22 < 0) { __pyx_t_22 += __pyx_pybuffernd_left.diminfo[0].shape; if (unlikely(__pyx_t_22 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_22 >= __pyx_pybuffernd_left.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7256; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_23 = __pyx_v_count; __pyx_t_3 = -1; if (__pyx_t_23 < 0) { __pyx_t_23 += __pyx_pybuffernd_result.diminfo[0].shape; if (unlikely(__pyx_t_23 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_23 >= __pyx_pybuffernd_result.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7256; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_23, __pyx_pybuffernd_result.diminfo[0].strides) = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_left.rcbuffer->pybuffer.buf, __pyx_t_22, __pyx_pybuffernd_left.diminfo[0].strides)); /* "pandas/src/generated.pyx":7257 * rindexer[count] = -1 * result[count] = left[i] * i += 1 # <<<<<<<<<<<<<< * count += 1 * break */ __pyx_v_i = (__pyx_v_i + 1); /* "pandas/src/generated.pyx":7258 * result[count] = left[i] * i += 1 * count += 1 # <<<<<<<<<<<<<< * break * */ __pyx_v_count = (__pyx_v_count + 1); } /* "pandas/src/generated.pyx":7259 * i += 1 * count += 1 * break # <<<<<<<<<<<<<< * * lval = left[i] */ goto __pyx_L14_break; goto __pyx_L15; } __pyx_L15:; /* "pandas/src/generated.pyx":7261 * break * * lval = left[i] # <<<<<<<<<<<<<< * rval = right[j] * */ __pyx_t_24 = __pyx_v_i; __pyx_t_3 = -1; if (__pyx_t_24 < 0) { __pyx_t_24 += __pyx_pybuffernd_left.diminfo[0].shape; if (unlikely(__pyx_t_24 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_24 >= __pyx_pybuffernd_left.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7261; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_lval = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_left.rcbuffer->pybuffer.buf, __pyx_t_24, __pyx_pybuffernd_left.diminfo[0].strides)); /* "pandas/src/generated.pyx":7262 * * lval = left[i] * rval = right[j] # <<<<<<<<<<<<<< * * if lval == rval: */ __pyx_t_25 = __pyx_v_j; __pyx_t_3 = -1; if (__pyx_t_25 < 0) { __pyx_t_25 += __pyx_pybuffernd_right.diminfo[0].shape; if (unlikely(__pyx_t_25 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_25 >= __pyx_pybuffernd_right.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7262; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_rval = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_right.rcbuffer->pybuffer.buf, __pyx_t_25, __pyx_pybuffernd_right.diminfo[0].strides)); /* "pandas/src/generated.pyx":7264 * rval = right[j] * * if lval == rval: # <<<<<<<<<<<<<< * lindexer[count] = i * rindexer[count] = j */ __pyx_t_7 = ((__pyx_v_lval == __pyx_v_rval) != 0); if (__pyx_t_7) { /* "pandas/src/generated.pyx":7265 * * if lval == rval: * lindexer[count] = i # <<<<<<<<<<<<<< * rindexer[count] = j * result[count] = lval */ __pyx_t_26 = __pyx_v_count; __pyx_t_3 = -1; if (__pyx_t_26 < 0) { __pyx_t_26 += __pyx_pybuffernd_lindexer.diminfo[0].shape; if (unlikely(__pyx_t_26 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_26 >= __pyx_pybuffernd_lindexer.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7265; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_lindexer.rcbuffer->pybuffer.buf, __pyx_t_26, __pyx_pybuffernd_lindexer.diminfo[0].strides) = __pyx_v_i; /* "pandas/src/generated.pyx":7266 * if lval == rval: * lindexer[count] = i * rindexer[count] = j # <<<<<<<<<<<<<< * result[count] = lval * count += 1 */ __pyx_t_27 = __pyx_v_count; __pyx_t_3 = -1; if (__pyx_t_27 < 0) { __pyx_t_27 += __pyx_pybuffernd_rindexer.diminfo[0].shape; if (unlikely(__pyx_t_27 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_27 >= __pyx_pybuffernd_rindexer.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7266; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_rindexer.rcbuffer->pybuffer.buf, __pyx_t_27, __pyx_pybuffernd_rindexer.diminfo[0].strides) = __pyx_v_j; /* "pandas/src/generated.pyx":7267 * lindexer[count] = i * rindexer[count] = j * result[count] = lval # <<<<<<<<<<<<<< * count += 1 * if i < nleft - 1: */ __pyx_t_28 = __pyx_v_count; __pyx_t_3 = -1; if (__pyx_t_28 < 0) { __pyx_t_28 += __pyx_pybuffernd_result.diminfo[0].shape; if (unlikely(__pyx_t_28 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_28 >= __pyx_pybuffernd_result.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7267; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_28, __pyx_pybuffernd_result.diminfo[0].strides) = __pyx_v_lval; /* "pandas/src/generated.pyx":7268 * rindexer[count] = j * result[count] = lval * count += 1 # <<<<<<<<<<<<<< * if i < nleft - 1: * if j < nright - 1 and right[j + 1] == rval: */ __pyx_v_count = (__pyx_v_count + 1); /* "pandas/src/generated.pyx":7269 * result[count] = lval * count += 1 * if i < nleft - 1: # <<<<<<<<<<<<<< * if j < nright - 1 and right[j + 1] == rval: * j += 1 */ __pyx_t_7 = ((__pyx_v_i < (__pyx_v_nleft - 1)) != 0); if (__pyx_t_7) { /* "pandas/src/generated.pyx":7270 * count += 1 * if i < nleft - 1: * if j < nright - 1 and right[j + 1] == rval: # <<<<<<<<<<<<<< * j += 1 * else: */ __pyx_t_7 = ((__pyx_v_j < (__pyx_v_nright - 1)) != 0); if (__pyx_t_7) { __pyx_t_29 = (__pyx_v_j + 1); __pyx_t_3 = -1; if (__pyx_t_29 < 0) { __pyx_t_29 += __pyx_pybuffernd_right.diminfo[0].shape; if (unlikely(__pyx_t_29 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_29 >= __pyx_pybuffernd_right.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7270; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_2 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_right.rcbuffer->pybuffer.buf, __pyx_t_29, __pyx_pybuffernd_right.diminfo[0].strides)) == __pyx_v_rval) != 0); __pyx_t_6 = __pyx_t_2; } else { __pyx_t_6 = __pyx_t_7; } if (__pyx_t_6) { /* "pandas/src/generated.pyx":7271 * if i < nleft - 1: * if j < nright - 1 and right[j + 1] == rval: * j += 1 # <<<<<<<<<<<<<< * else: * i += 1 */ __pyx_v_j = (__pyx_v_j + 1); goto __pyx_L20; } /*else*/ { /* "pandas/src/generated.pyx":7273 * j += 1 * else: * i += 1 # <<<<<<<<<<<<<< * if left[i] != rval: * j += 1 */ __pyx_v_i = (__pyx_v_i + 1); /* "pandas/src/generated.pyx":7274 * else: * i += 1 * if left[i] != rval: # <<<<<<<<<<<<<< * j += 1 * elif j < nright - 1: */ __pyx_t_30 = __pyx_v_i; __pyx_t_3 = -1; if (__pyx_t_30 < 0) { __pyx_t_30 += __pyx_pybuffernd_left.diminfo[0].shape; if (unlikely(__pyx_t_30 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_30 >= __pyx_pybuffernd_left.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7274; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_6 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_left.rcbuffer->pybuffer.buf, __pyx_t_30, __pyx_pybuffernd_left.diminfo[0].strides)) != __pyx_v_rval) != 0); if (__pyx_t_6) { /* "pandas/src/generated.pyx":7275 * i += 1 * if left[i] != rval: * j += 1 # <<<<<<<<<<<<<< * elif j < nright - 1: * j += 1 */ __pyx_v_j = (__pyx_v_j + 1); goto __pyx_L21; } __pyx_L21:; } __pyx_L20:; goto __pyx_L19; } /* "pandas/src/generated.pyx":7276 * if left[i] != rval: * j += 1 * elif j < nright - 1: # <<<<<<<<<<<<<< * j += 1 * if lval != right[j]: */ __pyx_t_6 = ((__pyx_v_j < (__pyx_v_nright - 1)) != 0); if (__pyx_t_6) { /* "pandas/src/generated.pyx":7277 * j += 1 * elif j < nright - 1: * j += 1 # <<<<<<<<<<<<<< * if lval != right[j]: * i += 1 */ __pyx_v_j = (__pyx_v_j + 1); /* "pandas/src/generated.pyx":7278 * elif j < nright - 1: * j += 1 * if lval != right[j]: # <<<<<<<<<<<<<< * i += 1 * else: */ __pyx_t_31 = __pyx_v_j; __pyx_t_3 = -1; if (__pyx_t_31 < 0) { __pyx_t_31 += __pyx_pybuffernd_right.diminfo[0].shape; if (unlikely(__pyx_t_31 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_31 >= __pyx_pybuffernd_right.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7278; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_6 = ((__pyx_v_lval != (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_right.rcbuffer->pybuffer.buf, __pyx_t_31, __pyx_pybuffernd_right.diminfo[0].strides))) != 0); if (__pyx_t_6) { /* "pandas/src/generated.pyx":7279 * j += 1 * if lval != right[j]: * i += 1 # <<<<<<<<<<<<<< * else: * # end of the road */ __pyx_v_i = (__pyx_v_i + 1); goto __pyx_L22; } __pyx_L22:; goto __pyx_L19; } /*else*/ { /* "pandas/src/generated.pyx":7282 * else: * # end of the road * break # <<<<<<<<<<<<<< * elif lval < rval: * lindexer[count] = i */ goto __pyx_L14_break; } __pyx_L19:; goto __pyx_L18; } /* "pandas/src/generated.pyx":7283 * # end of the road * break * elif lval < rval: # <<<<<<<<<<<<<< * lindexer[count] = i * rindexer[count] = -1 */ __pyx_t_6 = ((__pyx_v_lval < __pyx_v_rval) != 0); if (__pyx_t_6) { /* "pandas/src/generated.pyx":7284 * break * elif lval < rval: * lindexer[count] = i # <<<<<<<<<<<<<< * rindexer[count] = -1 * result[count] = left[i] */ __pyx_t_32 = __pyx_v_count; __pyx_t_3 = -1; if (__pyx_t_32 < 0) { __pyx_t_32 += __pyx_pybuffernd_lindexer.diminfo[0].shape; if (unlikely(__pyx_t_32 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_32 >= __pyx_pybuffernd_lindexer.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7284; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_lindexer.rcbuffer->pybuffer.buf, __pyx_t_32, __pyx_pybuffernd_lindexer.diminfo[0].strides) = __pyx_v_i; /* "pandas/src/generated.pyx":7285 * elif lval < rval: * lindexer[count] = i * rindexer[count] = -1 # <<<<<<<<<<<<<< * result[count] = left[i] * count += 1 */ __pyx_t_33 = __pyx_v_count; __pyx_t_3 = -1; if (__pyx_t_33 < 0) { __pyx_t_33 += __pyx_pybuffernd_rindexer.diminfo[0].shape; if (unlikely(__pyx_t_33 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_33 >= __pyx_pybuffernd_rindexer.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7285; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_rindexer.rcbuffer->pybuffer.buf, __pyx_t_33, __pyx_pybuffernd_rindexer.diminfo[0].strides) = -1; /* "pandas/src/generated.pyx":7286 * lindexer[count] = i * rindexer[count] = -1 * result[count] = left[i] # <<<<<<<<<<<<<< * count += 1 * i += 1 */ __pyx_t_34 = __pyx_v_i; __pyx_t_3 = -1; if (__pyx_t_34 < 0) { __pyx_t_34 += __pyx_pybuffernd_left.diminfo[0].shape; if (unlikely(__pyx_t_34 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_34 >= __pyx_pybuffernd_left.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7286; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_35 = __pyx_v_count; __pyx_t_3 = -1; if (__pyx_t_35 < 0) { __pyx_t_35 += __pyx_pybuffernd_result.diminfo[0].shape; if (unlikely(__pyx_t_35 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_35 >= __pyx_pybuffernd_result.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7286; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_35, __pyx_pybuffernd_result.diminfo[0].strides) = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_left.rcbuffer->pybuffer.buf, __pyx_t_34, __pyx_pybuffernd_left.diminfo[0].strides)); /* "pandas/src/generated.pyx":7287 * rindexer[count] = -1 * result[count] = left[i] * count += 1 # <<<<<<<<<<<<<< * i += 1 * else: */ __pyx_v_count = (__pyx_v_count + 1); /* "pandas/src/generated.pyx":7288 * result[count] = left[i] * count += 1 * i += 1 # <<<<<<<<<<<<<< * else: * j += 1 */ __pyx_v_i = (__pyx_v_i + 1); goto __pyx_L18; } /*else*/ { /* "pandas/src/generated.pyx":7290 * i += 1 * else: * j += 1 # <<<<<<<<<<<<<< * * return result, lindexer, rindexer */ __pyx_v_j = (__pyx_v_j + 1); } __pyx_L18:; } __pyx_L14_break:; goto __pyx_L12; } __pyx_L12:; /* "pandas/src/generated.pyx":7292 * j += 1 * * return result, lindexer, rindexer # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_11 = PyTuple_New(3); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7292; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __Pyx_INCREF(((PyObject *)__pyx_v_result)); PyTuple_SET_ITEM(__pyx_t_11, 0, ((PyObject *)__pyx_v_result)); __Pyx_GIVEREF(((PyObject *)__pyx_v_result)); __Pyx_INCREF(((PyObject *)__pyx_v_lindexer)); PyTuple_SET_ITEM(__pyx_t_11, 1, ((PyObject *)__pyx_v_lindexer)); __Pyx_GIVEREF(((PyObject *)__pyx_v_lindexer)); __Pyx_INCREF(((PyObject *)__pyx_v_rindexer)); PyTuple_SET_ITEM(__pyx_t_11, 2, ((PyObject *)__pyx_v_rindexer)); __Pyx_GIVEREF(((PyObject *)__pyx_v_rindexer)); __pyx_r = ((PyObject *)__pyx_t_11); __pyx_t_11 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_10); __Pyx_XDECREF(__pyx_t_11); __Pyx_XDECREF(__pyx_t_12); __Pyx_XDECREF(__pyx_t_13); __Pyx_XDECREF(__pyx_t_14); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_left.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_lindexer.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_right.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_rindexer.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.left_join_indexer_float64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_left.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_lindexer.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_right.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_rindexer.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_lindexer); __Pyx_XDECREF((PyObject *)__pyx_v_rindexer); __Pyx_XDECREF((PyObject *)__pyx_v_result); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_467left_join_indexer_float32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6pandas_5algos_466left_join_indexer_float32[] = "\n Two-pass algorithm for monotonic indexes. Handles many-to-one merges\n "; static PyMethodDef __pyx_mdef_6pandas_5algos_467left_join_indexer_float32 = {__Pyx_NAMESTR("left_join_indexer_float32"), (PyCFunction)__pyx_pw_6pandas_5algos_467left_join_indexer_float32, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_5algos_466left_join_indexer_float32)}; static PyObject *__pyx_pw_6pandas_5algos_467left_join_indexer_float32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_left = 0; PyArrayObject *__pyx_v_right = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("left_join_indexer_float32 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__left,&__pyx_n_s__right,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__left)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__right)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("left_join_indexer_float32", 1, 2, 2, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7295; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "left_join_indexer_float32") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7295; __pyx_clineno = __LINE__; goto __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_left = ((PyArrayObject *)values[0]); __pyx_v_right = ((PyArrayObject *)values[1]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("left_join_indexer_float32", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7295; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.left_join_indexer_float32", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_left), __pyx_ptype_5numpy_ndarray, 1, "left", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7295; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_right), __pyx_ptype_5numpy_ndarray, 1, "right", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7296; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_466left_join_indexer_float32(__pyx_self, __pyx_v_left, __pyx_v_right); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":7295 * * * def left_join_indexer_float32(ndarray[float32_t] left, # <<<<<<<<<<<<<< * ndarray[float32_t] right): * ''' */ static PyObject *__pyx_pf_6pandas_5algos_466left_join_indexer_float32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_left, PyArrayObject *__pyx_v_right) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_nright; Py_ssize_t __pyx_v_nleft; Py_ssize_t __pyx_v_count; __pyx_t_5numpy_float32_t __pyx_v_lval; __pyx_t_5numpy_float32_t __pyx_v_rval; PyArrayObject *__pyx_v_lindexer = 0; PyArrayObject *__pyx_v_rindexer = 0; PyArrayObject *__pyx_v_result = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_left; __Pyx_Buffer __pyx_pybuffer_left; __Pyx_LocalBuf_ND __pyx_pybuffernd_lindexer; __Pyx_Buffer __pyx_pybuffer_lindexer; __Pyx_LocalBuf_ND __pyx_pybuffernd_result; __Pyx_Buffer __pyx_pybuffer_result; __Pyx_LocalBuf_ND __pyx_pybuffernd_right; __Pyx_Buffer __pyx_pybuffer_right; __Pyx_LocalBuf_ND __pyx_pybuffernd_rindexer; __Pyx_Buffer __pyx_pybuffer_rindexer; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; int __pyx_t_2; int __pyx_t_3; Py_ssize_t __pyx_t_4; Py_ssize_t __pyx_t_5; int __pyx_t_6; int __pyx_t_7; Py_ssize_t __pyx_t_8; Py_ssize_t __pyx_t_9; PyObject *__pyx_t_10 = NULL; PyObject *__pyx_t_11 = NULL; PyObject *__pyx_t_12 = NULL; PyObject *__pyx_t_13 = NULL; PyObject *__pyx_t_14 = NULL; PyArrayObject *__pyx_t_15 = NULL; PyObject *__pyx_t_16 = NULL; PyObject *__pyx_t_17 = NULL; PyObject *__pyx_t_18 = NULL; PyArrayObject *__pyx_t_19 = NULL; 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("left_join_indexer_float32", 0); __pyx_pybuffer_lindexer.pybuffer.buf = NULL; __pyx_pybuffer_lindexer.refcount = 0; __pyx_pybuffernd_lindexer.data = NULL; __pyx_pybuffernd_lindexer.rcbuffer = &__pyx_pybuffer_lindexer; __pyx_pybuffer_rindexer.pybuffer.buf = NULL; __pyx_pybuffer_rindexer.refcount = 0; __pyx_pybuffernd_rindexer.data = NULL; __pyx_pybuffernd_rindexer.rcbuffer = &__pyx_pybuffer_rindexer; __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_left.pybuffer.buf = NULL; __pyx_pybuffer_left.refcount = 0; __pyx_pybuffernd_left.data = NULL; __pyx_pybuffernd_left.rcbuffer = &__pyx_pybuffer_left; __pyx_pybuffer_right.pybuffer.buf = NULL; __pyx_pybuffer_right.refcount = 0; __pyx_pybuffernd_right.data = NULL; __pyx_pybuffernd_right.rcbuffer = &__pyx_pybuffer_right; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_left.rcbuffer->pybuffer, (PyObject*)__pyx_v_left, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7295; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_left.diminfo[0].strides = __pyx_pybuffernd_left.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_left.diminfo[0].shape = __pyx_pybuffernd_left.rcbuffer->pybuffer.shape[0]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_right.rcbuffer->pybuffer, (PyObject*)__pyx_v_right, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7295; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_right.diminfo[0].strides = __pyx_pybuffernd_right.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_right.diminfo[0].shape = __pyx_pybuffernd_right.rcbuffer->pybuffer.shape[0]; /* "pandas/src/generated.pyx":7306 * ndarray[float32_t] result * * nleft = len(left) # <<<<<<<<<<<<<< * nright = len(right) * */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_left)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7306; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_nleft = __pyx_t_1; /* "pandas/src/generated.pyx":7307 * * nleft = len(left) * nright = len(right) # <<<<<<<<<<<<<< * * i = 0 */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_right)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7307; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_nright = __pyx_t_1; /* "pandas/src/generated.pyx":7309 * nright = len(right) * * i = 0 # <<<<<<<<<<<<<< * j = 0 * count = 0 */ __pyx_v_i = 0; /* "pandas/src/generated.pyx":7310 * * i = 0 * j = 0 # <<<<<<<<<<<<<< * count = 0 * if nleft > 0: */ __pyx_v_j = 0; /* "pandas/src/generated.pyx":7311 * i = 0 * j = 0 * count = 0 # <<<<<<<<<<<<<< * if nleft > 0: * while i < nleft: */ __pyx_v_count = 0; /* "pandas/src/generated.pyx":7312 * j = 0 * count = 0 * if nleft > 0: # <<<<<<<<<<<<<< * while i < nleft: * if j == nright: */ __pyx_t_2 = ((__pyx_v_nleft > 0) != 0); if (__pyx_t_2) { /* "pandas/src/generated.pyx":7313 * count = 0 * if nleft > 0: * while i < nleft: # <<<<<<<<<<<<<< * if j == nright: * count += nleft - i */ while (1) { __pyx_t_2 = ((__pyx_v_i < __pyx_v_nleft) != 0); if (!__pyx_t_2) break; /* "pandas/src/generated.pyx":7314 * if nleft > 0: * while i < nleft: * if j == nright: # <<<<<<<<<<<<<< * count += nleft - i * break */ __pyx_t_2 = ((__pyx_v_j == __pyx_v_nright) != 0); if (__pyx_t_2) { /* "pandas/src/generated.pyx":7315 * while i < nleft: * if j == nright: * count += nleft - i # <<<<<<<<<<<<<< * break * */ __pyx_v_count = (__pyx_v_count + (__pyx_v_nleft - __pyx_v_i)); /* "pandas/src/generated.pyx":7316 * if j == nright: * count += nleft - i * break # <<<<<<<<<<<<<< * * lval = left[i] */ goto __pyx_L5_break; goto __pyx_L6; } __pyx_L6:; /* "pandas/src/generated.pyx":7318 * break * * lval = left[i] # <<<<<<<<<<<<<< * rval = right[j] * */ __pyx_t_1 = __pyx_v_i; __pyx_t_3 = -1; if (__pyx_t_1 < 0) { __pyx_t_1 += __pyx_pybuffernd_left.diminfo[0].shape; if (unlikely(__pyx_t_1 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_1 >= __pyx_pybuffernd_left.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7318; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_lval = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_left.rcbuffer->pybuffer.buf, __pyx_t_1, __pyx_pybuffernd_left.diminfo[0].strides)); /* "pandas/src/generated.pyx":7319 * * lval = left[i] * rval = right[j] # <<<<<<<<<<<<<< * * if lval == rval: */ __pyx_t_4 = __pyx_v_j; __pyx_t_3 = -1; if (__pyx_t_4 < 0) { __pyx_t_4 += __pyx_pybuffernd_right.diminfo[0].shape; if (unlikely(__pyx_t_4 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_4 >= __pyx_pybuffernd_right.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7319; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_rval = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_right.rcbuffer->pybuffer.buf, __pyx_t_4, __pyx_pybuffernd_right.diminfo[0].strides)); /* "pandas/src/generated.pyx":7321 * rval = right[j] * * if lval == rval: # <<<<<<<<<<<<<< * count += 1 * if i < nleft - 1: */ __pyx_t_2 = ((__pyx_v_lval == __pyx_v_rval) != 0); if (__pyx_t_2) { /* "pandas/src/generated.pyx":7322 * * if lval == rval: * count += 1 # <<<<<<<<<<<<<< * if i < nleft - 1: * if j < nright - 1 and right[j + 1] == rval: */ __pyx_v_count = (__pyx_v_count + 1); /* "pandas/src/generated.pyx":7323 * if lval == rval: * count += 1 * if i < nleft - 1: # <<<<<<<<<<<<<< * if j < nright - 1 and right[j + 1] == rval: * j += 1 */ __pyx_t_2 = ((__pyx_v_i < (__pyx_v_nleft - 1)) != 0); if (__pyx_t_2) { /* "pandas/src/generated.pyx":7324 * count += 1 * if i < nleft - 1: * if j < nright - 1 and right[j + 1] == rval: # <<<<<<<<<<<<<< * j += 1 * else: */ __pyx_t_2 = ((__pyx_v_j < (__pyx_v_nright - 1)) != 0); if (__pyx_t_2) { __pyx_t_5 = (__pyx_v_j + 1); __pyx_t_3 = -1; if (__pyx_t_5 < 0) { __pyx_t_5 += __pyx_pybuffernd_right.diminfo[0].shape; if (unlikely(__pyx_t_5 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_5 >= __pyx_pybuffernd_right.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7324; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_6 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_right.rcbuffer->pybuffer.buf, __pyx_t_5, __pyx_pybuffernd_right.diminfo[0].strides)) == __pyx_v_rval) != 0); __pyx_t_7 = __pyx_t_6; } else { __pyx_t_7 = __pyx_t_2; } if (__pyx_t_7) { /* "pandas/src/generated.pyx":7325 * if i < nleft - 1: * if j < nright - 1 and right[j + 1] == rval: * j += 1 # <<<<<<<<<<<<<< * else: * i += 1 */ __pyx_v_j = (__pyx_v_j + 1); goto __pyx_L9; } /*else*/ { /* "pandas/src/generated.pyx":7327 * j += 1 * else: * i += 1 # <<<<<<<<<<<<<< * if left[i] != rval: * j += 1 */ __pyx_v_i = (__pyx_v_i + 1); /* "pandas/src/generated.pyx":7328 * else: * i += 1 * if left[i] != rval: # <<<<<<<<<<<<<< * j += 1 * elif j < nright - 1: */ __pyx_t_8 = __pyx_v_i; __pyx_t_3 = -1; if (__pyx_t_8 < 0) { __pyx_t_8 += __pyx_pybuffernd_left.diminfo[0].shape; if (unlikely(__pyx_t_8 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_8 >= __pyx_pybuffernd_left.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7328; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_7 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_left.rcbuffer->pybuffer.buf, __pyx_t_8, __pyx_pybuffernd_left.diminfo[0].strides)) != __pyx_v_rval) != 0); if (__pyx_t_7) { /* "pandas/src/generated.pyx":7329 * i += 1 * if left[i] != rval: * j += 1 # <<<<<<<<<<<<<< * elif j < nright - 1: * j += 1 */ __pyx_v_j = (__pyx_v_j + 1); goto __pyx_L10; } __pyx_L10:; } __pyx_L9:; goto __pyx_L8; } /* "pandas/src/generated.pyx":7330 * if left[i] != rval: * j += 1 * elif j < nright - 1: # <<<<<<<<<<<<<< * j += 1 * if lval != right[j]: */ __pyx_t_7 = ((__pyx_v_j < (__pyx_v_nright - 1)) != 0); if (__pyx_t_7) { /* "pandas/src/generated.pyx":7331 * j += 1 * elif j < nright - 1: * j += 1 # <<<<<<<<<<<<<< * if lval != right[j]: * i += 1 */ __pyx_v_j = (__pyx_v_j + 1); /* "pandas/src/generated.pyx":7332 * elif j < nright - 1: * j += 1 * if lval != right[j]: # <<<<<<<<<<<<<< * i += 1 * else: */ __pyx_t_9 = __pyx_v_j; __pyx_t_3 = -1; if (__pyx_t_9 < 0) { __pyx_t_9 += __pyx_pybuffernd_right.diminfo[0].shape; if (unlikely(__pyx_t_9 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_9 >= __pyx_pybuffernd_right.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7332; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_7 = ((__pyx_v_lval != (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_right.rcbuffer->pybuffer.buf, __pyx_t_9, __pyx_pybuffernd_right.diminfo[0].strides))) != 0); if (__pyx_t_7) { /* "pandas/src/generated.pyx":7333 * j += 1 * if lval != right[j]: * i += 1 # <<<<<<<<<<<<<< * else: * # end of the road */ __pyx_v_i = (__pyx_v_i + 1); goto __pyx_L11; } __pyx_L11:; goto __pyx_L8; } /*else*/ { /* "pandas/src/generated.pyx":7336 * else: * # end of the road * break # <<<<<<<<<<<<<< * elif lval < rval: * count += 1 */ goto __pyx_L5_break; } __pyx_L8:; goto __pyx_L7; } /* "pandas/src/generated.pyx":7337 * # end of the road * break * elif lval < rval: # <<<<<<<<<<<<<< * count += 1 * i += 1 */ __pyx_t_7 = ((__pyx_v_lval < __pyx_v_rval) != 0); if (__pyx_t_7) { /* "pandas/src/generated.pyx":7338 * break * elif lval < rval: * count += 1 # <<<<<<<<<<<<<< * i += 1 * else: */ __pyx_v_count = (__pyx_v_count + 1); /* "pandas/src/generated.pyx":7339 * elif lval < rval: * count += 1 * i += 1 # <<<<<<<<<<<<<< * else: * j += 1 */ __pyx_v_i = (__pyx_v_i + 1); goto __pyx_L7; } /*else*/ { /* "pandas/src/generated.pyx":7341 * i += 1 * else: * j += 1 # <<<<<<<<<<<<<< * * # do it again now that result size is known */ __pyx_v_j = (__pyx_v_j + 1); } __pyx_L7:; } __pyx_L5_break:; goto __pyx_L3; } __pyx_L3:; /* "pandas/src/generated.pyx":7345 * # do it again now that result size is known * * lindexer = np.empty(count, dtype=np.int64) # <<<<<<<<<<<<<< * rindexer = np.empty(count, dtype=np.int64) * result = np.empty(count, dtype=np.float32) */ __pyx_t_10 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7345; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s__empty); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7345; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_t_10 = PyInt_FromSsize_t(__pyx_v_count); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7345; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __pyx_t_12 = PyTuple_New(1); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7345; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_10); __Pyx_GIVEREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_t_10 = PyDict_New(); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7345; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_10)); __pyx_t_13 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7345; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_t_13, __pyx_n_s__int64); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7345; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_14); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; if (PyDict_SetItem(__pyx_t_10, ((PyObject *)__pyx_n_s__dtype), __pyx_t_14) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7345; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; __pyx_t_14 = PyObject_Call(__pyx_t_11, ((PyObject *)__pyx_t_12), ((PyObject *)__pyx_t_10)); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7345; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_14); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_12)); __pyx_t_12 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_10)); __pyx_t_10 = 0; if (!(likely(((__pyx_t_14) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_14, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7345; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_15 = ((PyArrayObject *)__pyx_t_14); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_lindexer.rcbuffer->pybuffer); __pyx_t_3 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_lindexer.rcbuffer->pybuffer, (PyObject*)__pyx_t_15, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_3 < 0)) { PyErr_Fetch(&__pyx_t_16, &__pyx_t_17, &__pyx_t_18); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_lindexer.rcbuffer->pybuffer, (PyObject*)__pyx_v_lindexer, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_16); Py_XDECREF(__pyx_t_17); Py_XDECREF(__pyx_t_18); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_16, __pyx_t_17, __pyx_t_18); } } __pyx_pybuffernd_lindexer.diminfo[0].strides = __pyx_pybuffernd_lindexer.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_lindexer.diminfo[0].shape = __pyx_pybuffernd_lindexer.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7345; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_15 = 0; __pyx_v_lindexer = ((PyArrayObject *)__pyx_t_14); __pyx_t_14 = 0; /* "pandas/src/generated.pyx":7346 * * lindexer = np.empty(count, dtype=np.int64) * rindexer = np.empty(count, dtype=np.int64) # <<<<<<<<<<<<<< * result = np.empty(count, dtype=np.float32) * */ __pyx_t_14 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7346; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_14); __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_14, __pyx_n_s__empty); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7346; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; __pyx_t_14 = PyInt_FromSsize_t(__pyx_v_count); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7346; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_14); __pyx_t_12 = PyTuple_New(1); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7346; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_14); __Pyx_GIVEREF(__pyx_t_14); __pyx_t_14 = 0; __pyx_t_14 = PyDict_New(); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7346; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_14)); __pyx_t_11 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7346; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s__int64); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7346; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; if (PyDict_SetItem(__pyx_t_14, ((PyObject *)__pyx_n_s__dtype), __pyx_t_13) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7346; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_13 = PyObject_Call(__pyx_t_10, ((PyObject *)__pyx_t_12), ((PyObject *)__pyx_t_14)); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7346; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_12)); __pyx_t_12 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_14)); __pyx_t_14 = 0; if (!(likely(((__pyx_t_13) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_13, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7346; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_15 = ((PyArrayObject *)__pyx_t_13); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_rindexer.rcbuffer->pybuffer); __pyx_t_3 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_rindexer.rcbuffer->pybuffer, (PyObject*)__pyx_t_15, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_3 < 0)) { PyErr_Fetch(&__pyx_t_18, &__pyx_t_17, &__pyx_t_16); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_rindexer.rcbuffer->pybuffer, (PyObject*)__pyx_v_rindexer, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_18); Py_XDECREF(__pyx_t_17); Py_XDECREF(__pyx_t_16); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_18, __pyx_t_17, __pyx_t_16); } } __pyx_pybuffernd_rindexer.diminfo[0].strides = __pyx_pybuffernd_rindexer.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_rindexer.diminfo[0].shape = __pyx_pybuffernd_rindexer.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7346; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_15 = 0; __pyx_v_rindexer = ((PyArrayObject *)__pyx_t_13); __pyx_t_13 = 0; /* "pandas/src/generated.pyx":7347 * lindexer = np.empty(count, dtype=np.int64) * rindexer = np.empty(count, dtype=np.int64) * result = np.empty(count, dtype=np.float32) # <<<<<<<<<<<<<< * * i = 0 */ __pyx_t_13 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7347; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_t_13, __pyx_n_s__empty); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7347; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_14); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_13 = PyInt_FromSsize_t(__pyx_v_count); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7347; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __pyx_t_12 = PyTuple_New(1); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7347; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_13); __Pyx_GIVEREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_13 = PyDict_New(); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7347; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_13)); __pyx_t_10 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7347; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s__float32); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7347; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; if (PyDict_SetItem(__pyx_t_13, ((PyObject *)__pyx_n_s__dtype), __pyx_t_11) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7347; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __pyx_t_11 = PyObject_Call(__pyx_t_14, ((PyObject *)__pyx_t_12), ((PyObject *)__pyx_t_13)); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7347; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_12)); __pyx_t_12 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_13)); __pyx_t_13 = 0; if (!(likely(((__pyx_t_11) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_11, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7347; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_19 = ((PyArrayObject *)__pyx_t_11); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __pyx_t_3 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_t_19, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_3 < 0)) { PyErr_Fetch(&__pyx_t_16, &__pyx_t_17, &__pyx_t_18); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_v_result, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_16); Py_XDECREF(__pyx_t_17); Py_XDECREF(__pyx_t_18); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_16, __pyx_t_17, __pyx_t_18); } } __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_3 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7347; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_19 = 0; __pyx_v_result = ((PyArrayObject *)__pyx_t_11); __pyx_t_11 = 0; /* "pandas/src/generated.pyx":7349 * result = np.empty(count, dtype=np.float32) * * i = 0 # <<<<<<<<<<<<<< * j = 0 * count = 0 */ __pyx_v_i = 0; /* "pandas/src/generated.pyx":7350 * * i = 0 * j = 0 # <<<<<<<<<<<<<< * count = 0 * if nleft > 0: */ __pyx_v_j = 0; /* "pandas/src/generated.pyx":7351 * i = 0 * j = 0 * count = 0 # <<<<<<<<<<<<<< * if nleft > 0: * while i < nleft: */ __pyx_v_count = 0; /* "pandas/src/generated.pyx":7352 * j = 0 * count = 0 * if nleft > 0: # <<<<<<<<<<<<<< * while i < nleft: * if j == nright: */ __pyx_t_7 = ((__pyx_v_nleft > 0) != 0); if (__pyx_t_7) { /* "pandas/src/generated.pyx":7353 * count = 0 * if nleft > 0: * while i < nleft: # <<<<<<<<<<<<<< * if j == nright: * while i < nleft: */ while (1) { __pyx_t_7 = ((__pyx_v_i < __pyx_v_nleft) != 0); if (!__pyx_t_7) break; /* "pandas/src/generated.pyx":7354 * if nleft > 0: * while i < nleft: * if j == nright: # <<<<<<<<<<<<<< * while i < nleft: * lindexer[count] = i */ __pyx_t_7 = ((__pyx_v_j == __pyx_v_nright) != 0); if (__pyx_t_7) { /* "pandas/src/generated.pyx":7355 * while i < nleft: * if j == nright: * while i < nleft: # <<<<<<<<<<<<<< * lindexer[count] = i * rindexer[count] = -1 */ while (1) { __pyx_t_7 = ((__pyx_v_i < __pyx_v_nleft) != 0); if (!__pyx_t_7) break; /* "pandas/src/generated.pyx":7356 * if j == nright: * while i < nleft: * lindexer[count] = i # <<<<<<<<<<<<<< * rindexer[count] = -1 * result[count] = left[i] */ __pyx_t_20 = __pyx_v_count; __pyx_t_3 = -1; if (__pyx_t_20 < 0) { __pyx_t_20 += __pyx_pybuffernd_lindexer.diminfo[0].shape; if (unlikely(__pyx_t_20 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_20 >= __pyx_pybuffernd_lindexer.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7356; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_lindexer.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_lindexer.diminfo[0].strides) = __pyx_v_i; /* "pandas/src/generated.pyx":7357 * while i < nleft: * lindexer[count] = i * rindexer[count] = -1 # <<<<<<<<<<<<<< * result[count] = left[i] * i += 1 */ __pyx_t_21 = __pyx_v_count; __pyx_t_3 = -1; if (__pyx_t_21 < 0) { __pyx_t_21 += __pyx_pybuffernd_rindexer.diminfo[0].shape; if (unlikely(__pyx_t_21 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_21 >= __pyx_pybuffernd_rindexer.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7357; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_rindexer.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_rindexer.diminfo[0].strides) = -1; /* "pandas/src/generated.pyx":7358 * lindexer[count] = i * rindexer[count] = -1 * result[count] = left[i] # <<<<<<<<<<<<<< * i += 1 * count += 1 */ __pyx_t_22 = __pyx_v_i; __pyx_t_3 = -1; if (__pyx_t_22 < 0) { __pyx_t_22 += __pyx_pybuffernd_left.diminfo[0].shape; if (unlikely(__pyx_t_22 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_22 >= __pyx_pybuffernd_left.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7358; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_23 = __pyx_v_count; __pyx_t_3 = -1; if (__pyx_t_23 < 0) { __pyx_t_23 += __pyx_pybuffernd_result.diminfo[0].shape; if (unlikely(__pyx_t_23 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_23 >= __pyx_pybuffernd_result.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7358; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_23, __pyx_pybuffernd_result.diminfo[0].strides) = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_left.rcbuffer->pybuffer.buf, __pyx_t_22, __pyx_pybuffernd_left.diminfo[0].strides)); /* "pandas/src/generated.pyx":7359 * rindexer[count] = -1 * result[count] = left[i] * i += 1 # <<<<<<<<<<<<<< * count += 1 * break */ __pyx_v_i = (__pyx_v_i + 1); /* "pandas/src/generated.pyx":7360 * result[count] = left[i] * i += 1 * count += 1 # <<<<<<<<<<<<<< * break * */ __pyx_v_count = (__pyx_v_count + 1); } /* "pandas/src/generated.pyx":7361 * i += 1 * count += 1 * break # <<<<<<<<<<<<<< * * lval = left[i] */ goto __pyx_L14_break; goto __pyx_L15; } __pyx_L15:; /* "pandas/src/generated.pyx":7363 * break * * lval = left[i] # <<<<<<<<<<<<<< * rval = right[j] * */ __pyx_t_24 = __pyx_v_i; __pyx_t_3 = -1; if (__pyx_t_24 < 0) { __pyx_t_24 += __pyx_pybuffernd_left.diminfo[0].shape; if (unlikely(__pyx_t_24 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_24 >= __pyx_pybuffernd_left.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7363; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_lval = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_left.rcbuffer->pybuffer.buf, __pyx_t_24, __pyx_pybuffernd_left.diminfo[0].strides)); /* "pandas/src/generated.pyx":7364 * * lval = left[i] * rval = right[j] # <<<<<<<<<<<<<< * * if lval == rval: */ __pyx_t_25 = __pyx_v_j; __pyx_t_3 = -1; if (__pyx_t_25 < 0) { __pyx_t_25 += __pyx_pybuffernd_right.diminfo[0].shape; if (unlikely(__pyx_t_25 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_25 >= __pyx_pybuffernd_right.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7364; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_rval = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_right.rcbuffer->pybuffer.buf, __pyx_t_25, __pyx_pybuffernd_right.diminfo[0].strides)); /* "pandas/src/generated.pyx":7366 * rval = right[j] * * if lval == rval: # <<<<<<<<<<<<<< * lindexer[count] = i * rindexer[count] = j */ __pyx_t_7 = ((__pyx_v_lval == __pyx_v_rval) != 0); if (__pyx_t_7) { /* "pandas/src/generated.pyx":7367 * * if lval == rval: * lindexer[count] = i # <<<<<<<<<<<<<< * rindexer[count] = j * result[count] = lval */ __pyx_t_26 = __pyx_v_count; __pyx_t_3 = -1; if (__pyx_t_26 < 0) { __pyx_t_26 += __pyx_pybuffernd_lindexer.diminfo[0].shape; if (unlikely(__pyx_t_26 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_26 >= __pyx_pybuffernd_lindexer.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7367; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_lindexer.rcbuffer->pybuffer.buf, __pyx_t_26, __pyx_pybuffernd_lindexer.diminfo[0].strides) = __pyx_v_i; /* "pandas/src/generated.pyx":7368 * if lval == rval: * lindexer[count] = i * rindexer[count] = j # <<<<<<<<<<<<<< * result[count] = lval * count += 1 */ __pyx_t_27 = __pyx_v_count; __pyx_t_3 = -1; if (__pyx_t_27 < 0) { __pyx_t_27 += __pyx_pybuffernd_rindexer.diminfo[0].shape; if (unlikely(__pyx_t_27 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_27 >= __pyx_pybuffernd_rindexer.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7368; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_rindexer.rcbuffer->pybuffer.buf, __pyx_t_27, __pyx_pybuffernd_rindexer.diminfo[0].strides) = __pyx_v_j; /* "pandas/src/generated.pyx":7369 * lindexer[count] = i * rindexer[count] = j * result[count] = lval # <<<<<<<<<<<<<< * count += 1 * if i < nleft - 1: */ __pyx_t_28 = __pyx_v_count; __pyx_t_3 = -1; if (__pyx_t_28 < 0) { __pyx_t_28 += __pyx_pybuffernd_result.diminfo[0].shape; if (unlikely(__pyx_t_28 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_28 >= __pyx_pybuffernd_result.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7369; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_28, __pyx_pybuffernd_result.diminfo[0].strides) = __pyx_v_lval; /* "pandas/src/generated.pyx":7370 * rindexer[count] = j * result[count] = lval * count += 1 # <<<<<<<<<<<<<< * if i < nleft - 1: * if j < nright - 1 and right[j + 1] == rval: */ __pyx_v_count = (__pyx_v_count + 1); /* "pandas/src/generated.pyx":7371 * result[count] = lval * count += 1 * if i < nleft - 1: # <<<<<<<<<<<<<< * if j < nright - 1 and right[j + 1] == rval: * j += 1 */ __pyx_t_7 = ((__pyx_v_i < (__pyx_v_nleft - 1)) != 0); if (__pyx_t_7) { /* "pandas/src/generated.pyx":7372 * count += 1 * if i < nleft - 1: * if j < nright - 1 and right[j + 1] == rval: # <<<<<<<<<<<<<< * j += 1 * else: */ __pyx_t_7 = ((__pyx_v_j < (__pyx_v_nright - 1)) != 0); if (__pyx_t_7) { __pyx_t_29 = (__pyx_v_j + 1); __pyx_t_3 = -1; if (__pyx_t_29 < 0) { __pyx_t_29 += __pyx_pybuffernd_right.diminfo[0].shape; if (unlikely(__pyx_t_29 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_29 >= __pyx_pybuffernd_right.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7372; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_2 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_right.rcbuffer->pybuffer.buf, __pyx_t_29, __pyx_pybuffernd_right.diminfo[0].strides)) == __pyx_v_rval) != 0); __pyx_t_6 = __pyx_t_2; } else { __pyx_t_6 = __pyx_t_7; } if (__pyx_t_6) { /* "pandas/src/generated.pyx":7373 * if i < nleft - 1: * if j < nright - 1 and right[j + 1] == rval: * j += 1 # <<<<<<<<<<<<<< * else: * i += 1 */ __pyx_v_j = (__pyx_v_j + 1); goto __pyx_L20; } /*else*/ { /* "pandas/src/generated.pyx":7375 * j += 1 * else: * i += 1 # <<<<<<<<<<<<<< * if left[i] != rval: * j += 1 */ __pyx_v_i = (__pyx_v_i + 1); /* "pandas/src/generated.pyx":7376 * else: * i += 1 * if left[i] != rval: # <<<<<<<<<<<<<< * j += 1 * elif j < nright - 1: */ __pyx_t_30 = __pyx_v_i; __pyx_t_3 = -1; if (__pyx_t_30 < 0) { __pyx_t_30 += __pyx_pybuffernd_left.diminfo[0].shape; if (unlikely(__pyx_t_30 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_30 >= __pyx_pybuffernd_left.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7376; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_6 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_left.rcbuffer->pybuffer.buf, __pyx_t_30, __pyx_pybuffernd_left.diminfo[0].strides)) != __pyx_v_rval) != 0); if (__pyx_t_6) { /* "pandas/src/generated.pyx":7377 * i += 1 * if left[i] != rval: * j += 1 # <<<<<<<<<<<<<< * elif j < nright - 1: * j += 1 */ __pyx_v_j = (__pyx_v_j + 1); goto __pyx_L21; } __pyx_L21:; } __pyx_L20:; goto __pyx_L19; } /* "pandas/src/generated.pyx":7378 * if left[i] != rval: * j += 1 * elif j < nright - 1: # <<<<<<<<<<<<<< * j += 1 * if lval != right[j]: */ __pyx_t_6 = ((__pyx_v_j < (__pyx_v_nright - 1)) != 0); if (__pyx_t_6) { /* "pandas/src/generated.pyx":7379 * j += 1 * elif j < nright - 1: * j += 1 # <<<<<<<<<<<<<< * if lval != right[j]: * i += 1 */ __pyx_v_j = (__pyx_v_j + 1); /* "pandas/src/generated.pyx":7380 * elif j < nright - 1: * j += 1 * if lval != right[j]: # <<<<<<<<<<<<<< * i += 1 * else: */ __pyx_t_31 = __pyx_v_j; __pyx_t_3 = -1; if (__pyx_t_31 < 0) { __pyx_t_31 += __pyx_pybuffernd_right.diminfo[0].shape; if (unlikely(__pyx_t_31 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_31 >= __pyx_pybuffernd_right.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7380; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_6 = ((__pyx_v_lval != (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_right.rcbuffer->pybuffer.buf, __pyx_t_31, __pyx_pybuffernd_right.diminfo[0].strides))) != 0); if (__pyx_t_6) { /* "pandas/src/generated.pyx":7381 * j += 1 * if lval != right[j]: * i += 1 # <<<<<<<<<<<<<< * else: * # end of the road */ __pyx_v_i = (__pyx_v_i + 1); goto __pyx_L22; } __pyx_L22:; goto __pyx_L19; } /*else*/ { /* "pandas/src/generated.pyx":7384 * else: * # end of the road * break # <<<<<<<<<<<<<< * elif lval < rval: * lindexer[count] = i */ goto __pyx_L14_break; } __pyx_L19:; goto __pyx_L18; } /* "pandas/src/generated.pyx":7385 * # end of the road * break * elif lval < rval: # <<<<<<<<<<<<<< * lindexer[count] = i * rindexer[count] = -1 */ __pyx_t_6 = ((__pyx_v_lval < __pyx_v_rval) != 0); if (__pyx_t_6) { /* "pandas/src/generated.pyx":7386 * break * elif lval < rval: * lindexer[count] = i # <<<<<<<<<<<<<< * rindexer[count] = -1 * result[count] = left[i] */ __pyx_t_32 = __pyx_v_count; __pyx_t_3 = -1; if (__pyx_t_32 < 0) { __pyx_t_32 += __pyx_pybuffernd_lindexer.diminfo[0].shape; if (unlikely(__pyx_t_32 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_32 >= __pyx_pybuffernd_lindexer.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7386; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_lindexer.rcbuffer->pybuffer.buf, __pyx_t_32, __pyx_pybuffernd_lindexer.diminfo[0].strides) = __pyx_v_i; /* "pandas/src/generated.pyx":7387 * elif lval < rval: * lindexer[count] = i * rindexer[count] = -1 # <<<<<<<<<<<<<< * result[count] = left[i] * count += 1 */ __pyx_t_33 = __pyx_v_count; __pyx_t_3 = -1; if (__pyx_t_33 < 0) { __pyx_t_33 += __pyx_pybuffernd_rindexer.diminfo[0].shape; if (unlikely(__pyx_t_33 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_33 >= __pyx_pybuffernd_rindexer.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7387; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_rindexer.rcbuffer->pybuffer.buf, __pyx_t_33, __pyx_pybuffernd_rindexer.diminfo[0].strides) = -1; /* "pandas/src/generated.pyx":7388 * lindexer[count] = i * rindexer[count] = -1 * result[count] = left[i] # <<<<<<<<<<<<<< * count += 1 * i += 1 */ __pyx_t_34 = __pyx_v_i; __pyx_t_3 = -1; if (__pyx_t_34 < 0) { __pyx_t_34 += __pyx_pybuffernd_left.diminfo[0].shape; if (unlikely(__pyx_t_34 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_34 >= __pyx_pybuffernd_left.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7388; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_35 = __pyx_v_count; __pyx_t_3 = -1; if (__pyx_t_35 < 0) { __pyx_t_35 += __pyx_pybuffernd_result.diminfo[0].shape; if (unlikely(__pyx_t_35 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_35 >= __pyx_pybuffernd_result.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7388; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_35, __pyx_pybuffernd_result.diminfo[0].strides) = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_left.rcbuffer->pybuffer.buf, __pyx_t_34, __pyx_pybuffernd_left.diminfo[0].strides)); /* "pandas/src/generated.pyx":7389 * rindexer[count] = -1 * result[count] = left[i] * count += 1 # <<<<<<<<<<<<<< * i += 1 * else: */ __pyx_v_count = (__pyx_v_count + 1); /* "pandas/src/generated.pyx":7390 * result[count] = left[i] * count += 1 * i += 1 # <<<<<<<<<<<<<< * else: * j += 1 */ __pyx_v_i = (__pyx_v_i + 1); goto __pyx_L18; } /*else*/ { /* "pandas/src/generated.pyx":7392 * i += 1 * else: * j += 1 # <<<<<<<<<<<<<< * * return result, lindexer, rindexer */ __pyx_v_j = (__pyx_v_j + 1); } __pyx_L18:; } __pyx_L14_break:; goto __pyx_L12; } __pyx_L12:; /* "pandas/src/generated.pyx":7394 * j += 1 * * return result, lindexer, rindexer # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_11 = PyTuple_New(3); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7394; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __Pyx_INCREF(((PyObject *)__pyx_v_result)); PyTuple_SET_ITEM(__pyx_t_11, 0, ((PyObject *)__pyx_v_result)); __Pyx_GIVEREF(((PyObject *)__pyx_v_result)); __Pyx_INCREF(((PyObject *)__pyx_v_lindexer)); PyTuple_SET_ITEM(__pyx_t_11, 1, ((PyObject *)__pyx_v_lindexer)); __Pyx_GIVEREF(((PyObject *)__pyx_v_lindexer)); __Pyx_INCREF(((PyObject *)__pyx_v_rindexer)); PyTuple_SET_ITEM(__pyx_t_11, 2, ((PyObject *)__pyx_v_rindexer)); __Pyx_GIVEREF(((PyObject *)__pyx_v_rindexer)); __pyx_r = ((PyObject *)__pyx_t_11); __pyx_t_11 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_10); __Pyx_XDECREF(__pyx_t_11); __Pyx_XDECREF(__pyx_t_12); __Pyx_XDECREF(__pyx_t_13); __Pyx_XDECREF(__pyx_t_14); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_left.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_lindexer.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_right.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_rindexer.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.left_join_indexer_float32", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_left.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_lindexer.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_right.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_rindexer.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_lindexer); __Pyx_XDECREF((PyObject *)__pyx_v_rindexer); __Pyx_XDECREF((PyObject *)__pyx_v_result); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_469left_join_indexer_object(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6pandas_5algos_468left_join_indexer_object[] = "\n Two-pass algorithm for monotonic indexes. Handles many-to-one merges\n "; static PyMethodDef __pyx_mdef_6pandas_5algos_469left_join_indexer_object = {__Pyx_NAMESTR("left_join_indexer_object"), (PyCFunction)__pyx_pw_6pandas_5algos_469left_join_indexer_object, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_5algos_468left_join_indexer_object)}; static PyObject *__pyx_pw_6pandas_5algos_469left_join_indexer_object(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_left = 0; PyArrayObject *__pyx_v_right = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("left_join_indexer_object (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__left,&__pyx_n_s__right,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__left)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__right)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("left_join_indexer_object", 1, 2, 2, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7397; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "left_join_indexer_object") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7397; __pyx_clineno = __LINE__; goto __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_left = ((PyArrayObject *)values[0]); __pyx_v_right = ((PyArrayObject *)values[1]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("left_join_indexer_object", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7397; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.left_join_indexer_object", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_left), __pyx_ptype_5numpy_ndarray, 1, "left", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7397; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_right), __pyx_ptype_5numpy_ndarray, 1, "right", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7398; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_468left_join_indexer_object(__pyx_self, __pyx_v_left, __pyx_v_right); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":7397 * * * def left_join_indexer_object(ndarray[object] left, # <<<<<<<<<<<<<< * ndarray[object] right): * ''' */ static PyObject *__pyx_pf_6pandas_5algos_468left_join_indexer_object(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_left, PyArrayObject *__pyx_v_right) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_nright; Py_ssize_t __pyx_v_nleft; Py_ssize_t __pyx_v_count; PyObject *__pyx_v_lval = 0; PyObject *__pyx_v_rval = 0; PyArrayObject *__pyx_v_lindexer = 0; PyArrayObject *__pyx_v_rindexer = 0; PyArrayObject *__pyx_v_result = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_left; __Pyx_Buffer __pyx_pybuffer_left; __Pyx_LocalBuf_ND __pyx_pybuffernd_lindexer; __Pyx_Buffer __pyx_pybuffer_lindexer; __Pyx_LocalBuf_ND __pyx_pybuffernd_result; __Pyx_Buffer __pyx_pybuffer_result; __Pyx_LocalBuf_ND __pyx_pybuffernd_right; __Pyx_Buffer __pyx_pybuffer_right; __Pyx_LocalBuf_ND __pyx_pybuffernd_rindexer; __Pyx_Buffer __pyx_pybuffer_rindexer; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; int __pyx_t_4; Py_ssize_t __pyx_t_5; Py_ssize_t __pyx_t_6; PyObject *__pyx_t_7 = NULL; int __pyx_t_8; int __pyx_t_9; Py_ssize_t __pyx_t_10; Py_ssize_t __pyx_t_11; PyObject *__pyx_t_12 = NULL; PyObject *__pyx_t_13 = NULL; PyObject *__pyx_t_14 = NULL; PyArrayObject *__pyx_t_15 = NULL; PyObject *__pyx_t_16 = NULL; PyObject *__pyx_t_17 = NULL; PyObject *__pyx_t_18 = NULL; PyArrayObject *__pyx_t_19 = NULL; Py_ssize_t __pyx_t_20; Py_ssize_t __pyx_t_21; Py_ssize_t __pyx_t_22; Py_ssize_t __pyx_t_23; PyObject **__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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("left_join_indexer_object", 0); __pyx_pybuffer_lindexer.pybuffer.buf = NULL; __pyx_pybuffer_lindexer.refcount = 0; __pyx_pybuffernd_lindexer.data = NULL; __pyx_pybuffernd_lindexer.rcbuffer = &__pyx_pybuffer_lindexer; __pyx_pybuffer_rindexer.pybuffer.buf = NULL; __pyx_pybuffer_rindexer.refcount = 0; __pyx_pybuffernd_rindexer.data = NULL; __pyx_pybuffernd_rindexer.rcbuffer = &__pyx_pybuffer_rindexer; __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_left.pybuffer.buf = NULL; __pyx_pybuffer_left.refcount = 0; __pyx_pybuffernd_left.data = NULL; __pyx_pybuffernd_left.rcbuffer = &__pyx_pybuffer_left; __pyx_pybuffer_right.pybuffer.buf = NULL; __pyx_pybuffer_right.refcount = 0; __pyx_pybuffernd_right.data = NULL; __pyx_pybuffernd_right.rcbuffer = &__pyx_pybuffer_right; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_left.rcbuffer->pybuffer, (PyObject*)__pyx_v_left, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7397; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_left.diminfo[0].strides = __pyx_pybuffernd_left.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_left.diminfo[0].shape = __pyx_pybuffernd_left.rcbuffer->pybuffer.shape[0]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_right.rcbuffer->pybuffer, (PyObject*)__pyx_v_right, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7397; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_right.diminfo[0].strides = __pyx_pybuffernd_right.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_right.diminfo[0].shape = __pyx_pybuffernd_right.rcbuffer->pybuffer.shape[0]; /* "pandas/src/generated.pyx":7408 * ndarray[object] result * * nleft = len(left) # <<<<<<<<<<<<<< * nright = len(right) * */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_left)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7408; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_nleft = __pyx_t_1; /* "pandas/src/generated.pyx":7409 * * nleft = len(left) * nright = len(right) # <<<<<<<<<<<<<< * * i = 0 */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_right)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7409; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_nright = __pyx_t_1; /* "pandas/src/generated.pyx":7411 * nright = len(right) * * i = 0 # <<<<<<<<<<<<<< * j = 0 * count = 0 */ __pyx_v_i = 0; /* "pandas/src/generated.pyx":7412 * * i = 0 * j = 0 # <<<<<<<<<<<<<< * count = 0 * if nleft > 0: */ __pyx_v_j = 0; /* "pandas/src/generated.pyx":7413 * i = 0 * j = 0 * count = 0 # <<<<<<<<<<<<<< * if nleft > 0: * while i < nleft: */ __pyx_v_count = 0; /* "pandas/src/generated.pyx":7414 * j = 0 * count = 0 * if nleft > 0: # <<<<<<<<<<<<<< * while i < nleft: * if j == nright: */ __pyx_t_2 = ((__pyx_v_nleft > 0) != 0); if (__pyx_t_2) { /* "pandas/src/generated.pyx":7415 * count = 0 * if nleft > 0: * while i < nleft: # <<<<<<<<<<<<<< * if j == nright: * count += nleft - i */ while (1) { __pyx_t_2 = ((__pyx_v_i < __pyx_v_nleft) != 0); if (!__pyx_t_2) break; /* "pandas/src/generated.pyx":7416 * if nleft > 0: * while i < nleft: * if j == nright: # <<<<<<<<<<<<<< * count += nleft - i * break */ __pyx_t_2 = ((__pyx_v_j == __pyx_v_nright) != 0); if (__pyx_t_2) { /* "pandas/src/generated.pyx":7417 * while i < nleft: * if j == nright: * count += nleft - i # <<<<<<<<<<<<<< * break * */ __pyx_v_count = (__pyx_v_count + (__pyx_v_nleft - __pyx_v_i)); /* "pandas/src/generated.pyx":7418 * if j == nright: * count += nleft - i * break # <<<<<<<<<<<<<< * * lval = left[i] */ goto __pyx_L5_break; goto __pyx_L6; } __pyx_L6:; /* "pandas/src/generated.pyx":7420 * break * * lval = left[i] # <<<<<<<<<<<<<< * rval = right[j] * */ __pyx_t_1 = __pyx_v_i; __pyx_t_4 = -1; if (__pyx_t_1 < 0) { __pyx_t_1 += __pyx_pybuffernd_left.diminfo[0].shape; if (unlikely(__pyx_t_1 < 0)) __pyx_t_4 = 0; } else if (unlikely(__pyx_t_1 >= __pyx_pybuffernd_left.diminfo[0].shape)) __pyx_t_4 = 0; if (unlikely(__pyx_t_4 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_4); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7420; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_3 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_left.rcbuffer->pybuffer.buf, __pyx_t_1, __pyx_pybuffernd_left.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_3); __Pyx_XDECREF_SET(__pyx_v_lval, __pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/generated.pyx":7421 * * lval = left[i] * rval = right[j] # <<<<<<<<<<<<<< * * if lval == rval: */ __pyx_t_5 = __pyx_v_j; __pyx_t_4 = -1; if (__pyx_t_5 < 0) { __pyx_t_5 += __pyx_pybuffernd_right.diminfo[0].shape; if (unlikely(__pyx_t_5 < 0)) __pyx_t_4 = 0; } else if (unlikely(__pyx_t_5 >= __pyx_pybuffernd_right.diminfo[0].shape)) __pyx_t_4 = 0; if (unlikely(__pyx_t_4 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_4); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7421; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_3 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_right.rcbuffer->pybuffer.buf, __pyx_t_5, __pyx_pybuffernd_right.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_3); __Pyx_XDECREF_SET(__pyx_v_rval, __pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/generated.pyx":7423 * rval = right[j] * * if lval == rval: # <<<<<<<<<<<<<< * count += 1 * if i < nleft - 1: */ __pyx_t_3 = PyObject_RichCompare(__pyx_v_lval, __pyx_v_rval, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7423; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7423; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_2) { /* "pandas/src/generated.pyx":7424 * * if lval == rval: * count += 1 # <<<<<<<<<<<<<< * if i < nleft - 1: * if j < nright - 1 and right[j + 1] == rval: */ __pyx_v_count = (__pyx_v_count + 1); /* "pandas/src/generated.pyx":7425 * if lval == rval: * count += 1 * if i < nleft - 1: # <<<<<<<<<<<<<< * if j < nright - 1 and right[j + 1] == rval: * j += 1 */ __pyx_t_2 = ((__pyx_v_i < (__pyx_v_nleft - 1)) != 0); if (__pyx_t_2) { /* "pandas/src/generated.pyx":7426 * count += 1 * if i < nleft - 1: * if j < nright - 1 and right[j + 1] == rval: # <<<<<<<<<<<<<< * j += 1 * else: */ __pyx_t_2 = (__pyx_v_j < (__pyx_v_nright - 1)); if (__pyx_t_2) { __pyx_t_6 = (__pyx_v_j + 1); __pyx_t_4 = -1; if (__pyx_t_6 < 0) { __pyx_t_6 += __pyx_pybuffernd_right.diminfo[0].shape; if (unlikely(__pyx_t_6 < 0)) __pyx_t_4 = 0; } else if (unlikely(__pyx_t_6 >= __pyx_pybuffernd_right.diminfo[0].shape)) __pyx_t_4 = 0; if (unlikely(__pyx_t_4 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_4); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7426; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_3 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_right.rcbuffer->pybuffer.buf, __pyx_t_6, __pyx_pybuffernd_right.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_3); __pyx_t_7 = PyObject_RichCompare(__pyx_t_3, __pyx_v_rval, Py_EQ); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7426; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7426; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_9 = __pyx_t_8; } else { __pyx_t_9 = __pyx_t_2; } if (__pyx_t_9) { /* "pandas/src/generated.pyx":7427 * if i < nleft - 1: * if j < nright - 1 and right[j + 1] == rval: * j += 1 # <<<<<<<<<<<<<< * else: * i += 1 */ __pyx_v_j = (__pyx_v_j + 1); goto __pyx_L9; } /*else*/ { /* "pandas/src/generated.pyx":7429 * j += 1 * else: * i += 1 # <<<<<<<<<<<<<< * if left[i] != rval: * j += 1 */ __pyx_v_i = (__pyx_v_i + 1); /* "pandas/src/generated.pyx":7430 * else: * i += 1 * if left[i] != rval: # <<<<<<<<<<<<<< * j += 1 * elif j < nright - 1: */ __pyx_t_10 = __pyx_v_i; __pyx_t_4 = -1; if (__pyx_t_10 < 0) { __pyx_t_10 += __pyx_pybuffernd_left.diminfo[0].shape; if (unlikely(__pyx_t_10 < 0)) __pyx_t_4 = 0; } else if (unlikely(__pyx_t_10 >= __pyx_pybuffernd_left.diminfo[0].shape)) __pyx_t_4 = 0; if (unlikely(__pyx_t_4 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_4); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7430; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_7 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_left.rcbuffer->pybuffer.buf, __pyx_t_10, __pyx_pybuffernd_left.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_7); __pyx_t_3 = PyObject_RichCompare(__pyx_t_7, __pyx_v_rval, Py_NE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7430; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7430; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_9) { /* "pandas/src/generated.pyx":7431 * i += 1 * if left[i] != rval: * j += 1 # <<<<<<<<<<<<<< * elif j < nright - 1: * j += 1 */ __pyx_v_j = (__pyx_v_j + 1); goto __pyx_L10; } __pyx_L10:; } __pyx_L9:; goto __pyx_L8; } /* "pandas/src/generated.pyx":7432 * if left[i] != rval: * j += 1 * elif j < nright - 1: # <<<<<<<<<<<<<< * j += 1 * if lval != right[j]: */ __pyx_t_9 = ((__pyx_v_j < (__pyx_v_nright - 1)) != 0); if (__pyx_t_9) { /* "pandas/src/generated.pyx":7433 * j += 1 * elif j < nright - 1: * j += 1 # <<<<<<<<<<<<<< * if lval != right[j]: * i += 1 */ __pyx_v_j = (__pyx_v_j + 1); /* "pandas/src/generated.pyx":7434 * elif j < nright - 1: * j += 1 * if lval != right[j]: # <<<<<<<<<<<<<< * i += 1 * else: */ __pyx_t_11 = __pyx_v_j; __pyx_t_4 = -1; if (__pyx_t_11 < 0) { __pyx_t_11 += __pyx_pybuffernd_right.diminfo[0].shape; if (unlikely(__pyx_t_11 < 0)) __pyx_t_4 = 0; } else if (unlikely(__pyx_t_11 >= __pyx_pybuffernd_right.diminfo[0].shape)) __pyx_t_4 = 0; if (unlikely(__pyx_t_4 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_4); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7434; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_3 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_right.rcbuffer->pybuffer.buf, __pyx_t_11, __pyx_pybuffernd_right.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_3); __pyx_t_7 = PyObject_RichCompare(__pyx_v_lval, __pyx_t_3, Py_NE); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7434; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7434; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (__pyx_t_9) { /* "pandas/src/generated.pyx":7435 * j += 1 * if lval != right[j]: * i += 1 # <<<<<<<<<<<<<< * else: * # end of the road */ __pyx_v_i = (__pyx_v_i + 1); goto __pyx_L11; } __pyx_L11:; goto __pyx_L8; } /*else*/ { /* "pandas/src/generated.pyx":7438 * else: * # end of the road * break # <<<<<<<<<<<<<< * elif lval < rval: * count += 1 */ goto __pyx_L5_break; } __pyx_L8:; goto __pyx_L7; } /* "pandas/src/generated.pyx":7439 * # end of the road * break * elif lval < rval: # <<<<<<<<<<<<<< * count += 1 * i += 1 */ __pyx_t_7 = PyObject_RichCompare(__pyx_v_lval, __pyx_v_rval, Py_LT); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7439; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7439; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (__pyx_t_9) { /* "pandas/src/generated.pyx":7440 * break * elif lval < rval: * count += 1 # <<<<<<<<<<<<<< * i += 1 * else: */ __pyx_v_count = (__pyx_v_count + 1); /* "pandas/src/generated.pyx":7441 * elif lval < rval: * count += 1 * i += 1 # <<<<<<<<<<<<<< * else: * j += 1 */ __pyx_v_i = (__pyx_v_i + 1); goto __pyx_L7; } /*else*/ { /* "pandas/src/generated.pyx":7443 * i += 1 * else: * j += 1 # <<<<<<<<<<<<<< * * # do it again now that result size is known */ __pyx_v_j = (__pyx_v_j + 1); } __pyx_L7:; } __pyx_L5_break:; goto __pyx_L3; } __pyx_L3:; /* "pandas/src/generated.pyx":7447 * # do it again now that result size is known * * lindexer = np.empty(count, dtype=np.int64) # <<<<<<<<<<<<<< * rindexer = np.empty(count, dtype=np.int64) * result = np.empty(count, dtype=object) */ __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7447; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s__empty); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7447; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_7 = PyInt_FromSsize_t(__pyx_v_count); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7447; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_t_12 = PyTuple_New(1); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7447; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_7); __Pyx_GIVEREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_7 = PyDict_New(); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7447; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_7)); __pyx_t_13 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7447; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_t_13, __pyx_n_s__int64); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7447; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_14); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; if (PyDict_SetItem(__pyx_t_7, ((PyObject *)__pyx_n_s__dtype), __pyx_t_14) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7447; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; __pyx_t_14 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_12), ((PyObject *)__pyx_t_7)); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7447; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_14); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_12)); __pyx_t_12 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0; if (!(likely(((__pyx_t_14) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_14, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7447; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_15 = ((PyArrayObject *)__pyx_t_14); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_lindexer.rcbuffer->pybuffer); __pyx_t_4 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_lindexer.rcbuffer->pybuffer, (PyObject*)__pyx_t_15, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_4 < 0)) { PyErr_Fetch(&__pyx_t_16, &__pyx_t_17, &__pyx_t_18); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_lindexer.rcbuffer->pybuffer, (PyObject*)__pyx_v_lindexer, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_16); Py_XDECREF(__pyx_t_17); Py_XDECREF(__pyx_t_18); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_16, __pyx_t_17, __pyx_t_18); } } __pyx_pybuffernd_lindexer.diminfo[0].strides = __pyx_pybuffernd_lindexer.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_lindexer.diminfo[0].shape = __pyx_pybuffernd_lindexer.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7447; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_15 = 0; __pyx_v_lindexer = ((PyArrayObject *)__pyx_t_14); __pyx_t_14 = 0; /* "pandas/src/generated.pyx":7448 * * lindexer = np.empty(count, dtype=np.int64) * rindexer = np.empty(count, dtype=np.int64) # <<<<<<<<<<<<<< * result = np.empty(count, dtype=object) * */ __pyx_t_14 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7448; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_14); __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_14, __pyx_n_s__empty); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7448; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; __pyx_t_14 = PyInt_FromSsize_t(__pyx_v_count); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7448; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_14); __pyx_t_12 = PyTuple_New(1); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7448; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_14); __Pyx_GIVEREF(__pyx_t_14); __pyx_t_14 = 0; __pyx_t_14 = PyDict_New(); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7448; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_14)); __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7448; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s__int64); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7448; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (PyDict_SetItem(__pyx_t_14, ((PyObject *)__pyx_n_s__dtype), __pyx_t_13) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7448; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_13 = PyObject_Call(__pyx_t_7, ((PyObject *)__pyx_t_12), ((PyObject *)__pyx_t_14)); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7448; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_12)); __pyx_t_12 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_14)); __pyx_t_14 = 0; if (!(likely(((__pyx_t_13) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_13, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7448; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_15 = ((PyArrayObject *)__pyx_t_13); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_rindexer.rcbuffer->pybuffer); __pyx_t_4 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_rindexer.rcbuffer->pybuffer, (PyObject*)__pyx_t_15, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_4 < 0)) { PyErr_Fetch(&__pyx_t_18, &__pyx_t_17, &__pyx_t_16); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_rindexer.rcbuffer->pybuffer, (PyObject*)__pyx_v_rindexer, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_18); Py_XDECREF(__pyx_t_17); Py_XDECREF(__pyx_t_16); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_18, __pyx_t_17, __pyx_t_16); } } __pyx_pybuffernd_rindexer.diminfo[0].strides = __pyx_pybuffernd_rindexer.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_rindexer.diminfo[0].shape = __pyx_pybuffernd_rindexer.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7448; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_15 = 0; __pyx_v_rindexer = ((PyArrayObject *)__pyx_t_13); __pyx_t_13 = 0; /* "pandas/src/generated.pyx":7449 * lindexer = np.empty(count, dtype=np.int64) * rindexer = np.empty(count, dtype=np.int64) * result = np.empty(count, dtype=object) # <<<<<<<<<<<<<< * * i = 0 */ __pyx_t_13 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7449; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_t_13, __pyx_n_s__empty); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7449; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_14); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_13 = PyInt_FromSsize_t(__pyx_v_count); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7449; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __pyx_t_12 = PyTuple_New(1); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7449; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_13); __Pyx_GIVEREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_13 = PyDict_New(); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7449; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_13)); if (PyDict_SetItem(__pyx_t_13, ((PyObject *)__pyx_n_s__dtype), __pyx_builtin_object) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7449; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_7 = PyObject_Call(__pyx_t_14, ((PyObject *)__pyx_t_12), ((PyObject *)__pyx_t_13)); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7449; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_12)); __pyx_t_12 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_13)); __pyx_t_13 = 0; if (!(likely(((__pyx_t_7) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_7, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7449; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_19 = ((PyArrayObject *)__pyx_t_7); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __pyx_t_4 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_t_19, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_4 < 0)) { PyErr_Fetch(&__pyx_t_16, &__pyx_t_17, &__pyx_t_18); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_v_result, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_16); Py_XDECREF(__pyx_t_17); Py_XDECREF(__pyx_t_18); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_16, __pyx_t_17, __pyx_t_18); } } __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_4 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7449; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_19 = 0; __pyx_v_result = ((PyArrayObject *)__pyx_t_7); __pyx_t_7 = 0; /* "pandas/src/generated.pyx":7451 * result = np.empty(count, dtype=object) * * i = 0 # <<<<<<<<<<<<<< * j = 0 * count = 0 */ __pyx_v_i = 0; /* "pandas/src/generated.pyx":7452 * * i = 0 * j = 0 # <<<<<<<<<<<<<< * count = 0 * if nleft > 0: */ __pyx_v_j = 0; /* "pandas/src/generated.pyx":7453 * i = 0 * j = 0 * count = 0 # <<<<<<<<<<<<<< * if nleft > 0: * while i < nleft: */ __pyx_v_count = 0; /* "pandas/src/generated.pyx":7454 * j = 0 * count = 0 * if nleft > 0: # <<<<<<<<<<<<<< * while i < nleft: * if j == nright: */ __pyx_t_9 = ((__pyx_v_nleft > 0) != 0); if (__pyx_t_9) { /* "pandas/src/generated.pyx":7455 * count = 0 * if nleft > 0: * while i < nleft: # <<<<<<<<<<<<<< * if j == nright: * while i < nleft: */ while (1) { __pyx_t_9 = ((__pyx_v_i < __pyx_v_nleft) != 0); if (!__pyx_t_9) break; /* "pandas/src/generated.pyx":7456 * if nleft > 0: * while i < nleft: * if j == nright: # <<<<<<<<<<<<<< * while i < nleft: * lindexer[count] = i */ __pyx_t_9 = ((__pyx_v_j == __pyx_v_nright) != 0); if (__pyx_t_9) { /* "pandas/src/generated.pyx":7457 * while i < nleft: * if j == nright: * while i < nleft: # <<<<<<<<<<<<<< * lindexer[count] = i * rindexer[count] = -1 */ while (1) { __pyx_t_9 = ((__pyx_v_i < __pyx_v_nleft) != 0); if (!__pyx_t_9) break; /* "pandas/src/generated.pyx":7458 * if j == nright: * while i < nleft: * lindexer[count] = i # <<<<<<<<<<<<<< * rindexer[count] = -1 * result[count] = left[i] */ __pyx_t_20 = __pyx_v_count; __pyx_t_4 = -1; if (__pyx_t_20 < 0) { __pyx_t_20 += __pyx_pybuffernd_lindexer.diminfo[0].shape; if (unlikely(__pyx_t_20 < 0)) __pyx_t_4 = 0; } else if (unlikely(__pyx_t_20 >= __pyx_pybuffernd_lindexer.diminfo[0].shape)) __pyx_t_4 = 0; if (unlikely(__pyx_t_4 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_4); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7458; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_lindexer.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_lindexer.diminfo[0].strides) = __pyx_v_i; /* "pandas/src/generated.pyx":7459 * while i < nleft: * lindexer[count] = i * rindexer[count] = -1 # <<<<<<<<<<<<<< * result[count] = left[i] * i += 1 */ __pyx_t_21 = __pyx_v_count; __pyx_t_4 = -1; if (__pyx_t_21 < 0) { __pyx_t_21 += __pyx_pybuffernd_rindexer.diminfo[0].shape; if (unlikely(__pyx_t_21 < 0)) __pyx_t_4 = 0; } else if (unlikely(__pyx_t_21 >= __pyx_pybuffernd_rindexer.diminfo[0].shape)) __pyx_t_4 = 0; if (unlikely(__pyx_t_4 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_4); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7459; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_rindexer.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_rindexer.diminfo[0].strides) = -1; /* "pandas/src/generated.pyx":7460 * lindexer[count] = i * rindexer[count] = -1 * result[count] = left[i] # <<<<<<<<<<<<<< * i += 1 * count += 1 */ __pyx_t_22 = __pyx_v_i; __pyx_t_4 = -1; if (__pyx_t_22 < 0) { __pyx_t_22 += __pyx_pybuffernd_left.diminfo[0].shape; if (unlikely(__pyx_t_22 < 0)) __pyx_t_4 = 0; } else if (unlikely(__pyx_t_22 >= __pyx_pybuffernd_left.diminfo[0].shape)) __pyx_t_4 = 0; if (unlikely(__pyx_t_4 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_4); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7460; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_7 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_left.rcbuffer->pybuffer.buf, __pyx_t_22, __pyx_pybuffernd_left.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_7); __pyx_t_23 = __pyx_v_count; __pyx_t_4 = -1; if (__pyx_t_23 < 0) { __pyx_t_23 += __pyx_pybuffernd_result.diminfo[0].shape; if (unlikely(__pyx_t_23 < 0)) __pyx_t_4 = 0; } else if (unlikely(__pyx_t_23 >= __pyx_pybuffernd_result.diminfo[0].shape)) __pyx_t_4 = 0; if (unlikely(__pyx_t_4 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_4); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7460; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_24 = __Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_23, __pyx_pybuffernd_result.diminfo[0].strides); __Pyx_GOTREF(*__pyx_t_24); __Pyx_INCREF(__pyx_t_7); __Pyx_DECREF(*__pyx_t_24); *__pyx_t_24 = __pyx_t_7; __Pyx_GIVEREF(*__pyx_t_24); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; /* "pandas/src/generated.pyx":7461 * rindexer[count] = -1 * result[count] = left[i] * i += 1 # <<<<<<<<<<<<<< * count += 1 * break */ __pyx_v_i = (__pyx_v_i + 1); /* "pandas/src/generated.pyx":7462 * result[count] = left[i] * i += 1 * count += 1 # <<<<<<<<<<<<<< * break * */ __pyx_v_count = (__pyx_v_count + 1); } /* "pandas/src/generated.pyx":7463 * i += 1 * count += 1 * break # <<<<<<<<<<<<<< * * lval = left[i] */ goto __pyx_L14_break; goto __pyx_L15; } __pyx_L15:; /* "pandas/src/generated.pyx":7465 * break * * lval = left[i] # <<<<<<<<<<<<<< * rval = right[j] * */ __pyx_t_25 = __pyx_v_i; __pyx_t_4 = -1; if (__pyx_t_25 < 0) { __pyx_t_25 += __pyx_pybuffernd_left.diminfo[0].shape; if (unlikely(__pyx_t_25 < 0)) __pyx_t_4 = 0; } else if (unlikely(__pyx_t_25 >= __pyx_pybuffernd_left.diminfo[0].shape)) __pyx_t_4 = 0; if (unlikely(__pyx_t_4 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_4); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7465; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_7 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_left.rcbuffer->pybuffer.buf, __pyx_t_25, __pyx_pybuffernd_left.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_7); __Pyx_XDECREF_SET(__pyx_v_lval, __pyx_t_7); __pyx_t_7 = 0; /* "pandas/src/generated.pyx":7466 * * lval = left[i] * rval = right[j] # <<<<<<<<<<<<<< * * if lval == rval: */ __pyx_t_26 = __pyx_v_j; __pyx_t_4 = -1; if (__pyx_t_26 < 0) { __pyx_t_26 += __pyx_pybuffernd_right.diminfo[0].shape; if (unlikely(__pyx_t_26 < 0)) __pyx_t_4 = 0; } else if (unlikely(__pyx_t_26 >= __pyx_pybuffernd_right.diminfo[0].shape)) __pyx_t_4 = 0; if (unlikely(__pyx_t_4 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_4); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7466; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_7 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_right.rcbuffer->pybuffer.buf, __pyx_t_26, __pyx_pybuffernd_right.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_7); __Pyx_XDECREF_SET(__pyx_v_rval, __pyx_t_7); __pyx_t_7 = 0; /* "pandas/src/generated.pyx":7468 * rval = right[j] * * if lval == rval: # <<<<<<<<<<<<<< * lindexer[count] = i * rindexer[count] = j */ __pyx_t_7 = PyObject_RichCompare(__pyx_v_lval, __pyx_v_rval, Py_EQ); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7468; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7468; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (__pyx_t_9) { /* "pandas/src/generated.pyx":7469 * * if lval == rval: * lindexer[count] = i # <<<<<<<<<<<<<< * rindexer[count] = j * result[count] = lval */ __pyx_t_27 = __pyx_v_count; __pyx_t_4 = -1; if (__pyx_t_27 < 0) { __pyx_t_27 += __pyx_pybuffernd_lindexer.diminfo[0].shape; if (unlikely(__pyx_t_27 < 0)) __pyx_t_4 = 0; } else if (unlikely(__pyx_t_27 >= __pyx_pybuffernd_lindexer.diminfo[0].shape)) __pyx_t_4 = 0; if (unlikely(__pyx_t_4 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_4); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7469; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_lindexer.rcbuffer->pybuffer.buf, __pyx_t_27, __pyx_pybuffernd_lindexer.diminfo[0].strides) = __pyx_v_i; /* "pandas/src/generated.pyx":7470 * if lval == rval: * lindexer[count] = i * rindexer[count] = j # <<<<<<<<<<<<<< * result[count] = lval * count += 1 */ __pyx_t_28 = __pyx_v_count; __pyx_t_4 = -1; if (__pyx_t_28 < 0) { __pyx_t_28 += __pyx_pybuffernd_rindexer.diminfo[0].shape; if (unlikely(__pyx_t_28 < 0)) __pyx_t_4 = 0; } else if (unlikely(__pyx_t_28 >= __pyx_pybuffernd_rindexer.diminfo[0].shape)) __pyx_t_4 = 0; if (unlikely(__pyx_t_4 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_4); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7470; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_rindexer.rcbuffer->pybuffer.buf, __pyx_t_28, __pyx_pybuffernd_rindexer.diminfo[0].strides) = __pyx_v_j; /* "pandas/src/generated.pyx":7471 * lindexer[count] = i * rindexer[count] = j * result[count] = lval # <<<<<<<<<<<<<< * count += 1 * if i < nleft - 1: */ __pyx_t_29 = __pyx_v_count; __pyx_t_4 = -1; if (__pyx_t_29 < 0) { __pyx_t_29 += __pyx_pybuffernd_result.diminfo[0].shape; if (unlikely(__pyx_t_29 < 0)) __pyx_t_4 = 0; } else if (unlikely(__pyx_t_29 >= __pyx_pybuffernd_result.diminfo[0].shape)) __pyx_t_4 = 0; if (unlikely(__pyx_t_4 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_4); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7471; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_24 = __Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_29, __pyx_pybuffernd_result.diminfo[0].strides); __Pyx_GOTREF(*__pyx_t_24); __Pyx_INCREF(__pyx_v_lval); __Pyx_DECREF(*__pyx_t_24); *__pyx_t_24 = __pyx_v_lval; __Pyx_GIVEREF(*__pyx_t_24); /* "pandas/src/generated.pyx":7472 * rindexer[count] = j * result[count] = lval * count += 1 # <<<<<<<<<<<<<< * if i < nleft - 1: * if j < nright - 1 and right[j + 1] == rval: */ __pyx_v_count = (__pyx_v_count + 1); /* "pandas/src/generated.pyx":7473 * result[count] = lval * count += 1 * if i < nleft - 1: # <<<<<<<<<<<<<< * if j < nright - 1 and right[j + 1] == rval: * j += 1 */ __pyx_t_9 = ((__pyx_v_i < (__pyx_v_nleft - 1)) != 0); if (__pyx_t_9) { /* "pandas/src/generated.pyx":7474 * count += 1 * if i < nleft - 1: * if j < nright - 1 and right[j + 1] == rval: # <<<<<<<<<<<<<< * j += 1 * else: */ __pyx_t_9 = (__pyx_v_j < (__pyx_v_nright - 1)); if (__pyx_t_9) { __pyx_t_30 = (__pyx_v_j + 1); __pyx_t_4 = -1; if (__pyx_t_30 < 0) { __pyx_t_30 += __pyx_pybuffernd_right.diminfo[0].shape; if (unlikely(__pyx_t_30 < 0)) __pyx_t_4 = 0; } else if (unlikely(__pyx_t_30 >= __pyx_pybuffernd_right.diminfo[0].shape)) __pyx_t_4 = 0; if (unlikely(__pyx_t_4 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_4); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7474; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_7 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_right.rcbuffer->pybuffer.buf, __pyx_t_30, __pyx_pybuffernd_right.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_7); __pyx_t_13 = PyObject_RichCompare(__pyx_t_7, __pyx_v_rval, Py_EQ); __Pyx_XGOTREF(__pyx_t_13); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7474; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_13); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7474; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_8 = __pyx_t_2; } else { __pyx_t_8 = __pyx_t_9; } if (__pyx_t_8) { /* "pandas/src/generated.pyx":7475 * if i < nleft - 1: * if j < nright - 1 and right[j + 1] == rval: * j += 1 # <<<<<<<<<<<<<< * else: * i += 1 */ __pyx_v_j = (__pyx_v_j + 1); goto __pyx_L20; } /*else*/ { /* "pandas/src/generated.pyx":7477 * j += 1 * else: * i += 1 # <<<<<<<<<<<<<< * if left[i] != rval: * j += 1 */ __pyx_v_i = (__pyx_v_i + 1); /* "pandas/src/generated.pyx":7478 * else: * i += 1 * if left[i] != rval: # <<<<<<<<<<<<<< * j += 1 * elif j < nright - 1: */ __pyx_t_31 = __pyx_v_i; __pyx_t_4 = -1; if (__pyx_t_31 < 0) { __pyx_t_31 += __pyx_pybuffernd_left.diminfo[0].shape; if (unlikely(__pyx_t_31 < 0)) __pyx_t_4 = 0; } else if (unlikely(__pyx_t_31 >= __pyx_pybuffernd_left.diminfo[0].shape)) __pyx_t_4 = 0; if (unlikely(__pyx_t_4 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_4); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7478; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_13 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_left.rcbuffer->pybuffer.buf, __pyx_t_31, __pyx_pybuffernd_left.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_13); __pyx_t_7 = PyObject_RichCompare(__pyx_t_13, __pyx_v_rval, Py_NE); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7478; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7478; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (__pyx_t_8) { /* "pandas/src/generated.pyx":7479 * i += 1 * if left[i] != rval: * j += 1 # <<<<<<<<<<<<<< * elif j < nright - 1: * j += 1 */ __pyx_v_j = (__pyx_v_j + 1); goto __pyx_L21; } __pyx_L21:; } __pyx_L20:; goto __pyx_L19; } /* "pandas/src/generated.pyx":7480 * if left[i] != rval: * j += 1 * elif j < nright - 1: # <<<<<<<<<<<<<< * j += 1 * if lval != right[j]: */ __pyx_t_8 = ((__pyx_v_j < (__pyx_v_nright - 1)) != 0); if (__pyx_t_8) { /* "pandas/src/generated.pyx":7481 * j += 1 * elif j < nright - 1: * j += 1 # <<<<<<<<<<<<<< * if lval != right[j]: * i += 1 */ __pyx_v_j = (__pyx_v_j + 1); /* "pandas/src/generated.pyx":7482 * elif j < nright - 1: * j += 1 * if lval != right[j]: # <<<<<<<<<<<<<< * i += 1 * else: */ __pyx_t_32 = __pyx_v_j; __pyx_t_4 = -1; if (__pyx_t_32 < 0) { __pyx_t_32 += __pyx_pybuffernd_right.diminfo[0].shape; if (unlikely(__pyx_t_32 < 0)) __pyx_t_4 = 0; } else if (unlikely(__pyx_t_32 >= __pyx_pybuffernd_right.diminfo[0].shape)) __pyx_t_4 = 0; if (unlikely(__pyx_t_4 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_4); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7482; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_7 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_right.rcbuffer->pybuffer.buf, __pyx_t_32, __pyx_pybuffernd_right.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_7); __pyx_t_13 = PyObject_RichCompare(__pyx_v_lval, __pyx_t_7, Py_NE); __Pyx_XGOTREF(__pyx_t_13); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7482; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_13); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7482; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; if (__pyx_t_8) { /* "pandas/src/generated.pyx":7483 * j += 1 * if lval != right[j]: * i += 1 # <<<<<<<<<<<<<< * else: * # end of the road */ __pyx_v_i = (__pyx_v_i + 1); goto __pyx_L22; } __pyx_L22:; goto __pyx_L19; } /*else*/ { /* "pandas/src/generated.pyx":7486 * else: * # end of the road * break # <<<<<<<<<<<<<< * elif lval < rval: * lindexer[count] = i */ goto __pyx_L14_break; } __pyx_L19:; goto __pyx_L18; } /* "pandas/src/generated.pyx":7487 * # end of the road * break * elif lval < rval: # <<<<<<<<<<<<<< * lindexer[count] = i * rindexer[count] = -1 */ __pyx_t_13 = PyObject_RichCompare(__pyx_v_lval, __pyx_v_rval, Py_LT); __Pyx_XGOTREF(__pyx_t_13); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7487; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_13); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7487; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; if (__pyx_t_8) { /* "pandas/src/generated.pyx":7488 * break * elif lval < rval: * lindexer[count] = i # <<<<<<<<<<<<<< * rindexer[count] = -1 * result[count] = left[i] */ __pyx_t_33 = __pyx_v_count; __pyx_t_4 = -1; if (__pyx_t_33 < 0) { __pyx_t_33 += __pyx_pybuffernd_lindexer.diminfo[0].shape; if (unlikely(__pyx_t_33 < 0)) __pyx_t_4 = 0; } else if (unlikely(__pyx_t_33 >= __pyx_pybuffernd_lindexer.diminfo[0].shape)) __pyx_t_4 = 0; if (unlikely(__pyx_t_4 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_4); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7488; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_lindexer.rcbuffer->pybuffer.buf, __pyx_t_33, __pyx_pybuffernd_lindexer.diminfo[0].strides) = __pyx_v_i; /* "pandas/src/generated.pyx":7489 * elif lval < rval: * lindexer[count] = i * rindexer[count] = -1 # <<<<<<<<<<<<<< * result[count] = left[i] * count += 1 */ __pyx_t_34 = __pyx_v_count; __pyx_t_4 = -1; if (__pyx_t_34 < 0) { __pyx_t_34 += __pyx_pybuffernd_rindexer.diminfo[0].shape; if (unlikely(__pyx_t_34 < 0)) __pyx_t_4 = 0; } else if (unlikely(__pyx_t_34 >= __pyx_pybuffernd_rindexer.diminfo[0].shape)) __pyx_t_4 = 0; if (unlikely(__pyx_t_4 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_4); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7489; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_rindexer.rcbuffer->pybuffer.buf, __pyx_t_34, __pyx_pybuffernd_rindexer.diminfo[0].strides) = -1; /* "pandas/src/generated.pyx":7490 * lindexer[count] = i * rindexer[count] = -1 * result[count] = left[i] # <<<<<<<<<<<<<< * count += 1 * i += 1 */ __pyx_t_35 = __pyx_v_i; __pyx_t_4 = -1; if (__pyx_t_35 < 0) { __pyx_t_35 += __pyx_pybuffernd_left.diminfo[0].shape; if (unlikely(__pyx_t_35 < 0)) __pyx_t_4 = 0; } else if (unlikely(__pyx_t_35 >= __pyx_pybuffernd_left.diminfo[0].shape)) __pyx_t_4 = 0; if (unlikely(__pyx_t_4 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_4); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7490; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_13 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_left.rcbuffer->pybuffer.buf, __pyx_t_35, __pyx_pybuffernd_left.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_13); __pyx_t_36 = __pyx_v_count; __pyx_t_4 = -1; if (__pyx_t_36 < 0) { __pyx_t_36 += __pyx_pybuffernd_result.diminfo[0].shape; if (unlikely(__pyx_t_36 < 0)) __pyx_t_4 = 0; } else if (unlikely(__pyx_t_36 >= __pyx_pybuffernd_result.diminfo[0].shape)) __pyx_t_4 = 0; if (unlikely(__pyx_t_4 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_4); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7490; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_24 = __Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_36, __pyx_pybuffernd_result.diminfo[0].strides); __Pyx_GOTREF(*__pyx_t_24); __Pyx_INCREF(__pyx_t_13); __Pyx_DECREF(*__pyx_t_24); *__pyx_t_24 = __pyx_t_13; __Pyx_GIVEREF(*__pyx_t_24); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; /* "pandas/src/generated.pyx":7491 * rindexer[count] = -1 * result[count] = left[i] * count += 1 # <<<<<<<<<<<<<< * i += 1 * else: */ __pyx_v_count = (__pyx_v_count + 1); /* "pandas/src/generated.pyx":7492 * result[count] = left[i] * count += 1 * i += 1 # <<<<<<<<<<<<<< * else: * j += 1 */ __pyx_v_i = (__pyx_v_i + 1); goto __pyx_L18; } /*else*/ { /* "pandas/src/generated.pyx":7494 * i += 1 * else: * j += 1 # <<<<<<<<<<<<<< * * return result, lindexer, rindexer */ __pyx_v_j = (__pyx_v_j + 1); } __pyx_L18:; } __pyx_L14_break:; goto __pyx_L12; } __pyx_L12:; /* "pandas/src/generated.pyx":7496 * j += 1 * * return result, lindexer, rindexer # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_13 = PyTuple_New(3); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7496; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __Pyx_INCREF(((PyObject *)__pyx_v_result)); PyTuple_SET_ITEM(__pyx_t_13, 0, ((PyObject *)__pyx_v_result)); __Pyx_GIVEREF(((PyObject *)__pyx_v_result)); __Pyx_INCREF(((PyObject *)__pyx_v_lindexer)); PyTuple_SET_ITEM(__pyx_t_13, 1, ((PyObject *)__pyx_v_lindexer)); __Pyx_GIVEREF(((PyObject *)__pyx_v_lindexer)); __Pyx_INCREF(((PyObject *)__pyx_v_rindexer)); PyTuple_SET_ITEM(__pyx_t_13, 2, ((PyObject *)__pyx_v_rindexer)); __Pyx_GIVEREF(((PyObject *)__pyx_v_rindexer)); __pyx_r = ((PyObject *)__pyx_t_13); __pyx_t_13 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_12); __Pyx_XDECREF(__pyx_t_13); __Pyx_XDECREF(__pyx_t_14); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_left.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_lindexer.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_right.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_rindexer.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.left_join_indexer_object", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_left.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_lindexer.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_right.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_rindexer.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF(__pyx_v_lval); __Pyx_XDECREF(__pyx_v_rval); __Pyx_XDECREF((PyObject *)__pyx_v_lindexer); __Pyx_XDECREF((PyObject *)__pyx_v_rindexer); __Pyx_XDECREF((PyObject *)__pyx_v_result); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_471left_join_indexer_int32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6pandas_5algos_470left_join_indexer_int32[] = "\n Two-pass algorithm for monotonic indexes. Handles many-to-one merges\n "; static PyMethodDef __pyx_mdef_6pandas_5algos_471left_join_indexer_int32 = {__Pyx_NAMESTR("left_join_indexer_int32"), (PyCFunction)__pyx_pw_6pandas_5algos_471left_join_indexer_int32, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_5algos_470left_join_indexer_int32)}; static PyObject *__pyx_pw_6pandas_5algos_471left_join_indexer_int32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_left = 0; PyArrayObject *__pyx_v_right = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("left_join_indexer_int32 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__left,&__pyx_n_s__right,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__left)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__right)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("left_join_indexer_int32", 1, 2, 2, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7499; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "left_join_indexer_int32") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7499; __pyx_clineno = __LINE__; goto __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_left = ((PyArrayObject *)values[0]); __pyx_v_right = ((PyArrayObject *)values[1]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("left_join_indexer_int32", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7499; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.left_join_indexer_int32", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_left), __pyx_ptype_5numpy_ndarray, 1, "left", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7499; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_right), __pyx_ptype_5numpy_ndarray, 1, "right", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7500; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_470left_join_indexer_int32(__pyx_self, __pyx_v_left, __pyx_v_right); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":7499 * * * def left_join_indexer_int32(ndarray[int32_t] left, # <<<<<<<<<<<<<< * ndarray[int32_t] right): * ''' */ static PyObject *__pyx_pf_6pandas_5algos_470left_join_indexer_int32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_left, PyArrayObject *__pyx_v_right) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_nright; Py_ssize_t __pyx_v_nleft; Py_ssize_t __pyx_v_count; __pyx_t_5numpy_int32_t __pyx_v_lval; __pyx_t_5numpy_int32_t __pyx_v_rval; PyArrayObject *__pyx_v_lindexer = 0; PyArrayObject *__pyx_v_rindexer = 0; PyArrayObject *__pyx_v_result = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_left; __Pyx_Buffer __pyx_pybuffer_left; __Pyx_LocalBuf_ND __pyx_pybuffernd_lindexer; __Pyx_Buffer __pyx_pybuffer_lindexer; __Pyx_LocalBuf_ND __pyx_pybuffernd_result; __Pyx_Buffer __pyx_pybuffer_result; __Pyx_LocalBuf_ND __pyx_pybuffernd_right; __Pyx_Buffer __pyx_pybuffer_right; __Pyx_LocalBuf_ND __pyx_pybuffernd_rindexer; __Pyx_Buffer __pyx_pybuffer_rindexer; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; int __pyx_t_2; int __pyx_t_3; Py_ssize_t __pyx_t_4; Py_ssize_t __pyx_t_5; int __pyx_t_6; int __pyx_t_7; Py_ssize_t __pyx_t_8; Py_ssize_t __pyx_t_9; PyObject *__pyx_t_10 = NULL; PyObject *__pyx_t_11 = NULL; PyObject *__pyx_t_12 = NULL; PyObject *__pyx_t_13 = NULL; PyObject *__pyx_t_14 = NULL; PyArrayObject *__pyx_t_15 = NULL; PyObject *__pyx_t_16 = NULL; PyObject *__pyx_t_17 = NULL; PyObject *__pyx_t_18 = NULL; PyArrayObject *__pyx_t_19 = NULL; 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("left_join_indexer_int32", 0); __pyx_pybuffer_lindexer.pybuffer.buf = NULL; __pyx_pybuffer_lindexer.refcount = 0; __pyx_pybuffernd_lindexer.data = NULL; __pyx_pybuffernd_lindexer.rcbuffer = &__pyx_pybuffer_lindexer; __pyx_pybuffer_rindexer.pybuffer.buf = NULL; __pyx_pybuffer_rindexer.refcount = 0; __pyx_pybuffernd_rindexer.data = NULL; __pyx_pybuffernd_rindexer.rcbuffer = &__pyx_pybuffer_rindexer; __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_left.pybuffer.buf = NULL; __pyx_pybuffer_left.refcount = 0; __pyx_pybuffernd_left.data = NULL; __pyx_pybuffernd_left.rcbuffer = &__pyx_pybuffer_left; __pyx_pybuffer_right.pybuffer.buf = NULL; __pyx_pybuffer_right.refcount = 0; __pyx_pybuffernd_right.data = NULL; __pyx_pybuffernd_right.rcbuffer = &__pyx_pybuffer_right; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_left.rcbuffer->pybuffer, (PyObject*)__pyx_v_left, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7499; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_left.diminfo[0].strides = __pyx_pybuffernd_left.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_left.diminfo[0].shape = __pyx_pybuffernd_left.rcbuffer->pybuffer.shape[0]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_right.rcbuffer->pybuffer, (PyObject*)__pyx_v_right, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7499; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_right.diminfo[0].strides = __pyx_pybuffernd_right.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_right.diminfo[0].shape = __pyx_pybuffernd_right.rcbuffer->pybuffer.shape[0]; /* "pandas/src/generated.pyx":7510 * ndarray[int32_t] result * * nleft = len(left) # <<<<<<<<<<<<<< * nright = len(right) * */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_left)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7510; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_nleft = __pyx_t_1; /* "pandas/src/generated.pyx":7511 * * nleft = len(left) * nright = len(right) # <<<<<<<<<<<<<< * * i = 0 */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_right)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7511; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_nright = __pyx_t_1; /* "pandas/src/generated.pyx":7513 * nright = len(right) * * i = 0 # <<<<<<<<<<<<<< * j = 0 * count = 0 */ __pyx_v_i = 0; /* "pandas/src/generated.pyx":7514 * * i = 0 * j = 0 # <<<<<<<<<<<<<< * count = 0 * if nleft > 0: */ __pyx_v_j = 0; /* "pandas/src/generated.pyx":7515 * i = 0 * j = 0 * count = 0 # <<<<<<<<<<<<<< * if nleft > 0: * while i < nleft: */ __pyx_v_count = 0; /* "pandas/src/generated.pyx":7516 * j = 0 * count = 0 * if nleft > 0: # <<<<<<<<<<<<<< * while i < nleft: * if j == nright: */ __pyx_t_2 = ((__pyx_v_nleft > 0) != 0); if (__pyx_t_2) { /* "pandas/src/generated.pyx":7517 * count = 0 * if nleft > 0: * while i < nleft: # <<<<<<<<<<<<<< * if j == nright: * count += nleft - i */ while (1) { __pyx_t_2 = ((__pyx_v_i < __pyx_v_nleft) != 0); if (!__pyx_t_2) break; /* "pandas/src/generated.pyx":7518 * if nleft > 0: * while i < nleft: * if j == nright: # <<<<<<<<<<<<<< * count += nleft - i * break */ __pyx_t_2 = ((__pyx_v_j == __pyx_v_nright) != 0); if (__pyx_t_2) { /* "pandas/src/generated.pyx":7519 * while i < nleft: * if j == nright: * count += nleft - i # <<<<<<<<<<<<<< * break * */ __pyx_v_count = (__pyx_v_count + (__pyx_v_nleft - __pyx_v_i)); /* "pandas/src/generated.pyx":7520 * if j == nright: * count += nleft - i * break # <<<<<<<<<<<<<< * * lval = left[i] */ goto __pyx_L5_break; goto __pyx_L6; } __pyx_L6:; /* "pandas/src/generated.pyx":7522 * break * * lval = left[i] # <<<<<<<<<<<<<< * rval = right[j] * */ __pyx_t_1 = __pyx_v_i; __pyx_t_3 = -1; if (__pyx_t_1 < 0) { __pyx_t_1 += __pyx_pybuffernd_left.diminfo[0].shape; if (unlikely(__pyx_t_1 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_1 >= __pyx_pybuffernd_left.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7522; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_lval = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_left.rcbuffer->pybuffer.buf, __pyx_t_1, __pyx_pybuffernd_left.diminfo[0].strides)); /* "pandas/src/generated.pyx":7523 * * lval = left[i] * rval = right[j] # <<<<<<<<<<<<<< * * if lval == rval: */ __pyx_t_4 = __pyx_v_j; __pyx_t_3 = -1; if (__pyx_t_4 < 0) { __pyx_t_4 += __pyx_pybuffernd_right.diminfo[0].shape; if (unlikely(__pyx_t_4 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_4 >= __pyx_pybuffernd_right.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7523; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_rval = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_right.rcbuffer->pybuffer.buf, __pyx_t_4, __pyx_pybuffernd_right.diminfo[0].strides)); /* "pandas/src/generated.pyx":7525 * rval = right[j] * * if lval == rval: # <<<<<<<<<<<<<< * count += 1 * if i < nleft - 1: */ __pyx_t_2 = ((__pyx_v_lval == __pyx_v_rval) != 0); if (__pyx_t_2) { /* "pandas/src/generated.pyx":7526 * * if lval == rval: * count += 1 # <<<<<<<<<<<<<< * if i < nleft - 1: * if j < nright - 1 and right[j + 1] == rval: */ __pyx_v_count = (__pyx_v_count + 1); /* "pandas/src/generated.pyx":7527 * if lval == rval: * count += 1 * if i < nleft - 1: # <<<<<<<<<<<<<< * if j < nright - 1 and right[j + 1] == rval: * j += 1 */ __pyx_t_2 = ((__pyx_v_i < (__pyx_v_nleft - 1)) != 0); if (__pyx_t_2) { /* "pandas/src/generated.pyx":7528 * count += 1 * if i < nleft - 1: * if j < nright - 1 and right[j + 1] == rval: # <<<<<<<<<<<<<< * j += 1 * else: */ __pyx_t_2 = ((__pyx_v_j < (__pyx_v_nright - 1)) != 0); if (__pyx_t_2) { __pyx_t_5 = (__pyx_v_j + 1); __pyx_t_3 = -1; if (__pyx_t_5 < 0) { __pyx_t_5 += __pyx_pybuffernd_right.diminfo[0].shape; if (unlikely(__pyx_t_5 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_5 >= __pyx_pybuffernd_right.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7528; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_6 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_right.rcbuffer->pybuffer.buf, __pyx_t_5, __pyx_pybuffernd_right.diminfo[0].strides)) == __pyx_v_rval) != 0); __pyx_t_7 = __pyx_t_6; } else { __pyx_t_7 = __pyx_t_2; } if (__pyx_t_7) { /* "pandas/src/generated.pyx":7529 * if i < nleft - 1: * if j < nright - 1 and right[j + 1] == rval: * j += 1 # <<<<<<<<<<<<<< * else: * i += 1 */ __pyx_v_j = (__pyx_v_j + 1); goto __pyx_L9; } /*else*/ { /* "pandas/src/generated.pyx":7531 * j += 1 * else: * i += 1 # <<<<<<<<<<<<<< * if left[i] != rval: * j += 1 */ __pyx_v_i = (__pyx_v_i + 1); /* "pandas/src/generated.pyx":7532 * else: * i += 1 * if left[i] != rval: # <<<<<<<<<<<<<< * j += 1 * elif j < nright - 1: */ __pyx_t_8 = __pyx_v_i; __pyx_t_3 = -1; if (__pyx_t_8 < 0) { __pyx_t_8 += __pyx_pybuffernd_left.diminfo[0].shape; if (unlikely(__pyx_t_8 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_8 >= __pyx_pybuffernd_left.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7532; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_7 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_left.rcbuffer->pybuffer.buf, __pyx_t_8, __pyx_pybuffernd_left.diminfo[0].strides)) != __pyx_v_rval) != 0); if (__pyx_t_7) { /* "pandas/src/generated.pyx":7533 * i += 1 * if left[i] != rval: * j += 1 # <<<<<<<<<<<<<< * elif j < nright - 1: * j += 1 */ __pyx_v_j = (__pyx_v_j + 1); goto __pyx_L10; } __pyx_L10:; } __pyx_L9:; goto __pyx_L8; } /* "pandas/src/generated.pyx":7534 * if left[i] != rval: * j += 1 * elif j < nright - 1: # <<<<<<<<<<<<<< * j += 1 * if lval != right[j]: */ __pyx_t_7 = ((__pyx_v_j < (__pyx_v_nright - 1)) != 0); if (__pyx_t_7) { /* "pandas/src/generated.pyx":7535 * j += 1 * elif j < nright - 1: * j += 1 # <<<<<<<<<<<<<< * if lval != right[j]: * i += 1 */ __pyx_v_j = (__pyx_v_j + 1); /* "pandas/src/generated.pyx":7536 * elif j < nright - 1: * j += 1 * if lval != right[j]: # <<<<<<<<<<<<<< * i += 1 * else: */ __pyx_t_9 = __pyx_v_j; __pyx_t_3 = -1; if (__pyx_t_9 < 0) { __pyx_t_9 += __pyx_pybuffernd_right.diminfo[0].shape; if (unlikely(__pyx_t_9 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_9 >= __pyx_pybuffernd_right.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7536; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_7 = ((__pyx_v_lval != (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_right.rcbuffer->pybuffer.buf, __pyx_t_9, __pyx_pybuffernd_right.diminfo[0].strides))) != 0); if (__pyx_t_7) { /* "pandas/src/generated.pyx":7537 * j += 1 * if lval != right[j]: * i += 1 # <<<<<<<<<<<<<< * else: * # end of the road */ __pyx_v_i = (__pyx_v_i + 1); goto __pyx_L11; } __pyx_L11:; goto __pyx_L8; } /*else*/ { /* "pandas/src/generated.pyx":7540 * else: * # end of the road * break # <<<<<<<<<<<<<< * elif lval < rval: * count += 1 */ goto __pyx_L5_break; } __pyx_L8:; goto __pyx_L7; } /* "pandas/src/generated.pyx":7541 * # end of the road * break * elif lval < rval: # <<<<<<<<<<<<<< * count += 1 * i += 1 */ __pyx_t_7 = ((__pyx_v_lval < __pyx_v_rval) != 0); if (__pyx_t_7) { /* "pandas/src/generated.pyx":7542 * break * elif lval < rval: * count += 1 # <<<<<<<<<<<<<< * i += 1 * else: */ __pyx_v_count = (__pyx_v_count + 1); /* "pandas/src/generated.pyx":7543 * elif lval < rval: * count += 1 * i += 1 # <<<<<<<<<<<<<< * else: * j += 1 */ __pyx_v_i = (__pyx_v_i + 1); goto __pyx_L7; } /*else*/ { /* "pandas/src/generated.pyx":7545 * i += 1 * else: * j += 1 # <<<<<<<<<<<<<< * * # do it again now that result size is known */ __pyx_v_j = (__pyx_v_j + 1); } __pyx_L7:; } __pyx_L5_break:; goto __pyx_L3; } __pyx_L3:; /* "pandas/src/generated.pyx":7549 * # do it again now that result size is known * * lindexer = np.empty(count, dtype=np.int64) # <<<<<<<<<<<<<< * rindexer = np.empty(count, dtype=np.int64) * result = np.empty(count, dtype=np.int32) */ __pyx_t_10 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7549; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s__empty); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7549; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_t_10 = PyInt_FromSsize_t(__pyx_v_count); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7549; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __pyx_t_12 = PyTuple_New(1); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7549; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_10); __Pyx_GIVEREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_t_10 = PyDict_New(); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7549; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_10)); __pyx_t_13 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7549; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_t_13, __pyx_n_s__int64); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7549; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_14); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; if (PyDict_SetItem(__pyx_t_10, ((PyObject *)__pyx_n_s__dtype), __pyx_t_14) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7549; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; __pyx_t_14 = PyObject_Call(__pyx_t_11, ((PyObject *)__pyx_t_12), ((PyObject *)__pyx_t_10)); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7549; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_14); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_12)); __pyx_t_12 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_10)); __pyx_t_10 = 0; if (!(likely(((__pyx_t_14) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_14, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7549; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_15 = ((PyArrayObject *)__pyx_t_14); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_lindexer.rcbuffer->pybuffer); __pyx_t_3 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_lindexer.rcbuffer->pybuffer, (PyObject*)__pyx_t_15, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_3 < 0)) { PyErr_Fetch(&__pyx_t_16, &__pyx_t_17, &__pyx_t_18); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_lindexer.rcbuffer->pybuffer, (PyObject*)__pyx_v_lindexer, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_16); Py_XDECREF(__pyx_t_17); Py_XDECREF(__pyx_t_18); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_16, __pyx_t_17, __pyx_t_18); } } __pyx_pybuffernd_lindexer.diminfo[0].strides = __pyx_pybuffernd_lindexer.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_lindexer.diminfo[0].shape = __pyx_pybuffernd_lindexer.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7549; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_15 = 0; __pyx_v_lindexer = ((PyArrayObject *)__pyx_t_14); __pyx_t_14 = 0; /* "pandas/src/generated.pyx":7550 * * lindexer = np.empty(count, dtype=np.int64) * rindexer = np.empty(count, dtype=np.int64) # <<<<<<<<<<<<<< * result = np.empty(count, dtype=np.int32) * */ __pyx_t_14 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7550; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_14); __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_14, __pyx_n_s__empty); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7550; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; __pyx_t_14 = PyInt_FromSsize_t(__pyx_v_count); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7550; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_14); __pyx_t_12 = PyTuple_New(1); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7550; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_14); __Pyx_GIVEREF(__pyx_t_14); __pyx_t_14 = 0; __pyx_t_14 = PyDict_New(); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7550; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_14)); __pyx_t_11 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7550; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s__int64); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7550; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; if (PyDict_SetItem(__pyx_t_14, ((PyObject *)__pyx_n_s__dtype), __pyx_t_13) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7550; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_13 = PyObject_Call(__pyx_t_10, ((PyObject *)__pyx_t_12), ((PyObject *)__pyx_t_14)); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7550; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_12)); __pyx_t_12 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_14)); __pyx_t_14 = 0; if (!(likely(((__pyx_t_13) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_13, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7550; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_15 = ((PyArrayObject *)__pyx_t_13); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_rindexer.rcbuffer->pybuffer); __pyx_t_3 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_rindexer.rcbuffer->pybuffer, (PyObject*)__pyx_t_15, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_3 < 0)) { PyErr_Fetch(&__pyx_t_18, &__pyx_t_17, &__pyx_t_16); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_rindexer.rcbuffer->pybuffer, (PyObject*)__pyx_v_rindexer, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_18); Py_XDECREF(__pyx_t_17); Py_XDECREF(__pyx_t_16); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_18, __pyx_t_17, __pyx_t_16); } } __pyx_pybuffernd_rindexer.diminfo[0].strides = __pyx_pybuffernd_rindexer.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_rindexer.diminfo[0].shape = __pyx_pybuffernd_rindexer.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7550; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_15 = 0; __pyx_v_rindexer = ((PyArrayObject *)__pyx_t_13); __pyx_t_13 = 0; /* "pandas/src/generated.pyx":7551 * lindexer = np.empty(count, dtype=np.int64) * rindexer = np.empty(count, dtype=np.int64) * result = np.empty(count, dtype=np.int32) # <<<<<<<<<<<<<< * * i = 0 */ __pyx_t_13 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7551; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_t_13, __pyx_n_s__empty); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7551; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_14); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_13 = PyInt_FromSsize_t(__pyx_v_count); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7551; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __pyx_t_12 = PyTuple_New(1); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7551; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_13); __Pyx_GIVEREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_13 = PyDict_New(); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7551; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_13)); __pyx_t_10 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7551; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s__int32); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7551; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; if (PyDict_SetItem(__pyx_t_13, ((PyObject *)__pyx_n_s__dtype), __pyx_t_11) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7551; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __pyx_t_11 = PyObject_Call(__pyx_t_14, ((PyObject *)__pyx_t_12), ((PyObject *)__pyx_t_13)); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7551; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_12)); __pyx_t_12 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_13)); __pyx_t_13 = 0; if (!(likely(((__pyx_t_11) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_11, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7551; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_19 = ((PyArrayObject *)__pyx_t_11); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __pyx_t_3 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_t_19, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_3 < 0)) { PyErr_Fetch(&__pyx_t_16, &__pyx_t_17, &__pyx_t_18); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_v_result, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_16); Py_XDECREF(__pyx_t_17); Py_XDECREF(__pyx_t_18); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_16, __pyx_t_17, __pyx_t_18); } } __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_3 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7551; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_19 = 0; __pyx_v_result = ((PyArrayObject *)__pyx_t_11); __pyx_t_11 = 0; /* "pandas/src/generated.pyx":7553 * result = np.empty(count, dtype=np.int32) * * i = 0 # <<<<<<<<<<<<<< * j = 0 * count = 0 */ __pyx_v_i = 0; /* "pandas/src/generated.pyx":7554 * * i = 0 * j = 0 # <<<<<<<<<<<<<< * count = 0 * if nleft > 0: */ __pyx_v_j = 0; /* "pandas/src/generated.pyx":7555 * i = 0 * j = 0 * count = 0 # <<<<<<<<<<<<<< * if nleft > 0: * while i < nleft: */ __pyx_v_count = 0; /* "pandas/src/generated.pyx":7556 * j = 0 * count = 0 * if nleft > 0: # <<<<<<<<<<<<<< * while i < nleft: * if j == nright: */ __pyx_t_7 = ((__pyx_v_nleft > 0) != 0); if (__pyx_t_7) { /* "pandas/src/generated.pyx":7557 * count = 0 * if nleft > 0: * while i < nleft: # <<<<<<<<<<<<<< * if j == nright: * while i < nleft: */ while (1) { __pyx_t_7 = ((__pyx_v_i < __pyx_v_nleft) != 0); if (!__pyx_t_7) break; /* "pandas/src/generated.pyx":7558 * if nleft > 0: * while i < nleft: * if j == nright: # <<<<<<<<<<<<<< * while i < nleft: * lindexer[count] = i */ __pyx_t_7 = ((__pyx_v_j == __pyx_v_nright) != 0); if (__pyx_t_7) { /* "pandas/src/generated.pyx":7559 * while i < nleft: * if j == nright: * while i < nleft: # <<<<<<<<<<<<<< * lindexer[count] = i * rindexer[count] = -1 */ while (1) { __pyx_t_7 = ((__pyx_v_i < __pyx_v_nleft) != 0); if (!__pyx_t_7) break; /* "pandas/src/generated.pyx":7560 * if j == nright: * while i < nleft: * lindexer[count] = i # <<<<<<<<<<<<<< * rindexer[count] = -1 * result[count] = left[i] */ __pyx_t_20 = __pyx_v_count; __pyx_t_3 = -1; if (__pyx_t_20 < 0) { __pyx_t_20 += __pyx_pybuffernd_lindexer.diminfo[0].shape; if (unlikely(__pyx_t_20 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_20 >= __pyx_pybuffernd_lindexer.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7560; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_lindexer.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_lindexer.diminfo[0].strides) = __pyx_v_i; /* "pandas/src/generated.pyx":7561 * while i < nleft: * lindexer[count] = i * rindexer[count] = -1 # <<<<<<<<<<<<<< * result[count] = left[i] * i += 1 */ __pyx_t_21 = __pyx_v_count; __pyx_t_3 = -1; if (__pyx_t_21 < 0) { __pyx_t_21 += __pyx_pybuffernd_rindexer.diminfo[0].shape; if (unlikely(__pyx_t_21 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_21 >= __pyx_pybuffernd_rindexer.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7561; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_rindexer.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_rindexer.diminfo[0].strides) = -1; /* "pandas/src/generated.pyx":7562 * lindexer[count] = i * rindexer[count] = -1 * result[count] = left[i] # <<<<<<<<<<<<<< * i += 1 * count += 1 */ __pyx_t_22 = __pyx_v_i; __pyx_t_3 = -1; if (__pyx_t_22 < 0) { __pyx_t_22 += __pyx_pybuffernd_left.diminfo[0].shape; if (unlikely(__pyx_t_22 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_22 >= __pyx_pybuffernd_left.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7562; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_23 = __pyx_v_count; __pyx_t_3 = -1; if (__pyx_t_23 < 0) { __pyx_t_23 += __pyx_pybuffernd_result.diminfo[0].shape; if (unlikely(__pyx_t_23 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_23 >= __pyx_pybuffernd_result.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7562; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_23, __pyx_pybuffernd_result.diminfo[0].strides) = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_left.rcbuffer->pybuffer.buf, __pyx_t_22, __pyx_pybuffernd_left.diminfo[0].strides)); /* "pandas/src/generated.pyx":7563 * rindexer[count] = -1 * result[count] = left[i] * i += 1 # <<<<<<<<<<<<<< * count += 1 * break */ __pyx_v_i = (__pyx_v_i + 1); /* "pandas/src/generated.pyx":7564 * result[count] = left[i] * i += 1 * count += 1 # <<<<<<<<<<<<<< * break * */ __pyx_v_count = (__pyx_v_count + 1); } /* "pandas/src/generated.pyx":7565 * i += 1 * count += 1 * break # <<<<<<<<<<<<<< * * lval = left[i] */ goto __pyx_L14_break; goto __pyx_L15; } __pyx_L15:; /* "pandas/src/generated.pyx":7567 * break * * lval = left[i] # <<<<<<<<<<<<<< * rval = right[j] * */ __pyx_t_24 = __pyx_v_i; __pyx_t_3 = -1; if (__pyx_t_24 < 0) { __pyx_t_24 += __pyx_pybuffernd_left.diminfo[0].shape; if (unlikely(__pyx_t_24 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_24 >= __pyx_pybuffernd_left.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7567; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_lval = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_left.rcbuffer->pybuffer.buf, __pyx_t_24, __pyx_pybuffernd_left.diminfo[0].strides)); /* "pandas/src/generated.pyx":7568 * * lval = left[i] * rval = right[j] # <<<<<<<<<<<<<< * * if lval == rval: */ __pyx_t_25 = __pyx_v_j; __pyx_t_3 = -1; if (__pyx_t_25 < 0) { __pyx_t_25 += __pyx_pybuffernd_right.diminfo[0].shape; if (unlikely(__pyx_t_25 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_25 >= __pyx_pybuffernd_right.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7568; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_rval = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_right.rcbuffer->pybuffer.buf, __pyx_t_25, __pyx_pybuffernd_right.diminfo[0].strides)); /* "pandas/src/generated.pyx":7570 * rval = right[j] * * if lval == rval: # <<<<<<<<<<<<<< * lindexer[count] = i * rindexer[count] = j */ __pyx_t_7 = ((__pyx_v_lval == __pyx_v_rval) != 0); if (__pyx_t_7) { /* "pandas/src/generated.pyx":7571 * * if lval == rval: * lindexer[count] = i # <<<<<<<<<<<<<< * rindexer[count] = j * result[count] = lval */ __pyx_t_26 = __pyx_v_count; __pyx_t_3 = -1; if (__pyx_t_26 < 0) { __pyx_t_26 += __pyx_pybuffernd_lindexer.diminfo[0].shape; if (unlikely(__pyx_t_26 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_26 >= __pyx_pybuffernd_lindexer.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7571; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_lindexer.rcbuffer->pybuffer.buf, __pyx_t_26, __pyx_pybuffernd_lindexer.diminfo[0].strides) = __pyx_v_i; /* "pandas/src/generated.pyx":7572 * if lval == rval: * lindexer[count] = i * rindexer[count] = j # <<<<<<<<<<<<<< * result[count] = lval * count += 1 */ __pyx_t_27 = __pyx_v_count; __pyx_t_3 = -1; if (__pyx_t_27 < 0) { __pyx_t_27 += __pyx_pybuffernd_rindexer.diminfo[0].shape; if (unlikely(__pyx_t_27 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_27 >= __pyx_pybuffernd_rindexer.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7572; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_rindexer.rcbuffer->pybuffer.buf, __pyx_t_27, __pyx_pybuffernd_rindexer.diminfo[0].strides) = __pyx_v_j; /* "pandas/src/generated.pyx":7573 * lindexer[count] = i * rindexer[count] = j * result[count] = lval # <<<<<<<<<<<<<< * count += 1 * if i < nleft - 1: */ __pyx_t_28 = __pyx_v_count; __pyx_t_3 = -1; if (__pyx_t_28 < 0) { __pyx_t_28 += __pyx_pybuffernd_result.diminfo[0].shape; if (unlikely(__pyx_t_28 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_28 >= __pyx_pybuffernd_result.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7573; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_28, __pyx_pybuffernd_result.diminfo[0].strides) = __pyx_v_lval; /* "pandas/src/generated.pyx":7574 * rindexer[count] = j * result[count] = lval * count += 1 # <<<<<<<<<<<<<< * if i < nleft - 1: * if j < nright - 1 and right[j + 1] == rval: */ __pyx_v_count = (__pyx_v_count + 1); /* "pandas/src/generated.pyx":7575 * result[count] = lval * count += 1 * if i < nleft - 1: # <<<<<<<<<<<<<< * if j < nright - 1 and right[j + 1] == rval: * j += 1 */ __pyx_t_7 = ((__pyx_v_i < (__pyx_v_nleft - 1)) != 0); if (__pyx_t_7) { /* "pandas/src/generated.pyx":7576 * count += 1 * if i < nleft - 1: * if j < nright - 1 and right[j + 1] == rval: # <<<<<<<<<<<<<< * j += 1 * else: */ __pyx_t_7 = ((__pyx_v_j < (__pyx_v_nright - 1)) != 0); if (__pyx_t_7) { __pyx_t_29 = (__pyx_v_j + 1); __pyx_t_3 = -1; if (__pyx_t_29 < 0) { __pyx_t_29 += __pyx_pybuffernd_right.diminfo[0].shape; if (unlikely(__pyx_t_29 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_29 >= __pyx_pybuffernd_right.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7576; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_2 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_right.rcbuffer->pybuffer.buf, __pyx_t_29, __pyx_pybuffernd_right.diminfo[0].strides)) == __pyx_v_rval) != 0); __pyx_t_6 = __pyx_t_2; } else { __pyx_t_6 = __pyx_t_7; } if (__pyx_t_6) { /* "pandas/src/generated.pyx":7577 * if i < nleft - 1: * if j < nright - 1 and right[j + 1] == rval: * j += 1 # <<<<<<<<<<<<<< * else: * i += 1 */ __pyx_v_j = (__pyx_v_j + 1); goto __pyx_L20; } /*else*/ { /* "pandas/src/generated.pyx":7579 * j += 1 * else: * i += 1 # <<<<<<<<<<<<<< * if left[i] != rval: * j += 1 */ __pyx_v_i = (__pyx_v_i + 1); /* "pandas/src/generated.pyx":7580 * else: * i += 1 * if left[i] != rval: # <<<<<<<<<<<<<< * j += 1 * elif j < nright - 1: */ __pyx_t_30 = __pyx_v_i; __pyx_t_3 = -1; if (__pyx_t_30 < 0) { __pyx_t_30 += __pyx_pybuffernd_left.diminfo[0].shape; if (unlikely(__pyx_t_30 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_30 >= __pyx_pybuffernd_left.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7580; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_6 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_left.rcbuffer->pybuffer.buf, __pyx_t_30, __pyx_pybuffernd_left.diminfo[0].strides)) != __pyx_v_rval) != 0); if (__pyx_t_6) { /* "pandas/src/generated.pyx":7581 * i += 1 * if left[i] != rval: * j += 1 # <<<<<<<<<<<<<< * elif j < nright - 1: * j += 1 */ __pyx_v_j = (__pyx_v_j + 1); goto __pyx_L21; } __pyx_L21:; } __pyx_L20:; goto __pyx_L19; } /* "pandas/src/generated.pyx":7582 * if left[i] != rval: * j += 1 * elif j < nright - 1: # <<<<<<<<<<<<<< * j += 1 * if lval != right[j]: */ __pyx_t_6 = ((__pyx_v_j < (__pyx_v_nright - 1)) != 0); if (__pyx_t_6) { /* "pandas/src/generated.pyx":7583 * j += 1 * elif j < nright - 1: * j += 1 # <<<<<<<<<<<<<< * if lval != right[j]: * i += 1 */ __pyx_v_j = (__pyx_v_j + 1); /* "pandas/src/generated.pyx":7584 * elif j < nright - 1: * j += 1 * if lval != right[j]: # <<<<<<<<<<<<<< * i += 1 * else: */ __pyx_t_31 = __pyx_v_j; __pyx_t_3 = -1; if (__pyx_t_31 < 0) { __pyx_t_31 += __pyx_pybuffernd_right.diminfo[0].shape; if (unlikely(__pyx_t_31 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_31 >= __pyx_pybuffernd_right.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7584; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_6 = ((__pyx_v_lval != (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_right.rcbuffer->pybuffer.buf, __pyx_t_31, __pyx_pybuffernd_right.diminfo[0].strides))) != 0); if (__pyx_t_6) { /* "pandas/src/generated.pyx":7585 * j += 1 * if lval != right[j]: * i += 1 # <<<<<<<<<<<<<< * else: * # end of the road */ __pyx_v_i = (__pyx_v_i + 1); goto __pyx_L22; } __pyx_L22:; goto __pyx_L19; } /*else*/ { /* "pandas/src/generated.pyx":7588 * else: * # end of the road * break # <<<<<<<<<<<<<< * elif lval < rval: * lindexer[count] = i */ goto __pyx_L14_break; } __pyx_L19:; goto __pyx_L18; } /* "pandas/src/generated.pyx":7589 * # end of the road * break * elif lval < rval: # <<<<<<<<<<<<<< * lindexer[count] = i * rindexer[count] = -1 */ __pyx_t_6 = ((__pyx_v_lval < __pyx_v_rval) != 0); if (__pyx_t_6) { /* "pandas/src/generated.pyx":7590 * break * elif lval < rval: * lindexer[count] = i # <<<<<<<<<<<<<< * rindexer[count] = -1 * result[count] = left[i] */ __pyx_t_32 = __pyx_v_count; __pyx_t_3 = -1; if (__pyx_t_32 < 0) { __pyx_t_32 += __pyx_pybuffernd_lindexer.diminfo[0].shape; if (unlikely(__pyx_t_32 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_32 >= __pyx_pybuffernd_lindexer.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7590; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_lindexer.rcbuffer->pybuffer.buf, __pyx_t_32, __pyx_pybuffernd_lindexer.diminfo[0].strides) = __pyx_v_i; /* "pandas/src/generated.pyx":7591 * elif lval < rval: * lindexer[count] = i * rindexer[count] = -1 # <<<<<<<<<<<<<< * result[count] = left[i] * count += 1 */ __pyx_t_33 = __pyx_v_count; __pyx_t_3 = -1; if (__pyx_t_33 < 0) { __pyx_t_33 += __pyx_pybuffernd_rindexer.diminfo[0].shape; if (unlikely(__pyx_t_33 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_33 >= __pyx_pybuffernd_rindexer.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7591; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_rindexer.rcbuffer->pybuffer.buf, __pyx_t_33, __pyx_pybuffernd_rindexer.diminfo[0].strides) = -1; /* "pandas/src/generated.pyx":7592 * lindexer[count] = i * rindexer[count] = -1 * result[count] = left[i] # <<<<<<<<<<<<<< * count += 1 * i += 1 */ __pyx_t_34 = __pyx_v_i; __pyx_t_3 = -1; if (__pyx_t_34 < 0) { __pyx_t_34 += __pyx_pybuffernd_left.diminfo[0].shape; if (unlikely(__pyx_t_34 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_34 >= __pyx_pybuffernd_left.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7592; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_35 = __pyx_v_count; __pyx_t_3 = -1; if (__pyx_t_35 < 0) { __pyx_t_35 += __pyx_pybuffernd_result.diminfo[0].shape; if (unlikely(__pyx_t_35 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_35 >= __pyx_pybuffernd_result.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7592; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_35, __pyx_pybuffernd_result.diminfo[0].strides) = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_left.rcbuffer->pybuffer.buf, __pyx_t_34, __pyx_pybuffernd_left.diminfo[0].strides)); /* "pandas/src/generated.pyx":7593 * rindexer[count] = -1 * result[count] = left[i] * count += 1 # <<<<<<<<<<<<<< * i += 1 * else: */ __pyx_v_count = (__pyx_v_count + 1); /* "pandas/src/generated.pyx":7594 * result[count] = left[i] * count += 1 * i += 1 # <<<<<<<<<<<<<< * else: * j += 1 */ __pyx_v_i = (__pyx_v_i + 1); goto __pyx_L18; } /*else*/ { /* "pandas/src/generated.pyx":7596 * i += 1 * else: * j += 1 # <<<<<<<<<<<<<< * * return result, lindexer, rindexer */ __pyx_v_j = (__pyx_v_j + 1); } __pyx_L18:; } __pyx_L14_break:; goto __pyx_L12; } __pyx_L12:; /* "pandas/src/generated.pyx":7598 * j += 1 * * return result, lindexer, rindexer # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_11 = PyTuple_New(3); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7598; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __Pyx_INCREF(((PyObject *)__pyx_v_result)); PyTuple_SET_ITEM(__pyx_t_11, 0, ((PyObject *)__pyx_v_result)); __Pyx_GIVEREF(((PyObject *)__pyx_v_result)); __Pyx_INCREF(((PyObject *)__pyx_v_lindexer)); PyTuple_SET_ITEM(__pyx_t_11, 1, ((PyObject *)__pyx_v_lindexer)); __Pyx_GIVEREF(((PyObject *)__pyx_v_lindexer)); __Pyx_INCREF(((PyObject *)__pyx_v_rindexer)); PyTuple_SET_ITEM(__pyx_t_11, 2, ((PyObject *)__pyx_v_rindexer)); __Pyx_GIVEREF(((PyObject *)__pyx_v_rindexer)); __pyx_r = ((PyObject *)__pyx_t_11); __pyx_t_11 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_10); __Pyx_XDECREF(__pyx_t_11); __Pyx_XDECREF(__pyx_t_12); __Pyx_XDECREF(__pyx_t_13); __Pyx_XDECREF(__pyx_t_14); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_left.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_lindexer.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_right.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_rindexer.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.left_join_indexer_int32", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_left.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_lindexer.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_right.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_rindexer.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_lindexer); __Pyx_XDECREF((PyObject *)__pyx_v_rindexer); __Pyx_XDECREF((PyObject *)__pyx_v_result); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_473left_join_indexer_int64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6pandas_5algos_472left_join_indexer_int64[] = "\n Two-pass algorithm for monotonic indexes. Handles many-to-one merges\n "; static PyMethodDef __pyx_mdef_6pandas_5algos_473left_join_indexer_int64 = {__Pyx_NAMESTR("left_join_indexer_int64"), (PyCFunction)__pyx_pw_6pandas_5algos_473left_join_indexer_int64, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_5algos_472left_join_indexer_int64)}; static PyObject *__pyx_pw_6pandas_5algos_473left_join_indexer_int64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_left = 0; PyArrayObject *__pyx_v_right = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("left_join_indexer_int64 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__left,&__pyx_n_s__right,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__left)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__right)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("left_join_indexer_int64", 1, 2, 2, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7601; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "left_join_indexer_int64") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7601; __pyx_clineno = __LINE__; goto __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_left = ((PyArrayObject *)values[0]); __pyx_v_right = ((PyArrayObject *)values[1]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("left_join_indexer_int64", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7601; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.left_join_indexer_int64", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_left), __pyx_ptype_5numpy_ndarray, 1, "left", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7601; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_right), __pyx_ptype_5numpy_ndarray, 1, "right", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7602; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_472left_join_indexer_int64(__pyx_self, __pyx_v_left, __pyx_v_right); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":7601 * * * def left_join_indexer_int64(ndarray[int64_t] left, # <<<<<<<<<<<<<< * ndarray[int64_t] right): * ''' */ static PyObject *__pyx_pf_6pandas_5algos_472left_join_indexer_int64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_left, PyArrayObject *__pyx_v_right) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_nright; Py_ssize_t __pyx_v_nleft; Py_ssize_t __pyx_v_count; __pyx_t_5numpy_int64_t __pyx_v_lval; __pyx_t_5numpy_int64_t __pyx_v_rval; PyArrayObject *__pyx_v_lindexer = 0; PyArrayObject *__pyx_v_rindexer = 0; PyArrayObject *__pyx_v_result = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_left; __Pyx_Buffer __pyx_pybuffer_left; __Pyx_LocalBuf_ND __pyx_pybuffernd_lindexer; __Pyx_Buffer __pyx_pybuffer_lindexer; __Pyx_LocalBuf_ND __pyx_pybuffernd_result; __Pyx_Buffer __pyx_pybuffer_result; __Pyx_LocalBuf_ND __pyx_pybuffernd_right; __Pyx_Buffer __pyx_pybuffer_right; __Pyx_LocalBuf_ND __pyx_pybuffernd_rindexer; __Pyx_Buffer __pyx_pybuffer_rindexer; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; int __pyx_t_2; int __pyx_t_3; Py_ssize_t __pyx_t_4; Py_ssize_t __pyx_t_5; int __pyx_t_6; int __pyx_t_7; Py_ssize_t __pyx_t_8; Py_ssize_t __pyx_t_9; PyObject *__pyx_t_10 = NULL; PyObject *__pyx_t_11 = NULL; PyObject *__pyx_t_12 = NULL; PyObject *__pyx_t_13 = NULL; PyObject *__pyx_t_14 = NULL; PyArrayObject *__pyx_t_15 = NULL; PyObject *__pyx_t_16 = NULL; PyObject *__pyx_t_17 = NULL; PyObject *__pyx_t_18 = NULL; PyArrayObject *__pyx_t_19 = NULL; 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("left_join_indexer_int64", 0); __pyx_pybuffer_lindexer.pybuffer.buf = NULL; __pyx_pybuffer_lindexer.refcount = 0; __pyx_pybuffernd_lindexer.data = NULL; __pyx_pybuffernd_lindexer.rcbuffer = &__pyx_pybuffer_lindexer; __pyx_pybuffer_rindexer.pybuffer.buf = NULL; __pyx_pybuffer_rindexer.refcount = 0; __pyx_pybuffernd_rindexer.data = NULL; __pyx_pybuffernd_rindexer.rcbuffer = &__pyx_pybuffer_rindexer; __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_left.pybuffer.buf = NULL; __pyx_pybuffer_left.refcount = 0; __pyx_pybuffernd_left.data = NULL; __pyx_pybuffernd_left.rcbuffer = &__pyx_pybuffer_left; __pyx_pybuffer_right.pybuffer.buf = NULL; __pyx_pybuffer_right.refcount = 0; __pyx_pybuffernd_right.data = NULL; __pyx_pybuffernd_right.rcbuffer = &__pyx_pybuffer_right; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_left.rcbuffer->pybuffer, (PyObject*)__pyx_v_left, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7601; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_left.diminfo[0].strides = __pyx_pybuffernd_left.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_left.diminfo[0].shape = __pyx_pybuffernd_left.rcbuffer->pybuffer.shape[0]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_right.rcbuffer->pybuffer, (PyObject*)__pyx_v_right, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7601; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_right.diminfo[0].strides = __pyx_pybuffernd_right.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_right.diminfo[0].shape = __pyx_pybuffernd_right.rcbuffer->pybuffer.shape[0]; /* "pandas/src/generated.pyx":7612 * ndarray[int64_t] result * * nleft = len(left) # <<<<<<<<<<<<<< * nright = len(right) * */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_left)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7612; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_nleft = __pyx_t_1; /* "pandas/src/generated.pyx":7613 * * nleft = len(left) * nright = len(right) # <<<<<<<<<<<<<< * * i = 0 */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_right)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7613; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_nright = __pyx_t_1; /* "pandas/src/generated.pyx":7615 * nright = len(right) * * i = 0 # <<<<<<<<<<<<<< * j = 0 * count = 0 */ __pyx_v_i = 0; /* "pandas/src/generated.pyx":7616 * * i = 0 * j = 0 # <<<<<<<<<<<<<< * count = 0 * if nleft > 0: */ __pyx_v_j = 0; /* "pandas/src/generated.pyx":7617 * i = 0 * j = 0 * count = 0 # <<<<<<<<<<<<<< * if nleft > 0: * while i < nleft: */ __pyx_v_count = 0; /* "pandas/src/generated.pyx":7618 * j = 0 * count = 0 * if nleft > 0: # <<<<<<<<<<<<<< * while i < nleft: * if j == nright: */ __pyx_t_2 = ((__pyx_v_nleft > 0) != 0); if (__pyx_t_2) { /* "pandas/src/generated.pyx":7619 * count = 0 * if nleft > 0: * while i < nleft: # <<<<<<<<<<<<<< * if j == nright: * count += nleft - i */ while (1) { __pyx_t_2 = ((__pyx_v_i < __pyx_v_nleft) != 0); if (!__pyx_t_2) break; /* "pandas/src/generated.pyx":7620 * if nleft > 0: * while i < nleft: * if j == nright: # <<<<<<<<<<<<<< * count += nleft - i * break */ __pyx_t_2 = ((__pyx_v_j == __pyx_v_nright) != 0); if (__pyx_t_2) { /* "pandas/src/generated.pyx":7621 * while i < nleft: * if j == nright: * count += nleft - i # <<<<<<<<<<<<<< * break * */ __pyx_v_count = (__pyx_v_count + (__pyx_v_nleft - __pyx_v_i)); /* "pandas/src/generated.pyx":7622 * if j == nright: * count += nleft - i * break # <<<<<<<<<<<<<< * * lval = left[i] */ goto __pyx_L5_break; goto __pyx_L6; } __pyx_L6:; /* "pandas/src/generated.pyx":7624 * break * * lval = left[i] # <<<<<<<<<<<<<< * rval = right[j] * */ __pyx_t_1 = __pyx_v_i; __pyx_t_3 = -1; if (__pyx_t_1 < 0) { __pyx_t_1 += __pyx_pybuffernd_left.diminfo[0].shape; if (unlikely(__pyx_t_1 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_1 >= __pyx_pybuffernd_left.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7624; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_lval = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_left.rcbuffer->pybuffer.buf, __pyx_t_1, __pyx_pybuffernd_left.diminfo[0].strides)); /* "pandas/src/generated.pyx":7625 * * lval = left[i] * rval = right[j] # <<<<<<<<<<<<<< * * if lval == rval: */ __pyx_t_4 = __pyx_v_j; __pyx_t_3 = -1; if (__pyx_t_4 < 0) { __pyx_t_4 += __pyx_pybuffernd_right.diminfo[0].shape; if (unlikely(__pyx_t_4 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_4 >= __pyx_pybuffernd_right.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7625; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_rval = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_right.rcbuffer->pybuffer.buf, __pyx_t_4, __pyx_pybuffernd_right.diminfo[0].strides)); /* "pandas/src/generated.pyx":7627 * rval = right[j] * * if lval == rval: # <<<<<<<<<<<<<< * count += 1 * if i < nleft - 1: */ __pyx_t_2 = ((__pyx_v_lval == __pyx_v_rval) != 0); if (__pyx_t_2) { /* "pandas/src/generated.pyx":7628 * * if lval == rval: * count += 1 # <<<<<<<<<<<<<< * if i < nleft - 1: * if j < nright - 1 and right[j + 1] == rval: */ __pyx_v_count = (__pyx_v_count + 1); /* "pandas/src/generated.pyx":7629 * if lval == rval: * count += 1 * if i < nleft - 1: # <<<<<<<<<<<<<< * if j < nright - 1 and right[j + 1] == rval: * j += 1 */ __pyx_t_2 = ((__pyx_v_i < (__pyx_v_nleft - 1)) != 0); if (__pyx_t_2) { /* "pandas/src/generated.pyx":7630 * count += 1 * if i < nleft - 1: * if j < nright - 1 and right[j + 1] == rval: # <<<<<<<<<<<<<< * j += 1 * else: */ __pyx_t_2 = ((__pyx_v_j < (__pyx_v_nright - 1)) != 0); if (__pyx_t_2) { __pyx_t_5 = (__pyx_v_j + 1); __pyx_t_3 = -1; if (__pyx_t_5 < 0) { __pyx_t_5 += __pyx_pybuffernd_right.diminfo[0].shape; if (unlikely(__pyx_t_5 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_5 >= __pyx_pybuffernd_right.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7630; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_6 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_right.rcbuffer->pybuffer.buf, __pyx_t_5, __pyx_pybuffernd_right.diminfo[0].strides)) == __pyx_v_rval) != 0); __pyx_t_7 = __pyx_t_6; } else { __pyx_t_7 = __pyx_t_2; } if (__pyx_t_7) { /* "pandas/src/generated.pyx":7631 * if i < nleft - 1: * if j < nright - 1 and right[j + 1] == rval: * j += 1 # <<<<<<<<<<<<<< * else: * i += 1 */ __pyx_v_j = (__pyx_v_j + 1); goto __pyx_L9; } /*else*/ { /* "pandas/src/generated.pyx":7633 * j += 1 * else: * i += 1 # <<<<<<<<<<<<<< * if left[i] != rval: * j += 1 */ __pyx_v_i = (__pyx_v_i + 1); /* "pandas/src/generated.pyx":7634 * else: * i += 1 * if left[i] != rval: # <<<<<<<<<<<<<< * j += 1 * elif j < nright - 1: */ __pyx_t_8 = __pyx_v_i; __pyx_t_3 = -1; if (__pyx_t_8 < 0) { __pyx_t_8 += __pyx_pybuffernd_left.diminfo[0].shape; if (unlikely(__pyx_t_8 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_8 >= __pyx_pybuffernd_left.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7634; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_7 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_left.rcbuffer->pybuffer.buf, __pyx_t_8, __pyx_pybuffernd_left.diminfo[0].strides)) != __pyx_v_rval) != 0); if (__pyx_t_7) { /* "pandas/src/generated.pyx":7635 * i += 1 * if left[i] != rval: * j += 1 # <<<<<<<<<<<<<< * elif j < nright - 1: * j += 1 */ __pyx_v_j = (__pyx_v_j + 1); goto __pyx_L10; } __pyx_L10:; } __pyx_L9:; goto __pyx_L8; } /* "pandas/src/generated.pyx":7636 * if left[i] != rval: * j += 1 * elif j < nright - 1: # <<<<<<<<<<<<<< * j += 1 * if lval != right[j]: */ __pyx_t_7 = ((__pyx_v_j < (__pyx_v_nright - 1)) != 0); if (__pyx_t_7) { /* "pandas/src/generated.pyx":7637 * j += 1 * elif j < nright - 1: * j += 1 # <<<<<<<<<<<<<< * if lval != right[j]: * i += 1 */ __pyx_v_j = (__pyx_v_j + 1); /* "pandas/src/generated.pyx":7638 * elif j < nright - 1: * j += 1 * if lval != right[j]: # <<<<<<<<<<<<<< * i += 1 * else: */ __pyx_t_9 = __pyx_v_j; __pyx_t_3 = -1; if (__pyx_t_9 < 0) { __pyx_t_9 += __pyx_pybuffernd_right.diminfo[0].shape; if (unlikely(__pyx_t_9 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_9 >= __pyx_pybuffernd_right.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7638; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_7 = ((__pyx_v_lval != (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_right.rcbuffer->pybuffer.buf, __pyx_t_9, __pyx_pybuffernd_right.diminfo[0].strides))) != 0); if (__pyx_t_7) { /* "pandas/src/generated.pyx":7639 * j += 1 * if lval != right[j]: * i += 1 # <<<<<<<<<<<<<< * else: * # end of the road */ __pyx_v_i = (__pyx_v_i + 1); goto __pyx_L11; } __pyx_L11:; goto __pyx_L8; } /*else*/ { /* "pandas/src/generated.pyx":7642 * else: * # end of the road * break # <<<<<<<<<<<<<< * elif lval < rval: * count += 1 */ goto __pyx_L5_break; } __pyx_L8:; goto __pyx_L7; } /* "pandas/src/generated.pyx":7643 * # end of the road * break * elif lval < rval: # <<<<<<<<<<<<<< * count += 1 * i += 1 */ __pyx_t_7 = ((__pyx_v_lval < __pyx_v_rval) != 0); if (__pyx_t_7) { /* "pandas/src/generated.pyx":7644 * break * elif lval < rval: * count += 1 # <<<<<<<<<<<<<< * i += 1 * else: */ __pyx_v_count = (__pyx_v_count + 1); /* "pandas/src/generated.pyx":7645 * elif lval < rval: * count += 1 * i += 1 # <<<<<<<<<<<<<< * else: * j += 1 */ __pyx_v_i = (__pyx_v_i + 1); goto __pyx_L7; } /*else*/ { /* "pandas/src/generated.pyx":7647 * i += 1 * else: * j += 1 # <<<<<<<<<<<<<< * * # do it again now that result size is known */ __pyx_v_j = (__pyx_v_j + 1); } __pyx_L7:; } __pyx_L5_break:; goto __pyx_L3; } __pyx_L3:; /* "pandas/src/generated.pyx":7651 * # do it again now that result size is known * * lindexer = np.empty(count, dtype=np.int64) # <<<<<<<<<<<<<< * rindexer = np.empty(count, dtype=np.int64) * result = np.empty(count, dtype=np.int64) */ __pyx_t_10 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7651; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s__empty); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7651; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_t_10 = PyInt_FromSsize_t(__pyx_v_count); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7651; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __pyx_t_12 = PyTuple_New(1); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7651; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_10); __Pyx_GIVEREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_t_10 = PyDict_New(); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7651; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_10)); __pyx_t_13 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7651; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_t_13, __pyx_n_s__int64); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7651; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_14); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; if (PyDict_SetItem(__pyx_t_10, ((PyObject *)__pyx_n_s__dtype), __pyx_t_14) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7651; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; __pyx_t_14 = PyObject_Call(__pyx_t_11, ((PyObject *)__pyx_t_12), ((PyObject *)__pyx_t_10)); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7651; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_14); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_12)); __pyx_t_12 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_10)); __pyx_t_10 = 0; if (!(likely(((__pyx_t_14) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_14, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7651; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_15 = ((PyArrayObject *)__pyx_t_14); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_lindexer.rcbuffer->pybuffer); __pyx_t_3 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_lindexer.rcbuffer->pybuffer, (PyObject*)__pyx_t_15, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_3 < 0)) { PyErr_Fetch(&__pyx_t_16, &__pyx_t_17, &__pyx_t_18); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_lindexer.rcbuffer->pybuffer, (PyObject*)__pyx_v_lindexer, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_16); Py_XDECREF(__pyx_t_17); Py_XDECREF(__pyx_t_18); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_16, __pyx_t_17, __pyx_t_18); } } __pyx_pybuffernd_lindexer.diminfo[0].strides = __pyx_pybuffernd_lindexer.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_lindexer.diminfo[0].shape = __pyx_pybuffernd_lindexer.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7651; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_15 = 0; __pyx_v_lindexer = ((PyArrayObject *)__pyx_t_14); __pyx_t_14 = 0; /* "pandas/src/generated.pyx":7652 * * lindexer = np.empty(count, dtype=np.int64) * rindexer = np.empty(count, dtype=np.int64) # <<<<<<<<<<<<<< * result = np.empty(count, dtype=np.int64) * */ __pyx_t_14 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7652; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_14); __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_14, __pyx_n_s__empty); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7652; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; __pyx_t_14 = PyInt_FromSsize_t(__pyx_v_count); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7652; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_14); __pyx_t_12 = PyTuple_New(1); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7652; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_14); __Pyx_GIVEREF(__pyx_t_14); __pyx_t_14 = 0; __pyx_t_14 = PyDict_New(); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7652; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_14)); __pyx_t_11 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7652; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s__int64); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7652; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; if (PyDict_SetItem(__pyx_t_14, ((PyObject *)__pyx_n_s__dtype), __pyx_t_13) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7652; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_13 = PyObject_Call(__pyx_t_10, ((PyObject *)__pyx_t_12), ((PyObject *)__pyx_t_14)); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7652; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_12)); __pyx_t_12 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_14)); __pyx_t_14 = 0; if (!(likely(((__pyx_t_13) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_13, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7652; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_15 = ((PyArrayObject *)__pyx_t_13); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_rindexer.rcbuffer->pybuffer); __pyx_t_3 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_rindexer.rcbuffer->pybuffer, (PyObject*)__pyx_t_15, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_3 < 0)) { PyErr_Fetch(&__pyx_t_18, &__pyx_t_17, &__pyx_t_16); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_rindexer.rcbuffer->pybuffer, (PyObject*)__pyx_v_rindexer, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_18); Py_XDECREF(__pyx_t_17); Py_XDECREF(__pyx_t_16); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_18, __pyx_t_17, __pyx_t_16); } } __pyx_pybuffernd_rindexer.diminfo[0].strides = __pyx_pybuffernd_rindexer.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_rindexer.diminfo[0].shape = __pyx_pybuffernd_rindexer.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7652; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_15 = 0; __pyx_v_rindexer = ((PyArrayObject *)__pyx_t_13); __pyx_t_13 = 0; /* "pandas/src/generated.pyx":7653 * lindexer = np.empty(count, dtype=np.int64) * rindexer = np.empty(count, dtype=np.int64) * result = np.empty(count, dtype=np.int64) # <<<<<<<<<<<<<< * * i = 0 */ __pyx_t_13 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7653; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_t_13, __pyx_n_s__empty); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7653; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_14); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_13 = PyInt_FromSsize_t(__pyx_v_count); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7653; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __pyx_t_12 = PyTuple_New(1); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7653; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_13); __Pyx_GIVEREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_13 = PyDict_New(); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7653; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_13)); __pyx_t_10 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7653; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s__int64); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7653; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; if (PyDict_SetItem(__pyx_t_13, ((PyObject *)__pyx_n_s__dtype), __pyx_t_11) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7653; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __pyx_t_11 = PyObject_Call(__pyx_t_14, ((PyObject *)__pyx_t_12), ((PyObject *)__pyx_t_13)); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7653; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_12)); __pyx_t_12 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_13)); __pyx_t_13 = 0; if (!(likely(((__pyx_t_11) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_11, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7653; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_19 = ((PyArrayObject *)__pyx_t_11); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __pyx_t_3 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_t_19, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_3 < 0)) { PyErr_Fetch(&__pyx_t_16, &__pyx_t_17, &__pyx_t_18); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_v_result, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_16); Py_XDECREF(__pyx_t_17); Py_XDECREF(__pyx_t_18); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_16, __pyx_t_17, __pyx_t_18); } } __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_3 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7653; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_19 = 0; __pyx_v_result = ((PyArrayObject *)__pyx_t_11); __pyx_t_11 = 0; /* "pandas/src/generated.pyx":7655 * result = np.empty(count, dtype=np.int64) * * i = 0 # <<<<<<<<<<<<<< * j = 0 * count = 0 */ __pyx_v_i = 0; /* "pandas/src/generated.pyx":7656 * * i = 0 * j = 0 # <<<<<<<<<<<<<< * count = 0 * if nleft > 0: */ __pyx_v_j = 0; /* "pandas/src/generated.pyx":7657 * i = 0 * j = 0 * count = 0 # <<<<<<<<<<<<<< * if nleft > 0: * while i < nleft: */ __pyx_v_count = 0; /* "pandas/src/generated.pyx":7658 * j = 0 * count = 0 * if nleft > 0: # <<<<<<<<<<<<<< * while i < nleft: * if j == nright: */ __pyx_t_7 = ((__pyx_v_nleft > 0) != 0); if (__pyx_t_7) { /* "pandas/src/generated.pyx":7659 * count = 0 * if nleft > 0: * while i < nleft: # <<<<<<<<<<<<<< * if j == nright: * while i < nleft: */ while (1) { __pyx_t_7 = ((__pyx_v_i < __pyx_v_nleft) != 0); if (!__pyx_t_7) break; /* "pandas/src/generated.pyx":7660 * if nleft > 0: * while i < nleft: * if j == nright: # <<<<<<<<<<<<<< * while i < nleft: * lindexer[count] = i */ __pyx_t_7 = ((__pyx_v_j == __pyx_v_nright) != 0); if (__pyx_t_7) { /* "pandas/src/generated.pyx":7661 * while i < nleft: * if j == nright: * while i < nleft: # <<<<<<<<<<<<<< * lindexer[count] = i * rindexer[count] = -1 */ while (1) { __pyx_t_7 = ((__pyx_v_i < __pyx_v_nleft) != 0); if (!__pyx_t_7) break; /* "pandas/src/generated.pyx":7662 * if j == nright: * while i < nleft: * lindexer[count] = i # <<<<<<<<<<<<<< * rindexer[count] = -1 * result[count] = left[i] */ __pyx_t_20 = __pyx_v_count; __pyx_t_3 = -1; if (__pyx_t_20 < 0) { __pyx_t_20 += __pyx_pybuffernd_lindexer.diminfo[0].shape; if (unlikely(__pyx_t_20 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_20 >= __pyx_pybuffernd_lindexer.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7662; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_lindexer.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_lindexer.diminfo[0].strides) = __pyx_v_i; /* "pandas/src/generated.pyx":7663 * while i < nleft: * lindexer[count] = i * rindexer[count] = -1 # <<<<<<<<<<<<<< * result[count] = left[i] * i += 1 */ __pyx_t_21 = __pyx_v_count; __pyx_t_3 = -1; if (__pyx_t_21 < 0) { __pyx_t_21 += __pyx_pybuffernd_rindexer.diminfo[0].shape; if (unlikely(__pyx_t_21 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_21 >= __pyx_pybuffernd_rindexer.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7663; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_rindexer.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_rindexer.diminfo[0].strides) = -1; /* "pandas/src/generated.pyx":7664 * lindexer[count] = i * rindexer[count] = -1 * result[count] = left[i] # <<<<<<<<<<<<<< * i += 1 * count += 1 */ __pyx_t_22 = __pyx_v_i; __pyx_t_3 = -1; if (__pyx_t_22 < 0) { __pyx_t_22 += __pyx_pybuffernd_left.diminfo[0].shape; if (unlikely(__pyx_t_22 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_22 >= __pyx_pybuffernd_left.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7664; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_23 = __pyx_v_count; __pyx_t_3 = -1; if (__pyx_t_23 < 0) { __pyx_t_23 += __pyx_pybuffernd_result.diminfo[0].shape; if (unlikely(__pyx_t_23 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_23 >= __pyx_pybuffernd_result.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7664; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_23, __pyx_pybuffernd_result.diminfo[0].strides) = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_left.rcbuffer->pybuffer.buf, __pyx_t_22, __pyx_pybuffernd_left.diminfo[0].strides)); /* "pandas/src/generated.pyx":7665 * rindexer[count] = -1 * result[count] = left[i] * i += 1 # <<<<<<<<<<<<<< * count += 1 * break */ __pyx_v_i = (__pyx_v_i + 1); /* "pandas/src/generated.pyx":7666 * result[count] = left[i] * i += 1 * count += 1 # <<<<<<<<<<<<<< * break * */ __pyx_v_count = (__pyx_v_count + 1); } /* "pandas/src/generated.pyx":7667 * i += 1 * count += 1 * break # <<<<<<<<<<<<<< * * lval = left[i] */ goto __pyx_L14_break; goto __pyx_L15; } __pyx_L15:; /* "pandas/src/generated.pyx":7669 * break * * lval = left[i] # <<<<<<<<<<<<<< * rval = right[j] * */ __pyx_t_24 = __pyx_v_i; __pyx_t_3 = -1; if (__pyx_t_24 < 0) { __pyx_t_24 += __pyx_pybuffernd_left.diminfo[0].shape; if (unlikely(__pyx_t_24 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_24 >= __pyx_pybuffernd_left.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7669; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_lval = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_left.rcbuffer->pybuffer.buf, __pyx_t_24, __pyx_pybuffernd_left.diminfo[0].strides)); /* "pandas/src/generated.pyx":7670 * * lval = left[i] * rval = right[j] # <<<<<<<<<<<<<< * * if lval == rval: */ __pyx_t_25 = __pyx_v_j; __pyx_t_3 = -1; if (__pyx_t_25 < 0) { __pyx_t_25 += __pyx_pybuffernd_right.diminfo[0].shape; if (unlikely(__pyx_t_25 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_25 >= __pyx_pybuffernd_right.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7670; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_rval = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_right.rcbuffer->pybuffer.buf, __pyx_t_25, __pyx_pybuffernd_right.diminfo[0].strides)); /* "pandas/src/generated.pyx":7672 * rval = right[j] * * if lval == rval: # <<<<<<<<<<<<<< * lindexer[count] = i * rindexer[count] = j */ __pyx_t_7 = ((__pyx_v_lval == __pyx_v_rval) != 0); if (__pyx_t_7) { /* "pandas/src/generated.pyx":7673 * * if lval == rval: * lindexer[count] = i # <<<<<<<<<<<<<< * rindexer[count] = j * result[count] = lval */ __pyx_t_26 = __pyx_v_count; __pyx_t_3 = -1; if (__pyx_t_26 < 0) { __pyx_t_26 += __pyx_pybuffernd_lindexer.diminfo[0].shape; if (unlikely(__pyx_t_26 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_26 >= __pyx_pybuffernd_lindexer.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7673; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_lindexer.rcbuffer->pybuffer.buf, __pyx_t_26, __pyx_pybuffernd_lindexer.diminfo[0].strides) = __pyx_v_i; /* "pandas/src/generated.pyx":7674 * if lval == rval: * lindexer[count] = i * rindexer[count] = j # <<<<<<<<<<<<<< * result[count] = lval * count += 1 */ __pyx_t_27 = __pyx_v_count; __pyx_t_3 = -1; if (__pyx_t_27 < 0) { __pyx_t_27 += __pyx_pybuffernd_rindexer.diminfo[0].shape; if (unlikely(__pyx_t_27 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_27 >= __pyx_pybuffernd_rindexer.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7674; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_rindexer.rcbuffer->pybuffer.buf, __pyx_t_27, __pyx_pybuffernd_rindexer.diminfo[0].strides) = __pyx_v_j; /* "pandas/src/generated.pyx":7675 * lindexer[count] = i * rindexer[count] = j * result[count] = lval # <<<<<<<<<<<<<< * count += 1 * if i < nleft - 1: */ __pyx_t_28 = __pyx_v_count; __pyx_t_3 = -1; if (__pyx_t_28 < 0) { __pyx_t_28 += __pyx_pybuffernd_result.diminfo[0].shape; if (unlikely(__pyx_t_28 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_28 >= __pyx_pybuffernd_result.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7675; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_28, __pyx_pybuffernd_result.diminfo[0].strides) = __pyx_v_lval; /* "pandas/src/generated.pyx":7676 * rindexer[count] = j * result[count] = lval * count += 1 # <<<<<<<<<<<<<< * if i < nleft - 1: * if j < nright - 1 and right[j + 1] == rval: */ __pyx_v_count = (__pyx_v_count + 1); /* "pandas/src/generated.pyx":7677 * result[count] = lval * count += 1 * if i < nleft - 1: # <<<<<<<<<<<<<< * if j < nright - 1 and right[j + 1] == rval: * j += 1 */ __pyx_t_7 = ((__pyx_v_i < (__pyx_v_nleft - 1)) != 0); if (__pyx_t_7) { /* "pandas/src/generated.pyx":7678 * count += 1 * if i < nleft - 1: * if j < nright - 1 and right[j + 1] == rval: # <<<<<<<<<<<<<< * j += 1 * else: */ __pyx_t_7 = ((__pyx_v_j < (__pyx_v_nright - 1)) != 0); if (__pyx_t_7) { __pyx_t_29 = (__pyx_v_j + 1); __pyx_t_3 = -1; if (__pyx_t_29 < 0) { __pyx_t_29 += __pyx_pybuffernd_right.diminfo[0].shape; if (unlikely(__pyx_t_29 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_29 >= __pyx_pybuffernd_right.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7678; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_2 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_right.rcbuffer->pybuffer.buf, __pyx_t_29, __pyx_pybuffernd_right.diminfo[0].strides)) == __pyx_v_rval) != 0); __pyx_t_6 = __pyx_t_2; } else { __pyx_t_6 = __pyx_t_7; } if (__pyx_t_6) { /* "pandas/src/generated.pyx":7679 * if i < nleft - 1: * if j < nright - 1 and right[j + 1] == rval: * j += 1 # <<<<<<<<<<<<<< * else: * i += 1 */ __pyx_v_j = (__pyx_v_j + 1); goto __pyx_L20; } /*else*/ { /* "pandas/src/generated.pyx":7681 * j += 1 * else: * i += 1 # <<<<<<<<<<<<<< * if left[i] != rval: * j += 1 */ __pyx_v_i = (__pyx_v_i + 1); /* "pandas/src/generated.pyx":7682 * else: * i += 1 * if left[i] != rval: # <<<<<<<<<<<<<< * j += 1 * elif j < nright - 1: */ __pyx_t_30 = __pyx_v_i; __pyx_t_3 = -1; if (__pyx_t_30 < 0) { __pyx_t_30 += __pyx_pybuffernd_left.diminfo[0].shape; if (unlikely(__pyx_t_30 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_30 >= __pyx_pybuffernd_left.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7682; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_6 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_left.rcbuffer->pybuffer.buf, __pyx_t_30, __pyx_pybuffernd_left.diminfo[0].strides)) != __pyx_v_rval) != 0); if (__pyx_t_6) { /* "pandas/src/generated.pyx":7683 * i += 1 * if left[i] != rval: * j += 1 # <<<<<<<<<<<<<< * elif j < nright - 1: * j += 1 */ __pyx_v_j = (__pyx_v_j + 1); goto __pyx_L21; } __pyx_L21:; } __pyx_L20:; goto __pyx_L19; } /* "pandas/src/generated.pyx":7684 * if left[i] != rval: * j += 1 * elif j < nright - 1: # <<<<<<<<<<<<<< * j += 1 * if lval != right[j]: */ __pyx_t_6 = ((__pyx_v_j < (__pyx_v_nright - 1)) != 0); if (__pyx_t_6) { /* "pandas/src/generated.pyx":7685 * j += 1 * elif j < nright - 1: * j += 1 # <<<<<<<<<<<<<< * if lval != right[j]: * i += 1 */ __pyx_v_j = (__pyx_v_j + 1); /* "pandas/src/generated.pyx":7686 * elif j < nright - 1: * j += 1 * if lval != right[j]: # <<<<<<<<<<<<<< * i += 1 * else: */ __pyx_t_31 = __pyx_v_j; __pyx_t_3 = -1; if (__pyx_t_31 < 0) { __pyx_t_31 += __pyx_pybuffernd_right.diminfo[0].shape; if (unlikely(__pyx_t_31 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_31 >= __pyx_pybuffernd_right.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7686; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_6 = ((__pyx_v_lval != (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_right.rcbuffer->pybuffer.buf, __pyx_t_31, __pyx_pybuffernd_right.diminfo[0].strides))) != 0); if (__pyx_t_6) { /* "pandas/src/generated.pyx":7687 * j += 1 * if lval != right[j]: * i += 1 # <<<<<<<<<<<<<< * else: * # end of the road */ __pyx_v_i = (__pyx_v_i + 1); goto __pyx_L22; } __pyx_L22:; goto __pyx_L19; } /*else*/ { /* "pandas/src/generated.pyx":7690 * else: * # end of the road * break # <<<<<<<<<<<<<< * elif lval < rval: * lindexer[count] = i */ goto __pyx_L14_break; } __pyx_L19:; goto __pyx_L18; } /* "pandas/src/generated.pyx":7691 * # end of the road * break * elif lval < rval: # <<<<<<<<<<<<<< * lindexer[count] = i * rindexer[count] = -1 */ __pyx_t_6 = ((__pyx_v_lval < __pyx_v_rval) != 0); if (__pyx_t_6) { /* "pandas/src/generated.pyx":7692 * break * elif lval < rval: * lindexer[count] = i # <<<<<<<<<<<<<< * rindexer[count] = -1 * result[count] = left[i] */ __pyx_t_32 = __pyx_v_count; __pyx_t_3 = -1; if (__pyx_t_32 < 0) { __pyx_t_32 += __pyx_pybuffernd_lindexer.diminfo[0].shape; if (unlikely(__pyx_t_32 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_32 >= __pyx_pybuffernd_lindexer.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7692; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_lindexer.rcbuffer->pybuffer.buf, __pyx_t_32, __pyx_pybuffernd_lindexer.diminfo[0].strides) = __pyx_v_i; /* "pandas/src/generated.pyx":7693 * elif lval < rval: * lindexer[count] = i * rindexer[count] = -1 # <<<<<<<<<<<<<< * result[count] = left[i] * count += 1 */ __pyx_t_33 = __pyx_v_count; __pyx_t_3 = -1; if (__pyx_t_33 < 0) { __pyx_t_33 += __pyx_pybuffernd_rindexer.diminfo[0].shape; if (unlikely(__pyx_t_33 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_33 >= __pyx_pybuffernd_rindexer.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7693; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_rindexer.rcbuffer->pybuffer.buf, __pyx_t_33, __pyx_pybuffernd_rindexer.diminfo[0].strides) = -1; /* "pandas/src/generated.pyx":7694 * lindexer[count] = i * rindexer[count] = -1 * result[count] = left[i] # <<<<<<<<<<<<<< * count += 1 * i += 1 */ __pyx_t_34 = __pyx_v_i; __pyx_t_3 = -1; if (__pyx_t_34 < 0) { __pyx_t_34 += __pyx_pybuffernd_left.diminfo[0].shape; if (unlikely(__pyx_t_34 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_34 >= __pyx_pybuffernd_left.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7694; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_35 = __pyx_v_count; __pyx_t_3 = -1; if (__pyx_t_35 < 0) { __pyx_t_35 += __pyx_pybuffernd_result.diminfo[0].shape; if (unlikely(__pyx_t_35 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_35 >= __pyx_pybuffernd_result.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7694; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_35, __pyx_pybuffernd_result.diminfo[0].strides) = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_left.rcbuffer->pybuffer.buf, __pyx_t_34, __pyx_pybuffernd_left.diminfo[0].strides)); /* "pandas/src/generated.pyx":7695 * rindexer[count] = -1 * result[count] = left[i] * count += 1 # <<<<<<<<<<<<<< * i += 1 * else: */ __pyx_v_count = (__pyx_v_count + 1); /* "pandas/src/generated.pyx":7696 * result[count] = left[i] * count += 1 * i += 1 # <<<<<<<<<<<<<< * else: * j += 1 */ __pyx_v_i = (__pyx_v_i + 1); goto __pyx_L18; } /*else*/ { /* "pandas/src/generated.pyx":7698 * i += 1 * else: * j += 1 # <<<<<<<<<<<<<< * * return result, lindexer, rindexer */ __pyx_v_j = (__pyx_v_j + 1); } __pyx_L18:; } __pyx_L14_break:; goto __pyx_L12; } __pyx_L12:; /* "pandas/src/generated.pyx":7700 * j += 1 * * return result, lindexer, rindexer # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_11 = PyTuple_New(3); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7700; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __Pyx_INCREF(((PyObject *)__pyx_v_result)); PyTuple_SET_ITEM(__pyx_t_11, 0, ((PyObject *)__pyx_v_result)); __Pyx_GIVEREF(((PyObject *)__pyx_v_result)); __Pyx_INCREF(((PyObject *)__pyx_v_lindexer)); PyTuple_SET_ITEM(__pyx_t_11, 1, ((PyObject *)__pyx_v_lindexer)); __Pyx_GIVEREF(((PyObject *)__pyx_v_lindexer)); __Pyx_INCREF(((PyObject *)__pyx_v_rindexer)); PyTuple_SET_ITEM(__pyx_t_11, 2, ((PyObject *)__pyx_v_rindexer)); __Pyx_GIVEREF(((PyObject *)__pyx_v_rindexer)); __pyx_r = ((PyObject *)__pyx_t_11); __pyx_t_11 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_10); __Pyx_XDECREF(__pyx_t_11); __Pyx_XDECREF(__pyx_t_12); __Pyx_XDECREF(__pyx_t_13); __Pyx_XDECREF(__pyx_t_14); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_left.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_lindexer.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_right.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_rindexer.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.left_join_indexer_int64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_left.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_lindexer.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_right.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_rindexer.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_lindexer); __Pyx_XDECREF((PyObject *)__pyx_v_rindexer); __Pyx_XDECREF((PyObject *)__pyx_v_result); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_475outer_join_indexer_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_475outer_join_indexer_float64 = {__Pyx_NAMESTR("outer_join_indexer_float64"), (PyCFunction)__pyx_pw_6pandas_5algos_475outer_join_indexer_float64, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_475outer_join_indexer_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_left = 0; PyArrayObject *__pyx_v_right = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("outer_join_indexer_float64 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__left,&__pyx_n_s__right,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__left)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__right)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("outer_join_indexer_float64", 1, 2, 2, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7705; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "outer_join_indexer_float64") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7705; __pyx_clineno = __LINE__; goto __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_left = ((PyArrayObject *)values[0]); __pyx_v_right = ((PyArrayObject *)values[1]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("outer_join_indexer_float64", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7705; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.outer_join_indexer_float64", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_left), __pyx_ptype_5numpy_ndarray, 1, "left", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7705; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_right), __pyx_ptype_5numpy_ndarray, 1, "right", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7706; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_474outer_join_indexer_float64(__pyx_self, __pyx_v_left, __pyx_v_right); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":7705 * @cython.wraparound(False) * @cython.boundscheck(False) * def outer_join_indexer_float64(ndarray[float64_t] left, # <<<<<<<<<<<<<< * ndarray[float64_t] right): * cdef: */ static PyObject *__pyx_pf_6pandas_5algos_474outer_join_indexer_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_left, PyArrayObject *__pyx_v_right) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_nright; Py_ssize_t __pyx_v_nleft; Py_ssize_t __pyx_v_count; __pyx_t_5numpy_float64_t __pyx_v_lval; __pyx_t_5numpy_float64_t __pyx_v_rval; PyArrayObject *__pyx_v_lindexer = 0; PyArrayObject *__pyx_v_rindexer = 0; PyArrayObject *__pyx_v_result = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_left; __Pyx_Buffer __pyx_pybuffer_left; __Pyx_LocalBuf_ND __pyx_pybuffernd_lindexer; __Pyx_Buffer __pyx_pybuffer_lindexer; __Pyx_LocalBuf_ND __pyx_pybuffernd_result; __Pyx_Buffer __pyx_pybuffer_result; __Pyx_LocalBuf_ND __pyx_pybuffernd_right; __Pyx_Buffer __pyx_pybuffer_right; __Pyx_LocalBuf_ND __pyx_pybuffernd_rindexer; __Pyx_Buffer __pyx_pybuffer_rindexer; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; int __pyx_t_2; Py_ssize_t __pyx_t_3; Py_ssize_t __pyx_t_4; int __pyx_t_5; int __pyx_t_6; Py_ssize_t __pyx_t_7; Py_ssize_t __pyx_t_8; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; PyObject *__pyx_t_11 = NULL; PyObject *__pyx_t_12 = NULL; PyObject *__pyx_t_13 = NULL; PyArrayObject *__pyx_t_14 = NULL; int __pyx_t_15; PyObject *__pyx_t_16 = NULL; PyObject *__pyx_t_17 = NULL; PyObject *__pyx_t_18 = NULL; PyArrayObject *__pyx_t_19 = NULL; 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; Py_ssize_t __pyx_t_37; Py_ssize_t __pyx_t_38; Py_ssize_t __pyx_t_39; Py_ssize_t __pyx_t_40; Py_ssize_t __pyx_t_41; Py_ssize_t __pyx_t_42; Py_ssize_t __pyx_t_43; Py_ssize_t __pyx_t_44; Py_ssize_t __pyx_t_45; Py_ssize_t __pyx_t_46; Py_ssize_t __pyx_t_47; Py_ssize_t __pyx_t_48; Py_ssize_t __pyx_t_49; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("outer_join_indexer_float64", 0); __pyx_pybuffer_lindexer.pybuffer.buf = NULL; __pyx_pybuffer_lindexer.refcount = 0; __pyx_pybuffernd_lindexer.data = NULL; __pyx_pybuffernd_lindexer.rcbuffer = &__pyx_pybuffer_lindexer; __pyx_pybuffer_rindexer.pybuffer.buf = NULL; __pyx_pybuffer_rindexer.refcount = 0; __pyx_pybuffernd_rindexer.data = NULL; __pyx_pybuffernd_rindexer.rcbuffer = &__pyx_pybuffer_rindexer; __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_left.pybuffer.buf = NULL; __pyx_pybuffer_left.refcount = 0; __pyx_pybuffernd_left.data = NULL; __pyx_pybuffernd_left.rcbuffer = &__pyx_pybuffer_left; __pyx_pybuffer_right.pybuffer.buf = NULL; __pyx_pybuffer_right.refcount = 0; __pyx_pybuffernd_right.data = NULL; __pyx_pybuffernd_right.rcbuffer = &__pyx_pybuffer_right; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_left.rcbuffer->pybuffer, (PyObject*)__pyx_v_left, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7705; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_left.diminfo[0].strides = __pyx_pybuffernd_left.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_left.diminfo[0].shape = __pyx_pybuffernd_left.rcbuffer->pybuffer.shape[0]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_right.rcbuffer->pybuffer, (PyObject*)__pyx_v_right, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7705; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_right.diminfo[0].strides = __pyx_pybuffernd_right.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_right.diminfo[0].shape = __pyx_pybuffernd_right.rcbuffer->pybuffer.shape[0]; /* "pandas/src/generated.pyx":7713 * ndarray[float64_t] result * * nleft = len(left) # <<<<<<<<<<<<<< * nright = len(right) * */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_left)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7713; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_nleft = __pyx_t_1; /* "pandas/src/generated.pyx":7714 * * nleft = len(left) * nright = len(right) # <<<<<<<<<<<<<< * * i = 0 */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_right)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7714; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_nright = __pyx_t_1; /* "pandas/src/generated.pyx":7716 * nright = len(right) * * i = 0 # <<<<<<<<<<<<<< * j = 0 * count = 0 */ __pyx_v_i = 0; /* "pandas/src/generated.pyx":7717 * * i = 0 * j = 0 # <<<<<<<<<<<<<< * count = 0 * if nleft == 0: */ __pyx_v_j = 0; /* "pandas/src/generated.pyx":7718 * i = 0 * j = 0 * count = 0 # <<<<<<<<<<<<<< * if nleft == 0: * count = nright */ __pyx_v_count = 0; /* "pandas/src/generated.pyx":7719 * j = 0 * count = 0 * if nleft == 0: # <<<<<<<<<<<<<< * count = nright * elif nright == 0: */ __pyx_t_2 = ((__pyx_v_nleft == 0) != 0); if (__pyx_t_2) { /* "pandas/src/generated.pyx":7720 * count = 0 * if nleft == 0: * count = nright # <<<<<<<<<<<<<< * elif nright == 0: * count = nleft */ __pyx_v_count = __pyx_v_nright; goto __pyx_L3; } /* "pandas/src/generated.pyx":7721 * if nleft == 0: * count = nright * elif nright == 0: # <<<<<<<<<<<<<< * count = nleft * else: */ __pyx_t_2 = ((__pyx_v_nright == 0) != 0); if (__pyx_t_2) { /* "pandas/src/generated.pyx":7722 * count = nright * elif nright == 0: * count = nleft # <<<<<<<<<<<<<< * else: * while True: */ __pyx_v_count = __pyx_v_nleft; goto __pyx_L3; } /*else*/ { /* "pandas/src/generated.pyx":7724 * count = nleft * else: * while True: # <<<<<<<<<<<<<< * if i == nleft: * count += nright - j */ while (1) { if (!1) break; /* "pandas/src/generated.pyx":7725 * else: * while True: * if i == nleft: # <<<<<<<<<<<<<< * count += nright - j * break */ __pyx_t_2 = ((__pyx_v_i == __pyx_v_nleft) != 0); if (__pyx_t_2) { /* "pandas/src/generated.pyx":7726 * while True: * if i == nleft: * count += nright - j # <<<<<<<<<<<<<< * break * if j == nright: */ __pyx_v_count = (__pyx_v_count + (__pyx_v_nright - __pyx_v_j)); /* "pandas/src/generated.pyx":7727 * if i == nleft: * count += nright - j * break # <<<<<<<<<<<<<< * if j == nright: * count += nleft - i */ goto __pyx_L5_break; goto __pyx_L6; } __pyx_L6:; /* "pandas/src/generated.pyx":7728 * count += nright - j * break * if j == nright: # <<<<<<<<<<<<<< * count += nleft - i * break */ __pyx_t_2 = ((__pyx_v_j == __pyx_v_nright) != 0); if (__pyx_t_2) { /* "pandas/src/generated.pyx":7729 * break * if j == nright: * count += nleft - i # <<<<<<<<<<<<<< * break * */ __pyx_v_count = (__pyx_v_count + (__pyx_v_nleft - __pyx_v_i)); /* "pandas/src/generated.pyx":7730 * if j == nright: * count += nleft - i * break # <<<<<<<<<<<<<< * * lval = left[i] */ goto __pyx_L5_break; goto __pyx_L7; } __pyx_L7:; /* "pandas/src/generated.pyx":7732 * break * * lval = left[i] # <<<<<<<<<<<<<< * rval = right[j] * if lval == rval: */ __pyx_t_1 = __pyx_v_i; __pyx_v_lval = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_left.rcbuffer->pybuffer.buf, __pyx_t_1, __pyx_pybuffernd_left.diminfo[0].strides)); /* "pandas/src/generated.pyx":7733 * * lval = left[i] * rval = right[j] # <<<<<<<<<<<<<< * if lval == rval: * count += 1 */ __pyx_t_3 = __pyx_v_j; __pyx_v_rval = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_right.rcbuffer->pybuffer.buf, __pyx_t_3, __pyx_pybuffernd_right.diminfo[0].strides)); /* "pandas/src/generated.pyx":7734 * lval = left[i] * rval = right[j] * if lval == rval: # <<<<<<<<<<<<<< * count += 1 * if i < nleft - 1: */ __pyx_t_2 = ((__pyx_v_lval == __pyx_v_rval) != 0); if (__pyx_t_2) { /* "pandas/src/generated.pyx":7735 * rval = right[j] * if lval == rval: * count += 1 # <<<<<<<<<<<<<< * if i < nleft - 1: * if j < nright - 1 and right[j + 1] == rval: */ __pyx_v_count = (__pyx_v_count + 1); /* "pandas/src/generated.pyx":7736 * if lval == rval: * count += 1 * if i < nleft - 1: # <<<<<<<<<<<<<< * if j < nright - 1 and right[j + 1] == rval: * j += 1 */ __pyx_t_2 = ((__pyx_v_i < (__pyx_v_nleft - 1)) != 0); if (__pyx_t_2) { /* "pandas/src/generated.pyx":7737 * count += 1 * if i < nleft - 1: * if j < nright - 1 and right[j + 1] == rval: # <<<<<<<<<<<<<< * j += 1 * else: */ __pyx_t_2 = ((__pyx_v_j < (__pyx_v_nright - 1)) != 0); if (__pyx_t_2) { __pyx_t_4 = (__pyx_v_j + 1); __pyx_t_5 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_right.rcbuffer->pybuffer.buf, __pyx_t_4, __pyx_pybuffernd_right.diminfo[0].strides)) == __pyx_v_rval) != 0); __pyx_t_6 = __pyx_t_5; } else { __pyx_t_6 = __pyx_t_2; } if (__pyx_t_6) { /* "pandas/src/generated.pyx":7738 * if i < nleft - 1: * if j < nright - 1 and right[j + 1] == rval: * j += 1 # <<<<<<<<<<<<<< * else: * i += 1 */ __pyx_v_j = (__pyx_v_j + 1); goto __pyx_L10; } /*else*/ { /* "pandas/src/generated.pyx":7740 * j += 1 * else: * i += 1 # <<<<<<<<<<<<<< * if left[i] != rval: * j += 1 */ __pyx_v_i = (__pyx_v_i + 1); /* "pandas/src/generated.pyx":7741 * else: * i += 1 * if left[i] != rval: # <<<<<<<<<<<<<< * j += 1 * elif j < nright - 1: */ __pyx_t_7 = __pyx_v_i; __pyx_t_6 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_left.rcbuffer->pybuffer.buf, __pyx_t_7, __pyx_pybuffernd_left.diminfo[0].strides)) != __pyx_v_rval) != 0); if (__pyx_t_6) { /* "pandas/src/generated.pyx":7742 * i += 1 * if left[i] != rval: * j += 1 # <<<<<<<<<<<<<< * elif j < nright - 1: * j += 1 */ __pyx_v_j = (__pyx_v_j + 1); goto __pyx_L11; } __pyx_L11:; } __pyx_L10:; goto __pyx_L9; } /* "pandas/src/generated.pyx":7743 * if left[i] != rval: * j += 1 * elif j < nright - 1: # <<<<<<<<<<<<<< * j += 1 * if lval != right[j]: */ __pyx_t_6 = ((__pyx_v_j < (__pyx_v_nright - 1)) != 0); if (__pyx_t_6) { /* "pandas/src/generated.pyx":7744 * j += 1 * elif j < nright - 1: * j += 1 # <<<<<<<<<<<<<< * if lval != right[j]: * i += 1 */ __pyx_v_j = (__pyx_v_j + 1); /* "pandas/src/generated.pyx":7745 * elif j < nright - 1: * j += 1 * if lval != right[j]: # <<<<<<<<<<<<<< * i += 1 * else: */ __pyx_t_8 = __pyx_v_j; __pyx_t_6 = ((__pyx_v_lval != (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_right.rcbuffer->pybuffer.buf, __pyx_t_8, __pyx_pybuffernd_right.diminfo[0].strides))) != 0); if (__pyx_t_6) { /* "pandas/src/generated.pyx":7746 * j += 1 * if lval != right[j]: * i += 1 # <<<<<<<<<<<<<< * else: * # end of the road */ __pyx_v_i = (__pyx_v_i + 1); goto __pyx_L12; } __pyx_L12:; goto __pyx_L9; } /*else*/ { /* "pandas/src/generated.pyx":7749 * else: * # end of the road * break # <<<<<<<<<<<<<< * elif lval < rval: * count += 1 */ goto __pyx_L5_break; } __pyx_L9:; goto __pyx_L8; } /* "pandas/src/generated.pyx":7750 * # end of the road * break * elif lval < rval: # <<<<<<<<<<<<<< * count += 1 * i += 1 */ __pyx_t_6 = ((__pyx_v_lval < __pyx_v_rval) != 0); if (__pyx_t_6) { /* "pandas/src/generated.pyx":7751 * break * elif lval < rval: * count += 1 # <<<<<<<<<<<<<< * i += 1 * else: */ __pyx_v_count = (__pyx_v_count + 1); /* "pandas/src/generated.pyx":7752 * elif lval < rval: * count += 1 * i += 1 # <<<<<<<<<<<<<< * else: * count += 1 */ __pyx_v_i = (__pyx_v_i + 1); goto __pyx_L8; } /*else*/ { /* "pandas/src/generated.pyx":7754 * i += 1 * else: * count += 1 # <<<<<<<<<<<<<< * j += 1 * */ __pyx_v_count = (__pyx_v_count + 1); /* "pandas/src/generated.pyx":7755 * else: * count += 1 * j += 1 # <<<<<<<<<<<<<< * * lindexer = np.empty(count, dtype=np.int64) */ __pyx_v_j = (__pyx_v_j + 1); } __pyx_L8:; } __pyx_L5_break:; } __pyx_L3:; /* "pandas/src/generated.pyx":7757 * j += 1 * * lindexer = np.empty(count, dtype=np.int64) # <<<<<<<<<<<<<< * rindexer = np.empty(count, dtype=np.int64) * result = np.empty(count, dtype=np.float64) */ __pyx_t_9 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7757; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s__empty); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7757; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_9 = PyInt_FromSsize_t(__pyx_v_count); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7757; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_t_11 = PyTuple_New(1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7757; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_9); __Pyx_GIVEREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_9 = PyDict_New(); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7757; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_9)); __pyx_t_12 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7757; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s__int64); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7757; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; if (PyDict_SetItem(__pyx_t_9, ((PyObject *)__pyx_n_s__dtype), __pyx_t_13) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7757; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_13 = PyObject_Call(__pyx_t_10, ((PyObject *)__pyx_t_11), ((PyObject *)__pyx_t_9)); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7757; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_11)); __pyx_t_11 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_9)); __pyx_t_9 = 0; if (!(likely(((__pyx_t_13) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_13, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7757; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_14 = ((PyArrayObject *)__pyx_t_13); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_lindexer.rcbuffer->pybuffer); __pyx_t_15 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_lindexer.rcbuffer->pybuffer, (PyObject*)__pyx_t_14, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_15 < 0)) { PyErr_Fetch(&__pyx_t_16, &__pyx_t_17, &__pyx_t_18); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_lindexer.rcbuffer->pybuffer, (PyObject*)__pyx_v_lindexer, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_16); Py_XDECREF(__pyx_t_17); Py_XDECREF(__pyx_t_18); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_16, __pyx_t_17, __pyx_t_18); } } __pyx_pybuffernd_lindexer.diminfo[0].strides = __pyx_pybuffernd_lindexer.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_lindexer.diminfo[0].shape = __pyx_pybuffernd_lindexer.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_15 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7757; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_14 = 0; __pyx_v_lindexer = ((PyArrayObject *)__pyx_t_13); __pyx_t_13 = 0; /* "pandas/src/generated.pyx":7758 * * lindexer = np.empty(count, dtype=np.int64) * rindexer = np.empty(count, dtype=np.int64) # <<<<<<<<<<<<<< * result = np.empty(count, dtype=np.float64) * */ __pyx_t_13 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7758; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_13, __pyx_n_s__empty); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7758; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_13 = PyInt_FromSsize_t(__pyx_v_count); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7758; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __pyx_t_11 = PyTuple_New(1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7758; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_13); __Pyx_GIVEREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_13 = PyDict_New(); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7758; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_13)); __pyx_t_10 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7758; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s__int64); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7758; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; if (PyDict_SetItem(__pyx_t_13, ((PyObject *)__pyx_n_s__dtype), __pyx_t_12) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7758; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __pyx_t_12 = PyObject_Call(__pyx_t_9, ((PyObject *)__pyx_t_11), ((PyObject *)__pyx_t_13)); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7758; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_11)); __pyx_t_11 = 0; __Pyx_DECREF(((PyObject *)__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_filename = __pyx_f[2]; __pyx_lineno = 7758; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_14 = ((PyArrayObject *)__pyx_t_12); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_rindexer.rcbuffer->pybuffer); __pyx_t_15 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_rindexer.rcbuffer->pybuffer, (PyObject*)__pyx_t_14, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_15 < 0)) { PyErr_Fetch(&__pyx_t_18, &__pyx_t_17, &__pyx_t_16); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_rindexer.rcbuffer->pybuffer, (PyObject*)__pyx_v_rindexer, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_18); Py_XDECREF(__pyx_t_17); Py_XDECREF(__pyx_t_16); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_18, __pyx_t_17, __pyx_t_16); } } __pyx_pybuffernd_rindexer.diminfo[0].strides = __pyx_pybuffernd_rindexer.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_rindexer.diminfo[0].shape = __pyx_pybuffernd_rindexer.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_15 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7758; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_14 = 0; __pyx_v_rindexer = ((PyArrayObject *)__pyx_t_12); __pyx_t_12 = 0; /* "pandas/src/generated.pyx":7759 * lindexer = np.empty(count, dtype=np.int64) * rindexer = np.empty(count, dtype=np.int64) * result = np.empty(count, dtype=np.float64) # <<<<<<<<<<<<<< * * # do it again, but populate the indexers / result */ __pyx_t_12 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7759; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s__empty); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7759; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __pyx_t_12 = PyInt_FromSsize_t(__pyx_v_count); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7759; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __pyx_t_11 = PyTuple_New(1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7759; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_12); __Pyx_GIVEREF(__pyx_t_12); __pyx_t_12 = 0; __pyx_t_12 = PyDict_New(); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7759; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_12)); __pyx_t_9 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7759; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s__float64); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7759; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; if (PyDict_SetItem(__pyx_t_12, ((PyObject *)__pyx_n_s__dtype), __pyx_t_10) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7759; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_t_10 = PyObject_Call(__pyx_t_13, ((PyObject *)__pyx_t_11), ((PyObject *)__pyx_t_12)); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7759; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_11)); __pyx_t_11 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_12)); __pyx_t_12 = 0; if (!(likely(((__pyx_t_10) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_10, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7759; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_19 = ((PyArrayObject *)__pyx_t_10); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __pyx_t_15 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_t_19, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_15 < 0)) { PyErr_Fetch(&__pyx_t_16, &__pyx_t_17, &__pyx_t_18); 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_16); Py_XDECREF(__pyx_t_17); Py_XDECREF(__pyx_t_18); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_16, __pyx_t_17, __pyx_t_18); } } __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_15 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7759; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_19 = 0; __pyx_v_result = ((PyArrayObject *)__pyx_t_10); __pyx_t_10 = 0; /* "pandas/src/generated.pyx":7763 * # do it again, but populate the indexers / result * * i = 0 # <<<<<<<<<<<<<< * j = 0 * count = 0 */ __pyx_v_i = 0; /* "pandas/src/generated.pyx":7764 * * i = 0 * j = 0 # <<<<<<<<<<<<<< * count = 0 * if nleft == 0: */ __pyx_v_j = 0; /* "pandas/src/generated.pyx":7765 * i = 0 * j = 0 * count = 0 # <<<<<<<<<<<<<< * if nleft == 0: * for j in range(nright): */ __pyx_v_count = 0; /* "pandas/src/generated.pyx":7766 * j = 0 * count = 0 * if nleft == 0: # <<<<<<<<<<<<<< * for j in range(nright): * lindexer[j] = -1 */ __pyx_t_6 = ((__pyx_v_nleft == 0) != 0); if (__pyx_t_6) { /* "pandas/src/generated.pyx":7767 * count = 0 * if nleft == 0: * for j in range(nright): # <<<<<<<<<<<<<< * lindexer[j] = -1 * rindexer[j] = j */ __pyx_t_20 = __pyx_v_nright; for (__pyx_t_21 = 0; __pyx_t_21 < __pyx_t_20; __pyx_t_21+=1) { __pyx_v_j = __pyx_t_21; /* "pandas/src/generated.pyx":7768 * if nleft == 0: * for j in range(nright): * lindexer[j] = -1 # <<<<<<<<<<<<<< * rindexer[j] = j * result[j] = right[j] */ __pyx_t_22 = __pyx_v_j; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_lindexer.rcbuffer->pybuffer.buf, __pyx_t_22, __pyx_pybuffernd_lindexer.diminfo[0].strides) = -1; /* "pandas/src/generated.pyx":7769 * for j in range(nright): * lindexer[j] = -1 * rindexer[j] = j # <<<<<<<<<<<<<< * result[j] = right[j] * elif nright == 0: */ __pyx_t_23 = __pyx_v_j; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_rindexer.rcbuffer->pybuffer.buf, __pyx_t_23, __pyx_pybuffernd_rindexer.diminfo[0].strides) = __pyx_v_j; /* "pandas/src/generated.pyx":7770 * lindexer[j] = -1 * rindexer[j] = j * result[j] = right[j] # <<<<<<<<<<<<<< * elif nright == 0: * for i in range(nright): */ __pyx_t_24 = __pyx_v_j; __pyx_t_25 = __pyx_v_j; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_25, __pyx_pybuffernd_result.diminfo[0].strides) = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_right.rcbuffer->pybuffer.buf, __pyx_t_24, __pyx_pybuffernd_right.diminfo[0].strides)); } goto __pyx_L13; } /* "pandas/src/generated.pyx":7771 * rindexer[j] = j * result[j] = right[j] * elif nright == 0: # <<<<<<<<<<<<<< * for i in range(nright): * lindexer[i] = i */ __pyx_t_6 = ((__pyx_v_nright == 0) != 0); if (__pyx_t_6) { /* "pandas/src/generated.pyx":7772 * result[j] = right[j] * elif nright == 0: * for i in range(nright): # <<<<<<<<<<<<<< * lindexer[i] = i * rindexer[i] = -1 */ __pyx_t_20 = __pyx_v_nright; for (__pyx_t_21 = 0; __pyx_t_21 < __pyx_t_20; __pyx_t_21+=1) { __pyx_v_i = __pyx_t_21; /* "pandas/src/generated.pyx":7773 * elif nright == 0: * for i in range(nright): * lindexer[i] = i # <<<<<<<<<<<<<< * rindexer[i] = -1 * result[i] = left[i] */ __pyx_t_26 = __pyx_v_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_lindexer.rcbuffer->pybuffer.buf, __pyx_t_26, __pyx_pybuffernd_lindexer.diminfo[0].strides) = __pyx_v_i; /* "pandas/src/generated.pyx":7774 * for i in range(nright): * lindexer[i] = i * rindexer[i] = -1 # <<<<<<<<<<<<<< * result[i] = left[i] * else: */ __pyx_t_27 = __pyx_v_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_rindexer.rcbuffer->pybuffer.buf, __pyx_t_27, __pyx_pybuffernd_rindexer.diminfo[0].strides) = -1; /* "pandas/src/generated.pyx":7775 * lindexer[i] = i * rindexer[i] = -1 * result[i] = left[i] # <<<<<<<<<<<<<< * else: * while True: */ __pyx_t_28 = __pyx_v_i; __pyx_t_29 = __pyx_v_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_29, __pyx_pybuffernd_result.diminfo[0].strides) = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_left.rcbuffer->pybuffer.buf, __pyx_t_28, __pyx_pybuffernd_left.diminfo[0].strides)); } goto __pyx_L13; } /*else*/ { /* "pandas/src/generated.pyx":7777 * result[i] = left[i] * else: * while True: # <<<<<<<<<<<<<< * if i == nleft: * while j < nright: */ while (1) { if (!1) break; /* "pandas/src/generated.pyx":7778 * else: * while True: * if i == nleft: # <<<<<<<<<<<<<< * while j < nright: * lindexer[count] = -1 */ __pyx_t_6 = ((__pyx_v_i == __pyx_v_nleft) != 0); if (__pyx_t_6) { /* "pandas/src/generated.pyx":7779 * while True: * if i == nleft: * while j < nright: # <<<<<<<<<<<<<< * lindexer[count] = -1 * rindexer[count] = j */ while (1) { __pyx_t_6 = ((__pyx_v_j < __pyx_v_nright) != 0); if (!__pyx_t_6) break; /* "pandas/src/generated.pyx":7780 * if i == nleft: * while j < nright: * lindexer[count] = -1 # <<<<<<<<<<<<<< * rindexer[count] = j * result[count] = right[j] */ __pyx_t_20 = __pyx_v_count; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_lindexer.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_lindexer.diminfo[0].strides) = -1; /* "pandas/src/generated.pyx":7781 * while j < nright: * lindexer[count] = -1 * rindexer[count] = j # <<<<<<<<<<<<<< * result[count] = right[j] * count += 1 */ __pyx_t_21 = __pyx_v_count; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_rindexer.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_rindexer.diminfo[0].strides) = __pyx_v_j; /* "pandas/src/generated.pyx":7782 * lindexer[count] = -1 * rindexer[count] = j * result[count] = right[j] # <<<<<<<<<<<<<< * count += 1 * j += 1 */ __pyx_t_30 = __pyx_v_j; __pyx_t_31 = __pyx_v_count; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_31, __pyx_pybuffernd_result.diminfo[0].strides) = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_right.rcbuffer->pybuffer.buf, __pyx_t_30, __pyx_pybuffernd_right.diminfo[0].strides)); /* "pandas/src/generated.pyx":7783 * rindexer[count] = j * result[count] = right[j] * count += 1 # <<<<<<<<<<<<<< * j += 1 * break */ __pyx_v_count = (__pyx_v_count + 1); /* "pandas/src/generated.pyx":7784 * result[count] = right[j] * count += 1 * j += 1 # <<<<<<<<<<<<<< * break * if j == nright: */ __pyx_v_j = (__pyx_v_j + 1); } /* "pandas/src/generated.pyx":7785 * count += 1 * j += 1 * break # <<<<<<<<<<<<<< * if j == nright: * while i < nleft: */ goto __pyx_L19_break; goto __pyx_L20; } __pyx_L20:; /* "pandas/src/generated.pyx":7786 * j += 1 * break * if j == nright: # <<<<<<<<<<<<<< * while i < nleft: * lindexer[count] = i */ __pyx_t_6 = ((__pyx_v_j == __pyx_v_nright) != 0); if (__pyx_t_6) { /* "pandas/src/generated.pyx":7787 * break * if j == nright: * while i < nleft: # <<<<<<<<<<<<<< * lindexer[count] = i * rindexer[count] = -1 */ while (1) { __pyx_t_6 = ((__pyx_v_i < __pyx_v_nleft) != 0); if (!__pyx_t_6) break; /* "pandas/src/generated.pyx":7788 * if j == nright: * while i < nleft: * lindexer[count] = i # <<<<<<<<<<<<<< * rindexer[count] = -1 * result[count] = left[i] */ __pyx_t_32 = __pyx_v_count; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_lindexer.rcbuffer->pybuffer.buf, __pyx_t_32, __pyx_pybuffernd_lindexer.diminfo[0].strides) = __pyx_v_i; /* "pandas/src/generated.pyx":7789 * while i < nleft: * lindexer[count] = i * rindexer[count] = -1 # <<<<<<<<<<<<<< * result[count] = left[i] * count += 1 */ __pyx_t_33 = __pyx_v_count; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_rindexer.rcbuffer->pybuffer.buf, __pyx_t_33, __pyx_pybuffernd_rindexer.diminfo[0].strides) = -1; /* "pandas/src/generated.pyx":7790 * lindexer[count] = i * rindexer[count] = -1 * result[count] = left[i] # <<<<<<<<<<<<<< * count += 1 * i += 1 */ __pyx_t_34 = __pyx_v_i; __pyx_t_35 = __pyx_v_count; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_35, __pyx_pybuffernd_result.diminfo[0].strides) = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_left.rcbuffer->pybuffer.buf, __pyx_t_34, __pyx_pybuffernd_left.diminfo[0].strides)); /* "pandas/src/generated.pyx":7791 * rindexer[count] = -1 * result[count] = left[i] * count += 1 # <<<<<<<<<<<<<< * i += 1 * break */ __pyx_v_count = (__pyx_v_count + 1); /* "pandas/src/generated.pyx":7792 * result[count] = left[i] * count += 1 * i += 1 # <<<<<<<<<<<<<< * break * */ __pyx_v_i = (__pyx_v_i + 1); } /* "pandas/src/generated.pyx":7793 * count += 1 * i += 1 * break # <<<<<<<<<<<<<< * * lval = left[i] */ goto __pyx_L19_break; goto __pyx_L23; } __pyx_L23:; /* "pandas/src/generated.pyx":7795 * break * * lval = left[i] # <<<<<<<<<<<<<< * rval = right[j] * */ __pyx_t_36 = __pyx_v_i; __pyx_v_lval = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_left.rcbuffer->pybuffer.buf, __pyx_t_36, __pyx_pybuffernd_left.diminfo[0].strides)); /* "pandas/src/generated.pyx":7796 * * lval = left[i] * rval = right[j] # <<<<<<<<<<<<<< * * if lval == rval: */ __pyx_t_37 = __pyx_v_j; __pyx_v_rval = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_right.rcbuffer->pybuffer.buf, __pyx_t_37, __pyx_pybuffernd_right.diminfo[0].strides)); /* "pandas/src/generated.pyx":7798 * rval = right[j] * * if lval == rval: # <<<<<<<<<<<<<< * lindexer[count] = i * rindexer[count] = j */ __pyx_t_6 = ((__pyx_v_lval == __pyx_v_rval) != 0); if (__pyx_t_6) { /* "pandas/src/generated.pyx":7799 * * if lval == rval: * lindexer[count] = i # <<<<<<<<<<<<<< * rindexer[count] = j * result[count] = lval */ __pyx_t_38 = __pyx_v_count; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_lindexer.rcbuffer->pybuffer.buf, __pyx_t_38, __pyx_pybuffernd_lindexer.diminfo[0].strides) = __pyx_v_i; /* "pandas/src/generated.pyx":7800 * if lval == rval: * lindexer[count] = i * rindexer[count] = j # <<<<<<<<<<<<<< * result[count] = lval * count += 1 */ __pyx_t_39 = __pyx_v_count; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_rindexer.rcbuffer->pybuffer.buf, __pyx_t_39, __pyx_pybuffernd_rindexer.diminfo[0].strides) = __pyx_v_j; /* "pandas/src/generated.pyx":7801 * lindexer[count] = i * rindexer[count] = j * result[count] = lval # <<<<<<<<<<<<<< * count += 1 * if i < nleft - 1: */ __pyx_t_40 = __pyx_v_count; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_40, __pyx_pybuffernd_result.diminfo[0].strides) = __pyx_v_lval; /* "pandas/src/generated.pyx":7802 * rindexer[count] = j * result[count] = lval * count += 1 # <<<<<<<<<<<<<< * if i < nleft - 1: * if j < nright - 1 and right[j + 1] == rval: */ __pyx_v_count = (__pyx_v_count + 1); /* "pandas/src/generated.pyx":7803 * result[count] = lval * count += 1 * if i < nleft - 1: # <<<<<<<<<<<<<< * if j < nright - 1 and right[j + 1] == rval: * j += 1 */ __pyx_t_6 = ((__pyx_v_i < (__pyx_v_nleft - 1)) != 0); if (__pyx_t_6) { /* "pandas/src/generated.pyx":7804 * count += 1 * if i < nleft - 1: * if j < nright - 1 and right[j + 1] == rval: # <<<<<<<<<<<<<< * j += 1 * else: */ __pyx_t_6 = ((__pyx_v_j < (__pyx_v_nright - 1)) != 0); if (__pyx_t_6) { __pyx_t_41 = (__pyx_v_j + 1); __pyx_t_2 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_right.rcbuffer->pybuffer.buf, __pyx_t_41, __pyx_pybuffernd_right.diminfo[0].strides)) == __pyx_v_rval) != 0); __pyx_t_5 = __pyx_t_2; } else { __pyx_t_5 = __pyx_t_6; } if (__pyx_t_5) { /* "pandas/src/generated.pyx":7805 * if i < nleft - 1: * if j < nright - 1 and right[j + 1] == rval: * j += 1 # <<<<<<<<<<<<<< * else: * i += 1 */ __pyx_v_j = (__pyx_v_j + 1); goto __pyx_L28; } /*else*/ { /* "pandas/src/generated.pyx":7807 * j += 1 * else: * i += 1 # <<<<<<<<<<<<<< * if left[i] != rval: * j += 1 */ __pyx_v_i = (__pyx_v_i + 1); /* "pandas/src/generated.pyx":7808 * else: * i += 1 * if left[i] != rval: # <<<<<<<<<<<<<< * j += 1 * elif j < nright - 1: */ __pyx_t_42 = __pyx_v_i; __pyx_t_5 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_left.rcbuffer->pybuffer.buf, __pyx_t_42, __pyx_pybuffernd_left.diminfo[0].strides)) != __pyx_v_rval) != 0); if (__pyx_t_5) { /* "pandas/src/generated.pyx":7809 * i += 1 * if left[i] != rval: * j += 1 # <<<<<<<<<<<<<< * elif j < nright - 1: * j += 1 */ __pyx_v_j = (__pyx_v_j + 1); goto __pyx_L29; } __pyx_L29:; } __pyx_L28:; goto __pyx_L27; } /* "pandas/src/generated.pyx":7810 * if left[i] != rval: * j += 1 * elif j < nright - 1: # <<<<<<<<<<<<<< * j += 1 * if lval != right[j]: */ __pyx_t_5 = ((__pyx_v_j < (__pyx_v_nright - 1)) != 0); if (__pyx_t_5) { /* "pandas/src/generated.pyx":7811 * j += 1 * elif j < nright - 1: * j += 1 # <<<<<<<<<<<<<< * if lval != right[j]: * i += 1 */ __pyx_v_j = (__pyx_v_j + 1); /* "pandas/src/generated.pyx":7812 * elif j < nright - 1: * j += 1 * if lval != right[j]: # <<<<<<<<<<<<<< * i += 1 * else: */ __pyx_t_43 = __pyx_v_j; __pyx_t_5 = ((__pyx_v_lval != (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_right.rcbuffer->pybuffer.buf, __pyx_t_43, __pyx_pybuffernd_right.diminfo[0].strides))) != 0); if (__pyx_t_5) { /* "pandas/src/generated.pyx":7813 * j += 1 * if lval != right[j]: * i += 1 # <<<<<<<<<<<<<< * else: * # end of the road */ __pyx_v_i = (__pyx_v_i + 1); goto __pyx_L30; } __pyx_L30:; goto __pyx_L27; } /*else*/ { /* "pandas/src/generated.pyx":7816 * else: * # end of the road * break # <<<<<<<<<<<<<< * elif lval < rval: * lindexer[count] = i */ goto __pyx_L19_break; } __pyx_L27:; goto __pyx_L26; } /* "pandas/src/generated.pyx":7817 * # end of the road * break * elif lval < rval: # <<<<<<<<<<<<<< * lindexer[count] = i * rindexer[count] = -1 */ __pyx_t_5 = ((__pyx_v_lval < __pyx_v_rval) != 0); if (__pyx_t_5) { /* "pandas/src/generated.pyx":7818 * break * elif lval < rval: * lindexer[count] = i # <<<<<<<<<<<<<< * rindexer[count] = -1 * result[count] = lval */ __pyx_t_44 = __pyx_v_count; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_lindexer.rcbuffer->pybuffer.buf, __pyx_t_44, __pyx_pybuffernd_lindexer.diminfo[0].strides) = __pyx_v_i; /* "pandas/src/generated.pyx":7819 * elif lval < rval: * lindexer[count] = i * rindexer[count] = -1 # <<<<<<<<<<<<<< * result[count] = lval * count += 1 */ __pyx_t_45 = __pyx_v_count; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_rindexer.rcbuffer->pybuffer.buf, __pyx_t_45, __pyx_pybuffernd_rindexer.diminfo[0].strides) = -1; /* "pandas/src/generated.pyx":7820 * lindexer[count] = i * rindexer[count] = -1 * result[count] = lval # <<<<<<<<<<<<<< * count += 1 * i += 1 */ __pyx_t_46 = __pyx_v_count; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_46, __pyx_pybuffernd_result.diminfo[0].strides) = __pyx_v_lval; /* "pandas/src/generated.pyx":7821 * rindexer[count] = -1 * result[count] = lval * count += 1 # <<<<<<<<<<<<<< * i += 1 * else: */ __pyx_v_count = (__pyx_v_count + 1); /* "pandas/src/generated.pyx":7822 * result[count] = lval * count += 1 * i += 1 # <<<<<<<<<<<<<< * else: * lindexer[count] = -1 */ __pyx_v_i = (__pyx_v_i + 1); goto __pyx_L26; } /*else*/ { /* "pandas/src/generated.pyx":7824 * i += 1 * else: * lindexer[count] = -1 # <<<<<<<<<<<<<< * rindexer[count] = j * result[count] = rval */ __pyx_t_47 = __pyx_v_count; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_lindexer.rcbuffer->pybuffer.buf, __pyx_t_47, __pyx_pybuffernd_lindexer.diminfo[0].strides) = -1; /* "pandas/src/generated.pyx":7825 * else: * lindexer[count] = -1 * rindexer[count] = j # <<<<<<<<<<<<<< * result[count] = rval * count += 1 */ __pyx_t_48 = __pyx_v_count; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_rindexer.rcbuffer->pybuffer.buf, __pyx_t_48, __pyx_pybuffernd_rindexer.diminfo[0].strides) = __pyx_v_j; /* "pandas/src/generated.pyx":7826 * lindexer[count] = -1 * rindexer[count] = j * result[count] = rval # <<<<<<<<<<<<<< * count += 1 * j += 1 */ __pyx_t_49 = __pyx_v_count; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_49, __pyx_pybuffernd_result.diminfo[0].strides) = __pyx_v_rval; /* "pandas/src/generated.pyx":7827 * rindexer[count] = j * result[count] = rval * count += 1 # <<<<<<<<<<<<<< * j += 1 * */ __pyx_v_count = (__pyx_v_count + 1); /* "pandas/src/generated.pyx":7828 * result[count] = rval * count += 1 * j += 1 # <<<<<<<<<<<<<< * * return result, lindexer, rindexer */ __pyx_v_j = (__pyx_v_j + 1); } __pyx_L26:; } __pyx_L19_break:; } __pyx_L13:; /* "pandas/src/generated.pyx":7830 * j += 1 * * return result, lindexer, rindexer # <<<<<<<<<<<<<< * * @cython.wraparound(False) */ __Pyx_XDECREF(__pyx_r); __pyx_t_10 = PyTuple_New(3); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7830; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_INCREF(((PyObject *)__pyx_v_result)); PyTuple_SET_ITEM(__pyx_t_10, 0, ((PyObject *)__pyx_v_result)); __Pyx_GIVEREF(((PyObject *)__pyx_v_result)); __Pyx_INCREF(((PyObject *)__pyx_v_lindexer)); PyTuple_SET_ITEM(__pyx_t_10, 1, ((PyObject *)__pyx_v_lindexer)); __Pyx_GIVEREF(((PyObject *)__pyx_v_lindexer)); __Pyx_INCREF(((PyObject *)__pyx_v_rindexer)); PyTuple_SET_ITEM(__pyx_t_10, 2, ((PyObject *)__pyx_v_rindexer)); __Pyx_GIVEREF(((PyObject *)__pyx_v_rindexer)); __pyx_r = ((PyObject *)__pyx_t_10); __pyx_t_10 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_9); __Pyx_XDECREF(__pyx_t_10); __Pyx_XDECREF(__pyx_t_11); __Pyx_XDECREF(__pyx_t_12); __Pyx_XDECREF(__pyx_t_13); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_left.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_lindexer.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_right.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_rindexer.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.outer_join_indexer_float64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_left.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_lindexer.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_right.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_rindexer.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_lindexer); __Pyx_XDECREF((PyObject *)__pyx_v_rindexer); __Pyx_XDECREF((PyObject *)__pyx_v_result); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_477outer_join_indexer_float32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_477outer_join_indexer_float32 = {__Pyx_NAMESTR("outer_join_indexer_float32"), (PyCFunction)__pyx_pw_6pandas_5algos_477outer_join_indexer_float32, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_477outer_join_indexer_float32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_left = 0; PyArrayObject *__pyx_v_right = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("outer_join_indexer_float32 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__left,&__pyx_n_s__right,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__left)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__right)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("outer_join_indexer_float32", 1, 2, 2, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7834; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "outer_join_indexer_float32") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7834; __pyx_clineno = __LINE__; goto __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_left = ((PyArrayObject *)values[0]); __pyx_v_right = ((PyArrayObject *)values[1]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("outer_join_indexer_float32", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7834; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.outer_join_indexer_float32", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_left), __pyx_ptype_5numpy_ndarray, 1, "left", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7834; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_right), __pyx_ptype_5numpy_ndarray, 1, "right", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7835; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_476outer_join_indexer_float32(__pyx_self, __pyx_v_left, __pyx_v_right); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":7834 * @cython.wraparound(False) * @cython.boundscheck(False) * def outer_join_indexer_float32(ndarray[float32_t] left, # <<<<<<<<<<<<<< * ndarray[float32_t] right): * cdef: */ static PyObject *__pyx_pf_6pandas_5algos_476outer_join_indexer_float32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_left, PyArrayObject *__pyx_v_right) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_nright; Py_ssize_t __pyx_v_nleft; Py_ssize_t __pyx_v_count; __pyx_t_5numpy_float32_t __pyx_v_lval; __pyx_t_5numpy_float32_t __pyx_v_rval; PyArrayObject *__pyx_v_lindexer = 0; PyArrayObject *__pyx_v_rindexer = 0; PyArrayObject *__pyx_v_result = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_left; __Pyx_Buffer __pyx_pybuffer_left; __Pyx_LocalBuf_ND __pyx_pybuffernd_lindexer; __Pyx_Buffer __pyx_pybuffer_lindexer; __Pyx_LocalBuf_ND __pyx_pybuffernd_result; __Pyx_Buffer __pyx_pybuffer_result; __Pyx_LocalBuf_ND __pyx_pybuffernd_right; __Pyx_Buffer __pyx_pybuffer_right; __Pyx_LocalBuf_ND __pyx_pybuffernd_rindexer; __Pyx_Buffer __pyx_pybuffer_rindexer; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; int __pyx_t_2; Py_ssize_t __pyx_t_3; Py_ssize_t __pyx_t_4; int __pyx_t_5; int __pyx_t_6; Py_ssize_t __pyx_t_7; Py_ssize_t __pyx_t_8; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; PyObject *__pyx_t_11 = NULL; PyObject *__pyx_t_12 = NULL; PyObject *__pyx_t_13 = NULL; PyArrayObject *__pyx_t_14 = NULL; int __pyx_t_15; PyObject *__pyx_t_16 = NULL; PyObject *__pyx_t_17 = NULL; PyObject *__pyx_t_18 = NULL; PyArrayObject *__pyx_t_19 = NULL; 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; Py_ssize_t __pyx_t_37; Py_ssize_t __pyx_t_38; Py_ssize_t __pyx_t_39; Py_ssize_t __pyx_t_40; Py_ssize_t __pyx_t_41; Py_ssize_t __pyx_t_42; Py_ssize_t __pyx_t_43; Py_ssize_t __pyx_t_44; Py_ssize_t __pyx_t_45; Py_ssize_t __pyx_t_46; Py_ssize_t __pyx_t_47; Py_ssize_t __pyx_t_48; Py_ssize_t __pyx_t_49; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("outer_join_indexer_float32", 0); __pyx_pybuffer_lindexer.pybuffer.buf = NULL; __pyx_pybuffer_lindexer.refcount = 0; __pyx_pybuffernd_lindexer.data = NULL; __pyx_pybuffernd_lindexer.rcbuffer = &__pyx_pybuffer_lindexer; __pyx_pybuffer_rindexer.pybuffer.buf = NULL; __pyx_pybuffer_rindexer.refcount = 0; __pyx_pybuffernd_rindexer.data = NULL; __pyx_pybuffernd_rindexer.rcbuffer = &__pyx_pybuffer_rindexer; __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_left.pybuffer.buf = NULL; __pyx_pybuffer_left.refcount = 0; __pyx_pybuffernd_left.data = NULL; __pyx_pybuffernd_left.rcbuffer = &__pyx_pybuffer_left; __pyx_pybuffer_right.pybuffer.buf = NULL; __pyx_pybuffer_right.refcount = 0; __pyx_pybuffernd_right.data = NULL; __pyx_pybuffernd_right.rcbuffer = &__pyx_pybuffer_right; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_left.rcbuffer->pybuffer, (PyObject*)__pyx_v_left, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7834; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_left.diminfo[0].strides = __pyx_pybuffernd_left.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_left.diminfo[0].shape = __pyx_pybuffernd_left.rcbuffer->pybuffer.shape[0]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_right.rcbuffer->pybuffer, (PyObject*)__pyx_v_right, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7834; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_right.diminfo[0].strides = __pyx_pybuffernd_right.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_right.diminfo[0].shape = __pyx_pybuffernd_right.rcbuffer->pybuffer.shape[0]; /* "pandas/src/generated.pyx":7842 * ndarray[float32_t] result * * nleft = len(left) # <<<<<<<<<<<<<< * nright = len(right) * */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_left)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7842; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_nleft = __pyx_t_1; /* "pandas/src/generated.pyx":7843 * * nleft = len(left) * nright = len(right) # <<<<<<<<<<<<<< * * i = 0 */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_right)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7843; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_nright = __pyx_t_1; /* "pandas/src/generated.pyx":7845 * nright = len(right) * * i = 0 # <<<<<<<<<<<<<< * j = 0 * count = 0 */ __pyx_v_i = 0; /* "pandas/src/generated.pyx":7846 * * i = 0 * j = 0 # <<<<<<<<<<<<<< * count = 0 * if nleft == 0: */ __pyx_v_j = 0; /* "pandas/src/generated.pyx":7847 * i = 0 * j = 0 * count = 0 # <<<<<<<<<<<<<< * if nleft == 0: * count = nright */ __pyx_v_count = 0; /* "pandas/src/generated.pyx":7848 * j = 0 * count = 0 * if nleft == 0: # <<<<<<<<<<<<<< * count = nright * elif nright == 0: */ __pyx_t_2 = ((__pyx_v_nleft == 0) != 0); if (__pyx_t_2) { /* "pandas/src/generated.pyx":7849 * count = 0 * if nleft == 0: * count = nright # <<<<<<<<<<<<<< * elif nright == 0: * count = nleft */ __pyx_v_count = __pyx_v_nright; goto __pyx_L3; } /* "pandas/src/generated.pyx":7850 * if nleft == 0: * count = nright * elif nright == 0: # <<<<<<<<<<<<<< * count = nleft * else: */ __pyx_t_2 = ((__pyx_v_nright == 0) != 0); if (__pyx_t_2) { /* "pandas/src/generated.pyx":7851 * count = nright * elif nright == 0: * count = nleft # <<<<<<<<<<<<<< * else: * while True: */ __pyx_v_count = __pyx_v_nleft; goto __pyx_L3; } /*else*/ { /* "pandas/src/generated.pyx":7853 * count = nleft * else: * while True: # <<<<<<<<<<<<<< * if i == nleft: * count += nright - j */ while (1) { if (!1) break; /* "pandas/src/generated.pyx":7854 * else: * while True: * if i == nleft: # <<<<<<<<<<<<<< * count += nright - j * break */ __pyx_t_2 = ((__pyx_v_i == __pyx_v_nleft) != 0); if (__pyx_t_2) { /* "pandas/src/generated.pyx":7855 * while True: * if i == nleft: * count += nright - j # <<<<<<<<<<<<<< * break * if j == nright: */ __pyx_v_count = (__pyx_v_count + (__pyx_v_nright - __pyx_v_j)); /* "pandas/src/generated.pyx":7856 * if i == nleft: * count += nright - j * break # <<<<<<<<<<<<<< * if j == nright: * count += nleft - i */ goto __pyx_L5_break; goto __pyx_L6; } __pyx_L6:; /* "pandas/src/generated.pyx":7857 * count += nright - j * break * if j == nright: # <<<<<<<<<<<<<< * count += nleft - i * break */ __pyx_t_2 = ((__pyx_v_j == __pyx_v_nright) != 0); if (__pyx_t_2) { /* "pandas/src/generated.pyx":7858 * break * if j == nright: * count += nleft - i # <<<<<<<<<<<<<< * break * */ __pyx_v_count = (__pyx_v_count + (__pyx_v_nleft - __pyx_v_i)); /* "pandas/src/generated.pyx":7859 * if j == nright: * count += nleft - i * break # <<<<<<<<<<<<<< * * lval = left[i] */ goto __pyx_L5_break; goto __pyx_L7; } __pyx_L7:; /* "pandas/src/generated.pyx":7861 * break * * lval = left[i] # <<<<<<<<<<<<<< * rval = right[j] * if lval == rval: */ __pyx_t_1 = __pyx_v_i; __pyx_v_lval = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_left.rcbuffer->pybuffer.buf, __pyx_t_1, __pyx_pybuffernd_left.diminfo[0].strides)); /* "pandas/src/generated.pyx":7862 * * lval = left[i] * rval = right[j] # <<<<<<<<<<<<<< * if lval == rval: * count += 1 */ __pyx_t_3 = __pyx_v_j; __pyx_v_rval = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_right.rcbuffer->pybuffer.buf, __pyx_t_3, __pyx_pybuffernd_right.diminfo[0].strides)); /* "pandas/src/generated.pyx":7863 * lval = left[i] * rval = right[j] * if lval == rval: # <<<<<<<<<<<<<< * count += 1 * if i < nleft - 1: */ __pyx_t_2 = ((__pyx_v_lval == __pyx_v_rval) != 0); if (__pyx_t_2) { /* "pandas/src/generated.pyx":7864 * rval = right[j] * if lval == rval: * count += 1 # <<<<<<<<<<<<<< * if i < nleft - 1: * if j < nright - 1 and right[j + 1] == rval: */ __pyx_v_count = (__pyx_v_count + 1); /* "pandas/src/generated.pyx":7865 * if lval == rval: * count += 1 * if i < nleft - 1: # <<<<<<<<<<<<<< * if j < nright - 1 and right[j + 1] == rval: * j += 1 */ __pyx_t_2 = ((__pyx_v_i < (__pyx_v_nleft - 1)) != 0); if (__pyx_t_2) { /* "pandas/src/generated.pyx":7866 * count += 1 * if i < nleft - 1: * if j < nright - 1 and right[j + 1] == rval: # <<<<<<<<<<<<<< * j += 1 * else: */ __pyx_t_2 = ((__pyx_v_j < (__pyx_v_nright - 1)) != 0); if (__pyx_t_2) { __pyx_t_4 = (__pyx_v_j + 1); __pyx_t_5 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_right.rcbuffer->pybuffer.buf, __pyx_t_4, __pyx_pybuffernd_right.diminfo[0].strides)) == __pyx_v_rval) != 0); __pyx_t_6 = __pyx_t_5; } else { __pyx_t_6 = __pyx_t_2; } if (__pyx_t_6) { /* "pandas/src/generated.pyx":7867 * if i < nleft - 1: * if j < nright - 1 and right[j + 1] == rval: * j += 1 # <<<<<<<<<<<<<< * else: * i += 1 */ __pyx_v_j = (__pyx_v_j + 1); goto __pyx_L10; } /*else*/ { /* "pandas/src/generated.pyx":7869 * j += 1 * else: * i += 1 # <<<<<<<<<<<<<< * if left[i] != rval: * j += 1 */ __pyx_v_i = (__pyx_v_i + 1); /* "pandas/src/generated.pyx":7870 * else: * i += 1 * if left[i] != rval: # <<<<<<<<<<<<<< * j += 1 * elif j < nright - 1: */ __pyx_t_7 = __pyx_v_i; __pyx_t_6 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_left.rcbuffer->pybuffer.buf, __pyx_t_7, __pyx_pybuffernd_left.diminfo[0].strides)) != __pyx_v_rval) != 0); if (__pyx_t_6) { /* "pandas/src/generated.pyx":7871 * i += 1 * if left[i] != rval: * j += 1 # <<<<<<<<<<<<<< * elif j < nright - 1: * j += 1 */ __pyx_v_j = (__pyx_v_j + 1); goto __pyx_L11; } __pyx_L11:; } __pyx_L10:; goto __pyx_L9; } /* "pandas/src/generated.pyx":7872 * if left[i] != rval: * j += 1 * elif j < nright - 1: # <<<<<<<<<<<<<< * j += 1 * if lval != right[j]: */ __pyx_t_6 = ((__pyx_v_j < (__pyx_v_nright - 1)) != 0); if (__pyx_t_6) { /* "pandas/src/generated.pyx":7873 * j += 1 * elif j < nright - 1: * j += 1 # <<<<<<<<<<<<<< * if lval != right[j]: * i += 1 */ __pyx_v_j = (__pyx_v_j + 1); /* "pandas/src/generated.pyx":7874 * elif j < nright - 1: * j += 1 * if lval != right[j]: # <<<<<<<<<<<<<< * i += 1 * else: */ __pyx_t_8 = __pyx_v_j; __pyx_t_6 = ((__pyx_v_lval != (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_right.rcbuffer->pybuffer.buf, __pyx_t_8, __pyx_pybuffernd_right.diminfo[0].strides))) != 0); if (__pyx_t_6) { /* "pandas/src/generated.pyx":7875 * j += 1 * if lval != right[j]: * i += 1 # <<<<<<<<<<<<<< * else: * # end of the road */ __pyx_v_i = (__pyx_v_i + 1); goto __pyx_L12; } __pyx_L12:; goto __pyx_L9; } /*else*/ { /* "pandas/src/generated.pyx":7878 * else: * # end of the road * break # <<<<<<<<<<<<<< * elif lval < rval: * count += 1 */ goto __pyx_L5_break; } __pyx_L9:; goto __pyx_L8; } /* "pandas/src/generated.pyx":7879 * # end of the road * break * elif lval < rval: # <<<<<<<<<<<<<< * count += 1 * i += 1 */ __pyx_t_6 = ((__pyx_v_lval < __pyx_v_rval) != 0); if (__pyx_t_6) { /* "pandas/src/generated.pyx":7880 * break * elif lval < rval: * count += 1 # <<<<<<<<<<<<<< * i += 1 * else: */ __pyx_v_count = (__pyx_v_count + 1); /* "pandas/src/generated.pyx":7881 * elif lval < rval: * count += 1 * i += 1 # <<<<<<<<<<<<<< * else: * count += 1 */ __pyx_v_i = (__pyx_v_i + 1); goto __pyx_L8; } /*else*/ { /* "pandas/src/generated.pyx":7883 * i += 1 * else: * count += 1 # <<<<<<<<<<<<<< * j += 1 * */ __pyx_v_count = (__pyx_v_count + 1); /* "pandas/src/generated.pyx":7884 * else: * count += 1 * j += 1 # <<<<<<<<<<<<<< * * lindexer = np.empty(count, dtype=np.int64) */ __pyx_v_j = (__pyx_v_j + 1); } __pyx_L8:; } __pyx_L5_break:; } __pyx_L3:; /* "pandas/src/generated.pyx":7886 * j += 1 * * lindexer = np.empty(count, dtype=np.int64) # <<<<<<<<<<<<<< * rindexer = np.empty(count, dtype=np.int64) * result = np.empty(count, dtype=np.float32) */ __pyx_t_9 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7886; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s__empty); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7886; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_9 = PyInt_FromSsize_t(__pyx_v_count); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7886; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_t_11 = PyTuple_New(1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7886; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_9); __Pyx_GIVEREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_9 = PyDict_New(); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7886; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_9)); __pyx_t_12 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7886; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s__int64); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7886; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; if (PyDict_SetItem(__pyx_t_9, ((PyObject *)__pyx_n_s__dtype), __pyx_t_13) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7886; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_13 = PyObject_Call(__pyx_t_10, ((PyObject *)__pyx_t_11), ((PyObject *)__pyx_t_9)); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7886; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_11)); __pyx_t_11 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_9)); __pyx_t_9 = 0; if (!(likely(((__pyx_t_13) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_13, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7886; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_14 = ((PyArrayObject *)__pyx_t_13); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_lindexer.rcbuffer->pybuffer); __pyx_t_15 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_lindexer.rcbuffer->pybuffer, (PyObject*)__pyx_t_14, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_15 < 0)) { PyErr_Fetch(&__pyx_t_16, &__pyx_t_17, &__pyx_t_18); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_lindexer.rcbuffer->pybuffer, (PyObject*)__pyx_v_lindexer, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_16); Py_XDECREF(__pyx_t_17); Py_XDECREF(__pyx_t_18); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_16, __pyx_t_17, __pyx_t_18); } } __pyx_pybuffernd_lindexer.diminfo[0].strides = __pyx_pybuffernd_lindexer.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_lindexer.diminfo[0].shape = __pyx_pybuffernd_lindexer.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_15 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7886; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_14 = 0; __pyx_v_lindexer = ((PyArrayObject *)__pyx_t_13); __pyx_t_13 = 0; /* "pandas/src/generated.pyx":7887 * * lindexer = np.empty(count, dtype=np.int64) * rindexer = np.empty(count, dtype=np.int64) # <<<<<<<<<<<<<< * result = np.empty(count, dtype=np.float32) * */ __pyx_t_13 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7887; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_13, __pyx_n_s__empty); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7887; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_13 = PyInt_FromSsize_t(__pyx_v_count); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7887; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __pyx_t_11 = PyTuple_New(1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7887; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_13); __Pyx_GIVEREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_13 = PyDict_New(); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7887; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_13)); __pyx_t_10 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7887; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s__int64); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7887; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; if (PyDict_SetItem(__pyx_t_13, ((PyObject *)__pyx_n_s__dtype), __pyx_t_12) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7887; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __pyx_t_12 = PyObject_Call(__pyx_t_9, ((PyObject *)__pyx_t_11), ((PyObject *)__pyx_t_13)); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7887; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_11)); __pyx_t_11 = 0; __Pyx_DECREF(((PyObject *)__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_filename = __pyx_f[2]; __pyx_lineno = 7887; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_14 = ((PyArrayObject *)__pyx_t_12); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_rindexer.rcbuffer->pybuffer); __pyx_t_15 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_rindexer.rcbuffer->pybuffer, (PyObject*)__pyx_t_14, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_15 < 0)) { PyErr_Fetch(&__pyx_t_18, &__pyx_t_17, &__pyx_t_16); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_rindexer.rcbuffer->pybuffer, (PyObject*)__pyx_v_rindexer, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_18); Py_XDECREF(__pyx_t_17); Py_XDECREF(__pyx_t_16); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_18, __pyx_t_17, __pyx_t_16); } } __pyx_pybuffernd_rindexer.diminfo[0].strides = __pyx_pybuffernd_rindexer.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_rindexer.diminfo[0].shape = __pyx_pybuffernd_rindexer.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_15 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7887; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_14 = 0; __pyx_v_rindexer = ((PyArrayObject *)__pyx_t_12); __pyx_t_12 = 0; /* "pandas/src/generated.pyx":7888 * lindexer = np.empty(count, dtype=np.int64) * rindexer = np.empty(count, dtype=np.int64) * result = np.empty(count, dtype=np.float32) # <<<<<<<<<<<<<< * * # do it again, but populate the indexers / result */ __pyx_t_12 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7888; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s__empty); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7888; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __pyx_t_12 = PyInt_FromSsize_t(__pyx_v_count); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7888; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __pyx_t_11 = PyTuple_New(1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7888; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_12); __Pyx_GIVEREF(__pyx_t_12); __pyx_t_12 = 0; __pyx_t_12 = PyDict_New(); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7888; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_12)); __pyx_t_9 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7888; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s__float32); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7888; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; if (PyDict_SetItem(__pyx_t_12, ((PyObject *)__pyx_n_s__dtype), __pyx_t_10) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7888; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_t_10 = PyObject_Call(__pyx_t_13, ((PyObject *)__pyx_t_11), ((PyObject *)__pyx_t_12)); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7888; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_11)); __pyx_t_11 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_12)); __pyx_t_12 = 0; if (!(likely(((__pyx_t_10) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_10, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7888; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_19 = ((PyArrayObject *)__pyx_t_10); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __pyx_t_15 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_t_19, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_15 < 0)) { PyErr_Fetch(&__pyx_t_16, &__pyx_t_17, &__pyx_t_18); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_v_result, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_16); Py_XDECREF(__pyx_t_17); Py_XDECREF(__pyx_t_18); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_16, __pyx_t_17, __pyx_t_18); } } __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_15 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7888; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_19 = 0; __pyx_v_result = ((PyArrayObject *)__pyx_t_10); __pyx_t_10 = 0; /* "pandas/src/generated.pyx":7892 * # do it again, but populate the indexers / result * * i = 0 # <<<<<<<<<<<<<< * j = 0 * count = 0 */ __pyx_v_i = 0; /* "pandas/src/generated.pyx":7893 * * i = 0 * j = 0 # <<<<<<<<<<<<<< * count = 0 * if nleft == 0: */ __pyx_v_j = 0; /* "pandas/src/generated.pyx":7894 * i = 0 * j = 0 * count = 0 # <<<<<<<<<<<<<< * if nleft == 0: * for j in range(nright): */ __pyx_v_count = 0; /* "pandas/src/generated.pyx":7895 * j = 0 * count = 0 * if nleft == 0: # <<<<<<<<<<<<<< * for j in range(nright): * lindexer[j] = -1 */ __pyx_t_6 = ((__pyx_v_nleft == 0) != 0); if (__pyx_t_6) { /* "pandas/src/generated.pyx":7896 * count = 0 * if nleft == 0: * for j in range(nright): # <<<<<<<<<<<<<< * lindexer[j] = -1 * rindexer[j] = j */ __pyx_t_20 = __pyx_v_nright; for (__pyx_t_21 = 0; __pyx_t_21 < __pyx_t_20; __pyx_t_21+=1) { __pyx_v_j = __pyx_t_21; /* "pandas/src/generated.pyx":7897 * if nleft == 0: * for j in range(nright): * lindexer[j] = -1 # <<<<<<<<<<<<<< * rindexer[j] = j * result[j] = right[j] */ __pyx_t_22 = __pyx_v_j; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_lindexer.rcbuffer->pybuffer.buf, __pyx_t_22, __pyx_pybuffernd_lindexer.diminfo[0].strides) = -1; /* "pandas/src/generated.pyx":7898 * for j in range(nright): * lindexer[j] = -1 * rindexer[j] = j # <<<<<<<<<<<<<< * result[j] = right[j] * elif nright == 0: */ __pyx_t_23 = __pyx_v_j; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_rindexer.rcbuffer->pybuffer.buf, __pyx_t_23, __pyx_pybuffernd_rindexer.diminfo[0].strides) = __pyx_v_j; /* "pandas/src/generated.pyx":7899 * lindexer[j] = -1 * rindexer[j] = j * result[j] = right[j] # <<<<<<<<<<<<<< * elif nright == 0: * for i in range(nright): */ __pyx_t_24 = __pyx_v_j; __pyx_t_25 = __pyx_v_j; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_25, __pyx_pybuffernd_result.diminfo[0].strides) = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_right.rcbuffer->pybuffer.buf, __pyx_t_24, __pyx_pybuffernd_right.diminfo[0].strides)); } goto __pyx_L13; } /* "pandas/src/generated.pyx":7900 * rindexer[j] = j * result[j] = right[j] * elif nright == 0: # <<<<<<<<<<<<<< * for i in range(nright): * lindexer[i] = i */ __pyx_t_6 = ((__pyx_v_nright == 0) != 0); if (__pyx_t_6) { /* "pandas/src/generated.pyx":7901 * result[j] = right[j] * elif nright == 0: * for i in range(nright): # <<<<<<<<<<<<<< * lindexer[i] = i * rindexer[i] = -1 */ __pyx_t_20 = __pyx_v_nright; for (__pyx_t_21 = 0; __pyx_t_21 < __pyx_t_20; __pyx_t_21+=1) { __pyx_v_i = __pyx_t_21; /* "pandas/src/generated.pyx":7902 * elif nright == 0: * for i in range(nright): * lindexer[i] = i # <<<<<<<<<<<<<< * rindexer[i] = -1 * result[i] = left[i] */ __pyx_t_26 = __pyx_v_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_lindexer.rcbuffer->pybuffer.buf, __pyx_t_26, __pyx_pybuffernd_lindexer.diminfo[0].strides) = __pyx_v_i; /* "pandas/src/generated.pyx":7903 * for i in range(nright): * lindexer[i] = i * rindexer[i] = -1 # <<<<<<<<<<<<<< * result[i] = left[i] * else: */ __pyx_t_27 = __pyx_v_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_rindexer.rcbuffer->pybuffer.buf, __pyx_t_27, __pyx_pybuffernd_rindexer.diminfo[0].strides) = -1; /* "pandas/src/generated.pyx":7904 * lindexer[i] = i * rindexer[i] = -1 * result[i] = left[i] # <<<<<<<<<<<<<< * else: * while True: */ __pyx_t_28 = __pyx_v_i; __pyx_t_29 = __pyx_v_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_29, __pyx_pybuffernd_result.diminfo[0].strides) = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_left.rcbuffer->pybuffer.buf, __pyx_t_28, __pyx_pybuffernd_left.diminfo[0].strides)); } goto __pyx_L13; } /*else*/ { /* "pandas/src/generated.pyx":7906 * result[i] = left[i] * else: * while True: # <<<<<<<<<<<<<< * if i == nleft: * while j < nright: */ while (1) { if (!1) break; /* "pandas/src/generated.pyx":7907 * else: * while True: * if i == nleft: # <<<<<<<<<<<<<< * while j < nright: * lindexer[count] = -1 */ __pyx_t_6 = ((__pyx_v_i == __pyx_v_nleft) != 0); if (__pyx_t_6) { /* "pandas/src/generated.pyx":7908 * while True: * if i == nleft: * while j < nright: # <<<<<<<<<<<<<< * lindexer[count] = -1 * rindexer[count] = j */ while (1) { __pyx_t_6 = ((__pyx_v_j < __pyx_v_nright) != 0); if (!__pyx_t_6) break; /* "pandas/src/generated.pyx":7909 * if i == nleft: * while j < nright: * lindexer[count] = -1 # <<<<<<<<<<<<<< * rindexer[count] = j * result[count] = right[j] */ __pyx_t_20 = __pyx_v_count; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_lindexer.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_lindexer.diminfo[0].strides) = -1; /* "pandas/src/generated.pyx":7910 * while j < nright: * lindexer[count] = -1 * rindexer[count] = j # <<<<<<<<<<<<<< * result[count] = right[j] * count += 1 */ __pyx_t_21 = __pyx_v_count; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_rindexer.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_rindexer.diminfo[0].strides) = __pyx_v_j; /* "pandas/src/generated.pyx":7911 * lindexer[count] = -1 * rindexer[count] = j * result[count] = right[j] # <<<<<<<<<<<<<< * count += 1 * j += 1 */ __pyx_t_30 = __pyx_v_j; __pyx_t_31 = __pyx_v_count; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_31, __pyx_pybuffernd_result.diminfo[0].strides) = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_right.rcbuffer->pybuffer.buf, __pyx_t_30, __pyx_pybuffernd_right.diminfo[0].strides)); /* "pandas/src/generated.pyx":7912 * rindexer[count] = j * result[count] = right[j] * count += 1 # <<<<<<<<<<<<<< * j += 1 * break */ __pyx_v_count = (__pyx_v_count + 1); /* "pandas/src/generated.pyx":7913 * result[count] = right[j] * count += 1 * j += 1 # <<<<<<<<<<<<<< * break * if j == nright: */ __pyx_v_j = (__pyx_v_j + 1); } /* "pandas/src/generated.pyx":7914 * count += 1 * j += 1 * break # <<<<<<<<<<<<<< * if j == nright: * while i < nleft: */ goto __pyx_L19_break; goto __pyx_L20; } __pyx_L20:; /* "pandas/src/generated.pyx":7915 * j += 1 * break * if j == nright: # <<<<<<<<<<<<<< * while i < nleft: * lindexer[count] = i */ __pyx_t_6 = ((__pyx_v_j == __pyx_v_nright) != 0); if (__pyx_t_6) { /* "pandas/src/generated.pyx":7916 * break * if j == nright: * while i < nleft: # <<<<<<<<<<<<<< * lindexer[count] = i * rindexer[count] = -1 */ while (1) { __pyx_t_6 = ((__pyx_v_i < __pyx_v_nleft) != 0); if (!__pyx_t_6) break; /* "pandas/src/generated.pyx":7917 * if j == nright: * while i < nleft: * lindexer[count] = i # <<<<<<<<<<<<<< * rindexer[count] = -1 * result[count] = left[i] */ __pyx_t_32 = __pyx_v_count; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_lindexer.rcbuffer->pybuffer.buf, __pyx_t_32, __pyx_pybuffernd_lindexer.diminfo[0].strides) = __pyx_v_i; /* "pandas/src/generated.pyx":7918 * while i < nleft: * lindexer[count] = i * rindexer[count] = -1 # <<<<<<<<<<<<<< * result[count] = left[i] * count += 1 */ __pyx_t_33 = __pyx_v_count; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_rindexer.rcbuffer->pybuffer.buf, __pyx_t_33, __pyx_pybuffernd_rindexer.diminfo[0].strides) = -1; /* "pandas/src/generated.pyx":7919 * lindexer[count] = i * rindexer[count] = -1 * result[count] = left[i] # <<<<<<<<<<<<<< * count += 1 * i += 1 */ __pyx_t_34 = __pyx_v_i; __pyx_t_35 = __pyx_v_count; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_35, __pyx_pybuffernd_result.diminfo[0].strides) = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_left.rcbuffer->pybuffer.buf, __pyx_t_34, __pyx_pybuffernd_left.diminfo[0].strides)); /* "pandas/src/generated.pyx":7920 * rindexer[count] = -1 * result[count] = left[i] * count += 1 # <<<<<<<<<<<<<< * i += 1 * break */ __pyx_v_count = (__pyx_v_count + 1); /* "pandas/src/generated.pyx":7921 * result[count] = left[i] * count += 1 * i += 1 # <<<<<<<<<<<<<< * break * */ __pyx_v_i = (__pyx_v_i + 1); } /* "pandas/src/generated.pyx":7922 * count += 1 * i += 1 * break # <<<<<<<<<<<<<< * * lval = left[i] */ goto __pyx_L19_break; goto __pyx_L23; } __pyx_L23:; /* "pandas/src/generated.pyx":7924 * break * * lval = left[i] # <<<<<<<<<<<<<< * rval = right[j] * */ __pyx_t_36 = __pyx_v_i; __pyx_v_lval = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_left.rcbuffer->pybuffer.buf, __pyx_t_36, __pyx_pybuffernd_left.diminfo[0].strides)); /* "pandas/src/generated.pyx":7925 * * lval = left[i] * rval = right[j] # <<<<<<<<<<<<<< * * if lval == rval: */ __pyx_t_37 = __pyx_v_j; __pyx_v_rval = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_right.rcbuffer->pybuffer.buf, __pyx_t_37, __pyx_pybuffernd_right.diminfo[0].strides)); /* "pandas/src/generated.pyx":7927 * rval = right[j] * * if lval == rval: # <<<<<<<<<<<<<< * lindexer[count] = i * rindexer[count] = j */ __pyx_t_6 = ((__pyx_v_lval == __pyx_v_rval) != 0); if (__pyx_t_6) { /* "pandas/src/generated.pyx":7928 * * if lval == rval: * lindexer[count] = i # <<<<<<<<<<<<<< * rindexer[count] = j * result[count] = lval */ __pyx_t_38 = __pyx_v_count; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_lindexer.rcbuffer->pybuffer.buf, __pyx_t_38, __pyx_pybuffernd_lindexer.diminfo[0].strides) = __pyx_v_i; /* "pandas/src/generated.pyx":7929 * if lval == rval: * lindexer[count] = i * rindexer[count] = j # <<<<<<<<<<<<<< * result[count] = lval * count += 1 */ __pyx_t_39 = __pyx_v_count; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_rindexer.rcbuffer->pybuffer.buf, __pyx_t_39, __pyx_pybuffernd_rindexer.diminfo[0].strides) = __pyx_v_j; /* "pandas/src/generated.pyx":7930 * lindexer[count] = i * rindexer[count] = j * result[count] = lval # <<<<<<<<<<<<<< * count += 1 * if i < nleft - 1: */ __pyx_t_40 = __pyx_v_count; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_40, __pyx_pybuffernd_result.diminfo[0].strides) = __pyx_v_lval; /* "pandas/src/generated.pyx":7931 * rindexer[count] = j * result[count] = lval * count += 1 # <<<<<<<<<<<<<< * if i < nleft - 1: * if j < nright - 1 and right[j + 1] == rval: */ __pyx_v_count = (__pyx_v_count + 1); /* "pandas/src/generated.pyx":7932 * result[count] = lval * count += 1 * if i < nleft - 1: # <<<<<<<<<<<<<< * if j < nright - 1 and right[j + 1] == rval: * j += 1 */ __pyx_t_6 = ((__pyx_v_i < (__pyx_v_nleft - 1)) != 0); if (__pyx_t_6) { /* "pandas/src/generated.pyx":7933 * count += 1 * if i < nleft - 1: * if j < nright - 1 and right[j + 1] == rval: # <<<<<<<<<<<<<< * j += 1 * else: */ __pyx_t_6 = ((__pyx_v_j < (__pyx_v_nright - 1)) != 0); if (__pyx_t_6) { __pyx_t_41 = (__pyx_v_j + 1); __pyx_t_2 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_right.rcbuffer->pybuffer.buf, __pyx_t_41, __pyx_pybuffernd_right.diminfo[0].strides)) == __pyx_v_rval) != 0); __pyx_t_5 = __pyx_t_2; } else { __pyx_t_5 = __pyx_t_6; } if (__pyx_t_5) { /* "pandas/src/generated.pyx":7934 * if i < nleft - 1: * if j < nright - 1 and right[j + 1] == rval: * j += 1 # <<<<<<<<<<<<<< * else: * i += 1 */ __pyx_v_j = (__pyx_v_j + 1); goto __pyx_L28; } /*else*/ { /* "pandas/src/generated.pyx":7936 * j += 1 * else: * i += 1 # <<<<<<<<<<<<<< * if left[i] != rval: * j += 1 */ __pyx_v_i = (__pyx_v_i + 1); /* "pandas/src/generated.pyx":7937 * else: * i += 1 * if left[i] != rval: # <<<<<<<<<<<<<< * j += 1 * elif j < nright - 1: */ __pyx_t_42 = __pyx_v_i; __pyx_t_5 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_left.rcbuffer->pybuffer.buf, __pyx_t_42, __pyx_pybuffernd_left.diminfo[0].strides)) != __pyx_v_rval) != 0); if (__pyx_t_5) { /* "pandas/src/generated.pyx":7938 * i += 1 * if left[i] != rval: * j += 1 # <<<<<<<<<<<<<< * elif j < nright - 1: * j += 1 */ __pyx_v_j = (__pyx_v_j + 1); goto __pyx_L29; } __pyx_L29:; } __pyx_L28:; goto __pyx_L27; } /* "pandas/src/generated.pyx":7939 * if left[i] != rval: * j += 1 * elif j < nright - 1: # <<<<<<<<<<<<<< * j += 1 * if lval != right[j]: */ __pyx_t_5 = ((__pyx_v_j < (__pyx_v_nright - 1)) != 0); if (__pyx_t_5) { /* "pandas/src/generated.pyx":7940 * j += 1 * elif j < nright - 1: * j += 1 # <<<<<<<<<<<<<< * if lval != right[j]: * i += 1 */ __pyx_v_j = (__pyx_v_j + 1); /* "pandas/src/generated.pyx":7941 * elif j < nright - 1: * j += 1 * if lval != right[j]: # <<<<<<<<<<<<<< * i += 1 * else: */ __pyx_t_43 = __pyx_v_j; __pyx_t_5 = ((__pyx_v_lval != (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_right.rcbuffer->pybuffer.buf, __pyx_t_43, __pyx_pybuffernd_right.diminfo[0].strides))) != 0); if (__pyx_t_5) { /* "pandas/src/generated.pyx":7942 * j += 1 * if lval != right[j]: * i += 1 # <<<<<<<<<<<<<< * else: * # end of the road */ __pyx_v_i = (__pyx_v_i + 1); goto __pyx_L30; } __pyx_L30:; goto __pyx_L27; } /*else*/ { /* "pandas/src/generated.pyx":7945 * else: * # end of the road * break # <<<<<<<<<<<<<< * elif lval < rval: * lindexer[count] = i */ goto __pyx_L19_break; } __pyx_L27:; goto __pyx_L26; } /* "pandas/src/generated.pyx":7946 * # end of the road * break * elif lval < rval: # <<<<<<<<<<<<<< * lindexer[count] = i * rindexer[count] = -1 */ __pyx_t_5 = ((__pyx_v_lval < __pyx_v_rval) != 0); if (__pyx_t_5) { /* "pandas/src/generated.pyx":7947 * break * elif lval < rval: * lindexer[count] = i # <<<<<<<<<<<<<< * rindexer[count] = -1 * result[count] = lval */ __pyx_t_44 = __pyx_v_count; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_lindexer.rcbuffer->pybuffer.buf, __pyx_t_44, __pyx_pybuffernd_lindexer.diminfo[0].strides) = __pyx_v_i; /* "pandas/src/generated.pyx":7948 * elif lval < rval: * lindexer[count] = i * rindexer[count] = -1 # <<<<<<<<<<<<<< * result[count] = lval * count += 1 */ __pyx_t_45 = __pyx_v_count; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_rindexer.rcbuffer->pybuffer.buf, __pyx_t_45, __pyx_pybuffernd_rindexer.diminfo[0].strides) = -1; /* "pandas/src/generated.pyx":7949 * lindexer[count] = i * rindexer[count] = -1 * result[count] = lval # <<<<<<<<<<<<<< * count += 1 * i += 1 */ __pyx_t_46 = __pyx_v_count; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_46, __pyx_pybuffernd_result.diminfo[0].strides) = __pyx_v_lval; /* "pandas/src/generated.pyx":7950 * rindexer[count] = -1 * result[count] = lval * count += 1 # <<<<<<<<<<<<<< * i += 1 * else: */ __pyx_v_count = (__pyx_v_count + 1); /* "pandas/src/generated.pyx":7951 * result[count] = lval * count += 1 * i += 1 # <<<<<<<<<<<<<< * else: * lindexer[count] = -1 */ __pyx_v_i = (__pyx_v_i + 1); goto __pyx_L26; } /*else*/ { /* "pandas/src/generated.pyx":7953 * i += 1 * else: * lindexer[count] = -1 # <<<<<<<<<<<<<< * rindexer[count] = j * result[count] = rval */ __pyx_t_47 = __pyx_v_count; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_lindexer.rcbuffer->pybuffer.buf, __pyx_t_47, __pyx_pybuffernd_lindexer.diminfo[0].strides) = -1; /* "pandas/src/generated.pyx":7954 * else: * lindexer[count] = -1 * rindexer[count] = j # <<<<<<<<<<<<<< * result[count] = rval * count += 1 */ __pyx_t_48 = __pyx_v_count; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_rindexer.rcbuffer->pybuffer.buf, __pyx_t_48, __pyx_pybuffernd_rindexer.diminfo[0].strides) = __pyx_v_j; /* "pandas/src/generated.pyx":7955 * lindexer[count] = -1 * rindexer[count] = j * result[count] = rval # <<<<<<<<<<<<<< * count += 1 * j += 1 */ __pyx_t_49 = __pyx_v_count; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_49, __pyx_pybuffernd_result.diminfo[0].strides) = __pyx_v_rval; /* "pandas/src/generated.pyx":7956 * rindexer[count] = j * result[count] = rval * count += 1 # <<<<<<<<<<<<<< * j += 1 * */ __pyx_v_count = (__pyx_v_count + 1); /* "pandas/src/generated.pyx":7957 * result[count] = rval * count += 1 * j += 1 # <<<<<<<<<<<<<< * * return result, lindexer, rindexer */ __pyx_v_j = (__pyx_v_j + 1); } __pyx_L26:; } __pyx_L19_break:; } __pyx_L13:; /* "pandas/src/generated.pyx":7959 * j += 1 * * return result, lindexer, rindexer # <<<<<<<<<<<<<< * * @cython.wraparound(False) */ __Pyx_XDECREF(__pyx_r); __pyx_t_10 = PyTuple_New(3); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7959; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_INCREF(((PyObject *)__pyx_v_result)); PyTuple_SET_ITEM(__pyx_t_10, 0, ((PyObject *)__pyx_v_result)); __Pyx_GIVEREF(((PyObject *)__pyx_v_result)); __Pyx_INCREF(((PyObject *)__pyx_v_lindexer)); PyTuple_SET_ITEM(__pyx_t_10, 1, ((PyObject *)__pyx_v_lindexer)); __Pyx_GIVEREF(((PyObject *)__pyx_v_lindexer)); __Pyx_INCREF(((PyObject *)__pyx_v_rindexer)); PyTuple_SET_ITEM(__pyx_t_10, 2, ((PyObject *)__pyx_v_rindexer)); __Pyx_GIVEREF(((PyObject *)__pyx_v_rindexer)); __pyx_r = ((PyObject *)__pyx_t_10); __pyx_t_10 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_9); __Pyx_XDECREF(__pyx_t_10); __Pyx_XDECREF(__pyx_t_11); __Pyx_XDECREF(__pyx_t_12); __Pyx_XDECREF(__pyx_t_13); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_left.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_lindexer.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_right.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_rindexer.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.outer_join_indexer_float32", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_left.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_lindexer.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_right.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_rindexer.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_lindexer); __Pyx_XDECREF((PyObject *)__pyx_v_rindexer); __Pyx_XDECREF((PyObject *)__pyx_v_result); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_479outer_join_indexer_object(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_479outer_join_indexer_object = {__Pyx_NAMESTR("outer_join_indexer_object"), (PyCFunction)__pyx_pw_6pandas_5algos_479outer_join_indexer_object, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_479outer_join_indexer_object(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_left = 0; PyArrayObject *__pyx_v_right = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("outer_join_indexer_object (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__left,&__pyx_n_s__right,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__left)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__right)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("outer_join_indexer_object", 1, 2, 2, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7963; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "outer_join_indexer_object") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7963; __pyx_clineno = __LINE__; goto __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_left = ((PyArrayObject *)values[0]); __pyx_v_right = ((PyArrayObject *)values[1]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("outer_join_indexer_object", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7963; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.outer_join_indexer_object", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_left), __pyx_ptype_5numpy_ndarray, 1, "left", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7963; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_right), __pyx_ptype_5numpy_ndarray, 1, "right", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7964; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_478outer_join_indexer_object(__pyx_self, __pyx_v_left, __pyx_v_right); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":7963 * @cython.wraparound(False) * @cython.boundscheck(False) * def outer_join_indexer_object(ndarray[object] left, # <<<<<<<<<<<<<< * ndarray[object] right): * cdef: */ static PyObject *__pyx_pf_6pandas_5algos_478outer_join_indexer_object(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_left, PyArrayObject *__pyx_v_right) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_nright; Py_ssize_t __pyx_v_nleft; Py_ssize_t __pyx_v_count; PyObject *__pyx_v_lval = 0; PyObject *__pyx_v_rval = 0; PyArrayObject *__pyx_v_lindexer = 0; PyArrayObject *__pyx_v_rindexer = 0; PyArrayObject *__pyx_v_result = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_left; __Pyx_Buffer __pyx_pybuffer_left; __Pyx_LocalBuf_ND __pyx_pybuffernd_lindexer; __Pyx_Buffer __pyx_pybuffer_lindexer; __Pyx_LocalBuf_ND __pyx_pybuffernd_result; __Pyx_Buffer __pyx_pybuffer_result; __Pyx_LocalBuf_ND __pyx_pybuffernd_right; __Pyx_Buffer __pyx_pybuffer_right; __Pyx_LocalBuf_ND __pyx_pybuffernd_rindexer; __Pyx_Buffer __pyx_pybuffer_rindexer; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; Py_ssize_t __pyx_t_4; Py_ssize_t __pyx_t_5; PyObject *__pyx_t_6 = NULL; int __pyx_t_7; int __pyx_t_8; Py_ssize_t __pyx_t_9; 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; PyObject *__pyx_t_16 = NULL; PyObject *__pyx_t_17 = NULL; PyObject *__pyx_t_18 = NULL; PyArrayObject *__pyx_t_19 = NULL; 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; PyObject **__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; Py_ssize_t __pyx_t_37; Py_ssize_t __pyx_t_38; Py_ssize_t __pyx_t_39; Py_ssize_t __pyx_t_40; Py_ssize_t __pyx_t_41; Py_ssize_t __pyx_t_42; Py_ssize_t __pyx_t_43; Py_ssize_t __pyx_t_44; Py_ssize_t __pyx_t_45; Py_ssize_t __pyx_t_46; Py_ssize_t __pyx_t_47; Py_ssize_t __pyx_t_48; Py_ssize_t __pyx_t_49; Py_ssize_t __pyx_t_50; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("outer_join_indexer_object", 0); __pyx_pybuffer_lindexer.pybuffer.buf = NULL; __pyx_pybuffer_lindexer.refcount = 0; __pyx_pybuffernd_lindexer.data = NULL; __pyx_pybuffernd_lindexer.rcbuffer = &__pyx_pybuffer_lindexer; __pyx_pybuffer_rindexer.pybuffer.buf = NULL; __pyx_pybuffer_rindexer.refcount = 0; __pyx_pybuffernd_rindexer.data = NULL; __pyx_pybuffernd_rindexer.rcbuffer = &__pyx_pybuffer_rindexer; __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_left.pybuffer.buf = NULL; __pyx_pybuffer_left.refcount = 0; __pyx_pybuffernd_left.data = NULL; __pyx_pybuffernd_left.rcbuffer = &__pyx_pybuffer_left; __pyx_pybuffer_right.pybuffer.buf = NULL; __pyx_pybuffer_right.refcount = 0; __pyx_pybuffernd_right.data = NULL; __pyx_pybuffernd_right.rcbuffer = &__pyx_pybuffer_right; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_left.rcbuffer->pybuffer, (PyObject*)__pyx_v_left, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7963; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_left.diminfo[0].strides = __pyx_pybuffernd_left.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_left.diminfo[0].shape = __pyx_pybuffernd_left.rcbuffer->pybuffer.shape[0]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_right.rcbuffer->pybuffer, (PyObject*)__pyx_v_right, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7963; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_right.diminfo[0].strides = __pyx_pybuffernd_right.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_right.diminfo[0].shape = __pyx_pybuffernd_right.rcbuffer->pybuffer.shape[0]; /* "pandas/src/generated.pyx":7971 * ndarray[object] result * * nleft = len(left) # <<<<<<<<<<<<<< * nright = len(right) * */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_left)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7971; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_nleft = __pyx_t_1; /* "pandas/src/generated.pyx":7972 * * nleft = len(left) * nright = len(right) # <<<<<<<<<<<<<< * * i = 0 */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_right)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7972; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_nright = __pyx_t_1; /* "pandas/src/generated.pyx":7974 * nright = len(right) * * i = 0 # <<<<<<<<<<<<<< * j = 0 * count = 0 */ __pyx_v_i = 0; /* "pandas/src/generated.pyx":7975 * * i = 0 * j = 0 # <<<<<<<<<<<<<< * count = 0 * if nleft == 0: */ __pyx_v_j = 0; /* "pandas/src/generated.pyx":7976 * i = 0 * j = 0 * count = 0 # <<<<<<<<<<<<<< * if nleft == 0: * count = nright */ __pyx_v_count = 0; /* "pandas/src/generated.pyx":7977 * j = 0 * count = 0 * if nleft == 0: # <<<<<<<<<<<<<< * count = nright * elif nright == 0: */ __pyx_t_2 = ((__pyx_v_nleft == 0) != 0); if (__pyx_t_2) { /* "pandas/src/generated.pyx":7978 * count = 0 * if nleft == 0: * count = nright # <<<<<<<<<<<<<< * elif nright == 0: * count = nleft */ __pyx_v_count = __pyx_v_nright; goto __pyx_L3; } /* "pandas/src/generated.pyx":7979 * if nleft == 0: * count = nright * elif nright == 0: # <<<<<<<<<<<<<< * count = nleft * else: */ __pyx_t_2 = ((__pyx_v_nright == 0) != 0); if (__pyx_t_2) { /* "pandas/src/generated.pyx":7980 * count = nright * elif nright == 0: * count = nleft # <<<<<<<<<<<<<< * else: * while True: */ __pyx_v_count = __pyx_v_nleft; goto __pyx_L3; } /*else*/ { /* "pandas/src/generated.pyx":7982 * count = nleft * else: * while True: # <<<<<<<<<<<<<< * if i == nleft: * count += nright - j */ while (1) { if (!1) break; /* "pandas/src/generated.pyx":7983 * else: * while True: * if i == nleft: # <<<<<<<<<<<<<< * count += nright - j * break */ __pyx_t_2 = ((__pyx_v_i == __pyx_v_nleft) != 0); if (__pyx_t_2) { /* "pandas/src/generated.pyx":7984 * while True: * if i == nleft: * count += nright - j # <<<<<<<<<<<<<< * break * if j == nright: */ __pyx_v_count = (__pyx_v_count + (__pyx_v_nright - __pyx_v_j)); /* "pandas/src/generated.pyx":7985 * if i == nleft: * count += nright - j * break # <<<<<<<<<<<<<< * if j == nright: * count += nleft - i */ goto __pyx_L5_break; goto __pyx_L6; } __pyx_L6:; /* "pandas/src/generated.pyx":7986 * count += nright - j * break * if j == nright: # <<<<<<<<<<<<<< * count += nleft - i * break */ __pyx_t_2 = ((__pyx_v_j == __pyx_v_nright) != 0); if (__pyx_t_2) { /* "pandas/src/generated.pyx":7987 * break * if j == nright: * count += nleft - i # <<<<<<<<<<<<<< * break * */ __pyx_v_count = (__pyx_v_count + (__pyx_v_nleft - __pyx_v_i)); /* "pandas/src/generated.pyx":7988 * if j == nright: * count += nleft - i * break # <<<<<<<<<<<<<< * * lval = left[i] */ goto __pyx_L5_break; goto __pyx_L7; } __pyx_L7:; /* "pandas/src/generated.pyx":7990 * break * * lval = left[i] # <<<<<<<<<<<<<< * rval = right[j] * if lval == rval: */ __pyx_t_1 = __pyx_v_i; __pyx_t_3 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_left.rcbuffer->pybuffer.buf, __pyx_t_1, __pyx_pybuffernd_left.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_3); __Pyx_XDECREF_SET(__pyx_v_lval, __pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/generated.pyx":7991 * * lval = left[i] * rval = right[j] # <<<<<<<<<<<<<< * if lval == rval: * count += 1 */ __pyx_t_4 = __pyx_v_j; __pyx_t_3 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_right.rcbuffer->pybuffer.buf, __pyx_t_4, __pyx_pybuffernd_right.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_3); __Pyx_XDECREF_SET(__pyx_v_rval, __pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/generated.pyx":7992 * lval = left[i] * rval = right[j] * if lval == rval: # <<<<<<<<<<<<<< * count += 1 * if i < nleft - 1: */ __pyx_t_3 = PyObject_RichCompare(__pyx_v_lval, __pyx_v_rval, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7992; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7992; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_2) { /* "pandas/src/generated.pyx":7993 * rval = right[j] * if lval == rval: * count += 1 # <<<<<<<<<<<<<< * if i < nleft - 1: * if j < nright - 1 and right[j + 1] == rval: */ __pyx_v_count = (__pyx_v_count + 1); /* "pandas/src/generated.pyx":7994 * if lval == rval: * count += 1 * if i < nleft - 1: # <<<<<<<<<<<<<< * if j < nright - 1 and right[j + 1] == rval: * j += 1 */ __pyx_t_2 = ((__pyx_v_i < (__pyx_v_nleft - 1)) != 0); if (__pyx_t_2) { /* "pandas/src/generated.pyx":7995 * count += 1 * if i < nleft - 1: * if j < nright - 1 and right[j + 1] == rval: # <<<<<<<<<<<<<< * j += 1 * else: */ __pyx_t_2 = (__pyx_v_j < (__pyx_v_nright - 1)); if (__pyx_t_2) { __pyx_t_5 = (__pyx_v_j + 1); __pyx_t_3 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_right.rcbuffer->pybuffer.buf, __pyx_t_5, __pyx_pybuffernd_right.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_3); __pyx_t_6 = PyObject_RichCompare(__pyx_t_3, __pyx_v_rval, Py_EQ); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7995; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7995; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_8 = __pyx_t_7; } else { __pyx_t_8 = __pyx_t_2; } if (__pyx_t_8) { /* "pandas/src/generated.pyx":7996 * if i < nleft - 1: * if j < nright - 1 and right[j + 1] == rval: * j += 1 # <<<<<<<<<<<<<< * else: * i += 1 */ __pyx_v_j = (__pyx_v_j + 1); goto __pyx_L10; } /*else*/ { /* "pandas/src/generated.pyx":7998 * j += 1 * else: * i += 1 # <<<<<<<<<<<<<< * if left[i] != rval: * j += 1 */ __pyx_v_i = (__pyx_v_i + 1); /* "pandas/src/generated.pyx":7999 * else: * i += 1 * if left[i] != rval: # <<<<<<<<<<<<<< * j += 1 * elif j < nright - 1: */ __pyx_t_9 = __pyx_v_i; __pyx_t_6 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_left.rcbuffer->pybuffer.buf, __pyx_t_9, __pyx_pybuffernd_left.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_6); __pyx_t_3 = PyObject_RichCompare(__pyx_t_6, __pyx_v_rval, Py_NE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7999; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7999; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_8) { /* "pandas/src/generated.pyx":8000 * i += 1 * if left[i] != rval: * j += 1 # <<<<<<<<<<<<<< * elif j < nright - 1: * j += 1 */ __pyx_v_j = (__pyx_v_j + 1); goto __pyx_L11; } __pyx_L11:; } __pyx_L10:; goto __pyx_L9; } /* "pandas/src/generated.pyx":8001 * if left[i] != rval: * j += 1 * elif j < nright - 1: # <<<<<<<<<<<<<< * j += 1 * if lval != right[j]: */ __pyx_t_8 = ((__pyx_v_j < (__pyx_v_nright - 1)) != 0); if (__pyx_t_8) { /* "pandas/src/generated.pyx":8002 * j += 1 * elif j < nright - 1: * j += 1 # <<<<<<<<<<<<<< * if lval != right[j]: * i += 1 */ __pyx_v_j = (__pyx_v_j + 1); /* "pandas/src/generated.pyx":8003 * elif j < nright - 1: * j += 1 * if lval != right[j]: # <<<<<<<<<<<<<< * i += 1 * else: */ __pyx_t_10 = __pyx_v_j; __pyx_t_3 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_right.rcbuffer->pybuffer.buf, __pyx_t_10, __pyx_pybuffernd_right.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_3); __pyx_t_6 = PyObject_RichCompare(__pyx_v_lval, __pyx_t_3, Py_NE); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8003; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8003; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (__pyx_t_8) { /* "pandas/src/generated.pyx":8004 * j += 1 * if lval != right[j]: * i += 1 # <<<<<<<<<<<<<< * else: * # end of the road */ __pyx_v_i = (__pyx_v_i + 1); goto __pyx_L12; } __pyx_L12:; goto __pyx_L9; } /*else*/ { /* "pandas/src/generated.pyx":8007 * else: * # end of the road * break # <<<<<<<<<<<<<< * elif lval < rval: * count += 1 */ goto __pyx_L5_break; } __pyx_L9:; goto __pyx_L8; } /* "pandas/src/generated.pyx":8008 * # end of the road * break * elif lval < rval: # <<<<<<<<<<<<<< * count += 1 * i += 1 */ __pyx_t_6 = PyObject_RichCompare(__pyx_v_lval, __pyx_v_rval, Py_LT); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8008; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8008; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (__pyx_t_8) { /* "pandas/src/generated.pyx":8009 * break * elif lval < rval: * count += 1 # <<<<<<<<<<<<<< * i += 1 * else: */ __pyx_v_count = (__pyx_v_count + 1); /* "pandas/src/generated.pyx":8010 * elif lval < rval: * count += 1 * i += 1 # <<<<<<<<<<<<<< * else: * count += 1 */ __pyx_v_i = (__pyx_v_i + 1); goto __pyx_L8; } /*else*/ { /* "pandas/src/generated.pyx":8012 * i += 1 * else: * count += 1 # <<<<<<<<<<<<<< * j += 1 * */ __pyx_v_count = (__pyx_v_count + 1); /* "pandas/src/generated.pyx":8013 * else: * count += 1 * j += 1 # <<<<<<<<<<<<<< * * lindexer = np.empty(count, dtype=np.int64) */ __pyx_v_j = (__pyx_v_j + 1); } __pyx_L8:; } __pyx_L5_break:; } __pyx_L3:; /* "pandas/src/generated.pyx":8015 * j += 1 * * lindexer = np.empty(count, dtype=np.int64) # <<<<<<<<<<<<<< * rindexer = np.empty(count, dtype=np.int64) * result = np.empty(count, dtype=object) */ __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8015; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s__empty); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8015; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyInt_FromSsize_t(__pyx_v_count); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8015; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_11 = PyTuple_New(1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8015; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyDict_New(); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8015; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_6)); __pyx_t_12 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8015; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s__int64); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8015; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; if (PyDict_SetItem(__pyx_t_6, ((PyObject *)__pyx_n_s__dtype), __pyx_t_13) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8015; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_13 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_11), ((PyObject *)__pyx_t_6)); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8015; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_11)); __pyx_t_11 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0; if (!(likely(((__pyx_t_13) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_13, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8015; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_14 = ((PyArrayObject *)__pyx_t_13); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_lindexer.rcbuffer->pybuffer); __pyx_t_15 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_lindexer.rcbuffer->pybuffer, (PyObject*)__pyx_t_14, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_15 < 0)) { PyErr_Fetch(&__pyx_t_16, &__pyx_t_17, &__pyx_t_18); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_lindexer.rcbuffer->pybuffer, (PyObject*)__pyx_v_lindexer, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_16); Py_XDECREF(__pyx_t_17); Py_XDECREF(__pyx_t_18); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_16, __pyx_t_17, __pyx_t_18); } } __pyx_pybuffernd_lindexer.diminfo[0].strides = __pyx_pybuffernd_lindexer.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_lindexer.diminfo[0].shape = __pyx_pybuffernd_lindexer.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_15 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8015; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_14 = 0; __pyx_v_lindexer = ((PyArrayObject *)__pyx_t_13); __pyx_t_13 = 0; /* "pandas/src/generated.pyx":8016 * * lindexer = np.empty(count, dtype=np.int64) * rindexer = np.empty(count, dtype=np.int64) # <<<<<<<<<<<<<< * result = np.empty(count, dtype=object) * */ __pyx_t_13 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8016; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_13, __pyx_n_s__empty); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8016; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_13 = PyInt_FromSsize_t(__pyx_v_count); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8016; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __pyx_t_11 = PyTuple_New(1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8016; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_13); __Pyx_GIVEREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_13 = PyDict_New(); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8016; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_13)); __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8016; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s__int64); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8016; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (PyDict_SetItem(__pyx_t_13, ((PyObject *)__pyx_n_s__dtype), __pyx_t_12) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8016; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __pyx_t_12 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_t_11), ((PyObject *)__pyx_t_13)); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8016; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_11)); __pyx_t_11 = 0; __Pyx_DECREF(((PyObject *)__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_filename = __pyx_f[2]; __pyx_lineno = 8016; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_14 = ((PyArrayObject *)__pyx_t_12); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_rindexer.rcbuffer->pybuffer); __pyx_t_15 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_rindexer.rcbuffer->pybuffer, (PyObject*)__pyx_t_14, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_15 < 0)) { PyErr_Fetch(&__pyx_t_18, &__pyx_t_17, &__pyx_t_16); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_rindexer.rcbuffer->pybuffer, (PyObject*)__pyx_v_rindexer, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_18); Py_XDECREF(__pyx_t_17); Py_XDECREF(__pyx_t_16); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_18, __pyx_t_17, __pyx_t_16); } } __pyx_pybuffernd_rindexer.diminfo[0].strides = __pyx_pybuffernd_rindexer.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_rindexer.diminfo[0].shape = __pyx_pybuffernd_rindexer.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_15 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8016; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_14 = 0; __pyx_v_rindexer = ((PyArrayObject *)__pyx_t_12); __pyx_t_12 = 0; /* "pandas/src/generated.pyx":8017 * lindexer = np.empty(count, dtype=np.int64) * rindexer = np.empty(count, dtype=np.int64) * result = np.empty(count, dtype=object) # <<<<<<<<<<<<<< * * # do it again, but populate the indexers / result */ __pyx_t_12 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8017; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s__empty); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8017; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __pyx_t_12 = PyInt_FromSsize_t(__pyx_v_count); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8017; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __pyx_t_11 = PyTuple_New(1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8017; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_12); __Pyx_GIVEREF(__pyx_t_12); __pyx_t_12 = 0; __pyx_t_12 = PyDict_New(); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8017; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_12)); if (PyDict_SetItem(__pyx_t_12, ((PyObject *)__pyx_n_s__dtype), __pyx_builtin_object) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8017; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_6 = PyObject_Call(__pyx_t_13, ((PyObject *)__pyx_t_11), ((PyObject *)__pyx_t_12)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8017; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_11)); __pyx_t_11 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_12)); __pyx_t_12 = 0; if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8017; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_19 = ((PyArrayObject *)__pyx_t_6); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __pyx_t_15 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_t_19, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_15 < 0)) { PyErr_Fetch(&__pyx_t_16, &__pyx_t_17, &__pyx_t_18); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_v_result, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_16); Py_XDECREF(__pyx_t_17); Py_XDECREF(__pyx_t_18); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_16, __pyx_t_17, __pyx_t_18); } } __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_15 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8017; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_19 = 0; __pyx_v_result = ((PyArrayObject *)__pyx_t_6); __pyx_t_6 = 0; /* "pandas/src/generated.pyx":8021 * # do it again, but populate the indexers / result * * i = 0 # <<<<<<<<<<<<<< * j = 0 * count = 0 */ __pyx_v_i = 0; /* "pandas/src/generated.pyx":8022 * * i = 0 * j = 0 # <<<<<<<<<<<<<< * count = 0 * if nleft == 0: */ __pyx_v_j = 0; /* "pandas/src/generated.pyx":8023 * i = 0 * j = 0 * count = 0 # <<<<<<<<<<<<<< * if nleft == 0: * for j in range(nright): */ __pyx_v_count = 0; /* "pandas/src/generated.pyx":8024 * j = 0 * count = 0 * if nleft == 0: # <<<<<<<<<<<<<< * for j in range(nright): * lindexer[j] = -1 */ __pyx_t_8 = ((__pyx_v_nleft == 0) != 0); if (__pyx_t_8) { /* "pandas/src/generated.pyx":8025 * count = 0 * if nleft == 0: * for j in range(nright): # <<<<<<<<<<<<<< * lindexer[j] = -1 * rindexer[j] = j */ __pyx_t_20 = __pyx_v_nright; for (__pyx_t_21 = 0; __pyx_t_21 < __pyx_t_20; __pyx_t_21+=1) { __pyx_v_j = __pyx_t_21; /* "pandas/src/generated.pyx":8026 * if nleft == 0: * for j in range(nright): * lindexer[j] = -1 # <<<<<<<<<<<<<< * rindexer[j] = j * result[j] = right[j] */ __pyx_t_22 = __pyx_v_j; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_lindexer.rcbuffer->pybuffer.buf, __pyx_t_22, __pyx_pybuffernd_lindexer.diminfo[0].strides) = -1; /* "pandas/src/generated.pyx":8027 * for j in range(nright): * lindexer[j] = -1 * rindexer[j] = j # <<<<<<<<<<<<<< * result[j] = right[j] * elif nright == 0: */ __pyx_t_23 = __pyx_v_j; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_rindexer.rcbuffer->pybuffer.buf, __pyx_t_23, __pyx_pybuffernd_rindexer.diminfo[0].strides) = __pyx_v_j; /* "pandas/src/generated.pyx":8028 * lindexer[j] = -1 * rindexer[j] = j * result[j] = right[j] # <<<<<<<<<<<<<< * elif nright == 0: * for i in range(nright): */ __pyx_t_24 = __pyx_v_j; __pyx_t_6 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_right.rcbuffer->pybuffer.buf, __pyx_t_24, __pyx_pybuffernd_right.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_6); __pyx_t_25 = __pyx_v_j; __pyx_t_26 = __Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_25, __pyx_pybuffernd_result.diminfo[0].strides); __Pyx_GOTREF(*__pyx_t_26); __Pyx_INCREF(__pyx_t_6); __Pyx_DECREF(*__pyx_t_26); *__pyx_t_26 = __pyx_t_6; __Pyx_GIVEREF(*__pyx_t_26); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } goto __pyx_L13; } /* "pandas/src/generated.pyx":8029 * rindexer[j] = j * result[j] = right[j] * elif nright == 0: # <<<<<<<<<<<<<< * for i in range(nright): * lindexer[i] = i */ __pyx_t_8 = ((__pyx_v_nright == 0) != 0); if (__pyx_t_8) { /* "pandas/src/generated.pyx":8030 * result[j] = right[j] * elif nright == 0: * for i in range(nright): # <<<<<<<<<<<<<< * lindexer[i] = i * rindexer[i] = -1 */ __pyx_t_20 = __pyx_v_nright; for (__pyx_t_21 = 0; __pyx_t_21 < __pyx_t_20; __pyx_t_21+=1) { __pyx_v_i = __pyx_t_21; /* "pandas/src/generated.pyx":8031 * elif nright == 0: * for i in range(nright): * lindexer[i] = i # <<<<<<<<<<<<<< * rindexer[i] = -1 * result[i] = left[i] */ __pyx_t_27 = __pyx_v_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_lindexer.rcbuffer->pybuffer.buf, __pyx_t_27, __pyx_pybuffernd_lindexer.diminfo[0].strides) = __pyx_v_i; /* "pandas/src/generated.pyx":8032 * for i in range(nright): * lindexer[i] = i * rindexer[i] = -1 # <<<<<<<<<<<<<< * result[i] = left[i] * else: */ __pyx_t_28 = __pyx_v_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_rindexer.rcbuffer->pybuffer.buf, __pyx_t_28, __pyx_pybuffernd_rindexer.diminfo[0].strides) = -1; /* "pandas/src/generated.pyx":8033 * lindexer[i] = i * rindexer[i] = -1 * result[i] = left[i] # <<<<<<<<<<<<<< * else: * while True: */ __pyx_t_29 = __pyx_v_i; __pyx_t_6 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_left.rcbuffer->pybuffer.buf, __pyx_t_29, __pyx_pybuffernd_left.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_6); __pyx_t_30 = __pyx_v_i; __pyx_t_26 = __Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_30, __pyx_pybuffernd_result.diminfo[0].strides); __Pyx_GOTREF(*__pyx_t_26); __Pyx_INCREF(__pyx_t_6); __Pyx_DECREF(*__pyx_t_26); *__pyx_t_26 = __pyx_t_6; __Pyx_GIVEREF(*__pyx_t_26); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } goto __pyx_L13; } /*else*/ { /* "pandas/src/generated.pyx":8035 * result[i] = left[i] * else: * while True: # <<<<<<<<<<<<<< * if i == nleft: * while j < nright: */ while (1) { if (!1) break; /* "pandas/src/generated.pyx":8036 * else: * while True: * if i == nleft: # <<<<<<<<<<<<<< * while j < nright: * lindexer[count] = -1 */ __pyx_t_8 = ((__pyx_v_i == __pyx_v_nleft) != 0); if (__pyx_t_8) { /* "pandas/src/generated.pyx":8037 * while True: * if i == nleft: * while j < nright: # <<<<<<<<<<<<<< * lindexer[count] = -1 * rindexer[count] = j */ while (1) { __pyx_t_8 = ((__pyx_v_j < __pyx_v_nright) != 0); if (!__pyx_t_8) break; /* "pandas/src/generated.pyx":8038 * if i == nleft: * while j < nright: * lindexer[count] = -1 # <<<<<<<<<<<<<< * rindexer[count] = j * result[count] = right[j] */ __pyx_t_20 = __pyx_v_count; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_lindexer.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_lindexer.diminfo[0].strides) = -1; /* "pandas/src/generated.pyx":8039 * while j < nright: * lindexer[count] = -1 * rindexer[count] = j # <<<<<<<<<<<<<< * result[count] = right[j] * count += 1 */ __pyx_t_21 = __pyx_v_count; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_rindexer.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_rindexer.diminfo[0].strides) = __pyx_v_j; /* "pandas/src/generated.pyx":8040 * lindexer[count] = -1 * rindexer[count] = j * result[count] = right[j] # <<<<<<<<<<<<<< * count += 1 * j += 1 */ __pyx_t_31 = __pyx_v_j; __pyx_t_6 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_right.rcbuffer->pybuffer.buf, __pyx_t_31, __pyx_pybuffernd_right.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_6); __pyx_t_32 = __pyx_v_count; __pyx_t_26 = __Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_32, __pyx_pybuffernd_result.diminfo[0].strides); __Pyx_GOTREF(*__pyx_t_26); __Pyx_INCREF(__pyx_t_6); __Pyx_DECREF(*__pyx_t_26); *__pyx_t_26 = __pyx_t_6; __Pyx_GIVEREF(*__pyx_t_26); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; /* "pandas/src/generated.pyx":8041 * rindexer[count] = j * result[count] = right[j] * count += 1 # <<<<<<<<<<<<<< * j += 1 * break */ __pyx_v_count = (__pyx_v_count + 1); /* "pandas/src/generated.pyx":8042 * result[count] = right[j] * count += 1 * j += 1 # <<<<<<<<<<<<<< * break * if j == nright: */ __pyx_v_j = (__pyx_v_j + 1); } /* "pandas/src/generated.pyx":8043 * count += 1 * j += 1 * break # <<<<<<<<<<<<<< * if j == nright: * while i < nleft: */ goto __pyx_L19_break; goto __pyx_L20; } __pyx_L20:; /* "pandas/src/generated.pyx":8044 * j += 1 * break * if j == nright: # <<<<<<<<<<<<<< * while i < nleft: * lindexer[count] = i */ __pyx_t_8 = ((__pyx_v_j == __pyx_v_nright) != 0); if (__pyx_t_8) { /* "pandas/src/generated.pyx":8045 * break * if j == nright: * while i < nleft: # <<<<<<<<<<<<<< * lindexer[count] = i * rindexer[count] = -1 */ while (1) { __pyx_t_8 = ((__pyx_v_i < __pyx_v_nleft) != 0); if (!__pyx_t_8) break; /* "pandas/src/generated.pyx":8046 * if j == nright: * while i < nleft: * lindexer[count] = i # <<<<<<<<<<<<<< * rindexer[count] = -1 * result[count] = left[i] */ __pyx_t_33 = __pyx_v_count; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_lindexer.rcbuffer->pybuffer.buf, __pyx_t_33, __pyx_pybuffernd_lindexer.diminfo[0].strides) = __pyx_v_i; /* "pandas/src/generated.pyx":8047 * while i < nleft: * lindexer[count] = i * rindexer[count] = -1 # <<<<<<<<<<<<<< * result[count] = left[i] * count += 1 */ __pyx_t_34 = __pyx_v_count; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_rindexer.rcbuffer->pybuffer.buf, __pyx_t_34, __pyx_pybuffernd_rindexer.diminfo[0].strides) = -1; /* "pandas/src/generated.pyx":8048 * lindexer[count] = i * rindexer[count] = -1 * result[count] = left[i] # <<<<<<<<<<<<<< * count += 1 * i += 1 */ __pyx_t_35 = __pyx_v_i; __pyx_t_6 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_left.rcbuffer->pybuffer.buf, __pyx_t_35, __pyx_pybuffernd_left.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_6); __pyx_t_36 = __pyx_v_count; __pyx_t_26 = __Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_36, __pyx_pybuffernd_result.diminfo[0].strides); __Pyx_GOTREF(*__pyx_t_26); __Pyx_INCREF(__pyx_t_6); __Pyx_DECREF(*__pyx_t_26); *__pyx_t_26 = __pyx_t_6; __Pyx_GIVEREF(*__pyx_t_26); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; /* "pandas/src/generated.pyx":8049 * rindexer[count] = -1 * result[count] = left[i] * count += 1 # <<<<<<<<<<<<<< * i += 1 * break */ __pyx_v_count = (__pyx_v_count + 1); /* "pandas/src/generated.pyx":8050 * result[count] = left[i] * count += 1 * i += 1 # <<<<<<<<<<<<<< * break * */ __pyx_v_i = (__pyx_v_i + 1); } /* "pandas/src/generated.pyx":8051 * count += 1 * i += 1 * break # <<<<<<<<<<<<<< * * lval = left[i] */ goto __pyx_L19_break; goto __pyx_L23; } __pyx_L23:; /* "pandas/src/generated.pyx":8053 * break * * lval = left[i] # <<<<<<<<<<<<<< * rval = right[j] * */ __pyx_t_37 = __pyx_v_i; __pyx_t_6 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_left.rcbuffer->pybuffer.buf, __pyx_t_37, __pyx_pybuffernd_left.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_6); __Pyx_XDECREF_SET(__pyx_v_lval, __pyx_t_6); __pyx_t_6 = 0; /* "pandas/src/generated.pyx":8054 * * lval = left[i] * rval = right[j] # <<<<<<<<<<<<<< * * if lval == rval: */ __pyx_t_38 = __pyx_v_j; __pyx_t_6 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_right.rcbuffer->pybuffer.buf, __pyx_t_38, __pyx_pybuffernd_right.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_6); __Pyx_XDECREF_SET(__pyx_v_rval, __pyx_t_6); __pyx_t_6 = 0; /* "pandas/src/generated.pyx":8056 * rval = right[j] * * if lval == rval: # <<<<<<<<<<<<<< * lindexer[count] = i * rindexer[count] = j */ __pyx_t_6 = PyObject_RichCompare(__pyx_v_lval, __pyx_v_rval, Py_EQ); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8056; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8056; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (__pyx_t_8) { /* "pandas/src/generated.pyx":8057 * * if lval == rval: * lindexer[count] = i # <<<<<<<<<<<<<< * rindexer[count] = j * result[count] = lval */ __pyx_t_39 = __pyx_v_count; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_lindexer.rcbuffer->pybuffer.buf, __pyx_t_39, __pyx_pybuffernd_lindexer.diminfo[0].strides) = __pyx_v_i; /* "pandas/src/generated.pyx":8058 * if lval == rval: * lindexer[count] = i * rindexer[count] = j # <<<<<<<<<<<<<< * result[count] = lval * count += 1 */ __pyx_t_40 = __pyx_v_count; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_rindexer.rcbuffer->pybuffer.buf, __pyx_t_40, __pyx_pybuffernd_rindexer.diminfo[0].strides) = __pyx_v_j; /* "pandas/src/generated.pyx":8059 * lindexer[count] = i * rindexer[count] = j * result[count] = lval # <<<<<<<<<<<<<< * count += 1 * if i < nleft - 1: */ __pyx_t_41 = __pyx_v_count; __pyx_t_26 = __Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_41, __pyx_pybuffernd_result.diminfo[0].strides); __Pyx_GOTREF(*__pyx_t_26); __Pyx_INCREF(__pyx_v_lval); __Pyx_DECREF(*__pyx_t_26); *__pyx_t_26 = __pyx_v_lval; __Pyx_GIVEREF(*__pyx_t_26); /* "pandas/src/generated.pyx":8060 * rindexer[count] = j * result[count] = lval * count += 1 # <<<<<<<<<<<<<< * if i < nleft - 1: * if j < nright - 1 and right[j + 1] == rval: */ __pyx_v_count = (__pyx_v_count + 1); /* "pandas/src/generated.pyx":8061 * result[count] = lval * count += 1 * if i < nleft - 1: # <<<<<<<<<<<<<< * if j < nright - 1 and right[j + 1] == rval: * j += 1 */ __pyx_t_8 = ((__pyx_v_i < (__pyx_v_nleft - 1)) != 0); if (__pyx_t_8) { /* "pandas/src/generated.pyx":8062 * count += 1 * if i < nleft - 1: * if j < nright - 1 and right[j + 1] == rval: # <<<<<<<<<<<<<< * j += 1 * else: */ __pyx_t_8 = (__pyx_v_j < (__pyx_v_nright - 1)); if (__pyx_t_8) { __pyx_t_42 = (__pyx_v_j + 1); __pyx_t_6 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_right.rcbuffer->pybuffer.buf, __pyx_t_42, __pyx_pybuffernd_right.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_6); __pyx_t_12 = PyObject_RichCompare(__pyx_t_6, __pyx_v_rval, Py_EQ); __Pyx_XGOTREF(__pyx_t_12); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8062; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_12); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8062; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __pyx_t_7 = __pyx_t_2; } else { __pyx_t_7 = __pyx_t_8; } if (__pyx_t_7) { /* "pandas/src/generated.pyx":8063 * if i < nleft - 1: * if j < nright - 1 and right[j + 1] == rval: * j += 1 # <<<<<<<<<<<<<< * else: * i += 1 */ __pyx_v_j = (__pyx_v_j + 1); goto __pyx_L28; } /*else*/ { /* "pandas/src/generated.pyx":8065 * j += 1 * else: * i += 1 # <<<<<<<<<<<<<< * if left[i] != rval: * j += 1 */ __pyx_v_i = (__pyx_v_i + 1); /* "pandas/src/generated.pyx":8066 * else: * i += 1 * if left[i] != rval: # <<<<<<<<<<<<<< * j += 1 * elif j < nright - 1: */ __pyx_t_43 = __pyx_v_i; __pyx_t_12 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_left.rcbuffer->pybuffer.buf, __pyx_t_43, __pyx_pybuffernd_left.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_12); __pyx_t_6 = PyObject_RichCompare(__pyx_t_12, __pyx_v_rval, Py_NE); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8066; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8066; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (__pyx_t_7) { /* "pandas/src/generated.pyx":8067 * i += 1 * if left[i] != rval: * j += 1 # <<<<<<<<<<<<<< * elif j < nright - 1: * j += 1 */ __pyx_v_j = (__pyx_v_j + 1); goto __pyx_L29; } __pyx_L29:; } __pyx_L28:; goto __pyx_L27; } /* "pandas/src/generated.pyx":8068 * if left[i] != rval: * j += 1 * elif j < nright - 1: # <<<<<<<<<<<<<< * j += 1 * if lval != right[j]: */ __pyx_t_7 = ((__pyx_v_j < (__pyx_v_nright - 1)) != 0); if (__pyx_t_7) { /* "pandas/src/generated.pyx":8069 * j += 1 * elif j < nright - 1: * j += 1 # <<<<<<<<<<<<<< * if lval != right[j]: * i += 1 */ __pyx_v_j = (__pyx_v_j + 1); /* "pandas/src/generated.pyx":8070 * elif j < nright - 1: * j += 1 * if lval != right[j]: # <<<<<<<<<<<<<< * i += 1 * else: */ __pyx_t_44 = __pyx_v_j; __pyx_t_6 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_right.rcbuffer->pybuffer.buf, __pyx_t_44, __pyx_pybuffernd_right.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_6); __pyx_t_12 = PyObject_RichCompare(__pyx_v_lval, __pyx_t_6, Py_NE); __Pyx_XGOTREF(__pyx_t_12); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8070; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_12); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8070; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; if (__pyx_t_7) { /* "pandas/src/generated.pyx":8071 * j += 1 * if lval != right[j]: * i += 1 # <<<<<<<<<<<<<< * else: * # end of the road */ __pyx_v_i = (__pyx_v_i + 1); goto __pyx_L30; } __pyx_L30:; goto __pyx_L27; } /*else*/ { /* "pandas/src/generated.pyx":8074 * else: * # end of the road * break # <<<<<<<<<<<<<< * elif lval < rval: * lindexer[count] = i */ goto __pyx_L19_break; } __pyx_L27:; goto __pyx_L26; } /* "pandas/src/generated.pyx":8075 * # end of the road * break * elif lval < rval: # <<<<<<<<<<<<<< * lindexer[count] = i * rindexer[count] = -1 */ __pyx_t_12 = PyObject_RichCompare(__pyx_v_lval, __pyx_v_rval, Py_LT); __Pyx_XGOTREF(__pyx_t_12); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8075; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_12); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8075; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; if (__pyx_t_7) { /* "pandas/src/generated.pyx":8076 * break * elif lval < rval: * lindexer[count] = i # <<<<<<<<<<<<<< * rindexer[count] = -1 * result[count] = lval */ __pyx_t_45 = __pyx_v_count; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_lindexer.rcbuffer->pybuffer.buf, __pyx_t_45, __pyx_pybuffernd_lindexer.diminfo[0].strides) = __pyx_v_i; /* "pandas/src/generated.pyx":8077 * elif lval < rval: * lindexer[count] = i * rindexer[count] = -1 # <<<<<<<<<<<<<< * result[count] = lval * count += 1 */ __pyx_t_46 = __pyx_v_count; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_rindexer.rcbuffer->pybuffer.buf, __pyx_t_46, __pyx_pybuffernd_rindexer.diminfo[0].strides) = -1; /* "pandas/src/generated.pyx":8078 * lindexer[count] = i * rindexer[count] = -1 * result[count] = lval # <<<<<<<<<<<<<< * count += 1 * i += 1 */ __pyx_t_47 = __pyx_v_count; __pyx_t_26 = __Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_47, __pyx_pybuffernd_result.diminfo[0].strides); __Pyx_GOTREF(*__pyx_t_26); __Pyx_INCREF(__pyx_v_lval); __Pyx_DECREF(*__pyx_t_26); *__pyx_t_26 = __pyx_v_lval; __Pyx_GIVEREF(*__pyx_t_26); /* "pandas/src/generated.pyx":8079 * rindexer[count] = -1 * result[count] = lval * count += 1 # <<<<<<<<<<<<<< * i += 1 * else: */ __pyx_v_count = (__pyx_v_count + 1); /* "pandas/src/generated.pyx":8080 * result[count] = lval * count += 1 * i += 1 # <<<<<<<<<<<<<< * else: * lindexer[count] = -1 */ __pyx_v_i = (__pyx_v_i + 1); goto __pyx_L26; } /*else*/ { /* "pandas/src/generated.pyx":8082 * i += 1 * else: * lindexer[count] = -1 # <<<<<<<<<<<<<< * rindexer[count] = j * result[count] = rval */ __pyx_t_48 = __pyx_v_count; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_lindexer.rcbuffer->pybuffer.buf, __pyx_t_48, __pyx_pybuffernd_lindexer.diminfo[0].strides) = -1; /* "pandas/src/generated.pyx":8083 * else: * lindexer[count] = -1 * rindexer[count] = j # <<<<<<<<<<<<<< * result[count] = rval * count += 1 */ __pyx_t_49 = __pyx_v_count; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_rindexer.rcbuffer->pybuffer.buf, __pyx_t_49, __pyx_pybuffernd_rindexer.diminfo[0].strides) = __pyx_v_j; /* "pandas/src/generated.pyx":8084 * lindexer[count] = -1 * rindexer[count] = j * result[count] = rval # <<<<<<<<<<<<<< * count += 1 * j += 1 */ __pyx_t_50 = __pyx_v_count; __pyx_t_26 = __Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_50, __pyx_pybuffernd_result.diminfo[0].strides); __Pyx_GOTREF(*__pyx_t_26); __Pyx_INCREF(__pyx_v_rval); __Pyx_DECREF(*__pyx_t_26); *__pyx_t_26 = __pyx_v_rval; __Pyx_GIVEREF(*__pyx_t_26); /* "pandas/src/generated.pyx":8085 * rindexer[count] = j * result[count] = rval * count += 1 # <<<<<<<<<<<<<< * j += 1 * */ __pyx_v_count = (__pyx_v_count + 1); /* "pandas/src/generated.pyx":8086 * result[count] = rval * count += 1 * j += 1 # <<<<<<<<<<<<<< * * return result, lindexer, rindexer */ __pyx_v_j = (__pyx_v_j + 1); } __pyx_L26:; } __pyx_L19_break:; } __pyx_L13:; /* "pandas/src/generated.pyx":8088 * j += 1 * * return result, lindexer, rindexer # <<<<<<<<<<<<<< * * @cython.wraparound(False) */ __Pyx_XDECREF(__pyx_r); __pyx_t_12 = PyTuple_New(3); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8088; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __Pyx_INCREF(((PyObject *)__pyx_v_result)); PyTuple_SET_ITEM(__pyx_t_12, 0, ((PyObject *)__pyx_v_result)); __Pyx_GIVEREF(((PyObject *)__pyx_v_result)); __Pyx_INCREF(((PyObject *)__pyx_v_lindexer)); PyTuple_SET_ITEM(__pyx_t_12, 1, ((PyObject *)__pyx_v_lindexer)); __Pyx_GIVEREF(((PyObject *)__pyx_v_lindexer)); __Pyx_INCREF(((PyObject *)__pyx_v_rindexer)); PyTuple_SET_ITEM(__pyx_t_12, 2, ((PyObject *)__pyx_v_rindexer)); __Pyx_GIVEREF(((PyObject *)__pyx_v_rindexer)); __pyx_r = ((PyObject *)__pyx_t_12); __pyx_t_12 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_11); __Pyx_XDECREF(__pyx_t_12); __Pyx_XDECREF(__pyx_t_13); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_left.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_lindexer.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_right.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_rindexer.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.outer_join_indexer_object", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_left.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_lindexer.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_right.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_rindexer.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF(__pyx_v_lval); __Pyx_XDECREF(__pyx_v_rval); __Pyx_XDECREF((PyObject *)__pyx_v_lindexer); __Pyx_XDECREF((PyObject *)__pyx_v_rindexer); __Pyx_XDECREF((PyObject *)__pyx_v_result); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_481outer_join_indexer_int32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_481outer_join_indexer_int32 = {__Pyx_NAMESTR("outer_join_indexer_int32"), (PyCFunction)__pyx_pw_6pandas_5algos_481outer_join_indexer_int32, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_481outer_join_indexer_int32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_left = 0; PyArrayObject *__pyx_v_right = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("outer_join_indexer_int32 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__left,&__pyx_n_s__right,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__left)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__right)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("outer_join_indexer_int32", 1, 2, 2, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8092; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "outer_join_indexer_int32") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8092; __pyx_clineno = __LINE__; goto __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_left = ((PyArrayObject *)values[0]); __pyx_v_right = ((PyArrayObject *)values[1]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("outer_join_indexer_int32", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8092; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.outer_join_indexer_int32", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_left), __pyx_ptype_5numpy_ndarray, 1, "left", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8092; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_right), __pyx_ptype_5numpy_ndarray, 1, "right", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8093; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_480outer_join_indexer_int32(__pyx_self, __pyx_v_left, __pyx_v_right); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":8092 * @cython.wraparound(False) * @cython.boundscheck(False) * def outer_join_indexer_int32(ndarray[int32_t] left, # <<<<<<<<<<<<<< * ndarray[int32_t] right): * cdef: */ static PyObject *__pyx_pf_6pandas_5algos_480outer_join_indexer_int32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_left, PyArrayObject *__pyx_v_right) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_nright; Py_ssize_t __pyx_v_nleft; Py_ssize_t __pyx_v_count; __pyx_t_5numpy_int32_t __pyx_v_lval; __pyx_t_5numpy_int32_t __pyx_v_rval; PyArrayObject *__pyx_v_lindexer = 0; PyArrayObject *__pyx_v_rindexer = 0; PyArrayObject *__pyx_v_result = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_left; __Pyx_Buffer __pyx_pybuffer_left; __Pyx_LocalBuf_ND __pyx_pybuffernd_lindexer; __Pyx_Buffer __pyx_pybuffer_lindexer; __Pyx_LocalBuf_ND __pyx_pybuffernd_result; __Pyx_Buffer __pyx_pybuffer_result; __Pyx_LocalBuf_ND __pyx_pybuffernd_right; __Pyx_Buffer __pyx_pybuffer_right; __Pyx_LocalBuf_ND __pyx_pybuffernd_rindexer; __Pyx_Buffer __pyx_pybuffer_rindexer; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; int __pyx_t_2; Py_ssize_t __pyx_t_3; Py_ssize_t __pyx_t_4; int __pyx_t_5; int __pyx_t_6; Py_ssize_t __pyx_t_7; Py_ssize_t __pyx_t_8; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; PyObject *__pyx_t_11 = NULL; PyObject *__pyx_t_12 = NULL; PyObject *__pyx_t_13 = NULL; PyArrayObject *__pyx_t_14 = NULL; int __pyx_t_15; PyObject *__pyx_t_16 = NULL; PyObject *__pyx_t_17 = NULL; PyObject *__pyx_t_18 = NULL; PyArrayObject *__pyx_t_19 = NULL; 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; Py_ssize_t __pyx_t_37; Py_ssize_t __pyx_t_38; Py_ssize_t __pyx_t_39; Py_ssize_t __pyx_t_40; Py_ssize_t __pyx_t_41; Py_ssize_t __pyx_t_42; Py_ssize_t __pyx_t_43; Py_ssize_t __pyx_t_44; Py_ssize_t __pyx_t_45; Py_ssize_t __pyx_t_46; Py_ssize_t __pyx_t_47; Py_ssize_t __pyx_t_48; Py_ssize_t __pyx_t_49; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("outer_join_indexer_int32", 0); __pyx_pybuffer_lindexer.pybuffer.buf = NULL; __pyx_pybuffer_lindexer.refcount = 0; __pyx_pybuffernd_lindexer.data = NULL; __pyx_pybuffernd_lindexer.rcbuffer = &__pyx_pybuffer_lindexer; __pyx_pybuffer_rindexer.pybuffer.buf = NULL; __pyx_pybuffer_rindexer.refcount = 0; __pyx_pybuffernd_rindexer.data = NULL; __pyx_pybuffernd_rindexer.rcbuffer = &__pyx_pybuffer_rindexer; __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_left.pybuffer.buf = NULL; __pyx_pybuffer_left.refcount = 0; __pyx_pybuffernd_left.data = NULL; __pyx_pybuffernd_left.rcbuffer = &__pyx_pybuffer_left; __pyx_pybuffer_right.pybuffer.buf = NULL; __pyx_pybuffer_right.refcount = 0; __pyx_pybuffernd_right.data = NULL; __pyx_pybuffernd_right.rcbuffer = &__pyx_pybuffer_right; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_left.rcbuffer->pybuffer, (PyObject*)__pyx_v_left, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8092; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_left.diminfo[0].strides = __pyx_pybuffernd_left.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_left.diminfo[0].shape = __pyx_pybuffernd_left.rcbuffer->pybuffer.shape[0]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_right.rcbuffer->pybuffer, (PyObject*)__pyx_v_right, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8092; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_right.diminfo[0].strides = __pyx_pybuffernd_right.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_right.diminfo[0].shape = __pyx_pybuffernd_right.rcbuffer->pybuffer.shape[0]; /* "pandas/src/generated.pyx":8100 * ndarray[int32_t] result * * nleft = len(left) # <<<<<<<<<<<<<< * nright = len(right) * */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_left)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8100; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_nleft = __pyx_t_1; /* "pandas/src/generated.pyx":8101 * * nleft = len(left) * nright = len(right) # <<<<<<<<<<<<<< * * i = 0 */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_right)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8101; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_nright = __pyx_t_1; /* "pandas/src/generated.pyx":8103 * nright = len(right) * * i = 0 # <<<<<<<<<<<<<< * j = 0 * count = 0 */ __pyx_v_i = 0; /* "pandas/src/generated.pyx":8104 * * i = 0 * j = 0 # <<<<<<<<<<<<<< * count = 0 * if nleft == 0: */ __pyx_v_j = 0; /* "pandas/src/generated.pyx":8105 * i = 0 * j = 0 * count = 0 # <<<<<<<<<<<<<< * if nleft == 0: * count = nright */ __pyx_v_count = 0; /* "pandas/src/generated.pyx":8106 * j = 0 * count = 0 * if nleft == 0: # <<<<<<<<<<<<<< * count = nright * elif nright == 0: */ __pyx_t_2 = ((__pyx_v_nleft == 0) != 0); if (__pyx_t_2) { /* "pandas/src/generated.pyx":8107 * count = 0 * if nleft == 0: * count = nright # <<<<<<<<<<<<<< * elif nright == 0: * count = nleft */ __pyx_v_count = __pyx_v_nright; goto __pyx_L3; } /* "pandas/src/generated.pyx":8108 * if nleft == 0: * count = nright * elif nright == 0: # <<<<<<<<<<<<<< * count = nleft * else: */ __pyx_t_2 = ((__pyx_v_nright == 0) != 0); if (__pyx_t_2) { /* "pandas/src/generated.pyx":8109 * count = nright * elif nright == 0: * count = nleft # <<<<<<<<<<<<<< * else: * while True: */ __pyx_v_count = __pyx_v_nleft; goto __pyx_L3; } /*else*/ { /* "pandas/src/generated.pyx":8111 * count = nleft * else: * while True: # <<<<<<<<<<<<<< * if i == nleft: * count += nright - j */ while (1) { if (!1) break; /* "pandas/src/generated.pyx":8112 * else: * while True: * if i == nleft: # <<<<<<<<<<<<<< * count += nright - j * break */ __pyx_t_2 = ((__pyx_v_i == __pyx_v_nleft) != 0); if (__pyx_t_2) { /* "pandas/src/generated.pyx":8113 * while True: * if i == nleft: * count += nright - j # <<<<<<<<<<<<<< * break * if j == nright: */ __pyx_v_count = (__pyx_v_count + (__pyx_v_nright - __pyx_v_j)); /* "pandas/src/generated.pyx":8114 * if i == nleft: * count += nright - j * break # <<<<<<<<<<<<<< * if j == nright: * count += nleft - i */ goto __pyx_L5_break; goto __pyx_L6; } __pyx_L6:; /* "pandas/src/generated.pyx":8115 * count += nright - j * break * if j == nright: # <<<<<<<<<<<<<< * count += nleft - i * break */ __pyx_t_2 = ((__pyx_v_j == __pyx_v_nright) != 0); if (__pyx_t_2) { /* "pandas/src/generated.pyx":8116 * break * if j == nright: * count += nleft - i # <<<<<<<<<<<<<< * break * */ __pyx_v_count = (__pyx_v_count + (__pyx_v_nleft - __pyx_v_i)); /* "pandas/src/generated.pyx":8117 * if j == nright: * count += nleft - i * break # <<<<<<<<<<<<<< * * lval = left[i] */ goto __pyx_L5_break; goto __pyx_L7; } __pyx_L7:; /* "pandas/src/generated.pyx":8119 * break * * lval = left[i] # <<<<<<<<<<<<<< * rval = right[j] * if lval == rval: */ __pyx_t_1 = __pyx_v_i; __pyx_v_lval = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_left.rcbuffer->pybuffer.buf, __pyx_t_1, __pyx_pybuffernd_left.diminfo[0].strides)); /* "pandas/src/generated.pyx":8120 * * lval = left[i] * rval = right[j] # <<<<<<<<<<<<<< * if lval == rval: * count += 1 */ __pyx_t_3 = __pyx_v_j; __pyx_v_rval = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_right.rcbuffer->pybuffer.buf, __pyx_t_3, __pyx_pybuffernd_right.diminfo[0].strides)); /* "pandas/src/generated.pyx":8121 * lval = left[i] * rval = right[j] * if lval == rval: # <<<<<<<<<<<<<< * count += 1 * if i < nleft - 1: */ __pyx_t_2 = ((__pyx_v_lval == __pyx_v_rval) != 0); if (__pyx_t_2) { /* "pandas/src/generated.pyx":8122 * rval = right[j] * if lval == rval: * count += 1 # <<<<<<<<<<<<<< * if i < nleft - 1: * if j < nright - 1 and right[j + 1] == rval: */ __pyx_v_count = (__pyx_v_count + 1); /* "pandas/src/generated.pyx":8123 * if lval == rval: * count += 1 * if i < nleft - 1: # <<<<<<<<<<<<<< * if j < nright - 1 and right[j + 1] == rval: * j += 1 */ __pyx_t_2 = ((__pyx_v_i < (__pyx_v_nleft - 1)) != 0); if (__pyx_t_2) { /* "pandas/src/generated.pyx":8124 * count += 1 * if i < nleft - 1: * if j < nright - 1 and right[j + 1] == rval: # <<<<<<<<<<<<<< * j += 1 * else: */ __pyx_t_2 = ((__pyx_v_j < (__pyx_v_nright - 1)) != 0); if (__pyx_t_2) { __pyx_t_4 = (__pyx_v_j + 1); __pyx_t_5 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_right.rcbuffer->pybuffer.buf, __pyx_t_4, __pyx_pybuffernd_right.diminfo[0].strides)) == __pyx_v_rval) != 0); __pyx_t_6 = __pyx_t_5; } else { __pyx_t_6 = __pyx_t_2; } if (__pyx_t_6) { /* "pandas/src/generated.pyx":8125 * if i < nleft - 1: * if j < nright - 1 and right[j + 1] == rval: * j += 1 # <<<<<<<<<<<<<< * else: * i += 1 */ __pyx_v_j = (__pyx_v_j + 1); goto __pyx_L10; } /*else*/ { /* "pandas/src/generated.pyx":8127 * j += 1 * else: * i += 1 # <<<<<<<<<<<<<< * if left[i] != rval: * j += 1 */ __pyx_v_i = (__pyx_v_i + 1); /* "pandas/src/generated.pyx":8128 * else: * i += 1 * if left[i] != rval: # <<<<<<<<<<<<<< * j += 1 * elif j < nright - 1: */ __pyx_t_7 = __pyx_v_i; __pyx_t_6 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_left.rcbuffer->pybuffer.buf, __pyx_t_7, __pyx_pybuffernd_left.diminfo[0].strides)) != __pyx_v_rval) != 0); if (__pyx_t_6) { /* "pandas/src/generated.pyx":8129 * i += 1 * if left[i] != rval: * j += 1 # <<<<<<<<<<<<<< * elif j < nright - 1: * j += 1 */ __pyx_v_j = (__pyx_v_j + 1); goto __pyx_L11; } __pyx_L11:; } __pyx_L10:; goto __pyx_L9; } /* "pandas/src/generated.pyx":8130 * if left[i] != rval: * j += 1 * elif j < nright - 1: # <<<<<<<<<<<<<< * j += 1 * if lval != right[j]: */ __pyx_t_6 = ((__pyx_v_j < (__pyx_v_nright - 1)) != 0); if (__pyx_t_6) { /* "pandas/src/generated.pyx":8131 * j += 1 * elif j < nright - 1: * j += 1 # <<<<<<<<<<<<<< * if lval != right[j]: * i += 1 */ __pyx_v_j = (__pyx_v_j + 1); /* "pandas/src/generated.pyx":8132 * elif j < nright - 1: * j += 1 * if lval != right[j]: # <<<<<<<<<<<<<< * i += 1 * else: */ __pyx_t_8 = __pyx_v_j; __pyx_t_6 = ((__pyx_v_lval != (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_right.rcbuffer->pybuffer.buf, __pyx_t_8, __pyx_pybuffernd_right.diminfo[0].strides))) != 0); if (__pyx_t_6) { /* "pandas/src/generated.pyx":8133 * j += 1 * if lval != right[j]: * i += 1 # <<<<<<<<<<<<<< * else: * # end of the road */ __pyx_v_i = (__pyx_v_i + 1); goto __pyx_L12; } __pyx_L12:; goto __pyx_L9; } /*else*/ { /* "pandas/src/generated.pyx":8136 * else: * # end of the road * break # <<<<<<<<<<<<<< * elif lval < rval: * count += 1 */ goto __pyx_L5_break; } __pyx_L9:; goto __pyx_L8; } /* "pandas/src/generated.pyx":8137 * # end of the road * break * elif lval < rval: # <<<<<<<<<<<<<< * count += 1 * i += 1 */ __pyx_t_6 = ((__pyx_v_lval < __pyx_v_rval) != 0); if (__pyx_t_6) { /* "pandas/src/generated.pyx":8138 * break * elif lval < rval: * count += 1 # <<<<<<<<<<<<<< * i += 1 * else: */ __pyx_v_count = (__pyx_v_count + 1); /* "pandas/src/generated.pyx":8139 * elif lval < rval: * count += 1 * i += 1 # <<<<<<<<<<<<<< * else: * count += 1 */ __pyx_v_i = (__pyx_v_i + 1); goto __pyx_L8; } /*else*/ { /* "pandas/src/generated.pyx":8141 * i += 1 * else: * count += 1 # <<<<<<<<<<<<<< * j += 1 * */ __pyx_v_count = (__pyx_v_count + 1); /* "pandas/src/generated.pyx":8142 * else: * count += 1 * j += 1 # <<<<<<<<<<<<<< * * lindexer = np.empty(count, dtype=np.int64) */ __pyx_v_j = (__pyx_v_j + 1); } __pyx_L8:; } __pyx_L5_break:; } __pyx_L3:; /* "pandas/src/generated.pyx":8144 * j += 1 * * lindexer = np.empty(count, dtype=np.int64) # <<<<<<<<<<<<<< * rindexer = np.empty(count, dtype=np.int64) * result = np.empty(count, dtype=np.int32) */ __pyx_t_9 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8144; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s__empty); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8144; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_9 = PyInt_FromSsize_t(__pyx_v_count); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8144; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_t_11 = PyTuple_New(1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8144; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_9); __Pyx_GIVEREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_9 = PyDict_New(); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8144; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_9)); __pyx_t_12 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8144; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s__int64); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8144; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; if (PyDict_SetItem(__pyx_t_9, ((PyObject *)__pyx_n_s__dtype), __pyx_t_13) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8144; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_13 = PyObject_Call(__pyx_t_10, ((PyObject *)__pyx_t_11), ((PyObject *)__pyx_t_9)); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8144; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_11)); __pyx_t_11 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_9)); __pyx_t_9 = 0; if (!(likely(((__pyx_t_13) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_13, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8144; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_14 = ((PyArrayObject *)__pyx_t_13); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_lindexer.rcbuffer->pybuffer); __pyx_t_15 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_lindexer.rcbuffer->pybuffer, (PyObject*)__pyx_t_14, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_15 < 0)) { PyErr_Fetch(&__pyx_t_16, &__pyx_t_17, &__pyx_t_18); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_lindexer.rcbuffer->pybuffer, (PyObject*)__pyx_v_lindexer, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_16); Py_XDECREF(__pyx_t_17); Py_XDECREF(__pyx_t_18); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_16, __pyx_t_17, __pyx_t_18); } } __pyx_pybuffernd_lindexer.diminfo[0].strides = __pyx_pybuffernd_lindexer.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_lindexer.diminfo[0].shape = __pyx_pybuffernd_lindexer.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_15 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8144; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_14 = 0; __pyx_v_lindexer = ((PyArrayObject *)__pyx_t_13); __pyx_t_13 = 0; /* "pandas/src/generated.pyx":8145 * * lindexer = np.empty(count, dtype=np.int64) * rindexer = np.empty(count, dtype=np.int64) # <<<<<<<<<<<<<< * result = np.empty(count, dtype=np.int32) * */ __pyx_t_13 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8145; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_13, __pyx_n_s__empty); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8145; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_13 = PyInt_FromSsize_t(__pyx_v_count); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8145; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __pyx_t_11 = PyTuple_New(1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8145; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_13); __Pyx_GIVEREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_13 = PyDict_New(); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8145; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_13)); __pyx_t_10 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8145; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s__int64); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8145; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; if (PyDict_SetItem(__pyx_t_13, ((PyObject *)__pyx_n_s__dtype), __pyx_t_12) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8145; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __pyx_t_12 = PyObject_Call(__pyx_t_9, ((PyObject *)__pyx_t_11), ((PyObject *)__pyx_t_13)); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8145; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_11)); __pyx_t_11 = 0; __Pyx_DECREF(((PyObject *)__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_filename = __pyx_f[2]; __pyx_lineno = 8145; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_14 = ((PyArrayObject *)__pyx_t_12); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_rindexer.rcbuffer->pybuffer); __pyx_t_15 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_rindexer.rcbuffer->pybuffer, (PyObject*)__pyx_t_14, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_15 < 0)) { PyErr_Fetch(&__pyx_t_18, &__pyx_t_17, &__pyx_t_16); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_rindexer.rcbuffer->pybuffer, (PyObject*)__pyx_v_rindexer, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_18); Py_XDECREF(__pyx_t_17); Py_XDECREF(__pyx_t_16); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_18, __pyx_t_17, __pyx_t_16); } } __pyx_pybuffernd_rindexer.diminfo[0].strides = __pyx_pybuffernd_rindexer.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_rindexer.diminfo[0].shape = __pyx_pybuffernd_rindexer.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_15 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8145; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_14 = 0; __pyx_v_rindexer = ((PyArrayObject *)__pyx_t_12); __pyx_t_12 = 0; /* "pandas/src/generated.pyx":8146 * lindexer = np.empty(count, dtype=np.int64) * rindexer = np.empty(count, dtype=np.int64) * result = np.empty(count, dtype=np.int32) # <<<<<<<<<<<<<< * * # do it again, but populate the indexers / result */ __pyx_t_12 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8146; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s__empty); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8146; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __pyx_t_12 = PyInt_FromSsize_t(__pyx_v_count); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8146; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __pyx_t_11 = PyTuple_New(1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8146; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_12); __Pyx_GIVEREF(__pyx_t_12); __pyx_t_12 = 0; __pyx_t_12 = PyDict_New(); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8146; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_12)); __pyx_t_9 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8146; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s__int32); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8146; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; if (PyDict_SetItem(__pyx_t_12, ((PyObject *)__pyx_n_s__dtype), __pyx_t_10) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8146; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_t_10 = PyObject_Call(__pyx_t_13, ((PyObject *)__pyx_t_11), ((PyObject *)__pyx_t_12)); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8146; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_11)); __pyx_t_11 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_12)); __pyx_t_12 = 0; if (!(likely(((__pyx_t_10) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_10, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8146; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_19 = ((PyArrayObject *)__pyx_t_10); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __pyx_t_15 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_t_19, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_15 < 0)) { PyErr_Fetch(&__pyx_t_16, &__pyx_t_17, &__pyx_t_18); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_v_result, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_16); Py_XDECREF(__pyx_t_17); Py_XDECREF(__pyx_t_18); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_16, __pyx_t_17, __pyx_t_18); } } __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_15 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8146; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_19 = 0; __pyx_v_result = ((PyArrayObject *)__pyx_t_10); __pyx_t_10 = 0; /* "pandas/src/generated.pyx":8150 * # do it again, but populate the indexers / result * * i = 0 # <<<<<<<<<<<<<< * j = 0 * count = 0 */ __pyx_v_i = 0; /* "pandas/src/generated.pyx":8151 * * i = 0 * j = 0 # <<<<<<<<<<<<<< * count = 0 * if nleft == 0: */ __pyx_v_j = 0; /* "pandas/src/generated.pyx":8152 * i = 0 * j = 0 * count = 0 # <<<<<<<<<<<<<< * if nleft == 0: * for j in range(nright): */ __pyx_v_count = 0; /* "pandas/src/generated.pyx":8153 * j = 0 * count = 0 * if nleft == 0: # <<<<<<<<<<<<<< * for j in range(nright): * lindexer[j] = -1 */ __pyx_t_6 = ((__pyx_v_nleft == 0) != 0); if (__pyx_t_6) { /* "pandas/src/generated.pyx":8154 * count = 0 * if nleft == 0: * for j in range(nright): # <<<<<<<<<<<<<< * lindexer[j] = -1 * rindexer[j] = j */ __pyx_t_20 = __pyx_v_nright; for (__pyx_t_21 = 0; __pyx_t_21 < __pyx_t_20; __pyx_t_21+=1) { __pyx_v_j = __pyx_t_21; /* "pandas/src/generated.pyx":8155 * if nleft == 0: * for j in range(nright): * lindexer[j] = -1 # <<<<<<<<<<<<<< * rindexer[j] = j * result[j] = right[j] */ __pyx_t_22 = __pyx_v_j; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_lindexer.rcbuffer->pybuffer.buf, __pyx_t_22, __pyx_pybuffernd_lindexer.diminfo[0].strides) = -1; /* "pandas/src/generated.pyx":8156 * for j in range(nright): * lindexer[j] = -1 * rindexer[j] = j # <<<<<<<<<<<<<< * result[j] = right[j] * elif nright == 0: */ __pyx_t_23 = __pyx_v_j; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_rindexer.rcbuffer->pybuffer.buf, __pyx_t_23, __pyx_pybuffernd_rindexer.diminfo[0].strides) = __pyx_v_j; /* "pandas/src/generated.pyx":8157 * lindexer[j] = -1 * rindexer[j] = j * result[j] = right[j] # <<<<<<<<<<<<<< * elif nright == 0: * for i in range(nright): */ __pyx_t_24 = __pyx_v_j; __pyx_t_25 = __pyx_v_j; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_25, __pyx_pybuffernd_result.diminfo[0].strides) = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_right.rcbuffer->pybuffer.buf, __pyx_t_24, __pyx_pybuffernd_right.diminfo[0].strides)); } goto __pyx_L13; } /* "pandas/src/generated.pyx":8158 * rindexer[j] = j * result[j] = right[j] * elif nright == 0: # <<<<<<<<<<<<<< * for i in range(nright): * lindexer[i] = i */ __pyx_t_6 = ((__pyx_v_nright == 0) != 0); if (__pyx_t_6) { /* "pandas/src/generated.pyx":8159 * result[j] = right[j] * elif nright == 0: * for i in range(nright): # <<<<<<<<<<<<<< * lindexer[i] = i * rindexer[i] = -1 */ __pyx_t_20 = __pyx_v_nright; for (__pyx_t_21 = 0; __pyx_t_21 < __pyx_t_20; __pyx_t_21+=1) { __pyx_v_i = __pyx_t_21; /* "pandas/src/generated.pyx":8160 * elif nright == 0: * for i in range(nright): * lindexer[i] = i # <<<<<<<<<<<<<< * rindexer[i] = -1 * result[i] = left[i] */ __pyx_t_26 = __pyx_v_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_lindexer.rcbuffer->pybuffer.buf, __pyx_t_26, __pyx_pybuffernd_lindexer.diminfo[0].strides) = __pyx_v_i; /* "pandas/src/generated.pyx":8161 * for i in range(nright): * lindexer[i] = i * rindexer[i] = -1 # <<<<<<<<<<<<<< * result[i] = left[i] * else: */ __pyx_t_27 = __pyx_v_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_rindexer.rcbuffer->pybuffer.buf, __pyx_t_27, __pyx_pybuffernd_rindexer.diminfo[0].strides) = -1; /* "pandas/src/generated.pyx":8162 * lindexer[i] = i * rindexer[i] = -1 * result[i] = left[i] # <<<<<<<<<<<<<< * else: * while True: */ __pyx_t_28 = __pyx_v_i; __pyx_t_29 = __pyx_v_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_29, __pyx_pybuffernd_result.diminfo[0].strides) = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_left.rcbuffer->pybuffer.buf, __pyx_t_28, __pyx_pybuffernd_left.diminfo[0].strides)); } goto __pyx_L13; } /*else*/ { /* "pandas/src/generated.pyx":8164 * result[i] = left[i] * else: * while True: # <<<<<<<<<<<<<< * if i == nleft: * while j < nright: */ while (1) { if (!1) break; /* "pandas/src/generated.pyx":8165 * else: * while True: * if i == nleft: # <<<<<<<<<<<<<< * while j < nright: * lindexer[count] = -1 */ __pyx_t_6 = ((__pyx_v_i == __pyx_v_nleft) != 0); if (__pyx_t_6) { /* "pandas/src/generated.pyx":8166 * while True: * if i == nleft: * while j < nright: # <<<<<<<<<<<<<< * lindexer[count] = -1 * rindexer[count] = j */ while (1) { __pyx_t_6 = ((__pyx_v_j < __pyx_v_nright) != 0); if (!__pyx_t_6) break; /* "pandas/src/generated.pyx":8167 * if i == nleft: * while j < nright: * lindexer[count] = -1 # <<<<<<<<<<<<<< * rindexer[count] = j * result[count] = right[j] */ __pyx_t_20 = __pyx_v_count; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_lindexer.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_lindexer.diminfo[0].strides) = -1; /* "pandas/src/generated.pyx":8168 * while j < nright: * lindexer[count] = -1 * rindexer[count] = j # <<<<<<<<<<<<<< * result[count] = right[j] * count += 1 */ __pyx_t_21 = __pyx_v_count; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_rindexer.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_rindexer.diminfo[0].strides) = __pyx_v_j; /* "pandas/src/generated.pyx":8169 * lindexer[count] = -1 * rindexer[count] = j * result[count] = right[j] # <<<<<<<<<<<<<< * count += 1 * j += 1 */ __pyx_t_30 = __pyx_v_j; __pyx_t_31 = __pyx_v_count; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_31, __pyx_pybuffernd_result.diminfo[0].strides) = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_right.rcbuffer->pybuffer.buf, __pyx_t_30, __pyx_pybuffernd_right.diminfo[0].strides)); /* "pandas/src/generated.pyx":8170 * rindexer[count] = j * result[count] = right[j] * count += 1 # <<<<<<<<<<<<<< * j += 1 * break */ __pyx_v_count = (__pyx_v_count + 1); /* "pandas/src/generated.pyx":8171 * result[count] = right[j] * count += 1 * j += 1 # <<<<<<<<<<<<<< * break * if j == nright: */ __pyx_v_j = (__pyx_v_j + 1); } /* "pandas/src/generated.pyx":8172 * count += 1 * j += 1 * break # <<<<<<<<<<<<<< * if j == nright: * while i < nleft: */ goto __pyx_L19_break; goto __pyx_L20; } __pyx_L20:; /* "pandas/src/generated.pyx":8173 * j += 1 * break * if j == nright: # <<<<<<<<<<<<<< * while i < nleft: * lindexer[count] = i */ __pyx_t_6 = ((__pyx_v_j == __pyx_v_nright) != 0); if (__pyx_t_6) { /* "pandas/src/generated.pyx":8174 * break * if j == nright: * while i < nleft: # <<<<<<<<<<<<<< * lindexer[count] = i * rindexer[count] = -1 */ while (1) { __pyx_t_6 = ((__pyx_v_i < __pyx_v_nleft) != 0); if (!__pyx_t_6) break; /* "pandas/src/generated.pyx":8175 * if j == nright: * while i < nleft: * lindexer[count] = i # <<<<<<<<<<<<<< * rindexer[count] = -1 * result[count] = left[i] */ __pyx_t_32 = __pyx_v_count; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_lindexer.rcbuffer->pybuffer.buf, __pyx_t_32, __pyx_pybuffernd_lindexer.diminfo[0].strides) = __pyx_v_i; /* "pandas/src/generated.pyx":8176 * while i < nleft: * lindexer[count] = i * rindexer[count] = -1 # <<<<<<<<<<<<<< * result[count] = left[i] * count += 1 */ __pyx_t_33 = __pyx_v_count; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_rindexer.rcbuffer->pybuffer.buf, __pyx_t_33, __pyx_pybuffernd_rindexer.diminfo[0].strides) = -1; /* "pandas/src/generated.pyx":8177 * lindexer[count] = i * rindexer[count] = -1 * result[count] = left[i] # <<<<<<<<<<<<<< * count += 1 * i += 1 */ __pyx_t_34 = __pyx_v_i; __pyx_t_35 = __pyx_v_count; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_35, __pyx_pybuffernd_result.diminfo[0].strides) = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_left.rcbuffer->pybuffer.buf, __pyx_t_34, __pyx_pybuffernd_left.diminfo[0].strides)); /* "pandas/src/generated.pyx":8178 * rindexer[count] = -1 * result[count] = left[i] * count += 1 # <<<<<<<<<<<<<< * i += 1 * break */ __pyx_v_count = (__pyx_v_count + 1); /* "pandas/src/generated.pyx":8179 * result[count] = left[i] * count += 1 * i += 1 # <<<<<<<<<<<<<< * break * */ __pyx_v_i = (__pyx_v_i + 1); } /* "pandas/src/generated.pyx":8180 * count += 1 * i += 1 * break # <<<<<<<<<<<<<< * * lval = left[i] */ goto __pyx_L19_break; goto __pyx_L23; } __pyx_L23:; /* "pandas/src/generated.pyx":8182 * break * * lval = left[i] # <<<<<<<<<<<<<< * rval = right[j] * */ __pyx_t_36 = __pyx_v_i; __pyx_v_lval = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_left.rcbuffer->pybuffer.buf, __pyx_t_36, __pyx_pybuffernd_left.diminfo[0].strides)); /* "pandas/src/generated.pyx":8183 * * lval = left[i] * rval = right[j] # <<<<<<<<<<<<<< * * if lval == rval: */ __pyx_t_37 = __pyx_v_j; __pyx_v_rval = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_right.rcbuffer->pybuffer.buf, __pyx_t_37, __pyx_pybuffernd_right.diminfo[0].strides)); /* "pandas/src/generated.pyx":8185 * rval = right[j] * * if lval == rval: # <<<<<<<<<<<<<< * lindexer[count] = i * rindexer[count] = j */ __pyx_t_6 = ((__pyx_v_lval == __pyx_v_rval) != 0); if (__pyx_t_6) { /* "pandas/src/generated.pyx":8186 * * if lval == rval: * lindexer[count] = i # <<<<<<<<<<<<<< * rindexer[count] = j * result[count] = lval */ __pyx_t_38 = __pyx_v_count; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_lindexer.rcbuffer->pybuffer.buf, __pyx_t_38, __pyx_pybuffernd_lindexer.diminfo[0].strides) = __pyx_v_i; /* "pandas/src/generated.pyx":8187 * if lval == rval: * lindexer[count] = i * rindexer[count] = j # <<<<<<<<<<<<<< * result[count] = lval * count += 1 */ __pyx_t_39 = __pyx_v_count; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_rindexer.rcbuffer->pybuffer.buf, __pyx_t_39, __pyx_pybuffernd_rindexer.diminfo[0].strides) = __pyx_v_j; /* "pandas/src/generated.pyx":8188 * lindexer[count] = i * rindexer[count] = j * result[count] = lval # <<<<<<<<<<<<<< * count += 1 * if i < nleft - 1: */ __pyx_t_40 = __pyx_v_count; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_40, __pyx_pybuffernd_result.diminfo[0].strides) = __pyx_v_lval; /* "pandas/src/generated.pyx":8189 * rindexer[count] = j * result[count] = lval * count += 1 # <<<<<<<<<<<<<< * if i < nleft - 1: * if j < nright - 1 and right[j + 1] == rval: */ __pyx_v_count = (__pyx_v_count + 1); /* "pandas/src/generated.pyx":8190 * result[count] = lval * count += 1 * if i < nleft - 1: # <<<<<<<<<<<<<< * if j < nright - 1 and right[j + 1] == rval: * j += 1 */ __pyx_t_6 = ((__pyx_v_i < (__pyx_v_nleft - 1)) != 0); if (__pyx_t_6) { /* "pandas/src/generated.pyx":8191 * count += 1 * if i < nleft - 1: * if j < nright - 1 and right[j + 1] == rval: # <<<<<<<<<<<<<< * j += 1 * else: */ __pyx_t_6 = ((__pyx_v_j < (__pyx_v_nright - 1)) != 0); if (__pyx_t_6) { __pyx_t_41 = (__pyx_v_j + 1); __pyx_t_2 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_right.rcbuffer->pybuffer.buf, __pyx_t_41, __pyx_pybuffernd_right.diminfo[0].strides)) == __pyx_v_rval) != 0); __pyx_t_5 = __pyx_t_2; } else { __pyx_t_5 = __pyx_t_6; } if (__pyx_t_5) { /* "pandas/src/generated.pyx":8192 * if i < nleft - 1: * if j < nright - 1 and right[j + 1] == rval: * j += 1 # <<<<<<<<<<<<<< * else: * i += 1 */ __pyx_v_j = (__pyx_v_j + 1); goto __pyx_L28; } /*else*/ { /* "pandas/src/generated.pyx":8194 * j += 1 * else: * i += 1 # <<<<<<<<<<<<<< * if left[i] != rval: * j += 1 */ __pyx_v_i = (__pyx_v_i + 1); /* "pandas/src/generated.pyx":8195 * else: * i += 1 * if left[i] != rval: # <<<<<<<<<<<<<< * j += 1 * elif j < nright - 1: */ __pyx_t_42 = __pyx_v_i; __pyx_t_5 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_left.rcbuffer->pybuffer.buf, __pyx_t_42, __pyx_pybuffernd_left.diminfo[0].strides)) != __pyx_v_rval) != 0); if (__pyx_t_5) { /* "pandas/src/generated.pyx":8196 * i += 1 * if left[i] != rval: * j += 1 # <<<<<<<<<<<<<< * elif j < nright - 1: * j += 1 */ __pyx_v_j = (__pyx_v_j + 1); goto __pyx_L29; } __pyx_L29:; } __pyx_L28:; goto __pyx_L27; } /* "pandas/src/generated.pyx":8197 * if left[i] != rval: * j += 1 * elif j < nright - 1: # <<<<<<<<<<<<<< * j += 1 * if lval != right[j]: */ __pyx_t_5 = ((__pyx_v_j < (__pyx_v_nright - 1)) != 0); if (__pyx_t_5) { /* "pandas/src/generated.pyx":8198 * j += 1 * elif j < nright - 1: * j += 1 # <<<<<<<<<<<<<< * if lval != right[j]: * i += 1 */ __pyx_v_j = (__pyx_v_j + 1); /* "pandas/src/generated.pyx":8199 * elif j < nright - 1: * j += 1 * if lval != right[j]: # <<<<<<<<<<<<<< * i += 1 * else: */ __pyx_t_43 = __pyx_v_j; __pyx_t_5 = ((__pyx_v_lval != (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_right.rcbuffer->pybuffer.buf, __pyx_t_43, __pyx_pybuffernd_right.diminfo[0].strides))) != 0); if (__pyx_t_5) { /* "pandas/src/generated.pyx":8200 * j += 1 * if lval != right[j]: * i += 1 # <<<<<<<<<<<<<< * else: * # end of the road */ __pyx_v_i = (__pyx_v_i + 1); goto __pyx_L30; } __pyx_L30:; goto __pyx_L27; } /*else*/ { /* "pandas/src/generated.pyx":8203 * else: * # end of the road * break # <<<<<<<<<<<<<< * elif lval < rval: * lindexer[count] = i */ goto __pyx_L19_break; } __pyx_L27:; goto __pyx_L26; } /* "pandas/src/generated.pyx":8204 * # end of the road * break * elif lval < rval: # <<<<<<<<<<<<<< * lindexer[count] = i * rindexer[count] = -1 */ __pyx_t_5 = ((__pyx_v_lval < __pyx_v_rval) != 0); if (__pyx_t_5) { /* "pandas/src/generated.pyx":8205 * break * elif lval < rval: * lindexer[count] = i # <<<<<<<<<<<<<< * rindexer[count] = -1 * result[count] = lval */ __pyx_t_44 = __pyx_v_count; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_lindexer.rcbuffer->pybuffer.buf, __pyx_t_44, __pyx_pybuffernd_lindexer.diminfo[0].strides) = __pyx_v_i; /* "pandas/src/generated.pyx":8206 * elif lval < rval: * lindexer[count] = i * rindexer[count] = -1 # <<<<<<<<<<<<<< * result[count] = lval * count += 1 */ __pyx_t_45 = __pyx_v_count; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_rindexer.rcbuffer->pybuffer.buf, __pyx_t_45, __pyx_pybuffernd_rindexer.diminfo[0].strides) = -1; /* "pandas/src/generated.pyx":8207 * lindexer[count] = i * rindexer[count] = -1 * result[count] = lval # <<<<<<<<<<<<<< * count += 1 * i += 1 */ __pyx_t_46 = __pyx_v_count; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_46, __pyx_pybuffernd_result.diminfo[0].strides) = __pyx_v_lval; /* "pandas/src/generated.pyx":8208 * rindexer[count] = -1 * result[count] = lval * count += 1 # <<<<<<<<<<<<<< * i += 1 * else: */ __pyx_v_count = (__pyx_v_count + 1); /* "pandas/src/generated.pyx":8209 * result[count] = lval * count += 1 * i += 1 # <<<<<<<<<<<<<< * else: * lindexer[count] = -1 */ __pyx_v_i = (__pyx_v_i + 1); goto __pyx_L26; } /*else*/ { /* "pandas/src/generated.pyx":8211 * i += 1 * else: * lindexer[count] = -1 # <<<<<<<<<<<<<< * rindexer[count] = j * result[count] = rval */ __pyx_t_47 = __pyx_v_count; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_lindexer.rcbuffer->pybuffer.buf, __pyx_t_47, __pyx_pybuffernd_lindexer.diminfo[0].strides) = -1; /* "pandas/src/generated.pyx":8212 * else: * lindexer[count] = -1 * rindexer[count] = j # <<<<<<<<<<<<<< * result[count] = rval * count += 1 */ __pyx_t_48 = __pyx_v_count; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_rindexer.rcbuffer->pybuffer.buf, __pyx_t_48, __pyx_pybuffernd_rindexer.diminfo[0].strides) = __pyx_v_j; /* "pandas/src/generated.pyx":8213 * lindexer[count] = -1 * rindexer[count] = j * result[count] = rval # <<<<<<<<<<<<<< * count += 1 * j += 1 */ __pyx_t_49 = __pyx_v_count; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_49, __pyx_pybuffernd_result.diminfo[0].strides) = __pyx_v_rval; /* "pandas/src/generated.pyx":8214 * rindexer[count] = j * result[count] = rval * count += 1 # <<<<<<<<<<<<<< * j += 1 * */ __pyx_v_count = (__pyx_v_count + 1); /* "pandas/src/generated.pyx":8215 * result[count] = rval * count += 1 * j += 1 # <<<<<<<<<<<<<< * * return result, lindexer, rindexer */ __pyx_v_j = (__pyx_v_j + 1); } __pyx_L26:; } __pyx_L19_break:; } __pyx_L13:; /* "pandas/src/generated.pyx":8217 * j += 1 * * return result, lindexer, rindexer # <<<<<<<<<<<<<< * * @cython.wraparound(False) */ __Pyx_XDECREF(__pyx_r); __pyx_t_10 = PyTuple_New(3); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8217; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_INCREF(((PyObject *)__pyx_v_result)); PyTuple_SET_ITEM(__pyx_t_10, 0, ((PyObject *)__pyx_v_result)); __Pyx_GIVEREF(((PyObject *)__pyx_v_result)); __Pyx_INCREF(((PyObject *)__pyx_v_lindexer)); PyTuple_SET_ITEM(__pyx_t_10, 1, ((PyObject *)__pyx_v_lindexer)); __Pyx_GIVEREF(((PyObject *)__pyx_v_lindexer)); __Pyx_INCREF(((PyObject *)__pyx_v_rindexer)); PyTuple_SET_ITEM(__pyx_t_10, 2, ((PyObject *)__pyx_v_rindexer)); __Pyx_GIVEREF(((PyObject *)__pyx_v_rindexer)); __pyx_r = ((PyObject *)__pyx_t_10); __pyx_t_10 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_9); __Pyx_XDECREF(__pyx_t_10); __Pyx_XDECREF(__pyx_t_11); __Pyx_XDECREF(__pyx_t_12); __Pyx_XDECREF(__pyx_t_13); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_left.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_lindexer.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_right.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_rindexer.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.outer_join_indexer_int32", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_left.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_lindexer.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_right.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_rindexer.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_lindexer); __Pyx_XDECREF((PyObject *)__pyx_v_rindexer); __Pyx_XDECREF((PyObject *)__pyx_v_result); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_483outer_join_indexer_int64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5algos_483outer_join_indexer_int64 = {__Pyx_NAMESTR("outer_join_indexer_int64"), (PyCFunction)__pyx_pw_6pandas_5algos_483outer_join_indexer_int64, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5algos_483outer_join_indexer_int64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_left = 0; PyArrayObject *__pyx_v_right = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("outer_join_indexer_int64 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__left,&__pyx_n_s__right,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__left)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__right)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("outer_join_indexer_int64", 1, 2, 2, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8221; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "outer_join_indexer_int64") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8221; __pyx_clineno = __LINE__; goto __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_left = ((PyArrayObject *)values[0]); __pyx_v_right = ((PyArrayObject *)values[1]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("outer_join_indexer_int64", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8221; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.outer_join_indexer_int64", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_left), __pyx_ptype_5numpy_ndarray, 1, "left", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8221; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_right), __pyx_ptype_5numpy_ndarray, 1, "right", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8222; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_482outer_join_indexer_int64(__pyx_self, __pyx_v_left, __pyx_v_right); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":8221 * @cython.wraparound(False) * @cython.boundscheck(False) * def outer_join_indexer_int64(ndarray[int64_t] left, # <<<<<<<<<<<<<< * ndarray[int64_t] right): * cdef: */ static PyObject *__pyx_pf_6pandas_5algos_482outer_join_indexer_int64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_left, PyArrayObject *__pyx_v_right) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_nright; Py_ssize_t __pyx_v_nleft; Py_ssize_t __pyx_v_count; __pyx_t_5numpy_int64_t __pyx_v_lval; __pyx_t_5numpy_int64_t __pyx_v_rval; PyArrayObject *__pyx_v_lindexer = 0; PyArrayObject *__pyx_v_rindexer = 0; PyArrayObject *__pyx_v_result = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_left; __Pyx_Buffer __pyx_pybuffer_left; __Pyx_LocalBuf_ND __pyx_pybuffernd_lindexer; __Pyx_Buffer __pyx_pybuffer_lindexer; __Pyx_LocalBuf_ND __pyx_pybuffernd_result; __Pyx_Buffer __pyx_pybuffer_result; __Pyx_LocalBuf_ND __pyx_pybuffernd_right; __Pyx_Buffer __pyx_pybuffer_right; __Pyx_LocalBuf_ND __pyx_pybuffernd_rindexer; __Pyx_Buffer __pyx_pybuffer_rindexer; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; int __pyx_t_2; Py_ssize_t __pyx_t_3; Py_ssize_t __pyx_t_4; int __pyx_t_5; int __pyx_t_6; Py_ssize_t __pyx_t_7; Py_ssize_t __pyx_t_8; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; PyObject *__pyx_t_11 = NULL; PyObject *__pyx_t_12 = NULL; PyObject *__pyx_t_13 = NULL; PyArrayObject *__pyx_t_14 = NULL; int __pyx_t_15; PyObject *__pyx_t_16 = NULL; PyObject *__pyx_t_17 = NULL; PyObject *__pyx_t_18 = NULL; PyArrayObject *__pyx_t_19 = NULL; 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; Py_ssize_t __pyx_t_37; Py_ssize_t __pyx_t_38; Py_ssize_t __pyx_t_39; Py_ssize_t __pyx_t_40; Py_ssize_t __pyx_t_41; Py_ssize_t __pyx_t_42; Py_ssize_t __pyx_t_43; Py_ssize_t __pyx_t_44; Py_ssize_t __pyx_t_45; Py_ssize_t __pyx_t_46; Py_ssize_t __pyx_t_47; Py_ssize_t __pyx_t_48; Py_ssize_t __pyx_t_49; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("outer_join_indexer_int64", 0); __pyx_pybuffer_lindexer.pybuffer.buf = NULL; __pyx_pybuffer_lindexer.refcount = 0; __pyx_pybuffernd_lindexer.data = NULL; __pyx_pybuffernd_lindexer.rcbuffer = &__pyx_pybuffer_lindexer; __pyx_pybuffer_rindexer.pybuffer.buf = NULL; __pyx_pybuffer_rindexer.refcount = 0; __pyx_pybuffernd_rindexer.data = NULL; __pyx_pybuffernd_rindexer.rcbuffer = &__pyx_pybuffer_rindexer; __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_left.pybuffer.buf = NULL; __pyx_pybuffer_left.refcount = 0; __pyx_pybuffernd_left.data = NULL; __pyx_pybuffernd_left.rcbuffer = &__pyx_pybuffer_left; __pyx_pybuffer_right.pybuffer.buf = NULL; __pyx_pybuffer_right.refcount = 0; __pyx_pybuffernd_right.data = NULL; __pyx_pybuffernd_right.rcbuffer = &__pyx_pybuffer_right; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_left.rcbuffer->pybuffer, (PyObject*)__pyx_v_left, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8221; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_left.diminfo[0].strides = __pyx_pybuffernd_left.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_left.diminfo[0].shape = __pyx_pybuffernd_left.rcbuffer->pybuffer.shape[0]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_right.rcbuffer->pybuffer, (PyObject*)__pyx_v_right, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8221; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_right.diminfo[0].strides = __pyx_pybuffernd_right.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_right.diminfo[0].shape = __pyx_pybuffernd_right.rcbuffer->pybuffer.shape[0]; /* "pandas/src/generated.pyx":8229 * ndarray[int64_t] result * * nleft = len(left) # <<<<<<<<<<<<<< * nright = len(right) * */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_left)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8229; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_nleft = __pyx_t_1; /* "pandas/src/generated.pyx":8230 * * nleft = len(left) * nright = len(right) # <<<<<<<<<<<<<< * * i = 0 */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_right)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8230; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_nright = __pyx_t_1; /* "pandas/src/generated.pyx":8232 * nright = len(right) * * i = 0 # <<<<<<<<<<<<<< * j = 0 * count = 0 */ __pyx_v_i = 0; /* "pandas/src/generated.pyx":8233 * * i = 0 * j = 0 # <<<<<<<<<<<<<< * count = 0 * if nleft == 0: */ __pyx_v_j = 0; /* "pandas/src/generated.pyx":8234 * i = 0 * j = 0 * count = 0 # <<<<<<<<<<<<<< * if nleft == 0: * count = nright */ __pyx_v_count = 0; /* "pandas/src/generated.pyx":8235 * j = 0 * count = 0 * if nleft == 0: # <<<<<<<<<<<<<< * count = nright * elif nright == 0: */ __pyx_t_2 = ((__pyx_v_nleft == 0) != 0); if (__pyx_t_2) { /* "pandas/src/generated.pyx":8236 * count = 0 * if nleft == 0: * count = nright # <<<<<<<<<<<<<< * elif nright == 0: * count = nleft */ __pyx_v_count = __pyx_v_nright; goto __pyx_L3; } /* "pandas/src/generated.pyx":8237 * if nleft == 0: * count = nright * elif nright == 0: # <<<<<<<<<<<<<< * count = nleft * else: */ __pyx_t_2 = ((__pyx_v_nright == 0) != 0); if (__pyx_t_2) { /* "pandas/src/generated.pyx":8238 * count = nright * elif nright == 0: * count = nleft # <<<<<<<<<<<<<< * else: * while True: */ __pyx_v_count = __pyx_v_nleft; goto __pyx_L3; } /*else*/ { /* "pandas/src/generated.pyx":8240 * count = nleft * else: * while True: # <<<<<<<<<<<<<< * if i == nleft: * count += nright - j */ while (1) { if (!1) break; /* "pandas/src/generated.pyx":8241 * else: * while True: * if i == nleft: # <<<<<<<<<<<<<< * count += nright - j * break */ __pyx_t_2 = ((__pyx_v_i == __pyx_v_nleft) != 0); if (__pyx_t_2) { /* "pandas/src/generated.pyx":8242 * while True: * if i == nleft: * count += nright - j # <<<<<<<<<<<<<< * break * if j == nright: */ __pyx_v_count = (__pyx_v_count + (__pyx_v_nright - __pyx_v_j)); /* "pandas/src/generated.pyx":8243 * if i == nleft: * count += nright - j * break # <<<<<<<<<<<<<< * if j == nright: * count += nleft - i */ goto __pyx_L5_break; goto __pyx_L6; } __pyx_L6:; /* "pandas/src/generated.pyx":8244 * count += nright - j * break * if j == nright: # <<<<<<<<<<<<<< * count += nleft - i * break */ __pyx_t_2 = ((__pyx_v_j == __pyx_v_nright) != 0); if (__pyx_t_2) { /* "pandas/src/generated.pyx":8245 * break * if j == nright: * count += nleft - i # <<<<<<<<<<<<<< * break * */ __pyx_v_count = (__pyx_v_count + (__pyx_v_nleft - __pyx_v_i)); /* "pandas/src/generated.pyx":8246 * if j == nright: * count += nleft - i * break # <<<<<<<<<<<<<< * * lval = left[i] */ goto __pyx_L5_break; goto __pyx_L7; } __pyx_L7:; /* "pandas/src/generated.pyx":8248 * break * * lval = left[i] # <<<<<<<<<<<<<< * rval = right[j] * if lval == rval: */ __pyx_t_1 = __pyx_v_i; __pyx_v_lval = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_left.rcbuffer->pybuffer.buf, __pyx_t_1, __pyx_pybuffernd_left.diminfo[0].strides)); /* "pandas/src/generated.pyx":8249 * * lval = left[i] * rval = right[j] # <<<<<<<<<<<<<< * if lval == rval: * count += 1 */ __pyx_t_3 = __pyx_v_j; __pyx_v_rval = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_right.rcbuffer->pybuffer.buf, __pyx_t_3, __pyx_pybuffernd_right.diminfo[0].strides)); /* "pandas/src/generated.pyx":8250 * lval = left[i] * rval = right[j] * if lval == rval: # <<<<<<<<<<<<<< * count += 1 * if i < nleft - 1: */ __pyx_t_2 = ((__pyx_v_lval == __pyx_v_rval) != 0); if (__pyx_t_2) { /* "pandas/src/generated.pyx":8251 * rval = right[j] * if lval == rval: * count += 1 # <<<<<<<<<<<<<< * if i < nleft - 1: * if j < nright - 1 and right[j + 1] == rval: */ __pyx_v_count = (__pyx_v_count + 1); /* "pandas/src/generated.pyx":8252 * if lval == rval: * count += 1 * if i < nleft - 1: # <<<<<<<<<<<<<< * if j < nright - 1 and right[j + 1] == rval: * j += 1 */ __pyx_t_2 = ((__pyx_v_i < (__pyx_v_nleft - 1)) != 0); if (__pyx_t_2) { /* "pandas/src/generated.pyx":8253 * count += 1 * if i < nleft - 1: * if j < nright - 1 and right[j + 1] == rval: # <<<<<<<<<<<<<< * j += 1 * else: */ __pyx_t_2 = ((__pyx_v_j < (__pyx_v_nright - 1)) != 0); if (__pyx_t_2) { __pyx_t_4 = (__pyx_v_j + 1); __pyx_t_5 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_right.rcbuffer->pybuffer.buf, __pyx_t_4, __pyx_pybuffernd_right.diminfo[0].strides)) == __pyx_v_rval) != 0); __pyx_t_6 = __pyx_t_5; } else { __pyx_t_6 = __pyx_t_2; } if (__pyx_t_6) { /* "pandas/src/generated.pyx":8254 * if i < nleft - 1: * if j < nright - 1 and right[j + 1] == rval: * j += 1 # <<<<<<<<<<<<<< * else: * i += 1 */ __pyx_v_j = (__pyx_v_j + 1); goto __pyx_L10; } /*else*/ { /* "pandas/src/generated.pyx":8256 * j += 1 * else: * i += 1 # <<<<<<<<<<<<<< * if left[i] != rval: * j += 1 */ __pyx_v_i = (__pyx_v_i + 1); /* "pandas/src/generated.pyx":8257 * else: * i += 1 * if left[i] != rval: # <<<<<<<<<<<<<< * j += 1 * elif j < nright - 1: */ __pyx_t_7 = __pyx_v_i; __pyx_t_6 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_left.rcbuffer->pybuffer.buf, __pyx_t_7, __pyx_pybuffernd_left.diminfo[0].strides)) != __pyx_v_rval) != 0); if (__pyx_t_6) { /* "pandas/src/generated.pyx":8258 * i += 1 * if left[i] != rval: * j += 1 # <<<<<<<<<<<<<< * elif j < nright - 1: * j += 1 */ __pyx_v_j = (__pyx_v_j + 1); goto __pyx_L11; } __pyx_L11:; } __pyx_L10:; goto __pyx_L9; } /* "pandas/src/generated.pyx":8259 * if left[i] != rval: * j += 1 * elif j < nright - 1: # <<<<<<<<<<<<<< * j += 1 * if lval != right[j]: */ __pyx_t_6 = ((__pyx_v_j < (__pyx_v_nright - 1)) != 0); if (__pyx_t_6) { /* "pandas/src/generated.pyx":8260 * j += 1 * elif j < nright - 1: * j += 1 # <<<<<<<<<<<<<< * if lval != right[j]: * i += 1 */ __pyx_v_j = (__pyx_v_j + 1); /* "pandas/src/generated.pyx":8261 * elif j < nright - 1: * j += 1 * if lval != right[j]: # <<<<<<<<<<<<<< * i += 1 * else: */ __pyx_t_8 = __pyx_v_j; __pyx_t_6 = ((__pyx_v_lval != (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_right.rcbuffer->pybuffer.buf, __pyx_t_8, __pyx_pybuffernd_right.diminfo[0].strides))) != 0); if (__pyx_t_6) { /* "pandas/src/generated.pyx":8262 * j += 1 * if lval != right[j]: * i += 1 # <<<<<<<<<<<<<< * else: * # end of the road */ __pyx_v_i = (__pyx_v_i + 1); goto __pyx_L12; } __pyx_L12:; goto __pyx_L9; } /*else*/ { /* "pandas/src/generated.pyx":8265 * else: * # end of the road * break # <<<<<<<<<<<<<< * elif lval < rval: * count += 1 */ goto __pyx_L5_break; } __pyx_L9:; goto __pyx_L8; } /* "pandas/src/generated.pyx":8266 * # end of the road * break * elif lval < rval: # <<<<<<<<<<<<<< * count += 1 * i += 1 */ __pyx_t_6 = ((__pyx_v_lval < __pyx_v_rval) != 0); if (__pyx_t_6) { /* "pandas/src/generated.pyx":8267 * break * elif lval < rval: * count += 1 # <<<<<<<<<<<<<< * i += 1 * else: */ __pyx_v_count = (__pyx_v_count + 1); /* "pandas/src/generated.pyx":8268 * elif lval < rval: * count += 1 * i += 1 # <<<<<<<<<<<<<< * else: * count += 1 */ __pyx_v_i = (__pyx_v_i + 1); goto __pyx_L8; } /*else*/ { /* "pandas/src/generated.pyx":8270 * i += 1 * else: * count += 1 # <<<<<<<<<<<<<< * j += 1 * */ __pyx_v_count = (__pyx_v_count + 1); /* "pandas/src/generated.pyx":8271 * else: * count += 1 * j += 1 # <<<<<<<<<<<<<< * * lindexer = np.empty(count, dtype=np.int64) */ __pyx_v_j = (__pyx_v_j + 1); } __pyx_L8:; } __pyx_L5_break:; } __pyx_L3:; /* "pandas/src/generated.pyx":8273 * j += 1 * * lindexer = np.empty(count, dtype=np.int64) # <<<<<<<<<<<<<< * rindexer = np.empty(count, dtype=np.int64) * result = np.empty(count, dtype=np.int64) */ __pyx_t_9 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8273; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s__empty); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8273; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_9 = PyInt_FromSsize_t(__pyx_v_count); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8273; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_t_11 = PyTuple_New(1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8273; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_9); __Pyx_GIVEREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_9 = PyDict_New(); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8273; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_9)); __pyx_t_12 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8273; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s__int64); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8273; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; if (PyDict_SetItem(__pyx_t_9, ((PyObject *)__pyx_n_s__dtype), __pyx_t_13) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8273; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_13 = PyObject_Call(__pyx_t_10, ((PyObject *)__pyx_t_11), ((PyObject *)__pyx_t_9)); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8273; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_11)); __pyx_t_11 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_9)); __pyx_t_9 = 0; if (!(likely(((__pyx_t_13) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_13, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8273; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_14 = ((PyArrayObject *)__pyx_t_13); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_lindexer.rcbuffer->pybuffer); __pyx_t_15 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_lindexer.rcbuffer->pybuffer, (PyObject*)__pyx_t_14, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_15 < 0)) { PyErr_Fetch(&__pyx_t_16, &__pyx_t_17, &__pyx_t_18); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_lindexer.rcbuffer->pybuffer, (PyObject*)__pyx_v_lindexer, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_16); Py_XDECREF(__pyx_t_17); Py_XDECREF(__pyx_t_18); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_16, __pyx_t_17, __pyx_t_18); } } __pyx_pybuffernd_lindexer.diminfo[0].strides = __pyx_pybuffernd_lindexer.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_lindexer.diminfo[0].shape = __pyx_pybuffernd_lindexer.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_15 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8273; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_14 = 0; __pyx_v_lindexer = ((PyArrayObject *)__pyx_t_13); __pyx_t_13 = 0; /* "pandas/src/generated.pyx":8274 * * lindexer = np.empty(count, dtype=np.int64) * rindexer = np.empty(count, dtype=np.int64) # <<<<<<<<<<<<<< * result = np.empty(count, dtype=np.int64) * */ __pyx_t_13 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8274; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_13, __pyx_n_s__empty); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8274; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_13 = PyInt_FromSsize_t(__pyx_v_count); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8274; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __pyx_t_11 = PyTuple_New(1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8274; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_13); __Pyx_GIVEREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_13 = PyDict_New(); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8274; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_13)); __pyx_t_10 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8274; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s__int64); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8274; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; if (PyDict_SetItem(__pyx_t_13, ((PyObject *)__pyx_n_s__dtype), __pyx_t_12) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8274; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __pyx_t_12 = PyObject_Call(__pyx_t_9, ((PyObject *)__pyx_t_11), ((PyObject *)__pyx_t_13)); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8274; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_11)); __pyx_t_11 = 0; __Pyx_DECREF(((PyObject *)__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_filename = __pyx_f[2]; __pyx_lineno = 8274; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_14 = ((PyArrayObject *)__pyx_t_12); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_rindexer.rcbuffer->pybuffer); __pyx_t_15 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_rindexer.rcbuffer->pybuffer, (PyObject*)__pyx_t_14, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_15 < 0)) { PyErr_Fetch(&__pyx_t_18, &__pyx_t_17, &__pyx_t_16); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_rindexer.rcbuffer->pybuffer, (PyObject*)__pyx_v_rindexer, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_18); Py_XDECREF(__pyx_t_17); Py_XDECREF(__pyx_t_16); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_18, __pyx_t_17, __pyx_t_16); } } __pyx_pybuffernd_rindexer.diminfo[0].strides = __pyx_pybuffernd_rindexer.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_rindexer.diminfo[0].shape = __pyx_pybuffernd_rindexer.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_15 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8274; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_14 = 0; __pyx_v_rindexer = ((PyArrayObject *)__pyx_t_12); __pyx_t_12 = 0; /* "pandas/src/generated.pyx":8275 * lindexer = np.empty(count, dtype=np.int64) * rindexer = np.empty(count, dtype=np.int64) * result = np.empty(count, dtype=np.int64) # <<<<<<<<<<<<<< * * # do it again, but populate the indexers / result */ __pyx_t_12 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8275; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s__empty); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8275; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __pyx_t_12 = PyInt_FromSsize_t(__pyx_v_count); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8275; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __pyx_t_11 = PyTuple_New(1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8275; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_12); __Pyx_GIVEREF(__pyx_t_12); __pyx_t_12 = 0; __pyx_t_12 = PyDict_New(); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8275; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_12)); __pyx_t_9 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8275; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s__int64); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8275; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; if (PyDict_SetItem(__pyx_t_12, ((PyObject *)__pyx_n_s__dtype), __pyx_t_10) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8275; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_t_10 = PyObject_Call(__pyx_t_13, ((PyObject *)__pyx_t_11), ((PyObject *)__pyx_t_12)); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8275; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_11)); __pyx_t_11 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_12)); __pyx_t_12 = 0; if (!(likely(((__pyx_t_10) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_10, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8275; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_19 = ((PyArrayObject *)__pyx_t_10); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __pyx_t_15 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_t_19, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_15 < 0)) { PyErr_Fetch(&__pyx_t_16, &__pyx_t_17, &__pyx_t_18); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_v_result, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_16); Py_XDECREF(__pyx_t_17); Py_XDECREF(__pyx_t_18); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_16, __pyx_t_17, __pyx_t_18); } } __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_15 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8275; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_19 = 0; __pyx_v_result = ((PyArrayObject *)__pyx_t_10); __pyx_t_10 = 0; /* "pandas/src/generated.pyx":8279 * # do it again, but populate the indexers / result * * i = 0 # <<<<<<<<<<<<<< * j = 0 * count = 0 */ __pyx_v_i = 0; /* "pandas/src/generated.pyx":8280 * * i = 0 * j = 0 # <<<<<<<<<<<<<< * count = 0 * if nleft == 0: */ __pyx_v_j = 0; /* "pandas/src/generated.pyx":8281 * i = 0 * j = 0 * count = 0 # <<<<<<<<<<<<<< * if nleft == 0: * for j in range(nright): */ __pyx_v_count = 0; /* "pandas/src/generated.pyx":8282 * j = 0 * count = 0 * if nleft == 0: # <<<<<<<<<<<<<< * for j in range(nright): * lindexer[j] = -1 */ __pyx_t_6 = ((__pyx_v_nleft == 0) != 0); if (__pyx_t_6) { /* "pandas/src/generated.pyx":8283 * count = 0 * if nleft == 0: * for j in range(nright): # <<<<<<<<<<<<<< * lindexer[j] = -1 * rindexer[j] = j */ __pyx_t_20 = __pyx_v_nright; for (__pyx_t_21 = 0; __pyx_t_21 < __pyx_t_20; __pyx_t_21+=1) { __pyx_v_j = __pyx_t_21; /* "pandas/src/generated.pyx":8284 * if nleft == 0: * for j in range(nright): * lindexer[j] = -1 # <<<<<<<<<<<<<< * rindexer[j] = j * result[j] = right[j] */ __pyx_t_22 = __pyx_v_j; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_lindexer.rcbuffer->pybuffer.buf, __pyx_t_22, __pyx_pybuffernd_lindexer.diminfo[0].strides) = -1; /* "pandas/src/generated.pyx":8285 * for j in range(nright): * lindexer[j] = -1 * rindexer[j] = j # <<<<<<<<<<<<<< * result[j] = right[j] * elif nright == 0: */ __pyx_t_23 = __pyx_v_j; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_rindexer.rcbuffer->pybuffer.buf, __pyx_t_23, __pyx_pybuffernd_rindexer.diminfo[0].strides) = __pyx_v_j; /* "pandas/src/generated.pyx":8286 * lindexer[j] = -1 * rindexer[j] = j * result[j] = right[j] # <<<<<<<<<<<<<< * elif nright == 0: * for i in range(nright): */ __pyx_t_24 = __pyx_v_j; __pyx_t_25 = __pyx_v_j; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_25, __pyx_pybuffernd_result.diminfo[0].strides) = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_right.rcbuffer->pybuffer.buf, __pyx_t_24, __pyx_pybuffernd_right.diminfo[0].strides)); } goto __pyx_L13; } /* "pandas/src/generated.pyx":8287 * rindexer[j] = j * result[j] = right[j] * elif nright == 0: # <<<<<<<<<<<<<< * for i in range(nright): * lindexer[i] = i */ __pyx_t_6 = ((__pyx_v_nright == 0) != 0); if (__pyx_t_6) { /* "pandas/src/generated.pyx":8288 * result[j] = right[j] * elif nright == 0: * for i in range(nright): # <<<<<<<<<<<<<< * lindexer[i] = i * rindexer[i] = -1 */ __pyx_t_20 = __pyx_v_nright; for (__pyx_t_21 = 0; __pyx_t_21 < __pyx_t_20; __pyx_t_21+=1) { __pyx_v_i = __pyx_t_21; /* "pandas/src/generated.pyx":8289 * elif nright == 0: * for i in range(nright): * lindexer[i] = i # <<<<<<<<<<<<<< * rindexer[i] = -1 * result[i] = left[i] */ __pyx_t_26 = __pyx_v_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_lindexer.rcbuffer->pybuffer.buf, __pyx_t_26, __pyx_pybuffernd_lindexer.diminfo[0].strides) = __pyx_v_i; /* "pandas/src/generated.pyx":8290 * for i in range(nright): * lindexer[i] = i * rindexer[i] = -1 # <<<<<<<<<<<<<< * result[i] = left[i] * else: */ __pyx_t_27 = __pyx_v_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_rindexer.rcbuffer->pybuffer.buf, __pyx_t_27, __pyx_pybuffernd_rindexer.diminfo[0].strides) = -1; /* "pandas/src/generated.pyx":8291 * lindexer[i] = i * rindexer[i] = -1 * result[i] = left[i] # <<<<<<<<<<<<<< * else: * while True: */ __pyx_t_28 = __pyx_v_i; __pyx_t_29 = __pyx_v_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_29, __pyx_pybuffernd_result.diminfo[0].strides) = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_left.rcbuffer->pybuffer.buf, __pyx_t_28, __pyx_pybuffernd_left.diminfo[0].strides)); } goto __pyx_L13; } /*else*/ { /* "pandas/src/generated.pyx":8293 * result[i] = left[i] * else: * while True: # <<<<<<<<<<<<<< * if i == nleft: * while j < nright: */ while (1) { if (!1) break; /* "pandas/src/generated.pyx":8294 * else: * while True: * if i == nleft: # <<<<<<<<<<<<<< * while j < nright: * lindexer[count] = -1 */ __pyx_t_6 = ((__pyx_v_i == __pyx_v_nleft) != 0); if (__pyx_t_6) { /* "pandas/src/generated.pyx":8295 * while True: * if i == nleft: * while j < nright: # <<<<<<<<<<<<<< * lindexer[count] = -1 * rindexer[count] = j */ while (1) { __pyx_t_6 = ((__pyx_v_j < __pyx_v_nright) != 0); if (!__pyx_t_6) break; /* "pandas/src/generated.pyx":8296 * if i == nleft: * while j < nright: * lindexer[count] = -1 # <<<<<<<<<<<<<< * rindexer[count] = j * result[count] = right[j] */ __pyx_t_20 = __pyx_v_count; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_lindexer.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_lindexer.diminfo[0].strides) = -1; /* "pandas/src/generated.pyx":8297 * while j < nright: * lindexer[count] = -1 * rindexer[count] = j # <<<<<<<<<<<<<< * result[count] = right[j] * count += 1 */ __pyx_t_21 = __pyx_v_count; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_rindexer.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_rindexer.diminfo[0].strides) = __pyx_v_j; /* "pandas/src/generated.pyx":8298 * lindexer[count] = -1 * rindexer[count] = j * result[count] = right[j] # <<<<<<<<<<<<<< * count += 1 * j += 1 */ __pyx_t_30 = __pyx_v_j; __pyx_t_31 = __pyx_v_count; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_31, __pyx_pybuffernd_result.diminfo[0].strides) = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_right.rcbuffer->pybuffer.buf, __pyx_t_30, __pyx_pybuffernd_right.diminfo[0].strides)); /* "pandas/src/generated.pyx":8299 * rindexer[count] = j * result[count] = right[j] * count += 1 # <<<<<<<<<<<<<< * j += 1 * break */ __pyx_v_count = (__pyx_v_count + 1); /* "pandas/src/generated.pyx":8300 * result[count] = right[j] * count += 1 * j += 1 # <<<<<<<<<<<<<< * break * if j == nright: */ __pyx_v_j = (__pyx_v_j + 1); } /* "pandas/src/generated.pyx":8301 * count += 1 * j += 1 * break # <<<<<<<<<<<<<< * if j == nright: * while i < nleft: */ goto __pyx_L19_break; goto __pyx_L20; } __pyx_L20:; /* "pandas/src/generated.pyx":8302 * j += 1 * break * if j == nright: # <<<<<<<<<<<<<< * while i < nleft: * lindexer[count] = i */ __pyx_t_6 = ((__pyx_v_j == __pyx_v_nright) != 0); if (__pyx_t_6) { /* "pandas/src/generated.pyx":8303 * break * if j == nright: * while i < nleft: # <<<<<<<<<<<<<< * lindexer[count] = i * rindexer[count] = -1 */ while (1) { __pyx_t_6 = ((__pyx_v_i < __pyx_v_nleft) != 0); if (!__pyx_t_6) break; /* "pandas/src/generated.pyx":8304 * if j == nright: * while i < nleft: * lindexer[count] = i # <<<<<<<<<<<<<< * rindexer[count] = -1 * result[count] = left[i] */ __pyx_t_32 = __pyx_v_count; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_lindexer.rcbuffer->pybuffer.buf, __pyx_t_32, __pyx_pybuffernd_lindexer.diminfo[0].strides) = __pyx_v_i; /* "pandas/src/generated.pyx":8305 * while i < nleft: * lindexer[count] = i * rindexer[count] = -1 # <<<<<<<<<<<<<< * result[count] = left[i] * count += 1 */ __pyx_t_33 = __pyx_v_count; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_rindexer.rcbuffer->pybuffer.buf, __pyx_t_33, __pyx_pybuffernd_rindexer.diminfo[0].strides) = -1; /* "pandas/src/generated.pyx":8306 * lindexer[count] = i * rindexer[count] = -1 * result[count] = left[i] # <<<<<<<<<<<<<< * count += 1 * i += 1 */ __pyx_t_34 = __pyx_v_i; __pyx_t_35 = __pyx_v_count; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_35, __pyx_pybuffernd_result.diminfo[0].strides) = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_left.rcbuffer->pybuffer.buf, __pyx_t_34, __pyx_pybuffernd_left.diminfo[0].strides)); /* "pandas/src/generated.pyx":8307 * rindexer[count] = -1 * result[count] = left[i] * count += 1 # <<<<<<<<<<<<<< * i += 1 * break */ __pyx_v_count = (__pyx_v_count + 1); /* "pandas/src/generated.pyx":8308 * result[count] = left[i] * count += 1 * i += 1 # <<<<<<<<<<<<<< * break * */ __pyx_v_i = (__pyx_v_i + 1); } /* "pandas/src/generated.pyx":8309 * count += 1 * i += 1 * break # <<<<<<<<<<<<<< * * lval = left[i] */ goto __pyx_L19_break; goto __pyx_L23; } __pyx_L23:; /* "pandas/src/generated.pyx":8311 * break * * lval = left[i] # <<<<<<<<<<<<<< * rval = right[j] * */ __pyx_t_36 = __pyx_v_i; __pyx_v_lval = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_left.rcbuffer->pybuffer.buf, __pyx_t_36, __pyx_pybuffernd_left.diminfo[0].strides)); /* "pandas/src/generated.pyx":8312 * * lval = left[i] * rval = right[j] # <<<<<<<<<<<<<< * * if lval == rval: */ __pyx_t_37 = __pyx_v_j; __pyx_v_rval = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_right.rcbuffer->pybuffer.buf, __pyx_t_37, __pyx_pybuffernd_right.diminfo[0].strides)); /* "pandas/src/generated.pyx":8314 * rval = right[j] * * if lval == rval: # <<<<<<<<<<<<<< * lindexer[count] = i * rindexer[count] = j */ __pyx_t_6 = ((__pyx_v_lval == __pyx_v_rval) != 0); if (__pyx_t_6) { /* "pandas/src/generated.pyx":8315 * * if lval == rval: * lindexer[count] = i # <<<<<<<<<<<<<< * rindexer[count] = j * result[count] = lval */ __pyx_t_38 = __pyx_v_count; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_lindexer.rcbuffer->pybuffer.buf, __pyx_t_38, __pyx_pybuffernd_lindexer.diminfo[0].strides) = __pyx_v_i; /* "pandas/src/generated.pyx":8316 * if lval == rval: * lindexer[count] = i * rindexer[count] = j # <<<<<<<<<<<<<< * result[count] = lval * count += 1 */ __pyx_t_39 = __pyx_v_count; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_rindexer.rcbuffer->pybuffer.buf, __pyx_t_39, __pyx_pybuffernd_rindexer.diminfo[0].strides) = __pyx_v_j; /* "pandas/src/generated.pyx":8317 * lindexer[count] = i * rindexer[count] = j * result[count] = lval # <<<<<<<<<<<<<< * count += 1 * if i < nleft - 1: */ __pyx_t_40 = __pyx_v_count; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_40, __pyx_pybuffernd_result.diminfo[0].strides) = __pyx_v_lval; /* "pandas/src/generated.pyx":8318 * rindexer[count] = j * result[count] = lval * count += 1 # <<<<<<<<<<<<<< * if i < nleft - 1: * if j < nright - 1 and right[j + 1] == rval: */ __pyx_v_count = (__pyx_v_count + 1); /* "pandas/src/generated.pyx":8319 * result[count] = lval * count += 1 * if i < nleft - 1: # <<<<<<<<<<<<<< * if j < nright - 1 and right[j + 1] == rval: * j += 1 */ __pyx_t_6 = ((__pyx_v_i < (__pyx_v_nleft - 1)) != 0); if (__pyx_t_6) { /* "pandas/src/generated.pyx":8320 * count += 1 * if i < nleft - 1: * if j < nright - 1 and right[j + 1] == rval: # <<<<<<<<<<<<<< * j += 1 * else: */ __pyx_t_6 = ((__pyx_v_j < (__pyx_v_nright - 1)) != 0); if (__pyx_t_6) { __pyx_t_41 = (__pyx_v_j + 1); __pyx_t_2 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_right.rcbuffer->pybuffer.buf, __pyx_t_41, __pyx_pybuffernd_right.diminfo[0].strides)) == __pyx_v_rval) != 0); __pyx_t_5 = __pyx_t_2; } else { __pyx_t_5 = __pyx_t_6; } if (__pyx_t_5) { /* "pandas/src/generated.pyx":8321 * if i < nleft - 1: * if j < nright - 1 and right[j + 1] == rval: * j += 1 # <<<<<<<<<<<<<< * else: * i += 1 */ __pyx_v_j = (__pyx_v_j + 1); goto __pyx_L28; } /*else*/ { /* "pandas/src/generated.pyx":8323 * j += 1 * else: * i += 1 # <<<<<<<<<<<<<< * if left[i] != rval: * j += 1 */ __pyx_v_i = (__pyx_v_i + 1); /* "pandas/src/generated.pyx":8324 * else: * i += 1 * if left[i] != rval: # <<<<<<<<<<<<<< * j += 1 * elif j < nright - 1: */ __pyx_t_42 = __pyx_v_i; __pyx_t_5 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_left.rcbuffer->pybuffer.buf, __pyx_t_42, __pyx_pybuffernd_left.diminfo[0].strides)) != __pyx_v_rval) != 0); if (__pyx_t_5) { /* "pandas/src/generated.pyx":8325 * i += 1 * if left[i] != rval: * j += 1 # <<<<<<<<<<<<<< * elif j < nright - 1: * j += 1 */ __pyx_v_j = (__pyx_v_j + 1); goto __pyx_L29; } __pyx_L29:; } __pyx_L28:; goto __pyx_L27; } /* "pandas/src/generated.pyx":8326 * if left[i] != rval: * j += 1 * elif j < nright - 1: # <<<<<<<<<<<<<< * j += 1 * if lval != right[j]: */ __pyx_t_5 = ((__pyx_v_j < (__pyx_v_nright - 1)) != 0); if (__pyx_t_5) { /* "pandas/src/generated.pyx":8327 * j += 1 * elif j < nright - 1: * j += 1 # <<<<<<<<<<<<<< * if lval != right[j]: * i += 1 */ __pyx_v_j = (__pyx_v_j + 1); /* "pandas/src/generated.pyx":8328 * elif j < nright - 1: * j += 1 * if lval != right[j]: # <<<<<<<<<<<<<< * i += 1 * else: */ __pyx_t_43 = __pyx_v_j; __pyx_t_5 = ((__pyx_v_lval != (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_right.rcbuffer->pybuffer.buf, __pyx_t_43, __pyx_pybuffernd_right.diminfo[0].strides))) != 0); if (__pyx_t_5) { /* "pandas/src/generated.pyx":8329 * j += 1 * if lval != right[j]: * i += 1 # <<<<<<<<<<<<<< * else: * # end of the road */ __pyx_v_i = (__pyx_v_i + 1); goto __pyx_L30; } __pyx_L30:; goto __pyx_L27; } /*else*/ { /* "pandas/src/generated.pyx":8332 * else: * # end of the road * break # <<<<<<<<<<<<<< * elif lval < rval: * lindexer[count] = i */ goto __pyx_L19_break; } __pyx_L27:; goto __pyx_L26; } /* "pandas/src/generated.pyx":8333 * # end of the road * break * elif lval < rval: # <<<<<<<<<<<<<< * lindexer[count] = i * rindexer[count] = -1 */ __pyx_t_5 = ((__pyx_v_lval < __pyx_v_rval) != 0); if (__pyx_t_5) { /* "pandas/src/generated.pyx":8334 * break * elif lval < rval: * lindexer[count] = i # <<<<<<<<<<<<<< * rindexer[count] = -1 * result[count] = lval */ __pyx_t_44 = __pyx_v_count; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_lindexer.rcbuffer->pybuffer.buf, __pyx_t_44, __pyx_pybuffernd_lindexer.diminfo[0].strides) = __pyx_v_i; /* "pandas/src/generated.pyx":8335 * elif lval < rval: * lindexer[count] = i * rindexer[count] = -1 # <<<<<<<<<<<<<< * result[count] = lval * count += 1 */ __pyx_t_45 = __pyx_v_count; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_rindexer.rcbuffer->pybuffer.buf, __pyx_t_45, __pyx_pybuffernd_rindexer.diminfo[0].strides) = -1; /* "pandas/src/generated.pyx":8336 * lindexer[count] = i * rindexer[count] = -1 * result[count] = lval # <<<<<<<<<<<<<< * count += 1 * i += 1 */ __pyx_t_46 = __pyx_v_count; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_46, __pyx_pybuffernd_result.diminfo[0].strides) = __pyx_v_lval; /* "pandas/src/generated.pyx":8337 * rindexer[count] = -1 * result[count] = lval * count += 1 # <<<<<<<<<<<<<< * i += 1 * else: */ __pyx_v_count = (__pyx_v_count + 1); /* "pandas/src/generated.pyx":8338 * result[count] = lval * count += 1 * i += 1 # <<<<<<<<<<<<<< * else: * lindexer[count] = -1 */ __pyx_v_i = (__pyx_v_i + 1); goto __pyx_L26; } /*else*/ { /* "pandas/src/generated.pyx":8340 * i += 1 * else: * lindexer[count] = -1 # <<<<<<<<<<<<<< * rindexer[count] = j * result[count] = rval */ __pyx_t_47 = __pyx_v_count; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_lindexer.rcbuffer->pybuffer.buf, __pyx_t_47, __pyx_pybuffernd_lindexer.diminfo[0].strides) = -1; /* "pandas/src/generated.pyx":8341 * else: * lindexer[count] = -1 * rindexer[count] = j # <<<<<<<<<<<<<< * result[count] = rval * count += 1 */ __pyx_t_48 = __pyx_v_count; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_rindexer.rcbuffer->pybuffer.buf, __pyx_t_48, __pyx_pybuffernd_rindexer.diminfo[0].strides) = __pyx_v_j; /* "pandas/src/generated.pyx":8342 * lindexer[count] = -1 * rindexer[count] = j * result[count] = rval # <<<<<<<<<<<<<< * count += 1 * j += 1 */ __pyx_t_49 = __pyx_v_count; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_49, __pyx_pybuffernd_result.diminfo[0].strides) = __pyx_v_rval; /* "pandas/src/generated.pyx":8343 * rindexer[count] = j * result[count] = rval * count += 1 # <<<<<<<<<<<<<< * j += 1 * */ __pyx_v_count = (__pyx_v_count + 1); /* "pandas/src/generated.pyx":8344 * result[count] = rval * count += 1 * j += 1 # <<<<<<<<<<<<<< * * return result, lindexer, rindexer */ __pyx_v_j = (__pyx_v_j + 1); } __pyx_L26:; } __pyx_L19_break:; } __pyx_L13:; /* "pandas/src/generated.pyx":8346 * j += 1 * * return result, lindexer, rindexer # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_10 = PyTuple_New(3); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8346; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_INCREF(((PyObject *)__pyx_v_result)); PyTuple_SET_ITEM(__pyx_t_10, 0, ((PyObject *)__pyx_v_result)); __Pyx_GIVEREF(((PyObject *)__pyx_v_result)); __Pyx_INCREF(((PyObject *)__pyx_v_lindexer)); PyTuple_SET_ITEM(__pyx_t_10, 1, ((PyObject *)__pyx_v_lindexer)); __Pyx_GIVEREF(((PyObject *)__pyx_v_lindexer)); __Pyx_INCREF(((PyObject *)__pyx_v_rindexer)); PyTuple_SET_ITEM(__pyx_t_10, 2, ((PyObject *)__pyx_v_rindexer)); __Pyx_GIVEREF(((PyObject *)__pyx_v_rindexer)); __pyx_r = ((PyObject *)__pyx_t_10); __pyx_t_10 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_9); __Pyx_XDECREF(__pyx_t_10); __Pyx_XDECREF(__pyx_t_11); __Pyx_XDECREF(__pyx_t_12); __Pyx_XDECREF(__pyx_t_13); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_left.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_lindexer.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_right.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_rindexer.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.outer_join_indexer_int64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_left.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_lindexer.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_right.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_rindexer.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_lindexer); __Pyx_XDECREF((PyObject *)__pyx_v_rindexer); __Pyx_XDECREF((PyObject *)__pyx_v_result); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_485inner_join_indexer_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6pandas_5algos_484inner_join_indexer_float64[] = "\n Two-pass algorithm for monotonic indexes. Handles many-to-one merges\n "; static PyMethodDef __pyx_mdef_6pandas_5algos_485inner_join_indexer_float64 = {__Pyx_NAMESTR("inner_join_indexer_float64"), (PyCFunction)__pyx_pw_6pandas_5algos_485inner_join_indexer_float64, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_5algos_484inner_join_indexer_float64)}; static PyObject *__pyx_pw_6pandas_5algos_485inner_join_indexer_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_left = 0; PyArrayObject *__pyx_v_right = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("inner_join_indexer_float64 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__left,&__pyx_n_s__right,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__left)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__right)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("inner_join_indexer_float64", 1, 2, 2, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8351; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "inner_join_indexer_float64") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8351; __pyx_clineno = __LINE__; goto __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_left = ((PyArrayObject *)values[0]); __pyx_v_right = ((PyArrayObject *)values[1]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("inner_join_indexer_float64", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8351; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.inner_join_indexer_float64", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_left), __pyx_ptype_5numpy_ndarray, 1, "left", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8351; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_right), __pyx_ptype_5numpy_ndarray, 1, "right", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8352; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_484inner_join_indexer_float64(__pyx_self, __pyx_v_left, __pyx_v_right); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":8351 * @cython.wraparound(False) * @cython.boundscheck(False) * def inner_join_indexer_float64(ndarray[float64_t] left, # <<<<<<<<<<<<<< * ndarray[float64_t] right): * ''' */ static PyObject *__pyx_pf_6pandas_5algos_484inner_join_indexer_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_left, PyArrayObject *__pyx_v_right) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_nright; Py_ssize_t __pyx_v_nleft; Py_ssize_t __pyx_v_count; __pyx_t_5numpy_float64_t __pyx_v_lval; __pyx_t_5numpy_float64_t __pyx_v_rval; PyArrayObject *__pyx_v_lindexer = 0; PyArrayObject *__pyx_v_rindexer = 0; PyArrayObject *__pyx_v_result = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_left; __Pyx_Buffer __pyx_pybuffer_left; __Pyx_LocalBuf_ND __pyx_pybuffernd_lindexer; __Pyx_Buffer __pyx_pybuffer_lindexer; __Pyx_LocalBuf_ND __pyx_pybuffernd_result; __Pyx_Buffer __pyx_pybuffer_result; __Pyx_LocalBuf_ND __pyx_pybuffernd_right; __Pyx_Buffer __pyx_pybuffer_right; __Pyx_LocalBuf_ND __pyx_pybuffernd_rindexer; __Pyx_Buffer __pyx_pybuffer_rindexer; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; int __pyx_t_2; int __pyx_t_3; int __pyx_t_4; Py_ssize_t __pyx_t_5; Py_ssize_t __pyx_t_6; Py_ssize_t __pyx_t_7; Py_ssize_t __pyx_t_8; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; PyObject *__pyx_t_11 = NULL; PyObject *__pyx_t_12 = NULL; PyObject *__pyx_t_13 = NULL; PyArrayObject *__pyx_t_14 = NULL; int __pyx_t_15; PyObject *__pyx_t_16 = NULL; PyObject *__pyx_t_17 = NULL; PyObject *__pyx_t_18 = NULL; PyArrayObject *__pyx_t_19 = NULL; 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("inner_join_indexer_float64", 0); __pyx_pybuffer_lindexer.pybuffer.buf = NULL; __pyx_pybuffer_lindexer.refcount = 0; __pyx_pybuffernd_lindexer.data = NULL; __pyx_pybuffernd_lindexer.rcbuffer = &__pyx_pybuffer_lindexer; __pyx_pybuffer_rindexer.pybuffer.buf = NULL; __pyx_pybuffer_rindexer.refcount = 0; __pyx_pybuffernd_rindexer.data = NULL; __pyx_pybuffernd_rindexer.rcbuffer = &__pyx_pybuffer_rindexer; __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_left.pybuffer.buf = NULL; __pyx_pybuffer_left.refcount = 0; __pyx_pybuffernd_left.data = NULL; __pyx_pybuffernd_left.rcbuffer = &__pyx_pybuffer_left; __pyx_pybuffer_right.pybuffer.buf = NULL; __pyx_pybuffer_right.refcount = 0; __pyx_pybuffernd_right.data = NULL; __pyx_pybuffernd_right.rcbuffer = &__pyx_pybuffer_right; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_left.rcbuffer->pybuffer, (PyObject*)__pyx_v_left, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8351; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_left.diminfo[0].strides = __pyx_pybuffernd_left.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_left.diminfo[0].shape = __pyx_pybuffernd_left.rcbuffer->pybuffer.shape[0]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_right.rcbuffer->pybuffer, (PyObject*)__pyx_v_right, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8351; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_right.diminfo[0].strides = __pyx_pybuffernd_right.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_right.diminfo[0].shape = __pyx_pybuffernd_right.rcbuffer->pybuffer.shape[0]; /* "pandas/src/generated.pyx":8362 * ndarray[float64_t] result * * nleft = len(left) # <<<<<<<<<<<<<< * nright = len(right) * */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_left)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8362; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_nleft = __pyx_t_1; /* "pandas/src/generated.pyx":8363 * * nleft = len(left) * nright = len(right) # <<<<<<<<<<<<<< * * i = 0 */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_right)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8363; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_nright = __pyx_t_1; /* "pandas/src/generated.pyx":8365 * nright = len(right) * * i = 0 # <<<<<<<<<<<<<< * j = 0 * count = 0 */ __pyx_v_i = 0; /* "pandas/src/generated.pyx":8366 * * i = 0 * j = 0 # <<<<<<<<<<<<<< * count = 0 * if nleft > 0 and nright > 0: */ __pyx_v_j = 0; /* "pandas/src/generated.pyx":8367 * i = 0 * j = 0 * count = 0 # <<<<<<<<<<<<<< * if nleft > 0 and nright > 0: * while True: */ __pyx_v_count = 0; /* "pandas/src/generated.pyx":8368 * j = 0 * count = 0 * if nleft > 0 and nright > 0: # <<<<<<<<<<<<<< * while True: * if i == nleft: */ __pyx_t_2 = ((__pyx_v_nleft > 0) != 0); if (__pyx_t_2) { __pyx_t_3 = ((__pyx_v_nright > 0) != 0); __pyx_t_4 = __pyx_t_3; } else { __pyx_t_4 = __pyx_t_2; } if (__pyx_t_4) { /* "pandas/src/generated.pyx":8369 * count = 0 * if nleft > 0 and nright > 0: * while True: # <<<<<<<<<<<<<< * if i == nleft: * break */ while (1) { if (!1) break; /* "pandas/src/generated.pyx":8370 * if nleft > 0 and nright > 0: * while True: * if i == nleft: # <<<<<<<<<<<<<< * break * if j == nright: */ __pyx_t_4 = ((__pyx_v_i == __pyx_v_nleft) != 0); if (__pyx_t_4) { /* "pandas/src/generated.pyx":8371 * while True: * if i == nleft: * break # <<<<<<<<<<<<<< * if j == nright: * break */ goto __pyx_L5_break; goto __pyx_L6; } __pyx_L6:; /* "pandas/src/generated.pyx":8372 * if i == nleft: * break * if j == nright: # <<<<<<<<<<<<<< * break * */ __pyx_t_4 = ((__pyx_v_j == __pyx_v_nright) != 0); if (__pyx_t_4) { /* "pandas/src/generated.pyx":8373 * break * if j == nright: * break # <<<<<<<<<<<<<< * * lval = left[i] */ goto __pyx_L5_break; goto __pyx_L7; } __pyx_L7:; /* "pandas/src/generated.pyx":8375 * break * * lval = left[i] # <<<<<<<<<<<<<< * rval = right[j] * if lval == rval: */ __pyx_t_1 = __pyx_v_i; __pyx_v_lval = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_left.rcbuffer->pybuffer.buf, __pyx_t_1, __pyx_pybuffernd_left.diminfo[0].strides)); /* "pandas/src/generated.pyx":8376 * * lval = left[i] * rval = right[j] # <<<<<<<<<<<<<< * if lval == rval: * count += 1 */ __pyx_t_5 = __pyx_v_j; __pyx_v_rval = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_right.rcbuffer->pybuffer.buf, __pyx_t_5, __pyx_pybuffernd_right.diminfo[0].strides)); /* "pandas/src/generated.pyx":8377 * lval = left[i] * rval = right[j] * if lval == rval: # <<<<<<<<<<<<<< * count += 1 * if i < nleft - 1: */ __pyx_t_4 = ((__pyx_v_lval == __pyx_v_rval) != 0); if (__pyx_t_4) { /* "pandas/src/generated.pyx":8378 * rval = right[j] * if lval == rval: * count += 1 # <<<<<<<<<<<<<< * if i < nleft - 1: * if j < nright - 1 and right[j + 1] == rval: */ __pyx_v_count = (__pyx_v_count + 1); /* "pandas/src/generated.pyx":8379 * if lval == rval: * count += 1 * if i < nleft - 1: # <<<<<<<<<<<<<< * if j < nright - 1 and right[j + 1] == rval: * j += 1 */ __pyx_t_4 = ((__pyx_v_i < (__pyx_v_nleft - 1)) != 0); if (__pyx_t_4) { /* "pandas/src/generated.pyx":8380 * count += 1 * if i < nleft - 1: * if j < nright - 1 and right[j + 1] == rval: # <<<<<<<<<<<<<< * j += 1 * else: */ __pyx_t_4 = ((__pyx_v_j < (__pyx_v_nright - 1)) != 0); if (__pyx_t_4) { __pyx_t_6 = (__pyx_v_j + 1); __pyx_t_2 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_right.rcbuffer->pybuffer.buf, __pyx_t_6, __pyx_pybuffernd_right.diminfo[0].strides)) == __pyx_v_rval) != 0); __pyx_t_3 = __pyx_t_2; } else { __pyx_t_3 = __pyx_t_4; } if (__pyx_t_3) { /* "pandas/src/generated.pyx":8381 * if i < nleft - 1: * if j < nright - 1 and right[j + 1] == rval: * j += 1 # <<<<<<<<<<<<<< * else: * i += 1 */ __pyx_v_j = (__pyx_v_j + 1); goto __pyx_L10; } /*else*/ { /* "pandas/src/generated.pyx":8383 * j += 1 * else: * i += 1 # <<<<<<<<<<<<<< * if left[i] != rval: * j += 1 */ __pyx_v_i = (__pyx_v_i + 1); /* "pandas/src/generated.pyx":8384 * else: * i += 1 * if left[i] != rval: # <<<<<<<<<<<<<< * j += 1 * elif j < nright - 1: */ __pyx_t_7 = __pyx_v_i; __pyx_t_3 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_left.rcbuffer->pybuffer.buf, __pyx_t_7, __pyx_pybuffernd_left.diminfo[0].strides)) != __pyx_v_rval) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":8385 * i += 1 * if left[i] != rval: * j += 1 # <<<<<<<<<<<<<< * elif j < nright - 1: * j += 1 */ __pyx_v_j = (__pyx_v_j + 1); goto __pyx_L11; } __pyx_L11:; } __pyx_L10:; goto __pyx_L9; } /* "pandas/src/generated.pyx":8386 * if left[i] != rval: * j += 1 * elif j < nright - 1: # <<<<<<<<<<<<<< * j += 1 * if lval != right[j]: */ __pyx_t_3 = ((__pyx_v_j < (__pyx_v_nright - 1)) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":8387 * j += 1 * elif j < nright - 1: * j += 1 # <<<<<<<<<<<<<< * if lval != right[j]: * i += 1 */ __pyx_v_j = (__pyx_v_j + 1); /* "pandas/src/generated.pyx":8388 * elif j < nright - 1: * j += 1 * if lval != right[j]: # <<<<<<<<<<<<<< * i += 1 * else: */ __pyx_t_8 = __pyx_v_j; __pyx_t_3 = ((__pyx_v_lval != (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_right.rcbuffer->pybuffer.buf, __pyx_t_8, __pyx_pybuffernd_right.diminfo[0].strides))) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":8389 * j += 1 * if lval != right[j]: * i += 1 # <<<<<<<<<<<<<< * else: * # end of the road */ __pyx_v_i = (__pyx_v_i + 1); goto __pyx_L12; } __pyx_L12:; goto __pyx_L9; } /*else*/ { /* "pandas/src/generated.pyx":8392 * else: * # end of the road * break # <<<<<<<<<<<<<< * elif lval < rval: * i += 1 */ goto __pyx_L5_break; } __pyx_L9:; goto __pyx_L8; } /* "pandas/src/generated.pyx":8393 * # end of the road * break * elif lval < rval: # <<<<<<<<<<<<<< * i += 1 * else: */ __pyx_t_3 = ((__pyx_v_lval < __pyx_v_rval) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":8394 * break * elif lval < rval: * i += 1 # <<<<<<<<<<<<<< * else: * j += 1 */ __pyx_v_i = (__pyx_v_i + 1); goto __pyx_L8; } /*else*/ { /* "pandas/src/generated.pyx":8396 * i += 1 * else: * j += 1 # <<<<<<<<<<<<<< * * # do it again now that result size is known */ __pyx_v_j = (__pyx_v_j + 1); } __pyx_L8:; } __pyx_L5_break:; goto __pyx_L3; } __pyx_L3:; /* "pandas/src/generated.pyx":8400 * # do it again now that result size is known * * lindexer = np.empty(count, dtype=np.int64) # <<<<<<<<<<<<<< * rindexer = np.empty(count, dtype=np.int64) * result = np.empty(count, dtype=np.float64) */ __pyx_t_9 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8400; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s__empty); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8400; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_9 = PyInt_FromSsize_t(__pyx_v_count); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8400; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_t_11 = PyTuple_New(1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8400; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_9); __Pyx_GIVEREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_9 = PyDict_New(); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8400; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_9)); __pyx_t_12 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8400; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s__int64); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8400; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; if (PyDict_SetItem(__pyx_t_9, ((PyObject *)__pyx_n_s__dtype), __pyx_t_13) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8400; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_13 = PyObject_Call(__pyx_t_10, ((PyObject *)__pyx_t_11), ((PyObject *)__pyx_t_9)); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8400; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_11)); __pyx_t_11 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_9)); __pyx_t_9 = 0; if (!(likely(((__pyx_t_13) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_13, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8400; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_14 = ((PyArrayObject *)__pyx_t_13); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_lindexer.rcbuffer->pybuffer); __pyx_t_15 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_lindexer.rcbuffer->pybuffer, (PyObject*)__pyx_t_14, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_15 < 0)) { PyErr_Fetch(&__pyx_t_16, &__pyx_t_17, &__pyx_t_18); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_lindexer.rcbuffer->pybuffer, (PyObject*)__pyx_v_lindexer, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_16); Py_XDECREF(__pyx_t_17); Py_XDECREF(__pyx_t_18); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_16, __pyx_t_17, __pyx_t_18); } } __pyx_pybuffernd_lindexer.diminfo[0].strides = __pyx_pybuffernd_lindexer.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_lindexer.diminfo[0].shape = __pyx_pybuffernd_lindexer.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_15 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8400; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_14 = 0; __pyx_v_lindexer = ((PyArrayObject *)__pyx_t_13); __pyx_t_13 = 0; /* "pandas/src/generated.pyx":8401 * * lindexer = np.empty(count, dtype=np.int64) * rindexer = np.empty(count, dtype=np.int64) # <<<<<<<<<<<<<< * result = np.empty(count, dtype=np.float64) * */ __pyx_t_13 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8401; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_13, __pyx_n_s__empty); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8401; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_13 = PyInt_FromSsize_t(__pyx_v_count); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8401; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __pyx_t_11 = PyTuple_New(1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8401; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_13); __Pyx_GIVEREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_13 = PyDict_New(); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8401; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_13)); __pyx_t_10 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8401; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s__int64); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8401; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; if (PyDict_SetItem(__pyx_t_13, ((PyObject *)__pyx_n_s__dtype), __pyx_t_12) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8401; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __pyx_t_12 = PyObject_Call(__pyx_t_9, ((PyObject *)__pyx_t_11), ((PyObject *)__pyx_t_13)); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8401; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_11)); __pyx_t_11 = 0; __Pyx_DECREF(((PyObject *)__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_filename = __pyx_f[2]; __pyx_lineno = 8401; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_14 = ((PyArrayObject *)__pyx_t_12); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_rindexer.rcbuffer->pybuffer); __pyx_t_15 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_rindexer.rcbuffer->pybuffer, (PyObject*)__pyx_t_14, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_15 < 0)) { PyErr_Fetch(&__pyx_t_18, &__pyx_t_17, &__pyx_t_16); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_rindexer.rcbuffer->pybuffer, (PyObject*)__pyx_v_rindexer, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_18); Py_XDECREF(__pyx_t_17); Py_XDECREF(__pyx_t_16); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_18, __pyx_t_17, __pyx_t_16); } } __pyx_pybuffernd_rindexer.diminfo[0].strides = __pyx_pybuffernd_rindexer.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_rindexer.diminfo[0].shape = __pyx_pybuffernd_rindexer.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_15 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8401; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_14 = 0; __pyx_v_rindexer = ((PyArrayObject *)__pyx_t_12); __pyx_t_12 = 0; /* "pandas/src/generated.pyx":8402 * lindexer = np.empty(count, dtype=np.int64) * rindexer = np.empty(count, dtype=np.int64) * result = np.empty(count, dtype=np.float64) # <<<<<<<<<<<<<< * * i = 0 */ __pyx_t_12 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8402; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s__empty); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8402; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __pyx_t_12 = PyInt_FromSsize_t(__pyx_v_count); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8402; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __pyx_t_11 = PyTuple_New(1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8402; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_12); __Pyx_GIVEREF(__pyx_t_12); __pyx_t_12 = 0; __pyx_t_12 = PyDict_New(); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8402; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_12)); __pyx_t_9 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8402; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s__float64); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8402; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; if (PyDict_SetItem(__pyx_t_12, ((PyObject *)__pyx_n_s__dtype), __pyx_t_10) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8402; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_t_10 = PyObject_Call(__pyx_t_13, ((PyObject *)__pyx_t_11), ((PyObject *)__pyx_t_12)); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8402; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_11)); __pyx_t_11 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_12)); __pyx_t_12 = 0; if (!(likely(((__pyx_t_10) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_10, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8402; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_19 = ((PyArrayObject *)__pyx_t_10); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __pyx_t_15 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_t_19, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_15 < 0)) { PyErr_Fetch(&__pyx_t_16, &__pyx_t_17, &__pyx_t_18); 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_16); Py_XDECREF(__pyx_t_17); Py_XDECREF(__pyx_t_18); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_16, __pyx_t_17, __pyx_t_18); } } __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_15 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8402; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_19 = 0; __pyx_v_result = ((PyArrayObject *)__pyx_t_10); __pyx_t_10 = 0; /* "pandas/src/generated.pyx":8404 * result = np.empty(count, dtype=np.float64) * * i = 0 # <<<<<<<<<<<<<< * j = 0 * count = 0 */ __pyx_v_i = 0; /* "pandas/src/generated.pyx":8405 * * i = 0 * j = 0 # <<<<<<<<<<<<<< * count = 0 * if nleft > 0 and nright > 0: */ __pyx_v_j = 0; /* "pandas/src/generated.pyx":8406 * i = 0 * j = 0 * count = 0 # <<<<<<<<<<<<<< * if nleft > 0 and nright > 0: * while True: */ __pyx_v_count = 0; /* "pandas/src/generated.pyx":8407 * j = 0 * count = 0 * if nleft > 0 and nright > 0: # <<<<<<<<<<<<<< * while True: * if i == nleft: */ __pyx_t_3 = ((__pyx_v_nleft > 0) != 0); if (__pyx_t_3) { __pyx_t_4 = ((__pyx_v_nright > 0) != 0); __pyx_t_2 = __pyx_t_4; } else { __pyx_t_2 = __pyx_t_3; } if (__pyx_t_2) { /* "pandas/src/generated.pyx":8408 * count = 0 * if nleft > 0 and nright > 0: * while True: # <<<<<<<<<<<<<< * if i == nleft: * break */ while (1) { if (!1) break; /* "pandas/src/generated.pyx":8409 * if nleft > 0 and nright > 0: * while True: * if i == nleft: # <<<<<<<<<<<<<< * break * if j == nright: */ __pyx_t_2 = ((__pyx_v_i == __pyx_v_nleft) != 0); if (__pyx_t_2) { /* "pandas/src/generated.pyx":8410 * while True: * if i == nleft: * break # <<<<<<<<<<<<<< * if j == nright: * break */ goto __pyx_L15_break; goto __pyx_L16; } __pyx_L16:; /* "pandas/src/generated.pyx":8411 * if i == nleft: * break * if j == nright: # <<<<<<<<<<<<<< * break * */ __pyx_t_2 = ((__pyx_v_j == __pyx_v_nright) != 0); if (__pyx_t_2) { /* "pandas/src/generated.pyx":8412 * break * if j == nright: * break # <<<<<<<<<<<<<< * * lval = left[i] */ goto __pyx_L15_break; goto __pyx_L17; } __pyx_L17:; /* "pandas/src/generated.pyx":8414 * break * * lval = left[i] # <<<<<<<<<<<<<< * rval = right[j] * if lval == rval: */ __pyx_t_20 = __pyx_v_i; __pyx_v_lval = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_left.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_left.diminfo[0].strides)); /* "pandas/src/generated.pyx":8415 * * lval = left[i] * rval = right[j] # <<<<<<<<<<<<<< * if lval == rval: * lindexer[count] = i */ __pyx_t_21 = __pyx_v_j; __pyx_v_rval = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_right.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_right.diminfo[0].strides)); /* "pandas/src/generated.pyx":8416 * lval = left[i] * rval = right[j] * if lval == rval: # <<<<<<<<<<<<<< * lindexer[count] = i * rindexer[count] = j */ __pyx_t_2 = ((__pyx_v_lval == __pyx_v_rval) != 0); if (__pyx_t_2) { /* "pandas/src/generated.pyx":8417 * rval = right[j] * if lval == rval: * lindexer[count] = i # <<<<<<<<<<<<<< * rindexer[count] = j * result[count] = rval */ __pyx_t_22 = __pyx_v_count; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_lindexer.rcbuffer->pybuffer.buf, __pyx_t_22, __pyx_pybuffernd_lindexer.diminfo[0].strides) = __pyx_v_i; /* "pandas/src/generated.pyx":8418 * if lval == rval: * lindexer[count] = i * rindexer[count] = j # <<<<<<<<<<<<<< * result[count] = rval * count += 1 */ __pyx_t_23 = __pyx_v_count; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_rindexer.rcbuffer->pybuffer.buf, __pyx_t_23, __pyx_pybuffernd_rindexer.diminfo[0].strides) = __pyx_v_j; /* "pandas/src/generated.pyx":8419 * lindexer[count] = i * rindexer[count] = j * result[count] = rval # <<<<<<<<<<<<<< * count += 1 * if i < nleft - 1: */ __pyx_t_24 = __pyx_v_count; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_24, __pyx_pybuffernd_result.diminfo[0].strides) = __pyx_v_rval; /* "pandas/src/generated.pyx":8420 * rindexer[count] = j * result[count] = rval * count += 1 # <<<<<<<<<<<<<< * if i < nleft - 1: * if j < nright - 1 and right[j + 1] == rval: */ __pyx_v_count = (__pyx_v_count + 1); /* "pandas/src/generated.pyx":8421 * result[count] = rval * count += 1 * if i < nleft - 1: # <<<<<<<<<<<<<< * if j < nright - 1 and right[j + 1] == rval: * j += 1 */ __pyx_t_2 = ((__pyx_v_i < (__pyx_v_nleft - 1)) != 0); if (__pyx_t_2) { /* "pandas/src/generated.pyx":8422 * count += 1 * if i < nleft - 1: * if j < nright - 1 and right[j + 1] == rval: # <<<<<<<<<<<<<< * j += 1 * else: */ __pyx_t_2 = ((__pyx_v_j < (__pyx_v_nright - 1)) != 0); if (__pyx_t_2) { __pyx_t_25 = (__pyx_v_j + 1); __pyx_t_3 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_right.rcbuffer->pybuffer.buf, __pyx_t_25, __pyx_pybuffernd_right.diminfo[0].strides)) == __pyx_v_rval) != 0); __pyx_t_4 = __pyx_t_3; } else { __pyx_t_4 = __pyx_t_2; } if (__pyx_t_4) { /* "pandas/src/generated.pyx":8423 * if i < nleft - 1: * if j < nright - 1 and right[j + 1] == rval: * j += 1 # <<<<<<<<<<<<<< * else: * i += 1 */ __pyx_v_j = (__pyx_v_j + 1); goto __pyx_L20; } /*else*/ { /* "pandas/src/generated.pyx":8425 * j += 1 * else: * i += 1 # <<<<<<<<<<<<<< * if left[i] != rval: * j += 1 */ __pyx_v_i = (__pyx_v_i + 1); /* "pandas/src/generated.pyx":8426 * else: * i += 1 * if left[i] != rval: # <<<<<<<<<<<<<< * j += 1 * elif j < nright - 1: */ __pyx_t_26 = __pyx_v_i; __pyx_t_4 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_left.rcbuffer->pybuffer.buf, __pyx_t_26, __pyx_pybuffernd_left.diminfo[0].strides)) != __pyx_v_rval) != 0); if (__pyx_t_4) { /* "pandas/src/generated.pyx":8427 * i += 1 * if left[i] != rval: * j += 1 # <<<<<<<<<<<<<< * elif j < nright - 1: * j += 1 */ __pyx_v_j = (__pyx_v_j + 1); goto __pyx_L21; } __pyx_L21:; } __pyx_L20:; goto __pyx_L19; } /* "pandas/src/generated.pyx":8428 * if left[i] != rval: * j += 1 * elif j < nright - 1: # <<<<<<<<<<<<<< * j += 1 * if lval != right[j]: */ __pyx_t_4 = ((__pyx_v_j < (__pyx_v_nright - 1)) != 0); if (__pyx_t_4) { /* "pandas/src/generated.pyx":8429 * j += 1 * elif j < nright - 1: * j += 1 # <<<<<<<<<<<<<< * if lval != right[j]: * i += 1 */ __pyx_v_j = (__pyx_v_j + 1); /* "pandas/src/generated.pyx":8430 * elif j < nright - 1: * j += 1 * if lval != right[j]: # <<<<<<<<<<<<<< * i += 1 * else: */ __pyx_t_27 = __pyx_v_j; __pyx_t_4 = ((__pyx_v_lval != (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_right.rcbuffer->pybuffer.buf, __pyx_t_27, __pyx_pybuffernd_right.diminfo[0].strides))) != 0); if (__pyx_t_4) { /* "pandas/src/generated.pyx":8431 * j += 1 * if lval != right[j]: * i += 1 # <<<<<<<<<<<<<< * else: * # end of the road */ __pyx_v_i = (__pyx_v_i + 1); goto __pyx_L22; } __pyx_L22:; goto __pyx_L19; } /*else*/ { /* "pandas/src/generated.pyx":8434 * else: * # end of the road * break # <<<<<<<<<<<<<< * elif lval < rval: * i += 1 */ goto __pyx_L15_break; } __pyx_L19:; goto __pyx_L18; } /* "pandas/src/generated.pyx":8435 * # end of the road * break * elif lval < rval: # <<<<<<<<<<<<<< * i += 1 * else: */ __pyx_t_4 = ((__pyx_v_lval < __pyx_v_rval) != 0); if (__pyx_t_4) { /* "pandas/src/generated.pyx":8436 * break * elif lval < rval: * i += 1 # <<<<<<<<<<<<<< * else: * j += 1 */ __pyx_v_i = (__pyx_v_i + 1); goto __pyx_L18; } /*else*/ { /* "pandas/src/generated.pyx":8438 * i += 1 * else: * j += 1 # <<<<<<<<<<<<<< * * return result, lindexer, rindexer */ __pyx_v_j = (__pyx_v_j + 1); } __pyx_L18:; } __pyx_L15_break:; goto __pyx_L13; } __pyx_L13:; /* "pandas/src/generated.pyx":8440 * j += 1 * * return result, lindexer, rindexer # <<<<<<<<<<<<<< * * @cython.wraparound(False) */ __Pyx_XDECREF(__pyx_r); __pyx_t_10 = PyTuple_New(3); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8440; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_INCREF(((PyObject *)__pyx_v_result)); PyTuple_SET_ITEM(__pyx_t_10, 0, ((PyObject *)__pyx_v_result)); __Pyx_GIVEREF(((PyObject *)__pyx_v_result)); __Pyx_INCREF(((PyObject *)__pyx_v_lindexer)); PyTuple_SET_ITEM(__pyx_t_10, 1, ((PyObject *)__pyx_v_lindexer)); __Pyx_GIVEREF(((PyObject *)__pyx_v_lindexer)); __Pyx_INCREF(((PyObject *)__pyx_v_rindexer)); PyTuple_SET_ITEM(__pyx_t_10, 2, ((PyObject *)__pyx_v_rindexer)); __Pyx_GIVEREF(((PyObject *)__pyx_v_rindexer)); __pyx_r = ((PyObject *)__pyx_t_10); __pyx_t_10 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_9); __Pyx_XDECREF(__pyx_t_10); __Pyx_XDECREF(__pyx_t_11); __Pyx_XDECREF(__pyx_t_12); __Pyx_XDECREF(__pyx_t_13); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_left.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_lindexer.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_right.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_rindexer.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.inner_join_indexer_float64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_left.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_lindexer.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_right.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_rindexer.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_lindexer); __Pyx_XDECREF((PyObject *)__pyx_v_rindexer); __Pyx_XDECREF((PyObject *)__pyx_v_result); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_487inner_join_indexer_float32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6pandas_5algos_486inner_join_indexer_float32[] = "\n Two-pass algorithm for monotonic indexes. Handles many-to-one merges\n "; static PyMethodDef __pyx_mdef_6pandas_5algos_487inner_join_indexer_float32 = {__Pyx_NAMESTR("inner_join_indexer_float32"), (PyCFunction)__pyx_pw_6pandas_5algos_487inner_join_indexer_float32, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_5algos_486inner_join_indexer_float32)}; static PyObject *__pyx_pw_6pandas_5algos_487inner_join_indexer_float32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_left = 0; PyArrayObject *__pyx_v_right = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("inner_join_indexer_float32 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__left,&__pyx_n_s__right,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__left)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__right)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("inner_join_indexer_float32", 1, 2, 2, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8444; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "inner_join_indexer_float32") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8444; __pyx_clineno = __LINE__; goto __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_left = ((PyArrayObject *)values[0]); __pyx_v_right = ((PyArrayObject *)values[1]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("inner_join_indexer_float32", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8444; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.inner_join_indexer_float32", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_left), __pyx_ptype_5numpy_ndarray, 1, "left", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8444; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_right), __pyx_ptype_5numpy_ndarray, 1, "right", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8445; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_486inner_join_indexer_float32(__pyx_self, __pyx_v_left, __pyx_v_right); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":8444 * @cython.wraparound(False) * @cython.boundscheck(False) * def inner_join_indexer_float32(ndarray[float32_t] left, # <<<<<<<<<<<<<< * ndarray[float32_t] right): * ''' */ static PyObject *__pyx_pf_6pandas_5algos_486inner_join_indexer_float32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_left, PyArrayObject *__pyx_v_right) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_nright; Py_ssize_t __pyx_v_nleft; Py_ssize_t __pyx_v_count; __pyx_t_5numpy_float32_t __pyx_v_lval; __pyx_t_5numpy_float32_t __pyx_v_rval; PyArrayObject *__pyx_v_lindexer = 0; PyArrayObject *__pyx_v_rindexer = 0; PyArrayObject *__pyx_v_result = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_left; __Pyx_Buffer __pyx_pybuffer_left; __Pyx_LocalBuf_ND __pyx_pybuffernd_lindexer; __Pyx_Buffer __pyx_pybuffer_lindexer; __Pyx_LocalBuf_ND __pyx_pybuffernd_result; __Pyx_Buffer __pyx_pybuffer_result; __Pyx_LocalBuf_ND __pyx_pybuffernd_right; __Pyx_Buffer __pyx_pybuffer_right; __Pyx_LocalBuf_ND __pyx_pybuffernd_rindexer; __Pyx_Buffer __pyx_pybuffer_rindexer; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; int __pyx_t_2; int __pyx_t_3; int __pyx_t_4; Py_ssize_t __pyx_t_5; Py_ssize_t __pyx_t_6; Py_ssize_t __pyx_t_7; Py_ssize_t __pyx_t_8; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; PyObject *__pyx_t_11 = NULL; PyObject *__pyx_t_12 = NULL; PyObject *__pyx_t_13 = NULL; PyArrayObject *__pyx_t_14 = NULL; int __pyx_t_15; PyObject *__pyx_t_16 = NULL; PyObject *__pyx_t_17 = NULL; PyObject *__pyx_t_18 = NULL; PyArrayObject *__pyx_t_19 = NULL; 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("inner_join_indexer_float32", 0); __pyx_pybuffer_lindexer.pybuffer.buf = NULL; __pyx_pybuffer_lindexer.refcount = 0; __pyx_pybuffernd_lindexer.data = NULL; __pyx_pybuffernd_lindexer.rcbuffer = &__pyx_pybuffer_lindexer; __pyx_pybuffer_rindexer.pybuffer.buf = NULL; __pyx_pybuffer_rindexer.refcount = 0; __pyx_pybuffernd_rindexer.data = NULL; __pyx_pybuffernd_rindexer.rcbuffer = &__pyx_pybuffer_rindexer; __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_left.pybuffer.buf = NULL; __pyx_pybuffer_left.refcount = 0; __pyx_pybuffernd_left.data = NULL; __pyx_pybuffernd_left.rcbuffer = &__pyx_pybuffer_left; __pyx_pybuffer_right.pybuffer.buf = NULL; __pyx_pybuffer_right.refcount = 0; __pyx_pybuffernd_right.data = NULL; __pyx_pybuffernd_right.rcbuffer = &__pyx_pybuffer_right; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_left.rcbuffer->pybuffer, (PyObject*)__pyx_v_left, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8444; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_left.diminfo[0].strides = __pyx_pybuffernd_left.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_left.diminfo[0].shape = __pyx_pybuffernd_left.rcbuffer->pybuffer.shape[0]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_right.rcbuffer->pybuffer, (PyObject*)__pyx_v_right, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8444; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_right.diminfo[0].strides = __pyx_pybuffernd_right.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_right.diminfo[0].shape = __pyx_pybuffernd_right.rcbuffer->pybuffer.shape[0]; /* "pandas/src/generated.pyx":8455 * ndarray[float32_t] result * * nleft = len(left) # <<<<<<<<<<<<<< * nright = len(right) * */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_left)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8455; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_nleft = __pyx_t_1; /* "pandas/src/generated.pyx":8456 * * nleft = len(left) * nright = len(right) # <<<<<<<<<<<<<< * * i = 0 */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_right)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8456; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_nright = __pyx_t_1; /* "pandas/src/generated.pyx":8458 * nright = len(right) * * i = 0 # <<<<<<<<<<<<<< * j = 0 * count = 0 */ __pyx_v_i = 0; /* "pandas/src/generated.pyx":8459 * * i = 0 * j = 0 # <<<<<<<<<<<<<< * count = 0 * if nleft > 0 and nright > 0: */ __pyx_v_j = 0; /* "pandas/src/generated.pyx":8460 * i = 0 * j = 0 * count = 0 # <<<<<<<<<<<<<< * if nleft > 0 and nright > 0: * while True: */ __pyx_v_count = 0; /* "pandas/src/generated.pyx":8461 * j = 0 * count = 0 * if nleft > 0 and nright > 0: # <<<<<<<<<<<<<< * while True: * if i == nleft: */ __pyx_t_2 = ((__pyx_v_nleft > 0) != 0); if (__pyx_t_2) { __pyx_t_3 = ((__pyx_v_nright > 0) != 0); __pyx_t_4 = __pyx_t_3; } else { __pyx_t_4 = __pyx_t_2; } if (__pyx_t_4) { /* "pandas/src/generated.pyx":8462 * count = 0 * if nleft > 0 and nright > 0: * while True: # <<<<<<<<<<<<<< * if i == nleft: * break */ while (1) { if (!1) break; /* "pandas/src/generated.pyx":8463 * if nleft > 0 and nright > 0: * while True: * if i == nleft: # <<<<<<<<<<<<<< * break * if j == nright: */ __pyx_t_4 = ((__pyx_v_i == __pyx_v_nleft) != 0); if (__pyx_t_4) { /* "pandas/src/generated.pyx":8464 * while True: * if i == nleft: * break # <<<<<<<<<<<<<< * if j == nright: * break */ goto __pyx_L5_break; goto __pyx_L6; } __pyx_L6:; /* "pandas/src/generated.pyx":8465 * if i == nleft: * break * if j == nright: # <<<<<<<<<<<<<< * break * */ __pyx_t_4 = ((__pyx_v_j == __pyx_v_nright) != 0); if (__pyx_t_4) { /* "pandas/src/generated.pyx":8466 * break * if j == nright: * break # <<<<<<<<<<<<<< * * lval = left[i] */ goto __pyx_L5_break; goto __pyx_L7; } __pyx_L7:; /* "pandas/src/generated.pyx":8468 * break * * lval = left[i] # <<<<<<<<<<<<<< * rval = right[j] * if lval == rval: */ __pyx_t_1 = __pyx_v_i; __pyx_v_lval = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_left.rcbuffer->pybuffer.buf, __pyx_t_1, __pyx_pybuffernd_left.diminfo[0].strides)); /* "pandas/src/generated.pyx":8469 * * lval = left[i] * rval = right[j] # <<<<<<<<<<<<<< * if lval == rval: * count += 1 */ __pyx_t_5 = __pyx_v_j; __pyx_v_rval = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_right.rcbuffer->pybuffer.buf, __pyx_t_5, __pyx_pybuffernd_right.diminfo[0].strides)); /* "pandas/src/generated.pyx":8470 * lval = left[i] * rval = right[j] * if lval == rval: # <<<<<<<<<<<<<< * count += 1 * if i < nleft - 1: */ __pyx_t_4 = ((__pyx_v_lval == __pyx_v_rval) != 0); if (__pyx_t_4) { /* "pandas/src/generated.pyx":8471 * rval = right[j] * if lval == rval: * count += 1 # <<<<<<<<<<<<<< * if i < nleft - 1: * if j < nright - 1 and right[j + 1] == rval: */ __pyx_v_count = (__pyx_v_count + 1); /* "pandas/src/generated.pyx":8472 * if lval == rval: * count += 1 * if i < nleft - 1: # <<<<<<<<<<<<<< * if j < nright - 1 and right[j + 1] == rval: * j += 1 */ __pyx_t_4 = ((__pyx_v_i < (__pyx_v_nleft - 1)) != 0); if (__pyx_t_4) { /* "pandas/src/generated.pyx":8473 * count += 1 * if i < nleft - 1: * if j < nright - 1 and right[j + 1] == rval: # <<<<<<<<<<<<<< * j += 1 * else: */ __pyx_t_4 = ((__pyx_v_j < (__pyx_v_nright - 1)) != 0); if (__pyx_t_4) { __pyx_t_6 = (__pyx_v_j + 1); __pyx_t_2 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_right.rcbuffer->pybuffer.buf, __pyx_t_6, __pyx_pybuffernd_right.diminfo[0].strides)) == __pyx_v_rval) != 0); __pyx_t_3 = __pyx_t_2; } else { __pyx_t_3 = __pyx_t_4; } if (__pyx_t_3) { /* "pandas/src/generated.pyx":8474 * if i < nleft - 1: * if j < nright - 1 and right[j + 1] == rval: * j += 1 # <<<<<<<<<<<<<< * else: * i += 1 */ __pyx_v_j = (__pyx_v_j + 1); goto __pyx_L10; } /*else*/ { /* "pandas/src/generated.pyx":8476 * j += 1 * else: * i += 1 # <<<<<<<<<<<<<< * if left[i] != rval: * j += 1 */ __pyx_v_i = (__pyx_v_i + 1); /* "pandas/src/generated.pyx":8477 * else: * i += 1 * if left[i] != rval: # <<<<<<<<<<<<<< * j += 1 * elif j < nright - 1: */ __pyx_t_7 = __pyx_v_i; __pyx_t_3 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_left.rcbuffer->pybuffer.buf, __pyx_t_7, __pyx_pybuffernd_left.diminfo[0].strides)) != __pyx_v_rval) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":8478 * i += 1 * if left[i] != rval: * j += 1 # <<<<<<<<<<<<<< * elif j < nright - 1: * j += 1 */ __pyx_v_j = (__pyx_v_j + 1); goto __pyx_L11; } __pyx_L11:; } __pyx_L10:; goto __pyx_L9; } /* "pandas/src/generated.pyx":8479 * if left[i] != rval: * j += 1 * elif j < nright - 1: # <<<<<<<<<<<<<< * j += 1 * if lval != right[j]: */ __pyx_t_3 = ((__pyx_v_j < (__pyx_v_nright - 1)) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":8480 * j += 1 * elif j < nright - 1: * j += 1 # <<<<<<<<<<<<<< * if lval != right[j]: * i += 1 */ __pyx_v_j = (__pyx_v_j + 1); /* "pandas/src/generated.pyx":8481 * elif j < nright - 1: * j += 1 * if lval != right[j]: # <<<<<<<<<<<<<< * i += 1 * else: */ __pyx_t_8 = __pyx_v_j; __pyx_t_3 = ((__pyx_v_lval != (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_right.rcbuffer->pybuffer.buf, __pyx_t_8, __pyx_pybuffernd_right.diminfo[0].strides))) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":8482 * j += 1 * if lval != right[j]: * i += 1 # <<<<<<<<<<<<<< * else: * # end of the road */ __pyx_v_i = (__pyx_v_i + 1); goto __pyx_L12; } __pyx_L12:; goto __pyx_L9; } /*else*/ { /* "pandas/src/generated.pyx":8485 * else: * # end of the road * break # <<<<<<<<<<<<<< * elif lval < rval: * i += 1 */ goto __pyx_L5_break; } __pyx_L9:; goto __pyx_L8; } /* "pandas/src/generated.pyx":8486 * # end of the road * break * elif lval < rval: # <<<<<<<<<<<<<< * i += 1 * else: */ __pyx_t_3 = ((__pyx_v_lval < __pyx_v_rval) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":8487 * break * elif lval < rval: * i += 1 # <<<<<<<<<<<<<< * else: * j += 1 */ __pyx_v_i = (__pyx_v_i + 1); goto __pyx_L8; } /*else*/ { /* "pandas/src/generated.pyx":8489 * i += 1 * else: * j += 1 # <<<<<<<<<<<<<< * * # do it again now that result size is known */ __pyx_v_j = (__pyx_v_j + 1); } __pyx_L8:; } __pyx_L5_break:; goto __pyx_L3; } __pyx_L3:; /* "pandas/src/generated.pyx":8493 * # do it again now that result size is known * * lindexer = np.empty(count, dtype=np.int64) # <<<<<<<<<<<<<< * rindexer = np.empty(count, dtype=np.int64) * result = np.empty(count, dtype=np.float32) */ __pyx_t_9 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8493; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s__empty); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8493; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_9 = PyInt_FromSsize_t(__pyx_v_count); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8493; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_t_11 = PyTuple_New(1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8493; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_9); __Pyx_GIVEREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_9 = PyDict_New(); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8493; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_9)); __pyx_t_12 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8493; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s__int64); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8493; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; if (PyDict_SetItem(__pyx_t_9, ((PyObject *)__pyx_n_s__dtype), __pyx_t_13) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8493; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_13 = PyObject_Call(__pyx_t_10, ((PyObject *)__pyx_t_11), ((PyObject *)__pyx_t_9)); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8493; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_11)); __pyx_t_11 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_9)); __pyx_t_9 = 0; if (!(likely(((__pyx_t_13) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_13, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8493; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_14 = ((PyArrayObject *)__pyx_t_13); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_lindexer.rcbuffer->pybuffer); __pyx_t_15 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_lindexer.rcbuffer->pybuffer, (PyObject*)__pyx_t_14, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_15 < 0)) { PyErr_Fetch(&__pyx_t_16, &__pyx_t_17, &__pyx_t_18); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_lindexer.rcbuffer->pybuffer, (PyObject*)__pyx_v_lindexer, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_16); Py_XDECREF(__pyx_t_17); Py_XDECREF(__pyx_t_18); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_16, __pyx_t_17, __pyx_t_18); } } __pyx_pybuffernd_lindexer.diminfo[0].strides = __pyx_pybuffernd_lindexer.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_lindexer.diminfo[0].shape = __pyx_pybuffernd_lindexer.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_15 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8493; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_14 = 0; __pyx_v_lindexer = ((PyArrayObject *)__pyx_t_13); __pyx_t_13 = 0; /* "pandas/src/generated.pyx":8494 * * lindexer = np.empty(count, dtype=np.int64) * rindexer = np.empty(count, dtype=np.int64) # <<<<<<<<<<<<<< * result = np.empty(count, dtype=np.float32) * */ __pyx_t_13 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8494; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_13, __pyx_n_s__empty); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8494; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_13 = PyInt_FromSsize_t(__pyx_v_count); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8494; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __pyx_t_11 = PyTuple_New(1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8494; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_13); __Pyx_GIVEREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_13 = PyDict_New(); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8494; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_13)); __pyx_t_10 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8494; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s__int64); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8494; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; if (PyDict_SetItem(__pyx_t_13, ((PyObject *)__pyx_n_s__dtype), __pyx_t_12) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8494; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __pyx_t_12 = PyObject_Call(__pyx_t_9, ((PyObject *)__pyx_t_11), ((PyObject *)__pyx_t_13)); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8494; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_11)); __pyx_t_11 = 0; __Pyx_DECREF(((PyObject *)__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_filename = __pyx_f[2]; __pyx_lineno = 8494; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_14 = ((PyArrayObject *)__pyx_t_12); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_rindexer.rcbuffer->pybuffer); __pyx_t_15 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_rindexer.rcbuffer->pybuffer, (PyObject*)__pyx_t_14, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_15 < 0)) { PyErr_Fetch(&__pyx_t_18, &__pyx_t_17, &__pyx_t_16); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_rindexer.rcbuffer->pybuffer, (PyObject*)__pyx_v_rindexer, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_18); Py_XDECREF(__pyx_t_17); Py_XDECREF(__pyx_t_16); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_18, __pyx_t_17, __pyx_t_16); } } __pyx_pybuffernd_rindexer.diminfo[0].strides = __pyx_pybuffernd_rindexer.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_rindexer.diminfo[0].shape = __pyx_pybuffernd_rindexer.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_15 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8494; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_14 = 0; __pyx_v_rindexer = ((PyArrayObject *)__pyx_t_12); __pyx_t_12 = 0; /* "pandas/src/generated.pyx":8495 * lindexer = np.empty(count, dtype=np.int64) * rindexer = np.empty(count, dtype=np.int64) * result = np.empty(count, dtype=np.float32) # <<<<<<<<<<<<<< * * i = 0 */ __pyx_t_12 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8495; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s__empty); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8495; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __pyx_t_12 = PyInt_FromSsize_t(__pyx_v_count); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8495; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __pyx_t_11 = PyTuple_New(1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8495; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_12); __Pyx_GIVEREF(__pyx_t_12); __pyx_t_12 = 0; __pyx_t_12 = PyDict_New(); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8495; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_12)); __pyx_t_9 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8495; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s__float32); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8495; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; if (PyDict_SetItem(__pyx_t_12, ((PyObject *)__pyx_n_s__dtype), __pyx_t_10) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8495; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_t_10 = PyObject_Call(__pyx_t_13, ((PyObject *)__pyx_t_11), ((PyObject *)__pyx_t_12)); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8495; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_11)); __pyx_t_11 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_12)); __pyx_t_12 = 0; if (!(likely(((__pyx_t_10) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_10, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8495; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_19 = ((PyArrayObject *)__pyx_t_10); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __pyx_t_15 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_t_19, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_15 < 0)) { PyErr_Fetch(&__pyx_t_16, &__pyx_t_17, &__pyx_t_18); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_v_result, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_16); Py_XDECREF(__pyx_t_17); Py_XDECREF(__pyx_t_18); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_16, __pyx_t_17, __pyx_t_18); } } __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_15 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8495; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_19 = 0; __pyx_v_result = ((PyArrayObject *)__pyx_t_10); __pyx_t_10 = 0; /* "pandas/src/generated.pyx":8497 * result = np.empty(count, dtype=np.float32) * * i = 0 # <<<<<<<<<<<<<< * j = 0 * count = 0 */ __pyx_v_i = 0; /* "pandas/src/generated.pyx":8498 * * i = 0 * j = 0 # <<<<<<<<<<<<<< * count = 0 * if nleft > 0 and nright > 0: */ __pyx_v_j = 0; /* "pandas/src/generated.pyx":8499 * i = 0 * j = 0 * count = 0 # <<<<<<<<<<<<<< * if nleft > 0 and nright > 0: * while True: */ __pyx_v_count = 0; /* "pandas/src/generated.pyx":8500 * j = 0 * count = 0 * if nleft > 0 and nright > 0: # <<<<<<<<<<<<<< * while True: * if i == nleft: */ __pyx_t_3 = ((__pyx_v_nleft > 0) != 0); if (__pyx_t_3) { __pyx_t_4 = ((__pyx_v_nright > 0) != 0); __pyx_t_2 = __pyx_t_4; } else { __pyx_t_2 = __pyx_t_3; } if (__pyx_t_2) { /* "pandas/src/generated.pyx":8501 * count = 0 * if nleft > 0 and nright > 0: * while True: # <<<<<<<<<<<<<< * if i == nleft: * break */ while (1) { if (!1) break; /* "pandas/src/generated.pyx":8502 * if nleft > 0 and nright > 0: * while True: * if i == nleft: # <<<<<<<<<<<<<< * break * if j == nright: */ __pyx_t_2 = ((__pyx_v_i == __pyx_v_nleft) != 0); if (__pyx_t_2) { /* "pandas/src/generated.pyx":8503 * while True: * if i == nleft: * break # <<<<<<<<<<<<<< * if j == nright: * break */ goto __pyx_L15_break; goto __pyx_L16; } __pyx_L16:; /* "pandas/src/generated.pyx":8504 * if i == nleft: * break * if j == nright: # <<<<<<<<<<<<<< * break * */ __pyx_t_2 = ((__pyx_v_j == __pyx_v_nright) != 0); if (__pyx_t_2) { /* "pandas/src/generated.pyx":8505 * break * if j == nright: * break # <<<<<<<<<<<<<< * * lval = left[i] */ goto __pyx_L15_break; goto __pyx_L17; } __pyx_L17:; /* "pandas/src/generated.pyx":8507 * break * * lval = left[i] # <<<<<<<<<<<<<< * rval = right[j] * if lval == rval: */ __pyx_t_20 = __pyx_v_i; __pyx_v_lval = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_left.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_left.diminfo[0].strides)); /* "pandas/src/generated.pyx":8508 * * lval = left[i] * rval = right[j] # <<<<<<<<<<<<<< * if lval == rval: * lindexer[count] = i */ __pyx_t_21 = __pyx_v_j; __pyx_v_rval = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_right.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_right.diminfo[0].strides)); /* "pandas/src/generated.pyx":8509 * lval = left[i] * rval = right[j] * if lval == rval: # <<<<<<<<<<<<<< * lindexer[count] = i * rindexer[count] = j */ __pyx_t_2 = ((__pyx_v_lval == __pyx_v_rval) != 0); if (__pyx_t_2) { /* "pandas/src/generated.pyx":8510 * rval = right[j] * if lval == rval: * lindexer[count] = i # <<<<<<<<<<<<<< * rindexer[count] = j * result[count] = rval */ __pyx_t_22 = __pyx_v_count; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_lindexer.rcbuffer->pybuffer.buf, __pyx_t_22, __pyx_pybuffernd_lindexer.diminfo[0].strides) = __pyx_v_i; /* "pandas/src/generated.pyx":8511 * if lval == rval: * lindexer[count] = i * rindexer[count] = j # <<<<<<<<<<<<<< * result[count] = rval * count += 1 */ __pyx_t_23 = __pyx_v_count; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_rindexer.rcbuffer->pybuffer.buf, __pyx_t_23, __pyx_pybuffernd_rindexer.diminfo[0].strides) = __pyx_v_j; /* "pandas/src/generated.pyx":8512 * lindexer[count] = i * rindexer[count] = j * result[count] = rval # <<<<<<<<<<<<<< * count += 1 * if i < nleft - 1: */ __pyx_t_24 = __pyx_v_count; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_24, __pyx_pybuffernd_result.diminfo[0].strides) = __pyx_v_rval; /* "pandas/src/generated.pyx":8513 * rindexer[count] = j * result[count] = rval * count += 1 # <<<<<<<<<<<<<< * if i < nleft - 1: * if j < nright - 1 and right[j + 1] == rval: */ __pyx_v_count = (__pyx_v_count + 1); /* "pandas/src/generated.pyx":8514 * result[count] = rval * count += 1 * if i < nleft - 1: # <<<<<<<<<<<<<< * if j < nright - 1 and right[j + 1] == rval: * j += 1 */ __pyx_t_2 = ((__pyx_v_i < (__pyx_v_nleft - 1)) != 0); if (__pyx_t_2) { /* "pandas/src/generated.pyx":8515 * count += 1 * if i < nleft - 1: * if j < nright - 1 and right[j + 1] == rval: # <<<<<<<<<<<<<< * j += 1 * else: */ __pyx_t_2 = ((__pyx_v_j < (__pyx_v_nright - 1)) != 0); if (__pyx_t_2) { __pyx_t_25 = (__pyx_v_j + 1); __pyx_t_3 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_right.rcbuffer->pybuffer.buf, __pyx_t_25, __pyx_pybuffernd_right.diminfo[0].strides)) == __pyx_v_rval) != 0); __pyx_t_4 = __pyx_t_3; } else { __pyx_t_4 = __pyx_t_2; } if (__pyx_t_4) { /* "pandas/src/generated.pyx":8516 * if i < nleft - 1: * if j < nright - 1 and right[j + 1] == rval: * j += 1 # <<<<<<<<<<<<<< * else: * i += 1 */ __pyx_v_j = (__pyx_v_j + 1); goto __pyx_L20; } /*else*/ { /* "pandas/src/generated.pyx":8518 * j += 1 * else: * i += 1 # <<<<<<<<<<<<<< * if left[i] != rval: * j += 1 */ __pyx_v_i = (__pyx_v_i + 1); /* "pandas/src/generated.pyx":8519 * else: * i += 1 * if left[i] != rval: # <<<<<<<<<<<<<< * j += 1 * elif j < nright - 1: */ __pyx_t_26 = __pyx_v_i; __pyx_t_4 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_left.rcbuffer->pybuffer.buf, __pyx_t_26, __pyx_pybuffernd_left.diminfo[0].strides)) != __pyx_v_rval) != 0); if (__pyx_t_4) { /* "pandas/src/generated.pyx":8520 * i += 1 * if left[i] != rval: * j += 1 # <<<<<<<<<<<<<< * elif j < nright - 1: * j += 1 */ __pyx_v_j = (__pyx_v_j + 1); goto __pyx_L21; } __pyx_L21:; } __pyx_L20:; goto __pyx_L19; } /* "pandas/src/generated.pyx":8521 * if left[i] != rval: * j += 1 * elif j < nright - 1: # <<<<<<<<<<<<<< * j += 1 * if lval != right[j]: */ __pyx_t_4 = ((__pyx_v_j < (__pyx_v_nright - 1)) != 0); if (__pyx_t_4) { /* "pandas/src/generated.pyx":8522 * j += 1 * elif j < nright - 1: * j += 1 # <<<<<<<<<<<<<< * if lval != right[j]: * i += 1 */ __pyx_v_j = (__pyx_v_j + 1); /* "pandas/src/generated.pyx":8523 * elif j < nright - 1: * j += 1 * if lval != right[j]: # <<<<<<<<<<<<<< * i += 1 * else: */ __pyx_t_27 = __pyx_v_j; __pyx_t_4 = ((__pyx_v_lval != (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_right.rcbuffer->pybuffer.buf, __pyx_t_27, __pyx_pybuffernd_right.diminfo[0].strides))) != 0); if (__pyx_t_4) { /* "pandas/src/generated.pyx":8524 * j += 1 * if lval != right[j]: * i += 1 # <<<<<<<<<<<<<< * else: * # end of the road */ __pyx_v_i = (__pyx_v_i + 1); goto __pyx_L22; } __pyx_L22:; goto __pyx_L19; } /*else*/ { /* "pandas/src/generated.pyx":8527 * else: * # end of the road * break # <<<<<<<<<<<<<< * elif lval < rval: * i += 1 */ goto __pyx_L15_break; } __pyx_L19:; goto __pyx_L18; } /* "pandas/src/generated.pyx":8528 * # end of the road * break * elif lval < rval: # <<<<<<<<<<<<<< * i += 1 * else: */ __pyx_t_4 = ((__pyx_v_lval < __pyx_v_rval) != 0); if (__pyx_t_4) { /* "pandas/src/generated.pyx":8529 * break * elif lval < rval: * i += 1 # <<<<<<<<<<<<<< * else: * j += 1 */ __pyx_v_i = (__pyx_v_i + 1); goto __pyx_L18; } /*else*/ { /* "pandas/src/generated.pyx":8531 * i += 1 * else: * j += 1 # <<<<<<<<<<<<<< * * return result, lindexer, rindexer */ __pyx_v_j = (__pyx_v_j + 1); } __pyx_L18:; } __pyx_L15_break:; goto __pyx_L13; } __pyx_L13:; /* "pandas/src/generated.pyx":8533 * j += 1 * * return result, lindexer, rindexer # <<<<<<<<<<<<<< * * @cython.wraparound(False) */ __Pyx_XDECREF(__pyx_r); __pyx_t_10 = PyTuple_New(3); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8533; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_INCREF(((PyObject *)__pyx_v_result)); PyTuple_SET_ITEM(__pyx_t_10, 0, ((PyObject *)__pyx_v_result)); __Pyx_GIVEREF(((PyObject *)__pyx_v_result)); __Pyx_INCREF(((PyObject *)__pyx_v_lindexer)); PyTuple_SET_ITEM(__pyx_t_10, 1, ((PyObject *)__pyx_v_lindexer)); __Pyx_GIVEREF(((PyObject *)__pyx_v_lindexer)); __Pyx_INCREF(((PyObject *)__pyx_v_rindexer)); PyTuple_SET_ITEM(__pyx_t_10, 2, ((PyObject *)__pyx_v_rindexer)); __Pyx_GIVEREF(((PyObject *)__pyx_v_rindexer)); __pyx_r = ((PyObject *)__pyx_t_10); __pyx_t_10 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_9); __Pyx_XDECREF(__pyx_t_10); __Pyx_XDECREF(__pyx_t_11); __Pyx_XDECREF(__pyx_t_12); __Pyx_XDECREF(__pyx_t_13); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_left.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_lindexer.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_right.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_rindexer.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.inner_join_indexer_float32", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_left.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_lindexer.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_right.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_rindexer.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_lindexer); __Pyx_XDECREF((PyObject *)__pyx_v_rindexer); __Pyx_XDECREF((PyObject *)__pyx_v_result); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_489inner_join_indexer_object(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6pandas_5algos_488inner_join_indexer_object[] = "\n Two-pass algorithm for monotonic indexes. Handles many-to-one merges\n "; static PyMethodDef __pyx_mdef_6pandas_5algos_489inner_join_indexer_object = {__Pyx_NAMESTR("inner_join_indexer_object"), (PyCFunction)__pyx_pw_6pandas_5algos_489inner_join_indexer_object, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_5algos_488inner_join_indexer_object)}; static PyObject *__pyx_pw_6pandas_5algos_489inner_join_indexer_object(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_left = 0; PyArrayObject *__pyx_v_right = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("inner_join_indexer_object (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__left,&__pyx_n_s__right,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__left)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__right)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("inner_join_indexer_object", 1, 2, 2, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8537; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "inner_join_indexer_object") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8537; __pyx_clineno = __LINE__; goto __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_left = ((PyArrayObject *)values[0]); __pyx_v_right = ((PyArrayObject *)values[1]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("inner_join_indexer_object", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8537; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.inner_join_indexer_object", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_left), __pyx_ptype_5numpy_ndarray, 1, "left", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8537; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_right), __pyx_ptype_5numpy_ndarray, 1, "right", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8538; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_488inner_join_indexer_object(__pyx_self, __pyx_v_left, __pyx_v_right); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":8537 * @cython.wraparound(False) * @cython.boundscheck(False) * def inner_join_indexer_object(ndarray[object] left, # <<<<<<<<<<<<<< * ndarray[object] right): * ''' */ static PyObject *__pyx_pf_6pandas_5algos_488inner_join_indexer_object(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_left, PyArrayObject *__pyx_v_right) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_nright; Py_ssize_t __pyx_v_nleft; Py_ssize_t __pyx_v_count; PyObject *__pyx_v_lval = 0; PyObject *__pyx_v_rval = 0; PyArrayObject *__pyx_v_lindexer = 0; PyArrayObject *__pyx_v_rindexer = 0; PyArrayObject *__pyx_v_result = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_left; __Pyx_Buffer __pyx_pybuffer_left; __Pyx_LocalBuf_ND __pyx_pybuffernd_lindexer; __Pyx_Buffer __pyx_pybuffer_lindexer; __Pyx_LocalBuf_ND __pyx_pybuffernd_result; __Pyx_Buffer __pyx_pybuffer_result; __Pyx_LocalBuf_ND __pyx_pybuffernd_right; __Pyx_Buffer __pyx_pybuffer_right; __Pyx_LocalBuf_ND __pyx_pybuffernd_rindexer; __Pyx_Buffer __pyx_pybuffer_rindexer; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; int __pyx_t_2; int __pyx_t_3; int __pyx_t_4; PyObject *__pyx_t_5 = NULL; Py_ssize_t __pyx_t_6; Py_ssize_t __pyx_t_7; PyObject *__pyx_t_8 = NULL; Py_ssize_t __pyx_t_9; 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; PyObject *__pyx_t_16 = NULL; PyObject *__pyx_t_17 = NULL; PyObject *__pyx_t_18 = NULL; PyArrayObject *__pyx_t_19 = NULL; 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; PyObject **__pyx_t_25; Py_ssize_t __pyx_t_26; Py_ssize_t __pyx_t_27; Py_ssize_t __pyx_t_28; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("inner_join_indexer_object", 0); __pyx_pybuffer_lindexer.pybuffer.buf = NULL; __pyx_pybuffer_lindexer.refcount = 0; __pyx_pybuffernd_lindexer.data = NULL; __pyx_pybuffernd_lindexer.rcbuffer = &__pyx_pybuffer_lindexer; __pyx_pybuffer_rindexer.pybuffer.buf = NULL; __pyx_pybuffer_rindexer.refcount = 0; __pyx_pybuffernd_rindexer.data = NULL; __pyx_pybuffernd_rindexer.rcbuffer = &__pyx_pybuffer_rindexer; __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_left.pybuffer.buf = NULL; __pyx_pybuffer_left.refcount = 0; __pyx_pybuffernd_left.data = NULL; __pyx_pybuffernd_left.rcbuffer = &__pyx_pybuffer_left; __pyx_pybuffer_right.pybuffer.buf = NULL; __pyx_pybuffer_right.refcount = 0; __pyx_pybuffernd_right.data = NULL; __pyx_pybuffernd_right.rcbuffer = &__pyx_pybuffer_right; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_left.rcbuffer->pybuffer, (PyObject*)__pyx_v_left, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8537; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_left.diminfo[0].strides = __pyx_pybuffernd_left.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_left.diminfo[0].shape = __pyx_pybuffernd_left.rcbuffer->pybuffer.shape[0]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_right.rcbuffer->pybuffer, (PyObject*)__pyx_v_right, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8537; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_right.diminfo[0].strides = __pyx_pybuffernd_right.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_right.diminfo[0].shape = __pyx_pybuffernd_right.rcbuffer->pybuffer.shape[0]; /* "pandas/src/generated.pyx":8548 * ndarray[object] result * * nleft = len(left) # <<<<<<<<<<<<<< * nright = len(right) * */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_left)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8548; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_nleft = __pyx_t_1; /* "pandas/src/generated.pyx":8549 * * nleft = len(left) * nright = len(right) # <<<<<<<<<<<<<< * * i = 0 */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_right)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8549; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_nright = __pyx_t_1; /* "pandas/src/generated.pyx":8551 * nright = len(right) * * i = 0 # <<<<<<<<<<<<<< * j = 0 * count = 0 */ __pyx_v_i = 0; /* "pandas/src/generated.pyx":8552 * * i = 0 * j = 0 # <<<<<<<<<<<<<< * count = 0 * if nleft > 0 and nright > 0: */ __pyx_v_j = 0; /* "pandas/src/generated.pyx":8553 * i = 0 * j = 0 * count = 0 # <<<<<<<<<<<<<< * if nleft > 0 and nright > 0: * while True: */ __pyx_v_count = 0; /* "pandas/src/generated.pyx":8554 * j = 0 * count = 0 * if nleft > 0 and nright > 0: # <<<<<<<<<<<<<< * while True: * if i == nleft: */ __pyx_t_2 = ((__pyx_v_nleft > 0) != 0); if (__pyx_t_2) { __pyx_t_3 = ((__pyx_v_nright > 0) != 0); __pyx_t_4 = __pyx_t_3; } else { __pyx_t_4 = __pyx_t_2; } if (__pyx_t_4) { /* "pandas/src/generated.pyx":8555 * count = 0 * if nleft > 0 and nright > 0: * while True: # <<<<<<<<<<<<<< * if i == nleft: * break */ while (1) { if (!1) break; /* "pandas/src/generated.pyx":8556 * if nleft > 0 and nright > 0: * while True: * if i == nleft: # <<<<<<<<<<<<<< * break * if j == nright: */ __pyx_t_4 = ((__pyx_v_i == __pyx_v_nleft) != 0); if (__pyx_t_4) { /* "pandas/src/generated.pyx":8557 * while True: * if i == nleft: * break # <<<<<<<<<<<<<< * if j == nright: * break */ goto __pyx_L5_break; goto __pyx_L6; } __pyx_L6:; /* "pandas/src/generated.pyx":8558 * if i == nleft: * break * if j == nright: # <<<<<<<<<<<<<< * break * */ __pyx_t_4 = ((__pyx_v_j == __pyx_v_nright) != 0); if (__pyx_t_4) { /* "pandas/src/generated.pyx":8559 * break * if j == nright: * break # <<<<<<<<<<<<<< * * lval = left[i] */ goto __pyx_L5_break; goto __pyx_L7; } __pyx_L7:; /* "pandas/src/generated.pyx":8561 * break * * lval = left[i] # <<<<<<<<<<<<<< * rval = right[j] * if lval == rval: */ __pyx_t_1 = __pyx_v_i; __pyx_t_5 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_left.rcbuffer->pybuffer.buf, __pyx_t_1, __pyx_pybuffernd_left.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_5); __Pyx_XDECREF_SET(__pyx_v_lval, __pyx_t_5); __pyx_t_5 = 0; /* "pandas/src/generated.pyx":8562 * * lval = left[i] * rval = right[j] # <<<<<<<<<<<<<< * if lval == rval: * count += 1 */ __pyx_t_6 = __pyx_v_j; __pyx_t_5 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_right.rcbuffer->pybuffer.buf, __pyx_t_6, __pyx_pybuffernd_right.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_5); __Pyx_XDECREF_SET(__pyx_v_rval, __pyx_t_5); __pyx_t_5 = 0; /* "pandas/src/generated.pyx":8563 * lval = left[i] * rval = right[j] * if lval == rval: # <<<<<<<<<<<<<< * count += 1 * if i < nleft - 1: */ __pyx_t_5 = PyObject_RichCompare(__pyx_v_lval, __pyx_v_rval, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8563; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8563; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_4) { /* "pandas/src/generated.pyx":8564 * rval = right[j] * if lval == rval: * count += 1 # <<<<<<<<<<<<<< * if i < nleft - 1: * if j < nright - 1 and right[j + 1] == rval: */ __pyx_v_count = (__pyx_v_count + 1); /* "pandas/src/generated.pyx":8565 * if lval == rval: * count += 1 * if i < nleft - 1: # <<<<<<<<<<<<<< * if j < nright - 1 and right[j + 1] == rval: * j += 1 */ __pyx_t_4 = ((__pyx_v_i < (__pyx_v_nleft - 1)) != 0); if (__pyx_t_4) { /* "pandas/src/generated.pyx":8566 * count += 1 * if i < nleft - 1: * if j < nright - 1 and right[j + 1] == rval: # <<<<<<<<<<<<<< * j += 1 * else: */ __pyx_t_4 = (__pyx_v_j < (__pyx_v_nright - 1)); if (__pyx_t_4) { __pyx_t_7 = (__pyx_v_j + 1); __pyx_t_5 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_right.rcbuffer->pybuffer.buf, __pyx_t_7, __pyx_pybuffernd_right.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_5); __pyx_t_8 = PyObject_RichCompare(__pyx_t_5, __pyx_v_rval, Py_EQ); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8566; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8566; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_3 = __pyx_t_2; } else { __pyx_t_3 = __pyx_t_4; } if (__pyx_t_3) { /* "pandas/src/generated.pyx":8567 * if i < nleft - 1: * if j < nright - 1 and right[j + 1] == rval: * j += 1 # <<<<<<<<<<<<<< * else: * i += 1 */ __pyx_v_j = (__pyx_v_j + 1); goto __pyx_L10; } /*else*/ { /* "pandas/src/generated.pyx":8569 * j += 1 * else: * i += 1 # <<<<<<<<<<<<<< * if left[i] != rval: * j += 1 */ __pyx_v_i = (__pyx_v_i + 1); /* "pandas/src/generated.pyx":8570 * else: * i += 1 * if left[i] != rval: # <<<<<<<<<<<<<< * j += 1 * elif j < nright - 1: */ __pyx_t_9 = __pyx_v_i; __pyx_t_8 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_left.rcbuffer->pybuffer.buf, __pyx_t_9, __pyx_pybuffernd_left.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_8); __pyx_t_5 = PyObject_RichCompare(__pyx_t_8, __pyx_v_rval, Py_NE); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8570; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8570; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_3) { /* "pandas/src/generated.pyx":8571 * i += 1 * if left[i] != rval: * j += 1 # <<<<<<<<<<<<<< * elif j < nright - 1: * j += 1 */ __pyx_v_j = (__pyx_v_j + 1); goto __pyx_L11; } __pyx_L11:; } __pyx_L10:; goto __pyx_L9; } /* "pandas/src/generated.pyx":8572 * if left[i] != rval: * j += 1 * elif j < nright - 1: # <<<<<<<<<<<<<< * j += 1 * if lval != right[j]: */ __pyx_t_3 = ((__pyx_v_j < (__pyx_v_nright - 1)) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":8573 * j += 1 * elif j < nright - 1: * j += 1 # <<<<<<<<<<<<<< * if lval != right[j]: * i += 1 */ __pyx_v_j = (__pyx_v_j + 1); /* "pandas/src/generated.pyx":8574 * elif j < nright - 1: * j += 1 * if lval != right[j]: # <<<<<<<<<<<<<< * i += 1 * else: */ __pyx_t_10 = __pyx_v_j; __pyx_t_5 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_right.rcbuffer->pybuffer.buf, __pyx_t_10, __pyx_pybuffernd_right.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_5); __pyx_t_8 = PyObject_RichCompare(__pyx_v_lval, __pyx_t_5, Py_NE); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8574; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8574; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (__pyx_t_3) { /* "pandas/src/generated.pyx":8575 * j += 1 * if lval != right[j]: * i += 1 # <<<<<<<<<<<<<< * else: * # end of the road */ __pyx_v_i = (__pyx_v_i + 1); goto __pyx_L12; } __pyx_L12:; goto __pyx_L9; } /*else*/ { /* "pandas/src/generated.pyx":8578 * else: * # end of the road * break # <<<<<<<<<<<<<< * elif lval < rval: * i += 1 */ goto __pyx_L5_break; } __pyx_L9:; goto __pyx_L8; } /* "pandas/src/generated.pyx":8579 * # end of the road * break * elif lval < rval: # <<<<<<<<<<<<<< * i += 1 * else: */ __pyx_t_8 = PyObject_RichCompare(__pyx_v_lval, __pyx_v_rval, Py_LT); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8579; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8579; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (__pyx_t_3) { /* "pandas/src/generated.pyx":8580 * break * elif lval < rval: * i += 1 # <<<<<<<<<<<<<< * else: * j += 1 */ __pyx_v_i = (__pyx_v_i + 1); goto __pyx_L8; } /*else*/ { /* "pandas/src/generated.pyx":8582 * i += 1 * else: * j += 1 # <<<<<<<<<<<<<< * * # do it again now that result size is known */ __pyx_v_j = (__pyx_v_j + 1); } __pyx_L8:; } __pyx_L5_break:; goto __pyx_L3; } __pyx_L3:; /* "pandas/src/generated.pyx":8586 * # do it again now that result size is known * * lindexer = np.empty(count, dtype=np.int64) # <<<<<<<<<<<<<< * rindexer = np.empty(count, dtype=np.int64) * result = np.empty(count, dtype=object) */ __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8586; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s__empty); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8586; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_8 = PyInt_FromSsize_t(__pyx_v_count); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8586; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_11 = PyTuple_New(1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8586; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_8); __Pyx_GIVEREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_8 = PyDict_New(); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8586; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_8)); __pyx_t_12 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8586; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s__int64); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8586; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; if (PyDict_SetItem(__pyx_t_8, ((PyObject *)__pyx_n_s__dtype), __pyx_t_13) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8586; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_13 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_11), ((PyObject *)__pyx_t_8)); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8586; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_11)); __pyx_t_11 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0; if (!(likely(((__pyx_t_13) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_13, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8586; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_14 = ((PyArrayObject *)__pyx_t_13); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_lindexer.rcbuffer->pybuffer); __pyx_t_15 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_lindexer.rcbuffer->pybuffer, (PyObject*)__pyx_t_14, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_15 < 0)) { PyErr_Fetch(&__pyx_t_16, &__pyx_t_17, &__pyx_t_18); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_lindexer.rcbuffer->pybuffer, (PyObject*)__pyx_v_lindexer, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_16); Py_XDECREF(__pyx_t_17); Py_XDECREF(__pyx_t_18); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_16, __pyx_t_17, __pyx_t_18); } } __pyx_pybuffernd_lindexer.diminfo[0].strides = __pyx_pybuffernd_lindexer.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_lindexer.diminfo[0].shape = __pyx_pybuffernd_lindexer.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_15 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8586; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_14 = 0; __pyx_v_lindexer = ((PyArrayObject *)__pyx_t_13); __pyx_t_13 = 0; /* "pandas/src/generated.pyx":8587 * * lindexer = np.empty(count, dtype=np.int64) * rindexer = np.empty(count, dtype=np.int64) # <<<<<<<<<<<<<< * result = np.empty(count, dtype=object) * */ __pyx_t_13 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8587; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_13, __pyx_n_s__empty); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8587; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_13 = PyInt_FromSsize_t(__pyx_v_count); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8587; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __pyx_t_11 = PyTuple_New(1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8587; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_13); __Pyx_GIVEREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_13 = PyDict_New(); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8587; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_13)); __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8587; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s__int64); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8587; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_13, ((PyObject *)__pyx_n_s__dtype), __pyx_t_12) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8587; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __pyx_t_12 = PyObject_Call(__pyx_t_8, ((PyObject *)__pyx_t_11), ((PyObject *)__pyx_t_13)); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8587; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_11)); __pyx_t_11 = 0; __Pyx_DECREF(((PyObject *)__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_filename = __pyx_f[2]; __pyx_lineno = 8587; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_14 = ((PyArrayObject *)__pyx_t_12); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_rindexer.rcbuffer->pybuffer); __pyx_t_15 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_rindexer.rcbuffer->pybuffer, (PyObject*)__pyx_t_14, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_15 < 0)) { PyErr_Fetch(&__pyx_t_18, &__pyx_t_17, &__pyx_t_16); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_rindexer.rcbuffer->pybuffer, (PyObject*)__pyx_v_rindexer, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_18); Py_XDECREF(__pyx_t_17); Py_XDECREF(__pyx_t_16); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_18, __pyx_t_17, __pyx_t_16); } } __pyx_pybuffernd_rindexer.diminfo[0].strides = __pyx_pybuffernd_rindexer.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_rindexer.diminfo[0].shape = __pyx_pybuffernd_rindexer.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_15 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8587; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_14 = 0; __pyx_v_rindexer = ((PyArrayObject *)__pyx_t_12); __pyx_t_12 = 0; /* "pandas/src/generated.pyx":8588 * lindexer = np.empty(count, dtype=np.int64) * rindexer = np.empty(count, dtype=np.int64) * result = np.empty(count, dtype=object) # <<<<<<<<<<<<<< * * i = 0 */ __pyx_t_12 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8588; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s__empty); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8588; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __pyx_t_12 = PyInt_FromSsize_t(__pyx_v_count); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8588; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __pyx_t_11 = PyTuple_New(1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8588; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_12); __Pyx_GIVEREF(__pyx_t_12); __pyx_t_12 = 0; __pyx_t_12 = PyDict_New(); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8588; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_12)); if (PyDict_SetItem(__pyx_t_12, ((PyObject *)__pyx_n_s__dtype), __pyx_builtin_object) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8588; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_8 = PyObject_Call(__pyx_t_13, ((PyObject *)__pyx_t_11), ((PyObject *)__pyx_t_12)); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8588; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_11)); __pyx_t_11 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_12)); __pyx_t_12 = 0; if (!(likely(((__pyx_t_8) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_8, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8588; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_19 = ((PyArrayObject *)__pyx_t_8); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __pyx_t_15 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_t_19, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_15 < 0)) { PyErr_Fetch(&__pyx_t_16, &__pyx_t_17, &__pyx_t_18); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_v_result, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_16); Py_XDECREF(__pyx_t_17); Py_XDECREF(__pyx_t_18); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_16, __pyx_t_17, __pyx_t_18); } } __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_15 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8588; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_19 = 0; __pyx_v_result = ((PyArrayObject *)__pyx_t_8); __pyx_t_8 = 0; /* "pandas/src/generated.pyx":8590 * result = np.empty(count, dtype=object) * * i = 0 # <<<<<<<<<<<<<< * j = 0 * count = 0 */ __pyx_v_i = 0; /* "pandas/src/generated.pyx":8591 * * i = 0 * j = 0 # <<<<<<<<<<<<<< * count = 0 * if nleft > 0 and nright > 0: */ __pyx_v_j = 0; /* "pandas/src/generated.pyx":8592 * i = 0 * j = 0 * count = 0 # <<<<<<<<<<<<<< * if nleft > 0 and nright > 0: * while True: */ __pyx_v_count = 0; /* "pandas/src/generated.pyx":8593 * j = 0 * count = 0 * if nleft > 0 and nright > 0: # <<<<<<<<<<<<<< * while True: * if i == nleft: */ __pyx_t_3 = ((__pyx_v_nleft > 0) != 0); if (__pyx_t_3) { __pyx_t_4 = ((__pyx_v_nright > 0) != 0); __pyx_t_2 = __pyx_t_4; } else { __pyx_t_2 = __pyx_t_3; } if (__pyx_t_2) { /* "pandas/src/generated.pyx":8594 * count = 0 * if nleft > 0 and nright > 0: * while True: # <<<<<<<<<<<<<< * if i == nleft: * break */ while (1) { if (!1) break; /* "pandas/src/generated.pyx":8595 * if nleft > 0 and nright > 0: * while True: * if i == nleft: # <<<<<<<<<<<<<< * break * if j == nright: */ __pyx_t_2 = ((__pyx_v_i == __pyx_v_nleft) != 0); if (__pyx_t_2) { /* "pandas/src/generated.pyx":8596 * while True: * if i == nleft: * break # <<<<<<<<<<<<<< * if j == nright: * break */ goto __pyx_L15_break; goto __pyx_L16; } __pyx_L16:; /* "pandas/src/generated.pyx":8597 * if i == nleft: * break * if j == nright: # <<<<<<<<<<<<<< * break * */ __pyx_t_2 = ((__pyx_v_j == __pyx_v_nright) != 0); if (__pyx_t_2) { /* "pandas/src/generated.pyx":8598 * break * if j == nright: * break # <<<<<<<<<<<<<< * * lval = left[i] */ goto __pyx_L15_break; goto __pyx_L17; } __pyx_L17:; /* "pandas/src/generated.pyx":8600 * break * * lval = left[i] # <<<<<<<<<<<<<< * rval = right[j] * if lval == rval: */ __pyx_t_20 = __pyx_v_i; __pyx_t_8 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_left.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_left.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_8); __Pyx_XDECREF_SET(__pyx_v_lval, __pyx_t_8); __pyx_t_8 = 0; /* "pandas/src/generated.pyx":8601 * * lval = left[i] * rval = right[j] # <<<<<<<<<<<<<< * if lval == rval: * lindexer[count] = i */ __pyx_t_21 = __pyx_v_j; __pyx_t_8 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_right.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_right.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_8); __Pyx_XDECREF_SET(__pyx_v_rval, __pyx_t_8); __pyx_t_8 = 0; /* "pandas/src/generated.pyx":8602 * lval = left[i] * rval = right[j] * if lval == rval: # <<<<<<<<<<<<<< * lindexer[count] = i * rindexer[count] = j */ __pyx_t_8 = PyObject_RichCompare(__pyx_v_lval, __pyx_v_rval, Py_EQ); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8602; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8602; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (__pyx_t_2) { /* "pandas/src/generated.pyx":8603 * rval = right[j] * if lval == rval: * lindexer[count] = i # <<<<<<<<<<<<<< * rindexer[count] = j * result[count] = rval */ __pyx_t_22 = __pyx_v_count; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_lindexer.rcbuffer->pybuffer.buf, __pyx_t_22, __pyx_pybuffernd_lindexer.diminfo[0].strides) = __pyx_v_i; /* "pandas/src/generated.pyx":8604 * if lval == rval: * lindexer[count] = i * rindexer[count] = j # <<<<<<<<<<<<<< * result[count] = rval * count += 1 */ __pyx_t_23 = __pyx_v_count; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_rindexer.rcbuffer->pybuffer.buf, __pyx_t_23, __pyx_pybuffernd_rindexer.diminfo[0].strides) = __pyx_v_j; /* "pandas/src/generated.pyx":8605 * lindexer[count] = i * rindexer[count] = j * result[count] = rval # <<<<<<<<<<<<<< * count += 1 * if i < nleft - 1: */ __pyx_t_24 = __pyx_v_count; __pyx_t_25 = __Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_24, __pyx_pybuffernd_result.diminfo[0].strides); __Pyx_GOTREF(*__pyx_t_25); __Pyx_INCREF(__pyx_v_rval); __Pyx_DECREF(*__pyx_t_25); *__pyx_t_25 = __pyx_v_rval; __Pyx_GIVEREF(*__pyx_t_25); /* "pandas/src/generated.pyx":8606 * rindexer[count] = j * result[count] = rval * count += 1 # <<<<<<<<<<<<<< * if i < nleft - 1: * if j < nright - 1 and right[j + 1] == rval: */ __pyx_v_count = (__pyx_v_count + 1); /* "pandas/src/generated.pyx":8607 * result[count] = rval * count += 1 * if i < nleft - 1: # <<<<<<<<<<<<<< * if j < nright - 1 and right[j + 1] == rval: * j += 1 */ __pyx_t_2 = ((__pyx_v_i < (__pyx_v_nleft - 1)) != 0); if (__pyx_t_2) { /* "pandas/src/generated.pyx":8608 * count += 1 * if i < nleft - 1: * if j < nright - 1 and right[j + 1] == rval: # <<<<<<<<<<<<<< * j += 1 * else: */ __pyx_t_2 = (__pyx_v_j < (__pyx_v_nright - 1)); if (__pyx_t_2) { __pyx_t_26 = (__pyx_v_j + 1); __pyx_t_8 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_right.rcbuffer->pybuffer.buf, __pyx_t_26, __pyx_pybuffernd_right.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_8); __pyx_t_12 = PyObject_RichCompare(__pyx_t_8, __pyx_v_rval, Py_EQ); __Pyx_XGOTREF(__pyx_t_12); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8608; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_12); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8608; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __pyx_t_4 = __pyx_t_3; } else { __pyx_t_4 = __pyx_t_2; } if (__pyx_t_4) { /* "pandas/src/generated.pyx":8609 * if i < nleft - 1: * if j < nright - 1 and right[j + 1] == rval: * j += 1 # <<<<<<<<<<<<<< * else: * i += 1 */ __pyx_v_j = (__pyx_v_j + 1); goto __pyx_L20; } /*else*/ { /* "pandas/src/generated.pyx":8611 * j += 1 * else: * i += 1 # <<<<<<<<<<<<<< * if left[i] != rval: * j += 1 */ __pyx_v_i = (__pyx_v_i + 1); /* "pandas/src/generated.pyx":8612 * else: * i += 1 * if left[i] != rval: # <<<<<<<<<<<<<< * j += 1 * elif j < nright - 1: */ __pyx_t_27 = __pyx_v_i; __pyx_t_12 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_left.rcbuffer->pybuffer.buf, __pyx_t_27, __pyx_pybuffernd_left.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_12); __pyx_t_8 = PyObject_RichCompare(__pyx_t_12, __pyx_v_rval, Py_NE); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8612; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8612; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (__pyx_t_4) { /* "pandas/src/generated.pyx":8613 * i += 1 * if left[i] != rval: * j += 1 # <<<<<<<<<<<<<< * elif j < nright - 1: * j += 1 */ __pyx_v_j = (__pyx_v_j + 1); goto __pyx_L21; } __pyx_L21:; } __pyx_L20:; goto __pyx_L19; } /* "pandas/src/generated.pyx":8614 * if left[i] != rval: * j += 1 * elif j < nright - 1: # <<<<<<<<<<<<<< * j += 1 * if lval != right[j]: */ __pyx_t_4 = ((__pyx_v_j < (__pyx_v_nright - 1)) != 0); if (__pyx_t_4) { /* "pandas/src/generated.pyx":8615 * j += 1 * elif j < nright - 1: * j += 1 # <<<<<<<<<<<<<< * if lval != right[j]: * i += 1 */ __pyx_v_j = (__pyx_v_j + 1); /* "pandas/src/generated.pyx":8616 * elif j < nright - 1: * j += 1 * if lval != right[j]: # <<<<<<<<<<<<<< * i += 1 * else: */ __pyx_t_28 = __pyx_v_j; __pyx_t_8 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_right.rcbuffer->pybuffer.buf, __pyx_t_28, __pyx_pybuffernd_right.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_8); __pyx_t_12 = PyObject_RichCompare(__pyx_v_lval, __pyx_t_8, Py_NE); __Pyx_XGOTREF(__pyx_t_12); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8616; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_12); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8616; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; if (__pyx_t_4) { /* "pandas/src/generated.pyx":8617 * j += 1 * if lval != right[j]: * i += 1 # <<<<<<<<<<<<<< * else: * # end of the road */ __pyx_v_i = (__pyx_v_i + 1); goto __pyx_L22; } __pyx_L22:; goto __pyx_L19; } /*else*/ { /* "pandas/src/generated.pyx":8620 * else: * # end of the road * break # <<<<<<<<<<<<<< * elif lval < rval: * i += 1 */ goto __pyx_L15_break; } __pyx_L19:; goto __pyx_L18; } /* "pandas/src/generated.pyx":8621 * # end of the road * break * elif lval < rval: # <<<<<<<<<<<<<< * i += 1 * else: */ __pyx_t_12 = PyObject_RichCompare(__pyx_v_lval, __pyx_v_rval, Py_LT); __Pyx_XGOTREF(__pyx_t_12); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8621; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_12); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8621; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; if (__pyx_t_4) { /* "pandas/src/generated.pyx":8622 * break * elif lval < rval: * i += 1 # <<<<<<<<<<<<<< * else: * j += 1 */ __pyx_v_i = (__pyx_v_i + 1); goto __pyx_L18; } /*else*/ { /* "pandas/src/generated.pyx":8624 * i += 1 * else: * j += 1 # <<<<<<<<<<<<<< * * return result, lindexer, rindexer */ __pyx_v_j = (__pyx_v_j + 1); } __pyx_L18:; } __pyx_L15_break:; goto __pyx_L13; } __pyx_L13:; /* "pandas/src/generated.pyx":8626 * j += 1 * * return result, lindexer, rindexer # <<<<<<<<<<<<<< * * @cython.wraparound(False) */ __Pyx_XDECREF(__pyx_r); __pyx_t_12 = PyTuple_New(3); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8626; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __Pyx_INCREF(((PyObject *)__pyx_v_result)); PyTuple_SET_ITEM(__pyx_t_12, 0, ((PyObject *)__pyx_v_result)); __Pyx_GIVEREF(((PyObject *)__pyx_v_result)); __Pyx_INCREF(((PyObject *)__pyx_v_lindexer)); PyTuple_SET_ITEM(__pyx_t_12, 1, ((PyObject *)__pyx_v_lindexer)); __Pyx_GIVEREF(((PyObject *)__pyx_v_lindexer)); __Pyx_INCREF(((PyObject *)__pyx_v_rindexer)); PyTuple_SET_ITEM(__pyx_t_12, 2, ((PyObject *)__pyx_v_rindexer)); __Pyx_GIVEREF(((PyObject *)__pyx_v_rindexer)); __pyx_r = ((PyObject *)__pyx_t_12); __pyx_t_12 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_11); __Pyx_XDECREF(__pyx_t_12); __Pyx_XDECREF(__pyx_t_13); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_left.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_lindexer.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_right.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_rindexer.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.inner_join_indexer_object", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_left.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_lindexer.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_right.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_rindexer.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF(__pyx_v_lval); __Pyx_XDECREF(__pyx_v_rval); __Pyx_XDECREF((PyObject *)__pyx_v_lindexer); __Pyx_XDECREF((PyObject *)__pyx_v_rindexer); __Pyx_XDECREF((PyObject *)__pyx_v_result); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_491inner_join_indexer_int32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6pandas_5algos_490inner_join_indexer_int32[] = "\n Two-pass algorithm for monotonic indexes. Handles many-to-one merges\n "; static PyMethodDef __pyx_mdef_6pandas_5algos_491inner_join_indexer_int32 = {__Pyx_NAMESTR("inner_join_indexer_int32"), (PyCFunction)__pyx_pw_6pandas_5algos_491inner_join_indexer_int32, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_5algos_490inner_join_indexer_int32)}; static PyObject *__pyx_pw_6pandas_5algos_491inner_join_indexer_int32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_left = 0; PyArrayObject *__pyx_v_right = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("inner_join_indexer_int32 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__left,&__pyx_n_s__right,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__left)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__right)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("inner_join_indexer_int32", 1, 2, 2, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8630; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "inner_join_indexer_int32") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8630; __pyx_clineno = __LINE__; goto __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_left = ((PyArrayObject *)values[0]); __pyx_v_right = ((PyArrayObject *)values[1]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("inner_join_indexer_int32", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8630; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.inner_join_indexer_int32", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_left), __pyx_ptype_5numpy_ndarray, 1, "left", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8630; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_right), __pyx_ptype_5numpy_ndarray, 1, "right", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8631; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_490inner_join_indexer_int32(__pyx_self, __pyx_v_left, __pyx_v_right); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":8630 * @cython.wraparound(False) * @cython.boundscheck(False) * def inner_join_indexer_int32(ndarray[int32_t] left, # <<<<<<<<<<<<<< * ndarray[int32_t] right): * ''' */ static PyObject *__pyx_pf_6pandas_5algos_490inner_join_indexer_int32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_left, PyArrayObject *__pyx_v_right) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_nright; Py_ssize_t __pyx_v_nleft; Py_ssize_t __pyx_v_count; __pyx_t_5numpy_int32_t __pyx_v_lval; __pyx_t_5numpy_int32_t __pyx_v_rval; PyArrayObject *__pyx_v_lindexer = 0; PyArrayObject *__pyx_v_rindexer = 0; PyArrayObject *__pyx_v_result = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_left; __Pyx_Buffer __pyx_pybuffer_left; __Pyx_LocalBuf_ND __pyx_pybuffernd_lindexer; __Pyx_Buffer __pyx_pybuffer_lindexer; __Pyx_LocalBuf_ND __pyx_pybuffernd_result; __Pyx_Buffer __pyx_pybuffer_result; __Pyx_LocalBuf_ND __pyx_pybuffernd_right; __Pyx_Buffer __pyx_pybuffer_right; __Pyx_LocalBuf_ND __pyx_pybuffernd_rindexer; __Pyx_Buffer __pyx_pybuffer_rindexer; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; int __pyx_t_2; int __pyx_t_3; int __pyx_t_4; Py_ssize_t __pyx_t_5; Py_ssize_t __pyx_t_6; Py_ssize_t __pyx_t_7; Py_ssize_t __pyx_t_8; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; PyObject *__pyx_t_11 = NULL; PyObject *__pyx_t_12 = NULL; PyObject *__pyx_t_13 = NULL; PyArrayObject *__pyx_t_14 = NULL; int __pyx_t_15; PyObject *__pyx_t_16 = NULL; PyObject *__pyx_t_17 = NULL; PyObject *__pyx_t_18 = NULL; PyArrayObject *__pyx_t_19 = NULL; 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("inner_join_indexer_int32", 0); __pyx_pybuffer_lindexer.pybuffer.buf = NULL; __pyx_pybuffer_lindexer.refcount = 0; __pyx_pybuffernd_lindexer.data = NULL; __pyx_pybuffernd_lindexer.rcbuffer = &__pyx_pybuffer_lindexer; __pyx_pybuffer_rindexer.pybuffer.buf = NULL; __pyx_pybuffer_rindexer.refcount = 0; __pyx_pybuffernd_rindexer.data = NULL; __pyx_pybuffernd_rindexer.rcbuffer = &__pyx_pybuffer_rindexer; __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_left.pybuffer.buf = NULL; __pyx_pybuffer_left.refcount = 0; __pyx_pybuffernd_left.data = NULL; __pyx_pybuffernd_left.rcbuffer = &__pyx_pybuffer_left; __pyx_pybuffer_right.pybuffer.buf = NULL; __pyx_pybuffer_right.refcount = 0; __pyx_pybuffernd_right.data = NULL; __pyx_pybuffernd_right.rcbuffer = &__pyx_pybuffer_right; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_left.rcbuffer->pybuffer, (PyObject*)__pyx_v_left, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8630; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_left.diminfo[0].strides = __pyx_pybuffernd_left.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_left.diminfo[0].shape = __pyx_pybuffernd_left.rcbuffer->pybuffer.shape[0]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_right.rcbuffer->pybuffer, (PyObject*)__pyx_v_right, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8630; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_right.diminfo[0].strides = __pyx_pybuffernd_right.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_right.diminfo[0].shape = __pyx_pybuffernd_right.rcbuffer->pybuffer.shape[0]; /* "pandas/src/generated.pyx":8641 * ndarray[int32_t] result * * nleft = len(left) # <<<<<<<<<<<<<< * nright = len(right) * */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_left)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8641; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_nleft = __pyx_t_1; /* "pandas/src/generated.pyx":8642 * * nleft = len(left) * nright = len(right) # <<<<<<<<<<<<<< * * i = 0 */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_right)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8642; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_nright = __pyx_t_1; /* "pandas/src/generated.pyx":8644 * nright = len(right) * * i = 0 # <<<<<<<<<<<<<< * j = 0 * count = 0 */ __pyx_v_i = 0; /* "pandas/src/generated.pyx":8645 * * i = 0 * j = 0 # <<<<<<<<<<<<<< * count = 0 * if nleft > 0 and nright > 0: */ __pyx_v_j = 0; /* "pandas/src/generated.pyx":8646 * i = 0 * j = 0 * count = 0 # <<<<<<<<<<<<<< * if nleft > 0 and nright > 0: * while True: */ __pyx_v_count = 0; /* "pandas/src/generated.pyx":8647 * j = 0 * count = 0 * if nleft > 0 and nright > 0: # <<<<<<<<<<<<<< * while True: * if i == nleft: */ __pyx_t_2 = ((__pyx_v_nleft > 0) != 0); if (__pyx_t_2) { __pyx_t_3 = ((__pyx_v_nright > 0) != 0); __pyx_t_4 = __pyx_t_3; } else { __pyx_t_4 = __pyx_t_2; } if (__pyx_t_4) { /* "pandas/src/generated.pyx":8648 * count = 0 * if nleft > 0 and nright > 0: * while True: # <<<<<<<<<<<<<< * if i == nleft: * break */ while (1) { if (!1) break; /* "pandas/src/generated.pyx":8649 * if nleft > 0 and nright > 0: * while True: * if i == nleft: # <<<<<<<<<<<<<< * break * if j == nright: */ __pyx_t_4 = ((__pyx_v_i == __pyx_v_nleft) != 0); if (__pyx_t_4) { /* "pandas/src/generated.pyx":8650 * while True: * if i == nleft: * break # <<<<<<<<<<<<<< * if j == nright: * break */ goto __pyx_L5_break; goto __pyx_L6; } __pyx_L6:; /* "pandas/src/generated.pyx":8651 * if i == nleft: * break * if j == nright: # <<<<<<<<<<<<<< * break * */ __pyx_t_4 = ((__pyx_v_j == __pyx_v_nright) != 0); if (__pyx_t_4) { /* "pandas/src/generated.pyx":8652 * break * if j == nright: * break # <<<<<<<<<<<<<< * * lval = left[i] */ goto __pyx_L5_break; goto __pyx_L7; } __pyx_L7:; /* "pandas/src/generated.pyx":8654 * break * * lval = left[i] # <<<<<<<<<<<<<< * rval = right[j] * if lval == rval: */ __pyx_t_1 = __pyx_v_i; __pyx_v_lval = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_left.rcbuffer->pybuffer.buf, __pyx_t_1, __pyx_pybuffernd_left.diminfo[0].strides)); /* "pandas/src/generated.pyx":8655 * * lval = left[i] * rval = right[j] # <<<<<<<<<<<<<< * if lval == rval: * count += 1 */ __pyx_t_5 = __pyx_v_j; __pyx_v_rval = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_right.rcbuffer->pybuffer.buf, __pyx_t_5, __pyx_pybuffernd_right.diminfo[0].strides)); /* "pandas/src/generated.pyx":8656 * lval = left[i] * rval = right[j] * if lval == rval: # <<<<<<<<<<<<<< * count += 1 * if i < nleft - 1: */ __pyx_t_4 = ((__pyx_v_lval == __pyx_v_rval) != 0); if (__pyx_t_4) { /* "pandas/src/generated.pyx":8657 * rval = right[j] * if lval == rval: * count += 1 # <<<<<<<<<<<<<< * if i < nleft - 1: * if j < nright - 1 and right[j + 1] == rval: */ __pyx_v_count = (__pyx_v_count + 1); /* "pandas/src/generated.pyx":8658 * if lval == rval: * count += 1 * if i < nleft - 1: # <<<<<<<<<<<<<< * if j < nright - 1 and right[j + 1] == rval: * j += 1 */ __pyx_t_4 = ((__pyx_v_i < (__pyx_v_nleft - 1)) != 0); if (__pyx_t_4) { /* "pandas/src/generated.pyx":8659 * count += 1 * if i < nleft - 1: * if j < nright - 1 and right[j + 1] == rval: # <<<<<<<<<<<<<< * j += 1 * else: */ __pyx_t_4 = ((__pyx_v_j < (__pyx_v_nright - 1)) != 0); if (__pyx_t_4) { __pyx_t_6 = (__pyx_v_j + 1); __pyx_t_2 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_right.rcbuffer->pybuffer.buf, __pyx_t_6, __pyx_pybuffernd_right.diminfo[0].strides)) == __pyx_v_rval) != 0); __pyx_t_3 = __pyx_t_2; } else { __pyx_t_3 = __pyx_t_4; } if (__pyx_t_3) { /* "pandas/src/generated.pyx":8660 * if i < nleft - 1: * if j < nright - 1 and right[j + 1] == rval: * j += 1 # <<<<<<<<<<<<<< * else: * i += 1 */ __pyx_v_j = (__pyx_v_j + 1); goto __pyx_L10; } /*else*/ { /* "pandas/src/generated.pyx":8662 * j += 1 * else: * i += 1 # <<<<<<<<<<<<<< * if left[i] != rval: * j += 1 */ __pyx_v_i = (__pyx_v_i + 1); /* "pandas/src/generated.pyx":8663 * else: * i += 1 * if left[i] != rval: # <<<<<<<<<<<<<< * j += 1 * elif j < nright - 1: */ __pyx_t_7 = __pyx_v_i; __pyx_t_3 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_left.rcbuffer->pybuffer.buf, __pyx_t_7, __pyx_pybuffernd_left.diminfo[0].strides)) != __pyx_v_rval) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":8664 * i += 1 * if left[i] != rval: * j += 1 # <<<<<<<<<<<<<< * elif j < nright - 1: * j += 1 */ __pyx_v_j = (__pyx_v_j + 1); goto __pyx_L11; } __pyx_L11:; } __pyx_L10:; goto __pyx_L9; } /* "pandas/src/generated.pyx":8665 * if left[i] != rval: * j += 1 * elif j < nright - 1: # <<<<<<<<<<<<<< * j += 1 * if lval != right[j]: */ __pyx_t_3 = ((__pyx_v_j < (__pyx_v_nright - 1)) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":8666 * j += 1 * elif j < nright - 1: * j += 1 # <<<<<<<<<<<<<< * if lval != right[j]: * i += 1 */ __pyx_v_j = (__pyx_v_j + 1); /* "pandas/src/generated.pyx":8667 * elif j < nright - 1: * j += 1 * if lval != right[j]: # <<<<<<<<<<<<<< * i += 1 * else: */ __pyx_t_8 = __pyx_v_j; __pyx_t_3 = ((__pyx_v_lval != (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_right.rcbuffer->pybuffer.buf, __pyx_t_8, __pyx_pybuffernd_right.diminfo[0].strides))) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":8668 * j += 1 * if lval != right[j]: * i += 1 # <<<<<<<<<<<<<< * else: * # end of the road */ __pyx_v_i = (__pyx_v_i + 1); goto __pyx_L12; } __pyx_L12:; goto __pyx_L9; } /*else*/ { /* "pandas/src/generated.pyx":8671 * else: * # end of the road * break # <<<<<<<<<<<<<< * elif lval < rval: * i += 1 */ goto __pyx_L5_break; } __pyx_L9:; goto __pyx_L8; } /* "pandas/src/generated.pyx":8672 * # end of the road * break * elif lval < rval: # <<<<<<<<<<<<<< * i += 1 * else: */ __pyx_t_3 = ((__pyx_v_lval < __pyx_v_rval) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":8673 * break * elif lval < rval: * i += 1 # <<<<<<<<<<<<<< * else: * j += 1 */ __pyx_v_i = (__pyx_v_i + 1); goto __pyx_L8; } /*else*/ { /* "pandas/src/generated.pyx":8675 * i += 1 * else: * j += 1 # <<<<<<<<<<<<<< * * # do it again now that result size is known */ __pyx_v_j = (__pyx_v_j + 1); } __pyx_L8:; } __pyx_L5_break:; goto __pyx_L3; } __pyx_L3:; /* "pandas/src/generated.pyx":8679 * # do it again now that result size is known * * lindexer = np.empty(count, dtype=np.int64) # <<<<<<<<<<<<<< * rindexer = np.empty(count, dtype=np.int64) * result = np.empty(count, dtype=np.int32) */ __pyx_t_9 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8679; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s__empty); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8679; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_9 = PyInt_FromSsize_t(__pyx_v_count); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8679; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_t_11 = PyTuple_New(1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8679; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_9); __Pyx_GIVEREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_9 = PyDict_New(); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8679; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_9)); __pyx_t_12 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8679; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s__int64); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8679; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; if (PyDict_SetItem(__pyx_t_9, ((PyObject *)__pyx_n_s__dtype), __pyx_t_13) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8679; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_13 = PyObject_Call(__pyx_t_10, ((PyObject *)__pyx_t_11), ((PyObject *)__pyx_t_9)); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8679; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_11)); __pyx_t_11 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_9)); __pyx_t_9 = 0; if (!(likely(((__pyx_t_13) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_13, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8679; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_14 = ((PyArrayObject *)__pyx_t_13); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_lindexer.rcbuffer->pybuffer); __pyx_t_15 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_lindexer.rcbuffer->pybuffer, (PyObject*)__pyx_t_14, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_15 < 0)) { PyErr_Fetch(&__pyx_t_16, &__pyx_t_17, &__pyx_t_18); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_lindexer.rcbuffer->pybuffer, (PyObject*)__pyx_v_lindexer, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_16); Py_XDECREF(__pyx_t_17); Py_XDECREF(__pyx_t_18); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_16, __pyx_t_17, __pyx_t_18); } } __pyx_pybuffernd_lindexer.diminfo[0].strides = __pyx_pybuffernd_lindexer.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_lindexer.diminfo[0].shape = __pyx_pybuffernd_lindexer.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_15 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8679; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_14 = 0; __pyx_v_lindexer = ((PyArrayObject *)__pyx_t_13); __pyx_t_13 = 0; /* "pandas/src/generated.pyx":8680 * * lindexer = np.empty(count, dtype=np.int64) * rindexer = np.empty(count, dtype=np.int64) # <<<<<<<<<<<<<< * result = np.empty(count, dtype=np.int32) * */ __pyx_t_13 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8680; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_13, __pyx_n_s__empty); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8680; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_13 = PyInt_FromSsize_t(__pyx_v_count); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8680; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __pyx_t_11 = PyTuple_New(1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8680; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_13); __Pyx_GIVEREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_13 = PyDict_New(); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8680; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_13)); __pyx_t_10 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8680; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s__int64); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8680; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; if (PyDict_SetItem(__pyx_t_13, ((PyObject *)__pyx_n_s__dtype), __pyx_t_12) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8680; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __pyx_t_12 = PyObject_Call(__pyx_t_9, ((PyObject *)__pyx_t_11), ((PyObject *)__pyx_t_13)); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8680; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_11)); __pyx_t_11 = 0; __Pyx_DECREF(((PyObject *)__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_filename = __pyx_f[2]; __pyx_lineno = 8680; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_14 = ((PyArrayObject *)__pyx_t_12); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_rindexer.rcbuffer->pybuffer); __pyx_t_15 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_rindexer.rcbuffer->pybuffer, (PyObject*)__pyx_t_14, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_15 < 0)) { PyErr_Fetch(&__pyx_t_18, &__pyx_t_17, &__pyx_t_16); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_rindexer.rcbuffer->pybuffer, (PyObject*)__pyx_v_rindexer, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_18); Py_XDECREF(__pyx_t_17); Py_XDECREF(__pyx_t_16); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_18, __pyx_t_17, __pyx_t_16); } } __pyx_pybuffernd_rindexer.diminfo[0].strides = __pyx_pybuffernd_rindexer.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_rindexer.diminfo[0].shape = __pyx_pybuffernd_rindexer.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_15 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8680; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_14 = 0; __pyx_v_rindexer = ((PyArrayObject *)__pyx_t_12); __pyx_t_12 = 0; /* "pandas/src/generated.pyx":8681 * lindexer = np.empty(count, dtype=np.int64) * rindexer = np.empty(count, dtype=np.int64) * result = np.empty(count, dtype=np.int32) # <<<<<<<<<<<<<< * * i = 0 */ __pyx_t_12 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8681; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s__empty); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8681; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __pyx_t_12 = PyInt_FromSsize_t(__pyx_v_count); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8681; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __pyx_t_11 = PyTuple_New(1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8681; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_12); __Pyx_GIVEREF(__pyx_t_12); __pyx_t_12 = 0; __pyx_t_12 = PyDict_New(); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8681; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_12)); __pyx_t_9 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8681; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s__int32); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8681; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; if (PyDict_SetItem(__pyx_t_12, ((PyObject *)__pyx_n_s__dtype), __pyx_t_10) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8681; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_t_10 = PyObject_Call(__pyx_t_13, ((PyObject *)__pyx_t_11), ((PyObject *)__pyx_t_12)); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8681; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_11)); __pyx_t_11 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_12)); __pyx_t_12 = 0; if (!(likely(((__pyx_t_10) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_10, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8681; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_19 = ((PyArrayObject *)__pyx_t_10); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __pyx_t_15 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_t_19, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_15 < 0)) { PyErr_Fetch(&__pyx_t_16, &__pyx_t_17, &__pyx_t_18); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_v_result, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_16); Py_XDECREF(__pyx_t_17); Py_XDECREF(__pyx_t_18); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_16, __pyx_t_17, __pyx_t_18); } } __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_15 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8681; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_19 = 0; __pyx_v_result = ((PyArrayObject *)__pyx_t_10); __pyx_t_10 = 0; /* "pandas/src/generated.pyx":8683 * result = np.empty(count, dtype=np.int32) * * i = 0 # <<<<<<<<<<<<<< * j = 0 * count = 0 */ __pyx_v_i = 0; /* "pandas/src/generated.pyx":8684 * * i = 0 * j = 0 # <<<<<<<<<<<<<< * count = 0 * if nleft > 0 and nright > 0: */ __pyx_v_j = 0; /* "pandas/src/generated.pyx":8685 * i = 0 * j = 0 * count = 0 # <<<<<<<<<<<<<< * if nleft > 0 and nright > 0: * while True: */ __pyx_v_count = 0; /* "pandas/src/generated.pyx":8686 * j = 0 * count = 0 * if nleft > 0 and nright > 0: # <<<<<<<<<<<<<< * while True: * if i == nleft: */ __pyx_t_3 = ((__pyx_v_nleft > 0) != 0); if (__pyx_t_3) { __pyx_t_4 = ((__pyx_v_nright > 0) != 0); __pyx_t_2 = __pyx_t_4; } else { __pyx_t_2 = __pyx_t_3; } if (__pyx_t_2) { /* "pandas/src/generated.pyx":8687 * count = 0 * if nleft > 0 and nright > 0: * while True: # <<<<<<<<<<<<<< * if i == nleft: * break */ while (1) { if (!1) break; /* "pandas/src/generated.pyx":8688 * if nleft > 0 and nright > 0: * while True: * if i == nleft: # <<<<<<<<<<<<<< * break * if j == nright: */ __pyx_t_2 = ((__pyx_v_i == __pyx_v_nleft) != 0); if (__pyx_t_2) { /* "pandas/src/generated.pyx":8689 * while True: * if i == nleft: * break # <<<<<<<<<<<<<< * if j == nright: * break */ goto __pyx_L15_break; goto __pyx_L16; } __pyx_L16:; /* "pandas/src/generated.pyx":8690 * if i == nleft: * break * if j == nright: # <<<<<<<<<<<<<< * break * */ __pyx_t_2 = ((__pyx_v_j == __pyx_v_nright) != 0); if (__pyx_t_2) { /* "pandas/src/generated.pyx":8691 * break * if j == nright: * break # <<<<<<<<<<<<<< * * lval = left[i] */ goto __pyx_L15_break; goto __pyx_L17; } __pyx_L17:; /* "pandas/src/generated.pyx":8693 * break * * lval = left[i] # <<<<<<<<<<<<<< * rval = right[j] * if lval == rval: */ __pyx_t_20 = __pyx_v_i; __pyx_v_lval = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_left.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_left.diminfo[0].strides)); /* "pandas/src/generated.pyx":8694 * * lval = left[i] * rval = right[j] # <<<<<<<<<<<<<< * if lval == rval: * lindexer[count] = i */ __pyx_t_21 = __pyx_v_j; __pyx_v_rval = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_right.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_right.diminfo[0].strides)); /* "pandas/src/generated.pyx":8695 * lval = left[i] * rval = right[j] * if lval == rval: # <<<<<<<<<<<<<< * lindexer[count] = i * rindexer[count] = j */ __pyx_t_2 = ((__pyx_v_lval == __pyx_v_rval) != 0); if (__pyx_t_2) { /* "pandas/src/generated.pyx":8696 * rval = right[j] * if lval == rval: * lindexer[count] = i # <<<<<<<<<<<<<< * rindexer[count] = j * result[count] = rval */ __pyx_t_22 = __pyx_v_count; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_lindexer.rcbuffer->pybuffer.buf, __pyx_t_22, __pyx_pybuffernd_lindexer.diminfo[0].strides) = __pyx_v_i; /* "pandas/src/generated.pyx":8697 * if lval == rval: * lindexer[count] = i * rindexer[count] = j # <<<<<<<<<<<<<< * result[count] = rval * count += 1 */ __pyx_t_23 = __pyx_v_count; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_rindexer.rcbuffer->pybuffer.buf, __pyx_t_23, __pyx_pybuffernd_rindexer.diminfo[0].strides) = __pyx_v_j; /* "pandas/src/generated.pyx":8698 * lindexer[count] = i * rindexer[count] = j * result[count] = rval # <<<<<<<<<<<<<< * count += 1 * if i < nleft - 1: */ __pyx_t_24 = __pyx_v_count; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_24, __pyx_pybuffernd_result.diminfo[0].strides) = __pyx_v_rval; /* "pandas/src/generated.pyx":8699 * rindexer[count] = j * result[count] = rval * count += 1 # <<<<<<<<<<<<<< * if i < nleft - 1: * if j < nright - 1 and right[j + 1] == rval: */ __pyx_v_count = (__pyx_v_count + 1); /* "pandas/src/generated.pyx":8700 * result[count] = rval * count += 1 * if i < nleft - 1: # <<<<<<<<<<<<<< * if j < nright - 1 and right[j + 1] == rval: * j += 1 */ __pyx_t_2 = ((__pyx_v_i < (__pyx_v_nleft - 1)) != 0); if (__pyx_t_2) { /* "pandas/src/generated.pyx":8701 * count += 1 * if i < nleft - 1: * if j < nright - 1 and right[j + 1] == rval: # <<<<<<<<<<<<<< * j += 1 * else: */ __pyx_t_2 = ((__pyx_v_j < (__pyx_v_nright - 1)) != 0); if (__pyx_t_2) { __pyx_t_25 = (__pyx_v_j + 1); __pyx_t_3 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_right.rcbuffer->pybuffer.buf, __pyx_t_25, __pyx_pybuffernd_right.diminfo[0].strides)) == __pyx_v_rval) != 0); __pyx_t_4 = __pyx_t_3; } else { __pyx_t_4 = __pyx_t_2; } if (__pyx_t_4) { /* "pandas/src/generated.pyx":8702 * if i < nleft - 1: * if j < nright - 1 and right[j + 1] == rval: * j += 1 # <<<<<<<<<<<<<< * else: * i += 1 */ __pyx_v_j = (__pyx_v_j + 1); goto __pyx_L20; } /*else*/ { /* "pandas/src/generated.pyx":8704 * j += 1 * else: * i += 1 # <<<<<<<<<<<<<< * if left[i] != rval: * j += 1 */ __pyx_v_i = (__pyx_v_i + 1); /* "pandas/src/generated.pyx":8705 * else: * i += 1 * if left[i] != rval: # <<<<<<<<<<<<<< * j += 1 * elif j < nright - 1: */ __pyx_t_26 = __pyx_v_i; __pyx_t_4 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_left.rcbuffer->pybuffer.buf, __pyx_t_26, __pyx_pybuffernd_left.diminfo[0].strides)) != __pyx_v_rval) != 0); if (__pyx_t_4) { /* "pandas/src/generated.pyx":8706 * i += 1 * if left[i] != rval: * j += 1 # <<<<<<<<<<<<<< * elif j < nright - 1: * j += 1 */ __pyx_v_j = (__pyx_v_j + 1); goto __pyx_L21; } __pyx_L21:; } __pyx_L20:; goto __pyx_L19; } /* "pandas/src/generated.pyx":8707 * if left[i] != rval: * j += 1 * elif j < nright - 1: # <<<<<<<<<<<<<< * j += 1 * if lval != right[j]: */ __pyx_t_4 = ((__pyx_v_j < (__pyx_v_nright - 1)) != 0); if (__pyx_t_4) { /* "pandas/src/generated.pyx":8708 * j += 1 * elif j < nright - 1: * j += 1 # <<<<<<<<<<<<<< * if lval != right[j]: * i += 1 */ __pyx_v_j = (__pyx_v_j + 1); /* "pandas/src/generated.pyx":8709 * elif j < nright - 1: * j += 1 * if lval != right[j]: # <<<<<<<<<<<<<< * i += 1 * else: */ __pyx_t_27 = __pyx_v_j; __pyx_t_4 = ((__pyx_v_lval != (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_right.rcbuffer->pybuffer.buf, __pyx_t_27, __pyx_pybuffernd_right.diminfo[0].strides))) != 0); if (__pyx_t_4) { /* "pandas/src/generated.pyx":8710 * j += 1 * if lval != right[j]: * i += 1 # <<<<<<<<<<<<<< * else: * # end of the road */ __pyx_v_i = (__pyx_v_i + 1); goto __pyx_L22; } __pyx_L22:; goto __pyx_L19; } /*else*/ { /* "pandas/src/generated.pyx":8713 * else: * # end of the road * break # <<<<<<<<<<<<<< * elif lval < rval: * i += 1 */ goto __pyx_L15_break; } __pyx_L19:; goto __pyx_L18; } /* "pandas/src/generated.pyx":8714 * # end of the road * break * elif lval < rval: # <<<<<<<<<<<<<< * i += 1 * else: */ __pyx_t_4 = ((__pyx_v_lval < __pyx_v_rval) != 0); if (__pyx_t_4) { /* "pandas/src/generated.pyx":8715 * break * elif lval < rval: * i += 1 # <<<<<<<<<<<<<< * else: * j += 1 */ __pyx_v_i = (__pyx_v_i + 1); goto __pyx_L18; } /*else*/ { /* "pandas/src/generated.pyx":8717 * i += 1 * else: * j += 1 # <<<<<<<<<<<<<< * * return result, lindexer, rindexer */ __pyx_v_j = (__pyx_v_j + 1); } __pyx_L18:; } __pyx_L15_break:; goto __pyx_L13; } __pyx_L13:; /* "pandas/src/generated.pyx":8719 * j += 1 * * return result, lindexer, rindexer # <<<<<<<<<<<<<< * * @cython.wraparound(False) */ __Pyx_XDECREF(__pyx_r); __pyx_t_10 = PyTuple_New(3); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8719; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_INCREF(((PyObject *)__pyx_v_result)); PyTuple_SET_ITEM(__pyx_t_10, 0, ((PyObject *)__pyx_v_result)); __Pyx_GIVEREF(((PyObject *)__pyx_v_result)); __Pyx_INCREF(((PyObject *)__pyx_v_lindexer)); PyTuple_SET_ITEM(__pyx_t_10, 1, ((PyObject *)__pyx_v_lindexer)); __Pyx_GIVEREF(((PyObject *)__pyx_v_lindexer)); __Pyx_INCREF(((PyObject *)__pyx_v_rindexer)); PyTuple_SET_ITEM(__pyx_t_10, 2, ((PyObject *)__pyx_v_rindexer)); __Pyx_GIVEREF(((PyObject *)__pyx_v_rindexer)); __pyx_r = ((PyObject *)__pyx_t_10); __pyx_t_10 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_9); __Pyx_XDECREF(__pyx_t_10); __Pyx_XDECREF(__pyx_t_11); __Pyx_XDECREF(__pyx_t_12); __Pyx_XDECREF(__pyx_t_13); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_left.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_lindexer.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_right.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_rindexer.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.inner_join_indexer_int32", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_left.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_lindexer.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_right.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_rindexer.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_lindexer); __Pyx_XDECREF((PyObject *)__pyx_v_rindexer); __Pyx_XDECREF((PyObject *)__pyx_v_result); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5algos_493inner_join_indexer_int64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6pandas_5algos_492inner_join_indexer_int64[] = "\n Two-pass algorithm for monotonic indexes. Handles many-to-one merges\n "; static PyMethodDef __pyx_mdef_6pandas_5algos_493inner_join_indexer_int64 = {__Pyx_NAMESTR("inner_join_indexer_int64"), (PyCFunction)__pyx_pw_6pandas_5algos_493inner_join_indexer_int64, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_5algos_492inner_join_indexer_int64)}; static PyObject *__pyx_pw_6pandas_5algos_493inner_join_indexer_int64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_left = 0; PyArrayObject *__pyx_v_right = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("inner_join_indexer_int64 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__left,&__pyx_n_s__right,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__left)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__right)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("inner_join_indexer_int64", 1, 2, 2, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8723; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "inner_join_indexer_int64") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8723; __pyx_clineno = __LINE__; goto __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_left = ((PyArrayObject *)values[0]); __pyx_v_right = ((PyArrayObject *)values[1]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("inner_join_indexer_int64", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8723; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.algos.inner_join_indexer_int64", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_left), __pyx_ptype_5numpy_ndarray, 1, "left", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8723; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_right), __pyx_ptype_5numpy_ndarray, 1, "right", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8724; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5algos_492inner_join_indexer_int64(__pyx_self, __pyx_v_left, __pyx_v_right); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/src/generated.pyx":8723 * @cython.wraparound(False) * @cython.boundscheck(False) * def inner_join_indexer_int64(ndarray[int64_t] left, # <<<<<<<<<<<<<< * ndarray[int64_t] right): * ''' */ static PyObject *__pyx_pf_6pandas_5algos_492inner_join_indexer_int64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_left, PyArrayObject *__pyx_v_right) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_nright; Py_ssize_t __pyx_v_nleft; Py_ssize_t __pyx_v_count; __pyx_t_5numpy_int64_t __pyx_v_lval; __pyx_t_5numpy_int64_t __pyx_v_rval; PyArrayObject *__pyx_v_lindexer = 0; PyArrayObject *__pyx_v_rindexer = 0; PyArrayObject *__pyx_v_result = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_left; __Pyx_Buffer __pyx_pybuffer_left; __Pyx_LocalBuf_ND __pyx_pybuffernd_lindexer; __Pyx_Buffer __pyx_pybuffer_lindexer; __Pyx_LocalBuf_ND __pyx_pybuffernd_result; __Pyx_Buffer __pyx_pybuffer_result; __Pyx_LocalBuf_ND __pyx_pybuffernd_right; __Pyx_Buffer __pyx_pybuffer_right; __Pyx_LocalBuf_ND __pyx_pybuffernd_rindexer; __Pyx_Buffer __pyx_pybuffer_rindexer; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; int __pyx_t_2; int __pyx_t_3; int __pyx_t_4; Py_ssize_t __pyx_t_5; Py_ssize_t __pyx_t_6; Py_ssize_t __pyx_t_7; Py_ssize_t __pyx_t_8; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; PyObject *__pyx_t_11 = NULL; PyObject *__pyx_t_12 = NULL; PyObject *__pyx_t_13 = NULL; PyArrayObject *__pyx_t_14 = NULL; int __pyx_t_15; PyObject *__pyx_t_16 = NULL; PyObject *__pyx_t_17 = NULL; PyObject *__pyx_t_18 = NULL; PyArrayObject *__pyx_t_19 = NULL; 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("inner_join_indexer_int64", 0); __pyx_pybuffer_lindexer.pybuffer.buf = NULL; __pyx_pybuffer_lindexer.refcount = 0; __pyx_pybuffernd_lindexer.data = NULL; __pyx_pybuffernd_lindexer.rcbuffer = &__pyx_pybuffer_lindexer; __pyx_pybuffer_rindexer.pybuffer.buf = NULL; __pyx_pybuffer_rindexer.refcount = 0; __pyx_pybuffernd_rindexer.data = NULL; __pyx_pybuffernd_rindexer.rcbuffer = &__pyx_pybuffer_rindexer; __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_left.pybuffer.buf = NULL; __pyx_pybuffer_left.refcount = 0; __pyx_pybuffernd_left.data = NULL; __pyx_pybuffernd_left.rcbuffer = &__pyx_pybuffer_left; __pyx_pybuffer_right.pybuffer.buf = NULL; __pyx_pybuffer_right.refcount = 0; __pyx_pybuffernd_right.data = NULL; __pyx_pybuffernd_right.rcbuffer = &__pyx_pybuffer_right; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_left.rcbuffer->pybuffer, (PyObject*)__pyx_v_left, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8723; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_left.diminfo[0].strides = __pyx_pybuffernd_left.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_left.diminfo[0].shape = __pyx_pybuffernd_left.rcbuffer->pybuffer.shape[0]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_right.rcbuffer->pybuffer, (PyObject*)__pyx_v_right, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8723; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_right.diminfo[0].strides = __pyx_pybuffernd_right.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_right.diminfo[0].shape = __pyx_pybuffernd_right.rcbuffer->pybuffer.shape[0]; /* "pandas/src/generated.pyx":8734 * ndarray[int64_t] result * * nleft = len(left) # <<<<<<<<<<<<<< * nright = len(right) * */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_left)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8734; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_nleft = __pyx_t_1; /* "pandas/src/generated.pyx":8735 * * nleft = len(left) * nright = len(right) # <<<<<<<<<<<<<< * * i = 0 */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_right)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8735; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_nright = __pyx_t_1; /* "pandas/src/generated.pyx":8737 * nright = len(right) * * i = 0 # <<<<<<<<<<<<<< * j = 0 * count = 0 */ __pyx_v_i = 0; /* "pandas/src/generated.pyx":8738 * * i = 0 * j = 0 # <<<<<<<<<<<<<< * count = 0 * if nleft > 0 and nright > 0: */ __pyx_v_j = 0; /* "pandas/src/generated.pyx":8739 * i = 0 * j = 0 * count = 0 # <<<<<<<<<<<<<< * if nleft > 0 and nright > 0: * while True: */ __pyx_v_count = 0; /* "pandas/src/generated.pyx":8740 * j = 0 * count = 0 * if nleft > 0 and nright > 0: # <<<<<<<<<<<<<< * while True: * if i == nleft: */ __pyx_t_2 = ((__pyx_v_nleft > 0) != 0); if (__pyx_t_2) { __pyx_t_3 = ((__pyx_v_nright > 0) != 0); __pyx_t_4 = __pyx_t_3; } else { __pyx_t_4 = __pyx_t_2; } if (__pyx_t_4) { /* "pandas/src/generated.pyx":8741 * count = 0 * if nleft > 0 and nright > 0: * while True: # <<<<<<<<<<<<<< * if i == nleft: * break */ while (1) { if (!1) break; /* "pandas/src/generated.pyx":8742 * if nleft > 0 and nright > 0: * while True: * if i == nleft: # <<<<<<<<<<<<<< * break * if j == nright: */ __pyx_t_4 = ((__pyx_v_i == __pyx_v_nleft) != 0); if (__pyx_t_4) { /* "pandas/src/generated.pyx":8743 * while True: * if i == nleft: * break # <<<<<<<<<<<<<< * if j == nright: * break */ goto __pyx_L5_break; goto __pyx_L6; } __pyx_L6:; /* "pandas/src/generated.pyx":8744 * if i == nleft: * break * if j == nright: # <<<<<<<<<<<<<< * break * */ __pyx_t_4 = ((__pyx_v_j == __pyx_v_nright) != 0); if (__pyx_t_4) { /* "pandas/src/generated.pyx":8745 * break * if j == nright: * break # <<<<<<<<<<<<<< * * lval = left[i] */ goto __pyx_L5_break; goto __pyx_L7; } __pyx_L7:; /* "pandas/src/generated.pyx":8747 * break * * lval = left[i] # <<<<<<<<<<<<<< * rval = right[j] * if lval == rval: */ __pyx_t_1 = __pyx_v_i; __pyx_v_lval = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_left.rcbuffer->pybuffer.buf, __pyx_t_1, __pyx_pybuffernd_left.diminfo[0].strides)); /* "pandas/src/generated.pyx":8748 * * lval = left[i] * rval = right[j] # <<<<<<<<<<<<<< * if lval == rval: * count += 1 */ __pyx_t_5 = __pyx_v_j; __pyx_v_rval = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_right.rcbuffer->pybuffer.buf, __pyx_t_5, __pyx_pybuffernd_right.diminfo[0].strides)); /* "pandas/src/generated.pyx":8749 * lval = left[i] * rval = right[j] * if lval == rval: # <<<<<<<<<<<<<< * count += 1 * if i < nleft - 1: */ __pyx_t_4 = ((__pyx_v_lval == __pyx_v_rval) != 0); if (__pyx_t_4) { /* "pandas/src/generated.pyx":8750 * rval = right[j] * if lval == rval: * count += 1 # <<<<<<<<<<<<<< * if i < nleft - 1: * if j < nright - 1 and right[j + 1] == rval: */ __pyx_v_count = (__pyx_v_count + 1); /* "pandas/src/generated.pyx":8751 * if lval == rval: * count += 1 * if i < nleft - 1: # <<<<<<<<<<<<<< * if j < nright - 1 and right[j + 1] == rval: * j += 1 */ __pyx_t_4 = ((__pyx_v_i < (__pyx_v_nleft - 1)) != 0); if (__pyx_t_4) { /* "pandas/src/generated.pyx":8752 * count += 1 * if i < nleft - 1: * if j < nright - 1 and right[j + 1] == rval: # <<<<<<<<<<<<<< * j += 1 * else: */ __pyx_t_4 = ((__pyx_v_j < (__pyx_v_nright - 1)) != 0); if (__pyx_t_4) { __pyx_t_6 = (__pyx_v_j + 1); __pyx_t_2 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_right.rcbuffer->pybuffer.buf, __pyx_t_6, __pyx_pybuffernd_right.diminfo[0].strides)) == __pyx_v_rval) != 0); __pyx_t_3 = __pyx_t_2; } else { __pyx_t_3 = __pyx_t_4; } if (__pyx_t_3) { /* "pandas/src/generated.pyx":8753 * if i < nleft - 1: * if j < nright - 1 and right[j + 1] == rval: * j += 1 # <<<<<<<<<<<<<< * else: * i += 1 */ __pyx_v_j = (__pyx_v_j + 1); goto __pyx_L10; } /*else*/ { /* "pandas/src/generated.pyx":8755 * j += 1 * else: * i += 1 # <<<<<<<<<<<<<< * if left[i] != rval: * j += 1 */ __pyx_v_i = (__pyx_v_i + 1); /* "pandas/src/generated.pyx":8756 * else: * i += 1 * if left[i] != rval: # <<<<<<<<<<<<<< * j += 1 * elif j < nright - 1: */ __pyx_t_7 = __pyx_v_i; __pyx_t_3 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_left.rcbuffer->pybuffer.buf, __pyx_t_7, __pyx_pybuffernd_left.diminfo[0].strides)) != __pyx_v_rval) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":8757 * i += 1 * if left[i] != rval: * j += 1 # <<<<<<<<<<<<<< * elif j < nright - 1: * j += 1 */ __pyx_v_j = (__pyx_v_j + 1); goto __pyx_L11; } __pyx_L11:; } __pyx_L10:; goto __pyx_L9; } /* "pandas/src/generated.pyx":8758 * if left[i] != rval: * j += 1 * elif j < nright - 1: # <<<<<<<<<<<<<< * j += 1 * if lval != right[j]: */ __pyx_t_3 = ((__pyx_v_j < (__pyx_v_nright - 1)) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":8759 * j += 1 * elif j < nright - 1: * j += 1 # <<<<<<<<<<<<<< * if lval != right[j]: * i += 1 */ __pyx_v_j = (__pyx_v_j + 1); /* "pandas/src/generated.pyx":8760 * elif j < nright - 1: * j += 1 * if lval != right[j]: # <<<<<<<<<<<<<< * i += 1 * else: */ __pyx_t_8 = __pyx_v_j; __pyx_t_3 = ((__pyx_v_lval != (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_right.rcbuffer->pybuffer.buf, __pyx_t_8, __pyx_pybuffernd_right.diminfo[0].strides))) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":8761 * j += 1 * if lval != right[j]: * i += 1 # <<<<<<<<<<<<<< * else: * # end of the road */ __pyx_v_i = (__pyx_v_i + 1); goto __pyx_L12; } __pyx_L12:; goto __pyx_L9; } /*else*/ { /* "pandas/src/generated.pyx":8764 * else: * # end of the road * break # <<<<<<<<<<<<<< * elif lval < rval: * i += 1 */ goto __pyx_L5_break; } __pyx_L9:; goto __pyx_L8; } /* "pandas/src/generated.pyx":8765 * # end of the road * break * elif lval < rval: # <<<<<<<<<<<<<< * i += 1 * else: */ __pyx_t_3 = ((__pyx_v_lval < __pyx_v_rval) != 0); if (__pyx_t_3) { /* "pandas/src/generated.pyx":8766 * break * elif lval < rval: * i += 1 # <<<<<<<<<<<<<< * else: * j += 1 */ __pyx_v_i = (__pyx_v_i + 1); goto __pyx_L8; } /*else*/ { /* "pandas/src/generated.pyx":8768 * i += 1 * else: * j += 1 # <<<<<<<<<<<<<< * * # do it again now that result size is known */ __pyx_v_j = (__pyx_v_j + 1); } __pyx_L8:; } __pyx_L5_break:; goto __pyx_L3; } __pyx_L3:; /* "pandas/src/generated.pyx":8772 * # do it again now that result size is known * * lindexer = np.empty(count, dtype=np.int64) # <<<<<<<<<<<<<< * rindexer = np.empty(count, dtype=np.int64) * result = np.empty(count, dtype=np.int64) */ __pyx_t_9 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8772; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s__empty); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8772; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_9 = PyInt_FromSsize_t(__pyx_v_count); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8772; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_t_11 = PyTuple_New(1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8772; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_9); __Pyx_GIVEREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_9 = PyDict_New(); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8772; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_9)); __pyx_t_12 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8772; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s__int64); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8772; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; if (PyDict_SetItem(__pyx_t_9, ((PyObject *)__pyx_n_s__dtype), __pyx_t_13) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8772; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_13 = PyObject_Call(__pyx_t_10, ((PyObject *)__pyx_t_11), ((PyObject *)__pyx_t_9)); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8772; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_11)); __pyx_t_11 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_9)); __pyx_t_9 = 0; if (!(likely(((__pyx_t_13) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_13, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8772; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_14 = ((PyArrayObject *)__pyx_t_13); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_lindexer.rcbuffer->pybuffer); __pyx_t_15 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_lindexer.rcbuffer->pybuffer, (PyObject*)__pyx_t_14, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_15 < 0)) { PyErr_Fetch(&__pyx_t_16, &__pyx_t_17, &__pyx_t_18); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_lindexer.rcbuffer->pybuffer, (PyObject*)__pyx_v_lindexer, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_16); Py_XDECREF(__pyx_t_17); Py_XDECREF(__pyx_t_18); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_16, __pyx_t_17, __pyx_t_18); } } __pyx_pybuffernd_lindexer.diminfo[0].strides = __pyx_pybuffernd_lindexer.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_lindexer.diminfo[0].shape = __pyx_pybuffernd_lindexer.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_15 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8772; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_14 = 0; __pyx_v_lindexer = ((PyArrayObject *)__pyx_t_13); __pyx_t_13 = 0; /* "pandas/src/generated.pyx":8773 * * lindexer = np.empty(count, dtype=np.int64) * rindexer = np.empty(count, dtype=np.int64) # <<<<<<<<<<<<<< * result = np.empty(count, dtype=np.int64) * */ __pyx_t_13 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8773; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_13, __pyx_n_s__empty); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8773; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_13 = PyInt_FromSsize_t(__pyx_v_count); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8773; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __pyx_t_11 = PyTuple_New(1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8773; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_13); __Pyx_GIVEREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_13 = PyDict_New(); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8773; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_13)); __pyx_t_10 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8773; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s__int64); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8773; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; if (PyDict_SetItem(__pyx_t_13, ((PyObject *)__pyx_n_s__dtype), __pyx_t_12) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8773; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __pyx_t_12 = PyObject_Call(__pyx_t_9, ((PyObject *)__pyx_t_11), ((PyObject *)__pyx_t_13)); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8773; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_11)); __pyx_t_11 = 0; __Pyx_DECREF(((PyObject *)__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_filename = __pyx_f[2]; __pyx_lineno = 8773; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_14 = ((PyArrayObject *)__pyx_t_12); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_rindexer.rcbuffer->pybuffer); __pyx_t_15 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_rindexer.rcbuffer->pybuffer, (PyObject*)__pyx_t_14, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_15 < 0)) { PyErr_Fetch(&__pyx_t_18, &__pyx_t_17, &__pyx_t_16); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_rindexer.rcbuffer->pybuffer, (PyObject*)__pyx_v_rindexer, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_18); Py_XDECREF(__pyx_t_17); Py_XDECREF(__pyx_t_16); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_18, __pyx_t_17, __pyx_t_16); } } __pyx_pybuffernd_rindexer.diminfo[0].strides = __pyx_pybuffernd_rindexer.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_rindexer.diminfo[0].shape = __pyx_pybuffernd_rindexer.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_15 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8773; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_14 = 0; __pyx_v_rindexer = ((PyArrayObject *)__pyx_t_12); __pyx_t_12 = 0; /* "pandas/src/generated.pyx":8774 * lindexer = np.empty(count, dtype=np.int64) * rindexer = np.empty(count, dtype=np.int64) * result = np.empty(count, dtype=np.int64) # <<<<<<<<<<<<<< * * i = 0 */ __pyx_t_12 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8774; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s__empty); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8774; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __pyx_t_12 = PyInt_FromSsize_t(__pyx_v_count); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8774; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __pyx_t_11 = PyTuple_New(1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8774; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_12); __Pyx_GIVEREF(__pyx_t_12); __pyx_t_12 = 0; __pyx_t_12 = PyDict_New(); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8774; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_12)); __pyx_t_9 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8774; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s__int64); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8774; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; if (PyDict_SetItem(__pyx_t_12, ((PyObject *)__pyx_n_s__dtype), __pyx_t_10) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8774; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_t_10 = PyObject_Call(__pyx_t_13, ((PyObject *)__pyx_t_11), ((PyObject *)__pyx_t_12)); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8774; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_11)); __pyx_t_11 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_12)); __pyx_t_12 = 0; if (!(likely(((__pyx_t_10) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_10, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8774; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_19 = ((PyArrayObject *)__pyx_t_10); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __pyx_t_15 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_t_19, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_15 < 0)) { PyErr_Fetch(&__pyx_t_16, &__pyx_t_17, &__pyx_t_18); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_v_result, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_16); Py_XDECREF(__pyx_t_17); Py_XDECREF(__pyx_t_18); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_16, __pyx_t_17, __pyx_t_18); } } __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_15 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8774; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_19 = 0; __pyx_v_result = ((PyArrayObject *)__pyx_t_10); __pyx_t_10 = 0; /* "pandas/src/generated.pyx":8776 * result = np.empty(count, dtype=np.int64) * * i = 0 # <<<<<<<<<<<<<< * j = 0 * count = 0 */ __pyx_v_i = 0; /* "pandas/src/generated.pyx":8777 * * i = 0 * j = 0 # <<<<<<<<<<<<<< * count = 0 * if nleft > 0 and nright > 0: */ __pyx_v_j = 0; /* "pandas/src/generated.pyx":8778 * i = 0 * j = 0 * count = 0 # <<<<<<<<<<<<<< * if nleft > 0 and nright > 0: * while True: */ __pyx_v_count = 0; /* "pandas/src/generated.pyx":8779 * j = 0 * count = 0 * if nleft > 0 and nright > 0: # <<<<<<<<<<<<<< * while True: * if i == nleft: */ __pyx_t_3 = ((__pyx_v_nleft > 0) != 0); if (__pyx_t_3) { __pyx_t_4 = ((__pyx_v_nright > 0) != 0); __pyx_t_2 = __pyx_t_4; } else { __pyx_t_2 = __pyx_t_3; } if (__pyx_t_2) { /* "pandas/src/generated.pyx":8780 * count = 0 * if nleft > 0 and nright > 0: * while True: # <<<<<<<<<<<<<< * if i == nleft: * break */ while (1) { if (!1) break; /* "pandas/src/generated.pyx":8781 * if nleft > 0 and nright > 0: * while True: * if i == nleft: # <<<<<<<<<<<<<< * break * if j == nright: */ __pyx_t_2 = ((__pyx_v_i == __pyx_v_nleft) != 0); if (__pyx_t_2) { /* "pandas/src/generated.pyx":8782 * while True: * if i == nleft: * break # <<<<<<<<<<<<<< * if j == nright: * break */ goto __pyx_L15_break; goto __pyx_L16; } __pyx_L16:; /* "pandas/src/generated.pyx":8783 * if i == nleft: * break * if j == nright: # <<<<<<<<<<<<<< * break * */ __pyx_t_2 = ((__pyx_v_j == __pyx_v_nright) != 0); if (__pyx_t_2) { /* "pandas/src/generated.pyx":8784 * break * if j == nright: * break # <<<<<<<<<<<<<< * * lval = left[i] */ goto __pyx_L15_break; goto __pyx_L17; } __pyx_L17:; /* "pandas/src/generated.pyx":8786 * break * * lval = left[i] # <<<<<<<<<<<<<< * rval = right[j] * if lval == rval: */ __pyx_t_20 = __pyx_v_i; __pyx_v_lval = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_left.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_left.diminfo[0].strides)); /* "pandas/src/generated.pyx":8787 * * lval = left[i] * rval = right[j] # <<<<<<<<<<<<<< * if lval == rval: * lindexer[count] = i */ __pyx_t_21 = __pyx_v_j; __pyx_v_rval = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_right.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_right.diminfo[0].strides)); /* "pandas/src/generated.pyx":8788 * lval = left[i] * rval = right[j] * if lval == rval: # <<<<<<<<<<<<<< * lindexer[count] = i * rindexer[count] = j */ __pyx_t_2 = ((__pyx_v_lval == __pyx_v_rval) != 0); if (__pyx_t_2) { /* "pandas/src/generated.pyx":8789 * rval = right[j] * if lval == rval: * lindexer[count] = i # <<<<<<<<<<<<<< * rindexer[count] = j * result[count] = rval */ __pyx_t_22 = __pyx_v_count; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_lindexer.rcbuffer->pybuffer.buf, __pyx_t_22, __pyx_pybuffernd_lindexer.diminfo[0].strides) = __pyx_v_i; /* "pandas/src/generated.pyx":8790 * if lval == rval: * lindexer[count] = i * rindexer[count] = j # <<<<<<<<<<<<<< * result[count] = rval * count += 1 */ __pyx_t_23 = __pyx_v_count; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_rindexer.rcbuffer->pybuffer.buf, __pyx_t_23, __pyx_pybuffernd_rindexer.diminfo[0].strides) = __pyx_v_j; /* "pandas/src/generated.pyx":8791 * lindexer[count] = i * rindexer[count] = j * result[count] = rval # <<<<<<<<<<<<<< * count += 1 * if i < nleft - 1: */ __pyx_t_24 = __pyx_v_count; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_24, __pyx_pybuffernd_result.diminfo[0].strides) = __pyx_v_rval; /* "pandas/src/generated.pyx":8792 * rindexer[count] = j * result[count] = rval * count += 1 # <<<<<<<<<<<<<< * if i < nleft - 1: * if j < nright - 1 and right[j + 1] == rval: */ __pyx_v_count = (__pyx_v_count + 1); /* "pandas/src/generated.pyx":8793 * result[count] = rval * count += 1 * if i < nleft - 1: # <<<<<<<<<<<<<< * if j < nright - 1 and right[j + 1] == rval: * j += 1 */ __pyx_t_2 = ((__pyx_v_i < (__pyx_v_nleft - 1)) != 0); if (__pyx_t_2) { /* "pandas/src/generated.pyx":8794 * count += 1 * if i < nleft - 1: * if j < nright - 1 and right[j + 1] == rval: # <<<<<<<<<<<<<< * j += 1 * else: */ __pyx_t_2 = ((__pyx_v_j < (__pyx_v_nright - 1)) != 0); if (__pyx_t_2) { __pyx_t_25 = (__pyx_v_j + 1); __pyx_t_3 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_right.rcbuffer->pybuffer.buf, __pyx_t_25, __pyx_pybuffernd_right.diminfo[0].strides)) == __pyx_v_rval) != 0); __pyx_t_4 = __pyx_t_3; } else { __pyx_t_4 = __pyx_t_2; } if (__pyx_t_4) { /* "pandas/src/generated.pyx":8795 * if i < nleft - 1: * if j < nright - 1 and right[j + 1] == rval: * j += 1 # <<<<<<<<<<<<<< * else: * i += 1 */ __pyx_v_j = (__pyx_v_j + 1); goto __pyx_L20; } /*else*/ { /* "pandas/src/generated.pyx":8797 * j += 1 * else: * i += 1 # <<<<<<<<<<<<<< * if left[i] != rval: * j += 1 */ __pyx_v_i = (__pyx_v_i + 1); /* "pandas/src/generated.pyx":8798 * else: * i += 1 * if left[i] != rval: # <<<<<<<<<<<<<< * j += 1 * elif j < nright - 1: */ __pyx_t_26 = __pyx_v_i; __pyx_t_4 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_left.rcbuffer->pybuffer.buf, __pyx_t_26, __pyx_pybuffernd_left.diminfo[0].strides)) != __pyx_v_rval) != 0); if (__pyx_t_4) { /* "pandas/src/generated.pyx":8799 * i += 1 * if left[i] != rval: * j += 1 # <<<<<<<<<<<<<< * elif j < nright - 1: * j += 1 */ __pyx_v_j = (__pyx_v_j + 1); goto __pyx_L21; } __pyx_L21:; } __pyx_L20:; goto __pyx_L19; } /* "pandas/src/generated.pyx":8800 * if left[i] != rval: * j += 1 * elif j < nright - 1: # <<<<<<<<<<<<<< * j += 1 * if lval != right[j]: */ __pyx_t_4 = ((__pyx_v_j < (__pyx_v_nright - 1)) != 0); if (__pyx_t_4) { /* "pandas/src/generated.pyx":8801 * j += 1 * elif j < nright - 1: * j += 1 # <<<<<<<<<<<<<< * if lval != right[j]: * i += 1 */ __pyx_v_j = (__pyx_v_j + 1); /* "pandas/src/generated.pyx":8802 * elif j < nright - 1: * j += 1 * if lval != right[j]: # <<<<<<<<<<<<<< * i += 1 * else: */ __pyx_t_27 = __pyx_v_j; __pyx_t_4 = ((__pyx_v_lval != (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_right.rcbuffer->pybuffer.buf, __pyx_t_27, __pyx_pybuffernd_right.diminfo[0].strides))) != 0); if (__pyx_t_4) { /* "pandas/src/generated.pyx":8803 * j += 1 * if lval != right[j]: * i += 1 # <<<<<<<<<<<<<< * else: * # end of the road */ __pyx_v_i = (__pyx_v_i + 1); goto __pyx_L22; } __pyx_L22:; goto __pyx_L19; } /*else*/ { /* "pandas/src/generated.pyx":8806 * else: * # end of the road * break # <<<<<<<<<<<<<< * elif lval < rval: * i += 1 */ goto __pyx_L15_break; } __pyx_L19:; goto __pyx_L18; } /* "pandas/src/generated.pyx":8807 * # end of the road * break * elif lval < rval: # <<<<<<<<<<<<<< * i += 1 * else: */ __pyx_t_4 = ((__pyx_v_lval < __pyx_v_rval) != 0); if (__pyx_t_4) { /* "pandas/src/generated.pyx":8808 * break * elif lval < rval: * i += 1 # <<<<<<<<<<<<<< * else: * j += 1 */ __pyx_v_i = (__pyx_v_i + 1); goto __pyx_L18; } /*else*/ { /* "pandas/src/generated.pyx":8810 * i += 1 * else: * j += 1 # <<<<<<<<<<<<<< * * return result, lindexer, rindexer */ __pyx_v_j = (__pyx_v_j + 1); } __pyx_L18:; } __pyx_L15_break:; goto __pyx_L13; } __pyx_L13:; /* "pandas/src/generated.pyx":8812 * j += 1 * * return result, lindexer, rindexer # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_10 = PyTuple_New(3); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8812; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_INCREF(((PyObject *)__pyx_v_result)); PyTuple_SET_ITEM(__pyx_t_10, 0, ((PyObject *)__pyx_v_result)); __Pyx_GIVEREF(((PyObject *)__pyx_v_result)); __Pyx_INCREF(((PyObject *)__pyx_v_lindexer)); PyTuple_SET_ITEM(__pyx_t_10, 1, ((PyObject *)__pyx_v_lindexer)); __Pyx_GIVEREF(((PyObject *)__pyx_v_lindexer)); __Pyx_INCREF(((PyObject *)__pyx_v_rindexer)); PyTuple_SET_ITEM(__pyx_t_10, 2, ((PyObject *)__pyx_v_rindexer)); __Pyx_GIVEREF(((PyObject *)__pyx_v_rindexer)); __pyx_r = ((PyObject *)__pyx_t_10); __pyx_t_10 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_9); __Pyx_XDECREF(__pyx_t_10); __Pyx_XDECREF(__pyx_t_11); __Pyx_XDECREF(__pyx_t_12); __Pyx_XDECREF(__pyx_t_13); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_left.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_lindexer.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_right.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_rindexer.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.algos.inner_join_indexer_int64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_left.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_lindexer.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_right.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_rindexer.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_lindexer); __Pyx_XDECREF((PyObject *)__pyx_v_rindexer); __Pyx_XDECREF((PyObject *)__pyx_v_result); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "util.pxd":26 * object sarr_from_data(cnp.dtype, int length, void* data) * * cdef inline object get_value_at(ndarray arr, object loc): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, sz */ static CYTHON_INLINE PyObject *__pyx_f_4util_get_value_at(PyArrayObject *__pyx_v_arr, PyObject *__pyx_v_loc) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_sz; PyObject *__pyx_v_casted = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; Py_ssize_t __pyx_t_4; int __pyx_t_5; int __pyx_t_6; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_value_at", 0); __Pyx_INCREF(__pyx_v_loc); /* "util.pxd":30 * Py_ssize_t i, sz * void* data_ptr * if is_float_object(loc): # <<<<<<<<<<<<<< * casted = int(loc) * if casted == loc: */ __pyx_t_1 = (is_float_object(__pyx_v_loc) != 0); if (__pyx_t_1) { /* "util.pxd":31 * void* data_ptr * if is_float_object(loc): * casted = int(loc) # <<<<<<<<<<<<<< * if casted == loc: * loc = casted */ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 31; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_loc); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_loc); __Pyx_GIVEREF(__pyx_v_loc); __pyx_t_3 = PyObject_Call(((PyObject *)((PyObject*)(&PyInt_Type))), ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 31; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __pyx_v_casted = __pyx_t_3; __pyx_t_3 = 0; /* "util.pxd":32 * if is_float_object(loc): * casted = int(loc) * if casted == loc: # <<<<<<<<<<<<<< * loc = casted * i = loc */ __pyx_t_3 = PyObject_RichCompare(__pyx_v_casted, __pyx_v_loc, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 32; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 32; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_1) { /* "util.pxd":33 * casted = int(loc) * if casted == loc: * loc = casted # <<<<<<<<<<<<<< * i = loc * sz = cnp.PyArray_SIZE(arr) */ __Pyx_INCREF(__pyx_v_casted); __Pyx_DECREF_SET(__pyx_v_loc, __pyx_v_casted); goto __pyx_L4; } __pyx_L4:; goto __pyx_L3; } __pyx_L3:; /* "util.pxd":34 * if casted == loc: * loc = casted * i = loc # <<<<<<<<<<<<<< * sz = cnp.PyArray_SIZE(arr) * */ __pyx_t_4 = __Pyx_PyIndex_AsSsize_t(__pyx_v_loc); if (unlikely((__pyx_t_4 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 34; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_i = ((Py_ssize_t)__pyx_t_4); /* "util.pxd":35 * loc = casted * i = loc * sz = cnp.PyArray_SIZE(arr) # <<<<<<<<<<<<<< * * if i < 0 and sz > 0: */ __pyx_v_sz = PyArray_SIZE(__pyx_v_arr); /* "util.pxd":37 * sz = cnp.PyArray_SIZE(arr) * * if i < 0 and sz > 0: # <<<<<<<<<<<<<< * i += sz * elif i >= sz or sz == 0: */ __pyx_t_1 = ((__pyx_v_i < 0) != 0); if (__pyx_t_1) { __pyx_t_5 = ((__pyx_v_sz > 0) != 0); __pyx_t_6 = __pyx_t_5; } else { __pyx_t_6 = __pyx_t_1; } if (__pyx_t_6) { /* "util.pxd":38 * * if i < 0 and sz > 0: * i += sz # <<<<<<<<<<<<<< * elif i >= sz or sz == 0: * raise IndexError('index out of bounds') */ __pyx_v_i = (__pyx_v_i + __pyx_v_sz); goto __pyx_L5; } /* "util.pxd":39 * if i < 0 and sz > 0: * i += sz * elif i >= sz or sz == 0: # <<<<<<<<<<<<<< * raise IndexError('index out of bounds') * */ __pyx_t_6 = ((__pyx_v_i >= __pyx_v_sz) != 0); if (!__pyx_t_6) { __pyx_t_1 = ((__pyx_v_sz == 0) != 0); __pyx_t_5 = __pyx_t_1; } else { __pyx_t_5 = __pyx_t_6; } if (__pyx_t_5) { /* "util.pxd":40 * i += sz * elif i >= sz or sz == 0: * raise IndexError('index out of bounds') # <<<<<<<<<<<<<< * * return get_value_1d(arr, i) */ __pyx_t_3 = PyObject_Call(__pyx_builtin_IndexError, ((PyObject *)__pyx_k_tuple_204), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 40; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[4]; __pyx_lineno = 40; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L5; } __pyx_L5:; /* "util.pxd":42 * raise IndexError('index out of bounds') * * return get_value_1d(arr, i) # <<<<<<<<<<<<<< * * cdef inline set_value_at(ndarray arr, object loc, object value): */ __Pyx_XDECREF(__pyx_r); __pyx_t_3 = get_value_1d(__pyx_v_arr, __pyx_v_i); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 42; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("util.get_value_at", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_casted); __Pyx_XDECREF(__pyx_v_loc); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "util.pxd":44 * return get_value_1d(arr, i) * * cdef inline set_value_at(ndarray arr, object loc, object value): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, sz */ static CYTHON_INLINE PyObject *__pyx_f_4util_set_value_at(PyArrayObject *__pyx_v_arr, PyObject *__pyx_v_loc, PyObject *__pyx_v_value) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_sz; PyObject *__pyx_v_casted = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; Py_ssize_t __pyx_t_4; int __pyx_t_5; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("set_value_at", 0); __Pyx_INCREF(__pyx_v_loc); /* "util.pxd":47 * cdef: * Py_ssize_t i, sz * if is_float_object(loc): # <<<<<<<<<<<<<< * casted = int(loc) * if casted == loc: */ __pyx_t_1 = (is_float_object(__pyx_v_loc) != 0); if (__pyx_t_1) { /* "util.pxd":48 * Py_ssize_t i, sz * if is_float_object(loc): * casted = int(loc) # <<<<<<<<<<<<<< * if casted == loc: * loc = casted */ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_loc); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_loc); __Pyx_GIVEREF(__pyx_v_loc); __pyx_t_3 = PyObject_Call(((PyObject *)((PyObject*)(&PyInt_Type))), ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __pyx_v_casted = __pyx_t_3; __pyx_t_3 = 0; /* "util.pxd":49 * if is_float_object(loc): * casted = int(loc) * if casted == loc: # <<<<<<<<<<<<<< * loc = casted * i = loc */ __pyx_t_3 = PyObject_RichCompare(__pyx_v_casted, __pyx_v_loc, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_1) { /* "util.pxd":50 * casted = int(loc) * if casted == loc: * loc = casted # <<<<<<<<<<<<<< * i = loc * sz = cnp.PyArray_SIZE(arr) */ __Pyx_INCREF(__pyx_v_casted); __Pyx_DECREF_SET(__pyx_v_loc, __pyx_v_casted); goto __pyx_L4; } __pyx_L4:; goto __pyx_L3; } __pyx_L3:; /* "util.pxd":51 * if casted == loc: * loc = casted * i = loc # <<<<<<<<<<<<<< * sz = cnp.PyArray_SIZE(arr) * */ __pyx_t_4 = __Pyx_PyIndex_AsSsize_t(__pyx_v_loc); if (unlikely((__pyx_t_4 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_i = ((Py_ssize_t)__pyx_t_4); /* "util.pxd":52 * loc = casted * i = loc * sz = cnp.PyArray_SIZE(arr) # <<<<<<<<<<<<<< * * if i < 0: */ __pyx_v_sz = PyArray_SIZE(__pyx_v_arr); /* "util.pxd":54 * sz = cnp.PyArray_SIZE(arr) * * if i < 0: # <<<<<<<<<<<<<< * i += sz * elif i >= sz: */ __pyx_t_1 = ((__pyx_v_i < 0) != 0); if (__pyx_t_1) { /* "util.pxd":55 * * if i < 0: * i += sz # <<<<<<<<<<<<<< * elif i >= sz: * raise IndexError('index out of bounds') */ __pyx_v_i = (__pyx_v_i + __pyx_v_sz); goto __pyx_L5; } /* "util.pxd":56 * if i < 0: * i += sz * elif i >= sz: # <<<<<<<<<<<<<< * raise IndexError('index out of bounds') * */ __pyx_t_1 = ((__pyx_v_i >= __pyx_v_sz) != 0); if (__pyx_t_1) { /* "util.pxd":57 * i += sz * elif i >= sz: * raise IndexError('index out of bounds') # <<<<<<<<<<<<<< * * assign_value_1d(arr, i, value) */ __pyx_t_3 = PyObject_Call(__pyx_builtin_IndexError, ((PyObject *)__pyx_k_tuple_205), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 57; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[4]; __pyx_lineno = 57; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L5; } __pyx_L5:; /* "util.pxd":59 * raise IndexError('index out of bounds') * * assign_value_1d(arr, i, value) # <<<<<<<<<<<<<< * * cdef inline int is_contiguous(ndarray arr): */ __pyx_t_5 = assign_value_1d(__pyx_v_arr, __pyx_v_i, __pyx_v_value); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 59; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("util.set_value_at", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_casted); __Pyx_XDECREF(__pyx_v_loc); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "util.pxd":61 * assign_value_1d(arr, i, value) * * cdef inline int is_contiguous(ndarray arr): # <<<<<<<<<<<<<< * return cnp.PyArray_CHKFLAGS(arr, cnp.NPY_C_CONTIGUOUS) * */ static CYTHON_INLINE int __pyx_f_4util_is_contiguous(PyArrayObject *__pyx_v_arr) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("is_contiguous", 0); /* "util.pxd":62 * * cdef inline int is_contiguous(ndarray arr): * return cnp.PyArray_CHKFLAGS(arr, cnp.NPY_C_CONTIGUOUS) # <<<<<<<<<<<<<< * * cdef inline is_array(object o): */ __pyx_r = PyArray_CHKFLAGS(__pyx_v_arr, NPY_C_CONTIGUOUS); goto __pyx_L0; __pyx_r = 0; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "util.pxd":64 * return cnp.PyArray_CHKFLAGS(arr, cnp.NPY_C_CONTIGUOUS) * * cdef inline is_array(object o): # <<<<<<<<<<<<<< * return cnp.PyArray_Check(o) * */ static CYTHON_INLINE PyObject *__pyx_f_4util_is_array(PyObject *__pyx_v_o) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("is_array", 0); /* "util.pxd":65 * * cdef inline is_array(object o): * return cnp.PyArray_Check(o) # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyBool_FromLong(PyArray_Check(__pyx_v_o)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 65; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("util.is_array", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "util.pxd":68 * * * cdef inline bint _checknull(object val): # <<<<<<<<<<<<<< * try: * return val is None or (cpython.PyFloat_Check(val) and val != val) */ static CYTHON_INLINE int __pyx_f_4util__checknull(PyObject *__pyx_v_val) { 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; int __pyx_t_9; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_checknull", 0); /* "util.pxd":69 * * cdef inline bint _checknull(object val): * try: # <<<<<<<<<<<<<< * return val is None or (cpython.PyFloat_Check(val) and val != val) * except ValueError: */ { __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:*/ { /* "util.pxd":70 * cdef inline bint _checknull(object val): * try: * return val is None or (cpython.PyFloat_Check(val) and val != val) # <<<<<<<<<<<<<< * except ValueError: * return False */ __pyx_t_4 = (__pyx_v_val == Py_None); __pyx_t_5 = __Pyx_PyBool_FromLong(__pyx_t_4); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L3_error;} if (!__pyx_t_4) { __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_6 = __Pyx_PyBool_FromLong(PyFloat_Check(__pyx_v_val)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L3_error;} if (__pyx_t_4) { __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_7 = PyObject_RichCompare(__pyx_v_val, __pyx_v_val, Py_NE); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_t_8 = __pyx_t_7; __pyx_t_7 = 0; } else { __pyx_t_8 = __pyx_t_6; __pyx_t_6 = 0; } __pyx_t_6 = __pyx_t_8; __pyx_t_8 = 0; } else { __pyx_t_6 = __pyx_t_5; __pyx_t_5 = 0; } __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_r = __pyx_t_4; goto __pyx_L7_try_return; } __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L10_try_end; __pyx_L7_try_return:; __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); goto __pyx_L0; __pyx_L3_error:; __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; /* "util.pxd":71 * try: * return val is None or (cpython.PyFloat_Check(val) and val != val) * except ValueError: # <<<<<<<<<<<<<< * return False * */ __pyx_t_9 = PyErr_ExceptionMatches(__pyx_builtin_ValueError); if (__pyx_t_9) { __Pyx_AddTraceback("util._checknull", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_5, &__pyx_t_8) < 0) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 71; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_GOTREF(__pyx_t_5); __Pyx_GOTREF(__pyx_t_8); /* "util.pxd":72 * return val is None or (cpython.PyFloat_Check(val) and val != val) * except ValueError: * return False # <<<<<<<<<<<<<< * * cdef inline bint _checknull_old(object val): */ __pyx_r = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; goto __pyx_L6_except_return; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; goto __pyx_L4_exception_handled; } __pyx_L5_except_error:; __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); goto __pyx_L1_error; __pyx_L6_except_return:; __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); goto __pyx_L0; __pyx_L4_exception_handled:; __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); __pyx_L10_try_end:; } __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_WriteUnraisable("util._checknull", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "util.pxd":74 * return False * * cdef inline bint _checknull_old(object val): # <<<<<<<<<<<<<< * import numpy as np * cdef double INF = np.inf */ static CYTHON_INLINE int __pyx_f_4util__checknull_old(PyObject *__pyx_v_val) { PyObject *__pyx_v_np = NULL; double __pyx_v_INF; double __pyx_v_NEGINF; int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; double __pyx_t_2; 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; int __pyx_t_9; int __pyx_t_10; int __pyx_t_11; int __pyx_t_12; PyObject *__pyx_t_13 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_checknull_old", 0); /* "util.pxd":75 * * cdef inline bint _checknull_old(object val): * import numpy as np # <<<<<<<<<<<<<< * cdef double INF = np.inf * cdef double NEGINF = -INF */ __pyx_t_1 = __Pyx_Import(((PyObject *)__pyx_n_s__numpy), 0, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 75; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_v_np = __pyx_t_1; __pyx_t_1 = 0; /* "util.pxd":76 * cdef inline bint _checknull_old(object val): * import numpy as np * cdef double INF = np.inf # <<<<<<<<<<<<<< * cdef double NEGINF = -INF * try: */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_np, __pyx_n_s__inf); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 76; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __pyx_PyFloat_AsDouble(__pyx_t_1); if (unlikely((__pyx_t_2 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 76; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_INF = ((double)__pyx_t_2); /* "util.pxd":77 * import numpy as np * cdef double INF = np.inf * cdef double NEGINF = -INF # <<<<<<<<<<<<<< * try: * return bool(val is None or val != val and val != INF */ __pyx_v_NEGINF = (-__pyx_v_INF); /* "util.pxd":78 * cdef double INF = np.inf * cdef double NEGINF = -INF * try: # <<<<<<<<<<<<<< * return bool(val is None or val != val and val != INF * and val != NEGINF) */ { __Pyx_ExceptionSave(&__pyx_t_3, &__pyx_t_4, &__pyx_t_5); __Pyx_XGOTREF(__pyx_t_3); __Pyx_XGOTREF(__pyx_t_4); __Pyx_XGOTREF(__pyx_t_5); /*try:*/ { /* "util.pxd":79 * cdef double NEGINF = -INF * try: * return bool(val is None or val != val and val != INF # <<<<<<<<<<<<<< * and val != NEGINF) * except ValueError: */ __pyx_t_6 = (__pyx_v_val == Py_None); if (!__pyx_t_6) { __pyx_t_1 = PyObject_RichCompare(__pyx_v_val, __pyx_v_val, Py_NE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_7) { /* "util.pxd":80 * try: * return bool(val is None or val != val and val != INF * and val != NEGINF) # <<<<<<<<<<<<<< * except ValueError: * return False */ __pyx_t_1 = PyFloat_FromDouble(__pyx_v_INF); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 80; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_8 = PyObject_RichCompare(__pyx_v_val, __pyx_t_1, Py_NE); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (__pyx_t_9) { __pyx_t_8 = PyFloat_FromDouble(__pyx_v_NEGINF); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 80; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_1 = PyObject_RichCompare(__pyx_v_val, __pyx_t_8, Py_NE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 80; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 80; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_11 = __pyx_t_10; } else { __pyx_t_11 = __pyx_t_9; } __pyx_t_9 = __pyx_t_11; } else { __pyx_t_9 = __pyx_t_7; } __pyx_t_7 = __pyx_t_9; } else { __pyx_t_7 = __pyx_t_6; } __pyx_r = (!(!__pyx_t_7)); goto __pyx_L7_try_return; } __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; goto __pyx_L10_try_end; __pyx_L7_try_return:; __Pyx_XGIVEREF(__pyx_t_3); __Pyx_XGIVEREF(__pyx_t_4); __Pyx_XGIVEREF(__pyx_t_5); __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5); goto __pyx_L0; __pyx_L3_error:; __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; /* "util.pxd":81 * return bool(val is None or val != val and val != INF * and val != NEGINF) * except ValueError: # <<<<<<<<<<<<<< * return False * */ __pyx_t_12 = PyErr_ExceptionMatches(__pyx_builtin_ValueError); if (__pyx_t_12) { __Pyx_AddTraceback("util._checknull_old", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_8, &__pyx_t_13) < 0) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_GOTREF(__pyx_t_8); __Pyx_GOTREF(__pyx_t_13); /* "util.pxd":82 * and val != NEGINF) * except ValueError: * return False # <<<<<<<<<<<<<< * * cdef inline bint _checknan(object val): */ __pyx_r = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; goto __pyx_L6_except_return; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; goto __pyx_L4_exception_handled; } __pyx_L5_except_error:; __Pyx_XGIVEREF(__pyx_t_3); __Pyx_XGIVEREF(__pyx_t_4); __Pyx_XGIVEREF(__pyx_t_5); __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5); goto __pyx_L1_error; __pyx_L6_except_return:; __Pyx_XGIVEREF(__pyx_t_3); __Pyx_XGIVEREF(__pyx_t_4); __Pyx_XGIVEREF(__pyx_t_5); __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5); goto __pyx_L0; __pyx_L4_exception_handled:; __Pyx_XGIVEREF(__pyx_t_3); __Pyx_XGIVEREF(__pyx_t_4); __Pyx_XGIVEREF(__pyx_t_5); __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5); __pyx_L10_try_end:; } __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_13); __Pyx_WriteUnraisable("util._checknull_old", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_np); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "util.pxd":84 * return False * * cdef inline bint _checknan(object val): # <<<<<<<<<<<<<< * return not cnp.PyArray_Check(val) and val != val */ static CYTHON_INLINE int __pyx_f_4util__checknan(PyObject *__pyx_v_val) { int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_checknan", 0); /* "util.pxd":85 * * cdef inline bint _checknan(object val): * return not cnp.PyArray_Check(val) and val != val # <<<<<<<<<<<<<< */ __pyx_t_1 = __Pyx_PyBool_FromLong((!(PyArray_Check(__pyx_v_val) != 0))); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__pyx_t_2) { __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_3 = PyObject_RichCompare(__pyx_v_val, __pyx_v_val, Py_NE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_4 = __pyx_t_3; __pyx_t_3 = 0; } else { __pyx_t_4 = __pyx_t_1; __pyx_t_1 = 0; } __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_r = __pyx_t_2; goto __pyx_L0; __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_WriteUnraisable("util._checknan", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "datetime.pxd":126 * * * cdef inline _string_to_dts(object val, pandas_datetimestruct* dts): # <<<<<<<<<<<<<< * cdef int result * cdef char *tmp */ static CYTHON_INLINE PyObject *__pyx_f_8datetime__string_to_dts(PyObject *__pyx_v_val, pandas_datetimestruct *__pyx_v_dts) { int __pyx_v_result; char *__pyx_v_tmp; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; char *__pyx_t_3; Py_ssize_t __pyx_t_4; PyObject *__pyx_t_5 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_string_to_dts", 0); __Pyx_INCREF(__pyx_v_val); /* "datetime.pxd":130 * cdef char *tmp * * if PyUnicode_Check(val): # <<<<<<<<<<<<<< * val = PyUnicode_AsASCIIString(val); * */ __pyx_t_1 = (PyUnicode_Check(__pyx_v_val) != 0); if (__pyx_t_1) { /* "datetime.pxd":131 * * if PyUnicode_Check(val): * val = PyUnicode_AsASCIIString(val); # <<<<<<<<<<<<<< * * tmp = val */ __pyx_t_2 = PyUnicode_AsASCIIString(__pyx_v_val); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 131; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF_SET(__pyx_v_val, __pyx_t_2); __pyx_t_2 = 0; goto __pyx_L3; } __pyx_L3:; /* "datetime.pxd":133 * val = PyUnicode_AsASCIIString(val); * * tmp = val # <<<<<<<<<<<<<< * result = _cstring_to_dts(tmp, len(val), dts) * */ __pyx_t_3 = __Pyx_PyObject_AsString(__pyx_v_val); if (unlikely((!__pyx_t_3) && PyErr_Occurred())) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 133; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_tmp = __pyx_t_3; /* "datetime.pxd":134 * * tmp = val * result = _cstring_to_dts(tmp, len(val), dts) # <<<<<<<<<<<<<< * * if result == -1: */ __pyx_t_4 = PyObject_Length(__pyx_v_val); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 134; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_result = __pyx_f_8datetime__cstring_to_dts(__pyx_v_tmp, __pyx_t_4, __pyx_v_dts); /* "datetime.pxd":136 * result = _cstring_to_dts(tmp, len(val), dts) * * if result == -1: # <<<<<<<<<<<<<< * raise ValueError('Unable to parse %s' % str(val)) * */ __pyx_t_1 = ((__pyx_v_result == -1) != 0); if (__pyx_t_1) { /* "datetime.pxd":137 * * if result == -1: * raise ValueError('Unable to parse %s' % str(val)) # <<<<<<<<<<<<<< * * cdef inline int _cstring_to_dts(char *val, int length, */ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 137; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_val); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_val); __Pyx_GIVEREF(__pyx_v_val); __pyx_t_5 = PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 137; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __pyx_t_2 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_206), __pyx_t_5); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 137; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_2)); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 137; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_t_2)); __Pyx_GIVEREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 137; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; {__pyx_filename = __pyx_f[5]; __pyx_lineno = 137; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L4; } __pyx_L4:; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("datetime._string_to_dts", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_val); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "datetime.pxd":139 * raise ValueError('Unable to parse %s' % str(val)) * * cdef inline int _cstring_to_dts(char *val, int length, # <<<<<<<<<<<<<< * pandas_datetimestruct* dts): * cdef: */ static CYTHON_INLINE int __pyx_f_8datetime__cstring_to_dts(char *__pyx_v_val, int __pyx_v_length, pandas_datetimestruct *__pyx_v_dts) { npy_bool __pyx_v_islocal; npy_bool __pyx_v_special; PANDAS_DATETIMEUNIT __pyx_v_out_bestunit; int __pyx_v_result; int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_cstring_to_dts", 0); /* "datetime.pxd":148 * result = parse_iso_8601_datetime(val, length, PANDAS_FR_ns, * NPY_UNSAFE_CASTING, * dts, &islocal, &out_bestunit, &special) # <<<<<<<<<<<<<< * return result * */ __pyx_v_result = parse_iso_8601_datetime(__pyx_v_val, __pyx_v_length, PANDAS_FR_ns, NPY_UNSAFE_CASTING, __pyx_v_dts, (&__pyx_v_islocal), (&__pyx_v_out_bestunit), (&__pyx_v_special)); /* "datetime.pxd":149 * NPY_UNSAFE_CASTING, * dts, &islocal, &out_bestunit, &special) * return result # <<<<<<<<<<<<<< * * */ __pyx_r = __pyx_v_result; goto __pyx_L0; __pyx_r = 0; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "datetime.pxd":152 * * * cdef inline object _datetime64_to_datetime(int64_t val): # <<<<<<<<<<<<<< * cdef pandas_datetimestruct dts * pandas_datetime_to_datetimestruct(val, PANDAS_FR_ns, &dts) */ static CYTHON_INLINE PyObject *__pyx_f_8datetime__datetime64_to_datetime(__pyx_t_5numpy_int64_t __pyx_v_val) { pandas_datetimestruct __pyx_v_dts; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_datetime64_to_datetime", 0); /* "datetime.pxd":154 * cdef inline object _datetime64_to_datetime(int64_t val): * cdef pandas_datetimestruct dts * pandas_datetime_to_datetimestruct(val, PANDAS_FR_ns, &dts) # <<<<<<<<<<<<<< * return _dts_to_pydatetime(&dts) * */ pandas_datetime_to_datetimestruct(__pyx_v_val, PANDAS_FR_ns, (&__pyx_v_dts)); /* "datetime.pxd":155 * cdef pandas_datetimestruct dts * pandas_datetime_to_datetimestruct(val, PANDAS_FR_ns, &dts) * return _dts_to_pydatetime(&dts) # <<<<<<<<<<<<<< * * cdef inline object _dts_to_pydatetime(pandas_datetimestruct *dts): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_8datetime__dts_to_pydatetime((&__pyx_v_dts)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 155; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("datetime._datetime64_to_datetime", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "datetime.pxd":157 * return _dts_to_pydatetime(&dts) * * cdef inline object _dts_to_pydatetime(pandas_datetimestruct *dts): # <<<<<<<<<<<<<< * return PyDateTime_FromDateAndTime(dts.year, dts.month, * dts.day, dts.hour, */ static CYTHON_INLINE PyObject *__pyx_f_8datetime__dts_to_pydatetime(pandas_datetimestruct *__pyx_v_dts) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_dts_to_pydatetime", 0); /* "datetime.pxd":158 * * cdef inline object _dts_to_pydatetime(pandas_datetimestruct *dts): * return PyDateTime_FromDateAndTime(dts.year, dts.month, # <<<<<<<<<<<<<< * dts.day, dts.hour, * dts.min, dts.sec, dts.us) */ __Pyx_XDECREF(__pyx_r); /* "datetime.pxd":160 * return PyDateTime_FromDateAndTime(dts.year, dts.month, * dts.day, dts.hour, * dts.min, dts.sec, dts.us) # <<<<<<<<<<<<<< * * cdef inline int64_t _pydatetime_to_dts(object val, pandas_datetimestruct *dts): */ __pyx_t_1 = PyDateTime_FromDateAndTime(__pyx_v_dts->year, __pyx_v_dts->month, __pyx_v_dts->day, __pyx_v_dts->hour, __pyx_v_dts->min, __pyx_v_dts->sec, __pyx_v_dts->us); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 158; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)__pyx_t_1)); __pyx_r = __pyx_t_1; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("datetime._dts_to_pydatetime", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "datetime.pxd":162 * dts.min, dts.sec, dts.us) * * cdef inline int64_t _pydatetime_to_dts(object val, pandas_datetimestruct *dts): # <<<<<<<<<<<<<< * dts.year = PyDateTime_GET_YEAR(val) * dts.month = PyDateTime_GET_MONTH(val) */ static CYTHON_INLINE __pyx_t_5numpy_int64_t __pyx_f_8datetime__pydatetime_to_dts(PyObject *__pyx_v_val, pandas_datetimestruct *__pyx_v_dts) { __pyx_t_5numpy_int64_t __pyx_r; __Pyx_RefNannyDeclarations int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_pydatetime_to_dts", 0); /* "datetime.pxd":163 * * cdef inline int64_t _pydatetime_to_dts(object val, pandas_datetimestruct *dts): * dts.year = PyDateTime_GET_YEAR(val) # <<<<<<<<<<<<<< * dts.month = PyDateTime_GET_MONTH(val) * dts.day = PyDateTime_GET_DAY(val) */ if (!(likely(((__pyx_v_val) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_val, __pyx_ptype_8datetime_date))))) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 163; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_dts->year = PyDateTime_GET_YEAR(((PyDateTime_Date *)__pyx_v_val)); /* "datetime.pxd":164 * cdef inline int64_t _pydatetime_to_dts(object val, pandas_datetimestruct *dts): * dts.year = PyDateTime_GET_YEAR(val) * dts.month = PyDateTime_GET_MONTH(val) # <<<<<<<<<<<<<< * dts.day = PyDateTime_GET_DAY(val) * dts.hour = PyDateTime_DATE_GET_HOUR(val) */ if (!(likely(((__pyx_v_val) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_val, __pyx_ptype_8datetime_date))))) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 164; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_dts->month = PyDateTime_GET_MONTH(((PyDateTime_Date *)__pyx_v_val)); /* "datetime.pxd":165 * dts.year = PyDateTime_GET_YEAR(val) * dts.month = PyDateTime_GET_MONTH(val) * dts.day = PyDateTime_GET_DAY(val) # <<<<<<<<<<<<<< * dts.hour = PyDateTime_DATE_GET_HOUR(val) * dts.min = PyDateTime_DATE_GET_MINUTE(val) */ if (!(likely(((__pyx_v_val) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_val, __pyx_ptype_8datetime_date))))) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 165; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_dts->day = PyDateTime_GET_DAY(((PyDateTime_Date *)__pyx_v_val)); /* "datetime.pxd":166 * dts.month = PyDateTime_GET_MONTH(val) * dts.day = PyDateTime_GET_DAY(val) * dts.hour = PyDateTime_DATE_GET_HOUR(val) # <<<<<<<<<<<<<< * dts.min = PyDateTime_DATE_GET_MINUTE(val) * dts.sec = PyDateTime_DATE_GET_SECOND(val) */ __pyx_v_dts->hour = PyDateTime_DATE_GET_HOUR(__pyx_v_val); /* "datetime.pxd":167 * dts.day = PyDateTime_GET_DAY(val) * dts.hour = PyDateTime_DATE_GET_HOUR(val) * dts.min = PyDateTime_DATE_GET_MINUTE(val) # <<<<<<<<<<<<<< * dts.sec = PyDateTime_DATE_GET_SECOND(val) * dts.us = PyDateTime_DATE_GET_MICROSECOND(val) */ __pyx_v_dts->min = PyDateTime_DATE_GET_MINUTE(__pyx_v_val); /* "datetime.pxd":168 * dts.hour = PyDateTime_DATE_GET_HOUR(val) * dts.min = PyDateTime_DATE_GET_MINUTE(val) * dts.sec = PyDateTime_DATE_GET_SECOND(val) # <<<<<<<<<<<<<< * dts.us = PyDateTime_DATE_GET_MICROSECOND(val) * dts.ps = dts.as = 0 */ __pyx_v_dts->sec = PyDateTime_DATE_GET_SECOND(__pyx_v_val); /* "datetime.pxd":169 * dts.min = PyDateTime_DATE_GET_MINUTE(val) * dts.sec = PyDateTime_DATE_GET_SECOND(val) * dts.us = PyDateTime_DATE_GET_MICROSECOND(val) # <<<<<<<<<<<<<< * dts.ps = dts.as = 0 * return pandas_datetimestruct_to_datetime(PANDAS_FR_ns, dts) */ __pyx_v_dts->us = PyDateTime_DATE_GET_MICROSECOND(__pyx_v_val); /* "datetime.pxd":170 * dts.sec = PyDateTime_DATE_GET_SECOND(val) * dts.us = PyDateTime_DATE_GET_MICROSECOND(val) * dts.ps = dts.as = 0 # <<<<<<<<<<<<<< * return pandas_datetimestruct_to_datetime(PANDAS_FR_ns, dts) * */ __pyx_v_dts->ps = 0; __pyx_v_dts->as = 0; /* "datetime.pxd":171 * dts.us = PyDateTime_DATE_GET_MICROSECOND(val) * dts.ps = dts.as = 0 * return pandas_datetimestruct_to_datetime(PANDAS_FR_ns, dts) # <<<<<<<<<<<<<< * * cdef inline int64_t _dtlike_to_datetime64(object val, */ __pyx_r = pandas_datetimestruct_to_datetime(PANDAS_FR_ns, __pyx_v_dts); goto __pyx_L0; __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_WriteUnraisable("datetime._pydatetime_to_dts", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "datetime.pxd":173 * return pandas_datetimestruct_to_datetime(PANDAS_FR_ns, dts) * * cdef inline int64_t _dtlike_to_datetime64(object val, # <<<<<<<<<<<<<< * pandas_datetimestruct *dts): * dts.year = val.year */ static CYTHON_INLINE __pyx_t_5numpy_int64_t __pyx_f_8datetime__dtlike_to_datetime64(PyObject *__pyx_v_val, pandas_datetimestruct *__pyx_v_dts) { __pyx_t_5numpy_int64_t __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; npy_int64 __pyx_t_2; npy_int32 __pyx_t_3; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_dtlike_to_datetime64", 0); /* "datetime.pxd":175 * cdef inline int64_t _dtlike_to_datetime64(object val, * pandas_datetimestruct *dts): * dts.year = val.year # <<<<<<<<<<<<<< * dts.month = val.month * dts.day = val.day */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_val, __pyx_n_s__year); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 175; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyInt_from_py_npy_int64(__pyx_t_1); if (unlikely((__pyx_t_2 == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 175; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_dts->year = __pyx_t_2; /* "datetime.pxd":176 * pandas_datetimestruct *dts): * dts.year = val.year * dts.month = val.month # <<<<<<<<<<<<<< * dts.day = val.day * dts.hour = val.hour */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_val, __pyx_n_s__month); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 176; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __Pyx_PyInt_from_py_npy_int32(__pyx_t_1); if (unlikely((__pyx_t_3 == (npy_int32)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 176; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_dts->month = __pyx_t_3; /* "datetime.pxd":177 * dts.year = val.year * dts.month = val.month * dts.day = val.day # <<<<<<<<<<<<<< * dts.hour = val.hour * dts.min = val.minute */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_val, __pyx_n_s__day); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 177; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __Pyx_PyInt_from_py_npy_int32(__pyx_t_1); if (unlikely((__pyx_t_3 == (npy_int32)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 177; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_dts->day = __pyx_t_3; /* "datetime.pxd":178 * dts.month = val.month * dts.day = val.day * dts.hour = val.hour # <<<<<<<<<<<<<< * dts.min = val.minute * dts.sec = val.second */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_val, __pyx_n_s__hour); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 178; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __Pyx_PyInt_from_py_npy_int32(__pyx_t_1); if (unlikely((__pyx_t_3 == (npy_int32)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 178; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_dts->hour = __pyx_t_3; /* "datetime.pxd":179 * dts.day = val.day * dts.hour = val.hour * dts.min = val.minute # <<<<<<<<<<<<<< * dts.sec = val.second * dts.us = val.microsecond */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_val, __pyx_n_s__minute); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 179; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __Pyx_PyInt_from_py_npy_int32(__pyx_t_1); if (unlikely((__pyx_t_3 == (npy_int32)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 179; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_dts->min = __pyx_t_3; /* "datetime.pxd":180 * dts.hour = val.hour * dts.min = val.minute * dts.sec = val.second # <<<<<<<<<<<<<< * dts.us = val.microsecond * dts.ps = dts.as = 0 */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_val, __pyx_n_s__second); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __Pyx_PyInt_from_py_npy_int32(__pyx_t_1); if (unlikely((__pyx_t_3 == (npy_int32)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_dts->sec = __pyx_t_3; /* "datetime.pxd":181 * dts.min = val.minute * dts.sec = val.second * dts.us = val.microsecond # <<<<<<<<<<<<<< * dts.ps = dts.as = 0 * return pandas_datetimestruct_to_datetime(PANDAS_FR_ns, dts) */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_val, __pyx_n_s__microsecond); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 181; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __Pyx_PyInt_from_py_npy_int32(__pyx_t_1); if (unlikely((__pyx_t_3 == (npy_int32)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 181; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_dts->us = __pyx_t_3; /* "datetime.pxd":182 * dts.sec = val.second * dts.us = val.microsecond * dts.ps = dts.as = 0 # <<<<<<<<<<<<<< * return pandas_datetimestruct_to_datetime(PANDAS_FR_ns, dts) * */ __pyx_v_dts->ps = 0; __pyx_v_dts->as = 0; /* "datetime.pxd":183 * dts.us = val.microsecond * dts.ps = dts.as = 0 * return pandas_datetimestruct_to_datetime(PANDAS_FR_ns, dts) # <<<<<<<<<<<<<< * * cdef inline int64_t _date_to_datetime64(object val, */ __pyx_r = pandas_datetimestruct_to_datetime(PANDAS_FR_ns, __pyx_v_dts); goto __pyx_L0; __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_WriteUnraisable("datetime._dtlike_to_datetime64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "datetime.pxd":185 * return pandas_datetimestruct_to_datetime(PANDAS_FR_ns, dts) * * cdef inline int64_t _date_to_datetime64(object val, # <<<<<<<<<<<<<< * pandas_datetimestruct *dts): * dts.year = PyDateTime_GET_YEAR(val) */ static CYTHON_INLINE __pyx_t_5numpy_int64_t __pyx_f_8datetime__date_to_datetime64(PyObject *__pyx_v_val, pandas_datetimestruct *__pyx_v_dts) { __pyx_t_5numpy_int64_t __pyx_r; __Pyx_RefNannyDeclarations int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_date_to_datetime64", 0); /* "datetime.pxd":187 * cdef inline int64_t _date_to_datetime64(object val, * pandas_datetimestruct *dts): * dts.year = PyDateTime_GET_YEAR(val) # <<<<<<<<<<<<<< * dts.month = PyDateTime_GET_MONTH(val) * dts.day = PyDateTime_GET_DAY(val) */ if (!(likely(((__pyx_v_val) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_val, __pyx_ptype_8datetime_date))))) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 187; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_dts->year = PyDateTime_GET_YEAR(((PyDateTime_Date *)__pyx_v_val)); /* "datetime.pxd":188 * pandas_datetimestruct *dts): * dts.year = PyDateTime_GET_YEAR(val) * dts.month = PyDateTime_GET_MONTH(val) # <<<<<<<<<<<<<< * dts.day = PyDateTime_GET_DAY(val) * dts.hour = dts.min = dts.sec = dts.us = 0 */ if (!(likely(((__pyx_v_val) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_val, __pyx_ptype_8datetime_date))))) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 188; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_dts->month = PyDateTime_GET_MONTH(((PyDateTime_Date *)__pyx_v_val)); /* "datetime.pxd":189 * dts.year = PyDateTime_GET_YEAR(val) * dts.month = PyDateTime_GET_MONTH(val) * dts.day = PyDateTime_GET_DAY(val) # <<<<<<<<<<<<<< * dts.hour = dts.min = dts.sec = dts.us = 0 * dts.ps = dts.as = 0 */ if (!(likely(((__pyx_v_val) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_val, __pyx_ptype_8datetime_date))))) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 189; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_dts->day = PyDateTime_GET_DAY(((PyDateTime_Date *)__pyx_v_val)); /* "datetime.pxd":190 * dts.month = PyDateTime_GET_MONTH(val) * dts.day = PyDateTime_GET_DAY(val) * dts.hour = dts.min = dts.sec = dts.us = 0 # <<<<<<<<<<<<<< * dts.ps = dts.as = 0 * return pandas_datetimestruct_to_datetime(PANDAS_FR_ns, dts) */ __pyx_v_dts->hour = 0; __pyx_v_dts->min = 0; __pyx_v_dts->sec = 0; __pyx_v_dts->us = 0; /* "datetime.pxd":191 * dts.day = PyDateTime_GET_DAY(val) * dts.hour = dts.min = dts.sec = dts.us = 0 * dts.ps = dts.as = 0 # <<<<<<<<<<<<<< * return pandas_datetimestruct_to_datetime(PANDAS_FR_ns, dts) * */ __pyx_v_dts->ps = 0; __pyx_v_dts->as = 0; /* "datetime.pxd":192 * dts.hour = dts.min = dts.sec = dts.us = 0 * dts.ps = dts.as = 0 * return pandas_datetimestruct_to_datetime(PANDAS_FR_ns, dts) # <<<<<<<<<<<<<< * */ __pyx_r = pandas_datetimestruct_to_datetime(PANDAS_FR_ns, __pyx_v_dts); goto __pyx_L0; __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_WriteUnraisable("datetime._date_to_datetime64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* 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)); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "numpy.pxd":196 * # 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 fullfill the PEP. */ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags) { int __pyx_v_copy_shape; 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_v_hasfields; int __pyx_r; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; int __pyx_t_5; int __pyx_t_6; int __pyx_t_7; PyObject *__pyx_t_8 = NULL; char *__pyx_t_9; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__getbuffer__", 0); if (__pyx_v_info != NULL) { __pyx_v_info->obj = Py_None; __Pyx_INCREF(Py_None); __Pyx_GIVEREF(__pyx_v_info->obj); } /* "numpy.pxd":202 * # of flags * * if info == NULL: return # <<<<<<<<<<<<<< * * cdef int copy_shape, i, ndim */ __pyx_t_1 = ((__pyx_v_info == NULL) != 0); if (__pyx_t_1) { __pyx_r = 0; goto __pyx_L0; goto __pyx_L3; } __pyx_L3:; /* "numpy.pxd":205 * * cdef int copy_shape, i, ndim * cdef int endian_detector = 1 # <<<<<<<<<<<<<< * cdef bint little_endian = ((&endian_detector)[0] != 0) * */ __pyx_v_endian_detector = 1; /* "numpy.pxd":206 * cdef int copy_shape, 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); /* "numpy.pxd":208 * cdef bint little_endian = ((&endian_detector)[0] != 0) * * ndim = PyArray_NDIM(self) # <<<<<<<<<<<<<< * * if sizeof(npy_intp) != sizeof(Py_ssize_t): */ __pyx_v_ndim = PyArray_NDIM(__pyx_v_self); /* "numpy.pxd":210 * ndim = PyArray_NDIM(self) * * if sizeof(npy_intp) != sizeof(Py_ssize_t): # <<<<<<<<<<<<<< * copy_shape = 1 * else: */ __pyx_t_1 = (((sizeof(npy_intp)) != (sizeof(Py_ssize_t))) != 0); if (__pyx_t_1) { /* "numpy.pxd":211 * * if sizeof(npy_intp) != sizeof(Py_ssize_t): * copy_shape = 1 # <<<<<<<<<<<<<< * else: * copy_shape = 0 */ __pyx_v_copy_shape = 1; goto __pyx_L4; } /*else*/ { /* "numpy.pxd":213 * copy_shape = 1 * else: * copy_shape = 0 # <<<<<<<<<<<<<< * * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) */ __pyx_v_copy_shape = 0; } __pyx_L4:; /* "numpy.pxd":215 * copy_shape = 0 * * 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_1 = (((__pyx_v_flags & PyBUF_C_CONTIGUOUS) == PyBUF_C_CONTIGUOUS) != 0); if (__pyx_t_1) { /* "numpy.pxd":216 * * 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_3 = __pyx_t_2; } else { __pyx_t_3 = __pyx_t_1; } if (__pyx_t_3) { /* "numpy.pxd":217 * 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_4 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_208), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 217; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[6]; __pyx_lineno = 217; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L5; } __pyx_L5:; /* "numpy.pxd":219 * 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_3 = (((__pyx_v_flags & PyBUF_F_CONTIGUOUS) == PyBUF_F_CONTIGUOUS) != 0); if (__pyx_t_3) { /* "numpy.pxd":220 * * 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_1 = ((!(PyArray_CHKFLAGS(__pyx_v_self, NPY_F_CONTIGUOUS) != 0)) != 0); __pyx_t_2 = __pyx_t_1; } else { __pyx_t_2 = __pyx_t_3; } if (__pyx_t_2) { /* "numpy.pxd":221 * 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_4 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_210), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 221; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[6]; __pyx_lineno = 221; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L6; } __pyx_L6:; /* "numpy.pxd":223 * raise ValueError(u"ndarray is not Fortran contiguous") * * info.buf = PyArray_DATA(self) # <<<<<<<<<<<<<< * info.ndim = ndim * if copy_shape: */ __pyx_v_info->buf = PyArray_DATA(__pyx_v_self); /* "numpy.pxd":224 * * info.buf = PyArray_DATA(self) * info.ndim = ndim # <<<<<<<<<<<<<< * if copy_shape: * # Allocate new buffer for strides and shape info. */ __pyx_v_info->ndim = __pyx_v_ndim; /* "numpy.pxd":225 * info.buf = PyArray_DATA(self) * info.ndim = ndim * if copy_shape: # <<<<<<<<<<<<<< * # Allocate new buffer for strides and shape info. * # This is allocated as one block, strides first. */ __pyx_t_2 = (__pyx_v_copy_shape != 0); if (__pyx_t_2) { /* "numpy.pxd":228 * # Allocate new buffer for strides and shape info. * # This is allocated as one block, strides first. * info.strides = stdlib.malloc(sizeof(Py_ssize_t) * ndim * 2) # <<<<<<<<<<<<<< * info.shape = info.strides + ndim * for i in range(ndim): */ __pyx_v_info->strides = ((Py_ssize_t *)malloc((((sizeof(Py_ssize_t)) * ((size_t)__pyx_v_ndim)) * 2))); /* "numpy.pxd":229 * # This is allocated as one block, strides first. * info.strides = stdlib.malloc(sizeof(Py_ssize_t) * ndim * 2) * 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); /* "numpy.pxd":230 * info.strides = stdlib.malloc(sizeof(Py_ssize_t) * ndim * 2) * 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_5 = __pyx_v_ndim; for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) { __pyx_v_i = __pyx_t_6; /* "numpy.pxd":231 * 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]); /* "numpy.pxd":232 * 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]); } goto __pyx_L7; } /*else*/ { /* "numpy.pxd":234 * info.shape[i] = PyArray_DIMS(self)[i] * else: * info.strides = PyArray_STRIDES(self) # <<<<<<<<<<<<<< * info.shape = PyArray_DIMS(self) * info.suboffsets = NULL */ __pyx_v_info->strides = ((Py_ssize_t *)PyArray_STRIDES(__pyx_v_self)); /* "numpy.pxd":235 * 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_L7:; /* "numpy.pxd":236 * 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; /* "numpy.pxd":237 * 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); /* "numpy.pxd":238 * 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)); /* "numpy.pxd":241 * * cdef int t * cdef char* f = NULL # <<<<<<<<<<<<<< * cdef dtype descr = self.descr * cdef list stack */ __pyx_v_f = NULL; /* "numpy.pxd":242 * cdef int t * cdef char* f = NULL * cdef dtype descr = self.descr # <<<<<<<<<<<<<< * cdef list stack * cdef int offset */ __pyx_t_4 = ((PyObject *)__pyx_v_self->descr); __Pyx_INCREF(__pyx_t_4); __pyx_v_descr = ((PyArray_Descr *)__pyx_t_4); __pyx_t_4 = 0; /* "numpy.pxd":246 * cdef int offset * * cdef bint hasfields = PyDataType_HASFIELDS(descr) # <<<<<<<<<<<<<< * * if not hasfields and not copy_shape: */ __pyx_v_hasfields = PyDataType_HASFIELDS(__pyx_v_descr); /* "numpy.pxd":248 * cdef bint hasfields = PyDataType_HASFIELDS(descr) * * if not hasfields and not copy_shape: # <<<<<<<<<<<<<< * # do not call releasebuffer * info.obj = None */ __pyx_t_2 = ((!(__pyx_v_hasfields != 0)) != 0); if (__pyx_t_2) { __pyx_t_3 = ((!(__pyx_v_copy_shape != 0)) != 0); __pyx_t_1 = __pyx_t_3; } else { __pyx_t_1 = __pyx_t_2; } if (__pyx_t_1) { /* "numpy.pxd":250 * if not hasfields and not copy_shape: * # do not call releasebuffer * info.obj = None # <<<<<<<<<<<<<< * else: * # need to call releasebuffer */ __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_info->obj); __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = Py_None; goto __pyx_L10; } /*else*/ { /* "numpy.pxd":253 * else: * # need to call releasebuffer * info.obj = self # <<<<<<<<<<<<<< * * if not hasfields: */ __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); } __pyx_L10:; /* "numpy.pxd":255 * info.obj = self * * if not hasfields: # <<<<<<<<<<<<<< * t = descr.type_num * if ((descr.byteorder == '>' and little_endian) or */ __pyx_t_1 = ((!(__pyx_v_hasfields != 0)) != 0); if (__pyx_t_1) { /* "numpy.pxd":256 * * if not hasfields: * t = descr.type_num # <<<<<<<<<<<<<< * if ((descr.byteorder == '>' and little_endian) or * (descr.byteorder == '<' and not little_endian)): */ __pyx_t_5 = __pyx_v_descr->type_num; __pyx_v_t = __pyx_t_5; /* "numpy.pxd":257 * if not hasfields: * t = descr.type_num * if ((descr.byteorder == '>' and little_endian) or # <<<<<<<<<<<<<< * (descr.byteorder == '<' and not little_endian)): * raise ValueError(u"Non-native byte order not supported") */ __pyx_t_1 = ((__pyx_v_descr->byteorder == '>') != 0); if (__pyx_t_1) { __pyx_t_2 = (__pyx_v_little_endian != 0); } else { __pyx_t_2 = __pyx_t_1; } if (!__pyx_t_2) { /* "numpy.pxd":258 * t = descr.type_num * if ((descr.byteorder == '>' and little_endian) or * (descr.byteorder == '<' and not little_endian)): # <<<<<<<<<<<<<< * raise ValueError(u"Non-native byte order not supported") * if t == NPY_BYTE: f = "b" */ __pyx_t_1 = ((__pyx_v_descr->byteorder == '<') != 0); if (__pyx_t_1) { __pyx_t_3 = ((!(__pyx_v_little_endian != 0)) != 0); __pyx_t_7 = __pyx_t_3; } else { __pyx_t_7 = __pyx_t_1; } __pyx_t_1 = __pyx_t_7; } else { __pyx_t_1 = __pyx_t_2; } if (__pyx_t_1) { /* "numpy.pxd":259 * if ((descr.byteorder == '>' and little_endian) or * (descr.byteorder == '<' 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_4 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_212), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 259; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[6]; __pyx_lineno = 259; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L12; } __pyx_L12:; /* "numpy.pxd":276 * 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) */ switch (__pyx_v_t) { /* "numpy.pxd":260 * (descr.byteorder == '<' 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" */ case NPY_BYTE: __pyx_v_f = __pyx_k__b; break; /* "numpy.pxd":261 * 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 = __pyx_k__B; break; /* "numpy.pxd":262 * 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 = __pyx_k__h; break; /* "numpy.pxd":263 * 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 = __pyx_k__H; break; /* "numpy.pxd":264 * 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 = __pyx_k__i; break; /* "numpy.pxd":265 * 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 = __pyx_k__I; break; /* "numpy.pxd":266 * 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 = __pyx_k__l; break; /* "numpy.pxd":267 * 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 = __pyx_k__L; break; /* "numpy.pxd":268 * 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 = __pyx_k__q; break; /* "numpy.pxd":269 * 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 = __pyx_k__Q; break; /* "numpy.pxd":270 * 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 = __pyx_k__f; break; /* "numpy.pxd":271 * 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 = __pyx_k__d; break; /* "numpy.pxd":272 * 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 = __pyx_k__g; break; /* "numpy.pxd":273 * 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 = __pyx_k__Zf; break; /* "numpy.pxd":274 * 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 = __pyx_k__Zd; break; /* "numpy.pxd":275 * 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 = __pyx_k__Zg; break; /* "numpy.pxd":276 * 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 = __pyx_k__O; break; default: /* "numpy.pxd":278 * elif t == NPY_OBJECT: f = "O" * else: * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) # <<<<<<<<<<<<<< * info.format = f * return */ __pyx_t_4 = PyInt_FromLong(__pyx_v_t); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 278; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_8 = PyNumber_Remainder(((PyObject *)__pyx_kp_u_213), __pyx_t_4); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 278; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_8)); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 278; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_t_8)); __Pyx_GIVEREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0; __pyx_t_8 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 278; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __Pyx_Raise(__pyx_t_8, 0, 0, 0); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; {__pyx_filename = __pyx_f[6]; __pyx_lineno = 278; __pyx_clineno = __LINE__; goto __pyx_L1_error;} break; } /* "numpy.pxd":279 * else: * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) * info.format = f # <<<<<<<<<<<<<< * return * else: */ __pyx_v_info->format = __pyx_v_f; /* "numpy.pxd":280 * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) * info.format = f * return # <<<<<<<<<<<<<< * else: * info.format = stdlib.malloc(_buffer_format_string_len) */ __pyx_r = 0; goto __pyx_L0; goto __pyx_L11; } /*else*/ { /* "numpy.pxd":282 * return * else: * info.format = stdlib.malloc(_buffer_format_string_len) # <<<<<<<<<<<<<< * info.format[0] = '^' # Native data types, manual alignment * offset = 0 */ __pyx_v_info->format = ((char *)malloc(255)); /* "numpy.pxd":283 * else: * info.format = stdlib.malloc(_buffer_format_string_len) * info.format[0] = '^' # Native data types, manual alignment # <<<<<<<<<<<<<< * offset = 0 * f = _util_dtypestring(descr, info.format + 1, */ (__pyx_v_info->format[0]) = '^'; /* "numpy.pxd":284 * info.format = stdlib.malloc(_buffer_format_string_len) * info.format[0] = '^' # Native data types, manual alignment * offset = 0 # <<<<<<<<<<<<<< * f = _util_dtypestring(descr, info.format + 1, * info.format + _buffer_format_string_len, */ __pyx_v_offset = 0; /* "numpy.pxd":287 * f = _util_dtypestring(descr, info.format + 1, * info.format + _buffer_format_string_len, * &offset) # <<<<<<<<<<<<<< * f[0] = 0 # Terminate format string * */ __pyx_t_9 = __pyx_f_5numpy__util_dtypestring(__pyx_v_descr, (__pyx_v_info->format + 1), (__pyx_v_info->format + 255), (&__pyx_v_offset)); if (unlikely(__pyx_t_9 == NULL)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 285; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_f = __pyx_t_9; /* "numpy.pxd":288 * info.format + _buffer_format_string_len, * &offset) * f[0] = 0 # Terminate format string # <<<<<<<<<<<<<< * * def __releasebuffer__(ndarray self, Py_buffer* info): */ (__pyx_v_f[0]) = 0; } __pyx_L11:; __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_8); __Pyx_AddTraceback("numpy.ndarray.__getbuffer__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; if (__pyx_v_info != NULL && __pyx_v_info->obj != NULL) { __Pyx_GOTREF(__pyx_v_info->obj); __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = NULL; } goto __pyx_L2; __pyx_L0:; if (__pyx_v_info != NULL && __pyx_v_info->obj == Py_None) { __Pyx_GOTREF(Py_None); __Pyx_DECREF(Py_None); __pyx_v_info->obj = NULL; } __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_descr); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* 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)); __Pyx_RefNannyFinishContext(); } /* "numpy.pxd":290 * f[0] = 0 # Terminate format string * * def __releasebuffer__(ndarray self, Py_buffer* info): # <<<<<<<<<<<<<< * if PyArray_HASFIELDS(self): * stdlib.free(info.format) */ 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); /* "numpy.pxd":291 * * def __releasebuffer__(ndarray self, Py_buffer* info): * if PyArray_HASFIELDS(self): # <<<<<<<<<<<<<< * stdlib.free(info.format) * if sizeof(npy_intp) != sizeof(Py_ssize_t): */ __pyx_t_1 = (PyArray_HASFIELDS(__pyx_v_self) != 0); if (__pyx_t_1) { /* "numpy.pxd":292 * def __releasebuffer__(ndarray self, Py_buffer* info): * if PyArray_HASFIELDS(self): * stdlib.free(info.format) # <<<<<<<<<<<<<< * if sizeof(npy_intp) != sizeof(Py_ssize_t): * stdlib.free(info.strides) */ free(__pyx_v_info->format); goto __pyx_L3; } __pyx_L3:; /* "numpy.pxd":293 * if PyArray_HASFIELDS(self): * stdlib.free(info.format) * if sizeof(npy_intp) != sizeof(Py_ssize_t): # <<<<<<<<<<<<<< * stdlib.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) { /* "numpy.pxd":294 * stdlib.free(info.format) * if sizeof(npy_intp) != sizeof(Py_ssize_t): * stdlib.free(info.strides) # <<<<<<<<<<<<<< * # info.shape was stored after info.strides in the same block * */ free(__pyx_v_info->strides); goto __pyx_L4; } __pyx_L4:; __Pyx_RefNannyFinishContext(); } /* "numpy.pxd":772 * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PyArray_MultiIterNew1", 0); /* "numpy.pxd":773 * * 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_filename = __pyx_f[6]; __pyx_lineno = 773; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __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; } /* "numpy.pxd":775 * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PyArray_MultiIterNew2", 0); /* "numpy.pxd":776 * * 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_filename = __pyx_f[6]; __pyx_lineno = 776; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __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; } /* "numpy.pxd":778 * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PyArray_MultiIterNew3", 0); /* "numpy.pxd":779 * * 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_filename = __pyx_f[6]; __pyx_lineno = 779; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __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; } /* "numpy.pxd":781 * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PyArray_MultiIterNew4", 0); /* "numpy.pxd":782 * * 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_filename = __pyx_f[6]; __pyx_lineno = 782; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __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; } /* "numpy.pxd":784 * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PyArray_MultiIterNew5", 0); /* "numpy.pxd":785 * * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): * return PyArray_MultiIterNew(5, a, b, c, d, e) # <<<<<<<<<<<<<< * * cdef inline char* _util_dtypestring(dtype descr, char* f, char* end, int* offset) except NULL: */ __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_filename = __pyx_f[6]; __pyx_lineno = 785; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __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; } /* "numpy.pxd":787 * return PyArray_MultiIterNew(5, a, b, c, d, e) * * 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; PyObject *__pyx_t_5 = NULL; PyObject *(*__pyx_t_6)(PyObject *); int __pyx_t_7; int __pyx_t_8; int __pyx_t_9; int __pyx_t_10; long __pyx_t_11; char *__pyx_t_12; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_util_dtypestring", 0); /* "numpy.pxd":794 * cdef int delta_offset * cdef tuple i * cdef int endian_detector = 1 # <<<<<<<<<<<<<< * cdef bint little_endian = ((&endian_detector)[0] != 0) * cdef tuple fields */ __pyx_v_endian_detector = 1; /* "numpy.pxd":795 * cdef tuple i * 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); /* "numpy.pxd":798 * cdef tuple fields * * for childname in descr.names: # <<<<<<<<<<<<<< * fields = descr.fields[childname] * child, new_offset = fields */ if (unlikely(((PyObject *)__pyx_v_descr->names) == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); {__pyx_filename = __pyx_f[6]; __pyx_lineno = 798; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_1 = ((PyObject *)__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_COMPILING_IN_CPYTHON __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_filename = __pyx_f[6]; __pyx_lineno = 798; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 798; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif __Pyx_XDECREF_SET(__pyx_v_childname, __pyx_t_3); __pyx_t_3 = 0; /* "numpy.pxd":799 * * for childname in descr.names: * fields = descr.fields[childname] # <<<<<<<<<<<<<< * child, new_offset = fields * */ __pyx_t_3 = PyObject_GetItem(__pyx_v_descr->fields, __pyx_v_childname); if (!__pyx_t_3) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 799; __pyx_clineno = __LINE__; goto __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 tuple, got %.200s", Py_TYPE(__pyx_t_3)->tp_name), 0))) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 799; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_XDECREF_SET(__pyx_v_fields, ((PyObject*)__pyx_t_3)); __pyx_t_3 = 0; /* "numpy.pxd":800 * for childname in descr.names: * fields = descr.fields[childname] * child, new_offset = fields # <<<<<<<<<<<<<< * * if (end - f) - (new_offset - offset[0]) < 15: */ if (likely(PyTuple_CheckExact(((PyObject *)__pyx_v_fields)))) { PyObject* sequence = ((PyObject *)__pyx_v_fields); #if CYTHON_COMPILING_IN_CPYTHON Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); {__pyx_filename = __pyx_f[6]; __pyx_lineno = 800; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON __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_filename = __pyx_f[6]; __pyx_lineno = 800; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 800; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); #endif } else if (1) { __Pyx_RaiseNoneNotIterableError(); {__pyx_filename = __pyx_f[6]; __pyx_lineno = 800; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } else { Py_ssize_t index = -1; __pyx_t_5 = PyObject_GetIter(((PyObject *)__pyx_v_fields)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 800; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = Py_TYPE(__pyx_t_5)->tp_iternext; index = 0; __pyx_t_3 = __pyx_t_6(__pyx_t_5); if (unlikely(!__pyx_t_3)) goto __pyx_L5_unpacking_failed; __Pyx_GOTREF(__pyx_t_3); index = 1; __pyx_t_4 = __pyx_t_6(__pyx_t_5); if (unlikely(!__pyx_t_4)) goto __pyx_L5_unpacking_failed; __Pyx_GOTREF(__pyx_t_4); if (__Pyx_IternextUnpackEndCheck(__pyx_t_6(__pyx_t_5), 2) < 0) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 800; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_6 = NULL; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; goto __pyx_L6_unpacking_done; __pyx_L5_unpacking_failed:; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_6 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); {__pyx_filename = __pyx_f[6]; __pyx_lineno = 800; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_L6_unpacking_done:; } if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_dtype))))) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 800; __pyx_clineno = __LINE__; goto __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; /* "numpy.pxd":802 * 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 = PyInt_FromLong((__pyx_v_end - __pyx_v_f)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 802; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = PyInt_FromLong((__pyx_v_offset[0])); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 802; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = PyNumber_Subtract(__pyx_v_new_offset, __pyx_t_3); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 802; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyNumber_Subtract(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 802; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyObject_RichCompare(__pyx_t_3, __pyx_int_15, Py_LT); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 802; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 802; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_7) { /* "numpy.pxd":803 * * if (end - f) - (new_offset - offset[0]) < 15: * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") # <<<<<<<<<<<<<< * * if ((child.byteorder == '>' and little_endian) or */ __pyx_t_5 = PyObject_Call(__pyx_builtin_RuntimeError, ((PyObject *)__pyx_k_tuple_215), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 803; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_Raise(__pyx_t_5, 0, 0, 0); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; {__pyx_filename = __pyx_f[6]; __pyx_lineno = 803; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L7; } __pyx_L7:; /* "numpy.pxd":805 * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") * * if ((child.byteorder == '>' and little_endian) or # <<<<<<<<<<<<<< * (child.byteorder == '<' 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) { __pyx_t_8 = (__pyx_v_little_endian != 0); } else { __pyx_t_8 = __pyx_t_7; } if (!__pyx_t_8) { /* "numpy.pxd":806 * * if ((child.byteorder == '>' and little_endian) or * (child.byteorder == '<' 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) { __pyx_t_9 = ((!(__pyx_v_little_endian != 0)) != 0); __pyx_t_10 = __pyx_t_9; } else { __pyx_t_10 = __pyx_t_7; } __pyx_t_7 = __pyx_t_10; } else { __pyx_t_7 = __pyx_t_8; } if (__pyx_t_7) { /* "numpy.pxd":807 * if ((child.byteorder == '>' and little_endian) or * (child.byteorder == '<' 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_5 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_216), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 807; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_Raise(__pyx_t_5, 0, 0, 0); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; {__pyx_filename = __pyx_f[6]; __pyx_lineno = 807; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L8; } __pyx_L8:; /* "numpy.pxd":817 * * # Output padding bytes * while offset[0] < new_offset: # <<<<<<<<<<<<<< * f[0] = 120 # "x"; pad byte * f += 1 */ while (1) { __pyx_t_5 = PyInt_FromLong((__pyx_v_offset[0])); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 817; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = PyObject_RichCompare(__pyx_t_5, __pyx_v_new_offset, Py_LT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 817; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 817; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (!__pyx_t_7) break; /* "numpy.pxd":818 * # Output padding bytes * while offset[0] < new_offset: * f[0] = 120 # "x"; pad byte # <<<<<<<<<<<<<< * f += 1 * offset[0] += 1 */ (__pyx_v_f[0]) = 120; /* "numpy.pxd":819 * while offset[0] < new_offset: * f[0] = 120 # "x"; pad byte * f += 1 # <<<<<<<<<<<<<< * offset[0] += 1 * */ __pyx_v_f = (__pyx_v_f + 1); /* "numpy.pxd":820 * f[0] = 120 # "x"; pad byte * f += 1 * offset[0] += 1 # <<<<<<<<<<<<<< * * offset[0] += child.itemsize */ __pyx_t_11 = 0; (__pyx_v_offset[__pyx_t_11]) = ((__pyx_v_offset[__pyx_t_11]) + 1); } /* "numpy.pxd":822 * offset[0] += 1 * * offset[0] += child.itemsize # <<<<<<<<<<<<<< * * if not PyDataType_HASFIELDS(child): */ __pyx_t_11 = 0; (__pyx_v_offset[__pyx_t_11]) = ((__pyx_v_offset[__pyx_t_11]) + __pyx_v_child->elsize); /* "numpy.pxd":824 * offset[0] += child.itemsize * * if not PyDataType_HASFIELDS(child): # <<<<<<<<<<<<<< * t = child.type_num * if end - f < 5: */ __pyx_t_7 = ((!(PyDataType_HASFIELDS(__pyx_v_child) != 0)) != 0); if (__pyx_t_7) { /* "numpy.pxd":825 * * if not PyDataType_HASFIELDS(child): * t = child.type_num # <<<<<<<<<<<<<< * if end - f < 5: * raise RuntimeError(u"Format string allocated too short.") */ __pyx_t_3 = PyInt_FromLong(__pyx_v_child->type_num); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 825; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_XDECREF_SET(__pyx_v_t, __pyx_t_3); __pyx_t_3 = 0; /* "numpy.pxd":826 * if not PyDataType_HASFIELDS(child): * t = child.type_num * if end - f < 5: # <<<<<<<<<<<<<< * raise RuntimeError(u"Format string allocated too short.") * */ __pyx_t_7 = (((__pyx_v_end - __pyx_v_f) < 5) != 0); if (__pyx_t_7) { /* "numpy.pxd":827 * 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_3 = PyObject_Call(__pyx_builtin_RuntimeError, ((PyObject *)__pyx_k_tuple_218), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 827; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[6]; __pyx_lineno = 827; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L12; } __pyx_L12:; /* "numpy.pxd":830 * * # 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_3 = PyInt_FromLong(NPY_BYTE); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 830; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 830; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 830; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_7) { (__pyx_v_f[0]) = 98; goto __pyx_L13; } /* "numpy.pxd":831 * # 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_5 = PyInt_FromLong(NPY_UBYTE); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 831; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 831; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 831; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_7) { (__pyx_v_f[0]) = 66; goto __pyx_L13; } /* "numpy.pxd":832 * 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_3 = PyInt_FromLong(NPY_SHORT); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 832; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 832; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 832; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_7) { (__pyx_v_f[0]) = 104; goto __pyx_L13; } /* "numpy.pxd":833 * 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_5 = PyInt_FromLong(NPY_USHORT); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 833; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 833; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 833; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_7) { (__pyx_v_f[0]) = 72; goto __pyx_L13; } /* "numpy.pxd":834 * 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_3 = PyInt_FromLong(NPY_INT); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 834; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 834; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 834; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_7) { (__pyx_v_f[0]) = 105; goto __pyx_L13; } /* "numpy.pxd":835 * 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_5 = PyInt_FromLong(NPY_UINT); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 835; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 835; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 835; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_7) { (__pyx_v_f[0]) = 73; goto __pyx_L13; } /* "numpy.pxd":836 * 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_3 = PyInt_FromLong(NPY_LONG); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 836; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 836; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 836; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_7) { (__pyx_v_f[0]) = 108; goto __pyx_L13; } /* "numpy.pxd":837 * 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_5 = PyInt_FromLong(NPY_ULONG); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 837; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 837; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 837; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_7) { (__pyx_v_f[0]) = 76; goto __pyx_L13; } /* "numpy.pxd":838 * 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_3 = PyInt_FromLong(NPY_LONGLONG); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 838; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 838; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 838; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_7) { (__pyx_v_f[0]) = 113; goto __pyx_L13; } /* "numpy.pxd":839 * 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_5 = PyInt_FromLong(NPY_ULONGLONG); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 839; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 839; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 839; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_7) { (__pyx_v_f[0]) = 81; goto __pyx_L13; } /* "numpy.pxd":840 * 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_3 = PyInt_FromLong(NPY_FLOAT); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 840; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 840; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 840; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_7) { (__pyx_v_f[0]) = 102; goto __pyx_L13; } /* "numpy.pxd":841 * 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_5 = PyInt_FromLong(NPY_DOUBLE); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 841; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 841; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 841; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_7) { (__pyx_v_f[0]) = 100; goto __pyx_L13; } /* "numpy.pxd":842 * 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_3 = PyInt_FromLong(NPY_LONGDOUBLE); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 842; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 842; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 842; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_7) { (__pyx_v_f[0]) = 103; goto __pyx_L13; } /* "numpy.pxd":843 * 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_5 = PyInt_FromLong(NPY_CFLOAT); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 843; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 843; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 843; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_7) { (__pyx_v_f[0]) = 90; (__pyx_v_f[1]) = 102; __pyx_v_f = (__pyx_v_f + 1); goto __pyx_L13; } /* "numpy.pxd":844 * 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_3 = PyInt_FromLong(NPY_CDOUBLE); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 844; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 844; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 844; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_7) { (__pyx_v_f[0]) = 90; (__pyx_v_f[1]) = 100; __pyx_v_f = (__pyx_v_f + 1); goto __pyx_L13; } /* "numpy.pxd":845 * 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_5 = PyInt_FromLong(NPY_CLONGDOUBLE); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 845; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 845; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 845; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_7) { (__pyx_v_f[0]) = 90; (__pyx_v_f[1]) = 103; __pyx_v_f = (__pyx_v_f + 1); goto __pyx_L13; } /* "numpy.pxd":846 * 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_3 = PyInt_FromLong(NPY_OBJECT); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 846; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 846; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 846; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_7) { (__pyx_v_f[0]) = 79; goto __pyx_L13; } /*else*/ { /* "numpy.pxd":848 * elif t == NPY_OBJECT: f[0] = 79 #"O" * else: * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) # <<<<<<<<<<<<<< * f += 1 * else: */ __pyx_t_5 = PyNumber_Remainder(((PyObject *)__pyx_kp_u_213), __pyx_v_t); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 848; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_5)); __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 848; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_t_5)); __Pyx_GIVEREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; __pyx_t_5 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 848; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; __Pyx_Raise(__pyx_t_5, 0, 0, 0); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; {__pyx_filename = __pyx_f[6]; __pyx_lineno = 848; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_L13:; /* "numpy.pxd":849 * 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); goto __pyx_L11; } /*else*/ { /* "numpy.pxd":853 * # Cython ignores struct boundary information ("T{...}"), * # so don't output it * f = _util_dtypestring(child, f, end, offset) # <<<<<<<<<<<<<< * return f * */ __pyx_t_12 = __pyx_f_5numpy__util_dtypestring(__pyx_v_child, __pyx_v_f, __pyx_v_end, __pyx_v_offset); if (unlikely(__pyx_t_12 == NULL)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 853; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_f = __pyx_t_12; } __pyx_L11:; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "numpy.pxd":854 * # so don't output it * f = _util_dtypestring(child, f, end, offset) * return f # <<<<<<<<<<<<<< * * */ __pyx_r = __pyx_v_f; goto __pyx_L0; __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("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; } /* "numpy.pxd":969 * * * 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); /* "numpy.pxd":971 * 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) { /* "numpy.pxd":972 * cdef PyObject* baseptr * if base is None: * baseptr = NULL # <<<<<<<<<<<<<< * else: * Py_INCREF(base) # important to do this before decref below! */ __pyx_v_baseptr = NULL; goto __pyx_L3; } /*else*/ { /* "numpy.pxd":974 * baseptr = NULL * else: * Py_INCREF(base) # important to do this before decref below! # <<<<<<<<<<<<<< * baseptr = base * Py_XDECREF(arr.base) */ Py_INCREF(__pyx_v_base); /* "numpy.pxd":975 * 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:; /* "numpy.pxd":976 * 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); /* "numpy.pxd":977 * baseptr = base * Py_XDECREF(arr.base) * arr.base = baseptr # <<<<<<<<<<<<<< * * cdef inline object get_array_base(ndarray arr): */ __pyx_v_arr->base = __pyx_v_baseptr; __Pyx_RefNannyFinishContext(); } /* "numpy.pxd":979 * 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); /* "numpy.pxd":980 * * 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) { /* "numpy.pxd":981 * cdef inline object get_array_base(ndarray arr): * if arr.base is NULL: * return None # <<<<<<<<<<<<<< * else: * return arr.base */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(Py_None); __pyx_r = Py_None; goto __pyx_L0; goto __pyx_L3; } /*else*/ { /* "numpy.pxd":983 * return None * else: * return arr.base # <<<<<<<<<<<<<< */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_arr->base)); __pyx_r = ((PyObject *)__pyx_v_arr->base); goto __pyx_L0; } __pyx_L3:; __pyx_r = Py_None; __Pyx_INCREF(Py_None); __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } static struct __pyx_vtabstruct_6pandas_5algos_IndexableSkiplist __pyx_vtable_6pandas_5algos_IndexableSkiplist; static PyObject *__pyx_tp_new_6pandas_5algos_IndexableSkiplist(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { struct __pyx_obj_6pandas_5algos_IndexableSkiplist *p; PyObject *o; o = (*t->tp_alloc)(t, 0); if (unlikely(!o)) return 0; p = ((struct __pyx_obj_6pandas_5algos_IndexableSkiplist *)o); p->__pyx_vtab = __pyx_vtabptr_6pandas_5algos_IndexableSkiplist; p->head = ((struct __pyx_obj_6pandas_5algos_Node *)Py_None); Py_INCREF(Py_None); return o; } static void __pyx_tp_dealloc_6pandas_5algos_IndexableSkiplist(PyObject *o) { struct __pyx_obj_6pandas_5algos_IndexableSkiplist *p = (struct __pyx_obj_6pandas_5algos_IndexableSkiplist *)o; PyObject_GC_UnTrack(o); Py_CLEAR(p->head); (*Py_TYPE(o)->tp_free)(o); } static int __pyx_tp_traverse_6pandas_5algos_IndexableSkiplist(PyObject *o, visitproc v, void *a) { int e; struct __pyx_obj_6pandas_5algos_IndexableSkiplist *p = (struct __pyx_obj_6pandas_5algos_IndexableSkiplist *)o; if (p->head) { e = (*v)(((PyObject*)p->head), a); if (e) return e; } return 0; } static int __pyx_tp_clear_6pandas_5algos_IndexableSkiplist(PyObject *o) { struct __pyx_obj_6pandas_5algos_IndexableSkiplist *p = (struct __pyx_obj_6pandas_5algos_IndexableSkiplist *)o; PyObject* tmp; tmp = ((PyObject*)p->head); p->head = ((struct __pyx_obj_6pandas_5algos_Node *)Py_None); Py_INCREF(Py_None); Py_XDECREF(tmp); return 0; } static PyObject *__pyx_sq_item_6pandas_5algos_IndexableSkiplist(PyObject *o, Py_ssize_t i) { PyObject *r; PyObject *x = PyInt_FromSsize_t(i); if(!x) return 0; r = Py_TYPE(o)->tp_as_mapping->mp_subscript(o, x); Py_DECREF(x); return r; } static PyMethodDef __pyx_methods_6pandas_5algos_IndexableSkiplist[] = { {__Pyx_NAMESTR("get"), (PyCFunction)__pyx_pw_6pandas_5algos_17IndexableSkiplist_7get, METH_O, __Pyx_DOCSTR(0)}, {__Pyx_NAMESTR("insert"), (PyCFunction)__pyx_pw_6pandas_5algos_17IndexableSkiplist_9insert, METH_O, __Pyx_DOCSTR(0)}, {__Pyx_NAMESTR("remove"), (PyCFunction)__pyx_pw_6pandas_5algos_17IndexableSkiplist_11remove, METH_O, __Pyx_DOCSTR(0)}, {0, 0, 0, 0} }; static PySequenceMethods __pyx_tp_as_sequence_IndexableSkiplist = { __pyx_pw_6pandas_5algos_17IndexableSkiplist_3__len__, /*sq_length*/ 0, /*sq_concat*/ 0, /*sq_repeat*/ __pyx_sq_item_6pandas_5algos_IndexableSkiplist, /*sq_item*/ 0, /*sq_slice*/ 0, /*sq_ass_item*/ 0, /*sq_ass_slice*/ 0, /*sq_contains*/ 0, /*sq_inplace_concat*/ 0, /*sq_inplace_repeat*/ }; static PyMappingMethods __pyx_tp_as_mapping_IndexableSkiplist = { __pyx_pw_6pandas_5algos_17IndexableSkiplist_3__len__, /*mp_length*/ __pyx_pw_6pandas_5algos_17IndexableSkiplist_5__getitem__, /*mp_subscript*/ 0, /*mp_ass_subscript*/ }; static PyTypeObject __pyx_type_6pandas_5algos_IndexableSkiplist = { PyVarObject_HEAD_INIT(0, 0) __Pyx_NAMESTR("pandas.algos.IndexableSkiplist"), /*tp_name*/ sizeof(struct __pyx_obj_6pandas_5algos_IndexableSkiplist), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_6pandas_5algos_IndexableSkiplist, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #else 0, /*reserved*/ #endif 0, /*tp_repr*/ 0, /*tp_as_number*/ &__pyx_tp_as_sequence_IndexableSkiplist, /*tp_as_sequence*/ &__pyx_tp_as_mapping_IndexableSkiplist, /*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*/ __Pyx_DOCSTR("\n Sorted collection supporting O(lg n) insertion, removal, and\n lookup by rank.\n "), /*tp_doc*/ __pyx_tp_traverse_6pandas_5algos_IndexableSkiplist, /*tp_traverse*/ __pyx_tp_clear_6pandas_5algos_IndexableSkiplist, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_6pandas_5algos_IndexableSkiplist, /*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_5algos_17IndexableSkiplist_1__init__, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_6pandas_5algos_IndexableSkiplist, /*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*/ #if PY_VERSION_HEX >= 0x02060000 0, /*tp_version_tag*/ #endif #if PY_VERSION_HEX >= 0x030400a1 && defined(Py_TPFLAGS_HAVE_FINALIZE) 0, /*tp_finalize*/ #endif }; static PyObject *__pyx_tp_new_6pandas_5algos_Node(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { struct __pyx_obj_6pandas_5algos_Node *p; PyObject *o; o = (*t->tp_alloc)(t, 0); if (unlikely(!o)) return 0; p = ((struct __pyx_obj_6pandas_5algos_Node *)o); p->next = ((PyObject*)Py_None); Py_INCREF(Py_None); p->width = ((PyObject*)Py_None); Py_INCREF(Py_None); return o; } static void __pyx_tp_dealloc_6pandas_5algos_Node(PyObject *o) { struct __pyx_obj_6pandas_5algos_Node *p = (struct __pyx_obj_6pandas_5algos_Node *)o; PyObject_GC_UnTrack(o); Py_CLEAR(p->next); Py_CLEAR(p->width); (*Py_TYPE(o)->tp_free)(o); } static int __pyx_tp_traverse_6pandas_5algos_Node(PyObject *o, visitproc v, void *a) { int e; struct __pyx_obj_6pandas_5algos_Node *p = (struct __pyx_obj_6pandas_5algos_Node *)o; if (p->next) { e = (*v)(p->next, a); if (e) return e; } if (p->width) { e = (*v)(p->width, a); if (e) return e; } return 0; } static int __pyx_tp_clear_6pandas_5algos_Node(PyObject *o) { struct __pyx_obj_6pandas_5algos_Node *p = (struct __pyx_obj_6pandas_5algos_Node *)o; PyObject* tmp; tmp = ((PyObject*)p->next); p->next = ((PyObject*)Py_None); Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->width); p->width = ((PyObject*)Py_None); Py_INCREF(Py_None); Py_XDECREF(tmp); return 0; } static PyObject *__pyx_getprop_6pandas_5algos_4Node_value(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6pandas_5algos_4Node_5value_1__get__(o); } static int __pyx_setprop_6pandas_5algos_4Node_value(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { return __pyx_pw_6pandas_5algos_4Node_5value_3__set__(o, v); } else { PyErr_SetString(PyExc_NotImplementedError, "__del__"); return -1; } } static PyObject *__pyx_getprop_6pandas_5algos_4Node_next(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6pandas_5algos_4Node_4next_1__get__(o); } static int __pyx_setprop_6pandas_5algos_4Node_next(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { return __pyx_pw_6pandas_5algos_4Node_4next_3__set__(o, v); } else { return __pyx_pw_6pandas_5algos_4Node_4next_5__del__(o); } } static PyObject *__pyx_getprop_6pandas_5algos_4Node_width(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6pandas_5algos_4Node_5width_1__get__(o); } static int __pyx_setprop_6pandas_5algos_4Node_width(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { return __pyx_pw_6pandas_5algos_4Node_5width_3__set__(o, v); } else { return __pyx_pw_6pandas_5algos_4Node_5width_5__del__(o); } } static PyMethodDef __pyx_methods_6pandas_5algos_Node[] = { {0, 0, 0, 0} }; static struct PyGetSetDef __pyx_getsets_6pandas_5algos_Node[] = { {(char *)"value", __pyx_getprop_6pandas_5algos_4Node_value, __pyx_setprop_6pandas_5algos_4Node_value, 0, 0}, {(char *)"next", __pyx_getprop_6pandas_5algos_4Node_next, __pyx_setprop_6pandas_5algos_4Node_next, 0, 0}, {(char *)"width", __pyx_getprop_6pandas_5algos_4Node_width, __pyx_setprop_6pandas_5algos_4Node_width, 0, 0}, {0, 0, 0, 0, 0} }; static PyTypeObject __pyx_type_6pandas_5algos_Node = { PyVarObject_HEAD_INIT(0, 0) __Pyx_NAMESTR("pandas.algos.Node"), /*tp_name*/ sizeof(struct __pyx_obj_6pandas_5algos_Node), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_6pandas_5algos_Node, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #else 0, /*reserved*/ #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*/ 0, /*tp_doc*/ __pyx_tp_traverse_6pandas_5algos_Node, /*tp_traverse*/ __pyx_tp_clear_6pandas_5algos_Node, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_6pandas_5algos_Node, /*tp_methods*/ 0, /*tp_members*/ __pyx_getsets_6pandas_5algos_Node, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ __pyx_pw_6pandas_5algos_4Node_1__init__, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_6pandas_5algos_Node, /*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*/ #if PY_VERSION_HEX >= 0x02060000 0, /*tp_version_tag*/ #endif #if PY_VERSION_HEX >= 0x030400a1 && defined(Py_TPFLAGS_HAVE_FINALIZE) 0, /*tp_finalize*/ #endif }; static PyMethodDef __pyx_methods[] = { {__Pyx_NAMESTR("ensure_platform_int"), (PyCFunction)__pyx_pw_6pandas_5algos_87ensure_platform_int, METH_O, __Pyx_DOCSTR(0)}, {__Pyx_NAMESTR("ensure_float64"), (PyCFunction)__pyx_pw_6pandas_5algos_89ensure_float64, METH_O, __Pyx_DOCSTR(0)}, {__Pyx_NAMESTR("ensure_float32"), (PyCFunction)__pyx_pw_6pandas_5algos_91ensure_float32, METH_O, __Pyx_DOCSTR(0)}, {__Pyx_NAMESTR("ensure_int8"), (PyCFunction)__pyx_pw_6pandas_5algos_93ensure_int8, METH_O, __Pyx_DOCSTR(0)}, {__Pyx_NAMESTR("ensure_int16"), (PyCFunction)__pyx_pw_6pandas_5algos_95ensure_int16, METH_O, __Pyx_DOCSTR(0)}, {__Pyx_NAMESTR("ensure_int32"), (PyCFunction)__pyx_pw_6pandas_5algos_97ensure_int32, METH_O, __Pyx_DOCSTR(0)}, {__Pyx_NAMESTR("ensure_int64"), (PyCFunction)__pyx_pw_6pandas_5algos_99ensure_int64, METH_O, __Pyx_DOCSTR(0)}, {__Pyx_NAMESTR("ensure_object"), (PyCFunction)__pyx_pw_6pandas_5algos_101ensure_object, METH_O, __Pyx_DOCSTR(0)}, {__Pyx_NAMESTR("map_indices_float64"), (PyCFunction)__pyx_pw_6pandas_5algos_103map_indices_float64, METH_O, __Pyx_DOCSTR(__pyx_doc_6pandas_5algos_102map_indices_float64)}, {__Pyx_NAMESTR("map_indices_float32"), (PyCFunction)__pyx_pw_6pandas_5algos_105map_indices_float32, METH_O, __Pyx_DOCSTR(__pyx_doc_6pandas_5algos_104map_indices_float32)}, {__Pyx_NAMESTR("map_indices_object"), (PyCFunction)__pyx_pw_6pandas_5algos_107map_indices_object, METH_O, __Pyx_DOCSTR(__pyx_doc_6pandas_5algos_106map_indices_object)}, {__Pyx_NAMESTR("map_indices_int32"), (PyCFunction)__pyx_pw_6pandas_5algos_109map_indices_int32, METH_O, __Pyx_DOCSTR(__pyx_doc_6pandas_5algos_108map_indices_int32)}, {__Pyx_NAMESTR("map_indices_int64"), (PyCFunction)__pyx_pw_6pandas_5algos_111map_indices_int64, METH_O, __Pyx_DOCSTR(__pyx_doc_6pandas_5algos_110map_indices_int64)}, {__Pyx_NAMESTR("map_indices_bool"), (PyCFunction)__pyx_pw_6pandas_5algos_113map_indices_bool, METH_O, __Pyx_DOCSTR(__pyx_doc_6pandas_5algos_112map_indices_bool)}, {0, 0, 0, 0} }; #if PY_MAJOR_VERSION >= 3 static struct PyModuleDef __pyx_moduledef = { #if PY_VERSION_HEX < 0x03020000 { PyObject_HEAD_INIT(NULL) NULL, 0, NULL }, #else PyModuleDef_HEAD_INIT, #endif __Pyx_NAMESTR("algos"), 0, /* m_doc */ -1, /* m_size */ __pyx_methods /* m_methods */, NULL, /* m_reload */ NULL, /* m_traverse */ NULL, /* m_clear */ NULL /* m_free */ }; #endif static __Pyx_StringTabEntry __pyx_string_tab[] = { {&__pyx_kp_s_1, __pyx_k_1, sizeof(__pyx_k_1), 0, 0, 1, 0}, {&__pyx_n_s_106, __pyx_k_106, sizeof(__pyx_k_106), 0, 0, 1, 1}, {&__pyx_n_s_107, __pyx_k_107, sizeof(__pyx_k_107), 0, 0, 1, 1}, {&__pyx_kp_s_200, __pyx_k_200, sizeof(__pyx_k_200), 0, 0, 1, 0}, {&__pyx_kp_s_203, __pyx_k_203, sizeof(__pyx_k_203), 0, 0, 1, 0}, {&__pyx_kp_s_206, __pyx_k_206, sizeof(__pyx_k_206), 0, 0, 1, 0}, {&__pyx_kp_u_207, __pyx_k_207, sizeof(__pyx_k_207), 0, 1, 0, 0}, {&__pyx_kp_u_209, __pyx_k_209, sizeof(__pyx_k_209), 0, 1, 0, 0}, {&__pyx_kp_u_211, __pyx_k_211, sizeof(__pyx_k_211), 0, 1, 0, 0}, {&__pyx_kp_u_213, __pyx_k_213, sizeof(__pyx_k_213), 0, 1, 0, 0}, {&__pyx_kp_u_214, __pyx_k_214, sizeof(__pyx_k_214), 0, 1, 0, 0}, {&__pyx_kp_u_217, __pyx_k_217, sizeof(__pyx_k_217), 0, 1, 0, 0}, {&__pyx_kp_s_221, __pyx_k_221, sizeof(__pyx_k_221), 0, 0, 1, 0}, {&__pyx_n_s_222, __pyx_k_222, sizeof(__pyx_k_222), 0, 0, 1, 1}, {&__pyx_n_s_231, __pyx_k_231, sizeof(__pyx_k_231), 0, 0, 1, 1}, {&__pyx_kp_s_25, __pyx_k_25, sizeof(__pyx_k_25), 0, 0, 1, 0}, {&__pyx_n_s_290, __pyx_k_290, sizeof(__pyx_k_290), 0, 0, 1, 1}, {&__pyx_n_s_295, __pyx_k_295, sizeof(__pyx_k_295), 0, 0, 1, 1}, {&__pyx_kp_s_300, __pyx_k_300, sizeof(__pyx_k_300), 0, 0, 1, 0}, {&__pyx_kp_s_314, __pyx_k_314, sizeof(__pyx_k_314), 0, 0, 1, 0}, {&__pyx_kp_s_35, __pyx_k_35, sizeof(__pyx_k_35), 0, 0, 1, 0}, {&__pyx_n_s_351, __pyx_k_351, sizeof(__pyx_k_351), 0, 0, 1, 1}, {&__pyx_n_s_354, __pyx_k_354, sizeof(__pyx_k_354), 0, 0, 1, 1}, {&__pyx_n_s_357, __pyx_k_357, sizeof(__pyx_k_357), 0, 0, 1, 1}, {&__pyx_kp_s_36, __pyx_k_36, sizeof(__pyx_k_36), 0, 0, 1, 0}, {&__pyx_n_s_360, __pyx_k_360, sizeof(__pyx_k_360), 0, 0, 1, 1}, {&__pyx_n_s_363, __pyx_k_363, sizeof(__pyx_k_363), 0, 0, 1, 1}, {&__pyx_n_s_366, __pyx_k_366, sizeof(__pyx_k_366), 0, 0, 1, 1}, {&__pyx_n_s_369, __pyx_k_369, sizeof(__pyx_k_369), 0, 0, 1, 1}, {&__pyx_n_s_372, __pyx_k_372, sizeof(__pyx_k_372), 0, 0, 1, 1}, {&__pyx_n_s_375, __pyx_k_375, sizeof(__pyx_k_375), 0, 0, 1, 1}, {&__pyx_n_s_378, __pyx_k_378, sizeof(__pyx_k_378), 0, 0, 1, 1}, {&__pyx_n_s_381, __pyx_k_381, sizeof(__pyx_k_381), 0, 0, 1, 1}, {&__pyx_n_s_386, __pyx_k_386, sizeof(__pyx_k_386), 0, 0, 1, 1}, {&__pyx_n_s_389, __pyx_k_389, sizeof(__pyx_k_389), 0, 0, 1, 1}, {&__pyx_n_s_392, __pyx_k_392, sizeof(__pyx_k_392), 0, 0, 1, 1}, {&__pyx_n_s_395, __pyx_k_395, sizeof(__pyx_k_395), 0, 0, 1, 1}, {&__pyx_n_s_398, __pyx_k_398, sizeof(__pyx_k_398), 0, 0, 1, 1}, {&__pyx_kp_s_40, __pyx_k_40, sizeof(__pyx_k_40), 0, 0, 1, 0}, {&__pyx_n_s_401, __pyx_k_401, sizeof(__pyx_k_401), 0, 0, 1, 1}, {&__pyx_n_s_404, __pyx_k_404, sizeof(__pyx_k_404), 0, 0, 1, 1}, {&__pyx_n_s_407, __pyx_k_407, sizeof(__pyx_k_407), 0, 0, 1, 1}, {&__pyx_kp_s_41, __pyx_k_41, sizeof(__pyx_k_41), 0, 0, 1, 0}, {&__pyx_n_s_452, __pyx_k_452, sizeof(__pyx_k_452), 0, 0, 1, 1}, {&__pyx_n_s_46, __pyx_k_46, sizeof(__pyx_k_46), 0, 0, 1, 1}, {&__pyx_n_s_461, __pyx_k_461, sizeof(__pyx_k_461), 0, 0, 1, 1}, {&__pyx_n_s_468, __pyx_k_468, sizeof(__pyx_k_468), 0, 0, 1, 1}, {&__pyx_n_s_473, __pyx_k_473, sizeof(__pyx_k_473), 0, 0, 1, 1}, {&__pyx_n_s_476, __pyx_k_476, sizeof(__pyx_k_476), 0, 0, 1, 1}, {&__pyx_n_s_479, __pyx_k_479, sizeof(__pyx_k_479), 0, 0, 1, 1}, {&__pyx_n_s_482, __pyx_k_482, sizeof(__pyx_k_482), 0, 0, 1, 1}, {&__pyx_n_s_485, __pyx_k_485, sizeof(__pyx_k_485), 0, 0, 1, 1}, {&__pyx_n_s_488, __pyx_k_488, sizeof(__pyx_k_488), 0, 0, 1, 1}, {&__pyx_n_s_491, __pyx_k_491, sizeof(__pyx_k_491), 0, 0, 1, 1}, {&__pyx_n_s_494, __pyx_k_494, sizeof(__pyx_k_494), 0, 0, 1, 1}, {&__pyx_n_s_497, __pyx_k_497, sizeof(__pyx_k_497), 0, 0, 1, 1}, {&__pyx_n_s_500, __pyx_k_500, sizeof(__pyx_k_500), 0, 0, 1, 1}, {&__pyx_n_s_503, __pyx_k_503, sizeof(__pyx_k_503), 0, 0, 1, 1}, {&__pyx_n_s_506, __pyx_k_506, sizeof(__pyx_k_506), 0, 0, 1, 1}, {&__pyx_n_s_509, __pyx_k_509, sizeof(__pyx_k_509), 0, 0, 1, 1}, {&__pyx_kp_s_51, __pyx_k_51, sizeof(__pyx_k_51), 0, 0, 1, 0}, {&__pyx_n_s_512, __pyx_k_512, sizeof(__pyx_k_512), 0, 0, 1, 1}, {&__pyx_n_s_515, __pyx_k_515, sizeof(__pyx_k_515), 0, 0, 1, 1}, {&__pyx_n_s_518, __pyx_k_518, sizeof(__pyx_k_518), 0, 0, 1, 1}, {&__pyx_n_s_521, __pyx_k_521, sizeof(__pyx_k_521), 0, 0, 1, 1}, {&__pyx_n_s_524, __pyx_k_524, sizeof(__pyx_k_524), 0, 0, 1, 1}, {&__pyx_n_s_527, __pyx_k_527, sizeof(__pyx_k_527), 0, 0, 1, 1}, {&__pyx_n_s_530, __pyx_k_530, sizeof(__pyx_k_530), 0, 0, 1, 1}, {&__pyx_n_s_533, __pyx_k_533, sizeof(__pyx_k_533), 0, 0, 1, 1}, {&__pyx_n_s_536, __pyx_k_536, sizeof(__pyx_k_536), 0, 0, 1, 1}, {&__pyx_n_s_539, __pyx_k_539, sizeof(__pyx_k_539), 0, 0, 1, 1}, {&__pyx_n_s_542, __pyx_k_542, sizeof(__pyx_k_542), 0, 0, 1, 1}, {&__pyx_n_s_545, __pyx_k_545, sizeof(__pyx_k_545), 0, 0, 1, 1}, {&__pyx_n_s_548, __pyx_k_548, sizeof(__pyx_k_548), 0, 0, 1, 1}, {&__pyx_n_s_551, __pyx_k_551, sizeof(__pyx_k_551), 0, 0, 1, 1}, {&__pyx_n_s_554, __pyx_k_554, sizeof(__pyx_k_554), 0, 0, 1, 1}, {&__pyx_n_s_557, __pyx_k_557, sizeof(__pyx_k_557), 0, 0, 1, 1}, {&__pyx_n_s_560, __pyx_k_560, sizeof(__pyx_k_560), 0, 0, 1, 1}, {&__pyx_n_s_563, __pyx_k_563, sizeof(__pyx_k_563), 0, 0, 1, 1}, {&__pyx_n_s_566, __pyx_k_566, sizeof(__pyx_k_566), 0, 0, 1, 1}, {&__pyx_n_s_569, __pyx_k_569, sizeof(__pyx_k_569), 0, 0, 1, 1}, {&__pyx_n_s_572, __pyx_k_572, sizeof(__pyx_k_572), 0, 0, 1, 1}, {&__pyx_n_s_575, __pyx_k_575, sizeof(__pyx_k_575), 0, 0, 1, 1}, {&__pyx_n_s_578, __pyx_k_578, sizeof(__pyx_k_578), 0, 0, 1, 1}, {&__pyx_n_s_581, __pyx_k_581, sizeof(__pyx_k_581), 0, 0, 1, 1}, {&__pyx_n_s_584, __pyx_k_584, sizeof(__pyx_k_584), 0, 0, 1, 1}, {&__pyx_n_s_587, __pyx_k_587, sizeof(__pyx_k_587), 0, 0, 1, 1}, {&__pyx_n_s_590, __pyx_k_590, sizeof(__pyx_k_590), 0, 0, 1, 1}, {&__pyx_n_s_593, __pyx_k_593, sizeof(__pyx_k_593), 0, 0, 1, 1}, {&__pyx_n_s_598, __pyx_k_598, sizeof(__pyx_k_598), 0, 0, 1, 1}, {&__pyx_n_s_601, __pyx_k_601, sizeof(__pyx_k_601), 0, 0, 1, 1}, {&__pyx_n_s_604, __pyx_k_604, sizeof(__pyx_k_604), 0, 0, 1, 1}, {&__pyx_n_s_607, __pyx_k_607, sizeof(__pyx_k_607), 0, 0, 1, 1}, {&__pyx_n_s_610, __pyx_k_610, sizeof(__pyx_k_610), 0, 0, 1, 1}, {&__pyx_n_s_613, __pyx_k_613, sizeof(__pyx_k_613), 0, 0, 1, 1}, {&__pyx_n_s_616, __pyx_k_616, sizeof(__pyx_k_616), 0, 0, 1, 1}, {&__pyx_n_s_619, __pyx_k_619, sizeof(__pyx_k_619), 0, 0, 1, 1}, {&__pyx_n_s_622, __pyx_k_622, sizeof(__pyx_k_622), 0, 0, 1, 1}, {&__pyx_n_s_625, __pyx_k_625, sizeof(__pyx_k_625), 0, 0, 1, 1}, {&__pyx_n_s_628, __pyx_k_628, sizeof(__pyx_k_628), 0, 0, 1, 1}, {&__pyx_n_s_631, __pyx_k_631, sizeof(__pyx_k_631), 0, 0, 1, 1}, {&__pyx_n_s_634, __pyx_k_634, sizeof(__pyx_k_634), 0, 0, 1, 1}, {&__pyx_n_s_637, __pyx_k_637, sizeof(__pyx_k_637), 0, 0, 1, 1}, {&__pyx_n_s_640, __pyx_k_640, sizeof(__pyx_k_640), 0, 0, 1, 1}, {&__pyx_n_s_643, __pyx_k_643, sizeof(__pyx_k_643), 0, 0, 1, 1}, {&__pyx_n_s_646, __pyx_k_646, sizeof(__pyx_k_646), 0, 0, 1, 1}, {&__pyx_n_s_649, __pyx_k_649, sizeof(__pyx_k_649), 0, 0, 1, 1}, {&__pyx_n_s_652, __pyx_k_652, sizeof(__pyx_k_652), 0, 0, 1, 1}, {&__pyx_n_s_655, __pyx_k_655, sizeof(__pyx_k_655), 0, 0, 1, 1}, {&__pyx_n_s_674, __pyx_k_674, sizeof(__pyx_k_674), 0, 0, 1, 1}, {&__pyx_n_s_677, __pyx_k_677, sizeof(__pyx_k_677), 0, 0, 1, 1}, {&__pyx_n_s_684, __pyx_k_684, sizeof(__pyx_k_684), 0, 0, 1, 1}, {&__pyx_n_s_687, __pyx_k_687, sizeof(__pyx_k_687), 0, 0, 1, 1}, {&__pyx_n_s_694, __pyx_k_694, sizeof(__pyx_k_694), 0, 0, 1, 1}, {&__pyx_n_s_697, __pyx_k_697, sizeof(__pyx_k_697), 0, 0, 1, 1}, {&__pyx_n_s_704, __pyx_k_704, sizeof(__pyx_k_704), 0, 0, 1, 1}, {&__pyx_n_s_707, __pyx_k_707, sizeof(__pyx_k_707), 0, 0, 1, 1}, {&__pyx_n_s_714, __pyx_k_714, sizeof(__pyx_k_714), 0, 0, 1, 1}, {&__pyx_n_s_717, __pyx_k_717, sizeof(__pyx_k_717), 0, 0, 1, 1}, {&__pyx_n_s_724, __pyx_k_724, sizeof(__pyx_k_724), 0, 0, 1, 1}, {&__pyx_n_s_727, __pyx_k_727, sizeof(__pyx_k_727), 0, 0, 1, 1}, {&__pyx_n_s_734, __pyx_k_734, sizeof(__pyx_k_734), 0, 0, 1, 1}, {&__pyx_n_s_737, __pyx_k_737, sizeof(__pyx_k_737), 0, 0, 1, 1}, {&__pyx_n_s_744, __pyx_k_744, sizeof(__pyx_k_744), 0, 0, 1, 1}, {&__pyx_n_s_747, __pyx_k_747, sizeof(__pyx_k_747), 0, 0, 1, 1}, {&__pyx_n_s_754, __pyx_k_754, sizeof(__pyx_k_754), 0, 0, 1, 1}, {&__pyx_n_s_757, __pyx_k_757, sizeof(__pyx_k_757), 0, 0, 1, 1}, {&__pyx_n_s_760, __pyx_k_760, sizeof(__pyx_k_760), 0, 0, 1, 1}, {&__pyx_n_s_763, __pyx_k_763, sizeof(__pyx_k_763), 0, 0, 1, 1}, {&__pyx_n_s_766, __pyx_k_766, sizeof(__pyx_k_766), 0, 0, 1, 1}, {&__pyx_n_s_769, __pyx_k_769, sizeof(__pyx_k_769), 0, 0, 1, 1}, {&__pyx_n_s_772, __pyx_k_772, sizeof(__pyx_k_772), 0, 0, 1, 1}, {&__pyx_n_s_775, __pyx_k_775, sizeof(__pyx_k_775), 0, 0, 1, 1}, {&__pyx_n_s_778, __pyx_k_778, sizeof(__pyx_k_778), 0, 0, 1, 1}, {&__pyx_n_s_781, __pyx_k_781, sizeof(__pyx_k_781), 0, 0, 1, 1}, {&__pyx_n_s_784, __pyx_k_784, sizeof(__pyx_k_784), 0, 0, 1, 1}, {&__pyx_n_s_787, __pyx_k_787, sizeof(__pyx_k_787), 0, 0, 1, 1}, {&__pyx_n_s_790, __pyx_k_790, sizeof(__pyx_k_790), 0, 0, 1, 1}, {&__pyx_n_s_793, __pyx_k_793, sizeof(__pyx_k_793), 0, 0, 1, 1}, {&__pyx_n_s_796, __pyx_k_796, sizeof(__pyx_k_796), 0, 0, 1, 1}, {&__pyx_n_s_799, __pyx_k_799, sizeof(__pyx_k_799), 0, 0, 1, 1}, {&__pyx_n_s_802, __pyx_k_802, sizeof(__pyx_k_802), 0, 0, 1, 1}, {&__pyx_n_s_805, __pyx_k_805, sizeof(__pyx_k_805), 0, 0, 1, 1}, {&__pyx_n_s_808, __pyx_k_808, sizeof(__pyx_k_808), 0, 0, 1, 1}, {&__pyx_n_s_811, __pyx_k_811, sizeof(__pyx_k_811), 0, 0, 1, 1}, {&__pyx_kp_s_99, __pyx_k_99, sizeof(__pyx_k_99), 0, 0, 1, 0}, {&__pyx_n_s__A, __pyx_k__A, sizeof(__pyx_k__A), 0, 0, 1, 1}, {&__pyx_n_s__AssertionError, __pyx_k__AssertionError, sizeof(__pyx_k__AssertionError), 0, 0, 1, 1}, {&__pyx_n_s__B, __pyx_k__B, sizeof(__pyx_k__B), 0, 0, 1, 1}, {&__pyx_n_s__C, __pyx_k__C, sizeof(__pyx_k__C), 0, 0, 1, 1}, {&__pyx_n_s__D, __pyx_k__D, sizeof(__pyx_k__D), 0, 0, 1, 1}, {&__pyx_n_s__IndexError, __pyx_k__IndexError, sizeof(__pyx_k__IndexError), 0, 0, 1, 1}, {&__pyx_n_s__Infinity, __pyx_k__Infinity, sizeof(__pyx_k__Infinity), 0, 0, 1, 1}, {&__pyx_n_s__K, __pyx_k__K, sizeof(__pyx_k__K), 0, 0, 1, 1}, {&__pyx_n_s__KeyError, __pyx_k__KeyError, sizeof(__pyx_k__KeyError), 0, 0, 1, 1}, {&__pyx_n_s__N, __pyx_k__N, sizeof(__pyx_k__N), 0, 0, 1, 1}, {&__pyx_n_s__NA, __pyx_k__NA, sizeof(__pyx_k__NA), 0, 0, 1, 1}, {&__pyx_n_s__NIL, __pyx_k__NIL, sizeof(__pyx_k__NIL), 0, 0, 1, 1}, {&__pyx_n_s__NINF, __pyx_k__NINF, sizeof(__pyx_k__NINF), 0, 0, 1, 1}, {&__pyx_n_s__NaN, __pyx_k__NaN, sizeof(__pyx_k__NaN), 0, 0, 1, 1}, {&__pyx_n_s__NegInfinity, __pyx_k__NegInfinity, sizeof(__pyx_k__NegInfinity), 0, 0, 1, 1}, {&__pyx_n_s__NotImplementedError, __pyx_k__NotImplementedError, sizeof(__pyx_k__NotImplementedError), 0, 0, 1, 1}, {&__pyx_n_s__O, __pyx_k__O, sizeof(__pyx_k__O), 0, 0, 1, 1}, {&__pyx_n_s__R, __pyx_k__R, sizeof(__pyx_k__R), 0, 0, 1, 1}, {&__pyx_n_s__RuntimeError, __pyx_k__RuntimeError, sizeof(__pyx_k__RuntimeError), 0, 0, 1, 1}, {&__pyx_n_s__S, __pyx_k__S, sizeof(__pyx_k__S), 0, 0, 1, 1}, {&__pyx_n_s__T, __pyx_k__T, sizeof(__pyx_k__T), 0, 0, 1, 1}, {&__pyx_n_s__TypeError, __pyx_k__TypeError, sizeof(__pyx_k__TypeError), 0, 0, 1, 1}, {&__pyx_n_s__ValueError, __pyx_k__ValueError, sizeof(__pyx_k__ValueError), 0, 0, 1, 1}, {&__pyx_n_s____class__, __pyx_k____class__, sizeof(__pyx_k____class__), 0, 0, 1, 1}, {&__pyx_n_s____cmp__, __pyx_k____cmp__, sizeof(__pyx_k____cmp__), 0, 0, 1, 1}, {&__pyx_n_s____eq__, __pyx_k____eq__, sizeof(__pyx_k____eq__), 0, 0, 1, 1}, {&__pyx_n_s____ge__, __pyx_k____ge__, sizeof(__pyx_k____ge__), 0, 0, 1, 1}, {&__pyx_n_s____gt__, __pyx_k____gt__, sizeof(__pyx_k____gt__), 0, 0, 1, 1}, {&__pyx_n_s____import__, __pyx_k____import__, sizeof(__pyx_k____import__), 0, 0, 1, 1}, {&__pyx_n_s____le__, __pyx_k____le__, sizeof(__pyx_k____le__), 0, 0, 1, 1}, {&__pyx_n_s____lt__, __pyx_k____lt__, sizeof(__pyx_k____lt__), 0, 0, 1, 1}, {&__pyx_n_s____main__, __pyx_k____main__, sizeof(__pyx_k____main__), 0, 0, 1, 1}, {&__pyx_n_s____metaclass__, __pyx_k____metaclass__, sizeof(__pyx_k____metaclass__), 0, 0, 1, 1}, {&__pyx_n_s____module__, __pyx_k____module__, sizeof(__pyx_k____module__), 0, 0, 1, 1}, {&__pyx_n_s____ne__, __pyx_k____ne__, sizeof(__pyx_k____ne__), 0, 0, 1, 1}, {&__pyx_n_s____pyx_getbuffer, __pyx_k____pyx_getbuffer, sizeof(__pyx_k____pyx_getbuffer), 0, 0, 1, 1}, {&__pyx_n_s____pyx_releasebuffer, __pyx_k____pyx_releasebuffer, sizeof(__pyx_k____pyx_releasebuffer), 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____qualname__, __pyx_k____qualname__, sizeof(__pyx_k____qualname__), 0, 0, 1, 1}, {&__pyx_n_s____test__, __pyx_k____test__, sizeof(__pyx_k____test__), 0, 0, 1, 1}, {&__pyx_n_s___as, __pyx_k___as, sizeof(__pyx_k___as), 0, 0, 1, 1}, {&__pyx_n_s___check_minp, __pyx_k___check_minp, sizeof(__pyx_k___check_minp), 0, 0, 1, 1}, {&__pyx_n_s___counts, __pyx_k___counts, sizeof(__pyx_k___counts), 0, 0, 1, 1}, {&__pyx_n_s___get_result_indexer, __pyx_k___get_result_indexer, sizeof(__pyx_k___get_result_indexer), 0, 0, 1, 1}, {&__pyx_n_s___return_false, __pyx_k___return_false, sizeof(__pyx_k___return_false), 0, 0, 1, 1}, {&__pyx_n_s___return_true, __pyx_k___return_true, sizeof(__pyx_k___return_true), 0, 0, 1, 1}, {&__pyx_n_s__a, __pyx_k__a, sizeof(__pyx_k__a), 0, 0, 1, 1}, {&__pyx_n_s__adj, __pyx_k__adj, sizeof(__pyx_k__adj), 0, 0, 1, 1}, {&__pyx_n_s__adjust, __pyx_k__adjust, sizeof(__pyx_k__adjust), 0, 0, 1, 1}, {&__pyx_n_s__ai, __pyx_k__ai, sizeof(__pyx_k__ai), 0, 0, 1, 1}, {&__pyx_n_s__aold, __pyx_k__aold, sizeof(__pyx_k__aold), 0, 0, 1, 1}, {&__pyx_n_s__arange, __pyx_k__arange, sizeof(__pyx_k__arange), 0, 0, 1, 1}, {&__pyx_n_s__arg, __pyx_k__arg, sizeof(__pyx_k__arg), 0, 0, 1, 1}, {&__pyx_n_s__argsort, __pyx_k__argsort, sizeof(__pyx_k__argsort), 0, 0, 1, 1}, {&__pyx_n_s__argsorted, __pyx_k__argsorted, sizeof(__pyx_k__argsorted), 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__arrmap_bool, __pyx_k__arrmap_bool, sizeof(__pyx_k__arrmap_bool), 0, 0, 1, 1}, {&__pyx_n_s__arrmap_float32, __pyx_k__arrmap_float32, sizeof(__pyx_k__arrmap_float32), 0, 0, 1, 1}, {&__pyx_n_s__arrmap_float64, __pyx_k__arrmap_float64, sizeof(__pyx_k__arrmap_float64), 0, 0, 1, 1}, {&__pyx_n_s__arrmap_int32, __pyx_k__arrmap_int32, sizeof(__pyx_k__arrmap_int32), 0, 0, 1, 1}, {&__pyx_n_s__arrmap_int64, __pyx_k__arrmap_int64, sizeof(__pyx_k__arrmap_int64), 0, 0, 1, 1}, {&__pyx_n_s__arrmap_object, __pyx_k__arrmap_object, sizeof(__pyx_k__arrmap_object), 0, 0, 1, 1}, {&__pyx_n_s__asarray, __pyx_k__asarray, sizeof(__pyx_k__asarray), 0, 0, 1, 1}, {&__pyx_n_s__ascending, __pyx_k__ascending, sizeof(__pyx_k__ascending), 0, 0, 1, 1}, {&__pyx_n_s__astype, __pyx_k__astype, sizeof(__pyx_k__astype), 0, 0, 1, 1}, {&__pyx_n_s__average, __pyx_k__average, sizeof(__pyx_k__average), 0, 0, 1, 1}, {&__pyx_n_s__avg, __pyx_k__avg, sizeof(__pyx_k__avg), 0, 0, 1, 1}, {&__pyx_n_s__avg_wgt, __pyx_k__avg_wgt, sizeof(__pyx_k__avg_wgt), 0, 0, 1, 1}, {&__pyx_n_s__axis, __pyx_k__axis, sizeof(__pyx_k__axis), 0, 0, 1, 1}, {&__pyx_n_s__b, __pyx_k__b, sizeof(__pyx_k__b), 0, 0, 1, 1}, {&__pyx_n_s__backfill_bool, __pyx_k__backfill_bool, sizeof(__pyx_k__backfill_bool), 0, 0, 1, 1}, {&__pyx_n_s__backfill_float32, __pyx_k__backfill_float32, sizeof(__pyx_k__backfill_float32), 0, 0, 1, 1}, {&__pyx_n_s__backfill_float64, __pyx_k__backfill_float64, sizeof(__pyx_k__backfill_float64), 0, 0, 1, 1}, {&__pyx_n_s__backfill_int32, __pyx_k__backfill_int32, sizeof(__pyx_k__backfill_int32), 0, 0, 1, 1}, {&__pyx_n_s__backfill_int64, __pyx_k__backfill_int64, sizeof(__pyx_k__backfill_int64), 0, 0, 1, 1}, {&__pyx_n_s__backfill_object, __pyx_k__backfill_object, sizeof(__pyx_k__backfill_object), 0, 0, 1, 1}, {&__pyx_n_s__bins, __pyx_k__bins, sizeof(__pyx_k__bins), 0, 0, 1, 1}, {&__pyx_n_s__buf, __pyx_k__buf, sizeof(__pyx_k__buf), 0, 0, 1, 1}, {&__pyx_n_s__bufarr, __pyx_k__bufarr, sizeof(__pyx_k__bufarr), 0, 0, 1, 1}, {&__pyx_n_s__c, __pyx_k__c, sizeof(__pyx_k__c), 0, 0, 1, 1}, {&__pyx_n_s__c_contiguous, __pyx_k__c_contiguous, sizeof(__pyx_k__c_contiguous), 0, 0, 1, 1}, {&__pyx_n_s__com, __pyx_k__com, sizeof(__pyx_k__com), 0, 0, 1, 1}, {&__pyx_n_s__copy, __pyx_k__copy, sizeof(__pyx_k__copy), 0, 0, 1, 1}, {&__pyx_n_s__count, __pyx_k__count, sizeof(__pyx_k__count), 0, 0, 1, 1}, {&__pyx_n_s__counts, __pyx_k__counts, sizeof(__pyx_k__counts), 0, 0, 1, 1}, {&__pyx_n_s__cov, __pyx_k__cov, sizeof(__pyx_k__cov), 0, 0, 1, 1}, {&__pyx_n_s__ct, __pyx_k__ct, sizeof(__pyx_k__ct), 0, 0, 1, 1}, {&__pyx_n_s__cur, __pyx_k__cur, sizeof(__pyx_k__cur), 0, 0, 1, 1}, {&__pyx_n_s__data, __pyx_k__data, sizeof(__pyx_k__data), 0, 0, 1, 1}, {&__pyx_n_s__datetime, __pyx_k__datetime, sizeof(__pyx_k__datetime), 0, 0, 1, 1}, {&__pyx_n_s__day, __pyx_k__day, sizeof(__pyx_k__day), 0, 0, 1, 1}, {&__pyx_n_s__ddof, __pyx_k__ddof, sizeof(__pyx_k__ddof), 0, 0, 1, 1}, {&__pyx_n_s__diff_2d_float32, __pyx_k__diff_2d_float32, sizeof(__pyx_k__diff_2d_float32), 0, 0, 1, 1}, {&__pyx_n_s__diff_2d_float64, __pyx_k__diff_2d_float64, sizeof(__pyx_k__diff_2d_float64), 0, 0, 1, 1}, {&__pyx_n_s__diff_2d_int16, __pyx_k__diff_2d_int16, sizeof(__pyx_k__diff_2d_int16), 0, 0, 1, 1}, {&__pyx_n_s__diff_2d_int32, __pyx_k__diff_2d_int32, sizeof(__pyx_k__diff_2d_int32), 0, 0, 1, 1}, {&__pyx_n_s__diff_2d_int64, __pyx_k__diff_2d_int64, sizeof(__pyx_k__diff_2d_int64), 0, 0, 1, 1}, {&__pyx_n_s__diff_2d_int8, __pyx_k__diff_2d_int8, sizeof(__pyx_k__diff_2d_int8), 0, 0, 1, 1}, {&__pyx_n_s__dim, __pyx_k__dim, sizeof(__pyx_k__dim), 0, 0, 1, 1}, {&__pyx_n_s__dims, __pyx_k__dims, sizeof(__pyx_k__dims), 0, 0, 1, 1}, {&__pyx_n_s__divisor, __pyx_k__divisor, sizeof(__pyx_k__divisor), 0, 0, 1, 1}, {&__pyx_n_s__dtype, __pyx_k__dtype, sizeof(__pyx_k__dtype), 0, 0, 1, 1}, {&__pyx_n_s__dups, __pyx_k__dups, sizeof(__pyx_k__dups), 0, 0, 1, 1}, {&__pyx_n_s__e, __pyx_k__e, sizeof(__pyx_k__e), 0, 0, 1, 1}, {&__pyx_n_s__empty, __pyx_k__empty, sizeof(__pyx_k__empty), 0, 0, 1, 1}, {&__pyx_n_s__empty_like, __pyx_k__empty_like, sizeof(__pyx_k__empty_like), 0, 0, 1, 1}, {&__pyx_n_s__end, __pyx_k__end, sizeof(__pyx_k__end), 0, 0, 1, 1}, {&__pyx_n_s__ewma, __pyx_k__ewma, sizeof(__pyx_k__ewma), 0, 0, 1, 1}, {&__pyx_n_s__expected_size, __pyx_k__expected_size, sizeof(__pyx_k__expected_size), 0, 0, 1, 1}, {&__pyx_n_s__f8, __pyx_k__f8, sizeof(__pyx_k__f8), 0, 0, 1, 1}, {&__pyx_n_s__f_contiguous, __pyx_k__f_contiguous, sizeof(__pyx_k__f_contiguous), 0, 0, 1, 1}, {&__pyx_n_s__ffill_by_group, __pyx_k__ffill_by_group, sizeof(__pyx_k__ffill_by_group), 0, 0, 1, 1}, {&__pyx_n_s__ffill_indexer, __pyx_k__ffill_indexer, sizeof(__pyx_k__ffill_indexer), 0, 0, 1, 1}, {&__pyx_n_s__fill, __pyx_k__fill, sizeof(__pyx_k__fill), 0, 0, 1, 1}, {&__pyx_n_s__fill_count, __pyx_k__fill_count, sizeof(__pyx_k__fill_count), 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__first, __pyx_k__first, sizeof(__pyx_k__first), 0, 0, 1, 1}, {&__pyx_n_s__flags, __pyx_k__flags, sizeof(__pyx_k__flags), 0, 0, 1, 1}, {&__pyx_n_s__float16, __pyx_k__float16, sizeof(__pyx_k__float16), 0, 0, 1, 1}, {&__pyx_n_s__float32, __pyx_k__float32, sizeof(__pyx_k__float32), 0, 0, 1, 1}, {&__pyx_n_s__float64, __pyx_k__float64, sizeof(__pyx_k__float64), 0, 0, 1, 1}, {&__pyx_n_s__full_outer_join, __pyx_k__full_outer_join, sizeof(__pyx_k__full_outer_join), 0, 0, 1, 1}, {&__pyx_n_s__func, __pyx_k__func, sizeof(__pyx_k__func), 0, 0, 1, 1}, {&__pyx_n_s__fv, __pyx_k__fv, sizeof(__pyx_k__fv), 0, 0, 1, 1}, {&__pyx_n_s__get, __pyx_k__get, sizeof(__pyx_k__get), 0, 0, 1, 1}, {&__pyx_n_s__gid, __pyx_k__gid, sizeof(__pyx_k__gid), 0, 0, 1, 1}, {&__pyx_n_s__got_first, __pyx_k__got_first, sizeof(__pyx_k__got_first), 0, 0, 1, 1}, {&__pyx_n_s__group_add_float32, __pyx_k__group_add_float32, sizeof(__pyx_k__group_add_float32), 0, 0, 1, 1}, {&__pyx_n_s__group_add_float64, __pyx_k__group_add_float64, sizeof(__pyx_k__group_add_float64), 0, 0, 1, 1}, {&__pyx_n_s__group_ids, __pyx_k__group_ids, sizeof(__pyx_k__group_ids), 0, 0, 1, 1}, {&__pyx_n_s__group_labels, __pyx_k__group_labels, sizeof(__pyx_k__group_labels), 0, 0, 1, 1}, {&__pyx_n_s__group_last_float32, __pyx_k__group_last_float32, sizeof(__pyx_k__group_last_float32), 0, 0, 1, 1}, {&__pyx_n_s__group_last_float64, __pyx_k__group_last_float64, sizeof(__pyx_k__group_last_float64), 0, 0, 1, 1}, {&__pyx_n_s__group_last_object, __pyx_k__group_last_object, sizeof(__pyx_k__group_last_object), 0, 0, 1, 1}, {&__pyx_n_s__group_max_float32, __pyx_k__group_max_float32, sizeof(__pyx_k__group_max_float32), 0, 0, 1, 1}, {&__pyx_n_s__group_max_float64, __pyx_k__group_max_float64, sizeof(__pyx_k__group_max_float64), 0, 0, 1, 1}, {&__pyx_n_s__group_mean_float32, __pyx_k__group_mean_float32, sizeof(__pyx_k__group_mean_float32), 0, 0, 1, 1}, {&__pyx_n_s__group_mean_float64, __pyx_k__group_mean_float64, sizeof(__pyx_k__group_mean_float64), 0, 0, 1, 1}, {&__pyx_n_s__group_median, __pyx_k__group_median, sizeof(__pyx_k__group_median), 0, 0, 1, 1}, {&__pyx_n_s__group_min_float32, __pyx_k__group_min_float32, sizeof(__pyx_k__group_min_float32), 0, 0, 1, 1}, {&__pyx_n_s__group_min_float64, __pyx_k__group_min_float64, sizeof(__pyx_k__group_min_float64), 0, 0, 1, 1}, {&__pyx_n_s__group_nth_float32, __pyx_k__group_nth_float32, sizeof(__pyx_k__group_nth_float32), 0, 0, 1, 1}, {&__pyx_n_s__group_nth_float64, __pyx_k__group_nth_float64, sizeof(__pyx_k__group_nth_float64), 0, 0, 1, 1}, {&__pyx_n_s__group_nth_object, __pyx_k__group_nth_object, sizeof(__pyx_k__group_nth_object), 0, 0, 1, 1}, {&__pyx_n_s__group_ohlc_float32, __pyx_k__group_ohlc_float32, sizeof(__pyx_k__group_ohlc_float32), 0, 0, 1, 1}, {&__pyx_n_s__group_ohlc_float64, __pyx_k__group_ohlc_float64, sizeof(__pyx_k__group_ohlc_float64), 0, 0, 1, 1}, {&__pyx_n_s__group_prod_float32, __pyx_k__group_prod_float32, sizeof(__pyx_k__group_prod_float32), 0, 0, 1, 1}, {&__pyx_n_s__group_prod_float64, __pyx_k__group_prod_float64, sizeof(__pyx_k__group_prod_float64), 0, 0, 1, 1}, {&__pyx_n_s__group_var_float32, __pyx_k__group_var_float32, sizeof(__pyx_k__group_var_float32), 0, 0, 1, 1}, {&__pyx_n_s__group_var_float64, __pyx_k__group_var_float64, sizeof(__pyx_k__group_var_float64), 0, 0, 1, 1}, {&__pyx_n_s__groupby_bool, __pyx_k__groupby_bool, sizeof(__pyx_k__groupby_bool), 0, 0, 1, 1}, {&__pyx_n_s__groupby_float32, __pyx_k__groupby_float32, sizeof(__pyx_k__groupby_float32), 0, 0, 1, 1}, {&__pyx_n_s__groupby_float64, __pyx_k__groupby_float64, sizeof(__pyx_k__groupby_float64), 0, 0, 1, 1}, {&__pyx_n_s__groupby_indices, __pyx_k__groupby_indices, sizeof(__pyx_k__groupby_indices), 0, 0, 1, 1}, {&__pyx_n_s__groupby_int32, __pyx_k__groupby_int32, sizeof(__pyx_k__groupby_int32), 0, 0, 1, 1}, {&__pyx_n_s__groupby_int64, __pyx_k__groupby_int64, sizeof(__pyx_k__groupby_int64), 0, 0, 1, 1}, {&__pyx_n_s__groupby_object, __pyx_k__groupby_object, sizeof(__pyx_k__groupby_object), 0, 0, 1, 1}, {&__pyx_n_s__groupsort_indexer, __pyx_k__groupsort_indexer, sizeof(__pyx_k__groupsort_indexer), 0, 0, 1, 1}, {&__pyx_n_s__hour, __pyx_k__hour, sizeof(__pyx_k__hour), 0, 0, 1, 1}, {&__pyx_n_s__i, __pyx_k__i, sizeof(__pyx_k__i), 0, 0, 1, 1}, {&__pyx_n_s__i0, __pyx_k__i0, sizeof(__pyx_k__i0), 0, 0, 1, 1}, {&__pyx_n_s__i8, __pyx_k__i8, sizeof(__pyx_k__i8), 0, 0, 1, 1}, {&__pyx_n_s__ids, __pyx_k__ids, sizeof(__pyx_k__ids), 0, 0, 1, 1}, {&__pyx_n_s__idx, __pyx_k__idx, sizeof(__pyx_k__idx), 0, 0, 1, 1}, {&__pyx_n_s__idx0, __pyx_k__idx0, sizeof(__pyx_k__idx0), 0, 0, 1, 1}, {&__pyx_n_s__idx1, __pyx_k__idx1, sizeof(__pyx_k__idx1), 0, 0, 1, 1}, {&__pyx_n_s__iinfo, __pyx_k__iinfo, sizeof(__pyx_k__iinfo), 0, 0, 1, 1}, {&__pyx_n_s__in_arr, __pyx_k__in_arr, sizeof(__pyx_k__in_arr), 0, 0, 1, 1}, {&__pyx_n_s__in_i, __pyx_k__in_i, sizeof(__pyx_k__in_i), 0, 0, 1, 1}, {&__pyx_n_s__in_k, __pyx_k__in_k, sizeof(__pyx_k__in_k), 0, 0, 1, 1}, {&__pyx_n_s__in_n, __pyx_k__in_n, sizeof(__pyx_k__in_n), 0, 0, 1, 1}, {&__pyx_n_s__index, __pyx_k__index, sizeof(__pyx_k__index), 0, 0, 1, 1}, {&__pyx_n_s__indexer, __pyx_k__indexer, sizeof(__pyx_k__indexer), 0, 0, 1, 1}, {&__pyx_n_s__inf, __pyx_k__inf, sizeof(__pyx_k__inf), 0, 0, 1, 1}, {&__pyx_n_s__infs, __pyx_k__infs, sizeof(__pyx_k__infs), 0, 0, 1, 1}, {&__pyx_n_s__inner_join, __pyx_k__inner_join, sizeof(__pyx_k__inner_join), 0, 0, 1, 1}, {&__pyx_n_s__input, __pyx_k__input, sizeof(__pyx_k__input), 0, 0, 1, 1}, {&__pyx_n_s__insert, __pyx_k__insert, sizeof(__pyx_k__insert), 0, 0, 1, 1}, {&__pyx_n_s__int16, __pyx_k__int16, sizeof(__pyx_k__int16), 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__int_, __pyx_k__int_, sizeof(__pyx_k__int_), 0, 0, 1, 1}, {&__pyx_n_s__is_lexsorted, __pyx_k__is_lexsorted, sizeof(__pyx_k__is_lexsorted), 0, 0, 1, 1}, {&__pyx_n_s__is_monotonic_bool, __pyx_k__is_monotonic_bool, sizeof(__pyx_k__is_monotonic_bool), 0, 0, 1, 1}, {&__pyx_n_s__is_monotonic_int32, __pyx_k__is_monotonic_int32, sizeof(__pyx_k__is_monotonic_int32), 0, 0, 1, 1}, {&__pyx_n_s__is_monotonic_int64, __pyx_k__is_monotonic_int64, sizeof(__pyx_k__is_monotonic_int64), 0, 0, 1, 1}, {&__pyx_n_s__is_monotonic_object, __pyx_k__is_monotonic_object, sizeof(__pyx_k__is_monotonic_object), 0, 0, 1, 1}, {&__pyx_n_s__is_unique, __pyx_k__is_unique, sizeof(__pyx_k__is_unique), 0, 0, 1, 1}, {&__pyx_n_s__isfinite, __pyx_k__isfinite, sizeof(__pyx_k__isfinite), 0, 0, 1, 1}, {&__pyx_n_s__isnan, __pyx_k__isnan, sizeof(__pyx_k__isnan), 0, 0, 1, 1}, {&__pyx_n_s__isnullobj, __pyx_k__isnullobj, sizeof(__pyx_k__isnullobj), 0, 0, 1, 1}, {&__pyx_n_s__isnullobj2d, __pyx_k__isnullobj2d, sizeof(__pyx_k__isnullobj2d), 0, 0, 1, 1}, {&__pyx_n_s__j, __pyx_k__j, sizeof(__pyx_k__j), 0, 0, 1, 1}, {&__pyx_n_s__k, __pyx_k__k, sizeof(__pyx_k__k), 0, 0, 1, 1}, {&__pyx_n_s__keep, __pyx_k__keep, sizeof(__pyx_k__keep), 0, 0, 1, 1}, {&__pyx_n_s__keep_na, __pyx_k__keep_na, sizeof(__pyx_k__keep_na), 0, 0, 1, 1}, {&__pyx_n_s__key, __pyx_k__key, sizeof(__pyx_k__key), 0, 0, 1, 1}, {&__pyx_n_s__kind, __pyx_k__kind, sizeof(__pyx_k__kind), 0, 0, 1, 1}, {&__pyx_n_s__kth_smallest, __pyx_k__kth_smallest, sizeof(__pyx_k__kth_smallest), 0, 0, 1, 1}, {&__pyx_n_s__l, __pyx_k__l, sizeof(__pyx_k__l), 0, 0, 1, 1}, {&__pyx_n_s__lab, __pyx_k__lab, sizeof(__pyx_k__lab), 0, 0, 1, 1}, {&__pyx_n_s__label, __pyx_k__label, sizeof(__pyx_k__label), 0, 0, 1, 1}, {&__pyx_n_s__labels, __pyx_k__labels, sizeof(__pyx_k__labels), 0, 0, 1, 1}, {&__pyx_n_s__last, __pyx_k__last, sizeof(__pyx_k__last), 0, 0, 1, 1}, {&__pyx_n_s__last_obs, __pyx_k__last_obs, sizeof(__pyx_k__last_obs), 0, 0, 1, 1}, {&__pyx_n_s__lc, __pyx_k__lc, sizeof(__pyx_k__lc), 0, 0, 1, 1}, {&__pyx_n_s__left, __pyx_k__left, sizeof(__pyx_k__left), 0, 0, 1, 1}, {&__pyx_n_s__left_count, __pyx_k__left_count, sizeof(__pyx_k__left_count), 0, 0, 1, 1}, {&__pyx_n_s__left_indexer, __pyx_k__left_indexer, sizeof(__pyx_k__left_indexer), 0, 0, 1, 1}, {&__pyx_n_s__left_outer_join, __pyx_k__left_outer_join, sizeof(__pyx_k__left_outer_join), 0, 0, 1, 1}, {&__pyx_n_s__left_pos, __pyx_k__left_pos, sizeof(__pyx_k__left_pos), 0, 0, 1, 1}, {&__pyx_n_s__left_sorter, __pyx_k__left_sorter, sizeof(__pyx_k__left_sorter), 0, 0, 1, 1}, {&__pyx_n_s__length, __pyx_k__length, sizeof(__pyx_k__length), 0, 0, 1, 1}, {&__pyx_n_s__lib, __pyx_k__lib, sizeof(__pyx_k__lib), 0, 0, 1, 1}, {&__pyx_n_s__lim, __pyx_k__lim, sizeof(__pyx_k__lim), 0, 0, 1, 1}, {&__pyx_n_s__limit, __pyx_k__limit, sizeof(__pyx_k__limit), 0, 0, 1, 1}, {&__pyx_n_s__lindexer, __pyx_k__lindexer, sizeof(__pyx_k__lindexer), 0, 0, 1, 1}, {&__pyx_n_s__list_of_arrays, __pyx_k__list_of_arrays, sizeof(__pyx_k__list_of_arrays), 0, 0, 1, 1}, {&__pyx_n_s__loc, __pyx_k__loc, sizeof(__pyx_k__loc), 0, 0, 1, 1}, {&__pyx_n_s__lval, __pyx_k__lval, sizeof(__pyx_k__lval), 0, 0, 1, 1}, {&__pyx_n_s__m, __pyx_k__m, sizeof(__pyx_k__m), 0, 0, 1, 1}, {&__pyx_n_s__mask, __pyx_k__mask, sizeof(__pyx_k__mask), 0, 0, 1, 1}, {&__pyx_n_s__maskedx, __pyx_k__maskedx, sizeof(__pyx_k__maskedx), 0, 0, 1, 1}, {&__pyx_n_s__maskedy, __pyx_k__maskedy, sizeof(__pyx_k__maskedy), 0, 0, 1, 1}, {&__pyx_n_s__mat, __pyx_k__mat, sizeof(__pyx_k__mat), 0, 0, 1, 1}, {&__pyx_n_s__max, __pyx_k__max, sizeof(__pyx_k__max), 0, 0, 1, 1}, {&__pyx_n_s__max_group, __pyx_k__max_group, sizeof(__pyx_k__max_group), 0, 0, 1, 1}, {&__pyx_n_s__max_groups, __pyx_k__max_groups, sizeof(__pyx_k__max_groups), 0, 0, 1, 1}, {&__pyx_n_s__max_subseq, __pyx_k__max_subseq, sizeof(__pyx_k__max_subseq), 0, 0, 1, 1}, {&__pyx_n_s__maxx, __pyx_k__maxx, sizeof(__pyx_k__maxx), 0, 0, 1, 1}, {&__pyx_n_s__mean, __pyx_k__mean, sizeof(__pyx_k__mean), 0, 0, 1, 1}, {&__pyx_n_s__meanx, __pyx_k__meanx, sizeof(__pyx_k__meanx), 0, 0, 1, 1}, {&__pyx_n_s__meany, __pyx_k__meany, sizeof(__pyx_k__meany), 0, 0, 1, 1}, {&__pyx_n_s__median, __pyx_k__median, sizeof(__pyx_k__median), 0, 0, 1, 1}, {&__pyx_n_s__members, __pyx_k__members, sizeof(__pyx_k__members), 0, 0, 1, 1}, {&__pyx_n_s__mergesort, __pyx_k__mergesort, sizeof(__pyx_k__mergesort), 0, 0, 1, 1}, {&__pyx_n_s__microsecond, __pyx_k__microsecond, sizeof(__pyx_k__microsecond), 0, 0, 1, 1}, {&__pyx_n_s__midpoint, __pyx_k__midpoint, sizeof(__pyx_k__midpoint), 0, 0, 1, 1}, {&__pyx_n_s__min, __pyx_k__min, sizeof(__pyx_k__min), 0, 0, 1, 1}, {&__pyx_n_s__min_subseq, __pyx_k__min_subseq, sizeof(__pyx_k__min_subseq), 0, 0, 1, 1}, {&__pyx_n_s__minp, __pyx_k__minp, sizeof(__pyx_k__minp), 0, 0, 1, 1}, {&__pyx_n_s__minpair, __pyx_k__minpair, sizeof(__pyx_k__minpair), 0, 0, 1, 1}, {&__pyx_n_s__minute, __pyx_k__minute, sizeof(__pyx_k__minute), 0, 0, 1, 1}, {&__pyx_n_s__minx, __pyx_k__minx, sizeof(__pyx_k__minx), 0, 0, 1, 1}, {&__pyx_n_s__month, __pyx_k__month, sizeof(__pyx_k__month), 0, 0, 1, 1}, {&__pyx_n_s__n, __pyx_k__n, sizeof(__pyx_k__n), 0, 0, 1, 1}, {&__pyx_n_s__n0, __pyx_k__n0, sizeof(__pyx_k__n0), 0, 0, 1, 1}, {&__pyx_n_s__na_option, __pyx_k__na_option, sizeof(__pyx_k__na_option), 0, 0, 1, 1}, {&__pyx_n_s__nan, __pyx_k__nan, sizeof(__pyx_k__nan), 0, 0, 1, 1}, {&__pyx_n_s__nan_value, __pyx_k__nan_value, sizeof(__pyx_k__nan_value), 0, 0, 1, 1}, {&__pyx_n_s__nancorr, __pyx_k__nancorr, sizeof(__pyx_k__nancorr), 0, 0, 1, 1}, {&__pyx_n_s__nancorr_spearman, __pyx_k__nancorr_spearman, sizeof(__pyx_k__nancorr_spearman), 0, 0, 1, 1}, {&__pyx_n_s__nbins, __pyx_k__nbins, sizeof(__pyx_k__nbins), 0, 0, 1, 1}, {&__pyx_n_s__neg_ct, __pyx_k__neg_ct, sizeof(__pyx_k__neg_ct), 0, 0, 1, 1}, {&__pyx_n_s__new, __pyx_k__new, sizeof(__pyx_k__new), 0, 0, 1, 1}, {&__pyx_n_s__neww, __pyx_k__neww, sizeof(__pyx_k__neww), 0, 0, 1, 1}, {&__pyx_n_s__next, __pyx_k__next, sizeof(__pyx_k__next), 0, 0, 1, 1}, {&__pyx_n_s__ngroups, __pyx_k__ngroups, sizeof(__pyx_k__ngroups), 0, 0, 1, 1}, {&__pyx_n_s__nleft, __pyx_k__nleft, sizeof(__pyx_k__nleft), 0, 0, 1, 1}, {&__pyx_n_s__nlevels, __pyx_k__nlevels, sizeof(__pyx_k__nlevels), 0, 0, 1, 1}, {&__pyx_n_s__nobs, __pyx_k__nobs, sizeof(__pyx_k__nobs), 0, 0, 1, 1}, {&__pyx_n_s__nonzero, __pyx_k__nonzero, sizeof(__pyx_k__nonzero), 0, 0, 1, 1}, {&__pyx_n_s__np, __pyx_k__np, sizeof(__pyx_k__np), 0, 0, 1, 1}, {&__pyx_n_s__nright, __pyx_k__nright, sizeof(__pyx_k__nright), 0, 0, 1, 1}, {&__pyx_n_s__numpy, __pyx_k__numpy, sizeof(__pyx_k__numpy), 0, 0, 1, 1}, {&__pyx_n_s__o, __pyx_k__o, sizeof(__pyx_k__o), 0, 0, 1, 1}, {&__pyx_n_s__object, __pyx_k__object, sizeof(__pyx_k__object), 0, 0, 1, 1}, {&__pyx_n_s__object_, __pyx_k__object_, sizeof(__pyx_k__object_), 0, 0, 1, 1}, {&__pyx_n_s__offset, __pyx_k__offset, sizeof(__pyx_k__offset), 0, 0, 1, 1}, {&__pyx_n_s__old, __pyx_k__old, sizeof(__pyx_k__old), 0, 0, 1, 1}, {&__pyx_n_s__oldbuf, __pyx_k__oldbuf, sizeof(__pyx_k__oldbuf), 0, 0, 1, 1}, {&__pyx_n_s__oldw, __pyx_k__oldw, sizeof(__pyx_k__oldw), 0, 0, 1, 1}, {&__pyx_n_s__ones_like, __pyx_k__ones_like, sizeof(__pyx_k__ones_like), 0, 0, 1, 1}, {&__pyx_n_s__other, __pyx_k__other, sizeof(__pyx_k__other), 0, 0, 1, 1}, {&__pyx_n_s__out, __pyx_k__out, sizeof(__pyx_k__out), 0, 0, 1, 1}, {&__pyx_n_s__output, __pyx_k__output, sizeof(__pyx_k__output), 0, 0, 1, 1}, {&__pyx_n_s__pad_2d_inplace_bool, __pyx_k__pad_2d_inplace_bool, sizeof(__pyx_k__pad_2d_inplace_bool), 0, 0, 1, 1}, {&__pyx_n_s__pad_bool, __pyx_k__pad_bool, sizeof(__pyx_k__pad_bool), 0, 0, 1, 1}, {&__pyx_n_s__pad_float32, __pyx_k__pad_float32, sizeof(__pyx_k__pad_float32), 0, 0, 1, 1}, {&__pyx_n_s__pad_float64, __pyx_k__pad_float64, sizeof(__pyx_k__pad_float64), 0, 0, 1, 1}, {&__pyx_n_s__pad_inplace_bool, __pyx_k__pad_inplace_bool, sizeof(__pyx_k__pad_inplace_bool), 0, 0, 1, 1}, {&__pyx_n_s__pad_inplace_float32, __pyx_k__pad_inplace_float32, sizeof(__pyx_k__pad_inplace_float32), 0, 0, 1, 1}, {&__pyx_n_s__pad_inplace_float64, __pyx_k__pad_inplace_float64, sizeof(__pyx_k__pad_inplace_float64), 0, 0, 1, 1}, {&__pyx_n_s__pad_inplace_int32, __pyx_k__pad_inplace_int32, sizeof(__pyx_k__pad_inplace_int32), 0, 0, 1, 1}, {&__pyx_n_s__pad_inplace_int64, __pyx_k__pad_inplace_int64, sizeof(__pyx_k__pad_inplace_int64), 0, 0, 1, 1}, {&__pyx_n_s__pad_inplace_object, __pyx_k__pad_inplace_object, sizeof(__pyx_k__pad_inplace_object), 0, 0, 1, 1}, {&__pyx_n_s__pad_int32, __pyx_k__pad_int32, sizeof(__pyx_k__pad_int32), 0, 0, 1, 1}, {&__pyx_n_s__pad_int64, __pyx_k__pad_int64, sizeof(__pyx_k__pad_int64), 0, 0, 1, 1}, {&__pyx_n_s__pad_object, __pyx_k__pad_object, sizeof(__pyx_k__pad_object), 0, 0, 1, 1}, {&__pyx_n_s__pandas, __pyx_k__pandas, sizeof(__pyx_k__pandas), 0, 0, 1, 1}, {&__pyx_n_s__periods, __pyx_k__periods, sizeof(__pyx_k__periods), 0, 0, 1, 1}, {&__pyx_n_s__position, __pyx_k__position, sizeof(__pyx_k__position), 0, 0, 1, 1}, {&__pyx_n_s__pre, __pyx_k__pre, sizeof(__pyx_k__pre), 0, 0, 1, 1}, {&__pyx_n_s__prev, __pyx_k__prev, sizeof(__pyx_k__prev), 0, 0, 1, 1}, {&__pyx_n_s__prodx, __pyx_k__prodx, sizeof(__pyx_k__prodx), 0, 0, 1, 1}, {&__pyx_n_s__ptr, __pyx_k__ptr, sizeof(__pyx_k__ptr), 0, 0, 1, 1}, {&__pyx_n_s__put, __pyx_k__put, sizeof(__pyx_k__put), 0, 0, 1, 1}, {&__pyx_n_s__putmask, __pyx_k__putmask, sizeof(__pyx_k__putmask), 0, 0, 1, 1}, {&__pyx_n_s__pydatetime, __pyx_k__pydatetime, sizeof(__pyx_k__pydatetime), 0, 0, 1, 1}, {&__pyx_n_s__quantile, __pyx_k__quantile, sizeof(__pyx_k__quantile), 0, 0, 1, 1}, {&__pyx_n_s__random, __pyx_k__random, sizeof(__pyx_k__random), 0, 0, 1, 1}, {&__pyx_n_s__range, __pyx_k__range, sizeof(__pyx_k__range), 0, 0, 1, 1}, {&__pyx_n_s__rank, __pyx_k__rank, sizeof(__pyx_k__rank), 0, 0, 1, 1}, {&__pyx_n_s__rank_1d_float64, __pyx_k__rank_1d_float64, sizeof(__pyx_k__rank_1d_float64), 0, 0, 1, 1}, {&__pyx_n_s__rank_1d_generic, __pyx_k__rank_1d_generic, sizeof(__pyx_k__rank_1d_generic), 0, 0, 1, 1}, {&__pyx_n_s__rank_1d_int64, __pyx_k__rank_1d_int64, sizeof(__pyx_k__rank_1d_int64), 0, 0, 1, 1}, {&__pyx_n_s__rank_2d_float64, __pyx_k__rank_2d_float64, sizeof(__pyx_k__rank_2d_float64), 0, 0, 1, 1}, {&__pyx_n_s__rank_2d_generic, __pyx_k__rank_2d_generic, sizeof(__pyx_k__rank_2d_generic), 0, 0, 1, 1}, {&__pyx_n_s__rank_2d_int64, __pyx_k__rank_2d_int64, sizeof(__pyx_k__rank_2d_int64), 0, 0, 1, 1}, {&__pyx_n_s__ranks, __pyx_k__ranks, sizeof(__pyx_k__ranks), 0, 0, 1, 1}, {&__pyx_n_s__rc, __pyx_k__rc, sizeof(__pyx_k__rc), 0, 0, 1, 1}, {&__pyx_n_s__remove, __pyx_k__remove, sizeof(__pyx_k__remove), 0, 0, 1, 1}, {&__pyx_n_s__res, __pyx_k__res, sizeof(__pyx_k__res), 0, 0, 1, 1}, {&__pyx_n_s__result, __pyx_k__result, sizeof(__pyx_k__result), 0, 0, 1, 1}, {&__pyx_n_s__resx, __pyx_k__resx, sizeof(__pyx_k__resx), 0, 0, 1, 1}, {&__pyx_n_s__ret, __pyx_k__ret, sizeof(__pyx_k__ret), 0, 0, 1, 1}, {&__pyx_n_s__retry, __pyx_k__retry, sizeof(__pyx_k__retry), 0, 0, 1, 1}, {&__pyx_n_s__rev, __pyx_k__rev, sizeof(__pyx_k__rev), 0, 0, 1, 1}, {&__pyx_n_s__reverse, __pyx_k__reverse, sizeof(__pyx_k__reverse), 0, 0, 1, 1}, {&__pyx_n_s__right, __pyx_k__right, sizeof(__pyx_k__right), 0, 0, 1, 1}, {&__pyx_n_s__right_count, __pyx_k__right_count, sizeof(__pyx_k__right_count), 0, 0, 1, 1}, {&__pyx_n_s__right_indexer, __pyx_k__right_indexer, sizeof(__pyx_k__right_indexer), 0, 0, 1, 1}, {&__pyx_n_s__right_pos, __pyx_k__right_pos, sizeof(__pyx_k__right_pos), 0, 0, 1, 1}, {&__pyx_n_s__right_sorter, __pyx_k__right_sorter, sizeof(__pyx_k__right_sorter), 0, 0, 1, 1}, {&__pyx_n_s__rindexer, __pyx_k__rindexer, sizeof(__pyx_k__rindexer), 0, 0, 1, 1}, {&__pyx_n_s__ring, __pyx_k__ring, sizeof(__pyx_k__ring), 0, 0, 1, 1}, {&__pyx_n_s__roll_generic, __pyx_k__roll_generic, sizeof(__pyx_k__roll_generic), 0, 0, 1, 1}, {&__pyx_n_s__roll_kurt, __pyx_k__roll_kurt, sizeof(__pyx_k__roll_kurt), 0, 0, 1, 1}, {&__pyx_n_s__roll_max, __pyx_k__roll_max, sizeof(__pyx_k__roll_max), 0, 0, 1, 1}, {&__pyx_n_s__roll_max2, __pyx_k__roll_max2, sizeof(__pyx_k__roll_max2), 0, 0, 1, 1}, {&__pyx_n_s__roll_mean, __pyx_k__roll_mean, sizeof(__pyx_k__roll_mean), 0, 0, 1, 1}, {&__pyx_n_s__roll_median_c, __pyx_k__roll_median_c, sizeof(__pyx_k__roll_median_c), 0, 0, 1, 1}, {&__pyx_n_s__roll_median_cython, __pyx_k__roll_median_cython, sizeof(__pyx_k__roll_median_cython), 0, 0, 1, 1}, {&__pyx_n_s__roll_min, __pyx_k__roll_min, sizeof(__pyx_k__roll_min), 0, 0, 1, 1}, {&__pyx_n_s__roll_min2, __pyx_k__roll_min2, sizeof(__pyx_k__roll_min2), 0, 0, 1, 1}, {&__pyx_n_s__roll_quantile, __pyx_k__roll_quantile, sizeof(__pyx_k__roll_quantile), 0, 0, 1, 1}, {&__pyx_n_s__roll_skew, __pyx_k__roll_skew, sizeof(__pyx_k__roll_skew), 0, 0, 1, 1}, {&__pyx_n_s__roll_sum, __pyx_k__roll_sum, sizeof(__pyx_k__roll_sum), 0, 0, 1, 1}, {&__pyx_n_s__roll_var, __pyx_k__roll_var, sizeof(__pyx_k__roll_var), 0, 0, 1, 1}, {&__pyx_n_s__roll_window, __pyx_k__roll_window, sizeof(__pyx_k__roll_window), 0, 0, 1, 1}, {&__pyx_n_s__rval, __pyx_k__rval, sizeof(__pyx_k__rval), 0, 0, 1, 1}, {&__pyx_n_s__s, __pyx_k__s, sizeof(__pyx_k__s), 0, 0, 1, 1}, {&__pyx_n_s__second, __pyx_k__second, sizeof(__pyx_k__second), 0, 0, 1, 1}, {&__pyx_n_s__seen, __pyx_k__seen, sizeof(__pyx_k__seen), 0, 0, 1, 1}, {&__pyx_n_s__self, __pyx_k__self, sizeof(__pyx_k__self), 0, 0, 1, 1}, {&__pyx_n_s__shape, __pyx_k__shape, sizeof(__pyx_k__shape), 0, 0, 1, 1}, {&__pyx_n_s__size, __pyx_k__size, sizeof(__pyx_k__size), 0, 0, 1, 1}, {&__pyx_n_s__skiplist, __pyx_k__skiplist, sizeof(__pyx_k__skiplist), 0, 0, 1, 1}, {&__pyx_n_s__sl, __pyx_k__sl, sizeof(__pyx_k__sl), 0, 0, 1, 1}, {&__pyx_n_s__sort, __pyx_k__sort, sizeof(__pyx_k__sort), 0, 0, 1, 1}, {&__pyx_n_s__sorted_data, __pyx_k__sorted_data, sizeof(__pyx_k__sorted_data), 0, 0, 1, 1}, {&__pyx_n_s__sorter, __pyx_k__sorter, sizeof(__pyx_k__sorter), 0, 0, 1, 1}, {&__pyx_n_s__start, __pyx_k__start, sizeof(__pyx_k__start), 0, 0, 1, 1}, {&__pyx_n_s__stop, __pyx_k__stop, sizeof(__pyx_k__stop), 0, 0, 1, 1}, {&__pyx_n_s__sum_ranks, __pyx_k__sum_ranks, sizeof(__pyx_k__sum_ranks), 0, 0, 1, 1}, {&__pyx_n_s__sum_x, __pyx_k__sum_x, sizeof(__pyx_k__sum_x), 0, 0, 1, 1}, {&__pyx_n_s__sum_xx, __pyx_k__sum_xx, sizeof(__pyx_k__sum_xx), 0, 0, 1, 1}, {&__pyx_n_s__sumx, __pyx_k__sumx, sizeof(__pyx_k__sumx), 0, 0, 1, 1}, {&__pyx_n_s__sumxx, __pyx_k__sumxx, sizeof(__pyx_k__sumxx), 0, 0, 1, 1}, {&__pyx_n_s__sumy, __pyx_k__sumy, sizeof(__pyx_k__sumy), 0, 0, 1, 1}, {&__pyx_n_s__sumyy, __pyx_k__sumyy, sizeof(__pyx_k__sumyy), 0, 0, 1, 1}, {&__pyx_n_s__sx, __pyx_k__sx, sizeof(__pyx_k__sx), 0, 0, 1, 1}, {&__pyx_n_s__sy, __pyx_k__sy, sizeof(__pyx_k__sy), 0, 0, 1, 1}, {&__pyx_n_s__t, __pyx_k__t, sizeof(__pyx_k__t), 0, 0, 1, 1}, {&__pyx_n_s__take, __pyx_k__take, sizeof(__pyx_k__take), 0, 0, 1, 1}, {&__pyx_n_s__take_1d_bool_bool, __pyx_k__take_1d_bool_bool, sizeof(__pyx_k__take_1d_bool_bool), 0, 0, 1, 1}, {&__pyx_n_s__take_1d_bool_object, __pyx_k__take_1d_bool_object, sizeof(__pyx_k__take_1d_bool_object), 0, 0, 1, 1}, {&__pyx_n_s__take_1d_int16_int16, __pyx_k__take_1d_int16_int16, sizeof(__pyx_k__take_1d_int16_int16), 0, 0, 1, 1}, {&__pyx_n_s__take_1d_int16_int32, __pyx_k__take_1d_int16_int32, sizeof(__pyx_k__take_1d_int16_int32), 0, 0, 1, 1}, {&__pyx_n_s__take_1d_int16_int64, __pyx_k__take_1d_int16_int64, sizeof(__pyx_k__take_1d_int16_int64), 0, 0, 1, 1}, {&__pyx_n_s__take_1d_int32_int32, __pyx_k__take_1d_int32_int32, sizeof(__pyx_k__take_1d_int32_int32), 0, 0, 1, 1}, {&__pyx_n_s__take_1d_int32_int64, __pyx_k__take_1d_int32_int64, sizeof(__pyx_k__take_1d_int32_int64), 0, 0, 1, 1}, {&__pyx_n_s__take_1d_int64_int64, __pyx_k__take_1d_int64_int64, sizeof(__pyx_k__take_1d_int64_int64), 0, 0, 1, 1}, {&__pyx_n_s__take_1d_int8_int32, __pyx_k__take_1d_int8_int32, sizeof(__pyx_k__take_1d_int8_int32), 0, 0, 1, 1}, {&__pyx_n_s__take_1d_int8_int64, __pyx_k__take_1d_int8_int64, sizeof(__pyx_k__take_1d_int8_int64), 0, 0, 1, 1}, {&__pyx_n_s__take_1d_int8_int8, __pyx_k__take_1d_int8_int8, sizeof(__pyx_k__take_1d_int8_int8), 0, 0, 1, 1}, {&__pyx_n_s__tiebreak, __pyx_k__tiebreak, sizeof(__pyx_k__tiebreak), 0, 0, 1, 1}, {&__pyx_n_s__tiebreakers, __pyx_k__tiebreakers, sizeof(__pyx_k__tiebreakers), 0, 0, 1, 1}, {&__pyx_n_s__ties_method, __pyx_k__ties_method, sizeof(__pyx_k__ties_method), 0, 0, 1, 1}, {&__pyx_n_s__top, __pyx_k__top, sizeof(__pyx_k__top), 0, 0, 1, 1}, {&__pyx_n_s__tot_wgt, __pyx_k__tot_wgt, sizeof(__pyx_k__tot_wgt), 0, 0, 1, 1}, {&__pyx_n_s__uint8, __pyx_k__uint8, sizeof(__pyx_k__uint8), 0, 0, 1, 1}, {&__pyx_n_s__v, __pyx_k__v, sizeof(__pyx_k__v), 0, 0, 1, 1}, {&__pyx_n_s__val, __pyx_k__val, sizeof(__pyx_k__val), 0, 0, 1, 1}, {&__pyx_n_s__val_in, __pyx_k__val_in, sizeof(__pyx_k__val_in), 0, 0, 1, 1}, {&__pyx_n_s__val_win, __pyx_k__val_win, sizeof(__pyx_k__val_win), 0, 0, 1, 1}, {&__pyx_n_s__valid_locs, __pyx_k__valid_locs, sizeof(__pyx_k__valid_locs), 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__vclose, __pyx_k__vclose, sizeof(__pyx_k__vclose), 0, 0, 1, 1}, {&__pyx_n_s__vecs, __pyx_k__vecs, sizeof(__pyx_k__vecs), 0, 0, 1, 1}, {&__pyx_n_s__vhigh, __pyx_k__vhigh, sizeof(__pyx_k__vhigh), 0, 0, 1, 1}, {&__pyx_n_s__view, __pyx_k__view, sizeof(__pyx_k__view), 0, 0, 1, 1}, {&__pyx_n_s__vlow, __pyx_k__vlow, sizeof(__pyx_k__vlow), 0, 0, 1, 1}, {&__pyx_n_s__vopen, __pyx_k__vopen, sizeof(__pyx_k__vopen), 0, 0, 1, 1}, {&__pyx_n_s__vx, __pyx_k__vx, sizeof(__pyx_k__vx), 0, 0, 1, 1}, {&__pyx_n_s__vy, __pyx_k__vy, sizeof(__pyx_k__vy), 0, 0, 1, 1}, {&__pyx_n_s__w, __pyx_k__w, sizeof(__pyx_k__w), 0, 0, 1, 1}, {&__pyx_n_s__weights, __pyx_k__weights, sizeof(__pyx_k__weights), 0, 0, 1, 1}, {&__pyx_n_s__where, __pyx_k__where, sizeof(__pyx_k__where), 0, 0, 1, 1}, {&__pyx_n_s__width, __pyx_k__width, sizeof(__pyx_k__width), 0, 0, 1, 1}, {&__pyx_n_s__win, __pyx_k__win, sizeof(__pyx_k__win), 0, 0, 1, 1}, {&__pyx_n_s__win_i, __pyx_k__win_i, sizeof(__pyx_k__win_i), 0, 0, 1, 1}, {&__pyx_n_s__win_k, __pyx_k__win_k, sizeof(__pyx_k__win_k), 0, 0, 1, 1}, {&__pyx_n_s__win_n, __pyx_k__win_n, sizeof(__pyx_k__win_n), 0, 0, 1, 1}, {&__pyx_n_s__window, __pyx_k__window, sizeof(__pyx_k__window), 0, 0, 1, 1}, {&__pyx_n_s__x, __pyx_k__x, sizeof(__pyx_k__x), 0, 0, 1, 1}, {&__pyx_n_s__xi, __pyx_k__xi, sizeof(__pyx_k__xi), 0, 0, 1, 1}, {&__pyx_n_s__xx, __pyx_k__xx, sizeof(__pyx_k__xx), 0, 0, 1, 1}, {&__pyx_n_s__xxx, __pyx_k__xxx, sizeof(__pyx_k__xxx), 0, 0, 1, 1}, {&__pyx_n_s__xxxx, __pyx_k__xxxx, sizeof(__pyx_k__xxxx), 0, 0, 1, 1}, {&__pyx_n_s__y, __pyx_k__y, sizeof(__pyx_k__y), 0, 0, 1, 1}, {&__pyx_n_s__year, __pyx_k__year, sizeof(__pyx_k__year), 0, 0, 1, 1}, {&__pyx_n_s__yi, __pyx_k__yi, sizeof(__pyx_k__yi), 0, 0, 1, 1}, {&__pyx_n_s__z, __pyx_k__z, sizeof(__pyx_k__z), 0, 0, 1, 1}, {&__pyx_n_s__zeros, __pyx_k__zeros, sizeof(__pyx_k__zeros), 0, 0, 1, 1}, {&__pyx_n_s__zeros_like, __pyx_k__zeros_like, sizeof(__pyx_k__zeros_like), 0, 0, 1, 1}, {0, 0, 0, 0, 0, 0, 0} }; static int __Pyx_InitCachedBuiltins(void) { __pyx_builtin_object = __Pyx_GetBuiltinName(__pyx_n_s__object); if (!__pyx_builtin_object) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 505; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_n_s__range); if (!__pyx_builtin_range) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 73; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_builtin_KeyError = __Pyx_GetBuiltinName(__pyx_n_s__KeyError); if (!__pyx_builtin_KeyError) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 138; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_builtin_TypeError = __Pyx_GetBuiltinName(__pyx_n_s__TypeError); if (!__pyx_builtin_TypeError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 456; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_builtin_ValueError = __Pyx_GetBuiltinName(__pyx_n_s__ValueError); if (!__pyx_builtin_ValueError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 492; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_builtin_AssertionError = __Pyx_GetBuiltinName(__pyx_n_s__AssertionError); if (!__pyx_builtin_AssertionError) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1971; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_builtin_NotImplementedError = __Pyx_GetBuiltinName(__pyx_n_s__NotImplementedError); if (!__pyx_builtin_NotImplementedError) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6848; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_builtin_IndexError = __Pyx_GetBuiltinName(__pyx_n_s__IndexError); if (!__pyx_builtin_IndexError) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 40; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_builtin_RuntimeError = __Pyx_GetBuiltinName(__pyx_n_s__RuntimeError); if (!__pyx_builtin_RuntimeError) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 803; __pyx_clineno = __LINE__; goto __pyx_L1_error;} return 0; __pyx_L1_error:; return -1; } static int __Pyx_InitCachedConstants(void) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0); /* "pandas/src/skiplist.pyx":138 * * if value != ( ( ( chain[0]).next)[0]).value: * raise KeyError('Not Found') # <<<<<<<<<<<<<< * * # remove one link at each level */ __pyx_k_tuple_2 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_1)); if (unlikely(!__pyx_k_tuple_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 138; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_2); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_2)); /* "pandas/algos.pyx":173 * * if not ascending: * _as = _as[::-1] # <<<<<<<<<<<<<< * * sorted_data = values.take(_as) */ __pyx_k_slice_4 = PySlice_New(Py_None, Py_None, __pyx_int_neg_1); if (unlikely(!__pyx_k_slice_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 173; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_slice_4); __Pyx_GIVEREF(__pyx_k_slice_4); /* "pandas/algos.pyx":176 * * sorted_data = values.take(_as) * argsorted = _as.astype('i8') # <<<<<<<<<<<<<< * * for i in range(n): */ __pyx_k_tuple_5 = PyTuple_Pack(1, ((PyObject *)__pyx_n_s__i8)); if (unlikely(!__pyx_k_tuple_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 176; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_5); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_5)); /* "pandas/algos.pyx":236 * * if not ascending: * _as = _as[::-1] # <<<<<<<<<<<<<< * * sorted_data = values.take(_as) */ __pyx_k_slice_7 = PySlice_New(Py_None, Py_None, __pyx_int_neg_1); if (unlikely(!__pyx_k_slice_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 236; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_slice_7); __Pyx_GIVEREF(__pyx_k_slice_7); /* "pandas/algos.pyx":239 * * sorted_data = values.take(_as) * argsorted = _as.astype('i8') # <<<<<<<<<<<<<< * * for i in range(n): */ __pyx_k_tuple_8 = PyTuple_Pack(1, ((PyObject *)__pyx_n_s__i8)); if (unlikely(!__pyx_k_tuple_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 239; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_8); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_8)); /* "pandas/algos.pyx":307 * tiebreak = TIEBREAK_FIRST_DESCENDING * else: * _as = values.argsort(1) # <<<<<<<<<<<<<< * * if not ascending: */ __pyx_k_tuple_10 = PyTuple_Pack(1, __pyx_int_1); if (unlikely(!__pyx_k_tuple_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 307; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_10); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_10)); /* "pandas/algos.pyx":310 * * if not ascending: * _as = _as[:, ::-1] # <<<<<<<<<<<<<< * * values = _take_2d_float64(values, _as) */ __pyx_k_slice_11 = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_k_slice_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 310; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_slice_11); __Pyx_GIVEREF(__pyx_k_slice_11); __pyx_k_slice_12 = PySlice_New(Py_None, Py_None, __pyx_int_neg_1); if (unlikely(!__pyx_k_slice_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 310; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_slice_12); __Pyx_GIVEREF(__pyx_k_slice_12); __pyx_k_tuple_13 = PyTuple_Pack(2, __pyx_k_slice_11, __pyx_k_slice_12); if (unlikely(!__pyx_k_tuple_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 310; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_13); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_13)); /* "pandas/algos.pyx":313 * * values = _take_2d_float64(values, _as) * argsorted = _as.astype('i8') # <<<<<<<<<<<<<< * * for i in range(n): */ __pyx_k_tuple_14 = PyTuple_Pack(1, ((PyObject *)__pyx_n_s__i8)); if (unlikely(!__pyx_k_tuple_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 313; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_14); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_14)); /* "pandas/algos.pyx":378 * tiebreak = TIEBREAK_FIRST_DESCENDING * else: * _as = values.argsort(1) # <<<<<<<<<<<<<< * * if not ascending: */ __pyx_k_tuple_16 = PyTuple_Pack(1, __pyx_int_1); if (unlikely(!__pyx_k_tuple_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 378; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_16); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_16)); /* "pandas/algos.pyx":381 * * if not ascending: * _as = _as[:, ::-1] # <<<<<<<<<<<<<< * * values = _take_2d_int64(values, _as) */ __pyx_k_slice_17 = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_k_slice_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 381; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_slice_17); __Pyx_GIVEREF(__pyx_k_slice_17); __pyx_k_slice_18 = PySlice_New(Py_None, Py_None, __pyx_int_neg_1); if (unlikely(!__pyx_k_slice_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 381; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_slice_18); __Pyx_GIVEREF(__pyx_k_slice_18); __pyx_k_tuple_19 = PyTuple_Pack(2, __pyx_k_slice_17, __pyx_k_slice_18); if (unlikely(!__pyx_k_tuple_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 381; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_19); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_19)); /* "pandas/algos.pyx":384 * * values = _take_2d_int64(values, _as) * argsorted = _as.astype('i8') # <<<<<<<<<<<<<< * * for i in range(n): */ __pyx_k_tuple_20 = PyTuple_Pack(1, ((PyObject *)__pyx_n_s__i8)); if (unlikely(!__pyx_k_tuple_20)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 384; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_20); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_20)); /* "pandas/algos.pyx":439 * * if values.dtype != np.object_: * values = values.astype('O') # <<<<<<<<<<<<<< * * if ascending ^ (na_option == 'top'): */ __pyx_k_tuple_22 = PyTuple_Pack(1, ((PyObject *)__pyx_n_s__O)); if (unlikely(!__pyx_k_tuple_22)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 439; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_22); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_22)); /* "pandas/algos.pyx":468 * * if not ascending: * _as = _as[::-1] # <<<<<<<<<<<<<< * * sorted_data = values.take(_as) */ __pyx_k_slice_23 = PySlice_New(Py_None, Py_None, __pyx_int_neg_1); if (unlikely(!__pyx_k_slice_23)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 468; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_slice_23); __Pyx_GIVEREF(__pyx_k_slice_23); /* "pandas/algos.pyx":471 * * sorted_data = values.take(_as) * argsorted = _as.astype('i8') # <<<<<<<<<<<<<< * * for i in range(n): */ __pyx_k_tuple_24 = PyTuple_Pack(1, ((PyObject *)__pyx_n_s__i8)); if (unlikely(!__pyx_k_tuple_24)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 471; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_24); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_24)); /* "pandas/algos.pyx":492 * ranks[argsorted[j]] = i + 1 * elif tiebreak == TIEBREAK_FIRST: * raise ValueError('first not supported for non-numeric data') # <<<<<<<<<<<<<< * sum_ranks = dups = 0 * return ranks */ __pyx_k_tuple_26 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_25)); if (unlikely(!__pyx_k_tuple_26)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 492; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_26); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_26)); /* "pandas/algos.pyx":553 * * if values.dtype != np.object_: * values = values.astype('O') # <<<<<<<<<<<<<< * * if ascending ^ (na_option == 'top'): */ __pyx_k_tuple_28 = PyTuple_Pack(1, ((PyObject *)__pyx_n_s__O)); if (unlikely(!__pyx_k_tuple_28)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 553; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_28); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_28)); /* "pandas/algos.pyx":568 * * try: * _as = values.argsort(1) # <<<<<<<<<<<<<< * except TypeError: * values = in_arr */ __pyx_k_tuple_29 = PyTuple_Pack(1, __pyx_int_1); if (unlikely(!__pyx_k_tuple_29)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 568; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_29); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_29)); /* "pandas/algos.pyx":581 * * if not ascending: * _as = _as[:, ::-1] # <<<<<<<<<<<<<< * * values = _take_2d_object(values, _as) */ __pyx_k_slice_30 = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_k_slice_30)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 581; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_slice_30); __Pyx_GIVEREF(__pyx_k_slice_30); __pyx_k_slice_31 = PySlice_New(Py_None, Py_None, __pyx_int_neg_1); if (unlikely(!__pyx_k_slice_31)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 581; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_slice_31); __Pyx_GIVEREF(__pyx_k_slice_31); __pyx_k_tuple_32 = PyTuple_Pack(2, __pyx_k_slice_30, __pyx_k_slice_31); if (unlikely(!__pyx_k_tuple_32)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 581; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_32); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_32)); /* "pandas/algos.pyx":584 * * values = _take_2d_object(values, _as) * argsorted = _as.astype('i8') # <<<<<<<<<<<<<< * * for i in range(n): */ __pyx_k_tuple_33 = PyTuple_Pack(1, ((PyObject *)__pyx_n_s__i8)); if (unlikely(!__pyx_k_tuple_33)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 584; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_33); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_33)); /* "pandas/algos.pyx":607 * ranks[i, argsorted[i, z]] = j + 1 * elif tiebreak == TIEBREAK_FIRST: * raise ValueError('first not supported for ' # <<<<<<<<<<<<<< * 'non-numeric data') * sum_ranks = dups = 0 */ __pyx_k_tuple_34 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_25)); if (unlikely(!__pyx_k_tuple_34)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 607; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_34); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_34)); /* "pandas/algos.pyx":650 * minp = 1 * elif minp < 0: * raise ValueError('min_periods must be >= 0') # <<<<<<<<<<<<<< * return minp * */ __pyx_k_tuple_37 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_36)); if (unlikely(!__pyx_k_tuple_37)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 650; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_37); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_37)); /* "pandas/algos.pyx":753 * * if len(arr) == 0: * return (-1,-1,None) # <<<<<<<<<<<<<< * * m = arr[0] */ __pyx_k_tuple_38 = PyTuple_Pack(3, __pyx_int_neg_1, __pyx_int_neg_1, Py_None); if (unlikely(!__pyx_k_tuple_38)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 753; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_38); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_38)); /* "pandas/algos.pyx":1578 * cdef double_t _get_min(object skiplist, int nobs, int minp): * if nobs >= minp: * return skiplist.get(0) # <<<<<<<<<<<<<< * else: * return NaN */ __pyx_k_tuple_42 = PyTuple_Pack(1, __pyx_int_0); if (unlikely(!__pyx_k_tuple_42)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1578; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_42); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_42)); /* "pandas/algos.pyx":1636 * * if not input.flags.c_contiguous: * input = input.copy('C') # <<<<<<<<<<<<<< * * buf = input.data */ __pyx_k_tuple_43 = PyTuple_Pack(1, ((PyObject *)__pyx_n_s__C)); if (unlikely(!__pyx_k_tuple_43)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1636; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_43); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_43)); /* "pandas/algos.pyx":2087 * * indexer, _counts = groupsort_indexer(labels, ngroups) * counts[:] = _counts[1:] # <<<<<<<<<<<<<< * * data = np.empty((K, N), dtype=np.float64) */ __pyx_k_slice_44 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_k_slice_44)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2087; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_slice_44); __Pyx_GIVEREF(__pyx_k_slice_44); __pyx_k_slice_45 = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_k_slice_45)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2087; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_slice_45); __Pyx_GIVEREF(__pyx_k_slice_45); /* "pandas/src/join.pyx":193 * # length-0 case * res = np.empty(len(indexer), dtype=np.int64) * res.fill(-1) # <<<<<<<<<<<<<< * * return res */ __pyx_k_tuple_48 = PyTuple_Pack(1, __pyx_int_neg_1); if (unlikely(!__pyx_k_tuple_48)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 193; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_48); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_48)); /* "pandas/src/join.pyx":229 * * last_obs = np.empty(max_group, dtype=np.int64) * last_obs.fill(-1) # <<<<<<<<<<<<<< * * for i in range(n): */ __pyx_k_tuple_49 = PyTuple_Pack(1, __pyx_int_neg_1); if (unlikely(!__pyx_k_tuple_49)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 229; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_49); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_49)); /* "pandas/src/generated.pyx":267 * nright = len(new) * indexer = np.empty(nright, dtype=np.int64) * indexer.fill(-1) # <<<<<<<<<<<<<< * * if limit is None: */ __pyx_k_tuple_50 = PyTuple_Pack(1, __pyx_int_neg_1); if (unlikely(!__pyx_k_tuple_50)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 267; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_50); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_50)); /* "pandas/src/generated.pyx":273 * else: * if limit < 0: * raise ValueError('Limit must be non-negative') # <<<<<<<<<<<<<< * lim = limit * */ __pyx_k_tuple_52 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_51)); if (unlikely(!__pyx_k_tuple_52)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 273; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_52); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_52)); /* "pandas/src/generated.pyx":328 * nright = len(new) * indexer = np.empty(nright, dtype=np.int64) * indexer.fill(-1) # <<<<<<<<<<<<<< * * if limit is None: */ __pyx_k_tuple_53 = PyTuple_Pack(1, __pyx_int_neg_1); if (unlikely(!__pyx_k_tuple_53)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 328; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_53); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_53)); /* "pandas/src/generated.pyx":334 * else: * if limit < 0: * raise ValueError('Limit must be non-negative') # <<<<<<<<<<<<<< * lim = limit * */ __pyx_k_tuple_54 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_51)); if (unlikely(!__pyx_k_tuple_54)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 334; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_54); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_54)); /* "pandas/src/generated.pyx":389 * nright = len(new) * indexer = np.empty(nright, dtype=np.int64) * indexer.fill(-1) # <<<<<<<<<<<<<< * * if limit is None: */ __pyx_k_tuple_55 = PyTuple_Pack(1, __pyx_int_neg_1); if (unlikely(!__pyx_k_tuple_55)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 389; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_55); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_55)); /* "pandas/src/generated.pyx":395 * else: * if limit < 0: * raise ValueError('Limit must be non-negative') # <<<<<<<<<<<<<< * lim = limit * */ __pyx_k_tuple_56 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_51)); if (unlikely(!__pyx_k_tuple_56)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 395; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_56); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_56)); /* "pandas/src/generated.pyx":450 * nright = len(new) * indexer = np.empty(nright, dtype=np.int64) * indexer.fill(-1) # <<<<<<<<<<<<<< * * if limit is None: */ __pyx_k_tuple_57 = PyTuple_Pack(1, __pyx_int_neg_1); if (unlikely(!__pyx_k_tuple_57)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 450; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_57); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_57)); /* "pandas/src/generated.pyx":456 * else: * if limit < 0: * raise ValueError('Limit must be non-negative') # <<<<<<<<<<<<<< * lim = limit * */ __pyx_k_tuple_58 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_51)); if (unlikely(!__pyx_k_tuple_58)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 456; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_58); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_58)); /* "pandas/src/generated.pyx":511 * nright = len(new) * indexer = np.empty(nright, dtype=np.int64) * indexer.fill(-1) # <<<<<<<<<<<<<< * * if limit is None: */ __pyx_k_tuple_59 = PyTuple_Pack(1, __pyx_int_neg_1); if (unlikely(!__pyx_k_tuple_59)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 511; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_59); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_59)); /* "pandas/src/generated.pyx":517 * else: * if limit < 0: * raise ValueError('Limit must be non-negative') # <<<<<<<<<<<<<< * lim = limit * */ __pyx_k_tuple_60 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_51)); if (unlikely(!__pyx_k_tuple_60)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 517; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_60); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_60)); /* "pandas/src/generated.pyx":572 * nright = len(new) * indexer = np.empty(nright, dtype=np.int64) * indexer.fill(-1) # <<<<<<<<<<<<<< * * if limit is None: */ __pyx_k_tuple_61 = PyTuple_Pack(1, __pyx_int_neg_1); if (unlikely(!__pyx_k_tuple_61)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 572; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_61); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_61)); /* "pandas/src/generated.pyx":578 * else: * if limit < 0: * raise ValueError('Limit must be non-negative') # <<<<<<<<<<<<<< * lim = limit * */ __pyx_k_tuple_62 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_51)); if (unlikely(!__pyx_k_tuple_62)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 578; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_62); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_62)); /* "pandas/src/generated.pyx":634 * nright = len(new) * indexer = np.empty(nright, dtype=np.int64) * indexer.fill(-1) # <<<<<<<<<<<<<< * * if limit is None: */ __pyx_k_tuple_63 = PyTuple_Pack(1, __pyx_int_neg_1); if (unlikely(!__pyx_k_tuple_63)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 634; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_63); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_63)); /* "pandas/src/generated.pyx":640 * else: * if limit < 0: * raise ValueError('Limit must be non-negative') # <<<<<<<<<<<<<< * lim = limit * */ __pyx_k_tuple_64 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_51)); if (unlikely(!__pyx_k_tuple_64)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 640; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_64); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_64)); /* "pandas/src/generated.pyx":696 * nright = len(new) * indexer = np.empty(nright, dtype=np.int64) * indexer.fill(-1) # <<<<<<<<<<<<<< * * if limit is None: */ __pyx_k_tuple_65 = PyTuple_Pack(1, __pyx_int_neg_1); if (unlikely(!__pyx_k_tuple_65)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 696; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_65); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_65)); /* "pandas/src/generated.pyx":702 * else: * if limit < 0: * raise ValueError('Limit must be non-negative') # <<<<<<<<<<<<<< * lim = limit * */ __pyx_k_tuple_66 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_51)); if (unlikely(!__pyx_k_tuple_66)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 702; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_66); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_66)); /* "pandas/src/generated.pyx":758 * nright = len(new) * indexer = np.empty(nright, dtype=np.int64) * indexer.fill(-1) # <<<<<<<<<<<<<< * * if limit is None: */ __pyx_k_tuple_67 = PyTuple_Pack(1, __pyx_int_neg_1); if (unlikely(!__pyx_k_tuple_67)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 758; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_67); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_67)); /* "pandas/src/generated.pyx":764 * else: * if limit < 0: * raise ValueError('Limit must be non-negative') # <<<<<<<<<<<<<< * lim = limit * */ __pyx_k_tuple_68 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_51)); if (unlikely(!__pyx_k_tuple_68)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 764; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_68); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_68)); /* "pandas/src/generated.pyx":820 * nright = len(new) * indexer = np.empty(nright, dtype=np.int64) * indexer.fill(-1) # <<<<<<<<<<<<<< * * if limit is None: */ __pyx_k_tuple_69 = PyTuple_Pack(1, __pyx_int_neg_1); if (unlikely(!__pyx_k_tuple_69)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 820; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_69); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_69)); /* "pandas/src/generated.pyx":826 * else: * if limit < 0: * raise ValueError('Limit must be non-negative') # <<<<<<<<<<<<<< * lim = limit * */ __pyx_k_tuple_70 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_51)); if (unlikely(!__pyx_k_tuple_70)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 826; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_70); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_70)); /* "pandas/src/generated.pyx":882 * nright = len(new) * indexer = np.empty(nright, dtype=np.int64) * indexer.fill(-1) # <<<<<<<<<<<<<< * * if limit is None: */ __pyx_k_tuple_71 = PyTuple_Pack(1, __pyx_int_neg_1); if (unlikely(!__pyx_k_tuple_71)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 882; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_71); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_71)); /* "pandas/src/generated.pyx":888 * else: * if limit < 0: * raise ValueError('Limit must be non-negative') # <<<<<<<<<<<<<< * lim = limit * */ __pyx_k_tuple_72 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_51)); if (unlikely(!__pyx_k_tuple_72)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 888; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_72); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_72)); /* "pandas/src/generated.pyx":944 * nright = len(new) * indexer = np.empty(nright, dtype=np.int64) * indexer.fill(-1) # <<<<<<<<<<<<<< * * if limit is None: */ __pyx_k_tuple_73 = PyTuple_Pack(1, __pyx_int_neg_1); if (unlikely(!__pyx_k_tuple_73)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 944; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_73); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_73)); /* "pandas/src/generated.pyx":950 * else: * if limit < 0: * raise ValueError('Limit must be non-negative') # <<<<<<<<<<<<<< * lim = limit * */ __pyx_k_tuple_74 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_51)); if (unlikely(!__pyx_k_tuple_74)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 950; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_74); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_74)); /* "pandas/src/generated.pyx":1014 * else: * if limit < 0: * raise ValueError('Limit must be non-negative') # <<<<<<<<<<<<<< * lim = limit * */ __pyx_k_tuple_75 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_51)); if (unlikely(!__pyx_k_tuple_75)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1014; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_75); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_75)); /* "pandas/src/generated.pyx":1047 * else: * if limit < 0: * raise ValueError('Limit must be non-negative') # <<<<<<<<<<<<<< * lim = limit * */ __pyx_k_tuple_76 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_51)); if (unlikely(!__pyx_k_tuple_76)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1047; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_76); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_76)); /* "pandas/src/generated.pyx":1080 * else: * if limit < 0: * raise ValueError('Limit must be non-negative') # <<<<<<<<<<<<<< * lim = limit * */ __pyx_k_tuple_77 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_51)); if (unlikely(!__pyx_k_tuple_77)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1080; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_77); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_77)); /* "pandas/src/generated.pyx":1113 * else: * if limit < 0: * raise ValueError('Limit must be non-negative') # <<<<<<<<<<<<<< * lim = limit * */ __pyx_k_tuple_78 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_51)); if (unlikely(!__pyx_k_tuple_78)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1113; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_78); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_78)); /* "pandas/src/generated.pyx":1146 * else: * if limit < 0: * raise ValueError('Limit must be non-negative') # <<<<<<<<<<<<<< * lim = limit * */ __pyx_k_tuple_79 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_51)); if (unlikely(!__pyx_k_tuple_79)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1146; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_79); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_79)); /* "pandas/src/generated.pyx":1179 * else: * if limit < 0: * raise ValueError('Limit must be non-negative') # <<<<<<<<<<<<<< * lim = limit * */ __pyx_k_tuple_80 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_51)); if (unlikely(!__pyx_k_tuple_80)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1179; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_80); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_80)); /* "pandas/src/generated.pyx":1213 * else: * if limit < 0: * raise ValueError('Limit must be non-negative') # <<<<<<<<<<<<<< * lim = limit * */ __pyx_k_tuple_81 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_51)); if (unlikely(!__pyx_k_tuple_81)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1213; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_81); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_81)); /* "pandas/src/generated.pyx":1245 * else: * if limit < 0: * raise ValueError('Limit must be non-negative') # <<<<<<<<<<<<<< * lim = limit * */ __pyx_k_tuple_82 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_51)); if (unlikely(!__pyx_k_tuple_82)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1245; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_82); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_82)); /* "pandas/src/generated.pyx":1277 * else: * if limit < 0: * raise ValueError('Limit must be non-negative') # <<<<<<<<<<<<<< * lim = limit * */ __pyx_k_tuple_83 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_51)); if (unlikely(!__pyx_k_tuple_83)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1277; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_83); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_83)); /* "pandas/src/generated.pyx":1309 * else: * if limit < 0: * raise ValueError('Limit must be non-negative') # <<<<<<<<<<<<<< * lim = limit * */ __pyx_k_tuple_84 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_51)); if (unlikely(!__pyx_k_tuple_84)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1309; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_84); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_84)); /* "pandas/src/generated.pyx":1341 * else: * if limit < 0: * raise ValueError('Limit must be non-negative') # <<<<<<<<<<<<<< * lim = limit * */ __pyx_k_tuple_85 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_51)); if (unlikely(!__pyx_k_tuple_85)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1341; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_85); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_85)); /* "pandas/src/generated.pyx":1373 * else: * if limit < 0: * raise ValueError('Limit must be non-negative') # <<<<<<<<<<<<<< * lim = limit * */ __pyx_k_tuple_86 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_51)); if (unlikely(!__pyx_k_tuple_86)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1373; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_86); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_86)); /* "pandas/src/generated.pyx":1406 * else: * if limit < 0: * raise ValueError('Limit must be non-negative') # <<<<<<<<<<<<<< * lim = limit * */ __pyx_k_tuple_87 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_51)); if (unlikely(!__pyx_k_tuple_87)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1406; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_87); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_87)); /* "pandas/src/generated.pyx":1440 * else: * if limit < 0: * raise ValueError('Limit must be non-negative') # <<<<<<<<<<<<<< * lim = limit * */ __pyx_k_tuple_88 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_51)); if (unlikely(!__pyx_k_tuple_88)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1440; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_88); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_88)); /* "pandas/src/generated.pyx":1474 * else: * if limit < 0: * raise ValueError('Limit must be non-negative') # <<<<<<<<<<<<<< * lim = limit * */ __pyx_k_tuple_89 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_51)); if (unlikely(!__pyx_k_tuple_89)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1474; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_89); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_89)); /* "pandas/src/generated.pyx":1508 * else: * if limit < 0: * raise ValueError('Limit must be non-negative') # <<<<<<<<<<<<<< * lim = limit * */ __pyx_k_tuple_90 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_51)); if (unlikely(!__pyx_k_tuple_90)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1508; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_90); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_90)); /* "pandas/src/generated.pyx":1542 * else: * if limit < 0: * raise ValueError('Limit must be non-negative') # <<<<<<<<<<<<<< * lim = limit * */ __pyx_k_tuple_91 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_51)); if (unlikely(!__pyx_k_tuple_91)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1542; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_91); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_91)); /* "pandas/src/generated.pyx":1576 * else: * if limit < 0: * raise ValueError('Limit must be non-negative') # <<<<<<<<<<<<<< * lim = limit * */ __pyx_k_tuple_92 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_51)); if (unlikely(!__pyx_k_tuple_92)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1576; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_92); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_92)); /* "pandas/src/generated.pyx":1611 * else: * if limit < 0: * raise ValueError('Limit must be non-negative') # <<<<<<<<<<<<<< * lim = limit * */ __pyx_k_tuple_93 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_51)); if (unlikely(!__pyx_k_tuple_93)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1611; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_93); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_93)); /* "pandas/src/generated.pyx":1645 * else: * if limit < 0: * raise ValueError('Limit must be non-negative') # <<<<<<<<<<<<<< * lim = limit * */ __pyx_k_tuple_94 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_51)); if (unlikely(!__pyx_k_tuple_94)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1645; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_94); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_94)); /* "pandas/src/generated.pyx":1679 * else: * if limit < 0: * raise ValueError('Limit must be non-negative') # <<<<<<<<<<<<<< * lim = limit * */ __pyx_k_tuple_95 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_51)); if (unlikely(!__pyx_k_tuple_95)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1679; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_95); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_95)); /* "pandas/src/generated.pyx":1713 * else: * if limit < 0: * raise ValueError('Limit must be non-negative') # <<<<<<<<<<<<<< * lim = limit * */ __pyx_k_tuple_96 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_51)); if (unlikely(!__pyx_k_tuple_96)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1713; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_96); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_96)); /* "pandas/src/generated.pyx":1747 * else: * if limit < 0: * raise ValueError('Limit must be non-negative') # <<<<<<<<<<<<<< * lim = limit * */ __pyx_k_tuple_97 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_51)); if (unlikely(!__pyx_k_tuple_97)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1747; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_97); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_97)); /* "pandas/src/generated.pyx":1781 * else: * if limit < 0: * raise ValueError('Limit must be non-negative') # <<<<<<<<<<<<<< * lim = limit * */ __pyx_k_tuple_98 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_51)); if (unlikely(!__pyx_k_tuple_98)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1781; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_98); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_98)); /* "pandas/src/generated.pyx":1971 * * if not length == len(labels): * raise AssertionError("len(index) != len(labels)") # <<<<<<<<<<<<<< * * for i in range(length): */ __pyx_k_tuple_100 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_99)); if (unlikely(!__pyx_k_tuple_100)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1971; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_100); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_100)); /* "pandas/src/generated.pyx":1999 * * if not length == len(labels): * raise AssertionError("len(index) != len(labels)") # <<<<<<<<<<<<<< * * for i in range(length): */ __pyx_k_tuple_101 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_99)); if (unlikely(!__pyx_k_tuple_101)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1999; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_101); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_101)); /* "pandas/src/generated.pyx":2027 * * if not length == len(labels): * raise AssertionError("len(index) != len(labels)") # <<<<<<<<<<<<<< * * for i in range(length): */ __pyx_k_tuple_102 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_99)); if (unlikely(!__pyx_k_tuple_102)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2027; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_102); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_102)); /* "pandas/src/generated.pyx":2055 * * if not length == len(labels): * raise AssertionError("len(index) != len(labels)") # <<<<<<<<<<<<<< * * for i in range(length): */ __pyx_k_tuple_103 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_99)); if (unlikely(!__pyx_k_tuple_103)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2055; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_103); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_103)); /* "pandas/src/generated.pyx":2083 * * if not length == len(labels): * raise AssertionError("len(index) != len(labels)") # <<<<<<<<<<<<<< * * for i in range(length): */ __pyx_k_tuple_104 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_99)); if (unlikely(!__pyx_k_tuple_104)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2083; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_104); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_104)); /* "pandas/src/generated.pyx":2111 * * if not length == len(labels): * raise AssertionError("len(index) != len(labels)") # <<<<<<<<<<<<<< * * for i in range(length): */ __pyx_k_tuple_105 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_99)); if (unlikely(!__pyx_k_tuple_105)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2111; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_105); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_105)); /* "pandas/src/generated.pyx":5083 * * if not len(values) == len(labels): * raise AssertionError("len(index) != len(labels)") # <<<<<<<<<<<<<< * * nobs = np.zeros(( out).shape, dtype=np.int64) */ __pyx_k_tuple_184 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_99)); if (unlikely(!__pyx_k_tuple_184)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5083; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_184); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_184)); /* "pandas/src/generated.pyx":5126 * * if not len(values) == len(labels): * raise AssertionError("len(index) != len(labels)") # <<<<<<<<<<<<<< * * nobs = np.zeros(( out).shape, dtype=np.int64) */ __pyx_k_tuple_185 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_99)); if (unlikely(!__pyx_k_tuple_185)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5126; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_185); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_185)); /* "pandas/src/generated.pyx":5259 * * if not len(values) == len(labels): * raise AssertionError("len(index) != len(labels)") # <<<<<<<<<<<<<< * * nobs = np.zeros(( out).shape, dtype=np.int64) */ __pyx_k_tuple_186 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_99)); if (unlikely(!__pyx_k_tuple_186)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5259; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_186); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_186)); /* "pandas/src/generated.pyx":5303 * * if not len(values) == len(labels): * raise AssertionError("len(index) != len(labels)") # <<<<<<<<<<<<<< * * nobs = np.zeros(( out).shape, dtype=np.int64) */ __pyx_k_tuple_187 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_99)); if (unlikely(!__pyx_k_tuple_187)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5303; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_187); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_187)); /* "pandas/src/generated.pyx":5438 * * if not len(values) == len(labels): * raise AssertionError("len(index) != len(labels)") # <<<<<<<<<<<<<< * * nobs = np.zeros_like(out) */ __pyx_k_tuple_188 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_99)); if (unlikely(!__pyx_k_tuple_188)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5438; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_188); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_188)); /* "pandas/src/generated.pyx":5494 * * if not len(values) == len(labels): * raise AssertionError("len(index) != len(labels)") # <<<<<<<<<<<<<< * * nobs = np.zeros_like(out) */ __pyx_k_tuple_189 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_99)); if (unlikely(!__pyx_k_tuple_189)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5494; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_189); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_189)); /* "pandas/src/generated.pyx":5664 * * if not len(values) == len(labels): * raise AssertionError("len(index) != len(labels)") # <<<<<<<<<<<<<< * * nobs = np.zeros_like(out) */ __pyx_k_tuple_190 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_99)); if (unlikely(!__pyx_k_tuple_190)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5664; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_190); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_190)); /* "pandas/src/generated.pyx":5720 * * if not len(values) == len(labels): * raise AssertionError("len(index) != len(labels)") # <<<<<<<<<<<<<< * * nobs = np.zeros_like(out) */ __pyx_k_tuple_191 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_99)); if (unlikely(!__pyx_k_tuple_191)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5720; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_191); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_191)); /* "pandas/src/generated.pyx":5887 * * if not len(values) == len(labels): * raise AssertionError("len(index) != len(labels)") # <<<<<<<<<<<<<< * * nobs = np.zeros_like(out) */ __pyx_k_tuple_192 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_99)); if (unlikely(!__pyx_k_tuple_192)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5887; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_192); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_192)); /* "pandas/src/generated.pyx":5948 * * if not len(values) == len(labels): * raise AssertionError("len(index) != len(labels)") # <<<<<<<<<<<<<< * * nobs = np.zeros_like(out) */ __pyx_k_tuple_193 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_99)); if (unlikely(!__pyx_k_tuple_193)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5948; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_193); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_193)); /* "pandas/src/generated.pyx":6133 * * if not len(values) == len(labels): * raise AssertionError("len(index) != len(labels)") # <<<<<<<<<<<<<< * * nobs = np.zeros_like(out) */ __pyx_k_tuple_194 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_99)); if (unlikely(!__pyx_k_tuple_194)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6133; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_194); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_194)); /* "pandas/src/generated.pyx":6185 * * if not len(values) == len(labels): * raise AssertionError("len(index) != len(labels)") # <<<<<<<<<<<<<< * * nobs = np.zeros_like(out) */ __pyx_k_tuple_195 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_99)); if (unlikely(!__pyx_k_tuple_195)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6185; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_195); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_195)); /* "pandas/src/generated.pyx":6348 * * if not len(values) == len(labels): * raise AssertionError("len(index) != len(labels)") # <<<<<<<<<<<<<< * * nobs = np.zeros_like(out) */ __pyx_k_tuple_196 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_99)); if (unlikely(!__pyx_k_tuple_196)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6348; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_196); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_196)); /* "pandas/src/generated.pyx":6408 * * if not len(values) == len(labels): * raise AssertionError("len(index) != len(labels)") # <<<<<<<<<<<<<< * * nobs = np.zeros_like(out) */ __pyx_k_tuple_197 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_99)); if (unlikely(!__pyx_k_tuple_197)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6408; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_197); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_197)); /* "pandas/src/generated.pyx":6592 * * if not len(values) == len(labels): * raise AssertionError("len(index) != len(labels)") # <<<<<<<<<<<<<< * * nobs = np.zeros_like(out) */ __pyx_k_tuple_198 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_99)); if (unlikely(!__pyx_k_tuple_198)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6592; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_198); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_198)); /* "pandas/src/generated.pyx":6652 * * if not len(values) == len(labels): * raise AssertionError("len(index) != len(labels)") # <<<<<<<<<<<<<< * * nobs = np.zeros_like(out) */ __pyx_k_tuple_199 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_99)); if (unlikely(!__pyx_k_tuple_199)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6652; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_199); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_199)); /* "pandas/src/generated.pyx":6842 * * if out.shape[1] != 4: * raise ValueError('Output array must have 4 columns') # <<<<<<<<<<<<<< * * NA = np.nan */ __pyx_k_tuple_201 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_200)); if (unlikely(!__pyx_k_tuple_201)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6842; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_201); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_201)); /* "pandas/src/generated.pyx":6915 * * if out.shape[1] != 4: * raise ValueError('Output array must have 4 columns') # <<<<<<<<<<<<<< * * NA = np.nan */ __pyx_k_tuple_202 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_200)); if (unlikely(!__pyx_k_tuple_202)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6915; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_202); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_202)); /* "util.pxd":40 * i += sz * elif i >= sz or sz == 0: * raise IndexError('index out of bounds') # <<<<<<<<<<<<<< * * return get_value_1d(arr, i) */ __pyx_k_tuple_204 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_203)); if (unlikely(!__pyx_k_tuple_204)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 40; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_204); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_204)); /* "util.pxd":57 * i += sz * elif i >= sz: * raise IndexError('index out of bounds') # <<<<<<<<<<<<<< * * assign_value_1d(arr, i, value) */ __pyx_k_tuple_205 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_203)); if (unlikely(!__pyx_k_tuple_205)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 57; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_205); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_205)); /* "numpy.pxd":217 * 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_k_tuple_208 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_u_207)); if (unlikely(!__pyx_k_tuple_208)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 217; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_208); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_208)); /* "numpy.pxd":221 * 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_k_tuple_210 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_u_209)); if (unlikely(!__pyx_k_tuple_210)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 221; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_210); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_210)); /* "numpy.pxd":259 * if ((descr.byteorder == '>' and little_endian) or * (descr.byteorder == '<' 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_k_tuple_212 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_u_211)); if (unlikely(!__pyx_k_tuple_212)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 259; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_212); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_212)); /* "numpy.pxd":803 * * if (end - f) - (new_offset - offset[0]) < 15: * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") # <<<<<<<<<<<<<< * * if ((child.byteorder == '>' and little_endian) or */ __pyx_k_tuple_215 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_u_214)); if (unlikely(!__pyx_k_tuple_215)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 803; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_215); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_215)); /* "numpy.pxd":807 * if ((child.byteorder == '>' and little_endian) or * (child.byteorder == '<' 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_k_tuple_216 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_u_211)); if (unlikely(!__pyx_k_tuple_216)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 807; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_216); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_216)); /* "numpy.pxd":827 * 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_k_tuple_218 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_u_217)); if (unlikely(!__pyx_k_tuple_218)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 827; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_218); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_218)); /* "pandas/algos.pyx":133 * * * def rank_1d_float64(object in_arr, ties_method='average', ascending=True, # <<<<<<<<<<<<<< * na_option='keep'): * """ */ __pyx_k_tuple_219 = PyTuple_Pack(19, ((PyObject *)__pyx_n_s__in_arr), ((PyObject *)__pyx_n_s__ties_method), ((PyObject *)__pyx_n_s__ascending), ((PyObject *)__pyx_n_s__na_option), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__j), ((PyObject *)__pyx_n_s__n), ((PyObject *)__pyx_n_s__dups), ((PyObject *)__pyx_n_s__sorted_data), ((PyObject *)__pyx_n_s__ranks), ((PyObject *)__pyx_n_s__values), ((PyObject *)__pyx_n_s__argsorted), ((PyObject *)__pyx_n_s__val), ((PyObject *)__pyx_n_s__nan_value), ((PyObject *)__pyx_n_s__sum_ranks), ((PyObject *)__pyx_n_s__tiebreak), ((PyObject *)__pyx_n_s__keep_na), ((PyObject *)__pyx_n_s__mask), ((PyObject *)__pyx_n_s___as)); if (unlikely(!__pyx_k_tuple_219)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 133; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_219); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_219)); __pyx_k_codeobj_220 = (PyObject*)__Pyx_PyCode_New(4, 0, 19, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_219, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_221, __pyx_n_s__rank_1d_float64, 133, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_220)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 133; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/algos.pyx":205 * * * def rank_1d_int64(object in_arr, ties_method='average', ascending=True, # <<<<<<<<<<<<<< * na_option='keep'): * """ */ __pyx_k_tuple_223 = PyTuple_Pack(16, ((PyObject *)__pyx_n_s__in_arr), ((PyObject *)__pyx_n_s__ties_method), ((PyObject *)__pyx_n_s__ascending), ((PyObject *)__pyx_n_s__na_option), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__j), ((PyObject *)__pyx_n_s__n), ((PyObject *)__pyx_n_s__dups), ((PyObject *)__pyx_n_s__sorted_data), ((PyObject *)__pyx_n_s__values), ((PyObject *)__pyx_n_s__ranks), ((PyObject *)__pyx_n_s__argsorted), ((PyObject *)__pyx_n_s__val), ((PyObject *)__pyx_n_s__sum_ranks), ((PyObject *)__pyx_n_s__tiebreak), ((PyObject *)__pyx_n_s___as)); if (unlikely(!__pyx_k_tuple_223)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 205; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_223); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_223)); __pyx_k_codeobj_224 = (PyObject*)__Pyx_PyCode_New(4, 0, 16, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_223, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_221, __pyx_n_s__rank_1d_int64, 205, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_224)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 205; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/algos.pyx":265 * * * def rank_2d_float64(object in_arr, axis=0, ties_method='average', # <<<<<<<<<<<<<< * ascending=True, na_option='keep'): * """ */ __pyx_k_tuple_225 = PyTuple_Pack(20, ((PyObject *)__pyx_n_s__in_arr), ((PyObject *)__pyx_n_s__axis), ((PyObject *)__pyx_n_s__ties_method), ((PyObject *)__pyx_n_s__ascending), ((PyObject *)__pyx_n_s__na_option), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__j), ((PyObject *)__pyx_n_s__z), ((PyObject *)__pyx_n_s__k), ((PyObject *)__pyx_n_s__n), ((PyObject *)__pyx_n_s__dups), ((PyObject *)__pyx_n_s__ranks), ((PyObject *)__pyx_n_s__values), ((PyObject *)__pyx_n_s__argsorted), ((PyObject *)__pyx_n_s__val), ((PyObject *)__pyx_n_s__nan_value), ((PyObject *)__pyx_n_s__sum_ranks), ((PyObject *)__pyx_n_s__tiebreak), ((PyObject *)__pyx_n_s__keep_na), ((PyObject *)__pyx_n_s___as)); if (unlikely(!__pyx_k_tuple_225)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 265; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_225); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_225)); __pyx_k_codeobj_226 = (PyObject*)__Pyx_PyCode_New(5, 0, 20, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_225, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_221, __pyx_n_s__rank_2d_float64, 265, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_226)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 265; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/algos.pyx":348 * * * def rank_2d_int64(object in_arr, axis=0, ties_method='average', # <<<<<<<<<<<<<< * ascending=True, na_option='keep'): * """ */ __pyx_k_tuple_227 = PyTuple_Pack(18, ((PyObject *)__pyx_n_s__in_arr), ((PyObject *)__pyx_n_s__axis), ((PyObject *)__pyx_n_s__ties_method), ((PyObject *)__pyx_n_s__ascending), ((PyObject *)__pyx_n_s__na_option), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__j), ((PyObject *)__pyx_n_s__z), ((PyObject *)__pyx_n_s__k), ((PyObject *)__pyx_n_s__n), ((PyObject *)__pyx_n_s__dups), ((PyObject *)__pyx_n_s__ranks), ((PyObject *)__pyx_n_s__argsorted), ((PyObject *)__pyx_n_s__values), ((PyObject *)__pyx_n_s__val), ((PyObject *)__pyx_n_s__sum_ranks), ((PyObject *)__pyx_n_s__tiebreak), ((PyObject *)__pyx_n_s___as)); if (unlikely(!__pyx_k_tuple_227)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 348; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_227); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_227)); __pyx_k_codeobj_228 = (PyObject*)__Pyx_PyCode_New(5, 0, 18, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_227, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_221, __pyx_n_s__rank_2d_int64, 348, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_228)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 348; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/algos.pyx":416 * * * def rank_1d_generic(object in_arr, bint retry=1, ties_method='average', # <<<<<<<<<<<<<< * ascending=True, na_option='keep'): * """ */ __pyx_k_tuple_229 = PyTuple_Pack(21, ((PyObject *)__pyx_n_s__in_arr), ((PyObject *)__pyx_n_s__retry), ((PyObject *)__pyx_n_s__ties_method), ((PyObject *)__pyx_n_s__ascending), ((PyObject *)__pyx_n_s__na_option), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__j), ((PyObject *)__pyx_n_s__n), ((PyObject *)__pyx_n_s__dups), ((PyObject *)__pyx_n_s__ranks), ((PyObject *)__pyx_n_s__sorted_data), ((PyObject *)__pyx_n_s__values), ((PyObject *)__pyx_n_s__argsorted), ((PyObject *)__pyx_n_s__val), ((PyObject *)__pyx_n_s__nan_value), ((PyObject *)__pyx_n_s__sum_ranks), ((PyObject *)__pyx_n_s__tiebreak), ((PyObject *)__pyx_n_s__keep_na), ((PyObject *)__pyx_n_s__mask), ((PyObject *)__pyx_n_s___as), ((PyObject *)__pyx_n_s__valid_locs)); if (unlikely(!__pyx_k_tuple_229)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 416; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_229); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_229)); __pyx_k_codeobj_230 = (PyObject*)__Pyx_PyCode_New(5, 0, 21, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_229, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_221, __pyx_n_s__rank_1d_generic, 416, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_230)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 416; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/algos.pyx":525 * __cmp__ = _return_true * * def rank_2d_generic(object in_arr, axis=0, ties_method='average', # <<<<<<<<<<<<<< * ascending=True, na_option='keep'): * """ */ __pyx_k_tuple_232 = PyTuple_Pack(22, ((PyObject *)__pyx_n_s__in_arr), ((PyObject *)__pyx_n_s__axis), ((PyObject *)__pyx_n_s__ties_method), ((PyObject *)__pyx_n_s__ascending), ((PyObject *)__pyx_n_s__na_option), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__j), ((PyObject *)__pyx_n_s__z), ((PyObject *)__pyx_n_s__k), ((PyObject *)__pyx_n_s__n), ((PyObject *)__pyx_n_s__infs), ((PyObject *)__pyx_n_s__dups), ((PyObject *)__pyx_n_s__ranks), ((PyObject *)__pyx_n_s__values), ((PyObject *)__pyx_n_s__argsorted), ((PyObject *)__pyx_n_s__val), ((PyObject *)__pyx_n_s__nan_value), ((PyObject *)__pyx_n_s__sum_ranks), ((PyObject *)__pyx_n_s__tiebreak), ((PyObject *)__pyx_n_s__keep_na), ((PyObject *)__pyx_n_s__mask), ((PyObject *)__pyx_n_s___as)); if (unlikely(!__pyx_k_tuple_232)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 525; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_232); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_232)); __pyx_k_codeobj_233 = (PyObject*)__Pyx_PyCode_New(5, 0, 22, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_232, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_221, __pyx_n_s__rank_2d_generic, 525, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_233)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 525; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/algos.pyx":641 * # - * * def _check_minp(win, minp, N): # <<<<<<<<<<<<<< * if minp > win: * raise ValueError('min_periods (%d) must be <= window (%d)' */ __pyx_k_tuple_234 = PyTuple_Pack(3, ((PyObject *)__pyx_n_s__win), ((PyObject *)__pyx_n_s__minp), ((PyObject *)__pyx_n_s__N)); if (unlikely(!__pyx_k_tuple_234)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 641; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_234); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_234)); __pyx_k_codeobj_235 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_234, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_221, __pyx_n_s___check_minp, 641, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_235)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 641; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/algos.pyx":668 * # Series: Prentice-Hall Series in Automatic Computation * * def kth_smallest(ndarray[double_t] a, Py_ssize_t k): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i,j,l,m,n */ __pyx_k_tuple_236 = PyTuple_Pack(9, ((PyObject *)__pyx_n_s__a), ((PyObject *)__pyx_n_s__k), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__j), ((PyObject *)__pyx_n_s__l), ((PyObject *)__pyx_n_s__m), ((PyObject *)__pyx_n_s__n), ((PyObject *)__pyx_n_s__x), ((PyObject *)__pyx_n_s__t)); if (unlikely(!__pyx_k_tuple_236)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 668; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_236); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_236)); __pyx_k_codeobj_237 = (PyObject*)__Pyx_PyCode_New(2, 0, 9, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_236, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_221, __pyx_n_s__kth_smallest, 668, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_237)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 668; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/algos.pyx":725 * * * def median(ndarray arr): # <<<<<<<<<<<<<< * ''' * A faster median */ __pyx_k_tuple_238 = PyTuple_Pack(2, ((PyObject *)__pyx_n_s__arr), ((PyObject *)__pyx_n_s__n)); if (unlikely(!__pyx_k_tuple_238)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 725; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_238); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_238)); __pyx_k_codeobj_239 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_238, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_221, __pyx_n_s__median, 725, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_239)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 725; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/algos.pyx":745 * # -------------- Min, Max subsequence * * def max_subseq(ndarray[double_t] arr): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i=0,s=0,e=0,T,n */ __pyx_k_tuple_240 = PyTuple_Pack(8, ((PyObject *)__pyx_n_s__arr), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__s), ((PyObject *)__pyx_n_s__e), ((PyObject *)__pyx_n_s__T), ((PyObject *)__pyx_n_s__n), ((PyObject *)__pyx_n_s__m), ((PyObject *)__pyx_n_s__S)); if (unlikely(!__pyx_k_tuple_240)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 745; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_240); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_240)); __pyx_k_codeobj_241 = (PyObject*)__Pyx_PyCode_New(1, 0, 8, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_240, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_221, __pyx_n_s__max_subseq, 745, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_241)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 745; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/algos.pyx":773 * return (s, e, m) * * def min_subseq(ndarray[double_t] arr): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t s, e */ __pyx_k_tuple_242 = PyTuple_Pack(4, ((PyObject *)__pyx_n_s__arr), ((PyObject *)__pyx_n_s__s), ((PyObject *)__pyx_n_s__e), ((PyObject *)__pyx_n_s__m)); if (unlikely(!__pyx_k_tuple_242)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 773; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_242); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_242)); __pyx_k_codeobj_243 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_242, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_221, __pyx_n_s__min_subseq, 773, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_243)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 773; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/algos.pyx":785 * # Rolling sum * * def roll_sum(ndarray[double_t] input, int win, int minp): # <<<<<<<<<<<<<< * cdef double val, prev, sum_x = 0 * cdef int nobs = 0, i */ __pyx_k_tuple_244 = PyTuple_Pack(10, ((PyObject *)__pyx_n_s__input), ((PyObject *)__pyx_n_s__win), ((PyObject *)__pyx_n_s__minp), ((PyObject *)__pyx_n_s__val), ((PyObject *)__pyx_n_s__prev), ((PyObject *)__pyx_n_s__sum_x), ((PyObject *)__pyx_n_s__nobs), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__N), ((PyObject *)__pyx_n_s__output)); if (unlikely(!__pyx_k_tuple_244)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 785; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_244); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_244)); __pyx_k_codeobj_245 = (PyObject*)__Pyx_PyCode_New(3, 0, 10, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_244, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_221, __pyx_n_s__roll_sum, 785, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_245)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 785; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/algos.pyx":827 * # Rolling mean * * def roll_mean(ndarray[double_t] input, # <<<<<<<<<<<<<< * int win, int minp): * cdef: */ __pyx_k_tuple_246 = PyTuple_Pack(12, ((PyObject *)__pyx_n_s__input), ((PyObject *)__pyx_n_s__win), ((PyObject *)__pyx_n_s__minp), ((PyObject *)__pyx_n_s__val), ((PyObject *)__pyx_n_s__prev), ((PyObject *)__pyx_n_s__result), ((PyObject *)__pyx_n_s__sum_x), ((PyObject *)__pyx_n_s__nobs), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__neg_ct), ((PyObject *)__pyx_n_s__N), ((PyObject *)__pyx_n_s__output)); if (unlikely(!__pyx_k_tuple_246)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 827; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_246); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_246)); __pyx_k_codeobj_247 = (PyObject*)__Pyx_PyCode_New(3, 0, 12, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_246, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_221, __pyx_n_s__roll_mean, 827, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_247)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 827; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/algos.pyx":884 * # Exponentially weighted moving average * * def ewma(ndarray[double_t] input, double_t com, int adjust): # <<<<<<<<<<<<<< * ''' * Compute exponentially-weighted moving average using center-of-mass. */ __pyx_k_tuple_248 = PyTuple_Pack(11, ((PyObject *)__pyx_n_s__input), ((PyObject *)__pyx_n_s__com), ((PyObject *)__pyx_n_s__adjust), ((PyObject *)__pyx_n_s__cur), ((PyObject *)__pyx_n_s__prev), ((PyObject *)__pyx_n_s__neww), ((PyObject *)__pyx_n_s__oldw), ((PyObject *)__pyx_n_s__adj), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__N), ((PyObject *)__pyx_n_s__output)); if (unlikely(!__pyx_k_tuple_248)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 884; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_248); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_248)); __pyx_k_codeobj_249 = (PyObject*)__Pyx_PyCode_New(3, 0, 11, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_248, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_221, __pyx_n_s__ewma, 884, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_249)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 884; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/algos.pyx":946 * @cython.boundscheck(False) * @cython.wraparound(False) * def nancorr(ndarray[float64_t, ndim=2] mat, cov=False, minp=None): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, j, xi, yi, N, K */ __pyx_k_tuple_250 = PyTuple_Pack(21, ((PyObject *)__pyx_n_s__mat), ((PyObject *)__pyx_n_s__cov), ((PyObject *)__pyx_n_s__minp), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__j), ((PyObject *)__pyx_n_s__xi), ((PyObject *)__pyx_n_s__yi), ((PyObject *)__pyx_n_s__N), ((PyObject *)__pyx_n_s__K), ((PyObject *)__pyx_n_s__result), ((PyObject *)__pyx_n_s__mask), ((PyObject *)__pyx_n_s__nobs), ((PyObject *)__pyx_n_s__vx), ((PyObject *)__pyx_n_s__vy), ((PyObject *)__pyx_n_s__sumx), ((PyObject *)__pyx_n_s__sumy), ((PyObject *)__pyx_n_s__sumxx), ((PyObject *)__pyx_n_s__sumyy), ((PyObject *)__pyx_n_s__meanx), ((PyObject *)__pyx_n_s__meany), ((PyObject *)__pyx_n_s__divisor)); if (unlikely(!__pyx_k_tuple_250)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 946; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_250); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_250)); __pyx_k_codeobj_251 = (PyObject*)__Pyx_PyCode_New(3, 0, 21, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_250, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_221, __pyx_n_s__nancorr, 946, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_251)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 946; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/algos.pyx":1005 * @cython.boundscheck(False) * @cython.wraparound(False) * def nancorr_spearman(ndarray[float64_t, ndim=2] mat, Py_ssize_t minp=1): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, j, xi, yi, N, K */ __pyx_k_tuple_252 = PyTuple_Pack(20, ((PyObject *)__pyx_n_s__mat), ((PyObject *)__pyx_n_s__minp), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__j), ((PyObject *)__pyx_n_s__xi), ((PyObject *)__pyx_n_s__yi), ((PyObject *)__pyx_n_s__N), ((PyObject *)__pyx_n_s__K), ((PyObject *)__pyx_n_s__result), ((PyObject *)__pyx_n_s__maskedx), ((PyObject *)__pyx_n_s__maskedy), ((PyObject *)__pyx_n_s__mask), ((PyObject *)__pyx_n_s__nobs), ((PyObject *)__pyx_n_s__vx), ((PyObject *)__pyx_n_s__vy), ((PyObject *)__pyx_n_s__sumx), ((PyObject *)__pyx_n_s__sumxx), ((PyObject *)__pyx_n_s__sumyy), ((PyObject *)__pyx_n_s__mean), ((PyObject *)__pyx_n_s__divisor)); if (unlikely(!__pyx_k_tuple_252)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1005; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_252); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_252)); __pyx_k_codeobj_253 = (PyObject*)__Pyx_PyCode_New(2, 0, 20, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_252, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_221, __pyx_n_s__nancorr_spearman, 1005, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_253)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1005; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/algos.pyx":1066 * # Rolling variance * * def roll_var(ndarray[double_t] input, int win, int minp, int ddof=1): # <<<<<<<<<<<<<< * cdef double val, prev, sum_x = 0, sum_xx = 0, nobs = 0 * cdef Py_ssize_t i */ __pyx_k_tuple_254 = PyTuple_Pack(12, ((PyObject *)__pyx_n_s__input), ((PyObject *)__pyx_n_s__win), ((PyObject *)__pyx_n_s__minp), ((PyObject *)__pyx_n_s__ddof), ((PyObject *)__pyx_n_s__val), ((PyObject *)__pyx_n_s__prev), ((PyObject *)__pyx_n_s__sum_x), ((PyObject *)__pyx_n_s__sum_xx), ((PyObject *)__pyx_n_s__nobs), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__N), ((PyObject *)__pyx_n_s__output)); if (unlikely(!__pyx_k_tuple_254)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1066; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_254); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_254)); __pyx_k_codeobj_255 = (PyObject*)__Pyx_PyCode_New(4, 0, 12, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_254, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_221, __pyx_n_s__roll_var, 1066, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_255)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1066; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/algos.pyx":1120 * # Rolling skewness * * def roll_skew(ndarray[double_t] input, int win, int minp): # <<<<<<<<<<<<<< * cdef double val, prev * cdef double x = 0, xx = 0, xxx = 0 */ __pyx_k_tuple_256 = PyTuple_Pack(16, ((PyObject *)__pyx_n_s__input), ((PyObject *)__pyx_n_s__win), ((PyObject *)__pyx_n_s__minp), ((PyObject *)__pyx_n_s__val), ((PyObject *)__pyx_n_s__prev), ((PyObject *)__pyx_n_s__x), ((PyObject *)__pyx_n_s__xx), ((PyObject *)__pyx_n_s__xxx), ((PyObject *)__pyx_n_s__nobs), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__N), ((PyObject *)__pyx_n_s__output), ((PyObject *)__pyx_n_s__A), ((PyObject *)__pyx_n_s__B), ((PyObject *)__pyx_n_s__C), ((PyObject *)__pyx_n_s__R)); if (unlikely(!__pyx_k_tuple_256)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1120; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_256); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_256)); __pyx_k_codeobj_257 = (PyObject*)__Pyx_PyCode_New(3, 0, 16, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_256, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_221, __pyx_n_s__roll_skew, 1120, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_257)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1120; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/algos.pyx":1184 * * * def roll_kurt(ndarray[double_t] input, # <<<<<<<<<<<<<< * int win, int minp): * cdef double val, prev */ __pyx_k_tuple_258 = PyTuple_Pack(19, ((PyObject *)__pyx_n_s__input), ((PyObject *)__pyx_n_s__win), ((PyObject *)__pyx_n_s__minp), ((PyObject *)__pyx_n_s__val), ((PyObject *)__pyx_n_s__prev), ((PyObject *)__pyx_n_s__x), ((PyObject *)__pyx_n_s__xx), ((PyObject *)__pyx_n_s__xxx), ((PyObject *)__pyx_n_s__xxxx), ((PyObject *)__pyx_n_s__nobs), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__N), ((PyObject *)__pyx_n_s__output), ((PyObject *)__pyx_n_s__A), ((PyObject *)__pyx_n_s__B), ((PyObject *)__pyx_n_s__C), ((PyObject *)__pyx_n_s__D), ((PyObject *)__pyx_n_s__R), ((PyObject *)__pyx_n_s__K)); if (unlikely(!__pyx_k_tuple_258)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1184; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_258); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_258)); __pyx_k_codeobj_259 = (PyObject*)__Pyx_PyCode_New(3, 0, 19, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_258, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_221, __pyx_n_s__roll_kurt, 1184, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_259)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1184; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/algos.pyx":1304 * from skiplist cimport * * * def roll_median_c(ndarray[float64_t] arg, int win, int minp): # <<<<<<<<<<<<<< * cdef double val, res, prev * cdef: */ __pyx_k_tuple_260 = PyTuple_Pack(13, ((PyObject *)__pyx_n_s__arg), ((PyObject *)__pyx_n_s__win), ((PyObject *)__pyx_n_s__minp), ((PyObject *)__pyx_n_s__val), ((PyObject *)__pyx_n_s__res), ((PyObject *)__pyx_n_s__prev), ((PyObject *)__pyx_n_s__ret), ((PyObject *)__pyx_n_s__sl), ((PyObject *)__pyx_n_s__midpoint), ((PyObject *)__pyx_n_s__nobs), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__N), ((PyObject *)__pyx_n_s__output)); if (unlikely(!__pyx_k_tuple_260)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1304; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_260); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_260)); __pyx_k_codeobj_261 = (PyObject*)__Pyx_PyCode_New(3, 0, 13, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_260, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_221, __pyx_n_s__roll_median_c, 1304, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_261)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1304; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/algos.pyx":1359 * return output * * def roll_median_cython(ndarray input, int win, int minp): # <<<<<<<<<<<<<< * ''' * O(N log(window)) implementation using skip list */ __pyx_k_tuple_262 = PyTuple_Pack(3, ((PyObject *)__pyx_n_s__input), ((PyObject *)__pyx_n_s__win), ((PyObject *)__pyx_n_s__minp)); if (unlikely(!__pyx_k_tuple_262)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1359; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_262); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_262)); __pyx_k_codeobj_263 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_262, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_221, __pyx_n_s__roll_median_cython, 1359, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_263)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1359; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/algos.pyx":1395 * @cython.boundscheck(False) * @cython.wraparound(False) * def roll_max2(ndarray[float64_t] a, int window, int minp): # <<<<<<<<<<<<<< * "Moving max of 1d array of dtype=float64 along axis=0 ignoring NaNs." * cdef np.float64_t ai, aold */ __pyx_k_tuple_264 = PyTuple_Pack(15, ((PyObject *)__pyx_n_s__a), ((PyObject *)__pyx_n_s__window), ((PyObject *)__pyx_n_s__minp), ((PyObject *)__pyx_n_s__ai), ((PyObject *)__pyx_n_s__aold), ((PyObject *)__pyx_n_s__count), ((PyObject *)__pyx_n_s__ring), ((PyObject *)__pyx_n_s__minpair), ((PyObject *)__pyx_n_s__end), ((PyObject *)__pyx_n_s__last), ((PyObject *)__pyx_n_s__i0), ((PyObject *)__pyx_n_s__dim), ((PyObject *)__pyx_n_s__n0), ((PyObject *)__pyx_n_s__dims), ((PyObject *)__pyx_n_s__y)); if (unlikely(!__pyx_k_tuple_264)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1395; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_264); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_264)); __pyx_k_codeobj_265 = (PyObject*)__Pyx_PyCode_New(3, 0, 15, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_264, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_221, __pyx_n_s__roll_max2, 1395, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_265)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1395; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/algos.pyx":1475 * return y * * def roll_max(ndarray input, int win, int minp): # <<<<<<<<<<<<<< * ''' * O(N log(window)) implementation using skip list */ __pyx_k_tuple_266 = PyTuple_Pack(3, ((PyObject *)__pyx_n_s__input), ((PyObject *)__pyx_n_s__win), ((PyObject *)__pyx_n_s__minp)); if (unlikely(!__pyx_k_tuple_266)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1475; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_266); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_266)); __pyx_k_codeobj_267 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_266, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_221, __pyx_n_s__roll_max, 1475, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_267)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1475; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/algos.pyx":1488 * return NaN * * def roll_min(ndarray input, int win, int minp): # <<<<<<<<<<<<<< * ''' * O(N log(window)) implementation using skip list */ __pyx_k_tuple_268 = PyTuple_Pack(3, ((PyObject *)__pyx_n_s__input), ((PyObject *)__pyx_n_s__win), ((PyObject *)__pyx_n_s__minp)); if (unlikely(!__pyx_k_tuple_268)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1488; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_268); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_268)); __pyx_k_codeobj_269 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_268, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_221, __pyx_n_s__roll_min, 1488, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_269)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1488; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/algos.pyx":1496 * @cython.boundscheck(False) * @cython.wraparound(False) * def roll_min2(np.ndarray[np.float64_t, ndim=1] a, int window, int minp): # <<<<<<<<<<<<<< * "Moving min of 1d array of dtype=float64 along axis=0 ignoring NaNs." * cdef np.float64_t ai, aold */ __pyx_k_tuple_270 = PyTuple_Pack(15, ((PyObject *)__pyx_n_s__a), ((PyObject *)__pyx_n_s__window), ((PyObject *)__pyx_n_s__minp), ((PyObject *)__pyx_n_s__ai), ((PyObject *)__pyx_n_s__aold), ((PyObject *)__pyx_n_s__count), ((PyObject *)__pyx_n_s__ring), ((PyObject *)__pyx_n_s__minpair), ((PyObject *)__pyx_n_s__end), ((PyObject *)__pyx_n_s__last), ((PyObject *)__pyx_n_s__i0), ((PyObject *)__pyx_n_s__dim), ((PyObject *)__pyx_n_s__n0), ((PyObject *)__pyx_n_s__dims), ((PyObject *)__pyx_n_s__y)); if (unlikely(!__pyx_k_tuple_270)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1496; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_270); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_270)); __pyx_k_codeobj_271 = (PyObject*)__Pyx_PyCode_New(3, 0, 15, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_270, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_221, __pyx_n_s__roll_min2, 1496, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_271)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1496; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/algos.pyx":1582 * return NaN * * def roll_quantile(ndarray[float64_t, cast=True] input, int win, # <<<<<<<<<<<<<< * int minp, double quantile): * ''' */ __pyx_k_tuple_272 = PyTuple_Pack(13, ((PyObject *)__pyx_n_s__input), ((PyObject *)__pyx_n_s__win), ((PyObject *)__pyx_n_s__minp), ((PyObject *)__pyx_n_s__quantile), ((PyObject *)__pyx_n_s__val), ((PyObject *)__pyx_n_s__prev), ((PyObject *)__pyx_n_s__midpoint), ((PyObject *)__pyx_n_s__skiplist), ((PyObject *)__pyx_n_s__nobs), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__N), ((PyObject *)__pyx_n_s__output), ((PyObject *)__pyx_n_s__idx)); if (unlikely(!__pyx_k_tuple_272)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1582; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_272); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_272)); __pyx_k_codeobj_273 = (PyObject*)__Pyx_PyCode_New(4, 0, 13, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_272, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_221, __pyx_n_s__roll_quantile, 1582, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_273)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1582; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/algos.pyx":1629 * return output * * def roll_generic(ndarray[float64_t, cast=True] input, int win, # <<<<<<<<<<<<<< * int minp, object func): * cdef ndarray[double_t] output, counts, bufarr */ __pyx_k_tuple_274 = PyTuple_Pack(11, ((PyObject *)__pyx_n_s__input), ((PyObject *)__pyx_n_s__win), ((PyObject *)__pyx_n_s__minp), ((PyObject *)__pyx_n_s__func), ((PyObject *)__pyx_n_s__output), ((PyObject *)__pyx_n_s__counts), ((PyObject *)__pyx_n_s__bufarr), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__n), ((PyObject *)__pyx_n_s__buf), ((PyObject *)__pyx_n_s__oldbuf)); if (unlikely(!__pyx_k_tuple_274)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1629; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_274); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_274)); __pyx_k_codeobj_275 = (PyObject*)__Pyx_PyCode_New(4, 0, 11, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_274, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_221, __pyx_n_s__roll_generic, 1629, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_275)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1629; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/algos.pyx":1671 * * * def roll_window(ndarray[float64_t, ndim=1, cast=True] input, # <<<<<<<<<<<<<< * ndarray[float64_t, ndim=1, cast=True] weights, * int minp, bint avg=True, bint avg_wgt=False): */ __pyx_k_tuple_276 = PyTuple_Pack(18, ((PyObject *)__pyx_n_s__input), ((PyObject *)__pyx_n_s__weights), ((PyObject *)__pyx_n_s__minp), ((PyObject *)__pyx_n_s__avg), ((PyObject *)__pyx_n_s__avg_wgt), ((PyObject *)__pyx_n_s__output), ((PyObject *)__pyx_n_s__tot_wgt), ((PyObject *)__pyx_n_s__counts), ((PyObject *)__pyx_n_s__in_i), ((PyObject *)__pyx_n_s__win_i), ((PyObject *)__pyx_n_s__win_n), ((PyObject *)__pyx_n_s__win_k), ((PyObject *)__pyx_n_s__in_n), ((PyObject *)__pyx_n_s__in_k), ((PyObject *)__pyx_n_s__val_in), ((PyObject *)__pyx_n_s__val_win), ((PyObject *)__pyx_n_s__c), ((PyObject *)__pyx_n_s__w)); if (unlikely(!__pyx_k_tuple_276)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1671; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_276); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_276)); __pyx_k_codeobj_277 = (PyObject*)__Pyx_PyCode_New(5, 0, 18, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_276, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_221, __pyx_n_s__roll_window, 1671, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_277)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1671; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/algos.pyx":1744 * @cython.wraparound(False) * @cython.boundscheck(False) * def is_lexsorted(list list_of_arrays): # <<<<<<<<<<<<<< * cdef: * int i */ __pyx_k_tuple_278 = PyTuple_Pack(9, ((PyObject *)__pyx_n_s__list_of_arrays), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__n), ((PyObject *)__pyx_n_s__nlevels), ((PyObject *)__pyx_n_s__k), ((PyObject *)__pyx_n_s__cur), ((PyObject *)__pyx_n_s__pre), ((PyObject *)__pyx_n_s__arr), ((PyObject *)__pyx_n_s__vecs)); if (unlikely(!__pyx_k_tuple_278)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1744; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_278); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_278)); __pyx_k_codeobj_279 = (PyObject*)__Pyx_PyCode_New(1, 0, 9, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_278, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_221, __pyx_n_s__is_lexsorted, 1744, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_279)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1744; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/algos.pyx":1777 * * @cython.boundscheck(False) * def groupby_indices(ndarray values): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = len(values) */ __pyx_k_tuple_280 = PyTuple_Pack(13, ((PyObject *)__pyx_n_s__values), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__n), ((PyObject *)__pyx_n_s__labels), ((PyObject *)__pyx_n_s__counts), ((PyObject *)__pyx_n_s__arr), ((PyObject *)__pyx_n_s__seen), ((PyObject *)__pyx_n_s__loc), ((PyObject *)__pyx_n_s__ids), ((PyObject *)__pyx_n_s__val), ((PyObject *)__pyx_n_s__k), ((PyObject *)__pyx_n_s__vecs), ((PyObject *)__pyx_n_s__result)); if (unlikely(!__pyx_k_tuple_280)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1777; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_280); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_280)); __pyx_k_codeobj_281 = (PyObject*)__Pyx_PyCode_New(1, 0, 13, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_280, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_221, __pyx_n_s__groupby_indices, 1777, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_281)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1777; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/algos.pyx":1814 * @cython.wraparound(False) * @cython.boundscheck(False) * def group_labels(ndarray[object] values): # <<<<<<<<<<<<<< * ''' * Compute label vector from input values and associated useful data */ __pyx_k_tuple_282 = PyTuple_Pack(10, ((PyObject *)__pyx_n_s__values), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__n), ((PyObject *)__pyx_n_s__labels), ((PyObject *)__pyx_n_s__counts), ((PyObject *)__pyx_n_s__ids), ((PyObject *)__pyx_n_s__reverse), ((PyObject *)__pyx_n_s__idx), ((PyObject *)__pyx_n_s__val), ((PyObject *)__pyx_n_s__count)); if (unlikely(!__pyx_k_tuple_282)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1814; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_282); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_282)); __pyx_k_codeobj_283 = (PyObject*)__Pyx_PyCode_New(1, 0, 10, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_282, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_221, __pyx_n_s__group_labels, 1814, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_283)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1814; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/algos.pyx":1856 * @cython.boundscheck(False) * @cython.wraparound(False) * def groupsort_indexer(ndarray[int64_t] index, Py_ssize_t ngroups): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, loc, label, n */ __pyx_k_tuple_284 = PyTuple_Pack(9, ((PyObject *)__pyx_n_s__index), ((PyObject *)__pyx_n_s__ngroups), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__loc), ((PyObject *)__pyx_n_s__label), ((PyObject *)__pyx_n_s__n), ((PyObject *)__pyx_n_s__counts), ((PyObject *)__pyx_n_s__where), ((PyObject *)__pyx_n_s__result)); if (unlikely(!__pyx_k_tuple_284)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1856; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_284); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_284)); __pyx_k_codeobj_285 = (PyObject*)__Pyx_PyCode_New(2, 0, 9, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_284, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_221, __pyx_n_s__groupsort_indexer, 1856, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_285)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1856; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/algos.pyx":1887 * @cython.boundscheck(False) * @cython.wraparound(False) * def group_nth_object(ndarray[object, ndim=2] out, # <<<<<<<<<<<<<< * ndarray[int64_t] counts, * ndarray[object, ndim=2] values, */ __pyx_k_tuple_286 = PyTuple_Pack(14, ((PyObject *)__pyx_n_s__out), ((PyObject *)__pyx_n_s__counts), ((PyObject *)__pyx_n_s__values), ((PyObject *)__pyx_n_s__labels), ((PyObject *)__pyx_n_s__rank), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__j), ((PyObject *)__pyx_n_s__N), ((PyObject *)__pyx_n_s__K), ((PyObject *)__pyx_n_s__lab), ((PyObject *)__pyx_n_s__val), ((PyObject *)__pyx_n_s__count), ((PyObject *)__pyx_n_s__nobs), ((PyObject *)__pyx_n_s__resx)); if (unlikely(!__pyx_k_tuple_286)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1887; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_286); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_286)); __pyx_k_codeobj_287 = (PyObject*)__Pyx_PyCode_New(5, 0, 14, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_286, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_221, __pyx_n_s__group_nth_object, 1887, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_287)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1887; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/algos.pyx":1931 * @cython.boundscheck(False) * @cython.wraparound(False) * def group_nth_bin_object(ndarray[object, ndim=2] out, # <<<<<<<<<<<<<< * ndarray[int64_t] counts, * ndarray[object, ndim=2] values, */ __pyx_k_tuple_288 = PyTuple_Pack(15, ((PyObject *)__pyx_n_s__out), ((PyObject *)__pyx_n_s__counts), ((PyObject *)__pyx_n_s__values), ((PyObject *)__pyx_n_s__bins), ((PyObject *)__pyx_n_s__rank), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__j), ((PyObject *)__pyx_n_s__N), ((PyObject *)__pyx_n_s__K), ((PyObject *)__pyx_n_s__ngroups), ((PyObject *)__pyx_n_s__b), ((PyObject *)__pyx_n_s__val), ((PyObject *)__pyx_n_s__count), ((PyObject *)__pyx_n_s__resx), ((PyObject *)__pyx_n_s__nobs)); if (unlikely(!__pyx_k_tuple_288)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1931; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_288); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_288)); __pyx_k_codeobj_289 = (PyObject*)__Pyx_PyCode_New(5, 0, 15, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_288, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_221, __pyx_n_s_290, 1931, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_289)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1931; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/algos.pyx":1979 * @cython.boundscheck(False) * @cython.wraparound(False) * def group_last_object(ndarray[object, ndim=2] out, # <<<<<<<<<<<<<< * ndarray[int64_t] counts, * ndarray[object, ndim=2] values, */ __pyx_k_tuple_291 = PyTuple_Pack(13, ((PyObject *)__pyx_n_s__out), ((PyObject *)__pyx_n_s__counts), ((PyObject *)__pyx_n_s__values), ((PyObject *)__pyx_n_s__labels), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__j), ((PyObject *)__pyx_n_s__N), ((PyObject *)__pyx_n_s__K), ((PyObject *)__pyx_n_s__lab), ((PyObject *)__pyx_n_s__val), ((PyObject *)__pyx_n_s__count), ((PyObject *)__pyx_n_s__resx), ((PyObject *)__pyx_n_s__nobs)); if (unlikely(!__pyx_k_tuple_291)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1979; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_291); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_291)); __pyx_k_codeobj_292 = (PyObject*)__Pyx_PyCode_New(4, 0, 13, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_291, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_221, __pyx_n_s__group_last_object, 1979, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_292)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1979; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/algos.pyx":2021 * @cython.boundscheck(False) * @cython.wraparound(False) * def group_last_bin_object(ndarray[object, ndim=2] out, # <<<<<<<<<<<<<< * ndarray[int64_t] counts, * ndarray[object, ndim=2] values, */ __pyx_k_tuple_293 = PyTuple_Pack(14, ((PyObject *)__pyx_n_s__out), ((PyObject *)__pyx_n_s__counts), ((PyObject *)__pyx_n_s__values), ((PyObject *)__pyx_n_s__bins), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__j), ((PyObject *)__pyx_n_s__N), ((PyObject *)__pyx_n_s__K), ((PyObject *)__pyx_n_s__ngroups), ((PyObject *)__pyx_n_s__b), ((PyObject *)__pyx_n_s__val), ((PyObject *)__pyx_n_s__count), ((PyObject *)__pyx_n_s__resx), ((PyObject *)__pyx_n_s__nobs)); if (unlikely(!__pyx_k_tuple_293)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2021; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_293); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_293)); __pyx_k_codeobj_294 = (PyObject*)__Pyx_PyCode_New(4, 0, 14, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_293, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_221, __pyx_n_s_295, 2021, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_294)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2021; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/algos.pyx":2071 * # median * * def group_median(ndarray[float64_t, ndim=2] out, # <<<<<<<<<<<<<< * ndarray[int64_t] counts, * ndarray[float64_t, ndim=2] values, */ __pyx_k_tuple_296 = PyTuple_Pack(14, ((PyObject *)__pyx_n_s__out), ((PyObject *)__pyx_n_s__counts), ((PyObject *)__pyx_n_s__values), ((PyObject *)__pyx_n_s__labels), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__j), ((PyObject *)__pyx_n_s__N), ((PyObject *)__pyx_n_s__K), ((PyObject *)__pyx_n_s__ngroups), ((PyObject *)__pyx_n_s__size), ((PyObject *)__pyx_n_s___counts), ((PyObject *)__pyx_n_s__data), ((PyObject *)__pyx_n_s__ptr), ((PyObject *)__pyx_n_s__indexer)); if (unlikely(!__pyx_k_tuple_296)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2071; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_296); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_296)); __pyx_k_codeobj_297 = (PyObject*)__Pyx_PyCode_New(4, 0, 14, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_296, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_221, __pyx_n_s__group_median, 2071, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_297)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2071; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/join.pyx":1 * def inner_join(ndarray[int64_t] left, ndarray[int64_t] right, # <<<<<<<<<<<<<< * Py_ssize_t max_groups): * cdef: */ __pyx_k_tuple_298 = PyTuple_Pack(20, ((PyObject *)__pyx_n_s__left), ((PyObject *)__pyx_n_s__right), ((PyObject *)__pyx_n_s__max_groups), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__j), ((PyObject *)__pyx_n_s__k), ((PyObject *)__pyx_n_s__count), ((PyObject *)__pyx_n_s__left_count), ((PyObject *)__pyx_n_s__right_count), ((PyObject *)__pyx_n_s__left_sorter), ((PyObject *)__pyx_n_s__right_sorter), ((PyObject *)__pyx_n_s__left_indexer), ((PyObject *)__pyx_n_s__right_indexer), ((PyObject *)__pyx_n_s__lc), ((PyObject *)__pyx_n_s__rc), ((PyObject *)__pyx_n_s__loc), ((PyObject *)__pyx_n_s__left_pos), ((PyObject *)__pyx_n_s__right_pos), ((PyObject *)__pyx_n_s__position), ((PyObject *)__pyx_n_s__offset)); if (unlikely(!__pyx_k_tuple_298)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_298); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_298)); __pyx_k_codeobj_299 = (PyObject*)__Pyx_PyCode_New(3, 0, 20, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_298, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_300, __pyx_n_s__inner_join, 1, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_299)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/join.pyx":51 * _get_result_indexer(right_sorter, right_indexer)) * * def left_outer_join(ndarray[int64_t] left, ndarray[int64_t] right, # <<<<<<<<<<<<<< * Py_ssize_t max_groups, sort=True): * cdef: */ __pyx_k_tuple_301 = PyTuple_Pack(22, ((PyObject *)__pyx_n_s__left), ((PyObject *)__pyx_n_s__right), ((PyObject *)__pyx_n_s__max_groups), ((PyObject *)__pyx_n_s__sort), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__j), ((PyObject *)__pyx_n_s__k), ((PyObject *)__pyx_n_s__count), ((PyObject *)__pyx_n_s__left_count), ((PyObject *)__pyx_n_s__right_count), ((PyObject *)__pyx_n_s__left_sorter), ((PyObject *)__pyx_n_s__right_sorter), ((PyObject *)__pyx_n_s__rev), ((PyObject *)__pyx_n_s__left_indexer), ((PyObject *)__pyx_n_s__right_indexer), ((PyObject *)__pyx_n_s__lc), ((PyObject *)__pyx_n_s__rc), ((PyObject *)__pyx_n_s__loc), ((PyObject *)__pyx_n_s__left_pos), ((PyObject *)__pyx_n_s__right_pos), ((PyObject *)__pyx_n_s__position), ((PyObject *)__pyx_n_s__offset)); if (unlikely(!__pyx_k_tuple_301)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_301); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_301)); __pyx_k_codeobj_302 = (PyObject*)__Pyx_PyCode_New(4, 0, 22, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_301, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_300, __pyx_n_s__left_outer_join, 51, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_302)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/join.pyx":120 * * * def full_outer_join(ndarray[int64_t] left, ndarray[int64_t] right, # <<<<<<<<<<<<<< * Py_ssize_t max_groups): * cdef: */ __pyx_k_tuple_303 = PyTuple_Pack(19, ((PyObject *)__pyx_n_s__left), ((PyObject *)__pyx_n_s__right), ((PyObject *)__pyx_n_s__max_groups), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__j), ((PyObject *)__pyx_n_s__k), ((PyObject *)__pyx_n_s__count), ((PyObject *)__pyx_n_s__left_count), ((PyObject *)__pyx_n_s__right_count), ((PyObject *)__pyx_n_s__left_sorter), ((PyObject *)__pyx_n_s__right_sorter), ((PyObject *)__pyx_n_s__left_indexer), ((PyObject *)__pyx_n_s__right_indexer), ((PyObject *)__pyx_n_s__lc), ((PyObject *)__pyx_n_s__rc), ((PyObject *)__pyx_n_s__left_pos), ((PyObject *)__pyx_n_s__right_pos), ((PyObject *)__pyx_n_s__offset), ((PyObject *)__pyx_n_s__position)); if (unlikely(!__pyx_k_tuple_303)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 120; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_303); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_303)); __pyx_k_codeobj_304 = (PyObject*)__Pyx_PyCode_New(3, 0, 19, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_303, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_300, __pyx_n_s__full_outer_join, 120, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_304)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 120; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/join.pyx":184 * * * def _get_result_indexer(sorter, indexer): # <<<<<<<<<<<<<< * if indexer.dtype != np.int_: * indexer = indexer.astype(np.int_) */ __pyx_k_tuple_305 = PyTuple_Pack(3, ((PyObject *)__pyx_n_s__sorter), ((PyObject *)__pyx_n_s__indexer), ((PyObject *)__pyx_n_s__res)); if (unlikely(!__pyx_k_tuple_305)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 184; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_305); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_305)); __pyx_k_codeobj_306 = (PyObject*)__Pyx_PyCode_New(2, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_305, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_300, __pyx_n_s___get_result_indexer, 184, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_306)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 184; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/join.pyx":199 * * * def ffill_indexer(ndarray[int64_t] indexer): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = len(indexer) */ __pyx_k_tuple_307 = PyTuple_Pack(6, ((PyObject *)__pyx_n_s__indexer), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__n), ((PyObject *)__pyx_n_s__result), ((PyObject *)__pyx_n_s__val), ((PyObject *)__pyx_n_s__last_obs)); if (unlikely(!__pyx_k_tuple_307)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 199; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_307); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_307)); __pyx_k_codeobj_308 = (PyObject*)__Pyx_PyCode_New(1, 0, 6, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_307, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_300, __pyx_n_s__ffill_indexer, 199, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_308)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 199; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/join.pyx":219 * * * def ffill_by_group(ndarray[int64_t] indexer, ndarray[int64_t] group_ids, # <<<<<<<<<<<<<< * int64_t max_group): * cdef: */ __pyx_k_tuple_309 = PyTuple_Pack(9, ((PyObject *)__pyx_n_s__indexer), ((PyObject *)__pyx_n_s__group_ids), ((PyObject *)__pyx_n_s__max_group), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__n), ((PyObject *)__pyx_n_s__result), ((PyObject *)__pyx_n_s__last_obs), ((PyObject *)__pyx_n_s__gid), ((PyObject *)__pyx_n_s__val)); if (unlikely(!__pyx_k_tuple_309)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 219; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_309); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_309)); __pyx_k_codeobj_310 = (PyObject*)__Pyx_PyCode_New(3, 0, 9, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_309, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_300, __pyx_n_s__ffill_by_group, 219, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_310)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 219; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":39 * import_ufunc() * * cdef int PLATFORM_INT = ( np.arange(0, dtype=np.int_)).descr.type_num # <<<<<<<<<<<<<< * * cpdef ensure_platform_int(object arr): */ __pyx_k_tuple_311 = PyTuple_Pack(1, __pyx_int_0); if (unlikely(!__pyx_k_tuple_311)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 39; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_311); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_311)); /* "pandas/src/generated.pyx":257 * @cython.boundscheck(False) * @cython.wraparound(False) * def pad_float64(ndarray[float64_t] old, ndarray[float64_t] new, # <<<<<<<<<<<<<< * limit=None): * cdef Py_ssize_t i, j, nleft, nright */ __pyx_k_tuple_312 = PyTuple_Pack(12, ((PyObject *)__pyx_n_s__old), ((PyObject *)__pyx_n_s__new), ((PyObject *)__pyx_n_s__limit), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__j), ((PyObject *)__pyx_n_s__nleft), ((PyObject *)__pyx_n_s__nright), ((PyObject *)__pyx_n_s__indexer), ((PyObject *)__pyx_n_s__cur), ((PyObject *)__pyx_n_s__next), ((PyObject *)__pyx_n_s__lim), ((PyObject *)__pyx_n_s__fill_count)); if (unlikely(!__pyx_k_tuple_312)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 257; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_312); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_312)); __pyx_k_codeobj_313 = (PyObject*)__Pyx_PyCode_New(3, 0, 12, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_312, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_314, __pyx_n_s__pad_float64, 257, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_313)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 257; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":318 * @cython.boundscheck(False) * @cython.wraparound(False) * def pad_float32(ndarray[float32_t] old, ndarray[float32_t] new, # <<<<<<<<<<<<<< * limit=None): * cdef Py_ssize_t i, j, nleft, nright */ __pyx_k_tuple_315 = PyTuple_Pack(12, ((PyObject *)__pyx_n_s__old), ((PyObject *)__pyx_n_s__new), ((PyObject *)__pyx_n_s__limit), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__j), ((PyObject *)__pyx_n_s__nleft), ((PyObject *)__pyx_n_s__nright), ((PyObject *)__pyx_n_s__indexer), ((PyObject *)__pyx_n_s__cur), ((PyObject *)__pyx_n_s__next), ((PyObject *)__pyx_n_s__lim), ((PyObject *)__pyx_n_s__fill_count)); if (unlikely(!__pyx_k_tuple_315)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 318; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_315); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_315)); __pyx_k_codeobj_316 = (PyObject*)__Pyx_PyCode_New(3, 0, 12, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_315, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_314, __pyx_n_s__pad_float32, 318, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_316)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 318; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":379 * @cython.boundscheck(False) * @cython.wraparound(False) * def pad_object(ndarray[object] old, ndarray[object] new, # <<<<<<<<<<<<<< * limit=None): * cdef Py_ssize_t i, j, nleft, nright */ __pyx_k_tuple_317 = PyTuple_Pack(12, ((PyObject *)__pyx_n_s__old), ((PyObject *)__pyx_n_s__new), ((PyObject *)__pyx_n_s__limit), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__j), ((PyObject *)__pyx_n_s__nleft), ((PyObject *)__pyx_n_s__nright), ((PyObject *)__pyx_n_s__indexer), ((PyObject *)__pyx_n_s__cur), ((PyObject *)__pyx_n_s__next), ((PyObject *)__pyx_n_s__lim), ((PyObject *)__pyx_n_s__fill_count)); if (unlikely(!__pyx_k_tuple_317)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 379; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_317); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_317)); __pyx_k_codeobj_318 = (PyObject*)__Pyx_PyCode_New(3, 0, 12, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_317, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_314, __pyx_n_s__pad_object, 379, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_318)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 379; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":440 * @cython.boundscheck(False) * @cython.wraparound(False) * def pad_int32(ndarray[int32_t] old, ndarray[int32_t] new, # <<<<<<<<<<<<<< * limit=None): * cdef Py_ssize_t i, j, nleft, nright */ __pyx_k_tuple_319 = PyTuple_Pack(12, ((PyObject *)__pyx_n_s__old), ((PyObject *)__pyx_n_s__new), ((PyObject *)__pyx_n_s__limit), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__j), ((PyObject *)__pyx_n_s__nleft), ((PyObject *)__pyx_n_s__nright), ((PyObject *)__pyx_n_s__indexer), ((PyObject *)__pyx_n_s__cur), ((PyObject *)__pyx_n_s__next), ((PyObject *)__pyx_n_s__lim), ((PyObject *)__pyx_n_s__fill_count)); if (unlikely(!__pyx_k_tuple_319)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 440; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_319); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_319)); __pyx_k_codeobj_320 = (PyObject*)__Pyx_PyCode_New(3, 0, 12, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_319, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_314, __pyx_n_s__pad_int32, 440, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_320)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 440; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":501 * @cython.boundscheck(False) * @cython.wraparound(False) * def pad_int64(ndarray[int64_t] old, ndarray[int64_t] new, # <<<<<<<<<<<<<< * limit=None): * cdef Py_ssize_t i, j, nleft, nright */ __pyx_k_tuple_321 = PyTuple_Pack(12, ((PyObject *)__pyx_n_s__old), ((PyObject *)__pyx_n_s__new), ((PyObject *)__pyx_n_s__limit), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__j), ((PyObject *)__pyx_n_s__nleft), ((PyObject *)__pyx_n_s__nright), ((PyObject *)__pyx_n_s__indexer), ((PyObject *)__pyx_n_s__cur), ((PyObject *)__pyx_n_s__next), ((PyObject *)__pyx_n_s__lim), ((PyObject *)__pyx_n_s__fill_count)); if (unlikely(!__pyx_k_tuple_321)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 501; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_321); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_321)); __pyx_k_codeobj_322 = (PyObject*)__Pyx_PyCode_New(3, 0, 12, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_321, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_314, __pyx_n_s__pad_int64, 501, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_322)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 501; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":562 * @cython.boundscheck(False) * @cython.wraparound(False) * def pad_bool(ndarray[uint8_t] old, ndarray[uint8_t] new, # <<<<<<<<<<<<<< * limit=None): * cdef Py_ssize_t i, j, nleft, nright */ __pyx_k_tuple_323 = PyTuple_Pack(12, ((PyObject *)__pyx_n_s__old), ((PyObject *)__pyx_n_s__new), ((PyObject *)__pyx_n_s__limit), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__j), ((PyObject *)__pyx_n_s__nleft), ((PyObject *)__pyx_n_s__nright), ((PyObject *)__pyx_n_s__indexer), ((PyObject *)__pyx_n_s__cur), ((PyObject *)__pyx_n_s__next), ((PyObject *)__pyx_n_s__lim), ((PyObject *)__pyx_n_s__fill_count)); if (unlikely(!__pyx_k_tuple_323)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 562; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_323); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_323)); __pyx_k_codeobj_324 = (PyObject*)__Pyx_PyCode_New(3, 0, 12, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_323, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_314, __pyx_n_s__pad_bool, 562, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_324)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 562; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":624 * @cython.boundscheck(False) * @cython.wraparound(False) * def backfill_float64(ndarray[float64_t] old, ndarray[float64_t] new, # <<<<<<<<<<<<<< * limit=None): * cdef Py_ssize_t i, j, nleft, nright */ __pyx_k_tuple_325 = PyTuple_Pack(12, ((PyObject *)__pyx_n_s__old), ((PyObject *)__pyx_n_s__new), ((PyObject *)__pyx_n_s__limit), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__j), ((PyObject *)__pyx_n_s__nleft), ((PyObject *)__pyx_n_s__nright), ((PyObject *)__pyx_n_s__indexer), ((PyObject *)__pyx_n_s__cur), ((PyObject *)__pyx_n_s__prev), ((PyObject *)__pyx_n_s__lim), ((PyObject *)__pyx_n_s__fill_count)); if (unlikely(!__pyx_k_tuple_325)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 624; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_325); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_325)); __pyx_k_codeobj_326 = (PyObject*)__Pyx_PyCode_New(3, 0, 12, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_325, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_314, __pyx_n_s__backfill_float64, 624, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_326)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 624; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":686 * @cython.boundscheck(False) * @cython.wraparound(False) * def backfill_float32(ndarray[float32_t] old, ndarray[float32_t] new, # <<<<<<<<<<<<<< * limit=None): * cdef Py_ssize_t i, j, nleft, nright */ __pyx_k_tuple_327 = PyTuple_Pack(12, ((PyObject *)__pyx_n_s__old), ((PyObject *)__pyx_n_s__new), ((PyObject *)__pyx_n_s__limit), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__j), ((PyObject *)__pyx_n_s__nleft), ((PyObject *)__pyx_n_s__nright), ((PyObject *)__pyx_n_s__indexer), ((PyObject *)__pyx_n_s__cur), ((PyObject *)__pyx_n_s__prev), ((PyObject *)__pyx_n_s__lim), ((PyObject *)__pyx_n_s__fill_count)); if (unlikely(!__pyx_k_tuple_327)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 686; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_327); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_327)); __pyx_k_codeobj_328 = (PyObject*)__Pyx_PyCode_New(3, 0, 12, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_327, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_314, __pyx_n_s__backfill_float32, 686, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_328)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 686; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":748 * @cython.boundscheck(False) * @cython.wraparound(False) * def backfill_object(ndarray[object] old, ndarray[object] new, # <<<<<<<<<<<<<< * limit=None): * cdef Py_ssize_t i, j, nleft, nright */ __pyx_k_tuple_329 = PyTuple_Pack(12, ((PyObject *)__pyx_n_s__old), ((PyObject *)__pyx_n_s__new), ((PyObject *)__pyx_n_s__limit), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__j), ((PyObject *)__pyx_n_s__nleft), ((PyObject *)__pyx_n_s__nright), ((PyObject *)__pyx_n_s__indexer), ((PyObject *)__pyx_n_s__cur), ((PyObject *)__pyx_n_s__prev), ((PyObject *)__pyx_n_s__lim), ((PyObject *)__pyx_n_s__fill_count)); if (unlikely(!__pyx_k_tuple_329)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 748; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_329); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_329)); __pyx_k_codeobj_330 = (PyObject*)__Pyx_PyCode_New(3, 0, 12, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_329, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_314, __pyx_n_s__backfill_object, 748, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_330)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 748; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":810 * @cython.boundscheck(False) * @cython.wraparound(False) * def backfill_int32(ndarray[int32_t] old, ndarray[int32_t] new, # <<<<<<<<<<<<<< * limit=None): * cdef Py_ssize_t i, j, nleft, nright */ __pyx_k_tuple_331 = PyTuple_Pack(12, ((PyObject *)__pyx_n_s__old), ((PyObject *)__pyx_n_s__new), ((PyObject *)__pyx_n_s__limit), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__j), ((PyObject *)__pyx_n_s__nleft), ((PyObject *)__pyx_n_s__nright), ((PyObject *)__pyx_n_s__indexer), ((PyObject *)__pyx_n_s__cur), ((PyObject *)__pyx_n_s__prev), ((PyObject *)__pyx_n_s__lim), ((PyObject *)__pyx_n_s__fill_count)); if (unlikely(!__pyx_k_tuple_331)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 810; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_331); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_331)); __pyx_k_codeobj_332 = (PyObject*)__Pyx_PyCode_New(3, 0, 12, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_331, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_314, __pyx_n_s__backfill_int32, 810, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_332)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 810; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":872 * @cython.boundscheck(False) * @cython.wraparound(False) * def backfill_int64(ndarray[int64_t] old, ndarray[int64_t] new, # <<<<<<<<<<<<<< * limit=None): * cdef Py_ssize_t i, j, nleft, nright */ __pyx_k_tuple_333 = PyTuple_Pack(12, ((PyObject *)__pyx_n_s__old), ((PyObject *)__pyx_n_s__new), ((PyObject *)__pyx_n_s__limit), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__j), ((PyObject *)__pyx_n_s__nleft), ((PyObject *)__pyx_n_s__nright), ((PyObject *)__pyx_n_s__indexer), ((PyObject *)__pyx_n_s__cur), ((PyObject *)__pyx_n_s__prev), ((PyObject *)__pyx_n_s__lim), ((PyObject *)__pyx_n_s__fill_count)); if (unlikely(!__pyx_k_tuple_333)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 872; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_333); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_333)); __pyx_k_codeobj_334 = (PyObject*)__Pyx_PyCode_New(3, 0, 12, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_333, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_314, __pyx_n_s__backfill_int64, 872, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_334)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 872; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":934 * @cython.boundscheck(False) * @cython.wraparound(False) * def backfill_bool(ndarray[uint8_t] old, ndarray[uint8_t] new, # <<<<<<<<<<<<<< * limit=None): * cdef Py_ssize_t i, j, nleft, nright */ __pyx_k_tuple_335 = PyTuple_Pack(12, ((PyObject *)__pyx_n_s__old), ((PyObject *)__pyx_n_s__new), ((PyObject *)__pyx_n_s__limit), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__j), ((PyObject *)__pyx_n_s__nleft), ((PyObject *)__pyx_n_s__nright), ((PyObject *)__pyx_n_s__indexer), ((PyObject *)__pyx_n_s__cur), ((PyObject *)__pyx_n_s__prev), ((PyObject *)__pyx_n_s__lim), ((PyObject *)__pyx_n_s__fill_count)); if (unlikely(!__pyx_k_tuple_335)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 934; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_335); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_335)); __pyx_k_codeobj_336 = (PyObject*)__Pyx_PyCode_New(3, 0, 12, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_335, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_314, __pyx_n_s__backfill_bool, 934, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_336)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 934; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":997 * @cython.boundscheck(False) * @cython.wraparound(False) * def pad_inplace_float64(ndarray[float64_t] values, # <<<<<<<<<<<<<< * ndarray[uint8_t, cast=True] mask, * limit=None): */ __pyx_k_tuple_337 = PyTuple_Pack(8, ((PyObject *)__pyx_n_s__values), ((PyObject *)__pyx_n_s__mask), ((PyObject *)__pyx_n_s__limit), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__N), ((PyObject *)__pyx_n_s__val), ((PyObject *)__pyx_n_s__lim), ((PyObject *)__pyx_n_s__fill_count)); if (unlikely(!__pyx_k_tuple_337)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 997; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_337); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_337)); __pyx_k_codeobj_338 = (PyObject*)__Pyx_PyCode_New(3, 0, 8, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_337, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_314, __pyx_n_s__pad_inplace_float64, 997, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_338)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 997; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":1030 * @cython.boundscheck(False) * @cython.wraparound(False) * def pad_inplace_float32(ndarray[float32_t] values, # <<<<<<<<<<<<<< * ndarray[uint8_t, cast=True] mask, * limit=None): */ __pyx_k_tuple_339 = PyTuple_Pack(8, ((PyObject *)__pyx_n_s__values), ((PyObject *)__pyx_n_s__mask), ((PyObject *)__pyx_n_s__limit), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__N), ((PyObject *)__pyx_n_s__val), ((PyObject *)__pyx_n_s__lim), ((PyObject *)__pyx_n_s__fill_count)); if (unlikely(!__pyx_k_tuple_339)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1030; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_339); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_339)); __pyx_k_codeobj_340 = (PyObject*)__Pyx_PyCode_New(3, 0, 8, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_339, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_314, __pyx_n_s__pad_inplace_float32, 1030, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_340)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1030; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":1063 * @cython.boundscheck(False) * @cython.wraparound(False) * def pad_inplace_object(ndarray[object] values, # <<<<<<<<<<<<<< * ndarray[uint8_t, cast=True] mask, * limit=None): */ __pyx_k_tuple_341 = PyTuple_Pack(8, ((PyObject *)__pyx_n_s__values), ((PyObject *)__pyx_n_s__mask), ((PyObject *)__pyx_n_s__limit), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__N), ((PyObject *)__pyx_n_s__val), ((PyObject *)__pyx_n_s__lim), ((PyObject *)__pyx_n_s__fill_count)); if (unlikely(!__pyx_k_tuple_341)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1063; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_341); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_341)); __pyx_k_codeobj_342 = (PyObject*)__Pyx_PyCode_New(3, 0, 8, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_341, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_314, __pyx_n_s__pad_inplace_object, 1063, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_342)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1063; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":1096 * @cython.boundscheck(False) * @cython.wraparound(False) * def pad_inplace_int32(ndarray[int32_t] values, # <<<<<<<<<<<<<< * ndarray[uint8_t, cast=True] mask, * limit=None): */ __pyx_k_tuple_343 = PyTuple_Pack(8, ((PyObject *)__pyx_n_s__values), ((PyObject *)__pyx_n_s__mask), ((PyObject *)__pyx_n_s__limit), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__N), ((PyObject *)__pyx_n_s__val), ((PyObject *)__pyx_n_s__lim), ((PyObject *)__pyx_n_s__fill_count)); if (unlikely(!__pyx_k_tuple_343)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1096; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_343); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_343)); __pyx_k_codeobj_344 = (PyObject*)__Pyx_PyCode_New(3, 0, 8, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_343, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_314, __pyx_n_s__pad_inplace_int32, 1096, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_344)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1096; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":1129 * @cython.boundscheck(False) * @cython.wraparound(False) * def pad_inplace_int64(ndarray[int64_t] values, # <<<<<<<<<<<<<< * ndarray[uint8_t, cast=True] mask, * limit=None): */ __pyx_k_tuple_345 = PyTuple_Pack(8, ((PyObject *)__pyx_n_s__values), ((PyObject *)__pyx_n_s__mask), ((PyObject *)__pyx_n_s__limit), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__N), ((PyObject *)__pyx_n_s__val), ((PyObject *)__pyx_n_s__lim), ((PyObject *)__pyx_n_s__fill_count)); if (unlikely(!__pyx_k_tuple_345)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1129; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_345); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_345)); __pyx_k_codeobj_346 = (PyObject*)__Pyx_PyCode_New(3, 0, 8, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_345, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_314, __pyx_n_s__pad_inplace_int64, 1129, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_346)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1129; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":1162 * @cython.boundscheck(False) * @cython.wraparound(False) * def pad_inplace_bool(ndarray[uint8_t] values, # <<<<<<<<<<<<<< * ndarray[uint8_t, cast=True] mask, * limit=None): */ __pyx_k_tuple_347 = PyTuple_Pack(8, ((PyObject *)__pyx_n_s__values), ((PyObject *)__pyx_n_s__mask), ((PyObject *)__pyx_n_s__limit), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__N), ((PyObject *)__pyx_n_s__val), ((PyObject *)__pyx_n_s__lim), ((PyObject *)__pyx_n_s__fill_count)); if (unlikely(!__pyx_k_tuple_347)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1162; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_347); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_347)); __pyx_k_codeobj_348 = (PyObject*)__Pyx_PyCode_New(3, 0, 8, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_347, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_314, __pyx_n_s__pad_inplace_bool, 1162, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_348)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1162; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":1196 * @cython.boundscheck(False) * @cython.wraparound(False) * def backfill_inplace_float64(ndarray[float64_t] values, # <<<<<<<<<<<<<< * ndarray[uint8_t, cast=True] mask, * limit=None): */ __pyx_k_tuple_349 = PyTuple_Pack(8, ((PyObject *)__pyx_n_s__values), ((PyObject *)__pyx_n_s__mask), ((PyObject *)__pyx_n_s__limit), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__N), ((PyObject *)__pyx_n_s__val), ((PyObject *)__pyx_n_s__lim), ((PyObject *)__pyx_n_s__fill_count)); if (unlikely(!__pyx_k_tuple_349)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1196; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_349); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_349)); __pyx_k_codeobj_350 = (PyObject*)__Pyx_PyCode_New(3, 0, 8, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_349, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_314, __pyx_n_s_351, 1196, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_350)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1196; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":1228 * @cython.boundscheck(False) * @cython.wraparound(False) * def backfill_inplace_float32(ndarray[float32_t] values, # <<<<<<<<<<<<<< * ndarray[uint8_t, cast=True] mask, * limit=None): */ __pyx_k_tuple_352 = PyTuple_Pack(8, ((PyObject *)__pyx_n_s__values), ((PyObject *)__pyx_n_s__mask), ((PyObject *)__pyx_n_s__limit), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__N), ((PyObject *)__pyx_n_s__val), ((PyObject *)__pyx_n_s__lim), ((PyObject *)__pyx_n_s__fill_count)); if (unlikely(!__pyx_k_tuple_352)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1228; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_352); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_352)); __pyx_k_codeobj_353 = (PyObject*)__Pyx_PyCode_New(3, 0, 8, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_352, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_314, __pyx_n_s_354, 1228, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_353)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1228; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":1260 * @cython.boundscheck(False) * @cython.wraparound(False) * def backfill_inplace_object(ndarray[object] values, # <<<<<<<<<<<<<< * ndarray[uint8_t, cast=True] mask, * limit=None): */ __pyx_k_tuple_355 = PyTuple_Pack(8, ((PyObject *)__pyx_n_s__values), ((PyObject *)__pyx_n_s__mask), ((PyObject *)__pyx_n_s__limit), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__N), ((PyObject *)__pyx_n_s__val), ((PyObject *)__pyx_n_s__lim), ((PyObject *)__pyx_n_s__fill_count)); if (unlikely(!__pyx_k_tuple_355)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1260; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_355); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_355)); __pyx_k_codeobj_356 = (PyObject*)__Pyx_PyCode_New(3, 0, 8, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_355, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_314, __pyx_n_s_357, 1260, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_356)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1260; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":1292 * @cython.boundscheck(False) * @cython.wraparound(False) * def backfill_inplace_int32(ndarray[int32_t] values, # <<<<<<<<<<<<<< * ndarray[uint8_t, cast=True] mask, * limit=None): */ __pyx_k_tuple_358 = PyTuple_Pack(8, ((PyObject *)__pyx_n_s__values), ((PyObject *)__pyx_n_s__mask), ((PyObject *)__pyx_n_s__limit), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__N), ((PyObject *)__pyx_n_s__val), ((PyObject *)__pyx_n_s__lim), ((PyObject *)__pyx_n_s__fill_count)); if (unlikely(!__pyx_k_tuple_358)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1292; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_358); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_358)); __pyx_k_codeobj_359 = (PyObject*)__Pyx_PyCode_New(3, 0, 8, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_358, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_314, __pyx_n_s_360, 1292, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_359)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1292; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":1324 * @cython.boundscheck(False) * @cython.wraparound(False) * def backfill_inplace_int64(ndarray[int64_t] values, # <<<<<<<<<<<<<< * ndarray[uint8_t, cast=True] mask, * limit=None): */ __pyx_k_tuple_361 = PyTuple_Pack(8, ((PyObject *)__pyx_n_s__values), ((PyObject *)__pyx_n_s__mask), ((PyObject *)__pyx_n_s__limit), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__N), ((PyObject *)__pyx_n_s__val), ((PyObject *)__pyx_n_s__lim), ((PyObject *)__pyx_n_s__fill_count)); if (unlikely(!__pyx_k_tuple_361)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1324; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_361); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_361)); __pyx_k_codeobj_362 = (PyObject*)__Pyx_PyCode_New(3, 0, 8, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_361, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_314, __pyx_n_s_363, 1324, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_362)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1324; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":1356 * @cython.boundscheck(False) * @cython.wraparound(False) * def backfill_inplace_bool(ndarray[uint8_t] values, # <<<<<<<<<<<<<< * ndarray[uint8_t, cast=True] mask, * limit=None): */ __pyx_k_tuple_364 = PyTuple_Pack(8, ((PyObject *)__pyx_n_s__values), ((PyObject *)__pyx_n_s__mask), ((PyObject *)__pyx_n_s__limit), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__N), ((PyObject *)__pyx_n_s__val), ((PyObject *)__pyx_n_s__lim), ((PyObject *)__pyx_n_s__fill_count)); if (unlikely(!__pyx_k_tuple_364)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1356; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_364); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_364)); __pyx_k_codeobj_365 = (PyObject*)__Pyx_PyCode_New(3, 0, 8, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_364, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_314, __pyx_n_s_366, 1356, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_365)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1356; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":1389 * @cython.boundscheck(False) * @cython.wraparound(False) * def pad_2d_inplace_float64(ndarray[float64_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[uint8_t, ndim=2] mask, * limit=None): */ __pyx_k_tuple_367 = PyTuple_Pack(10, ((PyObject *)__pyx_n_s__values), ((PyObject *)__pyx_n_s__mask), ((PyObject *)__pyx_n_s__limit), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__j), ((PyObject *)__pyx_n_s__N), ((PyObject *)__pyx_n_s__K), ((PyObject *)__pyx_n_s__val), ((PyObject *)__pyx_n_s__lim), ((PyObject *)__pyx_n_s__fill_count)); if (unlikely(!__pyx_k_tuple_367)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1389; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_367); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_367)); __pyx_k_codeobj_368 = (PyObject*)__Pyx_PyCode_New(3, 0, 10, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_367, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_314, __pyx_n_s_369, 1389, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_368)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1389; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":1423 * @cython.boundscheck(False) * @cython.wraparound(False) * def pad_2d_inplace_float32(ndarray[float32_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[uint8_t, ndim=2] mask, * limit=None): */ __pyx_k_tuple_370 = PyTuple_Pack(10, ((PyObject *)__pyx_n_s__values), ((PyObject *)__pyx_n_s__mask), ((PyObject *)__pyx_n_s__limit), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__j), ((PyObject *)__pyx_n_s__N), ((PyObject *)__pyx_n_s__K), ((PyObject *)__pyx_n_s__val), ((PyObject *)__pyx_n_s__lim), ((PyObject *)__pyx_n_s__fill_count)); if (unlikely(!__pyx_k_tuple_370)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1423; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_370); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_370)); __pyx_k_codeobj_371 = (PyObject*)__Pyx_PyCode_New(3, 0, 10, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_370, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_314, __pyx_n_s_372, 1423, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_371)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1423; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":1457 * @cython.boundscheck(False) * @cython.wraparound(False) * def pad_2d_inplace_object(ndarray[object, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[uint8_t, ndim=2] mask, * limit=None): */ __pyx_k_tuple_373 = PyTuple_Pack(10, ((PyObject *)__pyx_n_s__values), ((PyObject *)__pyx_n_s__mask), ((PyObject *)__pyx_n_s__limit), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__j), ((PyObject *)__pyx_n_s__N), ((PyObject *)__pyx_n_s__K), ((PyObject *)__pyx_n_s__val), ((PyObject *)__pyx_n_s__lim), ((PyObject *)__pyx_n_s__fill_count)); if (unlikely(!__pyx_k_tuple_373)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1457; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_373); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_373)); __pyx_k_codeobj_374 = (PyObject*)__Pyx_PyCode_New(3, 0, 10, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_373, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_314, __pyx_n_s_375, 1457, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_374)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1457; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":1491 * @cython.boundscheck(False) * @cython.wraparound(False) * def pad_2d_inplace_int32(ndarray[int32_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[uint8_t, ndim=2] mask, * limit=None): */ __pyx_k_tuple_376 = PyTuple_Pack(10, ((PyObject *)__pyx_n_s__values), ((PyObject *)__pyx_n_s__mask), ((PyObject *)__pyx_n_s__limit), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__j), ((PyObject *)__pyx_n_s__N), ((PyObject *)__pyx_n_s__K), ((PyObject *)__pyx_n_s__val), ((PyObject *)__pyx_n_s__lim), ((PyObject *)__pyx_n_s__fill_count)); if (unlikely(!__pyx_k_tuple_376)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1491; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_376); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_376)); __pyx_k_codeobj_377 = (PyObject*)__Pyx_PyCode_New(3, 0, 10, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_376, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_314, __pyx_n_s_378, 1491, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_377)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1491; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":1525 * @cython.boundscheck(False) * @cython.wraparound(False) * def pad_2d_inplace_int64(ndarray[int64_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[uint8_t, ndim=2] mask, * limit=None): */ __pyx_k_tuple_379 = PyTuple_Pack(10, ((PyObject *)__pyx_n_s__values), ((PyObject *)__pyx_n_s__mask), ((PyObject *)__pyx_n_s__limit), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__j), ((PyObject *)__pyx_n_s__N), ((PyObject *)__pyx_n_s__K), ((PyObject *)__pyx_n_s__val), ((PyObject *)__pyx_n_s__lim), ((PyObject *)__pyx_n_s__fill_count)); if (unlikely(!__pyx_k_tuple_379)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1525; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_379); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_379)); __pyx_k_codeobj_380 = (PyObject*)__Pyx_PyCode_New(3, 0, 10, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_379, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_314, __pyx_n_s_381, 1525, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_380)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1525; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":1559 * @cython.boundscheck(False) * @cython.wraparound(False) * def pad_2d_inplace_bool(ndarray[uint8_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[uint8_t, ndim=2] mask, * limit=None): */ __pyx_k_tuple_382 = PyTuple_Pack(10, ((PyObject *)__pyx_n_s__values), ((PyObject *)__pyx_n_s__mask), ((PyObject *)__pyx_n_s__limit), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__j), ((PyObject *)__pyx_n_s__N), ((PyObject *)__pyx_n_s__K), ((PyObject *)__pyx_n_s__val), ((PyObject *)__pyx_n_s__lim), ((PyObject *)__pyx_n_s__fill_count)); if (unlikely(!__pyx_k_tuple_382)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1559; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_382); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_382)); __pyx_k_codeobj_383 = (PyObject*)__Pyx_PyCode_New(3, 0, 10, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_382, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_314, __pyx_n_s__pad_2d_inplace_bool, 1559, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_383)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1559; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":1594 * @cython.boundscheck(False) * @cython.wraparound(False) * def backfill_2d_inplace_float64(ndarray[float64_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[uint8_t, ndim=2] mask, * limit=None): */ __pyx_k_tuple_384 = PyTuple_Pack(10, ((PyObject *)__pyx_n_s__values), ((PyObject *)__pyx_n_s__mask), ((PyObject *)__pyx_n_s__limit), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__j), ((PyObject *)__pyx_n_s__N), ((PyObject *)__pyx_n_s__K), ((PyObject *)__pyx_n_s__val), ((PyObject *)__pyx_n_s__lim), ((PyObject *)__pyx_n_s__fill_count)); if (unlikely(!__pyx_k_tuple_384)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1594; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_384); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_384)); __pyx_k_codeobj_385 = (PyObject*)__Pyx_PyCode_New(3, 0, 10, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_384, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_314, __pyx_n_s_386, 1594, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_385)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1594; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":1628 * @cython.boundscheck(False) * @cython.wraparound(False) * def backfill_2d_inplace_float32(ndarray[float32_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[uint8_t, ndim=2] mask, * limit=None): */ __pyx_k_tuple_387 = PyTuple_Pack(10, ((PyObject *)__pyx_n_s__values), ((PyObject *)__pyx_n_s__mask), ((PyObject *)__pyx_n_s__limit), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__j), ((PyObject *)__pyx_n_s__N), ((PyObject *)__pyx_n_s__K), ((PyObject *)__pyx_n_s__val), ((PyObject *)__pyx_n_s__lim), ((PyObject *)__pyx_n_s__fill_count)); if (unlikely(!__pyx_k_tuple_387)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1628; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_387); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_387)); __pyx_k_codeobj_388 = (PyObject*)__Pyx_PyCode_New(3, 0, 10, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_387, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_314, __pyx_n_s_389, 1628, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_388)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1628; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":1662 * @cython.boundscheck(False) * @cython.wraparound(False) * def backfill_2d_inplace_object(ndarray[object, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[uint8_t, ndim=2] mask, * limit=None): */ __pyx_k_tuple_390 = PyTuple_Pack(10, ((PyObject *)__pyx_n_s__values), ((PyObject *)__pyx_n_s__mask), ((PyObject *)__pyx_n_s__limit), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__j), ((PyObject *)__pyx_n_s__N), ((PyObject *)__pyx_n_s__K), ((PyObject *)__pyx_n_s__val), ((PyObject *)__pyx_n_s__lim), ((PyObject *)__pyx_n_s__fill_count)); if (unlikely(!__pyx_k_tuple_390)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1662; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_390); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_390)); __pyx_k_codeobj_391 = (PyObject*)__Pyx_PyCode_New(3, 0, 10, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_390, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_314, __pyx_n_s_392, 1662, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_391)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1662; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":1696 * @cython.boundscheck(False) * @cython.wraparound(False) * def backfill_2d_inplace_int32(ndarray[int32_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[uint8_t, ndim=2] mask, * limit=None): */ __pyx_k_tuple_393 = PyTuple_Pack(10, ((PyObject *)__pyx_n_s__values), ((PyObject *)__pyx_n_s__mask), ((PyObject *)__pyx_n_s__limit), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__j), ((PyObject *)__pyx_n_s__N), ((PyObject *)__pyx_n_s__K), ((PyObject *)__pyx_n_s__val), ((PyObject *)__pyx_n_s__lim), ((PyObject *)__pyx_n_s__fill_count)); if (unlikely(!__pyx_k_tuple_393)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1696; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_393); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_393)); __pyx_k_codeobj_394 = (PyObject*)__Pyx_PyCode_New(3, 0, 10, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_393, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_314, __pyx_n_s_395, 1696, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_394)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1696; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":1730 * @cython.boundscheck(False) * @cython.wraparound(False) * def backfill_2d_inplace_int64(ndarray[int64_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[uint8_t, ndim=2] mask, * limit=None): */ __pyx_k_tuple_396 = PyTuple_Pack(10, ((PyObject *)__pyx_n_s__values), ((PyObject *)__pyx_n_s__mask), ((PyObject *)__pyx_n_s__limit), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__j), ((PyObject *)__pyx_n_s__N), ((PyObject *)__pyx_n_s__K), ((PyObject *)__pyx_n_s__val), ((PyObject *)__pyx_n_s__lim), ((PyObject *)__pyx_n_s__fill_count)); if (unlikely(!__pyx_k_tuple_396)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1730; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_396); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_396)); __pyx_k_codeobj_397 = (PyObject*)__Pyx_PyCode_New(3, 0, 10, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_396, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_314, __pyx_n_s_398, 1730, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_397)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1730; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":1764 * @cython.boundscheck(False) * @cython.wraparound(False) * def backfill_2d_inplace_bool(ndarray[uint8_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[uint8_t, ndim=2] mask, * limit=None): */ __pyx_k_tuple_399 = PyTuple_Pack(10, ((PyObject *)__pyx_n_s__values), ((PyObject *)__pyx_n_s__mask), ((PyObject *)__pyx_n_s__limit), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__j), ((PyObject *)__pyx_n_s__N), ((PyObject *)__pyx_n_s__K), ((PyObject *)__pyx_n_s__val), ((PyObject *)__pyx_n_s__lim), ((PyObject *)__pyx_n_s__fill_count)); if (unlikely(!__pyx_k_tuple_399)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1764; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_399); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_399)); __pyx_k_codeobj_400 = (PyObject*)__Pyx_PyCode_New(3, 0, 10, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_399, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_314, __pyx_n_s_401, 1764, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_400)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1764; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":1799 * @cython.boundscheck(False) * @cython.wraparound(False) * def is_monotonic_float64(ndarray[float64_t] arr): # <<<<<<<<<<<<<< * ''' * Returns */ __pyx_k_tuple_402 = PyTuple_Pack(6, ((PyObject *)__pyx_n_s__arr), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__n), ((PyObject *)__pyx_n_s__prev), ((PyObject *)__pyx_n_s__cur), ((PyObject *)__pyx_n_s__is_unique)); if (unlikely(!__pyx_k_tuple_402)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1799; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_402); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_402)); __pyx_k_codeobj_403 = (PyObject*)__Pyx_PyCode_New(1, 0, 6, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_402, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_314, __pyx_n_s_404, 1799, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_403)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1799; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":1826 * @cython.boundscheck(False) * @cython.wraparound(False) * def is_monotonic_float32(ndarray[float32_t] arr): # <<<<<<<<<<<<<< * ''' * Returns */ __pyx_k_tuple_405 = PyTuple_Pack(6, ((PyObject *)__pyx_n_s__arr), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__n), ((PyObject *)__pyx_n_s__prev), ((PyObject *)__pyx_n_s__cur), ((PyObject *)__pyx_n_s__is_unique)); if (unlikely(!__pyx_k_tuple_405)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1826; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_405); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_405)); __pyx_k_codeobj_406 = (PyObject*)__Pyx_PyCode_New(1, 0, 6, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_405, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_314, __pyx_n_s_407, 1826, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_406)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1826; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":1853 * @cython.boundscheck(False) * @cython.wraparound(False) * def is_monotonic_object(ndarray[object] arr): # <<<<<<<<<<<<<< * ''' * Returns */ __pyx_k_tuple_408 = PyTuple_Pack(6, ((PyObject *)__pyx_n_s__arr), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__n), ((PyObject *)__pyx_n_s__prev), ((PyObject *)__pyx_n_s__cur), ((PyObject *)__pyx_n_s__is_unique)); if (unlikely(!__pyx_k_tuple_408)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1853; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_408); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_408)); __pyx_k_codeobj_409 = (PyObject*)__Pyx_PyCode_New(1, 0, 6, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_408, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_314, __pyx_n_s__is_monotonic_object, 1853, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_409)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1853; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":1880 * @cython.boundscheck(False) * @cython.wraparound(False) * def is_monotonic_int32(ndarray[int32_t] arr): # <<<<<<<<<<<<<< * ''' * Returns */ __pyx_k_tuple_410 = PyTuple_Pack(6, ((PyObject *)__pyx_n_s__arr), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__n), ((PyObject *)__pyx_n_s__prev), ((PyObject *)__pyx_n_s__cur), ((PyObject *)__pyx_n_s__is_unique)); if (unlikely(!__pyx_k_tuple_410)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1880; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_410); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_410)); __pyx_k_codeobj_411 = (PyObject*)__Pyx_PyCode_New(1, 0, 6, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_410, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_314, __pyx_n_s__is_monotonic_int32, 1880, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_411)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1880; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":1907 * @cython.boundscheck(False) * @cython.wraparound(False) * def is_monotonic_int64(ndarray[int64_t] arr): # <<<<<<<<<<<<<< * ''' * Returns */ __pyx_k_tuple_412 = PyTuple_Pack(6, ((PyObject *)__pyx_n_s__arr), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__n), ((PyObject *)__pyx_n_s__prev), ((PyObject *)__pyx_n_s__cur), ((PyObject *)__pyx_n_s__is_unique)); if (unlikely(!__pyx_k_tuple_412)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1907; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_412); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_412)); __pyx_k_codeobj_413 = (PyObject*)__Pyx_PyCode_New(1, 0, 6, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_412, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_314, __pyx_n_s__is_monotonic_int64, 1907, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_413)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1907; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":1934 * @cython.boundscheck(False) * @cython.wraparound(False) * def is_monotonic_bool(ndarray[uint8_t] arr): # <<<<<<<<<<<<<< * ''' * Returns */ __pyx_k_tuple_414 = PyTuple_Pack(6, ((PyObject *)__pyx_n_s__arr), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__n), ((PyObject *)__pyx_n_s__prev), ((PyObject *)__pyx_n_s__cur), ((PyObject *)__pyx_n_s__is_unique)); if (unlikely(!__pyx_k_tuple_414)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1934; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_414); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_414)); __pyx_k_codeobj_415 = (PyObject*)__Pyx_PyCode_New(1, 0, 6, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_414, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_314, __pyx_n_s__is_monotonic_bool, 1934, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_415)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1934; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":1962 * @cython.wraparound(False) * @cython.boundscheck(False) * def groupby_float64(ndarray[float64_t] index, ndarray labels): # <<<<<<<<<<<<<< * cdef dict result = {} * cdef Py_ssize_t i, length */ __pyx_k_tuple_416 = PyTuple_Pack(8, ((PyObject *)__pyx_n_s__index), ((PyObject *)__pyx_n_s__labels), ((PyObject *)__pyx_n_s__result), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__length), ((PyObject *)__pyx_n_s__members), ((PyObject *)__pyx_n_s__idx), ((PyObject *)__pyx_n_s__key)); if (unlikely(!__pyx_k_tuple_416)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1962; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_416); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_416)); __pyx_k_codeobj_417 = (PyObject*)__Pyx_PyCode_New(2, 0, 8, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_416, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_314, __pyx_n_s__groupby_float64, 1962, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_417)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1962; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":1990 * @cython.wraparound(False) * @cython.boundscheck(False) * def groupby_float32(ndarray[float32_t] index, ndarray labels): # <<<<<<<<<<<<<< * cdef dict result = {} * cdef Py_ssize_t i, length */ __pyx_k_tuple_418 = PyTuple_Pack(8, ((PyObject *)__pyx_n_s__index), ((PyObject *)__pyx_n_s__labels), ((PyObject *)__pyx_n_s__result), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__length), ((PyObject *)__pyx_n_s__members), ((PyObject *)__pyx_n_s__idx), ((PyObject *)__pyx_n_s__key)); if (unlikely(!__pyx_k_tuple_418)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1990; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_418); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_418)); __pyx_k_codeobj_419 = (PyObject*)__Pyx_PyCode_New(2, 0, 8, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_418, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_314, __pyx_n_s__groupby_float32, 1990, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_419)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1990; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":2018 * @cython.wraparound(False) * @cython.boundscheck(False) * def groupby_object(ndarray[object] index, ndarray labels): # <<<<<<<<<<<<<< * cdef dict result = {} * cdef Py_ssize_t i, length */ __pyx_k_tuple_420 = PyTuple_Pack(8, ((PyObject *)__pyx_n_s__index), ((PyObject *)__pyx_n_s__labels), ((PyObject *)__pyx_n_s__result), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__length), ((PyObject *)__pyx_n_s__members), ((PyObject *)__pyx_n_s__idx), ((PyObject *)__pyx_n_s__key)); if (unlikely(!__pyx_k_tuple_420)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2018; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_420); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_420)); __pyx_k_codeobj_421 = (PyObject*)__Pyx_PyCode_New(2, 0, 8, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_420, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_314, __pyx_n_s__groupby_object, 2018, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_421)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2018; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":2046 * @cython.wraparound(False) * @cython.boundscheck(False) * def groupby_int32(ndarray[int32_t] index, ndarray labels): # <<<<<<<<<<<<<< * cdef dict result = {} * cdef Py_ssize_t i, length */ __pyx_k_tuple_422 = PyTuple_Pack(8, ((PyObject *)__pyx_n_s__index), ((PyObject *)__pyx_n_s__labels), ((PyObject *)__pyx_n_s__result), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__length), ((PyObject *)__pyx_n_s__members), ((PyObject *)__pyx_n_s__idx), ((PyObject *)__pyx_n_s__key)); if (unlikely(!__pyx_k_tuple_422)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2046; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_422); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_422)); __pyx_k_codeobj_423 = (PyObject*)__Pyx_PyCode_New(2, 0, 8, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_422, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_314, __pyx_n_s__groupby_int32, 2046, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_423)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2046; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":2074 * @cython.wraparound(False) * @cython.boundscheck(False) * def groupby_int64(ndarray[int64_t] index, ndarray labels): # <<<<<<<<<<<<<< * cdef dict result = {} * cdef Py_ssize_t i, length */ __pyx_k_tuple_424 = PyTuple_Pack(8, ((PyObject *)__pyx_n_s__index), ((PyObject *)__pyx_n_s__labels), ((PyObject *)__pyx_n_s__result), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__length), ((PyObject *)__pyx_n_s__members), ((PyObject *)__pyx_n_s__idx), ((PyObject *)__pyx_n_s__key)); if (unlikely(!__pyx_k_tuple_424)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2074; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_424); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_424)); __pyx_k_codeobj_425 = (PyObject*)__Pyx_PyCode_New(2, 0, 8, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_424, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_314, __pyx_n_s__groupby_int64, 2074, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_425)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2074; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":2102 * @cython.wraparound(False) * @cython.boundscheck(False) * def groupby_bool(ndarray[uint8_t] index, ndarray labels): # <<<<<<<<<<<<<< * cdef dict result = {} * cdef Py_ssize_t i, length */ __pyx_k_tuple_426 = PyTuple_Pack(8, ((PyObject *)__pyx_n_s__index), ((PyObject *)__pyx_n_s__labels), ((PyObject *)__pyx_n_s__result), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__length), ((PyObject *)__pyx_n_s__members), ((PyObject *)__pyx_n_s__idx), ((PyObject *)__pyx_n_s__key)); if (unlikely(!__pyx_k_tuple_426)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2102; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_426); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_426)); __pyx_k_codeobj_427 = (PyObject*)__Pyx_PyCode_New(2, 0, 8, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_426, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_314, __pyx_n_s__groupby_bool, 2102, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_427)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2102; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":2131 * @cython.wraparound(False) * @cython.boundscheck(False) * def arrmap_float64(ndarray[float64_t] index, object func): # <<<<<<<<<<<<<< * cdef Py_ssize_t length = index.shape[0] * cdef Py_ssize_t i = 0 */ __pyx_k_tuple_428 = PyTuple_Pack(6, ((PyObject *)__pyx_n_s__index), ((PyObject *)__pyx_n_s__func), ((PyObject *)__pyx_n_s__length), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__result), ((PyObject *)__pyx_n_s_107)); if (unlikely(!__pyx_k_tuple_428)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2131; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_428); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_428)); __pyx_k_codeobj_429 = (PyObject*)__Pyx_PyCode_New(2, 0, 6, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_428, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_314, __pyx_n_s__arrmap_float64, 2131, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_429)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2131; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":2146 * @cython.wraparound(False) * @cython.boundscheck(False) * def arrmap_float32(ndarray[float32_t] index, object func): # <<<<<<<<<<<<<< * cdef Py_ssize_t length = index.shape[0] * cdef Py_ssize_t i = 0 */ __pyx_k_tuple_430 = PyTuple_Pack(6, ((PyObject *)__pyx_n_s__index), ((PyObject *)__pyx_n_s__func), ((PyObject *)__pyx_n_s__length), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__result), ((PyObject *)__pyx_n_s_107)); if (unlikely(!__pyx_k_tuple_430)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2146; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_430); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_430)); __pyx_k_codeobj_431 = (PyObject*)__Pyx_PyCode_New(2, 0, 6, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_430, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_314, __pyx_n_s__arrmap_float32, 2146, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_431)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2146; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":2161 * @cython.wraparound(False) * @cython.boundscheck(False) * def arrmap_object(ndarray[object] index, object func): # <<<<<<<<<<<<<< * cdef Py_ssize_t length = index.shape[0] * cdef Py_ssize_t i = 0 */ __pyx_k_tuple_432 = PyTuple_Pack(6, ((PyObject *)__pyx_n_s__index), ((PyObject *)__pyx_n_s__func), ((PyObject *)__pyx_n_s__length), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__result), ((PyObject *)__pyx_n_s_107)); if (unlikely(!__pyx_k_tuple_432)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2161; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_432); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_432)); __pyx_k_codeobj_433 = (PyObject*)__Pyx_PyCode_New(2, 0, 6, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_432, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_314, __pyx_n_s__arrmap_object, 2161, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_433)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2161; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":2176 * @cython.wraparound(False) * @cython.boundscheck(False) * def arrmap_int32(ndarray[int32_t] index, object func): # <<<<<<<<<<<<<< * cdef Py_ssize_t length = index.shape[0] * cdef Py_ssize_t i = 0 */ __pyx_k_tuple_434 = PyTuple_Pack(6, ((PyObject *)__pyx_n_s__index), ((PyObject *)__pyx_n_s__func), ((PyObject *)__pyx_n_s__length), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__result), ((PyObject *)__pyx_n_s_107)); if (unlikely(!__pyx_k_tuple_434)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2176; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_434); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_434)); __pyx_k_codeobj_435 = (PyObject*)__Pyx_PyCode_New(2, 0, 6, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_434, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_314, __pyx_n_s__arrmap_int32, 2176, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_435)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2176; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":2191 * @cython.wraparound(False) * @cython.boundscheck(False) * def arrmap_int64(ndarray[int64_t] index, object func): # <<<<<<<<<<<<<< * cdef Py_ssize_t length = index.shape[0] * cdef Py_ssize_t i = 0 */ __pyx_k_tuple_436 = PyTuple_Pack(6, ((PyObject *)__pyx_n_s__index), ((PyObject *)__pyx_n_s__func), ((PyObject *)__pyx_n_s__length), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__result), ((PyObject *)__pyx_n_s_107)); if (unlikely(!__pyx_k_tuple_436)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2191; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_436); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_436)); __pyx_k_codeobj_437 = (PyObject*)__Pyx_PyCode_New(2, 0, 6, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_436, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_314, __pyx_n_s__arrmap_int64, 2191, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_437)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2191; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":2206 * @cython.wraparound(False) * @cython.boundscheck(False) * def arrmap_bool(ndarray[uint8_t] index, object func): # <<<<<<<<<<<<<< * cdef Py_ssize_t length = index.shape[0] * cdef Py_ssize_t i = 0 */ __pyx_k_tuple_438 = PyTuple_Pack(6, ((PyObject *)__pyx_n_s__index), ((PyObject *)__pyx_n_s__func), ((PyObject *)__pyx_n_s__length), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__result), ((PyObject *)__pyx_n_s_107)); if (unlikely(!__pyx_k_tuple_438)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2206; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_438); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_438)); __pyx_k_codeobj_439 = (PyObject*)__Pyx_PyCode_New(2, 0, 6, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_438, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_314, __pyx_n_s__arrmap_bool, 2206, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_439)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2206; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":2221 * * @cython.wraparound(False) * def take_1d_bool_bool(ndarray[uint8_t] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[uint8_t] out, */ __pyx_k_tuple_440 = PyTuple_Pack(8, ((PyObject *)__pyx_n_s__values), ((PyObject *)__pyx_n_s__indexer), ((PyObject *)__pyx_n_s__out), ((PyObject *)__pyx_n_s__fill_value), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__n), ((PyObject *)__pyx_n_s__idx), ((PyObject *)__pyx_n_s__fv)); if (unlikely(!__pyx_k_tuple_440)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2221; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_440); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_440)); __pyx_k_codeobj_441 = (PyObject*)__Pyx_PyCode_New(4, 0, 8, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_440, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_314, __pyx_n_s__take_1d_bool_bool, 2221, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_441)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2221; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":2240 * * @cython.wraparound(False) * def take_1d_bool_object(ndarray[uint8_t] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[object] out, */ __pyx_k_tuple_442 = PyTuple_Pack(8, ((PyObject *)__pyx_n_s__values), ((PyObject *)__pyx_n_s__indexer), ((PyObject *)__pyx_n_s__out), ((PyObject *)__pyx_n_s__fill_value), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__n), ((PyObject *)__pyx_n_s__idx), ((PyObject *)__pyx_n_s__fv)); if (unlikely(!__pyx_k_tuple_442)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2240; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_442); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_442)); __pyx_k_codeobj_443 = (PyObject*)__Pyx_PyCode_New(4, 0, 8, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_442, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_314, __pyx_n_s__take_1d_bool_object, 2240, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_443)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2240; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":2259 * * @cython.wraparound(False) * def take_1d_int8_int8(ndarray[int8_t] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[int8_t] out, */ __pyx_k_tuple_444 = PyTuple_Pack(8, ((PyObject *)__pyx_n_s__values), ((PyObject *)__pyx_n_s__indexer), ((PyObject *)__pyx_n_s__out), ((PyObject *)__pyx_n_s__fill_value), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__n), ((PyObject *)__pyx_n_s__idx), ((PyObject *)__pyx_n_s__fv)); if (unlikely(!__pyx_k_tuple_444)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2259; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_444); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_444)); __pyx_k_codeobj_445 = (PyObject*)__Pyx_PyCode_New(4, 0, 8, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_444, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_314, __pyx_n_s__take_1d_int8_int8, 2259, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_445)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2259; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":2278 * * @cython.wraparound(False) * def take_1d_int8_int32(ndarray[int8_t] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[int32_t] out, */ __pyx_k_tuple_446 = PyTuple_Pack(8, ((PyObject *)__pyx_n_s__values), ((PyObject *)__pyx_n_s__indexer), ((PyObject *)__pyx_n_s__out), ((PyObject *)__pyx_n_s__fill_value), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__n), ((PyObject *)__pyx_n_s__idx), ((PyObject *)__pyx_n_s__fv)); if (unlikely(!__pyx_k_tuple_446)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2278; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_446); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_446)); __pyx_k_codeobj_447 = (PyObject*)__Pyx_PyCode_New(4, 0, 8, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_446, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_314, __pyx_n_s__take_1d_int8_int32, 2278, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_447)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2278; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":2297 * * @cython.wraparound(False) * def take_1d_int8_int64(ndarray[int8_t] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[int64_t] out, */ __pyx_k_tuple_448 = PyTuple_Pack(8, ((PyObject *)__pyx_n_s__values), ((PyObject *)__pyx_n_s__indexer), ((PyObject *)__pyx_n_s__out), ((PyObject *)__pyx_n_s__fill_value), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__n), ((PyObject *)__pyx_n_s__idx), ((PyObject *)__pyx_n_s__fv)); if (unlikely(!__pyx_k_tuple_448)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2297; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_448); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_448)); __pyx_k_codeobj_449 = (PyObject*)__Pyx_PyCode_New(4, 0, 8, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_448, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_314, __pyx_n_s__take_1d_int8_int64, 2297, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_449)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2297; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":2316 * * @cython.wraparound(False) * def take_1d_int8_float64(ndarray[int8_t] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[float64_t] out, */ __pyx_k_tuple_450 = PyTuple_Pack(8, ((PyObject *)__pyx_n_s__values), ((PyObject *)__pyx_n_s__indexer), ((PyObject *)__pyx_n_s__out), ((PyObject *)__pyx_n_s__fill_value), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__n), ((PyObject *)__pyx_n_s__idx), ((PyObject *)__pyx_n_s__fv)); if (unlikely(!__pyx_k_tuple_450)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2316; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_450); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_450)); __pyx_k_codeobj_451 = (PyObject*)__Pyx_PyCode_New(4, 0, 8, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_450, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_314, __pyx_n_s_452, 2316, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_451)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2316; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":2335 * * @cython.wraparound(False) * def take_1d_int16_int16(ndarray[int16_t] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[int16_t] out, */ __pyx_k_tuple_453 = PyTuple_Pack(8, ((PyObject *)__pyx_n_s__values), ((PyObject *)__pyx_n_s__indexer), ((PyObject *)__pyx_n_s__out), ((PyObject *)__pyx_n_s__fill_value), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__n), ((PyObject *)__pyx_n_s__idx), ((PyObject *)__pyx_n_s__fv)); if (unlikely(!__pyx_k_tuple_453)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2335; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_453); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_453)); __pyx_k_codeobj_454 = (PyObject*)__Pyx_PyCode_New(4, 0, 8, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_453, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_314, __pyx_n_s__take_1d_int16_int16, 2335, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_454)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2335; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":2354 * * @cython.wraparound(False) * def take_1d_int16_int32(ndarray[int16_t] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[int32_t] out, */ __pyx_k_tuple_455 = PyTuple_Pack(8, ((PyObject *)__pyx_n_s__values), ((PyObject *)__pyx_n_s__indexer), ((PyObject *)__pyx_n_s__out), ((PyObject *)__pyx_n_s__fill_value), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__n), ((PyObject *)__pyx_n_s__idx), ((PyObject *)__pyx_n_s__fv)); if (unlikely(!__pyx_k_tuple_455)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2354; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_455); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_455)); __pyx_k_codeobj_456 = (PyObject*)__Pyx_PyCode_New(4, 0, 8, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_455, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_314, __pyx_n_s__take_1d_int16_int32, 2354, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_456)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2354; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":2373 * * @cython.wraparound(False) * def take_1d_int16_int64(ndarray[int16_t] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[int64_t] out, */ __pyx_k_tuple_457 = PyTuple_Pack(8, ((PyObject *)__pyx_n_s__values), ((PyObject *)__pyx_n_s__indexer), ((PyObject *)__pyx_n_s__out), ((PyObject *)__pyx_n_s__fill_value), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__n), ((PyObject *)__pyx_n_s__idx), ((PyObject *)__pyx_n_s__fv)); if (unlikely(!__pyx_k_tuple_457)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2373; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_457); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_457)); __pyx_k_codeobj_458 = (PyObject*)__Pyx_PyCode_New(4, 0, 8, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_457, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_314, __pyx_n_s__take_1d_int16_int64, 2373, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_458)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2373; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":2392 * * @cython.wraparound(False) * def take_1d_int16_float64(ndarray[int16_t] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[float64_t] out, */ __pyx_k_tuple_459 = PyTuple_Pack(8, ((PyObject *)__pyx_n_s__values), ((PyObject *)__pyx_n_s__indexer), ((PyObject *)__pyx_n_s__out), ((PyObject *)__pyx_n_s__fill_value), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__n), ((PyObject *)__pyx_n_s__idx), ((PyObject *)__pyx_n_s__fv)); if (unlikely(!__pyx_k_tuple_459)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2392; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_459); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_459)); __pyx_k_codeobj_460 = (PyObject*)__Pyx_PyCode_New(4, 0, 8, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_459, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_314, __pyx_n_s_461, 2392, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_460)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2392; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":2411 * * @cython.wraparound(False) * def take_1d_int32_int32(ndarray[int32_t] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[int32_t] out, */ __pyx_k_tuple_462 = PyTuple_Pack(8, ((PyObject *)__pyx_n_s__values), ((PyObject *)__pyx_n_s__indexer), ((PyObject *)__pyx_n_s__out), ((PyObject *)__pyx_n_s__fill_value), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__n), ((PyObject *)__pyx_n_s__idx), ((PyObject *)__pyx_n_s__fv)); if (unlikely(!__pyx_k_tuple_462)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2411; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_462); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_462)); __pyx_k_codeobj_463 = (PyObject*)__Pyx_PyCode_New(4, 0, 8, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_462, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_314, __pyx_n_s__take_1d_int32_int32, 2411, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_463)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2411; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":2430 * * @cython.wraparound(False) * def take_1d_int32_int64(ndarray[int32_t] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[int64_t] out, */ __pyx_k_tuple_464 = PyTuple_Pack(8, ((PyObject *)__pyx_n_s__values), ((PyObject *)__pyx_n_s__indexer), ((PyObject *)__pyx_n_s__out), ((PyObject *)__pyx_n_s__fill_value), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__n), ((PyObject *)__pyx_n_s__idx), ((PyObject *)__pyx_n_s__fv)); if (unlikely(!__pyx_k_tuple_464)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2430; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_464); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_464)); __pyx_k_codeobj_465 = (PyObject*)__Pyx_PyCode_New(4, 0, 8, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_464, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_314, __pyx_n_s__take_1d_int32_int64, 2430, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_465)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2430; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":2449 * * @cython.wraparound(False) * def take_1d_int32_float64(ndarray[int32_t] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[float64_t] out, */ __pyx_k_tuple_466 = PyTuple_Pack(8, ((PyObject *)__pyx_n_s__values), ((PyObject *)__pyx_n_s__indexer), ((PyObject *)__pyx_n_s__out), ((PyObject *)__pyx_n_s__fill_value), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__n), ((PyObject *)__pyx_n_s__idx), ((PyObject *)__pyx_n_s__fv)); if (unlikely(!__pyx_k_tuple_466)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2449; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_466); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_466)); __pyx_k_codeobj_467 = (PyObject*)__Pyx_PyCode_New(4, 0, 8, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_466, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_314, __pyx_n_s_468, 2449, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_467)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2449; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":2468 * * @cython.wraparound(False) * def take_1d_int64_int64(ndarray[int64_t] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[int64_t] out, */ __pyx_k_tuple_469 = PyTuple_Pack(8, ((PyObject *)__pyx_n_s__values), ((PyObject *)__pyx_n_s__indexer), ((PyObject *)__pyx_n_s__out), ((PyObject *)__pyx_n_s__fill_value), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__n), ((PyObject *)__pyx_n_s__idx), ((PyObject *)__pyx_n_s__fv)); if (unlikely(!__pyx_k_tuple_469)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2468; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_469); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_469)); __pyx_k_codeobj_470 = (PyObject*)__Pyx_PyCode_New(4, 0, 8, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_469, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_314, __pyx_n_s__take_1d_int64_int64, 2468, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_470)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2468; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":2487 * * @cython.wraparound(False) * def take_1d_int64_float64(ndarray[int64_t] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[float64_t] out, */ __pyx_k_tuple_471 = PyTuple_Pack(8, ((PyObject *)__pyx_n_s__values), ((PyObject *)__pyx_n_s__indexer), ((PyObject *)__pyx_n_s__out), ((PyObject *)__pyx_n_s__fill_value), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__n), ((PyObject *)__pyx_n_s__idx), ((PyObject *)__pyx_n_s__fv)); if (unlikely(!__pyx_k_tuple_471)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2487; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_471); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_471)); __pyx_k_codeobj_472 = (PyObject*)__Pyx_PyCode_New(4, 0, 8, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_471, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_314, __pyx_n_s_473, 2487, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_472)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2487; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":2506 * * @cython.wraparound(False) * def take_1d_float32_float32(ndarray[float32_t] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[float32_t] out, */ __pyx_k_tuple_474 = PyTuple_Pack(8, ((PyObject *)__pyx_n_s__values), ((PyObject *)__pyx_n_s__indexer), ((PyObject *)__pyx_n_s__out), ((PyObject *)__pyx_n_s__fill_value), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__n), ((PyObject *)__pyx_n_s__idx), ((PyObject *)__pyx_n_s__fv)); if (unlikely(!__pyx_k_tuple_474)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2506; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_474); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_474)); __pyx_k_codeobj_475 = (PyObject*)__Pyx_PyCode_New(4, 0, 8, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_474, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_314, __pyx_n_s_476, 2506, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_475)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2506; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":2525 * * @cython.wraparound(False) * def take_1d_float32_float64(ndarray[float32_t] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[float64_t] out, */ __pyx_k_tuple_477 = PyTuple_Pack(8, ((PyObject *)__pyx_n_s__values), ((PyObject *)__pyx_n_s__indexer), ((PyObject *)__pyx_n_s__out), ((PyObject *)__pyx_n_s__fill_value), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__n), ((PyObject *)__pyx_n_s__idx), ((PyObject *)__pyx_n_s__fv)); if (unlikely(!__pyx_k_tuple_477)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2525; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_477); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_477)); __pyx_k_codeobj_478 = (PyObject*)__Pyx_PyCode_New(4, 0, 8, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_477, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_314, __pyx_n_s_479, 2525, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_478)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2525; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":2544 * * @cython.wraparound(False) * def take_1d_float64_float64(ndarray[float64_t] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[float64_t] out, */ __pyx_k_tuple_480 = PyTuple_Pack(8, ((PyObject *)__pyx_n_s__values), ((PyObject *)__pyx_n_s__indexer), ((PyObject *)__pyx_n_s__out), ((PyObject *)__pyx_n_s__fill_value), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__n), ((PyObject *)__pyx_n_s__idx), ((PyObject *)__pyx_n_s__fv)); if (unlikely(!__pyx_k_tuple_480)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2544; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_480); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_480)); __pyx_k_codeobj_481 = (PyObject*)__Pyx_PyCode_New(4, 0, 8, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_480, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_314, __pyx_n_s_482, 2544, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_481)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2544; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":2563 * * @cython.wraparound(False) * def take_1d_object_object(ndarray[object] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[object] out, */ __pyx_k_tuple_483 = PyTuple_Pack(8, ((PyObject *)__pyx_n_s__values), ((PyObject *)__pyx_n_s__indexer), ((PyObject *)__pyx_n_s__out), ((PyObject *)__pyx_n_s__fill_value), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__n), ((PyObject *)__pyx_n_s__idx), ((PyObject *)__pyx_n_s__fv)); if (unlikely(!__pyx_k_tuple_483)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2563; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_483); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_483)); __pyx_k_codeobj_484 = (PyObject*)__Pyx_PyCode_New(4, 0, 8, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_483, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_314, __pyx_n_s_485, 2563, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_484)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2563; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":2584 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_axis0_bool_bool(ndarray[uint8_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[uint8_t, ndim=2] out, */ __pyx_k_tuple_486 = PyTuple_Pack(12, ((PyObject *)__pyx_n_s__values), ((PyObject *)__pyx_n_s__indexer), ((PyObject *)__pyx_n_s__out), ((PyObject *)__pyx_n_s__fill_value), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__j), ((PyObject *)__pyx_n_s__k), ((PyObject *)__pyx_n_s__n), ((PyObject *)__pyx_n_s__idx), ((PyObject *)__pyx_n_s__fv), ((PyObject *)__pyx_n_s__v), ((PyObject *)__pyx_n_s__o)); if (unlikely(!__pyx_k_tuple_486)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2584; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_486); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_486)); __pyx_k_codeobj_487 = (PyObject*)__Pyx_PyCode_New(4, 0, 12, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_486, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_314, __pyx_n_s_488, 2584, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_487)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2584; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":2627 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_axis0_bool_object(ndarray[uint8_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[object, ndim=2] out, */ __pyx_k_tuple_489 = PyTuple_Pack(10, ((PyObject *)__pyx_n_s__values), ((PyObject *)__pyx_n_s__indexer), ((PyObject *)__pyx_n_s__out), ((PyObject *)__pyx_n_s__fill_value), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__j), ((PyObject *)__pyx_n_s__k), ((PyObject *)__pyx_n_s__n), ((PyObject *)__pyx_n_s__idx), ((PyObject *)__pyx_n_s__fv)); if (unlikely(!__pyx_k_tuple_489)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2627; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_489); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_489)); __pyx_k_codeobj_490 = (PyObject*)__Pyx_PyCode_New(4, 0, 10, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_489, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_314, __pyx_n_s_491, 2627, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_490)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2627; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":2670 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_axis0_int8_int8(ndarray[int8_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[int8_t, ndim=2] out, */ __pyx_k_tuple_492 = PyTuple_Pack(12, ((PyObject *)__pyx_n_s__values), ((PyObject *)__pyx_n_s__indexer), ((PyObject *)__pyx_n_s__out), ((PyObject *)__pyx_n_s__fill_value), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__j), ((PyObject *)__pyx_n_s__k), ((PyObject *)__pyx_n_s__n), ((PyObject *)__pyx_n_s__idx), ((PyObject *)__pyx_n_s__fv), ((PyObject *)__pyx_n_s__v), ((PyObject *)__pyx_n_s__o)); if (unlikely(!__pyx_k_tuple_492)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2670; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_492); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_492)); __pyx_k_codeobj_493 = (PyObject*)__Pyx_PyCode_New(4, 0, 12, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_492, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_314, __pyx_n_s_494, 2670, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_493)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2670; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":2713 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_axis0_int8_int32(ndarray[int8_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[int32_t, ndim=2] out, */ __pyx_k_tuple_495 = PyTuple_Pack(10, ((PyObject *)__pyx_n_s__values), ((PyObject *)__pyx_n_s__indexer), ((PyObject *)__pyx_n_s__out), ((PyObject *)__pyx_n_s__fill_value), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__j), ((PyObject *)__pyx_n_s__k), ((PyObject *)__pyx_n_s__n), ((PyObject *)__pyx_n_s__idx), ((PyObject *)__pyx_n_s__fv)); if (unlikely(!__pyx_k_tuple_495)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2713; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_495); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_495)); __pyx_k_codeobj_496 = (PyObject*)__Pyx_PyCode_New(4, 0, 10, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_495, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_314, __pyx_n_s_497, 2713, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_496)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2713; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":2756 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_axis0_int8_int64(ndarray[int8_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[int64_t, ndim=2] out, */ __pyx_k_tuple_498 = PyTuple_Pack(10, ((PyObject *)__pyx_n_s__values), ((PyObject *)__pyx_n_s__indexer), ((PyObject *)__pyx_n_s__out), ((PyObject *)__pyx_n_s__fill_value), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__j), ((PyObject *)__pyx_n_s__k), ((PyObject *)__pyx_n_s__n), ((PyObject *)__pyx_n_s__idx), ((PyObject *)__pyx_n_s__fv)); if (unlikely(!__pyx_k_tuple_498)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2756; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_498); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_498)); __pyx_k_codeobj_499 = (PyObject*)__Pyx_PyCode_New(4, 0, 10, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_498, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_314, __pyx_n_s_500, 2756, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_499)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2756; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":2799 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_axis0_int8_float64(ndarray[int8_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[float64_t, ndim=2] out, */ __pyx_k_tuple_501 = PyTuple_Pack(10, ((PyObject *)__pyx_n_s__values), ((PyObject *)__pyx_n_s__indexer), ((PyObject *)__pyx_n_s__out), ((PyObject *)__pyx_n_s__fill_value), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__j), ((PyObject *)__pyx_n_s__k), ((PyObject *)__pyx_n_s__n), ((PyObject *)__pyx_n_s__idx), ((PyObject *)__pyx_n_s__fv)); if (unlikely(!__pyx_k_tuple_501)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2799; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_501); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_501)); __pyx_k_codeobj_502 = (PyObject*)__Pyx_PyCode_New(4, 0, 10, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_501, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_314, __pyx_n_s_503, 2799, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_502)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2799; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":2842 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_axis0_int16_int16(ndarray[int16_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[int16_t, ndim=2] out, */ __pyx_k_tuple_504 = PyTuple_Pack(12, ((PyObject *)__pyx_n_s__values), ((PyObject *)__pyx_n_s__indexer), ((PyObject *)__pyx_n_s__out), ((PyObject *)__pyx_n_s__fill_value), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__j), ((PyObject *)__pyx_n_s__k), ((PyObject *)__pyx_n_s__n), ((PyObject *)__pyx_n_s__idx), ((PyObject *)__pyx_n_s__fv), ((PyObject *)__pyx_n_s__v), ((PyObject *)__pyx_n_s__o)); if (unlikely(!__pyx_k_tuple_504)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2842; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_504); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_504)); __pyx_k_codeobj_505 = (PyObject*)__Pyx_PyCode_New(4, 0, 12, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_504, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_314, __pyx_n_s_506, 2842, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_505)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2842; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":2885 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_axis0_int16_int32(ndarray[int16_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[int32_t, ndim=2] out, */ __pyx_k_tuple_507 = PyTuple_Pack(10, ((PyObject *)__pyx_n_s__values), ((PyObject *)__pyx_n_s__indexer), ((PyObject *)__pyx_n_s__out), ((PyObject *)__pyx_n_s__fill_value), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__j), ((PyObject *)__pyx_n_s__k), ((PyObject *)__pyx_n_s__n), ((PyObject *)__pyx_n_s__idx), ((PyObject *)__pyx_n_s__fv)); if (unlikely(!__pyx_k_tuple_507)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2885; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_507); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_507)); __pyx_k_codeobj_508 = (PyObject*)__Pyx_PyCode_New(4, 0, 10, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_507, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_314, __pyx_n_s_509, 2885, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_508)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2885; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":2928 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_axis0_int16_int64(ndarray[int16_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[int64_t, ndim=2] out, */ __pyx_k_tuple_510 = PyTuple_Pack(10, ((PyObject *)__pyx_n_s__values), ((PyObject *)__pyx_n_s__indexer), ((PyObject *)__pyx_n_s__out), ((PyObject *)__pyx_n_s__fill_value), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__j), ((PyObject *)__pyx_n_s__k), ((PyObject *)__pyx_n_s__n), ((PyObject *)__pyx_n_s__idx), ((PyObject *)__pyx_n_s__fv)); if (unlikely(!__pyx_k_tuple_510)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2928; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_510); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_510)); __pyx_k_codeobj_511 = (PyObject*)__Pyx_PyCode_New(4, 0, 10, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_510, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_314, __pyx_n_s_512, 2928, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_511)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2928; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":2971 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_axis0_int16_float64(ndarray[int16_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[float64_t, ndim=2] out, */ __pyx_k_tuple_513 = PyTuple_Pack(10, ((PyObject *)__pyx_n_s__values), ((PyObject *)__pyx_n_s__indexer), ((PyObject *)__pyx_n_s__out), ((PyObject *)__pyx_n_s__fill_value), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__j), ((PyObject *)__pyx_n_s__k), ((PyObject *)__pyx_n_s__n), ((PyObject *)__pyx_n_s__idx), ((PyObject *)__pyx_n_s__fv)); if (unlikely(!__pyx_k_tuple_513)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2971; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_513); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_513)); __pyx_k_codeobj_514 = (PyObject*)__Pyx_PyCode_New(4, 0, 10, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_513, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_314, __pyx_n_s_515, 2971, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_514)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2971; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":3014 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_axis0_int32_int32(ndarray[int32_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[int32_t, ndim=2] out, */ __pyx_k_tuple_516 = PyTuple_Pack(12, ((PyObject *)__pyx_n_s__values), ((PyObject *)__pyx_n_s__indexer), ((PyObject *)__pyx_n_s__out), ((PyObject *)__pyx_n_s__fill_value), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__j), ((PyObject *)__pyx_n_s__k), ((PyObject *)__pyx_n_s__n), ((PyObject *)__pyx_n_s__idx), ((PyObject *)__pyx_n_s__fv), ((PyObject *)__pyx_n_s__v), ((PyObject *)__pyx_n_s__o)); if (unlikely(!__pyx_k_tuple_516)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3014; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_516); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_516)); __pyx_k_codeobj_517 = (PyObject*)__Pyx_PyCode_New(4, 0, 12, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_516, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_314, __pyx_n_s_518, 3014, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_517)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3014; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":3057 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_axis0_int32_int64(ndarray[int32_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[int64_t, ndim=2] out, */ __pyx_k_tuple_519 = PyTuple_Pack(10, ((PyObject *)__pyx_n_s__values), ((PyObject *)__pyx_n_s__indexer), ((PyObject *)__pyx_n_s__out), ((PyObject *)__pyx_n_s__fill_value), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__j), ((PyObject *)__pyx_n_s__k), ((PyObject *)__pyx_n_s__n), ((PyObject *)__pyx_n_s__idx), ((PyObject *)__pyx_n_s__fv)); if (unlikely(!__pyx_k_tuple_519)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3057; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_519); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_519)); __pyx_k_codeobj_520 = (PyObject*)__Pyx_PyCode_New(4, 0, 10, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_519, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_314, __pyx_n_s_521, 3057, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_520)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3057; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":3100 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_axis0_int32_float64(ndarray[int32_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[float64_t, ndim=2] out, */ __pyx_k_tuple_522 = PyTuple_Pack(10, ((PyObject *)__pyx_n_s__values), ((PyObject *)__pyx_n_s__indexer), ((PyObject *)__pyx_n_s__out), ((PyObject *)__pyx_n_s__fill_value), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__j), ((PyObject *)__pyx_n_s__k), ((PyObject *)__pyx_n_s__n), ((PyObject *)__pyx_n_s__idx), ((PyObject *)__pyx_n_s__fv)); if (unlikely(!__pyx_k_tuple_522)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3100; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_522); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_522)); __pyx_k_codeobj_523 = (PyObject*)__Pyx_PyCode_New(4, 0, 10, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_522, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_314, __pyx_n_s_524, 3100, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_523)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3100; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":3143 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_axis0_int64_int64(ndarray[int64_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[int64_t, ndim=2] out, */ __pyx_k_tuple_525 = PyTuple_Pack(12, ((PyObject *)__pyx_n_s__values), ((PyObject *)__pyx_n_s__indexer), ((PyObject *)__pyx_n_s__out), ((PyObject *)__pyx_n_s__fill_value), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__j), ((PyObject *)__pyx_n_s__k), ((PyObject *)__pyx_n_s__n), ((PyObject *)__pyx_n_s__idx), ((PyObject *)__pyx_n_s__fv), ((PyObject *)__pyx_n_s__v), ((PyObject *)__pyx_n_s__o)); if (unlikely(!__pyx_k_tuple_525)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3143; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_525); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_525)); __pyx_k_codeobj_526 = (PyObject*)__Pyx_PyCode_New(4, 0, 12, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_525, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_314, __pyx_n_s_527, 3143, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_526)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3143; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":3186 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_axis0_int64_float64(ndarray[int64_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[float64_t, ndim=2] out, */ __pyx_k_tuple_528 = PyTuple_Pack(10, ((PyObject *)__pyx_n_s__values), ((PyObject *)__pyx_n_s__indexer), ((PyObject *)__pyx_n_s__out), ((PyObject *)__pyx_n_s__fill_value), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__j), ((PyObject *)__pyx_n_s__k), ((PyObject *)__pyx_n_s__n), ((PyObject *)__pyx_n_s__idx), ((PyObject *)__pyx_n_s__fv)); if (unlikely(!__pyx_k_tuple_528)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3186; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_528); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_528)); __pyx_k_codeobj_529 = (PyObject*)__Pyx_PyCode_New(4, 0, 10, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_528, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_314, __pyx_n_s_530, 3186, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_529)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3186; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":3229 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_axis0_float32_float32(ndarray[float32_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[float32_t, ndim=2] out, */ __pyx_k_tuple_531 = PyTuple_Pack(12, ((PyObject *)__pyx_n_s__values), ((PyObject *)__pyx_n_s__indexer), ((PyObject *)__pyx_n_s__out), ((PyObject *)__pyx_n_s__fill_value), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__j), ((PyObject *)__pyx_n_s__k), ((PyObject *)__pyx_n_s__n), ((PyObject *)__pyx_n_s__idx), ((PyObject *)__pyx_n_s__fv), ((PyObject *)__pyx_n_s__v), ((PyObject *)__pyx_n_s__o)); if (unlikely(!__pyx_k_tuple_531)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3229; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_531); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_531)); __pyx_k_codeobj_532 = (PyObject*)__Pyx_PyCode_New(4, 0, 12, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_531, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_314, __pyx_n_s_533, 3229, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_532)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3229; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":3272 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_axis0_float32_float64(ndarray[float32_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[float64_t, ndim=2] out, */ __pyx_k_tuple_534 = PyTuple_Pack(10, ((PyObject *)__pyx_n_s__values), ((PyObject *)__pyx_n_s__indexer), ((PyObject *)__pyx_n_s__out), ((PyObject *)__pyx_n_s__fill_value), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__j), ((PyObject *)__pyx_n_s__k), ((PyObject *)__pyx_n_s__n), ((PyObject *)__pyx_n_s__idx), ((PyObject *)__pyx_n_s__fv)); if (unlikely(!__pyx_k_tuple_534)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3272; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_534); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_534)); __pyx_k_codeobj_535 = (PyObject*)__Pyx_PyCode_New(4, 0, 10, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_534, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_314, __pyx_n_s_536, 3272, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_535)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3272; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":3315 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_axis0_float64_float64(ndarray[float64_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[float64_t, ndim=2] out, */ __pyx_k_tuple_537 = PyTuple_Pack(12, ((PyObject *)__pyx_n_s__values), ((PyObject *)__pyx_n_s__indexer), ((PyObject *)__pyx_n_s__out), ((PyObject *)__pyx_n_s__fill_value), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__j), ((PyObject *)__pyx_n_s__k), ((PyObject *)__pyx_n_s__n), ((PyObject *)__pyx_n_s__idx), ((PyObject *)__pyx_n_s__fv), ((PyObject *)__pyx_n_s__v), ((PyObject *)__pyx_n_s__o)); if (unlikely(!__pyx_k_tuple_537)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3315; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_537); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_537)); __pyx_k_codeobj_538 = (PyObject*)__Pyx_PyCode_New(4, 0, 12, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_537, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_314, __pyx_n_s_539, 3315, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_538)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3315; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":3358 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_axis0_object_object(ndarray[object, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[object, ndim=2] out, */ __pyx_k_tuple_540 = PyTuple_Pack(10, ((PyObject *)__pyx_n_s__values), ((PyObject *)__pyx_n_s__indexer), ((PyObject *)__pyx_n_s__out), ((PyObject *)__pyx_n_s__fill_value), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__j), ((PyObject *)__pyx_n_s__k), ((PyObject *)__pyx_n_s__n), ((PyObject *)__pyx_n_s__idx), ((PyObject *)__pyx_n_s__fv)); if (unlikely(!__pyx_k_tuple_540)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3358; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_540); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_540)); __pyx_k_codeobj_541 = (PyObject*)__Pyx_PyCode_New(4, 0, 10, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_540, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_314, __pyx_n_s_542, 3358, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_541)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3358; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":3402 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_axis1_bool_bool(ndarray[uint8_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[uint8_t, ndim=2] out, */ __pyx_k_tuple_543 = PyTuple_Pack(12, ((PyObject *)__pyx_n_s__values), ((PyObject *)__pyx_n_s__indexer), ((PyObject *)__pyx_n_s__out), ((PyObject *)__pyx_n_s__fill_value), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__j), ((PyObject *)__pyx_n_s__k), ((PyObject *)__pyx_n_s__n), ((PyObject *)__pyx_n_s__idx), ((PyObject *)__pyx_n_s__fv), ((PyObject *)__pyx_n_s__v), ((PyObject *)__pyx_n_s__o)); if (unlikely(!__pyx_k_tuple_543)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3402; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_543); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_543)); __pyx_k_codeobj_544 = (PyObject*)__Pyx_PyCode_New(4, 0, 12, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_543, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_314, __pyx_n_s_545, 3402, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_544)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3402; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":3448 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_axis1_bool_object(ndarray[uint8_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[object, ndim=2] out, */ __pyx_k_tuple_546 = PyTuple_Pack(10, ((PyObject *)__pyx_n_s__values), ((PyObject *)__pyx_n_s__indexer), ((PyObject *)__pyx_n_s__out), ((PyObject *)__pyx_n_s__fill_value), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__j), ((PyObject *)__pyx_n_s__k), ((PyObject *)__pyx_n_s__n), ((PyObject *)__pyx_n_s__idx), ((PyObject *)__pyx_n_s__fv)); if (unlikely(!__pyx_k_tuple_546)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3448; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_546); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_546)); __pyx_k_codeobj_547 = (PyObject*)__Pyx_PyCode_New(4, 0, 10, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_546, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_314, __pyx_n_s_548, 3448, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_547)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3448; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":3494 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_axis1_int8_int8(ndarray[int8_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[int8_t, ndim=2] out, */ __pyx_k_tuple_549 = PyTuple_Pack(12, ((PyObject *)__pyx_n_s__values), ((PyObject *)__pyx_n_s__indexer), ((PyObject *)__pyx_n_s__out), ((PyObject *)__pyx_n_s__fill_value), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__j), ((PyObject *)__pyx_n_s__k), ((PyObject *)__pyx_n_s__n), ((PyObject *)__pyx_n_s__idx), ((PyObject *)__pyx_n_s__fv), ((PyObject *)__pyx_n_s__v), ((PyObject *)__pyx_n_s__o)); if (unlikely(!__pyx_k_tuple_549)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3494; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_549); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_549)); __pyx_k_codeobj_550 = (PyObject*)__Pyx_PyCode_New(4, 0, 12, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_549, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_314, __pyx_n_s_551, 3494, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_550)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3494; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":3540 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_axis1_int8_int32(ndarray[int8_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[int32_t, ndim=2] out, */ __pyx_k_tuple_552 = PyTuple_Pack(10, ((PyObject *)__pyx_n_s__values), ((PyObject *)__pyx_n_s__indexer), ((PyObject *)__pyx_n_s__out), ((PyObject *)__pyx_n_s__fill_value), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__j), ((PyObject *)__pyx_n_s__k), ((PyObject *)__pyx_n_s__n), ((PyObject *)__pyx_n_s__idx), ((PyObject *)__pyx_n_s__fv)); if (unlikely(!__pyx_k_tuple_552)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3540; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_552); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_552)); __pyx_k_codeobj_553 = (PyObject*)__Pyx_PyCode_New(4, 0, 10, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_552, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_314, __pyx_n_s_554, 3540, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_553)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3540; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":3586 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_axis1_int8_int64(ndarray[int8_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[int64_t, ndim=2] out, */ __pyx_k_tuple_555 = PyTuple_Pack(10, ((PyObject *)__pyx_n_s__values), ((PyObject *)__pyx_n_s__indexer), ((PyObject *)__pyx_n_s__out), ((PyObject *)__pyx_n_s__fill_value), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__j), ((PyObject *)__pyx_n_s__k), ((PyObject *)__pyx_n_s__n), ((PyObject *)__pyx_n_s__idx), ((PyObject *)__pyx_n_s__fv)); if (unlikely(!__pyx_k_tuple_555)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3586; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_555); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_555)); __pyx_k_codeobj_556 = (PyObject*)__Pyx_PyCode_New(4, 0, 10, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_555, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_314, __pyx_n_s_557, 3586, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_556)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3586; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":3632 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_axis1_int8_float64(ndarray[int8_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[float64_t, ndim=2] out, */ __pyx_k_tuple_558 = PyTuple_Pack(10, ((PyObject *)__pyx_n_s__values), ((PyObject *)__pyx_n_s__indexer), ((PyObject *)__pyx_n_s__out), ((PyObject *)__pyx_n_s__fill_value), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__j), ((PyObject *)__pyx_n_s__k), ((PyObject *)__pyx_n_s__n), ((PyObject *)__pyx_n_s__idx), ((PyObject *)__pyx_n_s__fv)); if (unlikely(!__pyx_k_tuple_558)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3632; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_558); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_558)); __pyx_k_codeobj_559 = (PyObject*)__Pyx_PyCode_New(4, 0, 10, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_558, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_314, __pyx_n_s_560, 3632, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_559)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3632; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":3678 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_axis1_int16_int16(ndarray[int16_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[int16_t, ndim=2] out, */ __pyx_k_tuple_561 = PyTuple_Pack(12, ((PyObject *)__pyx_n_s__values), ((PyObject *)__pyx_n_s__indexer), ((PyObject *)__pyx_n_s__out), ((PyObject *)__pyx_n_s__fill_value), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__j), ((PyObject *)__pyx_n_s__k), ((PyObject *)__pyx_n_s__n), ((PyObject *)__pyx_n_s__idx), ((PyObject *)__pyx_n_s__fv), ((PyObject *)__pyx_n_s__v), ((PyObject *)__pyx_n_s__o)); if (unlikely(!__pyx_k_tuple_561)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3678; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_561); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_561)); __pyx_k_codeobj_562 = (PyObject*)__Pyx_PyCode_New(4, 0, 12, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_561, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_314, __pyx_n_s_563, 3678, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_562)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3678; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":3724 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_axis1_int16_int32(ndarray[int16_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[int32_t, ndim=2] out, */ __pyx_k_tuple_564 = PyTuple_Pack(10, ((PyObject *)__pyx_n_s__values), ((PyObject *)__pyx_n_s__indexer), ((PyObject *)__pyx_n_s__out), ((PyObject *)__pyx_n_s__fill_value), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__j), ((PyObject *)__pyx_n_s__k), ((PyObject *)__pyx_n_s__n), ((PyObject *)__pyx_n_s__idx), ((PyObject *)__pyx_n_s__fv)); if (unlikely(!__pyx_k_tuple_564)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3724; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_564); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_564)); __pyx_k_codeobj_565 = (PyObject*)__Pyx_PyCode_New(4, 0, 10, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_564, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_314, __pyx_n_s_566, 3724, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_565)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3724; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":3770 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_axis1_int16_int64(ndarray[int16_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[int64_t, ndim=2] out, */ __pyx_k_tuple_567 = PyTuple_Pack(10, ((PyObject *)__pyx_n_s__values), ((PyObject *)__pyx_n_s__indexer), ((PyObject *)__pyx_n_s__out), ((PyObject *)__pyx_n_s__fill_value), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__j), ((PyObject *)__pyx_n_s__k), ((PyObject *)__pyx_n_s__n), ((PyObject *)__pyx_n_s__idx), ((PyObject *)__pyx_n_s__fv)); if (unlikely(!__pyx_k_tuple_567)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3770; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_567); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_567)); __pyx_k_codeobj_568 = (PyObject*)__Pyx_PyCode_New(4, 0, 10, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_567, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_314, __pyx_n_s_569, 3770, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_568)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3770; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":3816 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_axis1_int16_float64(ndarray[int16_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[float64_t, ndim=2] out, */ __pyx_k_tuple_570 = PyTuple_Pack(10, ((PyObject *)__pyx_n_s__values), ((PyObject *)__pyx_n_s__indexer), ((PyObject *)__pyx_n_s__out), ((PyObject *)__pyx_n_s__fill_value), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__j), ((PyObject *)__pyx_n_s__k), ((PyObject *)__pyx_n_s__n), ((PyObject *)__pyx_n_s__idx), ((PyObject *)__pyx_n_s__fv)); if (unlikely(!__pyx_k_tuple_570)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3816; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_570); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_570)); __pyx_k_codeobj_571 = (PyObject*)__Pyx_PyCode_New(4, 0, 10, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_570, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_314, __pyx_n_s_572, 3816, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_571)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3816; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":3862 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_axis1_int32_int32(ndarray[int32_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[int32_t, ndim=2] out, */ __pyx_k_tuple_573 = PyTuple_Pack(12, ((PyObject *)__pyx_n_s__values), ((PyObject *)__pyx_n_s__indexer), ((PyObject *)__pyx_n_s__out), ((PyObject *)__pyx_n_s__fill_value), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__j), ((PyObject *)__pyx_n_s__k), ((PyObject *)__pyx_n_s__n), ((PyObject *)__pyx_n_s__idx), ((PyObject *)__pyx_n_s__fv), ((PyObject *)__pyx_n_s__v), ((PyObject *)__pyx_n_s__o)); if (unlikely(!__pyx_k_tuple_573)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3862; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_573); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_573)); __pyx_k_codeobj_574 = (PyObject*)__Pyx_PyCode_New(4, 0, 12, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_573, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_314, __pyx_n_s_575, 3862, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_574)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3862; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":3908 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_axis1_int32_int64(ndarray[int32_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[int64_t, ndim=2] out, */ __pyx_k_tuple_576 = PyTuple_Pack(10, ((PyObject *)__pyx_n_s__values), ((PyObject *)__pyx_n_s__indexer), ((PyObject *)__pyx_n_s__out), ((PyObject *)__pyx_n_s__fill_value), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__j), ((PyObject *)__pyx_n_s__k), ((PyObject *)__pyx_n_s__n), ((PyObject *)__pyx_n_s__idx), ((PyObject *)__pyx_n_s__fv)); if (unlikely(!__pyx_k_tuple_576)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3908; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_576); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_576)); __pyx_k_codeobj_577 = (PyObject*)__Pyx_PyCode_New(4, 0, 10, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_576, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_314, __pyx_n_s_578, 3908, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_577)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3908; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":3954 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_axis1_int32_float64(ndarray[int32_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[float64_t, ndim=2] out, */ __pyx_k_tuple_579 = PyTuple_Pack(10, ((PyObject *)__pyx_n_s__values), ((PyObject *)__pyx_n_s__indexer), ((PyObject *)__pyx_n_s__out), ((PyObject *)__pyx_n_s__fill_value), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__j), ((PyObject *)__pyx_n_s__k), ((PyObject *)__pyx_n_s__n), ((PyObject *)__pyx_n_s__idx), ((PyObject *)__pyx_n_s__fv)); if (unlikely(!__pyx_k_tuple_579)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3954; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_579); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_579)); __pyx_k_codeobj_580 = (PyObject*)__Pyx_PyCode_New(4, 0, 10, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_579, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_314, __pyx_n_s_581, 3954, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_580)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3954; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":4000 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_axis1_int64_int64(ndarray[int64_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[int64_t, ndim=2] out, */ __pyx_k_tuple_582 = PyTuple_Pack(12, ((PyObject *)__pyx_n_s__values), ((PyObject *)__pyx_n_s__indexer), ((PyObject *)__pyx_n_s__out), ((PyObject *)__pyx_n_s__fill_value), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__j), ((PyObject *)__pyx_n_s__k), ((PyObject *)__pyx_n_s__n), ((PyObject *)__pyx_n_s__idx), ((PyObject *)__pyx_n_s__fv), ((PyObject *)__pyx_n_s__v), ((PyObject *)__pyx_n_s__o)); if (unlikely(!__pyx_k_tuple_582)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4000; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_582); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_582)); __pyx_k_codeobj_583 = (PyObject*)__Pyx_PyCode_New(4, 0, 12, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_582, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_314, __pyx_n_s_584, 4000, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_583)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4000; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":4046 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_axis1_int64_float64(ndarray[int64_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[float64_t, ndim=2] out, */ __pyx_k_tuple_585 = PyTuple_Pack(10, ((PyObject *)__pyx_n_s__values), ((PyObject *)__pyx_n_s__indexer), ((PyObject *)__pyx_n_s__out), ((PyObject *)__pyx_n_s__fill_value), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__j), ((PyObject *)__pyx_n_s__k), ((PyObject *)__pyx_n_s__n), ((PyObject *)__pyx_n_s__idx), ((PyObject *)__pyx_n_s__fv)); if (unlikely(!__pyx_k_tuple_585)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4046; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_585); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_585)); __pyx_k_codeobj_586 = (PyObject*)__Pyx_PyCode_New(4, 0, 10, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_585, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_314, __pyx_n_s_587, 4046, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_586)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4046; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":4092 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_axis1_float32_float32(ndarray[float32_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[float32_t, ndim=2] out, */ __pyx_k_tuple_588 = PyTuple_Pack(12, ((PyObject *)__pyx_n_s__values), ((PyObject *)__pyx_n_s__indexer), ((PyObject *)__pyx_n_s__out), ((PyObject *)__pyx_n_s__fill_value), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__j), ((PyObject *)__pyx_n_s__k), ((PyObject *)__pyx_n_s__n), ((PyObject *)__pyx_n_s__idx), ((PyObject *)__pyx_n_s__fv), ((PyObject *)__pyx_n_s__v), ((PyObject *)__pyx_n_s__o)); if (unlikely(!__pyx_k_tuple_588)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4092; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_588); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_588)); __pyx_k_codeobj_589 = (PyObject*)__Pyx_PyCode_New(4, 0, 12, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_588, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_314, __pyx_n_s_590, 4092, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_589)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4092; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":4138 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_axis1_float32_float64(ndarray[float32_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[float64_t, ndim=2] out, */ __pyx_k_tuple_591 = PyTuple_Pack(10, ((PyObject *)__pyx_n_s__values), ((PyObject *)__pyx_n_s__indexer), ((PyObject *)__pyx_n_s__out), ((PyObject *)__pyx_n_s__fill_value), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__j), ((PyObject *)__pyx_n_s__k), ((PyObject *)__pyx_n_s__n), ((PyObject *)__pyx_n_s__idx), ((PyObject *)__pyx_n_s__fv)); if (unlikely(!__pyx_k_tuple_591)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4138; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_591); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_591)); __pyx_k_codeobj_592 = (PyObject*)__Pyx_PyCode_New(4, 0, 10, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_591, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_314, __pyx_n_s_593, 4138, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_592)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4138; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":4184 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_axis1_float64_float64(ndarray[float64_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[float64_t, ndim=2] out, */ __pyx_k_tuple_594 = PyTuple_Pack(12, ((PyObject *)__pyx_n_s__values), ((PyObject *)__pyx_n_s__indexer), ((PyObject *)__pyx_n_s__out), ((PyObject *)__pyx_n_s__fill_value), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__j), ((PyObject *)__pyx_n_s__k), ((PyObject *)__pyx_n_s__n), ((PyObject *)__pyx_n_s__idx), ((PyObject *)__pyx_n_s__fv), ((PyObject *)__pyx_n_s__v), ((PyObject *)__pyx_n_s__o)); if (unlikely(!__pyx_k_tuple_594)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4184; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_594); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_594)); __pyx_k_codeobj_595 = (PyObject*)__Pyx_PyCode_New(4, 0, 12, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_594, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_314, __pyx_n_s_46, 4184, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_595)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4184; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":4230 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_axis1_object_object(ndarray[object, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[object, ndim=2] out, */ __pyx_k_tuple_596 = PyTuple_Pack(10, ((PyObject *)__pyx_n_s__values), ((PyObject *)__pyx_n_s__indexer), ((PyObject *)__pyx_n_s__out), ((PyObject *)__pyx_n_s__fill_value), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__j), ((PyObject *)__pyx_n_s__k), ((PyObject *)__pyx_n_s__n), ((PyObject *)__pyx_n_s__idx), ((PyObject *)__pyx_n_s__fv)); if (unlikely(!__pyx_k_tuple_596)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4230; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_596); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_596)); __pyx_k_codeobj_597 = (PyObject*)__Pyx_PyCode_New(4, 0, 10, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_596, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_314, __pyx_n_s_598, 4230, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_597)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4230; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":4277 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_multi_bool_bool(ndarray[uint8_t, ndim=2] values, # <<<<<<<<<<<<<< * indexer, * ndarray[uint8_t, ndim=2] out, */ __pyx_k_tuple_599 = PyTuple_Pack(12, ((PyObject *)__pyx_n_s__values), ((PyObject *)__pyx_n_s__indexer), ((PyObject *)__pyx_n_s__out), ((PyObject *)__pyx_n_s__fill_value), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__j), ((PyObject *)__pyx_n_s__k), ((PyObject *)__pyx_n_s__n), ((PyObject *)__pyx_n_s__idx), ((PyObject *)__pyx_n_s__idx0), ((PyObject *)__pyx_n_s__idx1), ((PyObject *)__pyx_n_s__fv)); if (unlikely(!__pyx_k_tuple_599)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4277; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_599); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_599)); __pyx_k_codeobj_600 = (PyObject*)__Pyx_PyCode_New(4, 0, 12, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_599, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_314, __pyx_n_s_601, 4277, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_600)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4277; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":4305 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_multi_bool_object(ndarray[uint8_t, ndim=2] values, # <<<<<<<<<<<<<< * indexer, * ndarray[object, ndim=2] out, */ __pyx_k_tuple_602 = PyTuple_Pack(12, ((PyObject *)__pyx_n_s__values), ((PyObject *)__pyx_n_s__indexer), ((PyObject *)__pyx_n_s__out), ((PyObject *)__pyx_n_s__fill_value), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__j), ((PyObject *)__pyx_n_s__k), ((PyObject *)__pyx_n_s__n), ((PyObject *)__pyx_n_s__idx), ((PyObject *)__pyx_n_s__idx0), ((PyObject *)__pyx_n_s__idx1), ((PyObject *)__pyx_n_s__fv)); if (unlikely(!__pyx_k_tuple_602)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4305; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_602); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_602)); __pyx_k_codeobj_603 = (PyObject*)__Pyx_PyCode_New(4, 0, 12, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_602, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_314, __pyx_n_s_604, 4305, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_603)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4305; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":4333 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_multi_int8_int8(ndarray[int8_t, ndim=2] values, # <<<<<<<<<<<<<< * indexer, * ndarray[int8_t, ndim=2] out, */ __pyx_k_tuple_605 = PyTuple_Pack(12, ((PyObject *)__pyx_n_s__values), ((PyObject *)__pyx_n_s__indexer), ((PyObject *)__pyx_n_s__out), ((PyObject *)__pyx_n_s__fill_value), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__j), ((PyObject *)__pyx_n_s__k), ((PyObject *)__pyx_n_s__n), ((PyObject *)__pyx_n_s__idx), ((PyObject *)__pyx_n_s__idx0), ((PyObject *)__pyx_n_s__idx1), ((PyObject *)__pyx_n_s__fv)); if (unlikely(!__pyx_k_tuple_605)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4333; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_605); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_605)); __pyx_k_codeobj_606 = (PyObject*)__Pyx_PyCode_New(4, 0, 12, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_605, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_314, __pyx_n_s_607, 4333, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_606)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4333; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":4361 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_multi_int8_int32(ndarray[int8_t, ndim=2] values, # <<<<<<<<<<<<<< * indexer, * ndarray[int32_t, ndim=2] out, */ __pyx_k_tuple_608 = PyTuple_Pack(12, ((PyObject *)__pyx_n_s__values), ((PyObject *)__pyx_n_s__indexer), ((PyObject *)__pyx_n_s__out), ((PyObject *)__pyx_n_s__fill_value), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__j), ((PyObject *)__pyx_n_s__k), ((PyObject *)__pyx_n_s__n), ((PyObject *)__pyx_n_s__idx), ((PyObject *)__pyx_n_s__idx0), ((PyObject *)__pyx_n_s__idx1), ((PyObject *)__pyx_n_s__fv)); if (unlikely(!__pyx_k_tuple_608)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4361; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_608); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_608)); __pyx_k_codeobj_609 = (PyObject*)__Pyx_PyCode_New(4, 0, 12, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_608, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_314, __pyx_n_s_610, 4361, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_609)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4361; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":4389 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_multi_int8_int64(ndarray[int8_t, ndim=2] values, # <<<<<<<<<<<<<< * indexer, * ndarray[int64_t, ndim=2] out, */ __pyx_k_tuple_611 = PyTuple_Pack(12, ((PyObject *)__pyx_n_s__values), ((PyObject *)__pyx_n_s__indexer), ((PyObject *)__pyx_n_s__out), ((PyObject *)__pyx_n_s__fill_value), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__j), ((PyObject *)__pyx_n_s__k), ((PyObject *)__pyx_n_s__n), ((PyObject *)__pyx_n_s__idx), ((PyObject *)__pyx_n_s__idx0), ((PyObject *)__pyx_n_s__idx1), ((PyObject *)__pyx_n_s__fv)); if (unlikely(!__pyx_k_tuple_611)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4389; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_611); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_611)); __pyx_k_codeobj_612 = (PyObject*)__Pyx_PyCode_New(4, 0, 12, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_611, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_314, __pyx_n_s_613, 4389, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_612)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4389; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":4417 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_multi_int8_float64(ndarray[int8_t, ndim=2] values, # <<<<<<<<<<<<<< * indexer, * ndarray[float64_t, ndim=2] out, */ __pyx_k_tuple_614 = PyTuple_Pack(12, ((PyObject *)__pyx_n_s__values), ((PyObject *)__pyx_n_s__indexer), ((PyObject *)__pyx_n_s__out), ((PyObject *)__pyx_n_s__fill_value), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__j), ((PyObject *)__pyx_n_s__k), ((PyObject *)__pyx_n_s__n), ((PyObject *)__pyx_n_s__idx), ((PyObject *)__pyx_n_s__idx0), ((PyObject *)__pyx_n_s__idx1), ((PyObject *)__pyx_n_s__fv)); if (unlikely(!__pyx_k_tuple_614)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4417; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_614); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_614)); __pyx_k_codeobj_615 = (PyObject*)__Pyx_PyCode_New(4, 0, 12, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_614, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_314, __pyx_n_s_616, 4417, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_615)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4417; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":4445 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_multi_int16_int16(ndarray[int16_t, ndim=2] values, # <<<<<<<<<<<<<< * indexer, * ndarray[int16_t, ndim=2] out, */ __pyx_k_tuple_617 = PyTuple_Pack(12, ((PyObject *)__pyx_n_s__values), ((PyObject *)__pyx_n_s__indexer), ((PyObject *)__pyx_n_s__out), ((PyObject *)__pyx_n_s__fill_value), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__j), ((PyObject *)__pyx_n_s__k), ((PyObject *)__pyx_n_s__n), ((PyObject *)__pyx_n_s__idx), ((PyObject *)__pyx_n_s__idx0), ((PyObject *)__pyx_n_s__idx1), ((PyObject *)__pyx_n_s__fv)); if (unlikely(!__pyx_k_tuple_617)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4445; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_617); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_617)); __pyx_k_codeobj_618 = (PyObject*)__Pyx_PyCode_New(4, 0, 12, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_617, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_314, __pyx_n_s_619, 4445, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_618)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4445; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":4473 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_multi_int16_int32(ndarray[int16_t, ndim=2] values, # <<<<<<<<<<<<<< * indexer, * ndarray[int32_t, ndim=2] out, */ __pyx_k_tuple_620 = PyTuple_Pack(12, ((PyObject *)__pyx_n_s__values), ((PyObject *)__pyx_n_s__indexer), ((PyObject *)__pyx_n_s__out), ((PyObject *)__pyx_n_s__fill_value), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__j), ((PyObject *)__pyx_n_s__k), ((PyObject *)__pyx_n_s__n), ((PyObject *)__pyx_n_s__idx), ((PyObject *)__pyx_n_s__idx0), ((PyObject *)__pyx_n_s__idx1), ((PyObject *)__pyx_n_s__fv)); if (unlikely(!__pyx_k_tuple_620)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4473; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_620); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_620)); __pyx_k_codeobj_621 = (PyObject*)__Pyx_PyCode_New(4, 0, 12, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_620, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_314, __pyx_n_s_622, 4473, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_621)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4473; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":4501 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_multi_int16_int64(ndarray[int16_t, ndim=2] values, # <<<<<<<<<<<<<< * indexer, * ndarray[int64_t, ndim=2] out, */ __pyx_k_tuple_623 = PyTuple_Pack(12, ((PyObject *)__pyx_n_s__values), ((PyObject *)__pyx_n_s__indexer), ((PyObject *)__pyx_n_s__out), ((PyObject *)__pyx_n_s__fill_value), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__j), ((PyObject *)__pyx_n_s__k), ((PyObject *)__pyx_n_s__n), ((PyObject *)__pyx_n_s__idx), ((PyObject *)__pyx_n_s__idx0), ((PyObject *)__pyx_n_s__idx1), ((PyObject *)__pyx_n_s__fv)); if (unlikely(!__pyx_k_tuple_623)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4501; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_623); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_623)); __pyx_k_codeobj_624 = (PyObject*)__Pyx_PyCode_New(4, 0, 12, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_623, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_314, __pyx_n_s_625, 4501, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_624)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4501; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":4529 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_multi_int16_float64(ndarray[int16_t, ndim=2] values, # <<<<<<<<<<<<<< * indexer, * ndarray[float64_t, ndim=2] out, */ __pyx_k_tuple_626 = PyTuple_Pack(12, ((PyObject *)__pyx_n_s__values), ((PyObject *)__pyx_n_s__indexer), ((PyObject *)__pyx_n_s__out), ((PyObject *)__pyx_n_s__fill_value), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__j), ((PyObject *)__pyx_n_s__k), ((PyObject *)__pyx_n_s__n), ((PyObject *)__pyx_n_s__idx), ((PyObject *)__pyx_n_s__idx0), ((PyObject *)__pyx_n_s__idx1), ((PyObject *)__pyx_n_s__fv)); if (unlikely(!__pyx_k_tuple_626)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4529; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_626); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_626)); __pyx_k_codeobj_627 = (PyObject*)__Pyx_PyCode_New(4, 0, 12, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_626, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_314, __pyx_n_s_628, 4529, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_627)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4529; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":4557 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_multi_int32_int32(ndarray[int32_t, ndim=2] values, # <<<<<<<<<<<<<< * indexer, * ndarray[int32_t, ndim=2] out, */ __pyx_k_tuple_629 = PyTuple_Pack(12, ((PyObject *)__pyx_n_s__values), ((PyObject *)__pyx_n_s__indexer), ((PyObject *)__pyx_n_s__out), ((PyObject *)__pyx_n_s__fill_value), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__j), ((PyObject *)__pyx_n_s__k), ((PyObject *)__pyx_n_s__n), ((PyObject *)__pyx_n_s__idx), ((PyObject *)__pyx_n_s__idx0), ((PyObject *)__pyx_n_s__idx1), ((PyObject *)__pyx_n_s__fv)); if (unlikely(!__pyx_k_tuple_629)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4557; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_629); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_629)); __pyx_k_codeobj_630 = (PyObject*)__Pyx_PyCode_New(4, 0, 12, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_629, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_314, __pyx_n_s_631, 4557, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_630)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4557; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":4585 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_multi_int32_int64(ndarray[int32_t, ndim=2] values, # <<<<<<<<<<<<<< * indexer, * ndarray[int64_t, ndim=2] out, */ __pyx_k_tuple_632 = PyTuple_Pack(12, ((PyObject *)__pyx_n_s__values), ((PyObject *)__pyx_n_s__indexer), ((PyObject *)__pyx_n_s__out), ((PyObject *)__pyx_n_s__fill_value), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__j), ((PyObject *)__pyx_n_s__k), ((PyObject *)__pyx_n_s__n), ((PyObject *)__pyx_n_s__idx), ((PyObject *)__pyx_n_s__idx0), ((PyObject *)__pyx_n_s__idx1), ((PyObject *)__pyx_n_s__fv)); if (unlikely(!__pyx_k_tuple_632)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4585; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_632); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_632)); __pyx_k_codeobj_633 = (PyObject*)__Pyx_PyCode_New(4, 0, 12, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_632, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_314, __pyx_n_s_634, 4585, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_633)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4585; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":4613 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_multi_int32_float64(ndarray[int32_t, ndim=2] values, # <<<<<<<<<<<<<< * indexer, * ndarray[float64_t, ndim=2] out, */ __pyx_k_tuple_635 = PyTuple_Pack(12, ((PyObject *)__pyx_n_s__values), ((PyObject *)__pyx_n_s__indexer), ((PyObject *)__pyx_n_s__out), ((PyObject *)__pyx_n_s__fill_value), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__j), ((PyObject *)__pyx_n_s__k), ((PyObject *)__pyx_n_s__n), ((PyObject *)__pyx_n_s__idx), ((PyObject *)__pyx_n_s__idx0), ((PyObject *)__pyx_n_s__idx1), ((PyObject *)__pyx_n_s__fv)); if (unlikely(!__pyx_k_tuple_635)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4613; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_635); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_635)); __pyx_k_codeobj_636 = (PyObject*)__Pyx_PyCode_New(4, 0, 12, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_635, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_314, __pyx_n_s_637, 4613, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_636)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4613; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":4641 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_multi_int64_int64(ndarray[int64_t, ndim=2] values, # <<<<<<<<<<<<<< * indexer, * ndarray[int64_t, ndim=2] out, */ __pyx_k_tuple_638 = PyTuple_Pack(12, ((PyObject *)__pyx_n_s__values), ((PyObject *)__pyx_n_s__indexer), ((PyObject *)__pyx_n_s__out), ((PyObject *)__pyx_n_s__fill_value), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__j), ((PyObject *)__pyx_n_s__k), ((PyObject *)__pyx_n_s__n), ((PyObject *)__pyx_n_s__idx), ((PyObject *)__pyx_n_s__idx0), ((PyObject *)__pyx_n_s__idx1), ((PyObject *)__pyx_n_s__fv)); if (unlikely(!__pyx_k_tuple_638)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4641; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_638); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_638)); __pyx_k_codeobj_639 = (PyObject*)__Pyx_PyCode_New(4, 0, 12, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_638, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_314, __pyx_n_s_640, 4641, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_639)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4641; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":4669 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_multi_int64_float64(ndarray[int64_t, ndim=2] values, # <<<<<<<<<<<<<< * indexer, * ndarray[float64_t, ndim=2] out, */ __pyx_k_tuple_641 = PyTuple_Pack(12, ((PyObject *)__pyx_n_s__values), ((PyObject *)__pyx_n_s__indexer), ((PyObject *)__pyx_n_s__out), ((PyObject *)__pyx_n_s__fill_value), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__j), ((PyObject *)__pyx_n_s__k), ((PyObject *)__pyx_n_s__n), ((PyObject *)__pyx_n_s__idx), ((PyObject *)__pyx_n_s__idx0), ((PyObject *)__pyx_n_s__idx1), ((PyObject *)__pyx_n_s__fv)); if (unlikely(!__pyx_k_tuple_641)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4669; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_641); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_641)); __pyx_k_codeobj_642 = (PyObject*)__Pyx_PyCode_New(4, 0, 12, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_641, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_314, __pyx_n_s_643, 4669, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_642)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4669; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":4697 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_multi_float32_float32(ndarray[float32_t, ndim=2] values, # <<<<<<<<<<<<<< * indexer, * ndarray[float32_t, ndim=2] out, */ __pyx_k_tuple_644 = PyTuple_Pack(12, ((PyObject *)__pyx_n_s__values), ((PyObject *)__pyx_n_s__indexer), ((PyObject *)__pyx_n_s__out), ((PyObject *)__pyx_n_s__fill_value), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__j), ((PyObject *)__pyx_n_s__k), ((PyObject *)__pyx_n_s__n), ((PyObject *)__pyx_n_s__idx), ((PyObject *)__pyx_n_s__idx0), ((PyObject *)__pyx_n_s__idx1), ((PyObject *)__pyx_n_s__fv)); if (unlikely(!__pyx_k_tuple_644)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4697; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_644); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_644)); __pyx_k_codeobj_645 = (PyObject*)__Pyx_PyCode_New(4, 0, 12, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_644, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_314, __pyx_n_s_646, 4697, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_645)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4697; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":4725 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_multi_float32_float64(ndarray[float32_t, ndim=2] values, # <<<<<<<<<<<<<< * indexer, * ndarray[float64_t, ndim=2] out, */ __pyx_k_tuple_647 = PyTuple_Pack(12, ((PyObject *)__pyx_n_s__values), ((PyObject *)__pyx_n_s__indexer), ((PyObject *)__pyx_n_s__out), ((PyObject *)__pyx_n_s__fill_value), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__j), ((PyObject *)__pyx_n_s__k), ((PyObject *)__pyx_n_s__n), ((PyObject *)__pyx_n_s__idx), ((PyObject *)__pyx_n_s__idx0), ((PyObject *)__pyx_n_s__idx1), ((PyObject *)__pyx_n_s__fv)); if (unlikely(!__pyx_k_tuple_647)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4725; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_647); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_647)); __pyx_k_codeobj_648 = (PyObject*)__Pyx_PyCode_New(4, 0, 12, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_647, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_314, __pyx_n_s_649, 4725, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_648)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4725; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":4753 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_multi_float64_float64(ndarray[float64_t, ndim=2] values, # <<<<<<<<<<<<<< * indexer, * ndarray[float64_t, ndim=2] out, */ __pyx_k_tuple_650 = PyTuple_Pack(12, ((PyObject *)__pyx_n_s__values), ((PyObject *)__pyx_n_s__indexer), ((PyObject *)__pyx_n_s__out), ((PyObject *)__pyx_n_s__fill_value), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__j), ((PyObject *)__pyx_n_s__k), ((PyObject *)__pyx_n_s__n), ((PyObject *)__pyx_n_s__idx), ((PyObject *)__pyx_n_s__idx0), ((PyObject *)__pyx_n_s__idx1), ((PyObject *)__pyx_n_s__fv)); if (unlikely(!__pyx_k_tuple_650)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4753; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_650); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_650)); __pyx_k_codeobj_651 = (PyObject*)__Pyx_PyCode_New(4, 0, 12, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_650, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_314, __pyx_n_s_652, 4753, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_651)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4753; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":4781 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_multi_object_object(ndarray[object, ndim=2] values, # <<<<<<<<<<<<<< * indexer, * ndarray[object, ndim=2] out, */ __pyx_k_tuple_653 = PyTuple_Pack(12, ((PyObject *)__pyx_n_s__values), ((PyObject *)__pyx_n_s__indexer), ((PyObject *)__pyx_n_s__out), ((PyObject *)__pyx_n_s__fill_value), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__j), ((PyObject *)__pyx_n_s__k), ((PyObject *)__pyx_n_s__n), ((PyObject *)__pyx_n_s__idx), ((PyObject *)__pyx_n_s__idx0), ((PyObject *)__pyx_n_s__idx1), ((PyObject *)__pyx_n_s__fv)); if (unlikely(!__pyx_k_tuple_653)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4781; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_653); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_653)); __pyx_k_codeobj_654 = (PyObject*)__Pyx_PyCode_New(4, 0, 12, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_653, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_314, __pyx_n_s_655, 4781, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_654)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4781; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":4810 * @cython.boundscheck(False) * @cython.wraparound(False) * def diff_2d_float64(ndarray[float64_t, ndim=2] arr, # <<<<<<<<<<<<<< * ndarray[float64_t, ndim=2] out, * Py_ssize_t periods, int axis): */ __pyx_k_tuple_656 = PyTuple_Pack(10, ((PyObject *)__pyx_n_s__arr), ((PyObject *)__pyx_n_s__out), ((PyObject *)__pyx_n_s__periods), ((PyObject *)__pyx_n_s__axis), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__j), ((PyObject *)__pyx_n_s__sx), ((PyObject *)__pyx_n_s__sy), ((PyObject *)__pyx_n_s__start), ((PyObject *)__pyx_n_s__stop)); if (unlikely(!__pyx_k_tuple_656)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4810; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_656); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_656)); __pyx_k_codeobj_657 = (PyObject*)__Pyx_PyCode_New(4, 0, 10, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_656, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_314, __pyx_n_s__diff_2d_float64, 4810, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_657)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4810; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":4853 * @cython.boundscheck(False) * @cython.wraparound(False) * def diff_2d_float32(ndarray[float32_t, ndim=2] arr, # <<<<<<<<<<<<<< * ndarray[float32_t, ndim=2] out, * Py_ssize_t periods, int axis): */ __pyx_k_tuple_658 = PyTuple_Pack(10, ((PyObject *)__pyx_n_s__arr), ((PyObject *)__pyx_n_s__out), ((PyObject *)__pyx_n_s__periods), ((PyObject *)__pyx_n_s__axis), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__j), ((PyObject *)__pyx_n_s__sx), ((PyObject *)__pyx_n_s__sy), ((PyObject *)__pyx_n_s__start), ((PyObject *)__pyx_n_s__stop)); if (unlikely(!__pyx_k_tuple_658)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4853; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_658); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_658)); __pyx_k_codeobj_659 = (PyObject*)__Pyx_PyCode_New(4, 0, 10, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_658, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_314, __pyx_n_s__diff_2d_float32, 4853, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_659)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4853; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":4896 * @cython.boundscheck(False) * @cython.wraparound(False) * def diff_2d_int8(ndarray[int8_t, ndim=2] arr, # <<<<<<<<<<<<<< * ndarray[float32_t, ndim=2] out, * Py_ssize_t periods, int axis): */ __pyx_k_tuple_660 = PyTuple_Pack(10, ((PyObject *)__pyx_n_s__arr), ((PyObject *)__pyx_n_s__out), ((PyObject *)__pyx_n_s__periods), ((PyObject *)__pyx_n_s__axis), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__j), ((PyObject *)__pyx_n_s__sx), ((PyObject *)__pyx_n_s__sy), ((PyObject *)__pyx_n_s__start), ((PyObject *)__pyx_n_s__stop)); if (unlikely(!__pyx_k_tuple_660)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4896; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_660); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_660)); __pyx_k_codeobj_661 = (PyObject*)__Pyx_PyCode_New(4, 0, 10, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_660, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_314, __pyx_n_s__diff_2d_int8, 4896, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_661)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4896; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":4939 * @cython.boundscheck(False) * @cython.wraparound(False) * def diff_2d_int16(ndarray[int16_t, ndim=2] arr, # <<<<<<<<<<<<<< * ndarray[float32_t, ndim=2] out, * Py_ssize_t periods, int axis): */ __pyx_k_tuple_662 = PyTuple_Pack(10, ((PyObject *)__pyx_n_s__arr), ((PyObject *)__pyx_n_s__out), ((PyObject *)__pyx_n_s__periods), ((PyObject *)__pyx_n_s__axis), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__j), ((PyObject *)__pyx_n_s__sx), ((PyObject *)__pyx_n_s__sy), ((PyObject *)__pyx_n_s__start), ((PyObject *)__pyx_n_s__stop)); if (unlikely(!__pyx_k_tuple_662)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4939; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_662); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_662)); __pyx_k_codeobj_663 = (PyObject*)__Pyx_PyCode_New(4, 0, 10, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_662, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_314, __pyx_n_s__diff_2d_int16, 4939, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_663)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4939; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":4982 * @cython.boundscheck(False) * @cython.wraparound(False) * def diff_2d_int32(ndarray[int32_t, ndim=2] arr, # <<<<<<<<<<<<<< * ndarray[float64_t, ndim=2] out, * Py_ssize_t periods, int axis): */ __pyx_k_tuple_664 = PyTuple_Pack(10, ((PyObject *)__pyx_n_s__arr), ((PyObject *)__pyx_n_s__out), ((PyObject *)__pyx_n_s__periods), ((PyObject *)__pyx_n_s__axis), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__j), ((PyObject *)__pyx_n_s__sx), ((PyObject *)__pyx_n_s__sy), ((PyObject *)__pyx_n_s__start), ((PyObject *)__pyx_n_s__stop)); if (unlikely(!__pyx_k_tuple_664)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4982; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_664); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_664)); __pyx_k_codeobj_665 = (PyObject*)__Pyx_PyCode_New(4, 0, 10, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_664, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_314, __pyx_n_s__diff_2d_int32, 4982, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_665)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4982; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":5025 * @cython.boundscheck(False) * @cython.wraparound(False) * def diff_2d_int64(ndarray[int64_t, ndim=2] arr, # <<<<<<<<<<<<<< * ndarray[float64_t, ndim=2] out, * Py_ssize_t periods, int axis): */ __pyx_k_tuple_666 = PyTuple_Pack(10, ((PyObject *)__pyx_n_s__arr), ((PyObject *)__pyx_n_s__out), ((PyObject *)__pyx_n_s__periods), ((PyObject *)__pyx_n_s__axis), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__j), ((PyObject *)__pyx_n_s__sx), ((PyObject *)__pyx_n_s__sy), ((PyObject *)__pyx_n_s__start), ((PyObject *)__pyx_n_s__stop)); if (unlikely(!__pyx_k_tuple_666)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5025; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_666); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_666)); __pyx_k_codeobj_667 = (PyObject*)__Pyx_PyCode_New(4, 0, 10, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_666, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_314, __pyx_n_s__diff_2d_int64, 5025, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_667)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5025; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":5069 * @cython.wraparound(False) * @cython.wraparound(False) * def group_last_float64(ndarray[float64_t, ndim=2] out, # <<<<<<<<<<<<<< * ndarray[int64_t] counts, * ndarray[float64_t, ndim=2] values, */ __pyx_k_tuple_668 = PyTuple_Pack(13, ((PyObject *)__pyx_n_s__out), ((PyObject *)__pyx_n_s__counts), ((PyObject *)__pyx_n_s__values), ((PyObject *)__pyx_n_s__labels), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__j), ((PyObject *)__pyx_n_s__N), ((PyObject *)__pyx_n_s__K), ((PyObject *)__pyx_n_s__lab), ((PyObject *)__pyx_n_s__val), ((PyObject *)__pyx_n_s__count), ((PyObject *)__pyx_n_s__resx), ((PyObject *)__pyx_n_s__nobs)); if (unlikely(!__pyx_k_tuple_668)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5069; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_668); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_668)); __pyx_k_codeobj_669 = (PyObject*)__Pyx_PyCode_New(4, 0, 13, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_668, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_314, __pyx_n_s__group_last_float64, 5069, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_669)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5069; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":5112 * @cython.wraparound(False) * @cython.wraparound(False) * def group_last_float32(ndarray[float32_t, ndim=2] out, # <<<<<<<<<<<<<< * ndarray[int64_t] counts, * ndarray[float32_t, ndim=2] values, */ __pyx_k_tuple_670 = PyTuple_Pack(13, ((PyObject *)__pyx_n_s__out), ((PyObject *)__pyx_n_s__counts), ((PyObject *)__pyx_n_s__values), ((PyObject *)__pyx_n_s__labels), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__j), ((PyObject *)__pyx_n_s__N), ((PyObject *)__pyx_n_s__K), ((PyObject *)__pyx_n_s__lab), ((PyObject *)__pyx_n_s__val), ((PyObject *)__pyx_n_s__count), ((PyObject *)__pyx_n_s__resx), ((PyObject *)__pyx_n_s__nobs)); if (unlikely(!__pyx_k_tuple_670)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5112; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_670); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_670)); __pyx_k_codeobj_671 = (PyObject*)__Pyx_PyCode_New(4, 0, 13, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_670, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_314, __pyx_n_s__group_last_float32, 5112, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_671)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5112; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":5156 * @cython.wraparound(False) * @cython.wraparound(False) * def group_last_bin_float64(ndarray[float64_t, ndim=2] out, # <<<<<<<<<<<<<< * ndarray[int64_t] counts, * ndarray[float64_t, ndim=2] values, */ __pyx_k_tuple_672 = PyTuple_Pack(14, ((PyObject *)__pyx_n_s__out), ((PyObject *)__pyx_n_s__counts), ((PyObject *)__pyx_n_s__values), ((PyObject *)__pyx_n_s__bins), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__j), ((PyObject *)__pyx_n_s__N), ((PyObject *)__pyx_n_s__K), ((PyObject *)__pyx_n_s__ngroups), ((PyObject *)__pyx_n_s__b), ((PyObject *)__pyx_n_s__val), ((PyObject *)__pyx_n_s__count), ((PyObject *)__pyx_n_s__resx), ((PyObject *)__pyx_n_s__nobs)); if (unlikely(!__pyx_k_tuple_672)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5156; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_672); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_672)); __pyx_k_codeobj_673 = (PyObject*)__Pyx_PyCode_New(4, 0, 14, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_672, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_314, __pyx_n_s_674, 5156, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_673)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5156; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":5200 * @cython.wraparound(False) * @cython.wraparound(False) * def group_last_bin_float32(ndarray[float32_t, ndim=2] out, # <<<<<<<<<<<<<< * ndarray[int64_t] counts, * ndarray[float32_t, ndim=2] values, */ __pyx_k_tuple_675 = PyTuple_Pack(14, ((PyObject *)__pyx_n_s__out), ((PyObject *)__pyx_n_s__counts), ((PyObject *)__pyx_n_s__values), ((PyObject *)__pyx_n_s__bins), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__j), ((PyObject *)__pyx_n_s__N), ((PyObject *)__pyx_n_s__K), ((PyObject *)__pyx_n_s__ngroups), ((PyObject *)__pyx_n_s__b), ((PyObject *)__pyx_n_s__val), ((PyObject *)__pyx_n_s__count), ((PyObject *)__pyx_n_s__resx), ((PyObject *)__pyx_n_s__nobs)); if (unlikely(!__pyx_k_tuple_675)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5200; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_675); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_675)); __pyx_k_codeobj_676 = (PyObject*)__Pyx_PyCode_New(4, 0, 14, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_675, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_314, __pyx_n_s_677, 5200, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_676)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5200; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":5245 * @cython.boundscheck(False) * @cython.wraparound(False) * def group_nth_float64(ndarray[float64_t, ndim=2] out, # <<<<<<<<<<<<<< * ndarray[int64_t] counts, * ndarray[float64_t, ndim=2] values, */ __pyx_k_tuple_678 = PyTuple_Pack(14, ((PyObject *)__pyx_n_s__out), ((PyObject *)__pyx_n_s__counts), ((PyObject *)__pyx_n_s__values), ((PyObject *)__pyx_n_s__labels), ((PyObject *)__pyx_n_s__rank), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__j), ((PyObject *)__pyx_n_s__N), ((PyObject *)__pyx_n_s__K), ((PyObject *)__pyx_n_s__lab), ((PyObject *)__pyx_n_s__val), ((PyObject *)__pyx_n_s__count), ((PyObject *)__pyx_n_s__resx), ((PyObject *)__pyx_n_s__nobs)); if (unlikely(!__pyx_k_tuple_678)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5245; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_678); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_678)); __pyx_k_codeobj_679 = (PyObject*)__Pyx_PyCode_New(5, 0, 14, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_678, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_314, __pyx_n_s__group_nth_float64, 5245, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_679)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5245; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":5289 * @cython.boundscheck(False) * @cython.wraparound(False) * def group_nth_float32(ndarray[float32_t, ndim=2] out, # <<<<<<<<<<<<<< * ndarray[int64_t] counts, * ndarray[float32_t, ndim=2] values, */ __pyx_k_tuple_680 = PyTuple_Pack(14, ((PyObject *)__pyx_n_s__out), ((PyObject *)__pyx_n_s__counts), ((PyObject *)__pyx_n_s__values), ((PyObject *)__pyx_n_s__labels), ((PyObject *)__pyx_n_s__rank), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__j), ((PyObject *)__pyx_n_s__N), ((PyObject *)__pyx_n_s__K), ((PyObject *)__pyx_n_s__lab), ((PyObject *)__pyx_n_s__val), ((PyObject *)__pyx_n_s__count), ((PyObject *)__pyx_n_s__resx), ((PyObject *)__pyx_n_s__nobs)); if (unlikely(!__pyx_k_tuple_680)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5289; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_680); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_680)); __pyx_k_codeobj_681 = (PyObject*)__Pyx_PyCode_New(5, 0, 14, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_680, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_314, __pyx_n_s__group_nth_float32, 5289, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_681)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5289; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":5334 * @cython.boundscheck(False) * @cython.wraparound(False) * def group_nth_bin_float64(ndarray[float64_t, ndim=2] out, # <<<<<<<<<<<<<< * ndarray[int64_t] counts, * ndarray[float64_t, ndim=2] values, */ __pyx_k_tuple_682 = PyTuple_Pack(15, ((PyObject *)__pyx_n_s__out), ((PyObject *)__pyx_n_s__counts), ((PyObject *)__pyx_n_s__values), ((PyObject *)__pyx_n_s__bins), ((PyObject *)__pyx_n_s__rank), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__j), ((PyObject *)__pyx_n_s__N), ((PyObject *)__pyx_n_s__K), ((PyObject *)__pyx_n_s__ngroups), ((PyObject *)__pyx_n_s__b), ((PyObject *)__pyx_n_s__val), ((PyObject *)__pyx_n_s__count), ((PyObject *)__pyx_n_s__resx), ((PyObject *)__pyx_n_s__nobs)); if (unlikely(!__pyx_k_tuple_682)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5334; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_682); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_682)); __pyx_k_codeobj_683 = (PyObject*)__Pyx_PyCode_New(5, 0, 15, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_682, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_314, __pyx_n_s_684, 5334, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_683)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5334; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":5379 * @cython.boundscheck(False) * @cython.wraparound(False) * def group_nth_bin_float32(ndarray[float32_t, ndim=2] out, # <<<<<<<<<<<<<< * ndarray[int64_t] counts, * ndarray[float32_t, ndim=2] values, */ __pyx_k_tuple_685 = PyTuple_Pack(15, ((PyObject *)__pyx_n_s__out), ((PyObject *)__pyx_n_s__counts), ((PyObject *)__pyx_n_s__values), ((PyObject *)__pyx_n_s__bins), ((PyObject *)__pyx_n_s__rank), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__j), ((PyObject *)__pyx_n_s__N), ((PyObject *)__pyx_n_s__K), ((PyObject *)__pyx_n_s__ngroups), ((PyObject *)__pyx_n_s__b), ((PyObject *)__pyx_n_s__val), ((PyObject *)__pyx_n_s__count), ((PyObject *)__pyx_n_s__resx), ((PyObject *)__pyx_n_s__nobs)); if (unlikely(!__pyx_k_tuple_685)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5379; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_685); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_685)); __pyx_k_codeobj_686 = (PyObject*)__Pyx_PyCode_New(5, 0, 15, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_685, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_314, __pyx_n_s_687, 5379, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_686)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5379; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":5425 * @cython.boundscheck(False) * @cython.wraparound(False) * def group_add_float64(ndarray[float64_t, ndim=2] out, # <<<<<<<<<<<<<< * ndarray[int64_t] counts, * ndarray[float64_t, ndim=2] values, */ __pyx_k_tuple_688 = PyTuple_Pack(13, ((PyObject *)__pyx_n_s__out), ((PyObject *)__pyx_n_s__counts), ((PyObject *)__pyx_n_s__values), ((PyObject *)__pyx_n_s__labels), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__j), ((PyObject *)__pyx_n_s__N), ((PyObject *)__pyx_n_s__K), ((PyObject *)__pyx_n_s__lab), ((PyObject *)__pyx_n_s__val), ((PyObject *)__pyx_n_s__count), ((PyObject *)__pyx_n_s__sumx), ((PyObject *)__pyx_n_s__nobs)); if (unlikely(!__pyx_k_tuple_688)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5425; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_688); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_688)); __pyx_k_codeobj_689 = (PyObject*)__Pyx_PyCode_New(4, 0, 13, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_688, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_314, __pyx_n_s__group_add_float64, 5425, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_689)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5425; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":5481 * @cython.boundscheck(False) * @cython.wraparound(False) * def group_add_float32(ndarray[float32_t, ndim=2] out, # <<<<<<<<<<<<<< * ndarray[int64_t] counts, * ndarray[float32_t, ndim=2] values, */ __pyx_k_tuple_690 = PyTuple_Pack(13, ((PyObject *)__pyx_n_s__out), ((PyObject *)__pyx_n_s__counts), ((PyObject *)__pyx_n_s__values), ((PyObject *)__pyx_n_s__labels), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__j), ((PyObject *)__pyx_n_s__N), ((PyObject *)__pyx_n_s__K), ((PyObject *)__pyx_n_s__lab), ((PyObject *)__pyx_n_s__val), ((PyObject *)__pyx_n_s__count), ((PyObject *)__pyx_n_s__sumx), ((PyObject *)__pyx_n_s__nobs)); if (unlikely(!__pyx_k_tuple_690)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5481; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_690); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_690)); __pyx_k_codeobj_691 = (PyObject*)__Pyx_PyCode_New(4, 0, 13, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_690, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_314, __pyx_n_s__group_add_float32, 5481, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_691)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5481; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":5538 * @cython.boundscheck(False) * @cython.wraparound(False) * def group_add_bin_float64(ndarray[float64_t, ndim=2] out, # <<<<<<<<<<<<<< * ndarray[int64_t] counts, * ndarray[float64_t, ndim=2] values, */ __pyx_k_tuple_692 = PyTuple_Pack(15, ((PyObject *)__pyx_n_s__out), ((PyObject *)__pyx_n_s__counts), ((PyObject *)__pyx_n_s__values), ((PyObject *)__pyx_n_s__bins), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__j), ((PyObject *)__pyx_n_s__N), ((PyObject *)__pyx_n_s__K), ((PyObject *)__pyx_n_s__ngroups), ((PyObject *)__pyx_n_s__b), ((PyObject *)__pyx_n_s__nbins), ((PyObject *)__pyx_n_s__val), ((PyObject *)__pyx_n_s__count), ((PyObject *)__pyx_n_s__sumx), ((PyObject *)__pyx_n_s__nobs)); if (unlikely(!__pyx_k_tuple_692)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5538; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_692); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_692)); __pyx_k_codeobj_693 = (PyObject*)__Pyx_PyCode_New(4, 0, 15, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_692, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_314, __pyx_n_s_694, 5538, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_693)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5538; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":5594 * @cython.boundscheck(False) * @cython.wraparound(False) * def group_add_bin_float32(ndarray[float32_t, ndim=2] out, # <<<<<<<<<<<<<< * ndarray[int64_t] counts, * ndarray[float32_t, ndim=2] values, */ __pyx_k_tuple_695 = PyTuple_Pack(15, ((PyObject *)__pyx_n_s__out), ((PyObject *)__pyx_n_s__counts), ((PyObject *)__pyx_n_s__values), ((PyObject *)__pyx_n_s__bins), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__j), ((PyObject *)__pyx_n_s__N), ((PyObject *)__pyx_n_s__K), ((PyObject *)__pyx_n_s__ngroups), ((PyObject *)__pyx_n_s__b), ((PyObject *)__pyx_n_s__nbins), ((PyObject *)__pyx_n_s__val), ((PyObject *)__pyx_n_s__count), ((PyObject *)__pyx_n_s__sumx), ((PyObject *)__pyx_n_s__nobs)); if (unlikely(!__pyx_k_tuple_695)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5594; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_695); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_695)); __pyx_k_codeobj_696 = (PyObject*)__Pyx_PyCode_New(4, 0, 15, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_695, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_314, __pyx_n_s_697, 5594, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_696)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5594; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":5651 * @cython.boundscheck(False) * @cython.wraparound(False) * def group_prod_float64(ndarray[float64_t, ndim=2] out, # <<<<<<<<<<<<<< * ndarray[int64_t] counts, * ndarray[float64_t, ndim=2] values, */ __pyx_k_tuple_698 = PyTuple_Pack(13, ((PyObject *)__pyx_n_s__out), ((PyObject *)__pyx_n_s__counts), ((PyObject *)__pyx_n_s__values), ((PyObject *)__pyx_n_s__labels), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__j), ((PyObject *)__pyx_n_s__N), ((PyObject *)__pyx_n_s__K), ((PyObject *)__pyx_n_s__lab), ((PyObject *)__pyx_n_s__val), ((PyObject *)__pyx_n_s__count), ((PyObject *)__pyx_n_s__prodx), ((PyObject *)__pyx_n_s__nobs)); if (unlikely(!__pyx_k_tuple_698)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5651; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_698); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_698)); __pyx_k_codeobj_699 = (PyObject*)__Pyx_PyCode_New(4, 0, 13, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_698, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_314, __pyx_n_s__group_prod_float64, 5651, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_699)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5651; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":5707 * @cython.boundscheck(False) * @cython.wraparound(False) * def group_prod_float32(ndarray[float32_t, ndim=2] out, # <<<<<<<<<<<<<< * ndarray[int64_t] counts, * ndarray[float32_t, ndim=2] values, */ __pyx_k_tuple_700 = PyTuple_Pack(13, ((PyObject *)__pyx_n_s__out), ((PyObject *)__pyx_n_s__counts), ((PyObject *)__pyx_n_s__values), ((PyObject *)__pyx_n_s__labels), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__j), ((PyObject *)__pyx_n_s__N), ((PyObject *)__pyx_n_s__K), ((PyObject *)__pyx_n_s__lab), ((PyObject *)__pyx_n_s__val), ((PyObject *)__pyx_n_s__count), ((PyObject *)__pyx_n_s__prodx), ((PyObject *)__pyx_n_s__nobs)); if (unlikely(!__pyx_k_tuple_700)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5707; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_700); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_700)); __pyx_k_codeobj_701 = (PyObject*)__Pyx_PyCode_New(4, 0, 13, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_700, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_314, __pyx_n_s__group_prod_float32, 5707, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_701)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5707; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":5764 * @cython.boundscheck(False) * @cython.wraparound(False) * def group_prod_bin_float64(ndarray[float64_t, ndim=2] out, # <<<<<<<<<<<<<< * ndarray[int64_t] counts, * ndarray[float64_t, ndim=2] values, */ __pyx_k_tuple_702 = PyTuple_Pack(14, ((PyObject *)__pyx_n_s__out), ((PyObject *)__pyx_n_s__counts), ((PyObject *)__pyx_n_s__values), ((PyObject *)__pyx_n_s__bins), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__j), ((PyObject *)__pyx_n_s__N), ((PyObject *)__pyx_n_s__K), ((PyObject *)__pyx_n_s__ngroups), ((PyObject *)__pyx_n_s__b), ((PyObject *)__pyx_n_s__val), ((PyObject *)__pyx_n_s__count), ((PyObject *)__pyx_n_s__prodx), ((PyObject *)__pyx_n_s__nobs)); if (unlikely(!__pyx_k_tuple_702)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5764; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_702); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_702)); __pyx_k_codeobj_703 = (PyObject*)__Pyx_PyCode_New(4, 0, 14, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_702, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_314, __pyx_n_s_704, 5764, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_703)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5764; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":5820 * @cython.boundscheck(False) * @cython.wraparound(False) * def group_prod_bin_float32(ndarray[float32_t, ndim=2] out, # <<<<<<<<<<<<<< * ndarray[int64_t] counts, * ndarray[float32_t, ndim=2] values, */ __pyx_k_tuple_705 = PyTuple_Pack(14, ((PyObject *)__pyx_n_s__out), ((PyObject *)__pyx_n_s__counts), ((PyObject *)__pyx_n_s__values), ((PyObject *)__pyx_n_s__bins), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__j), ((PyObject *)__pyx_n_s__N), ((PyObject *)__pyx_n_s__K), ((PyObject *)__pyx_n_s__ngroups), ((PyObject *)__pyx_n_s__b), ((PyObject *)__pyx_n_s__val), ((PyObject *)__pyx_n_s__count), ((PyObject *)__pyx_n_s__prodx), ((PyObject *)__pyx_n_s__nobs)); if (unlikely(!__pyx_k_tuple_705)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5820; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_705); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_705)); __pyx_k_codeobj_706 = (PyObject*)__Pyx_PyCode_New(4, 0, 14, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_705, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_314, __pyx_n_s_707, 5820, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_706)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5820; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":5877 * @cython.wraparound(False) * @cython.boundscheck(False) * def group_var_float64(ndarray[float64_t, ndim=2] out, # <<<<<<<<<<<<<< * ndarray[int64_t] counts, * ndarray[float64_t, ndim=2] values, */ __pyx_k_tuple_708 = PyTuple_Pack(14, ((PyObject *)__pyx_n_s__out), ((PyObject *)__pyx_n_s__counts), ((PyObject *)__pyx_n_s__values), ((PyObject *)__pyx_n_s__labels), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__j), ((PyObject *)__pyx_n_s__N), ((PyObject *)__pyx_n_s__K), ((PyObject *)__pyx_n_s__lab), ((PyObject *)__pyx_n_s__val), ((PyObject *)__pyx_n_s__ct), ((PyObject *)__pyx_n_s__nobs), ((PyObject *)__pyx_n_s__sumx), ((PyObject *)__pyx_n_s__sumxx)); if (unlikely(!__pyx_k_tuple_708)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5877; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_708); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_708)); __pyx_k_codeobj_709 = (PyObject*)__Pyx_PyCode_New(4, 0, 14, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_708, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_314, __pyx_n_s__group_var_float64, 5877, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_709)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5877; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":5938 * @cython.wraparound(False) * @cython.boundscheck(False) * def group_var_float32(ndarray[float32_t, ndim=2] out, # <<<<<<<<<<<<<< * ndarray[int64_t] counts, * ndarray[float32_t, ndim=2] values, */ __pyx_k_tuple_710 = PyTuple_Pack(14, ((PyObject *)__pyx_n_s__out), ((PyObject *)__pyx_n_s__counts), ((PyObject *)__pyx_n_s__values), ((PyObject *)__pyx_n_s__labels), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__j), ((PyObject *)__pyx_n_s__N), ((PyObject *)__pyx_n_s__K), ((PyObject *)__pyx_n_s__lab), ((PyObject *)__pyx_n_s__val), ((PyObject *)__pyx_n_s__ct), ((PyObject *)__pyx_n_s__nobs), ((PyObject *)__pyx_n_s__sumx), ((PyObject *)__pyx_n_s__sumxx)); if (unlikely(!__pyx_k_tuple_710)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5938; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_710); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_710)); __pyx_k_codeobj_711 = (PyObject*)__Pyx_PyCode_New(4, 0, 14, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_710, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_314, __pyx_n_s__group_var_float32, 5938, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_711)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5938; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":6000 * @cython.wraparound(False) * @cython.boundscheck(False) * def group_var_bin_float64(ndarray[float64_t, ndim=2] out, # <<<<<<<<<<<<<< * ndarray[int64_t] counts, * ndarray[float64_t, ndim=2] values, */ __pyx_k_tuple_712 = PyTuple_Pack(15, ((PyObject *)__pyx_n_s__out), ((PyObject *)__pyx_n_s__counts), ((PyObject *)__pyx_n_s__values), ((PyObject *)__pyx_n_s__bins), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__j), ((PyObject *)__pyx_n_s__N), ((PyObject *)__pyx_n_s__K), ((PyObject *)__pyx_n_s__ngroups), ((PyObject *)__pyx_n_s__b), ((PyObject *)__pyx_n_s__val), ((PyObject *)__pyx_n_s__ct), ((PyObject *)__pyx_n_s__nobs), ((PyObject *)__pyx_n_s__sumx), ((PyObject *)__pyx_n_s__sumxx)); if (unlikely(!__pyx_k_tuple_712)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6000; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_712); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_712)); __pyx_k_codeobj_713 = (PyObject*)__Pyx_PyCode_New(4, 0, 15, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_712, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_314, __pyx_n_s_714, 6000, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_713)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6000; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":6061 * @cython.wraparound(False) * @cython.boundscheck(False) * def group_var_bin_float32(ndarray[float32_t, ndim=2] out, # <<<<<<<<<<<<<< * ndarray[int64_t] counts, * ndarray[float32_t, ndim=2] values, */ __pyx_k_tuple_715 = PyTuple_Pack(15, ((PyObject *)__pyx_n_s__out), ((PyObject *)__pyx_n_s__counts), ((PyObject *)__pyx_n_s__values), ((PyObject *)__pyx_n_s__bins), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__j), ((PyObject *)__pyx_n_s__N), ((PyObject *)__pyx_n_s__K), ((PyObject *)__pyx_n_s__ngroups), ((PyObject *)__pyx_n_s__b), ((PyObject *)__pyx_n_s__val), ((PyObject *)__pyx_n_s__ct), ((PyObject *)__pyx_n_s__nobs), ((PyObject *)__pyx_n_s__sumx), ((PyObject *)__pyx_n_s__sumxx)); if (unlikely(!__pyx_k_tuple_715)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6061; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_715); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_715)); __pyx_k_codeobj_716 = (PyObject*)__Pyx_PyCode_New(4, 0, 15, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_715, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_314, __pyx_n_s_717, 6061, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_716)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6061; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":6123 * @cython.wraparound(False) * @cython.boundscheck(False) * def group_mean_float64(ndarray[float64_t, ndim=2] out, # <<<<<<<<<<<<<< * ndarray[int64_t] counts, * ndarray[float64_t, ndim=2] values, */ __pyx_k_tuple_718 = PyTuple_Pack(13, ((PyObject *)__pyx_n_s__out), ((PyObject *)__pyx_n_s__counts), ((PyObject *)__pyx_n_s__values), ((PyObject *)__pyx_n_s__labels), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__j), ((PyObject *)__pyx_n_s__N), ((PyObject *)__pyx_n_s__K), ((PyObject *)__pyx_n_s__lab), ((PyObject *)__pyx_n_s__val), ((PyObject *)__pyx_n_s__count), ((PyObject *)__pyx_n_s__sumx), ((PyObject *)__pyx_n_s__nobs)); if (unlikely(!__pyx_k_tuple_718)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6123; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_718); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_718)); __pyx_k_codeobj_719 = (PyObject*)__Pyx_PyCode_New(4, 0, 13, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_718, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_314, __pyx_n_s__group_mean_float64, 6123, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_719)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6123; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":6175 * @cython.wraparound(False) * @cython.boundscheck(False) * def group_mean_float32(ndarray[float32_t, ndim=2] out, # <<<<<<<<<<<<<< * ndarray[int64_t] counts, * ndarray[float32_t, ndim=2] values, */ __pyx_k_tuple_720 = PyTuple_Pack(13, ((PyObject *)__pyx_n_s__out), ((PyObject *)__pyx_n_s__counts), ((PyObject *)__pyx_n_s__values), ((PyObject *)__pyx_n_s__labels), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__j), ((PyObject *)__pyx_n_s__N), ((PyObject *)__pyx_n_s__K), ((PyObject *)__pyx_n_s__lab), ((PyObject *)__pyx_n_s__val), ((PyObject *)__pyx_n_s__count), ((PyObject *)__pyx_n_s__sumx), ((PyObject *)__pyx_n_s__nobs)); if (unlikely(!__pyx_k_tuple_720)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6175; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_720); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_720)); __pyx_k_codeobj_721 = (PyObject*)__Pyx_PyCode_New(4, 0, 13, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_720, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_314, __pyx_n_s__group_mean_float32, 6175, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_721)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6175; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":6227 * * * def group_mean_bin_float64(ndarray[float64_t, ndim=2] out, # <<<<<<<<<<<<<< * ndarray[int64_t] counts, * ndarray[float64_t, ndim=2] values, */ __pyx_k_tuple_722 = PyTuple_Pack(14, ((PyObject *)__pyx_n_s__out), ((PyObject *)__pyx_n_s__counts), ((PyObject *)__pyx_n_s__values), ((PyObject *)__pyx_n_s__bins), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__j), ((PyObject *)__pyx_n_s__N), ((PyObject *)__pyx_n_s__K), ((PyObject *)__pyx_n_s__ngroups), ((PyObject *)__pyx_n_s__b), ((PyObject *)__pyx_n_s__val), ((PyObject *)__pyx_n_s__count), ((PyObject *)__pyx_n_s__sumx), ((PyObject *)__pyx_n_s__nobs)); if (unlikely(!__pyx_k_tuple_722)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6227; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_722); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_722)); __pyx_k_codeobj_723 = (PyObject*)__Pyx_PyCode_New(4, 0, 14, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_722, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_314, __pyx_n_s_724, 6227, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_723)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6227; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":6280 * out[i, j] = sumx[i, j] / count * * def group_mean_bin_float32(ndarray[float32_t, ndim=2] out, # <<<<<<<<<<<<<< * ndarray[int64_t] counts, * ndarray[float32_t, ndim=2] values, */ __pyx_k_tuple_725 = PyTuple_Pack(14, ((PyObject *)__pyx_n_s__out), ((PyObject *)__pyx_n_s__counts), ((PyObject *)__pyx_n_s__values), ((PyObject *)__pyx_n_s__bins), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__j), ((PyObject *)__pyx_n_s__N), ((PyObject *)__pyx_n_s__K), ((PyObject *)__pyx_n_s__ngroups), ((PyObject *)__pyx_n_s__b), ((PyObject *)__pyx_n_s__val), ((PyObject *)__pyx_n_s__count), ((PyObject *)__pyx_n_s__sumx), ((PyObject *)__pyx_n_s__nobs)); if (unlikely(!__pyx_k_tuple_725)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6280; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_725); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_725)); __pyx_k_codeobj_726 = (PyObject*)__Pyx_PyCode_New(4, 0, 14, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_725, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_314, __pyx_n_s_727, 6280, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_726)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6280; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":6335 * @cython.wraparound(False) * @cython.boundscheck(False) * def group_min_float64(ndarray[float64_t, ndim=2] out, # <<<<<<<<<<<<<< * ndarray[int64_t] counts, * ndarray[float64_t, ndim=2] values, */ __pyx_k_tuple_728 = PyTuple_Pack(13, ((PyObject *)__pyx_n_s__out), ((PyObject *)__pyx_n_s__counts), ((PyObject *)__pyx_n_s__values), ((PyObject *)__pyx_n_s__labels), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__j), ((PyObject *)__pyx_n_s__N), ((PyObject *)__pyx_n_s__K), ((PyObject *)__pyx_n_s__lab), ((PyObject *)__pyx_n_s__val), ((PyObject *)__pyx_n_s__count), ((PyObject *)__pyx_n_s__minx), ((PyObject *)__pyx_n_s__nobs)); if (unlikely(!__pyx_k_tuple_728)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6335; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_728); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_728)); __pyx_k_codeobj_729 = (PyObject*)__Pyx_PyCode_New(4, 0, 13, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_728, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_314, __pyx_n_s__group_min_float64, 6335, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_729)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6335; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":6395 * @cython.wraparound(False) * @cython.boundscheck(False) * def group_min_float32(ndarray[float32_t, ndim=2] out, # <<<<<<<<<<<<<< * ndarray[int64_t] counts, * ndarray[float32_t, ndim=2] values, */ __pyx_k_tuple_730 = PyTuple_Pack(13, ((PyObject *)__pyx_n_s__out), ((PyObject *)__pyx_n_s__counts), ((PyObject *)__pyx_n_s__values), ((PyObject *)__pyx_n_s__labels), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__j), ((PyObject *)__pyx_n_s__N), ((PyObject *)__pyx_n_s__K), ((PyObject *)__pyx_n_s__lab), ((PyObject *)__pyx_n_s__val), ((PyObject *)__pyx_n_s__count), ((PyObject *)__pyx_n_s__minx), ((PyObject *)__pyx_n_s__nobs)); if (unlikely(!__pyx_k_tuple_730)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6395; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_730); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_730)); __pyx_k_codeobj_731 = (PyObject*)__Pyx_PyCode_New(4, 0, 13, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_730, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_314, __pyx_n_s__group_min_float32, 6395, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_731)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6395; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":6456 * @cython.wraparound(False) * @cython.boundscheck(False) * def group_min_bin_float64(ndarray[float64_t, ndim=2] out, # <<<<<<<<<<<<<< * ndarray[int64_t] counts, * ndarray[float64_t, ndim=2] values, */ __pyx_k_tuple_732 = PyTuple_Pack(14, ((PyObject *)__pyx_n_s__out), ((PyObject *)__pyx_n_s__counts), ((PyObject *)__pyx_n_s__values), ((PyObject *)__pyx_n_s__bins), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__j), ((PyObject *)__pyx_n_s__N), ((PyObject *)__pyx_n_s__K), ((PyObject *)__pyx_n_s__ngroups), ((PyObject *)__pyx_n_s__b), ((PyObject *)__pyx_n_s__val), ((PyObject *)__pyx_n_s__count), ((PyObject *)__pyx_n_s__minx), ((PyObject *)__pyx_n_s__nobs)); if (unlikely(!__pyx_k_tuple_732)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6456; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_732); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_732)); __pyx_k_codeobj_733 = (PyObject*)__Pyx_PyCode_New(4, 0, 14, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_732, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_314, __pyx_n_s_734, 6456, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_733)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6456; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":6517 * @cython.wraparound(False) * @cython.boundscheck(False) * def group_min_bin_float32(ndarray[float32_t, ndim=2] out, # <<<<<<<<<<<<<< * ndarray[int64_t] counts, * ndarray[float32_t, ndim=2] values, */ __pyx_k_tuple_735 = PyTuple_Pack(14, ((PyObject *)__pyx_n_s__out), ((PyObject *)__pyx_n_s__counts), ((PyObject *)__pyx_n_s__values), ((PyObject *)__pyx_n_s__bins), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__j), ((PyObject *)__pyx_n_s__N), ((PyObject *)__pyx_n_s__K), ((PyObject *)__pyx_n_s__ngroups), ((PyObject *)__pyx_n_s__b), ((PyObject *)__pyx_n_s__val), ((PyObject *)__pyx_n_s__count), ((PyObject *)__pyx_n_s__minx), ((PyObject *)__pyx_n_s__nobs)); if (unlikely(!__pyx_k_tuple_735)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6517; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_735); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_735)); __pyx_k_codeobj_736 = (PyObject*)__Pyx_PyCode_New(4, 0, 14, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_735, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_314, __pyx_n_s_737, 6517, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_736)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6517; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":6579 * @cython.wraparound(False) * @cython.boundscheck(False) * def group_max_float64(ndarray[float64_t, ndim=2] out, # <<<<<<<<<<<<<< * ndarray[int64_t] counts, * ndarray[float64_t, ndim=2] values, */ __pyx_k_tuple_738 = PyTuple_Pack(13, ((PyObject *)__pyx_n_s__out), ((PyObject *)__pyx_n_s__counts), ((PyObject *)__pyx_n_s__values), ((PyObject *)__pyx_n_s__labels), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__j), ((PyObject *)__pyx_n_s__N), ((PyObject *)__pyx_n_s__K), ((PyObject *)__pyx_n_s__lab), ((PyObject *)__pyx_n_s__val), ((PyObject *)__pyx_n_s__count), ((PyObject *)__pyx_n_s__maxx), ((PyObject *)__pyx_n_s__nobs)); if (unlikely(!__pyx_k_tuple_738)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6579; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_738); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_738)); __pyx_k_codeobj_739 = (PyObject*)__Pyx_PyCode_New(4, 0, 13, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_738, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_314, __pyx_n_s__group_max_float64, 6579, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_739)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6579; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":6639 * @cython.wraparound(False) * @cython.boundscheck(False) * def group_max_float32(ndarray[float32_t, ndim=2] out, # <<<<<<<<<<<<<< * ndarray[int64_t] counts, * ndarray[float32_t, ndim=2] values, */ __pyx_k_tuple_740 = PyTuple_Pack(13, ((PyObject *)__pyx_n_s__out), ((PyObject *)__pyx_n_s__counts), ((PyObject *)__pyx_n_s__values), ((PyObject *)__pyx_n_s__labels), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__j), ((PyObject *)__pyx_n_s__N), ((PyObject *)__pyx_n_s__K), ((PyObject *)__pyx_n_s__lab), ((PyObject *)__pyx_n_s__val), ((PyObject *)__pyx_n_s__count), ((PyObject *)__pyx_n_s__maxx), ((PyObject *)__pyx_n_s__nobs)); if (unlikely(!__pyx_k_tuple_740)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6639; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_740); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_740)); __pyx_k_codeobj_741 = (PyObject*)__Pyx_PyCode_New(4, 0, 13, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_740, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_314, __pyx_n_s__group_max_float32, 6639, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_741)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6639; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":6700 * @cython.wraparound(False) * @cython.boundscheck(False) * def group_max_bin_float64(ndarray[float64_t, ndim=2] out, # <<<<<<<<<<<<<< * ndarray[int64_t] counts, * ndarray[float64_t, ndim=2] values, */ __pyx_k_tuple_742 = PyTuple_Pack(14, ((PyObject *)__pyx_n_s__out), ((PyObject *)__pyx_n_s__counts), ((PyObject *)__pyx_n_s__values), ((PyObject *)__pyx_n_s__bins), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__j), ((PyObject *)__pyx_n_s__N), ((PyObject *)__pyx_n_s__K), ((PyObject *)__pyx_n_s__ngroups), ((PyObject *)__pyx_n_s__b), ((PyObject *)__pyx_n_s__val), ((PyObject *)__pyx_n_s__count), ((PyObject *)__pyx_n_s__maxx), ((PyObject *)__pyx_n_s__nobs)); if (unlikely(!__pyx_k_tuple_742)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6700; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_742); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_742)); __pyx_k_codeobj_743 = (PyObject*)__Pyx_PyCode_New(4, 0, 14, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_742, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_314, __pyx_n_s_744, 6700, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_743)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6700; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":6760 * @cython.wraparound(False) * @cython.boundscheck(False) * def group_max_bin_float32(ndarray[float32_t, ndim=2] out, # <<<<<<<<<<<<<< * ndarray[int64_t] counts, * ndarray[float32_t, ndim=2] values, */ __pyx_k_tuple_745 = PyTuple_Pack(14, ((PyObject *)__pyx_n_s__out), ((PyObject *)__pyx_n_s__counts), ((PyObject *)__pyx_n_s__values), ((PyObject *)__pyx_n_s__bins), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__j), ((PyObject *)__pyx_n_s__N), ((PyObject *)__pyx_n_s__K), ((PyObject *)__pyx_n_s__ngroups), ((PyObject *)__pyx_n_s__b), ((PyObject *)__pyx_n_s__val), ((PyObject *)__pyx_n_s__count), ((PyObject *)__pyx_n_s__maxx), ((PyObject *)__pyx_n_s__nobs)); if (unlikely(!__pyx_k_tuple_745)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6760; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_745); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_745)); __pyx_k_codeobj_746 = (PyObject*)__Pyx_PyCode_New(4, 0, 14, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_745, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_314, __pyx_n_s_747, 6760, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_746)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6760; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":6821 * @cython.wraparound(False) * @cython.boundscheck(False) * def group_ohlc_float64(ndarray[float64_t, ndim=2] out, # <<<<<<<<<<<<<< * ndarray[int64_t] counts, * ndarray[float64_t, ndim=2] values, */ __pyx_k_tuple_748 = PyTuple_Pack(18, ((PyObject *)__pyx_n_s__out), ((PyObject *)__pyx_n_s__counts), ((PyObject *)__pyx_n_s__values), ((PyObject *)__pyx_n_s__bins), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__j), ((PyObject *)__pyx_n_s__N), ((PyObject *)__pyx_n_s__K), ((PyObject *)__pyx_n_s__ngroups), ((PyObject *)__pyx_n_s__b), ((PyObject *)__pyx_n_s__val), ((PyObject *)__pyx_n_s__count), ((PyObject *)__pyx_n_s__vopen), ((PyObject *)__pyx_n_s__vhigh), ((PyObject *)__pyx_n_s__vlow), ((PyObject *)__pyx_n_s__vclose), ((PyObject *)__pyx_n_s__NA), ((PyObject *)__pyx_n_s__got_first)); if (unlikely(!__pyx_k_tuple_748)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6821; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_748); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_748)); __pyx_k_codeobj_749 = (PyObject*)__Pyx_PyCode_New(4, 0, 18, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_748, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_314, __pyx_n_s__group_ohlc_float64, 6821, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_749)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6821; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":6894 * @cython.wraparound(False) * @cython.boundscheck(False) * def group_ohlc_float32(ndarray[float32_t, ndim=2] out, # <<<<<<<<<<<<<< * ndarray[int64_t] counts, * ndarray[float32_t, ndim=2] values, */ __pyx_k_tuple_750 = PyTuple_Pack(18, ((PyObject *)__pyx_n_s__out), ((PyObject *)__pyx_n_s__counts), ((PyObject *)__pyx_n_s__values), ((PyObject *)__pyx_n_s__bins), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__j), ((PyObject *)__pyx_n_s__N), ((PyObject *)__pyx_n_s__K), ((PyObject *)__pyx_n_s__ngroups), ((PyObject *)__pyx_n_s__b), ((PyObject *)__pyx_n_s__val), ((PyObject *)__pyx_n_s__count), ((PyObject *)__pyx_n_s__vopen), ((PyObject *)__pyx_n_s__vhigh), ((PyObject *)__pyx_n_s__vlow), ((PyObject *)__pyx_n_s__vclose), ((PyObject *)__pyx_n_s__NA), ((PyObject *)__pyx_n_s__got_first)); if (unlikely(!__pyx_k_tuple_750)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6894; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_750); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_750)); __pyx_k_codeobj_751 = (PyObject*)__Pyx_PyCode_New(4, 0, 18, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_750, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_314, __pyx_n_s__group_ohlc_float32, 6894, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_751)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6894; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":6968 * @cython.wraparound(False) * @cython.boundscheck(False) * def left_join_indexer_unique_float64(ndarray[float64_t] left, # <<<<<<<<<<<<<< * ndarray[float64_t] right): * cdef: */ __pyx_k_tuple_752 = PyTuple_Pack(9, ((PyObject *)__pyx_n_s__left), ((PyObject *)__pyx_n_s__right), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__j), ((PyObject *)__pyx_n_s__nleft), ((PyObject *)__pyx_n_s__nright), ((PyObject *)__pyx_n_s__indexer), ((PyObject *)__pyx_n_s__lval), ((PyObject *)__pyx_n_s__rval)); if (unlikely(!__pyx_k_tuple_752)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6968; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_752); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_752)); __pyx_k_codeobj_753 = (PyObject*)__Pyx_PyCode_New(2, 0, 9, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_752, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_314, __pyx_n_s_754, 6968, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_753)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6968; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":7013 * @cython.wraparound(False) * @cython.boundscheck(False) * def left_join_indexer_unique_float32(ndarray[float32_t] left, # <<<<<<<<<<<<<< * ndarray[float32_t] right): * cdef: */ __pyx_k_tuple_755 = PyTuple_Pack(9, ((PyObject *)__pyx_n_s__left), ((PyObject *)__pyx_n_s__right), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__j), ((PyObject *)__pyx_n_s__nleft), ((PyObject *)__pyx_n_s__nright), ((PyObject *)__pyx_n_s__indexer), ((PyObject *)__pyx_n_s__lval), ((PyObject *)__pyx_n_s__rval)); if (unlikely(!__pyx_k_tuple_755)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7013; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_755); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_755)); __pyx_k_codeobj_756 = (PyObject*)__Pyx_PyCode_New(2, 0, 9, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_755, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_314, __pyx_n_s_757, 7013, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_756)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7013; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":7058 * @cython.wraparound(False) * @cython.boundscheck(False) * def left_join_indexer_unique_object(ndarray[object] left, # <<<<<<<<<<<<<< * ndarray[object] right): * cdef: */ __pyx_k_tuple_758 = PyTuple_Pack(9, ((PyObject *)__pyx_n_s__left), ((PyObject *)__pyx_n_s__right), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__j), ((PyObject *)__pyx_n_s__nleft), ((PyObject *)__pyx_n_s__nright), ((PyObject *)__pyx_n_s__indexer), ((PyObject *)__pyx_n_s__lval), ((PyObject *)__pyx_n_s__rval)); if (unlikely(!__pyx_k_tuple_758)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7058; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_758); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_758)); __pyx_k_codeobj_759 = (PyObject*)__Pyx_PyCode_New(2, 0, 9, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_758, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_314, __pyx_n_s_760, 7058, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_759)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7058; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":7103 * @cython.wraparound(False) * @cython.boundscheck(False) * def left_join_indexer_unique_int32(ndarray[int32_t] left, # <<<<<<<<<<<<<< * ndarray[int32_t] right): * cdef: */ __pyx_k_tuple_761 = PyTuple_Pack(9, ((PyObject *)__pyx_n_s__left), ((PyObject *)__pyx_n_s__right), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__j), ((PyObject *)__pyx_n_s__nleft), ((PyObject *)__pyx_n_s__nright), ((PyObject *)__pyx_n_s__indexer), ((PyObject *)__pyx_n_s__lval), ((PyObject *)__pyx_n_s__rval)); if (unlikely(!__pyx_k_tuple_761)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7103; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_761); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_761)); __pyx_k_codeobj_762 = (PyObject*)__Pyx_PyCode_New(2, 0, 9, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_761, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_314, __pyx_n_s_763, 7103, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_762)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7103; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":7148 * @cython.wraparound(False) * @cython.boundscheck(False) * def left_join_indexer_unique_int64(ndarray[int64_t] left, # <<<<<<<<<<<<<< * ndarray[int64_t] right): * cdef: */ __pyx_k_tuple_764 = PyTuple_Pack(9, ((PyObject *)__pyx_n_s__left), ((PyObject *)__pyx_n_s__right), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__j), ((PyObject *)__pyx_n_s__nleft), ((PyObject *)__pyx_n_s__nright), ((PyObject *)__pyx_n_s__indexer), ((PyObject *)__pyx_n_s__lval), ((PyObject *)__pyx_n_s__rval)); if (unlikely(!__pyx_k_tuple_764)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7148; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_764); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_764)); __pyx_k_codeobj_765 = (PyObject*)__Pyx_PyCode_New(2, 0, 9, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_764, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_314, __pyx_n_s_766, 7148, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_765)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7148; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":7193 * * * def left_join_indexer_float64(ndarray[float64_t] left, # <<<<<<<<<<<<<< * ndarray[float64_t] right): * ''' */ __pyx_k_tuple_767 = PyTuple_Pack(13, ((PyObject *)__pyx_n_s__left), ((PyObject *)__pyx_n_s__right), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__j), ((PyObject *)__pyx_n_s__k), ((PyObject *)__pyx_n_s__nright), ((PyObject *)__pyx_n_s__nleft), ((PyObject *)__pyx_n_s__count), ((PyObject *)__pyx_n_s__lval), ((PyObject *)__pyx_n_s__rval), ((PyObject *)__pyx_n_s__lindexer), ((PyObject *)__pyx_n_s__rindexer), ((PyObject *)__pyx_n_s__result)); if (unlikely(!__pyx_k_tuple_767)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7193; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_767); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_767)); __pyx_k_codeobj_768 = (PyObject*)__Pyx_PyCode_New(2, 0, 13, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_767, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_314, __pyx_n_s_769, 7193, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_768)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7193; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":7295 * * * def left_join_indexer_float32(ndarray[float32_t] left, # <<<<<<<<<<<<<< * ndarray[float32_t] right): * ''' */ __pyx_k_tuple_770 = PyTuple_Pack(13, ((PyObject *)__pyx_n_s__left), ((PyObject *)__pyx_n_s__right), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__j), ((PyObject *)__pyx_n_s__k), ((PyObject *)__pyx_n_s__nright), ((PyObject *)__pyx_n_s__nleft), ((PyObject *)__pyx_n_s__count), ((PyObject *)__pyx_n_s__lval), ((PyObject *)__pyx_n_s__rval), ((PyObject *)__pyx_n_s__lindexer), ((PyObject *)__pyx_n_s__rindexer), ((PyObject *)__pyx_n_s__result)); if (unlikely(!__pyx_k_tuple_770)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7295; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_770); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_770)); __pyx_k_codeobj_771 = (PyObject*)__Pyx_PyCode_New(2, 0, 13, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_770, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_314, __pyx_n_s_772, 7295, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_771)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7295; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":7397 * * * def left_join_indexer_object(ndarray[object] left, # <<<<<<<<<<<<<< * ndarray[object] right): * ''' */ __pyx_k_tuple_773 = PyTuple_Pack(13, ((PyObject *)__pyx_n_s__left), ((PyObject *)__pyx_n_s__right), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__j), ((PyObject *)__pyx_n_s__k), ((PyObject *)__pyx_n_s__nright), ((PyObject *)__pyx_n_s__nleft), ((PyObject *)__pyx_n_s__count), ((PyObject *)__pyx_n_s__lval), ((PyObject *)__pyx_n_s__rval), ((PyObject *)__pyx_n_s__lindexer), ((PyObject *)__pyx_n_s__rindexer), ((PyObject *)__pyx_n_s__result)); if (unlikely(!__pyx_k_tuple_773)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7397; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_773); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_773)); __pyx_k_codeobj_774 = (PyObject*)__Pyx_PyCode_New(2, 0, 13, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_773, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_314, __pyx_n_s_775, 7397, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_774)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7397; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":7499 * * * def left_join_indexer_int32(ndarray[int32_t] left, # <<<<<<<<<<<<<< * ndarray[int32_t] right): * ''' */ __pyx_k_tuple_776 = PyTuple_Pack(13, ((PyObject *)__pyx_n_s__left), ((PyObject *)__pyx_n_s__right), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__j), ((PyObject *)__pyx_n_s__k), ((PyObject *)__pyx_n_s__nright), ((PyObject *)__pyx_n_s__nleft), ((PyObject *)__pyx_n_s__count), ((PyObject *)__pyx_n_s__lval), ((PyObject *)__pyx_n_s__rval), ((PyObject *)__pyx_n_s__lindexer), ((PyObject *)__pyx_n_s__rindexer), ((PyObject *)__pyx_n_s__result)); if (unlikely(!__pyx_k_tuple_776)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7499; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_776); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_776)); __pyx_k_codeobj_777 = (PyObject*)__Pyx_PyCode_New(2, 0, 13, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_776, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_314, __pyx_n_s_778, 7499, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_777)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7499; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":7601 * * * def left_join_indexer_int64(ndarray[int64_t] left, # <<<<<<<<<<<<<< * ndarray[int64_t] right): * ''' */ __pyx_k_tuple_779 = PyTuple_Pack(13, ((PyObject *)__pyx_n_s__left), ((PyObject *)__pyx_n_s__right), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__j), ((PyObject *)__pyx_n_s__k), ((PyObject *)__pyx_n_s__nright), ((PyObject *)__pyx_n_s__nleft), ((PyObject *)__pyx_n_s__count), ((PyObject *)__pyx_n_s__lval), ((PyObject *)__pyx_n_s__rval), ((PyObject *)__pyx_n_s__lindexer), ((PyObject *)__pyx_n_s__rindexer), ((PyObject *)__pyx_n_s__result)); if (unlikely(!__pyx_k_tuple_779)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7601; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_779); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_779)); __pyx_k_codeobj_780 = (PyObject*)__Pyx_PyCode_New(2, 0, 13, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_779, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_314, __pyx_n_s_781, 7601, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_780)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7601; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":7705 * @cython.wraparound(False) * @cython.boundscheck(False) * def outer_join_indexer_float64(ndarray[float64_t] left, # <<<<<<<<<<<<<< * ndarray[float64_t] right): * cdef: */ __pyx_k_tuple_782 = PyTuple_Pack(12, ((PyObject *)__pyx_n_s__left), ((PyObject *)__pyx_n_s__right), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__j), ((PyObject *)__pyx_n_s__nright), ((PyObject *)__pyx_n_s__nleft), ((PyObject *)__pyx_n_s__count), ((PyObject *)__pyx_n_s__lval), ((PyObject *)__pyx_n_s__rval), ((PyObject *)__pyx_n_s__lindexer), ((PyObject *)__pyx_n_s__rindexer), ((PyObject *)__pyx_n_s__result)); if (unlikely(!__pyx_k_tuple_782)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7705; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_782); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_782)); __pyx_k_codeobj_783 = (PyObject*)__Pyx_PyCode_New(2, 0, 12, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_782, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_314, __pyx_n_s_784, 7705, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_783)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7705; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":7834 * @cython.wraparound(False) * @cython.boundscheck(False) * def outer_join_indexer_float32(ndarray[float32_t] left, # <<<<<<<<<<<<<< * ndarray[float32_t] right): * cdef: */ __pyx_k_tuple_785 = PyTuple_Pack(12, ((PyObject *)__pyx_n_s__left), ((PyObject *)__pyx_n_s__right), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__j), ((PyObject *)__pyx_n_s__nright), ((PyObject *)__pyx_n_s__nleft), ((PyObject *)__pyx_n_s__count), ((PyObject *)__pyx_n_s__lval), ((PyObject *)__pyx_n_s__rval), ((PyObject *)__pyx_n_s__lindexer), ((PyObject *)__pyx_n_s__rindexer), ((PyObject *)__pyx_n_s__result)); if (unlikely(!__pyx_k_tuple_785)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7834; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_785); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_785)); __pyx_k_codeobj_786 = (PyObject*)__Pyx_PyCode_New(2, 0, 12, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_785, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_314, __pyx_n_s_787, 7834, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_786)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7834; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":7963 * @cython.wraparound(False) * @cython.boundscheck(False) * def outer_join_indexer_object(ndarray[object] left, # <<<<<<<<<<<<<< * ndarray[object] right): * cdef: */ __pyx_k_tuple_788 = PyTuple_Pack(12, ((PyObject *)__pyx_n_s__left), ((PyObject *)__pyx_n_s__right), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__j), ((PyObject *)__pyx_n_s__nright), ((PyObject *)__pyx_n_s__nleft), ((PyObject *)__pyx_n_s__count), ((PyObject *)__pyx_n_s__lval), ((PyObject *)__pyx_n_s__rval), ((PyObject *)__pyx_n_s__lindexer), ((PyObject *)__pyx_n_s__rindexer), ((PyObject *)__pyx_n_s__result)); if (unlikely(!__pyx_k_tuple_788)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7963; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_788); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_788)); __pyx_k_codeobj_789 = (PyObject*)__Pyx_PyCode_New(2, 0, 12, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_788, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_314, __pyx_n_s_790, 7963, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_789)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7963; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":8092 * @cython.wraparound(False) * @cython.boundscheck(False) * def outer_join_indexer_int32(ndarray[int32_t] left, # <<<<<<<<<<<<<< * ndarray[int32_t] right): * cdef: */ __pyx_k_tuple_791 = PyTuple_Pack(12, ((PyObject *)__pyx_n_s__left), ((PyObject *)__pyx_n_s__right), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__j), ((PyObject *)__pyx_n_s__nright), ((PyObject *)__pyx_n_s__nleft), ((PyObject *)__pyx_n_s__count), ((PyObject *)__pyx_n_s__lval), ((PyObject *)__pyx_n_s__rval), ((PyObject *)__pyx_n_s__lindexer), ((PyObject *)__pyx_n_s__rindexer), ((PyObject *)__pyx_n_s__result)); if (unlikely(!__pyx_k_tuple_791)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8092; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_791); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_791)); __pyx_k_codeobj_792 = (PyObject*)__Pyx_PyCode_New(2, 0, 12, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_791, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_314, __pyx_n_s_793, 8092, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_792)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8092; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":8221 * @cython.wraparound(False) * @cython.boundscheck(False) * def outer_join_indexer_int64(ndarray[int64_t] left, # <<<<<<<<<<<<<< * ndarray[int64_t] right): * cdef: */ __pyx_k_tuple_794 = PyTuple_Pack(12, ((PyObject *)__pyx_n_s__left), ((PyObject *)__pyx_n_s__right), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__j), ((PyObject *)__pyx_n_s__nright), ((PyObject *)__pyx_n_s__nleft), ((PyObject *)__pyx_n_s__count), ((PyObject *)__pyx_n_s__lval), ((PyObject *)__pyx_n_s__rval), ((PyObject *)__pyx_n_s__lindexer), ((PyObject *)__pyx_n_s__rindexer), ((PyObject *)__pyx_n_s__result)); if (unlikely(!__pyx_k_tuple_794)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8221; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_794); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_794)); __pyx_k_codeobj_795 = (PyObject*)__Pyx_PyCode_New(2, 0, 12, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_794, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_314, __pyx_n_s_796, 8221, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_795)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8221; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":8351 * @cython.wraparound(False) * @cython.boundscheck(False) * def inner_join_indexer_float64(ndarray[float64_t] left, # <<<<<<<<<<<<<< * ndarray[float64_t] right): * ''' */ __pyx_k_tuple_797 = PyTuple_Pack(13, ((PyObject *)__pyx_n_s__left), ((PyObject *)__pyx_n_s__right), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__j), ((PyObject *)__pyx_n_s__k), ((PyObject *)__pyx_n_s__nright), ((PyObject *)__pyx_n_s__nleft), ((PyObject *)__pyx_n_s__count), ((PyObject *)__pyx_n_s__lval), ((PyObject *)__pyx_n_s__rval), ((PyObject *)__pyx_n_s__lindexer), ((PyObject *)__pyx_n_s__rindexer), ((PyObject *)__pyx_n_s__result)); if (unlikely(!__pyx_k_tuple_797)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8351; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_797); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_797)); __pyx_k_codeobj_798 = (PyObject*)__Pyx_PyCode_New(2, 0, 13, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_797, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_314, __pyx_n_s_799, 8351, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_798)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8351; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":8444 * @cython.wraparound(False) * @cython.boundscheck(False) * def inner_join_indexer_float32(ndarray[float32_t] left, # <<<<<<<<<<<<<< * ndarray[float32_t] right): * ''' */ __pyx_k_tuple_800 = PyTuple_Pack(13, ((PyObject *)__pyx_n_s__left), ((PyObject *)__pyx_n_s__right), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__j), ((PyObject *)__pyx_n_s__k), ((PyObject *)__pyx_n_s__nright), ((PyObject *)__pyx_n_s__nleft), ((PyObject *)__pyx_n_s__count), ((PyObject *)__pyx_n_s__lval), ((PyObject *)__pyx_n_s__rval), ((PyObject *)__pyx_n_s__lindexer), ((PyObject *)__pyx_n_s__rindexer), ((PyObject *)__pyx_n_s__result)); if (unlikely(!__pyx_k_tuple_800)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8444; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_800); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_800)); __pyx_k_codeobj_801 = (PyObject*)__Pyx_PyCode_New(2, 0, 13, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_800, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_314, __pyx_n_s_802, 8444, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_801)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8444; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":8537 * @cython.wraparound(False) * @cython.boundscheck(False) * def inner_join_indexer_object(ndarray[object] left, # <<<<<<<<<<<<<< * ndarray[object] right): * ''' */ __pyx_k_tuple_803 = PyTuple_Pack(13, ((PyObject *)__pyx_n_s__left), ((PyObject *)__pyx_n_s__right), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__j), ((PyObject *)__pyx_n_s__k), ((PyObject *)__pyx_n_s__nright), ((PyObject *)__pyx_n_s__nleft), ((PyObject *)__pyx_n_s__count), ((PyObject *)__pyx_n_s__lval), ((PyObject *)__pyx_n_s__rval), ((PyObject *)__pyx_n_s__lindexer), ((PyObject *)__pyx_n_s__rindexer), ((PyObject *)__pyx_n_s__result)); if (unlikely(!__pyx_k_tuple_803)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8537; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_803); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_803)); __pyx_k_codeobj_804 = (PyObject*)__Pyx_PyCode_New(2, 0, 13, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_803, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_314, __pyx_n_s_805, 8537, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_804)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8537; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":8630 * @cython.wraparound(False) * @cython.boundscheck(False) * def inner_join_indexer_int32(ndarray[int32_t] left, # <<<<<<<<<<<<<< * ndarray[int32_t] right): * ''' */ __pyx_k_tuple_806 = PyTuple_Pack(13, ((PyObject *)__pyx_n_s__left), ((PyObject *)__pyx_n_s__right), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__j), ((PyObject *)__pyx_n_s__k), ((PyObject *)__pyx_n_s__nright), ((PyObject *)__pyx_n_s__nleft), ((PyObject *)__pyx_n_s__count), ((PyObject *)__pyx_n_s__lval), ((PyObject *)__pyx_n_s__rval), ((PyObject *)__pyx_n_s__lindexer), ((PyObject *)__pyx_n_s__rindexer), ((PyObject *)__pyx_n_s__result)); if (unlikely(!__pyx_k_tuple_806)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8630; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_806); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_806)); __pyx_k_codeobj_807 = (PyObject*)__Pyx_PyCode_New(2, 0, 13, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_806, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_314, __pyx_n_s_808, 8630, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_807)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8630; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/src/generated.pyx":8723 * @cython.wraparound(False) * @cython.boundscheck(False) * def inner_join_indexer_int64(ndarray[int64_t] left, # <<<<<<<<<<<<<< * ndarray[int64_t] right): * ''' */ __pyx_k_tuple_809 = PyTuple_Pack(13, ((PyObject *)__pyx_n_s__left), ((PyObject *)__pyx_n_s__right), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__j), ((PyObject *)__pyx_n_s__k), ((PyObject *)__pyx_n_s__nright), ((PyObject *)__pyx_n_s__nleft), ((PyObject *)__pyx_n_s__count), ((PyObject *)__pyx_n_s__lval), ((PyObject *)__pyx_n_s__rval), ((PyObject *)__pyx_n_s__lindexer), ((PyObject *)__pyx_n_s__rindexer), ((PyObject *)__pyx_n_s__result)); if (unlikely(!__pyx_k_tuple_809)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8723; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_809); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_809)); __pyx_k_codeobj_810 = (PyObject*)__Pyx_PyCode_New(2, 0, 13, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_809, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_314, __pyx_n_s_811, 8723, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_810)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8723; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __pyx_int_0 = PyInt_FromLong(0); if (unlikely(!__pyx_int_0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __pyx_int_1 = PyInt_FromLong(1); if (unlikely(!__pyx_int_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __pyx_int_2 = PyInt_FromLong(2); if (unlikely(!__pyx_int_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __pyx_int_neg_1 = PyInt_FromLong(-1); if (unlikely(!__pyx_int_neg_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __pyx_int_15 = PyInt_FromLong(15); if (unlikely(!__pyx_int_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __pyx_int_100 = PyInt_FromLong(100); if (unlikely(!__pyx_int_100)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; return 0; __pyx_L1_error:; return -1; } #if PY_MAJOR_VERSION < 3 PyMODINIT_FUNC initalgos(void); /*proto*/ PyMODINIT_FUNC initalgos(void) #else PyMODINIT_FUNC PyInit_algos(void); /*proto*/ PyMODINIT_FUNC PyInit_algos(void) #endif { PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; __pyx_t_5numpy_int8_t __pyx_t_4; __pyx_t_5numpy_int16_t __pyx_t_5; __pyx_t_5numpy_int32_t __pyx_t_6; __pyx_t_5numpy_int64_t __pyx_t_7; __pyx_t_5numpy_float16_t __pyx_t_8; __pyx_t_5numpy_float32_t __pyx_t_9; __pyx_t_5numpy_float64_t __pyx_t_10; double __pyx_t_11; PyObject *__pyx_t_12 = NULL; int __pyx_t_13; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannyDeclarations #if CYTHON_REFNANNY __Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny"); if (!__Pyx_RefNanny) { PyErr_Clear(); __Pyx_RefNanny = __Pyx_RefNannyImportAPI("Cython.Runtime.refnanny"); if (!__Pyx_RefNanny) Py_FatalError("failed to import 'refnanny' module"); } #endif __Pyx_RefNannySetupContext("PyMODINIT_FUNC PyInit_algos(void)", 0); if ( __Pyx_check_binary_version() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_empty_tuple)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_bytes)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #ifdef __Pyx_CyFunction_USED if (__Pyx_CyFunction_init() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif #ifdef __Pyx_FusedFunction_USED if (__pyx_FusedFunction_init() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif #ifdef __Pyx_Generator_USED if (__pyx_Generator_init() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif /*--- Library function declarations ---*/ /*--- Threads initialization code ---*/ #if defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS #ifdef WITH_THREAD /* Python build with threading support? */ PyEval_InitThreads(); #endif #endif /*--- Module creation code ---*/ #if PY_MAJOR_VERSION < 3 __pyx_m = Py_InitModule4(__Pyx_NAMESTR("algos"), __pyx_methods, 0, 0, PYTHON_API_VERSION); Py_XINCREF(__pyx_m); #else __pyx_m = PyModule_Create(&__pyx_moduledef); #endif if (unlikely(!__pyx_m)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_d)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} Py_INCREF(__pyx_d); #if PY_MAJOR_VERSION >= 3 { PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (!PyDict_GetItemString(modules, "pandas.algos")) { if (unlikely(PyDict_SetItemString(modules, "pandas.algos", __pyx_m) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } } #endif __pyx_b = PyImport_AddModule(__Pyx_NAMESTR(__Pyx_BUILTIN_MODULE_NAME)); if (unlikely(!__pyx_b)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #if CYTHON_COMPILING_IN_PYPY Py_INCREF(__pyx_b); #endif if (__Pyx_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; /*--- Initialize various global constants etc. ---*/ if (unlikely(__Pyx_InitGlobals() < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif if (__pyx_module_is_main_pandas__algos) { if (__Pyx_SetAttrString(__pyx_m, "__name__", __pyx_n_s____main__) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; } /*--- Builtin init code ---*/ if (unlikely(__Pyx_InitCachedBuiltins() < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /*--- Constants init code ---*/ if (unlikely(__Pyx_InitCachedConstants() < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /*--- Global init code ---*/ /*--- Variable export code ---*/ /*--- Function export code ---*/ /*--- Type init code ---*/ __pyx_vtabptr_6pandas_5algos_IndexableSkiplist = &__pyx_vtable_6pandas_5algos_IndexableSkiplist; __pyx_vtable_6pandas_5algos_IndexableSkiplist.get = (PyObject *(*)(struct __pyx_obj_6pandas_5algos_IndexableSkiplist *, Py_ssize_t, int __pyx_skip_dispatch))__pyx_f_6pandas_5algos_17IndexableSkiplist_get; __pyx_vtable_6pandas_5algos_IndexableSkiplist.insert = (PyObject *(*)(struct __pyx_obj_6pandas_5algos_IndexableSkiplist *, double, int __pyx_skip_dispatch))__pyx_f_6pandas_5algos_17IndexableSkiplist_insert; __pyx_vtable_6pandas_5algos_IndexableSkiplist.remove = (PyObject *(*)(struct __pyx_obj_6pandas_5algos_IndexableSkiplist *, double, int __pyx_skip_dispatch))__pyx_f_6pandas_5algos_17IndexableSkiplist_remove; if (PyType_Ready(&__pyx_type_6pandas_5algos_IndexableSkiplist) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 46; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__Pyx_SetVtable(__pyx_type_6pandas_5algos_IndexableSkiplist.tp_dict, __pyx_vtabptr_6pandas_5algos_IndexableSkiplist) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 46; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__Pyx_SetAttrString(__pyx_m, "IndexableSkiplist", (PyObject *)&__pyx_type_6pandas_5algos_IndexableSkiplist) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 46; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_6pandas_5algos_IndexableSkiplist = &__pyx_type_6pandas_5algos_IndexableSkiplist; if (PyType_Ready(&__pyx_type_6pandas_5algos_Node) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 32; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__Pyx_SetAttrString(__pyx_m, "Node", (PyObject *)&__pyx_type_6pandas_5algos_Node) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 32; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_6pandas_5algos_Node = &__pyx_type_6pandas_5algos_Node; /*--- Type import code ---*/ __pyx_ptype_5numpy_dtype = __Pyx_ImportType("numpy", "dtype", sizeof(PyArray_Descr), 0); if (unlikely(!__pyx_ptype_5numpy_dtype)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_5numpy_flatiter = __Pyx_ImportType("numpy", "flatiter", sizeof(PyArrayIterObject), 0); if (unlikely(!__pyx_ptype_5numpy_flatiter)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 167; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_5numpy_broadcast = __Pyx_ImportType("numpy", "broadcast", sizeof(PyArrayMultiIterObject), 0); if (unlikely(!__pyx_ptype_5numpy_broadcast)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 171; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_5numpy_ndarray = __Pyx_ImportType("numpy", "ndarray", sizeof(PyArrayObject), 0); if (unlikely(!__pyx_ptype_5numpy_ndarray)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_5numpy_ufunc = __Pyx_ImportType("numpy", "ufunc", sizeof(PyUFuncObject), 0); if (unlikely(!__pyx_ptype_5numpy_ufunc)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 865; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_7cpython_4type_type = __Pyx_ImportType(__Pyx_BUILTIN_MODULE_NAME, "type", #if CYTHON_COMPILING_IN_PYPY sizeof(PyTypeObject), #else sizeof(PyHeapTypeObject), #endif 0); if (unlikely(!__pyx_ptype_7cpython_4type_type)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 9; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_7cpython_4bool_bool = __Pyx_ImportType(__Pyx_BUILTIN_MODULE_NAME, "bool", sizeof(PyBoolObject), 0); if (unlikely(!__pyx_ptype_7cpython_4bool_bool)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 8; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_7cpython_7complex_complex = __Pyx_ImportType(__Pyx_BUILTIN_MODULE_NAME, "complex", sizeof(PyComplexObject), 0); if (unlikely(!__pyx_ptype_7cpython_7complex_complex)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 15; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_8datetime_date = __Pyx_ImportType("datetime", "date", sizeof(PyDateTime_Date), 0); if (unlikely(!__pyx_ptype_8datetime_date)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 15; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_8datetime_datetime = __Pyx_ImportType("datetime", "datetime", sizeof(PyDateTime_DateTime), 0); if (unlikely(!__pyx_ptype_8datetime_datetime)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 18; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_8datetime_timedelta = __Pyx_ImportType("datetime", "timedelta", sizeof(PyDateTime_Delta), 0); if (unlikely(!__pyx_ptype_8datetime_timedelta)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 21; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /*--- Variable import code ---*/ /*--- Function import code ---*/ /*--- Execution code ---*/ /* "pandas/algos.pyx":3 * from numpy cimport * * cimport numpy as np * import numpy as np # <<<<<<<<<<<<<< * * cimport cython */ __pyx_t_1 = __Pyx_Import(((PyObject *)__pyx_n_s__numpy), 0, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s__np, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pandas/algos.pyx":7 * cimport cython * * import_array() # <<<<<<<<<<<<<< * * cdef float64_t FP_ERR = 1e-13 */ import_array(); /* "pandas/algos.pyx":9 * import_array() * * cdef float64_t FP_ERR = 1e-13 # <<<<<<<<<<<<<< * * cimport util */ __pyx_v_6pandas_5algos_FP_ERR = 1e-13; /* "pandas/algos.pyx":23 * from numpy cimport NPY_FLOAT64 as NPY_float64 * * int8 = np.dtype(np.int8) # <<<<<<<<<<<<<< * int16 = np.dtype(np.int16) * int32 = np.dtype(np.int32) */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 23; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s__int8); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 23; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 23; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_5numpy_dtype)), ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 23; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; if (PyDict_SetItem(__pyx_d, __pyx_n_s__int8, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 23; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/algos.pyx":24 * * int8 = np.dtype(np.int8) * int16 = np.dtype(np.int16) # <<<<<<<<<<<<<< * int32 = np.dtype(np.int32) * int64 = np.dtype(np.int64) */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 24; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__int16); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 24; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 24; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_5numpy_dtype)), ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 24; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; if (PyDict_SetItem(__pyx_d, __pyx_n_s__int16, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 24; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pandas/algos.pyx":25 * int8 = np.dtype(np.int8) * int16 = np.dtype(np.int16) * int32 = np.dtype(np.int32) # <<<<<<<<<<<<<< * int64 = np.dtype(np.int64) * float16 = np.dtype(np.float16) */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 25; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s__int32); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 25; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 25; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_5numpy_dtype)), ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 25; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; if (PyDict_SetItem(__pyx_d, __pyx_n_s__int32, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 25; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/algos.pyx":26 * int16 = np.dtype(np.int16) * int32 = np.dtype(np.int32) * int64 = np.dtype(np.int64) # <<<<<<<<<<<<<< * float16 = np.dtype(np.float16) * float32 = np.dtype(np.float32) */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 26; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__int64); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 26; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 26; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_5numpy_dtype)), ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 26; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; if (PyDict_SetItem(__pyx_d, __pyx_n_s__int64, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 26; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pandas/algos.pyx":27 * int32 = np.dtype(np.int32) * int64 = np.dtype(np.int64) * float16 = np.dtype(np.float16) # <<<<<<<<<<<<<< * float32 = np.dtype(np.float32) * float64 = np.dtype(np.float64) */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 27; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s__float16); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 27; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 27; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_5numpy_dtype)), ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 27; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; if (PyDict_SetItem(__pyx_d, __pyx_n_s__float16, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 27; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/algos.pyx":28 * int64 = np.dtype(np.int64) * float16 = np.dtype(np.float16) * float32 = np.dtype(np.float32) # <<<<<<<<<<<<<< * float64 = np.dtype(np.float64) * */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 28; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__float32); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 28; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 28; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_5numpy_dtype)), ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 28; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; if (PyDict_SetItem(__pyx_d, __pyx_n_s__float32, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 28; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pandas/algos.pyx":29 * float16 = np.dtype(np.float16) * float32 = np.dtype(np.float32) * float64 = np.dtype(np.float64) # <<<<<<<<<<<<<< * * cdef np.int8_t MINint8 = np.iinfo(np.int8).min */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 29; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s__float64); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 29; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 29; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_5numpy_dtype)), ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 29; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; if (PyDict_SetItem(__pyx_d, __pyx_n_s__float64, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 29; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/algos.pyx":31 * float64 = np.dtype(np.float64) * * cdef np.int8_t MINint8 = np.iinfo(np.int8).min # <<<<<<<<<<<<<< * cdef np.int16_t MINint16 = np.iinfo(np.int16).min * cdef np.int32_t MINint32 = np.iinfo(np.int32).min */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 31; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__iinfo); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 31; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 31; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__int8); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 31; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 31; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 31; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s__min); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 31; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_4 = __Pyx_PyInt_from_py_npy_int8(__pyx_t_2); if (unlikely((__pyx_t_4 == (npy_int8)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 31; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_6pandas_5algos_MINint8 = __pyx_t_4; /* "pandas/algos.pyx":32 * * cdef np.int8_t MINint8 = np.iinfo(np.int8).min * cdef np.int16_t MINint16 = np.iinfo(np.int16).min # <<<<<<<<<<<<<< * cdef np.int32_t MINint32 = np.iinfo(np.int32).min * cdef np.int64_t MINint64 = np.iinfo(np.int64).min */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 32; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__iinfo); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 32; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 32; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__int16); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 32; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 32; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 32; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s__min); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 32; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_5 = __Pyx_PyInt_from_py_npy_int16(__pyx_t_2); if (unlikely((__pyx_t_5 == (npy_int16)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 32; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_6pandas_5algos_MINint16 = __pyx_t_5; /* "pandas/algos.pyx":33 * cdef np.int8_t MINint8 = np.iinfo(np.int8).min * cdef np.int16_t MINint16 = np.iinfo(np.int16).min * cdef np.int32_t MINint32 = np.iinfo(np.int32).min # <<<<<<<<<<<<<< * cdef np.int64_t MINint64 = np.iinfo(np.int64).min * cdef np.float16_t MINfloat16 = np.NINF */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 33; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__iinfo); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 33; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 33; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__int32); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 33; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 33; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 33; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s__min); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 33; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_6 = __Pyx_PyInt_from_py_npy_int32(__pyx_t_2); if (unlikely((__pyx_t_6 == (npy_int32)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 33; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_6pandas_5algos_MINint32 = __pyx_t_6; /* "pandas/algos.pyx":34 * cdef np.int16_t MINint16 = np.iinfo(np.int16).min * cdef np.int32_t MINint32 = np.iinfo(np.int32).min * cdef np.int64_t MINint64 = np.iinfo(np.int64).min # <<<<<<<<<<<<<< * cdef np.float16_t MINfloat16 = np.NINF * cdef np.float32_t MINfloat32 = np.NINF */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 34; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__iinfo); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 34; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 34; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__int64); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 34; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 34; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 34; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s__min); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 34; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_7 = __Pyx_PyInt_from_py_npy_int64(__pyx_t_2); if (unlikely((__pyx_t_7 == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 34; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_6pandas_5algos_MINint64 = __pyx_t_7; /* "pandas/algos.pyx":35 * cdef np.int32_t MINint32 = np.iinfo(np.int32).min * cdef np.int64_t MINint64 = np.iinfo(np.int64).min * cdef np.float16_t MINfloat16 = np.NINF # <<<<<<<<<<<<<< * cdef np.float32_t MINfloat32 = np.NINF * cdef np.float64_t MINfloat64 = np.NINF */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__NINF); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_8 = __pyx_PyFloat_AsFloat(__pyx_t_1); if (unlikely((__pyx_t_8 == (npy_float16)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_6pandas_5algos_MINfloat16 = __pyx_t_8; /* "pandas/algos.pyx":36 * cdef np.int64_t MINint64 = np.iinfo(np.int64).min * cdef np.float16_t MINfloat16 = np.NINF * cdef np.float32_t MINfloat32 = np.NINF # <<<<<<<<<<<<<< * cdef np.float64_t MINfloat64 = np.NINF * */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 36; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s__NINF); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 36; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_9 = __pyx_PyFloat_AsFloat(__pyx_t_2); if (unlikely((__pyx_t_9 == (npy_float32)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 36; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_6pandas_5algos_MINfloat32 = __pyx_t_9; /* "pandas/algos.pyx":37 * cdef np.float16_t MINfloat16 = np.NINF * cdef np.float32_t MINfloat32 = np.NINF * cdef np.float64_t MINfloat64 = np.NINF # <<<<<<<<<<<<<< * * cdef np.int8_t MAXint8 = np.iinfo(np.int8).max */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 37; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__NINF); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 37; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_10 = __pyx_PyFloat_AsDouble(__pyx_t_1); if (unlikely((__pyx_t_10 == (npy_float64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 37; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_6pandas_5algos_MINfloat64 = __pyx_t_10; /* "pandas/algos.pyx":39 * cdef np.float64_t MINfloat64 = np.NINF * * cdef np.int8_t MAXint8 = np.iinfo(np.int8).max # <<<<<<<<<<<<<< * cdef np.int16_t MAXint16 = np.iinfo(np.int16).max * cdef np.int32_t MAXint32 = np.iinfo(np.int32).max */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 39; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s__iinfo); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 39; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 39; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s__int8); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 39; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 39; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 39; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s__max); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 39; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_4 = __Pyx_PyInt_from_py_npy_int8(__pyx_t_1); if (unlikely((__pyx_t_4 == (npy_int8)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 39; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_6pandas_5algos_MAXint8 = __pyx_t_4; /* "pandas/algos.pyx":40 * * cdef np.int8_t MAXint8 = np.iinfo(np.int8).max * cdef np.int16_t MAXint16 = np.iinfo(np.int16).max # <<<<<<<<<<<<<< * cdef np.int32_t MAXint32 = np.iinfo(np.int32).max * cdef np.int64_t MAXint64 = np.iinfo(np.int64).max */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 40; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s__iinfo); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 40; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 40; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s__int16); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 40; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 40; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 40; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__max); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 40; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_5 = __Pyx_PyInt_from_py_npy_int16(__pyx_t_1); if (unlikely((__pyx_t_5 == (npy_int16)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 40; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_6pandas_5algos_MAXint16 = __pyx_t_5; /* "pandas/algos.pyx":41 * cdef np.int8_t MAXint8 = np.iinfo(np.int8).max * cdef np.int16_t MAXint16 = np.iinfo(np.int16).max * cdef np.int32_t MAXint32 = np.iinfo(np.int32).max # <<<<<<<<<<<<<< * cdef np.int64_t MAXint64 = np.iinfo(np.int64).max * cdef np.float16_t MAXfloat16 = np.inf */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 41; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s__iinfo); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 41; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 41; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s__int32); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 41; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 41; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 41; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s__max); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 41; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_6 = __Pyx_PyInt_from_py_npy_int32(__pyx_t_1); if (unlikely((__pyx_t_6 == (npy_int32)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 41; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_6pandas_5algos_MAXint32 = __pyx_t_6; /* "pandas/algos.pyx":42 * cdef np.int16_t MAXint16 = np.iinfo(np.int16).max * cdef np.int32_t MAXint32 = np.iinfo(np.int32).max * cdef np.int64_t MAXint64 = np.iinfo(np.int64).max # <<<<<<<<<<<<<< * cdef np.float16_t MAXfloat16 = np.inf * cdef np.float32_t MAXfloat32 = np.inf */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 42; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s__iinfo); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 42; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 42; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s__int64); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 42; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 42; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 42; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__max); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 42; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_7 = __Pyx_PyInt_from_py_npy_int64(__pyx_t_1); if (unlikely((__pyx_t_7 == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 42; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_6pandas_5algos_MAXint64 = __pyx_t_7; /* "pandas/algos.pyx":43 * cdef np.int32_t MAXint32 = np.iinfo(np.int32).max * cdef np.int64_t MAXint64 = np.iinfo(np.int64).max * cdef np.float16_t MAXfloat16 = np.inf # <<<<<<<<<<<<<< * cdef np.float32_t MAXfloat32 = np.inf * cdef np.float64_t MAXfloat64 = np.inf */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 43; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s__inf); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 43; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_8 = __pyx_PyFloat_AsFloat(__pyx_t_2); if (unlikely((__pyx_t_8 == (npy_float16)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 43; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_6pandas_5algos_MAXfloat16 = __pyx_t_8; /* "pandas/algos.pyx":44 * cdef np.int64_t MAXint64 = np.iinfo(np.int64).max * cdef np.float16_t MAXfloat16 = np.inf * cdef np.float32_t MAXfloat32 = np.inf # <<<<<<<<<<<<<< * cdef np.float64_t MAXfloat64 = np.inf * */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 44; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__inf); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 44; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_9 = __pyx_PyFloat_AsFloat(__pyx_t_1); if (unlikely((__pyx_t_9 == (npy_float32)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 44; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_6pandas_5algos_MAXfloat32 = __pyx_t_9; /* "pandas/algos.pyx":45 * cdef np.float16_t MAXfloat16 = np.inf * cdef np.float32_t MAXfloat32 = np.inf * cdef np.float64_t MAXfloat64 = np.inf # <<<<<<<<<<<<<< * * cdef double NaN = np.NaN */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 45; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s__inf); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 45; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_10 = __pyx_PyFloat_AsDouble(__pyx_t_2); if (unlikely((__pyx_t_10 == (npy_float64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 45; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_6pandas_5algos_MAXfloat64 = __pyx_t_10; /* "pandas/algos.pyx":47 * cdef np.float64_t MAXfloat64 = np.inf * * cdef double NaN = np.NaN # <<<<<<<<<<<<<< * cdef double nan = NaN * */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 47; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__NaN); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 47; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_11 = __pyx_PyFloat_AsDouble(__pyx_t_1); if (unlikely((__pyx_t_11 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 47; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_6pandas_5algos_NaN = ((double)__pyx_t_11); /* "pandas/algos.pyx":48 * * cdef double NaN = np.NaN * cdef double nan = NaN # <<<<<<<<<<<<<< * * */ __pyx_v_6pandas_5algos_nan = __pyx_v_6pandas_5algos_NaN; /* "pandas/algos.pyx":60 * int signbit(double) * * from pandas import lib # <<<<<<<<<<<<<< * * include "skiplist.pyx" */ __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 60; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)__pyx_n_s__lib)); PyList_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_n_s__lib)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__lib)); __pyx_t_2 = __Pyx_Import(((PyObject *)__pyx_n_s__pandas), ((PyObject *)__pyx_t_1), -1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 60; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s__lib); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 60; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s__lib, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 60; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/skiplist.pyx":23 * cimport numpy as np * from numpy cimport * * import numpy as np # <<<<<<<<<<<<<< * * from random import random */ __pyx_t_2 = __Pyx_Import(((PyObject *)__pyx_n_s__numpy), 0, -1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 23; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s__np, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 23; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/skiplist.pyx":25 * import numpy as np * * from random import random # <<<<<<<<<<<<<< * * # initialize numpy */ __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 25; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(((PyObject *)__pyx_n_s__random)); PyList_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_n_s__random)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__random)); __pyx_t_1 = __Pyx_Import(((PyObject *)__pyx_n_s__random), ((PyObject *)__pyx_t_2), -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 25; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s__random); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 25; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s__random, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 25; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pandas/src/skiplist.pyx":28 * * # initialize numpy * import_array() # <<<<<<<<<<<<<< * * # TODO: optimize this, make less messy */ import_array(); /* "pandas/src/skiplist.pyx":44 * * # Singleton terminator node * NIL = Node(np.inf, [], []) # <<<<<<<<<<<<<< * * cdef class IndexableSkiplist: */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 44; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s__inf); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 44; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 44; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 44; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_12 = PyTuple_New(3); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 44; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_12, 1, ((PyObject *)__pyx_t_1)); __Pyx_GIVEREF(((PyObject *)__pyx_t_1)); PyTuple_SET_ITEM(__pyx_t_12, 2, ((PyObject *)__pyx_t_3)); __Pyx_GIVEREF(((PyObject *)__pyx_t_3)); __pyx_t_2 = 0; __pyx_t_1 = 0; __pyx_t_3 = 0; __pyx_t_3 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_6pandas_5algos_Node)), ((PyObject *)__pyx_t_12), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 44; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(((PyObject *)__pyx_t_12)); __pyx_t_12 = 0; if (PyDict_SetItem(__pyx_d, __pyx_n_s__NIL, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 44; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/algos.pyx":66 * * cdef: * int TIEBREAK_AVERAGE = 0 # <<<<<<<<<<<<<< * int TIEBREAK_MIN = 1 * int TIEBREAK_MAX = 2 */ __pyx_v_6pandas_5algos_TIEBREAK_AVERAGE = 0; /* "pandas/algos.pyx":67 * cdef: * int TIEBREAK_AVERAGE = 0 * int TIEBREAK_MIN = 1 # <<<<<<<<<<<<<< * int TIEBREAK_MAX = 2 * int TIEBREAK_FIRST = 3 */ __pyx_v_6pandas_5algos_TIEBREAK_MIN = 1; /* "pandas/algos.pyx":68 * int TIEBREAK_AVERAGE = 0 * int TIEBREAK_MIN = 1 * int TIEBREAK_MAX = 2 # <<<<<<<<<<<<<< * int TIEBREAK_FIRST = 3 * int TIEBREAK_FIRST_DESCENDING = 4 */ __pyx_v_6pandas_5algos_TIEBREAK_MAX = 2; /* "pandas/algos.pyx":69 * int TIEBREAK_MIN = 1 * int TIEBREAK_MAX = 2 * int TIEBREAK_FIRST = 3 # <<<<<<<<<<<<<< * int TIEBREAK_FIRST_DESCENDING = 4 * */ __pyx_v_6pandas_5algos_TIEBREAK_FIRST = 3; /* "pandas/algos.pyx":70 * int TIEBREAK_MAX = 2 * int TIEBREAK_FIRST = 3 * int TIEBREAK_FIRST_DESCENDING = 4 # <<<<<<<<<<<<<< * * tiebreakers = { */ __pyx_v_6pandas_5algos_TIEBREAK_FIRST_DESCENDING = 4; /* "pandas/algos.pyx":72 * int TIEBREAK_FIRST_DESCENDING = 4 * * tiebreakers = { # <<<<<<<<<<<<<< * 'average' : TIEBREAK_AVERAGE, * 'min' : TIEBREAK_MIN, */ __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 72; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_3)); /* "pandas/algos.pyx":73 * * tiebreakers = { * 'average' : TIEBREAK_AVERAGE, # <<<<<<<<<<<<<< * 'min' : TIEBREAK_MIN, * 'max' : TIEBREAK_MAX, */ __pyx_t_12 = PyInt_FromLong(__pyx_v_6pandas_5algos_TIEBREAK_AVERAGE); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 73; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); if (PyDict_SetItem(__pyx_t_3, ((PyObject *)__pyx_n_s__average), __pyx_t_12) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 72; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; /* "pandas/algos.pyx":74 * tiebreakers = { * 'average' : TIEBREAK_AVERAGE, * 'min' : TIEBREAK_MIN, # <<<<<<<<<<<<<< * 'max' : TIEBREAK_MAX, * 'first' : TIEBREAK_FIRST */ __pyx_t_12 = PyInt_FromLong(__pyx_v_6pandas_5algos_TIEBREAK_MIN); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 74; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); if (PyDict_SetItem(__pyx_t_3, ((PyObject *)__pyx_n_s__min), __pyx_t_12) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 72; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; /* "pandas/algos.pyx":75 * 'average' : TIEBREAK_AVERAGE, * 'min' : TIEBREAK_MIN, * 'max' : TIEBREAK_MAX, # <<<<<<<<<<<<<< * 'first' : TIEBREAK_FIRST * } */ __pyx_t_12 = PyInt_FromLong(__pyx_v_6pandas_5algos_TIEBREAK_MAX); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 75; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); if (PyDict_SetItem(__pyx_t_3, ((PyObject *)__pyx_n_s__max), __pyx_t_12) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 72; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; /* "pandas/algos.pyx":77 * 'max' : TIEBREAK_MAX, * 'first' : TIEBREAK_FIRST * } # <<<<<<<<<<<<<< * * */ __pyx_t_12 = PyInt_FromLong(__pyx_v_6pandas_5algos_TIEBREAK_FIRST); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 77; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); if (PyDict_SetItem(__pyx_t_3, ((PyObject *)__pyx_n_s__first), __pyx_t_12) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 72; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; if (PyDict_SetItem(__pyx_d, __pyx_n_s__tiebreakers, ((PyObject *)__pyx_t_3)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 72; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; /* "pandas/algos.pyx":133 * * * def rank_1d_float64(object in_arr, ties_method='average', ascending=True, # <<<<<<<<<<<<<< * na_option='keep'): * """ */ __pyx_t_3 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 133; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_k_3 = __pyx_t_3; __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_1rank_1d_float64, NULL, __pyx_n_s_222); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 133; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s__rank_1d_float64, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 133; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/algos.pyx":205 * * * def rank_1d_int64(object in_arr, ties_method='average', ascending=True, # <<<<<<<<<<<<<< * na_option='keep'): * """ */ __pyx_t_3 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 205; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_k_6 = __pyx_t_3; __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_3rank_1d_int64, NULL, __pyx_n_s_222); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 205; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s__rank_1d_int64, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 205; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/algos.pyx":266 * * def rank_2d_float64(object in_arr, axis=0, ties_method='average', * ascending=True, na_option='keep'): # <<<<<<<<<<<<<< * """ * Fast NaN-friendly version of scipy.stats.rankdata */ __pyx_t_3 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 266; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_k_9 = __pyx_t_3; __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/algos.pyx":265 * * * def rank_2d_float64(object in_arr, axis=0, ties_method='average', # <<<<<<<<<<<<<< * ascending=True, na_option='keep'): * """ */ __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_5rank_2d_float64, NULL, __pyx_n_s_222); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 265; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s__rank_2d_float64, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 265; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/algos.pyx":349 * * def rank_2d_int64(object in_arr, axis=0, ties_method='average', * ascending=True, na_option='keep'): # <<<<<<<<<<<<<< * """ * Fast NaN-friendly version of scipy.stats.rankdata */ __pyx_t_3 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 349; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_k_15 = __pyx_t_3; __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/algos.pyx":348 * * * def rank_2d_int64(object in_arr, axis=0, ties_method='average', # <<<<<<<<<<<<<< * ascending=True, na_option='keep'): * """ */ __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_7rank_2d_int64, NULL, __pyx_n_s_222); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 348; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s__rank_2d_int64, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 348; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/algos.pyx":417 * * def rank_1d_generic(object in_arr, bint retry=1, ties_method='average', * ascending=True, na_option='keep'): # <<<<<<<<<<<<<< * """ * Fast NaN-friendly version of scipy.stats.rankdata */ __pyx_t_3 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 417; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_k_21 = __pyx_t_3; __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/algos.pyx":416 * * * def rank_1d_generic(object in_arr, bint retry=1, ties_method='average', # <<<<<<<<<<<<<< * ascending=True, na_option='keep'): * """ */ __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_9rank_1d_generic, NULL, __pyx_n_s_222); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 416; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s__rank_1d_generic, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 416; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/algos.pyx":502 * return left != right * * _return_false = lambda self, other: False # <<<<<<<<<<<<<< * _return_true = lambda self, other: True * */ __pyx_t_3 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6pandas_5algos_494lambda1, 0, __pyx_n_s_231, NULL, __pyx_n_s_222, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 502; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s___return_false, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 502; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/algos.pyx":503 * * _return_false = lambda self, other: False * _return_true = lambda self, other: True # <<<<<<<<<<<<<< * * class Infinity(object): */ __pyx_t_3 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6pandas_5algos_495lambda2, 0, __pyx_n_s_231, NULL, __pyx_n_s_222, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 503; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s___return_true, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 503; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/algos.pyx":505 * _return_true = lambda self, other: True * * class Infinity(object): # <<<<<<<<<<<<<< * * __lt__ = _return_false */ __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 505; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_3)); /* "pandas/algos.pyx":507 * class Infinity(object): * * __lt__ = _return_false # <<<<<<<<<<<<<< * __le__ = _return_false * __eq__ = _return_false */ __pyx_t_12 = __Pyx_GetModuleGlobalName(__pyx_n_s___return_false); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 507; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); if (PyObject_SetItem(__pyx_t_3, __pyx_n_s____lt__, __pyx_t_12) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 507; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; /* "pandas/algos.pyx":508 * * __lt__ = _return_false * __le__ = _return_false # <<<<<<<<<<<<<< * __eq__ = _return_false * __ne__ = _return_true */ __pyx_t_12 = __Pyx_GetModuleGlobalName(__pyx_n_s___return_false); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 508; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); if (PyObject_SetItem(__pyx_t_3, __pyx_n_s____le__, __pyx_t_12) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 508; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; /* "pandas/algos.pyx":509 * __lt__ = _return_false * __le__ = _return_false * __eq__ = _return_false # <<<<<<<<<<<<<< * __ne__ = _return_true * __gt__ = _return_true */ __pyx_t_12 = __Pyx_GetModuleGlobalName(__pyx_n_s___return_false); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 509; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); if (PyObject_SetItem(__pyx_t_3, __pyx_n_s____eq__, __pyx_t_12) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 509; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; /* "pandas/algos.pyx":510 * __le__ = _return_false * __eq__ = _return_false * __ne__ = _return_true # <<<<<<<<<<<<<< * __gt__ = _return_true * __ge__ = _return_true */ __pyx_t_12 = __Pyx_GetModuleGlobalName(__pyx_n_s___return_true); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 510; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); if (PyObject_SetItem(__pyx_t_3, __pyx_n_s____ne__, __pyx_t_12) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 510; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; /* "pandas/algos.pyx":511 * __eq__ = _return_false * __ne__ = _return_true * __gt__ = _return_true # <<<<<<<<<<<<<< * __ge__ = _return_true * __cmp__ = _return_false */ __pyx_t_12 = __Pyx_GetModuleGlobalName(__pyx_n_s___return_true); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 511; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); if (PyObject_SetItem(__pyx_t_3, __pyx_n_s____gt__, __pyx_t_12) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 511; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; /* "pandas/algos.pyx":512 * __ne__ = _return_true * __gt__ = _return_true * __ge__ = _return_true # <<<<<<<<<<<<<< * __cmp__ = _return_false * */ __pyx_t_12 = __Pyx_GetModuleGlobalName(__pyx_n_s___return_true); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 512; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); if (PyObject_SetItem(__pyx_t_3, __pyx_n_s____ge__, __pyx_t_12) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 512; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; /* "pandas/algos.pyx":513 * __gt__ = _return_true * __ge__ = _return_true * __cmp__ = _return_false # <<<<<<<<<<<<<< * * class NegInfinity(object): */ __pyx_t_12 = __Pyx_GetModuleGlobalName(__pyx_n_s___return_false); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 513; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); if (PyObject_SetItem(__pyx_t_3, __pyx_n_s____cmp__, __pyx_t_12) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 513; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; /* "pandas/algos.pyx":505 * _return_true = lambda self, other: True * * class Infinity(object): # <<<<<<<<<<<<<< * * __lt__ = _return_false */ __pyx_t_12 = PyTuple_New(1); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 505; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __Pyx_INCREF(__pyx_builtin_object); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_builtin_object); __Pyx_GIVEREF(__pyx_builtin_object); __pyx_t_1 = __Pyx_CreateClass(((PyObject *)__pyx_t_12), ((PyObject *)__pyx_t_3), __pyx_n_s__Infinity, __pyx_n_s__Infinity, __pyx_n_s_222); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 505; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(((PyObject *)__pyx_t_12)); __pyx_t_12 = 0; if (PyDict_SetItem(__pyx_d, __pyx_n_s__Infinity, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 505; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; /* "pandas/algos.pyx":515 * __cmp__ = _return_false * * class NegInfinity(object): # <<<<<<<<<<<<<< * * __lt__ = _return_true */ __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 515; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_3)); /* "pandas/algos.pyx":517 * class NegInfinity(object): * * __lt__ = _return_true # <<<<<<<<<<<<<< * __le__ = _return_true * __eq__ = _return_false */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s___return_true); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 517; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (PyObject_SetItem(__pyx_t_3, __pyx_n_s____lt__, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 517; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pandas/algos.pyx":518 * * __lt__ = _return_true * __le__ = _return_true # <<<<<<<<<<<<<< * __eq__ = _return_false * __ne__ = _return_true */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s___return_true); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 518; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (PyObject_SetItem(__pyx_t_3, __pyx_n_s____le__, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 518; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pandas/algos.pyx":519 * __lt__ = _return_true * __le__ = _return_true * __eq__ = _return_false # <<<<<<<<<<<<<< * __ne__ = _return_true * __gt__ = _return_false */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s___return_false); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 519; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (PyObject_SetItem(__pyx_t_3, __pyx_n_s____eq__, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 519; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pandas/algos.pyx":520 * __le__ = _return_true * __eq__ = _return_false * __ne__ = _return_true # <<<<<<<<<<<<<< * __gt__ = _return_false * __ge__ = _return_false */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s___return_true); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 520; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (PyObject_SetItem(__pyx_t_3, __pyx_n_s____ne__, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 520; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pandas/algos.pyx":521 * __eq__ = _return_false * __ne__ = _return_true * __gt__ = _return_false # <<<<<<<<<<<<<< * __ge__ = _return_false * __cmp__ = _return_true */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s___return_false); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 521; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (PyObject_SetItem(__pyx_t_3, __pyx_n_s____gt__, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 521; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pandas/algos.pyx":522 * __ne__ = _return_true * __gt__ = _return_false * __ge__ = _return_false # <<<<<<<<<<<<<< * __cmp__ = _return_true * */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s___return_false); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 522; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (PyObject_SetItem(__pyx_t_3, __pyx_n_s____ge__, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 522; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pandas/algos.pyx":523 * __gt__ = _return_false * __ge__ = _return_false * __cmp__ = _return_true # <<<<<<<<<<<<<< * * def rank_2d_generic(object in_arr, axis=0, ties_method='average', */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s___return_true); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 523; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (PyObject_SetItem(__pyx_t_3, __pyx_n_s____cmp__, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 523; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pandas/algos.pyx":515 * __cmp__ = _return_false * * class NegInfinity(object): # <<<<<<<<<<<<<< * * __lt__ = _return_true */ __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 515; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_builtin_object); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_builtin_object); __Pyx_GIVEREF(__pyx_builtin_object); __pyx_t_12 = __Pyx_CreateClass(((PyObject *)__pyx_t_1), ((PyObject *)__pyx_t_3), __pyx_n_s__NegInfinity, __pyx_n_s__NegInfinity, __pyx_n_s_222); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 515; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; if (PyDict_SetItem(__pyx_d, __pyx_n_s__NegInfinity, __pyx_t_12) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 515; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; /* "pandas/algos.pyx":526 * * def rank_2d_generic(object in_arr, axis=0, ties_method='average', * ascending=True, na_option='keep'): # <<<<<<<<<<<<<< * """ * Fast NaN-friendly version of scipy.stats.rankdata */ __pyx_t_3 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 526; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_k_27 = __pyx_t_3; __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/algos.pyx":525 * __cmp__ = _return_true * * def rank_2d_generic(object in_arr, axis=0, ties_method='average', # <<<<<<<<<<<<<< * ascending=True, na_option='keep'): * """ */ __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_11rank_2d_generic, NULL, __pyx_n_s_222); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 525; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s__rank_2d_generic, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 525; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/algos.pyx":641 * # - * * def _check_minp(win, minp, N): # <<<<<<<<<<<<<< * if minp > win: * raise ValueError('min_periods (%d) must be <= window (%d)' */ __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_13_check_minp, NULL, __pyx_n_s_222); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 641; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s___check_minp, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 641; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/algos.pyx":668 * # Series: Prentice-Hall Series in Automatic Computation * * def kth_smallest(ndarray[double_t] a, Py_ssize_t k): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i,j,l,m,n */ __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_15kth_smallest, NULL, __pyx_n_s_222); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 668; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s__kth_smallest, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 668; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/algos.pyx":725 * * * def median(ndarray arr): # <<<<<<<<<<<<<< * ''' * A faster median */ __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_17median, NULL, __pyx_n_s_222); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 725; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s__median, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 725; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/algos.pyx":745 * # -------------- Min, Max subsequence * * def max_subseq(ndarray[double_t] arr): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i=0,s=0,e=0,T,n */ __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_19max_subseq, NULL, __pyx_n_s_222); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 745; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s__max_subseq, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 745; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/algos.pyx":773 * return (s, e, m) * * def min_subseq(ndarray[double_t] arr): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t s, e */ __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_21min_subseq, NULL, __pyx_n_s_222); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 773; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s__min_subseq, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 773; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/algos.pyx":785 * # Rolling sum * * def roll_sum(ndarray[double_t] input, int win, int minp): # <<<<<<<<<<<<<< * cdef double val, prev, sum_x = 0 * cdef int nobs = 0, i */ __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_23roll_sum, NULL, __pyx_n_s_222); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 785; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s__roll_sum, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 785; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/algos.pyx":827 * # Rolling mean * * def roll_mean(ndarray[double_t] input, # <<<<<<<<<<<<<< * int win, int minp): * cdef: */ __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_25roll_mean, NULL, __pyx_n_s_222); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 827; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s__roll_mean, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 827; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/algos.pyx":884 * # Exponentially weighted moving average * * def ewma(ndarray[double_t] input, double_t com, int adjust): # <<<<<<<<<<<<<< * ''' * Compute exponentially-weighted moving average using center-of-mass. */ __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_27ewma, NULL, __pyx_n_s_222); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 884; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s__ewma, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 884; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/algos.pyx":946 * @cython.boundscheck(False) * @cython.wraparound(False) * def nancorr(ndarray[float64_t, ndim=2] mat, cov=False, minp=None): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, j, xi, yi, N, K */ __pyx_t_3 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 946; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_k_39 = __pyx_t_3; __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_29nancorr, NULL, __pyx_n_s_222); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 946; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s__nancorr, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 946; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/algos.pyx":1005 * @cython.boundscheck(False) * @cython.wraparound(False) * def nancorr_spearman(ndarray[float64_t, ndim=2] mat, Py_ssize_t minp=1): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, j, xi, yi, N, K */ __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_31nancorr_spearman, NULL, __pyx_n_s_222); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1005; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s__nancorr_spearman, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1005; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/algos.pyx":1066 * # Rolling variance * * def roll_var(ndarray[double_t] input, int win, int minp, int ddof=1): # <<<<<<<<<<<<<< * cdef double val, prev, sum_x = 0, sum_xx = 0, nobs = 0 * cdef Py_ssize_t i */ __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_33roll_var, NULL, __pyx_n_s_222); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1066; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s__roll_var, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1066; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/algos.pyx":1120 * # Rolling skewness * * def roll_skew(ndarray[double_t] input, int win, int minp): # <<<<<<<<<<<<<< * cdef double val, prev * cdef double x = 0, xx = 0, xxx = 0 */ __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_35roll_skew, NULL, __pyx_n_s_222); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1120; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s__roll_skew, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1120; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/algos.pyx":1184 * * * def roll_kurt(ndarray[double_t] input, # <<<<<<<<<<<<<< * int win, int minp): * cdef double val, prev */ __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_37roll_kurt, NULL, __pyx_n_s_222); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1184; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s__roll_kurt, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1184; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/algos.pyx":1304 * from skiplist cimport * * * def roll_median_c(ndarray[float64_t] arg, int win, int minp): # <<<<<<<<<<<<<< * cdef double val, res, prev * cdef: */ __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_39roll_median_c, NULL, __pyx_n_s_222); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1304; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s__roll_median_c, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1304; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/algos.pyx":1359 * return output * * def roll_median_cython(ndarray input, int win, int minp): # <<<<<<<<<<<<<< * ''' * O(N log(window)) implementation using skip list */ __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_41roll_median_cython, NULL, __pyx_n_s_222); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1359; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s__roll_median_cython, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1359; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/algos.pyx":1395 * @cython.boundscheck(False) * @cython.wraparound(False) * def roll_max2(ndarray[float64_t] a, int window, int minp): # <<<<<<<<<<<<<< * "Moving max of 1d array of dtype=float64 along axis=0 ignoring NaNs." * cdef np.float64_t ai, aold */ __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_43roll_max2, NULL, __pyx_n_s_222); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1395; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s__roll_max2, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1395; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/algos.pyx":1475 * return y * * def roll_max(ndarray input, int win, int minp): # <<<<<<<<<<<<<< * ''' * O(N log(window)) implementation using skip list */ __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_45roll_max, NULL, __pyx_n_s_222); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1475; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s__roll_max, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1475; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/algos.pyx":1488 * return NaN * * def roll_min(ndarray input, int win, int minp): # <<<<<<<<<<<<<< * ''' * O(N log(window)) implementation using skip list */ __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_47roll_min, NULL, __pyx_n_s_222); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1488; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s__roll_min, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1488; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/algos.pyx":1496 * @cython.boundscheck(False) * @cython.wraparound(False) * def roll_min2(np.ndarray[np.float64_t, ndim=1] a, int window, int minp): # <<<<<<<<<<<<<< * "Moving min of 1d array of dtype=float64 along axis=0 ignoring NaNs." * cdef np.float64_t ai, aold */ __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_49roll_min2, NULL, __pyx_n_s_222); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1496; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s__roll_min2, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1496; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/algos.pyx":1582 * return NaN * * def roll_quantile(ndarray[float64_t, cast=True] input, int win, # <<<<<<<<<<<<<< * int minp, double quantile): * ''' */ __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_51roll_quantile, NULL, __pyx_n_s_222); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1582; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s__roll_quantile, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1582; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/algos.pyx":1629 * return output * * def roll_generic(ndarray[float64_t, cast=True] input, int win, # <<<<<<<<<<<<<< * int minp, object func): * cdef ndarray[double_t] output, counts, bufarr */ __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_53roll_generic, NULL, __pyx_n_s_222); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1629; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s__roll_generic, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1629; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/algos.pyx":1671 * * * def roll_window(ndarray[float64_t, ndim=1, cast=True] input, # <<<<<<<<<<<<<< * ndarray[float64_t, ndim=1, cast=True] weights, * int minp, bint avg=True, bint avg_wgt=False): */ __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_55roll_window, NULL, __pyx_n_s_222); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1671; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s__roll_window, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1671; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/algos.pyx":1744 * @cython.wraparound(False) * @cython.boundscheck(False) * def is_lexsorted(list list_of_arrays): # <<<<<<<<<<<<<< * cdef: * int i */ __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_57is_lexsorted, NULL, __pyx_n_s_222); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1744; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s__is_lexsorted, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1744; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/algos.pyx":1777 * * @cython.boundscheck(False) * def groupby_indices(ndarray values): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = len(values) */ __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_59groupby_indices, NULL, __pyx_n_s_222); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1777; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s__groupby_indices, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1777; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/algos.pyx":1814 * @cython.wraparound(False) * @cython.boundscheck(False) * def group_labels(ndarray[object] values): # <<<<<<<<<<<<<< * ''' * Compute label vector from input values and associated useful data */ __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_61group_labels, NULL, __pyx_n_s_222); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1814; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s__group_labels, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1814; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/algos.pyx":1856 * @cython.boundscheck(False) * @cython.wraparound(False) * def groupsort_indexer(ndarray[int64_t] index, Py_ssize_t ngroups): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, loc, label, n */ __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_63groupsort_indexer, NULL, __pyx_n_s_222); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1856; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s__groupsort_indexer, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1856; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/algos.pyx":1887 * @cython.boundscheck(False) * @cython.wraparound(False) * def group_nth_object(ndarray[object, ndim=2] out, # <<<<<<<<<<<<<< * ndarray[int64_t] counts, * ndarray[object, ndim=2] values, */ __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_65group_nth_object, NULL, __pyx_n_s_222); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1887; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s__group_nth_object, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1887; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/algos.pyx":1931 * @cython.boundscheck(False) * @cython.wraparound(False) * def group_nth_bin_object(ndarray[object, ndim=2] out, # <<<<<<<<<<<<<< * ndarray[int64_t] counts, * ndarray[object, ndim=2] values, */ __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_67group_nth_bin_object, NULL, __pyx_n_s_222); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1931; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_290, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1931; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/algos.pyx":1979 * @cython.boundscheck(False) * @cython.wraparound(False) * def group_last_object(ndarray[object, ndim=2] out, # <<<<<<<<<<<<<< * ndarray[int64_t] counts, * ndarray[object, ndim=2] values, */ __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_69group_last_object, NULL, __pyx_n_s_222); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1979; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s__group_last_object, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1979; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/algos.pyx":2021 * @cython.boundscheck(False) * @cython.wraparound(False) * def group_last_bin_object(ndarray[object, ndim=2] out, # <<<<<<<<<<<<<< * ndarray[int64_t] counts, * ndarray[object, ndim=2] values, */ __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_71group_last_bin_object, NULL, __pyx_n_s_222); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2021; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_295, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2021; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/algos.pyx":2071 * # median * * def group_median(ndarray[float64_t, ndim=2] out, # <<<<<<<<<<<<<< * ndarray[int64_t] counts, * ndarray[float64_t, ndim=2] values, */ __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_73group_median, NULL, __pyx_n_s_222); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2071; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s__group_median, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2071; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/join.pyx":1 * def inner_join(ndarray[int64_t] left, ndarray[int64_t] right, # <<<<<<<<<<<<<< * Py_ssize_t max_groups): * cdef: */ __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_75inner_join, NULL, __pyx_n_s_222); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s__inner_join, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/join.pyx":52 * * def left_outer_join(ndarray[int64_t] left, ndarray[int64_t] right, * Py_ssize_t max_groups, sort=True): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, j, k, count = 0 */ __pyx_t_3 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 52; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_k_47 = __pyx_t_3; __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/join.pyx":51 * _get_result_indexer(right_sorter, right_indexer)) * * def left_outer_join(ndarray[int64_t] left, ndarray[int64_t] right, # <<<<<<<<<<<<<< * Py_ssize_t max_groups, sort=True): * cdef: */ __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_77left_outer_join, NULL, __pyx_n_s_222); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s__left_outer_join, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/join.pyx":120 * * * def full_outer_join(ndarray[int64_t] left, ndarray[int64_t] right, # <<<<<<<<<<<<<< * Py_ssize_t max_groups): * cdef: */ __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_79full_outer_join, NULL, __pyx_n_s_222); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 120; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s__full_outer_join, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 120; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/join.pyx":184 * * * def _get_result_indexer(sorter, indexer): # <<<<<<<<<<<<<< * if indexer.dtype != np.int_: * indexer = indexer.astype(np.int_) */ __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_81_get_result_indexer, NULL, __pyx_n_s_222); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 184; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s___get_result_indexer, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 184; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/join.pyx":199 * * * def ffill_indexer(ndarray[int64_t] indexer): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = len(indexer) */ __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_83ffill_indexer, NULL, __pyx_n_s_222); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 199; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s__ffill_indexer, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 199; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/join.pyx":219 * * * def ffill_by_group(ndarray[int64_t] indexer, ndarray[int64_t] group_ids, # <<<<<<<<<<<<<< * int64_t max_group): * cdef: */ __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_85ffill_by_group, NULL, __pyx_n_s_222); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 219; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s__ffill_by_group, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 219; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/generated.pyx":17 * cimport cpython * * import numpy as np # <<<<<<<<<<<<<< * isnan = np.isnan * */ __pyx_t_3 = __Pyx_Import(((PyObject *)__pyx_n_s__numpy), 0, -1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 17; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s__np, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 17; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/generated.pyx":18 * * import numpy as np * isnan = np.isnan # <<<<<<<<<<<<<< * * from datetime import datetime as pydatetime */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 18; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s__isnan); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 18; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (PyDict_SetItem(__pyx_d, __pyx_n_s__isnan, __pyx_t_12) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 18; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; /* "pandas/src/generated.pyx":20 * isnan = np.isnan * * from datetime import datetime as pydatetime # <<<<<<<<<<<<<< * * # this is our datetime.pxd */ __pyx_t_12 = PyList_New(1); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 20; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __Pyx_INCREF(((PyObject *)__pyx_n_s__datetime)); PyList_SET_ITEM(__pyx_t_12, 0, ((PyObject *)__pyx_n_s__datetime)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__datetime)); __pyx_t_3 = __Pyx_Import(((PyObject *)__pyx_n_s__datetime), ((PyObject *)__pyx_t_12), -1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 20; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(((PyObject *)__pyx_t_12)); __pyx_t_12 = 0; __pyx_t_12 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s__datetime); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 20; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); if (PyDict_SetItem(__pyx_d, __pyx_n_s__pydatetime, __pyx_t_12) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 20; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/generated.pyx":33 * * # import datetime C API * PyDateTime_IMPORT # <<<<<<<<<<<<<< * * # initialize numpy */ PyDateTime_IMPORT; /* "pandas/src/generated.pyx":36 * * # initialize numpy * import_array() # <<<<<<<<<<<<<< * import_ufunc() * */ import_array(); /* "pandas/src/generated.pyx":37 * # initialize numpy * import_array() * import_ufunc() # <<<<<<<<<<<<<< * * cdef int PLATFORM_INT = ( np.arange(0, dtype=np.int_)).descr.type_num */ import_ufunc(); /* "pandas/src/generated.pyx":39 * import_ufunc() * * cdef int PLATFORM_INT = ( np.arange(0, dtype=np.int_)).descr.type_num # <<<<<<<<<<<<<< * * cpdef ensure_platform_int(object arr): */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 39; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s__arange); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 39; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 39; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_3)); __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 39; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s__int_); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 39; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (PyDict_SetItem(__pyx_t_3, ((PyObject *)__pyx_n_s__dtype), __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 39; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_Call(__pyx_t_12, ((PyObject *)__pyx_k_tuple_311), ((PyObject *)__pyx_t_3)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 39; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; __pyx_t_13 = ((PyArrayObject *)__pyx_t_2)->descr->type_num; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_6pandas_5algos_PLATFORM_INT = __pyx_t_13; /* "pandas/src/generated.pyx":257 * @cython.boundscheck(False) * @cython.wraparound(False) * def pad_float64(ndarray[float64_t] old, ndarray[float64_t] new, # <<<<<<<<<<<<<< * limit=None): * cdef Py_ssize_t i, j, nleft, nright */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_115pad_float64, NULL, __pyx_n_s_222); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 257; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s__pad_float64, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 257; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":318 * @cython.boundscheck(False) * @cython.wraparound(False) * def pad_float32(ndarray[float32_t] old, ndarray[float32_t] new, # <<<<<<<<<<<<<< * limit=None): * cdef Py_ssize_t i, j, nleft, nright */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_117pad_float32, NULL, __pyx_n_s_222); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 318; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s__pad_float32, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 318; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":379 * @cython.boundscheck(False) * @cython.wraparound(False) * def pad_object(ndarray[object] old, ndarray[object] new, # <<<<<<<<<<<<<< * limit=None): * cdef Py_ssize_t i, j, nleft, nright */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_119pad_object, NULL, __pyx_n_s_222); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 379; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s__pad_object, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 379; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":440 * @cython.boundscheck(False) * @cython.wraparound(False) * def pad_int32(ndarray[int32_t] old, ndarray[int32_t] new, # <<<<<<<<<<<<<< * limit=None): * cdef Py_ssize_t i, j, nleft, nright */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_121pad_int32, NULL, __pyx_n_s_222); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 440; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s__pad_int32, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 440; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":501 * @cython.boundscheck(False) * @cython.wraparound(False) * def pad_int64(ndarray[int64_t] old, ndarray[int64_t] new, # <<<<<<<<<<<<<< * limit=None): * cdef Py_ssize_t i, j, nleft, nright */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_123pad_int64, NULL, __pyx_n_s_222); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 501; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s__pad_int64, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 501; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":562 * @cython.boundscheck(False) * @cython.wraparound(False) * def pad_bool(ndarray[uint8_t] old, ndarray[uint8_t] new, # <<<<<<<<<<<<<< * limit=None): * cdef Py_ssize_t i, j, nleft, nright */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_125pad_bool, NULL, __pyx_n_s_222); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 562; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s__pad_bool, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 562; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":624 * @cython.boundscheck(False) * @cython.wraparound(False) * def backfill_float64(ndarray[float64_t] old, ndarray[float64_t] new, # <<<<<<<<<<<<<< * limit=None): * cdef Py_ssize_t i, j, nleft, nright */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_127backfill_float64, NULL, __pyx_n_s_222); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 624; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s__backfill_float64, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 624; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":686 * @cython.boundscheck(False) * @cython.wraparound(False) * def backfill_float32(ndarray[float32_t] old, ndarray[float32_t] new, # <<<<<<<<<<<<<< * limit=None): * cdef Py_ssize_t i, j, nleft, nright */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_129backfill_float32, NULL, __pyx_n_s_222); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 686; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s__backfill_float32, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 686; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":748 * @cython.boundscheck(False) * @cython.wraparound(False) * def backfill_object(ndarray[object] old, ndarray[object] new, # <<<<<<<<<<<<<< * limit=None): * cdef Py_ssize_t i, j, nleft, nright */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_131backfill_object, NULL, __pyx_n_s_222); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 748; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s__backfill_object, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 748; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":810 * @cython.boundscheck(False) * @cython.wraparound(False) * def backfill_int32(ndarray[int32_t] old, ndarray[int32_t] new, # <<<<<<<<<<<<<< * limit=None): * cdef Py_ssize_t i, j, nleft, nright */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_133backfill_int32, NULL, __pyx_n_s_222); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 810; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s__backfill_int32, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 810; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":872 * @cython.boundscheck(False) * @cython.wraparound(False) * def backfill_int64(ndarray[int64_t] old, ndarray[int64_t] new, # <<<<<<<<<<<<<< * limit=None): * cdef Py_ssize_t i, j, nleft, nright */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_135backfill_int64, NULL, __pyx_n_s_222); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 872; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s__backfill_int64, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 872; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":934 * @cython.boundscheck(False) * @cython.wraparound(False) * def backfill_bool(ndarray[uint8_t] old, ndarray[uint8_t] new, # <<<<<<<<<<<<<< * limit=None): * cdef Py_ssize_t i, j, nleft, nright */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_137backfill_bool, NULL, __pyx_n_s_222); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 934; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s__backfill_bool, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 934; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":997 * @cython.boundscheck(False) * @cython.wraparound(False) * def pad_inplace_float64(ndarray[float64_t] values, # <<<<<<<<<<<<<< * ndarray[uint8_t, cast=True] mask, * limit=None): */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_139pad_inplace_float64, NULL, __pyx_n_s_222); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 997; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s__pad_inplace_float64, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 997; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":1030 * @cython.boundscheck(False) * @cython.wraparound(False) * def pad_inplace_float32(ndarray[float32_t] values, # <<<<<<<<<<<<<< * ndarray[uint8_t, cast=True] mask, * limit=None): */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_141pad_inplace_float32, NULL, __pyx_n_s_222); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1030; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s__pad_inplace_float32, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1030; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":1063 * @cython.boundscheck(False) * @cython.wraparound(False) * def pad_inplace_object(ndarray[object] values, # <<<<<<<<<<<<<< * ndarray[uint8_t, cast=True] mask, * limit=None): */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_143pad_inplace_object, NULL, __pyx_n_s_222); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1063; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s__pad_inplace_object, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1063; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":1096 * @cython.boundscheck(False) * @cython.wraparound(False) * def pad_inplace_int32(ndarray[int32_t] values, # <<<<<<<<<<<<<< * ndarray[uint8_t, cast=True] mask, * limit=None): */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_145pad_inplace_int32, NULL, __pyx_n_s_222); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1096; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s__pad_inplace_int32, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1096; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":1129 * @cython.boundscheck(False) * @cython.wraparound(False) * def pad_inplace_int64(ndarray[int64_t] values, # <<<<<<<<<<<<<< * ndarray[uint8_t, cast=True] mask, * limit=None): */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_147pad_inplace_int64, NULL, __pyx_n_s_222); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1129; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s__pad_inplace_int64, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1129; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":1162 * @cython.boundscheck(False) * @cython.wraparound(False) * def pad_inplace_bool(ndarray[uint8_t] values, # <<<<<<<<<<<<<< * ndarray[uint8_t, cast=True] mask, * limit=None): */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_149pad_inplace_bool, NULL, __pyx_n_s_222); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1162; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s__pad_inplace_bool, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1162; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":1196 * @cython.boundscheck(False) * @cython.wraparound(False) * def backfill_inplace_float64(ndarray[float64_t] values, # <<<<<<<<<<<<<< * ndarray[uint8_t, cast=True] mask, * limit=None): */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_151backfill_inplace_float64, NULL, __pyx_n_s_222); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1196; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_351, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1196; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":1228 * @cython.boundscheck(False) * @cython.wraparound(False) * def backfill_inplace_float32(ndarray[float32_t] values, # <<<<<<<<<<<<<< * ndarray[uint8_t, cast=True] mask, * limit=None): */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_153backfill_inplace_float32, NULL, __pyx_n_s_222); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1228; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_354, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1228; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":1260 * @cython.boundscheck(False) * @cython.wraparound(False) * def backfill_inplace_object(ndarray[object] values, # <<<<<<<<<<<<<< * ndarray[uint8_t, cast=True] mask, * limit=None): */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_155backfill_inplace_object, NULL, __pyx_n_s_222); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1260; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_357, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1260; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":1292 * @cython.boundscheck(False) * @cython.wraparound(False) * def backfill_inplace_int32(ndarray[int32_t] values, # <<<<<<<<<<<<<< * ndarray[uint8_t, cast=True] mask, * limit=None): */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_157backfill_inplace_int32, NULL, __pyx_n_s_222); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1292; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_360, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1292; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":1324 * @cython.boundscheck(False) * @cython.wraparound(False) * def backfill_inplace_int64(ndarray[int64_t] values, # <<<<<<<<<<<<<< * ndarray[uint8_t, cast=True] mask, * limit=None): */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_159backfill_inplace_int64, NULL, __pyx_n_s_222); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1324; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_363, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1324; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":1356 * @cython.boundscheck(False) * @cython.wraparound(False) * def backfill_inplace_bool(ndarray[uint8_t] values, # <<<<<<<<<<<<<< * ndarray[uint8_t, cast=True] mask, * limit=None): */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_161backfill_inplace_bool, NULL, __pyx_n_s_222); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1356; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_366, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1356; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":1389 * @cython.boundscheck(False) * @cython.wraparound(False) * def pad_2d_inplace_float64(ndarray[float64_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[uint8_t, ndim=2] mask, * limit=None): */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_163pad_2d_inplace_float64, NULL, __pyx_n_s_222); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1389; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_369, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1389; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":1423 * @cython.boundscheck(False) * @cython.wraparound(False) * def pad_2d_inplace_float32(ndarray[float32_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[uint8_t, ndim=2] mask, * limit=None): */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_165pad_2d_inplace_float32, NULL, __pyx_n_s_222); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1423; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_372, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1423; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":1457 * @cython.boundscheck(False) * @cython.wraparound(False) * def pad_2d_inplace_object(ndarray[object, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[uint8_t, ndim=2] mask, * limit=None): */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_167pad_2d_inplace_object, NULL, __pyx_n_s_222); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1457; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_375, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1457; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":1491 * @cython.boundscheck(False) * @cython.wraparound(False) * def pad_2d_inplace_int32(ndarray[int32_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[uint8_t, ndim=2] mask, * limit=None): */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_169pad_2d_inplace_int32, NULL, __pyx_n_s_222); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1491; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_378, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1491; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":1525 * @cython.boundscheck(False) * @cython.wraparound(False) * def pad_2d_inplace_int64(ndarray[int64_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[uint8_t, ndim=2] mask, * limit=None): */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_171pad_2d_inplace_int64, NULL, __pyx_n_s_222); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1525; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_381, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1525; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":1559 * @cython.boundscheck(False) * @cython.wraparound(False) * def pad_2d_inplace_bool(ndarray[uint8_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[uint8_t, ndim=2] mask, * limit=None): */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_173pad_2d_inplace_bool, NULL, __pyx_n_s_222); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1559; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s__pad_2d_inplace_bool, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1559; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":1594 * @cython.boundscheck(False) * @cython.wraparound(False) * def backfill_2d_inplace_float64(ndarray[float64_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[uint8_t, ndim=2] mask, * limit=None): */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_175backfill_2d_inplace_float64, NULL, __pyx_n_s_222); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1594; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_386, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1594; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":1628 * @cython.boundscheck(False) * @cython.wraparound(False) * def backfill_2d_inplace_float32(ndarray[float32_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[uint8_t, ndim=2] mask, * limit=None): */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_177backfill_2d_inplace_float32, NULL, __pyx_n_s_222); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1628; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_389, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1628; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":1662 * @cython.boundscheck(False) * @cython.wraparound(False) * def backfill_2d_inplace_object(ndarray[object, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[uint8_t, ndim=2] mask, * limit=None): */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_179backfill_2d_inplace_object, NULL, __pyx_n_s_222); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1662; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_392, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1662; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":1696 * @cython.boundscheck(False) * @cython.wraparound(False) * def backfill_2d_inplace_int32(ndarray[int32_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[uint8_t, ndim=2] mask, * limit=None): */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_181backfill_2d_inplace_int32, NULL, __pyx_n_s_222); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1696; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_395, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1696; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":1730 * @cython.boundscheck(False) * @cython.wraparound(False) * def backfill_2d_inplace_int64(ndarray[int64_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[uint8_t, ndim=2] mask, * limit=None): */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_183backfill_2d_inplace_int64, NULL, __pyx_n_s_222); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1730; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_398, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1730; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":1764 * @cython.boundscheck(False) * @cython.wraparound(False) * def backfill_2d_inplace_bool(ndarray[uint8_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[uint8_t, ndim=2] mask, * limit=None): */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_185backfill_2d_inplace_bool, NULL, __pyx_n_s_222); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1764; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_401, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1764; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":1799 * @cython.boundscheck(False) * @cython.wraparound(False) * def is_monotonic_float64(ndarray[float64_t] arr): # <<<<<<<<<<<<<< * ''' * Returns */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_187is_monotonic_float64, NULL, __pyx_n_s_222); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1799; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_404, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1799; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":1826 * @cython.boundscheck(False) * @cython.wraparound(False) * def is_monotonic_float32(ndarray[float32_t] arr): # <<<<<<<<<<<<<< * ''' * Returns */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_189is_monotonic_float32, NULL, __pyx_n_s_222); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1826; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_407, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1826; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":1853 * @cython.boundscheck(False) * @cython.wraparound(False) * def is_monotonic_object(ndarray[object] arr): # <<<<<<<<<<<<<< * ''' * Returns */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_191is_monotonic_object, NULL, __pyx_n_s_222); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1853; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s__is_monotonic_object, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1853; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":1880 * @cython.boundscheck(False) * @cython.wraparound(False) * def is_monotonic_int32(ndarray[int32_t] arr): # <<<<<<<<<<<<<< * ''' * Returns */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_193is_monotonic_int32, NULL, __pyx_n_s_222); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1880; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s__is_monotonic_int32, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1880; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":1907 * @cython.boundscheck(False) * @cython.wraparound(False) * def is_monotonic_int64(ndarray[int64_t] arr): # <<<<<<<<<<<<<< * ''' * Returns */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_195is_monotonic_int64, NULL, __pyx_n_s_222); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1907; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s__is_monotonic_int64, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1907; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":1934 * @cython.boundscheck(False) * @cython.wraparound(False) * def is_monotonic_bool(ndarray[uint8_t] arr): # <<<<<<<<<<<<<< * ''' * Returns */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_197is_monotonic_bool, NULL, __pyx_n_s_222); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1934; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s__is_monotonic_bool, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1934; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":1962 * @cython.wraparound(False) * @cython.boundscheck(False) * def groupby_float64(ndarray[float64_t] index, ndarray labels): # <<<<<<<<<<<<<< * cdef dict result = {} * cdef Py_ssize_t i, length */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_199groupby_float64, NULL, __pyx_n_s_222); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1962; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s__groupby_float64, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1962; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":1990 * @cython.wraparound(False) * @cython.boundscheck(False) * def groupby_float32(ndarray[float32_t] index, ndarray labels): # <<<<<<<<<<<<<< * cdef dict result = {} * cdef Py_ssize_t i, length */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_201groupby_float32, NULL, __pyx_n_s_222); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1990; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s__groupby_float32, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1990; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":2018 * @cython.wraparound(False) * @cython.boundscheck(False) * def groupby_object(ndarray[object] index, ndarray labels): # <<<<<<<<<<<<<< * cdef dict result = {} * cdef Py_ssize_t i, length */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_203groupby_object, NULL, __pyx_n_s_222); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2018; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s__groupby_object, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2018; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":2046 * @cython.wraparound(False) * @cython.boundscheck(False) * def groupby_int32(ndarray[int32_t] index, ndarray labels): # <<<<<<<<<<<<<< * cdef dict result = {} * cdef Py_ssize_t i, length */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_205groupby_int32, NULL, __pyx_n_s_222); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2046; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s__groupby_int32, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2046; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":2074 * @cython.wraparound(False) * @cython.boundscheck(False) * def groupby_int64(ndarray[int64_t] index, ndarray labels): # <<<<<<<<<<<<<< * cdef dict result = {} * cdef Py_ssize_t i, length */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_207groupby_int64, NULL, __pyx_n_s_222); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2074; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s__groupby_int64, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2074; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":2102 * @cython.wraparound(False) * @cython.boundscheck(False) * def groupby_bool(ndarray[uint8_t] index, ndarray labels): # <<<<<<<<<<<<<< * cdef dict result = {} * cdef Py_ssize_t i, length */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_209groupby_bool, NULL, __pyx_n_s_222); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2102; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s__groupby_bool, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2102; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":2131 * @cython.wraparound(False) * @cython.boundscheck(False) * def arrmap_float64(ndarray[float64_t] index, object func): # <<<<<<<<<<<<<< * cdef Py_ssize_t length = index.shape[0] * cdef Py_ssize_t i = 0 */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_211arrmap_float64, NULL, __pyx_n_s_222); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2131; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s__arrmap_float64, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2131; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":2146 * @cython.wraparound(False) * @cython.boundscheck(False) * def arrmap_float32(ndarray[float32_t] index, object func): # <<<<<<<<<<<<<< * cdef Py_ssize_t length = index.shape[0] * cdef Py_ssize_t i = 0 */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_213arrmap_float32, NULL, __pyx_n_s_222); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2146; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s__arrmap_float32, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2146; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":2161 * @cython.wraparound(False) * @cython.boundscheck(False) * def arrmap_object(ndarray[object] index, object func): # <<<<<<<<<<<<<< * cdef Py_ssize_t length = index.shape[0] * cdef Py_ssize_t i = 0 */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_215arrmap_object, NULL, __pyx_n_s_222); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2161; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s__arrmap_object, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2161; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":2176 * @cython.wraparound(False) * @cython.boundscheck(False) * def arrmap_int32(ndarray[int32_t] index, object func): # <<<<<<<<<<<<<< * cdef Py_ssize_t length = index.shape[0] * cdef Py_ssize_t i = 0 */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_217arrmap_int32, NULL, __pyx_n_s_222); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2176; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s__arrmap_int32, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2176; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":2191 * @cython.wraparound(False) * @cython.boundscheck(False) * def arrmap_int64(ndarray[int64_t] index, object func): # <<<<<<<<<<<<<< * cdef Py_ssize_t length = index.shape[0] * cdef Py_ssize_t i = 0 */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_219arrmap_int64, NULL, __pyx_n_s_222); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2191; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s__arrmap_int64, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2191; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":2206 * @cython.wraparound(False) * @cython.boundscheck(False) * def arrmap_bool(ndarray[uint8_t] index, object func): # <<<<<<<<<<<<<< * cdef Py_ssize_t length = index.shape[0] * cdef Py_ssize_t i = 0 */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_221arrmap_bool, NULL, __pyx_n_s_222); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2206; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s__arrmap_bool, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2206; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":2224 * ndarray[int64_t] indexer, * ndarray[uint8_t] out, * fill_value=np.nan): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n, idx */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2224; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__nan); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2224; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_k_108 = __pyx_t_3; __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/generated.pyx":2221 * * @cython.wraparound(False) * def take_1d_bool_bool(ndarray[uint8_t] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[uint8_t] out, */ __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_223take_1d_bool_bool, NULL, __pyx_n_s_222); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2221; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s__take_1d_bool_bool, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2221; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/generated.pyx":2243 * ndarray[int64_t] indexer, * ndarray[object] out, * fill_value=np.nan): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n, idx */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2243; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s__nan); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2243; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_k_109 = __pyx_t_2; __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":2240 * * @cython.wraparound(False) * def take_1d_bool_object(ndarray[uint8_t] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[object] out, */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_225take_1d_bool_object, NULL, __pyx_n_s_222); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2240; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s__take_1d_bool_object, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2240; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":2262 * ndarray[int64_t] indexer, * ndarray[int8_t] out, * fill_value=np.nan): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n, idx */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2262; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__nan); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2262; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_k_110 = __pyx_t_3; __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/generated.pyx":2259 * * @cython.wraparound(False) * def take_1d_int8_int8(ndarray[int8_t] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[int8_t] out, */ __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_227take_1d_int8_int8, NULL, __pyx_n_s_222); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2259; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s__take_1d_int8_int8, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2259; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/generated.pyx":2281 * ndarray[int64_t] indexer, * ndarray[int32_t] out, * fill_value=np.nan): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n, idx */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2281; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s__nan); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2281; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_k_111 = __pyx_t_2; __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":2278 * * @cython.wraparound(False) * def take_1d_int8_int32(ndarray[int8_t] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[int32_t] out, */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_229take_1d_int8_int32, NULL, __pyx_n_s_222); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2278; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s__take_1d_int8_int32, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2278; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":2300 * ndarray[int64_t] indexer, * ndarray[int64_t] out, * fill_value=np.nan): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n, idx */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2300; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__nan); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2300; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_k_112 = __pyx_t_3; __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/generated.pyx":2297 * * @cython.wraparound(False) * def take_1d_int8_int64(ndarray[int8_t] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[int64_t] out, */ __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_231take_1d_int8_int64, NULL, __pyx_n_s_222); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2297; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s__take_1d_int8_int64, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2297; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/generated.pyx":2319 * ndarray[int64_t] indexer, * ndarray[float64_t] out, * fill_value=np.nan): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n, idx */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2319; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s__nan); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2319; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_k_113 = __pyx_t_2; __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":2316 * * @cython.wraparound(False) * def take_1d_int8_float64(ndarray[int8_t] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[float64_t] out, */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_233take_1d_int8_float64, NULL, __pyx_n_s_222); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2316; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_452, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2316; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":2338 * ndarray[int64_t] indexer, * ndarray[int16_t] out, * fill_value=np.nan): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n, idx */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2338; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__nan); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2338; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_k_114 = __pyx_t_3; __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/generated.pyx":2335 * * @cython.wraparound(False) * def take_1d_int16_int16(ndarray[int16_t] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[int16_t] out, */ __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_235take_1d_int16_int16, NULL, __pyx_n_s_222); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2335; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s__take_1d_int16_int16, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2335; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/generated.pyx":2357 * ndarray[int64_t] indexer, * ndarray[int32_t] out, * fill_value=np.nan): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n, idx */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2357; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s__nan); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2357; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_k_115 = __pyx_t_2; __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":2354 * * @cython.wraparound(False) * def take_1d_int16_int32(ndarray[int16_t] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[int32_t] out, */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_237take_1d_int16_int32, NULL, __pyx_n_s_222); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2354; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s__take_1d_int16_int32, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2354; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":2376 * ndarray[int64_t] indexer, * ndarray[int64_t] out, * fill_value=np.nan): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n, idx */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2376; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__nan); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2376; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_k_116 = __pyx_t_3; __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/generated.pyx":2373 * * @cython.wraparound(False) * def take_1d_int16_int64(ndarray[int16_t] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[int64_t] out, */ __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_239take_1d_int16_int64, NULL, __pyx_n_s_222); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2373; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s__take_1d_int16_int64, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2373; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/generated.pyx":2395 * ndarray[int64_t] indexer, * ndarray[float64_t] out, * fill_value=np.nan): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n, idx */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2395; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s__nan); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2395; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_k_117 = __pyx_t_2; __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":2392 * * @cython.wraparound(False) * def take_1d_int16_float64(ndarray[int16_t] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[float64_t] out, */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_241take_1d_int16_float64, NULL, __pyx_n_s_222); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2392; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_461, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2392; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":2414 * ndarray[int64_t] indexer, * ndarray[int32_t] out, * fill_value=np.nan): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n, idx */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2414; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__nan); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2414; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_k_118 = __pyx_t_3; __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/generated.pyx":2411 * * @cython.wraparound(False) * def take_1d_int32_int32(ndarray[int32_t] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[int32_t] out, */ __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_243take_1d_int32_int32, NULL, __pyx_n_s_222); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2411; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s__take_1d_int32_int32, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2411; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/generated.pyx":2433 * ndarray[int64_t] indexer, * ndarray[int64_t] out, * fill_value=np.nan): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n, idx */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2433; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s__nan); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2433; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_k_119 = __pyx_t_2; __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":2430 * * @cython.wraparound(False) * def take_1d_int32_int64(ndarray[int32_t] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[int64_t] out, */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_245take_1d_int32_int64, NULL, __pyx_n_s_222); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2430; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s__take_1d_int32_int64, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2430; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":2452 * ndarray[int64_t] indexer, * ndarray[float64_t] out, * fill_value=np.nan): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n, idx */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2452; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__nan); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2452; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_k_120 = __pyx_t_3; __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/generated.pyx":2449 * * @cython.wraparound(False) * def take_1d_int32_float64(ndarray[int32_t] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[float64_t] out, */ __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_247take_1d_int32_float64, NULL, __pyx_n_s_222); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2449; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_468, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2449; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/generated.pyx":2471 * ndarray[int64_t] indexer, * ndarray[int64_t] out, * fill_value=np.nan): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n, idx */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2471; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s__nan); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2471; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_k_121 = __pyx_t_2; __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":2468 * * @cython.wraparound(False) * def take_1d_int64_int64(ndarray[int64_t] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[int64_t] out, */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_249take_1d_int64_int64, NULL, __pyx_n_s_222); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2468; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s__take_1d_int64_int64, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2468; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":2490 * ndarray[int64_t] indexer, * ndarray[float64_t] out, * fill_value=np.nan): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n, idx */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2490; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__nan); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2490; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_k_122 = __pyx_t_3; __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/generated.pyx":2487 * * @cython.wraparound(False) * def take_1d_int64_float64(ndarray[int64_t] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[float64_t] out, */ __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_251take_1d_int64_float64, NULL, __pyx_n_s_222); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2487; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_473, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2487; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/generated.pyx":2509 * ndarray[int64_t] indexer, * ndarray[float32_t] out, * fill_value=np.nan): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n, idx */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2509; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s__nan); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2509; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_k_123 = __pyx_t_2; __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":2506 * * @cython.wraparound(False) * def take_1d_float32_float32(ndarray[float32_t] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[float32_t] out, */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_253take_1d_float32_float32, NULL, __pyx_n_s_222); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2506; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_476, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2506; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":2528 * ndarray[int64_t] indexer, * ndarray[float64_t] out, * fill_value=np.nan): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n, idx */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2528; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__nan); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2528; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_k_124 = __pyx_t_3; __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/generated.pyx":2525 * * @cython.wraparound(False) * def take_1d_float32_float64(ndarray[float32_t] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[float64_t] out, */ __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_255take_1d_float32_float64, NULL, __pyx_n_s_222); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2525; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_479, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2525; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/generated.pyx":2547 * ndarray[int64_t] indexer, * ndarray[float64_t] out, * fill_value=np.nan): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n, idx */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2547; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s__nan); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2547; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_k_125 = __pyx_t_2; __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":2544 * * @cython.wraparound(False) * def take_1d_float64_float64(ndarray[float64_t] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[float64_t] out, */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_257take_1d_float64_float64, NULL, __pyx_n_s_222); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2544; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_482, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2544; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":2566 * ndarray[int64_t] indexer, * ndarray[object] out, * fill_value=np.nan): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n, idx */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2566; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__nan); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2566; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_k_126 = __pyx_t_3; __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/generated.pyx":2563 * * @cython.wraparound(False) * def take_1d_object_object(ndarray[object] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[object] out, */ __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_259take_1d_object_object, NULL, __pyx_n_s_222); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2563; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_485, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2563; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/generated.pyx":2587 * ndarray[int64_t] indexer, * ndarray[uint8_t, ndim=2] out, * fill_value=np.nan): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, j, k, n, idx */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2587; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s__nan); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2587; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_k_127 = __pyx_t_2; __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":2584 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_axis0_bool_bool(ndarray[uint8_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[uint8_t, ndim=2] out, */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_261take_2d_axis0_bool_bool, NULL, __pyx_n_s_222); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2584; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_488, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2584; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":2630 * ndarray[int64_t] indexer, * ndarray[object, ndim=2] out, * fill_value=np.nan): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, j, k, n, idx */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2630; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__nan); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2630; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_k_128 = __pyx_t_3; __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/generated.pyx":2627 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_axis0_bool_object(ndarray[uint8_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[object, ndim=2] out, */ __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_263take_2d_axis0_bool_object, NULL, __pyx_n_s_222); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2627; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_491, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2627; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/generated.pyx":2673 * ndarray[int64_t] indexer, * ndarray[int8_t, ndim=2] out, * fill_value=np.nan): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, j, k, n, idx */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2673; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s__nan); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2673; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_k_129 = __pyx_t_2; __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":2670 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_axis0_int8_int8(ndarray[int8_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[int8_t, ndim=2] out, */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_265take_2d_axis0_int8_int8, NULL, __pyx_n_s_222); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2670; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_494, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2670; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":2716 * ndarray[int64_t] indexer, * ndarray[int32_t, ndim=2] out, * fill_value=np.nan): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, j, k, n, idx */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2716; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__nan); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2716; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_k_130 = __pyx_t_3; __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/generated.pyx":2713 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_axis0_int8_int32(ndarray[int8_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[int32_t, ndim=2] out, */ __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_267take_2d_axis0_int8_int32, NULL, __pyx_n_s_222); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2713; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_497, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2713; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/generated.pyx":2759 * ndarray[int64_t] indexer, * ndarray[int64_t, ndim=2] out, * fill_value=np.nan): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, j, k, n, idx */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2759; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s__nan); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2759; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_k_131 = __pyx_t_2; __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":2756 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_axis0_int8_int64(ndarray[int8_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[int64_t, ndim=2] out, */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_269take_2d_axis0_int8_int64, NULL, __pyx_n_s_222); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2756; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_500, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2756; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":2802 * ndarray[int64_t] indexer, * ndarray[float64_t, ndim=2] out, * fill_value=np.nan): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, j, k, n, idx */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2802; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__nan); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2802; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_k_132 = __pyx_t_3; __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/generated.pyx":2799 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_axis0_int8_float64(ndarray[int8_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[float64_t, ndim=2] out, */ __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_271take_2d_axis0_int8_float64, NULL, __pyx_n_s_222); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2799; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_503, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2799; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/generated.pyx":2845 * ndarray[int64_t] indexer, * ndarray[int16_t, ndim=2] out, * fill_value=np.nan): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, j, k, n, idx */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2845; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s__nan); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2845; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_k_133 = __pyx_t_2; __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":2842 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_axis0_int16_int16(ndarray[int16_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[int16_t, ndim=2] out, */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_273take_2d_axis0_int16_int16, NULL, __pyx_n_s_222); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2842; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_506, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2842; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":2888 * ndarray[int64_t] indexer, * ndarray[int32_t, ndim=2] out, * fill_value=np.nan): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, j, k, n, idx */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2888; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__nan); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2888; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_k_134 = __pyx_t_3; __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/generated.pyx":2885 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_axis0_int16_int32(ndarray[int16_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[int32_t, ndim=2] out, */ __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_275take_2d_axis0_int16_int32, NULL, __pyx_n_s_222); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2885; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_509, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2885; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/generated.pyx":2931 * ndarray[int64_t] indexer, * ndarray[int64_t, ndim=2] out, * fill_value=np.nan): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, j, k, n, idx */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2931; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s__nan); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2931; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_k_135 = __pyx_t_2; __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":2928 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_axis0_int16_int64(ndarray[int16_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[int64_t, ndim=2] out, */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_277take_2d_axis0_int16_int64, NULL, __pyx_n_s_222); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2928; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_512, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2928; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":2974 * ndarray[int64_t] indexer, * ndarray[float64_t, ndim=2] out, * fill_value=np.nan): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, j, k, n, idx */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2974; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__nan); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2974; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_k_136 = __pyx_t_3; __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/generated.pyx":2971 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_axis0_int16_float64(ndarray[int16_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[float64_t, ndim=2] out, */ __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_279take_2d_axis0_int16_float64, NULL, __pyx_n_s_222); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2971; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_515, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 2971; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/generated.pyx":3017 * ndarray[int64_t] indexer, * ndarray[int32_t, ndim=2] out, * fill_value=np.nan): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, j, k, n, idx */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3017; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s__nan); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3017; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_k_137 = __pyx_t_2; __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":3014 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_axis0_int32_int32(ndarray[int32_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[int32_t, ndim=2] out, */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_281take_2d_axis0_int32_int32, NULL, __pyx_n_s_222); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3014; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_518, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3014; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":3060 * ndarray[int64_t] indexer, * ndarray[int64_t, ndim=2] out, * fill_value=np.nan): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, j, k, n, idx */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3060; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__nan); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3060; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_k_138 = __pyx_t_3; __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/generated.pyx":3057 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_axis0_int32_int64(ndarray[int32_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[int64_t, ndim=2] out, */ __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_283take_2d_axis0_int32_int64, NULL, __pyx_n_s_222); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3057; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_521, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3057; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/generated.pyx":3103 * ndarray[int64_t] indexer, * ndarray[float64_t, ndim=2] out, * fill_value=np.nan): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, j, k, n, idx */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3103; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s__nan); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3103; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_k_139 = __pyx_t_2; __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":3100 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_axis0_int32_float64(ndarray[int32_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[float64_t, ndim=2] out, */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_285take_2d_axis0_int32_float64, NULL, __pyx_n_s_222); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3100; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_524, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3100; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":3146 * ndarray[int64_t] indexer, * ndarray[int64_t, ndim=2] out, * fill_value=np.nan): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, j, k, n, idx */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3146; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__nan); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3146; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_k_140 = __pyx_t_3; __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/generated.pyx":3143 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_axis0_int64_int64(ndarray[int64_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[int64_t, ndim=2] out, */ __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_287take_2d_axis0_int64_int64, NULL, __pyx_n_s_222); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3143; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_527, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3143; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/generated.pyx":3189 * ndarray[int64_t] indexer, * ndarray[float64_t, ndim=2] out, * fill_value=np.nan): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, j, k, n, idx */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3189; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s__nan); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3189; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_k_141 = __pyx_t_2; __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":3186 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_axis0_int64_float64(ndarray[int64_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[float64_t, ndim=2] out, */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_289take_2d_axis0_int64_float64, NULL, __pyx_n_s_222); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3186; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_530, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3186; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":3232 * ndarray[int64_t] indexer, * ndarray[float32_t, ndim=2] out, * fill_value=np.nan): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, j, k, n, idx */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3232; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__nan); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3232; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_k_142 = __pyx_t_3; __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/generated.pyx":3229 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_axis0_float32_float32(ndarray[float32_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[float32_t, ndim=2] out, */ __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_291take_2d_axis0_float32_float32, NULL, __pyx_n_s_222); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3229; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_533, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3229; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/generated.pyx":3275 * ndarray[int64_t] indexer, * ndarray[float64_t, ndim=2] out, * fill_value=np.nan): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, j, k, n, idx */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3275; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s__nan); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3275; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_k_143 = __pyx_t_2; __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":3272 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_axis0_float32_float64(ndarray[float32_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[float64_t, ndim=2] out, */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_293take_2d_axis0_float32_float64, NULL, __pyx_n_s_222); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3272; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_536, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3272; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":3318 * ndarray[int64_t] indexer, * ndarray[float64_t, ndim=2] out, * fill_value=np.nan): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, j, k, n, idx */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3318; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__nan); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3318; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_k_144 = __pyx_t_3; __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/generated.pyx":3315 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_axis0_float64_float64(ndarray[float64_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[float64_t, ndim=2] out, */ __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_295take_2d_axis0_float64_float64, NULL, __pyx_n_s_222); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3315; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_539, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3315; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/generated.pyx":3361 * ndarray[int64_t] indexer, * ndarray[object, ndim=2] out, * fill_value=np.nan): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, j, k, n, idx */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3361; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s__nan); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3361; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_k_145 = __pyx_t_2; __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":3358 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_axis0_object_object(ndarray[object, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[object, ndim=2] out, */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_297take_2d_axis0_object_object, NULL, __pyx_n_s_222); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3358; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_542, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3358; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":3405 * ndarray[int64_t] indexer, * ndarray[uint8_t, ndim=2] out, * fill_value=np.nan): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, j, k, n, idx */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3405; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__nan); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3405; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_k_146 = __pyx_t_3; __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/generated.pyx":3402 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_axis1_bool_bool(ndarray[uint8_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[uint8_t, ndim=2] out, */ __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_299take_2d_axis1_bool_bool, NULL, __pyx_n_s_222); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3402; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_545, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3402; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/generated.pyx":3451 * ndarray[int64_t] indexer, * ndarray[object, ndim=2] out, * fill_value=np.nan): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, j, k, n, idx */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3451; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s__nan); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3451; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_k_147 = __pyx_t_2; __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":3448 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_axis1_bool_object(ndarray[uint8_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[object, ndim=2] out, */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_301take_2d_axis1_bool_object, NULL, __pyx_n_s_222); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3448; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_548, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3448; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":3497 * ndarray[int64_t] indexer, * ndarray[int8_t, ndim=2] out, * fill_value=np.nan): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, j, k, n, idx */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3497; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__nan); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3497; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_k_148 = __pyx_t_3; __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/generated.pyx":3494 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_axis1_int8_int8(ndarray[int8_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[int8_t, ndim=2] out, */ __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_303take_2d_axis1_int8_int8, NULL, __pyx_n_s_222); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3494; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_551, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3494; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/generated.pyx":3543 * ndarray[int64_t] indexer, * ndarray[int32_t, ndim=2] out, * fill_value=np.nan): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, j, k, n, idx */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3543; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s__nan); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3543; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_k_149 = __pyx_t_2; __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":3540 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_axis1_int8_int32(ndarray[int8_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[int32_t, ndim=2] out, */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_305take_2d_axis1_int8_int32, NULL, __pyx_n_s_222); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3540; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_554, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3540; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":3589 * ndarray[int64_t] indexer, * ndarray[int64_t, ndim=2] out, * fill_value=np.nan): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, j, k, n, idx */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3589; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__nan); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3589; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_k_150 = __pyx_t_3; __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/generated.pyx":3586 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_axis1_int8_int64(ndarray[int8_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[int64_t, ndim=2] out, */ __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_307take_2d_axis1_int8_int64, NULL, __pyx_n_s_222); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3586; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_557, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3586; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/generated.pyx":3635 * ndarray[int64_t] indexer, * ndarray[float64_t, ndim=2] out, * fill_value=np.nan): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, j, k, n, idx */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3635; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s__nan); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3635; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_k_151 = __pyx_t_2; __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":3632 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_axis1_int8_float64(ndarray[int8_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[float64_t, ndim=2] out, */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_309take_2d_axis1_int8_float64, NULL, __pyx_n_s_222); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3632; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_560, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3632; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":3681 * ndarray[int64_t] indexer, * ndarray[int16_t, ndim=2] out, * fill_value=np.nan): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, j, k, n, idx */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3681; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__nan); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3681; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_k_152 = __pyx_t_3; __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/generated.pyx":3678 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_axis1_int16_int16(ndarray[int16_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[int16_t, ndim=2] out, */ __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_311take_2d_axis1_int16_int16, NULL, __pyx_n_s_222); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3678; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_563, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3678; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/generated.pyx":3727 * ndarray[int64_t] indexer, * ndarray[int32_t, ndim=2] out, * fill_value=np.nan): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, j, k, n, idx */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3727; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s__nan); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3727; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_k_153 = __pyx_t_2; __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":3724 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_axis1_int16_int32(ndarray[int16_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[int32_t, ndim=2] out, */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_313take_2d_axis1_int16_int32, NULL, __pyx_n_s_222); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3724; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_566, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3724; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":3773 * ndarray[int64_t] indexer, * ndarray[int64_t, ndim=2] out, * fill_value=np.nan): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, j, k, n, idx */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3773; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__nan); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3773; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_k_154 = __pyx_t_3; __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/generated.pyx":3770 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_axis1_int16_int64(ndarray[int16_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[int64_t, ndim=2] out, */ __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_315take_2d_axis1_int16_int64, NULL, __pyx_n_s_222); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3770; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_569, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3770; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/generated.pyx":3819 * ndarray[int64_t] indexer, * ndarray[float64_t, ndim=2] out, * fill_value=np.nan): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, j, k, n, idx */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3819; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s__nan); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3819; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_k_155 = __pyx_t_2; __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":3816 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_axis1_int16_float64(ndarray[int16_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[float64_t, ndim=2] out, */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_317take_2d_axis1_int16_float64, NULL, __pyx_n_s_222); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3816; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_572, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3816; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":3865 * ndarray[int64_t] indexer, * ndarray[int32_t, ndim=2] out, * fill_value=np.nan): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, j, k, n, idx */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3865; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__nan); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3865; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_k_156 = __pyx_t_3; __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/generated.pyx":3862 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_axis1_int32_int32(ndarray[int32_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[int32_t, ndim=2] out, */ __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_319take_2d_axis1_int32_int32, NULL, __pyx_n_s_222); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3862; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_575, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3862; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/generated.pyx":3911 * ndarray[int64_t] indexer, * ndarray[int64_t, ndim=2] out, * fill_value=np.nan): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, j, k, n, idx */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3911; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s__nan); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3911; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_k_157 = __pyx_t_2; __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":3908 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_axis1_int32_int64(ndarray[int32_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[int64_t, ndim=2] out, */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_321take_2d_axis1_int32_int64, NULL, __pyx_n_s_222); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3908; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_578, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3908; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":3957 * ndarray[int64_t] indexer, * ndarray[float64_t, ndim=2] out, * fill_value=np.nan): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, j, k, n, idx */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3957; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__nan); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3957; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_k_158 = __pyx_t_3; __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/generated.pyx":3954 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_axis1_int32_float64(ndarray[int32_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[float64_t, ndim=2] out, */ __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_323take_2d_axis1_int32_float64, NULL, __pyx_n_s_222); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3954; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_581, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3954; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/generated.pyx":4003 * ndarray[int64_t] indexer, * ndarray[int64_t, ndim=2] out, * fill_value=np.nan): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, j, k, n, idx */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4003; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s__nan); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4003; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_k_159 = __pyx_t_2; __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":4000 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_axis1_int64_int64(ndarray[int64_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[int64_t, ndim=2] out, */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_325take_2d_axis1_int64_int64, NULL, __pyx_n_s_222); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4000; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_584, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4000; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":4049 * ndarray[int64_t] indexer, * ndarray[float64_t, ndim=2] out, * fill_value=np.nan): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, j, k, n, idx */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4049; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__nan); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4049; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_k_160 = __pyx_t_3; __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/generated.pyx":4046 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_axis1_int64_float64(ndarray[int64_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[float64_t, ndim=2] out, */ __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_327take_2d_axis1_int64_float64, NULL, __pyx_n_s_222); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4046; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_587, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4046; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/generated.pyx":4095 * ndarray[int64_t] indexer, * ndarray[float32_t, ndim=2] out, * fill_value=np.nan): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, j, k, n, idx */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4095; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s__nan); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4095; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_k_161 = __pyx_t_2; __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":4092 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_axis1_float32_float32(ndarray[float32_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[float32_t, ndim=2] out, */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_329take_2d_axis1_float32_float32, NULL, __pyx_n_s_222); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4092; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_590, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4092; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":4141 * ndarray[int64_t] indexer, * ndarray[float64_t, ndim=2] out, * fill_value=np.nan): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, j, k, n, idx */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4141; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__nan); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4141; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_k_162 = __pyx_t_3; __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/generated.pyx":4138 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_axis1_float32_float64(ndarray[float32_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[float64_t, ndim=2] out, */ __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_331take_2d_axis1_float32_float64, NULL, __pyx_n_s_222); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4138; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_593, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4138; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/generated.pyx":4187 * ndarray[int64_t] indexer, * ndarray[float64_t, ndim=2] out, * fill_value=np.nan): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, j, k, n, idx */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4187; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s__nan); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4187; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_k_163 = __pyx_t_2; __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":4184 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_axis1_float64_float64(ndarray[float64_t, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[float64_t, ndim=2] out, */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_333take_2d_axis1_float64_float64, NULL, __pyx_n_s_222); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4184; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_46, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4184; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":4233 * ndarray[int64_t] indexer, * ndarray[object, ndim=2] out, * fill_value=np.nan): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, j, k, n, idx */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4233; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__nan); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4233; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_k_164 = __pyx_t_3; __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/generated.pyx":4230 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_axis1_object_object(ndarray[object, ndim=2] values, # <<<<<<<<<<<<<< * ndarray[int64_t] indexer, * ndarray[object, ndim=2] out, */ __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_335take_2d_axis1_object_object, NULL, __pyx_n_s_222); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4230; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_598, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4230; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/generated.pyx":4280 * indexer, * ndarray[uint8_t, ndim=2] out, * fill_value=np.nan): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, j, k, n, idx */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4280; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s__nan); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4280; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_k_165 = __pyx_t_2; __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":4277 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_multi_bool_bool(ndarray[uint8_t, ndim=2] values, # <<<<<<<<<<<<<< * indexer, * ndarray[uint8_t, ndim=2] out, */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_337take_2d_multi_bool_bool, NULL, __pyx_n_s_222); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4277; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_601, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4277; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":4308 * indexer, * ndarray[object, ndim=2] out, * fill_value=np.nan): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, j, k, n, idx */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4308; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__nan); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4308; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_k_166 = __pyx_t_3; __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/generated.pyx":4305 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_multi_bool_object(ndarray[uint8_t, ndim=2] values, # <<<<<<<<<<<<<< * indexer, * ndarray[object, ndim=2] out, */ __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_339take_2d_multi_bool_object, NULL, __pyx_n_s_222); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4305; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_604, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4305; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/generated.pyx":4336 * indexer, * ndarray[int8_t, ndim=2] out, * fill_value=np.nan): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, j, k, n, idx */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4336; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s__nan); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4336; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_k_167 = __pyx_t_2; __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":4333 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_multi_int8_int8(ndarray[int8_t, ndim=2] values, # <<<<<<<<<<<<<< * indexer, * ndarray[int8_t, ndim=2] out, */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_341take_2d_multi_int8_int8, NULL, __pyx_n_s_222); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4333; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_607, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4333; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":4364 * indexer, * ndarray[int32_t, ndim=2] out, * fill_value=np.nan): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, j, k, n, idx */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4364; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__nan); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4364; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_k_168 = __pyx_t_3; __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/generated.pyx":4361 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_multi_int8_int32(ndarray[int8_t, ndim=2] values, # <<<<<<<<<<<<<< * indexer, * ndarray[int32_t, ndim=2] out, */ __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_343take_2d_multi_int8_int32, NULL, __pyx_n_s_222); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4361; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_610, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4361; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/generated.pyx":4392 * indexer, * ndarray[int64_t, ndim=2] out, * fill_value=np.nan): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, j, k, n, idx */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4392; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s__nan); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4392; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_k_169 = __pyx_t_2; __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":4389 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_multi_int8_int64(ndarray[int8_t, ndim=2] values, # <<<<<<<<<<<<<< * indexer, * ndarray[int64_t, ndim=2] out, */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_345take_2d_multi_int8_int64, NULL, __pyx_n_s_222); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4389; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_613, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4389; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":4420 * indexer, * ndarray[float64_t, ndim=2] out, * fill_value=np.nan): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, j, k, n, idx */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4420; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__nan); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4420; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_k_170 = __pyx_t_3; __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/generated.pyx":4417 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_multi_int8_float64(ndarray[int8_t, ndim=2] values, # <<<<<<<<<<<<<< * indexer, * ndarray[float64_t, ndim=2] out, */ __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_347take_2d_multi_int8_float64, NULL, __pyx_n_s_222); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4417; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_616, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4417; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/generated.pyx":4448 * indexer, * ndarray[int16_t, ndim=2] out, * fill_value=np.nan): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, j, k, n, idx */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4448; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s__nan); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4448; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_k_171 = __pyx_t_2; __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":4445 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_multi_int16_int16(ndarray[int16_t, ndim=2] values, # <<<<<<<<<<<<<< * indexer, * ndarray[int16_t, ndim=2] out, */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_349take_2d_multi_int16_int16, NULL, __pyx_n_s_222); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4445; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_619, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4445; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":4476 * indexer, * ndarray[int32_t, ndim=2] out, * fill_value=np.nan): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, j, k, n, idx */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4476; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__nan); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4476; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_k_172 = __pyx_t_3; __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/generated.pyx":4473 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_multi_int16_int32(ndarray[int16_t, ndim=2] values, # <<<<<<<<<<<<<< * indexer, * ndarray[int32_t, ndim=2] out, */ __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_351take_2d_multi_int16_int32, NULL, __pyx_n_s_222); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4473; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_622, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4473; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/generated.pyx":4504 * indexer, * ndarray[int64_t, ndim=2] out, * fill_value=np.nan): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, j, k, n, idx */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4504; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s__nan); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4504; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_k_173 = __pyx_t_2; __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":4501 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_multi_int16_int64(ndarray[int16_t, ndim=2] values, # <<<<<<<<<<<<<< * indexer, * ndarray[int64_t, ndim=2] out, */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_353take_2d_multi_int16_int64, NULL, __pyx_n_s_222); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4501; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_625, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4501; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":4532 * indexer, * ndarray[float64_t, ndim=2] out, * fill_value=np.nan): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, j, k, n, idx */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4532; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__nan); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4532; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_k_174 = __pyx_t_3; __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/generated.pyx":4529 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_multi_int16_float64(ndarray[int16_t, ndim=2] values, # <<<<<<<<<<<<<< * indexer, * ndarray[float64_t, ndim=2] out, */ __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_355take_2d_multi_int16_float64, NULL, __pyx_n_s_222); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4529; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_628, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4529; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/generated.pyx":4560 * indexer, * ndarray[int32_t, ndim=2] out, * fill_value=np.nan): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, j, k, n, idx */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4560; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s__nan); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4560; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_k_175 = __pyx_t_2; __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":4557 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_multi_int32_int32(ndarray[int32_t, ndim=2] values, # <<<<<<<<<<<<<< * indexer, * ndarray[int32_t, ndim=2] out, */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_357take_2d_multi_int32_int32, NULL, __pyx_n_s_222); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4557; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_631, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4557; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":4588 * indexer, * ndarray[int64_t, ndim=2] out, * fill_value=np.nan): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, j, k, n, idx */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4588; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__nan); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4588; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_k_176 = __pyx_t_3; __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/generated.pyx":4585 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_multi_int32_int64(ndarray[int32_t, ndim=2] values, # <<<<<<<<<<<<<< * indexer, * ndarray[int64_t, ndim=2] out, */ __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_359take_2d_multi_int32_int64, NULL, __pyx_n_s_222); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4585; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_634, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4585; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/generated.pyx":4616 * indexer, * ndarray[float64_t, ndim=2] out, * fill_value=np.nan): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, j, k, n, idx */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4616; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s__nan); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4616; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_k_177 = __pyx_t_2; __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":4613 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_multi_int32_float64(ndarray[int32_t, ndim=2] values, # <<<<<<<<<<<<<< * indexer, * ndarray[float64_t, ndim=2] out, */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_361take_2d_multi_int32_float64, NULL, __pyx_n_s_222); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4613; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_637, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4613; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":4644 * indexer, * ndarray[int64_t, ndim=2] out, * fill_value=np.nan): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, j, k, n, idx */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4644; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__nan); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4644; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_k_178 = __pyx_t_3; __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/generated.pyx":4641 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_multi_int64_int64(ndarray[int64_t, ndim=2] values, # <<<<<<<<<<<<<< * indexer, * ndarray[int64_t, ndim=2] out, */ __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_363take_2d_multi_int64_int64, NULL, __pyx_n_s_222); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4641; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_640, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4641; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/generated.pyx":4672 * indexer, * ndarray[float64_t, ndim=2] out, * fill_value=np.nan): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, j, k, n, idx */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4672; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s__nan); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4672; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_k_179 = __pyx_t_2; __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":4669 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_multi_int64_float64(ndarray[int64_t, ndim=2] values, # <<<<<<<<<<<<<< * indexer, * ndarray[float64_t, ndim=2] out, */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_365take_2d_multi_int64_float64, NULL, __pyx_n_s_222); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4669; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_643, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4669; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":4700 * indexer, * ndarray[float32_t, ndim=2] out, * fill_value=np.nan): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, j, k, n, idx */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4700; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__nan); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4700; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_k_180 = __pyx_t_3; __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/generated.pyx":4697 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_multi_float32_float32(ndarray[float32_t, ndim=2] values, # <<<<<<<<<<<<<< * indexer, * ndarray[float32_t, ndim=2] out, */ __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_367take_2d_multi_float32_float32, NULL, __pyx_n_s_222); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4697; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_646, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4697; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/generated.pyx":4728 * indexer, * ndarray[float64_t, ndim=2] out, * fill_value=np.nan): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, j, k, n, idx */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4728; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s__nan); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4728; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_k_181 = __pyx_t_2; __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":4725 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_multi_float32_float64(ndarray[float32_t, ndim=2] values, # <<<<<<<<<<<<<< * indexer, * ndarray[float64_t, ndim=2] out, */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_369take_2d_multi_float32_float64, NULL, __pyx_n_s_222); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4725; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_649, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4725; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":4756 * indexer, * ndarray[float64_t, ndim=2] out, * fill_value=np.nan): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, j, k, n, idx */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4756; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__nan); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4756; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_k_182 = __pyx_t_3; __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/generated.pyx":4753 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_multi_float64_float64(ndarray[float64_t, ndim=2] values, # <<<<<<<<<<<<<< * indexer, * ndarray[float64_t, ndim=2] out, */ __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_371take_2d_multi_float64_float64, NULL, __pyx_n_s_222); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4753; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_652, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4753; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/src/generated.pyx":4784 * indexer, * ndarray[object, ndim=2] out, * fill_value=np.nan): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, j, k, n, idx */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4784; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s__nan); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4784; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_k_183 = __pyx_t_2; __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":4781 * @cython.wraparound(False) * @cython.boundscheck(False) * def take_2d_multi_object_object(ndarray[object, ndim=2] values, # <<<<<<<<<<<<<< * indexer, * ndarray[object, ndim=2] out, */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_373take_2d_multi_object_object, NULL, __pyx_n_s_222); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4781; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_655, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4781; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":4810 * @cython.boundscheck(False) * @cython.wraparound(False) * def diff_2d_float64(ndarray[float64_t, ndim=2] arr, # <<<<<<<<<<<<<< * ndarray[float64_t, ndim=2] out, * Py_ssize_t periods, int axis): */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_375diff_2d_float64, NULL, __pyx_n_s_222); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4810; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s__diff_2d_float64, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4810; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":4853 * @cython.boundscheck(False) * @cython.wraparound(False) * def diff_2d_float32(ndarray[float32_t, ndim=2] arr, # <<<<<<<<<<<<<< * ndarray[float32_t, ndim=2] out, * Py_ssize_t periods, int axis): */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_377diff_2d_float32, NULL, __pyx_n_s_222); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4853; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s__diff_2d_float32, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4853; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":4896 * @cython.boundscheck(False) * @cython.wraparound(False) * def diff_2d_int8(ndarray[int8_t, ndim=2] arr, # <<<<<<<<<<<<<< * ndarray[float32_t, ndim=2] out, * Py_ssize_t periods, int axis): */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_379diff_2d_int8, NULL, __pyx_n_s_222); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4896; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s__diff_2d_int8, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4896; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":4939 * @cython.boundscheck(False) * @cython.wraparound(False) * def diff_2d_int16(ndarray[int16_t, ndim=2] arr, # <<<<<<<<<<<<<< * ndarray[float32_t, ndim=2] out, * Py_ssize_t periods, int axis): */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_381diff_2d_int16, NULL, __pyx_n_s_222); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4939; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s__diff_2d_int16, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4939; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":4982 * @cython.boundscheck(False) * @cython.wraparound(False) * def diff_2d_int32(ndarray[int32_t, ndim=2] arr, # <<<<<<<<<<<<<< * ndarray[float64_t, ndim=2] out, * Py_ssize_t periods, int axis): */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_383diff_2d_int32, NULL, __pyx_n_s_222); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4982; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s__diff_2d_int32, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 4982; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":5025 * @cython.boundscheck(False) * @cython.wraparound(False) * def diff_2d_int64(ndarray[int64_t, ndim=2] arr, # <<<<<<<<<<<<<< * ndarray[float64_t, ndim=2] out, * Py_ssize_t periods, int axis): */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_385diff_2d_int64, NULL, __pyx_n_s_222); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5025; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s__diff_2d_int64, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5025; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":5069 * @cython.wraparound(False) * @cython.wraparound(False) * def group_last_float64(ndarray[float64_t, ndim=2] out, # <<<<<<<<<<<<<< * ndarray[int64_t] counts, * ndarray[float64_t, ndim=2] values, */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_387group_last_float64, NULL, __pyx_n_s_222); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5069; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s__group_last_float64, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5069; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":5112 * @cython.wraparound(False) * @cython.wraparound(False) * def group_last_float32(ndarray[float32_t, ndim=2] out, # <<<<<<<<<<<<<< * ndarray[int64_t] counts, * ndarray[float32_t, ndim=2] values, */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_389group_last_float32, NULL, __pyx_n_s_222); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5112; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s__group_last_float32, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5112; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":5156 * @cython.wraparound(False) * @cython.wraparound(False) * def group_last_bin_float64(ndarray[float64_t, ndim=2] out, # <<<<<<<<<<<<<< * ndarray[int64_t] counts, * ndarray[float64_t, ndim=2] values, */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_391group_last_bin_float64, NULL, __pyx_n_s_222); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5156; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_674, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5156; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":5200 * @cython.wraparound(False) * @cython.wraparound(False) * def group_last_bin_float32(ndarray[float32_t, ndim=2] out, # <<<<<<<<<<<<<< * ndarray[int64_t] counts, * ndarray[float32_t, ndim=2] values, */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_393group_last_bin_float32, NULL, __pyx_n_s_222); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5200; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_677, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5200; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":5245 * @cython.boundscheck(False) * @cython.wraparound(False) * def group_nth_float64(ndarray[float64_t, ndim=2] out, # <<<<<<<<<<<<<< * ndarray[int64_t] counts, * ndarray[float64_t, ndim=2] values, */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_395group_nth_float64, NULL, __pyx_n_s_222); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5245; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s__group_nth_float64, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5245; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":5289 * @cython.boundscheck(False) * @cython.wraparound(False) * def group_nth_float32(ndarray[float32_t, ndim=2] out, # <<<<<<<<<<<<<< * ndarray[int64_t] counts, * ndarray[float32_t, ndim=2] values, */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_397group_nth_float32, NULL, __pyx_n_s_222); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5289; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s__group_nth_float32, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5289; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":5334 * @cython.boundscheck(False) * @cython.wraparound(False) * def group_nth_bin_float64(ndarray[float64_t, ndim=2] out, # <<<<<<<<<<<<<< * ndarray[int64_t] counts, * ndarray[float64_t, ndim=2] values, */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_399group_nth_bin_float64, NULL, __pyx_n_s_222); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5334; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_684, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5334; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":5379 * @cython.boundscheck(False) * @cython.wraparound(False) * def group_nth_bin_float32(ndarray[float32_t, ndim=2] out, # <<<<<<<<<<<<<< * ndarray[int64_t] counts, * ndarray[float32_t, ndim=2] values, */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_401group_nth_bin_float32, NULL, __pyx_n_s_222); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5379; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_687, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5379; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":5425 * @cython.boundscheck(False) * @cython.wraparound(False) * def group_add_float64(ndarray[float64_t, ndim=2] out, # <<<<<<<<<<<<<< * ndarray[int64_t] counts, * ndarray[float64_t, ndim=2] values, */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_403group_add_float64, NULL, __pyx_n_s_222); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5425; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s__group_add_float64, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5425; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":5481 * @cython.boundscheck(False) * @cython.wraparound(False) * def group_add_float32(ndarray[float32_t, ndim=2] out, # <<<<<<<<<<<<<< * ndarray[int64_t] counts, * ndarray[float32_t, ndim=2] values, */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_405group_add_float32, NULL, __pyx_n_s_222); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5481; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s__group_add_float32, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5481; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":5538 * @cython.boundscheck(False) * @cython.wraparound(False) * def group_add_bin_float64(ndarray[float64_t, ndim=2] out, # <<<<<<<<<<<<<< * ndarray[int64_t] counts, * ndarray[float64_t, ndim=2] values, */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_407group_add_bin_float64, NULL, __pyx_n_s_222); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5538; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_694, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5538; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":5594 * @cython.boundscheck(False) * @cython.wraparound(False) * def group_add_bin_float32(ndarray[float32_t, ndim=2] out, # <<<<<<<<<<<<<< * ndarray[int64_t] counts, * ndarray[float32_t, ndim=2] values, */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_409group_add_bin_float32, NULL, __pyx_n_s_222); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5594; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_697, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5594; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":5651 * @cython.boundscheck(False) * @cython.wraparound(False) * def group_prod_float64(ndarray[float64_t, ndim=2] out, # <<<<<<<<<<<<<< * ndarray[int64_t] counts, * ndarray[float64_t, ndim=2] values, */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_411group_prod_float64, NULL, __pyx_n_s_222); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5651; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s__group_prod_float64, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5651; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":5707 * @cython.boundscheck(False) * @cython.wraparound(False) * def group_prod_float32(ndarray[float32_t, ndim=2] out, # <<<<<<<<<<<<<< * ndarray[int64_t] counts, * ndarray[float32_t, ndim=2] values, */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_413group_prod_float32, NULL, __pyx_n_s_222); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5707; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s__group_prod_float32, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5707; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":5764 * @cython.boundscheck(False) * @cython.wraparound(False) * def group_prod_bin_float64(ndarray[float64_t, ndim=2] out, # <<<<<<<<<<<<<< * ndarray[int64_t] counts, * ndarray[float64_t, ndim=2] values, */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_415group_prod_bin_float64, NULL, __pyx_n_s_222); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5764; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_704, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5764; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":5820 * @cython.boundscheck(False) * @cython.wraparound(False) * def group_prod_bin_float32(ndarray[float32_t, ndim=2] out, # <<<<<<<<<<<<<< * ndarray[int64_t] counts, * ndarray[float32_t, ndim=2] values, */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_417group_prod_bin_float32, NULL, __pyx_n_s_222); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5820; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_707, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5820; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":5877 * @cython.wraparound(False) * @cython.boundscheck(False) * def group_var_float64(ndarray[float64_t, ndim=2] out, # <<<<<<<<<<<<<< * ndarray[int64_t] counts, * ndarray[float64_t, ndim=2] values, */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_419group_var_float64, NULL, __pyx_n_s_222); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5877; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s__group_var_float64, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5877; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":5938 * @cython.wraparound(False) * @cython.boundscheck(False) * def group_var_float32(ndarray[float32_t, ndim=2] out, # <<<<<<<<<<<<<< * ndarray[int64_t] counts, * ndarray[float32_t, ndim=2] values, */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_421group_var_float32, NULL, __pyx_n_s_222); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5938; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s__group_var_float32, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5938; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":6000 * @cython.wraparound(False) * @cython.boundscheck(False) * def group_var_bin_float64(ndarray[float64_t, ndim=2] out, # <<<<<<<<<<<<<< * ndarray[int64_t] counts, * ndarray[float64_t, ndim=2] values, */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_423group_var_bin_float64, NULL, __pyx_n_s_222); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6000; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_714, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6000; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":6061 * @cython.wraparound(False) * @cython.boundscheck(False) * def group_var_bin_float32(ndarray[float32_t, ndim=2] out, # <<<<<<<<<<<<<< * ndarray[int64_t] counts, * ndarray[float32_t, ndim=2] values, */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_425group_var_bin_float32, NULL, __pyx_n_s_222); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6061; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_717, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6061; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":6123 * @cython.wraparound(False) * @cython.boundscheck(False) * def group_mean_float64(ndarray[float64_t, ndim=2] out, # <<<<<<<<<<<<<< * ndarray[int64_t] counts, * ndarray[float64_t, ndim=2] values, */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_427group_mean_float64, NULL, __pyx_n_s_222); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6123; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s__group_mean_float64, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6123; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":6175 * @cython.wraparound(False) * @cython.boundscheck(False) * def group_mean_float32(ndarray[float32_t, ndim=2] out, # <<<<<<<<<<<<<< * ndarray[int64_t] counts, * ndarray[float32_t, ndim=2] values, */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_429group_mean_float32, NULL, __pyx_n_s_222); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6175; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s__group_mean_float32, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6175; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":6227 * * * def group_mean_bin_float64(ndarray[float64_t, ndim=2] out, # <<<<<<<<<<<<<< * ndarray[int64_t] counts, * ndarray[float64_t, ndim=2] values, */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_431group_mean_bin_float64, NULL, __pyx_n_s_222); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6227; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_724, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6227; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":6280 * out[i, j] = sumx[i, j] / count * * def group_mean_bin_float32(ndarray[float32_t, ndim=2] out, # <<<<<<<<<<<<<< * ndarray[int64_t] counts, * ndarray[float32_t, ndim=2] values, */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_433group_mean_bin_float32, NULL, __pyx_n_s_222); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6280; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_727, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6280; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":6335 * @cython.wraparound(False) * @cython.boundscheck(False) * def group_min_float64(ndarray[float64_t, ndim=2] out, # <<<<<<<<<<<<<< * ndarray[int64_t] counts, * ndarray[float64_t, ndim=2] values, */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_435group_min_float64, NULL, __pyx_n_s_222); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6335; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s__group_min_float64, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6335; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":6395 * @cython.wraparound(False) * @cython.boundscheck(False) * def group_min_float32(ndarray[float32_t, ndim=2] out, # <<<<<<<<<<<<<< * ndarray[int64_t] counts, * ndarray[float32_t, ndim=2] values, */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_437group_min_float32, NULL, __pyx_n_s_222); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6395; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s__group_min_float32, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6395; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":6456 * @cython.wraparound(False) * @cython.boundscheck(False) * def group_min_bin_float64(ndarray[float64_t, ndim=2] out, # <<<<<<<<<<<<<< * ndarray[int64_t] counts, * ndarray[float64_t, ndim=2] values, */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_439group_min_bin_float64, NULL, __pyx_n_s_222); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6456; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_734, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6456; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":6517 * @cython.wraparound(False) * @cython.boundscheck(False) * def group_min_bin_float32(ndarray[float32_t, ndim=2] out, # <<<<<<<<<<<<<< * ndarray[int64_t] counts, * ndarray[float32_t, ndim=2] values, */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_441group_min_bin_float32, NULL, __pyx_n_s_222); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6517; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_737, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6517; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":6579 * @cython.wraparound(False) * @cython.boundscheck(False) * def group_max_float64(ndarray[float64_t, ndim=2] out, # <<<<<<<<<<<<<< * ndarray[int64_t] counts, * ndarray[float64_t, ndim=2] values, */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_443group_max_float64, NULL, __pyx_n_s_222); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6579; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s__group_max_float64, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6579; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":6639 * @cython.wraparound(False) * @cython.boundscheck(False) * def group_max_float32(ndarray[float32_t, ndim=2] out, # <<<<<<<<<<<<<< * ndarray[int64_t] counts, * ndarray[float32_t, ndim=2] values, */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_445group_max_float32, NULL, __pyx_n_s_222); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6639; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s__group_max_float32, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6639; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":6700 * @cython.wraparound(False) * @cython.boundscheck(False) * def group_max_bin_float64(ndarray[float64_t, ndim=2] out, # <<<<<<<<<<<<<< * ndarray[int64_t] counts, * ndarray[float64_t, ndim=2] values, */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_447group_max_bin_float64, NULL, __pyx_n_s_222); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6700; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_744, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6700; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":6760 * @cython.wraparound(False) * @cython.boundscheck(False) * def group_max_bin_float32(ndarray[float32_t, ndim=2] out, # <<<<<<<<<<<<<< * ndarray[int64_t] counts, * ndarray[float32_t, ndim=2] values, */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_449group_max_bin_float32, NULL, __pyx_n_s_222); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6760; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_747, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6760; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":6821 * @cython.wraparound(False) * @cython.boundscheck(False) * def group_ohlc_float64(ndarray[float64_t, ndim=2] out, # <<<<<<<<<<<<<< * ndarray[int64_t] counts, * ndarray[float64_t, ndim=2] values, */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_451group_ohlc_float64, NULL, __pyx_n_s_222); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6821; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s__group_ohlc_float64, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6821; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":6894 * @cython.wraparound(False) * @cython.boundscheck(False) * def group_ohlc_float32(ndarray[float32_t, ndim=2] out, # <<<<<<<<<<<<<< * ndarray[int64_t] counts, * ndarray[float32_t, ndim=2] values, */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_453group_ohlc_float32, NULL, __pyx_n_s_222); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6894; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s__group_ohlc_float32, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6894; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":6968 * @cython.wraparound(False) * @cython.boundscheck(False) * def left_join_indexer_unique_float64(ndarray[float64_t] left, # <<<<<<<<<<<<<< * ndarray[float64_t] right): * cdef: */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_455left_join_indexer_unique_float64, NULL, __pyx_n_s_222); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6968; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_754, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6968; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":7013 * @cython.wraparound(False) * @cython.boundscheck(False) * def left_join_indexer_unique_float32(ndarray[float32_t] left, # <<<<<<<<<<<<<< * ndarray[float32_t] right): * cdef: */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_457left_join_indexer_unique_float32, NULL, __pyx_n_s_222); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7013; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_757, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7013; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":7058 * @cython.wraparound(False) * @cython.boundscheck(False) * def left_join_indexer_unique_object(ndarray[object] left, # <<<<<<<<<<<<<< * ndarray[object] right): * cdef: */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_459left_join_indexer_unique_object, NULL, __pyx_n_s_222); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7058; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_760, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7058; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":7103 * @cython.wraparound(False) * @cython.boundscheck(False) * def left_join_indexer_unique_int32(ndarray[int32_t] left, # <<<<<<<<<<<<<< * ndarray[int32_t] right): * cdef: */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_461left_join_indexer_unique_int32, NULL, __pyx_n_s_222); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7103; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_763, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7103; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":7148 * @cython.wraparound(False) * @cython.boundscheck(False) * def left_join_indexer_unique_int64(ndarray[int64_t] left, # <<<<<<<<<<<<<< * ndarray[int64_t] right): * cdef: */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_463left_join_indexer_unique_int64, NULL, __pyx_n_s_222); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7148; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_766, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7148; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":7193 * * * def left_join_indexer_float64(ndarray[float64_t] left, # <<<<<<<<<<<<<< * ndarray[float64_t] right): * ''' */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_465left_join_indexer_float64, NULL, __pyx_n_s_222); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7193; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_769, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7193; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":7295 * * * def left_join_indexer_float32(ndarray[float32_t] left, # <<<<<<<<<<<<<< * ndarray[float32_t] right): * ''' */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_467left_join_indexer_float32, NULL, __pyx_n_s_222); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7295; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_772, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7295; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":7397 * * * def left_join_indexer_object(ndarray[object] left, # <<<<<<<<<<<<<< * ndarray[object] right): * ''' */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_469left_join_indexer_object, NULL, __pyx_n_s_222); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7397; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_775, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7397; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":7499 * * * def left_join_indexer_int32(ndarray[int32_t] left, # <<<<<<<<<<<<<< * ndarray[int32_t] right): * ''' */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_471left_join_indexer_int32, NULL, __pyx_n_s_222); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7499; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_778, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7499; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":7601 * * * def left_join_indexer_int64(ndarray[int64_t] left, # <<<<<<<<<<<<<< * ndarray[int64_t] right): * ''' */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_473left_join_indexer_int64, NULL, __pyx_n_s_222); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7601; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_781, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7601; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":7705 * @cython.wraparound(False) * @cython.boundscheck(False) * def outer_join_indexer_float64(ndarray[float64_t] left, # <<<<<<<<<<<<<< * ndarray[float64_t] right): * cdef: */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_475outer_join_indexer_float64, NULL, __pyx_n_s_222); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7705; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_784, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7705; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":7834 * @cython.wraparound(False) * @cython.boundscheck(False) * def outer_join_indexer_float32(ndarray[float32_t] left, # <<<<<<<<<<<<<< * ndarray[float32_t] right): * cdef: */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_477outer_join_indexer_float32, NULL, __pyx_n_s_222); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7834; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_787, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7834; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":7963 * @cython.wraparound(False) * @cython.boundscheck(False) * def outer_join_indexer_object(ndarray[object] left, # <<<<<<<<<<<<<< * ndarray[object] right): * cdef: */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_479outer_join_indexer_object, NULL, __pyx_n_s_222); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7963; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_790, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7963; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":8092 * @cython.wraparound(False) * @cython.boundscheck(False) * def outer_join_indexer_int32(ndarray[int32_t] left, # <<<<<<<<<<<<<< * ndarray[int32_t] right): * cdef: */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_481outer_join_indexer_int32, NULL, __pyx_n_s_222); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8092; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_793, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8092; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":8221 * @cython.wraparound(False) * @cython.boundscheck(False) * def outer_join_indexer_int64(ndarray[int64_t] left, # <<<<<<<<<<<<<< * ndarray[int64_t] right): * cdef: */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_483outer_join_indexer_int64, NULL, __pyx_n_s_222); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8221; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_796, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8221; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":8351 * @cython.wraparound(False) * @cython.boundscheck(False) * def inner_join_indexer_float64(ndarray[float64_t] left, # <<<<<<<<<<<<<< * ndarray[float64_t] right): * ''' */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_485inner_join_indexer_float64, NULL, __pyx_n_s_222); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8351; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_799, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8351; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":8444 * @cython.wraparound(False) * @cython.boundscheck(False) * def inner_join_indexer_float32(ndarray[float32_t] left, # <<<<<<<<<<<<<< * ndarray[float32_t] right): * ''' */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_487inner_join_indexer_float32, NULL, __pyx_n_s_222); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8444; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_802, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8444; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":8537 * @cython.wraparound(False) * @cython.boundscheck(False) * def inner_join_indexer_object(ndarray[object] left, # <<<<<<<<<<<<<< * ndarray[object] right): * ''' */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_489inner_join_indexer_object, NULL, __pyx_n_s_222); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8537; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_805, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8537; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":8630 * @cython.wraparound(False) * @cython.boundscheck(False) * def inner_join_indexer_int32(ndarray[int32_t] left, # <<<<<<<<<<<<<< * ndarray[int32_t] right): * ''' */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_491inner_join_indexer_int32, NULL, __pyx_n_s_222); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8630; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_808, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8630; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/src/generated.pyx":8723 * @cython.wraparound(False) * @cython.boundscheck(False) * def inner_join_indexer_int64(ndarray[int64_t] left, # <<<<<<<<<<<<<< * ndarray[int64_t] right): * ''' */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5algos_493inner_join_indexer_int64, NULL, __pyx_n_s_222); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8723; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_811, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8723; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/algos.pyx":1 * from numpy cimport * # <<<<<<<<<<<<<< * cimport numpy as np * import numpy as np */ __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_2)); if (PyDict_SetItem(__pyx_d, __pyx_n_s____test__, ((PyObject *)__pyx_t_2)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; /* "numpy.pxd":979 * arr.base = baseptr * * cdef inline object get_array_base(ndarray arr): # <<<<<<<<<<<<<< * if arr.base is NULL: * return 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_12); if (__pyx_m) { __Pyx_AddTraceback("init pandas.algos", __pyx_clineno, __pyx_lineno, __pyx_filename); Py_DECREF(__pyx_m); __pyx_m = 0; } else if (!PyErr_Occurred()) { PyErr_SetString(PyExc_ImportError, "init pandas.algos"); } __pyx_L0:; __Pyx_RefNannyFinishContext(); #if PY_MAJOR_VERSION < 3 return; #else return __pyx_m; #endif } /* Runtime support code */ #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 /* CYTHON_REFNANNY */ 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 '%s' is not defined", PyString_AS_STRING(name)); #endif } return result; } 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, "%s() takes %s %" CYTHON_FORMAT_SSIZE_T "d positional argument%s (%" CYTHON_FORMAT_SSIZE_T "d given)", func_name, more_or_less, num_expected, (num_expected == 1) ? "" : "s", num_found); } 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 } 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, "%s() keywords must be strings", function_name); goto bad; invalid_keyword: PyErr_Format(PyExc_TypeError, #if PY_MAJOR_VERSION < 3 "%s() got an unexpected keyword argument '%s'", function_name, PyString_AsString(key)); #else "%s() got an unexpected keyword argument '%U'", function_name, key); #endif bad: return -1; } static CYTHON_INLINE void __Pyx_ErrRestore(PyObject *type, PyObject *value, PyObject *tb) { #if CYTHON_COMPILING_IN_CPYTHON PyObject *tmp_type, *tmp_value, *tmp_tb; PyThreadState *tstate = PyThreadState_GET(); 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); #else PyErr_Restore(type, value, tb); #endif } static CYTHON_INLINE void __Pyx_ErrFetch(PyObject **type, PyObject **value, PyObject **tb) { #if CYTHON_COMPILING_IN_CPYTHON PyThreadState *tstate = PyThreadState_GET(); *type = tstate->curexc_type; *value = tstate->curexc_value; *tb = tstate->curexc_traceback; tstate->curexc_type = 0; tstate->curexc_value = 0; tstate->curexc_traceback = 0; #else PyErr_Fetch(type, value, tb); #endif } static void __Pyx_WriteUnraisable(const char *name, CYTHON_UNUSED int clineno, CYTHON_UNUSED int lineno, CYTHON_UNUSED const char *filename) { PyObject *old_exc, *old_val, *old_tb; PyObject *ctx; __Pyx_ErrFetch(&old_exc, &old_val, &old_tb); #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); } } static int __Pyx_ArgTypeTest(PyObject *obj, PyTypeObject *type, int none_allowed, const char *name, int exact) { if (!type) { PyErr_Format(PyExc_SystemError, "Missing type object"); return 0; } if (none_allowed && obj == Py_None) return 1; else if (exact) { if (Py_TYPE(obj) == type) return 1; } else { if (PyObject_TypeCheck(obj, type)) return 1; } PyErr_Format(PyExc_TypeError, "Argument '%s' has incorrect type (expected %s, got %s)", name, type->tp_name, Py_TYPE(obj)->tp_name); return 0; } static CYTHON_INLINE PyObject *__Pyx_GetModuleGlobalName(PyObject *name) { PyObject *result; #if CYTHON_COMPILING_IN_CPYTHON result = PyDict_GetItem(__pyx_d, name); if (result) { Py_INCREF(result); } else { #else result = PyObject_GetItem(__pyx_d, name); if (!result) { PyErr_Clear(); #endif result = __Pyx_GetBuiltinName(name); } return result; } static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j) { PyObject *r; if (!j) return NULL; r = PyObject_GetItem(o, j); Py_DECREF(j); return r; } static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i, int wraparound, int boundscheck) { #if CYTHON_COMPILING_IN_CPYTHON if (wraparound & unlikely(i < 0)) i += PyList_GET_SIZE(o); if ((!boundscheck) || likely((0 <= i) & (i < PyList_GET_SIZE(o)))) { PyObject *r = PyList_GET_ITEM(o, i); Py_INCREF(r); return r; } return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i)); #else return PySequence_GetItem(o, i); #endif } static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i, int wraparound, int boundscheck) { #if CYTHON_COMPILING_IN_CPYTHON if (wraparound & unlikely(i < 0)) i += PyTuple_GET_SIZE(o); if ((!boundscheck) || likely((0 <= i) & (i < PyTuple_GET_SIZE(o)))) { PyObject *r = PyTuple_GET_ITEM(o, i); Py_INCREF(r); return r; } return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i)); #else return PySequence_GetItem(o, i); #endif } static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, int is_list, int wraparound, int boundscheck) { #if CYTHON_COMPILING_IN_CPYTHON if (is_list || PyList_CheckExact(o)) { Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyList_GET_SIZE(o); if ((!boundscheck) || (likely((n >= 0) & (n < PyList_GET_SIZE(o))))) { PyObject *r = PyList_GET_ITEM(o, n); Py_INCREF(r); return r; } } else if (PyTuple_CheckExact(o)) { Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyTuple_GET_SIZE(o); if ((!boundscheck) || likely((n >= 0) & (n < PyTuple_GET_SIZE(o)))) { PyObject *r = PyTuple_GET_ITEM(o, n); Py_INCREF(r); return r; } } else { PySequenceMethods *m = Py_TYPE(o)->tp_as_sequence; if (likely(m && m->sq_item)) { if (wraparound && unlikely(i < 0) && likely(m->sq_length)) { Py_ssize_t l = m->sq_length(o); if (likely(l >= 0)) { i += l; } else { if (PyErr_ExceptionMatches(PyExc_OverflowError)) PyErr_Clear(); else return NULL; } } 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)); } static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type) { if (unlikely(!type)) { PyErr_Format(PyExc_SystemError, "Missing type object"); return 0; } if (likely(PyObject_TypeCheck(obj, type))) return 1; PyErr_Format(PyExc_TypeError, "Cannot convert %.200s to %.200s", Py_TYPE(obj)->tp_name, type->tp_name); return 0; } static CYTHON_INLINE int __Pyx_SetItemInt_Generic(PyObject *o, PyObject *j, PyObject *v) { int r; if (!j) return -1; r = PyObject_SetItem(o, j, v); Py_DECREF(j); return r; } static CYTHON_INLINE int __Pyx_SetItemInt_Fast(PyObject *o, Py_ssize_t i, PyObject *v, int is_list, int wraparound, int boundscheck) { #if CYTHON_COMPILING_IN_CPYTHON if (is_list || PyList_CheckExact(o)) { Py_ssize_t n = (!wraparound) ? i : ((likely(i >= 0)) ? i : i + PyList_GET_SIZE(o)); if ((!boundscheck) || likely((n >= 0) & (n < PyList_GET_SIZE(o)))) { PyObject* old = PyList_GET_ITEM(o, n); Py_INCREF(v); PyList_SET_ITEM(o, n, v); Py_DECREF(old); return 1; } } else { PySequenceMethods *m = Py_TYPE(o)->tp_as_sequence; if (likely(m && m->sq_ass_item)) { if (wraparound && unlikely(i < 0) && likely(m->sq_length)) { Py_ssize_t l = m->sq_length(o); if (likely(l >= 0)) { i += l; } else { if (PyErr_ExceptionMatches(PyExc_OverflowError)) PyErr_Clear(); else return -1; } } return m->sq_ass_item(o, i, v); } } #else #if CYTHON_COMPILING_IN_PYPY if (is_list || (PySequence_Check(o) && !PyDict_Check(o))) { #else if (is_list || PySequence_Check(o)) { #endif return PySequence_SetItem(o, i, v); } #endif return __Pyx_SetItemInt_Generic(o, PyInt_FromSsize_t(i), v); } #if PY_MAJOR_VERSION < 3 static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, CYTHON_UNUSED PyObject *cause) { 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 PY_VERSION_HEX < 0x02050000 if (PyClass_Check(type)) { #else if (PyType_Check(type)) { #endif #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; #if PY_VERSION_HEX < 0x02050000 if (PyInstance_Check(type)) { type = (PyObject*) ((PyInstanceObject*)type)->in_class; Py_INCREF(type); } else { type = 0; PyErr_SetString(PyExc_TypeError, "raise: exception must be an old-style class or instance"); goto raise_error; } #else 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; } #endif } __Pyx_ErrRestore(type, value, tb); return; raise_error: Py_XDECREF(value); Py_XDECREF(type); Py_XDECREF(tb); return; } #else /* Python 3+ */ 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 *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 = PyEval_CallObject(type, args); Py_DECREF(args); if (!owned_instance) goto bad; value = owned_instance; if (!PyExceptionInstance_Check(value)) { PyErr_Format(PyExc_TypeError, "calling %R should have returned an instance of " "BaseException, not %R", type, Py_TYPE(value)); goto bad; } } else { PyErr_SetString(PyExc_TypeError, "raise: exception class must be a subclass of BaseException"); goto bad; } #if PY_VERSION_HEX >= 0x03030000 if (cause) { #else if (cause && cause != Py_None) { #endif PyObject *fixed_cause; if (cause == Py_None) { fixed_cause = NULL; } else if (PyExceptionClass_Check(cause)) { fixed_cause = PyObject_CallObject(cause, NULL); if (fixed_cause == NULL) goto bad; } else if (PyExceptionInstance_Check(cause)) { fixed_cause = cause; Py_INCREF(fixed_cause); } else { PyErr_SetString(PyExc_TypeError, "exception causes must derive from " "BaseException"); goto bad; } PyException_SetCause(value, fixed_cause); } PyErr_SetObject(type, value); if (tb) { PyThreadState *tstate = PyThreadState_GET(); PyObject* tmp_tb = tstate->curexc_traceback; if (tb != tmp_tb) { Py_INCREF(tb); tstate->curexc_traceback = tb; Py_XDECREF(tmp_tb); } } bad: Py_XDECREF(owned_instance); return; } #endif static CYTHON_INLINE int __Pyx_IsLittleEndian(void) { unsigned int n = 1; return *(unsigned char*)(&n) != 0; } 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) /* First char was not a digit */ 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; /* Consume from buffer string */ while (1) { if (field == &ctx->root) { ctx->head = NULL; if (ctx->enc_count != 0) { __Pyx_BufFmt_RaiseExpected(ctx); return -1; } break; /* breaks both loops as ctx->enc_count == 0 */ } 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; /* empty struct */ 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 CYTHON_INLINE 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 != ')') { if (isspace(*ts)) continue; 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 10: case 13: ++ts; break; case '<': if (!__Pyx_IsLittleEndian()) { PyErr_SetString(PyExc_ValueError, "Little-endian buffer not supported on big-endian compiler"); return NULL; } ctx->new_packmode = '='; ++ts; break; case '>': case '!': if (__Pyx_IsLittleEndian()) { 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': /* substruct */ { 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; /* Erase processed last struct element */ 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 '}': /* end of substruct; either repeat or move on */ { size_t alignment = ctx->struct_alignment; ++ts; if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL; ctx->enc_type = 0; /* Erase processed last struct element */ 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; } /* fall through */ 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 's': case 'p': if (ctx->enc_type == *ts && got_Z == ctx->is_complex && ctx->enc_packmode == ctx->new_packmode) { ctx->enc_count += ctx->new_count; } else { 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; } } } } static CYTHON_INLINE 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 CYTHON_INLINE int __Pyx_GetBufferAndValidate( Py_buffer* buf, PyObject* obj, __Pyx_TypeInfo* dtype, int flags, int nd, int cast, __Pyx_BufFmt_StackElem* stack) { if (obj == Py_None || obj == NULL) { __Pyx_ZeroBuffer(buf); return 0; } buf->buf = NULL; if (__Pyx_GetBuffer(obj, buf, flags) == -1) goto fail; if (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 ((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_ZeroBuffer(buf); return -1; } static CYTHON_INLINE void __Pyx_SafeReleaseBuffer(Py_buffer* info) { if (info->buf == NULL) return; if (info->suboffsets == __Pyx_minusones) info->suboffsets = NULL; __Pyx_ReleaseBuffer(info); } 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); } static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index) { PyErr_Format(PyExc_ValueError, "need more than %" CYTHON_FORMAT_SSIZE_T "d value%s to unpack", index, (index == 1) ? "" : "s"); } static CYTHON_INLINE int __Pyx_IterFinish(void) { #if CYTHON_COMPILING_IN_CPYTHON PyThreadState *tstate = PyThreadState_GET(); PyObject* exc_type = tstate->curexc_type; if (unlikely(exc_type)) { if (likely(exc_type == PyExc_StopIteration) || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration)) { PyObject *exc_value, *exc_tb; exc_value = tstate->curexc_value; exc_tb = tstate->curexc_traceback; tstate->curexc_type = 0; tstate->curexc_value = 0; tstate->curexc_traceback = 0; Py_DECREF(exc_type); Py_XDECREF(exc_value); Py_XDECREF(exc_tb); return 0; } else { return -1; } } return 0; #else if (unlikely(PyErr_Occurred())) { if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) { PyErr_Clear(); return 0; } else { return -1; } } return 0; #endif } 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; } static void __Pyx_RaiseBufferFallbackError(void) { PyErr_Format(PyExc_ValueError, "Buffer acquisition failed on assignment; and then reacquiring the old buffer failed too!"); } static void __Pyx_RaiseBufferIndexError(int axis) { PyErr_Format(PyExc_IndexError, "Out of bounds on buffer access (axis %d)", axis); } static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb) { PyObject *local_type, *local_value, *local_tb; #if CYTHON_COMPILING_IN_CPYTHON PyObject *tmp_type, *tmp_value, *tmp_tb; PyThreadState *tstate = PyThreadState_GET(); local_type = tstate->curexc_type; local_value = tstate->curexc_value; local_tb = tstate->curexc_traceback; tstate->curexc_type = 0; tstate->curexc_value = 0; tstate->curexc_traceback = 0; #else PyErr_Fetch(&local_type, &local_value, &local_tb); #endif PyErr_NormalizeException(&local_type, &local_value, &local_tb); #if CYTHON_COMPILING_IN_CPYTHON if (unlikely(tstate->curexc_type)) #else if (unlikely(PyErr_Occurred())) #endif goto bad; #if PY_MAJOR_VERSION >= 3 if (unlikely(PyException_SetTraceback(local_value, local_tb) < 0)) goto bad; #endif Py_INCREF(local_type); Py_INCREF(local_value); Py_INCREF(local_tb); *type = local_type; *value = local_value; *tb = local_tb; #if CYTHON_COMPILING_IN_CPYTHON tmp_type = tstate->exc_type; tmp_value = tstate->exc_value; tmp_tb = tstate->exc_traceback; tstate->exc_type = local_type; tstate->exc_value = local_value; tstate->exc_traceback = local_tb; /* Make sure tstate is in a consistent state when we XDECREF these objects (DECREF may run arbitrary code). */ 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; } static CYTHON_INLINE long __Pyx_mod_long(long a, long b) { long r = a % b; r += ((r != 0) & ((r ^ b) < 0)) * b; return r; } 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; } static CYTHON_INLINE Py_ssize_t __Pyx_div_Py_ssize_t(Py_ssize_t a, Py_ssize_t b) { Py_ssize_t q = a / b; Py_ssize_t r = a - q*b; q -= ((r != 0) & ((r ^ b) < 0)); return q; } static CYTHON_INLINE Py_ssize_t __Pyx_mod_Py_ssize_t(Py_ssize_t a, Py_ssize_t b) { Py_ssize_t r = a % b; r += ((r != 0) & ((r ^ b) < 0)) * b; return r; } static CYTHON_INLINE PyObject* __Pyx_PyObject_GetSlice( PyObject* obj, Py_ssize_t cstart, Py_ssize_t cstop, PyObject** _py_start, PyObject** _py_stop, PyObject** _py_slice, int has_cstart, int has_cstop, CYTHON_UNUSED int wraparound) { #if CYTHON_COMPILING_IN_CPYTHON PyMappingMethods* mp; #if PY_MAJOR_VERSION < 3 PySequenceMethods* ms = Py_TYPE(obj)->tp_as_sequence; if (likely(ms && ms->sq_slice)) { if (!has_cstart) { if (_py_start && (*_py_start != Py_None)) { cstart = __Pyx_PyIndex_AsSsize_t(*_py_start); if ((cstart == (Py_ssize_t)-1) && PyErr_Occurred()) goto bad; } else cstart = 0; } if (!has_cstop) { if (_py_stop && (*_py_stop != Py_None)) { cstop = __Pyx_PyIndex_AsSsize_t(*_py_stop); if ((cstop == (Py_ssize_t)-1) && PyErr_Occurred()) goto bad; } else cstop = PY_SSIZE_T_MAX; } if (wraparound && unlikely((cstart < 0) | (cstop < 0)) && likely(ms->sq_length)) { Py_ssize_t l = ms->sq_length(obj); if (likely(l >= 0)) { if (cstop < 0) { cstop += l; if (cstop < 0) cstop = 0; } if (cstart < 0) { cstart += l; if (cstart < 0) cstart = 0; } } else { if (PyErr_ExceptionMatches(PyExc_OverflowError)) PyErr_Clear(); else goto bad; } } return ms->sq_slice(obj, cstart, cstop); } #endif mp = Py_TYPE(obj)->tp_as_mapping; if (likely(mp && mp->mp_subscript)) #endif { PyObject* result; PyObject *py_slice, *py_start, *py_stop; if (_py_slice) { py_slice = *_py_slice; } else { PyObject* owned_start = NULL; PyObject* owned_stop = NULL; if (_py_start) { py_start = *_py_start; } else { if (has_cstart) { owned_start = py_start = PyInt_FromSsize_t(cstart); if (unlikely(!py_start)) goto bad; } else py_start = Py_None; } if (_py_stop) { py_stop = *_py_stop; } else { if (has_cstop) { owned_stop = py_stop = PyInt_FromSsize_t(cstop); if (unlikely(!py_stop)) { Py_XDECREF(owned_start); goto bad; } } else py_stop = Py_None; } py_slice = PySlice_New(py_start, py_stop, Py_None); Py_XDECREF(owned_start); Py_XDECREF(owned_stop); if (unlikely(!py_slice)) goto bad; } #if CYTHON_COMPILING_IN_CPYTHON result = mp->mp_subscript(obj, py_slice); #else result = PyObject_GetItem(obj, py_slice); #endif if (!_py_slice) { Py_DECREF(py_slice); } return result; } PyErr_Format(PyExc_TypeError, "'%.200s' object is unsliceable", Py_TYPE(obj)->tp_name); bad: return NULL; } static CYTHON_INLINE int __Pyx_PyObject_SetSlice( PyObject* obj, PyObject* value, Py_ssize_t cstart, Py_ssize_t cstop, PyObject** _py_start, PyObject** _py_stop, PyObject** _py_slice, int has_cstart, int has_cstop, CYTHON_UNUSED int wraparound) { #if CYTHON_COMPILING_IN_CPYTHON PyMappingMethods* mp; #if PY_MAJOR_VERSION < 3 PySequenceMethods* ms = Py_TYPE(obj)->tp_as_sequence; if (likely(ms && ms->sq_ass_slice)) { if (!has_cstart) { if (_py_start && (*_py_start != Py_None)) { cstart = __Pyx_PyIndex_AsSsize_t(*_py_start); if ((cstart == (Py_ssize_t)-1) && PyErr_Occurred()) goto bad; } else cstart = 0; } if (!has_cstop) { if (_py_stop && (*_py_stop != Py_None)) { cstop = __Pyx_PyIndex_AsSsize_t(*_py_stop); if ((cstop == (Py_ssize_t)-1) && PyErr_Occurred()) goto bad; } else cstop = PY_SSIZE_T_MAX; } if (wraparound && unlikely((cstart < 0) | (cstop < 0)) && likely(ms->sq_length)) { Py_ssize_t l = ms->sq_length(obj); if (likely(l >= 0)) { if (cstop < 0) { cstop += l; if (cstop < 0) cstop = 0; } if (cstart < 0) { cstart += l; if (cstart < 0) cstart = 0; } } else { if (PyErr_ExceptionMatches(PyExc_OverflowError)) PyErr_Clear(); else goto bad; } } return ms->sq_ass_slice(obj, cstart, cstop, value); } #endif mp = Py_TYPE(obj)->tp_as_mapping; if (likely(mp && mp->mp_ass_subscript)) #endif { int result; PyObject *py_slice, *py_start, *py_stop; if (_py_slice) { py_slice = *_py_slice; } else { PyObject* owned_start = NULL; PyObject* owned_stop = NULL; if (_py_start) { py_start = *_py_start; } else { if (has_cstart) { owned_start = py_start = PyInt_FromSsize_t(cstart); if (unlikely(!py_start)) goto bad; } else py_start = Py_None; } if (_py_stop) { py_stop = *_py_stop; } else { if (has_cstop) { owned_stop = py_stop = PyInt_FromSsize_t(cstop); if (unlikely(!py_stop)) { Py_XDECREF(owned_start); goto bad; } } else py_stop = Py_None; } py_slice = PySlice_New(py_start, py_stop, Py_None); Py_XDECREF(owned_start); Py_XDECREF(owned_stop); if (unlikely(!py_slice)) goto bad; } #if CYTHON_COMPILING_IN_CPYTHON result = mp->mp_ass_subscript(obj, py_slice, value); #else result = value ? PyObject_SetItem(obj, py_slice, value) : PyObject_DelItem(obj, py_slice); #endif if (!_py_slice) { Py_DECREF(py_slice); } return result; } PyErr_Format(PyExc_TypeError, "'%.200s' object does not support slice %s", Py_TYPE(obj)->tp_name, value ? "assignment" : "deletion"); bad: return -1; } 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; } static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); } static int __Pyx_SetVtable(PyObject *dict, void *vtable) { #if PY_VERSION_HEX >= 0x02070000 && !(PY_MAJOR_VERSION==3&&PY_MINOR_VERSION==0) 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; } static PyObject * __Pyx_CyFunction_get_doc(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *closure) { if (unlikely(op->func_doc == NULL)) { if (op->func.m_ml->ml_doc) { #if PY_MAJOR_VERSION >= 3 op->func_doc = PyUnicode_FromString(op->func.m_ml->ml_doc); #else op->func_doc = PyString_FromString(op->func.m_ml->ml_doc); #endif if (unlikely(op->func_doc == NULL)) return NULL; } else { Py_INCREF(Py_None); return Py_None; } } Py_INCREF(op->func_doc); return op->func_doc; } static int __Pyx_CyFunction_set_doc(__pyx_CyFunctionObject *op, PyObject *value) { PyObject *tmp = op->func_doc; if (value == NULL) value = Py_None; /* Mark as deleted */ Py_INCREF(value); op->func_doc = value; Py_XDECREF(tmp); return 0; } static PyObject * __Pyx_CyFunction_get_name(__pyx_CyFunctionObject *op) { if (unlikely(op->func_name == NULL)) { #if PY_MAJOR_VERSION >= 3 op->func_name = PyUnicode_InternFromString(op->func.m_ml->ml_name); #else op->func_name = PyString_InternFromString(op->func.m_ml->ml_name); #endif if (unlikely(op->func_name == NULL)) return NULL; } Py_INCREF(op->func_name); return op->func_name; } static int __Pyx_CyFunction_set_name(__pyx_CyFunctionObject *op, PyObject *value) { PyObject *tmp; #if PY_MAJOR_VERSION >= 3 if (unlikely(value == NULL || !PyUnicode_Check(value))) { #else if (unlikely(value == NULL || !PyString_Check(value))) { #endif PyErr_SetString(PyExc_TypeError, "__name__ must be set to a string object"); return -1; } tmp = op->func_name; Py_INCREF(value); op->func_name = value; Py_XDECREF(tmp); return 0; } static PyObject * __Pyx_CyFunction_get_qualname(__pyx_CyFunctionObject *op) { Py_INCREF(op->func_qualname); return op->func_qualname; } static int __Pyx_CyFunction_set_qualname(__pyx_CyFunctionObject *op, PyObject *value) { PyObject *tmp; #if PY_MAJOR_VERSION >= 3 if (unlikely(value == NULL || !PyUnicode_Check(value))) { #else if (unlikely(value == NULL || !PyString_Check(value))) { #endif PyErr_SetString(PyExc_TypeError, "__qualname__ must be set to a string object"); return -1; } tmp = op->func_qualname; Py_INCREF(value); op->func_qualname = value; Py_XDECREF(tmp); return 0; } static PyObject * __Pyx_CyFunction_get_self(__pyx_CyFunctionObject *m, CYTHON_UNUSED void *closure) { PyObject *self; self = m->func_closure; if (self == NULL) self = Py_None; Py_INCREF(self); return self; } static PyObject * __Pyx_CyFunction_get_dict(__pyx_CyFunctionObject *op) { if (unlikely(op->func_dict == NULL)) { op->func_dict = PyDict_New(); if (unlikely(op->func_dict == NULL)) return NULL; } Py_INCREF(op->func_dict); return op->func_dict; } static int __Pyx_CyFunction_set_dict(__pyx_CyFunctionObject *op, PyObject *value) { PyObject *tmp; if (unlikely(value == NULL)) { PyErr_SetString(PyExc_TypeError, "function's dictionary may not be deleted"); return -1; } if (unlikely(!PyDict_Check(value))) { PyErr_SetString(PyExc_TypeError, "setting function's dictionary to a non-dict"); return -1; } tmp = op->func_dict; Py_INCREF(value); op->func_dict = value; Py_XDECREF(tmp); return 0; } static PyObject * __Pyx_CyFunction_get_globals(CYTHON_UNUSED __pyx_CyFunctionObject *op) { PyObject* dict = PyModule_GetDict(__pyx_m); Py_XINCREF(dict); return dict; } static PyObject * __Pyx_CyFunction_get_closure(CYTHON_UNUSED __pyx_CyFunctionObject *op) { Py_INCREF(Py_None); return Py_None; } static PyObject * __Pyx_CyFunction_get_code(__pyx_CyFunctionObject *op) { PyObject* result = (op->func_code) ? op->func_code : Py_None; Py_INCREF(result); return result; } static int __Pyx_CyFunction_init_defaults(__pyx_CyFunctionObject *op) { PyObject *res = op->defaults_getter((PyObject *) op); if (unlikely(!res)) return -1; op->defaults_tuple = PyTuple_GET_ITEM(res, 0); Py_INCREF(op->defaults_tuple); op->defaults_kwdict = PyTuple_GET_ITEM(res, 1); Py_INCREF(op->defaults_kwdict); Py_DECREF(res); return 0; } static int __Pyx_CyFunction_set_defaults(__pyx_CyFunctionObject *op, PyObject* value) { PyObject* tmp; if (!value) { value = Py_None; } else if (value != Py_None && !PyTuple_Check(value)) { PyErr_SetString(PyExc_TypeError, "__defaults__ must be set to a tuple object"); return -1; } Py_INCREF(value); tmp = op->defaults_tuple; op->defaults_tuple = value; Py_XDECREF(tmp); return 0; } static PyObject * __Pyx_CyFunction_get_defaults(__pyx_CyFunctionObject *op) { PyObject* result = op->defaults_tuple; if (unlikely(!result)) { if (op->defaults_getter) { if (__Pyx_CyFunction_init_defaults(op) < 0) return NULL; result = op->defaults_tuple; } else { result = Py_None; } } Py_INCREF(result); return result; } static int __Pyx_CyFunction_set_kwdefaults(__pyx_CyFunctionObject *op, PyObject* value) { PyObject* tmp; if (!value) { value = Py_None; } else if (value != Py_None && !PyDict_Check(value)) { PyErr_SetString(PyExc_TypeError, "__kwdefaults__ must be set to a dict object"); return -1; } Py_INCREF(value); tmp = op->defaults_kwdict; op->defaults_kwdict = value; Py_XDECREF(tmp); return 0; } static PyObject * __Pyx_CyFunction_get_kwdefaults(__pyx_CyFunctionObject *op) { PyObject* result = op->defaults_kwdict; if (unlikely(!result)) { if (op->defaults_getter) { if (__Pyx_CyFunction_init_defaults(op) < 0) return NULL; result = op->defaults_kwdict; } else { result = Py_None; } } Py_INCREF(result); return result; } static int __Pyx_CyFunction_set_annotations(__pyx_CyFunctionObject *op, PyObject* value) { PyObject* tmp; if (!value || value == Py_None) { value = NULL; } else if (!PyDict_Check(value)) { PyErr_SetString(PyExc_TypeError, "__annotations__ must be set to a dict object"); return -1; } Py_XINCREF(value); tmp = op->func_annotations; op->func_annotations = value; Py_XDECREF(tmp); return 0; } static PyObject * __Pyx_CyFunction_get_annotations(__pyx_CyFunctionObject *op) { PyObject* result = op->func_annotations; if (unlikely(!result)) { result = PyDict_New(); if (unlikely(!result)) return NULL; op->func_annotations = result; } Py_INCREF(result); return result; } static PyGetSetDef __pyx_CyFunction_getsets[] = { {(char *) "func_doc", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0}, {(char *) "__doc__", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0}, {(char *) "func_name", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0}, {(char *) "__name__", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0}, {(char *) "__qualname__", (getter)__Pyx_CyFunction_get_qualname, (setter)__Pyx_CyFunction_set_qualname, 0, 0}, {(char *) "__self__", (getter)__Pyx_CyFunction_get_self, 0, 0, 0}, {(char *) "func_dict", (getter)__Pyx_CyFunction_get_dict, (setter)__Pyx_CyFunction_set_dict, 0, 0}, {(char *) "__dict__", (getter)__Pyx_CyFunction_get_dict, (setter)__Pyx_CyFunction_set_dict, 0, 0}, {(char *) "func_globals", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0}, {(char *) "__globals__", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0}, {(char *) "func_closure", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0}, {(char *) "__closure__", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0}, {(char *) "func_code", (getter)__Pyx_CyFunction_get_code, 0, 0, 0}, {(char *) "__code__", (getter)__Pyx_CyFunction_get_code, 0, 0, 0}, {(char *) "func_defaults", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0}, {(char *) "__defaults__", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0}, {(char *) "__kwdefaults__", (getter)__Pyx_CyFunction_get_kwdefaults, (setter)__Pyx_CyFunction_set_kwdefaults, 0, 0}, {(char *) "__annotations__", (getter)__Pyx_CyFunction_get_annotations, (setter)__Pyx_CyFunction_set_annotations, 0, 0}, {0, 0, 0, 0, 0} }; #ifndef PY_WRITE_RESTRICTED /* < Py2.5 */ #define PY_WRITE_RESTRICTED WRITE_RESTRICTED #endif static PyMemberDef __pyx_CyFunction_members[] = { {(char *) "__module__", T_OBJECT, offsetof(__pyx_CyFunctionObject, func.m_module), PY_WRITE_RESTRICTED, 0}, {0, 0, 0, 0, 0} }; static PyObject * __Pyx_CyFunction_reduce(__pyx_CyFunctionObject *m, CYTHON_UNUSED PyObject *args) { #if PY_MAJOR_VERSION >= 3 return PyUnicode_FromString(m->func.m_ml->ml_name); #else return PyString_FromString(m->func.m_ml->ml_name); #endif } static PyMethodDef __pyx_CyFunction_methods[] = { {__Pyx_NAMESTR("__reduce__"), (PyCFunction)__Pyx_CyFunction_reduce, METH_VARARGS, 0}, {0, 0, 0, 0} }; static PyObject *__Pyx_CyFunction_New(PyTypeObject *type, PyMethodDef *ml, int flags, PyObject* qualname, PyObject *closure, PyObject *module, PyObject* code) { __pyx_CyFunctionObject *op = PyObject_GC_New(__pyx_CyFunctionObject, type); if (op == NULL) return NULL; op->flags = flags; op->func_weakreflist = NULL; op->func.m_ml = ml; op->func.m_self = (PyObject *) op; Py_XINCREF(closure); op->func_closure = closure; Py_XINCREF(module); op->func.m_module = module; op->func_dict = NULL; op->func_name = NULL; Py_INCREF(qualname); op->func_qualname = qualname; op->func_doc = NULL; op->func_classobj = NULL; Py_XINCREF(code); op->func_code = code; op->defaults_pyobjects = 0; op->defaults = NULL; op->defaults_tuple = NULL; op->defaults_kwdict = NULL; op->defaults_getter = NULL; op->func_annotations = NULL; PyObject_GC_Track(op); return (PyObject *) op; } static int __Pyx_CyFunction_clear(__pyx_CyFunctionObject *m) { Py_CLEAR(m->func_closure); Py_CLEAR(m->func.m_module); Py_CLEAR(m->func_dict); Py_CLEAR(m->func_name); Py_CLEAR(m->func_qualname); Py_CLEAR(m->func_doc); Py_CLEAR(m->func_code); Py_CLEAR(m->func_classobj); Py_CLEAR(m->defaults_tuple); Py_CLEAR(m->defaults_kwdict); Py_CLEAR(m->func_annotations); if (m->defaults) { PyObject **pydefaults = __Pyx_CyFunction_Defaults(PyObject *, m); int i; for (i = 0; i < m->defaults_pyobjects; i++) Py_XDECREF(pydefaults[i]); PyMem_Free(m->defaults); m->defaults = NULL; } return 0; } static void __Pyx_CyFunction_dealloc(__pyx_CyFunctionObject *m) { PyObject_GC_UnTrack(m); if (m->func_weakreflist != NULL) PyObject_ClearWeakRefs((PyObject *) m); __Pyx_CyFunction_clear(m); PyObject_GC_Del(m); } static int __Pyx_CyFunction_traverse(__pyx_CyFunctionObject *m, visitproc visit, void *arg) { Py_VISIT(m->func_closure); Py_VISIT(m->func.m_module); Py_VISIT(m->func_dict); Py_VISIT(m->func_name); Py_VISIT(m->func_qualname); Py_VISIT(m->func_doc); Py_VISIT(m->func_code); Py_VISIT(m->func_classobj); Py_VISIT(m->defaults_tuple); Py_VISIT(m->defaults_kwdict); if (m->defaults) { PyObject **pydefaults = __Pyx_CyFunction_Defaults(PyObject *, m); int i; for (i = 0; i < m->defaults_pyobjects; i++) Py_VISIT(pydefaults[i]); } return 0; } static PyObject *__Pyx_CyFunction_descr_get(PyObject *func, PyObject *obj, PyObject *type) { __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; if (m->flags & __Pyx_CYFUNCTION_STATICMETHOD) { Py_INCREF(func); return func; } if (m->flags & __Pyx_CYFUNCTION_CLASSMETHOD) { if (type == NULL) type = (PyObject *)(Py_TYPE(obj)); return PyMethod_New(func, type, (PyObject *)(Py_TYPE(type))); } if (obj == Py_None) obj = NULL; return PyMethod_New(func, obj, type); } static PyObject* __Pyx_CyFunction_repr(__pyx_CyFunctionObject *op) { #if PY_MAJOR_VERSION >= 3 return PyUnicode_FromFormat("", op->func_qualname, (void *)op); #else return PyString_FromFormat("", PyString_AsString(op->func_qualname), (void *)op); #endif } #if CYTHON_COMPILING_IN_PYPY static PyObject * __Pyx_CyFunction_Call(PyObject *func, PyObject *arg, PyObject *kw) { PyCFunctionObject* f = (PyCFunctionObject*)func; PyCFunction meth = PyCFunction_GET_FUNCTION(func); PyObject *self = PyCFunction_GET_SELF(func); Py_ssize_t size; switch (PyCFunction_GET_FLAGS(func) & ~(METH_CLASS | METH_STATIC | METH_COEXIST)) { case METH_VARARGS: if (likely(kw == NULL) || PyDict_Size(kw) == 0) return (*meth)(self, arg); break; case METH_VARARGS | METH_KEYWORDS: return (*(PyCFunctionWithKeywords)meth)(self, arg, kw); case METH_NOARGS: if (likely(kw == NULL) || PyDict_Size(kw) == 0) { size = PyTuple_GET_SIZE(arg); if (size == 0) return (*meth)(self, NULL); PyErr_Format(PyExc_TypeError, "%.200s() takes no arguments (%zd given)", f->m_ml->ml_name, size); return NULL; } break; case METH_O: if (likely(kw == NULL) || PyDict_Size(kw) == 0) { size = PyTuple_GET_SIZE(arg); if (size == 1) return (*meth)(self, PyTuple_GET_ITEM(arg, 0)); PyErr_Format(PyExc_TypeError, "%.200s() takes exactly one argument (%zd given)", f->m_ml->ml_name, size); return NULL; } break; default: PyErr_SetString(PyExc_SystemError, "Bad call flags in " "__Pyx_CyFunction_Call. METH_OLDARGS is no " "longer supported!"); return NULL; } PyErr_Format(PyExc_TypeError, "%.200s() takes no keyword arguments", f->m_ml->ml_name); return NULL; } #else static PyObject * __Pyx_CyFunction_Call(PyObject *func, PyObject *arg, PyObject *kw) { return PyCFunction_Call(func, arg, kw); } #endif static PyTypeObject __pyx_CyFunctionType_type = { PyVarObject_HEAD_INIT(0, 0) __Pyx_NAMESTR("cython_function_or_method"), /*tp_name*/ sizeof(__pyx_CyFunctionObject), /*tp_basicsize*/ 0, /*tp_itemsize*/ (destructor) __Pyx_CyFunction_dealloc, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #else 0, /*reserved*/ #endif (reprfunc) __Pyx_CyFunction_repr, /*tp_repr*/ 0, /*tp_as_number*/ 0, /*tp_as_sequence*/ 0, /*tp_as_mapping*/ 0, /*tp_hash*/ __Pyx_CyFunction_Call, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC, /* tp_flags*/ 0, /*tp_doc*/ (traverseproc) __Pyx_CyFunction_traverse, /*tp_traverse*/ (inquiry) __Pyx_CyFunction_clear, /*tp_clear*/ 0, /*tp_richcompare*/ offsetof(__pyx_CyFunctionObject, func_weakreflist), /* tp_weaklistoffse */ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_CyFunction_methods, /*tp_methods*/ __pyx_CyFunction_members, /*tp_members*/ __pyx_CyFunction_getsets, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ __Pyx_CyFunction_descr_get, /*tp_descr_get*/ 0, /*tp_descr_set*/ offsetof(__pyx_CyFunctionObject, func_dict),/*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ 0, /*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*/ #if PY_VERSION_HEX >= 0x02060000 0, /*tp_version_tag*/ #endif #if PY_VERSION_HEX >= 0x030400a1 && defined(Py_TPFLAGS_HAVE_FINALIZE) 0, /*tp_finalize*/ #endif }; static int __Pyx_CyFunction_init(void) { #if !CYTHON_COMPILING_IN_PYPY __pyx_CyFunctionType_type.tp_call = PyCFunction_Call; #endif if (PyType_Ready(&__pyx_CyFunctionType_type) < 0) return -1; __pyx_CyFunctionType = &__pyx_CyFunctionType_type; return 0; } static CYTHON_INLINE void *__Pyx_CyFunction_InitDefaults(PyObject *func, size_t size, int pyobjects) { __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; m->defaults = PyMem_Malloc(size); if (!m->defaults) return PyErr_NoMemory(); memset(m->defaults, 0, size); m->defaults_pyobjects = pyobjects; return m->defaults; } static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *func, PyObject *tuple) { __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; m->defaults_tuple = tuple; Py_INCREF(tuple); } static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *func, PyObject *dict) { __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; m->defaults_kwdict = dict; Py_INCREF(dict); } static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *func, PyObject *dict) { __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; m->func_annotations = dict; Py_INCREF(dict); } static CYTHON_INLINE void __Pyx_ExceptionSave(PyObject **type, PyObject **value, PyObject **tb) { #if CYTHON_COMPILING_IN_CPYTHON PyThreadState *tstate = PyThreadState_GET(); *type = tstate->exc_type; *value = tstate->exc_value; *tb = tstate->exc_traceback; Py_XINCREF(*type); Py_XINCREF(*value); Py_XINCREF(*tb); #else PyErr_GetExcInfo(type, value, tb); #endif } static void __Pyx_ExceptionReset(PyObject *type, PyObject *value, PyObject *tb) { #if CYTHON_COMPILING_IN_CPYTHON PyObject *tmp_type, *tmp_value, *tmp_tb; PyThreadState *tstate = PyThreadState_GET(); tmp_type = tstate->exc_type; tmp_value = tstate->exc_value; tmp_tb = tstate->exc_traceback; tstate->exc_type = type; tstate->exc_value = value; tstate->exc_traceback = tb; Py_XDECREF(tmp_type); Py_XDECREF(tmp_value); Py_XDECREF(tmp_tb); #else PyErr_SetExcInfo(type, value, tb); #endif } #if PY_MAJOR_VERSION < 3 static int __Pyx_GetBuffer(PyObject *obj, Py_buffer *view, int flags) { #if PY_VERSION_HEX >= 0x02060000 if (PyObject_CheckBuffer(obj)) return PyObject_GetBuffer(obj, view, flags); #endif if (PyObject_TypeCheck(obj, __pyx_ptype_5numpy_ndarray)) return __pyx_pw_5numpy_7ndarray_1__getbuffer__(obj, view, flags); #if PY_VERSION_HEX < 0x02060000 if (obj->ob_type->tp_dict) { PyObject *getbuffer_cobj = PyObject_GetItem( obj->ob_type->tp_dict, __pyx_n_s____pyx_getbuffer); if (getbuffer_cobj) { getbufferproc func = (getbufferproc) PyCObject_AsVoidPtr(getbuffer_cobj); Py_DECREF(getbuffer_cobj); if (!func) goto fail; return func(obj, view, flags); } else { PyErr_Clear(); } } #endif PyErr_Format(PyExc_TypeError, "'%100s' does not have the buffer interface", Py_TYPE(obj)->tp_name); #if PY_VERSION_HEX < 0x02060000 fail: #endif return -1; } static void __Pyx_ReleaseBuffer(Py_buffer *view) { PyObject *obj = view->obj; if (!obj) return; #if PY_VERSION_HEX >= 0x02060000 if (PyObject_CheckBuffer(obj)) { PyBuffer_Release(view); return; } #endif if (PyObject_TypeCheck(obj, __pyx_ptype_5numpy_ndarray)) { __pyx_pw_5numpy_7ndarray_3__releasebuffer__(obj, view); return; } #if PY_VERSION_HEX < 0x02060000 if (obj->ob_type->tp_dict) { PyObject *releasebuffer_cobj = PyObject_GetItem( obj->ob_type->tp_dict, __pyx_n_s____pyx_releasebuffer); if (releasebuffer_cobj) { releasebufferproc func = (releasebufferproc) PyCObject_AsVoidPtr(releasebuffer_cobj); Py_DECREF(releasebuffer_cobj); if (!func) goto fail; func(obj, view); return; } else { PyErr_Clear(); } } #endif goto nofail; #if PY_VERSION_HEX < 0x02060000 fail: #endif PyErr_WriteUnraisable(obj); nofail: Py_DECREF(obj); view->obj = NULL; } #endif /* PY_MAJOR_VERSION < 3 */ static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level) { PyObject *empty_list = 0; PyObject *module = 0; PyObject *global_dict = 0; PyObject *empty_dict = 0; PyObject *list; #if PY_VERSION_HEX < 0x03030000 PyObject *py_import; py_import = __Pyx_PyObject_GetAttrStr(__pyx_b, __pyx_n_s____import__); if (!py_import) goto bad; #endif if (from_list) list = from_list; else { empty_list = PyList_New(0); if (!empty_list) goto bad; list = empty_list; } global_dict = PyModule_GetDict(__pyx_m); if (!global_dict) goto bad; empty_dict = PyDict_New(); if (!empty_dict) goto bad; #if PY_VERSION_HEX >= 0x02050000 { #if PY_MAJOR_VERSION >= 3 if (level == -1) { if (strchr(__Pyx_MODULE_NAME, '.')) { #if PY_VERSION_HEX < 0x03030000 PyObject *py_level = PyInt_FromLong(1); if (!py_level) goto bad; module = PyObject_CallFunctionObjArgs(py_import, name, global_dict, empty_dict, list, py_level, NULL); Py_DECREF(py_level); #else module = PyImport_ImportModuleLevelObject( name, global_dict, empty_dict, list, 1); #endif if (!module) { if (!PyErr_ExceptionMatches(PyExc_ImportError)) goto bad; PyErr_Clear(); } } level = 0; /* try absolute import on failure */ } #endif if (!module) { #if PY_VERSION_HEX < 0x03030000 PyObject *py_level = PyInt_FromLong(level); if (!py_level) goto bad; module = PyObject_CallFunctionObjArgs(py_import, name, global_dict, empty_dict, list, py_level, NULL); Py_DECREF(py_level); #else module = PyImport_ImportModuleLevelObject( name, global_dict, empty_dict, list, level); #endif } } #else if (level>0) { PyErr_SetString(PyExc_RuntimeError, "Relative import is not supported for Python <=2.4."); goto bad; } module = PyObject_CallFunctionObjArgs(py_import, name, global_dict, empty_dict, list, NULL); #endif bad: #if PY_VERSION_HEX < 0x03030000 Py_XDECREF(py_import); #endif Py_XDECREF(empty_list); Py_XDECREF(empty_dict); return module; } static CYTHON_INLINE npy_int8 __Pyx_PyInt_from_py_npy_int8(PyObject* x) { const npy_int8 neg_one = (npy_int8)-1, const_zero = (npy_int8)0; const int is_unsigned = const_zero < neg_one; if (sizeof(npy_int8) == sizeof(char)) { if (is_unsigned) return (npy_int8)__Pyx_PyInt_AsUnsignedChar(x); else return (npy_int8)__Pyx_PyInt_AsSignedChar(x); } else if (sizeof(npy_int8) == sizeof(short)) { if (is_unsigned) return (npy_int8)__Pyx_PyInt_AsUnsignedShort(x); else return (npy_int8)__Pyx_PyInt_AsSignedShort(x); } else if (sizeof(npy_int8) == sizeof(int)) { if (is_unsigned) return (npy_int8)__Pyx_PyInt_AsUnsignedInt(x); else return (npy_int8)__Pyx_PyInt_AsSignedInt(x); } else if (sizeof(npy_int8) == sizeof(long)) { if (is_unsigned) return (npy_int8)__Pyx_PyInt_AsUnsignedLong(x); else return (npy_int8)__Pyx_PyInt_AsSignedLong(x); } else if (sizeof(npy_int8) == sizeof(PY_LONG_LONG)) { if (is_unsigned) return (npy_int8)__Pyx_PyInt_AsUnsignedLongLong(x); else return (npy_int8)__Pyx_PyInt_AsSignedLongLong(x); } else { #if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray) PyErr_SetString(PyExc_RuntimeError, "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers"); #else npy_int8 val; PyObject *v = __Pyx_PyNumber_Int(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_int8)-1; } } static CYTHON_INLINE npy_int16 __Pyx_PyInt_from_py_npy_int16(PyObject* x) { const npy_int16 neg_one = (npy_int16)-1, const_zero = (npy_int16)0; const int is_unsigned = const_zero < neg_one; if (sizeof(npy_int16) == sizeof(char)) { if (is_unsigned) return (npy_int16)__Pyx_PyInt_AsUnsignedChar(x); else return (npy_int16)__Pyx_PyInt_AsSignedChar(x); } else if (sizeof(npy_int16) == sizeof(short)) { if (is_unsigned) return (npy_int16)__Pyx_PyInt_AsUnsignedShort(x); else return (npy_int16)__Pyx_PyInt_AsSignedShort(x); } else if (sizeof(npy_int16) == sizeof(int)) { if (is_unsigned) return (npy_int16)__Pyx_PyInt_AsUnsignedInt(x); else return (npy_int16)__Pyx_PyInt_AsSignedInt(x); } else if (sizeof(npy_int16) == sizeof(long)) { if (is_unsigned) return (npy_int16)__Pyx_PyInt_AsUnsignedLong(x); else return (npy_int16)__Pyx_PyInt_AsSignedLong(x); } else if (sizeof(npy_int16) == sizeof(PY_LONG_LONG)) { if (is_unsigned) return (npy_int16)__Pyx_PyInt_AsUnsignedLongLong(x); else return (npy_int16)__Pyx_PyInt_AsSignedLongLong(x); } else { #if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray) PyErr_SetString(PyExc_RuntimeError, "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers"); #else npy_int16 val; PyObject *v = __Pyx_PyNumber_Int(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_int16)-1; } } static CYTHON_INLINE npy_int32 __Pyx_PyInt_from_py_npy_int32(PyObject* x) { const npy_int32 neg_one = (npy_int32)-1, const_zero = (npy_int32)0; const int is_unsigned = const_zero < neg_one; if (sizeof(npy_int32) == sizeof(char)) { if (is_unsigned) return (npy_int32)__Pyx_PyInt_AsUnsignedChar(x); else return (npy_int32)__Pyx_PyInt_AsSignedChar(x); } else if (sizeof(npy_int32) == sizeof(short)) { if (is_unsigned) return (npy_int32)__Pyx_PyInt_AsUnsignedShort(x); else return (npy_int32)__Pyx_PyInt_AsSignedShort(x); } else if (sizeof(npy_int32) == sizeof(int)) { if (is_unsigned) return (npy_int32)__Pyx_PyInt_AsUnsignedInt(x); else return (npy_int32)__Pyx_PyInt_AsSignedInt(x); } else if (sizeof(npy_int32) == sizeof(long)) { if (is_unsigned) return (npy_int32)__Pyx_PyInt_AsUnsignedLong(x); else return (npy_int32)__Pyx_PyInt_AsSignedLong(x); } else if (sizeof(npy_int32) == sizeof(PY_LONG_LONG)) { if (is_unsigned) return (npy_int32)__Pyx_PyInt_AsUnsignedLongLong(x); else return (npy_int32)__Pyx_PyInt_AsSignedLongLong(x); } else { #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_Int(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; } } static CYTHON_INLINE npy_int64 __Pyx_PyInt_from_py_npy_int64(PyObject* x) { const npy_int64 neg_one = (npy_int64)-1, const_zero = (npy_int64)0; const int is_unsigned = const_zero < neg_one; if (sizeof(npy_int64) == sizeof(char)) { if (is_unsigned) return (npy_int64)__Pyx_PyInt_AsUnsignedChar(x); else return (npy_int64)__Pyx_PyInt_AsSignedChar(x); } else if (sizeof(npy_int64) == sizeof(short)) { if (is_unsigned) return (npy_int64)__Pyx_PyInt_AsUnsignedShort(x); else return (npy_int64)__Pyx_PyInt_AsSignedShort(x); } else if (sizeof(npy_int64) == sizeof(int)) { if (is_unsigned) return (npy_int64)__Pyx_PyInt_AsUnsignedInt(x); else return (npy_int64)__Pyx_PyInt_AsSignedInt(x); } else if (sizeof(npy_int64) == sizeof(long)) { if (is_unsigned) return (npy_int64)__Pyx_PyInt_AsUnsignedLong(x); else return (npy_int64)__Pyx_PyInt_AsSignedLong(x); } else if (sizeof(npy_int64) == sizeof(PY_LONG_LONG)) { if (is_unsigned) return (npy_int64)__Pyx_PyInt_AsUnsignedLongLong(x); else return (npy_int64)__Pyx_PyInt_AsSignedLongLong(x); } else { #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_Int(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; } } static PyObject *__Pyx_FindPy2Metaclass(PyObject *bases) { PyObject *metaclass; #if PY_MAJOR_VERSION < 3 if (PyTuple_Check(bases) && PyTuple_GET_SIZE(bases) > 0) { PyObject *base = PyTuple_GET_ITEM(bases, 0); metaclass = __Pyx_PyObject_GetAttrStr(base, __pyx_n_s____class__); if (!metaclass) { PyErr_Clear(); metaclass = (PyObject*) Py_TYPE(base); Py_INCREF(metaclass); } } else { metaclass = (PyObject *) &PyClass_Type; Py_INCREF(metaclass); } #else if (PyTuple_Check(bases) && PyTuple_GET_SIZE(bases) > 0) { PyObject *base = PyTuple_GET_ITEM(bases, 0); metaclass = (PyObject*) Py_TYPE(base); } else { metaclass = (PyObject *) &PyType_Type; } Py_INCREF(metaclass); #endif return metaclass; } static PyObject *__Pyx_CreateClass(PyObject *bases, PyObject *dict, PyObject *name, PyObject *qualname, PyObject *modname) { PyObject *result; PyObject *metaclass; if (PyDict_SetItem(dict, __pyx_n_s____module__, modname) < 0) return NULL; if (PyDict_SetItem(dict, __pyx_n_s____qualname__, qualname) < 0) return NULL; metaclass = PyDict_GetItem(dict, __pyx_n_s____metaclass__); if (metaclass) { Py_INCREF(metaclass); } else { metaclass = __Pyx_FindPy2Metaclass(bases); } result = PyObject_CallFunctionObjArgs(metaclass, name, bases, dict, NULL); Py_DECREF(metaclass); return result; } static CYTHON_INLINE PyObject *__Pyx_PyInt_to_py_npy_int64(npy_int64 val) { const npy_int64 neg_one = (npy_int64)-1, const_zero = (npy_int64)0; const int is_unsigned = const_zero < neg_one; if ((sizeof(npy_int64) == sizeof(char)) || (sizeof(npy_int64) == sizeof(short))) { return PyInt_FromLong((long)val); } else if ((sizeof(npy_int64) == sizeof(int)) || (sizeof(npy_int64) == sizeof(long))) { if (is_unsigned) return PyLong_FromUnsignedLong((unsigned long)val); else return PyInt_FromLong((long)val); } else if (sizeof(npy_int64) == sizeof(PY_LONG_LONG)) { if (is_unsigned) return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG)val); else return PyLong_FromLongLong((PY_LONG_LONG)val); } else { int one = 1; int little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&val; return _PyLong_FromByteArray(bytes, sizeof(npy_int64), little, !is_unsigned); } } static CYTHON_INLINE PyObject *__Pyx_PyInt_to_py_npy_int32(npy_int32 val) { const npy_int32 neg_one = (npy_int32)-1, const_zero = (npy_int32)0; const int is_unsigned = const_zero < neg_one; if ((sizeof(npy_int32) == sizeof(char)) || (sizeof(npy_int32) == sizeof(short))) { return PyInt_FromLong((long)val); } else if ((sizeof(npy_int32) == sizeof(int)) || (sizeof(npy_int32) == sizeof(long))) { if (is_unsigned) return PyLong_FromUnsignedLong((unsigned long)val); else return PyInt_FromLong((long)val); } else if (sizeof(npy_int32) == sizeof(PY_LONG_LONG)) { if (is_unsigned) return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG)val); else return PyLong_FromLongLong((PY_LONG_LONG)val); } else { int one = 1; int little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&val; return _PyLong_FromByteArray(bytes, sizeof(npy_int32), little, !is_unsigned); } } static CYTHON_INLINE PyObject *__Pyx_PyInt_to_py_npy_uint8(npy_uint8 val) { const npy_uint8 neg_one = (npy_uint8)-1, const_zero = (npy_uint8)0; const int is_unsigned = const_zero < neg_one; if ((sizeof(npy_uint8) == sizeof(char)) || (sizeof(npy_uint8) == sizeof(short))) { return PyInt_FromLong((long)val); } else if ((sizeof(npy_uint8) == sizeof(int)) || (sizeof(npy_uint8) == sizeof(long))) { if (is_unsigned) return PyLong_FromUnsignedLong((unsigned long)val); else return PyInt_FromLong((long)val); } else if (sizeof(npy_uint8) == sizeof(PY_LONG_LONG)) { if (is_unsigned) return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG)val); else return PyLong_FromLongLong((PY_LONG_LONG)val); } else { int one = 1; int little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&val; return _PyLong_FromByteArray(bytes, sizeof(npy_uint8), little, !is_unsigned); } } static CYTHON_INLINE npy_uint8 __Pyx_PyInt_from_py_npy_uint8(PyObject* x) { const npy_uint8 neg_one = (npy_uint8)-1, const_zero = (npy_uint8)0; const int is_unsigned = const_zero < neg_one; if (sizeof(npy_uint8) == sizeof(char)) { if (is_unsigned) return (npy_uint8)__Pyx_PyInt_AsUnsignedChar(x); else return (npy_uint8)__Pyx_PyInt_AsSignedChar(x); } else if (sizeof(npy_uint8) == sizeof(short)) { if (is_unsigned) return (npy_uint8)__Pyx_PyInt_AsUnsignedShort(x); else return (npy_uint8)__Pyx_PyInt_AsSignedShort(x); } else if (sizeof(npy_uint8) == sizeof(int)) { if (is_unsigned) return (npy_uint8)__Pyx_PyInt_AsUnsignedInt(x); else return (npy_uint8)__Pyx_PyInt_AsSignedInt(x); } else if (sizeof(npy_uint8) == sizeof(long)) { if (is_unsigned) return (npy_uint8)__Pyx_PyInt_AsUnsignedLong(x); else return (npy_uint8)__Pyx_PyInt_AsSignedLong(x); } else if (sizeof(npy_uint8) == sizeof(PY_LONG_LONG)) { if (is_unsigned) return (npy_uint8)__Pyx_PyInt_AsUnsignedLongLong(x); else return (npy_uint8)__Pyx_PyInt_AsSignedLongLong(x); } else { #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_Int(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; } } #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 #if CYTHON_CCOMPLEX #else static CYTHON_INLINE int __Pyx_c_eqf(__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_sumf(__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_difff(__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_prodf(__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; } static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_quotf(__pyx_t_float_complex a, __pyx_t_float_complex b) { __pyx_t_float_complex z; float denom = b.real * b.real + b.imag * b.imag; z.real = (a.real * b.real + a.imag * b.imag) / denom; z.imag = (a.imag * b.real - a.real * b.imag) / denom; return z; } static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_negf(__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_zerof(__pyx_t_float_complex a) { return (a.real == 0) && (a.imag == 0); } static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_conjf(__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_absf(__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_powf(__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_prodf(a, a); return __Pyx_c_prodf(a, a); case 3: z = __Pyx_c_prodf(a, a); return __Pyx_c_prodf(z, a); case 4: z = __Pyx_c_prodf(a, a); return __Pyx_c_prodf(z, z); } } if (a.imag == 0) { if (a.real == 0) { return a; } r = a.real; theta = 0; } else { r = __Pyx_c_absf(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 #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 #if CYTHON_CCOMPLEX #else static CYTHON_INLINE int __Pyx_c_eq(__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(__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(__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(__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; } static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_quot(__pyx_t_double_complex a, __pyx_t_double_complex b) { __pyx_t_double_complex z; double denom = b.real * b.real + b.imag * b.imag; z.real = (a.real * b.real + a.imag * b.imag) / denom; z.imag = (a.imag * b.real - a.real * b.imag) / denom; return z; } static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_neg(__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(__pyx_t_double_complex a) { return (a.real == 0) && (a.imag == 0); } static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_conj(__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(__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(__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(a, a); return __Pyx_c_prod(a, a); case 3: z = __Pyx_c_prod(a, a); return __Pyx_c_prod(z, a); case 4: z = __Pyx_c_prod(a, a); return __Pyx_c_prod(z, z); } } if (a.imag == 0) { if (a.real == 0) { return a; } r = a.real; theta = 0; } else { r = __Pyx_c_abs(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 static CYTHON_INLINE unsigned char __Pyx_PyInt_AsUnsignedChar(PyObject* x) { const unsigned char neg_one = (unsigned char)-1, const_zero = 0; const int is_unsigned = neg_one > const_zero; if (sizeof(unsigned char) < sizeof(long)) { long val = __Pyx_PyInt_AsLong(x); if (unlikely(val != (long)(unsigned char)val)) { if (!unlikely(val == -1 && PyErr_Occurred())) { PyErr_SetString(PyExc_OverflowError, (is_unsigned && unlikely(val < 0)) ? "can't convert negative value to unsigned char" : "value too large to convert to unsigned char"); } return (unsigned char)-1; } return (unsigned char)val; } return (unsigned char)__Pyx_PyInt_AsUnsignedLong(x); } static CYTHON_INLINE unsigned short __Pyx_PyInt_AsUnsignedShort(PyObject* x) { const unsigned short neg_one = (unsigned short)-1, const_zero = 0; const int is_unsigned = neg_one > const_zero; if (sizeof(unsigned short) < sizeof(long)) { long val = __Pyx_PyInt_AsLong(x); if (unlikely(val != (long)(unsigned short)val)) { if (!unlikely(val == -1 && PyErr_Occurred())) { PyErr_SetString(PyExc_OverflowError, (is_unsigned && unlikely(val < 0)) ? "can't convert negative value to unsigned short" : "value too large to convert to unsigned short"); } return (unsigned short)-1; } return (unsigned short)val; } return (unsigned short)__Pyx_PyInt_AsUnsignedLong(x); } static CYTHON_INLINE unsigned int __Pyx_PyInt_AsUnsignedInt(PyObject* x) { const unsigned int neg_one = (unsigned int)-1, const_zero = 0; const int is_unsigned = neg_one > const_zero; if (sizeof(unsigned int) < sizeof(long)) { long val = __Pyx_PyInt_AsLong(x); if (unlikely(val != (long)(unsigned int)val)) { if (!unlikely(val == -1 && PyErr_Occurred())) { PyErr_SetString(PyExc_OverflowError, (is_unsigned && unlikely(val < 0)) ? "can't convert negative value to unsigned int" : "value too large to convert to unsigned int"); } return (unsigned int)-1; } return (unsigned int)val; } return (unsigned int)__Pyx_PyInt_AsUnsignedLong(x); } static CYTHON_INLINE char __Pyx_PyInt_AsChar(PyObject* x) { const char neg_one = (char)-1, const_zero = 0; const int is_unsigned = neg_one > const_zero; if (sizeof(char) < sizeof(long)) { long val = __Pyx_PyInt_AsLong(x); if (unlikely(val != (long)(char)val)) { if (!unlikely(val == -1 && PyErr_Occurred())) { PyErr_SetString(PyExc_OverflowError, (is_unsigned && unlikely(val < 0)) ? "can't convert negative value to char" : "value too large to convert to char"); } return (char)-1; } return (char)val; } return (char)__Pyx_PyInt_AsLong(x); } static CYTHON_INLINE short __Pyx_PyInt_AsShort(PyObject* x) { const short neg_one = (short)-1, const_zero = 0; const int is_unsigned = neg_one > const_zero; if (sizeof(short) < sizeof(long)) { long val = __Pyx_PyInt_AsLong(x); if (unlikely(val != (long)(short)val)) { if (!unlikely(val == -1 && PyErr_Occurred())) { PyErr_SetString(PyExc_OverflowError, (is_unsigned && unlikely(val < 0)) ? "can't convert negative value to short" : "value too large to convert to short"); } return (short)-1; } return (short)val; } return (short)__Pyx_PyInt_AsLong(x); } static CYTHON_INLINE int __Pyx_PyInt_AsInt(PyObject* x) { const int neg_one = (int)-1, const_zero = 0; const int is_unsigned = neg_one > const_zero; if (sizeof(int) < sizeof(long)) { long val = __Pyx_PyInt_AsLong(x); if (unlikely(val != (long)(int)val)) { if (!unlikely(val == -1 && PyErr_Occurred())) { PyErr_SetString(PyExc_OverflowError, (is_unsigned && unlikely(val < 0)) ? "can't convert negative value to int" : "value too large to convert to int"); } return (int)-1; } return (int)val; } return (int)__Pyx_PyInt_AsLong(x); } static CYTHON_INLINE signed char __Pyx_PyInt_AsSignedChar(PyObject* x) { const signed char neg_one = (signed char)-1, const_zero = 0; const int is_unsigned = neg_one > const_zero; if (sizeof(signed char) < sizeof(long)) { long val = __Pyx_PyInt_AsLong(x); if (unlikely(val != (long)(signed char)val)) { if (!unlikely(val == -1 && PyErr_Occurred())) { PyErr_SetString(PyExc_OverflowError, (is_unsigned && unlikely(val < 0)) ? "can't convert negative value to signed char" : "value too large to convert to signed char"); } return (signed char)-1; } return (signed char)val; } return (signed char)__Pyx_PyInt_AsSignedLong(x); } static CYTHON_INLINE signed short __Pyx_PyInt_AsSignedShort(PyObject* x) { const signed short neg_one = (signed short)-1, const_zero = 0; const int is_unsigned = neg_one > const_zero; if (sizeof(signed short) < sizeof(long)) { long val = __Pyx_PyInt_AsLong(x); if (unlikely(val != (long)(signed short)val)) { if (!unlikely(val == -1 && PyErr_Occurred())) { PyErr_SetString(PyExc_OverflowError, (is_unsigned && unlikely(val < 0)) ? "can't convert negative value to signed short" : "value too large to convert to signed short"); } return (signed short)-1; } return (signed short)val; } return (signed short)__Pyx_PyInt_AsSignedLong(x); } static CYTHON_INLINE signed int __Pyx_PyInt_AsSignedInt(PyObject* x) { const signed int neg_one = (signed int)-1, const_zero = 0; const int is_unsigned = neg_one > const_zero; if (sizeof(signed int) < sizeof(long)) { long val = __Pyx_PyInt_AsLong(x); if (unlikely(val != (long)(signed int)val)) { if (!unlikely(val == -1 && PyErr_Occurred())) { PyErr_SetString(PyExc_OverflowError, (is_unsigned && unlikely(val < 0)) ? "can't convert negative value to signed int" : "value too large to convert to signed int"); } return (signed int)-1; } return (signed int)val; } return (signed int)__Pyx_PyInt_AsSignedLong(x); } static CYTHON_INLINE int __Pyx_PyInt_AsLongDouble(PyObject* x) { const int neg_one = (int)-1, const_zero = 0; const int is_unsigned = neg_one > const_zero; if (sizeof(int) < sizeof(long)) { long val = __Pyx_PyInt_AsLong(x); if (unlikely(val != (long)(int)val)) { if (!unlikely(val == -1 && PyErr_Occurred())) { PyErr_SetString(PyExc_OverflowError, (is_unsigned && unlikely(val < 0)) ? "can't convert negative value to int" : "value too large to convert to int"); } return (int)-1; } return (int)val; } return (int)__Pyx_PyInt_AsLong(x); } #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS #include "longintrepr.h" #endif #endif static CYTHON_INLINE unsigned long __Pyx_PyInt_AsUnsignedLong(PyObject* x) { const unsigned long neg_one = (unsigned long)-1, const_zero = 0; const int is_unsigned = neg_one > const_zero; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_Check(x))) { long val = PyInt_AS_LONG(x); if (is_unsigned && unlikely(val < 0)) { PyErr_SetString(PyExc_OverflowError, "can't convert negative value to unsigned long"); return (unsigned long)-1; } return (unsigned long)val; } else #endif if (likely(PyLong_Check(x))) { if (is_unsigned) { #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS if (sizeof(digit) <= sizeof(unsigned long)) { switch (Py_SIZE(x)) { case 0: return 0; case 1: return (unsigned long) ((PyLongObject*)x)->ob_digit[0]; } } #endif #endif if (unlikely(Py_SIZE(x) < 0)) { PyErr_SetString(PyExc_OverflowError, "can't convert negative value to unsigned long"); return (unsigned long)-1; } return (unsigned long)PyLong_AsUnsignedLong(x); } else { #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS if (sizeof(digit) <= sizeof(unsigned long)) { switch (Py_SIZE(x)) { case 0: return 0; case 1: return +(unsigned long) ((PyLongObject*)x)->ob_digit[0]; case -1: return -(unsigned long) ((PyLongObject*)x)->ob_digit[0]; } } #endif #endif return (unsigned long)PyLong_AsLong(x); } } else { unsigned long val; PyObject *tmp = __Pyx_PyNumber_Int(x); if (!tmp) return (unsigned long)-1; val = __Pyx_PyInt_AsUnsignedLong(tmp); Py_DECREF(tmp); return val; } } #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS #include "longintrepr.h" #endif #endif static CYTHON_INLINE unsigned PY_LONG_LONG __Pyx_PyInt_AsUnsignedLongLong(PyObject* x) { const unsigned PY_LONG_LONG neg_one = (unsigned PY_LONG_LONG)-1, const_zero = 0; const int is_unsigned = neg_one > const_zero; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_Check(x))) { long val = PyInt_AS_LONG(x); if (is_unsigned && unlikely(val < 0)) { PyErr_SetString(PyExc_OverflowError, "can't convert negative value to unsigned PY_LONG_LONG"); return (unsigned PY_LONG_LONG)-1; } return (unsigned PY_LONG_LONG)val; } else #endif if (likely(PyLong_Check(x))) { if (is_unsigned) { #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS if (sizeof(digit) <= sizeof(unsigned PY_LONG_LONG)) { switch (Py_SIZE(x)) { case 0: return 0; case 1: return (unsigned PY_LONG_LONG) ((PyLongObject*)x)->ob_digit[0]; } } #endif #endif if (unlikely(Py_SIZE(x) < 0)) { PyErr_SetString(PyExc_OverflowError, "can't convert negative value to unsigned PY_LONG_LONG"); return (unsigned PY_LONG_LONG)-1; } return (unsigned PY_LONG_LONG)PyLong_AsUnsignedLongLong(x); } else { #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS if (sizeof(digit) <= sizeof(unsigned PY_LONG_LONG)) { switch (Py_SIZE(x)) { case 0: return 0; case 1: return +(unsigned PY_LONG_LONG) ((PyLongObject*)x)->ob_digit[0]; case -1: return -(unsigned PY_LONG_LONG) ((PyLongObject*)x)->ob_digit[0]; } } #endif #endif return (unsigned PY_LONG_LONG)PyLong_AsLongLong(x); } } else { unsigned PY_LONG_LONG val; PyObject *tmp = __Pyx_PyNumber_Int(x); if (!tmp) return (unsigned PY_LONG_LONG)-1; val = __Pyx_PyInt_AsUnsignedLongLong(tmp); Py_DECREF(tmp); return val; } } #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS #include "longintrepr.h" #endif #endif static CYTHON_INLINE long __Pyx_PyInt_AsLong(PyObject* x) { const long neg_one = (long)-1, const_zero = 0; const int is_unsigned = neg_one > const_zero; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_Check(x))) { long val = PyInt_AS_LONG(x); if (is_unsigned && unlikely(val < 0)) { PyErr_SetString(PyExc_OverflowError, "can't convert negative value to long"); return (long)-1; } return (long)val; } else #endif if (likely(PyLong_Check(x))) { if (is_unsigned) { #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS if (sizeof(digit) <= sizeof(long)) { switch (Py_SIZE(x)) { case 0: return 0; case 1: return (long) ((PyLongObject*)x)->ob_digit[0]; } } #endif #endif if (unlikely(Py_SIZE(x) < 0)) { PyErr_SetString(PyExc_OverflowError, "can't convert negative value to long"); return (long)-1; } return (long)PyLong_AsUnsignedLong(x); } else { #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS if (sizeof(digit) <= sizeof(long)) { switch (Py_SIZE(x)) { case 0: return 0; case 1: return +(long) ((PyLongObject*)x)->ob_digit[0]; case -1: return -(long) ((PyLongObject*)x)->ob_digit[0]; } } #endif #endif return (long)PyLong_AsLong(x); } } else { long val; PyObject *tmp = __Pyx_PyNumber_Int(x); if (!tmp) return (long)-1; val = __Pyx_PyInt_AsLong(tmp); Py_DECREF(tmp); return val; } } #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS #include "longintrepr.h" #endif #endif static CYTHON_INLINE PY_LONG_LONG __Pyx_PyInt_AsLongLong(PyObject* x) { const PY_LONG_LONG neg_one = (PY_LONG_LONG)-1, const_zero = 0; const int is_unsigned = neg_one > const_zero; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_Check(x))) { long val = PyInt_AS_LONG(x); if (is_unsigned && unlikely(val < 0)) { PyErr_SetString(PyExc_OverflowError, "can't convert negative value to PY_LONG_LONG"); return (PY_LONG_LONG)-1; } return (PY_LONG_LONG)val; } else #endif if (likely(PyLong_Check(x))) { if (is_unsigned) { #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS if (sizeof(digit) <= sizeof(PY_LONG_LONG)) { switch (Py_SIZE(x)) { case 0: return 0; case 1: return (PY_LONG_LONG) ((PyLongObject*)x)->ob_digit[0]; } } #endif #endif if (unlikely(Py_SIZE(x) < 0)) { PyErr_SetString(PyExc_OverflowError, "can't convert negative value to PY_LONG_LONG"); return (PY_LONG_LONG)-1; } return (PY_LONG_LONG)PyLong_AsUnsignedLongLong(x); } else { #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS if (sizeof(digit) <= sizeof(PY_LONG_LONG)) { switch (Py_SIZE(x)) { case 0: return 0; case 1: return +(PY_LONG_LONG) ((PyLongObject*)x)->ob_digit[0]; case -1: return -(PY_LONG_LONG) ((PyLongObject*)x)->ob_digit[0]; } } #endif #endif return (PY_LONG_LONG)PyLong_AsLongLong(x); } } else { PY_LONG_LONG val; PyObject *tmp = __Pyx_PyNumber_Int(x); if (!tmp) return (PY_LONG_LONG)-1; val = __Pyx_PyInt_AsLongLong(tmp); Py_DECREF(tmp); return val; } } #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS #include "longintrepr.h" #endif #endif static CYTHON_INLINE signed long __Pyx_PyInt_AsSignedLong(PyObject* x) { const signed long neg_one = (signed long)-1, const_zero = 0; const int is_unsigned = neg_one > const_zero; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_Check(x))) { long val = PyInt_AS_LONG(x); if (is_unsigned && unlikely(val < 0)) { PyErr_SetString(PyExc_OverflowError, "can't convert negative value to signed long"); return (signed long)-1; } return (signed long)val; } else #endif if (likely(PyLong_Check(x))) { if (is_unsigned) { #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS if (sizeof(digit) <= sizeof(signed long)) { switch (Py_SIZE(x)) { case 0: return 0; case 1: return (signed long) ((PyLongObject*)x)->ob_digit[0]; } } #endif #endif if (unlikely(Py_SIZE(x) < 0)) { PyErr_SetString(PyExc_OverflowError, "can't convert negative value to signed long"); return (signed long)-1; } return (signed long)PyLong_AsUnsignedLong(x); } else { #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS if (sizeof(digit) <= sizeof(signed long)) { switch (Py_SIZE(x)) { case 0: return 0; case 1: return +(signed long) ((PyLongObject*)x)->ob_digit[0]; case -1: return -(signed long) ((PyLongObject*)x)->ob_digit[0]; } } #endif #endif return (signed long)PyLong_AsLong(x); } } else { signed long val; PyObject *tmp = __Pyx_PyNumber_Int(x); if (!tmp) return (signed long)-1; val = __Pyx_PyInt_AsSignedLong(tmp); Py_DECREF(tmp); return val; } } #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS #include "longintrepr.h" #endif #endif static CYTHON_INLINE signed PY_LONG_LONG __Pyx_PyInt_AsSignedLongLong(PyObject* x) { const signed PY_LONG_LONG neg_one = (signed PY_LONG_LONG)-1, const_zero = 0; const int is_unsigned = neg_one > const_zero; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_Check(x))) { long val = PyInt_AS_LONG(x); if (is_unsigned && unlikely(val < 0)) { PyErr_SetString(PyExc_OverflowError, "can't convert negative value to signed PY_LONG_LONG"); return (signed PY_LONG_LONG)-1; } return (signed PY_LONG_LONG)val; } else #endif if (likely(PyLong_Check(x))) { if (is_unsigned) { #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS if (sizeof(digit) <= sizeof(signed PY_LONG_LONG)) { switch (Py_SIZE(x)) { case 0: return 0; case 1: return (signed PY_LONG_LONG) ((PyLongObject*)x)->ob_digit[0]; } } #endif #endif if (unlikely(Py_SIZE(x) < 0)) { PyErr_SetString(PyExc_OverflowError, "can't convert negative value to signed PY_LONG_LONG"); return (signed PY_LONG_LONG)-1; } return (signed PY_LONG_LONG)PyLong_AsUnsignedLongLong(x); } else { #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS if (sizeof(digit) <= sizeof(signed PY_LONG_LONG)) { switch (Py_SIZE(x)) { case 0: return 0; case 1: return +(signed PY_LONG_LONG) ((PyLongObject*)x)->ob_digit[0]; case -1: return -(signed PY_LONG_LONG) ((PyLongObject*)x)->ob_digit[0]; } } #endif #endif return (signed PY_LONG_LONG)PyLong_AsLongLong(x); } } else { signed PY_LONG_LONG val; PyObject *tmp = __Pyx_PyNumber_Int(x); if (!tmp) return (signed PY_LONG_LONG)-1; val = __Pyx_PyInt_AsSignedLongLong(tmp); Py_DECREF(tmp); return val; } } 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); #if PY_VERSION_HEX < 0x02050000 return PyErr_Warn(NULL, message); #else return PyErr_WarnEx(NULL, message, 1); #endif } return 0; } #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 #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, "%s.%s 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", module_name, class_name); #if PY_VERSION_HEX < 0x02050000 if (PyErr_Warn(NULL, warning) < 0) goto bad; #else if (PyErr_WarnEx(NULL, warning, 0) < 0) goto bad; #endif } else if ((size_t)basicsize != size) { PyErr_Format(PyExc_ValueError, "%s.%s has the wrong size, try recompiling", module_name, class_name); goto bad; } return (PyTypeObject *)result; bad: Py_XDECREF(py_module); Py_XDECREF(result); return NULL; } #endif 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) / 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, 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); } #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, /*int argcount,*/ 0, /*int kwonlyargcount,*/ 0, /*int nlocals,*/ 0, /*int stacksize,*/ 0, /*int flags,*/ __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, /*int firstlineno,*/ __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; PyObject *py_globals = 0; PyFrameObject *py_frame = 0; py_code = __pyx_find_code_object(c_line ? c_line : py_line); if (!py_code) { py_code = __Pyx_CreateCodeObjectForTraceback( funcname, c_line, py_line, filename); if (!py_code) goto bad; __pyx_insert_code_object(c_line ? c_line : py_line, py_code); } py_globals = PyModule_GetDict(__pyx_m); if (!py_globals) goto bad; py_frame = PyFrame_New( PyThreadState_GET(), /*PyThreadState *tstate,*/ py_code, /*PyCodeObject *code,*/ py_globals, /*PyObject *globals,*/ 0 /*PyObject *locals*/ ); if (!py_frame) goto bad; py_frame->f_lineno = py_line; PyTraceBack_Here(py_frame); bad: Py_XDECREF(py_code); Py_XDECREF(py_frame); } 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 /* Python 3+ has unicode identifiers */ if (t->is_unicode | t->is_str) { if (t->intern) { *t->p = PyUnicode_InternFromString(t->s); } else if (t->encoding) { *t->p = PyUnicode_Decode(t->s, t->n - 1, t->encoding, NULL); } else { *t->p = PyUnicode_FromStringAndSize(t->s, t->n - 1); } } else { *t->p = PyBytes_FromStringAndSize(t->s, t->n - 1); } #endif if (!*t->p) return -1; ++t; } return 0; } static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(char* c_str) { return __Pyx_PyUnicode_FromStringAndSize(c_str, strlen(c_str)); } static CYTHON_INLINE char* __Pyx_PyObject_AsString(PyObject* o) { Py_ssize_t ignore; return __Pyx_PyObject_AsStringAndSize(o, &ignore); } static CYTHON_INLINE char* __Pyx_PyObject_AsStringAndSize(PyObject* o, Py_ssize_t *length) { #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT if ( #if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII __Pyx_sys_getdefaultencoding_not_ascii && #endif PyUnicode_Check(o)) { #if PY_VERSION_HEX < 0x03030000 char* defenc_c; PyObject* defenc = _PyUnicode_AsDefaultEncodedString(o, NULL); if (!defenc) return NULL; defenc_c = PyBytes_AS_STRING(defenc); #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII { char* end = defenc_c + PyBytes_GET_SIZE(defenc); char* c; for (c = defenc_c; c < end; c++) { if ((unsigned char) (*c) >= 128) { PyUnicode_AsASCIIString(o); return NULL; } } } #endif /*__PYX_DEFAULT_STRING_ENCODING_IS_ASCII*/ *length = PyBytes_GET_SIZE(defenc); return defenc_c; #else /* PY_VERSION_HEX < 0x03030000 */ if (PyUnicode_READY(o) == -1) return NULL; #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII if (PyUnicode_IS_ASCII(o)) { *length = PyUnicode_GET_DATA_SIZE(o); return PyUnicode_AsUTF8(o); } else { PyUnicode_AsASCIIString(o); return NULL; } #else /* __PYX_DEFAULT_STRING_ENCODING_IS_ASCII */ return PyUnicode_AsUTF8AndSize(o, length); #endif /* __PYX_DEFAULT_STRING_ENCODING_IS_ASCII */ #endif /* PY_VERSION_HEX < 0x03030000 */ } else #endif /* __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT */ { char* result; int r = PyBytes_AsStringAndSize(o, &result, length); if (r < 0) { return NULL; } else { return result; } } } static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject* x) { int is_true = x == Py_True; if (is_true | (x == Py_False) | (x == Py_None)) return is_true; else return PyObject_IsTrue(x); } static CYTHON_INLINE PyObject* __Pyx_PyNumber_Int(PyObject* x) { PyNumberMethods *m; const char *name = NULL; PyObject *res = NULL; #if PY_MAJOR_VERSION < 3 if (PyInt_Check(x) || PyLong_Check(x)) #else if (PyLong_Check(x)) #endif return Py_INCREF(x), x; m = Py_TYPE(x)->tp_as_number; #if PY_MAJOR_VERSION < 3 if (m && m->nb_int) { name = "int"; res = PyNumber_Int(x); } else if (m && m->nb_long) { name = "long"; res = PyNumber_Long(x); } #else if (m && m->nb_int) { name = "int"; res = PyNumber_Long(x); } #endif if (res) { #if PY_MAJOR_VERSION < 3 if (!PyInt_Check(res) && !PyLong_Check(res)) { #else if (!PyLong_Check(res)) { #endif PyErr_Format(PyExc_TypeError, "__%s__ returned non-%s (type %.200s)", name, name, Py_TYPE(res)->tp_name); Py_DECREF(res); return NULL; } } else if (!PyErr_Occurred()) { PyErr_SetString(PyExc_TypeError, "an integer is required"); } return res; } static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) { Py_ssize_t ival; PyObject* x = 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) { #if PY_VERSION_HEX < 0x02050000 if (ival <= LONG_MAX) return PyInt_FromLong((long)ival); else { unsigned char *bytes = (unsigned char *) &ival; int one = 1; int little = (int)*(unsigned char*)&one; return _PyLong_FromByteArray(bytes, sizeof(size_t), little, 0); } #else return PyInt_FromSize_t(ival); #endif } static CYTHON_INLINE size_t __Pyx_PyInt_AsSize_t(PyObject* x) { unsigned PY_LONG_LONG val = __Pyx_PyInt_AsUnsignedLongLong(x); if (unlikely(val != (unsigned PY_LONG_LONG)(size_t)val)) { if ((val != (unsigned PY_LONG_LONG)-1) || !PyErr_Occurred()) PyErr_SetString(PyExc_OverflowError, "value too large to convert to size_t"); return (size_t)-1; } return (size_t)val; } #endif /* Py_PYTHON_H */ debian/cythonized-files3/pandas/tslib.c0000664000000000000000001324772012275603610015304 0ustar /* Generated by Cython 0.19.2 on Mon Feb 3 08:42:29 2014 */ #define PY_SSIZE_T_CLEAN #ifndef CYTHON_USE_PYLONG_INTERNALS #ifdef PYLONG_BITS_IN_DIGIT #define CYTHON_USE_PYLONG_INTERNALS 0 #else #include "pyconfig.h" #ifdef PYLONG_BITS_IN_DIGIT #define CYTHON_USE_PYLONG_INTERNALS 1 #else #define CYTHON_USE_PYLONG_INTERNALS 0 #endif #endif #endif #include "Python.h" #ifndef Py_PYTHON_H #error Python headers needed to compile C extensions, please install development version of Python. #elif PY_VERSION_HEX < 0x02040000 #error Cython requires Python 2.4+. #else #include /* For offsetof */ #ifndef offsetof #define offsetof(type, member) ( (size_t) & ((type*)0) -> member ) #endif #if !defined(WIN32) && !defined(MS_WINDOWS) #ifndef __stdcall #define __stdcall #endif #ifndef __cdecl #define __cdecl #endif #ifndef __fastcall #define __fastcall #endif #endif #ifndef DL_IMPORT #define DL_IMPORT(t) t #endif #ifndef DL_EXPORT #define DL_EXPORT(t) t #endif #ifndef PY_LONG_LONG #define PY_LONG_LONG LONG_LONG #endif #ifndef Py_HUGE_VAL #define Py_HUGE_VAL HUGE_VAL #endif #ifdef PYPY_VERSION #define CYTHON_COMPILING_IN_PYPY 1 #define CYTHON_COMPILING_IN_CPYTHON 0 #else #define CYTHON_COMPILING_IN_PYPY 0 #define CYTHON_COMPILING_IN_CPYTHON 1 #endif #if PY_VERSION_HEX < 0x02050000 typedef int Py_ssize_t; #define PY_SSIZE_T_MAX INT_MAX #define PY_SSIZE_T_MIN INT_MIN #define PY_FORMAT_SIZE_T "" #define CYTHON_FORMAT_SSIZE_T "" #define PyInt_FromSsize_t(z) PyInt_FromLong(z) #define PyInt_AsSsize_t(o) __Pyx_PyInt_AsInt(o) #define PyNumber_Index(o) ((PyNumber_Check(o) && !PyFloat_Check(o)) ? PyNumber_Int(o) : \ (PyErr_Format(PyExc_TypeError, \ "expected index value, got %.200s", Py_TYPE(o)->tp_name), \ (PyObject*)0)) #define __Pyx_PyIndex_Check(o) (PyNumber_Check(o) && !PyFloat_Check(o) && \ !PyComplex_Check(o)) #define PyIndex_Check __Pyx_PyIndex_Check #define PyErr_WarnEx(category, message, stacklevel) PyErr_Warn(category, message) #define __PYX_BUILD_PY_SSIZE_T "i" #else #define __PYX_BUILD_PY_SSIZE_T "n" #define CYTHON_FORMAT_SSIZE_T "z" #define __Pyx_PyIndex_Check PyIndex_Check #endif #if PY_VERSION_HEX < 0x02060000 #define Py_REFCNT(ob) (((PyObject*)(ob))->ob_refcnt) #define Py_TYPE(ob) (((PyObject*)(ob))->ob_type) #define Py_SIZE(ob) (((PyVarObject*)(ob))->ob_size) #define PyVarObject_HEAD_INIT(type, size) \ PyObject_HEAD_INIT(type) size, #define PyType_Modified(t) typedef struct { void *buf; PyObject *obj; Py_ssize_t len; Py_ssize_t itemsize; int readonly; int ndim; char *format; Py_ssize_t *shape; Py_ssize_t *strides; Py_ssize_t *suboffsets; void *internal; } Py_buffer; #define PyBUF_SIMPLE 0 #define PyBUF_WRITABLE 0x0001 #define PyBUF_FORMAT 0x0004 #define PyBUF_ND 0x0008 #define PyBUF_STRIDES (0x0010 | PyBUF_ND) #define PyBUF_C_CONTIGUOUS (0x0020 | PyBUF_STRIDES) #define PyBUF_F_CONTIGUOUS (0x0040 | PyBUF_STRIDES) #define PyBUF_ANY_CONTIGUOUS (0x0080 | PyBUF_STRIDES) #define PyBUF_INDIRECT (0x0100 | PyBUF_STRIDES) #define PyBUF_RECORDS (PyBUF_STRIDES | PyBUF_FORMAT | PyBUF_WRITABLE) #define PyBUF_FULL (PyBUF_INDIRECT | PyBUF_FORMAT | PyBUF_WRITABLE) typedef int (*getbufferproc)(PyObject *, Py_buffer *, int); typedef void (*releasebufferproc)(PyObject *, Py_buffer *); #endif #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, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) #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) #endif #if PY_MAJOR_VERSION < 3 && PY_MINOR_VERSION < 6 #define PyUnicode_FromString(s) PyUnicode_Decode(s, strlen(s), "UTF-8", "strict") #endif #if PY_MAJOR_VERSION >= 3 #define Py_TPFLAGS_CHECKTYPES 0 #define Py_TPFLAGS_HAVE_INDEX 0 #endif #if (PY_VERSION_HEX < 0x02060000) || (PY_MAJOR_VERSION >= 3) #define Py_TPFLAGS_HAVE_NEWBUFFER 0 #endif #if PY_VERSION_HEX < 0x02060000 #define Py_TPFLAGS_HAVE_VERSION_TAG 0 #endif #if PY_VERSION_HEX > 0x03030000 && defined(PyUnicode_KIND) #define CYTHON_PEP393_ENABLED 1 #define __Pyx_PyUnicode_READY(op) (likely(PyUnicode_IS_READY(op)) ? \ 0 : _PyUnicode_Ready((PyObject *)(op))) #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_LENGTH(u) #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i) #define __Pyx_PyUnicode_READ(k, d, i) PyUnicode_READ(k, d, i) #else #define CYTHON_PEP393_ENABLED 0 #define __Pyx_PyUnicode_READY(op) (0) #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_SIZE(u) #define __Pyx_PyUnicode_READ_CHAR(u, i) ((Py_UCS4)(PyUnicode_AS_UNICODE(u)[i])) #define __Pyx_PyUnicode_READ(k, d, i) ((k=k), (Py_UCS4)(((Py_UNICODE*)d)[i])) #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_VERSION_HEX < 0x02060000 #define PyBytesObject PyStringObject #define PyBytes_Type PyString_Type #define PyBytes_Check PyString_Check #define PyBytes_CheckExact PyString_CheckExact #define PyBytes_FromString PyString_FromString #define PyBytes_FromStringAndSize PyString_FromStringAndSize #define PyBytes_FromFormat PyString_FromFormat #define PyBytes_DecodeEscape PyString_DecodeEscape #define PyBytes_AsString PyString_AsString #define PyBytes_AsStringAndSize PyString_AsStringAndSize #define PyBytes_Size PyString_Size #define PyBytes_AS_STRING PyString_AS_STRING #define PyBytes_GET_SIZE PyString_GET_SIZE #define PyBytes_Repr PyString_Repr #define PyBytes_Concat PyString_Concat #define PyBytes_ConcatAndDel PyString_ConcatAndDel #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_CheckExact(obj) || PyUnicode_CheckExact(obj) || \ PyString_Check(obj) || PyUnicode_Check(obj)) #define __Pyx_PyBaseString_CheckExact(obj) (Py_TYPE(obj) == &PyBaseString_Type) #endif #if PY_VERSION_HEX < 0x02060000 #define PySet_Check(obj) PyObject_TypeCheck(obj, &PySet_Type) #define PyFrozenSet_Check(obj) PyObject_TypeCheck(obj, &PyFrozenSet_Type) #endif #ifndef PySet_CheckExact #define PySet_CheckExact(obj) (Py_TYPE(obj) == &PySet_Type) #endif #define __Pyx_TypeCheck(obj, type) PyObject_TypeCheck(obj, (PyTypeObject *)type) #if PY_MAJOR_VERSION >= 3 #define PyIntObject PyLongObject #define PyInt_Type PyLong_Type #define PyInt_Check(op) PyLong_Check(op) #define PyInt_CheckExact(op) PyLong_CheckExact(op) #define PyInt_FromString PyLong_FromString #define PyInt_FromUnicode PyLong_FromUnicode #define PyInt_FromLong PyLong_FromLong #define PyInt_FromSize_t PyLong_FromSize_t #define PyInt_FromSsize_t PyLong_FromSsize_t #define PyInt_AsLong PyLong_AsLong #define PyInt_AS_LONG PyLong_AS_LONG #define PyInt_AsSsize_t PyLong_AsSsize_t #define PyInt_AsUnsignedLongMask PyLong_AsUnsignedLongMask #define PyInt_AsUnsignedLongLongMask PyLong_AsUnsignedLongLongMask #endif #if PY_MAJOR_VERSION >= 3 #define PyBoolObject PyLongObject #endif #if PY_VERSION_HEX < 0x03020000 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) || (PY_VERSION_HEX >= 0x03010300) #define __Pyx_PySequence_GetSlice(obj, a, b) PySequence_GetSlice(obj, a, b) #define __Pyx_PySequence_SetSlice(obj, a, b, value) PySequence_SetSlice(obj, a, b, value) #define __Pyx_PySequence_DelSlice(obj, a, b) PySequence_DelSlice(obj, a, b) #else #define __Pyx_PySequence_GetSlice(obj, a, b) (unlikely(!(obj)) ? \ (PyErr_SetString(PyExc_SystemError, "null argument to internal routine"), (PyObject*)0) : \ (likely((obj)->ob_type->tp_as_mapping) ? (PySequence_GetSlice(obj, a, b)) : \ (PyErr_Format(PyExc_TypeError, "'%.200s' object is unsliceable", (obj)->ob_type->tp_name), (PyObject*)0))) #define __Pyx_PySequence_SetSlice(obj, a, b, value) (unlikely(!(obj)) ? \ (PyErr_SetString(PyExc_SystemError, "null argument to internal routine"), -1) : \ (likely((obj)->ob_type->tp_as_mapping) ? (PySequence_SetSlice(obj, a, b, value)) : \ (PyErr_Format(PyExc_TypeError, "'%.200s' object doesn't support slice assignment", (obj)->ob_type->tp_name), -1))) #define __Pyx_PySequence_DelSlice(obj, a, b) (unlikely(!(obj)) ? \ (PyErr_SetString(PyExc_SystemError, "null argument to internal routine"), -1) : \ (likely((obj)->ob_type->tp_as_mapping) ? (PySequence_DelSlice(obj, a, b)) : \ (PyErr_Format(PyExc_TypeError, "'%.200s' object doesn't support slice deletion", (obj)->ob_type->tp_name), -1))) #endif #if PY_MAJOR_VERSION >= 3 #define PyMethod_New(func, self, klass) ((self) ? PyMethod_New(func, self) : PyInstanceMethod_New(func)) #endif #if PY_VERSION_HEX < 0x02050000 #define __Pyx_GetAttrString(o,n) PyObject_GetAttrString((o),((char *)(n))) #define __Pyx_SetAttrString(o,n,a) PyObject_SetAttrString((o),((char *)(n)),(a)) #define __Pyx_DelAttrString(o,n) PyObject_DelAttrString((o),((char *)(n))) #else #define __Pyx_GetAttrString(o,n) PyObject_GetAttrString((o),(n)) #define __Pyx_SetAttrString(o,n,a) PyObject_SetAttrString((o),(n),(a)) #define __Pyx_DelAttrString(o,n) PyObject_DelAttrString((o),(n)) #endif #if PY_VERSION_HEX < 0x02050000 #define __Pyx_NAMESTR(n) ((char *)(n)) #define __Pyx_DOCSTR(n) ((char *)(n)) #else #define __Pyx_NAMESTR(n) (n) #define __Pyx_DOCSTR(n) (n) #endif #ifndef CYTHON_INLINE #if defined(__GNUC__) #define CYTHON_INLINE __inline__ #elif defined(_MSC_VER) #define CYTHON_INLINE __inline #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L #define CYTHON_INLINE inline #else #define CYTHON_INLINE #endif #endif #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 #ifdef NAN #define __PYX_NAN() ((float) NAN) #else static CYTHON_INLINE float __PYX_NAN() { /* Initialize NaN. The sign is irrelevant, an exponent with all bits 1 and a nonzero mantissa means NaN. If the first bit in the mantissa is 1, it is a quiet NaN. */ float value; memset(&value, 0xFF, sizeof(value)); return value; } #endif #if PY_MAJOR_VERSION >= 3 #define __Pyx_PyNumber_Divide(x,y) PyNumber_TrueDivide(x,y) #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceTrueDivide(x,y) #else #define __Pyx_PyNumber_Divide(x,y) PyNumber_Divide(x,y) #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceDivide(x,y) #endif #ifndef __PYX_EXTERN_C #ifdef __cplusplus #define __PYX_EXTERN_C extern "C" #else #define __PYX_EXTERN_C extern #endif #endif #if defined(WIN32) || defined(MS_WINDOWS) #define _USE_MATH_DEFINES #endif #include #define __PYX_HAVE__pandas__tslib #define __PYX_HAVE_API__pandas__tslib #include "string.h" #include "stdio.h" #include "stdlib.h" #include "numpy/arrayobject.h" #include "numpy/ufuncobject.h" #include "pythread.h" #include "headers/stdint.h" #include "datetime.h" #include "datetime_helper.h" #include "numpy/ndarrayobject.h" #include "numpy_helper.h" #include "numpy/npy_common.h" #include "datetime/np_datetime.h" #include "datetime/np_datetime_strings.h" #include "khash_python.h" #include "period.h" #ifdef _OPENMP #include #endif /* _OPENMP */ #ifdef PYREX_WITHOUT_ASSERTIONS #define CYTHON_WITHOUT_ASSERTIONS #endif #ifndef CYTHON_UNUSED # if defined(__GNUC__) # if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)) # define CYTHON_UNUSED __attribute__ ((__unused__)) # else # define CYTHON_UNUSED # endif # elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER)) # define CYTHON_UNUSED __attribute__ ((__unused__)) # else # define CYTHON_UNUSED # endif #endif typedef struct {PyObject **p; char *s; const Py_ssize_t n; const char* encoding; const char is_unicode; const char is_str; const char intern; } __Pyx_StringTabEntry; /*proto*/ #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 static CYTHON_INLINE char* __Pyx_PyObject_AsString(PyObject*); static CYTHON_INLINE char* __Pyx_PyObject_AsStringAndSize(PyObject*, Py_ssize_t* length); #define __Pyx_PyBytes_FromString PyBytes_FromString #define __Pyx_PyBytes_FromStringAndSize PyBytes_FromStringAndSize static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(char*); #if PY_MAJOR_VERSION < 3 #define __Pyx_PyStr_FromString __Pyx_PyBytes_FromString #define __Pyx_PyStr_FromStringAndSize __Pyx_PyBytes_FromStringAndSize #else #define __Pyx_PyStr_FromString __Pyx_PyUnicode_FromString #define __Pyx_PyStr_FromStringAndSize __Pyx_PyUnicode_FromStringAndSize #endif #define __Pyx_PyObject_AsUString(s) ((unsigned char*) __Pyx_PyObject_AsString(s)) #define __Pyx_PyObject_FromUString(s) __Pyx_PyObject_FromString((char*)s) #define __Pyx_PyBytes_FromUString(s) __Pyx_PyBytes_FromString((char*)s) #define __Pyx_PyStr_FromUString(s) __Pyx_PyStr_FromString((char*)s) #define __Pyx_PyUnicode_FromUString(s) __Pyx_PyUnicode_FromString((char*)s) #if PY_MAJOR_VERSION < 3 static CYTHON_INLINE size_t __Pyx_Py_UNICODE_strlen(const Py_UNICODE *u) { const Py_UNICODE *u_end = u; while (*u_end++) ; return u_end - u - 1; } #else #define __Pyx_Py_UNICODE_strlen Py_UNICODE_strlen #endif #define __Pyx_PyUnicode_FromUnicode(u) PyUnicode_FromUnicode(u, __Pyx_Py_UNICODE_strlen(u)) #define __Pyx_PyUnicode_FromUnicodeAndLength PyUnicode_FromUnicode #define __Pyx_PyUnicode_AsUnicode PyUnicode_AsUnicode #define __Pyx_Owned_Py_None(b) (Py_INCREF(Py_None), Py_None) #define __Pyx_PyBool_FromLong(b) ((b) ? (Py_INCREF(Py_True), Py_True) : (Py_INCREF(Py_False), Py_False)) static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*); static CYTHON_INLINE PyObject* __Pyx_PyNumber_Int(PyObject* x); static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*); static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t); static CYTHON_INLINE size_t __Pyx_PyInt_AsSize_t(PyObject*); #if CYTHON_COMPILING_IN_CPYTHON #define __pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x)) #else #define __pyx_PyFloat_AsDouble(x) PyFloat_AsDouble(x) #endif #define __pyx_PyFloat_AsFloat(x) ((float) __pyx_PyFloat_AsDouble(x)) #if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII static int __Pyx_sys_getdefaultencoding_not_ascii; static int __Pyx_init_sys_getdefaultencoding_params() { PyObject* sys = NULL; PyObject* default_encoding = NULL; PyObject* ascii_chars_u = NULL; PyObject* ascii_chars_b = NULL; sys = PyImport_ImportModule("sys"); if (sys == NULL) goto bad; default_encoding = PyObject_CallMethod(sys, (char*) (const char*) "getdefaultencoding", NULL); if (default_encoding == NULL) goto bad; if (strcmp(PyBytes_AsString(default_encoding), "ascii") == 0) { __Pyx_sys_getdefaultencoding_not_ascii = 0; } else { const char* default_encoding_c = PyBytes_AS_STRING(default_encoding); 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 == NULL) goto bad; ascii_chars_b = PyUnicode_AsEncodedString(ascii_chars_u, default_encoding_c, NULL); if (ascii_chars_b == NULL || strncmp(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 '%s' is not a superset of ascii.", default_encoding_c); goto bad; } } Py_XDECREF(sys); Py_XDECREF(default_encoding); Py_XDECREF(ascii_chars_u); Py_XDECREF(ascii_chars_b); return 0; bad: Py_XDECREF(sys); 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() { PyObject* sys = NULL; PyObject* default_encoding = NULL; char* default_encoding_c; sys = PyImport_ImportModule("sys"); if (sys == NULL) goto bad; default_encoding = PyObject_CallMethod(sys, (char*) (const char*) "getdefaultencoding", NULL); if (default_encoding == NULL) goto bad; default_encoding_c = PyBytes_AS_STRING(default_encoding); __PYX_DEFAULT_STRING_ENCODING = (char*) malloc(strlen(default_encoding_c)); strcpy(__PYX_DEFAULT_STRING_ENCODING, default_encoding_c); Py_DECREF(sys); Py_DECREF(default_encoding); return 0; bad: Py_XDECREF(sys); Py_XDECREF(default_encoding); return -1; } #endif #endif #ifdef __GNUC__ /* Test for GCC > 2.95 */ #if __GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95)) #define likely(x) __builtin_expect(!!(x), 1) #define unlikely(x) __builtin_expect(!!(x), 0) #else /* __GNUC__ > 2 ... */ #define likely(x) (x) #define unlikely(x) (x) #endif /* __GNUC__ > 2 ... */ #else /* __GNUC__ */ #define likely(x) (x) #define unlikely(x) (x) #endif /* __GNUC__ */ static PyObject *__pyx_m; static PyObject *__pyx_d; static PyObject *__pyx_b; static PyObject *__pyx_empty_tuple; static PyObject *__pyx_empty_bytes; static int __pyx_lineno; static int __pyx_clineno = 0; static const char * __pyx_cfilenm= __FILE__; static const char *__pyx_filename; #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[] = { "tslib.pyx", "datetime.pxd", "util.pxd", "numpy.pxd", "type.pxd", "bool.pxd", "complex.pxd", }; #define IS_UNSIGNED(type) (((type) -1) > 0) struct __Pyx_StructField_; #define __PYX_BUF_FLAGS_PACKED_STRUCT (1 << 0) typedef struct { const char* name; /* for error messages only */ struct __Pyx_StructField_* fields; size_t size; /* sizeof(type) */ size_t arraysize[8]; /* length of array in each dimension */ int ndim; char typegroup; /* _R_eal, _C_omplex, Signed _I_nt, _U_nsigned int, _S_truct, _P_ointer, _O_bject, c_H_ar */ 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; /* "numpy.pxd":726 * # 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; /* "numpy.pxd":727 * * 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; /* "numpy.pxd":728 * 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; /* "numpy.pxd":729 * 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; /* "numpy.pxd":733 * #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; /* "numpy.pxd":734 * * 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; /* "numpy.pxd":735 * 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; /* "numpy.pxd":736 * 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; /* "numpy.pxd":740 * #ctypedef npy_uint128 uint128_t * * ctypedef npy_float16 float16_t # <<<<<<<<<<<<<< * ctypedef npy_float32 float32_t * ctypedef npy_float64 float64_t */ typedef npy_float16 __pyx_t_5numpy_float16_t; /* "numpy.pxd":741 * * ctypedef npy_float16 float16_t * ctypedef npy_float32 float32_t # <<<<<<<<<<<<<< * ctypedef npy_float64 float64_t * #ctypedef npy_float80 float80_t */ typedef npy_float32 __pyx_t_5numpy_float32_t; /* "numpy.pxd":742 * ctypedef npy_float16 float16_t * 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; /* "numpy.pxd":751 * # 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; /* "numpy.pxd":752 * # 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; /* "numpy.pxd":753 * 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; /* "numpy.pxd":755 * 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; /* "numpy.pxd":756 * * ctypedef npy_ulong uint_t * ctypedef npy_ulonglong ulong_t # <<<<<<<<<<<<<< * ctypedef npy_ulonglong ulonglong_t * */ typedef npy_ulonglong __pyx_t_5numpy_ulong_t; /* "numpy.pxd":757 * 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; /* "numpy.pxd":759 * ctypedef npy_ulonglong ulonglong_t * * ctypedef npy_intp intp_t # <<<<<<<<<<<<<< * ctypedef npy_uintp uintp_t * */ typedef npy_intp __pyx_t_5numpy_intp_t; /* "numpy.pxd":760 * * ctypedef npy_intp intp_t * ctypedef npy_uintp uintp_t # <<<<<<<<<<<<<< * * ctypedef npy_double float_t */ typedef npy_uintp __pyx_t_5numpy_uintp_t; /* "numpy.pxd":762 * 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; /* "numpy.pxd":763 * * ctypedef npy_double float_t * ctypedef npy_double double_t # <<<<<<<<<<<<<< * ctypedef npy_longdouble longdouble_t * */ typedef npy_double __pyx_t_5numpy_double_t; /* "numpy.pxd":764 * 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; #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 #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 /*--- Type declarations ---*/ struct __pyx_obj_6pandas_5tslib___pyx_scope_struct_2___seqToRE; struct __pyx_obj_6pandas_5tslib__Timestamp; struct __pyx_obj_6pandas_5tslib__NaT; struct __pyx_obj_6pandas_5tslib___pyx_scope_struct_3_genexpr; struct __pyx_obj_6pandas_5tslib___pyx_scope_struct_1_genexpr; struct __pyx_obj_6pandas_5tslib__TSObject; struct __pyx_obj_6pandas_5tslib___pyx_scope_struct____init__; /* "numpy.pxd":766 * 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; /* "numpy.pxd":767 * * ctypedef npy_cfloat cfloat_t * ctypedef npy_cdouble cdouble_t # <<<<<<<<<<<<<< * ctypedef npy_clongdouble clongdouble_t * */ typedef npy_cdouble __pyx_t_5numpy_cdouble_t; /* "numpy.pxd":768 * 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; /* "numpy.pxd":770 * ctypedef npy_clongdouble clongdouble_t * * ctypedef npy_cdouble complex_t # <<<<<<<<<<<<<< * * cdef inline object PyArray_MultiIterNew1(a): */ typedef npy_cdouble __pyx_t_5numpy_complex_t; struct __pyx_opt_args_6pandas_5tslib_resolution; struct __pyx_defaults; typedef struct __pyx_defaults __pyx_defaults; /* "pandas/tslib.pyx":2777 * # period accessors * * ctypedef int (*accessor)(int64_t ordinal, int freq) except INT32_MIN # <<<<<<<<<<<<<< * * def get_period_field(int code, int64_t value, int freq): */ typedef int (*__pyx_t_6pandas_5tslib_accessor)(__pyx_t_5numpy_int64_t, int); /* "pandas/tslib.pyx":2845 * return ordinals * * cpdef resolution(ndarray[int64_t] stamps, tz=None): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = len(stamps) */ struct __pyx_opt_args_6pandas_5tslib_resolution { int __pyx_n; PyObject *tz; }; struct __pyx_defaults { PyObject *__pyx_arg_warn; }; /* "pandas/tslib.pyx":3173 * base.__setitem__('X', self.pattern(self.locale_time.LC_time)) * * def __seqToRE(self, to_convert, directive): # <<<<<<<<<<<<<< * """Convert a list to a regex string for matching a directive. * */ struct __pyx_obj_6pandas_5tslib___pyx_scope_struct_2___seqToRE { PyObject_HEAD PyObject *__pyx_v_to_convert; }; /* "pandas/tslib.pyx":563 * # (see Timestamp class above). This will serve as a C extension type that * # shadows the python class, where we do any heavy lifting. * cdef class _Timestamp(datetime): # <<<<<<<<<<<<<< * cdef readonly: * int64_t value, nanosecond */ struct __pyx_obj_6pandas_5tslib__Timestamp { PyDateTime_DateTime __pyx_base; struct __pyx_vtabstruct_6pandas_5tslib__Timestamp *__pyx_vtab; __pyx_t_5numpy_int64_t value; __pyx_t_5numpy_int64_t nanosecond; PyObject *offset; }; /* "pandas/tslib.pyx":707 * * * cdef class _NaT(_Timestamp): # <<<<<<<<<<<<<< * * def __hash__(_NaT self): */ struct __pyx_obj_6pandas_5tslib__NaT { struct __pyx_obj_6pandas_5tslib__Timestamp __pyx_base; }; /* "pandas/tslib.pyx":3188 * else: * return '' * regex = '|'.join(re_escape(stuff) for stuff in to_convert) # <<<<<<<<<<<<<< * regex = '(?P<%s>%s' % (directive, regex) * return '%s)' % regex */ struct __pyx_obj_6pandas_5tslib___pyx_scope_struct_3_genexpr { PyObject_HEAD struct __pyx_obj_6pandas_5tslib___pyx_scope_struct_2___seqToRE *__pyx_outer_scope; PyObject *__pyx_v_stuff; PyObject *__pyx_t_0; Py_ssize_t __pyx_t_1; PyObject *(*__pyx_t_2)(PyObject *); }; /* "pandas/tslib.pyx":3164 * 'b': self.__seqToRE(self.locale_time.a_month[1:], 'b'), * 'p': self.__seqToRE(self.locale_time.am_pm, 'p'), * 'Z': self.__seqToRE((tz for tz_names in self.locale_time.timezone # <<<<<<<<<<<<<< * for tz in tz_names), * 'Z'), */ struct __pyx_obj_6pandas_5tslib___pyx_scope_struct_1_genexpr { PyObject_HEAD struct __pyx_obj_6pandas_5tslib___pyx_scope_struct____init__ *__pyx_outer_scope; PyObject *__pyx_v_tz; PyObject *__pyx_v_tz_names; PyObject *__pyx_t_0; PyObject *__pyx_t_1; Py_ssize_t __pyx_t_2; PyObject *(*__pyx_t_3)(PyObject *); Py_ssize_t __pyx_t_4; PyObject *(*__pyx_t_5)(PyObject *); }; /* "pandas/tslib.pyx":741 * * # lightweight C object to hold datetime & int64 pair * cdef class _TSObject: # <<<<<<<<<<<<<< * cdef: * pandas_datetimestruct dts # pandas_datetimestruct */ struct __pyx_obj_6pandas_5tslib__TSObject { PyObject_HEAD pandas_datetimestruct dts; __pyx_t_5numpy_int64_t value; PyObject *tzinfo; }; /* "pandas/tslib.pyx":3131 * """Handle conversion from format directives to regexes.""" * * def __init__(self, locale_time=None): # <<<<<<<<<<<<<< * """Create keys/values. * */ struct __pyx_obj_6pandas_5tslib___pyx_scope_struct____init__ { PyObject_HEAD PyObject *__pyx_v_self; }; /* "pandas/tslib.pyx":563 * # (see Timestamp class above). This will serve as a C extension type that * # shadows the python class, where we do any heavy lifting. * cdef class _Timestamp(datetime): # <<<<<<<<<<<<<< * cdef readonly: * int64_t value, nanosecond */ struct __pyx_vtabstruct_6pandas_5tslib__Timestamp { int (*_compare_outside_nanorange)(struct __pyx_obj_6pandas_5tslib__Timestamp *, PyDateTime_DateTime *, int); int (*_assert_tzawareness_compat)(struct __pyx_obj_6pandas_5tslib__Timestamp *, PyObject *); PyDateTime_DateTime *(*to_datetime)(struct __pyx_obj_6pandas_5tslib__Timestamp *, int __pyx_skip_dispatch); PyObject *(*_get_field)(struct __pyx_obj_6pandas_5tslib__Timestamp *, PyObject *, int __pyx_skip_dispatch); }; static struct __pyx_vtabstruct_6pandas_5tslib__Timestamp *__pyx_vtabptr_6pandas_5tslib__Timestamp; /* "pandas/tslib.pyx":707 * * * cdef class _NaT(_Timestamp): # <<<<<<<<<<<<<< * * def __hash__(_NaT self): */ struct __pyx_vtabstruct_6pandas_5tslib__NaT { struct __pyx_vtabstruct_6pandas_5tslib__Timestamp __pyx_base; }; static struct __pyx_vtabstruct_6pandas_5tslib__NaT *__pyx_vtabptr_6pandas_5tslib__NaT; #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); /*proto*/ #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 /* CYTHON_REFNANNY */ #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) #if CYTHON_COMPILING_IN_CPYTHON static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name) { PyTypeObject* tp = Py_TYPE(obj); if (likely(tp->tp_getattro)) return tp->tp_getattro(obj, attr_name); #if PY_MAJOR_VERSION < 3 if (likely(tp->tp_getattr)) return tp->tp_getattr(obj, PyString_AS_STRING(attr_name)); #endif return PyObject_GetAttr(obj, attr_name); } #else #define __Pyx_PyObject_GetAttrStr(o,n) PyObject_GetAttr(o,n) #endif static PyObject *__Pyx_GetBuiltinName(PyObject *name); /*proto*/ static void __Pyx_RaiseDoubleKeywordsError(const char* func_name, PyObject* kw_name); /*proto*/ static int __Pyx_ParseOptionalKeywords(PyObject *kwds, PyObject **argnames[], \ PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args, \ const char* function_name); /*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); /*proto*/ static int __Pyx_ArgTypeTest(PyObject *obj, PyTypeObject *type, int none_allowed, const char *name, int exact); /*proto*/ static CYTHON_INLINE int __Pyx_GetBufferAndValidate(Py_buffer* buf, PyObject* obj, __Pyx_TypeInfo* dtype, int flags, int nd, int cast, __Pyx_BufFmt_StackElem* stack); static CYTHON_INLINE void __Pyx_SafeReleaseBuffer(Py_buffer* info); static CYTHON_INLINE PyObject *__Pyx_GetModuleGlobalName(PyObject *name); /*proto*/ static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type); /*proto*/ static void __Pyx_RaiseBufferIndexError(int axis); /*proto*/ #define __Pyx_BufPtrStrided1d(type, buf, i0, s0) (type)((char*)buf + i0 * s0) static CYTHON_INLINE void __Pyx_ErrRestore(PyObject *type, PyObject *value, PyObject *tb); /*proto*/ static CYTHON_INLINE void __Pyx_ErrFetch(PyObject **type, PyObject **value, PyObject **tb); /*proto*/ static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb); /*proto*/ static CYTHON_INLINE long __Pyx_div_long(long, long); /* proto */ #define __Pyx_GetItemInt(o, i, size, to_py_func, is_list, wraparound, boundscheck) \ (((size) <= sizeof(Py_ssize_t)) ? \ __Pyx_GetItemInt_Fast(o, i, is_list, wraparound, boundscheck) : \ __Pyx_GetItemInt_Generic(o, to_py_func(i))) #define __Pyx_GetItemInt_List(o, i, size, to_py_func, is_list, wraparound, boundscheck) \ (((size) <= sizeof(Py_ssize_t)) ? \ __Pyx_GetItemInt_List_Fast(o, i, wraparound, boundscheck) : \ __Pyx_GetItemInt_Generic(o, to_py_func(i))) static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i, int wraparound, int boundscheck); #define __Pyx_GetItemInt_Tuple(o, i, size, to_py_func, is_list, wraparound, boundscheck) \ (((size) <= sizeof(Py_ssize_t)) ? \ __Pyx_GetItemInt_Tuple_Fast(o, i, wraparound, boundscheck) : \ __Pyx_GetItemInt_Generic(o, to_py_func(i))) static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i, int wraparound, int boundscheck); static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j); static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, int is_list, int wraparound, int boundscheck); #if CYTHON_COMPILING_IN_CPYTHON #define __Pyx_PyObject_DelAttrStr(o,n) __Pyx_PyObject_SetAttrStr(o,n,NULL) static CYTHON_INLINE int __Pyx_PyObject_SetAttrStr(PyObject* obj, PyObject* attr_name, PyObject* value) { PyTypeObject* tp = Py_TYPE(obj); if (likely(tp->tp_setattro)) return tp->tp_setattro(obj, attr_name, value); #if PY_MAJOR_VERSION < 3 if (likely(tp->tp_setattr)) return tp->tp_setattr(obj, PyString_AS_STRING(attr_name), value); #endif return PyObject_SetAttr(obj, attr_name, value); } #else #define __Pyx_PyObject_DelAttrStr(o,n) PyObject_DelAttr(o,n) #define __Pyx_PyObject_SetAttrStr(o,n,v) PyObject_SetAttr(o,n,v) #endif static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name); /*proto*/ static CYTHON_INLINE PyObject *__Pyx_GetAttr(PyObject *, PyObject *); /*proto*/ static CYTHON_INLINE PyObject *__Pyx_GetAttr3(PyObject *, PyObject *, PyObject *); /*proto*/ static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause); /*proto*/ static CYTHON_INLINE PyObject* __Pyx_PyObject_GetSlice( PyObject* obj, Py_ssize_t cstart, Py_ssize_t cstop, PyObject** py_start, PyObject** py_stop, PyObject** py_slice, int has_cstart, int has_cstop, int wraparound); static void __Pyx_WriteUnraisable(const char *name, int clineno, int lineno, const char *filename); /*proto*/ #if CYTHON_COMPILING_IN_CPYTHON static CYTHON_INLINE int __Pyx_PyList_Append(PyObject* list, PyObject* x) { PyListObject* L = (PyListObject*) list; Py_ssize_t len = Py_SIZE(list); if (likely(L->allocated > len) & likely(len > (L->allocated >> 1))) { Py_INCREF(x); PyList_SET_ITEM(list, len, x); Py_SIZE(list) = len+1; return 0; } return PyList_Append(list, x); } #else #define __Pyx_PyList_Append(L,x) PyList_Append(L,x) #endif 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); /* proto */ #ifndef __PYX_FORCE_INIT_THREADS #define __PYX_FORCE_INIT_THREADS 0 #endif static void __Pyx_RaiseBufferFallbackError(void); /*proto*/ static CYTHON_INLINE int __Pyx_PySequence_Contains(PyObject* item, PyObject* seq, int eq) { int result = PySequence_Contains(seq, item); return unlikely(result < 0) ? result : (result == (eq == Py_EQ)); } static double __Pyx__PyObject_AsDouble(PyObject* obj); /* proto */ #if CYTHON_COMPILING_IN_PYPY #define __Pyx_PyObject_AsDouble(obj) \ (likely(PyFloat_CheckExact(obj)) ? PyFloat_AS_DOUBLE(obj) : \ likely(PyInt_CheckExact(obj)) ? \ PyFloat_AsDouble(obj) : __Pyx__PyObject_AsDouble(obj)) #else #define __Pyx_PyObject_AsDouble(obj) \ ((likely(PyFloat_CheckExact(obj))) ? \ PyFloat_AS_DOUBLE(obj) : __Pyx__PyObject_AsDouble(obj)) #endif #define __Pyx_SetItemInt(o, i, v, size, to_py_func, is_list, wraparound, boundscheck) \ (((size) <= sizeof(Py_ssize_t)) ? \ __Pyx_SetItemInt_Fast(o, i, v, is_list, wraparound, boundscheck) : \ __Pyx_SetItemInt_Generic(o, to_py_func(i), v)) static CYTHON_INLINE int __Pyx_SetItemInt_Generic(PyObject *o, PyObject *j, PyObject *v); static CYTHON_INLINE int __Pyx_SetItemInt_Fast(PyObject *o, Py_ssize_t i, PyObject *v, int is_list, int wraparound, int boundscheck); static CYTHON_INLINE void __Pyx_RaiseUnboundLocalError(const char *varname); static CYTHON_INLINE int __Pyx_IterFinish(void); /*proto*/ static PyObject* __Pyx_PyObject_CallMethodTuple(PyObject* obj, PyObject* method_name, PyObject* args) { PyObject *method, *result = NULL; if (unlikely(!args)) return NULL; method = __Pyx_PyObject_GetAttrStr(obj, method_name); if (unlikely(!method)) goto bad; result = PyObject_Call(method, args, NULL); Py_DECREF(method); bad: Py_DECREF(args); return result; } #define __Pyx_PyObject_CallMethod3(obj, name, arg1, arg2, arg3) \ __Pyx_PyObject_CallMethodTuple(obj, name, PyTuple_Pack(3, arg1, arg2, arg3)) #define __Pyx_PyObject_CallMethod2(obj, name, arg1, arg2) \ __Pyx_PyObject_CallMethodTuple(obj, name, PyTuple_Pack(2, arg1, arg2)) #define __Pyx_PyObject_CallMethod1(obj, name, arg1) \ __Pyx_PyObject_CallMethodTuple(obj, name, PyTuple_Pack(1, arg1)) #define __Pyx_PyObject_CallMethod0(obj, name) \ __Pyx_PyObject_CallMethodTuple(obj, name, (Py_INCREF(__pyx_empty_tuple), __pyx_empty_tuple)) static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected); static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected); /*proto*/ static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index); static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void); static void __Pyx_UnpackTupleError(PyObject *, Py_ssize_t index); /*proto*/ static CYTHON_INLINE int __Pyx_unpack_tuple2(PyObject* tuple, PyObject** value1, PyObject** value2, int is_tuple, int has_known_size, int decref_tuple); static CYTHON_INLINE PyObject* __Pyx_dict_iterator(PyObject* dict, int is_dict, PyObject* method_name, Py_ssize_t* p_orig_length, int* p_is_dict); static CYTHON_INLINE int __Pyx_dict_iter_next(PyObject* dict_or_iter, Py_ssize_t orig_length, Py_ssize_t* ppos, PyObject** pkey, PyObject** pvalue, PyObject** pitem, int is_dict); #if PY_MAJOR_VERSION >= 3 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; } #else #define __Pyx_PyDict_GetItem(d, key) PyObject_GetItem(d, key) #endif static CYTHON_INLINE Py_ssize_t __Pyx_div_Py_ssize_t(Py_ssize_t, Py_ssize_t); /* proto */ #define __Pyx_BufPtrStrided2d(type, buf, i0, s0, i1, s1) (type)((char*)buf + i0 * s0 + i1 * s1) 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); /* proto */ #define UNARY_NEG_WOULD_OVERFLOW(x) (((x) < 0) & ((unsigned long)(x) == 0-(unsigned long)(x))) static CYTHON_INLINE long __Pyx_mod_long(long, long); /* proto */ static CYTHON_INLINE PyObject* __Pyx_PyObject_Append(PyObject* L, PyObject* x); /*proto*/ #if CYTHON_COMPILING_IN_CPYTHON static CYTHON_INLINE int __Pyx_ListComp_Append(PyObject* list, PyObject* x) { PyListObject* L = (PyListObject*) list; Py_ssize_t len = Py_SIZE(list); if (likely(L->allocated > len)) { Py_INCREF(x); PyList_SET_ITEM(list, len, x); Py_SIZE(list) = len+1; return 0; } return PyList_Append(list, x); } #else #define __Pyx_ListComp_Append(L,x) PyList_Append(L,x) #endif #if PY_VERSION_HEX < 0x02050000 #ifndef PyAnySet_CheckExact #define PyAnySet_CheckExact(ob) \ ((ob)->ob_type == &PySet_Type || \ (ob)->ob_type == &PyFrozenSet_Type) #define PySet_New(iterable) \ PyObject_CallFunctionObjArgs((PyObject *)&PySet_Type, (iterable), NULL) #define Pyx_PyFrozenSet_New(iterable) \ PyObject_CallFunctionObjArgs((PyObject *)&PyFrozenSet_Type, (iterable), NULL) #define PySet_Size(anyset) \ PyObject_Size((anyset)) #define PySet_Contains(anyset, key) \ PySequence_Contains((anyset), (key)) #define PySet_Pop(set) \ PyObject_CallMethod(set, (char *)"pop", NULL) static CYTHON_INLINE int PySet_Clear(PyObject *set) { PyObject *ret = PyObject_CallMethod(set, (char *)"clear", NULL); if (!ret) return -1; Py_DECREF(ret); return 0; } static CYTHON_INLINE int PySet_Discard(PyObject *set, PyObject *key) { PyObject *ret = PyObject_CallMethod(set, (char *)"discard", (char *)"O", key); if (!ret) return -1; Py_DECREF(ret); return 0; } static CYTHON_INLINE int PySet_Add(PyObject *set, PyObject *key) { PyObject *ret = PyObject_CallMethod(set, (char *)"add", (char *)"O", key); if (!ret) return -1; Py_DECREF(ret); return 0; } #endif /* PyAnySet_CheckExact (<= Py2.4) */ #endif /* < Py2.5 */ static CYTHON_INLINE void __Pyx_RaiseClosureNameError(const char *varname); #include static void __Pyx_call_next_tp_dealloc(PyObject* obj, destructor current_tp_dealloc); static int __Pyx_call_next_tp_traverse(PyObject* obj, visitproc v, void *a, traverseproc current_tp_traverse); static void __Pyx_call_next_tp_clear(PyObject* obj, inquiry current_tp_dealloc); static int __Pyx_SetVtable(PyObject *dict, void *vtable); /*proto*/ #define __Pyx_CyFunction_USED 1 #include #define __Pyx_CYFUNCTION_STATICMETHOD 0x01 #define __Pyx_CYFUNCTION_CLASSMETHOD 0x02 #define __Pyx_CYFUNCTION_CCLASS 0x04 #define __Pyx_CyFunction_GetClosure(f) \ (((__pyx_CyFunctionObject *) (f))->func_closure) #define __Pyx_CyFunction_GetClassObj(f) \ (((__pyx_CyFunctionObject *) (f))->func_classobj) #define __Pyx_CyFunction_Defaults(type, f) \ ((type *)(((__pyx_CyFunctionObject *) (f))->defaults)) #define __Pyx_CyFunction_SetDefaultsGetter(f, g) \ ((__pyx_CyFunctionObject *) (f))->defaults_getter = (g) typedef struct { PyCFunctionObject func; int flags; PyObject *func_dict; PyObject *func_weakreflist; PyObject *func_name; PyObject *func_qualname; PyObject *func_doc; PyObject *func_code; PyObject *func_closure; PyObject *func_classobj; /* No-args super() class cell */ void *defaults; int defaults_pyobjects; PyObject *defaults_tuple; /* Const defaults tuple */ PyObject *defaults_kwdict; /* Const kwonly defaults dict */ PyObject *(*defaults_getter)(PyObject *); PyObject *func_annotations; /* function annotations dict */ } __pyx_CyFunctionObject; static PyTypeObject *__pyx_CyFunctionType = 0; #define __Pyx_CyFunction_NewEx(ml, flags, qualname, self, module, code) \ __Pyx_CyFunction_New(__pyx_CyFunctionType, ml, flags, qualname, self, module, code) static PyObject *__Pyx_CyFunction_New(PyTypeObject *, PyMethodDef *ml, int flags, PyObject* qualname, PyObject *self, PyObject *module, PyObject* code); static CYTHON_INLINE void *__Pyx_CyFunction_InitDefaults(PyObject *m, size_t size, int pyobjects); static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *m, PyObject *tuple); static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *m, PyObject *dict); static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *m, PyObject *dict); static int __Pyx_CyFunction_init(void); static CYTHON_INLINE void __Pyx_ExceptionSave(PyObject **type, PyObject **value, PyObject **tb); /*proto*/ static void __Pyx_ExceptionReset(PyObject *type, PyObject *value, PyObject *tb); /*proto*/ static CYTHON_INLINE PyObject *__Pyx_PyInt_to_py_npy_int64(npy_int64); 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 static Py_ssize_t __Pyx_zeros[] = {0, 0, 0, 0, 0, 0, 0, 0}; static Py_ssize_t __Pyx_minusones[] = {-1, -1, -1, -1, -1, -1, -1, -1}; static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level); /*proto*/ static PyObject *__Pyx_FindPy2Metaclass(PyObject *bases); /*proto*/ static PyObject *__Pyx_CreateClass(PyObject *bases, PyObject *dict, PyObject *name, PyObject *qualname, PyObject *modname); /*proto*/ static CYTHON_INLINE npy_int64 __Pyx_PyInt_from_py_npy_int64(PyObject *); static CYTHON_INLINE PyObject *__Pyx_PyInt_to_py_npy_int32(npy_int32); static int __Pyx_Print(PyObject*, PyObject *, int); /*proto*/ #if CYTHON_COMPILING_IN_PYPY || PY_MAJOR_VERSION >= 3 static PyObject* __pyx_print = 0; static PyObject* __pyx_print_kwargs = 0; #endif static int __Pyx_PrintOne(PyObject* stream, PyObject *o); /*proto*/ static CYTHON_INLINE npy_int32 __Pyx_PyInt_from_py_npy_int32(PyObject *); #include "descrobject.h" static PyObject* __Pyx_Method_ClassMethod(PyObject *method); /*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(_WIN32) && defined(__cplusplus) && CYTHON_CCOMPLEX #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 static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float, float); #if CYTHON_CCOMPLEX #define __Pyx_c_eqf(a, b) ((a)==(b)) #define __Pyx_c_sumf(a, b) ((a)+(b)) #define __Pyx_c_difff(a, b) ((a)-(b)) #define __Pyx_c_prodf(a, b) ((a)*(b)) #define __Pyx_c_quotf(a, b) ((a)/(b)) #define __Pyx_c_negf(a) (-(a)) #ifdef __cplusplus #define __Pyx_c_is_zerof(z) ((z)==(float)0) #define __Pyx_c_conjf(z) (::std::conj(z)) #if 1 #define __Pyx_c_absf(z) (::std::abs(z)) #define __Pyx_c_powf(a, b) (::std::pow(a, b)) #endif #else #define __Pyx_c_is_zerof(z) ((z)==0) #define __Pyx_c_conjf(z) (conjf(z)) #if 1 #define __Pyx_c_absf(z) (cabsf(z)) #define __Pyx_c_powf(a, b) (cpowf(a, b)) #endif #endif #else static CYTHON_INLINE int __Pyx_c_eqf(__pyx_t_float_complex, __pyx_t_float_complex); static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_sumf(__pyx_t_float_complex, __pyx_t_float_complex); static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_difff(__pyx_t_float_complex, __pyx_t_float_complex); static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_prodf(__pyx_t_float_complex, __pyx_t_float_complex); static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_quotf(__pyx_t_float_complex, __pyx_t_float_complex); static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_negf(__pyx_t_float_complex); static CYTHON_INLINE int __Pyx_c_is_zerof(__pyx_t_float_complex); static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_conjf(__pyx_t_float_complex); #if 1 static CYTHON_INLINE float __Pyx_c_absf(__pyx_t_float_complex); static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_powf(__pyx_t_float_complex, __pyx_t_float_complex); #endif #endif static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double, double); #if CYTHON_CCOMPLEX #define __Pyx_c_eq(a, b) ((a)==(b)) #define __Pyx_c_sum(a, b) ((a)+(b)) #define __Pyx_c_diff(a, b) ((a)-(b)) #define __Pyx_c_prod(a, b) ((a)*(b)) #define __Pyx_c_quot(a, b) ((a)/(b)) #define __Pyx_c_neg(a) (-(a)) #ifdef __cplusplus #define __Pyx_c_is_zero(z) ((z)==(double)0) #define __Pyx_c_conj(z) (::std::conj(z)) #if 1 #define __Pyx_c_abs(z) (::std::abs(z)) #define __Pyx_c_pow(a, b) (::std::pow(a, b)) #endif #else #define __Pyx_c_is_zero(z) ((z)==0) #define __Pyx_c_conj(z) (conj(z)) #if 1 #define __Pyx_c_abs(z) (cabs(z)) #define __Pyx_c_pow(a, b) (cpow(a, b)) #endif #endif #else static CYTHON_INLINE int __Pyx_c_eq(__pyx_t_double_complex, __pyx_t_double_complex); static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_sum(__pyx_t_double_complex, __pyx_t_double_complex); static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_diff(__pyx_t_double_complex, __pyx_t_double_complex); static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_prod(__pyx_t_double_complex, __pyx_t_double_complex); static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_quot(__pyx_t_double_complex, __pyx_t_double_complex); static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_neg(__pyx_t_double_complex); static CYTHON_INLINE int __Pyx_c_is_zero(__pyx_t_double_complex); static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_conj(__pyx_t_double_complex); #if 1 static CYTHON_INLINE double __Pyx_c_abs(__pyx_t_double_complex); static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_pow(__pyx_t_double_complex, __pyx_t_double_complex); #endif #endif static CYTHON_INLINE unsigned char __Pyx_PyInt_AsUnsignedChar(PyObject *); static CYTHON_INLINE unsigned short __Pyx_PyInt_AsUnsignedShort(PyObject *); static CYTHON_INLINE unsigned int __Pyx_PyInt_AsUnsignedInt(PyObject *); static CYTHON_INLINE char __Pyx_PyInt_AsChar(PyObject *); static CYTHON_INLINE short __Pyx_PyInt_AsShort(PyObject *); static CYTHON_INLINE int __Pyx_PyInt_AsInt(PyObject *); static CYTHON_INLINE signed char __Pyx_PyInt_AsSignedChar(PyObject *); static CYTHON_INLINE signed short __Pyx_PyInt_AsSignedShort(PyObject *); static CYTHON_INLINE signed int __Pyx_PyInt_AsSignedInt(PyObject *); static CYTHON_INLINE int __Pyx_PyInt_AsLongDouble(PyObject *); static CYTHON_INLINE unsigned long __Pyx_PyInt_AsUnsignedLong(PyObject *); static CYTHON_INLINE unsigned PY_LONG_LONG __Pyx_PyInt_AsUnsignedLongLong(PyObject *); static CYTHON_INLINE long __Pyx_PyInt_AsLong(PyObject *); static CYTHON_INLINE PY_LONG_LONG __Pyx_PyInt_AsLongLong(PyObject *); static CYTHON_INLINE signed long __Pyx_PyInt_AsSignedLong(PyObject *); static CYTHON_INLINE signed PY_LONG_LONG __Pyx_PyInt_AsSignedLongLong(PyObject *); static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb); /*proto*/ #define __Pyx_Generator_USED #include #include typedef PyObject *(*__pyx_generator_body_t)(PyObject *, PyObject *); typedef struct { PyObject_HEAD __pyx_generator_body_t body; PyObject *closure; PyObject *exc_type; PyObject *exc_value; PyObject *exc_traceback; PyObject *gi_weakreflist; PyObject *classobj; PyObject *yieldfrom; int resume_label; char is_running; // using T_BOOL for property below requires char value } __pyx_GeneratorObject; static __pyx_GeneratorObject *__Pyx_Generator_New(__pyx_generator_body_t body, PyObject *closure); static int __pyx_Generator_init(void); static int __Pyx_Generator_clear(PyObject* self); #if 1 || PY_VERSION_HEX < 0x030300B0 static int __Pyx_PyGen_FetchStopIterationValue(PyObject **pvalue); #else #define __Pyx_PyGen_FetchStopIterationValue(pvalue) PyGen_FetchStopIterationValue(pvalue) #endif static int __Pyx_check_binary_version(void); static int __Pyx_ExportFunction(const char *name, void (*f)(void), const char *sig); /*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 static PyObject *__Pyx_ImportModule(const char *name); /*proto*/ static PyTypeObject *__Pyx_ImportType(const char *module_name, const char *class_name, size_t size, int strict); /*proto*/ typedef struct { int code_line; PyCodeObject* code_object; } __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); static void __Pyx_AddTraceback(const char *funcname, int c_line, int py_line, const char *filename); /*proto*/ static int __Pyx_InitStrings(__Pyx_StringTabEntry *t); /*proto*/ /* Module declarations from 'cpython.buffer' */ /* Module declarations from 'cpython.ref' */ /* Module declarations from 'libc.string' */ /* Module declarations from 'libc.stdio' */ /* Module declarations from 'cpython.object' */ /* Module declarations from 'libc.stdlib' */ /* 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*/ /* Module declarations from 'cpython.version' */ /* Module declarations from 'cpython.exc' */ /* Module declarations from 'cpython.module' */ /* Module declarations from 'cpython.mem' */ /* Module declarations from 'cpython.tuple' */ /* Module declarations from 'cpython.list' */ /* Module declarations from 'cpython.sequence' */ /* Module declarations from 'cpython.mapping' */ /* Module declarations from 'cpython.iterator' */ /* Module declarations from '__builtin__' */ /* Module declarations from 'cpython.type' */ static PyTypeObject *__pyx_ptype_7cpython_4type_type = 0; /* Module declarations from 'cpython.number' */ /* Module declarations from 'cpython.int' */ /* Module declarations from '__builtin__' */ /* Module declarations from 'cpython.bool' */ static PyTypeObject *__pyx_ptype_7cpython_4bool_bool = 0; /* Module declarations from 'cpython.long' */ /* Module declarations from 'cpython.float' */ /* Module declarations from '__builtin__' */ /* Module declarations from 'cpython.complex' */ static PyTypeObject *__pyx_ptype_7cpython_7complex_complex = 0; /* Module declarations from 'cpython.string' */ /* Module declarations from 'cpython.unicode' */ /* Module declarations from 'cpython.dict' */ /* Module declarations from 'cpython.instance' */ /* Module declarations from 'cpython.function' */ /* Module declarations from 'cpython.method' */ /* Module declarations from 'cpython.weakref' */ /* Module declarations from 'cpython.getargs' */ /* Module declarations from 'cpython.pythread' */ /* Module declarations from 'cpython.pystate' */ /* Module declarations from 'cpython.cobject' */ /* Module declarations from 'cpython.oldbuffer' */ /* Module declarations from 'cpython.set' */ /* Module declarations from 'cpython.bytes' */ /* Module declarations from 'cpython.pycapsule' */ /* Module declarations from 'cpython' */ /* Module declarations from 'datetime' */ /* Module declarations from 'datetime' */ static PyTypeObject *__pyx_ptype_8datetime_date = 0; static PyTypeObject *__pyx_ptype_8datetime_datetime = 0; static PyTypeObject *__pyx_ptype_8datetime_timedelta = 0; static CYTHON_INLINE PyObject *__pyx_f_8datetime__string_to_dts(PyObject *, pandas_datetimestruct *); /*proto*/ static CYTHON_INLINE int __pyx_f_8datetime__cstring_to_dts(char *, int, pandas_datetimestruct *); /*proto*/ static CYTHON_INLINE PyObject *__pyx_f_8datetime__dts_to_pydatetime(pandas_datetimestruct *); /*proto*/ static CYTHON_INLINE __pyx_t_5numpy_int64_t __pyx_f_8datetime__pydatetime_to_dts(PyObject *, pandas_datetimestruct *); /*proto*/ static CYTHON_INLINE __pyx_t_5numpy_int64_t __pyx_f_8datetime__date_to_datetime64(PyObject *, pandas_datetimestruct *); /*proto*/ /* Module declarations from 'util' */ static CYTHON_INLINE PyObject *__pyx_f_4util_is_array(PyObject *); /*proto*/ /* Module declarations from 'khash' */ /* Module declarations from 'cython' */ /* Module declarations from 'pandas.tslib' */ static PyTypeObject *__pyx_ptype_6pandas_5tslib___pyx_scope_struct_2___seqToRE = 0; static PyTypeObject *__pyx_ptype_6pandas_5tslib__Timestamp = 0; static PyTypeObject *__pyx_ptype_6pandas_5tslib__NaT = 0; static PyTypeObject *__pyx_ptype_6pandas_5tslib___pyx_scope_struct_3_genexpr = 0; static PyTypeObject *__pyx_ptype_6pandas_5tslib___pyx_scope_struct_1_genexpr = 0; static PyTypeObject *__pyx_ptype_6pandas_5tslib__TSObject = 0; static PyTypeObject *__pyx_ptype_6pandas_5tslib___pyx_scope_struct____init__ = 0; static int __pyx_v_6pandas_5tslib_PY2; static __pyx_t_5numpy_int64_t __pyx_v_6pandas_5tslib_NPY_NAT; static __pyx_t_5numpy_int64_t __pyx_v_6pandas_5tslib__NS_LOWER_BOUND; static __pyx_t_5numpy_int64_t __pyx_v_6pandas_5tslib__NS_UPPER_BOUND; static pandas_datetimestruct __pyx_v_6pandas_5tslib__NS_MIN_DTS; static pandas_datetimestruct __pyx_v_6pandas_5tslib__NS_MAX_DTS; static int __pyx_v_6pandas_5tslib__reverse_ops[6]; static PyObject *__pyx_v_6pandas_5tslib__NDIM_STRING = 0; static PyTypeObject *__pyx_v_6pandas_5tslib_ts_type; static int __pyx_v_6pandas_5tslib__nat_scalar_rules[6]; static __pyx_t_5numpy_int64_t __pyx_v_6pandas_5tslib_DAY_NS; static char __pyx_v_6pandas_5tslib_START; static char __pyx_v_6pandas_5tslib_END; static PyObject *__pyx_v_6pandas_5tslib_extra_fmts = 0; static PyObject *__pyx_v_6pandas_5tslib_str_extra_fmts = 0; static PyObject *__pyx_f_6pandas_5tslib_convert_to_tsobject(PyObject *, PyObject *, PyObject *); /*proto*/ static PyObject *__pyx_f_6pandas_5tslib_convert_to_timedelta64(PyObject *, PyObject *, PyObject *); /*proto*/ static CYTHON_INLINE int __pyx_f_6pandas_5tslib__checknull_with_nat(PyObject *); /*proto*/ static CYTHON_INLINE int __pyx_f_6pandas_5tslib__cmp_nat_dt(struct __pyx_obj_6pandas_5tslib__NaT *, struct __pyx_obj_6pandas_5tslib__Timestamp *, int); /*proto*/ static PyObject *__pyx_f_6pandas_5tslib_get_value_box(PyArrayObject *, PyObject *, int __pyx_skip_dispatch); /*proto*/ static CYTHON_INLINE int __pyx_f_6pandas_5tslib__cmp_scalar(__pyx_t_5numpy_int64_t, __pyx_t_5numpy_int64_t, int); /*proto*/ static CYTHON_INLINE int __pyx_f_6pandas_5tslib_is_timestamp(PyObject *); /*proto*/ static PyObject *__pyx_f_6pandas_5tslib__get_utcoffset(PyObject *, PyObject *, int __pyx_skip_dispatch); /*proto*/ static CYTHON_INLINE void __pyx_f_6pandas_5tslib__localize_tso(struct __pyx_obj_6pandas_5tslib__TSObject *, PyObject *); /*proto*/ static CYTHON_INLINE int __pyx_f_6pandas_5tslib__is_utc(PyObject *); /*proto*/ static CYTHON_INLINE PyObject *__pyx_f_6pandas_5tslib__get_zone(PyObject *); /*proto*/ static CYTHON_INLINE PyObject *__pyx_f_6pandas_5tslib__check_dts_bounds(pandas_datetimestruct *); /*proto*/ static CYTHON_INLINE PyObject *__pyx_f_6pandas_5tslib__get_datetime64_nanos(PyObject *); /*proto*/ static CYTHON_INLINE __pyx_t_5numpy_int64_t __pyx_f_6pandas_5tslib_cast_from_unit(PyObject *, PyObject *, int __pyx_skip_dispatch); /*proto*/ static double __pyx_f_6pandas_5tslib_total_seconds(PyObject *); /*proto*/ static PyArrayObject *__pyx_f_6pandas_5tslib__unbox_utcoffsets(PyObject *, int __pyx_skip_dispatch); /*proto*/ static PyObject *__pyx_f_6pandas_5tslib__ensure_int64(PyObject *); /*proto*/ static CYTHON_INLINE PyObject *__pyx_f_6pandas_5tslib_bisect_right_i8(__pyx_t_5numpy_int64_t *, __pyx_t_5numpy_int64_t, Py_ssize_t); /*proto*/ static PyObject *__pyx_f_6pandas_5tslib__normalize_local(PyArrayObject *, PyObject *); /*proto*/ static CYTHON_INLINE __pyx_t_5numpy_int64_t __pyx_f_6pandas_5tslib__normalized_stamp(pandas_datetimestruct *); /*proto*/ static CYTHON_INLINE __pyx_t_5numpy_int64_t __pyx_f_6pandas_5tslib_ts_dayofweek(struct __pyx_obj_6pandas_5tslib__TSObject *); /*proto*/ static PyObject *__pyx_f_6pandas_5tslib_normalize_date(PyObject *, int __pyx_skip_dispatch); /*proto*/ static PyArrayObject *__pyx_f_6pandas_5tslib_localize_dt64arr_to_period(PyArrayObject *, int, PyObject *); /*proto*/ static __pyx_t_5numpy_int64_t __pyx_f_6pandas_5tslib_period_asfreq(__pyx_t_5numpy_int64_t, int, int, int, int __pyx_skip_dispatch); /*proto*/ static __pyx_t_5numpy_int64_t __pyx_f_6pandas_5tslib_period_ordinal_to_dt64(__pyx_t_5numpy_int64_t, int, int __pyx_skip_dispatch); /*proto*/ static PyObject *__pyx_f_6pandas_5tslib__period_strftime(__pyx_t_5numpy_int64_t, int, PyObject *); /*proto*/ static __pyx_t_6pandas_5tslib_accessor __pyx_f_6pandas_5tslib__get_accessor_func(int); /*proto*/ static PyObject *__pyx_f_6pandas_5tslib_resolution(PyArrayObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_6pandas_5tslib_resolution *__pyx_optional_args); /*proto*/ static CYTHON_INLINE int __pyx_f_6pandas_5tslib__reso_stamp(pandas_datetimestruct *); /*proto*/ static PyObject *__pyx_f_6pandas_5tslib__reso_local(PyArrayObject *, PyObject *); /*proto*/ 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_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 }; #define __Pyx_MODULE_NAME "pandas.tslib" int __pyx_module_is_main_pandas__tslib = 0; /* Implementation of 'pandas.tslib' */ static PyObject *__pyx_builtin_NameError; static PyObject *__pyx_builtin_property; static PyObject *__pyx_builtin_ValueError; static PyObject *__pyx_builtin_object; static PyObject *__pyx_builtin_range; static PyObject *__pyx_builtin_AttributeError; static PyObject *__pyx_builtin_Exception; static PyObject *__pyx_builtin_super; static PyObject *__pyx_builtin_IndexError; static PyObject *__pyx_builtin_TypeError; static PyObject *__pyx_builtin_round; static PyObject *__pyx_builtin_KeyError; static PyObject *__pyx_builtin_enumerate; static PyObject *__pyx_builtin_sorted; static PyObject *__pyx_builtin_RuntimeError; static PyObject *__pyx_lambda_funcdef_6pandas_5tslib_lambda1(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_5tslib_ints_to_pydatetime(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_arr, PyObject *__pyx_v_tz); /* proto */ static PyObject *__pyx_pf_6pandas_5tslib_2_is_tzlocal(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_tz); /* proto */ static PyObject *__pyx_pf_6pandas_5tslib_4_is_fixed_offset(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_tz); /* proto */ static PyObject *__pyx_pf_6pandas_5tslib_9Timestamp_fromordinal(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_ordinal, PyObject *__pyx_v_offset, PyObject *__pyx_v_tz); /* proto */ static PyObject *__pyx_pf_6pandas_5tslib_9Timestamp_2now(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_tz); /* proto */ static PyObject *__pyx_pf_6pandas_5tslib_9Timestamp_4today(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls); /* proto */ static PyObject *__pyx_pf_6pandas_5tslib_9Timestamp_6utcnow(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls); /* proto */ static PyObject *__pyx_pf_6pandas_5tslib_9Timestamp_8__new__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_ts_input, PyObject *__pyx_v_offset, PyObject *__pyx_v_tz, PyObject *__pyx_v_unit); /* proto */ static PyObject *__pyx_pf_6pandas_5tslib_9Timestamp_10__repr__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_5tslib_9Timestamp_12_date_repr(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_5tslib_9Timestamp_14_time_repr(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_5tslib_9Timestamp_16_repr_base(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_5tslib_9Timestamp_18tz(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_5tslib_9Timestamp_20freq(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_5tslib_9Timestamp_22__setstate__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_state); /* proto */ static PyObject *__pyx_pf_6pandas_5tslib_9Timestamp_24__reduce__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_5tslib_9Timestamp_26to_period(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_freq); /* proto */ static PyObject *__pyx_pf_6pandas_5tslib_9Timestamp_28dayofweek(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_5tslib_9Timestamp_30dayofyear(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_5tslib_9Timestamp_32week(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_5tslib_9Timestamp_34quarter(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_5tslib_9Timestamp_36freqstr(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_5tslib_9Timestamp_38asm8(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_5tslib_9Timestamp_40tz_localize(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_tz); /* proto */ static PyObject *__pyx_pf_6pandas_5tslib_9Timestamp_42tz_convert(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_tz); /* proto */ static PyObject *__pyx_pf_6pandas_5tslib_9Timestamp_44replace(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_kwds); /* proto */ static PyObject *__pyx_pf_6pandas_5tslib_9Timestamp_52__defaults__(CYTHON_UNUSED PyObject *__pyx_self); /* proto */ static PyObject *__pyx_pf_6pandas_5tslib_9Timestamp_46to_pydatetime(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_warn); /* proto */ static PyObject *__pyx_pf_6pandas_5tslib_9Timestamp_48isoformat(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_sep); /* proto */ static PyObject *__pyx_pf_6pandas_5tslib_9Timestamp_50_has_time_component(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_5tslib_7NaTType___new__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls); /* proto */ static PyObject *__pyx_pf_6pandas_5tslib_7NaTType_2__repr__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_5tslib_7NaTType_4__str__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_5tslib_7NaTType_6__hash__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_5tslib_7NaTType_8weekday(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_5tslib_7NaTType_10toordinal(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_5tslib_6is_timestamp_array(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values); /* proto */ static PyObject *__pyx_pf_6pandas_5tslib_8get_value_box(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_arr, PyObject *__pyx_v_loc); /* proto */ static PyObject *__pyx_pf_6pandas_5tslib_10unique_deltas(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_arr); /* proto */ static PyObject *__pyx_pf_6pandas_5tslib_12apply_offset(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, CYTHON_UNUSED PyObject *__pyx_v_offset); /* proto */ static Py_hash_t __pyx_pf_6pandas_5tslib_10_Timestamp___hash__(struct __pyx_obj_6pandas_5tslib__Timestamp *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_5tslib_10_Timestamp_2__richcmp__(struct __pyx_obj_6pandas_5tslib__Timestamp *__pyx_v_self, PyObject *__pyx_v_other, int __pyx_v_op); /* proto */ static PyObject *__pyx_pf_6pandas_5tslib_10_Timestamp_4to_datetime(struct __pyx_obj_6pandas_5tslib__Timestamp *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_5tslib_10_Timestamp_6__add__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /* proto */ static PyObject *__pyx_pf_6pandas_5tslib_10_Timestamp_8__sub__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /* proto */ static PyObject *__pyx_pf_6pandas_5tslib_10_Timestamp_10_get_field(struct __pyx_obj_6pandas_5tslib__Timestamp *__pyx_v_self, PyObject *__pyx_v_field); /* proto */ static PyObject *__pyx_pf_6pandas_5tslib_10_Timestamp_5value___get__(struct __pyx_obj_6pandas_5tslib__Timestamp *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_5tslib_10_Timestamp_10nanosecond___get__(struct __pyx_obj_6pandas_5tslib__Timestamp *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_5tslib_10_Timestamp_6offset___get__(struct __pyx_obj_6pandas_5tslib__Timestamp *__pyx_v_self); /* proto */ static Py_hash_t __pyx_pf_6pandas_5tslib_4_NaT___hash__(struct __pyx_obj_6pandas_5tslib__NaT *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_5tslib_4_NaT_2__richcmp__(struct __pyx_obj_6pandas_5tslib__NaT *__pyx_v_self, PyObject *__pyx_v_other, int __pyx_v_op); /* proto */ static PyObject *__pyx_pf_6pandas_5tslib_14_delta_to_nanoseconds(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_delta); /* proto */ static PyObject *__pyx_pf_6pandas_5tslib_9_TSObject_5value___get__(struct __pyx_obj_6pandas_5tslib__TSObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_5tslib_16_get_utcoffset(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_tzinfo, PyObject *__pyx_v_obj); /* proto */ static PyObject *__pyx_pf_6pandas_5tslib_18get_timezone(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_tz); /* proto */ static PyObject *__pyx_pf_6pandas_5tslib_20datetime_to_datetime64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values); /* proto */ static PyObject *__pyx_pf_6pandas_5tslib_22_does_string_look_like_datetime(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_date_string); /* proto */ static PyObject *__pyx_pf_6pandas_5tslib_24parse_datetime_string(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_date_string, PyObject *__pyx_v_kwargs); /* proto */ static PyObject *__pyx_pf_6pandas_5tslib_26array_to_datetime(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyObject *__pyx_v_raise_, PyObject *__pyx_v_dayfirst, CYTHON_UNUSED PyObject *__pyx_v_format, PyObject *__pyx_v_utc, PyObject *__pyx_v_coerce, PyObject *__pyx_v_unit); /* proto */ static PyObject *__pyx_pf_6pandas_5tslib_28array_to_timedelta64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyObject *__pyx_v_coerce); /* proto */ static PyObject *__pyx_pf_6pandas_5tslib_30convert_to_timedelta(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_ts, PyObject *__pyx_v_unit, PyObject *__pyx_v_coerce); /* proto */ static PyObject *__pyx_pf_6pandas_5tslib_32repr_timedelta64(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_value, PyObject *__pyx_v_format); /* proto */ static PyObject *__pyx_pf_6pandas_5tslib_34array_strptime(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyObject *__pyx_v_fmt, PyObject *__pyx_v_coerce); /* proto */ static PyObject *__pyx_pf_6pandas_5tslib_36cast_from_unit(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_ts, PyObject *__pyx_v_unit); /* proto */ static PyObject *__pyx_pf_6pandas_5tslib_38cast_to_nanoseconds(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_arr); /* proto */ static PyObject *__pyx_pf_6pandas_5tslib_40pydt_to_i8(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_pydt); /* proto */ static PyObject *__pyx_pf_6pandas_5tslib_42i8_to_pydt(CYTHON_UNUSED PyObject *__pyx_self, __pyx_t_5numpy_int64_t __pyx_v_i8, CYTHON_UNUSED PyObject *__pyx_v_tzinfo); /* proto */ static PyObject *__pyx_pf_6pandas_5tslib_44tz_convert(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_vals, PyObject *__pyx_v_tz1, PyObject *__pyx_v_tz2); /* proto */ static PyObject *__pyx_pf_6pandas_5tslib_46tz_convert_single(CYTHON_UNUSED PyObject *__pyx_self, __pyx_t_5numpy_int64_t __pyx_v_val, PyObject *__pyx_v_tz1, PyObject *__pyx_v_tz2); /* proto */ static PyObject *__pyx_pf_6pandas_5tslib_48_get_transitions(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_tz); /* proto */ static PyObject *__pyx_pf_6pandas_5tslib_50_get_deltas(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_tz); /* proto */ static PyObject *__pyx_pf_6pandas_5tslib_52tot_seconds(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_td); /* proto */ static PyObject *__pyx_pf_6pandas_5tslib_54_unbox_utcoffsets(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_transinfo); /* proto */ static PyObject *__pyx_pf_6pandas_5tslib_56tz_localize_to_utc(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_vals, PyObject *__pyx_v_tz, int __pyx_v_infer_dst); /* proto */ static PyObject *__pyx_pf_6pandas_5tslib_58build_field_sarray(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_dtindex); /* proto */ static PyObject *__pyx_pf_6pandas_5tslib_60get_time_micros(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_dtindex); /* proto */ static PyObject *__pyx_pf_6pandas_5tslib_62get_date_field(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_dtindex, PyObject *__pyx_v_field); /* proto */ static PyObject *__pyx_pf_6pandas_5tslib_64date_normalize(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_stamps, PyObject *__pyx_v_tz); /* proto */ static PyObject *__pyx_pf_6pandas_5tslib_66dates_normalized(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_stamps, PyObject *__pyx_v_tz); /* proto */ static PyObject *__pyx_pf_6pandas_5tslib_68isleapyear(CYTHON_UNUSED PyObject *__pyx_self, __pyx_t_5numpy_int64_t __pyx_v_year); /* proto */ static PyObject *__pyx_pf_6pandas_5tslib_70monthrange(CYTHON_UNUSED PyObject *__pyx_self, __pyx_t_5numpy_int64_t __pyx_v_year, __pyx_t_5numpy_int64_t __pyx_v_month); /* proto */ static PyObject *__pyx_pf_6pandas_5tslib_72normalize_date(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_dt); /* proto */ static PyObject *__pyx_pf_6pandas_5tslib_74dt64arr_to_periodarr(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_dtarr, int __pyx_v_freq, PyObject *__pyx_v_tz); /* proto */ static PyObject *__pyx_pf_6pandas_5tslib_76periodarr_to_dt64arr(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_periodarr, int __pyx_v_freq); /* proto */ static PyObject *__pyx_pf_6pandas_5tslib_78period_asfreq(CYTHON_UNUSED PyObject *__pyx_self, __pyx_t_5numpy_int64_t __pyx_v_period_ordinal, int __pyx_v_freq1, int __pyx_v_freq2, int __pyx_v_end); /* proto */ static PyObject *__pyx_pf_6pandas_5tslib_80period_asfreq_arr(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_arr, int __pyx_v_freq1, int __pyx_v_freq2, int __pyx_v_end); /* proto */ static PyObject *__pyx_pf_6pandas_5tslib_82period_ordinal(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_y, int __pyx_v_m, int __pyx_v_d, int __pyx_v_h, int __pyx_v_min, int __pyx_v_s, int __pyx_v_us, int __pyx_v_ps, int __pyx_v_freq); /* proto */ static PyObject *__pyx_pf_6pandas_5tslib_84period_ordinal_to_dt64(CYTHON_UNUSED PyObject *__pyx_self, __pyx_t_5numpy_int64_t __pyx_v_ordinal, int __pyx_v_freq); /* proto */ static PyObject *__pyx_pf_6pandas_5tslib_86period_format(CYTHON_UNUSED PyObject *__pyx_self, __pyx_t_5numpy_int64_t __pyx_v_value, int __pyx_v_freq, PyObject *__pyx_v_fmt); /* proto */ static PyObject *__pyx_pf_6pandas_5tslib_88get_period_field(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_code, __pyx_t_5numpy_int64_t __pyx_v_value, int __pyx_v_freq); /* proto */ static PyObject *__pyx_pf_6pandas_5tslib_90get_period_field_arr(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_code, PyArrayObject *__pyx_v_arr, int __pyx_v_freq); /* proto */ static PyObject *__pyx_pf_6pandas_5tslib_92extract_ordinals(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyObject *__pyx_v_freq); /* proto */ static PyObject *__pyx_pf_6pandas_5tslib_94resolution(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_stamps, PyObject *__pyx_v_tz); /* proto */ static PyObject *__pyx_pf_6pandas_5tslib_96_getlang(CYTHON_UNUSED PyObject *__pyx_self); /* proto */ static PyObject *__pyx_pf_6pandas_5tslib_10LocaleTime___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_5tslib_10LocaleTime_2__pad(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, PyObject *__pyx_v_seq, PyObject *__pyx_v_front); /* proto */ static PyObject *__pyx_pf_6pandas_5tslib_10LocaleTime_4__calc_weekday(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_5tslib_10LocaleTime_6__calc_month(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_5tslib_10LocaleTime_8__calc_am_pm(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_5tslib_10LocaleTime_10__calc_date_time(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_5tslib_10LocaleTime_12__calc_timezone(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_5tslib_6TimeRE_8__init___genexpr(PyObject *__pyx_self); /* proto */ static PyObject *__pyx_pf_6pandas_5tslib_6TimeRE___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_locale_time); /* proto */ static PyObject *__pyx_pf_6pandas_5tslib_6TimeRE_9__seqToRE_genexpr(PyObject *__pyx_self); /* proto */ static PyObject *__pyx_pf_6pandas_5tslib_6TimeRE_2__seqToRE(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, PyObject *__pyx_v_to_convert, PyObject *__pyx_v_directive); /* proto */ static PyObject *__pyx_pf_6pandas_5tslib_6TimeRE_4pattern(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_format); /* proto */ static PyObject *__pyx_pf_6pandas_5tslib_6TimeRE_6compile(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_format); /* proto */ static PyObject *__pyx_pf_6pandas_5tslib_98_calc_julian_from_U_or_W(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_year, PyObject *__pyx_v_week_of_year, PyObject *__pyx_v_day_of_week, PyObject *__pyx_v_week_starts_Mon); /* 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_5tslib___pyx_scope_struct_2___seqToRE(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_6pandas_5tslib__Timestamp(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_6pandas_5tslib__NaT(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_6pandas_5tslib___pyx_scope_struct_3_genexpr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_6pandas_5tslib___pyx_scope_struct_1_genexpr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_6pandas_5tslib__TSObject(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_6pandas_5tslib___pyx_scope_struct____init__(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static char __pyx_k_2[] = "%z"; static char __pyx_k_5[] = " %%Z"; static char __pyx_k_7[] = "'%s'"; static char __pyx_k_8[] = "Timestamp('%s', tz=%s)"; static char __pyx_k_9[] = "%d-%.2d-%.2d"; static char __pyx_k_10[] = "%.2d:%.2d:%.2d"; static char __pyx_k_11[] = ".%.9d"; static char __pyx_k_12[] = ".%.6d"; static char __pyx_k_13[] = "%s %s"; static char __pyx_k_14[] = "pandas.tseries.period"; static char __pyx_k_18[] = "M8[ns]"; static char __pyx_k_20[] = "Cannot localize tz-aware Timestamp, use tz_convert for conversions"; static char __pyx_k_22[] = "Cannot convert tz-naive Timestamp, use tz_localize to localize"; static char __pyx_k_24[] = "Warning: discarding nonzero nanoseconds"; static char __pyx_k_27[] = ""; static char __pyx_k_28[] = "%.3d"; static char __pyx_k_29[] = " %%Z, tz=%s"; static char __pyx_k_30[] = ", tz=%s"; static char __pyx_k_31[] = "index out of bounds"; static char __pyx_k_34[] = "Cannot compare type %r with type %r"; static char __pyx_k_35[] = "Cannot compare tz-naive and tz-aware timestamps"; static char __pyx_k_38[] = "timedelta64[ns]"; static char __pyx_k_40[] = "Cannot add integral value to Timestamp without offset."; static char __pyx_k_42[] = "_delta_to_nanoseconds"; static char __pyx_k_44[] = "Could not construct Timestamp from argument %s"; static char __pyx_k_45[] = "%d-%.2d-%.2d %.2d:%.2d:%.2d"; static char __pyx_k_46[] = "Out of bounds nanosecond timestamp: %s"; static char __pyx_k_48[] = "Array must be all same time zone"; static char __pyx_k_50[] = "Cannot mix tz-aware with tz-naive values"; static char __pyx_k_52[] = "Unrecognized value type: %s"; static char __pyx_k_54[] = "_not_datelike_strings"; static char __pyx_k_55[] = "_does_string_look_like_datetime"; static char __pyx_k_56[] = "Given date string not likely a datetime."; static char __pyx_k_62[] = "Tz-aware datetime.datetime cannot be converted to datetime64 unless utc=True"; static char __pyx_k_64[] = "parse_datetime_string"; static char __pyx_k_65[] = "mixed datetimes and integers in passed array"; static char __pyx_k_68[] = "m8[ns]"; static char __pyx_k_72[] = "m8[{0}]"; static char __pyx_k_74[] = "_np_version_under1p7"; static char __pyx_k_75[] = "Invalid type for timedelta scalar: %s"; static char __pyx_k_78[] = "%02d"; static char __pyx_k_79[] = "%02d.%06d"; static char __pyx_k_80[] = "-"; static char __pyx_k_81[] = "%s%d days, %02d:%02d:%s"; static char __pyx_k_82[] = "%s%d days"; static char __pyx_k_83[] = "%s%02d:%02d:%s"; static char __pyx_k_85[] = "\\"; static char __pyx_k_86[] = "%"; static char __pyx_k_87[] = "'%s' is a bad directive in format '%s'"; static char __pyx_k_88[] = "stray %% in format '%s'"; static char __pyx_k_91[] = "time data %r does not match format %r"; static char __pyx_k_92[] = "unconverted data remains: %s"; static char __pyx_k_94[] = "_calc_julian_from_U_or_W"; static char __pyx_k_95[] = "NumPy 1.6.1 business freq not supported"; static char __pyx_k_98[] = "First time before start of DST info"; static char __pyx_k__0[] = "0"; static char __pyx_k__2[] = "2"; static char __pyx_k__3[] = "3"; static char __pyx_k__A[] = "A"; static char __pyx_k__B[] = "B"; static char __pyx_k__D[] = "D"; static char __pyx_k__H[] = "H"; static char __pyx_k__I[] = "I"; static char __pyx_k__L[] = "L"; static char __pyx_k__M[] = "M"; static char __pyx_k__O[] = "O"; static char __pyx_k__P[] = "P"; static char __pyx_k__Q[] = "Q"; static char __pyx_k__S[] = "S"; static char __pyx_k__T[] = "T"; static char __pyx_k__U[] = "U"; static char __pyx_k__W[] = "W"; static char __pyx_k__X[] = "X"; static char __pyx_k__Y[] = "Y"; static char __pyx_k__Z[] = "Z"; static char __pyx_k__a[] = "a"; static char __pyx_k__b[] = "b"; static char __pyx_k__c[] = "c"; static char __pyx_k__d[] = "d"; static char __pyx_k__f[] = "f"; static char __pyx_k__g[] = "g"; static char __pyx_k__h[] = "h"; static char __pyx_k__i[] = "i"; static char __pyx_k__j[] = "j"; static char __pyx_k__k[] = "k"; static char __pyx_k__l[] = "l"; static char __pyx_k__m[] = "m"; static char __pyx_k__n[] = "n"; static char __pyx_k__p[] = "p"; static char __pyx_k__q[] = "q"; static char __pyx_k__s[] = "s"; static char __pyx_k__t[] = "t"; static char __pyx_k__u[] = "u"; static char __pyx_k__v[] = "v"; static char __pyx_k__w[] = "w"; static char __pyx_k__x[] = "x"; static char __pyx_k__y[] = "y"; static char __pyx_k_103[] = "_utc_transition_times"; static char __pyx_k_105[] = "Could not find pytz module"; static char __pyx_k_107[] = "Cannot infer dst time from %s asthere are no repeated times"; static char __pyx_k_108[] = "There are %i dst switches when there should only be 1."; static char __pyx_k_109[] = "Cannot infer dst time from %r, try using the 'infer_dst' argument"; static char __pyx_k_110[] = "NonExistentTimeError"; static char __pyx_k_118[] = "Field %s not supported"; static char __pyx_k_119[] = "bad month number 0; must be 1-12"; static char __pyx_k_121[] = "Unrecognized type: %s"; static char __pyx_k_123[] = "Frequency conversion failed"; static char __pyx_k_125[] = "Unable to convert to desired frequency."; static char __pyx_k_127[] = "%Y"; static char __pyx_k_128[] = "%FQ%q"; static char __pyx_k_129[] = "%Y-%m"; static char __pyx_k_130[] = "%s/%s"; static char __pyx_k_131[] = "%Y-%m-%d"; static char __pyx_k_132[] = "%Y-%m-%d %H:00"; static char __pyx_k_133[] = "%Y-%m-%d %H:%M"; static char __pyx_k_134[] = "%Y-%m-%d %H:%M:%S"; static char __pyx_k_135[] = "%Y-%m-%d %H:%M:%S.%l"; static char __pyx_k_136[] = "%Y-%m-%d %H:%M:%S.%u"; static char __pyx_k_137[] = "%Y-%m-%d %H:%M:%S.%n"; static char __pyx_k_138[] = "Unknown freq: %d"; static char __pyx_k_139[] = "utf-8"; static char __pyx_k_141[] = "Unable to get quarter and year"; static char __pyx_k_143[] = "%d"; static char __pyx_k_144[] = "%.2d"; static char __pyx_k_145[] = "%03d"; static char __pyx_k_146[] = "%06d"; static char __pyx_k_147[] = "%09d"; static char __pyx_k_149[] = "Unrecognized period code: %d"; static char __pyx_k_150[] = "%s is wrong freq"; static char __pyx_k_151[] = "_LocaleTime__calc_weekday"; static char __pyx_k_152[] = "_LocaleTime__calc_month"; static char __pyx_k_153[] = "_LocaleTime__calc_am_pm"; static char __pyx_k_154[] = "_LocaleTime__calc_timezone"; static char __pyx_k_155[] = "_LocaleTime__calc_date_time"; static char __pyx_k_156[] = "locale changed during initialization"; static char __pyx_k_160[] = "%p"; static char __pyx_k_163[] = "%c"; static char __pyx_k_164[] = "%x"; static char __pyx_k_165[] = "%X"; static char __pyx_k_166[] = "%%"; static char __pyx_k_168[] = "%A"; static char __pyx_k_169[] = "%B"; static char __pyx_k_170[] = "%a"; static char __pyx_k_171[] = "%b"; static char __pyx_k_173[] = "%y"; static char __pyx_k_175[] = "%H"; static char __pyx_k_177[] = "%M"; static char __pyx_k_179[] = "%S"; static char __pyx_k_181[] = "%j"; static char __pyx_k_184[] = "%m"; static char __pyx_k_187[] = "%w"; static char __pyx_k_189[] = "%I"; static char __pyx_k_191[] = "%Z"; static char __pyx_k_198[] = "%W"; static char __pyx_k_199[] = "%U"; static char __pyx_k_200[] = "(?P3[0-1]|[1-2]\\d|0[1-9]|[1-9]| [1-9])"; static char __pyx_k_201[] = "(?P[0-9]{1,6})"; static char __pyx_k_202[] = "(?P2[0-3]|[0-1]\\d|\\d)"; static char __pyx_k_203[] = "(?P1[0-2]|0[1-9]|[1-9])"; static char __pyx_k_204[] = "(?P36[0-6]|3[0-5]\\d|[1-2]\\d\\d|0[1-9]\\d|00[1-9]|[1-9]\\d|0[1-9]|[1-9])"; static char __pyx_k_205[] = "(?P1[0-2]|0[1-9]|[1-9])"; static char __pyx_k_206[] = "(?P[0-5]\\d|\\d)"; static char __pyx_k_207[] = "(?P6[0-1]|[0-5]\\d|\\d)"; static char __pyx_k_208[] = "(?P5[0-3]|[0-4]\\d|\\d)"; static char __pyx_k_209[] = "(?P[0-6])"; static char __pyx_k_210[] = "(?P\\d\\d)"; static char __pyx_k_211[] = "(?P\\d\\d\\d\\d)"; static char __pyx_k_216[] = "|"; static char __pyx_k_217[] = "(?P<%s>%s"; static char __pyx_k_218[] = "%s)"; static char __pyx_k_219[] = "([\\\\.^$*+?\\(\\){}\\[\\]|])"; static char __pyx_k_221[] = "\\\\\\1"; static char __pyx_k_222[] = "\\s+"; static char __pyx_k_225[] = "%s%s%s"; static char __pyx_k_226[] = "%s%s"; static char __pyx_k_227[] = "Unable to parse %s"; static char __pyx_k_230[] = "ndarray is not C contiguous"; static char __pyx_k_232[] = "ndarray is not Fortran contiguous"; static char __pyx_k_234[] = "Non-native byte order not supported"; static char __pyx_k_236[] = "unknown dtype code in numpy.pxd (%d)"; static char __pyx_k_237[] = "Format string allocated too short, see comment in numpy.pxd"; static char __pyx_k_240[] = "Format string allocated too short."; static char __pyx_k_242[] = "pandas.compat"; static char __pyx_k_243[] = "distutils.version"; static char __pyx_k_244[] = "1.6"; static char __pyx_k_245[] = "_np_version_under1p6"; static char __pyx_k_246[] = "1.7"; static char __pyx_k_251[] = "/home/yoh/deb/gits/pkg-exppsy/pandas/pandas/tslib.pyx"; static char __pyx_k_252[] = "pandas.tslib"; static char __pyx_k_253[] = "dateutil.tz"; static char __pyx_k_262[] = "Timestamp.fromordinal"; static char __pyx_k_266[] = "Timestamp.now"; static char __pyx_k_269[] = "Timestamp.today"; static char __pyx_k_272[] = "Timestamp.utcnow"; static char __pyx_k_276[] = "Timestamp.__new__"; static char __pyx_k_279[] = "Timestamp.__repr__"; static char __pyx_k_282[] = "Timestamp._date_repr"; static char __pyx_k_285[] = "Timestamp._time_repr"; static char __pyx_k_288[] = "Timestamp._repr_base"; static char __pyx_k_291[] = "Timestamp.tz"; static char __pyx_k_294[] = "Timestamp.freq"; static char __pyx_k_297[] = "Timestamp.__setstate__"; static char __pyx_k_300[] = "Timestamp.__reduce__"; static char __pyx_k_304[] = "Timestamp.to_period"; static char __pyx_k_307[] = "Timestamp.dayofweek"; static char __pyx_k_310[] = "Timestamp.dayofyear"; static char __pyx_k_313[] = "Timestamp.week"; static char __pyx_k_316[] = "Timestamp.quarter"; static char __pyx_k_319[] = "Timestamp.freqstr"; static char __pyx_k_322[] = "Timestamp.asm8"; static char __pyx_k_325[] = "Timestamp.tz_localize"; static char __pyx_k_328[] = "Timestamp.tz_convert"; static char __pyx_k_331[] = "Timestamp.replace"; static char __pyx_k_334[] = "Timestamp.to_pydatetime"; static char __pyx_k_338[] = "Timestamp.isoformat"; static char __pyx_k_341[] = "Timestamp._has_time_component"; static char __pyx_k_342[] = "TimeStamp is the pandas equivalent of python's Datetime\n and is interchangable with it in most cases. It's the type used\n for the entries that make up a DatetimeIndex, and other timeseries\n oriented data structures in pandas.\n "; static char __pyx_k_345[] = "NaTType.__new__"; static char __pyx_k_348[] = "NaTType.__repr__"; static char __pyx_k_351[] = "NaTType.__str__"; static char __pyx_k_354[] = "NaTType.__hash__"; static char __pyx_k_357[] = "NaTType.weekday"; static char __pyx_k_360[] = "NaTType.toordinal"; static char __pyx_k_361[] = "(N)ot-(A)-(T)ime, the time equivalent of NaN"; static char __pyx_k_362[] = ""; static char __pyx_k_375[] = "datetime_to_datetime64"; static char __pyx_k_384[] = "array_to_timedelta64"; static char __pyx_k_387[] = "convert_to_timedelta"; static char __pyx_k_426[] = "dt64arr_to_periodarr"; static char __pyx_k_429[] = "periodarr_to_dt64arr"; static char __pyx_k_436[] = "%q"; static char __pyx_k_437[] = "^`AB`^"; static char __pyx_k_439[] = "%f"; static char __pyx_k_440[] = "^`CD`^"; static char __pyx_k_442[] = "%F"; static char __pyx_k_443[] = "^`EF`^"; static char __pyx_k_445[] = "%l"; static char __pyx_k_446[] = "^`GH`^"; static char __pyx_k_448[] = "%u"; static char __pyx_k_449[] = "^`IJ`^"; static char __pyx_k_451[] = "%n"; static char __pyx_k_452[] = "^`KL`^"; static char __pyx_k_458[] = "get_period_field_arr"; static char __pyx_k_461[] = "_thread_allocate_lock"; static char __pyx_k_465[] = "LocaleTime.__init__"; static char __pyx_k_468[] = "LocaleTime.__pad"; static char __pyx_k_471[] = "LocaleTime.__calc_weekday"; static char __pyx_k_474[] = "LocaleTime.__calc_month"; static char __pyx_k_477[] = "LocaleTime.__calc_am_pm"; static char __pyx_k_480[] = "LocaleTime.__calc_date_time"; static char __pyx_k_483[] = "LocaleTime.__calc_timezone"; static char __pyx_k_484[] = "Stores and handles locale-specific information related to time.\n\n ATTRIBUTES:\n f_weekday -- full weekday names (7-item list)\n a_weekday -- abbreviated weekday names (7-item list)\n f_month -- full month names (13-item list; dummy value in [0], which\n is added by code)\n a_month -- abbreviated month names (13-item list, dummy value in\n [0], which is added by code)\n am_pm -- AM/PM representation (2-item list)\n LC_date_time -- format string for date/time representation (string)\n LC_date -- format string for date representation (string)\n LC_time -- format string for time representation (string)\n timezone -- daylight- and non-daylight-savings timezone representation\n (2-item list of sets)\n lang -- Language used by instance (2-item tuple)\n "; static char __pyx_k_488[] = "TimeRE.__init__"; static char __pyx_k_491[] = "TimeRE.__seqToRE"; static char __pyx_k_492[] = "whitespace_replacement"; static char __pyx_k_495[] = "TimeRE.pattern"; static char __pyx_k_498[] = "TimeRE.compile"; static char __pyx_k_499[] = "Handle conversion from format directives to regexes."; static char __pyx_k__00[] = "00"; static char __pyx_k__03[] = "03"; static char __pyx_k__10[] = "10"; static char __pyx_k__11[] = "11"; static char __pyx_k__17[] = "17"; static char __pyx_k__22[] = "22"; static char __pyx_k__44[] = "44"; static char __pyx_k__55[] = "55"; static char __pyx_k__76[] = "76"; static char __pyx_k__99[] = "99"; static char __pyx_k__M8[] = "M8"; static char __pyx_k__Zd[] = "Zd"; static char __pyx_k__Zf[] = "Zf"; static char __pyx_k__Zg[] = "Zg"; static char __pyx_k__dt[] = "dt"; static char __pyx_k__i4[] = "i4"; static char __pyx_k__i8[] = "i8"; static char __pyx_k__ms[] = "ms"; static char __pyx_k__np[] = "np"; static char __pyx_k__ns[] = "ns"; static char __pyx_k__ps[] = "ps"; static char __pyx_k__re[] = "re"; static char __pyx_k__sp[] = "sp"; static char __pyx_k__sz[] = "sz"; static char __pyx_k__td[] = "td"; static char __pyx_k__ts[] = "ts"; static char __pyx_k__tz[] = "tz"; static char __pyx_k__us[] = "us"; static char __pyx_k__NAN[] = "NAN"; static char __pyx_k__NAT[] = "NAT"; static char __pyx_k__NaN[] = "NaN"; static char __pyx_k__NaT[] = "NaT"; static char __pyx_k__UTC[] = "UTC"; static char __pyx_k__U_W[] = "U_W"; static char __pyx_k___ts[] = "_ts"; static char __pyx_k__abs[] = "abs"; static char __pyx_k__all[] = "all"; static char __pyx_k__arr[] = "arr"; static char __pyx_k__cls[] = "cls"; static char __pyx_k__day[] = "day"; static char __pyx_k__dow[] = "dow"; static char __pyx_k__doy[] = "doy"; static char __pyx_k__dts[] = "dts"; static char __pyx_k__end[] = "end"; static char __pyx_k__err[] = "err"; static char __pyx_k__fmt[] = "fmt"; static char __pyx_k__get[] = "get"; static char __pyx_k__gmt[] = "gmt"; static char __pyx_k__grp[] = "grp"; static char __pyx_k__idx[] = "idx"; static char __pyx_k__inf[] = "inf"; static char __pyx_k__key[] = "key"; static char __pyx_k__len[] = "len"; static char __pyx_k__loc[] = "loc"; static char __pyx_k__max[] = "max"; static char __pyx_k__min[] = "min"; static char __pyx_k__mus[] = "mus"; static char __pyx_k__nan[] = "nan"; static char __pyx_k__nat[] = "nat"; static char __pyx_k__new[] = "new"; static char __pyx_k__now[] = "now"; static char __pyx_k__num[] = "num"; static char __pyx_k__obj[] = "obj"; static char __pyx_k__old[] = "old"; static char __pyx_k__out[] = "out"; static char __pyx_k__pos[] = "pos"; static char __pyx_k__ret[] = "ret"; static char __pyx_k__sep[] = "sep"; static char __pyx_k__seq[] = "seq"; static char __pyx_k__sub[] = "sub"; static char __pyx_k__sys[] = "sys"; static char __pyx_k__tso[] = "tso"; static char __pyx_k__tz1[] = "tz1"; static char __pyx_k__tz2[] = "tz2"; static char __pyx_k__utc[] = "utc"; static char __pyx_k__val[] = "val"; static char __pyx_k__woy[] = "woy"; static char __pyx_k__1999[] = "1999"; static char __pyx_k__None[] = "None"; static char __pyx_k__ampm[] = "ampm"; static char __pyx_k__args[] = "args"; static char __pyx_k__asm8[] = "asm8"; static char __pyx_k__base[] = "base"; static char __pyx_k__code[] = "code"; static char __pyx_k__date[] = "date"; static char __pyx_k__days[] = "days"; static char __pyx_k__diff[] = "diff"; static char __pyx_k__fget[] = "fget"; static char __pyx_k__file[] = "file"; static char __pyx_k__fill[] = "fill"; static char __pyx_k__flat[] = "flat"; static char __pyx_k__frac[] = "frac"; static char __pyx_k__freq[] = "freq"; static char __pyx_k__func[] = "func"; static char __pyx_k__hour[] = "hour"; static char __pyx_k__iNaT[] = "iNaT"; static char __pyx_k__item[] = "item"; static char __pyx_k__join[] = "join"; static char __pyx_k__kwds[] = "kwds"; static char __pyx_k__lang[] = "lang"; static char __pyx_k__left[] = "left"; static char __pyx_k__long[] = "long"; static char __pyx_k__ndim[] = "ndim"; static char __pyx_k__prop[] = "prop"; static char __pyx_k__pydt[] = "pydt"; static char __pyx_k__pytz[] = "pytz"; static char __pyx_k__self[] = "self"; static char __pyx_k__send[] = "send"; static char __pyx_k__side[] = "side"; static char __pyx_k__sign[] = "sign"; static char __pyx_k__size[] = "size"; static char __pyx_k__sort[] = "sort"; static char __pyx_k__time[] = "time"; static char __pyx_k__unit[] = "unit"; static char __pyx_k__vals[] = "vals"; static char __pyx_k__view[] = "view"; static char __pyx_k__warn[] = "warn"; static char __pyx_k__week[] = "week"; static char __pyx_k__year[] = "year"; static char __pyx_k__zone[] = "zone"; static char __pyx_k____pad[] = "__pad"; static char __pyx_k__a_idx[] = "a_idx"; static char __pyx_k__am_pm[] = "am_pm"; static char __pyx_k__apply[] = "apply"; static char __pyx_k__array[] = "array"; static char __pyx_k__b_idx[] = "b_idx"; static char __pyx_k__base1[] = "base1"; static char __pyx_k__base2[] = "base2"; static char __pyx_k__boxed[] = "boxed"; static char __pyx_k__clear[] = "clear"; static char __pyx_k__close[] = "close"; static char __pyx_k__count[] = "count"; static char __pyx_k__delta[] = "delta"; static char __pyx_k__dtarr[] = "dtarr"; static char __pyx_k__dtype[] = "dtype"; static char __pyx_k__empty[] = "empty"; static char __pyx_k__field[] = "field"; static char __pyx_k__finfo[] = "finfo"; static char __pyx_k__found[] = "found"; static char __pyx_k__freq1[] = "freq1"; static char __pyx_k__freq2[] = "freq2"; static char __pyx_k__front[] = "front"; static char __pyx_k__hours[] = "hours"; static char __pyx_k__index[] = "index"; static char __pyx_k__int32[] = "int32"; static char __pyx_k__int64[] = "int64"; static char __pyx_k__lower[] = "lower"; static char __pyx_k__match[] = "match"; static char __pyx_k__month[] = "month"; static char __pyx_k__nanos[] = "nanos"; static char __pyx_k__numpy[] = "numpy"; static char __pyx_k__print[] = "print"; static char __pyx_k__range[] = "range"; static char __pyx_k__ravel[] = "ravel"; static char __pyx_k__regex[] = "regex"; static char __pyx_k__right[] = "right"; static char __pyx_k__round[] = "round"; static char __pyx_k__shape[] = "shape"; static char __pyx_k__short[] = "short"; static char __pyx_k__stamp[] = "stamp"; static char __pyx_k__state[] = "state"; static char __pyx_k__super[] = "super"; static char __pyx_k__table[] = "table"; static char __pyx_k__tdata[] = "tdata"; static char __pyx_k__throw[] = "throw"; static char __pyx_k__today[] = "today"; static char __pyx_k__trans[] = "trans"; static char __pyx_k__tzset[] = "tzset"; static char __pyx_k__tzutc[] = "tzutc"; static char __pyx_k__value[] = "value"; static char __pyx_k__where[] = "where"; static char __pyx_k__years[] = "years"; static char __pyx_k__D_RESO[] = "D_RESO"; static char __pyx_k__H_RESO[] = "H_RESO"; static char __pyx_k__Period[] = "Period"; static char __pyx_k__S_RESO[] = "S_RESO"; static char __pyx_k__T_RESO[] = "T_RESO"; static char __pyx_k__TimeRE[] = "TimeRE"; static char __pyx_k__append[] = "append"; static char __pyx_k__astype[] = "astype"; static char __pyx_k__coerce[] = "coerce"; static char __pyx_k__decode[] = "decode"; static char __pyx_k__deltas[] = "deltas"; static char __pyx_k__encode[] = "encode"; static char __pyx_k__escape[] = "escape"; static char __pyx_k__extend[] = "extend"; static char __pyx_k__fields[] = "fields"; static char __pyx_k__format[] = "format"; static char __pyx_k__hstack[] = "hstack"; static char __pyx_k__ignore[] = "ignore"; static char __pyx_k__insert[] = "insert"; static char __pyx_k__isleap[] = "isleap"; static char __pyx_k__ivalue[] = "ivalue"; static char __pyx_k__julian[] = "julian"; static char __pyx_k__kwargs[] = "kwargs"; static char __pyx_k__locale[] = "locale"; static char __pyx_k__micros[] = "micros"; static char __pyx_k__minute[] = "minute"; static char __pyx_k__mo_off[] = "mo_off"; static char __pyx_k__months[] = "months"; static char __pyx_k__np_NaT[] = "np_NaT"; static char __pyx_k__ntrans[] = "ntrans"; static char __pyx_k__object[] = "object"; static char __pyx_k__offset[] = "offset"; static char __pyx_k__raise_[] = "raise_"; static char __pyx_k__result[] = "result"; static char __pyx_k__second[] = "second"; static char __pyx_k__sorted[] = "sorted"; static char __pyx_k__stamps[] = "stamps"; static char __pyx_k__thread[] = "thread"; static char __pyx_k__tzinfo[] = "tzinfo"; static char __pyx_k__tzname[] = "tzname"; static char __pyx_k__utcnow[] = "utcnow"; static char __pyx_k__values[] = "values"; static char __pyx_k__LC_TIME[] = "LC_TIME"; static char __pyx_k__LC_date[] = "LC_date"; static char __pyx_k__LC_time[] = "LC_time"; static char __pyx_k__NaTType[] = "NaTType"; static char __pyx_k__US_RESO[] = "US_RESO"; static char __pyx_k____add__[] = "__add__"; static char __pyx_k____all__[] = "__all__"; static char __pyx_k____new__[] = "__new__"; static char __pyx_k____str__[] = "__str__"; static char __pyx_k____sub__[] = "__sub__"; static char __pyx_k___du_utc[] = "_du_utc"; static char __pyx_k___thread[] = "_thread"; static char __pyx_k__a_month[] = "a_month"; static char __pyx_k__both_eq[] = "both_eq"; static char __pyx_k__combine[] = "combine"; static char __pyx_k__compile[] = "compile"; static char __pyx_k__dtindex[] = "dtindex"; static char __pyx_k__f_month[] = "f_month"; static char __pyx_k__freqstr[] = "freqstr"; static char __pyx_k__genexpr[] = "genexpr"; static char __pyx_k__iresult[] = "iresult"; static char __pyx_k__ivalues[] = "ivalues"; static char __pyx_k__maximum[] = "maximum"; static char __pyx_k__minutes[] = "minutes"; static char __pyx_k__nonzero[] = "nonzero"; static char __pyx_k__ordinal[] = "ordinal"; static char __pyx_k__oresult[] = "oresult"; static char __pyx_k__pattern[] = "pattern"; static char __pyx_k__quarter[] = "quarter"; static char __pyx_k__replace[] = "replace"; static char __pyx_k__reverse[] = "reverse"; static char __pyx_k__seconds[] = "seconds"; static char __pyx_k__squeeze[] = "squeeze"; static char __pyx_k__ts_base[] = "ts_base"; static char __pyx_k__tzlocal[] = "tzlocal"; static char __pyx_k__uniques[] = "uniques"; static char __pyx_k__version[] = "version"; static char __pyx_k__weekday[] = "weekday"; static char __pyx_k__KeyError[] = "KeyError"; static char __pyx_k____exit__[] = "__exit__"; static char __pyx_k____hash__[] = "__hash__"; static char __pyx_k____init__[] = "__init__"; static char __pyx_k____main__[] = "__main__"; static char __pyx_k____name__[] = "__name__"; static char __pyx_k____repr__[] = "__repr__"; static char __pyx_k____test__[] = "__test__"; static char __pyx_k___getlang[] = "_getlang"; static char __pyx_k___tzinfos[] = "_tzinfos"; static char __pyx_k__both_nat[] = "both_nat"; static char __pyx_k__calendar[] = "calendar"; static char __pyx_k__datetime[] = "datetime"; static char __pyx_k__day_abbr[] = "day_abbr"; static char __pyx_k__day_name[] = "day_name"; static char __pyx_k__dayfirst[] = "dayfirst"; static char __pyx_k__daylight[] = "daylight"; static char __pyx_k__fraction[] = "fraction"; static char __pyx_k__iterkeys[] = "iterkeys"; static char __pyx_k__localize[] = "localize"; static char __pyx_k__one_diff[] = "one_diff"; static char __pyx_k__ordinals[] = "ordinals"; static char __pyx_k__property[] = "property"; static char __pyx_k__relation[] = "relation"; static char __pyx_k__result_a[] = "result_a"; static char __pyx_k__result_b[] = "result_b"; static char __pyx_k__sa_dtype[] = "sa_dtype"; static char __pyx_k__strftime[] = "strftime"; static char __pyx_k__timezone[] = "timezone"; static char __pyx_k__ts_input[] = "ts_input"; static char __pyx_k__utc_date[] = "utc_date"; static char __pyx_k__year2000[] = "year2000"; static char __pyx_k__Exception[] = "Exception"; static char __pyx_k__NameError[] = "NameError"; static char __pyx_k__Timestamp[] = "Timestamp"; static char __pyx_k__TypeError[] = "TypeError"; static char __pyx_k____class__[] = "__class__"; static char __pyx_k____enter__[] = "__enter__"; static char __pyx_k____seqToRE[] = "__seqToRE"; static char __pyx_k__a_weekday[] = "a_weekday"; static char __pyx_k__date_time[] = "date_time"; static char __pyx_k__dayofweek[] = "dayofweek"; static char __pyx_k__dayofyear[] = "dayofyear"; static char __pyx_k__directive[] = "directive"; static char __pyx_k__dst_hours[] = "dst_hours"; static char __pyx_k__enumerate[] = "enumerate"; static char __pyx_k__f_weekday[] = "f_weekday"; static char __pyx_k__getlocale[] = "getlocale"; static char __pyx_k__group_key[] = "group_key"; static char __pyx_k__groupdict[] = "groupdict"; static char __pyx_k__have_pytz[] = "have_pytz"; static char __pyx_k__infer_dst[] = "infer_dst"; static char __pyx_k__isoformat[] = "isoformat"; static char __pyx_k__no_saving[] = "no_saving"; static char __pyx_k__normalize[] = "normalize"; static char __pyx_k__periodarr[] = "periodarr"; static char __pyx_k__re_escape[] = "re_escape"; static char __pyx_k__timedelta[] = "timedelta"; static char __pyx_k__to_period[] = "to_period"; static char __pyx_k__toordinal[] = "toordinal"; static char __pyx_k__trans_grp[] = "trans_grp"; static char __pyx_k__trans_idx[] = "trans_idx"; static char __pyx_k__trans_len[] = "trans_len"; static char __pyx_k__tz_values[] = "tz_values"; static char __pyx_k__utc_dates[] = "utc_dates"; static char __pyx_k__utcoffset[] = "utcoffset"; static char __pyx_k__IGNORECASE[] = "IGNORECASE"; static char __pyx_k__IndexError[] = "IndexError"; static char __pyx_k__LocaleTime[] = "LocaleTime"; static char __pyx_k__ValueError[] = "ValueError"; static char __pyx_k____import__[] = "__import__"; static char __pyx_k____module__[] = "__module__"; static char __pyx_k____reduce__[] = "__reduce__"; static char __pyx_k___date_repr[] = "_date_repr"; static char __pyx_k___get_field[] = "_get_field"; static char __pyx_k___repr_base[] = "_repr_base"; static char __pyx_k___time_repr[] = "_time_repr"; static char __pyx_k___utcoffset[] = "_utcoffset"; static char __pyx_k___zero_time[] = "_zero_time"; static char __pyx_k__astimezone[] = "astimezone"; static char __pyx_k__basestring[] = "basestring"; static char __pyx_k__compat_NaT[] = "compat_NaT"; static char __pyx_k__datetime64[] = "datetime64"; static char __pyx_k__found_dict[] = "found_dict"; static char __pyx_k__found_zone[] = "found_zone"; static char __pyx_k__freq_group[] = "freq_group"; static char __pyx_k__has_saving[] = "has_saving"; static char __pyx_k__i8_to_pydt[] = "i8_to_pydt"; static char __pyx_k__isleapyear[] = "isleapyear"; static char __pyx_k__month_abbr[] = "month_abbr"; static char __pyx_k__month_name[] = "month_name"; static char __pyx_k__monthrange[] = "monthrange"; static char __pyx_k__nanosecond[] = "nanosecond"; static char __pyx_k__new_values[] = "new_values"; static char __pyx_k__parse_code[] = "parse_code"; static char __pyx_k__parse_date[] = "parse_date"; static char __pyx_k__pydt_to_i8[] = "pydt_to_i8"; static char __pyx_k__re_compile[] = "re_compile"; static char __pyx_k__startswith[] = "startswith"; static char __pyx_k__switch_idx[] = "switch_idx"; static char __pyx_k__time_tuple[] = "time_tuple"; static char __pyx_k__to_convert[] = "to_convert"; static char __pyx_k__tz_convert[] = "tz_convert"; static char __pyx_k__weekofyear[] = "weekofyear"; static char __pyx_k____getitem__[] = "__getitem__"; static char __pyx_k____setitem__[] = "__setitem__"; static char __pyx_k___cache_lock[] = "_cache_lock"; static char __pyx_k___get_deltas[] = "_get_deltas"; static char __pyx_k___is_tzlocal[] = "_is_tzlocal"; static char __pyx_k___np_version[] = "_np_version"; static char __pyx_k__array_split[] = "array_split"; static char __pyx_k__date_string[] = "date_string"; static char __pyx_k__day_of_week[] = "day_of_week"; static char __pyx_k__fromordinal[] = "fromordinal"; static char __pyx_k__idx_shifted[] = "idx_shifted"; static char __pyx_k__inferred_tz[] = "inferred_tz"; static char __pyx_k__isleap_prev[] = "isleap_prev"; static char __pyx_k__locale_time[] = "locale_time"; static char __pyx_k__logical_and[] = "logical_and"; static char __pyx_k__microsecond[] = "microsecond"; static char __pyx_k__regex_chars[] = "regex_chars"; static char __pyx_k__sign_pretty[] = "sign_pretty"; static char __pyx_k__struct_time[] = "struct_time"; static char __pyx_k__timedelta64[] = "timedelta64"; static char __pyx_k__to_datetime[] = "to_datetime"; static char __pyx_k__tot_seconds[] = "tot_seconds"; static char __pyx_k__trans_cache[] = "trans_cache"; static char __pyx_k__tz_localize[] = "tz_localize"; static char __pyx_k__utc_convert[] = "utc_convert"; static char __pyx_k__LC_date_time[] = "LC_date_time"; static char __pyx_k__LooseVersion[] = "LooseVersion"; static char __pyx_k__RuntimeError[] = "RuntimeError"; static char __pyx_k____calc_am_pm[] = "__calc_am_pm"; static char __pyx_k____calc_month[] = "__calc_month"; static char __pyx_k____qualname__[] = "__qualname__"; static char __pyx_k____setstate__[] = "__setstate__"; static char __pyx_k___nat_strings[] = "_nat_strings"; static char __pyx_k___regex_cache[] = "_regex_cache"; static char __pyx_k__apply_offset[] = "apply_offset"; static char __pyx_k__days_to_week[] = "days_to_week"; static char __pyx_k__dummy_thread[] = "dummy_thread"; static char __pyx_k__format_regex[] = "format_regex"; static char __pyx_k__get_timezone[] = "get_timezone"; static char __pyx_k__microseconds[] = "microseconds"; static char __pyx_k__object_state[] = "object_state"; static char __pyx_k__searchsorted[] = "searchsorted"; static char __pyx_k__seen_integer[] = "seen_integer"; static char __pyx_k__version_info[] = "version_info"; static char __pyx_k__week_of_year[] = "week_of_year"; static char __pyx_k___TimeRE_cache[] = "_TimeRE_cache"; static char __pyx_k____metaclass__[] = "__metaclass__"; static char __pyx_k___dummy_thread[] = "_dummy_thread"; static char __pyx_k___month_offset[] = "_month_offset"; static char __pyx_k__allocate_lock[] = "allocate_lock"; static char __pyx_k__bad_directive[] = "bad_directive"; static char __pyx_k__datetime_date[] = "datetime_date"; static char __pyx_k__datetime_time[] = "datetime_time"; static char __pyx_k__first_weekday[] = "first_weekday"; static char __pyx_k__period_format[] = "period_format"; static char __pyx_k__seen_datetime[] = "seen_datetime"; static char __pyx_k__short_version[] = "short_version"; static char __pyx_k__to_pydatetime[] = "to_pydatetime"; static char __pyx_k__total_seconds[] = "total_seconds"; static char __pyx_k__unique_deltas[] = "unique_deltas"; static char __pyx_k__week_0_length[] = "week_0_length"; static char __pyx_k__AttributeError[] = "AttributeError"; static char __pyx_k____calc_weekday[] = "__calc_weekday"; static char __pyx_k____pyx_vtable__[] = "__pyx_vtable__"; static char __pyx_k__array_strptime[] = "array_strptime"; static char __pyx_k__current_format[] = "current_format"; static char __pyx_k__date_normalize[] = "date_normalize"; static char __pyx_k__get_date_field[] = "get_date_field"; static char __pyx_k__period_ordinal[] = "period_ordinal"; static char __pyx_k__seconds_pretty[] = "seconds_pretty"; static char __pyx_k___CACHE_MAX_SIZE[] = "_CACHE_MAX_SIZE"; static char __pyx_k____calc_timezone[] = "__calc_timezone"; static char __pyx_k____pyx_getbuffer[] = "__pyx_getbuffer"; static char __pyx_k__datetime_result[] = "datetime_result"; static char __pyx_k__directive_index[] = "directive_index"; static char __pyx_k__get_time_micros[] = "get_time_micros"; static char __pyx_k__week_starts_Mon[] = "week_starts_Mon"; static char __pyx_k___LocaleTime__pad[] = "_LocaleTime__pad"; static char __pyx_k___TimeRE__seqToRE[] = "_TimeRE__seqToRE"; static char __pyx_k____calc_date_time[] = "__calc_date_time"; static char __pyx_k___get_transitions[] = "_get_transitions"; static char __pyx_k___is_fixed_offset[] = "_is_fixed_offset"; static char __pyx_k___transition_info[] = "_transition_info"; static char __pyx_k__dates_normalized[] = "dates_normalized"; static char __pyx_k__extract_ordinals[] = "extract_ordinals"; static char __pyx_k__get_period_field[] = "get_period_field"; static char __pyx_k__processed_format[] = "processed_format"; static char __pyx_k__repr_timedelta64[] = "repr_timedelta64"; static char __pyx_k__utc_offset_cache[] = "utc_offset_cache"; static char __pyx_k___parse_code_table[] = "_parse_code_table"; static char __pyx_k__array_to_datetime[] = "array_to_datetime"; static char __pyx_k__period_asfreq_arr[] = "period_asfreq_arr"; static char __pyx_k__replacement_pairs[] = "replacement_pairs"; static char __pyx_k__tz_convert_single[] = "tz_convert_single"; static char __pyx_k__AmbiguousTimeError[] = "AmbiguousTimeError"; static char __pyx_k__build_field_sarray[] = "build_field_sarray"; static char __pyx_k__ints_to_pydatetime[] = "ints_to_pydatetime"; static char __pyx_k__is_timestamp_array[] = "is_timestamp_array"; static char __pyx_k__tz_localize_to_utc[] = "tz_localize_to_utc"; static char __pyx_k__week_of_year_start[] = "week_of_year_start"; static char __pyx_k__OutOfBoundsDatetime[] = "OutOfBoundsDatetime"; static char __pyx_k____pyx_releasebuffer[] = "__pyx_releasebuffer"; static char __pyx_k___has_time_component[] = "_has_time_component"; static char __pyx_k__cast_to_nanoseconds[] = "cast_to_nanoseconds"; static PyObject *__pyx_kp_s_10; static PyObject *__pyx_n_s_103; static PyObject *__pyx_kp_s_105; static PyObject *__pyx_kp_s_107; static PyObject *__pyx_kp_s_108; static PyObject *__pyx_kp_s_109; static PyObject *__pyx_kp_s_11; static PyObject *__pyx_n_s_110; static PyObject *__pyx_kp_s_118; static PyObject *__pyx_kp_s_119; static PyObject *__pyx_kp_s_12; static PyObject *__pyx_kp_s_121; static PyObject *__pyx_kp_s_123; static PyObject *__pyx_kp_s_125; static PyObject *__pyx_kp_b_127; static PyObject *__pyx_kp_s_127; static PyObject *__pyx_kp_b_128; static PyObject *__pyx_kp_b_129; static PyObject *__pyx_kp_s_13; static PyObject *__pyx_kp_s_130; static PyObject *__pyx_kp_b_131; static PyObject *__pyx_kp_b_132; static PyObject *__pyx_kp_b_133; static PyObject *__pyx_kp_b_134; static PyObject *__pyx_kp_b_135; static PyObject *__pyx_kp_b_136; static PyObject *__pyx_kp_b_137; static PyObject *__pyx_kp_s_138; static PyObject *__pyx_kp_s_139; static PyObject *__pyx_n_s_14; static PyObject *__pyx_kp_s_141; static PyObject *__pyx_kp_s_143; static PyObject *__pyx_kp_s_144; static PyObject *__pyx_kp_s_145; static PyObject *__pyx_kp_s_146; static PyObject *__pyx_kp_s_147; static PyObject *__pyx_kp_s_149; static PyObject *__pyx_kp_s_150; static PyObject *__pyx_n_s_151; static PyObject *__pyx_n_s_152; static PyObject *__pyx_n_s_153; static PyObject *__pyx_n_s_154; static PyObject *__pyx_n_s_155; static PyObject *__pyx_kp_s_156; static PyObject *__pyx_kp_s_160; static PyObject *__pyx_kp_s_163; static PyObject *__pyx_kp_s_164; static PyObject *__pyx_kp_s_165; static PyObject *__pyx_kp_s_166; static PyObject *__pyx_kp_s_168; static PyObject *__pyx_kp_s_169; static PyObject *__pyx_kp_s_170; static PyObject *__pyx_kp_s_171; static PyObject *__pyx_kp_s_173; static PyObject *__pyx_kp_s_175; static PyObject *__pyx_kp_s_177; static PyObject *__pyx_kp_s_179; static PyObject *__pyx_kp_s_18; static PyObject *__pyx_kp_s_181; static PyObject *__pyx_kp_s_184; static PyObject *__pyx_kp_s_187; static PyObject *__pyx_kp_s_189; static PyObject *__pyx_kp_s_191; static PyObject *__pyx_kp_s_198; static PyObject *__pyx_kp_s_199; static PyObject *__pyx_kp_s_2; static PyObject *__pyx_kp_s_20; static PyObject *__pyx_kp_s_200; static PyObject *__pyx_kp_s_201; static PyObject *__pyx_kp_s_202; static PyObject *__pyx_kp_s_203; static PyObject *__pyx_kp_s_204; static PyObject *__pyx_kp_s_205; static PyObject *__pyx_kp_s_206; static PyObject *__pyx_kp_s_207; static PyObject *__pyx_kp_s_208; static PyObject *__pyx_kp_s_209; static PyObject *__pyx_kp_s_210; static PyObject *__pyx_kp_s_211; static PyObject *__pyx_kp_s_216; static PyObject *__pyx_kp_s_217; static PyObject *__pyx_kp_s_218; static PyObject *__pyx_kp_s_219; static PyObject *__pyx_kp_s_22; static PyObject *__pyx_kp_s_221; static PyObject *__pyx_kp_s_222; static PyObject *__pyx_kp_s_225; static PyObject *__pyx_kp_s_226; static PyObject *__pyx_kp_s_227; static PyObject *__pyx_kp_u_230; static PyObject *__pyx_kp_u_232; static PyObject *__pyx_kp_u_234; static PyObject *__pyx_kp_u_236; static PyObject *__pyx_kp_u_237; static PyObject *__pyx_kp_s_24; static PyObject *__pyx_kp_u_240; static PyObject *__pyx_n_s_242; static PyObject *__pyx_n_s_243; static PyObject *__pyx_kp_s_244; static PyObject *__pyx_n_s_245; static PyObject *__pyx_kp_s_246; static PyObject *__pyx_kp_s_251; static PyObject *__pyx_n_s_252; static PyObject *__pyx_n_s_253; static PyObject *__pyx_n_s_262; static PyObject *__pyx_n_s_266; static PyObject *__pyx_n_s_269; static PyObject *__pyx_kp_s_27; static PyObject *__pyx_n_s_272; static PyObject *__pyx_n_s_276; static PyObject *__pyx_n_s_279; static PyObject *__pyx_kp_s_28; static PyObject *__pyx_n_s_282; static PyObject *__pyx_n_s_285; static PyObject *__pyx_n_s_288; static PyObject *__pyx_kp_s_29; static PyObject *__pyx_n_s_291; static PyObject *__pyx_n_s_294; static PyObject *__pyx_n_s_297; static PyObject *__pyx_kp_s_30; static PyObject *__pyx_n_s_300; static PyObject *__pyx_n_s_304; static PyObject *__pyx_n_s_307; static PyObject *__pyx_kp_s_31; static PyObject *__pyx_n_s_310; static PyObject *__pyx_n_s_313; static PyObject *__pyx_n_s_316; static PyObject *__pyx_n_s_319; static PyObject *__pyx_n_s_322; static PyObject *__pyx_n_s_325; static PyObject *__pyx_n_s_328; static PyObject *__pyx_n_s_331; static PyObject *__pyx_n_s_334; static PyObject *__pyx_n_s_338; static PyObject *__pyx_kp_s_34; static PyObject *__pyx_n_s_341; static PyObject *__pyx_kp_s_342; static PyObject *__pyx_n_s_345; static PyObject *__pyx_n_s_348; static PyObject *__pyx_kp_s_35; static PyObject *__pyx_n_s_351; static PyObject *__pyx_n_s_354; static PyObject *__pyx_n_s_357; static PyObject *__pyx_n_s_360; static PyObject *__pyx_kp_s_361; static PyObject *__pyx_n_s_362; static PyObject *__pyx_n_s_375; static PyObject *__pyx_kp_s_38; static PyObject *__pyx_n_s_384; static PyObject *__pyx_n_s_387; static PyObject *__pyx_kp_s_40; static PyObject *__pyx_n_s_42; static PyObject *__pyx_n_s_426; static PyObject *__pyx_n_s_429; static PyObject *__pyx_kp_b_436; static PyObject *__pyx_kp_b_437; static PyObject *__pyx_kp_s_437; static PyObject *__pyx_kp_b_439; static PyObject *__pyx_kp_s_44; static PyObject *__pyx_kp_b_440; static PyObject *__pyx_kp_s_440; static PyObject *__pyx_kp_b_442; static PyObject *__pyx_kp_b_443; static PyObject *__pyx_kp_s_443; static PyObject *__pyx_kp_b_445; static PyObject *__pyx_kp_b_446; static PyObject *__pyx_kp_s_446; static PyObject *__pyx_kp_b_448; static PyObject *__pyx_kp_b_449; static PyObject *__pyx_kp_s_449; static PyObject *__pyx_kp_s_45; static PyObject *__pyx_kp_b_451; static PyObject *__pyx_kp_b_452; static PyObject *__pyx_kp_s_452; static PyObject *__pyx_n_s_458; static PyObject *__pyx_kp_s_46; static PyObject *__pyx_n_s_461; static PyObject *__pyx_n_s_465; static PyObject *__pyx_n_s_468; static PyObject *__pyx_n_s_471; static PyObject *__pyx_n_s_474; static PyObject *__pyx_n_s_477; static PyObject *__pyx_kp_s_48; static PyObject *__pyx_n_s_480; static PyObject *__pyx_n_s_483; static PyObject *__pyx_kp_s_484; static PyObject *__pyx_n_s_488; static PyObject *__pyx_n_s_491; static PyObject *__pyx_n_s_492; static PyObject *__pyx_n_s_495; static PyObject *__pyx_n_s_498; static PyObject *__pyx_kp_s_499; static PyObject *__pyx_kp_s_5; static PyObject *__pyx_kp_s_50; static PyObject *__pyx_kp_s_52; static PyObject *__pyx_n_s_54; static PyObject *__pyx_n_s_55; static PyObject *__pyx_kp_s_56; static PyObject *__pyx_kp_s_62; static PyObject *__pyx_n_s_64; static PyObject *__pyx_kp_s_65; static PyObject *__pyx_kp_s_68; static PyObject *__pyx_kp_s_7; static PyObject *__pyx_kp_s_72; static PyObject *__pyx_n_s_74; static PyObject *__pyx_kp_s_75; static PyObject *__pyx_kp_s_78; static PyObject *__pyx_kp_s_79; static PyObject *__pyx_kp_s_8; static PyObject *__pyx_kp_s_80; static PyObject *__pyx_kp_s_81; static PyObject *__pyx_kp_s_82; static PyObject *__pyx_kp_s_83; static PyObject *__pyx_kp_s_85; static PyObject *__pyx_kp_s_86; static PyObject *__pyx_kp_s_87; static PyObject *__pyx_kp_s_88; static PyObject *__pyx_kp_s_9; static PyObject *__pyx_kp_s_91; static PyObject *__pyx_kp_s_92; static PyObject *__pyx_n_s_94; static PyObject *__pyx_kp_s_95; static PyObject *__pyx_kp_s_98; static PyObject *__pyx_kp_s__0; static PyObject *__pyx_kp_s__00; static PyObject *__pyx_kp_s__03; static PyObject *__pyx_kp_s__10; static PyObject *__pyx_kp_s__11; static PyObject *__pyx_kp_s__17; static PyObject *__pyx_kp_s__1999; static PyObject *__pyx_kp_s__2; static PyObject *__pyx_kp_s__22; static PyObject *__pyx_kp_s__3; static PyObject *__pyx_kp_s__44; static PyObject *__pyx_kp_s__55; static PyObject *__pyx_kp_s__76; static PyObject *__pyx_kp_s__99; static PyObject *__pyx_n_s__A; static PyObject *__pyx_n_s__AmbiguousTimeError; static PyObject *__pyx_n_s__AttributeError; static PyObject *__pyx_n_s__B; static PyObject *__pyx_n_s__D; static PyObject *__pyx_n_s__D_RESO; static PyObject *__pyx_n_s__Exception; static PyObject *__pyx_n_s__H; static PyObject *__pyx_n_s__H_RESO; static PyObject *__pyx_n_s__I; static PyObject *__pyx_n_s__IGNORECASE; static PyObject *__pyx_n_s__IndexError; static PyObject *__pyx_n_s__KeyError; static PyObject *__pyx_n_s__LC_TIME; static PyObject *__pyx_n_s__LC_date; static PyObject *__pyx_n_s__LC_date_time; static PyObject *__pyx_n_s__LC_time; static PyObject *__pyx_n_s__LocaleTime; static PyObject *__pyx_n_s__LooseVersion; static PyObject *__pyx_n_s__M; static PyObject *__pyx_n_s__M8; static PyObject *__pyx_n_s__NAN; static PyObject *__pyx_n_s__NAT; static PyObject *__pyx_n_s__NaN; static PyObject *__pyx_n_s__NaT; static PyObject *__pyx_n_s__NaTType; static PyObject *__pyx_n_s__NameError; static PyObject *__pyx_n_s__None; static PyObject *__pyx_n_s__OutOfBoundsDatetime; static PyObject *__pyx_n_s__P; static PyObject *__pyx_n_s__Period; static PyObject *__pyx_n_s__RuntimeError; static PyObject *__pyx_n_s__S; static PyObject *__pyx_n_s__S_RESO; static PyObject *__pyx_n_s__T; static PyObject *__pyx_n_s__T_RESO; static PyObject *__pyx_n_s__TimeRE; static PyObject *__pyx_n_s__Timestamp; static PyObject *__pyx_n_s__TypeError; static PyObject *__pyx_n_s__U; static PyObject *__pyx_n_s__US_RESO; static PyObject *__pyx_n_s__UTC; static PyObject *__pyx_n_s__U_W; static PyObject *__pyx_n_s__ValueError; static PyObject *__pyx_n_s__W; static PyObject *__pyx_n_s__X; static PyObject *__pyx_n_s__Y; static PyObject *__pyx_n_s__Z; static PyObject *__pyx_n_s___CACHE_MAX_SIZE; static PyObject *__pyx_n_s___LocaleTime__pad; static PyObject *__pyx_n_s___TimeRE__seqToRE; static PyObject *__pyx_n_s___TimeRE_cache; static PyObject *__pyx_n_s____add__; static PyObject *__pyx_n_s____all__; static PyObject *__pyx_n_s____calc_am_pm; static PyObject *__pyx_n_s____calc_date_time; static PyObject *__pyx_n_s____calc_month; static PyObject *__pyx_n_s____calc_timezone; static PyObject *__pyx_n_s____calc_weekday; static PyObject *__pyx_n_s____class__; static PyObject *__pyx_n_s____enter__; static PyObject *__pyx_n_s____exit__; static PyObject *__pyx_n_s____getitem__; static PyObject *__pyx_n_s____hash__; static PyObject *__pyx_n_s____import__; static PyObject *__pyx_n_s____init__; static PyObject *__pyx_n_s____main__; static PyObject *__pyx_n_s____metaclass__; static PyObject *__pyx_n_s____module__; static PyObject *__pyx_n_s____name__; static PyObject *__pyx_n_s____new__; static PyObject *__pyx_n_s____pad; static PyObject *__pyx_n_s____pyx_getbuffer; static PyObject *__pyx_n_s____pyx_releasebuffer; static PyObject *__pyx_n_s____pyx_vtable__; static PyObject *__pyx_n_s____qualname__; static PyObject *__pyx_n_s____reduce__; static PyObject *__pyx_n_s____repr__; static PyObject *__pyx_n_s____seqToRE; static PyObject *__pyx_n_s____setitem__; static PyObject *__pyx_n_s____setstate__; static PyObject *__pyx_n_s____str__; static PyObject *__pyx_n_s____sub__; static PyObject *__pyx_n_s____test__; static PyObject *__pyx_n_s___cache_lock; static PyObject *__pyx_n_s___date_repr; static PyObject *__pyx_n_s___du_utc; static PyObject *__pyx_n_s___dummy_thread; static PyObject *__pyx_n_s___get_deltas; static PyObject *__pyx_n_s___get_field; static PyObject *__pyx_n_s___get_transitions; static PyObject *__pyx_n_s___getlang; static PyObject *__pyx_n_s___has_time_component; static PyObject *__pyx_n_s___is_fixed_offset; static PyObject *__pyx_n_s___is_tzlocal; static PyObject *__pyx_n_s___month_offset; static PyObject *__pyx_n_s___nat_strings; static PyObject *__pyx_n_s___np_version; static PyObject *__pyx_n_s___parse_code_table; static PyObject *__pyx_n_s___regex_cache; static PyObject *__pyx_n_s___repr_base; static PyObject *__pyx_n_s___thread; static PyObject *__pyx_n_s___time_repr; static PyObject *__pyx_n_s___transition_info; static PyObject *__pyx_n_s___ts; static PyObject *__pyx_n_s___tzinfos; static PyObject *__pyx_n_s___utcoffset; static PyObject *__pyx_n_s___zero_time; static PyObject *__pyx_n_s__a; static PyObject *__pyx_n_s__a_idx; static PyObject *__pyx_n_s__a_month; static PyObject *__pyx_n_s__a_weekday; static PyObject *__pyx_n_s__abs; static PyObject *__pyx_n_s__all; static PyObject *__pyx_n_s__allocate_lock; static PyObject *__pyx_n_s__am_pm; static PyObject *__pyx_n_s__ampm; static PyObject *__pyx_n_s__append; static PyObject *__pyx_n_s__apply; static PyObject *__pyx_n_s__apply_offset; static PyObject *__pyx_n_s__args; static PyObject *__pyx_n_s__arr; static PyObject *__pyx_n_s__array; static PyObject *__pyx_n_s__array_split; static PyObject *__pyx_n_s__array_strptime; static PyObject *__pyx_n_s__array_to_datetime; static PyObject *__pyx_n_s__asm8; static PyObject *__pyx_n_s__astimezone; static PyObject *__pyx_n_s__astype; static PyObject *__pyx_n_s__b; static PyObject *__pyx_n_s__b_idx; static PyObject *__pyx_n_s__bad_directive; static PyObject *__pyx_n_s__base; static PyObject *__pyx_n_s__base1; static PyObject *__pyx_n_s__base2; static PyObject *__pyx_n_s__basestring; static PyObject *__pyx_n_s__both_eq; static PyObject *__pyx_n_s__both_nat; static PyObject *__pyx_n_s__boxed; static PyObject *__pyx_n_s__build_field_sarray; static PyObject *__pyx_n_s__c; static PyObject *__pyx_n_s__calendar; static PyObject *__pyx_n_s__cast_to_nanoseconds; static PyObject *__pyx_n_s__clear; static PyObject *__pyx_n_s__close; static PyObject *__pyx_n_s__cls; static PyObject *__pyx_n_s__code; static PyObject *__pyx_n_s__coerce; static PyObject *__pyx_n_s__combine; static PyObject *__pyx_n_s__compat_NaT; static PyObject *__pyx_n_s__compile; static PyObject *__pyx_n_s__count; static PyObject *__pyx_n_s__current_format; static PyObject *__pyx_n_s__d; static PyObject *__pyx_n_s__date; static PyObject *__pyx_n_s__date_normalize; static PyObject *__pyx_n_s__date_string; static PyObject *__pyx_n_s__date_time; static PyObject *__pyx_n_s__dates_normalized; static PyObject *__pyx_n_s__datetime; static PyObject *__pyx_n_s__datetime64; static PyObject *__pyx_n_s__datetime_date; static PyObject *__pyx_n_s__datetime_result; static PyObject *__pyx_n_s__datetime_time; static PyObject *__pyx_n_s__day; static PyObject *__pyx_n_s__day_abbr; static PyObject *__pyx_n_s__day_name; static PyObject *__pyx_n_s__day_of_week; static PyObject *__pyx_n_s__dayfirst; static PyObject *__pyx_n_s__daylight; static PyObject *__pyx_n_s__dayofweek; static PyObject *__pyx_n_s__dayofyear; static PyObject *__pyx_n_s__days; static PyObject *__pyx_n_s__days_to_week; static PyObject *__pyx_n_s__decode; static PyObject *__pyx_n_s__delta; static PyObject *__pyx_n_s__deltas; static PyObject *__pyx_n_s__diff; static PyObject *__pyx_n_s__directive; static PyObject *__pyx_n_s__directive_index; static PyObject *__pyx_n_s__dow; static PyObject *__pyx_n_s__doy; static PyObject *__pyx_n_s__dst_hours; static PyObject *__pyx_n_s__dt; static PyObject *__pyx_n_s__dtarr; static PyObject *__pyx_n_s__dtindex; static PyObject *__pyx_n_s__dts; static PyObject *__pyx_n_s__dtype; static PyObject *__pyx_n_s__dummy_thread; static PyObject *__pyx_n_s__empty; static PyObject *__pyx_n_s__encode; static PyObject *__pyx_n_s__end; static PyObject *__pyx_n_s__enumerate; static PyObject *__pyx_n_s__err; static PyObject *__pyx_n_s__escape; static PyObject *__pyx_n_s__extend; static PyObject *__pyx_n_s__extract_ordinals; static PyObject *__pyx_n_s__f; static PyObject *__pyx_n_s__f_month; static PyObject *__pyx_n_s__f_weekday; static PyObject *__pyx_n_s__fget; static PyObject *__pyx_n_s__field; static PyObject *__pyx_n_s__fields; static PyObject *__pyx_n_s__file; static PyObject *__pyx_n_s__fill; static PyObject *__pyx_n_s__finfo; static PyObject *__pyx_n_s__first_weekday; static PyObject *__pyx_n_s__flat; static PyObject *__pyx_n_s__fmt; static PyObject *__pyx_n_s__format; static PyObject *__pyx_n_s__format_regex; static PyObject *__pyx_n_s__found; static PyObject *__pyx_n_s__found_dict; static PyObject *__pyx_n_s__found_zone; static PyObject *__pyx_n_s__frac; static PyObject *__pyx_n_s__fraction; static PyObject *__pyx_n_s__freq; static PyObject *__pyx_n_s__freq1; static PyObject *__pyx_n_s__freq2; static PyObject *__pyx_n_s__freq_group; static PyObject *__pyx_n_s__freqstr; static PyObject *__pyx_n_s__fromordinal; static PyObject *__pyx_n_s__front; static PyObject *__pyx_n_s__func; static PyObject *__pyx_n_s__genexpr; static PyObject *__pyx_n_s__get; static PyObject *__pyx_n_s__get_date_field; static PyObject *__pyx_n_s__get_period_field; static PyObject *__pyx_n_s__get_time_micros; static PyObject *__pyx_n_s__get_timezone; static PyObject *__pyx_n_s__getlocale; static PyObject *__pyx_n_s__gmt; static PyObject *__pyx_n_s__group_key; static PyObject *__pyx_n_s__groupdict; static PyObject *__pyx_n_s__grp; static PyObject *__pyx_n_s__h; static PyObject *__pyx_n_s__has_saving; static PyObject *__pyx_n_s__have_pytz; static PyObject *__pyx_n_s__hour; static PyObject *__pyx_n_s__hours; static PyObject *__pyx_n_s__hstack; static PyObject *__pyx_n_s__i; static PyObject *__pyx_n_s__i4; static PyObject *__pyx_n_s__i8; static PyObject *__pyx_n_s__i8_to_pydt; static PyObject *__pyx_n_s__iNaT; static PyObject *__pyx_n_s__idx; static PyObject *__pyx_n_s__idx_shifted; static PyObject *__pyx_n_s__ignore; static PyObject *__pyx_n_s__index; static PyObject *__pyx_n_s__inf; static PyObject *__pyx_n_s__infer_dst; static PyObject *__pyx_n_s__inferred_tz; static PyObject *__pyx_n_s__insert; static PyObject *__pyx_n_s__int32; static PyObject *__pyx_n_s__int64; static PyObject *__pyx_n_s__ints_to_pydatetime; static PyObject *__pyx_n_s__iresult; static PyObject *__pyx_n_s__is_timestamp_array; static PyObject *__pyx_n_s__isleap; static PyObject *__pyx_n_s__isleap_prev; static PyObject *__pyx_n_s__isleapyear; static PyObject *__pyx_n_s__isoformat; static PyObject *__pyx_n_s__item; static PyObject *__pyx_n_s__iterkeys; static PyObject *__pyx_n_s__ivalue; static PyObject *__pyx_n_s__ivalues; static PyObject *__pyx_n_s__j; static PyObject *__pyx_n_s__join; static PyObject *__pyx_n_s__julian; static PyObject *__pyx_n_s__k; static PyObject *__pyx_n_s__key; static PyObject *__pyx_n_s__kwargs; static PyObject *__pyx_n_s__kwds; static PyObject *__pyx_n_s__l; static PyObject *__pyx_n_s__lang; static PyObject *__pyx_n_s__left; static PyObject *__pyx_n_s__len; static PyObject *__pyx_n_s__loc; static PyObject *__pyx_n_s__locale; static PyObject *__pyx_n_s__locale_time; static PyObject *__pyx_n_s__localize; static PyObject *__pyx_n_s__logical_and; static PyObject *__pyx_n_s__long; static PyObject *__pyx_n_s__lower; static PyObject *__pyx_n_s__m; static PyObject *__pyx_n_s__match; static PyObject *__pyx_n_s__max; static PyObject *__pyx_n_s__maximum; static PyObject *__pyx_n_s__micros; static PyObject *__pyx_n_s__microsecond; static PyObject *__pyx_n_s__microseconds; static PyObject *__pyx_n_s__min; static PyObject *__pyx_n_s__minute; static PyObject *__pyx_n_s__minutes; static PyObject *__pyx_n_s__mo_off; static PyObject *__pyx_n_s__month; static PyObject *__pyx_n_s__month_abbr; static PyObject *__pyx_n_s__month_name; static PyObject *__pyx_n_s__monthrange; static PyObject *__pyx_n_s__months; static PyObject *__pyx_n_s__ms; static PyObject *__pyx_n_s__mus; static PyObject *__pyx_n_s__n; static PyObject *__pyx_n_s__nan; static PyObject *__pyx_n_s__nanos; static PyObject *__pyx_n_s__nanosecond; static PyObject *__pyx_n_s__nat; static PyObject *__pyx_n_s__ndim; static PyObject *__pyx_n_s__new; static PyObject *__pyx_n_s__new_values; static PyObject *__pyx_n_s__no_saving; static PyObject *__pyx_n_s__nonzero; static PyObject *__pyx_n_s__normalize; static PyObject *__pyx_n_s__now; static PyObject *__pyx_n_s__np; static PyObject *__pyx_n_s__np_NaT; static PyObject *__pyx_n_s__ns; static PyObject *__pyx_n_s__ntrans; static PyObject *__pyx_n_s__num; static PyObject *__pyx_n_s__numpy; static PyObject *__pyx_n_s__obj; static PyObject *__pyx_n_s__object; static PyObject *__pyx_n_s__object_state; static PyObject *__pyx_n_s__offset; static PyObject *__pyx_n_s__old; static PyObject *__pyx_n_s__one_diff; static PyObject *__pyx_n_s__ordinal; static PyObject *__pyx_n_s__ordinals; static PyObject *__pyx_n_s__oresult; static PyObject *__pyx_n_s__out; static PyObject *__pyx_n_s__p; static PyObject *__pyx_n_s__parse_code; static PyObject *__pyx_n_s__parse_date; static PyObject *__pyx_n_s__pattern; static PyObject *__pyx_n_s__period_asfreq_arr; static PyObject *__pyx_n_s__period_format; static PyObject *__pyx_n_s__period_ordinal; static PyObject *__pyx_n_s__periodarr; static PyObject *__pyx_n_s__pos; static PyObject *__pyx_n_s__print; static PyObject *__pyx_n_s__processed_format; static PyObject *__pyx_n_s__prop; static PyObject *__pyx_n_s__property; static PyObject *__pyx_n_s__ps; static PyObject *__pyx_n_s__pydt; static PyObject *__pyx_n_s__pydt_to_i8; static PyObject *__pyx_n_s__pytz; static PyObject *__pyx_n_s__q; static PyObject *__pyx_n_s__quarter; static PyObject *__pyx_n_s__raise_; static PyObject *__pyx_n_s__range; static PyObject *__pyx_n_s__ravel; static PyObject *__pyx_n_s__re; static PyObject *__pyx_n_s__re_compile; static PyObject *__pyx_n_s__re_escape; static PyObject *__pyx_n_s__regex; static PyObject *__pyx_n_s__regex_chars; static PyObject *__pyx_n_s__relation; static PyObject *__pyx_n_s__replace; static PyObject *__pyx_n_s__replacement_pairs; static PyObject *__pyx_n_s__repr_timedelta64; static PyObject *__pyx_n_s__result; static PyObject *__pyx_n_s__result_a; static PyObject *__pyx_n_s__result_b; static PyObject *__pyx_n_s__ret; static PyObject *__pyx_n_s__reverse; static PyObject *__pyx_n_s__right; static PyObject *__pyx_n_s__round; static PyObject *__pyx_n_s__s; static PyObject *__pyx_n_s__sa_dtype; static PyObject *__pyx_n_s__searchsorted; static PyObject *__pyx_n_s__second; static PyObject *__pyx_n_s__seconds; static PyObject *__pyx_n_s__seconds_pretty; static PyObject *__pyx_n_s__seen_datetime; static PyObject *__pyx_n_s__seen_integer; static PyObject *__pyx_n_s__self; static PyObject *__pyx_n_s__send; static PyObject *__pyx_n_s__sep; static PyObject *__pyx_n_s__seq; static PyObject *__pyx_n_s__shape; static PyObject *__pyx_n_s__short; static PyObject *__pyx_n_s__short_version; static PyObject *__pyx_n_s__side; static PyObject *__pyx_n_s__sign; static PyObject *__pyx_n_s__sign_pretty; static PyObject *__pyx_n_s__size; static PyObject *__pyx_n_s__sort; static PyObject *__pyx_n_s__sorted; static PyObject *__pyx_n_s__sp; static PyObject *__pyx_n_s__squeeze; static PyObject *__pyx_n_s__stamp; static PyObject *__pyx_n_s__stamps; static PyObject *__pyx_n_s__startswith; static PyObject *__pyx_n_s__state; static PyObject *__pyx_n_s__strftime; static PyObject *__pyx_n_s__struct_time; static PyObject *__pyx_n_s__sub; static PyObject *__pyx_n_s__super; static PyObject *__pyx_n_s__switch_idx; static PyObject *__pyx_n_s__sys; static PyObject *__pyx_n_s__sz; static PyObject *__pyx_n_s__t; static PyObject *__pyx_n_s__table; static PyObject *__pyx_n_s__td; static PyObject *__pyx_n_s__tdata; static PyObject *__pyx_n_s__thread; static PyObject *__pyx_n_s__throw; static PyObject *__pyx_n_s__time; static PyObject *__pyx_n_s__time_tuple; static PyObject *__pyx_n_s__timedelta; static PyObject *__pyx_n_s__timedelta64; static PyObject *__pyx_n_s__timezone; static PyObject *__pyx_n_s__to_convert; static PyObject *__pyx_n_s__to_datetime; static PyObject *__pyx_n_s__to_period; static PyObject *__pyx_n_s__to_pydatetime; static PyObject *__pyx_n_s__today; static PyObject *__pyx_n_s__toordinal; static PyObject *__pyx_n_s__tot_seconds; static PyObject *__pyx_n_s__total_seconds; static PyObject *__pyx_n_s__trans; static PyObject *__pyx_n_s__trans_cache; static PyObject *__pyx_n_s__trans_grp; static PyObject *__pyx_n_s__trans_idx; static PyObject *__pyx_n_s__trans_len; static PyObject *__pyx_n_s__ts; static PyObject *__pyx_n_s__ts_base; static PyObject *__pyx_n_s__ts_input; static PyObject *__pyx_n_s__tso; static PyObject *__pyx_n_s__tz; static PyObject *__pyx_n_s__tz1; static PyObject *__pyx_n_s__tz2; static PyObject *__pyx_n_s__tz_convert; static PyObject *__pyx_n_s__tz_convert_single; static PyObject *__pyx_n_s__tz_localize; static PyObject *__pyx_n_s__tz_localize_to_utc; static PyObject *__pyx_n_s__tz_values; static PyObject *__pyx_n_s__tzinfo; static PyObject *__pyx_n_s__tzlocal; static PyObject *__pyx_n_s__tzname; static PyObject *__pyx_n_s__tzset; static PyObject *__pyx_n_s__tzutc; static PyObject *__pyx_n_s__u; static PyObject *__pyx_n_s__unique_deltas; static PyObject *__pyx_n_s__uniques; static PyObject *__pyx_n_s__unit; static PyObject *__pyx_n_s__us; static PyObject *__pyx_n_s__utc; static PyObject *__pyx_n_s__utc_convert; static PyObject *__pyx_n_s__utc_date; static PyObject *__pyx_n_s__utc_dates; static PyObject *__pyx_n_s__utc_offset_cache; static PyObject *__pyx_n_s__utcnow; static PyObject *__pyx_n_s__utcoffset; static PyObject *__pyx_n_s__v; static PyObject *__pyx_n_s__val; static PyObject *__pyx_n_s__vals; static PyObject *__pyx_n_s__value; static PyObject *__pyx_n_s__values; static PyObject *__pyx_n_s__version; static PyObject *__pyx_n_s__version_info; static PyObject *__pyx_n_s__view; static PyObject *__pyx_n_s__w; static PyObject *__pyx_n_s__warn; static PyObject *__pyx_n_s__week; static PyObject *__pyx_n_s__week_0_length; static PyObject *__pyx_n_s__week_of_year; static PyObject *__pyx_n_s__week_of_year_start; static PyObject *__pyx_n_s__week_starts_Mon; static PyObject *__pyx_n_s__weekday; static PyObject *__pyx_n_s__weekofyear; static PyObject *__pyx_n_s__where; static PyObject *__pyx_n_s__woy; static PyObject *__pyx_n_s__x; static PyObject *__pyx_n_s__y; static PyObject *__pyx_n_s__year; static PyObject *__pyx_n_s__year2000; static PyObject *__pyx_n_s__years; static PyObject *__pyx_n_s__zone; static PyObject *__pyx_int_0; static PyObject *__pyx_int_1; static PyObject *__pyx_int_1L; static PyObject *__pyx_int_2; static PyObject *__pyx_int_3; static PyObject *__pyx_int_4; static PyObject *__pyx_int_5; static PyObject *__pyx_int_6; static PyObject *__pyx_int_7; static PyObject *__pyx_int_8; static PyObject *__pyx_int_9; static PyObject *__pyx_int_neg_1; static PyObject *__pyx_int_neg_6; static PyObject *__pyx_int_01; static PyObject *__pyx_int_10; static PyObject *__pyx_int_11; static PyObject *__pyx_int_12; static PyObject *__pyx_int_13; static PyObject *__pyx_int_14; static PyObject *__pyx_int_15; static PyObject *__pyx_int_16; static PyObject *__pyx_int_17; static PyObject *__pyx_int_18; static PyObject *__pyx_int_22; static PyObject *__pyx_int_24; static PyObject *__pyx_int_31; static PyObject *__pyx_int_44; static PyObject *__pyx_int_55; static PyObject *__pyx_int_59; static PyObject *__pyx_int_60; static PyObject *__pyx_int_76; static PyObject *__pyx_int_90; static PyObject *__pyx_int_91; static PyObject *__pyx_int_120; static PyObject *__pyx_int_121; static PyObject *__pyx_int_151; static PyObject *__pyx_int_152; static PyObject *__pyx_int_181; static PyObject *__pyx_int_182; static PyObject *__pyx_int_212; static PyObject *__pyx_int_213; static PyObject *__pyx_int_243; static PyObject *__pyx_int_244; static PyObject *__pyx_int_273; static PyObject *__pyx_int_274; static PyObject *__pyx_int_304; static PyObject *__pyx_int_305; static PyObject *__pyx_int_334; static PyObject *__pyx_int_335; static PyObject *__pyx_int_365; static PyObject *__pyx_int_366; static PyObject *__pyx_int_1000; static PyObject *__pyx_int_1000L; static PyObject *__pyx_int_1999; static PyObject *__pyx_int_2000; static PyObject *__pyx_int_3600; static PyObject *__pyx_int_6000; static PyObject *__pyx_int_86400; static PyObject *__pyx_int_1000000; static PyObject *__pyx_int_1000000L; static PyObject *__pyx_int_1000000000; static PyObject *__pyx_int_1000000000L; static PyObject *__pyx_int_86400000000000L; static PyObject *__pyx_k_58; static PyObject *__pyx_k_59; static PyObject *__pyx_k_60; static PyObject *__pyx_k_67; static PyObject *__pyx_k_70; static PyObject *__pyx_k_84; static PyObject *__pyx_k_tuple_1; static PyObject *__pyx_k_tuple_3; static PyObject *__pyx_k_tuple_4; static PyObject *__pyx_k_tuple_6; static PyObject *__pyx_k_slice_25; static PyObject *__pyx_k_slice_26; static PyObject *__pyx_k_tuple_15; static PyObject *__pyx_k_tuple_16; static PyObject *__pyx_k_tuple_17; static PyObject *__pyx_k_tuple_19; static PyObject *__pyx_k_tuple_21; static PyObject *__pyx_k_tuple_23; static PyObject *__pyx_k_tuple_32; static PyObject *__pyx_k_tuple_33; static PyObject *__pyx_k_tuple_36; static PyObject *__pyx_k_tuple_37; static PyObject *__pyx_k_tuple_39; static PyObject *__pyx_k_tuple_41; static PyObject *__pyx_k_tuple_43; static PyObject *__pyx_k_tuple_47; static PyObject *__pyx_k_tuple_49; static PyObject *__pyx_k_tuple_51; static PyObject *__pyx_k_tuple_53; static PyObject *__pyx_k_tuple_57; static PyObject *__pyx_k_tuple_61; static PyObject *__pyx_k_tuple_63; static PyObject *__pyx_k_tuple_66; static PyObject *__pyx_k_tuple_69; static PyObject *__pyx_k_tuple_71; static PyObject *__pyx_k_tuple_73; static PyObject *__pyx_k_tuple_76; static PyObject *__pyx_k_tuple_77; static PyObject *__pyx_k_tuple_89; static PyObject *__pyx_k_tuple_90; static PyObject *__pyx_k_tuple_93; static PyObject *__pyx_k_tuple_96; static PyObject *__pyx_k_tuple_97; static PyObject *__pyx_k_tuple_99; static PyObject *__pyx_k_slice_212; static PyObject *__pyx_k_slice_213; static PyObject *__pyx_k_tuple_100; static PyObject *__pyx_k_tuple_101; static PyObject *__pyx_k_tuple_102; static PyObject *__pyx_k_tuple_104; static PyObject *__pyx_k_tuple_106; static PyObject *__pyx_k_tuple_111; static PyObject *__pyx_k_tuple_112; static PyObject *__pyx_k_tuple_113; static PyObject *__pyx_k_tuple_114; static PyObject *__pyx_k_tuple_115; static PyObject *__pyx_k_tuple_116; static PyObject *__pyx_k_tuple_117; static PyObject *__pyx_k_tuple_120; static PyObject *__pyx_k_tuple_122; static PyObject *__pyx_k_tuple_124; static PyObject *__pyx_k_tuple_126; static PyObject *__pyx_k_tuple_140; static PyObject *__pyx_k_tuple_142; static PyObject *__pyx_k_tuple_148; static PyObject *__pyx_k_tuple_157; static PyObject *__pyx_k_tuple_158; static PyObject *__pyx_k_tuple_159; static PyObject *__pyx_k_tuple_161; static PyObject *__pyx_k_tuple_162; static PyObject *__pyx_k_tuple_167; static PyObject *__pyx_k_tuple_172; static PyObject *__pyx_k_tuple_174; static PyObject *__pyx_k_tuple_176; static PyObject *__pyx_k_tuple_178; static PyObject *__pyx_k_tuple_180; static PyObject *__pyx_k_tuple_182; static PyObject *__pyx_k_tuple_183; static PyObject *__pyx_k_tuple_185; static PyObject *__pyx_k_tuple_186; static PyObject *__pyx_k_tuple_188; static PyObject *__pyx_k_tuple_190; static PyObject *__pyx_k_tuple_192; static PyObject *__pyx_k_tuple_193; static PyObject *__pyx_k_tuple_194; static PyObject *__pyx_k_tuple_195; static PyObject *__pyx_k_tuple_196; static PyObject *__pyx_k_tuple_197; static PyObject *__pyx_k_tuple_214; static PyObject *__pyx_k_tuple_215; static PyObject *__pyx_k_tuple_220; static PyObject *__pyx_k_tuple_223; static PyObject *__pyx_k_tuple_224; static PyObject *__pyx_k_tuple_228; static PyObject *__pyx_k_tuple_229; static PyObject *__pyx_k_tuple_231; static PyObject *__pyx_k_tuple_233; static PyObject *__pyx_k_tuple_235; static PyObject *__pyx_k_tuple_238; static PyObject *__pyx_k_tuple_239; static PyObject *__pyx_k_tuple_241; static PyObject *__pyx_k_tuple_247; static PyObject *__pyx_k_tuple_248; static PyObject *__pyx_k_tuple_249; static PyObject *__pyx_k_tuple_254; static PyObject *__pyx_k_tuple_256; static PyObject *__pyx_k_tuple_258; static PyObject *__pyx_k_tuple_259; static PyObject *__pyx_k_tuple_261; static PyObject *__pyx_k_tuple_263; static PyObject *__pyx_k_tuple_265; static PyObject *__pyx_k_tuple_267; static PyObject *__pyx_k_tuple_270; static PyObject *__pyx_k_tuple_273; static PyObject *__pyx_k_tuple_275; static PyObject *__pyx_k_tuple_277; static PyObject *__pyx_k_tuple_280; static PyObject *__pyx_k_tuple_283; static PyObject *__pyx_k_tuple_286; static PyObject *__pyx_k_tuple_289; static PyObject *__pyx_k_tuple_292; static PyObject *__pyx_k_tuple_295; static PyObject *__pyx_k_tuple_298; static PyObject *__pyx_k_tuple_301; static PyObject *__pyx_k_tuple_303; static PyObject *__pyx_k_tuple_305; static PyObject *__pyx_k_tuple_308; static PyObject *__pyx_k_tuple_311; static PyObject *__pyx_k_tuple_314; static PyObject *__pyx_k_tuple_317; static PyObject *__pyx_k_tuple_320; static PyObject *__pyx_k_tuple_323; static PyObject *__pyx_k_tuple_326; static PyObject *__pyx_k_tuple_329; static PyObject *__pyx_k_tuple_332; static PyObject *__pyx_k_tuple_335; static PyObject *__pyx_k_tuple_337; static PyObject *__pyx_k_tuple_339; static PyObject *__pyx_k_tuple_343; static PyObject *__pyx_k_tuple_346; static PyObject *__pyx_k_tuple_349; static PyObject *__pyx_k_tuple_352; static PyObject *__pyx_k_tuple_355; static PyObject *__pyx_k_tuple_358; static PyObject *__pyx_k_tuple_363; static PyObject *__pyx_k_tuple_365; static PyObject *__pyx_k_tuple_367; static PyObject *__pyx_k_tuple_369; static PyObject *__pyx_k_tuple_371; static PyObject *__pyx_k_tuple_373; static PyObject *__pyx_k_tuple_376; static PyObject *__pyx_k_tuple_378; static PyObject *__pyx_k_tuple_380; static PyObject *__pyx_k_tuple_382; static PyObject *__pyx_k_tuple_385; static PyObject *__pyx_k_tuple_388; static PyObject *__pyx_k_tuple_390; static PyObject *__pyx_k_tuple_392; static PyObject *__pyx_k_tuple_394; static PyObject *__pyx_k_tuple_396; static PyObject *__pyx_k_tuple_398; static PyObject *__pyx_k_tuple_400; static PyObject *__pyx_k_tuple_402; static PyObject *__pyx_k_tuple_404; static PyObject *__pyx_k_tuple_406; static PyObject *__pyx_k_tuple_408; static PyObject *__pyx_k_tuple_410; static PyObject *__pyx_k_tuple_412; static PyObject *__pyx_k_tuple_414; static PyObject *__pyx_k_tuple_416; static PyObject *__pyx_k_tuple_418; static PyObject *__pyx_k_tuple_420; static PyObject *__pyx_k_tuple_422; static PyObject *__pyx_k_tuple_424; static PyObject *__pyx_k_tuple_427; static PyObject *__pyx_k_tuple_430; static PyObject *__pyx_k_tuple_432; static PyObject *__pyx_k_tuple_434; static PyObject *__pyx_k_tuple_438; static PyObject *__pyx_k_tuple_441; static PyObject *__pyx_k_tuple_444; static PyObject *__pyx_k_tuple_447; static PyObject *__pyx_k_tuple_450; static PyObject *__pyx_k_tuple_453; static PyObject *__pyx_k_tuple_454; static PyObject *__pyx_k_tuple_456; static PyObject *__pyx_k_tuple_459; static PyObject *__pyx_k_tuple_463; static PyObject *__pyx_k_tuple_466; static PyObject *__pyx_k_tuple_469; static PyObject *__pyx_k_tuple_472; static PyObject *__pyx_k_tuple_475; static PyObject *__pyx_k_tuple_478; static PyObject *__pyx_k_tuple_481; static PyObject *__pyx_k_tuple_485; static PyObject *__pyx_k_tuple_487; static PyObject *__pyx_k_tuple_489; static PyObject *__pyx_k_tuple_493; static PyObject *__pyx_k_tuple_496; static PyObject *__pyx_k_tuple_500; static PyObject *__pyx_k_codeobj_250; static PyObject *__pyx_k_codeobj_255; static PyObject *__pyx_k_codeobj_257; static PyObject *__pyx_k_codeobj_260; static PyObject *__pyx_k_codeobj_264; static PyObject *__pyx_k_codeobj_268; static PyObject *__pyx_k_codeobj_271; static PyObject *__pyx_k_codeobj_274; static PyObject *__pyx_k_codeobj_278; static PyObject *__pyx_k_codeobj_281; static PyObject *__pyx_k_codeobj_284; static PyObject *__pyx_k_codeobj_287; static PyObject *__pyx_k_codeobj_290; static PyObject *__pyx_k_codeobj_293; static PyObject *__pyx_k_codeobj_296; static PyObject *__pyx_k_codeobj_299; static PyObject *__pyx_k_codeobj_302; static PyObject *__pyx_k_codeobj_306; static PyObject *__pyx_k_codeobj_309; static PyObject *__pyx_k_codeobj_312; static PyObject *__pyx_k_codeobj_315; static PyObject *__pyx_k_codeobj_318; static PyObject *__pyx_k_codeobj_321; static PyObject *__pyx_k_codeobj_324; static PyObject *__pyx_k_codeobj_327; static PyObject *__pyx_k_codeobj_330; static PyObject *__pyx_k_codeobj_333; static PyObject *__pyx_k_codeobj_336; static PyObject *__pyx_k_codeobj_340; static PyObject *__pyx_k_codeobj_344; static PyObject *__pyx_k_codeobj_347; static PyObject *__pyx_k_codeobj_350; static PyObject *__pyx_k_codeobj_353; static PyObject *__pyx_k_codeobj_356; static PyObject *__pyx_k_codeobj_359; static PyObject *__pyx_k_codeobj_364; static PyObject *__pyx_k_codeobj_366; static PyObject *__pyx_k_codeobj_368; static PyObject *__pyx_k_codeobj_370; static PyObject *__pyx_k_codeobj_372; static PyObject *__pyx_k_codeobj_374; static PyObject *__pyx_k_codeobj_377; static PyObject *__pyx_k_codeobj_379; static PyObject *__pyx_k_codeobj_381; static PyObject *__pyx_k_codeobj_383; static PyObject *__pyx_k_codeobj_386; static PyObject *__pyx_k_codeobj_389; static PyObject *__pyx_k_codeobj_391; static PyObject *__pyx_k_codeobj_393; static PyObject *__pyx_k_codeobj_395; static PyObject *__pyx_k_codeobj_397; static PyObject *__pyx_k_codeobj_399; static PyObject *__pyx_k_codeobj_401; static PyObject *__pyx_k_codeobj_403; static PyObject *__pyx_k_codeobj_405; static PyObject *__pyx_k_codeobj_407; static PyObject *__pyx_k_codeobj_409; static PyObject *__pyx_k_codeobj_411; static PyObject *__pyx_k_codeobj_413; static PyObject *__pyx_k_codeobj_415; static PyObject *__pyx_k_codeobj_417; static PyObject *__pyx_k_codeobj_419; static PyObject *__pyx_k_codeobj_421; static PyObject *__pyx_k_codeobj_423; static PyObject *__pyx_k_codeobj_425; static PyObject *__pyx_k_codeobj_428; static PyObject *__pyx_k_codeobj_431; static PyObject *__pyx_k_codeobj_433; static PyObject *__pyx_k_codeobj_435; static PyObject *__pyx_k_codeobj_455; static PyObject *__pyx_k_codeobj_457; static PyObject *__pyx_k_codeobj_460; static PyObject *__pyx_k_codeobj_462; static PyObject *__pyx_k_codeobj_464; static PyObject *__pyx_k_codeobj_467; static PyObject *__pyx_k_codeobj_470; static PyObject *__pyx_k_codeobj_473; static PyObject *__pyx_k_codeobj_476; static PyObject *__pyx_k_codeobj_479; static PyObject *__pyx_k_codeobj_482; static PyObject *__pyx_k_codeobj_486; static PyObject *__pyx_k_codeobj_490; static PyObject *__pyx_k_codeobj_494; static PyObject *__pyx_k_codeobj_497; static PyObject *__pyx_k_codeobj_501; /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5tslib_100lambda1(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5tslib_100lambda1 = {__Pyx_NAMESTR("lambda1"), (PyCFunction)__pyx_pw_6pandas_5tslib_100lambda1, METH_O, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5tslib_100lambda1(PyObject *__pyx_self, PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("lambda1 (wrapper)", 0); __pyx_r = __pyx_lambda_funcdef_6pandas_5tslib_lambda1(__pyx_self, ((PyObject *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/tslib.pyx":420 * 'week', 'dayofyear'] * for field in fields: * prop = property(fget=lambda self: -1) # <<<<<<<<<<<<<< * setattr(NaTType, field, prop) * */ static PyObject *__pyx_lambda_funcdef_6pandas_5tslib_lambda1(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("lambda1", 0); __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_int_neg_1); __pyx_r = __pyx_int_neg_1; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5tslib_1ints_to_pydatetime(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5tslib_1ints_to_pydatetime = {__Pyx_NAMESTR("ints_to_pydatetime"), (PyCFunction)__pyx_pw_6pandas_5tslib_1ints_to_pydatetime, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5tslib_1ints_to_pydatetime(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_arr = 0; PyObject *__pyx_v_tz = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("ints_to_pydatetime (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__arr,&__pyx_n_s__tz,0}; PyObject* values[2] = {0,0}; /* "pandas/tslib.pyx":73 * basestring = str * * def ints_to_pydatetime(ndarray[int64_t] arr, tz=None): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = len(arr) */ values[1] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__arr)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__tz); if (value) { values[1] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "ints_to_pydatetime") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 73; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_arr = ((PyArrayObject *)values[0]); __pyx_v_tz = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("ints_to_pydatetime", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 73; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.tslib.ints_to_pydatetime", __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_filename = __pyx_f[0]; __pyx_lineno = 73; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5tslib_ints_to_pydatetime(__pyx_self, __pyx_v_arr, __pyx_v_tz); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5tslib_ints_to_pydatetime(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_arr, PyObject *__pyx_v_tz) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_n; pandas_datetimestruct __pyx_v_dts; PyArrayObject *__pyx_v_result = 0; PyDateTime_DateTime *__pyx_v_dt = NULL; PyObject *__pyx_v_trans = NULL; PyObject *__pyx_v_deltas = NULL; PyObject *__pyx_v_pos = NULL; PyObject *__pyx_v_inf = NULL; __Pyx_LocalBuf_ND __pyx_pybuffernd_arr; __Pyx_Buffer __pyx_pybuffer_arr; __Pyx_LocalBuf_ND __pyx_pybuffernd_result; __Pyx_Buffer __pyx_pybuffer_result; 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; PyArrayObject *__pyx_t_6 = NULL; int __pyx_t_7; int __pyx_t_8; Py_ssize_t __pyx_t_9; Py_ssize_t __pyx_t_10; int __pyx_t_11; Py_ssize_t __pyx_t_12; PyObject **__pyx_t_13; Py_ssize_t __pyx_t_14; PyObject *__pyx_t_15 = NULL; PyObject *__pyx_t_16 = NULL; PyObject *__pyx_t_17 = NULL; PyObject *__pyx_t_18 = NULL; Py_ssize_t __pyx_t_19; int __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; npy_datetime __pyx_t_29; PyObject *__pyx_t_30 = NULL; 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("ints_to_pydatetime", 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_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_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 73; __pyx_clineno = __LINE__; goto __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/tslib.pyx":75 * def ints_to_pydatetime(ndarray[int64_t] arr, tz=None): * cdef: * Py_ssize_t i, n = len(arr) # <<<<<<<<<<<<<< * pandas_datetimestruct dts * ndarray[object] result = np.empty(n, dtype=object) */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_arr)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 75; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/tslib.pyx":77 * Py_ssize_t i, n = len(arr) * pandas_datetimestruct dts * ndarray[object] result = np.empty(n, dtype=object) # <<<<<<<<<<<<<< * * if tz is not None: */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 77; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 77; __pyx_clineno = __LINE__; goto __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_n); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 77; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 77; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 77; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_2)); if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__dtype), __pyx_builtin_object) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 77; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_5 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 77; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 77; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_6 = ((PyArrayObject *)__pyx_t_5); { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { __pyx_v_result = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_result.rcbuffer->pybuffer.buf = NULL; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 77; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } else {__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]; } } __pyx_t_6 = 0; __pyx_v_result = ((PyArrayObject *)__pyx_t_5); __pyx_t_5 = 0; /* "pandas/tslib.pyx":79 * ndarray[object] result = np.empty(n, dtype=object) * * if tz is not None: # <<<<<<<<<<<<<< * if _is_utc(tz): * for i in range(n): */ __pyx_t_7 = (__pyx_v_tz != Py_None); __pyx_t_8 = (__pyx_t_7 != 0); if (__pyx_t_8) { /* "pandas/tslib.pyx":80 * * if tz is not None: * if _is_utc(tz): # <<<<<<<<<<<<<< * for i in range(n): * if arr[i] == iNaT: */ __pyx_t_8 = (__pyx_f_6pandas_5tslib__is_utc(__pyx_v_tz) != 0); if (__pyx_t_8) { /* "pandas/tslib.pyx":81 * if tz is not None: * if _is_utc(tz): * for i in range(n): # <<<<<<<<<<<<<< * if arr[i] == iNaT: * result[i] = np.nan */ __pyx_t_1 = __pyx_v_n; for (__pyx_t_9 = 0; __pyx_t_9 < __pyx_t_1; __pyx_t_9+=1) { __pyx_v_i = __pyx_t_9; /* "pandas/tslib.pyx":82 * if _is_utc(tz): * for i in range(n): * if arr[i] == iNaT: # <<<<<<<<<<<<<< * result[i] = np.nan * else: */ __pyx_t_10 = __pyx_v_i; __pyx_t_11 = -1; if (__pyx_t_10 < 0) { __pyx_t_10 += __pyx_pybuffernd_arr.diminfo[0].shape; if (unlikely(__pyx_t_10 < 0)) __pyx_t_11 = 0; } else if (unlikely(__pyx_t_10 >= __pyx_pybuffernd_arr.diminfo[0].shape)) __pyx_t_11 = 0; if (unlikely(__pyx_t_11 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_11); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_5 = __Pyx_PyInt_to_py_npy_int64((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_arr.rcbuffer->pybuffer.buf, __pyx_t_10, __pyx_pybuffernd_arr.diminfo[0].strides))); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__iNaT); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = PyObject_RichCompare(__pyx_t_5, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_8) { /* "pandas/tslib.pyx":83 * for i in range(n): * if arr[i] == iNaT: * result[i] = np.nan # <<<<<<<<<<<<<< * else: * pandas_datetime_to_datetimestruct(arr[i], PANDAS_FR_ns, &dts) */ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s__nan); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_12 = __pyx_v_i; __pyx_t_11 = -1; if (__pyx_t_12 < 0) { __pyx_t_12 += __pyx_pybuffernd_result.diminfo[0].shape; if (unlikely(__pyx_t_12 < 0)) __pyx_t_11 = 0; } else if (unlikely(__pyx_t_12 >= __pyx_pybuffernd_result.diminfo[0].shape)) __pyx_t_11 = 0; if (unlikely(__pyx_t_11 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_11); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_13 = __Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_12, __pyx_pybuffernd_result.diminfo[0].strides); __Pyx_GOTREF(*__pyx_t_13); __Pyx_INCREF(__pyx_t_2); __Pyx_DECREF(*__pyx_t_13); *__pyx_t_13 = __pyx_t_2; __Pyx_GIVEREF(*__pyx_t_13); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; goto __pyx_L7; } /*else*/ { /* "pandas/tslib.pyx":85 * result[i] = np.nan * else: * pandas_datetime_to_datetimestruct(arr[i], PANDAS_FR_ns, &dts) # <<<<<<<<<<<<<< * result[i] = datetime(dts.year, dts.month, dts.day, dts.hour, * dts.min, dts.sec, dts.us, tz) */ __pyx_t_14 = __pyx_v_i; __pyx_t_11 = -1; if (__pyx_t_14 < 0) { __pyx_t_14 += __pyx_pybuffernd_arr.diminfo[0].shape; if (unlikely(__pyx_t_14 < 0)) __pyx_t_11 = 0; } else if (unlikely(__pyx_t_14 >= __pyx_pybuffernd_arr.diminfo[0].shape)) __pyx_t_11 = 0; if (unlikely(__pyx_t_11 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_11); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } pandas_datetime_to_datetimestruct((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_arr.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_arr.diminfo[0].strides)), PANDAS_FR_ns, (&__pyx_v_dts)); /* "pandas/tslib.pyx":86 * else: * pandas_datetime_to_datetimestruct(arr[i], PANDAS_FR_ns, &dts) * result[i] = datetime(dts.year, dts.month, dts.day, dts.hour, # <<<<<<<<<<<<<< * dts.min, dts.sec, dts.us, tz) * elif _is_tzlocal(tz) or _is_fixed_offset(tz): */ __pyx_t_2 = __Pyx_PyInt_to_py_npy_int64(__pyx_v_dts.year); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 86; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_PyInt_to_py_npy_int32(__pyx_v_dts.month); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 86; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyInt_to_py_npy_int32(__pyx_v_dts.day); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 86; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = __Pyx_PyInt_to_py_npy_int32(__pyx_v_dts.hour); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 86; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); /* "pandas/tslib.pyx":87 * pandas_datetime_to_datetimestruct(arr[i], PANDAS_FR_ns, &dts) * result[i] = datetime(dts.year, dts.month, dts.day, dts.hour, * dts.min, dts.sec, dts.us, tz) # <<<<<<<<<<<<<< * elif _is_tzlocal(tz) or _is_fixed_offset(tz): * for i in range(n): */ __pyx_t_15 = __Pyx_PyInt_to_py_npy_int32(__pyx_v_dts.min); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 87; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_15); __pyx_t_16 = __Pyx_PyInt_to_py_npy_int32(__pyx_v_dts.sec); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 87; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_16); __pyx_t_17 = __Pyx_PyInt_to_py_npy_int32(__pyx_v_dts.us); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 87; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_17); __pyx_t_18 = PyTuple_New(8); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 86; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); PyTuple_SET_ITEM(__pyx_t_18, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_18, 1, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_18, 2, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_18, 3, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_18, 4, __pyx_t_15); __Pyx_GIVEREF(__pyx_t_15); PyTuple_SET_ITEM(__pyx_t_18, 5, __pyx_t_16); __Pyx_GIVEREF(__pyx_t_16); PyTuple_SET_ITEM(__pyx_t_18, 6, __pyx_t_17); __Pyx_GIVEREF(__pyx_t_17); __Pyx_INCREF(__pyx_v_tz); PyTuple_SET_ITEM(__pyx_t_18, 7, __pyx_v_tz); __Pyx_GIVEREF(__pyx_v_tz); __pyx_t_2 = 0; __pyx_t_4 = 0; __pyx_t_5 = 0; __pyx_t_3 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_17 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_8datetime_datetime)), ((PyObject *)__pyx_t_18), NULL); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 86; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_17); __Pyx_DECREF(((PyObject *)__pyx_t_18)); __pyx_t_18 = 0; /* "pandas/tslib.pyx":86 * else: * pandas_datetime_to_datetimestruct(arr[i], PANDAS_FR_ns, &dts) * result[i] = datetime(dts.year, dts.month, dts.day, dts.hour, # <<<<<<<<<<<<<< * dts.min, dts.sec, dts.us, tz) * elif _is_tzlocal(tz) or _is_fixed_offset(tz): */ __pyx_t_19 = __pyx_v_i; __pyx_t_11 = -1; if (__pyx_t_19 < 0) { __pyx_t_19 += __pyx_pybuffernd_result.diminfo[0].shape; if (unlikely(__pyx_t_19 < 0)) __pyx_t_11 = 0; } else if (unlikely(__pyx_t_19 >= __pyx_pybuffernd_result.diminfo[0].shape)) __pyx_t_11 = 0; if (unlikely(__pyx_t_11 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_11); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 86; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_13 = __Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_result.diminfo[0].strides); __Pyx_GOTREF(*__pyx_t_13); __Pyx_INCREF(__pyx_t_17); __Pyx_DECREF(*__pyx_t_13); *__pyx_t_13 = __pyx_t_17; __Pyx_GIVEREF(*__pyx_t_13); __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; } __pyx_L7:; } goto __pyx_L4; } /* "pandas/tslib.pyx":88 * result[i] = datetime(dts.year, dts.month, dts.day, dts.hour, * dts.min, dts.sec, dts.us, tz) * elif _is_tzlocal(tz) or _is_fixed_offset(tz): # <<<<<<<<<<<<<< * for i in range(n): * if arr[i] == iNaT: */ __pyx_t_17 = __Pyx_GetModuleGlobalName(__pyx_n_s___is_tzlocal); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_17); __pyx_t_18 = PyTuple_New(1); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); __Pyx_INCREF(__pyx_v_tz); PyTuple_SET_ITEM(__pyx_t_18, 0, __pyx_v_tz); __Pyx_GIVEREF(__pyx_v_tz); __pyx_t_16 = PyObject_Call(__pyx_t_17, ((PyObject *)__pyx_t_18), NULL); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_16); __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_18)); __pyx_t_18 = 0; __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_16); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; if (!__pyx_t_8) { __pyx_t_16 = __Pyx_GetModuleGlobalName(__pyx_n_s___is_fixed_offset); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_16); __pyx_t_18 = PyTuple_New(1); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); __Pyx_INCREF(__pyx_v_tz); PyTuple_SET_ITEM(__pyx_t_18, 0, __pyx_v_tz); __Pyx_GIVEREF(__pyx_v_tz); __pyx_t_17 = PyObject_Call(__pyx_t_16, ((PyObject *)__pyx_t_18), NULL); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_17); __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_18)); __pyx_t_18 = 0; __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_17); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; __pyx_t_20 = __pyx_t_7; } else { __pyx_t_20 = __pyx_t_8; } if (__pyx_t_20) { /* "pandas/tslib.pyx":89 * dts.min, dts.sec, dts.us, tz) * elif _is_tzlocal(tz) or _is_fixed_offset(tz): * for i in range(n): # <<<<<<<<<<<<<< * if arr[i] == iNaT: * result[i] = np.nan */ __pyx_t_1 = __pyx_v_n; for (__pyx_t_9 = 0; __pyx_t_9 < __pyx_t_1; __pyx_t_9+=1) { __pyx_v_i = __pyx_t_9; /* "pandas/tslib.pyx":90 * elif _is_tzlocal(tz) or _is_fixed_offset(tz): * for i in range(n): * if arr[i] == iNaT: # <<<<<<<<<<<<<< * result[i] = np.nan * else: */ __pyx_t_21 = __pyx_v_i; __pyx_t_11 = -1; if (__pyx_t_21 < 0) { __pyx_t_21 += __pyx_pybuffernd_arr.diminfo[0].shape; if (unlikely(__pyx_t_21 < 0)) __pyx_t_11 = 0; } else if (unlikely(__pyx_t_21 >= __pyx_pybuffernd_arr.diminfo[0].shape)) __pyx_t_11 = 0; if (unlikely(__pyx_t_11 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_11); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 90; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_17 = __Pyx_PyInt_to_py_npy_int64((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_arr.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_arr.diminfo[0].strides))); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 90; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_17); __pyx_t_18 = __Pyx_GetModuleGlobalName(__pyx_n_s__iNaT); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 90; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); __pyx_t_16 = PyObject_RichCompare(__pyx_t_17, __pyx_t_18, Py_EQ); __Pyx_XGOTREF(__pyx_t_16); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 90; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; __pyx_t_20 = __Pyx_PyObject_IsTrue(__pyx_t_16); if (unlikely(__pyx_t_20 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 90; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; if (__pyx_t_20) { /* "pandas/tslib.pyx":91 * for i in range(n): * if arr[i] == iNaT: * result[i] = np.nan # <<<<<<<<<<<<<< * else: * pandas_datetime_to_datetimestruct(arr[i], PANDAS_FR_ns, &dts) */ __pyx_t_16 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 91; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_16); __pyx_t_18 = __Pyx_PyObject_GetAttrStr(__pyx_t_16, __pyx_n_s__nan); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 91; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; __pyx_t_22 = __pyx_v_i; __pyx_t_11 = -1; if (__pyx_t_22 < 0) { __pyx_t_22 += __pyx_pybuffernd_result.diminfo[0].shape; if (unlikely(__pyx_t_22 < 0)) __pyx_t_11 = 0; } else if (unlikely(__pyx_t_22 >= __pyx_pybuffernd_result.diminfo[0].shape)) __pyx_t_11 = 0; if (unlikely(__pyx_t_11 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_11); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 91; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_13 = __Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_22, __pyx_pybuffernd_result.diminfo[0].strides); __Pyx_GOTREF(*__pyx_t_13); __Pyx_INCREF(__pyx_t_18); __Pyx_DECREF(*__pyx_t_13); *__pyx_t_13 = __pyx_t_18; __Pyx_GIVEREF(*__pyx_t_13); __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; goto __pyx_L10; } /*else*/ { /* "pandas/tslib.pyx":93 * result[i] = np.nan * else: * pandas_datetime_to_datetimestruct(arr[i], PANDAS_FR_ns, &dts) # <<<<<<<<<<<<<< * dt = datetime(dts.year, dts.month, dts.day, dts.hour, * dts.min, dts.sec, dts.us, tz) */ __pyx_t_23 = __pyx_v_i; __pyx_t_11 = -1; if (__pyx_t_23 < 0) { __pyx_t_23 += __pyx_pybuffernd_arr.diminfo[0].shape; if (unlikely(__pyx_t_23 < 0)) __pyx_t_11 = 0; } else if (unlikely(__pyx_t_23 >= __pyx_pybuffernd_arr.diminfo[0].shape)) __pyx_t_11 = 0; if (unlikely(__pyx_t_11 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_11); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 93; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } pandas_datetime_to_datetimestruct((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_arr.rcbuffer->pybuffer.buf, __pyx_t_23, __pyx_pybuffernd_arr.diminfo[0].strides)), PANDAS_FR_ns, (&__pyx_v_dts)); /* "pandas/tslib.pyx":94 * else: * pandas_datetime_to_datetimestruct(arr[i], PANDAS_FR_ns, &dts) * dt = datetime(dts.year, dts.month, dts.day, dts.hour, # <<<<<<<<<<<<<< * dts.min, dts.sec, dts.us, tz) * result[i] = dt + tz.utcoffset(dt) */ __pyx_t_18 = __Pyx_PyInt_to_py_npy_int64(__pyx_v_dts.year); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 94; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); __pyx_t_16 = __Pyx_PyInt_to_py_npy_int32(__pyx_v_dts.month); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 94; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_16); __pyx_t_17 = __Pyx_PyInt_to_py_npy_int32(__pyx_v_dts.day); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 94; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_17); __pyx_t_15 = __Pyx_PyInt_to_py_npy_int32(__pyx_v_dts.hour); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 94; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_15); /* "pandas/tslib.pyx":95 * pandas_datetime_to_datetimestruct(arr[i], PANDAS_FR_ns, &dts) * dt = datetime(dts.year, dts.month, dts.day, dts.hour, * dts.min, dts.sec, dts.us, tz) # <<<<<<<<<<<<<< * result[i] = dt + tz.utcoffset(dt) * else: */ __pyx_t_3 = __Pyx_PyInt_to_py_npy_int32(__pyx_v_dts.min); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 95; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = __Pyx_PyInt_to_py_npy_int32(__pyx_v_dts.sec); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 95; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = __Pyx_PyInt_to_py_npy_int32(__pyx_v_dts.us); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 95; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_2 = PyTuple_New(8); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 94; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_18); __Pyx_GIVEREF(__pyx_t_18); PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_16); __Pyx_GIVEREF(__pyx_t_16); PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_t_17); __Pyx_GIVEREF(__pyx_t_17); PyTuple_SET_ITEM(__pyx_t_2, 3, __pyx_t_15); __Pyx_GIVEREF(__pyx_t_15); PyTuple_SET_ITEM(__pyx_t_2, 4, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_2, 5, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_2, 6, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __Pyx_INCREF(__pyx_v_tz); PyTuple_SET_ITEM(__pyx_t_2, 7, __pyx_v_tz); __Pyx_GIVEREF(__pyx_v_tz); __pyx_t_18 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_15 = 0; __pyx_t_3 = 0; __pyx_t_5 = 0; __pyx_t_4 = 0; __pyx_t_4 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_8datetime_datetime)), ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 94; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __Pyx_XDECREF_SET(__pyx_v_dt, ((PyDateTime_DateTime *)__pyx_t_4)); __pyx_t_4 = 0; /* "pandas/tslib.pyx":96 * dt = datetime(dts.year, dts.month, dts.day, dts.hour, * dts.min, dts.sec, dts.us, tz) * result[i] = dt + tz.utcoffset(dt) # <<<<<<<<<<<<<< * else: * trans = _get_transitions(tz) */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_tz, __pyx_n_s__utcoffset); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 96; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 96; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(((PyObject *)__pyx_v_dt)); PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_dt)); __Pyx_GIVEREF(((PyObject *)__pyx_v_dt)); __pyx_t_5 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 96; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __pyx_t_2 = PyNumber_Add(((PyObject *)__pyx_v_dt), __pyx_t_5); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 96; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_24 = __pyx_v_i; __pyx_t_11 = -1; if (__pyx_t_24 < 0) { __pyx_t_24 += __pyx_pybuffernd_result.diminfo[0].shape; if (unlikely(__pyx_t_24 < 0)) __pyx_t_11 = 0; } else if (unlikely(__pyx_t_24 >= __pyx_pybuffernd_result.diminfo[0].shape)) __pyx_t_11 = 0; if (unlikely(__pyx_t_11 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_11); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 96; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_13 = __Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_24, __pyx_pybuffernd_result.diminfo[0].strides); __Pyx_GOTREF(*__pyx_t_13); __Pyx_INCREF(__pyx_t_2); __Pyx_DECREF(*__pyx_t_13); *__pyx_t_13 = __pyx_t_2; __Pyx_GIVEREF(*__pyx_t_13); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } __pyx_L10:; } goto __pyx_L4; } /*else*/ { /* "pandas/tslib.pyx":98 * result[i] = dt + tz.utcoffset(dt) * else: * trans = _get_transitions(tz) # <<<<<<<<<<<<<< * deltas = _get_deltas(tz) * for i in range(n): */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s___get_transitions); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 98; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 98; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_v_tz); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_tz); __Pyx_GIVEREF(__pyx_v_tz); __pyx_t_4 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 98; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; __pyx_v_trans = __pyx_t_4; __pyx_t_4 = 0; /* "pandas/tslib.pyx":99 * else: * trans = _get_transitions(tz) * deltas = _get_deltas(tz) # <<<<<<<<<<<<<< * for i in range(n): * */ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s___get_deltas); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 99; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 99; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_v_tz); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_tz); __Pyx_GIVEREF(__pyx_v_tz); __pyx_t_2 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 99; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; __pyx_v_deltas = __pyx_t_2; __pyx_t_2 = 0; /* "pandas/tslib.pyx":100 * trans = _get_transitions(tz) * deltas = _get_deltas(tz) * for i in range(n): # <<<<<<<<<<<<<< * * if arr[i] == iNaT: */ __pyx_t_1 = __pyx_v_n; for (__pyx_t_9 = 0; __pyx_t_9 < __pyx_t_1; __pyx_t_9+=1) { __pyx_v_i = __pyx_t_9; /* "pandas/tslib.pyx":102 * for i in range(n): * * if arr[i] == iNaT: # <<<<<<<<<<<<<< * result[i] = np.nan * else: */ __pyx_t_25 = __pyx_v_i; __pyx_t_11 = -1; if (__pyx_t_25 < 0) { __pyx_t_25 += __pyx_pybuffernd_arr.diminfo[0].shape; if (unlikely(__pyx_t_25 < 0)) __pyx_t_11 = 0; } else if (unlikely(__pyx_t_25 >= __pyx_pybuffernd_arr.diminfo[0].shape)) __pyx_t_11 = 0; if (unlikely(__pyx_t_11 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_11); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_2 = __Pyx_PyInt_to_py_npy_int64((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_arr.rcbuffer->pybuffer.buf, __pyx_t_25, __pyx_pybuffernd_arr.diminfo[0].strides))); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s__iNaT); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = PyObject_RichCompare(__pyx_t_2, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_20 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_20 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_20) { /* "pandas/tslib.pyx":103 * * if arr[i] == iNaT: * result[i] = np.nan # <<<<<<<<<<<<<< * else: * */ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s__nan); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_26 = __pyx_v_i; __pyx_t_11 = -1; if (__pyx_t_26 < 0) { __pyx_t_26 += __pyx_pybuffernd_result.diminfo[0].shape; if (unlikely(__pyx_t_26 < 0)) __pyx_t_11 = 0; } else if (unlikely(__pyx_t_26 >= __pyx_pybuffernd_result.diminfo[0].shape)) __pyx_t_11 = 0; if (unlikely(__pyx_t_11 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_11); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_13 = __Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_26, __pyx_pybuffernd_result.diminfo[0].strides); __Pyx_GOTREF(*__pyx_t_13); __Pyx_INCREF(__pyx_t_5); __Pyx_DECREF(*__pyx_t_13); *__pyx_t_13 = __pyx_t_5; __Pyx_GIVEREF(*__pyx_t_13); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; goto __pyx_L13; } /*else*/ { /* "pandas/tslib.pyx":107 * * # Adjust datetime64 timestamp, recompute datetimestruct * pos = trans.searchsorted(arr[i]) - 1 # <<<<<<<<<<<<<< * inf = tz._transition_info[pos] * */ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_trans, __pyx_n_s__searchsorted); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_27 = __pyx_v_i; __pyx_t_11 = -1; if (__pyx_t_27 < 0) { __pyx_t_27 += __pyx_pybuffernd_arr.diminfo[0].shape; if (unlikely(__pyx_t_27 < 0)) __pyx_t_11 = 0; } else if (unlikely(__pyx_t_27 >= __pyx_pybuffernd_arr.diminfo[0].shape)) __pyx_t_11 = 0; if (unlikely(__pyx_t_11 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_11); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_4 = __Pyx_PyInt_to_py_npy_int64((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_arr.rcbuffer->pybuffer.buf, __pyx_t_27, __pyx_pybuffernd_arr.diminfo[0].strides))); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __pyx_t_2 = PyNumber_Subtract(__pyx_t_4, __pyx_int_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF_SET(__pyx_v_pos, __pyx_t_2); __pyx_t_2 = 0; /* "pandas/tslib.pyx":108 * # Adjust datetime64 timestamp, recompute datetimestruct * pos = trans.searchsorted(arr[i]) - 1 * inf = tz._transition_info[pos] # <<<<<<<<<<<<<< * * pandas_datetime_to_datetimestruct(arr[i] + deltas[pos], */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_tz, __pyx_n_s___transition_info); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 108; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = PyObject_GetItem(__pyx_t_2, __pyx_v_pos); if (!__pyx_t_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 108; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF_SET(__pyx_v_inf, __pyx_t_4); __pyx_t_4 = 0; /* "pandas/tslib.pyx":110 * inf = tz._transition_info[pos] * * pandas_datetime_to_datetimestruct(arr[i] + deltas[pos], # <<<<<<<<<<<<<< * PANDAS_FR_ns, &dts) * result[i] = datetime(dts.year, dts.month, dts.day, dts.hour, */ __pyx_t_28 = __pyx_v_i; __pyx_t_11 = -1; if (__pyx_t_28 < 0) { __pyx_t_28 += __pyx_pybuffernd_arr.diminfo[0].shape; if (unlikely(__pyx_t_28 < 0)) __pyx_t_11 = 0; } else if (unlikely(__pyx_t_28 >= __pyx_pybuffernd_arr.diminfo[0].shape)) __pyx_t_11 = 0; if (unlikely(__pyx_t_11 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_11); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 110; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_4 = __Pyx_PyInt_to_py_npy_int64((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_arr.rcbuffer->pybuffer.buf, __pyx_t_28, __pyx_pybuffernd_arr.diminfo[0].strides))); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 110; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_2 = PyObject_GetItem(__pyx_v_deltas, __pyx_v_pos); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 110; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = PyNumber_Add(__pyx_t_4, __pyx_t_2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 110; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_29 = __Pyx_PyInt_from_py_npy_int64(__pyx_t_5); if (unlikely((__pyx_t_29 == (npy_datetime)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 110; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "pandas/tslib.pyx":111 * * pandas_datetime_to_datetimestruct(arr[i] + deltas[pos], * PANDAS_FR_ns, &dts) # <<<<<<<<<<<<<< * result[i] = datetime(dts.year, dts.month, dts.day, dts.hour, * dts.min, dts.sec, dts.us, */ pandas_datetime_to_datetimestruct(__pyx_t_29, PANDAS_FR_ns, (&__pyx_v_dts)); /* "pandas/tslib.pyx":112 * pandas_datetime_to_datetimestruct(arr[i] + deltas[pos], * PANDAS_FR_ns, &dts) * result[i] = datetime(dts.year, dts.month, dts.day, dts.hour, # <<<<<<<<<<<<<< * dts.min, dts.sec, dts.us, * tz._tzinfos[inf]) */ __pyx_t_5 = __Pyx_PyInt_to_py_npy_int64(__pyx_v_dts.year); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 112; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_2 = __Pyx_PyInt_to_py_npy_int32(__pyx_v_dts.month); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 112; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_PyInt_to_py_npy_int32(__pyx_v_dts.day); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 112; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = __Pyx_PyInt_to_py_npy_int32(__pyx_v_dts.hour); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 112; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); /* "pandas/tslib.pyx":113 * PANDAS_FR_ns, &dts) * result[i] = datetime(dts.year, dts.month, dts.day, dts.hour, * dts.min, dts.sec, dts.us, # <<<<<<<<<<<<<< * tz._tzinfos[inf]) * else: */ __pyx_t_15 = __Pyx_PyInt_to_py_npy_int32(__pyx_v_dts.min); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 113; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_15); __pyx_t_17 = __Pyx_PyInt_to_py_npy_int32(__pyx_v_dts.sec); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 113; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_17); __pyx_t_16 = __Pyx_PyInt_to_py_npy_int32(__pyx_v_dts.us); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 113; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_16); /* "pandas/tslib.pyx":114 * result[i] = datetime(dts.year, dts.month, dts.day, dts.hour, * dts.min, dts.sec, dts.us, * tz._tzinfos[inf]) # <<<<<<<<<<<<<< * else: * for i in range(n): */ __pyx_t_18 = __Pyx_PyObject_GetAttrStr(__pyx_v_tz, __pyx_n_s___tzinfos); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 114; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); __pyx_t_30 = PyObject_GetItem(__pyx_t_18, __pyx_v_inf); if (!__pyx_t_30) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 114; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_30); __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; __pyx_t_18 = PyTuple_New(8); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 112; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); PyTuple_SET_ITEM(__pyx_t_18, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_18, 1, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_18, 2, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_18, 3, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_18, 4, __pyx_t_15); __Pyx_GIVEREF(__pyx_t_15); PyTuple_SET_ITEM(__pyx_t_18, 5, __pyx_t_17); __Pyx_GIVEREF(__pyx_t_17); PyTuple_SET_ITEM(__pyx_t_18, 6, __pyx_t_16); __Pyx_GIVEREF(__pyx_t_16); PyTuple_SET_ITEM(__pyx_t_18, 7, __pyx_t_30); __Pyx_GIVEREF(__pyx_t_30); __pyx_t_5 = 0; __pyx_t_2 = 0; __pyx_t_4 = 0; __pyx_t_3 = 0; __pyx_t_15 = 0; __pyx_t_17 = 0; __pyx_t_16 = 0; __pyx_t_30 = 0; __pyx_t_30 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_8datetime_datetime)), ((PyObject *)__pyx_t_18), NULL); if (unlikely(!__pyx_t_30)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 112; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_30); __Pyx_DECREF(((PyObject *)__pyx_t_18)); __pyx_t_18 = 0; /* "pandas/tslib.pyx":112 * pandas_datetime_to_datetimestruct(arr[i] + deltas[pos], * PANDAS_FR_ns, &dts) * result[i] = datetime(dts.year, dts.month, dts.day, dts.hour, # <<<<<<<<<<<<<< * dts.min, dts.sec, dts.us, * tz._tzinfos[inf]) */ __pyx_t_31 = __pyx_v_i; __pyx_t_11 = -1; if (__pyx_t_31 < 0) { __pyx_t_31 += __pyx_pybuffernd_result.diminfo[0].shape; if (unlikely(__pyx_t_31 < 0)) __pyx_t_11 = 0; } else if (unlikely(__pyx_t_31 >= __pyx_pybuffernd_result.diminfo[0].shape)) __pyx_t_11 = 0; if (unlikely(__pyx_t_11 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_11); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 112; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_13 = __Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_31, __pyx_pybuffernd_result.diminfo[0].strides); __Pyx_GOTREF(*__pyx_t_13); __Pyx_INCREF(__pyx_t_30); __Pyx_DECREF(*__pyx_t_13); *__pyx_t_13 = __pyx_t_30; __Pyx_GIVEREF(*__pyx_t_13); __Pyx_DECREF(__pyx_t_30); __pyx_t_30 = 0; } __pyx_L13:; } } __pyx_L4:; goto __pyx_L3; } /*else*/ { /* "pandas/tslib.pyx":116 * tz._tzinfos[inf]) * else: * for i in range(n): # <<<<<<<<<<<<<< * if arr[i] == iNaT: * result[i] = np.nan */ __pyx_t_1 = __pyx_v_n; for (__pyx_t_9 = 0; __pyx_t_9 < __pyx_t_1; __pyx_t_9+=1) { __pyx_v_i = __pyx_t_9; /* "pandas/tslib.pyx":117 * else: * for i in range(n): * if arr[i] == iNaT: # <<<<<<<<<<<<<< * result[i] = np.nan * else: */ __pyx_t_32 = __pyx_v_i; __pyx_t_11 = -1; if (__pyx_t_32 < 0) { __pyx_t_32 += __pyx_pybuffernd_arr.diminfo[0].shape; if (unlikely(__pyx_t_32 < 0)) __pyx_t_11 = 0; } else if (unlikely(__pyx_t_32 >= __pyx_pybuffernd_arr.diminfo[0].shape)) __pyx_t_11 = 0; if (unlikely(__pyx_t_11 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_11); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 117; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_30 = __Pyx_PyInt_to_py_npy_int64((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_arr.rcbuffer->pybuffer.buf, __pyx_t_32, __pyx_pybuffernd_arr.diminfo[0].strides))); if (unlikely(!__pyx_t_30)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 117; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_30); __pyx_t_18 = __Pyx_GetModuleGlobalName(__pyx_n_s__iNaT); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 117; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); __pyx_t_16 = PyObject_RichCompare(__pyx_t_30, __pyx_t_18, Py_EQ); __Pyx_XGOTREF(__pyx_t_16); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 117; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_30); __pyx_t_30 = 0; __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; __pyx_t_20 = __Pyx_PyObject_IsTrue(__pyx_t_16); if (unlikely(__pyx_t_20 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 117; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; if (__pyx_t_20) { /* "pandas/tslib.pyx":118 * for i in range(n): * if arr[i] == iNaT: * result[i] = np.nan # <<<<<<<<<<<<<< * else: * pandas_datetime_to_datetimestruct(arr[i], PANDAS_FR_ns, &dts) */ __pyx_t_16 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 118; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_16); __pyx_t_18 = __Pyx_PyObject_GetAttrStr(__pyx_t_16, __pyx_n_s__nan); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 118; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; __pyx_t_33 = __pyx_v_i; __pyx_t_11 = -1; if (__pyx_t_33 < 0) { __pyx_t_33 += __pyx_pybuffernd_result.diminfo[0].shape; if (unlikely(__pyx_t_33 < 0)) __pyx_t_11 = 0; } else if (unlikely(__pyx_t_33 >= __pyx_pybuffernd_result.diminfo[0].shape)) __pyx_t_11 = 0; if (unlikely(__pyx_t_11 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_11); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 118; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_13 = __Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_33, __pyx_pybuffernd_result.diminfo[0].strides); __Pyx_GOTREF(*__pyx_t_13); __Pyx_INCREF(__pyx_t_18); __Pyx_DECREF(*__pyx_t_13); *__pyx_t_13 = __pyx_t_18; __Pyx_GIVEREF(*__pyx_t_13); __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; goto __pyx_L16; } /*else*/ { /* "pandas/tslib.pyx":120 * result[i] = np.nan * else: * pandas_datetime_to_datetimestruct(arr[i], PANDAS_FR_ns, &dts) # <<<<<<<<<<<<<< * result[i] = datetime(dts.year, dts.month, dts.day, dts.hour, * dts.min, dts.sec, dts.us) */ __pyx_t_34 = __pyx_v_i; __pyx_t_11 = -1; if (__pyx_t_34 < 0) { __pyx_t_34 += __pyx_pybuffernd_arr.diminfo[0].shape; if (unlikely(__pyx_t_34 < 0)) __pyx_t_11 = 0; } else if (unlikely(__pyx_t_34 >= __pyx_pybuffernd_arr.diminfo[0].shape)) __pyx_t_11 = 0; if (unlikely(__pyx_t_11 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_11); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 120; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } pandas_datetime_to_datetimestruct((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_arr.rcbuffer->pybuffer.buf, __pyx_t_34, __pyx_pybuffernd_arr.diminfo[0].strides)), PANDAS_FR_ns, (&__pyx_v_dts)); /* "pandas/tslib.pyx":121 * else: * pandas_datetime_to_datetimestruct(arr[i], PANDAS_FR_ns, &dts) * result[i] = datetime(dts.year, dts.month, dts.day, dts.hour, # <<<<<<<<<<<<<< * dts.min, dts.sec, dts.us) * */ __pyx_t_18 = __Pyx_PyInt_to_py_npy_int64(__pyx_v_dts.year); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 121; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); __pyx_t_16 = __Pyx_PyInt_to_py_npy_int32(__pyx_v_dts.month); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 121; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_16); __pyx_t_30 = __Pyx_PyInt_to_py_npy_int32(__pyx_v_dts.day); if (unlikely(!__pyx_t_30)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 121; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_30); __pyx_t_17 = __Pyx_PyInt_to_py_npy_int32(__pyx_v_dts.hour); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 121; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_17); /* "pandas/tslib.pyx":122 * pandas_datetime_to_datetimestruct(arr[i], PANDAS_FR_ns, &dts) * result[i] = datetime(dts.year, dts.month, dts.day, dts.hour, * dts.min, dts.sec, dts.us) # <<<<<<<<<<<<<< * * return result */ __pyx_t_15 = __Pyx_PyInt_to_py_npy_int32(__pyx_v_dts.min); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 122; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_15); __pyx_t_3 = __Pyx_PyInt_to_py_npy_int32(__pyx_v_dts.sec); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 122; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyInt_to_py_npy_int32(__pyx_v_dts.us); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 122; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_2 = PyTuple_New(7); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 121; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_18); __Pyx_GIVEREF(__pyx_t_18); PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_16); __Pyx_GIVEREF(__pyx_t_16); PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_t_30); __Pyx_GIVEREF(__pyx_t_30); PyTuple_SET_ITEM(__pyx_t_2, 3, __pyx_t_17); __Pyx_GIVEREF(__pyx_t_17); PyTuple_SET_ITEM(__pyx_t_2, 4, __pyx_t_15); __Pyx_GIVEREF(__pyx_t_15); PyTuple_SET_ITEM(__pyx_t_2, 5, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_2, 6, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_18 = 0; __pyx_t_16 = 0; __pyx_t_30 = 0; __pyx_t_17 = 0; __pyx_t_15 = 0; __pyx_t_3 = 0; __pyx_t_4 = 0; __pyx_t_4 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_8datetime_datetime)), ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 121; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; /* "pandas/tslib.pyx":121 * else: * pandas_datetime_to_datetimestruct(arr[i], PANDAS_FR_ns, &dts) * result[i] = datetime(dts.year, dts.month, dts.day, dts.hour, # <<<<<<<<<<<<<< * dts.min, dts.sec, dts.us) * */ __pyx_t_35 = __pyx_v_i; __pyx_t_11 = -1; if (__pyx_t_35 < 0) { __pyx_t_35 += __pyx_pybuffernd_result.diminfo[0].shape; if (unlikely(__pyx_t_35 < 0)) __pyx_t_11 = 0; } else if (unlikely(__pyx_t_35 >= __pyx_pybuffernd_result.diminfo[0].shape)) __pyx_t_11 = 0; if (unlikely(__pyx_t_11 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_11); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 121; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_13 = __Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_35, __pyx_pybuffernd_result.diminfo[0].strides); __Pyx_GOTREF(*__pyx_t_13); __Pyx_INCREF(__pyx_t_4); __Pyx_DECREF(*__pyx_t_13); *__pyx_t_13 = __pyx_t_4; __Pyx_GIVEREF(*__pyx_t_13); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } __pyx_L16:; } } __pyx_L3:; /* "pandas/tslib.pyx":124 * dts.min, dts.sec, dts.us) * * return result # <<<<<<<<<<<<<< * * from dateutil.tz import tzlocal */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_result)); __pyx_r = ((PyObject *)__pyx_v_result); goto __pyx_L0; __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_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_15); __Pyx_XDECREF(__pyx_t_16); __Pyx_XDECREF(__pyx_t_17); __Pyx_XDECREF(__pyx_t_18); __Pyx_XDECREF(__pyx_t_30); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_arr.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.tslib.ints_to_pydatetime", __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_result.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_result); __Pyx_XDECREF((PyObject *)__pyx_v_dt); __Pyx_XDECREF(__pyx_v_trans); __Pyx_XDECREF(__pyx_v_deltas); __Pyx_XDECREF(__pyx_v_pos); __Pyx_XDECREF(__pyx_v_inf); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5tslib_3_is_tzlocal(PyObject *__pyx_self, PyObject *__pyx_v_tz); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5tslib_3_is_tzlocal = {__Pyx_NAMESTR("_is_tzlocal"), (PyCFunction)__pyx_pw_6pandas_5tslib_3_is_tzlocal, METH_O, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5tslib_3_is_tzlocal(PyObject *__pyx_self, PyObject *__pyx_v_tz) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_is_tzlocal (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_5tslib_2_is_tzlocal(__pyx_self, ((PyObject *)__pyx_v_tz)); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/tslib.pyx":128 * from dateutil.tz import tzlocal * * def _is_tzlocal(tz): # <<<<<<<<<<<<<< * return isinstance(tz, tzlocal) * */ static PyObject *__pyx_pf_6pandas_5tslib_2_is_tzlocal(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_tz) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_is_tzlocal", 0); /* "pandas/tslib.pyx":129 * * def _is_tzlocal(tz): * return isinstance(tz, tzlocal) # <<<<<<<<<<<<<< * * def _is_fixed_offset(tz): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__tzlocal); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 129; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyObject_IsInstance(__pyx_v_tz, __pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 129; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 129; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas.tslib._is_tzlocal", __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_5tslib_5_is_fixed_offset(PyObject *__pyx_self, PyObject *__pyx_v_tz); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5tslib_5_is_fixed_offset = {__Pyx_NAMESTR("_is_fixed_offset"), (PyCFunction)__pyx_pw_6pandas_5tslib_5_is_fixed_offset, METH_O, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5tslib_5_is_fixed_offset(PyObject *__pyx_self, PyObject *__pyx_v_tz) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_is_fixed_offset (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_5tslib_4_is_fixed_offset(__pyx_self, ((PyObject *)__pyx_v_tz)); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/tslib.pyx":131 * return isinstance(tz, tzlocal) * * def _is_fixed_offset(tz): # <<<<<<<<<<<<<< * try: * tz._transition_info */ static PyObject *__pyx_pf_6pandas_5tslib_4_is_fixed_offset(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_tz) { 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_is_fixed_offset", 0); /* "pandas/tslib.pyx":132 * * def _is_fixed_offset(tz): * try: # <<<<<<<<<<<<<< * tz._transition_info * return False */ { __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:*/ { /* "pandas/tslib.pyx":133 * def _is_fixed_offset(tz): * try: * tz._transition_info # <<<<<<<<<<<<<< * return False * except AttributeError: */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_tz, __pyx_n_s___transition_info); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 133; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "pandas/tslib.pyx":134 * try: * tz._transition_info * return False # <<<<<<<<<<<<<< * except AttributeError: * return True */ __Pyx_XDECREF(__pyx_r); __pyx_t_4 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 134; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L7_try_return; } __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L10_try_end; __pyx_L7_try_return:; __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); goto __pyx_L0; __pyx_L3_error:; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; /* "pandas/tslib.pyx":135 * tz._transition_info * return False * except AttributeError: # <<<<<<<<<<<<<< * return True * */ __pyx_t_5 = PyErr_ExceptionMatches(__pyx_builtin_AttributeError); if (__pyx_t_5) { __Pyx_AddTraceback("pandas.tslib._is_fixed_offset", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_6, &__pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 135; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_GOTREF(__pyx_t_6); __Pyx_GOTREF(__pyx_t_7); /* "pandas/tslib.pyx":136 * return False * except AttributeError: * return True # <<<<<<<<<<<<<< * * _zero_time = datetime_time(0, 0) */ __Pyx_XDECREF(__pyx_r); __pyx_t_8 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 136; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_r = __pyx_t_8; __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; goto __pyx_L6_except_return; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; goto __pyx_L4_exception_handled; } __pyx_L5_except_error:; __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); goto __pyx_L1_error; __pyx_L6_except_return:; __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); goto __pyx_L0; __pyx_L4_exception_handled:; __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); __pyx_L10_try_end:; } __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_AddTraceback("pandas.tslib._is_fixed_offset", __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_5tslib_9Timestamp_1fromordinal(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6pandas_5tslib_9Timestamp_fromordinal[] = " passed an ordinal, translate and convert to a ts\n note: by definition there cannot be any tz info on the ordinal itself "; static PyMethodDef __pyx_mdef_6pandas_5tslib_9Timestamp_1fromordinal = {__Pyx_NAMESTR("fromordinal"), (PyCFunction)__pyx_pw_6pandas_5tslib_9Timestamp_1fromordinal, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_5tslib_9Timestamp_fromordinal)}; static PyObject *__pyx_pw_6pandas_5tslib_9Timestamp_1fromordinal(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_cls = 0; PyObject *__pyx_v_ordinal = 0; PyObject *__pyx_v_offset = 0; PyObject *__pyx_v_tz = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("fromordinal (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__cls,&__pyx_n_s__ordinal,&__pyx_n_s__offset,&__pyx_n_s__tz,0}; PyObject* values[4] = {0,0,0,0}; /* "pandas/tslib.pyx":150 * * @classmethod * def fromordinal(cls, ordinal, offset=None, tz=None): # <<<<<<<<<<<<<< * """ passed an ordinal, translate and convert to a ts * note: by definition there cannot be any tz info on the ordinal itself """ */ values[2] = ((PyObject *)((PyObject *)Py_None)); values[3] = ((PyObject *)((PyObject *)Py_None)); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__cls)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__ordinal)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("fromordinal", 0, 2, 4, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 150; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__offset); if (value) { values[2] = value; kw_args--; } } case 3: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__tz); if (value) { values[3] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "fromordinal") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 150; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_cls = values[0]; __pyx_v_ordinal = values[1]; __pyx_v_offset = values[2]; __pyx_v_tz = values[3]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("fromordinal", 0, 2, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 150; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.tslib.Timestamp.fromordinal", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pandas_5tslib_9Timestamp_fromordinal(__pyx_self, __pyx_v_cls, __pyx_v_ordinal, __pyx_v_offset, __pyx_v_tz); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5tslib_9Timestamp_fromordinal(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_ordinal, PyObject *__pyx_v_offset, PyObject *__pyx_v_tz) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("fromordinal", 0); /* "pandas/tslib.pyx":153 * """ passed an ordinal, translate and convert to a ts * note: by definition there cannot be any tz info on the ordinal itself """ * return cls(datetime.fromordinal(ordinal),offset=offset,tz=tz) # <<<<<<<<<<<<<< * * @classmethod */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)((PyObject*)__pyx_ptype_8datetime_datetime)), __pyx_n_s__fromordinal); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 153; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 153; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_ordinal); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_ordinal); __Pyx_GIVEREF(__pyx_v_ordinal); __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 153; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 153; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 153; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_3)); if (PyDict_SetItem(__pyx_t_3, ((PyObject *)__pyx_n_s__offset), __pyx_v_offset) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 153; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (PyDict_SetItem(__pyx_t_3, ((PyObject *)__pyx_n_s__tz), __pyx_v_tz) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 153; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_1 = PyObject_Call(__pyx_v_cls, ((PyObject *)__pyx_t_2), ((PyObject *)__pyx_t_3)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 153; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("pandas.tslib.Timestamp.fromordinal", __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_5tslib_9Timestamp_3now(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6pandas_5tslib_9Timestamp_2now[] = " compat now with datetime "; static PyMethodDef __pyx_mdef_6pandas_5tslib_9Timestamp_3now = {__Pyx_NAMESTR("now"), (PyCFunction)__pyx_pw_6pandas_5tslib_9Timestamp_3now, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_5tslib_9Timestamp_2now)}; static PyObject *__pyx_pw_6pandas_5tslib_9Timestamp_3now(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_cls = 0; PyObject *__pyx_v_tz = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("now (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__cls,&__pyx_n_s__tz,0}; PyObject* values[2] = {0,0}; /* "pandas/tslib.pyx":156 * * @classmethod * def now(cls, tz=None): # <<<<<<<<<<<<<< * """ compat now with datetime """ * if isinstance(tz, basestring): */ values[1] = ((PyObject *)((PyObject *)Py_None)); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__cls)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__tz); if (value) { values[1] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "now") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 156; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_cls = values[0]; __pyx_v_tz = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("now", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 156; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.tslib.Timestamp.now", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pandas_5tslib_9Timestamp_2now(__pyx_self, __pyx_v_cls, __pyx_v_tz); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5tslib_9Timestamp_2now(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_tz) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("now", 0); __Pyx_INCREF(__pyx_v_tz); /* "pandas/tslib.pyx":158 * def now(cls, tz=None): * """ compat now with datetime """ * if isinstance(tz, basestring): # <<<<<<<<<<<<<< * tz = pytz.timezone(tz) * return cls(datetime.now(tz)) */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__basestring); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 158; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyObject_IsInstance(__pyx_v_tz, __pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 158; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { /* "pandas/tslib.pyx":159 * """ compat now with datetime """ * if isinstance(tz, basestring): * tz = pytz.timezone(tz) # <<<<<<<<<<<<<< * return cls(datetime.now(tz)) * */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__pytz); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 159; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s__timezone); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 159; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 159; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_tz); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_tz); __Pyx_GIVEREF(__pyx_v_tz); __pyx_t_5 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 159; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __Pyx_DECREF_SET(__pyx_v_tz, __pyx_t_5); __pyx_t_5 = 0; goto __pyx_L3; } __pyx_L3:; /* "pandas/tslib.pyx":160 * if isinstance(tz, basestring): * tz = pytz.timezone(tz) * return cls(datetime.now(tz)) # <<<<<<<<<<<<<< * * @classmethod */ __Pyx_XDECREF(__pyx_r); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)((PyObject*)__pyx_ptype_8datetime_datetime)), __pyx_n_s__now); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 160; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 160; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_tz); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_tz); __Pyx_GIVEREF(__pyx_v_tz); __pyx_t_4 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 160; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 160; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyObject_Call(__pyx_v_cls, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 160; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("pandas.tslib.Timestamp.now", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_tz); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5tslib_9Timestamp_5today(PyObject *__pyx_self, PyObject *__pyx_v_cls); /*proto*/ static char __pyx_doc_6pandas_5tslib_9Timestamp_4today[] = " compat today with datetime "; static PyMethodDef __pyx_mdef_6pandas_5tslib_9Timestamp_5today = {__Pyx_NAMESTR("today"), (PyCFunction)__pyx_pw_6pandas_5tslib_9Timestamp_5today, METH_O, __Pyx_DOCSTR(__pyx_doc_6pandas_5tslib_9Timestamp_4today)}; static PyObject *__pyx_pw_6pandas_5tslib_9Timestamp_5today(PyObject *__pyx_self, PyObject *__pyx_v_cls) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("today (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_5tslib_9Timestamp_4today(__pyx_self, ((PyObject *)__pyx_v_cls)); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/tslib.pyx":163 * * @classmethod * def today(cls): # <<<<<<<<<<<<<< * """ compat today with datetime """ * return cls(datetime.today()) */ static PyObject *__pyx_pf_6pandas_5tslib_9Timestamp_4today(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("today", 0); /* "pandas/tslib.pyx":165 * def today(cls): * """ compat today with datetime """ * return cls(datetime.today()) # <<<<<<<<<<<<<< * * @classmethod */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)((PyObject*)__pyx_ptype_8datetime_datetime)), __pyx_n_s__today); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 165; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 165; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 165; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_Call(__pyx_v_cls, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 165; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("pandas.tslib.Timestamp.today", __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_5tslib_9Timestamp_7utcnow(PyObject *__pyx_self, PyObject *__pyx_v_cls); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5tslib_9Timestamp_7utcnow = {__Pyx_NAMESTR("utcnow"), (PyCFunction)__pyx_pw_6pandas_5tslib_9Timestamp_7utcnow, METH_O, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5tslib_9Timestamp_7utcnow(PyObject *__pyx_self, PyObject *__pyx_v_cls) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("utcnow (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_5tslib_9Timestamp_6utcnow(__pyx_self, ((PyObject *)__pyx_v_cls)); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/tslib.pyx":168 * * @classmethod * def utcnow(cls): # <<<<<<<<<<<<<< * return cls.now('UTC') * */ static PyObject *__pyx_pf_6pandas_5tslib_9Timestamp_6utcnow(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("utcnow", 0); /* "pandas/tslib.pyx":169 * @classmethod * def utcnow(cls): * return cls.now('UTC') # <<<<<<<<<<<<<< * * def __new__(cls, object ts_input, object offset=None, tz=None, unit=None): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_cls, __pyx_n_s__now); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 169; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_k_tuple_1), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 169; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("pandas.tslib.Timestamp.utcnow", __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_5tslib_9Timestamp_9__new__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5tslib_9Timestamp_9__new__ = {__Pyx_NAMESTR("__new__"), (PyCFunction)__pyx_pw_6pandas_5tslib_9Timestamp_9__new__, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5tslib_9Timestamp_9__new__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_cls = 0; PyObject *__pyx_v_ts_input = 0; PyObject *__pyx_v_offset = 0; PyObject *__pyx_v_tz = 0; PyObject *__pyx_v_unit = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__new__ (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__cls,&__pyx_n_s__ts_input,&__pyx_n_s__offset,&__pyx_n_s__tz,&__pyx_n_s__unit,0}; PyObject* values[5] = {0,0,0,0,0}; /* "pandas/tslib.pyx":171 * return cls.now('UTC') * * def __new__(cls, object ts_input, object offset=None, tz=None, unit=None): # <<<<<<<<<<<<<< * cdef _TSObject ts * cdef _Timestamp ts_base */ values[2] = ((PyObject *)((PyObject *)Py_None)); values[3] = ((PyObject *)((PyObject *)Py_None)); values[4] = ((PyObject *)((PyObject *)Py_None)); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__cls)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__ts_input)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("__new__", 0, 2, 5, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 171; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__offset); if (value) { values[2] = value; kw_args--; } } case 3: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__tz); if (value) { values[3] = value; kw_args--; } } case 4: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__unit); if (value) { values[4] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__new__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 171; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_cls = values[0]; __pyx_v_ts_input = values[1]; __pyx_v_offset = values[2]; __pyx_v_tz = values[3]; __pyx_v_unit = values[4]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("__new__", 0, 2, 5, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 171; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.tslib.Timestamp.__new__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pandas_5tslib_9Timestamp_8__new__(__pyx_self, __pyx_v_cls, __pyx_v_ts_input, __pyx_v_offset, __pyx_v_tz, __pyx_v_unit); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5tslib_9Timestamp_8__new__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_ts_input, PyObject *__pyx_v_offset, PyObject *__pyx_v_tz, PyObject *__pyx_v_unit) { struct __pyx_obj_6pandas_5tslib__TSObject *__pyx_v_ts = 0; struct __pyx_obj_6pandas_5tslib__Timestamp *__pyx_v_ts_base = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; int __pyx_t_8; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; PyObject *__pyx_t_11 = NULL; PyObject *__pyx_t_12 = NULL; PyObject *__pyx_t_13 = NULL; PyObject *__pyx_t_14 = NULL; __pyx_t_5numpy_int64_t __pyx_t_15; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__new__", 0); __Pyx_INCREF(__pyx_v_ts_input); /* "pandas/tslib.pyx":175 * cdef _Timestamp ts_base * * if util.is_string_object(ts_input): # <<<<<<<<<<<<<< * try: * ts_input = parse_date(ts_input) */ __pyx_t_1 = (is_string_object(__pyx_v_ts_input) != 0); if (__pyx_t_1) { /* "pandas/tslib.pyx":176 * * if util.is_string_object(ts_input): * try: # <<<<<<<<<<<<<< * ts_input = parse_date(ts_input) * except Exception: */ { __Pyx_ExceptionSave(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4); __Pyx_XGOTREF(__pyx_t_2); __Pyx_XGOTREF(__pyx_t_3); __Pyx_XGOTREF(__pyx_t_4); /*try:*/ { /* "pandas/tslib.pyx":177 * if util.is_string_object(ts_input): * try: * ts_input = parse_date(ts_input) # <<<<<<<<<<<<<< * except Exception: * pass */ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s__parse_date); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 177; __pyx_clineno = __LINE__; goto __pyx_L4_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 177; __pyx_clineno = __LINE__; goto __pyx_L4_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(__pyx_v_ts_input); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_ts_input); __Pyx_GIVEREF(__pyx_v_ts_input); __pyx_t_7 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 177; __pyx_clineno = __LINE__; goto __pyx_L4_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0; __Pyx_DECREF_SET(__pyx_v_ts_input, __pyx_t_7); __pyx_t_7 = 0; } __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; goto __pyx_L11_try_end; __pyx_L4_error:; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; /* "pandas/tslib.pyx":178 * try: * ts_input = parse_date(ts_input) * except Exception: # <<<<<<<<<<<<<< * pass * */ __pyx_t_8 = PyErr_ExceptionMatches(__pyx_builtin_Exception); if (__pyx_t_8) { PyErr_Restore(0,0,0); goto __pyx_L5_exception_handled; } __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_XGIVEREF(__pyx_t_4); __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4); goto __pyx_L1_error; __pyx_L5_exception_handled:; __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_XGIVEREF(__pyx_t_4); __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4); __pyx_L11_try_end:; } goto __pyx_L3; } __pyx_L3:; /* "pandas/tslib.pyx":181 * pass * * ts = convert_to_tsobject(ts_input, tz, unit) # <<<<<<<<<<<<<< * * if ts.value == NPY_NAT: */ __pyx_t_7 = __pyx_f_6pandas_5tslib_convert_to_tsobject(__pyx_v_ts_input, __pyx_v_tz, __pyx_v_unit); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 181; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); if (!(likely(((__pyx_t_7) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_7, __pyx_ptype_6pandas_5tslib__TSObject))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 181; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_ts = ((struct __pyx_obj_6pandas_5tslib__TSObject *)__pyx_t_7); __pyx_t_7 = 0; /* "pandas/tslib.pyx":183 * ts = convert_to_tsobject(ts_input, tz, unit) * * if ts.value == NPY_NAT: # <<<<<<<<<<<<<< * return NaT * */ __pyx_t_1 = ((__pyx_v_ts->value == __pyx_v_6pandas_5tslib_NPY_NAT) != 0); if (__pyx_t_1) { /* "pandas/tslib.pyx":184 * * if ts.value == NPY_NAT: * return NaT # <<<<<<<<<<<<<< * * # make datetime happy */ __Pyx_XDECREF(__pyx_r); __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s__NaT); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 184; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_r = __pyx_t_7; __pyx_t_7 = 0; goto __pyx_L0; goto __pyx_L12; } __pyx_L12:; /* "pandas/tslib.pyx":187 * * # make datetime happy * ts_base = _Timestamp.__new__(cls, ts.dts.year, ts.dts.month, # <<<<<<<<<<<<<< * ts.dts.day, ts.dts.hour, ts.dts.min, * ts.dts.sec, ts.dts.us, ts.tzinfo) */ __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)((PyObject*)__pyx_ptype_6pandas_5tslib__Timestamp)), __pyx_n_s____new__); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 187; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_t_6 = __Pyx_PyInt_to_py_npy_int64(__pyx_v_ts->dts.year); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 187; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_5 = __Pyx_PyInt_to_py_npy_int32(__pyx_v_ts->dts.month); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 187; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); /* "pandas/tslib.pyx":188 * # make datetime happy * ts_base = _Timestamp.__new__(cls, ts.dts.year, ts.dts.month, * ts.dts.day, ts.dts.hour, ts.dts.min, # <<<<<<<<<<<<<< * ts.dts.sec, ts.dts.us, ts.tzinfo) * */ __pyx_t_9 = __Pyx_PyInt_to_py_npy_int32(__pyx_v_ts->dts.day); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 188; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_t_10 = __Pyx_PyInt_to_py_npy_int32(__pyx_v_ts->dts.hour); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 188; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __pyx_t_11 = __Pyx_PyInt_to_py_npy_int32(__pyx_v_ts->dts.min); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 188; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); /* "pandas/tslib.pyx":189 * ts_base = _Timestamp.__new__(cls, ts.dts.year, ts.dts.month, * ts.dts.day, ts.dts.hour, ts.dts.min, * ts.dts.sec, ts.dts.us, ts.tzinfo) # <<<<<<<<<<<<<< * * # fill out rest of data */ __pyx_t_12 = __Pyx_PyInt_to_py_npy_int32(__pyx_v_ts->dts.sec); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 189; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __pyx_t_13 = __Pyx_PyInt_to_py_npy_int32(__pyx_v_ts->dts.us); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 189; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __pyx_t_14 = PyTuple_New(9); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 187; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_14); __Pyx_INCREF(__pyx_v_cls); PyTuple_SET_ITEM(__pyx_t_14, 0, __pyx_v_cls); __Pyx_GIVEREF(__pyx_v_cls); PyTuple_SET_ITEM(__pyx_t_14, 1, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_14, 2, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_14, 3, __pyx_t_9); __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_14, 4, __pyx_t_10); __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_14, 5, __pyx_t_11); __Pyx_GIVEREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_14, 6, __pyx_t_12); __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_14, 7, __pyx_t_13); __Pyx_GIVEREF(__pyx_t_13); __Pyx_INCREF(__pyx_v_ts->tzinfo); PyTuple_SET_ITEM(__pyx_t_14, 8, __pyx_v_ts->tzinfo); __Pyx_GIVEREF(__pyx_v_ts->tzinfo); __pyx_t_6 = 0; __pyx_t_5 = 0; __pyx_t_9 = 0; __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_13 = PyObject_Call(__pyx_t_7, ((PyObject *)__pyx_t_14), NULL); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 187; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_14)); __pyx_t_14 = 0; if (!(likely(((__pyx_t_13) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_13, __pyx_ptype_6pandas_5tslib__Timestamp))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 187; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_ts_base = ((struct __pyx_obj_6pandas_5tslib__Timestamp *)__pyx_t_13); __pyx_t_13 = 0; /* "pandas/tslib.pyx":192 * * # fill out rest of data * ts_base.value = ts.value # <<<<<<<<<<<<<< * ts_base.offset = offset * ts_base.nanosecond = ts.dts.ps / 1000 */ __pyx_t_15 = __pyx_v_ts->value; __pyx_v_ts_base->value = __pyx_t_15; /* "pandas/tslib.pyx":193 * # fill out rest of data * ts_base.value = ts.value * ts_base.offset = offset # <<<<<<<<<<<<<< * ts_base.nanosecond = ts.dts.ps / 1000 * */ __Pyx_INCREF(__pyx_v_offset); __Pyx_GIVEREF(__pyx_v_offset); __Pyx_GOTREF(__pyx_v_ts_base->offset); __Pyx_DECREF(__pyx_v_ts_base->offset); __pyx_v_ts_base->offset = __pyx_v_offset; /* "pandas/tslib.pyx":194 * ts_base.value = ts.value * ts_base.offset = offset * ts_base.nanosecond = ts.dts.ps / 1000 # <<<<<<<<<<<<<< * * return ts_base */ __pyx_v_ts_base->nanosecond = __Pyx_div_long(__pyx_v_ts->dts.ps, 1000); /* "pandas/tslib.pyx":196 * ts_base.nanosecond = ts.dts.ps / 1000 * * return ts_base # <<<<<<<<<<<<<< * * def __repr__(self): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_ts_base)); __pyx_r = ((PyObject *)__pyx_v_ts_base); goto __pyx_L0; __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_9); __Pyx_XDECREF(__pyx_t_10); __Pyx_XDECREF(__pyx_t_11); __Pyx_XDECREF(__pyx_t_12); __Pyx_XDECREF(__pyx_t_13); __Pyx_XDECREF(__pyx_t_14); __Pyx_AddTraceback("pandas.tslib.Timestamp.__new__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_ts); __Pyx_XDECREF((PyObject *)__pyx_v_ts_base); __Pyx_XDECREF(__pyx_v_ts_input); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5tslib_9Timestamp_11__repr__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5tslib_9Timestamp_11__repr__ = {__Pyx_NAMESTR("__repr__"), (PyCFunction)__pyx_pw_6pandas_5tslib_9Timestamp_11__repr__, METH_O, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5tslib_9Timestamp_11__repr__(PyObject *__pyx_self, PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_5tslib_9Timestamp_10__repr__(__pyx_self, ((PyObject *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/tslib.pyx":198 * return ts_base * * def __repr__(self): # <<<<<<<<<<<<<< * result = self._repr_base * zone = None */ static PyObject *__pyx_pf_6pandas_5tslib_9Timestamp_10__repr__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) { PyObject *__pyx_v_result = NULL; PyObject *__pyx_v_zone = NULL; PyObject *__pyx_v_year2000 = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; int __pyx_t_6; int __pyx_t_7; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; PyObject *__pyx_t_11 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__repr__", 0); /* "pandas/tslib.pyx":199 * * def __repr__(self): * result = self._repr_base # <<<<<<<<<<<<<< * zone = None * */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s___repr_base); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 199; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_v_result = __pyx_t_1; __pyx_t_1 = 0; /* "pandas/tslib.pyx":200 * def __repr__(self): * result = self._repr_base * zone = None # <<<<<<<<<<<<<< * * try: */ __Pyx_INCREF(Py_None); __pyx_v_zone = Py_None; /* "pandas/tslib.pyx":202 * zone = None * * try: # <<<<<<<<<<<<<< * result += self.strftime('%z') * if self.tzinfo: */ { __Pyx_ExceptionSave(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4); __Pyx_XGOTREF(__pyx_t_2); __Pyx_XGOTREF(__pyx_t_3); __Pyx_XGOTREF(__pyx_t_4); /*try:*/ { /* "pandas/tslib.pyx":203 * * try: * result += self.strftime('%z') # <<<<<<<<<<<<<< * if self.tzinfo: * zone = _get_zone(self.tzinfo) */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s__strftime); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 203; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_5 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_k_tuple_3), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 203; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_result, __pyx_t_5); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 203; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF_SET(__pyx_v_result, __pyx_t_1); __pyx_t_1 = 0; /* "pandas/tslib.pyx":204 * try: * result += self.strftime('%z') * if self.tzinfo: # <<<<<<<<<<<<<< * zone = _get_zone(self.tzinfo) * except ValueError: */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s__tzinfo); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 204; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 204; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_6) { /* "pandas/tslib.pyx":205 * result += self.strftime('%z') * if self.tzinfo: * zone = _get_zone(self.tzinfo) # <<<<<<<<<<<<<< * except ValueError: * year2000 = self.replace(year=2000) */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s__tzinfo); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 205; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_5 = __pyx_f_6pandas_5tslib__get_zone(__pyx_t_1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 205; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF_SET(__pyx_v_zone, __pyx_t_5); __pyx_t_5 = 0; goto __pyx_L11; } __pyx_L11:; } __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; goto __pyx_L10_try_end; __pyx_L3_error:; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; /* "pandas/tslib.pyx":206 * if self.tzinfo: * zone = _get_zone(self.tzinfo) * except ValueError: # <<<<<<<<<<<<<< * year2000 = self.replace(year=2000) * result += year2000.strftime('%z') */ __pyx_t_7 = PyErr_ExceptionMatches(__pyx_builtin_ValueError); if (__pyx_t_7) { __Pyx_AddTraceback("pandas.tslib.Timestamp.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_1, &__pyx_t_8) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 206; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_GOTREF(__pyx_t_1); __Pyx_GOTREF(__pyx_t_8); /* "pandas/tslib.pyx":207 * zone = _get_zone(self.tzinfo) * except ValueError: * year2000 = self.replace(year=2000) # <<<<<<<<<<<<<< * result += year2000.strftime('%z') * if self.tzinfo: */ __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s__replace); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 207; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_t_10 = PyDict_New(); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 207; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_10)); if (PyDict_SetItem(__pyx_t_10, ((PyObject *)__pyx_n_s__year), __pyx_int_2000) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 207; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} __pyx_t_11 = PyObject_Call(__pyx_t_9, ((PyObject *)__pyx_empty_tuple), ((PyObject *)__pyx_t_10)); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 207; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_10)); __pyx_t_10 = 0; __pyx_v_year2000 = __pyx_t_11; __pyx_t_11 = 0; /* "pandas/tslib.pyx":208 * except ValueError: * year2000 = self.replace(year=2000) * result += year2000.strftime('%z') # <<<<<<<<<<<<<< * if self.tzinfo: * zone = _get_zone(self.tzinfo) */ __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_year2000, __pyx_n_s__strftime); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 208; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} __Pyx_GOTREF(__pyx_t_11); __pyx_t_10 = PyObject_Call(__pyx_t_11, ((PyObject *)__pyx_k_tuple_4), NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 208; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __pyx_t_11 = PyNumber_InPlaceAdd(__pyx_v_result, __pyx_t_10); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 208; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF_SET(__pyx_v_result, __pyx_t_11); __pyx_t_11 = 0; /* "pandas/tslib.pyx":209 * year2000 = self.replace(year=2000) * result += year2000.strftime('%z') * if self.tzinfo: # <<<<<<<<<<<<<< * zone = _get_zone(self.tzinfo) * */ __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s__tzinfo); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 209; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} __Pyx_GOTREF(__pyx_t_11); __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_11); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 209; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; if (__pyx_t_6) { /* "pandas/tslib.pyx":210 * result += year2000.strftime('%z') * if self.tzinfo: * zone = _get_zone(self.tzinfo) # <<<<<<<<<<<<<< * * try: */ __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s__tzinfo); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 210; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} __Pyx_GOTREF(__pyx_t_11); __pyx_t_10 = __pyx_f_6pandas_5tslib__get_zone(__pyx_t_11); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 210; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF_SET(__pyx_v_zone, __pyx_t_10); __pyx_t_10 = 0; goto __pyx_L14; } __pyx_L14:; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; goto __pyx_L4_exception_handled; } __pyx_L5_except_error:; __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_XGIVEREF(__pyx_t_4); __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4); goto __pyx_L1_error; __pyx_L4_exception_handled:; __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_XGIVEREF(__pyx_t_4); __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4); __pyx_L10_try_end:; } /* "pandas/tslib.pyx":212 * zone = _get_zone(self.tzinfo) * * try: # <<<<<<<<<<<<<< * result += zone.strftime(' %%Z') * except: */ { __Pyx_ExceptionSave(&__pyx_t_4, &__pyx_t_3, &__pyx_t_2); __Pyx_XGOTREF(__pyx_t_4); __Pyx_XGOTREF(__pyx_t_3); __Pyx_XGOTREF(__pyx_t_2); /*try:*/ { /* "pandas/tslib.pyx":213 * * try: * result += zone.strftime(' %%Z') # <<<<<<<<<<<<<< * except: * pass */ __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_zone, __pyx_n_s__strftime); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 213; __pyx_clineno = __LINE__; goto __pyx_L15_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_1 = PyObject_Call(__pyx_t_8, ((PyObject *)__pyx_k_tuple_6), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 213; __pyx_clineno = __LINE__; goto __pyx_L15_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_8 = PyNumber_InPlaceAdd(__pyx_v_result, __pyx_t_1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 213; __pyx_clineno = __LINE__; goto __pyx_L15_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF_SET(__pyx_v_result, __pyx_t_8); __pyx_t_8 = 0; } __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; goto __pyx_L22_try_end; __pyx_L15_error:; __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; /* "pandas/tslib.pyx":214 * try: * result += zone.strftime(' %%Z') * except: # <<<<<<<<<<<<<< * pass * zone = "'%s'" % zone if zone else 'None' */ /*except:*/ { PyErr_Restore(0,0,0); goto __pyx_L16_exception_handled; } __pyx_L16_exception_handled:; __Pyx_XGIVEREF(__pyx_t_4); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_ExceptionReset(__pyx_t_4, __pyx_t_3, __pyx_t_2); __pyx_L22_try_end:; } /* "pandas/tslib.pyx":216 * except: * pass * zone = "'%s'" % zone if zone else 'None' # <<<<<<<<<<<<<< * * return "Timestamp('%s', tz=%s)" % (result, zone) */ __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_zone); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 216; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__pyx_t_6) { __pyx_t_1 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_7), __pyx_v_zone); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 216; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_t_8 = ((PyObject *)__pyx_t_1); __pyx_t_1 = 0; } else { __Pyx_INCREF(((PyObject *)__pyx_n_s__None)); __pyx_t_8 = ((PyObject *)__pyx_n_s__None); } __Pyx_DECREF_SET(__pyx_v_zone, __pyx_t_8); __pyx_t_8 = 0; /* "pandas/tslib.pyx":218 * zone = "'%s'" % zone if zone else 'None' * * return "Timestamp('%s', tz=%s)" % (result, zone) # <<<<<<<<<<<<<< * * @property */ __Pyx_XDECREF(__pyx_r); __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 218; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_INCREF(__pyx_v_result); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_v_result); __Pyx_GIVEREF(__pyx_v_result); __Pyx_INCREF(__pyx_v_zone); PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_v_zone); __Pyx_GIVEREF(__pyx_v_zone); __pyx_t_1 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_8), ((PyObject *)__pyx_t_8)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 218; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0; __pyx_r = ((PyObject *)__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); __Pyx_XDECREF(__pyx_t_10); __Pyx_XDECREF(__pyx_t_11); __Pyx_AddTraceback("pandas.tslib.Timestamp.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_result); __Pyx_XDECREF(__pyx_v_zone); __Pyx_XDECREF(__pyx_v_year2000); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5tslib_9Timestamp_13_date_repr(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5tslib_9Timestamp_13_date_repr = {__Pyx_NAMESTR("_date_repr"), (PyCFunction)__pyx_pw_6pandas_5tslib_9Timestamp_13_date_repr, METH_O, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5tslib_9Timestamp_13_date_repr(PyObject *__pyx_self, PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_date_repr (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_5tslib_9Timestamp_12_date_repr(__pyx_self, ((PyObject *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/tslib.pyx":221 * * @property * def _date_repr(self): # <<<<<<<<<<<<<< * # Ideal here would be self.strftime("%Y-%m-%d"), but * # the datetime strftime() methods require year >= 1900 */ static PyObject *__pyx_pf_6pandas_5tslib_9Timestamp_12_date_repr(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_date_repr", 0); /* "pandas/tslib.pyx":224 * # Ideal here would be self.strftime("%Y-%m-%d"), but * # the datetime strftime() methods require year >= 1900 * return '%d-%.2d-%.2d' % (self.year, self.month, self.day) # <<<<<<<<<<<<<< * * @property */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s__year); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 224; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s__month); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 224; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s__day); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 224; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 224; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_1 = 0; __pyx_t_2 = 0; __pyx_t_3 = 0; __pyx_t_3 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_9), ((PyObject *)__pyx_t_4)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 224; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_3)); __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __pyx_r = ((PyObject *)__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("pandas.tslib.Timestamp._date_repr", __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_5tslib_9Timestamp_15_time_repr(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5tslib_9Timestamp_15_time_repr = {__Pyx_NAMESTR("_time_repr"), (PyCFunction)__pyx_pw_6pandas_5tslib_9Timestamp_15_time_repr, METH_O, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5tslib_9Timestamp_15_time_repr(PyObject *__pyx_self, PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_time_repr (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_5tslib_9Timestamp_14_time_repr(__pyx_self, ((PyObject *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/tslib.pyx":227 * * @property * def _time_repr(self): # <<<<<<<<<<<<<< * result = '%.2d:%.2d:%.2d' % (self.hour, self.minute, self.second) * */ static PyObject *__pyx_pf_6pandas_5tslib_9Timestamp_14_time_repr(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) { PyObject *__pyx_v_result = NULL; PyObject *__pyx_v_nanos = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; int __pyx_t_5; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_time_repr", 0); /* "pandas/tslib.pyx":228 * @property * def _time_repr(self): * result = '%.2d:%.2d:%.2d' % (self.hour, self.minute, self.second) # <<<<<<<<<<<<<< * * if self.nanosecond != 0: */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s__hour); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 228; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s__minute); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 228; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s__second); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 228; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 228; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_1 = 0; __pyx_t_2 = 0; __pyx_t_3 = 0; __pyx_t_3 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_10), ((PyObject *)__pyx_t_4)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 228; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_3)); __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __pyx_v_result = ((PyObject *)__pyx_t_3); __pyx_t_3 = 0; /* "pandas/tslib.pyx":230 * result = '%.2d:%.2d:%.2d' % (self.hour, self.minute, self.second) * * if self.nanosecond != 0: # <<<<<<<<<<<<<< * nanos = self.nanosecond + 1000 * self.microsecond * result += '.%.9d' % nanos */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s__nanosecond); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 230; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PyObject_RichCompare(__pyx_t_3, __pyx_int_0, Py_NE); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 230; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 230; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_5) { /* "pandas/tslib.pyx":231 * * if self.nanosecond != 0: * nanos = self.nanosecond + 1000 * self.microsecond # <<<<<<<<<<<<<< * result += '.%.9d' % nanos * elif self.microsecond != 0: */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s__nanosecond); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 231; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s__microsecond); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 231; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = PyNumber_Multiply(__pyx_int_1000, __pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 231; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyNumber_Add(__pyx_t_4, __pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 231; __pyx_clineno = __LINE__; goto __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_nanos = __pyx_t_3; __pyx_t_3 = 0; /* "pandas/tslib.pyx":232 * if self.nanosecond != 0: * nanos = self.nanosecond + 1000 * self.microsecond * result += '.%.9d' % nanos # <<<<<<<<<<<<<< * elif self.microsecond != 0: * result += '.%.6d' % self.microsecond */ __pyx_t_3 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_11), __pyx_v_nanos); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 232; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_3)); __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_result, ((PyObject *)__pyx_t_3)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 232; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; __Pyx_DECREF_SET(__pyx_v_result, __pyx_t_2); __pyx_t_2 = 0; goto __pyx_L3; } /* "pandas/tslib.pyx":233 * nanos = self.nanosecond + 1000 * self.microsecond * result += '.%.9d' % nanos * elif self.microsecond != 0: # <<<<<<<<<<<<<< * result += '.%.6d' % self.microsecond * */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s__microsecond); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 233; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyObject_RichCompare(__pyx_t_2, __pyx_int_0, Py_NE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 233; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 233; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_5) { /* "pandas/tslib.pyx":234 * result += '.%.9d' % nanos * elif self.microsecond != 0: * result += '.%.6d' % self.microsecond # <<<<<<<<<<<<<< * * return result */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s__microsecond); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 234; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_12), __pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 234; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_2)); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyNumber_InPlaceAdd(__pyx_v_result, ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 234; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __Pyx_DECREF_SET(__pyx_v_result, __pyx_t_3); __pyx_t_3 = 0; goto __pyx_L3; } __pyx_L3:; /* "pandas/tslib.pyx":236 * result += '.%.6d' % self.microsecond * * return result # <<<<<<<<<<<<<< * * @property */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_result); __pyx_r = __pyx_v_result; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("pandas.tslib.Timestamp._time_repr", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_result); __Pyx_XDECREF(__pyx_v_nanos); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5tslib_9Timestamp_17_repr_base(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5tslib_9Timestamp_17_repr_base = {__Pyx_NAMESTR("_repr_base"), (PyCFunction)__pyx_pw_6pandas_5tslib_9Timestamp_17_repr_base, METH_O, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5tslib_9Timestamp_17_repr_base(PyObject *__pyx_self, PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_repr_base (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_5tslib_9Timestamp_16_repr_base(__pyx_self, ((PyObject *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/tslib.pyx":239 * * @property * def _repr_base(self): # <<<<<<<<<<<<<< * return '%s %s' % (self._date_repr, self._time_repr) * */ static PyObject *__pyx_pf_6pandas_5tslib_9Timestamp_16_repr_base(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_repr_base", 0); /* "pandas/tslib.pyx":240 * @property * def _repr_base(self): * return '%s %s' % (self._date_repr, self._time_repr) # <<<<<<<<<<<<<< * * @property */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s___date_repr); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 240; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s___time_repr); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 240; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 240; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_1 = 0; __pyx_t_2 = 0; __pyx_t_2 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_13), ((PyObject *)__pyx_t_3)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 240; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_2)); __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; __pyx_r = ((PyObject *)__pyx_t_2); __pyx_t_2 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("pandas.tslib.Timestamp._repr_base", __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_5tslib_9Timestamp_19tz(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/ static char __pyx_doc_6pandas_5tslib_9Timestamp_18tz[] = "\n Alias for tzinfo\n "; static PyMethodDef __pyx_mdef_6pandas_5tslib_9Timestamp_19tz = {__Pyx_NAMESTR("tz"), (PyCFunction)__pyx_pw_6pandas_5tslib_9Timestamp_19tz, METH_O, __Pyx_DOCSTR(__pyx_doc_6pandas_5tslib_9Timestamp_18tz)}; static PyObject *__pyx_pw_6pandas_5tslib_9Timestamp_19tz(PyObject *__pyx_self, PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("tz (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_5tslib_9Timestamp_18tz(__pyx_self, ((PyObject *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/tslib.pyx":243 * * @property * def tz(self): # <<<<<<<<<<<<<< * """ * Alias for tzinfo */ static PyObject *__pyx_pf_6pandas_5tslib_9Timestamp_18tz(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("tz", 0); /* "pandas/tslib.pyx":247 * Alias for tzinfo * """ * return self.tzinfo # <<<<<<<<<<<<<< * * @property */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s__tzinfo); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 247; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas.tslib.Timestamp.tz", __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_5tslib_9Timestamp_21freq(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5tslib_9Timestamp_21freq = {__Pyx_NAMESTR("freq"), (PyCFunction)__pyx_pw_6pandas_5tslib_9Timestamp_21freq, METH_O, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5tslib_9Timestamp_21freq(PyObject *__pyx_self, PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("freq (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_5tslib_9Timestamp_20freq(__pyx_self, ((PyObject *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/tslib.pyx":250 * * @property * def freq(self): # <<<<<<<<<<<<<< * return self.offset * */ static PyObject *__pyx_pf_6pandas_5tslib_9Timestamp_20freq(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("freq", 0); /* "pandas/tslib.pyx":251 * @property * def freq(self): * return self.offset # <<<<<<<<<<<<<< * * def __setstate__(self, state): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s__offset); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 251; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas.tslib.Timestamp.freq", __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_5tslib_9Timestamp_23__setstate__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5tslib_9Timestamp_23__setstate__ = {__Pyx_NAMESTR("__setstate__"), (PyCFunction)__pyx_pw_6pandas_5tslib_9Timestamp_23__setstate__, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5tslib_9Timestamp_23__setstate__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_self = 0; PyObject *__pyx_v_state = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__setstate__ (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__self,&__pyx_n_s__state,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__self)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__state)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("__setstate__", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 253; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__setstate__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 253; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } __pyx_v_self = values[0]; __pyx_v_state = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("__setstate__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 253; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.tslib.Timestamp.__setstate__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pandas_5tslib_9Timestamp_22__setstate__(__pyx_self, __pyx_v_self, __pyx_v_state); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/tslib.pyx":253 * return self.offset * * def __setstate__(self, state): # <<<<<<<<<<<<<< * self.value = state[0] * self.offset = state[1] */ static PyObject *__pyx_pf_6pandas_5tslib_9Timestamp_22__setstate__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_state) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__setstate__", 0); /* "pandas/tslib.pyx":254 * * def __setstate__(self, state): * self.value = state[0] # <<<<<<<<<<<<<< * self.offset = state[1] * self.tzinfo = state[2] */ __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_state, 0, sizeof(long), PyInt_FromLong, 0, 0, 1); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 254; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s__value, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 254; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pandas/tslib.pyx":255 * def __setstate__(self, state): * self.value = state[0] * self.offset = state[1] # <<<<<<<<<<<<<< * self.tzinfo = state[2] * */ __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_state, 1, sizeof(long), PyInt_FromLong, 0, 0, 1); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 255; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s__offset, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 255; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pandas/tslib.pyx":256 * self.value = state[0] * self.offset = state[1] * self.tzinfo = state[2] # <<<<<<<<<<<<<< * * def __reduce__(self): */ __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_state, 2, sizeof(long), PyInt_FromLong, 0, 0, 1); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 256; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s__tzinfo, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 256; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas.tslib.Timestamp.__setstate__", __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_5tslib_9Timestamp_25__reduce__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5tslib_9Timestamp_25__reduce__ = {__Pyx_NAMESTR("__reduce__"), (PyCFunction)__pyx_pw_6pandas_5tslib_9Timestamp_25__reduce__, METH_O, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5tslib_9Timestamp_25__reduce__(PyObject *__pyx_self, PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__reduce__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_5tslib_9Timestamp_24__reduce__(__pyx_self, ((PyObject *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/tslib.pyx":258 * self.tzinfo = state[2] * * def __reduce__(self): # <<<<<<<<<<<<<< * object_state = self.value, self.offset, self.tzinfo * return (Timestamp, object_state) */ static PyObject *__pyx_pf_6pandas_5tslib_9Timestamp_24__reduce__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) { PyObject *__pyx_v_object_state = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__reduce__", 0); /* "pandas/tslib.pyx":259 * * def __reduce__(self): * object_state = self.value, self.offset, self.tzinfo # <<<<<<<<<<<<<< * return (Timestamp, object_state) * */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s__value); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 259; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s__offset); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 259; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s__tzinfo); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 259; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 259; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_1 = 0; __pyx_t_2 = 0; __pyx_t_3 = 0; __pyx_v_object_state = ((PyObject*)__pyx_t_4); __pyx_t_4 = 0; /* "pandas/tslib.pyx":260 * def __reduce__(self): * object_state = self.value, self.offset, self.tzinfo * return (Timestamp, object_state) # <<<<<<<<<<<<<< * * def to_period(self, freq=None): */ __Pyx_XDECREF(__pyx_r); __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s__Timestamp); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 260; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 260; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __Pyx_INCREF(((PyObject *)__pyx_v_object_state)); PyTuple_SET_ITEM(__pyx_t_3, 1, ((PyObject *)__pyx_v_object_state)); __Pyx_GIVEREF(((PyObject *)__pyx_v_object_state)); __pyx_t_4 = 0; __pyx_r = ((PyObject *)__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("pandas.tslib.Timestamp.__reduce__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_object_state); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5tslib_9Timestamp_27to_period(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6pandas_5tslib_9Timestamp_26to_period[] = "\n Return an period of which this timestamp is an observation.\n "; static PyMethodDef __pyx_mdef_6pandas_5tslib_9Timestamp_27to_period = {__Pyx_NAMESTR("to_period"), (PyCFunction)__pyx_pw_6pandas_5tslib_9Timestamp_27to_period, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_5tslib_9Timestamp_26to_period)}; static PyObject *__pyx_pw_6pandas_5tslib_9Timestamp_27to_period(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_self = 0; PyObject *__pyx_v_freq = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("to_period (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__self,&__pyx_n_s__freq,0}; PyObject* values[2] = {0,0}; /* "pandas/tslib.pyx":262 * return (Timestamp, object_state) * * def to_period(self, freq=None): # <<<<<<<<<<<<<< * """ * Return an period of which this timestamp is an observation. */ values[1] = ((PyObject *)((PyObject *)Py_None)); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__self)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__freq); if (value) { values[1] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "to_period") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 262; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_self = values[0]; __pyx_v_freq = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("to_period", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 262; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.tslib.Timestamp.to_period", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pandas_5tslib_9Timestamp_26to_period(__pyx_self, __pyx_v_self, __pyx_v_freq); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5tslib_9Timestamp_26to_period(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_freq) { PyObject *__pyx_v_Period = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_t_3; int __pyx_t_4; PyObject *__pyx_t_5 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("to_period", 0); __Pyx_INCREF(__pyx_v_freq); /* "pandas/tslib.pyx":266 * Return an period of which this timestamp is an observation. * """ * from pandas.tseries.period import Period # <<<<<<<<<<<<<< * * if freq is None: */ __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 266; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)__pyx_n_s__Period)); PyList_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_n_s__Period)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__Period)); __pyx_t_2 = __Pyx_Import(((PyObject *)__pyx_n_s_14), ((PyObject *)__pyx_t_1), -1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 266; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s__Period); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 266; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_t_1); __pyx_v_Period = __pyx_t_1; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/tslib.pyx":268 * from pandas.tseries.period import Period * * if freq is None: # <<<<<<<<<<<<<< * freq = self.freq * */ __pyx_t_3 = (__pyx_v_freq == Py_None); __pyx_t_4 = (__pyx_t_3 != 0); if (__pyx_t_4) { /* "pandas/tslib.pyx":269 * * if freq is None: * freq = self.freq # <<<<<<<<<<<<<< * * return Period(self, freq=freq) */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s__freq); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 269; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF_SET(__pyx_v_freq, __pyx_t_2); __pyx_t_2 = 0; goto __pyx_L3; } __pyx_L3:; /* "pandas/tslib.pyx":271 * freq = self.freq * * return Period(self, freq=freq) # <<<<<<<<<<<<<< * * @property */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 271; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_self); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_self); __Pyx_GIVEREF(__pyx_v_self); __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 271; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_1)); if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__freq), __pyx_v_freq) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 271; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_5 = PyObject_Call(__pyx_v_Period, ((PyObject *)__pyx_t_2), ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 271; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_r = __pyx_t_5; __pyx_t_5 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("pandas.tslib.Timestamp.to_period", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_Period); __Pyx_XDECREF(__pyx_v_freq); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5tslib_9Timestamp_29dayofweek(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5tslib_9Timestamp_29dayofweek = {__Pyx_NAMESTR("dayofweek"), (PyCFunction)__pyx_pw_6pandas_5tslib_9Timestamp_29dayofweek, METH_O, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5tslib_9Timestamp_29dayofweek(PyObject *__pyx_self, PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("dayofweek (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_5tslib_9Timestamp_28dayofweek(__pyx_self, ((PyObject *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/tslib.pyx":274 * * @property * def dayofweek(self): # <<<<<<<<<<<<<< * return self.weekday() * */ static PyObject *__pyx_pf_6pandas_5tslib_9Timestamp_28dayofweek(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("dayofweek", 0); /* "pandas/tslib.pyx":275 * @property * def dayofweek(self): * return self.weekday() # <<<<<<<<<<<<<< * * @property */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s__weekday); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 275; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 275; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("pandas.tslib.Timestamp.dayofweek", __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_5tslib_9Timestamp_31dayofyear(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5tslib_9Timestamp_31dayofyear = {__Pyx_NAMESTR("dayofyear"), (PyCFunction)__pyx_pw_6pandas_5tslib_9Timestamp_31dayofyear, METH_O, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5tslib_9Timestamp_31dayofyear(PyObject *__pyx_self, PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("dayofyear (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_5tslib_9Timestamp_30dayofyear(__pyx_self, ((PyObject *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/tslib.pyx":278 * * @property * def dayofyear(self): # <<<<<<<<<<<<<< * return self._get_field('doy') * */ static PyObject *__pyx_pf_6pandas_5tslib_9Timestamp_30dayofyear(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("dayofyear", 0); /* "pandas/tslib.pyx":279 * @property * def dayofyear(self): * return self._get_field('doy') # <<<<<<<<<<<<<< * * @property */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s___get_field); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 279; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_k_tuple_15), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 279; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("pandas.tslib.Timestamp.dayofyear", __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_5tslib_9Timestamp_33week(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5tslib_9Timestamp_33week = {__Pyx_NAMESTR("week"), (PyCFunction)__pyx_pw_6pandas_5tslib_9Timestamp_33week, METH_O, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5tslib_9Timestamp_33week(PyObject *__pyx_self, PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("week (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_5tslib_9Timestamp_32week(__pyx_self, ((PyObject *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/tslib.pyx":282 * * @property * def week(self): # <<<<<<<<<<<<<< * return self._get_field('woy') * */ static PyObject *__pyx_pf_6pandas_5tslib_9Timestamp_32week(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("week", 0); /* "pandas/tslib.pyx":283 * @property * def week(self): * return self._get_field('woy') # <<<<<<<<<<<<<< * * weekofyear = week */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s___get_field); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 283; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_k_tuple_16), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 283; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("pandas.tslib.Timestamp.week", __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_5tslib_9Timestamp_35quarter(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5tslib_9Timestamp_35quarter = {__Pyx_NAMESTR("quarter"), (PyCFunction)__pyx_pw_6pandas_5tslib_9Timestamp_35quarter, METH_O, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5tslib_9Timestamp_35quarter(PyObject *__pyx_self, PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("quarter (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_5tslib_9Timestamp_34quarter(__pyx_self, ((PyObject *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/tslib.pyx":288 * * @property * def quarter(self): # <<<<<<<<<<<<<< * return self._get_field('q') * */ static PyObject *__pyx_pf_6pandas_5tslib_9Timestamp_34quarter(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("quarter", 0); /* "pandas/tslib.pyx":289 * @property * def quarter(self): * return self._get_field('q') # <<<<<<<<<<<<<< * * @property */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s___get_field); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 289; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_k_tuple_17), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 289; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("pandas.tslib.Timestamp.quarter", __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_5tslib_9Timestamp_37freqstr(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5tslib_9Timestamp_37freqstr = {__Pyx_NAMESTR("freqstr"), (PyCFunction)__pyx_pw_6pandas_5tslib_9Timestamp_37freqstr, METH_O, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5tslib_9Timestamp_37freqstr(PyObject *__pyx_self, PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("freqstr (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_5tslib_9Timestamp_36freqstr(__pyx_self, ((PyObject *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/tslib.pyx":292 * * @property * def freqstr(self): # <<<<<<<<<<<<<< * return getattr(self.offset, 'freqstr', self.offset) * */ static PyObject *__pyx_pf_6pandas_5tslib_9Timestamp_36freqstr(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("freqstr", 0); /* "pandas/tslib.pyx":293 * @property * def freqstr(self): * return getattr(self.offset, 'freqstr', self.offset) # <<<<<<<<<<<<<< * * @property */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s__offset); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 293; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s__offset); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 293; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_GetAttr3(__pyx_t_1, ((PyObject *)__pyx_n_s__freqstr), __pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 293; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("pandas.tslib.Timestamp.freqstr", __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_5tslib_9Timestamp_39asm8(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5tslib_9Timestamp_39asm8 = {__Pyx_NAMESTR("asm8"), (PyCFunction)__pyx_pw_6pandas_5tslib_9Timestamp_39asm8, METH_O, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5tslib_9Timestamp_39asm8(PyObject *__pyx_self, PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("asm8 (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_5tslib_9Timestamp_38asm8(__pyx_self, ((PyObject *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/tslib.pyx":296 * * @property * def asm8(self): # <<<<<<<<<<<<<< * return np.int64(self.value).view('M8[ns]') * */ static PyObject *__pyx_pf_6pandas_5tslib_9Timestamp_38asm8(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("asm8", 0); /* "pandas/tslib.pyx":297 * @property * def asm8(self): * return np.int64(self.value).view('M8[ns]') # <<<<<<<<<<<<<< * * def tz_localize(self, tz): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 297; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s__int64); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 297; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s__value); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 297; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 297; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 297; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s__view); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 297; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_k_tuple_19), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 297; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("pandas.tslib.Timestamp.asm8", __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_5tslib_9Timestamp_41tz_localize(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6pandas_5tslib_9Timestamp_40tz_localize[] = "\n Convert naive Timestamp to local time zone\n\n Parameters\n ----------\n tz : pytz.timezone\n\n Returns\n -------\n localized : Timestamp\n "; static PyMethodDef __pyx_mdef_6pandas_5tslib_9Timestamp_41tz_localize = {__Pyx_NAMESTR("tz_localize"), (PyCFunction)__pyx_pw_6pandas_5tslib_9Timestamp_41tz_localize, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_5tslib_9Timestamp_40tz_localize)}; static PyObject *__pyx_pw_6pandas_5tslib_9Timestamp_41tz_localize(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_self = 0; PyObject *__pyx_v_tz = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("tz_localize (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__self,&__pyx_n_s__tz,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__self)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__tz)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("tz_localize", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 299; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "tz_localize") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 299; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } __pyx_v_self = values[0]; __pyx_v_tz = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("tz_localize", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 299; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.tslib.Timestamp.tz_localize", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pandas_5tslib_9Timestamp_40tz_localize(__pyx_self, __pyx_v_self, __pyx_v_tz); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/tslib.pyx":299 * return np.int64(self.value).view('M8[ns]') * * def tz_localize(self, tz): # <<<<<<<<<<<<<< * """ * Convert naive Timestamp to local time zone */ static PyObject *__pyx_pf_6pandas_5tslib_9Timestamp_40tz_localize(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_tz) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("tz_localize", 0); /* "pandas/tslib.pyx":311 * localized : Timestamp * """ * if self.tzinfo is None: # <<<<<<<<<<<<<< * # tz naive, localize * return Timestamp(self.to_pydatetime(), tz=tz) */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s__tzinfo); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 311; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = (__pyx_t_1 == Py_None); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { /* "pandas/tslib.pyx":313 * if self.tzinfo is None: * # tz naive, localize * return Timestamp(self.to_pydatetime(), tz=tz) # <<<<<<<<<<<<<< * else: * raise Exception('Cannot localize tz-aware Timestamp, use ' */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__Timestamp); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 313; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s__to_pydatetime); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 313; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 313; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 313; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyDict_New(); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 313; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_5)); if (PyDict_SetItem(__pyx_t_5, ((PyObject *)__pyx_n_s__tz), __pyx_v_tz) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 313; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_6 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_5)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 313; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; __pyx_r = __pyx_t_6; __pyx_t_6 = 0; goto __pyx_L0; goto __pyx_L3; } /*else*/ { /* "pandas/tslib.pyx":315 * return Timestamp(self.to_pydatetime(), tz=tz) * else: * raise Exception('Cannot localize tz-aware Timestamp, use ' # <<<<<<<<<<<<<< * 'tz_convert for conversions') * */ __pyx_t_6 = PyObject_Call(__pyx_builtin_Exception, ((PyObject *)__pyx_k_tuple_21), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 315; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_Raise(__pyx_t_6, 0, 0, 0); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 315; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_L3:; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("pandas.tslib.Timestamp.tz_localize", __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_5tslib_9Timestamp_43tz_convert(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6pandas_5tslib_9Timestamp_42tz_convert[] = "\n Convert Timestamp to another time zone or localize to requested time\n zone\n\n Parameters\n ----------\n tz : pytz.timezone\n\n Returns\n -------\n converted : Timestamp\n "; static PyMethodDef __pyx_mdef_6pandas_5tslib_9Timestamp_43tz_convert = {__Pyx_NAMESTR("tz_convert"), (PyCFunction)__pyx_pw_6pandas_5tslib_9Timestamp_43tz_convert, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_5tslib_9Timestamp_42tz_convert)}; static PyObject *__pyx_pw_6pandas_5tslib_9Timestamp_43tz_convert(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_self = 0; PyObject *__pyx_v_tz = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("tz_convert (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__self,&__pyx_n_s__tz,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__self)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__tz)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("tz_convert", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 318; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "tz_convert") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 318; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } __pyx_v_self = values[0]; __pyx_v_tz = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("tz_convert", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 318; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.tslib.Timestamp.tz_convert", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pandas_5tslib_9Timestamp_42tz_convert(__pyx_self, __pyx_v_self, __pyx_v_tz); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/tslib.pyx":318 * 'tz_convert for conversions') * * def tz_convert(self, tz): # <<<<<<<<<<<<<< * """ * Convert Timestamp to another time zone or localize to requested time */ static PyObject *__pyx_pf_6pandas_5tslib_9Timestamp_42tz_convert(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_tz) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("tz_convert", 0); /* "pandas/tslib.pyx":331 * converted : Timestamp * """ * if self.tzinfo is None: # <<<<<<<<<<<<<< * # tz naive, use tz_localize * raise Exception('Cannot convert tz-naive Timestamp, use ' */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s__tzinfo); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 331; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = (__pyx_t_1 == Py_None); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { /* "pandas/tslib.pyx":333 * if self.tzinfo is None: * # tz naive, use tz_localize * raise Exception('Cannot convert tz-naive Timestamp, use ' # <<<<<<<<<<<<<< * 'tz_localize to localize') * else: */ __pyx_t_1 = PyObject_Call(__pyx_builtin_Exception, ((PyObject *)__pyx_k_tuple_23), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 333; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 333; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L3; } /*else*/ { /* "pandas/tslib.pyx":337 * else: * # Same UTC timestamp, different time zone * return Timestamp(self.value, tz=tz) # <<<<<<<<<<<<<< * * astimezone = tz_convert */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__Timestamp); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 337; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s__value); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 337; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 337; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyDict_New(); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 337; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_4)); if (PyDict_SetItem(__pyx_t_4, ((PyObject *)__pyx_n_s__tz), __pyx_v_tz) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 337; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_6 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_5), ((PyObject *)__pyx_t_4)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 337; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __pyx_r = __pyx_t_6; __pyx_t_6 = 0; goto __pyx_L0; } __pyx_L3:; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("pandas.tslib.Timestamp.tz_convert", __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_5tslib_9Timestamp_45replace(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5tslib_9Timestamp_45replace = {__Pyx_NAMESTR("replace"), (PyCFunction)__pyx_pw_6pandas_5tslib_9Timestamp_45replace, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5tslib_9Timestamp_45replace(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_self = 0; PyObject *__pyx_v_kwds = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("replace (wrapper)", 0); __pyx_v_kwds = PyDict_New(); if (unlikely(!__pyx_v_kwds)) return NULL; __Pyx_GOTREF(__pyx_v_kwds); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__self,0}; PyObject* values[1] = {0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__self)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kwds, values, pos_args, "replace") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 341; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); } __pyx_v_self = values[0]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("replace", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 341; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_DECREF(__pyx_v_kwds); __pyx_v_kwds = 0; __Pyx_AddTraceback("pandas.tslib.Timestamp.replace", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pandas_5tslib_9Timestamp_44replace(__pyx_self, __pyx_v_self, __pyx_v_kwds); __Pyx_XDECREF(__pyx_v_kwds); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/tslib.pyx":341 * astimezone = tz_convert * * def replace(self, **kwds): # <<<<<<<<<<<<<< * return Timestamp(datetime.replace(self, **kwds), * offset=self.offset) */ static PyObject *__pyx_pf_6pandas_5tslib_9Timestamp_44replace(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_kwds) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("replace", 0); /* "pandas/tslib.pyx":342 * * def replace(self, **kwds): * return Timestamp(datetime.replace(self, **kwds), # <<<<<<<<<<<<<< * offset=self.offset) * */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__Timestamp); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 342; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)((PyObject*)__pyx_ptype_8datetime_datetime)), __pyx_n_s__replace); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 342; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 342; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_v_self); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_self); __Pyx_GIVEREF(__pyx_v_self); __pyx_t_4 = ((PyObject *)__pyx_v_kwds); __Pyx_INCREF(__pyx_t_4); __pyx_t_5 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_3), ((PyObject *)__pyx_t_4)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 342; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 342; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyDict_New(); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 342; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_5)); /* "pandas/tslib.pyx":343 * def replace(self, **kwds): * return Timestamp(datetime.replace(self, **kwds), * offset=self.offset) # <<<<<<<<<<<<<< * * def to_pydatetime(self, warn=True): */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s__offset); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 343; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_t_5, ((PyObject *)__pyx_n_s__offset), __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 342; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_5)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 342; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("pandas.tslib.Timestamp.replace", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/tslib.pyx":345 * offset=self.offset) * * def to_pydatetime(self, warn=True): # <<<<<<<<<<<<<< * """ * If warn=True, issue warning if nanoseconds is nonzero */ static PyObject *__pyx_pf_6pandas_5tslib_9Timestamp_52__defaults__(CYTHON_UNUSED PyObject *__pyx_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__defaults__", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 345; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__Pyx_CyFunction_Defaults(__pyx_defaults, __pyx_self)->__pyx_arg_warn); PyTuple_SET_ITEM(__pyx_t_1, 0, __Pyx_CyFunction_Defaults(__pyx_defaults, __pyx_self)->__pyx_arg_warn); __Pyx_GIVEREF(__Pyx_CyFunction_Defaults(__pyx_defaults, __pyx_self)->__pyx_arg_warn); __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 345; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_t_1)); __Pyx_GIVEREF(((PyObject *)__pyx_t_1)); __Pyx_INCREF(Py_None); PyTuple_SET_ITEM(__pyx_t_2, 1, Py_None); __Pyx_GIVEREF(Py_None); __pyx_t_1 = 0; __pyx_r = ((PyObject *)__pyx_t_2); __pyx_t_2 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("pandas.tslib.Timestamp.__defaults__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5tslib_9Timestamp_47to_pydatetime(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6pandas_5tslib_9Timestamp_46to_pydatetime[] = "\n If warn=True, issue warning if nanoseconds is nonzero\n "; static PyMethodDef __pyx_mdef_6pandas_5tslib_9Timestamp_47to_pydatetime = {__Pyx_NAMESTR("to_pydatetime"), (PyCFunction)__pyx_pw_6pandas_5tslib_9Timestamp_47to_pydatetime, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_5tslib_9Timestamp_46to_pydatetime)}; static PyObject *__pyx_pw_6pandas_5tslib_9Timestamp_47to_pydatetime(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_self = 0; PyObject *__pyx_v_warn = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("to_pydatetime (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__self,&__pyx_n_s__warn,0}; PyObject* values[2] = {0,0}; __pyx_defaults *__pyx_dynamic_args = __Pyx_CyFunction_Defaults(__pyx_defaults, __pyx_self); values[1] = __pyx_dynamic_args->__pyx_arg_warn; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__self)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__warn); if (value) { values[1] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "to_pydatetime") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 345; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_self = values[0]; __pyx_v_warn = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("to_pydatetime", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 345; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.tslib.Timestamp.to_pydatetime", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pandas_5tslib_9Timestamp_46to_pydatetime(__pyx_self, __pyx_v_self, __pyx_v_warn); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5tslib_9Timestamp_46to_pydatetime(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_warn) { struct __pyx_obj_6pandas_5tslib__TSObject *__pyx_v_ts = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_t_3; int __pyx_t_4; int __pyx_t_5; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; PyObject *__pyx_t_11 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("to_pydatetime", 0); /* "pandas/tslib.pyx":353 * _TSObject ts * * if self.nanosecond != 0 and warn: # <<<<<<<<<<<<<< * print 'Warning: discarding nonzero nanoseconds' * ts = convert_to_tsobject(self, self.tzinfo, None) */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s__nanosecond); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 353; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyObject_RichCompare(__pyx_t_1, __pyx_int_0, Py_NE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 353; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 353; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_3) { __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_warn); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 353; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_5 = __pyx_t_4; } else { __pyx_t_5 = __pyx_t_3; } if (__pyx_t_5) { /* "pandas/tslib.pyx":354 * * if self.nanosecond != 0 and warn: * print 'Warning: discarding nonzero nanoseconds' # <<<<<<<<<<<<<< * ts = convert_to_tsobject(self, self.tzinfo, None) * */ if (__Pyx_PrintOne(0, ((PyObject *)__pyx_kp_s_24)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 354; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L3; } __pyx_L3:; /* "pandas/tslib.pyx":355 * if self.nanosecond != 0 and warn: * print 'Warning: discarding nonzero nanoseconds' * ts = convert_to_tsobject(self, self.tzinfo, None) # <<<<<<<<<<<<<< * * return datetime(ts.dts.year, ts.dts.month, ts.dts.day, */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s__tzinfo); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 355; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __pyx_f_6pandas_5tslib_convert_to_tsobject(__pyx_v_self, __pyx_t_2, Py_None); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 355; __pyx_clineno = __LINE__; goto __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_5tslib__TSObject))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 355; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_ts = ((struct __pyx_obj_6pandas_5tslib__TSObject *)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/tslib.pyx":357 * ts = convert_to_tsobject(self, self.tzinfo, None) * * return datetime(ts.dts.year, ts.dts.month, ts.dts.day, # <<<<<<<<<<<<<< * ts.dts.hour, ts.dts.min, ts.dts.sec, * ts.dts.us, ts.tzinfo) */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyInt_to_py_npy_int64(__pyx_v_ts->dts.year); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 357; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyInt_to_py_npy_int32(__pyx_v_ts->dts.month); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 357; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_6 = __Pyx_PyInt_to_py_npy_int32(__pyx_v_ts->dts.day); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 357; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); /* "pandas/tslib.pyx":358 * * return datetime(ts.dts.year, ts.dts.month, ts.dts.day, * ts.dts.hour, ts.dts.min, ts.dts.sec, # <<<<<<<<<<<<<< * ts.dts.us, ts.tzinfo) * */ __pyx_t_7 = __Pyx_PyInt_to_py_npy_int32(__pyx_v_ts->dts.hour); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 358; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_t_8 = __Pyx_PyInt_to_py_npy_int32(__pyx_v_ts->dts.min); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 358; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_9 = __Pyx_PyInt_to_py_npy_int32(__pyx_v_ts->dts.sec); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 358; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); /* "pandas/tslib.pyx":359 * return datetime(ts.dts.year, ts.dts.month, ts.dts.day, * ts.dts.hour, ts.dts.min, ts.dts.sec, * ts.dts.us, ts.tzinfo) # <<<<<<<<<<<<<< * * def isoformat(self, sep='T'): */ __pyx_t_10 = __Pyx_PyInt_to_py_npy_int32(__pyx_v_ts->dts.us); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 359; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __pyx_t_11 = PyTuple_New(8); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 357; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_11, 1, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_11, 2, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_11, 3, __pyx_t_7); __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_11, 4, __pyx_t_8); __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_11, 5, __pyx_t_9); __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_11, 6, __pyx_t_10); __Pyx_GIVEREF(__pyx_t_10); __Pyx_INCREF(__pyx_v_ts->tzinfo); PyTuple_SET_ITEM(__pyx_t_11, 7, __pyx_v_ts->tzinfo); __Pyx_GIVEREF(__pyx_v_ts->tzinfo); __pyx_t_1 = 0; __pyx_t_2 = 0; __pyx_t_6 = 0; __pyx_t_7 = 0; __pyx_t_8 = 0; __pyx_t_9 = 0; __pyx_t_10 = 0; __pyx_t_10 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_8datetime_datetime)), ((PyObject *)__pyx_t_11), NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 357; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(((PyObject *)__pyx_t_11)); __pyx_t_11 = 0; __pyx_r = __pyx_t_10; __pyx_t_10 = 0; goto __pyx_L0; __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_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); __Pyx_XDECREF(__pyx_t_10); __Pyx_XDECREF(__pyx_t_11); __Pyx_AddTraceback("pandas.tslib.Timestamp.to_pydatetime", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_ts); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5tslib_9Timestamp_49isoformat(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5tslib_9Timestamp_49isoformat = {__Pyx_NAMESTR("isoformat"), (PyCFunction)__pyx_pw_6pandas_5tslib_9Timestamp_49isoformat, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5tslib_9Timestamp_49isoformat(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_self = 0; PyObject *__pyx_v_sep = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("isoformat (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__self,&__pyx_n_s__sep,0}; PyObject* values[2] = {0,0}; values[1] = ((PyObject *)((PyObject*)__pyx_n_s__T)); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__self)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__sep); if (value) { values[1] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "isoformat") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 361; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_self = values[0]; __pyx_v_sep = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("isoformat", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 361; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.tslib.Timestamp.isoformat", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pandas_5tslib_9Timestamp_48isoformat(__pyx_self, __pyx_v_self, __pyx_v_sep); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/tslib.pyx":361 * ts.dts.us, ts.tzinfo) * * def isoformat(self, sep='T'): # <<<<<<<<<<<<<< * base = super(_Timestamp, self).isoformat(sep=sep) * if self.nanosecond == 0: */ static PyObject *__pyx_pf_6pandas_5tslib_9Timestamp_48isoformat(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_sep) { PyObject *__pyx_v_base = NULL; PyObject *__pyx_v_base1 = NULL; PyObject *__pyx_v_base2 = 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_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("isoformat", 0); /* "pandas/tslib.pyx":362 * * def isoformat(self, sep='T'): * base = super(_Timestamp, self).isoformat(sep=sep) # <<<<<<<<<<<<<< * if self.nanosecond == 0: * return base */ __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 362; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)((PyObject*)__pyx_ptype_6pandas_5tslib__Timestamp))); PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)((PyObject*)__pyx_ptype_6pandas_5tslib__Timestamp))); __Pyx_GIVEREF(((PyObject *)((PyObject*)__pyx_ptype_6pandas_5tslib__Timestamp))); __Pyx_INCREF(__pyx_v_self); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_self); __Pyx_GIVEREF(__pyx_v_self); __pyx_t_2 = PyObject_Call(__pyx_builtin_super, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 362; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__isoformat); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 362; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 362; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_2)); if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__sep), __pyx_v_sep) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 362; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 362; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __pyx_v_base = __pyx_t_3; __pyx_t_3 = 0; /* "pandas/tslib.pyx":363 * def isoformat(self, sep='T'): * base = super(_Timestamp, self).isoformat(sep=sep) * if self.nanosecond == 0: # <<<<<<<<<<<<<< * return base * */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s__nanosecond); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 363; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = PyObject_RichCompare(__pyx_t_3, __pyx_int_0, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 363; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 363; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_4) { /* "pandas/tslib.pyx":364 * base = super(_Timestamp, self).isoformat(sep=sep) * if self.nanosecond == 0: * return base # <<<<<<<<<<<<<< * * if self.tzinfo is not None: */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_base); __pyx_r = __pyx_v_base; goto __pyx_L0; goto __pyx_L3; } __pyx_L3:; /* "pandas/tslib.pyx":366 * return base * * if self.tzinfo is not None: # <<<<<<<<<<<<<< * base1, base2 = base[:-6], base[-6:] * else: */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s__tzinfo); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 366; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = (__pyx_t_2 != Py_None); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_5 = (__pyx_t_4 != 0); if (__pyx_t_5) { /* "pandas/tslib.pyx":367 * * if self.tzinfo is not None: * base1, base2 = base[:-6], base[-6:] # <<<<<<<<<<<<<< * else: * base1, base2 = base, "" */ __pyx_t_2 = __Pyx_PyObject_GetSlice(__pyx_v_base, 0, -6, NULL, NULL, &__pyx_k_slice_25, 0, 1, 1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 367; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetSlice(__pyx_v_base, -6, 0, NULL, NULL, &__pyx_k_slice_26, 1, 0, 1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 367; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_v_base1 = __pyx_t_2; __pyx_t_2 = 0; __pyx_v_base2 = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L4; } /*else*/ { /* "pandas/tslib.pyx":369 * base1, base2 = base[:-6], base[-6:] * else: * base1, base2 = base, "" # <<<<<<<<<<<<<< * * if self.microsecond != 0: */ __pyx_t_3 = __pyx_v_base; __Pyx_INCREF(__pyx_t_3); __pyx_t_2 = ((PyObject *)__pyx_kp_s_27); __Pyx_INCREF(__pyx_t_2); __pyx_v_base1 = __pyx_t_3; __pyx_t_3 = 0; __pyx_v_base2 = __pyx_t_2; __pyx_t_2 = 0; } __pyx_L4:; /* "pandas/tslib.pyx":371 * base1, base2 = base, "" * * if self.microsecond != 0: # <<<<<<<<<<<<<< * base1 += "%.3d" % self.nanosecond * else: */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s__microsecond); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 371; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyObject_RichCompare(__pyx_t_2, __pyx_int_0, Py_NE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 371; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 371; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_5) { /* "pandas/tslib.pyx":372 * * if self.microsecond != 0: * base1 += "%.3d" % self.nanosecond # <<<<<<<<<<<<<< * else: * base1 += ".%.9d" % self.nanosecond */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s__nanosecond); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 372; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_28), __pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 372; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_2)); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyNumber_InPlaceAdd(__pyx_v_base1, ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 372; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __Pyx_DECREF_SET(__pyx_v_base1, __pyx_t_3); __pyx_t_3 = 0; goto __pyx_L5; } /*else*/ { /* "pandas/tslib.pyx":374 * base1 += "%.3d" % self.nanosecond * else: * base1 += ".%.9d" % self.nanosecond # <<<<<<<<<<<<<< * * return base1 + base2 */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s__nanosecond); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 374; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_11), __pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 374; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_2)); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyNumber_InPlaceAdd(__pyx_v_base1, ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 374; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __Pyx_DECREF_SET(__pyx_v_base1, __pyx_t_3); __pyx_t_3 = 0; } __pyx_L5:; /* "pandas/tslib.pyx":376 * base1 += ".%.9d" % self.nanosecond * * return base1 + base2 # <<<<<<<<<<<<<< * * def _has_time_component(self): */ __Pyx_XDECREF(__pyx_r); __pyx_t_3 = PyNumber_Add(__pyx_v_base1, __pyx_v_base2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 376; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("pandas.tslib.Timestamp.isoformat", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_base); __Pyx_XDECREF(__pyx_v_base1); __Pyx_XDECREF(__pyx_v_base2); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5tslib_9Timestamp_51_has_time_component(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/ static char __pyx_doc_6pandas_5tslib_9Timestamp_50_has_time_component[] = "\n Returns if the Timestamp has a time component\n in addition to the date part\n "; static PyMethodDef __pyx_mdef_6pandas_5tslib_9Timestamp_51_has_time_component = {__Pyx_NAMESTR("_has_time_component"), (PyCFunction)__pyx_pw_6pandas_5tslib_9Timestamp_51_has_time_component, METH_O, __Pyx_DOCSTR(__pyx_doc_6pandas_5tslib_9Timestamp_50_has_time_component)}; static PyObject *__pyx_pw_6pandas_5tslib_9Timestamp_51_has_time_component(PyObject *__pyx_self, PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_has_time_component (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_5tslib_9Timestamp_50_has_time_component(__pyx_self, ((PyObject *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/tslib.pyx":378 * return base1 + base2 * * def _has_time_component(self): # <<<<<<<<<<<<<< * """ * Returns if the Timestamp has a time component */ static PyObject *__pyx_pf_6pandas_5tslib_9Timestamp_50_has_time_component(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_t_4; PyObject *__pyx_t_5 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_has_time_component", 0); /* "pandas/tslib.pyx":383 * in addition to the date part * """ * return (self.time() != _zero_time # <<<<<<<<<<<<<< * or self.tzinfo is not None * or self.nanosecond != 0) */ __Pyx_XDECREF(__pyx_r); /* "pandas/tslib.pyx":384 * """ * return (self.time() != _zero_time * or self.tzinfo is not None # <<<<<<<<<<<<<< * or self.nanosecond != 0) * */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s__time); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 383; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); /* "pandas/tslib.pyx":383 * in addition to the date part * """ * return (self.time() != _zero_time # <<<<<<<<<<<<<< * or self.tzinfo is not None * or self.nanosecond != 0) */ __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 383; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pandas/tslib.pyx":384 * """ * return (self.time() != _zero_time * or self.tzinfo is not None # <<<<<<<<<<<<<< * or self.nanosecond != 0) * */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s___zero_time); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 384; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = PyObject_RichCompare(__pyx_t_2, __pyx_t_1, Py_NE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 383; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 384; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (!__pyx_t_4) { __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/tslib.pyx":385 * return (self.time() != _zero_time * or self.tzinfo is not None * or self.nanosecond != 0) # <<<<<<<<<<<<<< * * */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s__tzinfo); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 384; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); /* "pandas/tslib.pyx":384 * """ * return (self.time() != _zero_time * or self.tzinfo is not None # <<<<<<<<<<<<<< * or self.nanosecond != 0) * */ __pyx_t_4 = (__pyx_t_1 != Py_None); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_t_4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 384; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 385; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (!__pyx_t_4) { __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pandas/tslib.pyx":385 * return (self.time() != _zero_time * or self.tzinfo is not None * or self.nanosecond != 0) # <<<<<<<<<<<<<< * * */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s__nanosecond); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 385; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = PyObject_RichCompare(__pyx_t_2, __pyx_int_0, Py_NE); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 385; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __pyx_t_5; __pyx_t_5 = 0; } else { __pyx_t_2 = __pyx_t_1; __pyx_t_1 = 0; } __pyx_t_1 = __pyx_t_2; __pyx_t_2 = 0; } else { __pyx_t_1 = __pyx_t_3; __pyx_t_3 = 0; } __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; __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_5); __Pyx_AddTraceback("pandas.tslib.Timestamp._has_time_component", __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_5tslib_7NaTType_1__new__(PyObject *__pyx_self, PyObject *__pyx_v_cls); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5tslib_7NaTType_1__new__ = {__Pyx_NAMESTR("__new__"), (PyCFunction)__pyx_pw_6pandas_5tslib_7NaTType_1__new__, METH_O, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5tslib_7NaTType_1__new__(PyObject *__pyx_self, PyObject *__pyx_v_cls) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__new__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_5tslib_7NaTType___new__(__pyx_self, ((PyObject *)__pyx_v_cls)); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/tslib.pyx":392 * """(N)ot-(A)-(T)ime, the time equivalent of NaN""" * * def __new__(cls): # <<<<<<<<<<<<<< * cdef _NaT base * */ static PyObject *__pyx_pf_6pandas_5tslib_7NaTType___new__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls) { struct __pyx_obj_6pandas_5tslib__NaT *__pyx_v_base = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__new__", 0); /* "pandas/tslib.pyx":395 * cdef _NaT base * * base = _NaT.__new__(cls, 1, 1, 1) # <<<<<<<<<<<<<< * mangle_nat(base) * base.value = NPY_NAT */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)((PyObject*)__pyx_ptype_6pandas_5tslib__NaT)), __pyx_n_s____new__); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 395; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyTuple_New(4); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 395; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_cls); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_cls); __Pyx_GIVEREF(__pyx_v_cls); __Pyx_INCREF(__pyx_int_1); PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_int_1); __Pyx_GIVEREF(__pyx_int_1); __Pyx_INCREF(__pyx_int_1); PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_int_1); __Pyx_GIVEREF(__pyx_int_1); __Pyx_INCREF(__pyx_int_1); PyTuple_SET_ITEM(__pyx_t_2, 3, __pyx_int_1); __Pyx_GIVEREF(__pyx_int_1); __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 395; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_6pandas_5tslib__NaT))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 395; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_base = ((struct __pyx_obj_6pandas_5tslib__NaT *)__pyx_t_3); __pyx_t_3 = 0; /* "pandas/tslib.pyx":396 * * base = _NaT.__new__(cls, 1, 1, 1) * mangle_nat(base) # <<<<<<<<<<<<<< * base.value = NPY_NAT * */ mangle_nat(((PyObject *)__pyx_v_base)); /* "pandas/tslib.pyx":397 * base = _NaT.__new__(cls, 1, 1, 1) * mangle_nat(base) * base.value = NPY_NAT # <<<<<<<<<<<<<< * * return base */ __pyx_v_base->__pyx_base.value = __pyx_v_6pandas_5tslib_NPY_NAT; /* "pandas/tslib.pyx":399 * base.value = NPY_NAT * * return base # <<<<<<<<<<<<<< * * def __repr__(self): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_base)); __pyx_r = ((PyObject *)__pyx_v_base); goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("pandas.tslib.NaTType.__new__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_base); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5tslib_7NaTType_3__repr__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5tslib_7NaTType_3__repr__ = {__Pyx_NAMESTR("__repr__"), (PyCFunction)__pyx_pw_6pandas_5tslib_7NaTType_3__repr__, METH_O, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5tslib_7NaTType_3__repr__(PyObject *__pyx_self, PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_5tslib_7NaTType_2__repr__(__pyx_self, ((PyObject *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/tslib.pyx":401 * return base * * def __repr__(self): # <<<<<<<<<<<<<< * return 'NaT' * */ static PyObject *__pyx_pf_6pandas_5tslib_7NaTType_2__repr__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__repr__", 0); /* "pandas/tslib.pyx":402 * * def __repr__(self): * return 'NaT' # <<<<<<<<<<<<<< * * def __str__(self): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_n_s__NaT)); __pyx_r = ((PyObject *)__pyx_n_s__NaT); goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5tslib_7NaTType_5__str__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5tslib_7NaTType_5__str__ = {__Pyx_NAMESTR("__str__"), (PyCFunction)__pyx_pw_6pandas_5tslib_7NaTType_5__str__, METH_O, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5tslib_7NaTType_5__str__(PyObject *__pyx_self, PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__str__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_5tslib_7NaTType_4__str__(__pyx_self, ((PyObject *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/tslib.pyx":404 * return 'NaT' * * def __str__(self): # <<<<<<<<<<<<<< * return 'NaT' * */ static PyObject *__pyx_pf_6pandas_5tslib_7NaTType_4__str__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__str__", 0); /* "pandas/tslib.pyx":405 * * def __str__(self): * return 'NaT' # <<<<<<<<<<<<<< * * def __hash__(self): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_n_s__NaT)); __pyx_r = ((PyObject *)__pyx_n_s__NaT); goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5tslib_7NaTType_7__hash__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5tslib_7NaTType_7__hash__ = {__Pyx_NAMESTR("__hash__"), (PyCFunction)__pyx_pw_6pandas_5tslib_7NaTType_7__hash__, METH_O, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5tslib_7NaTType_7__hash__(PyObject *__pyx_self, PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__hash__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_5tslib_7NaTType_6__hash__(__pyx_self, ((PyObject *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/tslib.pyx":407 * return 'NaT' * * def __hash__(self): # <<<<<<<<<<<<<< * return iNaT * */ static PyObject *__pyx_pf_6pandas_5tslib_7NaTType_6__hash__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__hash__", 0); /* "pandas/tslib.pyx":408 * * def __hash__(self): * return iNaT # <<<<<<<<<<<<<< * * def weekday(self): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__iNaT); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 408; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas.tslib.NaTType.__hash__", __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_5tslib_7NaTType_9weekday(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5tslib_7NaTType_9weekday = {__Pyx_NAMESTR("weekday"), (PyCFunction)__pyx_pw_6pandas_5tslib_7NaTType_9weekday, METH_O, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5tslib_7NaTType_9weekday(PyObject *__pyx_self, PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("weekday (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_5tslib_7NaTType_8weekday(__pyx_self, ((PyObject *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/tslib.pyx":410 * return iNaT * * def weekday(self): # <<<<<<<<<<<<<< * return -1 * */ static PyObject *__pyx_pf_6pandas_5tslib_7NaTType_8weekday(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("weekday", 0); /* "pandas/tslib.pyx":411 * * def weekday(self): * return -1 # <<<<<<<<<<<<<< * * def toordinal(self): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_int_neg_1); __pyx_r = __pyx_int_neg_1; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5tslib_7NaTType_11toordinal(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5tslib_7NaTType_11toordinal = {__Pyx_NAMESTR("toordinal"), (PyCFunction)__pyx_pw_6pandas_5tslib_7NaTType_11toordinal, METH_O, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5tslib_7NaTType_11toordinal(PyObject *__pyx_self, PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("toordinal (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_5tslib_7NaTType_10toordinal(__pyx_self, ((PyObject *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/tslib.pyx":413 * return -1 * * def toordinal(self): # <<<<<<<<<<<<<< * return -1 * */ static PyObject *__pyx_pf_6pandas_5tslib_7NaTType_10toordinal(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("toordinal", 0); /* "pandas/tslib.pyx":414 * * def toordinal(self): * return -1 # <<<<<<<<<<<<<< * * fields = ['year', 'quarter', 'month', 'day', 'hour', */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_int_neg_1); __pyx_r = __pyx_int_neg_1; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/tslib.pyx":429 * * * cdef inline bint _checknull_with_nat(object val): # <<<<<<<<<<<<<< * """ utility to check if a value is a nat or not """ * return val is None or ( */ static CYTHON_INLINE int __pyx_f_6pandas_5tslib__checknull_with_nat(PyObject *__pyx_v_val) { int __pyx_r; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_checknull_with_nat", 0); /* "pandas/tslib.pyx":431 * cdef inline bint _checknull_with_nat(object val): * """ utility to check if a value is a nat or not """ * return val is None or ( # <<<<<<<<<<<<<< * PyFloat_Check(val) and val != val) or val is NaT * */ __pyx_t_1 = (__pyx_v_val == Py_None); __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 431; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 431; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (!__pyx_t_1) { __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/tslib.pyx":432 * """ utility to check if a value is a nat or not """ * return val is None or ( * PyFloat_Check(val) and val != val) or val is NaT # <<<<<<<<<<<<<< * * cdef inline bint _cmp_nat_dt(_NaT lhs, _Timestamp rhs, int op) except -1: */ __pyx_t_3 = __Pyx_PyBool_FromLong(PyFloat_Check(__pyx_v_val)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 432; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 432; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__pyx_t_1) { __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_4 = PyObject_RichCompare(__pyx_v_val, __pyx_v_val, Py_NE); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 432; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_5 = __pyx_t_4; __pyx_t_4 = 0; } else { __pyx_t_5 = __pyx_t_3; __pyx_t_3 = 0; } __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 432; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (!__pyx_t_1) { __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s__NaT); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 432; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = (__pyx_v_val == __pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_t_1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 432; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __pyx_t_3; __pyx_t_3 = 0; } else { __pyx_t_4 = __pyx_t_5; __pyx_t_5 = 0; } __pyx_t_5 = __pyx_t_4; __pyx_t_4 = 0; } else { __pyx_t_5 = __pyx_t_2; __pyx_t_2 = 0; } __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 431; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_r = __pyx_t_1; goto __pyx_L0; __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_WriteUnraisable("pandas.tslib._checknull_with_nat", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/tslib.pyx":434 * PyFloat_Check(val) and val != val) or val is NaT * * cdef inline bint _cmp_nat_dt(_NaT lhs, _Timestamp rhs, int op) except -1: # <<<<<<<<<<<<<< * return _nat_scalar_rules[op] * */ static CYTHON_INLINE int __pyx_f_6pandas_5tslib__cmp_nat_dt(CYTHON_UNUSED struct __pyx_obj_6pandas_5tslib__NaT *__pyx_v_lhs, CYTHON_UNUSED struct __pyx_obj_6pandas_5tslib__Timestamp *__pyx_v_rhs, int __pyx_v_op) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_cmp_nat_dt", 0); /* "pandas/tslib.pyx":435 * * cdef inline bint _cmp_nat_dt(_NaT lhs, _Timestamp rhs, int op) except -1: * return _nat_scalar_rules[op] # <<<<<<<<<<<<<< * * */ __pyx_r = (__pyx_v_6pandas_5tslib__nat_scalar_rules[__pyx_v_op]); goto __pyx_L0; __pyx_r = 0; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/tslib.pyx":438 * * * cdef _tz_format(object obj, object zone): # <<<<<<<<<<<<<< * try: * return obj.strftime(' %%Z, tz=%s' % zone) */ static PyObject *__pyx_f_6pandas_5tslib__tz_format(PyObject *__pyx_v_obj, PyObject *__pyx_v_zone) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_tz_format", 0); /* "pandas/tslib.pyx":439 * * cdef _tz_format(object obj, object zone): * try: # <<<<<<<<<<<<<< * return obj.strftime(' %%Z, tz=%s' % zone) * except: */ { __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:*/ { /* "pandas/tslib.pyx":440 * cdef _tz_format(object obj, object zone): * try: * return obj.strftime(' %%Z, tz=%s' % zone) # <<<<<<<<<<<<<< * except: * return ', tz=%s' % zone */ __Pyx_XDECREF(__pyx_r); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_obj, __pyx_n_s__strftime); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 440; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_29), __pyx_v_zone); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 440; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_5)); __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 440; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_t_5)); __Pyx_GIVEREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; __pyx_t_5 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 440; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0; __pyx_r = __pyx_t_5; __pyx_t_5 = 0; goto __pyx_L7_try_return; } __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L10_try_end; __pyx_L7_try_return:; __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); goto __pyx_L0; __pyx_L3_error:; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; /* "pandas/tslib.pyx":441 * try: * return obj.strftime(' %%Z, tz=%s' % zone) * except: # <<<<<<<<<<<<<< * return ', tz=%s' % zone * */ /*except:*/ { __Pyx_AddTraceback("pandas.tslib._tz_format", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 441; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_GOTREF(__pyx_t_6); __Pyx_GOTREF(__pyx_t_4); /* "pandas/tslib.pyx":442 * return obj.strftime(' %%Z, tz=%s' % zone) * except: * return ', tz=%s' % zone # <<<<<<<<<<<<<< * * def is_timestamp_array(ndarray[object] values): */ __Pyx_XDECREF(__pyx_r); __pyx_t_7 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_30), __pyx_v_zone); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 442; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_7)); __pyx_r = ((PyObject *)__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; goto __pyx_L6_except_return; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; goto __pyx_L4_exception_handled; } __pyx_L5_except_error:; __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); goto __pyx_L1_error; __pyx_L6_except_return:; __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); goto __pyx_L0; __pyx_L4_exception_handled:; __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); __pyx_L10_try_end:; } __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_AddTraceback("pandas.tslib._tz_format", __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_5tslib_7is_timestamp_array(PyObject *__pyx_self, PyObject *__pyx_v_values); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5tslib_7is_timestamp_array = {__Pyx_NAMESTR("is_timestamp_array"), (PyCFunction)__pyx_pw_6pandas_5tslib_7is_timestamp_array, METH_O, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5tslib_7is_timestamp_array(PyObject *__pyx_self, PyObject *__pyx_v_values) { CYTHON_UNUSED int __pyx_lineno = 0; CYTHON_UNUSED const char *__pyx_filename = NULL; CYTHON_UNUSED int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("is_timestamp_array (wrapper)", 0); if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 444; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5tslib_6is_timestamp_array(__pyx_self, ((PyArrayObject *)__pyx_v_values)); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/tslib.pyx":444 * return ', tz=%s' % zone * * def is_timestamp_array(ndarray[object] values): # <<<<<<<<<<<<<< * cdef int i, n = len(values) * if n == 0: */ static PyObject *__pyx_pf_6pandas_5tslib_6is_timestamp_array(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values) { int __pyx_v_i; int __pyx_v_n; __Pyx_LocalBuf_ND __pyx_pybuffernd_values; __Pyx_Buffer __pyx_pybuffer_values; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; int __pyx_t_4; int __pyx_t_5; int __pyx_t_6; int __pyx_t_7; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("is_timestamp_array", 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_object, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 444; __pyx_clineno = __LINE__; goto __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/tslib.pyx":445 * * def is_timestamp_array(ndarray[object] values): * cdef int i, n = len(values) # <<<<<<<<<<<<<< * if n == 0: * return False */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 445; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/tslib.pyx":446 * def is_timestamp_array(ndarray[object] values): * cdef int i, n = len(values) * if n == 0: # <<<<<<<<<<<<<< * return False * for i in range(n): */ __pyx_t_2 = ((__pyx_v_n == 0) != 0); if (__pyx_t_2) { /* "pandas/tslib.pyx":447 * cdef int i, n = len(values) * if n == 0: * return False # <<<<<<<<<<<<<< * for i in range(n): * if not is_timestamp(values[i]): */ __Pyx_XDECREF(__pyx_r); __pyx_t_3 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 447; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; goto __pyx_L3; } __pyx_L3:; /* "pandas/tslib.pyx":448 * if n == 0: * return False * for i in range(n): # <<<<<<<<<<<<<< * if not is_timestamp(values[i]): * return False */ __pyx_t_4 = __pyx_v_n; for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) { __pyx_v_i = __pyx_t_5; /* "pandas/tslib.pyx":449 * return False * for i in range(n): * if not is_timestamp(values[i]): # <<<<<<<<<<<<<< * return False * return True */ __pyx_t_6 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_6 < 0) { __pyx_t_6 += __pyx_pybuffernd_values.diminfo[0].shape; if (unlikely(__pyx_t_6 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_6 >= __pyx_pybuffernd_values.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 449; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_3 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_6, __pyx_pybuffernd_values.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_3); __pyx_t_2 = ((!(__pyx_f_6pandas_5tslib_is_timestamp(__pyx_t_3) != 0)) != 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_2) { /* "pandas/tslib.pyx":450 * for i in range(n): * if not is_timestamp(values[i]): * return False # <<<<<<<<<<<<<< * return True * */ __Pyx_XDECREF(__pyx_r); __pyx_t_3 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 450; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; goto __pyx_L6; } __pyx_L6:; } /* "pandas/tslib.pyx":451 * if not is_timestamp(values[i]): * return False * return True # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_3 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 451; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __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.tslib.is_timestamp_array", __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/tslib.pyx":454 * * * cpdef object get_value_box(ndarray arr, object loc): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, sz */ static PyObject *__pyx_pw_6pandas_5tslib_9get_value_box(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_6pandas_5tslib_get_value_box(PyArrayObject *__pyx_v_arr, PyObject *__pyx_v_loc, CYTHON_UNUSED int __pyx_skip_dispatch) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_sz; PyObject *__pyx_v_casted = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; Py_ssize_t __pyx_t_4; int __pyx_t_5; int __pyx_t_6; int __pyx_t_7; PyObject *__pyx_t_8 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_value_box", 0); __Pyx_INCREF(__pyx_v_loc); /* "pandas/tslib.pyx":458 * Py_ssize_t i, sz * void* data_ptr * if util.is_float_object(loc): # <<<<<<<<<<<<<< * casted = int(loc) * if casted == loc: */ __pyx_t_1 = (is_float_object(__pyx_v_loc) != 0); if (__pyx_t_1) { /* "pandas/tslib.pyx":459 * void* data_ptr * if util.is_float_object(loc): * casted = int(loc) # <<<<<<<<<<<<<< * if casted == loc: * loc = casted */ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 459; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_loc); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_loc); __Pyx_GIVEREF(__pyx_v_loc); __pyx_t_3 = PyObject_Call(((PyObject *)((PyObject*)(&PyInt_Type))), ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 459; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __pyx_v_casted = __pyx_t_3; __pyx_t_3 = 0; /* "pandas/tslib.pyx":460 * if util.is_float_object(loc): * casted = int(loc) * if casted == loc: # <<<<<<<<<<<<<< * loc = casted * i = loc */ __pyx_t_3 = PyObject_RichCompare(__pyx_v_casted, __pyx_v_loc, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 460; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 460; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_1) { /* "pandas/tslib.pyx":461 * casted = int(loc) * if casted == loc: * loc = casted # <<<<<<<<<<<<<< * i = loc * sz = np.PyArray_SIZE(arr) */ __Pyx_INCREF(__pyx_v_casted); __Pyx_DECREF_SET(__pyx_v_loc, __pyx_v_casted); goto __pyx_L4; } __pyx_L4:; goto __pyx_L3; } __pyx_L3:; /* "pandas/tslib.pyx":462 * if casted == loc: * loc = casted * i = loc # <<<<<<<<<<<<<< * sz = np.PyArray_SIZE(arr) * */ __pyx_t_4 = __Pyx_PyIndex_AsSsize_t(__pyx_v_loc); if (unlikely((__pyx_t_4 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 462; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_i = ((Py_ssize_t)__pyx_t_4); /* "pandas/tslib.pyx":463 * loc = casted * i = loc * sz = np.PyArray_SIZE(arr) # <<<<<<<<<<<<<< * * if i < 0 and sz > 0: */ __pyx_v_sz = PyArray_SIZE(__pyx_v_arr); /* "pandas/tslib.pyx":465 * sz = np.PyArray_SIZE(arr) * * if i < 0 and sz > 0: # <<<<<<<<<<<<<< * i += sz * */ __pyx_t_1 = ((__pyx_v_i < 0) != 0); if (__pyx_t_1) { __pyx_t_5 = ((__pyx_v_sz > 0) != 0); __pyx_t_6 = __pyx_t_5; } else { __pyx_t_6 = __pyx_t_1; } if (__pyx_t_6) { /* "pandas/tslib.pyx":466 * * if i < 0 and sz > 0: * i += sz # <<<<<<<<<<<<<< * * if i >= sz or sz == 0 or i < 0: */ __pyx_v_i = (__pyx_v_i + __pyx_v_sz); goto __pyx_L5; } __pyx_L5:; /* "pandas/tslib.pyx":468 * i += sz * * if i >= sz or sz == 0 or i < 0: # <<<<<<<<<<<<<< * raise IndexError('index out of bounds') * */ __pyx_t_6 = ((__pyx_v_i >= __pyx_v_sz) != 0); if (!__pyx_t_6) { __pyx_t_1 = ((__pyx_v_sz == 0) != 0); if (!__pyx_t_1) { __pyx_t_5 = ((__pyx_v_i < 0) != 0); __pyx_t_7 = __pyx_t_5; } else { __pyx_t_7 = __pyx_t_1; } __pyx_t_1 = __pyx_t_7; } else { __pyx_t_1 = __pyx_t_6; } if (__pyx_t_1) { /* "pandas/tslib.pyx":469 * * if i >= sz or sz == 0 or i < 0: * raise IndexError('index out of bounds') # <<<<<<<<<<<<<< * * if arr.descr.type_num == NPY_DATETIME: */ __pyx_t_3 = PyObject_Call(__pyx_builtin_IndexError, ((PyObject *)__pyx_k_tuple_32), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 469; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 469; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L6; } __pyx_L6:; /* "pandas/tslib.pyx":471 * raise IndexError('index out of bounds') * * if arr.descr.type_num == NPY_DATETIME: # <<<<<<<<<<<<<< * return Timestamp(util.get_value_1d(arr, i)) * else: */ __pyx_t_1 = ((__pyx_v_arr->descr->type_num == NPY_DATETIME) != 0); if (__pyx_t_1) { /* "pandas/tslib.pyx":472 * * if arr.descr.type_num == NPY_DATETIME: * return Timestamp(util.get_value_1d(arr, i)) # <<<<<<<<<<<<<< * else: * return util.get_value_1d(arr, i) */ __Pyx_XDECREF(__pyx_r); __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s__Timestamp); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 472; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = get_value_1d(__pyx_v_arr, __pyx_v_i); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 472; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 472; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_8), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 472; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; goto __pyx_L7; } /*else*/ { /* "pandas/tslib.pyx":474 * return Timestamp(util.get_value_1d(arr, i)) * else: * return util.get_value_1d(arr, i) # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = get_value_1d(__pyx_v_arr, __pyx_v_i); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 474; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; } __pyx_L7:; __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_8); __Pyx_AddTraceback("pandas.tslib.get_value_box", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_casted); __Pyx_XDECREF(__pyx_v_loc); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5tslib_9get_value_box(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_6pandas_5tslib_9get_value_box(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_arr = 0; PyObject *__pyx_v_loc = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("get_value_box (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__arr,&__pyx_n_s__loc,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__arr)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__loc)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("get_value_box", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 454; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "get_value_box") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 454; __pyx_clineno = __LINE__; goto __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_loc = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("get_value_box", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 454; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.tslib.get_value_box", __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_filename = __pyx_f[0]; __pyx_lineno = 454; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5tslib_8get_value_box(__pyx_self, __pyx_v_arr, __pyx_v_loc); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/tslib.pyx":454 * * * cpdef object get_value_box(ndarray arr, object loc): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, sz */ static PyObject *__pyx_pf_6pandas_5tslib_8get_value_box(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_arr, PyObject *__pyx_v_loc) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_value_box", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_6pandas_5tslib_get_value_box(__pyx_v_arr, __pyx_v_loc, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 454; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas.tslib.get_value_box", __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_5tslib_11unique_deltas(PyObject *__pyx_self, PyObject *__pyx_v_arr); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5tslib_11unique_deltas = {__Pyx_NAMESTR("unique_deltas"), (PyCFunction)__pyx_pw_6pandas_5tslib_11unique_deltas, METH_O, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5tslib_11unique_deltas(PyObject *__pyx_self, PyObject *__pyx_v_arr) { CYTHON_UNUSED int __pyx_lineno = 0; CYTHON_UNUSED const char *__pyx_filename = NULL; CYTHON_UNUSED int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("unique_deltas (wrapper)", 0); if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_arr), __pyx_ptype_5numpy_ndarray, 1, "arr", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 494; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5tslib_10unique_deltas(__pyx_self, ((PyArrayObject *)__pyx_v_arr)); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/tslib.pyx":494 * # Frequency inference * * def unique_deltas(ndarray[int64_t] arr): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = len(arr) */ static PyObject *__pyx_pf_6pandas_5tslib_10unique_deltas(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_arr) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_n; __pyx_t_5numpy_int64_t __pyx_v_val; khiter_t __pyx_v_k; kh_int64_t *__pyx_v_table; int __pyx_v_ret; PyObject *__pyx_v_uniques = 0; PyObject *__pyx_v_result = NULL; __Pyx_LocalBuf_ND __pyx_pybuffernd_arr; __Pyx_Buffer __pyx_pybuffer_arr; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; PyObject *__pyx_t_2 = NULL; Py_ssize_t __pyx_t_3; Py_ssize_t __pyx_t_4; int __pyx_t_5; Py_ssize_t __pyx_t_6; int __pyx_t_7; int __pyx_t_8; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; PyObject *__pyx_t_11 = NULL; PyObject *__pyx_t_12 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("unique_deltas", 0); __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_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 494; __pyx_clineno = __LINE__; goto __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/tslib.pyx":496 * def unique_deltas(ndarray[int64_t] arr): * cdef: * Py_ssize_t i, n = len(arr) # <<<<<<<<<<<<<< * int64_t val * khiter_t k */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_arr)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 496; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/tslib.pyx":500 * khiter_t k * kh_int64_t *table * int ret = 0 # <<<<<<<<<<<<<< * list uniques = [] * */ __pyx_v_ret = 0; /* "pandas/tslib.pyx":501 * kh_int64_t *table * int ret = 0 * list uniques = [] # <<<<<<<<<<<<<< * * table = kh_init_int64() */ __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 501; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_v_uniques = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; /* "pandas/tslib.pyx":503 * list uniques = [] * * table = kh_init_int64() # <<<<<<<<<<<<<< * kh_resize_int64(table, 10) * for i in range(n - 1): */ __pyx_v_table = kh_init_int64(); /* "pandas/tslib.pyx":504 * * table = kh_init_int64() * kh_resize_int64(table, 10) # <<<<<<<<<<<<<< * for i in range(n - 1): * val = arr[i + 1] - arr[i] */ kh_resize_int64(__pyx_v_table, 10); /* "pandas/tslib.pyx":505 * table = kh_init_int64() * kh_resize_int64(table, 10) * for i in range(n - 1): # <<<<<<<<<<<<<< * val = arr[i + 1] - arr[i] * k = kh_get_int64(table, val) */ __pyx_t_1 = (__pyx_v_n - 1); for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_1; __pyx_t_3+=1) { __pyx_v_i = __pyx_t_3; /* "pandas/tslib.pyx":506 * kh_resize_int64(table, 10) * for i in range(n - 1): * val = arr[i + 1] - arr[i] # <<<<<<<<<<<<<< * k = kh_get_int64(table, val) * if k == table.n_buckets: */ __pyx_t_4 = (__pyx_v_i + 1); __pyx_t_5 = -1; if (__pyx_t_4 < 0) { __pyx_t_4 += __pyx_pybuffernd_arr.diminfo[0].shape; if (unlikely(__pyx_t_4 < 0)) __pyx_t_5 = 0; } else if (unlikely(__pyx_t_4 >= __pyx_pybuffernd_arr.diminfo[0].shape)) __pyx_t_5 = 0; if (unlikely(__pyx_t_5 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_5); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 506; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_6 = __pyx_v_i; __pyx_t_5 = -1; if (__pyx_t_6 < 0) { __pyx_t_6 += __pyx_pybuffernd_arr.diminfo[0].shape; if (unlikely(__pyx_t_6 < 0)) __pyx_t_5 = 0; } else if (unlikely(__pyx_t_6 >= __pyx_pybuffernd_arr.diminfo[0].shape)) __pyx_t_5 = 0; if (unlikely(__pyx_t_5 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_5); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 506; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_val = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_arr.rcbuffer->pybuffer.buf, __pyx_t_4, __pyx_pybuffernd_arr.diminfo[0].strides)) - (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_arr.rcbuffer->pybuffer.buf, __pyx_t_6, __pyx_pybuffernd_arr.diminfo[0].strides))); /* "pandas/tslib.pyx":507 * for i in range(n - 1): * val = arr[i + 1] - arr[i] * k = kh_get_int64(table, val) # <<<<<<<<<<<<<< * if k == table.n_buckets: * kh_put_int64(table, val, &ret) */ __pyx_v_k = kh_get_int64(__pyx_v_table, __pyx_v_val); /* "pandas/tslib.pyx":508 * val = arr[i + 1] - arr[i] * k = kh_get_int64(table, val) * if k == table.n_buckets: # <<<<<<<<<<<<<< * kh_put_int64(table, val, &ret) * uniques.append(val) */ __pyx_t_7 = ((__pyx_v_k == __pyx_v_table->n_buckets) != 0); if (__pyx_t_7) { /* "pandas/tslib.pyx":509 * k = kh_get_int64(table, val) * if k == table.n_buckets: * kh_put_int64(table, val, &ret) # <<<<<<<<<<<<<< * uniques.append(val) * kh_destroy_int64(table) */ kh_put_int64(__pyx_v_table, __pyx_v_val, (&__pyx_v_ret)); /* "pandas/tslib.pyx":510 * if k == table.n_buckets: * kh_put_int64(table, val, &ret) * uniques.append(val) # <<<<<<<<<<<<<< * kh_destroy_int64(table) * */ __pyx_t_2 = __Pyx_PyInt_to_py_npy_int64(__pyx_v_val); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 510; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_8 = __Pyx_PyList_Append(__pyx_v_uniques, __pyx_t_2); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 510; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; goto __pyx_L5; } __pyx_L5:; } /* "pandas/tslib.pyx":511 * kh_put_int64(table, val, &ret) * uniques.append(val) * kh_destroy_int64(table) # <<<<<<<<<<<<<< * * result = np.array(uniques, dtype=np.int64) */ kh_destroy_int64(__pyx_v_table); /* "pandas/tslib.pyx":513 * kh_destroy_int64(table) * * result = np.array(uniques, dtype=np.int64) # <<<<<<<<<<<<<< * result.sort() * return result */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 513; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__array); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 513; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 513; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(((PyObject *)__pyx_v_uniques)); PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_uniques)); __Pyx_GIVEREF(((PyObject *)__pyx_v_uniques)); __pyx_t_10 = PyDict_New(); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 513; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_10)); __pyx_t_11 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 513; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s__int64); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 513; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; if (PyDict_SetItem(__pyx_t_10, ((PyObject *)__pyx_n_s__dtype), __pyx_t_12) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 513; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __pyx_t_12 = PyObject_Call(__pyx_t_9, ((PyObject *)__pyx_t_2), ((PyObject *)__pyx_t_10)); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 513; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_10)); __pyx_t_10 = 0; __pyx_v_result = __pyx_t_12; __pyx_t_12 = 0; /* "pandas/tslib.pyx":514 * * result = np.array(uniques, dtype=np.int64) * result.sort() # <<<<<<<<<<<<<< * return result * */ __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_result, __pyx_n_s__sort); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 514; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __pyx_t_10 = PyObject_Call(__pyx_t_12, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 514; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; /* "pandas/tslib.pyx":515 * result = np.array(uniques, dtype=np.int64) * result.sort() * return result # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_result); __pyx_r = __pyx_v_result; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_9); __Pyx_XDECREF(__pyx_t_10); __Pyx_XDECREF(__pyx_t_11); __Pyx_XDECREF(__pyx_t_12); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_arr.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.tslib.unique_deltas", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_arr.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF(__pyx_v_uniques); __Pyx_XDECREF(__pyx_v_result); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/tslib.pyx":518 * * * cdef inline bint _is_multiple(int64_t us, int64_t mult): # <<<<<<<<<<<<<< * return us % mult == 0 * */ static CYTHON_INLINE int __pyx_f_6pandas_5tslib__is_multiple(__pyx_t_5numpy_int64_t __pyx_v_us, __pyx_t_5numpy_int64_t __pyx_v_mult) { int __pyx_r; __Pyx_RefNannyDeclarations int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_is_multiple", 0); /* "pandas/tslib.pyx":519 * * cdef inline bint _is_multiple(int64_t us, int64_t mult): * return us % mult == 0 # <<<<<<<<<<<<<< * * */ if (unlikely(__pyx_v_mult == 0)) { #ifdef WITH_THREAD PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure(); #endif PyErr_Format(PyExc_ZeroDivisionError, "integer division or modulo by zero"); #ifdef WITH_THREAD PyGILState_Release(__pyx_gilstate_save); #endif {__pyx_filename = __pyx_f[0]; __pyx_lineno = 519; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_r = (__Pyx_mod___pyx_t_5numpy_int64_t(__pyx_v_us, __pyx_v_mult) == 0); goto __pyx_L0; __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_WriteUnraisable("pandas.tslib._is_multiple", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5tslib_13apply_offset(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5tslib_13apply_offset = {__Pyx_NAMESTR("apply_offset"), (PyCFunction)__pyx_pw_6pandas_5tslib_13apply_offset, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5tslib_13apply_offset(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_values = 0; CYTHON_UNUSED PyObject *__pyx_v_offset = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("apply_offset (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__values,&__pyx_n_s__offset,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__values)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__offset)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("apply_offset", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 522; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "apply_offset") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 522; __pyx_clineno = __LINE__; goto __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_offset = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("apply_offset", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 522; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.tslib.apply_offset", __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_filename = __pyx_f[0]; __pyx_lineno = 522; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5tslib_12apply_offset(__pyx_self, __pyx_v_values, __pyx_v_offset); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/tslib.pyx":522 * * * def apply_offset(ndarray[object] values, object offset): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = len(values) */ static PyObject *__pyx_pf_6pandas_5tslib_12apply_offset(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, CYTHON_UNUSED PyObject *__pyx_v_offset) { Py_ssize_t __pyx_v_n; CYTHON_UNUSED PyArrayObject *__pyx_v_new_values = 0; PyObject *__pyx_v_result = NULL; __Pyx_LocalBuf_ND __pyx_pybuffernd_new_values; __Pyx_Buffer __pyx_pybuffer_new_values; __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; PyArrayObject *__pyx_t_6 = NULL; int __pyx_t_7; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("apply_offset", 0); __pyx_pybuffer_new_values.pybuffer.buf = NULL; __pyx_pybuffer_new_values.refcount = 0; __pyx_pybuffernd_new_values.data = NULL; __pyx_pybuffernd_new_values.rcbuffer = &__pyx_pybuffer_new_values; __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_filename = __pyx_f[0]; __pyx_lineno = 522; __pyx_clineno = __LINE__; goto __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/tslib.pyx":524 * def apply_offset(ndarray[object] values, object offset): * cdef: * Py_ssize_t i, n = len(values) # <<<<<<<<<<<<<< * ndarray[int64_t] new_values * object boxed */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 524; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/tslib.pyx":528 * object boxed * * result = np.empty(n, dtype='M8[ns]') # <<<<<<<<<<<<<< * new_values = result.view('i8') * */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 528; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 528; __pyx_clineno = __LINE__; goto __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_n); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 528; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 528; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 528; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_2)); if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__dtype), ((PyObject *)__pyx_kp_s_18)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 528; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_5 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 528; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __pyx_v_result = __pyx_t_5; __pyx_t_5 = 0; /* "pandas/tslib.pyx":529 * * result = np.empty(n, dtype='M8[ns]') * new_values = result.view('i8') # <<<<<<<<<<<<<< * * */ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_result, __pyx_n_s__view); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 529; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_2 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_k_tuple_33), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 529; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 529; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_6 = ((PyArrayObject *)__pyx_t_2); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_new_values.rcbuffer->pybuffer); __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_new_values.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_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_new_values.rcbuffer->pybuffer, (PyObject*)__pyx_v_new_values, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_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_pybuffernd_new_values.diminfo[0].strides = __pyx_pybuffernd_new_values.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_new_values.diminfo[0].shape = __pyx_pybuffernd_new_values.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 529; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_6 = 0; __pyx_v_new_values = ((PyArrayObject *)__pyx_t_2); __pyx_t_2 = 0; __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_XDECREF(__pyx_t_5); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_new_values.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.tslib.apply_offset", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_new_values.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_new_values); __Pyx_XDECREF(__pyx_v_result); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/tslib.pyx":532 * * * cdef inline bint _cmp_scalar(int64_t lhs, int64_t rhs, int op) except -1: # <<<<<<<<<<<<<< * if op == Py_EQ: * return lhs == rhs */ static CYTHON_INLINE int __pyx_f_6pandas_5tslib__cmp_scalar(__pyx_t_5numpy_int64_t __pyx_v_lhs, __pyx_t_5numpy_int64_t __pyx_v_rhs, int __pyx_v_op) { int __pyx_r; __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("_cmp_scalar", 0); /* "pandas/tslib.pyx":533 * * cdef inline bint _cmp_scalar(int64_t lhs, int64_t rhs, int op) except -1: * if op == Py_EQ: # <<<<<<<<<<<<<< * return lhs == rhs * elif op == Py_NE: */ __pyx_t_1 = ((__pyx_v_op == Py_EQ) != 0); if (__pyx_t_1) { /* "pandas/tslib.pyx":534 * cdef inline bint _cmp_scalar(int64_t lhs, int64_t rhs, int op) except -1: * if op == Py_EQ: * return lhs == rhs # <<<<<<<<<<<<<< * elif op == Py_NE: * return lhs != rhs */ __pyx_r = (__pyx_v_lhs == __pyx_v_rhs); goto __pyx_L0; goto __pyx_L3; } /* "pandas/tslib.pyx":535 * if op == Py_EQ: * return lhs == rhs * elif op == Py_NE: # <<<<<<<<<<<<<< * return lhs != rhs * elif op == Py_LT: */ __pyx_t_1 = ((__pyx_v_op == Py_NE) != 0); if (__pyx_t_1) { /* "pandas/tslib.pyx":536 * return lhs == rhs * elif op == Py_NE: * return lhs != rhs # <<<<<<<<<<<<<< * elif op == Py_LT: * return lhs < rhs */ __pyx_r = (__pyx_v_lhs != __pyx_v_rhs); goto __pyx_L0; goto __pyx_L3; } /* "pandas/tslib.pyx":537 * elif op == Py_NE: * return lhs != rhs * elif op == Py_LT: # <<<<<<<<<<<<<< * return lhs < rhs * elif op == Py_LE: */ __pyx_t_1 = ((__pyx_v_op == Py_LT) != 0); if (__pyx_t_1) { /* "pandas/tslib.pyx":538 * return lhs != rhs * elif op == Py_LT: * return lhs < rhs # <<<<<<<<<<<<<< * elif op == Py_LE: * return lhs <= rhs */ __pyx_r = (__pyx_v_lhs < __pyx_v_rhs); goto __pyx_L0; goto __pyx_L3; } /* "pandas/tslib.pyx":539 * elif op == Py_LT: * return lhs < rhs * elif op == Py_LE: # <<<<<<<<<<<<<< * return lhs <= rhs * elif op == Py_GT: */ __pyx_t_1 = ((__pyx_v_op == Py_LE) != 0); if (__pyx_t_1) { /* "pandas/tslib.pyx":540 * return lhs < rhs * elif op == Py_LE: * return lhs <= rhs # <<<<<<<<<<<<<< * elif op == Py_GT: * return lhs > rhs */ __pyx_r = (__pyx_v_lhs <= __pyx_v_rhs); goto __pyx_L0; goto __pyx_L3; } /* "pandas/tslib.pyx":541 * elif op == Py_LE: * return lhs <= rhs * elif op == Py_GT: # <<<<<<<<<<<<<< * return lhs > rhs * elif op == Py_GE: */ __pyx_t_1 = ((__pyx_v_op == Py_GT) != 0); if (__pyx_t_1) { /* "pandas/tslib.pyx":542 * return lhs <= rhs * elif op == Py_GT: * return lhs > rhs # <<<<<<<<<<<<<< * elif op == Py_GE: * return lhs >= rhs */ __pyx_r = (__pyx_v_lhs > __pyx_v_rhs); goto __pyx_L0; goto __pyx_L3; } /* "pandas/tslib.pyx":543 * elif op == Py_GT: * return lhs > rhs * elif op == Py_GE: # <<<<<<<<<<<<<< * return lhs >= rhs * */ __pyx_t_1 = ((__pyx_v_op == Py_GE) != 0); if (__pyx_t_1) { /* "pandas/tslib.pyx":544 * return lhs > rhs * elif op == Py_GE: * return lhs >= rhs # <<<<<<<<<<<<<< * * */ __pyx_r = (__pyx_v_lhs >= __pyx_v_rhs); goto __pyx_L0; goto __pyx_L3; } __pyx_L3:; __pyx_r = 0; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static Py_hash_t __pyx_pw_6pandas_5tslib_10_Timestamp_1__hash__(PyObject *__pyx_v_self); /*proto*/ static Py_hash_t __pyx_pw_6pandas_5tslib_10_Timestamp_1__hash__(PyObject *__pyx_v_self) { Py_hash_t __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__hash__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_5tslib_10_Timestamp___hash__(((struct __pyx_obj_6pandas_5tslib__Timestamp *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/tslib.pyx":568 * object offset # frequency reference * * def __hash__(_Timestamp self): # <<<<<<<<<<<<<< * if self.nanosecond: * return hash(self.value) */ static Py_hash_t __pyx_pf_6pandas_5tslib_10_Timestamp___hash__(struct __pyx_obj_6pandas_5tslib__Timestamp *__pyx_v_self) { Py_hash_t __pyx_r; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; Py_hash_t __pyx_t_3; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__hash__", 0); /* "pandas/tslib.pyx":569 * * def __hash__(_Timestamp self): * if self.nanosecond: # <<<<<<<<<<<<<< * return hash(self.value) * return datetime.__hash__(self) */ __pyx_t_1 = (__pyx_v_self->nanosecond != 0); if (__pyx_t_1) { /* "pandas/tslib.pyx":570 * def __hash__(_Timestamp self): * if self.nanosecond: * return hash(self.value) # <<<<<<<<<<<<<< * return datetime.__hash__(self) * */ __pyx_t_2 = __Pyx_PyInt_to_py_npy_int64(__pyx_v_self->value); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 570; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyObject_Hash(__pyx_t_2); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 570; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_3; goto __pyx_L0; goto __pyx_L3; } __pyx_L3:; /* "pandas/tslib.pyx":571 * if self.nanosecond: * return hash(self.value) * return datetime.__hash__(self) # <<<<<<<<<<<<<< * * def __richcmp__(_Timestamp self, object other, int op): */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)((PyObject*)__pyx_ptype_8datetime_datetime)), __pyx_n_s____hash__); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 571; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 571; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(((PyObject *)__pyx_v_self)); PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_v_self)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self)); __pyx_t_5 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 571; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __pyx_t_3 = __Pyx_PyInt_AsHash_t(__pyx_t_5); if (unlikely((__pyx_t_3 == (Py_hash_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 571; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_r = __pyx_t_3; goto __pyx_L0; __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("pandas.tslib._Timestamp.__hash__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; if (unlikely(__pyx_r == -1) && !PyErr_Occurred()) __pyx_r = -2; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5tslib_10_Timestamp_3__richcmp__(PyObject *__pyx_v_self, PyObject *__pyx_v_other, int __pyx_v_op); /*proto*/ static PyObject *__pyx_pw_6pandas_5tslib_10_Timestamp_3__richcmp__(PyObject *__pyx_v_self, PyObject *__pyx_v_other, int __pyx_v_op) { CYTHON_UNUSED int __pyx_lineno = 0; CYTHON_UNUSED const char *__pyx_filename = NULL; CYTHON_UNUSED int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__richcmp__ (wrapper)", 0); if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_self), __pyx_ptype_6pandas_5tslib__Timestamp, 1, "self", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 573; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5tslib_10_Timestamp_2__richcmp__(((struct __pyx_obj_6pandas_5tslib__Timestamp *)__pyx_v_self), ((PyObject *)__pyx_v_other), ((int)__pyx_v_op)); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/tslib.pyx":573 * return datetime.__hash__(self) * * def __richcmp__(_Timestamp self, object other, int op): # <<<<<<<<<<<<<< * cdef: * _Timestamp ots */ static PyObject *__pyx_pf_6pandas_5tslib_10_Timestamp_2__richcmp__(struct __pyx_obj_6pandas_5tslib__Timestamp *__pyx_v_self, PyObject *__pyx_v_other, int __pyx_v_op) { struct __pyx_obj_6pandas_5tslib__Timestamp *__pyx_v_ots = 0; int __pyx_v_ndim; PyDateTime_DateTime *__pyx_v_val = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; int __pyx_t_9; PyObject *__pyx_t_10 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__richcmp__", 0); __Pyx_INCREF(__pyx_v_other); /* "pandas/tslib.pyx":578 * int ndim * * if isinstance(other, _Timestamp): # <<<<<<<<<<<<<< * if isinstance(other, _NaT): * return _cmp_nat_dt(other, self, _reverse_ops[op]) */ __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_other, ((PyObject*)__pyx_ptype_6pandas_5tslib__Timestamp)); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { /* "pandas/tslib.pyx":579 * * if isinstance(other, _Timestamp): * if isinstance(other, _NaT): # <<<<<<<<<<<<<< * return _cmp_nat_dt(other, self, _reverse_ops[op]) * ots = other */ __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_other, ((PyObject*)__pyx_ptype_6pandas_5tslib__NaT)); __pyx_t_1 = (__pyx_t_2 != 0); if (__pyx_t_1) { /* "pandas/tslib.pyx":580 * if isinstance(other, _Timestamp): * if isinstance(other, _NaT): * return _cmp_nat_dt(other, self, _reverse_ops[op]) # <<<<<<<<<<<<<< * ots = other * elif isinstance(other, datetime): */ __Pyx_XDECREF(__pyx_r); if (!(likely(((__pyx_v_other) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_other, __pyx_ptype_6pandas_5tslib__NaT))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 580; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_1 = __pyx_f_6pandas_5tslib__cmp_nat_dt(((struct __pyx_obj_6pandas_5tslib__NaT *)__pyx_v_other), __pyx_v_self, (__pyx_v_6pandas_5tslib__reverse_ops[__pyx_v_op])); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 580; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_t_1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 580; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; goto __pyx_L4; } __pyx_L4:; /* "pandas/tslib.pyx":581 * if isinstance(other, _NaT): * return _cmp_nat_dt(other, self, _reverse_ops[op]) * ots = other # <<<<<<<<<<<<<< * elif isinstance(other, datetime): * if self.nanosecond == 0: */ if (!(likely(((__pyx_v_other) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_other, __pyx_ptype_6pandas_5tslib__Timestamp))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 581; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_INCREF(__pyx_v_other); __pyx_v_ots = ((struct __pyx_obj_6pandas_5tslib__Timestamp *)__pyx_v_other); goto __pyx_L3; } /* "pandas/tslib.pyx":582 * return _cmp_nat_dt(other, self, _reverse_ops[op]) * ots = other * elif isinstance(other, datetime): # <<<<<<<<<<<<<< * if self.nanosecond == 0: * val = self.to_datetime() */ __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_other, ((PyObject*)__pyx_ptype_8datetime_datetime)); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { /* "pandas/tslib.pyx":583 * ots = other * elif isinstance(other, datetime): * if self.nanosecond == 0: # <<<<<<<<<<<<<< * val = self.to_datetime() * return PyObject_RichCompareBool(val, other, op) */ __pyx_t_2 = ((__pyx_v_self->nanosecond == 0) != 0); if (__pyx_t_2) { /* "pandas/tslib.pyx":584 * elif isinstance(other, datetime): * if self.nanosecond == 0: * val = self.to_datetime() # <<<<<<<<<<<<<< * return PyObject_RichCompareBool(val, other, op) * */ __pyx_t_3 = ((PyObject *)((struct __pyx_vtabstruct_6pandas_5tslib__Timestamp *)__pyx_v_self->__pyx_vtab)->to_datetime(__pyx_v_self, 0)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 584; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_v_val = ((PyDateTime_DateTime *)__pyx_t_3); __pyx_t_3 = 0; /* "pandas/tslib.pyx":585 * if self.nanosecond == 0: * val = self.to_datetime() * return PyObject_RichCompareBool(val, other, op) # <<<<<<<<<<<<<< * * try: */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = PyObject_RichCompareBool(((PyObject *)__pyx_v_val), __pyx_v_other, __pyx_v_op); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 585; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 585; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; goto __pyx_L5; } __pyx_L5:; /* "pandas/tslib.pyx":587 * return PyObject_RichCompareBool(val, other, op) * * try: # <<<<<<<<<<<<<< * ots = Timestamp(other) * except ValueError: */ { __Pyx_ExceptionSave(&__pyx_t_4, &__pyx_t_5, &__pyx_t_6); __Pyx_XGOTREF(__pyx_t_4); __Pyx_XGOTREF(__pyx_t_5); __Pyx_XGOTREF(__pyx_t_6); /*try:*/ { /* "pandas/tslib.pyx":588 * * try: * ots = Timestamp(other) # <<<<<<<<<<<<<< * except ValueError: * return self._compare_outside_nanorange(other, op) */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s__Timestamp); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 588; __pyx_clineno = __LINE__; goto __pyx_L6_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 588; __pyx_clineno = __LINE__; goto __pyx_L6_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_INCREF(__pyx_v_other); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_v_other); __Pyx_GIVEREF(__pyx_v_other); __pyx_t_8 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_7), NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 588; __pyx_clineno = __LINE__; goto __pyx_L6_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0; if (!(likely(((__pyx_t_8) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_8, __pyx_ptype_6pandas_5tslib__Timestamp))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 588; __pyx_clineno = __LINE__; goto __pyx_L6_error;} __pyx_v_ots = ((struct __pyx_obj_6pandas_5tslib__Timestamp *)__pyx_t_8); __pyx_t_8 = 0; } __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; goto __pyx_L13_try_end; __pyx_L6_error:; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; /* "pandas/tslib.pyx":589 * try: * ots = Timestamp(other) * except ValueError: # <<<<<<<<<<<<<< * return self._compare_outside_nanorange(other, op) * else: */ __pyx_t_9 = PyErr_ExceptionMatches(__pyx_builtin_ValueError); if (__pyx_t_9) { __Pyx_AddTraceback("pandas.tslib._Timestamp.__richcmp__", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_8, &__pyx_t_7, &__pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 589; __pyx_clineno = __LINE__; goto __pyx_L8_except_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_GOTREF(__pyx_t_7); __Pyx_GOTREF(__pyx_t_3); /* "pandas/tslib.pyx":590 * ots = Timestamp(other) * except ValueError: * return self._compare_outside_nanorange(other, op) # <<<<<<<<<<<<<< * else: * ndim = getattr(other, _NDIM_STRING, -1) */ __Pyx_XDECREF(__pyx_r); if (!(likely(((__pyx_v_other) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_other, __pyx_ptype_8datetime_datetime))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 590; __pyx_clineno = __LINE__; goto __pyx_L8_except_error;} __pyx_t_2 = ((struct __pyx_vtabstruct_6pandas_5tslib__Timestamp *)__pyx_v_self->__pyx_vtab)->_compare_outside_nanorange(__pyx_v_self, ((PyDateTime_DateTime *)__pyx_v_other), __pyx_v_op); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 590; __pyx_clineno = __LINE__; goto __pyx_L8_except_error;} __pyx_t_10 = __Pyx_PyBool_FromLong(__pyx_t_2); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 590; __pyx_clineno = __LINE__; goto __pyx_L8_except_error;} __Pyx_GOTREF(__pyx_t_10); __pyx_r = __pyx_t_10; __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; goto __pyx_L9_except_return; __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; goto __pyx_L7_exception_handled; } __pyx_L8_except_error:; __Pyx_XGIVEREF(__pyx_t_4); __Pyx_XGIVEREF(__pyx_t_5); __Pyx_XGIVEREF(__pyx_t_6); __Pyx_ExceptionReset(__pyx_t_4, __pyx_t_5, __pyx_t_6); goto __pyx_L1_error; __pyx_L9_except_return:; __Pyx_XGIVEREF(__pyx_t_4); __Pyx_XGIVEREF(__pyx_t_5); __Pyx_XGIVEREF(__pyx_t_6); __Pyx_ExceptionReset(__pyx_t_4, __pyx_t_5, __pyx_t_6); goto __pyx_L0; __pyx_L7_exception_handled:; __Pyx_XGIVEREF(__pyx_t_4); __Pyx_XGIVEREF(__pyx_t_5); __Pyx_XGIVEREF(__pyx_t_6); __Pyx_ExceptionReset(__pyx_t_4, __pyx_t_5, __pyx_t_6); __pyx_L13_try_end:; } goto __pyx_L3; } /*else*/ { /* "pandas/tslib.pyx":592 * return self._compare_outside_nanorange(other, op) * else: * ndim = getattr(other, _NDIM_STRING, -1) # <<<<<<<<<<<<<< * * if ndim != -1: */ __pyx_t_3 = ((PyObject *)__pyx_v_6pandas_5tslib__NDIM_STRING); __Pyx_INCREF(__pyx_t_3); __pyx_t_7 = __Pyx_GetAttr3(__pyx_v_other, __pyx_t_3, __pyx_int_neg_1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 592; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_9 = __Pyx_PyInt_AsInt(__pyx_t_7); if (unlikely((__pyx_t_9 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 592; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_v_ndim = __pyx_t_9; /* "pandas/tslib.pyx":594 * ndim = getattr(other, _NDIM_STRING, -1) * * if ndim != -1: # <<<<<<<<<<<<<< * if ndim == 0: * if isinstance(other, np.datetime64): */ __pyx_t_2 = ((__pyx_v_ndim != -1) != 0); if (__pyx_t_2) { /* "pandas/tslib.pyx":595 * * if ndim != -1: * if ndim == 0: # <<<<<<<<<<<<<< * if isinstance(other, np.datetime64): * other = Timestamp(other) */ __pyx_t_2 = ((__pyx_v_ndim == 0) != 0); if (__pyx_t_2) { /* "pandas/tslib.pyx":596 * if ndim != -1: * if ndim == 0: * if isinstance(other, np.datetime64): # <<<<<<<<<<<<<< * other = Timestamp(other) * else: */ __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 596; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s__datetime64); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 596; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_2 = PyObject_IsInstance(__pyx_v_other, __pyx_t_3); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 596; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_1 = (__pyx_t_2 != 0); if (__pyx_t_1) { /* "pandas/tslib.pyx":597 * if ndim == 0: * if isinstance(other, np.datetime64): * other = Timestamp(other) # <<<<<<<<<<<<<< * else: * raise TypeError('Cannot compare type %r with type %r' % */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s__Timestamp); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 597; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 597; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_INCREF(__pyx_v_other); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_v_other); __Pyx_GIVEREF(__pyx_v_other); __pyx_t_8 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_7), NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 597; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0; __Pyx_DECREF_SET(__pyx_v_other, __pyx_t_8); __pyx_t_8 = 0; goto __pyx_L18; } /*else*/ { /* "pandas/tslib.pyx":600 * else: * raise TypeError('Cannot compare type %r with type %r' % * (type(self).__name__, # <<<<<<<<<<<<<< * type(other).__name__)) * return PyObject_RichCompare(other, self, _reverse_ops[op]) */ __pyx_t_8 = __Pyx_PyObject_GetAttrStr(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))), __pyx_n_s____name__); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 600; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); /* "pandas/tslib.pyx":601 * raise TypeError('Cannot compare type %r with type %r' % * (type(self).__name__, * type(other).__name__)) # <<<<<<<<<<<<<< * return PyObject_RichCompare(other, self, _reverse_ops[op]) * else: */ __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)Py_TYPE(__pyx_v_other)), __pyx_n_s____name__); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 601; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 600; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_8); __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_7); __Pyx_GIVEREF(__pyx_t_7); __pyx_t_8 = 0; __pyx_t_7 = 0; __pyx_t_7 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_34), ((PyObject *)__pyx_t_3)); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 599; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_7)); __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 599; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_t_7)); __Pyx_GIVEREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0; __pyx_t_7 = PyObject_Call(__pyx_builtin_TypeError, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 599; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; __Pyx_Raise(__pyx_t_7, 0, 0, 0); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 599; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_L18:; goto __pyx_L17; } __pyx_L17:; /* "pandas/tslib.pyx":602 * (type(self).__name__, * type(other).__name__)) * return PyObject_RichCompare(other, self, _reverse_ops[op]) # <<<<<<<<<<<<<< * else: * if op == Py_EQ: */ __Pyx_XDECREF(__pyx_r); __pyx_t_7 = PyObject_RichCompare(__pyx_v_other, ((PyObject *)__pyx_v_self), (__pyx_v_6pandas_5tslib__reverse_ops[__pyx_v_op])); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 602; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_r = __pyx_t_7; __pyx_t_7 = 0; goto __pyx_L0; goto __pyx_L16; } /*else*/ { /* "pandas/tslib.pyx":604 * return PyObject_RichCompare(other, self, _reverse_ops[op]) * else: * if op == Py_EQ: # <<<<<<<<<<<<<< * return False * elif op == Py_NE: */ __pyx_t_1 = ((__pyx_v_op == Py_EQ) != 0); if (__pyx_t_1) { /* "pandas/tslib.pyx":605 * else: * if op == Py_EQ: * return False # <<<<<<<<<<<<<< * elif op == Py_NE: * return True */ __Pyx_XDECREF(__pyx_r); __pyx_t_7 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 605; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_r = __pyx_t_7; __pyx_t_7 = 0; goto __pyx_L0; goto __pyx_L19; } /* "pandas/tslib.pyx":606 * if op == Py_EQ: * return False * elif op == Py_NE: # <<<<<<<<<<<<<< * return True * raise TypeError('Cannot compare type %r with type %r' % */ __pyx_t_1 = ((__pyx_v_op == Py_NE) != 0); if (__pyx_t_1) { /* "pandas/tslib.pyx":607 * return False * elif op == Py_NE: * return True # <<<<<<<<<<<<<< * raise TypeError('Cannot compare type %r with type %r' % * (type(self).__name__, type(other).__name__)) */ __Pyx_XDECREF(__pyx_r); __pyx_t_7 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 607; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_r = __pyx_t_7; __pyx_t_7 = 0; goto __pyx_L0; goto __pyx_L19; } __pyx_L19:; /* "pandas/tslib.pyx":609 * return True * raise TypeError('Cannot compare type %r with type %r' % * (type(self).__name__, type(other).__name__)) # <<<<<<<<<<<<<< * * self._assert_tzawareness_compat(other) */ __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))), __pyx_n_s____name__); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 609; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)Py_TYPE(__pyx_v_other)), __pyx_n_s____name__); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 609; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 609; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_7); __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_7 = 0; __pyx_t_3 = 0; __pyx_t_3 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_34), ((PyObject *)__pyx_t_8)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 608; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_3)); __Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0; __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 608; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_8, 0, ((PyObject *)__pyx_t_3)); __Pyx_GIVEREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; __pyx_t_3 = PyObject_Call(__pyx_builtin_TypeError, ((PyObject *)__pyx_t_8), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 608; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0; __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 608; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_L16:; } __pyx_L3:; /* "pandas/tslib.pyx":611 * (type(self).__name__, type(other).__name__)) * * self._assert_tzawareness_compat(other) # <<<<<<<<<<<<<< * return _cmp_scalar(self.value, ots.value, op) * */ __pyx_t_9 = ((struct __pyx_vtabstruct_6pandas_5tslib__Timestamp *)__pyx_v_self->__pyx_vtab)->_assert_tzawareness_compat(__pyx_v_self, __pyx_v_other); if (unlikely(__pyx_t_9 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 611; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/tslib.pyx":612 * * self._assert_tzawareness_compat(other) * return _cmp_scalar(self.value, ots.value, op) # <<<<<<<<<<<<<< * * cdef bint _compare_outside_nanorange(_Timestamp self, datetime other, */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_6pandas_5tslib__cmp_scalar(__pyx_v_self->value, __pyx_v_ots->value, __pyx_v_op); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 612; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_t_1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 612; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_10); __Pyx_AddTraceback("pandas.tslib._Timestamp.__richcmp__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_ots); __Pyx_XDECREF((PyObject *)__pyx_v_val); __Pyx_XDECREF(__pyx_v_other); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/tslib.pyx":614 * return _cmp_scalar(self.value, ots.value, op) * * cdef bint _compare_outside_nanorange(_Timestamp self, datetime other, # <<<<<<<<<<<<<< * int op) except -1: * cdef datetime dtval = self.to_datetime() */ static int __pyx_f_6pandas_5tslib_10_Timestamp__compare_outside_nanorange(struct __pyx_obj_6pandas_5tslib__Timestamp *__pyx_v_self, PyDateTime_DateTime *__pyx_v_other, int __pyx_v_op) { PyDateTime_DateTime *__pyx_v_dtval = 0; int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; int __pyx_t_3; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_compare_outside_nanorange", 0); /* "pandas/tslib.pyx":616 * cdef bint _compare_outside_nanorange(_Timestamp self, datetime other, * int op) except -1: * cdef datetime dtval = self.to_datetime() # <<<<<<<<<<<<<< * * self._assert_tzawareness_compat(other) */ __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_6pandas_5tslib__Timestamp *)__pyx_v_self->__pyx_vtab)->to_datetime(__pyx_v_self, 0)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 616; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_v_dtval = ((PyDateTime_DateTime *)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/tslib.pyx":618 * cdef datetime dtval = self.to_datetime() * * self._assert_tzawareness_compat(other) # <<<<<<<<<<<<<< * * if self.nanosecond == 0: */ __pyx_t_2 = ((struct __pyx_vtabstruct_6pandas_5tslib__Timestamp *)__pyx_v_self->__pyx_vtab)->_assert_tzawareness_compat(__pyx_v_self, ((PyObject *)__pyx_v_other)); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 618; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/tslib.pyx":620 * self._assert_tzawareness_compat(other) * * if self.nanosecond == 0: # <<<<<<<<<<<<<< * return PyObject_RichCompareBool(dtval, other, op) * else: */ __pyx_t_3 = ((__pyx_v_self->nanosecond == 0) != 0); if (__pyx_t_3) { /* "pandas/tslib.pyx":621 * * if self.nanosecond == 0: * return PyObject_RichCompareBool(dtval, other, op) # <<<<<<<<<<<<<< * else: * if op == Py_EQ: */ __pyx_t_3 = PyObject_RichCompareBool(((PyObject *)__pyx_v_dtval), ((PyObject *)__pyx_v_other), __pyx_v_op); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 621; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_t_3; goto __pyx_L0; goto __pyx_L3; } /*else*/ { /* "pandas/tslib.pyx":623 * return PyObject_RichCompareBool(dtval, other, op) * else: * if op == Py_EQ: # <<<<<<<<<<<<<< * return False * elif op == Py_NE: */ __pyx_t_3 = ((__pyx_v_op == Py_EQ) != 0); if (__pyx_t_3) { /* "pandas/tslib.pyx":624 * else: * if op == Py_EQ: * return False # <<<<<<<<<<<<<< * elif op == Py_NE: * return True */ __pyx_r = 0; goto __pyx_L0; goto __pyx_L4; } /* "pandas/tslib.pyx":625 * if op == Py_EQ: * return False * elif op == Py_NE: # <<<<<<<<<<<<<< * return True * elif op == Py_LT: */ __pyx_t_3 = ((__pyx_v_op == Py_NE) != 0); if (__pyx_t_3) { /* "pandas/tslib.pyx":626 * return False * elif op == Py_NE: * return True # <<<<<<<<<<<<<< * elif op == Py_LT: * return dtval < other */ __pyx_r = 1; goto __pyx_L0; goto __pyx_L4; } /* "pandas/tslib.pyx":627 * elif op == Py_NE: * return True * elif op == Py_LT: # <<<<<<<<<<<<<< * return dtval < other * elif op == Py_LE: */ __pyx_t_3 = ((__pyx_v_op == Py_LT) != 0); if (__pyx_t_3) { /* "pandas/tslib.pyx":628 * return True * elif op == Py_LT: * return dtval < other # <<<<<<<<<<<<<< * elif op == Py_LE: * return dtval < other */ __pyx_t_1 = PyObject_RichCompare(((PyObject *)__pyx_v_dtval), ((PyObject *)__pyx_v_other), Py_LT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 628; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 628; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_3; goto __pyx_L0; goto __pyx_L4; } /* "pandas/tslib.pyx":629 * elif op == Py_LT: * return dtval < other * elif op == Py_LE: # <<<<<<<<<<<<<< * return dtval < other * elif op == Py_GT: */ __pyx_t_3 = ((__pyx_v_op == Py_LE) != 0); if (__pyx_t_3) { /* "pandas/tslib.pyx":630 * return dtval < other * elif op == Py_LE: * return dtval < other # <<<<<<<<<<<<<< * elif op == Py_GT: * return dtval >= other */ __pyx_t_1 = PyObject_RichCompare(((PyObject *)__pyx_v_dtval), ((PyObject *)__pyx_v_other), Py_LT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 630; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 630; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_3; goto __pyx_L0; goto __pyx_L4; } /* "pandas/tslib.pyx":631 * elif op == Py_LE: * return dtval < other * elif op == Py_GT: # <<<<<<<<<<<<<< * return dtval >= other * elif op == Py_GE: */ __pyx_t_3 = ((__pyx_v_op == Py_GT) != 0); if (__pyx_t_3) { /* "pandas/tslib.pyx":632 * return dtval < other * elif op == Py_GT: * return dtval >= other # <<<<<<<<<<<<<< * elif op == Py_GE: * return dtval >= other */ __pyx_t_1 = PyObject_RichCompare(((PyObject *)__pyx_v_dtval), ((PyObject *)__pyx_v_other), Py_GE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 632; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 632; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_3; goto __pyx_L0; goto __pyx_L4; } /* "pandas/tslib.pyx":633 * elif op == Py_GT: * return dtval >= other * elif op == Py_GE: # <<<<<<<<<<<<<< * return dtval >= other * */ __pyx_t_3 = ((__pyx_v_op == Py_GE) != 0); if (__pyx_t_3) { /* "pandas/tslib.pyx":634 * return dtval >= other * elif op == Py_GE: * return dtval >= other # <<<<<<<<<<<<<< * * cdef int _assert_tzawareness_compat(_Timestamp self, */ __pyx_t_1 = PyObject_RichCompare(((PyObject *)__pyx_v_dtval), ((PyObject *)__pyx_v_other), Py_GE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 634; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 634; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_3; goto __pyx_L0; goto __pyx_L4; } __pyx_L4:; } __pyx_L3:; __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas.tslib._Timestamp._compare_outside_nanorange", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_dtval); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/tslib.pyx":636 * return dtval >= other * * cdef int _assert_tzawareness_compat(_Timestamp self, # <<<<<<<<<<<<<< * object other) except -1: * if self.tzinfo is None: */ static int __pyx_f_6pandas_5tslib_10_Timestamp__assert_tzawareness_compat(struct __pyx_obj_6pandas_5tslib__Timestamp *__pyx_v_self, PyObject *__pyx_v_other) { int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; int __pyx_t_3; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_assert_tzawareness_compat", 0); /* "pandas/tslib.pyx":638 * cdef int _assert_tzawareness_compat(_Timestamp self, * object other) except -1: * if self.tzinfo is None: # <<<<<<<<<<<<<< * if other.tzinfo is not None: * raise ValueError('Cannot compare tz-naive and tz-aware ' */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s__tzinfo); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 638; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = (__pyx_t_1 == Py_None); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { /* "pandas/tslib.pyx":639 * object other) except -1: * if self.tzinfo is None: * if other.tzinfo is not None: # <<<<<<<<<<<<<< * raise ValueError('Cannot compare tz-naive and tz-aware ' * 'timestamps') */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_other, __pyx_n_s__tzinfo); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 639; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = (__pyx_t_1 != Py_None); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_2 = (__pyx_t_3 != 0); if (__pyx_t_2) { /* "pandas/tslib.pyx":640 * if self.tzinfo is None: * if other.tzinfo is not None: * raise ValueError('Cannot compare tz-naive and tz-aware ' # <<<<<<<<<<<<<< * 'timestamps') * elif other.tzinfo is None: */ __pyx_t_1 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_36), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 640; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 640; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L4; } __pyx_L4:; goto __pyx_L3; } /* "pandas/tslib.pyx":642 * raise ValueError('Cannot compare tz-naive and tz-aware ' * 'timestamps') * elif other.tzinfo is None: # <<<<<<<<<<<<<< * raise ValueError('Cannot compare tz-naive and tz-aware timestamps') * */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_other, __pyx_n_s__tzinfo); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 642; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = (__pyx_t_1 == Py_None); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { /* "pandas/tslib.pyx":643 * 'timestamps') * elif other.tzinfo is None: * raise ValueError('Cannot compare tz-naive and tz-aware timestamps') # <<<<<<<<<<<<<< * * cpdef datetime to_datetime(_Timestamp self): */ __pyx_t_1 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_37), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 643; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 643; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L3; } __pyx_L3:; __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas.tslib._Timestamp._assert_tzawareness_compat", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/tslib.pyx":645 * raise ValueError('Cannot compare tz-naive and tz-aware timestamps') * * cpdef datetime to_datetime(_Timestamp self): # <<<<<<<<<<<<<< * cdef: * pandas_datetimestruct dts */ static PyObject *__pyx_pw_6pandas_5tslib_10_Timestamp_5to_datetime(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static PyDateTime_DateTime *__pyx_f_6pandas_5tslib_10_Timestamp_to_datetime(struct __pyx_obj_6pandas_5tslib__Timestamp *__pyx_v_self, int __pyx_skip_dispatch) { pandas_datetimestruct __pyx_v_dts; struct __pyx_obj_6pandas_5tslib__TSObject *__pyx_v_ts = 0; PyDateTime_DateTime *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; pandas_datetimestruct __pyx_t_3; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("to_datetime", 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__to_datetime); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 645; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_6pandas_5tslib_10_Timestamp_5to_datetime)) { __Pyx_XDECREF(((PyObject *)__pyx_r)); __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 645; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_8datetime_datetime))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 645; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = ((PyDateTime_DateTime *)__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/tslib.pyx":649 * pandas_datetimestruct dts * _TSObject ts * ts = convert_to_tsobject(self, self.tzinfo, None) # <<<<<<<<<<<<<< * dts = ts.dts * return datetime(dts.year, dts.month, dts.day, */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s__tzinfo); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 649; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __pyx_f_6pandas_5tslib_convert_to_tsobject(((PyObject *)__pyx_v_self), __pyx_t_1, Py_None); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 649; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_6pandas_5tslib__TSObject))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 649; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_ts = ((struct __pyx_obj_6pandas_5tslib__TSObject *)__pyx_t_2); __pyx_t_2 = 0; /* "pandas/tslib.pyx":650 * _TSObject ts * ts = convert_to_tsobject(self, self.tzinfo, None) * dts = ts.dts # <<<<<<<<<<<<<< * return datetime(dts.year, dts.month, dts.day, * dts.hour, dts.min, dts.sec, */ __pyx_t_3 = __pyx_v_ts->dts; __pyx_v_dts = __pyx_t_3; /* "pandas/tslib.pyx":651 * ts = convert_to_tsobject(self, self.tzinfo, None) * dts = ts.dts * return datetime(dts.year, dts.month, dts.day, # <<<<<<<<<<<<<< * dts.hour, dts.min, dts.sec, * dts.us, ts.tzinfo) */ __Pyx_XDECREF(((PyObject *)__pyx_r)); __pyx_t_2 = __Pyx_PyInt_to_py_npy_int64(__pyx_v_dts.year); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 651; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __Pyx_PyInt_to_py_npy_int32(__pyx_v_dts.month); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 651; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = __Pyx_PyInt_to_py_npy_int32(__pyx_v_dts.day); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 651; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); /* "pandas/tslib.pyx":652 * dts = ts.dts * return datetime(dts.year, dts.month, dts.day, * dts.hour, dts.min, dts.sec, # <<<<<<<<<<<<<< * dts.us, ts.tzinfo) * */ __pyx_t_5 = __Pyx_PyInt_to_py_npy_int32(__pyx_v_dts.hour); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 652; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyInt_to_py_npy_int32(__pyx_v_dts.min); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 652; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = __Pyx_PyInt_to_py_npy_int32(__pyx_v_dts.sec); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 652; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); /* "pandas/tslib.pyx":653 * return datetime(dts.year, dts.month, dts.day, * dts.hour, dts.min, dts.sec, * dts.us, ts.tzinfo) # <<<<<<<<<<<<<< * * def __add__(self, other): */ __pyx_t_8 = __Pyx_PyInt_to_py_npy_int32(__pyx_v_dts.us); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 653; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_9 = PyTuple_New(8); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 651; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_9, 2, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_9, 3, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_9, 4, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_9, 5, __pyx_t_7); __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_9, 6, __pyx_t_8); __Pyx_GIVEREF(__pyx_t_8); __Pyx_INCREF(__pyx_v_ts->tzinfo); PyTuple_SET_ITEM(__pyx_t_9, 7, __pyx_v_ts->tzinfo); __Pyx_GIVEREF(__pyx_v_ts->tzinfo); __pyx_t_2 = 0; __pyx_t_1 = 0; __pyx_t_4 = 0; __pyx_t_5 = 0; __pyx_t_6 = 0; __pyx_t_7 = 0; __pyx_t_8 = 0; __pyx_t_8 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_8datetime_datetime)), ((PyObject *)__pyx_t_9), NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 651; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(((PyObject *)__pyx_t_9)); __pyx_t_9 = 0; __pyx_r = ((PyDateTime_DateTime *)__pyx_t_8); __pyx_t_8 = 0; goto __pyx_L0; __pyx_r = ((PyDateTime_DateTime *)Py_None); __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); __Pyx_AddTraceback("pandas.tslib._Timestamp.to_datetime", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_ts); __Pyx_XGIVEREF((PyObject *)__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5tslib_10_Timestamp_5to_datetime(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static PyObject *__pyx_pw_6pandas_5tslib_10_Timestamp_5to_datetime(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("to_datetime (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_5tslib_10_Timestamp_4to_datetime(((struct __pyx_obj_6pandas_5tslib__Timestamp *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/tslib.pyx":645 * raise ValueError('Cannot compare tz-naive and tz-aware timestamps') * * cpdef datetime to_datetime(_Timestamp self): # <<<<<<<<<<<<<< * cdef: * pandas_datetimestruct dts */ static PyObject *__pyx_pf_6pandas_5tslib_10_Timestamp_4to_datetime(struct __pyx_obj_6pandas_5tslib__Timestamp *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("to_datetime", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_6pandas_5tslib__Timestamp *)__pyx_v_self->__pyx_vtab)->to_datetime(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 645; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas.tslib._Timestamp.to_datetime", __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_5tslib_10_Timestamp_7__add__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/ static PyObject *__pyx_pw_6pandas_5tslib_10_Timestamp_7__add__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__add__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_5tslib_10_Timestamp_6__add__(((PyObject *)__pyx_v_self), ((PyObject *)__pyx_v_other)); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/tslib.pyx":655 * dts.us, ts.tzinfo) * * def __add__(self, other): # <<<<<<<<<<<<<< * cdef Py_ssize_t other_int * */ static PyObject *__pyx_pf_6pandas_5tslib_10_Timestamp_6__add__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) { Py_ssize_t __pyx_v_other_int; PyObject *__pyx_v_nanos = NULL; PyObject *__pyx_v_result = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; Py_ssize_t __pyx_t_5; PyObject *__pyx_t_6 = NULL; int __pyx_t_7; int __pyx_t_8; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__add__", 0); /* "pandas/tslib.pyx":658 * cdef Py_ssize_t other_int * * if is_timedelta64_object(other): # <<<<<<<<<<<<<< * other_int = other.astype('timedelta64[ns]').astype(int) * return Timestamp(self.value + other_int, tz=self.tzinfo) */ __pyx_t_1 = (is_timedelta64_object(__pyx_v_other) != 0); if (__pyx_t_1) { /* "pandas/tslib.pyx":659 * * if is_timedelta64_object(other): * other_int = other.astype('timedelta64[ns]').astype(int) # <<<<<<<<<<<<<< * return Timestamp(self.value + other_int, tz=self.tzinfo) * */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_other, __pyx_n_s__astype); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 659; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_k_tuple_39), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 659; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s__astype); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 659; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 659; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(((PyObject *)((PyObject*)(&PyInt_Type)))); PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)((PyObject*)(&PyInt_Type)))); __Pyx_GIVEREF(((PyObject *)((PyObject*)(&PyInt_Type)))); __pyx_t_4 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 659; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; __pyx_t_5 = __Pyx_PyIndex_AsSsize_t(__pyx_t_4); if (unlikely((__pyx_t_5 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 659; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_other_int = __pyx_t_5; /* "pandas/tslib.pyx":660 * if is_timedelta64_object(other): * other_int = other.astype('timedelta64[ns]').astype(int) * return Timestamp(self.value + other_int, tz=self.tzinfo) # <<<<<<<<<<<<<< * * if is_integer_object(other): */ __Pyx_XDECREF(__pyx_r); __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s__Timestamp); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 660; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s__value); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 660; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_other_int); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 660; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_6 = PyNumber_Add(__pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 660; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 660; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyDict_New(); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 660; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_6)); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s__tzinfo); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 660; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_t_6, ((PyObject *)__pyx_n_s__tz), __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 660; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_2), ((PyObject *)__pyx_t_6)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 660; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0; __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; goto __pyx_L3; } __pyx_L3:; /* "pandas/tslib.pyx":662 * return Timestamp(self.value + other_int, tz=self.tzinfo) * * if is_integer_object(other): # <<<<<<<<<<<<<< * if self.offset is None: * raise ValueError("Cannot add integral value to Timestamp " */ __pyx_t_1 = (is_integer_object(__pyx_v_other) != 0); if (__pyx_t_1) { /* "pandas/tslib.pyx":663 * * if is_integer_object(other): * if self.offset is None: # <<<<<<<<<<<<<< * raise ValueError("Cannot add integral value to Timestamp " * "without offset.") */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s__offset); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 663; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = (__pyx_t_3 == Py_None); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_7 = (__pyx_t_1 != 0); if (__pyx_t_7) { /* "pandas/tslib.pyx":664 * if is_integer_object(other): * if self.offset is None: * raise ValueError("Cannot add integral value to Timestamp " # <<<<<<<<<<<<<< * "without offset.") * return Timestamp((self.offset * other).apply(self)) */ __pyx_t_3 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_41), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 664; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 664; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L5; } __pyx_L5:; /* "pandas/tslib.pyx":666 * raise ValueError("Cannot add integral value to Timestamp " * "without offset.") * return Timestamp((self.offset * other).apply(self)) # <<<<<<<<<<<<<< * * if isinstance(other, timedelta) or hasattr(other, 'delta'): */ __Pyx_XDECREF(__pyx_r); __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s__Timestamp); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 666; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s__offset); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 666; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_2 = PyNumber_Multiply(__pyx_t_6, __pyx_v_other); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 666; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__apply); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 666; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 666; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_self); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_self); __Pyx_GIVEREF(__pyx_v_self); __pyx_t_4 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 666; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 666; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 666; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; goto __pyx_L4; } __pyx_L4:; /* "pandas/tslib.pyx":668 * return Timestamp((self.offset * other).apply(self)) * * if isinstance(other, timedelta) or hasattr(other, 'delta'): # <<<<<<<<<<<<<< * nanos = _delta_to_nanoseconds(other) * return Timestamp(self.value + nanos, tz=self.tzinfo) */ __pyx_t_7 = __Pyx_TypeCheck(__pyx_v_other, ((PyObject*)__pyx_ptype_8datetime_timedelta)); if (!(__pyx_t_7 != 0)) { __pyx_t_1 = PyObject_HasAttr(__pyx_v_other, ((PyObject *)__pyx_n_s__delta)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 668; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_8 = (__pyx_t_1 != 0); } else { __pyx_t_8 = (__pyx_t_7 != 0); } if (__pyx_t_8) { /* "pandas/tslib.pyx":669 * * if isinstance(other, timedelta) or hasattr(other, 'delta'): * nanos = _delta_to_nanoseconds(other) # <<<<<<<<<<<<<< * return Timestamp(self.value + nanos, tz=self.tzinfo) * */ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_42); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 669; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 669; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_other); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_other); __Pyx_GIVEREF(__pyx_v_other); __pyx_t_3 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 669; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __pyx_v_nanos = __pyx_t_3; __pyx_t_3 = 0; /* "pandas/tslib.pyx":670 * if isinstance(other, timedelta) or hasattr(other, 'delta'): * nanos = _delta_to_nanoseconds(other) * return Timestamp(self.value + nanos, tz=self.tzinfo) # <<<<<<<<<<<<<< * * result = datetime.__add__(self, other) */ __Pyx_XDECREF(__pyx_r); __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s__Timestamp); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 670; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s__value); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 670; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = PyNumber_Add(__pyx_t_2, __pyx_v_nanos); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 670; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 670; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyDict_New(); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 670; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_4)); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s__tzinfo); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 670; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); if (PyDict_SetItem(__pyx_t_4, ((PyObject *)__pyx_n_s__tz), __pyx_t_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 670; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_2), ((PyObject *)__pyx_t_4)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 670; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __pyx_r = __pyx_t_6; __pyx_t_6 = 0; goto __pyx_L0; goto __pyx_L6; } __pyx_L6:; /* "pandas/tslib.pyx":672 * return Timestamp(self.value + nanos, tz=self.tzinfo) * * result = datetime.__add__(self, other) # <<<<<<<<<<<<<< * if isinstance(result, datetime): * result = Timestamp(result) */ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)((PyObject*)__pyx_ptype_8datetime_datetime)), __pyx_n_s____add__); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 672; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 672; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_v_self); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_self); __Pyx_GIVEREF(__pyx_v_self); __Pyx_INCREF(__pyx_v_other); PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_other); __Pyx_GIVEREF(__pyx_v_other); __pyx_t_2 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 672; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __pyx_v_result = __pyx_t_2; __pyx_t_2 = 0; /* "pandas/tslib.pyx":673 * * result = datetime.__add__(self, other) * if isinstance(result, datetime): # <<<<<<<<<<<<<< * result = Timestamp(result) * result.nanosecond = self.nanosecond */ __pyx_t_8 = __Pyx_TypeCheck(__pyx_v_result, ((PyObject*)__pyx_ptype_8datetime_datetime)); __pyx_t_7 = (__pyx_t_8 != 0); if (__pyx_t_7) { /* "pandas/tslib.pyx":674 * result = datetime.__add__(self, other) * if isinstance(result, datetime): * result = Timestamp(result) # <<<<<<<<<<<<<< * result.nanosecond = self.nanosecond * return result */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__Timestamp); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 674; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 674; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_v_result); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_result); __Pyx_GIVEREF(__pyx_v_result); __pyx_t_6 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 674; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __Pyx_DECREF_SET(__pyx_v_result, __pyx_t_6); __pyx_t_6 = 0; /* "pandas/tslib.pyx":675 * if isinstance(result, datetime): * result = Timestamp(result) * result.nanosecond = self.nanosecond # <<<<<<<<<<<<<< * return result * */ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s__nanosecond); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 675; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); if (__Pyx_PyObject_SetAttrStr(__pyx_v_result, __pyx_n_s__nanosecond, __pyx_t_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 675; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; goto __pyx_L7; } __pyx_L7:; /* "pandas/tslib.pyx":676 * result = Timestamp(result) * result.nanosecond = self.nanosecond * return result # <<<<<<<<<<<<<< * * def __sub__(self, other): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_result); __pyx_r = __pyx_v_result; goto __pyx_L0; __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_XDECREF(__pyx_t_6); __Pyx_AddTraceback("pandas.tslib._Timestamp.__add__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_nanos); __Pyx_XDECREF(__pyx_v_result); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5tslib_10_Timestamp_9__sub__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/ static PyObject *__pyx_pw_6pandas_5tslib_10_Timestamp_9__sub__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__sub__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_5tslib_10_Timestamp_8__sub__(((PyObject *)__pyx_v_self), ((PyObject *)__pyx_v_other)); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/tslib.pyx":678 * return result * * def __sub__(self, other): # <<<<<<<<<<<<<< * if is_integer_object(other): * neg_other = -other */ static PyObject *__pyx_pf_6pandas_5tslib_10_Timestamp_8__sub__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) { PyObject *__pyx_v_neg_other = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__sub__", 0); /* "pandas/tslib.pyx":679 * * def __sub__(self, other): * if is_integer_object(other): # <<<<<<<<<<<<<< * neg_other = -other * return self + neg_other */ __pyx_t_1 = (is_integer_object(__pyx_v_other) != 0); if (__pyx_t_1) { /* "pandas/tslib.pyx":680 * def __sub__(self, other): * if is_integer_object(other): * neg_other = -other # <<<<<<<<<<<<<< * return self + neg_other * # This calling convention is required */ __pyx_t_2 = PyNumber_Negative(__pyx_v_other); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 680; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_v_neg_other = __pyx_t_2; __pyx_t_2 = 0; /* "pandas/tslib.pyx":681 * if is_integer_object(other): * neg_other = -other * return self + neg_other # <<<<<<<<<<<<<< * # This calling convention is required * return datetime.__sub__(self, other) */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = PyNumber_Add(__pyx_v_self, __pyx_v_neg_other); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 681; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; goto __pyx_L3; } __pyx_L3:; /* "pandas/tslib.pyx":683 * return self + neg_other * # This calling convention is required * return datetime.__sub__(self, other) # <<<<<<<<<<<<<< * * cpdef _get_field(self, field): */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)((PyObject*)__pyx_ptype_8datetime_datetime)), __pyx_n_s____sub__); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 683; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 683; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_v_self); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_self); __Pyx_GIVEREF(__pyx_v_self); __Pyx_INCREF(__pyx_v_other); PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_other); __Pyx_GIVEREF(__pyx_v_other); __pyx_t_4 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 683; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; __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.tslib._Timestamp.__sub__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_neg_other); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/tslib.pyx":685 * return datetime.__sub__(self, other) * * cpdef _get_field(self, field): # <<<<<<<<<<<<<< * out = get_date_field(np.array([self.value], dtype=np.int64), field) * return out[0] */ static PyObject *__pyx_pw_6pandas_5tslib_10_Timestamp_11_get_field(PyObject *__pyx_v_self, PyObject *__pyx_v_field); /*proto*/ static PyObject *__pyx_f_6pandas_5tslib_10_Timestamp__get_field(struct __pyx_obj_6pandas_5tslib__Timestamp *__pyx_v_self, PyObject *__pyx_v_field, int __pyx_skip_dispatch) { PyObject *__pyx_v_out = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_get_field", 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___get_field); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 685; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_6pandas_5tslib_10_Timestamp_11_get_field)) { __Pyx_XDECREF(__pyx_r); __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 685; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_field); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_field); __Pyx_GIVEREF(__pyx_v_field); __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 685; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __pyx_r = __pyx_t_3; __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } /* "pandas/tslib.pyx":686 * * cpdef _get_field(self, field): * out = get_date_field(np.array([self.value], dtype=np.int64), field) # <<<<<<<<<<<<<< * return out[0] * */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__get_date_field); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 686; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 686; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s__array); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 686; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyInt_to_py_npy_int64(__pyx_v_self->value); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 686; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 686; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyList_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 686; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_t_4)); __Pyx_GIVEREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __pyx_t_4 = PyDict_New(); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 686; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_4)); __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 686; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s__int64); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 686; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_4, ((PyObject *)__pyx_n_s__dtype), __pyx_t_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 686; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_3), ((PyObject *)__pyx_t_4)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 686; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 686; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_6); __Pyx_INCREF(__pyx_v_field); PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_field); __Pyx_GIVEREF(__pyx_v_field); __pyx_t_6 = 0; __pyx_t_6 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 686; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __pyx_v_out = __pyx_t_6; __pyx_t_6 = 0; /* "pandas/tslib.pyx":687 * cpdef _get_field(self, field): * out = get_date_field(np.array([self.value], dtype=np.int64), field) * return out[0] # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_out, 0, sizeof(long), PyInt_FromLong, 0, 0, 1); if (!__pyx_t_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 687; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_r = __pyx_t_6; __pyx_t_6 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("pandas.tslib._Timestamp._get_field", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_out); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5tslib_10_Timestamp_11_get_field(PyObject *__pyx_v_self, PyObject *__pyx_v_field); /*proto*/ static PyObject *__pyx_pw_6pandas_5tslib_10_Timestamp_11_get_field(PyObject *__pyx_v_self, PyObject *__pyx_v_field) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_get_field (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_5tslib_10_Timestamp_10_get_field(((struct __pyx_obj_6pandas_5tslib__Timestamp *)__pyx_v_self), ((PyObject *)__pyx_v_field)); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/tslib.pyx":685 * return datetime.__sub__(self, other) * * cpdef _get_field(self, field): # <<<<<<<<<<<<<< * out = get_date_field(np.array([self.value], dtype=np.int64), field) * return out[0] */ static PyObject *__pyx_pf_6pandas_5tslib_10_Timestamp_10_get_field(struct __pyx_obj_6pandas_5tslib__Timestamp *__pyx_v_self, PyObject *__pyx_v_field) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_get_field", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = ((struct __pyx_vtabstruct_6pandas_5tslib__Timestamp *)__pyx_v_self->__pyx_vtab)->_get_field(__pyx_v_self, __pyx_v_field, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 685; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas.tslib._Timestamp._get_field", __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_5tslib_10_Timestamp_5value_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6pandas_5tslib_10_Timestamp_5value_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_5tslib_10_Timestamp_5value___get__(((struct __pyx_obj_6pandas_5tslib__Timestamp *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/tslib.pyx":565 * cdef class _Timestamp(datetime): * cdef readonly: * int64_t value, nanosecond # <<<<<<<<<<<<<< * object offset # frequency reference * */ static PyObject *__pyx_pf_6pandas_5tslib_10_Timestamp_5value___get__(struct __pyx_obj_6pandas_5tslib__Timestamp *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyInt_to_py_npy_int64(__pyx_v_self->value); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 565; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas.tslib._Timestamp.value.__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_5tslib_10_Timestamp_10nanosecond_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6pandas_5tslib_10_Timestamp_10nanosecond_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_5tslib_10_Timestamp_10nanosecond___get__(((struct __pyx_obj_6pandas_5tslib__Timestamp *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5tslib_10_Timestamp_10nanosecond___get__(struct __pyx_obj_6pandas_5tslib__Timestamp *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyInt_to_py_npy_int64(__pyx_v_self->nanosecond); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 565; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas.tslib._Timestamp.nanosecond.__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_5tslib_10_Timestamp_6offset_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6pandas_5tslib_10_Timestamp_6offset_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_5tslib_10_Timestamp_6offset___get__(((struct __pyx_obj_6pandas_5tslib__Timestamp *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/tslib.pyx":566 * cdef readonly: * int64_t value, nanosecond * object offset # frequency reference # <<<<<<<<<<<<<< * * def __hash__(_Timestamp self): */ static PyObject *__pyx_pf_6pandas_5tslib_10_Timestamp_6offset___get__(struct __pyx_obj_6pandas_5tslib__Timestamp *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_self->offset); __pyx_r = __pyx_v_self->offset; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/tslib.pyx":693 * * * cdef inline bint is_timestamp(object o): # <<<<<<<<<<<<<< * return Py_TYPE(o) == ts_type # isinstance(o, Timestamp) * */ static CYTHON_INLINE int __pyx_f_6pandas_5tslib_is_timestamp(PyObject *__pyx_v_o) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("is_timestamp", 0); /* "pandas/tslib.pyx":694 * * cdef inline bint is_timestamp(object o): * return Py_TYPE(o) == ts_type # isinstance(o, Timestamp) # <<<<<<<<<<<<<< * * */ __pyx_r = (Py_TYPE(__pyx_v_o) == __pyx_v_6pandas_5tslib_ts_type); goto __pyx_L0; __pyx_r = 0; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static Py_hash_t __pyx_pw_6pandas_5tslib_4_NaT_1__hash__(PyObject *__pyx_v_self); /*proto*/ static Py_hash_t __pyx_pw_6pandas_5tslib_4_NaT_1__hash__(PyObject *__pyx_v_self) { Py_hash_t __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__hash__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_5tslib_4_NaT___hash__(((struct __pyx_obj_6pandas_5tslib__NaT *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/tslib.pyx":709 * cdef class _NaT(_Timestamp): * * def __hash__(_NaT self): # <<<<<<<<<<<<<< * # py3k needs this defined here * return hash(self.value) */ static Py_hash_t __pyx_pf_6pandas_5tslib_4_NaT___hash__(struct __pyx_obj_6pandas_5tslib__NaT *__pyx_v_self) { Py_hash_t __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; Py_hash_t __pyx_t_2; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__hash__", 0); /* "pandas/tslib.pyx":711 * def __hash__(_NaT self): * # py3k needs this defined here * return hash(self.value) # <<<<<<<<<<<<<< * * def __richcmp__(_NaT self, object other, int op): */ __pyx_t_1 = __Pyx_PyInt_to_py_npy_int64(__pyx_v_self->__pyx_base.value); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 711; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyObject_Hash(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 711; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_2; goto __pyx_L0; __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas.tslib._NaT.__hash__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; if (unlikely(__pyx_r == -1) && !PyErr_Occurred()) __pyx_r = -2; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5tslib_4_NaT_3__richcmp__(PyObject *__pyx_v_self, PyObject *__pyx_v_other, int __pyx_v_op); /*proto*/ static PyObject *__pyx_pw_6pandas_5tslib_4_NaT_3__richcmp__(PyObject *__pyx_v_self, PyObject *__pyx_v_other, int __pyx_v_op) { CYTHON_UNUSED int __pyx_lineno = 0; CYTHON_UNUSED const char *__pyx_filename = NULL; CYTHON_UNUSED int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__richcmp__ (wrapper)", 0); if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_self), __pyx_ptype_6pandas_5tslib__NaT, 1, "self", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 713; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5tslib_4_NaT_2__richcmp__(((struct __pyx_obj_6pandas_5tslib__NaT *)__pyx_v_self), ((PyObject *)__pyx_v_other), ((int)__pyx_v_op)); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/tslib.pyx":713 * return hash(self.value) * * def __richcmp__(_NaT self, object other, int op): # <<<<<<<<<<<<<< * cdef int ndim = getattr(other, 'ndim', -1) * */ static PyObject *__pyx_pf_6pandas_5tslib_4_NaT_2__richcmp__(struct __pyx_obj_6pandas_5tslib__NaT *__pyx_v_self, PyObject *__pyx_v_other, int __pyx_v_op) { int __pyx_v_ndim; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; int __pyx_t_5; PyObject *__pyx_t_6 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__richcmp__", 0); __Pyx_INCREF(__pyx_v_other); /* "pandas/tslib.pyx":714 * * def __richcmp__(_NaT self, object other, int op): * cdef int ndim = getattr(other, 'ndim', -1) # <<<<<<<<<<<<<< * * if ndim == -1: */ __pyx_t_1 = __Pyx_GetAttr3(__pyx_v_other, ((PyObject *)__pyx_n_s__ndim), __pyx_int_neg_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 714; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyInt_AsInt(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 714; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_ndim = __pyx_t_2; /* "pandas/tslib.pyx":716 * cdef int ndim = getattr(other, 'ndim', -1) * * if ndim == -1: # <<<<<<<<<<<<<< * return _nat_scalar_rules[op] * */ __pyx_t_3 = ((__pyx_v_ndim == -1) != 0); if (__pyx_t_3) { /* "pandas/tslib.pyx":717 * * if ndim == -1: * return _nat_scalar_rules[op] # <<<<<<<<<<<<<< * * if ndim == 0: */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyBool_FromLong((__pyx_v_6pandas_5tslib__nat_scalar_rules[__pyx_v_op])); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 717; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; goto __pyx_L3; } __pyx_L3:; /* "pandas/tslib.pyx":719 * return _nat_scalar_rules[op] * * if ndim == 0: # <<<<<<<<<<<<<< * if isinstance(other, np.datetime64): * other = Timestamp(other) */ __pyx_t_3 = ((__pyx_v_ndim == 0) != 0); if (__pyx_t_3) { /* "pandas/tslib.pyx":720 * * if ndim == 0: * if isinstance(other, np.datetime64): # <<<<<<<<<<<<<< * other = Timestamp(other) * else: */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 720; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s__datetime64); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 720; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_3 = PyObject_IsInstance(__pyx_v_other, __pyx_t_4); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 720; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_5 = (__pyx_t_3 != 0); if (__pyx_t_5) { /* "pandas/tslib.pyx":721 * if ndim == 0: * if isinstance(other, np.datetime64): * other = Timestamp(other) # <<<<<<<<<<<<<< * else: * raise TypeError('Cannot compare type %r with type %r' % */ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s__Timestamp); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 721; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 721; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_other); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_other); __Pyx_GIVEREF(__pyx_v_other); __pyx_t_6 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 721; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __Pyx_DECREF_SET(__pyx_v_other, __pyx_t_6); __pyx_t_6 = 0; goto __pyx_L5; } /*else*/ { /* "pandas/tslib.pyx":724 * else: * raise TypeError('Cannot compare type %r with type %r' % * (type(self).__name__, type(other).__name__)) # <<<<<<<<<<<<<< * return PyObject_RichCompare(other, self, _reverse_ops[op]) * */ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))), __pyx_n_s____name__); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 724; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)Py_TYPE(__pyx_v_other)), __pyx_n_s____name__); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 724; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 724; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_6 = 0; __pyx_t_1 = 0; __pyx_t_1 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_34), ((PyObject *)__pyx_t_4)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 723; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 723; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_t_1)); __Pyx_GIVEREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_t_1 = PyObject_Call(__pyx_builtin_TypeError, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 723; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 723; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_L5:; goto __pyx_L4; } __pyx_L4:; /* "pandas/tslib.pyx":725 * raise TypeError('Cannot compare type %r with type %r' % * (type(self).__name__, type(other).__name__)) * return PyObject_RichCompare(other, self, _reverse_ops[op]) # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyObject_RichCompare(__pyx_v_other, ((PyObject *)__pyx_v_self), (__pyx_v_6pandas_5tslib__reverse_ops[__pyx_v_op])); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 725; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("pandas.tslib._NaT.__richcmp__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_other); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5tslib_15_delta_to_nanoseconds(PyObject *__pyx_self, PyObject *__pyx_v_delta); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5tslib_15_delta_to_nanoseconds = {__Pyx_NAMESTR("_delta_to_nanoseconds"), (PyCFunction)__pyx_pw_6pandas_5tslib_15_delta_to_nanoseconds, METH_O, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5tslib_15_delta_to_nanoseconds(PyObject *__pyx_self, PyObject *__pyx_v_delta) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_delta_to_nanoseconds (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_5tslib_14_delta_to_nanoseconds(__pyx_self, ((PyObject *)__pyx_v_delta)); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/tslib.pyx":728 * * * def _delta_to_nanoseconds(delta): # <<<<<<<<<<<<<< * if hasattr(delta, 'delta'): * delta = delta.delta */ static PyObject *__pyx_pf_6pandas_5tslib_14_delta_to_nanoseconds(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_delta) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_delta_to_nanoseconds", 0); __Pyx_INCREF(__pyx_v_delta); /* "pandas/tslib.pyx":729 * * def _delta_to_nanoseconds(delta): * if hasattr(delta, 'delta'): # <<<<<<<<<<<<<< * delta = delta.delta * if is_timedelta64_object(delta): */ __pyx_t_1 = PyObject_HasAttr(__pyx_v_delta, ((PyObject *)__pyx_n_s__delta)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 729; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { /* "pandas/tslib.pyx":730 * def _delta_to_nanoseconds(delta): * if hasattr(delta, 'delta'): * delta = delta.delta # <<<<<<<<<<<<<< * if is_timedelta64_object(delta): * return delta.astype("timedelta64[ns]").item() */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_delta, __pyx_n_s__delta); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 730; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF_SET(__pyx_v_delta, __pyx_t_3); __pyx_t_3 = 0; goto __pyx_L3; } __pyx_L3:; /* "pandas/tslib.pyx":731 * if hasattr(delta, 'delta'): * delta = delta.delta * if is_timedelta64_object(delta): # <<<<<<<<<<<<<< * return delta.astype("timedelta64[ns]").item() * if is_integer_object(delta): */ __pyx_t_2 = (is_timedelta64_object(__pyx_v_delta) != 0); if (__pyx_t_2) { /* "pandas/tslib.pyx":732 * delta = delta.delta * if is_timedelta64_object(delta): * return delta.astype("timedelta64[ns]").item() # <<<<<<<<<<<<<< * if is_integer_object(delta): * return delta */ __Pyx_XDECREF(__pyx_r); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_delta, __pyx_n_s__astype); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 732; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_k_tuple_43), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 732; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s__item); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 732; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 732; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; goto __pyx_L4; } __pyx_L4:; /* "pandas/tslib.pyx":733 * if is_timedelta64_object(delta): * return delta.astype("timedelta64[ns]").item() * if is_integer_object(delta): # <<<<<<<<<<<<<< * return delta * return (delta.days * 24 * 60 * 60 * 1000000 */ __pyx_t_2 = (is_integer_object(__pyx_v_delta) != 0); if (__pyx_t_2) { /* "pandas/tslib.pyx":734 * return delta.astype("timedelta64[ns]").item() * if is_integer_object(delta): * return delta # <<<<<<<<<<<<<< * return (delta.days * 24 * 60 * 60 * 1000000 * + delta.seconds * 1000000 */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_delta); __pyx_r = __pyx_v_delta; goto __pyx_L0; goto __pyx_L5; } __pyx_L5:; /* "pandas/tslib.pyx":735 * if is_integer_object(delta): * return delta * return (delta.days * 24 * 60 * 60 * 1000000 # <<<<<<<<<<<<<< * + delta.seconds * 1000000 * + delta.microseconds) * 1000 */ __Pyx_XDECREF(__pyx_r); /* "pandas/tslib.pyx":736 * return delta * return (delta.days * 24 * 60 * 60 * 1000000 * + delta.seconds * 1000000 # <<<<<<<<<<<<<< * + delta.microseconds) * 1000 * */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_delta, __pyx_n_s__days); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 735; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = PyNumber_Multiply(__pyx_t_4, __pyx_int_24); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 735; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyNumber_Multiply(__pyx_t_3, __pyx_int_60); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 735; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyNumber_Multiply(__pyx_t_4, __pyx_int_60); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 735; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyNumber_Multiply(__pyx_t_3, __pyx_int_1000000); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 735; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_delta, __pyx_n_s__seconds); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 736; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = PyNumber_Multiply(__pyx_t_3, __pyx_int_1000000); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 736; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyNumber_Add(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 736; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "pandas/tslib.pyx":737 * return (delta.days * 24 * 60 * 60 * 1000000 * + delta.seconds * 1000000 * + delta.microseconds) * 1000 # <<<<<<<<<<<<<< * * */ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_delta, __pyx_n_s__microseconds); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 737; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = PyNumber_Add(__pyx_t_3, __pyx_t_5); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 737; __pyx_clineno = __LINE__; goto __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_t_5 = PyNumber_Multiply(__pyx_t_4, __pyx_int_1000); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 737; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_r = __pyx_t_5; __pyx_t_5 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("pandas.tslib._delta_to_nanoseconds", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_delta); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5tslib_9_TSObject_5value_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6pandas_5tslib_9_TSObject_5value_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_5tslib_9_TSObject_5value___get__(((struct __pyx_obj_6pandas_5tslib__TSObject *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/tslib.pyx":748 * * property value: * def __get__(self): # <<<<<<<<<<<<<< * return self.value * */ static PyObject *__pyx_pf_6pandas_5tslib_9_TSObject_5value___get__(struct __pyx_obj_6pandas_5tslib__TSObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); /* "pandas/tslib.pyx":749 * property value: * def __get__(self): * return self.value # <<<<<<<<<<<<<< * * cpdef _get_utcoffset(tzinfo, obj): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyInt_to_py_npy_int64(__pyx_v_self->value); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 749; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas.tslib._TSObject.value.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/tslib.pyx":751 * return self.value * * cpdef _get_utcoffset(tzinfo, obj): # <<<<<<<<<<<<<< * try: * return tzinfo._utcoffset */ static PyObject *__pyx_pw_6pandas_5tslib_17_get_utcoffset(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_6pandas_5tslib__get_utcoffset(PyObject *__pyx_v_tzinfo, PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; int __pyx_t_5; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_get_utcoffset", 0); /* "pandas/tslib.pyx":752 * * cpdef _get_utcoffset(tzinfo, obj): * try: # <<<<<<<<<<<<<< * return tzinfo._utcoffset * except AttributeError: */ { __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:*/ { /* "pandas/tslib.pyx":753 * cpdef _get_utcoffset(tzinfo, obj): * try: * return tzinfo._utcoffset # <<<<<<<<<<<<<< * except AttributeError: * return tzinfo.utcoffset(obj) */ __Pyx_XDECREF(__pyx_r); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_tzinfo, __pyx_n_s___utcoffset); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 753; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L7_try_return; } __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L10_try_end; __pyx_L7_try_return:; __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); goto __pyx_L0; __pyx_L3_error:; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; /* "pandas/tslib.pyx":754 * try: * return tzinfo._utcoffset * except AttributeError: # <<<<<<<<<<<<<< * return tzinfo.utcoffset(obj) * */ __pyx_t_5 = PyErr_ExceptionMatches(__pyx_builtin_AttributeError); if (__pyx_t_5) { __Pyx_AddTraceback("pandas.tslib._get_utcoffset", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_6, &__pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 754; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_GOTREF(__pyx_t_6); __Pyx_GOTREF(__pyx_t_7); /* "pandas/tslib.pyx":755 * return tzinfo._utcoffset * except AttributeError: * return tzinfo.utcoffset(obj) # <<<<<<<<<<<<<< * * # helper to extract datetime and int64 from several different possibilities */ __Pyx_XDECREF(__pyx_r); __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_tzinfo, __pyx_n_s__utcoffset); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 755; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 755; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_INCREF(__pyx_v_obj); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_v_obj); __Pyx_GIVEREF(__pyx_v_obj); __pyx_t_10 = PyObject_Call(__pyx_t_8, ((PyObject *)__pyx_t_9), NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 755; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_9)); __pyx_t_9 = 0; __pyx_r = __pyx_t_10; __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; goto __pyx_L6_except_return; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; goto __pyx_L4_exception_handled; } __pyx_L5_except_error:; __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); goto __pyx_L1_error; __pyx_L6_except_return:; __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); goto __pyx_L0; __pyx_L4_exception_handled:; __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); __pyx_L10_try_end:; } __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); __Pyx_XDECREF(__pyx_t_10); __Pyx_AddTraceback("pandas.tslib._get_utcoffset", __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_5tslib_17_get_utcoffset(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_6pandas_5tslib_17_get_utcoffset(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_tzinfo = 0; PyObject *__pyx_v_obj = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_get_utcoffset (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__tzinfo,&__pyx_n_s__obj,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__tzinfo)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__obj)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("_get_utcoffset", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 751; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_get_utcoffset") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 751; __pyx_clineno = __LINE__; goto __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_tzinfo = values[0]; __pyx_v_obj = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("_get_utcoffset", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 751; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.tslib._get_utcoffset", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pandas_5tslib_16_get_utcoffset(__pyx_self, __pyx_v_tzinfo, __pyx_v_obj); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/tslib.pyx":751 * return self.value * * cpdef _get_utcoffset(tzinfo, obj): # <<<<<<<<<<<<<< * try: * return tzinfo._utcoffset */ static PyObject *__pyx_pf_6pandas_5tslib_16_get_utcoffset(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_tzinfo, PyObject *__pyx_v_obj) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_get_utcoffset", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_6pandas_5tslib__get_utcoffset(__pyx_v_tzinfo, __pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 751; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas.tslib._get_utcoffset", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/tslib.pyx":758 * * # helper to extract datetime and int64 from several different possibilities * cdef convert_to_tsobject(object ts, object tz, object unit): # <<<<<<<<<<<<<< * """ * Extract datetime and int64 from any of: */ static PyObject *__pyx_f_6pandas_5tslib_convert_to_tsobject(PyObject *__pyx_v_ts, PyObject *__pyx_v_tz, PyObject *__pyx_v_unit) { struct __pyx_obj_6pandas_5tslib__TSObject *__pyx_v_obj = 0; CYTHON_UNUSED int __pyx_v_utc_convert; PyObject *__pyx_v_ts_offset = NULL; PyObject *__pyx_v_tz_offset = NULL; PyObject *__pyx_v_offset = 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; int __pyx_t_6; int __pyx_t_7; __pyx_t_5numpy_int64_t __pyx_t_8; npy_datetime __pyx_t_9; PyObject *__pyx_t_10 = NULL; PyObject *__pyx_t_11 = NULL; PyObject *__pyx_t_12 = NULL; PyObject *__pyx_t_13 = NULL; int __pyx_t_14; PyObject *__pyx_t_15 = NULL; PyObject *__pyx_t_16 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("convert_to_tsobject", 0); __Pyx_INCREF(__pyx_v_ts); __Pyx_INCREF(__pyx_v_tz); /* "pandas/tslib.pyx":771 * cdef: * _TSObject obj * bint utc_convert = 1 # <<<<<<<<<<<<<< * * if tz is not None: */ __pyx_v_utc_convert = 1; /* "pandas/tslib.pyx":773 * bint utc_convert = 1 * * if tz is not None: # <<<<<<<<<<<<<< * if isinstance(tz, basestring): * tz = pytz.timezone(tz) */ __pyx_t_1 = (__pyx_v_tz != Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { /* "pandas/tslib.pyx":774 * * if tz is not None: * if isinstance(tz, basestring): # <<<<<<<<<<<<<< * tz = pytz.timezone(tz) * */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s__basestring); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 774; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = PyObject_IsInstance(__pyx_v_tz, __pyx_t_3); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 774; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_1 = (__pyx_t_2 != 0); if (__pyx_t_1) { /* "pandas/tslib.pyx":775 * if tz is not None: * if isinstance(tz, basestring): * tz = pytz.timezone(tz) # <<<<<<<<<<<<<< * * obj = _TSObject() */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s__pytz); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 775; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s__timezone); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 775; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 775; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_v_tz); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_tz); __Pyx_GIVEREF(__pyx_v_tz); __pyx_t_5 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 775; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; __Pyx_DECREF_SET(__pyx_v_tz, __pyx_t_5); __pyx_t_5 = 0; goto __pyx_L4; } __pyx_L4:; goto __pyx_L3; } __pyx_L3:; /* "pandas/tslib.pyx":777 * tz = pytz.timezone(tz) * * obj = _TSObject() # <<<<<<<<<<<<<< * * if ts is None or ts is NaT or ts is np_NaT: */ __pyx_t_5 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_6pandas_5tslib__TSObject)), ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 777; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_v_obj = ((struct __pyx_obj_6pandas_5tslib__TSObject *)__pyx_t_5); __pyx_t_5 = 0; /* "pandas/tslib.pyx":779 * obj = _TSObject() * * if ts is None or ts is NaT or ts is np_NaT: # <<<<<<<<<<<<<< * obj.value = NPY_NAT * elif is_datetime64_object(ts): */ __pyx_t_1 = (__pyx_v_ts == Py_None); if (!(__pyx_t_1 != 0)) { __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s__NaT); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 779; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_2 = (__pyx_v_ts == __pyx_t_5); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (!(__pyx_t_2 != 0)) { __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s__np_NaT); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 779; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = (__pyx_v_ts == __pyx_t_5); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_7 = (__pyx_t_6 != 0); } else { __pyx_t_7 = (__pyx_t_2 != 0); } __pyx_t_2 = __pyx_t_7; } else { __pyx_t_2 = (__pyx_t_1 != 0); } if (__pyx_t_2) { /* "pandas/tslib.pyx":780 * * if ts is None or ts is NaT or ts is np_NaT: * obj.value = NPY_NAT # <<<<<<<<<<<<<< * elif is_datetime64_object(ts): * obj.value = _get_datetime64_nanos(ts) */ __pyx_v_obj->value = __pyx_v_6pandas_5tslib_NPY_NAT; goto __pyx_L5; } /* "pandas/tslib.pyx":781 * if ts is None or ts is NaT or ts is np_NaT: * obj.value = NPY_NAT * elif is_datetime64_object(ts): # <<<<<<<<<<<<<< * obj.value = _get_datetime64_nanos(ts) * pandas_datetime_to_datetimestruct(obj.value, PANDAS_FR_ns, &obj.dts) */ __pyx_t_2 = (is_datetime64_object(__pyx_v_ts) != 0); if (__pyx_t_2) { /* "pandas/tslib.pyx":782 * obj.value = NPY_NAT * elif is_datetime64_object(ts): * obj.value = _get_datetime64_nanos(ts) # <<<<<<<<<<<<<< * pandas_datetime_to_datetimestruct(obj.value, PANDAS_FR_ns, &obj.dts) * elif is_integer_object(ts): */ __pyx_t_5 = __pyx_f_6pandas_5tslib__get_datetime64_nanos(__pyx_v_ts); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 782; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_8 = __Pyx_PyInt_from_py_npy_int64(__pyx_t_5); if (unlikely((__pyx_t_8 == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 782; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_v_obj->value = __pyx_t_8; /* "pandas/tslib.pyx":783 * elif is_datetime64_object(ts): * obj.value = _get_datetime64_nanos(ts) * pandas_datetime_to_datetimestruct(obj.value, PANDAS_FR_ns, &obj.dts) # <<<<<<<<<<<<<< * elif is_integer_object(ts): * if ts == NPY_NAT: */ pandas_datetime_to_datetimestruct(__pyx_v_obj->value, PANDAS_FR_ns, (&__pyx_v_obj->dts)); goto __pyx_L5; } /* "pandas/tslib.pyx":784 * obj.value = _get_datetime64_nanos(ts) * pandas_datetime_to_datetimestruct(obj.value, PANDAS_FR_ns, &obj.dts) * elif is_integer_object(ts): # <<<<<<<<<<<<<< * if ts == NPY_NAT: * obj.value = NPY_NAT */ __pyx_t_2 = (is_integer_object(__pyx_v_ts) != 0); if (__pyx_t_2) { /* "pandas/tslib.pyx":785 * pandas_datetime_to_datetimestruct(obj.value, PANDAS_FR_ns, &obj.dts) * elif is_integer_object(ts): * if ts == NPY_NAT: # <<<<<<<<<<<<<< * obj.value = NPY_NAT * else: */ __pyx_t_5 = __Pyx_PyInt_to_py_npy_int64(__pyx_v_6pandas_5tslib_NPY_NAT); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 785; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = PyObject_RichCompare(__pyx_v_ts, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 785; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 785; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_2) { /* "pandas/tslib.pyx":786 * elif is_integer_object(ts): * if ts == NPY_NAT: * obj.value = NPY_NAT # <<<<<<<<<<<<<< * else: * ts = ts * cast_from_unit(None,unit) */ __pyx_v_obj->value = __pyx_v_6pandas_5tslib_NPY_NAT; goto __pyx_L6; } /*else*/ { /* "pandas/tslib.pyx":788 * obj.value = NPY_NAT * else: * ts = ts * cast_from_unit(None,unit) # <<<<<<<<<<<<<< * obj.value = ts * pandas_datetime_to_datetimestruct(ts, PANDAS_FR_ns, &obj.dts) */ __pyx_t_8 = __pyx_f_6pandas_5tslib_cast_from_unit(Py_None, __pyx_v_unit, 0); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 788; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_3 = __Pyx_PyInt_to_py_npy_int64(__pyx_t_8); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 788; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = PyNumber_Multiply(__pyx_v_ts, __pyx_t_3); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 788; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF_SET(__pyx_v_ts, __pyx_t_5); __pyx_t_5 = 0; /* "pandas/tslib.pyx":789 * else: * ts = ts * cast_from_unit(None,unit) * obj.value = ts # <<<<<<<<<<<<<< * pandas_datetime_to_datetimestruct(ts, PANDAS_FR_ns, &obj.dts) * elif util.is_float_object(ts): */ __pyx_t_8 = __Pyx_PyInt_from_py_npy_int64(__pyx_v_ts); if (unlikely((__pyx_t_8 == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 789; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_obj->value = __pyx_t_8; /* "pandas/tslib.pyx":790 * ts = ts * cast_from_unit(None,unit) * obj.value = ts * pandas_datetime_to_datetimestruct(ts, PANDAS_FR_ns, &obj.dts) # <<<<<<<<<<<<<< * elif util.is_float_object(ts): * if ts != ts or ts == NPY_NAT: */ __pyx_t_9 = __Pyx_PyInt_from_py_npy_int64(__pyx_v_ts); if (unlikely((__pyx_t_9 == (npy_datetime)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 790; __pyx_clineno = __LINE__; goto __pyx_L1_error;} pandas_datetime_to_datetimestruct(__pyx_t_9, PANDAS_FR_ns, (&__pyx_v_obj->dts)); } __pyx_L6:; goto __pyx_L5; } /* "pandas/tslib.pyx":791 * obj.value = ts * pandas_datetime_to_datetimestruct(ts, PANDAS_FR_ns, &obj.dts) * elif util.is_float_object(ts): # <<<<<<<<<<<<<< * if ts != ts or ts == NPY_NAT: * obj.value = NPY_NAT */ __pyx_t_2 = (is_float_object(__pyx_v_ts) != 0); if (__pyx_t_2) { /* "pandas/tslib.pyx":792 * pandas_datetime_to_datetimestruct(ts, PANDAS_FR_ns, &obj.dts) * elif util.is_float_object(ts): * if ts != ts or ts == NPY_NAT: # <<<<<<<<<<<<<< * obj.value = NPY_NAT * else: */ __pyx_t_5 = PyObject_RichCompare(__pyx_v_ts, __pyx_v_ts, Py_NE); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 792; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 792; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (!__pyx_t_2) { __pyx_t_5 = __Pyx_PyInt_to_py_npy_int64(__pyx_v_6pandas_5tslib_NPY_NAT); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 792; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = PyObject_RichCompare(__pyx_v_ts, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 792; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 792; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_7 = __pyx_t_1; } else { __pyx_t_7 = __pyx_t_2; } if (__pyx_t_7) { /* "pandas/tslib.pyx":793 * elif util.is_float_object(ts): * if ts != ts or ts == NPY_NAT: * obj.value = NPY_NAT # <<<<<<<<<<<<<< * else: * ts = cast_from_unit(ts,unit) */ __pyx_v_obj->value = __pyx_v_6pandas_5tslib_NPY_NAT; goto __pyx_L7; } /*else*/ { /* "pandas/tslib.pyx":795 * obj.value = NPY_NAT * else: * ts = cast_from_unit(ts,unit) # <<<<<<<<<<<<<< * obj.value = ts * pandas_datetime_to_datetimestruct(ts, PANDAS_FR_ns, &obj.dts) */ __pyx_t_8 = __pyx_f_6pandas_5tslib_cast_from_unit(__pyx_v_ts, __pyx_v_unit, 0); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 795; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_3 = __Pyx_PyInt_to_py_npy_int64(__pyx_t_8); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 795; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF_SET(__pyx_v_ts, __pyx_t_3); __pyx_t_3 = 0; /* "pandas/tslib.pyx":796 * else: * ts = cast_from_unit(ts,unit) * obj.value = ts # <<<<<<<<<<<<<< * pandas_datetime_to_datetimestruct(ts, PANDAS_FR_ns, &obj.dts) * elif util.is_string_object(ts): */ __pyx_t_8 = __Pyx_PyInt_from_py_npy_int64(__pyx_v_ts); if (unlikely((__pyx_t_8 == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 796; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_obj->value = __pyx_t_8; /* "pandas/tslib.pyx":797 * ts = cast_from_unit(ts,unit) * obj.value = ts * pandas_datetime_to_datetimestruct(ts, PANDAS_FR_ns, &obj.dts) # <<<<<<<<<<<<<< * elif util.is_string_object(ts): * if ts in _nat_strings: */ __pyx_t_9 = __Pyx_PyInt_from_py_npy_int64(__pyx_v_ts); if (unlikely((__pyx_t_9 == (npy_datetime)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 797; __pyx_clineno = __LINE__; goto __pyx_L1_error;} pandas_datetime_to_datetimestruct(__pyx_t_9, PANDAS_FR_ns, (&__pyx_v_obj->dts)); } __pyx_L7:; goto __pyx_L5; } /* "pandas/tslib.pyx":798 * obj.value = ts * pandas_datetime_to_datetimestruct(ts, PANDAS_FR_ns, &obj.dts) * elif util.is_string_object(ts): # <<<<<<<<<<<<<< * if ts in _nat_strings: * obj.value = NPY_NAT */ __pyx_t_7 = (is_string_object(__pyx_v_ts) != 0); if (__pyx_t_7) { /* "pandas/tslib.pyx":799 * pandas_datetime_to_datetimestruct(ts, PANDAS_FR_ns, &obj.dts) * elif util.is_string_object(ts): * if ts in _nat_strings: # <<<<<<<<<<<<<< * obj.value = NPY_NAT * else: */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s___nat_strings); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 799; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_7 = (__Pyx_PySequence_Contains(__pyx_v_ts, __pyx_t_3, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 799; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_2 = (__pyx_t_7 != 0); if (__pyx_t_2) { /* "pandas/tslib.pyx":800 * elif util.is_string_object(ts): * if ts in _nat_strings: * obj.value = NPY_NAT # <<<<<<<<<<<<<< * else: * _string_to_dts(ts, &obj.dts) */ __pyx_v_obj->value = __pyx_v_6pandas_5tslib_NPY_NAT; goto __pyx_L8; } /*else*/ { /* "pandas/tslib.pyx":802 * obj.value = NPY_NAT * else: * _string_to_dts(ts, &obj.dts) # <<<<<<<<<<<<<< * obj.value = pandas_datetimestruct_to_datetime(PANDAS_FR_ns, &obj.dts) * elif PyDateTime_Check(ts): */ __pyx_t_3 = __pyx_f_8datetime__string_to_dts(__pyx_v_ts, (&__pyx_v_obj->dts)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 802; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/tslib.pyx":803 * else: * _string_to_dts(ts, &obj.dts) * obj.value = pandas_datetimestruct_to_datetime(PANDAS_FR_ns, &obj.dts) # <<<<<<<<<<<<<< * elif PyDateTime_Check(ts): * if tz is not None: */ __pyx_v_obj->value = pandas_datetimestruct_to_datetime(PANDAS_FR_ns, (&__pyx_v_obj->dts)); } __pyx_L8:; goto __pyx_L5; } /* "pandas/tslib.pyx":804 * _string_to_dts(ts, &obj.dts) * obj.value = pandas_datetimestruct_to_datetime(PANDAS_FR_ns, &obj.dts) * elif PyDateTime_Check(ts): # <<<<<<<<<<<<<< * if tz is not None: * # sort of a temporary hack */ __pyx_t_2 = (PyDateTime_Check(__pyx_v_ts) != 0); if (__pyx_t_2) { /* "pandas/tslib.pyx":805 * obj.value = pandas_datetimestruct_to_datetime(PANDAS_FR_ns, &obj.dts) * elif PyDateTime_Check(ts): * if tz is not None: # <<<<<<<<<<<<<< * # sort of a temporary hack * if ts.tzinfo is not None: */ __pyx_t_2 = (__pyx_v_tz != Py_None); __pyx_t_7 = (__pyx_t_2 != 0); if (__pyx_t_7) { /* "pandas/tslib.pyx":807 * if tz is not None: * # sort of a temporary hack * if ts.tzinfo is not None: # <<<<<<<<<<<<<< * if (hasattr(tz, 'normalize') and * hasattr(ts.tzinfo, '_utcoffset')): */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_ts, __pyx_n_s__tzinfo); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 807; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_7 = (__pyx_t_3 != Py_None); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_2 = (__pyx_t_7 != 0); if (__pyx_t_2) { /* "pandas/tslib.pyx":808 * # sort of a temporary hack * if ts.tzinfo is not None: * if (hasattr(tz, 'normalize') and # <<<<<<<<<<<<<< * hasattr(ts.tzinfo, '_utcoffset')): * ts = tz.normalize(ts) */ __pyx_t_2 = PyObject_HasAttr(__pyx_v_tz, ((PyObject *)__pyx_n_s__normalize)); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 808; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if ((__pyx_t_2 != 0)) { /* "pandas/tslib.pyx":809 * if ts.tzinfo is not None: * if (hasattr(tz, 'normalize') and * hasattr(ts.tzinfo, '_utcoffset')): # <<<<<<<<<<<<<< * ts = tz.normalize(ts) * obj.value = _pydatetime_to_dts(ts, &obj.dts) */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_ts, __pyx_n_s__tzinfo); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 809; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_7 = PyObject_HasAttr(__pyx_t_3, ((PyObject *)__pyx_n_s___utcoffset)); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 809; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_1 = (__pyx_t_7 != 0); } else { __pyx_t_1 = (__pyx_t_2 != 0); } if (__pyx_t_1) { /* "pandas/tslib.pyx":810 * if (hasattr(tz, 'normalize') and * hasattr(ts.tzinfo, '_utcoffset')): * ts = tz.normalize(ts) # <<<<<<<<<<<<<< * obj.value = _pydatetime_to_dts(ts, &obj.dts) * obj.tzinfo = ts.tzinfo */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_tz, __pyx_n_s__normalize); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 810; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 810; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_v_ts); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_ts); __Pyx_GIVEREF(__pyx_v_ts); __pyx_t_4 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 810; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; __Pyx_DECREF_SET(__pyx_v_ts, __pyx_t_4); __pyx_t_4 = 0; /* "pandas/tslib.pyx":811 * hasattr(ts.tzinfo, '_utcoffset')): * ts = tz.normalize(ts) * obj.value = _pydatetime_to_dts(ts, &obj.dts) # <<<<<<<<<<<<<< * obj.tzinfo = ts.tzinfo * else: #tzoffset */ __pyx_v_obj->value = __pyx_f_8datetime__pydatetime_to_dts(__pyx_v_ts, (&__pyx_v_obj->dts)); /* "pandas/tslib.pyx":812 * ts = tz.normalize(ts) * obj.value = _pydatetime_to_dts(ts, &obj.dts) * obj.tzinfo = ts.tzinfo # <<<<<<<<<<<<<< * else: #tzoffset * obj.value = _pydatetime_to_dts(ts, &obj.dts) */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_ts, __pyx_n_s__tzinfo); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 812; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __Pyx_GOTREF(__pyx_v_obj->tzinfo); __Pyx_DECREF(__pyx_v_obj->tzinfo); __pyx_v_obj->tzinfo = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L11; } /*else*/ { /* "pandas/tslib.pyx":814 * obj.tzinfo = ts.tzinfo * else: #tzoffset * obj.value = _pydatetime_to_dts(ts, &obj.dts) # <<<<<<<<<<<<<< * ts_offset = _get_utcoffset(ts.tzinfo, ts) * obj.value -= _delta_to_nanoseconds(ts_offset) */ __pyx_v_obj->value = __pyx_f_8datetime__pydatetime_to_dts(__pyx_v_ts, (&__pyx_v_obj->dts)); /* "pandas/tslib.pyx":815 * else: #tzoffset * obj.value = _pydatetime_to_dts(ts, &obj.dts) * ts_offset = _get_utcoffset(ts.tzinfo, ts) # <<<<<<<<<<<<<< * obj.value -= _delta_to_nanoseconds(ts_offset) * tz_offset = _get_utcoffset(tz, ts) */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_ts, __pyx_n_s__tzinfo); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 815; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __pyx_f_6pandas_5tslib__get_utcoffset(__pyx_t_4, __pyx_v_ts, 0); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 815; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_ts_offset = __pyx_t_5; __pyx_t_5 = 0; /* "pandas/tslib.pyx":816 * obj.value = _pydatetime_to_dts(ts, &obj.dts) * ts_offset = _get_utcoffset(ts.tzinfo, ts) * obj.value -= _delta_to_nanoseconds(ts_offset) # <<<<<<<<<<<<<< * tz_offset = _get_utcoffset(tz, ts) * obj.value += _delta_to_nanoseconds(tz_offset) */ __pyx_t_5 = __Pyx_PyInt_to_py_npy_int64(__pyx_v_obj->value); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 816; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_42); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 816; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 816; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_v_ts_offset); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_ts_offset); __Pyx_GIVEREF(__pyx_v_ts_offset); __pyx_t_10 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 816; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; __pyx_t_3 = PyNumber_InPlaceSubtract(__pyx_t_5, __pyx_t_10); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 816; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_t_8 = __Pyx_PyInt_from_py_npy_int64(__pyx_t_3); if (unlikely((__pyx_t_8 == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 816; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_obj->value = __pyx_t_8; /* "pandas/tslib.pyx":817 * ts_offset = _get_utcoffset(ts.tzinfo, ts) * obj.value -= _delta_to_nanoseconds(ts_offset) * tz_offset = _get_utcoffset(tz, ts) # <<<<<<<<<<<<<< * obj.value += _delta_to_nanoseconds(tz_offset) * pandas_datetime_to_datetimestruct(obj.value, */ __pyx_t_3 = __pyx_f_6pandas_5tslib__get_utcoffset(__pyx_v_tz, __pyx_v_ts, 0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 817; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_v_tz_offset = __pyx_t_3; __pyx_t_3 = 0; /* "pandas/tslib.pyx":818 * obj.value -= _delta_to_nanoseconds(ts_offset) * tz_offset = _get_utcoffset(tz, ts) * obj.value += _delta_to_nanoseconds(tz_offset) # <<<<<<<<<<<<<< * pandas_datetime_to_datetimestruct(obj.value, * PANDAS_FR_ns, &obj.dts) */ __pyx_t_3 = __Pyx_PyInt_to_py_npy_int64(__pyx_v_obj->value); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 818; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_10 = __Pyx_GetModuleGlobalName(__pyx_n_s_42); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 818; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 818; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_v_tz_offset); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_tz_offset); __Pyx_GIVEREF(__pyx_v_tz_offset); __pyx_t_4 = PyObject_Call(__pyx_t_10, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 818; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; __pyx_t_5 = PyNumber_InPlaceAdd(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 818; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_8 = __Pyx_PyInt_from_py_npy_int64(__pyx_t_5); if (unlikely((__pyx_t_8 == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 818; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_v_obj->value = __pyx_t_8; /* "pandas/tslib.pyx":820 * obj.value += _delta_to_nanoseconds(tz_offset) * pandas_datetime_to_datetimestruct(obj.value, * PANDAS_FR_ns, &obj.dts) # <<<<<<<<<<<<<< * obj.tzinfo = tz * elif not _is_utc(tz): */ pandas_datetime_to_datetimestruct(__pyx_v_obj->value, PANDAS_FR_ns, (&__pyx_v_obj->dts)); /* "pandas/tslib.pyx":821 * pandas_datetime_to_datetimestruct(obj.value, * PANDAS_FR_ns, &obj.dts) * obj.tzinfo = tz # <<<<<<<<<<<<<< * elif not _is_utc(tz): * try: */ __Pyx_INCREF(__pyx_v_tz); __Pyx_GIVEREF(__pyx_v_tz); __Pyx_GOTREF(__pyx_v_obj->tzinfo); __Pyx_DECREF(__pyx_v_obj->tzinfo); __pyx_v_obj->tzinfo = __pyx_v_tz; } __pyx_L11:; goto __pyx_L10; } /* "pandas/tslib.pyx":822 * PANDAS_FR_ns, &obj.dts) * obj.tzinfo = tz * elif not _is_utc(tz): # <<<<<<<<<<<<<< * try: * ts = tz.localize(ts) */ __pyx_t_1 = ((!(__pyx_f_6pandas_5tslib__is_utc(__pyx_v_tz) != 0)) != 0); if (__pyx_t_1) { /* "pandas/tslib.pyx":823 * obj.tzinfo = tz * elif not _is_utc(tz): * try: # <<<<<<<<<<<<<< * ts = tz.localize(ts) * except AttributeError: */ { __Pyx_ExceptionSave(&__pyx_t_11, &__pyx_t_12, &__pyx_t_13); __Pyx_XGOTREF(__pyx_t_11); __Pyx_XGOTREF(__pyx_t_12); __Pyx_XGOTREF(__pyx_t_13); /*try:*/ { /* "pandas/tslib.pyx":824 * elif not _is_utc(tz): * try: * ts = tz.localize(ts) # <<<<<<<<<<<<<< * except AttributeError: * ts = ts.replace(tzinfo=tz) */ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_tz, __pyx_n_s__localize); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 824; __pyx_clineno = __LINE__; goto __pyx_L12_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 824; __pyx_clineno = __LINE__; goto __pyx_L12_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_v_ts); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_ts); __Pyx_GIVEREF(__pyx_v_ts); __pyx_t_3 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 824; __pyx_clineno = __LINE__; goto __pyx_L12_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __Pyx_DECREF_SET(__pyx_v_ts, __pyx_t_3); __pyx_t_3 = 0; } __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; goto __pyx_L19_try_end; __pyx_L12_error:; __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/tslib.pyx":825 * try: * ts = tz.localize(ts) * except AttributeError: # <<<<<<<<<<<<<< * ts = ts.replace(tzinfo=tz) * obj.value = _pydatetime_to_dts(ts, &obj.dts) */ __pyx_t_14 = PyErr_ExceptionMatches(__pyx_builtin_AttributeError); if (__pyx_t_14) { __Pyx_AddTraceback("pandas.tslib.convert_to_tsobject", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_3, &__pyx_t_4, &__pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 825; __pyx_clineno = __LINE__; goto __pyx_L14_except_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_GOTREF(__pyx_t_4); __Pyx_GOTREF(__pyx_t_5); /* "pandas/tslib.pyx":826 * ts = tz.localize(ts) * except AttributeError: * ts = ts.replace(tzinfo=tz) # <<<<<<<<<<<<<< * obj.value = _pydatetime_to_dts(ts, &obj.dts) * obj.tzinfo = ts.tzinfo */ __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_ts, __pyx_n_s__replace); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 826; __pyx_clineno = __LINE__; goto __pyx_L14_except_error;} __Pyx_GOTREF(__pyx_t_10); __pyx_t_15 = PyDict_New(); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 826; __pyx_clineno = __LINE__; goto __pyx_L14_except_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_15)); if (PyDict_SetItem(__pyx_t_15, ((PyObject *)__pyx_n_s__tzinfo), __pyx_v_tz) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 826; __pyx_clineno = __LINE__; goto __pyx_L14_except_error;} __pyx_t_16 = PyObject_Call(__pyx_t_10, ((PyObject *)__pyx_empty_tuple), ((PyObject *)__pyx_t_15)); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 826; __pyx_clineno = __LINE__; goto __pyx_L14_except_error;} __Pyx_GOTREF(__pyx_t_16); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_15)); __pyx_t_15 = 0; __Pyx_DECREF_SET(__pyx_v_ts, __pyx_t_16); __pyx_t_16 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; goto __pyx_L13_exception_handled; } __pyx_L14_except_error:; __Pyx_XGIVEREF(__pyx_t_11); __Pyx_XGIVEREF(__pyx_t_12); __Pyx_XGIVEREF(__pyx_t_13); __Pyx_ExceptionReset(__pyx_t_11, __pyx_t_12, __pyx_t_13); goto __pyx_L1_error; __pyx_L13_exception_handled:; __Pyx_XGIVEREF(__pyx_t_11); __Pyx_XGIVEREF(__pyx_t_12); __Pyx_XGIVEREF(__pyx_t_13); __Pyx_ExceptionReset(__pyx_t_11, __pyx_t_12, __pyx_t_13); __pyx_L19_try_end:; } /* "pandas/tslib.pyx":827 * except AttributeError: * ts = ts.replace(tzinfo=tz) * obj.value = _pydatetime_to_dts(ts, &obj.dts) # <<<<<<<<<<<<<< * obj.tzinfo = ts.tzinfo * else: */ __pyx_v_obj->value = __pyx_f_8datetime__pydatetime_to_dts(__pyx_v_ts, (&__pyx_v_obj->dts)); /* "pandas/tslib.pyx":828 * ts = ts.replace(tzinfo=tz) * obj.value = _pydatetime_to_dts(ts, &obj.dts) * obj.tzinfo = ts.tzinfo # <<<<<<<<<<<<<< * else: * # UTC */ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_ts, __pyx_n_s__tzinfo); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 828; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __Pyx_GOTREF(__pyx_v_obj->tzinfo); __Pyx_DECREF(__pyx_v_obj->tzinfo); __pyx_v_obj->tzinfo = __pyx_t_5; __pyx_t_5 = 0; goto __pyx_L10; } /*else*/ { /* "pandas/tslib.pyx":831 * else: * # UTC * obj.value = _pydatetime_to_dts(ts, &obj.dts) # <<<<<<<<<<<<<< * obj.tzinfo = pytz.utc * else: */ __pyx_v_obj->value = __pyx_f_8datetime__pydatetime_to_dts(__pyx_v_ts, (&__pyx_v_obj->dts)); /* "pandas/tslib.pyx":832 * # UTC * obj.value = _pydatetime_to_dts(ts, &obj.dts) * obj.tzinfo = pytz.utc # <<<<<<<<<<<<<< * else: * obj.value = _pydatetime_to_dts(ts, &obj.dts) */ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s__pytz); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 832; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s__utc); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 832; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GIVEREF(__pyx_t_4); __Pyx_GOTREF(__pyx_v_obj->tzinfo); __Pyx_DECREF(__pyx_v_obj->tzinfo); __pyx_v_obj->tzinfo = __pyx_t_4; __pyx_t_4 = 0; } __pyx_L10:; goto __pyx_L9; } /*else*/ { /* "pandas/tslib.pyx":834 * obj.tzinfo = pytz.utc * else: * obj.value = _pydatetime_to_dts(ts, &obj.dts) # <<<<<<<<<<<<<< * obj.tzinfo = ts.tzinfo * */ __pyx_v_obj->value = __pyx_f_8datetime__pydatetime_to_dts(__pyx_v_ts, (&__pyx_v_obj->dts)); /* "pandas/tslib.pyx":835 * else: * obj.value = _pydatetime_to_dts(ts, &obj.dts) * obj.tzinfo = ts.tzinfo # <<<<<<<<<<<<<< * * if obj.tzinfo is not None and not _is_utc(obj.tzinfo): */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_ts, __pyx_n_s__tzinfo); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 835; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __Pyx_GOTREF(__pyx_v_obj->tzinfo); __Pyx_DECREF(__pyx_v_obj->tzinfo); __pyx_v_obj->tzinfo = __pyx_t_4; __pyx_t_4 = 0; } __pyx_L9:; /* "pandas/tslib.pyx":837 * obj.tzinfo = ts.tzinfo * * if obj.tzinfo is not None and not _is_utc(obj.tzinfo): # <<<<<<<<<<<<<< * offset = _get_utcoffset(obj.tzinfo, ts) * obj.value -= _delta_to_nanoseconds(offset) */ __pyx_t_1 = (__pyx_v_obj->tzinfo != Py_None); if ((__pyx_t_1 != 0)) { __pyx_t_4 = __pyx_v_obj->tzinfo; __Pyx_INCREF(__pyx_t_4); __pyx_t_2 = ((!(__pyx_f_6pandas_5tslib__is_utc(__pyx_t_4) != 0)) != 0); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_7 = __pyx_t_2; } else { __pyx_t_7 = (__pyx_t_1 != 0); } if (__pyx_t_7) { /* "pandas/tslib.pyx":838 * * if obj.tzinfo is not None and not _is_utc(obj.tzinfo): * offset = _get_utcoffset(obj.tzinfo, ts) # <<<<<<<<<<<<<< * obj.value -= _delta_to_nanoseconds(offset) * */ __pyx_t_4 = __pyx_v_obj->tzinfo; __Pyx_INCREF(__pyx_t_4); __pyx_t_5 = __pyx_f_6pandas_5tslib__get_utcoffset(__pyx_t_4, __pyx_v_ts, 0); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 838; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_offset = __pyx_t_5; __pyx_t_5 = 0; /* "pandas/tslib.pyx":839 * if obj.tzinfo is not None and not _is_utc(obj.tzinfo): * offset = _get_utcoffset(obj.tzinfo, ts) * obj.value -= _delta_to_nanoseconds(offset) # <<<<<<<<<<<<<< * * if is_timestamp(ts): */ __pyx_t_5 = __Pyx_PyInt_to_py_npy_int64(__pyx_v_obj->value); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 839; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_42); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 839; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 839; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_v_offset); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_offset); __Pyx_GIVEREF(__pyx_v_offset); __pyx_t_16 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 839; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_16); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; __pyx_t_3 = PyNumber_InPlaceSubtract(__pyx_t_5, __pyx_t_16); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 839; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; __pyx_t_8 = __Pyx_PyInt_from_py_npy_int64(__pyx_t_3); if (unlikely((__pyx_t_8 == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 839; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_obj->value = __pyx_t_8; goto __pyx_L22; } __pyx_L22:; /* "pandas/tslib.pyx":841 * obj.value -= _delta_to_nanoseconds(offset) * * if is_timestamp(ts): # <<<<<<<<<<<<<< * obj.value += ts.nanosecond * _check_dts_bounds(&obj.dts) */ __pyx_t_7 = (__pyx_f_6pandas_5tslib_is_timestamp(__pyx_v_ts) != 0); if (__pyx_t_7) { /* "pandas/tslib.pyx":842 * * if is_timestamp(ts): * obj.value += ts.nanosecond # <<<<<<<<<<<<<< * _check_dts_bounds(&obj.dts) * return obj */ __pyx_t_3 = __Pyx_PyInt_to_py_npy_int64(__pyx_v_obj->value); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 842; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_v_ts, __pyx_n_s__nanosecond); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 842; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_16); __pyx_t_5 = PyNumber_InPlaceAdd(__pyx_t_3, __pyx_t_16); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 842; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; __pyx_t_8 = __Pyx_PyInt_from_py_npy_int64(__pyx_t_5); if (unlikely((__pyx_t_8 == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 842; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_v_obj->value = __pyx_t_8; goto __pyx_L23; } __pyx_L23:; /* "pandas/tslib.pyx":843 * if is_timestamp(ts): * obj.value += ts.nanosecond * _check_dts_bounds(&obj.dts) # <<<<<<<<<<<<<< * return obj * elif PyDate_Check(ts): */ __pyx_t_5 = __pyx_f_6pandas_5tslib__check_dts_bounds((&__pyx_v_obj->dts)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 843; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "pandas/tslib.pyx":844 * obj.value += ts.nanosecond * _check_dts_bounds(&obj.dts) * return obj # <<<<<<<<<<<<<< * elif PyDate_Check(ts): * # Keep the converter same as PyDateTime's */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_obj)); __pyx_r = ((PyObject *)__pyx_v_obj); goto __pyx_L0; goto __pyx_L5; } /* "pandas/tslib.pyx":845 * _check_dts_bounds(&obj.dts) * return obj * elif PyDate_Check(ts): # <<<<<<<<<<<<<< * # Keep the converter same as PyDateTime's * ts = datetime.combine(ts, datetime_time()) */ __pyx_t_7 = (PyDate_Check(__pyx_v_ts) != 0); if (__pyx_t_7) { /* "pandas/tslib.pyx":847 * elif PyDate_Check(ts): * # Keep the converter same as PyDateTime's * ts = datetime.combine(ts, datetime_time()) # <<<<<<<<<<<<<< * return convert_to_tsobject(ts, tz, None) * else: */ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)((PyObject*)__pyx_ptype_8datetime_datetime)), __pyx_n_s__combine); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 847; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_16 = __Pyx_GetModuleGlobalName(__pyx_n_s__datetime_time); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 847; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_16); __pyx_t_3 = PyObject_Call(__pyx_t_16, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 847; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; __pyx_t_16 = PyTuple_New(2); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 847; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_16); __Pyx_INCREF(__pyx_v_ts); PyTuple_SET_ITEM(__pyx_t_16, 0, __pyx_v_ts); __Pyx_GIVEREF(__pyx_v_ts); PyTuple_SET_ITEM(__pyx_t_16, 1, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_16), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 847; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_16)); __pyx_t_16 = 0; __Pyx_DECREF_SET(__pyx_v_ts, __pyx_t_3); __pyx_t_3 = 0; /* "pandas/tslib.pyx":848 * # Keep the converter same as PyDateTime's * ts = datetime.combine(ts, datetime_time()) * return convert_to_tsobject(ts, tz, None) # <<<<<<<<<<<<<< * else: * raise ValueError("Could not construct Timestamp from argument %s" % */ __Pyx_XDECREF(__pyx_r); __pyx_t_3 = __pyx_f_6pandas_5tslib_convert_to_tsobject(__pyx_v_ts, __pyx_v_tz, Py_None); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 848; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; goto __pyx_L5; } /*else*/ { /* "pandas/tslib.pyx":851 * else: * raise ValueError("Could not construct Timestamp from argument %s" % * type(ts)) # <<<<<<<<<<<<<< * * if obj.value != NPY_NAT: */ __pyx_t_3 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_44), ((PyObject *)Py_TYPE(__pyx_v_ts))); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 850; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_3)); __pyx_t_16 = PyTuple_New(1); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 850; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_16); PyTuple_SET_ITEM(__pyx_t_16, 0, ((PyObject *)__pyx_t_3)); __Pyx_GIVEREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; __pyx_t_3 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_16), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 850; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(((PyObject *)__pyx_t_16)); __pyx_t_16 = 0; __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 850; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_L5:; /* "pandas/tslib.pyx":853 * type(ts)) * * if obj.value != NPY_NAT: # <<<<<<<<<<<<<< * _check_dts_bounds(&obj.dts) * */ __pyx_t_7 = ((__pyx_v_obj->value != __pyx_v_6pandas_5tslib_NPY_NAT) != 0); if (__pyx_t_7) { /* "pandas/tslib.pyx":854 * * if obj.value != NPY_NAT: * _check_dts_bounds(&obj.dts) # <<<<<<<<<<<<<< * * if tz is not None: */ __pyx_t_3 = __pyx_f_6pandas_5tslib__check_dts_bounds((&__pyx_v_obj->dts)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 854; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L24; } __pyx_L24:; /* "pandas/tslib.pyx":856 * _check_dts_bounds(&obj.dts) * * if tz is not None: # <<<<<<<<<<<<<< * _localize_tso(obj, tz) * */ __pyx_t_7 = (__pyx_v_tz != Py_None); __pyx_t_1 = (__pyx_t_7 != 0); if (__pyx_t_1) { /* "pandas/tslib.pyx":857 * * if tz is not None: * _localize_tso(obj, tz) # <<<<<<<<<<<<<< * * return obj */ __pyx_f_6pandas_5tslib__localize_tso(__pyx_v_obj, __pyx_v_tz); goto __pyx_L25; } __pyx_L25:; /* "pandas/tslib.pyx":859 * _localize_tso(obj, tz) * * return obj # <<<<<<<<<<<<<< * * cdef inline void _localize_tso(_TSObject obj, object tz): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_obj)); __pyx_r = ((PyObject *)__pyx_v_obj); goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_10); __Pyx_XDECREF(__pyx_t_15); __Pyx_XDECREF(__pyx_t_16); __Pyx_AddTraceback("pandas.tslib.convert_to_tsobject", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_obj); __Pyx_XDECREF(__pyx_v_ts_offset); __Pyx_XDECREF(__pyx_v_tz_offset); __Pyx_XDECREF(__pyx_v_offset); __Pyx_XDECREF(__pyx_v_ts); __Pyx_XDECREF(__pyx_v_tz); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/tslib.pyx":861 * return obj * * cdef inline void _localize_tso(_TSObject obj, object tz): # <<<<<<<<<<<<<< * if _is_utc(tz): * obj.tzinfo = tz */ static CYTHON_INLINE void __pyx_f_6pandas_5tslib__localize_tso(struct __pyx_obj_6pandas_5tslib__TSObject *__pyx_v_obj, PyObject *__pyx_v_tz) { PyDateTime_DateTime *__pyx_v_dt = NULL; PyObject *__pyx_v_delta = NULL; PyObject *__pyx_v_trans = NULL; PyObject *__pyx_v_deltas = NULL; PyObject *__pyx_v_pos = NULL; PyObject *__pyx_v_inf = 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; npy_datetime __pyx_t_10; int __pyx_t_11; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_localize_tso", 0); /* "pandas/tslib.pyx":862 * * cdef inline void _localize_tso(_TSObject obj, object tz): * if _is_utc(tz): # <<<<<<<<<<<<<< * obj.tzinfo = tz * elif _is_tzlocal(tz): */ __pyx_t_1 = (__pyx_f_6pandas_5tslib__is_utc(__pyx_v_tz) != 0); if (__pyx_t_1) { /* "pandas/tslib.pyx":863 * cdef inline void _localize_tso(_TSObject obj, object tz): * if _is_utc(tz): * obj.tzinfo = tz # <<<<<<<<<<<<<< * elif _is_tzlocal(tz): * pandas_datetime_to_datetimestruct(obj.value, PANDAS_FR_ns, &obj.dts) */ __Pyx_INCREF(__pyx_v_tz); __Pyx_GIVEREF(__pyx_v_tz); __Pyx_GOTREF(__pyx_v_obj->tzinfo); __Pyx_DECREF(__pyx_v_obj->tzinfo); __pyx_v_obj->tzinfo = __pyx_v_tz; goto __pyx_L3; } /* "pandas/tslib.pyx":864 * if _is_utc(tz): * obj.tzinfo = tz * elif _is_tzlocal(tz): # <<<<<<<<<<<<<< * pandas_datetime_to_datetimestruct(obj.value, PANDAS_FR_ns, &obj.dts) * dt = datetime(obj.dts.year, obj.dts.month, obj.dts.day, obj.dts.hour, */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s___is_tzlocal); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 864; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 864; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_v_tz); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_tz); __Pyx_GIVEREF(__pyx_v_tz); __pyx_t_4 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 864; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 864; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_1) { /* "pandas/tslib.pyx":865 * obj.tzinfo = tz * elif _is_tzlocal(tz): * pandas_datetime_to_datetimestruct(obj.value, PANDAS_FR_ns, &obj.dts) # <<<<<<<<<<<<<< * dt = datetime(obj.dts.year, obj.dts.month, obj.dts.day, obj.dts.hour, * obj.dts.min, obj.dts.sec, obj.dts.us, tz) */ pandas_datetime_to_datetimestruct(__pyx_v_obj->value, PANDAS_FR_ns, (&__pyx_v_obj->dts)); /* "pandas/tslib.pyx":866 * elif _is_tzlocal(tz): * pandas_datetime_to_datetimestruct(obj.value, PANDAS_FR_ns, &obj.dts) * dt = datetime(obj.dts.year, obj.dts.month, obj.dts.day, obj.dts.hour, # <<<<<<<<<<<<<< * obj.dts.min, obj.dts.sec, obj.dts.us, tz) * delta = int(total_seconds(_get_utcoffset(tz, dt))) * 1000000000 */ __pyx_t_4 = __Pyx_PyInt_to_py_npy_int64(__pyx_v_obj->dts.year); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 866; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = __Pyx_PyInt_to_py_npy_int32(__pyx_v_obj->dts.month); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 866; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_PyInt_to_py_npy_int32(__pyx_v_obj->dts.day); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 866; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = __Pyx_PyInt_to_py_npy_int32(__pyx_v_obj->dts.hour); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 866; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); /* "pandas/tslib.pyx":867 * pandas_datetime_to_datetimestruct(obj.value, PANDAS_FR_ns, &obj.dts) * dt = datetime(obj.dts.year, obj.dts.month, obj.dts.day, obj.dts.hour, * obj.dts.min, obj.dts.sec, obj.dts.us, tz) # <<<<<<<<<<<<<< * delta = int(total_seconds(_get_utcoffset(tz, dt))) * 1000000000 * pandas_datetime_to_datetimestruct(obj.value + delta, */ __pyx_t_6 = __Pyx_PyInt_to_py_npy_int32(__pyx_v_obj->dts.min); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 867; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = __Pyx_PyInt_to_py_npy_int32(__pyx_v_obj->dts.sec); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 867; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_t_8 = __Pyx_PyInt_to_py_npy_int32(__pyx_v_obj->dts.us); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 867; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_9 = PyTuple_New(8); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 866; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_9, 2, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_9, 3, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_9, 4, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_9, 5, __pyx_t_7); __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_9, 6, __pyx_t_8); __Pyx_GIVEREF(__pyx_t_8); __Pyx_INCREF(__pyx_v_tz); PyTuple_SET_ITEM(__pyx_t_9, 7, __pyx_v_tz); __Pyx_GIVEREF(__pyx_v_tz); __pyx_t_4 = 0; __pyx_t_3 = 0; __pyx_t_2 = 0; __pyx_t_5 = 0; __pyx_t_6 = 0; __pyx_t_7 = 0; __pyx_t_8 = 0; __pyx_t_8 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_8datetime_datetime)), ((PyObject *)__pyx_t_9), NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 866; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(((PyObject *)__pyx_t_9)); __pyx_t_9 = 0; __pyx_v_dt = ((PyDateTime_DateTime *)__pyx_t_8); __pyx_t_8 = 0; /* "pandas/tslib.pyx":868 * dt = datetime(obj.dts.year, obj.dts.month, obj.dts.day, obj.dts.hour, * obj.dts.min, obj.dts.sec, obj.dts.us, tz) * delta = int(total_seconds(_get_utcoffset(tz, dt))) * 1000000000 # <<<<<<<<<<<<<< * pandas_datetime_to_datetimestruct(obj.value + delta, * PANDAS_FR_ns, &obj.dts) */ __pyx_t_8 = __pyx_f_6pandas_5tslib__get_utcoffset(__pyx_v_tz, ((PyObject *)__pyx_v_dt), 0); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 868; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_9 = PyFloat_FromDouble(__pyx_f_6pandas_5tslib_total_seconds(__pyx_t_8)); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 868; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 868; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_9); __Pyx_GIVEREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_9 = PyObject_Call(((PyObject *)((PyObject*)(&PyInt_Type))), ((PyObject *)__pyx_t_8), NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 868; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0; __pyx_t_8 = PyNumber_Multiply(__pyx_t_9, __pyx_int_1000000000); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 868; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_v_delta = __pyx_t_8; __pyx_t_8 = 0; /* "pandas/tslib.pyx":869 * obj.dts.min, obj.dts.sec, obj.dts.us, tz) * delta = int(total_seconds(_get_utcoffset(tz, dt))) * 1000000000 * pandas_datetime_to_datetimestruct(obj.value + delta, # <<<<<<<<<<<<<< * PANDAS_FR_ns, &obj.dts) * obj.tzinfo = tz */ __pyx_t_8 = __Pyx_PyInt_to_py_npy_int64(__pyx_v_obj->value); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 869; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_9 = PyNumber_Add(__pyx_t_8, __pyx_v_delta); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 869; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_10 = __Pyx_PyInt_from_py_npy_int64(__pyx_t_9); if (unlikely((__pyx_t_10 == (npy_datetime)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 869; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; /* "pandas/tslib.pyx":870 * delta = int(total_seconds(_get_utcoffset(tz, dt))) * 1000000000 * pandas_datetime_to_datetimestruct(obj.value + delta, * PANDAS_FR_ns, &obj.dts) # <<<<<<<<<<<<<< * obj.tzinfo = tz * else: */ pandas_datetime_to_datetimestruct(__pyx_t_10, PANDAS_FR_ns, (&__pyx_v_obj->dts)); /* "pandas/tslib.pyx":871 * pandas_datetime_to_datetimestruct(obj.value + delta, * PANDAS_FR_ns, &obj.dts) * obj.tzinfo = tz # <<<<<<<<<<<<<< * else: * # Adjust datetime64 timestamp, recompute datetimestruct */ __Pyx_INCREF(__pyx_v_tz); __Pyx_GIVEREF(__pyx_v_tz); __Pyx_GOTREF(__pyx_v_obj->tzinfo); __Pyx_DECREF(__pyx_v_obj->tzinfo); __pyx_v_obj->tzinfo = __pyx_v_tz; goto __pyx_L3; } /*else*/ { /* "pandas/tslib.pyx":874 * else: * # Adjust datetime64 timestamp, recompute datetimestruct * trans = _get_transitions(tz) # <<<<<<<<<<<<<< * deltas = _get_deltas(tz) * pos = trans.searchsorted(obj.value, side='right') - 1 */ __pyx_t_9 = __Pyx_GetModuleGlobalName(__pyx_n_s___get_transitions); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 874; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 874; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_INCREF(__pyx_v_tz); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_v_tz); __Pyx_GIVEREF(__pyx_v_tz); __pyx_t_7 = PyObject_Call(__pyx_t_9, ((PyObject *)__pyx_t_8), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 874; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0; __pyx_v_trans = __pyx_t_7; __pyx_t_7 = 0; /* "pandas/tslib.pyx":875 * # Adjust datetime64 timestamp, recompute datetimestruct * trans = _get_transitions(tz) * deltas = _get_deltas(tz) # <<<<<<<<<<<<<< * pos = trans.searchsorted(obj.value, side='right') - 1 * */ __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s___get_deltas); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 875; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 875; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_INCREF(__pyx_v_tz); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_v_tz); __Pyx_GIVEREF(__pyx_v_tz); __pyx_t_9 = PyObject_Call(__pyx_t_7, ((PyObject *)__pyx_t_8), NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 875; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0; __pyx_v_deltas = __pyx_t_9; __pyx_t_9 = 0; /* "pandas/tslib.pyx":876 * trans = _get_transitions(tz) * deltas = _get_deltas(tz) * pos = trans.searchsorted(obj.value, side='right') - 1 # <<<<<<<<<<<<<< * * # statictzinfo */ __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_trans, __pyx_n_s__searchsorted); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 876; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_t_8 = __Pyx_PyInt_to_py_npy_int64(__pyx_v_obj->value); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 876; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 876; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_8); __Pyx_GIVEREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_8 = PyDict_New(); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 876; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_8)); if (PyDict_SetItem(__pyx_t_8, ((PyObject *)__pyx_n_s__side), ((PyObject *)__pyx_n_s__right)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 876; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_6 = PyObject_Call(__pyx_t_9, ((PyObject *)__pyx_t_7), ((PyObject *)__pyx_t_8)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 876; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0; __pyx_t_8 = PyNumber_Subtract(__pyx_t_6, __pyx_int_1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 876; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_v_pos = __pyx_t_8; __pyx_t_8 = 0; /* "pandas/tslib.pyx":879 * * # statictzinfo * if not hasattr(tz, '_transition_info'): # <<<<<<<<<<<<<< * pandas_datetime_to_datetimestruct(obj.value + deltas[0], * PANDAS_FR_ns, &obj.dts) */ __pyx_t_1 = PyObject_HasAttr(__pyx_v_tz, ((PyObject *)__pyx_n_s___transition_info)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 879; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_11 = ((!(__pyx_t_1 != 0)) != 0); if (__pyx_t_11) { /* "pandas/tslib.pyx":880 * # statictzinfo * if not hasattr(tz, '_transition_info'): * pandas_datetime_to_datetimestruct(obj.value + deltas[0], # <<<<<<<<<<<<<< * PANDAS_FR_ns, &obj.dts) * obj.tzinfo = tz */ __pyx_t_8 = __Pyx_PyInt_to_py_npy_int64(__pyx_v_obj->value); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 880; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_deltas, 0, sizeof(long), PyInt_FromLong, 0, 0, 1); if (!__pyx_t_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 880; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = PyNumber_Add(__pyx_t_8, __pyx_t_6); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 880; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_10 = __Pyx_PyInt_from_py_npy_int64(__pyx_t_7); if (unlikely((__pyx_t_10 == (npy_datetime)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 880; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; /* "pandas/tslib.pyx":881 * if not hasattr(tz, '_transition_info'): * pandas_datetime_to_datetimestruct(obj.value + deltas[0], * PANDAS_FR_ns, &obj.dts) # <<<<<<<<<<<<<< * obj.tzinfo = tz * else: */ pandas_datetime_to_datetimestruct(__pyx_t_10, PANDAS_FR_ns, (&__pyx_v_obj->dts)); /* "pandas/tslib.pyx":882 * pandas_datetime_to_datetimestruct(obj.value + deltas[0], * PANDAS_FR_ns, &obj.dts) * obj.tzinfo = tz # <<<<<<<<<<<<<< * else: * inf = tz._transition_info[pos] */ __Pyx_INCREF(__pyx_v_tz); __Pyx_GIVEREF(__pyx_v_tz); __Pyx_GOTREF(__pyx_v_obj->tzinfo); __Pyx_DECREF(__pyx_v_obj->tzinfo); __pyx_v_obj->tzinfo = __pyx_v_tz; goto __pyx_L4; } /*else*/ { /* "pandas/tslib.pyx":884 * obj.tzinfo = tz * else: * inf = tz._transition_info[pos] # <<<<<<<<<<<<<< * pandas_datetime_to_datetimestruct(obj.value + deltas[pos], * PANDAS_FR_ns, &obj.dts) */ __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_tz, __pyx_n_s___transition_info); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 884; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_t_6 = PyObject_GetItem(__pyx_t_7, __pyx_v_pos); if (!__pyx_t_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 884; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_v_inf = __pyx_t_6; __pyx_t_6 = 0; /* "pandas/tslib.pyx":885 * else: * inf = tz._transition_info[pos] * pandas_datetime_to_datetimestruct(obj.value + deltas[pos], # <<<<<<<<<<<<<< * PANDAS_FR_ns, &obj.dts) * obj.tzinfo = tz._tzinfos[inf] */ __pyx_t_6 = __Pyx_PyInt_to_py_npy_int64(__pyx_v_obj->value); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 885; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = PyObject_GetItem(__pyx_v_deltas, __pyx_v_pos); if (!__pyx_t_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 885; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_t_8 = PyNumber_Add(__pyx_t_6, __pyx_t_7); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 885; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_10 = __Pyx_PyInt_from_py_npy_int64(__pyx_t_8); if (unlikely((__pyx_t_10 == (npy_datetime)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 885; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; /* "pandas/tslib.pyx":886 * inf = tz._transition_info[pos] * pandas_datetime_to_datetimestruct(obj.value + deltas[pos], * PANDAS_FR_ns, &obj.dts) # <<<<<<<<<<<<<< * obj.tzinfo = tz._tzinfos[inf] * */ pandas_datetime_to_datetimestruct(__pyx_t_10, PANDAS_FR_ns, (&__pyx_v_obj->dts)); /* "pandas/tslib.pyx":887 * pandas_datetime_to_datetimestruct(obj.value + deltas[pos], * PANDAS_FR_ns, &obj.dts) * obj.tzinfo = tz._tzinfos[inf] # <<<<<<<<<<<<<< * * */ __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_tz, __pyx_n_s___tzinfos); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 887; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_7 = PyObject_GetItem(__pyx_t_8, __pyx_v_inf); if (!__pyx_t_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 887; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_GIVEREF(__pyx_t_7); __Pyx_GOTREF(__pyx_v_obj->tzinfo); __Pyx_DECREF(__pyx_v_obj->tzinfo); __pyx_v_obj->tzinfo = __pyx_t_7; __pyx_t_7 = 0; } __pyx_L4:; } __pyx_L3:; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); __Pyx_WriteUnraisable("pandas.tslib._localize_tso", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_dt); __Pyx_XDECREF(__pyx_v_delta); __Pyx_XDECREF(__pyx_v_trans); __Pyx_XDECREF(__pyx_v_deltas); __Pyx_XDECREF(__pyx_v_pos); __Pyx_XDECREF(__pyx_v_inf); __Pyx_RefNannyFinishContext(); } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5tslib_19get_timezone(PyObject *__pyx_self, PyObject *__pyx_v_tz); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5tslib_19get_timezone = {__Pyx_NAMESTR("get_timezone"), (PyCFunction)__pyx_pw_6pandas_5tslib_19get_timezone, METH_O, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5tslib_19get_timezone(PyObject *__pyx_self, PyObject *__pyx_v_tz) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("get_timezone (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_5tslib_18get_timezone(__pyx_self, ((PyObject *)__pyx_v_tz)); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/tslib.pyx":890 * * * def get_timezone(tz): # <<<<<<<<<<<<<< * return _get_zone(tz) * */ static PyObject *__pyx_pf_6pandas_5tslib_18get_timezone(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_tz) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_timezone", 0); /* "pandas/tslib.pyx":891 * * def get_timezone(tz): * return _get_zone(tz) # <<<<<<<<<<<<<< * * cdef inline bint _is_utc(object tz): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_6pandas_5tslib__get_zone(__pyx_v_tz); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 891; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas.tslib.get_timezone", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/tslib.pyx":893 * return _get_zone(tz) * * cdef inline bint _is_utc(object tz): # <<<<<<<<<<<<<< * return tz is UTC or isinstance(tz, _du_utc) * */ static CYTHON_INLINE int __pyx_f_6pandas_5tslib__is_utc(PyObject *__pyx_v_tz) { int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; int __pyx_t_3; int __pyx_t_4; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_is_utc", 0); /* "pandas/tslib.pyx":894 * * cdef inline bint _is_utc(object tz): * return tz is UTC or isinstance(tz, _du_utc) # <<<<<<<<<<<<<< * * cdef inline object _get_zone(object tz): */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__UTC); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 894; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = (__pyx_v_tz == __pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (!__pyx_t_2) { __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s___du_utc); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 894; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = PyObject_IsInstance(__pyx_v_tz, __pyx_t_1); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 894; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_4 = __pyx_t_3; } else { __pyx_t_4 = __pyx_t_2; } __pyx_r = __pyx_t_4; goto __pyx_L0; __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_WriteUnraisable("pandas.tslib._is_utc", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/tslib.pyx":896 * return tz is UTC or isinstance(tz, _du_utc) * * cdef inline object _get_zone(object tz): # <<<<<<<<<<<<<< * if _is_utc(tz): * return 'UTC' */ static CYTHON_INLINE PyObject *__pyx_f_6pandas_5tslib__get_zone(PyObject *__pyx_v_tz) { PyObject *__pyx_v_zone = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; int __pyx_t_6; int __pyx_t_7; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_get_zone", 0); /* "pandas/tslib.pyx":897 * * cdef inline object _get_zone(object tz): * if _is_utc(tz): # <<<<<<<<<<<<<< * return 'UTC' * else: */ __pyx_t_1 = (__pyx_f_6pandas_5tslib__is_utc(__pyx_v_tz) != 0); if (__pyx_t_1) { /* "pandas/tslib.pyx":898 * cdef inline object _get_zone(object tz): * if _is_utc(tz): * return 'UTC' # <<<<<<<<<<<<<< * else: * try: */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_n_s__UTC)); __pyx_r = ((PyObject *)__pyx_n_s__UTC); goto __pyx_L0; goto __pyx_L3; } /*else*/ { /* "pandas/tslib.pyx":900 * return 'UTC' * else: * try: # <<<<<<<<<<<<<< * zone = tz.zone * if zone is None: */ { __Pyx_ExceptionSave(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4); __Pyx_XGOTREF(__pyx_t_2); __Pyx_XGOTREF(__pyx_t_3); __Pyx_XGOTREF(__pyx_t_4); /*try:*/ { /* "pandas/tslib.pyx":901 * else: * try: * zone = tz.zone # <<<<<<<<<<<<<< * if zone is None: * return tz */ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_tz, __pyx_n_s__zone); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 901; __pyx_clineno = __LINE__; goto __pyx_L4_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_v_zone = __pyx_t_5; __pyx_t_5 = 0; /* "pandas/tslib.pyx":902 * try: * zone = tz.zone * if zone is None: # <<<<<<<<<<<<<< * return tz * return zone */ __pyx_t_1 = (__pyx_v_zone == Py_None); __pyx_t_6 = (__pyx_t_1 != 0); if (__pyx_t_6) { /* "pandas/tslib.pyx":903 * zone = tz.zone * if zone is None: * return tz # <<<<<<<<<<<<<< * return zone * except AttributeError: */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_tz); __pyx_r = __pyx_v_tz; goto __pyx_L8_try_return; goto __pyx_L12; } __pyx_L12:; /* "pandas/tslib.pyx":904 * if zone is None: * return tz * return zone # <<<<<<<<<<<<<< * except AttributeError: * return tz */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_zone); __pyx_r = __pyx_v_zone; goto __pyx_L8_try_return; } __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; goto __pyx_L11_try_end; __pyx_L8_try_return:; __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_XGIVEREF(__pyx_t_4); __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4); goto __pyx_L0; __pyx_L4_error:; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; /* "pandas/tslib.pyx":905 * return tz * return zone * except AttributeError: # <<<<<<<<<<<<<< * return tz * */ __pyx_t_7 = PyErr_ExceptionMatches(__pyx_builtin_AttributeError); if (__pyx_t_7) { __Pyx_AddTraceback("pandas.tslib._get_zone", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_8, &__pyx_t_9) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 905; __pyx_clineno = __LINE__; goto __pyx_L6_except_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_GOTREF(__pyx_t_8); __Pyx_GOTREF(__pyx_t_9); /* "pandas/tslib.pyx":906 * return zone * except AttributeError: * return tz # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_tz); __pyx_r = __pyx_v_tz; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; goto __pyx_L7_except_return; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; goto __pyx_L5_exception_handled; } __pyx_L6_except_error:; __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_XGIVEREF(__pyx_t_4); __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4); goto __pyx_L1_error; __pyx_L7_except_return:; __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_XGIVEREF(__pyx_t_4); __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4); goto __pyx_L0; __pyx_L5_exception_handled:; __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_XGIVEREF(__pyx_t_4); __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4); __pyx_L11_try_end:; } } __pyx_L3:; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); __Pyx_AddTraceback("pandas.tslib._get_zone", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_zone); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/tslib.pyx":912 * pass * * cdef inline _check_dts_bounds(pandas_datetimestruct *dts): # <<<<<<<<<<<<<< * cdef: * bint error = False */ static CYTHON_INLINE PyObject *__pyx_f_6pandas_5tslib__check_dts_bounds(pandas_datetimestruct *__pyx_v_dts) { int __pyx_v_error; PyObject *__pyx_v_fmt = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_check_dts_bounds", 0); /* "pandas/tslib.pyx":914 * cdef inline _check_dts_bounds(pandas_datetimestruct *dts): * cdef: * bint error = False # <<<<<<<<<<<<<< * * if dts.year <= 1677 and cmp_pandas_datetimestruct(dts, &_NS_MIN_DTS) == -1: */ __pyx_v_error = 0; /* "pandas/tslib.pyx":916 * bint error = False * * if dts.year <= 1677 and cmp_pandas_datetimestruct(dts, &_NS_MIN_DTS) == -1: # <<<<<<<<<<<<<< * error = True * elif ( */ __pyx_t_1 = ((__pyx_v_dts->year <= 1677) != 0); if (__pyx_t_1) { __pyx_t_2 = ((cmp_pandas_datetimestruct(__pyx_v_dts, (&__pyx_v_6pandas_5tslib__NS_MIN_DTS)) == -1) != 0); __pyx_t_3 = __pyx_t_2; } else { __pyx_t_3 = __pyx_t_1; } if (__pyx_t_3) { /* "pandas/tslib.pyx":917 * * if dts.year <= 1677 and cmp_pandas_datetimestruct(dts, &_NS_MIN_DTS) == -1: * error = True # <<<<<<<<<<<<<< * elif ( * dts.year >= 2262 and */ __pyx_v_error = 1; goto __pyx_L3; } /* "pandas/tslib.pyx":919 * error = True * elif ( * dts.year >= 2262 and # <<<<<<<<<<<<<< * cmp_pandas_datetimestruct(dts, &_NS_MAX_DTS) == 1): * error = True */ __pyx_t_3 = ((__pyx_v_dts->year >= 2262) != 0); if (__pyx_t_3) { /* "pandas/tslib.pyx":920 * elif ( * dts.year >= 2262 and * cmp_pandas_datetimestruct(dts, &_NS_MAX_DTS) == 1): # <<<<<<<<<<<<<< * error = True * */ __pyx_t_1 = ((cmp_pandas_datetimestruct(__pyx_v_dts, (&__pyx_v_6pandas_5tslib__NS_MAX_DTS)) == 1) != 0); __pyx_t_2 = __pyx_t_1; } else { __pyx_t_2 = __pyx_t_3; } if (__pyx_t_2) { /* "pandas/tslib.pyx":921 * dts.year >= 2262 and * cmp_pandas_datetimestruct(dts, &_NS_MAX_DTS) == 1): * error = True # <<<<<<<<<<<<<< * * if error: */ __pyx_v_error = 1; goto __pyx_L3; } __pyx_L3:; /* "pandas/tslib.pyx":923 * error = True * * if error: # <<<<<<<<<<<<<< * fmt = '%d-%.2d-%.2d %.2d:%.2d:%.2d' % (dts.year, dts.month, * dts.day, dts.hour, */ __pyx_t_2 = (__pyx_v_error != 0); if (__pyx_t_2) { /* "pandas/tslib.pyx":924 * * if error: * fmt = '%d-%.2d-%.2d %.2d:%.2d:%.2d' % (dts.year, dts.month, # <<<<<<<<<<<<<< * dts.day, dts.hour, * dts.min, dts.sec) */ __pyx_t_4 = __Pyx_PyInt_to_py_npy_int64(__pyx_v_dts->year); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 924; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyInt_to_py_npy_int32(__pyx_v_dts->month); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 924; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); /* "pandas/tslib.pyx":925 * if error: * fmt = '%d-%.2d-%.2d %.2d:%.2d:%.2d' % (dts.year, dts.month, * dts.day, dts.hour, # <<<<<<<<<<<<<< * dts.min, dts.sec) * */ __pyx_t_6 = __Pyx_PyInt_to_py_npy_int32(__pyx_v_dts->day); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 925; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = __Pyx_PyInt_to_py_npy_int32(__pyx_v_dts->hour); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 925; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); /* "pandas/tslib.pyx":926 * fmt = '%d-%.2d-%.2d %.2d:%.2d:%.2d' % (dts.year, dts.month, * dts.day, dts.hour, * dts.min, dts.sec) # <<<<<<<<<<<<<< * * raise OutOfBoundsDatetime('Out of bounds nanosecond timestamp: %s' % fmt) */ __pyx_t_8 = __Pyx_PyInt_to_py_npy_int32(__pyx_v_dts->min); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 926; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_9 = __Pyx_PyInt_to_py_npy_int32(__pyx_v_dts->sec); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 926; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_t_10 = PyTuple_New(6); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 924; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_10, 2, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_10, 3, __pyx_t_7); __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_10, 4, __pyx_t_8); __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_10, 5, __pyx_t_9); __Pyx_GIVEREF(__pyx_t_9); __pyx_t_4 = 0; __pyx_t_5 = 0; __pyx_t_6 = 0; __pyx_t_7 = 0; __pyx_t_8 = 0; __pyx_t_9 = 0; __pyx_t_9 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_45), ((PyObject *)__pyx_t_10)); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 924; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_9)); __Pyx_DECREF(((PyObject *)__pyx_t_10)); __pyx_t_10 = 0; __pyx_v_fmt = ((PyObject *)__pyx_t_9); __pyx_t_9 = 0; /* "pandas/tslib.pyx":928 * dts.min, dts.sec) * * raise OutOfBoundsDatetime('Out of bounds nanosecond timestamp: %s' % fmt) # <<<<<<<<<<<<<< * * # elif isinstance(ts, _Timestamp): */ __pyx_t_9 = __Pyx_GetModuleGlobalName(__pyx_n_s__OutOfBoundsDatetime); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 928; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_t_10 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_46), __pyx_v_fmt); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 928; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_10)); __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 928; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_8, 0, ((PyObject *)__pyx_t_10)); __Pyx_GIVEREF(((PyObject *)__pyx_t_10)); __pyx_t_10 = 0; __pyx_t_10 = PyObject_Call(__pyx_t_9, ((PyObject *)__pyx_t_8), NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 928; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0; __Pyx_Raise(__pyx_t_10, 0, 0, 0); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 928; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L4; } __pyx_L4:; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); __Pyx_XDECREF(__pyx_t_10); __Pyx_AddTraceback("pandas.tslib._check_dts_bounds", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_fmt); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5tslib_21datetime_to_datetime64(PyObject *__pyx_self, PyObject *__pyx_v_values); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5tslib_21datetime_to_datetime64 = {__Pyx_NAMESTR("datetime_to_datetime64"), (PyCFunction)__pyx_pw_6pandas_5tslib_21datetime_to_datetime64, METH_O, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5tslib_21datetime_to_datetime64(PyObject *__pyx_self, PyObject *__pyx_v_values) { CYTHON_UNUSED int __pyx_lineno = 0; CYTHON_UNUSED const char *__pyx_filename = NULL; CYTHON_UNUSED int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("datetime_to_datetime64 (wrapper)", 0); if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 939; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5tslib_20datetime_to_datetime64(__pyx_self, ((PyArrayObject *)__pyx_v_values)); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/tslib.pyx":939 * # obj.dtval = _dts_to_pydatetime(&obj.dts) * * def datetime_to_datetime64(ndarray[object] values): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = len(values) */ static PyObject *__pyx_pf_6pandas_5tslib_20datetime_to_datetime64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_n; PyObject *__pyx_v_val = 0; PyObject *__pyx_v_inferred_tz = 0; PyArrayObject *__pyx_v_iresult = 0; pandas_datetimestruct __pyx_v_dts; struct __pyx_obj_6pandas_5tslib__TSObject *__pyx_v__ts = 0; PyObject *__pyx_v_result = NULL; __Pyx_LocalBuf_ND __pyx_pybuffernd_iresult; __Pyx_Buffer __pyx_pybuffer_iresult; __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; PyArrayObject *__pyx_t_6 = NULL; 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; int __pyx_t_13; __pyx_t_5numpy_int64_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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("datetime_to_datetime64", 0); __pyx_pybuffer_iresult.pybuffer.buf = NULL; __pyx_pybuffer_iresult.refcount = 0; __pyx_pybuffernd_iresult.data = NULL; __pyx_pybuffernd_iresult.rcbuffer = &__pyx_pybuffer_iresult; __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_filename = __pyx_f[0]; __pyx_lineno = 939; __pyx_clineno = __LINE__; goto __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/tslib.pyx":941 * def datetime_to_datetime64(ndarray[object] values): * cdef: * Py_ssize_t i, n = len(values) # <<<<<<<<<<<<<< * object val, inferred_tz = None * ndarray[int64_t] iresult */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 941; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/tslib.pyx":942 * cdef: * Py_ssize_t i, n = len(values) * object val, inferred_tz = None # <<<<<<<<<<<<<< * ndarray[int64_t] iresult * pandas_datetimestruct dts */ __Pyx_INCREF(Py_None); __pyx_v_inferred_tz = Py_None; /* "pandas/tslib.pyx":947 * _TSObject _ts * * result = np.empty(n, dtype='M8[ns]') # <<<<<<<<<<<<<< * iresult = result.view('i8') * for i in range(n): */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 947; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 947; __pyx_clineno = __LINE__; goto __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_n); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 947; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 947; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 947; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_2)); if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__dtype), ((PyObject *)__pyx_kp_s_18)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 947; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_5 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 947; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __pyx_v_result = __pyx_t_5; __pyx_t_5 = 0; /* "pandas/tslib.pyx":948 * * result = np.empty(n, dtype='M8[ns]') * iresult = result.view('i8') # <<<<<<<<<<<<<< * for i in range(n): * val = values[i] */ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_result, __pyx_n_s__view); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 948; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_2 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_k_tuple_47), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 948; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 948; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_6 = ((PyArrayObject *)__pyx_t_2); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_iresult.rcbuffer->pybuffer); __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_iresult.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_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_iresult.rcbuffer->pybuffer, (PyObject*)__pyx_v_iresult, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_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_pybuffernd_iresult.diminfo[0].strides = __pyx_pybuffernd_iresult.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_iresult.diminfo[0].shape = __pyx_pybuffernd_iresult.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 948; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_6 = 0; __pyx_v_iresult = ((PyArrayObject *)__pyx_t_2); __pyx_t_2 = 0; /* "pandas/tslib.pyx":949 * result = np.empty(n, dtype='M8[ns]') * iresult = result.view('i8') * for i in range(n): # <<<<<<<<<<<<<< * val = values[i] * if _checknull_with_nat(val): */ __pyx_t_1 = __pyx_v_n; for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_1; __pyx_t_11+=1) { __pyx_v_i = __pyx_t_11; /* "pandas/tslib.pyx":950 * iresult = result.view('i8') * for i in range(n): * val = values[i] # <<<<<<<<<<<<<< * if _checknull_with_nat(val): * iresult[i] = iNaT */ __pyx_t_12 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_12 < 0) { __pyx_t_12 += __pyx_pybuffernd_values.diminfo[0].shape; if (unlikely(__pyx_t_12 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_12 >= __pyx_pybuffernd_values.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 950; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_2 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_12, __pyx_pybuffernd_values.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_2); __Pyx_XDECREF_SET(__pyx_v_val, __pyx_t_2); __pyx_t_2 = 0; /* "pandas/tslib.pyx":951 * for i in range(n): * val = values[i] * if _checknull_with_nat(val): # <<<<<<<<<<<<<< * iresult[i] = iNaT * elif PyDateTime_Check(val): */ __pyx_t_13 = (__pyx_f_6pandas_5tslib__checknull_with_nat(__pyx_v_val) != 0); if (__pyx_t_13) { /* "pandas/tslib.pyx":952 * val = values[i] * if _checknull_with_nat(val): * iresult[i] = iNaT # <<<<<<<<<<<<<< * elif PyDateTime_Check(val): * if val.tzinfo is not None: */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__iNaT); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 952; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_14 = __Pyx_PyInt_from_py_npy_int64(__pyx_t_2); if (unlikely((__pyx_t_14 == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 952; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_15 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_15 < 0) { __pyx_t_15 += __pyx_pybuffernd_iresult.diminfo[0].shape; if (unlikely(__pyx_t_15 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_15 >= __pyx_pybuffernd_iresult.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 952; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_iresult.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_iresult.diminfo[0].strides) = __pyx_t_14; goto __pyx_L5; } /* "pandas/tslib.pyx":953 * if _checknull_with_nat(val): * iresult[i] = iNaT * elif PyDateTime_Check(val): # <<<<<<<<<<<<<< * if val.tzinfo is not None: * if inferred_tz is not None: */ __pyx_t_13 = (PyDateTime_Check(__pyx_v_val) != 0); if (__pyx_t_13) { /* "pandas/tslib.pyx":954 * iresult[i] = iNaT * elif PyDateTime_Check(val): * if val.tzinfo is not None: # <<<<<<<<<<<<<< * if inferred_tz is not None: * if _get_zone(val.tzinfo) != inferred_tz: */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_val, __pyx_n_s__tzinfo); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 954; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_13 = (__pyx_t_2 != Py_None); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_16 = (__pyx_t_13 != 0); if (__pyx_t_16) { /* "pandas/tslib.pyx":955 * elif PyDateTime_Check(val): * if val.tzinfo is not None: * if inferred_tz is not None: # <<<<<<<<<<<<<< * if _get_zone(val.tzinfo) != inferred_tz: * raise ValueError('Array must be all same time zone') */ __pyx_t_16 = (__pyx_v_inferred_tz != Py_None); __pyx_t_13 = (__pyx_t_16 != 0); if (__pyx_t_13) { /* "pandas/tslib.pyx":956 * if val.tzinfo is not None: * if inferred_tz is not None: * if _get_zone(val.tzinfo) != inferred_tz: # <<<<<<<<<<<<<< * raise ValueError('Array must be all same time zone') * else: */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_val, __pyx_n_s__tzinfo); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 956; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = __pyx_f_6pandas_5tslib__get_zone(__pyx_t_2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 956; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_RichCompare(__pyx_t_5, __pyx_v_inferred_tz, Py_NE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 956; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_13 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 956; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_13) { /* "pandas/tslib.pyx":957 * if inferred_tz is not None: * if _get_zone(val.tzinfo) != inferred_tz: * raise ValueError('Array must be all same time zone') # <<<<<<<<<<<<<< * else: * inferred_tz = _get_zone(val.tzinfo) */ __pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_49), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 957; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 957; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L8; } __pyx_L8:; goto __pyx_L7; } /*else*/ { /* "pandas/tslib.pyx":959 * raise ValueError('Array must be all same time zone') * else: * inferred_tz = _get_zone(val.tzinfo) # <<<<<<<<<<<<<< * * _ts = convert_to_tsobject(val, None, None) */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_val, __pyx_n_s__tzinfo); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 959; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = __pyx_f_6pandas_5tslib__get_zone(__pyx_t_2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 959; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF_SET(__pyx_v_inferred_tz, __pyx_t_5); __pyx_t_5 = 0; } __pyx_L7:; /* "pandas/tslib.pyx":961 * inferred_tz = _get_zone(val.tzinfo) * * _ts = convert_to_tsobject(val, None, None) # <<<<<<<<<<<<<< * iresult[i] = _ts.value * _check_dts_bounds(&_ts.dts) */ __pyx_t_5 = __pyx_f_6pandas_5tslib_convert_to_tsobject(__pyx_v_val, Py_None, Py_None); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 961; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_6pandas_5tslib__TSObject))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 961; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_XDECREF_SET(__pyx_v__ts, ((struct __pyx_obj_6pandas_5tslib__TSObject *)__pyx_t_5)); __pyx_t_5 = 0; /* "pandas/tslib.pyx":962 * * _ts = convert_to_tsobject(val, None, None) * iresult[i] = _ts.value # <<<<<<<<<<<<<< * _check_dts_bounds(&_ts.dts) * else: */ __pyx_t_14 = __pyx_v__ts->value; __pyx_t_17 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_17 < 0) { __pyx_t_17 += __pyx_pybuffernd_iresult.diminfo[0].shape; if (unlikely(__pyx_t_17 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_17 >= __pyx_pybuffernd_iresult.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 962; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_iresult.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_iresult.diminfo[0].strides) = __pyx_t_14; /* "pandas/tslib.pyx":963 * _ts = convert_to_tsobject(val, None, None) * iresult[i] = _ts.value * _check_dts_bounds(&_ts.dts) # <<<<<<<<<<<<<< * else: * if inferred_tz is not None: */ __pyx_t_5 = __pyx_f_6pandas_5tslib__check_dts_bounds((&__pyx_v__ts->dts)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 963; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; goto __pyx_L6; } /*else*/ { /* "pandas/tslib.pyx":965 * _check_dts_bounds(&_ts.dts) * else: * if inferred_tz is not None: # <<<<<<<<<<<<<< * raise ValueError('Cannot mix tz-aware with tz-naive values') * iresult[i] = _pydatetime_to_dts(val, &dts) */ __pyx_t_13 = (__pyx_v_inferred_tz != Py_None); __pyx_t_16 = (__pyx_t_13 != 0); if (__pyx_t_16) { /* "pandas/tslib.pyx":966 * else: * if inferred_tz is not None: * raise ValueError('Cannot mix tz-aware with tz-naive values') # <<<<<<<<<<<<<< * iresult[i] = _pydatetime_to_dts(val, &dts) * _check_dts_bounds(&dts) */ __pyx_t_5 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_51), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 966; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_Raise(__pyx_t_5, 0, 0, 0); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 966; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L9; } __pyx_L9:; /* "pandas/tslib.pyx":967 * if inferred_tz is not None: * raise ValueError('Cannot mix tz-aware with tz-naive values') * iresult[i] = _pydatetime_to_dts(val, &dts) # <<<<<<<<<<<<<< * _check_dts_bounds(&dts) * else: */ __pyx_t_18 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_18 < 0) { __pyx_t_18 += __pyx_pybuffernd_iresult.diminfo[0].shape; if (unlikely(__pyx_t_18 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_18 >= __pyx_pybuffernd_iresult.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 967; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_iresult.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_iresult.diminfo[0].strides) = __pyx_f_8datetime__pydatetime_to_dts(__pyx_v_val, (&__pyx_v_dts)); /* "pandas/tslib.pyx":968 * raise ValueError('Cannot mix tz-aware with tz-naive values') * iresult[i] = _pydatetime_to_dts(val, &dts) * _check_dts_bounds(&dts) # <<<<<<<<<<<<<< * else: * raise TypeError('Unrecognized value type: %s' % type(val)) */ __pyx_t_5 = __pyx_f_6pandas_5tslib__check_dts_bounds((&__pyx_v_dts)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 968; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } __pyx_L6:; goto __pyx_L5; } /*else*/ { /* "pandas/tslib.pyx":970 * _check_dts_bounds(&dts) * else: * raise TypeError('Unrecognized value type: %s' % type(val)) # <<<<<<<<<<<<<< * * return result, inferred_tz */ __pyx_t_5 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_52), ((PyObject *)Py_TYPE(__pyx_v_val))); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 970; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_5)); __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 970; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_t_5)); __Pyx_GIVEREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; __pyx_t_5 = PyObject_Call(__pyx_builtin_TypeError, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 970; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __Pyx_Raise(__pyx_t_5, 0, 0, 0); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 970; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_L5:; } /* "pandas/tslib.pyx":972 * raise TypeError('Unrecognized value type: %s' % type(val)) * * return result, inferred_tz # <<<<<<<<<<<<<< * * _not_datelike_strings = set(['a','A','m','M','p','P','t','T']) */ __Pyx_XDECREF(__pyx_r); __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 972; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_v_result); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_result); __Pyx_GIVEREF(__pyx_v_result); __Pyx_INCREF(__pyx_v_inferred_tz); PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_v_inferred_tz); __Pyx_GIVEREF(__pyx_v_inferred_tz); __pyx_r = ((PyObject *)__pyx_t_5); __pyx_t_5 = 0; goto __pyx_L0; __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_XDECREF(__pyx_t_5); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_iresult.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.tslib.datetime_to_datetime64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_iresult.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF(__pyx_v_val); __Pyx_XDECREF(__pyx_v_inferred_tz); __Pyx_XDECREF((PyObject *)__pyx_v_iresult); __Pyx_XDECREF((PyObject *)__pyx_v__ts); __Pyx_XDECREF(__pyx_v_result); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5tslib_23_does_string_look_like_datetime(PyObject *__pyx_self, PyObject *__pyx_v_date_string); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5tslib_23_does_string_look_like_datetime = {__Pyx_NAMESTR("_does_string_look_like_datetime"), (PyCFunction)__pyx_pw_6pandas_5tslib_23_does_string_look_like_datetime, METH_O, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5tslib_23_does_string_look_like_datetime(PyObject *__pyx_self, PyObject *__pyx_v_date_string) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_does_string_look_like_datetime (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_5tslib_22_does_string_look_like_datetime(__pyx_self, ((PyObject *)__pyx_v_date_string)); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/tslib.pyx":976 * _not_datelike_strings = set(['a','A','m','M','p','P','t','T']) * * def _does_string_look_like_datetime(date_string): # <<<<<<<<<<<<<< * if date_string.startswith('0'): * # Strings starting with 0 are more consistent with a */ static PyObject *__pyx_pf_6pandas_5tslib_22_does_string_look_like_datetime(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_date_string) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; double __pyx_t_7; int __pyx_t_8; int __pyx_t_9; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_does_string_look_like_datetime", 0); /* "pandas/tslib.pyx":977 * * def _does_string_look_like_datetime(date_string): * if date_string.startswith('0'): # <<<<<<<<<<<<<< * # Strings starting with 0 are more consistent with a * # date-like string than a number */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_date_string, __pyx_n_s__startswith); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 977; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_k_tuple_53), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 977; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 977; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_3) { /* "pandas/tslib.pyx":980 * # Strings starting with 0 are more consistent with a * # date-like string than a number * return True # <<<<<<<<<<<<<< * * try: */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 980; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; goto __pyx_L3; } __pyx_L3:; /* "pandas/tslib.pyx":982 * return True * * try: # <<<<<<<<<<<<<< * if float(date_string) < 1000: * return False */ { __Pyx_ExceptionSave(&__pyx_t_4, &__pyx_t_5, &__pyx_t_6); __Pyx_XGOTREF(__pyx_t_4); __Pyx_XGOTREF(__pyx_t_5); __Pyx_XGOTREF(__pyx_t_6); /*try:*/ { /* "pandas/tslib.pyx":983 * * try: * if float(date_string) < 1000: # <<<<<<<<<<<<<< * return False * except ValueError: */ __pyx_t_7 = __Pyx_PyObject_AsDouble(__pyx_v_date_string); if (unlikely(__pyx_t_7 == ((double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 983; __pyx_clineno = __LINE__; goto __pyx_L4_error;} __pyx_t_3 = ((__pyx_t_7 < 1000.0) != 0); if (__pyx_t_3) { /* "pandas/tslib.pyx":984 * try: * if float(date_string) < 1000: * return False # <<<<<<<<<<<<<< * except ValueError: * pass */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 984; __pyx_clineno = __LINE__; goto __pyx_L4_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L8_try_return; goto __pyx_L12; } __pyx_L12:; } __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; goto __pyx_L11_try_end; __pyx_L8_try_return:; __Pyx_XGIVEREF(__pyx_t_4); __Pyx_XGIVEREF(__pyx_t_5); __Pyx_XGIVEREF(__pyx_t_6); __Pyx_ExceptionReset(__pyx_t_4, __pyx_t_5, __pyx_t_6); goto __pyx_L0; __pyx_L4_error:; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/tslib.pyx":985 * if float(date_string) < 1000: * return False * except ValueError: # <<<<<<<<<<<<<< * pass * */ __pyx_t_8 = PyErr_ExceptionMatches(__pyx_builtin_ValueError); if (__pyx_t_8) { PyErr_Restore(0,0,0); goto __pyx_L5_exception_handled; } __Pyx_XGIVEREF(__pyx_t_4); __Pyx_XGIVEREF(__pyx_t_5); __Pyx_XGIVEREF(__pyx_t_6); __Pyx_ExceptionReset(__pyx_t_4, __pyx_t_5, __pyx_t_6); goto __pyx_L1_error; __pyx_L5_exception_handled:; __Pyx_XGIVEREF(__pyx_t_4); __Pyx_XGIVEREF(__pyx_t_5); __Pyx_XGIVEREF(__pyx_t_6); __Pyx_ExceptionReset(__pyx_t_4, __pyx_t_5, __pyx_t_6); __pyx_L11_try_end:; } /* "pandas/tslib.pyx":988 * pass * * if date_string in _not_datelike_strings: # <<<<<<<<<<<<<< * return False * */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_54); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 988; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = (__Pyx_PySequence_Contains(__pyx_v_date_string, __pyx_t_2, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 988; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_9 = (__pyx_t_3 != 0); if (__pyx_t_9) { /* "pandas/tslib.pyx":989 * * if date_string in _not_datelike_strings: * return False # <<<<<<<<<<<<<< * * return True */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 989; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; goto __pyx_L13; } __pyx_L13:; /* "pandas/tslib.pyx":991 * return False * * return True # <<<<<<<<<<<<<< * * def parse_datetime_string(date_string, **kwargs): */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 991; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("pandas.tslib._does_string_look_like_datetime", __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_5tslib_25parse_datetime_string(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5tslib_25parse_datetime_string = {__Pyx_NAMESTR("parse_datetime_string"), (PyCFunction)__pyx_pw_6pandas_5tslib_25parse_datetime_string, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5tslib_25parse_datetime_string(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_date_string = 0; PyObject *__pyx_v_kwargs = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("parse_datetime_string (wrapper)", 0); __pyx_v_kwargs = PyDict_New(); if (unlikely(!__pyx_v_kwargs)) return NULL; __Pyx_GOTREF(__pyx_v_kwargs); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__date_string,0}; PyObject* values[1] = {0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__date_string)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kwargs, values, pos_args, "parse_datetime_string") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 993; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); } __pyx_v_date_string = values[0]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("parse_datetime_string", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 993; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0; __Pyx_AddTraceback("pandas.tslib.parse_datetime_string", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pandas_5tslib_24parse_datetime_string(__pyx_self, __pyx_v_date_string, __pyx_v_kwargs); __Pyx_XDECREF(__pyx_v_kwargs); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/tslib.pyx":993 * return True * * def parse_datetime_string(date_string, **kwargs): # <<<<<<<<<<<<<< * if not _does_string_look_like_datetime(date_string): * raise ValueError('Given date string not likely a datetime.') */ static PyObject *__pyx_pf_6pandas_5tslib_24parse_datetime_string(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_date_string, PyObject *__pyx_v_kwargs) { PyObject *__pyx_v_dt = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_t_4; int __pyx_t_5; PyObject *__pyx_t_6 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("parse_datetime_string", 0); /* "pandas/tslib.pyx":994 * * def parse_datetime_string(date_string, **kwargs): * if not _does_string_look_like_datetime(date_string): # <<<<<<<<<<<<<< * raise ValueError('Given date string not likely a datetime.') * */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_55); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 994; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 994; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_date_string); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_date_string); __Pyx_GIVEREF(__pyx_v_date_string); __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 994; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 994; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_5 = ((!__pyx_t_4) != 0); if (__pyx_t_5) { /* "pandas/tslib.pyx":995 * def parse_datetime_string(date_string, **kwargs): * if not _does_string_look_like_datetime(date_string): * raise ValueError('Given date string not likely a datetime.') # <<<<<<<<<<<<<< * * dt = parse_date(date_string, **kwargs) */ __pyx_t_3 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_57), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 995; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 995; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L3; } __pyx_L3:; /* "pandas/tslib.pyx":997 * raise ValueError('Given date string not likely a datetime.') * * dt = parse_date(date_string, **kwargs) # <<<<<<<<<<<<<< * return dt * */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s__parse_date); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 997; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 997; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_date_string); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_date_string); __Pyx_GIVEREF(__pyx_v_date_string); __pyx_t_1 = ((PyObject *)__pyx_v_kwargs); __Pyx_INCREF(__pyx_t_1); __pyx_t_6 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_2), ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 997; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_v_dt = __pyx_t_6; __pyx_t_6 = 0; /* "pandas/tslib.pyx":998 * * dt = parse_date(date_string, **kwargs) * return dt # <<<<<<<<<<<<<< * * def array_to_datetime(ndarray[object] values, raise_=False, dayfirst=False, */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_dt); __pyx_r = __pyx_v_dt; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("pandas.tslib.parse_datetime_string", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_dt); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5tslib_27array_to_datetime(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5tslib_27array_to_datetime = {__Pyx_NAMESTR("array_to_datetime"), (PyCFunction)__pyx_pw_6pandas_5tslib_27array_to_datetime, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5tslib_27array_to_datetime(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_values = 0; PyObject *__pyx_v_raise_ = 0; PyObject *__pyx_v_dayfirst = 0; CYTHON_UNUSED PyObject *__pyx_v_format = 0; PyObject *__pyx_v_utc = 0; PyObject *__pyx_v_coerce = 0; PyObject *__pyx_v_unit = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("array_to_datetime (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__values,&__pyx_n_s__raise_,&__pyx_n_s__dayfirst,&__pyx_n_s__format,&__pyx_n_s__utc,&__pyx_n_s__coerce,&__pyx_n_s__unit,0}; PyObject* values[7] = {0,0,0,0,0,0,0}; values[1] = __pyx_k_58; values[2] = __pyx_k_59; /* "pandas/tslib.pyx":1001 * * def array_to_datetime(ndarray[object] values, raise_=False, dayfirst=False, * format=None, utc=None, coerce=False, unit=None): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = len(values) */ values[3] = ((PyObject *)Py_None); values[4] = ((PyObject *)Py_None); values[5] = __pyx_k_60; values[6] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6); case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5); case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__values)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__raise_); if (value) { values[1] = value; kw_args--; } } case 2: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__dayfirst); if (value) { values[2] = value; kw_args--; } } case 3: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__format); if (value) { values[3] = value; kw_args--; } } case 4: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__utc); if (value) { values[4] = value; kw_args--; } } case 5: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__coerce); if (value) { values[5] = value; kw_args--; } } case 6: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__unit); if (value) { values[6] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "array_to_datetime") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1000; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6); case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5); case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_values = ((PyArrayObject *)values[0]); __pyx_v_raise_ = values[1]; __pyx_v_dayfirst = values[2]; __pyx_v_format = values[3]; __pyx_v_utc = values[4]; __pyx_v_coerce = values[5]; __pyx_v_unit = values[6]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("array_to_datetime", 0, 1, 7, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1000; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.tslib.array_to_datetime", __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_filename = __pyx_f[0]; __pyx_lineno = 1000; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5tslib_26array_to_datetime(__pyx_self, __pyx_v_values, __pyx_v_raise_, __pyx_v_dayfirst, __pyx_v_format, __pyx_v_utc, __pyx_v_coerce, __pyx_v_unit); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/tslib.pyx":1000 * return dt * * def array_to_datetime(ndarray[object] values, raise_=False, dayfirst=False, # <<<<<<<<<<<<<< * format=None, utc=None, coerce=False, unit=None): * cdef: */ static PyObject *__pyx_pf_6pandas_5tslib_26array_to_datetime(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyObject *__pyx_v_raise_, PyObject *__pyx_v_dayfirst, CYTHON_UNUSED PyObject *__pyx_v_format, PyObject *__pyx_v_utc, PyObject *__pyx_v_coerce, PyObject *__pyx_v_unit) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_n; PyObject *__pyx_v_val = 0; PyArrayObject *__pyx_v_iresult = 0; PyArrayObject *__pyx_v_oresult = 0; pandas_datetimestruct __pyx_v_dts; int __pyx_v_utc_convert; int __pyx_v_seen_integer; int __pyx_v_seen_datetime; struct __pyx_obj_6pandas_5tslib__TSObject *__pyx_v__ts = 0; __pyx_t_5numpy_int64_t __pyx_v_m; PyObject *__pyx_v_result = NULL; __Pyx_LocalBuf_ND __pyx_pybuffernd_iresult; __Pyx_Buffer __pyx_pybuffer_iresult; __Pyx_LocalBuf_ND __pyx_pybuffernd_oresult; __Pyx_Buffer __pyx_pybuffer_oresult; __Pyx_LocalBuf_ND __pyx_pybuffernd_values; __Pyx_Buffer __pyx_pybuffer_values; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; int __pyx_t_2; __pyx_t_5numpy_int64_t __pyx_t_3; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; PyArrayObject *__pyx_t_11 = NULL; int __pyx_t_12; PyObject *__pyx_t_13 = NULL; PyObject *__pyx_t_14 = NULL; PyObject *__pyx_t_15 = NULL; Py_ssize_t __pyx_t_16; Py_ssize_t __pyx_t_17; Py_ssize_t __pyx_t_18; int __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; int __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; Py_ssize_t __pyx_t_37; PyObject *__pyx_t_38 = NULL; PyObject *__pyx_t_39 = NULL; PyObject *__pyx_t_40 = NULL; PyObject *__pyx_t_41 = NULL; PyObject *__pyx_t_42 = NULL; PyObject *__pyx_t_43 = NULL; Py_ssize_t __pyx_t_44; Py_ssize_t __pyx_t_45; Py_ssize_t __pyx_t_46; Py_ssize_t __pyx_t_47; PyArrayObject *__pyx_t_48 = NULL; Py_ssize_t __pyx_t_49; Py_ssize_t __pyx_t_50; PyObject **__pyx_t_51; Py_ssize_t __pyx_t_52; Py_ssize_t __pyx_t_53; Py_ssize_t __pyx_t_54; Py_ssize_t __pyx_t_55; Py_ssize_t __pyx_t_56; Py_ssize_t __pyx_t_57; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("array_to_datetime", 0); __pyx_pybuffer_iresult.pybuffer.buf = NULL; __pyx_pybuffer_iresult.refcount = 0; __pyx_pybuffernd_iresult.data = NULL; __pyx_pybuffernd_iresult.rcbuffer = &__pyx_pybuffer_iresult; __pyx_pybuffer_oresult.pybuffer.buf = NULL; __pyx_pybuffer_oresult.refcount = 0; __pyx_pybuffernd_oresult.data = NULL; __pyx_pybuffernd_oresult.rcbuffer = &__pyx_pybuffer_oresult; __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_filename = __pyx_f[0]; __pyx_lineno = 1000; __pyx_clineno = __LINE__; goto __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/tslib.pyx":1003 * format=None, utc=None, coerce=False, unit=None): * cdef: * Py_ssize_t i, n = len(values) # <<<<<<<<<<<<<< * object val * ndarray[int64_t] iresult */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1003; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/tslib.pyx":1008 * ndarray[object] oresult * pandas_datetimestruct dts * bint utc_convert = bool(utc), seen_integer=0, seen_datetime=0 # <<<<<<<<<<<<<< * _TSObject _ts * int64_t m = cast_from_unit(None,unit) */ __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_utc); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1008; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_utc_convert = (!(!__pyx_t_2)); __pyx_v_seen_integer = 0; __pyx_v_seen_datetime = 0; /* "pandas/tslib.pyx":1010 * bint utc_convert = bool(utc), seen_integer=0, seen_datetime=0 * _TSObject _ts * int64_t m = cast_from_unit(None,unit) # <<<<<<<<<<<<<< * * try: */ __pyx_t_3 = __pyx_f_6pandas_5tslib_cast_from_unit(Py_None, __pyx_v_unit, 0); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1010; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_m = __pyx_t_3; /* "pandas/tslib.pyx":1012 * int64_t m = cast_from_unit(None,unit) * * try: # <<<<<<<<<<<<<< * result = np.empty(n, dtype='M8[ns]') * iresult = result.view('i8') */ { __Pyx_ExceptionSave(&__pyx_t_4, &__pyx_t_5, &__pyx_t_6); __Pyx_XGOTREF(__pyx_t_4); __Pyx_XGOTREF(__pyx_t_5); __Pyx_XGOTREF(__pyx_t_6); /*try:*/ { /* "pandas/tslib.pyx":1013 * * try: * result = np.empty(n, dtype='M8[ns]') # <<<<<<<<<<<<<< * iresult = result.view('i8') * for i in range(n): */ __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1013; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s__empty); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1013; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_7 = PyInt_FromSsize_t(__pyx_v_n); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1013; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1013; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7); __Pyx_GIVEREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_7 = PyDict_New(); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1013; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_7)); if (PyDict_SetItem(__pyx_t_7, ((PyObject *)__pyx_n_s__dtype), ((PyObject *)__pyx_kp_s_18)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1013; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_t_10 = PyObject_Call(__pyx_t_8, ((PyObject *)__pyx_t_9), ((PyObject *)__pyx_t_7)); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1013; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_9)); __pyx_t_9 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0; __pyx_v_result = __pyx_t_10; __pyx_t_10 = 0; /* "pandas/tslib.pyx":1014 * try: * result = np.empty(n, dtype='M8[ns]') * iresult = result.view('i8') # <<<<<<<<<<<<<< * for i in range(n): * val = values[i] */ __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_result, __pyx_n_s__view); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1014; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_10); __pyx_t_7 = PyObject_Call(__pyx_t_10, ((PyObject *)__pyx_k_tuple_61), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1014; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; if (!(likely(((__pyx_t_7) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_7, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1014; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_t_11 = ((PyArrayObject *)__pyx_t_7); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_iresult.rcbuffer->pybuffer); __pyx_t_12 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_iresult.rcbuffer->pybuffer, (PyObject*)__pyx_t_11, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_12 < 0)) { PyErr_Fetch(&__pyx_t_13, &__pyx_t_14, &__pyx_t_15); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_iresult.rcbuffer->pybuffer, (PyObject*)__pyx_v_iresult, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_13); Py_XDECREF(__pyx_t_14); Py_XDECREF(__pyx_t_15); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_13, __pyx_t_14, __pyx_t_15); } } __pyx_pybuffernd_iresult.diminfo[0].strides = __pyx_pybuffernd_iresult.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_iresult.diminfo[0].shape = __pyx_pybuffernd_iresult.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_12 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1014; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } __pyx_t_11 = 0; __pyx_v_iresult = ((PyArrayObject *)__pyx_t_7); __pyx_t_7 = 0; /* "pandas/tslib.pyx":1015 * result = np.empty(n, dtype='M8[ns]') * iresult = result.view('i8') * for i in range(n): # <<<<<<<<<<<<<< * val = values[i] * if _checknull_with_nat(val): */ __pyx_t_1 = __pyx_v_n; for (__pyx_t_16 = 0; __pyx_t_16 < __pyx_t_1; __pyx_t_16+=1) { __pyx_v_i = __pyx_t_16; /* "pandas/tslib.pyx":1016 * iresult = result.view('i8') * for i in range(n): * val = values[i] # <<<<<<<<<<<<<< * if _checknull_with_nat(val): * iresult[i] = iNaT */ __pyx_t_17 = __pyx_v_i; __pyx_t_12 = -1; if (__pyx_t_17 < 0) { __pyx_t_17 += __pyx_pybuffernd_values.diminfo[0].shape; if (unlikely(__pyx_t_17 < 0)) __pyx_t_12 = 0; } else if (unlikely(__pyx_t_17 >= __pyx_pybuffernd_values.diminfo[0].shape)) __pyx_t_12 = 0; if (unlikely(__pyx_t_12 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_12); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1016; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } __pyx_t_7 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_values.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_7); __Pyx_XDECREF_SET(__pyx_v_val, __pyx_t_7); __pyx_t_7 = 0; /* "pandas/tslib.pyx":1017 * for i in range(n): * val = values[i] * if _checknull_with_nat(val): # <<<<<<<<<<<<<< * iresult[i] = iNaT * elif PyDateTime_Check(val): */ __pyx_t_2 = (__pyx_f_6pandas_5tslib__checknull_with_nat(__pyx_v_val) != 0); if (__pyx_t_2) { /* "pandas/tslib.pyx":1018 * val = values[i] * if _checknull_with_nat(val): * iresult[i] = iNaT # <<<<<<<<<<<<<< * elif PyDateTime_Check(val): * seen_datetime=1 */ __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s__iNaT); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1018; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_t_3 = __Pyx_PyInt_from_py_npy_int64(__pyx_t_7); if (unlikely((__pyx_t_3 == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1018; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_18 = __pyx_v_i; __pyx_t_12 = -1; if (__pyx_t_18 < 0) { __pyx_t_18 += __pyx_pybuffernd_iresult.diminfo[0].shape; if (unlikely(__pyx_t_18 < 0)) __pyx_t_12 = 0; } else if (unlikely(__pyx_t_18 >= __pyx_pybuffernd_iresult.diminfo[0].shape)) __pyx_t_12 = 0; if (unlikely(__pyx_t_12 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_12); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1018; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_iresult.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_iresult.diminfo[0].strides) = __pyx_t_3; goto __pyx_L13; } /* "pandas/tslib.pyx":1019 * if _checknull_with_nat(val): * iresult[i] = iNaT * elif PyDateTime_Check(val): # <<<<<<<<<<<<<< * seen_datetime=1 * if val.tzinfo is not None: */ __pyx_t_2 = (PyDateTime_Check(__pyx_v_val) != 0); if (__pyx_t_2) { /* "pandas/tslib.pyx":1020 * iresult[i] = iNaT * elif PyDateTime_Check(val): * seen_datetime=1 # <<<<<<<<<<<<<< * if val.tzinfo is not None: * if utc_convert: */ __pyx_v_seen_datetime = 1; /* "pandas/tslib.pyx":1021 * elif PyDateTime_Check(val): * seen_datetime=1 * if val.tzinfo is not None: # <<<<<<<<<<<<<< * if utc_convert: * _ts = convert_to_tsobject(val, None, unit) */ __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_val, __pyx_n_s__tzinfo); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1021; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_t_2 = (__pyx_t_7 != Py_None); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_19 = (__pyx_t_2 != 0); if (__pyx_t_19) { /* "pandas/tslib.pyx":1022 * seen_datetime=1 * if val.tzinfo is not None: * if utc_convert: # <<<<<<<<<<<<<< * _ts = convert_to_tsobject(val, None, unit) * iresult[i] = _ts.value */ __pyx_t_19 = (__pyx_v_utc_convert != 0); if (__pyx_t_19) { /* "pandas/tslib.pyx":1023 * if val.tzinfo is not None: * if utc_convert: * _ts = convert_to_tsobject(val, None, unit) # <<<<<<<<<<<<<< * iresult[i] = _ts.value * try: */ __pyx_t_7 = __pyx_f_6pandas_5tslib_convert_to_tsobject(__pyx_v_val, Py_None, __pyx_v_unit); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1023; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_7); if (!(likely(((__pyx_t_7) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_7, __pyx_ptype_6pandas_5tslib__TSObject))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1023; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_XDECREF_SET(__pyx_v__ts, ((struct __pyx_obj_6pandas_5tslib__TSObject *)__pyx_t_7)); __pyx_t_7 = 0; /* "pandas/tslib.pyx":1024 * if utc_convert: * _ts = convert_to_tsobject(val, None, unit) * iresult[i] = _ts.value # <<<<<<<<<<<<<< * try: * _check_dts_bounds(&_ts.dts) */ __pyx_t_3 = __pyx_v__ts->value; __pyx_t_20 = __pyx_v_i; __pyx_t_12 = -1; if (__pyx_t_20 < 0) { __pyx_t_20 += __pyx_pybuffernd_iresult.diminfo[0].shape; if (unlikely(__pyx_t_20 < 0)) __pyx_t_12 = 0; } else if (unlikely(__pyx_t_20 >= __pyx_pybuffernd_iresult.diminfo[0].shape)) __pyx_t_12 = 0; if (unlikely(__pyx_t_12 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_12); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1024; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_iresult.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_iresult.diminfo[0].strides) = __pyx_t_3; /* "pandas/tslib.pyx":1025 * _ts = convert_to_tsobject(val, None, unit) * iresult[i] = _ts.value * try: # <<<<<<<<<<<<<< * _check_dts_bounds(&_ts.dts) * except ValueError: */ { __Pyx_ExceptionSave(&__pyx_t_15, &__pyx_t_14, &__pyx_t_13); __Pyx_XGOTREF(__pyx_t_15); __Pyx_XGOTREF(__pyx_t_14); __Pyx_XGOTREF(__pyx_t_13); /*try:*/ { /* "pandas/tslib.pyx":1026 * iresult[i] = _ts.value * try: * _check_dts_bounds(&_ts.dts) # <<<<<<<<<<<<<< * except ValueError: * if coerce: */ __pyx_t_7 = __pyx_f_6pandas_5tslib__check_dts_bounds((&__pyx_v__ts->dts)); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1026; __pyx_clineno = __LINE__; goto __pyx_L16_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0; __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; goto __pyx_L23_try_end; __pyx_L16_error:; __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; /* "pandas/tslib.pyx":1027 * try: * _check_dts_bounds(&_ts.dts) * except ValueError: # <<<<<<<<<<<<<< * if coerce: * iresult[i] = iNaT */ __pyx_t_12 = PyErr_ExceptionMatches(__pyx_builtin_ValueError); if (__pyx_t_12) { __Pyx_AddTraceback("pandas.tslib.array_to_datetime", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_7, &__pyx_t_10, &__pyx_t_9) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1027; __pyx_clineno = __LINE__; goto __pyx_L18_except_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_GOTREF(__pyx_t_10); __Pyx_GOTREF(__pyx_t_9); /* "pandas/tslib.pyx":1028 * _check_dts_bounds(&_ts.dts) * except ValueError: * if coerce: # <<<<<<<<<<<<<< * iresult[i] = iNaT * continue */ __pyx_t_19 = __Pyx_PyObject_IsTrue(__pyx_v_coerce); if (unlikely(__pyx_t_19 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1028; __pyx_clineno = __LINE__; goto __pyx_L18_except_error;} if (__pyx_t_19) { /* "pandas/tslib.pyx":1029 * except ValueError: * if coerce: * iresult[i] = iNaT # <<<<<<<<<<<<<< * continue * raise */ __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s__iNaT); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1029; __pyx_clineno = __LINE__; goto __pyx_L18_except_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_3 = __Pyx_PyInt_from_py_npy_int64(__pyx_t_8); if (unlikely((__pyx_t_3 == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1029; __pyx_clineno = __LINE__; goto __pyx_L18_except_error;} __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_21 = __pyx_v_i; __pyx_t_12 = -1; if (__pyx_t_21 < 0) { __pyx_t_21 += __pyx_pybuffernd_iresult.diminfo[0].shape; if (unlikely(__pyx_t_21 < 0)) __pyx_t_12 = 0; } else if (unlikely(__pyx_t_21 >= __pyx_pybuffernd_iresult.diminfo[0].shape)) __pyx_t_12 = 0; if (unlikely(__pyx_t_12 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_12); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1029; __pyx_clineno = __LINE__; goto __pyx_L18_except_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_iresult.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_iresult.diminfo[0].strides) = __pyx_t_3; /* "pandas/tslib.pyx":1030 * if coerce: * iresult[i] = iNaT * continue # <<<<<<<<<<<<<< * raise * else: */ goto __pyx_L25_except_continue; goto __pyx_L26; } __pyx_L26:; /* "pandas/tslib.pyx":1031 * iresult[i] = iNaT * continue * raise # <<<<<<<<<<<<<< * else: * raise ValueError('Tz-aware datetime.datetime cannot ' */ __Pyx_GIVEREF(__pyx_t_7); __Pyx_GIVEREF(__pyx_t_10); __Pyx_GIVEREF(__pyx_t_9); __Pyx_ErrRestore(__pyx_t_7, __pyx_t_10, __pyx_t_9); __pyx_t_7 = 0; __pyx_t_10 = 0; __pyx_t_9 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1031; __pyx_clineno = __LINE__; goto __pyx_L18_except_error;} __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; goto __pyx_L17_exception_handled; __pyx_L25_except_continue:; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; goto __pyx_L22_try_continue; } __pyx_L18_except_error:; __Pyx_XGIVEREF(__pyx_t_15); __Pyx_XGIVEREF(__pyx_t_14); __Pyx_XGIVEREF(__pyx_t_13); __Pyx_ExceptionReset(__pyx_t_15, __pyx_t_14, __pyx_t_13); goto __pyx_L3_error; __pyx_L22_try_continue:; __Pyx_XGIVEREF(__pyx_t_15); __Pyx_XGIVEREF(__pyx_t_14); __Pyx_XGIVEREF(__pyx_t_13); __Pyx_ExceptionReset(__pyx_t_15, __pyx_t_14, __pyx_t_13); goto __pyx_L11_continue; __pyx_L17_exception_handled:; __Pyx_XGIVEREF(__pyx_t_15); __Pyx_XGIVEREF(__pyx_t_14); __Pyx_XGIVEREF(__pyx_t_13); __Pyx_ExceptionReset(__pyx_t_15, __pyx_t_14, __pyx_t_13); __pyx_L23_try_end:; } goto __pyx_L15; } /*else*/ { /* "pandas/tslib.pyx":1033 * raise * else: * raise ValueError('Tz-aware datetime.datetime cannot ' # <<<<<<<<<<<<<< * 'be converted to datetime64 unless ' * 'utc=True') */ __pyx_t_9 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_63), NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1033; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_Raise(__pyx_t_9, 0, 0, 0); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1033; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } __pyx_L15:; goto __pyx_L14; } /*else*/ { /* "pandas/tslib.pyx":1037 * 'utc=True') * else: * iresult[i] = _pydatetime_to_dts(val, &dts) # <<<<<<<<<<<<<< * if is_timestamp(val): * iresult[i] += (<_Timestamp>val).nanosecond */ __pyx_t_22 = __pyx_v_i; __pyx_t_12 = -1; if (__pyx_t_22 < 0) { __pyx_t_22 += __pyx_pybuffernd_iresult.diminfo[0].shape; if (unlikely(__pyx_t_22 < 0)) __pyx_t_12 = 0; } else if (unlikely(__pyx_t_22 >= __pyx_pybuffernd_iresult.diminfo[0].shape)) __pyx_t_12 = 0; if (unlikely(__pyx_t_12 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_12); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1037; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_iresult.rcbuffer->pybuffer.buf, __pyx_t_22, __pyx_pybuffernd_iresult.diminfo[0].strides) = __pyx_f_8datetime__pydatetime_to_dts(__pyx_v_val, (&__pyx_v_dts)); /* "pandas/tslib.pyx":1038 * else: * iresult[i] = _pydatetime_to_dts(val, &dts) * if is_timestamp(val): # <<<<<<<<<<<<<< * iresult[i] += (<_Timestamp>val).nanosecond * try: */ __pyx_t_19 = (__pyx_f_6pandas_5tslib_is_timestamp(__pyx_v_val) != 0); if (__pyx_t_19) { /* "pandas/tslib.pyx":1039 * iresult[i] = _pydatetime_to_dts(val, &dts) * if is_timestamp(val): * iresult[i] += (<_Timestamp>val).nanosecond # <<<<<<<<<<<<<< * try: * _check_dts_bounds(&dts) */ __pyx_t_23 = __pyx_v_i; __pyx_t_12 = -1; if (__pyx_t_23 < 0) { __pyx_t_23 += __pyx_pybuffernd_iresult.diminfo[0].shape; if (unlikely(__pyx_t_23 < 0)) __pyx_t_12 = 0; } else if (unlikely(__pyx_t_23 >= __pyx_pybuffernd_iresult.diminfo[0].shape)) __pyx_t_12 = 0; if (unlikely(__pyx_t_12 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_12); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1039; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_iresult.rcbuffer->pybuffer.buf, __pyx_t_23, __pyx_pybuffernd_iresult.diminfo[0].strides) += ((struct __pyx_obj_6pandas_5tslib__Timestamp *)__pyx_v_val)->nanosecond; goto __pyx_L27; } __pyx_L27:; /* "pandas/tslib.pyx":1040 * if is_timestamp(val): * iresult[i] += (<_Timestamp>val).nanosecond * try: # <<<<<<<<<<<<<< * _check_dts_bounds(&dts) * except ValueError: */ { __Pyx_ExceptionSave(&__pyx_t_13, &__pyx_t_14, &__pyx_t_15); __Pyx_XGOTREF(__pyx_t_13); __Pyx_XGOTREF(__pyx_t_14); __Pyx_XGOTREF(__pyx_t_15); /*try:*/ { /* "pandas/tslib.pyx":1041 * iresult[i] += (<_Timestamp>val).nanosecond * try: * _check_dts_bounds(&dts) # <<<<<<<<<<<<<< * except ValueError: * if coerce: */ __pyx_t_9 = __pyx_f_6pandas_5tslib__check_dts_bounds((&__pyx_v_dts)); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1041; __pyx_clineno = __LINE__; goto __pyx_L28_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; } __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0; goto __pyx_L35_try_end; __pyx_L28_error:; __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; /* "pandas/tslib.pyx":1042 * try: * _check_dts_bounds(&dts) * except ValueError: # <<<<<<<<<<<<<< * if coerce: * iresult[i] = iNaT */ __pyx_t_12 = PyErr_ExceptionMatches(__pyx_builtin_ValueError); if (__pyx_t_12) { __Pyx_AddTraceback("pandas.tslib.array_to_datetime", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_9, &__pyx_t_10, &__pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1042; __pyx_clineno = __LINE__; goto __pyx_L30_except_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_GOTREF(__pyx_t_10); __Pyx_GOTREF(__pyx_t_7); /* "pandas/tslib.pyx":1043 * _check_dts_bounds(&dts) * except ValueError: * if coerce: # <<<<<<<<<<<<<< * iresult[i] = iNaT * continue */ __pyx_t_19 = __Pyx_PyObject_IsTrue(__pyx_v_coerce); if (unlikely(__pyx_t_19 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1043; __pyx_clineno = __LINE__; goto __pyx_L30_except_error;} if (__pyx_t_19) { /* "pandas/tslib.pyx":1044 * except ValueError: * if coerce: * iresult[i] = iNaT # <<<<<<<<<<<<<< * continue * raise */ __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s__iNaT); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1044; __pyx_clineno = __LINE__; goto __pyx_L30_except_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_3 = __Pyx_PyInt_from_py_npy_int64(__pyx_t_8); if (unlikely((__pyx_t_3 == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1044; __pyx_clineno = __LINE__; goto __pyx_L30_except_error;} __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_24 = __pyx_v_i; __pyx_t_12 = -1; if (__pyx_t_24 < 0) { __pyx_t_24 += __pyx_pybuffernd_iresult.diminfo[0].shape; if (unlikely(__pyx_t_24 < 0)) __pyx_t_12 = 0; } else if (unlikely(__pyx_t_24 >= __pyx_pybuffernd_iresult.diminfo[0].shape)) __pyx_t_12 = 0; if (unlikely(__pyx_t_12 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_12); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1044; __pyx_clineno = __LINE__; goto __pyx_L30_except_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_iresult.rcbuffer->pybuffer.buf, __pyx_t_24, __pyx_pybuffernd_iresult.diminfo[0].strides) = __pyx_t_3; /* "pandas/tslib.pyx":1045 * if coerce: * iresult[i] = iNaT * continue # <<<<<<<<<<<<<< * raise * elif PyDate_Check(val): */ goto __pyx_L37_except_continue; goto __pyx_L38; } __pyx_L38:; /* "pandas/tslib.pyx":1046 * iresult[i] = iNaT * continue * raise # <<<<<<<<<<<<<< * elif PyDate_Check(val): * iresult[i] = _date_to_datetime64(val, &dts) */ __Pyx_GIVEREF(__pyx_t_9); __Pyx_GIVEREF(__pyx_t_10); __Pyx_GIVEREF(__pyx_t_7); __Pyx_ErrRestore(__pyx_t_9, __pyx_t_10, __pyx_t_7); __pyx_t_9 = 0; __pyx_t_10 = 0; __pyx_t_7 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1046; __pyx_clineno = __LINE__; goto __pyx_L30_except_error;} __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; goto __pyx_L29_exception_handled; __pyx_L37_except_continue:; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; goto __pyx_L34_try_continue; } __pyx_L30_except_error:; __Pyx_XGIVEREF(__pyx_t_13); __Pyx_XGIVEREF(__pyx_t_14); __Pyx_XGIVEREF(__pyx_t_15); __Pyx_ExceptionReset(__pyx_t_13, __pyx_t_14, __pyx_t_15); goto __pyx_L3_error; __pyx_L34_try_continue:; __Pyx_XGIVEREF(__pyx_t_13); __Pyx_XGIVEREF(__pyx_t_14); __Pyx_XGIVEREF(__pyx_t_15); __Pyx_ExceptionReset(__pyx_t_13, __pyx_t_14, __pyx_t_15); goto __pyx_L11_continue; __pyx_L29_exception_handled:; __Pyx_XGIVEREF(__pyx_t_13); __Pyx_XGIVEREF(__pyx_t_14); __Pyx_XGIVEREF(__pyx_t_15); __Pyx_ExceptionReset(__pyx_t_13, __pyx_t_14, __pyx_t_15); __pyx_L35_try_end:; } } __pyx_L14:; goto __pyx_L13; } /* "pandas/tslib.pyx":1047 * continue * raise * elif PyDate_Check(val): # <<<<<<<<<<<<<< * iresult[i] = _date_to_datetime64(val, &dts) * try: */ __pyx_t_19 = (PyDate_Check(__pyx_v_val) != 0); if (__pyx_t_19) { /* "pandas/tslib.pyx":1048 * raise * elif PyDate_Check(val): * iresult[i] = _date_to_datetime64(val, &dts) # <<<<<<<<<<<<<< * try: * _check_dts_bounds(&dts) */ __pyx_t_25 = __pyx_v_i; __pyx_t_12 = -1; if (__pyx_t_25 < 0) { __pyx_t_25 += __pyx_pybuffernd_iresult.diminfo[0].shape; if (unlikely(__pyx_t_25 < 0)) __pyx_t_12 = 0; } else if (unlikely(__pyx_t_25 >= __pyx_pybuffernd_iresult.diminfo[0].shape)) __pyx_t_12 = 0; if (unlikely(__pyx_t_12 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_12); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1048; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_iresult.rcbuffer->pybuffer.buf, __pyx_t_25, __pyx_pybuffernd_iresult.diminfo[0].strides) = __pyx_f_8datetime__date_to_datetime64(__pyx_v_val, (&__pyx_v_dts)); /* "pandas/tslib.pyx":1049 * elif PyDate_Check(val): * iresult[i] = _date_to_datetime64(val, &dts) * try: # <<<<<<<<<<<<<< * _check_dts_bounds(&dts) * seen_datetime=1 */ { __Pyx_ExceptionSave(&__pyx_t_15, &__pyx_t_14, &__pyx_t_13); __Pyx_XGOTREF(__pyx_t_15); __Pyx_XGOTREF(__pyx_t_14); __Pyx_XGOTREF(__pyx_t_13); /*try:*/ { /* "pandas/tslib.pyx":1050 * iresult[i] = _date_to_datetime64(val, &dts) * try: * _check_dts_bounds(&dts) # <<<<<<<<<<<<<< * seen_datetime=1 * except ValueError: */ __pyx_t_7 = __pyx_f_6pandas_5tslib__check_dts_bounds((&__pyx_v_dts)); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1050; __pyx_clineno = __LINE__; goto __pyx_L39_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; /* "pandas/tslib.pyx":1051 * try: * _check_dts_bounds(&dts) * seen_datetime=1 # <<<<<<<<<<<<<< * except ValueError: * if coerce: */ __pyx_v_seen_datetime = 1; } __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0; __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; goto __pyx_L46_try_end; __pyx_L39_error:; __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; /* "pandas/tslib.pyx":1052 * _check_dts_bounds(&dts) * seen_datetime=1 * except ValueError: # <<<<<<<<<<<<<< * if coerce: * iresult[i] = iNaT */ __pyx_t_12 = PyErr_ExceptionMatches(__pyx_builtin_ValueError); if (__pyx_t_12) { __Pyx_AddTraceback("pandas.tslib.array_to_datetime", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_7, &__pyx_t_10, &__pyx_t_9) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1052; __pyx_clineno = __LINE__; goto __pyx_L41_except_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_GOTREF(__pyx_t_10); __Pyx_GOTREF(__pyx_t_9); /* "pandas/tslib.pyx":1053 * seen_datetime=1 * except ValueError: * if coerce: # <<<<<<<<<<<<<< * iresult[i] = iNaT * continue */ __pyx_t_19 = __Pyx_PyObject_IsTrue(__pyx_v_coerce); if (unlikely(__pyx_t_19 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1053; __pyx_clineno = __LINE__; goto __pyx_L41_except_error;} if (__pyx_t_19) { /* "pandas/tslib.pyx":1054 * except ValueError: * if coerce: * iresult[i] = iNaT # <<<<<<<<<<<<<< * continue * raise */ __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s__iNaT); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1054; __pyx_clineno = __LINE__; goto __pyx_L41_except_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_3 = __Pyx_PyInt_from_py_npy_int64(__pyx_t_8); if (unlikely((__pyx_t_3 == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1054; __pyx_clineno = __LINE__; goto __pyx_L41_except_error;} __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_26 = __pyx_v_i; __pyx_t_12 = -1; if (__pyx_t_26 < 0) { __pyx_t_26 += __pyx_pybuffernd_iresult.diminfo[0].shape; if (unlikely(__pyx_t_26 < 0)) __pyx_t_12 = 0; } else if (unlikely(__pyx_t_26 >= __pyx_pybuffernd_iresult.diminfo[0].shape)) __pyx_t_12 = 0; if (unlikely(__pyx_t_12 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_12); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1054; __pyx_clineno = __LINE__; goto __pyx_L41_except_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_iresult.rcbuffer->pybuffer.buf, __pyx_t_26, __pyx_pybuffernd_iresult.diminfo[0].strides) = __pyx_t_3; /* "pandas/tslib.pyx":1055 * if coerce: * iresult[i] = iNaT * continue # <<<<<<<<<<<<<< * raise * elif util.is_datetime64_object(val): */ goto __pyx_L48_except_continue; goto __pyx_L49; } __pyx_L49:; /* "pandas/tslib.pyx":1056 * iresult[i] = iNaT * continue * raise # <<<<<<<<<<<<<< * elif util.is_datetime64_object(val): * if val == np_NaT: */ __Pyx_GIVEREF(__pyx_t_7); __Pyx_GIVEREF(__pyx_t_10); __Pyx_GIVEREF(__pyx_t_9); __Pyx_ErrRestore(__pyx_t_7, __pyx_t_10, __pyx_t_9); __pyx_t_7 = 0; __pyx_t_10 = 0; __pyx_t_9 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1056; __pyx_clineno = __LINE__; goto __pyx_L41_except_error;} __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; goto __pyx_L40_exception_handled; __pyx_L48_except_continue:; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; goto __pyx_L45_try_continue; } __pyx_L41_except_error:; __Pyx_XGIVEREF(__pyx_t_15); __Pyx_XGIVEREF(__pyx_t_14); __Pyx_XGIVEREF(__pyx_t_13); __Pyx_ExceptionReset(__pyx_t_15, __pyx_t_14, __pyx_t_13); goto __pyx_L3_error; __pyx_L45_try_continue:; __Pyx_XGIVEREF(__pyx_t_15); __Pyx_XGIVEREF(__pyx_t_14); __Pyx_XGIVEREF(__pyx_t_13); __Pyx_ExceptionReset(__pyx_t_15, __pyx_t_14, __pyx_t_13); goto __pyx_L11_continue; __pyx_L40_exception_handled:; __Pyx_XGIVEREF(__pyx_t_15); __Pyx_XGIVEREF(__pyx_t_14); __Pyx_XGIVEREF(__pyx_t_13); __Pyx_ExceptionReset(__pyx_t_15, __pyx_t_14, __pyx_t_13); __pyx_L46_try_end:; } goto __pyx_L13; } /* "pandas/tslib.pyx":1057 * continue * raise * elif util.is_datetime64_object(val): # <<<<<<<<<<<<<< * if val == np_NaT: * iresult[i] = iNaT */ __pyx_t_19 = (is_datetime64_object(__pyx_v_val) != 0); if (__pyx_t_19) { /* "pandas/tslib.pyx":1058 * raise * elif util.is_datetime64_object(val): * if val == np_NaT: # <<<<<<<<<<<<<< * iresult[i] = iNaT * else: */ __pyx_t_9 = __Pyx_GetModuleGlobalName(__pyx_n_s__np_NaT); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1058; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_t_10 = PyObject_RichCompare(__pyx_v_val, __pyx_t_9, Py_EQ); __Pyx_XGOTREF(__pyx_t_10); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1058; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_19 = __Pyx_PyObject_IsTrue(__pyx_t_10); if (unlikely(__pyx_t_19 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1058; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; if (__pyx_t_19) { /* "pandas/tslib.pyx":1059 * elif util.is_datetime64_object(val): * if val == np_NaT: * iresult[i] = iNaT # <<<<<<<<<<<<<< * else: * try: */ __pyx_t_10 = __Pyx_GetModuleGlobalName(__pyx_n_s__iNaT); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1059; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_10); __pyx_t_3 = __Pyx_PyInt_from_py_npy_int64(__pyx_t_10); if (unlikely((__pyx_t_3 == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1059; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_t_27 = __pyx_v_i; __pyx_t_12 = -1; if (__pyx_t_27 < 0) { __pyx_t_27 += __pyx_pybuffernd_iresult.diminfo[0].shape; if (unlikely(__pyx_t_27 < 0)) __pyx_t_12 = 0; } else if (unlikely(__pyx_t_27 >= __pyx_pybuffernd_iresult.diminfo[0].shape)) __pyx_t_12 = 0; if (unlikely(__pyx_t_12 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_12); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1059; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_iresult.rcbuffer->pybuffer.buf, __pyx_t_27, __pyx_pybuffernd_iresult.diminfo[0].strides) = __pyx_t_3; goto __pyx_L50; } /*else*/ { /* "pandas/tslib.pyx":1061 * iresult[i] = iNaT * else: * try: # <<<<<<<<<<<<<< * iresult[i] = _get_datetime64_nanos(val) * seen_datetime=1 */ { __Pyx_ExceptionSave(&__pyx_t_13, &__pyx_t_14, &__pyx_t_15); __Pyx_XGOTREF(__pyx_t_13); __Pyx_XGOTREF(__pyx_t_14); __Pyx_XGOTREF(__pyx_t_15); /*try:*/ { /* "pandas/tslib.pyx":1062 * else: * try: * iresult[i] = _get_datetime64_nanos(val) # <<<<<<<<<<<<<< * seen_datetime=1 * except ValueError: */ __pyx_t_10 = __pyx_f_6pandas_5tslib__get_datetime64_nanos(__pyx_v_val); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1062; __pyx_clineno = __LINE__; goto __pyx_L51_error;} __Pyx_GOTREF(__pyx_t_10); __pyx_t_3 = __Pyx_PyInt_from_py_npy_int64(__pyx_t_10); if (unlikely((__pyx_t_3 == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1062; __pyx_clineno = __LINE__; goto __pyx_L51_error;} __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_t_28 = __pyx_v_i; __pyx_t_12 = -1; if (__pyx_t_28 < 0) { __pyx_t_28 += __pyx_pybuffernd_iresult.diminfo[0].shape; if (unlikely(__pyx_t_28 < 0)) __pyx_t_12 = 0; } else if (unlikely(__pyx_t_28 >= __pyx_pybuffernd_iresult.diminfo[0].shape)) __pyx_t_12 = 0; if (unlikely(__pyx_t_12 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_12); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1062; __pyx_clineno = __LINE__; goto __pyx_L51_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_iresult.rcbuffer->pybuffer.buf, __pyx_t_28, __pyx_pybuffernd_iresult.diminfo[0].strides) = __pyx_t_3; /* "pandas/tslib.pyx":1063 * try: * iresult[i] = _get_datetime64_nanos(val) * seen_datetime=1 # <<<<<<<<<<<<<< * except ValueError: * if coerce: */ __pyx_v_seen_datetime = 1; } __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0; goto __pyx_L58_try_end; __pyx_L51_error:; __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; /* "pandas/tslib.pyx":1064 * iresult[i] = _get_datetime64_nanos(val) * seen_datetime=1 * except ValueError: # <<<<<<<<<<<<<< * if coerce: * iresult[i] = iNaT */ __pyx_t_12 = PyErr_ExceptionMatches(__pyx_builtin_ValueError); if (__pyx_t_12) { __Pyx_AddTraceback("pandas.tslib.array_to_datetime", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_10, &__pyx_t_9, &__pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1064; __pyx_clineno = __LINE__; goto __pyx_L53_except_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_GOTREF(__pyx_t_9); __Pyx_GOTREF(__pyx_t_7); /* "pandas/tslib.pyx":1065 * seen_datetime=1 * except ValueError: * if coerce: # <<<<<<<<<<<<<< * iresult[i] = iNaT * continue */ __pyx_t_19 = __Pyx_PyObject_IsTrue(__pyx_v_coerce); if (unlikely(__pyx_t_19 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1065; __pyx_clineno = __LINE__; goto __pyx_L53_except_error;} if (__pyx_t_19) { /* "pandas/tslib.pyx":1066 * except ValueError: * if coerce: * iresult[i] = iNaT # <<<<<<<<<<<<<< * continue * raise */ __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s__iNaT); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1066; __pyx_clineno = __LINE__; goto __pyx_L53_except_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_3 = __Pyx_PyInt_from_py_npy_int64(__pyx_t_8); if (unlikely((__pyx_t_3 == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1066; __pyx_clineno = __LINE__; goto __pyx_L53_except_error;} __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_29 = __pyx_v_i; __pyx_t_12 = -1; if (__pyx_t_29 < 0) { __pyx_t_29 += __pyx_pybuffernd_iresult.diminfo[0].shape; if (unlikely(__pyx_t_29 < 0)) __pyx_t_12 = 0; } else if (unlikely(__pyx_t_29 >= __pyx_pybuffernd_iresult.diminfo[0].shape)) __pyx_t_12 = 0; if (unlikely(__pyx_t_12 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_12); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1066; __pyx_clineno = __LINE__; goto __pyx_L53_except_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_iresult.rcbuffer->pybuffer.buf, __pyx_t_29, __pyx_pybuffernd_iresult.diminfo[0].strides) = __pyx_t_3; /* "pandas/tslib.pyx":1067 * if coerce: * iresult[i] = iNaT * continue # <<<<<<<<<<<<<< * raise * */ goto __pyx_L60_except_continue; goto __pyx_L61; } __pyx_L61:; /* "pandas/tslib.pyx":1068 * iresult[i] = iNaT * continue * raise # <<<<<<<<<<<<<< * * # if we are coercing, dont' allow integers */ __Pyx_GIVEREF(__pyx_t_10); __Pyx_GIVEREF(__pyx_t_9); __Pyx_GIVEREF(__pyx_t_7); __Pyx_ErrRestore(__pyx_t_10, __pyx_t_9, __pyx_t_7); __pyx_t_10 = 0; __pyx_t_9 = 0; __pyx_t_7 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1068; __pyx_clineno = __LINE__; goto __pyx_L53_except_error;} __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; goto __pyx_L52_exception_handled; __pyx_L60_except_continue:; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; goto __pyx_L57_try_continue; } __pyx_L53_except_error:; __Pyx_XGIVEREF(__pyx_t_13); __Pyx_XGIVEREF(__pyx_t_14); __Pyx_XGIVEREF(__pyx_t_15); __Pyx_ExceptionReset(__pyx_t_13, __pyx_t_14, __pyx_t_15); goto __pyx_L3_error; __pyx_L57_try_continue:; __Pyx_XGIVEREF(__pyx_t_13); __Pyx_XGIVEREF(__pyx_t_14); __Pyx_XGIVEREF(__pyx_t_15); __Pyx_ExceptionReset(__pyx_t_13, __pyx_t_14, __pyx_t_15); goto __pyx_L11_continue; __pyx_L52_exception_handled:; __Pyx_XGIVEREF(__pyx_t_13); __Pyx_XGIVEREF(__pyx_t_14); __Pyx_XGIVEREF(__pyx_t_15); __Pyx_ExceptionReset(__pyx_t_13, __pyx_t_14, __pyx_t_15); __pyx_L58_try_end:; } } __pyx_L50:; goto __pyx_L13; } /* "pandas/tslib.pyx":1071 * * # if we are coercing, dont' allow integers * elif util.is_integer_object(val) and not coerce: # <<<<<<<<<<<<<< * if val == iNaT: * iresult[i] = iNaT */ if ((is_integer_object(__pyx_v_val) != 0)) { __pyx_t_19 = __Pyx_PyObject_IsTrue(__pyx_v_coerce); if (unlikely(__pyx_t_19 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1071; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_t_2 = (!__pyx_t_19); __pyx_t_19 = __pyx_t_2; } else { __pyx_t_19 = (is_integer_object(__pyx_v_val) != 0); } if (__pyx_t_19) { /* "pandas/tslib.pyx":1072 * # if we are coercing, dont' allow integers * elif util.is_integer_object(val) and not coerce: * if val == iNaT: # <<<<<<<<<<<<<< * iresult[i] = iNaT * else: */ __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s__iNaT); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1072; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_t_9 = PyObject_RichCompare(__pyx_v_val, __pyx_t_7, Py_EQ); __Pyx_XGOTREF(__pyx_t_9); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1072; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_19 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_19 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1072; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; if (__pyx_t_19) { /* "pandas/tslib.pyx":1073 * elif util.is_integer_object(val) and not coerce: * if val == iNaT: * iresult[i] = iNaT # <<<<<<<<<<<<<< * else: * iresult[i] = val*m */ __pyx_t_9 = __Pyx_GetModuleGlobalName(__pyx_n_s__iNaT); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1073; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_t_3 = __Pyx_PyInt_from_py_npy_int64(__pyx_t_9); if (unlikely((__pyx_t_3 == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1073; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_30 = __pyx_v_i; __pyx_t_12 = -1; if (__pyx_t_30 < 0) { __pyx_t_30 += __pyx_pybuffernd_iresult.diminfo[0].shape; if (unlikely(__pyx_t_30 < 0)) __pyx_t_12 = 0; } else if (unlikely(__pyx_t_30 >= __pyx_pybuffernd_iresult.diminfo[0].shape)) __pyx_t_12 = 0; if (unlikely(__pyx_t_12 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_12); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1073; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_iresult.rcbuffer->pybuffer.buf, __pyx_t_30, __pyx_pybuffernd_iresult.diminfo[0].strides) = __pyx_t_3; goto __pyx_L62; } /*else*/ { /* "pandas/tslib.pyx":1075 * iresult[i] = iNaT * else: * iresult[i] = val*m # <<<<<<<<<<<<<< * seen_integer=1 * elif util.is_float_object(val) and not coerce: */ __pyx_t_9 = __Pyx_PyInt_to_py_npy_int64(__pyx_v_m); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1075; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_t_7 = PyNumber_Multiply(__pyx_v_val, __pyx_t_9); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1075; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_3 = __Pyx_PyInt_from_py_npy_int64(__pyx_t_7); if (unlikely((__pyx_t_3 == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1075; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_31 = __pyx_v_i; __pyx_t_12 = -1; if (__pyx_t_31 < 0) { __pyx_t_31 += __pyx_pybuffernd_iresult.diminfo[0].shape; if (unlikely(__pyx_t_31 < 0)) __pyx_t_12 = 0; } else if (unlikely(__pyx_t_31 >= __pyx_pybuffernd_iresult.diminfo[0].shape)) __pyx_t_12 = 0; if (unlikely(__pyx_t_12 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_12); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1075; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_iresult.rcbuffer->pybuffer.buf, __pyx_t_31, __pyx_pybuffernd_iresult.diminfo[0].strides) = __pyx_t_3; /* "pandas/tslib.pyx":1076 * else: * iresult[i] = val*m * seen_integer=1 # <<<<<<<<<<<<<< * elif util.is_float_object(val) and not coerce: * if val != val or val == iNaT: */ __pyx_v_seen_integer = 1; } __pyx_L62:; goto __pyx_L13; } /* "pandas/tslib.pyx":1077 * iresult[i] = val*m * seen_integer=1 * elif util.is_float_object(val) and not coerce: # <<<<<<<<<<<<<< * if val != val or val == iNaT: * iresult[i] = iNaT */ if ((is_float_object(__pyx_v_val) != 0)) { __pyx_t_19 = __Pyx_PyObject_IsTrue(__pyx_v_coerce); if (unlikely(__pyx_t_19 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1077; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_t_2 = (!__pyx_t_19); __pyx_t_19 = __pyx_t_2; } else { __pyx_t_19 = (is_float_object(__pyx_v_val) != 0); } if (__pyx_t_19) { /* "pandas/tslib.pyx":1078 * seen_integer=1 * elif util.is_float_object(val) and not coerce: * if val != val or val == iNaT: # <<<<<<<<<<<<<< * iresult[i] = iNaT * else: */ __pyx_t_7 = PyObject_RichCompare(__pyx_v_val, __pyx_v_val, Py_NE); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1078; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_t_19 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_19 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1078; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (!__pyx_t_19) { __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s__iNaT); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1078; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_t_9 = PyObject_RichCompare(__pyx_v_val, __pyx_t_7, Py_EQ); __Pyx_XGOTREF(__pyx_t_9); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1078; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1078; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_32 = __pyx_t_2; } else { __pyx_t_32 = __pyx_t_19; } if (__pyx_t_32) { /* "pandas/tslib.pyx":1079 * elif util.is_float_object(val) and not coerce: * if val != val or val == iNaT: * iresult[i] = iNaT # <<<<<<<<<<<<<< * else: * iresult[i] = cast_from_unit(val,unit) */ __pyx_t_9 = __Pyx_GetModuleGlobalName(__pyx_n_s__iNaT); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1079; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_t_3 = __Pyx_PyInt_from_py_npy_int64(__pyx_t_9); if (unlikely((__pyx_t_3 == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1079; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_33 = __pyx_v_i; __pyx_t_12 = -1; if (__pyx_t_33 < 0) { __pyx_t_33 += __pyx_pybuffernd_iresult.diminfo[0].shape; if (unlikely(__pyx_t_33 < 0)) __pyx_t_12 = 0; } else if (unlikely(__pyx_t_33 >= __pyx_pybuffernd_iresult.diminfo[0].shape)) __pyx_t_12 = 0; if (unlikely(__pyx_t_12 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_12); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1079; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_iresult.rcbuffer->pybuffer.buf, __pyx_t_33, __pyx_pybuffernd_iresult.diminfo[0].strides) = __pyx_t_3; goto __pyx_L63; } /*else*/ { /* "pandas/tslib.pyx":1081 * iresult[i] = iNaT * else: * iresult[i] = cast_from_unit(val,unit) # <<<<<<<<<<<<<< * seen_integer=1 * else: */ __pyx_t_3 = __pyx_f_6pandas_5tslib_cast_from_unit(__pyx_v_val, __pyx_v_unit, 0); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1081; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_t_34 = __pyx_v_i; __pyx_t_12 = -1; if (__pyx_t_34 < 0) { __pyx_t_34 += __pyx_pybuffernd_iresult.diminfo[0].shape; if (unlikely(__pyx_t_34 < 0)) __pyx_t_12 = 0; } else if (unlikely(__pyx_t_34 >= __pyx_pybuffernd_iresult.diminfo[0].shape)) __pyx_t_12 = 0; if (unlikely(__pyx_t_12 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_12); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1081; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_iresult.rcbuffer->pybuffer.buf, __pyx_t_34, __pyx_pybuffernd_iresult.diminfo[0].strides) = __pyx_t_3; /* "pandas/tslib.pyx":1082 * else: * iresult[i] = cast_from_unit(val,unit) * seen_integer=1 # <<<<<<<<<<<<<< * else: * try: */ __pyx_v_seen_integer = 1; } __pyx_L63:; goto __pyx_L13; } /*else*/ { /* "pandas/tslib.pyx":1084 * seen_integer=1 * else: * try: # <<<<<<<<<<<<<< * if len(val) == 0: * iresult[i] = iNaT */ { __Pyx_ExceptionSave(&__pyx_t_15, &__pyx_t_14, &__pyx_t_13); __Pyx_XGOTREF(__pyx_t_15); __Pyx_XGOTREF(__pyx_t_14); __Pyx_XGOTREF(__pyx_t_13); /*try:*/ { /* "pandas/tslib.pyx":1085 * else: * try: * if len(val) == 0: # <<<<<<<<<<<<<< * iresult[i] = iNaT * continue */ __pyx_t_35 = PyObject_Length(__pyx_v_val); if (unlikely(__pyx_t_35 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1085; __pyx_clineno = __LINE__; goto __pyx_L64_error;} __pyx_t_32 = ((__pyx_t_35 == 0) != 0); if (__pyx_t_32) { /* "pandas/tslib.pyx":1086 * try: * if len(val) == 0: * iresult[i] = iNaT # <<<<<<<<<<<<<< * continue * */ __pyx_t_9 = __Pyx_GetModuleGlobalName(__pyx_n_s__iNaT); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1086; __pyx_clineno = __LINE__; goto __pyx_L64_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_t_3 = __Pyx_PyInt_from_py_npy_int64(__pyx_t_9); if (unlikely((__pyx_t_3 == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1086; __pyx_clineno = __LINE__; goto __pyx_L64_error;} __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_35 = __pyx_v_i; __pyx_t_12 = -1; if (__pyx_t_35 < 0) { __pyx_t_35 += __pyx_pybuffernd_iresult.diminfo[0].shape; if (unlikely(__pyx_t_35 < 0)) __pyx_t_12 = 0; } else if (unlikely(__pyx_t_35 >= __pyx_pybuffernd_iresult.diminfo[0].shape)) __pyx_t_12 = 0; if (unlikely(__pyx_t_12 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_12); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1086; __pyx_clineno = __LINE__; goto __pyx_L64_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_iresult.rcbuffer->pybuffer.buf, __pyx_t_35, __pyx_pybuffernd_iresult.diminfo[0].strides) = __pyx_t_3; /* "pandas/tslib.pyx":1087 * if len(val) == 0: * iresult[i] = iNaT * continue # <<<<<<<<<<<<<< * * elif val in _nat_strings: */ goto __pyx_L70_try_continue; goto __pyx_L72; } /* "pandas/tslib.pyx":1089 * continue * * elif val in _nat_strings: # <<<<<<<<<<<<<< * iresult[i] = iNaT * continue */ __pyx_t_9 = __Pyx_GetModuleGlobalName(__pyx_n_s___nat_strings); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1089; __pyx_clineno = __LINE__; goto __pyx_L64_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_t_32 = (__Pyx_PySequence_Contains(__pyx_v_val, __pyx_t_9, Py_EQ)); if (unlikely(__pyx_t_32 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1089; __pyx_clineno = __LINE__; goto __pyx_L64_error;} __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_19 = (__pyx_t_32 != 0); if (__pyx_t_19) { /* "pandas/tslib.pyx":1090 * * elif val in _nat_strings: * iresult[i] = iNaT # <<<<<<<<<<<<<< * continue * */ __pyx_t_9 = __Pyx_GetModuleGlobalName(__pyx_n_s__iNaT); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1090; __pyx_clineno = __LINE__; goto __pyx_L64_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_t_3 = __Pyx_PyInt_from_py_npy_int64(__pyx_t_9); if (unlikely((__pyx_t_3 == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1090; __pyx_clineno = __LINE__; goto __pyx_L64_error;} __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_36 = __pyx_v_i; __pyx_t_12 = -1; if (__pyx_t_36 < 0) { __pyx_t_36 += __pyx_pybuffernd_iresult.diminfo[0].shape; if (unlikely(__pyx_t_36 < 0)) __pyx_t_12 = 0; } else if (unlikely(__pyx_t_36 >= __pyx_pybuffernd_iresult.diminfo[0].shape)) __pyx_t_12 = 0; if (unlikely(__pyx_t_12 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_12); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1090; __pyx_clineno = __LINE__; goto __pyx_L64_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_iresult.rcbuffer->pybuffer.buf, __pyx_t_36, __pyx_pybuffernd_iresult.diminfo[0].strides) = __pyx_t_3; /* "pandas/tslib.pyx":1091 * elif val in _nat_strings: * iresult[i] = iNaT * continue # <<<<<<<<<<<<<< * * _string_to_dts(val, &dts) */ goto __pyx_L70_try_continue; goto __pyx_L72; } __pyx_L72:; /* "pandas/tslib.pyx":1093 * continue * * _string_to_dts(val, &dts) # <<<<<<<<<<<<<< * iresult[i] = pandas_datetimestruct_to_datetime(PANDAS_FR_ns, * &dts) */ __pyx_t_9 = __pyx_f_8datetime__string_to_dts(__pyx_v_val, (&__pyx_v_dts)); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1093; __pyx_clineno = __LINE__; goto __pyx_L64_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; /* "pandas/tslib.pyx":1094 * * _string_to_dts(val, &dts) * iresult[i] = pandas_datetimestruct_to_datetime(PANDAS_FR_ns, # <<<<<<<<<<<<<< * &dts) * _check_dts_bounds(&dts) */ __pyx_t_37 = __pyx_v_i; __pyx_t_12 = -1; if (__pyx_t_37 < 0) { __pyx_t_37 += __pyx_pybuffernd_iresult.diminfo[0].shape; if (unlikely(__pyx_t_37 < 0)) __pyx_t_12 = 0; } else if (unlikely(__pyx_t_37 >= __pyx_pybuffernd_iresult.diminfo[0].shape)) __pyx_t_12 = 0; if (unlikely(__pyx_t_12 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_12); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1094; __pyx_clineno = __LINE__; goto __pyx_L64_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_iresult.rcbuffer->pybuffer.buf, __pyx_t_37, __pyx_pybuffernd_iresult.diminfo[0].strides) = pandas_datetimestruct_to_datetime(PANDAS_FR_ns, (&__pyx_v_dts)); /* "pandas/tslib.pyx":1096 * iresult[i] = pandas_datetimestruct_to_datetime(PANDAS_FR_ns, * &dts) * _check_dts_bounds(&dts) # <<<<<<<<<<<<<< * except ValueError: * try: */ __pyx_t_9 = __pyx_f_6pandas_5tslib__check_dts_bounds((&__pyx_v_dts)); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1096; __pyx_clineno = __LINE__; goto __pyx_L64_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; } __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0; __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; goto __pyx_L71_try_end; __pyx_L64_error:; __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; /* "pandas/tslib.pyx":1097 * &dts) * _check_dts_bounds(&dts) * except ValueError: # <<<<<<<<<<<<<< * try: * iresult[i] = _pydatetime_to_dts( */ __pyx_t_12 = PyErr_ExceptionMatches(__pyx_builtin_ValueError); if (__pyx_t_12) { __Pyx_AddTraceback("pandas.tslib.array_to_datetime", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_9, &__pyx_t_7, &__pyx_t_10) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1097; __pyx_clineno = __LINE__; goto __pyx_L66_except_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_GOTREF(__pyx_t_7); __Pyx_GOTREF(__pyx_t_10); /* "pandas/tslib.pyx":1098 * _check_dts_bounds(&dts) * except ValueError: * try: # <<<<<<<<<<<<<< * iresult[i] = _pydatetime_to_dts( * parse_datetime_string(val, dayfirst=dayfirst), */ { __Pyx_ExceptionSave(&__pyx_t_38, &__pyx_t_39, &__pyx_t_40); __Pyx_XGOTREF(__pyx_t_38); __Pyx_XGOTREF(__pyx_t_39); __Pyx_XGOTREF(__pyx_t_40); /*try:*/ { /* "pandas/tslib.pyx":1100 * try: * iresult[i] = _pydatetime_to_dts( * parse_datetime_string(val, dayfirst=dayfirst), # <<<<<<<<<<<<<< * &dts * ) */ __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_64); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1100; __pyx_clineno = __LINE__; goto __pyx_L75_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_41 = PyTuple_New(1); if (unlikely(!__pyx_t_41)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1100; __pyx_clineno = __LINE__; goto __pyx_L75_error;} __Pyx_GOTREF(__pyx_t_41); __Pyx_INCREF(__pyx_v_val); PyTuple_SET_ITEM(__pyx_t_41, 0, __pyx_v_val); __Pyx_GIVEREF(__pyx_v_val); __pyx_t_42 = PyDict_New(); if (unlikely(!__pyx_t_42)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1100; __pyx_clineno = __LINE__; goto __pyx_L75_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_42)); if (PyDict_SetItem(__pyx_t_42, ((PyObject *)__pyx_n_s__dayfirst), __pyx_v_dayfirst) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1100; __pyx_clineno = __LINE__; goto __pyx_L75_error;} __pyx_t_43 = PyObject_Call(__pyx_t_8, ((PyObject *)__pyx_t_41), ((PyObject *)__pyx_t_42)); if (unlikely(!__pyx_t_43)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1100; __pyx_clineno = __LINE__; goto __pyx_L75_error;} __Pyx_GOTREF(__pyx_t_43); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_41)); __pyx_t_41 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_42)); __pyx_t_42 = 0; /* "pandas/tslib.pyx":1099 * except ValueError: * try: * iresult[i] = _pydatetime_to_dts( # <<<<<<<<<<<<<< * parse_datetime_string(val, dayfirst=dayfirst), * &dts */ __pyx_t_44 = __pyx_v_i; __pyx_t_12 = -1; if (__pyx_t_44 < 0) { __pyx_t_44 += __pyx_pybuffernd_iresult.diminfo[0].shape; if (unlikely(__pyx_t_44 < 0)) __pyx_t_12 = 0; } else if (unlikely(__pyx_t_44 >= __pyx_pybuffernd_iresult.diminfo[0].shape)) __pyx_t_12 = 0; if (unlikely(__pyx_t_12 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_12); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1099; __pyx_clineno = __LINE__; goto __pyx_L75_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_iresult.rcbuffer->pybuffer.buf, __pyx_t_44, __pyx_pybuffernd_iresult.diminfo[0].strides) = __pyx_f_8datetime__pydatetime_to_dts(__pyx_t_43, (&__pyx_v_dts)); __Pyx_DECREF(__pyx_t_43); __pyx_t_43 = 0; } __Pyx_XDECREF(__pyx_t_38); __pyx_t_38 = 0; __Pyx_XDECREF(__pyx_t_39); __pyx_t_39 = 0; __Pyx_XDECREF(__pyx_t_40); __pyx_t_40 = 0; goto __pyx_L82_try_end; __pyx_L75_error:; __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_XDECREF(__pyx_t_41); __pyx_t_41 = 0; __Pyx_XDECREF(__pyx_t_42); __pyx_t_42 = 0; __Pyx_XDECREF(__pyx_t_43); __pyx_t_43 = 0; /* "pandas/tslib.pyx":1103 * &dts * ) * except Exception: # <<<<<<<<<<<<<< * if coerce: * iresult[i] = iNaT */ __pyx_t_12 = PyErr_ExceptionMatches(__pyx_builtin_Exception); if (__pyx_t_12) { __Pyx_AddTraceback("pandas.tslib.array_to_datetime", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_43, &__pyx_t_42, &__pyx_t_41) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1103; __pyx_clineno = __LINE__; goto __pyx_L77_except_error;} __Pyx_GOTREF(__pyx_t_43); __Pyx_GOTREF(__pyx_t_42); __Pyx_GOTREF(__pyx_t_41); /* "pandas/tslib.pyx":1104 * ) * except Exception: * if coerce: # <<<<<<<<<<<<<< * iresult[i] = iNaT * continue */ __pyx_t_19 = __Pyx_PyObject_IsTrue(__pyx_v_coerce); if (unlikely(__pyx_t_19 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1104; __pyx_clineno = __LINE__; goto __pyx_L77_except_error;} if (__pyx_t_19) { /* "pandas/tslib.pyx":1105 * except Exception: * if coerce: * iresult[i] = iNaT # <<<<<<<<<<<<<< * continue * raise TypeError */ __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s__iNaT); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1105; __pyx_clineno = __LINE__; goto __pyx_L77_except_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_3 = __Pyx_PyInt_from_py_npy_int64(__pyx_t_8); if (unlikely((__pyx_t_3 == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1105; __pyx_clineno = __LINE__; goto __pyx_L77_except_error;} __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_45 = __pyx_v_i; __pyx_t_12 = -1; if (__pyx_t_45 < 0) { __pyx_t_45 += __pyx_pybuffernd_iresult.diminfo[0].shape; if (unlikely(__pyx_t_45 < 0)) __pyx_t_12 = 0; } else if (unlikely(__pyx_t_45 >= __pyx_pybuffernd_iresult.diminfo[0].shape)) __pyx_t_12 = 0; if (unlikely(__pyx_t_12 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_12); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1105; __pyx_clineno = __LINE__; goto __pyx_L77_except_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_iresult.rcbuffer->pybuffer.buf, __pyx_t_45, __pyx_pybuffernd_iresult.diminfo[0].strides) = __pyx_t_3; /* "pandas/tslib.pyx":1106 * if coerce: * iresult[i] = iNaT * continue # <<<<<<<<<<<<<< * raise TypeError * */ goto __pyx_L84_except_continue; goto __pyx_L85; } __pyx_L85:; /* "pandas/tslib.pyx":1107 * iresult[i] = iNaT * continue * raise TypeError # <<<<<<<<<<<<<< * * try: */ __Pyx_Raise(__pyx_builtin_TypeError, 0, 0, 0); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1107; __pyx_clineno = __LINE__; goto __pyx_L77_except_error;} __Pyx_DECREF(__pyx_t_43); __pyx_t_43 = 0; __Pyx_DECREF(__pyx_t_42); __pyx_t_42 = 0; __Pyx_DECREF(__pyx_t_41); __pyx_t_41 = 0; goto __pyx_L76_exception_handled; __pyx_L84_except_continue:; __Pyx_DECREF(__pyx_t_43); __pyx_t_43 = 0; __Pyx_DECREF(__pyx_t_42); __pyx_t_42 = 0; __Pyx_DECREF(__pyx_t_41); __pyx_t_41 = 0; goto __pyx_L81_try_continue; } __pyx_L77_except_error:; __Pyx_XGIVEREF(__pyx_t_38); __Pyx_XGIVEREF(__pyx_t_39); __Pyx_XGIVEREF(__pyx_t_40); __Pyx_ExceptionReset(__pyx_t_38, __pyx_t_39, __pyx_t_40); goto __pyx_L66_except_error; __pyx_L81_try_continue:; __Pyx_XGIVEREF(__pyx_t_38); __Pyx_XGIVEREF(__pyx_t_39); __Pyx_XGIVEREF(__pyx_t_40); __Pyx_ExceptionReset(__pyx_t_38, __pyx_t_39, __pyx_t_40); goto __pyx_L74_except_continue; __pyx_L76_exception_handled:; __Pyx_XGIVEREF(__pyx_t_38); __Pyx_XGIVEREF(__pyx_t_39); __Pyx_XGIVEREF(__pyx_t_40); __Pyx_ExceptionReset(__pyx_t_38, __pyx_t_39, __pyx_t_40); __pyx_L82_try_end:; } /* "pandas/tslib.pyx":1109 * raise TypeError * * try: # <<<<<<<<<<<<<< * _check_dts_bounds(&dts) * except ValueError: */ { __Pyx_ExceptionSave(&__pyx_t_40, &__pyx_t_39, &__pyx_t_38); __Pyx_XGOTREF(__pyx_t_40); __Pyx_XGOTREF(__pyx_t_39); __Pyx_XGOTREF(__pyx_t_38); /*try:*/ { /* "pandas/tslib.pyx":1110 * * try: * _check_dts_bounds(&dts) # <<<<<<<<<<<<<< * except ValueError: * if coerce: */ __pyx_t_41 = __pyx_f_6pandas_5tslib__check_dts_bounds((&__pyx_v_dts)); if (unlikely(!__pyx_t_41)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1110; __pyx_clineno = __LINE__; goto __pyx_L86_error;} __Pyx_GOTREF(__pyx_t_41); __Pyx_DECREF(__pyx_t_41); __pyx_t_41 = 0; } __Pyx_XDECREF(__pyx_t_40); __pyx_t_40 = 0; __Pyx_XDECREF(__pyx_t_39); __pyx_t_39 = 0; __Pyx_XDECREF(__pyx_t_38); __pyx_t_38 = 0; goto __pyx_L93_try_end; __pyx_L86_error:; __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_XDECREF(__pyx_t_43); __pyx_t_43 = 0; __Pyx_XDECREF(__pyx_t_42); __pyx_t_42 = 0; __Pyx_XDECREF(__pyx_t_41); __pyx_t_41 = 0; /* "pandas/tslib.pyx":1111 * try: * _check_dts_bounds(&dts) * except ValueError: # <<<<<<<<<<<<<< * if coerce: * iresult[i] = iNaT */ __pyx_t_12 = PyErr_ExceptionMatches(__pyx_builtin_ValueError); if (__pyx_t_12) { __Pyx_AddTraceback("pandas.tslib.array_to_datetime", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_41, &__pyx_t_42, &__pyx_t_43) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1111; __pyx_clineno = __LINE__; goto __pyx_L88_except_error;} __Pyx_GOTREF(__pyx_t_41); __Pyx_GOTREF(__pyx_t_42); __Pyx_GOTREF(__pyx_t_43); /* "pandas/tslib.pyx":1112 * _check_dts_bounds(&dts) * except ValueError: * if coerce: # <<<<<<<<<<<<<< * iresult[i] = iNaT * continue */ __pyx_t_19 = __Pyx_PyObject_IsTrue(__pyx_v_coerce); if (unlikely(__pyx_t_19 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1112; __pyx_clineno = __LINE__; goto __pyx_L88_except_error;} if (__pyx_t_19) { /* "pandas/tslib.pyx":1113 * except ValueError: * if coerce: * iresult[i] = iNaT # <<<<<<<<<<<<<< * continue * raise */ __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s__iNaT); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1113; __pyx_clineno = __LINE__; goto __pyx_L88_except_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_3 = __Pyx_PyInt_from_py_npy_int64(__pyx_t_8); if (unlikely((__pyx_t_3 == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1113; __pyx_clineno = __LINE__; goto __pyx_L88_except_error;} __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_46 = __pyx_v_i; __pyx_t_12 = -1; if (__pyx_t_46 < 0) { __pyx_t_46 += __pyx_pybuffernd_iresult.diminfo[0].shape; if (unlikely(__pyx_t_46 < 0)) __pyx_t_12 = 0; } else if (unlikely(__pyx_t_46 >= __pyx_pybuffernd_iresult.diminfo[0].shape)) __pyx_t_12 = 0; if (unlikely(__pyx_t_12 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_12); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1113; __pyx_clineno = __LINE__; goto __pyx_L88_except_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_iresult.rcbuffer->pybuffer.buf, __pyx_t_46, __pyx_pybuffernd_iresult.diminfo[0].strides) = __pyx_t_3; /* "pandas/tslib.pyx":1114 * if coerce: * iresult[i] = iNaT * continue # <<<<<<<<<<<<<< * raise * except: */ goto __pyx_L95_except_continue; goto __pyx_L96; } __pyx_L96:; /* "pandas/tslib.pyx":1115 * iresult[i] = iNaT * continue * raise # <<<<<<<<<<<<<< * except: * if coerce: */ __Pyx_GIVEREF(__pyx_t_41); __Pyx_GIVEREF(__pyx_t_42); __Pyx_GIVEREF(__pyx_t_43); __Pyx_ErrRestore(__pyx_t_41, __pyx_t_42, __pyx_t_43); __pyx_t_41 = 0; __pyx_t_42 = 0; __pyx_t_43 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1115; __pyx_clineno = __LINE__; goto __pyx_L88_except_error;} __Pyx_DECREF(__pyx_t_41); __pyx_t_41 = 0; __Pyx_DECREF(__pyx_t_42); __pyx_t_42 = 0; __Pyx_DECREF(__pyx_t_43); __pyx_t_43 = 0; goto __pyx_L87_exception_handled; __pyx_L95_except_continue:; __Pyx_DECREF(__pyx_t_41); __pyx_t_41 = 0; __Pyx_DECREF(__pyx_t_42); __pyx_t_42 = 0; __Pyx_DECREF(__pyx_t_43); __pyx_t_43 = 0; goto __pyx_L92_try_continue; } __pyx_L88_except_error:; __Pyx_XGIVEREF(__pyx_t_40); __Pyx_XGIVEREF(__pyx_t_39); __Pyx_XGIVEREF(__pyx_t_38); __Pyx_ExceptionReset(__pyx_t_40, __pyx_t_39, __pyx_t_38); goto __pyx_L66_except_error; __pyx_L92_try_continue:; __Pyx_XGIVEREF(__pyx_t_40); __Pyx_XGIVEREF(__pyx_t_39); __Pyx_XGIVEREF(__pyx_t_38); __Pyx_ExceptionReset(__pyx_t_40, __pyx_t_39, __pyx_t_38); goto __pyx_L74_except_continue; __pyx_L87_exception_handled:; __Pyx_XGIVEREF(__pyx_t_40); __Pyx_XGIVEREF(__pyx_t_39); __Pyx_XGIVEREF(__pyx_t_38); __Pyx_ExceptionReset(__pyx_t_40, __pyx_t_39, __pyx_t_38); __pyx_L93_try_end:; } __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; goto __pyx_L65_exception_handled; __pyx_L74_except_continue:; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; goto __pyx_L70_try_continue; } /* "pandas/tslib.pyx":1116 * continue * raise * except: # <<<<<<<<<<<<<< * if coerce: * iresult[i] = iNaT */ /*except:*/ { __Pyx_AddTraceback("pandas.tslib.array_to_datetime", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_10, &__pyx_t_7, &__pyx_t_9) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1116; __pyx_clineno = __LINE__; goto __pyx_L66_except_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_GOTREF(__pyx_t_7); __Pyx_GOTREF(__pyx_t_9); /* "pandas/tslib.pyx":1117 * raise * except: * if coerce: # <<<<<<<<<<<<<< * iresult[i] = iNaT * continue */ __pyx_t_19 = __Pyx_PyObject_IsTrue(__pyx_v_coerce); if (unlikely(__pyx_t_19 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1117; __pyx_clineno = __LINE__; goto __pyx_L66_except_error;} if (__pyx_t_19) { /* "pandas/tslib.pyx":1118 * except: * if coerce: * iresult[i] = iNaT # <<<<<<<<<<<<<< * continue * raise */ __pyx_t_43 = __Pyx_GetModuleGlobalName(__pyx_n_s__iNaT); if (unlikely(!__pyx_t_43)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1118; __pyx_clineno = __LINE__; goto __pyx_L66_except_error;} __Pyx_GOTREF(__pyx_t_43); __pyx_t_3 = __Pyx_PyInt_from_py_npy_int64(__pyx_t_43); if (unlikely((__pyx_t_3 == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1118; __pyx_clineno = __LINE__; goto __pyx_L66_except_error;} __Pyx_DECREF(__pyx_t_43); __pyx_t_43 = 0; __pyx_t_47 = __pyx_v_i; __pyx_t_12 = -1; if (__pyx_t_47 < 0) { __pyx_t_47 += __pyx_pybuffernd_iresult.diminfo[0].shape; if (unlikely(__pyx_t_47 < 0)) __pyx_t_12 = 0; } else if (unlikely(__pyx_t_47 >= __pyx_pybuffernd_iresult.diminfo[0].shape)) __pyx_t_12 = 0; if (unlikely(__pyx_t_12 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_12); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1118; __pyx_clineno = __LINE__; goto __pyx_L66_except_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_iresult.rcbuffer->pybuffer.buf, __pyx_t_47, __pyx_pybuffernd_iresult.diminfo[0].strides) = __pyx_t_3; /* "pandas/tslib.pyx":1119 * if coerce: * iresult[i] = iNaT * continue # <<<<<<<<<<<<<< * raise * */ goto __pyx_L98_except_continue; goto __pyx_L99; } __pyx_L99:; /* "pandas/tslib.pyx":1120 * iresult[i] = iNaT * continue * raise # <<<<<<<<<<<<<< * * # don't allow mixed integers and datetime like */ __Pyx_GIVEREF(__pyx_t_10); __Pyx_GIVEREF(__pyx_t_7); __Pyx_GIVEREF(__pyx_t_9); __Pyx_ErrRestore(__pyx_t_10, __pyx_t_7, __pyx_t_9); __pyx_t_10 = 0; __pyx_t_7 = 0; __pyx_t_9 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1120; __pyx_clineno = __LINE__; goto __pyx_L66_except_error;} __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; goto __pyx_L65_exception_handled; __pyx_L98_except_continue:; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; goto __pyx_L70_try_continue; } __pyx_L66_except_error:; __Pyx_XGIVEREF(__pyx_t_15); __Pyx_XGIVEREF(__pyx_t_14); __Pyx_XGIVEREF(__pyx_t_13); __Pyx_ExceptionReset(__pyx_t_15, __pyx_t_14, __pyx_t_13); goto __pyx_L3_error; __pyx_L70_try_continue:; __Pyx_XGIVEREF(__pyx_t_15); __Pyx_XGIVEREF(__pyx_t_14); __Pyx_XGIVEREF(__pyx_t_13); __Pyx_ExceptionReset(__pyx_t_15, __pyx_t_14, __pyx_t_13); goto __pyx_L11_continue; __pyx_L65_exception_handled:; __Pyx_XGIVEREF(__pyx_t_15); __Pyx_XGIVEREF(__pyx_t_14); __Pyx_XGIVEREF(__pyx_t_13); __Pyx_ExceptionReset(__pyx_t_15, __pyx_t_14, __pyx_t_13); __pyx_L71_try_end:; } } __pyx_L13:; __pyx_L11_continue:; } /* "pandas/tslib.pyx":1125 * # higher levels can catch and coerce to object, for * # example * if seen_integer and seen_datetime: # <<<<<<<<<<<<<< * raise ValueError("mixed datetimes and integers in passed array") * */ if ((__pyx_v_seen_integer != 0)) { __pyx_t_19 = (__pyx_v_seen_datetime != 0); } else { __pyx_t_19 = (__pyx_v_seen_integer != 0); } if (__pyx_t_19) { /* "pandas/tslib.pyx":1126 * # example * if seen_integer and seen_datetime: * raise ValueError("mixed datetimes and integers in passed array") # <<<<<<<<<<<<<< * * return result */ __pyx_t_9 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_66), NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1126; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_Raise(__pyx_t_9, 0, 0, 0); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1126; __pyx_clineno = __LINE__; goto __pyx_L3_error;} goto __pyx_L100; } __pyx_L100:; /* "pandas/tslib.pyx":1128 * raise ValueError("mixed datetimes and integers in passed array") * * return result # <<<<<<<<<<<<<< * except OutOfBoundsDatetime: * if raise_: */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_result); __pyx_r = __pyx_v_result; goto __pyx_L7_try_return; } __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; goto __pyx_L10_try_end; __pyx_L7_try_return:; __Pyx_XGIVEREF(__pyx_t_4); __Pyx_XGIVEREF(__pyx_t_5); __Pyx_XGIVEREF(__pyx_t_6); __Pyx_ExceptionReset(__pyx_t_4, __pyx_t_5, __pyx_t_6); goto __pyx_L0; __pyx_L3_error:; __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_XDECREF(__pyx_t_41); __pyx_t_41 = 0; __Pyx_XDECREF(__pyx_t_42); __pyx_t_42 = 0; __Pyx_XDECREF(__pyx_t_43); __pyx_t_43 = 0; __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; /* "pandas/tslib.pyx":1129 * * return result * except OutOfBoundsDatetime: # <<<<<<<<<<<<<< * if raise_: * raise */ __pyx_t_9 = __Pyx_GetModuleGlobalName(__pyx_n_s__OutOfBoundsDatetime); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1129; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_t_12 = PyErr_ExceptionMatches(__pyx_t_9); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; if (__pyx_t_12) { __Pyx_AddTraceback("pandas.tslib.array_to_datetime", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_9, &__pyx_t_7, &__pyx_t_10) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1129; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_GOTREF(__pyx_t_7); __Pyx_GOTREF(__pyx_t_10); /* "pandas/tslib.pyx":1130 * return result * except OutOfBoundsDatetime: * if raise_: # <<<<<<<<<<<<<< * raise * */ __pyx_t_19 = __Pyx_PyObject_IsTrue(__pyx_v_raise_); if (unlikely(__pyx_t_19 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1130; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} if (__pyx_t_19) { /* "pandas/tslib.pyx":1131 * except OutOfBoundsDatetime: * if raise_: * raise # <<<<<<<<<<<<<< * * oresult = np.empty(n, dtype=object) */ __Pyx_GIVEREF(__pyx_t_9); __Pyx_GIVEREF(__pyx_t_7); __Pyx_GIVEREF(__pyx_t_10); __Pyx_ErrRestore(__pyx_t_9, __pyx_t_7, __pyx_t_10); __pyx_t_9 = 0; __pyx_t_7 = 0; __pyx_t_10 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1131; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} goto __pyx_L103; } __pyx_L103:; /* "pandas/tslib.pyx":1133 * raise * * oresult = np.empty(n, dtype=object) # <<<<<<<<<<<<<< * for i in range(n): * val = values[i] */ __pyx_t_43 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_43)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1133; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} __Pyx_GOTREF(__pyx_t_43); __pyx_t_42 = __Pyx_PyObject_GetAttrStr(__pyx_t_43, __pyx_n_s__empty); if (unlikely(!__pyx_t_42)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1133; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} __Pyx_GOTREF(__pyx_t_42); __Pyx_DECREF(__pyx_t_43); __pyx_t_43 = 0; __pyx_t_43 = PyInt_FromSsize_t(__pyx_v_n); if (unlikely(!__pyx_t_43)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1133; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} __Pyx_GOTREF(__pyx_t_43); __pyx_t_41 = PyTuple_New(1); if (unlikely(!__pyx_t_41)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1133; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} __Pyx_GOTREF(__pyx_t_41); PyTuple_SET_ITEM(__pyx_t_41, 0, __pyx_t_43); __Pyx_GIVEREF(__pyx_t_43); __pyx_t_43 = 0; __pyx_t_43 = PyDict_New(); if (unlikely(!__pyx_t_43)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1133; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_43)); if (PyDict_SetItem(__pyx_t_43, ((PyObject *)__pyx_n_s__dtype), __pyx_builtin_object) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1133; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} __pyx_t_8 = PyObject_Call(__pyx_t_42, ((PyObject *)__pyx_t_41), ((PyObject *)__pyx_t_43)); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1133; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_42); __pyx_t_42 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_41)); __pyx_t_41 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_43)); __pyx_t_43 = 0; if (!(likely(((__pyx_t_8) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_8, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1133; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} __pyx_t_48 = ((PyArrayObject *)__pyx_t_8); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_oresult.rcbuffer->pybuffer); __pyx_t_12 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_oresult.rcbuffer->pybuffer, (PyObject*)__pyx_t_48, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_12 < 0)) { PyErr_Fetch(&__pyx_t_13, &__pyx_t_14, &__pyx_t_15); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_oresult.rcbuffer->pybuffer, (PyObject*)__pyx_v_oresult, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_13); Py_XDECREF(__pyx_t_14); Py_XDECREF(__pyx_t_15); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_13, __pyx_t_14, __pyx_t_15); } } __pyx_pybuffernd_oresult.diminfo[0].strides = __pyx_pybuffernd_oresult.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_oresult.diminfo[0].shape = __pyx_pybuffernd_oresult.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_12 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1133; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} } __pyx_t_48 = 0; __pyx_v_oresult = ((PyArrayObject *)__pyx_t_8); __pyx_t_8 = 0; /* "pandas/tslib.pyx":1134 * * oresult = np.empty(n, dtype=object) * for i in range(n): # <<<<<<<<<<<<<< * val = values[i] * if util.is_datetime64_object(val): */ __pyx_t_1 = __pyx_v_n; for (__pyx_t_16 = 0; __pyx_t_16 < __pyx_t_1; __pyx_t_16+=1) { __pyx_v_i = __pyx_t_16; /* "pandas/tslib.pyx":1135 * oresult = np.empty(n, dtype=object) * for i in range(n): * val = values[i] # <<<<<<<<<<<<<< * if util.is_datetime64_object(val): * oresult[i] = val.item() */ __pyx_t_49 = __pyx_v_i; __pyx_t_12 = -1; if (__pyx_t_49 < 0) { __pyx_t_49 += __pyx_pybuffernd_values.diminfo[0].shape; if (unlikely(__pyx_t_49 < 0)) __pyx_t_12 = 0; } else if (unlikely(__pyx_t_49 >= __pyx_pybuffernd_values.diminfo[0].shape)) __pyx_t_12 = 0; if (unlikely(__pyx_t_12 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_12); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1135; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} } __pyx_t_8 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_49, __pyx_pybuffernd_values.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_8); __Pyx_XDECREF_SET(__pyx_v_val, __pyx_t_8); __pyx_t_8 = 0; /* "pandas/tslib.pyx":1136 * for i in range(n): * val = values[i] * if util.is_datetime64_object(val): # <<<<<<<<<<<<<< * oresult[i] = val.item() * else: */ __pyx_t_19 = (is_datetime64_object(__pyx_v_val) != 0); if (__pyx_t_19) { /* "pandas/tslib.pyx":1137 * val = values[i] * if util.is_datetime64_object(val): * oresult[i] = val.item() # <<<<<<<<<<<<<< * else: * oresult[i] = val */ __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_val, __pyx_n_s__item); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1137; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_43 = PyObject_Call(__pyx_t_8, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_43)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1137; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} __Pyx_GOTREF(__pyx_t_43); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_50 = __pyx_v_i; __pyx_t_12 = -1; if (__pyx_t_50 < 0) { __pyx_t_50 += __pyx_pybuffernd_oresult.diminfo[0].shape; if (unlikely(__pyx_t_50 < 0)) __pyx_t_12 = 0; } else if (unlikely(__pyx_t_50 >= __pyx_pybuffernd_oresult.diminfo[0].shape)) __pyx_t_12 = 0; if (unlikely(__pyx_t_12 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_12); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1137; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} } __pyx_t_51 = __Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_oresult.rcbuffer->pybuffer.buf, __pyx_t_50, __pyx_pybuffernd_oresult.diminfo[0].strides); __Pyx_GOTREF(*__pyx_t_51); __Pyx_INCREF(__pyx_t_43); __Pyx_DECREF(*__pyx_t_51); *__pyx_t_51 = __pyx_t_43; __Pyx_GIVEREF(*__pyx_t_51); __Pyx_DECREF(__pyx_t_43); __pyx_t_43 = 0; goto __pyx_L106; } /*else*/ { /* "pandas/tslib.pyx":1139 * oresult[i] = val.item() * else: * oresult[i] = val # <<<<<<<<<<<<<< * return oresult * except TypeError: */ __pyx_t_52 = __pyx_v_i; __pyx_t_12 = -1; if (__pyx_t_52 < 0) { __pyx_t_52 += __pyx_pybuffernd_oresult.diminfo[0].shape; if (unlikely(__pyx_t_52 < 0)) __pyx_t_12 = 0; } else if (unlikely(__pyx_t_52 >= __pyx_pybuffernd_oresult.diminfo[0].shape)) __pyx_t_12 = 0; if (unlikely(__pyx_t_12 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_12); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1139; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} } __pyx_t_51 = __Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_oresult.rcbuffer->pybuffer.buf, __pyx_t_52, __pyx_pybuffernd_oresult.diminfo[0].strides); __Pyx_GOTREF(*__pyx_t_51); __Pyx_INCREF(__pyx_v_val); __Pyx_DECREF(*__pyx_t_51); *__pyx_t_51 = __pyx_v_val; __Pyx_GIVEREF(*__pyx_t_51); } __pyx_L106:; } /* "pandas/tslib.pyx":1140 * else: * oresult[i] = val * return oresult # <<<<<<<<<<<<<< * except TypeError: * oresult = np.empty(n, dtype=object) */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_oresult)); __pyx_r = ((PyObject *)__pyx_v_oresult); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; goto __pyx_L6_except_return; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; goto __pyx_L4_exception_handled; } /* "pandas/tslib.pyx":1141 * oresult[i] = val * return oresult * except TypeError: # <<<<<<<<<<<<<< * oresult = np.empty(n, dtype=object) * */ __pyx_t_12 = PyErr_ExceptionMatches(__pyx_builtin_TypeError); if (__pyx_t_12) { __Pyx_AddTraceback("pandas.tslib.array_to_datetime", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_10, &__pyx_t_7, &__pyx_t_9) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1141; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_GOTREF(__pyx_t_7); __Pyx_GOTREF(__pyx_t_9); /* "pandas/tslib.pyx":1142 * return oresult * except TypeError: * oresult = np.empty(n, dtype=object) # <<<<<<<<<<<<<< * * for i in range(n): */ __pyx_t_43 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_43)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1142; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} __Pyx_GOTREF(__pyx_t_43); __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_43, __pyx_n_s__empty); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1142; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_43); __pyx_t_43 = 0; __pyx_t_43 = PyInt_FromSsize_t(__pyx_v_n); if (unlikely(!__pyx_t_43)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1142; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} __Pyx_GOTREF(__pyx_t_43); __pyx_t_41 = PyTuple_New(1); if (unlikely(!__pyx_t_41)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1142; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} __Pyx_GOTREF(__pyx_t_41); PyTuple_SET_ITEM(__pyx_t_41, 0, __pyx_t_43); __Pyx_GIVEREF(__pyx_t_43); __pyx_t_43 = 0; __pyx_t_43 = PyDict_New(); if (unlikely(!__pyx_t_43)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1142; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_43)); if (PyDict_SetItem(__pyx_t_43, ((PyObject *)__pyx_n_s__dtype), __pyx_builtin_object) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1142; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} __pyx_t_42 = PyObject_Call(__pyx_t_8, ((PyObject *)__pyx_t_41), ((PyObject *)__pyx_t_43)); if (unlikely(!__pyx_t_42)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1142; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} __Pyx_GOTREF(__pyx_t_42); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_41)); __pyx_t_41 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_43)); __pyx_t_43 = 0; if (!(likely(((__pyx_t_42) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_42, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1142; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} __pyx_t_48 = ((PyArrayObject *)__pyx_t_42); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_oresult.rcbuffer->pybuffer); __pyx_t_12 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_oresult.rcbuffer->pybuffer, (PyObject*)__pyx_t_48, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_12 < 0)) { PyErr_Fetch(&__pyx_t_15, &__pyx_t_14, &__pyx_t_13); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_oresult.rcbuffer->pybuffer, (PyObject*)__pyx_v_oresult, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_15); Py_XDECREF(__pyx_t_14); Py_XDECREF(__pyx_t_13); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_15, __pyx_t_14, __pyx_t_13); } } __pyx_pybuffernd_oresult.diminfo[0].strides = __pyx_pybuffernd_oresult.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_oresult.diminfo[0].shape = __pyx_pybuffernd_oresult.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_12 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1142; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} } __pyx_t_48 = 0; __pyx_v_oresult = ((PyArrayObject *)__pyx_t_42); __pyx_t_42 = 0; /* "pandas/tslib.pyx":1144 * oresult = np.empty(n, dtype=object) * * for i in range(n): # <<<<<<<<<<<<<< * val = values[i] * if _checknull_with_nat(val): */ __pyx_t_1 = __pyx_v_n; for (__pyx_t_16 = 0; __pyx_t_16 < __pyx_t_1; __pyx_t_16+=1) { __pyx_v_i = __pyx_t_16; /* "pandas/tslib.pyx":1145 * * for i in range(n): * val = values[i] # <<<<<<<<<<<<<< * if _checknull_with_nat(val): * oresult[i] = val */ __pyx_t_53 = __pyx_v_i; __pyx_t_12 = -1; if (__pyx_t_53 < 0) { __pyx_t_53 += __pyx_pybuffernd_values.diminfo[0].shape; if (unlikely(__pyx_t_53 < 0)) __pyx_t_12 = 0; } else if (unlikely(__pyx_t_53 >= __pyx_pybuffernd_values.diminfo[0].shape)) __pyx_t_12 = 0; if (unlikely(__pyx_t_12 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_12); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1145; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} } __pyx_t_42 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_53, __pyx_pybuffernd_values.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_42); __Pyx_XDECREF_SET(__pyx_v_val, __pyx_t_42); __pyx_t_42 = 0; /* "pandas/tslib.pyx":1146 * for i in range(n): * val = values[i] * if _checknull_with_nat(val): # <<<<<<<<<<<<<< * oresult[i] = val * elif util.is_string_object(val): */ __pyx_t_19 = (__pyx_f_6pandas_5tslib__checknull_with_nat(__pyx_v_val) != 0); if (__pyx_t_19) { /* "pandas/tslib.pyx":1147 * val = values[i] * if _checknull_with_nat(val): * oresult[i] = val # <<<<<<<<<<<<<< * elif util.is_string_object(val): * if len(val) == 0: */ __pyx_t_54 = __pyx_v_i; __pyx_t_12 = -1; if (__pyx_t_54 < 0) { __pyx_t_54 += __pyx_pybuffernd_oresult.diminfo[0].shape; if (unlikely(__pyx_t_54 < 0)) __pyx_t_12 = 0; } else if (unlikely(__pyx_t_54 >= __pyx_pybuffernd_oresult.diminfo[0].shape)) __pyx_t_12 = 0; if (unlikely(__pyx_t_12 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_12); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1147; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} } __pyx_t_51 = __Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_oresult.rcbuffer->pybuffer.buf, __pyx_t_54, __pyx_pybuffernd_oresult.diminfo[0].strides); __Pyx_GOTREF(*__pyx_t_51); __Pyx_INCREF(__pyx_v_val); __Pyx_DECREF(*__pyx_t_51); *__pyx_t_51 = __pyx_v_val; __Pyx_GIVEREF(*__pyx_t_51); goto __pyx_L111; } /* "pandas/tslib.pyx":1148 * if _checknull_with_nat(val): * oresult[i] = val * elif util.is_string_object(val): # <<<<<<<<<<<<<< * if len(val) == 0: * # TODO: ?? */ __pyx_t_19 = (is_string_object(__pyx_v_val) != 0); if (__pyx_t_19) { /* "pandas/tslib.pyx":1149 * oresult[i] = val * elif util.is_string_object(val): * if len(val) == 0: # <<<<<<<<<<<<<< * # TODO: ?? * oresult[i] = 'NaT' */ __pyx_t_55 = PyObject_Length(__pyx_v_val); if (unlikely(__pyx_t_55 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1149; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} __pyx_t_19 = ((__pyx_t_55 == 0) != 0); if (__pyx_t_19) { /* "pandas/tslib.pyx":1151 * if len(val) == 0: * # TODO: ?? * oresult[i] = 'NaT' # <<<<<<<<<<<<<< * continue * try: */ __pyx_t_55 = __pyx_v_i; __pyx_t_12 = -1; if (__pyx_t_55 < 0) { __pyx_t_55 += __pyx_pybuffernd_oresult.diminfo[0].shape; if (unlikely(__pyx_t_55 < 0)) __pyx_t_12 = 0; } else if (unlikely(__pyx_t_55 >= __pyx_pybuffernd_oresult.diminfo[0].shape)) __pyx_t_12 = 0; if (unlikely(__pyx_t_12 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_12); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1151; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} } __pyx_t_51 = __Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_oresult.rcbuffer->pybuffer.buf, __pyx_t_55, __pyx_pybuffernd_oresult.diminfo[0].strides); __Pyx_GOTREF(*__pyx_t_51); __Pyx_INCREF(__pyx_n_s__NaT); __Pyx_DECREF(*__pyx_t_51); *__pyx_t_51 = __pyx_n_s__NaT; __Pyx_GIVEREF(*__pyx_t_51); /* "pandas/tslib.pyx":1152 * # TODO: ?? * oresult[i] = 'NaT' * continue # <<<<<<<<<<<<<< * try: * oresult[i] = parse_datetime_string(val, dayfirst=dayfirst) */ goto __pyx_L109_continue; goto __pyx_L112; } __pyx_L112:; /* "pandas/tslib.pyx":1153 * oresult[i] = 'NaT' * continue * try: # <<<<<<<<<<<<<< * oresult[i] = parse_datetime_string(val, dayfirst=dayfirst) * _pydatetime_to_dts(oresult[i], &dts) */ { __Pyx_ExceptionSave(&__pyx_t_13, &__pyx_t_14, &__pyx_t_15); __Pyx_XGOTREF(__pyx_t_13); __Pyx_XGOTREF(__pyx_t_14); __Pyx_XGOTREF(__pyx_t_15); /*try:*/ { /* "pandas/tslib.pyx":1154 * continue * try: * oresult[i] = parse_datetime_string(val, dayfirst=dayfirst) # <<<<<<<<<<<<<< * _pydatetime_to_dts(oresult[i], &dts) * _check_dts_bounds(&dts) */ __pyx_t_42 = __Pyx_GetModuleGlobalName(__pyx_n_s_64); if (unlikely(!__pyx_t_42)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1154; __pyx_clineno = __LINE__; goto __pyx_L113_error;} __Pyx_GOTREF(__pyx_t_42); __pyx_t_43 = PyTuple_New(1); if (unlikely(!__pyx_t_43)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1154; __pyx_clineno = __LINE__; goto __pyx_L113_error;} __Pyx_GOTREF(__pyx_t_43); __Pyx_INCREF(__pyx_v_val); PyTuple_SET_ITEM(__pyx_t_43, 0, __pyx_v_val); __Pyx_GIVEREF(__pyx_v_val); __pyx_t_41 = PyDict_New(); if (unlikely(!__pyx_t_41)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1154; __pyx_clineno = __LINE__; goto __pyx_L113_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_41)); if (PyDict_SetItem(__pyx_t_41, ((PyObject *)__pyx_n_s__dayfirst), __pyx_v_dayfirst) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1154; __pyx_clineno = __LINE__; goto __pyx_L113_error;} __pyx_t_8 = PyObject_Call(__pyx_t_42, ((PyObject *)__pyx_t_43), ((PyObject *)__pyx_t_41)); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1154; __pyx_clineno = __LINE__; goto __pyx_L113_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_42); __pyx_t_42 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_43)); __pyx_t_43 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_41)); __pyx_t_41 = 0; __pyx_t_56 = __pyx_v_i; __pyx_t_12 = -1; if (__pyx_t_56 < 0) { __pyx_t_56 += __pyx_pybuffernd_oresult.diminfo[0].shape; if (unlikely(__pyx_t_56 < 0)) __pyx_t_12 = 0; } else if (unlikely(__pyx_t_56 >= __pyx_pybuffernd_oresult.diminfo[0].shape)) __pyx_t_12 = 0; if (unlikely(__pyx_t_12 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_12); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1154; __pyx_clineno = __LINE__; goto __pyx_L113_error;} } __pyx_t_51 = __Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_oresult.rcbuffer->pybuffer.buf, __pyx_t_56, __pyx_pybuffernd_oresult.diminfo[0].strides); __Pyx_GOTREF(*__pyx_t_51); __Pyx_INCREF(__pyx_t_8); __Pyx_DECREF(*__pyx_t_51); *__pyx_t_51 = __pyx_t_8; __Pyx_GIVEREF(*__pyx_t_51); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; /* "pandas/tslib.pyx":1155 * try: * oresult[i] = parse_datetime_string(val, dayfirst=dayfirst) * _pydatetime_to_dts(oresult[i], &dts) # <<<<<<<<<<<<<< * _check_dts_bounds(&dts) * except Exception: */ __pyx_t_57 = __pyx_v_i; __pyx_t_12 = -1; if (__pyx_t_57 < 0) { __pyx_t_57 += __pyx_pybuffernd_oresult.diminfo[0].shape; if (unlikely(__pyx_t_57 < 0)) __pyx_t_12 = 0; } else if (unlikely(__pyx_t_57 >= __pyx_pybuffernd_oresult.diminfo[0].shape)) __pyx_t_12 = 0; if (unlikely(__pyx_t_12 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_12); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1155; __pyx_clineno = __LINE__; goto __pyx_L113_error;} } __pyx_t_8 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_oresult.rcbuffer->pybuffer.buf, __pyx_t_57, __pyx_pybuffernd_oresult.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_8); __pyx_f_8datetime__pydatetime_to_dts(__pyx_t_8, (&__pyx_v_dts)); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; /* "pandas/tslib.pyx":1156 * oresult[i] = parse_datetime_string(val, dayfirst=dayfirst) * _pydatetime_to_dts(oresult[i], &dts) * _check_dts_bounds(&dts) # <<<<<<<<<<<<<< * except Exception: * if raise_: */ __pyx_t_8 = __pyx_f_6pandas_5tslib__check_dts_bounds((&__pyx_v_dts)); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1156; __pyx_clineno = __LINE__; goto __pyx_L113_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0; goto __pyx_L120_try_end; __pyx_L113_error:; __Pyx_XDECREF(__pyx_t_42); __pyx_t_42 = 0; __Pyx_XDECREF(__pyx_t_43); __pyx_t_43 = 0; __Pyx_XDECREF(__pyx_t_41); __pyx_t_41 = 0; __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; /* "pandas/tslib.pyx":1157 * _pydatetime_to_dts(oresult[i], &dts) * _check_dts_bounds(&dts) * except Exception: # <<<<<<<<<<<<<< * if raise_: * raise */ __pyx_t_12 = PyErr_ExceptionMatches(__pyx_builtin_Exception); if (__pyx_t_12) { __Pyx_AddTraceback("pandas.tslib.array_to_datetime", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_8, &__pyx_t_41, &__pyx_t_43) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1157; __pyx_clineno = __LINE__; goto __pyx_L115_except_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_GOTREF(__pyx_t_41); __Pyx_GOTREF(__pyx_t_43); /* "pandas/tslib.pyx":1158 * _check_dts_bounds(&dts) * except Exception: * if raise_: # <<<<<<<<<<<<<< * raise * return values */ __pyx_t_19 = __Pyx_PyObject_IsTrue(__pyx_v_raise_); if (unlikely(__pyx_t_19 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1158; __pyx_clineno = __LINE__; goto __pyx_L115_except_error;} if (__pyx_t_19) { /* "pandas/tslib.pyx":1159 * except Exception: * if raise_: * raise # <<<<<<<<<<<<<< * return values * # oresult[i] = val */ __Pyx_GIVEREF(__pyx_t_8); __Pyx_GIVEREF(__pyx_t_41); __Pyx_GIVEREF(__pyx_t_43); __Pyx_ErrRestore(__pyx_t_8, __pyx_t_41, __pyx_t_43); __pyx_t_8 = 0; __pyx_t_41 = 0; __pyx_t_43 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1159; __pyx_clineno = __LINE__; goto __pyx_L115_except_error;} goto __pyx_L123; } __pyx_L123:; /* "pandas/tslib.pyx":1160 * if raise_: * raise * return values # <<<<<<<<<<<<<< * # oresult[i] = val * else: */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_values)); __pyx_r = ((PyObject *)__pyx_v_values); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_41); __pyx_t_41 = 0; __Pyx_DECREF(__pyx_t_43); __pyx_t_43 = 0; goto __pyx_L116_except_return; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_41); __pyx_t_41 = 0; __Pyx_DECREF(__pyx_t_43); __pyx_t_43 = 0; goto __pyx_L114_exception_handled; } __pyx_L115_except_error:; __Pyx_XGIVEREF(__pyx_t_13); __Pyx_XGIVEREF(__pyx_t_14); __Pyx_XGIVEREF(__pyx_t_15); __Pyx_ExceptionReset(__pyx_t_13, __pyx_t_14, __pyx_t_15); goto __pyx_L5_except_error; __pyx_L116_except_return:; __Pyx_XGIVEREF(__pyx_t_13); __Pyx_XGIVEREF(__pyx_t_14); __Pyx_XGIVEREF(__pyx_t_15); __Pyx_ExceptionReset(__pyx_t_13, __pyx_t_14, __pyx_t_15); goto __pyx_L6_except_return; __pyx_L114_exception_handled:; __Pyx_XGIVEREF(__pyx_t_13); __Pyx_XGIVEREF(__pyx_t_14); __Pyx_XGIVEREF(__pyx_t_15); __Pyx_ExceptionReset(__pyx_t_13, __pyx_t_14, __pyx_t_15); __pyx_L120_try_end:; } goto __pyx_L111; } /*else*/ { /* "pandas/tslib.pyx":1163 * # oresult[i] = val * else: * if raise_: # <<<<<<<<<<<<<< * raise * return values */ __pyx_t_19 = __Pyx_PyObject_IsTrue(__pyx_v_raise_); if (unlikely(__pyx_t_19 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1163; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} if (__pyx_t_19) { /* "pandas/tslib.pyx":1164 * else: * if raise_: * raise # <<<<<<<<<<<<<< * return values * */ __Pyx_GIVEREF(__pyx_t_10); __Pyx_GIVEREF(__pyx_t_7); __Pyx_GIVEREF(__pyx_t_9); __Pyx_ErrRestore(__pyx_t_10, __pyx_t_7, __pyx_t_9); __pyx_t_10 = 0; __pyx_t_7 = 0; __pyx_t_9 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1164; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} goto __pyx_L124; } __pyx_L124:; /* "pandas/tslib.pyx":1165 * if raise_: * raise * return values # <<<<<<<<<<<<<< * * return oresult */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_values)); __pyx_r = ((PyObject *)__pyx_v_values); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; goto __pyx_L6_except_return; } __pyx_L111:; __pyx_L109_continue:; } /* "pandas/tslib.pyx":1167 * return values * * return oresult # <<<<<<<<<<<<<< * * def array_to_timedelta64(ndarray[object] values, coerce=False): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_oresult)); __pyx_r = ((PyObject *)__pyx_v_oresult); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; goto __pyx_L6_except_return; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; goto __pyx_L4_exception_handled; } __pyx_L5_except_error:; __Pyx_XGIVEREF(__pyx_t_4); __Pyx_XGIVEREF(__pyx_t_5); __Pyx_XGIVEREF(__pyx_t_6); __Pyx_ExceptionReset(__pyx_t_4, __pyx_t_5, __pyx_t_6); goto __pyx_L1_error; __pyx_L6_except_return:; __Pyx_XGIVEREF(__pyx_t_4); __Pyx_XGIVEREF(__pyx_t_5); __Pyx_XGIVEREF(__pyx_t_6); __Pyx_ExceptionReset(__pyx_t_4, __pyx_t_5, __pyx_t_6); goto __pyx_L0; __pyx_L4_exception_handled:; __Pyx_XGIVEREF(__pyx_t_4); __Pyx_XGIVEREF(__pyx_t_5); __Pyx_XGIVEREF(__pyx_t_6); __Pyx_ExceptionReset(__pyx_t_4, __pyx_t_5, __pyx_t_6); __pyx_L10_try_end:; } __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); __Pyx_XDECREF(__pyx_t_10); __Pyx_XDECREF(__pyx_t_41); __Pyx_XDECREF(__pyx_t_42); __Pyx_XDECREF(__pyx_t_43); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_iresult.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_oresult.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.tslib.array_to_datetime", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_iresult.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_oresult.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF(__pyx_v_val); __Pyx_XDECREF((PyObject *)__pyx_v_iresult); __Pyx_XDECREF((PyObject *)__pyx_v_oresult); __Pyx_XDECREF((PyObject *)__pyx_v__ts); __Pyx_XDECREF(__pyx_v_result); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5tslib_29array_to_timedelta64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6pandas_5tslib_28array_to_timedelta64[] = " convert an ndarray to an array of ints that are timedeltas\n force conversion if coerce = True,\n else will raise if cannot convert "; static PyMethodDef __pyx_mdef_6pandas_5tslib_29array_to_timedelta64 = {__Pyx_NAMESTR("array_to_timedelta64"), (PyCFunction)__pyx_pw_6pandas_5tslib_29array_to_timedelta64, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_5tslib_28array_to_timedelta64)}; static PyObject *__pyx_pw_6pandas_5tslib_29array_to_timedelta64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_values = 0; PyObject *__pyx_v_coerce = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("array_to_timedelta64 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__values,&__pyx_n_s__coerce,0}; PyObject* values[2] = {0,0}; values[1] = __pyx_k_67; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__values)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__coerce); if (value) { values[1] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "array_to_timedelta64") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1169; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_values = ((PyArrayObject *)values[0]); __pyx_v_coerce = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("array_to_timedelta64", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1169; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.tslib.array_to_timedelta64", __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_filename = __pyx_f[0]; __pyx_lineno = 1169; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5tslib_28array_to_timedelta64(__pyx_self, __pyx_v_values, __pyx_v_coerce); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/tslib.pyx":1169 * return oresult * * def array_to_timedelta64(ndarray[object] values, coerce=False): # <<<<<<<<<<<<<< * """ convert an ndarray to an array of ints that are timedeltas * force conversion if coerce = True, */ static PyObject *__pyx_pf_6pandas_5tslib_28array_to_timedelta64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyObject *__pyx_v_coerce) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_n; PyArrayObject *__pyx_v_iresult = 0; PyObject *__pyx_v_result = NULL; __Pyx_LocalBuf_ND __pyx_pybuffernd_iresult; __Pyx_Buffer __pyx_pybuffer_iresult; __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; PyArrayObject *__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; Py_ssize_t __pyx_t_11; Py_ssize_t __pyx_t_12; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("array_to_timedelta64", 0); __pyx_pybuffer_iresult.pybuffer.buf = NULL; __pyx_pybuffer_iresult.refcount = 0; __pyx_pybuffernd_iresult.data = NULL; __pyx_pybuffernd_iresult.rcbuffer = &__pyx_pybuffer_iresult; __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_filename = __pyx_f[0]; __pyx_lineno = 1169; __pyx_clineno = __LINE__; goto __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/tslib.pyx":1177 * ndarray[int64_t] iresult * * n = values.shape[0] # <<<<<<<<<<<<<< * result = np.empty(n, dtype='m8[ns]') * iresult = result.view('i8') */ __pyx_v_n = (__pyx_v_values->dimensions[0]); /* "pandas/tslib.pyx":1178 * * n = values.shape[0] * result = np.empty(n, dtype='m8[ns]') # <<<<<<<<<<<<<< * iresult = result.view('i8') * */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1178; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 1178; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 1178; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1178; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1178; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_1)); if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__dtype), ((PyObject *)__pyx_kp_s_68)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1178; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_4 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_3), ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1178; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_v_result = __pyx_t_4; __pyx_t_4 = 0; /* "pandas/tslib.pyx":1179 * n = values.shape[0] * result = np.empty(n, dtype='m8[ns]') * iresult = result.view('i8') # <<<<<<<<<<<<<< * * for i in range(n): */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_result, __pyx_n_s__view); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1179; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_1 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_k_tuple_69), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1179; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __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_filename = __pyx_f[0]; __pyx_lineno = 1179; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_5 = ((PyArrayObject *)__pyx_t_1); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_iresult.rcbuffer->pybuffer); __pyx_t_6 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_iresult.rcbuffer->pybuffer, (PyObject*)__pyx_t_5, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_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_iresult.rcbuffer->pybuffer, (PyObject*)__pyx_v_iresult, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_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_pybuffernd_iresult.diminfo[0].strides = __pyx_pybuffernd_iresult.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_iresult.diminfo[0].shape = __pyx_pybuffernd_iresult.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1179; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_5 = 0; __pyx_v_iresult = ((PyArrayObject *)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/tslib.pyx":1181 * iresult = result.view('i8') * * for i in range(n): # <<<<<<<<<<<<<< * result[i] = convert_to_timedelta64(values[i], 'ns', coerce) * return iresult */ __pyx_t_10 = __pyx_v_n; for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_10; __pyx_t_11+=1) { __pyx_v_i = __pyx_t_11; /* "pandas/tslib.pyx":1182 * * for i in range(n): * result[i] = convert_to_timedelta64(values[i], 'ns', coerce) # <<<<<<<<<<<<<< * return iresult * */ __pyx_t_12 = __pyx_v_i; __pyx_t_6 = -1; if (__pyx_t_12 < 0) { __pyx_t_12 += __pyx_pybuffernd_values.diminfo[0].shape; if (unlikely(__pyx_t_12 < 0)) __pyx_t_6 = 0; } else if (unlikely(__pyx_t_12 >= __pyx_pybuffernd_values.diminfo[0].shape)) __pyx_t_6 = 0; if (unlikely(__pyx_t_6 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_6); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1182; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_1 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_12, __pyx_pybuffernd_values.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_1); __pyx_t_4 = __pyx_f_6pandas_5tslib_convert_to_timedelta64(__pyx_t_1, ((PyObject *)__pyx_n_s__ns), __pyx_v_coerce); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1182; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__Pyx_SetItemInt(__pyx_v_result, __pyx_v_i, __pyx_t_4, sizeof(Py_ssize_t), PyInt_FromSsize_t, 0, 1, 1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1182; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } /* "pandas/tslib.pyx":1183 * for i in range(n): * result[i] = convert_to_timedelta64(values[i], 'ns', coerce) * return iresult # <<<<<<<<<<<<<< * * def convert_to_timedelta(object ts, object unit='ns', coerce=False): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_iresult)); __pyx_r = ((PyObject *)__pyx_v_iresult); goto __pyx_L0; __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_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_iresult.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.tslib.array_to_timedelta64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_iresult.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_iresult); __Pyx_XDECREF(__pyx_v_result); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5tslib_31convert_to_timedelta(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5tslib_31convert_to_timedelta = {__Pyx_NAMESTR("convert_to_timedelta"), (PyCFunction)__pyx_pw_6pandas_5tslib_31convert_to_timedelta, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5tslib_31convert_to_timedelta(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_ts = 0; PyObject *__pyx_v_unit = 0; PyObject *__pyx_v_coerce = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("convert_to_timedelta (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__ts,&__pyx_n_s__unit,&__pyx_n_s__coerce,0}; PyObject* values[3] = {0,0,0}; values[1] = ((PyObject *)__pyx_n_s__ns); values[2] = __pyx_k_70; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__ts)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__unit); if (value) { values[1] = value; kw_args--; } } case 2: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__coerce); if (value) { values[2] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "convert_to_timedelta") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1185; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_ts = values[0]; __pyx_v_unit = values[1]; __pyx_v_coerce = values[2]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("convert_to_timedelta", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1185; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.tslib.convert_to_timedelta", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pandas_5tslib_30convert_to_timedelta(__pyx_self, __pyx_v_ts, __pyx_v_unit, __pyx_v_coerce); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/tslib.pyx":1185 * return iresult * * def convert_to_timedelta(object ts, object unit='ns', coerce=False): # <<<<<<<<<<<<<< * return convert_to_timedelta64(ts, unit, coerce) * */ static PyObject *__pyx_pf_6pandas_5tslib_30convert_to_timedelta(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_ts, PyObject *__pyx_v_unit, PyObject *__pyx_v_coerce) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("convert_to_timedelta", 0); /* "pandas/tslib.pyx":1186 * * def convert_to_timedelta(object ts, object unit='ns', coerce=False): * return convert_to_timedelta64(ts, unit, coerce) # <<<<<<<<<<<<<< * * cdef convert_to_timedelta64(object ts, object unit, object coerce): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_6pandas_5tslib_convert_to_timedelta64(__pyx_v_ts, __pyx_v_unit, __pyx_v_coerce); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1186; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas.tslib.convert_to_timedelta", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/tslib.pyx":1188 * return convert_to_timedelta64(ts, unit, coerce) * * cdef convert_to_timedelta64(object ts, object unit, object coerce): # <<<<<<<<<<<<<< * """ * Convert an incoming object to a timedelta64 if possible */ static PyObject *__pyx_f_6pandas_5tslib_convert_to_timedelta64(PyObject *__pyx_v_ts, PyObject *__pyx_v_unit, PyObject *__pyx_v_coerce) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; int __pyx_t_5; PyObject *__pyx_t_6 = NULL; __pyx_t_5numpy_int64_t __pyx_t_7; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("convert_to_timedelta64", 0); __Pyx_INCREF(__pyx_v_ts); /* "pandas/tslib.pyx":1205 * # handle the numpy < 1.7 case * """ * if _checknull_with_nat(ts): # <<<<<<<<<<<<<< * ts = np.timedelta64(iNaT) * elif util.is_datetime64_object(ts): */ __pyx_t_1 = (__pyx_f_6pandas_5tslib__checknull_with_nat(__pyx_v_ts) != 0); if (__pyx_t_1) { /* "pandas/tslib.pyx":1206 * """ * if _checknull_with_nat(ts): * ts = np.timedelta64(iNaT) # <<<<<<<<<<<<<< * elif util.is_datetime64_object(ts): * # only accept a NaT here */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1206; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__timedelta64); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1206; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__iNaT); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1206; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1206; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1206; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __Pyx_DECREF_SET(__pyx_v_ts, __pyx_t_2); __pyx_t_2 = 0; goto __pyx_L3; } /* "pandas/tslib.pyx":1207 * if _checknull_with_nat(ts): * ts = np.timedelta64(iNaT) * elif util.is_datetime64_object(ts): # <<<<<<<<<<<<<< * # only accept a NaT here * if ts.astype('int64') == iNaT: */ __pyx_t_1 = (is_datetime64_object(__pyx_v_ts) != 0); if (__pyx_t_1) { /* "pandas/tslib.pyx":1209 * elif util.is_datetime64_object(ts): * # only accept a NaT here * if ts.astype('int64') == iNaT: # <<<<<<<<<<<<<< * ts = np.timedelta64(iNaT) * elif isinstance(ts, np.timedelta64): */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_ts, __pyx_n_s__astype); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1209; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_k_tuple_71), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1209; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__iNaT); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1209; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyObject_RichCompare(__pyx_t_4, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1209; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1209; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_1) { /* "pandas/tslib.pyx":1210 * # only accept a NaT here * if ts.astype('int64') == iNaT: * ts = np.timedelta64(iNaT) # <<<<<<<<<<<<<< * elif isinstance(ts, np.timedelta64): * ts = ts.astype("m8[{0}]".format(unit.lower())) */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1210; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s__timedelta64); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1210; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s__iNaT); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1210; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1210; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1210; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __Pyx_DECREF_SET(__pyx_v_ts, __pyx_t_3); __pyx_t_3 = 0; goto __pyx_L4; } __pyx_L4:; goto __pyx_L3; } /* "pandas/tslib.pyx":1211 * if ts.astype('int64') == iNaT: * ts = np.timedelta64(iNaT) * elif isinstance(ts, np.timedelta64): # <<<<<<<<<<<<<< * ts = ts.astype("m8[{0}]".format(unit.lower())) * elif is_integer_object(ts): */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1211; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s__timedelta64); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1211; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_1 = PyObject_IsInstance(__pyx_v_ts, __pyx_t_4); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1211; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_5 = (__pyx_t_1 != 0); if (__pyx_t_5) { /* "pandas/tslib.pyx":1212 * ts = np.timedelta64(iNaT) * elif isinstance(ts, np.timedelta64): * ts = ts.astype("m8[{0}]".format(unit.lower())) # <<<<<<<<<<<<<< * elif is_integer_object(ts): * if ts == iNaT: */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_ts, __pyx_n_s__astype); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1212; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_kp_s_72), __pyx_n_s__format); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1212; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_unit, __pyx_n_s__lower); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1212; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_6 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1212; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1212; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1212; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1212; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1212; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __Pyx_DECREF_SET(__pyx_v_ts, __pyx_t_6); __pyx_t_6 = 0; goto __pyx_L3; } /* "pandas/tslib.pyx":1213 * elif isinstance(ts, np.timedelta64): * ts = ts.astype("m8[{0}]".format(unit.lower())) * elif is_integer_object(ts): # <<<<<<<<<<<<<< * if ts == iNaT: * ts = np.timedelta64(iNaT) */ __pyx_t_5 = (is_integer_object(__pyx_v_ts) != 0); if (__pyx_t_5) { /* "pandas/tslib.pyx":1214 * ts = ts.astype("m8[{0}]".format(unit.lower())) * elif is_integer_object(ts): * if ts == iNaT: # <<<<<<<<<<<<<< * ts = np.timedelta64(iNaT) * else: */ __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s__iNaT); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1214; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_2 = PyObject_RichCompare(__pyx_v_ts, __pyx_t_6, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1214; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1214; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_5) { /* "pandas/tslib.pyx":1215 * elif is_integer_object(ts): * if ts == iNaT: * ts = np.timedelta64(iNaT) # <<<<<<<<<<<<<< * else: * if util.is_array(ts): */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1215; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__timedelta64); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1215; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__iNaT); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1215; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1215; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1215; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __Pyx_DECREF_SET(__pyx_v_ts, __pyx_t_2); __pyx_t_2 = 0; goto __pyx_L5; } /*else*/ { /* "pandas/tslib.pyx":1217 * ts = np.timedelta64(iNaT) * else: * if util.is_array(ts): # <<<<<<<<<<<<<< * ts = ts.astype('int64').item() * ts = cast_from_unit(ts, unit) */ __pyx_t_2 = __pyx_f_4util_is_array(__pyx_v_ts); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1217; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1217; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_5) { /* "pandas/tslib.pyx":1218 * else: * if util.is_array(ts): * ts = ts.astype('int64').item() # <<<<<<<<<<<<<< * ts = cast_from_unit(ts, unit) * if _np_version_under1p7: */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_ts, __pyx_n_s__astype); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1218; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_k_tuple_73), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1218; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s__item); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1218; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1218; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF_SET(__pyx_v_ts, __pyx_t_4); __pyx_t_4 = 0; goto __pyx_L6; } __pyx_L6:; /* "pandas/tslib.pyx":1219 * if util.is_array(ts): * ts = ts.astype('int64').item() * ts = cast_from_unit(ts, unit) # <<<<<<<<<<<<<< * if _np_version_under1p7: * ts = timedelta(microseconds=ts/1000.0) */ __pyx_t_7 = __pyx_f_6pandas_5tslib_cast_from_unit(__pyx_v_ts, __pyx_v_unit, 0); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1219; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_4 = __Pyx_PyInt_to_py_npy_int64(__pyx_t_7); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1219; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF_SET(__pyx_v_ts, __pyx_t_4); __pyx_t_4 = 0; /* "pandas/tslib.pyx":1220 * ts = ts.astype('int64').item() * ts = cast_from_unit(ts, unit) * if _np_version_under1p7: # <<<<<<<<<<<<<< * ts = timedelta(microseconds=ts/1000.0) * else: */ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_74); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1220; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1220; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_5) { /* "pandas/tslib.pyx":1221 * ts = cast_from_unit(ts, unit) * if _np_version_under1p7: * ts = timedelta(microseconds=ts/1000.0) # <<<<<<<<<<<<<< * else: * ts = np.timedelta64(ts) */ __pyx_t_4 = PyDict_New(); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1221; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_4)); __pyx_t_2 = PyFloat_FromDouble(1000.0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1221; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_6 = __Pyx_PyNumber_Divide(__pyx_v_ts, __pyx_t_2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1221; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (PyDict_SetItem(__pyx_t_4, ((PyObject *)__pyx_n_s__microseconds), __pyx_t_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1221; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_8datetime_timedelta)), ((PyObject *)__pyx_empty_tuple), ((PyObject *)__pyx_t_4)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1221; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __Pyx_DECREF_SET(__pyx_v_ts, __pyx_t_6); __pyx_t_6 = 0; goto __pyx_L7; } /*else*/ { /* "pandas/tslib.pyx":1223 * ts = timedelta(microseconds=ts/1000.0) * else: * ts = np.timedelta64(ts) # <<<<<<<<<<<<<< * * if _np_version_under1p7: */ __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1223; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s__timedelta64); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1223; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1223; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(__pyx_v_ts); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_ts); __Pyx_GIVEREF(__pyx_v_ts); __pyx_t_2 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1223; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0; __Pyx_DECREF_SET(__pyx_v_ts, __pyx_t_2); __pyx_t_2 = 0; } __pyx_L7:; } __pyx_L5:; goto __pyx_L3; } __pyx_L3:; /* "pandas/tslib.pyx":1225 * ts = np.timedelta64(ts) * * if _np_version_under1p7: # <<<<<<<<<<<<<< * if not isinstance(ts, timedelta): * if coerce: */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_74); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1225; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1225; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_5) { /* "pandas/tslib.pyx":1226 * * if _np_version_under1p7: * if not isinstance(ts, timedelta): # <<<<<<<<<<<<<< * if coerce: * return np.timedelta64(iNaT) */ __pyx_t_5 = __Pyx_TypeCheck(__pyx_v_ts, ((PyObject*)__pyx_ptype_8datetime_timedelta)); __pyx_t_1 = ((!(__pyx_t_5 != 0)) != 0); if (__pyx_t_1) { /* "pandas/tslib.pyx":1227 * if _np_version_under1p7: * if not isinstance(ts, timedelta): * if coerce: # <<<<<<<<<<<<<< * return np.timedelta64(iNaT) * raise ValueError("Invalid type for timedelta scalar: %s" % type(ts)) */ __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_coerce); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1227; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__pyx_t_1) { /* "pandas/tslib.pyx":1228 * if not isinstance(ts, timedelta): * if coerce: * return np.timedelta64(iNaT) # <<<<<<<<<<<<<< * raise ValueError("Invalid type for timedelta scalar: %s" % type(ts)) * if not PY2: */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1228; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__timedelta64); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1228; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__iNaT); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1228; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1228; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1228; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; goto __pyx_L10; } __pyx_L10:; /* "pandas/tslib.pyx":1229 * if coerce: * return np.timedelta64(iNaT) * raise ValueError("Invalid type for timedelta scalar: %s" % type(ts)) # <<<<<<<<<<<<<< * if not PY2: * # convert to microseconds in timedelta64 */ __pyx_t_2 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_75), ((PyObject *)Py_TYPE(__pyx_v_ts))); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1229; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_2)); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1229; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_t_2)); __Pyx_GIVEREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1229; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1229; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L9; } __pyx_L9:; /* "pandas/tslib.pyx":1230 * return np.timedelta64(iNaT) * raise ValueError("Invalid type for timedelta scalar: %s" % type(ts)) * if not PY2: # <<<<<<<<<<<<<< * # convert to microseconds in timedelta64 * ts = np.timedelta64(int(ts.total_seconds()*1e9 + ts.microseconds*1000)) */ __pyx_t_1 = ((!(__pyx_v_6pandas_5tslib_PY2 != 0)) != 0); if (__pyx_t_1) { /* "pandas/tslib.pyx":1232 * if not PY2: * # convert to microseconds in timedelta64 * ts = np.timedelta64(int(ts.total_seconds()*1e9 + ts.microseconds*1000)) # <<<<<<<<<<<<<< * else: * return ts */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1232; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__timedelta64); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1232; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_ts, __pyx_n_s__total_seconds); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1232; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_6 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1232; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyFloat_FromDouble(1e9); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1232; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyNumber_Multiply(__pyx_t_6, __pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1232; __pyx_clineno = __LINE__; goto __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_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_ts, __pyx_n_s__microseconds); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1232; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_6 = PyNumber_Multiply(__pyx_t_2, __pyx_int_1000); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1232; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyNumber_Add(__pyx_t_3, __pyx_t_6); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1232; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1232; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)(&PyInt_Type))), ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1232; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0; __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1232; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1232; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0; __Pyx_DECREF_SET(__pyx_v_ts, __pyx_t_2); __pyx_t_2 = 0; goto __pyx_L11; } /*else*/ { /* "pandas/tslib.pyx":1234 * ts = np.timedelta64(int(ts.total_seconds()*1e9 + ts.microseconds*1000)) * else: * return ts # <<<<<<<<<<<<<< * * if isinstance(ts, timedelta): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_ts); __pyx_r = __pyx_v_ts; goto __pyx_L0; } __pyx_L11:; goto __pyx_L8; } __pyx_L8:; /* "pandas/tslib.pyx":1236 * return ts * * if isinstance(ts, timedelta): # <<<<<<<<<<<<<< * ts = np.timedelta64(ts) * elif not isinstance(ts, np.timedelta64): */ __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_ts, ((PyObject*)__pyx_ptype_8datetime_timedelta)); __pyx_t_5 = (__pyx_t_1 != 0); if (__pyx_t_5) { /* "pandas/tslib.pyx":1237 * * if isinstance(ts, timedelta): * ts = np.timedelta64(ts) # <<<<<<<<<<<<<< * elif not isinstance(ts, np.timedelta64): * if coerce: */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1237; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__timedelta64); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1237; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1237; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_ts); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_ts); __Pyx_GIVEREF(__pyx_v_ts); __pyx_t_4 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1237; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __Pyx_DECREF_SET(__pyx_v_ts, __pyx_t_4); __pyx_t_4 = 0; goto __pyx_L12; } /* "pandas/tslib.pyx":1238 * if isinstance(ts, timedelta): * ts = np.timedelta64(ts) * elif not isinstance(ts, np.timedelta64): # <<<<<<<<<<<<<< * if coerce: * return np.timedelta64(iNaT) */ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1238; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s__timedelta64); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1238; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_5 = PyObject_IsInstance(__pyx_v_ts, __pyx_t_2); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1238; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_1 = ((!(__pyx_t_5 != 0)) != 0); if (__pyx_t_1) { /* "pandas/tslib.pyx":1239 * ts = np.timedelta64(ts) * elif not isinstance(ts, np.timedelta64): * if coerce: # <<<<<<<<<<<<<< * return np.timedelta64(iNaT) * raise ValueError("Invalid type for timedelta scalar: %s" % type(ts)) */ __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_coerce); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1239; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__pyx_t_1) { /* "pandas/tslib.pyx":1240 * elif not isinstance(ts, np.timedelta64): * if coerce: * return np.timedelta64(iNaT) # <<<<<<<<<<<<<< * raise ValueError("Invalid type for timedelta scalar: %s" % type(ts)) * return ts.astype('timedelta64[ns]') */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1240; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__timedelta64); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1240; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__iNaT); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1240; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1240; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1240; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; goto __pyx_L13; } __pyx_L13:; /* "pandas/tslib.pyx":1241 * if coerce: * return np.timedelta64(iNaT) * raise ValueError("Invalid type for timedelta scalar: %s" % type(ts)) # <<<<<<<<<<<<<< * return ts.astype('timedelta64[ns]') * */ __pyx_t_2 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_75), ((PyObject *)Py_TYPE(__pyx_v_ts))); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1241; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_2)); __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1241; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_t_2)); __Pyx_GIVEREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1241; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0; __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1241; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L12; } __pyx_L12:; /* "pandas/tslib.pyx":1242 * return np.timedelta64(iNaT) * raise ValueError("Invalid type for timedelta scalar: %s" % type(ts)) * return ts.astype('timedelta64[ns]') # <<<<<<<<<<<<<< * * def repr_timedelta64(object value, format=None): */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_ts, __pyx_n_s__astype); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1242; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_6 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_k_tuple_76), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1242; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_6; __pyx_t_6 = 0; goto __pyx_L0; __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_XDECREF(__pyx_t_6); __Pyx_AddTraceback("pandas.tslib.convert_to_timedelta64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_ts); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5tslib_33repr_timedelta64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6pandas_5tslib_32repr_timedelta64[] = "\n provide repr for timedelta64\n\n Parameters\n ----------\n value : timedelta64\n format : None|\"short\"|\"long\"\n\n Returns\n -------\n converted : Timestamp\n\n "; static PyMethodDef __pyx_mdef_6pandas_5tslib_33repr_timedelta64 = {__Pyx_NAMESTR("repr_timedelta64"), (PyCFunction)__pyx_pw_6pandas_5tslib_33repr_timedelta64, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_5tslib_32repr_timedelta64)}; static PyObject *__pyx_pw_6pandas_5tslib_33repr_timedelta64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_value = 0; PyObject *__pyx_v_format = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("repr_timedelta64 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__value,&__pyx_n_s__format,0}; PyObject* values[2] = {0,0}; /* "pandas/tslib.pyx":1244 * return ts.astype('timedelta64[ns]') * * def repr_timedelta64(object value, format=None): # <<<<<<<<<<<<<< * """ * provide repr for timedelta64 */ values[1] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__value)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__format); if (value) { values[1] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "repr_timedelta64") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1244; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_value = values[0]; __pyx_v_format = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("repr_timedelta64", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1244; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.tslib.repr_timedelta64", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pandas_5tslib_32repr_timedelta64(__pyx_self, __pyx_v_value, __pyx_v_format); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5tslib_32repr_timedelta64(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_value, PyObject *__pyx_v_format) { PyObject *__pyx_v_ivalue = 0; PyObject *__pyx_v_frac = NULL; PyObject *__pyx_v_sign = NULL; PyObject *__pyx_v_days = NULL; PyObject *__pyx_v_hours = NULL; PyObject *__pyx_v_minutes = NULL; PyObject *__pyx_v_seconds = NULL; PyObject *__pyx_v_seconds_pretty = NULL; PyObject *__pyx_v_sp = NULL; PyObject *__pyx_v_sign_pretty = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; double __pyx_t_3; PyObject *__pyx_t_4 = NULL; int __pyx_t_5; int __pyx_t_6; int __pyx_t_7; int __pyx_t_8; int __pyx_t_9; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("repr_timedelta64", 0); /* "pandas/tslib.pyx":1260 * cdef object ivalue * * ivalue = value.view('i8') # <<<<<<<<<<<<<< * * # put frac in seconds */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_value, __pyx_n_s__view); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1260; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_k_tuple_77), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1260; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_ivalue = __pyx_t_2; __pyx_t_2 = 0; /* "pandas/tslib.pyx":1263 * * # put frac in seconds * frac = float(ivalue)/1e9 # <<<<<<<<<<<<<< * sign = np.sign(frac) * frac = np.abs(frac) */ __pyx_t_3 = __Pyx_PyObject_AsDouble(__pyx_v_ivalue); if (unlikely(__pyx_t_3 == ((double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1263; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_2 = PyFloat_FromDouble((__pyx_t_3 / 1e9)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1263; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_v_frac = __pyx_t_2; __pyx_t_2 = 0; /* "pandas/tslib.pyx":1264 * # put frac in seconds * frac = float(ivalue)/1e9 * sign = np.sign(frac) # <<<<<<<<<<<<<< * frac = np.abs(frac) * */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1264; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__sign); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1264; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1264; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_frac); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_frac); __Pyx_GIVEREF(__pyx_v_frac); __pyx_t_4 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1264; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __pyx_v_sign = __pyx_t_4; __pyx_t_4 = 0; /* "pandas/tslib.pyx":1265 * frac = float(ivalue)/1e9 * sign = np.sign(frac) * frac = np.abs(frac) # <<<<<<<<<<<<<< * * if frac >= 86400: */ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1265; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s__abs); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1265; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1265; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_v_frac); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_frac); __Pyx_GIVEREF(__pyx_v_frac); __pyx_t_1 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1265; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __Pyx_DECREF_SET(__pyx_v_frac, __pyx_t_1); __pyx_t_1 = 0; /* "pandas/tslib.pyx":1267 * frac = np.abs(frac) * * if frac >= 86400: # <<<<<<<<<<<<<< * days = int(frac / 86400) * frac -= days * 86400 */ __pyx_t_1 = PyObject_RichCompare(__pyx_v_frac, __pyx_int_86400, Py_GE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1267; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1267; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_5) { /* "pandas/tslib.pyx":1268 * * if frac >= 86400: * days = int(frac / 86400) # <<<<<<<<<<<<<< * frac -= days * 86400 * else: */ __pyx_t_1 = __Pyx_PyNumber_Divide(__pyx_v_frac, __pyx_int_86400); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1268; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1268; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)(&PyInt_Type))), ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1268; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __pyx_v_days = __pyx_t_1; __pyx_t_1 = 0; /* "pandas/tslib.pyx":1269 * if frac >= 86400: * days = int(frac / 86400) * frac -= days * 86400 # <<<<<<<<<<<<<< * else: * days = 0 */ __pyx_t_1 = PyNumber_Multiply(__pyx_v_days, __pyx_int_86400); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1269; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = PyNumber_InPlaceSubtract(__pyx_v_frac, __pyx_t_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1269; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF_SET(__pyx_v_frac, __pyx_t_4); __pyx_t_4 = 0; goto __pyx_L3; } /*else*/ { /* "pandas/tslib.pyx":1271 * frac -= days * 86400 * else: * days = 0 # <<<<<<<<<<<<<< * * if frac >= 3600: */ __Pyx_INCREF(__pyx_int_0); __pyx_v_days = __pyx_int_0; } __pyx_L3:; /* "pandas/tslib.pyx":1273 * days = 0 * * if frac >= 3600: # <<<<<<<<<<<<<< * hours = int(frac / 3600) * frac -= hours * 3600 */ __pyx_t_4 = PyObject_RichCompare(__pyx_v_frac, __pyx_int_3600, Py_GE); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1273; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1273; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_5) { /* "pandas/tslib.pyx":1274 * * if frac >= 3600: * hours = int(frac / 3600) # <<<<<<<<<<<<<< * frac -= hours * 3600 * else: */ __pyx_t_4 = __Pyx_PyNumber_Divide(__pyx_v_frac, __pyx_int_3600); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1274; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1274; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyObject_Call(((PyObject *)((PyObject*)(&PyInt_Type))), ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1274; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_v_hours = __pyx_t_4; __pyx_t_4 = 0; /* "pandas/tslib.pyx":1275 * if frac >= 3600: * hours = int(frac / 3600) * frac -= hours * 3600 # <<<<<<<<<<<<<< * else: * hours = 0 */ __pyx_t_4 = PyNumber_Multiply(__pyx_v_hours, __pyx_int_3600); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1275; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_1 = PyNumber_InPlaceSubtract(__pyx_v_frac, __pyx_t_4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1275; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF_SET(__pyx_v_frac, __pyx_t_1); __pyx_t_1 = 0; goto __pyx_L4; } /*else*/ { /* "pandas/tslib.pyx":1277 * frac -= hours * 3600 * else: * hours = 0 # <<<<<<<<<<<<<< * * if frac >= 60: */ __Pyx_INCREF(__pyx_int_0); __pyx_v_hours = __pyx_int_0; } __pyx_L4:; /* "pandas/tslib.pyx":1279 * hours = 0 * * if frac >= 60: # <<<<<<<<<<<<<< * minutes = int(frac / 60) * frac -= minutes * 60 */ __pyx_t_1 = PyObject_RichCompare(__pyx_v_frac, __pyx_int_60, Py_GE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1279; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1279; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_5) { /* "pandas/tslib.pyx":1280 * * if frac >= 60: * minutes = int(frac / 60) # <<<<<<<<<<<<<< * frac -= minutes * 60 * else: */ __pyx_t_1 = __Pyx_PyNumber_Divide(__pyx_v_frac, __pyx_int_60); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1280; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1280; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)(&PyInt_Type))), ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1280; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __pyx_v_minutes = __pyx_t_1; __pyx_t_1 = 0; /* "pandas/tslib.pyx":1281 * if frac >= 60: * minutes = int(frac / 60) * frac -= minutes * 60 # <<<<<<<<<<<<<< * else: * minutes = 0 */ __pyx_t_1 = PyNumber_Multiply(__pyx_v_minutes, __pyx_int_60); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1281; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = PyNumber_InPlaceSubtract(__pyx_v_frac, __pyx_t_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1281; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF_SET(__pyx_v_frac, __pyx_t_4); __pyx_t_4 = 0; goto __pyx_L5; } /*else*/ { /* "pandas/tslib.pyx":1283 * frac -= minutes * 60 * else: * minutes = 0 # <<<<<<<<<<<<<< * * if frac >= 1: */ __Pyx_INCREF(__pyx_int_0); __pyx_v_minutes = __pyx_int_0; } __pyx_L5:; /* "pandas/tslib.pyx":1285 * minutes = 0 * * if frac >= 1: # <<<<<<<<<<<<<< * seconds = int(frac) * frac -= seconds */ __pyx_t_4 = PyObject_RichCompare(__pyx_v_frac, __pyx_int_1, Py_GE); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1285; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1285; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_5) { /* "pandas/tslib.pyx":1286 * * if frac >= 1: * seconds = int(frac) # <<<<<<<<<<<<<< * frac -= seconds * else: */ __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1286; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_v_frac); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_frac); __Pyx_GIVEREF(__pyx_v_frac); __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)(&PyInt_Type))), ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1286; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __pyx_v_seconds = __pyx_t_1; __pyx_t_1 = 0; /* "pandas/tslib.pyx":1287 * if frac >= 1: * seconds = int(frac) * frac -= seconds # <<<<<<<<<<<<<< * else: * seconds = 0 */ __pyx_t_1 = PyNumber_InPlaceSubtract(__pyx_v_frac, __pyx_v_seconds); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1287; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF_SET(__pyx_v_frac, __pyx_t_1); __pyx_t_1 = 0; goto __pyx_L6; } /*else*/ { /* "pandas/tslib.pyx":1289 * frac -= seconds * else: * seconds = 0 # <<<<<<<<<<<<<< * * if frac == int(frac): */ __Pyx_INCREF(__pyx_int_0); __pyx_v_seconds = __pyx_int_0; } __pyx_L6:; /* "pandas/tslib.pyx":1291 * seconds = 0 * * if frac == int(frac): # <<<<<<<<<<<<<< * seconds_pretty = "%02d" % seconds * else: */ __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1291; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_frac); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_frac); __Pyx_GIVEREF(__pyx_v_frac); __pyx_t_4 = PyObject_Call(((PyObject *)((PyObject*)(&PyInt_Type))), ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1291; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_t_1 = PyObject_RichCompare(__pyx_v_frac, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1291; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1291; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_5) { /* "pandas/tslib.pyx":1292 * * if frac == int(frac): * seconds_pretty = "%02d" % seconds # <<<<<<<<<<<<<< * else: * sp = abs(round(1e6*frac)) */ __pyx_t_1 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_78), __pyx_v_seconds); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1292; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_v_seconds_pretty = ((PyObject *)__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L7; } /*else*/ { /* "pandas/tslib.pyx":1294 * seconds_pretty = "%02d" % seconds * else: * sp = abs(round(1e6*frac)) # <<<<<<<<<<<<<< * seconds_pretty = "%02d.%06d" % (seconds, sp) * */ __pyx_t_1 = PyFloat_FromDouble(1e6); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1294; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = PyNumber_Multiply(__pyx_t_1, __pyx_v_frac); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1294; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1294; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyObject_Call(__pyx_builtin_round, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1294; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_t_1 = PyNumber_Absolute(__pyx_t_4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1294; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_sp = __pyx_t_1; __pyx_t_1 = 0; /* "pandas/tslib.pyx":1295 * else: * sp = abs(round(1e6*frac)) * seconds_pretty = "%02d.%06d" % (seconds, sp) # <<<<<<<<<<<<<< * * if sign < 0: */ __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1295; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_seconds); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_seconds); __Pyx_GIVEREF(__pyx_v_seconds); __Pyx_INCREF(__pyx_v_sp); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_sp); __Pyx_GIVEREF(__pyx_v_sp); __pyx_t_4 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_79), ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1295; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_4)); __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_v_seconds_pretty = ((PyObject *)__pyx_t_4); __pyx_t_4 = 0; } __pyx_L7:; /* "pandas/tslib.pyx":1297 * seconds_pretty = "%02d.%06d" % (seconds, sp) * * if sign < 0: # <<<<<<<<<<<<<< * sign_pretty = "-" * else: */ __pyx_t_4 = PyObject_RichCompare(__pyx_v_sign, __pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1297; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1297; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_5) { /* "pandas/tslib.pyx":1298 * * if sign < 0: * sign_pretty = "-" # <<<<<<<<<<<<<< * else: * sign_pretty = "" */ __Pyx_INCREF(((PyObject *)__pyx_kp_s_80)); __pyx_v_sign_pretty = ((PyObject *)__pyx_kp_s_80); goto __pyx_L8; } /*else*/ { /* "pandas/tslib.pyx":1300 * sign_pretty = "-" * else: * sign_pretty = "" # <<<<<<<<<<<<<< * * if days or format == 'long': */ __Pyx_INCREF(((PyObject *)__pyx_kp_s_27)); __pyx_v_sign_pretty = ((PyObject *)__pyx_kp_s_27); } __pyx_L8:; /* "pandas/tslib.pyx":1302 * sign_pretty = "" * * if days or format == 'long': # <<<<<<<<<<<<<< * if (hours or minutes or seconds or frac) or format != 'short': * return "%s%d days, %02d:%02d:%s" % (sign_pretty, days, hours, minutes, */ __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_days); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1302; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (!__pyx_t_5) { __pyx_t_4 = PyObject_RichCompare(__pyx_v_format, ((PyObject *)__pyx_n_s__long), Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1302; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1302; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_7 = __pyx_t_6; } else { __pyx_t_7 = __pyx_t_5; } if (__pyx_t_7) { /* "pandas/tslib.pyx":1303 * * if days or format == 'long': * if (hours or minutes or seconds or frac) or format != 'short': # <<<<<<<<<<<<<< * return "%s%d days, %02d:%02d:%s" % (sign_pretty, days, hours, minutes, * seconds_pretty) */ __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_v_hours); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1303; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (!__pyx_t_7) { __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_minutes); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1303; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (!__pyx_t_5) { __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_seconds); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1303; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (!__pyx_t_6) { __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_v_frac); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1303; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_9 = __pyx_t_8; } else { __pyx_t_9 = __pyx_t_6; } __pyx_t_6 = __pyx_t_9; } else { __pyx_t_6 = __pyx_t_5; } __pyx_t_5 = __pyx_t_6; } else { __pyx_t_5 = __pyx_t_7; } if (!__pyx_t_5) { __pyx_t_4 = PyObject_RichCompare(__pyx_v_format, ((PyObject *)__pyx_n_s__short), Py_NE); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1303; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1303; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_6 = __pyx_t_7; } else { __pyx_t_6 = __pyx_t_5; } if (__pyx_t_6) { /* "pandas/tslib.pyx":1304 * if days or format == 'long': * if (hours or minutes or seconds or frac) or format != 'short': * return "%s%d days, %02d:%02d:%s" % (sign_pretty, days, hours, minutes, # <<<<<<<<<<<<<< * seconds_pretty) * else: */ __Pyx_XDECREF(__pyx_r); /* "pandas/tslib.pyx":1305 * if (hours or minutes or seconds or frac) or format != 'short': * return "%s%d days, %02d:%02d:%s" % (sign_pretty, days, hours, minutes, * seconds_pretty) # <<<<<<<<<<<<<< * else: * return "%s%d days" % (sign_pretty, days) */ __pyx_t_4 = PyTuple_New(5); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1304; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_v_sign_pretty); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_sign_pretty); __Pyx_GIVEREF(__pyx_v_sign_pretty); __Pyx_INCREF(__pyx_v_days); PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_days); __Pyx_GIVEREF(__pyx_v_days); __Pyx_INCREF(__pyx_v_hours); PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_v_hours); __Pyx_GIVEREF(__pyx_v_hours); __Pyx_INCREF(__pyx_v_minutes); PyTuple_SET_ITEM(__pyx_t_4, 3, __pyx_v_minutes); __Pyx_GIVEREF(__pyx_v_minutes); __Pyx_INCREF(__pyx_v_seconds_pretty); PyTuple_SET_ITEM(__pyx_t_4, 4, __pyx_v_seconds_pretty); __Pyx_GIVEREF(__pyx_v_seconds_pretty); __pyx_t_1 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_81), ((PyObject *)__pyx_t_4)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1304; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __pyx_r = ((PyObject *)__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; goto __pyx_L10; } /*else*/ { /* "pandas/tslib.pyx":1307 * seconds_pretty) * else: * return "%s%d days" % (sign_pretty, days) # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1307; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_sign_pretty); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_sign_pretty); __Pyx_GIVEREF(__pyx_v_sign_pretty); __Pyx_INCREF(__pyx_v_days); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_days); __Pyx_GIVEREF(__pyx_v_days); __pyx_t_4 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_82), ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1307; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_4)); __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_r = ((PyObject *)__pyx_t_4); __pyx_t_4 = 0; goto __pyx_L0; } __pyx_L10:; goto __pyx_L9; } __pyx_L9:; /* "pandas/tslib.pyx":1310 * * * return "%s%02d:%02d:%s" % (sign_pretty, hours, minutes, seconds_pretty) # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_4 = PyTuple_New(4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1310; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_v_sign_pretty); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_sign_pretty); __Pyx_GIVEREF(__pyx_v_sign_pretty); __Pyx_INCREF(__pyx_v_hours); PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_hours); __Pyx_GIVEREF(__pyx_v_hours); __Pyx_INCREF(__pyx_v_minutes); PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_v_minutes); __Pyx_GIVEREF(__pyx_v_minutes); __Pyx_INCREF(__pyx_v_seconds_pretty); PyTuple_SET_ITEM(__pyx_t_4, 3, __pyx_v_seconds_pretty); __Pyx_GIVEREF(__pyx_v_seconds_pretty); __pyx_t_1 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_83), ((PyObject *)__pyx_t_4)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1310; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __pyx_r = ((PyObject *)__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("pandas.tslib.repr_timedelta64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_ivalue); __Pyx_XDECREF(__pyx_v_frac); __Pyx_XDECREF(__pyx_v_sign); __Pyx_XDECREF(__pyx_v_days); __Pyx_XDECREF(__pyx_v_hours); __Pyx_XDECREF(__pyx_v_minutes); __Pyx_XDECREF(__pyx_v_seconds); __Pyx_XDECREF(__pyx_v_seconds_pretty); __Pyx_XDECREF(__pyx_v_sp); __Pyx_XDECREF(__pyx_v_sign_pretty); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5tslib_35array_strptime(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5tslib_35array_strptime = {__Pyx_NAMESTR("array_strptime"), (PyCFunction)__pyx_pw_6pandas_5tslib_35array_strptime, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5tslib_35array_strptime(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_values = 0; PyObject *__pyx_v_fmt = 0; PyObject *__pyx_v_coerce = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("array_strptime (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__values,&__pyx_n_s__fmt,&__pyx_n_s__coerce,0}; PyObject* values[3] = {0,0,0}; values[2] = __pyx_k_84; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__values)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__fmt)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("array_strptime", 0, 2, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1313; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__coerce); if (value) { values[2] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "array_strptime") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1313; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_values = ((PyArrayObject *)values[0]); __pyx_v_fmt = values[1]; __pyx_v_coerce = values[2]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("array_strptime", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1313; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.tslib.array_strptime", __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_filename = __pyx_f[0]; __pyx_lineno = 1313; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5tslib_34array_strptime(__pyx_self, __pyx_v_values, __pyx_v_fmt, __pyx_v_coerce); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/tslib.pyx":1313 * * * def array_strptime(ndarray[object] values, object fmt, coerce=False): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = len(values) */ static PyObject *__pyx_pf_6pandas_5tslib_34array_strptime(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyObject *__pyx_v_fmt, PyObject *__pyx_v_coerce) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_n; pandas_datetimestruct __pyx_v_dts; PyArrayObject *__pyx_v_iresult = 0; int __pyx_v_year; int __pyx_v_month; int __pyx_v_day; int __pyx_v_minute; int __pyx_v_hour; int __pyx_v_second; int __pyx_v_fraction; int __pyx_v_weekday; int __pyx_v_julian; PyObject *__pyx_v_val = 0; PyObject *__pyx_v_locale_time = NULL; PyObject *__pyx_v_format_regex = NULL; PyObject *__pyx_v_err = NULL; PyObject *__pyx_v_bad_directive = NULL; PyObject *__pyx_v_result = NULL; PyObject *__pyx_v__parse_code_table = 0; int __pyx_v_parse_code; PyObject *__pyx_v_found = NULL; CYTHON_UNUSED PyObject *__pyx_v_tz = NULL; PyObject *__pyx_v_week_of_year = NULL; long __pyx_v_week_of_year_start; PyObject *__pyx_v_found_dict = NULL; PyObject *__pyx_v_group_key = NULL; PyObject *__pyx_v_ampm = NULL; PyObject *__pyx_v_s = NULL; PyObject *__pyx_v_found_zone = NULL; PyObject *__pyx_v_value = NULL; PyObject *__pyx_v_tz_values = NULL; int __pyx_v_week_starts_Mon; PyObject *__pyx_v_datetime_result = NULL; __Pyx_LocalBuf_ND __pyx_pybuffernd_iresult; __Pyx_Buffer __pyx_pybuffer_iresult; __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; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; int __pyx_t_9; int __pyx_t_10; PyObject *__pyx_t_11 = NULL; PyObject *__pyx_t_12 = NULL; PyObject *__pyx_t_13 = NULL; int __pyx_t_14; PyObject *__pyx_t_15 = NULL; PyObject *__pyx_t_16 = NULL; PyArrayObject *__pyx_t_17 = NULL; Py_ssize_t __pyx_t_18; Py_ssize_t __pyx_t_19; __pyx_t_5numpy_int64_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; int __pyx_t_29; int __pyx_t_30; Py_ssize_t __pyx_t_31; PyObject *(*__pyx_t_32)(PyObject *); PyObject *__pyx_t_33 = NULL; int __pyx_t_34; int __pyx_t_35; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("array_strptime", 0); __pyx_pybuffer_iresult.pybuffer.buf = NULL; __pyx_pybuffer_iresult.refcount = 0; __pyx_pybuffernd_iresult.data = NULL; __pyx_pybuffernd_iresult.rcbuffer = &__pyx_pybuffer_iresult; __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_filename = __pyx_f[0]; __pyx_lineno = 1313; __pyx_clineno = __LINE__; goto __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/tslib.pyx":1315 * def array_strptime(ndarray[object] values, object fmt, coerce=False): * cdef: * Py_ssize_t i, n = len(values) # <<<<<<<<<<<<<< * pandas_datetimestruct dts * ndarray[int64_t] iresult */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1315; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/tslib.pyx":1322 * * global _TimeRE_cache, _regex_cache * with _cache_lock: # <<<<<<<<<<<<<< * if _getlang() != _TimeRE_cache.locale_time.lang: * _TimeRE_cache = TimeRE() */ /*with:*/ { __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s___cache_lock); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1322; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s____exit__); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1322; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s____enter__); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1322; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1322; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /*try:*/ { { __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8); __Pyx_XGOTREF(__pyx_t_6); __Pyx_XGOTREF(__pyx_t_7); __Pyx_XGOTREF(__pyx_t_8); /*try:*/ { /* "pandas/tslib.pyx":1323 * global _TimeRE_cache, _regex_cache * with _cache_lock: * if _getlang() != _TimeRE_cache.locale_time.lang: # <<<<<<<<<<<<<< * _TimeRE_cache = TimeRE() * _regex_cache.clear() */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s___getlang); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1323; __pyx_clineno = __LINE__; goto __pyx_L7_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1323; __pyx_clineno = __LINE__; goto __pyx_L7_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s___TimeRE_cache); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1323; __pyx_clineno = __LINE__; goto __pyx_L7_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__locale_time); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1323; __pyx_clineno = __LINE__; goto __pyx_L7_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s__lang); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1323; __pyx_clineno = __LINE__; goto __pyx_L7_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyObject_RichCompare(__pyx_t_5, __pyx_t_2, Py_NE); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1323; __pyx_clineno = __LINE__; goto __pyx_L7_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1323; __pyx_clineno = __LINE__; goto __pyx_L7_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_9) { /* "pandas/tslib.pyx":1324 * with _cache_lock: * if _getlang() != _TimeRE_cache.locale_time.lang: * _TimeRE_cache = TimeRE() # <<<<<<<<<<<<<< * _regex_cache.clear() * if len(_regex_cache) > _CACHE_MAX_SIZE: */ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s__TimeRE); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1324; __pyx_clineno = __LINE__; goto __pyx_L7_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_2 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1324; __pyx_clineno = __LINE__; goto __pyx_L7_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (PyDict_SetItem(__pyx_d, __pyx_n_s___TimeRE_cache, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1324; __pyx_clineno = __LINE__; goto __pyx_L7_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/tslib.pyx":1325 * if _getlang() != _TimeRE_cache.locale_time.lang: * _TimeRE_cache = TimeRE() * _regex_cache.clear() # <<<<<<<<<<<<<< * if len(_regex_cache) > _CACHE_MAX_SIZE: * _regex_cache.clear() */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s___regex_cache); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1325; __pyx_clineno = __LINE__; goto __pyx_L7_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__clear); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1325; __pyx_clineno = __LINE__; goto __pyx_L7_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1325; __pyx_clineno = __LINE__; goto __pyx_L7_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; goto __pyx_L15; } __pyx_L15:; /* "pandas/tslib.pyx":1326 * _TimeRE_cache = TimeRE() * _regex_cache.clear() * if len(_regex_cache) > _CACHE_MAX_SIZE: # <<<<<<<<<<<<<< * _regex_cache.clear() * locale_time = _TimeRE_cache.locale_time */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s___regex_cache); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1326; __pyx_clineno = __LINE__; goto __pyx_L7_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = PyObject_Length(__pyx_t_2); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1326; __pyx_clineno = __LINE__; goto __pyx_L7_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyInt_FromSsize_t(__pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1326; __pyx_clineno = __LINE__; goto __pyx_L7_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s___CACHE_MAX_SIZE); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1326; __pyx_clineno = __LINE__; goto __pyx_L7_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = PyObject_RichCompare(__pyx_t_2, __pyx_t_4, Py_GT); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1326; __pyx_clineno = __LINE__; goto __pyx_L7_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1326; __pyx_clineno = __LINE__; goto __pyx_L7_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_9) { /* "pandas/tslib.pyx":1327 * _regex_cache.clear() * if len(_regex_cache) > _CACHE_MAX_SIZE: * _regex_cache.clear() # <<<<<<<<<<<<<< * locale_time = _TimeRE_cache.locale_time * format_regex = _regex_cache.get(fmt) */ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s___regex_cache); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1327; __pyx_clineno = __LINE__; goto __pyx_L7_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s__clear); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1327; __pyx_clineno = __LINE__; goto __pyx_L7_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1327; __pyx_clineno = __LINE__; goto __pyx_L7_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; goto __pyx_L16; } __pyx_L16:; /* "pandas/tslib.pyx":1328 * if len(_regex_cache) > _CACHE_MAX_SIZE: * _regex_cache.clear() * locale_time = _TimeRE_cache.locale_time # <<<<<<<<<<<<<< * format_regex = _regex_cache.get(fmt) * if not format_regex: */ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s___TimeRE_cache); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1328; __pyx_clineno = __LINE__; goto __pyx_L7_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s__locale_time); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1328; __pyx_clineno = __LINE__; goto __pyx_L7_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_v_locale_time = __pyx_t_4; __pyx_t_4 = 0; /* "pandas/tslib.pyx":1329 * _regex_cache.clear() * locale_time = _TimeRE_cache.locale_time * format_regex = _regex_cache.get(fmt) # <<<<<<<<<<<<<< * if not format_regex: * try: */ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s___regex_cache); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1329; __pyx_clineno = __LINE__; goto __pyx_L7_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s__get); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1329; __pyx_clineno = __LINE__; goto __pyx_L7_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1329; __pyx_clineno = __LINE__; goto __pyx_L7_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_v_fmt); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_fmt); __Pyx_GIVEREF(__pyx_v_fmt); __pyx_t_2 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1329; __pyx_clineno = __LINE__; goto __pyx_L7_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __pyx_v_format_regex = __pyx_t_2; __pyx_t_2 = 0; /* "pandas/tslib.pyx":1330 * locale_time = _TimeRE_cache.locale_time * format_regex = _regex_cache.get(fmt) * if not format_regex: # <<<<<<<<<<<<<< * try: * format_regex = _TimeRE_cache.compile(fmt) */ __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_v_format_regex); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1330; __pyx_clineno = __LINE__; goto __pyx_L7_error;} __pyx_t_10 = ((!__pyx_t_9) != 0); if (__pyx_t_10) { /* "pandas/tslib.pyx":1331 * format_regex = _regex_cache.get(fmt) * if not format_regex: * try: # <<<<<<<<<<<<<< * format_regex = _TimeRE_cache.compile(fmt) * # KeyError raised when a bad format is found; can be specified as */ { __Pyx_ExceptionSave(&__pyx_t_11, &__pyx_t_12, &__pyx_t_13); __Pyx_XGOTREF(__pyx_t_11); __Pyx_XGOTREF(__pyx_t_12); __Pyx_XGOTREF(__pyx_t_13); /*try:*/ { /* "pandas/tslib.pyx":1332 * if not format_regex: * try: * format_regex = _TimeRE_cache.compile(fmt) # <<<<<<<<<<<<<< * # KeyError raised when a bad format is found; can be specified as * # \\, in which case it was a stray % but with a space after it */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s___TimeRE_cache); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1332; __pyx_clineno = __LINE__; goto __pyx_L18_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__compile); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1332; __pyx_clineno = __LINE__; goto __pyx_L18_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1332; __pyx_clineno = __LINE__; goto __pyx_L18_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_fmt); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_fmt); __Pyx_GIVEREF(__pyx_v_fmt); __pyx_t_5 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1332; __pyx_clineno = __LINE__; goto __pyx_L18_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __Pyx_DECREF_SET(__pyx_v_format_regex, __pyx_t_5); __pyx_t_5 = 0; } __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; goto __pyx_L25_try_end; __pyx_L18_error:; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; /* "pandas/tslib.pyx":1335 * # KeyError raised when a bad format is found; can be specified as * # \\, in which case it was a stray % but with a space after it * except KeyError, err: # <<<<<<<<<<<<<< * bad_directive = err.args[0] * if bad_directive == "\\": */ __pyx_t_14 = PyErr_ExceptionMatches(__pyx_builtin_KeyError); if (__pyx_t_14) { __Pyx_AddTraceback("pandas.tslib.array_strptime", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_2, &__pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1335; __pyx_clineno = __LINE__; goto __pyx_L20_except_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_GOTREF(__pyx_t_2); __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_v_err = __pyx_t_2; /* "pandas/tslib.pyx":1336 * # \\, in which case it was a stray % but with a space after it * except KeyError, err: * bad_directive = err.args[0] # <<<<<<<<<<<<<< * if bad_directive == "\\": * bad_directive = "%" */ __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_v_err, __pyx_n_s__args); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1336; __pyx_clineno = __LINE__; goto __pyx_L20_except_error;} __Pyx_GOTREF(__pyx_t_15); __pyx_t_16 = __Pyx_GetItemInt(__pyx_t_15, 0, sizeof(long), PyInt_FromLong, 0, 0, 1); if (!__pyx_t_16) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1336; __pyx_clineno = __LINE__; goto __pyx_L20_except_error;} __Pyx_GOTREF(__pyx_t_16); __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; __pyx_v_bad_directive = __pyx_t_16; __pyx_t_16 = 0; /* "pandas/tslib.pyx":1337 * except KeyError, err: * bad_directive = err.args[0] * if bad_directive == "\\": # <<<<<<<<<<<<<< * bad_directive = "%" * del err */ __pyx_t_16 = PyObject_RichCompare(__pyx_v_bad_directive, ((PyObject *)__pyx_kp_s_85), Py_EQ); __Pyx_XGOTREF(__pyx_t_16); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1337; __pyx_clineno = __LINE__; goto __pyx_L20_except_error;} __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_16); if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1337; __pyx_clineno = __LINE__; goto __pyx_L20_except_error;} __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; if (__pyx_t_10) { /* "pandas/tslib.pyx":1338 * bad_directive = err.args[0] * if bad_directive == "\\": * bad_directive = "%" # <<<<<<<<<<<<<< * del err * raise ValueError("'%s' is a bad directive in format '%s'" % */ __Pyx_INCREF(((PyObject *)__pyx_kp_s_86)); __Pyx_DECREF_SET(__pyx_v_bad_directive, ((PyObject *)__pyx_kp_s_86)); goto __pyx_L28; } __pyx_L28:; /* "pandas/tslib.pyx":1339 * if bad_directive == "\\": * bad_directive = "%" * del err # <<<<<<<<<<<<<< * raise ValueError("'%s' is a bad directive in format '%s'" % * (bad_directive, fmt)) */ __Pyx_DECREF(__pyx_v_err); __pyx_v_err = NULL; /* "pandas/tslib.pyx":1341 * del err * raise ValueError("'%s' is a bad directive in format '%s'" % * (bad_directive, fmt)) # <<<<<<<<<<<<<< * # IndexError only occurs when the format string is "%" * except IndexError: */ __pyx_t_16 = PyTuple_New(2); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1341; __pyx_clineno = __LINE__; goto __pyx_L20_except_error;} __Pyx_GOTREF(__pyx_t_16); __Pyx_INCREF(__pyx_v_bad_directive); PyTuple_SET_ITEM(__pyx_t_16, 0, __pyx_v_bad_directive); __Pyx_GIVEREF(__pyx_v_bad_directive); __Pyx_INCREF(__pyx_v_fmt); PyTuple_SET_ITEM(__pyx_t_16, 1, __pyx_v_fmt); __Pyx_GIVEREF(__pyx_v_fmt); __pyx_t_15 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_87), ((PyObject *)__pyx_t_16)); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1340; __pyx_clineno = __LINE__; goto __pyx_L20_except_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_15)); __Pyx_DECREF(((PyObject *)__pyx_t_16)); __pyx_t_16 = 0; __pyx_t_16 = PyTuple_New(1); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1340; __pyx_clineno = __LINE__; goto __pyx_L20_except_error;} __Pyx_GOTREF(__pyx_t_16); PyTuple_SET_ITEM(__pyx_t_16, 0, ((PyObject *)__pyx_t_15)); __Pyx_GIVEREF(((PyObject *)__pyx_t_15)); __pyx_t_15 = 0; __pyx_t_15 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_16), NULL); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1340; __pyx_clineno = __LINE__; goto __pyx_L20_except_error;} __Pyx_GOTREF(__pyx_t_15); __Pyx_DECREF(((PyObject *)__pyx_t_16)); __pyx_t_16 = 0; __Pyx_Raise(__pyx_t_15, 0, 0, 0); __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1340; __pyx_clineno = __LINE__; goto __pyx_L20_except_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; goto __pyx_L19_exception_handled; } /* "pandas/tslib.pyx":1343 * (bad_directive, fmt)) * # IndexError only occurs when the format string is "%" * except IndexError: # <<<<<<<<<<<<<< * raise ValueError("stray %% in format '%s'" % fmt) * _regex_cache[fmt] = format_regex */ __pyx_t_14 = PyErr_ExceptionMatches(__pyx_builtin_IndexError); if (__pyx_t_14) { __Pyx_AddTraceback("pandas.tslib.array_strptime", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_2, &__pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1343; __pyx_clineno = __LINE__; goto __pyx_L20_except_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_GOTREF(__pyx_t_2); __Pyx_GOTREF(__pyx_t_5); /* "pandas/tslib.pyx":1344 * # IndexError only occurs when the format string is "%" * except IndexError: * raise ValueError("stray %% in format '%s'" % fmt) # <<<<<<<<<<<<<< * _regex_cache[fmt] = format_regex * */ __pyx_t_15 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_88), __pyx_v_fmt); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1344; __pyx_clineno = __LINE__; goto __pyx_L20_except_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_15)); __pyx_t_16 = PyTuple_New(1); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1344; __pyx_clineno = __LINE__; goto __pyx_L20_except_error;} __Pyx_GOTREF(__pyx_t_16); PyTuple_SET_ITEM(__pyx_t_16, 0, ((PyObject *)__pyx_t_15)); __Pyx_GIVEREF(((PyObject *)__pyx_t_15)); __pyx_t_15 = 0; __pyx_t_15 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_16), NULL); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1344; __pyx_clineno = __LINE__; goto __pyx_L20_except_error;} __Pyx_GOTREF(__pyx_t_15); __Pyx_DECREF(((PyObject *)__pyx_t_16)); __pyx_t_16 = 0; __Pyx_Raise(__pyx_t_15, 0, 0, 0); __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1344; __pyx_clineno = __LINE__; goto __pyx_L20_except_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; goto __pyx_L19_exception_handled; } __pyx_L20_except_error:; __Pyx_XGIVEREF(__pyx_t_11); __Pyx_XGIVEREF(__pyx_t_12); __Pyx_XGIVEREF(__pyx_t_13); __Pyx_ExceptionReset(__pyx_t_11, __pyx_t_12, __pyx_t_13); goto __pyx_L7_error; __pyx_L19_exception_handled:; __Pyx_XGIVEREF(__pyx_t_11); __Pyx_XGIVEREF(__pyx_t_12); __Pyx_XGIVEREF(__pyx_t_13); __Pyx_ExceptionReset(__pyx_t_11, __pyx_t_12, __pyx_t_13); __pyx_L25_try_end:; } /* "pandas/tslib.pyx":1345 * except IndexError: * raise ValueError("stray %% in format '%s'" % fmt) * _regex_cache[fmt] = format_regex # <<<<<<<<<<<<<< * * result = np.empty(n, dtype='M8[ns]') */ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s___regex_cache); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1345; __pyx_clineno = __LINE__; goto __pyx_L7_error;} __Pyx_GOTREF(__pyx_t_5); if (PyObject_SetItem(__pyx_t_5, __pyx_v_fmt, __pyx_v_format_regex) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1345; __pyx_clineno = __LINE__; goto __pyx_L7_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; goto __pyx_L17; } __pyx_L17:; } __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; goto __pyx_L14_try_end; __pyx_L7_error:; __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0; __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; /* "pandas/tslib.pyx":1322 * * global _TimeRE_cache, _regex_cache * with _cache_lock: # <<<<<<<<<<<<<< * if _getlang() != _TimeRE_cache.locale_time.lang: * _TimeRE_cache = TimeRE() */ /*except:*/ { __Pyx_AddTraceback("pandas.tslib.array_strptime", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_2, &__pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1322; __pyx_clineno = __LINE__; goto __pyx_L9_except_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_GOTREF(__pyx_t_2); __Pyx_GOTREF(__pyx_t_4); __pyx_t_15 = PyTuple_New(3); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1322; __pyx_clineno = __LINE__; goto __pyx_L9_except_error;} __Pyx_GOTREF(__pyx_t_15); __Pyx_INCREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __Pyx_INCREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_15, 1, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __Pyx_INCREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_15, 2, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_13 = PyObject_Call(__pyx_t_3, __pyx_t_15, NULL); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1322; __pyx_clineno = __LINE__; goto __pyx_L9_except_error;} __Pyx_GOTREF(__pyx_t_13); __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_13); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; if (__pyx_t_10 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1322; __pyx_clineno = __LINE__; goto __pyx_L9_except_error;} __pyx_t_9 = ((!(__pyx_t_10 != 0)) != 0); if (__pyx_t_9) { __Pyx_GIVEREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_4); __Pyx_ErrRestore(__pyx_t_5, __pyx_t_2, __pyx_t_4); __pyx_t_5 = 0; __pyx_t_2 = 0; __pyx_t_4 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1322; __pyx_clineno = __LINE__; goto __pyx_L9_except_error;} goto __pyx_L33; } __pyx_L33:; __Pyx_DECREF(((PyObject *)__pyx_t_15)); __pyx_t_15 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; goto __pyx_L8_exception_handled; } __pyx_L9_except_error:; __Pyx_XGIVEREF(__pyx_t_6); __Pyx_XGIVEREF(__pyx_t_7); __Pyx_XGIVEREF(__pyx_t_8); __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8); goto __pyx_L1_error; __pyx_L8_exception_handled:; __Pyx_XGIVEREF(__pyx_t_6); __Pyx_XGIVEREF(__pyx_t_7); __Pyx_XGIVEREF(__pyx_t_8); __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8); __pyx_L14_try_end:; } } /*finally:*/ { if (__pyx_t_3) { __pyx_t_8 = PyObject_Call(__pyx_t_3, __pyx_k_tuple_89, NULL); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1322; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_8); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (__pyx_t_9 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1322; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } } goto __pyx_L34; __pyx_L3_error:; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L1_error; __pyx_L34:; } /* "pandas/tslib.pyx":1347 * _regex_cache[fmt] = format_regex * * result = np.empty(n, dtype='M8[ns]') # <<<<<<<<<<<<<< * iresult = result.view('i8') * */ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1347; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s__empty); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1347; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyInt_FromSsize_t(__pyx_v_n); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1347; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1347; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyDict_New(); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1347; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_4)); if (PyDict_SetItem(__pyx_t_4, ((PyObject *)__pyx_n_s__dtype), ((PyObject *)__pyx_kp_s_18)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1347; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_15 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_5), ((PyObject *)__pyx_t_4)); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1347; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_15); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __pyx_v_result = __pyx_t_15; __pyx_t_15 = 0; /* "pandas/tslib.pyx":1348 * * result = np.empty(n, dtype='M8[ns]') * iresult = result.view('i8') # <<<<<<<<<<<<<< * * dts.us = dts.ps = dts.as = 0 */ __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_v_result, __pyx_n_s__view); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1348; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_15); __pyx_t_4 = PyObject_Call(__pyx_t_15, ((PyObject *)__pyx_k_tuple_90), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1348; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1348; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_17 = ((PyArrayObject *)__pyx_t_4); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_iresult.rcbuffer->pybuffer); __pyx_t_14 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_iresult.rcbuffer->pybuffer, (PyObject*)__pyx_t_17, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_14 < 0)) { PyErr_Fetch(&__pyx_t_3, &__pyx_t_8, &__pyx_t_7); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_iresult.rcbuffer->pybuffer, (PyObject*)__pyx_v_iresult, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_8); Py_XDECREF(__pyx_t_7); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_3, __pyx_t_8, __pyx_t_7); } } __pyx_pybuffernd_iresult.diminfo[0].strides = __pyx_pybuffernd_iresult.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_iresult.diminfo[0].shape = __pyx_pybuffernd_iresult.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_14 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1348; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_17 = 0; __pyx_v_iresult = ((PyArrayObject *)__pyx_t_4); __pyx_t_4 = 0; /* "pandas/tslib.pyx":1350 * iresult = result.view('i8') * * dts.us = dts.ps = dts.as = 0 # <<<<<<<<<<<<<< * * cdef dict _parse_code_table = { */ __pyx_v_dts.us = 0; __pyx_v_dts.ps = 0; __pyx_v_dts.as = 0; /* "pandas/tslib.pyx":1352 * dts.us = dts.ps = dts.as = 0 * * cdef dict _parse_code_table = { # <<<<<<<<<<<<<< * 'y': 0, * 'Y': 1, */ __pyx_t_4 = PyDict_New(); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1352; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_4)); if (PyDict_SetItem(__pyx_t_4, ((PyObject *)__pyx_n_s__y), __pyx_int_0) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1352; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (PyDict_SetItem(__pyx_t_4, ((PyObject *)__pyx_n_s__Y), __pyx_int_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1352; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (PyDict_SetItem(__pyx_t_4, ((PyObject *)__pyx_n_s__m), __pyx_int_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1352; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (PyDict_SetItem(__pyx_t_4, ((PyObject *)__pyx_n_s__B), __pyx_int_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1352; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (PyDict_SetItem(__pyx_t_4, ((PyObject *)__pyx_n_s__b), __pyx_int_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1352; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (PyDict_SetItem(__pyx_t_4, ((PyObject *)__pyx_n_s__d), __pyx_int_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1352; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (PyDict_SetItem(__pyx_t_4, ((PyObject *)__pyx_n_s__H), __pyx_int_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1352; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (PyDict_SetItem(__pyx_t_4, ((PyObject *)__pyx_n_s__I), __pyx_int_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1352; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (PyDict_SetItem(__pyx_t_4, ((PyObject *)__pyx_n_s__M), __pyx_int_8) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1352; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (PyDict_SetItem(__pyx_t_4, ((PyObject *)__pyx_n_s__S), __pyx_int_9) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1352; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (PyDict_SetItem(__pyx_t_4, ((PyObject *)__pyx_n_s__f), __pyx_int_10) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1352; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (PyDict_SetItem(__pyx_t_4, ((PyObject *)__pyx_n_s__A), __pyx_int_11) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1352; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (PyDict_SetItem(__pyx_t_4, ((PyObject *)__pyx_n_s__a), __pyx_int_12) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1352; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (PyDict_SetItem(__pyx_t_4, ((PyObject *)__pyx_n_s__w), __pyx_int_13) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1352; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (PyDict_SetItem(__pyx_t_4, ((PyObject *)__pyx_n_s__j), __pyx_int_14) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1352; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (PyDict_SetItem(__pyx_t_4, ((PyObject *)__pyx_n_s__U), __pyx_int_15) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1352; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (PyDict_SetItem(__pyx_t_4, ((PyObject *)__pyx_n_s__W), __pyx_int_16) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1352; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (PyDict_SetItem(__pyx_t_4, ((PyObject *)__pyx_n_s__Z), __pyx_int_17) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1352; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (PyDict_SetItem(__pyx_t_4, ((PyObject *)__pyx_n_s__p), __pyx_int_18) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1352; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v__parse_code_table = ((PyObject*)__pyx_t_4); __pyx_t_4 = 0; /* "pandas/tslib.pyx":1375 * cdef int parse_code * * for i in range(n): # <<<<<<<<<<<<<< * val = values[i] * if util.is_string_object(val): */ __pyx_t_1 = __pyx_v_n; for (__pyx_t_18 = 0; __pyx_t_18 < __pyx_t_1; __pyx_t_18+=1) { __pyx_v_i = __pyx_t_18; /* "pandas/tslib.pyx":1376 * * for i in range(n): * val = values[i] # <<<<<<<<<<<<<< * if util.is_string_object(val): * if val in _nat_strings: */ __pyx_t_19 = __pyx_v_i; __pyx_t_14 = -1; if (__pyx_t_19 < 0) { __pyx_t_19 += __pyx_pybuffernd_values.diminfo[0].shape; if (unlikely(__pyx_t_19 < 0)) __pyx_t_14 = 0; } else if (unlikely(__pyx_t_19 >= __pyx_pybuffernd_values.diminfo[0].shape)) __pyx_t_14 = 0; if (unlikely(__pyx_t_14 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_14); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1376; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_4 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_values.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_4); __Pyx_XDECREF_SET(__pyx_v_val, __pyx_t_4); __pyx_t_4 = 0; /* "pandas/tslib.pyx":1377 * for i in range(n): * val = values[i] * if util.is_string_object(val): # <<<<<<<<<<<<<< * if val in _nat_strings: * iresult[i] = iNaT */ __pyx_t_9 = (is_string_object(__pyx_v_val) != 0); if (__pyx_t_9) { /* "pandas/tslib.pyx":1378 * val = values[i] * if util.is_string_object(val): * if val in _nat_strings: # <<<<<<<<<<<<<< * iresult[i] = iNaT * continue */ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s___nat_strings); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1378; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_9 = (__Pyx_PySequence_Contains(__pyx_v_val, __pyx_t_4, Py_EQ)); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1378; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_10 = (__pyx_t_9 != 0); if (__pyx_t_10) { /* "pandas/tslib.pyx":1379 * if util.is_string_object(val): * if val in _nat_strings: * iresult[i] = iNaT # <<<<<<<<<<<<<< * continue * else: */ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s__iNaT); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1379; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_20 = __Pyx_PyInt_from_py_npy_int64(__pyx_t_4); if (unlikely((__pyx_t_20 == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1379; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_21 = __pyx_v_i; __pyx_t_14 = -1; if (__pyx_t_21 < 0) { __pyx_t_21 += __pyx_pybuffernd_iresult.diminfo[0].shape; if (unlikely(__pyx_t_21 < 0)) __pyx_t_14 = 0; } else if (unlikely(__pyx_t_21 >= __pyx_pybuffernd_iresult.diminfo[0].shape)) __pyx_t_14 = 0; if (unlikely(__pyx_t_14 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_14); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1379; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_iresult.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_iresult.diminfo[0].strides) = __pyx_t_20; /* "pandas/tslib.pyx":1380 * if val in _nat_strings: * iresult[i] = iNaT * continue # <<<<<<<<<<<<<< * else: * if _checknull_with_nat(val): */ goto __pyx_L35_continue; goto __pyx_L38; } __pyx_L38:; goto __pyx_L37; } /*else*/ { /* "pandas/tslib.pyx":1382 * continue * else: * if _checknull_with_nat(val): # <<<<<<<<<<<<<< * iresult[i] = iNaT * continue */ __pyx_t_10 = (__pyx_f_6pandas_5tslib__checknull_with_nat(__pyx_v_val) != 0); if (__pyx_t_10) { /* "pandas/tslib.pyx":1383 * else: * if _checknull_with_nat(val): * iresult[i] = iNaT # <<<<<<<<<<<<<< * continue * else: */ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s__iNaT); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1383; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_20 = __Pyx_PyInt_from_py_npy_int64(__pyx_t_4); if (unlikely((__pyx_t_20 == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1383; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_22 = __pyx_v_i; __pyx_t_14 = -1; if (__pyx_t_22 < 0) { __pyx_t_22 += __pyx_pybuffernd_iresult.diminfo[0].shape; if (unlikely(__pyx_t_22 < 0)) __pyx_t_14 = 0; } else if (unlikely(__pyx_t_22 >= __pyx_pybuffernd_iresult.diminfo[0].shape)) __pyx_t_14 = 0; if (unlikely(__pyx_t_14 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_14); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1383; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_iresult.rcbuffer->pybuffer.buf, __pyx_t_22, __pyx_pybuffernd_iresult.diminfo[0].strides) = __pyx_t_20; /* "pandas/tslib.pyx":1384 * if _checknull_with_nat(val): * iresult[i] = iNaT * continue # <<<<<<<<<<<<<< * else: * val = str(val) */ goto __pyx_L35_continue; goto __pyx_L39; } /*else*/ { /* "pandas/tslib.pyx":1386 * continue * else: * val = str(val) # <<<<<<<<<<<<<< * * found = format_regex.match(val) */ __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1386; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_v_val); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_val); __Pyx_GIVEREF(__pyx_v_val); __pyx_t_15 = PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1386; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_15); __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __Pyx_DECREF_SET(__pyx_v_val, __pyx_t_15); __pyx_t_15 = 0; } __pyx_L39:; } __pyx_L37:; /* "pandas/tslib.pyx":1388 * val = str(val) * * found = format_regex.match(val) # <<<<<<<<<<<<<< * if not found: * if coerce: */ if (unlikely(!__pyx_v_format_regex)) { __Pyx_RaiseUnboundLocalError("format_regex"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1388; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_v_format_regex, __pyx_n_s__match); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1388; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_15); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1388; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_v_val); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_val); __Pyx_GIVEREF(__pyx_v_val); __pyx_t_5 = PyObject_Call(__pyx_t_15, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1388; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __Pyx_XDECREF_SET(__pyx_v_found, __pyx_t_5); __pyx_t_5 = 0; /* "pandas/tslib.pyx":1389 * * found = format_regex.match(val) * if not found: # <<<<<<<<<<<<<< * if coerce: * iresult[i] = iNaT */ __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_v_found); if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1389; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_9 = ((!__pyx_t_10) != 0); if (__pyx_t_9) { /* "pandas/tslib.pyx":1390 * found = format_regex.match(val) * if not found: * if coerce: # <<<<<<<<<<<<<< * iresult[i] = iNaT * continue */ __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_v_coerce); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1390; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__pyx_t_9) { /* "pandas/tslib.pyx":1391 * if not found: * if coerce: * iresult[i] = iNaT # <<<<<<<<<<<<<< * continue * raise ValueError("time data %r does not match format %r" % */ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s__iNaT); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1391; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_20 = __Pyx_PyInt_from_py_npy_int64(__pyx_t_5); if (unlikely((__pyx_t_20 == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1391; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_23 = __pyx_v_i; __pyx_t_14 = -1; if (__pyx_t_23 < 0) { __pyx_t_23 += __pyx_pybuffernd_iresult.diminfo[0].shape; if (unlikely(__pyx_t_23 < 0)) __pyx_t_14 = 0; } else if (unlikely(__pyx_t_23 >= __pyx_pybuffernd_iresult.diminfo[0].shape)) __pyx_t_14 = 0; if (unlikely(__pyx_t_14 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_14); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1391; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_iresult.rcbuffer->pybuffer.buf, __pyx_t_23, __pyx_pybuffernd_iresult.diminfo[0].strides) = __pyx_t_20; /* "pandas/tslib.pyx":1392 * if coerce: * iresult[i] = iNaT * continue # <<<<<<<<<<<<<< * raise ValueError("time data %r does not match format %r" % * (values[i], fmt)) */ goto __pyx_L35_continue; goto __pyx_L41; } __pyx_L41:; /* "pandas/tslib.pyx":1394 * continue * raise ValueError("time data %r does not match format %r" % * (values[i], fmt)) # <<<<<<<<<<<<<< * if len(val) != found.end(): * if coerce: */ __pyx_t_24 = __pyx_v_i; __pyx_t_14 = -1; if (__pyx_t_24 < 0) { __pyx_t_24 += __pyx_pybuffernd_values.diminfo[0].shape; if (unlikely(__pyx_t_24 < 0)) __pyx_t_14 = 0; } else if (unlikely(__pyx_t_24 >= __pyx_pybuffernd_values.diminfo[0].shape)) __pyx_t_14 = 0; if (unlikely(__pyx_t_14 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_14); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1394; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_5 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_24, __pyx_pybuffernd_values.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_5); __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1394; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __Pyx_INCREF(__pyx_v_fmt); PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_fmt); __Pyx_GIVEREF(__pyx_v_fmt); __pyx_t_5 = 0; __pyx_t_5 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_91), ((PyObject *)__pyx_t_4)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1393; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_5)); __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1393; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_t_5)); __Pyx_GIVEREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; __pyx_t_5 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1393; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __Pyx_Raise(__pyx_t_5, 0, 0, 0); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1393; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L40; } __pyx_L40:; /* "pandas/tslib.pyx":1395 * raise ValueError("time data %r does not match format %r" % * (values[i], fmt)) * if len(val) != found.end(): # <<<<<<<<<<<<<< * if coerce: * iresult[i] = iNaT */ __pyx_t_25 = PyObject_Length(__pyx_v_val); if (unlikely(__pyx_t_25 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1395; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_5 = PyInt_FromSsize_t(__pyx_t_25); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1395; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_found, __pyx_n_s__end); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1395; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_15 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1395; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_15); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyObject_RichCompare(__pyx_t_5, __pyx_t_15, Py_NE); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1395; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1395; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_9) { /* "pandas/tslib.pyx":1396 * (values[i], fmt)) * if len(val) != found.end(): * if coerce: # <<<<<<<<<<<<<< * iresult[i] = iNaT * continue */ __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_v_coerce); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1396; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__pyx_t_9) { /* "pandas/tslib.pyx":1397 * if len(val) != found.end(): * if coerce: * iresult[i] = iNaT # <<<<<<<<<<<<<< * continue * raise ValueError("unconverted data remains: %s" % */ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s__iNaT); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1397; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_20 = __Pyx_PyInt_from_py_npy_int64(__pyx_t_4); if (unlikely((__pyx_t_20 == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1397; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_25 = __pyx_v_i; __pyx_t_14 = -1; if (__pyx_t_25 < 0) { __pyx_t_25 += __pyx_pybuffernd_iresult.diminfo[0].shape; if (unlikely(__pyx_t_25 < 0)) __pyx_t_14 = 0; } else if (unlikely(__pyx_t_25 >= __pyx_pybuffernd_iresult.diminfo[0].shape)) __pyx_t_14 = 0; if (unlikely(__pyx_t_14 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_14); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1397; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_iresult.rcbuffer->pybuffer.buf, __pyx_t_25, __pyx_pybuffernd_iresult.diminfo[0].strides) = __pyx_t_20; /* "pandas/tslib.pyx":1398 * if coerce: * iresult[i] = iNaT * continue # <<<<<<<<<<<<<< * raise ValueError("unconverted data remains: %s" % * values[i][found.end():]) */ goto __pyx_L35_continue; goto __pyx_L43; } __pyx_L43:; /* "pandas/tslib.pyx":1400 * continue * raise ValueError("unconverted data remains: %s" % * values[i][found.end():]) # <<<<<<<<<<<<<< * year = 1900 * month = day = 1 */ __pyx_t_26 = __pyx_v_i; __pyx_t_14 = -1; if (__pyx_t_26 < 0) { __pyx_t_26 += __pyx_pybuffernd_values.diminfo[0].shape; if (unlikely(__pyx_t_26 < 0)) __pyx_t_14 = 0; } else if (unlikely(__pyx_t_26 >= __pyx_pybuffernd_values.diminfo[0].shape)) __pyx_t_14 = 0; if (unlikely(__pyx_t_14 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_14); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1400; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_4 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_26, __pyx_pybuffernd_values.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_4); __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_v_found, __pyx_n_s__end); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1400; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_15); __pyx_t_5 = PyObject_Call(__pyx_t_15, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1400; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; __pyx_t_15 = __Pyx_PyObject_GetSlice(__pyx_t_4, 0, 0, &__pyx_t_5, NULL, NULL, 0, 0, 1); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1400; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_15); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_92), __pyx_t_15); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1399; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_5)); __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; __pyx_t_15 = PyTuple_New(1); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1399; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_15); PyTuple_SET_ITEM(__pyx_t_15, 0, ((PyObject *)__pyx_t_5)); __Pyx_GIVEREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; __pyx_t_5 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_15), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1399; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(((PyObject *)__pyx_t_15)); __pyx_t_15 = 0; __Pyx_Raise(__pyx_t_5, 0, 0, 0); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1399; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L42; } __pyx_L42:; /* "pandas/tslib.pyx":1401 * raise ValueError("unconverted data remains: %s" % * values[i][found.end():]) * year = 1900 # <<<<<<<<<<<<<< * month = day = 1 * hour = minute = second = fraction = 0 */ __pyx_v_year = 1900; /* "pandas/tslib.pyx":1402 * values[i][found.end():]) * year = 1900 * month = day = 1 # <<<<<<<<<<<<<< * hour = minute = second = fraction = 0 * tz = -1 */ __pyx_v_month = 1; __pyx_v_day = 1; /* "pandas/tslib.pyx":1403 * year = 1900 * month = day = 1 * hour = minute = second = fraction = 0 # <<<<<<<<<<<<<< * tz = -1 * # Default to -1 to signify that values not known; not critical to have, */ __pyx_v_hour = 0; __pyx_v_minute = 0; __pyx_v_second = 0; __pyx_v_fraction = 0; /* "pandas/tslib.pyx":1404 * month = day = 1 * hour = minute = second = fraction = 0 * tz = -1 # <<<<<<<<<<<<<< * # Default to -1 to signify that values not known; not critical to have, * # though */ __Pyx_INCREF(__pyx_int_neg_1); __Pyx_XDECREF_SET(__pyx_v_tz, __pyx_int_neg_1); /* "pandas/tslib.pyx":1407 * # Default to -1 to signify that values not known; not critical to have, * # though * week_of_year = -1 # <<<<<<<<<<<<<< * week_of_year_start = -1 * # weekday and julian defaulted to -1 so as to signal need to calculate */ __Pyx_INCREF(__pyx_int_neg_1); __Pyx_XDECREF_SET(__pyx_v_week_of_year, __pyx_int_neg_1); /* "pandas/tslib.pyx":1408 * # though * week_of_year = -1 * week_of_year_start = -1 # <<<<<<<<<<<<<< * # weekday and julian defaulted to -1 so as to signal need to calculate * # values */ __pyx_v_week_of_year_start = -1; /* "pandas/tslib.pyx":1411 * # weekday and julian defaulted to -1 so as to signal need to calculate * # values * weekday = julian = -1 # <<<<<<<<<<<<<< * found_dict = found.groupdict() * for group_key in found_dict.iterkeys(): */ __pyx_v_weekday = -1; __pyx_v_julian = -1; /* "pandas/tslib.pyx":1412 * # values * weekday = julian = -1 * found_dict = found.groupdict() # <<<<<<<<<<<<<< * for group_key in found_dict.iterkeys(): * # Directives not explicitly handled below: */ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_found, __pyx_n_s__groupdict); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1412; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_15 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1412; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_15); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF_SET(__pyx_v_found_dict, __pyx_t_15); __pyx_t_15 = 0; /* "pandas/tslib.pyx":1413 * weekday = julian = -1 * found_dict = found.groupdict() * for group_key in found_dict.iterkeys(): # <<<<<<<<<<<<<< * # Directives not explicitly handled below: * # c, x, X */ __pyx_t_27 = 0; if (unlikely(__pyx_v_found_dict == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "iterkeys"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1413; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_5 = __Pyx_dict_iterator(__pyx_v_found_dict, 0, ((PyObject *)__pyx_n_s__iterkeys), (&__pyx_t_28), (&__pyx_t_14)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1413; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = __pyx_t_5; __pyx_t_5 = 0; while (1) { __pyx_t_29 = __Pyx_dict_iter_next(__pyx_t_15, __pyx_t_28, &__pyx_t_27, &__pyx_t_5, NULL, NULL, __pyx_t_14); if (unlikely(__pyx_t_29 == 0)) break; if (unlikely(__pyx_t_29 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1413; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_XDECREF_SET(__pyx_v_group_key, __pyx_t_5); __pyx_t_5 = 0; /* "pandas/tslib.pyx":1419 * # U, W * # worthless without day of the week * parse_code = _parse_code_table[group_key] # <<<<<<<<<<<<<< * * if parse_code == 0: */ __pyx_t_5 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v__parse_code_table), __pyx_v_group_key); if (!__pyx_t_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1419; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_29 = __Pyx_PyInt_AsInt(__pyx_t_5); if (unlikely((__pyx_t_29 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1419; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_v_parse_code = __pyx_t_29; /* "pandas/tslib.pyx":1491 * # W starts week on Monday. * week_of_year_start = 0 * elif parse_code == 17: # <<<<<<<<<<<<<< * # Since -1 is default value only need to worry about setting tz * # if it can be something other than -1. */ switch (__pyx_v_parse_code) { /* "pandas/tslib.pyx":1421 * parse_code = _parse_code_table[group_key] * * if parse_code == 0: # <<<<<<<<<<<<<< * year = int(found_dict['y']) * # Open Group specification for strptime() states that a %y */ case 0: /* "pandas/tslib.pyx":1422 * * if parse_code == 0: * year = int(found_dict['y']) # <<<<<<<<<<<<<< * # Open Group specification for strptime() states that a %y * #value in the range of [00, 68] is in the century 2000, while */ __pyx_t_5 = PyObject_GetItem(__pyx_v_found_dict, ((PyObject *)__pyx_n_s__y)); if (!__pyx_t_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1422; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1422; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyObject_Call(((PyObject *)((PyObject*)(&PyInt_Type))), ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1422; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __pyx_t_29 = __Pyx_PyInt_AsInt(__pyx_t_5); if (unlikely((__pyx_t_29 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1422; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_v_year = __pyx_t_29; /* "pandas/tslib.pyx":1426 * #value in the range of [00, 68] is in the century 2000, while * #[69,99] is in the century 1900 * if year <= 68: # <<<<<<<<<<<<<< * year += 2000 * else: */ __pyx_t_9 = ((__pyx_v_year <= 68) != 0); if (__pyx_t_9) { /* "pandas/tslib.pyx":1427 * #[69,99] is in the century 1900 * if year <= 68: * year += 2000 # <<<<<<<<<<<<<< * else: * year += 1900 */ __pyx_v_year = (__pyx_v_year + 2000); goto __pyx_L46; } /*else*/ { /* "pandas/tslib.pyx":1429 * year += 2000 * else: * year += 1900 # <<<<<<<<<<<<<< * elif parse_code == 1: * year = int(found_dict['Y']) */ __pyx_v_year = (__pyx_v_year + 1900); } __pyx_L46:; break; /* "pandas/tslib.pyx":1430 * else: * year += 1900 * elif parse_code == 1: # <<<<<<<<<<<<<< * year = int(found_dict['Y']) * elif parse_code == 2: */ case 1: /* "pandas/tslib.pyx":1431 * year += 1900 * elif parse_code == 1: * year = int(found_dict['Y']) # <<<<<<<<<<<<<< * elif parse_code == 2: * month = int(found_dict['m']) */ __pyx_t_5 = PyObject_GetItem(__pyx_v_found_dict, ((PyObject *)__pyx_n_s__Y)); if (!__pyx_t_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1431; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1431; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyObject_Call(((PyObject *)((PyObject*)(&PyInt_Type))), ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1431; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __pyx_t_29 = __Pyx_PyInt_AsInt(__pyx_t_5); if (unlikely((__pyx_t_29 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1431; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_v_year = __pyx_t_29; break; /* "pandas/tslib.pyx":1432 * elif parse_code == 1: * year = int(found_dict['Y']) * elif parse_code == 2: # <<<<<<<<<<<<<< * month = int(found_dict['m']) * elif parse_code == 3: */ case 2: /* "pandas/tslib.pyx":1433 * year = int(found_dict['Y']) * elif parse_code == 2: * month = int(found_dict['m']) # <<<<<<<<<<<<<< * elif parse_code == 3: * # elif group_key == 'B': */ __pyx_t_5 = PyObject_GetItem(__pyx_v_found_dict, ((PyObject *)__pyx_n_s__m)); if (!__pyx_t_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1433; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1433; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyObject_Call(((PyObject *)((PyObject*)(&PyInt_Type))), ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1433; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __pyx_t_29 = __Pyx_PyInt_AsInt(__pyx_t_5); if (unlikely((__pyx_t_29 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1433; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_v_month = __pyx_t_29; break; /* "pandas/tslib.pyx":1434 * elif parse_code == 2: * month = int(found_dict['m']) * elif parse_code == 3: # <<<<<<<<<<<<<< * # elif group_key == 'B': * month = locale_time.f_month.index(found_dict['B'].lower()) */ case 3: /* "pandas/tslib.pyx":1436 * elif parse_code == 3: * # elif group_key == 'B': * month = locale_time.f_month.index(found_dict['B'].lower()) # <<<<<<<<<<<<<< * elif parse_code == 4: * # elif group_key == 'b': */ if (unlikely(!__pyx_v_locale_time)) { __Pyx_RaiseUnboundLocalError("locale_time"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1436; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_locale_time, __pyx_n_s__f_month); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1436; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s__index); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1436; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyObject_GetItem(__pyx_v_found_dict, ((PyObject *)__pyx_n_s__B)); if (!__pyx_t_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1436; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s__lower); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1436; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1436; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1436; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1436; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __pyx_t_29 = __Pyx_PyInt_AsInt(__pyx_t_5); if (unlikely((__pyx_t_29 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1436; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_v_month = __pyx_t_29; break; /* "pandas/tslib.pyx":1437 * # elif group_key == 'B': * month = locale_time.f_month.index(found_dict['B'].lower()) * elif parse_code == 4: # <<<<<<<<<<<<<< * # elif group_key == 'b': * month = locale_time.a_month.index(found_dict['b'].lower()) */ case 4: /* "pandas/tslib.pyx":1439 * elif parse_code == 4: * # elif group_key == 'b': * month = locale_time.a_month.index(found_dict['b'].lower()) # <<<<<<<<<<<<<< * elif parse_code == 5: * # elif group_key == 'd': */ if (unlikely(!__pyx_v_locale_time)) { __Pyx_RaiseUnboundLocalError("locale_time"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1439; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_locale_time, __pyx_n_s__a_month); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1439; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s__index); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1439; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyObject_GetItem(__pyx_v_found_dict, ((PyObject *)__pyx_n_s__b)); if (!__pyx_t_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1439; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s__lower); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1439; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1439; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1439; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1439; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __pyx_t_29 = __Pyx_PyInt_AsInt(__pyx_t_5); if (unlikely((__pyx_t_29 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1439; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_v_month = __pyx_t_29; break; /* "pandas/tslib.pyx":1440 * # elif group_key == 'b': * month = locale_time.a_month.index(found_dict['b'].lower()) * elif parse_code == 5: # <<<<<<<<<<<<<< * # elif group_key == 'd': * day = int(found_dict['d']) */ case 5: /* "pandas/tslib.pyx":1442 * elif parse_code == 5: * # elif group_key == 'd': * day = int(found_dict['d']) # <<<<<<<<<<<<<< * elif parse_code == 6: * # elif group_key == 'H': */ __pyx_t_5 = PyObject_GetItem(__pyx_v_found_dict, ((PyObject *)__pyx_n_s__d)); if (!__pyx_t_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1442; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1442; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyObject_Call(((PyObject *)((PyObject*)(&PyInt_Type))), ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1442; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __pyx_t_29 = __Pyx_PyInt_AsInt(__pyx_t_5); if (unlikely((__pyx_t_29 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1442; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_v_day = __pyx_t_29; break; /* "pandas/tslib.pyx":1443 * # elif group_key == 'd': * day = int(found_dict['d']) * elif parse_code == 6: # <<<<<<<<<<<<<< * # elif group_key == 'H': * hour = int(found_dict['H']) */ case 6: /* "pandas/tslib.pyx":1445 * elif parse_code == 6: * # elif group_key == 'H': * hour = int(found_dict['H']) # <<<<<<<<<<<<<< * elif parse_code == 7: * hour = int(found_dict['I']) */ __pyx_t_5 = PyObject_GetItem(__pyx_v_found_dict, ((PyObject *)__pyx_n_s__H)); if (!__pyx_t_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1445; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1445; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyObject_Call(((PyObject *)((PyObject*)(&PyInt_Type))), ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1445; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __pyx_t_29 = __Pyx_PyInt_AsInt(__pyx_t_5); if (unlikely((__pyx_t_29 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1445; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_v_hour = __pyx_t_29; break; /* "pandas/tslib.pyx":1446 * # elif group_key == 'H': * hour = int(found_dict['H']) * elif parse_code == 7: # <<<<<<<<<<<<<< * hour = int(found_dict['I']) * ampm = found_dict.get('p', '').lower() */ case 7: /* "pandas/tslib.pyx":1447 * hour = int(found_dict['H']) * elif parse_code == 7: * hour = int(found_dict['I']) # <<<<<<<<<<<<<< * ampm = found_dict.get('p', '').lower() * # If there was no AM/PM indicator, we'll treat this like AM */ __pyx_t_5 = PyObject_GetItem(__pyx_v_found_dict, ((PyObject *)__pyx_n_s__I)); if (!__pyx_t_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1447; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1447; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyObject_Call(((PyObject *)((PyObject*)(&PyInt_Type))), ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1447; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __pyx_t_29 = __Pyx_PyInt_AsInt(__pyx_t_5); if (unlikely((__pyx_t_29 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1447; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_v_hour = __pyx_t_29; /* "pandas/tslib.pyx":1448 * elif parse_code == 7: * hour = int(found_dict['I']) * ampm = found_dict.get('p', '').lower() # <<<<<<<<<<<<<< * # If there was no AM/PM indicator, we'll treat this like AM * if ampm in ('', locale_time.am_pm[0]): */ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_found_dict, __pyx_n_s__get); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1448; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_k_tuple_93), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1448; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s__lower); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1448; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1448; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF_SET(__pyx_v_ampm, __pyx_t_4); __pyx_t_4 = 0; /* "pandas/tslib.pyx":1450 * ampm = found_dict.get('p', '').lower() * # If there was no AM/PM indicator, we'll treat this like AM * if ampm in ('', locale_time.am_pm[0]): # <<<<<<<<<<<<<< * # We're in AM so the hour is correct unless we're * # looking at 12 midnight. */ if (unlikely(!__pyx_v_locale_time)) { __Pyx_RaiseUnboundLocalError("locale_time"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1450; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_locale_time, __pyx_n_s__am_pm); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1450; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_GetItemInt(__pyx_t_4, 0, sizeof(long), PyInt_FromLong, 0, 0, 1); if (!__pyx_t_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1450; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_INCREF(__pyx_v_ampm); __pyx_t_4 = __pyx_v_ampm; __pyx_t_2 = PyObject_RichCompare(__pyx_t_4, ((PyObject *)__pyx_kp_s_27), Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1450; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_9 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1450; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (!((int)__pyx_t_9)) { __pyx_t_2 = PyObject_RichCompare(__pyx_t_4, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1450; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_10 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1450; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_30 = ((int)__pyx_t_10); } else { __pyx_t_30 = ((int)__pyx_t_9); } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_9 = (__pyx_t_30 != 0); if (__pyx_t_9) { /* "pandas/tslib.pyx":1454 * # looking at 12 midnight. * # 12 midnight == 12 AM == hour 0 * if hour == 12: # <<<<<<<<<<<<<< * hour = 0 * elif ampm == locale_time.am_pm[1]: */ __pyx_t_9 = ((__pyx_v_hour == 12) != 0); if (__pyx_t_9) { /* "pandas/tslib.pyx":1455 * # 12 midnight == 12 AM == hour 0 * if hour == 12: * hour = 0 # <<<<<<<<<<<<<< * elif ampm == locale_time.am_pm[1]: * # We're in PM so we need to add 12 to the hour unless */ __pyx_v_hour = 0; goto __pyx_L48; } __pyx_L48:; goto __pyx_L47; } /* "pandas/tslib.pyx":1456 * if hour == 12: * hour = 0 * elif ampm == locale_time.am_pm[1]: # <<<<<<<<<<<<<< * # We're in PM so we need to add 12 to the hour unless * # we're looking at 12 noon. */ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_locale_time, __pyx_n_s__am_pm); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1456; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_5, 1, sizeof(long), PyInt_FromLong, 0, 0, 1); if (!__pyx_t_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1456; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyObject_RichCompare(__pyx_v_ampm, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1456; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1456; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_9) { /* "pandas/tslib.pyx":1460 * # we're looking at 12 noon. * # 12 noon == 12 PM == hour 12 * if hour != 12: # <<<<<<<<<<<<<< * hour += 12 * elif parse_code == 8: */ __pyx_t_9 = ((__pyx_v_hour != 12) != 0); if (__pyx_t_9) { /* "pandas/tslib.pyx":1461 * # 12 noon == 12 PM == hour 12 * if hour != 12: * hour += 12 # <<<<<<<<<<<<<< * elif parse_code == 8: * minute = int(found_dict['M']) */ __pyx_v_hour = (__pyx_v_hour + 12); goto __pyx_L49; } __pyx_L49:; goto __pyx_L47; } __pyx_L47:; break; /* "pandas/tslib.pyx":1462 * if hour != 12: * hour += 12 * elif parse_code == 8: # <<<<<<<<<<<<<< * minute = int(found_dict['M']) * elif parse_code == 9: */ case 8: /* "pandas/tslib.pyx":1463 * hour += 12 * elif parse_code == 8: * minute = int(found_dict['M']) # <<<<<<<<<<<<<< * elif parse_code == 9: * second = int(found_dict['S']) */ __pyx_t_5 = PyObject_GetItem(__pyx_v_found_dict, ((PyObject *)__pyx_n_s__M)); if (!__pyx_t_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1463; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1463; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyObject_Call(((PyObject *)((PyObject*)(&PyInt_Type))), ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1463; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __pyx_t_29 = __Pyx_PyInt_AsInt(__pyx_t_5); if (unlikely((__pyx_t_29 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1463; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_v_minute = __pyx_t_29; break; /* "pandas/tslib.pyx":1464 * elif parse_code == 8: * minute = int(found_dict['M']) * elif parse_code == 9: # <<<<<<<<<<<<<< * second = int(found_dict['S']) * elif parse_code == 10: */ case 9: /* "pandas/tslib.pyx":1465 * minute = int(found_dict['M']) * elif parse_code == 9: * second = int(found_dict['S']) # <<<<<<<<<<<<<< * elif parse_code == 10: * s = found_dict['f'] */ __pyx_t_5 = PyObject_GetItem(__pyx_v_found_dict, ((PyObject *)__pyx_n_s__S)); if (!__pyx_t_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1465; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1465; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyObject_Call(((PyObject *)((PyObject*)(&PyInt_Type))), ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1465; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __pyx_t_29 = __Pyx_PyInt_AsInt(__pyx_t_5); if (unlikely((__pyx_t_29 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1465; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_v_second = __pyx_t_29; break; /* "pandas/tslib.pyx":1466 * elif parse_code == 9: * second = int(found_dict['S']) * elif parse_code == 10: # <<<<<<<<<<<<<< * s = found_dict['f'] * # Pad to always return microseconds. */ case 10: /* "pandas/tslib.pyx":1467 * second = int(found_dict['S']) * elif parse_code == 10: * s = found_dict['f'] # <<<<<<<<<<<<<< * # Pad to always return microseconds. * s += "0" * (6 - len(s)) */ __pyx_t_5 = PyObject_GetItem(__pyx_v_found_dict, ((PyObject *)__pyx_n_s__f)); if (!__pyx_t_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1467; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_XDECREF_SET(__pyx_v_s, __pyx_t_5); __pyx_t_5 = 0; /* "pandas/tslib.pyx":1469 * s = found_dict['f'] * # Pad to always return microseconds. * s += "0" * (6 - len(s)) # <<<<<<<<<<<<<< * fraction = int(s) * elif parse_code == 11: */ __pyx_t_31 = PyObject_Length(__pyx_v_s); if (unlikely(__pyx_t_31 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1469; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_5 = PyInt_FromSsize_t((6 - __pyx_t_31)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1469; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = PyNumber_Multiply(((PyObject *)__pyx_kp_s__0), __pyx_t_5); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1469; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_4)); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyNumber_InPlaceAdd(__pyx_v_s, ((PyObject *)__pyx_t_4)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1469; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __Pyx_DECREF_SET(__pyx_v_s, __pyx_t_5); __pyx_t_5 = 0; /* "pandas/tslib.pyx":1470 * # Pad to always return microseconds. * s += "0" * (6 - len(s)) * fraction = int(s) # <<<<<<<<<<<<<< * elif parse_code == 11: * weekday = locale_time.f_weekday.index(found_dict['A'].lower()) */ __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1470; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_v_s); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_s); __Pyx_GIVEREF(__pyx_v_s); __pyx_t_4 = PyObject_Call(((PyObject *)((PyObject*)(&PyInt_Type))), ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1470; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; __pyx_t_29 = __Pyx_PyInt_AsInt(__pyx_t_4); if (unlikely((__pyx_t_29 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1470; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_fraction = __pyx_t_29; break; /* "pandas/tslib.pyx":1471 * s += "0" * (6 - len(s)) * fraction = int(s) * elif parse_code == 11: # <<<<<<<<<<<<<< * weekday = locale_time.f_weekday.index(found_dict['A'].lower()) * elif parse_code == 12: */ case 11: /* "pandas/tslib.pyx":1472 * fraction = int(s) * elif parse_code == 11: * weekday = locale_time.f_weekday.index(found_dict['A'].lower()) # <<<<<<<<<<<<<< * elif parse_code == 12: * weekday = locale_time.a_weekday.index(found_dict['a'].lower()) */ if (unlikely(!__pyx_v_locale_time)) { __Pyx_RaiseUnboundLocalError("locale_time"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1472; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_locale_time, __pyx_n_s__f_weekday); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1472; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s__index); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1472; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyObject_GetItem(__pyx_v_found_dict, ((PyObject *)__pyx_n_s__A)); if (!__pyx_t_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1472; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s__lower); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1472; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1472; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1472; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1472; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __pyx_t_29 = __Pyx_PyInt_AsInt(__pyx_t_4); if (unlikely((__pyx_t_29 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1472; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_weekday = __pyx_t_29; break; /* "pandas/tslib.pyx":1473 * elif parse_code == 11: * weekday = locale_time.f_weekday.index(found_dict['A'].lower()) * elif parse_code == 12: # <<<<<<<<<<<<<< * weekday = locale_time.a_weekday.index(found_dict['a'].lower()) * elif parse_code == 13: */ case 12: /* "pandas/tslib.pyx":1474 * weekday = locale_time.f_weekday.index(found_dict['A'].lower()) * elif parse_code == 12: * weekday = locale_time.a_weekday.index(found_dict['a'].lower()) # <<<<<<<<<<<<<< * elif parse_code == 13: * weekday = int(found_dict['w']) */ if (unlikely(!__pyx_v_locale_time)) { __Pyx_RaiseUnboundLocalError("locale_time"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1474; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_locale_time, __pyx_n_s__a_weekday); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1474; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s__index); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1474; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyObject_GetItem(__pyx_v_found_dict, ((PyObject *)__pyx_n_s__a)); if (!__pyx_t_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1474; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s__lower); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1474; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1474; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1474; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1474; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; __pyx_t_29 = __Pyx_PyInt_AsInt(__pyx_t_4); if (unlikely((__pyx_t_29 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1474; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_weekday = __pyx_t_29; break; /* "pandas/tslib.pyx":1475 * elif parse_code == 12: * weekday = locale_time.a_weekday.index(found_dict['a'].lower()) * elif parse_code == 13: # <<<<<<<<<<<<<< * weekday = int(found_dict['w']) * if weekday == 0: */ case 13: /* "pandas/tslib.pyx":1476 * weekday = locale_time.a_weekday.index(found_dict['a'].lower()) * elif parse_code == 13: * weekday = int(found_dict['w']) # <<<<<<<<<<<<<< * if weekday == 0: * weekday = 6 */ __pyx_t_4 = PyObject_GetItem(__pyx_v_found_dict, ((PyObject *)__pyx_n_s__w)); if (!__pyx_t_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1476; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1476; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyObject_Call(((PyObject *)((PyObject*)(&PyInt_Type))), ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1476; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; __pyx_t_29 = __Pyx_PyInt_AsInt(__pyx_t_4); if (unlikely((__pyx_t_29 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1476; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_weekday = __pyx_t_29; /* "pandas/tslib.pyx":1477 * elif parse_code == 13: * weekday = int(found_dict['w']) * if weekday == 0: # <<<<<<<<<<<<<< * weekday = 6 * else: */ __pyx_t_9 = ((__pyx_v_weekday == 0) != 0); if (__pyx_t_9) { /* "pandas/tslib.pyx":1478 * weekday = int(found_dict['w']) * if weekday == 0: * weekday = 6 # <<<<<<<<<<<<<< * else: * weekday -= 1 */ __pyx_v_weekday = 6; goto __pyx_L50; } /*else*/ { /* "pandas/tslib.pyx":1480 * weekday = 6 * else: * weekday -= 1 # <<<<<<<<<<<<<< * elif parse_code == 14: * julian = int(found_dict['j']) */ __pyx_v_weekday = (__pyx_v_weekday - 1); } __pyx_L50:; break; /* "pandas/tslib.pyx":1481 * else: * weekday -= 1 * elif parse_code == 14: # <<<<<<<<<<<<<< * julian = int(found_dict['j']) * elif parse_code == 15 or parse_code == 16: */ case 14: /* "pandas/tslib.pyx":1482 * weekday -= 1 * elif parse_code == 14: * julian = int(found_dict['j']) # <<<<<<<<<<<<<< * elif parse_code == 15 or parse_code == 16: * week_of_year = int(found_dict[group_key]) */ __pyx_t_4 = PyObject_GetItem(__pyx_v_found_dict, ((PyObject *)__pyx_n_s__j)); if (!__pyx_t_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1482; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1482; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyObject_Call(((PyObject *)((PyObject*)(&PyInt_Type))), ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1482; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; __pyx_t_29 = __Pyx_PyInt_AsInt(__pyx_t_4); if (unlikely((__pyx_t_29 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1482; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_julian = __pyx_t_29; break; /* "pandas/tslib.pyx":1483 * elif parse_code == 14: * julian = int(found_dict['j']) * elif parse_code == 15 or parse_code == 16: # <<<<<<<<<<<<<< * week_of_year = int(found_dict[group_key]) * if group_key == 'U': */ case 15: case 16: /* "pandas/tslib.pyx":1484 * julian = int(found_dict['j']) * elif parse_code == 15 or parse_code == 16: * week_of_year = int(found_dict[group_key]) # <<<<<<<<<<<<<< * if group_key == 'U': * # U starts week on Sunday. */ __pyx_t_4 = PyObject_GetItem(__pyx_v_found_dict, __pyx_v_group_key); if (!__pyx_t_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1484; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1484; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyObject_Call(((PyObject *)((PyObject*)(&PyInt_Type))), ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1484; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; __Pyx_DECREF_SET(__pyx_v_week_of_year, __pyx_t_4); __pyx_t_4 = 0; /* "pandas/tslib.pyx":1485 * elif parse_code == 15 or parse_code == 16: * week_of_year = int(found_dict[group_key]) * if group_key == 'U': # <<<<<<<<<<<<<< * # U starts week on Sunday. * week_of_year_start = 6 */ __pyx_t_4 = PyObject_RichCompare(__pyx_v_group_key, ((PyObject *)__pyx_n_s__U), Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1485; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1485; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_9) { /* "pandas/tslib.pyx":1487 * if group_key == 'U': * # U starts week on Sunday. * week_of_year_start = 6 # <<<<<<<<<<<<<< * else: * # W starts week on Monday. */ __pyx_v_week_of_year_start = 6; goto __pyx_L51; } /*else*/ { /* "pandas/tslib.pyx":1490 * else: * # W starts week on Monday. * week_of_year_start = 0 # <<<<<<<<<<<<<< * elif parse_code == 17: * # Since -1 is default value only need to worry about setting tz */ __pyx_v_week_of_year_start = 0; } __pyx_L51:; break; /* "pandas/tslib.pyx":1491 * # W starts week on Monday. * week_of_year_start = 0 * elif parse_code == 17: # <<<<<<<<<<<<<< * # Since -1 is default value only need to worry about setting tz * # if it can be something other than -1. */ case 17: /* "pandas/tslib.pyx":1494 * # Since -1 is default value only need to worry about setting tz * # if it can be something other than -1. * found_zone = found_dict['Z'].lower() # <<<<<<<<<<<<<< * for value, tz_values in enumerate(locale_time.timezone): * if found_zone in tz_values: */ __pyx_t_4 = PyObject_GetItem(__pyx_v_found_dict, ((PyObject *)__pyx_n_s__Z)); if (!__pyx_t_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1494; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s__lower); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1494; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1494; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF_SET(__pyx_v_found_zone, __pyx_t_4); __pyx_t_4 = 0; /* "pandas/tslib.pyx":1495 * # if it can be something other than -1. * found_zone = found_dict['Z'].lower() * for value, tz_values in enumerate(locale_time.timezone): # <<<<<<<<<<<<<< * if found_zone in tz_values: * # Deal w/ bad locale setup where timezone names are the */ __Pyx_INCREF(__pyx_int_0); __pyx_t_4 = __pyx_int_0; if (unlikely(!__pyx_v_locale_time)) { __Pyx_RaiseUnboundLocalError("locale_time"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1495; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_locale_time, __pyx_n_s__timezone); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1495; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); if (PyList_CheckExact(__pyx_t_5) || PyTuple_CheckExact(__pyx_t_5)) { __pyx_t_2 = __pyx_t_5; __Pyx_INCREF(__pyx_t_2); __pyx_t_31 = 0; __pyx_t_32 = NULL; } else { __pyx_t_31 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1495; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_32 = Py_TYPE(__pyx_t_2)->tp_iternext; } __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; for (;;) { if (!__pyx_t_32 && PyList_CheckExact(__pyx_t_2)) { if (__pyx_t_31 >= PyList_GET_SIZE(__pyx_t_2)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_5 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_31); __Pyx_INCREF(__pyx_t_5); __pyx_t_31++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1495; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_5 = PySequence_ITEM(__pyx_t_2, __pyx_t_31); __pyx_t_31++; if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1495; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif } else if (!__pyx_t_32 && PyTuple_CheckExact(__pyx_t_2)) { if (__pyx_t_31 >= PyTuple_GET_SIZE(__pyx_t_2)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_31); __Pyx_INCREF(__pyx_t_5); __pyx_t_31++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1495; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_5 = PySequence_ITEM(__pyx_t_2, __pyx_t_31); __pyx_t_31++; if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1495; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif } else { __pyx_t_5 = __pyx_t_32(__pyx_t_2); if (unlikely(!__pyx_t_5)) { if (PyErr_Occurred()) { if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear(); else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1495; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } break; } __Pyx_GOTREF(__pyx_t_5); } __Pyx_XDECREF_SET(__pyx_v_tz_values, __pyx_t_5); __pyx_t_5 = 0; __Pyx_INCREF(__pyx_t_4); __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_4); __pyx_t_5 = PyNumber_Add(__pyx_t_4, __pyx_int_1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1495; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = __pyx_t_5; __pyx_t_5 = 0; /* "pandas/tslib.pyx":1496 * found_zone = found_dict['Z'].lower() * for value, tz_values in enumerate(locale_time.timezone): * if found_zone in tz_values: # <<<<<<<<<<<<<< * # Deal w/ bad locale setup where timezone names are the * # same and yet time.daylight is true; too ambiguous to */ __pyx_t_9 = (__Pyx_PySequence_Contains(__pyx_v_found_zone, __pyx_v_tz_values, Py_EQ)); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1496; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_30 = (__pyx_t_9 != 0); if (__pyx_t_30) { /* "pandas/tslib.pyx":1500 * # same and yet time.daylight is true; too ambiguous to * # be able to tell what timezone has daylight savings * if (time.tzname[0] == time.tzname[1] and # <<<<<<<<<<<<<< * time.daylight and found_zone not in ("utc", "gmt")): * break */ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s__time); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1500; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s__tzname); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1500; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_16); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_GetItemInt(__pyx_t_16, 0, sizeof(long), PyInt_FromLong, 0, 0, 1); if (!__pyx_t_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1500; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; __pyx_t_16 = __Pyx_GetModuleGlobalName(__pyx_n_s__time); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1500; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_16); __pyx_t_33 = __Pyx_PyObject_GetAttrStr(__pyx_t_16, __pyx_n_s__tzname); if (unlikely(!__pyx_t_33)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1500; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_33); __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; __pyx_t_16 = __Pyx_GetItemInt(__pyx_t_33, 1, sizeof(long), PyInt_FromLong, 0, 0, 1); if (!__pyx_t_16) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1500; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_16); __Pyx_DECREF(__pyx_t_33); __pyx_t_33 = 0; __pyx_t_33 = PyObject_RichCompare(__pyx_t_5, __pyx_t_16, Py_EQ); __Pyx_XGOTREF(__pyx_t_33); if (unlikely(!__pyx_t_33)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1500; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; __pyx_t_30 = __Pyx_PyObject_IsTrue(__pyx_t_33); if (unlikely(__pyx_t_30 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1500; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_33); __pyx_t_33 = 0; if (__pyx_t_30) { /* "pandas/tslib.pyx":1501 * # be able to tell what timezone has daylight savings * if (time.tzname[0] == time.tzname[1] and * time.daylight and found_zone not in ("utc", "gmt")): # <<<<<<<<<<<<<< * break * else: */ __pyx_t_33 = __Pyx_GetModuleGlobalName(__pyx_n_s__time); if (unlikely(!__pyx_t_33)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1501; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_33); __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_t_33, __pyx_n_s__daylight); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1501; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_16); __Pyx_DECREF(__pyx_t_33); __pyx_t_33 = 0; __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_16); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1501; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; if (__pyx_t_9) { __Pyx_INCREF(__pyx_v_found_zone); __pyx_t_16 = __pyx_v_found_zone; __pyx_t_33 = PyObject_RichCompare(__pyx_t_16, ((PyObject *)__pyx_n_s__utc), Py_NE); __Pyx_XGOTREF(__pyx_t_33); if (unlikely(!__pyx_t_33)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1501; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_33); if (unlikely((__pyx_t_10 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1501; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_33); __pyx_t_33 = 0; if (((int)__pyx_t_10)) { __pyx_t_33 = PyObject_RichCompare(__pyx_t_16, ((PyObject *)__pyx_n_s__gmt), Py_NE); __Pyx_XGOTREF(__pyx_t_33); if (unlikely(!__pyx_t_33)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1501; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_34 = __Pyx_PyObject_IsTrue(__pyx_t_33); if (unlikely((__pyx_t_34 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1501; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_33); __pyx_t_33 = 0; __pyx_t_35 = ((int)__pyx_t_34); } else { __pyx_t_35 = ((int)__pyx_t_10); } __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; __pyx_t_10 = __pyx_t_35; __pyx_t_35 = __pyx_t_10; } else { __pyx_t_35 = __pyx_t_9; } __pyx_t_9 = __pyx_t_35; } else { __pyx_t_9 = __pyx_t_30; } if (__pyx_t_9) { /* "pandas/tslib.pyx":1502 * if (time.tzname[0] == time.tzname[1] and * time.daylight and found_zone not in ("utc", "gmt")): * break # <<<<<<<<<<<<<< * else: * tz = value */ goto __pyx_L53_break; goto __pyx_L55; } /*else*/ { /* "pandas/tslib.pyx":1504 * break * else: * tz = value # <<<<<<<<<<<<<< * break * # If we know the wk of the year and what day of that wk, we can figure */ __Pyx_INCREF(__pyx_v_value); __Pyx_DECREF_SET(__pyx_v_tz, __pyx_v_value); /* "pandas/tslib.pyx":1505 * else: * tz = value * break # <<<<<<<<<<<<<< * # If we know the wk of the year and what day of that wk, we can figure * # out the Julian day of the year. */ goto __pyx_L53_break; } __pyx_L55:; goto __pyx_L54; } __pyx_L54:; } __pyx_L53_break:; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; break; } } __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; /* "pandas/tslib.pyx":1508 * # If we know the wk of the year and what day of that wk, we can figure * # out the Julian day of the year. * if julian == -1 and week_of_year != -1 and weekday != -1: # <<<<<<<<<<<<<< * week_starts_Mon = True if week_of_year_start == 0 else False * julian = _calc_julian_from_U_or_W(year, week_of_year, weekday, */ __pyx_t_9 = (__pyx_v_julian == -1); if (__pyx_t_9) { __pyx_t_15 = PyObject_RichCompare(__pyx_v_week_of_year, __pyx_int_neg_1, Py_NE); __Pyx_XGOTREF(__pyx_t_15); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1508; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_30 = __Pyx_PyObject_IsTrue(__pyx_t_15); if (unlikely(__pyx_t_30 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1508; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; if (__pyx_t_30) { __pyx_t_35 = (__pyx_v_weekday != -1); __pyx_t_10 = __pyx_t_35; } else { __pyx_t_10 = __pyx_t_30; } __pyx_t_30 = __pyx_t_10; } else { __pyx_t_30 = __pyx_t_9; } if (__pyx_t_30) { /* "pandas/tslib.pyx":1509 * # out the Julian day of the year. * if julian == -1 and week_of_year != -1 and weekday != -1: * week_starts_Mon = True if week_of_year_start == 0 else False # <<<<<<<<<<<<<< * julian = _calc_julian_from_U_or_W(year, week_of_year, weekday, * week_starts_Mon) */ if (((__pyx_v_week_of_year_start == 0) != 0)) { __pyx_t_30 = 1; } else { __pyx_t_30 = 0; } __pyx_v_week_starts_Mon = __pyx_t_30; /* "pandas/tslib.pyx":1510 * if julian == -1 and week_of_year != -1 and weekday != -1: * week_starts_Mon = True if week_of_year_start == 0 else False * julian = _calc_julian_from_U_or_W(year, week_of_year, weekday, # <<<<<<<<<<<<<< * week_starts_Mon) * # Cannot pre-calculate datetime_date() since can change in Julian */ __pyx_t_15 = __Pyx_GetModuleGlobalName(__pyx_n_s_94); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1510; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_15); __pyx_t_4 = PyInt_FromLong(__pyx_v_year); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1510; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_2 = PyInt_FromLong(__pyx_v_weekday); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1510; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); /* "pandas/tslib.pyx":1511 * week_starts_Mon = True if week_of_year_start == 0 else False * julian = _calc_julian_from_U_or_W(year, week_of_year, weekday, * week_starts_Mon) # <<<<<<<<<<<<<< * # Cannot pre-calculate datetime_date() since can change in Julian * # calculation and thus could have different value for the day of the wk */ __pyx_t_16 = __Pyx_PyBool_FromLong(__pyx_v_week_starts_Mon); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1511; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_16); __pyx_t_33 = PyTuple_New(4); if (unlikely(!__pyx_t_33)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1510; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_33); PyTuple_SET_ITEM(__pyx_t_33, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __Pyx_INCREF(__pyx_v_week_of_year); PyTuple_SET_ITEM(__pyx_t_33, 1, __pyx_v_week_of_year); __Pyx_GIVEREF(__pyx_v_week_of_year); PyTuple_SET_ITEM(__pyx_t_33, 2, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_33, 3, __pyx_t_16); __Pyx_GIVEREF(__pyx_t_16); __pyx_t_4 = 0; __pyx_t_2 = 0; __pyx_t_16 = 0; __pyx_t_16 = PyObject_Call(__pyx_t_15, ((PyObject *)__pyx_t_33), NULL); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1510; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_16); __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_33)); __pyx_t_33 = 0; __pyx_t_14 = __Pyx_PyInt_AsInt(__pyx_t_16); if (unlikely((__pyx_t_14 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1510; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; __pyx_v_julian = __pyx_t_14; goto __pyx_L56; } __pyx_L56:; /* "pandas/tslib.pyx":1515 * # calculation and thus could have different value for the day of the wk * # calculation. * if julian == -1: # <<<<<<<<<<<<<< * # Need to add 1 to result since first day of the year is 1, not 0. * julian = datetime_date(year, month, day).toordinal() - \ */ __pyx_t_30 = ((__pyx_v_julian == -1) != 0); if (__pyx_t_30) { /* "pandas/tslib.pyx":1517 * if julian == -1: * # Need to add 1 to result since first day of the year is 1, not 0. * julian = datetime_date(year, month, day).toordinal() - \ # <<<<<<<<<<<<<< * datetime_date(year, 1, 1).toordinal() + 1 * else: # Assume that if they bothered to include Julian day it will */ __pyx_t_16 = __Pyx_GetModuleGlobalName(__pyx_n_s__datetime_date); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1517; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_16); __pyx_t_33 = PyInt_FromLong(__pyx_v_year); if (unlikely(!__pyx_t_33)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1517; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_33); __pyx_t_15 = PyInt_FromLong(__pyx_v_month); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1517; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_15); __pyx_t_2 = PyInt_FromLong(__pyx_v_day); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1517; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1517; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_33); __Pyx_GIVEREF(__pyx_t_33); PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_15); __Pyx_GIVEREF(__pyx_t_15); PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_33 = 0; __pyx_t_15 = 0; __pyx_t_2 = 0; __pyx_t_2 = PyObject_Call(__pyx_t_16, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1517; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__toordinal); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1517; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1517; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "pandas/tslib.pyx":1518 * # Need to add 1 to result since first day of the year is 1, not 0. * julian = datetime_date(year, month, day).toordinal() - \ * datetime_date(year, 1, 1).toordinal() + 1 # <<<<<<<<<<<<<< * else: # Assume that if they bothered to include Julian day it will * # be accurate. */ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s__datetime_date); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1518; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_16 = PyInt_FromLong(__pyx_v_year); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1518; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_16); __pyx_t_15 = PyTuple_New(3); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1518; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_15); PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_t_16); __Pyx_GIVEREF(__pyx_t_16); __Pyx_INCREF(__pyx_int_1); PyTuple_SET_ITEM(__pyx_t_15, 1, __pyx_int_1); __Pyx_GIVEREF(__pyx_int_1); __Pyx_INCREF(__pyx_int_1); PyTuple_SET_ITEM(__pyx_t_15, 2, __pyx_int_1); __Pyx_GIVEREF(__pyx_int_1); __pyx_t_16 = 0; __pyx_t_16 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_15), NULL); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1518; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_16); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_15)); __pyx_t_15 = 0; __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_t_16, __pyx_n_s__toordinal); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1518; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_15); __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; __pyx_t_16 = PyObject_Call(__pyx_t_15, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1518; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_16); __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; __pyx_t_15 = PyNumber_Subtract(__pyx_t_2, __pyx_t_16); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1517; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_15); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; __pyx_t_16 = PyNumber_Add(__pyx_t_15, __pyx_int_1); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1518; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_16); __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; __pyx_t_14 = __Pyx_PyInt_AsInt(__pyx_t_16); if (unlikely((__pyx_t_14 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1518; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; __pyx_v_julian = __pyx_t_14; goto __pyx_L57; } /*else*/ { /* "pandas/tslib.pyx":1521 * else: # Assume that if they bothered to include Julian day it will * # be accurate. * datetime_result = datetime_date.fromordinal( # <<<<<<<<<<<<<< * (julian - 1) + datetime_date(year, 1, 1).toordinal()) * year = datetime_result.year */ __pyx_t_16 = __Pyx_GetModuleGlobalName(__pyx_n_s__datetime_date); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1521; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_16); __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_t_16, __pyx_n_s__fromordinal); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1521; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_15); __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; /* "pandas/tslib.pyx":1522 * # be accurate. * datetime_result = datetime_date.fromordinal( * (julian - 1) + datetime_date(year, 1, 1).toordinal()) # <<<<<<<<<<<<<< * year = datetime_result.year * month = datetime_result.month */ __pyx_t_16 = PyInt_FromLong((__pyx_v_julian - 1)); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1522; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_16); __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__datetime_date); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1522; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = PyInt_FromLong(__pyx_v_year); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1522; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_33 = PyTuple_New(3); if (unlikely(!__pyx_t_33)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1522; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_33); PyTuple_SET_ITEM(__pyx_t_33, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __Pyx_INCREF(__pyx_int_1); PyTuple_SET_ITEM(__pyx_t_33, 1, __pyx_int_1); __Pyx_GIVEREF(__pyx_int_1); __Pyx_INCREF(__pyx_int_1); PyTuple_SET_ITEM(__pyx_t_33, 2, __pyx_int_1); __Pyx_GIVEREF(__pyx_int_1); __pyx_t_4 = 0; __pyx_t_4 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_33), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1522; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_33)); __pyx_t_33 = 0; __pyx_t_33 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s__toordinal); if (unlikely(!__pyx_t_33)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1522; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_33); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyObject_Call(__pyx_t_33, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1522; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_33); __pyx_t_33 = 0; __pyx_t_33 = PyNumber_Add(__pyx_t_16, __pyx_t_4); if (unlikely(!__pyx_t_33)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1522; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_33); __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1521; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_33); __Pyx_GIVEREF(__pyx_t_33); __pyx_t_33 = 0; __pyx_t_33 = PyObject_Call(__pyx_t_15, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_33)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1521; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_33); __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __Pyx_XDECREF_SET(__pyx_v_datetime_result, __pyx_t_33); __pyx_t_33 = 0; /* "pandas/tslib.pyx":1523 * datetime_result = datetime_date.fromordinal( * (julian - 1) + datetime_date(year, 1, 1).toordinal()) * year = datetime_result.year # <<<<<<<<<<<<<< * month = datetime_result.month * day = datetime_result.day */ __pyx_t_33 = __Pyx_PyObject_GetAttrStr(__pyx_v_datetime_result, __pyx_n_s__year); if (unlikely(!__pyx_t_33)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1523; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_33); __pyx_t_14 = __Pyx_PyInt_AsInt(__pyx_t_33); if (unlikely((__pyx_t_14 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1523; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_33); __pyx_t_33 = 0; __pyx_v_year = __pyx_t_14; /* "pandas/tslib.pyx":1524 * (julian - 1) + datetime_date(year, 1, 1).toordinal()) * year = datetime_result.year * month = datetime_result.month # <<<<<<<<<<<<<< * day = datetime_result.day * if weekday == -1: */ __pyx_t_33 = __Pyx_PyObject_GetAttrStr(__pyx_v_datetime_result, __pyx_n_s__month); if (unlikely(!__pyx_t_33)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1524; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_33); __pyx_t_14 = __Pyx_PyInt_AsInt(__pyx_t_33); if (unlikely((__pyx_t_14 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1524; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_33); __pyx_t_33 = 0; __pyx_v_month = __pyx_t_14; /* "pandas/tslib.pyx":1525 * year = datetime_result.year * month = datetime_result.month * day = datetime_result.day # <<<<<<<<<<<<<< * if weekday == -1: * weekday = datetime_date(year, month, day).weekday() */ __pyx_t_33 = __Pyx_PyObject_GetAttrStr(__pyx_v_datetime_result, __pyx_n_s__day); if (unlikely(!__pyx_t_33)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1525; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_33); __pyx_t_14 = __Pyx_PyInt_AsInt(__pyx_t_33); if (unlikely((__pyx_t_14 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1525; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_33); __pyx_t_33 = 0; __pyx_v_day = __pyx_t_14; } __pyx_L57:; /* "pandas/tslib.pyx":1526 * month = datetime_result.month * day = datetime_result.day * if weekday == -1: # <<<<<<<<<<<<<< * weekday = datetime_date(year, month, day).weekday() * */ __pyx_t_30 = ((__pyx_v_weekday == -1) != 0); if (__pyx_t_30) { /* "pandas/tslib.pyx":1527 * day = datetime_result.day * if weekday == -1: * weekday = datetime_date(year, month, day).weekday() # <<<<<<<<<<<<<< * * dts.year = year */ __pyx_t_33 = __Pyx_GetModuleGlobalName(__pyx_n_s__datetime_date); if (unlikely(!__pyx_t_33)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1527; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_33); __pyx_t_4 = PyInt_FromLong(__pyx_v_year); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1527; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_15 = PyInt_FromLong(__pyx_v_month); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1527; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_15); __pyx_t_16 = PyInt_FromLong(__pyx_v_day); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1527; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_16); __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1527; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_15); __Pyx_GIVEREF(__pyx_t_15); PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_t_16); __Pyx_GIVEREF(__pyx_t_16); __pyx_t_4 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_16 = PyObject_Call(__pyx_t_33, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1527; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_16); __Pyx_DECREF(__pyx_t_33); __pyx_t_33 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_16, __pyx_n_s__weekday); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1527; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; __pyx_t_16 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1527; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_16); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_14 = __Pyx_PyInt_AsInt(__pyx_t_16); if (unlikely((__pyx_t_14 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1527; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; __pyx_v_weekday = __pyx_t_14; goto __pyx_L58; } __pyx_L58:; /* "pandas/tslib.pyx":1529 * weekday = datetime_date(year, month, day).weekday() * * dts.year = year # <<<<<<<<<<<<<< * dts.month = month * dts.day = day */ __pyx_v_dts.year = __pyx_v_year; /* "pandas/tslib.pyx":1530 * * dts.year = year * dts.month = month # <<<<<<<<<<<<<< * dts.day = day * dts.hour = hour */ __pyx_v_dts.month = __pyx_v_month; /* "pandas/tslib.pyx":1531 * dts.year = year * dts.month = month * dts.day = day # <<<<<<<<<<<<<< * dts.hour = hour * dts.min = minute */ __pyx_v_dts.day = __pyx_v_day; /* "pandas/tslib.pyx":1532 * dts.month = month * dts.day = day * dts.hour = hour # <<<<<<<<<<<<<< * dts.min = minute * dts.sec = second */ __pyx_v_dts.hour = __pyx_v_hour; /* "pandas/tslib.pyx":1533 * dts.day = day * dts.hour = hour * dts.min = minute # <<<<<<<<<<<<<< * dts.sec = second * dts.us = fraction */ __pyx_v_dts.min = __pyx_v_minute; /* "pandas/tslib.pyx":1534 * dts.hour = hour * dts.min = minute * dts.sec = second # <<<<<<<<<<<<<< * dts.us = fraction * */ __pyx_v_dts.sec = __pyx_v_second; /* "pandas/tslib.pyx":1535 * dts.min = minute * dts.sec = second * dts.us = fraction # <<<<<<<<<<<<<< * * iresult[i] = pandas_datetimestruct_to_datetime(PANDAS_FR_ns, &dts) */ __pyx_v_dts.us = __pyx_v_fraction; /* "pandas/tslib.pyx":1537 * dts.us = fraction * * iresult[i] = pandas_datetimestruct_to_datetime(PANDAS_FR_ns, &dts) # <<<<<<<<<<<<<< * try: * _check_dts_bounds(&dts) */ __pyx_t_28 = __pyx_v_i; __pyx_t_14 = -1; if (__pyx_t_28 < 0) { __pyx_t_28 += __pyx_pybuffernd_iresult.diminfo[0].shape; if (unlikely(__pyx_t_28 < 0)) __pyx_t_14 = 0; } else if (unlikely(__pyx_t_28 >= __pyx_pybuffernd_iresult.diminfo[0].shape)) __pyx_t_14 = 0; if (unlikely(__pyx_t_14 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_14); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1537; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_iresult.rcbuffer->pybuffer.buf, __pyx_t_28, __pyx_pybuffernd_iresult.diminfo[0].strides) = pandas_datetimestruct_to_datetime(PANDAS_FR_ns, (&__pyx_v_dts)); /* "pandas/tslib.pyx":1538 * * iresult[i] = pandas_datetimestruct_to_datetime(PANDAS_FR_ns, &dts) * try: # <<<<<<<<<<<<<< * _check_dts_bounds(&dts) * except ValueError: */ { __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_3); __Pyx_XGOTREF(__pyx_t_7); __Pyx_XGOTREF(__pyx_t_8); __Pyx_XGOTREF(__pyx_t_3); /*try:*/ { /* "pandas/tslib.pyx":1539 * iresult[i] = pandas_datetimestruct_to_datetime(PANDAS_FR_ns, &dts) * try: * _check_dts_bounds(&dts) # <<<<<<<<<<<<<< * except ValueError: * if coerce: */ __pyx_t_16 = __pyx_f_6pandas_5tslib__check_dts_bounds((&__pyx_v_dts)); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1539; __pyx_clineno = __LINE__; goto __pyx_L59_error;} __Pyx_GOTREF(__pyx_t_16); __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; } __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L66_try_end; __pyx_L59_error:; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0; __Pyx_XDECREF(__pyx_t_33); __pyx_t_33 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0; /* "pandas/tslib.pyx":1540 * try: * _check_dts_bounds(&dts) * except ValueError: # <<<<<<<<<<<<<< * if coerce: * iresult[i] = iNaT */ __pyx_t_14 = PyErr_ExceptionMatches(__pyx_builtin_ValueError); if (__pyx_t_14) { __Pyx_AddTraceback("pandas.tslib.array_strptime", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_16, &__pyx_t_2, &__pyx_t_33) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1540; __pyx_clineno = __LINE__; goto __pyx_L61_except_error;} __Pyx_GOTREF(__pyx_t_16); __Pyx_GOTREF(__pyx_t_2); __Pyx_GOTREF(__pyx_t_33); /* "pandas/tslib.pyx":1541 * _check_dts_bounds(&dts) * except ValueError: * if coerce: # <<<<<<<<<<<<<< * iresult[i] = iNaT * continue */ __pyx_t_30 = __Pyx_PyObject_IsTrue(__pyx_v_coerce); if (unlikely(__pyx_t_30 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1541; __pyx_clineno = __LINE__; goto __pyx_L61_except_error;} if (__pyx_t_30) { /* "pandas/tslib.pyx":1542 * except ValueError: * if coerce: * iresult[i] = iNaT # <<<<<<<<<<<<<< * continue * raise */ __pyx_t_15 = __Pyx_GetModuleGlobalName(__pyx_n_s__iNaT); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1542; __pyx_clineno = __LINE__; goto __pyx_L61_except_error;} __Pyx_GOTREF(__pyx_t_15); __pyx_t_20 = __Pyx_PyInt_from_py_npy_int64(__pyx_t_15); if (unlikely((__pyx_t_20 == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1542; __pyx_clineno = __LINE__; goto __pyx_L61_except_error;} __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; __pyx_t_27 = __pyx_v_i; __pyx_t_14 = -1; if (__pyx_t_27 < 0) { __pyx_t_27 += __pyx_pybuffernd_iresult.diminfo[0].shape; if (unlikely(__pyx_t_27 < 0)) __pyx_t_14 = 0; } else if (unlikely(__pyx_t_27 >= __pyx_pybuffernd_iresult.diminfo[0].shape)) __pyx_t_14 = 0; if (unlikely(__pyx_t_14 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_14); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1542; __pyx_clineno = __LINE__; goto __pyx_L61_except_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_iresult.rcbuffer->pybuffer.buf, __pyx_t_27, __pyx_pybuffernd_iresult.diminfo[0].strides) = __pyx_t_20; /* "pandas/tslib.pyx":1543 * if coerce: * iresult[i] = iNaT * continue # <<<<<<<<<<<<<< * raise * */ goto __pyx_L68_except_continue; goto __pyx_L69; } __pyx_L69:; /* "pandas/tslib.pyx":1544 * iresult[i] = iNaT * continue * raise # <<<<<<<<<<<<<< * * return result */ __Pyx_GIVEREF(__pyx_t_16); __Pyx_GIVEREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_33); __Pyx_ErrRestore(__pyx_t_16, __pyx_t_2, __pyx_t_33); __pyx_t_16 = 0; __pyx_t_2 = 0; __pyx_t_33 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1544; __pyx_clineno = __LINE__; goto __pyx_L61_except_error;} __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_33); __pyx_t_33 = 0; goto __pyx_L60_exception_handled; __pyx_L68_except_continue:; __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_33); __pyx_t_33 = 0; goto __pyx_L65_try_continue; } __pyx_L61_except_error:; __Pyx_XGIVEREF(__pyx_t_7); __Pyx_XGIVEREF(__pyx_t_8); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_3); goto __pyx_L1_error; __pyx_L65_try_continue:; __Pyx_XGIVEREF(__pyx_t_7); __Pyx_XGIVEREF(__pyx_t_8); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_3); goto __pyx_L35_continue; __pyx_L60_exception_handled:; __Pyx_XGIVEREF(__pyx_t_7); __Pyx_XGIVEREF(__pyx_t_8); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_3); __pyx_L66_try_end:; } __pyx_L35_continue:; } /* "pandas/tslib.pyx":1546 * raise * * return result # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_result); __pyx_r = __pyx_v_result; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_15); __Pyx_XDECREF(__pyx_t_16); __Pyx_XDECREF(__pyx_t_33); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_iresult.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.tslib.array_strptime", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_iresult.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_iresult); __Pyx_XDECREF(__pyx_v_val); __Pyx_XDECREF(__pyx_v_locale_time); __Pyx_XDECREF(__pyx_v_format_regex); __Pyx_XDECREF(__pyx_v_err); __Pyx_XDECREF(__pyx_v_bad_directive); __Pyx_XDECREF(__pyx_v_result); __Pyx_XDECREF(__pyx_v__parse_code_table); __Pyx_XDECREF(__pyx_v_found); __Pyx_XDECREF(__pyx_v_tz); __Pyx_XDECREF(__pyx_v_week_of_year); __Pyx_XDECREF(__pyx_v_found_dict); __Pyx_XDECREF(__pyx_v_group_key); __Pyx_XDECREF(__pyx_v_ampm); __Pyx_XDECREF(__pyx_v_s); __Pyx_XDECREF(__pyx_v_found_zone); __Pyx_XDECREF(__pyx_v_value); __Pyx_XDECREF(__pyx_v_tz_values); __Pyx_XDECREF(__pyx_v_datetime_result); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/tslib.pyx":1549 * * * cdef inline _get_datetime64_nanos(object val): # <<<<<<<<<<<<<< * cdef: * pandas_datetimestruct dts */ static CYTHON_INLINE PyObject *__pyx_f_6pandas_5tslib__get_datetime64_nanos(PyObject *__pyx_v_val) { pandas_datetimestruct __pyx_v_dts; PANDAS_DATETIMEUNIT __pyx_v_unit; npy_datetime __pyx_v_ival; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_get_datetime64_nanos", 0); /* "pandas/tslib.pyx":1555 * npy_datetime ival * * unit = get_datetime64_unit(val) # <<<<<<<<<<<<<< * if unit == 3: * raise ValueError('NumPy 1.6.1 business freq not supported') */ __pyx_v_unit = get_datetime64_unit(__pyx_v_val); /* "pandas/tslib.pyx":1556 * * unit = get_datetime64_unit(val) * if unit == 3: # <<<<<<<<<<<<<< * raise ValueError('NumPy 1.6.1 business freq not supported') * */ __pyx_t_1 = ((__pyx_v_unit == 3) != 0); if (__pyx_t_1) { /* "pandas/tslib.pyx":1557 * unit = get_datetime64_unit(val) * if unit == 3: * raise ValueError('NumPy 1.6.1 business freq not supported') # <<<<<<<<<<<<<< * * ival = get_datetime64_value(val) */ __pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_96), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1557; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 1557; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L3; } __pyx_L3:; /* "pandas/tslib.pyx":1559 * raise ValueError('NumPy 1.6.1 business freq not supported') * * ival = get_datetime64_value(val) # <<<<<<<<<<<<<< * * if unit != PANDAS_FR_ns: */ __pyx_v_ival = get_datetime64_value(__pyx_v_val); /* "pandas/tslib.pyx":1561 * ival = get_datetime64_value(val) * * if unit != PANDAS_FR_ns: # <<<<<<<<<<<<<< * pandas_datetime_to_datetimestruct(ival, unit, &dts) * _check_dts_bounds(&dts) */ __pyx_t_1 = ((__pyx_v_unit != PANDAS_FR_ns) != 0); if (__pyx_t_1) { /* "pandas/tslib.pyx":1562 * * if unit != PANDAS_FR_ns: * pandas_datetime_to_datetimestruct(ival, unit, &dts) # <<<<<<<<<<<<<< * _check_dts_bounds(&dts) * return pandas_datetimestruct_to_datetime(PANDAS_FR_ns, &dts) */ pandas_datetime_to_datetimestruct(__pyx_v_ival, __pyx_v_unit, (&__pyx_v_dts)); /* "pandas/tslib.pyx":1563 * if unit != PANDAS_FR_ns: * pandas_datetime_to_datetimestruct(ival, unit, &dts) * _check_dts_bounds(&dts) # <<<<<<<<<<<<<< * return pandas_datetimestruct_to_datetime(PANDAS_FR_ns, &dts) * else: */ __pyx_t_2 = __pyx_f_6pandas_5tslib__check_dts_bounds((&__pyx_v_dts)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1563; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/tslib.pyx":1564 * pandas_datetime_to_datetimestruct(ival, unit, &dts) * _check_dts_bounds(&dts) * return pandas_datetimestruct_to_datetime(PANDAS_FR_ns, &dts) # <<<<<<<<<<<<<< * else: * return ival */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyInt_to_py_npy_int64(pandas_datetimestruct_to_datetime(PANDAS_FR_ns, (&__pyx_v_dts))); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1564; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; goto __pyx_L4; } /*else*/ { /* "pandas/tslib.pyx":1566 * return pandas_datetimestruct_to_datetime(PANDAS_FR_ns, &dts) * else: * return ival # <<<<<<<<<<<<<< * * cpdef inline int64_t cast_from_unit(object ts, object unit) except -1: */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyInt_to_py_npy_int64(__pyx_v_ival); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1566; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; } __pyx_L4:; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("pandas.tslib._get_datetime64_nanos", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/tslib.pyx":1568 * return ival * * cpdef inline int64_t cast_from_unit(object ts, object unit) except -1: # <<<<<<<<<<<<<< * """ return a casting of the unit represented to nanoseconds * round the fractional part of a float to our precision, p """ */ static PyObject *__pyx_pw_6pandas_5tslib_37cast_from_unit(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static CYTHON_INLINE __pyx_t_5numpy_int64_t __pyx_f_6pandas_5tslib_cast_from_unit(PyObject *__pyx_v_ts, PyObject *__pyx_v_unit, CYTHON_UNUSED int __pyx_skip_dispatch) { PyObject *__pyx_v_m = NULL; long __pyx_v_p; PyObject *__pyx_v_base = NULL; PyObject *__pyx_v_frac = NULL; __pyx_t_5numpy_int64_t __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; int __pyx_t_3; int __pyx_t_4; __pyx_t_5numpy_int64_t __pyx_t_5; PyObject *__pyx_t_6 = NULL; __pyx_t_5numpy_int64_t __pyx_t_7; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("cast_from_unit", 0); /* "pandas/tslib.pyx":1571 * """ return a casting of the unit represented to nanoseconds * round the fractional part of a float to our precision, p """ * if unit == 'D' or unit == 'd': # <<<<<<<<<<<<<< * m = 1000000000L * 86400 * p = 6 */ __pyx_t_1 = PyObject_RichCompare(__pyx_v_unit, ((PyObject *)__pyx_n_s__D), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1571; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1571; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (!__pyx_t_2) { __pyx_t_1 = PyObject_RichCompare(__pyx_v_unit, ((PyObject *)__pyx_n_s__d), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1571; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1571; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_4 = __pyx_t_3; } else { __pyx_t_4 = __pyx_t_2; } if (__pyx_t_4) { /* "pandas/tslib.pyx":1572 * round the fractional part of a float to our precision, p """ * if unit == 'D' or unit == 'd': * m = 1000000000L * 86400 # <<<<<<<<<<<<<< * p = 6 * elif unit == 's': */ __Pyx_INCREF(__pyx_int_86400000000000L); __pyx_v_m = __pyx_int_86400000000000L; /* "pandas/tslib.pyx":1573 * if unit == 'D' or unit == 'd': * m = 1000000000L * 86400 * p = 6 # <<<<<<<<<<<<<< * elif unit == 's': * m = 1000000000L */ __pyx_v_p = 6; goto __pyx_L3; } /* "pandas/tslib.pyx":1574 * m = 1000000000L * 86400 * p = 6 * elif unit == 's': # <<<<<<<<<<<<<< * m = 1000000000L * p = 6 */ __pyx_t_1 = PyObject_RichCompare(__pyx_v_unit, ((PyObject *)__pyx_n_s__s), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1574; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1574; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_4) { /* "pandas/tslib.pyx":1575 * p = 6 * elif unit == 's': * m = 1000000000L # <<<<<<<<<<<<<< * p = 6 * elif unit == 'ms': */ __Pyx_INCREF(__pyx_int_1000000000L); __pyx_v_m = __pyx_int_1000000000L; /* "pandas/tslib.pyx":1576 * elif unit == 's': * m = 1000000000L * p = 6 # <<<<<<<<<<<<<< * elif unit == 'ms': * m = 1000000L */ __pyx_v_p = 6; goto __pyx_L3; } /* "pandas/tslib.pyx":1577 * m = 1000000000L * p = 6 * elif unit == 'ms': # <<<<<<<<<<<<<< * m = 1000000L * p = 3 */ __pyx_t_1 = PyObject_RichCompare(__pyx_v_unit, ((PyObject *)__pyx_n_s__ms), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1577; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1577; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_4) { /* "pandas/tslib.pyx":1578 * p = 6 * elif unit == 'ms': * m = 1000000L # <<<<<<<<<<<<<< * p = 3 * elif unit == 'us': */ __Pyx_INCREF(__pyx_int_1000000L); __pyx_v_m = __pyx_int_1000000L; /* "pandas/tslib.pyx":1579 * elif unit == 'ms': * m = 1000000L * p = 3 # <<<<<<<<<<<<<< * elif unit == 'us': * m = 1000L */ __pyx_v_p = 3; goto __pyx_L3; } /* "pandas/tslib.pyx":1580 * m = 1000000L * p = 3 * elif unit == 'us': # <<<<<<<<<<<<<< * m = 1000L * p = 0 */ __pyx_t_1 = PyObject_RichCompare(__pyx_v_unit, ((PyObject *)__pyx_n_s__us), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1580; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1580; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_4) { /* "pandas/tslib.pyx":1581 * p = 3 * elif unit == 'us': * m = 1000L # <<<<<<<<<<<<<< * p = 0 * else: */ __Pyx_INCREF(__pyx_int_1000L); __pyx_v_m = __pyx_int_1000L; /* "pandas/tslib.pyx":1582 * elif unit == 'us': * m = 1000L * p = 0 # <<<<<<<<<<<<<< * else: * m = 1L */ __pyx_v_p = 0; goto __pyx_L3; } /*else*/ { /* "pandas/tslib.pyx":1584 * p = 0 * else: * m = 1L # <<<<<<<<<<<<<< * p = 0 * */ __Pyx_INCREF(__pyx_int_1L); __pyx_v_m = __pyx_int_1L; /* "pandas/tslib.pyx":1585 * else: * m = 1L * p = 0 # <<<<<<<<<<<<<< * * # just give me the unit back */ __pyx_v_p = 0; } __pyx_L3:; /* "pandas/tslib.pyx":1588 * * # just give me the unit back * if ts is None: # <<<<<<<<<<<<<< * return m * */ __pyx_t_4 = (__pyx_v_ts == Py_None); __pyx_t_2 = (__pyx_t_4 != 0); if (__pyx_t_2) { /* "pandas/tslib.pyx":1589 * # just give me the unit back * if ts is None: * return m # <<<<<<<<<<<<<< * * # cast the unit, multiply base/frace separately */ __pyx_t_5 = __Pyx_PyInt_from_py_npy_int64(__pyx_v_m); if (unlikely((__pyx_t_5 == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1589; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_t_5; goto __pyx_L0; goto __pyx_L4; } __pyx_L4:; /* "pandas/tslib.pyx":1593 * # cast the unit, multiply base/frace separately * # to avoid precision issues from float -> int * base = ts # <<<<<<<<<<<<<< * frac = ts-base * if p: */ __pyx_t_5 = __Pyx_PyInt_from_py_npy_int64(__pyx_v_ts); if (unlikely((__pyx_t_5 == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1593; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_1 = __Pyx_PyInt_to_py_npy_int64(((__pyx_t_5numpy_int64_t)__pyx_t_5)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1593; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_v_base = __pyx_t_1; __pyx_t_1 = 0; /* "pandas/tslib.pyx":1594 * # to avoid precision issues from float -> int * base = ts * frac = ts-base # <<<<<<<<<<<<<< * if p: * frac = round(frac,p) */ __pyx_t_1 = PyNumber_Subtract(__pyx_v_ts, __pyx_v_base); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1594; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_v_frac = __pyx_t_1; __pyx_t_1 = 0; /* "pandas/tslib.pyx":1595 * base = ts * frac = ts-base * if p: # <<<<<<<<<<<<<< * frac = round(frac,p) * return (base*m) + (frac*m) */ __pyx_t_2 = (__pyx_v_p != 0); if (__pyx_t_2) { /* "pandas/tslib.pyx":1596 * frac = ts-base * if p: * frac = round(frac,p) # <<<<<<<<<<<<<< * return (base*m) + (frac*m) * */ __pyx_t_1 = PyInt_FromLong(__pyx_v_p); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1596; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1596; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(__pyx_v_frac); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_frac); __Pyx_GIVEREF(__pyx_v_frac); PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyObject_Call(__pyx_builtin_round, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1596; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0; __Pyx_DECREF_SET(__pyx_v_frac, __pyx_t_1); __pyx_t_1 = 0; goto __pyx_L5; } __pyx_L5:; /* "pandas/tslib.pyx":1597 * if p: * frac = round(frac,p) * return (base*m) + (frac*m) # <<<<<<<<<<<<<< * * def cast_to_nanoseconds(ndarray arr): */ __pyx_t_1 = PyNumber_Multiply(__pyx_v_base, __pyx_v_m); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1597; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_5 = __Pyx_PyInt_from_py_npy_int64(__pyx_t_1); if (unlikely((__pyx_t_5 == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1597; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyNumber_Multiply(__pyx_v_frac, __pyx_v_m); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1597; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_7 = __Pyx_PyInt_from_py_npy_int64(__pyx_t_1); if (unlikely((__pyx_t_7 == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1597; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = (((__pyx_t_5numpy_int64_t)__pyx_t_5) + ((__pyx_t_5numpy_int64_t)__pyx_t_7)); goto __pyx_L0; __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("pandas.tslib.cast_from_unit", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_XDECREF(__pyx_v_m); __Pyx_XDECREF(__pyx_v_base); __Pyx_XDECREF(__pyx_v_frac); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5tslib_37cast_from_unit(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6pandas_5tslib_36cast_from_unit[] = " return a casting of the unit represented to nanoseconds\n round the fractional part of a float to our precision, p "; static PyObject *__pyx_pw_6pandas_5tslib_37cast_from_unit(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_ts = 0; PyObject *__pyx_v_unit = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("cast_from_unit (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__ts,&__pyx_n_s__unit,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__ts)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__unit)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("cast_from_unit", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1568; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cast_from_unit") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1568; __pyx_clineno = __LINE__; goto __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_ts = values[0]; __pyx_v_unit = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("cast_from_unit", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1568; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.tslib.cast_from_unit", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pandas_5tslib_36cast_from_unit(__pyx_self, __pyx_v_ts, __pyx_v_unit); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/tslib.pyx":1568 * return ival * * cpdef inline int64_t cast_from_unit(object ts, object unit) except -1: # <<<<<<<<<<<<<< * """ return a casting of the unit represented to nanoseconds * round the fractional part of a float to our precision, p """ */ static PyObject *__pyx_pf_6pandas_5tslib_36cast_from_unit(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_ts, PyObject *__pyx_v_unit) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __pyx_t_5numpy_int64_t __pyx_t_1; PyObject *__pyx_t_2 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("cast_from_unit", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_6pandas_5tslib_cast_from_unit(__pyx_v_ts, __pyx_v_unit, 0); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1568; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_2 = __Pyx_PyInt_to_py_npy_int64(__pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1568; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("pandas.tslib.cast_from_unit", __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_5tslib_39cast_to_nanoseconds(PyObject *__pyx_self, PyObject *__pyx_v_arr); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5tslib_39cast_to_nanoseconds = {__Pyx_NAMESTR("cast_to_nanoseconds"), (PyCFunction)__pyx_pw_6pandas_5tslib_39cast_to_nanoseconds, METH_O, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5tslib_39cast_to_nanoseconds(PyObject *__pyx_self, PyObject *__pyx_v_arr) { CYTHON_UNUSED int __pyx_lineno = 0; CYTHON_UNUSED const char *__pyx_filename = NULL; CYTHON_UNUSED int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("cast_to_nanoseconds (wrapper)", 0); if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_arr), __pyx_ptype_5numpy_ndarray, 1, "arr", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1599; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5tslib_38cast_to_nanoseconds(__pyx_self, ((PyArrayObject *)__pyx_v_arr)); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/tslib.pyx":1599 * return (base*m) + (frac*m) * * def cast_to_nanoseconds(ndarray arr): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = arr.size */ static PyObject *__pyx_pf_6pandas_5tslib_38cast_to_nanoseconds(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_arr) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_n; PyArrayObject *__pyx_v_ivalues = 0; PyArrayObject *__pyx_v_iresult = 0; PANDAS_DATETIMEUNIT __pyx_v_unit; pandas_datetimestruct __pyx_v_dts; PyObject *__pyx_v_shape = NULL; PyObject *__pyx_v_result = NULL; __Pyx_LocalBuf_ND __pyx_pybuffernd_iresult; __Pyx_Buffer __pyx_pybuffer_iresult; __Pyx_LocalBuf_ND __pyx_pybuffernd_ivalues; __Pyx_Buffer __pyx_pybuffer_ivalues; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; Py_ssize_t __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyArrayObject *__pyx_t_5 = NULL; int __pyx_t_6; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; int __pyx_t_11; Py_ssize_t __pyx_t_12; Py_ssize_t __pyx_t_13; Py_ssize_t __pyx_t_14; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("cast_to_nanoseconds", 0); __pyx_pybuffer_ivalues.pybuffer.buf = NULL; __pyx_pybuffer_ivalues.refcount = 0; __pyx_pybuffernd_ivalues.data = NULL; __pyx_pybuffernd_ivalues.rcbuffer = &__pyx_pybuffer_ivalues; __pyx_pybuffer_iresult.pybuffer.buf = NULL; __pyx_pybuffer_iresult.refcount = 0; __pyx_pybuffernd_iresult.data = NULL; __pyx_pybuffernd_iresult.rcbuffer = &__pyx_pybuffer_iresult; /* "pandas/tslib.pyx":1601 * def cast_to_nanoseconds(ndarray arr): * cdef: * Py_ssize_t i, n = arr.size # <<<<<<<<<<<<<< * ndarray[int64_t] ivalues, iresult * PANDAS_DATETIMEUNIT unit */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_arr), __pyx_n_s__size); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1601; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyIndex_AsSsize_t(__pyx_t_1); if (unlikely((__pyx_t_2 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1601; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_n = __pyx_t_2; /* "pandas/tslib.pyx":1606 * pandas_datetimestruct dts * * shape = ( arr).shape # <<<<<<<<<<<<<< * * ivalues = arr.view(np.int64).ravel() */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_arr), __pyx_n_s__shape); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1606; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_v_shape = __pyx_t_1; __pyx_t_1 = 0; /* "pandas/tslib.pyx":1608 * shape = ( arr).shape * * ivalues = arr.view(np.int64).ravel() # <<<<<<<<<<<<<< * * result = np.empty(shape, dtype='M8[ns]') */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_arr), __pyx_n_s__view); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1608; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1608; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s__int64); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1608; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1608; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1608; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s__ravel); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1608; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1608; __pyx_clineno = __LINE__; goto __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_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1608; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_5 = ((PyArrayObject *)__pyx_t_4); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_ivalues.rcbuffer->pybuffer); __pyx_t_6 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_ivalues.rcbuffer->pybuffer, (PyObject*)__pyx_t_5, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_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_ivalues.rcbuffer->pybuffer, (PyObject*)__pyx_v_ivalues, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_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_pybuffernd_ivalues.diminfo[0].strides = __pyx_pybuffernd_ivalues.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_ivalues.diminfo[0].shape = __pyx_pybuffernd_ivalues.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1608; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_5 = 0; __pyx_v_ivalues = ((PyArrayObject *)__pyx_t_4); __pyx_t_4 = 0; /* "pandas/tslib.pyx":1610 * ivalues = arr.view(np.int64).ravel() * * result = np.empty(shape, dtype='M8[ns]') # <<<<<<<<<<<<<< * iresult = result.ravel().view(np.int64) * */ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1610; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s__empty); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1610; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1610; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_v_shape); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_shape); __Pyx_GIVEREF(__pyx_v_shape); __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1610; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_1)); if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__dtype), ((PyObject *)__pyx_kp_s_18)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1610; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_10 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1610; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_v_result = __pyx_t_10; __pyx_t_10 = 0; /* "pandas/tslib.pyx":1611 * * result = np.empty(shape, dtype='M8[ns]') * iresult = result.ravel().view(np.int64) # <<<<<<<<<<<<<< * * if len(iresult) == 0: */ __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_result, __pyx_n_s__ravel); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1611; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __pyx_t_1 = PyObject_Call(__pyx_t_10, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1611; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s__view); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1611; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1611; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s__int64); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1611; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1611; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyObject_Call(__pyx_t_10, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1611; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(((PyObject *)__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_filename = __pyx_f[0]; __pyx_lineno = 1611; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_5 = ((PyArrayObject *)__pyx_t_4); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_iresult.rcbuffer->pybuffer); __pyx_t_6 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_iresult.rcbuffer->pybuffer, (PyObject*)__pyx_t_5, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 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_iresult.rcbuffer->pybuffer, (PyObject*)__pyx_v_iresult, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 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_pybuffernd_iresult.diminfo[0].strides = __pyx_pybuffernd_iresult.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_iresult.diminfo[0].shape = __pyx_pybuffernd_iresult.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1611; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_5 = 0; __pyx_v_iresult = ((PyArrayObject *)__pyx_t_4); __pyx_t_4 = 0; /* "pandas/tslib.pyx":1613 * iresult = result.ravel().view(np.int64) * * if len(iresult) == 0: # <<<<<<<<<<<<<< * return result * */ __pyx_t_2 = PyObject_Length(((PyObject *)__pyx_v_iresult)); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1613; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_11 = ((__pyx_t_2 == 0) != 0); if (__pyx_t_11) { /* "pandas/tslib.pyx":1614 * * if len(iresult) == 0: * return result # <<<<<<<<<<<<<< * * unit = get_datetime64_unit(arr.flat[0]) */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_result); __pyx_r = __pyx_v_result; goto __pyx_L0; goto __pyx_L3; } __pyx_L3:; /* "pandas/tslib.pyx":1616 * return result * * unit = get_datetime64_unit(arr.flat[0]) # <<<<<<<<<<<<<< * if unit == 3: * raise ValueError('NumPy 1.6.1 business freq not supported') */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_arr), __pyx_n_s__flat); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1616; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_4, 0, sizeof(long), PyInt_FromLong, 0, 0, 1); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1616; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_unit = get_datetime64_unit(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pandas/tslib.pyx":1617 * * unit = get_datetime64_unit(arr.flat[0]) * if unit == 3: # <<<<<<<<<<<<<< * raise ValueError('NumPy 1.6.1 business freq not supported') * */ __pyx_t_11 = ((__pyx_v_unit == 3) != 0); if (__pyx_t_11) { /* "pandas/tslib.pyx":1618 * unit = get_datetime64_unit(arr.flat[0]) * if unit == 3: * raise ValueError('NumPy 1.6.1 business freq not supported') # <<<<<<<<<<<<<< * * for i in range(n): */ __pyx_t_1 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_97), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1618; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 1618; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L4; } __pyx_L4:; /* "pandas/tslib.pyx":1620 * raise ValueError('NumPy 1.6.1 business freq not supported') * * for i in range(n): # <<<<<<<<<<<<<< * pandas_datetime_to_datetimestruct(ivalues[i], unit, &dts) * iresult[i] = pandas_datetimestruct_to_datetime(PANDAS_FR_ns, &dts) */ __pyx_t_2 = __pyx_v_n; for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_2; __pyx_t_12+=1) { __pyx_v_i = __pyx_t_12; /* "pandas/tslib.pyx":1621 * * for i in range(n): * pandas_datetime_to_datetimestruct(ivalues[i], unit, &dts) # <<<<<<<<<<<<<< * iresult[i] = pandas_datetimestruct_to_datetime(PANDAS_FR_ns, &dts) * _check_dts_bounds(&dts) */ __pyx_t_13 = __pyx_v_i; __pyx_t_6 = -1; if (__pyx_t_13 < 0) { __pyx_t_13 += __pyx_pybuffernd_ivalues.diminfo[0].shape; if (unlikely(__pyx_t_13 < 0)) __pyx_t_6 = 0; } else if (unlikely(__pyx_t_13 >= __pyx_pybuffernd_ivalues.diminfo[0].shape)) __pyx_t_6 = 0; if (unlikely(__pyx_t_6 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_6); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1621; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } pandas_datetime_to_datetimestruct((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_ivalues.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_ivalues.diminfo[0].strides)), __pyx_v_unit, (&__pyx_v_dts)); /* "pandas/tslib.pyx":1622 * for i in range(n): * pandas_datetime_to_datetimestruct(ivalues[i], unit, &dts) * iresult[i] = pandas_datetimestruct_to_datetime(PANDAS_FR_ns, &dts) # <<<<<<<<<<<<<< * _check_dts_bounds(&dts) * */ __pyx_t_14 = __pyx_v_i; __pyx_t_6 = -1; if (__pyx_t_14 < 0) { __pyx_t_14 += __pyx_pybuffernd_iresult.diminfo[0].shape; if (unlikely(__pyx_t_14 < 0)) __pyx_t_6 = 0; } else if (unlikely(__pyx_t_14 >= __pyx_pybuffernd_iresult.diminfo[0].shape)) __pyx_t_6 = 0; if (unlikely(__pyx_t_6 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_6); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1622; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_iresult.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_iresult.diminfo[0].strides) = pandas_datetimestruct_to_datetime(PANDAS_FR_ns, (&__pyx_v_dts)); /* "pandas/tslib.pyx":1623 * pandas_datetime_to_datetimestruct(ivalues[i], unit, &dts) * iresult[i] = pandas_datetimestruct_to_datetime(PANDAS_FR_ns, &dts) * _check_dts_bounds(&dts) # <<<<<<<<<<<<<< * * return result */ __pyx_t_1 = __pyx_f_6pandas_5tslib__check_dts_bounds((&__pyx_v_dts)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1623; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } /* "pandas/tslib.pyx":1625 * _check_dts_bounds(&dts) * * return result # <<<<<<<<<<<<<< * * #---------------------------------------------------------------------- */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_result); __pyx_r = __pyx_v_result; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_10); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_iresult.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_ivalues.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.tslib.cast_to_nanoseconds", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_iresult.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_ivalues.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_ivalues); __Pyx_XDECREF((PyObject *)__pyx_v_iresult); __Pyx_XDECREF(__pyx_v_shape); __Pyx_XDECREF(__pyx_v_result); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5tslib_41pydt_to_i8(PyObject *__pyx_self, PyObject *__pyx_v_pydt); /*proto*/ static char __pyx_doc_6pandas_5tslib_40pydt_to_i8[] = "\n Convert to int64 representation compatible with numpy datetime64; converts\n to UTC\n "; static PyMethodDef __pyx_mdef_6pandas_5tslib_41pydt_to_i8 = {__Pyx_NAMESTR("pydt_to_i8"), (PyCFunction)__pyx_pw_6pandas_5tslib_41pydt_to_i8, METH_O, __Pyx_DOCSTR(__pyx_doc_6pandas_5tslib_40pydt_to_i8)}; static PyObject *__pyx_pw_6pandas_5tslib_41pydt_to_i8(PyObject *__pyx_self, PyObject *__pyx_v_pydt) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("pydt_to_i8 (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_5tslib_40pydt_to_i8(__pyx_self, ((PyObject *)__pyx_v_pydt)); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/tslib.pyx":1631 * * * def pydt_to_i8(object pydt): # <<<<<<<<<<<<<< * ''' * Convert to int64 representation compatible with numpy datetime64; converts */ static PyObject *__pyx_pf_6pandas_5tslib_40pydt_to_i8(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_pydt) { struct __pyx_obj_6pandas_5tslib__TSObject *__pyx_v_ts = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("pydt_to_i8", 0); /* "pandas/tslib.pyx":1639 * _TSObject ts * * ts = convert_to_tsobject(pydt, None, None) # <<<<<<<<<<<<<< * * return ts.value */ __pyx_t_1 = __pyx_f_6pandas_5tslib_convert_to_tsobject(__pyx_v_pydt, Py_None, Py_None); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1639; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_6pandas_5tslib__TSObject))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1639; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_ts = ((struct __pyx_obj_6pandas_5tslib__TSObject *)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/tslib.pyx":1641 * ts = convert_to_tsobject(pydt, None, None) * * return ts.value # <<<<<<<<<<<<<< * * def i8_to_pydt(int64_t i8, object tzinfo = None): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyInt_to_py_npy_int64(__pyx_v_ts->value); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1641; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas.tslib.pydt_to_i8", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_ts); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5tslib_43i8_to_pydt(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6pandas_5tslib_42i8_to_pydt[] = "\n Inverse of pydt_to_i8\n "; static PyMethodDef __pyx_mdef_6pandas_5tslib_43i8_to_pydt = {__Pyx_NAMESTR("i8_to_pydt"), (PyCFunction)__pyx_pw_6pandas_5tslib_43i8_to_pydt, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_5tslib_42i8_to_pydt)}; static PyObject *__pyx_pw_6pandas_5tslib_43i8_to_pydt(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { __pyx_t_5numpy_int64_t __pyx_v_i8; CYTHON_UNUSED PyObject *__pyx_v_tzinfo = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("i8_to_pydt (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__i8,&__pyx_n_s__tzinfo,0}; PyObject* values[2] = {0,0}; /* "pandas/tslib.pyx":1643 * return ts.value * * def i8_to_pydt(int64_t i8, object tzinfo = None): # <<<<<<<<<<<<<< * ''' * Inverse of pydt_to_i8 */ values[1] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__i8)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__tzinfo); if (value) { values[1] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "i8_to_pydt") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1643; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_i8 = __Pyx_PyInt_from_py_npy_int64(values[0]); if (unlikely((__pyx_v_i8 == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1643; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_tzinfo = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("i8_to_pydt", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1643; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.tslib.i8_to_pydt", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pandas_5tslib_42i8_to_pydt(__pyx_self, __pyx_v_i8, __pyx_v_tzinfo); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5tslib_42i8_to_pydt(CYTHON_UNUSED PyObject *__pyx_self, __pyx_t_5numpy_int64_t __pyx_v_i8, CYTHON_UNUSED PyObject *__pyx_v_tzinfo) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("i8_to_pydt", 0); /* "pandas/tslib.pyx":1647 * Inverse of pydt_to_i8 * ''' * return Timestamp(i8) # <<<<<<<<<<<<<< * * #---------------------------------------------------------------------- */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__Timestamp); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1647; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyInt_to_py_npy_int64(__pyx_v_i8); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1647; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1647; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1647; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("pandas.tslib.i8_to_pydt", __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_5tslib_45tz_convert(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5tslib_45tz_convert = {__Pyx_NAMESTR("tz_convert"), (PyCFunction)__pyx_pw_6pandas_5tslib_45tz_convert, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5tslib_45tz_convert(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_vals = 0; PyObject *__pyx_v_tz1 = 0; PyObject *__pyx_v_tz2 = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("tz_convert (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__vals,&__pyx_n_s__tz1,&__pyx_n_s__tz2,0}; PyObject* values[3] = {0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__vals)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__tz1)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("tz_convert", 1, 3, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1660; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__tz2)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("tz_convert", 1, 3, 3, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1660; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "tz_convert") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1660; __pyx_clineno = __LINE__; goto __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_vals = ((PyArrayObject *)values[0]); __pyx_v_tz1 = values[1]; __pyx_v_tz2 = values[2]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("tz_convert", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1660; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.tslib.tz_convert", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_vals), __pyx_ptype_5numpy_ndarray, 1, "vals", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1660; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5tslib_44tz_convert(__pyx_self, __pyx_v_vals, __pyx_v_tz1, __pyx_v_tz2); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/tslib.pyx":1660 * have_pytz = False * * def tz_convert(ndarray[int64_t] vals, object tz1, object tz2): # <<<<<<<<<<<<<< * cdef: * ndarray[int64_t] utc_dates, result, trans, deltas */ static PyObject *__pyx_pf_6pandas_5tslib_44tz_convert(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_vals, PyObject *__pyx_v_tz1, PyObject *__pyx_v_tz2) { PyArrayObject *__pyx_v_utc_dates = 0; PyArrayObject *__pyx_v_result = 0; PyArrayObject *__pyx_v_trans = 0; PyArrayObject *__pyx_v_deltas = 0; Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_pos; Py_ssize_t __pyx_v_n; __pyx_t_5numpy_int64_t __pyx_v_v; __pyx_t_5numpy_int64_t __pyx_v_offset; pandas_datetimestruct __pyx_v_dts; CYTHON_UNUSED PyObject *__pyx_v_pytz = NULL; PyDateTime_DateTime *__pyx_v_dt = NULL; PyObject *__pyx_v_delta = NULL; Py_ssize_t __pyx_v_trans_len; __Pyx_LocalBuf_ND __pyx_pybuffernd_deltas; __Pyx_Buffer __pyx_pybuffer_deltas; __Pyx_LocalBuf_ND __pyx_pybuffernd_result; __Pyx_Buffer __pyx_pybuffer_result; __Pyx_LocalBuf_ND __pyx_pybuffernd_trans; __Pyx_Buffer __pyx_pybuffer_trans; __Pyx_LocalBuf_ND __pyx_pybuffernd_utc_dates; __Pyx_Buffer __pyx_pybuffer_utc_dates; __Pyx_LocalBuf_ND __pyx_pybuffernd_vals; __Pyx_Buffer __pyx_pybuffer_vals; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; PyObject *__pyx_t_2 = NULL; int __pyx_t_3; int __pyx_t_4; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; 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; Py_ssize_t __pyx_t_15; PyObject *__pyx_t_16 = NULL; PyObject *__pyx_t_17 = NULL; PyObject *__pyx_t_18 = NULL; __pyx_t_5numpy_int64_t __pyx_t_19; Py_ssize_t __pyx_t_20; long __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; long __pyx_t_28; long __pyx_t_29; Py_ssize_t __pyx_t_30; Py_ssize_t __pyx_t_31; Py_ssize_t __pyx_t_32; int __pyx_t_33; Py_ssize_t __pyx_t_34; Py_ssize_t __pyx_t_35; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("tz_convert", 0); __pyx_pybuffer_utc_dates.pybuffer.buf = NULL; __pyx_pybuffer_utc_dates.refcount = 0; __pyx_pybuffernd_utc_dates.data = NULL; __pyx_pybuffernd_utc_dates.rcbuffer = &__pyx_pybuffer_utc_dates; __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_trans.pybuffer.buf = NULL; __pyx_pybuffer_trans.refcount = 0; __pyx_pybuffernd_trans.data = NULL; __pyx_pybuffernd_trans.rcbuffer = &__pyx_pybuffer_trans; __pyx_pybuffer_deltas.pybuffer.buf = NULL; __pyx_pybuffer_deltas.refcount = 0; __pyx_pybuffernd_deltas.data = NULL; __pyx_pybuffernd_deltas.rcbuffer = &__pyx_pybuffer_deltas; __pyx_pybuffer_vals.pybuffer.buf = NULL; __pyx_pybuffer_vals.refcount = 0; __pyx_pybuffernd_vals.data = NULL; __pyx_pybuffernd_vals.rcbuffer = &__pyx_pybuffer_vals; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_vals.rcbuffer->pybuffer, (PyObject*)__pyx_v_vals, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1660; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_vals.diminfo[0].strides = __pyx_pybuffernd_vals.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_vals.diminfo[0].shape = __pyx_pybuffernd_vals.rcbuffer->pybuffer.shape[0]; /* "pandas/tslib.pyx":1663 * cdef: * ndarray[int64_t] utc_dates, result, trans, deltas * Py_ssize_t i, pos, n = len(vals) # <<<<<<<<<<<<<< * int64_t v, offset * pandas_datetimestruct dts */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_vals)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1663; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/tslib.pyx":1667 * pandas_datetimestruct dts * * if not have_pytz: # <<<<<<<<<<<<<< * import pytz * */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__have_pytz); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1667; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1667; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_4 = ((!__pyx_t_3) != 0); if (__pyx_t_4) { /* "pandas/tslib.pyx":1668 * * if not have_pytz: * import pytz # <<<<<<<<<<<<<< * * # Convert to UTC */ __pyx_t_2 = __Pyx_Import(((PyObject *)__pyx_n_s__pytz), 0, -1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1668; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_v_pytz = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L3; } __pyx_L3:; /* "pandas/tslib.pyx":1672 * # Convert to UTC * * if _get_zone(tz1) != 'UTC': # <<<<<<<<<<<<<< * utc_dates = np.empty(n, dtype=np.int64) * if _is_tzlocal(tz1): */ __pyx_t_2 = __pyx_f_6pandas_5tslib__get_zone(__pyx_v_tz1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1672; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = PyObject_RichCompare(__pyx_t_2, ((PyObject *)__pyx_n_s__UTC), Py_NE); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1672; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1672; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_4) { /* "pandas/tslib.pyx":1673 * * if _get_zone(tz1) != 'UTC': * utc_dates = np.empty(n, dtype=np.int64) # <<<<<<<<<<<<<< * if _is_tzlocal(tz1): * for i in range(n): */ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1673; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s__empty); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1673; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyInt_FromSsize_t(__pyx_v_n); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1673; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1673; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyDict_New(); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1673; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_5)); __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1673; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s__int64); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1673; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (PyDict_SetItem(__pyx_t_5, ((PyObject *)__pyx_n_s__dtype), __pyx_t_8) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1673; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_8 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_6), ((PyObject *)__pyx_t_5)); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1673; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; if (!(likely(((__pyx_t_8) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_8, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1673; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_9 = ((PyArrayObject *)__pyx_t_8); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_utc_dates.rcbuffer->pybuffer); __pyx_t_10 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_utc_dates.rcbuffer->pybuffer, (PyObject*)__pyx_t_9, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_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_utc_dates.rcbuffer->pybuffer, (PyObject*)__pyx_v_utc_dates, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_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_pybuffernd_utc_dates.diminfo[0].strides = __pyx_pybuffernd_utc_dates.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_utc_dates.diminfo[0].shape = __pyx_pybuffernd_utc_dates.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1673; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_9 = 0; __pyx_v_utc_dates = ((PyArrayObject *)__pyx_t_8); __pyx_t_8 = 0; /* "pandas/tslib.pyx":1674 * if _get_zone(tz1) != 'UTC': * utc_dates = np.empty(n, dtype=np.int64) * if _is_tzlocal(tz1): # <<<<<<<<<<<<<< * for i in range(n): * v = vals[i] */ __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s___is_tzlocal); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1674; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1674; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_v_tz1); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_tz1); __Pyx_GIVEREF(__pyx_v_tz1); __pyx_t_6 = PyObject_Call(__pyx_t_8, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1674; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1674; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (__pyx_t_4) { /* "pandas/tslib.pyx":1675 * utc_dates = np.empty(n, dtype=np.int64) * if _is_tzlocal(tz1): * for i in range(n): # <<<<<<<<<<<<<< * v = vals[i] * pandas_datetime_to_datetimestruct(v, PANDAS_FR_ns, &dts) */ __pyx_t_1 = __pyx_v_n; for (__pyx_t_14 = 0; __pyx_t_14 < __pyx_t_1; __pyx_t_14+=1) { __pyx_v_i = __pyx_t_14; /* "pandas/tslib.pyx":1676 * if _is_tzlocal(tz1): * for i in range(n): * v = vals[i] # <<<<<<<<<<<<<< * pandas_datetime_to_datetimestruct(v, PANDAS_FR_ns, &dts) * dt = datetime(dts.year, dts.month, dts.day, dts.hour, */ __pyx_t_15 = __pyx_v_i; __pyx_t_10 = -1; if (__pyx_t_15 < 0) { __pyx_t_15 += __pyx_pybuffernd_vals.diminfo[0].shape; if (unlikely(__pyx_t_15 < 0)) __pyx_t_10 = 0; } else if (unlikely(__pyx_t_15 >= __pyx_pybuffernd_vals.diminfo[0].shape)) __pyx_t_10 = 0; if (unlikely(__pyx_t_10 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_10); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1676; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_v = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_vals.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_vals.diminfo[0].strides)); /* "pandas/tslib.pyx":1677 * for i in range(n): * v = vals[i] * pandas_datetime_to_datetimestruct(v, PANDAS_FR_ns, &dts) # <<<<<<<<<<<<<< * dt = datetime(dts.year, dts.month, dts.day, dts.hour, * dts.min, dts.sec, dts.us, tz1) */ pandas_datetime_to_datetimestruct(__pyx_v_v, PANDAS_FR_ns, (&__pyx_v_dts)); /* "pandas/tslib.pyx":1678 * v = vals[i] * pandas_datetime_to_datetimestruct(v, PANDAS_FR_ns, &dts) * dt = datetime(dts.year, dts.month, dts.day, dts.hour, # <<<<<<<<<<<<<< * dts.min, dts.sec, dts.us, tz1) * delta = (int(total_seconds(_get_utcoffset(tz1, dt))) */ __pyx_t_6 = __Pyx_PyInt_to_py_npy_int64(__pyx_v_dts.year); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1678; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_5 = __Pyx_PyInt_to_py_npy_int32(__pyx_v_dts.month); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1678; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_8 = __Pyx_PyInt_to_py_npy_int32(__pyx_v_dts.day); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1678; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_2 = __Pyx_PyInt_to_py_npy_int32(__pyx_v_dts.hour); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1678; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); /* "pandas/tslib.pyx":1679 * pandas_datetime_to_datetimestruct(v, PANDAS_FR_ns, &dts) * dt = datetime(dts.year, dts.month, dts.day, dts.hour, * dts.min, dts.sec, dts.us, tz1) # <<<<<<<<<<<<<< * delta = (int(total_seconds(_get_utcoffset(tz1, dt))) * * 1000000000) */ __pyx_t_7 = __Pyx_PyInt_to_py_npy_int32(__pyx_v_dts.min); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1679; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_t_16 = __Pyx_PyInt_to_py_npy_int32(__pyx_v_dts.sec); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1679; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_16); __pyx_t_17 = __Pyx_PyInt_to_py_npy_int32(__pyx_v_dts.us); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1679; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_17); __pyx_t_18 = PyTuple_New(8); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1678; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); PyTuple_SET_ITEM(__pyx_t_18, 0, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_18, 1, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_18, 2, __pyx_t_8); __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_18, 3, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_18, 4, __pyx_t_7); __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_18, 5, __pyx_t_16); __Pyx_GIVEREF(__pyx_t_16); PyTuple_SET_ITEM(__pyx_t_18, 6, __pyx_t_17); __Pyx_GIVEREF(__pyx_t_17); __Pyx_INCREF(__pyx_v_tz1); PyTuple_SET_ITEM(__pyx_t_18, 7, __pyx_v_tz1); __Pyx_GIVEREF(__pyx_v_tz1); __pyx_t_6 = 0; __pyx_t_5 = 0; __pyx_t_8 = 0; __pyx_t_2 = 0; __pyx_t_7 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_17 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_8datetime_datetime)), ((PyObject *)__pyx_t_18), NULL); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1678; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_17); __Pyx_DECREF(((PyObject *)__pyx_t_18)); __pyx_t_18 = 0; __Pyx_XDECREF_SET(__pyx_v_dt, ((PyDateTime_DateTime *)__pyx_t_17)); __pyx_t_17 = 0; /* "pandas/tslib.pyx":1680 * dt = datetime(dts.year, dts.month, dts.day, dts.hour, * dts.min, dts.sec, dts.us, tz1) * delta = (int(total_seconds(_get_utcoffset(tz1, dt))) # <<<<<<<<<<<<<< * * 1000000000) * utc_dates[i] = v - delta */ __pyx_t_17 = __pyx_f_6pandas_5tslib__get_utcoffset(__pyx_v_tz1, ((PyObject *)__pyx_v_dt), 0); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1680; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_17); __pyx_t_18 = PyFloat_FromDouble(__pyx_f_6pandas_5tslib_total_seconds(__pyx_t_17)); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1680; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; __pyx_t_17 = PyTuple_New(1); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1680; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_17); PyTuple_SET_ITEM(__pyx_t_17, 0, __pyx_t_18); __Pyx_GIVEREF(__pyx_t_18); __pyx_t_18 = 0; __pyx_t_18 = PyObject_Call(((PyObject *)((PyObject*)(&PyInt_Type))), ((PyObject *)__pyx_t_17), NULL); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1680; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); __Pyx_DECREF(((PyObject *)__pyx_t_17)); __pyx_t_17 = 0; __pyx_t_17 = PyNumber_Multiply(__pyx_t_18, __pyx_int_1000000000); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1681; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_17); __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; __Pyx_XDECREF_SET(__pyx_v_delta, __pyx_t_17); __pyx_t_17 = 0; /* "pandas/tslib.pyx":1682 * delta = (int(total_seconds(_get_utcoffset(tz1, dt))) * * 1000000000) * utc_dates[i] = v - delta # <<<<<<<<<<<<<< * else: * deltas = _get_deltas(tz1) */ __pyx_t_17 = __Pyx_PyInt_to_py_npy_int64(__pyx_v_v); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1682; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_17); __pyx_t_18 = PyNumber_Subtract(__pyx_t_17, __pyx_v_delta); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1682; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; __pyx_t_19 = __Pyx_PyInt_from_py_npy_int64(__pyx_t_18); if (unlikely((__pyx_t_19 == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1682; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; __pyx_t_20 = __pyx_v_i; __pyx_t_10 = -1; if (__pyx_t_20 < 0) { __pyx_t_20 += __pyx_pybuffernd_utc_dates.diminfo[0].shape; if (unlikely(__pyx_t_20 < 0)) __pyx_t_10 = 0; } else if (unlikely(__pyx_t_20 >= __pyx_pybuffernd_utc_dates.diminfo[0].shape)) __pyx_t_10 = 0; if (unlikely(__pyx_t_10 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_10); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1682; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_utc_dates.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_utc_dates.diminfo[0].strides) = __pyx_t_19; } goto __pyx_L5; } /*else*/ { /* "pandas/tslib.pyx":1684 * utc_dates[i] = v - delta * else: * deltas = _get_deltas(tz1) # <<<<<<<<<<<<<< * trans = _get_transitions(tz1) * pos = trans.searchsorted(vals[0]) - 1 */ __pyx_t_18 = __Pyx_GetModuleGlobalName(__pyx_n_s___get_deltas); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1684; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); __pyx_t_17 = PyTuple_New(1); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1684; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_17); __Pyx_INCREF(__pyx_v_tz1); PyTuple_SET_ITEM(__pyx_t_17, 0, __pyx_v_tz1); __Pyx_GIVEREF(__pyx_v_tz1); __pyx_t_16 = PyObject_Call(__pyx_t_18, ((PyObject *)__pyx_t_17), NULL); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1684; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_16); __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_17)); __pyx_t_17 = 0; if (!(likely(((__pyx_t_16) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_16, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1684; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_9 = ((PyArrayObject *)__pyx_t_16); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_deltas.rcbuffer->pybuffer); __pyx_t_10 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_deltas.rcbuffer->pybuffer, (PyObject*)__pyx_t_9, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 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_deltas.rcbuffer->pybuffer, (PyObject*)__pyx_v_deltas, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 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_pybuffernd_deltas.diminfo[0].strides = __pyx_pybuffernd_deltas.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_deltas.diminfo[0].shape = __pyx_pybuffernd_deltas.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1684; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_9 = 0; __pyx_v_deltas = ((PyArrayObject *)__pyx_t_16); __pyx_t_16 = 0; /* "pandas/tslib.pyx":1685 * else: * deltas = _get_deltas(tz1) * trans = _get_transitions(tz1) # <<<<<<<<<<<<<< * pos = trans.searchsorted(vals[0]) - 1 * if pos < 0: */ __pyx_t_16 = __Pyx_GetModuleGlobalName(__pyx_n_s___get_transitions); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1685; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_16); __pyx_t_17 = PyTuple_New(1); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1685; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_17); __Pyx_INCREF(__pyx_v_tz1); PyTuple_SET_ITEM(__pyx_t_17, 0, __pyx_v_tz1); __Pyx_GIVEREF(__pyx_v_tz1); __pyx_t_18 = PyObject_Call(__pyx_t_16, ((PyObject *)__pyx_t_17), NULL); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1685; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_17)); __pyx_t_17 = 0; if (!(likely(((__pyx_t_18) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_18, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1685; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_9 = ((PyArrayObject *)__pyx_t_18); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_trans.rcbuffer->pybuffer); __pyx_t_10 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_trans.rcbuffer->pybuffer, (PyObject*)__pyx_t_9, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 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_trans.rcbuffer->pybuffer, (PyObject*)__pyx_v_trans, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 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_pybuffernd_trans.diminfo[0].strides = __pyx_pybuffernd_trans.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_trans.diminfo[0].shape = __pyx_pybuffernd_trans.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1685; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_9 = 0; __pyx_v_trans = ((PyArrayObject *)__pyx_t_18); __pyx_t_18 = 0; /* "pandas/tslib.pyx":1686 * deltas = _get_deltas(tz1) * trans = _get_transitions(tz1) * pos = trans.searchsorted(vals[0]) - 1 # <<<<<<<<<<<<<< * if pos < 0: * raise ValueError('First time before start of DST info') */ __pyx_t_18 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_trans), __pyx_n_s__searchsorted); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1686; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); __pyx_t_21 = 0; __pyx_t_10 = -1; if (__pyx_t_21 < 0) { __pyx_t_21 += __pyx_pybuffernd_vals.diminfo[0].shape; if (unlikely(__pyx_t_21 < 0)) __pyx_t_10 = 0; } else if (unlikely(__pyx_t_21 >= __pyx_pybuffernd_vals.diminfo[0].shape)) __pyx_t_10 = 0; if (unlikely(__pyx_t_10 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_10); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1686; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_17 = __Pyx_PyInt_to_py_npy_int64((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_vals.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_vals.diminfo[0].strides))); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1686; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_17); __pyx_t_16 = PyTuple_New(1); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1686; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_16); PyTuple_SET_ITEM(__pyx_t_16, 0, __pyx_t_17); __Pyx_GIVEREF(__pyx_t_17); __pyx_t_17 = 0; __pyx_t_17 = PyObject_Call(__pyx_t_18, ((PyObject *)__pyx_t_16), NULL); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1686; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_17); __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_16)); __pyx_t_16 = 0; __pyx_t_16 = PyNumber_Subtract(__pyx_t_17, __pyx_int_1); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1686; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_16); __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; __pyx_t_1 = __Pyx_PyIndex_AsSsize_t(__pyx_t_16); if (unlikely((__pyx_t_1 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1686; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; __pyx_v_pos = __pyx_t_1; /* "pandas/tslib.pyx":1687 * trans = _get_transitions(tz1) * pos = trans.searchsorted(vals[0]) - 1 * if pos < 0: # <<<<<<<<<<<<<< * raise ValueError('First time before start of DST info') * */ __pyx_t_4 = ((__pyx_v_pos < 0) != 0); if (__pyx_t_4) { /* "pandas/tslib.pyx":1688 * pos = trans.searchsorted(vals[0]) - 1 * if pos < 0: * raise ValueError('First time before start of DST info') # <<<<<<<<<<<<<< * * offset = deltas[pos] */ __pyx_t_16 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_99), NULL); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1688; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_16); __Pyx_Raise(__pyx_t_16, 0, 0, 0); __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1688; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L8; } __pyx_L8:; /* "pandas/tslib.pyx":1690 * raise ValueError('First time before start of DST info') * * offset = deltas[pos] # <<<<<<<<<<<<<< * for i in range(n): * v = vals[i] */ __pyx_t_1 = __pyx_v_pos; __pyx_t_10 = -1; if (__pyx_t_1 < 0) { __pyx_t_1 += __pyx_pybuffernd_deltas.diminfo[0].shape; if (unlikely(__pyx_t_1 < 0)) __pyx_t_10 = 0; } else if (unlikely(__pyx_t_1 >= __pyx_pybuffernd_deltas.diminfo[0].shape)) __pyx_t_10 = 0; if (unlikely(__pyx_t_10 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_10); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1690; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_offset = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_deltas.rcbuffer->pybuffer.buf, __pyx_t_1, __pyx_pybuffernd_deltas.diminfo[0].strides)); /* "pandas/tslib.pyx":1691 * * offset = deltas[pos] * for i in range(n): # <<<<<<<<<<<<<< * v = vals[i] * if v >= [pos + 1]: */ __pyx_t_14 = __pyx_v_n; for (__pyx_t_22 = 0; __pyx_t_22 < __pyx_t_14; __pyx_t_22+=1) { __pyx_v_i = __pyx_t_22; /* "pandas/tslib.pyx":1692 * offset = deltas[pos] * for i in range(n): * v = vals[i] # <<<<<<<<<<<<<< * if v >= [pos + 1]: * pos += 1 */ __pyx_t_23 = __pyx_v_i; __pyx_t_10 = -1; if (__pyx_t_23 < 0) { __pyx_t_23 += __pyx_pybuffernd_vals.diminfo[0].shape; if (unlikely(__pyx_t_23 < 0)) __pyx_t_10 = 0; } else if (unlikely(__pyx_t_23 >= __pyx_pybuffernd_vals.diminfo[0].shape)) __pyx_t_10 = 0; if (unlikely(__pyx_t_10 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_10); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1692; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_v = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_vals.rcbuffer->pybuffer.buf, __pyx_t_23, __pyx_pybuffernd_vals.diminfo[0].strides)); /* "pandas/tslib.pyx":1693 * for i in range(n): * v = vals[i] * if v >= [pos + 1]: # <<<<<<<<<<<<<< * pos += 1 * offset = deltas[pos] */ __pyx_t_16 = __Pyx_PyInt_to_py_npy_int64(__pyx_v_v); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1693; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_16); __pyx_t_17 = PyInt_FromSsize_t((__pyx_v_pos + 1)); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1693; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_17); __pyx_t_18 = PyList_New(1); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1693; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); PyList_SET_ITEM(__pyx_t_18, 0, __pyx_t_17); __Pyx_GIVEREF(__pyx_t_17); __pyx_t_17 = 0; __pyx_t_17 = PyObject_RichCompare(__pyx_t_16, ((PyObject *)__pyx_t_18), Py_GE); __Pyx_XGOTREF(__pyx_t_17); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1693; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_18)); __pyx_t_18 = 0; __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_17); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1693; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; if (__pyx_t_4) { /* "pandas/tslib.pyx":1694 * v = vals[i] * if v >= [pos + 1]: * pos += 1 # <<<<<<<<<<<<<< * offset = deltas[pos] * utc_dates[i] = v - offset */ __pyx_v_pos = (__pyx_v_pos + 1); /* "pandas/tslib.pyx":1695 * if v >= [pos + 1]: * pos += 1 * offset = deltas[pos] # <<<<<<<<<<<<<< * utc_dates[i] = v - offset * else: */ __pyx_t_24 = __pyx_v_pos; __pyx_t_10 = -1; if (__pyx_t_24 < 0) { __pyx_t_24 += __pyx_pybuffernd_deltas.diminfo[0].shape; if (unlikely(__pyx_t_24 < 0)) __pyx_t_10 = 0; } else if (unlikely(__pyx_t_24 >= __pyx_pybuffernd_deltas.diminfo[0].shape)) __pyx_t_10 = 0; if (unlikely(__pyx_t_10 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_10); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1695; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_offset = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_deltas.rcbuffer->pybuffer.buf, __pyx_t_24, __pyx_pybuffernd_deltas.diminfo[0].strides)); goto __pyx_L11; } __pyx_L11:; /* "pandas/tslib.pyx":1696 * pos += 1 * offset = deltas[pos] * utc_dates[i] = v - offset # <<<<<<<<<<<<<< * else: * utc_dates = vals */ __pyx_t_25 = __pyx_v_i; __pyx_t_10 = -1; if (__pyx_t_25 < 0) { __pyx_t_25 += __pyx_pybuffernd_utc_dates.diminfo[0].shape; if (unlikely(__pyx_t_25 < 0)) __pyx_t_10 = 0; } else if (unlikely(__pyx_t_25 >= __pyx_pybuffernd_utc_dates.diminfo[0].shape)) __pyx_t_10 = 0; if (unlikely(__pyx_t_10 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_10); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1696; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_utc_dates.rcbuffer->pybuffer.buf, __pyx_t_25, __pyx_pybuffernd_utc_dates.diminfo[0].strides) = (__pyx_v_v - __pyx_v_offset); } } __pyx_L5:; goto __pyx_L4; } /*else*/ { /* "pandas/tslib.pyx":1698 * utc_dates[i] = v - offset * else: * utc_dates = vals # <<<<<<<<<<<<<< * * if _get_zone(tz2) == 'UTC': */ { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_utc_dates.rcbuffer->pybuffer); __pyx_t_10 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_utc_dates.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_v_vals), &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_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_utc_dates.rcbuffer->pybuffer, (PyObject*)__pyx_v_utc_dates, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_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_pybuffernd_utc_dates.diminfo[0].strides = __pyx_pybuffernd_utc_dates.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_utc_dates.diminfo[0].shape = __pyx_pybuffernd_utc_dates.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1698; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __Pyx_INCREF(((PyObject *)__pyx_v_vals)); __pyx_v_utc_dates = ((PyArrayObject *)__pyx_v_vals); } __pyx_L4:; /* "pandas/tslib.pyx":1700 * utc_dates = vals * * if _get_zone(tz2) == 'UTC': # <<<<<<<<<<<<<< * return utc_dates * */ __pyx_t_17 = __pyx_f_6pandas_5tslib__get_zone(__pyx_v_tz2); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1700; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_17); __pyx_t_18 = PyObject_RichCompare(__pyx_t_17, ((PyObject *)__pyx_n_s__UTC), Py_EQ); __Pyx_XGOTREF(__pyx_t_18); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1700; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_18); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1700; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; if (__pyx_t_4) { /* "pandas/tslib.pyx":1701 * * if _get_zone(tz2) == 'UTC': * return utc_dates # <<<<<<<<<<<<<< * * result = np.empty(n, dtype=np.int64) */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_utc_dates)); __pyx_r = ((PyObject *)__pyx_v_utc_dates); goto __pyx_L0; goto __pyx_L12; } __pyx_L12:; /* "pandas/tslib.pyx":1703 * return utc_dates * * result = np.empty(n, dtype=np.int64) # <<<<<<<<<<<<<< * if _is_tzlocal(tz2): * for i in range(n): */ __pyx_t_18 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1703; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); __pyx_t_17 = __Pyx_PyObject_GetAttrStr(__pyx_t_18, __pyx_n_s__empty); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1703; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_17); __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; __pyx_t_18 = PyInt_FromSsize_t(__pyx_v_n); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1703; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); __pyx_t_16 = PyTuple_New(1); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1703; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_16); PyTuple_SET_ITEM(__pyx_t_16, 0, __pyx_t_18); __Pyx_GIVEREF(__pyx_t_18); __pyx_t_18 = 0; __pyx_t_18 = PyDict_New(); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1703; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_18)); __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1703; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s__int64); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1703; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (PyDict_SetItem(__pyx_t_18, ((PyObject *)__pyx_n_s__dtype), __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1703; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_Call(__pyx_t_17, ((PyObject *)__pyx_t_16), ((PyObject *)__pyx_t_18)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1703; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_16)); __pyx_t_16 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_18)); __pyx_t_18 = 0; if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1703; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_9 = ((PyArrayObject *)__pyx_t_2); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __pyx_t_10 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_t_9, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_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_result.rcbuffer->pybuffer, (PyObject*)__pyx_v_result, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_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_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_10 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1703; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_9 = 0; __pyx_v_result = ((PyArrayObject *)__pyx_t_2); __pyx_t_2 = 0; /* "pandas/tslib.pyx":1704 * * result = np.empty(n, dtype=np.int64) * if _is_tzlocal(tz2): # <<<<<<<<<<<<<< * for i in range(n): * v = utc_dates[i] */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s___is_tzlocal); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1704; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_18 = PyTuple_New(1); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1704; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); __Pyx_INCREF(__pyx_v_tz2); PyTuple_SET_ITEM(__pyx_t_18, 0, __pyx_v_tz2); __Pyx_GIVEREF(__pyx_v_tz2); __pyx_t_16 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_18), NULL); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1704; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_16); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_18)); __pyx_t_18 = 0; __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_16); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1704; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; if (__pyx_t_4) { /* "pandas/tslib.pyx":1705 * result = np.empty(n, dtype=np.int64) * if _is_tzlocal(tz2): * for i in range(n): # <<<<<<<<<<<<<< * v = utc_dates[i] * pandas_datetime_to_datetimestruct(v, PANDAS_FR_ns, &dts) */ __pyx_t_14 = __pyx_v_n; for (__pyx_t_22 = 0; __pyx_t_22 < __pyx_t_14; __pyx_t_22+=1) { __pyx_v_i = __pyx_t_22; /* "pandas/tslib.pyx":1706 * if _is_tzlocal(tz2): * for i in range(n): * v = utc_dates[i] # <<<<<<<<<<<<<< * pandas_datetime_to_datetimestruct(v, PANDAS_FR_ns, &dts) * dt = datetime(dts.year, dts.month, dts.day, dts.hour, */ __pyx_t_26 = __pyx_v_i; __pyx_t_10 = -1; if (__pyx_t_26 < 0) { __pyx_t_26 += __pyx_pybuffernd_utc_dates.diminfo[0].shape; if (unlikely(__pyx_t_26 < 0)) __pyx_t_10 = 0; } else if (unlikely(__pyx_t_26 >= __pyx_pybuffernd_utc_dates.diminfo[0].shape)) __pyx_t_10 = 0; if (unlikely(__pyx_t_10 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_10); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1706; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_v = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_utc_dates.rcbuffer->pybuffer.buf, __pyx_t_26, __pyx_pybuffernd_utc_dates.diminfo[0].strides)); /* "pandas/tslib.pyx":1707 * for i in range(n): * v = utc_dates[i] * pandas_datetime_to_datetimestruct(v, PANDAS_FR_ns, &dts) # <<<<<<<<<<<<<< * dt = datetime(dts.year, dts.month, dts.day, dts.hour, * dts.min, dts.sec, dts.us, tz2) */ pandas_datetime_to_datetimestruct(__pyx_v_v, PANDAS_FR_ns, (&__pyx_v_dts)); /* "pandas/tslib.pyx":1708 * v = utc_dates[i] * pandas_datetime_to_datetimestruct(v, PANDAS_FR_ns, &dts) * dt = datetime(dts.year, dts.month, dts.day, dts.hour, # <<<<<<<<<<<<<< * dts.min, dts.sec, dts.us, tz2) * delta = int(total_seconds(_get_utcoffset(tz2, dt))) * 1000000000 */ __pyx_t_16 = __Pyx_PyInt_to_py_npy_int64(__pyx_v_dts.year); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1708; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_16); __pyx_t_18 = __Pyx_PyInt_to_py_npy_int32(__pyx_v_dts.month); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1708; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); __pyx_t_2 = __Pyx_PyInt_to_py_npy_int32(__pyx_v_dts.day); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1708; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_17 = __Pyx_PyInt_to_py_npy_int32(__pyx_v_dts.hour); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1708; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_17); /* "pandas/tslib.pyx":1709 * pandas_datetime_to_datetimestruct(v, PANDAS_FR_ns, &dts) * dt = datetime(dts.year, dts.month, dts.day, dts.hour, * dts.min, dts.sec, dts.us, tz2) # <<<<<<<<<<<<<< * delta = int(total_seconds(_get_utcoffset(tz2, dt))) * 1000000000 * result[i] = v + delta */ __pyx_t_7 = __Pyx_PyInt_to_py_npy_int32(__pyx_v_dts.min); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1709; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_t_8 = __Pyx_PyInt_to_py_npy_int32(__pyx_v_dts.sec); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1709; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_5 = __Pyx_PyInt_to_py_npy_int32(__pyx_v_dts.us); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1709; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = PyTuple_New(8); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1708; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_16); __Pyx_GIVEREF(__pyx_t_16); PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_18); __Pyx_GIVEREF(__pyx_t_18); PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_6, 3, __pyx_t_17); __Pyx_GIVEREF(__pyx_t_17); PyTuple_SET_ITEM(__pyx_t_6, 4, __pyx_t_7); __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_6, 5, __pyx_t_8); __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_6, 6, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __Pyx_INCREF(__pyx_v_tz2); PyTuple_SET_ITEM(__pyx_t_6, 7, __pyx_v_tz2); __Pyx_GIVEREF(__pyx_v_tz2); __pyx_t_16 = 0; __pyx_t_18 = 0; __pyx_t_2 = 0; __pyx_t_17 = 0; __pyx_t_7 = 0; __pyx_t_8 = 0; __pyx_t_5 = 0; __pyx_t_5 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_8datetime_datetime)), ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1708; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0; __Pyx_XDECREF_SET(__pyx_v_dt, ((PyDateTime_DateTime *)__pyx_t_5)); __pyx_t_5 = 0; /* "pandas/tslib.pyx":1710 * dt = datetime(dts.year, dts.month, dts.day, dts.hour, * dts.min, dts.sec, dts.us, tz2) * delta = int(total_seconds(_get_utcoffset(tz2, dt))) * 1000000000 # <<<<<<<<<<<<<< * result[i] = v + delta * return result */ __pyx_t_5 = __pyx_f_6pandas_5tslib__get_utcoffset(__pyx_v_tz2, ((PyObject *)__pyx_v_dt), 0); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1710; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = PyFloat_FromDouble(__pyx_f_6pandas_5tslib_total_seconds(__pyx_t_5)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1710; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1710; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyObject_Call(((PyObject *)((PyObject*)(&PyInt_Type))), ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1710; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; __pyx_t_5 = PyNumber_Multiply(__pyx_t_6, __pyx_int_1000000000); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1710; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF_SET(__pyx_v_delta, __pyx_t_5); __pyx_t_5 = 0; /* "pandas/tslib.pyx":1711 * dts.min, dts.sec, dts.us, tz2) * delta = int(total_seconds(_get_utcoffset(tz2, dt))) * 1000000000 * result[i] = v + delta # <<<<<<<<<<<<<< * return result * */ __pyx_t_5 = __Pyx_PyInt_to_py_npy_int64(__pyx_v_v); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1711; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = PyNumber_Add(__pyx_t_5, __pyx_v_delta); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1711; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_19 = __Pyx_PyInt_from_py_npy_int64(__pyx_t_6); if (unlikely((__pyx_t_19 == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1711; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_27 = __pyx_v_i; __pyx_t_10 = -1; if (__pyx_t_27 < 0) { __pyx_t_27 += __pyx_pybuffernd_result.diminfo[0].shape; if (unlikely(__pyx_t_27 < 0)) __pyx_t_10 = 0; } else if (unlikely(__pyx_t_27 >= __pyx_pybuffernd_result.diminfo[0].shape)) __pyx_t_10 = 0; if (unlikely(__pyx_t_10 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_10); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1711; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_27, __pyx_pybuffernd_result.diminfo[0].strides) = __pyx_t_19; /* "pandas/tslib.pyx":1712 * delta = int(total_seconds(_get_utcoffset(tz2, dt))) * 1000000000 * result[i] = v + delta * return result # <<<<<<<<<<<<<< * * # Convert UTC to other timezone */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_result)); __pyx_r = ((PyObject *)__pyx_v_result); goto __pyx_L0; } goto __pyx_L13; } __pyx_L13:; /* "pandas/tslib.pyx":1715 * * # Convert UTC to other timezone * trans = _get_transitions(tz2) # <<<<<<<<<<<<<< * deltas = _get_deltas(tz2) * pos = trans.searchsorted(utc_dates[0]) */ __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s___get_transitions); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1715; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1715; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_v_tz2); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_tz2); __Pyx_GIVEREF(__pyx_v_tz2); __pyx_t_8 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1715; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; if (!(likely(((__pyx_t_8) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_8, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1715; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_9 = ((PyArrayObject *)__pyx_t_8); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_trans.rcbuffer->pybuffer); __pyx_t_10 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_trans.rcbuffer->pybuffer, (PyObject*)__pyx_t_9, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 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_trans.rcbuffer->pybuffer, (PyObject*)__pyx_v_trans, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 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_pybuffernd_trans.diminfo[0].strides = __pyx_pybuffernd_trans.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_trans.diminfo[0].shape = __pyx_pybuffernd_trans.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1715; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_9 = 0; __Pyx_XDECREF_SET(__pyx_v_trans, ((PyArrayObject *)__pyx_t_8)); __pyx_t_8 = 0; /* "pandas/tslib.pyx":1716 * # Convert UTC to other timezone * trans = _get_transitions(tz2) * deltas = _get_deltas(tz2) # <<<<<<<<<<<<<< * pos = trans.searchsorted(utc_dates[0]) * if pos == 0: */ __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s___get_deltas); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1716; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1716; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_v_tz2); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_tz2); __Pyx_GIVEREF(__pyx_v_tz2); __pyx_t_6 = PyObject_Call(__pyx_t_8, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1716; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1716; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_9 = ((PyArrayObject *)__pyx_t_6); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_deltas.rcbuffer->pybuffer); __pyx_t_10 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_deltas.rcbuffer->pybuffer, (PyObject*)__pyx_t_9, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 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_deltas.rcbuffer->pybuffer, (PyObject*)__pyx_v_deltas, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 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_pybuffernd_deltas.diminfo[0].strides = __pyx_pybuffernd_deltas.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_deltas.diminfo[0].shape = __pyx_pybuffernd_deltas.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1716; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_9 = 0; __Pyx_XDECREF_SET(__pyx_v_deltas, ((PyArrayObject *)__pyx_t_6)); __pyx_t_6 = 0; /* "pandas/tslib.pyx":1717 * trans = _get_transitions(tz2) * deltas = _get_deltas(tz2) * pos = trans.searchsorted(utc_dates[0]) # <<<<<<<<<<<<<< * if pos == 0: * raise ValueError('First time before start of DST info') */ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_trans), __pyx_n_s__searchsorted); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1717; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_28 = 0; __pyx_t_10 = -1; if (__pyx_t_28 < 0) { __pyx_t_28 += __pyx_pybuffernd_utc_dates.diminfo[0].shape; if (unlikely(__pyx_t_28 < 0)) __pyx_t_10 = 0; } else if (unlikely(__pyx_t_28 >= __pyx_pybuffernd_utc_dates.diminfo[0].shape)) __pyx_t_10 = 0; if (unlikely(__pyx_t_10 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_10); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1717; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_5 = __Pyx_PyInt_to_py_npy_int64((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_utc_dates.rcbuffer->pybuffer.buf, __pyx_t_28, __pyx_pybuffernd_utc_dates.diminfo[0].strides))); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1717; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1717; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_t_8), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1717; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0; __pyx_t_14 = __Pyx_PyIndex_AsSsize_t(__pyx_t_5); if (unlikely((__pyx_t_14 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1717; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_v_pos = __pyx_t_14; /* "pandas/tslib.pyx":1718 * deltas = _get_deltas(tz2) * pos = trans.searchsorted(utc_dates[0]) * if pos == 0: # <<<<<<<<<<<<<< * raise ValueError('First time before start of DST info') * elif pos == len(trans): */ __pyx_t_4 = ((__pyx_v_pos == 0) != 0); if (__pyx_t_4) { /* "pandas/tslib.pyx":1719 * pos = trans.searchsorted(utc_dates[0]) * if pos == 0: * raise ValueError('First time before start of DST info') # <<<<<<<<<<<<<< * elif pos == len(trans): * return utc_dates + deltas[-1] */ __pyx_t_5 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_100), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1719; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_Raise(__pyx_t_5, 0, 0, 0); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1719; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L16; } /* "pandas/tslib.pyx":1720 * if pos == 0: * raise ValueError('First time before start of DST info') * elif pos == len(trans): # <<<<<<<<<<<<<< * return utc_dates + deltas[-1] * */ __pyx_t_14 = PyObject_Length(((PyObject *)__pyx_v_trans)); if (unlikely(__pyx_t_14 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1720; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_4 = ((__pyx_v_pos == __pyx_t_14) != 0); if (__pyx_t_4) { /* "pandas/tslib.pyx":1721 * raise ValueError('First time before start of DST info') * elif pos == len(trans): * return utc_dates + deltas[-1] # <<<<<<<<<<<<<< * * # TODO: this assumed sortedness :/ */ __Pyx_XDECREF(__pyx_r); __pyx_t_29 = -1; __pyx_t_10 = -1; if (__pyx_t_29 < 0) { __pyx_t_29 += __pyx_pybuffernd_deltas.diminfo[0].shape; if (unlikely(__pyx_t_29 < 0)) __pyx_t_10 = 0; } else if (unlikely(__pyx_t_29 >= __pyx_pybuffernd_deltas.diminfo[0].shape)) __pyx_t_10 = 0; if (unlikely(__pyx_t_10 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_10); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1721; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_5 = __Pyx_PyInt_to_py_npy_int64((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_deltas.rcbuffer->pybuffer.buf, __pyx_t_29, __pyx_pybuffernd_deltas.diminfo[0].strides))); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1721; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_8 = PyNumber_Add(((PyObject *)__pyx_v_utc_dates), __pyx_t_5); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1721; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_r = __pyx_t_8; __pyx_t_8 = 0; goto __pyx_L0; goto __pyx_L16; } __pyx_L16:; /* "pandas/tslib.pyx":1724 * * # TODO: this assumed sortedness :/ * pos -= 1 # <<<<<<<<<<<<<< * * offset = deltas[pos] */ __pyx_v_pos = (__pyx_v_pos - 1); /* "pandas/tslib.pyx":1726 * pos -= 1 * * offset = deltas[pos] # <<<<<<<<<<<<<< * cdef Py_ssize_t trans_len = len(trans) * */ __pyx_t_14 = __pyx_v_pos; __pyx_t_10 = -1; if (__pyx_t_14 < 0) { __pyx_t_14 += __pyx_pybuffernd_deltas.diminfo[0].shape; if (unlikely(__pyx_t_14 < 0)) __pyx_t_10 = 0; } else if (unlikely(__pyx_t_14 >= __pyx_pybuffernd_deltas.diminfo[0].shape)) __pyx_t_10 = 0; if (unlikely(__pyx_t_10 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_10); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1726; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_offset = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_deltas.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_deltas.diminfo[0].strides)); /* "pandas/tslib.pyx":1727 * * offset = deltas[pos] * cdef Py_ssize_t trans_len = len(trans) # <<<<<<<<<<<<<< * * for i in range(n): */ __pyx_t_22 = PyObject_Length(((PyObject *)__pyx_v_trans)); if (unlikely(__pyx_t_22 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1727; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_trans_len = __pyx_t_22; /* "pandas/tslib.pyx":1729 * cdef Py_ssize_t trans_len = len(trans) * * for i in range(n): # <<<<<<<<<<<<<< * v = utc_dates[i] * if (pos + 1) < trans_len and v >= trans[pos + 1]: */ __pyx_t_22 = __pyx_v_n; for (__pyx_t_30 = 0; __pyx_t_30 < __pyx_t_22; __pyx_t_30+=1) { __pyx_v_i = __pyx_t_30; /* "pandas/tslib.pyx":1730 * * for i in range(n): * v = utc_dates[i] # <<<<<<<<<<<<<< * if (pos + 1) < trans_len and v >= trans[pos + 1]: * pos += 1 */ __pyx_t_31 = __pyx_v_i; __pyx_t_10 = -1; if (__pyx_t_31 < 0) { __pyx_t_31 += __pyx_pybuffernd_utc_dates.diminfo[0].shape; if (unlikely(__pyx_t_31 < 0)) __pyx_t_10 = 0; } else if (unlikely(__pyx_t_31 >= __pyx_pybuffernd_utc_dates.diminfo[0].shape)) __pyx_t_10 = 0; if (unlikely(__pyx_t_10 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_10); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1730; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_v = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_utc_dates.rcbuffer->pybuffer.buf, __pyx_t_31, __pyx_pybuffernd_utc_dates.diminfo[0].strides)); /* "pandas/tslib.pyx":1731 * for i in range(n): * v = utc_dates[i] * if (pos + 1) < trans_len and v >= trans[pos + 1]: # <<<<<<<<<<<<<< * pos += 1 * offset = deltas[pos] */ __pyx_t_4 = (((__pyx_v_pos + 1) < __pyx_v_trans_len) != 0); if (__pyx_t_4) { __pyx_t_32 = (__pyx_v_pos + 1); __pyx_t_10 = -1; if (__pyx_t_32 < 0) { __pyx_t_32 += __pyx_pybuffernd_trans.diminfo[0].shape; if (unlikely(__pyx_t_32 < 0)) __pyx_t_10 = 0; } else if (unlikely(__pyx_t_32 >= __pyx_pybuffernd_trans.diminfo[0].shape)) __pyx_t_10 = 0; if (unlikely(__pyx_t_10 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_10); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1731; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_3 = ((__pyx_v_v >= (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_trans.rcbuffer->pybuffer.buf, __pyx_t_32, __pyx_pybuffernd_trans.diminfo[0].strides))) != 0); __pyx_t_33 = __pyx_t_3; } else { __pyx_t_33 = __pyx_t_4; } if (__pyx_t_33) { /* "pandas/tslib.pyx":1732 * v = utc_dates[i] * if (pos + 1) < trans_len and v >= trans[pos + 1]: * pos += 1 # <<<<<<<<<<<<<< * offset = deltas[pos] * result[i] = v + offset */ __pyx_v_pos = (__pyx_v_pos + 1); /* "pandas/tslib.pyx":1733 * if (pos + 1) < trans_len and v >= trans[pos + 1]: * pos += 1 * offset = deltas[pos] # <<<<<<<<<<<<<< * result[i] = v + offset * */ __pyx_t_34 = __pyx_v_pos; __pyx_t_10 = -1; if (__pyx_t_34 < 0) { __pyx_t_34 += __pyx_pybuffernd_deltas.diminfo[0].shape; if (unlikely(__pyx_t_34 < 0)) __pyx_t_10 = 0; } else if (unlikely(__pyx_t_34 >= __pyx_pybuffernd_deltas.diminfo[0].shape)) __pyx_t_10 = 0; if (unlikely(__pyx_t_10 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_10); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1733; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_offset = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_deltas.rcbuffer->pybuffer.buf, __pyx_t_34, __pyx_pybuffernd_deltas.diminfo[0].strides)); goto __pyx_L19; } __pyx_L19:; /* "pandas/tslib.pyx":1734 * pos += 1 * offset = deltas[pos] * result[i] = v + offset # <<<<<<<<<<<<<< * * return result */ __pyx_t_35 = __pyx_v_i; __pyx_t_10 = -1; if (__pyx_t_35 < 0) { __pyx_t_35 += __pyx_pybuffernd_result.diminfo[0].shape; if (unlikely(__pyx_t_35 < 0)) __pyx_t_10 = 0; } else if (unlikely(__pyx_t_35 >= __pyx_pybuffernd_result.diminfo[0].shape)) __pyx_t_10 = 0; if (unlikely(__pyx_t_10 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_10); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1734; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_35, __pyx_pybuffernd_result.diminfo[0].strides) = (__pyx_v_v + __pyx_v_offset); } /* "pandas/tslib.pyx":1736 * result[i] = v + offset * * return result # <<<<<<<<<<<<<< * * def tz_convert_single(int64_t val, object tz1, object tz2): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_result)); __pyx_r = ((PyObject *)__pyx_v_result); goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_16); __Pyx_XDECREF(__pyx_t_17); __Pyx_XDECREF(__pyx_t_18); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_deltas.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_trans.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_utc_dates.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_vals.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.tslib.tz_convert", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_deltas.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_trans.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_utc_dates.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_vals.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_utc_dates); __Pyx_XDECREF((PyObject *)__pyx_v_result); __Pyx_XDECREF((PyObject *)__pyx_v_trans); __Pyx_XDECREF((PyObject *)__pyx_v_deltas); __Pyx_XDECREF(__pyx_v_pytz); __Pyx_XDECREF((PyObject *)__pyx_v_dt); __Pyx_XDECREF(__pyx_v_delta); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5tslib_47tz_convert_single(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5tslib_47tz_convert_single = {__Pyx_NAMESTR("tz_convert_single"), (PyCFunction)__pyx_pw_6pandas_5tslib_47tz_convert_single, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5tslib_47tz_convert_single(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { __pyx_t_5numpy_int64_t __pyx_v_val; PyObject *__pyx_v_tz1 = 0; PyObject *__pyx_v_tz2 = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("tz_convert_single (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__val,&__pyx_n_s__tz1,&__pyx_n_s__tz2,0}; PyObject* values[3] = {0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__val)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__tz1)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("tz_convert_single", 1, 3, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1738; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__tz2)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("tz_convert_single", 1, 3, 3, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1738; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "tz_convert_single") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1738; __pyx_clineno = __LINE__; goto __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_val = __Pyx_PyInt_from_py_npy_int64(values[0]); if (unlikely((__pyx_v_val == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1738; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_tz1 = values[1]; __pyx_v_tz2 = values[2]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("tz_convert_single", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1738; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.tslib.tz_convert_single", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pandas_5tslib_46tz_convert_single(__pyx_self, __pyx_v_val, __pyx_v_tz1, __pyx_v_tz2); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/tslib.pyx":1738 * return result * * def tz_convert_single(int64_t val, object tz1, object tz2): # <<<<<<<<<<<<<< * cdef: * ndarray[int64_t] trans, deltas */ static PyObject *__pyx_pf_6pandas_5tslib_46tz_convert_single(CYTHON_UNUSED PyObject *__pyx_self, __pyx_t_5numpy_int64_t __pyx_v_val, PyObject *__pyx_v_tz1, PyObject *__pyx_v_tz2) { PyArrayObject *__pyx_v_trans = 0; PyArrayObject *__pyx_v_deltas = 0; Py_ssize_t __pyx_v_pos; __pyx_t_5numpy_int64_t __pyx_v_offset; __pyx_t_5numpy_int64_t __pyx_v_utc_date; pandas_datetimestruct __pyx_v_dts; CYTHON_UNUSED PyObject *__pyx_v_pytz = NULL; PyDateTime_DateTime *__pyx_v_dt = NULL; PyObject *__pyx_v_delta = NULL; __Pyx_LocalBuf_ND __pyx_pybuffernd_deltas; __Pyx_Buffer __pyx_pybuffer_deltas; __Pyx_LocalBuf_ND __pyx_pybuffernd_trans; __Pyx_Buffer __pyx_pybuffer_trans; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; __pyx_t_5numpy_int64_t __pyx_t_11; PyArrayObject *__pyx_t_12 = NULL; int __pyx_t_13; PyObject *__pyx_t_14 = NULL; PyObject *__pyx_t_15 = NULL; PyObject *__pyx_t_16 = NULL; Py_ssize_t __pyx_t_17; Py_ssize_t __pyx_t_18; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("tz_convert_single", 0); __pyx_pybuffer_trans.pybuffer.buf = NULL; __pyx_pybuffer_trans.refcount = 0; __pyx_pybuffernd_trans.data = NULL; __pyx_pybuffernd_trans.rcbuffer = &__pyx_pybuffer_trans; __pyx_pybuffer_deltas.pybuffer.buf = NULL; __pyx_pybuffer_deltas.refcount = 0; __pyx_pybuffernd_deltas.data = NULL; __pyx_pybuffernd_deltas.rcbuffer = &__pyx_pybuffer_deltas; /* "pandas/tslib.pyx":1745 * pandas_datetimestruct dts * * if not have_pytz: # <<<<<<<<<<<<<< * import pytz * */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__have_pytz); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1745; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1745; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_3 = ((!__pyx_t_2) != 0); if (__pyx_t_3) { /* "pandas/tslib.pyx":1746 * * if not have_pytz: * import pytz # <<<<<<<<<<<<<< * * # Convert to UTC */ __pyx_t_1 = __Pyx_Import(((PyObject *)__pyx_n_s__pytz), 0, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1746; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_v_pytz = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L3; } __pyx_L3:; /* "pandas/tslib.pyx":1749 * * # Convert to UTC * if _is_tzlocal(tz1): # <<<<<<<<<<<<<< * pandas_datetime_to_datetimestruct(val, PANDAS_FR_ns, &dts) * dt = datetime(dts.year, dts.month, dts.day, dts.hour, */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s___is_tzlocal); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1749; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1749; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_v_tz1); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_tz1); __Pyx_GIVEREF(__pyx_v_tz1); __pyx_t_5 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1749; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1749; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_3) { /* "pandas/tslib.pyx":1750 * # Convert to UTC * if _is_tzlocal(tz1): * pandas_datetime_to_datetimestruct(val, PANDAS_FR_ns, &dts) # <<<<<<<<<<<<<< * dt = datetime(dts.year, dts.month, dts.day, dts.hour, * dts.min, dts.sec, dts.us, tz1) */ pandas_datetime_to_datetimestruct(__pyx_v_val, PANDAS_FR_ns, (&__pyx_v_dts)); /* "pandas/tslib.pyx":1751 * if _is_tzlocal(tz1): * pandas_datetime_to_datetimestruct(val, PANDAS_FR_ns, &dts) * dt = datetime(dts.year, dts.month, dts.day, dts.hour, # <<<<<<<<<<<<<< * dts.min, dts.sec, dts.us, tz1) * delta = int(total_seconds(_get_utcoffset(tz1, dt))) * 1000000000 */ __pyx_t_5 = __Pyx_PyInt_to_py_npy_int64(__pyx_v_dts.year); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1751; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = __Pyx_PyInt_to_py_npy_int32(__pyx_v_dts.month); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1751; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_1 = __Pyx_PyInt_to_py_npy_int32(__pyx_v_dts.day); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1751; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_6 = __Pyx_PyInt_to_py_npy_int32(__pyx_v_dts.hour); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1751; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); /* "pandas/tslib.pyx":1752 * pandas_datetime_to_datetimestruct(val, PANDAS_FR_ns, &dts) * dt = datetime(dts.year, dts.month, dts.day, dts.hour, * dts.min, dts.sec, dts.us, tz1) # <<<<<<<<<<<<<< * delta = int(total_seconds(_get_utcoffset(tz1, dt))) * 1000000000 * utc_date = val - delta */ __pyx_t_7 = __Pyx_PyInt_to_py_npy_int32(__pyx_v_dts.min); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1752; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_t_8 = __Pyx_PyInt_to_py_npy_int32(__pyx_v_dts.sec); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1752; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_9 = __Pyx_PyInt_to_py_npy_int32(__pyx_v_dts.us); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1752; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_t_10 = PyTuple_New(8); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1751; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_10, 2, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_10, 3, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_10, 4, __pyx_t_7); __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_10, 5, __pyx_t_8); __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_10, 6, __pyx_t_9); __Pyx_GIVEREF(__pyx_t_9); __Pyx_INCREF(__pyx_v_tz1); PyTuple_SET_ITEM(__pyx_t_10, 7, __pyx_v_tz1); __Pyx_GIVEREF(__pyx_v_tz1); __pyx_t_5 = 0; __pyx_t_4 = 0; __pyx_t_1 = 0; __pyx_t_6 = 0; __pyx_t_7 = 0; __pyx_t_8 = 0; __pyx_t_9 = 0; __pyx_t_9 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_8datetime_datetime)), ((PyObject *)__pyx_t_10), NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1751; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(((PyObject *)__pyx_t_10)); __pyx_t_10 = 0; __pyx_v_dt = ((PyDateTime_DateTime *)__pyx_t_9); __pyx_t_9 = 0; /* "pandas/tslib.pyx":1753 * dt = datetime(dts.year, dts.month, dts.day, dts.hour, * dts.min, dts.sec, dts.us, tz1) * delta = int(total_seconds(_get_utcoffset(tz1, dt))) * 1000000000 # <<<<<<<<<<<<<< * utc_date = val - delta * elif _get_zone(tz1) != 'UTC': */ __pyx_t_9 = __pyx_f_6pandas_5tslib__get_utcoffset(__pyx_v_tz1, ((PyObject *)__pyx_v_dt), 0); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1753; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_t_10 = PyFloat_FromDouble(__pyx_f_6pandas_5tslib_total_seconds(__pyx_t_9)); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1753; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1753; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_10); __Pyx_GIVEREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_t_10 = PyObject_Call(((PyObject *)((PyObject*)(&PyInt_Type))), ((PyObject *)__pyx_t_9), NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1753; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(((PyObject *)__pyx_t_9)); __pyx_t_9 = 0; __pyx_t_9 = PyNumber_Multiply(__pyx_t_10, __pyx_int_1000000000); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1753; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_v_delta = __pyx_t_9; __pyx_t_9 = 0; /* "pandas/tslib.pyx":1754 * dts.min, dts.sec, dts.us, tz1) * delta = int(total_seconds(_get_utcoffset(tz1, dt))) * 1000000000 * utc_date = val - delta # <<<<<<<<<<<<<< * elif _get_zone(tz1) != 'UTC': * deltas = _get_deltas(tz1) */ __pyx_t_9 = __Pyx_PyInt_to_py_npy_int64(__pyx_v_val); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1754; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_t_10 = PyNumber_Subtract(__pyx_t_9, __pyx_v_delta); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1754; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_11 = __Pyx_PyInt_from_py_npy_int64(__pyx_t_10); if (unlikely((__pyx_t_11 == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1754; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_v_utc_date = __pyx_t_11; goto __pyx_L4; } /* "pandas/tslib.pyx":1755 * delta = int(total_seconds(_get_utcoffset(tz1, dt))) * 1000000000 * utc_date = val - delta * elif _get_zone(tz1) != 'UTC': # <<<<<<<<<<<<<< * deltas = _get_deltas(tz1) * trans = _get_transitions(tz1) */ __pyx_t_10 = __pyx_f_6pandas_5tslib__get_zone(__pyx_v_tz1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1755; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __pyx_t_9 = PyObject_RichCompare(__pyx_t_10, ((PyObject *)__pyx_n_s__UTC), Py_NE); __Pyx_XGOTREF(__pyx_t_9); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1755; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1755; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; if (__pyx_t_3) { /* "pandas/tslib.pyx":1756 * utc_date = val - delta * elif _get_zone(tz1) != 'UTC': * deltas = _get_deltas(tz1) # <<<<<<<<<<<<<< * trans = _get_transitions(tz1) * pos = trans.searchsorted(val) - 1 */ __pyx_t_9 = __Pyx_GetModuleGlobalName(__pyx_n_s___get_deltas); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1756; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_t_10 = PyTuple_New(1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1756; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_INCREF(__pyx_v_tz1); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_v_tz1); __Pyx_GIVEREF(__pyx_v_tz1); __pyx_t_8 = PyObject_Call(__pyx_t_9, ((PyObject *)__pyx_t_10), NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1756; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_10)); __pyx_t_10 = 0; if (!(likely(((__pyx_t_8) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_8, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1756; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_12 = ((PyArrayObject *)__pyx_t_8); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_deltas.rcbuffer->pybuffer); __pyx_t_13 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_deltas.rcbuffer->pybuffer, (PyObject*)__pyx_t_12, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_13 < 0)) { PyErr_Fetch(&__pyx_t_14, &__pyx_t_15, &__pyx_t_16); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_deltas.rcbuffer->pybuffer, (PyObject*)__pyx_v_deltas, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_14); Py_XDECREF(__pyx_t_15); Py_XDECREF(__pyx_t_16); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_14, __pyx_t_15, __pyx_t_16); } } __pyx_pybuffernd_deltas.diminfo[0].strides = __pyx_pybuffernd_deltas.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_deltas.diminfo[0].shape = __pyx_pybuffernd_deltas.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_13 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1756; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_12 = 0; __pyx_v_deltas = ((PyArrayObject *)__pyx_t_8); __pyx_t_8 = 0; /* "pandas/tslib.pyx":1757 * elif _get_zone(tz1) != 'UTC': * deltas = _get_deltas(tz1) * trans = _get_transitions(tz1) # <<<<<<<<<<<<<< * pos = trans.searchsorted(val) - 1 * if pos < 0: */ __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s___get_transitions); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1757; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_10 = PyTuple_New(1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1757; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_INCREF(__pyx_v_tz1); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_v_tz1); __Pyx_GIVEREF(__pyx_v_tz1); __pyx_t_9 = PyObject_Call(__pyx_t_8, ((PyObject *)__pyx_t_10), NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1757; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_10)); __pyx_t_10 = 0; if (!(likely(((__pyx_t_9) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_9, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1757; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_12 = ((PyArrayObject *)__pyx_t_9); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_trans.rcbuffer->pybuffer); __pyx_t_13 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_trans.rcbuffer->pybuffer, (PyObject*)__pyx_t_12, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_13 < 0)) { PyErr_Fetch(&__pyx_t_16, &__pyx_t_15, &__pyx_t_14); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_trans.rcbuffer->pybuffer, (PyObject*)__pyx_v_trans, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_16); Py_XDECREF(__pyx_t_15); Py_XDECREF(__pyx_t_14); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_16, __pyx_t_15, __pyx_t_14); } } __pyx_pybuffernd_trans.diminfo[0].strides = __pyx_pybuffernd_trans.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_trans.diminfo[0].shape = __pyx_pybuffernd_trans.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_13 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1757; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_12 = 0; __pyx_v_trans = ((PyArrayObject *)__pyx_t_9); __pyx_t_9 = 0; /* "pandas/tslib.pyx":1758 * deltas = _get_deltas(tz1) * trans = _get_transitions(tz1) * pos = trans.searchsorted(val) - 1 # <<<<<<<<<<<<<< * if pos < 0: * raise ValueError('First time before start of DST info') */ __pyx_t_9 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_trans), __pyx_n_s__searchsorted); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1758; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_t_10 = __Pyx_PyInt_to_py_npy_int64(__pyx_v_val); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1758; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1758; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_10); __Pyx_GIVEREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_t_10 = PyObject_Call(__pyx_t_9, ((PyObject *)__pyx_t_8), NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1758; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0; __pyx_t_8 = PyNumber_Subtract(__pyx_t_10, __pyx_int_1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1758; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_t_17 = __Pyx_PyIndex_AsSsize_t(__pyx_t_8); if (unlikely((__pyx_t_17 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1758; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_v_pos = __pyx_t_17; /* "pandas/tslib.pyx":1759 * trans = _get_transitions(tz1) * pos = trans.searchsorted(val) - 1 * if pos < 0: # <<<<<<<<<<<<<< * raise ValueError('First time before start of DST info') * offset = deltas[pos] */ __pyx_t_3 = ((__pyx_v_pos < 0) != 0); if (__pyx_t_3) { /* "pandas/tslib.pyx":1760 * pos = trans.searchsorted(val) - 1 * if pos < 0: * raise ValueError('First time before start of DST info') # <<<<<<<<<<<<<< * offset = deltas[pos] * utc_date = val - offset */ __pyx_t_8 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_101), NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1760; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_Raise(__pyx_t_8, 0, 0, 0); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1760; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L5; } __pyx_L5:; /* "pandas/tslib.pyx":1761 * if pos < 0: * raise ValueError('First time before start of DST info') * offset = deltas[pos] # <<<<<<<<<<<<<< * utc_date = val - offset * else: */ __pyx_t_17 = __pyx_v_pos; __pyx_t_13 = -1; if (__pyx_t_17 < 0) { __pyx_t_17 += __pyx_pybuffernd_deltas.diminfo[0].shape; if (unlikely(__pyx_t_17 < 0)) __pyx_t_13 = 0; } else if (unlikely(__pyx_t_17 >= __pyx_pybuffernd_deltas.diminfo[0].shape)) __pyx_t_13 = 0; if (unlikely(__pyx_t_13 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_13); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1761; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_offset = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_deltas.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_deltas.diminfo[0].strides)); /* "pandas/tslib.pyx":1762 * raise ValueError('First time before start of DST info') * offset = deltas[pos] * utc_date = val - offset # <<<<<<<<<<<<<< * else: * utc_date = val */ __pyx_v_utc_date = (__pyx_v_val - __pyx_v_offset); goto __pyx_L4; } /*else*/ { /* "pandas/tslib.pyx":1764 * utc_date = val - offset * else: * utc_date = val # <<<<<<<<<<<<<< * * if _get_zone(tz2) == 'UTC': */ __pyx_v_utc_date = __pyx_v_val; } __pyx_L4:; /* "pandas/tslib.pyx":1766 * utc_date = val * * if _get_zone(tz2) == 'UTC': # <<<<<<<<<<<<<< * return utc_date * if _is_tzlocal(tz2): */ __pyx_t_8 = __pyx_f_6pandas_5tslib__get_zone(__pyx_v_tz2); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1766; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_10 = PyObject_RichCompare(__pyx_t_8, ((PyObject *)__pyx_n_s__UTC), Py_EQ); __Pyx_XGOTREF(__pyx_t_10); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1766; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_10); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1766; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; if (__pyx_t_3) { /* "pandas/tslib.pyx":1767 * * if _get_zone(tz2) == 'UTC': * return utc_date # <<<<<<<<<<<<<< * if _is_tzlocal(tz2): * pandas_datetime_to_datetimestruct(val, PANDAS_FR_ns, &dts) */ __Pyx_XDECREF(__pyx_r); __pyx_t_10 = __Pyx_PyInt_to_py_npy_int64(__pyx_v_utc_date); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1767; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __pyx_r = __pyx_t_10; __pyx_t_10 = 0; goto __pyx_L0; goto __pyx_L6; } __pyx_L6:; /* "pandas/tslib.pyx":1768 * if _get_zone(tz2) == 'UTC': * return utc_date * if _is_tzlocal(tz2): # <<<<<<<<<<<<<< * pandas_datetime_to_datetimestruct(val, PANDAS_FR_ns, &dts) * dt = datetime(dts.year, dts.month, dts.day, dts.hour, */ __pyx_t_10 = __Pyx_GetModuleGlobalName(__pyx_n_s___is_tzlocal); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1768; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1768; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_INCREF(__pyx_v_tz2); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_v_tz2); __Pyx_GIVEREF(__pyx_v_tz2); __pyx_t_9 = PyObject_Call(__pyx_t_10, ((PyObject *)__pyx_t_8), NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1768; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0; __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1768; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; if (__pyx_t_3) { /* "pandas/tslib.pyx":1769 * return utc_date * if _is_tzlocal(tz2): * pandas_datetime_to_datetimestruct(val, PANDAS_FR_ns, &dts) # <<<<<<<<<<<<<< * dt = datetime(dts.year, dts.month, dts.day, dts.hour, * dts.min, dts.sec, dts.us, tz2) */ pandas_datetime_to_datetimestruct(__pyx_v_val, PANDAS_FR_ns, (&__pyx_v_dts)); /* "pandas/tslib.pyx":1770 * if _is_tzlocal(tz2): * pandas_datetime_to_datetimestruct(val, PANDAS_FR_ns, &dts) * dt = datetime(dts.year, dts.month, dts.day, dts.hour, # <<<<<<<<<<<<<< * dts.min, dts.sec, dts.us, tz2) * delta = int(total_seconds(_get_utcoffset(tz2, dt))) * 1000000000 */ __pyx_t_9 = __Pyx_PyInt_to_py_npy_int64(__pyx_v_dts.year); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1770; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_t_8 = __Pyx_PyInt_to_py_npy_int32(__pyx_v_dts.month); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1770; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_10 = __Pyx_PyInt_to_py_npy_int32(__pyx_v_dts.day); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1770; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __pyx_t_7 = __Pyx_PyInt_to_py_npy_int32(__pyx_v_dts.hour); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1770; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); /* "pandas/tslib.pyx":1771 * pandas_datetime_to_datetimestruct(val, PANDAS_FR_ns, &dts) * dt = datetime(dts.year, dts.month, dts.day, dts.hour, * dts.min, dts.sec, dts.us, tz2) # <<<<<<<<<<<<<< * delta = int(total_seconds(_get_utcoffset(tz2, dt))) * 1000000000 * return utc_date + delta */ __pyx_t_6 = __Pyx_PyInt_to_py_npy_int32(__pyx_v_dts.min); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1771; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_1 = __Pyx_PyInt_to_py_npy_int32(__pyx_v_dts.sec); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1771; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = __Pyx_PyInt_to_py_npy_int32(__pyx_v_dts.us); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1771; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = PyTuple_New(8); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1770; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_9); __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_8); __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_t_10); __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_5, 3, __pyx_t_7); __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_5, 4, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_5, 5, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_5, 6, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __Pyx_INCREF(__pyx_v_tz2); PyTuple_SET_ITEM(__pyx_t_5, 7, __pyx_v_tz2); __Pyx_GIVEREF(__pyx_v_tz2); __pyx_t_9 = 0; __pyx_t_8 = 0; __pyx_t_10 = 0; __pyx_t_7 = 0; __pyx_t_6 = 0; __pyx_t_1 = 0; __pyx_t_4 = 0; __pyx_t_4 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_8datetime_datetime)), ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1770; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; __Pyx_XDECREF_SET(__pyx_v_dt, ((PyDateTime_DateTime *)__pyx_t_4)); __pyx_t_4 = 0; /* "pandas/tslib.pyx":1772 * dt = datetime(dts.year, dts.month, dts.day, dts.hour, * dts.min, dts.sec, dts.us, tz2) * delta = int(total_seconds(_get_utcoffset(tz2, dt))) * 1000000000 # <<<<<<<<<<<<<< * return utc_date + delta * # Convert UTC to other timezone */ __pyx_t_4 = __pyx_f_6pandas_5tslib__get_utcoffset(__pyx_v_tz2, ((PyObject *)__pyx_v_dt), 0); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1772; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = PyFloat_FromDouble(__pyx_f_6pandas_5tslib_total_seconds(__pyx_t_4)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1772; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1772; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyObject_Call(((PyObject *)((PyObject*)(&PyInt_Type))), ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1772; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __pyx_t_4 = PyNumber_Multiply(__pyx_t_5, __pyx_int_1000000000); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1772; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF_SET(__pyx_v_delta, __pyx_t_4); __pyx_t_4 = 0; /* "pandas/tslib.pyx":1773 * dts.min, dts.sec, dts.us, tz2) * delta = int(total_seconds(_get_utcoffset(tz2, dt))) * 1000000000 * return utc_date + delta # <<<<<<<<<<<<<< * # Convert UTC to other timezone * trans = _get_transitions(tz2) */ __Pyx_XDECREF(__pyx_r); __pyx_t_4 = __Pyx_PyInt_to_py_npy_int64(__pyx_v_utc_date); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1773; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = PyNumber_Add(__pyx_t_4, __pyx_v_delta); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1773; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_r = __pyx_t_5; __pyx_t_5 = 0; goto __pyx_L0; goto __pyx_L7; } __pyx_L7:; /* "pandas/tslib.pyx":1775 * return utc_date + delta * # Convert UTC to other timezone * trans = _get_transitions(tz2) # <<<<<<<<<<<<<< * deltas = _get_deltas(tz2) * pos = trans.searchsorted(utc_date) - 1 */ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s___get_transitions); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1775; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1775; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_v_tz2); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_tz2); __Pyx_GIVEREF(__pyx_v_tz2); __pyx_t_1 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1775; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(((PyObject *)__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_filename = __pyx_f[0]; __pyx_lineno = 1775; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_12 = ((PyArrayObject *)__pyx_t_1); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_trans.rcbuffer->pybuffer); __pyx_t_13 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_trans.rcbuffer->pybuffer, (PyObject*)__pyx_t_12, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_13 < 0)) { PyErr_Fetch(&__pyx_t_14, &__pyx_t_15, &__pyx_t_16); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_trans.rcbuffer->pybuffer, (PyObject*)__pyx_v_trans, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_14); Py_XDECREF(__pyx_t_15); Py_XDECREF(__pyx_t_16); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_14, __pyx_t_15, __pyx_t_16); } } __pyx_pybuffernd_trans.diminfo[0].strides = __pyx_pybuffernd_trans.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_trans.diminfo[0].shape = __pyx_pybuffernd_trans.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_13 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1775; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_12 = 0; __Pyx_XDECREF_SET(__pyx_v_trans, ((PyArrayObject *)__pyx_t_1)); __pyx_t_1 = 0; /* "pandas/tslib.pyx":1776 * # Convert UTC to other timezone * trans = _get_transitions(tz2) * deltas = _get_deltas(tz2) # <<<<<<<<<<<<<< * pos = trans.searchsorted(utc_date) - 1 * if pos < 0: */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s___get_deltas); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1776; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1776; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_v_tz2); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_tz2); __Pyx_GIVEREF(__pyx_v_tz2); __pyx_t_5 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1776; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(((PyObject *)__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_filename = __pyx_f[0]; __pyx_lineno = 1776; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_12 = ((PyArrayObject *)__pyx_t_5); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_deltas.rcbuffer->pybuffer); __pyx_t_13 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_deltas.rcbuffer->pybuffer, (PyObject*)__pyx_t_12, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_13 < 0)) { PyErr_Fetch(&__pyx_t_16, &__pyx_t_15, &__pyx_t_14); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_deltas.rcbuffer->pybuffer, (PyObject*)__pyx_v_deltas, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_16); Py_XDECREF(__pyx_t_15); Py_XDECREF(__pyx_t_14); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_16, __pyx_t_15, __pyx_t_14); } } __pyx_pybuffernd_deltas.diminfo[0].strides = __pyx_pybuffernd_deltas.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_deltas.diminfo[0].shape = __pyx_pybuffernd_deltas.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_13 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1776; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_12 = 0; __Pyx_XDECREF_SET(__pyx_v_deltas, ((PyArrayObject *)__pyx_t_5)); __pyx_t_5 = 0; /* "pandas/tslib.pyx":1777 * trans = _get_transitions(tz2) * deltas = _get_deltas(tz2) * pos = trans.searchsorted(utc_date) - 1 # <<<<<<<<<<<<<< * if pos < 0: * raise ValueError('First time before start of DST info') */ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_trans), __pyx_n_s__searchsorted); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1777; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = __Pyx_PyInt_to_py_npy_int64(__pyx_v_utc_date); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1777; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1777; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1777; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_t_1 = PyNumber_Subtract(__pyx_t_4, __pyx_int_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1777; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_18 = __Pyx_PyIndex_AsSsize_t(__pyx_t_1); if (unlikely((__pyx_t_18 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1777; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_pos = __pyx_t_18; /* "pandas/tslib.pyx":1778 * deltas = _get_deltas(tz2) * pos = trans.searchsorted(utc_date) - 1 * if pos < 0: # <<<<<<<<<<<<<< * raise ValueError('First time before start of DST info') * */ __pyx_t_3 = ((__pyx_v_pos < 0) != 0); if (__pyx_t_3) { /* "pandas/tslib.pyx":1779 * pos = trans.searchsorted(utc_date) - 1 * if pos < 0: * raise ValueError('First time before start of DST info') # <<<<<<<<<<<<<< * * offset = deltas[pos] */ __pyx_t_1 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_102), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1779; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 1779; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L8; } __pyx_L8:; /* "pandas/tslib.pyx":1781 * raise ValueError('First time before start of DST info') * * offset = deltas[pos] # <<<<<<<<<<<<<< * return utc_date + offset * */ __pyx_t_18 = __pyx_v_pos; __pyx_t_13 = -1; if (__pyx_t_18 < 0) { __pyx_t_18 += __pyx_pybuffernd_deltas.diminfo[0].shape; if (unlikely(__pyx_t_18 < 0)) __pyx_t_13 = 0; } else if (unlikely(__pyx_t_18 >= __pyx_pybuffernd_deltas.diminfo[0].shape)) __pyx_t_13 = 0; if (unlikely(__pyx_t_13 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_13); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1781; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_offset = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_deltas.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_deltas.diminfo[0].strides)); /* "pandas/tslib.pyx":1782 * * offset = deltas[pos] * return utc_date + offset # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyInt_to_py_npy_int64((__pyx_v_utc_date + __pyx_v_offset)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1782; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); __Pyx_XDECREF(__pyx_t_10); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_deltas.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_trans.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.tslib.tz_convert_single", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_deltas.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_trans.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_trans); __Pyx_XDECREF((PyObject *)__pyx_v_deltas); __Pyx_XDECREF(__pyx_v_pytz); __Pyx_XDECREF((PyObject *)__pyx_v_dt); __Pyx_XDECREF(__pyx_v_delta); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5tslib_49_get_transitions(PyObject *__pyx_self, PyObject *__pyx_v_tz); /*proto*/ static char __pyx_doc_6pandas_5tslib_48_get_transitions[] = "\n Get UTC times of DST transitions\n "; static PyMethodDef __pyx_mdef_6pandas_5tslib_49_get_transitions = {__Pyx_NAMESTR("_get_transitions"), (PyCFunction)__pyx_pw_6pandas_5tslib_49_get_transitions, METH_O, __Pyx_DOCSTR(__pyx_doc_6pandas_5tslib_48_get_transitions)}; static PyObject *__pyx_pw_6pandas_5tslib_49_get_transitions(PyObject *__pyx_self, PyObject *__pyx_v_tz) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_get_transitions (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_5tslib_48_get_transitions(__pyx_self, ((PyObject *)__pyx_v_tz)); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/tslib.pyx":1788 * utc_offset_cache = {} * * def _get_transitions(tz): # <<<<<<<<<<<<<< * """ * Get UTC times of DST transitions */ static PyObject *__pyx_pf_6pandas_5tslib_48_get_transitions(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_tz) { PyObject *__pyx_v_arr = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; Py_hash_t __pyx_t_4; int __pyx_t_5; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; PyObject *__pyx_t_11 = NULL; PyObject *__pyx_t_12 = NULL; PyObject *__pyx_t_13 = NULL; int __pyx_t_14; int __pyx_t_15; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_get_transitions", 0); /* "pandas/tslib.pyx":1792 * Get UTC times of DST transitions * """ * try: # <<<<<<<<<<<<<< * # tzoffset not hashable in Python 3 * hash(tz) */ { __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:*/ { /* "pandas/tslib.pyx":1794 * try: * # tzoffset not hashable in Python 3 * hash(tz) # <<<<<<<<<<<<<< * except TypeError: * return np.array([NPY_NAT + 1], dtype=np.int64) */ __pyx_t_4 = PyObject_Hash(__pyx_v_tz); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1794; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L10_try_end; __pyx_L3_error:; /* "pandas/tslib.pyx":1795 * # tzoffset not hashable in Python 3 * hash(tz) * except TypeError: # <<<<<<<<<<<<<< * return np.array([NPY_NAT + 1], dtype=np.int64) * */ __pyx_t_5 = PyErr_ExceptionMatches(__pyx_builtin_TypeError); if (__pyx_t_5) { __Pyx_AddTraceback("pandas.tslib._get_transitions", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1795; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_GOTREF(__pyx_t_7); __Pyx_GOTREF(__pyx_t_8); /* "pandas/tslib.pyx":1796 * hash(tz) * except TypeError: * return np.array([NPY_NAT + 1], dtype=np.int64) # <<<<<<<<<<<<<< * * if tz not in trans_cache: */ __Pyx_XDECREF(__pyx_r); __pyx_t_9 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1796; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s__array); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1796; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_9 = __Pyx_PyInt_to_py_npy_int64((__pyx_v_6pandas_5tslib_NPY_NAT + 1)); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1796; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_t_11 = PyList_New(1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1796; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} __Pyx_GOTREF(__pyx_t_11); PyList_SET_ITEM(__pyx_t_11, 0, __pyx_t_9); __Pyx_GIVEREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1796; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} __Pyx_GOTREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_9, 0, ((PyObject *)__pyx_t_11)); __Pyx_GIVEREF(((PyObject *)__pyx_t_11)); __pyx_t_11 = 0; __pyx_t_11 = PyDict_New(); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1796; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_11)); __pyx_t_12 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1796; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} __Pyx_GOTREF(__pyx_t_12); __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s__int64); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1796; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; if (PyDict_SetItem(__pyx_t_11, ((PyObject *)__pyx_n_s__dtype), __pyx_t_13) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1796; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_13 = PyObject_Call(__pyx_t_10, ((PyObject *)__pyx_t_9), ((PyObject *)__pyx_t_11)); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1796; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_9)); __pyx_t_9 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_11)); __pyx_t_11 = 0; __pyx_r = __pyx_t_13; __pyx_t_13 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; goto __pyx_L6_except_return; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; goto __pyx_L4_exception_handled; } __pyx_L5_except_error:; __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); goto __pyx_L1_error; __pyx_L6_except_return:; __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); goto __pyx_L0; __pyx_L4_exception_handled:; __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); __pyx_L10_try_end:; } /* "pandas/tslib.pyx":1798 * return np.array([NPY_NAT + 1], dtype=np.int64) * * if tz not in trans_cache: # <<<<<<<<<<<<<< * if hasattr(tz, '_utc_transition_times'): * arr = np.array(tz._utc_transition_times, dtype='M8[ns]') */ __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s__trans_cache); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1798; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_14 = (__Pyx_PySequence_Contains(__pyx_v_tz, __pyx_t_8, Py_NE)); if (unlikely(__pyx_t_14 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1798; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_15 = (__pyx_t_14 != 0); if (__pyx_t_15) { /* "pandas/tslib.pyx":1799 * * if tz not in trans_cache: * if hasattr(tz, '_utc_transition_times'): # <<<<<<<<<<<<<< * arr = np.array(tz._utc_transition_times, dtype='M8[ns]') * arr = arr.view('i8') */ __pyx_t_15 = PyObject_HasAttr(__pyx_v_tz, ((PyObject *)__pyx_n_s_103)); if (unlikely(__pyx_t_15 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1799; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_14 = (__pyx_t_15 != 0); if (__pyx_t_14) { /* "pandas/tslib.pyx":1800 * if tz not in trans_cache: * if hasattr(tz, '_utc_transition_times'): * arr = np.array(tz._utc_transition_times, dtype='M8[ns]') # <<<<<<<<<<<<<< * arr = arr.view('i8') * try: */ __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1800; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s__array); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1800; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_tz, __pyx_n_s_103); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1800; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1800; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_8); __Pyx_GIVEREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_8 = PyDict_New(); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1800; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_8)); if (PyDict_SetItem(__pyx_t_8, ((PyObject *)__pyx_n_s__dtype), ((PyObject *)__pyx_kp_s_18)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1800; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_13 = PyObject_Call(__pyx_t_7, ((PyObject *)__pyx_t_6), ((PyObject *)__pyx_t_8)); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1800; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0; __pyx_v_arr = __pyx_t_13; __pyx_t_13 = 0; /* "pandas/tslib.pyx":1801 * if hasattr(tz, '_utc_transition_times'): * arr = np.array(tz._utc_transition_times, dtype='M8[ns]') * arr = arr.view('i8') # <<<<<<<<<<<<<< * try: * if tz._utc_transition_times[0].year == 1: */ __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_v_arr, __pyx_n_s__view); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1801; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __pyx_t_8 = PyObject_Call(__pyx_t_13, ((PyObject *)__pyx_k_tuple_104), NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1801; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_DECREF_SET(__pyx_v_arr, __pyx_t_8); __pyx_t_8 = 0; /* "pandas/tslib.pyx":1802 * arr = np.array(tz._utc_transition_times, dtype='M8[ns]') * arr = arr.view('i8') * try: # <<<<<<<<<<<<<< * if tz._utc_transition_times[0].year == 1: * arr[0] = NPY_NAT + 1 */ { __Pyx_ExceptionSave(&__pyx_t_3, &__pyx_t_2, &__pyx_t_1); __Pyx_XGOTREF(__pyx_t_3); __Pyx_XGOTREF(__pyx_t_2); __Pyx_XGOTREF(__pyx_t_1); /*try:*/ { /* "pandas/tslib.pyx":1803 * arr = arr.view('i8') * try: * if tz._utc_transition_times[0].year == 1: # <<<<<<<<<<<<<< * arr[0] = NPY_NAT + 1 * except Exception: */ __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_tz, __pyx_n_s_103); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1803; __pyx_clineno = __LINE__; goto __pyx_L15_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_13 = __Pyx_GetItemInt(__pyx_t_8, 0, sizeof(long), PyInt_FromLong, 0, 0, 1); if (!__pyx_t_13) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1803; __pyx_clineno = __LINE__; goto __pyx_L15_error;} __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_13, __pyx_n_s__year); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1803; __pyx_clineno = __LINE__; goto __pyx_L15_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_13 = PyObject_RichCompare(__pyx_t_8, __pyx_int_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_13); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1803; __pyx_clineno = __LINE__; goto __pyx_L15_error;} __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_14 = __Pyx_PyObject_IsTrue(__pyx_t_13); if (unlikely(__pyx_t_14 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1803; __pyx_clineno = __LINE__; goto __pyx_L15_error;} __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; if (__pyx_t_14) { /* "pandas/tslib.pyx":1804 * try: * if tz._utc_transition_times[0].year == 1: * arr[0] = NPY_NAT + 1 # <<<<<<<<<<<<<< * except Exception: * pass */ __pyx_t_13 = __Pyx_PyInt_to_py_npy_int64((__pyx_v_6pandas_5tslib_NPY_NAT + 1)); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1804; __pyx_clineno = __LINE__; goto __pyx_L15_error;} __Pyx_GOTREF(__pyx_t_13); if (__Pyx_SetItemInt(__pyx_v_arr, 0, __pyx_t_13, sizeof(long), PyInt_FromLong, 0, 0, 1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1804; __pyx_clineno = __LINE__; goto __pyx_L15_error;} __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; goto __pyx_L23; } __pyx_L23:; } __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L22_try_end; __pyx_L15_error:; __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; /* "pandas/tslib.pyx":1805 * if tz._utc_transition_times[0].year == 1: * arr[0] = NPY_NAT + 1 * except Exception: # <<<<<<<<<<<<<< * pass * else: */ __pyx_t_5 = PyErr_ExceptionMatches(__pyx_builtin_Exception); if (__pyx_t_5) { PyErr_Restore(0,0,0); goto __pyx_L16_exception_handled; } __Pyx_XGIVEREF(__pyx_t_3); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_1); __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_2, __pyx_t_1); goto __pyx_L1_error; __pyx_L16_exception_handled:; __Pyx_XGIVEREF(__pyx_t_3); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_1); __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_2, __pyx_t_1); __pyx_L22_try_end:; } goto __pyx_L14; } /*else*/ { /* "pandas/tslib.pyx":1808 * pass * else: * arr = np.array([NPY_NAT + 1], dtype=np.int64) # <<<<<<<<<<<<<< * trans_cache[tz] = arr * return trans_cache[tz] */ __pyx_t_13 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1808; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_13, __pyx_n_s__array); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1808; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_13 = __Pyx_PyInt_to_py_npy_int64((__pyx_v_6pandas_5tslib_NPY_NAT + 1)); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1808; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __pyx_t_6 = PyList_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1808; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); PyList_SET_ITEM(__pyx_t_6, 0, __pyx_t_13); __Pyx_GIVEREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_13 = PyTuple_New(1); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1808; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); PyTuple_SET_ITEM(__pyx_t_13, 0, ((PyObject *)__pyx_t_6)); __Pyx_GIVEREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0; __pyx_t_6 = PyDict_New(); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1808; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_6)); __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1808; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s__int64); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1808; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (PyDict_SetItem(__pyx_t_6, ((PyObject *)__pyx_n_s__dtype), __pyx_t_11) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1808; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __pyx_t_11 = PyObject_Call(__pyx_t_8, ((PyObject *)__pyx_t_13), ((PyObject *)__pyx_t_6)); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1808; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_13)); __pyx_t_13 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0; __pyx_v_arr = __pyx_t_11; __pyx_t_11 = 0; } __pyx_L14:; /* "pandas/tslib.pyx":1809 * else: * arr = np.array([NPY_NAT + 1], dtype=np.int64) * trans_cache[tz] = arr # <<<<<<<<<<<<<< * return trans_cache[tz] * */ __pyx_t_11 = __Pyx_GetModuleGlobalName(__pyx_n_s__trans_cache); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1809; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); if (PyObject_SetItem(__pyx_t_11, __pyx_v_tz, __pyx_v_arr) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1809; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; goto __pyx_L13; } __pyx_L13:; /* "pandas/tslib.pyx":1810 * arr = np.array([NPY_NAT + 1], dtype=np.int64) * trans_cache[tz] = arr * return trans_cache[tz] # <<<<<<<<<<<<<< * * def _get_deltas(tz): */ __Pyx_XDECREF(__pyx_r); __pyx_t_11 = __Pyx_GetModuleGlobalName(__pyx_n_s__trans_cache); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1810; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __pyx_t_6 = PyObject_GetItem(__pyx_t_11, __pyx_v_tz); if (!__pyx_t_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1810; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __pyx_r = __pyx_t_6; __pyx_t_6 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); __Pyx_XDECREF(__pyx_t_10); __Pyx_XDECREF(__pyx_t_11); __Pyx_XDECREF(__pyx_t_12); __Pyx_XDECREF(__pyx_t_13); __Pyx_AddTraceback("pandas.tslib._get_transitions", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_arr); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5tslib_51_get_deltas(PyObject *__pyx_self, PyObject *__pyx_v_tz); /*proto*/ static char __pyx_doc_6pandas_5tslib_50_get_deltas[] = "\n Get UTC offsets in microseconds corresponding to DST transitions\n "; static PyMethodDef __pyx_mdef_6pandas_5tslib_51_get_deltas = {__Pyx_NAMESTR("_get_deltas"), (PyCFunction)__pyx_pw_6pandas_5tslib_51_get_deltas, METH_O, __Pyx_DOCSTR(__pyx_doc_6pandas_5tslib_50_get_deltas)}; static PyObject *__pyx_pw_6pandas_5tslib_51_get_deltas(PyObject *__pyx_self, PyObject *__pyx_v_tz) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_get_deltas (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_5tslib_50_get_deltas(__pyx_self, ((PyObject *)__pyx_v_tz)); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/tslib.pyx":1812 * return trans_cache[tz] * * def _get_deltas(tz): # <<<<<<<<<<<<<< * """ * Get UTC offsets in microseconds corresponding to DST transitions */ static PyObject *__pyx_pf_6pandas_5tslib_50_get_deltas(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_tz) { PyObject *__pyx_v_num = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; Py_hash_t __pyx_t_4; int __pyx_t_5; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; PyObject *__pyx_t_11 = NULL; PyObject *__pyx_t_12 = NULL; PyObject *__pyx_t_13 = NULL; int __pyx_t_14; int __pyx_t_15; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_get_deltas", 0); /* "pandas/tslib.pyx":1816 * Get UTC offsets in microseconds corresponding to DST transitions * """ * try: # <<<<<<<<<<<<<< * # tzoffset not hashable in Python 3 * hash(tz) */ { __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:*/ { /* "pandas/tslib.pyx":1818 * try: * # tzoffset not hashable in Python 3 * hash(tz) # <<<<<<<<<<<<<< * except TypeError: * num = int(total_seconds(_get_utcoffset(tz, None))) * 1000000000 */ __pyx_t_4 = PyObject_Hash(__pyx_v_tz); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1818; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L10_try_end; __pyx_L3_error:; /* "pandas/tslib.pyx":1819 * # tzoffset not hashable in Python 3 * hash(tz) * except TypeError: # <<<<<<<<<<<<<< * num = int(total_seconds(_get_utcoffset(tz, None))) * 1000000000 * return np.array([num], dtype=np.int64) */ __pyx_t_5 = PyErr_ExceptionMatches(__pyx_builtin_TypeError); if (__pyx_t_5) { __Pyx_AddTraceback("pandas.tslib._get_deltas", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1819; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_GOTREF(__pyx_t_7); __Pyx_GOTREF(__pyx_t_8); /* "pandas/tslib.pyx":1820 * hash(tz) * except TypeError: * num = int(total_seconds(_get_utcoffset(tz, None))) * 1000000000 # <<<<<<<<<<<<<< * return np.array([num], dtype=np.int64) * */ __pyx_t_9 = __pyx_f_6pandas_5tslib__get_utcoffset(__pyx_v_tz, Py_None, 0); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1820; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_t_10 = PyFloat_FromDouble(__pyx_f_6pandas_5tslib_total_seconds(__pyx_t_9)); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1820; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1820; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} __Pyx_GOTREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_10); __Pyx_GIVEREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_t_10 = PyObject_Call(((PyObject *)((PyObject*)(&PyInt_Type))), ((PyObject *)__pyx_t_9), NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1820; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(((PyObject *)__pyx_t_9)); __pyx_t_9 = 0; __pyx_t_9 = PyNumber_Multiply(__pyx_t_10, __pyx_int_1000000000); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1820; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_v_num = __pyx_t_9; __pyx_t_9 = 0; /* "pandas/tslib.pyx":1821 * except TypeError: * num = int(total_seconds(_get_utcoffset(tz, None))) * 1000000000 * return np.array([num], dtype=np.int64) # <<<<<<<<<<<<<< * * if tz not in utc_offset_cache: */ __Pyx_XDECREF(__pyx_r); __pyx_t_9 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1821; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s__array); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1821; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_9 = PyList_New(1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1821; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_INCREF(__pyx_v_num); PyList_SET_ITEM(__pyx_t_9, 0, __pyx_v_num); __Pyx_GIVEREF(__pyx_v_num); __pyx_t_11 = PyTuple_New(1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1821; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} __Pyx_GOTREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_11, 0, ((PyObject *)__pyx_t_9)); __Pyx_GIVEREF(((PyObject *)__pyx_t_9)); __pyx_t_9 = 0; __pyx_t_9 = PyDict_New(); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1821; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_9)); __pyx_t_12 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1821; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} __Pyx_GOTREF(__pyx_t_12); __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s__int64); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1821; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; if (PyDict_SetItem(__pyx_t_9, ((PyObject *)__pyx_n_s__dtype), __pyx_t_13) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1821; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_13 = PyObject_Call(__pyx_t_10, ((PyObject *)__pyx_t_11), ((PyObject *)__pyx_t_9)); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1821; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_11)); __pyx_t_11 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_9)); __pyx_t_9 = 0; __pyx_r = __pyx_t_13; __pyx_t_13 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; goto __pyx_L6_except_return; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; goto __pyx_L4_exception_handled; } __pyx_L5_except_error:; __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); goto __pyx_L1_error; __pyx_L6_except_return:; __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); goto __pyx_L0; __pyx_L4_exception_handled:; __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); __pyx_L10_try_end:; } /* "pandas/tslib.pyx":1823 * return np.array([num], dtype=np.int64) * * if tz not in utc_offset_cache: # <<<<<<<<<<<<<< * if hasattr(tz, '_utc_transition_times'): * utc_offset_cache[tz] = _unbox_utcoffsets(tz._transition_info) */ __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s__utc_offset_cache); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1823; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_14 = (__Pyx_PySequence_Contains(__pyx_v_tz, __pyx_t_8, Py_NE)); if (unlikely(__pyx_t_14 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1823; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_15 = (__pyx_t_14 != 0); if (__pyx_t_15) { /* "pandas/tslib.pyx":1824 * * if tz not in utc_offset_cache: * if hasattr(tz, '_utc_transition_times'): # <<<<<<<<<<<<<< * utc_offset_cache[tz] = _unbox_utcoffsets(tz._transition_info) * else: */ __pyx_t_15 = PyObject_HasAttr(__pyx_v_tz, ((PyObject *)__pyx_n_s_103)); if (unlikely(__pyx_t_15 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1824; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_14 = (__pyx_t_15 != 0); if (__pyx_t_14) { /* "pandas/tslib.pyx":1825 * if tz not in utc_offset_cache: * if hasattr(tz, '_utc_transition_times'): * utc_offset_cache[tz] = _unbox_utcoffsets(tz._transition_info) # <<<<<<<<<<<<<< * else: * # static tzinfo */ __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_tz, __pyx_n_s___transition_info); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1825; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_7 = ((PyObject *)__pyx_f_6pandas_5tslib__unbox_utcoffsets(__pyx_t_8, 0)); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1825; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s__utc_offset_cache); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1825; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); if (PyObject_SetItem(__pyx_t_8, __pyx_v_tz, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1825; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; goto __pyx_L14; } /*else*/ { /* "pandas/tslib.pyx":1828 * else: * # static tzinfo * num = int(total_seconds(_get_utcoffset(tz, None))) * 1000000000 # <<<<<<<<<<<<<< * utc_offset_cache[tz] = np.array([num], dtype=np.int64) * */ __pyx_t_7 = __pyx_f_6pandas_5tslib__get_utcoffset(__pyx_v_tz, Py_None, 0); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1828; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_t_8 = PyFloat_FromDouble(__pyx_f_6pandas_5tslib_total_seconds(__pyx_t_7)); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1828; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1828; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_8); __Pyx_GIVEREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_8 = PyObject_Call(((PyObject *)((PyObject*)(&PyInt_Type))), ((PyObject *)__pyx_t_7), NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1828; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0; __pyx_t_7 = PyNumber_Multiply(__pyx_t_8, __pyx_int_1000000000); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1828; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_v_num = __pyx_t_7; __pyx_t_7 = 0; /* "pandas/tslib.pyx":1829 * # static tzinfo * num = int(total_seconds(_get_utcoffset(tz, None))) * 1000000000 * utc_offset_cache[tz] = np.array([num], dtype=np.int64) # <<<<<<<<<<<<<< * * return utc_offset_cache[tz] */ __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1829; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s__array); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1829; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_7 = PyList_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1829; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_INCREF(__pyx_v_num); PyList_SET_ITEM(__pyx_t_7, 0, __pyx_v_num); __Pyx_GIVEREF(__pyx_v_num); __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1829; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_t_7)); __Pyx_GIVEREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0; __pyx_t_7 = PyDict_New(); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1829; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_7)); __pyx_t_13 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1829; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_13, __pyx_n_s__int64); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1829; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; if (PyDict_SetItem(__pyx_t_7, ((PyObject *)__pyx_n_s__dtype), __pyx_t_9) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1829; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_9 = PyObject_Call(__pyx_t_8, ((PyObject *)__pyx_t_6), ((PyObject *)__pyx_t_7)); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1829; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0; __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s__utc_offset_cache); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1829; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); if (PyObject_SetItem(__pyx_t_7, __pyx_v_tz, __pyx_t_9) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1829; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; } __pyx_L14:; goto __pyx_L13; } __pyx_L13:; /* "pandas/tslib.pyx":1831 * utc_offset_cache[tz] = np.array([num], dtype=np.int64) * * return utc_offset_cache[tz] # <<<<<<<<<<<<<< * * cdef double total_seconds(object td): # Python 2.6 compat */ __Pyx_XDECREF(__pyx_r); __pyx_t_9 = __Pyx_GetModuleGlobalName(__pyx_n_s__utc_offset_cache); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1831; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_t_7 = PyObject_GetItem(__pyx_t_9, __pyx_v_tz); if (!__pyx_t_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1831; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_r = __pyx_t_7; __pyx_t_7 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); __Pyx_XDECREF(__pyx_t_10); __Pyx_XDECREF(__pyx_t_11); __Pyx_XDECREF(__pyx_t_12); __Pyx_XDECREF(__pyx_t_13); __Pyx_AddTraceback("pandas.tslib._get_deltas", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_num); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/tslib.pyx":1833 * return utc_offset_cache[tz] * * cdef double total_seconds(object td): # Python 2.6 compat # <<<<<<<<<<<<<< * return ((td.microseconds + (td.seconds + td.days * 24 * 3600) * 10**6) // * 10**6) */ static double __pyx_f_6pandas_5tslib_total_seconds(PyObject *__pyx_v_td) { double __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; double __pyx_t_5; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("total_seconds", 0); /* "pandas/tslib.pyx":1834 * * cdef double total_seconds(object td): # Python 2.6 compat * return ((td.microseconds + (td.seconds + td.days * 24 * 3600) * 10**6) // # <<<<<<<<<<<<<< * 10**6) * */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_td, __pyx_n_s__microseconds); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1834; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_td, __pyx_n_s__seconds); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1834; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_td, __pyx_n_s__days); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1834; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PyNumber_Multiply(__pyx_t_3, __pyx_int_24); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1834; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyNumber_Multiply(__pyx_t_4, __pyx_int_3600); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1834; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyNumber_Add(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1834; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyNumber_Multiply(__pyx_t_4, __pyx_int_1000000); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1834; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyNumber_Add(__pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1834; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyNumber_FloorDivide(__pyx_t_4, __pyx_int_1000000); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1834; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_5 = __pyx_PyFloat_AsDouble(__pyx_t_3); if (unlikely((__pyx_t_5 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1834; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_r = __pyx_t_5; goto __pyx_L0; __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_WriteUnraisable("pandas.tslib.total_seconds", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5tslib_53tot_seconds(PyObject *__pyx_self, PyObject *__pyx_v_td); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5tslib_53tot_seconds = {__Pyx_NAMESTR("tot_seconds"), (PyCFunction)__pyx_pw_6pandas_5tslib_53tot_seconds, METH_O, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5tslib_53tot_seconds(PyObject *__pyx_self, PyObject *__pyx_v_td) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("tot_seconds (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_5tslib_52tot_seconds(__pyx_self, ((PyObject *)__pyx_v_td)); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/tslib.pyx":1837 * 10**6) * * def tot_seconds(td): # <<<<<<<<<<<<<< * return total_seconds(td) * */ static PyObject *__pyx_pf_6pandas_5tslib_52tot_seconds(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_td) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("tot_seconds", 0); /* "pandas/tslib.pyx":1838 * * def tot_seconds(td): * return total_seconds(td) # <<<<<<<<<<<<<< * * cpdef ndarray _unbox_utcoffsets(object transinfo): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyFloat_FromDouble(__pyx_f_6pandas_5tslib_total_seconds(__pyx_v_td)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1838; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas.tslib.tot_seconds", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/tslib.pyx":1840 * return total_seconds(td) * * cpdef ndarray _unbox_utcoffsets(object transinfo): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, sz */ static PyObject *__pyx_pw_6pandas_5tslib_55_unbox_utcoffsets(PyObject *__pyx_self, PyObject *__pyx_v_transinfo); /*proto*/ static PyArrayObject *__pyx_f_6pandas_5tslib__unbox_utcoffsets(PyObject *__pyx_v_transinfo, CYTHON_UNUSED int __pyx_skip_dispatch) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_sz; PyArrayObject *__pyx_v_arr = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_arr; __Pyx_Buffer __pyx_pybuffer_arr; PyArrayObject *__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; PyArrayObject *__pyx_t_6 = NULL; 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; __pyx_t_5numpy_int64_t __pyx_t_12; Py_ssize_t __pyx_t_13; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_unbox_utcoffsets", 0); __pyx_pybuffer_arr.pybuffer.buf = NULL; __pyx_pybuffer_arr.refcount = 0; __pyx_pybuffernd_arr.data = NULL; __pyx_pybuffernd_arr.rcbuffer = &__pyx_pybuffer_arr; /* "pandas/tslib.pyx":1845 * ndarray[int64_t] arr * * sz = len(transinfo) # <<<<<<<<<<<<<< * arr = np.empty(sz, dtype='i8') * */ __pyx_t_1 = PyObject_Length(__pyx_v_transinfo); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1845; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_sz = __pyx_t_1; /* "pandas/tslib.pyx":1846 * * sz = len(transinfo) * arr = np.empty(sz, dtype='i8') # <<<<<<<<<<<<<< * * for i in range(sz): */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1846; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 1846; __pyx_clineno = __LINE__; goto __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_sz); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1846; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1846; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1846; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_2)); if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__dtype), ((PyObject *)__pyx_n_s__i8)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1846; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_5 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1846; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1846; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_6 = ((PyArrayObject *)__pyx_t_5); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_arr.rcbuffer->pybuffer); __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_arr.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_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_arr.rcbuffer->pybuffer, (PyObject*)__pyx_v_arr, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_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_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]; if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1846; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_6 = 0; __pyx_v_arr = ((PyArrayObject *)__pyx_t_5); __pyx_t_5 = 0; /* "pandas/tslib.pyx":1848 * arr = np.empty(sz, dtype='i8') * * for i in range(sz): # <<<<<<<<<<<<<< * arr[i] = int(total_seconds(transinfo[i][0])) * 1000000000 * */ __pyx_t_1 = __pyx_v_sz; for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_1; __pyx_t_11+=1) { __pyx_v_i = __pyx_t_11; /* "pandas/tslib.pyx":1849 * * for i in range(sz): * arr[i] = int(total_seconds(transinfo[i][0])) * 1000000000 # <<<<<<<<<<<<<< * * return arr */ __pyx_t_5 = __Pyx_GetItemInt(__pyx_v_transinfo, __pyx_v_i, sizeof(Py_ssize_t), PyInt_FromSsize_t, 0, 1, 1); if (!__pyx_t_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1849; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_5, 0, sizeof(long), PyInt_FromLong, 0, 0, 1); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1849; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyFloat_FromDouble(__pyx_f_6pandas_5tslib_total_seconds(__pyx_t_2)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1849; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1849; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyObject_Call(((PyObject *)((PyObject*)(&PyInt_Type))), ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1849; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __pyx_t_2 = PyNumber_Multiply(__pyx_t_5, __pyx_int_1000000000); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1849; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_12 = __Pyx_PyInt_from_py_npy_int64(__pyx_t_2); if (unlikely((__pyx_t_12 == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1849; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_13 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_13 < 0) { __pyx_t_13 += __pyx_pybuffernd_arr.diminfo[0].shape; if (unlikely(__pyx_t_13 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_13 >= __pyx_pybuffernd_arr.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1849; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_arr.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_arr.diminfo[0].strides) = __pyx_t_12; } /* "pandas/tslib.pyx":1851 * arr[i] = int(total_seconds(transinfo[i][0])) * 1000000000 * * return arr # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(((PyObject *)__pyx_r)); __Pyx_INCREF(((PyObject *)__pyx_v_arr)); __pyx_r = ((PyArrayObject *)__pyx_v_arr); goto __pyx_L0; __pyx_r = ((PyArrayObject *)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_XDECREF(__pyx_t_5); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_arr.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.tslib._unbox_utcoffsets", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_arr.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_arr); __Pyx_XGIVEREF((PyObject *)__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5tslib_55_unbox_utcoffsets(PyObject *__pyx_self, PyObject *__pyx_v_transinfo); /*proto*/ static PyObject *__pyx_pw_6pandas_5tslib_55_unbox_utcoffsets(PyObject *__pyx_self, PyObject *__pyx_v_transinfo) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_unbox_utcoffsets (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_5tslib_54_unbox_utcoffsets(__pyx_self, ((PyObject *)__pyx_v_transinfo)); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/tslib.pyx":1840 * return total_seconds(td) * * cpdef ndarray _unbox_utcoffsets(object transinfo): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, sz */ static PyObject *__pyx_pf_6pandas_5tslib_54_unbox_utcoffsets(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_transinfo) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_unbox_utcoffsets", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = ((PyObject *)__pyx_f_6pandas_5tslib__unbox_utcoffsets(__pyx_v_transinfo, 0)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1840; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas.tslib._unbox_utcoffsets", __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_5tslib_57tz_localize_to_utc(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6pandas_5tslib_56tz_localize_to_utc[] = "\n Localize tzinfo-naive DateRange to given time zone (using pytz). If\n there are ambiguities in the values, raise AmbiguousTimeError.\n\n Returns\n -------\n localized : DatetimeIndex\n "; static PyMethodDef __pyx_mdef_6pandas_5tslib_57tz_localize_to_utc = {__Pyx_NAMESTR("tz_localize_to_utc"), (PyCFunction)__pyx_pw_6pandas_5tslib_57tz_localize_to_utc, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_5tslib_56tz_localize_to_utc)}; static PyObject *__pyx_pw_6pandas_5tslib_57tz_localize_to_utc(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_vals = 0; PyObject *__pyx_v_tz = 0; int __pyx_v_infer_dst; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("tz_localize_to_utc (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__vals,&__pyx_n_s__tz,&__pyx_n_s__infer_dst,0}; PyObject* values[3] = {0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__vals)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__tz)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("tz_localize_to_utc", 0, 2, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1856; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__infer_dst); if (value) { values[2] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "tz_localize_to_utc") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1856; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_vals = ((PyArrayObject *)values[0]); __pyx_v_tz = values[1]; if (values[2]) { __pyx_v_infer_dst = __Pyx_PyObject_IsTrue(values[2]); if (unlikely((__pyx_v_infer_dst == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1856; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } else { /* "pandas/tslib.pyx":1856 * @cython.boundscheck(False) * @cython.wraparound(False) * def tz_localize_to_utc(ndarray[int64_t] vals, object tz, bint infer_dst=False): # <<<<<<<<<<<<<< * """ * Localize tzinfo-naive DateRange to given time zone (using pytz). If */ __pyx_v_infer_dst = ((int)0); } } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("tz_localize_to_utc", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1856; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.tslib.tz_localize_to_utc", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_vals), __pyx_ptype_5numpy_ndarray, 1, "vals", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1856; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5tslib_56tz_localize_to_utc(__pyx_self, __pyx_v_vals, __pyx_v_tz, __pyx_v_infer_dst); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5tslib_56tz_localize_to_utc(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_vals, PyObject *__pyx_v_tz, int __pyx_v_infer_dst) { PyArrayObject *__pyx_v_trans = 0; PyArrayObject *__pyx_v_deltas = 0; PyArrayObject *__pyx_v_idx_shifted = 0; Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_pos; Py_ssize_t __pyx_v_ntrans; Py_ssize_t __pyx_v_n; __pyx_t_5numpy_int64_t *__pyx_v_tdata; __pyx_t_5numpy_int64_t __pyx_v_v; __pyx_t_5numpy_int64_t __pyx_v_left; __pyx_t_5numpy_int64_t __pyx_v_right; PyArrayObject *__pyx_v_result = 0; PyArrayObject *__pyx_v_result_a = 0; PyArrayObject *__pyx_v_result_b = 0; PyArrayObject *__pyx_v_dst_hours = 0; pandas_datetimestruct __pyx_v_dts; PyDateTime_DateTime *__pyx_v_dt = NULL; PyObject *__pyx_v_delta = NULL; PyObject *__pyx_v_both_nat = NULL; PyObject *__pyx_v_both_eq = NULL; PyObject *__pyx_v_trans_idx = NULL; PyObject *__pyx_v_stamp = NULL; PyObject *__pyx_v_one_diff = NULL; PyObject *__pyx_v_trans_grp = NULL; PyObject *__pyx_v_grp = NULL; PyObject *__pyx_v_switch_idx = NULL; PyObject *__pyx_v_a_idx = NULL; PyObject *__pyx_v_b_idx = NULL; __Pyx_LocalBuf_ND __pyx_pybuffernd_deltas; __Pyx_Buffer __pyx_pybuffer_deltas; __Pyx_LocalBuf_ND __pyx_pybuffernd_dst_hours; __Pyx_Buffer __pyx_pybuffer_dst_hours; __Pyx_LocalBuf_ND __pyx_pybuffernd_idx_shifted; __Pyx_Buffer __pyx_pybuffer_idx_shifted; __Pyx_LocalBuf_ND __pyx_pybuffernd_result; __Pyx_Buffer __pyx_pybuffer_result; __Pyx_LocalBuf_ND __pyx_pybuffernd_result_a; __Pyx_Buffer __pyx_pybuffer_result_a; __Pyx_LocalBuf_ND __pyx_pybuffernd_result_b; __Pyx_Buffer __pyx_pybuffer_result_b; __Pyx_LocalBuf_ND __pyx_pybuffernd_trans; __Pyx_Buffer __pyx_pybuffer_trans; __Pyx_LocalBuf_ND __pyx_pybuffernd_vals; __Pyx_Buffer __pyx_pybuffer_vals; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; PyObject *__pyx_t_2 = NULL; int __pyx_t_3; int __pyx_t_4; PyObject *__pyx_t_5 = NULL; int __pyx_t_6; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; PyArrayObject *__pyx_t_10 = NULL; int __pyx_t_11; PyObject *__pyx_t_12 = NULL; PyObject *__pyx_t_13 = NULL; PyObject *__pyx_t_14 = NULL; Py_ssize_t __pyx_t_15; Py_ssize_t __pyx_t_16; PyObject *__pyx_t_17 = NULL; PyObject *__pyx_t_18 = NULL; PyObject *__pyx_t_19 = NULL; __pyx_t_5numpy_int64_t __pyx_t_20; Py_ssize_t __pyx_t_21; PyArrayObject *__pyx_t_22 = NULL; 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; __pyx_t_5numpy_int64_t __pyx_t_30; Py_ssize_t __pyx_t_31; Py_ssize_t __pyx_t_32; Py_ssize_t __pyx_t_33; PyObject *(*__pyx_t_34)(PyObject *); Py_ssize_t __pyx_t_35; Py_ssize_t __pyx_t_36; Py_ssize_t __pyx_t_37; Py_ssize_t __pyx_t_38; Py_ssize_t __pyx_t_39; Py_ssize_t __pyx_t_40; Py_ssize_t __pyx_t_41; Py_ssize_t __pyx_t_42; Py_ssize_t __pyx_t_43; Py_ssize_t __pyx_t_44; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("tz_localize_to_utc", 0); __pyx_pybuffer_trans.pybuffer.buf = NULL; __pyx_pybuffer_trans.refcount = 0; __pyx_pybuffernd_trans.data = NULL; __pyx_pybuffernd_trans.rcbuffer = &__pyx_pybuffer_trans; __pyx_pybuffer_deltas.pybuffer.buf = NULL; __pyx_pybuffer_deltas.refcount = 0; __pyx_pybuffernd_deltas.data = NULL; __pyx_pybuffernd_deltas.rcbuffer = &__pyx_pybuffer_deltas; __pyx_pybuffer_idx_shifted.pybuffer.buf = NULL; __pyx_pybuffer_idx_shifted.refcount = 0; __pyx_pybuffernd_idx_shifted.data = NULL; __pyx_pybuffernd_idx_shifted.rcbuffer = &__pyx_pybuffer_idx_shifted; __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_result_a.pybuffer.buf = NULL; __pyx_pybuffer_result_a.refcount = 0; __pyx_pybuffernd_result_a.data = NULL; __pyx_pybuffernd_result_a.rcbuffer = &__pyx_pybuffer_result_a; __pyx_pybuffer_result_b.pybuffer.buf = NULL; __pyx_pybuffer_result_b.refcount = 0; __pyx_pybuffernd_result_b.data = NULL; __pyx_pybuffernd_result_b.rcbuffer = &__pyx_pybuffer_result_b; __pyx_pybuffer_dst_hours.pybuffer.buf = NULL; __pyx_pybuffer_dst_hours.refcount = 0; __pyx_pybuffernd_dst_hours.data = NULL; __pyx_pybuffernd_dst_hours.rcbuffer = &__pyx_pybuffer_dst_hours; __pyx_pybuffer_vals.pybuffer.buf = NULL; __pyx_pybuffer_vals.refcount = 0; __pyx_pybuffernd_vals.data = NULL; __pyx_pybuffernd_vals.rcbuffer = &__pyx_pybuffer_vals; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_vals.rcbuffer->pybuffer, (PyObject*)__pyx_v_vals, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1856; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_vals.diminfo[0].strides = __pyx_pybuffernd_vals.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_vals.diminfo[0].shape = __pyx_pybuffernd_vals.rcbuffer->pybuffer.shape[0]; /* "pandas/tslib.pyx":1867 * cdef: * ndarray[int64_t] trans, deltas, idx_shifted * Py_ssize_t i, idx, pos, ntrans, n = len(vals) # <<<<<<<<<<<<<< * int64_t *tdata * int64_t v, left, right */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_vals)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1867; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/tslib.pyx":1875 * # Vectorized version of DstTzInfo.localize * * if not have_pytz: # <<<<<<<<<<<<<< * raise Exception("Could not find pytz module") * */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__have_pytz); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1875; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1875; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_4 = ((!__pyx_t_3) != 0); if (__pyx_t_4) { /* "pandas/tslib.pyx":1876 * * if not have_pytz: * raise Exception("Could not find pytz module") # <<<<<<<<<<<<<< * * if tz == UTC or tz is None: */ __pyx_t_2 = PyObject_Call(__pyx_builtin_Exception, ((PyObject *)__pyx_k_tuple_106), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1876; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 1876; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L3; } __pyx_L3:; /* "pandas/tslib.pyx":1878 * raise Exception("Could not find pytz module") * * if tz == UTC or tz is None: # <<<<<<<<<<<<<< * return vals * */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__UTC); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1878; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = PyObject_RichCompare(__pyx_v_tz, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1878; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1878; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (!__pyx_t_4) { __pyx_t_3 = (__pyx_v_tz == Py_None); __pyx_t_6 = __pyx_t_3; } else { __pyx_t_6 = __pyx_t_4; } if (__pyx_t_6) { /* "pandas/tslib.pyx":1879 * * if tz == UTC or tz is None: * return vals # <<<<<<<<<<<<<< * * result = np.empty(n, dtype=np.int64) */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_vals)); __pyx_r = ((PyObject *)__pyx_v_vals); goto __pyx_L0; goto __pyx_L4; } __pyx_L4:; /* "pandas/tslib.pyx":1881 * return vals * * result = np.empty(n, dtype=np.int64) # <<<<<<<<<<<<<< * * if _is_tzlocal(tz): */ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1881; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s__empty); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1881; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyInt_FromSsize_t(__pyx_v_n); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1881; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1881; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyDict_New(); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1881; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_5)); __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1881; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 1881; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (PyDict_SetItem(__pyx_t_5, ((PyObject *)__pyx_n_s__dtype), __pyx_t_9) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1881; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_9 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_7), ((PyObject *)__pyx_t_5)); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1881; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0; __Pyx_DECREF(((PyObject *)__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_filename = __pyx_f[0]; __pyx_lineno = 1881; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_10 = ((PyArrayObject *)__pyx_t_9); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __pyx_t_11 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.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_11 < 0)) { PyErr_Fetch(&__pyx_t_12, &__pyx_t_13, &__pyx_t_14); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_v_result, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_12); Py_XDECREF(__pyx_t_13); Py_XDECREF(__pyx_t_14); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_12, __pyx_t_13, __pyx_t_14); } } __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_11 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1881; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_10 = 0; __pyx_v_result = ((PyArrayObject *)__pyx_t_9); __pyx_t_9 = 0; /* "pandas/tslib.pyx":1883 * result = np.empty(n, dtype=np.int64) * * if _is_tzlocal(tz): # <<<<<<<<<<<<<< * for i in range(n): * v = vals[i] */ __pyx_t_9 = __Pyx_GetModuleGlobalName(__pyx_n_s___is_tzlocal); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1883; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1883; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_v_tz); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_tz); __Pyx_GIVEREF(__pyx_v_tz); __pyx_t_7 = PyObject_Call(__pyx_t_9, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1883; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1883; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (__pyx_t_6) { /* "pandas/tslib.pyx":1884 * * if _is_tzlocal(tz): * for i in range(n): # <<<<<<<<<<<<<< * v = vals[i] * pandas_datetime_to_datetimestruct(v, PANDAS_FR_ns, &dts) */ __pyx_t_1 = __pyx_v_n; for (__pyx_t_15 = 0; __pyx_t_15 < __pyx_t_1; __pyx_t_15+=1) { __pyx_v_i = __pyx_t_15; /* "pandas/tslib.pyx":1885 * if _is_tzlocal(tz): * for i in range(n): * v = vals[i] # <<<<<<<<<<<<<< * pandas_datetime_to_datetimestruct(v, PANDAS_FR_ns, &dts) * dt = datetime(dts.year, dts.month, dts.day, dts.hour, */ __pyx_t_16 = __pyx_v_i; __pyx_v_v = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_vals.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_vals.diminfo[0].strides)); /* "pandas/tslib.pyx":1886 * for i in range(n): * v = vals[i] * pandas_datetime_to_datetimestruct(v, PANDAS_FR_ns, &dts) # <<<<<<<<<<<<<< * dt = datetime(dts.year, dts.month, dts.day, dts.hour, * dts.min, dts.sec, dts.us, tz) */ pandas_datetime_to_datetimestruct(__pyx_v_v, PANDAS_FR_ns, (&__pyx_v_dts)); /* "pandas/tslib.pyx":1887 * v = vals[i] * pandas_datetime_to_datetimestruct(v, PANDAS_FR_ns, &dts) * dt = datetime(dts.year, dts.month, dts.day, dts.hour, # <<<<<<<<<<<<<< * dts.min, dts.sec, dts.us, tz) * delta = int(total_seconds(_get_utcoffset(tz, dt))) * 1000000000 */ __pyx_t_7 = __Pyx_PyInt_to_py_npy_int64(__pyx_v_dts.year); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1887; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_t_5 = __Pyx_PyInt_to_py_npy_int32(__pyx_v_dts.month); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1887; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_9 = __Pyx_PyInt_to_py_npy_int32(__pyx_v_dts.day); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1887; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_t_2 = __Pyx_PyInt_to_py_npy_int32(__pyx_v_dts.hour); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1887; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); /* "pandas/tslib.pyx":1888 * pandas_datetime_to_datetimestruct(v, PANDAS_FR_ns, &dts) * dt = datetime(dts.year, dts.month, dts.day, dts.hour, * dts.min, dts.sec, dts.us, tz) # <<<<<<<<<<<<<< * delta = int(total_seconds(_get_utcoffset(tz, dt))) * 1000000000 * result[i] = v - delta */ __pyx_t_8 = __Pyx_PyInt_to_py_npy_int32(__pyx_v_dts.min); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1888; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_17 = __Pyx_PyInt_to_py_npy_int32(__pyx_v_dts.sec); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1888; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_17); __pyx_t_18 = __Pyx_PyInt_to_py_npy_int32(__pyx_v_dts.us); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1888; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); __pyx_t_19 = PyTuple_New(8); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1887; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_19); PyTuple_SET_ITEM(__pyx_t_19, 0, __pyx_t_7); __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_19, 1, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_19, 2, __pyx_t_9); __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_19, 3, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_19, 4, __pyx_t_8); __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_19, 5, __pyx_t_17); __Pyx_GIVEREF(__pyx_t_17); PyTuple_SET_ITEM(__pyx_t_19, 6, __pyx_t_18); __Pyx_GIVEREF(__pyx_t_18); __Pyx_INCREF(__pyx_v_tz); PyTuple_SET_ITEM(__pyx_t_19, 7, __pyx_v_tz); __Pyx_GIVEREF(__pyx_v_tz); __pyx_t_7 = 0; __pyx_t_5 = 0; __pyx_t_9 = 0; __pyx_t_2 = 0; __pyx_t_8 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_18 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_8datetime_datetime)), ((PyObject *)__pyx_t_19), NULL); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1887; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); __Pyx_DECREF(((PyObject *)__pyx_t_19)); __pyx_t_19 = 0; __Pyx_XDECREF_SET(__pyx_v_dt, ((PyDateTime_DateTime *)__pyx_t_18)); __pyx_t_18 = 0; /* "pandas/tslib.pyx":1889 * dt = datetime(dts.year, dts.month, dts.day, dts.hour, * dts.min, dts.sec, dts.us, tz) * delta = int(total_seconds(_get_utcoffset(tz, dt))) * 1000000000 # <<<<<<<<<<<<<< * result[i] = v - delta * return result */ __pyx_t_18 = __pyx_f_6pandas_5tslib__get_utcoffset(__pyx_v_tz, ((PyObject *)__pyx_v_dt), 0); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1889; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); __pyx_t_19 = PyFloat_FromDouble(__pyx_f_6pandas_5tslib_total_seconds(__pyx_t_18)); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1889; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_19); __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; __pyx_t_18 = PyTuple_New(1); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1889; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); PyTuple_SET_ITEM(__pyx_t_18, 0, __pyx_t_19); __Pyx_GIVEREF(__pyx_t_19); __pyx_t_19 = 0; __pyx_t_19 = PyObject_Call(((PyObject *)((PyObject*)(&PyInt_Type))), ((PyObject *)__pyx_t_18), NULL); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1889; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_19); __Pyx_DECREF(((PyObject *)__pyx_t_18)); __pyx_t_18 = 0; __pyx_t_18 = PyNumber_Multiply(__pyx_t_19, __pyx_int_1000000000); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1889; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0; __Pyx_XDECREF_SET(__pyx_v_delta, __pyx_t_18); __pyx_t_18 = 0; /* "pandas/tslib.pyx":1890 * dts.min, dts.sec, dts.us, tz) * delta = int(total_seconds(_get_utcoffset(tz, dt))) * 1000000000 * result[i] = v - delta # <<<<<<<<<<<<<< * return result * */ __pyx_t_18 = __Pyx_PyInt_to_py_npy_int64(__pyx_v_v); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1890; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); __pyx_t_19 = PyNumber_Subtract(__pyx_t_18, __pyx_v_delta); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1890; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_19); __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; __pyx_t_20 = __Pyx_PyInt_from_py_npy_int64(__pyx_t_19); if (unlikely((__pyx_t_20 == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1890; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0; __pyx_t_21 = __pyx_v_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_result.diminfo[0].strides) = __pyx_t_20; } /* "pandas/tslib.pyx":1891 * delta = int(total_seconds(_get_utcoffset(tz, dt))) * 1000000000 * result[i] = v - delta * return result # <<<<<<<<<<<<<< * * trans = _get_transitions(tz) # transition dates */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_result)); __pyx_r = ((PyObject *)__pyx_v_result); goto __pyx_L0; goto __pyx_L5; } __pyx_L5:; /* "pandas/tslib.pyx":1893 * return result * * trans = _get_transitions(tz) # transition dates # <<<<<<<<<<<<<< * deltas = _get_deltas(tz) # utc offsets * */ __pyx_t_19 = __Pyx_GetModuleGlobalName(__pyx_n_s___get_transitions); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1893; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_19); __pyx_t_18 = PyTuple_New(1); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1893; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); __Pyx_INCREF(__pyx_v_tz); PyTuple_SET_ITEM(__pyx_t_18, 0, __pyx_v_tz); __Pyx_GIVEREF(__pyx_v_tz); __pyx_t_17 = PyObject_Call(__pyx_t_19, ((PyObject *)__pyx_t_18), NULL); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1893; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_17); __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_18)); __pyx_t_18 = 0; if (!(likely(((__pyx_t_17) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_17, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1893; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_22 = ((PyArrayObject *)__pyx_t_17); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_trans.rcbuffer->pybuffer); __pyx_t_11 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_trans.rcbuffer->pybuffer, (PyObject*)__pyx_t_22, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_11 < 0)) { PyErr_Fetch(&__pyx_t_14, &__pyx_t_13, &__pyx_t_12); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_trans.rcbuffer->pybuffer, (PyObject*)__pyx_v_trans, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_14); Py_XDECREF(__pyx_t_13); Py_XDECREF(__pyx_t_12); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_14, __pyx_t_13, __pyx_t_12); } } __pyx_pybuffernd_trans.diminfo[0].strides = __pyx_pybuffernd_trans.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_trans.diminfo[0].shape = __pyx_pybuffernd_trans.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_11 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1893; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_22 = 0; __pyx_v_trans = ((PyArrayObject *)__pyx_t_17); __pyx_t_17 = 0; /* "pandas/tslib.pyx":1894 * * trans = _get_transitions(tz) # transition dates * deltas = _get_deltas(tz) # utc offsets # <<<<<<<<<<<<<< * * tdata = trans.data */ __pyx_t_17 = __Pyx_GetModuleGlobalName(__pyx_n_s___get_deltas); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1894; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_17); __pyx_t_18 = PyTuple_New(1); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1894; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); __Pyx_INCREF(__pyx_v_tz); PyTuple_SET_ITEM(__pyx_t_18, 0, __pyx_v_tz); __Pyx_GIVEREF(__pyx_v_tz); __pyx_t_19 = PyObject_Call(__pyx_t_17, ((PyObject *)__pyx_t_18), NULL); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1894; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_19); __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_18)); __pyx_t_18 = 0; if (!(likely(((__pyx_t_19) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_19, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1894; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_22 = ((PyArrayObject *)__pyx_t_19); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_deltas.rcbuffer->pybuffer); __pyx_t_11 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_deltas.rcbuffer->pybuffer, (PyObject*)__pyx_t_22, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_11 < 0)) { PyErr_Fetch(&__pyx_t_12, &__pyx_t_13, &__pyx_t_14); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_deltas.rcbuffer->pybuffer, (PyObject*)__pyx_v_deltas, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_12); Py_XDECREF(__pyx_t_13); Py_XDECREF(__pyx_t_14); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_12, __pyx_t_13, __pyx_t_14); } } __pyx_pybuffernd_deltas.diminfo[0].strides = __pyx_pybuffernd_deltas.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_deltas.diminfo[0].shape = __pyx_pybuffernd_deltas.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_11 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1894; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_22 = 0; __pyx_v_deltas = ((PyArrayObject *)__pyx_t_19); __pyx_t_19 = 0; /* "pandas/tslib.pyx":1896 * deltas = _get_deltas(tz) # utc offsets * * tdata = trans.data # <<<<<<<<<<<<<< * ntrans = len(trans) * */ __pyx_v_tdata = ((__pyx_t_5numpy_int64_t *)__pyx_v_trans->data); /* "pandas/tslib.pyx":1897 * * tdata = trans.data * ntrans = len(trans) # <<<<<<<<<<<<<< * * result_a = np.empty(n, dtype=np.int64) */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_trans)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1897; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_ntrans = __pyx_t_1; /* "pandas/tslib.pyx":1899 * ntrans = len(trans) * * result_a = np.empty(n, dtype=np.int64) # <<<<<<<<<<<<<< * result_b = np.empty(n, dtype=np.int64) * result_a.fill(NPY_NAT) */ __pyx_t_19 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1899; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_19); __pyx_t_18 = __Pyx_PyObject_GetAttrStr(__pyx_t_19, __pyx_n_s__empty); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1899; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0; __pyx_t_19 = PyInt_FromSsize_t(__pyx_v_n); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1899; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_19); __pyx_t_17 = PyTuple_New(1); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1899; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_17); PyTuple_SET_ITEM(__pyx_t_17, 0, __pyx_t_19); __Pyx_GIVEREF(__pyx_t_19); __pyx_t_19 = 0; __pyx_t_19 = PyDict_New(); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1899; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_19)); __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1899; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s__int64); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1899; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (PyDict_SetItem(__pyx_t_19, ((PyObject *)__pyx_n_s__dtype), __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1899; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_Call(__pyx_t_18, ((PyObject *)__pyx_t_17), ((PyObject *)__pyx_t_19)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1899; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_17)); __pyx_t_17 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_19)); __pyx_t_19 = 0; if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1899; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_10 = ((PyArrayObject *)__pyx_t_2); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result_a.rcbuffer->pybuffer); __pyx_t_11 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result_a.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_11 < 0)) { PyErr_Fetch(&__pyx_t_14, &__pyx_t_13, &__pyx_t_12); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result_a.rcbuffer->pybuffer, (PyObject*)__pyx_v_result_a, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_14); Py_XDECREF(__pyx_t_13); Py_XDECREF(__pyx_t_12); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_14, __pyx_t_13, __pyx_t_12); } } __pyx_pybuffernd_result_a.diminfo[0].strides = __pyx_pybuffernd_result_a.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_result_a.diminfo[0].shape = __pyx_pybuffernd_result_a.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_11 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1899; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_10 = 0; __pyx_v_result_a = ((PyArrayObject *)__pyx_t_2); __pyx_t_2 = 0; /* "pandas/tslib.pyx":1900 * * result_a = np.empty(n, dtype=np.int64) * result_b = np.empty(n, dtype=np.int64) # <<<<<<<<<<<<<< * result_a.fill(NPY_NAT) * result_b.fill(NPY_NAT) */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1900; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_19 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__empty); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1900; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_19); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_n); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1900; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_17 = PyTuple_New(1); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1900; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_17); PyTuple_SET_ITEM(__pyx_t_17, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1900; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_2)); __pyx_t_18 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1900; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_18, __pyx_n_s__int64); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1900; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__dtype), __pyx_t_8) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1900; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_8 = PyObject_Call(__pyx_t_19, ((PyObject *)__pyx_t_17), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1900; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_17)); __pyx_t_17 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; if (!(likely(((__pyx_t_8) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_8, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1900; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_10 = ((PyArrayObject *)__pyx_t_8); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result_b.rcbuffer->pybuffer); __pyx_t_11 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result_b.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_11 < 0)) { PyErr_Fetch(&__pyx_t_12, &__pyx_t_13, &__pyx_t_14); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result_b.rcbuffer->pybuffer, (PyObject*)__pyx_v_result_b, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_12); Py_XDECREF(__pyx_t_13); Py_XDECREF(__pyx_t_14); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_12, __pyx_t_13, __pyx_t_14); } } __pyx_pybuffernd_result_b.diminfo[0].strides = __pyx_pybuffernd_result_b.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_result_b.diminfo[0].shape = __pyx_pybuffernd_result_b.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_11 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1900; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_10 = 0; __pyx_v_result_b = ((PyArrayObject *)__pyx_t_8); __pyx_t_8 = 0; /* "pandas/tslib.pyx":1901 * result_a = np.empty(n, dtype=np.int64) * result_b = np.empty(n, dtype=np.int64) * result_a.fill(NPY_NAT) # <<<<<<<<<<<<<< * result_b.fill(NPY_NAT) * */ __pyx_t_8 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_result_a), __pyx_n_s__fill); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1901; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_2 = __Pyx_PyInt_to_py_npy_int64(__pyx_v_6pandas_5tslib_NPY_NAT); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1901; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_17 = PyTuple_New(1); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1901; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_17); PyTuple_SET_ITEM(__pyx_t_17, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_Call(__pyx_t_8, ((PyObject *)__pyx_t_17), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1901; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_17)); __pyx_t_17 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/tslib.pyx":1902 * result_b = np.empty(n, dtype=np.int64) * result_a.fill(NPY_NAT) * result_b.fill(NPY_NAT) # <<<<<<<<<<<<<< * * # left side */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_result_b), __pyx_n_s__fill); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1902; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_17 = __Pyx_PyInt_to_py_npy_int64(__pyx_v_6pandas_5tslib_NPY_NAT); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1902; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_17); __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1902; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_17); __Pyx_GIVEREF(__pyx_t_17); __pyx_t_17 = 0; __pyx_t_17 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_8), NULL); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1902; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_17); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; /* "pandas/tslib.pyx":1906 * # left side * idx_shifted = _ensure_int64( * np.maximum(0, trans.searchsorted(vals - DAY_NS, side='right') - 1)) # <<<<<<<<<<<<<< * * for i in range(n): */ __pyx_t_17 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1906; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_17); __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_17, __pyx_n_s__maximum); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1906; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; __pyx_t_17 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_trans), __pyx_n_s__searchsorted); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1906; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_17); __pyx_t_2 = __Pyx_PyInt_to_py_npy_int64(__pyx_v_6pandas_5tslib_DAY_NS); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1906; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_19 = PyNumber_Subtract(((PyObject *)__pyx_v_vals), __pyx_t_2); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1906; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_19); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1906; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_19); __Pyx_GIVEREF(__pyx_t_19); __pyx_t_19 = 0; __pyx_t_19 = PyDict_New(); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1906; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_19)); if (PyDict_SetItem(__pyx_t_19, ((PyObject *)__pyx_n_s__side), ((PyObject *)__pyx_n_s__right)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1906; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_18 = PyObject_Call(__pyx_t_17, ((PyObject *)__pyx_t_2), ((PyObject *)__pyx_t_19)); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1906; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_19)); __pyx_t_19 = 0; __pyx_t_19 = PyNumber_Subtract(__pyx_t_18, __pyx_int_1); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1906; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_19); __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; __pyx_t_18 = PyTuple_New(2); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1906; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); __Pyx_INCREF(__pyx_int_0); PyTuple_SET_ITEM(__pyx_t_18, 0, __pyx_int_0); __Pyx_GIVEREF(__pyx_int_0); PyTuple_SET_ITEM(__pyx_t_18, 1, __pyx_t_19); __Pyx_GIVEREF(__pyx_t_19); __pyx_t_19 = 0; __pyx_t_19 = PyObject_Call(__pyx_t_8, ((PyObject *)__pyx_t_18), NULL); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1906; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_19); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_18)); __pyx_t_18 = 0; __pyx_t_18 = __pyx_f_6pandas_5tslib__ensure_int64(__pyx_t_19); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1905; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0; if (!(likely(((__pyx_t_18) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_18, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1905; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_22 = ((PyArrayObject *)__pyx_t_18); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_idx_shifted.rcbuffer->pybuffer); __pyx_t_11 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_idx_shifted.rcbuffer->pybuffer, (PyObject*)__pyx_t_22, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_11 < 0)) { PyErr_Fetch(&__pyx_t_14, &__pyx_t_13, &__pyx_t_12); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_idx_shifted.rcbuffer->pybuffer, (PyObject*)__pyx_v_idx_shifted, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_14); Py_XDECREF(__pyx_t_13); Py_XDECREF(__pyx_t_12); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_14, __pyx_t_13, __pyx_t_12); } } __pyx_pybuffernd_idx_shifted.diminfo[0].strides = __pyx_pybuffernd_idx_shifted.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_idx_shifted.diminfo[0].shape = __pyx_pybuffernd_idx_shifted.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_11 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1905; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_22 = 0; __pyx_v_idx_shifted = ((PyArrayObject *)__pyx_t_18); __pyx_t_18 = 0; /* "pandas/tslib.pyx":1908 * np.maximum(0, trans.searchsorted(vals - DAY_NS, side='right') - 1)) * * for i in range(n): # <<<<<<<<<<<<<< * v = vals[i] - deltas[idx_shifted[i]] * pos = bisect_right_i8(tdata, v, ntrans) - 1 */ __pyx_t_1 = __pyx_v_n; for (__pyx_t_15 = 0; __pyx_t_15 < __pyx_t_1; __pyx_t_15+=1) { __pyx_v_i = __pyx_t_15; /* "pandas/tslib.pyx":1909 * * for i in range(n): * v = vals[i] - deltas[idx_shifted[i]] # <<<<<<<<<<<<<< * pos = bisect_right_i8(tdata, v, ntrans) - 1 * */ __pyx_t_23 = __pyx_v_i; __pyx_t_24 = __pyx_v_i; __pyx_t_20 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_idx_shifted.rcbuffer->pybuffer.buf, __pyx_t_24, __pyx_pybuffernd_idx_shifted.diminfo[0].strides)); __pyx_v_v = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_vals.rcbuffer->pybuffer.buf, __pyx_t_23, __pyx_pybuffernd_vals.diminfo[0].strides)) - (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_deltas.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_deltas.diminfo[0].strides))); /* "pandas/tslib.pyx":1910 * for i in range(n): * v = vals[i] - deltas[idx_shifted[i]] * pos = bisect_right_i8(tdata, v, ntrans) - 1 # <<<<<<<<<<<<<< * * # timestamp falls to the left side of the DST transition */ __pyx_t_18 = __pyx_f_6pandas_5tslib_bisect_right_i8(__pyx_v_tdata, __pyx_v_v, __pyx_v_ntrans); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1910; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); __pyx_t_19 = PyNumber_Subtract(__pyx_t_18, __pyx_int_1); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1910; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_19); __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; __pyx_t_25 = __Pyx_PyIndex_AsSsize_t(__pyx_t_19); if (unlikely((__pyx_t_25 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1910; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0; __pyx_v_pos = __pyx_t_25; /* "pandas/tslib.pyx":1913 * * # timestamp falls to the left side of the DST transition * if v + deltas[pos] == vals[i]: # <<<<<<<<<<<<<< * result_a[i] = v * */ __pyx_t_25 = __pyx_v_pos; __pyx_t_26 = __pyx_v_i; __pyx_t_6 = (((__pyx_v_v + (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_deltas.rcbuffer->pybuffer.buf, __pyx_t_25, __pyx_pybuffernd_deltas.diminfo[0].strides))) == (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_vals.rcbuffer->pybuffer.buf, __pyx_t_26, __pyx_pybuffernd_vals.diminfo[0].strides))) != 0); if (__pyx_t_6) { /* "pandas/tslib.pyx":1914 * # timestamp falls to the left side of the DST transition * if v + deltas[pos] == vals[i]: * result_a[i] = v # <<<<<<<<<<<<<< * * # right side */ __pyx_t_27 = __pyx_v_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_result_a.rcbuffer->pybuffer.buf, __pyx_t_27, __pyx_pybuffernd_result_a.diminfo[0].strides) = __pyx_v_v; goto __pyx_L10; } __pyx_L10:; } /* "pandas/tslib.pyx":1918 * # right side * idx_shifted = _ensure_int64( * np.maximum(0, trans.searchsorted(vals + DAY_NS, side='right') - 1)) # <<<<<<<<<<<<<< * * for i in range(n): */ __pyx_t_19 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1918; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_19); __pyx_t_18 = __Pyx_PyObject_GetAttrStr(__pyx_t_19, __pyx_n_s__maximum); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1918; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0; __pyx_t_19 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_trans), __pyx_n_s__searchsorted); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1918; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_19); __pyx_t_8 = __Pyx_PyInt_to_py_npy_int64(__pyx_v_6pandas_5tslib_DAY_NS); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1918; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_2 = PyNumber_Add(((PyObject *)__pyx_v_vals), __pyx_t_8); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1918; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1918; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1918; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_2)); if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__side), ((PyObject *)__pyx_n_s__right)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1918; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_17 = PyObject_Call(__pyx_t_19, ((PyObject *)__pyx_t_8), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1918; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_17); __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __pyx_t_2 = PyNumber_Subtract(__pyx_t_17, __pyx_int_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1918; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; __pyx_t_17 = PyTuple_New(2); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1918; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_17); __Pyx_INCREF(__pyx_int_0); PyTuple_SET_ITEM(__pyx_t_17, 0, __pyx_int_0); __Pyx_GIVEREF(__pyx_int_0); PyTuple_SET_ITEM(__pyx_t_17, 1, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_Call(__pyx_t_18, ((PyObject *)__pyx_t_17), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1918; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_17)); __pyx_t_17 = 0; __pyx_t_17 = __pyx_f_6pandas_5tslib__ensure_int64(__pyx_t_2); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1917; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_17); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (!(likely(((__pyx_t_17) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_17, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1917; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_22 = ((PyArrayObject *)__pyx_t_17); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_idx_shifted.rcbuffer->pybuffer); __pyx_t_11 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_idx_shifted.rcbuffer->pybuffer, (PyObject*)__pyx_t_22, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_11 < 0)) { PyErr_Fetch(&__pyx_t_12, &__pyx_t_13, &__pyx_t_14); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_idx_shifted.rcbuffer->pybuffer, (PyObject*)__pyx_v_idx_shifted, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_12); Py_XDECREF(__pyx_t_13); Py_XDECREF(__pyx_t_14); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_12, __pyx_t_13, __pyx_t_14); } } __pyx_pybuffernd_idx_shifted.diminfo[0].strides = __pyx_pybuffernd_idx_shifted.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_idx_shifted.diminfo[0].shape = __pyx_pybuffernd_idx_shifted.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_11 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1917; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_22 = 0; __Pyx_DECREF_SET(__pyx_v_idx_shifted, ((PyArrayObject *)__pyx_t_17)); __pyx_t_17 = 0; /* "pandas/tslib.pyx":1920 * np.maximum(0, trans.searchsorted(vals + DAY_NS, side='right') - 1)) * * for i in range(n): # <<<<<<<<<<<<<< * v = vals[i] - deltas[idx_shifted[i]] * pos = bisect_right_i8(tdata, v, ntrans) - 1 */ __pyx_t_1 = __pyx_v_n; for (__pyx_t_15 = 0; __pyx_t_15 < __pyx_t_1; __pyx_t_15+=1) { __pyx_v_i = __pyx_t_15; /* "pandas/tslib.pyx":1921 * * for i in range(n): * v = vals[i] - deltas[idx_shifted[i]] # <<<<<<<<<<<<<< * pos = bisect_right_i8(tdata, v, ntrans) - 1 * */ __pyx_t_28 = __pyx_v_i; __pyx_t_29 = __pyx_v_i; __pyx_t_30 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_idx_shifted.rcbuffer->pybuffer.buf, __pyx_t_29, __pyx_pybuffernd_idx_shifted.diminfo[0].strides)); __pyx_v_v = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_vals.rcbuffer->pybuffer.buf, __pyx_t_28, __pyx_pybuffernd_vals.diminfo[0].strides)) - (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_deltas.rcbuffer->pybuffer.buf, __pyx_t_30, __pyx_pybuffernd_deltas.diminfo[0].strides))); /* "pandas/tslib.pyx":1922 * for i in range(n): * v = vals[i] - deltas[idx_shifted[i]] * pos = bisect_right_i8(tdata, v, ntrans) - 1 # <<<<<<<<<<<<<< * * # timestamp falls to the right side of the DST transition */ __pyx_t_17 = __pyx_f_6pandas_5tslib_bisect_right_i8(__pyx_v_tdata, __pyx_v_v, __pyx_v_ntrans); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1922; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_17); __pyx_t_2 = PyNumber_Subtract(__pyx_t_17, __pyx_int_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1922; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; __pyx_t_31 = __Pyx_PyIndex_AsSsize_t(__pyx_t_2); if (unlikely((__pyx_t_31 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1922; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_pos = __pyx_t_31; /* "pandas/tslib.pyx":1925 * * # timestamp falls to the right side of the DST transition * if v + deltas[pos] == vals[i]: # <<<<<<<<<<<<<< * result_b[i] = v * */ __pyx_t_31 = __pyx_v_pos; __pyx_t_32 = __pyx_v_i; __pyx_t_6 = (((__pyx_v_v + (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_deltas.rcbuffer->pybuffer.buf, __pyx_t_31, __pyx_pybuffernd_deltas.diminfo[0].strides))) == (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_vals.rcbuffer->pybuffer.buf, __pyx_t_32, __pyx_pybuffernd_vals.diminfo[0].strides))) != 0); if (__pyx_t_6) { /* "pandas/tslib.pyx":1926 * # timestamp falls to the right side of the DST transition * if v + deltas[pos] == vals[i]: * result_b[i] = v # <<<<<<<<<<<<<< * * */ __pyx_t_33 = __pyx_v_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_result_b.rcbuffer->pybuffer.buf, __pyx_t_33, __pyx_pybuffernd_result_b.diminfo[0].strides) = __pyx_v_v; goto __pyx_L13; } __pyx_L13:; } /* "pandas/tslib.pyx":1929 * * * if infer_dst: # <<<<<<<<<<<<<< * dst_hours = np.empty(n, dtype=np.int64) * dst_hours.fill(NPY_NAT) */ __pyx_t_6 = (__pyx_v_infer_dst != 0); if (__pyx_t_6) { /* "pandas/tslib.pyx":1930 * * if infer_dst: * dst_hours = np.empty(n, dtype=np.int64) # <<<<<<<<<<<<<< * dst_hours.fill(NPY_NAT) * */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1930; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_17 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__empty); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1930; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_17); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_n); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1930; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_18 = PyTuple_New(1); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1930; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); PyTuple_SET_ITEM(__pyx_t_18, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1930; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_2)); __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1930; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_19 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s__int64); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1930; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_19); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__dtype), __pyx_t_19) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1930; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0; __pyx_t_19 = PyObject_Call(__pyx_t_17, ((PyObject *)__pyx_t_18), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1930; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_19); __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_18)); __pyx_t_18 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; if (!(likely(((__pyx_t_19) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_19, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1930; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_10 = ((PyArrayObject *)__pyx_t_19); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_dst_hours.rcbuffer->pybuffer); __pyx_t_11 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_dst_hours.rcbuffer->pybuffer, (PyObject*)__pyx_t_10, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_11 < 0)) { PyErr_Fetch(&__pyx_t_14, &__pyx_t_13, &__pyx_t_12); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_dst_hours.rcbuffer->pybuffer, (PyObject*)__pyx_v_dst_hours, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_14); Py_XDECREF(__pyx_t_13); Py_XDECREF(__pyx_t_12); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_14, __pyx_t_13, __pyx_t_12); } } __pyx_pybuffernd_dst_hours.diminfo[0].strides = __pyx_pybuffernd_dst_hours.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_dst_hours.diminfo[0].shape = __pyx_pybuffernd_dst_hours.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_11 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1930; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_10 = 0; __pyx_v_dst_hours = ((PyArrayObject *)__pyx_t_19); __pyx_t_19 = 0; /* "pandas/tslib.pyx":1931 * if infer_dst: * dst_hours = np.empty(n, dtype=np.int64) * dst_hours.fill(NPY_NAT) # <<<<<<<<<<<<<< * * # Get the ambiguous hours (given the above, these are the hours */ __pyx_t_19 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_dst_hours), __pyx_n_s__fill); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1931; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_19); __pyx_t_2 = __Pyx_PyInt_to_py_npy_int64(__pyx_v_6pandas_5tslib_NPY_NAT); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1931; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_18 = PyTuple_New(1); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1931; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); PyTuple_SET_ITEM(__pyx_t_18, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_Call(__pyx_t_19, ((PyObject *)__pyx_t_18), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1931; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_18)); __pyx_t_18 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/tslib.pyx":1935 * # Get the ambiguous hours (given the above, these are the hours * # where result_a != result_b and neither of them are NAT) * both_nat = np.logical_and(result_a != NPY_NAT, result_b != NPY_NAT) # <<<<<<<<<<<<<< * both_eq = result_a == result_b * trans_idx = np.squeeze(np.nonzero(np.logical_and(both_nat, ~both_eq))) */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1935; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_18 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__logical_and); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1935; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyInt_to_py_npy_int64(__pyx_v_6pandas_5tslib_NPY_NAT); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1935; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_19 = PyObject_RichCompare(((PyObject *)__pyx_v_result_a), __pyx_t_2, Py_NE); __Pyx_XGOTREF(__pyx_t_19); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1935; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyInt_to_py_npy_int64(__pyx_v_6pandas_5tslib_NPY_NAT); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1935; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_17 = PyObject_RichCompare(((PyObject *)__pyx_v_result_b), __pyx_t_2, Py_NE); __Pyx_XGOTREF(__pyx_t_17); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1935; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1935; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_19); __Pyx_GIVEREF(__pyx_t_19); PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_17); __Pyx_GIVEREF(__pyx_t_17); __pyx_t_19 = 0; __pyx_t_17 = 0; __pyx_t_17 = PyObject_Call(__pyx_t_18, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1935; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_17); __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __pyx_v_both_nat = __pyx_t_17; __pyx_t_17 = 0; /* "pandas/tslib.pyx":1936 * # where result_a != result_b and neither of them are NAT) * both_nat = np.logical_and(result_a != NPY_NAT, result_b != NPY_NAT) * both_eq = result_a == result_b # <<<<<<<<<<<<<< * trans_idx = np.squeeze(np.nonzero(np.logical_and(both_nat, ~both_eq))) * if trans_idx.size == 1: */ __pyx_t_17 = PyObject_RichCompare(((PyObject *)__pyx_v_result_a), ((PyObject *)__pyx_v_result_b), Py_EQ); __Pyx_XGOTREF(__pyx_t_17); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1936; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_both_eq = __pyx_t_17; __pyx_t_17 = 0; /* "pandas/tslib.pyx":1937 * both_nat = np.logical_and(result_a != NPY_NAT, result_b != NPY_NAT) * both_eq = result_a == result_b * trans_idx = np.squeeze(np.nonzero(np.logical_and(both_nat, ~both_eq))) # <<<<<<<<<<<<<< * if trans_idx.size == 1: * stamp = Timestamp(vals[trans_idx]) */ __pyx_t_17 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1937; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_17); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_17, __pyx_n_s__squeeze); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1937; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; __pyx_t_17 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1937; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_17); __pyx_t_18 = __Pyx_PyObject_GetAttrStr(__pyx_t_17, __pyx_n_s__nonzero); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1937; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; __pyx_t_17 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1937; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_17); __pyx_t_19 = __Pyx_PyObject_GetAttrStr(__pyx_t_17, __pyx_n_s__logical_and); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1937; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_19); __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; __pyx_t_17 = PyNumber_Invert(__pyx_v_both_eq); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1937; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_17); __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1937; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_INCREF(__pyx_v_both_nat); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_v_both_nat); __Pyx_GIVEREF(__pyx_v_both_nat); PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_17); __Pyx_GIVEREF(__pyx_t_17); __pyx_t_17 = 0; __pyx_t_17 = PyObject_Call(__pyx_t_19, ((PyObject *)__pyx_t_8), NULL); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1937; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_17); __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0; __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1937; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_17); __Pyx_GIVEREF(__pyx_t_17); __pyx_t_17 = 0; __pyx_t_17 = PyObject_Call(__pyx_t_18, ((PyObject *)__pyx_t_8), NULL); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1937; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_17); __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0; __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1937; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_17); __Pyx_GIVEREF(__pyx_t_17); __pyx_t_17 = 0; __pyx_t_17 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_8), NULL); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1937; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_17); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0; __pyx_v_trans_idx = __pyx_t_17; __pyx_t_17 = 0; /* "pandas/tslib.pyx":1938 * both_eq = result_a == result_b * trans_idx = np.squeeze(np.nonzero(np.logical_and(both_nat, ~both_eq))) * if trans_idx.size == 1: # <<<<<<<<<<<<<< * stamp = Timestamp(vals[trans_idx]) * raise pytz.AmbiguousTimeError("Cannot infer dst time from %s as" */ __pyx_t_17 = __Pyx_PyObject_GetAttrStr(__pyx_v_trans_idx, __pyx_n_s__size); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1938; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_17); __pyx_t_8 = PyObject_RichCompare(__pyx_t_17, __pyx_int_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1938; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1938; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (__pyx_t_6) { /* "pandas/tslib.pyx":1939 * trans_idx = np.squeeze(np.nonzero(np.logical_and(both_nat, ~both_eq))) * if trans_idx.size == 1: * stamp = Timestamp(vals[trans_idx]) # <<<<<<<<<<<<<< * raise pytz.AmbiguousTimeError("Cannot infer dst time from %s as" * "there are no repeated times" % stamp) */ __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s__Timestamp); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1939; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_17 = PyObject_GetItem(((PyObject *)__pyx_v_vals), __pyx_v_trans_idx); if (!__pyx_t_17) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1939; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_17); __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1939; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_17); __Pyx_GIVEREF(__pyx_t_17); __pyx_t_17 = 0; __pyx_t_17 = PyObject_Call(__pyx_t_8, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1939; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_17); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __pyx_v_stamp = __pyx_t_17; __pyx_t_17 = 0; /* "pandas/tslib.pyx":1940 * if trans_idx.size == 1: * stamp = Timestamp(vals[trans_idx]) * raise pytz.AmbiguousTimeError("Cannot infer dst time from %s as" # <<<<<<<<<<<<<< * "there are no repeated times" % stamp) * # Split the array into contiguous chunks (where the difference between */ __pyx_t_17 = __Pyx_GetModuleGlobalName(__pyx_n_s__pytz); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1940; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_17); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_17, __pyx_n_s__AmbiguousTimeError); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1940; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; /* "pandas/tslib.pyx":1941 * stamp = Timestamp(vals[trans_idx]) * raise pytz.AmbiguousTimeError("Cannot infer dst time from %s as" * "there are no repeated times" % stamp) # <<<<<<<<<<<<<< * # Split the array into contiguous chunks (where the difference between * # indices is 1). These are effectively dst transitions in different years */ __pyx_t_17 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_107), __pyx_v_stamp); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1941; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_17)); __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1940; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_8, 0, ((PyObject *)__pyx_t_17)); __Pyx_GIVEREF(((PyObject *)__pyx_t_17)); __pyx_t_17 = 0; __pyx_t_17 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_8), NULL); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1940; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_17); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0; __Pyx_Raise(__pyx_t_17, 0, 0, 0); __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1940; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L15; } __pyx_L15:; /* "pandas/tslib.pyx":1946 * # which is useful for checking that there is not an ambiguous transition * # in an individual year. * if trans_idx.size > 0: # <<<<<<<<<<<<<< * one_diff = np.where(np.diff(trans_idx)!=1)[0]+1 * trans_grp = np.array_split(trans_idx, one_diff) */ __pyx_t_17 = __Pyx_PyObject_GetAttrStr(__pyx_v_trans_idx, __pyx_n_s__size); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1946; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_17); __pyx_t_8 = PyObject_RichCompare(__pyx_t_17, __pyx_int_0, Py_GT); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1946; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1946; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (__pyx_t_6) { /* "pandas/tslib.pyx":1947 * # in an individual year. * if trans_idx.size > 0: * one_diff = np.where(np.diff(trans_idx)!=1)[0]+1 # <<<<<<<<<<<<<< * trans_grp = np.array_split(trans_idx, one_diff) * */ __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1947; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_17 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s__where); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1947; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_17); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1947; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s__diff); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1947; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1947; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_INCREF(__pyx_v_trans_idx); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_v_trans_idx); __Pyx_GIVEREF(__pyx_v_trans_idx); __pyx_t_18 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_8), NULL); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1947; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0; __pyx_t_8 = PyObject_RichCompare(__pyx_t_18, __pyx_int_1, Py_NE); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1947; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; __pyx_t_18 = PyTuple_New(1); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1947; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); PyTuple_SET_ITEM(__pyx_t_18, 0, __pyx_t_8); __Pyx_GIVEREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_8 = PyObject_Call(__pyx_t_17, ((PyObject *)__pyx_t_18), NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1947; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_18)); __pyx_t_18 = 0; __pyx_t_18 = __Pyx_GetItemInt(__pyx_t_8, 0, sizeof(long), PyInt_FromLong, 0, 0, 0); if (!__pyx_t_18) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1947; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_8 = PyNumber_Add(__pyx_t_18, __pyx_int_1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1947; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; __pyx_v_one_diff = __pyx_t_8; __pyx_t_8 = 0; /* "pandas/tslib.pyx":1948 * if trans_idx.size > 0: * one_diff = np.where(np.diff(trans_idx)!=1)[0]+1 * trans_grp = np.array_split(trans_idx, one_diff) # <<<<<<<<<<<<<< * * # Iterate through each day, if there are no hours where the delta is negative */ __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1948; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_18 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s__array_split); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1948; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1948; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_INCREF(__pyx_v_trans_idx); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_v_trans_idx); __Pyx_GIVEREF(__pyx_v_trans_idx); __Pyx_INCREF(__pyx_v_one_diff); PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_v_one_diff); __Pyx_GIVEREF(__pyx_v_one_diff); __pyx_t_17 = PyObject_Call(__pyx_t_18, ((PyObject *)__pyx_t_8), NULL); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1948; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_17); __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0; __pyx_v_trans_grp = __pyx_t_17; __pyx_t_17 = 0; /* "pandas/tslib.pyx":1952 * # Iterate through each day, if there are no hours where the delta is negative * # (indicates a repeat of hour) the switch cannot be inferred * for grp in trans_grp: # <<<<<<<<<<<<<< * * delta = np.diff(result_a[grp]) */ if (PyList_CheckExact(__pyx_v_trans_grp) || PyTuple_CheckExact(__pyx_v_trans_grp)) { __pyx_t_17 = __pyx_v_trans_grp; __Pyx_INCREF(__pyx_t_17); __pyx_t_1 = 0; __pyx_t_34 = NULL; } else { __pyx_t_1 = -1; __pyx_t_17 = PyObject_GetIter(__pyx_v_trans_grp); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1952; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_17); __pyx_t_34 = Py_TYPE(__pyx_t_17)->tp_iternext; } for (;;) { if (!__pyx_t_34 && PyList_CheckExact(__pyx_t_17)) { if (__pyx_t_1 >= PyList_GET_SIZE(__pyx_t_17)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_8 = PyList_GET_ITEM(__pyx_t_17, __pyx_t_1); __Pyx_INCREF(__pyx_t_8); __pyx_t_1++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1952; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_8 = PySequence_ITEM(__pyx_t_17, __pyx_t_1); __pyx_t_1++; if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1952; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif } else if (!__pyx_t_34 && PyTuple_CheckExact(__pyx_t_17)) { if (__pyx_t_1 >= PyTuple_GET_SIZE(__pyx_t_17)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_8 = PyTuple_GET_ITEM(__pyx_t_17, __pyx_t_1); __Pyx_INCREF(__pyx_t_8); __pyx_t_1++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1952; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_8 = PySequence_ITEM(__pyx_t_17, __pyx_t_1); __pyx_t_1++; if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1952; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif } else { __pyx_t_8 = __pyx_t_34(__pyx_t_17); if (unlikely(!__pyx_t_8)) { if (PyErr_Occurred()) { if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear(); else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1952; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } break; } __Pyx_GOTREF(__pyx_t_8); } __Pyx_XDECREF_SET(__pyx_v_grp, __pyx_t_8); __pyx_t_8 = 0; /* "pandas/tslib.pyx":1954 * for grp in trans_grp: * * delta = np.diff(result_a[grp]) # <<<<<<<<<<<<<< * if grp.size == 1 or np.all(delta>0): * stamp = Timestamp(vals[grp[0]]) */ __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1954; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_18 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s__diff); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1954; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_8 = PyObject_GetItem(((PyObject *)__pyx_v_result_a), __pyx_v_grp); if (!__pyx_t_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1954; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1954; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_8); __Pyx_GIVEREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_8 = PyObject_Call(__pyx_t_18, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1954; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __Pyx_XDECREF_SET(__pyx_v_delta, __pyx_t_8); __pyx_t_8 = 0; /* "pandas/tslib.pyx":1955 * * delta = np.diff(result_a[grp]) * if grp.size == 1 or np.all(delta>0): # <<<<<<<<<<<<<< * stamp = Timestamp(vals[grp[0]]) * raise pytz.AmbiguousTimeError(stamp) */ __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_grp, __pyx_n_s__size); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1955; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_2 = PyObject_RichCompare(__pyx_t_8, __pyx_int_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1955; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1955; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (!__pyx_t_6) { __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1955; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__all); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1955; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_RichCompare(__pyx_v_delta, __pyx_int_0, Py_GT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1955; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_18 = PyTuple_New(1); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1955; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); PyTuple_SET_ITEM(__pyx_t_18, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_Call(__pyx_t_8, ((PyObject *)__pyx_t_18), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1955; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_18)); __pyx_t_18 = 0; __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1955; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_3 = __pyx_t_4; } else { __pyx_t_3 = __pyx_t_6; } if (__pyx_t_3) { /* "pandas/tslib.pyx":1956 * delta = np.diff(result_a[grp]) * if grp.size == 1 or np.all(delta>0): * stamp = Timestamp(vals[grp[0]]) # <<<<<<<<<<<<<< * raise pytz.AmbiguousTimeError(stamp) * */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__Timestamp); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1956; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_18 = __Pyx_GetItemInt(__pyx_v_grp, 0, sizeof(long), PyInt_FromLong, 0, 0, 0); if (!__pyx_t_18) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1956; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); __pyx_t_8 = PyObject_GetItem(((PyObject *)__pyx_v_vals), __pyx_t_18); if (!__pyx_t_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1956; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; __pyx_t_18 = PyTuple_New(1); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1956; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); PyTuple_SET_ITEM(__pyx_t_18, 0, __pyx_t_8); __Pyx_GIVEREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_8 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_18), NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1956; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_18)); __pyx_t_18 = 0; __pyx_v_stamp = __pyx_t_8; __pyx_t_8 = 0; /* "pandas/tslib.pyx":1957 * if grp.size == 1 or np.all(delta>0): * stamp = Timestamp(vals[grp[0]]) * raise pytz.AmbiguousTimeError(stamp) # <<<<<<<<<<<<<< * * # Find the index for the switch and pull from a for dst and b for standard */ __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s__pytz); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1957; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_18 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s__AmbiguousTimeError); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1957; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1957; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_INCREF(__pyx_v_stamp); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_v_stamp); __Pyx_GIVEREF(__pyx_v_stamp); __pyx_t_2 = PyObject_Call(__pyx_t_18, ((PyObject *)__pyx_t_8), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1957; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0; __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1957; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L19; } __pyx_L19:; /* "pandas/tslib.pyx":1960 * * # Find the index for the switch and pull from a for dst and b for standard * switch_idx = (delta<=0).nonzero()[0] # <<<<<<<<<<<<<< * if switch_idx.size > 1: * raise pytz.AmbiguousTimeError("There are %i dst switches " */ __pyx_t_2 = PyObject_RichCompare(__pyx_v_delta, __pyx_int_0, Py_LE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1960; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__nonzero); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1960; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_Call(__pyx_t_8, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1960; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_8 = __Pyx_GetItemInt(__pyx_t_2, 0, sizeof(long), PyInt_FromLong, 0, 0, 0); if (!__pyx_t_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1960; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF_SET(__pyx_v_switch_idx, __pyx_t_8); __pyx_t_8 = 0; /* "pandas/tslib.pyx":1961 * # Find the index for the switch and pull from a for dst and b for standard * switch_idx = (delta<=0).nonzero()[0] * if switch_idx.size > 1: # <<<<<<<<<<<<<< * raise pytz.AmbiguousTimeError("There are %i dst switches " * "when there should only be 1." */ __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_switch_idx, __pyx_n_s__size); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1961; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_2 = PyObject_RichCompare(__pyx_t_8, __pyx_int_1, Py_GT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1961; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1961; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_3) { /* "pandas/tslib.pyx":1962 * switch_idx = (delta<=0).nonzero()[0] * if switch_idx.size > 1: * raise pytz.AmbiguousTimeError("There are %i dst switches " # <<<<<<<<<<<<<< * "when there should only be 1." * % switch_idx.size) */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__pytz); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1962; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__AmbiguousTimeError); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1962; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/tslib.pyx":1964 * raise pytz.AmbiguousTimeError("There are %i dst switches " * "when there should only be 1." * % switch_idx.size) # <<<<<<<<<<<<<< * switch_idx = switch_idx[0]+1 # Pull the only index and adjust * a_idx = grp[:switch_idx] */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_switch_idx, __pyx_n_s__size); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1964; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_18 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_108), __pyx_t_2); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1964; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_18)); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1962; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_t_18)); __Pyx_GIVEREF(((PyObject *)__pyx_t_18)); __pyx_t_18 = 0; __pyx_t_18 = PyObject_Call(__pyx_t_8, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1962; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __Pyx_Raise(__pyx_t_18, 0, 0, 0); __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1962; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L20; } __pyx_L20:; /* "pandas/tslib.pyx":1965 * "when there should only be 1." * % switch_idx.size) * switch_idx = switch_idx[0]+1 # Pull the only index and adjust # <<<<<<<<<<<<<< * a_idx = grp[:switch_idx] * b_idx = grp[switch_idx:] */ __pyx_t_18 = __Pyx_GetItemInt(__pyx_v_switch_idx, 0, sizeof(long), PyInt_FromLong, 0, 0, 0); if (!__pyx_t_18) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1965; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); __pyx_t_2 = PyNumber_Add(__pyx_t_18, __pyx_int_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1965; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; __Pyx_DECREF_SET(__pyx_v_switch_idx, __pyx_t_2); __pyx_t_2 = 0; /* "pandas/tslib.pyx":1966 * % switch_idx.size) * switch_idx = switch_idx[0]+1 # Pull the only index and adjust * a_idx = grp[:switch_idx] # <<<<<<<<<<<<<< * b_idx = grp[switch_idx:] * dst_hours[grp] = np.hstack((result_a[a_idx], result_b[b_idx])) */ __pyx_t_2 = __Pyx_PyObject_GetSlice(__pyx_v_grp, 0, 0, NULL, &__pyx_v_switch_idx, NULL, 0, 0, 0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1966; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_XDECREF_SET(__pyx_v_a_idx, __pyx_t_2); __pyx_t_2 = 0; /* "pandas/tslib.pyx":1967 * switch_idx = switch_idx[0]+1 # Pull the only index and adjust * a_idx = grp[:switch_idx] * b_idx = grp[switch_idx:] # <<<<<<<<<<<<<< * dst_hours[grp] = np.hstack((result_a[a_idx], result_b[b_idx])) * */ __pyx_t_2 = __Pyx_PyObject_GetSlice(__pyx_v_grp, 0, 0, &__pyx_v_switch_idx, NULL, NULL, 0, 0, 0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1967; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_XDECREF_SET(__pyx_v_b_idx, __pyx_t_2); __pyx_t_2 = 0; /* "pandas/tslib.pyx":1968 * a_idx = grp[:switch_idx] * b_idx = grp[switch_idx:] * dst_hours[grp] = np.hstack((result_a[a_idx], result_b[b_idx])) # <<<<<<<<<<<<<< * * for i in range(n): */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1968; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_18 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__hstack); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1968; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_GetItem(((PyObject *)__pyx_v_result_a), __pyx_v_a_idx); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1968; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_8 = PyObject_GetItem(((PyObject *)__pyx_v_result_b), __pyx_v_b_idx); if (!__pyx_t_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1968; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_19 = PyTuple_New(2); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1968; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_19); PyTuple_SET_ITEM(__pyx_t_19, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_19, 1, __pyx_t_8); __Pyx_GIVEREF(__pyx_t_8); __pyx_t_2 = 0; __pyx_t_8 = 0; __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1968; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_8, 0, ((PyObject *)__pyx_t_19)); __Pyx_GIVEREF(((PyObject *)__pyx_t_19)); __pyx_t_19 = 0; __pyx_t_19 = PyObject_Call(__pyx_t_18, ((PyObject *)__pyx_t_8), NULL); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1968; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_19); __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0; if (PyObject_SetItem(((PyObject *)__pyx_v_dst_hours), __pyx_v_grp, __pyx_t_19) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1968; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0; } __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; goto __pyx_L16; } __pyx_L16:; goto __pyx_L14; } __pyx_L14:; /* "pandas/tslib.pyx":1970 * dst_hours[grp] = np.hstack((result_a[a_idx], result_b[b_idx])) * * for i in range(n): # <<<<<<<<<<<<<< * left = result_a[i] * right = result_b[i] */ __pyx_t_1 = __pyx_v_n; for (__pyx_t_15 = 0; __pyx_t_15 < __pyx_t_1; __pyx_t_15+=1) { __pyx_v_i = __pyx_t_15; /* "pandas/tslib.pyx":1971 * * for i in range(n): * left = result_a[i] # <<<<<<<<<<<<<< * right = result_b[i] * if left != NPY_NAT and right != NPY_NAT: */ __pyx_t_35 = __pyx_v_i; __pyx_v_left = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_result_a.rcbuffer->pybuffer.buf, __pyx_t_35, __pyx_pybuffernd_result_a.diminfo[0].strides)); /* "pandas/tslib.pyx":1972 * for i in range(n): * left = result_a[i] * right = result_b[i] # <<<<<<<<<<<<<< * if left != NPY_NAT and right != NPY_NAT: * if left == right: */ __pyx_t_36 = __pyx_v_i; __pyx_v_right = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_result_b.rcbuffer->pybuffer.buf, __pyx_t_36, __pyx_pybuffernd_result_b.diminfo[0].strides)); /* "pandas/tslib.pyx":1973 * left = result_a[i] * right = result_b[i] * if left != NPY_NAT and right != NPY_NAT: # <<<<<<<<<<<<<< * if left == right: * result[i] = left */ __pyx_t_3 = ((__pyx_v_left != __pyx_v_6pandas_5tslib_NPY_NAT) != 0); if (__pyx_t_3) { __pyx_t_6 = ((__pyx_v_right != __pyx_v_6pandas_5tslib_NPY_NAT) != 0); __pyx_t_4 = __pyx_t_6; } else { __pyx_t_4 = __pyx_t_3; } if (__pyx_t_4) { /* "pandas/tslib.pyx":1974 * right = result_b[i] * if left != NPY_NAT and right != NPY_NAT: * if left == right: # <<<<<<<<<<<<<< * result[i] = left * else: */ __pyx_t_4 = ((__pyx_v_left == __pyx_v_right) != 0); if (__pyx_t_4) { /* "pandas/tslib.pyx":1975 * if left != NPY_NAT and right != NPY_NAT: * if left == right: * result[i] = left # <<<<<<<<<<<<<< * else: * if infer_dst and dst_hours[i] != NPY_NAT: */ __pyx_t_37 = __pyx_v_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_37, __pyx_pybuffernd_result.diminfo[0].strides) = __pyx_v_left; goto __pyx_L24; } /*else*/ { /* "pandas/tslib.pyx":1977 * result[i] = left * else: * if infer_dst and dst_hours[i] != NPY_NAT: # <<<<<<<<<<<<<< * result[i] = dst_hours[i] * else: */ if ((__pyx_v_infer_dst != 0)) { __pyx_t_38 = __pyx_v_i; __pyx_t_4 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_dst_hours.rcbuffer->pybuffer.buf, __pyx_t_38, __pyx_pybuffernd_dst_hours.diminfo[0].strides)) != __pyx_v_6pandas_5tslib_NPY_NAT) != 0); __pyx_t_3 = __pyx_t_4; } else { __pyx_t_3 = (__pyx_v_infer_dst != 0); } if (__pyx_t_3) { /* "pandas/tslib.pyx":1978 * else: * if infer_dst and dst_hours[i] != NPY_NAT: * result[i] = dst_hours[i] # <<<<<<<<<<<<<< * else: * stamp = Timestamp(vals[i]) */ __pyx_t_39 = __pyx_v_i; __pyx_t_40 = __pyx_v_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_40, __pyx_pybuffernd_result.diminfo[0].strides) = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_dst_hours.rcbuffer->pybuffer.buf, __pyx_t_39, __pyx_pybuffernd_dst_hours.diminfo[0].strides)); goto __pyx_L25; } /*else*/ { /* "pandas/tslib.pyx":1980 * result[i] = dst_hours[i] * else: * stamp = Timestamp(vals[i]) # <<<<<<<<<<<<<< * raise pytz.AmbiguousTimeError("Cannot infer dst time from %r, "\ * "try using the 'infer_dst' argument" */ __pyx_t_17 = __Pyx_GetModuleGlobalName(__pyx_n_s__Timestamp); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1980; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_17); __pyx_t_41 = __pyx_v_i; __pyx_t_19 = __Pyx_PyInt_to_py_npy_int64((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_vals.rcbuffer->pybuffer.buf, __pyx_t_41, __pyx_pybuffernd_vals.diminfo[0].strides))); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1980; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_19); __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1980; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_19); __Pyx_GIVEREF(__pyx_t_19); __pyx_t_19 = 0; __pyx_t_19 = PyObject_Call(__pyx_t_17, ((PyObject *)__pyx_t_8), NULL); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1980; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_19); __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0; __pyx_v_stamp = __pyx_t_19; __pyx_t_19 = 0; /* "pandas/tslib.pyx":1981 * else: * stamp = Timestamp(vals[i]) * raise pytz.AmbiguousTimeError("Cannot infer dst time from %r, "\ # <<<<<<<<<<<<<< * "try using the 'infer_dst' argument" * % stamp) */ __pyx_t_19 = __Pyx_GetModuleGlobalName(__pyx_n_s__pytz); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1981; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_19); __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_19, __pyx_n_s__AmbiguousTimeError); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1981; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0; /* "pandas/tslib.pyx":1983 * raise pytz.AmbiguousTimeError("Cannot infer dst time from %r, "\ * "try using the 'infer_dst' argument" * % stamp) # <<<<<<<<<<<<<< * elif left != NPY_NAT: * result[i] = left */ __pyx_t_19 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_109), __pyx_v_stamp); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1983; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_19)); __pyx_t_17 = PyTuple_New(1); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1981; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_17); PyTuple_SET_ITEM(__pyx_t_17, 0, ((PyObject *)__pyx_t_19)); __Pyx_GIVEREF(((PyObject *)__pyx_t_19)); __pyx_t_19 = 0; __pyx_t_19 = PyObject_Call(__pyx_t_8, ((PyObject *)__pyx_t_17), NULL); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1981; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_19); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_17)); __pyx_t_17 = 0; __Pyx_Raise(__pyx_t_19, 0, 0, 0); __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1981; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_L25:; } __pyx_L24:; goto __pyx_L23; } /* "pandas/tslib.pyx":1984 * "try using the 'infer_dst' argument" * % stamp) * elif left != NPY_NAT: # <<<<<<<<<<<<<< * result[i] = left * elif right != NPY_NAT: */ __pyx_t_3 = ((__pyx_v_left != __pyx_v_6pandas_5tslib_NPY_NAT) != 0); if (__pyx_t_3) { /* "pandas/tslib.pyx":1985 * % stamp) * elif left != NPY_NAT: * result[i] = left # <<<<<<<<<<<<<< * elif right != NPY_NAT: * result[i] = right */ __pyx_t_42 = __pyx_v_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_42, __pyx_pybuffernd_result.diminfo[0].strides) = __pyx_v_left; goto __pyx_L23; } /* "pandas/tslib.pyx":1986 * elif left != NPY_NAT: * result[i] = left * elif right != NPY_NAT: # <<<<<<<<<<<<<< * result[i] = right * else: */ __pyx_t_3 = ((__pyx_v_right != __pyx_v_6pandas_5tslib_NPY_NAT) != 0); if (__pyx_t_3) { /* "pandas/tslib.pyx":1987 * result[i] = left * elif right != NPY_NAT: * result[i] = right # <<<<<<<<<<<<<< * else: * stamp = Timestamp(vals[i]) */ __pyx_t_43 = __pyx_v_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_43, __pyx_pybuffernd_result.diminfo[0].strides) = __pyx_v_right; goto __pyx_L23; } /*else*/ { /* "pandas/tslib.pyx":1989 * result[i] = right * else: * stamp = Timestamp(vals[i]) # <<<<<<<<<<<<<< * raise pytz.NonExistentTimeError(stamp) * */ __pyx_t_19 = __Pyx_GetModuleGlobalName(__pyx_n_s__Timestamp); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1989; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_19); __pyx_t_44 = __pyx_v_i; __pyx_t_17 = __Pyx_PyInt_to_py_npy_int64((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_vals.rcbuffer->pybuffer.buf, __pyx_t_44, __pyx_pybuffernd_vals.diminfo[0].strides))); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1989; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_17); __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1989; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_17); __Pyx_GIVEREF(__pyx_t_17); __pyx_t_17 = 0; __pyx_t_17 = PyObject_Call(__pyx_t_19, ((PyObject *)__pyx_t_8), NULL); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1989; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_17); __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0; __pyx_v_stamp = __pyx_t_17; __pyx_t_17 = 0; /* "pandas/tslib.pyx":1990 * else: * stamp = Timestamp(vals[i]) * raise pytz.NonExistentTimeError(stamp) # <<<<<<<<<<<<<< * * return result */ __pyx_t_17 = __Pyx_GetModuleGlobalName(__pyx_n_s__pytz); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1990; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_17); __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_17, __pyx_n_s_110); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1990; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; __pyx_t_17 = PyTuple_New(1); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1990; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_17); __Pyx_INCREF(__pyx_v_stamp); PyTuple_SET_ITEM(__pyx_t_17, 0, __pyx_v_stamp); __Pyx_GIVEREF(__pyx_v_stamp); __pyx_t_19 = PyObject_Call(__pyx_t_8, ((PyObject *)__pyx_t_17), NULL); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1990; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_19); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_17)); __pyx_t_17 = 0; __Pyx_Raise(__pyx_t_19, 0, 0, 0); __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1990; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_L23:; } /* "pandas/tslib.pyx":1992 * raise pytz.NonExistentTimeError(stamp) * * return result # <<<<<<<<<<<<<< * * cdef _ensure_int64(object arr): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_result)); __pyx_r = ((PyObject *)__pyx_v_result); goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); __Pyx_XDECREF(__pyx_t_17); __Pyx_XDECREF(__pyx_t_18); __Pyx_XDECREF(__pyx_t_19); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_deltas.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_dst_hours.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_idx_shifted.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result_a.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result_b.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_trans.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_vals.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.tslib.tz_localize_to_utc", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_deltas.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_dst_hours.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_idx_shifted.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result_a.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result_b.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_trans.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_vals.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_trans); __Pyx_XDECREF((PyObject *)__pyx_v_deltas); __Pyx_XDECREF((PyObject *)__pyx_v_idx_shifted); __Pyx_XDECREF((PyObject *)__pyx_v_result); __Pyx_XDECREF((PyObject *)__pyx_v_result_a); __Pyx_XDECREF((PyObject *)__pyx_v_result_b); __Pyx_XDECREF((PyObject *)__pyx_v_dst_hours); __Pyx_XDECREF((PyObject *)__pyx_v_dt); __Pyx_XDECREF(__pyx_v_delta); __Pyx_XDECREF(__pyx_v_both_nat); __Pyx_XDECREF(__pyx_v_both_eq); __Pyx_XDECREF(__pyx_v_trans_idx); __Pyx_XDECREF(__pyx_v_stamp); __Pyx_XDECREF(__pyx_v_one_diff); __Pyx_XDECREF(__pyx_v_trans_grp); __Pyx_XDECREF(__pyx_v_grp); __Pyx_XDECREF(__pyx_v_switch_idx); __Pyx_XDECREF(__pyx_v_a_idx); __Pyx_XDECREF(__pyx_v_b_idx); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/tslib.pyx":1994 * return result * * cdef _ensure_int64(object arr): # <<<<<<<<<<<<<< * if util.is_array(arr): * if ( arr).descr.type_num == NPY_INT64: */ static PyObject *__pyx_f_6pandas_5tslib__ensure_int64(PyObject *__pyx_v_arr) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_ensure_int64", 0); /* "pandas/tslib.pyx":1995 * * cdef _ensure_int64(object arr): * if util.is_array(arr): # <<<<<<<<<<<<<< * if ( arr).descr.type_num == NPY_INT64: * return arr */ __pyx_t_1 = __pyx_f_4util_is_array(__pyx_v_arr); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1995; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1995; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_2) { /* "pandas/tslib.pyx":1996 * cdef _ensure_int64(object arr): * if util.is_array(arr): * if ( arr).descr.type_num == NPY_INT64: # <<<<<<<<<<<<<< * return arr * else: */ __pyx_t_2 = ((((PyArrayObject *)__pyx_v_arr)->descr->type_num == NPY_INT64) != 0); if (__pyx_t_2) { /* "pandas/tslib.pyx":1997 * if util.is_array(arr): * if ( arr).descr.type_num == NPY_INT64: * return arr # <<<<<<<<<<<<<< * else: * return arr.astype(np.int64) */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_arr); __pyx_r = __pyx_v_arr; goto __pyx_L0; goto __pyx_L4; } /*else*/ { /* "pandas/tslib.pyx":1999 * return arr * else: * return arr.astype(np.int64) # <<<<<<<<<<<<<< * else: * return np.array(arr, dtype=np.int64) */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_arr, __pyx_n_s__astype); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1999; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1999; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s__int64); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1999; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1999; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1999; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; } __pyx_L4:; goto __pyx_L3; } /*else*/ { /* "pandas/tslib.pyx":2001 * return arr.astype(np.int64) * else: * return np.array(arr, dtype=np.int64) # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2001; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s__array); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2001; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2001; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_v_arr); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_arr); __Pyx_GIVEREF(__pyx_v_arr); __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2001; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2001; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s__int64); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2001; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__dtype), __pyx_t_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2001; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2001; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_r = __pyx_t_6; __pyx_t_6 = 0; goto __pyx_L0; } __pyx_L3:; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("pandas.tslib._ensure_int64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/tslib.pyx":2004 * * * cdef inline bisect_right_i8(int64_t *data, int64_t val, Py_ssize_t n): # <<<<<<<<<<<<<< * cdef Py_ssize_t pivot, left = 0, right = n * */ static CYTHON_INLINE PyObject *__pyx_f_6pandas_5tslib_bisect_right_i8(__pyx_t_5numpy_int64_t *__pyx_v_data, __pyx_t_5numpy_int64_t __pyx_v_val, Py_ssize_t __pyx_v_n) { Py_ssize_t __pyx_v_pivot; Py_ssize_t __pyx_v_left; Py_ssize_t __pyx_v_right; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("bisect_right_i8", 0); /* "pandas/tslib.pyx":2005 * * cdef inline bisect_right_i8(int64_t *data, int64_t val, Py_ssize_t n): * cdef Py_ssize_t pivot, left = 0, right = n # <<<<<<<<<<<<<< * * # edge cases */ __pyx_v_left = 0; __pyx_v_right = __pyx_v_n; /* "pandas/tslib.pyx":2008 * * # edge cases * if val > data[n - 1]: # <<<<<<<<<<<<<< * return n * */ __pyx_t_1 = ((__pyx_v_val > (__pyx_v_data[(__pyx_v_n - 1)])) != 0); if (__pyx_t_1) { /* "pandas/tslib.pyx":2009 * # edge cases * if val > data[n - 1]: * return n # <<<<<<<<<<<<<< * * if val < data[0]: */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_n); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2009; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; goto __pyx_L3; } __pyx_L3:; /* "pandas/tslib.pyx":2011 * return n * * if val < data[0]: # <<<<<<<<<<<<<< * return 0 * */ __pyx_t_1 = ((__pyx_v_val < (__pyx_v_data[0])) != 0); if (__pyx_t_1) { /* "pandas/tslib.pyx":2012 * * if val < data[0]: * return 0 # <<<<<<<<<<<<<< * * while left < right: */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_int_0); __pyx_r = __pyx_int_0; goto __pyx_L0; goto __pyx_L4; } __pyx_L4:; /* "pandas/tslib.pyx":2014 * return 0 * * while left < right: # <<<<<<<<<<<<<< * pivot = left + (right - left) // 2 * */ while (1) { __pyx_t_1 = ((__pyx_v_left < __pyx_v_right) != 0); if (!__pyx_t_1) break; /* "pandas/tslib.pyx":2015 * * while left < right: * pivot = left + (right - left) // 2 # <<<<<<<<<<<<<< * * if data[pivot] <= val: */ __pyx_v_pivot = (__pyx_v_left + __Pyx_div_Py_ssize_t((__pyx_v_right - __pyx_v_left), 2)); /* "pandas/tslib.pyx":2017 * pivot = left + (right - left) // 2 * * if data[pivot] <= val: # <<<<<<<<<<<<<< * left = pivot + 1 * else: */ __pyx_t_1 = (((__pyx_v_data[__pyx_v_pivot]) <= __pyx_v_val) != 0); if (__pyx_t_1) { /* "pandas/tslib.pyx":2018 * * if data[pivot] <= val: * left = pivot + 1 # <<<<<<<<<<<<<< * else: * right = pivot */ __pyx_v_left = (__pyx_v_pivot + 1); goto __pyx_L7; } /*else*/ { /* "pandas/tslib.pyx":2020 * left = pivot + 1 * else: * right = pivot # <<<<<<<<<<<<<< * * return left */ __pyx_v_right = __pyx_v_pivot; } __pyx_L7:; } /* "pandas/tslib.pyx":2022 * right = pivot * * return left # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_left); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2022; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("pandas.tslib.bisect_right_i8", __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_5tslib_59build_field_sarray(PyObject *__pyx_self, PyObject *__pyx_v_dtindex); /*proto*/ static char __pyx_doc_6pandas_5tslib_58build_field_sarray[] = "\n Datetime as int64 representation to a structured array of fields\n "; static PyMethodDef __pyx_mdef_6pandas_5tslib_59build_field_sarray = {__Pyx_NAMESTR("build_field_sarray"), (PyCFunction)__pyx_pw_6pandas_5tslib_59build_field_sarray, METH_O, __Pyx_DOCSTR(__pyx_doc_6pandas_5tslib_58build_field_sarray)}; static PyObject *__pyx_pw_6pandas_5tslib_59build_field_sarray(PyObject *__pyx_self, PyObject *__pyx_v_dtindex) { CYTHON_UNUSED int __pyx_lineno = 0; CYTHON_UNUSED const char *__pyx_filename = NULL; CYTHON_UNUSED int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("build_field_sarray (wrapper)", 0); if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dtindex), __pyx_ptype_5numpy_ndarray, 1, "dtindex", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2028; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5tslib_58build_field_sarray(__pyx_self, ((PyArrayObject *)__pyx_v_dtindex)); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/tslib.pyx":2028 * #---------------------------------------------------------------------- * * def build_field_sarray(ndarray[int64_t] dtindex): # <<<<<<<<<<<<<< * ''' * Datetime as int64 representation to a structured array of fields */ static PyObject *__pyx_pf_6pandas_5tslib_58build_field_sarray(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_dtindex) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_count; pandas_datetimestruct __pyx_v_dts; PyArrayObject *__pyx_v_years = 0; PyArrayObject *__pyx_v_months = 0; PyArrayObject *__pyx_v_days = 0; PyArrayObject *__pyx_v_hours = 0; PyArrayObject *__pyx_v_minutes = 0; PyArrayObject *__pyx_v_seconds = 0; PyArrayObject *__pyx_v_mus = 0; PyObject *__pyx_v_sa_dtype = NULL; PyObject *__pyx_v_out = NULL; __Pyx_LocalBuf_ND __pyx_pybuffernd_days; __Pyx_Buffer __pyx_pybuffer_days; __Pyx_LocalBuf_ND __pyx_pybuffernd_dtindex; __Pyx_Buffer __pyx_pybuffer_dtindex; __Pyx_LocalBuf_ND __pyx_pybuffernd_hours; __Pyx_Buffer __pyx_pybuffer_hours; __Pyx_LocalBuf_ND __pyx_pybuffernd_minutes; __Pyx_Buffer __pyx_pybuffer_minutes; __Pyx_LocalBuf_ND __pyx_pybuffernd_months; __Pyx_Buffer __pyx_pybuffer_months; __Pyx_LocalBuf_ND __pyx_pybuffernd_mus; __Pyx_Buffer __pyx_pybuffer_mus; __Pyx_LocalBuf_ND __pyx_pybuffernd_seconds; __Pyx_Buffer __pyx_pybuffer_seconds; __Pyx_LocalBuf_ND __pyx_pybuffernd_years; __Pyx_Buffer __pyx_pybuffer_years; 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; PyArrayObject *__pyx_t_6 = NULL; 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; npy_int64 __pyx_t_13; Py_ssize_t __pyx_t_14; npy_int32 __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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("build_field_sarray", 0); __pyx_pybuffer_years.pybuffer.buf = NULL; __pyx_pybuffer_years.refcount = 0; __pyx_pybuffernd_years.data = NULL; __pyx_pybuffernd_years.rcbuffer = &__pyx_pybuffer_years; __pyx_pybuffer_months.pybuffer.buf = NULL; __pyx_pybuffer_months.refcount = 0; __pyx_pybuffernd_months.data = NULL; __pyx_pybuffernd_months.rcbuffer = &__pyx_pybuffer_months; __pyx_pybuffer_days.pybuffer.buf = NULL; __pyx_pybuffer_days.refcount = 0; __pyx_pybuffernd_days.data = NULL; __pyx_pybuffernd_days.rcbuffer = &__pyx_pybuffer_days; __pyx_pybuffer_hours.pybuffer.buf = NULL; __pyx_pybuffer_hours.refcount = 0; __pyx_pybuffernd_hours.data = NULL; __pyx_pybuffernd_hours.rcbuffer = &__pyx_pybuffer_hours; __pyx_pybuffer_minutes.pybuffer.buf = NULL; __pyx_pybuffer_minutes.refcount = 0; __pyx_pybuffernd_minutes.data = NULL; __pyx_pybuffernd_minutes.rcbuffer = &__pyx_pybuffer_minutes; __pyx_pybuffer_seconds.pybuffer.buf = NULL; __pyx_pybuffer_seconds.refcount = 0; __pyx_pybuffernd_seconds.data = NULL; __pyx_pybuffernd_seconds.rcbuffer = &__pyx_pybuffer_seconds; __pyx_pybuffer_mus.pybuffer.buf = NULL; __pyx_pybuffer_mus.refcount = 0; __pyx_pybuffernd_mus.data = NULL; __pyx_pybuffernd_mus.rcbuffer = &__pyx_pybuffer_mus; __pyx_pybuffer_dtindex.pybuffer.buf = NULL; __pyx_pybuffer_dtindex.refcount = 0; __pyx_pybuffernd_dtindex.data = NULL; __pyx_pybuffernd_dtindex.rcbuffer = &__pyx_pybuffer_dtindex; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_dtindex.rcbuffer->pybuffer, (PyObject*)__pyx_v_dtindex, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2028; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_dtindex.diminfo[0].strides = __pyx_pybuffernd_dtindex.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_dtindex.diminfo[0].shape = __pyx_pybuffernd_dtindex.rcbuffer->pybuffer.shape[0]; /* "pandas/tslib.pyx":2033 * ''' * cdef: * Py_ssize_t i, count = 0 # <<<<<<<<<<<<<< * int isleap * pandas_datetimestruct dts */ __pyx_v_count = 0; /* "pandas/tslib.pyx":2038 * ndarray[int32_t] years, months, days, hours, minutes, seconds, mus * * count = len(dtindex) # <<<<<<<<<<<<<< * * sa_dtype = [('Y', 'i4'), # year */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_dtindex)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2038; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_count = __pyx_t_1; /* "pandas/tslib.pyx":2046 * ('m', 'i4'), # min * ('s', 'i4'), # second * ('u', 'i4')] # microsecond # <<<<<<<<<<<<<< * * out = np.empty(count, dtype=sa_dtype) */ __pyx_t_2 = PyList_New(7); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2040; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(((PyObject *)__pyx_k_tuple_111)); PyList_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_k_tuple_111)); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_111)); __Pyx_INCREF(((PyObject *)__pyx_k_tuple_112)); PyList_SET_ITEM(__pyx_t_2, 1, ((PyObject *)__pyx_k_tuple_112)); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_112)); __Pyx_INCREF(((PyObject *)__pyx_k_tuple_113)); PyList_SET_ITEM(__pyx_t_2, 2, ((PyObject *)__pyx_k_tuple_113)); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_113)); __Pyx_INCREF(((PyObject *)__pyx_k_tuple_114)); PyList_SET_ITEM(__pyx_t_2, 3, ((PyObject *)__pyx_k_tuple_114)); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_114)); __Pyx_INCREF(((PyObject *)__pyx_k_tuple_115)); PyList_SET_ITEM(__pyx_t_2, 4, ((PyObject *)__pyx_k_tuple_115)); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_115)); __Pyx_INCREF(((PyObject *)__pyx_k_tuple_116)); PyList_SET_ITEM(__pyx_t_2, 5, ((PyObject *)__pyx_k_tuple_116)); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_116)); __Pyx_INCREF(((PyObject *)__pyx_k_tuple_117)); PyList_SET_ITEM(__pyx_t_2, 6, ((PyObject *)__pyx_k_tuple_117)); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_117)); __pyx_v_sa_dtype = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; /* "pandas/tslib.pyx":2048 * ('u', 'i4')] # microsecond * * out = np.empty(count, dtype=sa_dtype) # <<<<<<<<<<<<<< * * years = out['Y'] */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2048; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 2048; __pyx_clineno = __LINE__; goto __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_count); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2048; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2048; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2048; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_2)); if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__dtype), ((PyObject *)__pyx_v_sa_dtype)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2048; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_5 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2048; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __pyx_v_out = __pyx_t_5; __pyx_t_5 = 0; /* "pandas/tslib.pyx":2050 * out = np.empty(count, dtype=sa_dtype) * * years = out['Y'] # <<<<<<<<<<<<<< * months = out['M'] * days = out['D'] */ __pyx_t_5 = PyObject_GetItem(__pyx_v_out, ((PyObject *)__pyx_n_s__Y)); if (!__pyx_t_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2050; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2050; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_6 = ((PyArrayObject *)__pyx_t_5); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_years.rcbuffer->pybuffer); __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_years.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_years.rcbuffer->pybuffer, (PyObject*)__pyx_v_years, &__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_pybuffernd_years.diminfo[0].strides = __pyx_pybuffernd_years.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_years.diminfo[0].shape = __pyx_pybuffernd_years.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2050; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_6 = 0; __pyx_v_years = ((PyArrayObject *)__pyx_t_5); __pyx_t_5 = 0; /* "pandas/tslib.pyx":2051 * * years = out['Y'] * months = out['M'] # <<<<<<<<<<<<<< * days = out['D'] * hours = out['h'] */ __pyx_t_5 = PyObject_GetItem(__pyx_v_out, ((PyObject *)__pyx_n_s__M)); if (!__pyx_t_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2051; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2051; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_6 = ((PyArrayObject *)__pyx_t_5); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_months.rcbuffer->pybuffer); __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_months.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_10, &__pyx_t_9, &__pyx_t_8); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_months.rcbuffer->pybuffer, (PyObject*)__pyx_v_months, &__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_pybuffernd_months.diminfo[0].strides = __pyx_pybuffernd_months.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_months.diminfo[0].shape = __pyx_pybuffernd_months.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2051; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_6 = 0; __pyx_v_months = ((PyArrayObject *)__pyx_t_5); __pyx_t_5 = 0; /* "pandas/tslib.pyx":2052 * years = out['Y'] * months = out['M'] * days = out['D'] # <<<<<<<<<<<<<< * hours = out['h'] * minutes = out['m'] */ __pyx_t_5 = PyObject_GetItem(__pyx_v_out, ((PyObject *)__pyx_n_s__D)); if (!__pyx_t_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2052; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2052; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_6 = ((PyArrayObject *)__pyx_t_5); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_days.rcbuffer->pybuffer); __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_days.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_days.rcbuffer->pybuffer, (PyObject*)__pyx_v_days, &__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_pybuffernd_days.diminfo[0].strides = __pyx_pybuffernd_days.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_days.diminfo[0].shape = __pyx_pybuffernd_days.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2052; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_6 = 0; __pyx_v_days = ((PyArrayObject *)__pyx_t_5); __pyx_t_5 = 0; /* "pandas/tslib.pyx":2053 * months = out['M'] * days = out['D'] * hours = out['h'] # <<<<<<<<<<<<<< * minutes = out['m'] * seconds = out['s'] */ __pyx_t_5 = PyObject_GetItem(__pyx_v_out, ((PyObject *)__pyx_n_s__h)); if (!__pyx_t_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2053; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2053; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_6 = ((PyArrayObject *)__pyx_t_5); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_hours.rcbuffer->pybuffer); __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_hours.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_10, &__pyx_t_9, &__pyx_t_8); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_hours.rcbuffer->pybuffer, (PyObject*)__pyx_v_hours, &__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_pybuffernd_hours.diminfo[0].strides = __pyx_pybuffernd_hours.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_hours.diminfo[0].shape = __pyx_pybuffernd_hours.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2053; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_6 = 0; __pyx_v_hours = ((PyArrayObject *)__pyx_t_5); __pyx_t_5 = 0; /* "pandas/tslib.pyx":2054 * days = out['D'] * hours = out['h'] * minutes = out['m'] # <<<<<<<<<<<<<< * seconds = out['s'] * mus = out['u'] */ __pyx_t_5 = PyObject_GetItem(__pyx_v_out, ((PyObject *)__pyx_n_s__m)); if (!__pyx_t_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2054; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2054; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_6 = ((PyArrayObject *)__pyx_t_5); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_minutes.rcbuffer->pybuffer); __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_minutes.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_minutes.rcbuffer->pybuffer, (PyObject*)__pyx_v_minutes, &__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_pybuffernd_minutes.diminfo[0].strides = __pyx_pybuffernd_minutes.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_minutes.diminfo[0].shape = __pyx_pybuffernd_minutes.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2054; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_6 = 0; __pyx_v_minutes = ((PyArrayObject *)__pyx_t_5); __pyx_t_5 = 0; /* "pandas/tslib.pyx":2055 * hours = out['h'] * minutes = out['m'] * seconds = out['s'] # <<<<<<<<<<<<<< * mus = out['u'] * */ __pyx_t_5 = PyObject_GetItem(__pyx_v_out, ((PyObject *)__pyx_n_s__s)); if (!__pyx_t_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2055; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2055; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_6 = ((PyArrayObject *)__pyx_t_5); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_seconds.rcbuffer->pybuffer); __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_seconds.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_10, &__pyx_t_9, &__pyx_t_8); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_seconds.rcbuffer->pybuffer, (PyObject*)__pyx_v_seconds, &__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_pybuffernd_seconds.diminfo[0].strides = __pyx_pybuffernd_seconds.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_seconds.diminfo[0].shape = __pyx_pybuffernd_seconds.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2055; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_6 = 0; __pyx_v_seconds = ((PyArrayObject *)__pyx_t_5); __pyx_t_5 = 0; /* "pandas/tslib.pyx":2056 * minutes = out['m'] * seconds = out['s'] * mus = out['u'] # <<<<<<<<<<<<<< * * for i in range(count): */ __pyx_t_5 = PyObject_GetItem(__pyx_v_out, ((PyObject *)__pyx_n_s__u)); if (!__pyx_t_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2056; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2056; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_6 = ((PyArrayObject *)__pyx_t_5); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_mus.rcbuffer->pybuffer); __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_mus.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_mus.rcbuffer->pybuffer, (PyObject*)__pyx_v_mus, &__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_pybuffernd_mus.diminfo[0].strides = __pyx_pybuffernd_mus.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_mus.diminfo[0].shape = __pyx_pybuffernd_mus.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2056; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_6 = 0; __pyx_v_mus = ((PyArrayObject *)__pyx_t_5); __pyx_t_5 = 0; /* "pandas/tslib.pyx":2058 * mus = out['u'] * * for i in range(count): # <<<<<<<<<<<<<< * pandas_datetime_to_datetimestruct(dtindex[i], PANDAS_FR_ns, &dts) * years[i] = dts.year */ __pyx_t_1 = __pyx_v_count; for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_1; __pyx_t_11+=1) { __pyx_v_i = __pyx_t_11; /* "pandas/tslib.pyx":2059 * * for i in range(count): * pandas_datetime_to_datetimestruct(dtindex[i], PANDAS_FR_ns, &dts) # <<<<<<<<<<<<<< * years[i] = dts.year * months[i] = dts.month */ __pyx_t_12 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_12 < 0) { __pyx_t_12 += __pyx_pybuffernd_dtindex.diminfo[0].shape; if (unlikely(__pyx_t_12 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_12 >= __pyx_pybuffernd_dtindex.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2059; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } pandas_datetime_to_datetimestruct((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_dtindex.rcbuffer->pybuffer.buf, __pyx_t_12, __pyx_pybuffernd_dtindex.diminfo[0].strides)), PANDAS_FR_ns, (&__pyx_v_dts)); /* "pandas/tslib.pyx":2060 * for i in range(count): * pandas_datetime_to_datetimestruct(dtindex[i], PANDAS_FR_ns, &dts) * years[i] = dts.year # <<<<<<<<<<<<<< * months[i] = dts.month * days[i] = dts.day */ __pyx_t_13 = __pyx_v_dts.year; __pyx_t_14 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_14 < 0) { __pyx_t_14 += __pyx_pybuffernd_years.diminfo[0].shape; if (unlikely(__pyx_t_14 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_14 >= __pyx_pybuffernd_years.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2060; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_years.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_years.diminfo[0].strides) = __pyx_t_13; /* "pandas/tslib.pyx":2061 * pandas_datetime_to_datetimestruct(dtindex[i], PANDAS_FR_ns, &dts) * years[i] = dts.year * months[i] = dts.month # <<<<<<<<<<<<<< * days[i] = dts.day * hours[i] = dts.hour */ __pyx_t_15 = __pyx_v_dts.month; __pyx_t_16 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_16 < 0) { __pyx_t_16 += __pyx_pybuffernd_months.diminfo[0].shape; if (unlikely(__pyx_t_16 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_16 >= __pyx_pybuffernd_months.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2061; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_months.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_months.diminfo[0].strides) = __pyx_t_15; /* "pandas/tslib.pyx":2062 * years[i] = dts.year * months[i] = dts.month * days[i] = dts.day # <<<<<<<<<<<<<< * hours[i] = dts.hour * minutes[i] = dts.min */ __pyx_t_15 = __pyx_v_dts.day; __pyx_t_17 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_17 < 0) { __pyx_t_17 += __pyx_pybuffernd_days.diminfo[0].shape; if (unlikely(__pyx_t_17 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_17 >= __pyx_pybuffernd_days.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2062; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_days.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_days.diminfo[0].strides) = __pyx_t_15; /* "pandas/tslib.pyx":2063 * months[i] = dts.month * days[i] = dts.day * hours[i] = dts.hour # <<<<<<<<<<<<<< * minutes[i] = dts.min * seconds[i] = dts.sec */ __pyx_t_15 = __pyx_v_dts.hour; __pyx_t_18 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_18 < 0) { __pyx_t_18 += __pyx_pybuffernd_hours.diminfo[0].shape; if (unlikely(__pyx_t_18 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_18 >= __pyx_pybuffernd_hours.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2063; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_hours.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_hours.diminfo[0].strides) = __pyx_t_15; /* "pandas/tslib.pyx":2064 * days[i] = dts.day * hours[i] = dts.hour * minutes[i] = dts.min # <<<<<<<<<<<<<< * seconds[i] = dts.sec * mus[i] = dts.us */ __pyx_t_15 = __pyx_v_dts.min; __pyx_t_19 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_19 < 0) { __pyx_t_19 += __pyx_pybuffernd_minutes.diminfo[0].shape; if (unlikely(__pyx_t_19 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_19 >= __pyx_pybuffernd_minutes.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2064; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_minutes.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_minutes.diminfo[0].strides) = __pyx_t_15; /* "pandas/tslib.pyx":2065 * hours[i] = dts.hour * minutes[i] = dts.min * seconds[i] = dts.sec # <<<<<<<<<<<<<< * mus[i] = dts.us * */ __pyx_t_15 = __pyx_v_dts.sec; __pyx_t_20 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_20 < 0) { __pyx_t_20 += __pyx_pybuffernd_seconds.diminfo[0].shape; if (unlikely(__pyx_t_20 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_20 >= __pyx_pybuffernd_seconds.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2065; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_seconds.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_seconds.diminfo[0].strides) = __pyx_t_15; /* "pandas/tslib.pyx":2066 * minutes[i] = dts.min * seconds[i] = dts.sec * mus[i] = dts.us # <<<<<<<<<<<<<< * * return out */ __pyx_t_15 = __pyx_v_dts.us; __pyx_t_21 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_21 < 0) { __pyx_t_21 += __pyx_pybuffernd_mus.diminfo[0].shape; if (unlikely(__pyx_t_21 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_21 >= __pyx_pybuffernd_mus.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2066; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_mus.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_mus.diminfo[0].strides) = __pyx_t_15; } /* "pandas/tslib.pyx":2068 * mus[i] = dts.us * * return out # <<<<<<<<<<<<<< * * def get_time_micros(ndarray[int64_t] dtindex): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_out); __pyx_r = __pyx_v_out; goto __pyx_L0; __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_XDECREF(__pyx_t_5); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_days.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_dtindex.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_hours.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_minutes.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_months.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_mus.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_seconds.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_years.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.tslib.build_field_sarray", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_days.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_dtindex.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_hours.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_minutes.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_months.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_mus.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_seconds.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_years.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_years); __Pyx_XDECREF((PyObject *)__pyx_v_months); __Pyx_XDECREF((PyObject *)__pyx_v_days); __Pyx_XDECREF((PyObject *)__pyx_v_hours); __Pyx_XDECREF((PyObject *)__pyx_v_minutes); __Pyx_XDECREF((PyObject *)__pyx_v_seconds); __Pyx_XDECREF((PyObject *)__pyx_v_mus); __Pyx_XDECREF(__pyx_v_sa_dtype); __Pyx_XDECREF(__pyx_v_out); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5tslib_61get_time_micros(PyObject *__pyx_self, PyObject *__pyx_v_dtindex); /*proto*/ static char __pyx_doc_6pandas_5tslib_60get_time_micros[] = "\n Datetime as int64 representation to a structured array of fields\n "; static PyMethodDef __pyx_mdef_6pandas_5tslib_61get_time_micros = {__Pyx_NAMESTR("get_time_micros"), (PyCFunction)__pyx_pw_6pandas_5tslib_61get_time_micros, METH_O, __Pyx_DOCSTR(__pyx_doc_6pandas_5tslib_60get_time_micros)}; static PyObject *__pyx_pw_6pandas_5tslib_61get_time_micros(PyObject *__pyx_self, PyObject *__pyx_v_dtindex) { CYTHON_UNUSED int __pyx_lineno = 0; CYTHON_UNUSED const char *__pyx_filename = NULL; CYTHON_UNUSED int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("get_time_micros (wrapper)", 0); if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dtindex), __pyx_ptype_5numpy_ndarray, 1, "dtindex", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2070; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5tslib_60get_time_micros(__pyx_self, ((PyArrayObject *)__pyx_v_dtindex)); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/tslib.pyx":2070 * return out * * def get_time_micros(ndarray[int64_t] dtindex): # <<<<<<<<<<<<<< * ''' * Datetime as int64 representation to a structured array of fields */ static PyObject *__pyx_pf_6pandas_5tslib_60get_time_micros(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_dtindex) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_n; pandas_datetimestruct __pyx_v_dts; PyArrayObject *__pyx_v_micros = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_dtindex; __Pyx_Buffer __pyx_pybuffer_dtindex; __Pyx_LocalBuf_ND __pyx_pybuffernd_micros; __Pyx_Buffer __pyx_pybuffer_micros; 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_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_time_micros", 0); __pyx_pybuffer_micros.pybuffer.buf = NULL; __pyx_pybuffer_micros.refcount = 0; __pyx_pybuffernd_micros.data = NULL; __pyx_pybuffernd_micros.rcbuffer = &__pyx_pybuffer_micros; __pyx_pybuffer_dtindex.pybuffer.buf = NULL; __pyx_pybuffer_dtindex.refcount = 0; __pyx_pybuffernd_dtindex.data = NULL; __pyx_pybuffernd_dtindex.rcbuffer = &__pyx_pybuffer_dtindex; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_dtindex.rcbuffer->pybuffer, (PyObject*)__pyx_v_dtindex, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2070; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_dtindex.diminfo[0].strides = __pyx_pybuffernd_dtindex.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_dtindex.diminfo[0].shape = __pyx_pybuffernd_dtindex.rcbuffer->pybuffer.shape[0]; /* "pandas/tslib.pyx":2075 * ''' * cdef: * Py_ssize_t i, n = len(dtindex) # <<<<<<<<<<<<<< * pandas_datetimestruct dts * ndarray[int64_t] micros */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_dtindex)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2075; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/tslib.pyx":2079 * ndarray[int64_t] micros * * micros = np.empty(n, dtype=np.int64) # <<<<<<<<<<<<<< * * for i in range(n): */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2079; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 2079; __pyx_clineno = __LINE__; goto __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_n); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2079; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2079; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2079; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_2)); __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2079; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s__int64); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2079; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__dtype), __pyx_t_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2079; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2079; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __Pyx_DECREF(((PyObject *)__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_filename = __pyx_f[0]; __pyx_lineno = 2079; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_7 = ((PyArrayObject *)__pyx_t_6); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_micros.rcbuffer->pybuffer); __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_micros.rcbuffer->pybuffer, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_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_micros.rcbuffer->pybuffer, (PyObject*)__pyx_v_micros, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_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_pybuffernd_micros.diminfo[0].strides = __pyx_pybuffernd_micros.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_micros.diminfo[0].shape = __pyx_pybuffernd_micros.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2079; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_7 = 0; __pyx_v_micros = ((PyArrayObject *)__pyx_t_6); __pyx_t_6 = 0; /* "pandas/tslib.pyx":2081 * micros = np.empty(n, dtype=np.int64) * * for i in range(n): # <<<<<<<<<<<<<< * pandas_datetime_to_datetimestruct(dtindex[i], PANDAS_FR_ns, &dts) * micros[i] = 1000000LL * (dts.hour * 60 * 60 + */ __pyx_t_1 = __pyx_v_n; for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_1; __pyx_t_12+=1) { __pyx_v_i = __pyx_t_12; /* "pandas/tslib.pyx":2082 * * for i in range(n): * pandas_datetime_to_datetimestruct(dtindex[i], PANDAS_FR_ns, &dts) # <<<<<<<<<<<<<< * micros[i] = 1000000LL * (dts.hour * 60 * 60 + * 60 * dts.min + dts.sec) + dts.us */ __pyx_t_13 = __pyx_v_i; __pyx_t_8 = -1; if (__pyx_t_13 < 0) { __pyx_t_13 += __pyx_pybuffernd_dtindex.diminfo[0].shape; if (unlikely(__pyx_t_13 < 0)) __pyx_t_8 = 0; } else if (unlikely(__pyx_t_13 >= __pyx_pybuffernd_dtindex.diminfo[0].shape)) __pyx_t_8 = 0; if (unlikely(__pyx_t_8 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_8); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2082; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } pandas_datetime_to_datetimestruct((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_dtindex.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_dtindex.diminfo[0].strides)), PANDAS_FR_ns, (&__pyx_v_dts)); /* "pandas/tslib.pyx":2083 * for i in range(n): * pandas_datetime_to_datetimestruct(dtindex[i], PANDAS_FR_ns, &dts) * micros[i] = 1000000LL * (dts.hour * 60 * 60 + # <<<<<<<<<<<<<< * 60 * dts.min + dts.sec) + dts.us * */ __pyx_t_14 = __pyx_v_i; __pyx_t_8 = -1; if (__pyx_t_14 < 0) { __pyx_t_14 += __pyx_pybuffernd_micros.diminfo[0].shape; if (unlikely(__pyx_t_14 < 0)) __pyx_t_8 = 0; } else if (unlikely(__pyx_t_14 >= __pyx_pybuffernd_micros.diminfo[0].shape)) __pyx_t_8 = 0; if (unlikely(__pyx_t_8 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_8); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2083; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_micros.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_micros.diminfo[0].strides) = ((1000000LL * ((((__pyx_v_dts.hour * 60) * 60) + (60 * __pyx_v_dts.min)) + __pyx_v_dts.sec)) + __pyx_v_dts.us); } /* "pandas/tslib.pyx":2086 * 60 * dts.min + dts.sec) + dts.us * * return micros # <<<<<<<<<<<<<< * * @cython.wraparound(False) */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_micros)); __pyx_r = ((PyObject *)__pyx_v_micros); goto __pyx_L0; __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_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_dtindex.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_micros.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.tslib.get_time_micros", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_dtindex.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_micros.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_micros); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5tslib_63get_date_field(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6pandas_5tslib_62get_date_field[] = "\n Given a int64-based datetime index, extract the year, month, etc.,\n field and return an array of these values.\n "; static PyMethodDef __pyx_mdef_6pandas_5tslib_63get_date_field = {__Pyx_NAMESTR("get_date_field"), (PyCFunction)__pyx_pw_6pandas_5tslib_63get_date_field, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_5tslib_62get_date_field)}; static PyObject *__pyx_pw_6pandas_5tslib_63get_date_field(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_dtindex = 0; PyObject *__pyx_v_field = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("get_date_field (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__dtindex,&__pyx_n_s__field,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__dtindex)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__field)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("get_date_field", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2089; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "get_date_field") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2089; __pyx_clineno = __LINE__; goto __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_dtindex = ((PyArrayObject *)values[0]); __pyx_v_field = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("get_date_field", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2089; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.tslib.get_date_field", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dtindex), __pyx_ptype_5numpy_ndarray, 1, "dtindex", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2089; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5tslib_62get_date_field(__pyx_self, __pyx_v_dtindex, __pyx_v_field); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/tslib.pyx":2089 * * @cython.wraparound(False) * def get_date_field(ndarray[int64_t] dtindex, object field): # <<<<<<<<<<<<<< * ''' * Given a int64-based datetime index, extract the year, month, etc., */ static PyObject *__pyx_pf_6pandas_5tslib_62get_date_field(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_dtindex, PyObject *__pyx_v_field) { struct __pyx_obj_6pandas_5tslib__TSObject *__pyx_v_ts = 0; Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_count; PyArrayObject *__pyx_v_out = 0; PyArrayObject *__pyx_v__month_offset = 0; int __pyx_v_isleap; int __pyx_v_isleap_prev; pandas_datetimestruct __pyx_v_dts; int __pyx_v_mo_off; int __pyx_v_doy; int __pyx_v_dow; int __pyx_v_woy; __Pyx_LocalBuf_ND __pyx_pybuffernd__month_offset; __Pyx_Buffer __pyx_pybuffer__month_offset; __Pyx_LocalBuf_ND __pyx_pybuffernd_dtindex; __Pyx_Buffer __pyx_pybuffer_dtindex; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; 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; Py_ssize_t __pyx_t_11; PyArrayObject *__pyx_t_12 = NULL; int __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; npy_int64 __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; npy_int32 __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; Py_ssize_t __pyx_t_37; Py_ssize_t __pyx_t_38; Py_ssize_t __pyx_t_39; Py_ssize_t __pyx_t_40; Py_ssize_t __pyx_t_41; Py_ssize_t __pyx_t_42; Py_ssize_t __pyx_t_43; Py_ssize_t __pyx_t_44; Py_ssize_t __pyx_t_45; Py_ssize_t __pyx_t_46; Py_ssize_t __pyx_t_47; Py_ssize_t __pyx_t_48; Py_ssize_t __pyx_t_49; Py_ssize_t __pyx_t_50; Py_ssize_t __pyx_t_51; long __pyx_t_52; int __pyx_t_53; Py_ssize_t __pyx_t_54; Py_ssize_t __pyx_t_55; Py_ssize_t __pyx_t_56; Py_ssize_t __pyx_t_57; Py_ssize_t __pyx_t_58; Py_ssize_t __pyx_t_59; Py_ssize_t __pyx_t_60; Py_ssize_t __pyx_t_61; Py_ssize_t __pyx_t_62; long __pyx_t_63; int __pyx_t_64; int __pyx_t_65; int __pyx_t_66; Py_ssize_t __pyx_t_67; Py_ssize_t __pyx_t_68; Py_ssize_t __pyx_t_69; Py_ssize_t __pyx_t_70; Py_ssize_t __pyx_t_71; Py_ssize_t __pyx_t_72; Py_ssize_t __pyx_t_73; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_date_field", 0); __pyx_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; __pyx_pybuffer__month_offset.pybuffer.buf = NULL; __pyx_pybuffer__month_offset.refcount = 0; __pyx_pybuffernd__month_offset.data = NULL; __pyx_pybuffernd__month_offset.rcbuffer = &__pyx_pybuffer__month_offset; __pyx_pybuffer_dtindex.pybuffer.buf = NULL; __pyx_pybuffer_dtindex.refcount = 0; __pyx_pybuffernd_dtindex.data = NULL; __pyx_pybuffernd_dtindex.rcbuffer = &__pyx_pybuffer_dtindex; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_dtindex.rcbuffer->pybuffer, (PyObject*)__pyx_v_dtindex, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2089; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_dtindex.diminfo[0].strides = __pyx_pybuffernd_dtindex.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_dtindex.diminfo[0].shape = __pyx_pybuffernd_dtindex.rcbuffer->pybuffer.shape[0]; /* "pandas/tslib.pyx":2096 * cdef: * _TSObject ts * Py_ssize_t i, count = 0 # <<<<<<<<<<<<<< * ndarray[int32_t] out * ndarray[int32_t, ndim=2] _month_offset */ __pyx_v_count = 0; /* "pandas/tslib.pyx":2103 * int mo_off, doy, dow, woy * * _month_offset = np.array( # <<<<<<<<<<<<<< * [[ 0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334, 365 ], * [ 0, 31, 60, 91, 121, 152, 182, 213, 244, 274, 305, 335, 366 ]], */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2103; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s__array); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2103; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pandas/tslib.pyx":2104 * * _month_offset = np.array( * [[ 0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334, 365 ], # <<<<<<<<<<<<<< * [ 0, 31, 60, 91, 121, 152, 182, 213, 244, 274, 305, 335, 366 ]], * dtype=np.int32 ) */ __pyx_t_1 = PyList_New(13); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2104; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_int_0); PyList_SET_ITEM(__pyx_t_1, 0, __pyx_int_0); __Pyx_GIVEREF(__pyx_int_0); __Pyx_INCREF(__pyx_int_31); PyList_SET_ITEM(__pyx_t_1, 1, __pyx_int_31); __Pyx_GIVEREF(__pyx_int_31); __Pyx_INCREF(__pyx_int_59); PyList_SET_ITEM(__pyx_t_1, 2, __pyx_int_59); __Pyx_GIVEREF(__pyx_int_59); __Pyx_INCREF(__pyx_int_90); PyList_SET_ITEM(__pyx_t_1, 3, __pyx_int_90); __Pyx_GIVEREF(__pyx_int_90); __Pyx_INCREF(__pyx_int_120); PyList_SET_ITEM(__pyx_t_1, 4, __pyx_int_120); __Pyx_GIVEREF(__pyx_int_120); __Pyx_INCREF(__pyx_int_151); PyList_SET_ITEM(__pyx_t_1, 5, __pyx_int_151); __Pyx_GIVEREF(__pyx_int_151); __Pyx_INCREF(__pyx_int_181); PyList_SET_ITEM(__pyx_t_1, 6, __pyx_int_181); __Pyx_GIVEREF(__pyx_int_181); __Pyx_INCREF(__pyx_int_212); PyList_SET_ITEM(__pyx_t_1, 7, __pyx_int_212); __Pyx_GIVEREF(__pyx_int_212); __Pyx_INCREF(__pyx_int_243); PyList_SET_ITEM(__pyx_t_1, 8, __pyx_int_243); __Pyx_GIVEREF(__pyx_int_243); __Pyx_INCREF(__pyx_int_273); PyList_SET_ITEM(__pyx_t_1, 9, __pyx_int_273); __Pyx_GIVEREF(__pyx_int_273); __Pyx_INCREF(__pyx_int_304); PyList_SET_ITEM(__pyx_t_1, 10, __pyx_int_304); __Pyx_GIVEREF(__pyx_int_304); __Pyx_INCREF(__pyx_int_334); PyList_SET_ITEM(__pyx_t_1, 11, __pyx_int_334); __Pyx_GIVEREF(__pyx_int_334); __Pyx_INCREF(__pyx_int_365); PyList_SET_ITEM(__pyx_t_1, 12, __pyx_int_365); __Pyx_GIVEREF(__pyx_int_365); /* "pandas/tslib.pyx":2105 * _month_offset = np.array( * [[ 0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334, 365 ], * [ 0, 31, 60, 91, 121, 152, 182, 213, 244, 274, 305, 335, 366 ]], # <<<<<<<<<<<<<< * dtype=np.int32 ) * */ __pyx_t_3 = PyList_New(13); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2105; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_int_0); PyList_SET_ITEM(__pyx_t_3, 0, __pyx_int_0); __Pyx_GIVEREF(__pyx_int_0); __Pyx_INCREF(__pyx_int_31); PyList_SET_ITEM(__pyx_t_3, 1, __pyx_int_31); __Pyx_GIVEREF(__pyx_int_31); __Pyx_INCREF(__pyx_int_60); PyList_SET_ITEM(__pyx_t_3, 2, __pyx_int_60); __Pyx_GIVEREF(__pyx_int_60); __Pyx_INCREF(__pyx_int_91); PyList_SET_ITEM(__pyx_t_3, 3, __pyx_int_91); __Pyx_GIVEREF(__pyx_int_91); __Pyx_INCREF(__pyx_int_121); PyList_SET_ITEM(__pyx_t_3, 4, __pyx_int_121); __Pyx_GIVEREF(__pyx_int_121); __Pyx_INCREF(__pyx_int_152); PyList_SET_ITEM(__pyx_t_3, 5, __pyx_int_152); __Pyx_GIVEREF(__pyx_int_152); __Pyx_INCREF(__pyx_int_182); PyList_SET_ITEM(__pyx_t_3, 6, __pyx_int_182); __Pyx_GIVEREF(__pyx_int_182); __Pyx_INCREF(__pyx_int_213); PyList_SET_ITEM(__pyx_t_3, 7, __pyx_int_213); __Pyx_GIVEREF(__pyx_int_213); __Pyx_INCREF(__pyx_int_244); PyList_SET_ITEM(__pyx_t_3, 8, __pyx_int_244); __Pyx_GIVEREF(__pyx_int_244); __Pyx_INCREF(__pyx_int_274); PyList_SET_ITEM(__pyx_t_3, 9, __pyx_int_274); __Pyx_GIVEREF(__pyx_int_274); __Pyx_INCREF(__pyx_int_305); PyList_SET_ITEM(__pyx_t_3, 10, __pyx_int_305); __Pyx_GIVEREF(__pyx_int_305); __Pyx_INCREF(__pyx_int_335); PyList_SET_ITEM(__pyx_t_3, 11, __pyx_int_335); __Pyx_GIVEREF(__pyx_int_335); __Pyx_INCREF(__pyx_int_366); PyList_SET_ITEM(__pyx_t_3, 12, __pyx_int_366); __Pyx_GIVEREF(__pyx_int_366); __pyx_t_4 = PyList_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2104; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyList_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_t_1)); __Pyx_GIVEREF(((PyObject *)__pyx_t_1)); PyList_SET_ITEM(__pyx_t_4, 1, ((PyObject *)__pyx_t_3)); __Pyx_GIVEREF(((PyObject *)__pyx_t_3)); __pyx_t_1 = 0; __pyx_t_3 = 0; __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2103; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_t_4)); __Pyx_GIVEREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; /* "pandas/tslib.pyx":2103 * int mo_off, doy, dow, woy * * _month_offset = np.array( # <<<<<<<<<<<<<< * [[ 0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334, 365 ], * [ 0, 31, 60, 91, 121, 152, 182, 213, 244, 274, 305, 335, 366 ]], */ __pyx_t_4 = PyDict_New(); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2103; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_4)); /* "pandas/tslib.pyx":2106 * [[ 0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334, 365 ], * [ 0, 31, 60, 91, 121, 152, 182, 213, 244, 274, 305, 335, 366 ]], * dtype=np.int32 ) # <<<<<<<<<<<<<< * * count = len(dtindex) */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2106; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 2106; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (PyDict_SetItem(__pyx_t_4, ((PyObject *)__pyx_n_s__dtype), __pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2103; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_3), ((PyObject *)__pyx_t_4)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2103; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__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_filename = __pyx_f[0]; __pyx_lineno = 2103; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_6 = ((PyArrayObject *)__pyx_t_5); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd__month_offset.rcbuffer->pybuffer); __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd__month_offset.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 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__month_offset.rcbuffer->pybuffer, (PyObject*)__pyx_v__month_offset, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 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_pybuffernd__month_offset.diminfo[0].strides = __pyx_pybuffernd__month_offset.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd__month_offset.diminfo[0].shape = __pyx_pybuffernd__month_offset.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd__month_offset.diminfo[1].strides = __pyx_pybuffernd__month_offset.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd__month_offset.diminfo[1].shape = __pyx_pybuffernd__month_offset.rcbuffer->pybuffer.shape[1]; if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2103; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_6 = 0; __pyx_v__month_offset = ((PyArrayObject *)__pyx_t_5); __pyx_t_5 = 0; /* "pandas/tslib.pyx":2108 * dtype=np.int32 ) * * count = len(dtindex) # <<<<<<<<<<<<<< * out = np.empty(count, dtype='i4') * */ __pyx_t_11 = PyObject_Length(((PyObject *)__pyx_v_dtindex)); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2108; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_count = __pyx_t_11; /* "pandas/tslib.pyx":2109 * * count = len(dtindex) * out = np.empty(count, dtype='i4') # <<<<<<<<<<<<<< * * if field == 'Y': */ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2109; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s__empty); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2109; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyInt_FromSsize_t(__pyx_v_count); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2109; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2109; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyDict_New(); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2109; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_5)); if (PyDict_SetItem(__pyx_t_5, ((PyObject *)__pyx_n_s__dtype), ((PyObject *)__pyx_n_s__i4)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2109; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_2 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_3), ((PyObject *)__pyx_t_5)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2109; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2109; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_12 = ((PyArrayObject *)__pyx_t_2); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_t_12, &__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.rcbuffer->pybuffer, (PyObject*)__pyx_v_out, &__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_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_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2109; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_12 = 0; __pyx_v_out = ((PyArrayObject *)__pyx_t_2); __pyx_t_2 = 0; /* "pandas/tslib.pyx":2111 * out = np.empty(count, dtype='i4') * * if field == 'Y': # <<<<<<<<<<<<<< * for i in range(count): * if dtindex[i] == NPY_NAT: out[i] = -1; continue */ __pyx_t_2 = PyObject_RichCompare(__pyx_v_field, ((PyObject *)__pyx_n_s__Y), Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2111; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_13 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2111; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_13) { /* "pandas/tslib.pyx":2112 * * if field == 'Y': * for i in range(count): # <<<<<<<<<<<<<< * if dtindex[i] == NPY_NAT: out[i] = -1; continue * */ __pyx_t_11 = __pyx_v_count; for (__pyx_t_14 = 0; __pyx_t_14 < __pyx_t_11; __pyx_t_14+=1) { __pyx_v_i = __pyx_t_14; /* "pandas/tslib.pyx":2113 * if field == 'Y': * for i in range(count): * if dtindex[i] == NPY_NAT: out[i] = -1; continue # <<<<<<<<<<<<<< * * pandas_datetime_to_datetimestruct(dtindex[i], PANDAS_FR_ns, &dts) */ __pyx_t_15 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_15 < 0) { __pyx_t_7 = 0; } else if (unlikely(__pyx_t_15 >= __pyx_pybuffernd_dtindex.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2113; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_13 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_dtindex.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_dtindex.diminfo[0].strides)) == __pyx_v_6pandas_5tslib_NPY_NAT) != 0); if (__pyx_t_13) { __pyx_t_16 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_16 < 0) { __pyx_t_7 = 0; } else if (unlikely(__pyx_t_16 >= __pyx_pybuffernd_out.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2113; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_out.diminfo[0].strides) = -1; goto __pyx_L4_continue; goto __pyx_L6; } __pyx_L6:; /* "pandas/tslib.pyx":2115 * if dtindex[i] == NPY_NAT: out[i] = -1; continue * * pandas_datetime_to_datetimestruct(dtindex[i], PANDAS_FR_ns, &dts) # <<<<<<<<<<<<<< * out[i] = dts.year * return out */ __pyx_t_17 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_17 < 0) { __pyx_t_7 = 0; } else if (unlikely(__pyx_t_17 >= __pyx_pybuffernd_dtindex.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2115; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } pandas_datetime_to_datetimestruct((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_dtindex.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_dtindex.diminfo[0].strides)), PANDAS_FR_ns, (&__pyx_v_dts)); /* "pandas/tslib.pyx":2116 * * pandas_datetime_to_datetimestruct(dtindex[i], PANDAS_FR_ns, &dts) * out[i] = dts.year # <<<<<<<<<<<<<< * return out * */ __pyx_t_18 = __pyx_v_dts.year; __pyx_t_19 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_19 < 0) { __pyx_t_7 = 0; } else if (unlikely(__pyx_t_19 >= __pyx_pybuffernd_out.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2116; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_out.diminfo[0].strides) = __pyx_t_18; __pyx_L4_continue:; } /* "pandas/tslib.pyx":2117 * pandas_datetime_to_datetimestruct(dtindex[i], PANDAS_FR_ns, &dts) * out[i] = dts.year * return out # <<<<<<<<<<<<<< * * elif field == 'M': */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_out)); __pyx_r = ((PyObject *)__pyx_v_out); goto __pyx_L0; goto __pyx_L3; } /* "pandas/tslib.pyx":2119 * return out * * elif field == 'M': # <<<<<<<<<<<<<< * for i in range(count): * if dtindex[i] == NPY_NAT: out[i] = -1; continue */ __pyx_t_2 = PyObject_RichCompare(__pyx_v_field, ((PyObject *)__pyx_n_s__M), Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2119; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_13 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2119; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_13) { /* "pandas/tslib.pyx":2120 * * elif field == 'M': * for i in range(count): # <<<<<<<<<<<<<< * if dtindex[i] == NPY_NAT: out[i] = -1; continue * */ __pyx_t_11 = __pyx_v_count; for (__pyx_t_14 = 0; __pyx_t_14 < __pyx_t_11; __pyx_t_14+=1) { __pyx_v_i = __pyx_t_14; /* "pandas/tslib.pyx":2121 * elif field == 'M': * for i in range(count): * if dtindex[i] == NPY_NAT: out[i] = -1; continue # <<<<<<<<<<<<<< * * pandas_datetime_to_datetimestruct(dtindex[i], PANDAS_FR_ns, &dts) */ __pyx_t_20 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_20 < 0) { __pyx_t_7 = 0; } else if (unlikely(__pyx_t_20 >= __pyx_pybuffernd_dtindex.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2121; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_13 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_dtindex.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_dtindex.diminfo[0].strides)) == __pyx_v_6pandas_5tslib_NPY_NAT) != 0); if (__pyx_t_13) { __pyx_t_21 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_21 < 0) { __pyx_t_7 = 0; } else if (unlikely(__pyx_t_21 >= __pyx_pybuffernd_out.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2121; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_out.diminfo[0].strides) = -1; goto __pyx_L7_continue; goto __pyx_L9; } __pyx_L9:; /* "pandas/tslib.pyx":2123 * if dtindex[i] == NPY_NAT: out[i] = -1; continue * * pandas_datetime_to_datetimestruct(dtindex[i], PANDAS_FR_ns, &dts) # <<<<<<<<<<<<<< * out[i] = dts.month * return out */ __pyx_t_22 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_22 < 0) { __pyx_t_7 = 0; } else if (unlikely(__pyx_t_22 >= __pyx_pybuffernd_dtindex.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2123; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } pandas_datetime_to_datetimestruct((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_dtindex.rcbuffer->pybuffer.buf, __pyx_t_22, __pyx_pybuffernd_dtindex.diminfo[0].strides)), PANDAS_FR_ns, (&__pyx_v_dts)); /* "pandas/tslib.pyx":2124 * * pandas_datetime_to_datetimestruct(dtindex[i], PANDAS_FR_ns, &dts) * out[i] = dts.month # <<<<<<<<<<<<<< * return out * */ __pyx_t_23 = __pyx_v_dts.month; __pyx_t_24 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_24 < 0) { __pyx_t_7 = 0; } else if (unlikely(__pyx_t_24 >= __pyx_pybuffernd_out.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2124; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_24, __pyx_pybuffernd_out.diminfo[0].strides) = __pyx_t_23; __pyx_L7_continue:; } /* "pandas/tslib.pyx":2125 * pandas_datetime_to_datetimestruct(dtindex[i], PANDAS_FR_ns, &dts) * out[i] = dts.month * return out # <<<<<<<<<<<<<< * * elif field == 'D': */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_out)); __pyx_r = ((PyObject *)__pyx_v_out); goto __pyx_L0; goto __pyx_L3; } /* "pandas/tslib.pyx":2127 * return out * * elif field == 'D': # <<<<<<<<<<<<<< * for i in range(count): * if dtindex[i] == NPY_NAT: out[i] = -1; continue */ __pyx_t_2 = PyObject_RichCompare(__pyx_v_field, ((PyObject *)__pyx_n_s__D), Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2127; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_13 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2127; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_13) { /* "pandas/tslib.pyx":2128 * * elif field == 'D': * for i in range(count): # <<<<<<<<<<<<<< * if dtindex[i] == NPY_NAT: out[i] = -1; continue * */ __pyx_t_11 = __pyx_v_count; for (__pyx_t_14 = 0; __pyx_t_14 < __pyx_t_11; __pyx_t_14+=1) { __pyx_v_i = __pyx_t_14; /* "pandas/tslib.pyx":2129 * elif field == 'D': * for i in range(count): * if dtindex[i] == NPY_NAT: out[i] = -1; continue # <<<<<<<<<<<<<< * * pandas_datetime_to_datetimestruct(dtindex[i], PANDAS_FR_ns, &dts) */ __pyx_t_25 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_25 < 0) { __pyx_t_7 = 0; } else if (unlikely(__pyx_t_25 >= __pyx_pybuffernd_dtindex.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2129; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_13 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_dtindex.rcbuffer->pybuffer.buf, __pyx_t_25, __pyx_pybuffernd_dtindex.diminfo[0].strides)) == __pyx_v_6pandas_5tslib_NPY_NAT) != 0); if (__pyx_t_13) { __pyx_t_26 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_26 < 0) { __pyx_t_7 = 0; } else if (unlikely(__pyx_t_26 >= __pyx_pybuffernd_out.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2129; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_26, __pyx_pybuffernd_out.diminfo[0].strides) = -1; goto __pyx_L10_continue; goto __pyx_L12; } __pyx_L12:; /* "pandas/tslib.pyx":2131 * if dtindex[i] == NPY_NAT: out[i] = -1; continue * * pandas_datetime_to_datetimestruct(dtindex[i], PANDAS_FR_ns, &dts) # <<<<<<<<<<<<<< * out[i] = dts.day * return out */ __pyx_t_27 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_27 < 0) { __pyx_t_7 = 0; } else if (unlikely(__pyx_t_27 >= __pyx_pybuffernd_dtindex.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2131; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } pandas_datetime_to_datetimestruct((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_dtindex.rcbuffer->pybuffer.buf, __pyx_t_27, __pyx_pybuffernd_dtindex.diminfo[0].strides)), PANDAS_FR_ns, (&__pyx_v_dts)); /* "pandas/tslib.pyx":2132 * * pandas_datetime_to_datetimestruct(dtindex[i], PANDAS_FR_ns, &dts) * out[i] = dts.day # <<<<<<<<<<<<<< * return out * */ __pyx_t_23 = __pyx_v_dts.day; __pyx_t_28 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_28 < 0) { __pyx_t_7 = 0; } else if (unlikely(__pyx_t_28 >= __pyx_pybuffernd_out.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2132; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_28, __pyx_pybuffernd_out.diminfo[0].strides) = __pyx_t_23; __pyx_L10_continue:; } /* "pandas/tslib.pyx":2133 * pandas_datetime_to_datetimestruct(dtindex[i], PANDAS_FR_ns, &dts) * out[i] = dts.day * return out # <<<<<<<<<<<<<< * * elif field == 'h': */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_out)); __pyx_r = ((PyObject *)__pyx_v_out); goto __pyx_L0; goto __pyx_L3; } /* "pandas/tslib.pyx":2135 * return out * * elif field == 'h': # <<<<<<<<<<<<<< * for i in range(count): * if dtindex[i] == NPY_NAT: out[i] = -1; continue */ __pyx_t_2 = PyObject_RichCompare(__pyx_v_field, ((PyObject *)__pyx_n_s__h), Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2135; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_13 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2135; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_13) { /* "pandas/tslib.pyx":2136 * * elif field == 'h': * for i in range(count): # <<<<<<<<<<<<<< * if dtindex[i] == NPY_NAT: out[i] = -1; continue * */ __pyx_t_11 = __pyx_v_count; for (__pyx_t_14 = 0; __pyx_t_14 < __pyx_t_11; __pyx_t_14+=1) { __pyx_v_i = __pyx_t_14; /* "pandas/tslib.pyx":2137 * elif field == 'h': * for i in range(count): * if dtindex[i] == NPY_NAT: out[i] = -1; continue # <<<<<<<<<<<<<< * * pandas_datetime_to_datetimestruct(dtindex[i], PANDAS_FR_ns, &dts) */ __pyx_t_29 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_29 < 0) { __pyx_t_7 = 0; } else if (unlikely(__pyx_t_29 >= __pyx_pybuffernd_dtindex.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2137; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_13 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_dtindex.rcbuffer->pybuffer.buf, __pyx_t_29, __pyx_pybuffernd_dtindex.diminfo[0].strides)) == __pyx_v_6pandas_5tslib_NPY_NAT) != 0); if (__pyx_t_13) { __pyx_t_30 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_30 < 0) { __pyx_t_7 = 0; } else if (unlikely(__pyx_t_30 >= __pyx_pybuffernd_out.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2137; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_30, __pyx_pybuffernd_out.diminfo[0].strides) = -1; goto __pyx_L13_continue; goto __pyx_L15; } __pyx_L15:; /* "pandas/tslib.pyx":2139 * if dtindex[i] == NPY_NAT: out[i] = -1; continue * * pandas_datetime_to_datetimestruct(dtindex[i], PANDAS_FR_ns, &dts) # <<<<<<<<<<<<<< * out[i] = dts.hour * return out */ __pyx_t_31 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_31 < 0) { __pyx_t_7 = 0; } else if (unlikely(__pyx_t_31 >= __pyx_pybuffernd_dtindex.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2139; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } pandas_datetime_to_datetimestruct((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_dtindex.rcbuffer->pybuffer.buf, __pyx_t_31, __pyx_pybuffernd_dtindex.diminfo[0].strides)), PANDAS_FR_ns, (&__pyx_v_dts)); /* "pandas/tslib.pyx":2140 * * pandas_datetime_to_datetimestruct(dtindex[i], PANDAS_FR_ns, &dts) * out[i] = dts.hour # <<<<<<<<<<<<<< * return out * */ __pyx_t_23 = __pyx_v_dts.hour; __pyx_t_32 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_32 < 0) { __pyx_t_7 = 0; } else if (unlikely(__pyx_t_32 >= __pyx_pybuffernd_out.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2140; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_32, __pyx_pybuffernd_out.diminfo[0].strides) = __pyx_t_23; __pyx_L13_continue:; } /* "pandas/tslib.pyx":2141 * pandas_datetime_to_datetimestruct(dtindex[i], PANDAS_FR_ns, &dts) * out[i] = dts.hour * return out # <<<<<<<<<<<<<< * * elif field == 'm': */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_out)); __pyx_r = ((PyObject *)__pyx_v_out); goto __pyx_L0; goto __pyx_L3; } /* "pandas/tslib.pyx":2143 * return out * * elif field == 'm': # <<<<<<<<<<<<<< * for i in range(count): * if dtindex[i] == NPY_NAT: out[i] = -1; continue */ __pyx_t_2 = PyObject_RichCompare(__pyx_v_field, ((PyObject *)__pyx_n_s__m), Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2143; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_13 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2143; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_13) { /* "pandas/tslib.pyx":2144 * * elif field == 'm': * for i in range(count): # <<<<<<<<<<<<<< * if dtindex[i] == NPY_NAT: out[i] = -1; continue * */ __pyx_t_11 = __pyx_v_count; for (__pyx_t_14 = 0; __pyx_t_14 < __pyx_t_11; __pyx_t_14+=1) { __pyx_v_i = __pyx_t_14; /* "pandas/tslib.pyx":2145 * elif field == 'm': * for i in range(count): * if dtindex[i] == NPY_NAT: out[i] = -1; continue # <<<<<<<<<<<<<< * * pandas_datetime_to_datetimestruct(dtindex[i], PANDAS_FR_ns, &dts) */ __pyx_t_33 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_33 < 0) { __pyx_t_7 = 0; } else if (unlikely(__pyx_t_33 >= __pyx_pybuffernd_dtindex.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2145; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_13 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_dtindex.rcbuffer->pybuffer.buf, __pyx_t_33, __pyx_pybuffernd_dtindex.diminfo[0].strides)) == __pyx_v_6pandas_5tslib_NPY_NAT) != 0); if (__pyx_t_13) { __pyx_t_34 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_34 < 0) { __pyx_t_7 = 0; } else if (unlikely(__pyx_t_34 >= __pyx_pybuffernd_out.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2145; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_34, __pyx_pybuffernd_out.diminfo[0].strides) = -1; goto __pyx_L16_continue; goto __pyx_L18; } __pyx_L18:; /* "pandas/tslib.pyx":2147 * if dtindex[i] == NPY_NAT: out[i] = -1; continue * * pandas_datetime_to_datetimestruct(dtindex[i], PANDAS_FR_ns, &dts) # <<<<<<<<<<<<<< * out[i] = dts.min * return out */ __pyx_t_35 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_35 < 0) { __pyx_t_7 = 0; } else if (unlikely(__pyx_t_35 >= __pyx_pybuffernd_dtindex.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2147; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } pandas_datetime_to_datetimestruct((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_dtindex.rcbuffer->pybuffer.buf, __pyx_t_35, __pyx_pybuffernd_dtindex.diminfo[0].strides)), PANDAS_FR_ns, (&__pyx_v_dts)); /* "pandas/tslib.pyx":2148 * * pandas_datetime_to_datetimestruct(dtindex[i], PANDAS_FR_ns, &dts) * out[i] = dts.min # <<<<<<<<<<<<<< * return out * */ __pyx_t_23 = __pyx_v_dts.min; __pyx_t_36 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_36 < 0) { __pyx_t_7 = 0; } else if (unlikely(__pyx_t_36 >= __pyx_pybuffernd_out.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2148; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_36, __pyx_pybuffernd_out.diminfo[0].strides) = __pyx_t_23; __pyx_L16_continue:; } /* "pandas/tslib.pyx":2149 * pandas_datetime_to_datetimestruct(dtindex[i], PANDAS_FR_ns, &dts) * out[i] = dts.min * return out # <<<<<<<<<<<<<< * * elif field == 's': */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_out)); __pyx_r = ((PyObject *)__pyx_v_out); goto __pyx_L0; goto __pyx_L3; } /* "pandas/tslib.pyx":2151 * return out * * elif field == 's': # <<<<<<<<<<<<<< * for i in range(count): * if dtindex[i] == NPY_NAT: out[i] = -1; continue */ __pyx_t_2 = PyObject_RichCompare(__pyx_v_field, ((PyObject *)__pyx_n_s__s), Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2151; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_13 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2151; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_13) { /* "pandas/tslib.pyx":2152 * * elif field == 's': * for i in range(count): # <<<<<<<<<<<<<< * if dtindex[i] == NPY_NAT: out[i] = -1; continue * */ __pyx_t_11 = __pyx_v_count; for (__pyx_t_14 = 0; __pyx_t_14 < __pyx_t_11; __pyx_t_14+=1) { __pyx_v_i = __pyx_t_14; /* "pandas/tslib.pyx":2153 * elif field == 's': * for i in range(count): * if dtindex[i] == NPY_NAT: out[i] = -1; continue # <<<<<<<<<<<<<< * * pandas_datetime_to_datetimestruct(dtindex[i], PANDAS_FR_ns, &dts) */ __pyx_t_37 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_37 < 0) { __pyx_t_7 = 0; } else if (unlikely(__pyx_t_37 >= __pyx_pybuffernd_dtindex.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2153; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_13 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_dtindex.rcbuffer->pybuffer.buf, __pyx_t_37, __pyx_pybuffernd_dtindex.diminfo[0].strides)) == __pyx_v_6pandas_5tslib_NPY_NAT) != 0); if (__pyx_t_13) { __pyx_t_38 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_38 < 0) { __pyx_t_7 = 0; } else if (unlikely(__pyx_t_38 >= __pyx_pybuffernd_out.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2153; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_38, __pyx_pybuffernd_out.diminfo[0].strides) = -1; goto __pyx_L19_continue; goto __pyx_L21; } __pyx_L21:; /* "pandas/tslib.pyx":2155 * if dtindex[i] == NPY_NAT: out[i] = -1; continue * * pandas_datetime_to_datetimestruct(dtindex[i], PANDAS_FR_ns, &dts) # <<<<<<<<<<<<<< * out[i] = dts.sec * return out */ __pyx_t_39 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_39 < 0) { __pyx_t_7 = 0; } else if (unlikely(__pyx_t_39 >= __pyx_pybuffernd_dtindex.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2155; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } pandas_datetime_to_datetimestruct((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_dtindex.rcbuffer->pybuffer.buf, __pyx_t_39, __pyx_pybuffernd_dtindex.diminfo[0].strides)), PANDAS_FR_ns, (&__pyx_v_dts)); /* "pandas/tslib.pyx":2156 * * pandas_datetime_to_datetimestruct(dtindex[i], PANDAS_FR_ns, &dts) * out[i] = dts.sec # <<<<<<<<<<<<<< * return out * */ __pyx_t_23 = __pyx_v_dts.sec; __pyx_t_40 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_40 < 0) { __pyx_t_7 = 0; } else if (unlikely(__pyx_t_40 >= __pyx_pybuffernd_out.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2156; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_40, __pyx_pybuffernd_out.diminfo[0].strides) = __pyx_t_23; __pyx_L19_continue:; } /* "pandas/tslib.pyx":2157 * pandas_datetime_to_datetimestruct(dtindex[i], PANDAS_FR_ns, &dts) * out[i] = dts.sec * return out # <<<<<<<<<<<<<< * * elif field == 'us': */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_out)); __pyx_r = ((PyObject *)__pyx_v_out); goto __pyx_L0; goto __pyx_L3; } /* "pandas/tslib.pyx":2159 * return out * * elif field == 'us': # <<<<<<<<<<<<<< * for i in range(count): * if dtindex[i] == NPY_NAT: out[i] = -1; continue */ __pyx_t_2 = PyObject_RichCompare(__pyx_v_field, ((PyObject *)__pyx_n_s__us), Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2159; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_13 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2159; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_13) { /* "pandas/tslib.pyx":2160 * * elif field == 'us': * for i in range(count): # <<<<<<<<<<<<<< * if dtindex[i] == NPY_NAT: out[i] = -1; continue * */ __pyx_t_11 = __pyx_v_count; for (__pyx_t_14 = 0; __pyx_t_14 < __pyx_t_11; __pyx_t_14+=1) { __pyx_v_i = __pyx_t_14; /* "pandas/tslib.pyx":2161 * elif field == 'us': * for i in range(count): * if dtindex[i] == NPY_NAT: out[i] = -1; continue # <<<<<<<<<<<<<< * * pandas_datetime_to_datetimestruct(dtindex[i], PANDAS_FR_ns, &dts) */ __pyx_t_41 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_41 < 0) { __pyx_t_7 = 0; } else if (unlikely(__pyx_t_41 >= __pyx_pybuffernd_dtindex.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2161; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_13 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_dtindex.rcbuffer->pybuffer.buf, __pyx_t_41, __pyx_pybuffernd_dtindex.diminfo[0].strides)) == __pyx_v_6pandas_5tslib_NPY_NAT) != 0); if (__pyx_t_13) { __pyx_t_42 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_42 < 0) { __pyx_t_7 = 0; } else if (unlikely(__pyx_t_42 >= __pyx_pybuffernd_out.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2161; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_42, __pyx_pybuffernd_out.diminfo[0].strides) = -1; goto __pyx_L22_continue; goto __pyx_L24; } __pyx_L24:; /* "pandas/tslib.pyx":2163 * if dtindex[i] == NPY_NAT: out[i] = -1; continue * * pandas_datetime_to_datetimestruct(dtindex[i], PANDAS_FR_ns, &dts) # <<<<<<<<<<<<<< * out[i] = dts.us * return out */ __pyx_t_43 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_43 < 0) { __pyx_t_7 = 0; } else if (unlikely(__pyx_t_43 >= __pyx_pybuffernd_dtindex.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2163; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } pandas_datetime_to_datetimestruct((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_dtindex.rcbuffer->pybuffer.buf, __pyx_t_43, __pyx_pybuffernd_dtindex.diminfo[0].strides)), PANDAS_FR_ns, (&__pyx_v_dts)); /* "pandas/tslib.pyx":2164 * * pandas_datetime_to_datetimestruct(dtindex[i], PANDAS_FR_ns, &dts) * out[i] = dts.us # <<<<<<<<<<<<<< * return out * elif field == 'ns': */ __pyx_t_23 = __pyx_v_dts.us; __pyx_t_44 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_44 < 0) { __pyx_t_7 = 0; } else if (unlikely(__pyx_t_44 >= __pyx_pybuffernd_out.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2164; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_44, __pyx_pybuffernd_out.diminfo[0].strides) = __pyx_t_23; __pyx_L22_continue:; } /* "pandas/tslib.pyx":2165 * pandas_datetime_to_datetimestruct(dtindex[i], PANDAS_FR_ns, &dts) * out[i] = dts.us * return out # <<<<<<<<<<<<<< * elif field == 'ns': * for i in range(count): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_out)); __pyx_r = ((PyObject *)__pyx_v_out); goto __pyx_L0; goto __pyx_L3; } /* "pandas/tslib.pyx":2166 * out[i] = dts.us * return out * elif field == 'ns': # <<<<<<<<<<<<<< * for i in range(count): * if dtindex[i] == NPY_NAT: out[i] = -1; continue */ __pyx_t_2 = PyObject_RichCompare(__pyx_v_field, ((PyObject *)__pyx_n_s__ns), Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2166; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_13 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2166; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_13) { /* "pandas/tslib.pyx":2167 * return out * elif field == 'ns': * for i in range(count): # <<<<<<<<<<<<<< * if dtindex[i] == NPY_NAT: out[i] = -1; continue * */ __pyx_t_11 = __pyx_v_count; for (__pyx_t_14 = 0; __pyx_t_14 < __pyx_t_11; __pyx_t_14+=1) { __pyx_v_i = __pyx_t_14; /* "pandas/tslib.pyx":2168 * elif field == 'ns': * for i in range(count): * if dtindex[i] == NPY_NAT: out[i] = -1; continue # <<<<<<<<<<<<<< * * pandas_datetime_to_datetimestruct(dtindex[i], PANDAS_FR_ns, &dts) */ __pyx_t_45 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_45 < 0) { __pyx_t_7 = 0; } else if (unlikely(__pyx_t_45 >= __pyx_pybuffernd_dtindex.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2168; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_13 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_dtindex.rcbuffer->pybuffer.buf, __pyx_t_45, __pyx_pybuffernd_dtindex.diminfo[0].strides)) == __pyx_v_6pandas_5tslib_NPY_NAT) != 0); if (__pyx_t_13) { __pyx_t_46 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_46 < 0) { __pyx_t_7 = 0; } else if (unlikely(__pyx_t_46 >= __pyx_pybuffernd_out.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2168; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_46, __pyx_pybuffernd_out.diminfo[0].strides) = -1; goto __pyx_L25_continue; goto __pyx_L27; } __pyx_L27:; /* "pandas/tslib.pyx":2170 * if dtindex[i] == NPY_NAT: out[i] = -1; continue * * pandas_datetime_to_datetimestruct(dtindex[i], PANDAS_FR_ns, &dts) # <<<<<<<<<<<<<< * out[i] = dts.ps / 1000 * return out */ __pyx_t_47 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_47 < 0) { __pyx_t_7 = 0; } else if (unlikely(__pyx_t_47 >= __pyx_pybuffernd_dtindex.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2170; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } pandas_datetime_to_datetimestruct((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_dtindex.rcbuffer->pybuffer.buf, __pyx_t_47, __pyx_pybuffernd_dtindex.diminfo[0].strides)), PANDAS_FR_ns, (&__pyx_v_dts)); /* "pandas/tslib.pyx":2171 * * pandas_datetime_to_datetimestruct(dtindex[i], PANDAS_FR_ns, &dts) * out[i] = dts.ps / 1000 # <<<<<<<<<<<<<< * return out * elif field == 'doy': */ __pyx_t_48 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_48 < 0) { __pyx_t_7 = 0; } else if (unlikely(__pyx_t_48 >= __pyx_pybuffernd_out.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2171; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_48, __pyx_pybuffernd_out.diminfo[0].strides) = __Pyx_div_long(__pyx_v_dts.ps, 1000); __pyx_L25_continue:; } /* "pandas/tslib.pyx":2172 * pandas_datetime_to_datetimestruct(dtindex[i], PANDAS_FR_ns, &dts) * out[i] = dts.ps / 1000 * return out # <<<<<<<<<<<<<< * elif field == 'doy': * for i in range(count): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_out)); __pyx_r = ((PyObject *)__pyx_v_out); goto __pyx_L0; goto __pyx_L3; } /* "pandas/tslib.pyx":2173 * out[i] = dts.ps / 1000 * return out * elif field == 'doy': # <<<<<<<<<<<<<< * for i in range(count): * if dtindex[i] == NPY_NAT: out[i] = -1; continue */ __pyx_t_2 = PyObject_RichCompare(__pyx_v_field, ((PyObject *)__pyx_n_s__doy), Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2173; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_13 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2173; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_13) { /* "pandas/tslib.pyx":2174 * return out * elif field == 'doy': * for i in range(count): # <<<<<<<<<<<<<< * if dtindex[i] == NPY_NAT: out[i] = -1; continue * */ __pyx_t_11 = __pyx_v_count; for (__pyx_t_14 = 0; __pyx_t_14 < __pyx_t_11; __pyx_t_14+=1) { __pyx_v_i = __pyx_t_14; /* "pandas/tslib.pyx":2175 * elif field == 'doy': * for i in range(count): * if dtindex[i] == NPY_NAT: out[i] = -1; continue # <<<<<<<<<<<<<< * * pandas_datetime_to_datetimestruct(dtindex[i], PANDAS_FR_ns, &dts) */ __pyx_t_49 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_49 < 0) { __pyx_t_7 = 0; } else if (unlikely(__pyx_t_49 >= __pyx_pybuffernd_dtindex.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2175; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_13 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_dtindex.rcbuffer->pybuffer.buf, __pyx_t_49, __pyx_pybuffernd_dtindex.diminfo[0].strides)) == __pyx_v_6pandas_5tslib_NPY_NAT) != 0); if (__pyx_t_13) { __pyx_t_50 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_50 < 0) { __pyx_t_7 = 0; } else if (unlikely(__pyx_t_50 >= __pyx_pybuffernd_out.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2175; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_50, __pyx_pybuffernd_out.diminfo[0].strides) = -1; goto __pyx_L28_continue; goto __pyx_L30; } __pyx_L30:; /* "pandas/tslib.pyx":2177 * if dtindex[i] == NPY_NAT: out[i] = -1; continue * * pandas_datetime_to_datetimestruct(dtindex[i], PANDAS_FR_ns, &dts) # <<<<<<<<<<<<<< * isleap = is_leapyear(dts.year) * out[i] = _month_offset[isleap, dts.month-1] + dts.day */ __pyx_t_51 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_51 < 0) { __pyx_t_7 = 0; } else if (unlikely(__pyx_t_51 >= __pyx_pybuffernd_dtindex.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2177; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } pandas_datetime_to_datetimestruct((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_dtindex.rcbuffer->pybuffer.buf, __pyx_t_51, __pyx_pybuffernd_dtindex.diminfo[0].strides)), PANDAS_FR_ns, (&__pyx_v_dts)); /* "pandas/tslib.pyx":2178 * * pandas_datetime_to_datetimestruct(dtindex[i], PANDAS_FR_ns, &dts) * isleap = is_leapyear(dts.year) # <<<<<<<<<<<<<< * out[i] = _month_offset[isleap, dts.month-1] + dts.day * return out */ __pyx_v_isleap = is_leapyear(__pyx_v_dts.year); /* "pandas/tslib.pyx":2179 * pandas_datetime_to_datetimestruct(dtindex[i], PANDAS_FR_ns, &dts) * isleap = is_leapyear(dts.year) * out[i] = _month_offset[isleap, dts.month-1] + dts.day # <<<<<<<<<<<<<< * return out * */ __pyx_t_7 = __pyx_v_isleap; __pyx_t_52 = (__pyx_v_dts.month - 1); __pyx_t_53 = -1; if (__pyx_t_7 < 0) { __pyx_t_53 = 0; } else if (unlikely(__pyx_t_7 >= __pyx_pybuffernd__month_offset.diminfo[0].shape)) __pyx_t_53 = 0; if (__pyx_t_52 < 0) { __pyx_t_53 = 1; } else if (unlikely(__pyx_t_52 >= __pyx_pybuffernd__month_offset.diminfo[1].shape)) __pyx_t_53 = 1; if (unlikely(__pyx_t_53 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_53); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2179; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_54 = __pyx_v_i; __pyx_t_53 = -1; if (__pyx_t_54 < 0) { __pyx_t_53 = 0; } else if (unlikely(__pyx_t_54 >= __pyx_pybuffernd_out.diminfo[0].shape)) __pyx_t_53 = 0; if (unlikely(__pyx_t_53 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_53); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2179; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_54, __pyx_pybuffernd_out.diminfo[0].strides) = ((*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd__month_offset.rcbuffer->pybuffer.buf, __pyx_t_7, __pyx_pybuffernd__month_offset.diminfo[0].strides, __pyx_t_52, __pyx_pybuffernd__month_offset.diminfo[1].strides)) + __pyx_v_dts.day); __pyx_L28_continue:; } /* "pandas/tslib.pyx":2180 * isleap = is_leapyear(dts.year) * out[i] = _month_offset[isleap, dts.month-1] + dts.day * return out # <<<<<<<<<<<<<< * * elif field == 'dow': */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_out)); __pyx_r = ((PyObject *)__pyx_v_out); goto __pyx_L0; goto __pyx_L3; } /* "pandas/tslib.pyx":2182 * return out * * elif field == 'dow': # <<<<<<<<<<<<<< * for i in range(count): * if dtindex[i] == NPY_NAT: out[i] = -1; continue */ __pyx_t_2 = PyObject_RichCompare(__pyx_v_field, ((PyObject *)__pyx_n_s__dow), Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2182; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_13 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2182; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_13) { /* "pandas/tslib.pyx":2183 * * elif field == 'dow': * for i in range(count): # <<<<<<<<<<<<<< * if dtindex[i] == NPY_NAT: out[i] = -1; continue * */ __pyx_t_11 = __pyx_v_count; for (__pyx_t_14 = 0; __pyx_t_14 < __pyx_t_11; __pyx_t_14+=1) { __pyx_v_i = __pyx_t_14; /* "pandas/tslib.pyx":2184 * elif field == 'dow': * for i in range(count): * if dtindex[i] == NPY_NAT: out[i] = -1; continue # <<<<<<<<<<<<<< * * ts = convert_to_tsobject(dtindex[i], None, None) */ __pyx_t_55 = __pyx_v_i; __pyx_t_53 = -1; if (__pyx_t_55 < 0) { __pyx_t_53 = 0; } else if (unlikely(__pyx_t_55 >= __pyx_pybuffernd_dtindex.diminfo[0].shape)) __pyx_t_53 = 0; if (unlikely(__pyx_t_53 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_53); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2184; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_13 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_dtindex.rcbuffer->pybuffer.buf, __pyx_t_55, __pyx_pybuffernd_dtindex.diminfo[0].strides)) == __pyx_v_6pandas_5tslib_NPY_NAT) != 0); if (__pyx_t_13) { __pyx_t_56 = __pyx_v_i; __pyx_t_53 = -1; if (__pyx_t_56 < 0) { __pyx_t_53 = 0; } else if (unlikely(__pyx_t_56 >= __pyx_pybuffernd_out.diminfo[0].shape)) __pyx_t_53 = 0; if (unlikely(__pyx_t_53 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_53); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2184; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_56, __pyx_pybuffernd_out.diminfo[0].strides) = -1; goto __pyx_L31_continue; goto __pyx_L33; } __pyx_L33:; /* "pandas/tslib.pyx":2186 * if dtindex[i] == NPY_NAT: out[i] = -1; continue * * ts = convert_to_tsobject(dtindex[i], None, None) # <<<<<<<<<<<<<< * out[i] = ts_dayofweek(ts) * return out */ __pyx_t_57 = __pyx_v_i; __pyx_t_53 = -1; if (__pyx_t_57 < 0) { __pyx_t_53 = 0; } else if (unlikely(__pyx_t_57 >= __pyx_pybuffernd_dtindex.diminfo[0].shape)) __pyx_t_53 = 0; if (unlikely(__pyx_t_53 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_53); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2186; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_2 = __Pyx_PyInt_to_py_npy_int64((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_dtindex.rcbuffer->pybuffer.buf, __pyx_t_57, __pyx_pybuffernd_dtindex.diminfo[0].strides))); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2186; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = __pyx_f_6pandas_5tslib_convert_to_tsobject(__pyx_t_2, Py_None, Py_None); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2186; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_6pandas_5tslib__TSObject))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2186; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_XDECREF_SET(__pyx_v_ts, ((struct __pyx_obj_6pandas_5tslib__TSObject *)__pyx_t_5)); __pyx_t_5 = 0; /* "pandas/tslib.pyx":2187 * * ts = convert_to_tsobject(dtindex[i], None, None) * out[i] = ts_dayofweek(ts) # <<<<<<<<<<<<<< * return out * */ __pyx_t_58 = __pyx_v_i; __pyx_t_53 = -1; if (__pyx_t_58 < 0) { __pyx_t_53 = 0; } else if (unlikely(__pyx_t_58 >= __pyx_pybuffernd_out.diminfo[0].shape)) __pyx_t_53 = 0; if (unlikely(__pyx_t_53 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_53); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2187; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_58, __pyx_pybuffernd_out.diminfo[0].strides) = __pyx_f_6pandas_5tslib_ts_dayofweek(__pyx_v_ts); __pyx_L31_continue:; } /* "pandas/tslib.pyx":2188 * ts = convert_to_tsobject(dtindex[i], None, None) * out[i] = ts_dayofweek(ts) * return out # <<<<<<<<<<<<<< * * elif field == 'woy': */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_out)); __pyx_r = ((PyObject *)__pyx_v_out); goto __pyx_L0; goto __pyx_L3; } /* "pandas/tslib.pyx":2190 * return out * * elif field == 'woy': # <<<<<<<<<<<<<< * for i in range(count): * if dtindex[i] == NPY_NAT: out[i] = -1; continue */ __pyx_t_5 = PyObject_RichCompare(__pyx_v_field, ((PyObject *)__pyx_n_s__woy), Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2190; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_13 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2190; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_13) { /* "pandas/tslib.pyx":2191 * * elif field == 'woy': * for i in range(count): # <<<<<<<<<<<<<< * if dtindex[i] == NPY_NAT: out[i] = -1; continue * */ __pyx_t_11 = __pyx_v_count; for (__pyx_t_14 = 0; __pyx_t_14 < __pyx_t_11; __pyx_t_14+=1) { __pyx_v_i = __pyx_t_14; /* "pandas/tslib.pyx":2192 * elif field == 'woy': * for i in range(count): * if dtindex[i] == NPY_NAT: out[i] = -1; continue # <<<<<<<<<<<<<< * * pandas_datetime_to_datetimestruct(dtindex[i], PANDAS_FR_ns, &dts) */ __pyx_t_59 = __pyx_v_i; __pyx_t_53 = -1; if (__pyx_t_59 < 0) { __pyx_t_53 = 0; } else if (unlikely(__pyx_t_59 >= __pyx_pybuffernd_dtindex.diminfo[0].shape)) __pyx_t_53 = 0; if (unlikely(__pyx_t_53 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_53); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2192; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_13 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_dtindex.rcbuffer->pybuffer.buf, __pyx_t_59, __pyx_pybuffernd_dtindex.diminfo[0].strides)) == __pyx_v_6pandas_5tslib_NPY_NAT) != 0); if (__pyx_t_13) { __pyx_t_60 = __pyx_v_i; __pyx_t_53 = -1; if (__pyx_t_60 < 0) { __pyx_t_53 = 0; } else if (unlikely(__pyx_t_60 >= __pyx_pybuffernd_out.diminfo[0].shape)) __pyx_t_53 = 0; if (unlikely(__pyx_t_53 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_53); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2192; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_60, __pyx_pybuffernd_out.diminfo[0].strides) = -1; goto __pyx_L34_continue; goto __pyx_L36; } __pyx_L36:; /* "pandas/tslib.pyx":2194 * if dtindex[i] == NPY_NAT: out[i] = -1; continue * * pandas_datetime_to_datetimestruct(dtindex[i], PANDAS_FR_ns, &dts) # <<<<<<<<<<<<<< * ts = convert_to_tsobject(dtindex[i], None, None) * isleap = is_leapyear(dts.year) */ __pyx_t_61 = __pyx_v_i; __pyx_t_53 = -1; if (__pyx_t_61 < 0) { __pyx_t_53 = 0; } else if (unlikely(__pyx_t_61 >= __pyx_pybuffernd_dtindex.diminfo[0].shape)) __pyx_t_53 = 0; if (unlikely(__pyx_t_53 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_53); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2194; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } pandas_datetime_to_datetimestruct((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_dtindex.rcbuffer->pybuffer.buf, __pyx_t_61, __pyx_pybuffernd_dtindex.diminfo[0].strides)), PANDAS_FR_ns, (&__pyx_v_dts)); /* "pandas/tslib.pyx":2195 * * pandas_datetime_to_datetimestruct(dtindex[i], PANDAS_FR_ns, &dts) * ts = convert_to_tsobject(dtindex[i], None, None) # <<<<<<<<<<<<<< * isleap = is_leapyear(dts.year) * isleap_prev = is_leapyear(dts.year - 1) */ __pyx_t_62 = __pyx_v_i; __pyx_t_53 = -1; if (__pyx_t_62 < 0) { __pyx_t_53 = 0; } else if (unlikely(__pyx_t_62 >= __pyx_pybuffernd_dtindex.diminfo[0].shape)) __pyx_t_53 = 0; if (unlikely(__pyx_t_53 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_53); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2195; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_5 = __Pyx_PyInt_to_py_npy_int64((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_dtindex.rcbuffer->pybuffer.buf, __pyx_t_62, __pyx_pybuffernd_dtindex.diminfo[0].strides))); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2195; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_2 = __pyx_f_6pandas_5tslib_convert_to_tsobject(__pyx_t_5, Py_None, Py_None); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2195; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_6pandas_5tslib__TSObject))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2195; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_XDECREF_SET(__pyx_v_ts, ((struct __pyx_obj_6pandas_5tslib__TSObject *)__pyx_t_2)); __pyx_t_2 = 0; /* "pandas/tslib.pyx":2196 * pandas_datetime_to_datetimestruct(dtindex[i], PANDAS_FR_ns, &dts) * ts = convert_to_tsobject(dtindex[i], None, None) * isleap = is_leapyear(dts.year) # <<<<<<<<<<<<<< * isleap_prev = is_leapyear(dts.year - 1) * mo_off = _month_offset[isleap, dts.month - 1] */ __pyx_v_isleap = is_leapyear(__pyx_v_dts.year); /* "pandas/tslib.pyx":2197 * ts = convert_to_tsobject(dtindex[i], None, None) * isleap = is_leapyear(dts.year) * isleap_prev = is_leapyear(dts.year - 1) # <<<<<<<<<<<<<< * mo_off = _month_offset[isleap, dts.month - 1] * doy = mo_off + dts.day */ __pyx_v_isleap_prev = is_leapyear((__pyx_v_dts.year - 1)); /* "pandas/tslib.pyx":2198 * isleap = is_leapyear(dts.year) * isleap_prev = is_leapyear(dts.year - 1) * mo_off = _month_offset[isleap, dts.month - 1] # <<<<<<<<<<<<<< * doy = mo_off + dts.day * dow = ts_dayofweek(ts) */ __pyx_t_53 = __pyx_v_isleap; __pyx_t_63 = (__pyx_v_dts.month - 1); __pyx_t_64 = -1; if (__pyx_t_53 < 0) { __pyx_t_64 = 0; } else if (unlikely(__pyx_t_53 >= __pyx_pybuffernd__month_offset.diminfo[0].shape)) __pyx_t_64 = 0; if (__pyx_t_63 < 0) { __pyx_t_64 = 1; } else if (unlikely(__pyx_t_63 >= __pyx_pybuffernd__month_offset.diminfo[1].shape)) __pyx_t_64 = 1; if (unlikely(__pyx_t_64 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_64); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2198; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_mo_off = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd__month_offset.rcbuffer->pybuffer.buf, __pyx_t_53, __pyx_pybuffernd__month_offset.diminfo[0].strides, __pyx_t_63, __pyx_pybuffernd__month_offset.diminfo[1].strides)); /* "pandas/tslib.pyx":2199 * isleap_prev = is_leapyear(dts.year - 1) * mo_off = _month_offset[isleap, dts.month - 1] * doy = mo_off + dts.day # <<<<<<<<<<<<<< * dow = ts_dayofweek(ts) * */ __pyx_v_doy = (__pyx_v_mo_off + __pyx_v_dts.day); /* "pandas/tslib.pyx":2200 * mo_off = _month_offset[isleap, dts.month - 1] * doy = mo_off + dts.day * dow = ts_dayofweek(ts) # <<<<<<<<<<<<<< * * #estimate */ __pyx_v_dow = __pyx_f_6pandas_5tslib_ts_dayofweek(__pyx_v_ts); /* "pandas/tslib.pyx":2203 * * #estimate * woy = (doy - 1) - dow + 3 # <<<<<<<<<<<<<< * if woy >= 0: * woy = woy / 7 + 1 */ __pyx_v_woy = (((__pyx_v_doy - 1) - __pyx_v_dow) + 3); /* "pandas/tslib.pyx":2204 * #estimate * woy = (doy - 1) - dow + 3 * if woy >= 0: # <<<<<<<<<<<<<< * woy = woy / 7 + 1 * */ __pyx_t_13 = ((__pyx_v_woy >= 0) != 0); if (__pyx_t_13) { /* "pandas/tslib.pyx":2205 * woy = (doy - 1) - dow + 3 * if woy >= 0: * woy = woy / 7 + 1 # <<<<<<<<<<<<<< * * # verify */ __pyx_v_woy = (__Pyx_div_long(__pyx_v_woy, 7) + 1); goto __pyx_L37; } __pyx_L37:; /* "pandas/tslib.pyx":2208 * * # verify * if woy < 0: # <<<<<<<<<<<<<< * if (woy > -2) or (woy == -2 and isleap_prev): * woy = 53 */ __pyx_t_13 = ((__pyx_v_woy < 0) != 0); if (__pyx_t_13) { /* "pandas/tslib.pyx":2209 * # verify * if woy < 0: * if (woy > -2) or (woy == -2 and isleap_prev): # <<<<<<<<<<<<<< * woy = 53 * else: */ __pyx_t_13 = (__pyx_v_woy > -2); if (!__pyx_t_13) { __pyx_t_65 = (__pyx_v_woy == -2); if (__pyx_t_65) { __pyx_t_66 = (__pyx_v_isleap_prev != 0); } else { __pyx_t_66 = __pyx_t_65; } __pyx_t_65 = __pyx_t_66; } else { __pyx_t_65 = __pyx_t_13; } if (__pyx_t_65) { /* "pandas/tslib.pyx":2210 * if woy < 0: * if (woy > -2) or (woy == -2 and isleap_prev): * woy = 53 # <<<<<<<<<<<<<< * else: * woy = 52 */ __pyx_v_woy = 53; goto __pyx_L39; } /*else*/ { /* "pandas/tslib.pyx":2212 * woy = 53 * else: * woy = 52 # <<<<<<<<<<<<<< * elif woy == 53: * if 31 - dts.day + dow < 3: */ __pyx_v_woy = 52; } __pyx_L39:; goto __pyx_L38; } /* "pandas/tslib.pyx":2213 * else: * woy = 52 * elif woy == 53: # <<<<<<<<<<<<<< * if 31 - dts.day + dow < 3: * woy = 1 */ __pyx_t_65 = ((__pyx_v_woy == 53) != 0); if (__pyx_t_65) { /* "pandas/tslib.pyx":2214 * woy = 52 * elif woy == 53: * if 31 - dts.day + dow < 3: # <<<<<<<<<<<<<< * woy = 1 * */ __pyx_t_65 = ((((31 - __pyx_v_dts.day) + __pyx_v_dow) < 3) != 0); if (__pyx_t_65) { /* "pandas/tslib.pyx":2215 * elif woy == 53: * if 31 - dts.day + dow < 3: * woy = 1 # <<<<<<<<<<<<<< * * out[i] = woy */ __pyx_v_woy = 1; goto __pyx_L40; } __pyx_L40:; goto __pyx_L38; } __pyx_L38:; /* "pandas/tslib.pyx":2217 * woy = 1 * * out[i] = woy # <<<<<<<<<<<<<< * return out * */ __pyx_t_67 = __pyx_v_i; __pyx_t_64 = -1; if (__pyx_t_67 < 0) { __pyx_t_64 = 0; } else if (unlikely(__pyx_t_67 >= __pyx_pybuffernd_out.diminfo[0].shape)) __pyx_t_64 = 0; if (unlikely(__pyx_t_64 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_64); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2217; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_67, __pyx_pybuffernd_out.diminfo[0].strides) = __pyx_v_woy; __pyx_L34_continue:; } /* "pandas/tslib.pyx":2218 * * out[i] = woy * return out # <<<<<<<<<<<<<< * * elif field == 'q': */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_out)); __pyx_r = ((PyObject *)__pyx_v_out); goto __pyx_L0; goto __pyx_L3; } /* "pandas/tslib.pyx":2220 * return out * * elif field == 'q': # <<<<<<<<<<<<<< * for i in range(count): * if dtindex[i] == NPY_NAT: out[i] = -1; continue */ __pyx_t_2 = PyObject_RichCompare(__pyx_v_field, ((PyObject *)__pyx_n_s__q), Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2220; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_65 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_65 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2220; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_65) { /* "pandas/tslib.pyx":2221 * * elif field == 'q': * for i in range(count): # <<<<<<<<<<<<<< * if dtindex[i] == NPY_NAT: out[i] = -1; continue * */ __pyx_t_11 = __pyx_v_count; for (__pyx_t_14 = 0; __pyx_t_14 < __pyx_t_11; __pyx_t_14+=1) { __pyx_v_i = __pyx_t_14; /* "pandas/tslib.pyx":2222 * elif field == 'q': * for i in range(count): * if dtindex[i] == NPY_NAT: out[i] = -1; continue # <<<<<<<<<<<<<< * * pandas_datetime_to_datetimestruct(dtindex[i], PANDAS_FR_ns, &dts) */ __pyx_t_68 = __pyx_v_i; __pyx_t_64 = -1; if (__pyx_t_68 < 0) { __pyx_t_64 = 0; } else if (unlikely(__pyx_t_68 >= __pyx_pybuffernd_dtindex.diminfo[0].shape)) __pyx_t_64 = 0; if (unlikely(__pyx_t_64 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_64); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2222; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_65 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_dtindex.rcbuffer->pybuffer.buf, __pyx_t_68, __pyx_pybuffernd_dtindex.diminfo[0].strides)) == __pyx_v_6pandas_5tslib_NPY_NAT) != 0); if (__pyx_t_65) { __pyx_t_69 = __pyx_v_i; __pyx_t_64 = -1; if (__pyx_t_69 < 0) { __pyx_t_64 = 0; } else if (unlikely(__pyx_t_69 >= __pyx_pybuffernd_out.diminfo[0].shape)) __pyx_t_64 = 0; if (unlikely(__pyx_t_64 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_64); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2222; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_69, __pyx_pybuffernd_out.diminfo[0].strides) = -1; goto __pyx_L41_continue; goto __pyx_L43; } __pyx_L43:; /* "pandas/tslib.pyx":2224 * if dtindex[i] == NPY_NAT: out[i] = -1; continue * * pandas_datetime_to_datetimestruct(dtindex[i], PANDAS_FR_ns, &dts) # <<<<<<<<<<<<<< * out[i] = dts.month * out[i] = ((out[i] - 1) / 3) + 1 */ __pyx_t_70 = __pyx_v_i; __pyx_t_64 = -1; if (__pyx_t_70 < 0) { __pyx_t_64 = 0; } else if (unlikely(__pyx_t_70 >= __pyx_pybuffernd_dtindex.diminfo[0].shape)) __pyx_t_64 = 0; if (unlikely(__pyx_t_64 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_64); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2224; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } pandas_datetime_to_datetimestruct((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_dtindex.rcbuffer->pybuffer.buf, __pyx_t_70, __pyx_pybuffernd_dtindex.diminfo[0].strides)), PANDAS_FR_ns, (&__pyx_v_dts)); /* "pandas/tslib.pyx":2225 * * pandas_datetime_to_datetimestruct(dtindex[i], PANDAS_FR_ns, &dts) * out[i] = dts.month # <<<<<<<<<<<<<< * out[i] = ((out[i] - 1) / 3) + 1 * return out */ __pyx_t_23 = __pyx_v_dts.month; __pyx_t_71 = __pyx_v_i; __pyx_t_64 = -1; if (__pyx_t_71 < 0) { __pyx_t_64 = 0; } else if (unlikely(__pyx_t_71 >= __pyx_pybuffernd_out.diminfo[0].shape)) __pyx_t_64 = 0; if (unlikely(__pyx_t_64 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_64); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2225; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_71, __pyx_pybuffernd_out.diminfo[0].strides) = __pyx_t_23; /* "pandas/tslib.pyx":2226 * pandas_datetime_to_datetimestruct(dtindex[i], PANDAS_FR_ns, &dts) * out[i] = dts.month * out[i] = ((out[i] - 1) / 3) + 1 # <<<<<<<<<<<<<< * return out * */ __pyx_t_72 = __pyx_v_i; __pyx_t_64 = -1; if (__pyx_t_72 < 0) { __pyx_t_64 = 0; } else if (unlikely(__pyx_t_72 >= __pyx_pybuffernd_out.diminfo[0].shape)) __pyx_t_64 = 0; if (unlikely(__pyx_t_64 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_64); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2226; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_73 = __pyx_v_i; __pyx_t_64 = -1; if (__pyx_t_73 < 0) { __pyx_t_64 = 0; } else if (unlikely(__pyx_t_73 >= __pyx_pybuffernd_out.diminfo[0].shape)) __pyx_t_64 = 0; if (unlikely(__pyx_t_64 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_64); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2226; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_73, __pyx_pybuffernd_out.diminfo[0].strides) = (__Pyx_div_long(((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_72, __pyx_pybuffernd_out.diminfo[0].strides)) - 1), 3) + 1); __pyx_L41_continue:; } /* "pandas/tslib.pyx":2227 * out[i] = dts.month * out[i] = ((out[i] - 1) / 3) + 1 * return out # <<<<<<<<<<<<<< * * raise ValueError("Field %s not supported" % field) */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_out)); __pyx_r = ((PyObject *)__pyx_v_out); goto __pyx_L0; goto __pyx_L3; } __pyx_L3:; /* "pandas/tslib.pyx":2229 * return out * * raise ValueError("Field %s not supported" % field) # <<<<<<<<<<<<<< * * */ __pyx_t_2 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_118), __pyx_v_field); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2229; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_2)); __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2229; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_t_2)); __Pyx_GIVEREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2229; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2229; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd__month_offset.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_dtindex.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.tslib.get_date_field", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd__month_offset.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_dtindex.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_ts); __Pyx_XDECREF((PyObject *)__pyx_v_out); __Pyx_XDECREF((PyObject *)__pyx_v__month_offset); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/tslib.pyx":2232 * * * cdef inline int m8_weekday(int64_t val): # <<<<<<<<<<<<<< * ts = convert_to_tsobject(val, None, None) * return ts_dayofweek(ts) */ static CYTHON_INLINE int __pyx_f_6pandas_5tslib_m8_weekday(__pyx_t_5numpy_int64_t __pyx_v_val) { PyObject *__pyx_v_ts = NULL; int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("m8_weekday", 0); /* "pandas/tslib.pyx":2233 * * cdef inline int m8_weekday(int64_t val): * ts = convert_to_tsobject(val, None, None) # <<<<<<<<<<<<<< * return ts_dayofweek(ts) * */ __pyx_t_1 = __Pyx_PyInt_to_py_npy_int64(__pyx_v_val); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2233; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __pyx_f_6pandas_5tslib_convert_to_tsobject(__pyx_t_1, Py_None, Py_None); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2233; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_ts = __pyx_t_2; __pyx_t_2 = 0; /* "pandas/tslib.pyx":2234 * cdef inline int m8_weekday(int64_t val): * ts = convert_to_tsobject(val, None, None) * return ts_dayofweek(ts) # <<<<<<<<<<<<<< * * cdef int64_t DAY_NS = 86400000000000LL */ if (!(likely(((__pyx_v_ts) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_ts, __pyx_ptype_6pandas_5tslib__TSObject))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2234; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_f_6pandas_5tslib_ts_dayofweek(((struct __pyx_obj_6pandas_5tslib__TSObject *)__pyx_v_ts)); goto __pyx_L0; __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_WriteUnraisable("pandas.tslib.m8_weekday", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_ts); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5tslib_65date_normalize(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5tslib_65date_normalize = {__Pyx_NAMESTR("date_normalize"), (PyCFunction)__pyx_pw_6pandas_5tslib_65date_normalize, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5tslib_65date_normalize(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_stamps = 0; PyObject *__pyx_v_tz = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("date_normalize (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__stamps,&__pyx_n_s__tz,0}; PyObject* values[2] = {0,0}; /* "pandas/tslib.pyx":2239 * * * def date_normalize(ndarray[int64_t] stamps, tz=None): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = len(stamps) */ values[1] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__stamps)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__tz); if (value) { values[1] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "date_normalize") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2239; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_stamps = ((PyArrayObject *)values[0]); __pyx_v_tz = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("date_normalize", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2239; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.tslib.date_normalize", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_stamps), __pyx_ptype_5numpy_ndarray, 1, "stamps", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2239; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5tslib_64date_normalize(__pyx_self, __pyx_v_stamps, __pyx_v_tz); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5tslib_64date_normalize(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_stamps, PyObject *__pyx_v_tz) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_n; pandas_datetimestruct __pyx_v_dts; CYTHON_UNUSED struct __pyx_obj_6pandas_5tslib__TSObject *__pyx_v_tso = 0; PyArrayObject *__pyx_v_result = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_result; __Pyx_Buffer __pyx_pybuffer_result; __Pyx_LocalBuf_ND __pyx_pybuffernd_stamps; __Pyx_Buffer __pyx_pybuffer_stamps; 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; int __pyx_t_9; 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; Py_ssize_t __pyx_t_15; Py_ssize_t __pyx_t_16; Py_ssize_t __pyx_t_17; Py_ssize_t __pyx_t_18; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("date_normalize", 0); __Pyx_INCREF(__pyx_v_tz); __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_stamps.pybuffer.buf = NULL; __pyx_pybuffer_stamps.refcount = 0; __pyx_pybuffernd_stamps.data = NULL; __pyx_pybuffernd_stamps.rcbuffer = &__pyx_pybuffer_stamps; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_stamps.rcbuffer->pybuffer, (PyObject*)__pyx_v_stamps, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2239; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_stamps.diminfo[0].strides = __pyx_pybuffernd_stamps.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_stamps.diminfo[0].shape = __pyx_pybuffernd_stamps.rcbuffer->pybuffer.shape[0]; /* "pandas/tslib.pyx":2241 * def date_normalize(ndarray[int64_t] stamps, tz=None): * cdef: * Py_ssize_t i, n = len(stamps) # <<<<<<<<<<<<<< * pandas_datetimestruct dts * _TSObject tso */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_stamps)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2241; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/tslib.pyx":2244 * pandas_datetimestruct dts * _TSObject tso * ndarray[int64_t] result = np.empty(n, dtype=np.int64) # <<<<<<<<<<<<<< * * if tz is not None: */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2244; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 2244; __pyx_clineno = __LINE__; goto __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_n); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2244; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2244; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2244; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_2)); __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2244; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s__int64); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2244; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__dtype), __pyx_t_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2244; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2244; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __Pyx_DECREF(((PyObject *)__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_filename = __pyx_f[0]; __pyx_lineno = 2244; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_7 = ((PyArrayObject *)__pyx_t_6); { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { __pyx_v_result = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_result.rcbuffer->pybuffer.buf = NULL; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2244; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } else {__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]; } } __pyx_t_7 = 0; __pyx_v_result = ((PyArrayObject *)__pyx_t_6); __pyx_t_6 = 0; /* "pandas/tslib.pyx":2246 * ndarray[int64_t] result = np.empty(n, dtype=np.int64) * * if tz is not None: # <<<<<<<<<<<<<< * tso = _TSObject() * if isinstance(tz, basestring): */ __pyx_t_8 = (__pyx_v_tz != Py_None); __pyx_t_9 = (__pyx_t_8 != 0); if (__pyx_t_9) { /* "pandas/tslib.pyx":2247 * * if tz is not None: * tso = _TSObject() # <<<<<<<<<<<<<< * if isinstance(tz, basestring): * tz = pytz.timezone(tz) */ __pyx_t_6 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_6pandas_5tslib__TSObject)), ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2247; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_v_tso = ((struct __pyx_obj_6pandas_5tslib__TSObject *)__pyx_t_6); __pyx_t_6 = 0; /* "pandas/tslib.pyx":2248 * if tz is not None: * tso = _TSObject() * if isinstance(tz, basestring): # <<<<<<<<<<<<<< * tz = pytz.timezone(tz) * result = _normalize_local(stamps, tz) */ __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s__basestring); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2248; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_9 = PyObject_IsInstance(__pyx_v_tz, __pyx_t_6); if (unlikely(__pyx_t_9 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2248; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_8 = (__pyx_t_9 != 0); if (__pyx_t_8) { /* "pandas/tslib.pyx":2249 * tso = _TSObject() * if isinstance(tz, basestring): * tz = pytz.timezone(tz) # <<<<<<<<<<<<<< * result = _normalize_local(stamps, tz) * else: */ __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s__pytz); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2249; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s__timezone); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2249; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2249; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(__pyx_v_tz); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_tz); __Pyx_GIVEREF(__pyx_v_tz); __pyx_t_4 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2249; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0; __Pyx_DECREF_SET(__pyx_v_tz, __pyx_t_4); __pyx_t_4 = 0; goto __pyx_L4; } __pyx_L4:; /* "pandas/tslib.pyx":2250 * if isinstance(tz, basestring): * tz = pytz.timezone(tz) * result = _normalize_local(stamps, tz) # <<<<<<<<<<<<<< * else: * for i in range(n): */ __pyx_t_4 = __pyx_f_6pandas_5tslib__normalize_local(((PyArrayObject *)__pyx_v_stamps), __pyx_v_tz); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2250; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2250; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_7 = ((PyArrayObject *)__pyx_t_4); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __pyx_t_10 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_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_result.rcbuffer->pybuffer, (PyObject*)__pyx_v_result, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_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_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_10 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2250; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_7 = 0; __Pyx_DECREF_SET(__pyx_v_result, ((PyArrayObject *)__pyx_t_4)); __pyx_t_4 = 0; goto __pyx_L3; } /*else*/ { /* "pandas/tslib.pyx":2252 * result = _normalize_local(stamps, tz) * else: * for i in range(n): # <<<<<<<<<<<<<< * if stamps[i] == NPY_NAT: * result[i] = NPY_NAT */ __pyx_t_1 = __pyx_v_n; for (__pyx_t_14 = 0; __pyx_t_14 < __pyx_t_1; __pyx_t_14+=1) { __pyx_v_i = __pyx_t_14; /* "pandas/tslib.pyx":2253 * else: * for i in range(n): * if stamps[i] == NPY_NAT: # <<<<<<<<<<<<<< * result[i] = NPY_NAT * continue */ __pyx_t_15 = __pyx_v_i; __pyx_t_10 = -1; if (__pyx_t_15 < 0) { __pyx_t_15 += __pyx_pybuffernd_stamps.diminfo[0].shape; if (unlikely(__pyx_t_15 < 0)) __pyx_t_10 = 0; } else if (unlikely(__pyx_t_15 >= __pyx_pybuffernd_stamps.diminfo[0].shape)) __pyx_t_10 = 0; if (unlikely(__pyx_t_10 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_10); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2253; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_8 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_stamps.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_stamps.diminfo[0].strides)) == __pyx_v_6pandas_5tslib_NPY_NAT) != 0); if (__pyx_t_8) { /* "pandas/tslib.pyx":2254 * for i in range(n): * if stamps[i] == NPY_NAT: * result[i] = NPY_NAT # <<<<<<<<<<<<<< * continue * pandas_datetime_to_datetimestruct(stamps[i], PANDAS_FR_ns, &dts) */ __pyx_t_16 = __pyx_v_i; __pyx_t_10 = -1; if (__pyx_t_16 < 0) { __pyx_t_16 += __pyx_pybuffernd_result.diminfo[0].shape; if (unlikely(__pyx_t_16 < 0)) __pyx_t_10 = 0; } else if (unlikely(__pyx_t_16 >= __pyx_pybuffernd_result.diminfo[0].shape)) __pyx_t_10 = 0; if (unlikely(__pyx_t_10 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_10); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2254; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_result.diminfo[0].strides) = __pyx_v_6pandas_5tslib_NPY_NAT; /* "pandas/tslib.pyx":2255 * if stamps[i] == NPY_NAT: * result[i] = NPY_NAT * continue # <<<<<<<<<<<<<< * pandas_datetime_to_datetimestruct(stamps[i], PANDAS_FR_ns, &dts) * result[i] = _normalized_stamp(&dts) */ goto __pyx_L5_continue; goto __pyx_L7; } __pyx_L7:; /* "pandas/tslib.pyx":2256 * result[i] = NPY_NAT * continue * pandas_datetime_to_datetimestruct(stamps[i], PANDAS_FR_ns, &dts) # <<<<<<<<<<<<<< * result[i] = _normalized_stamp(&dts) * */ __pyx_t_17 = __pyx_v_i; __pyx_t_10 = -1; if (__pyx_t_17 < 0) { __pyx_t_17 += __pyx_pybuffernd_stamps.diminfo[0].shape; if (unlikely(__pyx_t_17 < 0)) __pyx_t_10 = 0; } else if (unlikely(__pyx_t_17 >= __pyx_pybuffernd_stamps.diminfo[0].shape)) __pyx_t_10 = 0; if (unlikely(__pyx_t_10 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_10); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2256; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } pandas_datetime_to_datetimestruct((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_stamps.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_stamps.diminfo[0].strides)), PANDAS_FR_ns, (&__pyx_v_dts)); /* "pandas/tslib.pyx":2257 * continue * pandas_datetime_to_datetimestruct(stamps[i], PANDAS_FR_ns, &dts) * result[i] = _normalized_stamp(&dts) # <<<<<<<<<<<<<< * * return result */ __pyx_t_18 = __pyx_v_i; __pyx_t_10 = -1; if (__pyx_t_18 < 0) { __pyx_t_18 += __pyx_pybuffernd_result.diminfo[0].shape; if (unlikely(__pyx_t_18 < 0)) __pyx_t_10 = 0; } else if (unlikely(__pyx_t_18 >= __pyx_pybuffernd_result.diminfo[0].shape)) __pyx_t_10 = 0; if (unlikely(__pyx_t_10 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_10); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2257; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_result.diminfo[0].strides) = __pyx_f_6pandas_5tslib__normalized_stamp((&__pyx_v_dts)); __pyx_L5_continue:; } } __pyx_L3:; /* "pandas/tslib.pyx":2259 * result[i] = _normalized_stamp(&dts) * * return result # <<<<<<<<<<<<<< * * cdef _normalize_local(ndarray[int64_t] stamps, object tz): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_result)); __pyx_r = ((PyObject *)__pyx_v_result); goto __pyx_L0; __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_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_stamps.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.tslib.date_normalize", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_stamps.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_tso); __Pyx_XDECREF((PyObject *)__pyx_v_result); __Pyx_XDECREF(__pyx_v_tz); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/tslib.pyx":2261 * return result * * cdef _normalize_local(ndarray[int64_t] stamps, object tz): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t n = len(stamps) */ static PyObject *__pyx_f_6pandas_5tslib__normalize_local(PyArrayObject *__pyx_v_stamps, PyObject *__pyx_v_tz) { Py_ssize_t __pyx_v_n; PyArrayObject *__pyx_v_result = 0; PyArrayObject *__pyx_v_trans = 0; PyArrayObject *__pyx_v_deltas = 0; PyArrayObject *__pyx_v_pos = 0; pandas_datetimestruct __pyx_v_dts; Py_ssize_t __pyx_v_i; PyDateTime_DateTime *__pyx_v_dt = NULL; PyObject *__pyx_v_delta = NULL; PyObject *__pyx_v__pos = NULL; __Pyx_LocalBuf_ND __pyx_pybuffernd_deltas; __Pyx_Buffer __pyx_pybuffer_deltas; __Pyx_LocalBuf_ND __pyx_pybuffernd_pos; __Pyx_Buffer __pyx_pybuffer_pos; __Pyx_LocalBuf_ND __pyx_pybuffernd_result; __Pyx_Buffer __pyx_pybuffer_result; __Pyx_LocalBuf_ND __pyx_pybuffernd_stamps; __Pyx_Buffer __pyx_pybuffer_stamps; __Pyx_LocalBuf_ND __pyx_pybuffernd_trans; __Pyx_Buffer __pyx_pybuffer_trans; 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; Py_ssize_t __pyx_t_9; Py_ssize_t __pyx_t_10; int __pyx_t_11; Py_ssize_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; PyObject *__pyx_t_18 = NULL; PyObject *__pyx_t_19 = NULL; PyObject *__pyx_t_20 = NULL; Py_ssize_t __pyx_t_21; npy_datetime __pyx_t_22; Py_ssize_t __pyx_t_23; PyArrayObject *__pyx_t_24 = NULL; PyObject *__pyx_t_25 = NULL; PyObject *__pyx_t_26 = NULL; PyObject *__pyx_t_27 = NULL; int __pyx_t_28; Py_ssize_t __pyx_t_29; Py_ssize_t __pyx_t_30; Py_ssize_t __pyx_t_31; long __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; Py_ssize_t __pyx_t_37; __pyx_t_5numpy_int64_t __pyx_t_38; Py_ssize_t __pyx_t_39; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_normalize_local", 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_trans.pybuffer.buf = NULL; __pyx_pybuffer_trans.refcount = 0; __pyx_pybuffernd_trans.data = NULL; __pyx_pybuffernd_trans.rcbuffer = &__pyx_pybuffer_trans; __pyx_pybuffer_deltas.pybuffer.buf = NULL; __pyx_pybuffer_deltas.refcount = 0; __pyx_pybuffernd_deltas.data = NULL; __pyx_pybuffernd_deltas.rcbuffer = &__pyx_pybuffer_deltas; __pyx_pybuffer_pos.pybuffer.buf = NULL; __pyx_pybuffer_pos.refcount = 0; __pyx_pybuffernd_pos.data = NULL; __pyx_pybuffernd_pos.rcbuffer = &__pyx_pybuffer_pos; __pyx_pybuffer_stamps.pybuffer.buf = NULL; __pyx_pybuffer_stamps.refcount = 0; __pyx_pybuffernd_stamps.data = NULL; __pyx_pybuffernd_stamps.rcbuffer = &__pyx_pybuffer_stamps; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_stamps.rcbuffer->pybuffer, (PyObject*)__pyx_v_stamps, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2261; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_stamps.diminfo[0].strides = __pyx_pybuffernd_stamps.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_stamps.diminfo[0].shape = __pyx_pybuffernd_stamps.rcbuffer->pybuffer.shape[0]; /* "pandas/tslib.pyx":2263 * cdef _normalize_local(ndarray[int64_t] stamps, object tz): * cdef: * Py_ssize_t n = len(stamps) # <<<<<<<<<<<<<< * ndarray[int64_t] result = np.empty(n, dtype=np.int64) * ndarray[int64_t] trans, deltas, pos */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_stamps)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2263; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/tslib.pyx":2264 * cdef: * Py_ssize_t n = len(stamps) * ndarray[int64_t] result = np.empty(n, dtype=np.int64) # <<<<<<<<<<<<<< * ndarray[int64_t] trans, deltas, pos * pandas_datetimestruct dts */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2264; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 2264; __pyx_clineno = __LINE__; goto __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_n); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2264; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2264; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2264; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_2)); __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2264; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s__int64); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2264; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__dtype), __pyx_t_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2264; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2264; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __Pyx_DECREF(((PyObject *)__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_filename = __pyx_f[0]; __pyx_lineno = 2264; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_7 = ((PyArrayObject *)__pyx_t_6); { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { __pyx_v_result = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_result.rcbuffer->pybuffer.buf = NULL; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2264; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } else {__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]; } } __pyx_t_7 = 0; __pyx_v_result = ((PyArrayObject *)__pyx_t_6); __pyx_t_6 = 0; /* "pandas/tslib.pyx":2268 * pandas_datetimestruct dts * * if _is_utc(tz): # <<<<<<<<<<<<<< * for i in range(n): * if stamps[i] == NPY_NAT: */ __pyx_t_8 = (__pyx_f_6pandas_5tslib__is_utc(__pyx_v_tz) != 0); if (__pyx_t_8) { /* "pandas/tslib.pyx":2269 * * if _is_utc(tz): * for i in range(n): # <<<<<<<<<<<<<< * if stamps[i] == NPY_NAT: * result[i] = NPY_NAT */ __pyx_t_1 = __pyx_v_n; for (__pyx_t_9 = 0; __pyx_t_9 < __pyx_t_1; __pyx_t_9+=1) { __pyx_v_i = __pyx_t_9; /* "pandas/tslib.pyx":2270 * if _is_utc(tz): * for i in range(n): * if stamps[i] == NPY_NAT: # <<<<<<<<<<<<<< * result[i] = NPY_NAT * continue */ __pyx_t_10 = __pyx_v_i; __pyx_t_11 = -1; if (__pyx_t_10 < 0) { __pyx_t_10 += __pyx_pybuffernd_stamps.diminfo[0].shape; if (unlikely(__pyx_t_10 < 0)) __pyx_t_11 = 0; } else if (unlikely(__pyx_t_10 >= __pyx_pybuffernd_stamps.diminfo[0].shape)) __pyx_t_11 = 0; if (unlikely(__pyx_t_11 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_11); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2270; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_8 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_stamps.rcbuffer->pybuffer.buf, __pyx_t_10, __pyx_pybuffernd_stamps.diminfo[0].strides)) == __pyx_v_6pandas_5tslib_NPY_NAT) != 0); if (__pyx_t_8) { /* "pandas/tslib.pyx":2271 * for i in range(n): * if stamps[i] == NPY_NAT: * result[i] = NPY_NAT # <<<<<<<<<<<<<< * continue * pandas_datetime_to_datetimestruct(stamps[i], PANDAS_FR_ns, &dts) */ __pyx_t_12 = __pyx_v_i; __pyx_t_11 = -1; if (__pyx_t_12 < 0) { __pyx_t_12 += __pyx_pybuffernd_result.diminfo[0].shape; if (unlikely(__pyx_t_12 < 0)) __pyx_t_11 = 0; } else if (unlikely(__pyx_t_12 >= __pyx_pybuffernd_result.diminfo[0].shape)) __pyx_t_11 = 0; if (unlikely(__pyx_t_11 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_11); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2271; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_12, __pyx_pybuffernd_result.diminfo[0].strides) = __pyx_v_6pandas_5tslib_NPY_NAT; /* "pandas/tslib.pyx":2272 * if stamps[i] == NPY_NAT: * result[i] = NPY_NAT * continue # <<<<<<<<<<<<<< * pandas_datetime_to_datetimestruct(stamps[i], PANDAS_FR_ns, &dts) * result[i] = _normalized_stamp(&dts) */ goto __pyx_L4_continue; goto __pyx_L6; } __pyx_L6:; /* "pandas/tslib.pyx":2273 * result[i] = NPY_NAT * continue * pandas_datetime_to_datetimestruct(stamps[i], PANDAS_FR_ns, &dts) # <<<<<<<<<<<<<< * result[i] = _normalized_stamp(&dts) * elif _is_tzlocal(tz): */ __pyx_t_13 = __pyx_v_i; __pyx_t_11 = -1; if (__pyx_t_13 < 0) { __pyx_t_13 += __pyx_pybuffernd_stamps.diminfo[0].shape; if (unlikely(__pyx_t_13 < 0)) __pyx_t_11 = 0; } else if (unlikely(__pyx_t_13 >= __pyx_pybuffernd_stamps.diminfo[0].shape)) __pyx_t_11 = 0; if (unlikely(__pyx_t_11 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_11); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2273; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } pandas_datetime_to_datetimestruct((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_stamps.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_stamps.diminfo[0].strides)), PANDAS_FR_ns, (&__pyx_v_dts)); /* "pandas/tslib.pyx":2274 * continue * pandas_datetime_to_datetimestruct(stamps[i], PANDAS_FR_ns, &dts) * result[i] = _normalized_stamp(&dts) # <<<<<<<<<<<<<< * elif _is_tzlocal(tz): * for i in range(n): */ __pyx_t_14 = __pyx_v_i; __pyx_t_11 = -1; if (__pyx_t_14 < 0) { __pyx_t_14 += __pyx_pybuffernd_result.diminfo[0].shape; if (unlikely(__pyx_t_14 < 0)) __pyx_t_11 = 0; } else if (unlikely(__pyx_t_14 >= __pyx_pybuffernd_result.diminfo[0].shape)) __pyx_t_11 = 0; if (unlikely(__pyx_t_11 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_11); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2274; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_result.diminfo[0].strides) = __pyx_f_6pandas_5tslib__normalized_stamp((&__pyx_v_dts)); __pyx_L4_continue:; } goto __pyx_L3; } /* "pandas/tslib.pyx":2275 * pandas_datetime_to_datetimestruct(stamps[i], PANDAS_FR_ns, &dts) * result[i] = _normalized_stamp(&dts) * elif _is_tzlocal(tz): # <<<<<<<<<<<<<< * for i in range(n): * if stamps[i] == NPY_NAT: */ __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s___is_tzlocal); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2275; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2275; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_tz); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_tz); __Pyx_GIVEREF(__pyx_v_tz); __pyx_t_4 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2275; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2275; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_8) { /* "pandas/tslib.pyx":2276 * result[i] = _normalized_stamp(&dts) * elif _is_tzlocal(tz): * for i in range(n): # <<<<<<<<<<<<<< * if stamps[i] == NPY_NAT: * result[i] = NPY_NAT */ __pyx_t_1 = __pyx_v_n; for (__pyx_t_9 = 0; __pyx_t_9 < __pyx_t_1; __pyx_t_9+=1) { __pyx_v_i = __pyx_t_9; /* "pandas/tslib.pyx":2277 * elif _is_tzlocal(tz): * for i in range(n): * if stamps[i] == NPY_NAT: # <<<<<<<<<<<<<< * result[i] = NPY_NAT * continue */ __pyx_t_15 = __pyx_v_i; __pyx_t_11 = -1; if (__pyx_t_15 < 0) { __pyx_t_15 += __pyx_pybuffernd_stamps.diminfo[0].shape; if (unlikely(__pyx_t_15 < 0)) __pyx_t_11 = 0; } else if (unlikely(__pyx_t_15 >= __pyx_pybuffernd_stamps.diminfo[0].shape)) __pyx_t_11 = 0; if (unlikely(__pyx_t_11 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_11); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2277; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_8 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_stamps.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_stamps.diminfo[0].strides)) == __pyx_v_6pandas_5tslib_NPY_NAT) != 0); if (__pyx_t_8) { /* "pandas/tslib.pyx":2278 * for i in range(n): * if stamps[i] == NPY_NAT: * result[i] = NPY_NAT # <<<<<<<<<<<<<< * continue * pandas_datetime_to_datetimestruct(stamps[i], PANDAS_FR_ns, */ __pyx_t_16 = __pyx_v_i; __pyx_t_11 = -1; if (__pyx_t_16 < 0) { __pyx_t_16 += __pyx_pybuffernd_result.diminfo[0].shape; if (unlikely(__pyx_t_16 < 0)) __pyx_t_11 = 0; } else if (unlikely(__pyx_t_16 >= __pyx_pybuffernd_result.diminfo[0].shape)) __pyx_t_11 = 0; if (unlikely(__pyx_t_11 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_11); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2278; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_result.diminfo[0].strides) = __pyx_v_6pandas_5tslib_NPY_NAT; /* "pandas/tslib.pyx":2279 * if stamps[i] == NPY_NAT: * result[i] = NPY_NAT * continue # <<<<<<<<<<<<<< * pandas_datetime_to_datetimestruct(stamps[i], PANDAS_FR_ns, * &dts) */ goto __pyx_L7_continue; goto __pyx_L9; } __pyx_L9:; /* "pandas/tslib.pyx":2280 * result[i] = NPY_NAT * continue * pandas_datetime_to_datetimestruct(stamps[i], PANDAS_FR_ns, # <<<<<<<<<<<<<< * &dts) * dt = datetime(dts.year, dts.month, dts.day, dts.hour, */ __pyx_t_17 = __pyx_v_i; __pyx_t_11 = -1; if (__pyx_t_17 < 0) { __pyx_t_17 += __pyx_pybuffernd_stamps.diminfo[0].shape; if (unlikely(__pyx_t_17 < 0)) __pyx_t_11 = 0; } else if (unlikely(__pyx_t_17 >= __pyx_pybuffernd_stamps.diminfo[0].shape)) __pyx_t_11 = 0; if (unlikely(__pyx_t_11 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_11); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2280; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } /* "pandas/tslib.pyx":2281 * continue * pandas_datetime_to_datetimestruct(stamps[i], PANDAS_FR_ns, * &dts) # <<<<<<<<<<<<<< * dt = datetime(dts.year, dts.month, dts.day, dts.hour, * dts.min, dts.sec, dts.us, tz) */ pandas_datetime_to_datetimestruct((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_stamps.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_stamps.diminfo[0].strides)), PANDAS_FR_ns, (&__pyx_v_dts)); /* "pandas/tslib.pyx":2282 * pandas_datetime_to_datetimestruct(stamps[i], PANDAS_FR_ns, * &dts) * dt = datetime(dts.year, dts.month, dts.day, dts.hour, # <<<<<<<<<<<<<< * dts.min, dts.sec, dts.us, tz) * delta = int(total_seconds(_get_utcoffset(tz, dt))) * 1000000000 */ __pyx_t_4 = __Pyx_PyInt_to_py_npy_int64(__pyx_v_dts.year); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2282; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_2 = __Pyx_PyInt_to_py_npy_int32(__pyx_v_dts.month); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2282; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_6 = __Pyx_PyInt_to_py_npy_int32(__pyx_v_dts.day); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2282; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_3 = __Pyx_PyInt_to_py_npy_int32(__pyx_v_dts.hour); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2282; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); /* "pandas/tslib.pyx":2283 * &dts) * dt = datetime(dts.year, dts.month, dts.day, dts.hour, * dts.min, dts.sec, dts.us, tz) # <<<<<<<<<<<<<< * delta = int(total_seconds(_get_utcoffset(tz, dt))) * 1000000000 * pandas_datetime_to_datetimestruct(stamps[i] + delta, */ __pyx_t_5 = __Pyx_PyInt_to_py_npy_int32(__pyx_v_dts.min); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2283; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_18 = __Pyx_PyInt_to_py_npy_int32(__pyx_v_dts.sec); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2283; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); __pyx_t_19 = __Pyx_PyInt_to_py_npy_int32(__pyx_v_dts.us); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2283; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_19); __pyx_t_20 = PyTuple_New(8); if (unlikely(!__pyx_t_20)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2282; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_20); PyTuple_SET_ITEM(__pyx_t_20, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_20, 1, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_20, 2, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_20, 3, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_20, 4, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_20, 5, __pyx_t_18); __Pyx_GIVEREF(__pyx_t_18); PyTuple_SET_ITEM(__pyx_t_20, 6, __pyx_t_19); __Pyx_GIVEREF(__pyx_t_19); __Pyx_INCREF(__pyx_v_tz); PyTuple_SET_ITEM(__pyx_t_20, 7, __pyx_v_tz); __Pyx_GIVEREF(__pyx_v_tz); __pyx_t_4 = 0; __pyx_t_2 = 0; __pyx_t_6 = 0; __pyx_t_3 = 0; __pyx_t_5 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_19 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_8datetime_datetime)), ((PyObject *)__pyx_t_20), NULL); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2282; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_19); __Pyx_DECREF(((PyObject *)__pyx_t_20)); __pyx_t_20 = 0; __Pyx_XDECREF_SET(__pyx_v_dt, ((PyDateTime_DateTime *)__pyx_t_19)); __pyx_t_19 = 0; /* "pandas/tslib.pyx":2284 * dt = datetime(dts.year, dts.month, dts.day, dts.hour, * dts.min, dts.sec, dts.us, tz) * delta = int(total_seconds(_get_utcoffset(tz, dt))) * 1000000000 # <<<<<<<<<<<<<< * pandas_datetime_to_datetimestruct(stamps[i] + delta, * PANDAS_FR_ns, &dts) */ __pyx_t_19 = __pyx_f_6pandas_5tslib__get_utcoffset(__pyx_v_tz, ((PyObject *)__pyx_v_dt), 0); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2284; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_19); __pyx_t_20 = PyFloat_FromDouble(__pyx_f_6pandas_5tslib_total_seconds(__pyx_t_19)); if (unlikely(!__pyx_t_20)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2284; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_20); __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0; __pyx_t_19 = PyTuple_New(1); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2284; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_19); PyTuple_SET_ITEM(__pyx_t_19, 0, __pyx_t_20); __Pyx_GIVEREF(__pyx_t_20); __pyx_t_20 = 0; __pyx_t_20 = PyObject_Call(((PyObject *)((PyObject*)(&PyInt_Type))), ((PyObject *)__pyx_t_19), NULL); if (unlikely(!__pyx_t_20)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2284; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_20); __Pyx_DECREF(((PyObject *)__pyx_t_19)); __pyx_t_19 = 0; __pyx_t_19 = PyNumber_Multiply(__pyx_t_20, __pyx_int_1000000000); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2284; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_19); __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0; __Pyx_XDECREF_SET(__pyx_v_delta, __pyx_t_19); __pyx_t_19 = 0; /* "pandas/tslib.pyx":2285 * dts.min, dts.sec, dts.us, tz) * delta = int(total_seconds(_get_utcoffset(tz, dt))) * 1000000000 * pandas_datetime_to_datetimestruct(stamps[i] + delta, # <<<<<<<<<<<<<< * PANDAS_FR_ns, &dts) * result[i] = _normalized_stamp(&dts) */ __pyx_t_21 = __pyx_v_i; __pyx_t_11 = -1; if (__pyx_t_21 < 0) { __pyx_t_21 += __pyx_pybuffernd_stamps.diminfo[0].shape; if (unlikely(__pyx_t_21 < 0)) __pyx_t_11 = 0; } else if (unlikely(__pyx_t_21 >= __pyx_pybuffernd_stamps.diminfo[0].shape)) __pyx_t_11 = 0; if (unlikely(__pyx_t_11 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_11); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2285; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_19 = __Pyx_PyInt_to_py_npy_int64((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_stamps.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_stamps.diminfo[0].strides))); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2285; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_19); __pyx_t_20 = PyNumber_Add(__pyx_t_19, __pyx_v_delta); if (unlikely(!__pyx_t_20)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2285; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_20); __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0; __pyx_t_22 = __Pyx_PyInt_from_py_npy_int64(__pyx_t_20); if (unlikely((__pyx_t_22 == (npy_datetime)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2285; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0; /* "pandas/tslib.pyx":2286 * delta = int(total_seconds(_get_utcoffset(tz, dt))) * 1000000000 * pandas_datetime_to_datetimestruct(stamps[i] + delta, * PANDAS_FR_ns, &dts) # <<<<<<<<<<<<<< * result[i] = _normalized_stamp(&dts) * else: */ pandas_datetime_to_datetimestruct(__pyx_t_22, PANDAS_FR_ns, (&__pyx_v_dts)); /* "pandas/tslib.pyx":2287 * pandas_datetime_to_datetimestruct(stamps[i] + delta, * PANDAS_FR_ns, &dts) * result[i] = _normalized_stamp(&dts) # <<<<<<<<<<<<<< * else: * # Adjust datetime64 timestamp, recompute datetimestruct */ __pyx_t_23 = __pyx_v_i; __pyx_t_11 = -1; if (__pyx_t_23 < 0) { __pyx_t_23 += __pyx_pybuffernd_result.diminfo[0].shape; if (unlikely(__pyx_t_23 < 0)) __pyx_t_11 = 0; } else if (unlikely(__pyx_t_23 >= __pyx_pybuffernd_result.diminfo[0].shape)) __pyx_t_11 = 0; if (unlikely(__pyx_t_11 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_11); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2287; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_23, __pyx_pybuffernd_result.diminfo[0].strides) = __pyx_f_6pandas_5tslib__normalized_stamp((&__pyx_v_dts)); __pyx_L7_continue:; } goto __pyx_L3; } /*else*/ { /* "pandas/tslib.pyx":2290 * else: * # Adjust datetime64 timestamp, recompute datetimestruct * trans = _get_transitions(tz) # <<<<<<<<<<<<<< * deltas = _get_deltas(tz) * _pos = trans.searchsorted(stamps, side='right') - 1 */ __pyx_t_20 = __Pyx_GetModuleGlobalName(__pyx_n_s___get_transitions); if (unlikely(!__pyx_t_20)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2290; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_20); __pyx_t_19 = PyTuple_New(1); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2290; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_19); __Pyx_INCREF(__pyx_v_tz); PyTuple_SET_ITEM(__pyx_t_19, 0, __pyx_v_tz); __Pyx_GIVEREF(__pyx_v_tz); __pyx_t_18 = PyObject_Call(__pyx_t_20, ((PyObject *)__pyx_t_19), NULL); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2290; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_19)); __pyx_t_19 = 0; if (!(likely(((__pyx_t_18) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_18, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2290; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_24 = ((PyArrayObject *)__pyx_t_18); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_trans.rcbuffer->pybuffer); __pyx_t_11 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_trans.rcbuffer->pybuffer, (PyObject*)__pyx_t_24, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_11 < 0)) { PyErr_Fetch(&__pyx_t_25, &__pyx_t_26, &__pyx_t_27); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_trans.rcbuffer->pybuffer, (PyObject*)__pyx_v_trans, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_25); Py_XDECREF(__pyx_t_26); Py_XDECREF(__pyx_t_27); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_25, __pyx_t_26, __pyx_t_27); } } __pyx_pybuffernd_trans.diminfo[0].strides = __pyx_pybuffernd_trans.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_trans.diminfo[0].shape = __pyx_pybuffernd_trans.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_11 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2290; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_24 = 0; __pyx_v_trans = ((PyArrayObject *)__pyx_t_18); __pyx_t_18 = 0; /* "pandas/tslib.pyx":2291 * # Adjust datetime64 timestamp, recompute datetimestruct * trans = _get_transitions(tz) * deltas = _get_deltas(tz) # <<<<<<<<<<<<<< * _pos = trans.searchsorted(stamps, side='right') - 1 * if _pos.dtype != np.int64: */ __pyx_t_18 = __Pyx_GetModuleGlobalName(__pyx_n_s___get_deltas); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2291; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); __pyx_t_19 = PyTuple_New(1); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2291; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_19); __Pyx_INCREF(__pyx_v_tz); PyTuple_SET_ITEM(__pyx_t_19, 0, __pyx_v_tz); __Pyx_GIVEREF(__pyx_v_tz); __pyx_t_20 = PyObject_Call(__pyx_t_18, ((PyObject *)__pyx_t_19), NULL); if (unlikely(!__pyx_t_20)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2291; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_20); __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_19)); __pyx_t_19 = 0; if (!(likely(((__pyx_t_20) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_20, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2291; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_24 = ((PyArrayObject *)__pyx_t_20); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_deltas.rcbuffer->pybuffer); __pyx_t_11 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_deltas.rcbuffer->pybuffer, (PyObject*)__pyx_t_24, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_11 < 0)) { PyErr_Fetch(&__pyx_t_27, &__pyx_t_26, &__pyx_t_25); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_deltas.rcbuffer->pybuffer, (PyObject*)__pyx_v_deltas, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_27); Py_XDECREF(__pyx_t_26); Py_XDECREF(__pyx_t_25); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_27, __pyx_t_26, __pyx_t_25); } } __pyx_pybuffernd_deltas.diminfo[0].strides = __pyx_pybuffernd_deltas.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_deltas.diminfo[0].shape = __pyx_pybuffernd_deltas.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_11 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2291; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_24 = 0; __pyx_v_deltas = ((PyArrayObject *)__pyx_t_20); __pyx_t_20 = 0; /* "pandas/tslib.pyx":2292 * trans = _get_transitions(tz) * deltas = _get_deltas(tz) * _pos = trans.searchsorted(stamps, side='right') - 1 # <<<<<<<<<<<<<< * if _pos.dtype != np.int64: * _pos = _pos.astype(np.int64) */ __pyx_t_20 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_trans), __pyx_n_s__searchsorted); if (unlikely(!__pyx_t_20)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2292; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_20); __pyx_t_19 = PyTuple_New(1); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2292; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_19); __Pyx_INCREF(((PyObject *)__pyx_v_stamps)); PyTuple_SET_ITEM(__pyx_t_19, 0, ((PyObject *)__pyx_v_stamps)); __Pyx_GIVEREF(((PyObject *)__pyx_v_stamps)); __pyx_t_18 = PyDict_New(); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2292; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_18)); if (PyDict_SetItem(__pyx_t_18, ((PyObject *)__pyx_n_s__side), ((PyObject *)__pyx_n_s__right)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2292; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_5 = PyObject_Call(__pyx_t_20, ((PyObject *)__pyx_t_19), ((PyObject *)__pyx_t_18)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2292; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_19)); __pyx_t_19 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_18)); __pyx_t_18 = 0; __pyx_t_18 = PyNumber_Subtract(__pyx_t_5, __pyx_int_1); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2292; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_v__pos = __pyx_t_18; __pyx_t_18 = 0; /* "pandas/tslib.pyx":2293 * deltas = _get_deltas(tz) * _pos = trans.searchsorted(stamps, side='right') - 1 * if _pos.dtype != np.int64: # <<<<<<<<<<<<<< * _pos = _pos.astype(np.int64) * pos = _pos */ __pyx_t_18 = __Pyx_PyObject_GetAttrStr(__pyx_v__pos, __pyx_n_s__dtype); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2293; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2293; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_19 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s__int64); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2293; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_19); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyObject_RichCompare(__pyx_t_18, __pyx_t_19, Py_NE); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2293; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0; __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2293; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_8) { /* "pandas/tslib.pyx":2294 * _pos = trans.searchsorted(stamps, side='right') - 1 * if _pos.dtype != np.int64: * _pos = _pos.astype(np.int64) # <<<<<<<<<<<<<< * pos = _pos * */ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v__pos, __pyx_n_s__astype); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2294; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_19 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2294; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_19); __pyx_t_18 = __Pyx_PyObject_GetAttrStr(__pyx_t_19, __pyx_n_s__int64); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2294; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0; __pyx_t_19 = PyTuple_New(1); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2294; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_19); PyTuple_SET_ITEM(__pyx_t_19, 0, __pyx_t_18); __Pyx_GIVEREF(__pyx_t_18); __pyx_t_18 = 0; __pyx_t_18 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_19), NULL); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2294; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_19)); __pyx_t_19 = 0; __Pyx_DECREF_SET(__pyx_v__pos, __pyx_t_18); __pyx_t_18 = 0; goto __pyx_L10; } __pyx_L10:; /* "pandas/tslib.pyx":2295 * if _pos.dtype != np.int64: * _pos = _pos.astype(np.int64) * pos = _pos # <<<<<<<<<<<<<< * * # statictzinfo */ if (!(likely(((__pyx_v__pos) == Py_None) || likely(__Pyx_TypeTest(__pyx_v__pos, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2295; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_24 = ((PyArrayObject *)__pyx_v__pos); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_pos.rcbuffer->pybuffer); __pyx_t_11 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_pos.rcbuffer->pybuffer, (PyObject*)__pyx_t_24, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_11 < 0)) { PyErr_Fetch(&__pyx_t_25, &__pyx_t_26, &__pyx_t_27); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_pos.rcbuffer->pybuffer, (PyObject*)__pyx_v_pos, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_25); Py_XDECREF(__pyx_t_26); Py_XDECREF(__pyx_t_27); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_25, __pyx_t_26, __pyx_t_27); } } __pyx_pybuffernd_pos.diminfo[0].strides = __pyx_pybuffernd_pos.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_pos.diminfo[0].shape = __pyx_pybuffernd_pos.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_11 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2295; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_24 = 0; __Pyx_INCREF(__pyx_v__pos); __pyx_v_pos = ((PyArrayObject *)__pyx_v__pos); /* "pandas/tslib.pyx":2298 * * # statictzinfo * if not hasattr(tz, '_transition_info'): # <<<<<<<<<<<<<< * for i in range(n): * if stamps[i] == NPY_NAT: */ __pyx_t_8 = PyObject_HasAttr(__pyx_v_tz, ((PyObject *)__pyx_n_s___transition_info)); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2298; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_28 = ((!(__pyx_t_8 != 0)) != 0); if (__pyx_t_28) { /* "pandas/tslib.pyx":2299 * # statictzinfo * if not hasattr(tz, '_transition_info'): * for i in range(n): # <<<<<<<<<<<<<< * if stamps[i] == NPY_NAT: * result[i] = NPY_NAT */ __pyx_t_1 = __pyx_v_n; for (__pyx_t_9 = 0; __pyx_t_9 < __pyx_t_1; __pyx_t_9+=1) { __pyx_v_i = __pyx_t_9; /* "pandas/tslib.pyx":2300 * if not hasattr(tz, '_transition_info'): * for i in range(n): * if stamps[i] == NPY_NAT: # <<<<<<<<<<<<<< * result[i] = NPY_NAT * continue */ __pyx_t_29 = __pyx_v_i; __pyx_t_11 = -1; if (__pyx_t_29 < 0) { __pyx_t_29 += __pyx_pybuffernd_stamps.diminfo[0].shape; if (unlikely(__pyx_t_29 < 0)) __pyx_t_11 = 0; } else if (unlikely(__pyx_t_29 >= __pyx_pybuffernd_stamps.diminfo[0].shape)) __pyx_t_11 = 0; if (unlikely(__pyx_t_11 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_11); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2300; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_28 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_stamps.rcbuffer->pybuffer.buf, __pyx_t_29, __pyx_pybuffernd_stamps.diminfo[0].strides)) == __pyx_v_6pandas_5tslib_NPY_NAT) != 0); if (__pyx_t_28) { /* "pandas/tslib.pyx":2301 * for i in range(n): * if stamps[i] == NPY_NAT: * result[i] = NPY_NAT # <<<<<<<<<<<<<< * continue * pandas_datetime_to_datetimestruct(stamps[i] + deltas[0], */ __pyx_t_30 = __pyx_v_i; __pyx_t_11 = -1; if (__pyx_t_30 < 0) { __pyx_t_30 += __pyx_pybuffernd_result.diminfo[0].shape; if (unlikely(__pyx_t_30 < 0)) __pyx_t_11 = 0; } else if (unlikely(__pyx_t_30 >= __pyx_pybuffernd_result.diminfo[0].shape)) __pyx_t_11 = 0; if (unlikely(__pyx_t_11 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_11); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2301; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_30, __pyx_pybuffernd_result.diminfo[0].strides) = __pyx_v_6pandas_5tslib_NPY_NAT; /* "pandas/tslib.pyx":2302 * if stamps[i] == NPY_NAT: * result[i] = NPY_NAT * continue # <<<<<<<<<<<<<< * pandas_datetime_to_datetimestruct(stamps[i] + deltas[0], * PANDAS_FR_ns, &dts) */ goto __pyx_L12_continue; goto __pyx_L14; } __pyx_L14:; /* "pandas/tslib.pyx":2303 * result[i] = NPY_NAT * continue * pandas_datetime_to_datetimestruct(stamps[i] + deltas[0], # <<<<<<<<<<<<<< * PANDAS_FR_ns, &dts) * result[i] = _normalized_stamp(&dts) */ __pyx_t_31 = __pyx_v_i; __pyx_t_11 = -1; if (__pyx_t_31 < 0) { __pyx_t_31 += __pyx_pybuffernd_stamps.diminfo[0].shape; if (unlikely(__pyx_t_31 < 0)) __pyx_t_11 = 0; } else if (unlikely(__pyx_t_31 >= __pyx_pybuffernd_stamps.diminfo[0].shape)) __pyx_t_11 = 0; if (unlikely(__pyx_t_11 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_11); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2303; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_32 = 0; __pyx_t_11 = -1; if (__pyx_t_32 < 0) { __pyx_t_32 += __pyx_pybuffernd_deltas.diminfo[0].shape; if (unlikely(__pyx_t_32 < 0)) __pyx_t_11 = 0; } else if (unlikely(__pyx_t_32 >= __pyx_pybuffernd_deltas.diminfo[0].shape)) __pyx_t_11 = 0; if (unlikely(__pyx_t_11 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_11); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2303; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } /* "pandas/tslib.pyx":2304 * continue * pandas_datetime_to_datetimestruct(stamps[i] + deltas[0], * PANDAS_FR_ns, &dts) # <<<<<<<<<<<<<< * result[i] = _normalized_stamp(&dts) * else: */ pandas_datetime_to_datetimestruct(((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_stamps.rcbuffer->pybuffer.buf, __pyx_t_31, __pyx_pybuffernd_stamps.diminfo[0].strides)) + (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_deltas.rcbuffer->pybuffer.buf, __pyx_t_32, __pyx_pybuffernd_deltas.diminfo[0].strides))), PANDAS_FR_ns, (&__pyx_v_dts)); /* "pandas/tslib.pyx":2305 * pandas_datetime_to_datetimestruct(stamps[i] + deltas[0], * PANDAS_FR_ns, &dts) * result[i] = _normalized_stamp(&dts) # <<<<<<<<<<<<<< * else: * for i in range(n): */ __pyx_t_33 = __pyx_v_i; __pyx_t_11 = -1; if (__pyx_t_33 < 0) { __pyx_t_33 += __pyx_pybuffernd_result.diminfo[0].shape; if (unlikely(__pyx_t_33 < 0)) __pyx_t_11 = 0; } else if (unlikely(__pyx_t_33 >= __pyx_pybuffernd_result.diminfo[0].shape)) __pyx_t_11 = 0; if (unlikely(__pyx_t_11 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_11); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2305; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_33, __pyx_pybuffernd_result.diminfo[0].strides) = __pyx_f_6pandas_5tslib__normalized_stamp((&__pyx_v_dts)); __pyx_L12_continue:; } goto __pyx_L11; } /*else*/ { /* "pandas/tslib.pyx":2307 * result[i] = _normalized_stamp(&dts) * else: * for i in range(n): # <<<<<<<<<<<<<< * if stamps[i] == NPY_NAT: * result[i] = NPY_NAT */ __pyx_t_1 = __pyx_v_n; for (__pyx_t_9 = 0; __pyx_t_9 < __pyx_t_1; __pyx_t_9+=1) { __pyx_v_i = __pyx_t_9; /* "pandas/tslib.pyx":2308 * else: * for i in range(n): * if stamps[i] == NPY_NAT: # <<<<<<<<<<<<<< * result[i] = NPY_NAT * continue */ __pyx_t_34 = __pyx_v_i; __pyx_t_11 = -1; if (__pyx_t_34 < 0) { __pyx_t_34 += __pyx_pybuffernd_stamps.diminfo[0].shape; if (unlikely(__pyx_t_34 < 0)) __pyx_t_11 = 0; } else if (unlikely(__pyx_t_34 >= __pyx_pybuffernd_stamps.diminfo[0].shape)) __pyx_t_11 = 0; if (unlikely(__pyx_t_11 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_11); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2308; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_28 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_stamps.rcbuffer->pybuffer.buf, __pyx_t_34, __pyx_pybuffernd_stamps.diminfo[0].strides)) == __pyx_v_6pandas_5tslib_NPY_NAT) != 0); if (__pyx_t_28) { /* "pandas/tslib.pyx":2309 * for i in range(n): * if stamps[i] == NPY_NAT: * result[i] = NPY_NAT # <<<<<<<<<<<<<< * continue * pandas_datetime_to_datetimestruct(stamps[i] + deltas[pos[i]], */ __pyx_t_35 = __pyx_v_i; __pyx_t_11 = -1; if (__pyx_t_35 < 0) { __pyx_t_35 += __pyx_pybuffernd_result.diminfo[0].shape; if (unlikely(__pyx_t_35 < 0)) __pyx_t_11 = 0; } else if (unlikely(__pyx_t_35 >= __pyx_pybuffernd_result.diminfo[0].shape)) __pyx_t_11 = 0; if (unlikely(__pyx_t_11 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_11); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2309; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_35, __pyx_pybuffernd_result.diminfo[0].strides) = __pyx_v_6pandas_5tslib_NPY_NAT; /* "pandas/tslib.pyx":2310 * if stamps[i] == NPY_NAT: * result[i] = NPY_NAT * continue # <<<<<<<<<<<<<< * pandas_datetime_to_datetimestruct(stamps[i] + deltas[pos[i]], * PANDAS_FR_ns, &dts) */ goto __pyx_L15_continue; goto __pyx_L17; } __pyx_L17:; /* "pandas/tslib.pyx":2311 * result[i] = NPY_NAT * continue * pandas_datetime_to_datetimestruct(stamps[i] + deltas[pos[i]], # <<<<<<<<<<<<<< * PANDAS_FR_ns, &dts) * result[i] = _normalized_stamp(&dts) */ __pyx_t_36 = __pyx_v_i; __pyx_t_11 = -1; if (__pyx_t_36 < 0) { __pyx_t_36 += __pyx_pybuffernd_stamps.diminfo[0].shape; if (unlikely(__pyx_t_36 < 0)) __pyx_t_11 = 0; } else if (unlikely(__pyx_t_36 >= __pyx_pybuffernd_stamps.diminfo[0].shape)) __pyx_t_11 = 0; if (unlikely(__pyx_t_11 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_11); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2311; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_37 = __pyx_v_i; __pyx_t_11 = -1; if (__pyx_t_37 < 0) { __pyx_t_37 += __pyx_pybuffernd_pos.diminfo[0].shape; if (unlikely(__pyx_t_37 < 0)) __pyx_t_11 = 0; } else if (unlikely(__pyx_t_37 >= __pyx_pybuffernd_pos.diminfo[0].shape)) __pyx_t_11 = 0; if (unlikely(__pyx_t_11 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_11); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2311; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_38 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_pos.rcbuffer->pybuffer.buf, __pyx_t_37, __pyx_pybuffernd_pos.diminfo[0].strides)); __pyx_t_11 = -1; if (__pyx_t_38 < 0) { __pyx_t_38 += __pyx_pybuffernd_deltas.diminfo[0].shape; if (unlikely(__pyx_t_38 < 0)) __pyx_t_11 = 0; } else if (unlikely(__pyx_t_38 >= __pyx_pybuffernd_deltas.diminfo[0].shape)) __pyx_t_11 = 0; if (unlikely(__pyx_t_11 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_11); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2311; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } /* "pandas/tslib.pyx":2312 * continue * pandas_datetime_to_datetimestruct(stamps[i] + deltas[pos[i]], * PANDAS_FR_ns, &dts) # <<<<<<<<<<<<<< * result[i] = _normalized_stamp(&dts) * */ pandas_datetime_to_datetimestruct(((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_stamps.rcbuffer->pybuffer.buf, __pyx_t_36, __pyx_pybuffernd_stamps.diminfo[0].strides)) + (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_deltas.rcbuffer->pybuffer.buf, __pyx_t_38, __pyx_pybuffernd_deltas.diminfo[0].strides))), PANDAS_FR_ns, (&__pyx_v_dts)); /* "pandas/tslib.pyx":2313 * pandas_datetime_to_datetimestruct(stamps[i] + deltas[pos[i]], * PANDAS_FR_ns, &dts) * result[i] = _normalized_stamp(&dts) # <<<<<<<<<<<<<< * * return result */ __pyx_t_39 = __pyx_v_i; __pyx_t_11 = -1; if (__pyx_t_39 < 0) { __pyx_t_39 += __pyx_pybuffernd_result.diminfo[0].shape; if (unlikely(__pyx_t_39 < 0)) __pyx_t_11 = 0; } else if (unlikely(__pyx_t_39 >= __pyx_pybuffernd_result.diminfo[0].shape)) __pyx_t_11 = 0; if (unlikely(__pyx_t_11 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_11); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2313; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_39, __pyx_pybuffernd_result.diminfo[0].strides) = __pyx_f_6pandas_5tslib__normalized_stamp((&__pyx_v_dts)); __pyx_L15_continue:; } } __pyx_L11:; } __pyx_L3:; /* "pandas/tslib.pyx":2315 * result[i] = _normalized_stamp(&dts) * * return result # <<<<<<<<<<<<<< * * cdef inline int64_t _normalized_stamp(pandas_datetimestruct *dts): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_result)); __pyx_r = ((PyObject *)__pyx_v_result); goto __pyx_L0; __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_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_18); __Pyx_XDECREF(__pyx_t_19); __Pyx_XDECREF(__pyx_t_20); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_deltas.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_pos.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_stamps.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_trans.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.tslib._normalize_local", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_deltas.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_pos.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_stamps.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_trans.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_result); __Pyx_XDECREF((PyObject *)__pyx_v_trans); __Pyx_XDECREF((PyObject *)__pyx_v_deltas); __Pyx_XDECREF((PyObject *)__pyx_v_pos); __Pyx_XDECREF((PyObject *)__pyx_v_dt); __Pyx_XDECREF(__pyx_v_delta); __Pyx_XDECREF(__pyx_v__pos); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/tslib.pyx":2317 * return result * * cdef inline int64_t _normalized_stamp(pandas_datetimestruct *dts): # <<<<<<<<<<<<<< * dts.hour = 0 * dts.min = 0 */ static CYTHON_INLINE __pyx_t_5numpy_int64_t __pyx_f_6pandas_5tslib__normalized_stamp(pandas_datetimestruct *__pyx_v_dts) { __pyx_t_5numpy_int64_t __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_normalized_stamp", 0); /* "pandas/tslib.pyx":2318 * * cdef inline int64_t _normalized_stamp(pandas_datetimestruct *dts): * dts.hour = 0 # <<<<<<<<<<<<<< * dts.min = 0 * dts.sec = 0 */ __pyx_v_dts->hour = 0; /* "pandas/tslib.pyx":2319 * cdef inline int64_t _normalized_stamp(pandas_datetimestruct *dts): * dts.hour = 0 * dts.min = 0 # <<<<<<<<<<<<<< * dts.sec = 0 * dts.us = 0 */ __pyx_v_dts->min = 0; /* "pandas/tslib.pyx":2320 * dts.hour = 0 * dts.min = 0 * dts.sec = 0 # <<<<<<<<<<<<<< * dts.us = 0 * dts.ps = 0 */ __pyx_v_dts->sec = 0; /* "pandas/tslib.pyx":2321 * dts.min = 0 * dts.sec = 0 * dts.us = 0 # <<<<<<<<<<<<<< * dts.ps = 0 * return pandas_datetimestruct_to_datetime(PANDAS_FR_ns, dts) */ __pyx_v_dts->us = 0; /* "pandas/tslib.pyx":2322 * dts.sec = 0 * dts.us = 0 * dts.ps = 0 # <<<<<<<<<<<<<< * return pandas_datetimestruct_to_datetime(PANDAS_FR_ns, dts) * */ __pyx_v_dts->ps = 0; /* "pandas/tslib.pyx":2323 * dts.us = 0 * dts.ps = 0 * return pandas_datetimestruct_to_datetime(PANDAS_FR_ns, dts) # <<<<<<<<<<<<<< * * */ __pyx_r = pandas_datetimestruct_to_datetime(PANDAS_FR_ns, __pyx_v_dts); goto __pyx_L0; __pyx_r = 0; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/tslib.pyx":2326 * * * cdef inline void m8_populate_tsobject(int64_t stamp, _TSObject tso, object tz): # <<<<<<<<<<<<<< * tso.value = stamp * pandas_datetime_to_datetimestruct(tso.value, PANDAS_FR_ns, &tso.dts) */ static CYTHON_INLINE void __pyx_f_6pandas_5tslib_m8_populate_tsobject(__pyx_t_5numpy_int64_t __pyx_v_stamp, struct __pyx_obj_6pandas_5tslib__TSObject *__pyx_v_tso, PyObject *__pyx_v_tz) { __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; __Pyx_RefNannySetupContext("m8_populate_tsobject", 0); /* "pandas/tslib.pyx":2327 * * cdef inline void m8_populate_tsobject(int64_t stamp, _TSObject tso, object tz): * tso.value = stamp # <<<<<<<<<<<<<< * pandas_datetime_to_datetimestruct(tso.value, PANDAS_FR_ns, &tso.dts) * */ __pyx_v_tso->value = __pyx_v_stamp; /* "pandas/tslib.pyx":2328 * cdef inline void m8_populate_tsobject(int64_t stamp, _TSObject tso, object tz): * tso.value = stamp * pandas_datetime_to_datetimestruct(tso.value, PANDAS_FR_ns, &tso.dts) # <<<<<<<<<<<<<< * * if tz is not None: */ pandas_datetime_to_datetimestruct(__pyx_v_tso->value, PANDAS_FR_ns, (&__pyx_v_tso->dts)); /* "pandas/tslib.pyx":2330 * pandas_datetime_to_datetimestruct(tso.value, PANDAS_FR_ns, &tso.dts) * * if tz is not None: # <<<<<<<<<<<<<< * _localize_tso(tso, tz) * */ __pyx_t_1 = (__pyx_v_tz != Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { /* "pandas/tslib.pyx":2331 * * if tz is not None: * _localize_tso(tso, tz) # <<<<<<<<<<<<<< * * */ __pyx_f_6pandas_5tslib__localize_tso(__pyx_v_tso, __pyx_v_tz); goto __pyx_L3; } __pyx_L3:; __Pyx_RefNannyFinishContext(); } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5tslib_67dates_normalized(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5tslib_67dates_normalized = {__Pyx_NAMESTR("dates_normalized"), (PyCFunction)__pyx_pw_6pandas_5tslib_67dates_normalized, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5tslib_67dates_normalized(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_stamps = 0; PyObject *__pyx_v_tz = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("dates_normalized (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__stamps,&__pyx_n_s__tz,0}; PyObject* values[2] = {0,0}; /* "pandas/tslib.pyx":2334 * * * def dates_normalized(ndarray[int64_t] stamps, tz=None): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = len(stamps) */ values[1] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__stamps)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__tz); if (value) { values[1] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "dates_normalized") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2334; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_stamps = ((PyArrayObject *)values[0]); __pyx_v_tz = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("dates_normalized", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2334; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.tslib.dates_normalized", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_stamps), __pyx_ptype_5numpy_ndarray, 1, "stamps", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2334; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5tslib_66dates_normalized(__pyx_self, __pyx_v_stamps, __pyx_v_tz); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5tslib_66dates_normalized(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_stamps, PyObject *__pyx_v_tz) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_n; pandas_datetimestruct __pyx_v_dts; PyObject *__pyx_v_dt = NULL; PyObject *__pyx_v_trans = NULL; PyObject *__pyx_v_deltas = NULL; PyObject *__pyx_v_pos = NULL; CYTHON_UNUSED PyObject *__pyx_v_inf = NULL; __Pyx_LocalBuf_ND __pyx_pybuffernd_stamps; __Pyx_Buffer __pyx_pybuffer_stamps; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; int __pyx_t_2; int __pyx_t_3; int __pyx_t_4; Py_ssize_t __pyx_t_5; Py_ssize_t __pyx_t_6; int __pyx_t_7; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; Py_ssize_t __pyx_t_11; PyObject *__pyx_t_12 = NULL; PyObject *__pyx_t_13 = NULL; PyObject *__pyx_t_14 = NULL; PyObject *__pyx_t_15 = NULL; PyObject *__pyx_t_16 = NULL; Py_ssize_t __pyx_t_17; Py_ssize_t __pyx_t_18; npy_datetime __pyx_t_19; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("dates_normalized", 0); __pyx_pybuffer_stamps.pybuffer.buf = NULL; __pyx_pybuffer_stamps.refcount = 0; __pyx_pybuffernd_stamps.data = NULL; __pyx_pybuffernd_stamps.rcbuffer = &__pyx_pybuffer_stamps; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_stamps.rcbuffer->pybuffer, (PyObject*)__pyx_v_stamps, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2334; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_stamps.diminfo[0].strides = __pyx_pybuffernd_stamps.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_stamps.diminfo[0].shape = __pyx_pybuffernd_stamps.rcbuffer->pybuffer.shape[0]; /* "pandas/tslib.pyx":2336 * def dates_normalized(ndarray[int64_t] stamps, tz=None): * cdef: * Py_ssize_t i, n = len(stamps) # <<<<<<<<<<<<<< * pandas_datetimestruct dts * */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_stamps)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2336; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/tslib.pyx":2339 * pandas_datetimestruct dts * * if tz is None or _is_utc(tz): # <<<<<<<<<<<<<< * for i in range(n): * pandas_datetime_to_datetimestruct(stamps[i], PANDAS_FR_ns, &dts) */ __pyx_t_2 = (__pyx_v_tz == Py_None); if (!(__pyx_t_2 != 0)) { __pyx_t_3 = (__pyx_f_6pandas_5tslib__is_utc(__pyx_v_tz) != 0); __pyx_t_4 = __pyx_t_3; } else { __pyx_t_4 = (__pyx_t_2 != 0); } if (__pyx_t_4) { /* "pandas/tslib.pyx":2340 * * if tz is None or _is_utc(tz): * for i in range(n): # <<<<<<<<<<<<<< * pandas_datetime_to_datetimestruct(stamps[i], PANDAS_FR_ns, &dts) * if (dts.hour + dts.min + dts.sec + dts.us) > 0: */ __pyx_t_1 = __pyx_v_n; for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_1; __pyx_t_5+=1) { __pyx_v_i = __pyx_t_5; /* "pandas/tslib.pyx":2341 * if tz is None or _is_utc(tz): * for i in range(n): * pandas_datetime_to_datetimestruct(stamps[i], PANDAS_FR_ns, &dts) # <<<<<<<<<<<<<< * if (dts.hour + dts.min + dts.sec + dts.us) > 0: * return False */ __pyx_t_6 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_6 < 0) { __pyx_t_6 += __pyx_pybuffernd_stamps.diminfo[0].shape; if (unlikely(__pyx_t_6 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_6 >= __pyx_pybuffernd_stamps.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2341; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } pandas_datetime_to_datetimestruct((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_stamps.rcbuffer->pybuffer.buf, __pyx_t_6, __pyx_pybuffernd_stamps.diminfo[0].strides)), PANDAS_FR_ns, (&__pyx_v_dts)); /* "pandas/tslib.pyx":2342 * for i in range(n): * pandas_datetime_to_datetimestruct(stamps[i], PANDAS_FR_ns, &dts) * if (dts.hour + dts.min + dts.sec + dts.us) > 0: # <<<<<<<<<<<<<< * return False * elif _is_tzlocal(tz): */ __pyx_t_4 = (((((__pyx_v_dts.hour + __pyx_v_dts.min) + __pyx_v_dts.sec) + __pyx_v_dts.us) > 0) != 0); if (__pyx_t_4) { /* "pandas/tslib.pyx":2343 * pandas_datetime_to_datetimestruct(stamps[i], PANDAS_FR_ns, &dts) * if (dts.hour + dts.min + dts.sec + dts.us) > 0: * return False # <<<<<<<<<<<<<< * elif _is_tzlocal(tz): * for i in range(n): */ __Pyx_XDECREF(__pyx_r); __pyx_t_8 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2343; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_r = __pyx_t_8; __pyx_t_8 = 0; goto __pyx_L0; goto __pyx_L6; } __pyx_L6:; } goto __pyx_L3; } /* "pandas/tslib.pyx":2344 * if (dts.hour + dts.min + dts.sec + dts.us) > 0: * return False * elif _is_tzlocal(tz): # <<<<<<<<<<<<<< * for i in range(n): * pandas_datetime_to_datetimestruct(stamps[i], PANDAS_FR_ns, &dts) */ __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s___is_tzlocal); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2344; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2344; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_INCREF(__pyx_v_tz); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_v_tz); __Pyx_GIVEREF(__pyx_v_tz); __pyx_t_10 = PyObject_Call(__pyx_t_8, ((PyObject *)__pyx_t_9), NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2344; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_9)); __pyx_t_9 = 0; __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_10); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2344; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; if (__pyx_t_4) { /* "pandas/tslib.pyx":2345 * return False * elif _is_tzlocal(tz): * for i in range(n): # <<<<<<<<<<<<<< * pandas_datetime_to_datetimestruct(stamps[i], PANDAS_FR_ns, &dts) * if (dts.min + dts.sec + dts.us) > 0: */ __pyx_t_1 = __pyx_v_n; for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_1; __pyx_t_5+=1) { __pyx_v_i = __pyx_t_5; /* "pandas/tslib.pyx":2346 * elif _is_tzlocal(tz): * for i in range(n): * pandas_datetime_to_datetimestruct(stamps[i], PANDAS_FR_ns, &dts) # <<<<<<<<<<<<<< * if (dts.min + dts.sec + dts.us) > 0: * return False */ __pyx_t_11 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_11 < 0) { __pyx_t_11 += __pyx_pybuffernd_stamps.diminfo[0].shape; if (unlikely(__pyx_t_11 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_11 >= __pyx_pybuffernd_stamps.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2346; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } pandas_datetime_to_datetimestruct((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_stamps.rcbuffer->pybuffer.buf, __pyx_t_11, __pyx_pybuffernd_stamps.diminfo[0].strides)), PANDAS_FR_ns, (&__pyx_v_dts)); /* "pandas/tslib.pyx":2347 * for i in range(n): * pandas_datetime_to_datetimestruct(stamps[i], PANDAS_FR_ns, &dts) * if (dts.min + dts.sec + dts.us) > 0: # <<<<<<<<<<<<<< * return False * dt = datetime(dts.year, dts.month, dts.day, dts.hour, dts.min, */ __pyx_t_4 = ((((__pyx_v_dts.min + __pyx_v_dts.sec) + __pyx_v_dts.us) > 0) != 0); if (__pyx_t_4) { /* "pandas/tslib.pyx":2348 * pandas_datetime_to_datetimestruct(stamps[i], PANDAS_FR_ns, &dts) * if (dts.min + dts.sec + dts.us) > 0: * return False # <<<<<<<<<<<<<< * dt = datetime(dts.year, dts.month, dts.day, dts.hour, dts.min, * dts.sec, dts.us, tz) */ __Pyx_XDECREF(__pyx_r); __pyx_t_10 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2348; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __pyx_r = __pyx_t_10; __pyx_t_10 = 0; goto __pyx_L0; goto __pyx_L9; } __pyx_L9:; /* "pandas/tslib.pyx":2349 * if (dts.min + dts.sec + dts.us) > 0: * return False * dt = datetime(dts.year, dts.month, dts.day, dts.hour, dts.min, # <<<<<<<<<<<<<< * dts.sec, dts.us, tz) * dt = dt + tz.utcoffset(dt) */ __pyx_t_10 = __Pyx_PyInt_to_py_npy_int64(__pyx_v_dts.year); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2349; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __pyx_t_9 = __Pyx_PyInt_to_py_npy_int32(__pyx_v_dts.month); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2349; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_t_8 = __Pyx_PyInt_to_py_npy_int32(__pyx_v_dts.day); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2349; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_12 = __Pyx_PyInt_to_py_npy_int32(__pyx_v_dts.hour); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2349; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __pyx_t_13 = __Pyx_PyInt_to_py_npy_int32(__pyx_v_dts.min); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2349; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); /* "pandas/tslib.pyx":2350 * return False * dt = datetime(dts.year, dts.month, dts.day, dts.hour, dts.min, * dts.sec, dts.us, tz) # <<<<<<<<<<<<<< * dt = dt + tz.utcoffset(dt) * if dt.hour > 0: */ __pyx_t_14 = __Pyx_PyInt_to_py_npy_int32(__pyx_v_dts.sec); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2350; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_14); __pyx_t_15 = __Pyx_PyInt_to_py_npy_int32(__pyx_v_dts.us); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2350; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_15); __pyx_t_16 = PyTuple_New(8); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2349; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_16); PyTuple_SET_ITEM(__pyx_t_16, 0, __pyx_t_10); __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_16, 1, __pyx_t_9); __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_16, 2, __pyx_t_8); __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_16, 3, __pyx_t_12); __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_16, 4, __pyx_t_13); __Pyx_GIVEREF(__pyx_t_13); PyTuple_SET_ITEM(__pyx_t_16, 5, __pyx_t_14); __Pyx_GIVEREF(__pyx_t_14); PyTuple_SET_ITEM(__pyx_t_16, 6, __pyx_t_15); __Pyx_GIVEREF(__pyx_t_15); __Pyx_INCREF(__pyx_v_tz); PyTuple_SET_ITEM(__pyx_t_16, 7, __pyx_v_tz); __Pyx_GIVEREF(__pyx_v_tz); __pyx_t_10 = 0; __pyx_t_9 = 0; __pyx_t_8 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_15 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_8datetime_datetime)), ((PyObject *)__pyx_t_16), NULL); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2349; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_15); __Pyx_DECREF(((PyObject *)__pyx_t_16)); __pyx_t_16 = 0; __Pyx_XDECREF_SET(__pyx_v_dt, __pyx_t_15); __pyx_t_15 = 0; /* "pandas/tslib.pyx":2351 * dt = datetime(dts.year, dts.month, dts.day, dts.hour, dts.min, * dts.sec, dts.us, tz) * dt = dt + tz.utcoffset(dt) # <<<<<<<<<<<<<< * if dt.hour > 0: * return False */ __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_v_tz, __pyx_n_s__utcoffset); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2351; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_15); __pyx_t_16 = PyTuple_New(1); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2351; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_16); __Pyx_INCREF(__pyx_v_dt); PyTuple_SET_ITEM(__pyx_t_16, 0, __pyx_v_dt); __Pyx_GIVEREF(__pyx_v_dt); __pyx_t_14 = PyObject_Call(__pyx_t_15, ((PyObject *)__pyx_t_16), NULL); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2351; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_14); __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_16)); __pyx_t_16 = 0; __pyx_t_16 = PyNumber_Add(__pyx_v_dt, __pyx_t_14); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2351; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_16); __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; __Pyx_DECREF_SET(__pyx_v_dt, __pyx_t_16); __pyx_t_16 = 0; /* "pandas/tslib.pyx":2352 * dts.sec, dts.us, tz) * dt = dt + tz.utcoffset(dt) * if dt.hour > 0: # <<<<<<<<<<<<<< * return False * else: */ __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_v_dt, __pyx_n_s__hour); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2352; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_16); __pyx_t_14 = PyObject_RichCompare(__pyx_t_16, __pyx_int_0, Py_GT); __Pyx_XGOTREF(__pyx_t_14); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2352; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_14); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2352; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; if (__pyx_t_4) { /* "pandas/tslib.pyx":2353 * dt = dt + tz.utcoffset(dt) * if dt.hour > 0: * return False # <<<<<<<<<<<<<< * else: * trans = _get_transitions(tz) */ __Pyx_XDECREF(__pyx_r); __pyx_t_14 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2353; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_14); __pyx_r = __pyx_t_14; __pyx_t_14 = 0; goto __pyx_L0; goto __pyx_L10; } __pyx_L10:; } goto __pyx_L3; } /*else*/ { /* "pandas/tslib.pyx":2355 * return False * else: * trans = _get_transitions(tz) # <<<<<<<<<<<<<< * deltas = _get_deltas(tz) * for i in range(n): */ __pyx_t_14 = __Pyx_GetModuleGlobalName(__pyx_n_s___get_transitions); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2355; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_14); __pyx_t_16 = PyTuple_New(1); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2355; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_16); __Pyx_INCREF(__pyx_v_tz); PyTuple_SET_ITEM(__pyx_t_16, 0, __pyx_v_tz); __Pyx_GIVEREF(__pyx_v_tz); __pyx_t_15 = PyObject_Call(__pyx_t_14, ((PyObject *)__pyx_t_16), NULL); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2355; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_15); __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_16)); __pyx_t_16 = 0; __pyx_v_trans = __pyx_t_15; __pyx_t_15 = 0; /* "pandas/tslib.pyx":2356 * else: * trans = _get_transitions(tz) * deltas = _get_deltas(tz) # <<<<<<<<<<<<<< * for i in range(n): * # Adjust datetime64 timestamp, recompute datetimestruct */ __pyx_t_15 = __Pyx_GetModuleGlobalName(__pyx_n_s___get_deltas); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2356; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_15); __pyx_t_16 = PyTuple_New(1); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2356; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_16); __Pyx_INCREF(__pyx_v_tz); PyTuple_SET_ITEM(__pyx_t_16, 0, __pyx_v_tz); __Pyx_GIVEREF(__pyx_v_tz); __pyx_t_14 = PyObject_Call(__pyx_t_15, ((PyObject *)__pyx_t_16), NULL); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2356; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_14); __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_16)); __pyx_t_16 = 0; __pyx_v_deltas = __pyx_t_14; __pyx_t_14 = 0; /* "pandas/tslib.pyx":2357 * trans = _get_transitions(tz) * deltas = _get_deltas(tz) * for i in range(n): # <<<<<<<<<<<<<< * # Adjust datetime64 timestamp, recompute datetimestruct * pos = trans.searchsorted(stamps[i]) - 1 */ __pyx_t_1 = __pyx_v_n; for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_1; __pyx_t_5+=1) { __pyx_v_i = __pyx_t_5; /* "pandas/tslib.pyx":2359 * for i in range(n): * # Adjust datetime64 timestamp, recompute datetimestruct * pos = trans.searchsorted(stamps[i]) - 1 # <<<<<<<<<<<<<< * inf = tz._transition_info[pos] * */ __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_v_trans, __pyx_n_s__searchsorted); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2359; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_14); __pyx_t_17 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_17 < 0) { __pyx_t_17 += __pyx_pybuffernd_stamps.diminfo[0].shape; if (unlikely(__pyx_t_17 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_17 >= __pyx_pybuffernd_stamps.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2359; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_16 = __Pyx_PyInt_to_py_npy_int64((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_stamps.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_stamps.diminfo[0].strides))); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2359; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_16); __pyx_t_15 = PyTuple_New(1); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2359; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_15); PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_t_16); __Pyx_GIVEREF(__pyx_t_16); __pyx_t_16 = 0; __pyx_t_16 = PyObject_Call(__pyx_t_14, ((PyObject *)__pyx_t_15), NULL); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2359; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_16); __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_15)); __pyx_t_15 = 0; __pyx_t_15 = PyNumber_Subtract(__pyx_t_16, __pyx_int_1); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2359; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_15); __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; __Pyx_XDECREF_SET(__pyx_v_pos, __pyx_t_15); __pyx_t_15 = 0; /* "pandas/tslib.pyx":2360 * # Adjust datetime64 timestamp, recompute datetimestruct * pos = trans.searchsorted(stamps[i]) - 1 * inf = tz._transition_info[pos] # <<<<<<<<<<<<<< * * pandas_datetime_to_datetimestruct(stamps[i] + deltas[pos], */ __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_v_tz, __pyx_n_s___transition_info); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2360; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_15); __pyx_t_16 = PyObject_GetItem(__pyx_t_15, __pyx_v_pos); if (!__pyx_t_16) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2360; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_16); __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; __Pyx_XDECREF_SET(__pyx_v_inf, __pyx_t_16); __pyx_t_16 = 0; /* "pandas/tslib.pyx":2362 * inf = tz._transition_info[pos] * * pandas_datetime_to_datetimestruct(stamps[i] + deltas[pos], # <<<<<<<<<<<<<< * PANDAS_FR_ns, &dts) * if (dts.hour + dts.min + dts.sec + dts.us) > 0: */ __pyx_t_18 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_18 < 0) { __pyx_t_18 += __pyx_pybuffernd_stamps.diminfo[0].shape; if (unlikely(__pyx_t_18 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_18 >= __pyx_pybuffernd_stamps.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2362; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_16 = __Pyx_PyInt_to_py_npy_int64((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_stamps.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_stamps.diminfo[0].strides))); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2362; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_16); __pyx_t_15 = PyObject_GetItem(__pyx_v_deltas, __pyx_v_pos); if (!__pyx_t_15) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2362; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_15); __pyx_t_14 = PyNumber_Add(__pyx_t_16, __pyx_t_15); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2362; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_14); __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; __pyx_t_19 = __Pyx_PyInt_from_py_npy_int64(__pyx_t_14); if (unlikely((__pyx_t_19 == (npy_datetime)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2362; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; /* "pandas/tslib.pyx":2363 * * pandas_datetime_to_datetimestruct(stamps[i] + deltas[pos], * PANDAS_FR_ns, &dts) # <<<<<<<<<<<<<< * if (dts.hour + dts.min + dts.sec + dts.us) > 0: * return False */ pandas_datetime_to_datetimestruct(__pyx_t_19, PANDAS_FR_ns, (&__pyx_v_dts)); /* "pandas/tslib.pyx":2364 * pandas_datetime_to_datetimestruct(stamps[i] + deltas[pos], * PANDAS_FR_ns, &dts) * if (dts.hour + dts.min + dts.sec + dts.us) > 0: # <<<<<<<<<<<<<< * return False * */ __pyx_t_4 = (((((__pyx_v_dts.hour + __pyx_v_dts.min) + __pyx_v_dts.sec) + __pyx_v_dts.us) > 0) != 0); if (__pyx_t_4) { /* "pandas/tslib.pyx":2365 * PANDAS_FR_ns, &dts) * if (dts.hour + dts.min + dts.sec + dts.us) > 0: * return False # <<<<<<<<<<<<<< * * return True */ __Pyx_XDECREF(__pyx_r); __pyx_t_14 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2365; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_14); __pyx_r = __pyx_t_14; __pyx_t_14 = 0; goto __pyx_L0; goto __pyx_L13; } __pyx_L13:; } } __pyx_L3:; /* "pandas/tslib.pyx":2367 * return False * * return True # <<<<<<<<<<<<<< * * # Some general helper functions */ __Pyx_XDECREF(__pyx_r); __pyx_t_14 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2367; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_14); __pyx_r = __pyx_t_14; __pyx_t_14 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); __Pyx_XDECREF(__pyx_t_10); __Pyx_XDECREF(__pyx_t_12); __Pyx_XDECREF(__pyx_t_13); __Pyx_XDECREF(__pyx_t_14); __Pyx_XDECREF(__pyx_t_15); __Pyx_XDECREF(__pyx_t_16); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_stamps.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.tslib.dates_normalized", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_stamps.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF(__pyx_v_dt); __Pyx_XDECREF(__pyx_v_trans); __Pyx_XDECREF(__pyx_v_deltas); __Pyx_XDECREF(__pyx_v_pos); __Pyx_XDECREF(__pyx_v_inf); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5tslib_69isleapyear(PyObject *__pyx_self, PyObject *__pyx_arg_year); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5tslib_69isleapyear = {__Pyx_NAMESTR("isleapyear"), (PyCFunction)__pyx_pw_6pandas_5tslib_69isleapyear, METH_O, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5tslib_69isleapyear(PyObject *__pyx_self, PyObject *__pyx_arg_year) { __pyx_t_5numpy_int64_t __pyx_v_year; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("isleapyear (wrapper)", 0); assert(__pyx_arg_year); { __pyx_v_year = __Pyx_PyInt_from_py_npy_int64(__pyx_arg_year); if (unlikely((__pyx_v_year == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2372; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; __Pyx_AddTraceback("pandas.tslib.isleapyear", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pandas_5tslib_68isleapyear(__pyx_self, ((__pyx_t_5numpy_int64_t)__pyx_v_year)); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/tslib.pyx":2372 * #---------------------------------------------------------------------- * * def isleapyear(int64_t year): # <<<<<<<<<<<<<< * return is_leapyear(year) * */ static PyObject *__pyx_pf_6pandas_5tslib_68isleapyear(CYTHON_UNUSED PyObject *__pyx_self, __pyx_t_5numpy_int64_t __pyx_v_year) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("isleapyear", 0); /* "pandas/tslib.pyx":2373 * * def isleapyear(int64_t year): * return is_leapyear(year) # <<<<<<<<<<<<<< * * def monthrange(int64_t year, int64_t month): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyInt_FromLong(is_leapyear(__pyx_v_year)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2373; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas.tslib.isleapyear", __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_5tslib_71monthrange(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5tslib_71monthrange = {__Pyx_NAMESTR("monthrange"), (PyCFunction)__pyx_pw_6pandas_5tslib_71monthrange, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5tslib_71monthrange(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { __pyx_t_5numpy_int64_t __pyx_v_year; __pyx_t_5numpy_int64_t __pyx_v_month; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("monthrange (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__year,&__pyx_n_s__month,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__year)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__month)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("monthrange", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2375; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "monthrange") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2375; __pyx_clineno = __LINE__; goto __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_year = __Pyx_PyInt_from_py_npy_int64(values[0]); if (unlikely((__pyx_v_year == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2375; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_month = __Pyx_PyInt_from_py_npy_int64(values[1]); if (unlikely((__pyx_v_month == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2375; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("monthrange", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2375; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.tslib.monthrange", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pandas_5tslib_70monthrange(__pyx_self, __pyx_v_year, __pyx_v_month); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/tslib.pyx":2375 * return is_leapyear(year) * * def monthrange(int64_t year, int64_t month): # <<<<<<<<<<<<<< * cdef: * int64_t days */ static PyObject *__pyx_pf_6pandas_5tslib_70monthrange(CYTHON_UNUSED PyObject *__pyx_self, __pyx_t_5numpy_int64_t __pyx_v_year, __pyx_t_5numpy_int64_t __pyx_v_month) { __pyx_t_5numpy_int64_t __pyx_v_days; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("monthrange", 0); /* "pandas/tslib.pyx":2380 * int64_t day_of_week * * if month < 1 or month > 12: # <<<<<<<<<<<<<< * raise ValueError("bad month number 0; must be 1-12") * */ __pyx_t_1 = ((__pyx_v_month < 1) != 0); if (!__pyx_t_1) { __pyx_t_2 = ((__pyx_v_month > 12) != 0); __pyx_t_3 = __pyx_t_2; } else { __pyx_t_3 = __pyx_t_1; } if (__pyx_t_3) { /* "pandas/tslib.pyx":2381 * * if month < 1 or month > 12: * raise ValueError("bad month number 0; must be 1-12") # <<<<<<<<<<<<<< * * days = days_per_month_table[is_leapyear(year)][month-1] */ __pyx_t_4 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_120), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2381; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 2381; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L3; } __pyx_L3:; /* "pandas/tslib.pyx":2383 * raise ValueError("bad month number 0; must be 1-12") * * days = days_per_month_table[is_leapyear(year)][month-1] # <<<<<<<<<<<<<< * * return (dayofweek(year, month, 1), days) */ __pyx_v_days = ((days_per_month_table[is_leapyear(__pyx_v_year)])[(__pyx_v_month - 1)]); /* "pandas/tslib.pyx":2385 * days = days_per_month_table[is_leapyear(year)][month-1] * * return (dayofweek(year, month, 1), days) # <<<<<<<<<<<<<< * * cdef inline int64_t ts_dayofweek(_TSObject ts): */ __Pyx_XDECREF(__pyx_r); __pyx_t_4 = PyInt_FromLong(dayofweek(__pyx_v_year, __pyx_v_month, 1)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2385; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyInt_to_py_npy_int64(__pyx_v_days); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2385; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2385; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __pyx_t_4 = 0; __pyx_t_5 = 0; __pyx_r = ((PyObject *)__pyx_t_6); __pyx_t_6 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("pandas.tslib.monthrange", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/tslib.pyx":2387 * return (dayofweek(year, month, 1), days) * * cdef inline int64_t ts_dayofweek(_TSObject ts): # <<<<<<<<<<<<<< * return dayofweek(ts.dts.year, ts.dts.month, ts.dts.day) * */ static CYTHON_INLINE __pyx_t_5numpy_int64_t __pyx_f_6pandas_5tslib_ts_dayofweek(struct __pyx_obj_6pandas_5tslib__TSObject *__pyx_v_ts) { __pyx_t_5numpy_int64_t __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("ts_dayofweek", 0); /* "pandas/tslib.pyx":2388 * * cdef inline int64_t ts_dayofweek(_TSObject ts): * return dayofweek(ts.dts.year, ts.dts.month, ts.dts.day) # <<<<<<<<<<<<<< * * */ __pyx_r = dayofweek(__pyx_v_ts->dts.year, __pyx_v_ts->dts.month, __pyx_v_ts->dts.day); goto __pyx_L0; __pyx_r = 0; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/tslib.pyx":2391 * * * cpdef normalize_date(object dt): # <<<<<<<<<<<<<< * ''' * Normalize datetime.datetime value to midnight. Returns datetime.date as a */ static PyObject *__pyx_pw_6pandas_5tslib_73normalize_date(PyObject *__pyx_self, PyObject *__pyx_v_dt); /*proto*/ static PyObject *__pyx_f_6pandas_5tslib_normalize_date(PyObject *__pyx_v_dt, CYTHON_UNUSED int __pyx_skip_dispatch) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("normalize_date", 0); /* "pandas/tslib.pyx":2400 * normalized : datetime.datetime or Timestamp * ''' * if PyDateTime_Check(dt): # <<<<<<<<<<<<<< * return dt.replace(hour=0, minute=0, second=0, microsecond=0) * elif PyDate_Check(dt): */ __pyx_t_1 = (PyDateTime_Check(__pyx_v_dt) != 0); if (__pyx_t_1) { /* "pandas/tslib.pyx":2401 * ''' * if PyDateTime_Check(dt): * return dt.replace(hour=0, minute=0, second=0, microsecond=0) # <<<<<<<<<<<<<< * elif PyDate_Check(dt): * return datetime(dt.year, dt.month, dt.day) */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_dt, __pyx_n_s__replace); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2401; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2401; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_3)); if (PyDict_SetItem(__pyx_t_3, ((PyObject *)__pyx_n_s__hour), __pyx_int_0) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2401; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (PyDict_SetItem(__pyx_t_3, ((PyObject *)__pyx_n_s__minute), __pyx_int_0) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2401; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (PyDict_SetItem(__pyx_t_3, ((PyObject *)__pyx_n_s__second), __pyx_int_0) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2401; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (PyDict_SetItem(__pyx_t_3, ((PyObject *)__pyx_n_s__microsecond), __pyx_int_0) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2401; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_4 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_empty_tuple), ((PyObject *)__pyx_t_3)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2401; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; goto __pyx_L3; } /* "pandas/tslib.pyx":2402 * if PyDateTime_Check(dt): * return dt.replace(hour=0, minute=0, second=0, microsecond=0) * elif PyDate_Check(dt): # <<<<<<<<<<<<<< * return datetime(dt.year, dt.month, dt.day) * else: */ __pyx_t_1 = (PyDate_Check(__pyx_v_dt) != 0); if (__pyx_t_1) { /* "pandas/tslib.pyx":2403 * return dt.replace(hour=0, minute=0, second=0, microsecond=0) * elif PyDate_Check(dt): * return datetime(dt.year, dt.month, dt.day) # <<<<<<<<<<<<<< * else: * raise TypeError('Unrecognized type: %s' % type(dt)) */ __Pyx_XDECREF(__pyx_r); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_dt, __pyx_n_s__year); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2403; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_dt, __pyx_n_s__month); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2403; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_dt, __pyx_n_s__day); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2403; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2403; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_4 = 0; __pyx_t_3 = 0; __pyx_t_2 = 0; __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_8datetime_datetime)), ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2403; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; goto __pyx_L3; } /*else*/ { /* "pandas/tslib.pyx":2405 * return datetime(dt.year, dt.month, dt.day) * else: * raise TypeError('Unrecognized type: %s' % type(dt)) # <<<<<<<<<<<<<< * * cdef ndarray[int64_t] localize_dt64arr_to_period(ndarray[int64_t] stamps, */ __pyx_t_2 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_121), ((PyObject *)Py_TYPE(__pyx_v_dt))); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2405; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_2)); __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2405; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_t_2)); __Pyx_GIVEREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __pyx_t_2 = PyObject_Call(__pyx_builtin_TypeError, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2405; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2405; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_L3:; __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_XDECREF(__pyx_t_5); __Pyx_AddTraceback("pandas.tslib.normalize_date", __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_5tslib_73normalize_date(PyObject *__pyx_self, PyObject *__pyx_v_dt); /*proto*/ static char __pyx_doc_6pandas_5tslib_72normalize_date[] = "\n Normalize datetime.datetime value to midnight. Returns datetime.date as a\n datetime.datetime at midnight\n\n Returns\n -------\n normalized : datetime.datetime or Timestamp\n "; static PyObject *__pyx_pw_6pandas_5tslib_73normalize_date(PyObject *__pyx_self, PyObject *__pyx_v_dt) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("normalize_date (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_5tslib_72normalize_date(__pyx_self, ((PyObject *)__pyx_v_dt)); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/tslib.pyx":2391 * * * cpdef normalize_date(object dt): # <<<<<<<<<<<<<< * ''' * Normalize datetime.datetime value to midnight. Returns datetime.date as a */ static PyObject *__pyx_pf_6pandas_5tslib_72normalize_date(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_dt) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("normalize_date", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_6pandas_5tslib_normalize_date(__pyx_v_dt, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2391; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas.tslib.normalize_date", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/tslib.pyx":2407 * raise TypeError('Unrecognized type: %s' % type(dt)) * * cdef ndarray[int64_t] localize_dt64arr_to_period(ndarray[int64_t] stamps, # <<<<<<<<<<<<<< * int freq, object tz): * cdef: */ static PyArrayObject *__pyx_f_6pandas_5tslib_localize_dt64arr_to_period(PyArrayObject *__pyx_v_stamps, int __pyx_v_freq, PyObject *__pyx_v_tz) { Py_ssize_t __pyx_v_n; PyArrayObject *__pyx_v_result = 0; PyArrayObject *__pyx_v_trans = 0; PyArrayObject *__pyx_v_deltas = 0; PyArrayObject *__pyx_v_pos = 0; pandas_datetimestruct __pyx_v_dts; Py_ssize_t __pyx_v_i; PyDateTime_DateTime *__pyx_v_dt = NULL; PyObject *__pyx_v_delta = NULL; PyObject *__pyx_v__pos = NULL; __Pyx_LocalBuf_ND __pyx_pybuffernd_deltas; __Pyx_Buffer __pyx_pybuffer_deltas; __Pyx_LocalBuf_ND __pyx_pybuffernd_pos; __Pyx_Buffer __pyx_pybuffer_pos; __Pyx_LocalBuf_ND __pyx_pybuffernd_result; __Pyx_Buffer __pyx_pybuffer_result; __Pyx_LocalBuf_ND __pyx_pybuffernd_stamps; __Pyx_Buffer __pyx_pybuffer_stamps; __Pyx_LocalBuf_ND __pyx_pybuffernd_trans; __Pyx_Buffer __pyx_pybuffer_trans; PyArrayObject *__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; int __pyx_t_9; Py_ssize_t __pyx_t_10; Py_ssize_t __pyx_t_11; int __pyx_t_12; Py_ssize_t __pyx_t_13; Py_ssize_t __pyx_t_14; __pyx_t_5numpy_int64_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; PyObject *__pyx_t_20 = NULL; PyObject *__pyx_t_21 = NULL; PyObject *__pyx_t_22 = NULL; Py_ssize_t __pyx_t_23; npy_datetime __pyx_t_24; Py_ssize_t __pyx_t_25; PyArrayObject *__pyx_t_26 = NULL; PyObject *__pyx_t_27 = NULL; PyObject *__pyx_t_28 = NULL; PyObject *__pyx_t_29 = NULL; Py_ssize_t __pyx_t_30; Py_ssize_t __pyx_t_31; Py_ssize_t __pyx_t_32; long __pyx_t_33; Py_ssize_t __pyx_t_34; Py_ssize_t __pyx_t_35; Py_ssize_t __pyx_t_36; Py_ssize_t __pyx_t_37; Py_ssize_t __pyx_t_38; __pyx_t_5numpy_int64_t __pyx_t_39; Py_ssize_t __pyx_t_40; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("localize_dt64arr_to_period", 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_trans.pybuffer.buf = NULL; __pyx_pybuffer_trans.refcount = 0; __pyx_pybuffernd_trans.data = NULL; __pyx_pybuffernd_trans.rcbuffer = &__pyx_pybuffer_trans; __pyx_pybuffer_deltas.pybuffer.buf = NULL; __pyx_pybuffer_deltas.refcount = 0; __pyx_pybuffernd_deltas.data = NULL; __pyx_pybuffernd_deltas.rcbuffer = &__pyx_pybuffer_deltas; __pyx_pybuffer_pos.pybuffer.buf = NULL; __pyx_pybuffer_pos.refcount = 0; __pyx_pybuffernd_pos.data = NULL; __pyx_pybuffernd_pos.rcbuffer = &__pyx_pybuffer_pos; __pyx_pybuffer_stamps.pybuffer.buf = NULL; __pyx_pybuffer_stamps.refcount = 0; __pyx_pybuffernd_stamps.data = NULL; __pyx_pybuffernd_stamps.rcbuffer = &__pyx_pybuffer_stamps; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_stamps.rcbuffer->pybuffer, (PyObject*)__pyx_v_stamps, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2407; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_stamps.diminfo[0].strides = __pyx_pybuffernd_stamps.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_stamps.diminfo[0].shape = __pyx_pybuffernd_stamps.rcbuffer->pybuffer.shape[0]; /* "pandas/tslib.pyx":2410 * int freq, object tz): * cdef: * Py_ssize_t n = len(stamps) # <<<<<<<<<<<<<< * ndarray[int64_t] result = np.empty(n, dtype=np.int64) * ndarray[int64_t] trans, deltas, pos */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_stamps)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2410; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/tslib.pyx":2411 * cdef: * Py_ssize_t n = len(stamps) * ndarray[int64_t] result = np.empty(n, dtype=np.int64) # <<<<<<<<<<<<<< * ndarray[int64_t] trans, deltas, pos * pandas_datetimestruct dts */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2411; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 2411; __pyx_clineno = __LINE__; goto __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_n); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2411; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2411; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2411; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_2)); __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2411; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s__int64); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2411; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__dtype), __pyx_t_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2411; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2411; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __Pyx_DECREF(((PyObject *)__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_filename = __pyx_f[0]; __pyx_lineno = 2411; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_7 = ((PyArrayObject *)__pyx_t_6); { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { __pyx_v_result = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_result.rcbuffer->pybuffer.buf = NULL; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2411; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } else {__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]; } } __pyx_t_7 = 0; __pyx_v_result = ((PyArrayObject *)__pyx_t_6); __pyx_t_6 = 0; /* "pandas/tslib.pyx":2415 * pandas_datetimestruct dts * * if not have_pytz: # <<<<<<<<<<<<<< * raise Exception('Could not find pytz module') * */ __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s__have_pytz); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2415; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2415; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_9 = ((!__pyx_t_8) != 0); if (__pyx_t_9) { /* "pandas/tslib.pyx":2416 * * if not have_pytz: * raise Exception('Could not find pytz module') # <<<<<<<<<<<<<< * * if _is_utc(tz): */ __pyx_t_6 = PyObject_Call(__pyx_builtin_Exception, ((PyObject *)__pyx_k_tuple_122), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2416; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_Raise(__pyx_t_6, 0, 0, 0); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2416; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L3; } __pyx_L3:; /* "pandas/tslib.pyx":2418 * raise Exception('Could not find pytz module') * * if _is_utc(tz): # <<<<<<<<<<<<<< * for i in range(n): * if stamps[i] == NPY_NAT: */ __pyx_t_9 = (__pyx_f_6pandas_5tslib__is_utc(__pyx_v_tz) != 0); if (__pyx_t_9) { /* "pandas/tslib.pyx":2419 * * if _is_utc(tz): * for i in range(n): # <<<<<<<<<<<<<< * if stamps[i] == NPY_NAT: * result[i] = NPY_NAT */ __pyx_t_1 = __pyx_v_n; for (__pyx_t_10 = 0; __pyx_t_10 < __pyx_t_1; __pyx_t_10+=1) { __pyx_v_i = __pyx_t_10; /* "pandas/tslib.pyx":2420 * if _is_utc(tz): * for i in range(n): * if stamps[i] == NPY_NAT: # <<<<<<<<<<<<<< * result[i] = NPY_NAT * continue */ __pyx_t_11 = __pyx_v_i; __pyx_t_12 = -1; if (__pyx_t_11 < 0) { __pyx_t_11 += __pyx_pybuffernd_stamps.diminfo[0].shape; if (unlikely(__pyx_t_11 < 0)) __pyx_t_12 = 0; } else if (unlikely(__pyx_t_11 >= __pyx_pybuffernd_stamps.diminfo[0].shape)) __pyx_t_12 = 0; if (unlikely(__pyx_t_12 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_12); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2420; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_9 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_stamps.rcbuffer->pybuffer.buf, __pyx_t_11, __pyx_pybuffernd_stamps.diminfo[0].strides)) == __pyx_v_6pandas_5tslib_NPY_NAT) != 0); if (__pyx_t_9) { /* "pandas/tslib.pyx":2421 * for i in range(n): * if stamps[i] == NPY_NAT: * result[i] = NPY_NAT # <<<<<<<<<<<<<< * continue * pandas_datetime_to_datetimestruct(stamps[i], PANDAS_FR_ns, &dts) */ __pyx_t_13 = __pyx_v_i; __pyx_t_12 = -1; if (__pyx_t_13 < 0) { __pyx_t_13 += __pyx_pybuffernd_result.diminfo[0].shape; if (unlikely(__pyx_t_13 < 0)) __pyx_t_12 = 0; } else if (unlikely(__pyx_t_13 >= __pyx_pybuffernd_result.diminfo[0].shape)) __pyx_t_12 = 0; if (unlikely(__pyx_t_12 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_12); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2421; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_result.diminfo[0].strides) = __pyx_v_6pandas_5tslib_NPY_NAT; /* "pandas/tslib.pyx":2422 * if stamps[i] == NPY_NAT: * result[i] = NPY_NAT * continue # <<<<<<<<<<<<<< * pandas_datetime_to_datetimestruct(stamps[i], PANDAS_FR_ns, &dts) * result[i] = get_period_ordinal(dts.year, dts.month, dts.day, */ goto __pyx_L5_continue; goto __pyx_L7; } __pyx_L7:; /* "pandas/tslib.pyx":2423 * result[i] = NPY_NAT * continue * pandas_datetime_to_datetimestruct(stamps[i], PANDAS_FR_ns, &dts) # <<<<<<<<<<<<<< * result[i] = get_period_ordinal(dts.year, dts.month, dts.day, * dts.hour, dts.min, dts.sec, dts.us, dts.ps, freq) */ __pyx_t_14 = __pyx_v_i; __pyx_t_12 = -1; if (__pyx_t_14 < 0) { __pyx_t_14 += __pyx_pybuffernd_stamps.diminfo[0].shape; if (unlikely(__pyx_t_14 < 0)) __pyx_t_12 = 0; } else if (unlikely(__pyx_t_14 >= __pyx_pybuffernd_stamps.diminfo[0].shape)) __pyx_t_12 = 0; if (unlikely(__pyx_t_12 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_12); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2423; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } pandas_datetime_to_datetimestruct((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_stamps.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_stamps.diminfo[0].strides)), PANDAS_FR_ns, (&__pyx_v_dts)); /* "pandas/tslib.pyx":2425 * pandas_datetime_to_datetimestruct(stamps[i], PANDAS_FR_ns, &dts) * result[i] = get_period_ordinal(dts.year, dts.month, dts.day, * dts.hour, dts.min, dts.sec, dts.us, dts.ps, freq) # <<<<<<<<<<<<<< * * elif _is_tzlocal(tz): */ __pyx_t_15 = get_period_ordinal(__pyx_v_dts.year, __pyx_v_dts.month, __pyx_v_dts.day, __pyx_v_dts.hour, __pyx_v_dts.min, __pyx_v_dts.sec, __pyx_v_dts.us, __pyx_v_dts.ps, __pyx_v_freq); if (unlikely(__pyx_t_15 == INT32_MIN)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2424; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/tslib.pyx":2424 * continue * pandas_datetime_to_datetimestruct(stamps[i], PANDAS_FR_ns, &dts) * result[i] = get_period_ordinal(dts.year, dts.month, dts.day, # <<<<<<<<<<<<<< * dts.hour, dts.min, dts.sec, dts.us, dts.ps, freq) * */ __pyx_t_16 = __pyx_v_i; __pyx_t_12 = -1; if (__pyx_t_16 < 0) { __pyx_t_16 += __pyx_pybuffernd_result.diminfo[0].shape; if (unlikely(__pyx_t_16 < 0)) __pyx_t_12 = 0; } else if (unlikely(__pyx_t_16 >= __pyx_pybuffernd_result.diminfo[0].shape)) __pyx_t_12 = 0; if (unlikely(__pyx_t_12 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_12); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2424; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_result.diminfo[0].strides) = __pyx_t_15; __pyx_L5_continue:; } goto __pyx_L4; } /* "pandas/tslib.pyx":2427 * dts.hour, dts.min, dts.sec, dts.us, dts.ps, freq) * * elif _is_tzlocal(tz): # <<<<<<<<<<<<<< * for i in range(n): * if stamps[i] == NPY_NAT: */ __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s___is_tzlocal); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2427; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2427; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_tz); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_tz); __Pyx_GIVEREF(__pyx_v_tz); __pyx_t_4 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2427; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2427; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_9) { /* "pandas/tslib.pyx":2428 * * elif _is_tzlocal(tz): * for i in range(n): # <<<<<<<<<<<<<< * if stamps[i] == NPY_NAT: * result[i] = NPY_NAT */ __pyx_t_1 = __pyx_v_n; for (__pyx_t_10 = 0; __pyx_t_10 < __pyx_t_1; __pyx_t_10+=1) { __pyx_v_i = __pyx_t_10; /* "pandas/tslib.pyx":2429 * elif _is_tzlocal(tz): * for i in range(n): * if stamps[i] == NPY_NAT: # <<<<<<<<<<<<<< * result[i] = NPY_NAT * continue */ __pyx_t_17 = __pyx_v_i; __pyx_t_12 = -1; if (__pyx_t_17 < 0) { __pyx_t_17 += __pyx_pybuffernd_stamps.diminfo[0].shape; if (unlikely(__pyx_t_17 < 0)) __pyx_t_12 = 0; } else if (unlikely(__pyx_t_17 >= __pyx_pybuffernd_stamps.diminfo[0].shape)) __pyx_t_12 = 0; if (unlikely(__pyx_t_12 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_12); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2429; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_9 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_stamps.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_stamps.diminfo[0].strides)) == __pyx_v_6pandas_5tslib_NPY_NAT) != 0); if (__pyx_t_9) { /* "pandas/tslib.pyx":2430 * for i in range(n): * if stamps[i] == NPY_NAT: * result[i] = NPY_NAT # <<<<<<<<<<<<<< * continue * pandas_datetime_to_datetimestruct(stamps[i], PANDAS_FR_ns, */ __pyx_t_18 = __pyx_v_i; __pyx_t_12 = -1; if (__pyx_t_18 < 0) { __pyx_t_18 += __pyx_pybuffernd_result.diminfo[0].shape; if (unlikely(__pyx_t_18 < 0)) __pyx_t_12 = 0; } else if (unlikely(__pyx_t_18 >= __pyx_pybuffernd_result.diminfo[0].shape)) __pyx_t_12 = 0; if (unlikely(__pyx_t_12 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_12); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2430; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_result.diminfo[0].strides) = __pyx_v_6pandas_5tslib_NPY_NAT; /* "pandas/tslib.pyx":2431 * if stamps[i] == NPY_NAT: * result[i] = NPY_NAT * continue # <<<<<<<<<<<<<< * pandas_datetime_to_datetimestruct(stamps[i], PANDAS_FR_ns, * &dts) */ goto __pyx_L8_continue; goto __pyx_L10; } __pyx_L10:; /* "pandas/tslib.pyx":2432 * result[i] = NPY_NAT * continue * pandas_datetime_to_datetimestruct(stamps[i], PANDAS_FR_ns, # <<<<<<<<<<<<<< * &dts) * dt = datetime(dts.year, dts.month, dts.day, dts.hour, */ __pyx_t_19 = __pyx_v_i; __pyx_t_12 = -1; if (__pyx_t_19 < 0) { __pyx_t_19 += __pyx_pybuffernd_stamps.diminfo[0].shape; if (unlikely(__pyx_t_19 < 0)) __pyx_t_12 = 0; } else if (unlikely(__pyx_t_19 >= __pyx_pybuffernd_stamps.diminfo[0].shape)) __pyx_t_12 = 0; if (unlikely(__pyx_t_12 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_12); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2432; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } /* "pandas/tslib.pyx":2433 * continue * pandas_datetime_to_datetimestruct(stamps[i], PANDAS_FR_ns, * &dts) # <<<<<<<<<<<<<< * dt = datetime(dts.year, dts.month, dts.day, dts.hour, * dts.min, dts.sec, dts.us, tz) */ pandas_datetime_to_datetimestruct((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_stamps.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_stamps.diminfo[0].strides)), PANDAS_FR_ns, (&__pyx_v_dts)); /* "pandas/tslib.pyx":2434 * pandas_datetime_to_datetimestruct(stamps[i], PANDAS_FR_ns, * &dts) * dt = datetime(dts.year, dts.month, dts.day, dts.hour, # <<<<<<<<<<<<<< * dts.min, dts.sec, dts.us, tz) * delta = int(total_seconds(_get_utcoffset(tz, dt))) * 1000000000 */ __pyx_t_4 = __Pyx_PyInt_to_py_npy_int64(__pyx_v_dts.year); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2434; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_2 = __Pyx_PyInt_to_py_npy_int32(__pyx_v_dts.month); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2434; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_6 = __Pyx_PyInt_to_py_npy_int32(__pyx_v_dts.day); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2434; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_3 = __Pyx_PyInt_to_py_npy_int32(__pyx_v_dts.hour); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2434; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); /* "pandas/tslib.pyx":2435 * &dts) * dt = datetime(dts.year, dts.month, dts.day, dts.hour, * dts.min, dts.sec, dts.us, tz) # <<<<<<<<<<<<<< * delta = int(total_seconds(_get_utcoffset(tz, dt))) * 1000000000 * pandas_datetime_to_datetimestruct(stamps[i] + delta, */ __pyx_t_5 = __Pyx_PyInt_to_py_npy_int32(__pyx_v_dts.min); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2435; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_20 = __Pyx_PyInt_to_py_npy_int32(__pyx_v_dts.sec); if (unlikely(!__pyx_t_20)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2435; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_20); __pyx_t_21 = __Pyx_PyInt_to_py_npy_int32(__pyx_v_dts.us); if (unlikely(!__pyx_t_21)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2435; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_21); __pyx_t_22 = PyTuple_New(8); if (unlikely(!__pyx_t_22)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2434; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_22); PyTuple_SET_ITEM(__pyx_t_22, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_22, 1, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_22, 2, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_22, 3, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_22, 4, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_22, 5, __pyx_t_20); __Pyx_GIVEREF(__pyx_t_20); PyTuple_SET_ITEM(__pyx_t_22, 6, __pyx_t_21); __Pyx_GIVEREF(__pyx_t_21); __Pyx_INCREF(__pyx_v_tz); PyTuple_SET_ITEM(__pyx_t_22, 7, __pyx_v_tz); __Pyx_GIVEREF(__pyx_v_tz); __pyx_t_4 = 0; __pyx_t_2 = 0; __pyx_t_6 = 0; __pyx_t_3 = 0; __pyx_t_5 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_21 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_8datetime_datetime)), ((PyObject *)__pyx_t_22), NULL); if (unlikely(!__pyx_t_21)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2434; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_21); __Pyx_DECREF(((PyObject *)__pyx_t_22)); __pyx_t_22 = 0; __Pyx_XDECREF_SET(__pyx_v_dt, ((PyDateTime_DateTime *)__pyx_t_21)); __pyx_t_21 = 0; /* "pandas/tslib.pyx":2436 * dt = datetime(dts.year, dts.month, dts.day, dts.hour, * dts.min, dts.sec, dts.us, tz) * delta = int(total_seconds(_get_utcoffset(tz, dt))) * 1000000000 # <<<<<<<<<<<<<< * pandas_datetime_to_datetimestruct(stamps[i] + delta, * PANDAS_FR_ns, &dts) */ __pyx_t_21 = __pyx_f_6pandas_5tslib__get_utcoffset(__pyx_v_tz, ((PyObject *)__pyx_v_dt), 0); if (unlikely(!__pyx_t_21)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2436; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_21); __pyx_t_22 = PyFloat_FromDouble(__pyx_f_6pandas_5tslib_total_seconds(__pyx_t_21)); if (unlikely(!__pyx_t_22)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2436; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_22); __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0; __pyx_t_21 = PyTuple_New(1); if (unlikely(!__pyx_t_21)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2436; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_21); PyTuple_SET_ITEM(__pyx_t_21, 0, __pyx_t_22); __Pyx_GIVEREF(__pyx_t_22); __pyx_t_22 = 0; __pyx_t_22 = PyObject_Call(((PyObject *)((PyObject*)(&PyInt_Type))), ((PyObject *)__pyx_t_21), NULL); if (unlikely(!__pyx_t_22)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2436; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_22); __Pyx_DECREF(((PyObject *)__pyx_t_21)); __pyx_t_21 = 0; __pyx_t_21 = PyNumber_Multiply(__pyx_t_22, __pyx_int_1000000000); if (unlikely(!__pyx_t_21)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2436; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_21); __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0; __Pyx_XDECREF_SET(__pyx_v_delta, __pyx_t_21); __pyx_t_21 = 0; /* "pandas/tslib.pyx":2437 * dts.min, dts.sec, dts.us, tz) * delta = int(total_seconds(_get_utcoffset(tz, dt))) * 1000000000 * pandas_datetime_to_datetimestruct(stamps[i] + delta, # <<<<<<<<<<<<<< * PANDAS_FR_ns, &dts) * result[i] = get_period_ordinal(dts.year, dts.month, dts.day, */ __pyx_t_23 = __pyx_v_i; __pyx_t_12 = -1; if (__pyx_t_23 < 0) { __pyx_t_23 += __pyx_pybuffernd_stamps.diminfo[0].shape; if (unlikely(__pyx_t_23 < 0)) __pyx_t_12 = 0; } else if (unlikely(__pyx_t_23 >= __pyx_pybuffernd_stamps.diminfo[0].shape)) __pyx_t_12 = 0; if (unlikely(__pyx_t_12 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_12); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2437; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_21 = __Pyx_PyInt_to_py_npy_int64((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_stamps.rcbuffer->pybuffer.buf, __pyx_t_23, __pyx_pybuffernd_stamps.diminfo[0].strides))); if (unlikely(!__pyx_t_21)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2437; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_21); __pyx_t_22 = PyNumber_Add(__pyx_t_21, __pyx_v_delta); if (unlikely(!__pyx_t_22)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2437; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_22); __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0; __pyx_t_24 = __Pyx_PyInt_from_py_npy_int64(__pyx_t_22); if (unlikely((__pyx_t_24 == (npy_datetime)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2437; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0; /* "pandas/tslib.pyx":2438 * delta = int(total_seconds(_get_utcoffset(tz, dt))) * 1000000000 * pandas_datetime_to_datetimestruct(stamps[i] + delta, * PANDAS_FR_ns, &dts) # <<<<<<<<<<<<<< * result[i] = get_period_ordinal(dts.year, dts.month, dts.day, * dts.hour, dts.min, dts.sec, dts.us, dts.ps, freq) */ pandas_datetime_to_datetimestruct(__pyx_t_24, PANDAS_FR_ns, (&__pyx_v_dts)); /* "pandas/tslib.pyx":2440 * PANDAS_FR_ns, &dts) * result[i] = get_period_ordinal(dts.year, dts.month, dts.day, * dts.hour, dts.min, dts.sec, dts.us, dts.ps, freq) # <<<<<<<<<<<<<< * else: * # Adjust datetime64 timestamp, recompute datetimestruct */ __pyx_t_15 = get_period_ordinal(__pyx_v_dts.year, __pyx_v_dts.month, __pyx_v_dts.day, __pyx_v_dts.hour, __pyx_v_dts.min, __pyx_v_dts.sec, __pyx_v_dts.us, __pyx_v_dts.ps, __pyx_v_freq); if (unlikely(__pyx_t_15 == INT32_MIN)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2439; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/tslib.pyx":2439 * pandas_datetime_to_datetimestruct(stamps[i] + delta, * PANDAS_FR_ns, &dts) * result[i] = get_period_ordinal(dts.year, dts.month, dts.day, # <<<<<<<<<<<<<< * dts.hour, dts.min, dts.sec, dts.us, dts.ps, freq) * else: */ __pyx_t_25 = __pyx_v_i; __pyx_t_12 = -1; if (__pyx_t_25 < 0) { __pyx_t_25 += __pyx_pybuffernd_result.diminfo[0].shape; if (unlikely(__pyx_t_25 < 0)) __pyx_t_12 = 0; } else if (unlikely(__pyx_t_25 >= __pyx_pybuffernd_result.diminfo[0].shape)) __pyx_t_12 = 0; if (unlikely(__pyx_t_12 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_12); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2439; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_25, __pyx_pybuffernd_result.diminfo[0].strides) = __pyx_t_15; __pyx_L8_continue:; } goto __pyx_L4; } /*else*/ { /* "pandas/tslib.pyx":2443 * else: * # Adjust datetime64 timestamp, recompute datetimestruct * trans = _get_transitions(tz) # <<<<<<<<<<<<<< * deltas = _get_deltas(tz) * _pos = trans.searchsorted(stamps, side='right') - 1 */ __pyx_t_22 = __Pyx_GetModuleGlobalName(__pyx_n_s___get_transitions); if (unlikely(!__pyx_t_22)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2443; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_22); __pyx_t_21 = PyTuple_New(1); if (unlikely(!__pyx_t_21)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2443; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_21); __Pyx_INCREF(__pyx_v_tz); PyTuple_SET_ITEM(__pyx_t_21, 0, __pyx_v_tz); __Pyx_GIVEREF(__pyx_v_tz); __pyx_t_20 = PyObject_Call(__pyx_t_22, ((PyObject *)__pyx_t_21), NULL); if (unlikely(!__pyx_t_20)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2443; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_20); __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_21)); __pyx_t_21 = 0; if (!(likely(((__pyx_t_20) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_20, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2443; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_26 = ((PyArrayObject *)__pyx_t_20); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_trans.rcbuffer->pybuffer); __pyx_t_12 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_trans.rcbuffer->pybuffer, (PyObject*)__pyx_t_26, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_12 < 0)) { PyErr_Fetch(&__pyx_t_27, &__pyx_t_28, &__pyx_t_29); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_trans.rcbuffer->pybuffer, (PyObject*)__pyx_v_trans, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_27); Py_XDECREF(__pyx_t_28); Py_XDECREF(__pyx_t_29); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_27, __pyx_t_28, __pyx_t_29); } } __pyx_pybuffernd_trans.diminfo[0].strides = __pyx_pybuffernd_trans.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_trans.diminfo[0].shape = __pyx_pybuffernd_trans.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_12 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2443; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_26 = 0; __pyx_v_trans = ((PyArrayObject *)__pyx_t_20); __pyx_t_20 = 0; /* "pandas/tslib.pyx":2444 * # Adjust datetime64 timestamp, recompute datetimestruct * trans = _get_transitions(tz) * deltas = _get_deltas(tz) # <<<<<<<<<<<<<< * _pos = trans.searchsorted(stamps, side='right') - 1 * if _pos.dtype != np.int64: */ __pyx_t_20 = __Pyx_GetModuleGlobalName(__pyx_n_s___get_deltas); if (unlikely(!__pyx_t_20)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2444; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_20); __pyx_t_21 = PyTuple_New(1); if (unlikely(!__pyx_t_21)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2444; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_21); __Pyx_INCREF(__pyx_v_tz); PyTuple_SET_ITEM(__pyx_t_21, 0, __pyx_v_tz); __Pyx_GIVEREF(__pyx_v_tz); __pyx_t_22 = PyObject_Call(__pyx_t_20, ((PyObject *)__pyx_t_21), NULL); if (unlikely(!__pyx_t_22)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2444; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_22); __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_21)); __pyx_t_21 = 0; if (!(likely(((__pyx_t_22) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_22, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2444; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_26 = ((PyArrayObject *)__pyx_t_22); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_deltas.rcbuffer->pybuffer); __pyx_t_12 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_deltas.rcbuffer->pybuffer, (PyObject*)__pyx_t_26, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_12 < 0)) { PyErr_Fetch(&__pyx_t_29, &__pyx_t_28, &__pyx_t_27); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_deltas.rcbuffer->pybuffer, (PyObject*)__pyx_v_deltas, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_29); Py_XDECREF(__pyx_t_28); Py_XDECREF(__pyx_t_27); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_29, __pyx_t_28, __pyx_t_27); } } __pyx_pybuffernd_deltas.diminfo[0].strides = __pyx_pybuffernd_deltas.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_deltas.diminfo[0].shape = __pyx_pybuffernd_deltas.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_12 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2444; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_26 = 0; __pyx_v_deltas = ((PyArrayObject *)__pyx_t_22); __pyx_t_22 = 0; /* "pandas/tslib.pyx":2445 * trans = _get_transitions(tz) * deltas = _get_deltas(tz) * _pos = trans.searchsorted(stamps, side='right') - 1 # <<<<<<<<<<<<<< * if _pos.dtype != np.int64: * _pos = _pos.astype(np.int64) */ __pyx_t_22 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_trans), __pyx_n_s__searchsorted); if (unlikely(!__pyx_t_22)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2445; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_22); __pyx_t_21 = PyTuple_New(1); if (unlikely(!__pyx_t_21)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2445; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_21); __Pyx_INCREF(((PyObject *)__pyx_v_stamps)); PyTuple_SET_ITEM(__pyx_t_21, 0, ((PyObject *)__pyx_v_stamps)); __Pyx_GIVEREF(((PyObject *)__pyx_v_stamps)); __pyx_t_20 = PyDict_New(); if (unlikely(!__pyx_t_20)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2445; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_20)); if (PyDict_SetItem(__pyx_t_20, ((PyObject *)__pyx_n_s__side), ((PyObject *)__pyx_n_s__right)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2445; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_5 = PyObject_Call(__pyx_t_22, ((PyObject *)__pyx_t_21), ((PyObject *)__pyx_t_20)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2445; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_21)); __pyx_t_21 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_20)); __pyx_t_20 = 0; __pyx_t_20 = PyNumber_Subtract(__pyx_t_5, __pyx_int_1); if (unlikely(!__pyx_t_20)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2445; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_20); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_v__pos = __pyx_t_20; __pyx_t_20 = 0; /* "pandas/tslib.pyx":2446 * deltas = _get_deltas(tz) * _pos = trans.searchsorted(stamps, side='right') - 1 * if _pos.dtype != np.int64: # <<<<<<<<<<<<<< * _pos = _pos.astype(np.int64) * pos = _pos */ __pyx_t_20 = __Pyx_PyObject_GetAttrStr(__pyx_v__pos, __pyx_n_s__dtype); if (unlikely(!__pyx_t_20)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2446; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_20); __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2446; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_21 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s__int64); if (unlikely(!__pyx_t_21)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2446; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_21); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyObject_RichCompare(__pyx_t_20, __pyx_t_21, Py_NE); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2446; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0; __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0; __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2446; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_9) { /* "pandas/tslib.pyx":2447 * _pos = trans.searchsorted(stamps, side='right') - 1 * if _pos.dtype != np.int64: * _pos = _pos.astype(np.int64) # <<<<<<<<<<<<<< * pos = _pos * */ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v__pos, __pyx_n_s__astype); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2447; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_21 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_21)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2447; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_21); __pyx_t_20 = __Pyx_PyObject_GetAttrStr(__pyx_t_21, __pyx_n_s__int64); if (unlikely(!__pyx_t_20)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2447; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_20); __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0; __pyx_t_21 = PyTuple_New(1); if (unlikely(!__pyx_t_21)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2447; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_21); PyTuple_SET_ITEM(__pyx_t_21, 0, __pyx_t_20); __Pyx_GIVEREF(__pyx_t_20); __pyx_t_20 = 0; __pyx_t_20 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_21), NULL); if (unlikely(!__pyx_t_20)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2447; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_20); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_21)); __pyx_t_21 = 0; __Pyx_DECREF_SET(__pyx_v__pos, __pyx_t_20); __pyx_t_20 = 0; goto __pyx_L11; } __pyx_L11:; /* "pandas/tslib.pyx":2448 * if _pos.dtype != np.int64: * _pos = _pos.astype(np.int64) * pos = _pos # <<<<<<<<<<<<<< * * # statictzinfo */ if (!(likely(((__pyx_v__pos) == Py_None) || likely(__Pyx_TypeTest(__pyx_v__pos, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2448; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_26 = ((PyArrayObject *)__pyx_v__pos); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_pos.rcbuffer->pybuffer); __pyx_t_12 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_pos.rcbuffer->pybuffer, (PyObject*)__pyx_t_26, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_12 < 0)) { PyErr_Fetch(&__pyx_t_27, &__pyx_t_28, &__pyx_t_29); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_pos.rcbuffer->pybuffer, (PyObject*)__pyx_v_pos, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_27); Py_XDECREF(__pyx_t_28); Py_XDECREF(__pyx_t_29); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_27, __pyx_t_28, __pyx_t_29); } } __pyx_pybuffernd_pos.diminfo[0].strides = __pyx_pybuffernd_pos.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_pos.diminfo[0].shape = __pyx_pybuffernd_pos.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_12 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2448; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_26 = 0; __Pyx_INCREF(__pyx_v__pos); __pyx_v_pos = ((PyArrayObject *)__pyx_v__pos); /* "pandas/tslib.pyx":2451 * * # statictzinfo * if not hasattr(tz, '_transition_info'): # <<<<<<<<<<<<<< * for i in range(n): * if stamps[i] == NPY_NAT: */ __pyx_t_9 = PyObject_HasAttr(__pyx_v_tz, ((PyObject *)__pyx_n_s___transition_info)); if (unlikely(__pyx_t_9 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2451; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_8 = ((!(__pyx_t_9 != 0)) != 0); if (__pyx_t_8) { /* "pandas/tslib.pyx":2452 * # statictzinfo * if not hasattr(tz, '_transition_info'): * for i in range(n): # <<<<<<<<<<<<<< * if stamps[i] == NPY_NAT: * result[i] = NPY_NAT */ __pyx_t_1 = __pyx_v_n; for (__pyx_t_10 = 0; __pyx_t_10 < __pyx_t_1; __pyx_t_10+=1) { __pyx_v_i = __pyx_t_10; /* "pandas/tslib.pyx":2453 * if not hasattr(tz, '_transition_info'): * for i in range(n): * if stamps[i] == NPY_NAT: # <<<<<<<<<<<<<< * result[i] = NPY_NAT * continue */ __pyx_t_30 = __pyx_v_i; __pyx_t_12 = -1; if (__pyx_t_30 < 0) { __pyx_t_30 += __pyx_pybuffernd_stamps.diminfo[0].shape; if (unlikely(__pyx_t_30 < 0)) __pyx_t_12 = 0; } else if (unlikely(__pyx_t_30 >= __pyx_pybuffernd_stamps.diminfo[0].shape)) __pyx_t_12 = 0; if (unlikely(__pyx_t_12 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_12); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2453; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_8 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_stamps.rcbuffer->pybuffer.buf, __pyx_t_30, __pyx_pybuffernd_stamps.diminfo[0].strides)) == __pyx_v_6pandas_5tslib_NPY_NAT) != 0); if (__pyx_t_8) { /* "pandas/tslib.pyx":2454 * for i in range(n): * if stamps[i] == NPY_NAT: * result[i] = NPY_NAT # <<<<<<<<<<<<<< * continue * pandas_datetime_to_datetimestruct(stamps[i] + deltas[0], */ __pyx_t_31 = __pyx_v_i; __pyx_t_12 = -1; if (__pyx_t_31 < 0) { __pyx_t_31 += __pyx_pybuffernd_result.diminfo[0].shape; if (unlikely(__pyx_t_31 < 0)) __pyx_t_12 = 0; } else if (unlikely(__pyx_t_31 >= __pyx_pybuffernd_result.diminfo[0].shape)) __pyx_t_12 = 0; if (unlikely(__pyx_t_12 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_12); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2454; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_31, __pyx_pybuffernd_result.diminfo[0].strides) = __pyx_v_6pandas_5tslib_NPY_NAT; /* "pandas/tslib.pyx":2455 * if stamps[i] == NPY_NAT: * result[i] = NPY_NAT * continue # <<<<<<<<<<<<<< * pandas_datetime_to_datetimestruct(stamps[i] + deltas[0], * PANDAS_FR_ns, &dts) */ goto __pyx_L13_continue; goto __pyx_L15; } __pyx_L15:; /* "pandas/tslib.pyx":2456 * result[i] = NPY_NAT * continue * pandas_datetime_to_datetimestruct(stamps[i] + deltas[0], # <<<<<<<<<<<<<< * PANDAS_FR_ns, &dts) * result[i] = get_period_ordinal(dts.year, dts.month, dts.day, */ __pyx_t_32 = __pyx_v_i; __pyx_t_12 = -1; if (__pyx_t_32 < 0) { __pyx_t_32 += __pyx_pybuffernd_stamps.diminfo[0].shape; if (unlikely(__pyx_t_32 < 0)) __pyx_t_12 = 0; } else if (unlikely(__pyx_t_32 >= __pyx_pybuffernd_stamps.diminfo[0].shape)) __pyx_t_12 = 0; if (unlikely(__pyx_t_12 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_12); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2456; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_33 = 0; __pyx_t_12 = -1; if (__pyx_t_33 < 0) { __pyx_t_33 += __pyx_pybuffernd_deltas.diminfo[0].shape; if (unlikely(__pyx_t_33 < 0)) __pyx_t_12 = 0; } else if (unlikely(__pyx_t_33 >= __pyx_pybuffernd_deltas.diminfo[0].shape)) __pyx_t_12 = 0; if (unlikely(__pyx_t_12 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_12); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2456; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } /* "pandas/tslib.pyx":2457 * continue * pandas_datetime_to_datetimestruct(stamps[i] + deltas[0], * PANDAS_FR_ns, &dts) # <<<<<<<<<<<<<< * result[i] = get_period_ordinal(dts.year, dts.month, dts.day, * dts.hour, dts.min, dts.sec, dts.us, dts.ps, freq) */ pandas_datetime_to_datetimestruct(((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_stamps.rcbuffer->pybuffer.buf, __pyx_t_32, __pyx_pybuffernd_stamps.diminfo[0].strides)) + (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_deltas.rcbuffer->pybuffer.buf, __pyx_t_33, __pyx_pybuffernd_deltas.diminfo[0].strides))), PANDAS_FR_ns, (&__pyx_v_dts)); /* "pandas/tslib.pyx":2459 * PANDAS_FR_ns, &dts) * result[i] = get_period_ordinal(dts.year, dts.month, dts.day, * dts.hour, dts.min, dts.sec, dts.us, dts.ps, freq) # <<<<<<<<<<<<<< * else: * for i in range(n): */ __pyx_t_15 = get_period_ordinal(__pyx_v_dts.year, __pyx_v_dts.month, __pyx_v_dts.day, __pyx_v_dts.hour, __pyx_v_dts.min, __pyx_v_dts.sec, __pyx_v_dts.us, __pyx_v_dts.ps, __pyx_v_freq); if (unlikely(__pyx_t_15 == INT32_MIN)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2458; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/tslib.pyx":2458 * pandas_datetime_to_datetimestruct(stamps[i] + deltas[0], * PANDAS_FR_ns, &dts) * result[i] = get_period_ordinal(dts.year, dts.month, dts.day, # <<<<<<<<<<<<<< * dts.hour, dts.min, dts.sec, dts.us, dts.ps, freq) * else: */ __pyx_t_34 = __pyx_v_i; __pyx_t_12 = -1; if (__pyx_t_34 < 0) { __pyx_t_34 += __pyx_pybuffernd_result.diminfo[0].shape; if (unlikely(__pyx_t_34 < 0)) __pyx_t_12 = 0; } else if (unlikely(__pyx_t_34 >= __pyx_pybuffernd_result.diminfo[0].shape)) __pyx_t_12 = 0; if (unlikely(__pyx_t_12 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_12); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2458; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_34, __pyx_pybuffernd_result.diminfo[0].strides) = __pyx_t_15; __pyx_L13_continue:; } goto __pyx_L12; } /*else*/ { /* "pandas/tslib.pyx":2461 * dts.hour, dts.min, dts.sec, dts.us, dts.ps, freq) * else: * for i in range(n): # <<<<<<<<<<<<<< * if stamps[i] == NPY_NAT: * result[i] = NPY_NAT */ __pyx_t_1 = __pyx_v_n; for (__pyx_t_10 = 0; __pyx_t_10 < __pyx_t_1; __pyx_t_10+=1) { __pyx_v_i = __pyx_t_10; /* "pandas/tslib.pyx":2462 * else: * for i in range(n): * if stamps[i] == NPY_NAT: # <<<<<<<<<<<<<< * result[i] = NPY_NAT * continue */ __pyx_t_35 = __pyx_v_i; __pyx_t_12 = -1; if (__pyx_t_35 < 0) { __pyx_t_35 += __pyx_pybuffernd_stamps.diminfo[0].shape; if (unlikely(__pyx_t_35 < 0)) __pyx_t_12 = 0; } else if (unlikely(__pyx_t_35 >= __pyx_pybuffernd_stamps.diminfo[0].shape)) __pyx_t_12 = 0; if (unlikely(__pyx_t_12 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_12); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2462; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_8 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_stamps.rcbuffer->pybuffer.buf, __pyx_t_35, __pyx_pybuffernd_stamps.diminfo[0].strides)) == __pyx_v_6pandas_5tslib_NPY_NAT) != 0); if (__pyx_t_8) { /* "pandas/tslib.pyx":2463 * for i in range(n): * if stamps[i] == NPY_NAT: * result[i] = NPY_NAT # <<<<<<<<<<<<<< * continue * pandas_datetime_to_datetimestruct(stamps[i] + deltas[pos[i]], */ __pyx_t_36 = __pyx_v_i; __pyx_t_12 = -1; if (__pyx_t_36 < 0) { __pyx_t_36 += __pyx_pybuffernd_result.diminfo[0].shape; if (unlikely(__pyx_t_36 < 0)) __pyx_t_12 = 0; } else if (unlikely(__pyx_t_36 >= __pyx_pybuffernd_result.diminfo[0].shape)) __pyx_t_12 = 0; if (unlikely(__pyx_t_12 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_12); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2463; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_36, __pyx_pybuffernd_result.diminfo[0].strides) = __pyx_v_6pandas_5tslib_NPY_NAT; /* "pandas/tslib.pyx":2464 * if stamps[i] == NPY_NAT: * result[i] = NPY_NAT * continue # <<<<<<<<<<<<<< * pandas_datetime_to_datetimestruct(stamps[i] + deltas[pos[i]], * PANDAS_FR_ns, &dts) */ goto __pyx_L16_continue; goto __pyx_L18; } __pyx_L18:; /* "pandas/tslib.pyx":2465 * result[i] = NPY_NAT * continue * pandas_datetime_to_datetimestruct(stamps[i] + deltas[pos[i]], # <<<<<<<<<<<<<< * PANDAS_FR_ns, &dts) * result[i] = get_period_ordinal(dts.year, dts.month, dts.day, */ __pyx_t_37 = __pyx_v_i; __pyx_t_12 = -1; if (__pyx_t_37 < 0) { __pyx_t_37 += __pyx_pybuffernd_stamps.diminfo[0].shape; if (unlikely(__pyx_t_37 < 0)) __pyx_t_12 = 0; } else if (unlikely(__pyx_t_37 >= __pyx_pybuffernd_stamps.diminfo[0].shape)) __pyx_t_12 = 0; if (unlikely(__pyx_t_12 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_12); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2465; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_38 = __pyx_v_i; __pyx_t_12 = -1; if (__pyx_t_38 < 0) { __pyx_t_38 += __pyx_pybuffernd_pos.diminfo[0].shape; if (unlikely(__pyx_t_38 < 0)) __pyx_t_12 = 0; } else if (unlikely(__pyx_t_38 >= __pyx_pybuffernd_pos.diminfo[0].shape)) __pyx_t_12 = 0; if (unlikely(__pyx_t_12 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_12); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2465; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_15 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_pos.rcbuffer->pybuffer.buf, __pyx_t_38, __pyx_pybuffernd_pos.diminfo[0].strides)); __pyx_t_12 = -1; if (__pyx_t_15 < 0) { __pyx_t_15 += __pyx_pybuffernd_deltas.diminfo[0].shape; if (unlikely(__pyx_t_15 < 0)) __pyx_t_12 = 0; } else if (unlikely(__pyx_t_15 >= __pyx_pybuffernd_deltas.diminfo[0].shape)) __pyx_t_12 = 0; if (unlikely(__pyx_t_12 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_12); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2465; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } /* "pandas/tslib.pyx":2466 * continue * pandas_datetime_to_datetimestruct(stamps[i] + deltas[pos[i]], * PANDAS_FR_ns, &dts) # <<<<<<<<<<<<<< * result[i] = get_period_ordinal(dts.year, dts.month, dts.day, * dts.hour, dts.min, dts.sec, dts.us, dts.ps, freq) */ pandas_datetime_to_datetimestruct(((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_stamps.rcbuffer->pybuffer.buf, __pyx_t_37, __pyx_pybuffernd_stamps.diminfo[0].strides)) + (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_deltas.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_deltas.diminfo[0].strides))), PANDAS_FR_ns, (&__pyx_v_dts)); /* "pandas/tslib.pyx":2468 * PANDAS_FR_ns, &dts) * result[i] = get_period_ordinal(dts.year, dts.month, dts.day, * dts.hour, dts.min, dts.sec, dts.us, dts.ps, freq) # <<<<<<<<<<<<<< * * return result */ __pyx_t_39 = get_period_ordinal(__pyx_v_dts.year, __pyx_v_dts.month, __pyx_v_dts.day, __pyx_v_dts.hour, __pyx_v_dts.min, __pyx_v_dts.sec, __pyx_v_dts.us, __pyx_v_dts.ps, __pyx_v_freq); if (unlikely(__pyx_t_39 == INT32_MIN)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2467; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/tslib.pyx":2467 * pandas_datetime_to_datetimestruct(stamps[i] + deltas[pos[i]], * PANDAS_FR_ns, &dts) * result[i] = get_period_ordinal(dts.year, dts.month, dts.day, # <<<<<<<<<<<<<< * dts.hour, dts.min, dts.sec, dts.us, dts.ps, freq) * */ __pyx_t_40 = __pyx_v_i; __pyx_t_12 = -1; if (__pyx_t_40 < 0) { __pyx_t_40 += __pyx_pybuffernd_result.diminfo[0].shape; if (unlikely(__pyx_t_40 < 0)) __pyx_t_12 = 0; } else if (unlikely(__pyx_t_40 >= __pyx_pybuffernd_result.diminfo[0].shape)) __pyx_t_12 = 0; if (unlikely(__pyx_t_12 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_12); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2467; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_40, __pyx_pybuffernd_result.diminfo[0].strides) = __pyx_t_39; __pyx_L16_continue:; } } __pyx_L12:; } __pyx_L4:; /* "pandas/tslib.pyx":2470 * dts.hour, dts.min, dts.sec, dts.us, dts.ps, freq) * * return result # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(((PyObject *)__pyx_r)); __Pyx_INCREF(((PyObject *)__pyx_v_result)); __pyx_r = ((PyArrayObject *)__pyx_v_result); goto __pyx_L0; __pyx_r = ((PyArrayObject *)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_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_20); __Pyx_XDECREF(__pyx_t_21); __Pyx_XDECREF(__pyx_t_22); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_deltas.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_pos.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_stamps.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_trans.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.tslib.localize_dt64arr_to_period", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_deltas.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_pos.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_stamps.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_trans.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_result); __Pyx_XDECREF((PyObject *)__pyx_v_trans); __Pyx_XDECREF((PyObject *)__pyx_v_deltas); __Pyx_XDECREF((PyObject *)__pyx_v_pos); __Pyx_XDECREF((PyObject *)__pyx_v_dt); __Pyx_XDECREF(__pyx_v_delta); __Pyx_XDECREF(__pyx_v__pos); __Pyx_XGIVEREF((PyObject *)__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/tslib.pyx":2534 * #---------------------------------------------------------------------- * * cdef inline int64_t apply_mult(int64_t period_ord, int64_t mult): # <<<<<<<<<<<<<< * """ * Get freq+multiple ordinal value from corresponding freq-only ordinal value. */ static CYTHON_INLINE __pyx_t_5numpy_int64_t __pyx_f_6pandas_5tslib_apply_mult(__pyx_t_5numpy_int64_t __pyx_v_period_ord, __pyx_t_5numpy_int64_t __pyx_v_mult) { __pyx_t_5numpy_int64_t __pyx_r; __Pyx_RefNannyDeclarations int __pyx_t_1; __pyx_t_5numpy_int64_t __pyx_t_2; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("apply_mult", 0); /* "pandas/tslib.pyx":2540 * integer). * """ * if mult == 1: # <<<<<<<<<<<<<< * return period_ord * */ __pyx_t_1 = ((__pyx_v_mult == 1) != 0); if (__pyx_t_1) { /* "pandas/tslib.pyx":2541 * """ * if mult == 1: * return period_ord # <<<<<<<<<<<<<< * * return (period_ord - 1) // mult */ __pyx_r = __pyx_v_period_ord; goto __pyx_L0; goto __pyx_L3; } __pyx_L3:; /* "pandas/tslib.pyx":2543 * return period_ord * * return (period_ord - 1) // mult # <<<<<<<<<<<<<< * * cdef inline int64_t remove_mult(int64_t period_ord_w_mult, int64_t mult): */ __pyx_t_2 = (__pyx_v_period_ord - 1); if (unlikely(__pyx_v_mult == 0)) { #ifdef WITH_THREAD PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure(); #endif PyErr_Format(PyExc_ZeroDivisionError, "integer division or modulo by zero"); #ifdef WITH_THREAD PyGILState_Release(__pyx_gilstate_save); #endif {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2543; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } else if (sizeof(__pyx_t_5numpy_int64_t) == sizeof(long) && unlikely(__pyx_v_mult == -1) && unlikely(UNARY_NEG_WOULD_OVERFLOW(__pyx_t_2))) { #ifdef WITH_THREAD PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure(); #endif PyErr_Format(PyExc_OverflowError, "value too large to perform division"); #ifdef WITH_THREAD PyGILState_Release(__pyx_gilstate_save); #endif {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2543; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_r = __Pyx_div___pyx_t_5numpy_int64_t(__pyx_t_2, __pyx_v_mult); goto __pyx_L0; __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_WriteUnraisable("pandas.tslib.apply_mult", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/tslib.pyx":2545 * return (period_ord - 1) // mult * * cdef inline int64_t remove_mult(int64_t period_ord_w_mult, int64_t mult): # <<<<<<<<<<<<<< * """ * Get freq-only ordinal value from corresponding freq+multiple ordinal. */ static CYTHON_INLINE __pyx_t_5numpy_int64_t __pyx_f_6pandas_5tslib_remove_mult(__pyx_t_5numpy_int64_t __pyx_v_period_ord_w_mult, __pyx_t_5numpy_int64_t __pyx_v_mult) { __pyx_t_5numpy_int64_t __pyx_r; __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("remove_mult", 0); /* "pandas/tslib.pyx":2549 * Get freq-only ordinal value from corresponding freq+multiple ordinal. * """ * if mult == 1: # <<<<<<<<<<<<<< * return period_ord_w_mult * */ __pyx_t_1 = ((__pyx_v_mult == 1) != 0); if (__pyx_t_1) { /* "pandas/tslib.pyx":2550 * """ * if mult == 1: * return period_ord_w_mult # <<<<<<<<<<<<<< * * return period_ord_w_mult * mult + 1; */ __pyx_r = __pyx_v_period_ord_w_mult; goto __pyx_L0; goto __pyx_L3; } __pyx_L3:; /* "pandas/tslib.pyx":2552 * return period_ord_w_mult * * return period_ord_w_mult * mult + 1; # <<<<<<<<<<<<<< * * def dt64arr_to_periodarr(ndarray[int64_t] dtarr, int freq, tz=None): */ __pyx_r = ((__pyx_v_period_ord_w_mult * __pyx_v_mult) + 1); goto __pyx_L0; __pyx_r = 0; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5tslib_75dt64arr_to_periodarr(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6pandas_5tslib_74dt64arr_to_periodarr[] = "\n Convert array of datetime64 values (passed in as 'i8' dtype) to a set of\n periods corresponding to desired frequency, per period convention.\n "; static PyMethodDef __pyx_mdef_6pandas_5tslib_75dt64arr_to_periodarr = {__Pyx_NAMESTR("dt64arr_to_periodarr"), (PyCFunction)__pyx_pw_6pandas_5tslib_75dt64arr_to_periodarr, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_5tslib_74dt64arr_to_periodarr)}; static PyObject *__pyx_pw_6pandas_5tslib_75dt64arr_to_periodarr(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_dtarr = 0; int __pyx_v_freq; PyObject *__pyx_v_tz = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("dt64arr_to_periodarr (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__dtarr,&__pyx_n_s__freq,&__pyx_n_s__tz,0}; PyObject* values[3] = {0,0,0}; /* "pandas/tslib.pyx":2554 * return period_ord_w_mult * mult + 1; * * def dt64arr_to_periodarr(ndarray[int64_t] dtarr, int freq, tz=None): # <<<<<<<<<<<<<< * """ * Convert array of datetime64 values (passed in as 'i8' dtype) to a set of */ values[2] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__dtarr)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__freq)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("dt64arr_to_periodarr", 0, 2, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2554; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__tz); if (value) { values[2] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "dt64arr_to_periodarr") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2554; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_dtarr = ((PyArrayObject *)values[0]); __pyx_v_freq = __Pyx_PyInt_AsInt(values[1]); if (unlikely((__pyx_v_freq == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2554; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_tz = values[2]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("dt64arr_to_periodarr", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2554; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.tslib.dt64arr_to_periodarr", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dtarr), __pyx_ptype_5numpy_ndarray, 1, "dtarr", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2554; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5tslib_74dt64arr_to_periodarr(__pyx_self, __pyx_v_dtarr, __pyx_v_freq, __pyx_v_tz); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5tslib_74dt64arr_to_periodarr(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_dtarr, int __pyx_v_freq, PyObject *__pyx_v_tz) { PyArrayObject *__pyx_v_out = 0; Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_l; pandas_datetimestruct __pyx_v_dts; __Pyx_LocalBuf_ND __pyx_pybuffernd_dtarr; __Pyx_Buffer __pyx_pybuffer_dtarr; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; 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; PyArrayObject *__pyx_t_6 = NULL; int __pyx_t_7; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; int __pyx_t_11; int __pyx_t_12; Py_ssize_t __pyx_t_13; Py_ssize_t __pyx_t_14; __pyx_t_5numpy_int64_t __pyx_t_15; Py_ssize_t __pyx_t_16; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("dt64arr_to_periodarr", 0); __pyx_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; __pyx_pybuffer_dtarr.pybuffer.buf = NULL; __pyx_pybuffer_dtarr.refcount = 0; __pyx_pybuffernd_dtarr.data = NULL; __pyx_pybuffernd_dtarr.rcbuffer = &__pyx_pybuffer_dtarr; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_dtarr.rcbuffer->pybuffer, (PyObject*)__pyx_v_dtarr, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2554; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_dtarr.diminfo[0].strides = __pyx_pybuffernd_dtarr.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_dtarr.diminfo[0].shape = __pyx_pybuffernd_dtarr.rcbuffer->pybuffer.shape[0]; /* "pandas/tslib.pyx":2564 * pandas_datetimestruct dts * * l = len(dtarr) # <<<<<<<<<<<<<< * * out = np.empty(l, dtype='i8') */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_dtarr)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2564; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_l = __pyx_t_1; /* "pandas/tslib.pyx":2566 * l = len(dtarr) * * out = np.empty(l, dtype='i8') # <<<<<<<<<<<<<< * * if tz is None: */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2566; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 2566; __pyx_clineno = __LINE__; goto __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_l); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2566; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2566; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2566; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_2)); if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__dtype), ((PyObject *)__pyx_n_s__i8)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2566; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_5 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2566; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2566; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_6 = ((PyArrayObject *)__pyx_t_5); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_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.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_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_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_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2566; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_6 = 0; __pyx_v_out = ((PyArrayObject *)__pyx_t_5); __pyx_t_5 = 0; /* "pandas/tslib.pyx":2568 * out = np.empty(l, dtype='i8') * * if tz is None: # <<<<<<<<<<<<<< * for i in range(l): * pandas_datetime_to_datetimestruct(dtarr[i], PANDAS_FR_ns, &dts) */ __pyx_t_11 = (__pyx_v_tz == Py_None); __pyx_t_12 = (__pyx_t_11 != 0); if (__pyx_t_12) { /* "pandas/tslib.pyx":2569 * * if tz is None: * for i in range(l): # <<<<<<<<<<<<<< * pandas_datetime_to_datetimestruct(dtarr[i], PANDAS_FR_ns, &dts) * out[i] = get_period_ordinal(dts.year, dts.month, dts.day, */ __pyx_t_1 = __pyx_v_l; for (__pyx_t_13 = 0; __pyx_t_13 < __pyx_t_1; __pyx_t_13+=1) { __pyx_v_i = __pyx_t_13; /* "pandas/tslib.pyx":2570 * if tz is None: * for i in range(l): * pandas_datetime_to_datetimestruct(dtarr[i], PANDAS_FR_ns, &dts) # <<<<<<<<<<<<<< * out[i] = get_period_ordinal(dts.year, dts.month, dts.day, * dts.hour, dts.min, dts.sec, dts.us, dts.ps, freq) */ __pyx_t_14 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_14 < 0) { __pyx_t_14 += __pyx_pybuffernd_dtarr.diminfo[0].shape; if (unlikely(__pyx_t_14 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_14 >= __pyx_pybuffernd_dtarr.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2570; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } pandas_datetime_to_datetimestruct((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_dtarr.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_dtarr.diminfo[0].strides)), PANDAS_FR_ns, (&__pyx_v_dts)); /* "pandas/tslib.pyx":2572 * pandas_datetime_to_datetimestruct(dtarr[i], PANDAS_FR_ns, &dts) * out[i] = get_period_ordinal(dts.year, dts.month, dts.day, * dts.hour, dts.min, dts.sec, dts.us, dts.ps, freq) # <<<<<<<<<<<<<< * else: * out = localize_dt64arr_to_period(dtarr, freq, tz) */ __pyx_t_15 = get_period_ordinal(__pyx_v_dts.year, __pyx_v_dts.month, __pyx_v_dts.day, __pyx_v_dts.hour, __pyx_v_dts.min, __pyx_v_dts.sec, __pyx_v_dts.us, __pyx_v_dts.ps, __pyx_v_freq); if (unlikely(__pyx_t_15 == INT32_MIN)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2571; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/tslib.pyx":2571 * for i in range(l): * pandas_datetime_to_datetimestruct(dtarr[i], PANDAS_FR_ns, &dts) * out[i] = get_period_ordinal(dts.year, dts.month, dts.day, # <<<<<<<<<<<<<< * dts.hour, dts.min, dts.sec, dts.us, dts.ps, freq) * else: */ __pyx_t_16 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_16 < 0) { __pyx_t_16 += __pyx_pybuffernd_out.diminfo[0].shape; if (unlikely(__pyx_t_16 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_16 >= __pyx_pybuffernd_out.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2571; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_out.diminfo[0].strides) = __pyx_t_15; } goto __pyx_L3; } /*else*/ { /* "pandas/tslib.pyx":2574 * dts.hour, dts.min, dts.sec, dts.us, dts.ps, freq) * else: * out = localize_dt64arr_to_period(dtarr, freq, tz) # <<<<<<<<<<<<<< * return out * */ __pyx_t_5 = ((PyObject *)__pyx_f_6pandas_5tslib_localize_dt64arr_to_period(((PyArrayObject *)__pyx_v_dtarr), __pyx_v_freq, __pyx_v_tz)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2574; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_5), &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_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.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_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_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_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2574; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __Pyx_DECREF_SET(__pyx_v_out, ((PyArrayObject *)__pyx_t_5)); __pyx_t_5 = 0; } __pyx_L3:; /* "pandas/tslib.pyx":2575 * else: * out = localize_dt64arr_to_period(dtarr, freq, tz) * return out # <<<<<<<<<<<<<< * * def periodarr_to_dt64arr(ndarray[int64_t] periodarr, int freq): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_out)); __pyx_r = ((PyObject *)__pyx_v_out); goto __pyx_L0; __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_XDECREF(__pyx_t_5); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_dtarr.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.tslib.dt64arr_to_periodarr", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_dtarr.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_out); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5tslib_77periodarr_to_dt64arr(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6pandas_5tslib_76periodarr_to_dt64arr[] = "\n Convert array to datetime64 values from a set of ordinals corresponding to\n periods per period convention.\n "; static PyMethodDef __pyx_mdef_6pandas_5tslib_77periodarr_to_dt64arr = {__Pyx_NAMESTR("periodarr_to_dt64arr"), (PyCFunction)__pyx_pw_6pandas_5tslib_77periodarr_to_dt64arr, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_5tslib_76periodarr_to_dt64arr)}; static PyObject *__pyx_pw_6pandas_5tslib_77periodarr_to_dt64arr(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_periodarr = 0; int __pyx_v_freq; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("periodarr_to_dt64arr (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__periodarr,&__pyx_n_s__freq,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__periodarr)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__freq)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("periodarr_to_dt64arr", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2577; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "periodarr_to_dt64arr") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2577; __pyx_clineno = __LINE__; goto __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_periodarr = ((PyArrayObject *)values[0]); __pyx_v_freq = __Pyx_PyInt_AsInt(values[1]); if (unlikely((__pyx_v_freq == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2577; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("periodarr_to_dt64arr", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2577; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.tslib.periodarr_to_dt64arr", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_periodarr), __pyx_ptype_5numpy_ndarray, 1, "periodarr", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2577; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5tslib_76periodarr_to_dt64arr(__pyx_self, __pyx_v_periodarr, __pyx_v_freq); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/tslib.pyx":2577 * return out * * def periodarr_to_dt64arr(ndarray[int64_t] periodarr, int freq): # <<<<<<<<<<<<<< * """ * Convert array to datetime64 values from a set of ordinals corresponding to */ static PyObject *__pyx_pf_6pandas_5tslib_76periodarr_to_dt64arr(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_periodarr, int __pyx_v_freq) { PyArrayObject *__pyx_v_out = 0; Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_l; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_periodarr; __Pyx_Buffer __pyx_pybuffer_periodarr; 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; PyArrayObject *__pyx_t_6 = NULL; 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("periodarr_to_dt64arr", 0); __pyx_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; __pyx_pybuffer_periodarr.pybuffer.buf = NULL; __pyx_pybuffer_periodarr.refcount = 0; __pyx_pybuffernd_periodarr.data = NULL; __pyx_pybuffernd_periodarr.rcbuffer = &__pyx_pybuffer_periodarr; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_periodarr.rcbuffer->pybuffer, (PyObject*)__pyx_v_periodarr, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2577; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_periodarr.diminfo[0].strides = __pyx_pybuffernd_periodarr.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_periodarr.diminfo[0].shape = __pyx_pybuffernd_periodarr.rcbuffer->pybuffer.shape[0]; /* "pandas/tslib.pyx":2586 * Py_ssize_t i, l * * l = len(periodarr) # <<<<<<<<<<<<<< * * out = np.empty(l, dtype='i8') */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_periodarr)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2586; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_l = __pyx_t_1; /* "pandas/tslib.pyx":2588 * l = len(periodarr) * * out = np.empty(l, dtype='i8') # <<<<<<<<<<<<<< * * for i in range(l): */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2588; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 2588; __pyx_clineno = __LINE__; goto __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_l); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2588; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2588; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2588; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_2)); if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__dtype), ((PyObject *)__pyx_n_s__i8)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2588; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_5 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2588; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2588; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_6 = ((PyArrayObject *)__pyx_t_5); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_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.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_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_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_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2588; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_6 = 0; __pyx_v_out = ((PyArrayObject *)__pyx_t_5); __pyx_t_5 = 0; /* "pandas/tslib.pyx":2590 * out = np.empty(l, dtype='i8') * * for i in range(l): # <<<<<<<<<<<<<< * out[i] = period_ordinal_to_dt64(periodarr[i], freq) * */ __pyx_t_1 = __pyx_v_l; for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_1; __pyx_t_11+=1) { __pyx_v_i = __pyx_t_11; /* "pandas/tslib.pyx":2591 * * for i in range(l): * out[i] = period_ordinal_to_dt64(periodarr[i], freq) # <<<<<<<<<<<<<< * * return out */ __pyx_t_12 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_12 < 0) { __pyx_t_12 += __pyx_pybuffernd_periodarr.diminfo[0].shape; if (unlikely(__pyx_t_12 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_12 >= __pyx_pybuffernd_periodarr.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2591; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_13 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_13 < 0) { __pyx_t_13 += __pyx_pybuffernd_out.diminfo[0].shape; if (unlikely(__pyx_t_13 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_13 >= __pyx_pybuffernd_out.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2591; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_out.diminfo[0].strides) = __pyx_f_6pandas_5tslib_period_ordinal_to_dt64((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_periodarr.rcbuffer->pybuffer.buf, __pyx_t_12, __pyx_pybuffernd_periodarr.diminfo[0].strides)), __pyx_v_freq, 0); } /* "pandas/tslib.pyx":2593 * out[i] = period_ordinal_to_dt64(periodarr[i], freq) * * return out # <<<<<<<<<<<<<< * * cdef char START = 'S' */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_out)); __pyx_r = ((PyObject *)__pyx_v_out); goto __pyx_L0; __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_XDECREF(__pyx_t_5); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_periodarr.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.tslib.periodarr_to_dt64arr", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_periodarr.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_out); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/tslib.pyx":2598 * cdef char END = 'E' * * cpdef int64_t period_asfreq(int64_t period_ordinal, int freq1, int freq2, # <<<<<<<<<<<<<< * bint end): * """ */ static PyObject *__pyx_pw_6pandas_5tslib_79period_asfreq(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static __pyx_t_5numpy_int64_t __pyx_f_6pandas_5tslib_period_asfreq(__pyx_t_5numpy_int64_t __pyx_v_period_ordinal, int __pyx_v_freq1, int __pyx_v_freq2, int __pyx_v_end, CYTHON_UNUSED int __pyx_skip_dispatch) { __pyx_t_5numpy_int64_t __pyx_v_retval; __pyx_t_5numpy_int64_t __pyx_r; __Pyx_RefNannyDeclarations int __pyx_t_1; __pyx_t_5numpy_int64_t __pyx_t_2; PyObject *__pyx_t_3 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("period_asfreq", 0); /* "pandas/tslib.pyx":2607 * int64_t retval * * if end: # <<<<<<<<<<<<<< * retval = asfreq(period_ordinal, freq1, freq2, END) * else: */ __pyx_t_1 = (__pyx_v_end != 0); if (__pyx_t_1) { /* "pandas/tslib.pyx":2608 * * if end: * retval = asfreq(period_ordinal, freq1, freq2, END) # <<<<<<<<<<<<<< * else: * retval = asfreq(period_ordinal, freq1, freq2, START) */ __pyx_t_2 = asfreq(__pyx_v_period_ordinal, __pyx_v_freq1, __pyx_v_freq2, __pyx_v_6pandas_5tslib_END); if (unlikely(__pyx_t_2 == INT32_MIN)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2608; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_retval = __pyx_t_2; goto __pyx_L3; } /*else*/ { /* "pandas/tslib.pyx":2610 * retval = asfreq(period_ordinal, freq1, freq2, END) * else: * retval = asfreq(period_ordinal, freq1, freq2, START) # <<<<<<<<<<<<<< * * if retval == INT32_MIN: */ __pyx_t_2 = asfreq(__pyx_v_period_ordinal, __pyx_v_freq1, __pyx_v_freq2, __pyx_v_6pandas_5tslib_START); if (unlikely(__pyx_t_2 == INT32_MIN)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2610; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_retval = __pyx_t_2; } __pyx_L3:; /* "pandas/tslib.pyx":2612 * retval = asfreq(period_ordinal, freq1, freq2, START) * * if retval == INT32_MIN: # <<<<<<<<<<<<<< * raise ValueError('Frequency conversion failed') * */ __pyx_t_1 = ((__pyx_v_retval == INT32_MIN) != 0); if (__pyx_t_1) { /* "pandas/tslib.pyx":2613 * * if retval == INT32_MIN: * raise ValueError('Frequency conversion failed') # <<<<<<<<<<<<<< * * return retval */ __pyx_t_3 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_124), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2613; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 2613; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L4; } __pyx_L4:; /* "pandas/tslib.pyx":2615 * raise ValueError('Frequency conversion failed') * * return retval # <<<<<<<<<<<<<< * * def period_asfreq_arr(ndarray[int64_t] arr, int freq1, int freq2, bint end): */ __pyx_r = __pyx_v_retval; goto __pyx_L0; __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_WriteUnraisable("pandas.tslib.period_asfreq", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5tslib_79period_asfreq(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6pandas_5tslib_78period_asfreq[] = "\n Convert period ordinal from one frequency to another, and if upsampling,\n choose to use start ('S') or end ('E') of period.\n "; static PyObject *__pyx_pw_6pandas_5tslib_79period_asfreq(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { __pyx_t_5numpy_int64_t __pyx_v_period_ordinal; int __pyx_v_freq1; int __pyx_v_freq2; int __pyx_v_end; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("period_asfreq (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__period_ordinal,&__pyx_n_s__freq1,&__pyx_n_s__freq2,&__pyx_n_s__end,0}; PyObject* values[4] = {0,0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__period_ordinal)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__freq1)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("period_asfreq", 1, 4, 4, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2598; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__freq2)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("period_asfreq", 1, 4, 4, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2598; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__end)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("period_asfreq", 1, 4, 4, 3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2598; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "period_asfreq") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2598; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 4) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[3] = PyTuple_GET_ITEM(__pyx_args, 3); } __pyx_v_period_ordinal = __Pyx_PyInt_from_py_npy_int64(values[0]); if (unlikely((__pyx_v_period_ordinal == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2598; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_freq1 = __Pyx_PyInt_AsInt(values[1]); if (unlikely((__pyx_v_freq1 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2598; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_freq2 = __Pyx_PyInt_AsInt(values[2]); if (unlikely((__pyx_v_freq2 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2598; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_end = __Pyx_PyObject_IsTrue(values[3]); if (unlikely((__pyx_v_end == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2599; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("period_asfreq", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2598; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.tslib.period_asfreq", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pandas_5tslib_78period_asfreq(__pyx_self, __pyx_v_period_ordinal, __pyx_v_freq1, __pyx_v_freq2, __pyx_v_end); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/tslib.pyx":2598 * cdef char END = 'E' * * cpdef int64_t period_asfreq(int64_t period_ordinal, int freq1, int freq2, # <<<<<<<<<<<<<< * bint end): * """ */ static PyObject *__pyx_pf_6pandas_5tslib_78period_asfreq(CYTHON_UNUSED PyObject *__pyx_self, __pyx_t_5numpy_int64_t __pyx_v_period_ordinal, int __pyx_v_freq1, int __pyx_v_freq2, int __pyx_v_end) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("period_asfreq", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyInt_to_py_npy_int64(__pyx_f_6pandas_5tslib_period_asfreq(__pyx_v_period_ordinal, __pyx_v_freq1, __pyx_v_freq2, __pyx_v_end, 0)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2598; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas.tslib.period_asfreq", __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_5tslib_81period_asfreq_arr(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6pandas_5tslib_80period_asfreq_arr[] = "\n Convert int64-array of period ordinals from one frequency to another, and\n if upsampling, choose to use start ('S') or end ('E') of period.\n "; static PyMethodDef __pyx_mdef_6pandas_5tslib_81period_asfreq_arr = {__Pyx_NAMESTR("period_asfreq_arr"), (PyCFunction)__pyx_pw_6pandas_5tslib_81period_asfreq_arr, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_5tslib_80period_asfreq_arr)}; static PyObject *__pyx_pw_6pandas_5tslib_81period_asfreq_arr(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_arr = 0; int __pyx_v_freq1; int __pyx_v_freq2; int __pyx_v_end; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("period_asfreq_arr (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__arr,&__pyx_n_s__freq1,&__pyx_n_s__freq2,&__pyx_n_s__end,0}; PyObject* values[4] = {0,0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__arr)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__freq1)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("period_asfreq_arr", 1, 4, 4, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2617; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__freq2)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("period_asfreq_arr", 1, 4, 4, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2617; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__end)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("period_asfreq_arr", 1, 4, 4, 3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2617; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "period_asfreq_arr") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2617; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 4) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[3] = PyTuple_GET_ITEM(__pyx_args, 3); } __pyx_v_arr = ((PyArrayObject *)values[0]); __pyx_v_freq1 = __Pyx_PyInt_AsInt(values[1]); if (unlikely((__pyx_v_freq1 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2617; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_freq2 = __Pyx_PyInt_AsInt(values[2]); if (unlikely((__pyx_v_freq2 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2617; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_end = __Pyx_PyObject_IsTrue(values[3]); if (unlikely((__pyx_v_end == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2617; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("period_asfreq_arr", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2617; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.tslib.period_asfreq_arr", __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_filename = __pyx_f[0]; __pyx_lineno = 2617; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5tslib_80period_asfreq_arr(__pyx_self, __pyx_v_arr, __pyx_v_freq1, __pyx_v_freq2, __pyx_v_end); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/tslib.pyx":2617 * return retval * * def period_asfreq_arr(ndarray[int64_t] arr, int freq1, int freq2, bint end): # <<<<<<<<<<<<<< * """ * Convert int64-array of period ordinals from one frequency to another, and */ static PyObject *__pyx_pf_6pandas_5tslib_80period_asfreq_arr(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_arr, int __pyx_v_freq1, int __pyx_v_freq2, int __pyx_v_end) { PyArrayObject *__pyx_v_result = 0; Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_n; freq_conv_func __pyx_v_func; asfreq_info __pyx_v_finfo; __pyx_t_5numpy_int64_t __pyx_v_val; char __pyx_v_relation; __Pyx_LocalBuf_ND __pyx_pybuffernd_arr; __Pyx_Buffer __pyx_pybuffer_arr; __Pyx_LocalBuf_ND __pyx_pybuffernd_result; __Pyx_Buffer __pyx_pybuffer_result; 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; int __pyx_t_12; Py_ssize_t __pyx_t_13; Py_ssize_t __pyx_t_14; Py_ssize_t __pyx_t_15; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("period_asfreq_arr", 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_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_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2617; __pyx_clineno = __LINE__; goto __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/tslib.pyx":2630 * char relation * * n = len(arr) # <<<<<<<<<<<<<< * result = np.empty(n, dtype=np.int64) * */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_arr)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2630; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/tslib.pyx":2631 * * n = len(arr) * result = np.empty(n, dtype=np.int64) # <<<<<<<<<<<<<< * * func = get_asfreq_func(freq1, freq2) */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2631; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 2631; __pyx_clineno = __LINE__; goto __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_n); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2631; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2631; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2631; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_2)); __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2631; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s__int64); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2631; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__dtype), __pyx_t_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2631; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2631; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __Pyx_DECREF(((PyObject *)__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_filename = __pyx_f[0]; __pyx_lineno = 2631; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_7 = ((PyArrayObject *)__pyx_t_6); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_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_result.rcbuffer->pybuffer, (PyObject*)__pyx_v_result, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_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_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_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2631; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_7 = 0; __pyx_v_result = ((PyArrayObject *)__pyx_t_6); __pyx_t_6 = 0; /* "pandas/tslib.pyx":2633 * result = np.empty(n, dtype=np.int64) * * func = get_asfreq_func(freq1, freq2) # <<<<<<<<<<<<<< * get_asfreq_info(freq1, freq2, &finfo) * */ __pyx_v_func = get_asfreq_func(__pyx_v_freq1, __pyx_v_freq2); /* "pandas/tslib.pyx":2634 * * func = get_asfreq_func(freq1, freq2) * get_asfreq_info(freq1, freq2, &finfo) # <<<<<<<<<<<<<< * * if end: */ get_asfreq_info(__pyx_v_freq1, __pyx_v_freq2, (&__pyx_v_finfo)); /* "pandas/tslib.pyx":2636 * get_asfreq_info(freq1, freq2, &finfo) * * if end: # <<<<<<<<<<<<<< * relation = END * else: */ __pyx_t_12 = (__pyx_v_end != 0); if (__pyx_t_12) { /* "pandas/tslib.pyx":2637 * * if end: * relation = END # <<<<<<<<<<<<<< * else: * relation = START */ __pyx_v_relation = __pyx_v_6pandas_5tslib_END; goto __pyx_L3; } /*else*/ { /* "pandas/tslib.pyx":2639 * relation = END * else: * relation = START # <<<<<<<<<<<<<< * * for i in range(n): */ __pyx_v_relation = __pyx_v_6pandas_5tslib_START; } __pyx_L3:; /* "pandas/tslib.pyx":2641 * relation = START * * for i in range(n): # <<<<<<<<<<<<<< * val = func(arr[i], relation, &finfo) * if val == INT32_MIN: */ __pyx_t_1 = __pyx_v_n; for (__pyx_t_13 = 0; __pyx_t_13 < __pyx_t_1; __pyx_t_13+=1) { __pyx_v_i = __pyx_t_13; /* "pandas/tslib.pyx":2642 * * for i in range(n): * val = func(arr[i], relation, &finfo) # <<<<<<<<<<<<<< * if val == INT32_MIN: * raise ValueError("Unable to convert to desired frequency.") */ __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_filename = __pyx_f[0]; __pyx_lineno = 2642; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_val = __pyx_v_func((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_arr.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_arr.diminfo[0].strides)), __pyx_v_relation, (&__pyx_v_finfo)); /* "pandas/tslib.pyx":2643 * for i in range(n): * val = func(arr[i], relation, &finfo) * if val == INT32_MIN: # <<<<<<<<<<<<<< * raise ValueError("Unable to convert to desired frequency.") * result[i] = val */ __pyx_t_12 = ((__pyx_v_val == INT32_MIN) != 0); if (__pyx_t_12) { /* "pandas/tslib.pyx":2644 * val = func(arr[i], relation, &finfo) * if val == INT32_MIN: * raise ValueError("Unable to convert to desired frequency.") # <<<<<<<<<<<<<< * result[i] = val * */ __pyx_t_6 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_126), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2644; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_Raise(__pyx_t_6, 0, 0, 0); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2644; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L6; } __pyx_L6:; /* "pandas/tslib.pyx":2645 * if val == INT32_MIN: * raise ValueError("Unable to convert to desired frequency.") * result[i] = val # <<<<<<<<<<<<<< * * return result */ __pyx_t_15 = __pyx_v_i; __pyx_t_8 = -1; if (__pyx_t_15 < 0) { __pyx_t_15 += __pyx_pybuffernd_result.diminfo[0].shape; if (unlikely(__pyx_t_15 < 0)) __pyx_t_8 = 0; } else if (unlikely(__pyx_t_15 >= __pyx_pybuffernd_result.diminfo[0].shape)) __pyx_t_8 = 0; if (unlikely(__pyx_t_8 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_8); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2645; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_result.diminfo[0].strides) = __pyx_v_val; } /* "pandas/tslib.pyx":2647 * result[i] = val * * return result # <<<<<<<<<<<<<< * * def period_ordinal(int y, int m, int d, int h, int min, int s, int us, int ps, int freq): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_result)); __pyx_r = ((PyObject *)__pyx_v_result); goto __pyx_L0; __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_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_arr.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.tslib.period_asfreq_arr", __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_result.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_result); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5tslib_83period_ordinal(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5tslib_83period_ordinal = {__Pyx_NAMESTR("period_ordinal"), (PyCFunction)__pyx_pw_6pandas_5tslib_83period_ordinal, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5tslib_83period_ordinal(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { int __pyx_v_y; int __pyx_v_m; int __pyx_v_d; int __pyx_v_h; int __pyx_v_min; int __pyx_v_s; int __pyx_v_us; int __pyx_v_ps; int __pyx_v_freq; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("period_ordinal (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__y,&__pyx_n_s__m,&__pyx_n_s__d,&__pyx_n_s__h,&__pyx_n_s__min,&__pyx_n_s__s,&__pyx_n_s__us,&__pyx_n_s__ps,&__pyx_n_s__freq,0}; PyObject* values[9] = {0,0,0,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 9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8); case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7); case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6); case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5); case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__y)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__m)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("period_ordinal", 1, 9, 9, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2649; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__d)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("period_ordinal", 1, 9, 9, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2649; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__h)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("period_ordinal", 1, 9, 9, 3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2649; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 4: if (likely((values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__min)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("period_ordinal", 1, 9, 9, 4); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2649; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 5: if (likely((values[5] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__s)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("period_ordinal", 1, 9, 9, 5); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2649; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 6: if (likely((values[6] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__us)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("period_ordinal", 1, 9, 9, 6); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2649; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 7: if (likely((values[7] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__ps)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("period_ordinal", 1, 9, 9, 7); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2649; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 8: if (likely((values[8] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__freq)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("period_ordinal", 1, 9, 9, 8); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2649; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "period_ordinal") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2649; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 9) { 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); values[6] = PyTuple_GET_ITEM(__pyx_args, 6); values[7] = PyTuple_GET_ITEM(__pyx_args, 7); values[8] = PyTuple_GET_ITEM(__pyx_args, 8); } __pyx_v_y = __Pyx_PyInt_AsInt(values[0]); if (unlikely((__pyx_v_y == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2649; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_m = __Pyx_PyInt_AsInt(values[1]); if (unlikely((__pyx_v_m == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2649; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_d = __Pyx_PyInt_AsInt(values[2]); if (unlikely((__pyx_v_d == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2649; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_h = __Pyx_PyInt_AsInt(values[3]); if (unlikely((__pyx_v_h == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2649; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_min = __Pyx_PyInt_AsInt(values[4]); if (unlikely((__pyx_v_min == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2649; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_s = __Pyx_PyInt_AsInt(values[5]); if (unlikely((__pyx_v_s == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2649; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_us = __Pyx_PyInt_AsInt(values[6]); if (unlikely((__pyx_v_us == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2649; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_ps = __Pyx_PyInt_AsInt(values[7]); if (unlikely((__pyx_v_ps == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2649; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_freq = __Pyx_PyInt_AsInt(values[8]); if (unlikely((__pyx_v_freq == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2649; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("period_ordinal", 1, 9, 9, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2649; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.tslib.period_ordinal", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pandas_5tslib_82period_ordinal(__pyx_self, __pyx_v_y, __pyx_v_m, __pyx_v_d, __pyx_v_h, __pyx_v_min, __pyx_v_s, __pyx_v_us, __pyx_v_ps, __pyx_v_freq); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/tslib.pyx":2649 * return result * * def period_ordinal(int y, int m, int d, int h, int min, int s, int us, int ps, int freq): # <<<<<<<<<<<<<< * cdef: * int64_t ordinal */ static PyObject *__pyx_pf_6pandas_5tslib_82period_ordinal(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_y, int __pyx_v_m, int __pyx_v_d, int __pyx_v_h, int __pyx_v_min, int __pyx_v_s, int __pyx_v_us, int __pyx_v_ps, int __pyx_v_freq) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __pyx_t_5numpy_int64_t __pyx_t_1; PyObject *__pyx_t_2 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("period_ordinal", 0); /* "pandas/tslib.pyx":2653 * int64_t ordinal * * return get_period_ordinal(y, m, d, h, min, s, us, ps, freq) # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = get_period_ordinal(__pyx_v_y, __pyx_v_m, __pyx_v_d, __pyx_v_h, __pyx_v_min, __pyx_v_s, __pyx_v_us, __pyx_v_ps, __pyx_v_freq); if (unlikely(__pyx_t_1 == INT32_MIN)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2653; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_2 = __Pyx_PyInt_to_py_npy_int64(__pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2653; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("pandas.tslib.period_ordinal", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/tslib.pyx":2656 * * * cpdef int64_t period_ordinal_to_dt64(int64_t ordinal, int freq): # <<<<<<<<<<<<<< * cdef: * pandas_datetimestruct dts */ static PyObject *__pyx_pw_6pandas_5tslib_85period_ordinal_to_dt64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static __pyx_t_5numpy_int64_t __pyx_f_6pandas_5tslib_period_ordinal_to_dt64(__pyx_t_5numpy_int64_t __pyx_v_ordinal, int __pyx_v_freq, CYTHON_UNUSED int __pyx_skip_dispatch) { pandas_datetimestruct __pyx_v_dts; date_info __pyx_v_dinfo; float __pyx_v_subsecond_fraction; __pyx_t_5numpy_int64_t __pyx_r; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("period_ordinal_to_dt64", 0); /* "pandas/tslib.pyx":2662 * float subsecond_fraction * * get_date_info(ordinal, freq, &dinfo) # <<<<<<<<<<<<<< * * dts.year = dinfo.year */ __pyx_t_1 = get_date_info(__pyx_v_ordinal, __pyx_v_freq, (&__pyx_v_dinfo)); if (unlikely(__pyx_t_1 == INT32_MIN)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2662; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/tslib.pyx":2664 * get_date_info(ordinal, freq, &dinfo) * * dts.year = dinfo.year # <<<<<<<<<<<<<< * dts.month = dinfo.month * dts.day = dinfo.day */ __pyx_t_1 = __pyx_v_dinfo.year; __pyx_v_dts.year = __pyx_t_1; /* "pandas/tslib.pyx":2665 * * dts.year = dinfo.year * dts.month = dinfo.month # <<<<<<<<<<<<<< * dts.day = dinfo.day * dts.hour = dinfo.hour */ __pyx_t_1 = __pyx_v_dinfo.month; __pyx_v_dts.month = __pyx_t_1; /* "pandas/tslib.pyx":2666 * dts.year = dinfo.year * dts.month = dinfo.month * dts.day = dinfo.day # <<<<<<<<<<<<<< * dts.hour = dinfo.hour * dts.min = dinfo.minute */ __pyx_t_1 = __pyx_v_dinfo.day; __pyx_v_dts.day = __pyx_t_1; /* "pandas/tslib.pyx":2667 * dts.month = dinfo.month * dts.day = dinfo.day * dts.hour = dinfo.hour # <<<<<<<<<<<<<< * dts.min = dinfo.minute * dts.sec = int(dinfo.second) */ __pyx_t_1 = __pyx_v_dinfo.hour; __pyx_v_dts.hour = __pyx_t_1; /* "pandas/tslib.pyx":2668 * dts.day = dinfo.day * dts.hour = dinfo.hour * dts.min = dinfo.minute # <<<<<<<<<<<<<< * dts.sec = int(dinfo.second) * subsecond_fraction = dinfo.second - dts.sec */ __pyx_t_1 = __pyx_v_dinfo.minute; __pyx_v_dts.min = __pyx_t_1; /* "pandas/tslib.pyx":2669 * dts.hour = dinfo.hour * dts.min = dinfo.minute * dts.sec = int(dinfo.second) # <<<<<<<<<<<<<< * subsecond_fraction = dinfo.second - dts.sec * dts.us = int((subsecond_fraction) * 1e6) */ __pyx_v_dts.sec = ((npy_int32)__pyx_v_dinfo.second); /* "pandas/tslib.pyx":2670 * dts.min = dinfo.minute * dts.sec = int(dinfo.second) * subsecond_fraction = dinfo.second - dts.sec # <<<<<<<<<<<<<< * dts.us = int((subsecond_fraction) * 1e6) * dts.ps = int(((subsecond_fraction) * 1e6 - dts.us) * 1e6) */ __pyx_v_subsecond_fraction = (__pyx_v_dinfo.second - __pyx_v_dts.sec); /* "pandas/tslib.pyx":2671 * dts.sec = int(dinfo.second) * subsecond_fraction = dinfo.second - dts.sec * dts.us = int((subsecond_fraction) * 1e6) # <<<<<<<<<<<<<< * dts.ps = int(((subsecond_fraction) * 1e6 - dts.us) * 1e6) * */ __pyx_v_dts.us = ((npy_int32)(__pyx_v_subsecond_fraction * 1e6)); /* "pandas/tslib.pyx":2672 * subsecond_fraction = dinfo.second - dts.sec * dts.us = int((subsecond_fraction) * 1e6) * dts.ps = int(((subsecond_fraction) * 1e6 - dts.us) * 1e6) # <<<<<<<<<<<<<< * * return pandas_datetimestruct_to_datetime(PANDAS_FR_ns, &dts) */ __pyx_v_dts.ps = ((npy_int32)(((__pyx_v_subsecond_fraction * 1e6) - __pyx_v_dts.us) * 1e6)); /* "pandas/tslib.pyx":2674 * dts.ps = int(((subsecond_fraction) * 1e6 - dts.us) * 1e6) * * return pandas_datetimestruct_to_datetime(PANDAS_FR_ns, &dts) # <<<<<<<<<<<<<< * * def period_format(int64_t value, int freq, object fmt=None): */ __pyx_r = pandas_datetimestruct_to_datetime(PANDAS_FR_ns, (&__pyx_v_dts)); goto __pyx_L0; __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_WriteUnraisable("pandas.tslib.period_ordinal_to_dt64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5tslib_85period_ordinal_to_dt64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_6pandas_5tslib_85period_ordinal_to_dt64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { __pyx_t_5numpy_int64_t __pyx_v_ordinal; int __pyx_v_freq; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("period_ordinal_to_dt64 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__ordinal,&__pyx_n_s__freq,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__ordinal)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__freq)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("period_ordinal_to_dt64", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2656; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "period_ordinal_to_dt64") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2656; __pyx_clineno = __LINE__; goto __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_ordinal = __Pyx_PyInt_from_py_npy_int64(values[0]); if (unlikely((__pyx_v_ordinal == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2656; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_freq = __Pyx_PyInt_AsInt(values[1]); if (unlikely((__pyx_v_freq == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2656; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("period_ordinal_to_dt64", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2656; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.tslib.period_ordinal_to_dt64", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pandas_5tslib_84period_ordinal_to_dt64(__pyx_self, __pyx_v_ordinal, __pyx_v_freq); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/tslib.pyx":2656 * * * cpdef int64_t period_ordinal_to_dt64(int64_t ordinal, int freq): # <<<<<<<<<<<<<< * cdef: * pandas_datetimestruct dts */ static PyObject *__pyx_pf_6pandas_5tslib_84period_ordinal_to_dt64(CYTHON_UNUSED PyObject *__pyx_self, __pyx_t_5numpy_int64_t __pyx_v_ordinal, int __pyx_v_freq) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("period_ordinal_to_dt64", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyInt_to_py_npy_int64(__pyx_f_6pandas_5tslib_period_ordinal_to_dt64(__pyx_v_ordinal, __pyx_v_freq, 0)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2656; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas.tslib.period_ordinal_to_dt64", __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_5tslib_87period_format(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5tslib_87period_format = {__Pyx_NAMESTR("period_format"), (PyCFunction)__pyx_pw_6pandas_5tslib_87period_format, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5tslib_87period_format(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { __pyx_t_5numpy_int64_t __pyx_v_value; int __pyx_v_freq; PyObject *__pyx_v_fmt = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("period_format (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__value,&__pyx_n_s__freq,&__pyx_n_s__fmt,0}; PyObject* values[3] = {0,0,0}; /* "pandas/tslib.pyx":2676 * return pandas_datetimestruct_to_datetime(PANDAS_FR_ns, &dts) * * def period_format(int64_t value, int freq, object fmt=None): # <<<<<<<<<<<<<< * cdef: * int freq_group */ values[2] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__value)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__freq)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("period_format", 0, 2, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2676; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__fmt); if (value) { values[2] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "period_format") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2676; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_value = __Pyx_PyInt_from_py_npy_int64(values[0]); if (unlikely((__pyx_v_value == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2676; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_freq = __Pyx_PyInt_AsInt(values[1]); if (unlikely((__pyx_v_freq == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2676; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_fmt = values[2]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("period_format", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2676; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.tslib.period_format", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pandas_5tslib_86period_format(__pyx_self, __pyx_v_value, __pyx_v_freq, __pyx_v_fmt); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5tslib_86period_format(CYTHON_UNUSED PyObject *__pyx_self, __pyx_t_5numpy_int64_t __pyx_v_value, int __pyx_v_freq, PyObject *__pyx_v_fmt) { int __pyx_v_freq_group; __pyx_t_5numpy_int64_t __pyx_v_left; __pyx_t_5numpy_int64_t __pyx_v_right; 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_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("period_format", 0); __Pyx_INCREF(__pyx_v_fmt); /* "pandas/tslib.pyx":2680 * int freq_group * * if fmt is None: # <<<<<<<<<<<<<< * freq_group = (freq // 1000) * 1000 * if freq_group == 1000: # FR_ANN */ __pyx_t_1 = (__pyx_v_fmt == Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { /* "pandas/tslib.pyx":2681 * * if fmt is None: * freq_group = (freq // 1000) * 1000 # <<<<<<<<<<<<<< * if freq_group == 1000: # FR_ANN * fmt = b'%Y' */ __pyx_v_freq_group = (__Pyx_div_long(__pyx_v_freq, 1000) * 1000); /* "pandas/tslib.pyx":2706 * elif freq_group == 11000: # MICROSEC * fmt = b'%Y-%m-%d %H:%M:%S.%u' * elif freq_group == 12000: # NANOSEC # <<<<<<<<<<<<<< * fmt = b'%Y-%m-%d %H:%M:%S.%n' * else: */ switch (__pyx_v_freq_group) { /* "pandas/tslib.pyx":2682 * if fmt is None: * freq_group = (freq // 1000) * 1000 * if freq_group == 1000: # FR_ANN # <<<<<<<<<<<<<< * fmt = b'%Y' * elif freq_group == 2000: # FR_QTR */ case 1000: /* "pandas/tslib.pyx":2683 * freq_group = (freq // 1000) * 1000 * if freq_group == 1000: # FR_ANN * fmt = b'%Y' # <<<<<<<<<<<<<< * elif freq_group == 2000: # FR_QTR * fmt = b'%FQ%q' */ __Pyx_INCREF(((PyObject *)__pyx_kp_b_127)); __Pyx_DECREF_SET(__pyx_v_fmt, ((PyObject *)__pyx_kp_b_127)); break; /* "pandas/tslib.pyx":2684 * if freq_group == 1000: # FR_ANN * fmt = b'%Y' * elif freq_group == 2000: # FR_QTR # <<<<<<<<<<<<<< * fmt = b'%FQ%q' * elif freq_group == 3000: # FR_MTH */ case 2000: /* "pandas/tslib.pyx":2685 * fmt = b'%Y' * elif freq_group == 2000: # FR_QTR * fmt = b'%FQ%q' # <<<<<<<<<<<<<< * elif freq_group == 3000: # FR_MTH * fmt = b'%Y-%m' */ __Pyx_INCREF(((PyObject *)__pyx_kp_b_128)); __Pyx_DECREF_SET(__pyx_v_fmt, ((PyObject *)__pyx_kp_b_128)); break; /* "pandas/tslib.pyx":2686 * elif freq_group == 2000: # FR_QTR * fmt = b'%FQ%q' * elif freq_group == 3000: # FR_MTH # <<<<<<<<<<<<<< * fmt = b'%Y-%m' * elif freq_group == 4000: # WK */ case 3000: /* "pandas/tslib.pyx":2687 * fmt = b'%FQ%q' * elif freq_group == 3000: # FR_MTH * fmt = b'%Y-%m' # <<<<<<<<<<<<<< * elif freq_group == 4000: # WK * left = period_asfreq(value, freq, 6000, 0) */ __Pyx_INCREF(((PyObject *)__pyx_kp_b_129)); __Pyx_DECREF_SET(__pyx_v_fmt, ((PyObject *)__pyx_kp_b_129)); break; /* "pandas/tslib.pyx":2688 * elif freq_group == 3000: # FR_MTH * fmt = b'%Y-%m' * elif freq_group == 4000: # WK # <<<<<<<<<<<<<< * left = period_asfreq(value, freq, 6000, 0) * right = period_asfreq(value, freq, 6000, 1) */ case 4000: /* "pandas/tslib.pyx":2689 * fmt = b'%Y-%m' * elif freq_group == 4000: # WK * left = period_asfreq(value, freq, 6000, 0) # <<<<<<<<<<<<<< * right = period_asfreq(value, freq, 6000, 1) * return '%s/%s' % (period_format(left, 6000), */ __pyx_v_left = __pyx_f_6pandas_5tslib_period_asfreq(__pyx_v_value, __pyx_v_freq, 6000, 0, 0); /* "pandas/tslib.pyx":2690 * elif freq_group == 4000: # WK * left = period_asfreq(value, freq, 6000, 0) * right = period_asfreq(value, freq, 6000, 1) # <<<<<<<<<<<<<< * return '%s/%s' % (period_format(left, 6000), * period_format(right, 6000)) */ __pyx_v_right = __pyx_f_6pandas_5tslib_period_asfreq(__pyx_v_value, __pyx_v_freq, 6000, 1, 0); /* "pandas/tslib.pyx":2691 * left = period_asfreq(value, freq, 6000, 0) * right = period_asfreq(value, freq, 6000, 1) * return '%s/%s' % (period_format(left, 6000), # <<<<<<<<<<<<<< * period_format(right, 6000)) * elif (freq_group == 5000 # BUS */ __Pyx_XDECREF(__pyx_r); __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s__period_format); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2691; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyInt_to_py_npy_int64(__pyx_v_left); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2691; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2691; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __Pyx_INCREF(__pyx_int_6000); PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_int_6000); __Pyx_GIVEREF(__pyx_int_6000); __pyx_t_4 = 0; __pyx_t_4 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2691; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; /* "pandas/tslib.pyx":2692 * right = period_asfreq(value, freq, 6000, 1) * return '%s/%s' % (period_format(left, 6000), * period_format(right, 6000)) # <<<<<<<<<<<<<< * elif (freq_group == 5000 # BUS * or freq_group == 6000): # DAY */ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s__period_format); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2692; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = __Pyx_PyInt_to_py_npy_int64(__pyx_v_right); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2692; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2692; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __Pyx_INCREF(__pyx_int_6000); PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_int_6000); __Pyx_GIVEREF(__pyx_int_6000); __pyx_t_3 = 0; __pyx_t_3 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2692; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0; __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2691; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_4 = 0; __pyx_t_3 = 0; __pyx_t_3 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_130), ((PyObject *)__pyx_t_6)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2691; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_3)); __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0; __pyx_r = ((PyObject *)__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L0; break; /* "pandas/tslib.pyx":2693 * return '%s/%s' % (period_format(left, 6000), * period_format(right, 6000)) * elif (freq_group == 5000 # BUS # <<<<<<<<<<<<<< * or freq_group == 6000): # DAY * fmt = b'%Y-%m-%d' */ case 5000: /* "pandas/tslib.pyx":2694 * period_format(right, 6000)) * elif (freq_group == 5000 # BUS * or freq_group == 6000): # DAY # <<<<<<<<<<<<<< * fmt = b'%Y-%m-%d' * elif freq_group == 7000: # HR */ case 6000: /* "pandas/tslib.pyx":2695 * elif (freq_group == 5000 # BUS * or freq_group == 6000): # DAY * fmt = b'%Y-%m-%d' # <<<<<<<<<<<<<< * elif freq_group == 7000: # HR * fmt = b'%Y-%m-%d %H:00' */ __Pyx_INCREF(((PyObject *)__pyx_kp_b_131)); __Pyx_DECREF_SET(__pyx_v_fmt, ((PyObject *)__pyx_kp_b_131)); break; /* "pandas/tslib.pyx":2696 * or freq_group == 6000): # DAY * fmt = b'%Y-%m-%d' * elif freq_group == 7000: # HR # <<<<<<<<<<<<<< * fmt = b'%Y-%m-%d %H:00' * elif freq_group == 8000: # MIN */ case 7000: /* "pandas/tslib.pyx":2697 * fmt = b'%Y-%m-%d' * elif freq_group == 7000: # HR * fmt = b'%Y-%m-%d %H:00' # <<<<<<<<<<<<<< * elif freq_group == 8000: # MIN * fmt = b'%Y-%m-%d %H:%M' */ __Pyx_INCREF(((PyObject *)__pyx_kp_b_132)); __Pyx_DECREF_SET(__pyx_v_fmt, ((PyObject *)__pyx_kp_b_132)); break; /* "pandas/tslib.pyx":2698 * elif freq_group == 7000: # HR * fmt = b'%Y-%m-%d %H:00' * elif freq_group == 8000: # MIN # <<<<<<<<<<<<<< * fmt = b'%Y-%m-%d %H:%M' * elif freq_group == 9000: # SEC */ case 8000: /* "pandas/tslib.pyx":2699 * fmt = b'%Y-%m-%d %H:00' * elif freq_group == 8000: # MIN * fmt = b'%Y-%m-%d %H:%M' # <<<<<<<<<<<<<< * elif freq_group == 9000: # SEC * fmt = b'%Y-%m-%d %H:%M:%S' */ __Pyx_INCREF(((PyObject *)__pyx_kp_b_133)); __Pyx_DECREF_SET(__pyx_v_fmt, ((PyObject *)__pyx_kp_b_133)); break; /* "pandas/tslib.pyx":2700 * elif freq_group == 8000: # MIN * fmt = b'%Y-%m-%d %H:%M' * elif freq_group == 9000: # SEC # <<<<<<<<<<<<<< * fmt = b'%Y-%m-%d %H:%M:%S' * elif freq_group == 10000: # MILLISEC */ case 9000: /* "pandas/tslib.pyx":2701 * fmt = b'%Y-%m-%d %H:%M' * elif freq_group == 9000: # SEC * fmt = b'%Y-%m-%d %H:%M:%S' # <<<<<<<<<<<<<< * elif freq_group == 10000: # MILLISEC * fmt = b'%Y-%m-%d %H:%M:%S.%l' */ __Pyx_INCREF(((PyObject *)__pyx_kp_b_134)); __Pyx_DECREF_SET(__pyx_v_fmt, ((PyObject *)__pyx_kp_b_134)); break; /* "pandas/tslib.pyx":2702 * elif freq_group == 9000: # SEC * fmt = b'%Y-%m-%d %H:%M:%S' * elif freq_group == 10000: # MILLISEC # <<<<<<<<<<<<<< * fmt = b'%Y-%m-%d %H:%M:%S.%l' * elif freq_group == 11000: # MICROSEC */ case 10000: /* "pandas/tslib.pyx":2703 * fmt = b'%Y-%m-%d %H:%M:%S' * elif freq_group == 10000: # MILLISEC * fmt = b'%Y-%m-%d %H:%M:%S.%l' # <<<<<<<<<<<<<< * elif freq_group == 11000: # MICROSEC * fmt = b'%Y-%m-%d %H:%M:%S.%u' */ __Pyx_INCREF(((PyObject *)__pyx_kp_b_135)); __Pyx_DECREF_SET(__pyx_v_fmt, ((PyObject *)__pyx_kp_b_135)); break; /* "pandas/tslib.pyx":2704 * elif freq_group == 10000: # MILLISEC * fmt = b'%Y-%m-%d %H:%M:%S.%l' * elif freq_group == 11000: # MICROSEC # <<<<<<<<<<<<<< * fmt = b'%Y-%m-%d %H:%M:%S.%u' * elif freq_group == 12000: # NANOSEC */ case 11000: /* "pandas/tslib.pyx":2705 * fmt = b'%Y-%m-%d %H:%M:%S.%l' * elif freq_group == 11000: # MICROSEC * fmt = b'%Y-%m-%d %H:%M:%S.%u' # <<<<<<<<<<<<<< * elif freq_group == 12000: # NANOSEC * fmt = b'%Y-%m-%d %H:%M:%S.%n' */ __Pyx_INCREF(((PyObject *)__pyx_kp_b_136)); __Pyx_DECREF_SET(__pyx_v_fmt, ((PyObject *)__pyx_kp_b_136)); break; /* "pandas/tslib.pyx":2706 * elif freq_group == 11000: # MICROSEC * fmt = b'%Y-%m-%d %H:%M:%S.%u' * elif freq_group == 12000: # NANOSEC # <<<<<<<<<<<<<< * fmt = b'%Y-%m-%d %H:%M:%S.%n' * else: */ case 12000: /* "pandas/tslib.pyx":2707 * fmt = b'%Y-%m-%d %H:%M:%S.%u' * elif freq_group == 12000: # NANOSEC * fmt = b'%Y-%m-%d %H:%M:%S.%n' # <<<<<<<<<<<<<< * else: * raise ValueError('Unknown freq: %d' % freq) */ __Pyx_INCREF(((PyObject *)__pyx_kp_b_137)); __Pyx_DECREF_SET(__pyx_v_fmt, ((PyObject *)__pyx_kp_b_137)); break; default: /* "pandas/tslib.pyx":2709 * fmt = b'%Y-%m-%d %H:%M:%S.%n' * else: * raise ValueError('Unknown freq: %d' % freq) # <<<<<<<<<<<<<< * * return _period_strftime(value, freq, fmt) */ __pyx_t_3 = PyInt_FromLong(__pyx_v_freq); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2709; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_6 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_138), __pyx_t_3); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2709; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_6)); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2709; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_t_6)); __Pyx_GIVEREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0; __pyx_t_6 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2709; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; __Pyx_Raise(__pyx_t_6, 0, 0, 0); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2709; __pyx_clineno = __LINE__; goto __pyx_L1_error;} break; } goto __pyx_L3; } __pyx_L3:; /* "pandas/tslib.pyx":2711 * raise ValueError('Unknown freq: %d' % freq) * * return _period_strftime(value, freq, fmt) # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_6 = __pyx_f_6pandas_5tslib__period_strftime(__pyx_v_value, __pyx_v_freq, __pyx_v_fmt); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2711; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_r = __pyx_t_6; __pyx_t_6 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("pandas.tslib.period_format", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_fmt); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/tslib.pyx":2723 * cdef list str_extra_fmts = ["^`AB`^", "^`CD`^", "^`EF`^", "^`GH`^", "^`IJ`^", "^`KL`^"] * * cdef object _period_strftime(int64_t value, int freq, object fmt): # <<<<<<<<<<<<<< * import sys * */ static PyObject *__pyx_f_6pandas_5tslib__period_strftime(__pyx_t_5numpy_int64_t __pyx_v_value, int __pyx_v_freq, PyObject *__pyx_v_fmt) { CYTHON_UNUSED PyObject *__pyx_v_sys = NULL; Py_ssize_t __pyx_v_i; date_info __pyx_v_dinfo; char *__pyx_v_formatted; PyObject *__pyx_v_pat = 0; PyObject *__pyx_v_repl = 0; PyObject *__pyx_v_result = 0; PyObject *__pyx_v_found_pat = 0; int __pyx_v_year; int __pyx_v_quarter; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; Py_ssize_t __pyx_t_3; int __pyx_t_4; int __pyx_t_5; Py_ssize_t __pyx_t_6; int __pyx_t_7; PyObject *__pyx_t_8 = NULL; char *__pyx_t_9; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_period_strftime", 0); __Pyx_INCREF(__pyx_v_fmt); /* "pandas/tslib.pyx":2724 * * cdef object _period_strftime(int64_t value, int freq, object fmt): * import sys # <<<<<<<<<<<<<< * * cdef: */ __pyx_t_1 = __Pyx_Import(((PyObject *)__pyx_n_s__sys), 0, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2724; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_v_sys = __pyx_t_1; __pyx_t_1 = 0; /* "pandas/tslib.pyx":2731 * char *formatted * object pat, repl, result * list found_pat = [False] * len(extra_fmts) # <<<<<<<<<<<<<< * int year, quarter * */ __pyx_t_1 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2731; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = ((PyObject *)__pyx_v_6pandas_5tslib_extra_fmts); __Pyx_INCREF(__pyx_t_2); if (unlikely(__pyx_t_2 == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2731; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_3 = PyList_GET_SIZE(__pyx_t_2); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2731; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyList_New(1 * ((__pyx_t_3<0) ? 0:__pyx_t_3)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2731; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < __pyx_t_3; __pyx_temp++) { __Pyx_INCREF(__pyx_t_1); PyList_SET_ITEM(__pyx_t_2, __pyx_temp, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); } } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_found_pat = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; /* "pandas/tslib.pyx":2734 * int year, quarter * * if PyUnicode_Check(fmt): # <<<<<<<<<<<<<< * fmt = fmt.encode('utf-8') * */ __pyx_t_4 = (PyUnicode_Check(__pyx_v_fmt) != 0); if (__pyx_t_4) { /* "pandas/tslib.pyx":2735 * * if PyUnicode_Check(fmt): * fmt = fmt.encode('utf-8') # <<<<<<<<<<<<<< * * get_date_info(value, freq, &dinfo) */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_fmt, __pyx_n_s__encode); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2735; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_k_tuple_140), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2735; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF_SET(__pyx_v_fmt, __pyx_t_1); __pyx_t_1 = 0; goto __pyx_L3; } __pyx_L3:; /* "pandas/tslib.pyx":2737 * fmt = fmt.encode('utf-8') * * get_date_info(value, freq, &dinfo) # <<<<<<<<<<<<<< * for i in range(len(extra_fmts)): * pat = extra_fmts[i][0] */ __pyx_t_5 = get_date_info(__pyx_v_value, __pyx_v_freq, (&__pyx_v_dinfo)); if (unlikely(__pyx_t_5 == INT32_MIN)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2737; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/tslib.pyx":2738 * * get_date_info(value, freq, &dinfo) * for i in range(len(extra_fmts)): # <<<<<<<<<<<<<< * pat = extra_fmts[i][0] * repl = extra_fmts[i][1] */ __pyx_t_1 = ((PyObject *)__pyx_v_6pandas_5tslib_extra_fmts); __Pyx_INCREF(__pyx_t_1); if (unlikely(__pyx_t_1 == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2738; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_3 = PyList_GET_SIZE(__pyx_t_1); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2738; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_3; __pyx_t_6+=1) { __pyx_v_i = __pyx_t_6; /* "pandas/tslib.pyx":2739 * get_date_info(value, freq, &dinfo) * for i in range(len(extra_fmts)): * pat = extra_fmts[i][0] # <<<<<<<<<<<<<< * repl = extra_fmts[i][1] * if pat in fmt: */ if (unlikely(((PyObject *)__pyx_v_6pandas_5tslib_extra_fmts) == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2739; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_1 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_6pandas_5tslib_extra_fmts), __pyx_v_i, sizeof(Py_ssize_t), PyInt_FromSsize_t, 1, 1, 1); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2739; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_1, 0, sizeof(long), PyInt_FromLong, 0, 0, 1); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2739; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF_SET(__pyx_v_pat, __pyx_t_2); __pyx_t_2 = 0; /* "pandas/tslib.pyx":2740 * for i in range(len(extra_fmts)): * pat = extra_fmts[i][0] * repl = extra_fmts[i][1] # <<<<<<<<<<<<<< * if pat in fmt: * fmt = fmt.replace(pat, repl) */ if (unlikely(((PyObject *)__pyx_v_6pandas_5tslib_extra_fmts) == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2740; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_2 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_6pandas_5tslib_extra_fmts), __pyx_v_i, sizeof(Py_ssize_t), PyInt_FromSsize_t, 1, 1, 1); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2740; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_2, 1, sizeof(long), PyInt_FromLong, 0, 0, 1); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2740; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF_SET(__pyx_v_repl, __pyx_t_1); __pyx_t_1 = 0; /* "pandas/tslib.pyx":2741 * pat = extra_fmts[i][0] * repl = extra_fmts[i][1] * if pat in fmt: # <<<<<<<<<<<<<< * fmt = fmt.replace(pat, repl) * found_pat[i] = True */ __pyx_t_4 = (__Pyx_PySequence_Contains(__pyx_v_pat, __pyx_v_fmt, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2741; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_7 = (__pyx_t_4 != 0); if (__pyx_t_7) { /* "pandas/tslib.pyx":2742 * repl = extra_fmts[i][1] * if pat in fmt: * fmt = fmt.replace(pat, repl) # <<<<<<<<<<<<<< * found_pat[i] = True * */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_fmt, __pyx_n_s__replace); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2742; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2742; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_pat); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_pat); __Pyx_GIVEREF(__pyx_v_pat); __Pyx_INCREF(__pyx_v_repl); PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_repl); __Pyx_GIVEREF(__pyx_v_repl); __pyx_t_8 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2742; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __Pyx_DECREF_SET(__pyx_v_fmt, __pyx_t_8); __pyx_t_8 = 0; /* "pandas/tslib.pyx":2743 * if pat in fmt: * fmt = fmt.replace(pat, repl) * found_pat[i] = True # <<<<<<<<<<<<<< * * formatted = c_strftime(&dinfo, fmt) */ __pyx_t_8 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2743; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); if (__Pyx_SetItemInt(((PyObject *)__pyx_v_found_pat), __pyx_v_i, __pyx_t_8, sizeof(Py_ssize_t), PyInt_FromSsize_t, 1, 1, 1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2743; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; goto __pyx_L6; } __pyx_L6:; } /* "pandas/tslib.pyx":2745 * found_pat[i] = True * * formatted = c_strftime(&dinfo, fmt) # <<<<<<<<<<<<<< * * result = util.char_to_string(formatted) */ __pyx_t_9 = __Pyx_PyObject_AsString(__pyx_v_fmt); if (unlikely((!__pyx_t_9) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2745; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_formatted = c_strftime((&__pyx_v_dinfo), ((char *)__pyx_t_9)); /* "pandas/tslib.pyx":2747 * formatted = c_strftime(&dinfo, fmt) * * result = util.char_to_string(formatted) # <<<<<<<<<<<<<< * free(formatted) * */ __pyx_t_8 = char_to_string(__pyx_v_formatted); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2747; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_v_result = __pyx_t_8; __pyx_t_8 = 0; /* "pandas/tslib.pyx":2748 * * result = util.char_to_string(formatted) * free(formatted) # <<<<<<<<<<<<<< * * for i in range(len(extra_fmts)): */ free(__pyx_v_formatted); /* "pandas/tslib.pyx":2750 * free(formatted) * * for i in range(len(extra_fmts)): # <<<<<<<<<<<<<< * if found_pat[i]: * if get_yq(value, freq, &quarter, &year) < 0: */ __pyx_t_8 = ((PyObject *)__pyx_v_6pandas_5tslib_extra_fmts); __Pyx_INCREF(__pyx_t_8); if (unlikely(__pyx_t_8 == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2750; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_3 = PyList_GET_SIZE(__pyx_t_8); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2750; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_3; __pyx_t_6+=1) { __pyx_v_i = __pyx_t_6; /* "pandas/tslib.pyx":2751 * * for i in range(len(extra_fmts)): * if found_pat[i]: # <<<<<<<<<<<<<< * if get_yq(value, freq, &quarter, &year) < 0: * raise ValueError('Unable to get quarter and year') */ __pyx_t_8 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_found_pat), __pyx_v_i, sizeof(Py_ssize_t), PyInt_FromSsize_t, 1, 1, 1); if (!__pyx_t_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2751; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2751; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (__pyx_t_7) { /* "pandas/tslib.pyx":2752 * for i in range(len(extra_fmts)): * if found_pat[i]: * if get_yq(value, freq, &quarter, &year) < 0: # <<<<<<<<<<<<<< * raise ValueError('Unable to get quarter and year') * */ __pyx_t_7 = ((get_yq(__pyx_v_value, __pyx_v_freq, (&__pyx_v_quarter), (&__pyx_v_year)) < 0) != 0); if (__pyx_t_7) { /* "pandas/tslib.pyx":2753 * if found_pat[i]: * if get_yq(value, freq, &quarter, &year) < 0: * raise ValueError('Unable to get quarter and year') # <<<<<<<<<<<<<< * * if i == 0: */ __pyx_t_8 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_142), NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2753; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_Raise(__pyx_t_8, 0, 0, 0); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2753; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L10; } __pyx_L10:; /* "pandas/tslib.pyx":2765 * elif i == 4: * repl = '%06d' % (value % 1000000) * elif i == 5: # <<<<<<<<<<<<<< * repl = '%09d' % (value % 1000000000) * */ switch (__pyx_v_i) { /* "pandas/tslib.pyx":2755 * raise ValueError('Unable to get quarter and year') * * if i == 0: # <<<<<<<<<<<<<< * repl = '%d' % quarter * elif i == 1: # %f, 2-digit year */ case 0: /* "pandas/tslib.pyx":2756 * * if i == 0: * repl = '%d' % quarter # <<<<<<<<<<<<<< * elif i == 1: # %f, 2-digit year * repl = '%.2d' % (year % 100) */ __pyx_t_8 = PyInt_FromLong(__pyx_v_quarter); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2756; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_2 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_143), __pyx_t_8); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2756; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_2)); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_XDECREF_SET(__pyx_v_repl, ((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; break; /* "pandas/tslib.pyx":2757 * if i == 0: * repl = '%d' % quarter * elif i == 1: # %f, 2-digit year # <<<<<<<<<<<<<< * repl = '%.2d' % (year % 100) * elif i == 2: */ case 1: /* "pandas/tslib.pyx":2758 * repl = '%d' % quarter * elif i == 1: # %f, 2-digit year * repl = '%.2d' % (year % 100) # <<<<<<<<<<<<<< * elif i == 2: * repl = '%d' % year */ __pyx_t_2 = PyInt_FromLong(__Pyx_mod_long(__pyx_v_year, 100)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2758; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_8 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_144), __pyx_t_2); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2758; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_8)); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF_SET(__pyx_v_repl, ((PyObject *)__pyx_t_8)); __pyx_t_8 = 0; break; /* "pandas/tslib.pyx":2759 * elif i == 1: # %f, 2-digit year * repl = '%.2d' % (year % 100) * elif i == 2: # <<<<<<<<<<<<<< * repl = '%d' % year * elif i == 3: */ case 2: /* "pandas/tslib.pyx":2760 * repl = '%.2d' % (year % 100) * elif i == 2: * repl = '%d' % year # <<<<<<<<<<<<<< * elif i == 3: * repl = '%03d' % (value % 1000) */ __pyx_t_8 = PyInt_FromLong(__pyx_v_year); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2760; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_2 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_143), __pyx_t_8); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2760; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_2)); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_XDECREF_SET(__pyx_v_repl, ((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; break; /* "pandas/tslib.pyx":2761 * elif i == 2: * repl = '%d' % year * elif i == 3: # <<<<<<<<<<<<<< * repl = '%03d' % (value % 1000) * elif i == 4: */ case 3: /* "pandas/tslib.pyx":2762 * repl = '%d' % year * elif i == 3: * repl = '%03d' % (value % 1000) # <<<<<<<<<<<<<< * elif i == 4: * repl = '%06d' % (value % 1000000) */ __pyx_t_2 = __Pyx_PyInt_to_py_npy_int64(__Pyx_mod___pyx_t_5numpy_int64_t(__pyx_v_value, 1000)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2762; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_8 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_145), __pyx_t_2); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2762; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_8)); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF_SET(__pyx_v_repl, ((PyObject *)__pyx_t_8)); __pyx_t_8 = 0; break; /* "pandas/tslib.pyx":2763 * elif i == 3: * repl = '%03d' % (value % 1000) * elif i == 4: # <<<<<<<<<<<<<< * repl = '%06d' % (value % 1000000) * elif i == 5: */ case 4: /* "pandas/tslib.pyx":2764 * repl = '%03d' % (value % 1000) * elif i == 4: * repl = '%06d' % (value % 1000000) # <<<<<<<<<<<<<< * elif i == 5: * repl = '%09d' % (value % 1000000000) */ __pyx_t_8 = __Pyx_PyInt_to_py_npy_int64(__Pyx_mod___pyx_t_5numpy_int64_t(__pyx_v_value, 1000000)); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2764; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_2 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_146), __pyx_t_8); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2764; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_2)); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_XDECREF_SET(__pyx_v_repl, ((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; break; /* "pandas/tslib.pyx":2765 * elif i == 4: * repl = '%06d' % (value % 1000000) * elif i == 5: # <<<<<<<<<<<<<< * repl = '%09d' % (value % 1000000000) * */ case 5: /* "pandas/tslib.pyx":2766 * repl = '%06d' % (value % 1000000) * elif i == 5: * repl = '%09d' % (value % 1000000000) # <<<<<<<<<<<<<< * * result = result.replace(str_extra_fmts[i], repl) */ __pyx_t_2 = __Pyx_PyInt_to_py_npy_int64(__Pyx_mod___pyx_t_5numpy_int64_t(__pyx_v_value, 1000000000)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2766; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_8 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_147), __pyx_t_2); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2766; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_8)); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF_SET(__pyx_v_repl, ((PyObject *)__pyx_t_8)); __pyx_t_8 = 0; break; } /* "pandas/tslib.pyx":2768 * repl = '%09d' % (value % 1000000000) * * result = result.replace(str_extra_fmts[i], repl) # <<<<<<<<<<<<<< * * if PY2: */ __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_result, __pyx_n_s__replace); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2768; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); if (unlikely(((PyObject *)__pyx_v_6pandas_5tslib_str_extra_fmts) == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2768; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_2 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_6pandas_5tslib_str_extra_fmts), __pyx_v_i, sizeof(Py_ssize_t), PyInt_FromSsize_t, 1, 1, 1); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2768; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (unlikely(!__pyx_v_repl)) { __Pyx_RaiseUnboundLocalError("repl"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2768; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2768; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_repl); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_repl); __Pyx_GIVEREF(__pyx_v_repl); __pyx_t_2 = 0; __pyx_t_2 = PyObject_Call(__pyx_t_8, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2768; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __Pyx_DECREF_SET(__pyx_v_result, __pyx_t_2); __pyx_t_2 = 0; goto __pyx_L9; } __pyx_L9:; } /* "pandas/tslib.pyx":2770 * result = result.replace(str_extra_fmts[i], repl) * * if PY2: # <<<<<<<<<<<<<< * result = result.decode('utf-8', 'ignore') * */ __pyx_t_7 = (__pyx_v_6pandas_5tslib_PY2 != 0); if (__pyx_t_7) { /* "pandas/tslib.pyx":2771 * * if PY2: * result = result.decode('utf-8', 'ignore') # <<<<<<<<<<<<<< * * return result */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_result, __pyx_n_s__decode); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2771; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_k_tuple_148), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2771; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF_SET(__pyx_v_result, __pyx_t_1); __pyx_t_1 = 0; goto __pyx_L11; } __pyx_L11:; /* "pandas/tslib.pyx":2773 * result = result.decode('utf-8', 'ignore') * * return result # <<<<<<<<<<<<<< * * # period accessors */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_result); __pyx_r = __pyx_v_result; goto __pyx_L0; __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_8); __Pyx_AddTraceback("pandas.tslib._period_strftime", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_sys); __Pyx_XDECREF(__pyx_v_pat); __Pyx_XDECREF(__pyx_v_repl); __Pyx_XDECREF(__pyx_v_result); __Pyx_XDECREF(__pyx_v_found_pat); __Pyx_XDECREF(__pyx_v_fmt); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5tslib_89get_period_field(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5tslib_89get_period_field = {__Pyx_NAMESTR("get_period_field"), (PyCFunction)__pyx_pw_6pandas_5tslib_89get_period_field, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5tslib_89get_period_field(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { int __pyx_v_code; __pyx_t_5numpy_int64_t __pyx_v_value; int __pyx_v_freq; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("get_period_field (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__code,&__pyx_n_s__value,&__pyx_n_s__freq,0}; PyObject* values[3] = {0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__code)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__value)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("get_period_field", 1, 3, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2779; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__freq)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("get_period_field", 1, 3, 3, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2779; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "get_period_field") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2779; __pyx_clineno = __LINE__; goto __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_code = __Pyx_PyInt_AsInt(values[0]); if (unlikely((__pyx_v_code == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2779; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_value = __Pyx_PyInt_from_py_npy_int64(values[1]); if (unlikely((__pyx_v_value == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2779; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_freq = __Pyx_PyInt_AsInt(values[2]); if (unlikely((__pyx_v_freq == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2779; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("get_period_field", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2779; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.tslib.get_period_field", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pandas_5tslib_88get_period_field(__pyx_self, __pyx_v_code, __pyx_v_value, __pyx_v_freq); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/tslib.pyx":2779 * ctypedef int (*accessor)(int64_t ordinal, int freq) except INT32_MIN * * def get_period_field(int code, int64_t value, int freq): # <<<<<<<<<<<<<< * cdef accessor f = _get_accessor_func(code) * if f is NULL: */ static PyObject *__pyx_pf_6pandas_5tslib_88get_period_field(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_code, __pyx_t_5numpy_int64_t __pyx_v_value, int __pyx_v_freq) { __pyx_t_6pandas_5tslib_accessor __pyx_v_f; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_t_4; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_period_field", 0); /* "pandas/tslib.pyx":2780 * * def get_period_field(int code, int64_t value, int freq): * cdef accessor f = _get_accessor_func(code) # <<<<<<<<<<<<<< * if f is NULL: * raise ValueError('Unrecognized period code: %d' % code) */ __pyx_v_f = __pyx_f_6pandas_5tslib__get_accessor_func(__pyx_v_code); /* "pandas/tslib.pyx":2781 * def get_period_field(int code, int64_t value, int freq): * cdef accessor f = _get_accessor_func(code) * if f is NULL: # <<<<<<<<<<<<<< * raise ValueError('Unrecognized period code: %d' % code) * return f(value, freq) */ __pyx_t_1 = ((__pyx_v_f == NULL) != 0); if (__pyx_t_1) { /* "pandas/tslib.pyx":2782 * cdef accessor f = _get_accessor_func(code) * if f is NULL: * raise ValueError('Unrecognized period code: %d' % code) # <<<<<<<<<<<<<< * return f(value, freq) * */ __pyx_t_2 = PyInt_FromLong(__pyx_v_code); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2782; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_149), __pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2782; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_3)); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2782; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_t_3)); __Pyx_GIVEREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; __pyx_t_3 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2782; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(((PyObject *)__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_filename = __pyx_f[0]; __pyx_lineno = 2782; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L3; } __pyx_L3:; /* "pandas/tslib.pyx":2783 * if f is NULL: * raise ValueError('Unrecognized period code: %d' % code) * return f(value, freq) # <<<<<<<<<<<<<< * * def get_period_field_arr(int code, ndarray[int64_t] arr, int freq): */ __Pyx_XDECREF(__pyx_r); __pyx_t_4 = __pyx_v_f(__pyx_v_value, __pyx_v_freq); if (unlikely(__pyx_t_4 == INT32_MIN)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2783; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_3 = PyInt_FromLong(__pyx_t_4); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2783; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("pandas.tslib.get_period_field", __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_5tslib_91get_period_field_arr(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5tslib_91get_period_field_arr = {__Pyx_NAMESTR("get_period_field_arr"), (PyCFunction)__pyx_pw_6pandas_5tslib_91get_period_field_arr, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5tslib_91get_period_field_arr(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { int __pyx_v_code; PyArrayObject *__pyx_v_arr = 0; int __pyx_v_freq; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("get_period_field_arr (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__code,&__pyx_n_s__arr,&__pyx_n_s__freq,0}; PyObject* values[3] = {0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__code)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__arr)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("get_period_field_arr", 1, 3, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2785; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__freq)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("get_period_field_arr", 1, 3, 3, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2785; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "get_period_field_arr") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2785; __pyx_clineno = __LINE__; goto __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_code = __Pyx_PyInt_AsInt(values[0]); if (unlikely((__pyx_v_code == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2785; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_arr = ((PyArrayObject *)values[1]); __pyx_v_freq = __Pyx_PyInt_AsInt(values[2]); if (unlikely((__pyx_v_freq == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2785; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("get_period_field_arr", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2785; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.tslib.get_period_field_arr", __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_filename = __pyx_f[0]; __pyx_lineno = 2785; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5tslib_90get_period_field_arr(__pyx_self, __pyx_v_code, __pyx_v_arr, __pyx_v_freq); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/tslib.pyx":2785 * return f(value, freq) * * def get_period_field_arr(int code, ndarray[int64_t] arr, int freq): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, sz */ static PyObject *__pyx_pf_6pandas_5tslib_90get_period_field_arr(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_code, PyArrayObject *__pyx_v_arr, int __pyx_v_freq) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_sz; PyArrayObject *__pyx_v_out = 0; __pyx_t_6pandas_5tslib_accessor __pyx_v_f; __Pyx_LocalBuf_ND __pyx_pybuffernd_arr; __Pyx_Buffer __pyx_pybuffer_arr; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; Py_ssize_t __pyx_t_4; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyArrayObject *__pyx_t_8 = NULL; int __pyx_t_9; PyObject *__pyx_t_10 = NULL; PyObject *__pyx_t_11 = NULL; PyObject *__pyx_t_12 = NULL; Py_ssize_t __pyx_t_13; Py_ssize_t __pyx_t_14; Py_ssize_t __pyx_t_15; int __pyx_t_16; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_period_field_arr", 0); __pyx_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; __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_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2785; __pyx_clineno = __LINE__; goto __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/tslib.pyx":2791 * accessor f * * f = _get_accessor_func(code) # <<<<<<<<<<<<<< * if f is NULL: * raise ValueError('Unrecognized period code: %d' % code) */ __pyx_v_f = __pyx_f_6pandas_5tslib__get_accessor_func(__pyx_v_code); /* "pandas/tslib.pyx":2792 * * f = _get_accessor_func(code) * if f is NULL: # <<<<<<<<<<<<<< * raise ValueError('Unrecognized period code: %d' % code) * */ __pyx_t_1 = ((__pyx_v_f == NULL) != 0); if (__pyx_t_1) { /* "pandas/tslib.pyx":2793 * f = _get_accessor_func(code) * if f is NULL: * raise ValueError('Unrecognized period code: %d' % code) # <<<<<<<<<<<<<< * * sz = len(arr) */ __pyx_t_2 = PyInt_FromLong(__pyx_v_code); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2793; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_149), __pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2793; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_3)); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2793; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_t_3)); __Pyx_GIVEREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; __pyx_t_3 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2793; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(((PyObject *)__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_filename = __pyx_f[0]; __pyx_lineno = 2793; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L3; } __pyx_L3:; /* "pandas/tslib.pyx":2795 * raise ValueError('Unrecognized period code: %d' % code) * * sz = len(arr) # <<<<<<<<<<<<<< * out = np.empty(sz, dtype=np.int64) * */ __pyx_t_4 = PyObject_Length(((PyObject *)__pyx_v_arr)); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2795; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_sz = __pyx_t_4; /* "pandas/tslib.pyx":2796 * * sz = len(arr) * out = np.empty(sz, dtype=np.int64) # <<<<<<<<<<<<<< * * for i in range(sz): */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2796; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s__empty); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2796; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyInt_FromSsize_t(__pyx_v_sz); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2796; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2796; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2796; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_3)); __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2796; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s__int64); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2796; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (PyDict_SetItem(__pyx_t_3, ((PyObject *)__pyx_n_s__dtype), __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2796; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_7 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_5), ((PyObject *)__pyx_t_3)); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2796; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; if (!(likely(((__pyx_t_7) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_7, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2796; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_8 = ((PyArrayObject *)__pyx_t_7); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __pyx_t_9 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_t_8, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_9 < 0)) { PyErr_Fetch(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12); 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_10); Py_XDECREF(__pyx_t_11); Py_XDECREF(__pyx_t_12); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_10, __pyx_t_11, __pyx_t_12); } } __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_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2796; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_8 = 0; __pyx_v_out = ((PyArrayObject *)__pyx_t_7); __pyx_t_7 = 0; /* "pandas/tslib.pyx":2798 * out = np.empty(sz, dtype=np.int64) * * for i in range(sz): # <<<<<<<<<<<<<< * out[i] = f(arr[i], freq) * */ __pyx_t_4 = __pyx_v_sz; for (__pyx_t_13 = 0; __pyx_t_13 < __pyx_t_4; __pyx_t_13+=1) { __pyx_v_i = __pyx_t_13; /* "pandas/tslib.pyx":2799 * * for i in range(sz): * out[i] = f(arr[i], freq) # <<<<<<<<<<<<<< * * return out */ __pyx_t_14 = __pyx_v_i; __pyx_t_9 = -1; if (__pyx_t_14 < 0) { __pyx_t_14 += __pyx_pybuffernd_arr.diminfo[0].shape; if (unlikely(__pyx_t_14 < 0)) __pyx_t_9 = 0; } else if (unlikely(__pyx_t_14 >= __pyx_pybuffernd_arr.diminfo[0].shape)) __pyx_t_9 = 0; if (unlikely(__pyx_t_9 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_9); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2799; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_9 = __pyx_v_f((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_arr.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_arr.diminfo[0].strides)), __pyx_v_freq); if (unlikely(__pyx_t_9 == INT32_MIN)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2799; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_15 = __pyx_v_i; __pyx_t_16 = -1; if (__pyx_t_15 < 0) { __pyx_t_15 += __pyx_pybuffernd_out.diminfo[0].shape; if (unlikely(__pyx_t_15 < 0)) __pyx_t_16 = 0; } else if (unlikely(__pyx_t_15 >= __pyx_pybuffernd_out.diminfo[0].shape)) __pyx_t_16 = 0; if (unlikely(__pyx_t_16 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_16); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2799; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_out.diminfo[0].strides) = __pyx_t_9; } /* "pandas/tslib.pyx":2801 * out[i] = f(arr[i], freq) * * return out # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_out)); __pyx_r = ((PyObject *)__pyx_v_out); goto __pyx_L0; __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_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_arr.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.tslib.get_period_field_arr", __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_out.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_out); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/tslib.pyx":2805 * * * cdef accessor _get_accessor_func(int code): # <<<<<<<<<<<<<< * if code == 0: * return &pyear */ static __pyx_t_6pandas_5tslib_accessor __pyx_f_6pandas_5tslib__get_accessor_func(int __pyx_v_code) { __pyx_t_6pandas_5tslib_accessor __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_get_accessor_func", 0); /* "pandas/tslib.pyx":2826 * elif code == 9: * return &pday_of_year * elif code == 10: # <<<<<<<<<<<<<< * return &pweekday * return NULL */ switch (__pyx_v_code) { /* "pandas/tslib.pyx":2806 * * cdef accessor _get_accessor_func(int code): * if code == 0: # <<<<<<<<<<<<<< * return &pyear * elif code == 1: */ case 0: /* "pandas/tslib.pyx":2807 * cdef accessor _get_accessor_func(int code): * if code == 0: * return &pyear # <<<<<<<<<<<<<< * elif code == 1: * return &pqyear */ __pyx_r = (&pyear); goto __pyx_L0; break; /* "pandas/tslib.pyx":2808 * if code == 0: * return &pyear * elif code == 1: # <<<<<<<<<<<<<< * return &pqyear * elif code == 2: */ case 1: /* "pandas/tslib.pyx":2809 * return &pyear * elif code == 1: * return &pqyear # <<<<<<<<<<<<<< * elif code == 2: * return &pquarter */ __pyx_r = (&pqyear); goto __pyx_L0; break; /* "pandas/tslib.pyx":2810 * elif code == 1: * return &pqyear * elif code == 2: # <<<<<<<<<<<<<< * return &pquarter * elif code == 3: */ case 2: /* "pandas/tslib.pyx":2811 * return &pqyear * elif code == 2: * return &pquarter # <<<<<<<<<<<<<< * elif code == 3: * return &pmonth */ __pyx_r = (&pquarter); goto __pyx_L0; break; /* "pandas/tslib.pyx":2812 * elif code == 2: * return &pquarter * elif code == 3: # <<<<<<<<<<<<<< * return &pmonth * elif code == 4: */ case 3: /* "pandas/tslib.pyx":2813 * return &pquarter * elif code == 3: * return &pmonth # <<<<<<<<<<<<<< * elif code == 4: * return &pday */ __pyx_r = (&pmonth); goto __pyx_L0; break; /* "pandas/tslib.pyx":2814 * elif code == 3: * return &pmonth * elif code == 4: # <<<<<<<<<<<<<< * return &pday * elif code == 5: */ case 4: /* "pandas/tslib.pyx":2815 * return &pmonth * elif code == 4: * return &pday # <<<<<<<<<<<<<< * elif code == 5: * return &phour */ __pyx_r = (&pday); goto __pyx_L0; break; /* "pandas/tslib.pyx":2816 * elif code == 4: * return &pday * elif code == 5: # <<<<<<<<<<<<<< * return &phour * elif code == 6: */ case 5: /* "pandas/tslib.pyx":2817 * return &pday * elif code == 5: * return &phour # <<<<<<<<<<<<<< * elif code == 6: * return &pminute */ __pyx_r = (&phour); goto __pyx_L0; break; /* "pandas/tslib.pyx":2818 * elif code == 5: * return &phour * elif code == 6: # <<<<<<<<<<<<<< * return &pminute * elif code == 7: */ case 6: /* "pandas/tslib.pyx":2819 * return &phour * elif code == 6: * return &pminute # <<<<<<<<<<<<<< * elif code == 7: * return &psecond */ __pyx_r = (&pminute); goto __pyx_L0; break; /* "pandas/tslib.pyx":2820 * elif code == 6: * return &pminute * elif code == 7: # <<<<<<<<<<<<<< * return &psecond * elif code == 8: */ case 7: /* "pandas/tslib.pyx":2821 * return &pminute * elif code == 7: * return &psecond # <<<<<<<<<<<<<< * elif code == 8: * return &pweek */ __pyx_r = (&psecond); goto __pyx_L0; break; /* "pandas/tslib.pyx":2822 * elif code == 7: * return &psecond * elif code == 8: # <<<<<<<<<<<<<< * return &pweek * elif code == 9: */ case 8: /* "pandas/tslib.pyx":2823 * return &psecond * elif code == 8: * return &pweek # <<<<<<<<<<<<<< * elif code == 9: * return &pday_of_year */ __pyx_r = (&pweek); goto __pyx_L0; break; /* "pandas/tslib.pyx":2824 * elif code == 8: * return &pweek * elif code == 9: # <<<<<<<<<<<<<< * return &pday_of_year * elif code == 10: */ case 9: /* "pandas/tslib.pyx":2825 * return &pweek * elif code == 9: * return &pday_of_year # <<<<<<<<<<<<<< * elif code == 10: * return &pweekday */ __pyx_r = (&pday_of_year); goto __pyx_L0; break; /* "pandas/tslib.pyx":2826 * elif code == 9: * return &pday_of_year * elif code == 10: # <<<<<<<<<<<<<< * return &pweekday * return NULL */ case 10: /* "pandas/tslib.pyx":2827 * return &pday_of_year * elif code == 10: * return &pweekday # <<<<<<<<<<<<<< * return NULL * */ __pyx_r = (&pweekday); goto __pyx_L0; break; } /* "pandas/tslib.pyx":2828 * elif code == 10: * return &pweekday * return NULL # <<<<<<<<<<<<<< * * */ __pyx_r = NULL; goto __pyx_L0; __pyx_r = 0; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5tslib_93extract_ordinals(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5tslib_93extract_ordinals = {__Pyx_NAMESTR("extract_ordinals"), (PyCFunction)__pyx_pw_6pandas_5tslib_93extract_ordinals, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5tslib_93extract_ordinals(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_values = 0; PyObject *__pyx_v_freq = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("extract_ordinals (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__values,&__pyx_n_s__freq,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__values)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__freq)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("extract_ordinals", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2831; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "extract_ordinals") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2831; __pyx_clineno = __LINE__; goto __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_freq = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("extract_ordinals", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2831; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.tslib.extract_ordinals", __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_filename = __pyx_f[0]; __pyx_lineno = 2831; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5tslib_92extract_ordinals(__pyx_self, __pyx_v_values, __pyx_v_freq); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/tslib.pyx":2831 * * * def extract_ordinals(ndarray[object] values, freq): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = len(values) */ static PyObject *__pyx_pf_6pandas_5tslib_92extract_ordinals(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyObject *__pyx_v_freq) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_n; PyArrayObject *__pyx_v_ordinals = 0; PyObject *__pyx_v_p = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_ordinals; __Pyx_Buffer __pyx_pybuffer_ordinals; __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; Py_ssize_t __pyx_t_8; Py_ssize_t __pyx_t_9; int __pyx_t_10; __pyx_t_5numpy_int64_t __pyx_t_11; Py_ssize_t __pyx_t_12; int __pyx_t_13; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("extract_ordinals", 0); __pyx_pybuffer_ordinals.pybuffer.buf = NULL; __pyx_pybuffer_ordinals.refcount = 0; __pyx_pybuffernd_ordinals.data = NULL; __pyx_pybuffernd_ordinals.rcbuffer = &__pyx_pybuffer_ordinals; __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_filename = __pyx_f[0]; __pyx_lineno = 2831; __pyx_clineno = __LINE__; goto __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/tslib.pyx":2833 * def extract_ordinals(ndarray[object] values, freq): * cdef: * Py_ssize_t i, n = len(values) # <<<<<<<<<<<<<< * ndarray[int64_t] ordinals = np.empty(n, dtype=np.int64) * object p */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2833; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/tslib.pyx":2834 * cdef: * Py_ssize_t i, n = len(values) * ndarray[int64_t] ordinals = np.empty(n, dtype=np.int64) # <<<<<<<<<<<<<< * object p * */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2834; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 2834; __pyx_clineno = __LINE__; goto __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_n); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2834; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2834; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2834; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_2)); __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2834; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s__int64); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2834; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__dtype), __pyx_t_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2834; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2834; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __Pyx_DECREF(((PyObject *)__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_filename = __pyx_f[0]; __pyx_lineno = 2834; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_7 = ((PyArrayObject *)__pyx_t_6); { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_ordinals.rcbuffer->pybuffer, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { __pyx_v_ordinals = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_ordinals.rcbuffer->pybuffer.buf = NULL; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2834; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } else {__pyx_pybuffernd_ordinals.diminfo[0].strides = __pyx_pybuffernd_ordinals.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_ordinals.diminfo[0].shape = __pyx_pybuffernd_ordinals.rcbuffer->pybuffer.shape[0]; } } __pyx_t_7 = 0; __pyx_v_ordinals = ((PyArrayObject *)__pyx_t_6); __pyx_t_6 = 0; /* "pandas/tslib.pyx":2837 * object p * * for i in range(n): # <<<<<<<<<<<<<< * p = values[i] * ordinals[i] = p.ordinal */ __pyx_t_1 = __pyx_v_n; for (__pyx_t_8 = 0; __pyx_t_8 < __pyx_t_1; __pyx_t_8+=1) { __pyx_v_i = __pyx_t_8; /* "pandas/tslib.pyx":2838 * * for i in range(n): * p = values[i] # <<<<<<<<<<<<<< * ordinals[i] = p.ordinal * if p.freq != freq: */ __pyx_t_9 = __pyx_v_i; __pyx_t_10 = -1; if (__pyx_t_9 < 0) { __pyx_t_9 += __pyx_pybuffernd_values.diminfo[0].shape; if (unlikely(__pyx_t_9 < 0)) __pyx_t_10 = 0; } else if (unlikely(__pyx_t_9 >= __pyx_pybuffernd_values.diminfo[0].shape)) __pyx_t_10 = 0; if (unlikely(__pyx_t_10 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_10); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2838; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_6 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_9, __pyx_pybuffernd_values.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_6); __Pyx_XDECREF_SET(__pyx_v_p, __pyx_t_6); __pyx_t_6 = 0; /* "pandas/tslib.pyx":2839 * for i in range(n): * p = values[i] * ordinals[i] = p.ordinal # <<<<<<<<<<<<<< * if p.freq != freq: * raise ValueError("%s is wrong freq" % p) */ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_p, __pyx_n_s__ordinal); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2839; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_11 = __Pyx_PyInt_from_py_npy_int64(__pyx_t_6); if (unlikely((__pyx_t_11 == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2839; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_12 = __pyx_v_i; __pyx_t_10 = -1; if (__pyx_t_12 < 0) { __pyx_t_12 += __pyx_pybuffernd_ordinals.diminfo[0].shape; if (unlikely(__pyx_t_12 < 0)) __pyx_t_10 = 0; } else if (unlikely(__pyx_t_12 >= __pyx_pybuffernd_ordinals.diminfo[0].shape)) __pyx_t_10 = 0; if (unlikely(__pyx_t_10 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_10); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2839; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_ordinals.rcbuffer->pybuffer.buf, __pyx_t_12, __pyx_pybuffernd_ordinals.diminfo[0].strides) = __pyx_t_11; /* "pandas/tslib.pyx":2840 * p = values[i] * ordinals[i] = p.ordinal * if p.freq != freq: # <<<<<<<<<<<<<< * raise ValueError("%s is wrong freq" % p) * */ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_p, __pyx_n_s__freq); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2840; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_2 = PyObject_RichCompare(__pyx_t_6, __pyx_v_freq, Py_NE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2840; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_13 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2840; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_13) { /* "pandas/tslib.pyx":2841 * ordinals[i] = p.ordinal * if p.freq != freq: * raise ValueError("%s is wrong freq" % p) # <<<<<<<<<<<<<< * * return ordinals */ __pyx_t_2 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_150), __pyx_v_p); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2841; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_2)); __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2841; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_t_2)); __Pyx_GIVEREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2841; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0; __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2841; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L5; } __pyx_L5:; } /* "pandas/tslib.pyx":2843 * raise ValueError("%s is wrong freq" % p) * * return ordinals # <<<<<<<<<<<<<< * * cpdef resolution(ndarray[int64_t] stamps, tz=None): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_ordinals)); __pyx_r = ((PyObject *)__pyx_v_ordinals); goto __pyx_L0; __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_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_ordinals.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.tslib.extract_ordinals", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_ordinals.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_ordinals); __Pyx_XDECREF(__pyx_v_p); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/tslib.pyx":2845 * return ordinals * * cpdef resolution(ndarray[int64_t] stamps, tz=None): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = len(stamps) */ static PyObject *__pyx_pw_6pandas_5tslib_95resolution(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_6pandas_5tslib_resolution(PyArrayObject *__pyx_v_stamps, CYTHON_UNUSED int __pyx_skip_dispatch, struct __pyx_opt_args_6pandas_5tslib_resolution *__pyx_optional_args) { PyObject *__pyx_v_tz = ((PyObject *)Py_None); Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_n; pandas_datetimestruct __pyx_v_dts; int __pyx_v_reso; int __pyx_v_curr_reso; __Pyx_LocalBuf_ND __pyx_pybuffernd_stamps; __Pyx_Buffer __pyx_pybuffer_stamps; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; PyObject *__pyx_t_2 = NULL; int __pyx_t_3; int __pyx_t_4; int __pyx_t_5; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; Py_ssize_t __pyx_t_8; Py_ssize_t __pyx_t_9; Py_ssize_t __pyx_t_10; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("resolution", 0); if (__pyx_optional_args) { if (__pyx_optional_args->__pyx_n > 0) { __pyx_v_tz = __pyx_optional_args->tz; } } __Pyx_INCREF(__pyx_v_tz); __pyx_pybuffer_stamps.pybuffer.buf = NULL; __pyx_pybuffer_stamps.refcount = 0; __pyx_pybuffernd_stamps.data = NULL; __pyx_pybuffernd_stamps.rcbuffer = &__pyx_pybuffer_stamps; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_stamps.rcbuffer->pybuffer, (PyObject*)__pyx_v_stamps, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2845; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_stamps.diminfo[0].strides = __pyx_pybuffernd_stamps.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_stamps.diminfo[0].shape = __pyx_pybuffernd_stamps.rcbuffer->pybuffer.shape[0]; /* "pandas/tslib.pyx":2847 * cpdef resolution(ndarray[int64_t] stamps, tz=None): * cdef: * Py_ssize_t i, n = len(stamps) # <<<<<<<<<<<<<< * pandas_datetimestruct dts * int reso = D_RESO, curr_reso */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_stamps)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2847; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/tslib.pyx":2849 * Py_ssize_t i, n = len(stamps) * pandas_datetimestruct dts * int reso = D_RESO, curr_reso # <<<<<<<<<<<<<< * * if tz is not None: */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__D_RESO); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2849; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyInt_AsInt(__pyx_t_2); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2849; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_reso = __pyx_t_3; /* "pandas/tslib.pyx":2851 * int reso = D_RESO, curr_reso * * if tz is not None: # <<<<<<<<<<<<<< * if isinstance(tz, basestring): * tz = pytz.timezone(tz) */ __pyx_t_4 = (__pyx_v_tz != Py_None); __pyx_t_5 = (__pyx_t_4 != 0); if (__pyx_t_5) { /* "pandas/tslib.pyx":2852 * * if tz is not None: * if isinstance(tz, basestring): # <<<<<<<<<<<<<< * tz = pytz.timezone(tz) * return _reso_local(stamps, tz) */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__basestring); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2852; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = PyObject_IsInstance(__pyx_v_tz, __pyx_t_2); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2852; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_4 = (__pyx_t_5 != 0); if (__pyx_t_4) { /* "pandas/tslib.pyx":2853 * if tz is not None: * if isinstance(tz, basestring): * tz = pytz.timezone(tz) # <<<<<<<<<<<<<< * return _reso_local(stamps, tz) * else: */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__pytz); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2853; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__timezone); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2853; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2853; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_tz); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_tz); __Pyx_GIVEREF(__pyx_v_tz); __pyx_t_7 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2853; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __Pyx_DECREF_SET(__pyx_v_tz, __pyx_t_7); __pyx_t_7 = 0; goto __pyx_L4; } __pyx_L4:; /* "pandas/tslib.pyx":2854 * if isinstance(tz, basestring): * tz = pytz.timezone(tz) * return _reso_local(stamps, tz) # <<<<<<<<<<<<<< * else: * for i in range(n): */ __Pyx_XDECREF(__pyx_r); __pyx_t_7 = __pyx_f_6pandas_5tslib__reso_local(((PyArrayObject *)__pyx_v_stamps), __pyx_v_tz); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2854; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_r = __pyx_t_7; __pyx_t_7 = 0; goto __pyx_L0; goto __pyx_L3; } /*else*/ { /* "pandas/tslib.pyx":2856 * return _reso_local(stamps, tz) * else: * for i in range(n): # <<<<<<<<<<<<<< * if stamps[i] == NPY_NAT: * continue */ __pyx_t_1 = __pyx_v_n; for (__pyx_t_8 = 0; __pyx_t_8 < __pyx_t_1; __pyx_t_8+=1) { __pyx_v_i = __pyx_t_8; /* "pandas/tslib.pyx":2857 * else: * for i in range(n): * if stamps[i] == NPY_NAT: # <<<<<<<<<<<<<< * continue * pandas_datetime_to_datetimestruct(stamps[i], PANDAS_FR_ns, &dts) */ __pyx_t_9 = __pyx_v_i; __pyx_t_3 = -1; if (__pyx_t_9 < 0) { __pyx_t_9 += __pyx_pybuffernd_stamps.diminfo[0].shape; if (unlikely(__pyx_t_9 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_9 >= __pyx_pybuffernd_stamps.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2857; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_4 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_stamps.rcbuffer->pybuffer.buf, __pyx_t_9, __pyx_pybuffernd_stamps.diminfo[0].strides)) == __pyx_v_6pandas_5tslib_NPY_NAT) != 0); if (__pyx_t_4) { /* "pandas/tslib.pyx":2858 * for i in range(n): * if stamps[i] == NPY_NAT: * continue # <<<<<<<<<<<<<< * pandas_datetime_to_datetimestruct(stamps[i], PANDAS_FR_ns, &dts) * curr_reso = _reso_stamp(&dts) */ goto __pyx_L5_continue; goto __pyx_L7; } __pyx_L7:; /* "pandas/tslib.pyx":2859 * if stamps[i] == NPY_NAT: * continue * pandas_datetime_to_datetimestruct(stamps[i], PANDAS_FR_ns, &dts) # <<<<<<<<<<<<<< * curr_reso = _reso_stamp(&dts) * if curr_reso < reso: */ __pyx_t_10 = __pyx_v_i; __pyx_t_3 = -1; if (__pyx_t_10 < 0) { __pyx_t_10 += __pyx_pybuffernd_stamps.diminfo[0].shape; if (unlikely(__pyx_t_10 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_10 >= __pyx_pybuffernd_stamps.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2859; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } pandas_datetime_to_datetimestruct((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_stamps.rcbuffer->pybuffer.buf, __pyx_t_10, __pyx_pybuffernd_stamps.diminfo[0].strides)), PANDAS_FR_ns, (&__pyx_v_dts)); /* "pandas/tslib.pyx":2860 * continue * pandas_datetime_to_datetimestruct(stamps[i], PANDAS_FR_ns, &dts) * curr_reso = _reso_stamp(&dts) # <<<<<<<<<<<<<< * if curr_reso < reso: * reso = curr_reso */ __pyx_v_curr_reso = __pyx_f_6pandas_5tslib__reso_stamp((&__pyx_v_dts)); /* "pandas/tslib.pyx":2861 * pandas_datetime_to_datetimestruct(stamps[i], PANDAS_FR_ns, &dts) * curr_reso = _reso_stamp(&dts) * if curr_reso < reso: # <<<<<<<<<<<<<< * reso = curr_reso * return reso */ __pyx_t_4 = ((__pyx_v_curr_reso < __pyx_v_reso) != 0); if (__pyx_t_4) { /* "pandas/tslib.pyx":2862 * curr_reso = _reso_stamp(&dts) * if curr_reso < reso: * reso = curr_reso # <<<<<<<<<<<<<< * return reso * */ __pyx_v_reso = __pyx_v_curr_reso; goto __pyx_L8; } __pyx_L8:; __pyx_L5_continue:; } /* "pandas/tslib.pyx":2863 * if curr_reso < reso: * reso = curr_reso * return reso # <<<<<<<<<<<<<< * * US_RESO = 0 */ __Pyx_XDECREF(__pyx_r); __pyx_t_7 = PyInt_FromLong(__pyx_v_reso); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2863; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_r = __pyx_t_7; __pyx_t_7 = 0; goto __pyx_L0; } __pyx_L3:; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_stamps.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.tslib.resolution", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_stamps.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF(__pyx_v_tz); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5tslib_95resolution(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_6pandas_5tslib_95resolution(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_stamps = 0; PyObject *__pyx_v_tz = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("resolution (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__stamps,&__pyx_n_s__tz,0}; PyObject* values[2] = {0,0}; /* "pandas/tslib.pyx":2845 * return ordinals * * cpdef resolution(ndarray[int64_t] stamps, tz=None): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = len(stamps) */ values[1] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__stamps)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__tz); if (value) { values[1] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "resolution") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2845; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_stamps = ((PyArrayObject *)values[0]); __pyx_v_tz = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("resolution", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2845; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.tslib.resolution", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_stamps), __pyx_ptype_5numpy_ndarray, 1, "stamps", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2845; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5tslib_94resolution(__pyx_self, __pyx_v_stamps, __pyx_v_tz); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5tslib_94resolution(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_stamps, PyObject *__pyx_v_tz) { __Pyx_LocalBuf_ND __pyx_pybuffernd_stamps; __Pyx_Buffer __pyx_pybuffer_stamps; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; struct __pyx_opt_args_6pandas_5tslib_resolution __pyx_t_2; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("resolution", 0); __pyx_pybuffer_stamps.pybuffer.buf = NULL; __pyx_pybuffer_stamps.refcount = 0; __pyx_pybuffernd_stamps.data = NULL; __pyx_pybuffernd_stamps.rcbuffer = &__pyx_pybuffer_stamps; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_stamps.rcbuffer->pybuffer, (PyObject*)__pyx_v_stamps, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2845; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_stamps.diminfo[0].strides = __pyx_pybuffernd_stamps.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_stamps.diminfo[0].shape = __pyx_pybuffernd_stamps.rcbuffer->pybuffer.shape[0]; __Pyx_XDECREF(__pyx_r); __pyx_t_2.__pyx_n = 1; __pyx_t_2.tz = __pyx_v_tz; __pyx_t_1 = __pyx_f_6pandas_5tslib_resolution(__pyx_v_stamps, 0, &__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2845; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_stamps.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.tslib.resolution", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_stamps.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/tslib.pyx":2871 * D_RESO = 4 * * cdef inline int _reso_stamp(pandas_datetimestruct *dts): # <<<<<<<<<<<<<< * if dts.us != 0: * return US_RESO */ static CYTHON_INLINE int __pyx_f_6pandas_5tslib__reso_stamp(pandas_datetimestruct *__pyx_v_dts) { int __pyx_r; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; int __pyx_t_3; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_reso_stamp", 0); /* "pandas/tslib.pyx":2872 * * cdef inline int _reso_stamp(pandas_datetimestruct *dts): * if dts.us != 0: # <<<<<<<<<<<<<< * return US_RESO * elif dts.sec != 0: */ __pyx_t_1 = ((__pyx_v_dts->us != 0) != 0); if (__pyx_t_1) { /* "pandas/tslib.pyx":2873 * cdef inline int _reso_stamp(pandas_datetimestruct *dts): * if dts.us != 0: * return US_RESO # <<<<<<<<<<<<<< * elif dts.sec != 0: * return S_RESO */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__US_RESO); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2873; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyInt_AsInt(__pyx_t_2); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2873; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_3; goto __pyx_L0; goto __pyx_L3; } /* "pandas/tslib.pyx":2874 * if dts.us != 0: * return US_RESO * elif dts.sec != 0: # <<<<<<<<<<<<<< * return S_RESO * elif dts.min != 0: */ __pyx_t_1 = ((__pyx_v_dts->sec != 0) != 0); if (__pyx_t_1) { /* "pandas/tslib.pyx":2875 * return US_RESO * elif dts.sec != 0: * return S_RESO # <<<<<<<<<<<<<< * elif dts.min != 0: * return T_RESO */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__S_RESO); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2875; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyInt_AsInt(__pyx_t_2); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2875; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_3; goto __pyx_L0; goto __pyx_L3; } /* "pandas/tslib.pyx":2876 * elif dts.sec != 0: * return S_RESO * elif dts.min != 0: # <<<<<<<<<<<<<< * return T_RESO * elif dts.hour != 0: */ __pyx_t_1 = ((__pyx_v_dts->min != 0) != 0); if (__pyx_t_1) { /* "pandas/tslib.pyx":2877 * return S_RESO * elif dts.min != 0: * return T_RESO # <<<<<<<<<<<<<< * elif dts.hour != 0: * return H_RESO */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__T_RESO); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2877; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyInt_AsInt(__pyx_t_2); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2877; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_3; goto __pyx_L0; goto __pyx_L3; } /* "pandas/tslib.pyx":2878 * elif dts.min != 0: * return T_RESO * elif dts.hour != 0: # <<<<<<<<<<<<<< * return H_RESO * return D_RESO */ __pyx_t_1 = ((__pyx_v_dts->hour != 0) != 0); if (__pyx_t_1) { /* "pandas/tslib.pyx":2879 * return T_RESO * elif dts.hour != 0: * return H_RESO # <<<<<<<<<<<<<< * return D_RESO * */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__H_RESO); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2879; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyInt_AsInt(__pyx_t_2); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2879; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_3; goto __pyx_L0; goto __pyx_L3; } __pyx_L3:; /* "pandas/tslib.pyx":2880 * elif dts.hour != 0: * return H_RESO * return D_RESO # <<<<<<<<<<<<<< * * cdef _reso_local(ndarray[int64_t] stamps, object tz): */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__D_RESO); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2880; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyInt_AsInt(__pyx_t_2); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2880; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_3; goto __pyx_L0; __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_WriteUnraisable("pandas.tslib._reso_stamp", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/tslib.pyx":2882 * return D_RESO * * cdef _reso_local(ndarray[int64_t] stamps, object tz): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t n = len(stamps) */ static PyObject *__pyx_f_6pandas_5tslib__reso_local(PyArrayObject *__pyx_v_stamps, PyObject *__pyx_v_tz) { Py_ssize_t __pyx_v_n; int __pyx_v_reso; int __pyx_v_curr_reso; PyArrayObject *__pyx_v_trans = 0; PyArrayObject *__pyx_v_deltas = 0; PyArrayObject *__pyx_v_pos = 0; pandas_datetimestruct __pyx_v_dts; Py_ssize_t __pyx_v_i; PyDateTime_DateTime *__pyx_v_dt = NULL; PyObject *__pyx_v_delta = NULL; PyObject *__pyx_v__pos = NULL; __Pyx_LocalBuf_ND __pyx_pybuffernd_deltas; __Pyx_Buffer __pyx_pybuffer_deltas; __Pyx_LocalBuf_ND __pyx_pybuffernd_pos; __Pyx_Buffer __pyx_pybuffer_pos; __Pyx_LocalBuf_ND __pyx_pybuffernd_stamps; __Pyx_Buffer __pyx_pybuffer_stamps; __Pyx_LocalBuf_ND __pyx_pybuffernd_trans; __Pyx_Buffer __pyx_pybuffer_trans; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; PyObject *__pyx_t_2 = NULL; int __pyx_t_3; int __pyx_t_4; Py_ssize_t __pyx_t_5; Py_ssize_t __pyx_t_6; Py_ssize_t __pyx_t_7; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; Py_ssize_t __pyx_t_10; Py_ssize_t __pyx_t_11; PyObject *__pyx_t_12 = NULL; PyObject *__pyx_t_13 = NULL; PyObject *__pyx_t_14 = NULL; PyObject *__pyx_t_15 = NULL; PyObject *__pyx_t_16 = NULL; Py_ssize_t __pyx_t_17; npy_datetime __pyx_t_18; PyArrayObject *__pyx_t_19 = NULL; PyObject *__pyx_t_20 = NULL; PyObject *__pyx_t_21 = NULL; PyObject *__pyx_t_22 = NULL; int __pyx_t_23; Py_ssize_t __pyx_t_24; Py_ssize_t __pyx_t_25; long __pyx_t_26; Py_ssize_t __pyx_t_27; Py_ssize_t __pyx_t_28; Py_ssize_t __pyx_t_29; __pyx_t_5numpy_int64_t __pyx_t_30; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_reso_local", 0); __pyx_pybuffer_trans.pybuffer.buf = NULL; __pyx_pybuffer_trans.refcount = 0; __pyx_pybuffernd_trans.data = NULL; __pyx_pybuffernd_trans.rcbuffer = &__pyx_pybuffer_trans; __pyx_pybuffer_deltas.pybuffer.buf = NULL; __pyx_pybuffer_deltas.refcount = 0; __pyx_pybuffernd_deltas.data = NULL; __pyx_pybuffernd_deltas.rcbuffer = &__pyx_pybuffer_deltas; __pyx_pybuffer_pos.pybuffer.buf = NULL; __pyx_pybuffer_pos.refcount = 0; __pyx_pybuffernd_pos.data = NULL; __pyx_pybuffernd_pos.rcbuffer = &__pyx_pybuffer_pos; __pyx_pybuffer_stamps.pybuffer.buf = NULL; __pyx_pybuffer_stamps.refcount = 0; __pyx_pybuffernd_stamps.data = NULL; __pyx_pybuffernd_stamps.rcbuffer = &__pyx_pybuffer_stamps; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_stamps.rcbuffer->pybuffer, (PyObject*)__pyx_v_stamps, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2882; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_stamps.diminfo[0].strides = __pyx_pybuffernd_stamps.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_stamps.diminfo[0].shape = __pyx_pybuffernd_stamps.rcbuffer->pybuffer.shape[0]; /* "pandas/tslib.pyx":2884 * cdef _reso_local(ndarray[int64_t] stamps, object tz): * cdef: * Py_ssize_t n = len(stamps) # <<<<<<<<<<<<<< * int reso = D_RESO, curr_reso * ndarray[int64_t] trans, deltas, pos */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_stamps)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2884; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/tslib.pyx":2885 * cdef: * Py_ssize_t n = len(stamps) * int reso = D_RESO, curr_reso # <<<<<<<<<<<<<< * ndarray[int64_t] trans, deltas, pos * pandas_datetimestruct dts */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__D_RESO); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2885; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyInt_AsInt(__pyx_t_2); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2885; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_reso = __pyx_t_3; /* "pandas/tslib.pyx":2889 * pandas_datetimestruct dts * * if _is_utc(tz): # <<<<<<<<<<<<<< * for i in range(n): * if stamps[i] == NPY_NAT: */ __pyx_t_4 = (__pyx_f_6pandas_5tslib__is_utc(__pyx_v_tz) != 0); if (__pyx_t_4) { /* "pandas/tslib.pyx":2890 * * if _is_utc(tz): * for i in range(n): # <<<<<<<<<<<<<< * if stamps[i] == NPY_NAT: * continue */ __pyx_t_1 = __pyx_v_n; for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_1; __pyx_t_5+=1) { __pyx_v_i = __pyx_t_5; /* "pandas/tslib.pyx":2891 * if _is_utc(tz): * for i in range(n): * if stamps[i] == NPY_NAT: # <<<<<<<<<<<<<< * continue * pandas_datetime_to_datetimestruct(stamps[i], PANDAS_FR_ns, &dts) */ __pyx_t_6 = __pyx_v_i; __pyx_t_3 = -1; if (__pyx_t_6 < 0) { __pyx_t_6 += __pyx_pybuffernd_stamps.diminfo[0].shape; if (unlikely(__pyx_t_6 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_6 >= __pyx_pybuffernd_stamps.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2891; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_4 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_stamps.rcbuffer->pybuffer.buf, __pyx_t_6, __pyx_pybuffernd_stamps.diminfo[0].strides)) == __pyx_v_6pandas_5tslib_NPY_NAT) != 0); if (__pyx_t_4) { /* "pandas/tslib.pyx":2892 * for i in range(n): * if stamps[i] == NPY_NAT: * continue # <<<<<<<<<<<<<< * pandas_datetime_to_datetimestruct(stamps[i], PANDAS_FR_ns, &dts) * curr_reso = _reso_stamp(&dts) */ goto __pyx_L4_continue; goto __pyx_L6; } __pyx_L6:; /* "pandas/tslib.pyx":2893 * if stamps[i] == NPY_NAT: * continue * pandas_datetime_to_datetimestruct(stamps[i], PANDAS_FR_ns, &dts) # <<<<<<<<<<<<<< * curr_reso = _reso_stamp(&dts) * if curr_reso < reso: */ __pyx_t_7 = __pyx_v_i; __pyx_t_3 = -1; if (__pyx_t_7 < 0) { __pyx_t_7 += __pyx_pybuffernd_stamps.diminfo[0].shape; if (unlikely(__pyx_t_7 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_7 >= __pyx_pybuffernd_stamps.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2893; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } pandas_datetime_to_datetimestruct((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_stamps.rcbuffer->pybuffer.buf, __pyx_t_7, __pyx_pybuffernd_stamps.diminfo[0].strides)), PANDAS_FR_ns, (&__pyx_v_dts)); /* "pandas/tslib.pyx":2894 * continue * pandas_datetime_to_datetimestruct(stamps[i], PANDAS_FR_ns, &dts) * curr_reso = _reso_stamp(&dts) # <<<<<<<<<<<<<< * if curr_reso < reso: * reso = curr_reso */ __pyx_v_curr_reso = __pyx_f_6pandas_5tslib__reso_stamp((&__pyx_v_dts)); /* "pandas/tslib.pyx":2895 * pandas_datetime_to_datetimestruct(stamps[i], PANDAS_FR_ns, &dts) * curr_reso = _reso_stamp(&dts) * if curr_reso < reso: # <<<<<<<<<<<<<< * reso = curr_reso * elif _is_tzlocal(tz): */ __pyx_t_4 = ((__pyx_v_curr_reso < __pyx_v_reso) != 0); if (__pyx_t_4) { /* "pandas/tslib.pyx":2896 * curr_reso = _reso_stamp(&dts) * if curr_reso < reso: * reso = curr_reso # <<<<<<<<<<<<<< * elif _is_tzlocal(tz): * for i in range(n): */ __pyx_v_reso = __pyx_v_curr_reso; goto __pyx_L7; } __pyx_L7:; __pyx_L4_continue:; } goto __pyx_L3; } /* "pandas/tslib.pyx":2897 * if curr_reso < reso: * reso = curr_reso * elif _is_tzlocal(tz): # <<<<<<<<<<<<<< * for i in range(n): * if stamps[i] == NPY_NAT: */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s___is_tzlocal); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2897; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2897; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_INCREF(__pyx_v_tz); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_v_tz); __Pyx_GIVEREF(__pyx_v_tz); __pyx_t_9 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_8), NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2897; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0; __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2897; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; if (__pyx_t_4) { /* "pandas/tslib.pyx":2898 * reso = curr_reso * elif _is_tzlocal(tz): * for i in range(n): # <<<<<<<<<<<<<< * if stamps[i] == NPY_NAT: * continue */ __pyx_t_1 = __pyx_v_n; for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_1; __pyx_t_5+=1) { __pyx_v_i = __pyx_t_5; /* "pandas/tslib.pyx":2899 * elif _is_tzlocal(tz): * for i in range(n): * if stamps[i] == NPY_NAT: # <<<<<<<<<<<<<< * continue * pandas_datetime_to_datetimestruct(stamps[i], PANDAS_FR_ns, */ __pyx_t_10 = __pyx_v_i; __pyx_t_3 = -1; if (__pyx_t_10 < 0) { __pyx_t_10 += __pyx_pybuffernd_stamps.diminfo[0].shape; if (unlikely(__pyx_t_10 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_10 >= __pyx_pybuffernd_stamps.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2899; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_4 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_stamps.rcbuffer->pybuffer.buf, __pyx_t_10, __pyx_pybuffernd_stamps.diminfo[0].strides)) == __pyx_v_6pandas_5tslib_NPY_NAT) != 0); if (__pyx_t_4) { /* "pandas/tslib.pyx":2900 * for i in range(n): * if stamps[i] == NPY_NAT: * continue # <<<<<<<<<<<<<< * pandas_datetime_to_datetimestruct(stamps[i], PANDAS_FR_ns, * &dts) */ goto __pyx_L8_continue; goto __pyx_L10; } __pyx_L10:; /* "pandas/tslib.pyx":2901 * if stamps[i] == NPY_NAT: * continue * pandas_datetime_to_datetimestruct(stamps[i], PANDAS_FR_ns, # <<<<<<<<<<<<<< * &dts) * dt = datetime(dts.year, dts.month, dts.day, dts.hour, */ __pyx_t_11 = __pyx_v_i; __pyx_t_3 = -1; if (__pyx_t_11 < 0) { __pyx_t_11 += __pyx_pybuffernd_stamps.diminfo[0].shape; if (unlikely(__pyx_t_11 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_11 >= __pyx_pybuffernd_stamps.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2901; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } /* "pandas/tslib.pyx":2902 * continue * pandas_datetime_to_datetimestruct(stamps[i], PANDAS_FR_ns, * &dts) # <<<<<<<<<<<<<< * dt = datetime(dts.year, dts.month, dts.day, dts.hour, * dts.min, dts.sec, dts.us, tz) */ pandas_datetime_to_datetimestruct((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_stamps.rcbuffer->pybuffer.buf, __pyx_t_11, __pyx_pybuffernd_stamps.diminfo[0].strides)), PANDAS_FR_ns, (&__pyx_v_dts)); /* "pandas/tslib.pyx":2903 * pandas_datetime_to_datetimestruct(stamps[i], PANDAS_FR_ns, * &dts) * dt = datetime(dts.year, dts.month, dts.day, dts.hour, # <<<<<<<<<<<<<< * dts.min, dts.sec, dts.us, tz) * delta = int(total_seconds(_get_utcoffset(tz, dt))) * 1000000000 */ __pyx_t_9 = __Pyx_PyInt_to_py_npy_int64(__pyx_v_dts.year); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2903; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_t_8 = __Pyx_PyInt_to_py_npy_int32(__pyx_v_dts.month); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2903; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_2 = __Pyx_PyInt_to_py_npy_int32(__pyx_v_dts.day); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2903; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_12 = __Pyx_PyInt_to_py_npy_int32(__pyx_v_dts.hour); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2903; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); /* "pandas/tslib.pyx":2904 * &dts) * dt = datetime(dts.year, dts.month, dts.day, dts.hour, * dts.min, dts.sec, dts.us, tz) # <<<<<<<<<<<<<< * delta = int(total_seconds(_get_utcoffset(tz, dt))) * 1000000000 * pandas_datetime_to_datetimestruct(stamps[i] + delta, */ __pyx_t_13 = __Pyx_PyInt_to_py_npy_int32(__pyx_v_dts.min); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2904; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __pyx_t_14 = __Pyx_PyInt_to_py_npy_int32(__pyx_v_dts.sec); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2904; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_14); __pyx_t_15 = __Pyx_PyInt_to_py_npy_int32(__pyx_v_dts.us); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2904; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_15); __pyx_t_16 = PyTuple_New(8); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2903; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_16); PyTuple_SET_ITEM(__pyx_t_16, 0, __pyx_t_9); __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_16, 1, __pyx_t_8); __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_16, 2, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_16, 3, __pyx_t_12); __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_16, 4, __pyx_t_13); __Pyx_GIVEREF(__pyx_t_13); PyTuple_SET_ITEM(__pyx_t_16, 5, __pyx_t_14); __Pyx_GIVEREF(__pyx_t_14); PyTuple_SET_ITEM(__pyx_t_16, 6, __pyx_t_15); __Pyx_GIVEREF(__pyx_t_15); __Pyx_INCREF(__pyx_v_tz); PyTuple_SET_ITEM(__pyx_t_16, 7, __pyx_v_tz); __Pyx_GIVEREF(__pyx_v_tz); __pyx_t_9 = 0; __pyx_t_8 = 0; __pyx_t_2 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_15 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_8datetime_datetime)), ((PyObject *)__pyx_t_16), NULL); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2903; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_15); __Pyx_DECREF(((PyObject *)__pyx_t_16)); __pyx_t_16 = 0; __Pyx_XDECREF_SET(__pyx_v_dt, ((PyDateTime_DateTime *)__pyx_t_15)); __pyx_t_15 = 0; /* "pandas/tslib.pyx":2905 * dt = datetime(dts.year, dts.month, dts.day, dts.hour, * dts.min, dts.sec, dts.us, tz) * delta = int(total_seconds(_get_utcoffset(tz, dt))) * 1000000000 # <<<<<<<<<<<<<< * pandas_datetime_to_datetimestruct(stamps[i] + delta, * PANDAS_FR_ns, &dts) */ __pyx_t_15 = __pyx_f_6pandas_5tslib__get_utcoffset(__pyx_v_tz, ((PyObject *)__pyx_v_dt), 0); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2905; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_15); __pyx_t_16 = PyFloat_FromDouble(__pyx_f_6pandas_5tslib_total_seconds(__pyx_t_15)); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2905; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_16); __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; __pyx_t_15 = PyTuple_New(1); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2905; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_15); PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_t_16); __Pyx_GIVEREF(__pyx_t_16); __pyx_t_16 = 0; __pyx_t_16 = PyObject_Call(((PyObject *)((PyObject*)(&PyInt_Type))), ((PyObject *)__pyx_t_15), NULL); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2905; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_16); __Pyx_DECREF(((PyObject *)__pyx_t_15)); __pyx_t_15 = 0; __pyx_t_15 = PyNumber_Multiply(__pyx_t_16, __pyx_int_1000000000); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2905; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_15); __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; __Pyx_XDECREF_SET(__pyx_v_delta, __pyx_t_15); __pyx_t_15 = 0; /* "pandas/tslib.pyx":2906 * dts.min, dts.sec, dts.us, tz) * delta = int(total_seconds(_get_utcoffset(tz, dt))) * 1000000000 * pandas_datetime_to_datetimestruct(stamps[i] + delta, # <<<<<<<<<<<<<< * PANDAS_FR_ns, &dts) * curr_reso = _reso_stamp(&dts) */ __pyx_t_17 = __pyx_v_i; __pyx_t_3 = -1; if (__pyx_t_17 < 0) { __pyx_t_17 += __pyx_pybuffernd_stamps.diminfo[0].shape; if (unlikely(__pyx_t_17 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_17 >= __pyx_pybuffernd_stamps.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2906; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_15 = __Pyx_PyInt_to_py_npy_int64((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_stamps.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_stamps.diminfo[0].strides))); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2906; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_15); __pyx_t_16 = PyNumber_Add(__pyx_t_15, __pyx_v_delta); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2906; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_16); __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; __pyx_t_18 = __Pyx_PyInt_from_py_npy_int64(__pyx_t_16); if (unlikely((__pyx_t_18 == (npy_datetime)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2906; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; /* "pandas/tslib.pyx":2907 * delta = int(total_seconds(_get_utcoffset(tz, dt))) * 1000000000 * pandas_datetime_to_datetimestruct(stamps[i] + delta, * PANDAS_FR_ns, &dts) # <<<<<<<<<<<<<< * curr_reso = _reso_stamp(&dts) * if curr_reso < reso: */ pandas_datetime_to_datetimestruct(__pyx_t_18, PANDAS_FR_ns, (&__pyx_v_dts)); /* "pandas/tslib.pyx":2908 * pandas_datetime_to_datetimestruct(stamps[i] + delta, * PANDAS_FR_ns, &dts) * curr_reso = _reso_stamp(&dts) # <<<<<<<<<<<<<< * if curr_reso < reso: * reso = curr_reso */ __pyx_v_curr_reso = __pyx_f_6pandas_5tslib__reso_stamp((&__pyx_v_dts)); /* "pandas/tslib.pyx":2909 * PANDAS_FR_ns, &dts) * curr_reso = _reso_stamp(&dts) * if curr_reso < reso: # <<<<<<<<<<<<<< * reso = curr_reso * else: */ __pyx_t_4 = ((__pyx_v_curr_reso < __pyx_v_reso) != 0); if (__pyx_t_4) { /* "pandas/tslib.pyx":2910 * curr_reso = _reso_stamp(&dts) * if curr_reso < reso: * reso = curr_reso # <<<<<<<<<<<<<< * else: * # Adjust datetime64 timestamp, recompute datetimestruct */ __pyx_v_reso = __pyx_v_curr_reso; goto __pyx_L11; } __pyx_L11:; __pyx_L8_continue:; } goto __pyx_L3; } /*else*/ { /* "pandas/tslib.pyx":2913 * else: * # Adjust datetime64 timestamp, recompute datetimestruct * trans = _get_transitions(tz) # <<<<<<<<<<<<<< * deltas = _get_deltas(tz) * _pos = trans.searchsorted(stamps, side='right') - 1 */ __pyx_t_16 = __Pyx_GetModuleGlobalName(__pyx_n_s___get_transitions); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2913; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_16); __pyx_t_15 = PyTuple_New(1); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2913; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_15); __Pyx_INCREF(__pyx_v_tz); PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_v_tz); __Pyx_GIVEREF(__pyx_v_tz); __pyx_t_14 = PyObject_Call(__pyx_t_16, ((PyObject *)__pyx_t_15), NULL); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2913; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_14); __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_15)); __pyx_t_15 = 0; if (!(likely(((__pyx_t_14) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_14, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2913; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_19 = ((PyArrayObject *)__pyx_t_14); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_trans.rcbuffer->pybuffer); __pyx_t_3 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_trans.rcbuffer->pybuffer, (PyObject*)__pyx_t_19, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_3 < 0)) { PyErr_Fetch(&__pyx_t_20, &__pyx_t_21, &__pyx_t_22); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_trans.rcbuffer->pybuffer, (PyObject*)__pyx_v_trans, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_20); Py_XDECREF(__pyx_t_21); Py_XDECREF(__pyx_t_22); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_20, __pyx_t_21, __pyx_t_22); } } __pyx_pybuffernd_trans.diminfo[0].strides = __pyx_pybuffernd_trans.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_trans.diminfo[0].shape = __pyx_pybuffernd_trans.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2913; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_19 = 0; __pyx_v_trans = ((PyArrayObject *)__pyx_t_14); __pyx_t_14 = 0; /* "pandas/tslib.pyx":2914 * # Adjust datetime64 timestamp, recompute datetimestruct * trans = _get_transitions(tz) * deltas = _get_deltas(tz) # <<<<<<<<<<<<<< * _pos = trans.searchsorted(stamps, side='right') - 1 * if _pos.dtype != np.int64: */ __pyx_t_14 = __Pyx_GetModuleGlobalName(__pyx_n_s___get_deltas); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2914; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_14); __pyx_t_15 = PyTuple_New(1); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2914; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_15); __Pyx_INCREF(__pyx_v_tz); PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_v_tz); __Pyx_GIVEREF(__pyx_v_tz); __pyx_t_16 = PyObject_Call(__pyx_t_14, ((PyObject *)__pyx_t_15), NULL); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2914; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_16); __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_15)); __pyx_t_15 = 0; if (!(likely(((__pyx_t_16) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_16, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2914; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_19 = ((PyArrayObject *)__pyx_t_16); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_deltas.rcbuffer->pybuffer); __pyx_t_3 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_deltas.rcbuffer->pybuffer, (PyObject*)__pyx_t_19, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_3 < 0)) { PyErr_Fetch(&__pyx_t_22, &__pyx_t_21, &__pyx_t_20); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_deltas.rcbuffer->pybuffer, (PyObject*)__pyx_v_deltas, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_22); Py_XDECREF(__pyx_t_21); Py_XDECREF(__pyx_t_20); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_22, __pyx_t_21, __pyx_t_20); } } __pyx_pybuffernd_deltas.diminfo[0].strides = __pyx_pybuffernd_deltas.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_deltas.diminfo[0].shape = __pyx_pybuffernd_deltas.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2914; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_19 = 0; __pyx_v_deltas = ((PyArrayObject *)__pyx_t_16); __pyx_t_16 = 0; /* "pandas/tslib.pyx":2915 * trans = _get_transitions(tz) * deltas = _get_deltas(tz) * _pos = trans.searchsorted(stamps, side='right') - 1 # <<<<<<<<<<<<<< * if _pos.dtype != np.int64: * _pos = _pos.astype(np.int64) */ __pyx_t_16 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_trans), __pyx_n_s__searchsorted); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2915; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_16); __pyx_t_15 = PyTuple_New(1); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2915; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_15); __Pyx_INCREF(((PyObject *)__pyx_v_stamps)); PyTuple_SET_ITEM(__pyx_t_15, 0, ((PyObject *)__pyx_v_stamps)); __Pyx_GIVEREF(((PyObject *)__pyx_v_stamps)); __pyx_t_14 = PyDict_New(); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2915; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_14)); if (PyDict_SetItem(__pyx_t_14, ((PyObject *)__pyx_n_s__side), ((PyObject *)__pyx_n_s__right)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2915; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_13 = PyObject_Call(__pyx_t_16, ((PyObject *)__pyx_t_15), ((PyObject *)__pyx_t_14)); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2915; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_15)); __pyx_t_15 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_14)); __pyx_t_14 = 0; __pyx_t_14 = PyNumber_Subtract(__pyx_t_13, __pyx_int_1); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2915; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_14); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_v__pos = __pyx_t_14; __pyx_t_14 = 0; /* "pandas/tslib.pyx":2916 * deltas = _get_deltas(tz) * _pos = trans.searchsorted(stamps, side='right') - 1 * if _pos.dtype != np.int64: # <<<<<<<<<<<<<< * _pos = _pos.astype(np.int64) * pos = _pos */ __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_v__pos, __pyx_n_s__dtype); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2916; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_14); __pyx_t_13 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2916; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_t_13, __pyx_n_s__int64); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2916; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_15); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_13 = PyObject_RichCompare(__pyx_t_14, __pyx_t_15, Py_NE); __Pyx_XGOTREF(__pyx_t_13); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2916; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_13); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2916; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; if (__pyx_t_4) { /* "pandas/tslib.pyx":2917 * _pos = trans.searchsorted(stamps, side='right') - 1 * if _pos.dtype != np.int64: * _pos = _pos.astype(np.int64) # <<<<<<<<<<<<<< * pos = _pos * */ __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_v__pos, __pyx_n_s__astype); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2917; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __pyx_t_15 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2917; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_15); __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_t_15, __pyx_n_s__int64); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2917; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_14); __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; __pyx_t_15 = PyTuple_New(1); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2917; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_15); PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_t_14); __Pyx_GIVEREF(__pyx_t_14); __pyx_t_14 = 0; __pyx_t_14 = PyObject_Call(__pyx_t_13, ((PyObject *)__pyx_t_15), NULL); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2917; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_14); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_15)); __pyx_t_15 = 0; __Pyx_DECREF_SET(__pyx_v__pos, __pyx_t_14); __pyx_t_14 = 0; goto __pyx_L12; } __pyx_L12:; /* "pandas/tslib.pyx":2918 * if _pos.dtype != np.int64: * _pos = _pos.astype(np.int64) * pos = _pos # <<<<<<<<<<<<<< * * # statictzinfo */ if (!(likely(((__pyx_v__pos) == Py_None) || likely(__Pyx_TypeTest(__pyx_v__pos, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2918; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_19 = ((PyArrayObject *)__pyx_v__pos); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_pos.rcbuffer->pybuffer); __pyx_t_3 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_pos.rcbuffer->pybuffer, (PyObject*)__pyx_t_19, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_3 < 0)) { PyErr_Fetch(&__pyx_t_20, &__pyx_t_21, &__pyx_t_22); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_pos.rcbuffer->pybuffer, (PyObject*)__pyx_v_pos, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_20); Py_XDECREF(__pyx_t_21); Py_XDECREF(__pyx_t_22); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_20, __pyx_t_21, __pyx_t_22); } } __pyx_pybuffernd_pos.diminfo[0].strides = __pyx_pybuffernd_pos.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_pos.diminfo[0].shape = __pyx_pybuffernd_pos.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2918; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_19 = 0; __Pyx_INCREF(__pyx_v__pos); __pyx_v_pos = ((PyArrayObject *)__pyx_v__pos); /* "pandas/tslib.pyx":2921 * * # statictzinfo * if not hasattr(tz, '_transition_info'): # <<<<<<<<<<<<<< * for i in range(n): * if stamps[i] == NPY_NAT: */ __pyx_t_4 = PyObject_HasAttr(__pyx_v_tz, ((PyObject *)__pyx_n_s___transition_info)); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2921; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_23 = ((!(__pyx_t_4 != 0)) != 0); if (__pyx_t_23) { /* "pandas/tslib.pyx":2922 * # statictzinfo * if not hasattr(tz, '_transition_info'): * for i in range(n): # <<<<<<<<<<<<<< * if stamps[i] == NPY_NAT: * continue */ __pyx_t_1 = __pyx_v_n; for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_1; __pyx_t_5+=1) { __pyx_v_i = __pyx_t_5; /* "pandas/tslib.pyx":2923 * if not hasattr(tz, '_transition_info'): * for i in range(n): * if stamps[i] == NPY_NAT: # <<<<<<<<<<<<<< * continue * pandas_datetime_to_datetimestruct(stamps[i] + deltas[0], */ __pyx_t_24 = __pyx_v_i; __pyx_t_3 = -1; if (__pyx_t_24 < 0) { __pyx_t_24 += __pyx_pybuffernd_stamps.diminfo[0].shape; if (unlikely(__pyx_t_24 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_24 >= __pyx_pybuffernd_stamps.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2923; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_23 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_stamps.rcbuffer->pybuffer.buf, __pyx_t_24, __pyx_pybuffernd_stamps.diminfo[0].strides)) == __pyx_v_6pandas_5tslib_NPY_NAT) != 0); if (__pyx_t_23) { /* "pandas/tslib.pyx":2924 * for i in range(n): * if stamps[i] == NPY_NAT: * continue # <<<<<<<<<<<<<< * pandas_datetime_to_datetimestruct(stamps[i] + deltas[0], * PANDAS_FR_ns, &dts) */ goto __pyx_L14_continue; goto __pyx_L16; } __pyx_L16:; /* "pandas/tslib.pyx":2925 * if stamps[i] == NPY_NAT: * continue * pandas_datetime_to_datetimestruct(stamps[i] + deltas[0], # <<<<<<<<<<<<<< * PANDAS_FR_ns, &dts) * curr_reso = _reso_stamp(&dts) */ __pyx_t_25 = __pyx_v_i; __pyx_t_3 = -1; if (__pyx_t_25 < 0) { __pyx_t_25 += __pyx_pybuffernd_stamps.diminfo[0].shape; if (unlikely(__pyx_t_25 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_25 >= __pyx_pybuffernd_stamps.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2925; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_26 = 0; __pyx_t_3 = -1; if (__pyx_t_26 < 0) { __pyx_t_26 += __pyx_pybuffernd_deltas.diminfo[0].shape; if (unlikely(__pyx_t_26 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_26 >= __pyx_pybuffernd_deltas.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2925; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } /* "pandas/tslib.pyx":2926 * continue * pandas_datetime_to_datetimestruct(stamps[i] + deltas[0], * PANDAS_FR_ns, &dts) # <<<<<<<<<<<<<< * curr_reso = _reso_stamp(&dts) * if curr_reso < reso: */ pandas_datetime_to_datetimestruct(((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_stamps.rcbuffer->pybuffer.buf, __pyx_t_25, __pyx_pybuffernd_stamps.diminfo[0].strides)) + (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_deltas.rcbuffer->pybuffer.buf, __pyx_t_26, __pyx_pybuffernd_deltas.diminfo[0].strides))), PANDAS_FR_ns, (&__pyx_v_dts)); /* "pandas/tslib.pyx":2927 * pandas_datetime_to_datetimestruct(stamps[i] + deltas[0], * PANDAS_FR_ns, &dts) * curr_reso = _reso_stamp(&dts) # <<<<<<<<<<<<<< * if curr_reso < reso: * reso = curr_reso */ __pyx_v_curr_reso = __pyx_f_6pandas_5tslib__reso_stamp((&__pyx_v_dts)); /* "pandas/tslib.pyx":2928 * PANDAS_FR_ns, &dts) * curr_reso = _reso_stamp(&dts) * if curr_reso < reso: # <<<<<<<<<<<<<< * reso = curr_reso * else: */ __pyx_t_23 = ((__pyx_v_curr_reso < __pyx_v_reso) != 0); if (__pyx_t_23) { /* "pandas/tslib.pyx":2929 * curr_reso = _reso_stamp(&dts) * if curr_reso < reso: * reso = curr_reso # <<<<<<<<<<<<<< * else: * for i in range(n): */ __pyx_v_reso = __pyx_v_curr_reso; goto __pyx_L17; } __pyx_L17:; __pyx_L14_continue:; } goto __pyx_L13; } /*else*/ { /* "pandas/tslib.pyx":2931 * reso = curr_reso * else: * for i in range(n): # <<<<<<<<<<<<<< * if stamps[i] == NPY_NAT: * continue */ __pyx_t_1 = __pyx_v_n; for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_1; __pyx_t_5+=1) { __pyx_v_i = __pyx_t_5; /* "pandas/tslib.pyx":2932 * else: * for i in range(n): * if stamps[i] == NPY_NAT: # <<<<<<<<<<<<<< * continue * pandas_datetime_to_datetimestruct(stamps[i] + deltas[pos[i]], */ __pyx_t_27 = __pyx_v_i; __pyx_t_3 = -1; if (__pyx_t_27 < 0) { __pyx_t_27 += __pyx_pybuffernd_stamps.diminfo[0].shape; if (unlikely(__pyx_t_27 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_27 >= __pyx_pybuffernd_stamps.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2932; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_23 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_stamps.rcbuffer->pybuffer.buf, __pyx_t_27, __pyx_pybuffernd_stamps.diminfo[0].strides)) == __pyx_v_6pandas_5tslib_NPY_NAT) != 0); if (__pyx_t_23) { /* "pandas/tslib.pyx":2933 * for i in range(n): * if stamps[i] == NPY_NAT: * continue # <<<<<<<<<<<<<< * pandas_datetime_to_datetimestruct(stamps[i] + deltas[pos[i]], * PANDAS_FR_ns, &dts) */ goto __pyx_L18_continue; goto __pyx_L20; } __pyx_L20:; /* "pandas/tslib.pyx":2934 * if stamps[i] == NPY_NAT: * continue * pandas_datetime_to_datetimestruct(stamps[i] + deltas[pos[i]], # <<<<<<<<<<<<<< * PANDAS_FR_ns, &dts) * curr_reso = _reso_stamp(&dts) */ __pyx_t_28 = __pyx_v_i; __pyx_t_3 = -1; if (__pyx_t_28 < 0) { __pyx_t_28 += __pyx_pybuffernd_stamps.diminfo[0].shape; if (unlikely(__pyx_t_28 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_28 >= __pyx_pybuffernd_stamps.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2934; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_29 = __pyx_v_i; __pyx_t_3 = -1; if (__pyx_t_29 < 0) { __pyx_t_29 += __pyx_pybuffernd_pos.diminfo[0].shape; if (unlikely(__pyx_t_29 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_29 >= __pyx_pybuffernd_pos.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2934; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_30 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_pos.rcbuffer->pybuffer.buf, __pyx_t_29, __pyx_pybuffernd_pos.diminfo[0].strides)); __pyx_t_3 = -1; if (__pyx_t_30 < 0) { __pyx_t_30 += __pyx_pybuffernd_deltas.diminfo[0].shape; if (unlikely(__pyx_t_30 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_30 >= __pyx_pybuffernd_deltas.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2934; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } /* "pandas/tslib.pyx":2935 * continue * pandas_datetime_to_datetimestruct(stamps[i] + deltas[pos[i]], * PANDAS_FR_ns, &dts) # <<<<<<<<<<<<<< * curr_reso = _reso_stamp(&dts) * if curr_reso < reso: */ pandas_datetime_to_datetimestruct(((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_stamps.rcbuffer->pybuffer.buf, __pyx_t_28, __pyx_pybuffernd_stamps.diminfo[0].strides)) + (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_deltas.rcbuffer->pybuffer.buf, __pyx_t_30, __pyx_pybuffernd_deltas.diminfo[0].strides))), PANDAS_FR_ns, (&__pyx_v_dts)); /* "pandas/tslib.pyx":2936 * pandas_datetime_to_datetimestruct(stamps[i] + deltas[pos[i]], * PANDAS_FR_ns, &dts) * curr_reso = _reso_stamp(&dts) # <<<<<<<<<<<<<< * if curr_reso < reso: * reso = curr_reso */ __pyx_v_curr_reso = __pyx_f_6pandas_5tslib__reso_stamp((&__pyx_v_dts)); /* "pandas/tslib.pyx":2937 * PANDAS_FR_ns, &dts) * curr_reso = _reso_stamp(&dts) * if curr_reso < reso: # <<<<<<<<<<<<<< * reso = curr_reso * */ __pyx_t_23 = ((__pyx_v_curr_reso < __pyx_v_reso) != 0); if (__pyx_t_23) { /* "pandas/tslib.pyx":2938 * curr_reso = _reso_stamp(&dts) * if curr_reso < reso: * reso = curr_reso # <<<<<<<<<<<<<< * * return reso */ __pyx_v_reso = __pyx_v_curr_reso; goto __pyx_L21; } __pyx_L21:; __pyx_L18_continue:; } } __pyx_L13:; } __pyx_L3:; /* "pandas/tslib.pyx":2940 * reso = curr_reso * * return reso # <<<<<<<<<<<<<< * * #---------------------------------------------------------------------- */ __Pyx_XDECREF(__pyx_r); __pyx_t_14 = PyInt_FromLong(__pyx_v_reso); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2940; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_14); __pyx_r = __pyx_t_14; __pyx_t_14 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); __Pyx_XDECREF(__pyx_t_12); __Pyx_XDECREF(__pyx_t_13); __Pyx_XDECREF(__pyx_t_14); __Pyx_XDECREF(__pyx_t_15); __Pyx_XDECREF(__pyx_t_16); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_deltas.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_pos.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_stamps.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_trans.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.tslib._reso_local", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_deltas.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_pos.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_stamps.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_trans.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_trans); __Pyx_XDECREF((PyObject *)__pyx_v_deltas); __Pyx_XDECREF((PyObject *)__pyx_v_pos); __Pyx_XDECREF((PyObject *)__pyx_v_dt); __Pyx_XDECREF(__pyx_v_delta); __Pyx_XDECREF(__pyx_v__pos); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5tslib_97_getlang(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5tslib_97_getlang = {__Pyx_NAMESTR("_getlang"), (PyCFunction)__pyx_pw_6pandas_5tslib_97_getlang, METH_NOARGS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5tslib_97_getlang(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_getlang (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_5tslib_96_getlang(__pyx_self); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/tslib.pyx":2979 * __all__ = [] * * def _getlang(): # <<<<<<<<<<<<<< * # Figure out what the current language is set to. * return locale.getlocale(locale.LC_TIME) */ static PyObject *__pyx_pf_6pandas_5tslib_96_getlang(CYTHON_UNUSED PyObject *__pyx_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_getlang", 0); /* "pandas/tslib.pyx":2981 * def _getlang(): * # Figure out what the current language is set to. * return locale.getlocale(locale.LC_TIME) # <<<<<<<<<<<<<< * * class LocaleTime(object): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__locale); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2981; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s__getlocale); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2981; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__locale); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2981; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s__LC_TIME); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2981; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2981; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2981; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("pandas.tslib._getlang", __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_5tslib_10LocaleTime_1__init__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/ static char __pyx_doc_6pandas_5tslib_10LocaleTime___init__[] = "Set all attributes.\n\n Order of methods called matters for dependency reasons.\n\n The locale language is set at the offset and then checked again before\n exiting. This is to make sure that the attributes were not set with a\n mix of information from more than one locale. This would most likely\n happen when using threads where one thread calls a locale-dependent\n function while another thread changes the locale while the function in\n the other thread is still running. Proper coding would call for\n locks to prevent changing the locale while locale-dependent code is\n running. The check here is done in case someone does not think about\n doing this.\n\n Only other possible issue is if someone changed the timezone and did\n not call tz.tzset . That is an issue for the programmer, though,\n since changing the timezone is worthless without that call.\n\n "; static PyMethodDef __pyx_mdef_6pandas_5tslib_10LocaleTime_1__init__ = {__Pyx_NAMESTR("__init__"), (PyCFunction)__pyx_pw_6pandas_5tslib_10LocaleTime_1__init__, METH_O, __Pyx_DOCSTR(__pyx_doc_6pandas_5tslib_10LocaleTime___init__)}; static PyObject *__pyx_pw_6pandas_5tslib_10LocaleTime_1__init__(PyObject *__pyx_self, PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_5tslib_10LocaleTime___init__(__pyx_self, ((PyObject *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/tslib.pyx":3002 * """ * * def __init__(self): # <<<<<<<<<<<<<< * """Set all attributes. * */ static PyObject *__pyx_pf_6pandas_5tslib_10LocaleTime___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_t_4; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__init__", 0); /* "pandas/tslib.pyx":3022 * * """ * self.lang = _getlang() # <<<<<<<<<<<<<< * self.__calc_weekday() * self.__calc_month() */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s___getlang); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3022; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3022; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s__lang, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3022; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/tslib.pyx":3023 * """ * self.lang = _getlang() * self.__calc_weekday() # <<<<<<<<<<<<<< * self.__calc_month() * self.__calc_am_pm() */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_151); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3023; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3023; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pandas/tslib.pyx":3024 * self.lang = _getlang() * self.__calc_weekday() * self.__calc_month() # <<<<<<<<<<<<<< * self.__calc_am_pm() * self.__calc_timezone() */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_152); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3024; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3024; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/tslib.pyx":3025 * self.__calc_weekday() * self.__calc_month() * self.__calc_am_pm() # <<<<<<<<<<<<<< * self.__calc_timezone() * self.__calc_date_time() */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_153); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3025; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3025; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pandas/tslib.pyx":3026 * self.__calc_month() * self.__calc_am_pm() * self.__calc_timezone() # <<<<<<<<<<<<<< * self.__calc_date_time() * if _getlang() != self.lang: */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_154); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3026; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3026; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/tslib.pyx":3027 * self.__calc_am_pm() * self.__calc_timezone() * self.__calc_date_time() # <<<<<<<<<<<<<< * if _getlang() != self.lang: * raise ValueError("locale changed during initialization") */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_155); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3027; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3027; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pandas/tslib.pyx":3028 * self.__calc_timezone() * self.__calc_date_time() * if _getlang() != self.lang: # <<<<<<<<<<<<<< * raise ValueError("locale changed during initialization") * */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s___getlang); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3028; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3028; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s__lang); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3028; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = PyObject_RichCompare(__pyx_t_2, __pyx_t_1, Py_NE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3028; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3028; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_4) { /* "pandas/tslib.pyx":3029 * self.__calc_date_time() * if _getlang() != self.lang: * raise ValueError("locale changed during initialization") # <<<<<<<<<<<<<< * * def __pad(self, seq, front): */ __pyx_t_3 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_157), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3029; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 3029; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L3; } __pyx_L3:; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("pandas.tslib.LocaleTime.__init__", __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_5tslib_10LocaleTime_3__pad(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5tslib_10LocaleTime_3__pad = {__Pyx_NAMESTR("__pad"), (PyCFunction)__pyx_pw_6pandas_5tslib_10LocaleTime_3__pad, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5tslib_10LocaleTime_3__pad(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { CYTHON_UNUSED PyObject *__pyx_v_self = 0; PyObject *__pyx_v_seq = 0; PyObject *__pyx_v_front = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__pad (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__self,&__pyx_n_s__seq,&__pyx_n_s__front,0}; PyObject* values[3] = {0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__self)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__seq)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("__pad", 1, 3, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3031; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__front)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("__pad", 1, 3, 3, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3031; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pad") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3031; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 3) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); } __pyx_v_self = values[0]; __pyx_v_seq = values[1]; __pyx_v_front = values[2]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("__pad", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3031; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.tslib.LocaleTime.__pad", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pandas_5tslib_10LocaleTime_2__pad(__pyx_self, __pyx_v_self, __pyx_v_seq, __pyx_v_front); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/tslib.pyx":3031 * raise ValueError("locale changed during initialization") * * def __pad(self, seq, front): # <<<<<<<<<<<<<< * # Add '' to seq to either the front (is True), else the back. * seq = list(seq) */ static PyObject *__pyx_pf_6pandas_5tslib_10LocaleTime_2__pad(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, PyObject *__pyx_v_seq, PyObject *__pyx_v_front) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_t_3; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__pad", 0); __Pyx_INCREF(__pyx_v_seq); /* "pandas/tslib.pyx":3033 * def __pad(self, seq, front): * # Add '' to seq to either the front (is True), else the back. * seq = list(seq) # <<<<<<<<<<<<<< * if front: * seq.insert(0, '') */ __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3033; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_seq); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_seq); __Pyx_GIVEREF(__pyx_v_seq); __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)(&PyList_Type))), ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3033; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __Pyx_DECREF_SET(__pyx_v_seq, __pyx_t_2); __pyx_t_2 = 0; /* "pandas/tslib.pyx":3034 * # Add '' to seq to either the front (is True), else the back. * seq = list(seq) * if front: # <<<<<<<<<<<<<< * seq.insert(0, '') * else: */ __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_front); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3034; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__pyx_t_3) { /* "pandas/tslib.pyx":3035 * seq = list(seq) * if front: * seq.insert(0, '') # <<<<<<<<<<<<<< * else: * seq.append('') */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_seq, __pyx_n_s__insert); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3035; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_k_tuple_158), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3035; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L3; } /*else*/ { /* "pandas/tslib.pyx":3037 * seq.insert(0, '') * else: * seq.append('') # <<<<<<<<<<<<<< * return seq * */ __pyx_t_1 = __Pyx_PyObject_Append(__pyx_v_seq, ((PyObject *)__pyx_kp_s_27)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3037; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } __pyx_L3:; /* "pandas/tslib.pyx":3038 * else: * seq.append('') * return seq # <<<<<<<<<<<<<< * * def __calc_weekday(self): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_seq); __pyx_r = __pyx_v_seq; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("pandas.tslib.LocaleTime.__pad", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_seq); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5tslib_10LocaleTime_5__calc_weekday(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5tslib_10LocaleTime_5__calc_weekday = {__Pyx_NAMESTR("__calc_weekday"), (PyCFunction)__pyx_pw_6pandas_5tslib_10LocaleTime_5__calc_weekday, METH_O, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5tslib_10LocaleTime_5__calc_weekday(PyObject *__pyx_self, PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__calc_weekday (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_5tslib_10LocaleTime_4__calc_weekday(__pyx_self, ((PyObject *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/tslib.pyx":3040 * return seq * * def __calc_weekday(self): # <<<<<<<<<<<<<< * # Set self.a_weekday and self.f_weekday using the calendar * # module. */ static PyObject *__pyx_pf_6pandas_5tslib_10LocaleTime_4__calc_weekday(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) { PyObject *__pyx_v_a_weekday = NULL; PyObject *__pyx_v_f_weekday = NULL; long __pyx_v_i; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; long __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__calc_weekday", 0); /* "pandas/tslib.pyx":3043 * # Set self.a_weekday and self.f_weekday using the calendar * # module. * a_weekday = [calendar.day_abbr[i].lower() for i in range(7)] # <<<<<<<<<<<<<< * f_weekday = [calendar.day_name[i].lower() for i in range(7)] * self.a_weekday = a_weekday */ __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3043; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); for (__pyx_t_2 = 0; __pyx_t_2 < 7; __pyx_t_2+=1) { __pyx_v_i = __pyx_t_2; __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s__calendar); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3043; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s__day_abbr); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3043; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_4, __pyx_v_i, sizeof(long), PyInt_FromLong, 0, 1, 1); if (!__pyx_t_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3043; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s__lower); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3043; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3043; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_3))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3043; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } __pyx_v_a_weekday = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/tslib.pyx":3044 * # module. * a_weekday = [calendar.day_abbr[i].lower() for i in range(7)] * f_weekday = [calendar.day_name[i].lower() for i in range(7)] # <<<<<<<<<<<<<< * self.a_weekday = a_weekday * self.f_weekday = f_weekday */ __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3044; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); for (__pyx_t_2 = 0; __pyx_t_2 < 7; __pyx_t_2+=1) { __pyx_v_i = __pyx_t_2; __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s__calendar); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3044; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s__day_name); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3044; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_4, __pyx_v_i, sizeof(long), PyInt_FromLong, 0, 1, 1); if (!__pyx_t_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3044; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s__lower); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3044; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3044; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_3))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3044; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } __pyx_v_f_weekday = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/tslib.pyx":3045 * a_weekday = [calendar.day_abbr[i].lower() for i in range(7)] * f_weekday = [calendar.day_name[i].lower() for i in range(7)] * self.a_weekday = a_weekday # <<<<<<<<<<<<<< * self.f_weekday = f_weekday * */ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s__a_weekday, ((PyObject *)__pyx_v_a_weekday)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3045; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/tslib.pyx":3046 * f_weekday = [calendar.day_name[i].lower() for i in range(7)] * self.a_weekday = a_weekday * self.f_weekday = f_weekday # <<<<<<<<<<<<<< * * def __calc_month(self): */ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s__f_weekday, ((PyObject *)__pyx_v_f_weekday)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3046; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("pandas.tslib.LocaleTime.__calc_weekday", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_a_weekday); __Pyx_XDECREF(__pyx_v_f_weekday); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5tslib_10LocaleTime_7__calc_month(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5tslib_10LocaleTime_7__calc_month = {__Pyx_NAMESTR("__calc_month"), (PyCFunction)__pyx_pw_6pandas_5tslib_10LocaleTime_7__calc_month, METH_O, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5tslib_10LocaleTime_7__calc_month(PyObject *__pyx_self, PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__calc_month (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_5tslib_10LocaleTime_6__calc_month(__pyx_self, ((PyObject *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/tslib.pyx":3048 * self.f_weekday = f_weekday * * def __calc_month(self): # <<<<<<<<<<<<<< * # Set self.f_month and self.a_month using the calendar module. * a_month = [calendar.month_abbr[i].lower() for i in range(13)] */ static PyObject *__pyx_pf_6pandas_5tslib_10LocaleTime_6__calc_month(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) { PyObject *__pyx_v_a_month = NULL; PyObject *__pyx_v_f_month = NULL; long __pyx_v_i; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; long __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__calc_month", 0); /* "pandas/tslib.pyx":3050 * def __calc_month(self): * # Set self.f_month and self.a_month using the calendar module. * a_month = [calendar.month_abbr[i].lower() for i in range(13)] # <<<<<<<<<<<<<< * f_month = [calendar.month_name[i].lower() for i in range(13)] * self.a_month = a_month */ __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3050; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); for (__pyx_t_2 = 0; __pyx_t_2 < 13; __pyx_t_2+=1) { __pyx_v_i = __pyx_t_2; __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s__calendar); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3050; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s__month_abbr); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3050; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_4, __pyx_v_i, sizeof(long), PyInt_FromLong, 0, 1, 1); if (!__pyx_t_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3050; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s__lower); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3050; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3050; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_3))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3050; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } __pyx_v_a_month = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/tslib.pyx":3051 * # Set self.f_month and self.a_month using the calendar module. * a_month = [calendar.month_abbr[i].lower() for i in range(13)] * f_month = [calendar.month_name[i].lower() for i in range(13)] # <<<<<<<<<<<<<< * self.a_month = a_month * self.f_month = f_month */ __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3051; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); for (__pyx_t_2 = 0; __pyx_t_2 < 13; __pyx_t_2+=1) { __pyx_v_i = __pyx_t_2; __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s__calendar); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3051; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s__month_name); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3051; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_4, __pyx_v_i, sizeof(long), PyInt_FromLong, 0, 1, 1); if (!__pyx_t_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3051; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s__lower); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3051; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3051; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_3))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3051; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } __pyx_v_f_month = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/tslib.pyx":3052 * a_month = [calendar.month_abbr[i].lower() for i in range(13)] * f_month = [calendar.month_name[i].lower() for i in range(13)] * self.a_month = a_month # <<<<<<<<<<<<<< * self.f_month = f_month * */ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s__a_month, ((PyObject *)__pyx_v_a_month)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3052; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/tslib.pyx":3053 * f_month = [calendar.month_name[i].lower() for i in range(13)] * self.a_month = a_month * self.f_month = f_month # <<<<<<<<<<<<<< * * def __calc_am_pm(self): */ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s__f_month, ((PyObject *)__pyx_v_f_month)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3053; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("pandas.tslib.LocaleTime.__calc_month", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_a_month); __Pyx_XDECREF(__pyx_v_f_month); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5tslib_10LocaleTime_9__calc_am_pm(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5tslib_10LocaleTime_9__calc_am_pm = {__Pyx_NAMESTR("__calc_am_pm"), (PyCFunction)__pyx_pw_6pandas_5tslib_10LocaleTime_9__calc_am_pm, METH_O, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5tslib_10LocaleTime_9__calc_am_pm(PyObject *__pyx_self, PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__calc_am_pm (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_5tslib_10LocaleTime_8__calc_am_pm(__pyx_self, ((PyObject *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/tslib.pyx":3055 * self.f_month = f_month * * def __calc_am_pm(self): # <<<<<<<<<<<<<< * # Set self.am_pm by using time.strftime(). * */ static PyObject *__pyx_pf_6pandas_5tslib_10LocaleTime_8__calc_am_pm(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) { PyObject *__pyx_v_am_pm = NULL; PyObject *__pyx_v_hour = NULL; PyObject *__pyx_v_time_tuple = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; Py_ssize_t __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; int __pyx_t_6; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__calc_am_pm", 0); /* "pandas/tslib.pyx":3061 * # magical; just happened to have used it everywhere else where a * # static date was needed. * am_pm = [] # <<<<<<<<<<<<<< * for hour in (01,22): * time_tuple = time.struct_time((1999,3,17,hour,44,55,2,76,0)) */ __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3061; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_v_am_pm = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/tslib.pyx":3062 * # static date was needed. * am_pm = [] * for hour in (01,22): # <<<<<<<<<<<<<< * time_tuple = time.struct_time((1999,3,17,hour,44,55,2,76,0)) * am_pm.append(time.strftime("%p", time_tuple).lower()) */ __pyx_t_1 = ((PyObject *)__pyx_k_tuple_159); __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0; for (;;) { if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break; #if CYTHON_COMPILING_IN_CPYTHON __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_filename = __pyx_f[0]; __pyx_lineno = 3062; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3062; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif __Pyx_XDECREF_SET(__pyx_v_hour, __pyx_t_3); __pyx_t_3 = 0; /* "pandas/tslib.pyx":3063 * am_pm = [] * for hour in (01,22): * time_tuple = time.struct_time((1999,3,17,hour,44,55,2,76,0)) # <<<<<<<<<<<<<< * am_pm.append(time.strftime("%p", time_tuple).lower()) * self.am_pm = am_pm */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s__time); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3063; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s__struct_time); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3063; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyTuple_New(9); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3063; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_int_1999); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_int_1999); __Pyx_GIVEREF(__pyx_int_1999); __Pyx_INCREF(__pyx_int_3); PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_int_3); __Pyx_GIVEREF(__pyx_int_3); __Pyx_INCREF(__pyx_int_17); PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_int_17); __Pyx_GIVEREF(__pyx_int_17); __Pyx_INCREF(__pyx_v_hour); PyTuple_SET_ITEM(__pyx_t_3, 3, __pyx_v_hour); __Pyx_GIVEREF(__pyx_v_hour); __Pyx_INCREF(__pyx_int_44); PyTuple_SET_ITEM(__pyx_t_3, 4, __pyx_int_44); __Pyx_GIVEREF(__pyx_int_44); __Pyx_INCREF(__pyx_int_55); PyTuple_SET_ITEM(__pyx_t_3, 5, __pyx_int_55); __Pyx_GIVEREF(__pyx_int_55); __Pyx_INCREF(__pyx_int_2); PyTuple_SET_ITEM(__pyx_t_3, 6, __pyx_int_2); __Pyx_GIVEREF(__pyx_int_2); __Pyx_INCREF(__pyx_int_76); PyTuple_SET_ITEM(__pyx_t_3, 7, __pyx_int_76); __Pyx_GIVEREF(__pyx_int_76); __Pyx_INCREF(__pyx_int_0); PyTuple_SET_ITEM(__pyx_t_3, 8, __pyx_int_0); __Pyx_GIVEREF(__pyx_int_0); __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3063; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_t_3)); __Pyx_GIVEREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; __pyx_t_3 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3063; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; __Pyx_XDECREF_SET(__pyx_v_time_tuple, __pyx_t_3); __pyx_t_3 = 0; /* "pandas/tslib.pyx":3064 * for hour in (01,22): * time_tuple = time.struct_time((1999,3,17,hour,44,55,2,76,0)) * am_pm.append(time.strftime("%p", time_tuple).lower()) # <<<<<<<<<<<<<< * self.am_pm = am_pm * */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s__time); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3064; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s__strftime); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3064; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3064; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(((PyObject *)__pyx_kp_s_160)); PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_kp_s_160)); __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_160)); __Pyx_INCREF(__pyx_v_time_tuple); PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_time_tuple); __Pyx_GIVEREF(__pyx_v_time_tuple); __pyx_t_4 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3064; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s__lower); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3064; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3064; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_6 = __Pyx_PyList_Append(__pyx_v_am_pm, __pyx_t_4); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3064; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pandas/tslib.pyx":3065 * time_tuple = time.struct_time((1999,3,17,hour,44,55,2,76,0)) * am_pm.append(time.strftime("%p", time_tuple).lower()) * self.am_pm = am_pm # <<<<<<<<<<<<<< * * def __calc_date_time(self): */ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s__am_pm, ((PyObject *)__pyx_v_am_pm)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3065; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("pandas.tslib.LocaleTime.__calc_am_pm", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_am_pm); __Pyx_XDECREF(__pyx_v_hour); __Pyx_XDECREF(__pyx_v_time_tuple); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5tslib_10LocaleTime_11__calc_date_time(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5tslib_10LocaleTime_11__calc_date_time = {__Pyx_NAMESTR("__calc_date_time"), (PyCFunction)__pyx_pw_6pandas_5tslib_10LocaleTime_11__calc_date_time, METH_O, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5tslib_10LocaleTime_11__calc_date_time(PyObject *__pyx_self, PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__calc_date_time (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_5tslib_10LocaleTime_10__calc_date_time(__pyx_self, ((PyObject *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/tslib.pyx":3067 * self.am_pm = am_pm * * def __calc_date_time(self): # <<<<<<<<<<<<<< * # Set self.date_time, self.date, & self.time by using * # time.strftime(). */ static PyObject *__pyx_pf_6pandas_5tslib_10LocaleTime_10__calc_date_time(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) { PyObject *__pyx_v_time_tuple = NULL; PyObject *__pyx_v_date_time = NULL; PyObject *__pyx_v_replacement_pairs = NULL; PyObject *__pyx_v_offset = NULL; PyObject *__pyx_v_directive = NULL; PyObject *__pyx_v_current_format = NULL; PyObject *__pyx_v_old = NULL; PyObject *__pyx_v_new = NULL; PyObject *__pyx_v_U_W = NULL; PyObject *__pyx_v_tz_values = NULL; PyObject *__pyx_v_tz = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; Py_ssize_t __pyx_t_7; PyObject *(*__pyx_t_8)(PyObject *); Py_ssize_t __pyx_t_9; PyObject *(*__pyx_t_10)(PyObject *); PyObject *(*__pyx_t_11)(PyObject *); int __pyx_t_12; int __pyx_t_13; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__calc_date_time", 0); /* "pandas/tslib.pyx":3075 * # values within the format string is very important; it eliminates * # possible ambiguity for what something represents. * time_tuple = time.struct_time((1999,3,17,22,44,55,2,76,0)) # <<<<<<<<<<<<<< * date_time = [None, None, None] * date_time[0] = time.strftime("%c", time_tuple).lower() */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__time); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3075; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s__struct_time); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3075; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_k_tuple_162), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3075; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_time_tuple = __pyx_t_1; __pyx_t_1 = 0; /* "pandas/tslib.pyx":3076 * # possible ambiguity for what something represents. * time_tuple = time.struct_time((1999,3,17,22,44,55,2,76,0)) * date_time = [None, None, None] # <<<<<<<<<<<<<< * date_time[0] = time.strftime("%c", time_tuple).lower() * date_time[1] = time.strftime("%x", time_tuple).lower() */ __pyx_t_1 = PyList_New(3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3076; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(Py_None); PyList_SET_ITEM(__pyx_t_1, 0, Py_None); __Pyx_GIVEREF(Py_None); __Pyx_INCREF(Py_None); PyList_SET_ITEM(__pyx_t_1, 1, Py_None); __Pyx_GIVEREF(Py_None); __Pyx_INCREF(Py_None); PyList_SET_ITEM(__pyx_t_1, 2, Py_None); __Pyx_GIVEREF(Py_None); __pyx_v_date_time = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/tslib.pyx":3077 * time_tuple = time.struct_time((1999,3,17,22,44,55,2,76,0)) * date_time = [None, None, None] * date_time[0] = time.strftime("%c", time_tuple).lower() # <<<<<<<<<<<<<< * date_time[1] = time.strftime("%x", time_tuple).lower() * date_time[2] = time.strftime("%X", time_tuple).lower() */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__time); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3077; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s__strftime); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3077; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3077; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)__pyx_kp_s_163)); PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_kp_s_163)); __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_163)); __Pyx_INCREF(__pyx_v_time_tuple); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_time_tuple); __Pyx_GIVEREF(__pyx_v_time_tuple); __pyx_t_3 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3077; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s__lower); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3077; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3077; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__Pyx_SetItemInt(((PyObject *)__pyx_v_date_time), 0, __pyx_t_3, sizeof(long), PyInt_FromLong, 1, 0, 1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3077; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/tslib.pyx":3078 * date_time = [None, None, None] * date_time[0] = time.strftime("%c", time_tuple).lower() * date_time[1] = time.strftime("%x", time_tuple).lower() # <<<<<<<<<<<<<< * date_time[2] = time.strftime("%X", time_tuple).lower() * replacement_pairs = [('%', '%%'), (self.f_weekday[2], '%A'), */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s__time); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3078; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s__strftime); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3078; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3078; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(((PyObject *)__pyx_kp_s_164)); PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_kp_s_164)); __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_164)); __Pyx_INCREF(__pyx_v_time_tuple); PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_time_tuple); __Pyx_GIVEREF(__pyx_v_time_tuple); __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3078; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__lower); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3078; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3078; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__Pyx_SetItemInt(((PyObject *)__pyx_v_date_time), 1, __pyx_t_2, sizeof(long), PyInt_FromLong, 1, 0, 1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3078; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/tslib.pyx":3079 * date_time[0] = time.strftime("%c", time_tuple).lower() * date_time[1] = time.strftime("%x", time_tuple).lower() * date_time[2] = time.strftime("%X", time_tuple).lower() # <<<<<<<<<<<<<< * replacement_pairs = [('%', '%%'), (self.f_weekday[2], '%A'), * (self.f_month[3], '%B'), (self.a_weekday[2], '%a'), */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__time); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3079; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__strftime); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3079; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3079; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(((PyObject *)__pyx_kp_s_165)); PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_kp_s_165)); __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_165)); __Pyx_INCREF(__pyx_v_time_tuple); PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_time_tuple); __Pyx_GIVEREF(__pyx_v_time_tuple); __pyx_t_1 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3079; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s__lower); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3079; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3079; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__Pyx_SetItemInt(((PyObject *)__pyx_v_date_time), 2, __pyx_t_1, sizeof(long), PyInt_FromLong, 1, 0, 1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3079; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pandas/tslib.pyx":3080 * date_time[1] = time.strftime("%x", time_tuple).lower() * date_time[2] = time.strftime("%X", time_tuple).lower() * replacement_pairs = [('%', '%%'), (self.f_weekday[2], '%A'), # <<<<<<<<<<<<<< * (self.f_month[3], '%B'), (self.a_weekday[2], '%a'), * (self.a_month[3], '%b'), (self.am_pm[1], '%p'), */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s__f_weekday); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3080; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_1, 2, sizeof(long), PyInt_FromLong, 0, 0, 1); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3080; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3080; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __Pyx_INCREF(((PyObject *)__pyx_kp_s_168)); PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject *)__pyx_kp_s_168)); __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_168)); __pyx_t_2 = 0; /* "pandas/tslib.pyx":3081 * date_time[2] = time.strftime("%X", time_tuple).lower() * replacement_pairs = [('%', '%%'), (self.f_weekday[2], '%A'), * (self.f_month[3], '%B'), (self.a_weekday[2], '%a'), # <<<<<<<<<<<<<< * (self.a_month[3], '%b'), (self.am_pm[1], '%p'), * ('1999', '%Y'), ('99', '%y'), ('22', '%H'), */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s__f_month); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3081; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_2, 3, sizeof(long), PyInt_FromLong, 0, 0, 1); if (!__pyx_t_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3081; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3081; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __Pyx_INCREF(((PyObject *)__pyx_kp_s_169)); PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)__pyx_kp_s_169)); __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_169)); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s__a_weekday); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3081; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_3, 2, sizeof(long), PyInt_FromLong, 0, 0, 1); if (!__pyx_t_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3081; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3081; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __Pyx_INCREF(((PyObject *)__pyx_kp_s_170)); PyTuple_SET_ITEM(__pyx_t_3, 1, ((PyObject *)__pyx_kp_s_170)); __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_170)); __pyx_t_4 = 0; /* "pandas/tslib.pyx":3082 * replacement_pairs = [('%', '%%'), (self.f_weekday[2], '%A'), * (self.f_month[3], '%B'), (self.a_weekday[2], '%a'), * (self.a_month[3], '%b'), (self.am_pm[1], '%p'), # <<<<<<<<<<<<<< * ('1999', '%Y'), ('99', '%y'), ('22', '%H'), * ('44', '%M'), ('55', '%S'), ('76', '%j'), */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s__a_month); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3082; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_GetItemInt(__pyx_t_4, 3, sizeof(long), PyInt_FromLong, 0, 0, 1); if (!__pyx_t_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3082; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3082; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __Pyx_INCREF(((PyObject *)__pyx_kp_s_171)); PyTuple_SET_ITEM(__pyx_t_4, 1, ((PyObject *)__pyx_kp_s_171)); __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_171)); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s__am_pm); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3082; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_GetItemInt(__pyx_t_5, 1, sizeof(long), PyInt_FromLong, 0, 0, 1); if (!__pyx_t_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3082; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3082; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_6); __Pyx_INCREF(((PyObject *)__pyx_kp_s_160)); PyTuple_SET_ITEM(__pyx_t_5, 1, ((PyObject *)__pyx_kp_s_160)); __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_160)); __pyx_t_6 = 0; /* "pandas/tslib.pyx":3087 * ('17', '%d'), ('03', '%m'), ('3', '%m'), * # '3' needed for when no leading zero. * ('2', '%w'), ('10', '%I')] # <<<<<<<<<<<<<< * replacement_pairs.extend([(tz, "%Z") for tz_values in self.timezone * for tz in tz_values]) */ __pyx_t_6 = PyList_New(17); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3080; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(((PyObject *)__pyx_k_tuple_167)); PyList_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_k_tuple_167)); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_167)); PyList_SET_ITEM(__pyx_t_6, 1, ((PyObject *)__pyx_t_1)); __Pyx_GIVEREF(((PyObject *)__pyx_t_1)); PyList_SET_ITEM(__pyx_t_6, 2, ((PyObject *)__pyx_t_2)); __Pyx_GIVEREF(((PyObject *)__pyx_t_2)); PyList_SET_ITEM(__pyx_t_6, 3, ((PyObject *)__pyx_t_3)); __Pyx_GIVEREF(((PyObject *)__pyx_t_3)); PyList_SET_ITEM(__pyx_t_6, 4, ((PyObject *)__pyx_t_4)); __Pyx_GIVEREF(((PyObject *)__pyx_t_4)); PyList_SET_ITEM(__pyx_t_6, 5, ((PyObject *)__pyx_t_5)); __Pyx_GIVEREF(((PyObject *)__pyx_t_5)); __Pyx_INCREF(((PyObject *)__pyx_k_tuple_172)); PyList_SET_ITEM(__pyx_t_6, 6, ((PyObject *)__pyx_k_tuple_172)); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_172)); __Pyx_INCREF(((PyObject *)__pyx_k_tuple_174)); PyList_SET_ITEM(__pyx_t_6, 7, ((PyObject *)__pyx_k_tuple_174)); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_174)); __Pyx_INCREF(((PyObject *)__pyx_k_tuple_176)); PyList_SET_ITEM(__pyx_t_6, 8, ((PyObject *)__pyx_k_tuple_176)); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_176)); __Pyx_INCREF(((PyObject *)__pyx_k_tuple_178)); PyList_SET_ITEM(__pyx_t_6, 9, ((PyObject *)__pyx_k_tuple_178)); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_178)); __Pyx_INCREF(((PyObject *)__pyx_k_tuple_180)); PyList_SET_ITEM(__pyx_t_6, 10, ((PyObject *)__pyx_k_tuple_180)); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_180)); __Pyx_INCREF(((PyObject *)__pyx_k_tuple_182)); PyList_SET_ITEM(__pyx_t_6, 11, ((PyObject *)__pyx_k_tuple_182)); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_182)); __Pyx_INCREF(((PyObject *)__pyx_k_tuple_183)); PyList_SET_ITEM(__pyx_t_6, 12, ((PyObject *)__pyx_k_tuple_183)); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_183)); __Pyx_INCREF(((PyObject *)__pyx_k_tuple_185)); PyList_SET_ITEM(__pyx_t_6, 13, ((PyObject *)__pyx_k_tuple_185)); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_185)); __Pyx_INCREF(((PyObject *)__pyx_k_tuple_186)); PyList_SET_ITEM(__pyx_t_6, 14, ((PyObject *)__pyx_k_tuple_186)); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_186)); __Pyx_INCREF(((PyObject *)__pyx_k_tuple_188)); PyList_SET_ITEM(__pyx_t_6, 15, ((PyObject *)__pyx_k_tuple_188)); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_188)); __Pyx_INCREF(((PyObject *)__pyx_k_tuple_190)); PyList_SET_ITEM(__pyx_t_6, 16, ((PyObject *)__pyx_k_tuple_190)); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_190)); __pyx_t_1 = 0; __pyx_t_2 = 0; __pyx_t_3 = 0; __pyx_t_4 = 0; __pyx_t_5 = 0; __pyx_v_replacement_pairs = ((PyObject*)__pyx_t_6); __pyx_t_6 = 0; /* "pandas/tslib.pyx":3088 * # '3' needed for when no leading zero. * ('2', '%w'), ('10', '%I')] * replacement_pairs.extend([(tz, "%Z") for tz_values in self.timezone # <<<<<<<<<<<<<< * for tz in tz_values]) * for offset,directive in ((0,'%c'), (1,'%x'), (2,'%X')): */ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_replacement_pairs), __pyx_n_s__extend); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3088; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_5 = PyList_New(0); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3088; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s__timezone); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3088; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); if (PyList_CheckExact(__pyx_t_4) || PyTuple_CheckExact(__pyx_t_4)) { __pyx_t_3 = __pyx_t_4; __Pyx_INCREF(__pyx_t_3); __pyx_t_7 = 0; __pyx_t_8 = NULL; } else { __pyx_t_7 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3088; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_8 = Py_TYPE(__pyx_t_3)->tp_iternext; } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; for (;;) { if (!__pyx_t_8 && PyList_CheckExact(__pyx_t_3)) { if (__pyx_t_7 >= PyList_GET_SIZE(__pyx_t_3)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_4 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_7); __Pyx_INCREF(__pyx_t_4); __pyx_t_7++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3088; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_4 = PySequence_ITEM(__pyx_t_3, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3088; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif } else if (!__pyx_t_8 && PyTuple_CheckExact(__pyx_t_3)) { if (__pyx_t_7 >= PyTuple_GET_SIZE(__pyx_t_3)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_7); __Pyx_INCREF(__pyx_t_4); __pyx_t_7++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3088; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_4 = PySequence_ITEM(__pyx_t_3, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3088; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif } else { __pyx_t_4 = __pyx_t_8(__pyx_t_3); if (unlikely(!__pyx_t_4)) { if (PyErr_Occurred()) { if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear(); else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3088; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } break; } __Pyx_GOTREF(__pyx_t_4); } __Pyx_XDECREF_SET(__pyx_v_tz_values, __pyx_t_4); __pyx_t_4 = 0; /* "pandas/tslib.pyx":3089 * ('2', '%w'), ('10', '%I')] * replacement_pairs.extend([(tz, "%Z") for tz_values in self.timezone * for tz in tz_values]) # <<<<<<<<<<<<<< * for offset,directive in ((0,'%c'), (1,'%x'), (2,'%X')): * current_format = date_time[offset] */ if (PyList_CheckExact(__pyx_v_tz_values) || PyTuple_CheckExact(__pyx_v_tz_values)) { __pyx_t_4 = __pyx_v_tz_values; __Pyx_INCREF(__pyx_t_4); __pyx_t_9 = 0; __pyx_t_10 = NULL; } else { __pyx_t_9 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_v_tz_values); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3089; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_10 = Py_TYPE(__pyx_t_4)->tp_iternext; } for (;;) { if (!__pyx_t_10 && PyList_CheckExact(__pyx_t_4)) { if (__pyx_t_9 >= PyList_GET_SIZE(__pyx_t_4)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_2 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_9); __Pyx_INCREF(__pyx_t_2); __pyx_t_9++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3089; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_2 = PySequence_ITEM(__pyx_t_4, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3089; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif } else if (!__pyx_t_10 && PyTuple_CheckExact(__pyx_t_4)) { if (__pyx_t_9 >= PyTuple_GET_SIZE(__pyx_t_4)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_9); __Pyx_INCREF(__pyx_t_2); __pyx_t_9++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3089; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_2 = PySequence_ITEM(__pyx_t_4, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3089; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif } else { __pyx_t_2 = __pyx_t_10(__pyx_t_4); if (unlikely(!__pyx_t_2)) { if (PyErr_Occurred()) { if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear(); else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3089; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } break; } __Pyx_GOTREF(__pyx_t_2); } __Pyx_XDECREF_SET(__pyx_v_tz, __pyx_t_2); __pyx_t_2 = 0; /* "pandas/tslib.pyx":3088 * # '3' needed for when no leading zero. * ('2', '%w'), ('10', '%I')] * replacement_pairs.extend([(tz, "%Z") for tz_values in self.timezone # <<<<<<<<<<<<<< * for tz in tz_values]) * for offset,directive in ((0,'%c'), (1,'%x'), (2,'%X')): */ __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3088; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_tz); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_tz); __Pyx_GIVEREF(__pyx_v_tz); __Pyx_INCREF(((PyObject *)__pyx_kp_s_191)); PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)__pyx_kp_s_191)); __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_191)); if (unlikely(__Pyx_ListComp_Append(__pyx_t_5, (PyObject*)__pyx_t_2))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3088; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3088; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_t_5)); __Pyx_GIVEREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; __pyx_t_5 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3088; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "pandas/tslib.pyx":3090 * replacement_pairs.extend([(tz, "%Z") for tz_values in self.timezone * for tz in tz_values]) * for offset,directive in ((0,'%c'), (1,'%x'), (2,'%X')): # <<<<<<<<<<<<<< * current_format = date_time[offset] * for old, new in replacement_pairs: */ __pyx_t_5 = ((PyObject *)__pyx_k_tuple_195); __Pyx_INCREF(__pyx_t_5); __pyx_t_7 = 0; for (;;) { if (__pyx_t_7 >= PyTuple_GET_SIZE(__pyx_t_5)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_7); __Pyx_INCREF(__pyx_t_3); __pyx_t_7++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3090; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_3 = PySequence_ITEM(__pyx_t_5, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3090; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif if ((likely(PyTuple_CheckExact(__pyx_t_3))) || (PyList_CheckExact(__pyx_t_3))) { PyObject* sequence = __pyx_t_3; #if CYTHON_COMPILING_IN_CPYTHON Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3090; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_6 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_4 = PyTuple_GET_ITEM(sequence, 1); } else { __pyx_t_6 = PyList_GET_ITEM(sequence, 0); __pyx_t_4 = PyList_GET_ITEM(sequence, 1); } __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(__pyx_t_4); #else __pyx_t_6 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3090; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3090; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); #endif __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else { Py_ssize_t index = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3090; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_11 = Py_TYPE(__pyx_t_2)->tp_iternext; index = 0; __pyx_t_6 = __pyx_t_11(__pyx_t_2); if (unlikely(!__pyx_t_6)) goto __pyx_L9_unpacking_failed; __Pyx_GOTREF(__pyx_t_6); index = 1; __pyx_t_4 = __pyx_t_11(__pyx_t_2); if (unlikely(!__pyx_t_4)) goto __pyx_L9_unpacking_failed; __Pyx_GOTREF(__pyx_t_4); if (__Pyx_IternextUnpackEndCheck(__pyx_t_11(__pyx_t_2), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3090; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_11 = NULL; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; goto __pyx_L10_unpacking_done; __pyx_L9_unpacking_failed:; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_11 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3090; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_L10_unpacking_done:; } __Pyx_XDECREF_SET(__pyx_v_offset, __pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF_SET(__pyx_v_directive, __pyx_t_4); __pyx_t_4 = 0; /* "pandas/tslib.pyx":3091 * for tz in tz_values]) * for offset,directive in ((0,'%c'), (1,'%x'), (2,'%X')): * current_format = date_time[offset] # <<<<<<<<<<<<<< * for old, new in replacement_pairs: * # Must deal with possible lack of locale info */ __pyx_t_3 = PyObject_GetItem(((PyObject *)__pyx_v_date_time), __pyx_v_offset); if (!__pyx_t_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3091; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_XDECREF_SET(__pyx_v_current_format, __pyx_t_3); __pyx_t_3 = 0; /* "pandas/tslib.pyx":3092 * for offset,directive in ((0,'%c'), (1,'%x'), (2,'%X')): * current_format = date_time[offset] * for old, new in replacement_pairs: # <<<<<<<<<<<<<< * # Must deal with possible lack of locale info * # manifesting itself as the empty string (e.g., Swedish's */ __pyx_t_3 = ((PyObject *)__pyx_v_replacement_pairs); __Pyx_INCREF(__pyx_t_3); __pyx_t_9 = 0; for (;;) { if (__pyx_t_9 >= PyList_GET_SIZE(__pyx_t_3)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_4 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_9); __Pyx_INCREF(__pyx_t_4); __pyx_t_9++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3092; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_4 = PySequence_ITEM(__pyx_t_3, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3092; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif if ((likely(PyTuple_CheckExact(__pyx_t_4))) || (PyList_CheckExact(__pyx_t_4))) { PyObject* sequence = __pyx_t_4; #if CYTHON_COMPILING_IN_CPYTHON Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3092; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_6 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_2 = PyTuple_GET_ITEM(sequence, 1); } else { __pyx_t_6 = PyList_GET_ITEM(sequence, 0); __pyx_t_2 = PyList_GET_ITEM(sequence, 1); } __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(__pyx_t_2); #else __pyx_t_6 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3092; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_2 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3092; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); #endif __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else { Py_ssize_t index = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3092; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_11 = Py_TYPE(__pyx_t_1)->tp_iternext; index = 0; __pyx_t_6 = __pyx_t_11(__pyx_t_1); if (unlikely(!__pyx_t_6)) goto __pyx_L13_unpacking_failed; __Pyx_GOTREF(__pyx_t_6); index = 1; __pyx_t_2 = __pyx_t_11(__pyx_t_1); if (unlikely(!__pyx_t_2)) goto __pyx_L13_unpacking_failed; __Pyx_GOTREF(__pyx_t_2); if (__Pyx_IternextUnpackEndCheck(__pyx_t_11(__pyx_t_1), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3092; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_11 = NULL; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L14_unpacking_done; __pyx_L13_unpacking_failed:; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_11 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3092; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_L14_unpacking_done:; } __Pyx_XDECREF_SET(__pyx_v_old, __pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF_SET(__pyx_v_new, __pyx_t_2); __pyx_t_2 = 0; /* "pandas/tslib.pyx":3097 * # lack of AM/PM info) or a platform returning a tuple of empty * # strings (e.g., MacOS 9 having timezone as ('','')). * if old: # <<<<<<<<<<<<<< * current_format = current_format.replace(old, new) * # If %W is used, then Sunday, 2005-01-03 will fall on week 0 since */ __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_v_old); if (unlikely(__pyx_t_12 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3097; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__pyx_t_12) { /* "pandas/tslib.pyx":3098 * # strings (e.g., MacOS 9 having timezone as ('','')). * if old: * current_format = current_format.replace(old, new) # <<<<<<<<<<<<<< * # If %W is used, then Sunday, 2005-01-03 will fall on week 0 since * # 2005-01-03 occurs before the first Monday of the year. Otherwise */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_current_format, __pyx_n_s__replace); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3098; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3098; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_old); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_old); __Pyx_GIVEREF(__pyx_v_old); __Pyx_INCREF(__pyx_v_new); PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_new); __Pyx_GIVEREF(__pyx_v_new); __pyx_t_6 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3098; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __Pyx_DECREF_SET(__pyx_v_current_format, __pyx_t_6); __pyx_t_6 = 0; goto __pyx_L15; } __pyx_L15:; } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/tslib.pyx":3102 * # 2005-01-03 occurs before the first Monday of the year. Otherwise * # %U is used. * time_tuple = time.struct_time((1999,1,3,1,1,1,6,3,0)) # <<<<<<<<<<<<<< * if '00' in time.strftime(directive, time_tuple): * U_W = '%W' */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s__time); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3102; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s__struct_time); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3102; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_k_tuple_197), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3102; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF_SET(__pyx_v_time_tuple, __pyx_t_3); __pyx_t_3 = 0; /* "pandas/tslib.pyx":3103 * # %U is used. * time_tuple = time.struct_time((1999,1,3,1,1,1,6,3,0)) * if '00' in time.strftime(directive, time_tuple): # <<<<<<<<<<<<<< * U_W = '%W' * else: */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s__time); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3103; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s__strftime); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3103; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3103; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_v_directive); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_directive); __Pyx_GIVEREF(__pyx_v_directive); __Pyx_INCREF(__pyx_v_time_tuple); PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_time_tuple); __Pyx_GIVEREF(__pyx_v_time_tuple); __pyx_t_2 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3103; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; __pyx_t_12 = (__Pyx_PySequence_Contains(((PyObject *)__pyx_kp_s__00), __pyx_t_2, Py_EQ)); if (unlikely(__pyx_t_12 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3103; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_13 = (__pyx_t_12 != 0); if (__pyx_t_13) { /* "pandas/tslib.pyx":3104 * time_tuple = time.struct_time((1999,1,3,1,1,1,6,3,0)) * if '00' in time.strftime(directive, time_tuple): * U_W = '%W' # <<<<<<<<<<<<<< * else: * U_W = '%U' */ __Pyx_INCREF(((PyObject *)__pyx_kp_s_198)); __Pyx_XDECREF_SET(__pyx_v_U_W, ((PyObject *)__pyx_kp_s_198)); goto __pyx_L16; } /*else*/ { /* "pandas/tslib.pyx":3106 * U_W = '%W' * else: * U_W = '%U' # <<<<<<<<<<<<<< * date_time[offset] = current_format.replace('11', U_W) * self.LC_date_time = date_time[0] */ __Pyx_INCREF(((PyObject *)__pyx_kp_s_199)); __Pyx_XDECREF_SET(__pyx_v_U_W, ((PyObject *)__pyx_kp_s_199)); } __pyx_L16:; /* "pandas/tslib.pyx":3107 * else: * U_W = '%U' * date_time[offset] = current_format.replace('11', U_W) # <<<<<<<<<<<<<< * self.LC_date_time = date_time[0] * self.LC_date = date_time[1] */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_current_format, __pyx_n_s__replace); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3107; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3107; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(((PyObject *)__pyx_kp_s__11)); PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_kp_s__11)); __Pyx_GIVEREF(((PyObject *)__pyx_kp_s__11)); __Pyx_INCREF(__pyx_v_U_W); PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_U_W); __Pyx_GIVEREF(__pyx_v_U_W); __pyx_t_6 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3107; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; if (PyObject_SetItem(((PyObject *)__pyx_v_date_time), __pyx_v_offset, __pyx_t_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3107; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "pandas/tslib.pyx":3108 * U_W = '%U' * date_time[offset] = current_format.replace('11', U_W) * self.LC_date_time = date_time[0] # <<<<<<<<<<<<<< * self.LC_date = date_time[1] * self.LC_time = date_time[2] */ __pyx_t_5 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_date_time), 0, sizeof(long), PyInt_FromLong, 1, 0, 1); if (!__pyx_t_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3108; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s__LC_date_time, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3108; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "pandas/tslib.pyx":3109 * date_time[offset] = current_format.replace('11', U_W) * self.LC_date_time = date_time[0] * self.LC_date = date_time[1] # <<<<<<<<<<<<<< * self.LC_time = date_time[2] * */ __pyx_t_5 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_date_time), 1, sizeof(long), PyInt_FromLong, 1, 0, 1); if (!__pyx_t_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3109; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s__LC_date, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3109; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "pandas/tslib.pyx":3110 * self.LC_date_time = date_time[0] * self.LC_date = date_time[1] * self.LC_time = date_time[2] # <<<<<<<<<<<<<< * * def __calc_timezone(self): */ __pyx_t_5 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_date_time), 2, sizeof(long), PyInt_FromLong, 1, 0, 1); if (!__pyx_t_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3110; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s__LC_time, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3110; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("pandas.tslib.LocaleTime.__calc_date_time", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_time_tuple); __Pyx_XDECREF(__pyx_v_date_time); __Pyx_XDECREF(__pyx_v_replacement_pairs); __Pyx_XDECREF(__pyx_v_offset); __Pyx_XDECREF(__pyx_v_directive); __Pyx_XDECREF(__pyx_v_current_format); __Pyx_XDECREF(__pyx_v_old); __Pyx_XDECREF(__pyx_v_new); __Pyx_XDECREF(__pyx_v_U_W); __Pyx_XDECREF(__pyx_v_tz_values); __Pyx_XDECREF(__pyx_v_tz); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5tslib_10LocaleTime_13__calc_timezone(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5tslib_10LocaleTime_13__calc_timezone = {__Pyx_NAMESTR("__calc_timezone"), (PyCFunction)__pyx_pw_6pandas_5tslib_10LocaleTime_13__calc_timezone, METH_O, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5tslib_10LocaleTime_13__calc_timezone(PyObject *__pyx_self, PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__calc_timezone (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_5tslib_10LocaleTime_12__calc_timezone(__pyx_self, ((PyObject *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/tslib.pyx":3112 * self.LC_time = date_time[2] * * def __calc_timezone(self): # <<<<<<<<<<<<<< * # Set self.timezone by using time.tzname. * # Do not worry about possibility of time.tzname[0] == timetzname[1] */ static PyObject *__pyx_pf_6pandas_5tslib_10LocaleTime_12__calc_timezone(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) { PyObject *__pyx_v_no_saving = NULL; PyObject *__pyx_v_has_saving = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; int __pyx_t_6; int __pyx_t_7; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__calc_timezone", 0); /* "pandas/tslib.pyx":3116 * # Do not worry about possibility of time.tzname[0] == timetzname[1] * # and time.daylight; handle that in strptime . * try: # <<<<<<<<<<<<<< * time.tzset() * except AttributeError: */ { __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:*/ { /* "pandas/tslib.pyx":3117 * # and time.daylight; handle that in strptime . * try: * time.tzset() # <<<<<<<<<<<<<< * except AttributeError: * pass */ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s__time); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3117; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s__tzset); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3117; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3117; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L10_try_end; __pyx_L3_error:; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; /* "pandas/tslib.pyx":3118 * try: * time.tzset() * except AttributeError: # <<<<<<<<<<<<<< * pass * no_saving = frozenset(["utc", "gmt", time.tzname[0].lower()]) */ __pyx_t_6 = PyErr_ExceptionMatches(__pyx_builtin_AttributeError); if (__pyx_t_6) { PyErr_Restore(0,0,0); goto __pyx_L4_exception_handled; } __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); goto __pyx_L1_error; __pyx_L4_exception_handled:; __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); __pyx_L10_try_end:; } /* "pandas/tslib.pyx":3120 * except AttributeError: * pass * no_saving = frozenset(["utc", "gmt", time.tzname[0].lower()]) # <<<<<<<<<<<<<< * if time.daylight: * has_saving = frozenset([time.tzname[1].lower()]) */ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s__time); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3120; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s__tzname); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3120; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_5, 0, sizeof(long), PyInt_FromLong, 0, 0, 1); if (!__pyx_t_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3120; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s__lower); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3120; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3120; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyList_New(3); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3120; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(((PyObject *)__pyx_n_s__utc)); PyList_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_n_s__utc)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__utc)); __Pyx_INCREF(((PyObject *)__pyx_n_s__gmt)); PyList_SET_ITEM(__pyx_t_5, 1, ((PyObject *)__pyx_n_s__gmt)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__gmt)); PyList_SET_ITEM(__pyx_t_5, 2, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3120; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_t_5)); __Pyx_GIVEREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; __pyx_t_5 = PyObject_Call(((PyObject *)((PyObject*)(&PyFrozenSet_Type))), ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3120; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __pyx_v_no_saving = ((PyObject*)__pyx_t_5); __pyx_t_5 = 0; /* "pandas/tslib.pyx":3121 * pass * no_saving = frozenset(["utc", "gmt", time.tzname[0].lower()]) * if time.daylight: # <<<<<<<<<<<<<< * has_saving = frozenset([time.tzname[1].lower()]) * else: */ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s__time); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3121; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s__daylight); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3121; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3121; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_7) { /* "pandas/tslib.pyx":3122 * no_saving = frozenset(["utc", "gmt", time.tzname[0].lower()]) * if time.daylight: * has_saving = frozenset([time.tzname[1].lower()]) # <<<<<<<<<<<<<< * else: * has_saving = frozenset() */ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s__time); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3122; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s__tzname); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3122; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_5, 1, sizeof(long), PyInt_FromLong, 0, 0, 1); if (!__pyx_t_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3122; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s__lower); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3122; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3122; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyList_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3122; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); PyList_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3122; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_t_5)); __Pyx_GIVEREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; __pyx_t_5 = PyObject_Call(((PyObject *)((PyObject*)(&PyFrozenSet_Type))), ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3122; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __pyx_v_has_saving = ((PyObject*)__pyx_t_5); __pyx_t_5 = 0; goto __pyx_L11; } /*else*/ { /* "pandas/tslib.pyx":3124 * has_saving = frozenset([time.tzname[1].lower()]) * else: * has_saving = frozenset() # <<<<<<<<<<<<<< * self.timezone = (no_saving, has_saving) * */ __pyx_t_5 = PyObject_Call(((PyObject *)((PyObject*)(&PyFrozenSet_Type))), ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3124; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_v_has_saving = ((PyObject*)__pyx_t_5); __pyx_t_5 = 0; } __pyx_L11:; /* "pandas/tslib.pyx":3125 * else: * has_saving = frozenset() * self.timezone = (no_saving, has_saving) # <<<<<<<<<<<<<< * * */ __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3125; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(((PyObject *)__pyx_v_no_saving)); PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_v_no_saving)); __Pyx_GIVEREF(((PyObject *)__pyx_v_no_saving)); __Pyx_INCREF(((PyObject *)__pyx_v_has_saving)); PyTuple_SET_ITEM(__pyx_t_5, 1, ((PyObject *)__pyx_v_has_saving)); __Pyx_GIVEREF(((PyObject *)__pyx_v_has_saving)); if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s__timezone, ((PyObject *)__pyx_t_5)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3125; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("pandas.tslib.LocaleTime.__calc_timezone", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_no_saving); __Pyx_XDECREF(__pyx_v_has_saving); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5tslib_6TimeRE_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6pandas_5tslib_6TimeRE___init__[] = "Create keys/values.\n\n Order of execution is important for dependency reasons.\n\n "; static PyMethodDef __pyx_mdef_6pandas_5tslib_6TimeRE_1__init__ = {__Pyx_NAMESTR("__init__"), (PyCFunction)__pyx_pw_6pandas_5tslib_6TimeRE_1__init__, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_5tslib_6TimeRE___init__)}; static PyObject *__pyx_pw_6pandas_5tslib_6TimeRE_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_self = 0; PyObject *__pyx_v_locale_time = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__self,&__pyx_n_s__locale_time,0}; PyObject* values[2] = {0,0}; /* "pandas/tslib.pyx":3131 * """Handle conversion from format directives to regexes.""" * * def __init__(self, locale_time=None): # <<<<<<<<<<<<<< * """Create keys/values. * */ values[1] = ((PyObject *)((PyObject *)Py_None)); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__self)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__locale_time); if (value) { values[1] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3131; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_self = values[0]; __pyx_v_locale_time = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3131; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.tslib.TimeRE.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pandas_5tslib_6TimeRE___init__(__pyx_self, __pyx_v_self, __pyx_v_locale_time); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_gb_6pandas_5tslib_6TimeRE_8__init___2generator(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */ /* "pandas/tslib.pyx":3164 * 'b': self.__seqToRE(self.locale_time.a_month[1:], 'b'), * 'p': self.__seqToRE(self.locale_time.am_pm, 'p'), * 'Z': self.__seqToRE((tz for tz_names in self.locale_time.timezone # <<<<<<<<<<<<<< * for tz in tz_names), * 'Z'), */ static PyObject *__pyx_pf_6pandas_5tslib_6TimeRE_8__init___genexpr(PyObject *__pyx_self) { struct __pyx_obj_6pandas_5tslib___pyx_scope_struct_1_genexpr *__pyx_cur_scope; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("genexpr", 0); __pyx_cur_scope = (struct __pyx_obj_6pandas_5tslib___pyx_scope_struct_1_genexpr *)__pyx_tp_new_6pandas_5tslib___pyx_scope_struct_1_genexpr(__pyx_ptype_6pandas_5tslib___pyx_scope_struct_1_genexpr, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_cur_scope)) { __Pyx_RefNannyFinishContext(); return NULL; } __Pyx_GOTREF(__pyx_cur_scope); __pyx_cur_scope->__pyx_outer_scope = (struct __pyx_obj_6pandas_5tslib___pyx_scope_struct____init__ *) __pyx_self; __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_outer_scope)); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope); { __pyx_GeneratorObject *gen = __Pyx_Generator_New((__pyx_generator_body_t) __pyx_gb_6pandas_5tslib_6TimeRE_8__init___2generator, (PyObject *) __pyx_cur_scope); if (unlikely(!gen)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3164; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; } __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("pandas.tslib.TimeRE.__init__.genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_DECREF(((PyObject *)__pyx_cur_scope)); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_gb_6pandas_5tslib_6TimeRE_8__init___2generator(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value) /* generator body */ { struct __pyx_obj_6pandas_5tslib___pyx_scope_struct_1_genexpr *__pyx_cur_scope = ((struct __pyx_obj_6pandas_5tslib___pyx_scope_struct_1_genexpr *)__pyx_generator->closure); PyObject *__pyx_r = NULL; PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; Py_ssize_t __pyx_t_3; PyObject *(*__pyx_t_4)(PyObject *); Py_ssize_t __pyx_t_5; PyObject *(*__pyx_t_6)(PyObject *); PyObject *__pyx_t_7 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("None", 0); switch (__pyx_generator->resume_label) { case 0: goto __pyx_L3_first_run; case 1: goto __pyx_L8_resume_from_yield; default: /* CPython raises the right error here */ __Pyx_RefNannyFinishContext(); return NULL; } __pyx_L3_first_run:; if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3164; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3164; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_self, __pyx_n_s__locale_time); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3164; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s__timezone); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3164; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (PyList_CheckExact(__pyx_t_2) || PyTuple_CheckExact(__pyx_t_2)) { __pyx_t_1 = __pyx_t_2; __Pyx_INCREF(__pyx_t_1); __pyx_t_3 = 0; __pyx_t_4 = NULL; } else { __pyx_t_3 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3164; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = Py_TYPE(__pyx_t_1)->tp_iternext; } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; for (;;) { if (!__pyx_t_4 && PyList_CheckExact(__pyx_t_1)) { if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_1)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_3); __Pyx_INCREF(__pyx_t_2); __pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3164; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3164; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif } else if (!__pyx_t_4 && PyTuple_CheckExact(__pyx_t_1)) { if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_1)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_3); __Pyx_INCREF(__pyx_t_2); __pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3164; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3164; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif } else { __pyx_t_2 = __pyx_t_4(__pyx_t_1); if (unlikely(!__pyx_t_2)) { if (PyErr_Occurred()) { if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear(); else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3164; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } break; } __Pyx_GOTREF(__pyx_t_2); } __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_tz_names); __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_tz_names, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/tslib.pyx":3165 * 'p': self.__seqToRE(self.locale_time.am_pm, 'p'), * 'Z': self.__seqToRE((tz for tz_names in self.locale_time.timezone * for tz in tz_names), # <<<<<<<<<<<<<< * 'Z'), * '%': '%'}) */ if (PyList_CheckExact(__pyx_cur_scope->__pyx_v_tz_names) || PyTuple_CheckExact(__pyx_cur_scope->__pyx_v_tz_names)) { __pyx_t_2 = __pyx_cur_scope->__pyx_v_tz_names; __Pyx_INCREF(__pyx_t_2); __pyx_t_5 = 0; __pyx_t_6 = NULL; } else { __pyx_t_5 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_cur_scope->__pyx_v_tz_names); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3165; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_6 = Py_TYPE(__pyx_t_2)->tp_iternext; } for (;;) { if (!__pyx_t_6 && PyList_CheckExact(__pyx_t_2)) { if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_2)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_7 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_5); __Pyx_INCREF(__pyx_t_7); __pyx_t_5++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3165; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_7 = PySequence_ITEM(__pyx_t_2, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3165; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif } else if (!__pyx_t_6 && PyTuple_CheckExact(__pyx_t_2)) { if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_2)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_7 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_5); __Pyx_INCREF(__pyx_t_7); __pyx_t_5++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3165; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_7 = PySequence_ITEM(__pyx_t_2, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3165; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif } else { __pyx_t_7 = __pyx_t_6(__pyx_t_2); if (unlikely(!__pyx_t_7)) { if (PyErr_Occurred()) { if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear(); else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3165; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } break; } __Pyx_GOTREF(__pyx_t_7); } __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_tz); __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_tz, __pyx_t_7); __Pyx_GIVEREF(__pyx_t_7); __pyx_t_7 = 0; /* "pandas/tslib.pyx":3164 * 'b': self.__seqToRE(self.locale_time.a_month[1:], 'b'), * 'p': self.__seqToRE(self.locale_time.am_pm, 'p'), * 'Z': self.__seqToRE((tz for tz_names in self.locale_time.timezone # <<<<<<<<<<<<<< * for tz in tz_names), * 'Z'), */ __Pyx_INCREF(__pyx_cur_scope->__pyx_v_tz); __pyx_r = __pyx_cur_scope->__pyx_v_tz; __Pyx_XGIVEREF(__pyx_t_1); __pyx_cur_scope->__pyx_t_0 = __pyx_t_1; __Pyx_XGIVEREF(__pyx_t_2); __pyx_cur_scope->__pyx_t_1 = __pyx_t_2; __pyx_cur_scope->__pyx_t_2 = __pyx_t_3; __pyx_cur_scope->__pyx_t_3 = __pyx_t_4; __pyx_cur_scope->__pyx_t_4 = __pyx_t_5; __pyx_cur_scope->__pyx_t_5 = __pyx_t_6; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); /* return from generator, yielding value */ __pyx_generator->resume_label = 1; return __pyx_r; __pyx_L8_resume_from_yield:; __pyx_t_1 = __pyx_cur_scope->__pyx_t_0; __pyx_cur_scope->__pyx_t_0 = 0; __Pyx_XGOTREF(__pyx_t_1); __pyx_t_2 = __pyx_cur_scope->__pyx_t_1; __pyx_cur_scope->__pyx_t_1 = 0; __Pyx_XGOTREF(__pyx_t_2); __pyx_t_3 = __pyx_cur_scope->__pyx_t_2; __pyx_t_4 = __pyx_cur_scope->__pyx_t_3; __pyx_t_5 = __pyx_cur_scope->__pyx_t_4; __pyx_t_6 = __pyx_cur_scope->__pyx_t_5; if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3164; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; PyErr_SetNone(PyExc_StopIteration); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_7); __Pyx_AddTraceback("genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_L0:; __Pyx_XDECREF(__pyx_r); __pyx_generator->resume_label = -1; __Pyx_Generator_clear((PyObject*)__pyx_generator); __Pyx_RefNannyFinishContext(); return NULL; } /* "pandas/tslib.pyx":3131 * """Handle conversion from format directives to regexes.""" * * def __init__(self, locale_time=None): # <<<<<<<<<<<<<< * """Create keys/values. * */ static PyObject *__pyx_pf_6pandas_5tslib_6TimeRE___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_locale_time) { struct __pyx_obj_6pandas_5tslib___pyx_scope_struct____init__ *__pyx_cur_scope; PyObject *__pyx_v_base = 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_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__init__", 0); __pyx_cur_scope = (struct __pyx_obj_6pandas_5tslib___pyx_scope_struct____init__ *)__pyx_tp_new_6pandas_5tslib___pyx_scope_struct____init__(__pyx_ptype_6pandas_5tslib___pyx_scope_struct____init__, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_cur_scope)) { __Pyx_RefNannyFinishContext(); return NULL; } __Pyx_GOTREF(__pyx_cur_scope); __pyx_cur_scope->__pyx_v_self = __pyx_v_self; __Pyx_INCREF(__pyx_cur_scope->__pyx_v_self); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_self); /* "pandas/tslib.pyx":3137 * * """ * if locale_time: # <<<<<<<<<<<<<< * self.locale_time = locale_time * else: */ __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_locale_time); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3137; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__pyx_t_1) { /* "pandas/tslib.pyx":3138 * """ * if locale_time: * self.locale_time = locale_time # <<<<<<<<<<<<<< * else: * self.locale_time = LocaleTime() */ if (__Pyx_PyObject_SetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s__locale_time, __pyx_v_locale_time) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3138; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L3; } /*else*/ { /* "pandas/tslib.pyx":3140 * self.locale_time = locale_time * else: * self.locale_time = LocaleTime() # <<<<<<<<<<<<<< * base = super(TimeRE, self) * base.__init__({ */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__LocaleTime); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3140; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3140; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__Pyx_PyObject_SetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s__locale_time, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3140; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } __pyx_L3:; /* "pandas/tslib.pyx":3141 * else: * self.locale_time = LocaleTime() * base = super(TimeRE, self) # <<<<<<<<<<<<<< * base.__init__({ * # The " \d" part of the regex is to make %c from ANSI C work */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s__TimeRE); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3141; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3141; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __Pyx_INCREF(__pyx_cur_scope->__pyx_v_self); PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_cur_scope->__pyx_v_self); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_self); __pyx_t_3 = 0; __pyx_t_3 = PyObject_Call(__pyx_builtin_super, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3141; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __pyx_v_base = __pyx_t_3; __pyx_t_3 = 0; /* "pandas/tslib.pyx":3142 * self.locale_time = LocaleTime() * base = super(TimeRE, self) * base.__init__({ # <<<<<<<<<<<<<< * # The " \d" part of the regex is to make %c from ANSI C work * 'd': r"(?P3[0-1]|[1-2]\d|0[1-9]|[1-9]| [1-9])", */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_base, __pyx_n_s____init__); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3142; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3142; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_2)); if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__d), ((PyObject *)__pyx_kp_s_200)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3142; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__f), ((PyObject *)__pyx_kp_s_201)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3142; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__H), ((PyObject *)__pyx_kp_s_202)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3142; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__I), ((PyObject *)__pyx_kp_s_203)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3142; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__j), ((PyObject *)__pyx_kp_s_204)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3142; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__m), ((PyObject *)__pyx_kp_s_205)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3142; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__M), ((PyObject *)__pyx_kp_s_206)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3142; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__S), ((PyObject *)__pyx_kp_s_207)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3142; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__U), ((PyObject *)__pyx_kp_s_208)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3142; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__w), ((PyObject *)__pyx_kp_s_209)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3142; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__y), ((PyObject *)__pyx_kp_s_210)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3142; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__Y), ((PyObject *)__pyx_kp_s_211)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3142; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/tslib.pyx":3159 * # 4 digits? * 'Y': r"(?P\d\d\d\d)", * 'A': self.__seqToRE(self.locale_time.f_weekday, 'A'), # <<<<<<<<<<<<<< * 'a': self.__seqToRE(self.locale_time.a_weekday, 'a'), * 'B': self.__seqToRE(self.locale_time.f_month[1:], 'B'), */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s___TimeRE__seqToRE); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3159; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s__locale_time); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3159; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s__f_weekday); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3159; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3159; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_6); __Pyx_INCREF(((PyObject *)__pyx_n_s__A)); PyTuple_SET_ITEM(__pyx_t_5, 1, ((PyObject *)__pyx_n_s__A)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__A)); __pyx_t_6 = 0; __pyx_t_6 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3159; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__A), __pyx_t_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3142; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; /* "pandas/tslib.pyx":3160 * 'Y': r"(?P\d\d\d\d)", * 'A': self.__seqToRE(self.locale_time.f_weekday, 'A'), * 'a': self.__seqToRE(self.locale_time.a_weekday, 'a'), # <<<<<<<<<<<<<< * 'B': self.__seqToRE(self.locale_time.f_month[1:], 'B'), * 'b': self.__seqToRE(self.locale_time.a_month[1:], 'b'), */ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s___TimeRE__seqToRE); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3160; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s__locale_time); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3160; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s__a_weekday); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3160; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3160; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __Pyx_INCREF(((PyObject *)__pyx_n_s__a)); PyTuple_SET_ITEM(__pyx_t_5, 1, ((PyObject *)__pyx_n_s__a)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__a)); __pyx_t_4 = 0; __pyx_t_4 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3160; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__a), __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3142; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "pandas/tslib.pyx":3161 * 'A': self.__seqToRE(self.locale_time.f_weekday, 'A'), * 'a': self.__seqToRE(self.locale_time.a_weekday, 'a'), * 'B': self.__seqToRE(self.locale_time.f_month[1:], 'B'), # <<<<<<<<<<<<<< * 'b': self.__seqToRE(self.locale_time.a_month[1:], 'b'), * 'p': self.__seqToRE(self.locale_time.am_pm, 'p'), */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s___TimeRE__seqToRE); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3161; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s__locale_time); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3161; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s__f_month); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3161; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyObject_GetSlice(__pyx_t_6, 1, 0, NULL, NULL, &__pyx_k_slice_212, 1, 0, 1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3161; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3161; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __Pyx_INCREF(((PyObject *)__pyx_n_s__B)); PyTuple_SET_ITEM(__pyx_t_6, 1, ((PyObject *)__pyx_n_s__B)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__B)); __pyx_t_5 = 0; __pyx_t_5 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3161; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0; if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__B), __pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3142; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "pandas/tslib.pyx":3162 * 'a': self.__seqToRE(self.locale_time.a_weekday, 'a'), * 'B': self.__seqToRE(self.locale_time.f_month[1:], 'B'), * 'b': self.__seqToRE(self.locale_time.a_month[1:], 'b'), # <<<<<<<<<<<<<< * 'p': self.__seqToRE(self.locale_time.am_pm, 'p'), * 'Z': self.__seqToRE((tz for tz_names in self.locale_time.timezone */ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s___TimeRE__seqToRE); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3162; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s__locale_time); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3162; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s__a_month); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3162; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = __Pyx_PyObject_GetSlice(__pyx_t_4, 1, 0, NULL, NULL, &__pyx_k_slice_213, 1, 0, 1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3162; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3162; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_6); __Pyx_INCREF(((PyObject *)__pyx_n_s__b)); PyTuple_SET_ITEM(__pyx_t_4, 1, ((PyObject *)__pyx_n_s__b)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__b)); __pyx_t_6 = 0; __pyx_t_6 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3162; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__b), __pyx_t_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3142; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; /* "pandas/tslib.pyx":3163 * 'B': self.__seqToRE(self.locale_time.f_month[1:], 'B'), * 'b': self.__seqToRE(self.locale_time.a_month[1:], 'b'), * 'p': self.__seqToRE(self.locale_time.am_pm, 'p'), # <<<<<<<<<<<<<< * 'Z': self.__seqToRE((tz for tz_names in self.locale_time.timezone * for tz in tz_names), */ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s___TimeRE__seqToRE); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3163; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s__locale_time); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3163; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s__am_pm); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3163; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3163; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __Pyx_INCREF(((PyObject *)__pyx_n_s__p)); PyTuple_SET_ITEM(__pyx_t_4, 1, ((PyObject *)__pyx_n_s__p)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__p)); __pyx_t_5 = 0; __pyx_t_5 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3163; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__p), __pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3142; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "pandas/tslib.pyx":3164 * 'b': self.__seqToRE(self.locale_time.a_month[1:], 'b'), * 'p': self.__seqToRE(self.locale_time.am_pm, 'p'), * 'Z': self.__seqToRE((tz for tz_names in self.locale_time.timezone # <<<<<<<<<<<<<< * for tz in tz_names), * 'Z'), */ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s___TimeRE__seqToRE); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3164; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = __pyx_pf_6pandas_5tslib_6TimeRE_8__init___genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3164; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3164; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __Pyx_INCREF(((PyObject *)__pyx_n_s__Z)); PyTuple_SET_ITEM(__pyx_t_6, 1, ((PyObject *)__pyx_n_s__Z)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__Z)); __pyx_t_4 = 0; __pyx_t_4 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3164; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0; if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__Z), __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3142; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_kp_s_86), ((PyObject *)__pyx_kp_s_86)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3142; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3142; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_t_2)); __Pyx_GIVEREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __pyx_t_2 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3142; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/tslib.pyx":3168 * 'Z'), * '%': '%'}) * base.__setitem__('W', base.__getitem__('U').replace('U', 'W')) # <<<<<<<<<<<<<< * base.__setitem__('c', self.pattern(self.locale_time.LC_date_time)) * base.__setitem__('x', self.pattern(self.locale_time.LC_date)) */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_base, __pyx_n_s____setitem__); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3168; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_base, __pyx_n_s____getitem__); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3168; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_k_tuple_214), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3168; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s__replace); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3168; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_k_tuple_215), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3168; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3168; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(((PyObject *)__pyx_n_s__W)); PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_n_s__W)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__W)); PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3168; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/tslib.pyx":3169 * '%': '%'}) * base.__setitem__('W', base.__getitem__('U').replace('U', 'W')) * base.__setitem__('c', self.pattern(self.locale_time.LC_date_time)) # <<<<<<<<<<<<<< * base.__setitem__('x', self.pattern(self.locale_time.LC_date)) * base.__setitem__('X', self.pattern(self.locale_time.LC_time)) */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_base, __pyx_n_s____setitem__); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3169; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s__pattern); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3169; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s__locale_time); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3169; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__LC_date_time); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3169; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3169; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3169; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3169; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(((PyObject *)__pyx_n_s__c)); PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_n_s__c)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__c)); PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3169; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; /* "pandas/tslib.pyx":3170 * base.__setitem__('W', base.__getitem__('U').replace('U', 'W')) * base.__setitem__('c', self.pattern(self.locale_time.LC_date_time)) * base.__setitem__('x', self.pattern(self.locale_time.LC_date)) # <<<<<<<<<<<<<< * base.__setitem__('X', self.pattern(self.locale_time.LC_time)) * */ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_base, __pyx_n_s____setitem__); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3170; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s__pattern); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3170; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s__locale_time); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3170; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s__LC_date); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3170; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3170; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3170; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3170; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(((PyObject *)__pyx_n_s__x)); PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_n_s__x)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__x)); PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3170; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "pandas/tslib.pyx":3171 * base.__setitem__('c', self.pattern(self.locale_time.LC_date_time)) * base.__setitem__('x', self.pattern(self.locale_time.LC_date)) * base.__setitem__('X', self.pattern(self.locale_time.LC_time)) # <<<<<<<<<<<<<< * * def __seqToRE(self, to_convert, directive): */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_base, __pyx_n_s____setitem__); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3171; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s__pattern); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3171; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s__locale_time); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3171; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s__LC_time); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3171; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3171; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3171; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0; __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3171; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(((PyObject *)__pyx_n_s__X)); PyTuple_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_n_s__X)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__X)); PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3171; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __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_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("pandas.tslib.TimeRE.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_base); __Pyx_DECREF(((PyObject *)__pyx_cur_scope)); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5tslib_6TimeRE_3__seqToRE(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6pandas_5tslib_6TimeRE_2__seqToRE[] = "Convert a list to a regex string for matching a directive.\n\n Want possible matching values to be from longest to shortest. This\n prevents the possibility of a match occuring for a value that also\n a substring of a larger value that should have matched (e.g., 'abc'\n matching when 'abcdef' should have been the match).\n\n "; static PyMethodDef __pyx_mdef_6pandas_5tslib_6TimeRE_3__seqToRE = {__Pyx_NAMESTR("__seqToRE"), (PyCFunction)__pyx_pw_6pandas_5tslib_6TimeRE_3__seqToRE, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_5tslib_6TimeRE_2__seqToRE)}; static PyObject *__pyx_pw_6pandas_5tslib_6TimeRE_3__seqToRE(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { CYTHON_UNUSED PyObject *__pyx_v_self = 0; PyObject *__pyx_v_to_convert = 0; PyObject *__pyx_v_directive = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__seqToRE (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__self,&__pyx_n_s__to_convert,&__pyx_n_s__directive,0}; PyObject* values[3] = {0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__self)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__to_convert)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("__seqToRE", 1, 3, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3173; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__directive)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("__seqToRE", 1, 3, 3, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3173; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__seqToRE") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3173; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 3) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); } __pyx_v_self = values[0]; __pyx_v_to_convert = values[1]; __pyx_v_directive = values[2]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("__seqToRE", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3173; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.tslib.TimeRE.__seqToRE", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pandas_5tslib_6TimeRE_2__seqToRE(__pyx_self, __pyx_v_self, __pyx_v_to_convert, __pyx_v_directive); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_gb_6pandas_5tslib_6TimeRE_9__seqToRE_2generator1(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */ /* "pandas/tslib.pyx":3188 * else: * return '' * regex = '|'.join(re_escape(stuff) for stuff in to_convert) # <<<<<<<<<<<<<< * regex = '(?P<%s>%s' % (directive, regex) * return '%s)' % regex */ static PyObject *__pyx_pf_6pandas_5tslib_6TimeRE_9__seqToRE_genexpr(PyObject *__pyx_self) { struct __pyx_obj_6pandas_5tslib___pyx_scope_struct_3_genexpr *__pyx_cur_scope; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("genexpr", 0); __pyx_cur_scope = (struct __pyx_obj_6pandas_5tslib___pyx_scope_struct_3_genexpr *)__pyx_tp_new_6pandas_5tslib___pyx_scope_struct_3_genexpr(__pyx_ptype_6pandas_5tslib___pyx_scope_struct_3_genexpr, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_cur_scope)) { __Pyx_RefNannyFinishContext(); return NULL; } __Pyx_GOTREF(__pyx_cur_scope); __pyx_cur_scope->__pyx_outer_scope = (struct __pyx_obj_6pandas_5tslib___pyx_scope_struct_2___seqToRE *) __pyx_self; __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_outer_scope)); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope); { __pyx_GeneratorObject *gen = __Pyx_Generator_New((__pyx_generator_body_t) __pyx_gb_6pandas_5tslib_6TimeRE_9__seqToRE_2generator1, (PyObject *) __pyx_cur_scope); if (unlikely(!gen)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3188; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; } __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("pandas.tslib.TimeRE.__seqToRE.genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_DECREF(((PyObject *)__pyx_cur_scope)); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_gb_6pandas_5tslib_6TimeRE_9__seqToRE_2generator1(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value) /* generator body */ { struct __pyx_obj_6pandas_5tslib___pyx_scope_struct_3_genexpr *__pyx_cur_scope = ((struct __pyx_obj_6pandas_5tslib___pyx_scope_struct_3_genexpr *)__pyx_generator->closure); PyObject *__pyx_r = NULL; PyObject *__pyx_t_1 = NULL; Py_ssize_t __pyx_t_2; PyObject *(*__pyx_t_3)(PyObject *); PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("None", 0); switch (__pyx_generator->resume_label) { case 0: goto __pyx_L3_first_run; case 1: goto __pyx_L6_resume_from_yield; default: /* CPython raises the right error here */ __Pyx_RefNannyFinishContext(); return NULL; } __pyx_L3_first_run:; if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3188; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_to_convert)) { __Pyx_RaiseClosureNameError("to_convert"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3188; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } if (PyList_CheckExact(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_to_convert) || PyTuple_CheckExact(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_to_convert)) { __pyx_t_1 = __pyx_cur_scope->__pyx_outer_scope->__pyx_v_to_convert; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0; __pyx_t_3 = NULL; } else { __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_to_convert); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3188; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = Py_TYPE(__pyx_t_1)->tp_iternext; } for (;;) { if (!__pyx_t_3 && PyList_CheckExact(__pyx_t_1)) { if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3188; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3188; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif } else if (!__pyx_t_3 && PyTuple_CheckExact(__pyx_t_1)) { if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3188; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3188; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif } else { __pyx_t_4 = __pyx_t_3(__pyx_t_1); if (unlikely(!__pyx_t_4)) { if (PyErr_Occurred()) { if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear(); else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3188; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } break; } __Pyx_GOTREF(__pyx_t_4); } __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_stuff); __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_stuff, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s__re_escape); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3188; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3188; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_cur_scope->__pyx_v_stuff); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_cur_scope->__pyx_v_stuff); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_stuff); __pyx_t_6 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3188; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; __pyx_r = __pyx_t_6; __pyx_t_6 = 0; __Pyx_XGIVEREF(__pyx_t_1); __pyx_cur_scope->__pyx_t_0 = __pyx_t_1; __pyx_cur_scope->__pyx_t_1 = __pyx_t_2; __pyx_cur_scope->__pyx_t_2 = __pyx_t_3; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); /* return from generator, yielding value */ __pyx_generator->resume_label = 1; return __pyx_r; __pyx_L6_resume_from_yield:; __pyx_t_1 = __pyx_cur_scope->__pyx_t_0; __pyx_cur_scope->__pyx_t_0 = 0; __Pyx_XGOTREF(__pyx_t_1); __pyx_t_2 = __pyx_cur_scope->__pyx_t_1; __pyx_t_3 = __pyx_cur_scope->__pyx_t_2; if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3188; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; PyErr_SetNone(PyExc_StopIteration); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_L0:; __Pyx_XDECREF(__pyx_r); __pyx_generator->resume_label = -1; __Pyx_Generator_clear((PyObject*)__pyx_generator); __Pyx_RefNannyFinishContext(); return NULL; } /* "pandas/tslib.pyx":3173 * base.__setitem__('X', self.pattern(self.locale_time.LC_time)) * * def __seqToRE(self, to_convert, directive): # <<<<<<<<<<<<<< * """Convert a list to a regex string for matching a directive. * */ static PyObject *__pyx_pf_6pandas_5tslib_6TimeRE_2__seqToRE(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, PyObject *__pyx_v_to_convert, PyObject *__pyx_v_directive) { struct __pyx_obj_6pandas_5tslib___pyx_scope_struct_2___seqToRE *__pyx_cur_scope; PyObject *__pyx_v_value = NULL; PyObject *__pyx_v_regex = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; Py_ssize_t __pyx_t_4; PyObject *(*__pyx_t_5)(PyObject *); int __pyx_t_6; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__seqToRE", 0); __pyx_cur_scope = (struct __pyx_obj_6pandas_5tslib___pyx_scope_struct_2___seqToRE *)__pyx_tp_new_6pandas_5tslib___pyx_scope_struct_2___seqToRE(__pyx_ptype_6pandas_5tslib___pyx_scope_struct_2___seqToRE, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_cur_scope)) { __Pyx_RefNannyFinishContext(); return NULL; } __Pyx_GOTREF(__pyx_cur_scope); __pyx_cur_scope->__pyx_v_to_convert = __pyx_v_to_convert; __Pyx_INCREF(__pyx_cur_scope->__pyx_v_to_convert); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_to_convert); /* "pandas/tslib.pyx":3182 * * """ * to_convert = sorted(to_convert, key=len, reverse=True) # <<<<<<<<<<<<<< * for value in to_convert: * if value != '': */ __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3182; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_cur_scope->__pyx_v_to_convert); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_cur_scope->__pyx_v_to_convert); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_to_convert); __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3182; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_2)); __pyx_t_3 = __Pyx_GetBuiltinName(__pyx_n_s__len); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3182; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__key), __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3182; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3182; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__reverse), __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3182; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyObject_Call(__pyx_builtin_sorted, ((PyObject *)__pyx_t_1), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3182; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_to_convert); __Pyx_DECREF_SET(__pyx_cur_scope->__pyx_v_to_convert, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/tslib.pyx":3183 * """ * to_convert = sorted(to_convert, key=len, reverse=True) * for value in to_convert: # <<<<<<<<<<<<<< * if value != '': * break */ if (PyList_CheckExact(__pyx_cur_scope->__pyx_v_to_convert) || PyTuple_CheckExact(__pyx_cur_scope->__pyx_v_to_convert)) { __pyx_t_3 = __pyx_cur_scope->__pyx_v_to_convert; __Pyx_INCREF(__pyx_t_3); __pyx_t_4 = 0; __pyx_t_5 = NULL; } else { __pyx_t_4 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_cur_scope->__pyx_v_to_convert); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3183; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = Py_TYPE(__pyx_t_3)->tp_iternext; } for (;;) { if (!__pyx_t_5 && PyList_CheckExact(__pyx_t_3)) { if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_3)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_2 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3183; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_2 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3183; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif } else if (!__pyx_t_5 && PyTuple_CheckExact(__pyx_t_3)) { if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_3)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3183; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_2 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3183; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif } else { __pyx_t_2 = __pyx_t_5(__pyx_t_3); if (unlikely(!__pyx_t_2)) { if (PyErr_Occurred()) { if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear(); else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3183; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } break; } __Pyx_GOTREF(__pyx_t_2); } __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_2); __pyx_t_2 = 0; /* "pandas/tslib.pyx":3184 * to_convert = sorted(to_convert, key=len, reverse=True) * for value in to_convert: * if value != '': # <<<<<<<<<<<<<< * break * else: */ __pyx_t_2 = PyObject_RichCompare(__pyx_v_value, ((PyObject *)__pyx_kp_s_27), Py_NE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3184; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3184; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_6) { /* "pandas/tslib.pyx":3185 * for value in to_convert: * if value != '': * break # <<<<<<<<<<<<<< * else: * return '' */ goto __pyx_L4_break; goto __pyx_L5; } __pyx_L5:; } /*else*/ { /* "pandas/tslib.pyx":3187 * break * else: * return '' # <<<<<<<<<<<<<< * regex = '|'.join(re_escape(stuff) for stuff in to_convert) * regex = '(?P<%s>%s' % (directive, regex) */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_kp_s_27)); __pyx_r = ((PyObject *)__pyx_kp_s_27); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L0; } __pyx_L4_break:; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/tslib.pyx":3188 * else: * return '' * regex = '|'.join(re_escape(stuff) for stuff in to_convert) # <<<<<<<<<<<<<< * regex = '(?P<%s>%s' % (directive, regex) * return '%s)' % regex */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_kp_s_216), __pyx_n_s__join); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3188; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __pyx_pf_6pandas_5tslib_6TimeRE_9__seqToRE_genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3188; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3188; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3188; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_v_regex = __pyx_t_2; __pyx_t_2 = 0; /* "pandas/tslib.pyx":3189 * return '' * regex = '|'.join(re_escape(stuff) for stuff in to_convert) * regex = '(?P<%s>%s' % (directive, regex) # <<<<<<<<<<<<<< * return '%s)' % regex * */ __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3189; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_directive); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_directive); __Pyx_GIVEREF(__pyx_v_directive); __Pyx_INCREF(__pyx_v_regex); PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_regex); __Pyx_GIVEREF(__pyx_v_regex); __pyx_t_1 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_217), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3189; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __Pyx_DECREF_SET(__pyx_v_regex, ((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; /* "pandas/tslib.pyx":3190 * regex = '|'.join(re_escape(stuff) for stuff in to_convert) * regex = '(?P<%s>%s' % (directive, regex) * return '%s)' % regex # <<<<<<<<<<<<<< * * def pattern(self, format): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_218), __pyx_v_regex); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3190; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_r = ((PyObject *)__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("pandas.tslib.TimeRE.__seqToRE", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_value); __Pyx_XDECREF(__pyx_v_regex); __Pyx_DECREF(((PyObject *)__pyx_cur_scope)); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5tslib_6TimeRE_5pattern(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6pandas_5tslib_6TimeRE_4pattern[] = "Return regex pattern for the format string.\n\n Need to make sure that any characters that might be interpreted as\n regex syntax are escaped.\n\n "; static PyMethodDef __pyx_mdef_6pandas_5tslib_6TimeRE_5pattern = {__Pyx_NAMESTR("pattern"), (PyCFunction)__pyx_pw_6pandas_5tslib_6TimeRE_5pattern, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_5tslib_6TimeRE_4pattern)}; static PyObject *__pyx_pw_6pandas_5tslib_6TimeRE_5pattern(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_self = 0; PyObject *__pyx_v_format = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("pattern (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__self,&__pyx_n_s__format,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__self)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__format)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("pattern", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3192; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "pattern") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3192; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } __pyx_v_self = values[0]; __pyx_v_format = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("pattern", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3192; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.tslib.TimeRE.pattern", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pandas_5tslib_6TimeRE_4pattern(__pyx_self, __pyx_v_self, __pyx_v_format); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/tslib.pyx":3192 * return '%s)' % regex * * def pattern(self, format): # <<<<<<<<<<<<<< * """Return regex pattern for the format string. * */ static PyObject *__pyx_pf_6pandas_5tslib_6TimeRE_4pattern(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_format) { PyObject *__pyx_v_processed_format = NULL; PyObject *__pyx_v_regex_chars = NULL; PyObject *__pyx_v_whitespace_replacement = NULL; PyObject *__pyx_v_directive_index = 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_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("pattern", 0); __Pyx_INCREF(__pyx_v_format); /* "pandas/tslib.pyx":3199 * * """ * processed_format = '' # <<<<<<<<<<<<<< * # The sub() call escapes all characters that might be misconstrued * # as regex syntax. Cannot use re.escape since we have to deal with */ __Pyx_INCREF(((PyObject *)__pyx_kp_s_27)); __pyx_v_processed_format = ((PyObject *)__pyx_kp_s_27); /* "pandas/tslib.pyx":3203 * # as regex syntax. Cannot use re.escape since we have to deal with * # format directives (%m, etc.). * regex_chars = re_compile(r"([\\.^$*+?\(\){}\[\]|])") # <<<<<<<<<<<<<< * format = regex_chars.sub(r"\\\1", format) * whitespace_replacement = re_compile('\s+') */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__re_compile); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3203; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_k_tuple_220), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3203; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_regex_chars = __pyx_t_2; __pyx_t_2 = 0; /* "pandas/tslib.pyx":3204 * # format directives (%m, etc.). * regex_chars = re_compile(r"([\\.^$*+?\(\){}\[\]|])") * format = regex_chars.sub(r"\\\1", format) # <<<<<<<<<<<<<< * whitespace_replacement = re_compile('\s+') * format = whitespace_replacement.sub('\s+', format) */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_regex_chars, __pyx_n_s__sub); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3204; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3204; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)__pyx_kp_s_221)); PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_kp_s_221)); __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_221)); __Pyx_INCREF(__pyx_v_format); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_format); __Pyx_GIVEREF(__pyx_v_format); __pyx_t_3 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3204; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __Pyx_DECREF_SET(__pyx_v_format, __pyx_t_3); __pyx_t_3 = 0; /* "pandas/tslib.pyx":3205 * regex_chars = re_compile(r"([\\.^$*+?\(\){}\[\]|])") * format = regex_chars.sub(r"\\\1", format) * whitespace_replacement = re_compile('\s+') # <<<<<<<<<<<<<< * format = whitespace_replacement.sub('\s+', format) * while '%' in format: */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s__re_compile); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3205; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_k_tuple_223), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3205; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_whitespace_replacement = __pyx_t_1; __pyx_t_1 = 0; /* "pandas/tslib.pyx":3206 * format = regex_chars.sub(r"\\\1", format) * whitespace_replacement = re_compile('\s+') * format = whitespace_replacement.sub('\s+', format) # <<<<<<<<<<<<<< * while '%' in format: * directive_index = format.index('%')+1 */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_whitespace_replacement, __pyx_n_s__sub); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3206; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3206; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(((PyObject *)__pyx_kp_s_222)); PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_kp_s_222)); __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_222)); __Pyx_INCREF(__pyx_v_format); PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_format); __Pyx_GIVEREF(__pyx_v_format); __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3206; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; __Pyx_DECREF_SET(__pyx_v_format, __pyx_t_2); __pyx_t_2 = 0; /* "pandas/tslib.pyx":3207 * whitespace_replacement = re_compile('\s+') * format = whitespace_replacement.sub('\s+', format) * while '%' in format: # <<<<<<<<<<<<<< * directive_index = format.index('%')+1 * processed_format = "%s%s%s" % (processed_format, */ while (1) { __pyx_t_4 = (__Pyx_PySequence_Contains(((PyObject *)__pyx_kp_s_86), __pyx_v_format, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3207; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_5 = (__pyx_t_4 != 0); if (!__pyx_t_5) break; /* "pandas/tslib.pyx":3208 * format = whitespace_replacement.sub('\s+', format) * while '%' in format: * directive_index = format.index('%')+1 # <<<<<<<<<<<<<< * processed_format = "%s%s%s" % (processed_format, * format[:directive_index-1], */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_format, __pyx_n_s__index); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3208; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_k_tuple_224), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3208; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyNumber_Add(__pyx_t_3, __pyx_int_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3208; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF_SET(__pyx_v_directive_index, __pyx_t_2); __pyx_t_2 = 0; /* "pandas/tslib.pyx":3210 * directive_index = format.index('%')+1 * processed_format = "%s%s%s" % (processed_format, * format[:directive_index-1], # <<<<<<<<<<<<<< * self[format[directive_index]]) * format = format[directive_index+1:] */ __pyx_t_2 = PyNumber_Subtract(__pyx_v_directive_index, __pyx_int_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3210; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetSlice(__pyx_v_format, 0, 0, NULL, &__pyx_t_2, NULL, 0, 0, 1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3210; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/tslib.pyx":3211 * processed_format = "%s%s%s" % (processed_format, * format[:directive_index-1], * self[format[directive_index]]) # <<<<<<<<<<<<<< * format = format[directive_index+1:] * return "%s%s" % (processed_format, format) */ __pyx_t_2 = PyObject_GetItem(__pyx_v_format, __pyx_v_directive_index); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3211; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = PyObject_GetItem(__pyx_v_self, __pyx_t_2); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3211; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3209; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_processed_format); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_processed_format); __Pyx_GIVEREF(__pyx_v_processed_format); PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_3 = 0; __pyx_t_1 = 0; __pyx_t_1 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_225), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3209; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __Pyx_DECREF_SET(__pyx_v_processed_format, ((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; /* "pandas/tslib.pyx":3212 * format[:directive_index-1], * self[format[directive_index]]) * format = format[directive_index+1:] # <<<<<<<<<<<<<< * return "%s%s" % (processed_format, format) * */ __pyx_t_1 = PyNumber_Add(__pyx_v_directive_index, __pyx_int_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3212; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetSlice(__pyx_v_format, 0, 0, &__pyx_t_1, NULL, NULL, 0, 0, 1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3212; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF_SET(__pyx_v_format, __pyx_t_2); __pyx_t_2 = 0; } /* "pandas/tslib.pyx":3213 * self[format[directive_index]]) * format = format[directive_index+1:] * return "%s%s" % (processed_format, format) # <<<<<<<<<<<<<< * * def compile(self, format): */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3213; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_processed_format); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_processed_format); __Pyx_GIVEREF(__pyx_v_processed_format); __Pyx_INCREF(__pyx_v_format); PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_format); __Pyx_GIVEREF(__pyx_v_format); __pyx_t_1 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_226), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3213; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __pyx_r = ((PyObject *)__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("pandas.tslib.TimeRE.pattern", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_processed_format); __Pyx_XDECREF(__pyx_v_regex_chars); __Pyx_XDECREF(__pyx_v_whitespace_replacement); __Pyx_XDECREF(__pyx_v_directive_index); __Pyx_XDECREF(__pyx_v_format); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5tslib_6TimeRE_7compile(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6pandas_5tslib_6TimeRE_6compile[] = "Return a compiled re object for the format string."; static PyMethodDef __pyx_mdef_6pandas_5tslib_6TimeRE_7compile = {__Pyx_NAMESTR("compile"), (PyCFunction)__pyx_pw_6pandas_5tslib_6TimeRE_7compile, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_5tslib_6TimeRE_6compile)}; static PyObject *__pyx_pw_6pandas_5tslib_6TimeRE_7compile(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_self = 0; PyObject *__pyx_v_format = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("compile (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__self,&__pyx_n_s__format,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__self)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__format)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("compile", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3215; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "compile") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3215; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } __pyx_v_self = values[0]; __pyx_v_format = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("compile", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3215; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.tslib.TimeRE.compile", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pandas_5tslib_6TimeRE_6compile(__pyx_self, __pyx_v_self, __pyx_v_format); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/tslib.pyx":3215 * return "%s%s" % (processed_format, format) * * def compile(self, format): # <<<<<<<<<<<<<< * """Return a compiled re object for the format string.""" * return re_compile(self.pattern(format), IGNORECASE) */ static PyObject *__pyx_pf_6pandas_5tslib_6TimeRE_6compile(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_format) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("compile", 0); /* "pandas/tslib.pyx":3217 * def compile(self, format): * """Return a compiled re object for the format string.""" * return re_compile(self.pattern(format), IGNORECASE) # <<<<<<<<<<<<<< * * _cache_lock = _thread_allocate_lock() */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__re_compile); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3217; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s__pattern); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3217; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3217; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_v_format); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_format); __Pyx_GIVEREF(__pyx_v_format); __pyx_t_4 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3217; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s__IGNORECASE); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3217; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3217; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_4 = 0; __pyx_t_3 = 0; __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3217; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("pandas.tslib.TimeRE.compile", __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_5tslib_99_calc_julian_from_U_or_W(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6pandas_5tslib_98_calc_julian_from_U_or_W[] = "Calculate the Julian day based on the year, week of the year, and day of\n the week, with week_start_day representing whether the week of the year\n assumes the week starts on Sunday or Monday (6 or 0)."; static PyMethodDef __pyx_mdef_6pandas_5tslib_99_calc_julian_from_U_or_W = {__Pyx_NAMESTR("_calc_julian_from_U_or_W"), (PyCFunction)__pyx_pw_6pandas_5tslib_99_calc_julian_from_U_or_W, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_5tslib_98_calc_julian_from_U_or_W)}; static PyObject *__pyx_pw_6pandas_5tslib_99_calc_julian_from_U_or_W(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_year = 0; PyObject *__pyx_v_week_of_year = 0; PyObject *__pyx_v_day_of_week = 0; PyObject *__pyx_v_week_starts_Mon = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_calc_julian_from_U_or_W (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__year,&__pyx_n_s__week_of_year,&__pyx_n_s__day_of_week,&__pyx_n_s__week_starts_Mon,0}; PyObject* values[4] = {0,0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__year)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__week_of_year)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("_calc_julian_from_U_or_W", 1, 4, 4, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3226; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__day_of_week)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("_calc_julian_from_U_or_W", 1, 4, 4, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3226; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__week_starts_Mon)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("_calc_julian_from_U_or_W", 1, 4, 4, 3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3226; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_calc_julian_from_U_or_W") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3226; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 4) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[3] = PyTuple_GET_ITEM(__pyx_args, 3); } __pyx_v_year = values[0]; __pyx_v_week_of_year = values[1]; __pyx_v_day_of_week = values[2]; __pyx_v_week_starts_Mon = values[3]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("_calc_julian_from_U_or_W", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3226; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.tslib._calc_julian_from_U_or_W", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pandas_5tslib_98_calc_julian_from_U_or_W(__pyx_self, __pyx_v_year, __pyx_v_week_of_year, __pyx_v_day_of_week, __pyx_v_week_starts_Mon); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/tslib.pyx":3226 * _regex_cache = {} * * def _calc_julian_from_U_or_W(year, week_of_year, day_of_week, week_starts_Mon): # <<<<<<<<<<<<<< * """Calculate the Julian day based on the year, week of the year, and day of * the week, with week_start_day representing whether the week of the year */ static PyObject *__pyx_pf_6pandas_5tslib_98_calc_julian_from_U_or_W(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_year, PyObject *__pyx_v_week_of_year, PyObject *__pyx_v_day_of_week, PyObject *__pyx_v_week_starts_Mon) { PyObject *__pyx_v_first_weekday = NULL; PyObject *__pyx_v_week_0_length = NULL; PyObject *__pyx_v_days_to_week = 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_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_calc_julian_from_U_or_W", 0); __Pyx_INCREF(__pyx_v_day_of_week); /* "pandas/tslib.pyx":3230 * the week, with week_start_day representing whether the week of the year * assumes the week starts on Sunday or Monday (6 or 0).""" * first_weekday = datetime_date(year, 1, 1).weekday() # <<<<<<<<<<<<<< * # If we are dealing with the %U directive (week starts on Sunday), it's * # easier to just shift the view to Sunday being the first day of the */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__datetime_date); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3230; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3230; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_year); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_year); __Pyx_GIVEREF(__pyx_v_year); __Pyx_INCREF(__pyx_int_1); PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_int_1); __Pyx_GIVEREF(__pyx_int_1); __Pyx_INCREF(__pyx_int_1); PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_int_1); __Pyx_GIVEREF(__pyx_int_1); __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3230; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s__weekday); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3230; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3230; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_first_weekday = __pyx_t_3; __pyx_t_3 = 0; /* "pandas/tslib.pyx":3234 * # easier to just shift the view to Sunday being the first day of the * # week. * if not week_starts_Mon: # <<<<<<<<<<<<<< * first_weekday = (first_weekday + 1) % 7 * day_of_week = (day_of_week + 1) % 7 */ __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_week_starts_Mon); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3234; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_5 = ((!__pyx_t_4) != 0); if (__pyx_t_5) { /* "pandas/tslib.pyx":3235 * # week. * if not week_starts_Mon: * first_weekday = (first_weekday + 1) % 7 # <<<<<<<<<<<<<< * day_of_week = (day_of_week + 1) % 7 * # Need to watch out for a week 0 (when the first day of the year is not */ __pyx_t_3 = PyNumber_Add(__pyx_v_first_weekday, __pyx_int_1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3235; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = PyNumber_Remainder(__pyx_t_3, __pyx_int_7); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3235; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF_SET(__pyx_v_first_weekday, __pyx_t_2); __pyx_t_2 = 0; /* "pandas/tslib.pyx":3236 * if not week_starts_Mon: * first_weekday = (first_weekday + 1) % 7 * day_of_week = (day_of_week + 1) % 7 # <<<<<<<<<<<<<< * # Need to watch out for a week 0 (when the first day of the year is not * # the same as that specified by %U or %W). */ __pyx_t_2 = PyNumber_Add(__pyx_v_day_of_week, __pyx_int_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3236; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyNumber_Remainder(__pyx_t_2, __pyx_int_7); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3236; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF_SET(__pyx_v_day_of_week, __pyx_t_3); __pyx_t_3 = 0; goto __pyx_L3; } __pyx_L3:; /* "pandas/tslib.pyx":3239 * # Need to watch out for a week 0 (when the first day of the year is not * # the same as that specified by %U or %W). * week_0_length = (7 - first_weekday) % 7 # <<<<<<<<<<<<<< * if week_of_year == 0: * return 1 + day_of_week - first_weekday */ __pyx_t_3 = PyNumber_Subtract(__pyx_int_7, __pyx_v_first_weekday); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3239; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = PyNumber_Remainder(__pyx_t_3, __pyx_int_7); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3239; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_week_0_length = __pyx_t_2; __pyx_t_2 = 0; /* "pandas/tslib.pyx":3240 * # the same as that specified by %U or %W). * week_0_length = (7 - first_weekday) % 7 * if week_of_year == 0: # <<<<<<<<<<<<<< * return 1 + day_of_week - first_weekday * else: */ __pyx_t_2 = PyObject_RichCompare(__pyx_v_week_of_year, __pyx_int_0, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3240; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3240; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_5) { /* "pandas/tslib.pyx":3241 * week_0_length = (7 - first_weekday) % 7 * if week_of_year == 0: * return 1 + day_of_week - first_weekday # <<<<<<<<<<<<<< * else: * days_to_week = week_0_length + (7 * (week_of_year - 1)) */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = PyNumber_Add(__pyx_int_1, __pyx_v_day_of_week); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3241; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyNumber_Subtract(__pyx_t_2, __pyx_v_first_weekday); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3241; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; goto __pyx_L4; } /*else*/ { /* "pandas/tslib.pyx":3243 * return 1 + day_of_week - first_weekday * else: * days_to_week = week_0_length + (7 * (week_of_year - 1)) # <<<<<<<<<<<<<< * return 1 + days_to_week + day_of_week * */ __pyx_t_3 = PyNumber_Subtract(__pyx_v_week_of_year, __pyx_int_1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3243; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = PyNumber_Multiply(__pyx_int_7, __pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3243; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyNumber_Add(__pyx_v_week_0_length, __pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3243; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_days_to_week = __pyx_t_3; __pyx_t_3 = 0; /* "pandas/tslib.pyx":3244 * else: * days_to_week = week_0_length + (7 * (week_of_year - 1)) * return 1 + days_to_week + day_of_week # <<<<<<<<<<<<<< * * # def _strptime_time(data_string, format="%a %b %d %H:%M:%S %Y"): */ __Pyx_XDECREF(__pyx_r); __pyx_t_3 = PyNumber_Add(__pyx_int_1, __pyx_v_days_to_week); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3244; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = PyNumber_Add(__pyx_t_3, __pyx_v_day_of_week); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3244; __pyx_clineno = __LINE__; goto __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; } __pyx_L4:; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("pandas.tslib._calc_julian_from_U_or_W", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_first_weekday); __Pyx_XDECREF(__pyx_v_week_0_length); __Pyx_XDECREF(__pyx_v_days_to_week); __Pyx_XDECREF(__pyx_v_day_of_week); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "datetime.pxd":126 * * * cdef inline _string_to_dts(object val, pandas_datetimestruct* dts): # <<<<<<<<<<<<<< * cdef int result * cdef char *tmp */ static CYTHON_INLINE PyObject *__pyx_f_8datetime__string_to_dts(PyObject *__pyx_v_val, pandas_datetimestruct *__pyx_v_dts) { int __pyx_v_result; char *__pyx_v_tmp; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; char *__pyx_t_3; Py_ssize_t __pyx_t_4; PyObject *__pyx_t_5 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_string_to_dts", 0); __Pyx_INCREF(__pyx_v_val); /* "datetime.pxd":130 * cdef char *tmp * * if PyUnicode_Check(val): # <<<<<<<<<<<<<< * val = PyUnicode_AsASCIIString(val); * */ __pyx_t_1 = (PyUnicode_Check(__pyx_v_val) != 0); if (__pyx_t_1) { /* "datetime.pxd":131 * * if PyUnicode_Check(val): * val = PyUnicode_AsASCIIString(val); # <<<<<<<<<<<<<< * * tmp = val */ __pyx_t_2 = PyUnicode_AsASCIIString(__pyx_v_val); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 131; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF_SET(__pyx_v_val, __pyx_t_2); __pyx_t_2 = 0; goto __pyx_L3; } __pyx_L3:; /* "datetime.pxd":133 * val = PyUnicode_AsASCIIString(val); * * tmp = val # <<<<<<<<<<<<<< * result = _cstring_to_dts(tmp, len(val), dts) * */ __pyx_t_3 = __Pyx_PyObject_AsString(__pyx_v_val); if (unlikely((!__pyx_t_3) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 133; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_tmp = __pyx_t_3; /* "datetime.pxd":134 * * tmp = val * result = _cstring_to_dts(tmp, len(val), dts) # <<<<<<<<<<<<<< * * if result == -1: */ __pyx_t_4 = PyObject_Length(__pyx_v_val); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 134; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_result = __pyx_f_8datetime__cstring_to_dts(__pyx_v_tmp, __pyx_t_4, __pyx_v_dts); /* "datetime.pxd":136 * result = _cstring_to_dts(tmp, len(val), dts) * * if result == -1: # <<<<<<<<<<<<<< * raise ValueError('Unable to parse %s' % str(val)) * */ __pyx_t_1 = ((__pyx_v_result == -1) != 0); if (__pyx_t_1) { /* "datetime.pxd":137 * * if result == -1: * raise ValueError('Unable to parse %s' % str(val)) # <<<<<<<<<<<<<< * * cdef inline int _cstring_to_dts(char *val, int length, */ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 137; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_val); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_val); __Pyx_GIVEREF(__pyx_v_val); __pyx_t_5 = PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 137; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __pyx_t_2 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_227), __pyx_t_5); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 137; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_2)); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 137; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_t_2)); __Pyx_GIVEREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 137; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; {__pyx_filename = __pyx_f[1]; __pyx_lineno = 137; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L4; } __pyx_L4:; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("datetime._string_to_dts", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_val); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "datetime.pxd":139 * raise ValueError('Unable to parse %s' % str(val)) * * cdef inline int _cstring_to_dts(char *val, int length, # <<<<<<<<<<<<<< * pandas_datetimestruct* dts): * cdef: */ static CYTHON_INLINE int __pyx_f_8datetime__cstring_to_dts(char *__pyx_v_val, int __pyx_v_length, pandas_datetimestruct *__pyx_v_dts) { npy_bool __pyx_v_islocal; npy_bool __pyx_v_special; PANDAS_DATETIMEUNIT __pyx_v_out_bestunit; int __pyx_v_result; int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_cstring_to_dts", 0); /* "datetime.pxd":148 * result = parse_iso_8601_datetime(val, length, PANDAS_FR_ns, * NPY_UNSAFE_CASTING, * dts, &islocal, &out_bestunit, &special) # <<<<<<<<<<<<<< * return result * */ __pyx_v_result = parse_iso_8601_datetime(__pyx_v_val, __pyx_v_length, PANDAS_FR_ns, NPY_UNSAFE_CASTING, __pyx_v_dts, (&__pyx_v_islocal), (&__pyx_v_out_bestunit), (&__pyx_v_special)); /* "datetime.pxd":149 * NPY_UNSAFE_CASTING, * dts, &islocal, &out_bestunit, &special) * return result # <<<<<<<<<<<<<< * * */ __pyx_r = __pyx_v_result; goto __pyx_L0; __pyx_r = 0; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "datetime.pxd":152 * * * cdef inline object _datetime64_to_datetime(int64_t val): # <<<<<<<<<<<<<< * cdef pandas_datetimestruct dts * pandas_datetime_to_datetimestruct(val, PANDAS_FR_ns, &dts) */ static CYTHON_INLINE PyObject *__pyx_f_8datetime__datetime64_to_datetime(__pyx_t_5numpy_int64_t __pyx_v_val) { pandas_datetimestruct __pyx_v_dts; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_datetime64_to_datetime", 0); /* "datetime.pxd":154 * cdef inline object _datetime64_to_datetime(int64_t val): * cdef pandas_datetimestruct dts * pandas_datetime_to_datetimestruct(val, PANDAS_FR_ns, &dts) # <<<<<<<<<<<<<< * return _dts_to_pydatetime(&dts) * */ pandas_datetime_to_datetimestruct(__pyx_v_val, PANDAS_FR_ns, (&__pyx_v_dts)); /* "datetime.pxd":155 * cdef pandas_datetimestruct dts * pandas_datetime_to_datetimestruct(val, PANDAS_FR_ns, &dts) * return _dts_to_pydatetime(&dts) # <<<<<<<<<<<<<< * * cdef inline object _dts_to_pydatetime(pandas_datetimestruct *dts): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_8datetime__dts_to_pydatetime((&__pyx_v_dts)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 155; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("datetime._datetime64_to_datetime", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "datetime.pxd":157 * return _dts_to_pydatetime(&dts) * * cdef inline object _dts_to_pydatetime(pandas_datetimestruct *dts): # <<<<<<<<<<<<<< * return PyDateTime_FromDateAndTime(dts.year, dts.month, * dts.day, dts.hour, */ static CYTHON_INLINE PyObject *__pyx_f_8datetime__dts_to_pydatetime(pandas_datetimestruct *__pyx_v_dts) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_dts_to_pydatetime", 0); /* "datetime.pxd":158 * * cdef inline object _dts_to_pydatetime(pandas_datetimestruct *dts): * return PyDateTime_FromDateAndTime(dts.year, dts.month, # <<<<<<<<<<<<<< * dts.day, dts.hour, * dts.min, dts.sec, dts.us) */ __Pyx_XDECREF(__pyx_r); /* "datetime.pxd":160 * return PyDateTime_FromDateAndTime(dts.year, dts.month, * dts.day, dts.hour, * dts.min, dts.sec, dts.us) # <<<<<<<<<<<<<< * * cdef inline int64_t _pydatetime_to_dts(object val, pandas_datetimestruct *dts): */ __pyx_t_1 = PyDateTime_FromDateAndTime(__pyx_v_dts->year, __pyx_v_dts->month, __pyx_v_dts->day, __pyx_v_dts->hour, __pyx_v_dts->min, __pyx_v_dts->sec, __pyx_v_dts->us); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 158; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)__pyx_t_1)); __pyx_r = __pyx_t_1; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("datetime._dts_to_pydatetime", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "datetime.pxd":162 * dts.min, dts.sec, dts.us) * * cdef inline int64_t _pydatetime_to_dts(object val, pandas_datetimestruct *dts): # <<<<<<<<<<<<<< * dts.year = PyDateTime_GET_YEAR(val) * dts.month = PyDateTime_GET_MONTH(val) */ static CYTHON_INLINE __pyx_t_5numpy_int64_t __pyx_f_8datetime__pydatetime_to_dts(PyObject *__pyx_v_val, pandas_datetimestruct *__pyx_v_dts) { __pyx_t_5numpy_int64_t __pyx_r; __Pyx_RefNannyDeclarations int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_pydatetime_to_dts", 0); /* "datetime.pxd":163 * * cdef inline int64_t _pydatetime_to_dts(object val, pandas_datetimestruct *dts): * dts.year = PyDateTime_GET_YEAR(val) # <<<<<<<<<<<<<< * dts.month = PyDateTime_GET_MONTH(val) * dts.day = PyDateTime_GET_DAY(val) */ if (!(likely(((__pyx_v_val) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_val, __pyx_ptype_8datetime_date))))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 163; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_dts->year = PyDateTime_GET_YEAR(((PyDateTime_Date *)__pyx_v_val)); /* "datetime.pxd":164 * cdef inline int64_t _pydatetime_to_dts(object val, pandas_datetimestruct *dts): * dts.year = PyDateTime_GET_YEAR(val) * dts.month = PyDateTime_GET_MONTH(val) # <<<<<<<<<<<<<< * dts.day = PyDateTime_GET_DAY(val) * dts.hour = PyDateTime_DATE_GET_HOUR(val) */ if (!(likely(((__pyx_v_val) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_val, __pyx_ptype_8datetime_date))))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 164; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_dts->month = PyDateTime_GET_MONTH(((PyDateTime_Date *)__pyx_v_val)); /* "datetime.pxd":165 * dts.year = PyDateTime_GET_YEAR(val) * dts.month = PyDateTime_GET_MONTH(val) * dts.day = PyDateTime_GET_DAY(val) # <<<<<<<<<<<<<< * dts.hour = PyDateTime_DATE_GET_HOUR(val) * dts.min = PyDateTime_DATE_GET_MINUTE(val) */ if (!(likely(((__pyx_v_val) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_val, __pyx_ptype_8datetime_date))))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 165; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_dts->day = PyDateTime_GET_DAY(((PyDateTime_Date *)__pyx_v_val)); /* "datetime.pxd":166 * dts.month = PyDateTime_GET_MONTH(val) * dts.day = PyDateTime_GET_DAY(val) * dts.hour = PyDateTime_DATE_GET_HOUR(val) # <<<<<<<<<<<<<< * dts.min = PyDateTime_DATE_GET_MINUTE(val) * dts.sec = PyDateTime_DATE_GET_SECOND(val) */ __pyx_v_dts->hour = PyDateTime_DATE_GET_HOUR(__pyx_v_val); /* "datetime.pxd":167 * dts.day = PyDateTime_GET_DAY(val) * dts.hour = PyDateTime_DATE_GET_HOUR(val) * dts.min = PyDateTime_DATE_GET_MINUTE(val) # <<<<<<<<<<<<<< * dts.sec = PyDateTime_DATE_GET_SECOND(val) * dts.us = PyDateTime_DATE_GET_MICROSECOND(val) */ __pyx_v_dts->min = PyDateTime_DATE_GET_MINUTE(__pyx_v_val); /* "datetime.pxd":168 * dts.hour = PyDateTime_DATE_GET_HOUR(val) * dts.min = PyDateTime_DATE_GET_MINUTE(val) * dts.sec = PyDateTime_DATE_GET_SECOND(val) # <<<<<<<<<<<<<< * dts.us = PyDateTime_DATE_GET_MICROSECOND(val) * dts.ps = dts.as = 0 */ __pyx_v_dts->sec = PyDateTime_DATE_GET_SECOND(__pyx_v_val); /* "datetime.pxd":169 * dts.min = PyDateTime_DATE_GET_MINUTE(val) * dts.sec = PyDateTime_DATE_GET_SECOND(val) * dts.us = PyDateTime_DATE_GET_MICROSECOND(val) # <<<<<<<<<<<<<< * dts.ps = dts.as = 0 * return pandas_datetimestruct_to_datetime(PANDAS_FR_ns, dts) */ __pyx_v_dts->us = PyDateTime_DATE_GET_MICROSECOND(__pyx_v_val); /* "datetime.pxd":170 * dts.sec = PyDateTime_DATE_GET_SECOND(val) * dts.us = PyDateTime_DATE_GET_MICROSECOND(val) * dts.ps = dts.as = 0 # <<<<<<<<<<<<<< * return pandas_datetimestruct_to_datetime(PANDAS_FR_ns, dts) * */ __pyx_v_dts->ps = 0; __pyx_v_dts->as = 0; /* "datetime.pxd":171 * dts.us = PyDateTime_DATE_GET_MICROSECOND(val) * dts.ps = dts.as = 0 * return pandas_datetimestruct_to_datetime(PANDAS_FR_ns, dts) # <<<<<<<<<<<<<< * * cdef inline int64_t _dtlike_to_datetime64(object val, */ __pyx_r = pandas_datetimestruct_to_datetime(PANDAS_FR_ns, __pyx_v_dts); goto __pyx_L0; __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_WriteUnraisable("datetime._pydatetime_to_dts", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "datetime.pxd":173 * return pandas_datetimestruct_to_datetime(PANDAS_FR_ns, dts) * * cdef inline int64_t _dtlike_to_datetime64(object val, # <<<<<<<<<<<<<< * pandas_datetimestruct *dts): * dts.year = val.year */ static CYTHON_INLINE __pyx_t_5numpy_int64_t __pyx_f_8datetime__dtlike_to_datetime64(PyObject *__pyx_v_val, pandas_datetimestruct *__pyx_v_dts) { __pyx_t_5numpy_int64_t __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; npy_int64 __pyx_t_2; npy_int32 __pyx_t_3; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_dtlike_to_datetime64", 0); /* "datetime.pxd":175 * cdef inline int64_t _dtlike_to_datetime64(object val, * pandas_datetimestruct *dts): * dts.year = val.year # <<<<<<<<<<<<<< * dts.month = val.month * dts.day = val.day */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_val, __pyx_n_s__year); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 175; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyInt_from_py_npy_int64(__pyx_t_1); if (unlikely((__pyx_t_2 == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 175; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_dts->year = __pyx_t_2; /* "datetime.pxd":176 * pandas_datetimestruct *dts): * dts.year = val.year * dts.month = val.month # <<<<<<<<<<<<<< * dts.day = val.day * dts.hour = val.hour */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_val, __pyx_n_s__month); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 176; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __Pyx_PyInt_from_py_npy_int32(__pyx_t_1); if (unlikely((__pyx_t_3 == (npy_int32)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 176; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_dts->month = __pyx_t_3; /* "datetime.pxd":177 * dts.year = val.year * dts.month = val.month * dts.day = val.day # <<<<<<<<<<<<<< * dts.hour = val.hour * dts.min = val.minute */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_val, __pyx_n_s__day); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 177; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __Pyx_PyInt_from_py_npy_int32(__pyx_t_1); if (unlikely((__pyx_t_3 == (npy_int32)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 177; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_dts->day = __pyx_t_3; /* "datetime.pxd":178 * dts.month = val.month * dts.day = val.day * dts.hour = val.hour # <<<<<<<<<<<<<< * dts.min = val.minute * dts.sec = val.second */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_val, __pyx_n_s__hour); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 178; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __Pyx_PyInt_from_py_npy_int32(__pyx_t_1); if (unlikely((__pyx_t_3 == (npy_int32)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 178; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_dts->hour = __pyx_t_3; /* "datetime.pxd":179 * dts.day = val.day * dts.hour = val.hour * dts.min = val.minute # <<<<<<<<<<<<<< * dts.sec = val.second * dts.us = val.microsecond */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_val, __pyx_n_s__minute); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 179; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __Pyx_PyInt_from_py_npy_int32(__pyx_t_1); if (unlikely((__pyx_t_3 == (npy_int32)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 179; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_dts->min = __pyx_t_3; /* "datetime.pxd":180 * dts.hour = val.hour * dts.min = val.minute * dts.sec = val.second # <<<<<<<<<<<<<< * dts.us = val.microsecond * dts.ps = dts.as = 0 */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_val, __pyx_n_s__second); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __Pyx_PyInt_from_py_npy_int32(__pyx_t_1); if (unlikely((__pyx_t_3 == (npy_int32)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_dts->sec = __pyx_t_3; /* "datetime.pxd":181 * dts.min = val.minute * dts.sec = val.second * dts.us = val.microsecond # <<<<<<<<<<<<<< * dts.ps = dts.as = 0 * return pandas_datetimestruct_to_datetime(PANDAS_FR_ns, dts) */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_val, __pyx_n_s__microsecond); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 181; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __Pyx_PyInt_from_py_npy_int32(__pyx_t_1); if (unlikely((__pyx_t_3 == (npy_int32)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 181; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_dts->us = __pyx_t_3; /* "datetime.pxd":182 * dts.sec = val.second * dts.us = val.microsecond * dts.ps = dts.as = 0 # <<<<<<<<<<<<<< * return pandas_datetimestruct_to_datetime(PANDAS_FR_ns, dts) * */ __pyx_v_dts->ps = 0; __pyx_v_dts->as = 0; /* "datetime.pxd":183 * dts.us = val.microsecond * dts.ps = dts.as = 0 * return pandas_datetimestruct_to_datetime(PANDAS_FR_ns, dts) # <<<<<<<<<<<<<< * * cdef inline int64_t _date_to_datetime64(object val, */ __pyx_r = pandas_datetimestruct_to_datetime(PANDAS_FR_ns, __pyx_v_dts); goto __pyx_L0; __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_WriteUnraisable("datetime._dtlike_to_datetime64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "datetime.pxd":185 * return pandas_datetimestruct_to_datetime(PANDAS_FR_ns, dts) * * cdef inline int64_t _date_to_datetime64(object val, # <<<<<<<<<<<<<< * pandas_datetimestruct *dts): * dts.year = PyDateTime_GET_YEAR(val) */ static CYTHON_INLINE __pyx_t_5numpy_int64_t __pyx_f_8datetime__date_to_datetime64(PyObject *__pyx_v_val, pandas_datetimestruct *__pyx_v_dts) { __pyx_t_5numpy_int64_t __pyx_r; __Pyx_RefNannyDeclarations int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_date_to_datetime64", 0); /* "datetime.pxd":187 * cdef inline int64_t _date_to_datetime64(object val, * pandas_datetimestruct *dts): * dts.year = PyDateTime_GET_YEAR(val) # <<<<<<<<<<<<<< * dts.month = PyDateTime_GET_MONTH(val) * dts.day = PyDateTime_GET_DAY(val) */ if (!(likely(((__pyx_v_val) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_val, __pyx_ptype_8datetime_date))))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 187; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_dts->year = PyDateTime_GET_YEAR(((PyDateTime_Date *)__pyx_v_val)); /* "datetime.pxd":188 * pandas_datetimestruct *dts): * dts.year = PyDateTime_GET_YEAR(val) * dts.month = PyDateTime_GET_MONTH(val) # <<<<<<<<<<<<<< * dts.day = PyDateTime_GET_DAY(val) * dts.hour = dts.min = dts.sec = dts.us = 0 */ if (!(likely(((__pyx_v_val) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_val, __pyx_ptype_8datetime_date))))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 188; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_dts->month = PyDateTime_GET_MONTH(((PyDateTime_Date *)__pyx_v_val)); /* "datetime.pxd":189 * dts.year = PyDateTime_GET_YEAR(val) * dts.month = PyDateTime_GET_MONTH(val) * dts.day = PyDateTime_GET_DAY(val) # <<<<<<<<<<<<<< * dts.hour = dts.min = dts.sec = dts.us = 0 * dts.ps = dts.as = 0 */ if (!(likely(((__pyx_v_val) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_val, __pyx_ptype_8datetime_date))))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 189; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_dts->day = PyDateTime_GET_DAY(((PyDateTime_Date *)__pyx_v_val)); /* "datetime.pxd":190 * dts.month = PyDateTime_GET_MONTH(val) * dts.day = PyDateTime_GET_DAY(val) * dts.hour = dts.min = dts.sec = dts.us = 0 # <<<<<<<<<<<<<< * dts.ps = dts.as = 0 * return pandas_datetimestruct_to_datetime(PANDAS_FR_ns, dts) */ __pyx_v_dts->hour = 0; __pyx_v_dts->min = 0; __pyx_v_dts->sec = 0; __pyx_v_dts->us = 0; /* "datetime.pxd":191 * dts.day = PyDateTime_GET_DAY(val) * dts.hour = dts.min = dts.sec = dts.us = 0 * dts.ps = dts.as = 0 # <<<<<<<<<<<<<< * return pandas_datetimestruct_to_datetime(PANDAS_FR_ns, dts) * */ __pyx_v_dts->ps = 0; __pyx_v_dts->as = 0; /* "datetime.pxd":192 * dts.hour = dts.min = dts.sec = dts.us = 0 * dts.ps = dts.as = 0 * return pandas_datetimestruct_to_datetime(PANDAS_FR_ns, dts) # <<<<<<<<<<<<<< * */ __pyx_r = pandas_datetimestruct_to_datetime(PANDAS_FR_ns, __pyx_v_dts); goto __pyx_L0; __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_WriteUnraisable("datetime._date_to_datetime64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "util.pxd":26 * object sarr_from_data(cnp.dtype, int length, void* data) * * cdef inline object get_value_at(ndarray arr, object loc): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, sz */ static CYTHON_INLINE PyObject *__pyx_f_4util_get_value_at(PyArrayObject *__pyx_v_arr, PyObject *__pyx_v_loc) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_sz; PyObject *__pyx_v_casted = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; Py_ssize_t __pyx_t_4; int __pyx_t_5; int __pyx_t_6; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_value_at", 0); __Pyx_INCREF(__pyx_v_loc); /* "util.pxd":30 * Py_ssize_t i, sz * void* data_ptr * if is_float_object(loc): # <<<<<<<<<<<<<< * casted = int(loc) * if casted == loc: */ __pyx_t_1 = (is_float_object(__pyx_v_loc) != 0); if (__pyx_t_1) { /* "util.pxd":31 * void* data_ptr * if is_float_object(loc): * casted = int(loc) # <<<<<<<<<<<<<< * if casted == loc: * loc = casted */ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 31; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_loc); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_loc); __Pyx_GIVEREF(__pyx_v_loc); __pyx_t_3 = PyObject_Call(((PyObject *)((PyObject*)(&PyInt_Type))), ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 31; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __pyx_v_casted = __pyx_t_3; __pyx_t_3 = 0; /* "util.pxd":32 * if is_float_object(loc): * casted = int(loc) * if casted == loc: # <<<<<<<<<<<<<< * loc = casted * i = loc */ __pyx_t_3 = PyObject_RichCompare(__pyx_v_casted, __pyx_v_loc, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 32; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 32; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_1) { /* "util.pxd":33 * casted = int(loc) * if casted == loc: * loc = casted # <<<<<<<<<<<<<< * i = loc * sz = cnp.PyArray_SIZE(arr) */ __Pyx_INCREF(__pyx_v_casted); __Pyx_DECREF_SET(__pyx_v_loc, __pyx_v_casted); goto __pyx_L4; } __pyx_L4:; goto __pyx_L3; } __pyx_L3:; /* "util.pxd":34 * if casted == loc: * loc = casted * i = loc # <<<<<<<<<<<<<< * sz = cnp.PyArray_SIZE(arr) * */ __pyx_t_4 = __Pyx_PyIndex_AsSsize_t(__pyx_v_loc); if (unlikely((__pyx_t_4 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 34; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_i = ((Py_ssize_t)__pyx_t_4); /* "util.pxd":35 * loc = casted * i = loc * sz = cnp.PyArray_SIZE(arr) # <<<<<<<<<<<<<< * * if i < 0 and sz > 0: */ __pyx_v_sz = PyArray_SIZE(__pyx_v_arr); /* "util.pxd":37 * sz = cnp.PyArray_SIZE(arr) * * if i < 0 and sz > 0: # <<<<<<<<<<<<<< * i += sz * elif i >= sz or sz == 0: */ __pyx_t_1 = ((__pyx_v_i < 0) != 0); if (__pyx_t_1) { __pyx_t_5 = ((__pyx_v_sz > 0) != 0); __pyx_t_6 = __pyx_t_5; } else { __pyx_t_6 = __pyx_t_1; } if (__pyx_t_6) { /* "util.pxd":38 * * if i < 0 and sz > 0: * i += sz # <<<<<<<<<<<<<< * elif i >= sz or sz == 0: * raise IndexError('index out of bounds') */ __pyx_v_i = (__pyx_v_i + __pyx_v_sz); goto __pyx_L5; } /* "util.pxd":39 * if i < 0 and sz > 0: * i += sz * elif i >= sz or sz == 0: # <<<<<<<<<<<<<< * raise IndexError('index out of bounds') * */ __pyx_t_6 = ((__pyx_v_i >= __pyx_v_sz) != 0); if (!__pyx_t_6) { __pyx_t_1 = ((__pyx_v_sz == 0) != 0); __pyx_t_5 = __pyx_t_1; } else { __pyx_t_5 = __pyx_t_6; } if (__pyx_t_5) { /* "util.pxd":40 * i += sz * elif i >= sz or sz == 0: * raise IndexError('index out of bounds') # <<<<<<<<<<<<<< * * return get_value_1d(arr, i) */ __pyx_t_3 = PyObject_Call(__pyx_builtin_IndexError, ((PyObject *)__pyx_k_tuple_228), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 40; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 40; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L5; } __pyx_L5:; /* "util.pxd":42 * raise IndexError('index out of bounds') * * return get_value_1d(arr, i) # <<<<<<<<<<<<<< * * cdef inline set_value_at(ndarray arr, object loc, object value): */ __Pyx_XDECREF(__pyx_r); __pyx_t_3 = get_value_1d(__pyx_v_arr, __pyx_v_i); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 42; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("util.get_value_at", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_casted); __Pyx_XDECREF(__pyx_v_loc); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "util.pxd":44 * return get_value_1d(arr, i) * * cdef inline set_value_at(ndarray arr, object loc, object value): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, sz */ static CYTHON_INLINE PyObject *__pyx_f_4util_set_value_at(PyArrayObject *__pyx_v_arr, PyObject *__pyx_v_loc, PyObject *__pyx_v_value) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_sz; PyObject *__pyx_v_casted = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; Py_ssize_t __pyx_t_4; int __pyx_t_5; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("set_value_at", 0); __Pyx_INCREF(__pyx_v_loc); /* "util.pxd":47 * cdef: * Py_ssize_t i, sz * if is_float_object(loc): # <<<<<<<<<<<<<< * casted = int(loc) * if casted == loc: */ __pyx_t_1 = (is_float_object(__pyx_v_loc) != 0); if (__pyx_t_1) { /* "util.pxd":48 * Py_ssize_t i, sz * if is_float_object(loc): * casted = int(loc) # <<<<<<<<<<<<<< * if casted == loc: * loc = casted */ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_loc); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_loc); __Pyx_GIVEREF(__pyx_v_loc); __pyx_t_3 = PyObject_Call(((PyObject *)((PyObject*)(&PyInt_Type))), ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __pyx_v_casted = __pyx_t_3; __pyx_t_3 = 0; /* "util.pxd":49 * if is_float_object(loc): * casted = int(loc) * if casted == loc: # <<<<<<<<<<<<<< * loc = casted * i = loc */ __pyx_t_3 = PyObject_RichCompare(__pyx_v_casted, __pyx_v_loc, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_1) { /* "util.pxd":50 * casted = int(loc) * if casted == loc: * loc = casted # <<<<<<<<<<<<<< * i = loc * sz = cnp.PyArray_SIZE(arr) */ __Pyx_INCREF(__pyx_v_casted); __Pyx_DECREF_SET(__pyx_v_loc, __pyx_v_casted); goto __pyx_L4; } __pyx_L4:; goto __pyx_L3; } __pyx_L3:; /* "util.pxd":51 * if casted == loc: * loc = casted * i = loc # <<<<<<<<<<<<<< * sz = cnp.PyArray_SIZE(arr) * */ __pyx_t_4 = __Pyx_PyIndex_AsSsize_t(__pyx_v_loc); if (unlikely((__pyx_t_4 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_i = ((Py_ssize_t)__pyx_t_4); /* "util.pxd":52 * loc = casted * i = loc * sz = cnp.PyArray_SIZE(arr) # <<<<<<<<<<<<<< * * if i < 0: */ __pyx_v_sz = PyArray_SIZE(__pyx_v_arr); /* "util.pxd":54 * sz = cnp.PyArray_SIZE(arr) * * if i < 0: # <<<<<<<<<<<<<< * i += sz * elif i >= sz: */ __pyx_t_1 = ((__pyx_v_i < 0) != 0); if (__pyx_t_1) { /* "util.pxd":55 * * if i < 0: * i += sz # <<<<<<<<<<<<<< * elif i >= sz: * raise IndexError('index out of bounds') */ __pyx_v_i = (__pyx_v_i + __pyx_v_sz); goto __pyx_L5; } /* "util.pxd":56 * if i < 0: * i += sz * elif i >= sz: # <<<<<<<<<<<<<< * raise IndexError('index out of bounds') * */ __pyx_t_1 = ((__pyx_v_i >= __pyx_v_sz) != 0); if (__pyx_t_1) { /* "util.pxd":57 * i += sz * elif i >= sz: * raise IndexError('index out of bounds') # <<<<<<<<<<<<<< * * assign_value_1d(arr, i, value) */ __pyx_t_3 = PyObject_Call(__pyx_builtin_IndexError, ((PyObject *)__pyx_k_tuple_229), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 57; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 57; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L5; } __pyx_L5:; /* "util.pxd":59 * raise IndexError('index out of bounds') * * assign_value_1d(arr, i, value) # <<<<<<<<<<<<<< * * cdef inline int is_contiguous(ndarray arr): */ __pyx_t_5 = assign_value_1d(__pyx_v_arr, __pyx_v_i, __pyx_v_value); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 59; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("util.set_value_at", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_casted); __Pyx_XDECREF(__pyx_v_loc); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "util.pxd":61 * assign_value_1d(arr, i, value) * * cdef inline int is_contiguous(ndarray arr): # <<<<<<<<<<<<<< * return cnp.PyArray_CHKFLAGS(arr, cnp.NPY_C_CONTIGUOUS) * */ static CYTHON_INLINE int __pyx_f_4util_is_contiguous(PyArrayObject *__pyx_v_arr) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("is_contiguous", 0); /* "util.pxd":62 * * cdef inline int is_contiguous(ndarray arr): * return cnp.PyArray_CHKFLAGS(arr, cnp.NPY_C_CONTIGUOUS) # <<<<<<<<<<<<<< * * cdef inline is_array(object o): */ __pyx_r = PyArray_CHKFLAGS(__pyx_v_arr, NPY_C_CONTIGUOUS); goto __pyx_L0; __pyx_r = 0; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "util.pxd":64 * return cnp.PyArray_CHKFLAGS(arr, cnp.NPY_C_CONTIGUOUS) * * cdef inline is_array(object o): # <<<<<<<<<<<<<< * return cnp.PyArray_Check(o) * */ static CYTHON_INLINE PyObject *__pyx_f_4util_is_array(PyObject *__pyx_v_o) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("is_array", 0); /* "util.pxd":65 * * cdef inline is_array(object o): * return cnp.PyArray_Check(o) # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyBool_FromLong(PyArray_Check(__pyx_v_o)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 65; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("util.is_array", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "util.pxd":68 * * * cdef inline bint _checknull(object val): # <<<<<<<<<<<<<< * try: * return val is None or (cpython.PyFloat_Check(val) and val != val) */ static CYTHON_INLINE int __pyx_f_4util__checknull(PyObject *__pyx_v_val) { 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; int __pyx_t_9; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_checknull", 0); /* "util.pxd":69 * * cdef inline bint _checknull(object val): * try: # <<<<<<<<<<<<<< * return val is None or (cpython.PyFloat_Check(val) and val != val) * except ValueError: */ { __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:*/ { /* "util.pxd":70 * cdef inline bint _checknull(object val): * try: * return val is None or (cpython.PyFloat_Check(val) and val != val) # <<<<<<<<<<<<<< * except ValueError: * return False */ __pyx_t_4 = (__pyx_v_val == Py_None); __pyx_t_5 = __Pyx_PyBool_FromLong(__pyx_t_4); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L3_error;} if (!__pyx_t_4) { __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_6 = __Pyx_PyBool_FromLong(PyFloat_Check(__pyx_v_val)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L3_error;} if (__pyx_t_4) { __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_7 = PyObject_RichCompare(__pyx_v_val, __pyx_v_val, Py_NE); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_t_8 = __pyx_t_7; __pyx_t_7 = 0; } else { __pyx_t_8 = __pyx_t_6; __pyx_t_6 = 0; } __pyx_t_6 = __pyx_t_8; __pyx_t_8 = 0; } else { __pyx_t_6 = __pyx_t_5; __pyx_t_5 = 0; } __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_r = __pyx_t_4; goto __pyx_L7_try_return; } __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L10_try_end; __pyx_L7_try_return:; __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); goto __pyx_L0; __pyx_L3_error:; __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; /* "util.pxd":71 * try: * return val is None or (cpython.PyFloat_Check(val) and val != val) * except ValueError: # <<<<<<<<<<<<<< * return False * */ __pyx_t_9 = PyErr_ExceptionMatches(__pyx_builtin_ValueError); if (__pyx_t_9) { __Pyx_AddTraceback("util._checknull", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_5, &__pyx_t_8) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 71; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_GOTREF(__pyx_t_5); __Pyx_GOTREF(__pyx_t_8); /* "util.pxd":72 * return val is None or (cpython.PyFloat_Check(val) and val != val) * except ValueError: * return False # <<<<<<<<<<<<<< * * cdef inline bint _checknull_old(object val): */ __pyx_r = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; goto __pyx_L6_except_return; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; goto __pyx_L4_exception_handled; } __pyx_L5_except_error:; __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); goto __pyx_L1_error; __pyx_L6_except_return:; __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); goto __pyx_L0; __pyx_L4_exception_handled:; __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); __pyx_L10_try_end:; } __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_WriteUnraisable("util._checknull", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "util.pxd":74 * return False * * cdef inline bint _checknull_old(object val): # <<<<<<<<<<<<<< * import numpy as np * cdef double INF = np.inf */ static CYTHON_INLINE int __pyx_f_4util__checknull_old(PyObject *__pyx_v_val) { PyObject *__pyx_v_np = NULL; double __pyx_v_INF; double __pyx_v_NEGINF; int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; double __pyx_t_2; 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; int __pyx_t_9; int __pyx_t_10; int __pyx_t_11; int __pyx_t_12; PyObject *__pyx_t_13 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_checknull_old", 0); /* "util.pxd":75 * * cdef inline bint _checknull_old(object val): * import numpy as np # <<<<<<<<<<<<<< * cdef double INF = np.inf * cdef double NEGINF = -INF */ __pyx_t_1 = __Pyx_Import(((PyObject *)__pyx_n_s__numpy), 0, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 75; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_v_np = __pyx_t_1; __pyx_t_1 = 0; /* "util.pxd":76 * cdef inline bint _checknull_old(object val): * import numpy as np * cdef double INF = np.inf # <<<<<<<<<<<<<< * cdef double NEGINF = -INF * try: */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_np, __pyx_n_s__inf); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 76; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __pyx_PyFloat_AsDouble(__pyx_t_1); if (unlikely((__pyx_t_2 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 76; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_INF = ((double)__pyx_t_2); /* "util.pxd":77 * import numpy as np * cdef double INF = np.inf * cdef double NEGINF = -INF # <<<<<<<<<<<<<< * try: * return bool(val is None or val != val and val != INF */ __pyx_v_NEGINF = (-__pyx_v_INF); /* "util.pxd":78 * cdef double INF = np.inf * cdef double NEGINF = -INF * try: # <<<<<<<<<<<<<< * return bool(val is None or val != val and val != INF * and val != NEGINF) */ { __Pyx_ExceptionSave(&__pyx_t_3, &__pyx_t_4, &__pyx_t_5); __Pyx_XGOTREF(__pyx_t_3); __Pyx_XGOTREF(__pyx_t_4); __Pyx_XGOTREF(__pyx_t_5); /*try:*/ { /* "util.pxd":79 * cdef double NEGINF = -INF * try: * return bool(val is None or val != val and val != INF # <<<<<<<<<<<<<< * and val != NEGINF) * except ValueError: */ __pyx_t_6 = (__pyx_v_val == Py_None); if (!__pyx_t_6) { __pyx_t_1 = PyObject_RichCompare(__pyx_v_val, __pyx_v_val, Py_NE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_7) { /* "util.pxd":80 * try: * return bool(val is None or val != val and val != INF * and val != NEGINF) # <<<<<<<<<<<<<< * except ValueError: * return False */ __pyx_t_1 = PyFloat_FromDouble(__pyx_v_INF); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 80; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_8 = PyObject_RichCompare(__pyx_v_val, __pyx_t_1, Py_NE); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (__pyx_t_9) { __pyx_t_8 = PyFloat_FromDouble(__pyx_v_NEGINF); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 80; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_1 = PyObject_RichCompare(__pyx_v_val, __pyx_t_8, Py_NE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 80; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 80; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_11 = __pyx_t_10; } else { __pyx_t_11 = __pyx_t_9; } __pyx_t_9 = __pyx_t_11; } else { __pyx_t_9 = __pyx_t_7; } __pyx_t_7 = __pyx_t_9; } else { __pyx_t_7 = __pyx_t_6; } __pyx_r = (!(!__pyx_t_7)); goto __pyx_L7_try_return; } __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; goto __pyx_L10_try_end; __pyx_L7_try_return:; __Pyx_XGIVEREF(__pyx_t_3); __Pyx_XGIVEREF(__pyx_t_4); __Pyx_XGIVEREF(__pyx_t_5); __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5); goto __pyx_L0; __pyx_L3_error:; __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; /* "util.pxd":81 * return bool(val is None or val != val and val != INF * and val != NEGINF) * except ValueError: # <<<<<<<<<<<<<< * return False * */ __pyx_t_12 = PyErr_ExceptionMatches(__pyx_builtin_ValueError); if (__pyx_t_12) { __Pyx_AddTraceback("util._checknull_old", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_8, &__pyx_t_13) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_GOTREF(__pyx_t_8); __Pyx_GOTREF(__pyx_t_13); /* "util.pxd":82 * and val != NEGINF) * except ValueError: * return False # <<<<<<<<<<<<<< * * cdef inline bint _checknan(object val): */ __pyx_r = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; goto __pyx_L6_except_return; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; goto __pyx_L4_exception_handled; } __pyx_L5_except_error:; __Pyx_XGIVEREF(__pyx_t_3); __Pyx_XGIVEREF(__pyx_t_4); __Pyx_XGIVEREF(__pyx_t_5); __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5); goto __pyx_L1_error; __pyx_L6_except_return:; __Pyx_XGIVEREF(__pyx_t_3); __Pyx_XGIVEREF(__pyx_t_4); __Pyx_XGIVEREF(__pyx_t_5); __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5); goto __pyx_L0; __pyx_L4_exception_handled:; __Pyx_XGIVEREF(__pyx_t_3); __Pyx_XGIVEREF(__pyx_t_4); __Pyx_XGIVEREF(__pyx_t_5); __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5); __pyx_L10_try_end:; } __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_13); __Pyx_WriteUnraisable("util._checknull_old", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_np); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "util.pxd":84 * return False * * cdef inline bint _checknan(object val): # <<<<<<<<<<<<<< * return not cnp.PyArray_Check(val) and val != val */ static CYTHON_INLINE int __pyx_f_4util__checknan(PyObject *__pyx_v_val) { int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_checknan", 0); /* "util.pxd":85 * * cdef inline bint _checknan(object val): * return not cnp.PyArray_Check(val) and val != val # <<<<<<<<<<<<<< */ __pyx_t_1 = __Pyx_PyBool_FromLong((!(PyArray_Check(__pyx_v_val) != 0))); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__pyx_t_2) { __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_3 = PyObject_RichCompare(__pyx_v_val, __pyx_v_val, Py_NE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_4 = __pyx_t_3; __pyx_t_3 = 0; } else { __pyx_t_4 = __pyx_t_1; __pyx_t_1 = 0; } __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_r = __pyx_t_2; goto __pyx_L0; __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_WriteUnraisable("util._checknan", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* 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)); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "numpy.pxd":196 * # 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 fullfill the PEP. */ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags) { int __pyx_v_copy_shape; 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_v_hasfields; int __pyx_r; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; int __pyx_t_5; int __pyx_t_6; int __pyx_t_7; PyObject *__pyx_t_8 = NULL; char *__pyx_t_9; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__getbuffer__", 0); if (__pyx_v_info != NULL) { __pyx_v_info->obj = Py_None; __Pyx_INCREF(Py_None); __Pyx_GIVEREF(__pyx_v_info->obj); } /* "numpy.pxd":202 * # of flags * * if info == NULL: return # <<<<<<<<<<<<<< * * cdef int copy_shape, i, ndim */ __pyx_t_1 = ((__pyx_v_info == NULL) != 0); if (__pyx_t_1) { __pyx_r = 0; goto __pyx_L0; goto __pyx_L3; } __pyx_L3:; /* "numpy.pxd":205 * * cdef int copy_shape, i, ndim * cdef int endian_detector = 1 # <<<<<<<<<<<<<< * cdef bint little_endian = ((&endian_detector)[0] != 0) * */ __pyx_v_endian_detector = 1; /* "numpy.pxd":206 * cdef int copy_shape, 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); /* "numpy.pxd":208 * cdef bint little_endian = ((&endian_detector)[0] != 0) * * ndim = PyArray_NDIM(self) # <<<<<<<<<<<<<< * * if sizeof(npy_intp) != sizeof(Py_ssize_t): */ __pyx_v_ndim = PyArray_NDIM(__pyx_v_self); /* "numpy.pxd":210 * ndim = PyArray_NDIM(self) * * if sizeof(npy_intp) != sizeof(Py_ssize_t): # <<<<<<<<<<<<<< * copy_shape = 1 * else: */ __pyx_t_1 = (((sizeof(npy_intp)) != (sizeof(Py_ssize_t))) != 0); if (__pyx_t_1) { /* "numpy.pxd":211 * * if sizeof(npy_intp) != sizeof(Py_ssize_t): * copy_shape = 1 # <<<<<<<<<<<<<< * else: * copy_shape = 0 */ __pyx_v_copy_shape = 1; goto __pyx_L4; } /*else*/ { /* "numpy.pxd":213 * copy_shape = 1 * else: * copy_shape = 0 # <<<<<<<<<<<<<< * * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) */ __pyx_v_copy_shape = 0; } __pyx_L4:; /* "numpy.pxd":215 * copy_shape = 0 * * 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_1 = (((__pyx_v_flags & PyBUF_C_CONTIGUOUS) == PyBUF_C_CONTIGUOUS) != 0); if (__pyx_t_1) { /* "numpy.pxd":216 * * 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_3 = __pyx_t_2; } else { __pyx_t_3 = __pyx_t_1; } if (__pyx_t_3) { /* "numpy.pxd":217 * 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_4 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_231), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 217; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[3]; __pyx_lineno = 217; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L5; } __pyx_L5:; /* "numpy.pxd":219 * 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_3 = (((__pyx_v_flags & PyBUF_F_CONTIGUOUS) == PyBUF_F_CONTIGUOUS) != 0); if (__pyx_t_3) { /* "numpy.pxd":220 * * 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_1 = ((!(PyArray_CHKFLAGS(__pyx_v_self, NPY_F_CONTIGUOUS) != 0)) != 0); __pyx_t_2 = __pyx_t_1; } else { __pyx_t_2 = __pyx_t_3; } if (__pyx_t_2) { /* "numpy.pxd":221 * 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_4 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_233), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 221; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[3]; __pyx_lineno = 221; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L6; } __pyx_L6:; /* "numpy.pxd":223 * raise ValueError(u"ndarray is not Fortran contiguous") * * info.buf = PyArray_DATA(self) # <<<<<<<<<<<<<< * info.ndim = ndim * if copy_shape: */ __pyx_v_info->buf = PyArray_DATA(__pyx_v_self); /* "numpy.pxd":224 * * info.buf = PyArray_DATA(self) * info.ndim = ndim # <<<<<<<<<<<<<< * if copy_shape: * # Allocate new buffer for strides and shape info. */ __pyx_v_info->ndim = __pyx_v_ndim; /* "numpy.pxd":225 * info.buf = PyArray_DATA(self) * info.ndim = ndim * if copy_shape: # <<<<<<<<<<<<<< * # Allocate new buffer for strides and shape info. * # This is allocated as one block, strides first. */ __pyx_t_2 = (__pyx_v_copy_shape != 0); if (__pyx_t_2) { /* "numpy.pxd":228 * # Allocate new buffer for strides and shape info. * # This is allocated as one block, strides first. * info.strides = stdlib.malloc(sizeof(Py_ssize_t) * ndim * 2) # <<<<<<<<<<<<<< * info.shape = info.strides + ndim * for i in range(ndim): */ __pyx_v_info->strides = ((Py_ssize_t *)malloc((((sizeof(Py_ssize_t)) * ((size_t)__pyx_v_ndim)) * 2))); /* "numpy.pxd":229 * # This is allocated as one block, strides first. * info.strides = stdlib.malloc(sizeof(Py_ssize_t) * ndim * 2) * 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); /* "numpy.pxd":230 * info.strides = stdlib.malloc(sizeof(Py_ssize_t) * ndim * 2) * 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_5 = __pyx_v_ndim; for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) { __pyx_v_i = __pyx_t_6; /* "numpy.pxd":231 * 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]); /* "numpy.pxd":232 * 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]); } goto __pyx_L7; } /*else*/ { /* "numpy.pxd":234 * info.shape[i] = PyArray_DIMS(self)[i] * else: * info.strides = PyArray_STRIDES(self) # <<<<<<<<<<<<<< * info.shape = PyArray_DIMS(self) * info.suboffsets = NULL */ __pyx_v_info->strides = ((Py_ssize_t *)PyArray_STRIDES(__pyx_v_self)); /* "numpy.pxd":235 * 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_L7:; /* "numpy.pxd":236 * 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; /* "numpy.pxd":237 * 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); /* "numpy.pxd":238 * 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)); /* "numpy.pxd":241 * * cdef int t * cdef char* f = NULL # <<<<<<<<<<<<<< * cdef dtype descr = self.descr * cdef list stack */ __pyx_v_f = NULL; /* "numpy.pxd":242 * cdef int t * cdef char* f = NULL * cdef dtype descr = self.descr # <<<<<<<<<<<<<< * cdef list stack * cdef int offset */ __pyx_t_4 = ((PyObject *)__pyx_v_self->descr); __Pyx_INCREF(__pyx_t_4); __pyx_v_descr = ((PyArray_Descr *)__pyx_t_4); __pyx_t_4 = 0; /* "numpy.pxd":246 * cdef int offset * * cdef bint hasfields = PyDataType_HASFIELDS(descr) # <<<<<<<<<<<<<< * * if not hasfields and not copy_shape: */ __pyx_v_hasfields = PyDataType_HASFIELDS(__pyx_v_descr); /* "numpy.pxd":248 * cdef bint hasfields = PyDataType_HASFIELDS(descr) * * if not hasfields and not copy_shape: # <<<<<<<<<<<<<< * # do not call releasebuffer * info.obj = None */ __pyx_t_2 = ((!(__pyx_v_hasfields != 0)) != 0); if (__pyx_t_2) { __pyx_t_3 = ((!(__pyx_v_copy_shape != 0)) != 0); __pyx_t_1 = __pyx_t_3; } else { __pyx_t_1 = __pyx_t_2; } if (__pyx_t_1) { /* "numpy.pxd":250 * if not hasfields and not copy_shape: * # do not call releasebuffer * info.obj = None # <<<<<<<<<<<<<< * else: * # need to call releasebuffer */ __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_info->obj); __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = Py_None; goto __pyx_L10; } /*else*/ { /* "numpy.pxd":253 * else: * # need to call releasebuffer * info.obj = self # <<<<<<<<<<<<<< * * if not hasfields: */ __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); } __pyx_L10:; /* "numpy.pxd":255 * info.obj = self * * if not hasfields: # <<<<<<<<<<<<<< * t = descr.type_num * if ((descr.byteorder == '>' and little_endian) or */ __pyx_t_1 = ((!(__pyx_v_hasfields != 0)) != 0); if (__pyx_t_1) { /* "numpy.pxd":256 * * if not hasfields: * t = descr.type_num # <<<<<<<<<<<<<< * if ((descr.byteorder == '>' and little_endian) or * (descr.byteorder == '<' and not little_endian)): */ __pyx_t_5 = __pyx_v_descr->type_num; __pyx_v_t = __pyx_t_5; /* "numpy.pxd":257 * if not hasfields: * t = descr.type_num * if ((descr.byteorder == '>' and little_endian) or # <<<<<<<<<<<<<< * (descr.byteorder == '<' and not little_endian)): * raise ValueError(u"Non-native byte order not supported") */ __pyx_t_1 = ((__pyx_v_descr->byteorder == '>') != 0); if (__pyx_t_1) { __pyx_t_2 = (__pyx_v_little_endian != 0); } else { __pyx_t_2 = __pyx_t_1; } if (!__pyx_t_2) { /* "numpy.pxd":258 * t = descr.type_num * if ((descr.byteorder == '>' and little_endian) or * (descr.byteorder == '<' and not little_endian)): # <<<<<<<<<<<<<< * raise ValueError(u"Non-native byte order not supported") * if t == NPY_BYTE: f = "b" */ __pyx_t_1 = ((__pyx_v_descr->byteorder == '<') != 0); if (__pyx_t_1) { __pyx_t_3 = ((!(__pyx_v_little_endian != 0)) != 0); __pyx_t_7 = __pyx_t_3; } else { __pyx_t_7 = __pyx_t_1; } __pyx_t_1 = __pyx_t_7; } else { __pyx_t_1 = __pyx_t_2; } if (__pyx_t_1) { /* "numpy.pxd":259 * if ((descr.byteorder == '>' and little_endian) or * (descr.byteorder == '<' 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_4 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_235), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 259; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[3]; __pyx_lineno = 259; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L12; } __pyx_L12:; /* "numpy.pxd":276 * 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) */ switch (__pyx_v_t) { /* "numpy.pxd":260 * (descr.byteorder == '<' 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" */ case NPY_BYTE: __pyx_v_f = __pyx_k__b; break; /* "numpy.pxd":261 * 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 = __pyx_k__B; break; /* "numpy.pxd":262 * 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 = __pyx_k__h; break; /* "numpy.pxd":263 * 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 = __pyx_k__H; break; /* "numpy.pxd":264 * 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 = __pyx_k__i; break; /* "numpy.pxd":265 * 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 = __pyx_k__I; break; /* "numpy.pxd":266 * 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 = __pyx_k__l; break; /* "numpy.pxd":267 * 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 = __pyx_k__L; break; /* "numpy.pxd":268 * 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 = __pyx_k__q; break; /* "numpy.pxd":269 * 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 = __pyx_k__Q; break; /* "numpy.pxd":270 * 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 = __pyx_k__f; break; /* "numpy.pxd":271 * 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 = __pyx_k__d; break; /* "numpy.pxd":272 * 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 = __pyx_k__g; break; /* "numpy.pxd":273 * 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 = __pyx_k__Zf; break; /* "numpy.pxd":274 * 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 = __pyx_k__Zd; break; /* "numpy.pxd":275 * 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 = __pyx_k__Zg; break; /* "numpy.pxd":276 * 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 = __pyx_k__O; break; default: /* "numpy.pxd":278 * elif t == NPY_OBJECT: f = "O" * else: * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) # <<<<<<<<<<<<<< * info.format = f * return */ __pyx_t_4 = PyInt_FromLong(__pyx_v_t); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 278; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_8 = PyNumber_Remainder(((PyObject *)__pyx_kp_u_236), __pyx_t_4); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 278; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_8)); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 278; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_t_8)); __Pyx_GIVEREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0; __pyx_t_8 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 278; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __Pyx_Raise(__pyx_t_8, 0, 0, 0); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; {__pyx_filename = __pyx_f[3]; __pyx_lineno = 278; __pyx_clineno = __LINE__; goto __pyx_L1_error;} break; } /* "numpy.pxd":279 * else: * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) * info.format = f # <<<<<<<<<<<<<< * return * else: */ __pyx_v_info->format = __pyx_v_f; /* "numpy.pxd":280 * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) * info.format = f * return # <<<<<<<<<<<<<< * else: * info.format = stdlib.malloc(_buffer_format_string_len) */ __pyx_r = 0; goto __pyx_L0; goto __pyx_L11; } /*else*/ { /* "numpy.pxd":282 * return * else: * info.format = stdlib.malloc(_buffer_format_string_len) # <<<<<<<<<<<<<< * info.format[0] = '^' # Native data types, manual alignment * offset = 0 */ __pyx_v_info->format = ((char *)malloc(255)); /* "numpy.pxd":283 * else: * info.format = stdlib.malloc(_buffer_format_string_len) * info.format[0] = '^' # Native data types, manual alignment # <<<<<<<<<<<<<< * offset = 0 * f = _util_dtypestring(descr, info.format + 1, */ (__pyx_v_info->format[0]) = '^'; /* "numpy.pxd":284 * info.format = stdlib.malloc(_buffer_format_string_len) * info.format[0] = '^' # Native data types, manual alignment * offset = 0 # <<<<<<<<<<<<<< * f = _util_dtypestring(descr, info.format + 1, * info.format + _buffer_format_string_len, */ __pyx_v_offset = 0; /* "numpy.pxd":287 * f = _util_dtypestring(descr, info.format + 1, * info.format + _buffer_format_string_len, * &offset) # <<<<<<<<<<<<<< * f[0] = 0 # Terminate format string * */ __pyx_t_9 = __pyx_f_5numpy__util_dtypestring(__pyx_v_descr, (__pyx_v_info->format + 1), (__pyx_v_info->format + 255), (&__pyx_v_offset)); if (unlikely(__pyx_t_9 == NULL)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 285; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_f = __pyx_t_9; /* "numpy.pxd":288 * info.format + _buffer_format_string_len, * &offset) * f[0] = 0 # Terminate format string # <<<<<<<<<<<<<< * * def __releasebuffer__(ndarray self, Py_buffer* info): */ (__pyx_v_f[0]) = 0; } __pyx_L11:; __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_8); __Pyx_AddTraceback("numpy.ndarray.__getbuffer__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; if (__pyx_v_info != NULL && __pyx_v_info->obj != NULL) { __Pyx_GOTREF(__pyx_v_info->obj); __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = NULL; } goto __pyx_L2; __pyx_L0:; if (__pyx_v_info != NULL && __pyx_v_info->obj == Py_None) { __Pyx_GOTREF(Py_None); __Pyx_DECREF(Py_None); __pyx_v_info->obj = NULL; } __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_descr); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* 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)); __Pyx_RefNannyFinishContext(); } /* "numpy.pxd":290 * f[0] = 0 # Terminate format string * * def __releasebuffer__(ndarray self, Py_buffer* info): # <<<<<<<<<<<<<< * if PyArray_HASFIELDS(self): * stdlib.free(info.format) */ 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); /* "numpy.pxd":291 * * def __releasebuffer__(ndarray self, Py_buffer* info): * if PyArray_HASFIELDS(self): # <<<<<<<<<<<<<< * stdlib.free(info.format) * if sizeof(npy_intp) != sizeof(Py_ssize_t): */ __pyx_t_1 = (PyArray_HASFIELDS(__pyx_v_self) != 0); if (__pyx_t_1) { /* "numpy.pxd":292 * def __releasebuffer__(ndarray self, Py_buffer* info): * if PyArray_HASFIELDS(self): * stdlib.free(info.format) # <<<<<<<<<<<<<< * if sizeof(npy_intp) != sizeof(Py_ssize_t): * stdlib.free(info.strides) */ free(__pyx_v_info->format); goto __pyx_L3; } __pyx_L3:; /* "numpy.pxd":293 * if PyArray_HASFIELDS(self): * stdlib.free(info.format) * if sizeof(npy_intp) != sizeof(Py_ssize_t): # <<<<<<<<<<<<<< * stdlib.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) { /* "numpy.pxd":294 * stdlib.free(info.format) * if sizeof(npy_intp) != sizeof(Py_ssize_t): * stdlib.free(info.strides) # <<<<<<<<<<<<<< * # info.shape was stored after info.strides in the same block * */ free(__pyx_v_info->strides); goto __pyx_L4; } __pyx_L4:; __Pyx_RefNannyFinishContext(); } /* "numpy.pxd":772 * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PyArray_MultiIterNew1", 0); /* "numpy.pxd":773 * * 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_filename = __pyx_f[3]; __pyx_lineno = 773; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __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; } /* "numpy.pxd":775 * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PyArray_MultiIterNew2", 0); /* "numpy.pxd":776 * * 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_filename = __pyx_f[3]; __pyx_lineno = 776; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __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; } /* "numpy.pxd":778 * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PyArray_MultiIterNew3", 0); /* "numpy.pxd":779 * * 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_filename = __pyx_f[3]; __pyx_lineno = 779; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __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; } /* "numpy.pxd":781 * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PyArray_MultiIterNew4", 0); /* "numpy.pxd":782 * * 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_filename = __pyx_f[3]; __pyx_lineno = 782; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __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; } /* "numpy.pxd":784 * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PyArray_MultiIterNew5", 0); /* "numpy.pxd":785 * * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): * return PyArray_MultiIterNew(5, a, b, c, d, e) # <<<<<<<<<<<<<< * * cdef inline char* _util_dtypestring(dtype descr, char* f, char* end, int* offset) except NULL: */ __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_filename = __pyx_f[3]; __pyx_lineno = 785; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __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; } /* "numpy.pxd":787 * return PyArray_MultiIterNew(5, a, b, c, d, e) * * 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; PyObject *__pyx_t_5 = NULL; PyObject *(*__pyx_t_6)(PyObject *); int __pyx_t_7; int __pyx_t_8; int __pyx_t_9; int __pyx_t_10; long __pyx_t_11; char *__pyx_t_12; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_util_dtypestring", 0); /* "numpy.pxd":794 * cdef int delta_offset * cdef tuple i * cdef int endian_detector = 1 # <<<<<<<<<<<<<< * cdef bint little_endian = ((&endian_detector)[0] != 0) * cdef tuple fields */ __pyx_v_endian_detector = 1; /* "numpy.pxd":795 * cdef tuple i * 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); /* "numpy.pxd":798 * cdef tuple fields * * for childname in descr.names: # <<<<<<<<<<<<<< * fields = descr.fields[childname] * child, new_offset = fields */ if (unlikely(((PyObject *)__pyx_v_descr->names) == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); {__pyx_filename = __pyx_f[3]; __pyx_lineno = 798; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_1 = ((PyObject *)__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_COMPILING_IN_CPYTHON __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_filename = __pyx_f[3]; __pyx_lineno = 798; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 798; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif __Pyx_XDECREF_SET(__pyx_v_childname, __pyx_t_3); __pyx_t_3 = 0; /* "numpy.pxd":799 * * for childname in descr.names: * fields = descr.fields[childname] # <<<<<<<<<<<<<< * child, new_offset = fields * */ __pyx_t_3 = PyObject_GetItem(__pyx_v_descr->fields, __pyx_v_childname); if (!__pyx_t_3) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 799; __pyx_clineno = __LINE__; goto __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 tuple, got %.200s", Py_TYPE(__pyx_t_3)->tp_name), 0))) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 799; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_XDECREF_SET(__pyx_v_fields, ((PyObject*)__pyx_t_3)); __pyx_t_3 = 0; /* "numpy.pxd":800 * for childname in descr.names: * fields = descr.fields[childname] * child, new_offset = fields # <<<<<<<<<<<<<< * * if (end - f) - (new_offset - offset[0]) < 15: */ if (likely(PyTuple_CheckExact(((PyObject *)__pyx_v_fields)))) { PyObject* sequence = ((PyObject *)__pyx_v_fields); #if CYTHON_COMPILING_IN_CPYTHON Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); {__pyx_filename = __pyx_f[3]; __pyx_lineno = 800; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON __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_filename = __pyx_f[3]; __pyx_lineno = 800; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 800; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); #endif } else if (1) { __Pyx_RaiseNoneNotIterableError(); {__pyx_filename = __pyx_f[3]; __pyx_lineno = 800; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } else { Py_ssize_t index = -1; __pyx_t_5 = PyObject_GetIter(((PyObject *)__pyx_v_fields)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 800; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = Py_TYPE(__pyx_t_5)->tp_iternext; index = 0; __pyx_t_3 = __pyx_t_6(__pyx_t_5); if (unlikely(!__pyx_t_3)) goto __pyx_L5_unpacking_failed; __Pyx_GOTREF(__pyx_t_3); index = 1; __pyx_t_4 = __pyx_t_6(__pyx_t_5); if (unlikely(!__pyx_t_4)) goto __pyx_L5_unpacking_failed; __Pyx_GOTREF(__pyx_t_4); if (__Pyx_IternextUnpackEndCheck(__pyx_t_6(__pyx_t_5), 2) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 800; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_6 = NULL; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; goto __pyx_L6_unpacking_done; __pyx_L5_unpacking_failed:; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_6 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); {__pyx_filename = __pyx_f[3]; __pyx_lineno = 800; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_L6_unpacking_done:; } if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_dtype))))) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 800; __pyx_clineno = __LINE__; goto __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; /* "numpy.pxd":802 * 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 = PyInt_FromLong((__pyx_v_end - __pyx_v_f)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 802; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = PyInt_FromLong((__pyx_v_offset[0])); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 802; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = PyNumber_Subtract(__pyx_v_new_offset, __pyx_t_3); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 802; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyNumber_Subtract(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 802; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyObject_RichCompare(__pyx_t_3, __pyx_int_15, Py_LT); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 802; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 802; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_7) { /* "numpy.pxd":803 * * if (end - f) - (new_offset - offset[0]) < 15: * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") # <<<<<<<<<<<<<< * * if ((child.byteorder == '>' and little_endian) or */ __pyx_t_5 = PyObject_Call(__pyx_builtin_RuntimeError, ((PyObject *)__pyx_k_tuple_238), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 803; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_Raise(__pyx_t_5, 0, 0, 0); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; {__pyx_filename = __pyx_f[3]; __pyx_lineno = 803; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L7; } __pyx_L7:; /* "numpy.pxd":805 * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") * * if ((child.byteorder == '>' and little_endian) or # <<<<<<<<<<<<<< * (child.byteorder == '<' 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) { __pyx_t_8 = (__pyx_v_little_endian != 0); } else { __pyx_t_8 = __pyx_t_7; } if (!__pyx_t_8) { /* "numpy.pxd":806 * * if ((child.byteorder == '>' and little_endian) or * (child.byteorder == '<' 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) { __pyx_t_9 = ((!(__pyx_v_little_endian != 0)) != 0); __pyx_t_10 = __pyx_t_9; } else { __pyx_t_10 = __pyx_t_7; } __pyx_t_7 = __pyx_t_10; } else { __pyx_t_7 = __pyx_t_8; } if (__pyx_t_7) { /* "numpy.pxd":807 * if ((child.byteorder == '>' and little_endian) or * (child.byteorder == '<' 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_5 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_239), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 807; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_Raise(__pyx_t_5, 0, 0, 0); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; {__pyx_filename = __pyx_f[3]; __pyx_lineno = 807; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L8; } __pyx_L8:; /* "numpy.pxd":817 * * # Output padding bytes * while offset[0] < new_offset: # <<<<<<<<<<<<<< * f[0] = 120 # "x"; pad byte * f += 1 */ while (1) { __pyx_t_5 = PyInt_FromLong((__pyx_v_offset[0])); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 817; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = PyObject_RichCompare(__pyx_t_5, __pyx_v_new_offset, Py_LT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 817; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 817; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (!__pyx_t_7) break; /* "numpy.pxd":818 * # Output padding bytes * while offset[0] < new_offset: * f[0] = 120 # "x"; pad byte # <<<<<<<<<<<<<< * f += 1 * offset[0] += 1 */ (__pyx_v_f[0]) = 120; /* "numpy.pxd":819 * while offset[0] < new_offset: * f[0] = 120 # "x"; pad byte * f += 1 # <<<<<<<<<<<<<< * offset[0] += 1 * */ __pyx_v_f = (__pyx_v_f + 1); /* "numpy.pxd":820 * f[0] = 120 # "x"; pad byte * f += 1 * offset[0] += 1 # <<<<<<<<<<<<<< * * offset[0] += child.itemsize */ __pyx_t_11 = 0; (__pyx_v_offset[__pyx_t_11]) = ((__pyx_v_offset[__pyx_t_11]) + 1); } /* "numpy.pxd":822 * offset[0] += 1 * * offset[0] += child.itemsize # <<<<<<<<<<<<<< * * if not PyDataType_HASFIELDS(child): */ __pyx_t_11 = 0; (__pyx_v_offset[__pyx_t_11]) = ((__pyx_v_offset[__pyx_t_11]) + __pyx_v_child->elsize); /* "numpy.pxd":824 * offset[0] += child.itemsize * * if not PyDataType_HASFIELDS(child): # <<<<<<<<<<<<<< * t = child.type_num * if end - f < 5: */ __pyx_t_7 = ((!(PyDataType_HASFIELDS(__pyx_v_child) != 0)) != 0); if (__pyx_t_7) { /* "numpy.pxd":825 * * if not PyDataType_HASFIELDS(child): * t = child.type_num # <<<<<<<<<<<<<< * if end - f < 5: * raise RuntimeError(u"Format string allocated too short.") */ __pyx_t_3 = PyInt_FromLong(__pyx_v_child->type_num); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 825; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_XDECREF_SET(__pyx_v_t, __pyx_t_3); __pyx_t_3 = 0; /* "numpy.pxd":826 * if not PyDataType_HASFIELDS(child): * t = child.type_num * if end - f < 5: # <<<<<<<<<<<<<< * raise RuntimeError(u"Format string allocated too short.") * */ __pyx_t_7 = (((__pyx_v_end - __pyx_v_f) < 5) != 0); if (__pyx_t_7) { /* "numpy.pxd":827 * 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_3 = PyObject_Call(__pyx_builtin_RuntimeError, ((PyObject *)__pyx_k_tuple_241), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 827; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[3]; __pyx_lineno = 827; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L12; } __pyx_L12:; /* "numpy.pxd":830 * * # 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_3 = PyInt_FromLong(NPY_BYTE); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 830; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 830; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 830; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_7) { (__pyx_v_f[0]) = 98; goto __pyx_L13; } /* "numpy.pxd":831 * # 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_5 = PyInt_FromLong(NPY_UBYTE); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 831; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 831; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 831; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_7) { (__pyx_v_f[0]) = 66; goto __pyx_L13; } /* "numpy.pxd":832 * 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_3 = PyInt_FromLong(NPY_SHORT); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 832; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 832; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 832; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_7) { (__pyx_v_f[0]) = 104; goto __pyx_L13; } /* "numpy.pxd":833 * 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_5 = PyInt_FromLong(NPY_USHORT); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 833; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 833; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 833; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_7) { (__pyx_v_f[0]) = 72; goto __pyx_L13; } /* "numpy.pxd":834 * 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_3 = PyInt_FromLong(NPY_INT); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 834; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 834; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 834; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_7) { (__pyx_v_f[0]) = 105; goto __pyx_L13; } /* "numpy.pxd":835 * 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_5 = PyInt_FromLong(NPY_UINT); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 835; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 835; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 835; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_7) { (__pyx_v_f[0]) = 73; goto __pyx_L13; } /* "numpy.pxd":836 * 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_3 = PyInt_FromLong(NPY_LONG); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 836; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 836; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 836; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_7) { (__pyx_v_f[0]) = 108; goto __pyx_L13; } /* "numpy.pxd":837 * 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_5 = PyInt_FromLong(NPY_ULONG); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 837; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 837; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 837; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_7) { (__pyx_v_f[0]) = 76; goto __pyx_L13; } /* "numpy.pxd":838 * 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_3 = PyInt_FromLong(NPY_LONGLONG); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 838; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 838; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 838; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_7) { (__pyx_v_f[0]) = 113; goto __pyx_L13; } /* "numpy.pxd":839 * 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_5 = PyInt_FromLong(NPY_ULONGLONG); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 839; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 839; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 839; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_7) { (__pyx_v_f[0]) = 81; goto __pyx_L13; } /* "numpy.pxd":840 * 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_3 = PyInt_FromLong(NPY_FLOAT); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 840; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 840; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 840; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_7) { (__pyx_v_f[0]) = 102; goto __pyx_L13; } /* "numpy.pxd":841 * 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_5 = PyInt_FromLong(NPY_DOUBLE); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 841; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 841; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 841; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_7) { (__pyx_v_f[0]) = 100; goto __pyx_L13; } /* "numpy.pxd":842 * 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_3 = PyInt_FromLong(NPY_LONGDOUBLE); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 842; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 842; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 842; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_7) { (__pyx_v_f[0]) = 103; goto __pyx_L13; } /* "numpy.pxd":843 * 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_5 = PyInt_FromLong(NPY_CFLOAT); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 843; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 843; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 843; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_7) { (__pyx_v_f[0]) = 90; (__pyx_v_f[1]) = 102; __pyx_v_f = (__pyx_v_f + 1); goto __pyx_L13; } /* "numpy.pxd":844 * 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_3 = PyInt_FromLong(NPY_CDOUBLE); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 844; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 844; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 844; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_7) { (__pyx_v_f[0]) = 90; (__pyx_v_f[1]) = 100; __pyx_v_f = (__pyx_v_f + 1); goto __pyx_L13; } /* "numpy.pxd":845 * 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_5 = PyInt_FromLong(NPY_CLONGDOUBLE); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 845; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 845; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 845; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_7) { (__pyx_v_f[0]) = 90; (__pyx_v_f[1]) = 103; __pyx_v_f = (__pyx_v_f + 1); goto __pyx_L13; } /* "numpy.pxd":846 * 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_3 = PyInt_FromLong(NPY_OBJECT); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 846; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 846; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 846; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_7) { (__pyx_v_f[0]) = 79; goto __pyx_L13; } /*else*/ { /* "numpy.pxd":848 * elif t == NPY_OBJECT: f[0] = 79 #"O" * else: * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) # <<<<<<<<<<<<<< * f += 1 * else: */ __pyx_t_5 = PyNumber_Remainder(((PyObject *)__pyx_kp_u_236), __pyx_v_t); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 848; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_5)); __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 848; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_t_5)); __Pyx_GIVEREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; __pyx_t_5 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 848; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; __Pyx_Raise(__pyx_t_5, 0, 0, 0); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; {__pyx_filename = __pyx_f[3]; __pyx_lineno = 848; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_L13:; /* "numpy.pxd":849 * 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); goto __pyx_L11; } /*else*/ { /* "numpy.pxd":853 * # Cython ignores struct boundary information ("T{...}"), * # so don't output it * f = _util_dtypestring(child, f, end, offset) # <<<<<<<<<<<<<< * return f * */ __pyx_t_12 = __pyx_f_5numpy__util_dtypestring(__pyx_v_child, __pyx_v_f, __pyx_v_end, __pyx_v_offset); if (unlikely(__pyx_t_12 == NULL)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 853; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_f = __pyx_t_12; } __pyx_L11:; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "numpy.pxd":854 * # so don't output it * f = _util_dtypestring(child, f, end, offset) * return f # <<<<<<<<<<<<<< * * */ __pyx_r = __pyx_v_f; goto __pyx_L0; __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("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; } /* "numpy.pxd":969 * * * 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); /* "numpy.pxd":971 * 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) { /* "numpy.pxd":972 * cdef PyObject* baseptr * if base is None: * baseptr = NULL # <<<<<<<<<<<<<< * else: * Py_INCREF(base) # important to do this before decref below! */ __pyx_v_baseptr = NULL; goto __pyx_L3; } /*else*/ { /* "numpy.pxd":974 * baseptr = NULL * else: * Py_INCREF(base) # important to do this before decref below! # <<<<<<<<<<<<<< * baseptr = base * Py_XDECREF(arr.base) */ Py_INCREF(__pyx_v_base); /* "numpy.pxd":975 * 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:; /* "numpy.pxd":976 * 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); /* "numpy.pxd":977 * baseptr = base * Py_XDECREF(arr.base) * arr.base = baseptr # <<<<<<<<<<<<<< * * cdef inline object get_array_base(ndarray arr): */ __pyx_v_arr->base = __pyx_v_baseptr; __Pyx_RefNannyFinishContext(); } /* "numpy.pxd":979 * 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); /* "numpy.pxd":980 * * 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) { /* "numpy.pxd":981 * cdef inline object get_array_base(ndarray arr): * if arr.base is NULL: * return None # <<<<<<<<<<<<<< * else: * return arr.base */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(Py_None); __pyx_r = Py_None; goto __pyx_L0; goto __pyx_L3; } /*else*/ { /* "numpy.pxd":983 * return None * else: * return arr.base # <<<<<<<<<<<<<< */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_arr->base)); __pyx_r = ((PyObject *)__pyx_v_arr->base); goto __pyx_L0; } __pyx_L3:; __pyx_r = Py_None; __Pyx_INCREF(Py_None); __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } static struct __pyx_obj_6pandas_5tslib___pyx_scope_struct_2___seqToRE *__pyx_freelist_6pandas_5tslib___pyx_scope_struct_2___seqToRE[8]; static int __pyx_freecount_6pandas_5tslib___pyx_scope_struct_2___seqToRE = 0; static PyObject *__pyx_tp_new_6pandas_5tslib___pyx_scope_struct_2___seqToRE(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { struct __pyx_obj_6pandas_5tslib___pyx_scope_struct_2___seqToRE *p; PyObject *o; if (likely((__pyx_freecount_6pandas_5tslib___pyx_scope_struct_2___seqToRE > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_6pandas_5tslib___pyx_scope_struct_2___seqToRE)))) { o = (PyObject*)__pyx_freelist_6pandas_5tslib___pyx_scope_struct_2___seqToRE[--__pyx_freecount_6pandas_5tslib___pyx_scope_struct_2___seqToRE]; memset(o, 0, sizeof(struct __pyx_obj_6pandas_5tslib___pyx_scope_struct_2___seqToRE)); PyObject_INIT(o, t); PyObject_GC_Track(o); } else { o = (*t->tp_alloc)(t, 0); if (unlikely(!o)) return 0; } p = ((struct __pyx_obj_6pandas_5tslib___pyx_scope_struct_2___seqToRE *)o); p->__pyx_v_to_convert = 0; return o; } static void __pyx_tp_dealloc_6pandas_5tslib___pyx_scope_struct_2___seqToRE(PyObject *o) { struct __pyx_obj_6pandas_5tslib___pyx_scope_struct_2___seqToRE *p = (struct __pyx_obj_6pandas_5tslib___pyx_scope_struct_2___seqToRE *)o; PyObject_GC_UnTrack(o); Py_CLEAR(p->__pyx_v_to_convert); if ((__pyx_freecount_6pandas_5tslib___pyx_scope_struct_2___seqToRE < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_6pandas_5tslib___pyx_scope_struct_2___seqToRE))) { __pyx_freelist_6pandas_5tslib___pyx_scope_struct_2___seqToRE[__pyx_freecount_6pandas_5tslib___pyx_scope_struct_2___seqToRE++] = ((struct __pyx_obj_6pandas_5tslib___pyx_scope_struct_2___seqToRE *)o); } else { (*Py_TYPE(o)->tp_free)(o); } } static int __pyx_tp_traverse_6pandas_5tslib___pyx_scope_struct_2___seqToRE(PyObject *o, visitproc v, void *a) { int e; struct __pyx_obj_6pandas_5tslib___pyx_scope_struct_2___seqToRE *p = (struct __pyx_obj_6pandas_5tslib___pyx_scope_struct_2___seqToRE *)o; if (p->__pyx_v_to_convert) { e = (*v)(p->__pyx_v_to_convert, a); if (e) return e; } return 0; } static int __pyx_tp_clear_6pandas_5tslib___pyx_scope_struct_2___seqToRE(PyObject *o) { struct __pyx_obj_6pandas_5tslib___pyx_scope_struct_2___seqToRE *p = (struct __pyx_obj_6pandas_5tslib___pyx_scope_struct_2___seqToRE *)o; PyObject* tmp; tmp = ((PyObject*)p->__pyx_v_to_convert); p->__pyx_v_to_convert = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); return 0; } static PyMethodDef __pyx_methods_6pandas_5tslib___pyx_scope_struct_2___seqToRE[] = { {0, 0, 0, 0} }; static PyTypeObject __pyx_type_6pandas_5tslib___pyx_scope_struct_2___seqToRE = { PyVarObject_HEAD_INIT(0, 0) __Pyx_NAMESTR("pandas.tslib.__pyx_scope_struct_2___seqToRE"), /*tp_name*/ sizeof(struct __pyx_obj_6pandas_5tslib___pyx_scope_struct_2___seqToRE), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_6pandas_5tslib___pyx_scope_struct_2___seqToRE, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #else 0, /*reserved*/ #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_HAVE_GC, /*tp_flags*/ 0, /*tp_doc*/ __pyx_tp_traverse_6pandas_5tslib___pyx_scope_struct_2___seqToRE, /*tp_traverse*/ __pyx_tp_clear_6pandas_5tslib___pyx_scope_struct_2___seqToRE, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_6pandas_5tslib___pyx_scope_struct_2___seqToRE, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_6pandas_5tslib___pyx_scope_struct_2___seqToRE, /*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*/ #if PY_VERSION_HEX >= 0x02060000 0, /*tp_version_tag*/ #endif #if PY_VERSION_HEX >= 0x030400a1 && defined(Py_TPFLAGS_HAVE_FINALIZE) 0, /*tp_finalize*/ #endif }; static struct __pyx_vtabstruct_6pandas_5tslib__Timestamp __pyx_vtable_6pandas_5tslib__Timestamp; static PyObject *__pyx_tp_new_6pandas_5tslib__Timestamp(PyTypeObject *t, PyObject *a, PyObject *k) { struct __pyx_obj_6pandas_5tslib__Timestamp *p; PyObject *o = __pyx_ptype_8datetime_datetime->tp_new(t, a, k); if (unlikely(!o)) return 0; p = ((struct __pyx_obj_6pandas_5tslib__Timestamp *)o); p->__pyx_vtab = __pyx_vtabptr_6pandas_5tslib__Timestamp; p->offset = Py_None; Py_INCREF(Py_None); return o; } static void __pyx_tp_dealloc_6pandas_5tslib__Timestamp(PyObject *o) { struct __pyx_obj_6pandas_5tslib__Timestamp *p = (struct __pyx_obj_6pandas_5tslib__Timestamp *)o; PyObject_GC_UnTrack(o); Py_CLEAR(p->offset); PyObject_GC_Track(o); if (likely(__pyx_ptype_8datetime_datetime)) __pyx_ptype_8datetime_datetime->tp_dealloc(o); else __Pyx_call_next_tp_dealloc(o, __pyx_tp_dealloc_6pandas_5tslib__Timestamp); } static int __pyx_tp_traverse_6pandas_5tslib__Timestamp(PyObject *o, visitproc v, void *a) { int e; struct __pyx_obj_6pandas_5tslib__Timestamp *p = (struct __pyx_obj_6pandas_5tslib__Timestamp *)o; e = ((likely(__pyx_ptype_8datetime_datetime)) ? ((__pyx_ptype_8datetime_datetime->tp_traverse) ? __pyx_ptype_8datetime_datetime->tp_traverse(o, v, a) : 0) : __Pyx_call_next_tp_traverse(o, v, a, __pyx_tp_traverse_6pandas_5tslib__Timestamp)); if (e) return e; if (p->offset) { e = (*v)(p->offset, a); if (e) return e; } return 0; } static int __pyx_tp_clear_6pandas_5tslib__Timestamp(PyObject *o) { struct __pyx_obj_6pandas_5tslib__Timestamp *p = (struct __pyx_obj_6pandas_5tslib__Timestamp *)o; PyObject* tmp; if (likely(__pyx_ptype_8datetime_datetime)) { if (__pyx_ptype_8datetime_datetime->tp_clear) __pyx_ptype_8datetime_datetime->tp_clear(o); } else __Pyx_call_next_tp_clear(o, __pyx_tp_clear_6pandas_5tslib__Timestamp); tmp = ((PyObject*)p->offset); p->offset = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); return 0; } static PyObject *__pyx_getprop_6pandas_5tslib_10_Timestamp_value(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6pandas_5tslib_10_Timestamp_5value_1__get__(o); } static PyObject *__pyx_getprop_6pandas_5tslib_10_Timestamp_nanosecond(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6pandas_5tslib_10_Timestamp_10nanosecond_1__get__(o); } static PyObject *__pyx_getprop_6pandas_5tslib_10_Timestamp_offset(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6pandas_5tslib_10_Timestamp_6offset_1__get__(o); } static PyMethodDef __pyx_methods_6pandas_5tslib__Timestamp[] = { {__Pyx_NAMESTR("to_datetime"), (PyCFunction)__pyx_pw_6pandas_5tslib_10_Timestamp_5to_datetime, METH_NOARGS, __Pyx_DOCSTR(0)}, {__Pyx_NAMESTR("_get_field"), (PyCFunction)__pyx_pw_6pandas_5tslib_10_Timestamp_11_get_field, METH_O, __Pyx_DOCSTR(0)}, {0, 0, 0, 0} }; static struct PyGetSetDef __pyx_getsets_6pandas_5tslib__Timestamp[] = { {(char *)"value", __pyx_getprop_6pandas_5tslib_10_Timestamp_value, 0, 0, 0}, {(char *)"nanosecond", __pyx_getprop_6pandas_5tslib_10_Timestamp_nanosecond, 0, 0, 0}, {(char *)"offset", __pyx_getprop_6pandas_5tslib_10_Timestamp_offset, 0, 0, 0}, {0, 0, 0, 0, 0} }; static PyNumberMethods __pyx_tp_as_number__Timestamp = { __pyx_pw_6pandas_5tslib_10_Timestamp_7__add__, /*nb_add*/ __pyx_pw_6pandas_5tslib_10_Timestamp_9__sub__, /*nb_subtract*/ 0, /*nb_multiply*/ #if PY_MAJOR_VERSION < 3 0, /*nb_divide*/ #endif 0, /*nb_remainder*/ 0, /*nb_divmod*/ 0, /*nb_power*/ 0, /*nb_negative*/ 0, /*nb_positive*/ 0, /*nb_absolute*/ 0, /*nb_nonzero*/ 0, /*nb_invert*/ 0, /*nb_lshift*/ 0, /*nb_rshift*/ 0, /*nb_and*/ 0, /*nb_xor*/ 0, /*nb_or*/ #if PY_MAJOR_VERSION < 3 0, /*nb_coerce*/ #endif 0, /*nb_int*/ #if PY_MAJOR_VERSION < 3 0, /*nb_long*/ #else 0, /*reserved*/ #endif 0, /*nb_float*/ #if PY_MAJOR_VERSION < 3 0, /*nb_oct*/ #endif #if PY_MAJOR_VERSION < 3 0, /*nb_hex*/ #endif 0, /*nb_inplace_add*/ 0, /*nb_inplace_subtract*/ 0, /*nb_inplace_multiply*/ #if PY_MAJOR_VERSION < 3 0, /*nb_inplace_divide*/ #endif 0, /*nb_inplace_remainder*/ 0, /*nb_inplace_power*/ 0, /*nb_inplace_lshift*/ 0, /*nb_inplace_rshift*/ 0, /*nb_inplace_and*/ 0, /*nb_inplace_xor*/ 0, /*nb_inplace_or*/ 0, /*nb_floor_divide*/ 0, /*nb_true_divide*/ 0, /*nb_inplace_floor_divide*/ 0, /*nb_inplace_true_divide*/ #if PY_VERSION_HEX >= 0x02050000 0, /*nb_index*/ #endif }; static PyTypeObject __pyx_type_6pandas_5tslib__Timestamp = { PyVarObject_HEAD_INIT(0, 0) __Pyx_NAMESTR("pandas.tslib._Timestamp"), /*tp_name*/ sizeof(struct __pyx_obj_6pandas_5tslib__Timestamp), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_6pandas_5tslib__Timestamp, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #else 0, /*reserved*/ #endif 0, /*tp_repr*/ &__pyx_tp_as_number__Timestamp, /*tp_as_number*/ 0, /*tp_as_sequence*/ 0, /*tp_as_mapping*/ __pyx_pw_6pandas_5tslib_10_Timestamp_1__hash__, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ 0, /*tp_doc*/ __pyx_tp_traverse_6pandas_5tslib__Timestamp, /*tp_traverse*/ __pyx_tp_clear_6pandas_5tslib__Timestamp, /*tp_clear*/ __pyx_pw_6pandas_5tslib_10_Timestamp_3__richcmp__, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_6pandas_5tslib__Timestamp, /*tp_methods*/ 0, /*tp_members*/ __pyx_getsets_6pandas_5tslib__Timestamp, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_6pandas_5tslib__Timestamp, /*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*/ #if PY_VERSION_HEX >= 0x02060000 0, /*tp_version_tag*/ #endif #if PY_VERSION_HEX >= 0x030400a1 && defined(Py_TPFLAGS_HAVE_FINALIZE) 0, /*tp_finalize*/ #endif }; static struct __pyx_vtabstruct_6pandas_5tslib__NaT __pyx_vtable_6pandas_5tslib__NaT; static PyObject *__pyx_tp_new_6pandas_5tslib__NaT(PyTypeObject *t, PyObject *a, PyObject *k) { struct __pyx_obj_6pandas_5tslib__NaT *p; PyObject *o = __pyx_tp_new_6pandas_5tslib__Timestamp(t, a, k); if (unlikely(!o)) return 0; p = ((struct __pyx_obj_6pandas_5tslib__NaT *)o); p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_6pandas_5tslib__Timestamp*)__pyx_vtabptr_6pandas_5tslib__NaT; return o; } static PyMethodDef __pyx_methods_6pandas_5tslib__NaT[] = { {0, 0, 0, 0} }; static PyTypeObject __pyx_type_6pandas_5tslib__NaT = { PyVarObject_HEAD_INIT(0, 0) __Pyx_NAMESTR("pandas.tslib._NaT"), /*tp_name*/ sizeof(struct __pyx_obj_6pandas_5tslib__NaT), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_6pandas_5tslib__Timestamp, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #else 0, /*reserved*/ #endif 0, /*tp_repr*/ 0, /*tp_as_number*/ 0, /*tp_as_sequence*/ 0, /*tp_as_mapping*/ __pyx_pw_6pandas_5tslib_4_NaT_1__hash__, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ 0, /*tp_doc*/ __pyx_tp_traverse_6pandas_5tslib__Timestamp, /*tp_traverse*/ __pyx_tp_clear_6pandas_5tslib__Timestamp, /*tp_clear*/ __pyx_pw_6pandas_5tslib_4_NaT_3__richcmp__, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_6pandas_5tslib__NaT, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_6pandas_5tslib__NaT, /*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*/ #if PY_VERSION_HEX >= 0x02060000 0, /*tp_version_tag*/ #endif #if PY_VERSION_HEX >= 0x030400a1 && defined(Py_TPFLAGS_HAVE_FINALIZE) 0, /*tp_finalize*/ #endif }; static struct __pyx_obj_6pandas_5tslib___pyx_scope_struct_3_genexpr *__pyx_freelist_6pandas_5tslib___pyx_scope_struct_3_genexpr[8]; static int __pyx_freecount_6pandas_5tslib___pyx_scope_struct_3_genexpr = 0; static PyObject *__pyx_tp_new_6pandas_5tslib___pyx_scope_struct_3_genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { struct __pyx_obj_6pandas_5tslib___pyx_scope_struct_3_genexpr *p; PyObject *o; if (likely((__pyx_freecount_6pandas_5tslib___pyx_scope_struct_3_genexpr > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_6pandas_5tslib___pyx_scope_struct_3_genexpr)))) { o = (PyObject*)__pyx_freelist_6pandas_5tslib___pyx_scope_struct_3_genexpr[--__pyx_freecount_6pandas_5tslib___pyx_scope_struct_3_genexpr]; memset(o, 0, sizeof(struct __pyx_obj_6pandas_5tslib___pyx_scope_struct_3_genexpr)); PyObject_INIT(o, t); PyObject_GC_Track(o); } else { o = (*t->tp_alloc)(t, 0); if (unlikely(!o)) return 0; } p = ((struct __pyx_obj_6pandas_5tslib___pyx_scope_struct_3_genexpr *)o); p->__pyx_outer_scope = 0; p->__pyx_v_stuff = 0; p->__pyx_t_0 = 0; return o; } static void __pyx_tp_dealloc_6pandas_5tslib___pyx_scope_struct_3_genexpr(PyObject *o) { struct __pyx_obj_6pandas_5tslib___pyx_scope_struct_3_genexpr *p = (struct __pyx_obj_6pandas_5tslib___pyx_scope_struct_3_genexpr *)o; PyObject_GC_UnTrack(o); Py_CLEAR(p->__pyx_outer_scope); Py_CLEAR(p->__pyx_v_stuff); Py_CLEAR(p->__pyx_t_0); if ((__pyx_freecount_6pandas_5tslib___pyx_scope_struct_3_genexpr < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_6pandas_5tslib___pyx_scope_struct_3_genexpr))) { __pyx_freelist_6pandas_5tslib___pyx_scope_struct_3_genexpr[__pyx_freecount_6pandas_5tslib___pyx_scope_struct_3_genexpr++] = ((struct __pyx_obj_6pandas_5tslib___pyx_scope_struct_3_genexpr *)o); } else { (*Py_TYPE(o)->tp_free)(o); } } static int __pyx_tp_traverse_6pandas_5tslib___pyx_scope_struct_3_genexpr(PyObject *o, visitproc v, void *a) { int e; struct __pyx_obj_6pandas_5tslib___pyx_scope_struct_3_genexpr *p = (struct __pyx_obj_6pandas_5tslib___pyx_scope_struct_3_genexpr *)o; if (p->__pyx_outer_scope) { e = (*v)(((PyObject*)p->__pyx_outer_scope), a); if (e) return e; } if (p->__pyx_v_stuff) { e = (*v)(p->__pyx_v_stuff, a); if (e) return e; } if (p->__pyx_t_0) { e = (*v)(p->__pyx_t_0, a); if (e) return e; } return 0; } static int __pyx_tp_clear_6pandas_5tslib___pyx_scope_struct_3_genexpr(PyObject *o) { struct __pyx_obj_6pandas_5tslib___pyx_scope_struct_3_genexpr *p = (struct __pyx_obj_6pandas_5tslib___pyx_scope_struct_3_genexpr *)o; PyObject* tmp; tmp = ((PyObject*)p->__pyx_outer_scope); p->__pyx_outer_scope = ((struct __pyx_obj_6pandas_5tslib___pyx_scope_struct_2___seqToRE *)Py_None); Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->__pyx_v_stuff); p->__pyx_v_stuff = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->__pyx_t_0); p->__pyx_t_0 = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); return 0; } static PyMethodDef __pyx_methods_6pandas_5tslib___pyx_scope_struct_3_genexpr[] = { {0, 0, 0, 0} }; static PyTypeObject __pyx_type_6pandas_5tslib___pyx_scope_struct_3_genexpr = { PyVarObject_HEAD_INIT(0, 0) __Pyx_NAMESTR("pandas.tslib.__pyx_scope_struct_3_genexpr"), /*tp_name*/ sizeof(struct __pyx_obj_6pandas_5tslib___pyx_scope_struct_3_genexpr), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_6pandas_5tslib___pyx_scope_struct_3_genexpr, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #else 0, /*reserved*/ #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_HAVE_GC, /*tp_flags*/ 0, /*tp_doc*/ __pyx_tp_traverse_6pandas_5tslib___pyx_scope_struct_3_genexpr, /*tp_traverse*/ __pyx_tp_clear_6pandas_5tslib___pyx_scope_struct_3_genexpr, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_6pandas_5tslib___pyx_scope_struct_3_genexpr, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_6pandas_5tslib___pyx_scope_struct_3_genexpr, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ 0, /*tp_del*/ #if PY_VERSION_HEX >= 0x02060000 0, /*tp_version_tag*/ #endif #if PY_VERSION_HEX >= 0x030400a1 && defined(Py_TPFLAGS_HAVE_FINALIZE) 0, /*tp_finalize*/ #endif }; static struct __pyx_obj_6pandas_5tslib___pyx_scope_struct_1_genexpr *__pyx_freelist_6pandas_5tslib___pyx_scope_struct_1_genexpr[8]; static int __pyx_freecount_6pandas_5tslib___pyx_scope_struct_1_genexpr = 0; static PyObject *__pyx_tp_new_6pandas_5tslib___pyx_scope_struct_1_genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { struct __pyx_obj_6pandas_5tslib___pyx_scope_struct_1_genexpr *p; PyObject *o; if (likely((__pyx_freecount_6pandas_5tslib___pyx_scope_struct_1_genexpr > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_6pandas_5tslib___pyx_scope_struct_1_genexpr)))) { o = (PyObject*)__pyx_freelist_6pandas_5tslib___pyx_scope_struct_1_genexpr[--__pyx_freecount_6pandas_5tslib___pyx_scope_struct_1_genexpr]; memset(o, 0, sizeof(struct __pyx_obj_6pandas_5tslib___pyx_scope_struct_1_genexpr)); PyObject_INIT(o, t); PyObject_GC_Track(o); } else { o = (*t->tp_alloc)(t, 0); if (unlikely(!o)) return 0; } p = ((struct __pyx_obj_6pandas_5tslib___pyx_scope_struct_1_genexpr *)o); p->__pyx_outer_scope = 0; p->__pyx_v_tz = 0; p->__pyx_v_tz_names = 0; p->__pyx_t_0 = 0; p->__pyx_t_1 = 0; return o; } static void __pyx_tp_dealloc_6pandas_5tslib___pyx_scope_struct_1_genexpr(PyObject *o) { struct __pyx_obj_6pandas_5tslib___pyx_scope_struct_1_genexpr *p = (struct __pyx_obj_6pandas_5tslib___pyx_scope_struct_1_genexpr *)o; PyObject_GC_UnTrack(o); Py_CLEAR(p->__pyx_outer_scope); Py_CLEAR(p->__pyx_v_tz); Py_CLEAR(p->__pyx_v_tz_names); Py_CLEAR(p->__pyx_t_0); Py_CLEAR(p->__pyx_t_1); if ((__pyx_freecount_6pandas_5tslib___pyx_scope_struct_1_genexpr < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_6pandas_5tslib___pyx_scope_struct_1_genexpr))) { __pyx_freelist_6pandas_5tslib___pyx_scope_struct_1_genexpr[__pyx_freecount_6pandas_5tslib___pyx_scope_struct_1_genexpr++] = ((struct __pyx_obj_6pandas_5tslib___pyx_scope_struct_1_genexpr *)o); } else { (*Py_TYPE(o)->tp_free)(o); } } static int __pyx_tp_traverse_6pandas_5tslib___pyx_scope_struct_1_genexpr(PyObject *o, visitproc v, void *a) { int e; struct __pyx_obj_6pandas_5tslib___pyx_scope_struct_1_genexpr *p = (struct __pyx_obj_6pandas_5tslib___pyx_scope_struct_1_genexpr *)o; if (p->__pyx_outer_scope) { e = (*v)(((PyObject*)p->__pyx_outer_scope), a); if (e) return e; } if (p->__pyx_v_tz) { e = (*v)(p->__pyx_v_tz, a); if (e) return e; } if (p->__pyx_v_tz_names) { e = (*v)(p->__pyx_v_tz_names, a); if (e) return e; } if (p->__pyx_t_0) { e = (*v)(p->__pyx_t_0, a); if (e) return e; } if (p->__pyx_t_1) { e = (*v)(p->__pyx_t_1, a); if (e) return e; } return 0; } static int __pyx_tp_clear_6pandas_5tslib___pyx_scope_struct_1_genexpr(PyObject *o) { struct __pyx_obj_6pandas_5tslib___pyx_scope_struct_1_genexpr *p = (struct __pyx_obj_6pandas_5tslib___pyx_scope_struct_1_genexpr *)o; PyObject* tmp; tmp = ((PyObject*)p->__pyx_outer_scope); p->__pyx_outer_scope = ((struct __pyx_obj_6pandas_5tslib___pyx_scope_struct____init__ *)Py_None); Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->__pyx_v_tz); p->__pyx_v_tz = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->__pyx_v_tz_names); p->__pyx_v_tz_names = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->__pyx_t_0); p->__pyx_t_0 = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->__pyx_t_1); p->__pyx_t_1 = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); return 0; } static PyMethodDef __pyx_methods_6pandas_5tslib___pyx_scope_struct_1_genexpr[] = { {0, 0, 0, 0} }; static PyTypeObject __pyx_type_6pandas_5tslib___pyx_scope_struct_1_genexpr = { PyVarObject_HEAD_INIT(0, 0) __Pyx_NAMESTR("pandas.tslib.__pyx_scope_struct_1_genexpr"), /*tp_name*/ sizeof(struct __pyx_obj_6pandas_5tslib___pyx_scope_struct_1_genexpr), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_6pandas_5tslib___pyx_scope_struct_1_genexpr, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #else 0, /*reserved*/ #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_HAVE_GC, /*tp_flags*/ 0, /*tp_doc*/ __pyx_tp_traverse_6pandas_5tslib___pyx_scope_struct_1_genexpr, /*tp_traverse*/ __pyx_tp_clear_6pandas_5tslib___pyx_scope_struct_1_genexpr, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_6pandas_5tslib___pyx_scope_struct_1_genexpr, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_6pandas_5tslib___pyx_scope_struct_1_genexpr, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ 0, /*tp_del*/ #if PY_VERSION_HEX >= 0x02060000 0, /*tp_version_tag*/ #endif #if PY_VERSION_HEX >= 0x030400a1 && defined(Py_TPFLAGS_HAVE_FINALIZE) 0, /*tp_finalize*/ #endif }; static PyObject *__pyx_tp_new_6pandas_5tslib__TSObject(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { struct __pyx_obj_6pandas_5tslib__TSObject *p; PyObject *o; o = (*t->tp_alloc)(t, 0); if (unlikely(!o)) return 0; p = ((struct __pyx_obj_6pandas_5tslib__TSObject *)o); p->tzinfo = Py_None; Py_INCREF(Py_None); return o; } static void __pyx_tp_dealloc_6pandas_5tslib__TSObject(PyObject *o) { struct __pyx_obj_6pandas_5tslib__TSObject *p = (struct __pyx_obj_6pandas_5tslib__TSObject *)o; PyObject_GC_UnTrack(o); Py_CLEAR(p->tzinfo); (*Py_TYPE(o)->tp_free)(o); } static int __pyx_tp_traverse_6pandas_5tslib__TSObject(PyObject *o, visitproc v, void *a) { int e; struct __pyx_obj_6pandas_5tslib__TSObject *p = (struct __pyx_obj_6pandas_5tslib__TSObject *)o; if (p->tzinfo) { e = (*v)(p->tzinfo, a); if (e) return e; } return 0; } static int __pyx_tp_clear_6pandas_5tslib__TSObject(PyObject *o) { struct __pyx_obj_6pandas_5tslib__TSObject *p = (struct __pyx_obj_6pandas_5tslib__TSObject *)o; PyObject* tmp; tmp = ((PyObject*)p->tzinfo); p->tzinfo = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); return 0; } static PyObject *__pyx_getprop_6pandas_5tslib_9_TSObject_value(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6pandas_5tslib_9_TSObject_5value_1__get__(o); } static PyMethodDef __pyx_methods_6pandas_5tslib__TSObject[] = { {0, 0, 0, 0} }; static struct PyGetSetDef __pyx_getsets_6pandas_5tslib__TSObject[] = { {(char *)"value", __pyx_getprop_6pandas_5tslib_9_TSObject_value, 0, 0, 0}, {0, 0, 0, 0, 0} }; static PyTypeObject __pyx_type_6pandas_5tslib__TSObject = { PyVarObject_HEAD_INIT(0, 0) __Pyx_NAMESTR("pandas.tslib._TSObject"), /*tp_name*/ sizeof(struct __pyx_obj_6pandas_5tslib__TSObject), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_6pandas_5tslib__TSObject, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #else 0, /*reserved*/ #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*/ 0, /*tp_doc*/ __pyx_tp_traverse_6pandas_5tslib__TSObject, /*tp_traverse*/ __pyx_tp_clear_6pandas_5tslib__TSObject, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_6pandas_5tslib__TSObject, /*tp_methods*/ 0, /*tp_members*/ __pyx_getsets_6pandas_5tslib__TSObject, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_6pandas_5tslib__TSObject, /*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*/ #if PY_VERSION_HEX >= 0x02060000 0, /*tp_version_tag*/ #endif #if PY_VERSION_HEX >= 0x030400a1 && defined(Py_TPFLAGS_HAVE_FINALIZE) 0, /*tp_finalize*/ #endif }; static struct __pyx_obj_6pandas_5tslib___pyx_scope_struct____init__ *__pyx_freelist_6pandas_5tslib___pyx_scope_struct____init__[8]; static int __pyx_freecount_6pandas_5tslib___pyx_scope_struct____init__ = 0; static PyObject *__pyx_tp_new_6pandas_5tslib___pyx_scope_struct____init__(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { struct __pyx_obj_6pandas_5tslib___pyx_scope_struct____init__ *p; PyObject *o; if (likely((__pyx_freecount_6pandas_5tslib___pyx_scope_struct____init__ > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_6pandas_5tslib___pyx_scope_struct____init__)))) { o = (PyObject*)__pyx_freelist_6pandas_5tslib___pyx_scope_struct____init__[--__pyx_freecount_6pandas_5tslib___pyx_scope_struct____init__]; memset(o, 0, sizeof(struct __pyx_obj_6pandas_5tslib___pyx_scope_struct____init__)); PyObject_INIT(o, t); PyObject_GC_Track(o); } else { o = (*t->tp_alloc)(t, 0); if (unlikely(!o)) return 0; } p = ((struct __pyx_obj_6pandas_5tslib___pyx_scope_struct____init__ *)o); p->__pyx_v_self = 0; return o; } static void __pyx_tp_dealloc_6pandas_5tslib___pyx_scope_struct____init__(PyObject *o) { struct __pyx_obj_6pandas_5tslib___pyx_scope_struct____init__ *p = (struct __pyx_obj_6pandas_5tslib___pyx_scope_struct____init__ *)o; PyObject_GC_UnTrack(o); Py_CLEAR(p->__pyx_v_self); if ((__pyx_freecount_6pandas_5tslib___pyx_scope_struct____init__ < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_6pandas_5tslib___pyx_scope_struct____init__))) { __pyx_freelist_6pandas_5tslib___pyx_scope_struct____init__[__pyx_freecount_6pandas_5tslib___pyx_scope_struct____init__++] = ((struct __pyx_obj_6pandas_5tslib___pyx_scope_struct____init__ *)o); } else { (*Py_TYPE(o)->tp_free)(o); } } static int __pyx_tp_traverse_6pandas_5tslib___pyx_scope_struct____init__(PyObject *o, visitproc v, void *a) { int e; struct __pyx_obj_6pandas_5tslib___pyx_scope_struct____init__ *p = (struct __pyx_obj_6pandas_5tslib___pyx_scope_struct____init__ *)o; if (p->__pyx_v_self) { e = (*v)(p->__pyx_v_self, a); if (e) return e; } return 0; } static int __pyx_tp_clear_6pandas_5tslib___pyx_scope_struct____init__(PyObject *o) { struct __pyx_obj_6pandas_5tslib___pyx_scope_struct____init__ *p = (struct __pyx_obj_6pandas_5tslib___pyx_scope_struct____init__ *)o; PyObject* tmp; tmp = ((PyObject*)p->__pyx_v_self); p->__pyx_v_self = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); return 0; } static PyMethodDef __pyx_methods_6pandas_5tslib___pyx_scope_struct____init__[] = { {0, 0, 0, 0} }; static PyTypeObject __pyx_type_6pandas_5tslib___pyx_scope_struct____init__ = { PyVarObject_HEAD_INIT(0, 0) __Pyx_NAMESTR("pandas.tslib.__pyx_scope_struct____init__"), /*tp_name*/ sizeof(struct __pyx_obj_6pandas_5tslib___pyx_scope_struct____init__), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_6pandas_5tslib___pyx_scope_struct____init__, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #else 0, /*reserved*/ #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_HAVE_GC, /*tp_flags*/ 0, /*tp_doc*/ __pyx_tp_traverse_6pandas_5tslib___pyx_scope_struct____init__, /*tp_traverse*/ __pyx_tp_clear_6pandas_5tslib___pyx_scope_struct____init__, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_6pandas_5tslib___pyx_scope_struct____init__, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_6pandas_5tslib___pyx_scope_struct____init__, /*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*/ #if PY_VERSION_HEX >= 0x02060000 0, /*tp_version_tag*/ #endif #if PY_VERSION_HEX >= 0x030400a1 && defined(Py_TPFLAGS_HAVE_FINALIZE) 0, /*tp_finalize*/ #endif }; static PyMethodDef __pyx_methods[] = { {__Pyx_NAMESTR("get_value_box"), (PyCFunction)__pyx_pw_6pandas_5tslib_9get_value_box, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}, {__Pyx_NAMESTR("_get_utcoffset"), (PyCFunction)__pyx_pw_6pandas_5tslib_17_get_utcoffset, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}, {__Pyx_NAMESTR("cast_from_unit"), (PyCFunction)__pyx_pw_6pandas_5tslib_37cast_from_unit, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_5tslib_36cast_from_unit)}, {__Pyx_NAMESTR("_unbox_utcoffsets"), (PyCFunction)__pyx_pw_6pandas_5tslib_55_unbox_utcoffsets, METH_O, __Pyx_DOCSTR(0)}, {__Pyx_NAMESTR("normalize_date"), (PyCFunction)__pyx_pw_6pandas_5tslib_73normalize_date, METH_O, __Pyx_DOCSTR(__pyx_doc_6pandas_5tslib_72normalize_date)}, {__Pyx_NAMESTR("period_asfreq"), (PyCFunction)__pyx_pw_6pandas_5tslib_79period_asfreq, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_5tslib_78period_asfreq)}, {__Pyx_NAMESTR("period_ordinal_to_dt64"), (PyCFunction)__pyx_pw_6pandas_5tslib_85period_ordinal_to_dt64, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}, {__Pyx_NAMESTR("resolution"), (PyCFunction)__pyx_pw_6pandas_5tslib_95resolution, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}, {0, 0, 0, 0} }; #if PY_MAJOR_VERSION >= 3 static struct PyModuleDef __pyx_moduledef = { #if PY_VERSION_HEX < 0x03020000 { PyObject_HEAD_INIT(NULL) NULL, 0, NULL }, #else PyModuleDef_HEAD_INIT, #endif __Pyx_NAMESTR("tslib"), 0, /* m_doc */ -1, /* m_size */ __pyx_methods /* m_methods */, NULL, /* m_reload */ NULL, /* m_traverse */ NULL, /* m_clear */ NULL /* m_free */ }; #endif static __Pyx_StringTabEntry __pyx_string_tab[] = { {&__pyx_kp_s_10, __pyx_k_10, sizeof(__pyx_k_10), 0, 0, 1, 0}, {&__pyx_n_s_103, __pyx_k_103, sizeof(__pyx_k_103), 0, 0, 1, 1}, {&__pyx_kp_s_105, __pyx_k_105, sizeof(__pyx_k_105), 0, 0, 1, 0}, {&__pyx_kp_s_107, __pyx_k_107, sizeof(__pyx_k_107), 0, 0, 1, 0}, {&__pyx_kp_s_108, __pyx_k_108, sizeof(__pyx_k_108), 0, 0, 1, 0}, {&__pyx_kp_s_109, __pyx_k_109, sizeof(__pyx_k_109), 0, 0, 1, 0}, {&__pyx_kp_s_11, __pyx_k_11, sizeof(__pyx_k_11), 0, 0, 1, 0}, {&__pyx_n_s_110, __pyx_k_110, sizeof(__pyx_k_110), 0, 0, 1, 1}, {&__pyx_kp_s_118, __pyx_k_118, sizeof(__pyx_k_118), 0, 0, 1, 0}, {&__pyx_kp_s_119, __pyx_k_119, sizeof(__pyx_k_119), 0, 0, 1, 0}, {&__pyx_kp_s_12, __pyx_k_12, sizeof(__pyx_k_12), 0, 0, 1, 0}, {&__pyx_kp_s_121, __pyx_k_121, sizeof(__pyx_k_121), 0, 0, 1, 0}, {&__pyx_kp_s_123, __pyx_k_123, sizeof(__pyx_k_123), 0, 0, 1, 0}, {&__pyx_kp_s_125, __pyx_k_125, sizeof(__pyx_k_125), 0, 0, 1, 0}, {&__pyx_kp_b_127, __pyx_k_127, sizeof(__pyx_k_127), 0, 0, 0, 0}, {&__pyx_kp_s_127, __pyx_k_127, sizeof(__pyx_k_127), 0, 0, 1, 0}, {&__pyx_kp_b_128, __pyx_k_128, sizeof(__pyx_k_128), 0, 0, 0, 0}, {&__pyx_kp_b_129, __pyx_k_129, sizeof(__pyx_k_129), 0, 0, 0, 0}, {&__pyx_kp_s_13, __pyx_k_13, sizeof(__pyx_k_13), 0, 0, 1, 0}, {&__pyx_kp_s_130, __pyx_k_130, sizeof(__pyx_k_130), 0, 0, 1, 0}, {&__pyx_kp_b_131, __pyx_k_131, sizeof(__pyx_k_131), 0, 0, 0, 0}, {&__pyx_kp_b_132, __pyx_k_132, sizeof(__pyx_k_132), 0, 0, 0, 0}, {&__pyx_kp_b_133, __pyx_k_133, sizeof(__pyx_k_133), 0, 0, 0, 0}, {&__pyx_kp_b_134, __pyx_k_134, sizeof(__pyx_k_134), 0, 0, 0, 0}, {&__pyx_kp_b_135, __pyx_k_135, sizeof(__pyx_k_135), 0, 0, 0, 0}, {&__pyx_kp_b_136, __pyx_k_136, sizeof(__pyx_k_136), 0, 0, 0, 0}, {&__pyx_kp_b_137, __pyx_k_137, sizeof(__pyx_k_137), 0, 0, 0, 0}, {&__pyx_kp_s_138, __pyx_k_138, sizeof(__pyx_k_138), 0, 0, 1, 0}, {&__pyx_kp_s_139, __pyx_k_139, sizeof(__pyx_k_139), 0, 0, 1, 0}, {&__pyx_n_s_14, __pyx_k_14, sizeof(__pyx_k_14), 0, 0, 1, 1}, {&__pyx_kp_s_141, __pyx_k_141, sizeof(__pyx_k_141), 0, 0, 1, 0}, {&__pyx_kp_s_143, __pyx_k_143, sizeof(__pyx_k_143), 0, 0, 1, 0}, {&__pyx_kp_s_144, __pyx_k_144, sizeof(__pyx_k_144), 0, 0, 1, 0}, {&__pyx_kp_s_145, __pyx_k_145, sizeof(__pyx_k_145), 0, 0, 1, 0}, {&__pyx_kp_s_146, __pyx_k_146, sizeof(__pyx_k_146), 0, 0, 1, 0}, {&__pyx_kp_s_147, __pyx_k_147, sizeof(__pyx_k_147), 0, 0, 1, 0}, {&__pyx_kp_s_149, __pyx_k_149, sizeof(__pyx_k_149), 0, 0, 1, 0}, {&__pyx_kp_s_150, __pyx_k_150, sizeof(__pyx_k_150), 0, 0, 1, 0}, {&__pyx_n_s_151, __pyx_k_151, sizeof(__pyx_k_151), 0, 0, 1, 1}, {&__pyx_n_s_152, __pyx_k_152, sizeof(__pyx_k_152), 0, 0, 1, 1}, {&__pyx_n_s_153, __pyx_k_153, sizeof(__pyx_k_153), 0, 0, 1, 1}, {&__pyx_n_s_154, __pyx_k_154, sizeof(__pyx_k_154), 0, 0, 1, 1}, {&__pyx_n_s_155, __pyx_k_155, sizeof(__pyx_k_155), 0, 0, 1, 1}, {&__pyx_kp_s_156, __pyx_k_156, sizeof(__pyx_k_156), 0, 0, 1, 0}, {&__pyx_kp_s_160, __pyx_k_160, sizeof(__pyx_k_160), 0, 0, 1, 0}, {&__pyx_kp_s_163, __pyx_k_163, sizeof(__pyx_k_163), 0, 0, 1, 0}, {&__pyx_kp_s_164, __pyx_k_164, sizeof(__pyx_k_164), 0, 0, 1, 0}, {&__pyx_kp_s_165, __pyx_k_165, sizeof(__pyx_k_165), 0, 0, 1, 0}, {&__pyx_kp_s_166, __pyx_k_166, sizeof(__pyx_k_166), 0, 0, 1, 0}, {&__pyx_kp_s_168, __pyx_k_168, sizeof(__pyx_k_168), 0, 0, 1, 0}, {&__pyx_kp_s_169, __pyx_k_169, sizeof(__pyx_k_169), 0, 0, 1, 0}, {&__pyx_kp_s_170, __pyx_k_170, sizeof(__pyx_k_170), 0, 0, 1, 0}, {&__pyx_kp_s_171, __pyx_k_171, sizeof(__pyx_k_171), 0, 0, 1, 0}, {&__pyx_kp_s_173, __pyx_k_173, sizeof(__pyx_k_173), 0, 0, 1, 0}, {&__pyx_kp_s_175, __pyx_k_175, sizeof(__pyx_k_175), 0, 0, 1, 0}, {&__pyx_kp_s_177, __pyx_k_177, sizeof(__pyx_k_177), 0, 0, 1, 0}, {&__pyx_kp_s_179, __pyx_k_179, sizeof(__pyx_k_179), 0, 0, 1, 0}, {&__pyx_kp_s_18, __pyx_k_18, sizeof(__pyx_k_18), 0, 0, 1, 0}, {&__pyx_kp_s_181, __pyx_k_181, sizeof(__pyx_k_181), 0, 0, 1, 0}, {&__pyx_kp_s_184, __pyx_k_184, sizeof(__pyx_k_184), 0, 0, 1, 0}, {&__pyx_kp_s_187, __pyx_k_187, sizeof(__pyx_k_187), 0, 0, 1, 0}, {&__pyx_kp_s_189, __pyx_k_189, sizeof(__pyx_k_189), 0, 0, 1, 0}, {&__pyx_kp_s_191, __pyx_k_191, sizeof(__pyx_k_191), 0, 0, 1, 0}, {&__pyx_kp_s_198, __pyx_k_198, sizeof(__pyx_k_198), 0, 0, 1, 0}, {&__pyx_kp_s_199, __pyx_k_199, sizeof(__pyx_k_199), 0, 0, 1, 0}, {&__pyx_kp_s_2, __pyx_k_2, sizeof(__pyx_k_2), 0, 0, 1, 0}, {&__pyx_kp_s_20, __pyx_k_20, sizeof(__pyx_k_20), 0, 0, 1, 0}, {&__pyx_kp_s_200, __pyx_k_200, sizeof(__pyx_k_200), 0, 0, 1, 0}, {&__pyx_kp_s_201, __pyx_k_201, sizeof(__pyx_k_201), 0, 0, 1, 0}, {&__pyx_kp_s_202, __pyx_k_202, sizeof(__pyx_k_202), 0, 0, 1, 0}, {&__pyx_kp_s_203, __pyx_k_203, sizeof(__pyx_k_203), 0, 0, 1, 0}, {&__pyx_kp_s_204, __pyx_k_204, sizeof(__pyx_k_204), 0, 0, 1, 0}, {&__pyx_kp_s_205, __pyx_k_205, sizeof(__pyx_k_205), 0, 0, 1, 0}, {&__pyx_kp_s_206, __pyx_k_206, sizeof(__pyx_k_206), 0, 0, 1, 0}, {&__pyx_kp_s_207, __pyx_k_207, sizeof(__pyx_k_207), 0, 0, 1, 0}, {&__pyx_kp_s_208, __pyx_k_208, sizeof(__pyx_k_208), 0, 0, 1, 0}, {&__pyx_kp_s_209, __pyx_k_209, sizeof(__pyx_k_209), 0, 0, 1, 0}, {&__pyx_kp_s_210, __pyx_k_210, sizeof(__pyx_k_210), 0, 0, 1, 0}, {&__pyx_kp_s_211, __pyx_k_211, sizeof(__pyx_k_211), 0, 0, 1, 0}, {&__pyx_kp_s_216, __pyx_k_216, sizeof(__pyx_k_216), 0, 0, 1, 0}, {&__pyx_kp_s_217, __pyx_k_217, sizeof(__pyx_k_217), 0, 0, 1, 0}, {&__pyx_kp_s_218, __pyx_k_218, sizeof(__pyx_k_218), 0, 0, 1, 0}, {&__pyx_kp_s_219, __pyx_k_219, sizeof(__pyx_k_219), 0, 0, 1, 0}, {&__pyx_kp_s_22, __pyx_k_22, sizeof(__pyx_k_22), 0, 0, 1, 0}, {&__pyx_kp_s_221, __pyx_k_221, sizeof(__pyx_k_221), 0, 0, 1, 0}, {&__pyx_kp_s_222, __pyx_k_222, sizeof(__pyx_k_222), 0, 0, 1, 0}, {&__pyx_kp_s_225, __pyx_k_225, sizeof(__pyx_k_225), 0, 0, 1, 0}, {&__pyx_kp_s_226, __pyx_k_226, sizeof(__pyx_k_226), 0, 0, 1, 0}, {&__pyx_kp_s_227, __pyx_k_227, sizeof(__pyx_k_227), 0, 0, 1, 0}, {&__pyx_kp_u_230, __pyx_k_230, sizeof(__pyx_k_230), 0, 1, 0, 0}, {&__pyx_kp_u_232, __pyx_k_232, sizeof(__pyx_k_232), 0, 1, 0, 0}, {&__pyx_kp_u_234, __pyx_k_234, sizeof(__pyx_k_234), 0, 1, 0, 0}, {&__pyx_kp_u_236, __pyx_k_236, sizeof(__pyx_k_236), 0, 1, 0, 0}, {&__pyx_kp_u_237, __pyx_k_237, sizeof(__pyx_k_237), 0, 1, 0, 0}, {&__pyx_kp_s_24, __pyx_k_24, sizeof(__pyx_k_24), 0, 0, 1, 0}, {&__pyx_kp_u_240, __pyx_k_240, sizeof(__pyx_k_240), 0, 1, 0, 0}, {&__pyx_n_s_242, __pyx_k_242, sizeof(__pyx_k_242), 0, 0, 1, 1}, {&__pyx_n_s_243, __pyx_k_243, sizeof(__pyx_k_243), 0, 0, 1, 1}, {&__pyx_kp_s_244, __pyx_k_244, sizeof(__pyx_k_244), 0, 0, 1, 0}, {&__pyx_n_s_245, __pyx_k_245, sizeof(__pyx_k_245), 0, 0, 1, 1}, {&__pyx_kp_s_246, __pyx_k_246, sizeof(__pyx_k_246), 0, 0, 1, 0}, {&__pyx_kp_s_251, __pyx_k_251, sizeof(__pyx_k_251), 0, 0, 1, 0}, {&__pyx_n_s_252, __pyx_k_252, sizeof(__pyx_k_252), 0, 0, 1, 1}, {&__pyx_n_s_253, __pyx_k_253, sizeof(__pyx_k_253), 0, 0, 1, 1}, {&__pyx_n_s_262, __pyx_k_262, sizeof(__pyx_k_262), 0, 0, 1, 1}, {&__pyx_n_s_266, __pyx_k_266, sizeof(__pyx_k_266), 0, 0, 1, 1}, {&__pyx_n_s_269, __pyx_k_269, sizeof(__pyx_k_269), 0, 0, 1, 1}, {&__pyx_kp_s_27, __pyx_k_27, sizeof(__pyx_k_27), 0, 0, 1, 0}, {&__pyx_n_s_272, __pyx_k_272, sizeof(__pyx_k_272), 0, 0, 1, 1}, {&__pyx_n_s_276, __pyx_k_276, sizeof(__pyx_k_276), 0, 0, 1, 1}, {&__pyx_n_s_279, __pyx_k_279, sizeof(__pyx_k_279), 0, 0, 1, 1}, {&__pyx_kp_s_28, __pyx_k_28, sizeof(__pyx_k_28), 0, 0, 1, 0}, {&__pyx_n_s_282, __pyx_k_282, sizeof(__pyx_k_282), 0, 0, 1, 1}, {&__pyx_n_s_285, __pyx_k_285, sizeof(__pyx_k_285), 0, 0, 1, 1}, {&__pyx_n_s_288, __pyx_k_288, sizeof(__pyx_k_288), 0, 0, 1, 1}, {&__pyx_kp_s_29, __pyx_k_29, sizeof(__pyx_k_29), 0, 0, 1, 0}, {&__pyx_n_s_291, __pyx_k_291, sizeof(__pyx_k_291), 0, 0, 1, 1}, {&__pyx_n_s_294, __pyx_k_294, sizeof(__pyx_k_294), 0, 0, 1, 1}, {&__pyx_n_s_297, __pyx_k_297, sizeof(__pyx_k_297), 0, 0, 1, 1}, {&__pyx_kp_s_30, __pyx_k_30, sizeof(__pyx_k_30), 0, 0, 1, 0}, {&__pyx_n_s_300, __pyx_k_300, sizeof(__pyx_k_300), 0, 0, 1, 1}, {&__pyx_n_s_304, __pyx_k_304, sizeof(__pyx_k_304), 0, 0, 1, 1}, {&__pyx_n_s_307, __pyx_k_307, sizeof(__pyx_k_307), 0, 0, 1, 1}, {&__pyx_kp_s_31, __pyx_k_31, sizeof(__pyx_k_31), 0, 0, 1, 0}, {&__pyx_n_s_310, __pyx_k_310, sizeof(__pyx_k_310), 0, 0, 1, 1}, {&__pyx_n_s_313, __pyx_k_313, sizeof(__pyx_k_313), 0, 0, 1, 1}, {&__pyx_n_s_316, __pyx_k_316, sizeof(__pyx_k_316), 0, 0, 1, 1}, {&__pyx_n_s_319, __pyx_k_319, sizeof(__pyx_k_319), 0, 0, 1, 1}, {&__pyx_n_s_322, __pyx_k_322, sizeof(__pyx_k_322), 0, 0, 1, 1}, {&__pyx_n_s_325, __pyx_k_325, sizeof(__pyx_k_325), 0, 0, 1, 1}, {&__pyx_n_s_328, __pyx_k_328, sizeof(__pyx_k_328), 0, 0, 1, 1}, {&__pyx_n_s_331, __pyx_k_331, sizeof(__pyx_k_331), 0, 0, 1, 1}, {&__pyx_n_s_334, __pyx_k_334, sizeof(__pyx_k_334), 0, 0, 1, 1}, {&__pyx_n_s_338, __pyx_k_338, sizeof(__pyx_k_338), 0, 0, 1, 1}, {&__pyx_kp_s_34, __pyx_k_34, sizeof(__pyx_k_34), 0, 0, 1, 0}, {&__pyx_n_s_341, __pyx_k_341, sizeof(__pyx_k_341), 0, 0, 1, 1}, {&__pyx_kp_s_342, __pyx_k_342, sizeof(__pyx_k_342), 0, 0, 1, 0}, {&__pyx_n_s_345, __pyx_k_345, sizeof(__pyx_k_345), 0, 0, 1, 1}, {&__pyx_n_s_348, __pyx_k_348, sizeof(__pyx_k_348), 0, 0, 1, 1}, {&__pyx_kp_s_35, __pyx_k_35, sizeof(__pyx_k_35), 0, 0, 1, 0}, {&__pyx_n_s_351, __pyx_k_351, sizeof(__pyx_k_351), 0, 0, 1, 1}, {&__pyx_n_s_354, __pyx_k_354, sizeof(__pyx_k_354), 0, 0, 1, 1}, {&__pyx_n_s_357, __pyx_k_357, sizeof(__pyx_k_357), 0, 0, 1, 1}, {&__pyx_n_s_360, __pyx_k_360, sizeof(__pyx_k_360), 0, 0, 1, 1}, {&__pyx_kp_s_361, __pyx_k_361, sizeof(__pyx_k_361), 0, 0, 1, 0}, {&__pyx_n_s_362, __pyx_k_362, sizeof(__pyx_k_362), 0, 0, 1, 1}, {&__pyx_n_s_375, __pyx_k_375, sizeof(__pyx_k_375), 0, 0, 1, 1}, {&__pyx_kp_s_38, __pyx_k_38, sizeof(__pyx_k_38), 0, 0, 1, 0}, {&__pyx_n_s_384, __pyx_k_384, sizeof(__pyx_k_384), 0, 0, 1, 1}, {&__pyx_n_s_387, __pyx_k_387, sizeof(__pyx_k_387), 0, 0, 1, 1}, {&__pyx_kp_s_40, __pyx_k_40, sizeof(__pyx_k_40), 0, 0, 1, 0}, {&__pyx_n_s_42, __pyx_k_42, sizeof(__pyx_k_42), 0, 0, 1, 1}, {&__pyx_n_s_426, __pyx_k_426, sizeof(__pyx_k_426), 0, 0, 1, 1}, {&__pyx_n_s_429, __pyx_k_429, sizeof(__pyx_k_429), 0, 0, 1, 1}, {&__pyx_kp_b_436, __pyx_k_436, sizeof(__pyx_k_436), 0, 0, 0, 0}, {&__pyx_kp_b_437, __pyx_k_437, sizeof(__pyx_k_437), 0, 0, 0, 0}, {&__pyx_kp_s_437, __pyx_k_437, sizeof(__pyx_k_437), 0, 0, 1, 0}, {&__pyx_kp_b_439, __pyx_k_439, sizeof(__pyx_k_439), 0, 0, 0, 0}, {&__pyx_kp_s_44, __pyx_k_44, sizeof(__pyx_k_44), 0, 0, 1, 0}, {&__pyx_kp_b_440, __pyx_k_440, sizeof(__pyx_k_440), 0, 0, 0, 0}, {&__pyx_kp_s_440, __pyx_k_440, sizeof(__pyx_k_440), 0, 0, 1, 0}, {&__pyx_kp_b_442, __pyx_k_442, sizeof(__pyx_k_442), 0, 0, 0, 0}, {&__pyx_kp_b_443, __pyx_k_443, sizeof(__pyx_k_443), 0, 0, 0, 0}, {&__pyx_kp_s_443, __pyx_k_443, sizeof(__pyx_k_443), 0, 0, 1, 0}, {&__pyx_kp_b_445, __pyx_k_445, sizeof(__pyx_k_445), 0, 0, 0, 0}, {&__pyx_kp_b_446, __pyx_k_446, sizeof(__pyx_k_446), 0, 0, 0, 0}, {&__pyx_kp_s_446, __pyx_k_446, sizeof(__pyx_k_446), 0, 0, 1, 0}, {&__pyx_kp_b_448, __pyx_k_448, sizeof(__pyx_k_448), 0, 0, 0, 0}, {&__pyx_kp_b_449, __pyx_k_449, sizeof(__pyx_k_449), 0, 0, 0, 0}, {&__pyx_kp_s_449, __pyx_k_449, sizeof(__pyx_k_449), 0, 0, 1, 0}, {&__pyx_kp_s_45, __pyx_k_45, sizeof(__pyx_k_45), 0, 0, 1, 0}, {&__pyx_kp_b_451, __pyx_k_451, sizeof(__pyx_k_451), 0, 0, 0, 0}, {&__pyx_kp_b_452, __pyx_k_452, sizeof(__pyx_k_452), 0, 0, 0, 0}, {&__pyx_kp_s_452, __pyx_k_452, sizeof(__pyx_k_452), 0, 0, 1, 0}, {&__pyx_n_s_458, __pyx_k_458, sizeof(__pyx_k_458), 0, 0, 1, 1}, {&__pyx_kp_s_46, __pyx_k_46, sizeof(__pyx_k_46), 0, 0, 1, 0}, {&__pyx_n_s_461, __pyx_k_461, sizeof(__pyx_k_461), 0, 0, 1, 1}, {&__pyx_n_s_465, __pyx_k_465, sizeof(__pyx_k_465), 0, 0, 1, 1}, {&__pyx_n_s_468, __pyx_k_468, sizeof(__pyx_k_468), 0, 0, 1, 1}, {&__pyx_n_s_471, __pyx_k_471, sizeof(__pyx_k_471), 0, 0, 1, 1}, {&__pyx_n_s_474, __pyx_k_474, sizeof(__pyx_k_474), 0, 0, 1, 1}, {&__pyx_n_s_477, __pyx_k_477, sizeof(__pyx_k_477), 0, 0, 1, 1}, {&__pyx_kp_s_48, __pyx_k_48, sizeof(__pyx_k_48), 0, 0, 1, 0}, {&__pyx_n_s_480, __pyx_k_480, sizeof(__pyx_k_480), 0, 0, 1, 1}, {&__pyx_n_s_483, __pyx_k_483, sizeof(__pyx_k_483), 0, 0, 1, 1}, {&__pyx_kp_s_484, __pyx_k_484, sizeof(__pyx_k_484), 0, 0, 1, 0}, {&__pyx_n_s_488, __pyx_k_488, sizeof(__pyx_k_488), 0, 0, 1, 1}, {&__pyx_n_s_491, __pyx_k_491, sizeof(__pyx_k_491), 0, 0, 1, 1}, {&__pyx_n_s_492, __pyx_k_492, sizeof(__pyx_k_492), 0, 0, 1, 1}, {&__pyx_n_s_495, __pyx_k_495, sizeof(__pyx_k_495), 0, 0, 1, 1}, {&__pyx_n_s_498, __pyx_k_498, sizeof(__pyx_k_498), 0, 0, 1, 1}, {&__pyx_kp_s_499, __pyx_k_499, sizeof(__pyx_k_499), 0, 0, 1, 0}, {&__pyx_kp_s_5, __pyx_k_5, sizeof(__pyx_k_5), 0, 0, 1, 0}, {&__pyx_kp_s_50, __pyx_k_50, sizeof(__pyx_k_50), 0, 0, 1, 0}, {&__pyx_kp_s_52, __pyx_k_52, sizeof(__pyx_k_52), 0, 0, 1, 0}, {&__pyx_n_s_54, __pyx_k_54, sizeof(__pyx_k_54), 0, 0, 1, 1}, {&__pyx_n_s_55, __pyx_k_55, sizeof(__pyx_k_55), 0, 0, 1, 1}, {&__pyx_kp_s_56, __pyx_k_56, sizeof(__pyx_k_56), 0, 0, 1, 0}, {&__pyx_kp_s_62, __pyx_k_62, sizeof(__pyx_k_62), 0, 0, 1, 0}, {&__pyx_n_s_64, __pyx_k_64, sizeof(__pyx_k_64), 0, 0, 1, 1}, {&__pyx_kp_s_65, __pyx_k_65, sizeof(__pyx_k_65), 0, 0, 1, 0}, {&__pyx_kp_s_68, __pyx_k_68, sizeof(__pyx_k_68), 0, 0, 1, 0}, {&__pyx_kp_s_7, __pyx_k_7, sizeof(__pyx_k_7), 0, 0, 1, 0}, {&__pyx_kp_s_72, __pyx_k_72, sizeof(__pyx_k_72), 0, 0, 1, 0}, {&__pyx_n_s_74, __pyx_k_74, sizeof(__pyx_k_74), 0, 0, 1, 1}, {&__pyx_kp_s_75, __pyx_k_75, sizeof(__pyx_k_75), 0, 0, 1, 0}, {&__pyx_kp_s_78, __pyx_k_78, sizeof(__pyx_k_78), 0, 0, 1, 0}, {&__pyx_kp_s_79, __pyx_k_79, sizeof(__pyx_k_79), 0, 0, 1, 0}, {&__pyx_kp_s_8, __pyx_k_8, sizeof(__pyx_k_8), 0, 0, 1, 0}, {&__pyx_kp_s_80, __pyx_k_80, sizeof(__pyx_k_80), 0, 0, 1, 0}, {&__pyx_kp_s_81, __pyx_k_81, sizeof(__pyx_k_81), 0, 0, 1, 0}, {&__pyx_kp_s_82, __pyx_k_82, sizeof(__pyx_k_82), 0, 0, 1, 0}, {&__pyx_kp_s_83, __pyx_k_83, sizeof(__pyx_k_83), 0, 0, 1, 0}, {&__pyx_kp_s_85, __pyx_k_85, sizeof(__pyx_k_85), 0, 0, 1, 0}, {&__pyx_kp_s_86, __pyx_k_86, sizeof(__pyx_k_86), 0, 0, 1, 0}, {&__pyx_kp_s_87, __pyx_k_87, sizeof(__pyx_k_87), 0, 0, 1, 0}, {&__pyx_kp_s_88, __pyx_k_88, sizeof(__pyx_k_88), 0, 0, 1, 0}, {&__pyx_kp_s_9, __pyx_k_9, sizeof(__pyx_k_9), 0, 0, 1, 0}, {&__pyx_kp_s_91, __pyx_k_91, sizeof(__pyx_k_91), 0, 0, 1, 0}, {&__pyx_kp_s_92, __pyx_k_92, sizeof(__pyx_k_92), 0, 0, 1, 0}, {&__pyx_n_s_94, __pyx_k_94, sizeof(__pyx_k_94), 0, 0, 1, 1}, {&__pyx_kp_s_95, __pyx_k_95, sizeof(__pyx_k_95), 0, 0, 1, 0}, {&__pyx_kp_s_98, __pyx_k_98, sizeof(__pyx_k_98), 0, 0, 1, 0}, {&__pyx_kp_s__0, __pyx_k__0, sizeof(__pyx_k__0), 0, 0, 1, 0}, {&__pyx_kp_s__00, __pyx_k__00, sizeof(__pyx_k__00), 0, 0, 1, 0}, {&__pyx_kp_s__03, __pyx_k__03, sizeof(__pyx_k__03), 0, 0, 1, 0}, {&__pyx_kp_s__10, __pyx_k__10, sizeof(__pyx_k__10), 0, 0, 1, 0}, {&__pyx_kp_s__11, __pyx_k__11, sizeof(__pyx_k__11), 0, 0, 1, 0}, {&__pyx_kp_s__17, __pyx_k__17, sizeof(__pyx_k__17), 0, 0, 1, 0}, {&__pyx_kp_s__1999, __pyx_k__1999, sizeof(__pyx_k__1999), 0, 0, 1, 0}, {&__pyx_kp_s__2, __pyx_k__2, sizeof(__pyx_k__2), 0, 0, 1, 0}, {&__pyx_kp_s__22, __pyx_k__22, sizeof(__pyx_k__22), 0, 0, 1, 0}, {&__pyx_kp_s__3, __pyx_k__3, sizeof(__pyx_k__3), 0, 0, 1, 0}, {&__pyx_kp_s__44, __pyx_k__44, sizeof(__pyx_k__44), 0, 0, 1, 0}, {&__pyx_kp_s__55, __pyx_k__55, sizeof(__pyx_k__55), 0, 0, 1, 0}, {&__pyx_kp_s__76, __pyx_k__76, sizeof(__pyx_k__76), 0, 0, 1, 0}, {&__pyx_kp_s__99, __pyx_k__99, sizeof(__pyx_k__99), 0, 0, 1, 0}, {&__pyx_n_s__A, __pyx_k__A, sizeof(__pyx_k__A), 0, 0, 1, 1}, {&__pyx_n_s__AmbiguousTimeError, __pyx_k__AmbiguousTimeError, sizeof(__pyx_k__AmbiguousTimeError), 0, 0, 1, 1}, {&__pyx_n_s__AttributeError, __pyx_k__AttributeError, sizeof(__pyx_k__AttributeError), 0, 0, 1, 1}, {&__pyx_n_s__B, __pyx_k__B, sizeof(__pyx_k__B), 0, 0, 1, 1}, {&__pyx_n_s__D, __pyx_k__D, sizeof(__pyx_k__D), 0, 0, 1, 1}, {&__pyx_n_s__D_RESO, __pyx_k__D_RESO, sizeof(__pyx_k__D_RESO), 0, 0, 1, 1}, {&__pyx_n_s__Exception, __pyx_k__Exception, sizeof(__pyx_k__Exception), 0, 0, 1, 1}, {&__pyx_n_s__H, __pyx_k__H, sizeof(__pyx_k__H), 0, 0, 1, 1}, {&__pyx_n_s__H_RESO, __pyx_k__H_RESO, sizeof(__pyx_k__H_RESO), 0, 0, 1, 1}, {&__pyx_n_s__I, __pyx_k__I, sizeof(__pyx_k__I), 0, 0, 1, 1}, {&__pyx_n_s__IGNORECASE, __pyx_k__IGNORECASE, sizeof(__pyx_k__IGNORECASE), 0, 0, 1, 1}, {&__pyx_n_s__IndexError, __pyx_k__IndexError, sizeof(__pyx_k__IndexError), 0, 0, 1, 1}, {&__pyx_n_s__KeyError, __pyx_k__KeyError, sizeof(__pyx_k__KeyError), 0, 0, 1, 1}, {&__pyx_n_s__LC_TIME, __pyx_k__LC_TIME, sizeof(__pyx_k__LC_TIME), 0, 0, 1, 1}, {&__pyx_n_s__LC_date, __pyx_k__LC_date, sizeof(__pyx_k__LC_date), 0, 0, 1, 1}, {&__pyx_n_s__LC_date_time, __pyx_k__LC_date_time, sizeof(__pyx_k__LC_date_time), 0, 0, 1, 1}, {&__pyx_n_s__LC_time, __pyx_k__LC_time, sizeof(__pyx_k__LC_time), 0, 0, 1, 1}, {&__pyx_n_s__LocaleTime, __pyx_k__LocaleTime, sizeof(__pyx_k__LocaleTime), 0, 0, 1, 1}, {&__pyx_n_s__LooseVersion, __pyx_k__LooseVersion, sizeof(__pyx_k__LooseVersion), 0, 0, 1, 1}, {&__pyx_n_s__M, __pyx_k__M, sizeof(__pyx_k__M), 0, 0, 1, 1}, {&__pyx_n_s__M8, __pyx_k__M8, sizeof(__pyx_k__M8), 0, 0, 1, 1}, {&__pyx_n_s__NAN, __pyx_k__NAN, sizeof(__pyx_k__NAN), 0, 0, 1, 1}, {&__pyx_n_s__NAT, __pyx_k__NAT, sizeof(__pyx_k__NAT), 0, 0, 1, 1}, {&__pyx_n_s__NaN, __pyx_k__NaN, sizeof(__pyx_k__NaN), 0, 0, 1, 1}, {&__pyx_n_s__NaT, __pyx_k__NaT, sizeof(__pyx_k__NaT), 0, 0, 1, 1}, {&__pyx_n_s__NaTType, __pyx_k__NaTType, sizeof(__pyx_k__NaTType), 0, 0, 1, 1}, {&__pyx_n_s__NameError, __pyx_k__NameError, sizeof(__pyx_k__NameError), 0, 0, 1, 1}, {&__pyx_n_s__None, __pyx_k__None, sizeof(__pyx_k__None), 0, 0, 1, 1}, {&__pyx_n_s__OutOfBoundsDatetime, __pyx_k__OutOfBoundsDatetime, sizeof(__pyx_k__OutOfBoundsDatetime), 0, 0, 1, 1}, {&__pyx_n_s__P, __pyx_k__P, sizeof(__pyx_k__P), 0, 0, 1, 1}, {&__pyx_n_s__Period, __pyx_k__Period, sizeof(__pyx_k__Period), 0, 0, 1, 1}, {&__pyx_n_s__RuntimeError, __pyx_k__RuntimeError, sizeof(__pyx_k__RuntimeError), 0, 0, 1, 1}, {&__pyx_n_s__S, __pyx_k__S, sizeof(__pyx_k__S), 0, 0, 1, 1}, {&__pyx_n_s__S_RESO, __pyx_k__S_RESO, sizeof(__pyx_k__S_RESO), 0, 0, 1, 1}, {&__pyx_n_s__T, __pyx_k__T, sizeof(__pyx_k__T), 0, 0, 1, 1}, {&__pyx_n_s__T_RESO, __pyx_k__T_RESO, sizeof(__pyx_k__T_RESO), 0, 0, 1, 1}, {&__pyx_n_s__TimeRE, __pyx_k__TimeRE, sizeof(__pyx_k__TimeRE), 0, 0, 1, 1}, {&__pyx_n_s__Timestamp, __pyx_k__Timestamp, sizeof(__pyx_k__Timestamp), 0, 0, 1, 1}, {&__pyx_n_s__TypeError, __pyx_k__TypeError, sizeof(__pyx_k__TypeError), 0, 0, 1, 1}, {&__pyx_n_s__U, __pyx_k__U, sizeof(__pyx_k__U), 0, 0, 1, 1}, {&__pyx_n_s__US_RESO, __pyx_k__US_RESO, sizeof(__pyx_k__US_RESO), 0, 0, 1, 1}, {&__pyx_n_s__UTC, __pyx_k__UTC, sizeof(__pyx_k__UTC), 0, 0, 1, 1}, {&__pyx_n_s__U_W, __pyx_k__U_W, sizeof(__pyx_k__U_W), 0, 0, 1, 1}, {&__pyx_n_s__ValueError, __pyx_k__ValueError, sizeof(__pyx_k__ValueError), 0, 0, 1, 1}, {&__pyx_n_s__W, __pyx_k__W, sizeof(__pyx_k__W), 0, 0, 1, 1}, {&__pyx_n_s__X, __pyx_k__X, sizeof(__pyx_k__X), 0, 0, 1, 1}, {&__pyx_n_s__Y, __pyx_k__Y, sizeof(__pyx_k__Y), 0, 0, 1, 1}, {&__pyx_n_s__Z, __pyx_k__Z, sizeof(__pyx_k__Z), 0, 0, 1, 1}, {&__pyx_n_s___CACHE_MAX_SIZE, __pyx_k___CACHE_MAX_SIZE, sizeof(__pyx_k___CACHE_MAX_SIZE), 0, 0, 1, 1}, {&__pyx_n_s___LocaleTime__pad, __pyx_k___LocaleTime__pad, sizeof(__pyx_k___LocaleTime__pad), 0, 0, 1, 1}, {&__pyx_n_s___TimeRE__seqToRE, __pyx_k___TimeRE__seqToRE, sizeof(__pyx_k___TimeRE__seqToRE), 0, 0, 1, 1}, {&__pyx_n_s___TimeRE_cache, __pyx_k___TimeRE_cache, sizeof(__pyx_k___TimeRE_cache), 0, 0, 1, 1}, {&__pyx_n_s____add__, __pyx_k____add__, sizeof(__pyx_k____add__), 0, 0, 1, 1}, {&__pyx_n_s____all__, __pyx_k____all__, sizeof(__pyx_k____all__), 0, 0, 1, 1}, {&__pyx_n_s____calc_am_pm, __pyx_k____calc_am_pm, sizeof(__pyx_k____calc_am_pm), 0, 0, 1, 1}, {&__pyx_n_s____calc_date_time, __pyx_k____calc_date_time, sizeof(__pyx_k____calc_date_time), 0, 0, 1, 1}, {&__pyx_n_s____calc_month, __pyx_k____calc_month, sizeof(__pyx_k____calc_month), 0, 0, 1, 1}, {&__pyx_n_s____calc_timezone, __pyx_k____calc_timezone, sizeof(__pyx_k____calc_timezone), 0, 0, 1, 1}, {&__pyx_n_s____calc_weekday, __pyx_k____calc_weekday, sizeof(__pyx_k____calc_weekday), 0, 0, 1, 1}, {&__pyx_n_s____class__, __pyx_k____class__, sizeof(__pyx_k____class__), 0, 0, 1, 1}, {&__pyx_n_s____enter__, __pyx_k____enter__, sizeof(__pyx_k____enter__), 0, 0, 1, 1}, {&__pyx_n_s____exit__, __pyx_k____exit__, sizeof(__pyx_k____exit__), 0, 0, 1, 1}, {&__pyx_n_s____getitem__, __pyx_k____getitem__, sizeof(__pyx_k____getitem__), 0, 0, 1, 1}, {&__pyx_n_s____hash__, __pyx_k____hash__, sizeof(__pyx_k____hash__), 0, 0, 1, 1}, {&__pyx_n_s____import__, __pyx_k____import__, sizeof(__pyx_k____import__), 0, 0, 1, 1}, {&__pyx_n_s____init__, __pyx_k____init__, sizeof(__pyx_k____init__), 0, 0, 1, 1}, {&__pyx_n_s____main__, __pyx_k____main__, sizeof(__pyx_k____main__), 0, 0, 1, 1}, {&__pyx_n_s____metaclass__, __pyx_k____metaclass__, sizeof(__pyx_k____metaclass__), 0, 0, 1, 1}, {&__pyx_n_s____module__, __pyx_k____module__, sizeof(__pyx_k____module__), 0, 0, 1, 1}, {&__pyx_n_s____name__, __pyx_k____name__, sizeof(__pyx_k____name__), 0, 0, 1, 1}, {&__pyx_n_s____new__, __pyx_k____new__, sizeof(__pyx_k____new__), 0, 0, 1, 1}, {&__pyx_n_s____pad, __pyx_k____pad, sizeof(__pyx_k____pad), 0, 0, 1, 1}, {&__pyx_n_s____pyx_getbuffer, __pyx_k____pyx_getbuffer, sizeof(__pyx_k____pyx_getbuffer), 0, 0, 1, 1}, {&__pyx_n_s____pyx_releasebuffer, __pyx_k____pyx_releasebuffer, sizeof(__pyx_k____pyx_releasebuffer), 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____qualname__, __pyx_k____qualname__, sizeof(__pyx_k____qualname__), 0, 0, 1, 1}, {&__pyx_n_s____reduce__, __pyx_k____reduce__, sizeof(__pyx_k____reduce__), 0, 0, 1, 1}, {&__pyx_n_s____repr__, __pyx_k____repr__, sizeof(__pyx_k____repr__), 0, 0, 1, 1}, {&__pyx_n_s____seqToRE, __pyx_k____seqToRE, sizeof(__pyx_k____seqToRE), 0, 0, 1, 1}, {&__pyx_n_s____setitem__, __pyx_k____setitem__, sizeof(__pyx_k____setitem__), 0, 0, 1, 1}, {&__pyx_n_s____setstate__, __pyx_k____setstate__, sizeof(__pyx_k____setstate__), 0, 0, 1, 1}, {&__pyx_n_s____str__, __pyx_k____str__, sizeof(__pyx_k____str__), 0, 0, 1, 1}, {&__pyx_n_s____sub__, __pyx_k____sub__, sizeof(__pyx_k____sub__), 0, 0, 1, 1}, {&__pyx_n_s____test__, __pyx_k____test__, sizeof(__pyx_k____test__), 0, 0, 1, 1}, {&__pyx_n_s___cache_lock, __pyx_k___cache_lock, sizeof(__pyx_k___cache_lock), 0, 0, 1, 1}, {&__pyx_n_s___date_repr, __pyx_k___date_repr, sizeof(__pyx_k___date_repr), 0, 0, 1, 1}, {&__pyx_n_s___du_utc, __pyx_k___du_utc, sizeof(__pyx_k___du_utc), 0, 0, 1, 1}, {&__pyx_n_s___dummy_thread, __pyx_k___dummy_thread, sizeof(__pyx_k___dummy_thread), 0, 0, 1, 1}, {&__pyx_n_s___get_deltas, __pyx_k___get_deltas, sizeof(__pyx_k___get_deltas), 0, 0, 1, 1}, {&__pyx_n_s___get_field, __pyx_k___get_field, sizeof(__pyx_k___get_field), 0, 0, 1, 1}, {&__pyx_n_s___get_transitions, __pyx_k___get_transitions, sizeof(__pyx_k___get_transitions), 0, 0, 1, 1}, {&__pyx_n_s___getlang, __pyx_k___getlang, sizeof(__pyx_k___getlang), 0, 0, 1, 1}, {&__pyx_n_s___has_time_component, __pyx_k___has_time_component, sizeof(__pyx_k___has_time_component), 0, 0, 1, 1}, {&__pyx_n_s___is_fixed_offset, __pyx_k___is_fixed_offset, sizeof(__pyx_k___is_fixed_offset), 0, 0, 1, 1}, {&__pyx_n_s___is_tzlocal, __pyx_k___is_tzlocal, sizeof(__pyx_k___is_tzlocal), 0, 0, 1, 1}, {&__pyx_n_s___month_offset, __pyx_k___month_offset, sizeof(__pyx_k___month_offset), 0, 0, 1, 1}, {&__pyx_n_s___nat_strings, __pyx_k___nat_strings, sizeof(__pyx_k___nat_strings), 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___parse_code_table, __pyx_k___parse_code_table, sizeof(__pyx_k___parse_code_table), 0, 0, 1, 1}, {&__pyx_n_s___regex_cache, __pyx_k___regex_cache, sizeof(__pyx_k___regex_cache), 0, 0, 1, 1}, {&__pyx_n_s___repr_base, __pyx_k___repr_base, sizeof(__pyx_k___repr_base), 0, 0, 1, 1}, {&__pyx_n_s___thread, __pyx_k___thread, sizeof(__pyx_k___thread), 0, 0, 1, 1}, {&__pyx_n_s___time_repr, __pyx_k___time_repr, sizeof(__pyx_k___time_repr), 0, 0, 1, 1}, {&__pyx_n_s___transition_info, __pyx_k___transition_info, sizeof(__pyx_k___transition_info), 0, 0, 1, 1}, {&__pyx_n_s___ts, __pyx_k___ts, sizeof(__pyx_k___ts), 0, 0, 1, 1}, {&__pyx_n_s___tzinfos, __pyx_k___tzinfos, sizeof(__pyx_k___tzinfos), 0, 0, 1, 1}, {&__pyx_n_s___utcoffset, __pyx_k___utcoffset, sizeof(__pyx_k___utcoffset), 0, 0, 1, 1}, {&__pyx_n_s___zero_time, __pyx_k___zero_time, sizeof(__pyx_k___zero_time), 0, 0, 1, 1}, {&__pyx_n_s__a, __pyx_k__a, sizeof(__pyx_k__a), 0, 0, 1, 1}, {&__pyx_n_s__a_idx, __pyx_k__a_idx, sizeof(__pyx_k__a_idx), 0, 0, 1, 1}, {&__pyx_n_s__a_month, __pyx_k__a_month, sizeof(__pyx_k__a_month), 0, 0, 1, 1}, {&__pyx_n_s__a_weekday, __pyx_k__a_weekday, sizeof(__pyx_k__a_weekday), 0, 0, 1, 1}, {&__pyx_n_s__abs, __pyx_k__abs, sizeof(__pyx_k__abs), 0, 0, 1, 1}, {&__pyx_n_s__all, __pyx_k__all, sizeof(__pyx_k__all), 0, 0, 1, 1}, {&__pyx_n_s__allocate_lock, __pyx_k__allocate_lock, sizeof(__pyx_k__allocate_lock), 0, 0, 1, 1}, {&__pyx_n_s__am_pm, __pyx_k__am_pm, sizeof(__pyx_k__am_pm), 0, 0, 1, 1}, {&__pyx_n_s__ampm, __pyx_k__ampm, sizeof(__pyx_k__ampm), 0, 0, 1, 1}, {&__pyx_n_s__append, __pyx_k__append, sizeof(__pyx_k__append), 0, 0, 1, 1}, {&__pyx_n_s__apply, __pyx_k__apply, sizeof(__pyx_k__apply), 0, 0, 1, 1}, {&__pyx_n_s__apply_offset, __pyx_k__apply_offset, sizeof(__pyx_k__apply_offset), 0, 0, 1, 1}, {&__pyx_n_s__args, __pyx_k__args, sizeof(__pyx_k__args), 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_split, __pyx_k__array_split, sizeof(__pyx_k__array_split), 0, 0, 1, 1}, {&__pyx_n_s__array_strptime, __pyx_k__array_strptime, sizeof(__pyx_k__array_strptime), 0, 0, 1, 1}, {&__pyx_n_s__array_to_datetime, __pyx_k__array_to_datetime, sizeof(__pyx_k__array_to_datetime), 0, 0, 1, 1}, {&__pyx_n_s__asm8, __pyx_k__asm8, sizeof(__pyx_k__asm8), 0, 0, 1, 1}, {&__pyx_n_s__astimezone, __pyx_k__astimezone, sizeof(__pyx_k__astimezone), 0, 0, 1, 1}, {&__pyx_n_s__astype, __pyx_k__astype, sizeof(__pyx_k__astype), 0, 0, 1, 1}, {&__pyx_n_s__b, __pyx_k__b, sizeof(__pyx_k__b), 0, 0, 1, 1}, {&__pyx_n_s__b_idx, __pyx_k__b_idx, sizeof(__pyx_k__b_idx), 0, 0, 1, 1}, {&__pyx_n_s__bad_directive, __pyx_k__bad_directive, sizeof(__pyx_k__bad_directive), 0, 0, 1, 1}, {&__pyx_n_s__base, __pyx_k__base, sizeof(__pyx_k__base), 0, 0, 1, 1}, {&__pyx_n_s__base1, __pyx_k__base1, sizeof(__pyx_k__base1), 0, 0, 1, 1}, {&__pyx_n_s__base2, __pyx_k__base2, sizeof(__pyx_k__base2), 0, 0, 1, 1}, {&__pyx_n_s__basestring, __pyx_k__basestring, sizeof(__pyx_k__basestring), 0, 0, 1, 1}, {&__pyx_n_s__both_eq, __pyx_k__both_eq, sizeof(__pyx_k__both_eq), 0, 0, 1, 1}, {&__pyx_n_s__both_nat, __pyx_k__both_nat, sizeof(__pyx_k__both_nat), 0, 0, 1, 1}, {&__pyx_n_s__boxed, __pyx_k__boxed, sizeof(__pyx_k__boxed), 0, 0, 1, 1}, {&__pyx_n_s__build_field_sarray, __pyx_k__build_field_sarray, sizeof(__pyx_k__build_field_sarray), 0, 0, 1, 1}, {&__pyx_n_s__c, __pyx_k__c, sizeof(__pyx_k__c), 0, 0, 1, 1}, {&__pyx_n_s__calendar, __pyx_k__calendar, sizeof(__pyx_k__calendar), 0, 0, 1, 1}, {&__pyx_n_s__cast_to_nanoseconds, __pyx_k__cast_to_nanoseconds, sizeof(__pyx_k__cast_to_nanoseconds), 0, 0, 1, 1}, {&__pyx_n_s__clear, __pyx_k__clear, sizeof(__pyx_k__clear), 0, 0, 1, 1}, {&__pyx_n_s__close, __pyx_k__close, sizeof(__pyx_k__close), 0, 0, 1, 1}, {&__pyx_n_s__cls, __pyx_k__cls, sizeof(__pyx_k__cls), 0, 0, 1, 1}, {&__pyx_n_s__code, __pyx_k__code, sizeof(__pyx_k__code), 0, 0, 1, 1}, {&__pyx_n_s__coerce, __pyx_k__coerce, sizeof(__pyx_k__coerce), 0, 0, 1, 1}, {&__pyx_n_s__combine, __pyx_k__combine, sizeof(__pyx_k__combine), 0, 0, 1, 1}, {&__pyx_n_s__compat_NaT, __pyx_k__compat_NaT, sizeof(__pyx_k__compat_NaT), 0, 0, 1, 1}, {&__pyx_n_s__compile, __pyx_k__compile, sizeof(__pyx_k__compile), 0, 0, 1, 1}, {&__pyx_n_s__count, __pyx_k__count, sizeof(__pyx_k__count), 0, 0, 1, 1}, {&__pyx_n_s__current_format, __pyx_k__current_format, sizeof(__pyx_k__current_format), 0, 0, 1, 1}, {&__pyx_n_s__d, __pyx_k__d, sizeof(__pyx_k__d), 0, 0, 1, 1}, {&__pyx_n_s__date, __pyx_k__date, sizeof(__pyx_k__date), 0, 0, 1, 1}, {&__pyx_n_s__date_normalize, __pyx_k__date_normalize, sizeof(__pyx_k__date_normalize), 0, 0, 1, 1}, {&__pyx_n_s__date_string, __pyx_k__date_string, sizeof(__pyx_k__date_string), 0, 0, 1, 1}, {&__pyx_n_s__date_time, __pyx_k__date_time, sizeof(__pyx_k__date_time), 0, 0, 1, 1}, {&__pyx_n_s__dates_normalized, __pyx_k__dates_normalized, sizeof(__pyx_k__dates_normalized), 0, 0, 1, 1}, {&__pyx_n_s__datetime, __pyx_k__datetime, sizeof(__pyx_k__datetime), 0, 0, 1, 1}, {&__pyx_n_s__datetime64, __pyx_k__datetime64, sizeof(__pyx_k__datetime64), 0, 0, 1, 1}, {&__pyx_n_s__datetime_date, __pyx_k__datetime_date, sizeof(__pyx_k__datetime_date), 0, 0, 1, 1}, {&__pyx_n_s__datetime_result, __pyx_k__datetime_result, sizeof(__pyx_k__datetime_result), 0, 0, 1, 1}, {&__pyx_n_s__datetime_time, __pyx_k__datetime_time, sizeof(__pyx_k__datetime_time), 0, 0, 1, 1}, {&__pyx_n_s__day, __pyx_k__day, sizeof(__pyx_k__day), 0, 0, 1, 1}, {&__pyx_n_s__day_abbr, __pyx_k__day_abbr, sizeof(__pyx_k__day_abbr), 0, 0, 1, 1}, {&__pyx_n_s__day_name, __pyx_k__day_name, sizeof(__pyx_k__day_name), 0, 0, 1, 1}, {&__pyx_n_s__day_of_week, __pyx_k__day_of_week, sizeof(__pyx_k__day_of_week), 0, 0, 1, 1}, {&__pyx_n_s__dayfirst, __pyx_k__dayfirst, sizeof(__pyx_k__dayfirst), 0, 0, 1, 1}, {&__pyx_n_s__daylight, __pyx_k__daylight, sizeof(__pyx_k__daylight), 0, 0, 1, 1}, {&__pyx_n_s__dayofweek, __pyx_k__dayofweek, sizeof(__pyx_k__dayofweek), 0, 0, 1, 1}, {&__pyx_n_s__dayofyear, __pyx_k__dayofyear, sizeof(__pyx_k__dayofyear), 0, 0, 1, 1}, {&__pyx_n_s__days, __pyx_k__days, sizeof(__pyx_k__days), 0, 0, 1, 1}, {&__pyx_n_s__days_to_week, __pyx_k__days_to_week, sizeof(__pyx_k__days_to_week), 0, 0, 1, 1}, {&__pyx_n_s__decode, __pyx_k__decode, sizeof(__pyx_k__decode), 0, 0, 1, 1}, {&__pyx_n_s__delta, __pyx_k__delta, sizeof(__pyx_k__delta), 0, 0, 1, 1}, {&__pyx_n_s__deltas, __pyx_k__deltas, sizeof(__pyx_k__deltas), 0, 0, 1, 1}, {&__pyx_n_s__diff, __pyx_k__diff, sizeof(__pyx_k__diff), 0, 0, 1, 1}, {&__pyx_n_s__directive, __pyx_k__directive, sizeof(__pyx_k__directive), 0, 0, 1, 1}, {&__pyx_n_s__directive_index, __pyx_k__directive_index, sizeof(__pyx_k__directive_index), 0, 0, 1, 1}, {&__pyx_n_s__dow, __pyx_k__dow, sizeof(__pyx_k__dow), 0, 0, 1, 1}, {&__pyx_n_s__doy, __pyx_k__doy, sizeof(__pyx_k__doy), 0, 0, 1, 1}, {&__pyx_n_s__dst_hours, __pyx_k__dst_hours, sizeof(__pyx_k__dst_hours), 0, 0, 1, 1}, {&__pyx_n_s__dt, __pyx_k__dt, sizeof(__pyx_k__dt), 0, 0, 1, 1}, {&__pyx_n_s__dtarr, __pyx_k__dtarr, sizeof(__pyx_k__dtarr), 0, 0, 1, 1}, {&__pyx_n_s__dtindex, __pyx_k__dtindex, sizeof(__pyx_k__dtindex), 0, 0, 1, 1}, {&__pyx_n_s__dts, __pyx_k__dts, sizeof(__pyx_k__dts), 0, 0, 1, 1}, {&__pyx_n_s__dtype, __pyx_k__dtype, sizeof(__pyx_k__dtype), 0, 0, 1, 1}, {&__pyx_n_s__dummy_thread, __pyx_k__dummy_thread, sizeof(__pyx_k__dummy_thread), 0, 0, 1, 1}, {&__pyx_n_s__empty, __pyx_k__empty, sizeof(__pyx_k__empty), 0, 0, 1, 1}, {&__pyx_n_s__encode, __pyx_k__encode, sizeof(__pyx_k__encode), 0, 0, 1, 1}, {&__pyx_n_s__end, __pyx_k__end, sizeof(__pyx_k__end), 0, 0, 1, 1}, {&__pyx_n_s__enumerate, __pyx_k__enumerate, sizeof(__pyx_k__enumerate), 0, 0, 1, 1}, {&__pyx_n_s__err, __pyx_k__err, sizeof(__pyx_k__err), 0, 0, 1, 1}, {&__pyx_n_s__escape, __pyx_k__escape, sizeof(__pyx_k__escape), 0, 0, 1, 1}, {&__pyx_n_s__extend, __pyx_k__extend, sizeof(__pyx_k__extend), 0, 0, 1, 1}, {&__pyx_n_s__extract_ordinals, __pyx_k__extract_ordinals, sizeof(__pyx_k__extract_ordinals), 0, 0, 1, 1}, {&__pyx_n_s__f, __pyx_k__f, sizeof(__pyx_k__f), 0, 0, 1, 1}, {&__pyx_n_s__f_month, __pyx_k__f_month, sizeof(__pyx_k__f_month), 0, 0, 1, 1}, {&__pyx_n_s__f_weekday, __pyx_k__f_weekday, sizeof(__pyx_k__f_weekday), 0, 0, 1, 1}, {&__pyx_n_s__fget, __pyx_k__fget, sizeof(__pyx_k__fget), 0, 0, 1, 1}, {&__pyx_n_s__field, __pyx_k__field, sizeof(__pyx_k__field), 0, 0, 1, 1}, {&__pyx_n_s__fields, __pyx_k__fields, sizeof(__pyx_k__fields), 0, 0, 1, 1}, {&__pyx_n_s__file, __pyx_k__file, sizeof(__pyx_k__file), 0, 0, 1, 1}, {&__pyx_n_s__fill, __pyx_k__fill, sizeof(__pyx_k__fill), 0, 0, 1, 1}, {&__pyx_n_s__finfo, __pyx_k__finfo, sizeof(__pyx_k__finfo), 0, 0, 1, 1}, {&__pyx_n_s__first_weekday, __pyx_k__first_weekday, sizeof(__pyx_k__first_weekday), 0, 0, 1, 1}, {&__pyx_n_s__flat, __pyx_k__flat, sizeof(__pyx_k__flat), 0, 0, 1, 1}, {&__pyx_n_s__fmt, __pyx_k__fmt, sizeof(__pyx_k__fmt), 0, 0, 1, 1}, {&__pyx_n_s__format, __pyx_k__format, sizeof(__pyx_k__format), 0, 0, 1, 1}, {&__pyx_n_s__format_regex, __pyx_k__format_regex, sizeof(__pyx_k__format_regex), 0, 0, 1, 1}, {&__pyx_n_s__found, __pyx_k__found, sizeof(__pyx_k__found), 0, 0, 1, 1}, {&__pyx_n_s__found_dict, __pyx_k__found_dict, sizeof(__pyx_k__found_dict), 0, 0, 1, 1}, {&__pyx_n_s__found_zone, __pyx_k__found_zone, sizeof(__pyx_k__found_zone), 0, 0, 1, 1}, {&__pyx_n_s__frac, __pyx_k__frac, sizeof(__pyx_k__frac), 0, 0, 1, 1}, {&__pyx_n_s__fraction, __pyx_k__fraction, sizeof(__pyx_k__fraction), 0, 0, 1, 1}, {&__pyx_n_s__freq, __pyx_k__freq, sizeof(__pyx_k__freq), 0, 0, 1, 1}, {&__pyx_n_s__freq1, __pyx_k__freq1, sizeof(__pyx_k__freq1), 0, 0, 1, 1}, {&__pyx_n_s__freq2, __pyx_k__freq2, sizeof(__pyx_k__freq2), 0, 0, 1, 1}, {&__pyx_n_s__freq_group, __pyx_k__freq_group, sizeof(__pyx_k__freq_group), 0, 0, 1, 1}, {&__pyx_n_s__freqstr, __pyx_k__freqstr, sizeof(__pyx_k__freqstr), 0, 0, 1, 1}, {&__pyx_n_s__fromordinal, __pyx_k__fromordinal, sizeof(__pyx_k__fromordinal), 0, 0, 1, 1}, {&__pyx_n_s__front, __pyx_k__front, sizeof(__pyx_k__front), 0, 0, 1, 1}, {&__pyx_n_s__func, __pyx_k__func, sizeof(__pyx_k__func), 0, 0, 1, 1}, {&__pyx_n_s__genexpr, __pyx_k__genexpr, sizeof(__pyx_k__genexpr), 0, 0, 1, 1}, {&__pyx_n_s__get, __pyx_k__get, sizeof(__pyx_k__get), 0, 0, 1, 1}, {&__pyx_n_s__get_date_field, __pyx_k__get_date_field, sizeof(__pyx_k__get_date_field), 0, 0, 1, 1}, {&__pyx_n_s__get_period_field, __pyx_k__get_period_field, sizeof(__pyx_k__get_period_field), 0, 0, 1, 1}, {&__pyx_n_s__get_time_micros, __pyx_k__get_time_micros, sizeof(__pyx_k__get_time_micros), 0, 0, 1, 1}, {&__pyx_n_s__get_timezone, __pyx_k__get_timezone, sizeof(__pyx_k__get_timezone), 0, 0, 1, 1}, {&__pyx_n_s__getlocale, __pyx_k__getlocale, sizeof(__pyx_k__getlocale), 0, 0, 1, 1}, {&__pyx_n_s__gmt, __pyx_k__gmt, sizeof(__pyx_k__gmt), 0, 0, 1, 1}, {&__pyx_n_s__group_key, __pyx_k__group_key, sizeof(__pyx_k__group_key), 0, 0, 1, 1}, {&__pyx_n_s__groupdict, __pyx_k__groupdict, sizeof(__pyx_k__groupdict), 0, 0, 1, 1}, {&__pyx_n_s__grp, __pyx_k__grp, sizeof(__pyx_k__grp), 0, 0, 1, 1}, {&__pyx_n_s__h, __pyx_k__h, sizeof(__pyx_k__h), 0, 0, 1, 1}, {&__pyx_n_s__has_saving, __pyx_k__has_saving, sizeof(__pyx_k__has_saving), 0, 0, 1, 1}, {&__pyx_n_s__have_pytz, __pyx_k__have_pytz, sizeof(__pyx_k__have_pytz), 0, 0, 1, 1}, {&__pyx_n_s__hour, __pyx_k__hour, sizeof(__pyx_k__hour), 0, 0, 1, 1}, {&__pyx_n_s__hours, __pyx_k__hours, sizeof(__pyx_k__hours), 0, 0, 1, 1}, {&__pyx_n_s__hstack, __pyx_k__hstack, sizeof(__pyx_k__hstack), 0, 0, 1, 1}, {&__pyx_n_s__i, __pyx_k__i, sizeof(__pyx_k__i), 0, 0, 1, 1}, {&__pyx_n_s__i4, __pyx_k__i4, sizeof(__pyx_k__i4), 0, 0, 1, 1}, {&__pyx_n_s__i8, __pyx_k__i8, sizeof(__pyx_k__i8), 0, 0, 1, 1}, {&__pyx_n_s__i8_to_pydt, __pyx_k__i8_to_pydt, sizeof(__pyx_k__i8_to_pydt), 0, 0, 1, 1}, {&__pyx_n_s__iNaT, __pyx_k__iNaT, sizeof(__pyx_k__iNaT), 0, 0, 1, 1}, {&__pyx_n_s__idx, __pyx_k__idx, sizeof(__pyx_k__idx), 0, 0, 1, 1}, {&__pyx_n_s__idx_shifted, __pyx_k__idx_shifted, sizeof(__pyx_k__idx_shifted), 0, 0, 1, 1}, {&__pyx_n_s__ignore, __pyx_k__ignore, sizeof(__pyx_k__ignore), 0, 0, 1, 1}, {&__pyx_n_s__index, __pyx_k__index, sizeof(__pyx_k__index), 0, 0, 1, 1}, {&__pyx_n_s__inf, __pyx_k__inf, sizeof(__pyx_k__inf), 0, 0, 1, 1}, {&__pyx_n_s__infer_dst, __pyx_k__infer_dst, sizeof(__pyx_k__infer_dst), 0, 0, 1, 1}, {&__pyx_n_s__inferred_tz, __pyx_k__inferred_tz, sizeof(__pyx_k__inferred_tz), 0, 0, 1, 1}, {&__pyx_n_s__insert, __pyx_k__insert, sizeof(__pyx_k__insert), 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__ints_to_pydatetime, __pyx_k__ints_to_pydatetime, sizeof(__pyx_k__ints_to_pydatetime), 0, 0, 1, 1}, {&__pyx_n_s__iresult, __pyx_k__iresult, sizeof(__pyx_k__iresult), 0, 0, 1, 1}, {&__pyx_n_s__is_timestamp_array, __pyx_k__is_timestamp_array, sizeof(__pyx_k__is_timestamp_array), 0, 0, 1, 1}, {&__pyx_n_s__isleap, __pyx_k__isleap, sizeof(__pyx_k__isleap), 0, 0, 1, 1}, {&__pyx_n_s__isleap_prev, __pyx_k__isleap_prev, sizeof(__pyx_k__isleap_prev), 0, 0, 1, 1}, {&__pyx_n_s__isleapyear, __pyx_k__isleapyear, sizeof(__pyx_k__isleapyear), 0, 0, 1, 1}, {&__pyx_n_s__isoformat, __pyx_k__isoformat, sizeof(__pyx_k__isoformat), 0, 0, 1, 1}, {&__pyx_n_s__item, __pyx_k__item, sizeof(__pyx_k__item), 0, 0, 1, 1}, {&__pyx_n_s__iterkeys, __pyx_k__iterkeys, sizeof(__pyx_k__iterkeys), 0, 0, 1, 1}, {&__pyx_n_s__ivalue, __pyx_k__ivalue, sizeof(__pyx_k__ivalue), 0, 0, 1, 1}, {&__pyx_n_s__ivalues, __pyx_k__ivalues, sizeof(__pyx_k__ivalues), 0, 0, 1, 1}, {&__pyx_n_s__j, __pyx_k__j, sizeof(__pyx_k__j), 0, 0, 1, 1}, {&__pyx_n_s__join, __pyx_k__join, sizeof(__pyx_k__join), 0, 0, 1, 1}, {&__pyx_n_s__julian, __pyx_k__julian, sizeof(__pyx_k__julian), 0, 0, 1, 1}, {&__pyx_n_s__k, __pyx_k__k, sizeof(__pyx_k__k), 0, 0, 1, 1}, {&__pyx_n_s__key, __pyx_k__key, sizeof(__pyx_k__key), 0, 0, 1, 1}, {&__pyx_n_s__kwargs, __pyx_k__kwargs, sizeof(__pyx_k__kwargs), 0, 0, 1, 1}, {&__pyx_n_s__kwds, __pyx_k__kwds, sizeof(__pyx_k__kwds), 0, 0, 1, 1}, {&__pyx_n_s__l, __pyx_k__l, sizeof(__pyx_k__l), 0, 0, 1, 1}, {&__pyx_n_s__lang, __pyx_k__lang, sizeof(__pyx_k__lang), 0, 0, 1, 1}, {&__pyx_n_s__left, __pyx_k__left, sizeof(__pyx_k__left), 0, 0, 1, 1}, {&__pyx_n_s__len, __pyx_k__len, sizeof(__pyx_k__len), 0, 0, 1, 1}, {&__pyx_n_s__loc, __pyx_k__loc, sizeof(__pyx_k__loc), 0, 0, 1, 1}, {&__pyx_n_s__locale, __pyx_k__locale, sizeof(__pyx_k__locale), 0, 0, 1, 1}, {&__pyx_n_s__locale_time, __pyx_k__locale_time, sizeof(__pyx_k__locale_time), 0, 0, 1, 1}, {&__pyx_n_s__localize, __pyx_k__localize, sizeof(__pyx_k__localize), 0, 0, 1, 1}, {&__pyx_n_s__logical_and, __pyx_k__logical_and, sizeof(__pyx_k__logical_and), 0, 0, 1, 1}, {&__pyx_n_s__long, __pyx_k__long, sizeof(__pyx_k__long), 0, 0, 1, 1}, {&__pyx_n_s__lower, __pyx_k__lower, sizeof(__pyx_k__lower), 0, 0, 1, 1}, {&__pyx_n_s__m, __pyx_k__m, sizeof(__pyx_k__m), 0, 0, 1, 1}, {&__pyx_n_s__match, __pyx_k__match, sizeof(__pyx_k__match), 0, 0, 1, 1}, {&__pyx_n_s__max, __pyx_k__max, sizeof(__pyx_k__max), 0, 0, 1, 1}, {&__pyx_n_s__maximum, __pyx_k__maximum, sizeof(__pyx_k__maximum), 0, 0, 1, 1}, {&__pyx_n_s__micros, __pyx_k__micros, sizeof(__pyx_k__micros), 0, 0, 1, 1}, {&__pyx_n_s__microsecond, __pyx_k__microsecond, sizeof(__pyx_k__microsecond), 0, 0, 1, 1}, {&__pyx_n_s__microseconds, __pyx_k__microseconds, sizeof(__pyx_k__microseconds), 0, 0, 1, 1}, {&__pyx_n_s__min, __pyx_k__min, sizeof(__pyx_k__min), 0, 0, 1, 1}, {&__pyx_n_s__minute, __pyx_k__minute, sizeof(__pyx_k__minute), 0, 0, 1, 1}, {&__pyx_n_s__minutes, __pyx_k__minutes, sizeof(__pyx_k__minutes), 0, 0, 1, 1}, {&__pyx_n_s__mo_off, __pyx_k__mo_off, sizeof(__pyx_k__mo_off), 0, 0, 1, 1}, {&__pyx_n_s__month, __pyx_k__month, sizeof(__pyx_k__month), 0, 0, 1, 1}, {&__pyx_n_s__month_abbr, __pyx_k__month_abbr, sizeof(__pyx_k__month_abbr), 0, 0, 1, 1}, {&__pyx_n_s__month_name, __pyx_k__month_name, sizeof(__pyx_k__month_name), 0, 0, 1, 1}, {&__pyx_n_s__monthrange, __pyx_k__monthrange, sizeof(__pyx_k__monthrange), 0, 0, 1, 1}, {&__pyx_n_s__months, __pyx_k__months, sizeof(__pyx_k__months), 0, 0, 1, 1}, {&__pyx_n_s__ms, __pyx_k__ms, sizeof(__pyx_k__ms), 0, 0, 1, 1}, {&__pyx_n_s__mus, __pyx_k__mus, sizeof(__pyx_k__mus), 0, 0, 1, 1}, {&__pyx_n_s__n, __pyx_k__n, sizeof(__pyx_k__n), 0, 0, 1, 1}, {&__pyx_n_s__nan, __pyx_k__nan, sizeof(__pyx_k__nan), 0, 0, 1, 1}, {&__pyx_n_s__nanos, __pyx_k__nanos, sizeof(__pyx_k__nanos), 0, 0, 1, 1}, {&__pyx_n_s__nanosecond, __pyx_k__nanosecond, sizeof(__pyx_k__nanosecond), 0, 0, 1, 1}, {&__pyx_n_s__nat, __pyx_k__nat, sizeof(__pyx_k__nat), 0, 0, 1, 1}, {&__pyx_n_s__ndim, __pyx_k__ndim, sizeof(__pyx_k__ndim), 0, 0, 1, 1}, {&__pyx_n_s__new, __pyx_k__new, sizeof(__pyx_k__new), 0, 0, 1, 1}, {&__pyx_n_s__new_values, __pyx_k__new_values, sizeof(__pyx_k__new_values), 0, 0, 1, 1}, {&__pyx_n_s__no_saving, __pyx_k__no_saving, sizeof(__pyx_k__no_saving), 0, 0, 1, 1}, {&__pyx_n_s__nonzero, __pyx_k__nonzero, sizeof(__pyx_k__nonzero), 0, 0, 1, 1}, {&__pyx_n_s__normalize, __pyx_k__normalize, sizeof(__pyx_k__normalize), 0, 0, 1, 1}, {&__pyx_n_s__now, __pyx_k__now, sizeof(__pyx_k__now), 0, 0, 1, 1}, {&__pyx_n_s__np, __pyx_k__np, sizeof(__pyx_k__np), 0, 0, 1, 1}, {&__pyx_n_s__np_NaT, __pyx_k__np_NaT, sizeof(__pyx_k__np_NaT), 0, 0, 1, 1}, {&__pyx_n_s__ns, __pyx_k__ns, sizeof(__pyx_k__ns), 0, 0, 1, 1}, {&__pyx_n_s__ntrans, __pyx_k__ntrans, sizeof(__pyx_k__ntrans), 0, 0, 1, 1}, {&__pyx_n_s__num, __pyx_k__num, sizeof(__pyx_k__num), 0, 0, 1, 1}, {&__pyx_n_s__numpy, __pyx_k__numpy, sizeof(__pyx_k__numpy), 0, 0, 1, 1}, {&__pyx_n_s__obj, __pyx_k__obj, sizeof(__pyx_k__obj), 0, 0, 1, 1}, {&__pyx_n_s__object, __pyx_k__object, sizeof(__pyx_k__object), 0, 0, 1, 1}, {&__pyx_n_s__object_state, __pyx_k__object_state, sizeof(__pyx_k__object_state), 0, 0, 1, 1}, {&__pyx_n_s__offset, __pyx_k__offset, sizeof(__pyx_k__offset), 0, 0, 1, 1}, {&__pyx_n_s__old, __pyx_k__old, sizeof(__pyx_k__old), 0, 0, 1, 1}, {&__pyx_n_s__one_diff, __pyx_k__one_diff, sizeof(__pyx_k__one_diff), 0, 0, 1, 1}, {&__pyx_n_s__ordinal, __pyx_k__ordinal, sizeof(__pyx_k__ordinal), 0, 0, 1, 1}, {&__pyx_n_s__ordinals, __pyx_k__ordinals, sizeof(__pyx_k__ordinals), 0, 0, 1, 1}, {&__pyx_n_s__oresult, __pyx_k__oresult, sizeof(__pyx_k__oresult), 0, 0, 1, 1}, {&__pyx_n_s__out, __pyx_k__out, sizeof(__pyx_k__out), 0, 0, 1, 1}, {&__pyx_n_s__p, __pyx_k__p, sizeof(__pyx_k__p), 0, 0, 1, 1}, {&__pyx_n_s__parse_code, __pyx_k__parse_code, sizeof(__pyx_k__parse_code), 0, 0, 1, 1}, {&__pyx_n_s__parse_date, __pyx_k__parse_date, sizeof(__pyx_k__parse_date), 0, 0, 1, 1}, {&__pyx_n_s__pattern, __pyx_k__pattern, sizeof(__pyx_k__pattern), 0, 0, 1, 1}, {&__pyx_n_s__period_asfreq_arr, __pyx_k__period_asfreq_arr, sizeof(__pyx_k__period_asfreq_arr), 0, 0, 1, 1}, {&__pyx_n_s__period_format, __pyx_k__period_format, sizeof(__pyx_k__period_format), 0, 0, 1, 1}, {&__pyx_n_s__period_ordinal, __pyx_k__period_ordinal, sizeof(__pyx_k__period_ordinal), 0, 0, 1, 1}, {&__pyx_n_s__periodarr, __pyx_k__periodarr, sizeof(__pyx_k__periodarr), 0, 0, 1, 1}, {&__pyx_n_s__pos, __pyx_k__pos, sizeof(__pyx_k__pos), 0, 0, 1, 1}, {&__pyx_n_s__print, __pyx_k__print, sizeof(__pyx_k__print), 0, 0, 1, 1}, {&__pyx_n_s__processed_format, __pyx_k__processed_format, sizeof(__pyx_k__processed_format), 0, 0, 1, 1}, {&__pyx_n_s__prop, __pyx_k__prop, sizeof(__pyx_k__prop), 0, 0, 1, 1}, {&__pyx_n_s__property, __pyx_k__property, sizeof(__pyx_k__property), 0, 0, 1, 1}, {&__pyx_n_s__ps, __pyx_k__ps, sizeof(__pyx_k__ps), 0, 0, 1, 1}, {&__pyx_n_s__pydt, __pyx_k__pydt, sizeof(__pyx_k__pydt), 0, 0, 1, 1}, {&__pyx_n_s__pydt_to_i8, __pyx_k__pydt_to_i8, sizeof(__pyx_k__pydt_to_i8), 0, 0, 1, 1}, {&__pyx_n_s__pytz, __pyx_k__pytz, sizeof(__pyx_k__pytz), 0, 0, 1, 1}, {&__pyx_n_s__q, __pyx_k__q, sizeof(__pyx_k__q), 0, 0, 1, 1}, {&__pyx_n_s__quarter, __pyx_k__quarter, sizeof(__pyx_k__quarter), 0, 0, 1, 1}, {&__pyx_n_s__raise_, __pyx_k__raise_, sizeof(__pyx_k__raise_), 0, 0, 1, 1}, {&__pyx_n_s__range, __pyx_k__range, sizeof(__pyx_k__range), 0, 0, 1, 1}, {&__pyx_n_s__ravel, __pyx_k__ravel, sizeof(__pyx_k__ravel), 0, 0, 1, 1}, {&__pyx_n_s__re, __pyx_k__re, sizeof(__pyx_k__re), 0, 0, 1, 1}, {&__pyx_n_s__re_compile, __pyx_k__re_compile, sizeof(__pyx_k__re_compile), 0, 0, 1, 1}, {&__pyx_n_s__re_escape, __pyx_k__re_escape, sizeof(__pyx_k__re_escape), 0, 0, 1, 1}, {&__pyx_n_s__regex, __pyx_k__regex, sizeof(__pyx_k__regex), 0, 0, 1, 1}, {&__pyx_n_s__regex_chars, __pyx_k__regex_chars, sizeof(__pyx_k__regex_chars), 0, 0, 1, 1}, {&__pyx_n_s__relation, __pyx_k__relation, sizeof(__pyx_k__relation), 0, 0, 1, 1}, {&__pyx_n_s__replace, __pyx_k__replace, sizeof(__pyx_k__replace), 0, 0, 1, 1}, {&__pyx_n_s__replacement_pairs, __pyx_k__replacement_pairs, sizeof(__pyx_k__replacement_pairs), 0, 0, 1, 1}, {&__pyx_n_s__repr_timedelta64, __pyx_k__repr_timedelta64, sizeof(__pyx_k__repr_timedelta64), 0, 0, 1, 1}, {&__pyx_n_s__result, __pyx_k__result, sizeof(__pyx_k__result), 0, 0, 1, 1}, {&__pyx_n_s__result_a, __pyx_k__result_a, sizeof(__pyx_k__result_a), 0, 0, 1, 1}, {&__pyx_n_s__result_b, __pyx_k__result_b, sizeof(__pyx_k__result_b), 0, 0, 1, 1}, {&__pyx_n_s__ret, __pyx_k__ret, sizeof(__pyx_k__ret), 0, 0, 1, 1}, {&__pyx_n_s__reverse, __pyx_k__reverse, sizeof(__pyx_k__reverse), 0, 0, 1, 1}, {&__pyx_n_s__right, __pyx_k__right, sizeof(__pyx_k__right), 0, 0, 1, 1}, {&__pyx_n_s__round, __pyx_k__round, sizeof(__pyx_k__round), 0, 0, 1, 1}, {&__pyx_n_s__s, __pyx_k__s, sizeof(__pyx_k__s), 0, 0, 1, 1}, {&__pyx_n_s__sa_dtype, __pyx_k__sa_dtype, sizeof(__pyx_k__sa_dtype), 0, 0, 1, 1}, {&__pyx_n_s__searchsorted, __pyx_k__searchsorted, sizeof(__pyx_k__searchsorted), 0, 0, 1, 1}, {&__pyx_n_s__second, __pyx_k__second, sizeof(__pyx_k__second), 0, 0, 1, 1}, {&__pyx_n_s__seconds, __pyx_k__seconds, sizeof(__pyx_k__seconds), 0, 0, 1, 1}, {&__pyx_n_s__seconds_pretty, __pyx_k__seconds_pretty, sizeof(__pyx_k__seconds_pretty), 0, 0, 1, 1}, {&__pyx_n_s__seen_datetime, __pyx_k__seen_datetime, sizeof(__pyx_k__seen_datetime), 0, 0, 1, 1}, {&__pyx_n_s__seen_integer, __pyx_k__seen_integer, sizeof(__pyx_k__seen_integer), 0, 0, 1, 1}, {&__pyx_n_s__self, __pyx_k__self, sizeof(__pyx_k__self), 0, 0, 1, 1}, {&__pyx_n_s__send, __pyx_k__send, sizeof(__pyx_k__send), 0, 0, 1, 1}, {&__pyx_n_s__sep, __pyx_k__sep, sizeof(__pyx_k__sep), 0, 0, 1, 1}, {&__pyx_n_s__seq, __pyx_k__seq, sizeof(__pyx_k__seq), 0, 0, 1, 1}, {&__pyx_n_s__shape, __pyx_k__shape, sizeof(__pyx_k__shape), 0, 0, 1, 1}, {&__pyx_n_s__short, __pyx_k__short, sizeof(__pyx_k__short), 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__side, __pyx_k__side, sizeof(__pyx_k__side), 0, 0, 1, 1}, {&__pyx_n_s__sign, __pyx_k__sign, sizeof(__pyx_k__sign), 0, 0, 1, 1}, {&__pyx_n_s__sign_pretty, __pyx_k__sign_pretty, sizeof(__pyx_k__sign_pretty), 0, 0, 1, 1}, {&__pyx_n_s__size, __pyx_k__size, sizeof(__pyx_k__size), 0, 0, 1, 1}, {&__pyx_n_s__sort, __pyx_k__sort, sizeof(__pyx_k__sort), 0, 0, 1, 1}, {&__pyx_n_s__sorted, __pyx_k__sorted, sizeof(__pyx_k__sorted), 0, 0, 1, 1}, {&__pyx_n_s__sp, __pyx_k__sp, sizeof(__pyx_k__sp), 0, 0, 1, 1}, {&__pyx_n_s__squeeze, __pyx_k__squeeze, sizeof(__pyx_k__squeeze), 0, 0, 1, 1}, {&__pyx_n_s__stamp, __pyx_k__stamp, sizeof(__pyx_k__stamp), 0, 0, 1, 1}, {&__pyx_n_s__stamps, __pyx_k__stamps, sizeof(__pyx_k__stamps), 0, 0, 1, 1}, {&__pyx_n_s__startswith, __pyx_k__startswith, sizeof(__pyx_k__startswith), 0, 0, 1, 1}, {&__pyx_n_s__state, __pyx_k__state, sizeof(__pyx_k__state), 0, 0, 1, 1}, {&__pyx_n_s__strftime, __pyx_k__strftime, sizeof(__pyx_k__strftime), 0, 0, 1, 1}, {&__pyx_n_s__struct_time, __pyx_k__struct_time, sizeof(__pyx_k__struct_time), 0, 0, 1, 1}, {&__pyx_n_s__sub, __pyx_k__sub, sizeof(__pyx_k__sub), 0, 0, 1, 1}, {&__pyx_n_s__super, __pyx_k__super, sizeof(__pyx_k__super), 0, 0, 1, 1}, {&__pyx_n_s__switch_idx, __pyx_k__switch_idx, sizeof(__pyx_k__switch_idx), 0, 0, 1, 1}, {&__pyx_n_s__sys, __pyx_k__sys, sizeof(__pyx_k__sys), 0, 0, 1, 1}, {&__pyx_n_s__sz, __pyx_k__sz, sizeof(__pyx_k__sz), 0, 0, 1, 1}, {&__pyx_n_s__t, __pyx_k__t, sizeof(__pyx_k__t), 0, 0, 1, 1}, {&__pyx_n_s__table, __pyx_k__table, sizeof(__pyx_k__table), 0, 0, 1, 1}, {&__pyx_n_s__td, __pyx_k__td, sizeof(__pyx_k__td), 0, 0, 1, 1}, {&__pyx_n_s__tdata, __pyx_k__tdata, sizeof(__pyx_k__tdata), 0, 0, 1, 1}, {&__pyx_n_s__thread, __pyx_k__thread, sizeof(__pyx_k__thread), 0, 0, 1, 1}, {&__pyx_n_s__throw, __pyx_k__throw, sizeof(__pyx_k__throw), 0, 0, 1, 1}, {&__pyx_n_s__time, __pyx_k__time, sizeof(__pyx_k__time), 0, 0, 1, 1}, {&__pyx_n_s__time_tuple, __pyx_k__time_tuple, sizeof(__pyx_k__time_tuple), 0, 0, 1, 1}, {&__pyx_n_s__timedelta, __pyx_k__timedelta, sizeof(__pyx_k__timedelta), 0, 0, 1, 1}, {&__pyx_n_s__timedelta64, __pyx_k__timedelta64, sizeof(__pyx_k__timedelta64), 0, 0, 1, 1}, {&__pyx_n_s__timezone, __pyx_k__timezone, sizeof(__pyx_k__timezone), 0, 0, 1, 1}, {&__pyx_n_s__to_convert, __pyx_k__to_convert, sizeof(__pyx_k__to_convert), 0, 0, 1, 1}, {&__pyx_n_s__to_datetime, __pyx_k__to_datetime, sizeof(__pyx_k__to_datetime), 0, 0, 1, 1}, {&__pyx_n_s__to_period, __pyx_k__to_period, sizeof(__pyx_k__to_period), 0, 0, 1, 1}, {&__pyx_n_s__to_pydatetime, __pyx_k__to_pydatetime, sizeof(__pyx_k__to_pydatetime), 0, 0, 1, 1}, {&__pyx_n_s__today, __pyx_k__today, sizeof(__pyx_k__today), 0, 0, 1, 1}, {&__pyx_n_s__toordinal, __pyx_k__toordinal, sizeof(__pyx_k__toordinal), 0, 0, 1, 1}, {&__pyx_n_s__tot_seconds, __pyx_k__tot_seconds, sizeof(__pyx_k__tot_seconds), 0, 0, 1, 1}, {&__pyx_n_s__total_seconds, __pyx_k__total_seconds, sizeof(__pyx_k__total_seconds), 0, 0, 1, 1}, {&__pyx_n_s__trans, __pyx_k__trans, sizeof(__pyx_k__trans), 0, 0, 1, 1}, {&__pyx_n_s__trans_cache, __pyx_k__trans_cache, sizeof(__pyx_k__trans_cache), 0, 0, 1, 1}, {&__pyx_n_s__trans_grp, __pyx_k__trans_grp, sizeof(__pyx_k__trans_grp), 0, 0, 1, 1}, {&__pyx_n_s__trans_idx, __pyx_k__trans_idx, sizeof(__pyx_k__trans_idx), 0, 0, 1, 1}, {&__pyx_n_s__trans_len, __pyx_k__trans_len, sizeof(__pyx_k__trans_len), 0, 0, 1, 1}, {&__pyx_n_s__ts, __pyx_k__ts, sizeof(__pyx_k__ts), 0, 0, 1, 1}, {&__pyx_n_s__ts_base, __pyx_k__ts_base, sizeof(__pyx_k__ts_base), 0, 0, 1, 1}, {&__pyx_n_s__ts_input, __pyx_k__ts_input, sizeof(__pyx_k__ts_input), 0, 0, 1, 1}, {&__pyx_n_s__tso, __pyx_k__tso, sizeof(__pyx_k__tso), 0, 0, 1, 1}, {&__pyx_n_s__tz, __pyx_k__tz, sizeof(__pyx_k__tz), 0, 0, 1, 1}, {&__pyx_n_s__tz1, __pyx_k__tz1, sizeof(__pyx_k__tz1), 0, 0, 1, 1}, {&__pyx_n_s__tz2, __pyx_k__tz2, sizeof(__pyx_k__tz2), 0, 0, 1, 1}, {&__pyx_n_s__tz_convert, __pyx_k__tz_convert, sizeof(__pyx_k__tz_convert), 0, 0, 1, 1}, {&__pyx_n_s__tz_convert_single, __pyx_k__tz_convert_single, sizeof(__pyx_k__tz_convert_single), 0, 0, 1, 1}, {&__pyx_n_s__tz_localize, __pyx_k__tz_localize, sizeof(__pyx_k__tz_localize), 0, 0, 1, 1}, {&__pyx_n_s__tz_localize_to_utc, __pyx_k__tz_localize_to_utc, sizeof(__pyx_k__tz_localize_to_utc), 0, 0, 1, 1}, {&__pyx_n_s__tz_values, __pyx_k__tz_values, sizeof(__pyx_k__tz_values), 0, 0, 1, 1}, {&__pyx_n_s__tzinfo, __pyx_k__tzinfo, sizeof(__pyx_k__tzinfo), 0, 0, 1, 1}, {&__pyx_n_s__tzlocal, __pyx_k__tzlocal, sizeof(__pyx_k__tzlocal), 0, 0, 1, 1}, {&__pyx_n_s__tzname, __pyx_k__tzname, sizeof(__pyx_k__tzname), 0, 0, 1, 1}, {&__pyx_n_s__tzset, __pyx_k__tzset, sizeof(__pyx_k__tzset), 0, 0, 1, 1}, {&__pyx_n_s__tzutc, __pyx_k__tzutc, sizeof(__pyx_k__tzutc), 0, 0, 1, 1}, {&__pyx_n_s__u, __pyx_k__u, sizeof(__pyx_k__u), 0, 0, 1, 1}, {&__pyx_n_s__unique_deltas, __pyx_k__unique_deltas, sizeof(__pyx_k__unique_deltas), 0, 0, 1, 1}, {&__pyx_n_s__uniques, __pyx_k__uniques, sizeof(__pyx_k__uniques), 0, 0, 1, 1}, {&__pyx_n_s__unit, __pyx_k__unit, sizeof(__pyx_k__unit), 0, 0, 1, 1}, {&__pyx_n_s__us, __pyx_k__us, sizeof(__pyx_k__us), 0, 0, 1, 1}, {&__pyx_n_s__utc, __pyx_k__utc, sizeof(__pyx_k__utc), 0, 0, 1, 1}, {&__pyx_n_s__utc_convert, __pyx_k__utc_convert, sizeof(__pyx_k__utc_convert), 0, 0, 1, 1}, {&__pyx_n_s__utc_date, __pyx_k__utc_date, sizeof(__pyx_k__utc_date), 0, 0, 1, 1}, {&__pyx_n_s__utc_dates, __pyx_k__utc_dates, sizeof(__pyx_k__utc_dates), 0, 0, 1, 1}, {&__pyx_n_s__utc_offset_cache, __pyx_k__utc_offset_cache, sizeof(__pyx_k__utc_offset_cache), 0, 0, 1, 1}, {&__pyx_n_s__utcnow, __pyx_k__utcnow, sizeof(__pyx_k__utcnow), 0, 0, 1, 1}, {&__pyx_n_s__utcoffset, __pyx_k__utcoffset, sizeof(__pyx_k__utcoffset), 0, 0, 1, 1}, {&__pyx_n_s__v, __pyx_k__v, sizeof(__pyx_k__v), 0, 0, 1, 1}, {&__pyx_n_s__val, __pyx_k__val, sizeof(__pyx_k__val), 0, 0, 1, 1}, {&__pyx_n_s__vals, __pyx_k__vals, sizeof(__pyx_k__vals), 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__version_info, __pyx_k__version_info, sizeof(__pyx_k__version_info), 0, 0, 1, 1}, {&__pyx_n_s__view, __pyx_k__view, sizeof(__pyx_k__view), 0, 0, 1, 1}, {&__pyx_n_s__w, __pyx_k__w, sizeof(__pyx_k__w), 0, 0, 1, 1}, {&__pyx_n_s__warn, __pyx_k__warn, sizeof(__pyx_k__warn), 0, 0, 1, 1}, {&__pyx_n_s__week, __pyx_k__week, sizeof(__pyx_k__week), 0, 0, 1, 1}, {&__pyx_n_s__week_0_length, __pyx_k__week_0_length, sizeof(__pyx_k__week_0_length), 0, 0, 1, 1}, {&__pyx_n_s__week_of_year, __pyx_k__week_of_year, sizeof(__pyx_k__week_of_year), 0, 0, 1, 1}, {&__pyx_n_s__week_of_year_start, __pyx_k__week_of_year_start, sizeof(__pyx_k__week_of_year_start), 0, 0, 1, 1}, {&__pyx_n_s__week_starts_Mon, __pyx_k__week_starts_Mon, sizeof(__pyx_k__week_starts_Mon), 0, 0, 1, 1}, {&__pyx_n_s__weekday, __pyx_k__weekday, sizeof(__pyx_k__weekday), 0, 0, 1, 1}, {&__pyx_n_s__weekofyear, __pyx_k__weekofyear, sizeof(__pyx_k__weekofyear), 0, 0, 1, 1}, {&__pyx_n_s__where, __pyx_k__where, sizeof(__pyx_k__where), 0, 0, 1, 1}, {&__pyx_n_s__woy, __pyx_k__woy, sizeof(__pyx_k__woy), 0, 0, 1, 1}, {&__pyx_n_s__x, __pyx_k__x, sizeof(__pyx_k__x), 0, 0, 1, 1}, {&__pyx_n_s__y, __pyx_k__y, sizeof(__pyx_k__y), 0, 0, 1, 1}, {&__pyx_n_s__year, __pyx_k__year, sizeof(__pyx_k__year), 0, 0, 1, 1}, {&__pyx_n_s__year2000, __pyx_k__year2000, sizeof(__pyx_k__year2000), 0, 0, 1, 1}, {&__pyx_n_s__years, __pyx_k__years, sizeof(__pyx_k__years), 0, 0, 1, 1}, {&__pyx_n_s__zone, __pyx_k__zone, sizeof(__pyx_k__zone), 0, 0, 1, 1}, {0, 0, 0, 0, 0, 0, 0} }; static int __Pyx_InitCachedBuiltins(void) { __pyx_builtin_NameError = __Pyx_GetBuiltinName(__pyx_n_s__NameError); if (!__pyx_builtin_NameError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_builtin_property = __Pyx_GetBuiltinName(__pyx_n_s__property); if (!__pyx_builtin_property) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 220; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_builtin_ValueError = __Pyx_GetBuiltinName(__pyx_n_s__ValueError); if (!__pyx_builtin_ValueError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 909; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_builtin_object = __Pyx_GetBuiltinName(__pyx_n_s__object); if (!__pyx_builtin_object) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2983; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_n_s__range); if (!__pyx_builtin_range) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_builtin_AttributeError = __Pyx_GetBuiltinName(__pyx_n_s__AttributeError); if (!__pyx_builtin_AttributeError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 135; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_builtin_Exception = __Pyx_GetBuiltinName(__pyx_n_s__Exception); if (!__pyx_builtin_Exception) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 178; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_builtin_super = __Pyx_GetBuiltinName(__pyx_n_s__super); if (!__pyx_builtin_super) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 362; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_builtin_IndexError = __Pyx_GetBuiltinName(__pyx_n_s__IndexError); if (!__pyx_builtin_IndexError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 469; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_builtin_TypeError = __Pyx_GetBuiltinName(__pyx_n_s__TypeError); if (!__pyx_builtin_TypeError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 599; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_builtin_round = __Pyx_GetBuiltinName(__pyx_n_s__round); if (!__pyx_builtin_round) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1294; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_builtin_KeyError = __Pyx_GetBuiltinName(__pyx_n_s__KeyError); if (!__pyx_builtin_KeyError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1335; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_builtin_enumerate = __Pyx_GetBuiltinName(__pyx_n_s__enumerate); if (!__pyx_builtin_enumerate) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1495; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_builtin_sorted = __Pyx_GetBuiltinName(__pyx_n_s__sorted); if (!__pyx_builtin_sorted) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3182; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_builtin_RuntimeError = __Pyx_GetBuiltinName(__pyx_n_s__RuntimeError); if (!__pyx_builtin_RuntimeError) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 803; __pyx_clineno = __LINE__; goto __pyx_L1_error;} return 0; __pyx_L1_error:; return -1; } static int __Pyx_InitCachedConstants(void) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0); /* "pandas/tslib.pyx":169 * @classmethod * def utcnow(cls): * return cls.now('UTC') # <<<<<<<<<<<<<< * * def __new__(cls, object ts_input, object offset=None, tz=None, unit=None): */ __pyx_k_tuple_1 = PyTuple_Pack(1, ((PyObject *)__pyx_n_s__UTC)); if (unlikely(!__pyx_k_tuple_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 169; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_1); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_1)); /* "pandas/tslib.pyx":203 * * try: * result += self.strftime('%z') # <<<<<<<<<<<<<< * if self.tzinfo: * zone = _get_zone(self.tzinfo) */ __pyx_k_tuple_3 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_2)); if (unlikely(!__pyx_k_tuple_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 203; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_3); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_3)); /* "pandas/tslib.pyx":208 * except ValueError: * year2000 = self.replace(year=2000) * result += year2000.strftime('%z') # <<<<<<<<<<<<<< * if self.tzinfo: * zone = _get_zone(self.tzinfo) */ __pyx_k_tuple_4 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_2)); if (unlikely(!__pyx_k_tuple_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 208; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_4); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_4)); /* "pandas/tslib.pyx":213 * * try: * result += zone.strftime(' %%Z') # <<<<<<<<<<<<<< * except: * pass */ __pyx_k_tuple_6 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_5)); if (unlikely(!__pyx_k_tuple_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 213; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_6); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_6)); /* "pandas/tslib.pyx":279 * @property * def dayofyear(self): * return self._get_field('doy') # <<<<<<<<<<<<<< * * @property */ __pyx_k_tuple_15 = PyTuple_Pack(1, ((PyObject *)__pyx_n_s__doy)); if (unlikely(!__pyx_k_tuple_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 279; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_15); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_15)); /* "pandas/tslib.pyx":283 * @property * def week(self): * return self._get_field('woy') # <<<<<<<<<<<<<< * * weekofyear = week */ __pyx_k_tuple_16 = PyTuple_Pack(1, ((PyObject *)__pyx_n_s__woy)); if (unlikely(!__pyx_k_tuple_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 283; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_16); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_16)); /* "pandas/tslib.pyx":289 * @property * def quarter(self): * return self._get_field('q') # <<<<<<<<<<<<<< * * @property */ __pyx_k_tuple_17 = PyTuple_Pack(1, ((PyObject *)__pyx_n_s__q)); if (unlikely(!__pyx_k_tuple_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 289; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_17); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_17)); /* "pandas/tslib.pyx":297 * @property * def asm8(self): * return np.int64(self.value).view('M8[ns]') # <<<<<<<<<<<<<< * * def tz_localize(self, tz): */ __pyx_k_tuple_19 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_18)); if (unlikely(!__pyx_k_tuple_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 297; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_19); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_19)); /* "pandas/tslib.pyx":315 * return Timestamp(self.to_pydatetime(), tz=tz) * else: * raise Exception('Cannot localize tz-aware Timestamp, use ' # <<<<<<<<<<<<<< * 'tz_convert for conversions') * */ __pyx_k_tuple_21 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_20)); if (unlikely(!__pyx_k_tuple_21)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 315; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_21); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_21)); /* "pandas/tslib.pyx":333 * if self.tzinfo is None: * # tz naive, use tz_localize * raise Exception('Cannot convert tz-naive Timestamp, use ' # <<<<<<<<<<<<<< * 'tz_localize to localize') * else: */ __pyx_k_tuple_23 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_22)); if (unlikely(!__pyx_k_tuple_23)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 333; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_23); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_23)); /* "pandas/tslib.pyx":367 * * if self.tzinfo is not None: * base1, base2 = base[:-6], base[-6:] # <<<<<<<<<<<<<< * else: * base1, base2 = base, "" */ __pyx_k_slice_25 = PySlice_New(Py_None, __pyx_int_neg_6, Py_None); if (unlikely(!__pyx_k_slice_25)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 367; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_slice_25); __Pyx_GIVEREF(__pyx_k_slice_25); __pyx_k_slice_26 = PySlice_New(__pyx_int_neg_6, Py_None, Py_None); if (unlikely(!__pyx_k_slice_26)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 367; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_slice_26); __Pyx_GIVEREF(__pyx_k_slice_26); /* "pandas/tslib.pyx":469 * * if i >= sz or sz == 0 or i < 0: * raise IndexError('index out of bounds') # <<<<<<<<<<<<<< * * if arr.descr.type_num == NPY_DATETIME: */ __pyx_k_tuple_32 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_31)); if (unlikely(!__pyx_k_tuple_32)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 469; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_32); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_32)); /* "pandas/tslib.pyx":529 * * result = np.empty(n, dtype='M8[ns]') * new_values = result.view('i8') # <<<<<<<<<<<<<< * * */ __pyx_k_tuple_33 = PyTuple_Pack(1, ((PyObject *)__pyx_n_s__i8)); if (unlikely(!__pyx_k_tuple_33)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 529; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_33); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_33)); /* "pandas/tslib.pyx":640 * if self.tzinfo is None: * if other.tzinfo is not None: * raise ValueError('Cannot compare tz-naive and tz-aware ' # <<<<<<<<<<<<<< * 'timestamps') * elif other.tzinfo is None: */ __pyx_k_tuple_36 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_35)); if (unlikely(!__pyx_k_tuple_36)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 640; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_36); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_36)); /* "pandas/tslib.pyx":643 * 'timestamps') * elif other.tzinfo is None: * raise ValueError('Cannot compare tz-naive and tz-aware timestamps') # <<<<<<<<<<<<<< * * cpdef datetime to_datetime(_Timestamp self): */ __pyx_k_tuple_37 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_35)); if (unlikely(!__pyx_k_tuple_37)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 643; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_37); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_37)); /* "pandas/tslib.pyx":659 * * if is_timedelta64_object(other): * other_int = other.astype('timedelta64[ns]').astype(int) # <<<<<<<<<<<<<< * return Timestamp(self.value + other_int, tz=self.tzinfo) * */ __pyx_k_tuple_39 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_38)); if (unlikely(!__pyx_k_tuple_39)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 659; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_39); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_39)); /* "pandas/tslib.pyx":664 * if is_integer_object(other): * if self.offset is None: * raise ValueError("Cannot add integral value to Timestamp " # <<<<<<<<<<<<<< * "without offset.") * return Timestamp((self.offset * other).apply(self)) */ __pyx_k_tuple_41 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_40)); if (unlikely(!__pyx_k_tuple_41)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 664; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_41); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_41)); /* "pandas/tslib.pyx":732 * delta = delta.delta * if is_timedelta64_object(delta): * return delta.astype("timedelta64[ns]").item() # <<<<<<<<<<<<<< * if is_integer_object(delta): * return delta */ __pyx_k_tuple_43 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_38)); if (unlikely(!__pyx_k_tuple_43)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 732; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_43); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_43)); /* "pandas/tslib.pyx":948 * * result = np.empty(n, dtype='M8[ns]') * iresult = result.view('i8') # <<<<<<<<<<<<<< * for i in range(n): * val = values[i] */ __pyx_k_tuple_47 = PyTuple_Pack(1, ((PyObject *)__pyx_n_s__i8)); if (unlikely(!__pyx_k_tuple_47)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 948; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_47); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_47)); /* "pandas/tslib.pyx":957 * if inferred_tz is not None: * if _get_zone(val.tzinfo) != inferred_tz: * raise ValueError('Array must be all same time zone') # <<<<<<<<<<<<<< * else: * inferred_tz = _get_zone(val.tzinfo) */ __pyx_k_tuple_49 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_48)); if (unlikely(!__pyx_k_tuple_49)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 957; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_49); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_49)); /* "pandas/tslib.pyx":966 * else: * if inferred_tz is not None: * raise ValueError('Cannot mix tz-aware with tz-naive values') # <<<<<<<<<<<<<< * iresult[i] = _pydatetime_to_dts(val, &dts) * _check_dts_bounds(&dts) */ __pyx_k_tuple_51 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_50)); if (unlikely(!__pyx_k_tuple_51)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 966; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_51); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_51)); /* "pandas/tslib.pyx":977 * * def _does_string_look_like_datetime(date_string): * if date_string.startswith('0'): # <<<<<<<<<<<<<< * # Strings starting with 0 are more consistent with a * # date-like string than a number */ __pyx_k_tuple_53 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s__0)); if (unlikely(!__pyx_k_tuple_53)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 977; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_53); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_53)); /* "pandas/tslib.pyx":995 * def parse_datetime_string(date_string, **kwargs): * if not _does_string_look_like_datetime(date_string): * raise ValueError('Given date string not likely a datetime.') # <<<<<<<<<<<<<< * * dt = parse_date(date_string, **kwargs) */ __pyx_k_tuple_57 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_56)); if (unlikely(!__pyx_k_tuple_57)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 995; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_57); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_57)); /* "pandas/tslib.pyx":1014 * try: * result = np.empty(n, dtype='M8[ns]') * iresult = result.view('i8') # <<<<<<<<<<<<<< * for i in range(n): * val = values[i] */ __pyx_k_tuple_61 = PyTuple_Pack(1, ((PyObject *)__pyx_n_s__i8)); if (unlikely(!__pyx_k_tuple_61)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1014; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_61); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_61)); /* "pandas/tslib.pyx":1033 * raise * else: * raise ValueError('Tz-aware datetime.datetime cannot ' # <<<<<<<<<<<<<< * 'be converted to datetime64 unless ' * 'utc=True') */ __pyx_k_tuple_63 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_62)); if (unlikely(!__pyx_k_tuple_63)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1033; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_63); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_63)); /* "pandas/tslib.pyx":1126 * # example * if seen_integer and seen_datetime: * raise ValueError("mixed datetimes and integers in passed array") # <<<<<<<<<<<<<< * * return result */ __pyx_k_tuple_66 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_65)); if (unlikely(!__pyx_k_tuple_66)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1126; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_66); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_66)); /* "pandas/tslib.pyx":1179 * n = values.shape[0] * result = np.empty(n, dtype='m8[ns]') * iresult = result.view('i8') # <<<<<<<<<<<<<< * * for i in range(n): */ __pyx_k_tuple_69 = PyTuple_Pack(1, ((PyObject *)__pyx_n_s__i8)); if (unlikely(!__pyx_k_tuple_69)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1179; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_69); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_69)); /* "pandas/tslib.pyx":1209 * elif util.is_datetime64_object(ts): * # only accept a NaT here * if ts.astype('int64') == iNaT: # <<<<<<<<<<<<<< * ts = np.timedelta64(iNaT) * elif isinstance(ts, np.timedelta64): */ __pyx_k_tuple_71 = PyTuple_Pack(1, ((PyObject *)__pyx_n_s__int64)); if (unlikely(!__pyx_k_tuple_71)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1209; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_71); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_71)); /* "pandas/tslib.pyx":1218 * else: * if util.is_array(ts): * ts = ts.astype('int64').item() # <<<<<<<<<<<<<< * ts = cast_from_unit(ts, unit) * if _np_version_under1p7: */ __pyx_k_tuple_73 = PyTuple_Pack(1, ((PyObject *)__pyx_n_s__int64)); if (unlikely(!__pyx_k_tuple_73)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1218; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_73); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_73)); /* "pandas/tslib.pyx":1242 * return np.timedelta64(iNaT) * raise ValueError("Invalid type for timedelta scalar: %s" % type(ts)) * return ts.astype('timedelta64[ns]') # <<<<<<<<<<<<<< * * def repr_timedelta64(object value, format=None): */ __pyx_k_tuple_76 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_38)); if (unlikely(!__pyx_k_tuple_76)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1242; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_76); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_76)); /* "pandas/tslib.pyx":1260 * cdef object ivalue * * ivalue = value.view('i8') # <<<<<<<<<<<<<< * * # put frac in seconds */ __pyx_k_tuple_77 = PyTuple_Pack(1, ((PyObject *)__pyx_n_s__i8)); if (unlikely(!__pyx_k_tuple_77)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1260; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_77); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_77)); /* "pandas/tslib.pyx":1322 * * global _TimeRE_cache, _regex_cache * with _cache_lock: # <<<<<<<<<<<<<< * if _getlang() != _TimeRE_cache.locale_time.lang: * _TimeRE_cache = TimeRE() */ __pyx_k_tuple_89 = PyTuple_Pack(3, Py_None, Py_None, Py_None); if (unlikely(!__pyx_k_tuple_89)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1322; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_89); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_89)); /* "pandas/tslib.pyx":1348 * * result = np.empty(n, dtype='M8[ns]') * iresult = result.view('i8') # <<<<<<<<<<<<<< * * dts.us = dts.ps = dts.as = 0 */ __pyx_k_tuple_90 = PyTuple_Pack(1, ((PyObject *)__pyx_n_s__i8)); if (unlikely(!__pyx_k_tuple_90)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1348; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_90); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_90)); /* "pandas/tslib.pyx":1448 * elif parse_code == 7: * hour = int(found_dict['I']) * ampm = found_dict.get('p', '').lower() # <<<<<<<<<<<<<< * # If there was no AM/PM indicator, we'll treat this like AM * if ampm in ('', locale_time.am_pm[0]): */ __pyx_k_tuple_93 = PyTuple_Pack(2, ((PyObject *)__pyx_n_s__p), ((PyObject *)__pyx_kp_s_27)); if (unlikely(!__pyx_k_tuple_93)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1448; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_93); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_93)); /* "pandas/tslib.pyx":1557 * unit = get_datetime64_unit(val) * if unit == 3: * raise ValueError('NumPy 1.6.1 business freq not supported') # <<<<<<<<<<<<<< * * ival = get_datetime64_value(val) */ __pyx_k_tuple_96 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_95)); if (unlikely(!__pyx_k_tuple_96)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1557; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_96); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_96)); /* "pandas/tslib.pyx":1618 * unit = get_datetime64_unit(arr.flat[0]) * if unit == 3: * raise ValueError('NumPy 1.6.1 business freq not supported') # <<<<<<<<<<<<<< * * for i in range(n): */ __pyx_k_tuple_97 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_95)); if (unlikely(!__pyx_k_tuple_97)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1618; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_97); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_97)); /* "pandas/tslib.pyx":1688 * pos = trans.searchsorted(vals[0]) - 1 * if pos < 0: * raise ValueError('First time before start of DST info') # <<<<<<<<<<<<<< * * offset = deltas[pos] */ __pyx_k_tuple_99 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_98)); if (unlikely(!__pyx_k_tuple_99)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1688; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_99); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_99)); /* "pandas/tslib.pyx":1719 * pos = trans.searchsorted(utc_dates[0]) * if pos == 0: * raise ValueError('First time before start of DST info') # <<<<<<<<<<<<<< * elif pos == len(trans): * return utc_dates + deltas[-1] */ __pyx_k_tuple_100 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_98)); if (unlikely(!__pyx_k_tuple_100)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1719; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_100); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_100)); /* "pandas/tslib.pyx":1760 * pos = trans.searchsorted(val) - 1 * if pos < 0: * raise ValueError('First time before start of DST info') # <<<<<<<<<<<<<< * offset = deltas[pos] * utc_date = val - offset */ __pyx_k_tuple_101 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_98)); if (unlikely(!__pyx_k_tuple_101)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1760; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_101); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_101)); /* "pandas/tslib.pyx":1779 * pos = trans.searchsorted(utc_date) - 1 * if pos < 0: * raise ValueError('First time before start of DST info') # <<<<<<<<<<<<<< * * offset = deltas[pos] */ __pyx_k_tuple_102 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_98)); if (unlikely(!__pyx_k_tuple_102)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1779; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_102); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_102)); /* "pandas/tslib.pyx":1801 * if hasattr(tz, '_utc_transition_times'): * arr = np.array(tz._utc_transition_times, dtype='M8[ns]') * arr = arr.view('i8') # <<<<<<<<<<<<<< * try: * if tz._utc_transition_times[0].year == 1: */ __pyx_k_tuple_104 = PyTuple_Pack(1, ((PyObject *)__pyx_n_s__i8)); if (unlikely(!__pyx_k_tuple_104)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1801; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_104); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_104)); /* "pandas/tslib.pyx":1876 * * if not have_pytz: * raise Exception("Could not find pytz module") # <<<<<<<<<<<<<< * * if tz == UTC or tz is None: */ __pyx_k_tuple_106 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_105)); if (unlikely(!__pyx_k_tuple_106)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1876; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_106); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_106)); /* "pandas/tslib.pyx":2040 * count = len(dtindex) * * sa_dtype = [('Y', 'i4'), # year # <<<<<<<<<<<<<< * ('M', 'i4'), # month * ('D', 'i4'), # day */ __pyx_k_tuple_111 = PyTuple_Pack(2, ((PyObject *)__pyx_n_s__Y), ((PyObject *)__pyx_n_s__i4)); if (unlikely(!__pyx_k_tuple_111)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2040; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_111); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_111)); /* "pandas/tslib.pyx":2041 * * sa_dtype = [('Y', 'i4'), # year * ('M', 'i4'), # month # <<<<<<<<<<<<<< * ('D', 'i4'), # day * ('h', 'i4'), # hour */ __pyx_k_tuple_112 = PyTuple_Pack(2, ((PyObject *)__pyx_n_s__M), ((PyObject *)__pyx_n_s__i4)); if (unlikely(!__pyx_k_tuple_112)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2041; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_112); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_112)); /* "pandas/tslib.pyx":2042 * sa_dtype = [('Y', 'i4'), # year * ('M', 'i4'), # month * ('D', 'i4'), # day # <<<<<<<<<<<<<< * ('h', 'i4'), # hour * ('m', 'i4'), # min */ __pyx_k_tuple_113 = PyTuple_Pack(2, ((PyObject *)__pyx_n_s__D), ((PyObject *)__pyx_n_s__i4)); if (unlikely(!__pyx_k_tuple_113)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2042; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_113); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_113)); /* "pandas/tslib.pyx":2043 * ('M', 'i4'), # month * ('D', 'i4'), # day * ('h', 'i4'), # hour # <<<<<<<<<<<<<< * ('m', 'i4'), # min * ('s', 'i4'), # second */ __pyx_k_tuple_114 = PyTuple_Pack(2, ((PyObject *)__pyx_n_s__h), ((PyObject *)__pyx_n_s__i4)); if (unlikely(!__pyx_k_tuple_114)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2043; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_114); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_114)); /* "pandas/tslib.pyx":2044 * ('D', 'i4'), # day * ('h', 'i4'), # hour * ('m', 'i4'), # min # <<<<<<<<<<<<<< * ('s', 'i4'), # second * ('u', 'i4')] # microsecond */ __pyx_k_tuple_115 = PyTuple_Pack(2, ((PyObject *)__pyx_n_s__m), ((PyObject *)__pyx_n_s__i4)); if (unlikely(!__pyx_k_tuple_115)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2044; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_115); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_115)); /* "pandas/tslib.pyx":2045 * ('h', 'i4'), # hour * ('m', 'i4'), # min * ('s', 'i4'), # second # <<<<<<<<<<<<<< * ('u', 'i4')] # microsecond * */ __pyx_k_tuple_116 = PyTuple_Pack(2, ((PyObject *)__pyx_n_s__s), ((PyObject *)__pyx_n_s__i4)); if (unlikely(!__pyx_k_tuple_116)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2045; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_116); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_116)); /* "pandas/tslib.pyx":2046 * ('m', 'i4'), # min * ('s', 'i4'), # second * ('u', 'i4')] # microsecond # <<<<<<<<<<<<<< * * out = np.empty(count, dtype=sa_dtype) */ __pyx_k_tuple_117 = PyTuple_Pack(2, ((PyObject *)__pyx_n_s__u), ((PyObject *)__pyx_n_s__i4)); if (unlikely(!__pyx_k_tuple_117)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2046; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_117); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_117)); /* "pandas/tslib.pyx":2381 * * if month < 1 or month > 12: * raise ValueError("bad month number 0; must be 1-12") # <<<<<<<<<<<<<< * * days = days_per_month_table[is_leapyear(year)][month-1] */ __pyx_k_tuple_120 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_119)); if (unlikely(!__pyx_k_tuple_120)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2381; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_120); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_120)); /* "pandas/tslib.pyx":2416 * * if not have_pytz: * raise Exception('Could not find pytz module') # <<<<<<<<<<<<<< * * if _is_utc(tz): */ __pyx_k_tuple_122 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_105)); if (unlikely(!__pyx_k_tuple_122)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2416; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_122); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_122)); /* "pandas/tslib.pyx":2613 * * if retval == INT32_MIN: * raise ValueError('Frequency conversion failed') # <<<<<<<<<<<<<< * * return retval */ __pyx_k_tuple_124 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_123)); if (unlikely(!__pyx_k_tuple_124)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2613; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_124); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_124)); /* "pandas/tslib.pyx":2644 * val = func(arr[i], relation, &finfo) * if val == INT32_MIN: * raise ValueError("Unable to convert to desired frequency.") # <<<<<<<<<<<<<< * result[i] = val * */ __pyx_k_tuple_126 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_125)); if (unlikely(!__pyx_k_tuple_126)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2644; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_126); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_126)); /* "pandas/tslib.pyx":2735 * * if PyUnicode_Check(fmt): * fmt = fmt.encode('utf-8') # <<<<<<<<<<<<<< * * get_date_info(value, freq, &dinfo) */ __pyx_k_tuple_140 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_139)); if (unlikely(!__pyx_k_tuple_140)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2735; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_140); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_140)); /* "pandas/tslib.pyx":2753 * if found_pat[i]: * if get_yq(value, freq, &quarter, &year) < 0: * raise ValueError('Unable to get quarter and year') # <<<<<<<<<<<<<< * * if i == 0: */ __pyx_k_tuple_142 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_141)); if (unlikely(!__pyx_k_tuple_142)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2753; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_142); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_142)); /* "pandas/tslib.pyx":2771 * * if PY2: * result = result.decode('utf-8', 'ignore') # <<<<<<<<<<<<<< * * return result */ __pyx_k_tuple_148 = PyTuple_Pack(2, ((PyObject *)__pyx_kp_s_139), ((PyObject *)__pyx_n_s__ignore)); if (unlikely(!__pyx_k_tuple_148)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2771; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_148); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_148)); /* "pandas/tslib.pyx":3029 * self.__calc_date_time() * if _getlang() != self.lang: * raise ValueError("locale changed during initialization") # <<<<<<<<<<<<<< * * def __pad(self, seq, front): */ __pyx_k_tuple_157 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_156)); if (unlikely(!__pyx_k_tuple_157)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3029; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_157); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_157)); /* "pandas/tslib.pyx":3035 * seq = list(seq) * if front: * seq.insert(0, '') # <<<<<<<<<<<<<< * else: * seq.append('') */ __pyx_k_tuple_158 = PyTuple_Pack(2, __pyx_int_0, ((PyObject *)__pyx_kp_s_27)); if (unlikely(!__pyx_k_tuple_158)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3035; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_158); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_158)); /* "pandas/tslib.pyx":3062 * # static date was needed. * am_pm = [] * for hour in (01,22): # <<<<<<<<<<<<<< * time_tuple = time.struct_time((1999,3,17,hour,44,55,2,76,0)) * am_pm.append(time.strftime("%p", time_tuple).lower()) */ __pyx_k_tuple_159 = PyTuple_Pack(2, __pyx_int_01, __pyx_int_22); if (unlikely(!__pyx_k_tuple_159)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3062; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_159); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_159)); /* "pandas/tslib.pyx":3075 * # values within the format string is very important; it eliminates * # possible ambiguity for what something represents. * time_tuple = time.struct_time((1999,3,17,22,44,55,2,76,0)) # <<<<<<<<<<<<<< * date_time = [None, None, None] * date_time[0] = time.strftime("%c", time_tuple).lower() */ __pyx_k_tuple_161 = PyTuple_Pack(9, __pyx_int_1999, __pyx_int_3, __pyx_int_17, __pyx_int_22, __pyx_int_44, __pyx_int_55, __pyx_int_2, __pyx_int_76, __pyx_int_0); if (unlikely(!__pyx_k_tuple_161)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3075; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_161); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_161)); __pyx_k_tuple_162 = PyTuple_Pack(1, ((PyObject *)__pyx_k_tuple_161)); if (unlikely(!__pyx_k_tuple_162)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3075; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_162); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_162)); /* "pandas/tslib.pyx":3080 * date_time[1] = time.strftime("%x", time_tuple).lower() * date_time[2] = time.strftime("%X", time_tuple).lower() * replacement_pairs = [('%', '%%'), (self.f_weekday[2], '%A'), # <<<<<<<<<<<<<< * (self.f_month[3], '%B'), (self.a_weekday[2], '%a'), * (self.a_month[3], '%b'), (self.am_pm[1], '%p'), */ __pyx_k_tuple_167 = PyTuple_Pack(2, ((PyObject *)__pyx_kp_s_86), ((PyObject *)__pyx_kp_s_166)); if (unlikely(!__pyx_k_tuple_167)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3080; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_167); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_167)); /* "pandas/tslib.pyx":3083 * (self.f_month[3], '%B'), (self.a_weekday[2], '%a'), * (self.a_month[3], '%b'), (self.am_pm[1], '%p'), * ('1999', '%Y'), ('99', '%y'), ('22', '%H'), # <<<<<<<<<<<<<< * ('44', '%M'), ('55', '%S'), ('76', '%j'), * ('17', '%d'), ('03', '%m'), ('3', '%m'), */ __pyx_k_tuple_172 = PyTuple_Pack(2, ((PyObject *)__pyx_kp_s__1999), ((PyObject *)__pyx_kp_s_127)); if (unlikely(!__pyx_k_tuple_172)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3083; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_172); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_172)); __pyx_k_tuple_174 = PyTuple_Pack(2, ((PyObject *)__pyx_kp_s__99), ((PyObject *)__pyx_kp_s_173)); if (unlikely(!__pyx_k_tuple_174)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3083; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_174); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_174)); __pyx_k_tuple_176 = PyTuple_Pack(2, ((PyObject *)__pyx_kp_s__22), ((PyObject *)__pyx_kp_s_175)); if (unlikely(!__pyx_k_tuple_176)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3083; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_176); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_176)); /* "pandas/tslib.pyx":3084 * (self.a_month[3], '%b'), (self.am_pm[1], '%p'), * ('1999', '%Y'), ('99', '%y'), ('22', '%H'), * ('44', '%M'), ('55', '%S'), ('76', '%j'), # <<<<<<<<<<<<<< * ('17', '%d'), ('03', '%m'), ('3', '%m'), * # '3' needed for when no leading zero. */ __pyx_k_tuple_178 = PyTuple_Pack(2, ((PyObject *)__pyx_kp_s__44), ((PyObject *)__pyx_kp_s_177)); if (unlikely(!__pyx_k_tuple_178)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3084; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_178); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_178)); __pyx_k_tuple_180 = PyTuple_Pack(2, ((PyObject *)__pyx_kp_s__55), ((PyObject *)__pyx_kp_s_179)); if (unlikely(!__pyx_k_tuple_180)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3084; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_180); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_180)); __pyx_k_tuple_182 = PyTuple_Pack(2, ((PyObject *)__pyx_kp_s__76), ((PyObject *)__pyx_kp_s_181)); if (unlikely(!__pyx_k_tuple_182)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3084; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_182); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_182)); /* "pandas/tslib.pyx":3085 * ('1999', '%Y'), ('99', '%y'), ('22', '%H'), * ('44', '%M'), ('55', '%S'), ('76', '%j'), * ('17', '%d'), ('03', '%m'), ('3', '%m'), # <<<<<<<<<<<<<< * # '3' needed for when no leading zero. * ('2', '%w'), ('10', '%I')] */ __pyx_k_tuple_183 = PyTuple_Pack(2, ((PyObject *)__pyx_kp_s__17), ((PyObject *)__pyx_kp_s_143)); if (unlikely(!__pyx_k_tuple_183)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3085; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_183); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_183)); __pyx_k_tuple_185 = PyTuple_Pack(2, ((PyObject *)__pyx_kp_s__03), ((PyObject *)__pyx_kp_s_184)); if (unlikely(!__pyx_k_tuple_185)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3085; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_185); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_185)); __pyx_k_tuple_186 = PyTuple_Pack(2, ((PyObject *)__pyx_kp_s__3), ((PyObject *)__pyx_kp_s_184)); if (unlikely(!__pyx_k_tuple_186)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3085; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_186); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_186)); /* "pandas/tslib.pyx":3087 * ('17', '%d'), ('03', '%m'), ('3', '%m'), * # '3' needed for when no leading zero. * ('2', '%w'), ('10', '%I')] # <<<<<<<<<<<<<< * replacement_pairs.extend([(tz, "%Z") for tz_values in self.timezone * for tz in tz_values]) */ __pyx_k_tuple_188 = PyTuple_Pack(2, ((PyObject *)__pyx_kp_s__2), ((PyObject *)__pyx_kp_s_187)); if (unlikely(!__pyx_k_tuple_188)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3087; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_188); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_188)); __pyx_k_tuple_190 = PyTuple_Pack(2, ((PyObject *)__pyx_kp_s__10), ((PyObject *)__pyx_kp_s_189)); if (unlikely(!__pyx_k_tuple_190)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3087; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_190); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_190)); /* "pandas/tslib.pyx":3090 * replacement_pairs.extend([(tz, "%Z") for tz_values in self.timezone * for tz in tz_values]) * for offset,directive in ((0,'%c'), (1,'%x'), (2,'%X')): # <<<<<<<<<<<<<< * current_format = date_time[offset] * for old, new in replacement_pairs: */ __pyx_k_tuple_192 = PyTuple_Pack(2, __pyx_int_0, ((PyObject *)__pyx_kp_s_163)); if (unlikely(!__pyx_k_tuple_192)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3090; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_192); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_192)); __pyx_k_tuple_193 = PyTuple_Pack(2, __pyx_int_1, ((PyObject *)__pyx_kp_s_164)); if (unlikely(!__pyx_k_tuple_193)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3090; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_193); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_193)); __pyx_k_tuple_194 = PyTuple_Pack(2, __pyx_int_2, ((PyObject *)__pyx_kp_s_165)); if (unlikely(!__pyx_k_tuple_194)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3090; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_194); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_194)); __pyx_k_tuple_195 = PyTuple_Pack(3, ((PyObject *)__pyx_k_tuple_192), ((PyObject *)__pyx_k_tuple_193), ((PyObject *)__pyx_k_tuple_194)); if (unlikely(!__pyx_k_tuple_195)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3090; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_195); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_195)); /* "pandas/tslib.pyx":3102 * # 2005-01-03 occurs before the first Monday of the year. Otherwise * # %U is used. * time_tuple = time.struct_time((1999,1,3,1,1,1,6,3,0)) # <<<<<<<<<<<<<< * if '00' in time.strftime(directive, time_tuple): * U_W = '%W' */ __pyx_k_tuple_196 = PyTuple_Pack(9, __pyx_int_1999, __pyx_int_1, __pyx_int_3, __pyx_int_1, __pyx_int_1, __pyx_int_1, __pyx_int_6, __pyx_int_3, __pyx_int_0); if (unlikely(!__pyx_k_tuple_196)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3102; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_196); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_196)); __pyx_k_tuple_197 = PyTuple_Pack(1, ((PyObject *)__pyx_k_tuple_196)); if (unlikely(!__pyx_k_tuple_197)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3102; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_197); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_197)); /* "pandas/tslib.pyx":3161 * 'A': self.__seqToRE(self.locale_time.f_weekday, 'A'), * 'a': self.__seqToRE(self.locale_time.a_weekday, 'a'), * 'B': self.__seqToRE(self.locale_time.f_month[1:], 'B'), # <<<<<<<<<<<<<< * 'b': self.__seqToRE(self.locale_time.a_month[1:], 'b'), * 'p': self.__seqToRE(self.locale_time.am_pm, 'p'), */ __pyx_k_slice_212 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_k_slice_212)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3161; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_slice_212); __Pyx_GIVEREF(__pyx_k_slice_212); /* "pandas/tslib.pyx":3162 * 'a': self.__seqToRE(self.locale_time.a_weekday, 'a'), * 'B': self.__seqToRE(self.locale_time.f_month[1:], 'B'), * 'b': self.__seqToRE(self.locale_time.a_month[1:], 'b'), # <<<<<<<<<<<<<< * 'p': self.__seqToRE(self.locale_time.am_pm, 'p'), * 'Z': self.__seqToRE((tz for tz_names in self.locale_time.timezone */ __pyx_k_slice_213 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_k_slice_213)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3162; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_slice_213); __Pyx_GIVEREF(__pyx_k_slice_213); /* "pandas/tslib.pyx":3168 * 'Z'), * '%': '%'}) * base.__setitem__('W', base.__getitem__('U').replace('U', 'W')) # <<<<<<<<<<<<<< * base.__setitem__('c', self.pattern(self.locale_time.LC_date_time)) * base.__setitem__('x', self.pattern(self.locale_time.LC_date)) */ __pyx_k_tuple_214 = PyTuple_Pack(1, ((PyObject *)__pyx_n_s__U)); if (unlikely(!__pyx_k_tuple_214)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3168; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_214); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_214)); __pyx_k_tuple_215 = PyTuple_Pack(2, ((PyObject *)__pyx_n_s__U), ((PyObject *)__pyx_n_s__W)); if (unlikely(!__pyx_k_tuple_215)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3168; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_215); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_215)); /* "pandas/tslib.pyx":3203 * # as regex syntax. Cannot use re.escape since we have to deal with * # format directives (%m, etc.). * regex_chars = re_compile(r"([\\.^$*+?\(\){}\[\]|])") # <<<<<<<<<<<<<< * format = regex_chars.sub(r"\\\1", format) * whitespace_replacement = re_compile('\s+') */ __pyx_k_tuple_220 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_219)); if (unlikely(!__pyx_k_tuple_220)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3203; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_220); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_220)); /* "pandas/tslib.pyx":3205 * regex_chars = re_compile(r"([\\.^$*+?\(\){}\[\]|])") * format = regex_chars.sub(r"\\\1", format) * whitespace_replacement = re_compile('\s+') # <<<<<<<<<<<<<< * format = whitespace_replacement.sub('\s+', format) * while '%' in format: */ __pyx_k_tuple_223 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_222)); if (unlikely(!__pyx_k_tuple_223)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3205; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_223); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_223)); /* "pandas/tslib.pyx":3208 * format = whitespace_replacement.sub('\s+', format) * while '%' in format: * directive_index = format.index('%')+1 # <<<<<<<<<<<<<< * processed_format = "%s%s%s" % (processed_format, * format[:directive_index-1], */ __pyx_k_tuple_224 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_86)); if (unlikely(!__pyx_k_tuple_224)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3208; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_224); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_224)); /* "util.pxd":40 * i += sz * elif i >= sz or sz == 0: * raise IndexError('index out of bounds') # <<<<<<<<<<<<<< * * return get_value_1d(arr, i) */ __pyx_k_tuple_228 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_31)); if (unlikely(!__pyx_k_tuple_228)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 40; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_228); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_228)); /* "util.pxd":57 * i += sz * elif i >= sz: * raise IndexError('index out of bounds') # <<<<<<<<<<<<<< * * assign_value_1d(arr, i, value) */ __pyx_k_tuple_229 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_31)); if (unlikely(!__pyx_k_tuple_229)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 57; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_229); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_229)); /* "numpy.pxd":217 * 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_k_tuple_231 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_u_230)); if (unlikely(!__pyx_k_tuple_231)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 217; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_231); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_231)); /* "numpy.pxd":221 * 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_k_tuple_233 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_u_232)); if (unlikely(!__pyx_k_tuple_233)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 221; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_233); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_233)); /* "numpy.pxd":259 * if ((descr.byteorder == '>' and little_endian) or * (descr.byteorder == '<' 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_k_tuple_235 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_u_234)); if (unlikely(!__pyx_k_tuple_235)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 259; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_235); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_235)); /* "numpy.pxd":803 * * if (end - f) - (new_offset - offset[0]) < 15: * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") # <<<<<<<<<<<<<< * * if ((child.byteorder == '>' and little_endian) or */ __pyx_k_tuple_238 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_u_237)); if (unlikely(!__pyx_k_tuple_238)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 803; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_238); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_238)); /* "numpy.pxd":807 * if ((child.byteorder == '>' and little_endian) or * (child.byteorder == '<' 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_k_tuple_239 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_u_234)); if (unlikely(!__pyx_k_tuple_239)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 807; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_239); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_239)); /* "numpy.pxd":827 * 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_k_tuple_241 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_u_240)); if (unlikely(!__pyx_k_tuple_241)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 827; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_241); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_241)); /* "pandas/tslib.pyx":63 * * # < numpy 1.7 compat for NaT * compat_NaT = np.array([NPY_NAT]).astype('m8[ns]').item() # <<<<<<<<<<<<<< * * # numpy actual nat object */ __pyx_k_tuple_247 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_68)); if (unlikely(!__pyx_k_tuple_247)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_247); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_247)); /* "pandas/tslib.pyx":66 * * # numpy actual nat object * np_NaT = np.datetime64('NaT',dtype='M8') # <<<<<<<<<<<<<< * * try: */ __pyx_k_tuple_248 = PyTuple_Pack(1, ((PyObject *)__pyx_n_s__NaT)); if (unlikely(!__pyx_k_tuple_248)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 66; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_248); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_248)); /* "pandas/tslib.pyx":73 * basestring = str * * def ints_to_pydatetime(ndarray[int64_t] arr, tz=None): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = len(arr) */ __pyx_k_tuple_249 = PyTuple_Pack(11, ((PyObject *)__pyx_n_s__arr), ((PyObject *)__pyx_n_s__tz), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__n), ((PyObject *)__pyx_n_s__dts), ((PyObject *)__pyx_n_s__result), ((PyObject *)__pyx_n_s__dt), ((PyObject *)__pyx_n_s__trans), ((PyObject *)__pyx_n_s__deltas), ((PyObject *)__pyx_n_s__pos), ((PyObject *)__pyx_n_s__inf)); if (unlikely(!__pyx_k_tuple_249)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 73; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_249); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_249)); __pyx_k_codeobj_250 = (PyObject*)__Pyx_PyCode_New(2, 0, 11, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_249, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_251, __pyx_n_s__ints_to_pydatetime, 73, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_250)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 73; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/tslib.pyx":128 * from dateutil.tz import tzlocal * * def _is_tzlocal(tz): # <<<<<<<<<<<<<< * return isinstance(tz, tzlocal) * */ __pyx_k_tuple_254 = PyTuple_Pack(1, ((PyObject *)__pyx_n_s__tz)); if (unlikely(!__pyx_k_tuple_254)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_254); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_254)); __pyx_k_codeobj_255 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_254, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_251, __pyx_n_s___is_tzlocal, 128, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_255)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/tslib.pyx":131 * return isinstance(tz, tzlocal) * * def _is_fixed_offset(tz): # <<<<<<<<<<<<<< * try: * tz._transition_info */ __pyx_k_tuple_256 = PyTuple_Pack(1, ((PyObject *)__pyx_n_s__tz)); if (unlikely(!__pyx_k_tuple_256)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 131; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_256); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_256)); __pyx_k_codeobj_257 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_256, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_251, __pyx_n_s___is_fixed_offset, 131, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_257)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 131; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/tslib.pyx":138 * return True * * _zero_time = datetime_time(0, 0) # <<<<<<<<<<<<<< * * # Python front end to C extension type _Timestamp */ __pyx_k_tuple_258 = PyTuple_Pack(2, __pyx_int_0, __pyx_int_0); if (unlikely(!__pyx_k_tuple_258)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 138; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_258); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_258)); /* "pandas/tslib.pyx":150 * * @classmethod * def fromordinal(cls, ordinal, offset=None, tz=None): # <<<<<<<<<<<<<< * """ passed an ordinal, translate and convert to a ts * note: by definition there cannot be any tz info on the ordinal itself """ */ __pyx_k_tuple_259 = PyTuple_Pack(4, ((PyObject *)__pyx_n_s__cls), ((PyObject *)__pyx_n_s__ordinal), ((PyObject *)__pyx_n_s__offset), ((PyObject *)__pyx_n_s__tz)); if (unlikely(!__pyx_k_tuple_259)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 150; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_259); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_259)); __pyx_k_codeobj_260 = (PyObject*)__Pyx_PyCode_New(4, 0, 4, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_259, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_251, __pyx_n_s__fromordinal, 150, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_260)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 150; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_k_tuple_261 = PyTuple_Pack(2, ((PyObject *)Py_None), ((PyObject *)Py_None)); if (unlikely(!__pyx_k_tuple_261)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 150; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_261); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_261)); /* "pandas/tslib.pyx":156 * * @classmethod * def now(cls, tz=None): # <<<<<<<<<<<<<< * """ compat now with datetime """ * if isinstance(tz, basestring): */ __pyx_k_tuple_263 = PyTuple_Pack(2, ((PyObject *)__pyx_n_s__cls), ((PyObject *)__pyx_n_s__tz)); if (unlikely(!__pyx_k_tuple_263)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 156; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_263); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_263)); __pyx_k_codeobj_264 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_263, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_251, __pyx_n_s__now, 156, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_264)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 156; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_k_tuple_265 = PyTuple_Pack(1, ((PyObject *)Py_None)); if (unlikely(!__pyx_k_tuple_265)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 156; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_265); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_265)); /* "pandas/tslib.pyx":163 * * @classmethod * def today(cls): # <<<<<<<<<<<<<< * """ compat today with datetime """ * return cls(datetime.today()) */ __pyx_k_tuple_267 = PyTuple_Pack(1, ((PyObject *)__pyx_n_s__cls)); if (unlikely(!__pyx_k_tuple_267)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 163; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_267); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_267)); __pyx_k_codeobj_268 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_267, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_251, __pyx_n_s__today, 163, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_268)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 163; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/tslib.pyx":168 * * @classmethod * def utcnow(cls): # <<<<<<<<<<<<<< * return cls.now('UTC') * */ __pyx_k_tuple_270 = PyTuple_Pack(1, ((PyObject *)__pyx_n_s__cls)); if (unlikely(!__pyx_k_tuple_270)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_270); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_270)); __pyx_k_codeobj_271 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_270, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_251, __pyx_n_s__utcnow, 168, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_271)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/tslib.pyx":171 * return cls.now('UTC') * * def __new__(cls, object ts_input, object offset=None, tz=None, unit=None): # <<<<<<<<<<<<<< * cdef _TSObject ts * cdef _Timestamp ts_base */ __pyx_k_tuple_273 = PyTuple_Pack(7, ((PyObject *)__pyx_n_s__cls), ((PyObject *)__pyx_n_s__ts_input), ((PyObject *)__pyx_n_s__offset), ((PyObject *)__pyx_n_s__tz), ((PyObject *)__pyx_n_s__unit), ((PyObject *)__pyx_n_s__ts), ((PyObject *)__pyx_n_s__ts_base)); if (unlikely(!__pyx_k_tuple_273)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 171; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_273); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_273)); __pyx_k_codeobj_274 = (PyObject*)__Pyx_PyCode_New(5, 0, 7, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_273, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_251, __pyx_n_s____new__, 171, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_274)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 171; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_k_tuple_275 = PyTuple_Pack(3, ((PyObject *)Py_None), ((PyObject *)Py_None), ((PyObject *)Py_None)); if (unlikely(!__pyx_k_tuple_275)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 171; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_275); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_275)); /* "pandas/tslib.pyx":198 * return ts_base * * def __repr__(self): # <<<<<<<<<<<<<< * result = self._repr_base * zone = None */ __pyx_k_tuple_277 = PyTuple_Pack(4, ((PyObject *)__pyx_n_s__self), ((PyObject *)__pyx_n_s__result), ((PyObject *)__pyx_n_s__zone), ((PyObject *)__pyx_n_s__year2000)); if (unlikely(!__pyx_k_tuple_277)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 198; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_277); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_277)); __pyx_k_codeobj_278 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_277, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_251, __pyx_n_s____repr__, 198, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_278)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 198; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/tslib.pyx":221 * * @property * def _date_repr(self): # <<<<<<<<<<<<<< * # Ideal here would be self.strftime("%Y-%m-%d"), but * # the datetime strftime() methods require year >= 1900 */ __pyx_k_tuple_280 = PyTuple_Pack(1, ((PyObject *)__pyx_n_s__self)); if (unlikely(!__pyx_k_tuple_280)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 221; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_280); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_280)); __pyx_k_codeobj_281 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_280, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_251, __pyx_n_s___date_repr, 221, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_281)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 221; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/tslib.pyx":227 * * @property * def _time_repr(self): # <<<<<<<<<<<<<< * result = '%.2d:%.2d:%.2d' % (self.hour, self.minute, self.second) * */ __pyx_k_tuple_283 = PyTuple_Pack(3, ((PyObject *)__pyx_n_s__self), ((PyObject *)__pyx_n_s__result), ((PyObject *)__pyx_n_s__nanos)); if (unlikely(!__pyx_k_tuple_283)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 227; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_283); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_283)); __pyx_k_codeobj_284 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_283, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_251, __pyx_n_s___time_repr, 227, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_284)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 227; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/tslib.pyx":239 * * @property * def _repr_base(self): # <<<<<<<<<<<<<< * return '%s %s' % (self._date_repr, self._time_repr) * */ __pyx_k_tuple_286 = PyTuple_Pack(1, ((PyObject *)__pyx_n_s__self)); if (unlikely(!__pyx_k_tuple_286)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 239; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_286); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_286)); __pyx_k_codeobj_287 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_286, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_251, __pyx_n_s___repr_base, 239, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_287)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 239; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/tslib.pyx":243 * * @property * def tz(self): # <<<<<<<<<<<<<< * """ * Alias for tzinfo */ __pyx_k_tuple_289 = PyTuple_Pack(1, ((PyObject *)__pyx_n_s__self)); if (unlikely(!__pyx_k_tuple_289)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_289); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_289)); __pyx_k_codeobj_290 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_289, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_251, __pyx_n_s__tz, 243, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_290)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/tslib.pyx":250 * * @property * def freq(self): # <<<<<<<<<<<<<< * return self.offset * */ __pyx_k_tuple_292 = PyTuple_Pack(1, ((PyObject *)__pyx_n_s__self)); if (unlikely(!__pyx_k_tuple_292)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 250; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_292); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_292)); __pyx_k_codeobj_293 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_292, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_251, __pyx_n_s__freq, 250, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_293)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 250; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/tslib.pyx":253 * return self.offset * * def __setstate__(self, state): # <<<<<<<<<<<<<< * self.value = state[0] * self.offset = state[1] */ __pyx_k_tuple_295 = PyTuple_Pack(2, ((PyObject *)__pyx_n_s__self), ((PyObject *)__pyx_n_s__state)); if (unlikely(!__pyx_k_tuple_295)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 253; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_295); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_295)); __pyx_k_codeobj_296 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_295, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_251, __pyx_n_s____setstate__, 253, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_296)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 253; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/tslib.pyx":258 * self.tzinfo = state[2] * * def __reduce__(self): # <<<<<<<<<<<<<< * object_state = self.value, self.offset, self.tzinfo * return (Timestamp, object_state) */ __pyx_k_tuple_298 = PyTuple_Pack(2, ((PyObject *)__pyx_n_s__self), ((PyObject *)__pyx_n_s__object_state)); if (unlikely(!__pyx_k_tuple_298)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 258; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_298); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_298)); __pyx_k_codeobj_299 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_298, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_251, __pyx_n_s____reduce__, 258, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_299)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 258; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/tslib.pyx":262 * return (Timestamp, object_state) * * def to_period(self, freq=None): # <<<<<<<<<<<<<< * """ * Return an period of which this timestamp is an observation. */ __pyx_k_tuple_301 = PyTuple_Pack(3, ((PyObject *)__pyx_n_s__self), ((PyObject *)__pyx_n_s__freq), ((PyObject *)__pyx_n_s__Period)); if (unlikely(!__pyx_k_tuple_301)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 262; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_301); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_301)); __pyx_k_codeobj_302 = (PyObject*)__Pyx_PyCode_New(2, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_301, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_251, __pyx_n_s__to_period, 262, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_302)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 262; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_k_tuple_303 = PyTuple_Pack(1, ((PyObject *)Py_None)); if (unlikely(!__pyx_k_tuple_303)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 262; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_303); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_303)); /* "pandas/tslib.pyx":274 * * @property * def dayofweek(self): # <<<<<<<<<<<<<< * return self.weekday() * */ __pyx_k_tuple_305 = PyTuple_Pack(1, ((PyObject *)__pyx_n_s__self)); if (unlikely(!__pyx_k_tuple_305)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 274; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_305); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_305)); __pyx_k_codeobj_306 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_305, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_251, __pyx_n_s__dayofweek, 274, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_306)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 274; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/tslib.pyx":278 * * @property * def dayofyear(self): # <<<<<<<<<<<<<< * return self._get_field('doy') * */ __pyx_k_tuple_308 = PyTuple_Pack(1, ((PyObject *)__pyx_n_s__self)); if (unlikely(!__pyx_k_tuple_308)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 278; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_308); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_308)); __pyx_k_codeobj_309 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_308, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_251, __pyx_n_s__dayofyear, 278, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_309)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 278; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/tslib.pyx":282 * * @property * def week(self): # <<<<<<<<<<<<<< * return self._get_field('woy') * */ __pyx_k_tuple_311 = PyTuple_Pack(1, ((PyObject *)__pyx_n_s__self)); if (unlikely(!__pyx_k_tuple_311)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 282; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_311); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_311)); __pyx_k_codeobj_312 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_311, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_251, __pyx_n_s__week, 282, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_312)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 282; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/tslib.pyx":288 * * @property * def quarter(self): # <<<<<<<<<<<<<< * return self._get_field('q') * */ __pyx_k_tuple_314 = PyTuple_Pack(1, ((PyObject *)__pyx_n_s__self)); if (unlikely(!__pyx_k_tuple_314)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 288; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_314); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_314)); __pyx_k_codeobj_315 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_314, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_251, __pyx_n_s__quarter, 288, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_315)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 288; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/tslib.pyx":292 * * @property * def freqstr(self): # <<<<<<<<<<<<<< * return getattr(self.offset, 'freqstr', self.offset) * */ __pyx_k_tuple_317 = PyTuple_Pack(1, ((PyObject *)__pyx_n_s__self)); if (unlikely(!__pyx_k_tuple_317)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 292; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_317); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_317)); __pyx_k_codeobj_318 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_317, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_251, __pyx_n_s__freqstr, 292, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_318)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 292; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/tslib.pyx":296 * * @property * def asm8(self): # <<<<<<<<<<<<<< * return np.int64(self.value).view('M8[ns]') * */ __pyx_k_tuple_320 = PyTuple_Pack(1, ((PyObject *)__pyx_n_s__self)); if (unlikely(!__pyx_k_tuple_320)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 296; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_320); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_320)); __pyx_k_codeobj_321 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_320, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_251, __pyx_n_s__asm8, 296, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_321)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 296; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/tslib.pyx":299 * return np.int64(self.value).view('M8[ns]') * * def tz_localize(self, tz): # <<<<<<<<<<<<<< * """ * Convert naive Timestamp to local time zone */ __pyx_k_tuple_323 = PyTuple_Pack(2, ((PyObject *)__pyx_n_s__self), ((PyObject *)__pyx_n_s__tz)); if (unlikely(!__pyx_k_tuple_323)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 299; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_323); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_323)); __pyx_k_codeobj_324 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_323, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_251, __pyx_n_s__tz_localize, 299, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_324)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 299; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/tslib.pyx":318 * 'tz_convert for conversions') * * def tz_convert(self, tz): # <<<<<<<<<<<<<< * """ * Convert Timestamp to another time zone or localize to requested time */ __pyx_k_tuple_326 = PyTuple_Pack(2, ((PyObject *)__pyx_n_s__self), ((PyObject *)__pyx_n_s__tz)); if (unlikely(!__pyx_k_tuple_326)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 318; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_326); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_326)); __pyx_k_codeobj_327 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_326, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_251, __pyx_n_s__tz_convert, 318, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_327)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 318; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/tslib.pyx":341 * astimezone = tz_convert * * def replace(self, **kwds): # <<<<<<<<<<<<<< * return Timestamp(datetime.replace(self, **kwds), * offset=self.offset) */ __pyx_k_tuple_329 = PyTuple_Pack(3, ((PyObject *)__pyx_n_s__self), ((PyObject *)__pyx_n_s__kwds), ((PyObject *)__pyx_n_s__kwds)); if (unlikely(!__pyx_k_tuple_329)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 341; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_329); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_329)); __pyx_k_codeobj_330 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_329, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_251, __pyx_n_s__replace, 341, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_330)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 341; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/tslib.pyx":345 * offset=self.offset) * * def to_pydatetime(self, warn=True): # <<<<<<<<<<<<<< * """ * If warn=True, issue warning if nanoseconds is nonzero */ __pyx_k_tuple_332 = PyTuple_Pack(4, ((PyObject *)__pyx_n_s__self), ((PyObject *)__pyx_n_s__warn), ((PyObject *)__pyx_n_s__dts), ((PyObject *)__pyx_n_s__ts)); if (unlikely(!__pyx_k_tuple_332)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 345; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_332); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_332)); __pyx_k_codeobj_333 = (PyObject*)__Pyx_PyCode_New(2, 0, 4, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_332, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_251, __pyx_n_s__to_pydatetime, 345, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_333)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 345; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/tslib.pyx":361 * ts.dts.us, ts.tzinfo) * * def isoformat(self, sep='T'): # <<<<<<<<<<<<<< * base = super(_Timestamp, self).isoformat(sep=sep) * if self.nanosecond == 0: */ __pyx_k_tuple_335 = PyTuple_Pack(5, ((PyObject *)__pyx_n_s__self), ((PyObject *)__pyx_n_s__sep), ((PyObject *)__pyx_n_s__base), ((PyObject *)__pyx_n_s__base1), ((PyObject *)__pyx_n_s__base2)); if (unlikely(!__pyx_k_tuple_335)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 361; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_335); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_335)); __pyx_k_codeobj_336 = (PyObject*)__Pyx_PyCode_New(2, 0, 5, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_335, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_251, __pyx_n_s__isoformat, 361, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_336)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 361; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_k_tuple_337 = PyTuple_Pack(1, ((PyObject *)((PyObject*)__pyx_n_s__T))); if (unlikely(!__pyx_k_tuple_337)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 361; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_337); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_337)); /* "pandas/tslib.pyx":378 * return base1 + base2 * * def _has_time_component(self): # <<<<<<<<<<<<<< * """ * Returns if the Timestamp has a time component */ __pyx_k_tuple_339 = PyTuple_Pack(1, ((PyObject *)__pyx_n_s__self)); if (unlikely(!__pyx_k_tuple_339)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 378; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_339); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_339)); __pyx_k_codeobj_340 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_339, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_251, __pyx_n_s___has_time_component, 378, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_340)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 378; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/tslib.pyx":392 * """(N)ot-(A)-(T)ime, the time equivalent of NaN""" * * def __new__(cls): # <<<<<<<<<<<<<< * cdef _NaT base * */ __pyx_k_tuple_343 = PyTuple_Pack(2, ((PyObject *)__pyx_n_s__cls), ((PyObject *)__pyx_n_s__base)); if (unlikely(!__pyx_k_tuple_343)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 392; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_343); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_343)); __pyx_k_codeobj_344 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_343, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_251, __pyx_n_s____new__, 392, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_344)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 392; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/tslib.pyx":401 * return base * * def __repr__(self): # <<<<<<<<<<<<<< * return 'NaT' * */ __pyx_k_tuple_346 = PyTuple_Pack(1, ((PyObject *)__pyx_n_s__self)); if (unlikely(!__pyx_k_tuple_346)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 401; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_346); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_346)); __pyx_k_codeobj_347 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_346, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_251, __pyx_n_s____repr__, 401, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_347)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 401; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/tslib.pyx":404 * return 'NaT' * * def __str__(self): # <<<<<<<<<<<<<< * return 'NaT' * */ __pyx_k_tuple_349 = PyTuple_Pack(1, ((PyObject *)__pyx_n_s__self)); if (unlikely(!__pyx_k_tuple_349)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 404; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_349); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_349)); __pyx_k_codeobj_350 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_349, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_251, __pyx_n_s____str__, 404, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_350)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 404; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/tslib.pyx":407 * return 'NaT' * * def __hash__(self): # <<<<<<<<<<<<<< * return iNaT * */ __pyx_k_tuple_352 = PyTuple_Pack(1, ((PyObject *)__pyx_n_s__self)); if (unlikely(!__pyx_k_tuple_352)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 407; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_352); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_352)); __pyx_k_codeobj_353 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_352, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_251, __pyx_n_s____hash__, 407, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_353)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 407; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/tslib.pyx":410 * return iNaT * * def weekday(self): # <<<<<<<<<<<<<< * return -1 * */ __pyx_k_tuple_355 = PyTuple_Pack(1, ((PyObject *)__pyx_n_s__self)); if (unlikely(!__pyx_k_tuple_355)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 410; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_355); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_355)); __pyx_k_codeobj_356 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_355, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_251, __pyx_n_s__weekday, 410, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_356)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 410; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/tslib.pyx":413 * return -1 * * def toordinal(self): # <<<<<<<<<<<<<< * return -1 * */ __pyx_k_tuple_358 = PyTuple_Pack(1, ((PyObject *)__pyx_n_s__self)); if (unlikely(!__pyx_k_tuple_358)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 413; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_358); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_358)); __pyx_k_codeobj_359 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_358, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_251, __pyx_n_s__toordinal, 413, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_359)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 413; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/tslib.pyx":444 * return ', tz=%s' % zone * * def is_timestamp_array(ndarray[object] values): # <<<<<<<<<<<<<< * cdef int i, n = len(values) * if n == 0: */ __pyx_k_tuple_363 = PyTuple_Pack(3, ((PyObject *)__pyx_n_s__values), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__n)); if (unlikely(!__pyx_k_tuple_363)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 444; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_363); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_363)); __pyx_k_codeobj_364 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_363, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_251, __pyx_n_s__is_timestamp_array, 444, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_364)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 444; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/tslib.pyx":494 * # Frequency inference * * def unique_deltas(ndarray[int64_t] arr): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = len(arr) */ __pyx_k_tuple_365 = PyTuple_Pack(9, ((PyObject *)__pyx_n_s__arr), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__n), ((PyObject *)__pyx_n_s__val), ((PyObject *)__pyx_n_s__k), ((PyObject *)__pyx_n_s__table), ((PyObject *)__pyx_n_s__ret), ((PyObject *)__pyx_n_s__uniques), ((PyObject *)__pyx_n_s__result)); if (unlikely(!__pyx_k_tuple_365)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 494; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_365); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_365)); __pyx_k_codeobj_366 = (PyObject*)__Pyx_PyCode_New(1, 0, 9, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_365, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_251, __pyx_n_s__unique_deltas, 494, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_366)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 494; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/tslib.pyx":522 * * * def apply_offset(ndarray[object] values, object offset): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = len(values) */ __pyx_k_tuple_367 = PyTuple_Pack(7, ((PyObject *)__pyx_n_s__values), ((PyObject *)__pyx_n_s__offset), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__n), ((PyObject *)__pyx_n_s__new_values), ((PyObject *)__pyx_n_s__boxed), ((PyObject *)__pyx_n_s__result)); if (unlikely(!__pyx_k_tuple_367)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 522; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_367); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_367)); __pyx_k_codeobj_368 = (PyObject*)__Pyx_PyCode_New(2, 0, 7, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_367, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_251, __pyx_n_s__apply_offset, 522, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_368)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 522; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/tslib.pyx":728 * * * def _delta_to_nanoseconds(delta): # <<<<<<<<<<<<<< * if hasattr(delta, 'delta'): * delta = delta.delta */ __pyx_k_tuple_369 = PyTuple_Pack(1, ((PyObject *)__pyx_n_s__delta)); if (unlikely(!__pyx_k_tuple_369)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 728; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_369); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_369)); __pyx_k_codeobj_370 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_369, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_251, __pyx_n_s_42, 728, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_370)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 728; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/tslib.pyx":890 * * * def get_timezone(tz): # <<<<<<<<<<<<<< * return _get_zone(tz) * */ __pyx_k_tuple_371 = PyTuple_Pack(1, ((PyObject *)__pyx_n_s__tz)); if (unlikely(!__pyx_k_tuple_371)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 890; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_371); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_371)); __pyx_k_codeobj_372 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_371, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_251, __pyx_n_s__get_timezone, 890, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_372)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 890; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/tslib.pyx":939 * # obj.dtval = _dts_to_pydatetime(&obj.dts) * * def datetime_to_datetime64(ndarray[object] values): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = len(values) */ __pyx_k_tuple_373 = PyTuple_Pack(9, ((PyObject *)__pyx_n_s__values), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__n), ((PyObject *)__pyx_n_s__val), ((PyObject *)__pyx_n_s__inferred_tz), ((PyObject *)__pyx_n_s__iresult), ((PyObject *)__pyx_n_s__dts), ((PyObject *)__pyx_n_s___ts), ((PyObject *)__pyx_n_s__result)); if (unlikely(!__pyx_k_tuple_373)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 939; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_373); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_373)); __pyx_k_codeobj_374 = (PyObject*)__Pyx_PyCode_New(1, 0, 9, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_373, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_251, __pyx_n_s_375, 939, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_374)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 939; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/tslib.pyx":976 * _not_datelike_strings = set(['a','A','m','M','p','P','t','T']) * * def _does_string_look_like_datetime(date_string): # <<<<<<<<<<<<<< * if date_string.startswith('0'): * # Strings starting with 0 are more consistent with a */ __pyx_k_tuple_376 = PyTuple_Pack(1, ((PyObject *)__pyx_n_s__date_string)); if (unlikely(!__pyx_k_tuple_376)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 976; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_376); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_376)); __pyx_k_codeobj_377 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_376, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_251, __pyx_n_s_55, 976, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_377)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 976; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/tslib.pyx":993 * return True * * def parse_datetime_string(date_string, **kwargs): # <<<<<<<<<<<<<< * if not _does_string_look_like_datetime(date_string): * raise ValueError('Given date string not likely a datetime.') */ __pyx_k_tuple_378 = PyTuple_Pack(4, ((PyObject *)__pyx_n_s__date_string), ((PyObject *)__pyx_n_s__kwargs), ((PyObject *)__pyx_n_s__kwargs), ((PyObject *)__pyx_n_s__dt)); if (unlikely(!__pyx_k_tuple_378)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 993; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_378); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_378)); __pyx_k_codeobj_379 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_378, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_251, __pyx_n_s_64, 993, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_379)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 993; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/tslib.pyx":1000 * return dt * * def array_to_datetime(ndarray[object] values, raise_=False, dayfirst=False, # <<<<<<<<<<<<<< * format=None, utc=None, coerce=False, unit=None): * cdef: */ __pyx_k_tuple_380 = PyTuple_Pack(19, ((PyObject *)__pyx_n_s__values), ((PyObject *)__pyx_n_s__raise_), ((PyObject *)__pyx_n_s__dayfirst), ((PyObject *)__pyx_n_s__format), ((PyObject *)__pyx_n_s__utc), ((PyObject *)__pyx_n_s__coerce), ((PyObject *)__pyx_n_s__unit), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__n), ((PyObject *)__pyx_n_s__val), ((PyObject *)__pyx_n_s__iresult), ((PyObject *)__pyx_n_s__oresult), ((PyObject *)__pyx_n_s__dts), ((PyObject *)__pyx_n_s__utc_convert), ((PyObject *)__pyx_n_s__seen_integer), ((PyObject *)__pyx_n_s__seen_datetime), ((PyObject *)__pyx_n_s___ts), ((PyObject *)__pyx_n_s__m), ((PyObject *)__pyx_n_s__result)); if (unlikely(!__pyx_k_tuple_380)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1000; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_380); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_380)); __pyx_k_codeobj_381 = (PyObject*)__Pyx_PyCode_New(7, 0, 19, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_380, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_251, __pyx_n_s__array_to_datetime, 1000, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_381)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1000; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/tslib.pyx":1169 * return oresult * * def array_to_timedelta64(ndarray[object] values, coerce=False): # <<<<<<<<<<<<<< * """ convert an ndarray to an array of ints that are timedeltas * force conversion if coerce = True, */ __pyx_k_tuple_382 = PyTuple_Pack(6, ((PyObject *)__pyx_n_s__values), ((PyObject *)__pyx_n_s__coerce), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__n), ((PyObject *)__pyx_n_s__iresult), ((PyObject *)__pyx_n_s__result)); if (unlikely(!__pyx_k_tuple_382)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1169; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_382); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_382)); __pyx_k_codeobj_383 = (PyObject*)__Pyx_PyCode_New(2, 0, 6, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_382, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_251, __pyx_n_s_384, 1169, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_383)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1169; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/tslib.pyx":1185 * return iresult * * def convert_to_timedelta(object ts, object unit='ns', coerce=False): # <<<<<<<<<<<<<< * return convert_to_timedelta64(ts, unit, coerce) * */ __pyx_k_tuple_385 = PyTuple_Pack(3, ((PyObject *)__pyx_n_s__ts), ((PyObject *)__pyx_n_s__unit), ((PyObject *)__pyx_n_s__coerce)); if (unlikely(!__pyx_k_tuple_385)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1185; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_385); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_385)); __pyx_k_codeobj_386 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_385, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_251, __pyx_n_s_387, 1185, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_386)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1185; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/tslib.pyx":1244 * return ts.astype('timedelta64[ns]') * * def repr_timedelta64(object value, format=None): # <<<<<<<<<<<<<< * """ * provide repr for timedelta64 */ __pyx_k_tuple_388 = PyTuple_Pack(12, ((PyObject *)__pyx_n_s__value), ((PyObject *)__pyx_n_s__format), ((PyObject *)__pyx_n_s__ivalue), ((PyObject *)__pyx_n_s__frac), ((PyObject *)__pyx_n_s__sign), ((PyObject *)__pyx_n_s__days), ((PyObject *)__pyx_n_s__hours), ((PyObject *)__pyx_n_s__minutes), ((PyObject *)__pyx_n_s__seconds), ((PyObject *)__pyx_n_s__seconds_pretty), ((PyObject *)__pyx_n_s__sp), ((PyObject *)__pyx_n_s__sign_pretty)); if (unlikely(!__pyx_k_tuple_388)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1244; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_388); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_388)); __pyx_k_codeobj_389 = (PyObject*)__Pyx_PyCode_New(2, 0, 12, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_388, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_251, __pyx_n_s__repr_timedelta64, 1244, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_389)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1244; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/tslib.pyx":1313 * * * def array_strptime(ndarray[object] values, object fmt, coerce=False): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = len(values) */ __pyx_k_tuple_390 = PyTuple_Pack(37, ((PyObject *)__pyx_n_s__values), ((PyObject *)__pyx_n_s__fmt), ((PyObject *)__pyx_n_s__coerce), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__n), ((PyObject *)__pyx_n_s__dts), ((PyObject *)__pyx_n_s__iresult), ((PyObject *)__pyx_n_s__year), ((PyObject *)__pyx_n_s__month), ((PyObject *)__pyx_n_s__day), ((PyObject *)__pyx_n_s__minute), ((PyObject *)__pyx_n_s__hour), ((PyObject *)__pyx_n_s__second), ((PyObject *)__pyx_n_s__fraction), ((PyObject *)__pyx_n_s__weekday), ((PyObject *)__pyx_n_s__julian), ((PyObject *)__pyx_n_s__val), ((PyObject *)__pyx_n_s__locale_time), ((PyObject *)__pyx_n_s__format_regex), ((PyObject *)__pyx_n_s__err), ((PyObject *)__pyx_n_s__bad_directive), ((PyObject *)__pyx_n_s__result), ((PyObject *)__pyx_n_s___parse_code_table), ((PyObject *)__pyx_n_s__parse_code), ((PyObject *)__pyx_n_s__found), ((PyObject *)__pyx_n_s__tz), ((PyObject *)__pyx_n_s__week_of_year), ((PyObject *)__pyx_n_s__week_of_year_start), ((PyObject *)__pyx_n_s__found_dict), ((PyObject *)__pyx_n_s__group_key), ((PyObject *)__pyx_n_s__ampm), ((PyObject *)__pyx_n_s__s), ((PyObject *)__pyx_n_s__found_zone), ((PyObject *)__pyx_n_s__value), ((PyObject *)__pyx_n_s__tz_values), ((PyObject *)__pyx_n_s__week_starts_Mon), ((PyObject *)__pyx_n_s__datetime_result)); if (unlikely(!__pyx_k_tuple_390)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1313; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_390); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_390)); __pyx_k_codeobj_391 = (PyObject*)__Pyx_PyCode_New(3, 0, 37, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_390, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_251, __pyx_n_s__array_strptime, 1313, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_391)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1313; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/tslib.pyx":1599 * return (base*m) + (frac*m) * * def cast_to_nanoseconds(ndarray arr): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = arr.size */ __pyx_k_tuple_392 = PyTuple_Pack(9, ((PyObject *)__pyx_n_s__arr), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__n), ((PyObject *)__pyx_n_s__ivalues), ((PyObject *)__pyx_n_s__iresult), ((PyObject *)__pyx_n_s__unit), ((PyObject *)__pyx_n_s__dts), ((PyObject *)__pyx_n_s__shape), ((PyObject *)__pyx_n_s__result)); if (unlikely(!__pyx_k_tuple_392)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1599; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_392); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_392)); __pyx_k_codeobj_393 = (PyObject*)__Pyx_PyCode_New(1, 0, 9, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_392, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_251, __pyx_n_s__cast_to_nanoseconds, 1599, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_393)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1599; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/tslib.pyx":1631 * * * def pydt_to_i8(object pydt): # <<<<<<<<<<<<<< * ''' * Convert to int64 representation compatible with numpy datetime64; converts */ __pyx_k_tuple_394 = PyTuple_Pack(2, ((PyObject *)__pyx_n_s__pydt), ((PyObject *)__pyx_n_s__ts)); if (unlikely(!__pyx_k_tuple_394)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1631; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_394); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_394)); __pyx_k_codeobj_395 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_394, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_251, __pyx_n_s__pydt_to_i8, 1631, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_395)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1631; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/tslib.pyx":1643 * return ts.value * * def i8_to_pydt(int64_t i8, object tzinfo = None): # <<<<<<<<<<<<<< * ''' * Inverse of pydt_to_i8 */ __pyx_k_tuple_396 = PyTuple_Pack(2, ((PyObject *)__pyx_n_s__i8), ((PyObject *)__pyx_n_s__tzinfo)); if (unlikely(!__pyx_k_tuple_396)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1643; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_396); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_396)); __pyx_k_codeobj_397 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_396, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_251, __pyx_n_s__i8_to_pydt, 1643, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_397)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1643; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/tslib.pyx":1660 * have_pytz = False * * def tz_convert(ndarray[int64_t] vals, object tz1, object tz2): # <<<<<<<<<<<<<< * cdef: * ndarray[int64_t] utc_dates, result, trans, deltas */ __pyx_k_tuple_398 = PyTuple_Pack(17, ((PyObject *)__pyx_n_s__vals), ((PyObject *)__pyx_n_s__tz1), ((PyObject *)__pyx_n_s__tz2), ((PyObject *)__pyx_n_s__utc_dates), ((PyObject *)__pyx_n_s__result), ((PyObject *)__pyx_n_s__trans), ((PyObject *)__pyx_n_s__deltas), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__pos), ((PyObject *)__pyx_n_s__n), ((PyObject *)__pyx_n_s__v), ((PyObject *)__pyx_n_s__offset), ((PyObject *)__pyx_n_s__dts), ((PyObject *)__pyx_n_s__pytz), ((PyObject *)__pyx_n_s__dt), ((PyObject *)__pyx_n_s__delta), ((PyObject *)__pyx_n_s__trans_len)); if (unlikely(!__pyx_k_tuple_398)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1660; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_398); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_398)); __pyx_k_codeobj_399 = (PyObject*)__Pyx_PyCode_New(3, 0, 17, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_398, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_251, __pyx_n_s__tz_convert, 1660, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_399)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1660; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/tslib.pyx":1738 * return result * * def tz_convert_single(int64_t val, object tz1, object tz2): # <<<<<<<<<<<<<< * cdef: * ndarray[int64_t] trans, deltas */ __pyx_k_tuple_400 = PyTuple_Pack(13, ((PyObject *)__pyx_n_s__val), ((PyObject *)__pyx_n_s__tz1), ((PyObject *)__pyx_n_s__tz2), ((PyObject *)__pyx_n_s__trans), ((PyObject *)__pyx_n_s__deltas), ((PyObject *)__pyx_n_s__pos), ((PyObject *)__pyx_n_s__v), ((PyObject *)__pyx_n_s__offset), ((PyObject *)__pyx_n_s__utc_date), ((PyObject *)__pyx_n_s__dts), ((PyObject *)__pyx_n_s__pytz), ((PyObject *)__pyx_n_s__dt), ((PyObject *)__pyx_n_s__delta)); if (unlikely(!__pyx_k_tuple_400)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1738; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_400); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_400)); __pyx_k_codeobj_401 = (PyObject*)__Pyx_PyCode_New(3, 0, 13, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_400, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_251, __pyx_n_s__tz_convert_single, 1738, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_401)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1738; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/tslib.pyx":1788 * utc_offset_cache = {} * * def _get_transitions(tz): # <<<<<<<<<<<<<< * """ * Get UTC times of DST transitions */ __pyx_k_tuple_402 = PyTuple_Pack(2, ((PyObject *)__pyx_n_s__tz), ((PyObject *)__pyx_n_s__arr)); if (unlikely(!__pyx_k_tuple_402)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1788; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_402); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_402)); __pyx_k_codeobj_403 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_402, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_251, __pyx_n_s___get_transitions, 1788, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_403)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1788; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/tslib.pyx":1812 * return trans_cache[tz] * * def _get_deltas(tz): # <<<<<<<<<<<<<< * """ * Get UTC offsets in microseconds corresponding to DST transitions */ __pyx_k_tuple_404 = PyTuple_Pack(2, ((PyObject *)__pyx_n_s__tz), ((PyObject *)__pyx_n_s__num)); if (unlikely(!__pyx_k_tuple_404)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1812; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_404); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_404)); __pyx_k_codeobj_405 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_404, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_251, __pyx_n_s___get_deltas, 1812, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_405)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1812; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/tslib.pyx":1837 * 10**6) * * def tot_seconds(td): # <<<<<<<<<<<<<< * return total_seconds(td) * */ __pyx_k_tuple_406 = PyTuple_Pack(1, ((PyObject *)__pyx_n_s__td)); if (unlikely(!__pyx_k_tuple_406)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1837; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_406); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_406)); __pyx_k_codeobj_407 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_406, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_251, __pyx_n_s__tot_seconds, 1837, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_407)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1837; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/tslib.pyx":1856 * @cython.boundscheck(False) * @cython.wraparound(False) * def tz_localize_to_utc(ndarray[int64_t] vals, object tz, bint infer_dst=False): # <<<<<<<<<<<<<< * """ * Localize tzinfo-naive DateRange to given time zone (using pytz). If */ __pyx_k_tuple_408 = PyTuple_Pack(32, ((PyObject *)__pyx_n_s__vals), ((PyObject *)__pyx_n_s__tz), ((PyObject *)__pyx_n_s__infer_dst), ((PyObject *)__pyx_n_s__trans), ((PyObject *)__pyx_n_s__deltas), ((PyObject *)__pyx_n_s__idx_shifted), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__idx), ((PyObject *)__pyx_n_s__pos), ((PyObject *)__pyx_n_s__ntrans), ((PyObject *)__pyx_n_s__n), ((PyObject *)__pyx_n_s__tdata), ((PyObject *)__pyx_n_s__v), ((PyObject *)__pyx_n_s__left), ((PyObject *)__pyx_n_s__right), ((PyObject *)__pyx_n_s__result), ((PyObject *)__pyx_n_s__result_a), ((PyObject *)__pyx_n_s__result_b), ((PyObject *)__pyx_n_s__dst_hours), ((PyObject *)__pyx_n_s__dts), ((PyObject *)__pyx_n_s__dt), ((PyObject *)__pyx_n_s__delta), ((PyObject *)__pyx_n_s__both_nat), ((PyObject *)__pyx_n_s__both_eq), ((PyObject *)__pyx_n_s__trans_idx), ((PyObject *)__pyx_n_s__stamp), ((PyObject *)__pyx_n_s__one_diff), ((PyObject *)__pyx_n_s__trans_grp), ((PyObject *)__pyx_n_s__grp), ((PyObject *)__pyx_n_s__switch_idx), ((PyObject *)__pyx_n_s__a_idx), ((PyObject *)__pyx_n_s__b_idx)); if (unlikely(!__pyx_k_tuple_408)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1856; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_408); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_408)); __pyx_k_codeobj_409 = (PyObject*)__Pyx_PyCode_New(3, 0, 32, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_408, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_251, __pyx_n_s__tz_localize_to_utc, 1856, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_409)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1856; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/tslib.pyx":2028 * #---------------------------------------------------------------------- * * def build_field_sarray(ndarray[int64_t] dtindex): # <<<<<<<<<<<<<< * ''' * Datetime as int64 representation to a structured array of fields */ __pyx_k_tuple_410 = PyTuple_Pack(14, ((PyObject *)__pyx_n_s__dtindex), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__count), ((PyObject *)__pyx_n_s__isleap), ((PyObject *)__pyx_n_s__dts), ((PyObject *)__pyx_n_s__years), ((PyObject *)__pyx_n_s__months), ((PyObject *)__pyx_n_s__days), ((PyObject *)__pyx_n_s__hours), ((PyObject *)__pyx_n_s__minutes), ((PyObject *)__pyx_n_s__seconds), ((PyObject *)__pyx_n_s__mus), ((PyObject *)__pyx_n_s__sa_dtype), ((PyObject *)__pyx_n_s__out)); if (unlikely(!__pyx_k_tuple_410)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2028; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_410); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_410)); __pyx_k_codeobj_411 = (PyObject*)__Pyx_PyCode_New(1, 0, 14, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_410, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_251, __pyx_n_s__build_field_sarray, 2028, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_411)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2028; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/tslib.pyx":2070 * return out * * def get_time_micros(ndarray[int64_t] dtindex): # <<<<<<<<<<<<<< * ''' * Datetime as int64 representation to a structured array of fields */ __pyx_k_tuple_412 = PyTuple_Pack(5, ((PyObject *)__pyx_n_s__dtindex), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__n), ((PyObject *)__pyx_n_s__dts), ((PyObject *)__pyx_n_s__micros)); if (unlikely(!__pyx_k_tuple_412)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2070; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_412); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_412)); __pyx_k_codeobj_413 = (PyObject*)__Pyx_PyCode_New(1, 0, 5, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_412, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_251, __pyx_n_s__get_time_micros, 2070, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_413)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2070; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/tslib.pyx":2089 * * @cython.wraparound(False) * def get_date_field(ndarray[int64_t] dtindex, object field): # <<<<<<<<<<<<<< * ''' * Given a int64-based datetime index, extract the year, month, etc., */ __pyx_k_tuple_414 = PyTuple_Pack(14, ((PyObject *)__pyx_n_s__dtindex), ((PyObject *)__pyx_n_s__field), ((PyObject *)__pyx_n_s__ts), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__count), ((PyObject *)__pyx_n_s__out), ((PyObject *)__pyx_n_s___month_offset), ((PyObject *)__pyx_n_s__isleap), ((PyObject *)__pyx_n_s__isleap_prev), ((PyObject *)__pyx_n_s__dts), ((PyObject *)__pyx_n_s__mo_off), ((PyObject *)__pyx_n_s__doy), ((PyObject *)__pyx_n_s__dow), ((PyObject *)__pyx_n_s__woy)); if (unlikely(!__pyx_k_tuple_414)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2089; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_414); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_414)); __pyx_k_codeobj_415 = (PyObject*)__Pyx_PyCode_New(2, 0, 14, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_414, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_251, __pyx_n_s__get_date_field, 2089, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_415)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2089; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/tslib.pyx":2239 * * * def date_normalize(ndarray[int64_t] stamps, tz=None): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = len(stamps) */ __pyx_k_tuple_416 = PyTuple_Pack(7, ((PyObject *)__pyx_n_s__stamps), ((PyObject *)__pyx_n_s__tz), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__n), ((PyObject *)__pyx_n_s__dts), ((PyObject *)__pyx_n_s__tso), ((PyObject *)__pyx_n_s__result)); if (unlikely(!__pyx_k_tuple_416)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2239; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_416); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_416)); __pyx_k_codeobj_417 = (PyObject*)__Pyx_PyCode_New(2, 0, 7, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_416, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_251, __pyx_n_s__date_normalize, 2239, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_417)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2239; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/tslib.pyx":2334 * * * def dates_normalized(ndarray[int64_t] stamps, tz=None): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = len(stamps) */ __pyx_k_tuple_418 = PyTuple_Pack(10, ((PyObject *)__pyx_n_s__stamps), ((PyObject *)__pyx_n_s__tz), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__n), ((PyObject *)__pyx_n_s__dts), ((PyObject *)__pyx_n_s__dt), ((PyObject *)__pyx_n_s__trans), ((PyObject *)__pyx_n_s__deltas), ((PyObject *)__pyx_n_s__pos), ((PyObject *)__pyx_n_s__inf)); if (unlikely(!__pyx_k_tuple_418)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2334; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_418); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_418)); __pyx_k_codeobj_419 = (PyObject*)__Pyx_PyCode_New(2, 0, 10, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_418, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_251, __pyx_n_s__dates_normalized, 2334, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_419)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2334; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/tslib.pyx":2372 * #---------------------------------------------------------------------- * * def isleapyear(int64_t year): # <<<<<<<<<<<<<< * return is_leapyear(year) * */ __pyx_k_tuple_420 = PyTuple_Pack(2, ((PyObject *)__pyx_n_s__year), ((PyObject *)__pyx_n_s__year)); if (unlikely(!__pyx_k_tuple_420)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2372; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_420); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_420)); __pyx_k_codeobj_421 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_420, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_251, __pyx_n_s__isleapyear, 2372, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_421)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2372; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/tslib.pyx":2375 * return is_leapyear(year) * * def monthrange(int64_t year, int64_t month): # <<<<<<<<<<<<<< * cdef: * int64_t days */ __pyx_k_tuple_422 = PyTuple_Pack(4, ((PyObject *)__pyx_n_s__year), ((PyObject *)__pyx_n_s__month), ((PyObject *)__pyx_n_s__days), ((PyObject *)__pyx_n_s__day_of_week)); if (unlikely(!__pyx_k_tuple_422)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2375; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_422); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_422)); __pyx_k_codeobj_423 = (PyObject*)__Pyx_PyCode_New(2, 0, 4, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_422, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_251, __pyx_n_s__monthrange, 2375, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_423)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2375; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/tslib.pyx":2554 * return period_ord_w_mult * mult + 1; * * def dt64arr_to_periodarr(ndarray[int64_t] dtarr, int freq, tz=None): # <<<<<<<<<<<<<< * """ * Convert array of datetime64 values (passed in as 'i8' dtype) to a set of */ __pyx_k_tuple_424 = PyTuple_Pack(7, ((PyObject *)__pyx_n_s__dtarr), ((PyObject *)__pyx_n_s__freq), ((PyObject *)__pyx_n_s__tz), ((PyObject *)__pyx_n_s__out), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__l), ((PyObject *)__pyx_n_s__dts)); if (unlikely(!__pyx_k_tuple_424)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2554; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_424); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_424)); __pyx_k_codeobj_425 = (PyObject*)__Pyx_PyCode_New(3, 0, 7, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_424, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_251, __pyx_n_s_426, 2554, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_425)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2554; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/tslib.pyx":2577 * return out * * def periodarr_to_dt64arr(ndarray[int64_t] periodarr, int freq): # <<<<<<<<<<<<<< * """ * Convert array to datetime64 values from a set of ordinals corresponding to */ __pyx_k_tuple_427 = PyTuple_Pack(5, ((PyObject *)__pyx_n_s__periodarr), ((PyObject *)__pyx_n_s__freq), ((PyObject *)__pyx_n_s__out), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__l)); if (unlikely(!__pyx_k_tuple_427)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2577; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_427); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_427)); __pyx_k_codeobj_428 = (PyObject*)__Pyx_PyCode_New(2, 0, 5, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_427, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_251, __pyx_n_s_429, 2577, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_428)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2577; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/tslib.pyx":2617 * return retval * * def period_asfreq_arr(ndarray[int64_t] arr, int freq1, int freq2, bint end): # <<<<<<<<<<<<<< * """ * Convert int64-array of period ordinals from one frequency to another, and */ __pyx_k_tuple_430 = PyTuple_Pack(12, ((PyObject *)__pyx_n_s__arr), ((PyObject *)__pyx_n_s__freq1), ((PyObject *)__pyx_n_s__freq2), ((PyObject *)__pyx_n_s__end), ((PyObject *)__pyx_n_s__result), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__n), ((PyObject *)__pyx_n_s__func), ((PyObject *)__pyx_n_s__finfo), ((PyObject *)__pyx_n_s__val), ((PyObject *)__pyx_n_s__ordinal), ((PyObject *)__pyx_n_s__relation)); if (unlikely(!__pyx_k_tuple_430)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2617; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_430); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_430)); __pyx_k_codeobj_431 = (PyObject*)__Pyx_PyCode_New(4, 0, 12, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_430, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_251, __pyx_n_s__period_asfreq_arr, 2617, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_431)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2617; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/tslib.pyx":2649 * return result * * def period_ordinal(int y, int m, int d, int h, int min, int s, int us, int ps, int freq): # <<<<<<<<<<<<<< * cdef: * int64_t ordinal */ __pyx_k_tuple_432 = PyTuple_Pack(10, ((PyObject *)__pyx_n_s__y), ((PyObject *)__pyx_n_s__m), ((PyObject *)__pyx_n_s__d), ((PyObject *)__pyx_n_s__h), ((PyObject *)__pyx_n_s__min), ((PyObject *)__pyx_n_s__s), ((PyObject *)__pyx_n_s__us), ((PyObject *)__pyx_n_s__ps), ((PyObject *)__pyx_n_s__freq), ((PyObject *)__pyx_n_s__ordinal)); if (unlikely(!__pyx_k_tuple_432)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2649; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_432); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_432)); __pyx_k_codeobj_433 = (PyObject*)__Pyx_PyCode_New(9, 0, 10, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_432, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_251, __pyx_n_s__period_ordinal, 2649, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_433)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2649; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/tslib.pyx":2676 * return pandas_datetimestruct_to_datetime(PANDAS_FR_ns, &dts) * * def period_format(int64_t value, int freq, object fmt=None): # <<<<<<<<<<<<<< * cdef: * int freq_group */ __pyx_k_tuple_434 = PyTuple_Pack(6, ((PyObject *)__pyx_n_s__value), ((PyObject *)__pyx_n_s__freq), ((PyObject *)__pyx_n_s__fmt), ((PyObject *)__pyx_n_s__freq_group), ((PyObject *)__pyx_n_s__left), ((PyObject *)__pyx_n_s__right)); if (unlikely(!__pyx_k_tuple_434)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2676; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_434); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_434)); __pyx_k_codeobj_435 = (PyObject*)__Pyx_PyCode_New(3, 0, 6, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_434, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_251, __pyx_n_s__period_format, 2676, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_435)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2676; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/tslib.pyx":2714 * * * cdef list extra_fmts = [(b"%q", b"^`AB`^"), # <<<<<<<<<<<<<< * (b"%f", b"^`CD`^"), * (b"%F", b"^`EF`^"), */ __pyx_k_tuple_438 = PyTuple_Pack(2, ((PyObject *)__pyx_kp_b_436), ((PyObject *)__pyx_kp_b_437)); if (unlikely(!__pyx_k_tuple_438)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2714; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_438); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_438)); /* "pandas/tslib.pyx":2715 * * cdef list extra_fmts = [(b"%q", b"^`AB`^"), * (b"%f", b"^`CD`^"), # <<<<<<<<<<<<<< * (b"%F", b"^`EF`^"), * (b"%l", b"^`GH`^"), */ __pyx_k_tuple_441 = PyTuple_Pack(2, ((PyObject *)__pyx_kp_b_439), ((PyObject *)__pyx_kp_b_440)); if (unlikely(!__pyx_k_tuple_441)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2715; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_441); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_441)); /* "pandas/tslib.pyx":2716 * cdef list extra_fmts = [(b"%q", b"^`AB`^"), * (b"%f", b"^`CD`^"), * (b"%F", b"^`EF`^"), # <<<<<<<<<<<<<< * (b"%l", b"^`GH`^"), * (b"%u", b"^`IJ`^"), */ __pyx_k_tuple_444 = PyTuple_Pack(2, ((PyObject *)__pyx_kp_b_442), ((PyObject *)__pyx_kp_b_443)); if (unlikely(!__pyx_k_tuple_444)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2716; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_444); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_444)); /* "pandas/tslib.pyx":2717 * (b"%f", b"^`CD`^"), * (b"%F", b"^`EF`^"), * (b"%l", b"^`GH`^"), # <<<<<<<<<<<<<< * (b"%u", b"^`IJ`^"), * (b"%n", b"^`KL`^")] */ __pyx_k_tuple_447 = PyTuple_Pack(2, ((PyObject *)__pyx_kp_b_445), ((PyObject *)__pyx_kp_b_446)); if (unlikely(!__pyx_k_tuple_447)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2717; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_447); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_447)); /* "pandas/tslib.pyx":2718 * (b"%F", b"^`EF`^"), * (b"%l", b"^`GH`^"), * (b"%u", b"^`IJ`^"), # <<<<<<<<<<<<<< * (b"%n", b"^`KL`^")] * */ __pyx_k_tuple_450 = PyTuple_Pack(2, ((PyObject *)__pyx_kp_b_448), ((PyObject *)__pyx_kp_b_449)); if (unlikely(!__pyx_k_tuple_450)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2718; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_450); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_450)); /* "pandas/tslib.pyx":2719 * (b"%l", b"^`GH`^"), * (b"%u", b"^`IJ`^"), * (b"%n", b"^`KL`^")] # <<<<<<<<<<<<<< * * cdef list str_extra_fmts = ["^`AB`^", "^`CD`^", "^`EF`^", "^`GH`^", "^`IJ`^", "^`KL`^"] */ __pyx_k_tuple_453 = PyTuple_Pack(2, ((PyObject *)__pyx_kp_b_451), ((PyObject *)__pyx_kp_b_452)); if (unlikely(!__pyx_k_tuple_453)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2719; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_453); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_453)); /* "pandas/tslib.pyx":2779 * ctypedef int (*accessor)(int64_t ordinal, int freq) except INT32_MIN * * def get_period_field(int code, int64_t value, int freq): # <<<<<<<<<<<<<< * cdef accessor f = _get_accessor_func(code) * if f is NULL: */ __pyx_k_tuple_454 = PyTuple_Pack(4, ((PyObject *)__pyx_n_s__code), ((PyObject *)__pyx_n_s__value), ((PyObject *)__pyx_n_s__freq), ((PyObject *)__pyx_n_s__f)); if (unlikely(!__pyx_k_tuple_454)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2779; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_454); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_454)); __pyx_k_codeobj_455 = (PyObject*)__Pyx_PyCode_New(3, 0, 4, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_454, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_251, __pyx_n_s__get_period_field, 2779, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_455)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2779; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/tslib.pyx":2785 * return f(value, freq) * * def get_period_field_arr(int code, ndarray[int64_t] arr, int freq): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, sz */ __pyx_k_tuple_456 = PyTuple_Pack(7, ((PyObject *)__pyx_n_s__code), ((PyObject *)__pyx_n_s__arr), ((PyObject *)__pyx_n_s__freq), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__sz), ((PyObject *)__pyx_n_s__out), ((PyObject *)__pyx_n_s__f)); if (unlikely(!__pyx_k_tuple_456)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2785; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_456); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_456)); __pyx_k_codeobj_457 = (PyObject*)__Pyx_PyCode_New(3, 0, 7, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_456, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_251, __pyx_n_s_458, 2785, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_457)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2785; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/tslib.pyx":2831 * * * def extract_ordinals(ndarray[object] values, freq): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = len(values) */ __pyx_k_tuple_459 = PyTuple_Pack(6, ((PyObject *)__pyx_n_s__values), ((PyObject *)__pyx_n_s__freq), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__n), ((PyObject *)__pyx_n_s__ordinals), ((PyObject *)__pyx_n_s__p)); if (unlikely(!__pyx_k_tuple_459)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2831; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_459); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_459)); __pyx_k_codeobj_460 = (PyObject*)__Pyx_PyCode_New(2, 0, 6, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_459, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_251, __pyx_n_s__extract_ordinals, 2831, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_460)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2831; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/tslib.pyx":2979 * __all__ = [] * * def _getlang(): # <<<<<<<<<<<<<< * # Figure out what the current language is set to. * return locale.getlocale(locale.LC_TIME) */ __pyx_k_codeobj_462 = (PyObject*)__Pyx_PyCode_New(0, 0, 0, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_251, __pyx_n_s___getlang, 2979, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_462)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2979; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/tslib.pyx":3002 * """ * * def __init__(self): # <<<<<<<<<<<<<< * """Set all attributes. * */ __pyx_k_tuple_463 = PyTuple_Pack(1, ((PyObject *)__pyx_n_s__self)); if (unlikely(!__pyx_k_tuple_463)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3002; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_463); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_463)); __pyx_k_codeobj_464 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_463, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_251, __pyx_n_s____init__, 3002, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_464)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3002; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/tslib.pyx":3031 * raise ValueError("locale changed during initialization") * * def __pad(self, seq, front): # <<<<<<<<<<<<<< * # Add '' to seq to either the front (is True), else the back. * seq = list(seq) */ __pyx_k_tuple_466 = PyTuple_Pack(3, ((PyObject *)__pyx_n_s__self), ((PyObject *)__pyx_n_s__seq), ((PyObject *)__pyx_n_s__front)); if (unlikely(!__pyx_k_tuple_466)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3031; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_466); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_466)); __pyx_k_codeobj_467 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_466, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_251, __pyx_n_s____pad, 3031, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_467)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3031; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/tslib.pyx":3040 * return seq * * def __calc_weekday(self): # <<<<<<<<<<<<<< * # Set self.a_weekday and self.f_weekday using the calendar * # module. */ __pyx_k_tuple_469 = PyTuple_Pack(4, ((PyObject *)__pyx_n_s__self), ((PyObject *)__pyx_n_s__a_weekday), ((PyObject *)__pyx_n_s__f_weekday), ((PyObject *)__pyx_n_s__i)); if (unlikely(!__pyx_k_tuple_469)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3040; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_469); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_469)); __pyx_k_codeobj_470 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_469, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_251, __pyx_n_s____calc_weekday, 3040, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_470)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3040; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/tslib.pyx":3048 * self.f_weekday = f_weekday * * def __calc_month(self): # <<<<<<<<<<<<<< * # Set self.f_month and self.a_month using the calendar module. * a_month = [calendar.month_abbr[i].lower() for i in range(13)] */ __pyx_k_tuple_472 = PyTuple_Pack(4, ((PyObject *)__pyx_n_s__self), ((PyObject *)__pyx_n_s__a_month), ((PyObject *)__pyx_n_s__f_month), ((PyObject *)__pyx_n_s__i)); if (unlikely(!__pyx_k_tuple_472)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3048; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_472); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_472)); __pyx_k_codeobj_473 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_472, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_251, __pyx_n_s____calc_month, 3048, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_473)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3048; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/tslib.pyx":3055 * self.f_month = f_month * * def __calc_am_pm(self): # <<<<<<<<<<<<<< * # Set self.am_pm by using time.strftime(). * */ __pyx_k_tuple_475 = PyTuple_Pack(4, ((PyObject *)__pyx_n_s__self), ((PyObject *)__pyx_n_s__am_pm), ((PyObject *)__pyx_n_s__hour), ((PyObject *)__pyx_n_s__time_tuple)); if (unlikely(!__pyx_k_tuple_475)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3055; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_475); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_475)); __pyx_k_codeobj_476 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_475, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_251, __pyx_n_s____calc_am_pm, 3055, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_476)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3055; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/tslib.pyx":3067 * self.am_pm = am_pm * * def __calc_date_time(self): # <<<<<<<<<<<<<< * # Set self.date_time, self.date, & self.time by using * # time.strftime(). */ __pyx_k_tuple_478 = PyTuple_Pack(12, ((PyObject *)__pyx_n_s__self), ((PyObject *)__pyx_n_s__time_tuple), ((PyObject *)__pyx_n_s__date_time), ((PyObject *)__pyx_n_s__replacement_pairs), ((PyObject *)__pyx_n_s__offset), ((PyObject *)__pyx_n_s__directive), ((PyObject *)__pyx_n_s__current_format), ((PyObject *)__pyx_n_s__old), ((PyObject *)__pyx_n_s__new), ((PyObject *)__pyx_n_s__U_W), ((PyObject *)__pyx_n_s__tz_values), ((PyObject *)__pyx_n_s__tz)); if (unlikely(!__pyx_k_tuple_478)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3067; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_478); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_478)); __pyx_k_codeobj_479 = (PyObject*)__Pyx_PyCode_New(1, 0, 12, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_478, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_251, __pyx_n_s____calc_date_time, 3067, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_479)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3067; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/tslib.pyx":3112 * self.LC_time = date_time[2] * * def __calc_timezone(self): # <<<<<<<<<<<<<< * # Set self.timezone by using time.tzname. * # Do not worry about possibility of time.tzname[0] == timetzname[1] */ __pyx_k_tuple_481 = PyTuple_Pack(3, ((PyObject *)__pyx_n_s__self), ((PyObject *)__pyx_n_s__no_saving), ((PyObject *)__pyx_n_s__has_saving)); if (unlikely(!__pyx_k_tuple_481)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3112; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_481); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_481)); __pyx_k_codeobj_482 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_481, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_251, __pyx_n_s____calc_timezone, 3112, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_482)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3112; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/tslib.pyx":3131 * """Handle conversion from format directives to regexes.""" * * def __init__(self, locale_time=None): # <<<<<<<<<<<<<< * """Create keys/values. * */ __pyx_k_tuple_485 = PyTuple_Pack(5, ((PyObject *)__pyx_n_s__self), ((PyObject *)__pyx_n_s__locale_time), ((PyObject *)__pyx_n_s__base), ((PyObject *)__pyx_n_s__genexpr), ((PyObject *)__pyx_n_s__genexpr)); if (unlikely(!__pyx_k_tuple_485)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3131; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_485); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_485)); __pyx_k_codeobj_486 = (PyObject*)__Pyx_PyCode_New(2, 0, 5, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_485, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_251, __pyx_n_s____init__, 3131, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_486)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3131; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_k_tuple_487 = PyTuple_Pack(1, ((PyObject *)Py_None)); if (unlikely(!__pyx_k_tuple_487)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3131; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_487); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_487)); /* "pandas/tslib.pyx":3173 * base.__setitem__('X', self.pattern(self.locale_time.LC_time)) * * def __seqToRE(self, to_convert, directive): # <<<<<<<<<<<<<< * """Convert a list to a regex string for matching a directive. * */ __pyx_k_tuple_489 = PyTuple_Pack(7, ((PyObject *)__pyx_n_s__self), ((PyObject *)__pyx_n_s__to_convert), ((PyObject *)__pyx_n_s__directive), ((PyObject *)__pyx_n_s__value), ((PyObject *)__pyx_n_s__regex), ((PyObject *)__pyx_n_s__genexpr), ((PyObject *)__pyx_n_s__genexpr)); if (unlikely(!__pyx_k_tuple_489)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3173; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_489); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_489)); __pyx_k_codeobj_490 = (PyObject*)__Pyx_PyCode_New(3, 0, 7, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_489, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_251, __pyx_n_s____seqToRE, 3173, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_490)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3173; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/tslib.pyx":3192 * return '%s)' % regex * * def pattern(self, format): # <<<<<<<<<<<<<< * """Return regex pattern for the format string. * */ __pyx_k_tuple_493 = PyTuple_Pack(6, ((PyObject *)__pyx_n_s__self), ((PyObject *)__pyx_n_s__format), ((PyObject *)__pyx_n_s__processed_format), ((PyObject *)__pyx_n_s__regex_chars), ((PyObject *)__pyx_n_s_492), ((PyObject *)__pyx_n_s__directive_index)); if (unlikely(!__pyx_k_tuple_493)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3192; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_493); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_493)); __pyx_k_codeobj_494 = (PyObject*)__Pyx_PyCode_New(2, 0, 6, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_493, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_251, __pyx_n_s__pattern, 3192, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_494)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3192; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/tslib.pyx":3215 * return "%s%s" % (processed_format, format) * * def compile(self, format): # <<<<<<<<<<<<<< * """Return a compiled re object for the format string.""" * return re_compile(self.pattern(format), IGNORECASE) */ __pyx_k_tuple_496 = PyTuple_Pack(2, ((PyObject *)__pyx_n_s__self), ((PyObject *)__pyx_n_s__format)); if (unlikely(!__pyx_k_tuple_496)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3215; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_496); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_496)); __pyx_k_codeobj_497 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_496, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_251, __pyx_n_s__compile, 3215, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_497)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3215; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/tslib.pyx":3226 * _regex_cache = {} * * def _calc_julian_from_U_or_W(year, week_of_year, day_of_week, week_starts_Mon): # <<<<<<<<<<<<<< * """Calculate the Julian day based on the year, week of the year, and day of * the week, with week_start_day representing whether the week of the year */ __pyx_k_tuple_500 = PyTuple_Pack(7, ((PyObject *)__pyx_n_s__year), ((PyObject *)__pyx_n_s__week_of_year), ((PyObject *)__pyx_n_s__day_of_week), ((PyObject *)__pyx_n_s__week_starts_Mon), ((PyObject *)__pyx_n_s__first_weekday), ((PyObject *)__pyx_n_s__week_0_length), ((PyObject *)__pyx_n_s__days_to_week)); if (unlikely(!__pyx_k_tuple_500)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3226; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_500); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_500)); __pyx_k_codeobj_501 = (PyObject*)__Pyx_PyCode_New(4, 0, 7, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_500, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_251, __pyx_n_s_94, 3226, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_501)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3226; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __pyx_int_0 = PyInt_FromLong(0); if (unlikely(!__pyx_int_0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __pyx_int_1 = PyInt_FromLong(1); if (unlikely(!__pyx_int_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __pyx_int_1L = PyLong_FromString((char *)"1", 0, 0); if (unlikely(!__pyx_int_1L)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __pyx_int_2 = PyInt_FromLong(2); if (unlikely(!__pyx_int_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __pyx_int_3 = PyInt_FromLong(3); if (unlikely(!__pyx_int_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __pyx_int_4 = PyInt_FromLong(4); if (unlikely(!__pyx_int_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __pyx_int_5 = PyInt_FromLong(5); if (unlikely(!__pyx_int_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __pyx_int_6 = PyInt_FromLong(6); if (unlikely(!__pyx_int_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __pyx_int_7 = PyInt_FromLong(7); if (unlikely(!__pyx_int_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __pyx_int_8 = PyInt_FromLong(8); if (unlikely(!__pyx_int_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __pyx_int_9 = PyInt_FromLong(9); if (unlikely(!__pyx_int_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __pyx_int_neg_1 = PyInt_FromLong(-1); if (unlikely(!__pyx_int_neg_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __pyx_int_neg_6 = PyInt_FromLong(-6); if (unlikely(!__pyx_int_neg_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __pyx_int_01 = PyInt_FromLong(01); if (unlikely(!__pyx_int_01)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __pyx_int_10 = PyInt_FromLong(10); if (unlikely(!__pyx_int_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __pyx_int_11 = PyInt_FromLong(11); if (unlikely(!__pyx_int_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __pyx_int_12 = PyInt_FromLong(12); if (unlikely(!__pyx_int_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __pyx_int_13 = PyInt_FromLong(13); if (unlikely(!__pyx_int_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __pyx_int_14 = PyInt_FromLong(14); if (unlikely(!__pyx_int_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __pyx_int_15 = PyInt_FromLong(15); if (unlikely(!__pyx_int_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __pyx_int_16 = PyInt_FromLong(16); if (unlikely(!__pyx_int_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __pyx_int_17 = PyInt_FromLong(17); if (unlikely(!__pyx_int_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __pyx_int_18 = PyInt_FromLong(18); if (unlikely(!__pyx_int_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __pyx_int_22 = PyInt_FromLong(22); if (unlikely(!__pyx_int_22)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __pyx_int_24 = PyInt_FromLong(24); if (unlikely(!__pyx_int_24)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __pyx_int_31 = PyInt_FromLong(31); if (unlikely(!__pyx_int_31)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __pyx_int_44 = PyInt_FromLong(44); if (unlikely(!__pyx_int_44)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __pyx_int_55 = PyInt_FromLong(55); if (unlikely(!__pyx_int_55)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __pyx_int_59 = PyInt_FromLong(59); if (unlikely(!__pyx_int_59)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __pyx_int_60 = PyInt_FromLong(60); if (unlikely(!__pyx_int_60)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __pyx_int_76 = PyInt_FromLong(76); if (unlikely(!__pyx_int_76)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __pyx_int_90 = PyInt_FromLong(90); if (unlikely(!__pyx_int_90)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __pyx_int_91 = PyInt_FromLong(91); if (unlikely(!__pyx_int_91)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __pyx_int_120 = PyInt_FromLong(120); if (unlikely(!__pyx_int_120)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __pyx_int_121 = PyInt_FromLong(121); if (unlikely(!__pyx_int_121)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __pyx_int_151 = PyInt_FromLong(151); if (unlikely(!__pyx_int_151)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __pyx_int_152 = PyInt_FromLong(152); if (unlikely(!__pyx_int_152)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __pyx_int_181 = PyInt_FromLong(181); if (unlikely(!__pyx_int_181)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __pyx_int_182 = PyInt_FromLong(182); if (unlikely(!__pyx_int_182)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __pyx_int_212 = PyInt_FromLong(212); if (unlikely(!__pyx_int_212)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __pyx_int_213 = PyInt_FromLong(213); if (unlikely(!__pyx_int_213)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __pyx_int_243 = PyInt_FromLong(243); if (unlikely(!__pyx_int_243)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __pyx_int_244 = PyInt_FromLong(244); if (unlikely(!__pyx_int_244)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __pyx_int_273 = PyInt_FromLong(273); if (unlikely(!__pyx_int_273)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __pyx_int_274 = PyInt_FromLong(274); if (unlikely(!__pyx_int_274)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __pyx_int_304 = PyInt_FromLong(304); if (unlikely(!__pyx_int_304)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __pyx_int_305 = PyInt_FromLong(305); if (unlikely(!__pyx_int_305)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __pyx_int_334 = PyInt_FromLong(334); if (unlikely(!__pyx_int_334)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __pyx_int_335 = PyInt_FromLong(335); if (unlikely(!__pyx_int_335)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __pyx_int_365 = PyInt_FromLong(365); if (unlikely(!__pyx_int_365)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __pyx_int_366 = PyInt_FromLong(366); if (unlikely(!__pyx_int_366)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __pyx_int_1000 = PyInt_FromLong(1000); if (unlikely(!__pyx_int_1000)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __pyx_int_1000L = PyLong_FromString((char *)"1000", 0, 0); if (unlikely(!__pyx_int_1000L)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __pyx_int_1999 = PyInt_FromLong(1999); if (unlikely(!__pyx_int_1999)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __pyx_int_2000 = PyInt_FromLong(2000); if (unlikely(!__pyx_int_2000)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __pyx_int_3600 = PyInt_FromLong(3600); if (unlikely(!__pyx_int_3600)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __pyx_int_6000 = PyInt_FromLong(6000); if (unlikely(!__pyx_int_6000)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __pyx_int_86400 = PyInt_FromLong(86400); if (unlikely(!__pyx_int_86400)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __pyx_int_1000000 = PyInt_FromLong(1000000); if (unlikely(!__pyx_int_1000000)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __pyx_int_1000000L = PyLong_FromString((char *)"1000000", 0, 0); if (unlikely(!__pyx_int_1000000L)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __pyx_int_1000000000 = PyInt_FromLong(1000000000); if (unlikely(!__pyx_int_1000000000)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __pyx_int_1000000000L = PyLong_FromString((char *)"1000000000", 0, 0); if (unlikely(!__pyx_int_1000000000L)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __pyx_int_86400000000000L = PyLong_FromString((char *)"86400000000000", 0, 0); if (unlikely(!__pyx_int_86400000000000L)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; return 0; __pyx_L1_error:; return -1; } #if PY_MAJOR_VERSION < 3 PyMODINIT_FUNC inittslib(void); /*proto*/ PyMODINIT_FUNC inittslib(void) #else PyMODINIT_FUNC PyInit_tslib(void); /*proto*/ PyMODINIT_FUNC PyInit_tslib(void) #endif { 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; int __pyx_t_8; Py_ssize_t __pyx_t_9; PyObject *(*__pyx_t_10)(PyObject *); PyObject *__pyx_t_11 = NULL; int __pyx_t_12; PyObject *__pyx_t_13 = NULL; PyObject *__pyx_t_14 = NULL; PyObject *__pyx_t_15 = NULL; PyObject *__pyx_t_16 = NULL; PyObject *__pyx_t_17 = NULL; PyObject *__pyx_t_18 = NULL; PyObject *__pyx_t_19 = NULL; PyObject *__pyx_t_20 = NULL; PyObject *__pyx_t_21 = NULL; PyObject *__pyx_t_22 = NULL; PyObject *__pyx_t_23 = NULL; PyObject *__pyx_t_24 = NULL; PyObject *__pyx_t_25 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannyDeclarations #if CYTHON_REFNANNY __Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny"); if (!__Pyx_RefNanny) { PyErr_Clear(); __Pyx_RefNanny = __Pyx_RefNannyImportAPI("Cython.Runtime.refnanny"); if (!__Pyx_RefNanny) Py_FatalError("failed to import 'refnanny' module"); } #endif __Pyx_RefNannySetupContext("PyMODINIT_FUNC PyInit_tslib(void)", 0); if ( __Pyx_check_binary_version() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_empty_tuple)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_bytes)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #ifdef __Pyx_CyFunction_USED if (__Pyx_CyFunction_init() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif #ifdef __Pyx_FusedFunction_USED if (__pyx_FusedFunction_init() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif #ifdef __Pyx_Generator_USED if (__pyx_Generator_init() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif /*--- Library function declarations ---*/ /*--- Threads initialization code ---*/ #if defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS #ifdef WITH_THREAD /* Python build with threading support? */ PyEval_InitThreads(); #endif #endif /*--- Module creation code ---*/ #if PY_MAJOR_VERSION < 3 __pyx_m = Py_InitModule4(__Pyx_NAMESTR("tslib"), __pyx_methods, 0, 0, PYTHON_API_VERSION); Py_XINCREF(__pyx_m); #else __pyx_m = PyModule_Create(&__pyx_moduledef); #endif if (unlikely(!__pyx_m)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_d)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} Py_INCREF(__pyx_d); #if PY_MAJOR_VERSION >= 3 { PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (!PyDict_GetItemString(modules, "pandas.tslib")) { if (unlikely(PyDict_SetItemString(modules, "pandas.tslib", __pyx_m) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } } #endif __pyx_b = PyImport_AddModule(__Pyx_NAMESTR(__Pyx_BUILTIN_MODULE_NAME)); if (unlikely(!__pyx_b)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #if CYTHON_COMPILING_IN_PYPY Py_INCREF(__pyx_b); #endif if (__Pyx_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; /*--- Initialize various global constants etc. ---*/ if (unlikely(__Pyx_InitGlobals() < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif if (__pyx_module_is_main_pandas__tslib) { if (__Pyx_SetAttrString(__pyx_m, "__name__", __pyx_n_s____main__) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; } /*--- Builtin init code ---*/ if (unlikely(__Pyx_InitCachedBuiltins() < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /*--- Constants init code ---*/ if (unlikely(__Pyx_InitCachedConstants() < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /*--- Global init code ---*/ __pyx_v_6pandas_5tslib__NDIM_STRING = ((PyObject*)Py_None); Py_INCREF(Py_None); __pyx_v_6pandas_5tslib_extra_fmts = ((PyObject*)Py_None); Py_INCREF(Py_None); __pyx_v_6pandas_5tslib_str_extra_fmts = ((PyObject*)Py_None); Py_INCREF(Py_None); /*--- Variable export code ---*/ /*--- Function export code ---*/ if (__Pyx_ExportFunction("convert_to_tsobject", (void (*)(void))__pyx_f_6pandas_5tslib_convert_to_tsobject, "PyObject *(PyObject *, PyObject *, PyObject *)") < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__Pyx_ExportFunction("convert_to_timedelta64", (void (*)(void))__pyx_f_6pandas_5tslib_convert_to_timedelta64, "PyObject *(PyObject *, PyObject *, PyObject *)") < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /*--- Type init code ---*/ if (PyType_Ready(&__pyx_type_6pandas_5tslib___pyx_scope_struct_2___seqToRE) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3173; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_6pandas_5tslib___pyx_scope_struct_2___seqToRE = &__pyx_type_6pandas_5tslib___pyx_scope_struct_2___seqToRE; __pyx_ptype_8datetime_datetime = __Pyx_ImportType("datetime", "datetime", sizeof(PyDateTime_DateTime), 0); if (unlikely(!__pyx_ptype_8datetime_datetime)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_vtabptr_6pandas_5tslib__Timestamp = &__pyx_vtable_6pandas_5tslib__Timestamp; __pyx_vtable_6pandas_5tslib__Timestamp._compare_outside_nanorange = (int (*)(struct __pyx_obj_6pandas_5tslib__Timestamp *, PyDateTime_DateTime *, int))__pyx_f_6pandas_5tslib_10_Timestamp__compare_outside_nanorange; __pyx_vtable_6pandas_5tslib__Timestamp._assert_tzawareness_compat = (int (*)(struct __pyx_obj_6pandas_5tslib__Timestamp *, PyObject *))__pyx_f_6pandas_5tslib_10_Timestamp__assert_tzawareness_compat; __pyx_vtable_6pandas_5tslib__Timestamp.to_datetime = (PyDateTime_DateTime *(*)(struct __pyx_obj_6pandas_5tslib__Timestamp *, int __pyx_skip_dispatch))__pyx_f_6pandas_5tslib_10_Timestamp_to_datetime; __pyx_vtable_6pandas_5tslib__Timestamp._get_field = (PyObject *(*)(struct __pyx_obj_6pandas_5tslib__Timestamp *, PyObject *, int __pyx_skip_dispatch))__pyx_f_6pandas_5tslib_10_Timestamp__get_field; __pyx_type_6pandas_5tslib__Timestamp.tp_base = __pyx_ptype_8datetime_datetime; if (PyType_Ready(&__pyx_type_6pandas_5tslib__Timestamp) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 563; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__Pyx_SetVtable(__pyx_type_6pandas_5tslib__Timestamp.tp_dict, __pyx_vtabptr_6pandas_5tslib__Timestamp) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 563; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__Pyx_SetAttrString(__pyx_m, "_Timestamp", (PyObject *)&__pyx_type_6pandas_5tslib__Timestamp) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 563; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_6pandas_5tslib__Timestamp = &__pyx_type_6pandas_5tslib__Timestamp; __pyx_vtabptr_6pandas_5tslib__NaT = &__pyx_vtable_6pandas_5tslib__NaT; __pyx_vtable_6pandas_5tslib__NaT.__pyx_base = *__pyx_vtabptr_6pandas_5tslib__Timestamp; __pyx_type_6pandas_5tslib__NaT.tp_base = __pyx_ptype_6pandas_5tslib__Timestamp; if (PyType_Ready(&__pyx_type_6pandas_5tslib__NaT) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 707; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__Pyx_SetVtable(__pyx_type_6pandas_5tslib__NaT.tp_dict, __pyx_vtabptr_6pandas_5tslib__NaT) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 707; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__Pyx_SetAttrString(__pyx_m, "_NaT", (PyObject *)&__pyx_type_6pandas_5tslib__NaT) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 707; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_6pandas_5tslib__NaT = &__pyx_type_6pandas_5tslib__NaT; if (PyType_Ready(&__pyx_type_6pandas_5tslib___pyx_scope_struct_3_genexpr) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3188; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_6pandas_5tslib___pyx_scope_struct_3_genexpr = &__pyx_type_6pandas_5tslib___pyx_scope_struct_3_genexpr; if (PyType_Ready(&__pyx_type_6pandas_5tslib___pyx_scope_struct_1_genexpr) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3164; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_6pandas_5tslib___pyx_scope_struct_1_genexpr = &__pyx_type_6pandas_5tslib___pyx_scope_struct_1_genexpr; if (PyType_Ready(&__pyx_type_6pandas_5tslib__TSObject) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 741; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__Pyx_SetAttrString(__pyx_m, "_TSObject", (PyObject *)&__pyx_type_6pandas_5tslib__TSObject) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 741; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_6pandas_5tslib__TSObject = &__pyx_type_6pandas_5tslib__TSObject; if (PyType_Ready(&__pyx_type_6pandas_5tslib___pyx_scope_struct____init__) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3131; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_6pandas_5tslib___pyx_scope_struct____init__ = &__pyx_type_6pandas_5tslib___pyx_scope_struct____init__; /*--- Type import code ---*/ __pyx_ptype_5numpy_dtype = __Pyx_ImportType("numpy", "dtype", sizeof(PyArray_Descr), 0); if (unlikely(!__pyx_ptype_5numpy_dtype)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_5numpy_flatiter = __Pyx_ImportType("numpy", "flatiter", sizeof(PyArrayIterObject), 0); if (unlikely(!__pyx_ptype_5numpy_flatiter)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 167; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_5numpy_broadcast = __Pyx_ImportType("numpy", "broadcast", sizeof(PyArrayMultiIterObject), 0); if (unlikely(!__pyx_ptype_5numpy_broadcast)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 171; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_5numpy_ndarray = __Pyx_ImportType("numpy", "ndarray", sizeof(PyArrayObject), 0); if (unlikely(!__pyx_ptype_5numpy_ndarray)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_5numpy_ufunc = __Pyx_ImportType("numpy", "ufunc", sizeof(PyUFuncObject), 0); if (unlikely(!__pyx_ptype_5numpy_ufunc)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 865; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_7cpython_4type_type = __Pyx_ImportType(__Pyx_BUILTIN_MODULE_NAME, "type", #if CYTHON_COMPILING_IN_PYPY sizeof(PyTypeObject), #else sizeof(PyHeapTypeObject), #endif 0); if (unlikely(!__pyx_ptype_7cpython_4type_type)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 9; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_7cpython_4bool_bool = __Pyx_ImportType(__Pyx_BUILTIN_MODULE_NAME, "bool", sizeof(PyBoolObject), 0); if (unlikely(!__pyx_ptype_7cpython_4bool_bool)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 8; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_7cpython_7complex_complex = __Pyx_ImportType(__Pyx_BUILTIN_MODULE_NAME, "complex", sizeof(PyComplexObject), 0); if (unlikely(!__pyx_ptype_7cpython_7complex_complex)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 15; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_8datetime_date = __Pyx_ImportType("datetime", "date", sizeof(PyDateTime_Date), 0); if (unlikely(!__pyx_ptype_8datetime_date)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 15; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_8datetime_timedelta = __Pyx_ImportType("datetime", "timedelta", sizeof(PyDateTime_Delta), 0); if (unlikely(!__pyx_ptype_8datetime_timedelta)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 21; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /*--- Variable import code ---*/ /*--- Function import code ---*/ /*--- Execution code ---*/ /* "pandas/tslib.pyx":6 * from numpy cimport (int32_t, int64_t, import_array, ndarray, * NPY_INT64, NPY_DATETIME, NPY_TIMEDELTA) * import numpy as np # <<<<<<<<<<<<<< * * from cpython cimport ( */ __pyx_t_1 = __Pyx_Import(((PyObject *)__pyx_n_s__numpy), 0, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 6; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s__np, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 6; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pandas/tslib.pyx":35 * cimport cython * * from datetime import timedelta, datetime # <<<<<<<<<<<<<< * from datetime import time as datetime_time * from pandas.compat import parse_date */ __pyx_t_1 = PyList_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)__pyx_n_s__timedelta)); PyList_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_n_s__timedelta)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__timedelta)); __Pyx_INCREF(((PyObject *)__pyx_n_s__datetime)); PyList_SET_ITEM(__pyx_t_1, 1, ((PyObject *)__pyx_n_s__datetime)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__datetime)); __pyx_t_2 = __Pyx_Import(((PyObject *)__pyx_n_s__datetime), ((PyObject *)__pyx_t_1), -1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/tslib.pyx":36 * * from datetime import timedelta, datetime * from datetime import time as datetime_time # <<<<<<<<<<<<<< * from pandas.compat import parse_date * */ __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 36; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(((PyObject *)__pyx_n_s__time)); PyList_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_n_s__time)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__time)); __pyx_t_1 = __Pyx_Import(((PyObject *)__pyx_n_s__datetime), ((PyObject *)__pyx_t_2), -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 36; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s__time); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 36; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s__datetime_time, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 36; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pandas/tslib.pyx":37 * from datetime import timedelta, datetime * from datetime import time as datetime_time * from pandas.compat import parse_date # <<<<<<<<<<<<<< * * from sys import version_info */ __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 37; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)__pyx_n_s__parse_date)); PyList_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_n_s__parse_date)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__parse_date)); __pyx_t_2 = __Pyx_Import(((PyObject *)__pyx_n_s_242), ((PyObject *)__pyx_t_1), -1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 37; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s__parse_date); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 37; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s__parse_date, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 37; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/tslib.pyx":39 * from pandas.compat import parse_date * * from sys import version_info # <<<<<<<<<<<<<< * * # numpy compat */ __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 39; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(((PyObject *)__pyx_n_s__version_info)); PyList_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_n_s__version_info)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__version_info)); __pyx_t_1 = __Pyx_Import(((PyObject *)__pyx_n_s__sys), ((PyObject *)__pyx_t_2), -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 39; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s__version_info); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 39; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s__version_info, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 39; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pandas/tslib.pyx":42 * * # numpy compat * from distutils.version import LooseVersion # <<<<<<<<<<<<<< * _np_version = np.version.short_version * _np_version_under1p6 = LooseVersion(_np_version) < '1.6' */ __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 42; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)__pyx_n_s__LooseVersion)); PyList_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_n_s__LooseVersion)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__LooseVersion)); __pyx_t_2 = __Pyx_Import(((PyObject *)__pyx_n_s_243), ((PyObject *)__pyx_t_1), -1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 42; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s__LooseVersion); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 42; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s__LooseVersion, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 42; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/tslib.pyx":43 * # numpy compat * from distutils.version import LooseVersion * _np_version = np.version.short_version # <<<<<<<<<<<<<< * _np_version_under1p6 = LooseVersion(_np_version) < '1.6' * _np_version_under1p7 = LooseVersion(_np_version) < '1.7' */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 43; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__version); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 43; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s__short_version); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 43; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (PyDict_SetItem(__pyx_d, __pyx_n_s___np_version, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 43; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/tslib.pyx":44 * from distutils.version import LooseVersion * _np_version = np.version.short_version * _np_version_under1p6 = LooseVersion(_np_version) < '1.6' # <<<<<<<<<<<<<< * _np_version_under1p7 = LooseVersion(_np_version) < '1.7' * */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__LooseVersion); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 44; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s___np_version); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 44; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 44; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 44; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; __pyx_t_3 = PyObject_RichCompare(__pyx_t_1, ((PyObject *)__pyx_kp_s_244), Py_LT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 44; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (PyDict_SetItem(__pyx_d, __pyx_n_s_245, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 44; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/tslib.pyx":45 * _np_version = np.version.short_version * _np_version_under1p6 = LooseVersion(_np_version) < '1.6' * _np_version_under1p7 = LooseVersion(_np_version) < '1.7' # <<<<<<<<<<<<<< * * # GH3363 */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s__LooseVersion); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 45; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s___np_version); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 45; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 45; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 45; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __pyx_t_2 = PyObject_RichCompare(__pyx_t_1, ((PyObject *)__pyx_kp_s_246), Py_LT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 45; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (PyDict_SetItem(__pyx_d, __pyx_n_s_74, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 45; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/tslib.pyx":48 * * # GH3363 * cdef bint PY2 = version_info[0] == 2 # <<<<<<<<<<<<<< * * # initialize numpy */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__version_info); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_2, 0, sizeof(long), PyInt_FromLong, 0, 0, 1); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_RichCompare(__pyx_t_1, __pyx_int_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_6pandas_5tslib_PY2 = __pyx_t_4; /* "pandas/tslib.pyx":51 * * # initialize numpy * import_array() # <<<<<<<<<<<<<< * #import_ufunc() * */ import_array(); /* "pandas/tslib.pyx":55 * * # import datetime C API * PyDateTime_IMPORT # <<<<<<<<<<<<<< * * # in numpy 1.7, will prob need the following: */ PyDateTime_IMPORT; /* "pandas/tslib.pyx":60 * # numpy_pydatetime_import * * cdef int64_t NPY_NAT = util.get_nat() # <<<<<<<<<<<<<< * * # < numpy 1.7 compat for NaT */ __pyx_v_6pandas_5tslib_NPY_NAT = get_nat(); /* "pandas/tslib.pyx":63 * * # < numpy 1.7 compat for NaT * compat_NaT = np.array([NPY_NAT]).astype('m8[ns]').item() # <<<<<<<<<<<<<< * * # numpy actual nat object */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__array); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyInt_to_py_npy_int64(__pyx_v_6pandas_5tslib_NPY_NAT); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_t_3)); __Pyx_GIVEREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s__astype); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_k_tuple_247), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s__item); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (PyDict_SetItem(__pyx_d, __pyx_n_s__compat_NaT, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/tslib.pyx":66 * * # numpy actual nat object * np_NaT = np.datetime64('NaT',dtype='M8') # <<<<<<<<<<<<<< * * try: */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 66; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s__datetime64); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 66; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 66; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_3)); if (PyDict_SetItem(__pyx_t_3, ((PyObject *)__pyx_n_s__dtype), ((PyObject *)__pyx_n_s__M8)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 66; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_1 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_k_tuple_248), ((PyObject *)__pyx_t_3)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 66; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; if (PyDict_SetItem(__pyx_d, __pyx_n_s__np_NaT, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 66; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pandas/tslib.pyx":68 * np_NaT = np.datetime64('NaT',dtype='M8') * * try: # <<<<<<<<<<<<<< * basestring * except NameError: # py3 */ { __Pyx_ExceptionSave(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7); __Pyx_XGOTREF(__pyx_t_5); __Pyx_XGOTREF(__pyx_t_6); __Pyx_XGOTREF(__pyx_t_7); /*try:*/ { /* "pandas/tslib.pyx":69 * * try: * basestring # <<<<<<<<<<<<<< * except NameError: # py3 * basestring = str */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__basestring); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L2_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; goto __pyx_L9_try_end; __pyx_L2_error:; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pandas/tslib.pyx":70 * try: * basestring * except NameError: # py3 # <<<<<<<<<<<<<< * basestring = str * */ __pyx_t_8 = PyErr_ExceptionMatches(__pyx_builtin_NameError); if (__pyx_t_8) { __Pyx_AddTraceback("pandas.tslib", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_3, &__pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L4_except_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_GOTREF(__pyx_t_3); __Pyx_GOTREF(__pyx_t_2); /* "pandas/tslib.pyx":71 * basestring * except NameError: # py3 * basestring = str # <<<<<<<<<<<<<< * * def ints_to_pydatetime(ndarray[int64_t] arr, tz=None): */ if (PyDict_SetItem(__pyx_d, __pyx_n_s__basestring, ((PyObject *)((PyObject*)(&PyString_Type)))) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 71; __pyx_clineno = __LINE__; goto __pyx_L4_except_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; goto __pyx_L3_exception_handled; } __pyx_L4_except_error:; __Pyx_XGIVEREF(__pyx_t_5); __Pyx_XGIVEREF(__pyx_t_6); __Pyx_XGIVEREF(__pyx_t_7); __Pyx_ExceptionReset(__pyx_t_5, __pyx_t_6, __pyx_t_7); goto __pyx_L1_error; __pyx_L3_exception_handled:; __Pyx_XGIVEREF(__pyx_t_5); __Pyx_XGIVEREF(__pyx_t_6); __Pyx_XGIVEREF(__pyx_t_7); __Pyx_ExceptionReset(__pyx_t_5, __pyx_t_6, __pyx_t_7); __pyx_L9_try_end:; } /* "pandas/tslib.pyx":73 * basestring = str * * def ints_to_pydatetime(ndarray[int64_t] arr, tz=None): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = len(arr) */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5tslib_1ints_to_pydatetime, NULL, __pyx_n_s_252); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 73; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s__ints_to_pydatetime, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 73; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/tslib.pyx":126 * return result * * from dateutil.tz import tzlocal # <<<<<<<<<<<<<< * * def _is_tzlocal(tz): */ __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 126; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(((PyObject *)__pyx_n_s__tzlocal)); PyList_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_n_s__tzlocal)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__tzlocal)); __pyx_t_3 = __Pyx_Import(((PyObject *)__pyx_n_s_253), ((PyObject *)__pyx_t_2), -1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 126; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s__tzlocal); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 126; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s__tzlocal, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 126; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/tslib.pyx":128 * from dateutil.tz import tzlocal * * def _is_tzlocal(tz): # <<<<<<<<<<<<<< * return isinstance(tz, tzlocal) * */ __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5tslib_3_is_tzlocal, NULL, __pyx_n_s_252); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s___is_tzlocal, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/tslib.pyx":131 * return isinstance(tz, tzlocal) * * def _is_fixed_offset(tz): # <<<<<<<<<<<<<< * try: * tz._transition_info */ __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5tslib_5_is_fixed_offset, NULL, __pyx_n_s_252); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 131; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s___is_fixed_offset, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 131; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/tslib.pyx":138 * return True * * _zero_time = datetime_time(0, 0) # <<<<<<<<<<<<<< * * # Python front end to C extension type _Timestamp */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s__datetime_time); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 138; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_k_tuple_258), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 138; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (PyDict_SetItem(__pyx_d, __pyx_n_s___zero_time, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 138; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/tslib.pyx":142 * # Python front end to C extension type _Timestamp * # This serves as the box for datetime64 * class Timestamp(_Timestamp): # <<<<<<<<<<<<<< * """TimeStamp is the pandas equivalent of python's Datetime * and is interchangable with it in most cases. It's the type used */ __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 142; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_2)); /* "pandas/tslib.pyx":150 * * @classmethod * def fromordinal(cls, ordinal, offset=None, tz=None): # <<<<<<<<<<<<<< * """ passed an ordinal, translate and convert to a ts * note: by definition there cannot be any tz info on the ordinal itself """ */ __pyx_t_3 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6pandas_5tslib_9Timestamp_1fromordinal, __Pyx_CYFUNCTION_CLASSMETHOD, __pyx_n_s_262, NULL, __pyx_n_s_252, ((PyObject *)__pyx_k_codeobj_260)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 150; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_3, ((PyObject *)__pyx_k_tuple_261)); __pyx_t_1 = __Pyx_Method_ClassMethod(__pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 149; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (PyObject_SetItem(__pyx_t_2, __pyx_n_s__fromordinal, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 150; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pandas/tslib.pyx":156 * * @classmethod * def now(cls, tz=None): # <<<<<<<<<<<<<< * """ compat now with datetime """ * if isinstance(tz, basestring): */ __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6pandas_5tslib_9Timestamp_3now, __Pyx_CYFUNCTION_CLASSMETHOD, __pyx_n_s_266, NULL, __pyx_n_s_252, ((PyObject *)__pyx_k_codeobj_264)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 156; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_1, ((PyObject *)__pyx_k_tuple_265)); __pyx_t_3 = __Pyx_Method_ClassMethod(__pyx_t_1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 155; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (PyObject_SetItem(__pyx_t_2, __pyx_n_s__now, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 156; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/tslib.pyx":163 * * @classmethod * def today(cls): # <<<<<<<<<<<<<< * """ compat today with datetime """ * return cls(datetime.today()) */ __pyx_t_3 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6pandas_5tslib_9Timestamp_5today, __Pyx_CYFUNCTION_CLASSMETHOD, __pyx_n_s_269, NULL, __pyx_n_s_252, ((PyObject *)__pyx_k_codeobj_268)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 163; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = __Pyx_Method_ClassMethod(__pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 162; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (PyObject_SetItem(__pyx_t_2, __pyx_n_s__today, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 163; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pandas/tslib.pyx":168 * * @classmethod * def utcnow(cls): # <<<<<<<<<<<<<< * return cls.now('UTC') * */ __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6pandas_5tslib_9Timestamp_7utcnow, __Pyx_CYFUNCTION_CLASSMETHOD, __pyx_n_s_272, NULL, __pyx_n_s_252, ((PyObject *)__pyx_k_codeobj_271)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __Pyx_Method_ClassMethod(__pyx_t_1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 167; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (PyObject_SetItem(__pyx_t_2, __pyx_n_s__utcnow, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/tslib.pyx":171 * return cls.now('UTC') * * def __new__(cls, object ts_input, object offset=None, tz=None, unit=None): # <<<<<<<<<<<<<< * cdef _TSObject ts * cdef _Timestamp ts_base */ __pyx_t_3 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6pandas_5tslib_9Timestamp_9__new__, __Pyx_CYFUNCTION_STATICMETHOD, __pyx_n_s_276, NULL, __pyx_n_s_252, ((PyObject *)__pyx_k_codeobj_274)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 171; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_3, ((PyObject *)__pyx_k_tuple_275)); if (PyObject_SetItem(__pyx_t_2, __pyx_n_s____new__, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 171; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/tslib.pyx":198 * return ts_base * * def __repr__(self): # <<<<<<<<<<<<<< * result = self._repr_base * zone = None */ __pyx_t_3 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6pandas_5tslib_9Timestamp_11__repr__, 0, __pyx_n_s_279, NULL, __pyx_n_s_252, ((PyObject *)__pyx_k_codeobj_278)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 198; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyObject_SetItem(__pyx_t_2, __pyx_n_s____repr__, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 198; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/tslib.pyx":221 * * @property * def _date_repr(self): # <<<<<<<<<<<<<< * # Ideal here would be self.strftime("%Y-%m-%d"), but * # the datetime strftime() methods require year >= 1900 */ __pyx_t_3 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6pandas_5tslib_9Timestamp_13_date_repr, 0, __pyx_n_s_282, NULL, __pyx_n_s_252, ((PyObject *)__pyx_k_codeobj_281)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 221; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 220; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyObject_Call(__pyx_builtin_property, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 220; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; if (PyObject_SetItem(__pyx_t_2, __pyx_n_s___date_repr, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 221; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/tslib.pyx":227 * * @property * def _time_repr(self): # <<<<<<<<<<<<<< * result = '%.2d:%.2d:%.2d' % (self.hour, self.minute, self.second) * */ __pyx_t_3 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6pandas_5tslib_9Timestamp_15_time_repr, 0, __pyx_n_s_285, NULL, __pyx_n_s_252, ((PyObject *)__pyx_k_codeobj_284)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 227; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 226; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyObject_Call(__pyx_builtin_property, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 226; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; if (PyObject_SetItem(__pyx_t_2, __pyx_n_s___time_repr, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 227; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/tslib.pyx":239 * * @property * def _repr_base(self): # <<<<<<<<<<<<<< * return '%s %s' % (self._date_repr, self._time_repr) * */ __pyx_t_3 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6pandas_5tslib_9Timestamp_17_repr_base, 0, __pyx_n_s_288, NULL, __pyx_n_s_252, ((PyObject *)__pyx_k_codeobj_287)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 239; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 238; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyObject_Call(__pyx_builtin_property, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 238; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; if (PyObject_SetItem(__pyx_t_2, __pyx_n_s___repr_base, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 239; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/tslib.pyx":243 * * @property * def tz(self): # <<<<<<<<<<<<<< * """ * Alias for tzinfo */ __pyx_t_3 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6pandas_5tslib_9Timestamp_19tz, 0, __pyx_n_s_291, NULL, __pyx_n_s_252, ((PyObject *)__pyx_k_codeobj_290)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 242; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyObject_Call(__pyx_builtin_property, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 242; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; if (PyObject_SetItem(__pyx_t_2, __pyx_n_s__tz, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/tslib.pyx":250 * * @property * def freq(self): # <<<<<<<<<<<<<< * return self.offset * */ __pyx_t_3 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6pandas_5tslib_9Timestamp_21freq, 0, __pyx_n_s_294, NULL, __pyx_n_s_252, ((PyObject *)__pyx_k_codeobj_293)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 250; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 249; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyObject_Call(__pyx_builtin_property, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 249; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; if (PyObject_SetItem(__pyx_t_2, __pyx_n_s__freq, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 250; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/tslib.pyx":253 * return self.offset * * def __setstate__(self, state): # <<<<<<<<<<<<<< * self.value = state[0] * self.offset = state[1] */ __pyx_t_3 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6pandas_5tslib_9Timestamp_23__setstate__, 0, __pyx_n_s_297, NULL, __pyx_n_s_252, ((PyObject *)__pyx_k_codeobj_296)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 253; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyObject_SetItem(__pyx_t_2, __pyx_n_s____setstate__, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 253; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/tslib.pyx":258 * self.tzinfo = state[2] * * def __reduce__(self): # <<<<<<<<<<<<<< * object_state = self.value, self.offset, self.tzinfo * return (Timestamp, object_state) */ __pyx_t_3 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6pandas_5tslib_9Timestamp_25__reduce__, 0, __pyx_n_s_300, NULL, __pyx_n_s_252, ((PyObject *)__pyx_k_codeobj_299)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 258; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyObject_SetItem(__pyx_t_2, __pyx_n_s____reduce__, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 258; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/tslib.pyx":262 * return (Timestamp, object_state) * * def to_period(self, freq=None): # <<<<<<<<<<<<<< * """ * Return an period of which this timestamp is an observation. */ __pyx_t_3 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6pandas_5tslib_9Timestamp_27to_period, 0, __pyx_n_s_304, NULL, __pyx_n_s_252, ((PyObject *)__pyx_k_codeobj_302)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 262; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_3, ((PyObject *)__pyx_k_tuple_303)); if (PyObject_SetItem(__pyx_t_2, __pyx_n_s__to_period, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 262; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/tslib.pyx":274 * * @property * def dayofweek(self): # <<<<<<<<<<<<<< * return self.weekday() * */ __pyx_t_3 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6pandas_5tslib_9Timestamp_29dayofweek, 0, __pyx_n_s_307, NULL, __pyx_n_s_252, ((PyObject *)__pyx_k_codeobj_306)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 274; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 273; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyObject_Call(__pyx_builtin_property, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 273; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; if (PyObject_SetItem(__pyx_t_2, __pyx_n_s__dayofweek, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 274; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/tslib.pyx":278 * * @property * def dayofyear(self): # <<<<<<<<<<<<<< * return self._get_field('doy') * */ __pyx_t_3 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6pandas_5tslib_9Timestamp_31dayofyear, 0, __pyx_n_s_310, NULL, __pyx_n_s_252, ((PyObject *)__pyx_k_codeobj_309)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 278; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 277; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyObject_Call(__pyx_builtin_property, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 277; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; if (PyObject_SetItem(__pyx_t_2, __pyx_n_s__dayofyear, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 278; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/tslib.pyx":282 * * @property * def week(self): # <<<<<<<<<<<<<< * return self._get_field('woy') * */ __pyx_t_3 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6pandas_5tslib_9Timestamp_33week, 0, __pyx_n_s_313, NULL, __pyx_n_s_252, ((PyObject *)__pyx_k_codeobj_312)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 282; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 281; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyObject_Call(__pyx_builtin_property, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 281; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; if (PyObject_SetItem(__pyx_t_2, __pyx_n_s__week, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 282; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/tslib.pyx":285 * return self._get_field('woy') * * weekofyear = week # <<<<<<<<<<<<<< * * @property */ __pyx_t_3 = PyObject_GetItem(__pyx_t_2, __pyx_n_s__week); if (unlikely(!__pyx_t_3)) { PyErr_Clear(); __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s__week); } if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 285; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyObject_SetItem(__pyx_t_2, __pyx_n_s__weekofyear, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 285; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/tslib.pyx":288 * * @property * def quarter(self): # <<<<<<<<<<<<<< * return self._get_field('q') * */ __pyx_t_3 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6pandas_5tslib_9Timestamp_35quarter, 0, __pyx_n_s_316, NULL, __pyx_n_s_252, ((PyObject *)__pyx_k_codeobj_315)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 288; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 287; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyObject_Call(__pyx_builtin_property, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 287; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; if (PyObject_SetItem(__pyx_t_2, __pyx_n_s__quarter, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 288; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/tslib.pyx":292 * * @property * def freqstr(self): # <<<<<<<<<<<<<< * return getattr(self.offset, 'freqstr', self.offset) * */ __pyx_t_3 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6pandas_5tslib_9Timestamp_37freqstr, 0, __pyx_n_s_319, NULL, __pyx_n_s_252, ((PyObject *)__pyx_k_codeobj_318)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 292; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 291; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyObject_Call(__pyx_builtin_property, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 291; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; if (PyObject_SetItem(__pyx_t_2, __pyx_n_s__freqstr, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 292; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/tslib.pyx":296 * * @property * def asm8(self): # <<<<<<<<<<<<<< * return np.int64(self.value).view('M8[ns]') * */ __pyx_t_3 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6pandas_5tslib_9Timestamp_39asm8, 0, __pyx_n_s_322, NULL, __pyx_n_s_252, ((PyObject *)__pyx_k_codeobj_321)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 296; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 295; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyObject_Call(__pyx_builtin_property, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 295; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; if (PyObject_SetItem(__pyx_t_2, __pyx_n_s__asm8, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 296; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/tslib.pyx":299 * return np.int64(self.value).view('M8[ns]') * * def tz_localize(self, tz): # <<<<<<<<<<<<<< * """ * Convert naive Timestamp to local time zone */ __pyx_t_3 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6pandas_5tslib_9Timestamp_41tz_localize, 0, __pyx_n_s_325, NULL, __pyx_n_s_252, ((PyObject *)__pyx_k_codeobj_324)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 299; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyObject_SetItem(__pyx_t_2, __pyx_n_s__tz_localize, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 299; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/tslib.pyx":318 * 'tz_convert for conversions') * * def tz_convert(self, tz): # <<<<<<<<<<<<<< * """ * Convert Timestamp to another time zone or localize to requested time */ __pyx_t_3 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6pandas_5tslib_9Timestamp_43tz_convert, 0, __pyx_n_s_328, NULL, __pyx_n_s_252, ((PyObject *)__pyx_k_codeobj_327)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 318; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyObject_SetItem(__pyx_t_2, __pyx_n_s__tz_convert, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 318; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/tslib.pyx":339 * return Timestamp(self.value, tz=tz) * * astimezone = tz_convert # <<<<<<<<<<<<<< * * def replace(self, **kwds): */ __pyx_t_3 = PyObject_GetItem(__pyx_t_2, __pyx_n_s__tz_convert); if (unlikely(!__pyx_t_3)) { PyErr_Clear(); __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s__tz_convert); } if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 339; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyObject_SetItem(__pyx_t_2, __pyx_n_s__astimezone, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 339; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/tslib.pyx":341 * astimezone = tz_convert * * def replace(self, **kwds): # <<<<<<<<<<<<<< * return Timestamp(datetime.replace(self, **kwds), * offset=self.offset) */ __pyx_t_3 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6pandas_5tslib_9Timestamp_45replace, 0, __pyx_n_s_331, NULL, __pyx_n_s_252, ((PyObject *)__pyx_k_codeobj_330)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 341; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyObject_SetItem(__pyx_t_2, __pyx_n_s__replace, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 341; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/tslib.pyx":345 * offset=self.offset) * * def to_pydatetime(self, warn=True): # <<<<<<<<<<<<<< * """ * If warn=True, issue warning if nanoseconds is nonzero */ __pyx_t_3 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6pandas_5tslib_9Timestamp_47to_pydatetime, 0, __pyx_n_s_334, NULL, __pyx_n_s_252, ((PyObject *)__pyx_k_codeobj_333)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 345; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (!__Pyx_CyFunction_InitDefaults(__pyx_t_3, sizeof(__pyx_defaults), 1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 345; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_1 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 345; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_CyFunction_Defaults(__pyx_defaults, __pyx_t_3)->__pyx_arg_warn = __pyx_t_1; __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_CyFunction_SetDefaultsGetter(__pyx_t_3, __pyx_pf_6pandas_5tslib_9Timestamp_52__defaults__); if (PyObject_SetItem(__pyx_t_2, __pyx_n_s__to_pydatetime, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 345; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/tslib.pyx":361 * ts.dts.us, ts.tzinfo) * * def isoformat(self, sep='T'): # <<<<<<<<<<<<<< * base = super(_Timestamp, self).isoformat(sep=sep) * if self.nanosecond == 0: */ __pyx_t_3 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6pandas_5tslib_9Timestamp_49isoformat, 0, __pyx_n_s_338, NULL, __pyx_n_s_252, ((PyObject *)__pyx_k_codeobj_336)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 361; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_3, ((PyObject *)__pyx_k_tuple_337)); if (PyObject_SetItem(__pyx_t_2, __pyx_n_s__isoformat, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 361; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/tslib.pyx":378 * return base1 + base2 * * def _has_time_component(self): # <<<<<<<<<<<<<< * """ * Returns if the Timestamp has a time component */ __pyx_t_3 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6pandas_5tslib_9Timestamp_51_has_time_component, 0, __pyx_n_s_341, NULL, __pyx_n_s_252, ((PyObject *)__pyx_k_codeobj_340)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 378; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyObject_SetItem(__pyx_t_2, __pyx_n_s___has_time_component, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 378; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/tslib.pyx":142 * # Python front end to C extension type _Timestamp * # This serves as the box for datetime64 * class Timestamp(_Timestamp): # <<<<<<<<<<<<<< * """TimeStamp is the pandas equivalent of python's Datetime * and is interchangable with it in most cases. It's the type used */ __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 142; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(((PyObject *)((PyObject*)__pyx_ptype_6pandas_5tslib__Timestamp))); PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)((PyObject*)__pyx_ptype_6pandas_5tslib__Timestamp))); __Pyx_GIVEREF(((PyObject *)((PyObject*)__pyx_ptype_6pandas_5tslib__Timestamp))); if (PyDict_SetItemString(((PyObject *)__pyx_t_2), "__doc__", ((PyObject *)__pyx_kp_s_342)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 142; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_1 = __Pyx_CreateClass(((PyObject *)__pyx_t_3), ((PyObject *)__pyx_t_2), __pyx_n_s__Timestamp, __pyx_n_s__Timestamp, __pyx_n_s_252); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 142; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; if (PyDict_SetItem(__pyx_d, __pyx_n_s__Timestamp, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 142; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; /* "pandas/tslib.pyx":388 * * * _nat_strings = set(['NaT','nat','NAT','nan','NaN','NAN']) # <<<<<<<<<<<<<< * class NaTType(_NaT): * """(N)ot-(A)-(T)ime, the time equivalent of NaN""" */ __pyx_t_2 = PySet_New(0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 388; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_2)); if (PySet_Add(__pyx_t_2, ((PyObject *)__pyx_n_s__NaT)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 388; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (PySet_Add(__pyx_t_2, ((PyObject *)__pyx_n_s__nat)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 388; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (PySet_Add(__pyx_t_2, ((PyObject *)__pyx_n_s__NAT)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 388; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (PySet_Add(__pyx_t_2, ((PyObject *)__pyx_n_s__nan)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 388; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (PySet_Add(__pyx_t_2, ((PyObject *)__pyx_n_s__NaN)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 388; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (PySet_Add(__pyx_t_2, ((PyObject *)__pyx_n_s__NAN)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 388; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (PyDict_SetItem(__pyx_d, __pyx_n_s___nat_strings, ((PyObject *)__pyx_t_2)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 388; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; /* "pandas/tslib.pyx":389 * * _nat_strings = set(['NaT','nat','NAT','nan','NaN','NAN']) * class NaTType(_NaT): # <<<<<<<<<<<<<< * """(N)ot-(A)-(T)ime, the time equivalent of NaN""" * */ __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 389; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_2)); /* "pandas/tslib.pyx":392 * """(N)ot-(A)-(T)ime, the time equivalent of NaN""" * * def __new__(cls): # <<<<<<<<<<<<<< * cdef _NaT base * */ __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6pandas_5tslib_7NaTType_1__new__, __Pyx_CYFUNCTION_STATICMETHOD, __pyx_n_s_345, NULL, __pyx_n_s_252, ((PyObject *)__pyx_k_codeobj_344)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 392; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (PyObject_SetItem(__pyx_t_2, __pyx_n_s____new__, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 392; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pandas/tslib.pyx":401 * return base * * def __repr__(self): # <<<<<<<<<<<<<< * return 'NaT' * */ __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6pandas_5tslib_7NaTType_3__repr__, 0, __pyx_n_s_348, NULL, __pyx_n_s_252, ((PyObject *)__pyx_k_codeobj_347)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 401; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (PyObject_SetItem(__pyx_t_2, __pyx_n_s____repr__, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 401; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pandas/tslib.pyx":404 * return 'NaT' * * def __str__(self): # <<<<<<<<<<<<<< * return 'NaT' * */ __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6pandas_5tslib_7NaTType_5__str__, 0, __pyx_n_s_351, NULL, __pyx_n_s_252, ((PyObject *)__pyx_k_codeobj_350)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 404; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (PyObject_SetItem(__pyx_t_2, __pyx_n_s____str__, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 404; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pandas/tslib.pyx":407 * return 'NaT' * * def __hash__(self): # <<<<<<<<<<<<<< * return iNaT * */ __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6pandas_5tslib_7NaTType_7__hash__, 0, __pyx_n_s_354, NULL, __pyx_n_s_252, ((PyObject *)__pyx_k_codeobj_353)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 407; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (PyObject_SetItem(__pyx_t_2, __pyx_n_s____hash__, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 407; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pandas/tslib.pyx":410 * return iNaT * * def weekday(self): # <<<<<<<<<<<<<< * return -1 * */ __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6pandas_5tslib_7NaTType_9weekday, 0, __pyx_n_s_357, NULL, __pyx_n_s_252, ((PyObject *)__pyx_k_codeobj_356)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 410; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (PyObject_SetItem(__pyx_t_2, __pyx_n_s__weekday, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 410; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pandas/tslib.pyx":413 * return -1 * * def toordinal(self): # <<<<<<<<<<<<<< * return -1 * */ __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6pandas_5tslib_7NaTType_11toordinal, 0, __pyx_n_s_360, NULL, __pyx_n_s_252, ((PyObject *)__pyx_k_codeobj_359)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 413; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (PyObject_SetItem(__pyx_t_2, __pyx_n_s__toordinal, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 413; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pandas/tslib.pyx":389 * * _nat_strings = set(['NaT','nat','NAT','nan','NaN','NAN']) * class NaTType(_NaT): # <<<<<<<<<<<<<< * """(N)ot-(A)-(T)ime, the time equivalent of NaN""" * */ __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 389; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)((PyObject*)__pyx_ptype_6pandas_5tslib__NaT))); PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)((PyObject*)__pyx_ptype_6pandas_5tslib__NaT))); __Pyx_GIVEREF(((PyObject *)((PyObject*)__pyx_ptype_6pandas_5tslib__NaT))); if (PyDict_SetItemString(((PyObject *)__pyx_t_2), "__doc__", ((PyObject *)__pyx_kp_s_361)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 389; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_3 = __Pyx_CreateClass(((PyObject *)__pyx_t_1), ((PyObject *)__pyx_t_2), __pyx_n_s__NaTType, __pyx_n_s__NaTType, __pyx_n_s_252); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 389; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; if (PyDict_SetItem(__pyx_d, __pyx_n_s__NaTType, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 389; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; /* "pandas/tslib.pyx":416 * return -1 * * fields = ['year', 'quarter', 'month', 'day', 'hour', # <<<<<<<<<<<<<< * 'minute', 'second', 'microsecond', 'nanosecond', * 'week', 'dayofyear'] */ __pyx_t_2 = PyList_New(11); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 416; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(((PyObject *)__pyx_n_s__year)); PyList_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_n_s__year)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__year)); __Pyx_INCREF(((PyObject *)__pyx_n_s__quarter)); PyList_SET_ITEM(__pyx_t_2, 1, ((PyObject *)__pyx_n_s__quarter)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__quarter)); __Pyx_INCREF(((PyObject *)__pyx_n_s__month)); PyList_SET_ITEM(__pyx_t_2, 2, ((PyObject *)__pyx_n_s__month)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__month)); __Pyx_INCREF(((PyObject *)__pyx_n_s__day)); PyList_SET_ITEM(__pyx_t_2, 3, ((PyObject *)__pyx_n_s__day)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__day)); __Pyx_INCREF(((PyObject *)__pyx_n_s__hour)); PyList_SET_ITEM(__pyx_t_2, 4, ((PyObject *)__pyx_n_s__hour)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__hour)); __Pyx_INCREF(((PyObject *)__pyx_n_s__minute)); PyList_SET_ITEM(__pyx_t_2, 5, ((PyObject *)__pyx_n_s__minute)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__minute)); __Pyx_INCREF(((PyObject *)__pyx_n_s__second)); PyList_SET_ITEM(__pyx_t_2, 6, ((PyObject *)__pyx_n_s__second)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__second)); __Pyx_INCREF(((PyObject *)__pyx_n_s__microsecond)); PyList_SET_ITEM(__pyx_t_2, 7, ((PyObject *)__pyx_n_s__microsecond)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__microsecond)); __Pyx_INCREF(((PyObject *)__pyx_n_s__nanosecond)); PyList_SET_ITEM(__pyx_t_2, 8, ((PyObject *)__pyx_n_s__nanosecond)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__nanosecond)); __Pyx_INCREF(((PyObject *)__pyx_n_s__week)); PyList_SET_ITEM(__pyx_t_2, 9, ((PyObject *)__pyx_n_s__week)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__week)); __Pyx_INCREF(((PyObject *)__pyx_n_s__dayofyear)); PyList_SET_ITEM(__pyx_t_2, 10, ((PyObject *)__pyx_n_s__dayofyear)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__dayofyear)); if (PyDict_SetItem(__pyx_d, __pyx_n_s__fields, ((PyObject *)__pyx_t_2)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 416; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; /* "pandas/tslib.pyx":419 * 'minute', 'second', 'microsecond', 'nanosecond', * 'week', 'dayofyear'] * for field in fields: # <<<<<<<<<<<<<< * prop = property(fget=lambda self: -1) * setattr(NaTType, field, prop) */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__fields); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 419; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyList_CheckExact(__pyx_t_2) || PyTuple_CheckExact(__pyx_t_2)) { __pyx_t_3 = __pyx_t_2; __Pyx_INCREF(__pyx_t_3); __pyx_t_9 = 0; __pyx_t_10 = NULL; } else { __pyx_t_9 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 419; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_10 = Py_TYPE(__pyx_t_3)->tp_iternext; } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; for (;;) { if (!__pyx_t_10 && PyList_CheckExact(__pyx_t_3)) { if (__pyx_t_9 >= PyList_GET_SIZE(__pyx_t_3)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_2 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_9); __Pyx_INCREF(__pyx_t_2); __pyx_t_9++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 419; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_2 = PySequence_ITEM(__pyx_t_3, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 419; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif } else if (!__pyx_t_10 && PyTuple_CheckExact(__pyx_t_3)) { if (__pyx_t_9 >= PyTuple_GET_SIZE(__pyx_t_3)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_9); __Pyx_INCREF(__pyx_t_2); __pyx_t_9++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 419; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_2 = PySequence_ITEM(__pyx_t_3, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 419; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif } else { __pyx_t_2 = __pyx_t_10(__pyx_t_3); if (unlikely(!__pyx_t_2)) { if (PyErr_Occurred()) { if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear(); else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 419; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } break; } __Pyx_GOTREF(__pyx_t_2); } if (PyDict_SetItem(__pyx_d, __pyx_n_s__field, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 419; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/tslib.pyx":420 * 'week', 'dayofyear'] * for field in fields: * prop = property(fget=lambda self: -1) # <<<<<<<<<<<<<< * setattr(NaTType, field, prop) * */ __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 420; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_2)); __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6pandas_5tslib_100lambda1, 0, __pyx_n_s_362, NULL, __pyx_n_s_252, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 420; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__fget), __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 420; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyObject_Call(__pyx_builtin_property, ((PyObject *)__pyx_empty_tuple), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 420; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; if (PyDict_SetItem(__pyx_d, __pyx_n_s__prop, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 420; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pandas/tslib.pyx":421 * for field in fields: * prop = property(fget=lambda self: -1) * setattr(NaTType, field, prop) # <<<<<<<<<<<<<< * * */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__NaTType); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 421; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__field); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 421; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_11 = __Pyx_GetModuleGlobalName(__pyx_n_s__prop); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 421; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __pyx_t_12 = PyObject_SetAttr(__pyx_t_1, __pyx_t_2, __pyx_t_11); if (unlikely(__pyx_t_12 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 421; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/tslib.pyx":424 * * * NaT = NaTType() # <<<<<<<<<<<<<< * * iNaT = util.get_nat() */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s__NaTType); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 424; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_11 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 424; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (PyDict_SetItem(__pyx_d, __pyx_n_s__NaT, __pyx_t_11) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 424; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; /* "pandas/tslib.pyx":426 * NaT = NaTType() * * iNaT = util.get_nat() # <<<<<<<<<<<<<< * * */ __pyx_t_11 = __Pyx_PyInt_to_py_npy_int64(get_nat()); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 426; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); if (PyDict_SetItem(__pyx_d, __pyx_n_s__iNaT, __pyx_t_11) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 426; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; /* "pandas/tslib.pyx":444 * return ', tz=%s' % zone * * def is_timestamp_array(ndarray[object] values): # <<<<<<<<<<<<<< * cdef int i, n = len(values) * if n == 0: */ __pyx_t_11 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5tslib_7is_timestamp_array, NULL, __pyx_n_s_252); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 444; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); if (PyDict_SetItem(__pyx_d, __pyx_n_s__is_timestamp_array, __pyx_t_11) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 444; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; /* "pandas/tslib.pyx":480 * # These are defined as magic numbers due to strange * # wraparound behavior when using the true int64 lower boundary * cdef int64_t _NS_LOWER_BOUND = -9223285636854775000LL # <<<<<<<<<<<<<< * cdef int64_t _NS_UPPER_BOUND = 9223372036854775807LL * */ __pyx_v_6pandas_5tslib__NS_LOWER_BOUND = -9223285636854775000LL; /* "pandas/tslib.pyx":481 * # wraparound behavior when using the true int64 lower boundary * cdef int64_t _NS_LOWER_BOUND = -9223285636854775000LL * cdef int64_t _NS_UPPER_BOUND = 9223372036854775807LL # <<<<<<<<<<<<<< * * cdef pandas_datetimestruct _NS_MIN_DTS, _NS_MAX_DTS */ __pyx_v_6pandas_5tslib__NS_UPPER_BOUND = 9223372036854775807LL; /* "pandas/tslib.pyx":484 * * cdef pandas_datetimestruct _NS_MIN_DTS, _NS_MAX_DTS * pandas_datetime_to_datetimestruct(_NS_LOWER_BOUND, PANDAS_FR_ns, &_NS_MIN_DTS) # <<<<<<<<<<<<<< * pandas_datetime_to_datetimestruct(_NS_UPPER_BOUND, PANDAS_FR_ns, &_NS_MAX_DTS) * */ pandas_datetime_to_datetimestruct(__pyx_v_6pandas_5tslib__NS_LOWER_BOUND, PANDAS_FR_ns, (&__pyx_v_6pandas_5tslib__NS_MIN_DTS)); /* "pandas/tslib.pyx":485 * cdef pandas_datetimestruct _NS_MIN_DTS, _NS_MAX_DTS * pandas_datetime_to_datetimestruct(_NS_LOWER_BOUND, PANDAS_FR_ns, &_NS_MIN_DTS) * pandas_datetime_to_datetimestruct(_NS_UPPER_BOUND, PANDAS_FR_ns, &_NS_MAX_DTS) # <<<<<<<<<<<<<< * * Timestamp.min = Timestamp(_NS_LOWER_BOUND) */ pandas_datetime_to_datetimestruct(__pyx_v_6pandas_5tslib__NS_UPPER_BOUND, PANDAS_FR_ns, (&__pyx_v_6pandas_5tslib__NS_MAX_DTS)); /* "pandas/tslib.pyx":487 * pandas_datetime_to_datetimestruct(_NS_UPPER_BOUND, PANDAS_FR_ns, &_NS_MAX_DTS) * * Timestamp.min = Timestamp(_NS_LOWER_BOUND) # <<<<<<<<<<<<<< * Timestamp.max = Timestamp(_NS_UPPER_BOUND) * */ __pyx_t_11 = __Pyx_GetModuleGlobalName(__pyx_n_s__Timestamp); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 487; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __pyx_t_3 = __Pyx_PyInt_to_py_npy_int64(__pyx_v_6pandas_5tslib__NS_LOWER_BOUND); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 487; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 487; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyObject_Call(__pyx_t_11, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 487; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__Timestamp); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 487; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (__Pyx_PyObject_SetAttrStr(__pyx_t_2, __pyx_n_s__min, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 487; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/tslib.pyx":488 * * Timestamp.min = Timestamp(_NS_LOWER_BOUND) * Timestamp.max = Timestamp(_NS_UPPER_BOUND) # <<<<<<<<<<<<<< * * */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__Timestamp); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 488; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyInt_to_py_npy_int64(__pyx_v_6pandas_5tslib__NS_UPPER_BOUND); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 488; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_11 = PyTuple_New(1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 488; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_11), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 488; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_11)); __pyx_t_11 = 0; __pyx_t_11 = __Pyx_GetModuleGlobalName(__pyx_n_s__Timestamp); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 488; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); if (__Pyx_PyObject_SetAttrStr(__pyx_t_11, __pyx_n_s__max, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 488; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; /* "pandas/tslib.pyx":494 * # Frequency inference * * def unique_deltas(ndarray[int64_t] arr): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = len(arr) */ __pyx_t_11 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5tslib_11unique_deltas, NULL, __pyx_n_s_252); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 494; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); if (PyDict_SetItem(__pyx_d, __pyx_n_s__unique_deltas, __pyx_t_11) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 494; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; /* "pandas/tslib.pyx":522 * * * def apply_offset(ndarray[object] values, object offset): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = len(values) */ __pyx_t_11 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5tslib_13apply_offset, NULL, __pyx_n_s_252); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 522; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); if (PyDict_SetItem(__pyx_d, __pyx_n_s__apply_offset, __pyx_t_11) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 522; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; /* "pandas/tslib.pyx":549 * cdef int _reverse_ops[6] * * _reverse_ops[Py_LT] = Py_GT # <<<<<<<<<<<<<< * _reverse_ops[Py_LE] = Py_GE * _reverse_ops[Py_EQ] = Py_EQ */ (__pyx_v_6pandas_5tslib__reverse_ops[Py_LT]) = Py_GT; /* "pandas/tslib.pyx":550 * * _reverse_ops[Py_LT] = Py_GT * _reverse_ops[Py_LE] = Py_GE # <<<<<<<<<<<<<< * _reverse_ops[Py_EQ] = Py_EQ * _reverse_ops[Py_NE] = Py_NE */ (__pyx_v_6pandas_5tslib__reverse_ops[Py_LE]) = Py_GE; /* "pandas/tslib.pyx":551 * _reverse_ops[Py_LT] = Py_GT * _reverse_ops[Py_LE] = Py_GE * _reverse_ops[Py_EQ] = Py_EQ # <<<<<<<<<<<<<< * _reverse_ops[Py_NE] = Py_NE * _reverse_ops[Py_GT] = Py_LT */ (__pyx_v_6pandas_5tslib__reverse_ops[Py_EQ]) = Py_EQ; /* "pandas/tslib.pyx":552 * _reverse_ops[Py_LE] = Py_GE * _reverse_ops[Py_EQ] = Py_EQ * _reverse_ops[Py_NE] = Py_NE # <<<<<<<<<<<<<< * _reverse_ops[Py_GT] = Py_LT * _reverse_ops[Py_GE] = Py_LE */ (__pyx_v_6pandas_5tslib__reverse_ops[Py_NE]) = Py_NE; /* "pandas/tslib.pyx":553 * _reverse_ops[Py_EQ] = Py_EQ * _reverse_ops[Py_NE] = Py_NE * _reverse_ops[Py_GT] = Py_LT # <<<<<<<<<<<<<< * _reverse_ops[Py_GE] = Py_LE * */ (__pyx_v_6pandas_5tslib__reverse_ops[Py_GT]) = Py_LT; /* "pandas/tslib.pyx":554 * _reverse_ops[Py_NE] = Py_NE * _reverse_ops[Py_GT] = Py_LT * _reverse_ops[Py_GE] = Py_LE # <<<<<<<<<<<<<< * * */ (__pyx_v_6pandas_5tslib__reverse_ops[Py_GE]) = Py_LE; /* "pandas/tslib.pyx":557 * * * cdef str _NDIM_STRING = "ndim" # <<<<<<<<<<<<<< * * # This is PITA. Because we inherit from datetime, which has very specific */ __Pyx_INCREF(((PyObject *)__pyx_n_s__ndim)); __Pyx_XGOTREF(((PyObject *)__pyx_v_6pandas_5tslib__NDIM_STRING)); __Pyx_DECREF_SET(__pyx_v_6pandas_5tslib__NDIM_STRING, __pyx_n_s__ndim); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__ndim)); /* "pandas/tslib.pyx":690 * * * cdef PyTypeObject* ts_type = Timestamp # <<<<<<<<<<<<<< * * */ __pyx_t_11 = __Pyx_GetModuleGlobalName(__pyx_n_s__Timestamp); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 690; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __pyx_v_6pandas_5tslib_ts_type = ((PyTypeObject *)__pyx_t_11); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; /* "pandas/tslib.pyx":699 * cdef bint _nat_scalar_rules[6] * * _nat_scalar_rules[Py_EQ] = False # <<<<<<<<<<<<<< * _nat_scalar_rules[Py_NE] = True * _nat_scalar_rules[Py_LT] = False */ (__pyx_v_6pandas_5tslib__nat_scalar_rules[Py_EQ]) = 0; /* "pandas/tslib.pyx":700 * * _nat_scalar_rules[Py_EQ] = False * _nat_scalar_rules[Py_NE] = True # <<<<<<<<<<<<<< * _nat_scalar_rules[Py_LT] = False * _nat_scalar_rules[Py_LE] = False */ (__pyx_v_6pandas_5tslib__nat_scalar_rules[Py_NE]) = 1; /* "pandas/tslib.pyx":701 * _nat_scalar_rules[Py_EQ] = False * _nat_scalar_rules[Py_NE] = True * _nat_scalar_rules[Py_LT] = False # <<<<<<<<<<<<<< * _nat_scalar_rules[Py_LE] = False * _nat_scalar_rules[Py_GT] = False */ (__pyx_v_6pandas_5tslib__nat_scalar_rules[Py_LT]) = 0; /* "pandas/tslib.pyx":702 * _nat_scalar_rules[Py_NE] = True * _nat_scalar_rules[Py_LT] = False * _nat_scalar_rules[Py_LE] = False # <<<<<<<<<<<<<< * _nat_scalar_rules[Py_GT] = False * _nat_scalar_rules[Py_GE] = False */ (__pyx_v_6pandas_5tslib__nat_scalar_rules[Py_LE]) = 0; /* "pandas/tslib.pyx":703 * _nat_scalar_rules[Py_LT] = False * _nat_scalar_rules[Py_LE] = False * _nat_scalar_rules[Py_GT] = False # <<<<<<<<<<<<<< * _nat_scalar_rules[Py_GE] = False * */ (__pyx_v_6pandas_5tslib__nat_scalar_rules[Py_GT]) = 0; /* "pandas/tslib.pyx":704 * _nat_scalar_rules[Py_LE] = False * _nat_scalar_rules[Py_GT] = False * _nat_scalar_rules[Py_GE] = False # <<<<<<<<<<<<<< * * */ (__pyx_v_6pandas_5tslib__nat_scalar_rules[Py_GE]) = 0; /* "pandas/tslib.pyx":728 * * * def _delta_to_nanoseconds(delta): # <<<<<<<<<<<<<< * if hasattr(delta, 'delta'): * delta = delta.delta */ __pyx_t_11 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5tslib_15_delta_to_nanoseconds, NULL, __pyx_n_s_252); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 728; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); if (PyDict_SetItem(__pyx_d, __pyx_n_s_42, __pyx_t_11) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 728; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; /* "pandas/tslib.pyx":890 * * * def get_timezone(tz): # <<<<<<<<<<<<<< * return _get_zone(tz) * */ __pyx_t_11 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5tslib_19get_timezone, NULL, __pyx_n_s_252); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 890; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); if (PyDict_SetItem(__pyx_d, __pyx_n_s__get_timezone, __pyx_t_11) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 890; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; /* "pandas/tslib.pyx":909 * * * class OutOfBoundsDatetime(ValueError): # <<<<<<<<<<<<<< * pass * */ __pyx_t_11 = PyDict_New(); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 909; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_11)); __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 909; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_builtin_ValueError); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_builtin_ValueError); __Pyx_GIVEREF(__pyx_builtin_ValueError); __pyx_t_2 = __Pyx_CreateClass(((PyObject *)__pyx_t_3), ((PyObject *)__pyx_t_11), __pyx_n_s__OutOfBoundsDatetime, __pyx_n_s__OutOfBoundsDatetime, __pyx_n_s_252); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 909; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; if (PyDict_SetItem(__pyx_d, __pyx_n_s__OutOfBoundsDatetime, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 909; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_11)); __pyx_t_11 = 0; /* "pandas/tslib.pyx":939 * # obj.dtval = _dts_to_pydatetime(&obj.dts) * * def datetime_to_datetime64(ndarray[object] values): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = len(values) */ __pyx_t_11 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5tslib_21datetime_to_datetime64, NULL, __pyx_n_s_252); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 939; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); if (PyDict_SetItem(__pyx_d, __pyx_n_s_375, __pyx_t_11) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 939; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; /* "pandas/tslib.pyx":974 * return result, inferred_tz * * _not_datelike_strings = set(['a','A','m','M','p','P','t','T']) # <<<<<<<<<<<<<< * * def _does_string_look_like_datetime(date_string): */ __pyx_t_11 = PySet_New(0); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 974; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_11)); if (PySet_Add(__pyx_t_11, ((PyObject *)__pyx_n_s__a)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 974; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (PySet_Add(__pyx_t_11, ((PyObject *)__pyx_n_s__A)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 974; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (PySet_Add(__pyx_t_11, ((PyObject *)__pyx_n_s__m)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 974; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (PySet_Add(__pyx_t_11, ((PyObject *)__pyx_n_s__M)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 974; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (PySet_Add(__pyx_t_11, ((PyObject *)__pyx_n_s__p)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 974; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (PySet_Add(__pyx_t_11, ((PyObject *)__pyx_n_s__P)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 974; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (PySet_Add(__pyx_t_11, ((PyObject *)__pyx_n_s__t)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 974; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (PySet_Add(__pyx_t_11, ((PyObject *)__pyx_n_s__T)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 974; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (PyDict_SetItem(__pyx_d, __pyx_n_s_54, ((PyObject *)__pyx_t_11)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 974; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(((PyObject *)__pyx_t_11)); __pyx_t_11 = 0; /* "pandas/tslib.pyx":976 * _not_datelike_strings = set(['a','A','m','M','p','P','t','T']) * * def _does_string_look_like_datetime(date_string): # <<<<<<<<<<<<<< * if date_string.startswith('0'): * # Strings starting with 0 are more consistent with a */ __pyx_t_11 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5tslib_23_does_string_look_like_datetime, NULL, __pyx_n_s_252); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 976; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); if (PyDict_SetItem(__pyx_d, __pyx_n_s_55, __pyx_t_11) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 976; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; /* "pandas/tslib.pyx":993 * return True * * def parse_datetime_string(date_string, **kwargs): # <<<<<<<<<<<<<< * if not _does_string_look_like_datetime(date_string): * raise ValueError('Given date string not likely a datetime.') */ __pyx_t_11 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5tslib_25parse_datetime_string, NULL, __pyx_n_s_252); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 993; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); if (PyDict_SetItem(__pyx_d, __pyx_n_s_64, __pyx_t_11) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 993; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; /* "pandas/tslib.pyx":1000 * return dt * * def array_to_datetime(ndarray[object] values, raise_=False, dayfirst=False, # <<<<<<<<<<<<<< * format=None, utc=None, coerce=False, unit=None): * cdef: */ __pyx_t_11 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1000; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __pyx_k_58 = __pyx_t_11; __Pyx_GIVEREF(__pyx_t_11); __pyx_t_11 = 0; __pyx_t_11 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1000; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __pyx_k_59 = __pyx_t_11; __Pyx_GIVEREF(__pyx_t_11); __pyx_t_11 = 0; /* "pandas/tslib.pyx":1001 * * def array_to_datetime(ndarray[object] values, raise_=False, dayfirst=False, * format=None, utc=None, coerce=False, unit=None): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = len(values) */ __pyx_t_11 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1001; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __pyx_k_60 = __pyx_t_11; __Pyx_GIVEREF(__pyx_t_11); __pyx_t_11 = 0; /* "pandas/tslib.pyx":1000 * return dt * * def array_to_datetime(ndarray[object] values, raise_=False, dayfirst=False, # <<<<<<<<<<<<<< * format=None, utc=None, coerce=False, unit=None): * cdef: */ __pyx_t_11 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5tslib_27array_to_datetime, NULL, __pyx_n_s_252); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1000; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); if (PyDict_SetItem(__pyx_d, __pyx_n_s__array_to_datetime, __pyx_t_11) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1000; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; /* "pandas/tslib.pyx":1169 * return oresult * * def array_to_timedelta64(ndarray[object] values, coerce=False): # <<<<<<<<<<<<<< * """ convert an ndarray to an array of ints that are timedeltas * force conversion if coerce = True, */ __pyx_t_11 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1169; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __pyx_k_67 = __pyx_t_11; __Pyx_GIVEREF(__pyx_t_11); __pyx_t_11 = 0; __pyx_t_11 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5tslib_29array_to_timedelta64, NULL, __pyx_n_s_252); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1169; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); if (PyDict_SetItem(__pyx_d, __pyx_n_s_384, __pyx_t_11) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1169; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; /* "pandas/tslib.pyx":1185 * return iresult * * def convert_to_timedelta(object ts, object unit='ns', coerce=False): # <<<<<<<<<<<<<< * return convert_to_timedelta64(ts, unit, coerce) * */ __pyx_t_11 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1185; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __pyx_k_70 = __pyx_t_11; __Pyx_GIVEREF(__pyx_t_11); __pyx_t_11 = 0; __pyx_t_11 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5tslib_31convert_to_timedelta, NULL, __pyx_n_s_252); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1185; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); if (PyDict_SetItem(__pyx_d, __pyx_n_s_387, __pyx_t_11) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1185; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; /* "pandas/tslib.pyx":1244 * return ts.astype('timedelta64[ns]') * * def repr_timedelta64(object value, format=None): # <<<<<<<<<<<<<< * """ * provide repr for timedelta64 */ __pyx_t_11 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5tslib_33repr_timedelta64, NULL, __pyx_n_s_252); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1244; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); if (PyDict_SetItem(__pyx_d, __pyx_n_s__repr_timedelta64, __pyx_t_11) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1244; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; /* "pandas/tslib.pyx":1313 * * * def array_strptime(ndarray[object] values, object fmt, coerce=False): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = len(values) */ __pyx_t_11 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1313; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __pyx_k_84 = __pyx_t_11; __Pyx_GIVEREF(__pyx_t_11); __pyx_t_11 = 0; __pyx_t_11 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5tslib_35array_strptime, NULL, __pyx_n_s_252); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1313; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); if (PyDict_SetItem(__pyx_d, __pyx_n_s__array_strptime, __pyx_t_11) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1313; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; /* "pandas/tslib.pyx":1599 * return (base*m) + (frac*m) * * def cast_to_nanoseconds(ndarray arr): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = arr.size */ __pyx_t_11 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5tslib_39cast_to_nanoseconds, NULL, __pyx_n_s_252); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1599; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); if (PyDict_SetItem(__pyx_d, __pyx_n_s__cast_to_nanoseconds, __pyx_t_11) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1599; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; /* "pandas/tslib.pyx":1631 * * * def pydt_to_i8(object pydt): # <<<<<<<<<<<<<< * ''' * Convert to int64 representation compatible with numpy datetime64; converts */ __pyx_t_11 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5tslib_41pydt_to_i8, NULL, __pyx_n_s_252); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1631; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); if (PyDict_SetItem(__pyx_d, __pyx_n_s__pydt_to_i8, __pyx_t_11) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1631; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; /* "pandas/tslib.pyx":1643 * return ts.value * * def i8_to_pydt(int64_t i8, object tzinfo = None): # <<<<<<<<<<<<<< * ''' * Inverse of pydt_to_i8 */ __pyx_t_11 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5tslib_43i8_to_pydt, NULL, __pyx_n_s_252); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1643; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); if (PyDict_SetItem(__pyx_d, __pyx_n_s__i8_to_pydt, __pyx_t_11) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1643; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; /* "pandas/tslib.pyx":1652 * # time zone conversion helpers * * try: # <<<<<<<<<<<<<< * from dateutil.tz import tzutc as _du_utc * import pytz */ { __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_6, &__pyx_t_5); __Pyx_XGOTREF(__pyx_t_7); __Pyx_XGOTREF(__pyx_t_6); __Pyx_XGOTREF(__pyx_t_5); /*try:*/ { /* "pandas/tslib.pyx":1653 * * try: * from dateutil.tz import tzutc as _du_utc # <<<<<<<<<<<<<< * import pytz * UTC = pytz.utc */ __pyx_t_11 = PyList_New(1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1653; __pyx_clineno = __LINE__; goto __pyx_L14_error;} __Pyx_GOTREF(__pyx_t_11); __Pyx_INCREF(((PyObject *)__pyx_n_s__tzutc)); PyList_SET_ITEM(__pyx_t_11, 0, ((PyObject *)__pyx_n_s__tzutc)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__tzutc)); __pyx_t_2 = __Pyx_Import(((PyObject *)__pyx_n_s_253), ((PyObject *)__pyx_t_11), -1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1653; __pyx_clineno = __LINE__; goto __pyx_L14_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(((PyObject *)__pyx_t_11)); __pyx_t_11 = 0; __pyx_t_11 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s__tzutc); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1653; __pyx_clineno = __LINE__; goto __pyx_L14_error;} __Pyx_GOTREF(__pyx_t_11); if (PyDict_SetItem(__pyx_d, __pyx_n_s___du_utc, __pyx_t_11) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1653; __pyx_clineno = __LINE__; goto __pyx_L14_error;} __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/tslib.pyx":1654 * try: * from dateutil.tz import tzutc as _du_utc * import pytz # <<<<<<<<<<<<<< * UTC = pytz.utc * have_pytz = True */ __pyx_t_2 = __Pyx_Import(((PyObject *)__pyx_n_s__pytz), 0, -1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1654; __pyx_clineno = __LINE__; goto __pyx_L14_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s__pytz, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1654; __pyx_clineno = __LINE__; goto __pyx_L14_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/tslib.pyx":1655 * from dateutil.tz import tzutc as _du_utc * import pytz * UTC = pytz.utc # <<<<<<<<<<<<<< * have_pytz = True * except: */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__pytz); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1655; __pyx_clineno = __LINE__; goto __pyx_L14_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__utc); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1655; __pyx_clineno = __LINE__; goto __pyx_L14_error;} __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (PyDict_SetItem(__pyx_d, __pyx_n_s__UTC, __pyx_t_11) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1655; __pyx_clineno = __LINE__; goto __pyx_L14_error;} __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; /* "pandas/tslib.pyx":1656 * import pytz * UTC = pytz.utc * have_pytz = True # <<<<<<<<<<<<<< * except: * have_pytz = False */ __pyx_t_11 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1656; __pyx_clineno = __LINE__; goto __pyx_L14_error;} __Pyx_GOTREF(__pyx_t_11); if (PyDict_SetItem(__pyx_d, __pyx_n_s__have_pytz, __pyx_t_11) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1656; __pyx_clineno = __LINE__; goto __pyx_L14_error;} __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; } __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; goto __pyx_L21_try_end; __pyx_L14_error:; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; /* "pandas/tslib.pyx":1657 * UTC = pytz.utc * have_pytz = True * except: # <<<<<<<<<<<<<< * have_pytz = False * */ /*except:*/ { __Pyx_AddTraceback("pandas.tslib", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_11, &__pyx_t_2, &__pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1657; __pyx_clineno = __LINE__; goto __pyx_L16_except_error;} __Pyx_GOTREF(__pyx_t_11); __Pyx_GOTREF(__pyx_t_2); __Pyx_GOTREF(__pyx_t_3); /* "pandas/tslib.pyx":1658 * have_pytz = True * except: * have_pytz = False # <<<<<<<<<<<<<< * * def tz_convert(ndarray[int64_t] vals, object tz1, object tz2): */ __pyx_t_1 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1658; __pyx_clineno = __LINE__; goto __pyx_L16_except_error;} __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s__have_pytz, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1658; __pyx_clineno = __LINE__; goto __pyx_L16_except_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L15_exception_handled; } __pyx_L16_except_error:; __Pyx_XGIVEREF(__pyx_t_7); __Pyx_XGIVEREF(__pyx_t_6); __Pyx_XGIVEREF(__pyx_t_5); __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_6, __pyx_t_5); goto __pyx_L1_error; __pyx_L15_exception_handled:; __Pyx_XGIVEREF(__pyx_t_7); __Pyx_XGIVEREF(__pyx_t_6); __Pyx_XGIVEREF(__pyx_t_5); __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_6, __pyx_t_5); __pyx_L21_try_end:; } /* "pandas/tslib.pyx":1660 * have_pytz = False * * def tz_convert(ndarray[int64_t] vals, object tz1, object tz2): # <<<<<<<<<<<<<< * cdef: * ndarray[int64_t] utc_dates, result, trans, deltas */ __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5tslib_45tz_convert, NULL, __pyx_n_s_252); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1660; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s__tz_convert, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1660; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/tslib.pyx":1738 * return result * * def tz_convert_single(int64_t val, object tz1, object tz2): # <<<<<<<<<<<<<< * cdef: * ndarray[int64_t] trans, deltas */ __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5tslib_47tz_convert_single, NULL, __pyx_n_s_252); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1738; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s__tz_convert_single, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1738; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/tslib.pyx":1785 * * * trans_cache = {} # <<<<<<<<<<<<<< * utc_offset_cache = {} * */ __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1785; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_3)); if (PyDict_SetItem(__pyx_d, __pyx_n_s__trans_cache, ((PyObject *)__pyx_t_3)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1785; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; /* "pandas/tslib.pyx":1786 * * trans_cache = {} * utc_offset_cache = {} # <<<<<<<<<<<<<< * * def _get_transitions(tz): */ __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1786; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_3)); if (PyDict_SetItem(__pyx_d, __pyx_n_s__utc_offset_cache, ((PyObject *)__pyx_t_3)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1786; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; /* "pandas/tslib.pyx":1788 * utc_offset_cache = {} * * def _get_transitions(tz): # <<<<<<<<<<<<<< * """ * Get UTC times of DST transitions */ __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5tslib_49_get_transitions, NULL, __pyx_n_s_252); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1788; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s___get_transitions, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1788; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/tslib.pyx":1812 * return trans_cache[tz] * * def _get_deltas(tz): # <<<<<<<<<<<<<< * """ * Get UTC offsets in microseconds corresponding to DST transitions */ __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5tslib_51_get_deltas, NULL, __pyx_n_s_252); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1812; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s___get_deltas, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1812; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/tslib.pyx":1837 * 10**6) * * def tot_seconds(td): # <<<<<<<<<<<<<< * return total_seconds(td) * */ __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5tslib_53tot_seconds, NULL, __pyx_n_s_252); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1837; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s__tot_seconds, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1837; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/tslib.pyx":1856 * @cython.boundscheck(False) * @cython.wraparound(False) * def tz_localize_to_utc(ndarray[int64_t] vals, object tz, bint infer_dst=False): # <<<<<<<<<<<<<< * """ * Localize tzinfo-naive DateRange to given time zone (using pytz). If */ __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5tslib_57tz_localize_to_utc, NULL, __pyx_n_s_252); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1856; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s__tz_localize_to_utc, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1856; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/tslib.pyx":2028 * #---------------------------------------------------------------------- * * def build_field_sarray(ndarray[int64_t] dtindex): # <<<<<<<<<<<<<< * ''' * Datetime as int64 representation to a structured array of fields */ __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5tslib_59build_field_sarray, NULL, __pyx_n_s_252); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2028; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s__build_field_sarray, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2028; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/tslib.pyx":2070 * return out * * def get_time_micros(ndarray[int64_t] dtindex): # <<<<<<<<<<<<<< * ''' * Datetime as int64 representation to a structured array of fields */ __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5tslib_61get_time_micros, NULL, __pyx_n_s_252); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2070; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s__get_time_micros, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2070; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/tslib.pyx":2089 * * @cython.wraparound(False) * def get_date_field(ndarray[int64_t] dtindex, object field): # <<<<<<<<<<<<<< * ''' * Given a int64-based datetime index, extract the year, month, etc., */ __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5tslib_63get_date_field, NULL, __pyx_n_s_252); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2089; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s__get_date_field, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2089; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/tslib.pyx":2236 * return ts_dayofweek(ts) * * cdef int64_t DAY_NS = 86400000000000LL # <<<<<<<<<<<<<< * * */ __pyx_v_6pandas_5tslib_DAY_NS = 86400000000000LL; /* "pandas/tslib.pyx":2239 * * * def date_normalize(ndarray[int64_t] stamps, tz=None): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = len(stamps) */ __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5tslib_65date_normalize, NULL, __pyx_n_s_252); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2239; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s__date_normalize, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2239; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/tslib.pyx":2334 * * * def dates_normalized(ndarray[int64_t] stamps, tz=None): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = len(stamps) */ __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5tslib_67dates_normalized, NULL, __pyx_n_s_252); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2334; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s__dates_normalized, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2334; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/tslib.pyx":2372 * #---------------------------------------------------------------------- * * def isleapyear(int64_t year): # <<<<<<<<<<<<<< * return is_leapyear(year) * */ __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5tslib_69isleapyear, NULL, __pyx_n_s_252); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2372; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s__isleapyear, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2372; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/tslib.pyx":2375 * return is_leapyear(year) * * def monthrange(int64_t year, int64_t month): # <<<<<<<<<<<<<< * cdef: * int64_t days */ __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5tslib_71monthrange, NULL, __pyx_n_s_252); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2375; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s__monthrange, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2375; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/tslib.pyx":2529 * int get_yq(int64_t ordinal, int freq, int *quarter, int *year) * * initialize_daytime_conversion_factor_matrix() # <<<<<<<<<<<<<< * * # Period logic */ initialize_daytime_conversion_factor_matrix(); /* "pandas/tslib.pyx":2554 * return period_ord_w_mult * mult + 1; * * def dt64arr_to_periodarr(ndarray[int64_t] dtarr, int freq, tz=None): # <<<<<<<<<<<<<< * """ * Convert array of datetime64 values (passed in as 'i8' dtype) to a set of */ __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5tslib_75dt64arr_to_periodarr, NULL, __pyx_n_s_252); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2554; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_426, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2554; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/tslib.pyx":2577 * return out * * def periodarr_to_dt64arr(ndarray[int64_t] periodarr, int freq): # <<<<<<<<<<<<<< * """ * Convert array to datetime64 values from a set of ordinals corresponding to */ __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5tslib_77periodarr_to_dt64arr, NULL, __pyx_n_s_252); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2577; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_429, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2577; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/tslib.pyx":2595 * return out * * cdef char START = 'S' # <<<<<<<<<<<<<< * cdef char END = 'E' * */ __pyx_v_6pandas_5tslib_START = 'S'; /* "pandas/tslib.pyx":2596 * * cdef char START = 'S' * cdef char END = 'E' # <<<<<<<<<<<<<< * * cpdef int64_t period_asfreq(int64_t period_ordinal, int freq1, int freq2, */ __pyx_v_6pandas_5tslib_END = 'E'; /* "pandas/tslib.pyx":2617 * return retval * * def period_asfreq_arr(ndarray[int64_t] arr, int freq1, int freq2, bint end): # <<<<<<<<<<<<<< * """ * Convert int64-array of period ordinals from one frequency to another, and */ __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5tslib_81period_asfreq_arr, NULL, __pyx_n_s_252); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2617; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s__period_asfreq_arr, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2617; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/tslib.pyx":2649 * return result * * def period_ordinal(int y, int m, int d, int h, int min, int s, int us, int ps, int freq): # <<<<<<<<<<<<<< * cdef: * int64_t ordinal */ __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5tslib_83period_ordinal, NULL, __pyx_n_s_252); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2649; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s__period_ordinal, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2649; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/tslib.pyx":2676 * return pandas_datetimestruct_to_datetime(PANDAS_FR_ns, &dts) * * def period_format(int64_t value, int freq, object fmt=None): # <<<<<<<<<<<<<< * cdef: * int freq_group */ __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5tslib_87period_format, NULL, __pyx_n_s_252); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2676; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s__period_format, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2676; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/tslib.pyx":2719 * (b"%l", b"^`GH`^"), * (b"%u", b"^`IJ`^"), * (b"%n", b"^`KL`^")] # <<<<<<<<<<<<<< * * cdef list str_extra_fmts = ["^`AB`^", "^`CD`^", "^`EF`^", "^`GH`^", "^`IJ`^", "^`KL`^"] */ __pyx_t_3 = PyList_New(6); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2714; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(((PyObject *)__pyx_k_tuple_438)); PyList_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_k_tuple_438)); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_438)); __Pyx_INCREF(((PyObject *)__pyx_k_tuple_441)); PyList_SET_ITEM(__pyx_t_3, 1, ((PyObject *)__pyx_k_tuple_441)); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_441)); __Pyx_INCREF(((PyObject *)__pyx_k_tuple_444)); PyList_SET_ITEM(__pyx_t_3, 2, ((PyObject *)__pyx_k_tuple_444)); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_444)); __Pyx_INCREF(((PyObject *)__pyx_k_tuple_447)); PyList_SET_ITEM(__pyx_t_3, 3, ((PyObject *)__pyx_k_tuple_447)); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_447)); __Pyx_INCREF(((PyObject *)__pyx_k_tuple_450)); PyList_SET_ITEM(__pyx_t_3, 4, ((PyObject *)__pyx_k_tuple_450)); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_450)); __Pyx_INCREF(((PyObject *)__pyx_k_tuple_453)); PyList_SET_ITEM(__pyx_t_3, 5, ((PyObject *)__pyx_k_tuple_453)); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_453)); __Pyx_XGOTREF(((PyObject *)__pyx_v_6pandas_5tslib_extra_fmts)); __Pyx_DECREF_SET(__pyx_v_6pandas_5tslib_extra_fmts, ((PyObject*)__pyx_t_3)); __Pyx_GIVEREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; /* "pandas/tslib.pyx":2721 * (b"%n", b"^`KL`^")] * * cdef list str_extra_fmts = ["^`AB`^", "^`CD`^", "^`EF`^", "^`GH`^", "^`IJ`^", "^`KL`^"] # <<<<<<<<<<<<<< * * cdef object _period_strftime(int64_t value, int freq, object fmt): */ __pyx_t_3 = PyList_New(6); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2721; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(((PyObject *)__pyx_kp_s_437)); PyList_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_kp_s_437)); __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_437)); __Pyx_INCREF(((PyObject *)__pyx_kp_s_440)); PyList_SET_ITEM(__pyx_t_3, 1, ((PyObject *)__pyx_kp_s_440)); __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_440)); __Pyx_INCREF(((PyObject *)__pyx_kp_s_443)); PyList_SET_ITEM(__pyx_t_3, 2, ((PyObject *)__pyx_kp_s_443)); __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_443)); __Pyx_INCREF(((PyObject *)__pyx_kp_s_446)); PyList_SET_ITEM(__pyx_t_3, 3, ((PyObject *)__pyx_kp_s_446)); __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_446)); __Pyx_INCREF(((PyObject *)__pyx_kp_s_449)); PyList_SET_ITEM(__pyx_t_3, 4, ((PyObject *)__pyx_kp_s_449)); __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_449)); __Pyx_INCREF(((PyObject *)__pyx_kp_s_452)); PyList_SET_ITEM(__pyx_t_3, 5, ((PyObject *)__pyx_kp_s_452)); __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_452)); __Pyx_XGOTREF(((PyObject *)__pyx_v_6pandas_5tslib_str_extra_fmts)); __Pyx_DECREF_SET(__pyx_v_6pandas_5tslib_str_extra_fmts, ((PyObject*)__pyx_t_3)); __Pyx_GIVEREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; /* "pandas/tslib.pyx":2779 * ctypedef int (*accessor)(int64_t ordinal, int freq) except INT32_MIN * * def get_period_field(int code, int64_t value, int freq): # <<<<<<<<<<<<<< * cdef accessor f = _get_accessor_func(code) * if f is NULL: */ __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5tslib_89get_period_field, NULL, __pyx_n_s_252); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2779; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s__get_period_field, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2779; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/tslib.pyx":2785 * return f(value, freq) * * def get_period_field_arr(int code, ndarray[int64_t] arr, int freq): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, sz */ __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5tslib_91get_period_field_arr, NULL, __pyx_n_s_252); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2785; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_458, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2785; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/tslib.pyx":2831 * * * def extract_ordinals(ndarray[object] values, freq): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = len(values) */ __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5tslib_93extract_ordinals, NULL, __pyx_n_s_252); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2831; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s__extract_ordinals, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2831; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/tslib.pyx":2865 * return reso * * US_RESO = 0 # <<<<<<<<<<<<<< * S_RESO = 1 * T_RESO = 2 */ if (PyDict_SetItem(__pyx_d, __pyx_n_s__US_RESO, __pyx_int_0) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2865; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/tslib.pyx":2866 * * US_RESO = 0 * S_RESO = 1 # <<<<<<<<<<<<<< * T_RESO = 2 * H_RESO = 3 */ if (PyDict_SetItem(__pyx_d, __pyx_n_s__S_RESO, __pyx_int_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2866; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/tslib.pyx":2867 * US_RESO = 0 * S_RESO = 1 * T_RESO = 2 # <<<<<<<<<<<<<< * H_RESO = 3 * D_RESO = 4 */ if (PyDict_SetItem(__pyx_d, __pyx_n_s__T_RESO, __pyx_int_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2867; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/tslib.pyx":2868 * S_RESO = 1 * T_RESO = 2 * H_RESO = 3 # <<<<<<<<<<<<<< * D_RESO = 4 * */ if (PyDict_SetItem(__pyx_d, __pyx_n_s__H_RESO, __pyx_int_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2868; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/tslib.pyx":2869 * T_RESO = 2 * H_RESO = 3 * D_RESO = 4 # <<<<<<<<<<<<<< * * cdef inline int _reso_stamp(pandas_datetimestruct *dts): */ if (PyDict_SetItem(__pyx_d, __pyx_n_s__D_RESO, __pyx_int_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2869; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/tslib.pyx":2957 * * """ * import time # <<<<<<<<<<<<<< * import locale * import calendar */ __pyx_t_3 = __Pyx_Import(((PyObject *)__pyx_n_s__time), 0, -1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2957; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s__time, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2957; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/tslib.pyx":2958 * """ * import time * import locale # <<<<<<<<<<<<<< * import calendar * from re import compile as re_compile */ __pyx_t_3 = __Pyx_Import(((PyObject *)__pyx_n_s__locale), 0, -1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2958; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s__locale, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2958; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/tslib.pyx":2959 * import time * import locale * import calendar # <<<<<<<<<<<<<< * from re import compile as re_compile * from re import IGNORECASE */ __pyx_t_3 = __Pyx_Import(((PyObject *)__pyx_n_s__calendar), 0, -1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2959; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s__calendar, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2959; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/tslib.pyx":2960 * import locale * import calendar * from re import compile as re_compile # <<<<<<<<<<<<<< * from re import IGNORECASE * from re import escape as re_escape */ __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2960; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(((PyObject *)__pyx_n_s__compile)); PyList_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_n_s__compile)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__compile)); __pyx_t_2 = __Pyx_Import(((PyObject *)__pyx_n_s__re), ((PyObject *)__pyx_t_3), -1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2960; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s__compile); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2960; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s__re_compile, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2960; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/tslib.pyx":2961 * import calendar * from re import compile as re_compile * from re import IGNORECASE # <<<<<<<<<<<<<< * from re import escape as re_escape * from datetime import date as datetime_date */ __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2961; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(((PyObject *)__pyx_n_s__IGNORECASE)); PyList_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_n_s__IGNORECASE)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__IGNORECASE)); __pyx_t_3 = __Pyx_Import(((PyObject *)__pyx_n_s__re), ((PyObject *)__pyx_t_2), -1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2961; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s__IGNORECASE); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2961; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s__IGNORECASE, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2961; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/tslib.pyx":2962 * from re import compile as re_compile * from re import IGNORECASE * from re import escape as re_escape # <<<<<<<<<<<<<< * from datetime import date as datetime_date * */ __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2962; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(((PyObject *)__pyx_n_s__escape)); PyList_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_n_s__escape)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__escape)); __pyx_t_2 = __Pyx_Import(((PyObject *)__pyx_n_s__re), ((PyObject *)__pyx_t_3), -1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2962; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s__escape); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2962; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s__re_escape, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2962; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/tslib.pyx":2963 * from re import IGNORECASE * from re import escape as re_escape * from datetime import date as datetime_date # <<<<<<<<<<<<<< * * # Python 2 vs Python 3 */ __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2963; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(((PyObject *)__pyx_n_s__date)); PyList_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_n_s__date)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__date)); __pyx_t_3 = __Pyx_Import(((PyObject *)__pyx_n_s__datetime), ((PyObject *)__pyx_t_2), -1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2963; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s__date); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2963; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s__datetime_date, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2963; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/tslib.pyx":2966 * * # Python 2 vs Python 3 * try: # <<<<<<<<<<<<<< * from thread import allocate_lock as _thread_allocate_lock * except: */ { __Pyx_ExceptionSave(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7); __Pyx_XGOTREF(__pyx_t_5); __Pyx_XGOTREF(__pyx_t_6); __Pyx_XGOTREF(__pyx_t_7); /*try:*/ { /* "pandas/tslib.pyx":2967 * # Python 2 vs Python 3 * try: * from thread import allocate_lock as _thread_allocate_lock # <<<<<<<<<<<<<< * except: * try: */ __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2967; __pyx_clineno = __LINE__; goto __pyx_L24_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(((PyObject *)__pyx_n_s__allocate_lock)); PyList_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_n_s__allocate_lock)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__allocate_lock)); __pyx_t_2 = __Pyx_Import(((PyObject *)__pyx_n_s__thread), ((PyObject *)__pyx_t_3), -1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2967; __pyx_clineno = __LINE__; goto __pyx_L24_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s__allocate_lock); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2967; __pyx_clineno = __LINE__; goto __pyx_L24_error;} __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_461, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2967; __pyx_clineno = __LINE__; goto __pyx_L24_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; goto __pyx_L31_try_end; __pyx_L24_error:; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/tslib.pyx":2968 * try: * from thread import allocate_lock as _thread_allocate_lock * except: # <<<<<<<<<<<<<< * try: * from _thread import allocate_lock as _thread_allocate_lock */ /*except:*/ { __Pyx_AddTraceback("pandas.tslib", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_3, &__pyx_t_11) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2968; __pyx_clineno = __LINE__; goto __pyx_L26_except_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_GOTREF(__pyx_t_3); __Pyx_GOTREF(__pyx_t_11); /* "pandas/tslib.pyx":2969 * from thread import allocate_lock as _thread_allocate_lock * except: * try: # <<<<<<<<<<<<<< * from _thread import allocate_lock as _thread_allocate_lock * except: */ { __Pyx_ExceptionSave(&__pyx_t_13, &__pyx_t_14, &__pyx_t_15); __Pyx_XGOTREF(__pyx_t_13); __Pyx_XGOTREF(__pyx_t_14); __Pyx_XGOTREF(__pyx_t_15); /*try:*/ { /* "pandas/tslib.pyx":2970 * except: * try: * from _thread import allocate_lock as _thread_allocate_lock # <<<<<<<<<<<<<< * except: * try: */ __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2970; __pyx_clineno = __LINE__; goto __pyx_L34_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)__pyx_n_s__allocate_lock)); PyList_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_n_s__allocate_lock)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__allocate_lock)); __pyx_t_16 = __Pyx_Import(((PyObject *)__pyx_n_s___thread), ((PyObject *)__pyx_t_1), -1); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2970; __pyx_clineno = __LINE__; goto __pyx_L34_error;} __Pyx_GOTREF(__pyx_t_16); __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_16, __pyx_n_s__allocate_lock); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2970; __pyx_clineno = __LINE__; goto __pyx_L34_error;} __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_461, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2970; __pyx_clineno = __LINE__; goto __pyx_L34_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; } __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0; goto __pyx_L41_try_end; __pyx_L34_error:; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0; /* "pandas/tslib.pyx":2971 * try: * from _thread import allocate_lock as _thread_allocate_lock * except: # <<<<<<<<<<<<<< * try: * from dummy_thread import allocate_lock as _thread_allocate_lock */ /*except:*/ { __Pyx_AddTraceback("pandas.tslib", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_16, &__pyx_t_1, &__pyx_t_17) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2971; __pyx_clineno = __LINE__; goto __pyx_L36_except_error;} __Pyx_GOTREF(__pyx_t_16); __Pyx_GOTREF(__pyx_t_1); __Pyx_GOTREF(__pyx_t_17); /* "pandas/tslib.pyx":2972 * from _thread import allocate_lock as _thread_allocate_lock * except: * try: # <<<<<<<<<<<<<< * from dummy_thread import allocate_lock as _thread_allocate_lock * except: */ { __Pyx_ExceptionSave(&__pyx_t_18, &__pyx_t_19, &__pyx_t_20); __Pyx_XGOTREF(__pyx_t_18); __Pyx_XGOTREF(__pyx_t_19); __Pyx_XGOTREF(__pyx_t_20); /*try:*/ { /* "pandas/tslib.pyx":2973 * except: * try: * from dummy_thread import allocate_lock as _thread_allocate_lock # <<<<<<<<<<<<<< * except: * from _dummy_thread import allocate_lock as _thread_allocate_lock */ __pyx_t_21 = PyList_New(1); if (unlikely(!__pyx_t_21)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2973; __pyx_clineno = __LINE__; goto __pyx_L44_error;} __Pyx_GOTREF(__pyx_t_21); __Pyx_INCREF(((PyObject *)__pyx_n_s__allocate_lock)); PyList_SET_ITEM(__pyx_t_21, 0, ((PyObject *)__pyx_n_s__allocate_lock)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__allocate_lock)); __pyx_t_22 = __Pyx_Import(((PyObject *)__pyx_n_s__dummy_thread), ((PyObject *)__pyx_t_21), -1); if (unlikely(!__pyx_t_22)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2973; __pyx_clineno = __LINE__; goto __pyx_L44_error;} __Pyx_GOTREF(__pyx_t_22); __Pyx_DECREF(((PyObject *)__pyx_t_21)); __pyx_t_21 = 0; __pyx_t_21 = __Pyx_ImportFrom(__pyx_t_22, __pyx_n_s__allocate_lock); if (unlikely(!__pyx_t_21)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2973; __pyx_clineno = __LINE__; goto __pyx_L44_error;} __Pyx_GOTREF(__pyx_t_21); if (PyDict_SetItem(__pyx_d, __pyx_n_s_461, __pyx_t_21) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2973; __pyx_clineno = __LINE__; goto __pyx_L44_error;} __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0; __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0; } __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0; __Pyx_XDECREF(__pyx_t_19); __pyx_t_19 = 0; __Pyx_XDECREF(__pyx_t_20); __pyx_t_20 = 0; goto __pyx_L51_try_end; __pyx_L44_error:; __Pyx_XDECREF(__pyx_t_21); __pyx_t_21 = 0; __Pyx_XDECREF(__pyx_t_22); __pyx_t_22 = 0; /* "pandas/tslib.pyx":2974 * try: * from dummy_thread import allocate_lock as _thread_allocate_lock * except: # <<<<<<<<<<<<<< * from _dummy_thread import allocate_lock as _thread_allocate_lock * */ /*except:*/ { __Pyx_AddTraceback("pandas.tslib", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_22, &__pyx_t_21, &__pyx_t_23) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2974; __pyx_clineno = __LINE__; goto __pyx_L46_except_error;} __Pyx_GOTREF(__pyx_t_22); __Pyx_GOTREF(__pyx_t_21); __Pyx_GOTREF(__pyx_t_23); /* "pandas/tslib.pyx":2975 * from dummy_thread import allocate_lock as _thread_allocate_lock * except: * from _dummy_thread import allocate_lock as _thread_allocate_lock # <<<<<<<<<<<<<< * * __all__ = [] */ __pyx_t_24 = PyList_New(1); if (unlikely(!__pyx_t_24)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2975; __pyx_clineno = __LINE__; goto __pyx_L46_except_error;} __Pyx_GOTREF(__pyx_t_24); __Pyx_INCREF(((PyObject *)__pyx_n_s__allocate_lock)); PyList_SET_ITEM(__pyx_t_24, 0, ((PyObject *)__pyx_n_s__allocate_lock)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__allocate_lock)); __pyx_t_25 = __Pyx_Import(((PyObject *)__pyx_n_s___dummy_thread), ((PyObject *)__pyx_t_24), -1); if (unlikely(!__pyx_t_25)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2975; __pyx_clineno = __LINE__; goto __pyx_L46_except_error;} __Pyx_GOTREF(__pyx_t_25); __Pyx_DECREF(((PyObject *)__pyx_t_24)); __pyx_t_24 = 0; __pyx_t_24 = __Pyx_ImportFrom(__pyx_t_25, __pyx_n_s__allocate_lock); if (unlikely(!__pyx_t_24)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2975; __pyx_clineno = __LINE__; goto __pyx_L46_except_error;} __Pyx_GOTREF(__pyx_t_24); if (PyDict_SetItem(__pyx_d, __pyx_n_s_461, __pyx_t_24) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2975; __pyx_clineno = __LINE__; goto __pyx_L46_except_error;} __Pyx_DECREF(__pyx_t_24); __pyx_t_24 = 0; __Pyx_DECREF(__pyx_t_25); __pyx_t_25 = 0; __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0; __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0; __Pyx_DECREF(__pyx_t_23); __pyx_t_23 = 0; goto __pyx_L45_exception_handled; } __pyx_L46_except_error:; __Pyx_XGIVEREF(__pyx_t_18); __Pyx_XGIVEREF(__pyx_t_19); __Pyx_XGIVEREF(__pyx_t_20); __Pyx_ExceptionReset(__pyx_t_18, __pyx_t_19, __pyx_t_20); goto __pyx_L36_except_error; __pyx_L45_exception_handled:; __Pyx_XGIVEREF(__pyx_t_18); __Pyx_XGIVEREF(__pyx_t_19); __Pyx_XGIVEREF(__pyx_t_20); __Pyx_ExceptionReset(__pyx_t_18, __pyx_t_19, __pyx_t_20); __pyx_L51_try_end:; } __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; goto __pyx_L35_exception_handled; } __pyx_L36_except_error:; __Pyx_XGIVEREF(__pyx_t_13); __Pyx_XGIVEREF(__pyx_t_14); __Pyx_XGIVEREF(__pyx_t_15); __Pyx_ExceptionReset(__pyx_t_13, __pyx_t_14, __pyx_t_15); goto __pyx_L26_except_error; __pyx_L35_exception_handled:; __Pyx_XGIVEREF(__pyx_t_13); __Pyx_XGIVEREF(__pyx_t_14); __Pyx_XGIVEREF(__pyx_t_15); __Pyx_ExceptionReset(__pyx_t_13, __pyx_t_14, __pyx_t_15); __pyx_L41_try_end:; } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; goto __pyx_L25_exception_handled; } __pyx_L26_except_error:; __Pyx_XGIVEREF(__pyx_t_5); __Pyx_XGIVEREF(__pyx_t_6); __Pyx_XGIVEREF(__pyx_t_7); __Pyx_ExceptionReset(__pyx_t_5, __pyx_t_6, __pyx_t_7); goto __pyx_L1_error; __pyx_L25_exception_handled:; __Pyx_XGIVEREF(__pyx_t_5); __Pyx_XGIVEREF(__pyx_t_6); __Pyx_XGIVEREF(__pyx_t_7); __Pyx_ExceptionReset(__pyx_t_5, __pyx_t_6, __pyx_t_7); __pyx_L31_try_end:; } /* "pandas/tslib.pyx":2977 * from _dummy_thread import allocate_lock as _thread_allocate_lock * * __all__ = [] # <<<<<<<<<<<<<< * * def _getlang(): */ __pyx_t_11 = PyList_New(0); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2977; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); if (PyDict_SetItem(__pyx_d, __pyx_n_s____all__, ((PyObject *)__pyx_t_11)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2977; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(((PyObject *)__pyx_t_11)); __pyx_t_11 = 0; /* "pandas/tslib.pyx":2979 * __all__ = [] * * def _getlang(): # <<<<<<<<<<<<<< * # Figure out what the current language is set to. * return locale.getlocale(locale.LC_TIME) */ __pyx_t_11 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5tslib_97_getlang, NULL, __pyx_n_s_252); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2979; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); if (PyDict_SetItem(__pyx_d, __pyx_n_s___getlang, __pyx_t_11) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2979; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; /* "pandas/tslib.pyx":2983 * return locale.getlocale(locale.LC_TIME) * * class LocaleTime(object): # <<<<<<<<<<<<<< * """Stores and handles locale-specific information related to time. * */ __pyx_t_11 = PyDict_New(); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2983; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_11)); /* "pandas/tslib.pyx":3002 * """ * * def __init__(self): # <<<<<<<<<<<<<< * """Set all attributes. * */ __pyx_t_3 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6pandas_5tslib_10LocaleTime_1__init__, 0, __pyx_n_s_465, NULL, __pyx_n_s_252, ((PyObject *)__pyx_k_codeobj_464)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3002; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyObject_SetItem(__pyx_t_11, __pyx_n_s____init__, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3002; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/tslib.pyx":3031 * raise ValueError("locale changed during initialization") * * def __pad(self, seq, front): # <<<<<<<<<<<<<< * # Add '' to seq to either the front (is True), else the back. * seq = list(seq) */ __pyx_t_3 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6pandas_5tslib_10LocaleTime_3__pad, 0, __pyx_n_s_468, NULL, __pyx_n_s_252, ((PyObject *)__pyx_k_codeobj_467)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3031; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyObject_SetItem(__pyx_t_11, __pyx_n_s___LocaleTime__pad, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3031; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/tslib.pyx":3040 * return seq * * def __calc_weekday(self): # <<<<<<<<<<<<<< * # Set self.a_weekday and self.f_weekday using the calendar * # module. */ __pyx_t_3 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6pandas_5tslib_10LocaleTime_5__calc_weekday, 0, __pyx_n_s_471, NULL, __pyx_n_s_252, ((PyObject *)__pyx_k_codeobj_470)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3040; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyObject_SetItem(__pyx_t_11, __pyx_n_s_151, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3040; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/tslib.pyx":3048 * self.f_weekday = f_weekday * * def __calc_month(self): # <<<<<<<<<<<<<< * # Set self.f_month and self.a_month using the calendar module. * a_month = [calendar.month_abbr[i].lower() for i in range(13)] */ __pyx_t_3 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6pandas_5tslib_10LocaleTime_7__calc_month, 0, __pyx_n_s_474, NULL, __pyx_n_s_252, ((PyObject *)__pyx_k_codeobj_473)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3048; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyObject_SetItem(__pyx_t_11, __pyx_n_s_152, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3048; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/tslib.pyx":3055 * self.f_month = f_month * * def __calc_am_pm(self): # <<<<<<<<<<<<<< * # Set self.am_pm by using time.strftime(). * */ __pyx_t_3 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6pandas_5tslib_10LocaleTime_9__calc_am_pm, 0, __pyx_n_s_477, NULL, __pyx_n_s_252, ((PyObject *)__pyx_k_codeobj_476)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3055; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyObject_SetItem(__pyx_t_11, __pyx_n_s_153, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3055; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/tslib.pyx":3067 * self.am_pm = am_pm * * def __calc_date_time(self): # <<<<<<<<<<<<<< * # Set self.date_time, self.date, & self.time by using * # time.strftime(). */ __pyx_t_3 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6pandas_5tslib_10LocaleTime_11__calc_date_time, 0, __pyx_n_s_480, NULL, __pyx_n_s_252, ((PyObject *)__pyx_k_codeobj_479)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3067; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyObject_SetItem(__pyx_t_11, __pyx_n_s_155, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3067; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/tslib.pyx":3112 * self.LC_time = date_time[2] * * def __calc_timezone(self): # <<<<<<<<<<<<<< * # Set self.timezone by using time.tzname. * # Do not worry about possibility of time.tzname[0] == timetzname[1] */ __pyx_t_3 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6pandas_5tslib_10LocaleTime_13__calc_timezone, 0, __pyx_n_s_483, NULL, __pyx_n_s_252, ((PyObject *)__pyx_k_codeobj_482)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3112; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyObject_SetItem(__pyx_t_11, __pyx_n_s_154, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3112; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/tslib.pyx":2983 * return locale.getlocale(locale.LC_TIME) * * class LocaleTime(object): # <<<<<<<<<<<<<< * """Stores and handles locale-specific information related to time. * */ __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2983; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_builtin_object); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_builtin_object); __Pyx_GIVEREF(__pyx_builtin_object); if (PyDict_SetItemString(((PyObject *)__pyx_t_11), "__doc__", ((PyObject *)__pyx_kp_s_484)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2983; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_2 = __Pyx_CreateClass(((PyObject *)__pyx_t_3), ((PyObject *)__pyx_t_11), __pyx_n_s__LocaleTime, __pyx_n_s__LocaleTime, __pyx_n_s_252); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2983; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; if (PyDict_SetItem(__pyx_d, __pyx_n_s__LocaleTime, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2983; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_11)); __pyx_t_11 = 0; /* "pandas/tslib.pyx":3128 * * * class TimeRE(dict): # <<<<<<<<<<<<<< * """Handle conversion from format directives to regexes.""" * */ __pyx_t_11 = PyDict_New(); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3128; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_11)); /* "pandas/tslib.pyx":3131 * """Handle conversion from format directives to regexes.""" * * def __init__(self, locale_time=None): # <<<<<<<<<<<<<< * """Create keys/values. * */ __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6pandas_5tslib_6TimeRE_1__init__, 0, __pyx_n_s_488, NULL, __pyx_n_s_252, ((PyObject *)__pyx_k_codeobj_486)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3131; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, ((PyObject *)__pyx_k_tuple_487)); if (PyObject_SetItem(__pyx_t_11, __pyx_n_s____init__, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3131; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/tslib.pyx":3173 * base.__setitem__('X', self.pattern(self.locale_time.LC_time)) * * def __seqToRE(self, to_convert, directive): # <<<<<<<<<<<<<< * """Convert a list to a regex string for matching a directive. * */ __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6pandas_5tslib_6TimeRE_3__seqToRE, 0, __pyx_n_s_491, NULL, __pyx_n_s_252, ((PyObject *)__pyx_k_codeobj_490)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3173; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyObject_SetItem(__pyx_t_11, __pyx_n_s___TimeRE__seqToRE, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3173; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/tslib.pyx":3192 * return '%s)' % regex * * def pattern(self, format): # <<<<<<<<<<<<<< * """Return regex pattern for the format string. * */ __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6pandas_5tslib_6TimeRE_5pattern, 0, __pyx_n_s_495, NULL, __pyx_n_s_252, ((PyObject *)__pyx_k_codeobj_494)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3192; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyObject_SetItem(__pyx_t_11, __pyx_n_s__pattern, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3192; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/tslib.pyx":3215 * return "%s%s" % (processed_format, format) * * def compile(self, format): # <<<<<<<<<<<<<< * """Return a compiled re object for the format string.""" * return re_compile(self.pattern(format), IGNORECASE) */ __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6pandas_5tslib_6TimeRE_7compile, 0, __pyx_n_s_498, NULL, __pyx_n_s_252, ((PyObject *)__pyx_k_codeobj_497)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3215; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyObject_SetItem(__pyx_t_11, __pyx_n_s__compile, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3215; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/tslib.pyx":3128 * * * class TimeRE(dict): # <<<<<<<<<<<<<< * """Handle conversion from format directives to regexes.""" * */ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3128; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(((PyObject *)((PyObject*)(&PyDict_Type)))); PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)((PyObject*)(&PyDict_Type)))); __Pyx_GIVEREF(((PyObject *)((PyObject*)(&PyDict_Type)))); if (PyDict_SetItemString(((PyObject *)__pyx_t_11), "__doc__", ((PyObject *)__pyx_kp_s_499)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3128; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_3 = __Pyx_CreateClass(((PyObject *)__pyx_t_2), ((PyObject *)__pyx_t_11), __pyx_n_s__TimeRE, __pyx_n_s__TimeRE, __pyx_n_s_252); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3128; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; if (PyDict_SetItem(__pyx_d, __pyx_n_s__TimeRE, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3128; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_11)); __pyx_t_11 = 0; /* "pandas/tslib.pyx":3219 * return re_compile(self.pattern(format), IGNORECASE) * * _cache_lock = _thread_allocate_lock() # <<<<<<<<<<<<<< * # DO NOT modify _TimeRE_cache or _regex_cache without acquiring the cache lock * # first! */ __pyx_t_11 = __Pyx_GetModuleGlobalName(__pyx_n_s_461); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3219; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __pyx_t_3 = PyObject_Call(__pyx_t_11, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3219; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; if (PyDict_SetItem(__pyx_d, __pyx_n_s___cache_lock, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3219; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/tslib.pyx":3222 * # DO NOT modify _TimeRE_cache or _regex_cache without acquiring the cache lock * # first! * _TimeRE_cache = TimeRE() # <<<<<<<<<<<<<< * _CACHE_MAX_SIZE = 5 # Max number of regexes stored in _regex_cache * _regex_cache = {} */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s__TimeRE); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3222; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_11 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3222; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (PyDict_SetItem(__pyx_d, __pyx_n_s___TimeRE_cache, __pyx_t_11) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3222; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; /* "pandas/tslib.pyx":3223 * # first! * _TimeRE_cache = TimeRE() * _CACHE_MAX_SIZE = 5 # Max number of regexes stored in _regex_cache # <<<<<<<<<<<<<< * _regex_cache = {} * */ if (PyDict_SetItem(__pyx_d, __pyx_n_s___CACHE_MAX_SIZE, __pyx_int_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3223; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/tslib.pyx":3224 * _TimeRE_cache = TimeRE() * _CACHE_MAX_SIZE = 5 # Max number of regexes stored in _regex_cache * _regex_cache = {} # <<<<<<<<<<<<<< * * def _calc_julian_from_U_or_W(year, week_of_year, day_of_week, week_starts_Mon): */ __pyx_t_11 = PyDict_New(); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3224; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_11)); if (PyDict_SetItem(__pyx_d, __pyx_n_s___regex_cache, ((PyObject *)__pyx_t_11)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3224; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(((PyObject *)__pyx_t_11)); __pyx_t_11 = 0; /* "pandas/tslib.pyx":3226 * _regex_cache = {} * * def _calc_julian_from_U_or_W(year, week_of_year, day_of_week, week_starts_Mon): # <<<<<<<<<<<<<< * """Calculate the Julian day based on the year, week of the year, and day of * the week, with week_start_day representing whether the week of the year */ __pyx_t_11 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5tslib_99_calc_julian_from_U_or_W, NULL, __pyx_n_s_252); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3226; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); if (PyDict_SetItem(__pyx_d, __pyx_n_s_94, __pyx_t_11) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3226; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; /* "pandas/tslib.pyx":1 * # cython: profile=False # <<<<<<<<<<<<<< * * cimport numpy as np */ __pyx_t_11 = PyDict_New(); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_11)); if (PyDict_SetItem(__pyx_d, __pyx_n_s____test__, ((PyObject *)__pyx_t_11)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(((PyObject *)__pyx_t_11)); __pyx_t_11 = 0; /* "numpy.pxd":979 * arr.base = baseptr * * cdef inline object get_array_base(ndarray arr): # <<<<<<<<<<<<<< * if arr.base is NULL: * return 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_11); __Pyx_XDECREF(__pyx_t_16); __Pyx_XDECREF(__pyx_t_17); __Pyx_XDECREF(__pyx_t_21); __Pyx_XDECREF(__pyx_t_22); __Pyx_XDECREF(__pyx_t_23); __Pyx_XDECREF(__pyx_t_24); __Pyx_XDECREF(__pyx_t_25); if (__pyx_m) { __Pyx_AddTraceback("init pandas.tslib", __pyx_clineno, __pyx_lineno, __pyx_filename); Py_DECREF(__pyx_m); __pyx_m = 0; } else if (!PyErr_Occurred()) { PyErr_SetString(PyExc_ImportError, "init pandas.tslib"); } __pyx_L0:; __Pyx_RefNannyFinishContext(); #if PY_MAJOR_VERSION < 3 return; #else return __pyx_m; #endif } /* Runtime support code */ #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 /* CYTHON_REFNANNY */ 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 '%s' is not defined", PyString_AS_STRING(name)); #endif } return result; } 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 } 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, "%s() keywords must be strings", function_name); goto bad; invalid_keyword: PyErr_Format(PyExc_TypeError, #if PY_MAJOR_VERSION < 3 "%s() got an unexpected keyword argument '%s'", function_name, PyString_AsString(key)); #else "%s() got an unexpected keyword argument '%U'", function_name, key); #endif bad: return -1; } 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, "%s() takes %s %" CYTHON_FORMAT_SSIZE_T "d positional argument%s (%" CYTHON_FORMAT_SSIZE_T "d given)", func_name, more_or_less, num_expected, (num_expected == 1) ? "" : "s", num_found); } static int __Pyx_ArgTypeTest(PyObject *obj, PyTypeObject *type, int none_allowed, const char *name, int exact) { if (!type) { PyErr_Format(PyExc_SystemError, "Missing type object"); return 0; } if (none_allowed && obj == Py_None) return 1; else if (exact) { if (Py_TYPE(obj) == type) return 1; } else { if (PyObject_TypeCheck(obj, type)) return 1; } PyErr_Format(PyExc_TypeError, "Argument '%s' has incorrect type (expected %s, got %s)", name, type->tp_name, Py_TYPE(obj)->tp_name); return 0; } static CYTHON_INLINE int __Pyx_IsLittleEndian(void) { unsigned int n = 1; return *(unsigned char*)(&n) != 0; } 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) /* First char was not a digit */ 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; /* Consume from buffer string */ while (1) { if (field == &ctx->root) { ctx->head = NULL; if (ctx->enc_count != 0) { __Pyx_BufFmt_RaiseExpected(ctx); return -1; } break; /* breaks both loops as ctx->enc_count == 0 */ } 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; /* empty struct */ 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 CYTHON_INLINE 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 != ')') { if (isspace(*ts)) continue; 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 10: case 13: ++ts; break; case '<': if (!__Pyx_IsLittleEndian()) { PyErr_SetString(PyExc_ValueError, "Little-endian buffer not supported on big-endian compiler"); return NULL; } ctx->new_packmode = '='; ++ts; break; case '>': case '!': if (__Pyx_IsLittleEndian()) { 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': /* substruct */ { 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; /* Erase processed last struct element */ 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 '}': /* end of substruct; either repeat or move on */ { size_t alignment = ctx->struct_alignment; ++ts; if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL; ctx->enc_type = 0; /* Erase processed last struct element */ 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; } /* fall through */ 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 's': case 'p': if (ctx->enc_type == *ts && got_Z == ctx->is_complex && ctx->enc_packmode == ctx->new_packmode) { ctx->enc_count += ctx->new_count; } else { 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; } } } } static CYTHON_INLINE 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 CYTHON_INLINE int __Pyx_GetBufferAndValidate( Py_buffer* buf, PyObject* obj, __Pyx_TypeInfo* dtype, int flags, int nd, int cast, __Pyx_BufFmt_StackElem* stack) { if (obj == Py_None || obj == NULL) { __Pyx_ZeroBuffer(buf); return 0; } buf->buf = NULL; if (__Pyx_GetBuffer(obj, buf, flags) == -1) goto fail; if (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 ((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_ZeroBuffer(buf); return -1; } static CYTHON_INLINE void __Pyx_SafeReleaseBuffer(Py_buffer* info) { if (info->buf == NULL) return; if (info->suboffsets == __Pyx_minusones) info->suboffsets = NULL; __Pyx_ReleaseBuffer(info); } static CYTHON_INLINE PyObject *__Pyx_GetModuleGlobalName(PyObject *name) { PyObject *result; #if CYTHON_COMPILING_IN_CPYTHON result = PyDict_GetItem(__pyx_d, name); if (result) { Py_INCREF(result); } else { #else result = PyObject_GetItem(__pyx_d, name); if (!result) { PyErr_Clear(); #endif result = __Pyx_GetBuiltinName(name); } return result; } static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type) { if (unlikely(!type)) { PyErr_Format(PyExc_SystemError, "Missing type object"); return 0; } if (likely(PyObject_TypeCheck(obj, type))) return 1; PyErr_Format(PyExc_TypeError, "Cannot convert %.200s to %.200s", Py_TYPE(obj)->tp_name, type->tp_name); return 0; } static void __Pyx_RaiseBufferIndexError(int axis) { PyErr_Format(PyExc_IndexError, "Out of bounds on buffer access (axis %d)", axis); } static CYTHON_INLINE void __Pyx_ErrRestore(PyObject *type, PyObject *value, PyObject *tb) { #if CYTHON_COMPILING_IN_CPYTHON PyObject *tmp_type, *tmp_value, *tmp_tb; PyThreadState *tstate = PyThreadState_GET(); 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); #else PyErr_Restore(type, value, tb); #endif } static CYTHON_INLINE void __Pyx_ErrFetch(PyObject **type, PyObject **value, PyObject **tb) { #if CYTHON_COMPILING_IN_CPYTHON PyThreadState *tstate = PyThreadState_GET(); *type = tstate->curexc_type; *value = tstate->curexc_value; *tb = tstate->curexc_traceback; tstate->curexc_type = 0; tstate->curexc_value = 0; tstate->curexc_traceback = 0; #else PyErr_Fetch(type, value, tb); #endif } static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb) { PyObject *local_type, *local_value, *local_tb; #if CYTHON_COMPILING_IN_CPYTHON PyObject *tmp_type, *tmp_value, *tmp_tb; PyThreadState *tstate = PyThreadState_GET(); local_type = tstate->curexc_type; local_value = tstate->curexc_value; local_tb = tstate->curexc_traceback; tstate->curexc_type = 0; tstate->curexc_value = 0; tstate->curexc_traceback = 0; #else PyErr_Fetch(&local_type, &local_value, &local_tb); #endif PyErr_NormalizeException(&local_type, &local_value, &local_tb); #if CYTHON_COMPILING_IN_CPYTHON if (unlikely(tstate->curexc_type)) #else if (unlikely(PyErr_Occurred())) #endif goto bad; #if PY_MAJOR_VERSION >= 3 if (unlikely(PyException_SetTraceback(local_value, local_tb) < 0)) goto bad; #endif Py_INCREF(local_type); Py_INCREF(local_value); Py_INCREF(local_tb); *type = local_type; *value = local_value; *tb = local_tb; #if CYTHON_COMPILING_IN_CPYTHON tmp_type = tstate->exc_type; tmp_value = tstate->exc_value; tmp_tb = tstate->exc_traceback; tstate->exc_type = local_type; tstate->exc_value = local_value; tstate->exc_traceback = local_tb; /* Make sure tstate is in a consistent state when we XDECREF these objects (DECREF may run arbitrary code). */ 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; } 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; } static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j) { PyObject *r; if (!j) return NULL; r = PyObject_GetItem(o, j); Py_DECREF(j); return r; } static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i, int wraparound, int boundscheck) { #if CYTHON_COMPILING_IN_CPYTHON if (wraparound & unlikely(i < 0)) i += PyList_GET_SIZE(o); if ((!boundscheck) || likely((0 <= i) & (i < PyList_GET_SIZE(o)))) { PyObject *r = PyList_GET_ITEM(o, i); Py_INCREF(r); return r; } return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i)); #else return PySequence_GetItem(o, i); #endif } static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i, int wraparound, int boundscheck) { #if CYTHON_COMPILING_IN_CPYTHON if (wraparound & unlikely(i < 0)) i += PyTuple_GET_SIZE(o); if ((!boundscheck) || likely((0 <= i) & (i < PyTuple_GET_SIZE(o)))) { PyObject *r = PyTuple_GET_ITEM(o, i); Py_INCREF(r); return r; } return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i)); #else return PySequence_GetItem(o, i); #endif } static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, int is_list, int wraparound, int boundscheck) { #if CYTHON_COMPILING_IN_CPYTHON if (is_list || PyList_CheckExact(o)) { Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyList_GET_SIZE(o); if ((!boundscheck) || (likely((n >= 0) & (n < PyList_GET_SIZE(o))))) { PyObject *r = PyList_GET_ITEM(o, n); Py_INCREF(r); return r; } } else if (PyTuple_CheckExact(o)) { Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyTuple_GET_SIZE(o); if ((!boundscheck) || likely((n >= 0) & (n < PyTuple_GET_SIZE(o)))) { PyObject *r = PyTuple_GET_ITEM(o, n); Py_INCREF(r); return r; } } else { PySequenceMethods *m = Py_TYPE(o)->tp_as_sequence; if (likely(m && m->sq_item)) { if (wraparound && unlikely(i < 0) && likely(m->sq_length)) { Py_ssize_t l = m->sq_length(o); if (likely(l >= 0)) { i += l; } else { if (PyErr_ExceptionMatches(PyExc_OverflowError)) PyErr_Clear(); else return NULL; } } 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)); } 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; } static CYTHON_INLINE PyObject *__Pyx_GetAttr(PyObject *o, PyObject *n) { #if CYTHON_COMPILING_IN_CPYTHON #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); } static CYTHON_INLINE PyObject *__Pyx_GetAttr3(PyObject *o, PyObject *n, PyObject *d) { PyObject *r = __Pyx_GetAttr(o, n); if (!r) { if (!PyErr_ExceptionMatches(PyExc_AttributeError)) goto bad; PyErr_Clear(); r = d; Py_INCREF(d); } return r; bad: return NULL; } #if PY_MAJOR_VERSION < 3 static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, CYTHON_UNUSED PyObject *cause) { 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 PY_VERSION_HEX < 0x02050000 if (PyClass_Check(type)) { #else if (PyType_Check(type)) { #endif #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; #if PY_VERSION_HEX < 0x02050000 if (PyInstance_Check(type)) { type = (PyObject*) ((PyInstanceObject*)type)->in_class; Py_INCREF(type); } else { type = 0; PyErr_SetString(PyExc_TypeError, "raise: exception must be an old-style class or instance"); goto raise_error; } #else 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; } #endif } __Pyx_ErrRestore(type, value, tb); return; raise_error: Py_XDECREF(value); Py_XDECREF(type); Py_XDECREF(tb); return; } #else /* Python 3+ */ 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 *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 = PyEval_CallObject(type, args); Py_DECREF(args); if (!owned_instance) goto bad; value = owned_instance; if (!PyExceptionInstance_Check(value)) { PyErr_Format(PyExc_TypeError, "calling %R should have returned an instance of " "BaseException, not %R", type, Py_TYPE(value)); goto bad; } } else { PyErr_SetString(PyExc_TypeError, "raise: exception class must be a subclass of BaseException"); goto bad; } #if PY_VERSION_HEX >= 0x03030000 if (cause) { #else if (cause && cause != Py_None) { #endif PyObject *fixed_cause; if (cause == Py_None) { fixed_cause = NULL; } else if (PyExceptionClass_Check(cause)) { fixed_cause = PyObject_CallObject(cause, NULL); if (fixed_cause == NULL) goto bad; } else if (PyExceptionInstance_Check(cause)) { fixed_cause = cause; Py_INCREF(fixed_cause); } else { PyErr_SetString(PyExc_TypeError, "exception causes must derive from " "BaseException"); goto bad; } PyException_SetCause(value, fixed_cause); } PyErr_SetObject(type, value); if (tb) { PyThreadState *tstate = PyThreadState_GET(); PyObject* tmp_tb = tstate->curexc_traceback; if (tb != tmp_tb) { Py_INCREF(tb); tstate->curexc_traceback = tb; Py_XDECREF(tmp_tb); } } bad: Py_XDECREF(owned_instance); return; } #endif static CYTHON_INLINE PyObject* __Pyx_PyObject_GetSlice( PyObject* obj, Py_ssize_t cstart, Py_ssize_t cstop, PyObject** _py_start, PyObject** _py_stop, PyObject** _py_slice, int has_cstart, int has_cstop, CYTHON_UNUSED int wraparound) { #if CYTHON_COMPILING_IN_CPYTHON PyMappingMethods* mp; #if PY_MAJOR_VERSION < 3 PySequenceMethods* ms = Py_TYPE(obj)->tp_as_sequence; if (likely(ms && ms->sq_slice)) { if (!has_cstart) { if (_py_start && (*_py_start != Py_None)) { cstart = __Pyx_PyIndex_AsSsize_t(*_py_start); if ((cstart == (Py_ssize_t)-1) && PyErr_Occurred()) goto bad; } else cstart = 0; } if (!has_cstop) { if (_py_stop && (*_py_stop != Py_None)) { cstop = __Pyx_PyIndex_AsSsize_t(*_py_stop); if ((cstop == (Py_ssize_t)-1) && PyErr_Occurred()) goto bad; } else cstop = PY_SSIZE_T_MAX; } if (wraparound && unlikely((cstart < 0) | (cstop < 0)) && likely(ms->sq_length)) { Py_ssize_t l = ms->sq_length(obj); if (likely(l >= 0)) { if (cstop < 0) { cstop += l; if (cstop < 0) cstop = 0; } if (cstart < 0) { cstart += l; if (cstart < 0) cstart = 0; } } else { if (PyErr_ExceptionMatches(PyExc_OverflowError)) PyErr_Clear(); else goto bad; } } return ms->sq_slice(obj, cstart, cstop); } #endif mp = Py_TYPE(obj)->tp_as_mapping; if (likely(mp && mp->mp_subscript)) #endif { PyObject* result; PyObject *py_slice, *py_start, *py_stop; if (_py_slice) { py_slice = *_py_slice; } else { PyObject* owned_start = NULL; PyObject* owned_stop = NULL; if (_py_start) { py_start = *_py_start; } else { if (has_cstart) { owned_start = py_start = PyInt_FromSsize_t(cstart); if (unlikely(!py_start)) goto bad; } else py_start = Py_None; } if (_py_stop) { py_stop = *_py_stop; } else { if (has_cstop) { owned_stop = py_stop = PyInt_FromSsize_t(cstop); if (unlikely(!py_stop)) { Py_XDECREF(owned_start); goto bad; } } else py_stop = Py_None; } py_slice = PySlice_New(py_start, py_stop, Py_None); Py_XDECREF(owned_start); Py_XDECREF(owned_stop); if (unlikely(!py_slice)) goto bad; } #if CYTHON_COMPILING_IN_CPYTHON result = mp->mp_subscript(obj, py_slice); #else result = PyObject_GetItem(obj, py_slice); #endif if (!_py_slice) { Py_DECREF(py_slice); } return result; } PyErr_Format(PyExc_TypeError, "'%.200s' object is unsliceable", Py_TYPE(obj)->tp_name); bad: return NULL; } static void __Pyx_WriteUnraisable(const char *name, CYTHON_UNUSED int clineno, CYTHON_UNUSED int lineno, CYTHON_UNUSED const char *filename) { PyObject *old_exc, *old_val, *old_tb; PyObject *ctx; __Pyx_ErrFetch(&old_exc, &old_val, &old_tb); #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); } } 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; } static void __Pyx_RaiseBufferFallbackError(void) { PyErr_Format(PyExc_ValueError, "Buffer acquisition failed on assignment; and then reacquiring the old buffer failed too!"); } static double __Pyx__PyObject_AsDouble(PyObject* obj) { PyObject* float_value; #if CYTHON_COMPILING_IN_PYPY float_value = PyNumber_Float(obj); #else PyNumberMethods *nb = Py_TYPE(obj)->tp_as_number; if (likely(nb) && likely(nb->nb_float)) { float_value = nb->nb_float(obj); if (likely(float_value) && unlikely(!PyFloat_Check(float_value))) { PyErr_Format(PyExc_TypeError, "__float__ returned non-float (type %.200s)", Py_TYPE(float_value)->tp_name); Py_DECREF(float_value); goto bad; } } else if (PyUnicode_CheckExact(obj) || PyBytes_CheckExact(obj)) { #if PY_MAJOR_VERSION >= 3 float_value = PyFloat_FromString(obj); #else float_value = PyFloat_FromString(obj, 0); #endif } else { PyObject* args = PyTuple_New(1); if (unlikely(!args)) goto bad; PyTuple_SET_ITEM(args, 0, obj); float_value = PyObject_Call((PyObject*)&PyFloat_Type, args, 0); PyTuple_SET_ITEM(args, 0, 0); Py_DECREF(args); } #endif if (likely(float_value)) { double value = PyFloat_AS_DOUBLE(float_value); Py_DECREF(float_value); return value; } bad: return (double)-1; } static CYTHON_INLINE int __Pyx_SetItemInt_Generic(PyObject *o, PyObject *j, PyObject *v) { int r; if (!j) return -1; r = PyObject_SetItem(o, j, v); Py_DECREF(j); return r; } static CYTHON_INLINE int __Pyx_SetItemInt_Fast(PyObject *o, Py_ssize_t i, PyObject *v, int is_list, int wraparound, int boundscheck) { #if CYTHON_COMPILING_IN_CPYTHON if (is_list || PyList_CheckExact(o)) { Py_ssize_t n = (!wraparound) ? i : ((likely(i >= 0)) ? i : i + PyList_GET_SIZE(o)); if ((!boundscheck) || likely((n >= 0) & (n < PyList_GET_SIZE(o)))) { PyObject* old = PyList_GET_ITEM(o, n); Py_INCREF(v); PyList_SET_ITEM(o, n, v); Py_DECREF(old); return 1; } } else { PySequenceMethods *m = Py_TYPE(o)->tp_as_sequence; if (likely(m && m->sq_ass_item)) { if (wraparound && unlikely(i < 0) && likely(m->sq_length)) { Py_ssize_t l = m->sq_length(o); if (likely(l >= 0)) { i += l; } else { if (PyErr_ExceptionMatches(PyExc_OverflowError)) PyErr_Clear(); else return -1; } } return m->sq_ass_item(o, i, v); } } #else #if CYTHON_COMPILING_IN_PYPY if (is_list || (PySequence_Check(o) && !PyDict_Check(o))) { #else if (is_list || PySequence_Check(o)) { #endif return PySequence_SetItem(o, i, v); } #endif return __Pyx_SetItemInt_Generic(o, PyInt_FromSsize_t(i), v); } static CYTHON_INLINE void __Pyx_RaiseUnboundLocalError(const char *varname) { PyErr_Format(PyExc_UnboundLocalError, "local variable '%s' referenced before assignment", varname); } static CYTHON_INLINE int __Pyx_IterFinish(void) { #if CYTHON_COMPILING_IN_CPYTHON PyThreadState *tstate = PyThreadState_GET(); PyObject* exc_type = tstate->curexc_type; if (unlikely(exc_type)) { if (likely(exc_type == PyExc_StopIteration) || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration)) { PyObject *exc_value, *exc_tb; exc_value = tstate->curexc_value; exc_tb = tstate->curexc_traceback; tstate->curexc_type = 0; tstate->curexc_value = 0; tstate->curexc_traceback = 0; Py_DECREF(exc_type); Py_XDECREF(exc_value); Py_XDECREF(exc_tb); return 0; } else { return -1; } } return 0; #else if (unlikely(PyErr_Occurred())) { if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) { PyErr_Clear(); return 0; } else { return -1; } } return 0; #endif } 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); } 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; } static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index) { PyErr_Format(PyExc_ValueError, "need more than %" CYTHON_FORMAT_SSIZE_T "d value%s to unpack", index, (index == 1) ? "" : "s"); } static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); } static void __Pyx_UnpackTupleError(PyObject *t, Py_ssize_t index) { if (t == Py_None) { __Pyx_RaiseNoneNotIterableError(); } else if (PyTuple_GET_SIZE(t) < index) { __Pyx_RaiseNeedMoreValuesError(PyTuple_GET_SIZE(t)); } else { __Pyx_RaiseTooManyValuesError(index); } } static CYTHON_INLINE int __Pyx_unpack_tuple2(PyObject* tuple, PyObject** pvalue1, PyObject** pvalue2, int is_tuple, int has_known_size, int decref_tuple) { Py_ssize_t index; PyObject *value1 = NULL, *value2 = NULL, *iter = NULL; if (!is_tuple && unlikely(!PyTuple_Check(tuple))) { iternextfunc iternext; iter = PyObject_GetIter(tuple); if (unlikely(!iter)) goto bad; if (decref_tuple) { Py_DECREF(tuple); tuple = NULL; } iternext = Py_TYPE(iter)->tp_iternext; value1 = iternext(iter); if (unlikely(!value1)) { index = 0; goto unpacking_failed; } value2 = iternext(iter); if (unlikely(!value2)) { index = 1; goto unpacking_failed; } if (!has_known_size && unlikely(__Pyx_IternextUnpackEndCheck(iternext(iter), 2))) goto bad; Py_DECREF(iter); } else { if (!has_known_size && unlikely(PyTuple_GET_SIZE(tuple) != 2)) { __Pyx_UnpackTupleError(tuple, 2); goto bad; } #if CYTHON_COMPILING_IN_PYPY value1 = PySequence_ITEM(tuple, 0); if (unlikely(!value1)) goto bad; value2 = PySequence_ITEM(tuple, 1); if (unlikely(!value2)) goto bad; #else value1 = PyTuple_GET_ITEM(tuple, 0); value2 = PyTuple_GET_ITEM(tuple, 1); Py_INCREF(value1); Py_INCREF(value2); #endif if (decref_tuple) { Py_DECREF(tuple); } } *pvalue1 = value1; *pvalue2 = value2; return 0; unpacking_failed: if (!has_known_size && __Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); bad: Py_XDECREF(iter); Py_XDECREF(value1); Py_XDECREF(value2); if (decref_tuple) { Py_XDECREF(tuple); } return -1; } static CYTHON_INLINE PyObject* __Pyx_dict_iterator(PyObject* iterable, int is_dict, PyObject* method_name, Py_ssize_t* p_orig_length, int* p_source_is_dict) { is_dict = is_dict || likely(PyDict_CheckExact(iterable)); *p_source_is_dict = is_dict; #if !CYTHON_COMPILING_IN_PYPY if (is_dict) { *p_orig_length = PyDict_Size(iterable); Py_INCREF(iterable); return iterable; } #endif *p_orig_length = 0; if (method_name) { PyObject* iter; iterable = __Pyx_PyObject_CallMethod0(iterable, method_name); if (!iterable) return NULL; #if !CYTHON_COMPILING_IN_PYPY if (PyTuple_CheckExact(iterable) || PyList_CheckExact(iterable)) return iterable; #endif iter = PyObject_GetIter(iterable); Py_DECREF(iterable); return iter; } return PyObject_GetIter(iterable); } static CYTHON_INLINE int __Pyx_dict_iter_next(PyObject* iter_obj, Py_ssize_t orig_length, Py_ssize_t* ppos, PyObject** pkey, PyObject** pvalue, PyObject** pitem, int source_is_dict) { PyObject* next_item; #if !CYTHON_COMPILING_IN_PYPY if (source_is_dict) { PyObject *key, *value; if (unlikely(orig_length != PyDict_Size(iter_obj))) { PyErr_SetString(PyExc_RuntimeError, "dictionary changed size during iteration"); return -1; } if (unlikely(!PyDict_Next(iter_obj, ppos, &key, &value))) { return 0; } if (pitem) { PyObject* tuple = PyTuple_New(2); if (unlikely(!tuple)) { return -1; } Py_INCREF(key); Py_INCREF(value); PyTuple_SET_ITEM(tuple, 0, key); PyTuple_SET_ITEM(tuple, 1, value); *pitem = tuple; } else { if (pkey) { Py_INCREF(key); *pkey = key; } if (pvalue) { Py_INCREF(value); *pvalue = value; } } return 1; } else if (PyTuple_CheckExact(iter_obj)) { Py_ssize_t pos = *ppos; if (unlikely(pos >= PyTuple_GET_SIZE(iter_obj))) return 0; *ppos = pos + 1; next_item = PyTuple_GET_ITEM(iter_obj, pos); Py_INCREF(next_item); } else if (PyList_CheckExact(iter_obj)) { Py_ssize_t pos = *ppos; if (unlikely(pos >= PyList_GET_SIZE(iter_obj))) return 0; *ppos = pos + 1; next_item = PyList_GET_ITEM(iter_obj, pos); Py_INCREF(next_item); } else #endif { next_item = PyIter_Next(iter_obj); if (unlikely(!next_item)) { return __Pyx_IterFinish(); } } if (pitem) { *pitem = next_item; } else if (pkey && pvalue) { if (__Pyx_unpack_tuple2(next_item, pkey, pvalue, source_is_dict, source_is_dict, 1)) return -1; } else if (pkey) { *pkey = next_item; } else { *pvalue = next_item; } return 1; } static CYTHON_INLINE Py_ssize_t __Pyx_div_Py_ssize_t(Py_ssize_t a, Py_ssize_t b) { Py_ssize_t q = a / b; Py_ssize_t r = a - q*b; q -= ((r != 0) & ((r ^ b) < 0)); return q; } 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; } static CYTHON_INLINE long __Pyx_mod_long(long a, long b) { long r = a % b; r += ((r != 0) & ((r ^ b) < 0)) * b; return r; } static CYTHON_INLINE PyObject* __Pyx_PyObject_Append(PyObject* L, PyObject* x) { if (likely(PyList_CheckExact(L))) { if (unlikely(__Pyx_PyList_Append(L, x) < 0)) return NULL; Py_INCREF(Py_None); return Py_None; /* this is just to have an accurate signature */ } else { return __Pyx_PyObject_CallMethod1(L, __pyx_n_s__append, x); } } static CYTHON_INLINE void __Pyx_RaiseClosureNameError(const char *varname) { PyErr_Format(PyExc_NameError, "free variable '%s' referenced before assignment in enclosing scope", varname); } static void __Pyx_call_next_tp_dealloc(PyObject* obj, destructor current_tp_dealloc) { PyTypeObject* type = Py_TYPE(obj); while (type && type->tp_dealloc != current_tp_dealloc) type = type->tp_base; while (type && type->tp_dealloc == current_tp_dealloc) type = type->tp_base; if (type) type->tp_dealloc(obj); } 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; } 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); } static int __Pyx_SetVtable(PyObject *dict, void *vtable) { #if PY_VERSION_HEX >= 0x02070000 && !(PY_MAJOR_VERSION==3&&PY_MINOR_VERSION==0) 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; } static PyObject * __Pyx_CyFunction_get_doc(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *closure) { if (unlikely(op->func_doc == NULL)) { if (op->func.m_ml->ml_doc) { #if PY_MAJOR_VERSION >= 3 op->func_doc = PyUnicode_FromString(op->func.m_ml->ml_doc); #else op->func_doc = PyString_FromString(op->func.m_ml->ml_doc); #endif if (unlikely(op->func_doc == NULL)) return NULL; } else { Py_INCREF(Py_None); return Py_None; } } Py_INCREF(op->func_doc); return op->func_doc; } static int __Pyx_CyFunction_set_doc(__pyx_CyFunctionObject *op, PyObject *value) { PyObject *tmp = op->func_doc; if (value == NULL) value = Py_None; /* Mark as deleted */ Py_INCREF(value); op->func_doc = value; Py_XDECREF(tmp); return 0; } static PyObject * __Pyx_CyFunction_get_name(__pyx_CyFunctionObject *op) { if (unlikely(op->func_name == NULL)) { #if PY_MAJOR_VERSION >= 3 op->func_name = PyUnicode_InternFromString(op->func.m_ml->ml_name); #else op->func_name = PyString_InternFromString(op->func.m_ml->ml_name); #endif if (unlikely(op->func_name == NULL)) return NULL; } Py_INCREF(op->func_name); return op->func_name; } static int __Pyx_CyFunction_set_name(__pyx_CyFunctionObject *op, PyObject *value) { PyObject *tmp; #if PY_MAJOR_VERSION >= 3 if (unlikely(value == NULL || !PyUnicode_Check(value))) { #else if (unlikely(value == NULL || !PyString_Check(value))) { #endif PyErr_SetString(PyExc_TypeError, "__name__ must be set to a string object"); return -1; } tmp = op->func_name; Py_INCREF(value); op->func_name = value; Py_XDECREF(tmp); return 0; } static PyObject * __Pyx_CyFunction_get_qualname(__pyx_CyFunctionObject *op) { Py_INCREF(op->func_qualname); return op->func_qualname; } static int __Pyx_CyFunction_set_qualname(__pyx_CyFunctionObject *op, PyObject *value) { PyObject *tmp; #if PY_MAJOR_VERSION >= 3 if (unlikely(value == NULL || !PyUnicode_Check(value))) { #else if (unlikely(value == NULL || !PyString_Check(value))) { #endif PyErr_SetString(PyExc_TypeError, "__qualname__ must be set to a string object"); return -1; } tmp = op->func_qualname; Py_INCREF(value); op->func_qualname = value; Py_XDECREF(tmp); return 0; } static PyObject * __Pyx_CyFunction_get_self(__pyx_CyFunctionObject *m, CYTHON_UNUSED void *closure) { PyObject *self; self = m->func_closure; if (self == NULL) self = Py_None; Py_INCREF(self); return self; } static PyObject * __Pyx_CyFunction_get_dict(__pyx_CyFunctionObject *op) { if (unlikely(op->func_dict == NULL)) { op->func_dict = PyDict_New(); if (unlikely(op->func_dict == NULL)) return NULL; } Py_INCREF(op->func_dict); return op->func_dict; } static int __Pyx_CyFunction_set_dict(__pyx_CyFunctionObject *op, PyObject *value) { PyObject *tmp; if (unlikely(value == NULL)) { PyErr_SetString(PyExc_TypeError, "function's dictionary may not be deleted"); return -1; } if (unlikely(!PyDict_Check(value))) { PyErr_SetString(PyExc_TypeError, "setting function's dictionary to a non-dict"); return -1; } tmp = op->func_dict; Py_INCREF(value); op->func_dict = value; Py_XDECREF(tmp); return 0; } static PyObject * __Pyx_CyFunction_get_globals(CYTHON_UNUSED __pyx_CyFunctionObject *op) { PyObject* dict = PyModule_GetDict(__pyx_m); Py_XINCREF(dict); return dict; } static PyObject * __Pyx_CyFunction_get_closure(CYTHON_UNUSED __pyx_CyFunctionObject *op) { Py_INCREF(Py_None); return Py_None; } static PyObject * __Pyx_CyFunction_get_code(__pyx_CyFunctionObject *op) { PyObject* result = (op->func_code) ? op->func_code : Py_None; Py_INCREF(result); return result; } static int __Pyx_CyFunction_init_defaults(__pyx_CyFunctionObject *op) { PyObject *res = op->defaults_getter((PyObject *) op); if (unlikely(!res)) return -1; op->defaults_tuple = PyTuple_GET_ITEM(res, 0); Py_INCREF(op->defaults_tuple); op->defaults_kwdict = PyTuple_GET_ITEM(res, 1); Py_INCREF(op->defaults_kwdict); Py_DECREF(res); return 0; } static int __Pyx_CyFunction_set_defaults(__pyx_CyFunctionObject *op, PyObject* value) { PyObject* tmp; if (!value) { value = Py_None; } else if (value != Py_None && !PyTuple_Check(value)) { PyErr_SetString(PyExc_TypeError, "__defaults__ must be set to a tuple object"); return -1; } Py_INCREF(value); tmp = op->defaults_tuple; op->defaults_tuple = value; Py_XDECREF(tmp); return 0; } static PyObject * __Pyx_CyFunction_get_defaults(__pyx_CyFunctionObject *op) { PyObject* result = op->defaults_tuple; if (unlikely(!result)) { if (op->defaults_getter) { if (__Pyx_CyFunction_init_defaults(op) < 0) return NULL; result = op->defaults_tuple; } else { result = Py_None; } } Py_INCREF(result); return result; } static int __Pyx_CyFunction_set_kwdefaults(__pyx_CyFunctionObject *op, PyObject* value) { PyObject* tmp; if (!value) { value = Py_None; } else if (value != Py_None && !PyDict_Check(value)) { PyErr_SetString(PyExc_TypeError, "__kwdefaults__ must be set to a dict object"); return -1; } Py_INCREF(value); tmp = op->defaults_kwdict; op->defaults_kwdict = value; Py_XDECREF(tmp); return 0; } static PyObject * __Pyx_CyFunction_get_kwdefaults(__pyx_CyFunctionObject *op) { PyObject* result = op->defaults_kwdict; if (unlikely(!result)) { if (op->defaults_getter) { if (__Pyx_CyFunction_init_defaults(op) < 0) return NULL; result = op->defaults_kwdict; } else { result = Py_None; } } Py_INCREF(result); return result; } static int __Pyx_CyFunction_set_annotations(__pyx_CyFunctionObject *op, PyObject* value) { PyObject* tmp; if (!value || value == Py_None) { value = NULL; } else if (!PyDict_Check(value)) { PyErr_SetString(PyExc_TypeError, "__annotations__ must be set to a dict object"); return -1; } Py_XINCREF(value); tmp = op->func_annotations; op->func_annotations = value; Py_XDECREF(tmp); return 0; } static PyObject * __Pyx_CyFunction_get_annotations(__pyx_CyFunctionObject *op) { PyObject* result = op->func_annotations; if (unlikely(!result)) { result = PyDict_New(); if (unlikely(!result)) return NULL; op->func_annotations = result; } Py_INCREF(result); return result; } static PyGetSetDef __pyx_CyFunction_getsets[] = { {(char *) "func_doc", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0}, {(char *) "__doc__", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0}, {(char *) "func_name", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0}, {(char *) "__name__", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0}, {(char *) "__qualname__", (getter)__Pyx_CyFunction_get_qualname, (setter)__Pyx_CyFunction_set_qualname, 0, 0}, {(char *) "__self__", (getter)__Pyx_CyFunction_get_self, 0, 0, 0}, {(char *) "func_dict", (getter)__Pyx_CyFunction_get_dict, (setter)__Pyx_CyFunction_set_dict, 0, 0}, {(char *) "__dict__", (getter)__Pyx_CyFunction_get_dict, (setter)__Pyx_CyFunction_set_dict, 0, 0}, {(char *) "func_globals", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0}, {(char *) "__globals__", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0}, {(char *) "func_closure", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0}, {(char *) "__closure__", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0}, {(char *) "func_code", (getter)__Pyx_CyFunction_get_code, 0, 0, 0}, {(char *) "__code__", (getter)__Pyx_CyFunction_get_code, 0, 0, 0}, {(char *) "func_defaults", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0}, {(char *) "__defaults__", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0}, {(char *) "__kwdefaults__", (getter)__Pyx_CyFunction_get_kwdefaults, (setter)__Pyx_CyFunction_set_kwdefaults, 0, 0}, {(char *) "__annotations__", (getter)__Pyx_CyFunction_get_annotations, (setter)__Pyx_CyFunction_set_annotations, 0, 0}, {0, 0, 0, 0, 0} }; #ifndef PY_WRITE_RESTRICTED /* < Py2.5 */ #define PY_WRITE_RESTRICTED WRITE_RESTRICTED #endif static PyMemberDef __pyx_CyFunction_members[] = { {(char *) "__module__", T_OBJECT, offsetof(__pyx_CyFunctionObject, func.m_module), PY_WRITE_RESTRICTED, 0}, {0, 0, 0, 0, 0} }; static PyObject * __Pyx_CyFunction_reduce(__pyx_CyFunctionObject *m, CYTHON_UNUSED PyObject *args) { #if PY_MAJOR_VERSION >= 3 return PyUnicode_FromString(m->func.m_ml->ml_name); #else return PyString_FromString(m->func.m_ml->ml_name); #endif } static PyMethodDef __pyx_CyFunction_methods[] = { {__Pyx_NAMESTR("__reduce__"), (PyCFunction)__Pyx_CyFunction_reduce, METH_VARARGS, 0}, {0, 0, 0, 0} }; static PyObject *__Pyx_CyFunction_New(PyTypeObject *type, PyMethodDef *ml, int flags, PyObject* qualname, PyObject *closure, PyObject *module, PyObject* code) { __pyx_CyFunctionObject *op = PyObject_GC_New(__pyx_CyFunctionObject, type); if (op == NULL) return NULL; op->flags = flags; op->func_weakreflist = NULL; op->func.m_ml = ml; op->func.m_self = (PyObject *) op; Py_XINCREF(closure); op->func_closure = closure; Py_XINCREF(module); op->func.m_module = module; op->func_dict = NULL; op->func_name = NULL; Py_INCREF(qualname); op->func_qualname = qualname; op->func_doc = NULL; op->func_classobj = NULL; Py_XINCREF(code); op->func_code = code; op->defaults_pyobjects = 0; op->defaults = NULL; op->defaults_tuple = NULL; op->defaults_kwdict = NULL; op->defaults_getter = NULL; op->func_annotations = NULL; PyObject_GC_Track(op); return (PyObject *) op; } static int __Pyx_CyFunction_clear(__pyx_CyFunctionObject *m) { Py_CLEAR(m->func_closure); Py_CLEAR(m->func.m_module); Py_CLEAR(m->func_dict); Py_CLEAR(m->func_name); Py_CLEAR(m->func_qualname); Py_CLEAR(m->func_doc); Py_CLEAR(m->func_code); Py_CLEAR(m->func_classobj); Py_CLEAR(m->defaults_tuple); Py_CLEAR(m->defaults_kwdict); Py_CLEAR(m->func_annotations); if (m->defaults) { PyObject **pydefaults = __Pyx_CyFunction_Defaults(PyObject *, m); int i; for (i = 0; i < m->defaults_pyobjects; i++) Py_XDECREF(pydefaults[i]); PyMem_Free(m->defaults); m->defaults = NULL; } return 0; } static void __Pyx_CyFunction_dealloc(__pyx_CyFunctionObject *m) { PyObject_GC_UnTrack(m); if (m->func_weakreflist != NULL) PyObject_ClearWeakRefs((PyObject *) m); __Pyx_CyFunction_clear(m); PyObject_GC_Del(m); } static int __Pyx_CyFunction_traverse(__pyx_CyFunctionObject *m, visitproc visit, void *arg) { Py_VISIT(m->func_closure); Py_VISIT(m->func.m_module); Py_VISIT(m->func_dict); Py_VISIT(m->func_name); Py_VISIT(m->func_qualname); Py_VISIT(m->func_doc); Py_VISIT(m->func_code); Py_VISIT(m->func_classobj); Py_VISIT(m->defaults_tuple); Py_VISIT(m->defaults_kwdict); if (m->defaults) { PyObject **pydefaults = __Pyx_CyFunction_Defaults(PyObject *, m); int i; for (i = 0; i < m->defaults_pyobjects; i++) Py_VISIT(pydefaults[i]); } return 0; } static PyObject *__Pyx_CyFunction_descr_get(PyObject *func, PyObject *obj, PyObject *type) { __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; if (m->flags & __Pyx_CYFUNCTION_STATICMETHOD) { Py_INCREF(func); return func; } if (m->flags & __Pyx_CYFUNCTION_CLASSMETHOD) { if (type == NULL) type = (PyObject *)(Py_TYPE(obj)); return PyMethod_New(func, type, (PyObject *)(Py_TYPE(type))); } if (obj == Py_None) obj = NULL; return PyMethod_New(func, obj, type); } static PyObject* __Pyx_CyFunction_repr(__pyx_CyFunctionObject *op) { #if PY_MAJOR_VERSION >= 3 return PyUnicode_FromFormat("", op->func_qualname, (void *)op); #else return PyString_FromFormat("", PyString_AsString(op->func_qualname), (void *)op); #endif } #if CYTHON_COMPILING_IN_PYPY static PyObject * __Pyx_CyFunction_Call(PyObject *func, PyObject *arg, PyObject *kw) { PyCFunctionObject* f = (PyCFunctionObject*)func; PyCFunction meth = PyCFunction_GET_FUNCTION(func); PyObject *self = PyCFunction_GET_SELF(func); Py_ssize_t size; switch (PyCFunction_GET_FLAGS(func) & ~(METH_CLASS | METH_STATIC | METH_COEXIST)) { case METH_VARARGS: if (likely(kw == NULL) || PyDict_Size(kw) == 0) return (*meth)(self, arg); break; case METH_VARARGS | METH_KEYWORDS: return (*(PyCFunctionWithKeywords)meth)(self, arg, kw); case METH_NOARGS: if (likely(kw == NULL) || PyDict_Size(kw) == 0) { size = PyTuple_GET_SIZE(arg); if (size == 0) return (*meth)(self, NULL); PyErr_Format(PyExc_TypeError, "%.200s() takes no arguments (%zd given)", f->m_ml->ml_name, size); return NULL; } break; case METH_O: if (likely(kw == NULL) || PyDict_Size(kw) == 0) { size = PyTuple_GET_SIZE(arg); if (size == 1) return (*meth)(self, PyTuple_GET_ITEM(arg, 0)); PyErr_Format(PyExc_TypeError, "%.200s() takes exactly one argument (%zd given)", f->m_ml->ml_name, size); return NULL; } break; default: PyErr_SetString(PyExc_SystemError, "Bad call flags in " "__Pyx_CyFunction_Call. METH_OLDARGS is no " "longer supported!"); return NULL; } PyErr_Format(PyExc_TypeError, "%.200s() takes no keyword arguments", f->m_ml->ml_name); return NULL; } #else static PyObject * __Pyx_CyFunction_Call(PyObject *func, PyObject *arg, PyObject *kw) { return PyCFunction_Call(func, arg, kw); } #endif static PyTypeObject __pyx_CyFunctionType_type = { PyVarObject_HEAD_INIT(0, 0) __Pyx_NAMESTR("cython_function_or_method"), /*tp_name*/ sizeof(__pyx_CyFunctionObject), /*tp_basicsize*/ 0, /*tp_itemsize*/ (destructor) __Pyx_CyFunction_dealloc, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #else 0, /*reserved*/ #endif (reprfunc) __Pyx_CyFunction_repr, /*tp_repr*/ 0, /*tp_as_number*/ 0, /*tp_as_sequence*/ 0, /*tp_as_mapping*/ 0, /*tp_hash*/ __Pyx_CyFunction_Call, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC, /* tp_flags*/ 0, /*tp_doc*/ (traverseproc) __Pyx_CyFunction_traverse, /*tp_traverse*/ (inquiry) __Pyx_CyFunction_clear, /*tp_clear*/ 0, /*tp_richcompare*/ offsetof(__pyx_CyFunctionObject, func_weakreflist), /* tp_weaklistoffse */ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_CyFunction_methods, /*tp_methods*/ __pyx_CyFunction_members, /*tp_members*/ __pyx_CyFunction_getsets, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ __Pyx_CyFunction_descr_get, /*tp_descr_get*/ 0, /*tp_descr_set*/ offsetof(__pyx_CyFunctionObject, func_dict),/*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ 0, /*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*/ #if PY_VERSION_HEX >= 0x02060000 0, /*tp_version_tag*/ #endif #if PY_VERSION_HEX >= 0x030400a1 && defined(Py_TPFLAGS_HAVE_FINALIZE) 0, /*tp_finalize*/ #endif }; static int __Pyx_CyFunction_init(void) { #if !CYTHON_COMPILING_IN_PYPY __pyx_CyFunctionType_type.tp_call = PyCFunction_Call; #endif if (PyType_Ready(&__pyx_CyFunctionType_type) < 0) return -1; __pyx_CyFunctionType = &__pyx_CyFunctionType_type; return 0; } static CYTHON_INLINE void *__Pyx_CyFunction_InitDefaults(PyObject *func, size_t size, int pyobjects) { __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; m->defaults = PyMem_Malloc(size); if (!m->defaults) return PyErr_NoMemory(); memset(m->defaults, 0, size); m->defaults_pyobjects = pyobjects; return m->defaults; } static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *func, PyObject *tuple) { __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; m->defaults_tuple = tuple; Py_INCREF(tuple); } static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *func, PyObject *dict) { __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; m->defaults_kwdict = dict; Py_INCREF(dict); } static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *func, PyObject *dict) { __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; m->func_annotations = dict; Py_INCREF(dict); } static CYTHON_INLINE void __Pyx_ExceptionSave(PyObject **type, PyObject **value, PyObject **tb) { #if CYTHON_COMPILING_IN_CPYTHON PyThreadState *tstate = PyThreadState_GET(); *type = tstate->exc_type; *value = tstate->exc_value; *tb = tstate->exc_traceback; Py_XINCREF(*type); Py_XINCREF(*value); Py_XINCREF(*tb); #else PyErr_GetExcInfo(type, value, tb); #endif } static void __Pyx_ExceptionReset(PyObject *type, PyObject *value, PyObject *tb) { #if CYTHON_COMPILING_IN_CPYTHON PyObject *tmp_type, *tmp_value, *tmp_tb; PyThreadState *tstate = PyThreadState_GET(); tmp_type = tstate->exc_type; tmp_value = tstate->exc_value; tmp_tb = tstate->exc_traceback; tstate->exc_type = type; tstate->exc_value = value; tstate->exc_traceback = tb; Py_XDECREF(tmp_type); Py_XDECREF(tmp_value); Py_XDECREF(tmp_tb); #else PyErr_SetExcInfo(type, value, tb); #endif } static CYTHON_INLINE PyObject *__Pyx_PyInt_to_py_npy_int64(npy_int64 val) { const npy_int64 neg_one = (npy_int64)-1, const_zero = (npy_int64)0; const int is_unsigned = const_zero < neg_one; if ((sizeof(npy_int64) == sizeof(char)) || (sizeof(npy_int64) == sizeof(short))) { return PyInt_FromLong((long)val); } else if ((sizeof(npy_int64) == sizeof(int)) || (sizeof(npy_int64) == sizeof(long))) { if (is_unsigned) return PyLong_FromUnsignedLong((unsigned long)val); else return PyInt_FromLong((long)val); } else if (sizeof(npy_int64) == sizeof(PY_LONG_LONG)) { if (is_unsigned) return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG)val); else return PyLong_FromLongLong((PY_LONG_LONG)val); } else { int one = 1; int little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&val; return _PyLong_FromByteArray(bytes, sizeof(npy_int64), little, !is_unsigned); } } #if PY_MAJOR_VERSION < 3 static int __Pyx_GetBuffer(PyObject *obj, Py_buffer *view, int flags) { #if PY_VERSION_HEX >= 0x02060000 if (PyObject_CheckBuffer(obj)) return PyObject_GetBuffer(obj, view, flags); #endif if (PyObject_TypeCheck(obj, __pyx_ptype_5numpy_ndarray)) return __pyx_pw_5numpy_7ndarray_1__getbuffer__(obj, view, flags); #if PY_VERSION_HEX < 0x02060000 if (obj->ob_type->tp_dict) { PyObject *getbuffer_cobj = PyObject_GetItem( obj->ob_type->tp_dict, __pyx_n_s____pyx_getbuffer); if (getbuffer_cobj) { getbufferproc func = (getbufferproc) PyCObject_AsVoidPtr(getbuffer_cobj); Py_DECREF(getbuffer_cobj); if (!func) goto fail; return func(obj, view, flags); } else { PyErr_Clear(); } } #endif PyErr_Format(PyExc_TypeError, "'%100s' does not have the buffer interface", Py_TYPE(obj)->tp_name); #if PY_VERSION_HEX < 0x02060000 fail: #endif return -1; } static void __Pyx_ReleaseBuffer(Py_buffer *view) { PyObject *obj = view->obj; if (!obj) return; #if PY_VERSION_HEX >= 0x02060000 if (PyObject_CheckBuffer(obj)) { PyBuffer_Release(view); return; } #endif if (PyObject_TypeCheck(obj, __pyx_ptype_5numpy_ndarray)) { __pyx_pw_5numpy_7ndarray_3__releasebuffer__(obj, view); return; } #if PY_VERSION_HEX < 0x02060000 if (obj->ob_type->tp_dict) { PyObject *releasebuffer_cobj = PyObject_GetItem( obj->ob_type->tp_dict, __pyx_n_s____pyx_releasebuffer); if (releasebuffer_cobj) { releasebufferproc func = (releasebufferproc) PyCObject_AsVoidPtr(releasebuffer_cobj); Py_DECREF(releasebuffer_cobj); if (!func) goto fail; func(obj, view); return; } else { PyErr_Clear(); } } #endif goto nofail; #if PY_VERSION_HEX < 0x02060000 fail: #endif PyErr_WriteUnraisable(obj); nofail: Py_DECREF(obj); view->obj = NULL; } #endif /* PY_MAJOR_VERSION < 3 */ static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level) { PyObject *empty_list = 0; PyObject *module = 0; PyObject *global_dict = 0; PyObject *empty_dict = 0; PyObject *list; #if PY_VERSION_HEX < 0x03030000 PyObject *py_import; py_import = __Pyx_PyObject_GetAttrStr(__pyx_b, __pyx_n_s____import__); if (!py_import) goto bad; #endif if (from_list) list = from_list; else { empty_list = PyList_New(0); if (!empty_list) goto bad; list = empty_list; } global_dict = PyModule_GetDict(__pyx_m); if (!global_dict) goto bad; empty_dict = PyDict_New(); if (!empty_dict) goto bad; #if PY_VERSION_HEX >= 0x02050000 { #if PY_MAJOR_VERSION >= 3 if (level == -1) { if (strchr(__Pyx_MODULE_NAME, '.')) { #if PY_VERSION_HEX < 0x03030000 PyObject *py_level = PyInt_FromLong(1); if (!py_level) goto bad; module = PyObject_CallFunctionObjArgs(py_import, name, global_dict, empty_dict, list, py_level, NULL); Py_DECREF(py_level); #else module = PyImport_ImportModuleLevelObject( name, global_dict, empty_dict, list, 1); #endif if (!module) { if (!PyErr_ExceptionMatches(PyExc_ImportError)) goto bad; PyErr_Clear(); } } level = 0; /* try absolute import on failure */ } #endif if (!module) { #if PY_VERSION_HEX < 0x03030000 PyObject *py_level = PyInt_FromLong(level); if (!py_level) goto bad; module = PyObject_CallFunctionObjArgs(py_import, name, global_dict, empty_dict, list, py_level, NULL); Py_DECREF(py_level); #else module = PyImport_ImportModuleLevelObject( name, global_dict, empty_dict, list, level); #endif } } #else if (level>0) { PyErr_SetString(PyExc_RuntimeError, "Relative import is not supported for Python <=2.4."); goto bad; } module = PyObject_CallFunctionObjArgs(py_import, name, global_dict, empty_dict, list, NULL); #endif bad: #if PY_VERSION_HEX < 0x03030000 Py_XDECREF(py_import); #endif Py_XDECREF(empty_list); Py_XDECREF(empty_dict); return module; } static PyObject *__Pyx_FindPy2Metaclass(PyObject *bases) { PyObject *metaclass; #if PY_MAJOR_VERSION < 3 if (PyTuple_Check(bases) && PyTuple_GET_SIZE(bases) > 0) { PyObject *base = PyTuple_GET_ITEM(bases, 0); metaclass = __Pyx_PyObject_GetAttrStr(base, __pyx_n_s____class__); if (!metaclass) { PyErr_Clear(); metaclass = (PyObject*) Py_TYPE(base); Py_INCREF(metaclass); } } else { metaclass = (PyObject *) &PyClass_Type; Py_INCREF(metaclass); } #else if (PyTuple_Check(bases) && PyTuple_GET_SIZE(bases) > 0) { PyObject *base = PyTuple_GET_ITEM(bases, 0); metaclass = (PyObject*) Py_TYPE(base); } else { metaclass = (PyObject *) &PyType_Type; } Py_INCREF(metaclass); #endif return metaclass; } static PyObject *__Pyx_CreateClass(PyObject *bases, PyObject *dict, PyObject *name, PyObject *qualname, PyObject *modname) { PyObject *result; PyObject *metaclass; if (PyDict_SetItem(dict, __pyx_n_s____module__, modname) < 0) return NULL; if (PyDict_SetItem(dict, __pyx_n_s____qualname__, qualname) < 0) return NULL; metaclass = PyDict_GetItem(dict, __pyx_n_s____metaclass__); if (metaclass) { Py_INCREF(metaclass); } else { metaclass = __Pyx_FindPy2Metaclass(bases); } result = PyObject_CallFunctionObjArgs(metaclass, name, bases, dict, NULL); Py_DECREF(metaclass); return result; } static CYTHON_INLINE npy_int64 __Pyx_PyInt_from_py_npy_int64(PyObject* x) { const npy_int64 neg_one = (npy_int64)-1, const_zero = (npy_int64)0; const int is_unsigned = const_zero < neg_one; if (sizeof(npy_int64) == sizeof(char)) { if (is_unsigned) return (npy_int64)__Pyx_PyInt_AsUnsignedChar(x); else return (npy_int64)__Pyx_PyInt_AsSignedChar(x); } else if (sizeof(npy_int64) == sizeof(short)) { if (is_unsigned) return (npy_int64)__Pyx_PyInt_AsUnsignedShort(x); else return (npy_int64)__Pyx_PyInt_AsSignedShort(x); } else if (sizeof(npy_int64) == sizeof(int)) { if (is_unsigned) return (npy_int64)__Pyx_PyInt_AsUnsignedInt(x); else return (npy_int64)__Pyx_PyInt_AsSignedInt(x); } else if (sizeof(npy_int64) == sizeof(long)) { if (is_unsigned) return (npy_int64)__Pyx_PyInt_AsUnsignedLong(x); else return (npy_int64)__Pyx_PyInt_AsSignedLong(x); } else if (sizeof(npy_int64) == sizeof(PY_LONG_LONG)) { if (is_unsigned) return (npy_int64)__Pyx_PyInt_AsUnsignedLongLong(x); else return (npy_int64)__Pyx_PyInt_AsSignedLongLong(x); } else { #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_Int(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; } } static CYTHON_INLINE PyObject *__Pyx_PyInt_to_py_npy_int32(npy_int32 val) { const npy_int32 neg_one = (npy_int32)-1, const_zero = (npy_int32)0; const int is_unsigned = const_zero < neg_one; if ((sizeof(npy_int32) == sizeof(char)) || (sizeof(npy_int32) == sizeof(short))) { return PyInt_FromLong((long)val); } else if ((sizeof(npy_int32) == sizeof(int)) || (sizeof(npy_int32) == sizeof(long))) { if (is_unsigned) return PyLong_FromUnsignedLong((unsigned long)val); else return PyInt_FromLong((long)val); } else if (sizeof(npy_int32) == sizeof(PY_LONG_LONG)) { if (is_unsigned) return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG)val); else return PyLong_FromLongLong((PY_LONG_LONG)val); } else { int one = 1; int little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&val; return _PyLong_FromByteArray(bytes, sizeof(npy_int32), little, !is_unsigned); } } #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION < 3 static PyObject *__Pyx_GetStdout(void) { PyObject *f = PySys_GetObject((char *)"stdout"); if (!f) { PyErr_SetString(PyExc_RuntimeError, "lost sys.stdout"); } return f; } static int __Pyx_Print(PyObject* f, PyObject *arg_tuple, int newline) { int i; if (!f) { if (!(f = __Pyx_GetStdout())) return -1; } Py_INCREF(f); for (i=0; i < PyTuple_GET_SIZE(arg_tuple); i++) { PyObject* v; if (PyFile_SoftSpace(f, 1)) { if (PyFile_WriteString(" ", f) < 0) goto error; } v = PyTuple_GET_ITEM(arg_tuple, i); if (PyFile_WriteObject(v, f, Py_PRINT_RAW) < 0) goto error; if (PyString_Check(v)) { char *s = PyString_AsString(v); Py_ssize_t len = PyString_Size(v); if (len > 0 && isspace(Py_CHARMASK(s[len-1])) && s[len-1] != ' ') PyFile_SoftSpace(f, 0); } } if (newline) { if (PyFile_WriteString("\n", f) < 0) goto error; PyFile_SoftSpace(f, 0); } Py_DECREF(f); return 0; error: Py_DECREF(f); return -1; } #else /* Python 3 has a print function */ static int __Pyx_Print(PyObject* stream, PyObject *arg_tuple, int newline) { PyObject* kwargs = 0; PyObject* result = 0; PyObject* end_string; if (unlikely(!__pyx_print)) { __pyx_print = PyObject_GetAttr(__pyx_b, __pyx_n_s__print); if (!__pyx_print) return -1; } if (stream) { kwargs = PyDict_New(); if (unlikely(!kwargs)) return -1; if (unlikely(PyDict_SetItem(kwargs, __pyx_n_s__file, stream) < 0)) goto bad; if (!newline) { end_string = PyUnicode_FromStringAndSize(" ", 1); if (unlikely(!end_string)) goto bad; if (PyDict_SetItem(kwargs, __pyx_n_s__end, end_string) < 0) { Py_DECREF(end_string); goto bad; } Py_DECREF(end_string); } } else if (!newline) { if (unlikely(!__pyx_print_kwargs)) { __pyx_print_kwargs = PyDict_New(); if (unlikely(!__pyx_print_kwargs)) return -1; end_string = PyUnicode_FromStringAndSize(" ", 1); if (unlikely(!end_string)) return -1; if (PyDict_SetItem(__pyx_print_kwargs, __pyx_n_s__end, end_string) < 0) { Py_DECREF(end_string); return -1; } Py_DECREF(end_string); } kwargs = __pyx_print_kwargs; } result = PyObject_Call(__pyx_print, arg_tuple, kwargs); if (unlikely(kwargs) && (kwargs != __pyx_print_kwargs)) Py_DECREF(kwargs); if (!result) return -1; Py_DECREF(result); return 0; bad: if (kwargs != __pyx_print_kwargs) Py_XDECREF(kwargs); return -1; } #endif #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION < 3 static int __Pyx_PrintOne(PyObject* f, PyObject *o) { if (!f) { if (!(f = __Pyx_GetStdout())) return -1; } Py_INCREF(f); if (PyFile_SoftSpace(f, 0)) { if (PyFile_WriteString(" ", f) < 0) goto error; } if (PyFile_WriteObject(o, f, Py_PRINT_RAW) < 0) goto error; if (PyFile_WriteString("\n", f) < 0) goto error; Py_DECREF(f); return 0; error: Py_DECREF(f); return -1; /* the line below is just to avoid C compiler * warnings about unused functions */ return __Pyx_Print(f, NULL, 0); } #else /* Python 3 has a print function */ static int __Pyx_PrintOne(PyObject* stream, PyObject *o) { int res; PyObject* arg_tuple = PyTuple_Pack(1, o); if (unlikely(!arg_tuple)) return -1; res = __Pyx_Print(stream, arg_tuple, 1); Py_DECREF(arg_tuple); return res; } #endif static CYTHON_INLINE npy_int32 __Pyx_PyInt_from_py_npy_int32(PyObject* x) { const npy_int32 neg_one = (npy_int32)-1, const_zero = (npy_int32)0; const int is_unsigned = const_zero < neg_one; if (sizeof(npy_int32) == sizeof(char)) { if (is_unsigned) return (npy_int32)__Pyx_PyInt_AsUnsignedChar(x); else return (npy_int32)__Pyx_PyInt_AsSignedChar(x); } else if (sizeof(npy_int32) == sizeof(short)) { if (is_unsigned) return (npy_int32)__Pyx_PyInt_AsUnsignedShort(x); else return (npy_int32)__Pyx_PyInt_AsSignedShort(x); } else if (sizeof(npy_int32) == sizeof(int)) { if (is_unsigned) return (npy_int32)__Pyx_PyInt_AsUnsignedInt(x); else return (npy_int32)__Pyx_PyInt_AsSignedInt(x); } else if (sizeof(npy_int32) == sizeof(long)) { if (is_unsigned) return (npy_int32)__Pyx_PyInt_AsUnsignedLong(x); else return (npy_int32)__Pyx_PyInt_AsSignedLong(x); } else if (sizeof(npy_int32) == sizeof(PY_LONG_LONG)) { if (is_unsigned) return (npy_int32)__Pyx_PyInt_AsUnsignedLongLong(x); else return (npy_int32)__Pyx_PyInt_AsSignedLongLong(x); } else { #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_Int(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; } } static PyObject* __Pyx_Method_ClassMethod(PyObject *method) { #if CYTHON_COMPILING_IN_PYPY if (PyObject_TypeCheck(method, &PyWrapperDescr_Type)) { /* cdef classes */ return PyClassMethod_New(method); } #else static PyTypeObject *methoddescr_type = NULL; if (methoddescr_type == NULL) { PyObject *meth = __Pyx_GetAttrString((PyObject*)&PyList_Type, "append"); if (!meth) return NULL; methoddescr_type = Py_TYPE(meth); Py_DECREF(meth); } if (PyObject_TypeCheck(method, methoddescr_type)) { /* cdef classes */ PyMethodDescrObject *descr = (PyMethodDescrObject *)method; #if PY_VERSION_HEX < 0x03020000 PyTypeObject *d_type = descr->d_type; #else PyTypeObject *d_type = descr->d_common.d_type; #endif return PyDescr_NewClassMethod(d_type, descr->d_method); } #endif else if (PyMethod_Check(method)) { /* python classes */ return PyClassMethod_New(PyMethod_GET_FUNCTION(method)); } else if (PyCFunction_Check(method)) { return PyClassMethod_New(method); } #ifdef __Pyx_CyFunction_USED else if (PyObject_TypeCheck(method, __pyx_CyFunctionType)) { return PyClassMethod_New(method); } #endif PyErr_Format(PyExc_TypeError, "Class-level classmethod() can only be called on " "a method_descriptor or instance method."); return NULL; } #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 #if CYTHON_CCOMPLEX #else static CYTHON_INLINE int __Pyx_c_eqf(__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_sumf(__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_difff(__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_prodf(__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; } static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_quotf(__pyx_t_float_complex a, __pyx_t_float_complex b) { __pyx_t_float_complex z; float denom = b.real * b.real + b.imag * b.imag; z.real = (a.real * b.real + a.imag * b.imag) / denom; z.imag = (a.imag * b.real - a.real * b.imag) / denom; return z; } static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_negf(__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_zerof(__pyx_t_float_complex a) { return (a.real == 0) && (a.imag == 0); } static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_conjf(__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_absf(__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_powf(__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_prodf(a, a); return __Pyx_c_prodf(a, a); case 3: z = __Pyx_c_prodf(a, a); return __Pyx_c_prodf(z, a); case 4: z = __Pyx_c_prodf(a, a); return __Pyx_c_prodf(z, z); } } if (a.imag == 0) { if (a.real == 0) { return a; } r = a.real; theta = 0; } else { r = __Pyx_c_absf(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 #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 #if CYTHON_CCOMPLEX #else static CYTHON_INLINE int __Pyx_c_eq(__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(__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(__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(__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; } static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_quot(__pyx_t_double_complex a, __pyx_t_double_complex b) { __pyx_t_double_complex z; double denom = b.real * b.real + b.imag * b.imag; z.real = (a.real * b.real + a.imag * b.imag) / denom; z.imag = (a.imag * b.real - a.real * b.imag) / denom; return z; } static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_neg(__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(__pyx_t_double_complex a) { return (a.real == 0) && (a.imag == 0); } static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_conj(__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(__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(__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(a, a); return __Pyx_c_prod(a, a); case 3: z = __Pyx_c_prod(a, a); return __Pyx_c_prod(z, a); case 4: z = __Pyx_c_prod(a, a); return __Pyx_c_prod(z, z); } } if (a.imag == 0) { if (a.real == 0) { return a; } r = a.real; theta = 0; } else { r = __Pyx_c_abs(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 static CYTHON_INLINE unsigned char __Pyx_PyInt_AsUnsignedChar(PyObject* x) { const unsigned char neg_one = (unsigned char)-1, const_zero = 0; const int is_unsigned = neg_one > const_zero; if (sizeof(unsigned char) < sizeof(long)) { long val = __Pyx_PyInt_AsLong(x); if (unlikely(val != (long)(unsigned char)val)) { if (!unlikely(val == -1 && PyErr_Occurred())) { PyErr_SetString(PyExc_OverflowError, (is_unsigned && unlikely(val < 0)) ? "can't convert negative value to unsigned char" : "value too large to convert to unsigned char"); } return (unsigned char)-1; } return (unsigned char)val; } return (unsigned char)__Pyx_PyInt_AsUnsignedLong(x); } static CYTHON_INLINE unsigned short __Pyx_PyInt_AsUnsignedShort(PyObject* x) { const unsigned short neg_one = (unsigned short)-1, const_zero = 0; const int is_unsigned = neg_one > const_zero; if (sizeof(unsigned short) < sizeof(long)) { long val = __Pyx_PyInt_AsLong(x); if (unlikely(val != (long)(unsigned short)val)) { if (!unlikely(val == -1 && PyErr_Occurred())) { PyErr_SetString(PyExc_OverflowError, (is_unsigned && unlikely(val < 0)) ? "can't convert negative value to unsigned short" : "value too large to convert to unsigned short"); } return (unsigned short)-1; } return (unsigned short)val; } return (unsigned short)__Pyx_PyInt_AsUnsignedLong(x); } static CYTHON_INLINE unsigned int __Pyx_PyInt_AsUnsignedInt(PyObject* x) { const unsigned int neg_one = (unsigned int)-1, const_zero = 0; const int is_unsigned = neg_one > const_zero; if (sizeof(unsigned int) < sizeof(long)) { long val = __Pyx_PyInt_AsLong(x); if (unlikely(val != (long)(unsigned int)val)) { if (!unlikely(val == -1 && PyErr_Occurred())) { PyErr_SetString(PyExc_OverflowError, (is_unsigned && unlikely(val < 0)) ? "can't convert negative value to unsigned int" : "value too large to convert to unsigned int"); } return (unsigned int)-1; } return (unsigned int)val; } return (unsigned int)__Pyx_PyInt_AsUnsignedLong(x); } static CYTHON_INLINE char __Pyx_PyInt_AsChar(PyObject* x) { const char neg_one = (char)-1, const_zero = 0; const int is_unsigned = neg_one > const_zero; if (sizeof(char) < sizeof(long)) { long val = __Pyx_PyInt_AsLong(x); if (unlikely(val != (long)(char)val)) { if (!unlikely(val == -1 && PyErr_Occurred())) { PyErr_SetString(PyExc_OverflowError, (is_unsigned && unlikely(val < 0)) ? "can't convert negative value to char" : "value too large to convert to char"); } return (char)-1; } return (char)val; } return (char)__Pyx_PyInt_AsLong(x); } static CYTHON_INLINE short __Pyx_PyInt_AsShort(PyObject* x) { const short neg_one = (short)-1, const_zero = 0; const int is_unsigned = neg_one > const_zero; if (sizeof(short) < sizeof(long)) { long val = __Pyx_PyInt_AsLong(x); if (unlikely(val != (long)(short)val)) { if (!unlikely(val == -1 && PyErr_Occurred())) { PyErr_SetString(PyExc_OverflowError, (is_unsigned && unlikely(val < 0)) ? "can't convert negative value to short" : "value too large to convert to short"); } return (short)-1; } return (short)val; } return (short)__Pyx_PyInt_AsLong(x); } static CYTHON_INLINE int __Pyx_PyInt_AsInt(PyObject* x) { const int neg_one = (int)-1, const_zero = 0; const int is_unsigned = neg_one > const_zero; if (sizeof(int) < sizeof(long)) { long val = __Pyx_PyInt_AsLong(x); if (unlikely(val != (long)(int)val)) { if (!unlikely(val == -1 && PyErr_Occurred())) { PyErr_SetString(PyExc_OverflowError, (is_unsigned && unlikely(val < 0)) ? "can't convert negative value to int" : "value too large to convert to int"); } return (int)-1; } return (int)val; } return (int)__Pyx_PyInt_AsLong(x); } static CYTHON_INLINE signed char __Pyx_PyInt_AsSignedChar(PyObject* x) { const signed char neg_one = (signed char)-1, const_zero = 0; const int is_unsigned = neg_one > const_zero; if (sizeof(signed char) < sizeof(long)) { long val = __Pyx_PyInt_AsLong(x); if (unlikely(val != (long)(signed char)val)) { if (!unlikely(val == -1 && PyErr_Occurred())) { PyErr_SetString(PyExc_OverflowError, (is_unsigned && unlikely(val < 0)) ? "can't convert negative value to signed char" : "value too large to convert to signed char"); } return (signed char)-1; } return (signed char)val; } return (signed char)__Pyx_PyInt_AsSignedLong(x); } static CYTHON_INLINE signed short __Pyx_PyInt_AsSignedShort(PyObject* x) { const signed short neg_one = (signed short)-1, const_zero = 0; const int is_unsigned = neg_one > const_zero; if (sizeof(signed short) < sizeof(long)) { long val = __Pyx_PyInt_AsLong(x); if (unlikely(val != (long)(signed short)val)) { if (!unlikely(val == -1 && PyErr_Occurred())) { PyErr_SetString(PyExc_OverflowError, (is_unsigned && unlikely(val < 0)) ? "can't convert negative value to signed short" : "value too large to convert to signed short"); } return (signed short)-1; } return (signed short)val; } return (signed short)__Pyx_PyInt_AsSignedLong(x); } static CYTHON_INLINE signed int __Pyx_PyInt_AsSignedInt(PyObject* x) { const signed int neg_one = (signed int)-1, const_zero = 0; const int is_unsigned = neg_one > const_zero; if (sizeof(signed int) < sizeof(long)) { long val = __Pyx_PyInt_AsLong(x); if (unlikely(val != (long)(signed int)val)) { if (!unlikely(val == -1 && PyErr_Occurred())) { PyErr_SetString(PyExc_OverflowError, (is_unsigned && unlikely(val < 0)) ? "can't convert negative value to signed int" : "value too large to convert to signed int"); } return (signed int)-1; } return (signed int)val; } return (signed int)__Pyx_PyInt_AsSignedLong(x); } static CYTHON_INLINE int __Pyx_PyInt_AsLongDouble(PyObject* x) { const int neg_one = (int)-1, const_zero = 0; const int is_unsigned = neg_one > const_zero; if (sizeof(int) < sizeof(long)) { long val = __Pyx_PyInt_AsLong(x); if (unlikely(val != (long)(int)val)) { if (!unlikely(val == -1 && PyErr_Occurred())) { PyErr_SetString(PyExc_OverflowError, (is_unsigned && unlikely(val < 0)) ? "can't convert negative value to int" : "value too large to convert to int"); } return (int)-1; } return (int)val; } return (int)__Pyx_PyInt_AsLong(x); } #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS #include "longintrepr.h" #endif #endif static CYTHON_INLINE unsigned long __Pyx_PyInt_AsUnsignedLong(PyObject* x) { const unsigned long neg_one = (unsigned long)-1, const_zero = 0; const int is_unsigned = neg_one > const_zero; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_Check(x))) { long val = PyInt_AS_LONG(x); if (is_unsigned && unlikely(val < 0)) { PyErr_SetString(PyExc_OverflowError, "can't convert negative value to unsigned long"); return (unsigned long)-1; } return (unsigned long)val; } else #endif if (likely(PyLong_Check(x))) { if (is_unsigned) { #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS if (sizeof(digit) <= sizeof(unsigned long)) { switch (Py_SIZE(x)) { case 0: return 0; case 1: return (unsigned long) ((PyLongObject*)x)->ob_digit[0]; } } #endif #endif if (unlikely(Py_SIZE(x) < 0)) { PyErr_SetString(PyExc_OverflowError, "can't convert negative value to unsigned long"); return (unsigned long)-1; } return (unsigned long)PyLong_AsUnsignedLong(x); } else { #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS if (sizeof(digit) <= sizeof(unsigned long)) { switch (Py_SIZE(x)) { case 0: return 0; case 1: return +(unsigned long) ((PyLongObject*)x)->ob_digit[0]; case -1: return -(unsigned long) ((PyLongObject*)x)->ob_digit[0]; } } #endif #endif return (unsigned long)PyLong_AsLong(x); } } else { unsigned long val; PyObject *tmp = __Pyx_PyNumber_Int(x); if (!tmp) return (unsigned long)-1; val = __Pyx_PyInt_AsUnsignedLong(tmp); Py_DECREF(tmp); return val; } } #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS #include "longintrepr.h" #endif #endif static CYTHON_INLINE unsigned PY_LONG_LONG __Pyx_PyInt_AsUnsignedLongLong(PyObject* x) { const unsigned PY_LONG_LONG neg_one = (unsigned PY_LONG_LONG)-1, const_zero = 0; const int is_unsigned = neg_one > const_zero; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_Check(x))) { long val = PyInt_AS_LONG(x); if (is_unsigned && unlikely(val < 0)) { PyErr_SetString(PyExc_OverflowError, "can't convert negative value to unsigned PY_LONG_LONG"); return (unsigned PY_LONG_LONG)-1; } return (unsigned PY_LONG_LONG)val; } else #endif if (likely(PyLong_Check(x))) { if (is_unsigned) { #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS if (sizeof(digit) <= sizeof(unsigned PY_LONG_LONG)) { switch (Py_SIZE(x)) { case 0: return 0; case 1: return (unsigned PY_LONG_LONG) ((PyLongObject*)x)->ob_digit[0]; } } #endif #endif if (unlikely(Py_SIZE(x) < 0)) { PyErr_SetString(PyExc_OverflowError, "can't convert negative value to unsigned PY_LONG_LONG"); return (unsigned PY_LONG_LONG)-1; } return (unsigned PY_LONG_LONG)PyLong_AsUnsignedLongLong(x); } else { #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS if (sizeof(digit) <= sizeof(unsigned PY_LONG_LONG)) { switch (Py_SIZE(x)) { case 0: return 0; case 1: return +(unsigned PY_LONG_LONG) ((PyLongObject*)x)->ob_digit[0]; case -1: return -(unsigned PY_LONG_LONG) ((PyLongObject*)x)->ob_digit[0]; } } #endif #endif return (unsigned PY_LONG_LONG)PyLong_AsLongLong(x); } } else { unsigned PY_LONG_LONG val; PyObject *tmp = __Pyx_PyNumber_Int(x); if (!tmp) return (unsigned PY_LONG_LONG)-1; val = __Pyx_PyInt_AsUnsignedLongLong(tmp); Py_DECREF(tmp); return val; } } #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS #include "longintrepr.h" #endif #endif static CYTHON_INLINE long __Pyx_PyInt_AsLong(PyObject* x) { const long neg_one = (long)-1, const_zero = 0; const int is_unsigned = neg_one > const_zero; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_Check(x))) { long val = PyInt_AS_LONG(x); if (is_unsigned && unlikely(val < 0)) { PyErr_SetString(PyExc_OverflowError, "can't convert negative value to long"); return (long)-1; } return (long)val; } else #endif if (likely(PyLong_Check(x))) { if (is_unsigned) { #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS if (sizeof(digit) <= sizeof(long)) { switch (Py_SIZE(x)) { case 0: return 0; case 1: return (long) ((PyLongObject*)x)->ob_digit[0]; } } #endif #endif if (unlikely(Py_SIZE(x) < 0)) { PyErr_SetString(PyExc_OverflowError, "can't convert negative value to long"); return (long)-1; } return (long)PyLong_AsUnsignedLong(x); } else { #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS if (sizeof(digit) <= sizeof(long)) { switch (Py_SIZE(x)) { case 0: return 0; case 1: return +(long) ((PyLongObject*)x)->ob_digit[0]; case -1: return -(long) ((PyLongObject*)x)->ob_digit[0]; } } #endif #endif return (long)PyLong_AsLong(x); } } else { long val; PyObject *tmp = __Pyx_PyNumber_Int(x); if (!tmp) return (long)-1; val = __Pyx_PyInt_AsLong(tmp); Py_DECREF(tmp); return val; } } #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS #include "longintrepr.h" #endif #endif static CYTHON_INLINE PY_LONG_LONG __Pyx_PyInt_AsLongLong(PyObject* x) { const PY_LONG_LONG neg_one = (PY_LONG_LONG)-1, const_zero = 0; const int is_unsigned = neg_one > const_zero; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_Check(x))) { long val = PyInt_AS_LONG(x); if (is_unsigned && unlikely(val < 0)) { PyErr_SetString(PyExc_OverflowError, "can't convert negative value to PY_LONG_LONG"); return (PY_LONG_LONG)-1; } return (PY_LONG_LONG)val; } else #endif if (likely(PyLong_Check(x))) { if (is_unsigned) { #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS if (sizeof(digit) <= sizeof(PY_LONG_LONG)) { switch (Py_SIZE(x)) { case 0: return 0; case 1: return (PY_LONG_LONG) ((PyLongObject*)x)->ob_digit[0]; } } #endif #endif if (unlikely(Py_SIZE(x) < 0)) { PyErr_SetString(PyExc_OverflowError, "can't convert negative value to PY_LONG_LONG"); return (PY_LONG_LONG)-1; } return (PY_LONG_LONG)PyLong_AsUnsignedLongLong(x); } else { #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS if (sizeof(digit) <= sizeof(PY_LONG_LONG)) { switch (Py_SIZE(x)) { case 0: return 0; case 1: return +(PY_LONG_LONG) ((PyLongObject*)x)->ob_digit[0]; case -1: return -(PY_LONG_LONG) ((PyLongObject*)x)->ob_digit[0]; } } #endif #endif return (PY_LONG_LONG)PyLong_AsLongLong(x); } } else { PY_LONG_LONG val; PyObject *tmp = __Pyx_PyNumber_Int(x); if (!tmp) return (PY_LONG_LONG)-1; val = __Pyx_PyInt_AsLongLong(tmp); Py_DECREF(tmp); return val; } } #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS #include "longintrepr.h" #endif #endif static CYTHON_INLINE signed long __Pyx_PyInt_AsSignedLong(PyObject* x) { const signed long neg_one = (signed long)-1, const_zero = 0; const int is_unsigned = neg_one > const_zero; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_Check(x))) { long val = PyInt_AS_LONG(x); if (is_unsigned && unlikely(val < 0)) { PyErr_SetString(PyExc_OverflowError, "can't convert negative value to signed long"); return (signed long)-1; } return (signed long)val; } else #endif if (likely(PyLong_Check(x))) { if (is_unsigned) { #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS if (sizeof(digit) <= sizeof(signed long)) { switch (Py_SIZE(x)) { case 0: return 0; case 1: return (signed long) ((PyLongObject*)x)->ob_digit[0]; } } #endif #endif if (unlikely(Py_SIZE(x) < 0)) { PyErr_SetString(PyExc_OverflowError, "can't convert negative value to signed long"); return (signed long)-1; } return (signed long)PyLong_AsUnsignedLong(x); } else { #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS if (sizeof(digit) <= sizeof(signed long)) { switch (Py_SIZE(x)) { case 0: return 0; case 1: return +(signed long) ((PyLongObject*)x)->ob_digit[0]; case -1: return -(signed long) ((PyLongObject*)x)->ob_digit[0]; } } #endif #endif return (signed long)PyLong_AsLong(x); } } else { signed long val; PyObject *tmp = __Pyx_PyNumber_Int(x); if (!tmp) return (signed long)-1; val = __Pyx_PyInt_AsSignedLong(tmp); Py_DECREF(tmp); return val; } } #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS #include "longintrepr.h" #endif #endif static CYTHON_INLINE signed PY_LONG_LONG __Pyx_PyInt_AsSignedLongLong(PyObject* x) { const signed PY_LONG_LONG neg_one = (signed PY_LONG_LONG)-1, const_zero = 0; const int is_unsigned = neg_one > const_zero; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_Check(x))) { long val = PyInt_AS_LONG(x); if (is_unsigned && unlikely(val < 0)) { PyErr_SetString(PyExc_OverflowError, "can't convert negative value to signed PY_LONG_LONG"); return (signed PY_LONG_LONG)-1; } return (signed PY_LONG_LONG)val; } else #endif if (likely(PyLong_Check(x))) { if (is_unsigned) { #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS if (sizeof(digit) <= sizeof(signed PY_LONG_LONG)) { switch (Py_SIZE(x)) { case 0: return 0; case 1: return (signed PY_LONG_LONG) ((PyLongObject*)x)->ob_digit[0]; } } #endif #endif if (unlikely(Py_SIZE(x) < 0)) { PyErr_SetString(PyExc_OverflowError, "can't convert negative value to signed PY_LONG_LONG"); return (signed PY_LONG_LONG)-1; } return (signed PY_LONG_LONG)PyLong_AsUnsignedLongLong(x); } else { #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS if (sizeof(digit) <= sizeof(signed PY_LONG_LONG)) { switch (Py_SIZE(x)) { case 0: return 0; case 1: return +(signed PY_LONG_LONG) ((PyLongObject*)x)->ob_digit[0]; case -1: return -(signed PY_LONG_LONG) ((PyLongObject*)x)->ob_digit[0]; } } #endif #endif return (signed PY_LONG_LONG)PyLong_AsLongLong(x); } } else { signed PY_LONG_LONG val; PyObject *tmp = __Pyx_PyNumber_Int(x); if (!tmp) return (signed PY_LONG_LONG)-1; val = __Pyx_PyInt_AsSignedLongLong(tmp); Py_DECREF(tmp); return val; } } static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb) { PyObject *tmp_type, *tmp_value, *tmp_tb; #if CYTHON_COMPILING_IN_CPYTHON PyThreadState *tstate = PyThreadState_GET(); 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; #else PyErr_GetExcInfo(&tmp_type, &tmp_value, &tmp_tb); PyErr_SetExcInfo(*type, *value, *tb); #endif *type = tmp_type; *value = tmp_value; *tb = tmp_tb; } static PyObject *__Pyx_Generator_Next(PyObject *self); static PyObject *__Pyx_Generator_Send(PyObject *self, PyObject *value); static PyObject *__Pyx_Generator_Close(PyObject *self); static PyObject *__Pyx_Generator_Throw(PyObject *gen, PyObject *args); static PyTypeObject *__pyx_GeneratorType = 0; #define __Pyx_Generator_CheckExact(obj) (Py_TYPE(obj) == __pyx_GeneratorType) #define __Pyx_Generator_Undelegate(gen) Py_CLEAR((gen)->yieldfrom) #if 1 || PY_VERSION_HEX < 0x030300B0 static int __Pyx_PyGen_FetchStopIterationValue(PyObject **pvalue) { PyObject *et, *ev, *tb; PyObject *value = NULL; __Pyx_ErrFetch(&et, &ev, &tb); if (!et) { Py_XDECREF(tb); Py_XDECREF(ev); Py_INCREF(Py_None); *pvalue = Py_None; return 0; } if (unlikely(et != PyExc_StopIteration) && unlikely(!PyErr_GivenExceptionMatches(et, PyExc_StopIteration))) { __Pyx_ErrRestore(et, ev, tb); return -1; } if (likely(et == PyExc_StopIteration)) { if (likely(!ev) || !PyObject_IsInstance(ev, PyExc_StopIteration)) { if (!ev) { Py_INCREF(Py_None); ev = Py_None; } Py_XDECREF(tb); Py_DECREF(et); *pvalue = ev; return 0; } } PyErr_NormalizeException(&et, &ev, &tb); if (unlikely(!PyObject_IsInstance(ev, PyExc_StopIteration))) { __Pyx_ErrRestore(et, ev, tb); return -1; } Py_XDECREF(tb); Py_DECREF(et); #if PY_VERSION_HEX >= 0x030300A0 value = ((PyStopIterationObject *)ev)->value; Py_INCREF(value); Py_DECREF(ev); #else { PyObject* args = PyObject_GetAttr(ev, __pyx_n_s__args); Py_DECREF(ev); if (likely(args)) { value = PyObject_GetItem(args, 0); Py_DECREF(args); } if (unlikely(!value)) { __Pyx_ErrRestore(NULL, NULL, NULL); Py_INCREF(Py_None); value = Py_None; } } #endif *pvalue = value; return 0; } #endif static CYTHON_INLINE void __Pyx_Generator_ExceptionClear(__pyx_GeneratorObject *self) { PyObject *exc_type = self->exc_type; PyObject *exc_value = self->exc_value; PyObject *exc_traceback = self->exc_traceback; self->exc_type = NULL; self->exc_value = NULL; self->exc_traceback = NULL; Py_XDECREF(exc_type); Py_XDECREF(exc_value); Py_XDECREF(exc_traceback); } static CYTHON_INLINE int __Pyx_Generator_CheckRunning(__pyx_GeneratorObject *gen) { if (unlikely(gen->is_running)) { PyErr_SetString(PyExc_ValueError, "generator already executing"); return 1; } return 0; } static CYTHON_INLINE PyObject *__Pyx_Generator_SendEx(__pyx_GeneratorObject *self, PyObject *value) { PyObject *retval; assert(!self->is_running); if (unlikely(self->resume_label == 0)) { if (unlikely(value && value != Py_None)) { PyErr_SetString(PyExc_TypeError, "can't send non-None value to a " "just-started generator"); return NULL; } } if (unlikely(self->resume_label == -1)) { PyErr_SetNone(PyExc_StopIteration); return NULL; } if (value) { #if CYTHON_COMPILING_IN_PYPY #else /* Generators always return to their most recent caller, not * necessarily their creator. */ if (self->exc_traceback) { PyThreadState *tstate = PyThreadState_GET(); PyTracebackObject *tb = (PyTracebackObject *) self->exc_traceback; PyFrameObject *f = tb->tb_frame; Py_XINCREF(tstate->frame); assert(f->f_back == NULL); f->f_back = tstate->frame; } #endif __Pyx_ExceptionSwap(&self->exc_type, &self->exc_value, &self->exc_traceback); } else { __Pyx_Generator_ExceptionClear(self); } self->is_running = 1; retval = self->body((PyObject *) self, value); self->is_running = 0; if (retval) { __Pyx_ExceptionSwap(&self->exc_type, &self->exc_value, &self->exc_traceback); #if CYTHON_COMPILING_IN_PYPY #else /* Don't keep the reference to f_back any longer than necessary. It * may keep a chain of frames alive or it could create a reference * cycle. */ if (self->exc_traceback) { PyTracebackObject *tb = (PyTracebackObject *) self->exc_traceback; PyFrameObject *f = tb->tb_frame; Py_CLEAR(f->f_back); } #endif } else { __Pyx_Generator_ExceptionClear(self); } return retval; } static CYTHON_INLINE PyObject *__Pyx_Generator_FinishDelegation(__pyx_GeneratorObject *gen) { PyObject *ret; PyObject *val = NULL; __Pyx_Generator_Undelegate(gen); __Pyx_PyGen_FetchStopIterationValue(&val); ret = __Pyx_Generator_SendEx(gen, val); Py_XDECREF(val); return ret; } static PyObject *__Pyx_Generator_Next(PyObject *self) { __pyx_GeneratorObject *gen = (__pyx_GeneratorObject*) self; PyObject *yf = gen->yieldfrom; if (unlikely(__Pyx_Generator_CheckRunning(gen))) return NULL; if (yf) { PyObject *ret; gen->is_running = 1; ret = Py_TYPE(yf)->tp_iternext(yf); gen->is_running = 0; if (likely(ret)) { return ret; } return __Pyx_Generator_FinishDelegation(gen); } return __Pyx_Generator_SendEx(gen, Py_None); } static PyObject *__Pyx_Generator_Send(PyObject *self, PyObject *value) { __pyx_GeneratorObject *gen = (__pyx_GeneratorObject*) self; PyObject *yf = gen->yieldfrom; if (unlikely(__Pyx_Generator_CheckRunning(gen))) return NULL; if (yf) { PyObject *ret; gen->is_running = 1; if (__Pyx_Generator_CheckExact(yf)) { ret = __Pyx_Generator_Send(yf, value); } else { if (value == Py_None) ret = PyIter_Next(yf); else ret = __Pyx_PyObject_CallMethod1(yf, __pyx_n_s__send, value); } gen->is_running = 0; if (likely(ret)) { return ret; } return __Pyx_Generator_FinishDelegation(gen); } return __Pyx_Generator_SendEx(gen, value); } static int __Pyx_Generator_CloseIter(__pyx_GeneratorObject *gen, PyObject *yf) { PyObject *retval = NULL; int err = 0; if (__Pyx_Generator_CheckExact(yf)) { retval = __Pyx_Generator_Close(yf); if (!retval) return -1; } else { PyObject *meth; gen->is_running = 1; meth = PyObject_GetAttr(yf, __pyx_n_s__close); if (unlikely(!meth)) { if (!PyErr_ExceptionMatches(PyExc_AttributeError)) { PyErr_WriteUnraisable(yf); } PyErr_Clear(); } else { retval = PyObject_CallFunction(meth, NULL); Py_DECREF(meth); if (!retval) err = -1; } gen->is_running = 0; } Py_XDECREF(retval); return err; } static PyObject *__Pyx_Generator_Close(PyObject *self) { __pyx_GeneratorObject *gen = (__pyx_GeneratorObject *) self; PyObject *retval, *raised_exception; PyObject *yf = gen->yieldfrom; int err = 0; if (unlikely(__Pyx_Generator_CheckRunning(gen))) return NULL; if (yf) { Py_INCREF(yf); err = __Pyx_Generator_CloseIter(gen, yf); __Pyx_Generator_Undelegate(gen); Py_DECREF(yf); } if (err == 0) #if PY_VERSION_HEX < 0x02050000 PyErr_SetNone(PyExc_StopIteration); #else PyErr_SetNone(PyExc_GeneratorExit); #endif retval = __Pyx_Generator_SendEx(gen, NULL); if (retval) { Py_DECREF(retval); PyErr_SetString(PyExc_RuntimeError, "generator ignored GeneratorExit"); return NULL; } raised_exception = PyErr_Occurred(); if (!raised_exception || raised_exception == PyExc_StopIteration #if PY_VERSION_HEX >= 0x02050000 || raised_exception == PyExc_GeneratorExit || PyErr_GivenExceptionMatches(raised_exception, PyExc_GeneratorExit) #endif || PyErr_GivenExceptionMatches(raised_exception, PyExc_StopIteration)) { if (raised_exception) PyErr_Clear(); /* ignore these errors */ Py_INCREF(Py_None); return Py_None; } return NULL; } static PyObject *__Pyx_Generator_Throw(PyObject *self, PyObject *args) { __pyx_GeneratorObject *gen = (__pyx_GeneratorObject *) self; PyObject *typ; PyObject *tb = NULL; PyObject *val = NULL; PyObject *yf = gen->yieldfrom; if (!PyArg_UnpackTuple(args, (char *)"throw", 1, 3, &typ, &val, &tb)) return NULL; if (unlikely(__Pyx_Generator_CheckRunning(gen))) return NULL; if (yf) { PyObject *ret; Py_INCREF(yf); #if PY_VERSION_HEX >= 0x02050000 if (PyErr_GivenExceptionMatches(typ, PyExc_GeneratorExit)) { int err = __Pyx_Generator_CloseIter(gen, yf); Py_DECREF(yf); __Pyx_Generator_Undelegate(gen); if (err < 0) return __Pyx_Generator_SendEx(gen, NULL); goto throw_here; } #endif gen->is_running = 1; if (__Pyx_Generator_CheckExact(yf)) { ret = __Pyx_Generator_Throw(yf, args); } else { PyObject *meth = PyObject_GetAttr(yf, __pyx_n_s__throw); if (unlikely(!meth)) { Py_DECREF(yf); if (!PyErr_ExceptionMatches(PyExc_AttributeError)) { gen->is_running = 0; return NULL; } PyErr_Clear(); __Pyx_Generator_Undelegate(gen); gen->is_running = 0; goto throw_here; } ret = PyObject_CallObject(meth, args); Py_DECREF(meth); } gen->is_running = 0; Py_DECREF(yf); if (!ret) { ret = __Pyx_Generator_FinishDelegation(gen); } return ret; } throw_here: __Pyx_Raise(typ, val, tb, NULL); return __Pyx_Generator_SendEx(gen, NULL); } static int __Pyx_Generator_traverse(PyObject *self, visitproc visit, void *arg) { __pyx_GeneratorObject *gen = (__pyx_GeneratorObject *) self; Py_VISIT(gen->closure); Py_VISIT(gen->classobj); Py_VISIT(gen->yieldfrom); Py_VISIT(gen->exc_type); Py_VISIT(gen->exc_value); Py_VISIT(gen->exc_traceback); return 0; } static int __Pyx_Generator_clear(PyObject *self) { __pyx_GeneratorObject *gen = (__pyx_GeneratorObject *) self; Py_CLEAR(gen->closure); Py_CLEAR(gen->classobj); Py_CLEAR(gen->yieldfrom); Py_CLEAR(gen->exc_type); Py_CLEAR(gen->exc_value); Py_CLEAR(gen->exc_traceback); return 0; } static void __Pyx_Generator_dealloc(PyObject *self) { __pyx_GeneratorObject *gen = (__pyx_GeneratorObject *) self; PyObject_GC_UnTrack(gen); if (gen->gi_weakreflist != NULL) PyObject_ClearWeakRefs(self); PyObject_GC_Track(self); if (gen->resume_label > 0) { Py_TYPE(gen)->tp_del(self); if (self->ob_refcnt > 0) return; /* resurrected. :( */ } PyObject_GC_UnTrack(self); __Pyx_Generator_clear(self); PyObject_GC_Del(gen); } static void __Pyx_Generator_del(PyObject *self) { PyObject *res; PyObject *error_type, *error_value, *error_traceback; __pyx_GeneratorObject *gen = (__pyx_GeneratorObject *) self; if (gen->resume_label <= 0) return ; assert(self->ob_refcnt == 0); self->ob_refcnt = 1; __Pyx_ErrFetch(&error_type, &error_value, &error_traceback); res = __Pyx_Generator_Close(self); if (res == NULL) PyErr_WriteUnraisable(self); else Py_DECREF(res); __Pyx_ErrRestore(error_type, error_value, error_traceback); /* Undo the temporary resurrection; can't use DECREF here, it would * cause a recursive call. */ assert(self->ob_refcnt > 0); if (--self->ob_refcnt == 0) return; /* this is the normal path out */ /* close() resurrected it! Make it look like the original Py_DECREF * never happened. */ { Py_ssize_t refcnt = self->ob_refcnt; _Py_NewReference(self); self->ob_refcnt = refcnt; } #if CYTHON_COMPILING_IN_CPYTHON assert(PyType_IS_GC(self->ob_type) && _Py_AS_GC(self)->gc.gc_refs != _PyGC_REFS_UNTRACKED); /* If Py_REF_DEBUG, _Py_NewReference bumped _Py_RefTotal, so * we need to undo that. */ _Py_DEC_REFTOTAL; #endif /* If Py_TRACE_REFS, _Py_NewReference re-added self to the object * chain, so no more to do there. * If COUNT_ALLOCS, the original decref bumped tp_frees, and * _Py_NewReference bumped tp_allocs: both of those need to be * undone. */ #ifdef COUNT_ALLOCS --Py_TYPE(self)->tp_frees; --Py_TYPE(self)->tp_allocs; #endif } static PyMemberDef __pyx_Generator_memberlist[] = { {(char *) "gi_running", #if PY_VERSION_HEX >= 0x02060000 T_BOOL, #else T_BYTE, #endif offsetof(__pyx_GeneratorObject, is_running), READONLY, NULL}, {0, 0, 0, 0, 0} }; static PyMethodDef __pyx_Generator_methods[] = { {__Pyx_NAMESTR("send"), (PyCFunction) __Pyx_Generator_Send, METH_O, 0}, {__Pyx_NAMESTR("throw"), (PyCFunction) __Pyx_Generator_Throw, METH_VARARGS, 0}, {__Pyx_NAMESTR("close"), (PyCFunction) __Pyx_Generator_Close, METH_NOARGS, 0}, {0, 0, 0, 0} }; static PyTypeObject __pyx_GeneratorType_type = { PyVarObject_HEAD_INIT(0, 0) __Pyx_NAMESTR("generator"), /*tp_name*/ sizeof(__pyx_GeneratorObject), /*tp_basicsize*/ 0, /*tp_itemsize*/ (destructor) __Pyx_Generator_dealloc,/*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #else 0, /*reserved*/ #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_GC, /* tp_flags*/ 0, /*tp_doc*/ (traverseproc) __Pyx_Generator_traverse, /*tp_traverse*/ 0, /*tp_clear*/ 0, /*tp_richcompare*/ offsetof(__pyx_GeneratorObject, gi_weakreflist), /* tp_weaklistoffse */ 0, /*tp_iter*/ (iternextfunc) __Pyx_Generator_Next, /*tp_iternext*/ __pyx_Generator_methods, /*tp_methods*/ __pyx_Generator_memberlist, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ 0, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ __Pyx_Generator_del, /*tp_del*/ #if PY_VERSION_HEX >= 0x02060000 0, /*tp_version_tag*/ #endif #if PY_VERSION_HEX >= 0x030400a1 && defined(Py_TPFLAGS_HAVE_FINALIZE) 0, /*tp_finalize*/ #endif }; static __pyx_GeneratorObject *__Pyx_Generator_New(__pyx_generator_body_t body, PyObject *closure) { __pyx_GeneratorObject *gen = PyObject_GC_New(__pyx_GeneratorObject, &__pyx_GeneratorType_type); if (gen == NULL) return NULL; gen->body = body; gen->closure = closure; Py_XINCREF(closure); gen->is_running = 0; gen->resume_label = 0; gen->classobj = NULL; gen->yieldfrom = NULL; gen->exc_type = NULL; gen->exc_value = NULL; gen->exc_traceback = NULL; gen->gi_weakreflist = NULL; PyObject_GC_Track(gen); return gen; } static int __pyx_Generator_init(void) { __pyx_GeneratorType_type.tp_getattro = PyObject_GenericGetAttr; __pyx_GeneratorType_type.tp_iter = PyObject_SelfIter; if (PyType_Ready(&__pyx_GeneratorType_type)) { return -1; } __pyx_GeneratorType = &__pyx_GeneratorType_type; return 0; } 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); #if PY_VERSION_HEX < 0x02050000 return PyErr_Warn(NULL, message); #else return PyErr_WarnEx(NULL, message, 1); #endif } return 0; } static int __Pyx_ExportFunction(const char *name, void (*f)(void), const char *sig) { PyObject *d = 0; PyObject *cobj = 0; union { void (*fp)(void); void *p; } tmp; d = PyObject_GetAttrString(__pyx_m, (char *)"__pyx_capi__"); if (!d) { PyErr_Clear(); d = PyDict_New(); if (!d) goto bad; Py_INCREF(d); if (PyModule_AddObject(__pyx_m, (char *)"__pyx_capi__", d) < 0) goto bad; } tmp.fp = f; #if PY_VERSION_HEX >= 0x02070000 && !(PY_MAJOR_VERSION==3&&PY_MINOR_VERSION==0) cobj = PyCapsule_New(tmp.p, sig, 0); #else cobj = PyCObject_FromVoidPtrAndDesc(tmp.p, (void *)sig, 0); #endif if (!cobj) goto bad; if (PyDict_SetItemString(d, name, cobj) < 0) goto bad; Py_DECREF(cobj); Py_DECREF(d); return 0; bad: Py_XDECREF(cobj); Py_XDECREF(d); return -1; } #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 #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, "%s.%s 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", module_name, class_name); #if PY_VERSION_HEX < 0x02050000 if (PyErr_Warn(NULL, warning) < 0) goto bad; #else if (PyErr_WarnEx(NULL, warning, 0) < 0) goto bad; #endif } else if ((size_t)basicsize != size) { PyErr_Format(PyExc_ValueError, "%s.%s has the wrong size, try recompiling", module_name, class_name); goto bad; } return (PyTypeObject *)result; bad: Py_XDECREF(py_module); Py_XDECREF(result); return NULL; } #endif 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) / 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, 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); } #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, /*int argcount,*/ 0, /*int kwonlyargcount,*/ 0, /*int nlocals,*/ 0, /*int stacksize,*/ 0, /*int flags,*/ __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, /*int firstlineno,*/ __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; PyObject *py_globals = 0; PyFrameObject *py_frame = 0; py_code = __pyx_find_code_object(c_line ? c_line : py_line); if (!py_code) { py_code = __Pyx_CreateCodeObjectForTraceback( funcname, c_line, py_line, filename); if (!py_code) goto bad; __pyx_insert_code_object(c_line ? c_line : py_line, py_code); } py_globals = PyModule_GetDict(__pyx_m); if (!py_globals) goto bad; py_frame = PyFrame_New( PyThreadState_GET(), /*PyThreadState *tstate,*/ py_code, /*PyCodeObject *code,*/ py_globals, /*PyObject *globals,*/ 0 /*PyObject *locals*/ ); if (!py_frame) goto bad; py_frame->f_lineno = py_line; PyTraceBack_Here(py_frame); bad: Py_XDECREF(py_code); Py_XDECREF(py_frame); } 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 /* Python 3+ has unicode identifiers */ if (t->is_unicode | t->is_str) { if (t->intern) { *t->p = PyUnicode_InternFromString(t->s); } else if (t->encoding) { *t->p = PyUnicode_Decode(t->s, t->n - 1, t->encoding, NULL); } else { *t->p = PyUnicode_FromStringAndSize(t->s, t->n - 1); } } else { *t->p = PyBytes_FromStringAndSize(t->s, t->n - 1); } #endif if (!*t->p) return -1; ++t; } return 0; } static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(char* c_str) { return __Pyx_PyUnicode_FromStringAndSize(c_str, strlen(c_str)); } static CYTHON_INLINE char* __Pyx_PyObject_AsString(PyObject* o) { Py_ssize_t ignore; return __Pyx_PyObject_AsStringAndSize(o, &ignore); } static CYTHON_INLINE char* __Pyx_PyObject_AsStringAndSize(PyObject* o, Py_ssize_t *length) { #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT if ( #if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII __Pyx_sys_getdefaultencoding_not_ascii && #endif PyUnicode_Check(o)) { #if PY_VERSION_HEX < 0x03030000 char* defenc_c; PyObject* defenc = _PyUnicode_AsDefaultEncodedString(o, NULL); if (!defenc) return NULL; defenc_c = PyBytes_AS_STRING(defenc); #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII { char* end = defenc_c + PyBytes_GET_SIZE(defenc); char* c; for (c = defenc_c; c < end; c++) { if ((unsigned char) (*c) >= 128) { PyUnicode_AsASCIIString(o); return NULL; } } } #endif /*__PYX_DEFAULT_STRING_ENCODING_IS_ASCII*/ *length = PyBytes_GET_SIZE(defenc); return defenc_c; #else /* PY_VERSION_HEX < 0x03030000 */ if (PyUnicode_READY(o) == -1) return NULL; #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII if (PyUnicode_IS_ASCII(o)) { *length = PyUnicode_GET_DATA_SIZE(o); return PyUnicode_AsUTF8(o); } else { PyUnicode_AsASCIIString(o); return NULL; } #else /* __PYX_DEFAULT_STRING_ENCODING_IS_ASCII */ return PyUnicode_AsUTF8AndSize(o, length); #endif /* __PYX_DEFAULT_STRING_ENCODING_IS_ASCII */ #endif /* PY_VERSION_HEX < 0x03030000 */ } else #endif /* __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT */ { char* result; int r = PyBytes_AsStringAndSize(o, &result, length); if (r < 0) { return NULL; } else { return result; } } } static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject* x) { int is_true = x == Py_True; if (is_true | (x == Py_False) | (x == Py_None)) return is_true; else return PyObject_IsTrue(x); } static CYTHON_INLINE PyObject* __Pyx_PyNumber_Int(PyObject* x) { PyNumberMethods *m; const char *name = NULL; PyObject *res = NULL; #if PY_MAJOR_VERSION < 3 if (PyInt_Check(x) || PyLong_Check(x)) #else if (PyLong_Check(x)) #endif return Py_INCREF(x), x; m = Py_TYPE(x)->tp_as_number; #if PY_MAJOR_VERSION < 3 if (m && m->nb_int) { name = "int"; res = PyNumber_Int(x); } else if (m && m->nb_long) { name = "long"; res = PyNumber_Long(x); } #else if (m && m->nb_int) { name = "int"; res = PyNumber_Long(x); } #endif if (res) { #if PY_MAJOR_VERSION < 3 if (!PyInt_Check(res) && !PyLong_Check(res)) { #else if (!PyLong_Check(res)) { #endif PyErr_Format(PyExc_TypeError, "__%s__ returned non-%s (type %.200s)", name, name, Py_TYPE(res)->tp_name); Py_DECREF(res); return NULL; } } else if (!PyErr_Occurred()) { PyErr_SetString(PyExc_TypeError, "an integer is required"); } return res; } static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) { Py_ssize_t ival; PyObject* x = 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) { #if PY_VERSION_HEX < 0x02050000 if (ival <= LONG_MAX) return PyInt_FromLong((long)ival); else { unsigned char *bytes = (unsigned char *) &ival; int one = 1; int little = (int)*(unsigned char*)&one; return _PyLong_FromByteArray(bytes, sizeof(size_t), little, 0); } #else return PyInt_FromSize_t(ival); #endif } static CYTHON_INLINE size_t __Pyx_PyInt_AsSize_t(PyObject* x) { unsigned PY_LONG_LONG val = __Pyx_PyInt_AsUnsignedLongLong(x); if (unlikely(val != (unsigned PY_LONG_LONG)(size_t)val)) { if ((val != (unsigned PY_LONG_LONG)-1) || !PyErr_Occurred()) PyErr_SetString(PyExc_OverflowError, "value too large to convert to size_t"); return (size_t)-1; } return (size_t)val; } #endif /* Py_PYTHON_H */ debian/cythonized-files3/pandas/hashtable.c0000664000000000000000000367642212275603610016126 0ustar /* Generated by Cython 0.19.2 on Mon Feb 3 08:42:29 2014 */ #define PY_SSIZE_T_CLEAN #ifndef CYTHON_USE_PYLONG_INTERNALS #ifdef PYLONG_BITS_IN_DIGIT #define CYTHON_USE_PYLONG_INTERNALS 0 #else #include "pyconfig.h" #ifdef PYLONG_BITS_IN_DIGIT #define CYTHON_USE_PYLONG_INTERNALS 1 #else #define CYTHON_USE_PYLONG_INTERNALS 0 #endif #endif #endif #include "Python.h" #ifndef Py_PYTHON_H #error Python headers needed to compile C extensions, please install development version of Python. #elif PY_VERSION_HEX < 0x02040000 #error Cython requires Python 2.4+. #else #include /* For offsetof */ #ifndef offsetof #define offsetof(type, member) ( (size_t) & ((type*)0) -> member ) #endif #if !defined(WIN32) && !defined(MS_WINDOWS) #ifndef __stdcall #define __stdcall #endif #ifndef __cdecl #define __cdecl #endif #ifndef __fastcall #define __fastcall #endif #endif #ifndef DL_IMPORT #define DL_IMPORT(t) t #endif #ifndef DL_EXPORT #define DL_EXPORT(t) t #endif #ifndef PY_LONG_LONG #define PY_LONG_LONG LONG_LONG #endif #ifndef Py_HUGE_VAL #define Py_HUGE_VAL HUGE_VAL #endif #ifdef PYPY_VERSION #define CYTHON_COMPILING_IN_PYPY 1 #define CYTHON_COMPILING_IN_CPYTHON 0 #else #define CYTHON_COMPILING_IN_PYPY 0 #define CYTHON_COMPILING_IN_CPYTHON 1 #endif #if PY_VERSION_HEX < 0x02050000 typedef int Py_ssize_t; #define PY_SSIZE_T_MAX INT_MAX #define PY_SSIZE_T_MIN INT_MIN #define PY_FORMAT_SIZE_T "" #define CYTHON_FORMAT_SSIZE_T "" #define PyInt_FromSsize_t(z) PyInt_FromLong(z) #define PyInt_AsSsize_t(o) __Pyx_PyInt_AsInt(o) #define PyNumber_Index(o) ((PyNumber_Check(o) && !PyFloat_Check(o)) ? PyNumber_Int(o) : \ (PyErr_Format(PyExc_TypeError, \ "expected index value, got %.200s", Py_TYPE(o)->tp_name), \ (PyObject*)0)) #define __Pyx_PyIndex_Check(o) (PyNumber_Check(o) && !PyFloat_Check(o) && \ !PyComplex_Check(o)) #define PyIndex_Check __Pyx_PyIndex_Check #define PyErr_WarnEx(category, message, stacklevel) PyErr_Warn(category, message) #define __PYX_BUILD_PY_SSIZE_T "i" #else #define __PYX_BUILD_PY_SSIZE_T "n" #define CYTHON_FORMAT_SSIZE_T "z" #define __Pyx_PyIndex_Check PyIndex_Check #endif #if PY_VERSION_HEX < 0x02060000 #define Py_REFCNT(ob) (((PyObject*)(ob))->ob_refcnt) #define Py_TYPE(ob) (((PyObject*)(ob))->ob_type) #define Py_SIZE(ob) (((PyVarObject*)(ob))->ob_size) #define PyVarObject_HEAD_INIT(type, size) \ PyObject_HEAD_INIT(type) size, #define PyType_Modified(t) typedef struct { void *buf; PyObject *obj; Py_ssize_t len; Py_ssize_t itemsize; int readonly; int ndim; char *format; Py_ssize_t *shape; Py_ssize_t *strides; Py_ssize_t *suboffsets; void *internal; } Py_buffer; #define PyBUF_SIMPLE 0 #define PyBUF_WRITABLE 0x0001 #define PyBUF_FORMAT 0x0004 #define PyBUF_ND 0x0008 #define PyBUF_STRIDES (0x0010 | PyBUF_ND) #define PyBUF_C_CONTIGUOUS (0x0020 | PyBUF_STRIDES) #define PyBUF_F_CONTIGUOUS (0x0040 | PyBUF_STRIDES) #define PyBUF_ANY_CONTIGUOUS (0x0080 | PyBUF_STRIDES) #define PyBUF_INDIRECT (0x0100 | PyBUF_STRIDES) #define PyBUF_RECORDS (PyBUF_STRIDES | PyBUF_FORMAT | PyBUF_WRITABLE) #define PyBUF_FULL (PyBUF_INDIRECT | PyBUF_FORMAT | PyBUF_WRITABLE) typedef int (*getbufferproc)(PyObject *, Py_buffer *, int); typedef void (*releasebufferproc)(PyObject *, Py_buffer *); #endif #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, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) #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) #endif #if PY_MAJOR_VERSION < 3 && PY_MINOR_VERSION < 6 #define PyUnicode_FromString(s) PyUnicode_Decode(s, strlen(s), "UTF-8", "strict") #endif #if PY_MAJOR_VERSION >= 3 #define Py_TPFLAGS_CHECKTYPES 0 #define Py_TPFLAGS_HAVE_INDEX 0 #endif #if (PY_VERSION_HEX < 0x02060000) || (PY_MAJOR_VERSION >= 3) #define Py_TPFLAGS_HAVE_NEWBUFFER 0 #endif #if PY_VERSION_HEX < 0x02060000 #define Py_TPFLAGS_HAVE_VERSION_TAG 0 #endif #if PY_VERSION_HEX > 0x03030000 && defined(PyUnicode_KIND) #define CYTHON_PEP393_ENABLED 1 #define __Pyx_PyUnicode_READY(op) (likely(PyUnicode_IS_READY(op)) ? \ 0 : _PyUnicode_Ready((PyObject *)(op))) #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_LENGTH(u) #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i) #define __Pyx_PyUnicode_READ(k, d, i) PyUnicode_READ(k, d, i) #else #define CYTHON_PEP393_ENABLED 0 #define __Pyx_PyUnicode_READY(op) (0) #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_SIZE(u) #define __Pyx_PyUnicode_READ_CHAR(u, i) ((Py_UCS4)(PyUnicode_AS_UNICODE(u)[i])) #define __Pyx_PyUnicode_READ(k, d, i) ((k=k), (Py_UCS4)(((Py_UNICODE*)d)[i])) #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_VERSION_HEX < 0x02060000 #define PyBytesObject PyStringObject #define PyBytes_Type PyString_Type #define PyBytes_Check PyString_Check #define PyBytes_CheckExact PyString_CheckExact #define PyBytes_FromString PyString_FromString #define PyBytes_FromStringAndSize PyString_FromStringAndSize #define PyBytes_FromFormat PyString_FromFormat #define PyBytes_DecodeEscape PyString_DecodeEscape #define PyBytes_AsString PyString_AsString #define PyBytes_AsStringAndSize PyString_AsStringAndSize #define PyBytes_Size PyString_Size #define PyBytes_AS_STRING PyString_AS_STRING #define PyBytes_GET_SIZE PyString_GET_SIZE #define PyBytes_Repr PyString_Repr #define PyBytes_Concat PyString_Concat #define PyBytes_ConcatAndDel PyString_ConcatAndDel #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_CheckExact(obj) || PyUnicode_CheckExact(obj) || \ PyString_Check(obj) || PyUnicode_Check(obj)) #define __Pyx_PyBaseString_CheckExact(obj) (Py_TYPE(obj) == &PyBaseString_Type) #endif #if PY_VERSION_HEX < 0x02060000 #define PySet_Check(obj) PyObject_TypeCheck(obj, &PySet_Type) #define PyFrozenSet_Check(obj) PyObject_TypeCheck(obj, &PyFrozenSet_Type) #endif #ifndef PySet_CheckExact #define PySet_CheckExact(obj) (Py_TYPE(obj) == &PySet_Type) #endif #define __Pyx_TypeCheck(obj, type) PyObject_TypeCheck(obj, (PyTypeObject *)type) #if PY_MAJOR_VERSION >= 3 #define PyIntObject PyLongObject #define PyInt_Type PyLong_Type #define PyInt_Check(op) PyLong_Check(op) #define PyInt_CheckExact(op) PyLong_CheckExact(op) #define PyInt_FromString PyLong_FromString #define PyInt_FromUnicode PyLong_FromUnicode #define PyInt_FromLong PyLong_FromLong #define PyInt_FromSize_t PyLong_FromSize_t #define PyInt_FromSsize_t PyLong_FromSsize_t #define PyInt_AsLong PyLong_AsLong #define PyInt_AS_LONG PyLong_AS_LONG #define PyInt_AsSsize_t PyLong_AsSsize_t #define PyInt_AsUnsignedLongMask PyLong_AsUnsignedLongMask #define PyInt_AsUnsignedLongLongMask PyLong_AsUnsignedLongLongMask #endif #if PY_MAJOR_VERSION >= 3 #define PyBoolObject PyLongObject #endif #if PY_VERSION_HEX < 0x03020000 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) || (PY_VERSION_HEX >= 0x03010300) #define __Pyx_PySequence_GetSlice(obj, a, b) PySequence_GetSlice(obj, a, b) #define __Pyx_PySequence_SetSlice(obj, a, b, value) PySequence_SetSlice(obj, a, b, value) #define __Pyx_PySequence_DelSlice(obj, a, b) PySequence_DelSlice(obj, a, b) #else #define __Pyx_PySequence_GetSlice(obj, a, b) (unlikely(!(obj)) ? \ (PyErr_SetString(PyExc_SystemError, "null argument to internal routine"), (PyObject*)0) : \ (likely((obj)->ob_type->tp_as_mapping) ? (PySequence_GetSlice(obj, a, b)) : \ (PyErr_Format(PyExc_TypeError, "'%.200s' object is unsliceable", (obj)->ob_type->tp_name), (PyObject*)0))) #define __Pyx_PySequence_SetSlice(obj, a, b, value) (unlikely(!(obj)) ? \ (PyErr_SetString(PyExc_SystemError, "null argument to internal routine"), -1) : \ (likely((obj)->ob_type->tp_as_mapping) ? (PySequence_SetSlice(obj, a, b, value)) : \ (PyErr_Format(PyExc_TypeError, "'%.200s' object doesn't support slice assignment", (obj)->ob_type->tp_name), -1))) #define __Pyx_PySequence_DelSlice(obj, a, b) (unlikely(!(obj)) ? \ (PyErr_SetString(PyExc_SystemError, "null argument to internal routine"), -1) : \ (likely((obj)->ob_type->tp_as_mapping) ? (PySequence_DelSlice(obj, a, b)) : \ (PyErr_Format(PyExc_TypeError, "'%.200s' object doesn't support slice deletion", (obj)->ob_type->tp_name), -1))) #endif #if PY_MAJOR_VERSION >= 3 #define PyMethod_New(func, self, klass) ((self) ? PyMethod_New(func, self) : PyInstanceMethod_New(func)) #endif #if PY_VERSION_HEX < 0x02050000 #define __Pyx_GetAttrString(o,n) PyObject_GetAttrString((o),((char *)(n))) #define __Pyx_SetAttrString(o,n,a) PyObject_SetAttrString((o),((char *)(n)),(a)) #define __Pyx_DelAttrString(o,n) PyObject_DelAttrString((o),((char *)(n))) #else #define __Pyx_GetAttrString(o,n) PyObject_GetAttrString((o),(n)) #define __Pyx_SetAttrString(o,n,a) PyObject_SetAttrString((o),(n),(a)) #define __Pyx_DelAttrString(o,n) PyObject_DelAttrString((o),(n)) #endif #if PY_VERSION_HEX < 0x02050000 #define __Pyx_NAMESTR(n) ((char *)(n)) #define __Pyx_DOCSTR(n) ((char *)(n)) #else #define __Pyx_NAMESTR(n) (n) #define __Pyx_DOCSTR(n) (n) #endif #ifndef CYTHON_INLINE #if defined(__GNUC__) #define CYTHON_INLINE __inline__ #elif defined(_MSC_VER) #define CYTHON_INLINE __inline #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L #define CYTHON_INLINE inline #else #define CYTHON_INLINE #endif #endif #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 #ifdef NAN #define __PYX_NAN() ((float) NAN) #else static CYTHON_INLINE float __PYX_NAN() { /* Initialize NaN. The sign is irrelevant, an exponent with all bits 1 and a nonzero mantissa means NaN. If the first bit in the mantissa is 1, it is a quiet NaN. */ float value; memset(&value, 0xFF, sizeof(value)); return value; } #endif #if PY_MAJOR_VERSION >= 3 #define __Pyx_PyNumber_Divide(x,y) PyNumber_TrueDivide(x,y) #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceTrueDivide(x,y) #else #define __Pyx_PyNumber_Divide(x,y) PyNumber_Divide(x,y) #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceDivide(x,y) #endif #ifndef __PYX_EXTERN_C #ifdef __cplusplus #define __PYX_EXTERN_C extern "C" #else #define __PYX_EXTERN_C extern #endif #endif #if defined(WIN32) || defined(MS_WINDOWS) #define _USE_MATH_DEFINES #endif #include #define __PYX_HAVE__pandas__hashtable #define __PYX_HAVE_API__pandas__hashtable #include "string.h" #include "stdio.h" #include "pythread.h" #include "stdlib.h" #include "numpy/arrayobject.h" #include "numpy/ufuncobject.h" #include "khash_python.h" #include "numpy_helper.h" #include "datetime.h" #ifdef _OPENMP #include #endif /* _OPENMP */ #ifdef PYREX_WITHOUT_ASSERTIONS #define CYTHON_WITHOUT_ASSERTIONS #endif #ifndef CYTHON_UNUSED # if defined(__GNUC__) # if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)) # define CYTHON_UNUSED __attribute__ ((__unused__)) # else # define CYTHON_UNUSED # endif # elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER)) # define CYTHON_UNUSED __attribute__ ((__unused__)) # else # define CYTHON_UNUSED # endif #endif typedef struct {PyObject **p; char *s; const Py_ssize_t n; const char* encoding; const char is_unicode; const char is_str; const char intern; } __Pyx_StringTabEntry; /*proto*/ #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 static CYTHON_INLINE char* __Pyx_PyObject_AsString(PyObject*); static CYTHON_INLINE char* __Pyx_PyObject_AsStringAndSize(PyObject*, Py_ssize_t* length); #define __Pyx_PyBytes_FromString PyBytes_FromString #define __Pyx_PyBytes_FromStringAndSize PyBytes_FromStringAndSize static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(char*); #if PY_MAJOR_VERSION < 3 #define __Pyx_PyStr_FromString __Pyx_PyBytes_FromString #define __Pyx_PyStr_FromStringAndSize __Pyx_PyBytes_FromStringAndSize #else #define __Pyx_PyStr_FromString __Pyx_PyUnicode_FromString #define __Pyx_PyStr_FromStringAndSize __Pyx_PyUnicode_FromStringAndSize #endif #define __Pyx_PyObject_AsUString(s) ((unsigned char*) __Pyx_PyObject_AsString(s)) #define __Pyx_PyObject_FromUString(s) __Pyx_PyObject_FromString((char*)s) #define __Pyx_PyBytes_FromUString(s) __Pyx_PyBytes_FromString((char*)s) #define __Pyx_PyStr_FromUString(s) __Pyx_PyStr_FromString((char*)s) #define __Pyx_PyUnicode_FromUString(s) __Pyx_PyUnicode_FromString((char*)s) #if PY_MAJOR_VERSION < 3 static CYTHON_INLINE size_t __Pyx_Py_UNICODE_strlen(const Py_UNICODE *u) { const Py_UNICODE *u_end = u; while (*u_end++) ; return u_end - u - 1; } #else #define __Pyx_Py_UNICODE_strlen Py_UNICODE_strlen #endif #define __Pyx_PyUnicode_FromUnicode(u) PyUnicode_FromUnicode(u, __Pyx_Py_UNICODE_strlen(u)) #define __Pyx_PyUnicode_FromUnicodeAndLength PyUnicode_FromUnicode #define __Pyx_PyUnicode_AsUnicode PyUnicode_AsUnicode #define __Pyx_Owned_Py_None(b) (Py_INCREF(Py_None), Py_None) #define __Pyx_PyBool_FromLong(b) ((b) ? (Py_INCREF(Py_True), Py_True) : (Py_INCREF(Py_False), Py_False)) static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*); static CYTHON_INLINE PyObject* __Pyx_PyNumber_Int(PyObject* x); static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*); static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t); static CYTHON_INLINE size_t __Pyx_PyInt_AsSize_t(PyObject*); #if CYTHON_COMPILING_IN_CPYTHON #define __pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x)) #else #define __pyx_PyFloat_AsDouble(x) PyFloat_AsDouble(x) #endif #define __pyx_PyFloat_AsFloat(x) ((float) __pyx_PyFloat_AsDouble(x)) #if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII static int __Pyx_sys_getdefaultencoding_not_ascii; static int __Pyx_init_sys_getdefaultencoding_params() { PyObject* sys = NULL; PyObject* default_encoding = NULL; PyObject* ascii_chars_u = NULL; PyObject* ascii_chars_b = NULL; sys = PyImport_ImportModule("sys"); if (sys == NULL) goto bad; default_encoding = PyObject_CallMethod(sys, (char*) (const char*) "getdefaultencoding", NULL); if (default_encoding == NULL) goto bad; if (strcmp(PyBytes_AsString(default_encoding), "ascii") == 0) { __Pyx_sys_getdefaultencoding_not_ascii = 0; } else { const char* default_encoding_c = PyBytes_AS_STRING(default_encoding); 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 == NULL) goto bad; ascii_chars_b = PyUnicode_AsEncodedString(ascii_chars_u, default_encoding_c, NULL); if (ascii_chars_b == NULL || strncmp(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 '%s' is not a superset of ascii.", default_encoding_c); goto bad; } } Py_XDECREF(sys); Py_XDECREF(default_encoding); Py_XDECREF(ascii_chars_u); Py_XDECREF(ascii_chars_b); return 0; bad: Py_XDECREF(sys); 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() { PyObject* sys = NULL; PyObject* default_encoding = NULL; char* default_encoding_c; sys = PyImport_ImportModule("sys"); if (sys == NULL) goto bad; default_encoding = PyObject_CallMethod(sys, (char*) (const char*) "getdefaultencoding", NULL); if (default_encoding == NULL) goto bad; default_encoding_c = PyBytes_AS_STRING(default_encoding); __PYX_DEFAULT_STRING_ENCODING = (char*) malloc(strlen(default_encoding_c)); strcpy(__PYX_DEFAULT_STRING_ENCODING, default_encoding_c); Py_DECREF(sys); Py_DECREF(default_encoding); return 0; bad: Py_XDECREF(sys); Py_XDECREF(default_encoding); return -1; } #endif #endif #ifdef __GNUC__ /* Test for GCC > 2.95 */ #if __GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95)) #define likely(x) __builtin_expect(!!(x), 1) #define unlikely(x) __builtin_expect(!!(x), 0) #else /* __GNUC__ > 2 ... */ #define likely(x) (x) #define unlikely(x) (x) #endif /* __GNUC__ > 2 ... */ #else /* __GNUC__ */ #define likely(x) (x) #define unlikely(x) (x) #endif /* __GNUC__ */ static PyObject *__pyx_m; static PyObject *__pyx_d; static PyObject *__pyx_b; static PyObject *__pyx_empty_tuple; static PyObject *__pyx_empty_bytes; static int __pyx_lineno; static int __pyx_clineno = 0; static const char * __pyx_cfilenm= __FILE__; static const char *__pyx_filename; #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[] = { "hashtable.pyx", "util.pxd", "numpy.pxd", "type.pxd", "bool.pxd", "complex.pxd", }; #define IS_UNSIGNED(type) (((type) -1) > 0) struct __Pyx_StructField_; #define __PYX_BUF_FLAGS_PACKED_STRUCT (1 << 0) typedef struct { const char* name; /* for error messages only */ struct __Pyx_StructField_* fields; size_t size; /* sizeof(type) */ size_t arraysize[8]; /* length of array in each dimension */ int ndim; char typegroup; /* _R_eal, _C_omplex, Signed _I_nt, _U_nsigned int, _S_truct, _P_ointer, _O_bject, c_H_ar */ 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; /* "numpy.pxd":726 * # 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; /* "numpy.pxd":727 * * 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; /* "numpy.pxd":728 * 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; /* "numpy.pxd":729 * 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; /* "numpy.pxd":733 * #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; /* "numpy.pxd":734 * * 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; /* "numpy.pxd":735 * 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; /* "numpy.pxd":736 * 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; /* "numpy.pxd":740 * #ctypedef npy_uint128 uint128_t * * ctypedef npy_float16 float16_t # <<<<<<<<<<<<<< * ctypedef npy_float32 float32_t * ctypedef npy_float64 float64_t */ typedef npy_float16 __pyx_t_5numpy_float16_t; /* "numpy.pxd":741 * * ctypedef npy_float16 float16_t * ctypedef npy_float32 float32_t # <<<<<<<<<<<<<< * ctypedef npy_float64 float64_t * #ctypedef npy_float80 float80_t */ typedef npy_float32 __pyx_t_5numpy_float32_t; /* "numpy.pxd":742 * ctypedef npy_float16 float16_t * 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; /* "numpy.pxd":751 * # 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; /* "numpy.pxd":752 * # 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; /* "numpy.pxd":753 * 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; /* "numpy.pxd":755 * 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; /* "numpy.pxd":756 * * ctypedef npy_ulong uint_t * ctypedef npy_ulonglong ulong_t # <<<<<<<<<<<<<< * ctypedef npy_ulonglong ulonglong_t * */ typedef npy_ulonglong __pyx_t_5numpy_ulong_t; /* "numpy.pxd":757 * 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; /* "numpy.pxd":759 * ctypedef npy_ulonglong ulonglong_t * * ctypedef npy_intp intp_t # <<<<<<<<<<<<<< * ctypedef npy_uintp uintp_t * */ typedef npy_intp __pyx_t_5numpy_intp_t; /* "numpy.pxd":760 * * ctypedef npy_intp intp_t * ctypedef npy_uintp uintp_t # <<<<<<<<<<<<<< * * ctypedef npy_double float_t */ typedef npy_uintp __pyx_t_5numpy_uintp_t; /* "numpy.pxd":762 * 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; /* "numpy.pxd":763 * * ctypedef npy_double float_t * ctypedef npy_double double_t # <<<<<<<<<<<<<< * ctypedef npy_longdouble longdouble_t * */ typedef npy_double __pyx_t_5numpy_double_t; /* "numpy.pxd":764 * 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; #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 #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 /*--- Type declarations ---*/ struct __pyx_obj_6pandas_9hashtable_Factorizer; struct __pyx_obj_6pandas_9hashtable_HashTable; struct __pyx_obj_6pandas_9hashtable_Float64HashTable; struct __pyx_obj_6pandas_9hashtable_Int64Vector; struct __pyx_obj_6pandas_9hashtable_Int64HashTable; struct __pyx_obj_6pandas_9hashtable_Int32HashTable; struct __pyx_obj_6pandas_9hashtable_Int64Factorizer; struct __pyx_obj_6pandas_9hashtable_Float64Vector; struct __pyx_obj_6pandas_9hashtable_StringHashTable; struct __pyx_obj_6pandas_9hashtable_PyObjectHashTable; struct __pyx_obj_6pandas_9hashtable_ObjectVector; /* "numpy.pxd":766 * 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; /* "numpy.pxd":767 * * ctypedef npy_cfloat cfloat_t * ctypedef npy_cdouble cdouble_t # <<<<<<<<<<<<<< * ctypedef npy_clongdouble clongdouble_t * */ typedef npy_cdouble __pyx_t_5numpy_cdouble_t; /* "numpy.pxd":768 * 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; /* "numpy.pxd":770 * 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/hashtable.pyx":824 * * * cdef class Factorizer: # <<<<<<<<<<<<<< * cdef public PyObjectHashTable table * cdef public ObjectVector uniques */ struct __pyx_obj_6pandas_9hashtable_Factorizer { PyObject_HEAD struct __pyx_obj_6pandas_9hashtable_PyObjectHashTable *table; struct __pyx_obj_6pandas_9hashtable_ObjectVector *uniques; Py_ssize_t count; }; /* "pandas/hashtable.pxd":5 * # prototypes for sharing * * cdef class HashTable: # <<<<<<<<<<<<<< * pass * */ struct __pyx_obj_6pandas_9hashtable_HashTable { PyObject_HEAD }; /* "pandas/hashtable.pxd":15 * * * cdef class Float64HashTable(HashTable): # <<<<<<<<<<<<<< * cdef kh_float64_t *table * */ struct __pyx_obj_6pandas_9hashtable_Float64HashTable { struct __pyx_obj_6pandas_9hashtable_HashTable __pyx_base; kh_float64_t *table; }; /* "pandas/hashtable.pyx":82 * * * cdef class Int64Vector: # <<<<<<<<<<<<<< * * cdef: */ struct __pyx_obj_6pandas_9hashtable_Int64Vector { PyObject_HEAD struct __pyx_vtabstruct_6pandas_9hashtable_Int64Vector *__pyx_vtab; size_t n; size_t m; PyArrayObject *ao; __pyx_t_5numpy_int64_t *data; }; /* "pandas/hashtable.pxd":8 * pass * * cdef class Int64HashTable(HashTable): # <<<<<<<<<<<<<< * cdef kh_int64_t *table * */ struct __pyx_obj_6pandas_9hashtable_Int64HashTable { struct __pyx_obj_6pandas_9hashtable_HashTable __pyx_base; struct __pyx_vtabstruct_6pandas_9hashtable_Int64HashTable *__pyx_vtab; kh_int64_t *table; }; /* "pandas/hashtable.pyx":264 * return reverse, labels * * cdef class Int32HashTable(HashTable): # <<<<<<<<<<<<<< * cdef kh_int32_t *table * */ struct __pyx_obj_6pandas_9hashtable_Int32HashTable { struct __pyx_obj_6pandas_9hashtable_HashTable __pyx_base; struct __pyx_vtabstruct_6pandas_9hashtable_Int32HashTable *__pyx_vtab; kh_int32_t *table; }; /* "pandas/hashtable.pyx":860 * * * cdef class Int64Factorizer: # <<<<<<<<<<<<<< * cdef public Int64HashTable table * cdef public Int64Vector uniques */ struct __pyx_obj_6pandas_9hashtable_Int64Factorizer { PyObject_HEAD struct __pyx_obj_6pandas_9hashtable_Int64HashTable *table; struct __pyx_obj_6pandas_9hashtable_Int64Vector *uniques; Py_ssize_t count; }; /* "pandas/hashtable.pyx":111 * self.n += 1 * * cdef class Float64Vector: # <<<<<<<<<<<<<< * * cdef: */ struct __pyx_obj_6pandas_9hashtable_Float64Vector { PyObject_HEAD struct __pyx_vtabstruct_6pandas_9hashtable_Float64Vector *__pyx_vtab; size_t n; size_t m; PyArrayObject *ao; __pyx_t_5numpy_float64_t *data; }; /* "pandas/hashtable.pyx":145 * * * cdef class StringHashTable(HashTable): # <<<<<<<<<<<<<< * cdef kh_str_t *table * */ struct __pyx_obj_6pandas_9hashtable_StringHashTable { struct __pyx_obj_6pandas_9hashtable_HashTable __pyx_base; struct __pyx_vtabstruct_6pandas_9hashtable_StringHashTable *__pyx_vtab; kh_str_t *table; }; /* "pandas/hashtable.pxd":21 * # cpdef set_item(self, float64_t key, Py_ssize_t val) * * cdef class PyObjectHashTable(HashTable): # <<<<<<<<<<<<<< * cdef kh_pymap_t *table * */ struct __pyx_obj_6pandas_9hashtable_PyObjectHashTable { struct __pyx_obj_6pandas_9hashtable_HashTable __pyx_base; struct __pyx_vtabstruct_6pandas_9hashtable_PyObjectHashTable *__pyx_vtab; kh_pymap_t *table; }; /* "pandas/hashtable.pyx":51 * cdef size_t _INIT_VEC_CAP = 32 * * cdef class ObjectVector: # <<<<<<<<<<<<<< * * cdef: */ struct __pyx_obj_6pandas_9hashtable_ObjectVector { PyObject_HEAD struct __pyx_vtabstruct_6pandas_9hashtable_ObjectVector *__pyx_vtab; size_t n; size_t m; PyArrayObject *ao; PyObject **data; }; /* "pandas/hashtable.pyx":145 * * * cdef class StringHashTable(HashTable): # <<<<<<<<<<<<<< * cdef kh_str_t *table * */ struct __pyx_vtabstruct_6pandas_9hashtable_StringHashTable { int (*check_type)(struct __pyx_obj_6pandas_9hashtable_StringHashTable *, PyObject *); PyObject *(*get_item)(struct __pyx_obj_6pandas_9hashtable_StringHashTable *, PyObject *, int __pyx_skip_dispatch); PyObject *(*set_item)(struct __pyx_obj_6pandas_9hashtable_StringHashTable *, PyObject *, Py_ssize_t, int __pyx_skip_dispatch); }; static struct __pyx_vtabstruct_6pandas_9hashtable_StringHashTable *__pyx_vtabptr_6pandas_9hashtable_StringHashTable; static CYTHON_INLINE int __pyx_f_6pandas_9hashtable_15StringHashTable_check_type(struct __pyx_obj_6pandas_9hashtable_StringHashTable *, PyObject *); /* "pandas/hashtable.pyx":264 * return reverse, labels * * cdef class Int32HashTable(HashTable): # <<<<<<<<<<<<<< * cdef kh_int32_t *table * */ struct __pyx_vtabstruct_6pandas_9hashtable_Int32HashTable { int (*check_type)(struct __pyx_obj_6pandas_9hashtable_Int32HashTable *, PyObject *); PyObject *(*get_item)(struct __pyx_obj_6pandas_9hashtable_Int32HashTable *, __pyx_t_5numpy_int32_t, int __pyx_skip_dispatch); PyObject *(*set_item)(struct __pyx_obj_6pandas_9hashtable_Int32HashTable *, __pyx_t_5numpy_int32_t, Py_ssize_t, int __pyx_skip_dispatch); }; static struct __pyx_vtabstruct_6pandas_9hashtable_Int32HashTable *__pyx_vtabptr_6pandas_9hashtable_Int32HashTable; static CYTHON_INLINE int __pyx_f_6pandas_9hashtable_14Int32HashTable_check_type(struct __pyx_obj_6pandas_9hashtable_Int32HashTable *, PyObject *); /* "pandas/hashtable.pyx":648 * na_sentinel = object * * cdef class PyObjectHashTable(HashTable): # <<<<<<<<<<<<<< * # cdef kh_pymap_t *table * */ struct __pyx_vtabstruct_6pandas_9hashtable_PyObjectHashTable { PyObject *(*get_item)(struct __pyx_obj_6pandas_9hashtable_PyObjectHashTable *, PyObject *, int __pyx_skip_dispatch); PyObject *(*set_item)(struct __pyx_obj_6pandas_9hashtable_PyObjectHashTable *, PyObject *, Py_ssize_t, int __pyx_skip_dispatch); }; static struct __pyx_vtabstruct_6pandas_9hashtable_PyObjectHashTable *__pyx_vtabptr_6pandas_9hashtable_PyObjectHashTable; /* "pandas/hashtable.pyx":111 * self.n += 1 * * cdef class Float64Vector: # <<<<<<<<<<<<<< * * cdef: */ struct __pyx_vtabstruct_6pandas_9hashtable_Float64Vector { PyObject *(*append)(struct __pyx_obj_6pandas_9hashtable_Float64Vector *, __pyx_t_5numpy_float64_t); }; static struct __pyx_vtabstruct_6pandas_9hashtable_Float64Vector *__pyx_vtabptr_6pandas_9hashtable_Float64Vector; static CYTHON_INLINE PyObject *__pyx_f_6pandas_9hashtable_13Float64Vector_append(struct __pyx_obj_6pandas_9hashtable_Float64Vector *, __pyx_t_5numpy_float64_t); /* "pandas/hashtable.pyx":82 * * * cdef class Int64Vector: # <<<<<<<<<<<<<< * * cdef: */ struct __pyx_vtabstruct_6pandas_9hashtable_Int64Vector { PyObject *(*append)(struct __pyx_obj_6pandas_9hashtable_Int64Vector *, __pyx_t_5numpy_int64_t); }; static struct __pyx_vtabstruct_6pandas_9hashtable_Int64Vector *__pyx_vtabptr_6pandas_9hashtable_Int64Vector; static CYTHON_INLINE PyObject *__pyx_f_6pandas_9hashtable_11Int64Vector_append(struct __pyx_obj_6pandas_9hashtable_Int64Vector *, __pyx_t_5numpy_int64_t); /* "pandas/hashtable.pyx":363 * return reverse, labels * * cdef class Int64HashTable: #(HashTable): # <<<<<<<<<<<<<< * # cdef kh_int64_t *table * */ struct __pyx_vtabstruct_6pandas_9hashtable_Int64HashTable { PyObject *(*get_item)(struct __pyx_obj_6pandas_9hashtable_Int64HashTable *, __pyx_t_5numpy_int64_t, int __pyx_skip_dispatch); PyObject *(*set_item)(struct __pyx_obj_6pandas_9hashtable_Int64HashTable *, __pyx_t_5numpy_int64_t, Py_ssize_t, int __pyx_skip_dispatch); }; static struct __pyx_vtabstruct_6pandas_9hashtable_Int64HashTable *__pyx_vtabptr_6pandas_9hashtable_Int64HashTable; /* "pandas/hashtable.pyx":51 * cdef size_t _INIT_VEC_CAP = 32 * * cdef class ObjectVector: # <<<<<<<<<<<<<< * * cdef: */ struct __pyx_vtabstruct_6pandas_9hashtable_ObjectVector { PyObject *(*append)(struct __pyx_obj_6pandas_9hashtable_ObjectVector *, PyObject *); }; static struct __pyx_vtabstruct_6pandas_9hashtable_ObjectVector *__pyx_vtabptr_6pandas_9hashtable_ObjectVector; static CYTHON_INLINE PyObject *__pyx_f_6pandas_9hashtable_12ObjectVector_append(struct __pyx_obj_6pandas_9hashtable_ObjectVector *, PyObject *); #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); /*proto*/ #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 /* CYTHON_REFNANNY */ #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) #if CYTHON_COMPILING_IN_CPYTHON static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name) { PyTypeObject* tp = Py_TYPE(obj); if (likely(tp->tp_getattro)) return tp->tp_getattro(obj, attr_name); #if PY_MAJOR_VERSION < 3 if (likely(tp->tp_getattr)) return tp->tp_getattr(obj, PyString_AS_STRING(attr_name)); #endif return PyObject_GetAttr(obj, attr_name); } #else #define __Pyx_PyObject_GetAttrStr(o,n) PyObject_GetAttr(o,n) #endif static PyObject *__Pyx_GetBuiltinName(PyObject *name); /*proto*/ static int __Pyx_ArgTypeTest(PyObject *obj, PyTypeObject *type, int none_allowed, const char *name, int exact); /*proto*/ static CYTHON_INLINE PyObject *__Pyx_GetModuleGlobalName(PyObject *name); /*proto*/ static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type); /*proto*/ static CYTHON_INLINE int __Pyx_GetBufferAndValidate(Py_buffer* buf, PyObject* obj, __Pyx_TypeInfo* dtype, int flags, int nd, int cast, __Pyx_BufFmt_StackElem* stack); static CYTHON_INLINE void __Pyx_SafeReleaseBuffer(Py_buffer* info); static void __Pyx_RaiseBufferFallbackError(void); /*proto*/ #define __Pyx_GetItemInt(o, i, size, to_py_func, is_list, wraparound, boundscheck) \ (((size) <= sizeof(Py_ssize_t)) ? \ __Pyx_GetItemInt_Fast(o, i, is_list, wraparound, boundscheck) : \ __Pyx_GetItemInt_Generic(o, to_py_func(i))) #define __Pyx_GetItemInt_List(o, i, size, to_py_func, is_list, wraparound, boundscheck) \ (((size) <= sizeof(Py_ssize_t)) ? \ __Pyx_GetItemInt_List_Fast(o, i, wraparound, boundscheck) : \ __Pyx_GetItemInt_Generic(o, to_py_func(i))) static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i, int wraparound, int boundscheck); #define __Pyx_GetItemInt_Tuple(o, i, size, to_py_func, is_list, wraparound, boundscheck) \ (((size) <= sizeof(Py_ssize_t)) ? \ __Pyx_GetItemInt_Tuple_Fast(o, i, wraparound, boundscheck) : \ __Pyx_GetItemInt_Generic(o, to_py_func(i))) static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i, int wraparound, int boundscheck); static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j); static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, int is_list, int wraparound, int boundscheck); static void __Pyx_RaiseBufferIndexError(int axis); /*proto*/ #define __Pyx_BufPtrStrided1d(type, buf, i0, s0) (type)((char*)buf + i0 * s0) static CYTHON_INLINE void __Pyx_ErrRestore(PyObject *type, PyObject *value, PyObject *tb); /*proto*/ static CYTHON_INLINE void __Pyx_ErrFetch(PyObject **type, PyObject **value, PyObject **tb); /*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); /*proto*/ static CYTHON_INLINE int __Pyx_CheckKeywordStrings(PyObject *kwdict, const char* function_name, int kw_allowed); /*proto*/ static void __Pyx_RaiseDoubleKeywordsError(const char* func_name, PyObject* kw_name); /*proto*/ static int __Pyx_ParseOptionalKeywords(PyObject *kwds, PyObject **argnames[], \ PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args, \ const char* function_name); /*proto*/ static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause); /*proto*/ #define __Pyx_SetItemInt(o, i, v, size, to_py_func, is_list, wraparound, boundscheck) \ (((size) <= sizeof(Py_ssize_t)) ? \ __Pyx_SetItemInt_Fast(o, i, v, is_list, wraparound, boundscheck) : \ __Pyx_SetItemInt_Generic(o, to_py_func(i), v)) static CYTHON_INLINE int __Pyx_SetItemInt_Generic(PyObject *o, PyObject *j, PyObject *v); static CYTHON_INLINE int __Pyx_SetItemInt_Fast(PyObject *o, Py_ssize_t i, PyObject *v, int is_list, int wraparound, int boundscheck); static CYTHON_INLINE Py_ssize_t __Pyx_div_Py_ssize_t(Py_ssize_t, Py_ssize_t); /* proto */ static CYTHON_INLINE PyObject* __Pyx_PyObject_GetSlice( PyObject* obj, Py_ssize_t cstart, Py_ssize_t cstop, PyObject** py_start, PyObject** py_stop, PyObject** py_slice, int has_cstart, int has_cstop, int wraparound); static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb); /*proto*/ static void __Pyx_WriteUnraisable(const char *name, int clineno, int lineno, const char *filename); /*proto*/ static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected); static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index); static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void); static CYTHON_INLINE int __Pyx_IterFinish(void); /*proto*/ static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected); /*proto*/ static int __Pyx_SetVtable(PyObject *dict, void *vtable); /*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 static Py_ssize_t __Pyx_zeros[] = {0, 0, 0, 0, 0, 0, 0, 0}; static Py_ssize_t __Pyx_minusones[] = {-1, -1, -1, -1, -1, -1, -1, -1}; static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level); /*proto*/ static CYTHON_INLINE npy_int32 __Pyx_PyInt_from_py_npy_int32(PyObject *); static CYTHON_INLINE npy_int64 __Pyx_PyInt_from_py_npy_int64(PyObject *); static CYTHON_INLINE npy_uint32 __Pyx_PyInt_from_py_npy_uint32(PyObject *); static CYTHON_INLINE PyObject *__Pyx_PyInt_to_py_npy_int32(npy_int32); static CYTHON_INLINE PyObject *__Pyx_PyInt_to_py_npy_int64(npy_int64); static CYTHON_INLINE PyObject *__Pyx_PyInt_to_py_npy_uint32(npy_uint32); static CYTHON_INLINE void __Pyx_ExceptionSave(PyObject **type, PyObject **value, PyObject **tb); /*proto*/ static void __Pyx_ExceptionReset(PyObject *type, PyObject *value, PyObject *tb); /*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(_WIN32) && defined(__cplusplus) && CYTHON_CCOMPLEX #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 static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float, float); #if CYTHON_CCOMPLEX #define __Pyx_c_eqf(a, b) ((a)==(b)) #define __Pyx_c_sumf(a, b) ((a)+(b)) #define __Pyx_c_difff(a, b) ((a)-(b)) #define __Pyx_c_prodf(a, b) ((a)*(b)) #define __Pyx_c_quotf(a, b) ((a)/(b)) #define __Pyx_c_negf(a) (-(a)) #ifdef __cplusplus #define __Pyx_c_is_zerof(z) ((z)==(float)0) #define __Pyx_c_conjf(z) (::std::conj(z)) #if 1 #define __Pyx_c_absf(z) (::std::abs(z)) #define __Pyx_c_powf(a, b) (::std::pow(a, b)) #endif #else #define __Pyx_c_is_zerof(z) ((z)==0) #define __Pyx_c_conjf(z) (conjf(z)) #if 1 #define __Pyx_c_absf(z) (cabsf(z)) #define __Pyx_c_powf(a, b) (cpowf(a, b)) #endif #endif #else static CYTHON_INLINE int __Pyx_c_eqf(__pyx_t_float_complex, __pyx_t_float_complex); static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_sumf(__pyx_t_float_complex, __pyx_t_float_complex); static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_difff(__pyx_t_float_complex, __pyx_t_float_complex); static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_prodf(__pyx_t_float_complex, __pyx_t_float_complex); static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_quotf(__pyx_t_float_complex, __pyx_t_float_complex); static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_negf(__pyx_t_float_complex); static CYTHON_INLINE int __Pyx_c_is_zerof(__pyx_t_float_complex); static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_conjf(__pyx_t_float_complex); #if 1 static CYTHON_INLINE float __Pyx_c_absf(__pyx_t_float_complex); static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_powf(__pyx_t_float_complex, __pyx_t_float_complex); #endif #endif static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double, double); #if CYTHON_CCOMPLEX #define __Pyx_c_eq(a, b) ((a)==(b)) #define __Pyx_c_sum(a, b) ((a)+(b)) #define __Pyx_c_diff(a, b) ((a)-(b)) #define __Pyx_c_prod(a, b) ((a)*(b)) #define __Pyx_c_quot(a, b) ((a)/(b)) #define __Pyx_c_neg(a) (-(a)) #ifdef __cplusplus #define __Pyx_c_is_zero(z) ((z)==(double)0) #define __Pyx_c_conj(z) (::std::conj(z)) #if 1 #define __Pyx_c_abs(z) (::std::abs(z)) #define __Pyx_c_pow(a, b) (::std::pow(a, b)) #endif #else #define __Pyx_c_is_zero(z) ((z)==0) #define __Pyx_c_conj(z) (conj(z)) #if 1 #define __Pyx_c_abs(z) (cabs(z)) #define __Pyx_c_pow(a, b) (cpow(a, b)) #endif #endif #else static CYTHON_INLINE int __Pyx_c_eq(__pyx_t_double_complex, __pyx_t_double_complex); static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_sum(__pyx_t_double_complex, __pyx_t_double_complex); static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_diff(__pyx_t_double_complex, __pyx_t_double_complex); static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_prod(__pyx_t_double_complex, __pyx_t_double_complex); static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_quot(__pyx_t_double_complex, __pyx_t_double_complex); static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_neg(__pyx_t_double_complex); static CYTHON_INLINE int __Pyx_c_is_zero(__pyx_t_double_complex); static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_conj(__pyx_t_double_complex); #if 1 static CYTHON_INLINE double __Pyx_c_abs(__pyx_t_double_complex); static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_pow(__pyx_t_double_complex, __pyx_t_double_complex); #endif #endif static CYTHON_INLINE unsigned char __Pyx_PyInt_AsUnsignedChar(PyObject *); static CYTHON_INLINE unsigned short __Pyx_PyInt_AsUnsignedShort(PyObject *); static CYTHON_INLINE unsigned int __Pyx_PyInt_AsUnsignedInt(PyObject *); static CYTHON_INLINE char __Pyx_PyInt_AsChar(PyObject *); static CYTHON_INLINE short __Pyx_PyInt_AsShort(PyObject *); static CYTHON_INLINE int __Pyx_PyInt_AsInt(PyObject *); static CYTHON_INLINE signed char __Pyx_PyInt_AsSignedChar(PyObject *); static CYTHON_INLINE signed short __Pyx_PyInt_AsSignedShort(PyObject *); static CYTHON_INLINE signed int __Pyx_PyInt_AsSignedInt(PyObject *); static CYTHON_INLINE int __Pyx_PyInt_AsLongDouble(PyObject *); static CYTHON_INLINE unsigned long __Pyx_PyInt_AsUnsignedLong(PyObject *); static CYTHON_INLINE unsigned PY_LONG_LONG __Pyx_PyInt_AsUnsignedLongLong(PyObject *); static CYTHON_INLINE long __Pyx_PyInt_AsLong(PyObject *); static CYTHON_INLINE PY_LONG_LONG __Pyx_PyInt_AsLongLong(PyObject *); static CYTHON_INLINE signed long __Pyx_PyInt_AsSignedLong(PyObject *); static CYTHON_INLINE signed PY_LONG_LONG __Pyx_PyInt_AsSignedLongLong(PyObject *); static int __Pyx_check_binary_version(void); #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 static PyObject *__Pyx_ImportModule(const char *name); /*proto*/ static PyTypeObject *__Pyx_ImportType(const char *module_name, const char *class_name, size_t size, int strict); /*proto*/ typedef struct { int code_line; PyCodeObject* code_object; } __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); static void __Pyx_AddTraceback(const char *funcname, int c_line, int py_line, const char *filename); /*proto*/ static int __Pyx_InitStrings(__Pyx_StringTabEntry *t); /*proto*/ /* Module declarations from 'cpython.version' */ /* Module declarations from 'cpython.ref' */ /* Module declarations from 'cpython.exc' */ /* Module declarations from 'cpython.module' */ /* Module declarations from 'cpython.mem' */ /* Module declarations from 'cpython.tuple' */ /* Module declarations from 'cpython.list' */ /* Module declarations from 'libc.string' */ /* Module declarations from 'libc.stdio' */ /* Module declarations from 'cpython.object' */ /* Module declarations from 'cpython.sequence' */ /* Module declarations from 'cpython.mapping' */ /* Module declarations from 'cpython.iterator' */ /* Module declarations from '__builtin__' */ /* Module declarations from 'cpython.type' */ static PyTypeObject *__pyx_ptype_7cpython_4type_type = 0; /* Module declarations from 'cpython.number' */ /* Module declarations from 'cpython.int' */ /* Module declarations from '__builtin__' */ /* Module declarations from 'cpython.bool' */ static PyTypeObject *__pyx_ptype_7cpython_4bool_bool = 0; /* Module declarations from 'cpython.long' */ /* Module declarations from 'cpython.float' */ /* Module declarations from '__builtin__' */ /* Module declarations from 'cpython.complex' */ static PyTypeObject *__pyx_ptype_7cpython_7complex_complex = 0; /* Module declarations from 'cpython.string' */ /* Module declarations from 'cpython.unicode' */ /* Module declarations from 'cpython.dict' */ /* Module declarations from 'cpython.instance' */ /* Module declarations from 'cpython.function' */ /* Module declarations from 'cpython.method' */ /* Module declarations from 'cpython.weakref' */ /* Module declarations from 'cpython.getargs' */ /* Module declarations from 'cpython.pythread' */ /* Module declarations from 'cpython.pystate' */ /* Module declarations from 'cpython.cobject' */ /* Module declarations from 'cpython.oldbuffer' */ /* Module declarations from 'cpython.set' */ /* Module declarations from 'cpython.buffer' */ /* Module declarations from 'cpython.bytes' */ /* Module declarations from 'cpython.pycapsule' */ /* Module declarations from 'cpython' */ /* Module declarations from 'libc.stdlib' */ /* 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*/ /* Module declarations from 'khash' */ /* Module declarations from 'util' */ static CYTHON_INLINE int __pyx_f_4util__checknan(PyObject *); /*proto*/ /* Module declarations from 'cython' */ /* Module declarations from 'pandas.hashtable' */ static PyTypeObject *__pyx_ptype_6pandas_9hashtable_Factorizer = 0; static PyTypeObject *__pyx_ptype_6pandas_9hashtable_HashTable = 0; static PyTypeObject *__pyx_ptype_6pandas_9hashtable_Float64HashTable = 0; static PyTypeObject *__pyx_ptype_6pandas_9hashtable_Int64Vector = 0; static PyTypeObject *__pyx_ptype_6pandas_9hashtable_Int64HashTable = 0; static PyTypeObject *__pyx_ptype_6pandas_9hashtable_Int32HashTable = 0; static PyTypeObject *__pyx_ptype_6pandas_9hashtable_Int64Factorizer = 0; static PyTypeObject *__pyx_ptype_6pandas_9hashtable_Float64Vector = 0; static PyTypeObject *__pyx_ptype_6pandas_9hashtable_StringHashTable = 0; static PyTypeObject *__pyx_ptype_6pandas_9hashtable_PyObjectHashTable = 0; static PyTypeObject *__pyx_ptype_6pandas_9hashtable_ObjectVector = 0; static __pyx_t_5numpy_int64_t __pyx_v_6pandas_9hashtable_iNaT; static size_t __pyx_v_6pandas_9hashtable__INIT_VEC_CAP; static PyObject *__pyx_f_6pandas_9hashtable_build_count_table_int64(PyArrayObject *, kh_int64_t *); /*proto*/ static PyObject *__pyx_f_6pandas_9hashtable_value_count_int64(PyArrayObject *, int __pyx_skip_dispatch); /*proto*/ static PyObject *__pyx_f_6pandas_9hashtable_build_count_table_object(PyArrayObject *, PyArrayObject *, kh_pymap_t *); /*proto*/ static PyObject *__pyx_f_6pandas_9hashtable_value_count_object(PyArrayObject *, PyArrayObject *, int __pyx_skip_dispatch); /*proto*/ 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_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_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_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_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 }; #define __Pyx_MODULE_NAME "pandas.hashtable" int __pyx_module_is_main_pandas__hashtable = 0; /* Implementation of 'pandas.hashtable' */ static PyObject *__pyx_builtin_object; static PyObject *__pyx_builtin_KeyError; static PyObject *__pyx_builtin_range; static PyObject *__pyx_builtin_IndexError; static PyObject *__pyx_builtin_ValueError; static PyObject *__pyx_builtin_RuntimeError; static PyObject *__pyx_pf_6pandas_9hashtable_list_to_object_array(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */ static int __pyx_pf_6pandas_9hashtable_12ObjectVector___cinit__(struct __pyx_obj_6pandas_9hashtable_ObjectVector *__pyx_v_self); /* proto */ static Py_ssize_t __pyx_pf_6pandas_9hashtable_12ObjectVector_2__len__(struct __pyx_obj_6pandas_9hashtable_ObjectVector *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_9hashtable_12ObjectVector_4to_array(struct __pyx_obj_6pandas_9hashtable_ObjectVector *__pyx_v_self); /* proto */ static int __pyx_pf_6pandas_9hashtable_11Int64Vector___cinit__(struct __pyx_obj_6pandas_9hashtable_Int64Vector *__pyx_v_self); /* proto */ static Py_ssize_t __pyx_pf_6pandas_9hashtable_11Int64Vector_2__len__(struct __pyx_obj_6pandas_9hashtable_Int64Vector *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_9hashtable_11Int64Vector_4to_array(struct __pyx_obj_6pandas_9hashtable_Int64Vector *__pyx_v_self); /* proto */ static int __pyx_pf_6pandas_9hashtable_13Float64Vector___cinit__(struct __pyx_obj_6pandas_9hashtable_Float64Vector *__pyx_v_self); /* proto */ static Py_ssize_t __pyx_pf_6pandas_9hashtable_13Float64Vector_2__len__(struct __pyx_obj_6pandas_9hashtable_Float64Vector *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_9hashtable_13Float64Vector_4to_array(struct __pyx_obj_6pandas_9hashtable_Float64Vector *__pyx_v_self); /* proto */ static int __pyx_pf_6pandas_9hashtable_15StringHashTable___cinit__(struct __pyx_obj_6pandas_9hashtable_StringHashTable *__pyx_v_self, int __pyx_v_size_hint); /* proto */ static void __pyx_pf_6pandas_9hashtable_15StringHashTable_2__dealloc__(struct __pyx_obj_6pandas_9hashtable_StringHashTable *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_9hashtable_15StringHashTable_4get_item(struct __pyx_obj_6pandas_9hashtable_StringHashTable *__pyx_v_self, PyObject *__pyx_v_val); /* proto */ static PyObject *__pyx_pf_6pandas_9hashtable_15StringHashTable_6get_iter_test(struct __pyx_obj_6pandas_9hashtable_StringHashTable *__pyx_v_self, PyObject *__pyx_v_key, Py_ssize_t __pyx_v_iterations); /* proto */ static PyObject *__pyx_pf_6pandas_9hashtable_15StringHashTable_8set_item(struct __pyx_obj_6pandas_9hashtable_StringHashTable *__pyx_v_self, PyObject *__pyx_v_key, Py_ssize_t __pyx_v_val); /* proto */ static PyObject *__pyx_pf_6pandas_9hashtable_15StringHashTable_10get_indexer(struct __pyx_obj_6pandas_9hashtable_StringHashTable *__pyx_v_self, PyArrayObject *__pyx_v_values); /* proto */ static PyObject *__pyx_pf_6pandas_9hashtable_15StringHashTable_12unique(struct __pyx_obj_6pandas_9hashtable_StringHashTable *__pyx_v_self, PyArrayObject *__pyx_v_values); /* proto */ static PyObject *__pyx_pf_6pandas_9hashtable_15StringHashTable_14factorize(struct __pyx_obj_6pandas_9hashtable_StringHashTable *__pyx_v_self, PyArrayObject *__pyx_v_values); /* proto */ static int __pyx_pf_6pandas_9hashtable_14Int32HashTable___init__(struct __pyx_obj_6pandas_9hashtable_Int32HashTable *__pyx_v_self, PyObject *__pyx_v_size_hint); /* proto */ static int __pyx_pf_6pandas_9hashtable_14Int32HashTable_2__cinit__(struct __pyx_obj_6pandas_9hashtable_Int32HashTable *__pyx_v_self); /* proto */ static void __pyx_pf_6pandas_9hashtable_14Int32HashTable_4__dealloc__(struct __pyx_obj_6pandas_9hashtable_Int32HashTable *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_9hashtable_14Int32HashTable_6get_item(struct __pyx_obj_6pandas_9hashtable_Int32HashTable *__pyx_v_self, __pyx_t_5numpy_int32_t __pyx_v_val); /* proto */ static PyObject *__pyx_pf_6pandas_9hashtable_14Int32HashTable_8get_iter_test(struct __pyx_obj_6pandas_9hashtable_Int32HashTable *__pyx_v_self, CYTHON_UNUSED __pyx_t_5numpy_int32_t __pyx_v_key, Py_ssize_t __pyx_v_iterations); /* proto */ static PyObject *__pyx_pf_6pandas_9hashtable_14Int32HashTable_10set_item(struct __pyx_obj_6pandas_9hashtable_Int32HashTable *__pyx_v_self, __pyx_t_5numpy_int32_t __pyx_v_key, Py_ssize_t __pyx_v_val); /* proto */ static PyObject *__pyx_pf_6pandas_9hashtable_14Int32HashTable_12map_locations(struct __pyx_obj_6pandas_9hashtable_Int32HashTable *__pyx_v_self, PyArrayObject *__pyx_v_values); /* proto */ static PyObject *__pyx_pf_6pandas_9hashtable_14Int32HashTable_14lookup(struct __pyx_obj_6pandas_9hashtable_Int32HashTable *__pyx_v_self, PyArrayObject *__pyx_v_values); /* proto */ static PyObject *__pyx_pf_6pandas_9hashtable_14Int32HashTable_16factorize(struct __pyx_obj_6pandas_9hashtable_Int32HashTable *__pyx_v_self, PyArrayObject *__pyx_v_values); /* proto */ static int __pyx_pf_6pandas_9hashtable_14Int64HashTable___cinit__(struct __pyx_obj_6pandas_9hashtable_Int64HashTable *__pyx_v_self, PyObject *__pyx_v_size_hint); /* proto */ static void __pyx_pf_6pandas_9hashtable_14Int64HashTable_2__dealloc__(struct __pyx_obj_6pandas_9hashtable_Int64HashTable *__pyx_v_self); /* proto */ static int __pyx_pf_6pandas_9hashtable_14Int64HashTable_4__contains__(struct __pyx_obj_6pandas_9hashtable_Int64HashTable *__pyx_v_self, PyObject *__pyx_v_key); /* proto */ static Py_ssize_t __pyx_pf_6pandas_9hashtable_14Int64HashTable_6__len__(struct __pyx_obj_6pandas_9hashtable_Int64HashTable *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_9hashtable_14Int64HashTable_8get_item(struct __pyx_obj_6pandas_9hashtable_Int64HashTable *__pyx_v_self, __pyx_t_5numpy_int64_t __pyx_v_val); /* proto */ static PyObject *__pyx_pf_6pandas_9hashtable_14Int64HashTable_10get_iter_test(struct __pyx_obj_6pandas_9hashtable_Int64HashTable *__pyx_v_self, CYTHON_UNUSED __pyx_t_5numpy_int64_t __pyx_v_key, Py_ssize_t __pyx_v_iterations); /* proto */ static PyObject *__pyx_pf_6pandas_9hashtable_14Int64HashTable_12set_item(struct __pyx_obj_6pandas_9hashtable_Int64HashTable *__pyx_v_self, __pyx_t_5numpy_int64_t __pyx_v_key, Py_ssize_t __pyx_v_val); /* proto */ static PyObject *__pyx_pf_6pandas_9hashtable_14Int64HashTable_14map(struct __pyx_obj_6pandas_9hashtable_Int64HashTable *__pyx_v_self, PyArrayObject *__pyx_v_keys, PyArrayObject *__pyx_v_values); /* proto */ static PyObject *__pyx_pf_6pandas_9hashtable_14Int64HashTable_16map_locations(struct __pyx_obj_6pandas_9hashtable_Int64HashTable *__pyx_v_self, PyArrayObject *__pyx_v_values); /* proto */ static PyObject *__pyx_pf_6pandas_9hashtable_14Int64HashTable_18lookup(struct __pyx_obj_6pandas_9hashtable_Int64HashTable *__pyx_v_self, PyArrayObject *__pyx_v_values); /* proto */ static PyObject *__pyx_pf_6pandas_9hashtable_14Int64HashTable_20factorize(struct __pyx_obj_6pandas_9hashtable_Int64HashTable *__pyx_v_self, PyArrayObject *__pyx_v_values); /* proto */ static PyObject *__pyx_pf_6pandas_9hashtable_14Int64HashTable_22get_labels(struct __pyx_obj_6pandas_9hashtable_Int64HashTable *__pyx_v_self, PyArrayObject *__pyx_v_values, struct __pyx_obj_6pandas_9hashtable_Int64Vector *__pyx_v_uniques, Py_ssize_t __pyx_v_count_prior, CYTHON_UNUSED Py_ssize_t __pyx_v_na_sentinel); /* proto */ static PyObject *__pyx_pf_6pandas_9hashtable_14Int64HashTable_24get_labels_groupby(struct __pyx_obj_6pandas_9hashtable_Int64HashTable *__pyx_v_self, PyArrayObject *__pyx_v_values); /* proto */ static PyObject *__pyx_pf_6pandas_9hashtable_14Int64HashTable_26unique(struct __pyx_obj_6pandas_9hashtable_Int64HashTable *__pyx_v_self, PyArrayObject *__pyx_v_values); /* proto */ static int __pyx_pf_6pandas_9hashtable_16Float64HashTable___cinit__(struct __pyx_obj_6pandas_9hashtable_Float64HashTable *__pyx_v_self, PyObject *__pyx_v_size_hint); /* proto */ static Py_ssize_t __pyx_pf_6pandas_9hashtable_16Float64HashTable_2__len__(struct __pyx_obj_6pandas_9hashtable_Float64HashTable *__pyx_v_self); /* proto */ static void __pyx_pf_6pandas_9hashtable_16Float64HashTable_4__dealloc__(struct __pyx_obj_6pandas_9hashtable_Float64HashTable *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_9hashtable_16Float64HashTable_6factorize(struct __pyx_obj_6pandas_9hashtable_Float64HashTable *__pyx_v_self, PyArrayObject *__pyx_v_values); /* proto */ static PyObject *__pyx_pf_6pandas_9hashtable_16Float64HashTable_8get_labels(struct __pyx_obj_6pandas_9hashtable_Float64HashTable *__pyx_v_self, PyArrayObject *__pyx_v_values, struct __pyx_obj_6pandas_9hashtable_Float64Vector *__pyx_v_uniques, Py_ssize_t __pyx_v_count_prior, __pyx_t_5numpy_int64_t __pyx_v_na_sentinel); /* proto */ static PyObject *__pyx_pf_6pandas_9hashtable_16Float64HashTable_10map_locations(struct __pyx_obj_6pandas_9hashtable_Float64HashTable *__pyx_v_self, PyArrayObject *__pyx_v_values); /* proto */ static PyObject *__pyx_pf_6pandas_9hashtable_16Float64HashTable_12lookup(struct __pyx_obj_6pandas_9hashtable_Float64HashTable *__pyx_v_self, PyArrayObject *__pyx_v_values); /* proto */ static PyObject *__pyx_pf_6pandas_9hashtable_16Float64HashTable_14unique(struct __pyx_obj_6pandas_9hashtable_Float64HashTable *__pyx_v_self, PyArrayObject *__pyx_v_values); /* proto */ static int __pyx_pf_6pandas_9hashtable_17PyObjectHashTable___init__(struct __pyx_obj_6pandas_9hashtable_PyObjectHashTable *__pyx_v_self, PyObject *__pyx_v_size_hint); /* proto */ static void __pyx_pf_6pandas_9hashtable_17PyObjectHashTable_2__dealloc__(struct __pyx_obj_6pandas_9hashtable_PyObjectHashTable *__pyx_v_self); /* proto */ static Py_ssize_t __pyx_pf_6pandas_9hashtable_17PyObjectHashTable_4__len__(struct __pyx_obj_6pandas_9hashtable_PyObjectHashTable *__pyx_v_self); /* proto */ static int __pyx_pf_6pandas_9hashtable_17PyObjectHashTable_6__contains__(struct __pyx_obj_6pandas_9hashtable_PyObjectHashTable *__pyx_v_self, PyObject *__pyx_v_key); /* proto */ static PyObject *__pyx_pf_6pandas_9hashtable_17PyObjectHashTable_8destroy(struct __pyx_obj_6pandas_9hashtable_PyObjectHashTable *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_9hashtable_17PyObjectHashTable_10get_item(struct __pyx_obj_6pandas_9hashtable_PyObjectHashTable *__pyx_v_self, PyObject *__pyx_v_val); /* proto */ static PyObject *__pyx_pf_6pandas_9hashtable_17PyObjectHashTable_12get_iter_test(struct __pyx_obj_6pandas_9hashtable_PyObjectHashTable *__pyx_v_self, PyObject *__pyx_v_key, Py_ssize_t __pyx_v_iterations); /* proto */ static PyObject *__pyx_pf_6pandas_9hashtable_17PyObjectHashTable_14set_item(struct __pyx_obj_6pandas_9hashtable_PyObjectHashTable *__pyx_v_self, PyObject *__pyx_v_key, Py_ssize_t __pyx_v_val); /* proto */ static PyObject *__pyx_pf_6pandas_9hashtable_17PyObjectHashTable_16map_locations(struct __pyx_obj_6pandas_9hashtable_PyObjectHashTable *__pyx_v_self, PyArrayObject *__pyx_v_values); /* proto */ static PyObject *__pyx_pf_6pandas_9hashtable_17PyObjectHashTable_18lookup(struct __pyx_obj_6pandas_9hashtable_PyObjectHashTable *__pyx_v_self, PyArrayObject *__pyx_v_values); /* proto */ static PyObject *__pyx_pf_6pandas_9hashtable_17PyObjectHashTable_20lookup2(CYTHON_UNUSED struct __pyx_obj_6pandas_9hashtable_PyObjectHashTable *__pyx_v_self, PyArrayObject *__pyx_v_values); /* proto */ static PyObject *__pyx_pf_6pandas_9hashtable_17PyObjectHashTable_22unique(struct __pyx_obj_6pandas_9hashtable_PyObjectHashTable *__pyx_v_self, PyArrayObject *__pyx_v_values); /* proto */ static PyObject *__pyx_pf_6pandas_9hashtable_17PyObjectHashTable_24get_labels(struct __pyx_obj_6pandas_9hashtable_PyObjectHashTable *__pyx_v_self, PyArrayObject *__pyx_v_values, struct __pyx_obj_6pandas_9hashtable_ObjectVector *__pyx_v_uniques, Py_ssize_t __pyx_v_count_prior, __pyx_t_5numpy_int64_t __pyx_v_na_sentinel); /* proto */ static int __pyx_pf_6pandas_9hashtable_10Factorizer___init__(struct __pyx_obj_6pandas_9hashtable_Factorizer *__pyx_v_self, PyObject *__pyx_v_size_hint); /* proto */ static PyObject *__pyx_pf_6pandas_9hashtable_10Factorizer_2get_count(struct __pyx_obj_6pandas_9hashtable_Factorizer *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_9hashtable_10Factorizer_4factorize(struct __pyx_obj_6pandas_9hashtable_Factorizer *__pyx_v_self, PyArrayObject *__pyx_v_values, PyObject *__pyx_v_sort, PyObject *__pyx_v_na_sentinel); /* proto */ static PyObject *__pyx_pf_6pandas_9hashtable_10Factorizer_6unique(struct __pyx_obj_6pandas_9hashtable_Factorizer *__pyx_v_self, PyArrayObject *__pyx_v_values); /* proto */ static PyObject *__pyx_pf_6pandas_9hashtable_10Factorizer_5table___get__(struct __pyx_obj_6pandas_9hashtable_Factorizer *__pyx_v_self); /* proto */ static int __pyx_pf_6pandas_9hashtable_10Factorizer_5table_2__set__(struct __pyx_obj_6pandas_9hashtable_Factorizer *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ static int __pyx_pf_6pandas_9hashtable_10Factorizer_5table_4__del__(struct __pyx_obj_6pandas_9hashtable_Factorizer *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_9hashtable_10Factorizer_7uniques___get__(struct __pyx_obj_6pandas_9hashtable_Factorizer *__pyx_v_self); /* proto */ static int __pyx_pf_6pandas_9hashtable_10Factorizer_7uniques_2__set__(struct __pyx_obj_6pandas_9hashtable_Factorizer *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ static int __pyx_pf_6pandas_9hashtable_10Factorizer_7uniques_4__del__(struct __pyx_obj_6pandas_9hashtable_Factorizer *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_9hashtable_10Factorizer_5count___get__(struct __pyx_obj_6pandas_9hashtable_Factorizer *__pyx_v_self); /* proto */ static int __pyx_pf_6pandas_9hashtable_10Factorizer_5count_2__set__(struct __pyx_obj_6pandas_9hashtable_Factorizer *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ static int __pyx_pf_6pandas_9hashtable_15Int64Factorizer___init__(struct __pyx_obj_6pandas_9hashtable_Int64Factorizer *__pyx_v_self, PyObject *__pyx_v_size_hint); /* proto */ static PyObject *__pyx_pf_6pandas_9hashtable_15Int64Factorizer_2get_count(struct __pyx_obj_6pandas_9hashtable_Int64Factorizer *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_9hashtable_15Int64Factorizer_4factorize(struct __pyx_obj_6pandas_9hashtable_Int64Factorizer *__pyx_v_self, PyArrayObject *__pyx_v_values, PyObject *__pyx_v_sort, PyObject *__pyx_v_na_sentinel); /* proto */ static PyObject *__pyx_pf_6pandas_9hashtable_15Int64Factorizer_5table___get__(struct __pyx_obj_6pandas_9hashtable_Int64Factorizer *__pyx_v_self); /* proto */ static int __pyx_pf_6pandas_9hashtable_15Int64Factorizer_5table_2__set__(struct __pyx_obj_6pandas_9hashtable_Int64Factorizer *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ static int __pyx_pf_6pandas_9hashtable_15Int64Factorizer_5table_4__del__(struct __pyx_obj_6pandas_9hashtable_Int64Factorizer *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_9hashtable_15Int64Factorizer_7uniques___get__(struct __pyx_obj_6pandas_9hashtable_Int64Factorizer *__pyx_v_self); /* proto */ static int __pyx_pf_6pandas_9hashtable_15Int64Factorizer_7uniques_2__set__(struct __pyx_obj_6pandas_9hashtable_Int64Factorizer *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ static int __pyx_pf_6pandas_9hashtable_15Int64Factorizer_7uniques_4__del__(struct __pyx_obj_6pandas_9hashtable_Int64Factorizer *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_9hashtable_15Int64Factorizer_5count___get__(struct __pyx_obj_6pandas_9hashtable_Int64Factorizer *__pyx_v_self); /* proto */ static int __pyx_pf_6pandas_9hashtable_15Int64Factorizer_5count_2__set__(struct __pyx_obj_6pandas_9hashtable_Int64Factorizer *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ static PyObject *__pyx_pf_6pandas_9hashtable_2value_count_int64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values); /* proto */ static PyObject *__pyx_pf_6pandas_9hashtable_4value_count_object(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_mask); /* proto */ static PyObject *__pyx_pf_6pandas_9hashtable_6mode_object(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_mask); /* proto */ static PyObject *__pyx_pf_6pandas_9hashtable_8mode_int64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values); /* 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_9hashtable_Factorizer(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_6pandas_9hashtable_HashTable(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_6pandas_9hashtable_Float64HashTable(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_6pandas_9hashtable_Int64Vector(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_6pandas_9hashtable_Int64HashTable(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_6pandas_9hashtable_Int32HashTable(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_6pandas_9hashtable_Int64Factorizer(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_6pandas_9hashtable_Float64Vector(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_6pandas_9hashtable_StringHashTable(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_6pandas_9hashtable_PyObjectHashTable(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_6pandas_9hashtable_ObjectVector(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static char __pyx_k_3[] = "index out of bounds"; static char __pyx_k_6[] = "ndarray is not C contiguous"; static char __pyx_k_8[] = "ndarray is not Fortran contiguous"; static char __pyx_k_10[] = "Non-native byte order not supported"; static char __pyx_k_12[] = "unknown dtype code in numpy.pxd (%d)"; static char __pyx_k_13[] = "Format string allocated too short, see comment in numpy.pxd"; static char __pyx_k_16[] = "Format string allocated too short."; static char __pyx_k_20[] = "list_to_object_array"; static char __pyx_k_21[] = "/home/yoh/deb/gits/pkg-exppsy/pandas/pandas/hashtable.pyx"; static char __pyx_k_22[] = "pandas.hashtable"; static char __pyx_k__B[] = "B"; static char __pyx_k__H[] = "H"; static char __pyx_k__I[] = "I"; static char __pyx_k__L[] = "L"; static char __pyx_k__O[] = "O"; static char __pyx_k__Q[] = "Q"; static char __pyx_k__b[] = "b"; static char __pyx_k__d[] = "d"; static char __pyx_k__f[] = "f"; static char __pyx_k__g[] = "g"; static char __pyx_k__h[] = "h"; static char __pyx_k__i[] = "i"; static char __pyx_k__j[] = "j"; static char __pyx_k__k[] = "k"; static char __pyx_k__l[] = "l"; static char __pyx_k__n[] = "n"; static char __pyx_k__q[] = "q"; static char __pyx_k__Zd[] = "Zd"; static char __pyx_k__Zf[] = "Zf"; static char __pyx_k__Zg[] = "Zg"; static char __pyx_k__np[] = "np"; static char __pyx_k__arr[] = "arr"; static char __pyx_k__inf[] = "inf"; static char __pyx_k__key[] = "key"; static char __pyx_k__nan[] = "nan"; static char __pyx_k__obj[] = "obj"; static char __pyx_k__put[] = "put"; static char __pyx_k__ret[] = "ret"; static char __pyx_k__val[] = "val"; static char __pyx_k__ONAN[] = "ONAN"; static char __pyx_k__int_[] = "int_"; static char __pyx_k__keys[] = "keys"; static char __pyx_k__mask[] = "mask"; static char __pyx_k__sort[] = "sort"; static char __pyx_k__take[] = "take"; static char __pyx_k__count[] = "count"; static char __pyx_k__dtype[] = "dtype"; static char __pyx_k__empty[] = "empty"; static char __pyx_k__int64[] = "int64"; static char __pyx_k__modes[] = "modes"; static char __pyx_k__numpy[] = "numpy"; static char __pyx_k__range[] = "range"; static char __pyx_k__table[] = "table"; static char __pyx_k__zeros[] = "zeros"; static char __pyx_k__arange[] = "arange"; static char __pyx_k__astype[] = "astype"; static char __pyx_k__object[] = "object"; static char __pyx_k__resize[] = "resize"; static char __pyx_k__unique[] = "unique"; static char __pyx_k__values[] = "values"; static char __pyx_k__argsort[] = "argsort"; static char __pyx_k__destroy[] = "destroy"; static char __pyx_k__float64[] = "float64"; static char __pyx_k__max_val[] = "max_val"; static char __pyx_k__object_[] = "object_"; static char __pyx_k__uniques[] = "uniques"; static char __pyx_k__KeyError[] = "KeyError"; static char __pyx_k____main__[] = "__main__"; static char __pyx_k____test__[] = "__test__"; static char __pyx_k__get_item[] = "get_item"; static char __pyx_k__set_item[] = "set_item"; static char __pyx_k__to_array[] = "to_array"; static char __pyx_k__max_count[] = "max_count"; static char __pyx_k__size_hint[] = "size_hint"; static char __pyx_k__IndexError[] = "IndexError"; static char __pyx_k__ValueError[] = "ValueError"; static char __pyx_k____import__[] = "__import__"; static char __pyx_k__get_labels[] = "get_labels"; static char __pyx_k__iterations[] = "iterations"; static char __pyx_k__mode_int64[] = "mode_int64"; static char __pyx_k__count_prior[] = "count_prior"; static char __pyx_k__mode_object[] = "mode_object"; static char __pyx_k__na_sentinel[] = "na_sentinel"; static char __pyx_k__RuntimeError[] = "RuntimeError"; static char __pyx_k____pyx_vtable__[] = "__pyx_vtable__"; static char __pyx_k____pyx_getbuffer[] = "__pyx_getbuffer"; static char __pyx_k____pyx_releasebuffer[] = "__pyx_releasebuffer"; static PyObject *__pyx_kp_u_10; static PyObject *__pyx_kp_u_12; static PyObject *__pyx_kp_u_13; static PyObject *__pyx_kp_u_16; static PyObject *__pyx_n_s_20; static PyObject *__pyx_kp_s_21; static PyObject *__pyx_n_s_22; static PyObject *__pyx_kp_s_3; static PyObject *__pyx_kp_u_6; static PyObject *__pyx_kp_u_8; static PyObject *__pyx_n_s__IndexError; static PyObject *__pyx_n_s__KeyError; static PyObject *__pyx_n_s__ONAN; static PyObject *__pyx_n_s__RuntimeError; static PyObject *__pyx_n_s__ValueError; static PyObject *__pyx_n_s____import__; static PyObject *__pyx_n_s____main__; static PyObject *__pyx_n_s____pyx_getbuffer; static PyObject *__pyx_n_s____pyx_releasebuffer; static PyObject *__pyx_n_s____pyx_vtable__; static PyObject *__pyx_n_s____test__; static PyObject *__pyx_n_s__arange; static PyObject *__pyx_n_s__argsort; static PyObject *__pyx_n_s__arr; static PyObject *__pyx_n_s__astype; static PyObject *__pyx_n_s__count; static PyObject *__pyx_n_s__count_prior; static PyObject *__pyx_n_s__destroy; static PyObject *__pyx_n_s__dtype; static PyObject *__pyx_n_s__empty; static PyObject *__pyx_n_s__float64; static PyObject *__pyx_n_s__get_item; static PyObject *__pyx_n_s__get_labels; static PyObject *__pyx_n_s__i; static PyObject *__pyx_n_s__inf; static PyObject *__pyx_n_s__int64; static PyObject *__pyx_n_s__int_; static PyObject *__pyx_n_s__iterations; static PyObject *__pyx_n_s__j; static PyObject *__pyx_n_s__k; static PyObject *__pyx_n_s__key; static PyObject *__pyx_n_s__keys; static PyObject *__pyx_n_s__mask; static PyObject *__pyx_n_s__max_count; static PyObject *__pyx_n_s__max_val; static PyObject *__pyx_n_s__mode_int64; static PyObject *__pyx_n_s__mode_object; static PyObject *__pyx_n_s__modes; static PyObject *__pyx_n_s__n; static PyObject *__pyx_n_s__na_sentinel; static PyObject *__pyx_n_s__nan; static PyObject *__pyx_n_s__np; static PyObject *__pyx_n_s__numpy; static PyObject *__pyx_n_s__obj; static PyObject *__pyx_n_s__object; static PyObject *__pyx_n_s__object_; static PyObject *__pyx_n_s__put; static PyObject *__pyx_n_s__range; static PyObject *__pyx_n_s__resize; static PyObject *__pyx_n_s__ret; static PyObject *__pyx_n_s__set_item; static PyObject *__pyx_n_s__size_hint; static PyObject *__pyx_n_s__sort; static PyObject *__pyx_n_s__table; static PyObject *__pyx_n_s__take; static PyObject *__pyx_n_s__to_array; static PyObject *__pyx_n_s__unique; static PyObject *__pyx_n_s__uniques; static PyObject *__pyx_n_s__val; static PyObject *__pyx_n_s__values; static PyObject *__pyx_n_s__zeros; static PyObject *__pyx_int_0; static PyObject *__pyx_int_1; static PyObject *__pyx_int_neg_1; static PyObject *__pyx_int_15; static PyObject *__pyx_k_1; static PyObject *__pyx_k_2; static PyObject *__pyx_k_tuple_4; static PyObject *__pyx_k_tuple_5; static PyObject *__pyx_k_tuple_7; static PyObject *__pyx_k_tuple_9; static PyObject *__pyx_k_tuple_11; static PyObject *__pyx_k_tuple_14; static PyObject *__pyx_k_tuple_15; static PyObject *__pyx_k_tuple_17; static PyObject *__pyx_k_tuple_18; static PyObject *__pyx_k_tuple_23; static PyObject *__pyx_k_tuple_25; static PyObject *__pyx_k_codeobj_19; static PyObject *__pyx_k_codeobj_24; static PyObject *__pyx_k_codeobj_26; /* Python wrapper */ static PyObject *__pyx_pw_6pandas_9hashtable_1list_to_object_array(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/ static char __pyx_doc_6pandas_9hashtable_list_to_object_array[] = "\n Convert list to object ndarray. Seriously can't believe I had to write this\n function\n "; static PyMethodDef __pyx_mdef_6pandas_9hashtable_1list_to_object_array = {__Pyx_NAMESTR("list_to_object_array"), (PyCFunction)__pyx_pw_6pandas_9hashtable_1list_to_object_array, METH_O, __Pyx_DOCSTR(__pyx_doc_6pandas_9hashtable_list_to_object_array)}; static PyObject *__pyx_pw_6pandas_9hashtable_1list_to_object_array(PyObject *__pyx_self, PyObject *__pyx_v_obj) { CYTHON_UNUSED int __pyx_lineno = 0; CYTHON_UNUSED const char *__pyx_filename = NULL; CYTHON_UNUSED int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("list_to_object_array (wrapper)", 0); if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_obj), (&PyList_Type), 1, "obj", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 31; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_9hashtable_list_to_object_array(__pyx_self, ((PyObject*)__pyx_v_obj)); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/hashtable.pyx":31 * * * def list_to_object_array(list obj): # <<<<<<<<<<<<<< * ''' * Convert list to object ndarray. Seriously can't believe I had to write this */ static PyObject *__pyx_pf_6pandas_9hashtable_list_to_object_array(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_n; PyArrayObject *__pyx_v_arr = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_arr; __Pyx_Buffer __pyx_pybuffer_arr; 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; PyArrayObject *__pyx_t_6 = NULL; 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; PyObject **__pyx_t_12; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("list_to_object_array", 0); __pyx_pybuffer_arr.pybuffer.buf = NULL; __pyx_pybuffer_arr.refcount = 0; __pyx_pybuffernd_arr.data = NULL; __pyx_pybuffernd_arr.rcbuffer = &__pyx_pybuffer_arr; /* "pandas/hashtable.pyx":40 * ndarray[object] arr * * n = len(obj) # <<<<<<<<<<<<<< * arr = np.empty(n, dtype=object) * */ if (unlikely(((PyObject *)__pyx_v_obj) == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 40; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_1 = PyList_GET_SIZE(((PyObject *)__pyx_v_obj)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 40; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/hashtable.pyx":41 * * n = len(obj) * arr = np.empty(n, dtype=object) # <<<<<<<<<<<<<< * * for i from 0 <= i < n: */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 41; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 41; __pyx_clineno = __LINE__; goto __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_n); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 41; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 41; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 41; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_2)); if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__dtype), __pyx_builtin_object) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 41; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_5 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 41; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 41; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_6 = ((PyArrayObject *)__pyx_t_5); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_arr.rcbuffer->pybuffer); __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_arr.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_object, 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_arr.rcbuffer->pybuffer, (PyObject*)__pyx_v_arr, &__Pyx_TypeInfo_object, 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_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]; if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 41; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_6 = 0; __pyx_v_arr = ((PyArrayObject *)__pyx_t_5); __pyx_t_5 = 0; /* "pandas/hashtable.pyx":43 * arr = np.empty(n, dtype=object) * * for i from 0 <= i < n: # <<<<<<<<<<<<<< * arr[i] = obj[i] * */ __pyx_t_1 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_1; __pyx_v_i++) { /* "pandas/hashtable.pyx":44 * * for i from 0 <= i < n: * arr[i] = obj[i] # <<<<<<<<<<<<<< * * return arr */ if (unlikely(((PyObject *)__pyx_v_obj) == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 44; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_5 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_obj), __pyx_v_i, sizeof(Py_ssize_t), PyInt_FromSsize_t, 1, 1, 1); if (!__pyx_t_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 44; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_11 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_11 < 0) { __pyx_t_11 += __pyx_pybuffernd_arr.diminfo[0].shape; if (unlikely(__pyx_t_11 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_11 >= __pyx_pybuffernd_arr.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 44; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_12 = __Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_arr.rcbuffer->pybuffer.buf, __pyx_t_11, __pyx_pybuffernd_arr.diminfo[0].strides); __Pyx_GOTREF(*__pyx_t_12); __Pyx_INCREF(__pyx_t_5); __Pyx_DECREF(*__pyx_t_12); *__pyx_t_12 = __pyx_t_5; __Pyx_GIVEREF(*__pyx_t_12); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } /* "pandas/hashtable.pyx":46 * arr[i] = obj[i] * * return arr # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_arr)); __pyx_r = ((PyObject *)__pyx_v_arr); goto __pyx_L0; __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_XDECREF(__pyx_t_5); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_arr.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.hashtable.list_to_object_array", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_arr.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_arr); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pandas_9hashtable_12ObjectVector_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_pw_6pandas_9hashtable_12ObjectVector_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return -1;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__cinit__", 0))) return -1; __pyx_r = __pyx_pf_6pandas_9hashtable_12ObjectVector___cinit__(((struct __pyx_obj_6pandas_9hashtable_ObjectVector *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/hashtable.pyx":58 * PyObject **data * * def __cinit__(self): # <<<<<<<<<<<<<< * self.n = 0 * self.m = _INIT_VEC_CAP */ static int __pyx_pf_6pandas_9hashtable_12ObjectVector___cinit__(struct __pyx_obj_6pandas_9hashtable_ObjectVector *__pyx_v_self) { 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__cinit__", 0); /* "pandas/hashtable.pyx":59 * * def __cinit__(self): * self.n = 0 # <<<<<<<<<<<<<< * self.m = _INIT_VEC_CAP * self.ao = np.empty(_INIT_VEC_CAP, dtype=object) */ __pyx_v_self->n = 0; /* "pandas/hashtable.pyx":60 * def __cinit__(self): * self.n = 0 * self.m = _INIT_VEC_CAP # <<<<<<<<<<<<<< * self.ao = np.empty(_INIT_VEC_CAP, dtype=object) * self.data = self.ao.data */ __pyx_v_self->m = __pyx_v_6pandas_9hashtable__INIT_VEC_CAP; /* "pandas/hashtable.pyx":61 * self.n = 0 * self.m = _INIT_VEC_CAP * self.ao = np.empty(_INIT_VEC_CAP, dtype=object) # <<<<<<<<<<<<<< * self.data = self.ao.data * */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 61; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 61; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_PyInt_FromSize_t(__pyx_v_6pandas_9hashtable__INIT_VEC_CAP); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 61; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 61; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 61; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_1)); if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__dtype), __pyx_builtin_object) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 61; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_4 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_3), ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 61; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__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_filename = __pyx_f[0]; __pyx_lineno = 61; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GIVEREF(__pyx_t_4); __Pyx_GOTREF(__pyx_v_self->ao); __Pyx_DECREF(((PyObject *)__pyx_v_self->ao)); __pyx_v_self->ao = ((PyArrayObject *)__pyx_t_4); __pyx_t_4 = 0; /* "pandas/hashtable.pyx":62 * self.m = _INIT_VEC_CAP * self.ao = np.empty(_INIT_VEC_CAP, dtype=object) * self.data = self.ao.data # <<<<<<<<<<<<<< * * def __len__(self): */ __pyx_v_self->data = ((PyObject **)__pyx_v_self->ao->data); __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("pandas.hashtable.ObjectVector.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static Py_ssize_t __pyx_pw_6pandas_9hashtable_12ObjectVector_3__len__(PyObject *__pyx_v_self); /*proto*/ static Py_ssize_t __pyx_pw_6pandas_9hashtable_12ObjectVector_3__len__(PyObject *__pyx_v_self) { Py_ssize_t __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__len__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_9hashtable_12ObjectVector_2__len__(((struct __pyx_obj_6pandas_9hashtable_ObjectVector *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/hashtable.pyx":64 * self.data = self.ao.data * * def __len__(self): # <<<<<<<<<<<<<< * return self.n * */ static Py_ssize_t __pyx_pf_6pandas_9hashtable_12ObjectVector_2__len__(struct __pyx_obj_6pandas_9hashtable_ObjectVector *__pyx_v_self) { Py_ssize_t __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__len__", 0); /* "pandas/hashtable.pyx":65 * * def __len__(self): * return self.n # <<<<<<<<<<<<<< * * def to_array(self): */ __pyx_r = __pyx_v_self->n; goto __pyx_L0; __pyx_r = 0; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_9hashtable_12ObjectVector_5to_array(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static PyObject *__pyx_pw_6pandas_9hashtable_12ObjectVector_5to_array(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("to_array (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_9hashtable_12ObjectVector_4to_array(((struct __pyx_obj_6pandas_9hashtable_ObjectVector *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/hashtable.pyx":67 * return self.n * * def to_array(self): # <<<<<<<<<<<<<< * self.ao.resize(self.n) * return self.ao */ static PyObject *__pyx_pf_6pandas_9hashtable_12ObjectVector_4to_array(struct __pyx_obj_6pandas_9hashtable_ObjectVector *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("to_array", 0); /* "pandas/hashtable.pyx":68 * * def to_array(self): * self.ao.resize(self.n) # <<<<<<<<<<<<<< * return self.ao * */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->ao), __pyx_n_s__resize); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 68; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyInt_FromSize_t(__pyx_v_self->n); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 68; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 68; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 68; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/hashtable.pyx":69 * def to_array(self): * self.ao.resize(self.n) * return self.ao # <<<<<<<<<<<<<< * * cdef inline append(self, object o): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_self->ao)); __pyx_r = ((PyObject *)__pyx_v_self->ao); goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("pandas.hashtable.ObjectVector.to_array", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/hashtable.pyx":71 * return self.ao * * cdef inline append(self, object o): # <<<<<<<<<<<<<< * if self.n == self.m: * self.m = self.m * 2 */ static CYTHON_INLINE PyObject *__pyx_f_6pandas_9hashtable_12ObjectVector_append(struct __pyx_obj_6pandas_9hashtable_ObjectVector *__pyx_v_self, PyObject *__pyx_v_o) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("append", 0); /* "pandas/hashtable.pyx":72 * * cdef inline append(self, object o): * if self.n == self.m: # <<<<<<<<<<<<<< * self.m = self.m * 2 * self.ao.resize(self.m) */ __pyx_t_1 = ((__pyx_v_self->n == __pyx_v_self->m) != 0); if (__pyx_t_1) { /* "pandas/hashtable.pyx":73 * cdef inline append(self, object o): * if self.n == self.m: * self.m = self.m * 2 # <<<<<<<<<<<<<< * self.ao.resize(self.m) * self.data = self.ao.data */ __pyx_v_self->m = (__pyx_v_self->m * 2); /* "pandas/hashtable.pyx":74 * if self.n == self.m: * self.m = self.m * 2 * self.ao.resize(self.m) # <<<<<<<<<<<<<< * self.data = self.ao.data * */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->ao), __pyx_n_s__resize); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 74; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyInt_FromSize_t(__pyx_v_self->m); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 74; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 74; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 74; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/hashtable.pyx":75 * self.m = self.m * 2 * self.ao.resize(self.m) * self.data = self.ao.data # <<<<<<<<<<<<<< * * Py_INCREF(o) */ __pyx_v_self->data = ((PyObject **)__pyx_v_self->ao->data); goto __pyx_L3; } __pyx_L3:; /* "pandas/hashtable.pyx":77 * self.data = self.ao.data * * Py_INCREF(o) # <<<<<<<<<<<<<< * self.data[self.n] = o * self.n += 1 */ Py_INCREF(__pyx_v_o); /* "pandas/hashtable.pyx":78 * * Py_INCREF(o) * self.data[self.n] = o # <<<<<<<<<<<<<< * self.n += 1 * */ (__pyx_v_self->data[__pyx_v_self->n]) = ((PyObject *)__pyx_v_o); /* "pandas/hashtable.pyx":79 * Py_INCREF(o) * self.data[self.n] = o * self.n += 1 # <<<<<<<<<<<<<< * * */ __pyx_v_self->n = (__pyx_v_self->n + 1); __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.hashtable.ObjectVector.append", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pandas_9hashtable_11Int64Vector_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_pw_6pandas_9hashtable_11Int64Vector_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return -1;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__cinit__", 0))) return -1; __pyx_r = __pyx_pf_6pandas_9hashtable_11Int64Vector___cinit__(((struct __pyx_obj_6pandas_9hashtable_Int64Vector *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/hashtable.pyx":89 * int64_t *data * * def __cinit__(self): # <<<<<<<<<<<<<< * self.n = 0 * self.m = _INIT_VEC_CAP */ static int __pyx_pf_6pandas_9hashtable_11Int64Vector___cinit__(struct __pyx_obj_6pandas_9hashtable_Int64Vector *__pyx_v_self) { 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__cinit__", 0); /* "pandas/hashtable.pyx":90 * * def __cinit__(self): * self.n = 0 # <<<<<<<<<<<<<< * self.m = _INIT_VEC_CAP * self.ao = np.empty(_INIT_VEC_CAP, dtype=np.int64) */ __pyx_v_self->n = 0; /* "pandas/hashtable.pyx":91 * def __cinit__(self): * self.n = 0 * self.m = _INIT_VEC_CAP # <<<<<<<<<<<<<< * self.ao = np.empty(_INIT_VEC_CAP, dtype=np.int64) * self.data = self.ao.data */ __pyx_v_self->m = __pyx_v_6pandas_9hashtable__INIT_VEC_CAP; /* "pandas/hashtable.pyx":92 * self.n = 0 * self.m = _INIT_VEC_CAP * self.ao = np.empty(_INIT_VEC_CAP, dtype=np.int64) # <<<<<<<<<<<<<< * self.data = self.ao.data * */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 92; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 92; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_PyInt_FromSize_t(__pyx_v_6pandas_9hashtable__INIT_VEC_CAP); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 92; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 92; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 92; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 92; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s__int64); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 92; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__dtype), __pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 92; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_3), ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 92; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__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_filename = __pyx_f[0]; __pyx_lineno = 92; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GIVEREF(__pyx_t_5); __Pyx_GOTREF(__pyx_v_self->ao); __Pyx_DECREF(((PyObject *)__pyx_v_self->ao)); __pyx_v_self->ao = ((PyArrayObject *)__pyx_t_5); __pyx_t_5 = 0; /* "pandas/hashtable.pyx":93 * self.m = _INIT_VEC_CAP * self.ao = np.empty(_INIT_VEC_CAP, dtype=np.int64) * self.data = self.ao.data # <<<<<<<<<<<<<< * * def __len__(self): */ __pyx_v_self->data = ((__pyx_t_5numpy_int64_t *)__pyx_v_self->ao->data); __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.hashtable.Int64Vector.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static Py_ssize_t __pyx_pw_6pandas_9hashtable_11Int64Vector_3__len__(PyObject *__pyx_v_self); /*proto*/ static Py_ssize_t __pyx_pw_6pandas_9hashtable_11Int64Vector_3__len__(PyObject *__pyx_v_self) { Py_ssize_t __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__len__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_9hashtable_11Int64Vector_2__len__(((struct __pyx_obj_6pandas_9hashtable_Int64Vector *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/hashtable.pyx":95 * self.data = self.ao.data * * def __len__(self): # <<<<<<<<<<<<<< * return self.n * */ static Py_ssize_t __pyx_pf_6pandas_9hashtable_11Int64Vector_2__len__(struct __pyx_obj_6pandas_9hashtable_Int64Vector *__pyx_v_self) { Py_ssize_t __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__len__", 0); /* "pandas/hashtable.pyx":96 * * def __len__(self): * return self.n # <<<<<<<<<<<<<< * * def to_array(self): */ __pyx_r = __pyx_v_self->n; goto __pyx_L0; __pyx_r = 0; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_9hashtable_11Int64Vector_5to_array(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static PyObject *__pyx_pw_6pandas_9hashtable_11Int64Vector_5to_array(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("to_array (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_9hashtable_11Int64Vector_4to_array(((struct __pyx_obj_6pandas_9hashtable_Int64Vector *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/hashtable.pyx":98 * return self.n * * def to_array(self): # <<<<<<<<<<<<<< * self.ao.resize(self.n) * return self.ao */ static PyObject *__pyx_pf_6pandas_9hashtable_11Int64Vector_4to_array(struct __pyx_obj_6pandas_9hashtable_Int64Vector *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("to_array", 0); /* "pandas/hashtable.pyx":99 * * def to_array(self): * self.ao.resize(self.n) # <<<<<<<<<<<<<< * return self.ao * */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->ao), __pyx_n_s__resize); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 99; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyInt_FromSize_t(__pyx_v_self->n); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 99; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 99; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 99; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/hashtable.pyx":100 * def to_array(self): * self.ao.resize(self.n) * return self.ao # <<<<<<<<<<<<<< * * cdef inline append(self, int64_t x): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_self->ao)); __pyx_r = ((PyObject *)__pyx_v_self->ao); goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("pandas.hashtable.Int64Vector.to_array", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/hashtable.pyx":102 * return self.ao * * cdef inline append(self, int64_t x): # <<<<<<<<<<<<<< * if self.n == self.m: * self.m = self.m * 2 */ static CYTHON_INLINE PyObject *__pyx_f_6pandas_9hashtable_11Int64Vector_append(struct __pyx_obj_6pandas_9hashtable_Int64Vector *__pyx_v_self, __pyx_t_5numpy_int64_t __pyx_v_x) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("append", 0); /* "pandas/hashtable.pyx":103 * * cdef inline append(self, int64_t x): * if self.n == self.m: # <<<<<<<<<<<<<< * self.m = self.m * 2 * self.ao.resize(self.m) */ __pyx_t_1 = ((__pyx_v_self->n == __pyx_v_self->m) != 0); if (__pyx_t_1) { /* "pandas/hashtable.pyx":104 * cdef inline append(self, int64_t x): * if self.n == self.m: * self.m = self.m * 2 # <<<<<<<<<<<<<< * self.ao.resize(self.m) * self.data = self.ao.data */ __pyx_v_self->m = (__pyx_v_self->m * 2); /* "pandas/hashtable.pyx":105 * if self.n == self.m: * self.m = self.m * 2 * self.ao.resize(self.m) # <<<<<<<<<<<<<< * self.data = self.ao.data * */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->ao), __pyx_n_s__resize); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 105; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyInt_FromSize_t(__pyx_v_self->m); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 105; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 105; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 105; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/hashtable.pyx":106 * self.m = self.m * 2 * self.ao.resize(self.m) * self.data = self.ao.data # <<<<<<<<<<<<<< * * self.data[self.n] = x */ __pyx_v_self->data = ((__pyx_t_5numpy_int64_t *)__pyx_v_self->ao->data); goto __pyx_L3; } __pyx_L3:; /* "pandas/hashtable.pyx":108 * self.data = self.ao.data * * self.data[self.n] = x # <<<<<<<<<<<<<< * self.n += 1 * */ (__pyx_v_self->data[__pyx_v_self->n]) = __pyx_v_x; /* "pandas/hashtable.pyx":109 * * self.data[self.n] = x * self.n += 1 # <<<<<<<<<<<<<< * * cdef class Float64Vector: */ __pyx_v_self->n = (__pyx_v_self->n + 1); __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.hashtable.Int64Vector.append", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pandas_9hashtable_13Float64Vector_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_pw_6pandas_9hashtable_13Float64Vector_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return -1;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__cinit__", 0))) return -1; __pyx_r = __pyx_pf_6pandas_9hashtable_13Float64Vector___cinit__(((struct __pyx_obj_6pandas_9hashtable_Float64Vector *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/hashtable.pyx":118 * float64_t *data * * def __cinit__(self): # <<<<<<<<<<<<<< * self.n = 0 * self.m = _INIT_VEC_CAP */ static int __pyx_pf_6pandas_9hashtable_13Float64Vector___cinit__(struct __pyx_obj_6pandas_9hashtable_Float64Vector *__pyx_v_self) { 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__cinit__", 0); /* "pandas/hashtable.pyx":119 * * def __cinit__(self): * self.n = 0 # <<<<<<<<<<<<<< * self.m = _INIT_VEC_CAP * self.ao = np.empty(_INIT_VEC_CAP, dtype=np.float64) */ __pyx_v_self->n = 0; /* "pandas/hashtable.pyx":120 * def __cinit__(self): * self.n = 0 * self.m = _INIT_VEC_CAP # <<<<<<<<<<<<<< * self.ao = np.empty(_INIT_VEC_CAP, dtype=np.float64) * self.data = self.ao.data */ __pyx_v_self->m = __pyx_v_6pandas_9hashtable__INIT_VEC_CAP; /* "pandas/hashtable.pyx":121 * self.n = 0 * self.m = _INIT_VEC_CAP * self.ao = np.empty(_INIT_VEC_CAP, dtype=np.float64) # <<<<<<<<<<<<<< * self.data = self.ao.data * */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 121; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 121; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_PyInt_FromSize_t(__pyx_v_6pandas_9hashtable__INIT_VEC_CAP); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 121; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 121; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 121; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 121; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s__float64); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 121; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__dtype), __pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 121; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_3), ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 121; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__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_filename = __pyx_f[0]; __pyx_lineno = 121; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GIVEREF(__pyx_t_5); __Pyx_GOTREF(__pyx_v_self->ao); __Pyx_DECREF(((PyObject *)__pyx_v_self->ao)); __pyx_v_self->ao = ((PyArrayObject *)__pyx_t_5); __pyx_t_5 = 0; /* "pandas/hashtable.pyx":122 * self.m = _INIT_VEC_CAP * self.ao = np.empty(_INIT_VEC_CAP, dtype=np.float64) * self.data = self.ao.data # <<<<<<<<<<<<<< * * def __len__(self): */ __pyx_v_self->data = ((__pyx_t_5numpy_float64_t *)__pyx_v_self->ao->data); __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.hashtable.Float64Vector.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static Py_ssize_t __pyx_pw_6pandas_9hashtable_13Float64Vector_3__len__(PyObject *__pyx_v_self); /*proto*/ static Py_ssize_t __pyx_pw_6pandas_9hashtable_13Float64Vector_3__len__(PyObject *__pyx_v_self) { Py_ssize_t __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__len__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_9hashtable_13Float64Vector_2__len__(((struct __pyx_obj_6pandas_9hashtable_Float64Vector *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/hashtable.pyx":124 * self.data = self.ao.data * * def __len__(self): # <<<<<<<<<<<<<< * return self.n * */ static Py_ssize_t __pyx_pf_6pandas_9hashtable_13Float64Vector_2__len__(struct __pyx_obj_6pandas_9hashtable_Float64Vector *__pyx_v_self) { Py_ssize_t __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__len__", 0); /* "pandas/hashtable.pyx":125 * * def __len__(self): * return self.n # <<<<<<<<<<<<<< * * def to_array(self): */ __pyx_r = __pyx_v_self->n; goto __pyx_L0; __pyx_r = 0; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_9hashtable_13Float64Vector_5to_array(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static PyObject *__pyx_pw_6pandas_9hashtable_13Float64Vector_5to_array(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("to_array (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_9hashtable_13Float64Vector_4to_array(((struct __pyx_obj_6pandas_9hashtable_Float64Vector *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/hashtable.pyx":127 * return self.n * * def to_array(self): # <<<<<<<<<<<<<< * self.ao.resize(self.n) * return self.ao */ static PyObject *__pyx_pf_6pandas_9hashtable_13Float64Vector_4to_array(struct __pyx_obj_6pandas_9hashtable_Float64Vector *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("to_array", 0); /* "pandas/hashtable.pyx":128 * * def to_array(self): * self.ao.resize(self.n) # <<<<<<<<<<<<<< * return self.ao * */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->ao), __pyx_n_s__resize); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyInt_FromSize_t(__pyx_v_self->n); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/hashtable.pyx":129 * def to_array(self): * self.ao.resize(self.n) * return self.ao # <<<<<<<<<<<<<< * * cdef inline append(self, float64_t x): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_self->ao)); __pyx_r = ((PyObject *)__pyx_v_self->ao); goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("pandas.hashtable.Float64Vector.to_array", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/hashtable.pyx":131 * return self.ao * * cdef inline append(self, float64_t x): # <<<<<<<<<<<<<< * if self.n == self.m: * self.m = self.m * 2 */ static CYTHON_INLINE PyObject *__pyx_f_6pandas_9hashtable_13Float64Vector_append(struct __pyx_obj_6pandas_9hashtable_Float64Vector *__pyx_v_self, __pyx_t_5numpy_float64_t __pyx_v_x) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("append", 0); /* "pandas/hashtable.pyx":132 * * cdef inline append(self, float64_t x): * if self.n == self.m: # <<<<<<<<<<<<<< * self.m = self.m * 2 * self.ao.resize(self.m) */ __pyx_t_1 = ((__pyx_v_self->n == __pyx_v_self->m) != 0); if (__pyx_t_1) { /* "pandas/hashtable.pyx":133 * cdef inline append(self, float64_t x): * if self.n == self.m: * self.m = self.m * 2 # <<<<<<<<<<<<<< * self.ao.resize(self.m) * self.data = self.ao.data */ __pyx_v_self->m = (__pyx_v_self->m * 2); /* "pandas/hashtable.pyx":134 * if self.n == self.m: * self.m = self.m * 2 * self.ao.resize(self.m) # <<<<<<<<<<<<<< * self.data = self.ao.data * */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->ao), __pyx_n_s__resize); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 134; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyInt_FromSize_t(__pyx_v_self->m); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 134; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 134; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 134; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/hashtable.pyx":135 * self.m = self.m * 2 * self.ao.resize(self.m) * self.data = self.ao.data # <<<<<<<<<<<<<< * * self.data[self.n] = x */ __pyx_v_self->data = ((__pyx_t_5numpy_float64_t *)__pyx_v_self->ao->data); goto __pyx_L3; } __pyx_L3:; /* "pandas/hashtable.pyx":137 * self.data = self.ao.data * * self.data[self.n] = x # <<<<<<<<<<<<<< * self.n += 1 * */ (__pyx_v_self->data[__pyx_v_self->n]) = __pyx_v_x; /* "pandas/hashtable.pyx":138 * * self.data[self.n] = x * self.n += 1 # <<<<<<<<<<<<<< * * */ __pyx_v_self->n = (__pyx_v_self->n + 1); __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.hashtable.Float64Vector.append", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pandas_9hashtable_15StringHashTable_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_pw_6pandas_9hashtable_15StringHashTable_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { int __pyx_v_size_hint; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__size_hint,0}; PyObject* values[1] = {0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__size_hint); if (value) { values[0] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 152; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } } if (values[0]) { __pyx_v_size_hint = __Pyx_PyInt_AsInt(values[0]); if (unlikely((__pyx_v_size_hint == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 152; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } else { __pyx_v_size_hint = ((int)1); } } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 152; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.hashtable.StringHashTable.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return -1; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pandas_9hashtable_15StringHashTable___cinit__(((struct __pyx_obj_6pandas_9hashtable_StringHashTable *)__pyx_v_self), __pyx_v_size_hint); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/hashtable.pyx":152 * # kh_resize_str(self.table, size_hint) * * def __cinit__(self, int size_hint=1): # <<<<<<<<<<<<<< * self.table = kh_init_str() * if size_hint is not None: */ static int __pyx_pf_6pandas_9hashtable_15StringHashTable___cinit__(struct __pyx_obj_6pandas_9hashtable_StringHashTable *__pyx_v_self, int __pyx_v_size_hint) { int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; int __pyx_t_3; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__cinit__", 0); /* "pandas/hashtable.pyx":153 * * def __cinit__(self, int size_hint=1): * self.table = kh_init_str() # <<<<<<<<<<<<<< * if size_hint is not None: * kh_resize_str(self.table, size_hint) */ __pyx_v_self->table = kh_init_str(); /* "pandas/hashtable.pyx":154 * def __cinit__(self, int size_hint=1): * self.table = kh_init_str() * if size_hint is not None: # <<<<<<<<<<<<<< * kh_resize_str(self.table, size_hint) * */ __pyx_t_1 = PyInt_FromLong(__pyx_v_size_hint); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 154; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = (__pyx_t_1 != Py_None); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { /* "pandas/hashtable.pyx":155 * self.table = kh_init_str() * if size_hint is not None: * kh_resize_str(self.table, size_hint) # <<<<<<<<<<<<<< * * def __dealloc__(self): */ kh_resize_str(__pyx_v_self->table, __pyx_v_size_hint); goto __pyx_L3; } __pyx_L3:; __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas.hashtable.StringHashTable.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static void __pyx_pw_6pandas_9hashtable_15StringHashTable_3__dealloc__(PyObject *__pyx_v_self); /*proto*/ static void __pyx_pw_6pandas_9hashtable_15StringHashTable_3__dealloc__(PyObject *__pyx_v_self) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0); __pyx_pf_6pandas_9hashtable_15StringHashTable_2__dealloc__(((struct __pyx_obj_6pandas_9hashtable_StringHashTable *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); } /* "pandas/hashtable.pyx":157 * kh_resize_str(self.table, size_hint) * * def __dealloc__(self): # <<<<<<<<<<<<<< * kh_destroy_str(self.table) * */ static void __pyx_pf_6pandas_9hashtable_15StringHashTable_2__dealloc__(struct __pyx_obj_6pandas_9hashtable_StringHashTable *__pyx_v_self) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__dealloc__", 0); /* "pandas/hashtable.pyx":158 * * def __dealloc__(self): * kh_destroy_str(self.table) # <<<<<<<<<<<<<< * * cdef inline int check_type(self, object val): */ kh_destroy_str(__pyx_v_self->table); __Pyx_RefNannyFinishContext(); } /* "pandas/hashtable.pyx":160 * kh_destroy_str(self.table) * * cdef inline int check_type(self, object val): # <<<<<<<<<<<<<< * return util.is_string_object(val) * */ static CYTHON_INLINE int __pyx_f_6pandas_9hashtable_15StringHashTable_check_type(CYTHON_UNUSED struct __pyx_obj_6pandas_9hashtable_StringHashTable *__pyx_v_self, PyObject *__pyx_v_val) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("check_type", 0); /* "pandas/hashtable.pyx":161 * * cdef inline int check_type(self, object val): * return util.is_string_object(val) # <<<<<<<<<<<<<< * * cpdef get_item(self, object val): */ __pyx_r = is_string_object(__pyx_v_val); goto __pyx_L0; __pyx_r = 0; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/hashtable.pyx":163 * return util.is_string_object(val) * * cpdef get_item(self, object val): # <<<<<<<<<<<<<< * cdef khiter_t k * k = kh_get_str(self.table, util.get_c_string(val)) */ static PyObject *__pyx_pw_6pandas_9hashtable_15StringHashTable_5get_item(PyObject *__pyx_v_self, PyObject *__pyx_v_val); /*proto*/ static PyObject *__pyx_f_6pandas_9hashtable_15StringHashTable_get_item(struct __pyx_obj_6pandas_9hashtable_StringHashTable *__pyx_v_self, PyObject *__pyx_v_val, int __pyx_skip_dispatch) { khiter_t __pyx_v_k; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_t_4; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_item", 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__get_item); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 163; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_6pandas_9hashtable_15StringHashTable_5get_item)) { __Pyx_XDECREF(__pyx_r); __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 163; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_val); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_val); __Pyx_GIVEREF(__pyx_v_val); __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 163; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __pyx_r = __pyx_t_3; __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } /* "pandas/hashtable.pyx":165 * cpdef get_item(self, object val): * cdef khiter_t k * k = kh_get_str(self.table, util.get_c_string(val)) # <<<<<<<<<<<<<< * if k != self.table.n_buckets: * return self.table.vals[k] */ __pyx_v_k = kh_get_str(__pyx_v_self->table, get_c_string(__pyx_v_val)); /* "pandas/hashtable.pyx":166 * cdef khiter_t k * k = kh_get_str(self.table, util.get_c_string(val)) * if k != self.table.n_buckets: # <<<<<<<<<<<<<< * return self.table.vals[k] * else: */ __pyx_t_4 = ((__pyx_v_k != __pyx_v_self->table->n_buckets) != 0); if (__pyx_t_4) { /* "pandas/hashtable.pyx":167 * k = kh_get_str(self.table, util.get_c_string(val)) * if k != self.table.n_buckets: * return self.table.vals[k] # <<<<<<<<<<<<<< * else: * raise KeyError(val) */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyInt_FromSize_t((__pyx_v_self->table->vals[__pyx_v_k])); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 167; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; goto __pyx_L3; } /*else*/ { /* "pandas/hashtable.pyx":169 * return self.table.vals[k] * else: * raise KeyError(val) # <<<<<<<<<<<<<< * * def get_iter_test(self, object key, Py_ssize_t iterations): */ __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 169; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_val); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_val); __Pyx_GIVEREF(__pyx_v_val); __pyx_t_3 = PyObject_Call(__pyx_builtin_KeyError, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 169; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 169; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_L3:; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("pandas.hashtable.StringHashTable.get_item", __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_9hashtable_15StringHashTable_5get_item(PyObject *__pyx_v_self, PyObject *__pyx_v_val); /*proto*/ static PyObject *__pyx_pw_6pandas_9hashtable_15StringHashTable_5get_item(PyObject *__pyx_v_self, PyObject *__pyx_v_val) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("get_item (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_9hashtable_15StringHashTable_4get_item(((struct __pyx_obj_6pandas_9hashtable_StringHashTable *)__pyx_v_self), ((PyObject *)__pyx_v_val)); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/hashtable.pyx":163 * return util.is_string_object(val) * * cpdef get_item(self, object val): # <<<<<<<<<<<<<< * cdef khiter_t k * k = kh_get_str(self.table, util.get_c_string(val)) */ static PyObject *__pyx_pf_6pandas_9hashtable_15StringHashTable_4get_item(struct __pyx_obj_6pandas_9hashtable_StringHashTable *__pyx_v_self, PyObject *__pyx_v_val) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_item", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = ((struct __pyx_vtabstruct_6pandas_9hashtable_StringHashTable *)__pyx_v_self->__pyx_vtab)->get_item(__pyx_v_self, __pyx_v_val, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 163; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas.hashtable.StringHashTable.get_item", __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_9hashtable_15StringHashTable_7get_iter_test(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_6pandas_9hashtable_15StringHashTable_7get_iter_test(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_key = 0; Py_ssize_t __pyx_v_iterations; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("get_iter_test (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__key,&__pyx_n_s__iterations,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__key)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__iterations)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("get_iter_test", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 171; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "get_iter_test") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 171; __pyx_clineno = __LINE__; goto __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_key = values[0]; __pyx_v_iterations = __Pyx_PyIndex_AsSsize_t(values[1]); if (unlikely((__pyx_v_iterations == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 171; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("get_iter_test", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 171; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.hashtable.StringHashTable.get_iter_test", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pandas_9hashtable_15StringHashTable_6get_iter_test(((struct __pyx_obj_6pandas_9hashtable_StringHashTable *)__pyx_v_self), __pyx_v_key, __pyx_v_iterations); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/hashtable.pyx":171 * raise KeyError(val) * * def get_iter_test(self, object key, Py_ssize_t iterations): # <<<<<<<<<<<<<< * cdef Py_ssize_t i, val * for i in range(iterations): */ static PyObject *__pyx_pf_6pandas_9hashtable_15StringHashTable_6get_iter_test(struct __pyx_obj_6pandas_9hashtable_StringHashTable *__pyx_v_self, PyObject *__pyx_v_key, Py_ssize_t __pyx_v_iterations) { CYTHON_UNUSED Py_ssize_t __pyx_v_i; CYTHON_UNUSED Py_ssize_t __pyx_v_val; khint_t __pyx_v_k; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; Py_ssize_t __pyx_t_2; int __pyx_t_3; __Pyx_RefNannySetupContext("get_iter_test", 0); /* "pandas/hashtable.pyx":173 * def get_iter_test(self, object key, Py_ssize_t iterations): * cdef Py_ssize_t i, val * for i in range(iterations): # <<<<<<<<<<<<<< * k = kh_get_str(self.table, util.get_c_string(key)) * if k != self.table.n_buckets: */ __pyx_t_1 = __pyx_v_iterations; for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) { __pyx_v_i = __pyx_t_2; /* "pandas/hashtable.pyx":174 * cdef Py_ssize_t i, val * for i in range(iterations): * k = kh_get_str(self.table, util.get_c_string(key)) # <<<<<<<<<<<<<< * if k != self.table.n_buckets: * val = self.table.vals[k] */ __pyx_v_k = kh_get_str(__pyx_v_self->table, get_c_string(__pyx_v_key)); /* "pandas/hashtable.pyx":175 * for i in range(iterations): * k = kh_get_str(self.table, util.get_c_string(key)) * if k != self.table.n_buckets: # <<<<<<<<<<<<<< * val = self.table.vals[k] * */ __pyx_t_3 = ((__pyx_v_k != __pyx_v_self->table->n_buckets) != 0); if (__pyx_t_3) { /* "pandas/hashtable.pyx":176 * k = kh_get_str(self.table, util.get_c_string(key)) * if k != self.table.n_buckets: * val = self.table.vals[k] # <<<<<<<<<<<<<< * * cpdef set_item(self, object key, Py_ssize_t val): */ __pyx_v_val = (__pyx_v_self->table->vals[__pyx_v_k]); goto __pyx_L5; } __pyx_L5:; } __pyx_r = Py_None; __Pyx_INCREF(Py_None); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/hashtable.pyx":178 * val = self.table.vals[k] * * cpdef set_item(self, object key, Py_ssize_t val): # <<<<<<<<<<<<<< * cdef: * khiter_t k */ static PyObject *__pyx_pw_6pandas_9hashtable_15StringHashTable_9set_item(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_6pandas_9hashtable_15StringHashTable_set_item(struct __pyx_obj_6pandas_9hashtable_StringHashTable *__pyx_v_self, PyObject *__pyx_v_key, Py_ssize_t __pyx_v_val, int __pyx_skip_dispatch) { khiter_t __pyx_v_k; int __pyx_v_ret; char *__pyx_v_buf; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; kh_cstr_t __pyx_t_4; int __pyx_t_5; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("set_item", 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__set_item); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 178; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_6pandas_9hashtable_15StringHashTable_9set_item)) { __Pyx_XDECREF(__pyx_r); __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_val); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 178; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 178; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_v_key); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_key); __Pyx_GIVEREF(__pyx_v_key); PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 178; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(((PyObject *)__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/hashtable.pyx":181 * cdef: * khiter_t k * int ret = 0 # <<<<<<<<<<<<<< * char* buf * */ __pyx_v_ret = 0; /* "pandas/hashtable.pyx":184 * char* buf * * buf = util.get_c_string(key) # <<<<<<<<<<<<<< * * k = kh_put_str(self.table, buf, &ret) */ __pyx_v_buf = get_c_string(__pyx_v_key); /* "pandas/hashtable.pyx":186 * buf = util.get_c_string(key) * * k = kh_put_str(self.table, buf, &ret) # <<<<<<<<<<<<<< * self.table.keys[k] = key * if kh_exist_str(self.table, k): */ __pyx_v_k = kh_put_str(__pyx_v_self->table, __pyx_v_buf, (&__pyx_v_ret)); /* "pandas/hashtable.pyx":187 * * k = kh_put_str(self.table, buf, &ret) * self.table.keys[k] = key # <<<<<<<<<<<<<< * if kh_exist_str(self.table, k): * self.table.vals[k] = val */ __pyx_t_4 = __Pyx_PyObject_AsString(__pyx_v_key); if (unlikely((__pyx_t_4 == (kh_cstr_t)NULL) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 187; __pyx_clineno = __LINE__; goto __pyx_L1_error;} (__pyx_v_self->table->keys[__pyx_v_k]) = __pyx_t_4; /* "pandas/hashtable.pyx":188 * k = kh_put_str(self.table, buf, &ret) * self.table.keys[k] = key * if kh_exist_str(self.table, k): # <<<<<<<<<<<<<< * self.table.vals[k] = val * else: */ __pyx_t_5 = (kh_exist_str(__pyx_v_self->table, __pyx_v_k) != 0); if (__pyx_t_5) { /* "pandas/hashtable.pyx":189 * self.table.keys[k] = key * if kh_exist_str(self.table, k): * self.table.vals[k] = val # <<<<<<<<<<<<<< * else: * raise KeyError(key) */ (__pyx_v_self->table->vals[__pyx_v_k]) = __pyx_v_val; goto __pyx_L3; } /*else*/ { /* "pandas/hashtable.pyx":191 * self.table.vals[k] = val * else: * raise KeyError(key) # <<<<<<<<<<<<<< * * def get_indexer(self, ndarray[object] values): */ __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 191; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_key); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_key); __Pyx_GIVEREF(__pyx_v_key); __pyx_t_2 = PyObject_Call(__pyx_builtin_KeyError, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 191; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 191; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_L3:; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("pandas.hashtable.StringHashTable.set_item", __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_9hashtable_15StringHashTable_9set_item(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_6pandas_9hashtable_15StringHashTable_9set_item(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_key = 0; Py_ssize_t __pyx_v_val; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("set_item (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__key,&__pyx_n_s__val,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__key)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__val)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("set_item", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 178; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "set_item") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 178; __pyx_clineno = __LINE__; goto __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_key = values[0]; __pyx_v_val = __Pyx_PyIndex_AsSsize_t(values[1]); if (unlikely((__pyx_v_val == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 178; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("set_item", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 178; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.hashtable.StringHashTable.set_item", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pandas_9hashtable_15StringHashTable_8set_item(((struct __pyx_obj_6pandas_9hashtable_StringHashTable *)__pyx_v_self), __pyx_v_key, __pyx_v_val); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/hashtable.pyx":178 * val = self.table.vals[k] * * cpdef set_item(self, object key, Py_ssize_t val): # <<<<<<<<<<<<<< * cdef: * khiter_t k */ static PyObject *__pyx_pf_6pandas_9hashtable_15StringHashTable_8set_item(struct __pyx_obj_6pandas_9hashtable_StringHashTable *__pyx_v_self, PyObject *__pyx_v_key, Py_ssize_t __pyx_v_val) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("set_item", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = ((struct __pyx_vtabstruct_6pandas_9hashtable_StringHashTable *)__pyx_v_self->__pyx_vtab)->set_item(__pyx_v_self, __pyx_v_key, __pyx_v_val, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 178; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas.hashtable.StringHashTable.set_item", __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_9hashtable_15StringHashTable_11get_indexer(PyObject *__pyx_v_self, PyObject *__pyx_v_values); /*proto*/ static PyObject *__pyx_pw_6pandas_9hashtable_15StringHashTable_11get_indexer(PyObject *__pyx_v_self, PyObject *__pyx_v_values) { CYTHON_UNUSED int __pyx_lineno = 0; CYTHON_UNUSED const char *__pyx_filename = NULL; CYTHON_UNUSED int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("get_indexer (wrapper)", 0); if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 193; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_9hashtable_15StringHashTable_10get_indexer(((struct __pyx_obj_6pandas_9hashtable_StringHashTable *)__pyx_v_self), ((PyArrayObject *)__pyx_v_values)); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/hashtable.pyx":193 * raise KeyError(key) * * def get_indexer(self, ndarray[object] values): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = len(values) */ static PyObject *__pyx_pf_6pandas_9hashtable_15StringHashTable_10get_indexer(struct __pyx_obj_6pandas_9hashtable_StringHashTable *__pyx_v_self, PyArrayObject *__pyx_v_values) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_n; PyArrayObject *__pyx_v_labels = 0; char *__pyx_v_buf; __pyx_t_5numpy_int64_t *__pyx_v_resbuf; khiter_t __pyx_v_k; kh_str_t *__pyx_v_table; __Pyx_LocalBuf_ND __pyx_pybuffernd_labels; __Pyx_Buffer __pyx_pybuffer_labels; __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; kh_str_t *__pyx_t_8; Py_ssize_t __pyx_t_9; Py_ssize_t __pyx_t_10; int __pyx_t_11; int __pyx_t_12; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_indexer", 0); __pyx_pybuffer_labels.pybuffer.buf = NULL; __pyx_pybuffer_labels.refcount = 0; __pyx_pybuffernd_labels.data = NULL; __pyx_pybuffernd_labels.rcbuffer = &__pyx_pybuffer_labels; __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_filename = __pyx_f[0]; __pyx_lineno = 193; __pyx_clineno = __LINE__; goto __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/hashtable.pyx":195 * def get_indexer(self, ndarray[object] values): * cdef: * Py_ssize_t i, n = len(values) # <<<<<<<<<<<<<< * ndarray[int64_t] labels = np.empty(n, dtype=np.int64) * char *buf */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 195; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/hashtable.pyx":196 * cdef: * Py_ssize_t i, n = len(values) * ndarray[int64_t] labels = np.empty(n, dtype=np.int64) # <<<<<<<<<<<<<< * char *buf * int64_t *resbuf = labels.data */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 196; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 196; __pyx_clineno = __LINE__; goto __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_n); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 196; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 196; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 196; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_2)); __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 196; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s__int64); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 196; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__dtype), __pyx_t_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 196; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 196; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __Pyx_DECREF(((PyObject *)__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_filename = __pyx_f[0]; __pyx_lineno = 196; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_7 = ((PyArrayObject *)__pyx_t_6); { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_labels.rcbuffer->pybuffer, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { __pyx_v_labels = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_labels.rcbuffer->pybuffer.buf = NULL; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 196; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } else {__pyx_pybuffernd_labels.diminfo[0].strides = __pyx_pybuffernd_labels.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_labels.diminfo[0].shape = __pyx_pybuffernd_labels.rcbuffer->pybuffer.shape[0]; } } __pyx_t_7 = 0; __pyx_v_labels = ((PyArrayObject *)__pyx_t_6); __pyx_t_6 = 0; /* "pandas/hashtable.pyx":198 * ndarray[int64_t] labels = np.empty(n, dtype=np.int64) * char *buf * int64_t *resbuf = labels.data # <<<<<<<<<<<<<< * khiter_t k * kh_str_t *table = self.table */ __pyx_v_resbuf = ((__pyx_t_5numpy_int64_t *)__pyx_v_labels->data); /* "pandas/hashtable.pyx":200 * int64_t *resbuf = labels.data * khiter_t k * kh_str_t *table = self.table # <<<<<<<<<<<<<< * * for i in range(n): */ __pyx_t_8 = __pyx_v_self->table; __pyx_v_table = __pyx_t_8; /* "pandas/hashtable.pyx":202 * kh_str_t *table = self.table * * for i in range(n): # <<<<<<<<<<<<<< * buf = util.get_c_string(values[i]) * k = kh_get_str(table, buf) */ __pyx_t_1 = __pyx_v_n; for (__pyx_t_9 = 0; __pyx_t_9 < __pyx_t_1; __pyx_t_9+=1) { __pyx_v_i = __pyx_t_9; /* "pandas/hashtable.pyx":203 * * for i in range(n): * buf = util.get_c_string(values[i]) # <<<<<<<<<<<<<< * k = kh_get_str(table, buf) * if k != table.n_buckets: */ __pyx_t_10 = __pyx_v_i; __pyx_t_11 = -1; if (__pyx_t_10 < 0) { __pyx_t_10 += __pyx_pybuffernd_values.diminfo[0].shape; if (unlikely(__pyx_t_10 < 0)) __pyx_t_11 = 0; } else if (unlikely(__pyx_t_10 >= __pyx_pybuffernd_values.diminfo[0].shape)) __pyx_t_11 = 0; if (unlikely(__pyx_t_11 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_11); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 203; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_6 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_10, __pyx_pybuffernd_values.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_6); __pyx_v_buf = get_c_string(__pyx_t_6); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; /* "pandas/hashtable.pyx":204 * for i in range(n): * buf = util.get_c_string(values[i]) * k = kh_get_str(table, buf) # <<<<<<<<<<<<<< * if k != table.n_buckets: * resbuf[i] = table.vals[k] */ __pyx_v_k = kh_get_str(__pyx_v_table, __pyx_v_buf); /* "pandas/hashtable.pyx":205 * buf = util.get_c_string(values[i]) * k = kh_get_str(table, buf) * if k != table.n_buckets: # <<<<<<<<<<<<<< * resbuf[i] = table.vals[k] * else: */ __pyx_t_12 = ((__pyx_v_k != __pyx_v_table->n_buckets) != 0); if (__pyx_t_12) { /* "pandas/hashtable.pyx":206 * k = kh_get_str(table, buf) * if k != table.n_buckets: * resbuf[i] = table.vals[k] # <<<<<<<<<<<<<< * else: * resbuf[i] = -1 */ (__pyx_v_resbuf[__pyx_v_i]) = (__pyx_v_table->vals[__pyx_v_k]); goto __pyx_L5; } /*else*/ { /* "pandas/hashtable.pyx":208 * resbuf[i] = table.vals[k] * else: * resbuf[i] = -1 # <<<<<<<<<<<<<< * return labels * */ (__pyx_v_resbuf[__pyx_v_i]) = -1; } __pyx_L5:; } /* "pandas/hashtable.pyx":209 * else: * resbuf[i] = -1 * return labels # <<<<<<<<<<<<<< * * def unique(self, ndarray[object] values): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_labels)); __pyx_r = ((PyObject *)__pyx_v_labels); goto __pyx_L0; __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_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_labels.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.hashtable.StringHashTable.get_indexer", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_labels.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_labels); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_9hashtable_15StringHashTable_13unique(PyObject *__pyx_v_self, PyObject *__pyx_v_values); /*proto*/ static PyObject *__pyx_pw_6pandas_9hashtable_15StringHashTable_13unique(PyObject *__pyx_v_self, PyObject *__pyx_v_values) { CYTHON_UNUSED int __pyx_lineno = 0; CYTHON_UNUSED const char *__pyx_filename = NULL; CYTHON_UNUSED int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("unique (wrapper)", 0); if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 211; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_9hashtable_15StringHashTable_12unique(((struct __pyx_obj_6pandas_9hashtable_StringHashTable *)__pyx_v_self), ((PyArrayObject *)__pyx_v_values)); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/hashtable.pyx":211 * return labels * * def unique(self, ndarray[object] values): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = len(values) */ static PyObject *__pyx_pf_6pandas_9hashtable_15StringHashTable_12unique(struct __pyx_obj_6pandas_9hashtable_StringHashTable *__pyx_v_self, PyArrayObject *__pyx_v_values) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_n; Py_ssize_t __pyx_v_count; int __pyx_v_ret; PyObject *__pyx_v_val = 0; char *__pyx_v_buf; khiter_t __pyx_v_k; struct __pyx_obj_6pandas_9hashtable_ObjectVector *__pyx_v_uniques = 0; __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; Py_ssize_t __pyx_t_3; Py_ssize_t __pyx_t_4; int __pyx_t_5; int __pyx_t_6; PyObject *__pyx_t_7 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("unique", 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_object, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 211; __pyx_clineno = __LINE__; goto __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/hashtable.pyx":213 * def unique(self, ndarray[object] values): * cdef: * Py_ssize_t i, n = len(values) # <<<<<<<<<<<<<< * Py_ssize_t idx, count = 0 * int ret = 0 */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 213; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/hashtable.pyx":214 * cdef: * Py_ssize_t i, n = len(values) * Py_ssize_t idx, count = 0 # <<<<<<<<<<<<<< * int ret = 0 * object val */ __pyx_v_count = 0; /* "pandas/hashtable.pyx":215 * Py_ssize_t i, n = len(values) * Py_ssize_t idx, count = 0 * int ret = 0 # <<<<<<<<<<<<<< * object val * char *buf */ __pyx_v_ret = 0; /* "pandas/hashtable.pyx":219 * char *buf * khiter_t k * ObjectVector uniques = ObjectVector() # <<<<<<<<<<<<<< * * for i in range(n): */ __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_6pandas_9hashtable_ObjectVector)), ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 219; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_v_uniques = ((struct __pyx_obj_6pandas_9hashtable_ObjectVector *)__pyx_t_2); __pyx_t_2 = 0; /* "pandas/hashtable.pyx":221 * ObjectVector uniques = ObjectVector() * * for i in range(n): # <<<<<<<<<<<<<< * val = values[i] * buf = util.get_c_string(val) */ __pyx_t_1 = __pyx_v_n; for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_1; __pyx_t_3+=1) { __pyx_v_i = __pyx_t_3; /* "pandas/hashtable.pyx":222 * * for i in range(n): * val = values[i] # <<<<<<<<<<<<<< * buf = util.get_c_string(val) * k = kh_get_str(self.table, buf) */ __pyx_t_4 = __pyx_v_i; __pyx_t_5 = -1; if (__pyx_t_4 < 0) { __pyx_t_4 += __pyx_pybuffernd_values.diminfo[0].shape; if (unlikely(__pyx_t_4 < 0)) __pyx_t_5 = 0; } else if (unlikely(__pyx_t_4 >= __pyx_pybuffernd_values.diminfo[0].shape)) __pyx_t_5 = 0; if (unlikely(__pyx_t_5 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_5); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 222; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_2 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_4, __pyx_pybuffernd_values.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_2); __Pyx_XDECREF_SET(__pyx_v_val, __pyx_t_2); __pyx_t_2 = 0; /* "pandas/hashtable.pyx":223 * for i in range(n): * val = values[i] * buf = util.get_c_string(val) # <<<<<<<<<<<<<< * k = kh_get_str(self.table, buf) * if k == self.table.n_buckets: */ __pyx_v_buf = get_c_string(__pyx_v_val); /* "pandas/hashtable.pyx":224 * val = values[i] * buf = util.get_c_string(val) * k = kh_get_str(self.table, buf) # <<<<<<<<<<<<<< * if k == self.table.n_buckets: * k = kh_put_str(self.table, buf, &ret) */ __pyx_v_k = kh_get_str(__pyx_v_self->table, __pyx_v_buf); /* "pandas/hashtable.pyx":225 * buf = util.get_c_string(val) * k = kh_get_str(self.table, buf) * if k == self.table.n_buckets: # <<<<<<<<<<<<<< * k = kh_put_str(self.table, buf, &ret) * # print 'putting %s, %s' % (val, count) */ __pyx_t_6 = ((__pyx_v_k == __pyx_v_self->table->n_buckets) != 0); if (__pyx_t_6) { /* "pandas/hashtable.pyx":226 * k = kh_get_str(self.table, buf) * if k == self.table.n_buckets: * k = kh_put_str(self.table, buf, &ret) # <<<<<<<<<<<<<< * # print 'putting %s, %s' % (val, count) * count += 1 */ __pyx_v_k = kh_put_str(__pyx_v_self->table, __pyx_v_buf, (&__pyx_v_ret)); /* "pandas/hashtable.pyx":228 * k = kh_put_str(self.table, buf, &ret) * # print 'putting %s, %s' % (val, count) * count += 1 # <<<<<<<<<<<<<< * uniques.append(val) * */ __pyx_v_count = (__pyx_v_count + 1); /* "pandas/hashtable.pyx":229 * # print 'putting %s, %s' % (val, count) * count += 1 * uniques.append(val) # <<<<<<<<<<<<<< * * # return None */ __pyx_t_2 = __pyx_f_6pandas_9hashtable_12ObjectVector_append(__pyx_v_uniques, __pyx_v_val); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 229; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; goto __pyx_L5; } __pyx_L5:; } /* "pandas/hashtable.pyx":232 * * # return None * return uniques.to_array() # <<<<<<<<<<<<<< * * def factorize(self, ndarray[object] values): */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_uniques), __pyx_n_s__to_array); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 232; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_7 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 232; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_7; __pyx_t_7 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_7); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __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.hashtable.StringHashTable.unique", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF(__pyx_v_val); __Pyx_XDECREF((PyObject *)__pyx_v_uniques); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_9hashtable_15StringHashTable_15factorize(PyObject *__pyx_v_self, PyObject *__pyx_v_values); /*proto*/ static PyObject *__pyx_pw_6pandas_9hashtable_15StringHashTable_15factorize(PyObject *__pyx_v_self, PyObject *__pyx_v_values) { CYTHON_UNUSED int __pyx_lineno = 0; CYTHON_UNUSED const char *__pyx_filename = NULL; CYTHON_UNUSED int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("factorize (wrapper)", 0); if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 234; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_9hashtable_15StringHashTable_14factorize(((struct __pyx_obj_6pandas_9hashtable_StringHashTable *)__pyx_v_self), ((PyArrayObject *)__pyx_v_values)); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/hashtable.pyx":234 * return uniques.to_array() * * def factorize(self, ndarray[object] values): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = len(values) */ static PyObject *__pyx_pf_6pandas_9hashtable_15StringHashTable_14factorize(struct __pyx_obj_6pandas_9hashtable_StringHashTable *__pyx_v_self, PyArrayObject *__pyx_v_values) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_n; PyArrayObject *__pyx_v_labels = 0; PyObject *__pyx_v_reverse = 0; Py_ssize_t __pyx_v_idx; Py_ssize_t __pyx_v_count; int __pyx_v_ret; PyObject *__pyx_v_val = 0; char *__pyx_v_buf; khiter_t __pyx_v_k; __Pyx_LocalBuf_ND __pyx_pybuffernd_labels; __Pyx_Buffer __pyx_pybuffer_labels; __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; Py_ssize_t __pyx_t_8; Py_ssize_t __pyx_t_9; int __pyx_t_10; int __pyx_t_11; Py_ssize_t __pyx_t_12; Py_ssize_t __pyx_t_13; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("factorize", 0); __pyx_pybuffer_labels.pybuffer.buf = NULL; __pyx_pybuffer_labels.refcount = 0; __pyx_pybuffernd_labels.data = NULL; __pyx_pybuffernd_labels.rcbuffer = &__pyx_pybuffer_labels; __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_filename = __pyx_f[0]; __pyx_lineno = 234; __pyx_clineno = __LINE__; goto __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/hashtable.pyx":236 * def factorize(self, ndarray[object] values): * cdef: * Py_ssize_t i, n = len(values) # <<<<<<<<<<<<<< * ndarray[int64_t] labels = np.empty(n, dtype=np.int64) * dict reverse = {} */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 236; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/hashtable.pyx":237 * cdef: * Py_ssize_t i, n = len(values) * ndarray[int64_t] labels = np.empty(n, dtype=np.int64) # <<<<<<<<<<<<<< * dict reverse = {} * Py_ssize_t idx, count = 0 */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 237; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 237; __pyx_clineno = __LINE__; goto __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_n); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 237; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 237; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 237; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_2)); __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 237; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s__int64); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 237; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__dtype), __pyx_t_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 237; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 237; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __Pyx_DECREF(((PyObject *)__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_filename = __pyx_f[0]; __pyx_lineno = 237; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_7 = ((PyArrayObject *)__pyx_t_6); { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_labels.rcbuffer->pybuffer, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { __pyx_v_labels = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_labels.rcbuffer->pybuffer.buf = NULL; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 237; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } else {__pyx_pybuffernd_labels.diminfo[0].strides = __pyx_pybuffernd_labels.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_labels.diminfo[0].shape = __pyx_pybuffernd_labels.rcbuffer->pybuffer.shape[0]; } } __pyx_t_7 = 0; __pyx_v_labels = ((PyArrayObject *)__pyx_t_6); __pyx_t_6 = 0; /* "pandas/hashtable.pyx":238 * Py_ssize_t i, n = len(values) * ndarray[int64_t] labels = np.empty(n, dtype=np.int64) * dict reverse = {} # <<<<<<<<<<<<<< * Py_ssize_t idx, count = 0 * int ret = 0 */ __pyx_t_6 = PyDict_New(); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 238; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_6)); __pyx_v_reverse = ((PyObject*)__pyx_t_6); __pyx_t_6 = 0; /* "pandas/hashtable.pyx":239 * ndarray[int64_t] labels = np.empty(n, dtype=np.int64) * dict reverse = {} * Py_ssize_t idx, count = 0 # <<<<<<<<<<<<<< * int ret = 0 * object val */ __pyx_v_count = 0; /* "pandas/hashtable.pyx":240 * dict reverse = {} * Py_ssize_t idx, count = 0 * int ret = 0 # <<<<<<<<<<<<<< * object val * char *buf */ __pyx_v_ret = 0; /* "pandas/hashtable.pyx":245 * khiter_t k * * for i in range(n): # <<<<<<<<<<<<<< * val = values[i] * buf = util.get_c_string(val) */ __pyx_t_1 = __pyx_v_n; for (__pyx_t_8 = 0; __pyx_t_8 < __pyx_t_1; __pyx_t_8+=1) { __pyx_v_i = __pyx_t_8; /* "pandas/hashtable.pyx":246 * * for i in range(n): * val = values[i] # <<<<<<<<<<<<<< * buf = util.get_c_string(val) * k = kh_get_str(self.table, buf) */ __pyx_t_9 = __pyx_v_i; __pyx_t_10 = -1; if (__pyx_t_9 < 0) { __pyx_t_9 += __pyx_pybuffernd_values.diminfo[0].shape; if (unlikely(__pyx_t_9 < 0)) __pyx_t_10 = 0; } else if (unlikely(__pyx_t_9 >= __pyx_pybuffernd_values.diminfo[0].shape)) __pyx_t_10 = 0; if (unlikely(__pyx_t_10 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_10); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 246; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_6 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_9, __pyx_pybuffernd_values.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_6); __Pyx_XDECREF_SET(__pyx_v_val, __pyx_t_6); __pyx_t_6 = 0; /* "pandas/hashtable.pyx":247 * for i in range(n): * val = values[i] * buf = util.get_c_string(val) # <<<<<<<<<<<<<< * k = kh_get_str(self.table, buf) * if k != self.table.n_buckets: */ __pyx_v_buf = get_c_string(__pyx_v_val); /* "pandas/hashtable.pyx":248 * val = values[i] * buf = util.get_c_string(val) * k = kh_get_str(self.table, buf) # <<<<<<<<<<<<<< * if k != self.table.n_buckets: * idx = self.table.vals[k] */ __pyx_v_k = kh_get_str(__pyx_v_self->table, __pyx_v_buf); /* "pandas/hashtable.pyx":249 * buf = util.get_c_string(val) * k = kh_get_str(self.table, buf) * if k != self.table.n_buckets: # <<<<<<<<<<<<<< * idx = self.table.vals[k] * labels[i] = idx */ __pyx_t_11 = ((__pyx_v_k != __pyx_v_self->table->n_buckets) != 0); if (__pyx_t_11) { /* "pandas/hashtable.pyx":250 * k = kh_get_str(self.table, buf) * if k != self.table.n_buckets: * idx = self.table.vals[k] # <<<<<<<<<<<<<< * labels[i] = idx * else: */ __pyx_v_idx = (__pyx_v_self->table->vals[__pyx_v_k]); /* "pandas/hashtable.pyx":251 * if k != self.table.n_buckets: * idx = self.table.vals[k] * labels[i] = idx # <<<<<<<<<<<<<< * else: * k = kh_put_str(self.table, buf, &ret) */ __pyx_t_12 = __pyx_v_i; __pyx_t_10 = -1; if (__pyx_t_12 < 0) { __pyx_t_12 += __pyx_pybuffernd_labels.diminfo[0].shape; if (unlikely(__pyx_t_12 < 0)) __pyx_t_10 = 0; } else if (unlikely(__pyx_t_12 >= __pyx_pybuffernd_labels.diminfo[0].shape)) __pyx_t_10 = 0; if (unlikely(__pyx_t_10 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_10); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 251; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_labels.rcbuffer->pybuffer.buf, __pyx_t_12, __pyx_pybuffernd_labels.diminfo[0].strides) = __pyx_v_idx; goto __pyx_L5; } /*else*/ { /* "pandas/hashtable.pyx":253 * labels[i] = idx * else: * k = kh_put_str(self.table, buf, &ret) # <<<<<<<<<<<<<< * # print 'putting %s, %s' % (val, count) * */ __pyx_v_k = kh_put_str(__pyx_v_self->table, __pyx_v_buf, (&__pyx_v_ret)); /* "pandas/hashtable.pyx":256 * # print 'putting %s, %s' % (val, count) * * self.table.vals[k] = count # <<<<<<<<<<<<<< * reverse[count] = val * labels[i] = count */ (__pyx_v_self->table->vals[__pyx_v_k]) = __pyx_v_count; /* "pandas/hashtable.pyx":257 * * self.table.vals[k] = count * reverse[count] = val # <<<<<<<<<<<<<< * labels[i] = count * count += 1 */ if (__Pyx_SetItemInt(((PyObject *)__pyx_v_reverse), __pyx_v_count, __pyx_v_val, sizeof(Py_ssize_t), PyInt_FromSsize_t, 0, 1, 1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 257; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/hashtable.pyx":258 * self.table.vals[k] = count * reverse[count] = val * labels[i] = count # <<<<<<<<<<<<<< * count += 1 * */ __pyx_t_13 = __pyx_v_i; __pyx_t_10 = -1; if (__pyx_t_13 < 0) { __pyx_t_13 += __pyx_pybuffernd_labels.diminfo[0].shape; if (unlikely(__pyx_t_13 < 0)) __pyx_t_10 = 0; } else if (unlikely(__pyx_t_13 >= __pyx_pybuffernd_labels.diminfo[0].shape)) __pyx_t_10 = 0; if (unlikely(__pyx_t_10 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_10); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 258; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_labels.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_labels.diminfo[0].strides) = __pyx_v_count; /* "pandas/hashtable.pyx":259 * reverse[count] = val * labels[i] = count * count += 1 # <<<<<<<<<<<<<< * * # return None */ __pyx_v_count = (__pyx_v_count + 1); } __pyx_L5:; } /* "pandas/hashtable.pyx":262 * * # return None * return reverse, labels # <<<<<<<<<<<<<< * * cdef class Int32HashTable(HashTable): */ __Pyx_XDECREF(__pyx_r); __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 262; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(((PyObject *)__pyx_v_reverse)); PyTuple_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_v_reverse)); __Pyx_GIVEREF(((PyObject *)__pyx_v_reverse)); __Pyx_INCREF(((PyObject *)__pyx_v_labels)); PyTuple_SET_ITEM(__pyx_t_6, 1, ((PyObject *)__pyx_v_labels)); __Pyx_GIVEREF(((PyObject *)__pyx_v_labels)); __pyx_r = ((PyObject *)__pyx_t_6); __pyx_t_6 = 0; goto __pyx_L0; __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_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_labels.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.hashtable.StringHashTable.factorize", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_labels.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_labels); __Pyx_XDECREF(__pyx_v_reverse); __Pyx_XDECREF(__pyx_v_val); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pandas_9hashtable_14Int32HashTable_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_pw_6pandas_9hashtable_14Int32HashTable_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_size_hint = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__size_hint,0}; PyObject* values[1] = {0}; values[0] = ((PyObject *)__pyx_int_1); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__size_hint); if (value) { values[0] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 267; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_size_hint = values[0]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("__init__", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 267; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.hashtable.Int32HashTable.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return -1; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pandas_9hashtable_14Int32HashTable___init__(((struct __pyx_obj_6pandas_9hashtable_Int32HashTable *)__pyx_v_self), __pyx_v_size_hint); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/hashtable.pyx":267 * cdef kh_int32_t *table * * def __init__(self, size_hint=1): # <<<<<<<<<<<<<< * if size_hint is not None: * kh_resize_int32(self.table, size_hint) */ static int __pyx_pf_6pandas_9hashtable_14Int32HashTable___init__(struct __pyx_obj_6pandas_9hashtable_Int32HashTable *__pyx_v_self, PyObject *__pyx_v_size_hint) { int __pyx_r; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; khint_t __pyx_t_3; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__init__", 0); /* "pandas/hashtable.pyx":268 * * def __init__(self, size_hint=1): * if size_hint is not None: # <<<<<<<<<<<<<< * kh_resize_int32(self.table, size_hint) * */ __pyx_t_1 = (__pyx_v_size_hint != Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { /* "pandas/hashtable.pyx":269 * def __init__(self, size_hint=1): * if size_hint is not None: * kh_resize_int32(self.table, size_hint) # <<<<<<<<<<<<<< * * def __cinit__(self): */ __pyx_t_3 = __Pyx_PyInt_from_py_npy_uint32(__pyx_v_size_hint); if (unlikely((__pyx_t_3 == (khint_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 269; __pyx_clineno = __LINE__; goto __pyx_L1_error;} kh_resize_int32(__pyx_v_self->table, __pyx_t_3); goto __pyx_L3; } __pyx_L3:; __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("pandas.hashtable.Int32HashTable.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pandas_9hashtable_14Int32HashTable_3__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_pw_6pandas_9hashtable_14Int32HashTable_3__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return -1;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__cinit__", 0))) return -1; __pyx_r = __pyx_pf_6pandas_9hashtable_14Int32HashTable_2__cinit__(((struct __pyx_obj_6pandas_9hashtable_Int32HashTable *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/hashtable.pyx":271 * kh_resize_int32(self.table, size_hint) * * def __cinit__(self): # <<<<<<<<<<<<<< * self.table = kh_init_int32() * */ static int __pyx_pf_6pandas_9hashtable_14Int32HashTable_2__cinit__(struct __pyx_obj_6pandas_9hashtable_Int32HashTable *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__cinit__", 0); /* "pandas/hashtable.pyx":272 * * def __cinit__(self): * self.table = kh_init_int32() # <<<<<<<<<<<<<< * * def __dealloc__(self): */ __pyx_v_self->table = kh_init_int32(); __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static void __pyx_pw_6pandas_9hashtable_14Int32HashTable_5__dealloc__(PyObject *__pyx_v_self); /*proto*/ static void __pyx_pw_6pandas_9hashtable_14Int32HashTable_5__dealloc__(PyObject *__pyx_v_self) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0); __pyx_pf_6pandas_9hashtable_14Int32HashTable_4__dealloc__(((struct __pyx_obj_6pandas_9hashtable_Int32HashTable *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); } /* "pandas/hashtable.pyx":274 * self.table = kh_init_int32() * * def __dealloc__(self): # <<<<<<<<<<<<<< * kh_destroy_int32(self.table) * */ static void __pyx_pf_6pandas_9hashtable_14Int32HashTable_4__dealloc__(struct __pyx_obj_6pandas_9hashtable_Int32HashTable *__pyx_v_self) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__dealloc__", 0); /* "pandas/hashtable.pyx":275 * * def __dealloc__(self): * kh_destroy_int32(self.table) # <<<<<<<<<<<<<< * * cdef inline int check_type(self, object val): */ kh_destroy_int32(__pyx_v_self->table); __Pyx_RefNannyFinishContext(); } /* "pandas/hashtable.pyx":277 * kh_destroy_int32(self.table) * * cdef inline int check_type(self, object val): # <<<<<<<<<<<<<< * return util.is_string_object(val) * */ static CYTHON_INLINE int __pyx_f_6pandas_9hashtable_14Int32HashTable_check_type(CYTHON_UNUSED struct __pyx_obj_6pandas_9hashtable_Int32HashTable *__pyx_v_self, PyObject *__pyx_v_val) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("check_type", 0); /* "pandas/hashtable.pyx":278 * * cdef inline int check_type(self, object val): * return util.is_string_object(val) # <<<<<<<<<<<<<< * * cpdef get_item(self, int32_t val): */ __pyx_r = is_string_object(__pyx_v_val); goto __pyx_L0; __pyx_r = 0; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/hashtable.pyx":280 * return util.is_string_object(val) * * cpdef get_item(self, int32_t val): # <<<<<<<<<<<<<< * cdef khiter_t k * k = kh_get_int32(self.table, val) */ static PyObject *__pyx_pw_6pandas_9hashtable_14Int32HashTable_7get_item(PyObject *__pyx_v_self, PyObject *__pyx_arg_val); /*proto*/ static PyObject *__pyx_f_6pandas_9hashtable_14Int32HashTable_get_item(struct __pyx_obj_6pandas_9hashtable_Int32HashTable *__pyx_v_self, __pyx_t_5numpy_int32_t __pyx_v_val, int __pyx_skip_dispatch) { khiter_t __pyx_v_k; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_t_4; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_item", 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__get_item); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 280; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_6pandas_9hashtable_14Int32HashTable_7get_item)) { __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyInt_to_py_npy_int32(__pyx_v_val); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 280; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 280; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 280; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(((PyObject *)__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/hashtable.pyx":282 * cpdef get_item(self, int32_t val): * cdef khiter_t k * k = kh_get_int32(self.table, val) # <<<<<<<<<<<<<< * if k != self.table.n_buckets: * return self.table.vals[k] */ __pyx_v_k = kh_get_int32(__pyx_v_self->table, __pyx_v_val); /* "pandas/hashtable.pyx":283 * cdef khiter_t k * k = kh_get_int32(self.table, val) * if k != self.table.n_buckets: # <<<<<<<<<<<<<< * return self.table.vals[k] * else: */ __pyx_t_4 = ((__pyx_v_k != __pyx_v_self->table->n_buckets) != 0); if (__pyx_t_4) { /* "pandas/hashtable.pyx":284 * k = kh_get_int32(self.table, val) * if k != self.table.n_buckets: * return self.table.vals[k] # <<<<<<<<<<<<<< * else: * raise KeyError(val) */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyInt_FromSize_t((__pyx_v_self->table->vals[__pyx_v_k])); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 284; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; goto __pyx_L3; } /*else*/ { /* "pandas/hashtable.pyx":286 * return self.table.vals[k] * else: * raise KeyError(val) # <<<<<<<<<<<<<< * * def get_iter_test(self, int32_t key, Py_ssize_t iterations): */ __pyx_t_1 = __Pyx_PyInt_to_py_npy_int32(__pyx_v_val); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 286; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 286; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyObject_Call(__pyx_builtin_KeyError, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 286; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(((PyObject *)__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_filename = __pyx_f[0]; __pyx_lineno = 286; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_L3:; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("pandas.hashtable.Int32HashTable.get_item", __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_9hashtable_14Int32HashTable_7get_item(PyObject *__pyx_v_self, PyObject *__pyx_arg_val); /*proto*/ static PyObject *__pyx_pw_6pandas_9hashtable_14Int32HashTable_7get_item(PyObject *__pyx_v_self, PyObject *__pyx_arg_val) { __pyx_t_5numpy_int32_t __pyx_v_val; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("get_item (wrapper)", 0); assert(__pyx_arg_val); { __pyx_v_val = __Pyx_PyInt_from_py_npy_int32(__pyx_arg_val); if (unlikely((__pyx_v_val == (npy_int32)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 280; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; __Pyx_AddTraceback("pandas.hashtable.Int32HashTable.get_item", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pandas_9hashtable_14Int32HashTable_6get_item(((struct __pyx_obj_6pandas_9hashtable_Int32HashTable *)__pyx_v_self), ((__pyx_t_5numpy_int32_t)__pyx_v_val)); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/hashtable.pyx":280 * return util.is_string_object(val) * * cpdef get_item(self, int32_t val): # <<<<<<<<<<<<<< * cdef khiter_t k * k = kh_get_int32(self.table, val) */ static PyObject *__pyx_pf_6pandas_9hashtable_14Int32HashTable_6get_item(struct __pyx_obj_6pandas_9hashtable_Int32HashTable *__pyx_v_self, __pyx_t_5numpy_int32_t __pyx_v_val) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_item", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = ((struct __pyx_vtabstruct_6pandas_9hashtable_Int32HashTable *)__pyx_v_self->__pyx_vtab)->get_item(__pyx_v_self, __pyx_v_val, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 280; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas.hashtable.Int32HashTable.get_item", __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_9hashtable_14Int32HashTable_9get_iter_test(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_6pandas_9hashtable_14Int32HashTable_9get_iter_test(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { CYTHON_UNUSED __pyx_t_5numpy_int32_t __pyx_v_key; Py_ssize_t __pyx_v_iterations; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("get_iter_test (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__key,&__pyx_n_s__iterations,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__key)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__iterations)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("get_iter_test", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 288; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "get_iter_test") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 288; __pyx_clineno = __LINE__; goto __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_key = __Pyx_PyInt_from_py_npy_int32(values[0]); if (unlikely((__pyx_v_key == (npy_int32)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 288; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_iterations = __Pyx_PyIndex_AsSsize_t(values[1]); if (unlikely((__pyx_v_iterations == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 288; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("get_iter_test", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 288; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.hashtable.Int32HashTable.get_iter_test", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pandas_9hashtable_14Int32HashTable_8get_iter_test(((struct __pyx_obj_6pandas_9hashtable_Int32HashTable *)__pyx_v_self), __pyx_v_key, __pyx_v_iterations); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/hashtable.pyx":288 * raise KeyError(val) * * def get_iter_test(self, int32_t key, Py_ssize_t iterations): # <<<<<<<<<<<<<< * cdef Py_ssize_t i, val=0 * for i in range(iterations): */ static PyObject *__pyx_pf_6pandas_9hashtable_14Int32HashTable_8get_iter_test(struct __pyx_obj_6pandas_9hashtable_Int32HashTable *__pyx_v_self, CYTHON_UNUSED __pyx_t_5numpy_int32_t __pyx_v_key, Py_ssize_t __pyx_v_iterations) { CYTHON_UNUSED Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_val; khint_t __pyx_v_k; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; Py_ssize_t __pyx_t_2; int __pyx_t_3; __Pyx_RefNannySetupContext("get_iter_test", 0); /* "pandas/hashtable.pyx":289 * * def get_iter_test(self, int32_t key, Py_ssize_t iterations): * cdef Py_ssize_t i, val=0 # <<<<<<<<<<<<<< * for i in range(iterations): * k = kh_get_int32(self.table, val) */ __pyx_v_val = 0; /* "pandas/hashtable.pyx":290 * def get_iter_test(self, int32_t key, Py_ssize_t iterations): * cdef Py_ssize_t i, val=0 * for i in range(iterations): # <<<<<<<<<<<<<< * k = kh_get_int32(self.table, val) * if k != self.table.n_buckets: */ __pyx_t_1 = __pyx_v_iterations; for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) { __pyx_v_i = __pyx_t_2; /* "pandas/hashtable.pyx":291 * cdef Py_ssize_t i, val=0 * for i in range(iterations): * k = kh_get_int32(self.table, val) # <<<<<<<<<<<<<< * if k != self.table.n_buckets: * val = self.table.vals[k] */ __pyx_v_k = kh_get_int32(__pyx_v_self->table, __pyx_v_val); /* "pandas/hashtable.pyx":292 * for i in range(iterations): * k = kh_get_int32(self.table, val) * if k != self.table.n_buckets: # <<<<<<<<<<<<<< * val = self.table.vals[k] * */ __pyx_t_3 = ((__pyx_v_k != __pyx_v_self->table->n_buckets) != 0); if (__pyx_t_3) { /* "pandas/hashtable.pyx":293 * k = kh_get_int32(self.table, val) * if k != self.table.n_buckets: * val = self.table.vals[k] # <<<<<<<<<<<<<< * * cpdef set_item(self, int32_t key, Py_ssize_t val): */ __pyx_v_val = (__pyx_v_self->table->vals[__pyx_v_k]); goto __pyx_L5; } __pyx_L5:; } __pyx_r = Py_None; __Pyx_INCREF(Py_None); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/hashtable.pyx":295 * val = self.table.vals[k] * * cpdef set_item(self, int32_t key, Py_ssize_t val): # <<<<<<<<<<<<<< * cdef: * khiter_t k */ static PyObject *__pyx_pw_6pandas_9hashtable_14Int32HashTable_11set_item(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_6pandas_9hashtable_14Int32HashTable_set_item(struct __pyx_obj_6pandas_9hashtable_Int32HashTable *__pyx_v_self, __pyx_t_5numpy_int32_t __pyx_v_key, Py_ssize_t __pyx_v_val, int __pyx_skip_dispatch) { khiter_t __pyx_v_k; int __pyx_v_ret; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; int __pyx_t_5; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("set_item", 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__set_item); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 295; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_6pandas_9hashtable_14Int32HashTable_11set_item)) { __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyInt_to_py_npy_int32(__pyx_v_key); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 295; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyInt_FromSsize_t(__pyx_v_val); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 295; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 295; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_2 = 0; __pyx_t_3 = 0; __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 295; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __pyx_r = __pyx_t_3; __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } /* "pandas/hashtable.pyx":298 * cdef: * khiter_t k * int ret = 0 # <<<<<<<<<<<<<< * * k = kh_put_int32(self.table, key, &ret) */ __pyx_v_ret = 0; /* "pandas/hashtable.pyx":300 * int ret = 0 * * k = kh_put_int32(self.table, key, &ret) # <<<<<<<<<<<<<< * self.table.keys[k] = key * if kh_exist_int32(self.table, k): */ __pyx_v_k = kh_put_int32(__pyx_v_self->table, __pyx_v_key, (&__pyx_v_ret)); /* "pandas/hashtable.pyx":301 * * k = kh_put_int32(self.table, key, &ret) * self.table.keys[k] = key # <<<<<<<<<<<<<< * if kh_exist_int32(self.table, k): * self.table.vals[k] = val */ (__pyx_v_self->table->keys[__pyx_v_k]) = __pyx_v_key; /* "pandas/hashtable.pyx":302 * k = kh_put_int32(self.table, key, &ret) * self.table.keys[k] = key * if kh_exist_int32(self.table, k): # <<<<<<<<<<<<<< * self.table.vals[k] = val * else: */ __pyx_t_5 = (kh_exist_int32(__pyx_v_self->table, __pyx_v_k) != 0); if (__pyx_t_5) { /* "pandas/hashtable.pyx":303 * self.table.keys[k] = key * if kh_exist_int32(self.table, k): * self.table.vals[k] = val # <<<<<<<<<<<<<< * else: * raise KeyError(key) */ (__pyx_v_self->table->vals[__pyx_v_k]) = __pyx_v_val; goto __pyx_L3; } /*else*/ { /* "pandas/hashtable.pyx":305 * self.table.vals[k] = val * else: * raise KeyError(key) # <<<<<<<<<<<<<< * * def map_locations(self, ndarray[int32_t] values): */ __pyx_t_1 = __Pyx_PyInt_to_py_npy_int32(__pyx_v_key); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 305; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 305; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyObject_Call(__pyx_builtin_KeyError, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 305; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 305; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_L3:; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("pandas.hashtable.Int32HashTable.set_item", __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_9hashtable_14Int32HashTable_11set_item(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_6pandas_9hashtable_14Int32HashTable_11set_item(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { __pyx_t_5numpy_int32_t __pyx_v_key; Py_ssize_t __pyx_v_val; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("set_item (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__key,&__pyx_n_s__val,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__key)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__val)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("set_item", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 295; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "set_item") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 295; __pyx_clineno = __LINE__; goto __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_key = __Pyx_PyInt_from_py_npy_int32(values[0]); if (unlikely((__pyx_v_key == (npy_int32)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 295; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_val = __Pyx_PyIndex_AsSsize_t(values[1]); if (unlikely((__pyx_v_val == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 295; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("set_item", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 295; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.hashtable.Int32HashTable.set_item", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pandas_9hashtable_14Int32HashTable_10set_item(((struct __pyx_obj_6pandas_9hashtable_Int32HashTable *)__pyx_v_self), __pyx_v_key, __pyx_v_val); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/hashtable.pyx":295 * val = self.table.vals[k] * * cpdef set_item(self, int32_t key, Py_ssize_t val): # <<<<<<<<<<<<<< * cdef: * khiter_t k */ static PyObject *__pyx_pf_6pandas_9hashtable_14Int32HashTable_10set_item(struct __pyx_obj_6pandas_9hashtable_Int32HashTable *__pyx_v_self, __pyx_t_5numpy_int32_t __pyx_v_key, Py_ssize_t __pyx_v_val) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("set_item", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = ((struct __pyx_vtabstruct_6pandas_9hashtable_Int32HashTable *)__pyx_v_self->__pyx_vtab)->set_item(__pyx_v_self, __pyx_v_key, __pyx_v_val, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 295; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas.hashtable.Int32HashTable.set_item", __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_9hashtable_14Int32HashTable_13map_locations(PyObject *__pyx_v_self, PyObject *__pyx_v_values); /*proto*/ static PyObject *__pyx_pw_6pandas_9hashtable_14Int32HashTable_13map_locations(PyObject *__pyx_v_self, PyObject *__pyx_v_values) { CYTHON_UNUSED int __pyx_lineno = 0; CYTHON_UNUSED const char *__pyx_filename = NULL; CYTHON_UNUSED int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("map_locations (wrapper)", 0); if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 307; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_9hashtable_14Int32HashTable_12map_locations(((struct __pyx_obj_6pandas_9hashtable_Int32HashTable *)__pyx_v_self), ((PyArrayObject *)__pyx_v_values)); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/hashtable.pyx":307 * raise KeyError(key) * * def map_locations(self, ndarray[int32_t] values): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = len(values) */ static PyObject *__pyx_pf_6pandas_9hashtable_14Int32HashTable_12map_locations(struct __pyx_obj_6pandas_9hashtable_Int32HashTable *__pyx_v_self, PyArrayObject *__pyx_v_values) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_n; int __pyx_v_ret; __pyx_t_5numpy_int32_t __pyx_v_val; khiter_t __pyx_v_k; __Pyx_LocalBuf_ND __pyx_pybuffernd_values; __Pyx_Buffer __pyx_pybuffer_values; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; Py_ssize_t __pyx_t_2; Py_ssize_t __pyx_t_3; int __pyx_t_4; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("map_locations", 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_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 307; __pyx_clineno = __LINE__; goto __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/hashtable.pyx":309 * def map_locations(self, ndarray[int32_t] values): * cdef: * Py_ssize_t i, n = len(values) # <<<<<<<<<<<<<< * int ret = 0 * int32_t val */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 309; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/hashtable.pyx":310 * cdef: * Py_ssize_t i, n = len(values) * int ret = 0 # <<<<<<<<<<<<<< * int32_t val * khiter_t k */ __pyx_v_ret = 0; /* "pandas/hashtable.pyx":314 * khiter_t k * * for i in range(n): # <<<<<<<<<<<<<< * val = values[i] * k = kh_put_int32(self.table, val, &ret) */ __pyx_t_1 = __pyx_v_n; for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) { __pyx_v_i = __pyx_t_2; /* "pandas/hashtable.pyx":315 * * for i in range(n): * val = values[i] # <<<<<<<<<<<<<< * k = kh_put_int32(self.table, val, &ret) * self.table.vals[k] = i */ __pyx_t_3 = __pyx_v_i; __pyx_t_4 = -1; if (__pyx_t_3 < 0) { __pyx_t_3 += __pyx_pybuffernd_values.diminfo[0].shape; if (unlikely(__pyx_t_3 < 0)) __pyx_t_4 = 0; } else if (unlikely(__pyx_t_3 >= __pyx_pybuffernd_values.diminfo[0].shape)) __pyx_t_4 = 0; if (unlikely(__pyx_t_4 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_4); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 315; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_val = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_3, __pyx_pybuffernd_values.diminfo[0].strides)); /* "pandas/hashtable.pyx":316 * for i in range(n): * val = values[i] * k = kh_put_int32(self.table, val, &ret) # <<<<<<<<<<<<<< * self.table.vals[k] = i * */ __pyx_v_k = kh_put_int32(__pyx_v_self->table, __pyx_v_val, (&__pyx_v_ret)); /* "pandas/hashtable.pyx":317 * val = values[i] * k = kh_put_int32(self.table, val, &ret) * self.table.vals[k] = i # <<<<<<<<<<<<<< * * def lookup(self, ndarray[int32_t] values): */ (__pyx_v_self->table->vals[__pyx_v_k]) = __pyx_v_i; } __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __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.hashtable.Int32HashTable.map_locations", __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; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_9hashtable_14Int32HashTable_15lookup(PyObject *__pyx_v_self, PyObject *__pyx_v_values); /*proto*/ static PyObject *__pyx_pw_6pandas_9hashtable_14Int32HashTable_15lookup(PyObject *__pyx_v_self, PyObject *__pyx_v_values) { CYTHON_UNUSED int __pyx_lineno = 0; CYTHON_UNUSED const char *__pyx_filename = NULL; CYTHON_UNUSED int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("lookup (wrapper)", 0); if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 319; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_9hashtable_14Int32HashTable_14lookup(((struct __pyx_obj_6pandas_9hashtable_Int32HashTable *)__pyx_v_self), ((PyArrayObject *)__pyx_v_values)); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/hashtable.pyx":319 * self.table.vals[k] = i * * def lookup(self, ndarray[int32_t] values): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = len(values) */ static PyObject *__pyx_pf_6pandas_9hashtable_14Int32HashTable_14lookup(struct __pyx_obj_6pandas_9hashtable_Int32HashTable *__pyx_v_self, PyArrayObject *__pyx_v_values) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_n; CYTHON_UNUSED int __pyx_v_ret; __pyx_t_5numpy_int32_t __pyx_v_val; khiter_t __pyx_v_k; PyArrayObject *__pyx_v_locs = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_locs; __Pyx_Buffer __pyx_pybuffer_locs; __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; Py_ssize_t __pyx_t_8; Py_ssize_t __pyx_t_9; int __pyx_t_10; int __pyx_t_11; Py_ssize_t __pyx_t_12; Py_ssize_t __pyx_t_13; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __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_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_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 319; __pyx_clineno = __LINE__; goto __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/hashtable.pyx":321 * def lookup(self, ndarray[int32_t] values): * cdef: * Py_ssize_t i, n = len(values) # <<<<<<<<<<<<<< * int ret = 0 * int32_t val */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 321; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/hashtable.pyx":322 * cdef: * Py_ssize_t i, n = len(values) * int ret = 0 # <<<<<<<<<<<<<< * int32_t val * khiter_t k */ __pyx_v_ret = 0; /* "pandas/hashtable.pyx":325 * int32_t val * khiter_t k * ndarray[int32_t] locs = np.empty(n, dtype=np.int64) # <<<<<<<<<<<<<< * * for i in range(n): */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 325; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 325; __pyx_clineno = __LINE__; goto __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_n); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 325; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 325; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 325; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_2)); __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 325; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s__int64); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 325; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__dtype), __pyx_t_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 325; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 325; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __Pyx_DECREF(((PyObject *)__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_filename = __pyx_f[0]; __pyx_lineno = 325; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_7 = ((PyArrayObject *)__pyx_t_6); { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_locs.rcbuffer->pybuffer, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { __pyx_v_locs = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_locs.rcbuffer->pybuffer.buf = NULL; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 325; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } else {__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]; } } __pyx_t_7 = 0; __pyx_v_locs = ((PyArrayObject *)__pyx_t_6); __pyx_t_6 = 0; /* "pandas/hashtable.pyx":327 * ndarray[int32_t] locs = np.empty(n, dtype=np.int64) * * for i in range(n): # <<<<<<<<<<<<<< * val = values[i] * k = kh_get_int32(self.table, val) */ __pyx_t_1 = __pyx_v_n; for (__pyx_t_8 = 0; __pyx_t_8 < __pyx_t_1; __pyx_t_8+=1) { __pyx_v_i = __pyx_t_8; /* "pandas/hashtable.pyx":328 * * for i in range(n): * val = values[i] # <<<<<<<<<<<<<< * k = kh_get_int32(self.table, val) * if k != self.table.n_buckets: */ __pyx_t_9 = __pyx_v_i; __pyx_t_10 = -1; if (__pyx_t_9 < 0) { __pyx_t_9 += __pyx_pybuffernd_values.diminfo[0].shape; if (unlikely(__pyx_t_9 < 0)) __pyx_t_10 = 0; } else if (unlikely(__pyx_t_9 >= __pyx_pybuffernd_values.diminfo[0].shape)) __pyx_t_10 = 0; if (unlikely(__pyx_t_10 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_10); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 328; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_val = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_9, __pyx_pybuffernd_values.diminfo[0].strides)); /* "pandas/hashtable.pyx":329 * for i in range(n): * val = values[i] * k = kh_get_int32(self.table, val) # <<<<<<<<<<<<<< * if k != self.table.n_buckets: * locs[i] = self.table.vals[k] */ __pyx_v_k = kh_get_int32(__pyx_v_self->table, __pyx_v_val); /* "pandas/hashtable.pyx":330 * val = values[i] * k = kh_get_int32(self.table, val) * if k != self.table.n_buckets: # <<<<<<<<<<<<<< * locs[i] = self.table.vals[k] * else: */ __pyx_t_11 = ((__pyx_v_k != __pyx_v_self->table->n_buckets) != 0); if (__pyx_t_11) { /* "pandas/hashtable.pyx":331 * k = kh_get_int32(self.table, val) * if k != self.table.n_buckets: * locs[i] = self.table.vals[k] # <<<<<<<<<<<<<< * else: * locs[i] = -1 */ __pyx_t_12 = __pyx_v_i; __pyx_t_10 = -1; if (__pyx_t_12 < 0) { __pyx_t_12 += __pyx_pybuffernd_locs.diminfo[0].shape; if (unlikely(__pyx_t_12 < 0)) __pyx_t_10 = 0; } else if (unlikely(__pyx_t_12 >= __pyx_pybuffernd_locs.diminfo[0].shape)) __pyx_t_10 = 0; if (unlikely(__pyx_t_10 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_10); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 331; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_locs.rcbuffer->pybuffer.buf, __pyx_t_12, __pyx_pybuffernd_locs.diminfo[0].strides) = (__pyx_v_self->table->vals[__pyx_v_k]); goto __pyx_L5; } /*else*/ { /* "pandas/hashtable.pyx":333 * locs[i] = self.table.vals[k] * else: * locs[i] = -1 # <<<<<<<<<<<<<< * * return locs */ __pyx_t_13 = __pyx_v_i; __pyx_t_10 = -1; if (__pyx_t_13 < 0) { __pyx_t_13 += __pyx_pybuffernd_locs.diminfo[0].shape; if (unlikely(__pyx_t_13 < 0)) __pyx_t_10 = 0; } else if (unlikely(__pyx_t_13 >= __pyx_pybuffernd_locs.diminfo[0].shape)) __pyx_t_10 = 0; if (unlikely(__pyx_t_10 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_10); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 333; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_locs.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_locs.diminfo[0].strides) = -1; } __pyx_L5:; } /* "pandas/hashtable.pyx":335 * locs[i] = -1 * * return locs # <<<<<<<<<<<<<< * * def factorize(self, ndarray[int32_t] values): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_locs)); __pyx_r = ((PyObject *)__pyx_v_locs); goto __pyx_L0; __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_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_locs.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.hashtable.Int32HashTable.lookup", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_locs.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_locs); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_9hashtable_14Int32HashTable_17factorize(PyObject *__pyx_v_self, PyObject *__pyx_v_values); /*proto*/ static PyObject *__pyx_pw_6pandas_9hashtable_14Int32HashTable_17factorize(PyObject *__pyx_v_self, PyObject *__pyx_v_values) { CYTHON_UNUSED int __pyx_lineno = 0; CYTHON_UNUSED const char *__pyx_filename = NULL; CYTHON_UNUSED int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("factorize (wrapper)", 0); if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 337; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_9hashtable_14Int32HashTable_16factorize(((struct __pyx_obj_6pandas_9hashtable_Int32HashTable *)__pyx_v_self), ((PyArrayObject *)__pyx_v_values)); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/hashtable.pyx":337 * return locs * * def factorize(self, ndarray[int32_t] values): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = len(values) */ static PyObject *__pyx_pf_6pandas_9hashtable_14Int32HashTable_16factorize(struct __pyx_obj_6pandas_9hashtable_Int32HashTable *__pyx_v_self, PyArrayObject *__pyx_v_values) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_n; PyArrayObject *__pyx_v_labels = 0; PyObject *__pyx_v_reverse = 0; Py_ssize_t __pyx_v_idx; Py_ssize_t __pyx_v_count; int __pyx_v_ret; __pyx_t_5numpy_int32_t __pyx_v_val; khiter_t __pyx_v_k; __Pyx_LocalBuf_ND __pyx_pybuffernd_labels; __Pyx_Buffer __pyx_pybuffer_labels; __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; Py_ssize_t __pyx_t_8; Py_ssize_t __pyx_t_9; int __pyx_t_10; int __pyx_t_11; Py_ssize_t __pyx_t_12; Py_ssize_t __pyx_t_13; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("factorize", 0); __pyx_pybuffer_labels.pybuffer.buf = NULL; __pyx_pybuffer_labels.refcount = 0; __pyx_pybuffernd_labels.data = NULL; __pyx_pybuffernd_labels.rcbuffer = &__pyx_pybuffer_labels; __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_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 337; __pyx_clineno = __LINE__; goto __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/hashtable.pyx":339 * def factorize(self, ndarray[int32_t] values): * cdef: * Py_ssize_t i, n = len(values) # <<<<<<<<<<<<<< * ndarray[int64_t] labels = np.empty(n, dtype=np.int64) * dict reverse = {} */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 339; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/hashtable.pyx":340 * cdef: * Py_ssize_t i, n = len(values) * ndarray[int64_t] labels = np.empty(n, dtype=np.int64) # <<<<<<<<<<<<<< * dict reverse = {} * Py_ssize_t idx, count = 0 */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 340; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 340; __pyx_clineno = __LINE__; goto __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_n); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 340; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 340; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 340; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_2)); __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 340; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s__int64); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 340; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__dtype), __pyx_t_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 340; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 340; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __Pyx_DECREF(((PyObject *)__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_filename = __pyx_f[0]; __pyx_lineno = 340; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_7 = ((PyArrayObject *)__pyx_t_6); { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_labels.rcbuffer->pybuffer, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { __pyx_v_labels = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_labels.rcbuffer->pybuffer.buf = NULL; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 340; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } else {__pyx_pybuffernd_labels.diminfo[0].strides = __pyx_pybuffernd_labels.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_labels.diminfo[0].shape = __pyx_pybuffernd_labels.rcbuffer->pybuffer.shape[0]; } } __pyx_t_7 = 0; __pyx_v_labels = ((PyArrayObject *)__pyx_t_6); __pyx_t_6 = 0; /* "pandas/hashtable.pyx":341 * Py_ssize_t i, n = len(values) * ndarray[int64_t] labels = np.empty(n, dtype=np.int64) * dict reverse = {} # <<<<<<<<<<<<<< * Py_ssize_t idx, count = 0 * int ret = 0 */ __pyx_t_6 = PyDict_New(); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 341; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_6)); __pyx_v_reverse = ((PyObject*)__pyx_t_6); __pyx_t_6 = 0; /* "pandas/hashtable.pyx":342 * ndarray[int64_t] labels = np.empty(n, dtype=np.int64) * dict reverse = {} * Py_ssize_t idx, count = 0 # <<<<<<<<<<<<<< * int ret = 0 * int32_t val */ __pyx_v_count = 0; /* "pandas/hashtable.pyx":343 * dict reverse = {} * Py_ssize_t idx, count = 0 * int ret = 0 # <<<<<<<<<<<<<< * int32_t val * khiter_t k */ __pyx_v_ret = 0; /* "pandas/hashtable.pyx":347 * khiter_t k * * for i in range(n): # <<<<<<<<<<<<<< * val = values[i] * k = kh_get_int32(self.table, val) */ __pyx_t_1 = __pyx_v_n; for (__pyx_t_8 = 0; __pyx_t_8 < __pyx_t_1; __pyx_t_8+=1) { __pyx_v_i = __pyx_t_8; /* "pandas/hashtable.pyx":348 * * for i in range(n): * val = values[i] # <<<<<<<<<<<<<< * k = kh_get_int32(self.table, val) * if k != self.table.n_buckets: */ __pyx_t_9 = __pyx_v_i; __pyx_t_10 = -1; if (__pyx_t_9 < 0) { __pyx_t_9 += __pyx_pybuffernd_values.diminfo[0].shape; if (unlikely(__pyx_t_9 < 0)) __pyx_t_10 = 0; } else if (unlikely(__pyx_t_9 >= __pyx_pybuffernd_values.diminfo[0].shape)) __pyx_t_10 = 0; if (unlikely(__pyx_t_10 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_10); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 348; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_val = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_9, __pyx_pybuffernd_values.diminfo[0].strides)); /* "pandas/hashtable.pyx":349 * for i in range(n): * val = values[i] * k = kh_get_int32(self.table, val) # <<<<<<<<<<<<<< * if k != self.table.n_buckets: * idx = self.table.vals[k] */ __pyx_v_k = kh_get_int32(__pyx_v_self->table, __pyx_v_val); /* "pandas/hashtable.pyx":350 * val = values[i] * k = kh_get_int32(self.table, val) * if k != self.table.n_buckets: # <<<<<<<<<<<<<< * idx = self.table.vals[k] * labels[i] = idx */ __pyx_t_11 = ((__pyx_v_k != __pyx_v_self->table->n_buckets) != 0); if (__pyx_t_11) { /* "pandas/hashtable.pyx":351 * k = kh_get_int32(self.table, val) * if k != self.table.n_buckets: * idx = self.table.vals[k] # <<<<<<<<<<<<<< * labels[i] = idx * else: */ __pyx_v_idx = (__pyx_v_self->table->vals[__pyx_v_k]); /* "pandas/hashtable.pyx":352 * if k != self.table.n_buckets: * idx = self.table.vals[k] * labels[i] = idx # <<<<<<<<<<<<<< * else: * k = kh_put_int32(self.table, val, &ret) */ __pyx_t_12 = __pyx_v_i; __pyx_t_10 = -1; if (__pyx_t_12 < 0) { __pyx_t_12 += __pyx_pybuffernd_labels.diminfo[0].shape; if (unlikely(__pyx_t_12 < 0)) __pyx_t_10 = 0; } else if (unlikely(__pyx_t_12 >= __pyx_pybuffernd_labels.diminfo[0].shape)) __pyx_t_10 = 0; if (unlikely(__pyx_t_10 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_10); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 352; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_labels.rcbuffer->pybuffer.buf, __pyx_t_12, __pyx_pybuffernd_labels.diminfo[0].strides) = __pyx_v_idx; goto __pyx_L5; } /*else*/ { /* "pandas/hashtable.pyx":354 * labels[i] = idx * else: * k = kh_put_int32(self.table, val, &ret) # <<<<<<<<<<<<<< * self.table.vals[k] = count * reverse[count] = val */ __pyx_v_k = kh_put_int32(__pyx_v_self->table, __pyx_v_val, (&__pyx_v_ret)); /* "pandas/hashtable.pyx":355 * else: * k = kh_put_int32(self.table, val, &ret) * self.table.vals[k] = count # <<<<<<<<<<<<<< * reverse[count] = val * labels[i] = count */ (__pyx_v_self->table->vals[__pyx_v_k]) = __pyx_v_count; /* "pandas/hashtable.pyx":356 * k = kh_put_int32(self.table, val, &ret) * self.table.vals[k] = count * reverse[count] = val # <<<<<<<<<<<<<< * labels[i] = count * count += 1 */ __pyx_t_6 = __Pyx_PyInt_to_py_npy_int32(__pyx_v_val); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 356; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); if (__Pyx_SetItemInt(((PyObject *)__pyx_v_reverse), __pyx_v_count, __pyx_t_6, sizeof(Py_ssize_t), PyInt_FromSsize_t, 0, 1, 1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 356; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; /* "pandas/hashtable.pyx":357 * self.table.vals[k] = count * reverse[count] = val * labels[i] = count # <<<<<<<<<<<<<< * count += 1 * */ __pyx_t_13 = __pyx_v_i; __pyx_t_10 = -1; if (__pyx_t_13 < 0) { __pyx_t_13 += __pyx_pybuffernd_labels.diminfo[0].shape; if (unlikely(__pyx_t_13 < 0)) __pyx_t_10 = 0; } else if (unlikely(__pyx_t_13 >= __pyx_pybuffernd_labels.diminfo[0].shape)) __pyx_t_10 = 0; if (unlikely(__pyx_t_10 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_10); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 357; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_labels.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_labels.diminfo[0].strides) = __pyx_v_count; /* "pandas/hashtable.pyx":358 * reverse[count] = val * labels[i] = count * count += 1 # <<<<<<<<<<<<<< * * # return None */ __pyx_v_count = (__pyx_v_count + 1); } __pyx_L5:; } /* "pandas/hashtable.pyx":361 * * # return None * return reverse, labels # <<<<<<<<<<<<<< * * cdef class Int64HashTable: #(HashTable): */ __Pyx_XDECREF(__pyx_r); __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 361; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(((PyObject *)__pyx_v_reverse)); PyTuple_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_v_reverse)); __Pyx_GIVEREF(((PyObject *)__pyx_v_reverse)); __Pyx_INCREF(((PyObject *)__pyx_v_labels)); PyTuple_SET_ITEM(__pyx_t_6, 1, ((PyObject *)__pyx_v_labels)); __Pyx_GIVEREF(((PyObject *)__pyx_v_labels)); __pyx_r = ((PyObject *)__pyx_t_6); __pyx_t_6 = 0; goto __pyx_L0; __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_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_labels.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.hashtable.Int32HashTable.factorize", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_labels.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_labels); __Pyx_XDECREF(__pyx_v_reverse); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pandas_9hashtable_14Int64HashTable_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_pw_6pandas_9hashtable_14Int64HashTable_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_size_hint = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__size_hint,0}; PyObject* values[1] = {0}; values[0] = ((PyObject *)__pyx_int_1); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__size_hint); if (value) { values[0] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 366; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_size_hint = values[0]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 366; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.hashtable.Int64HashTable.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return -1; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pandas_9hashtable_14Int64HashTable___cinit__(((struct __pyx_obj_6pandas_9hashtable_Int64HashTable *)__pyx_v_self), __pyx_v_size_hint); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/hashtable.pyx":366 * # cdef kh_int64_t *table * * def __cinit__(self, size_hint=1): # <<<<<<<<<<<<<< * self.table = kh_init_int64() * if size_hint is not None: */ static int __pyx_pf_6pandas_9hashtable_14Int64HashTable___cinit__(struct __pyx_obj_6pandas_9hashtable_Int64HashTable *__pyx_v_self, PyObject *__pyx_v_size_hint) { int __pyx_r; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; khint_t __pyx_t_3; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__cinit__", 0); /* "pandas/hashtable.pyx":367 * * def __cinit__(self, size_hint=1): * self.table = kh_init_int64() # <<<<<<<<<<<<<< * if size_hint is not None: * kh_resize_int64(self.table, size_hint) */ __pyx_v_self->table = kh_init_int64(); /* "pandas/hashtable.pyx":368 * def __cinit__(self, size_hint=1): * self.table = kh_init_int64() * if size_hint is not None: # <<<<<<<<<<<<<< * kh_resize_int64(self.table, size_hint) * */ __pyx_t_1 = (__pyx_v_size_hint != Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { /* "pandas/hashtable.pyx":369 * self.table = kh_init_int64() * if size_hint is not None: * kh_resize_int64(self.table, size_hint) # <<<<<<<<<<<<<< * * def __dealloc__(self): */ __pyx_t_3 = __Pyx_PyInt_from_py_npy_uint32(__pyx_v_size_hint); if (unlikely((__pyx_t_3 == (khint_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 369; __pyx_clineno = __LINE__; goto __pyx_L1_error;} kh_resize_int64(__pyx_v_self->table, __pyx_t_3); goto __pyx_L3; } __pyx_L3:; __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("pandas.hashtable.Int64HashTable.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static void __pyx_pw_6pandas_9hashtable_14Int64HashTable_3__dealloc__(PyObject *__pyx_v_self); /*proto*/ static void __pyx_pw_6pandas_9hashtable_14Int64HashTable_3__dealloc__(PyObject *__pyx_v_self) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0); __pyx_pf_6pandas_9hashtable_14Int64HashTable_2__dealloc__(((struct __pyx_obj_6pandas_9hashtable_Int64HashTable *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); } /* "pandas/hashtable.pyx":371 * kh_resize_int64(self.table, size_hint) * * def __dealloc__(self): # <<<<<<<<<<<<<< * kh_destroy_int64(self.table) * */ static void __pyx_pf_6pandas_9hashtable_14Int64HashTable_2__dealloc__(struct __pyx_obj_6pandas_9hashtable_Int64HashTable *__pyx_v_self) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__dealloc__", 0); /* "pandas/hashtable.pyx":372 * * def __dealloc__(self): * kh_destroy_int64(self.table) # <<<<<<<<<<<<<< * * def __contains__(self, object key): */ kh_destroy_int64(__pyx_v_self->table); __Pyx_RefNannyFinishContext(); } /* Python wrapper */ static int __pyx_pw_6pandas_9hashtable_14Int64HashTable_5__contains__(PyObject *__pyx_v_self, PyObject *__pyx_v_key); /*proto*/ static int __pyx_pw_6pandas_9hashtable_14Int64HashTable_5__contains__(PyObject *__pyx_v_self, PyObject *__pyx_v_key) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__contains__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_9hashtable_14Int64HashTable_4__contains__(((struct __pyx_obj_6pandas_9hashtable_Int64HashTable *)__pyx_v_self), ((PyObject *)__pyx_v_key)); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/hashtable.pyx":374 * kh_destroy_int64(self.table) * * def __contains__(self, object key): # <<<<<<<<<<<<<< * cdef khiter_t k * k = kh_get_int64(self.table, key) */ static int __pyx_pf_6pandas_9hashtable_14Int64HashTable_4__contains__(struct __pyx_obj_6pandas_9hashtable_Int64HashTable *__pyx_v_self, PyObject *__pyx_v_key) { khiter_t __pyx_v_k; int __pyx_r; __Pyx_RefNannyDeclarations __pyx_t_5numpy_int64_t __pyx_t_1; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__contains__", 0); /* "pandas/hashtable.pyx":376 * def __contains__(self, object key): * cdef khiter_t k * k = kh_get_int64(self.table, key) # <<<<<<<<<<<<<< * return k != self.table.n_buckets * */ __pyx_t_1 = __Pyx_PyInt_from_py_npy_int64(__pyx_v_key); if (unlikely((__pyx_t_1 == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 376; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_k = kh_get_int64(__pyx_v_self->table, __pyx_t_1); /* "pandas/hashtable.pyx":377 * cdef khiter_t k * k = kh_get_int64(self.table, key) * return k != self.table.n_buckets # <<<<<<<<<<<<<< * * def __len__(self): */ __pyx_r = (__pyx_v_k != __pyx_v_self->table->n_buckets); goto __pyx_L0; __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("pandas.hashtable.Int64HashTable.__contains__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static Py_ssize_t __pyx_pw_6pandas_9hashtable_14Int64HashTable_7__len__(PyObject *__pyx_v_self); /*proto*/ static Py_ssize_t __pyx_pw_6pandas_9hashtable_14Int64HashTable_7__len__(PyObject *__pyx_v_self) { Py_ssize_t __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__len__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_9hashtable_14Int64HashTable_6__len__(((struct __pyx_obj_6pandas_9hashtable_Int64HashTable *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/hashtable.pyx":379 * return k != self.table.n_buckets * * def __len__(self): # <<<<<<<<<<<<<< * return self.table.size * */ static Py_ssize_t __pyx_pf_6pandas_9hashtable_14Int64HashTable_6__len__(struct __pyx_obj_6pandas_9hashtable_Int64HashTable *__pyx_v_self) { Py_ssize_t __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__len__", 0); /* "pandas/hashtable.pyx":380 * * def __len__(self): * return self.table.size # <<<<<<<<<<<<<< * * cpdef get_item(self, int64_t val): */ __pyx_r = __pyx_v_self->table->size; goto __pyx_L0; __pyx_r = 0; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/hashtable.pyx":382 * return self.table.size * * cpdef get_item(self, int64_t val): # <<<<<<<<<<<<<< * cdef khiter_t k * k = kh_get_int64(self.table, val) */ static PyObject *__pyx_pw_6pandas_9hashtable_14Int64HashTable_9get_item(PyObject *__pyx_v_self, PyObject *__pyx_arg_val); /*proto*/ static PyObject *__pyx_f_6pandas_9hashtable_14Int64HashTable_get_item(struct __pyx_obj_6pandas_9hashtable_Int64HashTable *__pyx_v_self, __pyx_t_5numpy_int64_t __pyx_v_val, int __pyx_skip_dispatch) { khiter_t __pyx_v_k; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_t_4; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_item", 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__get_item); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 382; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_6pandas_9hashtable_14Int64HashTable_9get_item)) { __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyInt_to_py_npy_int64(__pyx_v_val); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 382; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 382; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 382; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(((PyObject *)__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/hashtable.pyx":384 * cpdef get_item(self, int64_t val): * cdef khiter_t k * k = kh_get_int64(self.table, val) # <<<<<<<<<<<<<< * if k != self.table.n_buckets: * return self.table.vals[k] */ __pyx_v_k = kh_get_int64(__pyx_v_self->table, __pyx_v_val); /* "pandas/hashtable.pyx":385 * cdef khiter_t k * k = kh_get_int64(self.table, val) * if k != self.table.n_buckets: # <<<<<<<<<<<<<< * return self.table.vals[k] * else: */ __pyx_t_4 = ((__pyx_v_k != __pyx_v_self->table->n_buckets) != 0); if (__pyx_t_4) { /* "pandas/hashtable.pyx":386 * k = kh_get_int64(self.table, val) * if k != self.table.n_buckets: * return self.table.vals[k] # <<<<<<<<<<<<<< * else: * raise KeyError(val) */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyInt_FromSize_t((__pyx_v_self->table->vals[__pyx_v_k])); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 386; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; goto __pyx_L3; } /*else*/ { /* "pandas/hashtable.pyx":388 * return self.table.vals[k] * else: * raise KeyError(val) # <<<<<<<<<<<<<< * * def get_iter_test(self, int64_t key, Py_ssize_t iterations): */ __pyx_t_1 = __Pyx_PyInt_to_py_npy_int64(__pyx_v_val); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 388; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 388; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyObject_Call(__pyx_builtin_KeyError, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 388; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(((PyObject *)__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_filename = __pyx_f[0]; __pyx_lineno = 388; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_L3:; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("pandas.hashtable.Int64HashTable.get_item", __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_9hashtable_14Int64HashTable_9get_item(PyObject *__pyx_v_self, PyObject *__pyx_arg_val); /*proto*/ static PyObject *__pyx_pw_6pandas_9hashtable_14Int64HashTable_9get_item(PyObject *__pyx_v_self, PyObject *__pyx_arg_val) { __pyx_t_5numpy_int64_t __pyx_v_val; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("get_item (wrapper)", 0); assert(__pyx_arg_val); { __pyx_v_val = __Pyx_PyInt_from_py_npy_int64(__pyx_arg_val); if (unlikely((__pyx_v_val == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 382; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; __Pyx_AddTraceback("pandas.hashtable.Int64HashTable.get_item", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pandas_9hashtable_14Int64HashTable_8get_item(((struct __pyx_obj_6pandas_9hashtable_Int64HashTable *)__pyx_v_self), ((__pyx_t_5numpy_int64_t)__pyx_v_val)); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/hashtable.pyx":382 * return self.table.size * * cpdef get_item(self, int64_t val): # <<<<<<<<<<<<<< * cdef khiter_t k * k = kh_get_int64(self.table, val) */ static PyObject *__pyx_pf_6pandas_9hashtable_14Int64HashTable_8get_item(struct __pyx_obj_6pandas_9hashtable_Int64HashTable *__pyx_v_self, __pyx_t_5numpy_int64_t __pyx_v_val) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_item", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = ((struct __pyx_vtabstruct_6pandas_9hashtable_Int64HashTable *)__pyx_v_self->__pyx_vtab)->get_item(__pyx_v_self, __pyx_v_val, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 382; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas.hashtable.Int64HashTable.get_item", __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_9hashtable_14Int64HashTable_11get_iter_test(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_6pandas_9hashtable_14Int64HashTable_11get_iter_test(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { CYTHON_UNUSED __pyx_t_5numpy_int64_t __pyx_v_key; Py_ssize_t __pyx_v_iterations; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("get_iter_test (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__key,&__pyx_n_s__iterations,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__key)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__iterations)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("get_iter_test", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 390; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "get_iter_test") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 390; __pyx_clineno = __LINE__; goto __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_key = __Pyx_PyInt_from_py_npy_int64(values[0]); if (unlikely((__pyx_v_key == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 390; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_iterations = __Pyx_PyIndex_AsSsize_t(values[1]); if (unlikely((__pyx_v_iterations == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 390; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("get_iter_test", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 390; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.hashtable.Int64HashTable.get_iter_test", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pandas_9hashtable_14Int64HashTable_10get_iter_test(((struct __pyx_obj_6pandas_9hashtable_Int64HashTable *)__pyx_v_self), __pyx_v_key, __pyx_v_iterations); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/hashtable.pyx":390 * raise KeyError(val) * * def get_iter_test(self, int64_t key, Py_ssize_t iterations): # <<<<<<<<<<<<<< * cdef Py_ssize_t i, val=0 * for i in range(iterations): */ static PyObject *__pyx_pf_6pandas_9hashtable_14Int64HashTable_10get_iter_test(struct __pyx_obj_6pandas_9hashtable_Int64HashTable *__pyx_v_self, CYTHON_UNUSED __pyx_t_5numpy_int64_t __pyx_v_key, Py_ssize_t __pyx_v_iterations) { CYTHON_UNUSED Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_val; khint_t __pyx_v_k; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; Py_ssize_t __pyx_t_2; int __pyx_t_3; __Pyx_RefNannySetupContext("get_iter_test", 0); /* "pandas/hashtable.pyx":391 * * def get_iter_test(self, int64_t key, Py_ssize_t iterations): * cdef Py_ssize_t i, val=0 # <<<<<<<<<<<<<< * for i in range(iterations): * k = kh_get_int64(self.table, val) */ __pyx_v_val = 0; /* "pandas/hashtable.pyx":392 * def get_iter_test(self, int64_t key, Py_ssize_t iterations): * cdef Py_ssize_t i, val=0 * for i in range(iterations): # <<<<<<<<<<<<<< * k = kh_get_int64(self.table, val) * if k != self.table.n_buckets: */ __pyx_t_1 = __pyx_v_iterations; for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) { __pyx_v_i = __pyx_t_2; /* "pandas/hashtable.pyx":393 * cdef Py_ssize_t i, val=0 * for i in range(iterations): * k = kh_get_int64(self.table, val) # <<<<<<<<<<<<<< * if k != self.table.n_buckets: * val = self.table.vals[k] */ __pyx_v_k = kh_get_int64(__pyx_v_self->table, __pyx_v_val); /* "pandas/hashtable.pyx":394 * for i in range(iterations): * k = kh_get_int64(self.table, val) * if k != self.table.n_buckets: # <<<<<<<<<<<<<< * val = self.table.vals[k] * */ __pyx_t_3 = ((__pyx_v_k != __pyx_v_self->table->n_buckets) != 0); if (__pyx_t_3) { /* "pandas/hashtable.pyx":395 * k = kh_get_int64(self.table, val) * if k != self.table.n_buckets: * val = self.table.vals[k] # <<<<<<<<<<<<<< * * cpdef set_item(self, int64_t key, Py_ssize_t val): */ __pyx_v_val = (__pyx_v_self->table->vals[__pyx_v_k]); goto __pyx_L5; } __pyx_L5:; } __pyx_r = Py_None; __Pyx_INCREF(Py_None); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/hashtable.pyx":397 * val = self.table.vals[k] * * cpdef set_item(self, int64_t key, Py_ssize_t val): # <<<<<<<<<<<<<< * cdef: * khiter_t k */ static PyObject *__pyx_pw_6pandas_9hashtable_14Int64HashTable_13set_item(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_6pandas_9hashtable_14Int64HashTable_set_item(struct __pyx_obj_6pandas_9hashtable_Int64HashTable *__pyx_v_self, __pyx_t_5numpy_int64_t __pyx_v_key, Py_ssize_t __pyx_v_val, int __pyx_skip_dispatch) { khiter_t __pyx_v_k; int __pyx_v_ret; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; int __pyx_t_5; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("set_item", 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__set_item); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 397; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_6pandas_9hashtable_14Int64HashTable_13set_item)) { __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyInt_to_py_npy_int64(__pyx_v_key); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 397; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyInt_FromSsize_t(__pyx_v_val); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 397; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 397; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_2 = 0; __pyx_t_3 = 0; __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 397; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __pyx_r = __pyx_t_3; __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } /* "pandas/hashtable.pyx":400 * cdef: * khiter_t k * int ret = 0 # <<<<<<<<<<<<<< * * k = kh_put_int64(self.table, key, &ret) */ __pyx_v_ret = 0; /* "pandas/hashtable.pyx":402 * int ret = 0 * * k = kh_put_int64(self.table, key, &ret) # <<<<<<<<<<<<<< * self.table.keys[k] = key * if kh_exist_int64(self.table, k): */ __pyx_v_k = kh_put_int64(__pyx_v_self->table, __pyx_v_key, (&__pyx_v_ret)); /* "pandas/hashtable.pyx":403 * * k = kh_put_int64(self.table, key, &ret) * self.table.keys[k] = key # <<<<<<<<<<<<<< * if kh_exist_int64(self.table, k): * self.table.vals[k] = val */ (__pyx_v_self->table->keys[__pyx_v_k]) = __pyx_v_key; /* "pandas/hashtable.pyx":404 * k = kh_put_int64(self.table, key, &ret) * self.table.keys[k] = key * if kh_exist_int64(self.table, k): # <<<<<<<<<<<<<< * self.table.vals[k] = val * else: */ __pyx_t_5 = (kh_exist_int64(__pyx_v_self->table, __pyx_v_k) != 0); if (__pyx_t_5) { /* "pandas/hashtable.pyx":405 * self.table.keys[k] = key * if kh_exist_int64(self.table, k): * self.table.vals[k] = val # <<<<<<<<<<<<<< * else: * raise KeyError(key) */ (__pyx_v_self->table->vals[__pyx_v_k]) = __pyx_v_val; goto __pyx_L3; } /*else*/ { /* "pandas/hashtable.pyx":407 * self.table.vals[k] = val * else: * raise KeyError(key) # <<<<<<<<<<<<<< * * def map(self, ndarray[int64_t] keys, ndarray[int64_t] values): */ __pyx_t_1 = __Pyx_PyInt_to_py_npy_int64(__pyx_v_key); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 407; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 407; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyObject_Call(__pyx_builtin_KeyError, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 407; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 407; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_L3:; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("pandas.hashtable.Int64HashTable.set_item", __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_9hashtable_14Int64HashTable_13set_item(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_6pandas_9hashtable_14Int64HashTable_13set_item(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { __pyx_t_5numpy_int64_t __pyx_v_key; Py_ssize_t __pyx_v_val; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("set_item (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__key,&__pyx_n_s__val,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__key)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__val)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("set_item", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 397; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "set_item") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 397; __pyx_clineno = __LINE__; goto __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_key = __Pyx_PyInt_from_py_npy_int64(values[0]); if (unlikely((__pyx_v_key == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 397; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_val = __Pyx_PyIndex_AsSsize_t(values[1]); if (unlikely((__pyx_v_val == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 397; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("set_item", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 397; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.hashtable.Int64HashTable.set_item", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pandas_9hashtable_14Int64HashTable_12set_item(((struct __pyx_obj_6pandas_9hashtable_Int64HashTable *)__pyx_v_self), __pyx_v_key, __pyx_v_val); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/hashtable.pyx":397 * val = self.table.vals[k] * * cpdef set_item(self, int64_t key, Py_ssize_t val): # <<<<<<<<<<<<<< * cdef: * khiter_t k */ static PyObject *__pyx_pf_6pandas_9hashtable_14Int64HashTable_12set_item(struct __pyx_obj_6pandas_9hashtable_Int64HashTable *__pyx_v_self, __pyx_t_5numpy_int64_t __pyx_v_key, Py_ssize_t __pyx_v_val) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("set_item", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = ((struct __pyx_vtabstruct_6pandas_9hashtable_Int64HashTable *)__pyx_v_self->__pyx_vtab)->set_item(__pyx_v_self, __pyx_v_key, __pyx_v_val, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 397; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas.hashtable.Int64HashTable.set_item", __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_9hashtable_14Int64HashTable_15map(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_6pandas_9hashtable_14Int64HashTable_15map(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_keys = 0; PyArrayObject *__pyx_v_values = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("map (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__keys,&__pyx_n_s__values,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__keys)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__values)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("map", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 409; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "map") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 409; __pyx_clineno = __LINE__; goto __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_keys = ((PyArrayObject *)values[0]); __pyx_v_values = ((PyArrayObject *)values[1]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("map", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 409; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.hashtable.Int64HashTable.map", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_keys), __pyx_ptype_5numpy_ndarray, 1, "keys", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 409; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 409; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_9hashtable_14Int64HashTable_14map(((struct __pyx_obj_6pandas_9hashtable_Int64HashTable *)__pyx_v_self), __pyx_v_keys, __pyx_v_values); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/hashtable.pyx":409 * raise KeyError(key) * * def map(self, ndarray[int64_t] keys, ndarray[int64_t] values): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = len(values) */ static PyObject *__pyx_pf_6pandas_9hashtable_14Int64HashTable_14map(struct __pyx_obj_6pandas_9hashtable_Int64HashTable *__pyx_v_self, PyArrayObject *__pyx_v_keys, PyArrayObject *__pyx_v_values) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_n; int __pyx_v_ret; __pyx_t_5numpy_int64_t __pyx_v_key; khiter_t __pyx_v_k; __Pyx_LocalBuf_ND __pyx_pybuffernd_keys; __Pyx_Buffer __pyx_pybuffer_keys; __Pyx_LocalBuf_ND __pyx_pybuffernd_values; __Pyx_Buffer __pyx_pybuffer_values; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; Py_ssize_t __pyx_t_2; Py_ssize_t __pyx_t_3; int __pyx_t_4; Py_ssize_t __pyx_t_5; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("map", 0); __pyx_pybuffer_keys.pybuffer.buf = NULL; __pyx_pybuffer_keys.refcount = 0; __pyx_pybuffernd_keys.data = NULL; __pyx_pybuffernd_keys.rcbuffer = &__pyx_pybuffer_keys; __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_keys.rcbuffer->pybuffer, (PyObject*)__pyx_v_keys, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 409; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_keys.diminfo[0].strides = __pyx_pybuffernd_keys.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_keys.diminfo[0].shape = __pyx_pybuffernd_keys.rcbuffer->pybuffer.shape[0]; { __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_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 409; __pyx_clineno = __LINE__; goto __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/hashtable.pyx":411 * def map(self, ndarray[int64_t] keys, ndarray[int64_t] values): * cdef: * Py_ssize_t i, n = len(values) # <<<<<<<<<<<<<< * int ret = 0 * int64_t key */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 411; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/hashtable.pyx":412 * cdef: * Py_ssize_t i, n = len(values) * int ret = 0 # <<<<<<<<<<<<<< * int64_t key * khiter_t k */ __pyx_v_ret = 0; /* "pandas/hashtable.pyx":416 * khiter_t k * * for i in range(n): # <<<<<<<<<<<<<< * key = keys[i] * k = kh_put_int64(self.table, key, &ret) */ __pyx_t_1 = __pyx_v_n; for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) { __pyx_v_i = __pyx_t_2; /* "pandas/hashtable.pyx":417 * * for i in range(n): * key = keys[i] # <<<<<<<<<<<<<< * k = kh_put_int64(self.table, key, &ret) * self.table.vals[k] = values[i] */ __pyx_t_3 = __pyx_v_i; __pyx_t_4 = -1; if (__pyx_t_3 < 0) { __pyx_t_3 += __pyx_pybuffernd_keys.diminfo[0].shape; if (unlikely(__pyx_t_3 < 0)) __pyx_t_4 = 0; } else if (unlikely(__pyx_t_3 >= __pyx_pybuffernd_keys.diminfo[0].shape)) __pyx_t_4 = 0; if (unlikely(__pyx_t_4 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_4); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 417; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_key = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_keys.rcbuffer->pybuffer.buf, __pyx_t_3, __pyx_pybuffernd_keys.diminfo[0].strides)); /* "pandas/hashtable.pyx":418 * for i in range(n): * key = keys[i] * k = kh_put_int64(self.table, key, &ret) # <<<<<<<<<<<<<< * self.table.vals[k] = values[i] * */ __pyx_v_k = kh_put_int64(__pyx_v_self->table, __pyx_v_key, (&__pyx_v_ret)); /* "pandas/hashtable.pyx":419 * key = keys[i] * k = kh_put_int64(self.table, key, &ret) * self.table.vals[k] = values[i] # <<<<<<<<<<<<<< * * def map_locations(self, ndarray[int64_t] values): */ __pyx_t_5 = __pyx_v_i; __pyx_t_4 = -1; if (__pyx_t_5 < 0) { __pyx_t_5 += __pyx_pybuffernd_values.diminfo[0].shape; if (unlikely(__pyx_t_5 < 0)) __pyx_t_4 = 0; } else if (unlikely(__pyx_t_5 >= __pyx_pybuffernd_values.diminfo[0].shape)) __pyx_t_4 = 0; if (unlikely(__pyx_t_4 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_4); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 419; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } (__pyx_v_self->table->vals[__pyx_v_k]) = ((Py_ssize_t)(*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_5, __pyx_pybuffernd_values.diminfo[0].strides))); } __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_keys.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.hashtable.Int64HashTable.map", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_keys.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_9hashtable_14Int64HashTable_17map_locations(PyObject *__pyx_v_self, PyObject *__pyx_v_values); /*proto*/ static PyObject *__pyx_pw_6pandas_9hashtable_14Int64HashTable_17map_locations(PyObject *__pyx_v_self, PyObject *__pyx_v_values) { CYTHON_UNUSED int __pyx_lineno = 0; CYTHON_UNUSED const char *__pyx_filename = NULL; CYTHON_UNUSED int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("map_locations (wrapper)", 0); if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 421; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_9hashtable_14Int64HashTable_16map_locations(((struct __pyx_obj_6pandas_9hashtable_Int64HashTable *)__pyx_v_self), ((PyArrayObject *)__pyx_v_values)); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/hashtable.pyx":421 * self.table.vals[k] = values[i] * * def map_locations(self, ndarray[int64_t] values): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = len(values) */ static PyObject *__pyx_pf_6pandas_9hashtable_14Int64HashTable_16map_locations(struct __pyx_obj_6pandas_9hashtable_Int64HashTable *__pyx_v_self, PyArrayObject *__pyx_v_values) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_n; int __pyx_v_ret; __pyx_t_5numpy_int64_t __pyx_v_val; khiter_t __pyx_v_k; __Pyx_LocalBuf_ND __pyx_pybuffernd_values; __Pyx_Buffer __pyx_pybuffer_values; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; Py_ssize_t __pyx_t_2; Py_ssize_t __pyx_t_3; int __pyx_t_4; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("map_locations", 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_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 421; __pyx_clineno = __LINE__; goto __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/hashtable.pyx":423 * def map_locations(self, ndarray[int64_t] values): * cdef: * Py_ssize_t i, n = len(values) # <<<<<<<<<<<<<< * int ret = 0 * int64_t val */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 423; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/hashtable.pyx":424 * cdef: * Py_ssize_t i, n = len(values) * int ret = 0 # <<<<<<<<<<<<<< * int64_t val * khiter_t k */ __pyx_v_ret = 0; /* "pandas/hashtable.pyx":428 * khiter_t k * * for i in range(n): # <<<<<<<<<<<<<< * val = values[i] * k = kh_put_int64(self.table, val, &ret) */ __pyx_t_1 = __pyx_v_n; for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) { __pyx_v_i = __pyx_t_2; /* "pandas/hashtable.pyx":429 * * for i in range(n): * val = values[i] # <<<<<<<<<<<<<< * k = kh_put_int64(self.table, val, &ret) * self.table.vals[k] = i */ __pyx_t_3 = __pyx_v_i; __pyx_t_4 = -1; if (__pyx_t_3 < 0) { __pyx_t_3 += __pyx_pybuffernd_values.diminfo[0].shape; if (unlikely(__pyx_t_3 < 0)) __pyx_t_4 = 0; } else if (unlikely(__pyx_t_3 >= __pyx_pybuffernd_values.diminfo[0].shape)) __pyx_t_4 = 0; if (unlikely(__pyx_t_4 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_4); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 429; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_val = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_3, __pyx_pybuffernd_values.diminfo[0].strides)); /* "pandas/hashtable.pyx":430 * for i in range(n): * val = values[i] * k = kh_put_int64(self.table, val, &ret) # <<<<<<<<<<<<<< * self.table.vals[k] = i * */ __pyx_v_k = kh_put_int64(__pyx_v_self->table, __pyx_v_val, (&__pyx_v_ret)); /* "pandas/hashtable.pyx":431 * val = values[i] * k = kh_put_int64(self.table, val, &ret) * self.table.vals[k] = i # <<<<<<<<<<<<<< * * def lookup(self, ndarray[int64_t] values): */ (__pyx_v_self->table->vals[__pyx_v_k]) = __pyx_v_i; } __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __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.hashtable.Int64HashTable.map_locations", __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; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_9hashtable_14Int64HashTable_19lookup(PyObject *__pyx_v_self, PyObject *__pyx_v_values); /*proto*/ static PyObject *__pyx_pw_6pandas_9hashtable_14Int64HashTable_19lookup(PyObject *__pyx_v_self, PyObject *__pyx_v_values) { CYTHON_UNUSED int __pyx_lineno = 0; CYTHON_UNUSED const char *__pyx_filename = NULL; CYTHON_UNUSED int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("lookup (wrapper)", 0); if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 433; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_9hashtable_14Int64HashTable_18lookup(((struct __pyx_obj_6pandas_9hashtable_Int64HashTable *)__pyx_v_self), ((PyArrayObject *)__pyx_v_values)); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/hashtable.pyx":433 * self.table.vals[k] = i * * def lookup(self, ndarray[int64_t] values): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = len(values) */ static PyObject *__pyx_pf_6pandas_9hashtable_14Int64HashTable_18lookup(struct __pyx_obj_6pandas_9hashtable_Int64HashTable *__pyx_v_self, PyArrayObject *__pyx_v_values) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_n; CYTHON_UNUSED int __pyx_v_ret; __pyx_t_5numpy_int64_t __pyx_v_val; khiter_t __pyx_v_k; PyArrayObject *__pyx_v_locs = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_locs; __Pyx_Buffer __pyx_pybuffer_locs; __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; Py_ssize_t __pyx_t_8; Py_ssize_t __pyx_t_9; int __pyx_t_10; int __pyx_t_11; Py_ssize_t __pyx_t_12; Py_ssize_t __pyx_t_13; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __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_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_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 433; __pyx_clineno = __LINE__; goto __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/hashtable.pyx":435 * def lookup(self, ndarray[int64_t] values): * cdef: * Py_ssize_t i, n = len(values) # <<<<<<<<<<<<<< * int ret = 0 * int64_t val */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 435; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/hashtable.pyx":436 * cdef: * Py_ssize_t i, n = len(values) * int ret = 0 # <<<<<<<<<<<<<< * int64_t val * khiter_t k */ __pyx_v_ret = 0; /* "pandas/hashtable.pyx":439 * int64_t val * khiter_t k * ndarray[int64_t] locs = np.empty(n, dtype=np.int64) # <<<<<<<<<<<<<< * * for i in range(n): */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 439; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 439; __pyx_clineno = __LINE__; goto __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_n); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 439; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 439; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 439; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_2)); __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 439; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s__int64); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 439; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__dtype), __pyx_t_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 439; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 439; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __Pyx_DECREF(((PyObject *)__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_filename = __pyx_f[0]; __pyx_lineno = 439; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_7 = ((PyArrayObject *)__pyx_t_6); { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_locs.rcbuffer->pybuffer, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { __pyx_v_locs = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_locs.rcbuffer->pybuffer.buf = NULL; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 439; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } else {__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]; } } __pyx_t_7 = 0; __pyx_v_locs = ((PyArrayObject *)__pyx_t_6); __pyx_t_6 = 0; /* "pandas/hashtable.pyx":441 * ndarray[int64_t] locs = np.empty(n, dtype=np.int64) * * for i in range(n): # <<<<<<<<<<<<<< * val = values[i] * k = kh_get_int64(self.table, val) */ __pyx_t_1 = __pyx_v_n; for (__pyx_t_8 = 0; __pyx_t_8 < __pyx_t_1; __pyx_t_8+=1) { __pyx_v_i = __pyx_t_8; /* "pandas/hashtable.pyx":442 * * for i in range(n): * val = values[i] # <<<<<<<<<<<<<< * k = kh_get_int64(self.table, val) * if k != self.table.n_buckets: */ __pyx_t_9 = __pyx_v_i; __pyx_t_10 = -1; if (__pyx_t_9 < 0) { __pyx_t_9 += __pyx_pybuffernd_values.diminfo[0].shape; if (unlikely(__pyx_t_9 < 0)) __pyx_t_10 = 0; } else if (unlikely(__pyx_t_9 >= __pyx_pybuffernd_values.diminfo[0].shape)) __pyx_t_10 = 0; if (unlikely(__pyx_t_10 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_10); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 442; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_val = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_9, __pyx_pybuffernd_values.diminfo[0].strides)); /* "pandas/hashtable.pyx":443 * for i in range(n): * val = values[i] * k = kh_get_int64(self.table, val) # <<<<<<<<<<<<<< * if k != self.table.n_buckets: * locs[i] = self.table.vals[k] */ __pyx_v_k = kh_get_int64(__pyx_v_self->table, __pyx_v_val); /* "pandas/hashtable.pyx":444 * val = values[i] * k = kh_get_int64(self.table, val) * if k != self.table.n_buckets: # <<<<<<<<<<<<<< * locs[i] = self.table.vals[k] * else: */ __pyx_t_11 = ((__pyx_v_k != __pyx_v_self->table->n_buckets) != 0); if (__pyx_t_11) { /* "pandas/hashtable.pyx":445 * k = kh_get_int64(self.table, val) * if k != self.table.n_buckets: * locs[i] = self.table.vals[k] # <<<<<<<<<<<<<< * else: * locs[i] = -1 */ __pyx_t_12 = __pyx_v_i; __pyx_t_10 = -1; if (__pyx_t_12 < 0) { __pyx_t_12 += __pyx_pybuffernd_locs.diminfo[0].shape; if (unlikely(__pyx_t_12 < 0)) __pyx_t_10 = 0; } else if (unlikely(__pyx_t_12 >= __pyx_pybuffernd_locs.diminfo[0].shape)) __pyx_t_10 = 0; if (unlikely(__pyx_t_10 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_10); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 445; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_locs.rcbuffer->pybuffer.buf, __pyx_t_12, __pyx_pybuffernd_locs.diminfo[0].strides) = (__pyx_v_self->table->vals[__pyx_v_k]); goto __pyx_L5; } /*else*/ { /* "pandas/hashtable.pyx":447 * locs[i] = self.table.vals[k] * else: * locs[i] = -1 # <<<<<<<<<<<<<< * * return locs */ __pyx_t_13 = __pyx_v_i; __pyx_t_10 = -1; if (__pyx_t_13 < 0) { __pyx_t_13 += __pyx_pybuffernd_locs.diminfo[0].shape; if (unlikely(__pyx_t_13 < 0)) __pyx_t_10 = 0; } else if (unlikely(__pyx_t_13 >= __pyx_pybuffernd_locs.diminfo[0].shape)) __pyx_t_10 = 0; if (unlikely(__pyx_t_10 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_10); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 447; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_locs.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_locs.diminfo[0].strides) = -1; } __pyx_L5:; } /* "pandas/hashtable.pyx":449 * locs[i] = -1 * * return locs # <<<<<<<<<<<<<< * * def factorize(self, ndarray[object] values): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_locs)); __pyx_r = ((PyObject *)__pyx_v_locs); goto __pyx_L0; __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_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_locs.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.hashtable.Int64HashTable.lookup", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_locs.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_locs); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_9hashtable_14Int64HashTable_21factorize(PyObject *__pyx_v_self, PyObject *__pyx_v_values); /*proto*/ static PyObject *__pyx_pw_6pandas_9hashtable_14Int64HashTable_21factorize(PyObject *__pyx_v_self, PyObject *__pyx_v_values) { CYTHON_UNUSED int __pyx_lineno = 0; CYTHON_UNUSED const char *__pyx_filename = NULL; CYTHON_UNUSED int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("factorize (wrapper)", 0); if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 451; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_9hashtable_14Int64HashTable_20factorize(((struct __pyx_obj_6pandas_9hashtable_Int64HashTable *)__pyx_v_self), ((PyArrayObject *)__pyx_v_values)); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/hashtable.pyx":451 * return locs * * def factorize(self, ndarray[object] values): # <<<<<<<<<<<<<< * reverse = {} * labels = self.get_labels(values, reverse, 0) */ static PyObject *__pyx_pf_6pandas_9hashtable_14Int64HashTable_20factorize(struct __pyx_obj_6pandas_9hashtable_Int64HashTable *__pyx_v_self, PyArrayObject *__pyx_v_values) { PyObject *__pyx_v_reverse = NULL; PyObject *__pyx_v_labels = NULL; __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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("factorize", 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_object, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 451; __pyx_clineno = __LINE__; goto __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/hashtable.pyx":452 * * def factorize(self, ndarray[object] values): * reverse = {} # <<<<<<<<<<<<<< * labels = self.get_labels(values, reverse, 0) * return reverse, labels */ __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 452; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_v_reverse = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/hashtable.pyx":453 * def factorize(self, ndarray[object] values): * reverse = {} * labels = self.get_labels(values, reverse, 0) # <<<<<<<<<<<<<< * return reverse, labels * */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s__get_labels); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 453; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 453; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(((PyObject *)__pyx_v_values)); PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_values)); __Pyx_GIVEREF(((PyObject *)__pyx_v_values)); __Pyx_INCREF(((PyObject *)__pyx_v_reverse)); PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)__pyx_v_reverse)); __Pyx_GIVEREF(((PyObject *)__pyx_v_reverse)); __Pyx_INCREF(__pyx_int_0); PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_int_0); __Pyx_GIVEREF(__pyx_int_0); __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 453; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __pyx_v_labels = __pyx_t_3; __pyx_t_3 = 0; /* "pandas/hashtable.pyx":454 * reverse = {} * labels = self.get_labels(values, reverse, 0) * return reverse, labels # <<<<<<<<<<<<<< * * def get_labels(self, ndarray[int64_t] values, Int64Vector uniques, */ __Pyx_XDECREF(__pyx_r); __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 454; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(((PyObject *)__pyx_v_reverse)); PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_v_reverse)); __Pyx_GIVEREF(((PyObject *)__pyx_v_reverse)); __Pyx_INCREF(__pyx_v_labels); PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_labels); __Pyx_GIVEREF(__pyx_v_labels); __pyx_r = ((PyObject *)__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L0; __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); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __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.hashtable.Int64HashTable.factorize", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF(__pyx_v_reverse); __Pyx_XDECREF(__pyx_v_labels); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_9hashtable_14Int64HashTable_23get_labels(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_6pandas_9hashtable_14Int64HashTable_23get_labels(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_values = 0; struct __pyx_obj_6pandas_9hashtable_Int64Vector *__pyx_v_uniques = 0; Py_ssize_t __pyx_v_count_prior; CYTHON_UNUSED Py_ssize_t __pyx_v_na_sentinel; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("get_labels (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__values,&__pyx_n_s__uniques,&__pyx_n_s__count_prior,&__pyx_n_s__na_sentinel,0}; PyObject* values[4] = {0,0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__values)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__uniques)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("get_labels", 1, 4, 4, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 456; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__count_prior)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("get_labels", 1, 4, 4, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 456; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__na_sentinel)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("get_labels", 1, 4, 4, 3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 456; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "get_labels") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 456; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 4) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[3] = PyTuple_GET_ITEM(__pyx_args, 3); } __pyx_v_values = ((PyArrayObject *)values[0]); __pyx_v_uniques = ((struct __pyx_obj_6pandas_9hashtable_Int64Vector *)values[1]); __pyx_v_count_prior = __Pyx_PyIndex_AsSsize_t(values[2]); if (unlikely((__pyx_v_count_prior == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 457; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_na_sentinel = __Pyx_PyIndex_AsSsize_t(values[3]); if (unlikely((__pyx_v_na_sentinel == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 457; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("get_labels", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 456; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.hashtable.Int64HashTable.get_labels", __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_filename = __pyx_f[0]; __pyx_lineno = 456; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_uniques), __pyx_ptype_6pandas_9hashtable_Int64Vector, 1, "uniques", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 456; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_9hashtable_14Int64HashTable_22get_labels(((struct __pyx_obj_6pandas_9hashtable_Int64HashTable *)__pyx_v_self), __pyx_v_values, __pyx_v_uniques, __pyx_v_count_prior, __pyx_v_na_sentinel); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/hashtable.pyx":456 * return reverse, labels * * def get_labels(self, ndarray[int64_t] values, Int64Vector uniques, # <<<<<<<<<<<<<< * Py_ssize_t count_prior, Py_ssize_t na_sentinel): * cdef: */ static PyObject *__pyx_pf_6pandas_9hashtable_14Int64HashTable_22get_labels(struct __pyx_obj_6pandas_9hashtable_Int64HashTable *__pyx_v_self, PyArrayObject *__pyx_v_values, struct __pyx_obj_6pandas_9hashtable_Int64Vector *__pyx_v_uniques, Py_ssize_t __pyx_v_count_prior, CYTHON_UNUSED Py_ssize_t __pyx_v_na_sentinel) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_n; PyArrayObject *__pyx_v_labels = 0; Py_ssize_t __pyx_v_idx; Py_ssize_t __pyx_v_count; int __pyx_v_ret; __pyx_t_5numpy_int64_t __pyx_v_val; khiter_t __pyx_v_k; __Pyx_LocalBuf_ND __pyx_pybuffernd_labels; __Pyx_Buffer __pyx_pybuffer_labels; __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; int __pyx_t_14; Py_ssize_t __pyx_t_15; Py_ssize_t __pyx_t_16; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_labels", 0); __pyx_pybuffer_labels.pybuffer.buf = NULL; __pyx_pybuffer_labels.refcount = 0; __pyx_pybuffernd_labels.data = NULL; __pyx_pybuffernd_labels.rcbuffer = &__pyx_pybuffer_labels; __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_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 456; __pyx_clineno = __LINE__; goto __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/hashtable.pyx":459 * Py_ssize_t count_prior, Py_ssize_t na_sentinel): * cdef: * Py_ssize_t i, n = len(values) # <<<<<<<<<<<<<< * ndarray[int64_t] labels * Py_ssize_t idx, count = count_prior */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 459; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/hashtable.pyx":461 * Py_ssize_t i, n = len(values) * ndarray[int64_t] labels * Py_ssize_t idx, count = count_prior # <<<<<<<<<<<<<< * int ret = 0 * int64_t val */ __pyx_v_count = __pyx_v_count_prior; /* "pandas/hashtable.pyx":462 * ndarray[int64_t] labels * Py_ssize_t idx, count = count_prior * int ret = 0 # <<<<<<<<<<<<<< * int64_t val * khiter_t k */ __pyx_v_ret = 0; /* "pandas/hashtable.pyx":466 * khiter_t k * * labels = np.empty(n, dtype=np.int64) # <<<<<<<<<<<<<< * * for i in range(n): */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 466; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 466; __pyx_clineno = __LINE__; goto __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_n); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 466; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 466; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 466; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_2)); __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 466; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s__int64); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 466; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__dtype), __pyx_t_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 466; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 466; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __Pyx_DECREF(((PyObject *)__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_filename = __pyx_f[0]; __pyx_lineno = 466; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_7 = ((PyArrayObject *)__pyx_t_6); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_labels.rcbuffer->pybuffer); __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_labels.rcbuffer->pybuffer, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_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_labels.rcbuffer->pybuffer, (PyObject*)__pyx_v_labels, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_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_pybuffernd_labels.diminfo[0].strides = __pyx_pybuffernd_labels.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_labels.diminfo[0].shape = __pyx_pybuffernd_labels.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 466; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_7 = 0; __pyx_v_labels = ((PyArrayObject *)__pyx_t_6); __pyx_t_6 = 0; /* "pandas/hashtable.pyx":468 * labels = np.empty(n, dtype=np.int64) * * for i in range(n): # <<<<<<<<<<<<<< * val = values[i] * k = kh_get_int64(self.table, val) */ __pyx_t_1 = __pyx_v_n; for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_1; __pyx_t_12+=1) { __pyx_v_i = __pyx_t_12; /* "pandas/hashtable.pyx":469 * * for i in range(n): * val = values[i] # <<<<<<<<<<<<<< * k = kh_get_int64(self.table, val) * if k != self.table.n_buckets: */ __pyx_t_13 = __pyx_v_i; __pyx_t_8 = -1; if (__pyx_t_13 < 0) { __pyx_t_13 += __pyx_pybuffernd_values.diminfo[0].shape; if (unlikely(__pyx_t_13 < 0)) __pyx_t_8 = 0; } else if (unlikely(__pyx_t_13 >= __pyx_pybuffernd_values.diminfo[0].shape)) __pyx_t_8 = 0; if (unlikely(__pyx_t_8 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_8); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 469; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_val = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_values.diminfo[0].strides)); /* "pandas/hashtable.pyx":470 * for i in range(n): * val = values[i] * k = kh_get_int64(self.table, val) # <<<<<<<<<<<<<< * if k != self.table.n_buckets: * idx = self.table.vals[k] */ __pyx_v_k = kh_get_int64(__pyx_v_self->table, __pyx_v_val); /* "pandas/hashtable.pyx":471 * val = values[i] * k = kh_get_int64(self.table, val) * if k != self.table.n_buckets: # <<<<<<<<<<<<<< * idx = self.table.vals[k] * labels[i] = idx */ __pyx_t_14 = ((__pyx_v_k != __pyx_v_self->table->n_buckets) != 0); if (__pyx_t_14) { /* "pandas/hashtable.pyx":472 * k = kh_get_int64(self.table, val) * if k != self.table.n_buckets: * idx = self.table.vals[k] # <<<<<<<<<<<<<< * labels[i] = idx * else: */ __pyx_v_idx = (__pyx_v_self->table->vals[__pyx_v_k]); /* "pandas/hashtable.pyx":473 * if k != self.table.n_buckets: * idx = self.table.vals[k] * labels[i] = idx # <<<<<<<<<<<<<< * else: * k = kh_put_int64(self.table, val, &ret) */ __pyx_t_15 = __pyx_v_i; __pyx_t_8 = -1; if (__pyx_t_15 < 0) { __pyx_t_15 += __pyx_pybuffernd_labels.diminfo[0].shape; if (unlikely(__pyx_t_15 < 0)) __pyx_t_8 = 0; } else if (unlikely(__pyx_t_15 >= __pyx_pybuffernd_labels.diminfo[0].shape)) __pyx_t_8 = 0; if (unlikely(__pyx_t_8 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_8); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 473; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_labels.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_labels.diminfo[0].strides) = __pyx_v_idx; goto __pyx_L5; } /*else*/ { /* "pandas/hashtable.pyx":475 * labels[i] = idx * else: * k = kh_put_int64(self.table, val, &ret) # <<<<<<<<<<<<<< * self.table.vals[k] = count * uniques.append(val) */ __pyx_v_k = kh_put_int64(__pyx_v_self->table, __pyx_v_val, (&__pyx_v_ret)); /* "pandas/hashtable.pyx":476 * else: * k = kh_put_int64(self.table, val, &ret) * self.table.vals[k] = count # <<<<<<<<<<<<<< * uniques.append(val) * labels[i] = count */ (__pyx_v_self->table->vals[__pyx_v_k]) = __pyx_v_count; /* "pandas/hashtable.pyx":477 * k = kh_put_int64(self.table, val, &ret) * self.table.vals[k] = count * uniques.append(val) # <<<<<<<<<<<<<< * labels[i] = count * count += 1 */ __pyx_t_6 = __pyx_f_6pandas_9hashtable_11Int64Vector_append(__pyx_v_uniques, __pyx_v_val); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 477; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; /* "pandas/hashtable.pyx":478 * self.table.vals[k] = count * uniques.append(val) * labels[i] = count # <<<<<<<<<<<<<< * count += 1 * */ __pyx_t_16 = __pyx_v_i; __pyx_t_8 = -1; if (__pyx_t_16 < 0) { __pyx_t_16 += __pyx_pybuffernd_labels.diminfo[0].shape; if (unlikely(__pyx_t_16 < 0)) __pyx_t_8 = 0; } else if (unlikely(__pyx_t_16 >= __pyx_pybuffernd_labels.diminfo[0].shape)) __pyx_t_8 = 0; if (unlikely(__pyx_t_8 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_8); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 478; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_labels.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_labels.diminfo[0].strides) = __pyx_v_count; /* "pandas/hashtable.pyx":479 * uniques.append(val) * labels[i] = count * count += 1 # <<<<<<<<<<<<<< * * return labels */ __pyx_v_count = (__pyx_v_count + 1); } __pyx_L5:; } /* "pandas/hashtable.pyx":481 * count += 1 * * return labels # <<<<<<<<<<<<<< * * def get_labels_groupby(self, ndarray[int64_t] values): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_labels)); __pyx_r = ((PyObject *)__pyx_v_labels); goto __pyx_L0; __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_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_labels.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.hashtable.Int64HashTable.get_labels", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_labels.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_labels); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_9hashtable_14Int64HashTable_25get_labels_groupby(PyObject *__pyx_v_self, PyObject *__pyx_v_values); /*proto*/ static PyObject *__pyx_pw_6pandas_9hashtable_14Int64HashTable_25get_labels_groupby(PyObject *__pyx_v_self, PyObject *__pyx_v_values) { CYTHON_UNUSED int __pyx_lineno = 0; CYTHON_UNUSED const char *__pyx_filename = NULL; CYTHON_UNUSED int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("get_labels_groupby (wrapper)", 0); if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 483; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_9hashtable_14Int64HashTable_24get_labels_groupby(((struct __pyx_obj_6pandas_9hashtable_Int64HashTable *)__pyx_v_self), ((PyArrayObject *)__pyx_v_values)); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/hashtable.pyx":483 * return labels * * def get_labels_groupby(self, ndarray[int64_t] values): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = len(values) */ static PyObject *__pyx_pf_6pandas_9hashtable_14Int64HashTable_24get_labels_groupby(struct __pyx_obj_6pandas_9hashtable_Int64HashTable *__pyx_v_self, PyArrayObject *__pyx_v_values) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_n; PyArrayObject *__pyx_v_labels = 0; Py_ssize_t __pyx_v_idx; Py_ssize_t __pyx_v_count; int __pyx_v_ret; __pyx_t_5numpy_int64_t __pyx_v_val; khiter_t __pyx_v_k; struct __pyx_obj_6pandas_9hashtable_Int64Vector *__pyx_v_uniques = 0; PyObject *__pyx_v_arr_uniques = NULL; __Pyx_LocalBuf_ND __pyx_pybuffernd_labels; __Pyx_Buffer __pyx_pybuffer_labels; __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; int __pyx_t_14; Py_ssize_t __pyx_t_15; Py_ssize_t __pyx_t_16; Py_ssize_t __pyx_t_17; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_labels_groupby", 0); __pyx_pybuffer_labels.pybuffer.buf = NULL; __pyx_pybuffer_labels.refcount = 0; __pyx_pybuffernd_labels.data = NULL; __pyx_pybuffernd_labels.rcbuffer = &__pyx_pybuffer_labels; __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_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 483; __pyx_clineno = __LINE__; goto __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/hashtable.pyx":485 * def get_labels_groupby(self, ndarray[int64_t] values): * cdef: * Py_ssize_t i, n = len(values) # <<<<<<<<<<<<<< * ndarray[int64_t] labels * Py_ssize_t idx, count = 0 */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 485; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/hashtable.pyx":487 * Py_ssize_t i, n = len(values) * ndarray[int64_t] labels * Py_ssize_t idx, count = 0 # <<<<<<<<<<<<<< * int ret = 0 * int64_t val */ __pyx_v_count = 0; /* "pandas/hashtable.pyx":488 * ndarray[int64_t] labels * Py_ssize_t idx, count = 0 * int ret = 0 # <<<<<<<<<<<<<< * int64_t val * khiter_t k */ __pyx_v_ret = 0; /* "pandas/hashtable.pyx":491 * int64_t val * khiter_t k * Int64Vector uniques = Int64Vector() # <<<<<<<<<<<<<< * * labels = np.empty(n, dtype=np.int64) */ __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_6pandas_9hashtable_Int64Vector)), ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 491; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_v_uniques = ((struct __pyx_obj_6pandas_9hashtable_Int64Vector *)__pyx_t_2); __pyx_t_2 = 0; /* "pandas/hashtable.pyx":493 * Int64Vector uniques = Int64Vector() * * labels = np.empty(n, dtype=np.int64) # <<<<<<<<<<<<<< * * for i in range(n): */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 493; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 493; __pyx_clineno = __LINE__; goto __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_n); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 493; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 493; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 493; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_2)); __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 493; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s__int64); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 493; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__dtype), __pyx_t_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 493; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 493; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __Pyx_DECREF(((PyObject *)__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_filename = __pyx_f[0]; __pyx_lineno = 493; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_7 = ((PyArrayObject *)__pyx_t_6); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_labels.rcbuffer->pybuffer); __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_labels.rcbuffer->pybuffer, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_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_labels.rcbuffer->pybuffer, (PyObject*)__pyx_v_labels, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_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_pybuffernd_labels.diminfo[0].strides = __pyx_pybuffernd_labels.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_labels.diminfo[0].shape = __pyx_pybuffernd_labels.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 493; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_7 = 0; __pyx_v_labels = ((PyArrayObject *)__pyx_t_6); __pyx_t_6 = 0; /* "pandas/hashtable.pyx":495 * labels = np.empty(n, dtype=np.int64) * * for i in range(n): # <<<<<<<<<<<<<< * val = values[i] * */ __pyx_t_1 = __pyx_v_n; for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_1; __pyx_t_12+=1) { __pyx_v_i = __pyx_t_12; /* "pandas/hashtable.pyx":496 * * for i in range(n): * val = values[i] # <<<<<<<<<<<<<< * * # specific for groupby */ __pyx_t_13 = __pyx_v_i; __pyx_t_8 = -1; if (__pyx_t_13 < 0) { __pyx_t_13 += __pyx_pybuffernd_values.diminfo[0].shape; if (unlikely(__pyx_t_13 < 0)) __pyx_t_8 = 0; } else if (unlikely(__pyx_t_13 >= __pyx_pybuffernd_values.diminfo[0].shape)) __pyx_t_8 = 0; if (unlikely(__pyx_t_8 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_8); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 496; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_val = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_values.diminfo[0].strides)); /* "pandas/hashtable.pyx":499 * * # specific for groupby * if val < 0: # <<<<<<<<<<<<<< * labels[i] = -1 * continue */ __pyx_t_14 = ((__pyx_v_val < 0) != 0); if (__pyx_t_14) { /* "pandas/hashtable.pyx":500 * # specific for groupby * if val < 0: * labels[i] = -1 # <<<<<<<<<<<<<< * continue * */ __pyx_t_15 = __pyx_v_i; __pyx_t_8 = -1; if (__pyx_t_15 < 0) { __pyx_t_15 += __pyx_pybuffernd_labels.diminfo[0].shape; if (unlikely(__pyx_t_15 < 0)) __pyx_t_8 = 0; } else if (unlikely(__pyx_t_15 >= __pyx_pybuffernd_labels.diminfo[0].shape)) __pyx_t_8 = 0; if (unlikely(__pyx_t_8 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_8); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 500; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_labels.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_labels.diminfo[0].strides) = -1; /* "pandas/hashtable.pyx":501 * if val < 0: * labels[i] = -1 * continue # <<<<<<<<<<<<<< * * k = kh_get_int64(self.table, val) */ goto __pyx_L3_continue; goto __pyx_L5; } __pyx_L5:; /* "pandas/hashtable.pyx":503 * continue * * k = kh_get_int64(self.table, val) # <<<<<<<<<<<<<< * if k != self.table.n_buckets: * idx = self.table.vals[k] */ __pyx_v_k = kh_get_int64(__pyx_v_self->table, __pyx_v_val); /* "pandas/hashtable.pyx":504 * * k = kh_get_int64(self.table, val) * if k != self.table.n_buckets: # <<<<<<<<<<<<<< * idx = self.table.vals[k] * labels[i] = idx */ __pyx_t_14 = ((__pyx_v_k != __pyx_v_self->table->n_buckets) != 0); if (__pyx_t_14) { /* "pandas/hashtable.pyx":505 * k = kh_get_int64(self.table, val) * if k != self.table.n_buckets: * idx = self.table.vals[k] # <<<<<<<<<<<<<< * labels[i] = idx * else: */ __pyx_v_idx = (__pyx_v_self->table->vals[__pyx_v_k]); /* "pandas/hashtable.pyx":506 * if k != self.table.n_buckets: * idx = self.table.vals[k] * labels[i] = idx # <<<<<<<<<<<<<< * else: * k = kh_put_int64(self.table, val, &ret) */ __pyx_t_16 = __pyx_v_i; __pyx_t_8 = -1; if (__pyx_t_16 < 0) { __pyx_t_16 += __pyx_pybuffernd_labels.diminfo[0].shape; if (unlikely(__pyx_t_16 < 0)) __pyx_t_8 = 0; } else if (unlikely(__pyx_t_16 >= __pyx_pybuffernd_labels.diminfo[0].shape)) __pyx_t_8 = 0; if (unlikely(__pyx_t_8 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_8); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 506; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_labels.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_labels.diminfo[0].strides) = __pyx_v_idx; goto __pyx_L6; } /*else*/ { /* "pandas/hashtable.pyx":508 * labels[i] = idx * else: * k = kh_put_int64(self.table, val, &ret) # <<<<<<<<<<<<<< * self.table.vals[k] = count * uniques.append(val) */ __pyx_v_k = kh_put_int64(__pyx_v_self->table, __pyx_v_val, (&__pyx_v_ret)); /* "pandas/hashtable.pyx":509 * else: * k = kh_put_int64(self.table, val, &ret) * self.table.vals[k] = count # <<<<<<<<<<<<<< * uniques.append(val) * labels[i] = count */ (__pyx_v_self->table->vals[__pyx_v_k]) = __pyx_v_count; /* "pandas/hashtable.pyx":510 * k = kh_put_int64(self.table, val, &ret) * self.table.vals[k] = count * uniques.append(val) # <<<<<<<<<<<<<< * labels[i] = count * count += 1 */ __pyx_t_6 = __pyx_f_6pandas_9hashtable_11Int64Vector_append(__pyx_v_uniques, __pyx_v_val); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 510; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; /* "pandas/hashtable.pyx":511 * self.table.vals[k] = count * uniques.append(val) * labels[i] = count # <<<<<<<<<<<<<< * count += 1 * */ __pyx_t_17 = __pyx_v_i; __pyx_t_8 = -1; if (__pyx_t_17 < 0) { __pyx_t_17 += __pyx_pybuffernd_labels.diminfo[0].shape; if (unlikely(__pyx_t_17 < 0)) __pyx_t_8 = 0; } else if (unlikely(__pyx_t_17 >= __pyx_pybuffernd_labels.diminfo[0].shape)) __pyx_t_8 = 0; if (unlikely(__pyx_t_8 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_8); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 511; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_labels.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_labels.diminfo[0].strides) = __pyx_v_count; /* "pandas/hashtable.pyx":512 * uniques.append(val) * labels[i] = count * count += 1 # <<<<<<<<<<<<<< * * arr_uniques = uniques.to_array() */ __pyx_v_count = (__pyx_v_count + 1); } __pyx_L6:; __pyx_L3_continue:; } /* "pandas/hashtable.pyx":514 * count += 1 * * arr_uniques = uniques.to_array() # <<<<<<<<<<<<<< * * return labels, arr_uniques */ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_uniques), __pyx_n_s__to_array); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 514; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_2 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 514; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_v_arr_uniques = __pyx_t_2; __pyx_t_2 = 0; /* "pandas/hashtable.pyx":516 * arr_uniques = uniques.to_array() * * return labels, arr_uniques # <<<<<<<<<<<<<< * * def unique(self, ndarray[int64_t] values): */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 516; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(((PyObject *)__pyx_v_labels)); PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_labels)); __Pyx_GIVEREF(((PyObject *)__pyx_v_labels)); __Pyx_INCREF(__pyx_v_arr_uniques); PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_arr_uniques); __Pyx_GIVEREF(__pyx_v_arr_uniques); __pyx_r = ((PyObject *)__pyx_t_2); __pyx_t_2 = 0; goto __pyx_L0; __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_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_labels.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.hashtable.Int64HashTable.get_labels_groupby", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_labels.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_labels); __Pyx_XDECREF((PyObject *)__pyx_v_uniques); __Pyx_XDECREF(__pyx_v_arr_uniques); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_9hashtable_14Int64HashTable_27unique(PyObject *__pyx_v_self, PyObject *__pyx_v_values); /*proto*/ static PyObject *__pyx_pw_6pandas_9hashtable_14Int64HashTable_27unique(PyObject *__pyx_v_self, PyObject *__pyx_v_values) { CYTHON_UNUSED int __pyx_lineno = 0; CYTHON_UNUSED const char *__pyx_filename = NULL; CYTHON_UNUSED int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("unique (wrapper)", 0); if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 518; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_9hashtable_14Int64HashTable_26unique(((struct __pyx_obj_6pandas_9hashtable_Int64HashTable *)__pyx_v_self), ((PyArrayObject *)__pyx_v_values)); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/hashtable.pyx":518 * return labels, arr_uniques * * def unique(self, ndarray[int64_t] values): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = len(values) */ static PyObject *__pyx_pf_6pandas_9hashtable_14Int64HashTable_26unique(struct __pyx_obj_6pandas_9hashtable_Int64HashTable *__pyx_v_self, PyArrayObject *__pyx_v_values) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_n; Py_ssize_t __pyx_v_count; int __pyx_v_ret; PyArrayObject *__pyx_v_result = 0; __pyx_t_5numpy_int64_t __pyx_v_val; khiter_t __pyx_v_k; struct __pyx_obj_6pandas_9hashtable_Int64Vector *__pyx_v_uniques = 0; __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; Py_ssize_t __pyx_t_3; Py_ssize_t __pyx_t_4; int __pyx_t_5; int __pyx_t_6; PyObject *__pyx_t_7 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("unique", 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_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 518; __pyx_clineno = __LINE__; goto __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/hashtable.pyx":520 * def unique(self, ndarray[int64_t] values): * cdef: * Py_ssize_t i, n = len(values) # <<<<<<<<<<<<<< * Py_ssize_t idx, count = 0 * int ret = 0 */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 520; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/hashtable.pyx":521 * cdef: * Py_ssize_t i, n = len(values) * Py_ssize_t idx, count = 0 # <<<<<<<<<<<<<< * int ret = 0 * ndarray result */ __pyx_v_count = 0; /* "pandas/hashtable.pyx":522 * Py_ssize_t i, n = len(values) * Py_ssize_t idx, count = 0 * int ret = 0 # <<<<<<<<<<<<<< * ndarray result * int64_t val */ __pyx_v_ret = 0; /* "pandas/hashtable.pyx":526 * int64_t val * khiter_t k * Int64Vector uniques = Int64Vector() # <<<<<<<<<<<<<< * * for i in range(n): */ __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_6pandas_9hashtable_Int64Vector)), ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 526; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_v_uniques = ((struct __pyx_obj_6pandas_9hashtable_Int64Vector *)__pyx_t_2); __pyx_t_2 = 0; /* "pandas/hashtable.pyx":528 * Int64Vector uniques = Int64Vector() * * for i in range(n): # <<<<<<<<<<<<<< * val = values[i] * k = kh_get_int64(self.table, val) */ __pyx_t_1 = __pyx_v_n; for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_1; __pyx_t_3+=1) { __pyx_v_i = __pyx_t_3; /* "pandas/hashtable.pyx":529 * * for i in range(n): * val = values[i] # <<<<<<<<<<<<<< * k = kh_get_int64(self.table, val) * if k == self.table.n_buckets: */ __pyx_t_4 = __pyx_v_i; __pyx_t_5 = -1; if (__pyx_t_4 < 0) { __pyx_t_4 += __pyx_pybuffernd_values.diminfo[0].shape; if (unlikely(__pyx_t_4 < 0)) __pyx_t_5 = 0; } else if (unlikely(__pyx_t_4 >= __pyx_pybuffernd_values.diminfo[0].shape)) __pyx_t_5 = 0; if (unlikely(__pyx_t_5 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_5); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 529; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_val = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_4, __pyx_pybuffernd_values.diminfo[0].strides)); /* "pandas/hashtable.pyx":530 * for i in range(n): * val = values[i] * k = kh_get_int64(self.table, val) # <<<<<<<<<<<<<< * if k == self.table.n_buckets: * k = kh_put_int64(self.table, val, &ret) */ __pyx_v_k = kh_get_int64(__pyx_v_self->table, __pyx_v_val); /* "pandas/hashtable.pyx":531 * val = values[i] * k = kh_get_int64(self.table, val) * if k == self.table.n_buckets: # <<<<<<<<<<<<<< * k = kh_put_int64(self.table, val, &ret) * uniques.append(val) */ __pyx_t_6 = ((__pyx_v_k == __pyx_v_self->table->n_buckets) != 0); if (__pyx_t_6) { /* "pandas/hashtable.pyx":532 * k = kh_get_int64(self.table, val) * if k == self.table.n_buckets: * k = kh_put_int64(self.table, val, &ret) # <<<<<<<<<<<<<< * uniques.append(val) * count += 1 */ __pyx_v_k = kh_put_int64(__pyx_v_self->table, __pyx_v_val, (&__pyx_v_ret)); /* "pandas/hashtable.pyx":533 * if k == self.table.n_buckets: * k = kh_put_int64(self.table, val, &ret) * uniques.append(val) # <<<<<<<<<<<<<< * count += 1 * */ __pyx_t_2 = __pyx_f_6pandas_9hashtable_11Int64Vector_append(__pyx_v_uniques, __pyx_v_val); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 533; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/hashtable.pyx":534 * k = kh_put_int64(self.table, val, &ret) * uniques.append(val) * count += 1 # <<<<<<<<<<<<<< * * result = uniques.to_array() */ __pyx_v_count = (__pyx_v_count + 1); goto __pyx_L5; } __pyx_L5:; } /* "pandas/hashtable.pyx":536 * count += 1 * * result = uniques.to_array() # <<<<<<<<<<<<<< * * return result */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_uniques), __pyx_n_s__to_array); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 536; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_7 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 536; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (!(likely(((__pyx_t_7) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_7, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 536; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_result = ((PyArrayObject *)__pyx_t_7); __pyx_t_7 = 0; /* "pandas/hashtable.pyx":538 * result = uniques.to_array() * * return result # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_result)); __pyx_r = ((PyObject *)__pyx_v_result); goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_7); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __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.hashtable.Int64HashTable.unique", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_result); __Pyx_XDECREF((PyObject *)__pyx_v_uniques); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pandas_9hashtable_16Float64HashTable_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_pw_6pandas_9hashtable_16Float64HashTable_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_size_hint = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__size_hint,0}; PyObject* values[1] = {0}; values[0] = ((PyObject *)__pyx_int_1); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__size_hint); if (value) { values[0] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 544; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_size_hint = values[0]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 544; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.hashtable.Float64HashTable.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return -1; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pandas_9hashtable_16Float64HashTable___cinit__(((struct __pyx_obj_6pandas_9hashtable_Float64HashTable *)__pyx_v_self), __pyx_v_size_hint); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/hashtable.pyx":544 * # cdef kh_float64_t *table * * def __cinit__(self, size_hint=1): # <<<<<<<<<<<<<< * self.table = kh_init_float64() * if size_hint is not None: */ static int __pyx_pf_6pandas_9hashtable_16Float64HashTable___cinit__(struct __pyx_obj_6pandas_9hashtable_Float64HashTable *__pyx_v_self, PyObject *__pyx_v_size_hint) { int __pyx_r; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; khint_t __pyx_t_3; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__cinit__", 0); /* "pandas/hashtable.pyx":545 * * def __cinit__(self, size_hint=1): * self.table = kh_init_float64() # <<<<<<<<<<<<<< * if size_hint is not None: * kh_resize_float64(self.table, size_hint) */ __pyx_v_self->table = kh_init_float64(); /* "pandas/hashtable.pyx":546 * def __cinit__(self, size_hint=1): * self.table = kh_init_float64() * if size_hint is not None: # <<<<<<<<<<<<<< * kh_resize_float64(self.table, size_hint) * */ __pyx_t_1 = (__pyx_v_size_hint != Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { /* "pandas/hashtable.pyx":547 * self.table = kh_init_float64() * if size_hint is not None: * kh_resize_float64(self.table, size_hint) # <<<<<<<<<<<<<< * * def __len__(self): */ __pyx_t_3 = __Pyx_PyInt_from_py_npy_uint32(__pyx_v_size_hint); if (unlikely((__pyx_t_3 == (khint_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 547; __pyx_clineno = __LINE__; goto __pyx_L1_error;} kh_resize_float64(__pyx_v_self->table, __pyx_t_3); goto __pyx_L3; } __pyx_L3:; __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("pandas.hashtable.Float64HashTable.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static Py_ssize_t __pyx_pw_6pandas_9hashtable_16Float64HashTable_3__len__(PyObject *__pyx_v_self); /*proto*/ static Py_ssize_t __pyx_pw_6pandas_9hashtable_16Float64HashTable_3__len__(PyObject *__pyx_v_self) { Py_ssize_t __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__len__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_9hashtable_16Float64HashTable_2__len__(((struct __pyx_obj_6pandas_9hashtable_Float64HashTable *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/hashtable.pyx":549 * kh_resize_float64(self.table, size_hint) * * def __len__(self): # <<<<<<<<<<<<<< * return self.table.size * */ static Py_ssize_t __pyx_pf_6pandas_9hashtable_16Float64HashTable_2__len__(struct __pyx_obj_6pandas_9hashtable_Float64HashTable *__pyx_v_self) { Py_ssize_t __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__len__", 0); /* "pandas/hashtable.pyx":550 * * def __len__(self): * return self.table.size # <<<<<<<<<<<<<< * * def __dealloc__(self): */ __pyx_r = __pyx_v_self->table->size; goto __pyx_L0; __pyx_r = 0; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static void __pyx_pw_6pandas_9hashtable_16Float64HashTable_5__dealloc__(PyObject *__pyx_v_self); /*proto*/ static void __pyx_pw_6pandas_9hashtable_16Float64HashTable_5__dealloc__(PyObject *__pyx_v_self) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0); __pyx_pf_6pandas_9hashtable_16Float64HashTable_4__dealloc__(((struct __pyx_obj_6pandas_9hashtable_Float64HashTable *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); } /* "pandas/hashtable.pyx":552 * return self.table.size * * def __dealloc__(self): # <<<<<<<<<<<<<< * kh_destroy_float64(self.table) * */ static void __pyx_pf_6pandas_9hashtable_16Float64HashTable_4__dealloc__(struct __pyx_obj_6pandas_9hashtable_Float64HashTable *__pyx_v_self) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__dealloc__", 0); /* "pandas/hashtable.pyx":553 * * def __dealloc__(self): * kh_destroy_float64(self.table) # <<<<<<<<<<<<<< * * def factorize(self, ndarray[float64_t] values): */ kh_destroy_float64(__pyx_v_self->table); __Pyx_RefNannyFinishContext(); } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_9hashtable_16Float64HashTable_7factorize(PyObject *__pyx_v_self, PyObject *__pyx_v_values); /*proto*/ static PyObject *__pyx_pw_6pandas_9hashtable_16Float64HashTable_7factorize(PyObject *__pyx_v_self, PyObject *__pyx_v_values) { CYTHON_UNUSED int __pyx_lineno = 0; CYTHON_UNUSED const char *__pyx_filename = NULL; CYTHON_UNUSED int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("factorize (wrapper)", 0); if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 555; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_9hashtable_16Float64HashTable_6factorize(((struct __pyx_obj_6pandas_9hashtable_Float64HashTable *)__pyx_v_self), ((PyArrayObject *)__pyx_v_values)); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/hashtable.pyx":555 * kh_destroy_float64(self.table) * * def factorize(self, ndarray[float64_t] values): # <<<<<<<<<<<<<< * uniques = Float64Vector() * labels = self.get_labels(values, uniques, 0, -1) */ static PyObject *__pyx_pf_6pandas_9hashtable_16Float64HashTable_6factorize(struct __pyx_obj_6pandas_9hashtable_Float64HashTable *__pyx_v_self, PyArrayObject *__pyx_v_values) { struct __pyx_obj_6pandas_9hashtable_Float64Vector *__pyx_v_uniques = NULL; PyObject *__pyx_v_labels = NULL; __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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("factorize", 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_filename = __pyx_f[0]; __pyx_lineno = 555; __pyx_clineno = __LINE__; goto __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/hashtable.pyx":556 * * def factorize(self, ndarray[float64_t] values): * uniques = Float64Vector() # <<<<<<<<<<<<<< * labels = self.get_labels(values, uniques, 0, -1) * return uniques.to_array(), labels */ __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_6pandas_9hashtable_Float64Vector)), ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 556; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_v_uniques = ((struct __pyx_obj_6pandas_9hashtable_Float64Vector *)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/hashtable.pyx":557 * def factorize(self, ndarray[float64_t] values): * uniques = Float64Vector() * labels = self.get_labels(values, uniques, 0, -1) # <<<<<<<<<<<<<< * return uniques.to_array(), labels * */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s__get_labels); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 557; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyTuple_New(4); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 557; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(((PyObject *)__pyx_v_values)); PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_values)); __Pyx_GIVEREF(((PyObject *)__pyx_v_values)); __Pyx_INCREF(((PyObject *)__pyx_v_uniques)); PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)__pyx_v_uniques)); __Pyx_GIVEREF(((PyObject *)__pyx_v_uniques)); __Pyx_INCREF(__pyx_int_0); PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_int_0); __Pyx_GIVEREF(__pyx_int_0); __Pyx_INCREF(__pyx_int_neg_1); PyTuple_SET_ITEM(__pyx_t_2, 3, __pyx_int_neg_1); __Pyx_GIVEREF(__pyx_int_neg_1); __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 557; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __pyx_v_labels = __pyx_t_3; __pyx_t_3 = 0; /* "pandas/hashtable.pyx":558 * uniques = Float64Vector() * labels = self.get_labels(values, uniques, 0, -1) * return uniques.to_array(), labels # <<<<<<<<<<<<<< * * def get_labels(self, ndarray[float64_t] values, */ __Pyx_XDECREF(__pyx_r); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_uniques), __pyx_n_s__to_array); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 558; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 558; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 558; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_labels); PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_labels); __Pyx_GIVEREF(__pyx_v_labels); __pyx_t_2 = 0; __pyx_r = ((PyObject *)__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L0; __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); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __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.hashtable.Float64HashTable.factorize", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_uniques); __Pyx_XDECREF(__pyx_v_labels); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_9hashtable_16Float64HashTable_9get_labels(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_6pandas_9hashtable_16Float64HashTable_9get_labels(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_values = 0; struct __pyx_obj_6pandas_9hashtable_Float64Vector *__pyx_v_uniques = 0; Py_ssize_t __pyx_v_count_prior; __pyx_t_5numpy_int64_t __pyx_v_na_sentinel; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("get_labels (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__values,&__pyx_n_s__uniques,&__pyx_n_s__count_prior,&__pyx_n_s__na_sentinel,0}; PyObject* values[4] = {0,0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__values)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__uniques)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("get_labels", 1, 4, 4, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 560; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__count_prior)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("get_labels", 1, 4, 4, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 560; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__na_sentinel)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("get_labels", 1, 4, 4, 3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 560; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "get_labels") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 560; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 4) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[3] = PyTuple_GET_ITEM(__pyx_args, 3); } __pyx_v_values = ((PyArrayObject *)values[0]); __pyx_v_uniques = ((struct __pyx_obj_6pandas_9hashtable_Float64Vector *)values[1]); __pyx_v_count_prior = __Pyx_PyIndex_AsSsize_t(values[2]); if (unlikely((__pyx_v_count_prior == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 562; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_na_sentinel = __Pyx_PyInt_from_py_npy_int64(values[3]); if (unlikely((__pyx_v_na_sentinel == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 562; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("get_labels", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 560; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.hashtable.Float64HashTable.get_labels", __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_filename = __pyx_f[0]; __pyx_lineno = 560; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_uniques), __pyx_ptype_6pandas_9hashtable_Float64Vector, 1, "uniques", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 561; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_9hashtable_16Float64HashTable_8get_labels(((struct __pyx_obj_6pandas_9hashtable_Float64HashTable *)__pyx_v_self), __pyx_v_values, __pyx_v_uniques, __pyx_v_count_prior, __pyx_v_na_sentinel); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/hashtable.pyx":560 * return uniques.to_array(), labels * * def get_labels(self, ndarray[float64_t] values, # <<<<<<<<<<<<<< * Float64Vector uniques, * Py_ssize_t count_prior, int64_t na_sentinel): */ static PyObject *__pyx_pf_6pandas_9hashtable_16Float64HashTable_8get_labels(struct __pyx_obj_6pandas_9hashtable_Float64HashTable *__pyx_v_self, PyArrayObject *__pyx_v_values, struct __pyx_obj_6pandas_9hashtable_Float64Vector *__pyx_v_uniques, Py_ssize_t __pyx_v_count_prior, __pyx_t_5numpy_int64_t __pyx_v_na_sentinel) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_n; PyArrayObject *__pyx_v_labels = 0; Py_ssize_t __pyx_v_idx; Py_ssize_t __pyx_v_count; int __pyx_v_ret; __pyx_t_5numpy_float64_t __pyx_v_val; khiter_t __pyx_v_k; __Pyx_LocalBuf_ND __pyx_pybuffernd_labels; __Pyx_Buffer __pyx_pybuffer_labels; __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; int __pyx_t_14; Py_ssize_t __pyx_t_15; Py_ssize_t __pyx_t_16; Py_ssize_t __pyx_t_17; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_labels", 0); __pyx_pybuffer_labels.pybuffer.buf = NULL; __pyx_pybuffer_labels.refcount = 0; __pyx_pybuffernd_labels.data = NULL; __pyx_pybuffernd_labels.rcbuffer = &__pyx_pybuffer_labels; __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_filename = __pyx_f[0]; __pyx_lineno = 560; __pyx_clineno = __LINE__; goto __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/hashtable.pyx":564 * Py_ssize_t count_prior, int64_t na_sentinel): * cdef: * Py_ssize_t i, n = len(values) # <<<<<<<<<<<<<< * ndarray[int64_t] labels * Py_ssize_t idx, count = count_prior */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 564; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/hashtable.pyx":566 * Py_ssize_t i, n = len(values) * ndarray[int64_t] labels * Py_ssize_t idx, count = count_prior # <<<<<<<<<<<<<< * int ret = 0 * float64_t val */ __pyx_v_count = __pyx_v_count_prior; /* "pandas/hashtable.pyx":567 * ndarray[int64_t] labels * Py_ssize_t idx, count = count_prior * int ret = 0 # <<<<<<<<<<<<<< * float64_t val * khiter_t k */ __pyx_v_ret = 0; /* "pandas/hashtable.pyx":571 * khiter_t k * * labels = np.empty(n, dtype=np.int64) # <<<<<<<<<<<<<< * * for i in range(n): */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 571; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 571; __pyx_clineno = __LINE__; goto __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_n); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 571; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 571; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 571; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_2)); __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 571; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s__int64); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 571; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__dtype), __pyx_t_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 571; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 571; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __Pyx_DECREF(((PyObject *)__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_filename = __pyx_f[0]; __pyx_lineno = 571; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_7 = ((PyArrayObject *)__pyx_t_6); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_labels.rcbuffer->pybuffer); __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_labels.rcbuffer->pybuffer, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_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_labels.rcbuffer->pybuffer, (PyObject*)__pyx_v_labels, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_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_pybuffernd_labels.diminfo[0].strides = __pyx_pybuffernd_labels.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_labels.diminfo[0].shape = __pyx_pybuffernd_labels.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 571; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_7 = 0; __pyx_v_labels = ((PyArrayObject *)__pyx_t_6); __pyx_t_6 = 0; /* "pandas/hashtable.pyx":573 * labels = np.empty(n, dtype=np.int64) * * for i in range(n): # <<<<<<<<<<<<<< * val = values[i] * */ __pyx_t_1 = __pyx_v_n; for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_1; __pyx_t_12+=1) { __pyx_v_i = __pyx_t_12; /* "pandas/hashtable.pyx":574 * * for i in range(n): * val = values[i] # <<<<<<<<<<<<<< * * if val != val: */ __pyx_t_13 = __pyx_v_i; __pyx_t_8 = -1; if (__pyx_t_13 < 0) { __pyx_t_13 += __pyx_pybuffernd_values.diminfo[0].shape; if (unlikely(__pyx_t_13 < 0)) __pyx_t_8 = 0; } else if (unlikely(__pyx_t_13 >= __pyx_pybuffernd_values.diminfo[0].shape)) __pyx_t_8 = 0; if (unlikely(__pyx_t_8 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_8); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 574; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_val = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_values.diminfo[0].strides)); /* "pandas/hashtable.pyx":576 * val = values[i] * * if val != val: # <<<<<<<<<<<<<< * labels[i] = na_sentinel * continue */ __pyx_t_14 = ((__pyx_v_val != __pyx_v_val) != 0); if (__pyx_t_14) { /* "pandas/hashtable.pyx":577 * * if val != val: * labels[i] = na_sentinel # <<<<<<<<<<<<<< * continue * */ __pyx_t_15 = __pyx_v_i; __pyx_t_8 = -1; if (__pyx_t_15 < 0) { __pyx_t_15 += __pyx_pybuffernd_labels.diminfo[0].shape; if (unlikely(__pyx_t_15 < 0)) __pyx_t_8 = 0; } else if (unlikely(__pyx_t_15 >= __pyx_pybuffernd_labels.diminfo[0].shape)) __pyx_t_8 = 0; if (unlikely(__pyx_t_8 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_8); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 577; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_labels.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_labels.diminfo[0].strides) = __pyx_v_na_sentinel; /* "pandas/hashtable.pyx":578 * if val != val: * labels[i] = na_sentinel * continue # <<<<<<<<<<<<<< * * k = kh_get_float64(self.table, val) */ goto __pyx_L3_continue; goto __pyx_L5; } __pyx_L5:; /* "pandas/hashtable.pyx":580 * continue * * k = kh_get_float64(self.table, val) # <<<<<<<<<<<<<< * if k != self.table.n_buckets: * idx = self.table.vals[k] */ __pyx_v_k = kh_get_float64(__pyx_v_self->table, __pyx_v_val); /* "pandas/hashtable.pyx":581 * * k = kh_get_float64(self.table, val) * if k != self.table.n_buckets: # <<<<<<<<<<<<<< * idx = self.table.vals[k] * labels[i] = idx */ __pyx_t_14 = ((__pyx_v_k != __pyx_v_self->table->n_buckets) != 0); if (__pyx_t_14) { /* "pandas/hashtable.pyx":582 * k = kh_get_float64(self.table, val) * if k != self.table.n_buckets: * idx = self.table.vals[k] # <<<<<<<<<<<<<< * labels[i] = idx * else: */ __pyx_v_idx = (__pyx_v_self->table->vals[__pyx_v_k]); /* "pandas/hashtable.pyx":583 * if k != self.table.n_buckets: * idx = self.table.vals[k] * labels[i] = idx # <<<<<<<<<<<<<< * else: * k = kh_put_float64(self.table, val, &ret) */ __pyx_t_16 = __pyx_v_i; __pyx_t_8 = -1; if (__pyx_t_16 < 0) { __pyx_t_16 += __pyx_pybuffernd_labels.diminfo[0].shape; if (unlikely(__pyx_t_16 < 0)) __pyx_t_8 = 0; } else if (unlikely(__pyx_t_16 >= __pyx_pybuffernd_labels.diminfo[0].shape)) __pyx_t_8 = 0; if (unlikely(__pyx_t_8 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_8); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 583; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_labels.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_labels.diminfo[0].strides) = __pyx_v_idx; goto __pyx_L6; } /*else*/ { /* "pandas/hashtable.pyx":585 * labels[i] = idx * else: * k = kh_put_float64(self.table, val, &ret) # <<<<<<<<<<<<<< * self.table.vals[k] = count * uniques.append(val) */ __pyx_v_k = kh_put_float64(__pyx_v_self->table, __pyx_v_val, (&__pyx_v_ret)); /* "pandas/hashtable.pyx":586 * else: * k = kh_put_float64(self.table, val, &ret) * self.table.vals[k] = count # <<<<<<<<<<<<<< * uniques.append(val) * labels[i] = count */ (__pyx_v_self->table->vals[__pyx_v_k]) = __pyx_v_count; /* "pandas/hashtable.pyx":587 * k = kh_put_float64(self.table, val, &ret) * self.table.vals[k] = count * uniques.append(val) # <<<<<<<<<<<<<< * labels[i] = count * count += 1 */ __pyx_t_6 = __pyx_f_6pandas_9hashtable_13Float64Vector_append(__pyx_v_uniques, __pyx_v_val); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 587; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; /* "pandas/hashtable.pyx":588 * self.table.vals[k] = count * uniques.append(val) * labels[i] = count # <<<<<<<<<<<<<< * count += 1 * */ __pyx_t_17 = __pyx_v_i; __pyx_t_8 = -1; if (__pyx_t_17 < 0) { __pyx_t_17 += __pyx_pybuffernd_labels.diminfo[0].shape; if (unlikely(__pyx_t_17 < 0)) __pyx_t_8 = 0; } else if (unlikely(__pyx_t_17 >= __pyx_pybuffernd_labels.diminfo[0].shape)) __pyx_t_8 = 0; if (unlikely(__pyx_t_8 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_8); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 588; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_labels.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_labels.diminfo[0].strides) = __pyx_v_count; /* "pandas/hashtable.pyx":589 * uniques.append(val) * labels[i] = count * count += 1 # <<<<<<<<<<<<<< * * return labels */ __pyx_v_count = (__pyx_v_count + 1); } __pyx_L6:; __pyx_L3_continue:; } /* "pandas/hashtable.pyx":591 * count += 1 * * return labels # <<<<<<<<<<<<<< * * def map_locations(self, ndarray[float64_t] values): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_labels)); __pyx_r = ((PyObject *)__pyx_v_labels); goto __pyx_L0; __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_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_labels.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.hashtable.Float64HashTable.get_labels", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_labels.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_labels); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_9hashtable_16Float64HashTable_11map_locations(PyObject *__pyx_v_self, PyObject *__pyx_v_values); /*proto*/ static PyObject *__pyx_pw_6pandas_9hashtable_16Float64HashTable_11map_locations(PyObject *__pyx_v_self, PyObject *__pyx_v_values) { CYTHON_UNUSED int __pyx_lineno = 0; CYTHON_UNUSED const char *__pyx_filename = NULL; CYTHON_UNUSED int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("map_locations (wrapper)", 0); if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 593; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_9hashtable_16Float64HashTable_10map_locations(((struct __pyx_obj_6pandas_9hashtable_Float64HashTable *)__pyx_v_self), ((PyArrayObject *)__pyx_v_values)); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/hashtable.pyx":593 * return labels * * def map_locations(self, ndarray[float64_t] values): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = len(values) */ static PyObject *__pyx_pf_6pandas_9hashtable_16Float64HashTable_10map_locations(struct __pyx_obj_6pandas_9hashtable_Float64HashTable *__pyx_v_self, PyArrayObject *__pyx_v_values) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_n; int __pyx_v_ret; khiter_t __pyx_v_k; __Pyx_LocalBuf_ND __pyx_pybuffernd_values; __Pyx_Buffer __pyx_pybuffer_values; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; Py_ssize_t __pyx_t_2; Py_ssize_t __pyx_t_3; int __pyx_t_4; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("map_locations", 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_filename = __pyx_f[0]; __pyx_lineno = 593; __pyx_clineno = __LINE__; goto __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/hashtable.pyx":595 * def map_locations(self, ndarray[float64_t] values): * cdef: * Py_ssize_t i, n = len(values) # <<<<<<<<<<<<<< * int ret = 0 * khiter_t k */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 595; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/hashtable.pyx":596 * cdef: * Py_ssize_t i, n = len(values) * int ret = 0 # <<<<<<<<<<<<<< * khiter_t k * */ __pyx_v_ret = 0; /* "pandas/hashtable.pyx":599 * khiter_t k * * for i in range(n): # <<<<<<<<<<<<<< * k = kh_put_float64(self.table, values[i], &ret) * self.table.vals[k] = i */ __pyx_t_1 = __pyx_v_n; for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) { __pyx_v_i = __pyx_t_2; /* "pandas/hashtable.pyx":600 * * for i in range(n): * k = kh_put_float64(self.table, values[i], &ret) # <<<<<<<<<<<<<< * self.table.vals[k] = i * */ __pyx_t_3 = __pyx_v_i; __pyx_t_4 = -1; if (__pyx_t_3 < 0) { __pyx_t_3 += __pyx_pybuffernd_values.diminfo[0].shape; if (unlikely(__pyx_t_3 < 0)) __pyx_t_4 = 0; } else if (unlikely(__pyx_t_3 >= __pyx_pybuffernd_values.diminfo[0].shape)) __pyx_t_4 = 0; if (unlikely(__pyx_t_4 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_4); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 600; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_k = kh_put_float64(__pyx_v_self->table, (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_3, __pyx_pybuffernd_values.diminfo[0].strides)), (&__pyx_v_ret)); /* "pandas/hashtable.pyx":601 * for i in range(n): * k = kh_put_float64(self.table, values[i], &ret) * self.table.vals[k] = i # <<<<<<<<<<<<<< * * def lookup(self, ndarray[float64_t] values): */ (__pyx_v_self->table->vals[__pyx_v_k]) = __pyx_v_i; } __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __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.hashtable.Float64HashTable.map_locations", __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; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_9hashtable_16Float64HashTable_13lookup(PyObject *__pyx_v_self, PyObject *__pyx_v_values); /*proto*/ static PyObject *__pyx_pw_6pandas_9hashtable_16Float64HashTable_13lookup(PyObject *__pyx_v_self, PyObject *__pyx_v_values) { CYTHON_UNUSED int __pyx_lineno = 0; CYTHON_UNUSED const char *__pyx_filename = NULL; CYTHON_UNUSED int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("lookup (wrapper)", 0); if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 603; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_9hashtable_16Float64HashTable_12lookup(((struct __pyx_obj_6pandas_9hashtable_Float64HashTable *)__pyx_v_self), ((PyArrayObject *)__pyx_v_values)); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/hashtable.pyx":603 * self.table.vals[k] = i * * def lookup(self, ndarray[float64_t] values): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = len(values) */ static PyObject *__pyx_pf_6pandas_9hashtable_16Float64HashTable_12lookup(struct __pyx_obj_6pandas_9hashtable_Float64HashTable *__pyx_v_self, PyArrayObject *__pyx_v_values) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_n; CYTHON_UNUSED int __pyx_v_ret; __pyx_t_5numpy_float64_t __pyx_v_val; khiter_t __pyx_v_k; PyArrayObject *__pyx_v_locs = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_locs; __Pyx_Buffer __pyx_pybuffer_locs; __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; Py_ssize_t __pyx_t_8; Py_ssize_t __pyx_t_9; int __pyx_t_10; int __pyx_t_11; Py_ssize_t __pyx_t_12; Py_ssize_t __pyx_t_13; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __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_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_filename = __pyx_f[0]; __pyx_lineno = 603; __pyx_clineno = __LINE__; goto __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/hashtable.pyx":605 * def lookup(self, ndarray[float64_t] values): * cdef: * Py_ssize_t i, n = len(values) # <<<<<<<<<<<<<< * int ret = 0 * float64_t val */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 605; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/hashtable.pyx":606 * cdef: * Py_ssize_t i, n = len(values) * int ret = 0 # <<<<<<<<<<<<<< * float64_t val * khiter_t k */ __pyx_v_ret = 0; /* "pandas/hashtable.pyx":609 * float64_t val * khiter_t k * ndarray[int64_t] locs = np.empty(n, dtype=np.int64) # <<<<<<<<<<<<<< * * for i in range(n): */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 609; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 609; __pyx_clineno = __LINE__; goto __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_n); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 609; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 609; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 609; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_2)); __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 609; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s__int64); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 609; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__dtype), __pyx_t_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 609; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 609; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __Pyx_DECREF(((PyObject *)__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_filename = __pyx_f[0]; __pyx_lineno = 609; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_7 = ((PyArrayObject *)__pyx_t_6); { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_locs.rcbuffer->pybuffer, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { __pyx_v_locs = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_locs.rcbuffer->pybuffer.buf = NULL; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 609; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } else {__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]; } } __pyx_t_7 = 0; __pyx_v_locs = ((PyArrayObject *)__pyx_t_6); __pyx_t_6 = 0; /* "pandas/hashtable.pyx":611 * ndarray[int64_t] locs = np.empty(n, dtype=np.int64) * * for i in range(n): # <<<<<<<<<<<<<< * val = values[i] * k = kh_get_float64(self.table, val) */ __pyx_t_1 = __pyx_v_n; for (__pyx_t_8 = 0; __pyx_t_8 < __pyx_t_1; __pyx_t_8+=1) { __pyx_v_i = __pyx_t_8; /* "pandas/hashtable.pyx":612 * * for i in range(n): * val = values[i] # <<<<<<<<<<<<<< * k = kh_get_float64(self.table, val) * if k != self.table.n_buckets: */ __pyx_t_9 = __pyx_v_i; __pyx_t_10 = -1; if (__pyx_t_9 < 0) { __pyx_t_9 += __pyx_pybuffernd_values.diminfo[0].shape; if (unlikely(__pyx_t_9 < 0)) __pyx_t_10 = 0; } else if (unlikely(__pyx_t_9 >= __pyx_pybuffernd_values.diminfo[0].shape)) __pyx_t_10 = 0; if (unlikely(__pyx_t_10 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_10); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 612; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_val = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_9, __pyx_pybuffernd_values.diminfo[0].strides)); /* "pandas/hashtable.pyx":613 * for i in range(n): * val = values[i] * k = kh_get_float64(self.table, val) # <<<<<<<<<<<<<< * if k != self.table.n_buckets: * locs[i] = self.table.vals[k] */ __pyx_v_k = kh_get_float64(__pyx_v_self->table, __pyx_v_val); /* "pandas/hashtable.pyx":614 * val = values[i] * k = kh_get_float64(self.table, val) * if k != self.table.n_buckets: # <<<<<<<<<<<<<< * locs[i] = self.table.vals[k] * else: */ __pyx_t_11 = ((__pyx_v_k != __pyx_v_self->table->n_buckets) != 0); if (__pyx_t_11) { /* "pandas/hashtable.pyx":615 * k = kh_get_float64(self.table, val) * if k != self.table.n_buckets: * locs[i] = self.table.vals[k] # <<<<<<<<<<<<<< * else: * locs[i] = -1 */ __pyx_t_12 = __pyx_v_i; __pyx_t_10 = -1; if (__pyx_t_12 < 0) { __pyx_t_12 += __pyx_pybuffernd_locs.diminfo[0].shape; if (unlikely(__pyx_t_12 < 0)) __pyx_t_10 = 0; } else if (unlikely(__pyx_t_12 >= __pyx_pybuffernd_locs.diminfo[0].shape)) __pyx_t_10 = 0; if (unlikely(__pyx_t_10 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_10); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 615; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_locs.rcbuffer->pybuffer.buf, __pyx_t_12, __pyx_pybuffernd_locs.diminfo[0].strides) = (__pyx_v_self->table->vals[__pyx_v_k]); goto __pyx_L5; } /*else*/ { /* "pandas/hashtable.pyx":617 * locs[i] = self.table.vals[k] * else: * locs[i] = -1 # <<<<<<<<<<<<<< * * return locs */ __pyx_t_13 = __pyx_v_i; __pyx_t_10 = -1; if (__pyx_t_13 < 0) { __pyx_t_13 += __pyx_pybuffernd_locs.diminfo[0].shape; if (unlikely(__pyx_t_13 < 0)) __pyx_t_10 = 0; } else if (unlikely(__pyx_t_13 >= __pyx_pybuffernd_locs.diminfo[0].shape)) __pyx_t_10 = 0; if (unlikely(__pyx_t_10 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_10); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 617; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_locs.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_locs.diminfo[0].strides) = -1; } __pyx_L5:; } /* "pandas/hashtable.pyx":619 * locs[i] = -1 * * return locs # <<<<<<<<<<<<<< * * def unique(self, ndarray[float64_t] values): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_locs)); __pyx_r = ((PyObject *)__pyx_v_locs); goto __pyx_L0; __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_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_locs.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.hashtable.Float64HashTable.lookup", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_locs.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_locs); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_9hashtable_16Float64HashTable_15unique(PyObject *__pyx_v_self, PyObject *__pyx_v_values); /*proto*/ static PyObject *__pyx_pw_6pandas_9hashtable_16Float64HashTable_15unique(PyObject *__pyx_v_self, PyObject *__pyx_v_values) { CYTHON_UNUSED int __pyx_lineno = 0; CYTHON_UNUSED const char *__pyx_filename = NULL; CYTHON_UNUSED int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("unique (wrapper)", 0); if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 621; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_9hashtable_16Float64HashTable_14unique(((struct __pyx_obj_6pandas_9hashtable_Float64HashTable *)__pyx_v_self), ((PyArrayObject *)__pyx_v_values)); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/hashtable.pyx":621 * return locs * * def unique(self, ndarray[float64_t] values): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = len(values) */ static PyObject *__pyx_pf_6pandas_9hashtable_16Float64HashTable_14unique(struct __pyx_obj_6pandas_9hashtable_Float64HashTable *__pyx_v_self, PyArrayObject *__pyx_v_values) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_n; Py_ssize_t __pyx_v_count; int __pyx_v_ret; __pyx_t_5numpy_float64_t __pyx_v_val; khiter_t __pyx_v_k; struct __pyx_obj_6pandas_9hashtable_Float64Vector *__pyx_v_uniques = 0; int __pyx_v_seen_na; __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; Py_ssize_t __pyx_t_3; Py_ssize_t __pyx_t_4; int __pyx_t_5; int __pyx_t_6; __pyx_t_5numpy_float64_t __pyx_t_7; PyObject *__pyx_t_8 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("unique", 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_filename = __pyx_f[0]; __pyx_lineno = 621; __pyx_clineno = __LINE__; goto __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/hashtable.pyx":623 * def unique(self, ndarray[float64_t] values): * cdef: * Py_ssize_t i, n = len(values) # <<<<<<<<<<<<<< * Py_ssize_t idx, count = 0 * int ret = 0 */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 623; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/hashtable.pyx":624 * cdef: * Py_ssize_t i, n = len(values) * Py_ssize_t idx, count = 0 # <<<<<<<<<<<<<< * int ret = 0 * float64_t val */ __pyx_v_count = 0; /* "pandas/hashtable.pyx":625 * Py_ssize_t i, n = len(values) * Py_ssize_t idx, count = 0 * int ret = 0 # <<<<<<<<<<<<<< * float64_t val * khiter_t k */ __pyx_v_ret = 0; /* "pandas/hashtable.pyx":628 * float64_t val * khiter_t k * Float64Vector uniques = Float64Vector() # <<<<<<<<<<<<<< * bint seen_na = 0 * */ __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_6pandas_9hashtable_Float64Vector)), ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 628; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_v_uniques = ((struct __pyx_obj_6pandas_9hashtable_Float64Vector *)__pyx_t_2); __pyx_t_2 = 0; /* "pandas/hashtable.pyx":629 * khiter_t k * Float64Vector uniques = Float64Vector() * bint seen_na = 0 # <<<<<<<<<<<<<< * * for i in range(n): */ __pyx_v_seen_na = 0; /* "pandas/hashtable.pyx":631 * bint seen_na = 0 * * for i in range(n): # <<<<<<<<<<<<<< * val = values[i] * */ __pyx_t_1 = __pyx_v_n; for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_1; __pyx_t_3+=1) { __pyx_v_i = __pyx_t_3; /* "pandas/hashtable.pyx":632 * * for i in range(n): * val = values[i] # <<<<<<<<<<<<<< * * if val == val: */ __pyx_t_4 = __pyx_v_i; __pyx_t_5 = -1; if (__pyx_t_4 < 0) { __pyx_t_4 += __pyx_pybuffernd_values.diminfo[0].shape; if (unlikely(__pyx_t_4 < 0)) __pyx_t_5 = 0; } else if (unlikely(__pyx_t_4 >= __pyx_pybuffernd_values.diminfo[0].shape)) __pyx_t_5 = 0; if (unlikely(__pyx_t_5 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_5); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 632; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_val = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_4, __pyx_pybuffernd_values.diminfo[0].strides)); /* "pandas/hashtable.pyx":634 * val = values[i] * * if val == val: # <<<<<<<<<<<<<< * k = kh_get_float64(self.table, val) * if k == self.table.n_buckets: */ __pyx_t_6 = ((__pyx_v_val == __pyx_v_val) != 0); if (__pyx_t_6) { /* "pandas/hashtable.pyx":635 * * if val == val: * k = kh_get_float64(self.table, val) # <<<<<<<<<<<<<< * if k == self.table.n_buckets: * k = kh_put_float64(self.table, val, &ret) */ __pyx_v_k = kh_get_float64(__pyx_v_self->table, __pyx_v_val); /* "pandas/hashtable.pyx":636 * if val == val: * k = kh_get_float64(self.table, val) * if k == self.table.n_buckets: # <<<<<<<<<<<<<< * k = kh_put_float64(self.table, val, &ret) * uniques.append(val) */ __pyx_t_6 = ((__pyx_v_k == __pyx_v_self->table->n_buckets) != 0); if (__pyx_t_6) { /* "pandas/hashtable.pyx":637 * k = kh_get_float64(self.table, val) * if k == self.table.n_buckets: * k = kh_put_float64(self.table, val, &ret) # <<<<<<<<<<<<<< * uniques.append(val) * count += 1 */ __pyx_v_k = kh_put_float64(__pyx_v_self->table, __pyx_v_val, (&__pyx_v_ret)); /* "pandas/hashtable.pyx":638 * if k == self.table.n_buckets: * k = kh_put_float64(self.table, val, &ret) * uniques.append(val) # <<<<<<<<<<<<<< * count += 1 * elif not seen_na: */ __pyx_t_2 = __pyx_f_6pandas_9hashtable_13Float64Vector_append(__pyx_v_uniques, __pyx_v_val); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 638; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/hashtable.pyx":639 * k = kh_put_float64(self.table, val, &ret) * uniques.append(val) * count += 1 # <<<<<<<<<<<<<< * elif not seen_na: * seen_na = 1 */ __pyx_v_count = (__pyx_v_count + 1); goto __pyx_L6; } __pyx_L6:; goto __pyx_L5; } /* "pandas/hashtable.pyx":640 * uniques.append(val) * count += 1 * elif not seen_na: # <<<<<<<<<<<<<< * seen_na = 1 * uniques.append(ONAN) */ __pyx_t_6 = ((!(__pyx_v_seen_na != 0)) != 0); if (__pyx_t_6) { /* "pandas/hashtable.pyx":641 * count += 1 * elif not seen_na: * seen_na = 1 # <<<<<<<<<<<<<< * uniques.append(ONAN) * */ __pyx_v_seen_na = 1; /* "pandas/hashtable.pyx":642 * elif not seen_na: * seen_na = 1 * uniques.append(ONAN) # <<<<<<<<<<<<<< * * return uniques.to_array() */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__ONAN); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 642; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_7 = __pyx_PyFloat_AsDouble(__pyx_t_2); if (unlikely((__pyx_t_7 == (npy_float64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 642; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __pyx_f_6pandas_9hashtable_13Float64Vector_append(__pyx_v_uniques, __pyx_t_7); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 642; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; goto __pyx_L5; } __pyx_L5:; } /* "pandas/hashtable.pyx":644 * uniques.append(ONAN) * * return uniques.to_array() # <<<<<<<<<<<<<< * * na_sentinel = object */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_uniques), __pyx_n_s__to_array); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 644; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_8 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 644; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_8; __pyx_t_8 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_8); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __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.hashtable.Float64HashTable.unique", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_uniques); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pandas_9hashtable_17PyObjectHashTable_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_pw_6pandas_9hashtable_17PyObjectHashTable_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_size_hint = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__size_hint,0}; PyObject* values[1] = {0}; values[0] = ((PyObject *)__pyx_int_1); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__size_hint); if (value) { values[0] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 651; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_size_hint = values[0]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("__init__", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 651; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.hashtable.PyObjectHashTable.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return -1; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pandas_9hashtable_17PyObjectHashTable___init__(((struct __pyx_obj_6pandas_9hashtable_PyObjectHashTable *)__pyx_v_self), __pyx_v_size_hint); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/hashtable.pyx":651 * # cdef kh_pymap_t *table * * def __init__(self, size_hint=1): # <<<<<<<<<<<<<< * self.table = kh_init_pymap() * kh_resize_pymap(self.table, size_hint) */ static int __pyx_pf_6pandas_9hashtable_17PyObjectHashTable___init__(struct __pyx_obj_6pandas_9hashtable_PyObjectHashTable *__pyx_v_self, PyObject *__pyx_v_size_hint) { int __pyx_r; __Pyx_RefNannyDeclarations khint_t __pyx_t_1; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__init__", 0); /* "pandas/hashtable.pyx":652 * * def __init__(self, size_hint=1): * self.table = kh_init_pymap() # <<<<<<<<<<<<<< * kh_resize_pymap(self.table, size_hint) * */ __pyx_v_self->table = kh_init_pymap(); /* "pandas/hashtable.pyx":653 * def __init__(self, size_hint=1): * self.table = kh_init_pymap() * kh_resize_pymap(self.table, size_hint) # <<<<<<<<<<<<<< * * def __dealloc__(self): */ __pyx_t_1 = __Pyx_PyInt_from_py_npy_uint32(__pyx_v_size_hint); if (unlikely((__pyx_t_1 == (khint_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 653; __pyx_clineno = __LINE__; goto __pyx_L1_error;} kh_resize_pymap(__pyx_v_self->table, __pyx_t_1); __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("pandas.hashtable.PyObjectHashTable.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static void __pyx_pw_6pandas_9hashtable_17PyObjectHashTable_3__dealloc__(PyObject *__pyx_v_self); /*proto*/ static void __pyx_pw_6pandas_9hashtable_17PyObjectHashTable_3__dealloc__(PyObject *__pyx_v_self) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0); __pyx_pf_6pandas_9hashtable_17PyObjectHashTable_2__dealloc__(((struct __pyx_obj_6pandas_9hashtable_PyObjectHashTable *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); } /* "pandas/hashtable.pyx":655 * kh_resize_pymap(self.table, size_hint) * * def __dealloc__(self): # <<<<<<<<<<<<<< * if self.table is not NULL: * self.destroy() */ static void __pyx_pf_6pandas_9hashtable_17PyObjectHashTable_2__dealloc__(struct __pyx_obj_6pandas_9hashtable_PyObjectHashTable *__pyx_v_self) { __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__dealloc__", 0); /* "pandas/hashtable.pyx":656 * * def __dealloc__(self): * if self.table is not NULL: # <<<<<<<<<<<<<< * self.destroy() * */ __pyx_t_1 = ((__pyx_v_self->table != NULL) != 0); if (__pyx_t_1) { /* "pandas/hashtable.pyx":657 * def __dealloc__(self): * if self.table is not NULL: * self.destroy() # <<<<<<<<<<<<<< * * def __len__(self): */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s__destroy); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 657; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 657; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L3; } __pyx_L3:; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("pandas.hashtable.PyObjectHashTable.__dealloc__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_L0:; __Pyx_RefNannyFinishContext(); } /* Python wrapper */ static Py_ssize_t __pyx_pw_6pandas_9hashtable_17PyObjectHashTable_5__len__(PyObject *__pyx_v_self); /*proto*/ static Py_ssize_t __pyx_pw_6pandas_9hashtable_17PyObjectHashTable_5__len__(PyObject *__pyx_v_self) { Py_ssize_t __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__len__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_9hashtable_17PyObjectHashTable_4__len__(((struct __pyx_obj_6pandas_9hashtable_PyObjectHashTable *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/hashtable.pyx":659 * self.destroy() * * def __len__(self): # <<<<<<<<<<<<<< * return self.table.size * */ static Py_ssize_t __pyx_pf_6pandas_9hashtable_17PyObjectHashTable_4__len__(struct __pyx_obj_6pandas_9hashtable_PyObjectHashTable *__pyx_v_self) { Py_ssize_t __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__len__", 0); /* "pandas/hashtable.pyx":660 * * def __len__(self): * return self.table.size # <<<<<<<<<<<<<< * * def __contains__(self, object key): */ __pyx_r = __pyx_v_self->table->size; goto __pyx_L0; __pyx_r = 0; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pandas_9hashtable_17PyObjectHashTable_7__contains__(PyObject *__pyx_v_self, PyObject *__pyx_v_key); /*proto*/ static int __pyx_pw_6pandas_9hashtable_17PyObjectHashTable_7__contains__(PyObject *__pyx_v_self, PyObject *__pyx_v_key) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__contains__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_9hashtable_17PyObjectHashTable_6__contains__(((struct __pyx_obj_6pandas_9hashtable_PyObjectHashTable *)__pyx_v_self), ((PyObject *)__pyx_v_key)); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/hashtable.pyx":662 * return self.table.size * * def __contains__(self, object key): # <<<<<<<<<<<<<< * cdef khiter_t k * hash(key) */ static int __pyx_pf_6pandas_9hashtable_17PyObjectHashTable_6__contains__(struct __pyx_obj_6pandas_9hashtable_PyObjectHashTable *__pyx_v_self, PyObject *__pyx_v_key) { khiter_t __pyx_v_k; int __pyx_r; __Pyx_RefNannyDeclarations Py_hash_t __pyx_t_1; PyObject *__pyx_t_2 = NULL; int __pyx_t_3; int __pyx_t_4; int __pyx_t_5; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__contains__", 0); __Pyx_INCREF(__pyx_v_key); /* "pandas/hashtable.pyx":664 * def __contains__(self, object key): * cdef khiter_t k * hash(key) # <<<<<<<<<<<<<< * if key != key or key is None: * key = na_sentinel */ __pyx_t_1 = PyObject_Hash(__pyx_v_key); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 664; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/hashtable.pyx":665 * cdef khiter_t k * hash(key) * if key != key or key is None: # <<<<<<<<<<<<<< * key = na_sentinel * k = kh_get_pymap(self.table, key) */ __pyx_t_2 = PyObject_RichCompare(__pyx_v_key, __pyx_v_key, Py_NE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 665; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 665; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (!__pyx_t_3) { __pyx_t_4 = (__pyx_v_key == Py_None); __pyx_t_5 = __pyx_t_4; } else { __pyx_t_5 = __pyx_t_3; } if (__pyx_t_5) { /* "pandas/hashtable.pyx":666 * hash(key) * if key != key or key is None: * key = na_sentinel # <<<<<<<<<<<<<< * k = kh_get_pymap(self.table, key) * return k != self.table.n_buckets */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__na_sentinel); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 666; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF_SET(__pyx_v_key, __pyx_t_2); __pyx_t_2 = 0; goto __pyx_L3; } __pyx_L3:; /* "pandas/hashtable.pyx":667 * if key != key or key is None: * key = na_sentinel * k = kh_get_pymap(self.table, key) # <<<<<<<<<<<<<< * return k != self.table.n_buckets * */ __pyx_v_k = kh_get_pymap(__pyx_v_self->table, ((PyObject *)__pyx_v_key)); /* "pandas/hashtable.pyx":668 * key = na_sentinel * k = kh_get_pymap(self.table, key) * return k != self.table.n_buckets # <<<<<<<<<<<<<< * * def destroy(self): */ __pyx_r = (__pyx_v_k != __pyx_v_self->table->n_buckets); goto __pyx_L0; __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("pandas.hashtable.PyObjectHashTable.__contains__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_XDECREF(__pyx_v_key); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_9hashtable_17PyObjectHashTable_9destroy(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static PyObject *__pyx_pw_6pandas_9hashtable_17PyObjectHashTable_9destroy(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("destroy (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_9hashtable_17PyObjectHashTable_8destroy(((struct __pyx_obj_6pandas_9hashtable_PyObjectHashTable *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/hashtable.pyx":670 * return k != self.table.n_buckets * * def destroy(self): # <<<<<<<<<<<<<< * kh_destroy_pymap(self.table) * self.table = NULL */ static PyObject *__pyx_pf_6pandas_9hashtable_17PyObjectHashTable_8destroy(struct __pyx_obj_6pandas_9hashtable_PyObjectHashTable *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("destroy", 0); /* "pandas/hashtable.pyx":671 * * def destroy(self): * kh_destroy_pymap(self.table) # <<<<<<<<<<<<<< * self.table = NULL * */ kh_destroy_pymap(__pyx_v_self->table); /* "pandas/hashtable.pyx":672 * def destroy(self): * kh_destroy_pymap(self.table) * self.table = NULL # <<<<<<<<<<<<<< * * cpdef get_item(self, object val): */ __pyx_v_self->table = NULL; __pyx_r = Py_None; __Pyx_INCREF(Py_None); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/hashtable.pyx":674 * self.table = NULL * * cpdef get_item(self, object val): # <<<<<<<<<<<<<< * cdef khiter_t k * if val != val or val is None: */ static PyObject *__pyx_pw_6pandas_9hashtable_17PyObjectHashTable_11get_item(PyObject *__pyx_v_self, PyObject *__pyx_v_val); /*proto*/ static PyObject *__pyx_f_6pandas_9hashtable_17PyObjectHashTable_get_item(struct __pyx_obj_6pandas_9hashtable_PyObjectHashTable *__pyx_v_self, PyObject *__pyx_v_val, int __pyx_skip_dispatch) { khiter_t __pyx_v_k; 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_item", 0); __Pyx_INCREF(__pyx_v_val); /* 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__get_item); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 674; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_6pandas_9hashtable_17PyObjectHashTable_11get_item)) { __Pyx_XDECREF(__pyx_r); __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 674; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_val); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_val); __Pyx_GIVEREF(__pyx_v_val); __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 674; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __pyx_r = __pyx_t_3; __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } /* "pandas/hashtable.pyx":676 * cpdef get_item(self, object val): * cdef khiter_t k * if val != val or val is None: # <<<<<<<<<<<<<< * val = na_sentinel * k = kh_get_pymap(self.table, val) */ __pyx_t_1 = PyObject_RichCompare(__pyx_v_val, __pyx_v_val, Py_NE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 676; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 676; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (!__pyx_t_4) { __pyx_t_5 = (__pyx_v_val == Py_None); __pyx_t_6 = __pyx_t_5; } else { __pyx_t_6 = __pyx_t_4; } if (__pyx_t_6) { /* "pandas/hashtable.pyx":677 * cdef khiter_t k * if val != val or val is None: * val = na_sentinel # <<<<<<<<<<<<<< * k = kh_get_pymap(self.table, val) * if k != self.table.n_buckets: */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__na_sentinel); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 677; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF_SET(__pyx_v_val, __pyx_t_1); __pyx_t_1 = 0; goto __pyx_L3; } __pyx_L3:; /* "pandas/hashtable.pyx":678 * if val != val or val is None: * val = na_sentinel * k = kh_get_pymap(self.table, val) # <<<<<<<<<<<<<< * if k != self.table.n_buckets: * return self.table.vals[k] */ __pyx_v_k = kh_get_pymap(__pyx_v_self->table, ((PyObject *)__pyx_v_val)); /* "pandas/hashtable.pyx":679 * val = na_sentinel * k = kh_get_pymap(self.table, val) * if k != self.table.n_buckets: # <<<<<<<<<<<<<< * return self.table.vals[k] * else: */ __pyx_t_6 = ((__pyx_v_k != __pyx_v_self->table->n_buckets) != 0); if (__pyx_t_6) { /* "pandas/hashtable.pyx":680 * k = kh_get_pymap(self.table, val) * if k != self.table.n_buckets: * return self.table.vals[k] # <<<<<<<<<<<<<< * else: * raise KeyError(val) */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyInt_FromSize_t((__pyx_v_self->table->vals[__pyx_v_k])); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 680; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; goto __pyx_L4; } /*else*/ { /* "pandas/hashtable.pyx":682 * return self.table.vals[k] * else: * raise KeyError(val) # <<<<<<<<<<<<<< * * def get_iter_test(self, object key, Py_ssize_t iterations): */ __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 682; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_val); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_val); __Pyx_GIVEREF(__pyx_v_val); __pyx_t_3 = PyObject_Call(__pyx_builtin_KeyError, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 682; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 682; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_L4:; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("pandas.hashtable.PyObjectHashTable.get_item", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_val); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_9hashtable_17PyObjectHashTable_11get_item(PyObject *__pyx_v_self, PyObject *__pyx_v_val); /*proto*/ static PyObject *__pyx_pw_6pandas_9hashtable_17PyObjectHashTable_11get_item(PyObject *__pyx_v_self, PyObject *__pyx_v_val) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("get_item (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_9hashtable_17PyObjectHashTable_10get_item(((struct __pyx_obj_6pandas_9hashtable_PyObjectHashTable *)__pyx_v_self), ((PyObject *)__pyx_v_val)); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/hashtable.pyx":674 * self.table = NULL * * cpdef get_item(self, object val): # <<<<<<<<<<<<<< * cdef khiter_t k * if val != val or val is None: */ static PyObject *__pyx_pf_6pandas_9hashtable_17PyObjectHashTable_10get_item(struct __pyx_obj_6pandas_9hashtable_PyObjectHashTable *__pyx_v_self, PyObject *__pyx_v_val) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_item", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = ((struct __pyx_vtabstruct_6pandas_9hashtable_PyObjectHashTable *)__pyx_v_self->__pyx_vtab)->get_item(__pyx_v_self, __pyx_v_val, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 674; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas.hashtable.PyObjectHashTable.get_item", __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_9hashtable_17PyObjectHashTable_13get_iter_test(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_6pandas_9hashtable_17PyObjectHashTable_13get_iter_test(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_key = 0; Py_ssize_t __pyx_v_iterations; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("get_iter_test (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__key,&__pyx_n_s__iterations,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__key)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__iterations)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("get_iter_test", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 684; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "get_iter_test") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 684; __pyx_clineno = __LINE__; goto __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_key = values[0]; __pyx_v_iterations = __Pyx_PyIndex_AsSsize_t(values[1]); if (unlikely((__pyx_v_iterations == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 684; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("get_iter_test", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 684; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.hashtable.PyObjectHashTable.get_iter_test", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pandas_9hashtable_17PyObjectHashTable_12get_iter_test(((struct __pyx_obj_6pandas_9hashtable_PyObjectHashTable *)__pyx_v_self), __pyx_v_key, __pyx_v_iterations); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/hashtable.pyx":684 * raise KeyError(val) * * def get_iter_test(self, object key, Py_ssize_t iterations): # <<<<<<<<<<<<<< * cdef Py_ssize_t i, val * if key != key or key is None: */ static PyObject *__pyx_pf_6pandas_9hashtable_17PyObjectHashTable_12get_iter_test(struct __pyx_obj_6pandas_9hashtable_PyObjectHashTable *__pyx_v_self, PyObject *__pyx_v_key, Py_ssize_t __pyx_v_iterations) { CYTHON_UNUSED Py_ssize_t __pyx_v_i; CYTHON_UNUSED Py_ssize_t __pyx_v_val; khint_t __pyx_v_k; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; int __pyx_t_3; int __pyx_t_4; Py_ssize_t __pyx_t_5; Py_ssize_t __pyx_t_6; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_iter_test", 0); __Pyx_INCREF(__pyx_v_key); /* "pandas/hashtable.pyx":686 * def get_iter_test(self, object key, Py_ssize_t iterations): * cdef Py_ssize_t i, val * if key != key or key is None: # <<<<<<<<<<<<<< * key = na_sentinel * for i in range(iterations): */ __pyx_t_1 = PyObject_RichCompare(__pyx_v_key, __pyx_v_key, Py_NE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 686; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 686; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (!__pyx_t_2) { __pyx_t_3 = (__pyx_v_key == Py_None); __pyx_t_4 = __pyx_t_3; } else { __pyx_t_4 = __pyx_t_2; } if (__pyx_t_4) { /* "pandas/hashtable.pyx":687 * cdef Py_ssize_t i, val * if key != key or key is None: * key = na_sentinel # <<<<<<<<<<<<<< * for i in range(iterations): * k = kh_get_pymap(self.table, key) */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__na_sentinel); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 687; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF_SET(__pyx_v_key, __pyx_t_1); __pyx_t_1 = 0; goto __pyx_L3; } __pyx_L3:; /* "pandas/hashtable.pyx":688 * if key != key or key is None: * key = na_sentinel * for i in range(iterations): # <<<<<<<<<<<<<< * k = kh_get_pymap(self.table, key) * if k != self.table.n_buckets: */ __pyx_t_5 = __pyx_v_iterations; for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) { __pyx_v_i = __pyx_t_6; /* "pandas/hashtable.pyx":689 * key = na_sentinel * for i in range(iterations): * k = kh_get_pymap(self.table, key) # <<<<<<<<<<<<<< * if k != self.table.n_buckets: * val = self.table.vals[k] */ __pyx_v_k = kh_get_pymap(__pyx_v_self->table, ((PyObject *)__pyx_v_key)); /* "pandas/hashtable.pyx":690 * for i in range(iterations): * k = kh_get_pymap(self.table, key) * if k != self.table.n_buckets: # <<<<<<<<<<<<<< * val = self.table.vals[k] * */ __pyx_t_4 = ((__pyx_v_k != __pyx_v_self->table->n_buckets) != 0); if (__pyx_t_4) { /* "pandas/hashtable.pyx":691 * k = kh_get_pymap(self.table, key) * if k != self.table.n_buckets: * val = self.table.vals[k] # <<<<<<<<<<<<<< * * cpdef set_item(self, object key, Py_ssize_t val): */ __pyx_v_val = (__pyx_v_self->table->vals[__pyx_v_k]); goto __pyx_L6; } __pyx_L6:; } __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas.hashtable.PyObjectHashTable.get_iter_test", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_key); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/hashtable.pyx":693 * val = self.table.vals[k] * * cpdef set_item(self, object key, Py_ssize_t val): # <<<<<<<<<<<<<< * cdef: * khiter_t k */ static PyObject *__pyx_pw_6pandas_9hashtable_17PyObjectHashTable_15set_item(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_6pandas_9hashtable_17PyObjectHashTable_set_item(struct __pyx_obj_6pandas_9hashtable_PyObjectHashTable *__pyx_v_self, PyObject *__pyx_v_key, Py_ssize_t __pyx_v_val, int __pyx_skip_dispatch) { khiter_t __pyx_v_k; int __pyx_v_ret; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; Py_hash_t __pyx_t_4; int __pyx_t_5; int __pyx_t_6; int __pyx_t_7; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("set_item", 0); __Pyx_INCREF(__pyx_v_key); /* 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__set_item); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 693; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_6pandas_9hashtable_17PyObjectHashTable_15set_item)) { __Pyx_XDECREF(__pyx_r); __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_val); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 693; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 693; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_v_key); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_key); __Pyx_GIVEREF(__pyx_v_key); PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 693; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(((PyObject *)__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/hashtable.pyx":696 * cdef: * khiter_t k * int ret = 0 # <<<<<<<<<<<<<< * char* buf * */ __pyx_v_ret = 0; /* "pandas/hashtable.pyx":699 * char* buf * * hash(key) # <<<<<<<<<<<<<< * if key != key or key is None: * key = na_sentinel */ __pyx_t_4 = PyObject_Hash(__pyx_v_key); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 699; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/hashtable.pyx":700 * * hash(key) * if key != key or key is None: # <<<<<<<<<<<<<< * key = na_sentinel * k = kh_put_pymap(self.table, key, &ret) */ __pyx_t_1 = PyObject_RichCompare(__pyx_v_key, __pyx_v_key, Py_NE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 700; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 700; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (!__pyx_t_5) { __pyx_t_6 = (__pyx_v_key == Py_None); __pyx_t_7 = __pyx_t_6; } else { __pyx_t_7 = __pyx_t_5; } if (__pyx_t_7) { /* "pandas/hashtable.pyx":701 * hash(key) * if key != key or key is None: * key = na_sentinel # <<<<<<<<<<<<<< * k = kh_put_pymap(self.table, key, &ret) * # self.table.keys[k] = key */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__na_sentinel); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 701; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF_SET(__pyx_v_key, __pyx_t_1); __pyx_t_1 = 0; goto __pyx_L3; } __pyx_L3:; /* "pandas/hashtable.pyx":702 * if key != key or key is None: * key = na_sentinel * k = kh_put_pymap(self.table, key, &ret) # <<<<<<<<<<<<<< * # self.table.keys[k] = key * if kh_exist_pymap(self.table, k): */ __pyx_v_k = kh_put_pymap(__pyx_v_self->table, ((PyObject *)__pyx_v_key), (&__pyx_v_ret)); /* "pandas/hashtable.pyx":704 * k = kh_put_pymap(self.table, key, &ret) * # self.table.keys[k] = key * if kh_exist_pymap(self.table, k): # <<<<<<<<<<<<<< * self.table.vals[k] = val * else: */ __pyx_t_7 = (kh_exist_pymap(__pyx_v_self->table, __pyx_v_k) != 0); if (__pyx_t_7) { /* "pandas/hashtable.pyx":705 * # self.table.keys[k] = key * if kh_exist_pymap(self.table, k): * self.table.vals[k] = val # <<<<<<<<<<<<<< * else: * raise KeyError(key) */ (__pyx_v_self->table->vals[__pyx_v_k]) = __pyx_v_val; goto __pyx_L4; } /*else*/ { /* "pandas/hashtable.pyx":707 * self.table.vals[k] = val * else: * raise KeyError(key) # <<<<<<<<<<<<<< * * def map_locations(self, ndarray[object] values): */ __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 707; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_key); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_key); __Pyx_GIVEREF(__pyx_v_key); __pyx_t_2 = PyObject_Call(__pyx_builtin_KeyError, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 707; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 707; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_L4:; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("pandas.hashtable.PyObjectHashTable.set_item", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_key); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_9hashtable_17PyObjectHashTable_15set_item(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_6pandas_9hashtable_17PyObjectHashTable_15set_item(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_key = 0; Py_ssize_t __pyx_v_val; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("set_item (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__key,&__pyx_n_s__val,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__key)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__val)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("set_item", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 693; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "set_item") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 693; __pyx_clineno = __LINE__; goto __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_key = values[0]; __pyx_v_val = __Pyx_PyIndex_AsSsize_t(values[1]); if (unlikely((__pyx_v_val == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 693; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("set_item", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 693; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.hashtable.PyObjectHashTable.set_item", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pandas_9hashtable_17PyObjectHashTable_14set_item(((struct __pyx_obj_6pandas_9hashtable_PyObjectHashTable *)__pyx_v_self), __pyx_v_key, __pyx_v_val); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/hashtable.pyx":693 * val = self.table.vals[k] * * cpdef set_item(self, object key, Py_ssize_t val): # <<<<<<<<<<<<<< * cdef: * khiter_t k */ static PyObject *__pyx_pf_6pandas_9hashtable_17PyObjectHashTable_14set_item(struct __pyx_obj_6pandas_9hashtable_PyObjectHashTable *__pyx_v_self, PyObject *__pyx_v_key, Py_ssize_t __pyx_v_val) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("set_item", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = ((struct __pyx_vtabstruct_6pandas_9hashtable_PyObjectHashTable *)__pyx_v_self->__pyx_vtab)->set_item(__pyx_v_self, __pyx_v_key, __pyx_v_val, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 693; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas.hashtable.PyObjectHashTable.set_item", __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_9hashtable_17PyObjectHashTable_17map_locations(PyObject *__pyx_v_self, PyObject *__pyx_v_values); /*proto*/ static PyObject *__pyx_pw_6pandas_9hashtable_17PyObjectHashTable_17map_locations(PyObject *__pyx_v_self, PyObject *__pyx_v_values) { CYTHON_UNUSED int __pyx_lineno = 0; CYTHON_UNUSED const char *__pyx_filename = NULL; CYTHON_UNUSED int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("map_locations (wrapper)", 0); if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 709; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_9hashtable_17PyObjectHashTable_16map_locations(((struct __pyx_obj_6pandas_9hashtable_PyObjectHashTable *)__pyx_v_self), ((PyArrayObject *)__pyx_v_values)); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/hashtable.pyx":709 * raise KeyError(key) * * def map_locations(self, ndarray[object] values): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = len(values) */ static PyObject *__pyx_pf_6pandas_9hashtable_17PyObjectHashTable_16map_locations(struct __pyx_obj_6pandas_9hashtable_PyObjectHashTable *__pyx_v_self, PyArrayObject *__pyx_v_values) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_n; int __pyx_v_ret; PyObject *__pyx_v_val = 0; khiter_t __pyx_v_k; __Pyx_LocalBuf_ND __pyx_pybuffernd_values; __Pyx_Buffer __pyx_pybuffer_values; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; Py_ssize_t __pyx_t_2; PyObject *__pyx_t_3 = NULL; Py_ssize_t __pyx_t_4; int __pyx_t_5; Py_hash_t __pyx_t_6; int __pyx_t_7; int __pyx_t_8; int __pyx_t_9; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("map_locations", 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_object, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 709; __pyx_clineno = __LINE__; goto __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/hashtable.pyx":711 * def map_locations(self, ndarray[object] values): * cdef: * Py_ssize_t i, n = len(values) # <<<<<<<<<<<<<< * int ret = 0 * object val */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 711; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/hashtable.pyx":712 * cdef: * Py_ssize_t i, n = len(values) * int ret = 0 # <<<<<<<<<<<<<< * object val * khiter_t k */ __pyx_v_ret = 0; /* "pandas/hashtable.pyx":716 * khiter_t k * * for i in range(n): # <<<<<<<<<<<<<< * val = values[i] * hash(val) */ __pyx_t_1 = __pyx_v_n; for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) { __pyx_v_i = __pyx_t_2; /* "pandas/hashtable.pyx":717 * * for i in range(n): * val = values[i] # <<<<<<<<<<<<<< * hash(val) * if val != val or val is None: */ __pyx_t_4 = __pyx_v_i; __pyx_t_5 = -1; if (__pyx_t_4 < 0) { __pyx_t_4 += __pyx_pybuffernd_values.diminfo[0].shape; if (unlikely(__pyx_t_4 < 0)) __pyx_t_5 = 0; } else if (unlikely(__pyx_t_4 >= __pyx_pybuffernd_values.diminfo[0].shape)) __pyx_t_5 = 0; if (unlikely(__pyx_t_5 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_5); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 717; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_3 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_4, __pyx_pybuffernd_values.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_3); __Pyx_XDECREF_SET(__pyx_v_val, __pyx_t_3); __pyx_t_3 = 0; /* "pandas/hashtable.pyx":718 * for i in range(n): * val = values[i] * hash(val) # <<<<<<<<<<<<<< * if val != val or val is None: * val = na_sentinel */ __pyx_t_6 = PyObject_Hash(__pyx_v_val); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 718; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/hashtable.pyx":719 * val = values[i] * hash(val) * if val != val or val is None: # <<<<<<<<<<<<<< * val = na_sentinel * */ __pyx_t_3 = PyObject_RichCompare(__pyx_v_val, __pyx_v_val, Py_NE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 719; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 719; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (!__pyx_t_7) { __pyx_t_8 = (__pyx_v_val == Py_None); __pyx_t_9 = __pyx_t_8; } else { __pyx_t_9 = __pyx_t_7; } if (__pyx_t_9) { /* "pandas/hashtable.pyx":720 * hash(val) * if val != val or val is None: * val = na_sentinel # <<<<<<<<<<<<<< * * k = kh_put_pymap(self.table, val, &ret) */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s__na_sentinel); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 720; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF_SET(__pyx_v_val, __pyx_t_3); __pyx_t_3 = 0; goto __pyx_L5; } __pyx_L5:; /* "pandas/hashtable.pyx":722 * val = na_sentinel * * k = kh_put_pymap(self.table, val, &ret) # <<<<<<<<<<<<<< * self.table.vals[k] = i * */ __pyx_v_k = kh_put_pymap(__pyx_v_self->table, ((PyObject *)__pyx_v_val), (&__pyx_v_ret)); /* "pandas/hashtable.pyx":723 * * k = kh_put_pymap(self.table, val, &ret) * self.table.vals[k] = i # <<<<<<<<<<<<<< * * def lookup(self, ndarray[object] values): */ (__pyx_v_self->table->vals[__pyx_v_k]) = __pyx_v_i; } __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __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.hashtable.PyObjectHashTable.map_locations", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF(__pyx_v_val); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_9hashtable_17PyObjectHashTable_19lookup(PyObject *__pyx_v_self, PyObject *__pyx_v_values); /*proto*/ static PyObject *__pyx_pw_6pandas_9hashtable_17PyObjectHashTable_19lookup(PyObject *__pyx_v_self, PyObject *__pyx_v_values) { CYTHON_UNUSED int __pyx_lineno = 0; CYTHON_UNUSED const char *__pyx_filename = NULL; CYTHON_UNUSED int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("lookup (wrapper)", 0); if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 725; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_9hashtable_17PyObjectHashTable_18lookup(((struct __pyx_obj_6pandas_9hashtable_PyObjectHashTable *)__pyx_v_self), ((PyArrayObject *)__pyx_v_values)); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/hashtable.pyx":725 * self.table.vals[k] = i * * def lookup(self, ndarray[object] values): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = len(values) */ static PyObject *__pyx_pf_6pandas_9hashtable_17PyObjectHashTable_18lookup(struct __pyx_obj_6pandas_9hashtable_PyObjectHashTable *__pyx_v_self, PyArrayObject *__pyx_v_values) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_n; CYTHON_UNUSED int __pyx_v_ret; PyObject *__pyx_v_val = 0; khiter_t __pyx_v_k; PyArrayObject *__pyx_v_locs = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_locs; __Pyx_Buffer __pyx_pybuffer_locs; __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; Py_ssize_t __pyx_t_8; Py_ssize_t __pyx_t_9; int __pyx_t_10; Py_hash_t __pyx_t_11; int __pyx_t_12; int __pyx_t_13; int __pyx_t_14; Py_ssize_t __pyx_t_15; Py_ssize_t __pyx_t_16; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __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_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_filename = __pyx_f[0]; __pyx_lineno = 725; __pyx_clineno = __LINE__; goto __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/hashtable.pyx":727 * def lookup(self, ndarray[object] values): * cdef: * Py_ssize_t i, n = len(values) # <<<<<<<<<<<<<< * int ret = 0 * object val */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 727; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/hashtable.pyx":728 * cdef: * Py_ssize_t i, n = len(values) * int ret = 0 # <<<<<<<<<<<<<< * object val * khiter_t k */ __pyx_v_ret = 0; /* "pandas/hashtable.pyx":731 * object val * khiter_t k * ndarray[int64_t] locs = np.empty(n, dtype=np.int64) # <<<<<<<<<<<<<< * * for i in range(n): */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 731; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 731; __pyx_clineno = __LINE__; goto __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_n); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 731; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 731; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 731; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_2)); __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 731; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s__int64); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 731; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__dtype), __pyx_t_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 731; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 731; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __Pyx_DECREF(((PyObject *)__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_filename = __pyx_f[0]; __pyx_lineno = 731; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_7 = ((PyArrayObject *)__pyx_t_6); { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_locs.rcbuffer->pybuffer, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { __pyx_v_locs = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_locs.rcbuffer->pybuffer.buf = NULL; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 731; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } else {__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]; } } __pyx_t_7 = 0; __pyx_v_locs = ((PyArrayObject *)__pyx_t_6); __pyx_t_6 = 0; /* "pandas/hashtable.pyx":733 * ndarray[int64_t] locs = np.empty(n, dtype=np.int64) * * for i in range(n): # <<<<<<<<<<<<<< * val = values[i] * hash(val) */ __pyx_t_1 = __pyx_v_n; for (__pyx_t_8 = 0; __pyx_t_8 < __pyx_t_1; __pyx_t_8+=1) { __pyx_v_i = __pyx_t_8; /* "pandas/hashtable.pyx":734 * * for i in range(n): * val = values[i] # <<<<<<<<<<<<<< * hash(val) * if val != val or val is None: */ __pyx_t_9 = __pyx_v_i; __pyx_t_10 = -1; if (__pyx_t_9 < 0) { __pyx_t_9 += __pyx_pybuffernd_values.diminfo[0].shape; if (unlikely(__pyx_t_9 < 0)) __pyx_t_10 = 0; } else if (unlikely(__pyx_t_9 >= __pyx_pybuffernd_values.diminfo[0].shape)) __pyx_t_10 = 0; if (unlikely(__pyx_t_10 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_10); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 734; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_6 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_9, __pyx_pybuffernd_values.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_6); __Pyx_XDECREF_SET(__pyx_v_val, __pyx_t_6); __pyx_t_6 = 0; /* "pandas/hashtable.pyx":735 * for i in range(n): * val = values[i] * hash(val) # <<<<<<<<<<<<<< * if val != val or val is None: * val = na_sentinel */ __pyx_t_11 = PyObject_Hash(__pyx_v_val); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 735; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/hashtable.pyx":736 * val = values[i] * hash(val) * if val != val or val is None: # <<<<<<<<<<<<<< * val = na_sentinel * */ __pyx_t_6 = PyObject_RichCompare(__pyx_v_val, __pyx_v_val, Py_NE); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 736; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_12 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 736; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (!__pyx_t_12) { __pyx_t_13 = (__pyx_v_val == Py_None); __pyx_t_14 = __pyx_t_13; } else { __pyx_t_14 = __pyx_t_12; } if (__pyx_t_14) { /* "pandas/hashtable.pyx":737 * hash(val) * if val != val or val is None: * val = na_sentinel # <<<<<<<<<<<<<< * * k = kh_get_pymap(self.table, val) */ __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s__na_sentinel); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 737; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF_SET(__pyx_v_val, __pyx_t_6); __pyx_t_6 = 0; goto __pyx_L5; } __pyx_L5:; /* "pandas/hashtable.pyx":739 * val = na_sentinel * * k = kh_get_pymap(self.table, val) # <<<<<<<<<<<<<< * if k != self.table.n_buckets: * locs[i] = self.table.vals[k] */ __pyx_v_k = kh_get_pymap(__pyx_v_self->table, ((PyObject *)__pyx_v_val)); /* "pandas/hashtable.pyx":740 * * k = kh_get_pymap(self.table, val) * if k != self.table.n_buckets: # <<<<<<<<<<<<<< * locs[i] = self.table.vals[k] * else: */ __pyx_t_14 = ((__pyx_v_k != __pyx_v_self->table->n_buckets) != 0); if (__pyx_t_14) { /* "pandas/hashtable.pyx":741 * k = kh_get_pymap(self.table, val) * if k != self.table.n_buckets: * locs[i] = self.table.vals[k] # <<<<<<<<<<<<<< * else: * locs[i] = -1 */ __pyx_t_15 = __pyx_v_i; __pyx_t_10 = -1; if (__pyx_t_15 < 0) { __pyx_t_15 += __pyx_pybuffernd_locs.diminfo[0].shape; if (unlikely(__pyx_t_15 < 0)) __pyx_t_10 = 0; } else if (unlikely(__pyx_t_15 >= __pyx_pybuffernd_locs.diminfo[0].shape)) __pyx_t_10 = 0; if (unlikely(__pyx_t_10 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_10); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 741; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_locs.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_locs.diminfo[0].strides) = (__pyx_v_self->table->vals[__pyx_v_k]); goto __pyx_L6; } /*else*/ { /* "pandas/hashtable.pyx":743 * locs[i] = self.table.vals[k] * else: * locs[i] = -1 # <<<<<<<<<<<<<< * * return locs */ __pyx_t_16 = __pyx_v_i; __pyx_t_10 = -1; if (__pyx_t_16 < 0) { __pyx_t_16 += __pyx_pybuffernd_locs.diminfo[0].shape; if (unlikely(__pyx_t_16 < 0)) __pyx_t_10 = 0; } else if (unlikely(__pyx_t_16 >= __pyx_pybuffernd_locs.diminfo[0].shape)) __pyx_t_10 = 0; if (unlikely(__pyx_t_10 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_10); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 743; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_locs.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_locs.diminfo[0].strides) = -1; } __pyx_L6:; } /* "pandas/hashtable.pyx":745 * locs[i] = -1 * * return locs # <<<<<<<<<<<<<< * * def lookup2(self, ndarray[object] values): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_locs)); __pyx_r = ((PyObject *)__pyx_v_locs); goto __pyx_L0; __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_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_locs.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.hashtable.PyObjectHashTable.lookup", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_locs.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF(__pyx_v_val); __Pyx_XDECREF((PyObject *)__pyx_v_locs); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_9hashtable_17PyObjectHashTable_21lookup2(PyObject *__pyx_v_self, PyObject *__pyx_v_values); /*proto*/ static PyObject *__pyx_pw_6pandas_9hashtable_17PyObjectHashTable_21lookup2(PyObject *__pyx_v_self, PyObject *__pyx_v_values) { CYTHON_UNUSED int __pyx_lineno = 0; CYTHON_UNUSED const char *__pyx_filename = NULL; CYTHON_UNUSED int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("lookup2 (wrapper)", 0); if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 747; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_9hashtable_17PyObjectHashTable_20lookup2(((struct __pyx_obj_6pandas_9hashtable_PyObjectHashTable *)__pyx_v_self), ((PyArrayObject *)__pyx_v_values)); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/hashtable.pyx":747 * return locs * * def lookup2(self, ndarray[object] values): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = len(values) */ static PyObject *__pyx_pf_6pandas_9hashtable_17PyObjectHashTable_20lookup2(CYTHON_UNUSED struct __pyx_obj_6pandas_9hashtable_PyObjectHashTable *__pyx_v_self, PyArrayObject *__pyx_v_values) { Py_ssize_t __pyx_v_n; CYTHON_UNUSED int __pyx_v_ret; PyArrayObject *__pyx_v_locs = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_locs; __Pyx_Buffer __pyx_pybuffer_locs; __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_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("lookup2", 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_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_filename = __pyx_f[0]; __pyx_lineno = 747; __pyx_clineno = __LINE__; goto __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/hashtable.pyx":749 * def lookup2(self, ndarray[object] values): * cdef: * Py_ssize_t i, n = len(values) # <<<<<<<<<<<<<< * int ret = 0 * object val */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 749; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/hashtable.pyx":750 * cdef: * Py_ssize_t i, n = len(values) * int ret = 0 # <<<<<<<<<<<<<< * object val * khiter_t k */ __pyx_v_ret = 0; /* "pandas/hashtable.pyx":754 * khiter_t k * long hval * ndarray[int64_t] locs = np.empty(n, dtype=np.int64) # <<<<<<<<<<<<<< * * # for i in range(n): */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 754; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 754; __pyx_clineno = __LINE__; goto __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_n); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 754; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 754; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 754; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_2)); __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 754; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s__int64); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 754; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__dtype), __pyx_t_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 754; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 754; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __Pyx_DECREF(((PyObject *)__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_filename = __pyx_f[0]; __pyx_lineno = 754; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_7 = ((PyArrayObject *)__pyx_t_6); { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_locs.rcbuffer->pybuffer, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { __pyx_v_locs = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_locs.rcbuffer->pybuffer.buf = NULL; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 754; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } else {__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]; } } __pyx_t_7 = 0; __pyx_v_locs = ((PyArrayObject *)__pyx_t_6); __pyx_t_6 = 0; /* "pandas/hashtable.pyx":761 * # k = kh_get_pymap(self.table, val) * * return locs # <<<<<<<<<<<<<< * * def unique(self, ndarray[object] values): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_locs)); __pyx_r = ((PyObject *)__pyx_v_locs); goto __pyx_L0; __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_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_locs.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.hashtable.PyObjectHashTable.lookup2", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_locs.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_locs); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_9hashtable_17PyObjectHashTable_23unique(PyObject *__pyx_v_self, PyObject *__pyx_v_values); /*proto*/ static PyObject *__pyx_pw_6pandas_9hashtable_17PyObjectHashTable_23unique(PyObject *__pyx_v_self, PyObject *__pyx_v_values) { CYTHON_UNUSED int __pyx_lineno = 0; CYTHON_UNUSED const char *__pyx_filename = NULL; CYTHON_UNUSED int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("unique (wrapper)", 0); if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 763; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_9hashtable_17PyObjectHashTable_22unique(((struct __pyx_obj_6pandas_9hashtable_PyObjectHashTable *)__pyx_v_self), ((PyArrayObject *)__pyx_v_values)); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/hashtable.pyx":763 * return locs * * def unique(self, ndarray[object] values): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, n = len(values) */ static PyObject *__pyx_pf_6pandas_9hashtable_17PyObjectHashTable_22unique(struct __pyx_obj_6pandas_9hashtable_PyObjectHashTable *__pyx_v_self, PyArrayObject *__pyx_v_values) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_n; CYTHON_UNUSED Py_ssize_t __pyx_v_count; int __pyx_v_ret; PyObject *__pyx_v_val = 0; PyArrayObject *__pyx_v_result = 0; khiter_t __pyx_v_k; struct __pyx_obj_6pandas_9hashtable_ObjectVector *__pyx_v_uniques = 0; int __pyx_v_seen_na; __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; Py_ssize_t __pyx_t_3; Py_ssize_t __pyx_t_4; int __pyx_t_5; Py_hash_t __pyx_t_6; int __pyx_t_7; PyObject *__pyx_t_8 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("unique", 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_object, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 763; __pyx_clineno = __LINE__; goto __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/hashtable.pyx":765 * def unique(self, ndarray[object] values): * cdef: * Py_ssize_t i, n = len(values) # <<<<<<<<<<<<<< * Py_ssize_t idx, count = 0 * int ret = 0 */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 765; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/hashtable.pyx":766 * cdef: * Py_ssize_t i, n = len(values) * Py_ssize_t idx, count = 0 # <<<<<<<<<<<<<< * int ret = 0 * object val */ __pyx_v_count = 0; /* "pandas/hashtable.pyx":767 * Py_ssize_t i, n = len(values) * Py_ssize_t idx, count = 0 * int ret = 0 # <<<<<<<<<<<<<< * object val * ndarray result */ __pyx_v_ret = 0; /* "pandas/hashtable.pyx":771 * ndarray result * khiter_t k * ObjectVector uniques = ObjectVector() # <<<<<<<<<<<<<< * bint seen_na = 0 * */ __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_6pandas_9hashtable_ObjectVector)), ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 771; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_v_uniques = ((struct __pyx_obj_6pandas_9hashtable_ObjectVector *)__pyx_t_2); __pyx_t_2 = 0; /* "pandas/hashtable.pyx":772 * khiter_t k * ObjectVector uniques = ObjectVector() * bint seen_na = 0 # <<<<<<<<<<<<<< * * for i in range(n): */ __pyx_v_seen_na = 0; /* "pandas/hashtable.pyx":774 * bint seen_na = 0 * * for i in range(n): # <<<<<<<<<<<<<< * val = values[i] * hash(val) */ __pyx_t_1 = __pyx_v_n; for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_1; __pyx_t_3+=1) { __pyx_v_i = __pyx_t_3; /* "pandas/hashtable.pyx":775 * * for i in range(n): * val = values[i] # <<<<<<<<<<<<<< * hash(val) * if not _checknan(val): */ __pyx_t_4 = __pyx_v_i; __pyx_t_5 = -1; if (__pyx_t_4 < 0) { __pyx_t_4 += __pyx_pybuffernd_values.diminfo[0].shape; if (unlikely(__pyx_t_4 < 0)) __pyx_t_5 = 0; } else if (unlikely(__pyx_t_4 >= __pyx_pybuffernd_values.diminfo[0].shape)) __pyx_t_5 = 0; if (unlikely(__pyx_t_5 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_5); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 775; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_2 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_4, __pyx_pybuffernd_values.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_2); __Pyx_XDECREF_SET(__pyx_v_val, __pyx_t_2); __pyx_t_2 = 0; /* "pandas/hashtable.pyx":776 * for i in range(n): * val = values[i] * hash(val) # <<<<<<<<<<<<<< * if not _checknan(val): * k = kh_get_pymap(self.table, val) */ __pyx_t_6 = PyObject_Hash(__pyx_v_val); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 776; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/hashtable.pyx":777 * val = values[i] * hash(val) * if not _checknan(val): # <<<<<<<<<<<<<< * k = kh_get_pymap(self.table, val) * if k == self.table.n_buckets: */ __pyx_t_7 = ((!(__pyx_f_4util__checknan(__pyx_v_val) != 0)) != 0); if (__pyx_t_7) { /* "pandas/hashtable.pyx":778 * hash(val) * if not _checknan(val): * k = kh_get_pymap(self.table, val) # <<<<<<<<<<<<<< * if k == self.table.n_buckets: * k = kh_put_pymap(self.table, val, &ret) */ __pyx_v_k = kh_get_pymap(__pyx_v_self->table, ((PyObject *)__pyx_v_val)); /* "pandas/hashtable.pyx":779 * if not _checknan(val): * k = kh_get_pymap(self.table, val) * if k == self.table.n_buckets: # <<<<<<<<<<<<<< * k = kh_put_pymap(self.table, val, &ret) * uniques.append(val) */ __pyx_t_7 = ((__pyx_v_k == __pyx_v_self->table->n_buckets) != 0); if (__pyx_t_7) { /* "pandas/hashtable.pyx":780 * k = kh_get_pymap(self.table, val) * if k == self.table.n_buckets: * k = kh_put_pymap(self.table, val, &ret) # <<<<<<<<<<<<<< * uniques.append(val) * elif not seen_na: */ __pyx_v_k = kh_put_pymap(__pyx_v_self->table, ((PyObject *)__pyx_v_val), (&__pyx_v_ret)); /* "pandas/hashtable.pyx":781 * if k == self.table.n_buckets: * k = kh_put_pymap(self.table, val, &ret) * uniques.append(val) # <<<<<<<<<<<<<< * elif not seen_na: * seen_na = 1 */ __pyx_t_2 = __pyx_f_6pandas_9hashtable_12ObjectVector_append(__pyx_v_uniques, __pyx_v_val); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 781; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; goto __pyx_L6; } __pyx_L6:; goto __pyx_L5; } /* "pandas/hashtable.pyx":782 * k = kh_put_pymap(self.table, val, &ret) * uniques.append(val) * elif not seen_na: # <<<<<<<<<<<<<< * seen_na = 1 * uniques.append(ONAN) */ __pyx_t_7 = ((!(__pyx_v_seen_na != 0)) != 0); if (__pyx_t_7) { /* "pandas/hashtable.pyx":783 * uniques.append(val) * elif not seen_na: * seen_na = 1 # <<<<<<<<<<<<<< * uniques.append(ONAN) * */ __pyx_v_seen_na = 1; /* "pandas/hashtable.pyx":784 * elif not seen_na: * seen_na = 1 * uniques.append(ONAN) # <<<<<<<<<<<<<< * * result = uniques.to_array() */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__ONAN); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 784; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_8 = __pyx_f_6pandas_9hashtable_12ObjectVector_append(__pyx_v_uniques, __pyx_t_2); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 784; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; goto __pyx_L5; } __pyx_L5:; } /* "pandas/hashtable.pyx":786 * uniques.append(ONAN) * * result = uniques.to_array() # <<<<<<<<<<<<<< * * return result */ __pyx_t_8 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_uniques), __pyx_n_s__to_array); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 786; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_2 = PyObject_Call(__pyx_t_8, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 786; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 786; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_result = ((PyArrayObject *)__pyx_t_2); __pyx_t_2 = 0; /* "pandas/hashtable.pyx":788 * result = uniques.to_array() * * return result # <<<<<<<<<<<<<< * * def get_labels(self, ndarray[object] values, ObjectVector uniques, */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_result)); __pyx_r = ((PyObject *)__pyx_v_result); goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_8); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __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.hashtable.PyObjectHashTable.unique", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF(__pyx_v_val); __Pyx_XDECREF((PyObject *)__pyx_v_result); __Pyx_XDECREF((PyObject *)__pyx_v_uniques); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_9hashtable_17PyObjectHashTable_25get_labels(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_6pandas_9hashtable_17PyObjectHashTable_25get_labels(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_values = 0; struct __pyx_obj_6pandas_9hashtable_ObjectVector *__pyx_v_uniques = 0; Py_ssize_t __pyx_v_count_prior; __pyx_t_5numpy_int64_t __pyx_v_na_sentinel; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("get_labels (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__values,&__pyx_n_s__uniques,&__pyx_n_s__count_prior,&__pyx_n_s__na_sentinel,0}; PyObject* values[4] = {0,0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__values)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__uniques)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("get_labels", 1, 4, 4, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 790; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__count_prior)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("get_labels", 1, 4, 4, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 790; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__na_sentinel)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("get_labels", 1, 4, 4, 3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 790; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "get_labels") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 790; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 4) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[3] = PyTuple_GET_ITEM(__pyx_args, 3); } __pyx_v_values = ((PyArrayObject *)values[0]); __pyx_v_uniques = ((struct __pyx_obj_6pandas_9hashtable_ObjectVector *)values[1]); __pyx_v_count_prior = __Pyx_PyIndex_AsSsize_t(values[2]); if (unlikely((__pyx_v_count_prior == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 791; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_na_sentinel = __Pyx_PyInt_from_py_npy_int64(values[3]); if (unlikely((__pyx_v_na_sentinel == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 791; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("get_labels", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 790; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.hashtable.PyObjectHashTable.get_labels", __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_filename = __pyx_f[0]; __pyx_lineno = 790; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_uniques), __pyx_ptype_6pandas_9hashtable_ObjectVector, 1, "uniques", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 790; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_9hashtable_17PyObjectHashTable_24get_labels(((struct __pyx_obj_6pandas_9hashtable_PyObjectHashTable *)__pyx_v_self), __pyx_v_values, __pyx_v_uniques, __pyx_v_count_prior, __pyx_v_na_sentinel); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/hashtable.pyx":790 * return result * * def get_labels(self, ndarray[object] values, ObjectVector uniques, # <<<<<<<<<<<<<< * Py_ssize_t count_prior, int64_t na_sentinel): * cdef: */ static PyObject *__pyx_pf_6pandas_9hashtable_17PyObjectHashTable_24get_labels(struct __pyx_obj_6pandas_9hashtable_PyObjectHashTable *__pyx_v_self, PyArrayObject *__pyx_v_values, struct __pyx_obj_6pandas_9hashtable_ObjectVector *__pyx_v_uniques, Py_ssize_t __pyx_v_count_prior, __pyx_t_5numpy_int64_t __pyx_v_na_sentinel) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_n; PyArrayObject *__pyx_v_labels = 0; Py_ssize_t __pyx_v_idx; Py_ssize_t __pyx_v_count; int __pyx_v_ret; PyObject *__pyx_v_val = 0; khiter_t __pyx_v_k; __Pyx_LocalBuf_ND __pyx_pybuffernd_labels; __Pyx_Buffer __pyx_pybuffer_labels; __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_hash_t __pyx_t_14; int __pyx_t_15; int __pyx_t_16; int __pyx_t_17; Py_ssize_t __pyx_t_18; Py_ssize_t __pyx_t_19; Py_ssize_t __pyx_t_20; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_labels", 0); __pyx_pybuffer_labels.pybuffer.buf = NULL; __pyx_pybuffer_labels.refcount = 0; __pyx_pybuffernd_labels.data = NULL; __pyx_pybuffernd_labels.rcbuffer = &__pyx_pybuffer_labels; __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_filename = __pyx_f[0]; __pyx_lineno = 790; __pyx_clineno = __LINE__; goto __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/hashtable.pyx":793 * Py_ssize_t count_prior, int64_t na_sentinel): * cdef: * Py_ssize_t i, n = len(values) # <<<<<<<<<<<<<< * ndarray[int64_t] labels * Py_ssize_t idx, count = count_prior */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 793; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/hashtable.pyx":795 * Py_ssize_t i, n = len(values) * ndarray[int64_t] labels * Py_ssize_t idx, count = count_prior # <<<<<<<<<<<<<< * int ret = 0 * object val */ __pyx_v_count = __pyx_v_count_prior; /* "pandas/hashtable.pyx":796 * ndarray[int64_t] labels * Py_ssize_t idx, count = count_prior * int ret = 0 # <<<<<<<<<<<<<< * object val * khiter_t k */ __pyx_v_ret = 0; /* "pandas/hashtable.pyx":800 * khiter_t k * * labels = np.empty(n, dtype=np.int64) # <<<<<<<<<<<<<< * * for i in range(n): */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 800; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 800; __pyx_clineno = __LINE__; goto __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_n); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 800; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 800; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 800; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_2)); __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 800; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s__int64); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 800; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__dtype), __pyx_t_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 800; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 800; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __Pyx_DECREF(((PyObject *)__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_filename = __pyx_f[0]; __pyx_lineno = 800; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_7 = ((PyArrayObject *)__pyx_t_6); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_labels.rcbuffer->pybuffer); __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_labels.rcbuffer->pybuffer, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_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_labels.rcbuffer->pybuffer, (PyObject*)__pyx_v_labels, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_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_pybuffernd_labels.diminfo[0].strides = __pyx_pybuffernd_labels.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_labels.diminfo[0].shape = __pyx_pybuffernd_labels.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 800; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_7 = 0; __pyx_v_labels = ((PyArrayObject *)__pyx_t_6); __pyx_t_6 = 0; /* "pandas/hashtable.pyx":802 * labels = np.empty(n, dtype=np.int64) * * for i in range(n): # <<<<<<<<<<<<<< * val = values[i] * hash(val) */ __pyx_t_1 = __pyx_v_n; for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_1; __pyx_t_12+=1) { __pyx_v_i = __pyx_t_12; /* "pandas/hashtable.pyx":803 * * for i in range(n): * val = values[i] # <<<<<<<<<<<<<< * hash(val) * */ __pyx_t_13 = __pyx_v_i; __pyx_t_8 = -1; if (__pyx_t_13 < 0) { __pyx_t_13 += __pyx_pybuffernd_values.diminfo[0].shape; if (unlikely(__pyx_t_13 < 0)) __pyx_t_8 = 0; } else if (unlikely(__pyx_t_13 >= __pyx_pybuffernd_values.diminfo[0].shape)) __pyx_t_8 = 0; if (unlikely(__pyx_t_8 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_8); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 803; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_6 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_values.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_6); __Pyx_XDECREF_SET(__pyx_v_val, __pyx_t_6); __pyx_t_6 = 0; /* "pandas/hashtable.pyx":804 * for i in range(n): * val = values[i] * hash(val) # <<<<<<<<<<<<<< * * if val != val or val is None: */ __pyx_t_14 = PyObject_Hash(__pyx_v_val); if (unlikely(__pyx_t_14 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 804; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/hashtable.pyx":806 * hash(val) * * if val != val or val is None: # <<<<<<<<<<<<<< * labels[i] = na_sentinel * continue */ __pyx_t_6 = PyObject_RichCompare(__pyx_v_val, __pyx_v_val, Py_NE); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 806; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_15 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_15 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 806; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (!__pyx_t_15) { __pyx_t_16 = (__pyx_v_val == Py_None); __pyx_t_17 = __pyx_t_16; } else { __pyx_t_17 = __pyx_t_15; } if (__pyx_t_17) { /* "pandas/hashtable.pyx":807 * * if val != val or val is None: * labels[i] = na_sentinel # <<<<<<<<<<<<<< * continue * */ __pyx_t_18 = __pyx_v_i; __pyx_t_8 = -1; if (__pyx_t_18 < 0) { __pyx_t_18 += __pyx_pybuffernd_labels.diminfo[0].shape; if (unlikely(__pyx_t_18 < 0)) __pyx_t_8 = 0; } else if (unlikely(__pyx_t_18 >= __pyx_pybuffernd_labels.diminfo[0].shape)) __pyx_t_8 = 0; if (unlikely(__pyx_t_8 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_8); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 807; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_labels.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_labels.diminfo[0].strides) = __pyx_v_na_sentinel; /* "pandas/hashtable.pyx":808 * if val != val or val is None: * labels[i] = na_sentinel * continue # <<<<<<<<<<<<<< * * k = kh_get_pymap(self.table, val) */ goto __pyx_L3_continue; goto __pyx_L5; } __pyx_L5:; /* "pandas/hashtable.pyx":810 * continue * * k = kh_get_pymap(self.table, val) # <<<<<<<<<<<<<< * if k != self.table.n_buckets: * idx = self.table.vals[k] */ __pyx_v_k = kh_get_pymap(__pyx_v_self->table, ((PyObject *)__pyx_v_val)); /* "pandas/hashtable.pyx":811 * * k = kh_get_pymap(self.table, val) * if k != self.table.n_buckets: # <<<<<<<<<<<<<< * idx = self.table.vals[k] * labels[i] = idx */ __pyx_t_17 = ((__pyx_v_k != __pyx_v_self->table->n_buckets) != 0); if (__pyx_t_17) { /* "pandas/hashtable.pyx":812 * k = kh_get_pymap(self.table, val) * if k != self.table.n_buckets: * idx = self.table.vals[k] # <<<<<<<<<<<<<< * labels[i] = idx * else: */ __pyx_v_idx = (__pyx_v_self->table->vals[__pyx_v_k]); /* "pandas/hashtable.pyx":813 * if k != self.table.n_buckets: * idx = self.table.vals[k] * labels[i] = idx # <<<<<<<<<<<<<< * else: * k = kh_put_pymap(self.table, val, &ret) */ __pyx_t_19 = __pyx_v_i; __pyx_t_8 = -1; if (__pyx_t_19 < 0) { __pyx_t_19 += __pyx_pybuffernd_labels.diminfo[0].shape; if (unlikely(__pyx_t_19 < 0)) __pyx_t_8 = 0; } else if (unlikely(__pyx_t_19 >= __pyx_pybuffernd_labels.diminfo[0].shape)) __pyx_t_8 = 0; if (unlikely(__pyx_t_8 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_8); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 813; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_labels.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_labels.diminfo[0].strides) = __pyx_v_idx; goto __pyx_L6; } /*else*/ { /* "pandas/hashtable.pyx":815 * labels[i] = idx * else: * k = kh_put_pymap(self.table, val, &ret) # <<<<<<<<<<<<<< * self.table.vals[k] = count * uniques.append(val) */ __pyx_v_k = kh_put_pymap(__pyx_v_self->table, ((PyObject *)__pyx_v_val), (&__pyx_v_ret)); /* "pandas/hashtable.pyx":816 * else: * k = kh_put_pymap(self.table, val, &ret) * self.table.vals[k] = count # <<<<<<<<<<<<<< * uniques.append(val) * labels[i] = count */ (__pyx_v_self->table->vals[__pyx_v_k]) = __pyx_v_count; /* "pandas/hashtable.pyx":817 * k = kh_put_pymap(self.table, val, &ret) * self.table.vals[k] = count * uniques.append(val) # <<<<<<<<<<<<<< * labels[i] = count * count += 1 */ __pyx_t_6 = __pyx_f_6pandas_9hashtable_12ObjectVector_append(__pyx_v_uniques, __pyx_v_val); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 817; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; /* "pandas/hashtable.pyx":818 * self.table.vals[k] = count * uniques.append(val) * labels[i] = count # <<<<<<<<<<<<<< * count += 1 * */ __pyx_t_20 = __pyx_v_i; __pyx_t_8 = -1; if (__pyx_t_20 < 0) { __pyx_t_20 += __pyx_pybuffernd_labels.diminfo[0].shape; if (unlikely(__pyx_t_20 < 0)) __pyx_t_8 = 0; } else if (unlikely(__pyx_t_20 >= __pyx_pybuffernd_labels.diminfo[0].shape)) __pyx_t_8 = 0; if (unlikely(__pyx_t_8 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_8); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 818; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_labels.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_labels.diminfo[0].strides) = __pyx_v_count; /* "pandas/hashtable.pyx":819 * uniques.append(val) * labels[i] = count * count += 1 # <<<<<<<<<<<<<< * * return labels */ __pyx_v_count = (__pyx_v_count + 1); } __pyx_L6:; __pyx_L3_continue:; } /* "pandas/hashtable.pyx":821 * count += 1 * * return labels # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_labels)); __pyx_r = ((PyObject *)__pyx_v_labels); goto __pyx_L0; __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_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_labels.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.hashtable.PyObjectHashTable.get_labels", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_labels.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_labels); __Pyx_XDECREF(__pyx_v_val); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pandas_9hashtable_10Factorizer_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_pw_6pandas_9hashtable_10Factorizer_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_size_hint = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__size_hint,0}; PyObject* values[1] = {0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__size_hint)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 829; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); } __pyx_v_size_hint = values[0]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 829; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.hashtable.Factorizer.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return -1; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pandas_9hashtable_10Factorizer___init__(((struct __pyx_obj_6pandas_9hashtable_Factorizer *)__pyx_v_self), __pyx_v_size_hint); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/hashtable.pyx":829 * cdef public Py_ssize_t count * * def __init__(self, size_hint): # <<<<<<<<<<<<<< * self.table = PyObjectHashTable(size_hint) * self.uniques = ObjectVector() */ static int __pyx_pf_6pandas_9hashtable_10Factorizer___init__(struct __pyx_obj_6pandas_9hashtable_Factorizer *__pyx_v_self, PyObject *__pyx_v_size_hint) { int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__init__", 0); /* "pandas/hashtable.pyx":830 * * def __init__(self, size_hint): * self.table = PyObjectHashTable(size_hint) # <<<<<<<<<<<<<< * self.uniques = ObjectVector() * self.count = 0 */ __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 830; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_size_hint); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_size_hint); __Pyx_GIVEREF(__pyx_v_size_hint); __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_6pandas_9hashtable_PyObjectHashTable)), ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 830; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __Pyx_GIVEREF(__pyx_t_2); __Pyx_GOTREF(__pyx_v_self->table); __Pyx_DECREF(((PyObject *)__pyx_v_self->table)); __pyx_v_self->table = ((struct __pyx_obj_6pandas_9hashtable_PyObjectHashTable *)__pyx_t_2); __pyx_t_2 = 0; /* "pandas/hashtable.pyx":831 * def __init__(self, size_hint): * self.table = PyObjectHashTable(size_hint) * self.uniques = ObjectVector() # <<<<<<<<<<<<<< * self.count = 0 * */ __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_6pandas_9hashtable_ObjectVector)), ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 831; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __Pyx_GOTREF(__pyx_v_self->uniques); __Pyx_DECREF(((PyObject *)__pyx_v_self->uniques)); __pyx_v_self->uniques = ((struct __pyx_obj_6pandas_9hashtable_ObjectVector *)__pyx_t_2); __pyx_t_2 = 0; /* "pandas/hashtable.pyx":832 * self.table = PyObjectHashTable(size_hint) * self.uniques = ObjectVector() * self.count = 0 # <<<<<<<<<<<<<< * * def get_count(self): */ __pyx_v_self->count = 0; __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("pandas.hashtable.Factorizer.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_9hashtable_10Factorizer_3get_count(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static PyObject *__pyx_pw_6pandas_9hashtable_10Factorizer_3get_count(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("get_count (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_9hashtable_10Factorizer_2get_count(((struct __pyx_obj_6pandas_9hashtable_Factorizer *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/hashtable.pyx":834 * self.count = 0 * * def get_count(self): # <<<<<<<<<<<<<< * return self.count * */ static PyObject *__pyx_pf_6pandas_9hashtable_10Factorizer_2get_count(struct __pyx_obj_6pandas_9hashtable_Factorizer *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_count", 0); /* "pandas/hashtable.pyx":835 * * def get_count(self): * return self.count # <<<<<<<<<<<<<< * * def factorize(self, ndarray[object] values, sort=False, na_sentinel=-1): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_self->count); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 835; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas.hashtable.Factorizer.get_count", __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_9hashtable_10Factorizer_5factorize(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_6pandas_9hashtable_10Factorizer_5factorize(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_values = 0; PyObject *__pyx_v_sort = 0; PyObject *__pyx_v_na_sentinel = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("factorize (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__values,&__pyx_n_s__sort,&__pyx_n_s__na_sentinel,0}; PyObject* values[3] = {0,0,0}; values[1] = __pyx_k_1; values[2] = ((PyObject *)__pyx_int_neg_1); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__values)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__sort); if (value) { values[1] = value; kw_args--; } } case 2: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__na_sentinel); if (value) { values[2] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "factorize") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 837; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_values = ((PyArrayObject *)values[0]); __pyx_v_sort = values[1]; __pyx_v_na_sentinel = values[2]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("factorize", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 837; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.hashtable.Factorizer.factorize", __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_filename = __pyx_f[0]; __pyx_lineno = 837; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_9hashtable_10Factorizer_4factorize(((struct __pyx_obj_6pandas_9hashtable_Factorizer *)__pyx_v_self), __pyx_v_values, __pyx_v_sort, __pyx_v_na_sentinel); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/hashtable.pyx":837 * return self.count * * def factorize(self, ndarray[object] values, sort=False, na_sentinel=-1): # <<<<<<<<<<<<<< * labels = self.table.get_labels(values, self.uniques, * self.count, na_sentinel) */ static PyObject *__pyx_pf_6pandas_9hashtable_10Factorizer_4factorize(struct __pyx_obj_6pandas_9hashtable_Factorizer *__pyx_v_self, PyArrayObject *__pyx_v_values, PyObject *__pyx_v_sort, PyObject *__pyx_v_na_sentinel) { PyObject *__pyx_v_labels = NULL; PyObject *__pyx_v_sorter = NULL; PyObject *__pyx_v_reverse_indexer = NULL; __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; int __pyx_t_4; Py_ssize_t __pyx_t_5; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("factorize", 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_object, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 837; __pyx_clineno = __LINE__; goto __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/hashtable.pyx":838 * * def factorize(self, ndarray[object] values, sort=False, na_sentinel=-1): * labels = self.table.get_labels(values, self.uniques, # <<<<<<<<<<<<<< * self.count, na_sentinel) * */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->table), __pyx_n_s__get_labels); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 838; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); /* "pandas/hashtable.pyx":839 * def factorize(self, ndarray[object] values, sort=False, na_sentinel=-1): * labels = self.table.get_labels(values, self.uniques, * self.count, na_sentinel) # <<<<<<<<<<<<<< * * # sort on */ __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_self->count); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 839; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyTuple_New(4); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 838; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(((PyObject *)__pyx_v_values)); PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_v_values)); __Pyx_GIVEREF(((PyObject *)__pyx_v_values)); __Pyx_INCREF(((PyObject *)__pyx_v_self->uniques)); PyTuple_SET_ITEM(__pyx_t_3, 1, ((PyObject *)__pyx_v_self->uniques)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self->uniques)); PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_na_sentinel); PyTuple_SET_ITEM(__pyx_t_3, 3, __pyx_v_na_sentinel); __Pyx_GIVEREF(__pyx_v_na_sentinel); __pyx_t_2 = 0; __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 838; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; __pyx_v_labels = __pyx_t_2; __pyx_t_2 = 0; /* "pandas/hashtable.pyx":842 * * # sort on * if sort: # <<<<<<<<<<<<<< * if labels.dtype != np.int_: * labels = labels.astype(np.int_) */ __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_sort); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 842; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__pyx_t_4) { /* "pandas/hashtable.pyx":843 * # sort on * if sort: * if labels.dtype != np.int_: # <<<<<<<<<<<<<< * labels = labels.astype(np.int_) * */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_labels, __pyx_n_s__dtype); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 843; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 843; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s__int_); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 843; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyObject_RichCompare(__pyx_t_2, __pyx_t_1, Py_NE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 843; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 843; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_4) { /* "pandas/hashtable.pyx":844 * if sort: * if labels.dtype != np.int_: * labels = labels.astype(np.int_) # <<<<<<<<<<<<<< * * sorter = self.uniques.to_array().argsort() */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_labels, __pyx_n_s__astype); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 844; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 844; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s__int_); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 844; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 844; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 844; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __Pyx_DECREF_SET(__pyx_v_labels, __pyx_t_2); __pyx_t_2 = 0; goto __pyx_L4; } __pyx_L4:; /* "pandas/hashtable.pyx":846 * labels = labels.astype(np.int_) * * sorter = self.uniques.to_array().argsort() # <<<<<<<<<<<<<< * reverse_indexer = np.empty(len(sorter), dtype=np.int_) * reverse_indexer.put(sorter, np.arange(len(sorter))) */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->uniques), __pyx_n_s__to_array); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 846; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 846; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s__argsort); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 846; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 846; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_sorter = __pyx_t_1; __pyx_t_1 = 0; /* "pandas/hashtable.pyx":847 * * sorter = self.uniques.to_array().argsort() * reverse_indexer = np.empty(len(sorter), dtype=np.int_) # <<<<<<<<<<<<<< * reverse_indexer.put(sorter, np.arange(len(sorter))) * */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 847; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 847; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_5 = PyObject_Length(__pyx_v_sorter); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 847; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_5); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 847; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 847; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 847; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 847; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s__int_); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 847; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__dtype), __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 847; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_7 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_3), ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 847; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_v_reverse_indexer = __pyx_t_7; __pyx_t_7 = 0; /* "pandas/hashtable.pyx":848 * sorter = self.uniques.to_array().argsort() * reverse_indexer = np.empty(len(sorter), dtype=np.int_) * reverse_indexer.put(sorter, np.arange(len(sorter))) # <<<<<<<<<<<<<< * * labels = reverse_indexer.take(labels) */ __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_reverse_indexer, __pyx_n_s__put); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 848; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 848; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s__arange); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 848; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_5 = PyObject_Length(__pyx_v_sorter); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 848; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_5); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 848; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 848; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 848; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 848; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_sorter); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_sorter); __Pyx_GIVEREF(__pyx_v_sorter); PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyObject_Call(__pyx_t_7, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 848; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pandas/hashtable.pyx":850 * reverse_indexer.put(sorter, np.arange(len(sorter))) * * labels = reverse_indexer.take(labels) # <<<<<<<<<<<<<< * * self.count = len(self.uniques) */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_reverse_indexer, __pyx_n_s__take); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 850; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 850; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_labels); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_labels); __Pyx_GIVEREF(__pyx_v_labels); __pyx_t_7 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 850; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __Pyx_DECREF_SET(__pyx_v_labels, __pyx_t_7); __pyx_t_7 = 0; goto __pyx_L3; } __pyx_L3:; /* "pandas/hashtable.pyx":852 * labels = reverse_indexer.take(labels) * * self.count = len(self.uniques) # <<<<<<<<<<<<<< * return labels * */ __pyx_t_7 = ((PyObject *)__pyx_v_self->uniques); __Pyx_INCREF(__pyx_t_7); __pyx_t_5 = PyObject_Length(__pyx_t_7); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 852; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_v_self->count = __pyx_t_5; /* "pandas/hashtable.pyx":853 * * self.count = len(self.uniques) * return labels # <<<<<<<<<<<<<< * * def unique(self, ndarray[object] values): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_labels); __pyx_r = __pyx_v_labels; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __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.hashtable.Factorizer.factorize", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF(__pyx_v_labels); __Pyx_XDECREF(__pyx_v_sorter); __Pyx_XDECREF(__pyx_v_reverse_indexer); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_9hashtable_10Factorizer_7unique(PyObject *__pyx_v_self, PyObject *__pyx_v_values); /*proto*/ static PyObject *__pyx_pw_6pandas_9hashtable_10Factorizer_7unique(PyObject *__pyx_v_self, PyObject *__pyx_v_values) { CYTHON_UNUSED int __pyx_lineno = 0; CYTHON_UNUSED const char *__pyx_filename = NULL; CYTHON_UNUSED int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("unique (wrapper)", 0); if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 855; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_9hashtable_10Factorizer_6unique(((struct __pyx_obj_6pandas_9hashtable_Factorizer *)__pyx_v_self), ((PyArrayObject *)__pyx_v_values)); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/hashtable.pyx":855 * return labels * * def unique(self, ndarray[object] values): # <<<<<<<<<<<<<< * # just for fun * return self.table.unique(values) */ static PyObject *__pyx_pf_6pandas_9hashtable_10Factorizer_6unique(struct __pyx_obj_6pandas_9hashtable_Factorizer *__pyx_v_self, PyArrayObject *__pyx_v_values) { __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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("unique", 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_object, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 855; __pyx_clineno = __LINE__; goto __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/hashtable.pyx":857 * def unique(self, ndarray[object] values): * # just for fun * return self.table.unique(values) # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->table), __pyx_n_s__unique); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 857; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 857; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(((PyObject *)__pyx_v_values)); PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_values)); __Pyx_GIVEREF(((PyObject *)__pyx_v_values)); __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 857; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; __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); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __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.hashtable.Factorizer.unique", __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; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_9hashtable_10Factorizer_5table_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6pandas_9hashtable_10Factorizer_5table_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_9hashtable_10Factorizer_5table___get__(((struct __pyx_obj_6pandas_9hashtable_Factorizer *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/hashtable.pyx":825 * * cdef class Factorizer: * cdef public PyObjectHashTable table # <<<<<<<<<<<<<< * cdef public ObjectVector uniques * cdef public Py_ssize_t count */ static PyObject *__pyx_pf_6pandas_9hashtable_10Factorizer_5table___get__(struct __pyx_obj_6pandas_9hashtable_Factorizer *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_self->table)); __pyx_r = ((PyObject *)__pyx_v_self->table); goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pandas_9hashtable_10Factorizer_5table_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ static int __pyx_pw_6pandas_9hashtable_10Factorizer_5table_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_9hashtable_10Factorizer_5table_2__set__(((struct __pyx_obj_6pandas_9hashtable_Factorizer *)__pyx_v_self), ((PyObject *)__pyx_v_value)); __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pandas_9hashtable_10Factorizer_5table_2__set__(struct __pyx_obj_6pandas_9hashtable_Factorizer *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__set__", 0); if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_6pandas_9hashtable_PyObjectHashTable))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 825; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_INCREF(__pyx_v_value); __Pyx_GIVEREF(__pyx_v_value); __Pyx_GOTREF(__pyx_v_self->table); __Pyx_DECREF(((PyObject *)__pyx_v_self->table)); __pyx_v_self->table = ((struct __pyx_obj_6pandas_9hashtable_PyObjectHashTable *)__pyx_v_value); __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("pandas.hashtable.Factorizer.table.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pandas_9hashtable_10Factorizer_5table_5__del__(PyObject *__pyx_v_self); /*proto*/ static int __pyx_pw_6pandas_9hashtable_10Factorizer_5table_5__del__(PyObject *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_9hashtable_10Factorizer_5table_4__del__(((struct __pyx_obj_6pandas_9hashtable_Factorizer *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pandas_9hashtable_10Factorizer_5table_4__del__(struct __pyx_obj_6pandas_9hashtable_Factorizer *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__", 0); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->table); __Pyx_DECREF(((PyObject *)__pyx_v_self->table)); __pyx_v_self->table = ((struct __pyx_obj_6pandas_9hashtable_PyObjectHashTable *)Py_None); __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_9hashtable_10Factorizer_7uniques_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6pandas_9hashtable_10Factorizer_7uniques_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_9hashtable_10Factorizer_7uniques___get__(((struct __pyx_obj_6pandas_9hashtable_Factorizer *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/hashtable.pyx":826 * cdef class Factorizer: * cdef public PyObjectHashTable table * cdef public ObjectVector uniques # <<<<<<<<<<<<<< * cdef public Py_ssize_t count * */ static PyObject *__pyx_pf_6pandas_9hashtable_10Factorizer_7uniques___get__(struct __pyx_obj_6pandas_9hashtable_Factorizer *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_self->uniques)); __pyx_r = ((PyObject *)__pyx_v_self->uniques); goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pandas_9hashtable_10Factorizer_7uniques_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ static int __pyx_pw_6pandas_9hashtable_10Factorizer_7uniques_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_9hashtable_10Factorizer_7uniques_2__set__(((struct __pyx_obj_6pandas_9hashtable_Factorizer *)__pyx_v_self), ((PyObject *)__pyx_v_value)); __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pandas_9hashtable_10Factorizer_7uniques_2__set__(struct __pyx_obj_6pandas_9hashtable_Factorizer *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__set__", 0); if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_6pandas_9hashtable_ObjectVector))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 826; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_INCREF(__pyx_v_value); __Pyx_GIVEREF(__pyx_v_value); __Pyx_GOTREF(__pyx_v_self->uniques); __Pyx_DECREF(((PyObject *)__pyx_v_self->uniques)); __pyx_v_self->uniques = ((struct __pyx_obj_6pandas_9hashtable_ObjectVector *)__pyx_v_value); __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("pandas.hashtable.Factorizer.uniques.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pandas_9hashtable_10Factorizer_7uniques_5__del__(PyObject *__pyx_v_self); /*proto*/ static int __pyx_pw_6pandas_9hashtable_10Factorizer_7uniques_5__del__(PyObject *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_9hashtable_10Factorizer_7uniques_4__del__(((struct __pyx_obj_6pandas_9hashtable_Factorizer *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pandas_9hashtable_10Factorizer_7uniques_4__del__(struct __pyx_obj_6pandas_9hashtable_Factorizer *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__", 0); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->uniques); __Pyx_DECREF(((PyObject *)__pyx_v_self->uniques)); __pyx_v_self->uniques = ((struct __pyx_obj_6pandas_9hashtable_ObjectVector *)Py_None); __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_9hashtable_10Factorizer_5count_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6pandas_9hashtable_10Factorizer_5count_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_9hashtable_10Factorizer_5count___get__(((struct __pyx_obj_6pandas_9hashtable_Factorizer *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/hashtable.pyx":827 * cdef public PyObjectHashTable table * cdef public ObjectVector uniques * cdef public Py_ssize_t count # <<<<<<<<<<<<<< * * def __init__(self, size_hint): */ static PyObject *__pyx_pf_6pandas_9hashtable_10Factorizer_5count___get__(struct __pyx_obj_6pandas_9hashtable_Factorizer *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_self->count); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 827; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas.hashtable.Factorizer.count.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pandas_9hashtable_10Factorizer_5count_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ static int __pyx_pw_6pandas_9hashtable_10Factorizer_5count_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_9hashtable_10Factorizer_5count_2__set__(((struct __pyx_obj_6pandas_9hashtable_Factorizer *)__pyx_v_self), ((PyObject *)__pyx_v_value)); __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pandas_9hashtable_10Factorizer_5count_2__set__(struct __pyx_obj_6pandas_9hashtable_Factorizer *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__set__", 0); __pyx_t_1 = __Pyx_PyIndex_AsSsize_t(__pyx_v_value); if (unlikely((__pyx_t_1 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 827; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_self->count = __pyx_t_1; __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("pandas.hashtable.Factorizer.count.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pandas_9hashtable_15Int64Factorizer_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_pw_6pandas_9hashtable_15Int64Factorizer_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_size_hint = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__size_hint,0}; PyObject* values[1] = {0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__size_hint)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 865; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); } __pyx_v_size_hint = values[0]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 865; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.hashtable.Int64Factorizer.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return -1; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pandas_9hashtable_15Int64Factorizer___init__(((struct __pyx_obj_6pandas_9hashtable_Int64Factorizer *)__pyx_v_self), __pyx_v_size_hint); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/hashtable.pyx":865 * cdef public Py_ssize_t count * * def __init__(self, size_hint): # <<<<<<<<<<<<<< * self.table = Int64HashTable(size_hint) * self.uniques = Int64Vector() */ static int __pyx_pf_6pandas_9hashtable_15Int64Factorizer___init__(struct __pyx_obj_6pandas_9hashtable_Int64Factorizer *__pyx_v_self, PyObject *__pyx_v_size_hint) { int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__init__", 0); /* "pandas/hashtable.pyx":866 * * def __init__(self, size_hint): * self.table = Int64HashTable(size_hint) # <<<<<<<<<<<<<< * self.uniques = Int64Vector() * self.count = 0 */ __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 866; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_size_hint); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_size_hint); __Pyx_GIVEREF(__pyx_v_size_hint); __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_6pandas_9hashtable_Int64HashTable)), ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 866; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __Pyx_GIVEREF(__pyx_t_2); __Pyx_GOTREF(__pyx_v_self->table); __Pyx_DECREF(((PyObject *)__pyx_v_self->table)); __pyx_v_self->table = ((struct __pyx_obj_6pandas_9hashtable_Int64HashTable *)__pyx_t_2); __pyx_t_2 = 0; /* "pandas/hashtable.pyx":867 * def __init__(self, size_hint): * self.table = Int64HashTable(size_hint) * self.uniques = Int64Vector() # <<<<<<<<<<<<<< * self.count = 0 * */ __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_6pandas_9hashtable_Int64Vector)), ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 867; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __Pyx_GOTREF(__pyx_v_self->uniques); __Pyx_DECREF(((PyObject *)__pyx_v_self->uniques)); __pyx_v_self->uniques = ((struct __pyx_obj_6pandas_9hashtable_Int64Vector *)__pyx_t_2); __pyx_t_2 = 0; /* "pandas/hashtable.pyx":868 * self.table = Int64HashTable(size_hint) * self.uniques = Int64Vector() * self.count = 0 # <<<<<<<<<<<<<< * * def get_count(self): */ __pyx_v_self->count = 0; __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("pandas.hashtable.Int64Factorizer.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_9hashtable_15Int64Factorizer_3get_count(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static PyObject *__pyx_pw_6pandas_9hashtable_15Int64Factorizer_3get_count(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("get_count (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_9hashtable_15Int64Factorizer_2get_count(((struct __pyx_obj_6pandas_9hashtable_Int64Factorizer *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/hashtable.pyx":870 * self.count = 0 * * def get_count(self): # <<<<<<<<<<<<<< * return self.count * */ static PyObject *__pyx_pf_6pandas_9hashtable_15Int64Factorizer_2get_count(struct __pyx_obj_6pandas_9hashtable_Int64Factorizer *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_count", 0); /* "pandas/hashtable.pyx":871 * * def get_count(self): * return self.count # <<<<<<<<<<<<<< * * def factorize(self, ndarray[int64_t] values, sort=False, */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_self->count); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 871; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas.hashtable.Int64Factorizer.get_count", __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_9hashtable_15Int64Factorizer_5factorize(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_6pandas_9hashtable_15Int64Factorizer_5factorize(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_values = 0; PyObject *__pyx_v_sort = 0; PyObject *__pyx_v_na_sentinel = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("factorize (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__values,&__pyx_n_s__sort,&__pyx_n_s__na_sentinel,0}; PyObject* values[3] = {0,0,0}; values[1] = __pyx_k_2; values[2] = ((PyObject *)__pyx_int_neg_1); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__values)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__sort); if (value) { values[1] = value; kw_args--; } } case 2: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__na_sentinel); if (value) { values[2] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "factorize") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 873; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_values = ((PyArrayObject *)values[0]); __pyx_v_sort = values[1]; __pyx_v_na_sentinel = values[2]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("factorize", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 873; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.hashtable.Int64Factorizer.factorize", __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_filename = __pyx_f[0]; __pyx_lineno = 873; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_9hashtable_15Int64Factorizer_4factorize(((struct __pyx_obj_6pandas_9hashtable_Int64Factorizer *)__pyx_v_self), __pyx_v_values, __pyx_v_sort, __pyx_v_na_sentinel); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/hashtable.pyx":873 * return self.count * * def factorize(self, ndarray[int64_t] values, sort=False, # <<<<<<<<<<<<<< * na_sentinel=-1): * labels = self.table.get_labels(values, self.uniques, */ static PyObject *__pyx_pf_6pandas_9hashtable_15Int64Factorizer_4factorize(struct __pyx_obj_6pandas_9hashtable_Int64Factorizer *__pyx_v_self, PyArrayObject *__pyx_v_values, PyObject *__pyx_v_sort, PyObject *__pyx_v_na_sentinel) { PyObject *__pyx_v_labels = NULL; PyObject *__pyx_v_sorter = NULL; PyObject *__pyx_v_reverse_indexer = NULL; __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; int __pyx_t_4; Py_ssize_t __pyx_t_5; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("factorize", 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_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 873; __pyx_clineno = __LINE__; goto __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/hashtable.pyx":875 * def factorize(self, ndarray[int64_t] values, sort=False, * na_sentinel=-1): * labels = self.table.get_labels(values, self.uniques, # <<<<<<<<<<<<<< * self.count, na_sentinel) * */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->table), __pyx_n_s__get_labels); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 875; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); /* "pandas/hashtable.pyx":876 * na_sentinel=-1): * labels = self.table.get_labels(values, self.uniques, * self.count, na_sentinel) # <<<<<<<<<<<<<< * * # sort on */ __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_self->count); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 876; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyTuple_New(4); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 875; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(((PyObject *)__pyx_v_values)); PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_v_values)); __Pyx_GIVEREF(((PyObject *)__pyx_v_values)); __Pyx_INCREF(((PyObject *)__pyx_v_self->uniques)); PyTuple_SET_ITEM(__pyx_t_3, 1, ((PyObject *)__pyx_v_self->uniques)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self->uniques)); PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_na_sentinel); PyTuple_SET_ITEM(__pyx_t_3, 3, __pyx_v_na_sentinel); __Pyx_GIVEREF(__pyx_v_na_sentinel); __pyx_t_2 = 0; __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 875; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; __pyx_v_labels = __pyx_t_2; __pyx_t_2 = 0; /* "pandas/hashtable.pyx":879 * * # sort on * if sort: # <<<<<<<<<<<<<< * if labels.dtype != np.int_: * labels = labels.astype(np.int_) */ __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_sort); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 879; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__pyx_t_4) { /* "pandas/hashtable.pyx":880 * # sort on * if sort: * if labels.dtype != np.int_: # <<<<<<<<<<<<<< * labels = labels.astype(np.int_) * */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_labels, __pyx_n_s__dtype); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 880; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 880; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s__int_); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 880; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyObject_RichCompare(__pyx_t_2, __pyx_t_1, Py_NE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 880; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 880; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_4) { /* "pandas/hashtable.pyx":881 * if sort: * if labels.dtype != np.int_: * labels = labels.astype(np.int_) # <<<<<<<<<<<<<< * * sorter = self.uniques.to_array().argsort() */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_labels, __pyx_n_s__astype); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 881; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 881; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s__int_); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 881; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 881; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 881; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __Pyx_DECREF_SET(__pyx_v_labels, __pyx_t_2); __pyx_t_2 = 0; goto __pyx_L4; } __pyx_L4:; /* "pandas/hashtable.pyx":883 * labels = labels.astype(np.int_) * * sorter = self.uniques.to_array().argsort() # <<<<<<<<<<<<<< * reverse_indexer = np.empty(len(sorter), dtype=np.int_) * reverse_indexer.put(sorter, np.arange(len(sorter))) */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->uniques), __pyx_n_s__to_array); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 883; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 883; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s__argsort); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 883; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 883; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_sorter = __pyx_t_1; __pyx_t_1 = 0; /* "pandas/hashtable.pyx":884 * * sorter = self.uniques.to_array().argsort() * reverse_indexer = np.empty(len(sorter), dtype=np.int_) # <<<<<<<<<<<<<< * reverse_indexer.put(sorter, np.arange(len(sorter))) * */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 884; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 884; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_5 = PyObject_Length(__pyx_v_sorter); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 884; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_5); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 884; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 884; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 884; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 884; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s__int_); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 884; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__dtype), __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 884; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_7 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_3), ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 884; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_v_reverse_indexer = __pyx_t_7; __pyx_t_7 = 0; /* "pandas/hashtable.pyx":885 * sorter = self.uniques.to_array().argsort() * reverse_indexer = np.empty(len(sorter), dtype=np.int_) * reverse_indexer.put(sorter, np.arange(len(sorter))) # <<<<<<<<<<<<<< * * labels = reverse_indexer.take(labels) */ __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_reverse_indexer, __pyx_n_s__put); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 885; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 885; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s__arange); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 885; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_5 = PyObject_Length(__pyx_v_sorter); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 885; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_5); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 885; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 885; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 885; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 885; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_sorter); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_sorter); __Pyx_GIVEREF(__pyx_v_sorter); PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyObject_Call(__pyx_t_7, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 885; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pandas/hashtable.pyx":887 * reverse_indexer.put(sorter, np.arange(len(sorter))) * * labels = reverse_indexer.take(labels) # <<<<<<<<<<<<<< * * self.count = len(self.uniques) */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_reverse_indexer, __pyx_n_s__take); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 887; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 887; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_labels); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_labels); __Pyx_GIVEREF(__pyx_v_labels); __pyx_t_7 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 887; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __Pyx_DECREF_SET(__pyx_v_labels, __pyx_t_7); __pyx_t_7 = 0; goto __pyx_L3; } __pyx_L3:; /* "pandas/hashtable.pyx":889 * labels = reverse_indexer.take(labels) * * self.count = len(self.uniques) # <<<<<<<<<<<<<< * return labels * */ __pyx_t_7 = ((PyObject *)__pyx_v_self->uniques); __Pyx_INCREF(__pyx_t_7); __pyx_t_5 = PyObject_Length(__pyx_t_7); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 889; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_v_self->count = __pyx_t_5; /* "pandas/hashtable.pyx":890 * * self.count = len(self.uniques) * return labels # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_labels); __pyx_r = __pyx_v_labels; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __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.hashtable.Int64Factorizer.factorize", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF(__pyx_v_labels); __Pyx_XDECREF(__pyx_v_sorter); __Pyx_XDECREF(__pyx_v_reverse_indexer); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_9hashtable_15Int64Factorizer_5table_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6pandas_9hashtable_15Int64Factorizer_5table_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_9hashtable_15Int64Factorizer_5table___get__(((struct __pyx_obj_6pandas_9hashtable_Int64Factorizer *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/hashtable.pyx":861 * * cdef class Int64Factorizer: * cdef public Int64HashTable table # <<<<<<<<<<<<<< * cdef public Int64Vector uniques * cdef public Py_ssize_t count */ static PyObject *__pyx_pf_6pandas_9hashtable_15Int64Factorizer_5table___get__(struct __pyx_obj_6pandas_9hashtable_Int64Factorizer *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_self->table)); __pyx_r = ((PyObject *)__pyx_v_self->table); goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pandas_9hashtable_15Int64Factorizer_5table_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ static int __pyx_pw_6pandas_9hashtable_15Int64Factorizer_5table_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_9hashtable_15Int64Factorizer_5table_2__set__(((struct __pyx_obj_6pandas_9hashtable_Int64Factorizer *)__pyx_v_self), ((PyObject *)__pyx_v_value)); __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pandas_9hashtable_15Int64Factorizer_5table_2__set__(struct __pyx_obj_6pandas_9hashtable_Int64Factorizer *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__set__", 0); if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_6pandas_9hashtable_Int64HashTable))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 861; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_INCREF(__pyx_v_value); __Pyx_GIVEREF(__pyx_v_value); __Pyx_GOTREF(__pyx_v_self->table); __Pyx_DECREF(((PyObject *)__pyx_v_self->table)); __pyx_v_self->table = ((struct __pyx_obj_6pandas_9hashtable_Int64HashTable *)__pyx_v_value); __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("pandas.hashtable.Int64Factorizer.table.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pandas_9hashtable_15Int64Factorizer_5table_5__del__(PyObject *__pyx_v_self); /*proto*/ static int __pyx_pw_6pandas_9hashtable_15Int64Factorizer_5table_5__del__(PyObject *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_9hashtable_15Int64Factorizer_5table_4__del__(((struct __pyx_obj_6pandas_9hashtable_Int64Factorizer *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pandas_9hashtable_15Int64Factorizer_5table_4__del__(struct __pyx_obj_6pandas_9hashtable_Int64Factorizer *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__", 0); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->table); __Pyx_DECREF(((PyObject *)__pyx_v_self->table)); __pyx_v_self->table = ((struct __pyx_obj_6pandas_9hashtable_Int64HashTable *)Py_None); __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_9hashtable_15Int64Factorizer_7uniques_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6pandas_9hashtable_15Int64Factorizer_7uniques_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_9hashtable_15Int64Factorizer_7uniques___get__(((struct __pyx_obj_6pandas_9hashtable_Int64Factorizer *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/hashtable.pyx":862 * cdef class Int64Factorizer: * cdef public Int64HashTable table * cdef public Int64Vector uniques # <<<<<<<<<<<<<< * cdef public Py_ssize_t count * */ static PyObject *__pyx_pf_6pandas_9hashtable_15Int64Factorizer_7uniques___get__(struct __pyx_obj_6pandas_9hashtable_Int64Factorizer *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_self->uniques)); __pyx_r = ((PyObject *)__pyx_v_self->uniques); goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pandas_9hashtable_15Int64Factorizer_7uniques_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ static int __pyx_pw_6pandas_9hashtable_15Int64Factorizer_7uniques_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_9hashtable_15Int64Factorizer_7uniques_2__set__(((struct __pyx_obj_6pandas_9hashtable_Int64Factorizer *)__pyx_v_self), ((PyObject *)__pyx_v_value)); __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pandas_9hashtable_15Int64Factorizer_7uniques_2__set__(struct __pyx_obj_6pandas_9hashtable_Int64Factorizer *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__set__", 0); if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_6pandas_9hashtable_Int64Vector))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 862; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_INCREF(__pyx_v_value); __Pyx_GIVEREF(__pyx_v_value); __Pyx_GOTREF(__pyx_v_self->uniques); __Pyx_DECREF(((PyObject *)__pyx_v_self->uniques)); __pyx_v_self->uniques = ((struct __pyx_obj_6pandas_9hashtable_Int64Vector *)__pyx_v_value); __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("pandas.hashtable.Int64Factorizer.uniques.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pandas_9hashtable_15Int64Factorizer_7uniques_5__del__(PyObject *__pyx_v_self); /*proto*/ static int __pyx_pw_6pandas_9hashtable_15Int64Factorizer_7uniques_5__del__(PyObject *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_9hashtable_15Int64Factorizer_7uniques_4__del__(((struct __pyx_obj_6pandas_9hashtable_Int64Factorizer *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pandas_9hashtable_15Int64Factorizer_7uniques_4__del__(struct __pyx_obj_6pandas_9hashtable_Int64Factorizer *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__", 0); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->uniques); __Pyx_DECREF(((PyObject *)__pyx_v_self->uniques)); __pyx_v_self->uniques = ((struct __pyx_obj_6pandas_9hashtable_Int64Vector *)Py_None); __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_9hashtable_15Int64Factorizer_5count_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6pandas_9hashtable_15Int64Factorizer_5count_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_9hashtable_15Int64Factorizer_5count___get__(((struct __pyx_obj_6pandas_9hashtable_Int64Factorizer *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/hashtable.pyx":863 * cdef public Int64HashTable table * cdef public Int64Vector uniques * cdef public Py_ssize_t count # <<<<<<<<<<<<<< * * def __init__(self, size_hint): */ static PyObject *__pyx_pf_6pandas_9hashtable_15Int64Factorizer_5count___get__(struct __pyx_obj_6pandas_9hashtable_Int64Factorizer *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_self->count); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 863; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas.hashtable.Int64Factorizer.count.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pandas_9hashtable_15Int64Factorizer_5count_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ static int __pyx_pw_6pandas_9hashtable_15Int64Factorizer_5count_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_9hashtable_15Int64Factorizer_5count_2__set__(((struct __pyx_obj_6pandas_9hashtable_Int64Factorizer *)__pyx_v_self), ((PyObject *)__pyx_v_value)); __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pandas_9hashtable_15Int64Factorizer_5count_2__set__(struct __pyx_obj_6pandas_9hashtable_Int64Factorizer *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__set__", 0); __pyx_t_1 = __Pyx_PyIndex_AsSsize_t(__pyx_v_value); if (unlikely((__pyx_t_1 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 863; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_self->count = __pyx_t_1; __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("pandas.hashtable.Int64Factorizer.count.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/hashtable.pyx":893 * * * cdef build_count_table_int64(ndarray[int64_t] values, kh_int64_t *table): # <<<<<<<<<<<<<< * cdef: * int k */ static PyObject *__pyx_f_6pandas_9hashtable_build_count_table_int64(PyArrayObject *__pyx_v_values, kh_int64_t *__pyx_v_table) { int __pyx_v_k; Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_n; int __pyx_v_ret; PyObject *__pyx_v_val = NULL; __Pyx_LocalBuf_ND __pyx_pybuffernd_values; __Pyx_Buffer __pyx_pybuffer_values; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; Py_ssize_t __pyx_t_2; Py_ssize_t __pyx_t_3; int __pyx_t_4; PyObject *__pyx_t_5 = NULL; __pyx_t_5numpy_int64_t __pyx_t_6; int __pyx_t_7; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("build_count_table_int64", 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_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 893; __pyx_clineno = __LINE__; goto __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/hashtable.pyx":896 * cdef: * int k * Py_ssize_t i, n = len(values) # <<<<<<<<<<<<<< * int ret = 0 * */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 896; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/hashtable.pyx":897 * int k * Py_ssize_t i, n = len(values) * int ret = 0 # <<<<<<<<<<<<<< * * kh_resize_int64(table, n) */ __pyx_v_ret = 0; /* "pandas/hashtable.pyx":899 * int ret = 0 * * kh_resize_int64(table, n) # <<<<<<<<<<<<<< * * for i in range(n): */ kh_resize_int64(__pyx_v_table, __pyx_v_n); /* "pandas/hashtable.pyx":901 * kh_resize_int64(table, n) * * for i in range(n): # <<<<<<<<<<<<<< * val = values[i] * k = kh_get_int64(table, val) */ __pyx_t_1 = __pyx_v_n; for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) { __pyx_v_i = __pyx_t_2; /* "pandas/hashtable.pyx":902 * * for i in range(n): * val = values[i] # <<<<<<<<<<<<<< * k = kh_get_int64(table, val) * if k != table.n_buckets: */ __pyx_t_3 = __pyx_v_i; __pyx_t_4 = -1; if (__pyx_t_3 < 0) { __pyx_t_3 += __pyx_pybuffernd_values.diminfo[0].shape; if (unlikely(__pyx_t_3 < 0)) __pyx_t_4 = 0; } else if (unlikely(__pyx_t_3 >= __pyx_pybuffernd_values.diminfo[0].shape)) __pyx_t_4 = 0; if (unlikely(__pyx_t_4 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_4); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 902; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_5 = __Pyx_PyInt_to_py_npy_int64((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_3, __pyx_pybuffernd_values.diminfo[0].strides))); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 902; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_XDECREF_SET(__pyx_v_val, __pyx_t_5); __pyx_t_5 = 0; /* "pandas/hashtable.pyx":903 * for i in range(n): * val = values[i] * k = kh_get_int64(table, val) # <<<<<<<<<<<<<< * if k != table.n_buckets: * table.vals[k] += 1 */ __pyx_t_6 = __Pyx_PyInt_from_py_npy_int64(__pyx_v_val); if (unlikely((__pyx_t_6 == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 903; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_k = kh_get_int64(__pyx_v_table, __pyx_t_6); /* "pandas/hashtable.pyx":904 * val = values[i] * k = kh_get_int64(table, val) * if k != table.n_buckets: # <<<<<<<<<<<<<< * table.vals[k] += 1 * else: */ __pyx_t_7 = ((__pyx_v_k != __pyx_v_table->n_buckets) != 0); if (__pyx_t_7) { /* "pandas/hashtable.pyx":905 * k = kh_get_int64(table, val) * if k != table.n_buckets: * table.vals[k] += 1 # <<<<<<<<<<<<<< * else: * k = kh_put_int64(table, val, &ret) */ __pyx_t_4 = __pyx_v_k; (__pyx_v_table->vals[__pyx_t_4]) = ((__pyx_v_table->vals[__pyx_t_4]) + 1); goto __pyx_L5; } /*else*/ { /* "pandas/hashtable.pyx":907 * table.vals[k] += 1 * else: * k = kh_put_int64(table, val, &ret) # <<<<<<<<<<<<<< * table.vals[k] = 1 * */ __pyx_t_6 = __Pyx_PyInt_from_py_npy_int64(__pyx_v_val); if (unlikely((__pyx_t_6 == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 907; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_k = kh_put_int64(__pyx_v_table, __pyx_t_6, (&__pyx_v_ret)); /* "pandas/hashtable.pyx":908 * else: * k = kh_put_int64(table, val, &ret) * table.vals[k] = 1 # <<<<<<<<<<<<<< * * */ (__pyx_v_table->vals[__pyx_v_k]) = 1; } __pyx_L5:; } __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_5); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __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.hashtable.build_count_table_int64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF(__pyx_v_val); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/hashtable.pyx":911 * * * cpdef value_count_int64(ndarray[int64_t] values): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i */ static PyObject *__pyx_pw_6pandas_9hashtable_3value_count_int64(PyObject *__pyx_self, PyObject *__pyx_v_values); /*proto*/ static PyObject *__pyx_f_6pandas_9hashtable_value_count_int64(PyArrayObject *__pyx_v_values, CYTHON_UNUSED int __pyx_skip_dispatch) { Py_ssize_t __pyx_v_i; kh_int64_t *__pyx_v_table; CYTHON_UNUSED int __pyx_v_ret; int __pyx_v_k; PyObject *__pyx_v_result_keys = NULL; PyObject *__pyx_v_result_counts = NULL; __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; PyObject *__pyx_t_5 = NULL; khint_t __pyx_t_6; int __pyx_t_7; int __pyx_t_8; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("value_count_int64", 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_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 911; __pyx_clineno = __LINE__; goto __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/hashtable.pyx":915 * Py_ssize_t i * kh_int64_t *table * int ret = 0 # <<<<<<<<<<<<<< * int k * */ __pyx_v_ret = 0; /* "pandas/hashtable.pyx":918 * int k * * table = kh_init_int64() # <<<<<<<<<<<<<< * build_count_table_int64(values, table) * */ __pyx_v_table = kh_init_int64(); /* "pandas/hashtable.pyx":919 * * table = kh_init_int64() * build_count_table_int64(values, table) # <<<<<<<<<<<<<< * * i = 0 */ __pyx_t_1 = __pyx_f_6pandas_9hashtable_build_count_table_int64(((PyArrayObject *)__pyx_v_values), __pyx_v_table); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 919; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pandas/hashtable.pyx":921 * build_count_table_int64(values, table) * * i = 0 # <<<<<<<<<<<<<< * result_keys = np.empty(table.n_occupied, dtype=np.int64) * result_counts = np.zeros(table.n_occupied, dtype=np.int64) */ __pyx_v_i = 0; /* "pandas/hashtable.pyx":922 * * i = 0 * result_keys = np.empty(table.n_occupied, dtype=np.int64) # <<<<<<<<<<<<<< * result_counts = np.zeros(table.n_occupied, dtype=np.int64) * for k in range(table.n_buckets): */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 922; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 922; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_PyInt_to_py_npy_uint32(__pyx_v_table->n_occupied); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 922; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 922; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 922; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 922; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s__int64); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 922; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__dtype), __pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 922; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_3), ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 922; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_v_result_keys = __pyx_t_5; __pyx_t_5 = 0; /* "pandas/hashtable.pyx":923 * i = 0 * result_keys = np.empty(table.n_occupied, dtype=np.int64) * result_counts = np.zeros(table.n_occupied, dtype=np.int64) # <<<<<<<<<<<<<< * for k in range(table.n_buckets): * if kh_exist_int64(table, k): */ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 923; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s__zeros); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 923; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyInt_to_py_npy_uint32(__pyx_v_table->n_occupied); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 923; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 923; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyDict_New(); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 923; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_5)); __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 923; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__int64); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 923; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (PyDict_SetItem(__pyx_t_5, ((PyObject *)__pyx_n_s__dtype), __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 923; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_3), ((PyObject *)__pyx_t_5)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 923; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; __pyx_v_result_counts = __pyx_t_4; __pyx_t_4 = 0; /* "pandas/hashtable.pyx":924 * result_keys = np.empty(table.n_occupied, dtype=np.int64) * result_counts = np.zeros(table.n_occupied, dtype=np.int64) * for k in range(table.n_buckets): # <<<<<<<<<<<<<< * if kh_exist_int64(table, k): * result_keys[i] = table.keys[k] */ __pyx_t_6 = __pyx_v_table->n_buckets; for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_6; __pyx_t_7+=1) { __pyx_v_k = __pyx_t_7; /* "pandas/hashtable.pyx":925 * result_counts = np.zeros(table.n_occupied, dtype=np.int64) * for k in range(table.n_buckets): * if kh_exist_int64(table, k): # <<<<<<<<<<<<<< * result_keys[i] = table.keys[k] * result_counts[i] = table.vals[k] */ __pyx_t_8 = (kh_exist_int64(__pyx_v_table, __pyx_v_k) != 0); if (__pyx_t_8) { /* "pandas/hashtable.pyx":926 * for k in range(table.n_buckets): * if kh_exist_int64(table, k): * result_keys[i] = table.keys[k] # <<<<<<<<<<<<<< * result_counts[i] = table.vals[k] * i += 1 */ __pyx_t_4 = __Pyx_PyInt_to_py_npy_int64((__pyx_v_table->keys[__pyx_v_k])); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 926; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); if (__Pyx_SetItemInt(__pyx_v_result_keys, __pyx_v_i, __pyx_t_4, sizeof(Py_ssize_t), PyInt_FromSsize_t, 0, 1, 1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 926; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "pandas/hashtable.pyx":927 * if kh_exist_int64(table, k): * result_keys[i] = table.keys[k] * result_counts[i] = table.vals[k] # <<<<<<<<<<<<<< * i += 1 * kh_destroy_int64(table) */ __pyx_t_4 = __Pyx_PyInt_FromSize_t((__pyx_v_table->vals[__pyx_v_k])); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 927; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); if (__Pyx_SetItemInt(__pyx_v_result_counts, __pyx_v_i, __pyx_t_4, sizeof(Py_ssize_t), PyInt_FromSsize_t, 0, 1, 1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 927; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "pandas/hashtable.pyx":928 * result_keys[i] = table.keys[k] * result_counts[i] = table.vals[k] * i += 1 # <<<<<<<<<<<<<< * kh_destroy_int64(table) * */ __pyx_v_i = (__pyx_v_i + 1); goto __pyx_L5; } __pyx_L5:; } /* "pandas/hashtable.pyx":929 * result_counts[i] = table.vals[k] * i += 1 * kh_destroy_int64(table) # <<<<<<<<<<<<<< * * return result_keys, result_counts */ kh_destroy_int64(__pyx_v_table); /* "pandas/hashtable.pyx":931 * kh_destroy_int64(table) * * return result_keys, result_counts # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 931; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_v_result_keys); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_result_keys); __Pyx_GIVEREF(__pyx_v_result_keys); __Pyx_INCREF(__pyx_v_result_counts); PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_result_counts); __Pyx_GIVEREF(__pyx_v_result_counts); __pyx_r = ((PyObject *)__pyx_t_4); __pyx_t_4 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __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.hashtable.value_count_int64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF(__pyx_v_result_keys); __Pyx_XDECREF(__pyx_v_result_counts); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_9hashtable_3value_count_int64(PyObject *__pyx_self, PyObject *__pyx_v_values); /*proto*/ static PyObject *__pyx_pw_6pandas_9hashtable_3value_count_int64(PyObject *__pyx_self, PyObject *__pyx_v_values) { CYTHON_UNUSED int __pyx_lineno = 0; CYTHON_UNUSED const char *__pyx_filename = NULL; CYTHON_UNUSED int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("value_count_int64 (wrapper)", 0); if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 911; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_9hashtable_2value_count_int64(__pyx_self, ((PyArrayObject *)__pyx_v_values)); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/hashtable.pyx":911 * * * cpdef value_count_int64(ndarray[int64_t] values): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i */ static PyObject *__pyx_pf_6pandas_9hashtable_2value_count_int64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values) { __Pyx_LocalBuf_ND __pyx_pybuffernd_values; __Pyx_Buffer __pyx_pybuffer_values; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("value_count_int64", 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_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 911; __pyx_clineno = __LINE__; goto __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 = __pyx_f_6pandas_9hashtable_value_count_int64(__pyx_v_values, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 911; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __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.hashtable.value_count_int64", __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/hashtable.pyx":934 * * * cdef build_count_table_object(ndarray[object] values, # <<<<<<<<<<<<<< * ndarray[uint8_t, cast=True] mask, * kh_pymap_t *table): */ static PyObject *__pyx_f_6pandas_9hashtable_build_count_table_object(PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_mask, kh_pymap_t *__pyx_v_table) { int __pyx_v_k; Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_n; int __pyx_v_ret; PyObject *__pyx_v_val = NULL; __Pyx_LocalBuf_ND __pyx_pybuffernd_mask; __Pyx_Buffer __pyx_pybuffer_mask; __Pyx_LocalBuf_ND __pyx_pybuffernd_values; __Pyx_Buffer __pyx_pybuffer_values; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; Py_ssize_t __pyx_t_2; Py_ssize_t __pyx_t_3; int __pyx_t_4; int __pyx_t_5; PyObject *__pyx_t_6 = NULL; Py_ssize_t __pyx_t_7; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("build_count_table_object", 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_mask.pybuffer.buf = NULL; __pyx_pybuffer_mask.refcount = 0; __pyx_pybuffernd_mask.data = NULL; __pyx_pybuffernd_mask.rcbuffer = &__pyx_pybuffer_mask; { __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_filename = __pyx_f[0]; __pyx_lineno = 934; __pyx_clineno = __LINE__; goto __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_mask.rcbuffer->pybuffer, (PyObject*)__pyx_v_mask, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 1, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 934; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; /* "pandas/hashtable.pyx":939 * cdef: * int k * Py_ssize_t i, n = len(values) # <<<<<<<<<<<<<< * int ret = 0 * */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 939; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/hashtable.pyx":940 * int k * Py_ssize_t i, n = len(values) * int ret = 0 # <<<<<<<<<<<<<< * * kh_resize_pymap(table, n // 10) */ __pyx_v_ret = 0; /* "pandas/hashtable.pyx":942 * int ret = 0 * * kh_resize_pymap(table, n // 10) # <<<<<<<<<<<<<< * * for i in range(n): */ kh_resize_pymap(__pyx_v_table, __Pyx_div_Py_ssize_t(__pyx_v_n, 10)); /* "pandas/hashtable.pyx":944 * kh_resize_pymap(table, n // 10) * * for i in range(n): # <<<<<<<<<<<<<< * if mask[i]: * continue */ __pyx_t_1 = __pyx_v_n; for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) { __pyx_v_i = __pyx_t_2; /* "pandas/hashtable.pyx":945 * * for i in range(n): * if mask[i]: # <<<<<<<<<<<<<< * continue * */ __pyx_t_3 = __pyx_v_i; __pyx_t_4 = -1; if (__pyx_t_3 < 0) { __pyx_t_3 += __pyx_pybuffernd_mask.diminfo[0].shape; if (unlikely(__pyx_t_3 < 0)) __pyx_t_4 = 0; } else if (unlikely(__pyx_t_3 >= __pyx_pybuffernd_mask.diminfo[0].shape)) __pyx_t_4 = 0; if (unlikely(__pyx_t_4 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_4); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 945; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_5 = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_mask.rcbuffer->pybuffer.buf, __pyx_t_3, __pyx_pybuffernd_mask.diminfo[0].strides)) != 0); if (__pyx_t_5) { /* "pandas/hashtable.pyx":946 * for i in range(n): * if mask[i]: * continue # <<<<<<<<<<<<<< * * val = values[i] */ goto __pyx_L3_continue; goto __pyx_L5; } __pyx_L5:; /* "pandas/hashtable.pyx":948 * continue * * val = values[i] # <<<<<<<<<<<<<< * k = kh_get_pymap(table, val) * if k != table.n_buckets: */ __pyx_t_7 = __pyx_v_i; __pyx_t_4 = -1; if (__pyx_t_7 < 0) { __pyx_t_7 += __pyx_pybuffernd_values.diminfo[0].shape; if (unlikely(__pyx_t_7 < 0)) __pyx_t_4 = 0; } else if (unlikely(__pyx_t_7 >= __pyx_pybuffernd_values.diminfo[0].shape)) __pyx_t_4 = 0; if (unlikely(__pyx_t_4 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_4); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 948; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_6 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_7, __pyx_pybuffernd_values.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_6); __Pyx_XDECREF_SET(__pyx_v_val, __pyx_t_6); __pyx_t_6 = 0; /* "pandas/hashtable.pyx":949 * * val = values[i] * k = kh_get_pymap(table, val) # <<<<<<<<<<<<<< * if k != table.n_buckets: * table.vals[k] += 1 */ __pyx_v_k = kh_get_pymap(__pyx_v_table, ((PyObject *)__pyx_v_val)); /* "pandas/hashtable.pyx":950 * val = values[i] * k = kh_get_pymap(table, val) * if k != table.n_buckets: # <<<<<<<<<<<<<< * table.vals[k] += 1 * else: */ __pyx_t_5 = ((__pyx_v_k != __pyx_v_table->n_buckets) != 0); if (__pyx_t_5) { /* "pandas/hashtable.pyx":951 * k = kh_get_pymap(table, val) * if k != table.n_buckets: * table.vals[k] += 1 # <<<<<<<<<<<<<< * else: * k = kh_put_pymap(table, val, &ret) */ __pyx_t_4 = __pyx_v_k; (__pyx_v_table->vals[__pyx_t_4]) = ((__pyx_v_table->vals[__pyx_t_4]) + 1); goto __pyx_L6; } /*else*/ { /* "pandas/hashtable.pyx":953 * table.vals[k] += 1 * else: * k = kh_put_pymap(table, val, &ret) # <<<<<<<<<<<<<< * table.vals[k] = 1 * */ __pyx_v_k = kh_put_pymap(__pyx_v_table, ((PyObject *)__pyx_v_val), (&__pyx_v_ret)); /* "pandas/hashtable.pyx":954 * else: * k = kh_put_pymap(table, val, &ret) * table.vals[k] = 1 # <<<<<<<<<<<<<< * * */ (__pyx_v_table->vals[__pyx_v_k]) = 1; } __pyx_L6:; __pyx_L3_continue:; } __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_6); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_mask.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.hashtable.build_count_table_object", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_mask.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF(__pyx_v_val); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/hashtable.pyx":957 * * * cpdef value_count_object(ndarray[object] values, # <<<<<<<<<<<<<< * ndarray[uint8_t, cast=True] mask): * cdef: */ static PyObject *__pyx_pw_6pandas_9hashtable_5value_count_object(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_6pandas_9hashtable_value_count_object(PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_mask, CYTHON_UNUSED int __pyx_skip_dispatch) { Py_ssize_t __pyx_v_i; kh_pymap_t *__pyx_v_table; int __pyx_v_k; PyObject *__pyx_v_result_keys = NULL; PyObject *__pyx_v_result_counts = NULL; __Pyx_LocalBuf_ND __pyx_pybuffernd_mask; __Pyx_Buffer __pyx_pybuffer_mask; __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; khint_t __pyx_t_7; int __pyx_t_8; int __pyx_t_9; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("value_count_object", 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_mask.pybuffer.buf = NULL; __pyx_pybuffer_mask.refcount = 0; __pyx_pybuffernd_mask.data = NULL; __pyx_pybuffernd_mask.rcbuffer = &__pyx_pybuffer_mask; { __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_filename = __pyx_f[0]; __pyx_lineno = 957; __pyx_clineno = __LINE__; goto __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_mask.rcbuffer->pybuffer, (PyObject*)__pyx_v_mask, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 1, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 957; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; /* "pandas/hashtable.pyx":960 * ndarray[uint8_t, cast=True] mask): * cdef: * Py_ssize_t i = len(values) # <<<<<<<<<<<<<< * kh_pymap_t *table * int k */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 960; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_i = __pyx_t_1; /* "pandas/hashtable.pyx":964 * int k * * table = kh_init_pymap() # <<<<<<<<<<<<<< * build_count_table_object(values, mask, table) * */ __pyx_v_table = kh_init_pymap(); /* "pandas/hashtable.pyx":965 * * table = kh_init_pymap() * build_count_table_object(values, mask, table) # <<<<<<<<<<<<<< * * i = 0 */ __pyx_t_2 = __pyx_f_6pandas_9hashtable_build_count_table_object(((PyArrayObject *)__pyx_v_values), ((PyArrayObject *)__pyx_v_mask), __pyx_v_table); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 965; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/hashtable.pyx":967 * build_count_table_object(values, mask, table) * * i = 0 # <<<<<<<<<<<<<< * result_keys = np.empty(table.n_occupied, dtype=object) * result_counts = np.zeros(table.n_occupied, dtype=np.int64) */ __pyx_v_i = 0; /* "pandas/hashtable.pyx":968 * * i = 0 * result_keys = np.empty(table.n_occupied, dtype=object) # <<<<<<<<<<<<<< * result_counts = np.zeros(table.n_occupied, dtype=np.int64) * for k in range(table.n_buckets): */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 968; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 968; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyInt_to_py_npy_uint32(__pyx_v_table->n_occupied); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 968; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 968; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 968; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_2)); if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__dtype), __pyx_builtin_object) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 968; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_5 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 968; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __pyx_v_result_keys = __pyx_t_5; __pyx_t_5 = 0; /* "pandas/hashtable.pyx":969 * i = 0 * result_keys = np.empty(table.n_occupied, dtype=object) * result_counts = np.zeros(table.n_occupied, dtype=np.int64) # <<<<<<<<<<<<<< * for k in range(table.n_buckets): * if kh_exist_pymap(table, k): */ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 969; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s__zeros); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 969; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyInt_to_py_npy_uint32(__pyx_v_table->n_occupied); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 969; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 969; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyDict_New(); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 969; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_5)); __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 969; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s__int64); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 969; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (PyDict_SetItem(__pyx_t_5, ((PyObject *)__pyx_n_s__dtype), __pyx_t_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 969; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_5)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 969; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; __pyx_v_result_counts = __pyx_t_6; __pyx_t_6 = 0; /* "pandas/hashtable.pyx":970 * result_keys = np.empty(table.n_occupied, dtype=object) * result_counts = np.zeros(table.n_occupied, dtype=np.int64) * for k in range(table.n_buckets): # <<<<<<<<<<<<<< * if kh_exist_pymap(table, k): * result_keys[i] = table.keys[k] */ __pyx_t_7 = __pyx_v_table->n_buckets; for (__pyx_t_8 = 0; __pyx_t_8 < __pyx_t_7; __pyx_t_8+=1) { __pyx_v_k = __pyx_t_8; /* "pandas/hashtable.pyx":971 * result_counts = np.zeros(table.n_occupied, dtype=np.int64) * for k in range(table.n_buckets): * if kh_exist_pymap(table, k): # <<<<<<<<<<<<<< * result_keys[i] = table.keys[k] * result_counts[i] = table.vals[k] */ __pyx_t_9 = (kh_exist_pymap(__pyx_v_table, __pyx_v_k) != 0); if (__pyx_t_9) { /* "pandas/hashtable.pyx":972 * for k in range(table.n_buckets): * if kh_exist_pymap(table, k): * result_keys[i] = table.keys[k] # <<<<<<<<<<<<<< * result_counts[i] = table.vals[k] * i += 1 */ if (__Pyx_SetItemInt(__pyx_v_result_keys, __pyx_v_i, ((PyObject *)(__pyx_v_table->keys[__pyx_v_k])), sizeof(Py_ssize_t), PyInt_FromSsize_t, 0, 1, 1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 972; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/hashtable.pyx":973 * if kh_exist_pymap(table, k): * result_keys[i] = table.keys[k] * result_counts[i] = table.vals[k] # <<<<<<<<<<<<<< * i += 1 * kh_destroy_pymap(table) */ __pyx_t_6 = __Pyx_PyInt_FromSize_t((__pyx_v_table->vals[__pyx_v_k])); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 973; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); if (__Pyx_SetItemInt(__pyx_v_result_counts, __pyx_v_i, __pyx_t_6, sizeof(Py_ssize_t), PyInt_FromSsize_t, 0, 1, 1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 973; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; /* "pandas/hashtable.pyx":974 * result_keys[i] = table.keys[k] * result_counts[i] = table.vals[k] * i += 1 # <<<<<<<<<<<<<< * kh_destroy_pymap(table) * */ __pyx_v_i = (__pyx_v_i + 1); goto __pyx_L5; } __pyx_L5:; } /* "pandas/hashtable.pyx":975 * result_counts[i] = table.vals[k] * i += 1 * kh_destroy_pymap(table) # <<<<<<<<<<<<<< * * return result_keys, result_counts */ kh_destroy_pymap(__pyx_v_table); /* "pandas/hashtable.pyx":977 * kh_destroy_pymap(table) * * return result_keys, result_counts # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 977; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(__pyx_v_result_keys); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_result_keys); __Pyx_GIVEREF(__pyx_v_result_keys); __Pyx_INCREF(__pyx_v_result_counts); PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_v_result_counts); __Pyx_GIVEREF(__pyx_v_result_counts); __pyx_r = ((PyObject *)__pyx_t_6); __pyx_t_6 = 0; goto __pyx_L0; __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_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_mask.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.hashtable.value_count_object", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_mask.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF(__pyx_v_result_keys); __Pyx_XDECREF(__pyx_v_result_counts); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_9hashtable_5value_count_object(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_6pandas_9hashtable_5value_count_object(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_values = 0; PyArrayObject *__pyx_v_mask = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("value_count_object (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__values,&__pyx_n_s__mask,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__values)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__mask)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("value_count_object", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 957; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "value_count_object") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 957; __pyx_clineno = __LINE__; goto __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_mask = ((PyArrayObject *)values[1]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("value_count_object", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 957; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.hashtable.value_count_object", __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_filename = __pyx_f[0]; __pyx_lineno = 957; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_mask), __pyx_ptype_5numpy_ndarray, 1, "mask", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 958; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_9hashtable_4value_count_object(__pyx_self, __pyx_v_values, __pyx_v_mask); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/hashtable.pyx":957 * * * cpdef value_count_object(ndarray[object] values, # <<<<<<<<<<<<<< * ndarray[uint8_t, cast=True] mask): * cdef: */ static PyObject *__pyx_pf_6pandas_9hashtable_4value_count_object(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_mask) { __Pyx_LocalBuf_ND __pyx_pybuffernd_mask; __Pyx_Buffer __pyx_pybuffer_mask; __Pyx_LocalBuf_ND __pyx_pybuffernd_values; __Pyx_Buffer __pyx_pybuffer_values; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("value_count_object", 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_mask.pybuffer.buf = NULL; __pyx_pybuffer_mask.refcount = 0; __pyx_pybuffernd_mask.data = NULL; __pyx_pybuffernd_mask.rcbuffer = &__pyx_pybuffer_mask; { __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_filename = __pyx_f[0]; __pyx_lineno = 957; __pyx_clineno = __LINE__; goto __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_mask.rcbuffer->pybuffer, (PyObject*)__pyx_v_mask, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 1, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 957; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_6pandas_9hashtable_value_count_object(__pyx_v_values, __pyx_v_mask, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 957; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_mask.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.hashtable.value_count_object", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_mask.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_9hashtable_7mode_object(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_9hashtable_7mode_object = {__Pyx_NAMESTR("mode_object"), (PyCFunction)__pyx_pw_6pandas_9hashtable_7mode_object, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_9hashtable_7mode_object(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_values = 0; PyArrayObject *__pyx_v_mask = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("mode_object (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__values,&__pyx_n_s__mask,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__values)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__mask)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("mode_object", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 980; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "mode_object") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 980; __pyx_clineno = __LINE__; goto __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_mask = ((PyArrayObject *)values[1]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("mode_object", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 980; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.hashtable.mode_object", __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_filename = __pyx_f[0]; __pyx_lineno = 980; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_mask), __pyx_ptype_5numpy_ndarray, 1, "mask", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 980; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_9hashtable_6mode_object(__pyx_self, __pyx_v_values, __pyx_v_mask); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/hashtable.pyx":980 * * * def mode_object(ndarray[object] values, ndarray[uint8_t, cast=True] mask): # <<<<<<<<<<<<<< * cdef: * int count, max_count = 2 */ static PyObject *__pyx_pf_6pandas_9hashtable_6mode_object(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_mask) { int __pyx_v_count; int __pyx_v_max_count; int __pyx_v_j; int __pyx_v_k; CYTHON_UNUSED Py_ssize_t __pyx_v_n; kh_pymap_t *__pyx_v_table; CYTHON_UNUSED int __pyx_v_ret; PyObject *__pyx_v_modes = NULL; __Pyx_LocalBuf_ND __pyx_pybuffernd_mask; __Pyx_Buffer __pyx_pybuffer_mask; __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; khint_t __pyx_t_7; int __pyx_t_8; int __pyx_t_9; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("mode_object", 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_mask.pybuffer.buf = NULL; __pyx_pybuffer_mask.refcount = 0; __pyx_pybuffernd_mask.data = NULL; __pyx_pybuffernd_mask.rcbuffer = &__pyx_pybuffer_mask; { __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_filename = __pyx_f[0]; __pyx_lineno = 980; __pyx_clineno = __LINE__; goto __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_mask.rcbuffer->pybuffer, (PyObject*)__pyx_v_mask, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 1, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 980; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __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]; /* "pandas/hashtable.pyx":982 * def mode_object(ndarray[object] values, ndarray[uint8_t, cast=True] mask): * cdef: * int count, max_count = 2 # <<<<<<<<<<<<<< * int j = -1 # so you can do += * int k */ __pyx_v_max_count = 2; /* "pandas/hashtable.pyx":983 * cdef: * int count, max_count = 2 * int j = -1 # so you can do += # <<<<<<<<<<<<<< * int k * Py_ssize_t i, n = len(values) */ __pyx_v_j = -1; /* "pandas/hashtable.pyx":985 * int j = -1 # so you can do += * int k * Py_ssize_t i, n = len(values) # <<<<<<<<<<<<<< * kh_pymap_t *table * int ret = 0 */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 985; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "pandas/hashtable.pyx":987 * Py_ssize_t i, n = len(values) * kh_pymap_t *table * int ret = 0 # <<<<<<<<<<<<<< * * table = kh_init_pymap() */ __pyx_v_ret = 0; /* "pandas/hashtable.pyx":989 * int ret = 0 * * table = kh_init_pymap() # <<<<<<<<<<<<<< * build_count_table_object(values, mask, table) * */ __pyx_v_table = kh_init_pymap(); /* "pandas/hashtable.pyx":990 * * table = kh_init_pymap() * build_count_table_object(values, mask, table) # <<<<<<<<<<<<<< * * modes = np.empty(table.n_buckets, dtype=np.object_) */ __pyx_t_2 = __pyx_f_6pandas_9hashtable_build_count_table_object(((PyArrayObject *)__pyx_v_values), ((PyArrayObject *)__pyx_v_mask), __pyx_v_table); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 990; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/hashtable.pyx":992 * build_count_table_object(values, mask, table) * * modes = np.empty(table.n_buckets, dtype=np.object_) # <<<<<<<<<<<<<< * for k in range(table.n_buckets): * if kh_exist_pymap(table, k): */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 992; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 992; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyInt_to_py_npy_uint32(__pyx_v_table->n_buckets); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 992; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 992; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 992; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_2)); __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 992; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s__object_); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 992; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__dtype), __pyx_t_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 992; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 992; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __pyx_v_modes = __pyx_t_6; __pyx_t_6 = 0; /* "pandas/hashtable.pyx":993 * * modes = np.empty(table.n_buckets, dtype=np.object_) * for k in range(table.n_buckets): # <<<<<<<<<<<<<< * if kh_exist_pymap(table, k): * count = table.vals[k] */ __pyx_t_7 = __pyx_v_table->n_buckets; for (__pyx_t_8 = 0; __pyx_t_8 < __pyx_t_7; __pyx_t_8+=1) { __pyx_v_k = __pyx_t_8; /* "pandas/hashtable.pyx":994 * modes = np.empty(table.n_buckets, dtype=np.object_) * for k in range(table.n_buckets): * if kh_exist_pymap(table, k): # <<<<<<<<<<<<<< * count = table.vals[k] * */ __pyx_t_9 = (kh_exist_pymap(__pyx_v_table, __pyx_v_k) != 0); if (__pyx_t_9) { /* "pandas/hashtable.pyx":995 * for k in range(table.n_buckets): * if kh_exist_pymap(table, k): * count = table.vals[k] # <<<<<<<<<<<<<< * * if count == max_count: */ __pyx_v_count = (__pyx_v_table->vals[__pyx_v_k]); /* "pandas/hashtable.pyx":997 * count = table.vals[k] * * if count == max_count: # <<<<<<<<<<<<<< * j += 1 * elif count > max_count: */ __pyx_t_9 = ((__pyx_v_count == __pyx_v_max_count) != 0); if (__pyx_t_9) { /* "pandas/hashtable.pyx":998 * * if count == max_count: * j += 1 # <<<<<<<<<<<<<< * elif count > max_count: * max_count = count */ __pyx_v_j = (__pyx_v_j + 1); goto __pyx_L6; } /* "pandas/hashtable.pyx":999 * if count == max_count: * j += 1 * elif count > max_count: # <<<<<<<<<<<<<< * max_count = count * j = 0 */ __pyx_t_9 = ((__pyx_v_count > __pyx_v_max_count) != 0); if (__pyx_t_9) { /* "pandas/hashtable.pyx":1000 * j += 1 * elif count > max_count: * max_count = count # <<<<<<<<<<<<<< * j = 0 * else: */ __pyx_v_max_count = __pyx_v_count; /* "pandas/hashtable.pyx":1001 * elif count > max_count: * max_count = count * j = 0 # <<<<<<<<<<<<<< * else: * continue */ __pyx_v_j = 0; goto __pyx_L6; } /*else*/ { /* "pandas/hashtable.pyx":1003 * j = 0 * else: * continue # <<<<<<<<<<<<<< * modes[j] = table.keys[k] * */ goto __pyx_L3_continue; } __pyx_L6:; /* "pandas/hashtable.pyx":1004 * else: * continue * modes[j] = table.keys[k] # <<<<<<<<<<<<<< * * kh_destroy_pymap(table) */ if (__Pyx_SetItemInt(__pyx_v_modes, __pyx_v_j, ((PyObject *)(__pyx_v_table->keys[__pyx_v_k])), sizeof(int), PyInt_FromLong, 0, 1, 1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1004; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L5; } __pyx_L5:; __pyx_L3_continue:; } /* "pandas/hashtable.pyx":1006 * modes[j] = table.keys[k] * * kh_destroy_pymap(table) # <<<<<<<<<<<<<< * * return modes[:j+1] */ kh_destroy_pymap(__pyx_v_table); /* "pandas/hashtable.pyx":1008 * kh_destroy_pymap(table) * * return modes[:j+1] # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_6 = __Pyx_PyObject_GetSlice(__pyx_v_modes, 0, (__pyx_v_j + 1), NULL, NULL, NULL, 0, 1, 1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1008; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_r = __pyx_t_6; __pyx_t_6 = 0; goto __pyx_L0; __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_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_mask.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.hashtable.mode_object", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_mask.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF(__pyx_v_modes); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_9hashtable_9mode_int64(PyObject *__pyx_self, PyObject *__pyx_v_values); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_9hashtable_9mode_int64 = {__Pyx_NAMESTR("mode_int64"), (PyCFunction)__pyx_pw_6pandas_9hashtable_9mode_int64, METH_O, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_9hashtable_9mode_int64(PyObject *__pyx_self, PyObject *__pyx_v_values) { CYTHON_UNUSED int __pyx_lineno = 0; CYTHON_UNUSED const char *__pyx_filename = NULL; CYTHON_UNUSED int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("mode_int64 (wrapper)", 0); if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1011; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_9hashtable_8mode_int64(__pyx_self, ((PyArrayObject *)__pyx_v_values)); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/hashtable.pyx":1011 * * * def mode_int64(ndarray[int64_t] values): # <<<<<<<<<<<<<< * cdef: * int val, max_val = 2 */ static PyObject *__pyx_pf_6pandas_9hashtable_8mode_int64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values) { int __pyx_v_val; int __pyx_v_max_val; int __pyx_v_j; int __pyx_v_k; kh_int64_t *__pyx_v_table; CYTHON_UNUSED PyObject *__pyx_v_uniques = 0; PyObject *__pyx_v_modes = NULL; __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; PyObject *__pyx_t_5 = NULL; khint_t __pyx_t_6; int __pyx_t_7; int __pyx_t_8; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("mode_int64", 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_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1011; __pyx_clineno = __LINE__; goto __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/hashtable.pyx":1013 * def mode_int64(ndarray[int64_t] values): * cdef: * int val, max_val = 2 # <<<<<<<<<<<<<< * int j = -1 # so you can do += * int k */ __pyx_v_max_val = 2; /* "pandas/hashtable.pyx":1014 * cdef: * int val, max_val = 2 * int j = -1 # so you can do += # <<<<<<<<<<<<<< * int k * kh_int64_t *table */ __pyx_v_j = -1; /* "pandas/hashtable.pyx":1017 * int k * kh_int64_t *table * list uniques = [] # <<<<<<<<<<<<<< * * table = kh_init_int64() */ __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1017; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_v_uniques = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/hashtable.pyx":1019 * list uniques = [] * * table = kh_init_int64() # <<<<<<<<<<<<<< * * build_count_table_int64(values, table) */ __pyx_v_table = kh_init_int64(); /* "pandas/hashtable.pyx":1021 * table = kh_init_int64() * * build_count_table_int64(values, table) # <<<<<<<<<<<<<< * * modes = np.empty(table.n_buckets, dtype=np.int64) */ __pyx_t_1 = __pyx_f_6pandas_9hashtable_build_count_table_int64(((PyArrayObject *)__pyx_v_values), __pyx_v_table); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1021; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pandas/hashtable.pyx":1023 * build_count_table_int64(values, table) * * modes = np.empty(table.n_buckets, dtype=np.int64) # <<<<<<<<<<<<<< * for k in range(table.n_buckets): * if kh_exist_int64(table, k): */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1023; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 1023; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_PyInt_to_py_npy_uint32(__pyx_v_table->n_buckets); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1023; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1023; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1023; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1023; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s__int64); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1023; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__dtype), __pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1023; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_3), ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1023; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_v_modes = __pyx_t_5; __pyx_t_5 = 0; /* "pandas/hashtable.pyx":1024 * * modes = np.empty(table.n_buckets, dtype=np.int64) * for k in range(table.n_buckets): # <<<<<<<<<<<<<< * if kh_exist_int64(table, k): * val = table.vals[k] */ __pyx_t_6 = __pyx_v_table->n_buckets; for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_6; __pyx_t_7+=1) { __pyx_v_k = __pyx_t_7; /* "pandas/hashtable.pyx":1025 * modes = np.empty(table.n_buckets, dtype=np.int64) * for k in range(table.n_buckets): * if kh_exist_int64(table, k): # <<<<<<<<<<<<<< * val = table.vals[k] * */ __pyx_t_8 = (kh_exist_int64(__pyx_v_table, __pyx_v_k) != 0); if (__pyx_t_8) { /* "pandas/hashtable.pyx":1026 * for k in range(table.n_buckets): * if kh_exist_int64(table, k): * val = table.vals[k] # <<<<<<<<<<<<<< * * if val == max_val: */ __pyx_v_val = (__pyx_v_table->vals[__pyx_v_k]); /* "pandas/hashtable.pyx":1028 * val = table.vals[k] * * if val == max_val: # <<<<<<<<<<<<<< * j += 1 * elif val > max_val: */ __pyx_t_8 = ((__pyx_v_val == __pyx_v_max_val) != 0); if (__pyx_t_8) { /* "pandas/hashtable.pyx":1029 * * if val == max_val: * j += 1 # <<<<<<<<<<<<<< * elif val > max_val: * max_val = val */ __pyx_v_j = (__pyx_v_j + 1); goto __pyx_L6; } /* "pandas/hashtable.pyx":1030 * if val == max_val: * j += 1 * elif val > max_val: # <<<<<<<<<<<<<< * max_val = val * j = 0 */ __pyx_t_8 = ((__pyx_v_val > __pyx_v_max_val) != 0); if (__pyx_t_8) { /* "pandas/hashtable.pyx":1031 * j += 1 * elif val > max_val: * max_val = val # <<<<<<<<<<<<<< * j = 0 * else: */ __pyx_v_max_val = __pyx_v_val; /* "pandas/hashtable.pyx":1032 * elif val > max_val: * max_val = val * j = 0 # <<<<<<<<<<<<<< * else: * continue */ __pyx_v_j = 0; goto __pyx_L6; } /*else*/ { /* "pandas/hashtable.pyx":1034 * j = 0 * else: * continue # <<<<<<<<<<<<<< * modes[j] = table.keys[k] * */ goto __pyx_L3_continue; } __pyx_L6:; /* "pandas/hashtable.pyx":1035 * else: * continue * modes[j] = table.keys[k] # <<<<<<<<<<<<<< * * kh_destroy_int64(table) */ __pyx_t_5 = __Pyx_PyInt_to_py_npy_int64((__pyx_v_table->keys[__pyx_v_k])); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1035; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); if (__Pyx_SetItemInt(__pyx_v_modes, __pyx_v_j, __pyx_t_5, sizeof(int), PyInt_FromLong, 0, 1, 1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1035; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; goto __pyx_L5; } __pyx_L5:; __pyx_L3_continue:; } /* "pandas/hashtable.pyx":1037 * modes[j] = table.keys[k] * * kh_destroy_int64(table) # <<<<<<<<<<<<<< * * return modes[:j+1] */ kh_destroy_int64(__pyx_v_table); /* "pandas/hashtable.pyx":1039 * kh_destroy_int64(table) * * return modes[:j+1] # <<<<<<<<<<<<<< */ __Pyx_XDECREF(__pyx_r); __pyx_t_5 = __Pyx_PyObject_GetSlice(__pyx_v_modes, 0, (__pyx_v_j + 1), NULL, NULL, NULL, 0, 1, 1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1039; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_r = __pyx_t_5; __pyx_t_5 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __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.hashtable.mode_int64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF(__pyx_v_uniques); __Pyx_XDECREF(__pyx_v_modes); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "util.pxd":26 * object sarr_from_data(cnp.dtype, int length, void* data) * * cdef inline object get_value_at(ndarray arr, object loc): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, sz */ static CYTHON_INLINE PyObject *__pyx_f_4util_get_value_at(PyArrayObject *__pyx_v_arr, PyObject *__pyx_v_loc) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_sz; PyObject *__pyx_v_casted = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; Py_ssize_t __pyx_t_4; int __pyx_t_5; int __pyx_t_6; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_value_at", 0); __Pyx_INCREF(__pyx_v_loc); /* "util.pxd":30 * Py_ssize_t i, sz * void* data_ptr * if is_float_object(loc): # <<<<<<<<<<<<<< * casted = int(loc) * if casted == loc: */ __pyx_t_1 = (is_float_object(__pyx_v_loc) != 0); if (__pyx_t_1) { /* "util.pxd":31 * void* data_ptr * if is_float_object(loc): * casted = int(loc) # <<<<<<<<<<<<<< * if casted == loc: * loc = casted */ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 31; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_loc); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_loc); __Pyx_GIVEREF(__pyx_v_loc); __pyx_t_3 = PyObject_Call(((PyObject *)((PyObject*)(&PyInt_Type))), ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 31; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __pyx_v_casted = __pyx_t_3; __pyx_t_3 = 0; /* "util.pxd":32 * if is_float_object(loc): * casted = int(loc) * if casted == loc: # <<<<<<<<<<<<<< * loc = casted * i = loc */ __pyx_t_3 = PyObject_RichCompare(__pyx_v_casted, __pyx_v_loc, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 32; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 32; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_1) { /* "util.pxd":33 * casted = int(loc) * if casted == loc: * loc = casted # <<<<<<<<<<<<<< * i = loc * sz = cnp.PyArray_SIZE(arr) */ __Pyx_INCREF(__pyx_v_casted); __Pyx_DECREF_SET(__pyx_v_loc, __pyx_v_casted); goto __pyx_L4; } __pyx_L4:; goto __pyx_L3; } __pyx_L3:; /* "util.pxd":34 * if casted == loc: * loc = casted * i = loc # <<<<<<<<<<<<<< * sz = cnp.PyArray_SIZE(arr) * */ __pyx_t_4 = __Pyx_PyIndex_AsSsize_t(__pyx_v_loc); if (unlikely((__pyx_t_4 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 34; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_i = ((Py_ssize_t)__pyx_t_4); /* "util.pxd":35 * loc = casted * i = loc * sz = cnp.PyArray_SIZE(arr) # <<<<<<<<<<<<<< * * if i < 0 and sz > 0: */ __pyx_v_sz = PyArray_SIZE(__pyx_v_arr); /* "util.pxd":37 * sz = cnp.PyArray_SIZE(arr) * * if i < 0 and sz > 0: # <<<<<<<<<<<<<< * i += sz * elif i >= sz or sz == 0: */ __pyx_t_1 = ((__pyx_v_i < 0) != 0); if (__pyx_t_1) { __pyx_t_5 = ((__pyx_v_sz > 0) != 0); __pyx_t_6 = __pyx_t_5; } else { __pyx_t_6 = __pyx_t_1; } if (__pyx_t_6) { /* "util.pxd":38 * * if i < 0 and sz > 0: * i += sz # <<<<<<<<<<<<<< * elif i >= sz or sz == 0: * raise IndexError('index out of bounds') */ __pyx_v_i = (__pyx_v_i + __pyx_v_sz); goto __pyx_L5; } /* "util.pxd":39 * if i < 0 and sz > 0: * i += sz * elif i >= sz or sz == 0: # <<<<<<<<<<<<<< * raise IndexError('index out of bounds') * */ __pyx_t_6 = ((__pyx_v_i >= __pyx_v_sz) != 0); if (!__pyx_t_6) { __pyx_t_1 = ((__pyx_v_sz == 0) != 0); __pyx_t_5 = __pyx_t_1; } else { __pyx_t_5 = __pyx_t_6; } if (__pyx_t_5) { /* "util.pxd":40 * i += sz * elif i >= sz or sz == 0: * raise IndexError('index out of bounds') # <<<<<<<<<<<<<< * * return get_value_1d(arr, i) */ __pyx_t_3 = PyObject_Call(__pyx_builtin_IndexError, ((PyObject *)__pyx_k_tuple_4), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 40; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 40; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L5; } __pyx_L5:; /* "util.pxd":42 * raise IndexError('index out of bounds') * * return get_value_1d(arr, i) # <<<<<<<<<<<<<< * * cdef inline set_value_at(ndarray arr, object loc, object value): */ __Pyx_XDECREF(__pyx_r); __pyx_t_3 = get_value_1d(__pyx_v_arr, __pyx_v_i); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 42; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("util.get_value_at", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_casted); __Pyx_XDECREF(__pyx_v_loc); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "util.pxd":44 * return get_value_1d(arr, i) * * cdef inline set_value_at(ndarray arr, object loc, object value): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, sz */ static CYTHON_INLINE PyObject *__pyx_f_4util_set_value_at(PyArrayObject *__pyx_v_arr, PyObject *__pyx_v_loc, PyObject *__pyx_v_value) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_sz; PyObject *__pyx_v_casted = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; Py_ssize_t __pyx_t_4; int __pyx_t_5; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("set_value_at", 0); __Pyx_INCREF(__pyx_v_loc); /* "util.pxd":47 * cdef: * Py_ssize_t i, sz * if is_float_object(loc): # <<<<<<<<<<<<<< * casted = int(loc) * if casted == loc: */ __pyx_t_1 = (is_float_object(__pyx_v_loc) != 0); if (__pyx_t_1) { /* "util.pxd":48 * Py_ssize_t i, sz * if is_float_object(loc): * casted = int(loc) # <<<<<<<<<<<<<< * if casted == loc: * loc = casted */ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_loc); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_loc); __Pyx_GIVEREF(__pyx_v_loc); __pyx_t_3 = PyObject_Call(((PyObject *)((PyObject*)(&PyInt_Type))), ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __pyx_v_casted = __pyx_t_3; __pyx_t_3 = 0; /* "util.pxd":49 * if is_float_object(loc): * casted = int(loc) * if casted == loc: # <<<<<<<<<<<<<< * loc = casted * i = loc */ __pyx_t_3 = PyObject_RichCompare(__pyx_v_casted, __pyx_v_loc, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_1) { /* "util.pxd":50 * casted = int(loc) * if casted == loc: * loc = casted # <<<<<<<<<<<<<< * i = loc * sz = cnp.PyArray_SIZE(arr) */ __Pyx_INCREF(__pyx_v_casted); __Pyx_DECREF_SET(__pyx_v_loc, __pyx_v_casted); goto __pyx_L4; } __pyx_L4:; goto __pyx_L3; } __pyx_L3:; /* "util.pxd":51 * if casted == loc: * loc = casted * i = loc # <<<<<<<<<<<<<< * sz = cnp.PyArray_SIZE(arr) * */ __pyx_t_4 = __Pyx_PyIndex_AsSsize_t(__pyx_v_loc); if (unlikely((__pyx_t_4 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_i = ((Py_ssize_t)__pyx_t_4); /* "util.pxd":52 * loc = casted * i = loc * sz = cnp.PyArray_SIZE(arr) # <<<<<<<<<<<<<< * * if i < 0: */ __pyx_v_sz = PyArray_SIZE(__pyx_v_arr); /* "util.pxd":54 * sz = cnp.PyArray_SIZE(arr) * * if i < 0: # <<<<<<<<<<<<<< * i += sz * elif i >= sz: */ __pyx_t_1 = ((__pyx_v_i < 0) != 0); if (__pyx_t_1) { /* "util.pxd":55 * * if i < 0: * i += sz # <<<<<<<<<<<<<< * elif i >= sz: * raise IndexError('index out of bounds') */ __pyx_v_i = (__pyx_v_i + __pyx_v_sz); goto __pyx_L5; } /* "util.pxd":56 * if i < 0: * i += sz * elif i >= sz: # <<<<<<<<<<<<<< * raise IndexError('index out of bounds') * */ __pyx_t_1 = ((__pyx_v_i >= __pyx_v_sz) != 0); if (__pyx_t_1) { /* "util.pxd":57 * i += sz * elif i >= sz: * raise IndexError('index out of bounds') # <<<<<<<<<<<<<< * * assign_value_1d(arr, i, value) */ __pyx_t_3 = PyObject_Call(__pyx_builtin_IndexError, ((PyObject *)__pyx_k_tuple_5), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 57; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 57; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L5; } __pyx_L5:; /* "util.pxd":59 * raise IndexError('index out of bounds') * * assign_value_1d(arr, i, value) # <<<<<<<<<<<<<< * * cdef inline int is_contiguous(ndarray arr): */ __pyx_t_5 = assign_value_1d(__pyx_v_arr, __pyx_v_i, __pyx_v_value); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 59; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("util.set_value_at", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_casted); __Pyx_XDECREF(__pyx_v_loc); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "util.pxd":61 * assign_value_1d(arr, i, value) * * cdef inline int is_contiguous(ndarray arr): # <<<<<<<<<<<<<< * return cnp.PyArray_CHKFLAGS(arr, cnp.NPY_C_CONTIGUOUS) * */ static CYTHON_INLINE int __pyx_f_4util_is_contiguous(PyArrayObject *__pyx_v_arr) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("is_contiguous", 0); /* "util.pxd":62 * * cdef inline int is_contiguous(ndarray arr): * return cnp.PyArray_CHKFLAGS(arr, cnp.NPY_C_CONTIGUOUS) # <<<<<<<<<<<<<< * * cdef inline is_array(object o): */ __pyx_r = PyArray_CHKFLAGS(__pyx_v_arr, NPY_C_CONTIGUOUS); goto __pyx_L0; __pyx_r = 0; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "util.pxd":64 * return cnp.PyArray_CHKFLAGS(arr, cnp.NPY_C_CONTIGUOUS) * * cdef inline is_array(object o): # <<<<<<<<<<<<<< * return cnp.PyArray_Check(o) * */ static CYTHON_INLINE PyObject *__pyx_f_4util_is_array(PyObject *__pyx_v_o) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("is_array", 0); /* "util.pxd":65 * * cdef inline is_array(object o): * return cnp.PyArray_Check(o) # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyBool_FromLong(PyArray_Check(__pyx_v_o)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 65; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("util.is_array", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "util.pxd":68 * * * cdef inline bint _checknull(object val): # <<<<<<<<<<<<<< * try: * return val is None or (cpython.PyFloat_Check(val) and val != val) */ static CYTHON_INLINE int __pyx_f_4util__checknull(PyObject *__pyx_v_val) { 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; int __pyx_t_9; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_checknull", 0); /* "util.pxd":69 * * cdef inline bint _checknull(object val): * try: # <<<<<<<<<<<<<< * return val is None or (cpython.PyFloat_Check(val) and val != val) * except ValueError: */ { __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:*/ { /* "util.pxd":70 * cdef inline bint _checknull(object val): * try: * return val is None or (cpython.PyFloat_Check(val) and val != val) # <<<<<<<<<<<<<< * except ValueError: * return False */ __pyx_t_4 = (__pyx_v_val == Py_None); __pyx_t_5 = __Pyx_PyBool_FromLong(__pyx_t_4); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L3_error;} if (!__pyx_t_4) { __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_6 = __Pyx_PyBool_FromLong(PyFloat_Check(__pyx_v_val)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L3_error;} if (__pyx_t_4) { __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_7 = PyObject_RichCompare(__pyx_v_val, __pyx_v_val, Py_NE); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_t_8 = __pyx_t_7; __pyx_t_7 = 0; } else { __pyx_t_8 = __pyx_t_6; __pyx_t_6 = 0; } __pyx_t_6 = __pyx_t_8; __pyx_t_8 = 0; } else { __pyx_t_6 = __pyx_t_5; __pyx_t_5 = 0; } __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_r = __pyx_t_4; goto __pyx_L7_try_return; } __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L10_try_end; __pyx_L7_try_return:; __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); goto __pyx_L0; __pyx_L3_error:; __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; /* "util.pxd":71 * try: * return val is None or (cpython.PyFloat_Check(val) and val != val) * except ValueError: # <<<<<<<<<<<<<< * return False * */ __pyx_t_9 = PyErr_ExceptionMatches(__pyx_builtin_ValueError); if (__pyx_t_9) { __Pyx_AddTraceback("util._checknull", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_5, &__pyx_t_8) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 71; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_GOTREF(__pyx_t_5); __Pyx_GOTREF(__pyx_t_8); /* "util.pxd":72 * return val is None or (cpython.PyFloat_Check(val) and val != val) * except ValueError: * return False # <<<<<<<<<<<<<< * * cdef inline bint _checknull_old(object val): */ __pyx_r = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; goto __pyx_L6_except_return; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; goto __pyx_L4_exception_handled; } __pyx_L5_except_error:; __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); goto __pyx_L1_error; __pyx_L6_except_return:; __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); goto __pyx_L0; __pyx_L4_exception_handled:; __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); __pyx_L10_try_end:; } __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_WriteUnraisable("util._checknull", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "util.pxd":74 * return False * * cdef inline bint _checknull_old(object val): # <<<<<<<<<<<<<< * import numpy as np * cdef double INF = np.inf */ static CYTHON_INLINE int __pyx_f_4util__checknull_old(PyObject *__pyx_v_val) { PyObject *__pyx_v_np = NULL; double __pyx_v_INF; double __pyx_v_NEGINF; int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; double __pyx_t_2; 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; int __pyx_t_9; int __pyx_t_10; int __pyx_t_11; int __pyx_t_12; PyObject *__pyx_t_13 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_checknull_old", 0); /* "util.pxd":75 * * cdef inline bint _checknull_old(object val): * import numpy as np # <<<<<<<<<<<<<< * cdef double INF = np.inf * cdef double NEGINF = -INF */ __pyx_t_1 = __Pyx_Import(((PyObject *)__pyx_n_s__numpy), 0, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 75; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_v_np = __pyx_t_1; __pyx_t_1 = 0; /* "util.pxd":76 * cdef inline bint _checknull_old(object val): * import numpy as np * cdef double INF = np.inf # <<<<<<<<<<<<<< * cdef double NEGINF = -INF * try: */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_np, __pyx_n_s__inf); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 76; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __pyx_PyFloat_AsDouble(__pyx_t_1); if (unlikely((__pyx_t_2 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 76; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_INF = ((double)__pyx_t_2); /* "util.pxd":77 * import numpy as np * cdef double INF = np.inf * cdef double NEGINF = -INF # <<<<<<<<<<<<<< * try: * return bool(val is None or val != val and val != INF */ __pyx_v_NEGINF = (-__pyx_v_INF); /* "util.pxd":78 * cdef double INF = np.inf * cdef double NEGINF = -INF * try: # <<<<<<<<<<<<<< * return bool(val is None or val != val and val != INF * and val != NEGINF) */ { __Pyx_ExceptionSave(&__pyx_t_3, &__pyx_t_4, &__pyx_t_5); __Pyx_XGOTREF(__pyx_t_3); __Pyx_XGOTREF(__pyx_t_4); __Pyx_XGOTREF(__pyx_t_5); /*try:*/ { /* "util.pxd":79 * cdef double NEGINF = -INF * try: * return bool(val is None or val != val and val != INF # <<<<<<<<<<<<<< * and val != NEGINF) * except ValueError: */ __pyx_t_6 = (__pyx_v_val == Py_None); if (!__pyx_t_6) { __pyx_t_1 = PyObject_RichCompare(__pyx_v_val, __pyx_v_val, Py_NE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_7) { /* "util.pxd":80 * try: * return bool(val is None or val != val and val != INF * and val != NEGINF) # <<<<<<<<<<<<<< * except ValueError: * return False */ __pyx_t_1 = PyFloat_FromDouble(__pyx_v_INF); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 80; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_8 = PyObject_RichCompare(__pyx_v_val, __pyx_t_1, Py_NE); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (__pyx_t_9) { __pyx_t_8 = PyFloat_FromDouble(__pyx_v_NEGINF); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 80; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_1 = PyObject_RichCompare(__pyx_v_val, __pyx_t_8, Py_NE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 80; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 80; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_11 = __pyx_t_10; } else { __pyx_t_11 = __pyx_t_9; } __pyx_t_9 = __pyx_t_11; } else { __pyx_t_9 = __pyx_t_7; } __pyx_t_7 = __pyx_t_9; } else { __pyx_t_7 = __pyx_t_6; } __pyx_r = (!(!__pyx_t_7)); goto __pyx_L7_try_return; } __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; goto __pyx_L10_try_end; __pyx_L7_try_return:; __Pyx_XGIVEREF(__pyx_t_3); __Pyx_XGIVEREF(__pyx_t_4); __Pyx_XGIVEREF(__pyx_t_5); __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5); goto __pyx_L0; __pyx_L3_error:; __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; /* "util.pxd":81 * return bool(val is None or val != val and val != INF * and val != NEGINF) * except ValueError: # <<<<<<<<<<<<<< * return False * */ __pyx_t_12 = PyErr_ExceptionMatches(__pyx_builtin_ValueError); if (__pyx_t_12) { __Pyx_AddTraceback("util._checknull_old", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_8, &__pyx_t_13) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_GOTREF(__pyx_t_8); __Pyx_GOTREF(__pyx_t_13); /* "util.pxd":82 * and val != NEGINF) * except ValueError: * return False # <<<<<<<<<<<<<< * * cdef inline bint _checknan(object val): */ __pyx_r = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; goto __pyx_L6_except_return; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; goto __pyx_L4_exception_handled; } __pyx_L5_except_error:; __Pyx_XGIVEREF(__pyx_t_3); __Pyx_XGIVEREF(__pyx_t_4); __Pyx_XGIVEREF(__pyx_t_5); __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5); goto __pyx_L1_error; __pyx_L6_except_return:; __Pyx_XGIVEREF(__pyx_t_3); __Pyx_XGIVEREF(__pyx_t_4); __Pyx_XGIVEREF(__pyx_t_5); __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5); goto __pyx_L0; __pyx_L4_exception_handled:; __Pyx_XGIVEREF(__pyx_t_3); __Pyx_XGIVEREF(__pyx_t_4); __Pyx_XGIVEREF(__pyx_t_5); __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5); __pyx_L10_try_end:; } __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_13); __Pyx_WriteUnraisable("util._checknull_old", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_np); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "util.pxd":84 * return False * * cdef inline bint _checknan(object val): # <<<<<<<<<<<<<< * return not cnp.PyArray_Check(val) and val != val */ static CYTHON_INLINE int __pyx_f_4util__checknan(PyObject *__pyx_v_val) { int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_checknan", 0); /* "util.pxd":85 * * cdef inline bint _checknan(object val): * return not cnp.PyArray_Check(val) and val != val # <<<<<<<<<<<<<< */ __pyx_t_1 = __Pyx_PyBool_FromLong((!(PyArray_Check(__pyx_v_val) != 0))); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__pyx_t_2) { __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_3 = PyObject_RichCompare(__pyx_v_val, __pyx_v_val, Py_NE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_4 = __pyx_t_3; __pyx_t_3 = 0; } else { __pyx_t_4 = __pyx_t_1; __pyx_t_1 = 0; } __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_r = __pyx_t_2; goto __pyx_L0; __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_WriteUnraisable("util._checknan", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* 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)); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "numpy.pxd":196 * # 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 fullfill the PEP. */ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags) { int __pyx_v_copy_shape; 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_v_hasfields; int __pyx_r; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; int __pyx_t_5; int __pyx_t_6; int __pyx_t_7; PyObject *__pyx_t_8 = NULL; char *__pyx_t_9; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__getbuffer__", 0); if (__pyx_v_info != NULL) { __pyx_v_info->obj = Py_None; __Pyx_INCREF(Py_None); __Pyx_GIVEREF(__pyx_v_info->obj); } /* "numpy.pxd":202 * # of flags * * if info == NULL: return # <<<<<<<<<<<<<< * * cdef int copy_shape, i, ndim */ __pyx_t_1 = ((__pyx_v_info == NULL) != 0); if (__pyx_t_1) { __pyx_r = 0; goto __pyx_L0; goto __pyx_L3; } __pyx_L3:; /* "numpy.pxd":205 * * cdef int copy_shape, i, ndim * cdef int endian_detector = 1 # <<<<<<<<<<<<<< * cdef bint little_endian = ((&endian_detector)[0] != 0) * */ __pyx_v_endian_detector = 1; /* "numpy.pxd":206 * cdef int copy_shape, 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); /* "numpy.pxd":208 * cdef bint little_endian = ((&endian_detector)[0] != 0) * * ndim = PyArray_NDIM(self) # <<<<<<<<<<<<<< * * if sizeof(npy_intp) != sizeof(Py_ssize_t): */ __pyx_v_ndim = PyArray_NDIM(__pyx_v_self); /* "numpy.pxd":210 * ndim = PyArray_NDIM(self) * * if sizeof(npy_intp) != sizeof(Py_ssize_t): # <<<<<<<<<<<<<< * copy_shape = 1 * else: */ __pyx_t_1 = (((sizeof(npy_intp)) != (sizeof(Py_ssize_t))) != 0); if (__pyx_t_1) { /* "numpy.pxd":211 * * if sizeof(npy_intp) != sizeof(Py_ssize_t): * copy_shape = 1 # <<<<<<<<<<<<<< * else: * copy_shape = 0 */ __pyx_v_copy_shape = 1; goto __pyx_L4; } /*else*/ { /* "numpy.pxd":213 * copy_shape = 1 * else: * copy_shape = 0 # <<<<<<<<<<<<<< * * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) */ __pyx_v_copy_shape = 0; } __pyx_L4:; /* "numpy.pxd":215 * copy_shape = 0 * * 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_1 = (((__pyx_v_flags & PyBUF_C_CONTIGUOUS) == PyBUF_C_CONTIGUOUS) != 0); if (__pyx_t_1) { /* "numpy.pxd":216 * * 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_3 = __pyx_t_2; } else { __pyx_t_3 = __pyx_t_1; } if (__pyx_t_3) { /* "numpy.pxd":217 * 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_4 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_7), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 217; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 217; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L5; } __pyx_L5:; /* "numpy.pxd":219 * 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_3 = (((__pyx_v_flags & PyBUF_F_CONTIGUOUS) == PyBUF_F_CONTIGUOUS) != 0); if (__pyx_t_3) { /* "numpy.pxd":220 * * 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_1 = ((!(PyArray_CHKFLAGS(__pyx_v_self, NPY_F_CONTIGUOUS) != 0)) != 0); __pyx_t_2 = __pyx_t_1; } else { __pyx_t_2 = __pyx_t_3; } if (__pyx_t_2) { /* "numpy.pxd":221 * 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_4 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_9), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 221; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 221; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L6; } __pyx_L6:; /* "numpy.pxd":223 * raise ValueError(u"ndarray is not Fortran contiguous") * * info.buf = PyArray_DATA(self) # <<<<<<<<<<<<<< * info.ndim = ndim * if copy_shape: */ __pyx_v_info->buf = PyArray_DATA(__pyx_v_self); /* "numpy.pxd":224 * * info.buf = PyArray_DATA(self) * info.ndim = ndim # <<<<<<<<<<<<<< * if copy_shape: * # Allocate new buffer for strides and shape info. */ __pyx_v_info->ndim = __pyx_v_ndim; /* "numpy.pxd":225 * info.buf = PyArray_DATA(self) * info.ndim = ndim * if copy_shape: # <<<<<<<<<<<<<< * # Allocate new buffer for strides and shape info. * # This is allocated as one block, strides first. */ __pyx_t_2 = (__pyx_v_copy_shape != 0); if (__pyx_t_2) { /* "numpy.pxd":228 * # Allocate new buffer for strides and shape info. * # This is allocated as one block, strides first. * info.strides = stdlib.malloc(sizeof(Py_ssize_t) * ndim * 2) # <<<<<<<<<<<<<< * info.shape = info.strides + ndim * for i in range(ndim): */ __pyx_v_info->strides = ((Py_ssize_t *)malloc((((sizeof(Py_ssize_t)) * ((size_t)__pyx_v_ndim)) * 2))); /* "numpy.pxd":229 * # This is allocated as one block, strides first. * info.strides = stdlib.malloc(sizeof(Py_ssize_t) * ndim * 2) * 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); /* "numpy.pxd":230 * info.strides = stdlib.malloc(sizeof(Py_ssize_t) * ndim * 2) * 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_5 = __pyx_v_ndim; for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) { __pyx_v_i = __pyx_t_6; /* "numpy.pxd":231 * 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]); /* "numpy.pxd":232 * 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]); } goto __pyx_L7; } /*else*/ { /* "numpy.pxd":234 * info.shape[i] = PyArray_DIMS(self)[i] * else: * info.strides = PyArray_STRIDES(self) # <<<<<<<<<<<<<< * info.shape = PyArray_DIMS(self) * info.suboffsets = NULL */ __pyx_v_info->strides = ((Py_ssize_t *)PyArray_STRIDES(__pyx_v_self)); /* "numpy.pxd":235 * 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_L7:; /* "numpy.pxd":236 * 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; /* "numpy.pxd":237 * 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); /* "numpy.pxd":238 * 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)); /* "numpy.pxd":241 * * cdef int t * cdef char* f = NULL # <<<<<<<<<<<<<< * cdef dtype descr = self.descr * cdef list stack */ __pyx_v_f = NULL; /* "numpy.pxd":242 * cdef int t * cdef char* f = NULL * cdef dtype descr = self.descr # <<<<<<<<<<<<<< * cdef list stack * cdef int offset */ __pyx_t_4 = ((PyObject *)__pyx_v_self->descr); __Pyx_INCREF(__pyx_t_4); __pyx_v_descr = ((PyArray_Descr *)__pyx_t_4); __pyx_t_4 = 0; /* "numpy.pxd":246 * cdef int offset * * cdef bint hasfields = PyDataType_HASFIELDS(descr) # <<<<<<<<<<<<<< * * if not hasfields and not copy_shape: */ __pyx_v_hasfields = PyDataType_HASFIELDS(__pyx_v_descr); /* "numpy.pxd":248 * cdef bint hasfields = PyDataType_HASFIELDS(descr) * * if not hasfields and not copy_shape: # <<<<<<<<<<<<<< * # do not call releasebuffer * info.obj = None */ __pyx_t_2 = ((!(__pyx_v_hasfields != 0)) != 0); if (__pyx_t_2) { __pyx_t_3 = ((!(__pyx_v_copy_shape != 0)) != 0); __pyx_t_1 = __pyx_t_3; } else { __pyx_t_1 = __pyx_t_2; } if (__pyx_t_1) { /* "numpy.pxd":250 * if not hasfields and not copy_shape: * # do not call releasebuffer * info.obj = None # <<<<<<<<<<<<<< * else: * # need to call releasebuffer */ __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_info->obj); __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = Py_None; goto __pyx_L10; } /*else*/ { /* "numpy.pxd":253 * else: * # need to call releasebuffer * info.obj = self # <<<<<<<<<<<<<< * * if not hasfields: */ __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); } __pyx_L10:; /* "numpy.pxd":255 * info.obj = self * * if not hasfields: # <<<<<<<<<<<<<< * t = descr.type_num * if ((descr.byteorder == '>' and little_endian) or */ __pyx_t_1 = ((!(__pyx_v_hasfields != 0)) != 0); if (__pyx_t_1) { /* "numpy.pxd":256 * * if not hasfields: * t = descr.type_num # <<<<<<<<<<<<<< * if ((descr.byteorder == '>' and little_endian) or * (descr.byteorder == '<' and not little_endian)): */ __pyx_t_5 = __pyx_v_descr->type_num; __pyx_v_t = __pyx_t_5; /* "numpy.pxd":257 * if not hasfields: * t = descr.type_num * if ((descr.byteorder == '>' and little_endian) or # <<<<<<<<<<<<<< * (descr.byteorder == '<' and not little_endian)): * raise ValueError(u"Non-native byte order not supported") */ __pyx_t_1 = ((__pyx_v_descr->byteorder == '>') != 0); if (__pyx_t_1) { __pyx_t_2 = (__pyx_v_little_endian != 0); } else { __pyx_t_2 = __pyx_t_1; } if (!__pyx_t_2) { /* "numpy.pxd":258 * t = descr.type_num * if ((descr.byteorder == '>' and little_endian) or * (descr.byteorder == '<' and not little_endian)): # <<<<<<<<<<<<<< * raise ValueError(u"Non-native byte order not supported") * if t == NPY_BYTE: f = "b" */ __pyx_t_1 = ((__pyx_v_descr->byteorder == '<') != 0); if (__pyx_t_1) { __pyx_t_3 = ((!(__pyx_v_little_endian != 0)) != 0); __pyx_t_7 = __pyx_t_3; } else { __pyx_t_7 = __pyx_t_1; } __pyx_t_1 = __pyx_t_7; } else { __pyx_t_1 = __pyx_t_2; } if (__pyx_t_1) { /* "numpy.pxd":259 * if ((descr.byteorder == '>' and little_endian) or * (descr.byteorder == '<' 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_4 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_11), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 259; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 259; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L12; } __pyx_L12:; /* "numpy.pxd":276 * 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) */ switch (__pyx_v_t) { /* "numpy.pxd":260 * (descr.byteorder == '<' 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" */ case NPY_BYTE: __pyx_v_f = __pyx_k__b; break; /* "numpy.pxd":261 * 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 = __pyx_k__B; break; /* "numpy.pxd":262 * 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 = __pyx_k__h; break; /* "numpy.pxd":263 * 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 = __pyx_k__H; break; /* "numpy.pxd":264 * 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 = __pyx_k__i; break; /* "numpy.pxd":265 * 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 = __pyx_k__I; break; /* "numpy.pxd":266 * 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 = __pyx_k__l; break; /* "numpy.pxd":267 * 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 = __pyx_k__L; break; /* "numpy.pxd":268 * 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 = __pyx_k__q; break; /* "numpy.pxd":269 * 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 = __pyx_k__Q; break; /* "numpy.pxd":270 * 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 = __pyx_k__f; break; /* "numpy.pxd":271 * 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 = __pyx_k__d; break; /* "numpy.pxd":272 * 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 = __pyx_k__g; break; /* "numpy.pxd":273 * 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 = __pyx_k__Zf; break; /* "numpy.pxd":274 * 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 = __pyx_k__Zd; break; /* "numpy.pxd":275 * 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 = __pyx_k__Zg; break; /* "numpy.pxd":276 * 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 = __pyx_k__O; break; default: /* "numpy.pxd":278 * elif t == NPY_OBJECT: f = "O" * else: * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) # <<<<<<<<<<<<<< * info.format = f * return */ __pyx_t_4 = PyInt_FromLong(__pyx_v_t); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 278; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_8 = PyNumber_Remainder(((PyObject *)__pyx_kp_u_12), __pyx_t_4); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 278; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_8)); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 278; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_t_8)); __Pyx_GIVEREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0; __pyx_t_8 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 278; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __Pyx_Raise(__pyx_t_8, 0, 0, 0); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; {__pyx_filename = __pyx_f[2]; __pyx_lineno = 278; __pyx_clineno = __LINE__; goto __pyx_L1_error;} break; } /* "numpy.pxd":279 * else: * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) * info.format = f # <<<<<<<<<<<<<< * return * else: */ __pyx_v_info->format = __pyx_v_f; /* "numpy.pxd":280 * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) * info.format = f * return # <<<<<<<<<<<<<< * else: * info.format = stdlib.malloc(_buffer_format_string_len) */ __pyx_r = 0; goto __pyx_L0; goto __pyx_L11; } /*else*/ { /* "numpy.pxd":282 * return * else: * info.format = stdlib.malloc(_buffer_format_string_len) # <<<<<<<<<<<<<< * info.format[0] = '^' # Native data types, manual alignment * offset = 0 */ __pyx_v_info->format = ((char *)malloc(255)); /* "numpy.pxd":283 * else: * info.format = stdlib.malloc(_buffer_format_string_len) * info.format[0] = '^' # Native data types, manual alignment # <<<<<<<<<<<<<< * offset = 0 * f = _util_dtypestring(descr, info.format + 1, */ (__pyx_v_info->format[0]) = '^'; /* "numpy.pxd":284 * info.format = stdlib.malloc(_buffer_format_string_len) * info.format[0] = '^' # Native data types, manual alignment * offset = 0 # <<<<<<<<<<<<<< * f = _util_dtypestring(descr, info.format + 1, * info.format + _buffer_format_string_len, */ __pyx_v_offset = 0; /* "numpy.pxd":287 * f = _util_dtypestring(descr, info.format + 1, * info.format + _buffer_format_string_len, * &offset) # <<<<<<<<<<<<<< * f[0] = 0 # Terminate format string * */ __pyx_t_9 = __pyx_f_5numpy__util_dtypestring(__pyx_v_descr, (__pyx_v_info->format + 1), (__pyx_v_info->format + 255), (&__pyx_v_offset)); if (unlikely(__pyx_t_9 == NULL)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 285; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_f = __pyx_t_9; /* "numpy.pxd":288 * info.format + _buffer_format_string_len, * &offset) * f[0] = 0 # Terminate format string # <<<<<<<<<<<<<< * * def __releasebuffer__(ndarray self, Py_buffer* info): */ (__pyx_v_f[0]) = 0; } __pyx_L11:; __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_8); __Pyx_AddTraceback("numpy.ndarray.__getbuffer__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; if (__pyx_v_info != NULL && __pyx_v_info->obj != NULL) { __Pyx_GOTREF(__pyx_v_info->obj); __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = NULL; } goto __pyx_L2; __pyx_L0:; if (__pyx_v_info != NULL && __pyx_v_info->obj == Py_None) { __Pyx_GOTREF(Py_None); __Pyx_DECREF(Py_None); __pyx_v_info->obj = NULL; } __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_descr); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* 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)); __Pyx_RefNannyFinishContext(); } /* "numpy.pxd":290 * f[0] = 0 # Terminate format string * * def __releasebuffer__(ndarray self, Py_buffer* info): # <<<<<<<<<<<<<< * if PyArray_HASFIELDS(self): * stdlib.free(info.format) */ 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); /* "numpy.pxd":291 * * def __releasebuffer__(ndarray self, Py_buffer* info): * if PyArray_HASFIELDS(self): # <<<<<<<<<<<<<< * stdlib.free(info.format) * if sizeof(npy_intp) != sizeof(Py_ssize_t): */ __pyx_t_1 = (PyArray_HASFIELDS(__pyx_v_self) != 0); if (__pyx_t_1) { /* "numpy.pxd":292 * def __releasebuffer__(ndarray self, Py_buffer* info): * if PyArray_HASFIELDS(self): * stdlib.free(info.format) # <<<<<<<<<<<<<< * if sizeof(npy_intp) != sizeof(Py_ssize_t): * stdlib.free(info.strides) */ free(__pyx_v_info->format); goto __pyx_L3; } __pyx_L3:; /* "numpy.pxd":293 * if PyArray_HASFIELDS(self): * stdlib.free(info.format) * if sizeof(npy_intp) != sizeof(Py_ssize_t): # <<<<<<<<<<<<<< * stdlib.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) { /* "numpy.pxd":294 * stdlib.free(info.format) * if sizeof(npy_intp) != sizeof(Py_ssize_t): * stdlib.free(info.strides) # <<<<<<<<<<<<<< * # info.shape was stored after info.strides in the same block * */ free(__pyx_v_info->strides); goto __pyx_L4; } __pyx_L4:; __Pyx_RefNannyFinishContext(); } /* "numpy.pxd":772 * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PyArray_MultiIterNew1", 0); /* "numpy.pxd":773 * * 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_filename = __pyx_f[2]; __pyx_lineno = 773; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __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; } /* "numpy.pxd":775 * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PyArray_MultiIterNew2", 0); /* "numpy.pxd":776 * * 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_filename = __pyx_f[2]; __pyx_lineno = 776; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __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; } /* "numpy.pxd":778 * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PyArray_MultiIterNew3", 0); /* "numpy.pxd":779 * * 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_filename = __pyx_f[2]; __pyx_lineno = 779; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __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; } /* "numpy.pxd":781 * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PyArray_MultiIterNew4", 0); /* "numpy.pxd":782 * * 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_filename = __pyx_f[2]; __pyx_lineno = 782; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __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; } /* "numpy.pxd":784 * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PyArray_MultiIterNew5", 0); /* "numpy.pxd":785 * * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): * return PyArray_MultiIterNew(5, a, b, c, d, e) # <<<<<<<<<<<<<< * * cdef inline char* _util_dtypestring(dtype descr, char* f, char* end, int* offset) except NULL: */ __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_filename = __pyx_f[2]; __pyx_lineno = 785; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __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; } /* "numpy.pxd":787 * return PyArray_MultiIterNew(5, a, b, c, d, e) * * 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; PyObject *__pyx_t_5 = NULL; PyObject *(*__pyx_t_6)(PyObject *); int __pyx_t_7; int __pyx_t_8; int __pyx_t_9; int __pyx_t_10; long __pyx_t_11; char *__pyx_t_12; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_util_dtypestring", 0); /* "numpy.pxd":794 * cdef int delta_offset * cdef tuple i * cdef int endian_detector = 1 # <<<<<<<<<<<<<< * cdef bint little_endian = ((&endian_detector)[0] != 0) * cdef tuple fields */ __pyx_v_endian_detector = 1; /* "numpy.pxd":795 * cdef tuple i * 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); /* "numpy.pxd":798 * cdef tuple fields * * for childname in descr.names: # <<<<<<<<<<<<<< * fields = descr.fields[childname] * child, new_offset = fields */ if (unlikely(((PyObject *)__pyx_v_descr->names) == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 798; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_1 = ((PyObject *)__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_COMPILING_IN_CPYTHON __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_filename = __pyx_f[2]; __pyx_lineno = 798; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 798; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif __Pyx_XDECREF_SET(__pyx_v_childname, __pyx_t_3); __pyx_t_3 = 0; /* "numpy.pxd":799 * * for childname in descr.names: * fields = descr.fields[childname] # <<<<<<<<<<<<<< * child, new_offset = fields * */ __pyx_t_3 = PyObject_GetItem(__pyx_v_descr->fields, __pyx_v_childname); if (!__pyx_t_3) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 799; __pyx_clineno = __LINE__; goto __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 tuple, got %.200s", Py_TYPE(__pyx_t_3)->tp_name), 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 799; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_XDECREF_SET(__pyx_v_fields, ((PyObject*)__pyx_t_3)); __pyx_t_3 = 0; /* "numpy.pxd":800 * for childname in descr.names: * fields = descr.fields[childname] * child, new_offset = fields # <<<<<<<<<<<<<< * * if (end - f) - (new_offset - offset[0]) < 15: */ if (likely(PyTuple_CheckExact(((PyObject *)__pyx_v_fields)))) { PyObject* sequence = ((PyObject *)__pyx_v_fields); #if CYTHON_COMPILING_IN_CPYTHON Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 800; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON __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_filename = __pyx_f[2]; __pyx_lineno = 800; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 800; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); #endif } else if (1) { __Pyx_RaiseNoneNotIterableError(); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 800; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } else { Py_ssize_t index = -1; __pyx_t_5 = PyObject_GetIter(((PyObject *)__pyx_v_fields)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 800; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = Py_TYPE(__pyx_t_5)->tp_iternext; index = 0; __pyx_t_3 = __pyx_t_6(__pyx_t_5); if (unlikely(!__pyx_t_3)) goto __pyx_L5_unpacking_failed; __Pyx_GOTREF(__pyx_t_3); index = 1; __pyx_t_4 = __pyx_t_6(__pyx_t_5); if (unlikely(!__pyx_t_4)) goto __pyx_L5_unpacking_failed; __Pyx_GOTREF(__pyx_t_4); if (__Pyx_IternextUnpackEndCheck(__pyx_t_6(__pyx_t_5), 2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 800; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_6 = NULL; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; goto __pyx_L6_unpacking_done; __pyx_L5_unpacking_failed:; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_6 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 800; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_L6_unpacking_done:; } if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_dtype))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 800; __pyx_clineno = __LINE__; goto __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; /* "numpy.pxd":802 * 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 = PyInt_FromLong((__pyx_v_end - __pyx_v_f)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 802; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = PyInt_FromLong((__pyx_v_offset[0])); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 802; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = PyNumber_Subtract(__pyx_v_new_offset, __pyx_t_3); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 802; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyNumber_Subtract(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 802; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyObject_RichCompare(__pyx_t_3, __pyx_int_15, Py_LT); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 802; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 802; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_7) { /* "numpy.pxd":803 * * if (end - f) - (new_offset - offset[0]) < 15: * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") # <<<<<<<<<<<<<< * * if ((child.byteorder == '>' and little_endian) or */ __pyx_t_5 = PyObject_Call(__pyx_builtin_RuntimeError, ((PyObject *)__pyx_k_tuple_14), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 803; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_Raise(__pyx_t_5, 0, 0, 0); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; {__pyx_filename = __pyx_f[2]; __pyx_lineno = 803; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L7; } __pyx_L7:; /* "numpy.pxd":805 * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") * * if ((child.byteorder == '>' and little_endian) or # <<<<<<<<<<<<<< * (child.byteorder == '<' 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) { __pyx_t_8 = (__pyx_v_little_endian != 0); } else { __pyx_t_8 = __pyx_t_7; } if (!__pyx_t_8) { /* "numpy.pxd":806 * * if ((child.byteorder == '>' and little_endian) or * (child.byteorder == '<' 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) { __pyx_t_9 = ((!(__pyx_v_little_endian != 0)) != 0); __pyx_t_10 = __pyx_t_9; } else { __pyx_t_10 = __pyx_t_7; } __pyx_t_7 = __pyx_t_10; } else { __pyx_t_7 = __pyx_t_8; } if (__pyx_t_7) { /* "numpy.pxd":807 * if ((child.byteorder == '>' and little_endian) or * (child.byteorder == '<' 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_5 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_15), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 807; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_Raise(__pyx_t_5, 0, 0, 0); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; {__pyx_filename = __pyx_f[2]; __pyx_lineno = 807; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L8; } __pyx_L8:; /* "numpy.pxd":817 * * # Output padding bytes * while offset[0] < new_offset: # <<<<<<<<<<<<<< * f[0] = 120 # "x"; pad byte * f += 1 */ while (1) { __pyx_t_5 = PyInt_FromLong((__pyx_v_offset[0])); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 817; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = PyObject_RichCompare(__pyx_t_5, __pyx_v_new_offset, Py_LT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 817; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 817; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (!__pyx_t_7) break; /* "numpy.pxd":818 * # Output padding bytes * while offset[0] < new_offset: * f[0] = 120 # "x"; pad byte # <<<<<<<<<<<<<< * f += 1 * offset[0] += 1 */ (__pyx_v_f[0]) = 120; /* "numpy.pxd":819 * while offset[0] < new_offset: * f[0] = 120 # "x"; pad byte * f += 1 # <<<<<<<<<<<<<< * offset[0] += 1 * */ __pyx_v_f = (__pyx_v_f + 1); /* "numpy.pxd":820 * f[0] = 120 # "x"; pad byte * f += 1 * offset[0] += 1 # <<<<<<<<<<<<<< * * offset[0] += child.itemsize */ __pyx_t_11 = 0; (__pyx_v_offset[__pyx_t_11]) = ((__pyx_v_offset[__pyx_t_11]) + 1); } /* "numpy.pxd":822 * offset[0] += 1 * * offset[0] += child.itemsize # <<<<<<<<<<<<<< * * if not PyDataType_HASFIELDS(child): */ __pyx_t_11 = 0; (__pyx_v_offset[__pyx_t_11]) = ((__pyx_v_offset[__pyx_t_11]) + __pyx_v_child->elsize); /* "numpy.pxd":824 * offset[0] += child.itemsize * * if not PyDataType_HASFIELDS(child): # <<<<<<<<<<<<<< * t = child.type_num * if end - f < 5: */ __pyx_t_7 = ((!(PyDataType_HASFIELDS(__pyx_v_child) != 0)) != 0); if (__pyx_t_7) { /* "numpy.pxd":825 * * if not PyDataType_HASFIELDS(child): * t = child.type_num # <<<<<<<<<<<<<< * if end - f < 5: * raise RuntimeError(u"Format string allocated too short.") */ __pyx_t_3 = PyInt_FromLong(__pyx_v_child->type_num); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 825; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_XDECREF_SET(__pyx_v_t, __pyx_t_3); __pyx_t_3 = 0; /* "numpy.pxd":826 * if not PyDataType_HASFIELDS(child): * t = child.type_num * if end - f < 5: # <<<<<<<<<<<<<< * raise RuntimeError(u"Format string allocated too short.") * */ __pyx_t_7 = (((__pyx_v_end - __pyx_v_f) < 5) != 0); if (__pyx_t_7) { /* "numpy.pxd":827 * 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_3 = PyObject_Call(__pyx_builtin_RuntimeError, ((PyObject *)__pyx_k_tuple_17), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 827; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 827; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L12; } __pyx_L12:; /* "numpy.pxd":830 * * # 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_3 = PyInt_FromLong(NPY_BYTE); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 830; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 830; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 830; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_7) { (__pyx_v_f[0]) = 98; goto __pyx_L13; } /* "numpy.pxd":831 * # 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_5 = PyInt_FromLong(NPY_UBYTE); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 831; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 831; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 831; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_7) { (__pyx_v_f[0]) = 66; goto __pyx_L13; } /* "numpy.pxd":832 * 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_3 = PyInt_FromLong(NPY_SHORT); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 832; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 832; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 832; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_7) { (__pyx_v_f[0]) = 104; goto __pyx_L13; } /* "numpy.pxd":833 * 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_5 = PyInt_FromLong(NPY_USHORT); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 833; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 833; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 833; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_7) { (__pyx_v_f[0]) = 72; goto __pyx_L13; } /* "numpy.pxd":834 * 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_3 = PyInt_FromLong(NPY_INT); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 834; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 834; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 834; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_7) { (__pyx_v_f[0]) = 105; goto __pyx_L13; } /* "numpy.pxd":835 * 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_5 = PyInt_FromLong(NPY_UINT); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 835; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 835; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 835; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_7) { (__pyx_v_f[0]) = 73; goto __pyx_L13; } /* "numpy.pxd":836 * 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_3 = PyInt_FromLong(NPY_LONG); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 836; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 836; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 836; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_7) { (__pyx_v_f[0]) = 108; goto __pyx_L13; } /* "numpy.pxd":837 * 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_5 = PyInt_FromLong(NPY_ULONG); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 837; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 837; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 837; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_7) { (__pyx_v_f[0]) = 76; goto __pyx_L13; } /* "numpy.pxd":838 * 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_3 = PyInt_FromLong(NPY_LONGLONG); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 838; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 838; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 838; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_7) { (__pyx_v_f[0]) = 113; goto __pyx_L13; } /* "numpy.pxd":839 * 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_5 = PyInt_FromLong(NPY_ULONGLONG); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 839; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 839; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 839; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_7) { (__pyx_v_f[0]) = 81; goto __pyx_L13; } /* "numpy.pxd":840 * 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_3 = PyInt_FromLong(NPY_FLOAT); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 840; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 840; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 840; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_7) { (__pyx_v_f[0]) = 102; goto __pyx_L13; } /* "numpy.pxd":841 * 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_5 = PyInt_FromLong(NPY_DOUBLE); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 841; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 841; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 841; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_7) { (__pyx_v_f[0]) = 100; goto __pyx_L13; } /* "numpy.pxd":842 * 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_3 = PyInt_FromLong(NPY_LONGDOUBLE); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 842; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 842; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 842; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_7) { (__pyx_v_f[0]) = 103; goto __pyx_L13; } /* "numpy.pxd":843 * 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_5 = PyInt_FromLong(NPY_CFLOAT); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 843; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 843; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 843; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_7) { (__pyx_v_f[0]) = 90; (__pyx_v_f[1]) = 102; __pyx_v_f = (__pyx_v_f + 1); goto __pyx_L13; } /* "numpy.pxd":844 * 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_3 = PyInt_FromLong(NPY_CDOUBLE); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 844; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 844; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 844; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_7) { (__pyx_v_f[0]) = 90; (__pyx_v_f[1]) = 100; __pyx_v_f = (__pyx_v_f + 1); goto __pyx_L13; } /* "numpy.pxd":845 * 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_5 = PyInt_FromLong(NPY_CLONGDOUBLE); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 845; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 845; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 845; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_7) { (__pyx_v_f[0]) = 90; (__pyx_v_f[1]) = 103; __pyx_v_f = (__pyx_v_f + 1); goto __pyx_L13; } /* "numpy.pxd":846 * 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_3 = PyInt_FromLong(NPY_OBJECT); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 846; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 846; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 846; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_7) { (__pyx_v_f[0]) = 79; goto __pyx_L13; } /*else*/ { /* "numpy.pxd":848 * elif t == NPY_OBJECT: f[0] = 79 #"O" * else: * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) # <<<<<<<<<<<<<< * f += 1 * else: */ __pyx_t_5 = PyNumber_Remainder(((PyObject *)__pyx_kp_u_12), __pyx_v_t); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 848; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_5)); __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 848; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_t_5)); __Pyx_GIVEREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; __pyx_t_5 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 848; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; __Pyx_Raise(__pyx_t_5, 0, 0, 0); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; {__pyx_filename = __pyx_f[2]; __pyx_lineno = 848; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_L13:; /* "numpy.pxd":849 * 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); goto __pyx_L11; } /*else*/ { /* "numpy.pxd":853 * # Cython ignores struct boundary information ("T{...}"), * # so don't output it * f = _util_dtypestring(child, f, end, offset) # <<<<<<<<<<<<<< * return f * */ __pyx_t_12 = __pyx_f_5numpy__util_dtypestring(__pyx_v_child, __pyx_v_f, __pyx_v_end, __pyx_v_offset); if (unlikely(__pyx_t_12 == NULL)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 853; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_f = __pyx_t_12; } __pyx_L11:; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "numpy.pxd":854 * # so don't output it * f = _util_dtypestring(child, f, end, offset) * return f # <<<<<<<<<<<<<< * * */ __pyx_r = __pyx_v_f; goto __pyx_L0; __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("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; } /* "numpy.pxd":969 * * * 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); /* "numpy.pxd":971 * 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) { /* "numpy.pxd":972 * cdef PyObject* baseptr * if base is None: * baseptr = NULL # <<<<<<<<<<<<<< * else: * Py_INCREF(base) # important to do this before decref below! */ __pyx_v_baseptr = NULL; goto __pyx_L3; } /*else*/ { /* "numpy.pxd":974 * baseptr = NULL * else: * Py_INCREF(base) # important to do this before decref below! # <<<<<<<<<<<<<< * baseptr = base * Py_XDECREF(arr.base) */ Py_INCREF(__pyx_v_base); /* "numpy.pxd":975 * 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:; /* "numpy.pxd":976 * 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); /* "numpy.pxd":977 * baseptr = base * Py_XDECREF(arr.base) * arr.base = baseptr # <<<<<<<<<<<<<< * * cdef inline object get_array_base(ndarray arr): */ __pyx_v_arr->base = __pyx_v_baseptr; __Pyx_RefNannyFinishContext(); } /* "numpy.pxd":979 * 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); /* "numpy.pxd":980 * * 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) { /* "numpy.pxd":981 * cdef inline object get_array_base(ndarray arr): * if arr.base is NULL: * return None # <<<<<<<<<<<<<< * else: * return arr.base */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(Py_None); __pyx_r = Py_None; goto __pyx_L0; goto __pyx_L3; } /*else*/ { /* "numpy.pxd":983 * return None * else: * return arr.base # <<<<<<<<<<<<<< */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_arr->base)); __pyx_r = ((PyObject *)__pyx_v_arr->base); goto __pyx_L0; } __pyx_L3:; __pyx_r = Py_None; __Pyx_INCREF(Py_None); __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_tp_new_6pandas_9hashtable_Factorizer(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { struct __pyx_obj_6pandas_9hashtable_Factorizer *p; PyObject *o; o = (*t->tp_alloc)(t, 0); if (unlikely(!o)) return 0; p = ((struct __pyx_obj_6pandas_9hashtable_Factorizer *)o); p->table = ((struct __pyx_obj_6pandas_9hashtable_PyObjectHashTable *)Py_None); Py_INCREF(Py_None); p->uniques = ((struct __pyx_obj_6pandas_9hashtable_ObjectVector *)Py_None); Py_INCREF(Py_None); return o; } static void __pyx_tp_dealloc_6pandas_9hashtable_Factorizer(PyObject *o) { struct __pyx_obj_6pandas_9hashtable_Factorizer *p = (struct __pyx_obj_6pandas_9hashtable_Factorizer *)o; PyObject_GC_UnTrack(o); Py_CLEAR(p->table); Py_CLEAR(p->uniques); (*Py_TYPE(o)->tp_free)(o); } static int __pyx_tp_traverse_6pandas_9hashtable_Factorizer(PyObject *o, visitproc v, void *a) { int e; struct __pyx_obj_6pandas_9hashtable_Factorizer *p = (struct __pyx_obj_6pandas_9hashtable_Factorizer *)o; if (p->table) { e = (*v)(((PyObject*)p->table), a); if (e) return e; } if (p->uniques) { e = (*v)(((PyObject*)p->uniques), a); if (e) return e; } return 0; } static int __pyx_tp_clear_6pandas_9hashtable_Factorizer(PyObject *o) { struct __pyx_obj_6pandas_9hashtable_Factorizer *p = (struct __pyx_obj_6pandas_9hashtable_Factorizer *)o; PyObject* tmp; tmp = ((PyObject*)p->table); p->table = ((struct __pyx_obj_6pandas_9hashtable_PyObjectHashTable *)Py_None); Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->uniques); p->uniques = ((struct __pyx_obj_6pandas_9hashtable_ObjectVector *)Py_None); Py_INCREF(Py_None); Py_XDECREF(tmp); return 0; } static PyObject *__pyx_getprop_6pandas_9hashtable_10Factorizer_table(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6pandas_9hashtable_10Factorizer_5table_1__get__(o); } static int __pyx_setprop_6pandas_9hashtable_10Factorizer_table(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { return __pyx_pw_6pandas_9hashtable_10Factorizer_5table_3__set__(o, v); } else { return __pyx_pw_6pandas_9hashtable_10Factorizer_5table_5__del__(o); } } static PyObject *__pyx_getprop_6pandas_9hashtable_10Factorizer_uniques(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6pandas_9hashtable_10Factorizer_7uniques_1__get__(o); } static int __pyx_setprop_6pandas_9hashtable_10Factorizer_uniques(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { return __pyx_pw_6pandas_9hashtable_10Factorizer_7uniques_3__set__(o, v); } else { return __pyx_pw_6pandas_9hashtable_10Factorizer_7uniques_5__del__(o); } } static PyObject *__pyx_getprop_6pandas_9hashtable_10Factorizer_count(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6pandas_9hashtable_10Factorizer_5count_1__get__(o); } static int __pyx_setprop_6pandas_9hashtable_10Factorizer_count(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { return __pyx_pw_6pandas_9hashtable_10Factorizer_5count_3__set__(o, v); } else { PyErr_SetString(PyExc_NotImplementedError, "__del__"); return -1; } } static PyMethodDef __pyx_methods_6pandas_9hashtable_Factorizer[] = { {__Pyx_NAMESTR("get_count"), (PyCFunction)__pyx_pw_6pandas_9hashtable_10Factorizer_3get_count, METH_NOARGS, __Pyx_DOCSTR(0)}, {__Pyx_NAMESTR("factorize"), (PyCFunction)__pyx_pw_6pandas_9hashtable_10Factorizer_5factorize, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}, {__Pyx_NAMESTR("unique"), (PyCFunction)__pyx_pw_6pandas_9hashtable_10Factorizer_7unique, METH_O, __Pyx_DOCSTR(0)}, {0, 0, 0, 0} }; static struct PyGetSetDef __pyx_getsets_6pandas_9hashtable_Factorizer[] = { {(char *)"table", __pyx_getprop_6pandas_9hashtable_10Factorizer_table, __pyx_setprop_6pandas_9hashtable_10Factorizer_table, 0, 0}, {(char *)"uniques", __pyx_getprop_6pandas_9hashtable_10Factorizer_uniques, __pyx_setprop_6pandas_9hashtable_10Factorizer_uniques, 0, 0}, {(char *)"count", __pyx_getprop_6pandas_9hashtable_10Factorizer_count, __pyx_setprop_6pandas_9hashtable_10Factorizer_count, 0, 0}, {0, 0, 0, 0, 0} }; static PyTypeObject __pyx_type_6pandas_9hashtable_Factorizer = { PyVarObject_HEAD_INIT(0, 0) __Pyx_NAMESTR("pandas.hashtable.Factorizer"), /*tp_name*/ sizeof(struct __pyx_obj_6pandas_9hashtable_Factorizer), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_6pandas_9hashtable_Factorizer, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #else 0, /*reserved*/ #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*/ 0, /*tp_doc*/ __pyx_tp_traverse_6pandas_9hashtable_Factorizer, /*tp_traverse*/ __pyx_tp_clear_6pandas_9hashtable_Factorizer, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_6pandas_9hashtable_Factorizer, /*tp_methods*/ 0, /*tp_members*/ __pyx_getsets_6pandas_9hashtable_Factorizer, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ __pyx_pw_6pandas_9hashtable_10Factorizer_1__init__, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_6pandas_9hashtable_Factorizer, /*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*/ #if PY_VERSION_HEX >= 0x02060000 0, /*tp_version_tag*/ #endif #if PY_VERSION_HEX >= 0x030400a1 && defined(Py_TPFLAGS_HAVE_FINALIZE) 0, /*tp_finalize*/ #endif }; static PyObject *__pyx_tp_new_6pandas_9hashtable_HashTable(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { PyObject *o; o = (*t->tp_alloc)(t, 0); if (unlikely(!o)) return 0; return o; } static void __pyx_tp_dealloc_6pandas_9hashtable_HashTable(PyObject *o) { (*Py_TYPE(o)->tp_free)(o); } static PyMethodDef __pyx_methods_6pandas_9hashtable_HashTable[] = { {0, 0, 0, 0} }; static PyTypeObject __pyx_type_6pandas_9hashtable_HashTable = { PyVarObject_HEAD_INIT(0, 0) __Pyx_NAMESTR("pandas.hashtable.HashTable"), /*tp_name*/ sizeof(struct __pyx_obj_6pandas_9hashtable_HashTable), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_6pandas_9hashtable_HashTable, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #else 0, /*reserved*/ #endif 0, /*tp_repr*/ 0, /*tp_as_number*/ 0, /*tp_as_sequence*/ 0, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/ 0, /*tp_doc*/ 0, /*tp_traverse*/ 0, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_6pandas_9hashtable_HashTable, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_6pandas_9hashtable_HashTable, /*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*/ #if PY_VERSION_HEX >= 0x02060000 0, /*tp_version_tag*/ #endif #if PY_VERSION_HEX >= 0x030400a1 && defined(Py_TPFLAGS_HAVE_FINALIZE) 0, /*tp_finalize*/ #endif }; static PyObject *__pyx_tp_new_6pandas_9hashtable_Float64HashTable(PyTypeObject *t, PyObject *a, PyObject *k) { PyObject *o = __pyx_tp_new_6pandas_9hashtable_HashTable(t, a, k); if (unlikely(!o)) return 0; if (unlikely(__pyx_pw_6pandas_9hashtable_16Float64HashTable_1__cinit__(o, a, k) < 0)) { Py_DECREF(o); o = 0; } return o; } static void __pyx_tp_dealloc_6pandas_9hashtable_Float64HashTable(PyObject *o) { { PyObject *etype, *eval, *etb; PyErr_Fetch(&etype, &eval, &etb); ++Py_REFCNT(o); __pyx_pw_6pandas_9hashtable_16Float64HashTable_5__dealloc__(o); if (PyErr_Occurred()) PyErr_WriteUnraisable(o); --Py_REFCNT(o); PyErr_Restore(etype, eval, etb); } __pyx_tp_dealloc_6pandas_9hashtable_HashTable(o); } static PyMethodDef __pyx_methods_6pandas_9hashtable_Float64HashTable[] = { {__Pyx_NAMESTR("factorize"), (PyCFunction)__pyx_pw_6pandas_9hashtable_16Float64HashTable_7factorize, METH_O, __Pyx_DOCSTR(0)}, {__Pyx_NAMESTR("get_labels"), (PyCFunction)__pyx_pw_6pandas_9hashtable_16Float64HashTable_9get_labels, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}, {__Pyx_NAMESTR("map_locations"), (PyCFunction)__pyx_pw_6pandas_9hashtable_16Float64HashTable_11map_locations, METH_O, __Pyx_DOCSTR(0)}, {__Pyx_NAMESTR("lookup"), (PyCFunction)__pyx_pw_6pandas_9hashtable_16Float64HashTable_13lookup, METH_O, __Pyx_DOCSTR(0)}, {__Pyx_NAMESTR("unique"), (PyCFunction)__pyx_pw_6pandas_9hashtable_16Float64HashTable_15unique, METH_O, __Pyx_DOCSTR(0)}, {0, 0, 0, 0} }; static PySequenceMethods __pyx_tp_as_sequence_Float64HashTable = { __pyx_pw_6pandas_9hashtable_16Float64HashTable_3__len__, /*sq_length*/ 0, /*sq_concat*/ 0, /*sq_repeat*/ 0, /*sq_item*/ 0, /*sq_slice*/ 0, /*sq_ass_item*/ 0, /*sq_ass_slice*/ 0, /*sq_contains*/ 0, /*sq_inplace_concat*/ 0, /*sq_inplace_repeat*/ }; static PyMappingMethods __pyx_tp_as_mapping_Float64HashTable = { __pyx_pw_6pandas_9hashtable_16Float64HashTable_3__len__, /*mp_length*/ 0, /*mp_subscript*/ 0, /*mp_ass_subscript*/ }; static PyTypeObject __pyx_type_6pandas_9hashtable_Float64HashTable = { PyVarObject_HEAD_INIT(0, 0) __Pyx_NAMESTR("pandas.hashtable.Float64HashTable"), /*tp_name*/ sizeof(struct __pyx_obj_6pandas_9hashtable_Float64HashTable), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_6pandas_9hashtable_Float64HashTable, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #else 0, /*reserved*/ #endif 0, /*tp_repr*/ 0, /*tp_as_number*/ &__pyx_tp_as_sequence_Float64HashTable, /*tp_as_sequence*/ &__pyx_tp_as_mapping_Float64HashTable, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/ 0, /*tp_doc*/ 0, /*tp_traverse*/ 0, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_6pandas_9hashtable_Float64HashTable, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_6pandas_9hashtable_Float64HashTable, /*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*/ #if PY_VERSION_HEX >= 0x02060000 0, /*tp_version_tag*/ #endif #if PY_VERSION_HEX >= 0x030400a1 && defined(Py_TPFLAGS_HAVE_FINALIZE) 0, /*tp_finalize*/ #endif }; static struct __pyx_vtabstruct_6pandas_9hashtable_Int64Vector __pyx_vtable_6pandas_9hashtable_Int64Vector; static PyObject *__pyx_tp_new_6pandas_9hashtable_Int64Vector(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { struct __pyx_obj_6pandas_9hashtable_Int64Vector *p; PyObject *o; o = (*t->tp_alloc)(t, 0); if (unlikely(!o)) return 0; p = ((struct __pyx_obj_6pandas_9hashtable_Int64Vector *)o); p->__pyx_vtab = __pyx_vtabptr_6pandas_9hashtable_Int64Vector; p->ao = ((PyArrayObject *)Py_None); Py_INCREF(Py_None); if (unlikely(__pyx_pw_6pandas_9hashtable_11Int64Vector_1__cinit__(o, __pyx_empty_tuple, NULL) < 0)) { Py_DECREF(o); o = 0; } return o; } static void __pyx_tp_dealloc_6pandas_9hashtable_Int64Vector(PyObject *o) { struct __pyx_obj_6pandas_9hashtable_Int64Vector *p = (struct __pyx_obj_6pandas_9hashtable_Int64Vector *)o; PyObject_GC_UnTrack(o); Py_CLEAR(p->ao); (*Py_TYPE(o)->tp_free)(o); } static int __pyx_tp_traverse_6pandas_9hashtable_Int64Vector(PyObject *o, visitproc v, void *a) { int e; struct __pyx_obj_6pandas_9hashtable_Int64Vector *p = (struct __pyx_obj_6pandas_9hashtable_Int64Vector *)o; if (p->ao) { e = (*v)(((PyObject*)p->ao), a); if (e) return e; } return 0; } static int __pyx_tp_clear_6pandas_9hashtable_Int64Vector(PyObject *o) { struct __pyx_obj_6pandas_9hashtable_Int64Vector *p = (struct __pyx_obj_6pandas_9hashtable_Int64Vector *)o; PyObject* tmp; tmp = ((PyObject*)p->ao); p->ao = ((PyArrayObject *)Py_None); Py_INCREF(Py_None); Py_XDECREF(tmp); return 0; } static PyMethodDef __pyx_methods_6pandas_9hashtable_Int64Vector[] = { {__Pyx_NAMESTR("to_array"), (PyCFunction)__pyx_pw_6pandas_9hashtable_11Int64Vector_5to_array, METH_NOARGS, __Pyx_DOCSTR(0)}, {0, 0, 0, 0} }; static PySequenceMethods __pyx_tp_as_sequence_Int64Vector = { __pyx_pw_6pandas_9hashtable_11Int64Vector_3__len__, /*sq_length*/ 0, /*sq_concat*/ 0, /*sq_repeat*/ 0, /*sq_item*/ 0, /*sq_slice*/ 0, /*sq_ass_item*/ 0, /*sq_ass_slice*/ 0, /*sq_contains*/ 0, /*sq_inplace_concat*/ 0, /*sq_inplace_repeat*/ }; static PyMappingMethods __pyx_tp_as_mapping_Int64Vector = { __pyx_pw_6pandas_9hashtable_11Int64Vector_3__len__, /*mp_length*/ 0, /*mp_subscript*/ 0, /*mp_ass_subscript*/ }; static PyTypeObject __pyx_type_6pandas_9hashtable_Int64Vector = { PyVarObject_HEAD_INIT(0, 0) __Pyx_NAMESTR("pandas.hashtable.Int64Vector"), /*tp_name*/ sizeof(struct __pyx_obj_6pandas_9hashtable_Int64Vector), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_6pandas_9hashtable_Int64Vector, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #else 0, /*reserved*/ #endif 0, /*tp_repr*/ 0, /*tp_as_number*/ &__pyx_tp_as_sequence_Int64Vector, /*tp_as_sequence*/ &__pyx_tp_as_mapping_Int64Vector, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ 0, /*tp_doc*/ __pyx_tp_traverse_6pandas_9hashtable_Int64Vector, /*tp_traverse*/ __pyx_tp_clear_6pandas_9hashtable_Int64Vector, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_6pandas_9hashtable_Int64Vector, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_6pandas_9hashtable_Int64Vector, /*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*/ #if PY_VERSION_HEX >= 0x02060000 0, /*tp_version_tag*/ #endif #if PY_VERSION_HEX >= 0x030400a1 && defined(Py_TPFLAGS_HAVE_FINALIZE) 0, /*tp_finalize*/ #endif }; static struct __pyx_vtabstruct_6pandas_9hashtable_Int64HashTable __pyx_vtable_6pandas_9hashtable_Int64HashTable; static PyObject *__pyx_tp_new_6pandas_9hashtable_Int64HashTable(PyTypeObject *t, PyObject *a, PyObject *k) { struct __pyx_obj_6pandas_9hashtable_Int64HashTable *p; PyObject *o = __pyx_tp_new_6pandas_9hashtable_HashTable(t, a, k); if (unlikely(!o)) return 0; p = ((struct __pyx_obj_6pandas_9hashtable_Int64HashTable *)o); p->__pyx_vtab = __pyx_vtabptr_6pandas_9hashtable_Int64HashTable; if (unlikely(__pyx_pw_6pandas_9hashtable_14Int64HashTable_1__cinit__(o, a, k) < 0)) { Py_DECREF(o); o = 0; } return o; } static void __pyx_tp_dealloc_6pandas_9hashtable_Int64HashTable(PyObject *o) { { PyObject *etype, *eval, *etb; PyErr_Fetch(&etype, &eval, &etb); ++Py_REFCNT(o); __pyx_pw_6pandas_9hashtable_14Int64HashTable_3__dealloc__(o); if (PyErr_Occurred()) PyErr_WriteUnraisable(o); --Py_REFCNT(o); PyErr_Restore(etype, eval, etb); } __pyx_tp_dealloc_6pandas_9hashtable_HashTable(o); } static PyMethodDef __pyx_methods_6pandas_9hashtable_Int64HashTable[] = { {__Pyx_NAMESTR("get_item"), (PyCFunction)__pyx_pw_6pandas_9hashtable_14Int64HashTable_9get_item, METH_O, __Pyx_DOCSTR(0)}, {__Pyx_NAMESTR("get_iter_test"), (PyCFunction)__pyx_pw_6pandas_9hashtable_14Int64HashTable_11get_iter_test, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}, {__Pyx_NAMESTR("set_item"), (PyCFunction)__pyx_pw_6pandas_9hashtable_14Int64HashTable_13set_item, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}, {__Pyx_NAMESTR("map"), (PyCFunction)__pyx_pw_6pandas_9hashtable_14Int64HashTable_15map, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}, {__Pyx_NAMESTR("map_locations"), (PyCFunction)__pyx_pw_6pandas_9hashtable_14Int64HashTable_17map_locations, METH_O, __Pyx_DOCSTR(0)}, {__Pyx_NAMESTR("lookup"), (PyCFunction)__pyx_pw_6pandas_9hashtable_14Int64HashTable_19lookup, METH_O, __Pyx_DOCSTR(0)}, {__Pyx_NAMESTR("factorize"), (PyCFunction)__pyx_pw_6pandas_9hashtable_14Int64HashTable_21factorize, METH_O, __Pyx_DOCSTR(0)}, {__Pyx_NAMESTR("get_labels"), (PyCFunction)__pyx_pw_6pandas_9hashtable_14Int64HashTable_23get_labels, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}, {__Pyx_NAMESTR("get_labels_groupby"), (PyCFunction)__pyx_pw_6pandas_9hashtable_14Int64HashTable_25get_labels_groupby, METH_O, __Pyx_DOCSTR(0)}, {__Pyx_NAMESTR("unique"), (PyCFunction)__pyx_pw_6pandas_9hashtable_14Int64HashTable_27unique, METH_O, __Pyx_DOCSTR(0)}, {0, 0, 0, 0} }; static PySequenceMethods __pyx_tp_as_sequence_Int64HashTable = { __pyx_pw_6pandas_9hashtable_14Int64HashTable_7__len__, /*sq_length*/ 0, /*sq_concat*/ 0, /*sq_repeat*/ 0, /*sq_item*/ 0, /*sq_slice*/ 0, /*sq_ass_item*/ 0, /*sq_ass_slice*/ __pyx_pw_6pandas_9hashtable_14Int64HashTable_5__contains__, /*sq_contains*/ 0, /*sq_inplace_concat*/ 0, /*sq_inplace_repeat*/ }; static PyMappingMethods __pyx_tp_as_mapping_Int64HashTable = { __pyx_pw_6pandas_9hashtable_14Int64HashTable_7__len__, /*mp_length*/ 0, /*mp_subscript*/ 0, /*mp_ass_subscript*/ }; static PyTypeObject __pyx_type_6pandas_9hashtable_Int64HashTable = { PyVarObject_HEAD_INIT(0, 0) __Pyx_NAMESTR("pandas.hashtable.Int64HashTable"), /*tp_name*/ sizeof(struct __pyx_obj_6pandas_9hashtable_Int64HashTable), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_6pandas_9hashtable_Int64HashTable, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #else 0, /*reserved*/ #endif 0, /*tp_repr*/ 0, /*tp_as_number*/ &__pyx_tp_as_sequence_Int64HashTable, /*tp_as_sequence*/ &__pyx_tp_as_mapping_Int64HashTable, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/ 0, /*tp_doc*/ 0, /*tp_traverse*/ 0, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_6pandas_9hashtable_Int64HashTable, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_6pandas_9hashtable_Int64HashTable, /*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*/ #if PY_VERSION_HEX >= 0x02060000 0, /*tp_version_tag*/ #endif #if PY_VERSION_HEX >= 0x030400a1 && defined(Py_TPFLAGS_HAVE_FINALIZE) 0, /*tp_finalize*/ #endif }; static struct __pyx_vtabstruct_6pandas_9hashtable_Int32HashTable __pyx_vtable_6pandas_9hashtable_Int32HashTable; static PyObject *__pyx_tp_new_6pandas_9hashtable_Int32HashTable(PyTypeObject *t, PyObject *a, PyObject *k) { struct __pyx_obj_6pandas_9hashtable_Int32HashTable *p; PyObject *o = __pyx_tp_new_6pandas_9hashtable_HashTable(t, a, k); if (unlikely(!o)) return 0; p = ((struct __pyx_obj_6pandas_9hashtable_Int32HashTable *)o); p->__pyx_vtab = __pyx_vtabptr_6pandas_9hashtable_Int32HashTable; if (unlikely(__pyx_pw_6pandas_9hashtable_14Int32HashTable_3__cinit__(o, __pyx_empty_tuple, NULL) < 0)) { Py_DECREF(o); o = 0; } return o; } static void __pyx_tp_dealloc_6pandas_9hashtable_Int32HashTable(PyObject *o) { { PyObject *etype, *eval, *etb; PyErr_Fetch(&etype, &eval, &etb); ++Py_REFCNT(o); __pyx_pw_6pandas_9hashtable_14Int32HashTable_5__dealloc__(o); if (PyErr_Occurred()) PyErr_WriteUnraisable(o); --Py_REFCNT(o); PyErr_Restore(etype, eval, etb); } __pyx_tp_dealloc_6pandas_9hashtable_HashTable(o); } static PyMethodDef __pyx_methods_6pandas_9hashtable_Int32HashTable[] = { {__Pyx_NAMESTR("get_item"), (PyCFunction)__pyx_pw_6pandas_9hashtable_14Int32HashTable_7get_item, METH_O, __Pyx_DOCSTR(0)}, {__Pyx_NAMESTR("get_iter_test"), (PyCFunction)__pyx_pw_6pandas_9hashtable_14Int32HashTable_9get_iter_test, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}, {__Pyx_NAMESTR("set_item"), (PyCFunction)__pyx_pw_6pandas_9hashtable_14Int32HashTable_11set_item, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}, {__Pyx_NAMESTR("map_locations"), (PyCFunction)__pyx_pw_6pandas_9hashtable_14Int32HashTable_13map_locations, METH_O, __Pyx_DOCSTR(0)}, {__Pyx_NAMESTR("lookup"), (PyCFunction)__pyx_pw_6pandas_9hashtable_14Int32HashTable_15lookup, METH_O, __Pyx_DOCSTR(0)}, {__Pyx_NAMESTR("factorize"), (PyCFunction)__pyx_pw_6pandas_9hashtable_14Int32HashTable_17factorize, METH_O, __Pyx_DOCSTR(0)}, {0, 0, 0, 0} }; static PyTypeObject __pyx_type_6pandas_9hashtable_Int32HashTable = { PyVarObject_HEAD_INIT(0, 0) __Pyx_NAMESTR("pandas.hashtable.Int32HashTable"), /*tp_name*/ sizeof(struct __pyx_obj_6pandas_9hashtable_Int32HashTable), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_6pandas_9hashtable_Int32HashTable, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #else 0, /*reserved*/ #endif 0, /*tp_repr*/ 0, /*tp_as_number*/ 0, /*tp_as_sequence*/ 0, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/ 0, /*tp_doc*/ 0, /*tp_traverse*/ 0, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_6pandas_9hashtable_Int32HashTable, /*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_9hashtable_14Int32HashTable_1__init__, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_6pandas_9hashtable_Int32HashTable, /*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*/ #if PY_VERSION_HEX >= 0x02060000 0, /*tp_version_tag*/ #endif #if PY_VERSION_HEX >= 0x030400a1 && defined(Py_TPFLAGS_HAVE_FINALIZE) 0, /*tp_finalize*/ #endif }; static PyObject *__pyx_tp_new_6pandas_9hashtable_Int64Factorizer(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { struct __pyx_obj_6pandas_9hashtable_Int64Factorizer *p; PyObject *o; o = (*t->tp_alloc)(t, 0); if (unlikely(!o)) return 0; p = ((struct __pyx_obj_6pandas_9hashtable_Int64Factorizer *)o); p->table = ((struct __pyx_obj_6pandas_9hashtable_Int64HashTable *)Py_None); Py_INCREF(Py_None); p->uniques = ((struct __pyx_obj_6pandas_9hashtable_Int64Vector *)Py_None); Py_INCREF(Py_None); return o; } static void __pyx_tp_dealloc_6pandas_9hashtable_Int64Factorizer(PyObject *o) { struct __pyx_obj_6pandas_9hashtable_Int64Factorizer *p = (struct __pyx_obj_6pandas_9hashtable_Int64Factorizer *)o; PyObject_GC_UnTrack(o); Py_CLEAR(p->table); Py_CLEAR(p->uniques); (*Py_TYPE(o)->tp_free)(o); } static int __pyx_tp_traverse_6pandas_9hashtable_Int64Factorizer(PyObject *o, visitproc v, void *a) { int e; struct __pyx_obj_6pandas_9hashtable_Int64Factorizer *p = (struct __pyx_obj_6pandas_9hashtable_Int64Factorizer *)o; if (p->table) { e = (*v)(((PyObject*)p->table), a); if (e) return e; } if (p->uniques) { e = (*v)(((PyObject*)p->uniques), a); if (e) return e; } return 0; } static int __pyx_tp_clear_6pandas_9hashtable_Int64Factorizer(PyObject *o) { struct __pyx_obj_6pandas_9hashtable_Int64Factorizer *p = (struct __pyx_obj_6pandas_9hashtable_Int64Factorizer *)o; PyObject* tmp; tmp = ((PyObject*)p->table); p->table = ((struct __pyx_obj_6pandas_9hashtable_Int64HashTable *)Py_None); Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->uniques); p->uniques = ((struct __pyx_obj_6pandas_9hashtable_Int64Vector *)Py_None); Py_INCREF(Py_None); Py_XDECREF(tmp); return 0; } static PyObject *__pyx_getprop_6pandas_9hashtable_15Int64Factorizer_table(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6pandas_9hashtable_15Int64Factorizer_5table_1__get__(o); } static int __pyx_setprop_6pandas_9hashtable_15Int64Factorizer_table(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { return __pyx_pw_6pandas_9hashtable_15Int64Factorizer_5table_3__set__(o, v); } else { return __pyx_pw_6pandas_9hashtable_15Int64Factorizer_5table_5__del__(o); } } static PyObject *__pyx_getprop_6pandas_9hashtable_15Int64Factorizer_uniques(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6pandas_9hashtable_15Int64Factorizer_7uniques_1__get__(o); } static int __pyx_setprop_6pandas_9hashtable_15Int64Factorizer_uniques(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { return __pyx_pw_6pandas_9hashtable_15Int64Factorizer_7uniques_3__set__(o, v); } else { return __pyx_pw_6pandas_9hashtable_15Int64Factorizer_7uniques_5__del__(o); } } static PyObject *__pyx_getprop_6pandas_9hashtable_15Int64Factorizer_count(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6pandas_9hashtable_15Int64Factorizer_5count_1__get__(o); } static int __pyx_setprop_6pandas_9hashtable_15Int64Factorizer_count(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { return __pyx_pw_6pandas_9hashtable_15Int64Factorizer_5count_3__set__(o, v); } else { PyErr_SetString(PyExc_NotImplementedError, "__del__"); return -1; } } static PyMethodDef __pyx_methods_6pandas_9hashtable_Int64Factorizer[] = { {__Pyx_NAMESTR("get_count"), (PyCFunction)__pyx_pw_6pandas_9hashtable_15Int64Factorizer_3get_count, METH_NOARGS, __Pyx_DOCSTR(0)}, {__Pyx_NAMESTR("factorize"), (PyCFunction)__pyx_pw_6pandas_9hashtable_15Int64Factorizer_5factorize, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}, {0, 0, 0, 0} }; static struct PyGetSetDef __pyx_getsets_6pandas_9hashtable_Int64Factorizer[] = { {(char *)"table", __pyx_getprop_6pandas_9hashtable_15Int64Factorizer_table, __pyx_setprop_6pandas_9hashtable_15Int64Factorizer_table, 0, 0}, {(char *)"uniques", __pyx_getprop_6pandas_9hashtable_15Int64Factorizer_uniques, __pyx_setprop_6pandas_9hashtable_15Int64Factorizer_uniques, 0, 0}, {(char *)"count", __pyx_getprop_6pandas_9hashtable_15Int64Factorizer_count, __pyx_setprop_6pandas_9hashtable_15Int64Factorizer_count, 0, 0}, {0, 0, 0, 0, 0} }; static PyTypeObject __pyx_type_6pandas_9hashtable_Int64Factorizer = { PyVarObject_HEAD_INIT(0, 0) __Pyx_NAMESTR("pandas.hashtable.Int64Factorizer"), /*tp_name*/ sizeof(struct __pyx_obj_6pandas_9hashtable_Int64Factorizer), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_6pandas_9hashtable_Int64Factorizer, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #else 0, /*reserved*/ #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*/ 0, /*tp_doc*/ __pyx_tp_traverse_6pandas_9hashtable_Int64Factorizer, /*tp_traverse*/ __pyx_tp_clear_6pandas_9hashtable_Int64Factorizer, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_6pandas_9hashtable_Int64Factorizer, /*tp_methods*/ 0, /*tp_members*/ __pyx_getsets_6pandas_9hashtable_Int64Factorizer, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ __pyx_pw_6pandas_9hashtable_15Int64Factorizer_1__init__, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_6pandas_9hashtable_Int64Factorizer, /*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*/ #if PY_VERSION_HEX >= 0x02060000 0, /*tp_version_tag*/ #endif #if PY_VERSION_HEX >= 0x030400a1 && defined(Py_TPFLAGS_HAVE_FINALIZE) 0, /*tp_finalize*/ #endif }; static struct __pyx_vtabstruct_6pandas_9hashtable_Float64Vector __pyx_vtable_6pandas_9hashtable_Float64Vector; static PyObject *__pyx_tp_new_6pandas_9hashtable_Float64Vector(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { struct __pyx_obj_6pandas_9hashtable_Float64Vector *p; PyObject *o; o = (*t->tp_alloc)(t, 0); if (unlikely(!o)) return 0; p = ((struct __pyx_obj_6pandas_9hashtable_Float64Vector *)o); p->__pyx_vtab = __pyx_vtabptr_6pandas_9hashtable_Float64Vector; p->ao = ((PyArrayObject *)Py_None); Py_INCREF(Py_None); if (unlikely(__pyx_pw_6pandas_9hashtable_13Float64Vector_1__cinit__(o, __pyx_empty_tuple, NULL) < 0)) { Py_DECREF(o); o = 0; } return o; } static void __pyx_tp_dealloc_6pandas_9hashtable_Float64Vector(PyObject *o) { struct __pyx_obj_6pandas_9hashtable_Float64Vector *p = (struct __pyx_obj_6pandas_9hashtable_Float64Vector *)o; PyObject_GC_UnTrack(o); Py_CLEAR(p->ao); (*Py_TYPE(o)->tp_free)(o); } static int __pyx_tp_traverse_6pandas_9hashtable_Float64Vector(PyObject *o, visitproc v, void *a) { int e; struct __pyx_obj_6pandas_9hashtable_Float64Vector *p = (struct __pyx_obj_6pandas_9hashtable_Float64Vector *)o; if (p->ao) { e = (*v)(((PyObject*)p->ao), a); if (e) return e; } return 0; } static int __pyx_tp_clear_6pandas_9hashtable_Float64Vector(PyObject *o) { struct __pyx_obj_6pandas_9hashtable_Float64Vector *p = (struct __pyx_obj_6pandas_9hashtable_Float64Vector *)o; PyObject* tmp; tmp = ((PyObject*)p->ao); p->ao = ((PyArrayObject *)Py_None); Py_INCREF(Py_None); Py_XDECREF(tmp); return 0; } static PyMethodDef __pyx_methods_6pandas_9hashtable_Float64Vector[] = { {__Pyx_NAMESTR("to_array"), (PyCFunction)__pyx_pw_6pandas_9hashtable_13Float64Vector_5to_array, METH_NOARGS, __Pyx_DOCSTR(0)}, {0, 0, 0, 0} }; static PySequenceMethods __pyx_tp_as_sequence_Float64Vector = { __pyx_pw_6pandas_9hashtable_13Float64Vector_3__len__, /*sq_length*/ 0, /*sq_concat*/ 0, /*sq_repeat*/ 0, /*sq_item*/ 0, /*sq_slice*/ 0, /*sq_ass_item*/ 0, /*sq_ass_slice*/ 0, /*sq_contains*/ 0, /*sq_inplace_concat*/ 0, /*sq_inplace_repeat*/ }; static PyMappingMethods __pyx_tp_as_mapping_Float64Vector = { __pyx_pw_6pandas_9hashtable_13Float64Vector_3__len__, /*mp_length*/ 0, /*mp_subscript*/ 0, /*mp_ass_subscript*/ }; static PyTypeObject __pyx_type_6pandas_9hashtable_Float64Vector = { PyVarObject_HEAD_INIT(0, 0) __Pyx_NAMESTR("pandas.hashtable.Float64Vector"), /*tp_name*/ sizeof(struct __pyx_obj_6pandas_9hashtable_Float64Vector), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_6pandas_9hashtable_Float64Vector, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #else 0, /*reserved*/ #endif 0, /*tp_repr*/ 0, /*tp_as_number*/ &__pyx_tp_as_sequence_Float64Vector, /*tp_as_sequence*/ &__pyx_tp_as_mapping_Float64Vector, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ 0, /*tp_doc*/ __pyx_tp_traverse_6pandas_9hashtable_Float64Vector, /*tp_traverse*/ __pyx_tp_clear_6pandas_9hashtable_Float64Vector, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_6pandas_9hashtable_Float64Vector, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_6pandas_9hashtable_Float64Vector, /*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*/ #if PY_VERSION_HEX >= 0x02060000 0, /*tp_version_tag*/ #endif #if PY_VERSION_HEX >= 0x030400a1 && defined(Py_TPFLAGS_HAVE_FINALIZE) 0, /*tp_finalize*/ #endif }; static struct __pyx_vtabstruct_6pandas_9hashtable_StringHashTable __pyx_vtable_6pandas_9hashtable_StringHashTable; static PyObject *__pyx_tp_new_6pandas_9hashtable_StringHashTable(PyTypeObject *t, PyObject *a, PyObject *k) { struct __pyx_obj_6pandas_9hashtable_StringHashTable *p; PyObject *o = __pyx_tp_new_6pandas_9hashtable_HashTable(t, a, k); if (unlikely(!o)) return 0; p = ((struct __pyx_obj_6pandas_9hashtable_StringHashTable *)o); p->__pyx_vtab = __pyx_vtabptr_6pandas_9hashtable_StringHashTable; if (unlikely(__pyx_pw_6pandas_9hashtable_15StringHashTable_1__cinit__(o, a, k) < 0)) { Py_DECREF(o); o = 0; } return o; } static void __pyx_tp_dealloc_6pandas_9hashtable_StringHashTable(PyObject *o) { { PyObject *etype, *eval, *etb; PyErr_Fetch(&etype, &eval, &etb); ++Py_REFCNT(o); __pyx_pw_6pandas_9hashtable_15StringHashTable_3__dealloc__(o); if (PyErr_Occurred()) PyErr_WriteUnraisable(o); --Py_REFCNT(o); PyErr_Restore(etype, eval, etb); } __pyx_tp_dealloc_6pandas_9hashtable_HashTable(o); } static PyMethodDef __pyx_methods_6pandas_9hashtable_StringHashTable[] = { {__Pyx_NAMESTR("get_item"), (PyCFunction)__pyx_pw_6pandas_9hashtable_15StringHashTable_5get_item, METH_O, __Pyx_DOCSTR(0)}, {__Pyx_NAMESTR("get_iter_test"), (PyCFunction)__pyx_pw_6pandas_9hashtable_15StringHashTable_7get_iter_test, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}, {__Pyx_NAMESTR("set_item"), (PyCFunction)__pyx_pw_6pandas_9hashtable_15StringHashTable_9set_item, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}, {__Pyx_NAMESTR("get_indexer"), (PyCFunction)__pyx_pw_6pandas_9hashtable_15StringHashTable_11get_indexer, METH_O, __Pyx_DOCSTR(0)}, {__Pyx_NAMESTR("unique"), (PyCFunction)__pyx_pw_6pandas_9hashtable_15StringHashTable_13unique, METH_O, __Pyx_DOCSTR(0)}, {__Pyx_NAMESTR("factorize"), (PyCFunction)__pyx_pw_6pandas_9hashtable_15StringHashTable_15factorize, METH_O, __Pyx_DOCSTR(0)}, {0, 0, 0, 0} }; static PyTypeObject __pyx_type_6pandas_9hashtable_StringHashTable = { PyVarObject_HEAD_INIT(0, 0) __Pyx_NAMESTR("pandas.hashtable.StringHashTable"), /*tp_name*/ sizeof(struct __pyx_obj_6pandas_9hashtable_StringHashTable), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_6pandas_9hashtable_StringHashTable, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #else 0, /*reserved*/ #endif 0, /*tp_repr*/ 0, /*tp_as_number*/ 0, /*tp_as_sequence*/ 0, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/ 0, /*tp_doc*/ 0, /*tp_traverse*/ 0, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_6pandas_9hashtable_StringHashTable, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_6pandas_9hashtable_StringHashTable, /*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*/ #if PY_VERSION_HEX >= 0x02060000 0, /*tp_version_tag*/ #endif #if PY_VERSION_HEX >= 0x030400a1 && defined(Py_TPFLAGS_HAVE_FINALIZE) 0, /*tp_finalize*/ #endif }; static struct __pyx_vtabstruct_6pandas_9hashtable_PyObjectHashTable __pyx_vtable_6pandas_9hashtable_PyObjectHashTable; static PyObject *__pyx_tp_new_6pandas_9hashtable_PyObjectHashTable(PyTypeObject *t, PyObject *a, PyObject *k) { struct __pyx_obj_6pandas_9hashtable_PyObjectHashTable *p; PyObject *o = __pyx_tp_new_6pandas_9hashtable_HashTable(t, a, k); if (unlikely(!o)) return 0; p = ((struct __pyx_obj_6pandas_9hashtable_PyObjectHashTable *)o); p->__pyx_vtab = __pyx_vtabptr_6pandas_9hashtable_PyObjectHashTable; return o; } static void __pyx_tp_dealloc_6pandas_9hashtable_PyObjectHashTable(PyObject *o) { { PyObject *etype, *eval, *etb; PyErr_Fetch(&etype, &eval, &etb); ++Py_REFCNT(o); __pyx_pw_6pandas_9hashtable_17PyObjectHashTable_3__dealloc__(o); if (PyErr_Occurred()) PyErr_WriteUnraisable(o); --Py_REFCNT(o); PyErr_Restore(etype, eval, etb); } __pyx_tp_dealloc_6pandas_9hashtable_HashTable(o); } static PyMethodDef __pyx_methods_6pandas_9hashtable_PyObjectHashTable[] = { {__Pyx_NAMESTR("destroy"), (PyCFunction)__pyx_pw_6pandas_9hashtable_17PyObjectHashTable_9destroy, METH_NOARGS, __Pyx_DOCSTR(0)}, {__Pyx_NAMESTR("get_item"), (PyCFunction)__pyx_pw_6pandas_9hashtable_17PyObjectHashTable_11get_item, METH_O, __Pyx_DOCSTR(0)}, {__Pyx_NAMESTR("get_iter_test"), (PyCFunction)__pyx_pw_6pandas_9hashtable_17PyObjectHashTable_13get_iter_test, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}, {__Pyx_NAMESTR("set_item"), (PyCFunction)__pyx_pw_6pandas_9hashtable_17PyObjectHashTable_15set_item, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}, {__Pyx_NAMESTR("map_locations"), (PyCFunction)__pyx_pw_6pandas_9hashtable_17PyObjectHashTable_17map_locations, METH_O, __Pyx_DOCSTR(0)}, {__Pyx_NAMESTR("lookup"), (PyCFunction)__pyx_pw_6pandas_9hashtable_17PyObjectHashTable_19lookup, METH_O, __Pyx_DOCSTR(0)}, {__Pyx_NAMESTR("lookup2"), (PyCFunction)__pyx_pw_6pandas_9hashtable_17PyObjectHashTable_21lookup2, METH_O, __Pyx_DOCSTR(0)}, {__Pyx_NAMESTR("unique"), (PyCFunction)__pyx_pw_6pandas_9hashtable_17PyObjectHashTable_23unique, METH_O, __Pyx_DOCSTR(0)}, {__Pyx_NAMESTR("get_labels"), (PyCFunction)__pyx_pw_6pandas_9hashtable_17PyObjectHashTable_25get_labels, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}, {0, 0, 0, 0} }; static PySequenceMethods __pyx_tp_as_sequence_PyObjectHashTable = { __pyx_pw_6pandas_9hashtable_17PyObjectHashTable_5__len__, /*sq_length*/ 0, /*sq_concat*/ 0, /*sq_repeat*/ 0, /*sq_item*/ 0, /*sq_slice*/ 0, /*sq_ass_item*/ 0, /*sq_ass_slice*/ __pyx_pw_6pandas_9hashtable_17PyObjectHashTable_7__contains__, /*sq_contains*/ 0, /*sq_inplace_concat*/ 0, /*sq_inplace_repeat*/ }; static PyMappingMethods __pyx_tp_as_mapping_PyObjectHashTable = { __pyx_pw_6pandas_9hashtable_17PyObjectHashTable_5__len__, /*mp_length*/ 0, /*mp_subscript*/ 0, /*mp_ass_subscript*/ }; static PyTypeObject __pyx_type_6pandas_9hashtable_PyObjectHashTable = { PyVarObject_HEAD_INIT(0, 0) __Pyx_NAMESTR("pandas.hashtable.PyObjectHashTable"), /*tp_name*/ sizeof(struct __pyx_obj_6pandas_9hashtable_PyObjectHashTable), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_6pandas_9hashtable_PyObjectHashTable, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #else 0, /*reserved*/ #endif 0, /*tp_repr*/ 0, /*tp_as_number*/ &__pyx_tp_as_sequence_PyObjectHashTable, /*tp_as_sequence*/ &__pyx_tp_as_mapping_PyObjectHashTable, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/ 0, /*tp_doc*/ 0, /*tp_traverse*/ 0, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_6pandas_9hashtable_PyObjectHashTable, /*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_9hashtable_17PyObjectHashTable_1__init__, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_6pandas_9hashtable_PyObjectHashTable, /*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*/ #if PY_VERSION_HEX >= 0x02060000 0, /*tp_version_tag*/ #endif #if PY_VERSION_HEX >= 0x030400a1 && defined(Py_TPFLAGS_HAVE_FINALIZE) 0, /*tp_finalize*/ #endif }; static struct __pyx_vtabstruct_6pandas_9hashtable_ObjectVector __pyx_vtable_6pandas_9hashtable_ObjectVector; static PyObject *__pyx_tp_new_6pandas_9hashtable_ObjectVector(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { struct __pyx_obj_6pandas_9hashtable_ObjectVector *p; PyObject *o; o = (*t->tp_alloc)(t, 0); if (unlikely(!o)) return 0; p = ((struct __pyx_obj_6pandas_9hashtable_ObjectVector *)o); p->__pyx_vtab = __pyx_vtabptr_6pandas_9hashtable_ObjectVector; p->ao = ((PyArrayObject *)Py_None); Py_INCREF(Py_None); if (unlikely(__pyx_pw_6pandas_9hashtable_12ObjectVector_1__cinit__(o, __pyx_empty_tuple, NULL) < 0)) { Py_DECREF(o); o = 0; } return o; } static void __pyx_tp_dealloc_6pandas_9hashtable_ObjectVector(PyObject *o) { struct __pyx_obj_6pandas_9hashtable_ObjectVector *p = (struct __pyx_obj_6pandas_9hashtable_ObjectVector *)o; PyObject_GC_UnTrack(o); Py_CLEAR(p->ao); (*Py_TYPE(o)->tp_free)(o); } static int __pyx_tp_traverse_6pandas_9hashtable_ObjectVector(PyObject *o, visitproc v, void *a) { int e; struct __pyx_obj_6pandas_9hashtable_ObjectVector *p = (struct __pyx_obj_6pandas_9hashtable_ObjectVector *)o; if (p->ao) { e = (*v)(((PyObject*)p->ao), a); if (e) return e; } return 0; } static int __pyx_tp_clear_6pandas_9hashtable_ObjectVector(PyObject *o) { struct __pyx_obj_6pandas_9hashtable_ObjectVector *p = (struct __pyx_obj_6pandas_9hashtable_ObjectVector *)o; PyObject* tmp; tmp = ((PyObject*)p->ao); p->ao = ((PyArrayObject *)Py_None); Py_INCREF(Py_None); Py_XDECREF(tmp); return 0; } static PyMethodDef __pyx_methods_6pandas_9hashtable_ObjectVector[] = { {__Pyx_NAMESTR("to_array"), (PyCFunction)__pyx_pw_6pandas_9hashtable_12ObjectVector_5to_array, METH_NOARGS, __Pyx_DOCSTR(0)}, {0, 0, 0, 0} }; static PySequenceMethods __pyx_tp_as_sequence_ObjectVector = { __pyx_pw_6pandas_9hashtable_12ObjectVector_3__len__, /*sq_length*/ 0, /*sq_concat*/ 0, /*sq_repeat*/ 0, /*sq_item*/ 0, /*sq_slice*/ 0, /*sq_ass_item*/ 0, /*sq_ass_slice*/ 0, /*sq_contains*/ 0, /*sq_inplace_concat*/ 0, /*sq_inplace_repeat*/ }; static PyMappingMethods __pyx_tp_as_mapping_ObjectVector = { __pyx_pw_6pandas_9hashtable_12ObjectVector_3__len__, /*mp_length*/ 0, /*mp_subscript*/ 0, /*mp_ass_subscript*/ }; static PyTypeObject __pyx_type_6pandas_9hashtable_ObjectVector = { PyVarObject_HEAD_INIT(0, 0) __Pyx_NAMESTR("pandas.hashtable.ObjectVector"), /*tp_name*/ sizeof(struct __pyx_obj_6pandas_9hashtable_ObjectVector), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_6pandas_9hashtable_ObjectVector, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #else 0, /*reserved*/ #endif 0, /*tp_repr*/ 0, /*tp_as_number*/ &__pyx_tp_as_sequence_ObjectVector, /*tp_as_sequence*/ &__pyx_tp_as_mapping_ObjectVector, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ 0, /*tp_doc*/ __pyx_tp_traverse_6pandas_9hashtable_ObjectVector, /*tp_traverse*/ __pyx_tp_clear_6pandas_9hashtable_ObjectVector, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_6pandas_9hashtable_ObjectVector, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_6pandas_9hashtable_ObjectVector, /*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*/ #if PY_VERSION_HEX >= 0x02060000 0, /*tp_version_tag*/ #endif #if PY_VERSION_HEX >= 0x030400a1 && defined(Py_TPFLAGS_HAVE_FINALIZE) 0, /*tp_finalize*/ #endif }; static PyMethodDef __pyx_methods[] = { {__Pyx_NAMESTR("value_count_int64"), (PyCFunction)__pyx_pw_6pandas_9hashtable_3value_count_int64, METH_O, __Pyx_DOCSTR(0)}, {__Pyx_NAMESTR("value_count_object"), (PyCFunction)__pyx_pw_6pandas_9hashtable_5value_count_object, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}, {0, 0, 0, 0} }; #if PY_MAJOR_VERSION >= 3 static struct PyModuleDef __pyx_moduledef = { #if PY_VERSION_HEX < 0x03020000 { PyObject_HEAD_INIT(NULL) NULL, 0, NULL }, #else PyModuleDef_HEAD_INIT, #endif __Pyx_NAMESTR("hashtable"), 0, /* m_doc */ -1, /* m_size */ __pyx_methods /* m_methods */, NULL, /* m_reload */ NULL, /* m_traverse */ NULL, /* m_clear */ NULL /* m_free */ }; #endif static __Pyx_StringTabEntry __pyx_string_tab[] = { {&__pyx_kp_u_10, __pyx_k_10, sizeof(__pyx_k_10), 0, 1, 0, 0}, {&__pyx_kp_u_12, __pyx_k_12, sizeof(__pyx_k_12), 0, 1, 0, 0}, {&__pyx_kp_u_13, __pyx_k_13, sizeof(__pyx_k_13), 0, 1, 0, 0}, {&__pyx_kp_u_16, __pyx_k_16, sizeof(__pyx_k_16), 0, 1, 0, 0}, {&__pyx_n_s_20, __pyx_k_20, sizeof(__pyx_k_20), 0, 0, 1, 1}, {&__pyx_kp_s_21, __pyx_k_21, sizeof(__pyx_k_21), 0, 0, 1, 0}, {&__pyx_n_s_22, __pyx_k_22, sizeof(__pyx_k_22), 0, 0, 1, 1}, {&__pyx_kp_s_3, __pyx_k_3, sizeof(__pyx_k_3), 0, 0, 1, 0}, {&__pyx_kp_u_6, __pyx_k_6, sizeof(__pyx_k_6), 0, 1, 0, 0}, {&__pyx_kp_u_8, __pyx_k_8, sizeof(__pyx_k_8), 0, 1, 0, 0}, {&__pyx_n_s__IndexError, __pyx_k__IndexError, sizeof(__pyx_k__IndexError), 0, 0, 1, 1}, {&__pyx_n_s__KeyError, __pyx_k__KeyError, sizeof(__pyx_k__KeyError), 0, 0, 1, 1}, {&__pyx_n_s__ONAN, __pyx_k__ONAN, sizeof(__pyx_k__ONAN), 0, 0, 1, 1}, {&__pyx_n_s__RuntimeError, __pyx_k__RuntimeError, sizeof(__pyx_k__RuntimeError), 0, 0, 1, 1}, {&__pyx_n_s__ValueError, __pyx_k__ValueError, sizeof(__pyx_k__ValueError), 0, 0, 1, 1}, {&__pyx_n_s____import__, __pyx_k____import__, sizeof(__pyx_k____import__), 0, 0, 1, 1}, {&__pyx_n_s____main__, __pyx_k____main__, sizeof(__pyx_k____main__), 0, 0, 1, 1}, {&__pyx_n_s____pyx_getbuffer, __pyx_k____pyx_getbuffer, sizeof(__pyx_k____pyx_getbuffer), 0, 0, 1, 1}, {&__pyx_n_s____pyx_releasebuffer, __pyx_k____pyx_releasebuffer, sizeof(__pyx_k____pyx_releasebuffer), 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____test__, __pyx_k____test__, sizeof(__pyx_k____test__), 0, 0, 1, 1}, {&__pyx_n_s__arange, __pyx_k__arange, sizeof(__pyx_k__arange), 0, 0, 1, 1}, {&__pyx_n_s__argsort, __pyx_k__argsort, sizeof(__pyx_k__argsort), 0, 0, 1, 1}, {&__pyx_n_s__arr, __pyx_k__arr, sizeof(__pyx_k__arr), 0, 0, 1, 1}, {&__pyx_n_s__astype, __pyx_k__astype, sizeof(__pyx_k__astype), 0, 0, 1, 1}, {&__pyx_n_s__count, __pyx_k__count, sizeof(__pyx_k__count), 0, 0, 1, 1}, {&__pyx_n_s__count_prior, __pyx_k__count_prior, sizeof(__pyx_k__count_prior), 0, 0, 1, 1}, {&__pyx_n_s__destroy, __pyx_k__destroy, sizeof(__pyx_k__destroy), 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__float64, __pyx_k__float64, sizeof(__pyx_k__float64), 0, 0, 1, 1}, {&__pyx_n_s__get_item, __pyx_k__get_item, sizeof(__pyx_k__get_item), 0, 0, 1, 1}, {&__pyx_n_s__get_labels, __pyx_k__get_labels, sizeof(__pyx_k__get_labels), 0, 0, 1, 1}, {&__pyx_n_s__i, __pyx_k__i, sizeof(__pyx_k__i), 0, 0, 1, 1}, {&__pyx_n_s__inf, __pyx_k__inf, sizeof(__pyx_k__inf), 0, 0, 1, 1}, {&__pyx_n_s__int64, __pyx_k__int64, sizeof(__pyx_k__int64), 0, 0, 1, 1}, {&__pyx_n_s__int_, __pyx_k__int_, sizeof(__pyx_k__int_), 0, 0, 1, 1}, {&__pyx_n_s__iterations, __pyx_k__iterations, sizeof(__pyx_k__iterations), 0, 0, 1, 1}, {&__pyx_n_s__j, __pyx_k__j, sizeof(__pyx_k__j), 0, 0, 1, 1}, {&__pyx_n_s__k, __pyx_k__k, sizeof(__pyx_k__k), 0, 0, 1, 1}, {&__pyx_n_s__key, __pyx_k__key, sizeof(__pyx_k__key), 0, 0, 1, 1}, {&__pyx_n_s__keys, __pyx_k__keys, sizeof(__pyx_k__keys), 0, 0, 1, 1}, {&__pyx_n_s__mask, __pyx_k__mask, sizeof(__pyx_k__mask), 0, 0, 1, 1}, {&__pyx_n_s__max_count, __pyx_k__max_count, sizeof(__pyx_k__max_count), 0, 0, 1, 1}, {&__pyx_n_s__max_val, __pyx_k__max_val, sizeof(__pyx_k__max_val), 0, 0, 1, 1}, {&__pyx_n_s__mode_int64, __pyx_k__mode_int64, sizeof(__pyx_k__mode_int64), 0, 0, 1, 1}, {&__pyx_n_s__mode_object, __pyx_k__mode_object, sizeof(__pyx_k__mode_object), 0, 0, 1, 1}, {&__pyx_n_s__modes, __pyx_k__modes, sizeof(__pyx_k__modes), 0, 0, 1, 1}, {&__pyx_n_s__n, __pyx_k__n, sizeof(__pyx_k__n), 0, 0, 1, 1}, {&__pyx_n_s__na_sentinel, __pyx_k__na_sentinel, sizeof(__pyx_k__na_sentinel), 0, 0, 1, 1}, {&__pyx_n_s__nan, __pyx_k__nan, sizeof(__pyx_k__nan), 0, 0, 1, 1}, {&__pyx_n_s__np, __pyx_k__np, sizeof(__pyx_k__np), 0, 0, 1, 1}, {&__pyx_n_s__numpy, __pyx_k__numpy, sizeof(__pyx_k__numpy), 0, 0, 1, 1}, {&__pyx_n_s__obj, __pyx_k__obj, sizeof(__pyx_k__obj), 0, 0, 1, 1}, {&__pyx_n_s__object, __pyx_k__object, sizeof(__pyx_k__object), 0, 0, 1, 1}, {&__pyx_n_s__object_, __pyx_k__object_, sizeof(__pyx_k__object_), 0, 0, 1, 1}, {&__pyx_n_s__put, __pyx_k__put, sizeof(__pyx_k__put), 0, 0, 1, 1}, {&__pyx_n_s__range, __pyx_k__range, sizeof(__pyx_k__range), 0, 0, 1, 1}, {&__pyx_n_s__resize, __pyx_k__resize, sizeof(__pyx_k__resize), 0, 0, 1, 1}, {&__pyx_n_s__ret, __pyx_k__ret, sizeof(__pyx_k__ret), 0, 0, 1, 1}, {&__pyx_n_s__set_item, __pyx_k__set_item, sizeof(__pyx_k__set_item), 0, 0, 1, 1}, {&__pyx_n_s__size_hint, __pyx_k__size_hint, sizeof(__pyx_k__size_hint), 0, 0, 1, 1}, {&__pyx_n_s__sort, __pyx_k__sort, sizeof(__pyx_k__sort), 0, 0, 1, 1}, {&__pyx_n_s__table, __pyx_k__table, sizeof(__pyx_k__table), 0, 0, 1, 1}, {&__pyx_n_s__take, __pyx_k__take, sizeof(__pyx_k__take), 0, 0, 1, 1}, {&__pyx_n_s__to_array, __pyx_k__to_array, sizeof(__pyx_k__to_array), 0, 0, 1, 1}, {&__pyx_n_s__unique, __pyx_k__unique, sizeof(__pyx_k__unique), 0, 0, 1, 1}, {&__pyx_n_s__uniques, __pyx_k__uniques, sizeof(__pyx_k__uniques), 0, 0, 1, 1}, {&__pyx_n_s__val, __pyx_k__val, sizeof(__pyx_k__val), 0, 0, 1, 1}, {&__pyx_n_s__values, __pyx_k__values, sizeof(__pyx_k__values), 0, 0, 1, 1}, {&__pyx_n_s__zeros, __pyx_k__zeros, sizeof(__pyx_k__zeros), 0, 0, 1, 1}, {0, 0, 0, 0, 0, 0, 0} }; static int __Pyx_InitCachedBuiltins(void) { __pyx_builtin_object = __Pyx_GetBuiltinName(__pyx_n_s__object); if (!__pyx_builtin_object) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 646; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_builtin_KeyError = __Pyx_GetBuiltinName(__pyx_n_s__KeyError); if (!__pyx_builtin_KeyError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 169; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_n_s__range); if (!__pyx_builtin_range) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 173; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_builtin_IndexError = __Pyx_GetBuiltinName(__pyx_n_s__IndexError); if (!__pyx_builtin_IndexError) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 40; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_builtin_ValueError = __Pyx_GetBuiltinName(__pyx_n_s__ValueError); if (!__pyx_builtin_ValueError) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 71; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_builtin_RuntimeError = __Pyx_GetBuiltinName(__pyx_n_s__RuntimeError); if (!__pyx_builtin_RuntimeError) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 803; __pyx_clineno = __LINE__; goto __pyx_L1_error;} return 0; __pyx_L1_error:; return -1; } static int __Pyx_InitCachedConstants(void) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0); /* "util.pxd":40 * i += sz * elif i >= sz or sz == 0: * raise IndexError('index out of bounds') # <<<<<<<<<<<<<< * * return get_value_1d(arr, i) */ __pyx_k_tuple_4 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_3)); if (unlikely(!__pyx_k_tuple_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 40; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_4); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_4)); /* "util.pxd":57 * i += sz * elif i >= sz: * raise IndexError('index out of bounds') # <<<<<<<<<<<<<< * * assign_value_1d(arr, i, value) */ __pyx_k_tuple_5 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_3)); if (unlikely(!__pyx_k_tuple_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 57; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_5); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_5)); /* "numpy.pxd":217 * 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_k_tuple_7 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_u_6)); if (unlikely(!__pyx_k_tuple_7)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 217; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_7); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_7)); /* "numpy.pxd":221 * 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_k_tuple_9 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_u_8)); if (unlikely(!__pyx_k_tuple_9)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 221; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_9); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_9)); /* "numpy.pxd":259 * if ((descr.byteorder == '>' and little_endian) or * (descr.byteorder == '<' 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_k_tuple_11 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_u_10)); if (unlikely(!__pyx_k_tuple_11)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 259; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_11); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_11)); /* "numpy.pxd":803 * * if (end - f) - (new_offset - offset[0]) < 15: * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") # <<<<<<<<<<<<<< * * if ((child.byteorder == '>' and little_endian) or */ __pyx_k_tuple_14 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_u_13)); if (unlikely(!__pyx_k_tuple_14)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 803; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_14); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_14)); /* "numpy.pxd":807 * if ((child.byteorder == '>' and little_endian) or * (child.byteorder == '<' 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_k_tuple_15 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_u_10)); if (unlikely(!__pyx_k_tuple_15)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 807; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_15); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_15)); /* "numpy.pxd":827 * 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_k_tuple_17 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_u_16)); if (unlikely(!__pyx_k_tuple_17)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 827; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_17); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_17)); /* "pandas/hashtable.pyx":31 * * * def list_to_object_array(list obj): # <<<<<<<<<<<<<< * ''' * Convert list to object ndarray. Seriously can't believe I had to write this */ __pyx_k_tuple_18 = PyTuple_Pack(4, ((PyObject *)__pyx_n_s__obj), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__n), ((PyObject *)__pyx_n_s__arr)); if (unlikely(!__pyx_k_tuple_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 31; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_18); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_18)); __pyx_k_codeobj_19 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_18, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_21, __pyx_n_s_20, 31, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 31; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/hashtable.pyx":980 * * * def mode_object(ndarray[object] values, ndarray[uint8_t, cast=True] mask): # <<<<<<<<<<<<<< * cdef: * int count, max_count = 2 */ __pyx_k_tuple_23 = PyTuple_Pack(11, ((PyObject *)__pyx_n_s__values), ((PyObject *)__pyx_n_s__mask), ((PyObject *)__pyx_n_s__count), ((PyObject *)__pyx_n_s__max_count), ((PyObject *)__pyx_n_s__j), ((PyObject *)__pyx_n_s__k), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__n), ((PyObject *)__pyx_n_s__table), ((PyObject *)__pyx_n_s__ret), ((PyObject *)__pyx_n_s__modes)); if (unlikely(!__pyx_k_tuple_23)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 980; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_23); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_23)); __pyx_k_codeobj_24 = (PyObject*)__Pyx_PyCode_New(2, 0, 11, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_23, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_21, __pyx_n_s__mode_object, 980, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_24)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 980; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/hashtable.pyx":1011 * * * def mode_int64(ndarray[int64_t] values): # <<<<<<<<<<<<<< * cdef: * int val, max_val = 2 */ __pyx_k_tuple_25 = PyTuple_Pack(8, ((PyObject *)__pyx_n_s__values), ((PyObject *)__pyx_n_s__val), ((PyObject *)__pyx_n_s__max_val), ((PyObject *)__pyx_n_s__j), ((PyObject *)__pyx_n_s__k), ((PyObject *)__pyx_n_s__table), ((PyObject *)__pyx_n_s__uniques), ((PyObject *)__pyx_n_s__modes)); if (unlikely(!__pyx_k_tuple_25)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1011; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_25); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_25)); __pyx_k_codeobj_26 = (PyObject*)__Pyx_PyCode_New(1, 0, 8, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_25, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_21, __pyx_n_s__mode_int64, 1011, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_26)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1011; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __pyx_int_0 = PyInt_FromLong(0); if (unlikely(!__pyx_int_0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __pyx_int_1 = PyInt_FromLong(1); if (unlikely(!__pyx_int_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __pyx_int_neg_1 = PyInt_FromLong(-1); if (unlikely(!__pyx_int_neg_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __pyx_int_15 = PyInt_FromLong(15); if (unlikely(!__pyx_int_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; return 0; __pyx_L1_error:; return -1; } #if PY_MAJOR_VERSION < 3 PyMODINIT_FUNC inithashtable(void); /*proto*/ PyMODINIT_FUNC inithashtable(void) #else PyMODINIT_FUNC PyInit_hashtable(void); /*proto*/ PyMODINIT_FUNC PyInit_hashtable(void) #endif { PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannyDeclarations #if CYTHON_REFNANNY __Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny"); if (!__Pyx_RefNanny) { PyErr_Clear(); __Pyx_RefNanny = __Pyx_RefNannyImportAPI("Cython.Runtime.refnanny"); if (!__Pyx_RefNanny) Py_FatalError("failed to import 'refnanny' module"); } #endif __Pyx_RefNannySetupContext("PyMODINIT_FUNC PyInit_hashtable(void)", 0); if ( __Pyx_check_binary_version() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_empty_tuple)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_bytes)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #ifdef __Pyx_CyFunction_USED if (__Pyx_CyFunction_init() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif #ifdef __Pyx_FusedFunction_USED if (__pyx_FusedFunction_init() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif #ifdef __Pyx_Generator_USED if (__pyx_Generator_init() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif /*--- Library function declarations ---*/ /*--- Threads initialization code ---*/ #if defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS #ifdef WITH_THREAD /* Python build with threading support? */ PyEval_InitThreads(); #endif #endif /*--- Module creation code ---*/ #if PY_MAJOR_VERSION < 3 __pyx_m = Py_InitModule4(__Pyx_NAMESTR("hashtable"), __pyx_methods, 0, 0, PYTHON_API_VERSION); Py_XINCREF(__pyx_m); #else __pyx_m = PyModule_Create(&__pyx_moduledef); #endif if (unlikely(!__pyx_m)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_d)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} Py_INCREF(__pyx_d); #if PY_MAJOR_VERSION >= 3 { PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (!PyDict_GetItemString(modules, "pandas.hashtable")) { if (unlikely(PyDict_SetItemString(modules, "pandas.hashtable", __pyx_m) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } } #endif __pyx_b = PyImport_AddModule(__Pyx_NAMESTR(__Pyx_BUILTIN_MODULE_NAME)); if (unlikely(!__pyx_b)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #if CYTHON_COMPILING_IN_PYPY Py_INCREF(__pyx_b); #endif if (__Pyx_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; /*--- Initialize various global constants etc. ---*/ if (unlikely(__Pyx_InitGlobals() < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif if (__pyx_module_is_main_pandas__hashtable) { if (__Pyx_SetAttrString(__pyx_m, "__name__", __pyx_n_s____main__) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; } /*--- Builtin init code ---*/ if (unlikely(__Pyx_InitCachedBuiltins() < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /*--- Constants init code ---*/ if (unlikely(__Pyx_InitCachedConstants() < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /*--- Global init code ---*/ /*--- Variable export code ---*/ /*--- Function export code ---*/ /*--- Type init code ---*/ if (PyType_Ready(&__pyx_type_6pandas_9hashtable_Factorizer) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 824; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__Pyx_SetAttrString(__pyx_m, "Factorizer", (PyObject *)&__pyx_type_6pandas_9hashtable_Factorizer) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 824; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_6pandas_9hashtable_Factorizer = &__pyx_type_6pandas_9hashtable_Factorizer; if (PyType_Ready(&__pyx_type_6pandas_9hashtable_HashTable) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 141; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__Pyx_SetAttrString(__pyx_m, "HashTable", (PyObject *)&__pyx_type_6pandas_9hashtable_HashTable) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 141; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_6pandas_9hashtable_HashTable = &__pyx_type_6pandas_9hashtable_HashTable; __pyx_type_6pandas_9hashtable_Float64HashTable.tp_base = __pyx_ptype_6pandas_9hashtable_HashTable; if (PyType_Ready(&__pyx_type_6pandas_9hashtable_Float64HashTable) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 541; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__Pyx_SetAttrString(__pyx_m, "Float64HashTable", (PyObject *)&__pyx_type_6pandas_9hashtable_Float64HashTable) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 541; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_6pandas_9hashtable_Float64HashTable = &__pyx_type_6pandas_9hashtable_Float64HashTable; __pyx_vtabptr_6pandas_9hashtable_Int64Vector = &__pyx_vtable_6pandas_9hashtable_Int64Vector; __pyx_vtable_6pandas_9hashtable_Int64Vector.append = (PyObject *(*)(struct __pyx_obj_6pandas_9hashtable_Int64Vector *, __pyx_t_5numpy_int64_t))__pyx_f_6pandas_9hashtable_11Int64Vector_append; if (PyType_Ready(&__pyx_type_6pandas_9hashtable_Int64Vector) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__Pyx_SetVtable(__pyx_type_6pandas_9hashtable_Int64Vector.tp_dict, __pyx_vtabptr_6pandas_9hashtable_Int64Vector) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__Pyx_SetAttrString(__pyx_m, "Int64Vector", (PyObject *)&__pyx_type_6pandas_9hashtable_Int64Vector) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_6pandas_9hashtable_Int64Vector = &__pyx_type_6pandas_9hashtable_Int64Vector; __pyx_vtabptr_6pandas_9hashtable_Int64HashTable = &__pyx_vtable_6pandas_9hashtable_Int64HashTable; __pyx_vtable_6pandas_9hashtable_Int64HashTable.get_item = (PyObject *(*)(struct __pyx_obj_6pandas_9hashtable_Int64HashTable *, __pyx_t_5numpy_int64_t, int __pyx_skip_dispatch))__pyx_f_6pandas_9hashtable_14Int64HashTable_get_item; __pyx_vtable_6pandas_9hashtable_Int64HashTable.set_item = (PyObject *(*)(struct __pyx_obj_6pandas_9hashtable_Int64HashTable *, __pyx_t_5numpy_int64_t, Py_ssize_t, int __pyx_skip_dispatch))__pyx_f_6pandas_9hashtable_14Int64HashTable_set_item; __pyx_type_6pandas_9hashtable_Int64HashTable.tp_base = __pyx_ptype_6pandas_9hashtable_HashTable; if (PyType_Ready(&__pyx_type_6pandas_9hashtable_Int64HashTable) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 363; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__Pyx_SetVtable(__pyx_type_6pandas_9hashtable_Int64HashTable.tp_dict, __pyx_vtabptr_6pandas_9hashtable_Int64HashTable) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 363; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__Pyx_SetAttrString(__pyx_m, "Int64HashTable", (PyObject *)&__pyx_type_6pandas_9hashtable_Int64HashTable) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 363; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_6pandas_9hashtable_Int64HashTable = &__pyx_type_6pandas_9hashtable_Int64HashTable; __pyx_vtabptr_6pandas_9hashtable_Int32HashTable = &__pyx_vtable_6pandas_9hashtable_Int32HashTable; __pyx_vtable_6pandas_9hashtable_Int32HashTable.check_type = (int (*)(struct __pyx_obj_6pandas_9hashtable_Int32HashTable *, PyObject *))__pyx_f_6pandas_9hashtable_14Int32HashTable_check_type; __pyx_vtable_6pandas_9hashtable_Int32HashTable.get_item = (PyObject *(*)(struct __pyx_obj_6pandas_9hashtable_Int32HashTable *, __pyx_t_5numpy_int32_t, int __pyx_skip_dispatch))__pyx_f_6pandas_9hashtable_14Int32HashTable_get_item; __pyx_vtable_6pandas_9hashtable_Int32HashTable.set_item = (PyObject *(*)(struct __pyx_obj_6pandas_9hashtable_Int32HashTable *, __pyx_t_5numpy_int32_t, Py_ssize_t, int __pyx_skip_dispatch))__pyx_f_6pandas_9hashtable_14Int32HashTable_set_item; __pyx_type_6pandas_9hashtable_Int32HashTable.tp_base = __pyx_ptype_6pandas_9hashtable_HashTable; if (PyType_Ready(&__pyx_type_6pandas_9hashtable_Int32HashTable) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 264; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__Pyx_SetVtable(__pyx_type_6pandas_9hashtable_Int32HashTable.tp_dict, __pyx_vtabptr_6pandas_9hashtable_Int32HashTable) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 264; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__Pyx_SetAttrString(__pyx_m, "Int32HashTable", (PyObject *)&__pyx_type_6pandas_9hashtable_Int32HashTable) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 264; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_6pandas_9hashtable_Int32HashTable = &__pyx_type_6pandas_9hashtable_Int32HashTable; if (PyType_Ready(&__pyx_type_6pandas_9hashtable_Int64Factorizer) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 860; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__Pyx_SetAttrString(__pyx_m, "Int64Factorizer", (PyObject *)&__pyx_type_6pandas_9hashtable_Int64Factorizer) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 860; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_6pandas_9hashtable_Int64Factorizer = &__pyx_type_6pandas_9hashtable_Int64Factorizer; __pyx_vtabptr_6pandas_9hashtable_Float64Vector = &__pyx_vtable_6pandas_9hashtable_Float64Vector; __pyx_vtable_6pandas_9hashtable_Float64Vector.append = (PyObject *(*)(struct __pyx_obj_6pandas_9hashtable_Float64Vector *, __pyx_t_5numpy_float64_t))__pyx_f_6pandas_9hashtable_13Float64Vector_append; if (PyType_Ready(&__pyx_type_6pandas_9hashtable_Float64Vector) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 111; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__Pyx_SetVtable(__pyx_type_6pandas_9hashtable_Float64Vector.tp_dict, __pyx_vtabptr_6pandas_9hashtable_Float64Vector) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 111; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__Pyx_SetAttrString(__pyx_m, "Float64Vector", (PyObject *)&__pyx_type_6pandas_9hashtable_Float64Vector) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 111; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_6pandas_9hashtable_Float64Vector = &__pyx_type_6pandas_9hashtable_Float64Vector; __pyx_vtabptr_6pandas_9hashtable_StringHashTable = &__pyx_vtable_6pandas_9hashtable_StringHashTable; __pyx_vtable_6pandas_9hashtable_StringHashTable.check_type = (int (*)(struct __pyx_obj_6pandas_9hashtable_StringHashTable *, PyObject *))__pyx_f_6pandas_9hashtable_15StringHashTable_check_type; __pyx_vtable_6pandas_9hashtable_StringHashTable.get_item = (PyObject *(*)(struct __pyx_obj_6pandas_9hashtable_StringHashTable *, PyObject *, int __pyx_skip_dispatch))__pyx_f_6pandas_9hashtable_15StringHashTable_get_item; __pyx_vtable_6pandas_9hashtable_StringHashTable.set_item = (PyObject *(*)(struct __pyx_obj_6pandas_9hashtable_StringHashTable *, PyObject *, Py_ssize_t, int __pyx_skip_dispatch))__pyx_f_6pandas_9hashtable_15StringHashTable_set_item; __pyx_type_6pandas_9hashtable_StringHashTable.tp_base = __pyx_ptype_6pandas_9hashtable_HashTable; if (PyType_Ready(&__pyx_type_6pandas_9hashtable_StringHashTable) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 145; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__Pyx_SetVtable(__pyx_type_6pandas_9hashtable_StringHashTable.tp_dict, __pyx_vtabptr_6pandas_9hashtable_StringHashTable) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 145; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__Pyx_SetAttrString(__pyx_m, "StringHashTable", (PyObject *)&__pyx_type_6pandas_9hashtable_StringHashTable) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 145; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_6pandas_9hashtable_StringHashTable = &__pyx_type_6pandas_9hashtable_StringHashTable; __pyx_vtabptr_6pandas_9hashtable_PyObjectHashTable = &__pyx_vtable_6pandas_9hashtable_PyObjectHashTable; __pyx_vtable_6pandas_9hashtable_PyObjectHashTable.get_item = (PyObject *(*)(struct __pyx_obj_6pandas_9hashtable_PyObjectHashTable *, PyObject *, int __pyx_skip_dispatch))__pyx_f_6pandas_9hashtable_17PyObjectHashTable_get_item; __pyx_vtable_6pandas_9hashtable_PyObjectHashTable.set_item = (PyObject *(*)(struct __pyx_obj_6pandas_9hashtable_PyObjectHashTable *, PyObject *, Py_ssize_t, int __pyx_skip_dispatch))__pyx_f_6pandas_9hashtable_17PyObjectHashTable_set_item; __pyx_type_6pandas_9hashtable_PyObjectHashTable.tp_base = __pyx_ptype_6pandas_9hashtable_HashTable; if (PyType_Ready(&__pyx_type_6pandas_9hashtable_PyObjectHashTable) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 648; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__Pyx_SetVtable(__pyx_type_6pandas_9hashtable_PyObjectHashTable.tp_dict, __pyx_vtabptr_6pandas_9hashtable_PyObjectHashTable) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 648; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__Pyx_SetAttrString(__pyx_m, "PyObjectHashTable", (PyObject *)&__pyx_type_6pandas_9hashtable_PyObjectHashTable) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 648; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_6pandas_9hashtable_PyObjectHashTable = &__pyx_type_6pandas_9hashtable_PyObjectHashTable; __pyx_vtabptr_6pandas_9hashtable_ObjectVector = &__pyx_vtable_6pandas_9hashtable_ObjectVector; __pyx_vtable_6pandas_9hashtable_ObjectVector.append = (PyObject *(*)(struct __pyx_obj_6pandas_9hashtable_ObjectVector *, PyObject *))__pyx_f_6pandas_9hashtable_12ObjectVector_append; if (PyType_Ready(&__pyx_type_6pandas_9hashtable_ObjectVector) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__Pyx_SetVtable(__pyx_type_6pandas_9hashtable_ObjectVector.tp_dict, __pyx_vtabptr_6pandas_9hashtable_ObjectVector) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__Pyx_SetAttrString(__pyx_m, "ObjectVector", (PyObject *)&__pyx_type_6pandas_9hashtable_ObjectVector) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_6pandas_9hashtable_ObjectVector = &__pyx_type_6pandas_9hashtable_ObjectVector; /*--- Type import code ---*/ __pyx_ptype_7cpython_4type_type = __Pyx_ImportType(__Pyx_BUILTIN_MODULE_NAME, "type", #if CYTHON_COMPILING_IN_PYPY sizeof(PyTypeObject), #else sizeof(PyHeapTypeObject), #endif 0); if (unlikely(!__pyx_ptype_7cpython_4type_type)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 9; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_7cpython_4bool_bool = __Pyx_ImportType(__Pyx_BUILTIN_MODULE_NAME, "bool", sizeof(PyBoolObject), 0); if (unlikely(!__pyx_ptype_7cpython_4bool_bool)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 8; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_7cpython_7complex_complex = __Pyx_ImportType(__Pyx_BUILTIN_MODULE_NAME, "complex", sizeof(PyComplexObject), 0); if (unlikely(!__pyx_ptype_7cpython_7complex_complex)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 15; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_5numpy_dtype = __Pyx_ImportType("numpy", "dtype", sizeof(PyArray_Descr), 0); if (unlikely(!__pyx_ptype_5numpy_dtype)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_5numpy_flatiter = __Pyx_ImportType("numpy", "flatiter", sizeof(PyArrayIterObject), 0); if (unlikely(!__pyx_ptype_5numpy_flatiter)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 167; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_5numpy_broadcast = __Pyx_ImportType("numpy", "broadcast", sizeof(PyArrayMultiIterObject), 0); if (unlikely(!__pyx_ptype_5numpy_broadcast)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 171; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_5numpy_ndarray = __Pyx_ImportType("numpy", "ndarray", sizeof(PyArrayObject), 0); if (unlikely(!__pyx_ptype_5numpy_ndarray)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_5numpy_ufunc = __Pyx_ImportType("numpy", "ufunc", sizeof(PyUFuncObject), 0); if (unlikely(!__pyx_ptype_5numpy_ufunc)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 865; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /*--- Variable import code ---*/ /*--- Function import code ---*/ /*--- Execution code ---*/ /* "pandas/hashtable.pyx":9 * cimport util * * import numpy as np # <<<<<<<<<<<<<< * * ONAN = np.nan */ __pyx_t_1 = __Pyx_Import(((PyObject *)__pyx_n_s__numpy), 0, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 9; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s__np, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 9; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pandas/hashtable.pyx":11 * import numpy as np * * ONAN = np.nan # <<<<<<<<<<<<<< * * cimport cython */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 11; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s__nan); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 11; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (PyDict_SetItem(__pyx_d, __pyx_n_s__ONAN, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 11; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/hashtable.pyx":16 * cimport numpy as cnp * * cnp.import_array() # <<<<<<<<<<<<<< * cnp.import_ufunc() * */ import_array(); /* "pandas/hashtable.pyx":17 * * cnp.import_array() * cnp.import_ufunc() # <<<<<<<<<<<<<< * * cdef int64_t iNaT = util.get_nat() */ import_ufunc(); /* "pandas/hashtable.pyx":19 * cnp.import_ufunc() * * cdef int64_t iNaT = util.get_nat() # <<<<<<<<<<<<<< * * cdef extern from "datetime.h": */ __pyx_v_6pandas_9hashtable_iNaT = get_nat(); /* "pandas/hashtable.pyx":25 * void PyDateTime_IMPORT() * * PyDateTime_IMPORT # <<<<<<<<<<<<<< * * cdef extern from "Python.h": */ PyDateTime_IMPORT; /* "pandas/hashtable.pyx":31 * * * def list_to_object_array(list obj): # <<<<<<<<<<<<<< * ''' * Convert list to object ndarray. Seriously can't believe I had to write this */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_9hashtable_1list_to_object_array, NULL, __pyx_n_s_22); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 31; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_20, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 31; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/hashtable.pyx":49 * * * cdef size_t _INIT_VEC_CAP = 32 # <<<<<<<<<<<<<< * * cdef class ObjectVector: */ __pyx_v_6pandas_9hashtable__INIT_VEC_CAP = 32; /* "pandas/hashtable.pyx":646 * return uniques.to_array() * * na_sentinel = object # <<<<<<<<<<<<<< * * cdef class PyObjectHashTable(HashTable): */ if (PyDict_SetItem(__pyx_d, __pyx_n_s__na_sentinel, __pyx_builtin_object) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 646; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/hashtable.pyx":837 * return self.count * * def factorize(self, ndarray[object] values, sort=False, na_sentinel=-1): # <<<<<<<<<<<<<< * labels = self.table.get_labels(values, self.uniques, * self.count, na_sentinel) */ __pyx_t_2 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 837; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_k_1 = __pyx_t_2; __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/hashtable.pyx":873 * return self.count * * def factorize(self, ndarray[int64_t] values, sort=False, # <<<<<<<<<<<<<< * na_sentinel=-1): * labels = self.table.get_labels(values, self.uniques, */ __pyx_t_2 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 873; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_k_2 = __pyx_t_2; __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/hashtable.pyx":980 * * * def mode_object(ndarray[object] values, ndarray[uint8_t, cast=True] mask): # <<<<<<<<<<<<<< * cdef: * int count, max_count = 2 */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_9hashtable_7mode_object, NULL, __pyx_n_s_22); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 980; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s__mode_object, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 980; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/hashtable.pyx":1011 * * * def mode_int64(ndarray[int64_t] values): # <<<<<<<<<<<<<< * cdef: * int val, max_val = 2 */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_9hashtable_9mode_int64, NULL, __pyx_n_s_22); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1011; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s__mode_int64, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1011; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/hashtable.pyx":1 * from cpython cimport PyObject, Py_INCREF, PyList_Check, PyTuple_Check # <<<<<<<<<<<<<< * * from khash cimport * */ __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_2)); if (PyDict_SetItem(__pyx_d, __pyx_n_s____test__, ((PyObject *)__pyx_t_2)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; /* "numpy.pxd":979 * arr.base = baseptr * * cdef inline object get_array_base(ndarray arr): # <<<<<<<<<<<<<< * if arr.base is NULL: * return None */ goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); if (__pyx_m) { __Pyx_AddTraceback("init pandas.hashtable", __pyx_clineno, __pyx_lineno, __pyx_filename); Py_DECREF(__pyx_m); __pyx_m = 0; } else if (!PyErr_Occurred()) { PyErr_SetString(PyExc_ImportError, "init pandas.hashtable"); } __pyx_L0:; __Pyx_RefNannyFinishContext(); #if PY_MAJOR_VERSION < 3 return; #else return __pyx_m; #endif } /* Runtime support code */ #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 /* CYTHON_REFNANNY */ 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 '%s' is not defined", PyString_AS_STRING(name)); #endif } return result; } static int __Pyx_ArgTypeTest(PyObject *obj, PyTypeObject *type, int none_allowed, const char *name, int exact) { if (!type) { PyErr_Format(PyExc_SystemError, "Missing type object"); return 0; } if (none_allowed && obj == Py_None) return 1; else if (exact) { if (Py_TYPE(obj) == type) return 1; } else { if (PyObject_TypeCheck(obj, type)) return 1; } PyErr_Format(PyExc_TypeError, "Argument '%s' has incorrect type (expected %s, got %s)", name, type->tp_name, Py_TYPE(obj)->tp_name); return 0; } static CYTHON_INLINE PyObject *__Pyx_GetModuleGlobalName(PyObject *name) { PyObject *result; #if CYTHON_COMPILING_IN_CPYTHON result = PyDict_GetItem(__pyx_d, name); if (result) { Py_INCREF(result); } else { #else result = PyObject_GetItem(__pyx_d, name); if (!result) { PyErr_Clear(); #endif result = __Pyx_GetBuiltinName(name); } return result; } static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type) { if (unlikely(!type)) { PyErr_Format(PyExc_SystemError, "Missing type object"); return 0; } if (likely(PyObject_TypeCheck(obj, type))) return 1; PyErr_Format(PyExc_TypeError, "Cannot convert %.200s to %.200s", Py_TYPE(obj)->tp_name, type->tp_name); return 0; } static CYTHON_INLINE int __Pyx_IsLittleEndian(void) { unsigned int n = 1; return *(unsigned char*)(&n) != 0; } 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) /* First char was not a digit */ 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; /* Consume from buffer string */ while (1) { if (field == &ctx->root) { ctx->head = NULL; if (ctx->enc_count != 0) { __Pyx_BufFmt_RaiseExpected(ctx); return -1; } break; /* breaks both loops as ctx->enc_count == 0 */ } 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; /* empty struct */ 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 CYTHON_INLINE 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 != ')') { if (isspace(*ts)) continue; 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 10: case 13: ++ts; break; case '<': if (!__Pyx_IsLittleEndian()) { PyErr_SetString(PyExc_ValueError, "Little-endian buffer not supported on big-endian compiler"); return NULL; } ctx->new_packmode = '='; ++ts; break; case '>': case '!': if (__Pyx_IsLittleEndian()) { 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': /* substruct */ { 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; /* Erase processed last struct element */ 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 '}': /* end of substruct; either repeat or move on */ { size_t alignment = ctx->struct_alignment; ++ts; if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL; ctx->enc_type = 0; /* Erase processed last struct element */ 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; } /* fall through */ 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 's': case 'p': if (ctx->enc_type == *ts && got_Z == ctx->is_complex && ctx->enc_packmode == ctx->new_packmode) { ctx->enc_count += ctx->new_count; } else { 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; } } } } static CYTHON_INLINE 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 CYTHON_INLINE int __Pyx_GetBufferAndValidate( Py_buffer* buf, PyObject* obj, __Pyx_TypeInfo* dtype, int flags, int nd, int cast, __Pyx_BufFmt_StackElem* stack) { if (obj == Py_None || obj == NULL) { __Pyx_ZeroBuffer(buf); return 0; } buf->buf = NULL; if (__Pyx_GetBuffer(obj, buf, flags) == -1) goto fail; if (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 ((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_ZeroBuffer(buf); return -1; } static CYTHON_INLINE void __Pyx_SafeReleaseBuffer(Py_buffer* info) { if (info->buf == NULL) return; if (info->suboffsets == __Pyx_minusones) info->suboffsets = NULL; __Pyx_ReleaseBuffer(info); } static void __Pyx_RaiseBufferFallbackError(void) { PyErr_Format(PyExc_ValueError, "Buffer acquisition failed on assignment; and then reacquiring the old buffer failed too!"); } static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j) { PyObject *r; if (!j) return NULL; r = PyObject_GetItem(o, j); Py_DECREF(j); return r; } static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i, int wraparound, int boundscheck) { #if CYTHON_COMPILING_IN_CPYTHON if (wraparound & unlikely(i < 0)) i += PyList_GET_SIZE(o); if ((!boundscheck) || likely((0 <= i) & (i < PyList_GET_SIZE(o)))) { PyObject *r = PyList_GET_ITEM(o, i); Py_INCREF(r); return r; } return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i)); #else return PySequence_GetItem(o, i); #endif } static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i, int wraparound, int boundscheck) { #if CYTHON_COMPILING_IN_CPYTHON if (wraparound & unlikely(i < 0)) i += PyTuple_GET_SIZE(o); if ((!boundscheck) || likely((0 <= i) & (i < PyTuple_GET_SIZE(o)))) { PyObject *r = PyTuple_GET_ITEM(o, i); Py_INCREF(r); return r; } return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i)); #else return PySequence_GetItem(o, i); #endif } static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, int is_list, int wraparound, int boundscheck) { #if CYTHON_COMPILING_IN_CPYTHON if (is_list || PyList_CheckExact(o)) { Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyList_GET_SIZE(o); if ((!boundscheck) || (likely((n >= 0) & (n < PyList_GET_SIZE(o))))) { PyObject *r = PyList_GET_ITEM(o, n); Py_INCREF(r); return r; } } else if (PyTuple_CheckExact(o)) { Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyTuple_GET_SIZE(o); if ((!boundscheck) || likely((n >= 0) & (n < PyTuple_GET_SIZE(o)))) { PyObject *r = PyTuple_GET_ITEM(o, n); Py_INCREF(r); return r; } } else { PySequenceMethods *m = Py_TYPE(o)->tp_as_sequence; if (likely(m && m->sq_item)) { if (wraparound && unlikely(i < 0) && likely(m->sq_length)) { Py_ssize_t l = m->sq_length(o); if (likely(l >= 0)) { i += l; } else { if (PyErr_ExceptionMatches(PyExc_OverflowError)) PyErr_Clear(); else return NULL; } } 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)); } static void __Pyx_RaiseBufferIndexError(int axis) { PyErr_Format(PyExc_IndexError, "Out of bounds on buffer access (axis %d)", axis); } static CYTHON_INLINE void __Pyx_ErrRestore(PyObject *type, PyObject *value, PyObject *tb) { #if CYTHON_COMPILING_IN_CPYTHON PyObject *tmp_type, *tmp_value, *tmp_tb; PyThreadState *tstate = PyThreadState_GET(); 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); #else PyErr_Restore(type, value, tb); #endif } static CYTHON_INLINE void __Pyx_ErrFetch(PyObject **type, PyObject **value, PyObject **tb) { #if CYTHON_COMPILING_IN_CPYTHON PyThreadState *tstate = PyThreadState_GET(); *type = tstate->curexc_type; *value = tstate->curexc_value; *tb = tstate->curexc_traceback; tstate->curexc_type = 0; tstate->curexc_value = 0; tstate->curexc_traceback = 0; #else PyErr_Fetch(type, value, tb); #endif } 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, "%s() takes %s %" CYTHON_FORMAT_SSIZE_T "d positional argument%s (%" CYTHON_FORMAT_SSIZE_T "d given)", func_name, more_or_less, num_expected, (num_expected == 1) ? "" : "s", num_found); } static CYTHON_INLINE int __Pyx_CheckKeywordStrings( PyObject *kwdict, const char* function_name, int kw_allowed) { PyObject* key = 0; Py_ssize_t pos = 0; #if CPYTHON_COMPILING_IN_PYPY if (!kw_allowed && PyDict_Next(kwdict, &pos, &key, 0)) goto invalid_keyword; return 1; #else while (PyDict_Next(kwdict, &pos, &key, 0)) { #if PY_MAJOR_VERSION < 3 if (unlikely(!PyString_CheckExact(key)) && unlikely(!PyString_Check(key))) #endif if (unlikely(!PyUnicode_Check(key))) goto invalid_keyword_type; } if ((!kw_allowed) && unlikely(key)) goto invalid_keyword; return 1; invalid_keyword_type: PyErr_Format(PyExc_TypeError, "%s() keywords must be strings", function_name); return 0; #endif invalid_keyword: PyErr_Format(PyExc_TypeError, #if PY_MAJOR_VERSION < 3 "%s() got an unexpected keyword argument '%s'", function_name, PyString_AsString(key)); #else "%s() got an unexpected keyword argument '%U'", function_name, key); #endif return 0; } 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 } 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, "%s() keywords must be strings", function_name); goto bad; invalid_keyword: PyErr_Format(PyExc_TypeError, #if PY_MAJOR_VERSION < 3 "%s() got an unexpected keyword argument '%s'", function_name, PyString_AsString(key)); #else "%s() got an unexpected keyword argument '%U'", function_name, key); #endif bad: return -1; } #if PY_MAJOR_VERSION < 3 static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, CYTHON_UNUSED PyObject *cause) { 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 PY_VERSION_HEX < 0x02050000 if (PyClass_Check(type)) { #else if (PyType_Check(type)) { #endif #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; #if PY_VERSION_HEX < 0x02050000 if (PyInstance_Check(type)) { type = (PyObject*) ((PyInstanceObject*)type)->in_class; Py_INCREF(type); } else { type = 0; PyErr_SetString(PyExc_TypeError, "raise: exception must be an old-style class or instance"); goto raise_error; } #else 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; } #endif } __Pyx_ErrRestore(type, value, tb); return; raise_error: Py_XDECREF(value); Py_XDECREF(type); Py_XDECREF(tb); return; } #else /* Python 3+ */ 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 *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 = PyEval_CallObject(type, args); Py_DECREF(args); if (!owned_instance) goto bad; value = owned_instance; if (!PyExceptionInstance_Check(value)) { PyErr_Format(PyExc_TypeError, "calling %R should have returned an instance of " "BaseException, not %R", type, Py_TYPE(value)); goto bad; } } else { PyErr_SetString(PyExc_TypeError, "raise: exception class must be a subclass of BaseException"); goto bad; } #if PY_VERSION_HEX >= 0x03030000 if (cause) { #else if (cause && cause != Py_None) { #endif PyObject *fixed_cause; if (cause == Py_None) { fixed_cause = NULL; } else if (PyExceptionClass_Check(cause)) { fixed_cause = PyObject_CallObject(cause, NULL); if (fixed_cause == NULL) goto bad; } else if (PyExceptionInstance_Check(cause)) { fixed_cause = cause; Py_INCREF(fixed_cause); } else { PyErr_SetString(PyExc_TypeError, "exception causes must derive from " "BaseException"); goto bad; } PyException_SetCause(value, fixed_cause); } PyErr_SetObject(type, value); if (tb) { PyThreadState *tstate = PyThreadState_GET(); PyObject* tmp_tb = tstate->curexc_traceback; if (tb != tmp_tb) { Py_INCREF(tb); tstate->curexc_traceback = tb; Py_XDECREF(tmp_tb); } } bad: Py_XDECREF(owned_instance); return; } #endif static CYTHON_INLINE int __Pyx_SetItemInt_Generic(PyObject *o, PyObject *j, PyObject *v) { int r; if (!j) return -1; r = PyObject_SetItem(o, j, v); Py_DECREF(j); return r; } static CYTHON_INLINE int __Pyx_SetItemInt_Fast(PyObject *o, Py_ssize_t i, PyObject *v, int is_list, int wraparound, int boundscheck) { #if CYTHON_COMPILING_IN_CPYTHON if (is_list || PyList_CheckExact(o)) { Py_ssize_t n = (!wraparound) ? i : ((likely(i >= 0)) ? i : i + PyList_GET_SIZE(o)); if ((!boundscheck) || likely((n >= 0) & (n < PyList_GET_SIZE(o)))) { PyObject* old = PyList_GET_ITEM(o, n); Py_INCREF(v); PyList_SET_ITEM(o, n, v); Py_DECREF(old); return 1; } } else { PySequenceMethods *m = Py_TYPE(o)->tp_as_sequence; if (likely(m && m->sq_ass_item)) { if (wraparound && unlikely(i < 0) && likely(m->sq_length)) { Py_ssize_t l = m->sq_length(o); if (likely(l >= 0)) { i += l; } else { if (PyErr_ExceptionMatches(PyExc_OverflowError)) PyErr_Clear(); else return -1; } } return m->sq_ass_item(o, i, v); } } #else #if CYTHON_COMPILING_IN_PYPY if (is_list || (PySequence_Check(o) && !PyDict_Check(o))) { #else if (is_list || PySequence_Check(o)) { #endif return PySequence_SetItem(o, i, v); } #endif return __Pyx_SetItemInt_Generic(o, PyInt_FromSsize_t(i), v); } static CYTHON_INLINE Py_ssize_t __Pyx_div_Py_ssize_t(Py_ssize_t a, Py_ssize_t b) { Py_ssize_t q = a / b; Py_ssize_t r = a - q*b; q -= ((r != 0) & ((r ^ b) < 0)); return q; } static CYTHON_INLINE PyObject* __Pyx_PyObject_GetSlice( PyObject* obj, Py_ssize_t cstart, Py_ssize_t cstop, PyObject** _py_start, PyObject** _py_stop, PyObject** _py_slice, int has_cstart, int has_cstop, CYTHON_UNUSED int wraparound) { #if CYTHON_COMPILING_IN_CPYTHON PyMappingMethods* mp; #if PY_MAJOR_VERSION < 3 PySequenceMethods* ms = Py_TYPE(obj)->tp_as_sequence; if (likely(ms && ms->sq_slice)) { if (!has_cstart) { if (_py_start && (*_py_start != Py_None)) { cstart = __Pyx_PyIndex_AsSsize_t(*_py_start); if ((cstart == (Py_ssize_t)-1) && PyErr_Occurred()) goto bad; } else cstart = 0; } if (!has_cstop) { if (_py_stop && (*_py_stop != Py_None)) { cstop = __Pyx_PyIndex_AsSsize_t(*_py_stop); if ((cstop == (Py_ssize_t)-1) && PyErr_Occurred()) goto bad; } else cstop = PY_SSIZE_T_MAX; } if (wraparound && unlikely((cstart < 0) | (cstop < 0)) && likely(ms->sq_length)) { Py_ssize_t l = ms->sq_length(obj); if (likely(l >= 0)) { if (cstop < 0) { cstop += l; if (cstop < 0) cstop = 0; } if (cstart < 0) { cstart += l; if (cstart < 0) cstart = 0; } } else { if (PyErr_ExceptionMatches(PyExc_OverflowError)) PyErr_Clear(); else goto bad; } } return ms->sq_slice(obj, cstart, cstop); } #endif mp = Py_TYPE(obj)->tp_as_mapping; if (likely(mp && mp->mp_subscript)) #endif { PyObject* result; PyObject *py_slice, *py_start, *py_stop; if (_py_slice) { py_slice = *_py_slice; } else { PyObject* owned_start = NULL; PyObject* owned_stop = NULL; if (_py_start) { py_start = *_py_start; } else { if (has_cstart) { owned_start = py_start = PyInt_FromSsize_t(cstart); if (unlikely(!py_start)) goto bad; } else py_start = Py_None; } if (_py_stop) { py_stop = *_py_stop; } else { if (has_cstop) { owned_stop = py_stop = PyInt_FromSsize_t(cstop); if (unlikely(!py_stop)) { Py_XDECREF(owned_start); goto bad; } } else py_stop = Py_None; } py_slice = PySlice_New(py_start, py_stop, Py_None); Py_XDECREF(owned_start); Py_XDECREF(owned_stop); if (unlikely(!py_slice)) goto bad; } #if CYTHON_COMPILING_IN_CPYTHON result = mp->mp_subscript(obj, py_slice); #else result = PyObject_GetItem(obj, py_slice); #endif if (!_py_slice) { Py_DECREF(py_slice); } return result; } PyErr_Format(PyExc_TypeError, "'%.200s' object is unsliceable", Py_TYPE(obj)->tp_name); bad: return NULL; } static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb) { PyObject *local_type, *local_value, *local_tb; #if CYTHON_COMPILING_IN_CPYTHON PyObject *tmp_type, *tmp_value, *tmp_tb; PyThreadState *tstate = PyThreadState_GET(); local_type = tstate->curexc_type; local_value = tstate->curexc_value; local_tb = tstate->curexc_traceback; tstate->curexc_type = 0; tstate->curexc_value = 0; tstate->curexc_traceback = 0; #else PyErr_Fetch(&local_type, &local_value, &local_tb); #endif PyErr_NormalizeException(&local_type, &local_value, &local_tb); #if CYTHON_COMPILING_IN_CPYTHON if (unlikely(tstate->curexc_type)) #else if (unlikely(PyErr_Occurred())) #endif goto bad; #if PY_MAJOR_VERSION >= 3 if (unlikely(PyException_SetTraceback(local_value, local_tb) < 0)) goto bad; #endif Py_INCREF(local_type); Py_INCREF(local_value); Py_INCREF(local_tb); *type = local_type; *value = local_value; *tb = local_tb; #if CYTHON_COMPILING_IN_CPYTHON tmp_type = tstate->exc_type; tmp_value = tstate->exc_value; tmp_tb = tstate->exc_traceback; tstate->exc_type = local_type; tstate->exc_value = local_value; tstate->exc_traceback = local_tb; /* Make sure tstate is in a consistent state when we XDECREF these objects (DECREF may run arbitrary code). */ 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; } static void __Pyx_WriteUnraisable(const char *name, CYTHON_UNUSED int clineno, CYTHON_UNUSED int lineno, CYTHON_UNUSED const char *filename) { PyObject *old_exc, *old_val, *old_tb; PyObject *ctx; __Pyx_ErrFetch(&old_exc, &old_val, &old_tb); #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); } } 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); } static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index) { PyErr_Format(PyExc_ValueError, "need more than %" CYTHON_FORMAT_SSIZE_T "d value%s to unpack", index, (index == 1) ? "" : "s"); } static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); } static CYTHON_INLINE int __Pyx_IterFinish(void) { #if CYTHON_COMPILING_IN_CPYTHON PyThreadState *tstate = PyThreadState_GET(); PyObject* exc_type = tstate->curexc_type; if (unlikely(exc_type)) { if (likely(exc_type == PyExc_StopIteration) || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration)) { PyObject *exc_value, *exc_tb; exc_value = tstate->curexc_value; exc_tb = tstate->curexc_traceback; tstate->curexc_type = 0; tstate->curexc_value = 0; tstate->curexc_traceback = 0; Py_DECREF(exc_type); Py_XDECREF(exc_value); Py_XDECREF(exc_tb); return 0; } else { return -1; } } return 0; #else if (unlikely(PyErr_Occurred())) { if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) { PyErr_Clear(); return 0; } else { return -1; } } return 0; #endif } 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; } static int __Pyx_SetVtable(PyObject *dict, void *vtable) { #if PY_VERSION_HEX >= 0x02070000 && !(PY_MAJOR_VERSION==3&&PY_MINOR_VERSION==0) 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; } #if PY_MAJOR_VERSION < 3 static int __Pyx_GetBuffer(PyObject *obj, Py_buffer *view, int flags) { #if PY_VERSION_HEX >= 0x02060000 if (PyObject_CheckBuffer(obj)) return PyObject_GetBuffer(obj, view, flags); #endif if (PyObject_TypeCheck(obj, __pyx_ptype_5numpy_ndarray)) return __pyx_pw_5numpy_7ndarray_1__getbuffer__(obj, view, flags); #if PY_VERSION_HEX < 0x02060000 if (obj->ob_type->tp_dict) { PyObject *getbuffer_cobj = PyObject_GetItem( obj->ob_type->tp_dict, __pyx_n_s____pyx_getbuffer); if (getbuffer_cobj) { getbufferproc func = (getbufferproc) PyCObject_AsVoidPtr(getbuffer_cobj); Py_DECREF(getbuffer_cobj); if (!func) goto fail; return func(obj, view, flags); } else { PyErr_Clear(); } } #endif PyErr_Format(PyExc_TypeError, "'%100s' does not have the buffer interface", Py_TYPE(obj)->tp_name); #if PY_VERSION_HEX < 0x02060000 fail: #endif return -1; } static void __Pyx_ReleaseBuffer(Py_buffer *view) { PyObject *obj = view->obj; if (!obj) return; #if PY_VERSION_HEX >= 0x02060000 if (PyObject_CheckBuffer(obj)) { PyBuffer_Release(view); return; } #endif if (PyObject_TypeCheck(obj, __pyx_ptype_5numpy_ndarray)) { __pyx_pw_5numpy_7ndarray_3__releasebuffer__(obj, view); return; } #if PY_VERSION_HEX < 0x02060000 if (obj->ob_type->tp_dict) { PyObject *releasebuffer_cobj = PyObject_GetItem( obj->ob_type->tp_dict, __pyx_n_s____pyx_releasebuffer); if (releasebuffer_cobj) { releasebufferproc func = (releasebufferproc) PyCObject_AsVoidPtr(releasebuffer_cobj); Py_DECREF(releasebuffer_cobj); if (!func) goto fail; func(obj, view); return; } else { PyErr_Clear(); } } #endif goto nofail; #if PY_VERSION_HEX < 0x02060000 fail: #endif PyErr_WriteUnraisable(obj); nofail: Py_DECREF(obj); view->obj = NULL; } #endif /* PY_MAJOR_VERSION < 3 */ static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level) { PyObject *empty_list = 0; PyObject *module = 0; PyObject *global_dict = 0; PyObject *empty_dict = 0; PyObject *list; #if PY_VERSION_HEX < 0x03030000 PyObject *py_import; py_import = __Pyx_PyObject_GetAttrStr(__pyx_b, __pyx_n_s____import__); if (!py_import) goto bad; #endif if (from_list) list = from_list; else { empty_list = PyList_New(0); if (!empty_list) goto bad; list = empty_list; } global_dict = PyModule_GetDict(__pyx_m); if (!global_dict) goto bad; empty_dict = PyDict_New(); if (!empty_dict) goto bad; #if PY_VERSION_HEX >= 0x02050000 { #if PY_MAJOR_VERSION >= 3 if (level == -1) { if (strchr(__Pyx_MODULE_NAME, '.')) { #if PY_VERSION_HEX < 0x03030000 PyObject *py_level = PyInt_FromLong(1); if (!py_level) goto bad; module = PyObject_CallFunctionObjArgs(py_import, name, global_dict, empty_dict, list, py_level, NULL); Py_DECREF(py_level); #else module = PyImport_ImportModuleLevelObject( name, global_dict, empty_dict, list, 1); #endif if (!module) { if (!PyErr_ExceptionMatches(PyExc_ImportError)) goto bad; PyErr_Clear(); } } level = 0; /* try absolute import on failure */ } #endif if (!module) { #if PY_VERSION_HEX < 0x03030000 PyObject *py_level = PyInt_FromLong(level); if (!py_level) goto bad; module = PyObject_CallFunctionObjArgs(py_import, name, global_dict, empty_dict, list, py_level, NULL); Py_DECREF(py_level); #else module = PyImport_ImportModuleLevelObject( name, global_dict, empty_dict, list, level); #endif } } #else if (level>0) { PyErr_SetString(PyExc_RuntimeError, "Relative import is not supported for Python <=2.4."); goto bad; } module = PyObject_CallFunctionObjArgs(py_import, name, global_dict, empty_dict, list, NULL); #endif bad: #if PY_VERSION_HEX < 0x03030000 Py_XDECREF(py_import); #endif Py_XDECREF(empty_list); Py_XDECREF(empty_dict); return module; } static CYTHON_INLINE npy_int32 __Pyx_PyInt_from_py_npy_int32(PyObject* x) { const npy_int32 neg_one = (npy_int32)-1, const_zero = (npy_int32)0; const int is_unsigned = const_zero < neg_one; if (sizeof(npy_int32) == sizeof(char)) { if (is_unsigned) return (npy_int32)__Pyx_PyInt_AsUnsignedChar(x); else return (npy_int32)__Pyx_PyInt_AsSignedChar(x); } else if (sizeof(npy_int32) == sizeof(short)) { if (is_unsigned) return (npy_int32)__Pyx_PyInt_AsUnsignedShort(x); else return (npy_int32)__Pyx_PyInt_AsSignedShort(x); } else if (sizeof(npy_int32) == sizeof(int)) { if (is_unsigned) return (npy_int32)__Pyx_PyInt_AsUnsignedInt(x); else return (npy_int32)__Pyx_PyInt_AsSignedInt(x); } else if (sizeof(npy_int32) == sizeof(long)) { if (is_unsigned) return (npy_int32)__Pyx_PyInt_AsUnsignedLong(x); else return (npy_int32)__Pyx_PyInt_AsSignedLong(x); } else if (sizeof(npy_int32) == sizeof(PY_LONG_LONG)) { if (is_unsigned) return (npy_int32)__Pyx_PyInt_AsUnsignedLongLong(x); else return (npy_int32)__Pyx_PyInt_AsSignedLongLong(x); } else { #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_Int(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; } } static CYTHON_INLINE npy_int64 __Pyx_PyInt_from_py_npy_int64(PyObject* x) { const npy_int64 neg_one = (npy_int64)-1, const_zero = (npy_int64)0; const int is_unsigned = const_zero < neg_one; if (sizeof(npy_int64) == sizeof(char)) { if (is_unsigned) return (npy_int64)__Pyx_PyInt_AsUnsignedChar(x); else return (npy_int64)__Pyx_PyInt_AsSignedChar(x); } else if (sizeof(npy_int64) == sizeof(short)) { if (is_unsigned) return (npy_int64)__Pyx_PyInt_AsUnsignedShort(x); else return (npy_int64)__Pyx_PyInt_AsSignedShort(x); } else if (sizeof(npy_int64) == sizeof(int)) { if (is_unsigned) return (npy_int64)__Pyx_PyInt_AsUnsignedInt(x); else return (npy_int64)__Pyx_PyInt_AsSignedInt(x); } else if (sizeof(npy_int64) == sizeof(long)) { if (is_unsigned) return (npy_int64)__Pyx_PyInt_AsUnsignedLong(x); else return (npy_int64)__Pyx_PyInt_AsSignedLong(x); } else if (sizeof(npy_int64) == sizeof(PY_LONG_LONG)) { if (is_unsigned) return (npy_int64)__Pyx_PyInt_AsUnsignedLongLong(x); else return (npy_int64)__Pyx_PyInt_AsSignedLongLong(x); } else { #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_Int(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; } } static CYTHON_INLINE npy_uint32 __Pyx_PyInt_from_py_npy_uint32(PyObject* x) { const npy_uint32 neg_one = (npy_uint32)-1, const_zero = (npy_uint32)0; const int is_unsigned = const_zero < neg_one; if (sizeof(npy_uint32) == sizeof(char)) { if (is_unsigned) return (npy_uint32)__Pyx_PyInt_AsUnsignedChar(x); else return (npy_uint32)__Pyx_PyInt_AsSignedChar(x); } else if (sizeof(npy_uint32) == sizeof(short)) { if (is_unsigned) return (npy_uint32)__Pyx_PyInt_AsUnsignedShort(x); else return (npy_uint32)__Pyx_PyInt_AsSignedShort(x); } else if (sizeof(npy_uint32) == sizeof(int)) { if (is_unsigned) return (npy_uint32)__Pyx_PyInt_AsUnsignedInt(x); else return (npy_uint32)__Pyx_PyInt_AsSignedInt(x); } else if (sizeof(npy_uint32) == sizeof(long)) { if (is_unsigned) return (npy_uint32)__Pyx_PyInt_AsUnsignedLong(x); else return (npy_uint32)__Pyx_PyInt_AsSignedLong(x); } else if (sizeof(npy_uint32) == sizeof(PY_LONG_LONG)) { if (is_unsigned) return (npy_uint32)__Pyx_PyInt_AsUnsignedLongLong(x); else return (npy_uint32)__Pyx_PyInt_AsSignedLongLong(x); } else { #if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray) PyErr_SetString(PyExc_RuntimeError, "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers"); #else npy_uint32 val; PyObject *v = __Pyx_PyNumber_Int(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_uint32)-1; } } static CYTHON_INLINE PyObject *__Pyx_PyInt_to_py_npy_int32(npy_int32 val) { const npy_int32 neg_one = (npy_int32)-1, const_zero = (npy_int32)0; const int is_unsigned = const_zero < neg_one; if ((sizeof(npy_int32) == sizeof(char)) || (sizeof(npy_int32) == sizeof(short))) { return PyInt_FromLong((long)val); } else if ((sizeof(npy_int32) == sizeof(int)) || (sizeof(npy_int32) == sizeof(long))) { if (is_unsigned) return PyLong_FromUnsignedLong((unsigned long)val); else return PyInt_FromLong((long)val); } else if (sizeof(npy_int32) == sizeof(PY_LONG_LONG)) { if (is_unsigned) return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG)val); else return PyLong_FromLongLong((PY_LONG_LONG)val); } else { int one = 1; int little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&val; return _PyLong_FromByteArray(bytes, sizeof(npy_int32), little, !is_unsigned); } } static CYTHON_INLINE PyObject *__Pyx_PyInt_to_py_npy_int64(npy_int64 val) { const npy_int64 neg_one = (npy_int64)-1, const_zero = (npy_int64)0; const int is_unsigned = const_zero < neg_one; if ((sizeof(npy_int64) == sizeof(char)) || (sizeof(npy_int64) == sizeof(short))) { return PyInt_FromLong((long)val); } else if ((sizeof(npy_int64) == sizeof(int)) || (sizeof(npy_int64) == sizeof(long))) { if (is_unsigned) return PyLong_FromUnsignedLong((unsigned long)val); else return PyInt_FromLong((long)val); } else if (sizeof(npy_int64) == sizeof(PY_LONG_LONG)) { if (is_unsigned) return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG)val); else return PyLong_FromLongLong((PY_LONG_LONG)val); } else { int one = 1; int little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&val; return _PyLong_FromByteArray(bytes, sizeof(npy_int64), little, !is_unsigned); } } static CYTHON_INLINE PyObject *__Pyx_PyInt_to_py_npy_uint32(npy_uint32 val) { const npy_uint32 neg_one = (npy_uint32)-1, const_zero = (npy_uint32)0; const int is_unsigned = const_zero < neg_one; if ((sizeof(npy_uint32) == sizeof(char)) || (sizeof(npy_uint32) == sizeof(short))) { return PyInt_FromLong((long)val); } else if ((sizeof(npy_uint32) == sizeof(int)) || (sizeof(npy_uint32) == sizeof(long))) { if (is_unsigned) return PyLong_FromUnsignedLong((unsigned long)val); else return PyInt_FromLong((long)val); } else if (sizeof(npy_uint32) == sizeof(PY_LONG_LONG)) { if (is_unsigned) return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG)val); else return PyLong_FromLongLong((PY_LONG_LONG)val); } else { int one = 1; int little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&val; return _PyLong_FromByteArray(bytes, sizeof(npy_uint32), little, !is_unsigned); } } static CYTHON_INLINE void __Pyx_ExceptionSave(PyObject **type, PyObject **value, PyObject **tb) { #if CYTHON_COMPILING_IN_CPYTHON PyThreadState *tstate = PyThreadState_GET(); *type = tstate->exc_type; *value = tstate->exc_value; *tb = tstate->exc_traceback; Py_XINCREF(*type); Py_XINCREF(*value); Py_XINCREF(*tb); #else PyErr_GetExcInfo(type, value, tb); #endif } static void __Pyx_ExceptionReset(PyObject *type, PyObject *value, PyObject *tb) { #if CYTHON_COMPILING_IN_CPYTHON PyObject *tmp_type, *tmp_value, *tmp_tb; PyThreadState *tstate = PyThreadState_GET(); tmp_type = tstate->exc_type; tmp_value = tstate->exc_value; tmp_tb = tstate->exc_traceback; tstate->exc_type = type; tstate->exc_value = value; tstate->exc_traceback = tb; Py_XDECREF(tmp_type); Py_XDECREF(tmp_value); Py_XDECREF(tmp_tb); #else PyErr_SetExcInfo(type, value, tb); #endif } #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 #if CYTHON_CCOMPLEX #else static CYTHON_INLINE int __Pyx_c_eqf(__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_sumf(__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_difff(__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_prodf(__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; } static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_quotf(__pyx_t_float_complex a, __pyx_t_float_complex b) { __pyx_t_float_complex z; float denom = b.real * b.real + b.imag * b.imag; z.real = (a.real * b.real + a.imag * b.imag) / denom; z.imag = (a.imag * b.real - a.real * b.imag) / denom; return z; } static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_negf(__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_zerof(__pyx_t_float_complex a) { return (a.real == 0) && (a.imag == 0); } static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_conjf(__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_absf(__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_powf(__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_prodf(a, a); return __Pyx_c_prodf(a, a); case 3: z = __Pyx_c_prodf(a, a); return __Pyx_c_prodf(z, a); case 4: z = __Pyx_c_prodf(a, a); return __Pyx_c_prodf(z, z); } } if (a.imag == 0) { if (a.real == 0) { return a; } r = a.real; theta = 0; } else { r = __Pyx_c_absf(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 #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 #if CYTHON_CCOMPLEX #else static CYTHON_INLINE int __Pyx_c_eq(__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(__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(__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(__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; } static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_quot(__pyx_t_double_complex a, __pyx_t_double_complex b) { __pyx_t_double_complex z; double denom = b.real * b.real + b.imag * b.imag; z.real = (a.real * b.real + a.imag * b.imag) / denom; z.imag = (a.imag * b.real - a.real * b.imag) / denom; return z; } static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_neg(__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(__pyx_t_double_complex a) { return (a.real == 0) && (a.imag == 0); } static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_conj(__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(__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(__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(a, a); return __Pyx_c_prod(a, a); case 3: z = __Pyx_c_prod(a, a); return __Pyx_c_prod(z, a); case 4: z = __Pyx_c_prod(a, a); return __Pyx_c_prod(z, z); } } if (a.imag == 0) { if (a.real == 0) { return a; } r = a.real; theta = 0; } else { r = __Pyx_c_abs(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 static CYTHON_INLINE unsigned char __Pyx_PyInt_AsUnsignedChar(PyObject* x) { const unsigned char neg_one = (unsigned char)-1, const_zero = 0; const int is_unsigned = neg_one > const_zero; if (sizeof(unsigned char) < sizeof(long)) { long val = __Pyx_PyInt_AsLong(x); if (unlikely(val != (long)(unsigned char)val)) { if (!unlikely(val == -1 && PyErr_Occurred())) { PyErr_SetString(PyExc_OverflowError, (is_unsigned && unlikely(val < 0)) ? "can't convert negative value to unsigned char" : "value too large to convert to unsigned char"); } return (unsigned char)-1; } return (unsigned char)val; } return (unsigned char)__Pyx_PyInt_AsUnsignedLong(x); } static CYTHON_INLINE unsigned short __Pyx_PyInt_AsUnsignedShort(PyObject* x) { const unsigned short neg_one = (unsigned short)-1, const_zero = 0; const int is_unsigned = neg_one > const_zero; if (sizeof(unsigned short) < sizeof(long)) { long val = __Pyx_PyInt_AsLong(x); if (unlikely(val != (long)(unsigned short)val)) { if (!unlikely(val == -1 && PyErr_Occurred())) { PyErr_SetString(PyExc_OverflowError, (is_unsigned && unlikely(val < 0)) ? "can't convert negative value to unsigned short" : "value too large to convert to unsigned short"); } return (unsigned short)-1; } return (unsigned short)val; } return (unsigned short)__Pyx_PyInt_AsUnsignedLong(x); } static CYTHON_INLINE unsigned int __Pyx_PyInt_AsUnsignedInt(PyObject* x) { const unsigned int neg_one = (unsigned int)-1, const_zero = 0; const int is_unsigned = neg_one > const_zero; if (sizeof(unsigned int) < sizeof(long)) { long val = __Pyx_PyInt_AsLong(x); if (unlikely(val != (long)(unsigned int)val)) { if (!unlikely(val == -1 && PyErr_Occurred())) { PyErr_SetString(PyExc_OverflowError, (is_unsigned && unlikely(val < 0)) ? "can't convert negative value to unsigned int" : "value too large to convert to unsigned int"); } return (unsigned int)-1; } return (unsigned int)val; } return (unsigned int)__Pyx_PyInt_AsUnsignedLong(x); } static CYTHON_INLINE char __Pyx_PyInt_AsChar(PyObject* x) { const char neg_one = (char)-1, const_zero = 0; const int is_unsigned = neg_one > const_zero; if (sizeof(char) < sizeof(long)) { long val = __Pyx_PyInt_AsLong(x); if (unlikely(val != (long)(char)val)) { if (!unlikely(val == -1 && PyErr_Occurred())) { PyErr_SetString(PyExc_OverflowError, (is_unsigned && unlikely(val < 0)) ? "can't convert negative value to char" : "value too large to convert to char"); } return (char)-1; } return (char)val; } return (char)__Pyx_PyInt_AsLong(x); } static CYTHON_INLINE short __Pyx_PyInt_AsShort(PyObject* x) { const short neg_one = (short)-1, const_zero = 0; const int is_unsigned = neg_one > const_zero; if (sizeof(short) < sizeof(long)) { long val = __Pyx_PyInt_AsLong(x); if (unlikely(val != (long)(short)val)) { if (!unlikely(val == -1 && PyErr_Occurred())) { PyErr_SetString(PyExc_OverflowError, (is_unsigned && unlikely(val < 0)) ? "can't convert negative value to short" : "value too large to convert to short"); } return (short)-1; } return (short)val; } return (short)__Pyx_PyInt_AsLong(x); } static CYTHON_INLINE int __Pyx_PyInt_AsInt(PyObject* x) { const int neg_one = (int)-1, const_zero = 0; const int is_unsigned = neg_one > const_zero; if (sizeof(int) < sizeof(long)) { long val = __Pyx_PyInt_AsLong(x); if (unlikely(val != (long)(int)val)) { if (!unlikely(val == -1 && PyErr_Occurred())) { PyErr_SetString(PyExc_OverflowError, (is_unsigned && unlikely(val < 0)) ? "can't convert negative value to int" : "value too large to convert to int"); } return (int)-1; } return (int)val; } return (int)__Pyx_PyInt_AsLong(x); } static CYTHON_INLINE signed char __Pyx_PyInt_AsSignedChar(PyObject* x) { const signed char neg_one = (signed char)-1, const_zero = 0; const int is_unsigned = neg_one > const_zero; if (sizeof(signed char) < sizeof(long)) { long val = __Pyx_PyInt_AsLong(x); if (unlikely(val != (long)(signed char)val)) { if (!unlikely(val == -1 && PyErr_Occurred())) { PyErr_SetString(PyExc_OverflowError, (is_unsigned && unlikely(val < 0)) ? "can't convert negative value to signed char" : "value too large to convert to signed char"); } return (signed char)-1; } return (signed char)val; } return (signed char)__Pyx_PyInt_AsSignedLong(x); } static CYTHON_INLINE signed short __Pyx_PyInt_AsSignedShort(PyObject* x) { const signed short neg_one = (signed short)-1, const_zero = 0; const int is_unsigned = neg_one > const_zero; if (sizeof(signed short) < sizeof(long)) { long val = __Pyx_PyInt_AsLong(x); if (unlikely(val != (long)(signed short)val)) { if (!unlikely(val == -1 && PyErr_Occurred())) { PyErr_SetString(PyExc_OverflowError, (is_unsigned && unlikely(val < 0)) ? "can't convert negative value to signed short" : "value too large to convert to signed short"); } return (signed short)-1; } return (signed short)val; } return (signed short)__Pyx_PyInt_AsSignedLong(x); } static CYTHON_INLINE signed int __Pyx_PyInt_AsSignedInt(PyObject* x) { const signed int neg_one = (signed int)-1, const_zero = 0; const int is_unsigned = neg_one > const_zero; if (sizeof(signed int) < sizeof(long)) { long val = __Pyx_PyInt_AsLong(x); if (unlikely(val != (long)(signed int)val)) { if (!unlikely(val == -1 && PyErr_Occurred())) { PyErr_SetString(PyExc_OverflowError, (is_unsigned && unlikely(val < 0)) ? "can't convert negative value to signed int" : "value too large to convert to signed int"); } return (signed int)-1; } return (signed int)val; } return (signed int)__Pyx_PyInt_AsSignedLong(x); } static CYTHON_INLINE int __Pyx_PyInt_AsLongDouble(PyObject* x) { const int neg_one = (int)-1, const_zero = 0; const int is_unsigned = neg_one > const_zero; if (sizeof(int) < sizeof(long)) { long val = __Pyx_PyInt_AsLong(x); if (unlikely(val != (long)(int)val)) { if (!unlikely(val == -1 && PyErr_Occurred())) { PyErr_SetString(PyExc_OverflowError, (is_unsigned && unlikely(val < 0)) ? "can't convert negative value to int" : "value too large to convert to int"); } return (int)-1; } return (int)val; } return (int)__Pyx_PyInt_AsLong(x); } #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS #include "longintrepr.h" #endif #endif static CYTHON_INLINE unsigned long __Pyx_PyInt_AsUnsignedLong(PyObject* x) { const unsigned long neg_one = (unsigned long)-1, const_zero = 0; const int is_unsigned = neg_one > const_zero; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_Check(x))) { long val = PyInt_AS_LONG(x); if (is_unsigned && unlikely(val < 0)) { PyErr_SetString(PyExc_OverflowError, "can't convert negative value to unsigned long"); return (unsigned long)-1; } return (unsigned long)val; } else #endif if (likely(PyLong_Check(x))) { if (is_unsigned) { #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS if (sizeof(digit) <= sizeof(unsigned long)) { switch (Py_SIZE(x)) { case 0: return 0; case 1: return (unsigned long) ((PyLongObject*)x)->ob_digit[0]; } } #endif #endif if (unlikely(Py_SIZE(x) < 0)) { PyErr_SetString(PyExc_OverflowError, "can't convert negative value to unsigned long"); return (unsigned long)-1; } return (unsigned long)PyLong_AsUnsignedLong(x); } else { #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS if (sizeof(digit) <= sizeof(unsigned long)) { switch (Py_SIZE(x)) { case 0: return 0; case 1: return +(unsigned long) ((PyLongObject*)x)->ob_digit[0]; case -1: return -(unsigned long) ((PyLongObject*)x)->ob_digit[0]; } } #endif #endif return (unsigned long)PyLong_AsLong(x); } } else { unsigned long val; PyObject *tmp = __Pyx_PyNumber_Int(x); if (!tmp) return (unsigned long)-1; val = __Pyx_PyInt_AsUnsignedLong(tmp); Py_DECREF(tmp); return val; } } #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS #include "longintrepr.h" #endif #endif static CYTHON_INLINE unsigned PY_LONG_LONG __Pyx_PyInt_AsUnsignedLongLong(PyObject* x) { const unsigned PY_LONG_LONG neg_one = (unsigned PY_LONG_LONG)-1, const_zero = 0; const int is_unsigned = neg_one > const_zero; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_Check(x))) { long val = PyInt_AS_LONG(x); if (is_unsigned && unlikely(val < 0)) { PyErr_SetString(PyExc_OverflowError, "can't convert negative value to unsigned PY_LONG_LONG"); return (unsigned PY_LONG_LONG)-1; } return (unsigned PY_LONG_LONG)val; } else #endif if (likely(PyLong_Check(x))) { if (is_unsigned) { #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS if (sizeof(digit) <= sizeof(unsigned PY_LONG_LONG)) { switch (Py_SIZE(x)) { case 0: return 0; case 1: return (unsigned PY_LONG_LONG) ((PyLongObject*)x)->ob_digit[0]; } } #endif #endif if (unlikely(Py_SIZE(x) < 0)) { PyErr_SetString(PyExc_OverflowError, "can't convert negative value to unsigned PY_LONG_LONG"); return (unsigned PY_LONG_LONG)-1; } return (unsigned PY_LONG_LONG)PyLong_AsUnsignedLongLong(x); } else { #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS if (sizeof(digit) <= sizeof(unsigned PY_LONG_LONG)) { switch (Py_SIZE(x)) { case 0: return 0; case 1: return +(unsigned PY_LONG_LONG) ((PyLongObject*)x)->ob_digit[0]; case -1: return -(unsigned PY_LONG_LONG) ((PyLongObject*)x)->ob_digit[0]; } } #endif #endif return (unsigned PY_LONG_LONG)PyLong_AsLongLong(x); } } else { unsigned PY_LONG_LONG val; PyObject *tmp = __Pyx_PyNumber_Int(x); if (!tmp) return (unsigned PY_LONG_LONG)-1; val = __Pyx_PyInt_AsUnsignedLongLong(tmp); Py_DECREF(tmp); return val; } } #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS #include "longintrepr.h" #endif #endif static CYTHON_INLINE long __Pyx_PyInt_AsLong(PyObject* x) { const long neg_one = (long)-1, const_zero = 0; const int is_unsigned = neg_one > const_zero; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_Check(x))) { long val = PyInt_AS_LONG(x); if (is_unsigned && unlikely(val < 0)) { PyErr_SetString(PyExc_OverflowError, "can't convert negative value to long"); return (long)-1; } return (long)val; } else #endif if (likely(PyLong_Check(x))) { if (is_unsigned) { #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS if (sizeof(digit) <= sizeof(long)) { switch (Py_SIZE(x)) { case 0: return 0; case 1: return (long) ((PyLongObject*)x)->ob_digit[0]; } } #endif #endif if (unlikely(Py_SIZE(x) < 0)) { PyErr_SetString(PyExc_OverflowError, "can't convert negative value to long"); return (long)-1; } return (long)PyLong_AsUnsignedLong(x); } else { #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS if (sizeof(digit) <= sizeof(long)) { switch (Py_SIZE(x)) { case 0: return 0; case 1: return +(long) ((PyLongObject*)x)->ob_digit[0]; case -1: return -(long) ((PyLongObject*)x)->ob_digit[0]; } } #endif #endif return (long)PyLong_AsLong(x); } } else { long val; PyObject *tmp = __Pyx_PyNumber_Int(x); if (!tmp) return (long)-1; val = __Pyx_PyInt_AsLong(tmp); Py_DECREF(tmp); return val; } } #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS #include "longintrepr.h" #endif #endif static CYTHON_INLINE PY_LONG_LONG __Pyx_PyInt_AsLongLong(PyObject* x) { const PY_LONG_LONG neg_one = (PY_LONG_LONG)-1, const_zero = 0; const int is_unsigned = neg_one > const_zero; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_Check(x))) { long val = PyInt_AS_LONG(x); if (is_unsigned && unlikely(val < 0)) { PyErr_SetString(PyExc_OverflowError, "can't convert negative value to PY_LONG_LONG"); return (PY_LONG_LONG)-1; } return (PY_LONG_LONG)val; } else #endif if (likely(PyLong_Check(x))) { if (is_unsigned) { #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS if (sizeof(digit) <= sizeof(PY_LONG_LONG)) { switch (Py_SIZE(x)) { case 0: return 0; case 1: return (PY_LONG_LONG) ((PyLongObject*)x)->ob_digit[0]; } } #endif #endif if (unlikely(Py_SIZE(x) < 0)) { PyErr_SetString(PyExc_OverflowError, "can't convert negative value to PY_LONG_LONG"); return (PY_LONG_LONG)-1; } return (PY_LONG_LONG)PyLong_AsUnsignedLongLong(x); } else { #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS if (sizeof(digit) <= sizeof(PY_LONG_LONG)) { switch (Py_SIZE(x)) { case 0: return 0; case 1: return +(PY_LONG_LONG) ((PyLongObject*)x)->ob_digit[0]; case -1: return -(PY_LONG_LONG) ((PyLongObject*)x)->ob_digit[0]; } } #endif #endif return (PY_LONG_LONG)PyLong_AsLongLong(x); } } else { PY_LONG_LONG val; PyObject *tmp = __Pyx_PyNumber_Int(x); if (!tmp) return (PY_LONG_LONG)-1; val = __Pyx_PyInt_AsLongLong(tmp); Py_DECREF(tmp); return val; } } #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS #include "longintrepr.h" #endif #endif static CYTHON_INLINE signed long __Pyx_PyInt_AsSignedLong(PyObject* x) { const signed long neg_one = (signed long)-1, const_zero = 0; const int is_unsigned = neg_one > const_zero; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_Check(x))) { long val = PyInt_AS_LONG(x); if (is_unsigned && unlikely(val < 0)) { PyErr_SetString(PyExc_OverflowError, "can't convert negative value to signed long"); return (signed long)-1; } return (signed long)val; } else #endif if (likely(PyLong_Check(x))) { if (is_unsigned) { #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS if (sizeof(digit) <= sizeof(signed long)) { switch (Py_SIZE(x)) { case 0: return 0; case 1: return (signed long) ((PyLongObject*)x)->ob_digit[0]; } } #endif #endif if (unlikely(Py_SIZE(x) < 0)) { PyErr_SetString(PyExc_OverflowError, "can't convert negative value to signed long"); return (signed long)-1; } return (signed long)PyLong_AsUnsignedLong(x); } else { #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS if (sizeof(digit) <= sizeof(signed long)) { switch (Py_SIZE(x)) { case 0: return 0; case 1: return +(signed long) ((PyLongObject*)x)->ob_digit[0]; case -1: return -(signed long) ((PyLongObject*)x)->ob_digit[0]; } } #endif #endif return (signed long)PyLong_AsLong(x); } } else { signed long val; PyObject *tmp = __Pyx_PyNumber_Int(x); if (!tmp) return (signed long)-1; val = __Pyx_PyInt_AsSignedLong(tmp); Py_DECREF(tmp); return val; } } #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS #include "longintrepr.h" #endif #endif static CYTHON_INLINE signed PY_LONG_LONG __Pyx_PyInt_AsSignedLongLong(PyObject* x) { const signed PY_LONG_LONG neg_one = (signed PY_LONG_LONG)-1, const_zero = 0; const int is_unsigned = neg_one > const_zero; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_Check(x))) { long val = PyInt_AS_LONG(x); if (is_unsigned && unlikely(val < 0)) { PyErr_SetString(PyExc_OverflowError, "can't convert negative value to signed PY_LONG_LONG"); return (signed PY_LONG_LONG)-1; } return (signed PY_LONG_LONG)val; } else #endif if (likely(PyLong_Check(x))) { if (is_unsigned) { #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS if (sizeof(digit) <= sizeof(signed PY_LONG_LONG)) { switch (Py_SIZE(x)) { case 0: return 0; case 1: return (signed PY_LONG_LONG) ((PyLongObject*)x)->ob_digit[0]; } } #endif #endif if (unlikely(Py_SIZE(x) < 0)) { PyErr_SetString(PyExc_OverflowError, "can't convert negative value to signed PY_LONG_LONG"); return (signed PY_LONG_LONG)-1; } return (signed PY_LONG_LONG)PyLong_AsUnsignedLongLong(x); } else { #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS if (sizeof(digit) <= sizeof(signed PY_LONG_LONG)) { switch (Py_SIZE(x)) { case 0: return 0; case 1: return +(signed PY_LONG_LONG) ((PyLongObject*)x)->ob_digit[0]; case -1: return -(signed PY_LONG_LONG) ((PyLongObject*)x)->ob_digit[0]; } } #endif #endif return (signed PY_LONG_LONG)PyLong_AsLongLong(x); } } else { signed PY_LONG_LONG val; PyObject *tmp = __Pyx_PyNumber_Int(x); if (!tmp) return (signed PY_LONG_LONG)-1; val = __Pyx_PyInt_AsSignedLongLong(tmp); Py_DECREF(tmp); return val; } } 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); #if PY_VERSION_HEX < 0x02050000 return PyErr_Warn(NULL, message); #else return PyErr_WarnEx(NULL, message, 1); #endif } return 0; } #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 #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, "%s.%s 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", module_name, class_name); #if PY_VERSION_HEX < 0x02050000 if (PyErr_Warn(NULL, warning) < 0) goto bad; #else if (PyErr_WarnEx(NULL, warning, 0) < 0) goto bad; #endif } else if ((size_t)basicsize != size) { PyErr_Format(PyExc_ValueError, "%s.%s has the wrong size, try recompiling", module_name, class_name); goto bad; } return (PyTypeObject *)result; bad: Py_XDECREF(py_module); Py_XDECREF(result); return NULL; } #endif 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) / 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, 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); } #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, /*int argcount,*/ 0, /*int kwonlyargcount,*/ 0, /*int nlocals,*/ 0, /*int stacksize,*/ 0, /*int flags,*/ __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, /*int firstlineno,*/ __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; PyObject *py_globals = 0; PyFrameObject *py_frame = 0; py_code = __pyx_find_code_object(c_line ? c_line : py_line); if (!py_code) { py_code = __Pyx_CreateCodeObjectForTraceback( funcname, c_line, py_line, filename); if (!py_code) goto bad; __pyx_insert_code_object(c_line ? c_line : py_line, py_code); } py_globals = PyModule_GetDict(__pyx_m); if (!py_globals) goto bad; py_frame = PyFrame_New( PyThreadState_GET(), /*PyThreadState *tstate,*/ py_code, /*PyCodeObject *code,*/ py_globals, /*PyObject *globals,*/ 0 /*PyObject *locals*/ ); if (!py_frame) goto bad; py_frame->f_lineno = py_line; PyTraceBack_Here(py_frame); bad: Py_XDECREF(py_code); Py_XDECREF(py_frame); } 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 /* Python 3+ has unicode identifiers */ if (t->is_unicode | t->is_str) { if (t->intern) { *t->p = PyUnicode_InternFromString(t->s); } else if (t->encoding) { *t->p = PyUnicode_Decode(t->s, t->n - 1, t->encoding, NULL); } else { *t->p = PyUnicode_FromStringAndSize(t->s, t->n - 1); } } else { *t->p = PyBytes_FromStringAndSize(t->s, t->n - 1); } #endif if (!*t->p) return -1; ++t; } return 0; } static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(char* c_str) { return __Pyx_PyUnicode_FromStringAndSize(c_str, strlen(c_str)); } static CYTHON_INLINE char* __Pyx_PyObject_AsString(PyObject* o) { Py_ssize_t ignore; return __Pyx_PyObject_AsStringAndSize(o, &ignore); } static CYTHON_INLINE char* __Pyx_PyObject_AsStringAndSize(PyObject* o, Py_ssize_t *length) { #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT if ( #if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII __Pyx_sys_getdefaultencoding_not_ascii && #endif PyUnicode_Check(o)) { #if PY_VERSION_HEX < 0x03030000 char* defenc_c; PyObject* defenc = _PyUnicode_AsDefaultEncodedString(o, NULL); if (!defenc) return NULL; defenc_c = PyBytes_AS_STRING(defenc); #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII { char* end = defenc_c + PyBytes_GET_SIZE(defenc); char* c; for (c = defenc_c; c < end; c++) { if ((unsigned char) (*c) >= 128) { PyUnicode_AsASCIIString(o); return NULL; } } } #endif /*__PYX_DEFAULT_STRING_ENCODING_IS_ASCII*/ *length = PyBytes_GET_SIZE(defenc); return defenc_c; #else /* PY_VERSION_HEX < 0x03030000 */ if (PyUnicode_READY(o) == -1) return NULL; #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII if (PyUnicode_IS_ASCII(o)) { *length = PyUnicode_GET_DATA_SIZE(o); return PyUnicode_AsUTF8(o); } else { PyUnicode_AsASCIIString(o); return NULL; } #else /* __PYX_DEFAULT_STRING_ENCODING_IS_ASCII */ return PyUnicode_AsUTF8AndSize(o, length); #endif /* __PYX_DEFAULT_STRING_ENCODING_IS_ASCII */ #endif /* PY_VERSION_HEX < 0x03030000 */ } else #endif /* __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT */ { char* result; int r = PyBytes_AsStringAndSize(o, &result, length); if (r < 0) { return NULL; } else { return result; } } } static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject* x) { int is_true = x == Py_True; if (is_true | (x == Py_False) | (x == Py_None)) return is_true; else return PyObject_IsTrue(x); } static CYTHON_INLINE PyObject* __Pyx_PyNumber_Int(PyObject* x) { PyNumberMethods *m; const char *name = NULL; PyObject *res = NULL; #if PY_MAJOR_VERSION < 3 if (PyInt_Check(x) || PyLong_Check(x)) #else if (PyLong_Check(x)) #endif return Py_INCREF(x), x; m = Py_TYPE(x)->tp_as_number; #if PY_MAJOR_VERSION < 3 if (m && m->nb_int) { name = "int"; res = PyNumber_Int(x); } else if (m && m->nb_long) { name = "long"; res = PyNumber_Long(x); } #else if (m && m->nb_int) { name = "int"; res = PyNumber_Long(x); } #endif if (res) { #if PY_MAJOR_VERSION < 3 if (!PyInt_Check(res) && !PyLong_Check(res)) { #else if (!PyLong_Check(res)) { #endif PyErr_Format(PyExc_TypeError, "__%s__ returned non-%s (type %.200s)", name, name, Py_TYPE(res)->tp_name); Py_DECREF(res); return NULL; } } else if (!PyErr_Occurred()) { PyErr_SetString(PyExc_TypeError, "an integer is required"); } return res; } static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) { Py_ssize_t ival; PyObject* x = 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) { #if PY_VERSION_HEX < 0x02050000 if (ival <= LONG_MAX) return PyInt_FromLong((long)ival); else { unsigned char *bytes = (unsigned char *) &ival; int one = 1; int little = (int)*(unsigned char*)&one; return _PyLong_FromByteArray(bytes, sizeof(size_t), little, 0); } #else return PyInt_FromSize_t(ival); #endif } static CYTHON_INLINE size_t __Pyx_PyInt_AsSize_t(PyObject* x) { unsigned PY_LONG_LONG val = __Pyx_PyInt_AsUnsignedLongLong(x); if (unlikely(val != (unsigned PY_LONG_LONG)(size_t)val)) { if ((val != (unsigned PY_LONG_LONG)-1) || !PyErr_Occurred()) PyErr_SetString(PyExc_OverflowError, "value too large to convert to size_t"); return (size_t)-1; } return (size_t)val; } #endif /* Py_PYTHON_H */ debian/cythonized-files3/pandas/index.c0000664000000000000000000273551212275603610015275 0ustar /* Generated by Cython 0.19.2 on Mon Feb 3 08:42:29 2014 */ #define PY_SSIZE_T_CLEAN #ifndef CYTHON_USE_PYLONG_INTERNALS #ifdef PYLONG_BITS_IN_DIGIT #define CYTHON_USE_PYLONG_INTERNALS 0 #else #include "pyconfig.h" #ifdef PYLONG_BITS_IN_DIGIT #define CYTHON_USE_PYLONG_INTERNALS 1 #else #define CYTHON_USE_PYLONG_INTERNALS 0 #endif #endif #endif #include "Python.h" #ifndef Py_PYTHON_H #error Python headers needed to compile C extensions, please install development version of Python. #elif PY_VERSION_HEX < 0x02040000 #error Cython requires Python 2.4+. #else #include /* For offsetof */ #ifndef offsetof #define offsetof(type, member) ( (size_t) & ((type*)0) -> member ) #endif #if !defined(WIN32) && !defined(MS_WINDOWS) #ifndef __stdcall #define __stdcall #endif #ifndef __cdecl #define __cdecl #endif #ifndef __fastcall #define __fastcall #endif #endif #ifndef DL_IMPORT #define DL_IMPORT(t) t #endif #ifndef DL_EXPORT #define DL_EXPORT(t) t #endif #ifndef PY_LONG_LONG #define PY_LONG_LONG LONG_LONG #endif #ifndef Py_HUGE_VAL #define Py_HUGE_VAL HUGE_VAL #endif #ifdef PYPY_VERSION #define CYTHON_COMPILING_IN_PYPY 1 #define CYTHON_COMPILING_IN_CPYTHON 0 #else #define CYTHON_COMPILING_IN_PYPY 0 #define CYTHON_COMPILING_IN_CPYTHON 1 #endif #if PY_VERSION_HEX < 0x02050000 typedef int Py_ssize_t; #define PY_SSIZE_T_MAX INT_MAX #define PY_SSIZE_T_MIN INT_MIN #define PY_FORMAT_SIZE_T "" #define CYTHON_FORMAT_SSIZE_T "" #define PyInt_FromSsize_t(z) PyInt_FromLong(z) #define PyInt_AsSsize_t(o) __Pyx_PyInt_AsInt(o) #define PyNumber_Index(o) ((PyNumber_Check(o) && !PyFloat_Check(o)) ? PyNumber_Int(o) : \ (PyErr_Format(PyExc_TypeError, \ "expected index value, got %.200s", Py_TYPE(o)->tp_name), \ (PyObject*)0)) #define __Pyx_PyIndex_Check(o) (PyNumber_Check(o) && !PyFloat_Check(o) && \ !PyComplex_Check(o)) #define PyIndex_Check __Pyx_PyIndex_Check #define PyErr_WarnEx(category, message, stacklevel) PyErr_Warn(category, message) #define __PYX_BUILD_PY_SSIZE_T "i" #else #define __PYX_BUILD_PY_SSIZE_T "n" #define CYTHON_FORMAT_SSIZE_T "z" #define __Pyx_PyIndex_Check PyIndex_Check #endif #if PY_VERSION_HEX < 0x02060000 #define Py_REFCNT(ob) (((PyObject*)(ob))->ob_refcnt) #define Py_TYPE(ob) (((PyObject*)(ob))->ob_type) #define Py_SIZE(ob) (((PyVarObject*)(ob))->ob_size) #define PyVarObject_HEAD_INIT(type, size) \ PyObject_HEAD_INIT(type) size, #define PyType_Modified(t) typedef struct { void *buf; PyObject *obj; Py_ssize_t len; Py_ssize_t itemsize; int readonly; int ndim; char *format; Py_ssize_t *shape; Py_ssize_t *strides; Py_ssize_t *suboffsets; void *internal; } Py_buffer; #define PyBUF_SIMPLE 0 #define PyBUF_WRITABLE 0x0001 #define PyBUF_FORMAT 0x0004 #define PyBUF_ND 0x0008 #define PyBUF_STRIDES (0x0010 | PyBUF_ND) #define PyBUF_C_CONTIGUOUS (0x0020 | PyBUF_STRIDES) #define PyBUF_F_CONTIGUOUS (0x0040 | PyBUF_STRIDES) #define PyBUF_ANY_CONTIGUOUS (0x0080 | PyBUF_STRIDES) #define PyBUF_INDIRECT (0x0100 | PyBUF_STRIDES) #define PyBUF_RECORDS (PyBUF_STRIDES | PyBUF_FORMAT | PyBUF_WRITABLE) #define PyBUF_FULL (PyBUF_INDIRECT | PyBUF_FORMAT | PyBUF_WRITABLE) typedef int (*getbufferproc)(PyObject *, Py_buffer *, int); typedef void (*releasebufferproc)(PyObject *, Py_buffer *); #endif #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, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) #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) #endif #if PY_MAJOR_VERSION < 3 && PY_MINOR_VERSION < 6 #define PyUnicode_FromString(s) PyUnicode_Decode(s, strlen(s), "UTF-8", "strict") #endif #if PY_MAJOR_VERSION >= 3 #define Py_TPFLAGS_CHECKTYPES 0 #define Py_TPFLAGS_HAVE_INDEX 0 #endif #if (PY_VERSION_HEX < 0x02060000) || (PY_MAJOR_VERSION >= 3) #define Py_TPFLAGS_HAVE_NEWBUFFER 0 #endif #if PY_VERSION_HEX < 0x02060000 #define Py_TPFLAGS_HAVE_VERSION_TAG 0 #endif #if PY_VERSION_HEX > 0x03030000 && defined(PyUnicode_KIND) #define CYTHON_PEP393_ENABLED 1 #define __Pyx_PyUnicode_READY(op) (likely(PyUnicode_IS_READY(op)) ? \ 0 : _PyUnicode_Ready((PyObject *)(op))) #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_LENGTH(u) #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i) #define __Pyx_PyUnicode_READ(k, d, i) PyUnicode_READ(k, d, i) #else #define CYTHON_PEP393_ENABLED 0 #define __Pyx_PyUnicode_READY(op) (0) #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_SIZE(u) #define __Pyx_PyUnicode_READ_CHAR(u, i) ((Py_UCS4)(PyUnicode_AS_UNICODE(u)[i])) #define __Pyx_PyUnicode_READ(k, d, i) ((k=k), (Py_UCS4)(((Py_UNICODE*)d)[i])) #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_VERSION_HEX < 0x02060000 #define PyBytesObject PyStringObject #define PyBytes_Type PyString_Type #define PyBytes_Check PyString_Check #define PyBytes_CheckExact PyString_CheckExact #define PyBytes_FromString PyString_FromString #define PyBytes_FromStringAndSize PyString_FromStringAndSize #define PyBytes_FromFormat PyString_FromFormat #define PyBytes_DecodeEscape PyString_DecodeEscape #define PyBytes_AsString PyString_AsString #define PyBytes_AsStringAndSize PyString_AsStringAndSize #define PyBytes_Size PyString_Size #define PyBytes_AS_STRING PyString_AS_STRING #define PyBytes_GET_SIZE PyString_GET_SIZE #define PyBytes_Repr PyString_Repr #define PyBytes_Concat PyString_Concat #define PyBytes_ConcatAndDel PyString_ConcatAndDel #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_CheckExact(obj) || PyUnicode_CheckExact(obj) || \ PyString_Check(obj) || PyUnicode_Check(obj)) #define __Pyx_PyBaseString_CheckExact(obj) (Py_TYPE(obj) == &PyBaseString_Type) #endif #if PY_VERSION_HEX < 0x02060000 #define PySet_Check(obj) PyObject_TypeCheck(obj, &PySet_Type) #define PyFrozenSet_Check(obj) PyObject_TypeCheck(obj, &PyFrozenSet_Type) #endif #ifndef PySet_CheckExact #define PySet_CheckExact(obj) (Py_TYPE(obj) == &PySet_Type) #endif #define __Pyx_TypeCheck(obj, type) PyObject_TypeCheck(obj, (PyTypeObject *)type) #if PY_MAJOR_VERSION >= 3 #define PyIntObject PyLongObject #define PyInt_Type PyLong_Type #define PyInt_Check(op) PyLong_Check(op) #define PyInt_CheckExact(op) PyLong_CheckExact(op) #define PyInt_FromString PyLong_FromString #define PyInt_FromUnicode PyLong_FromUnicode #define PyInt_FromLong PyLong_FromLong #define PyInt_FromSize_t PyLong_FromSize_t #define PyInt_FromSsize_t PyLong_FromSsize_t #define PyInt_AsLong PyLong_AsLong #define PyInt_AS_LONG PyLong_AS_LONG #define PyInt_AsSsize_t PyLong_AsSsize_t #define PyInt_AsUnsignedLongMask PyLong_AsUnsignedLongMask #define PyInt_AsUnsignedLongLongMask PyLong_AsUnsignedLongLongMask #endif #if PY_MAJOR_VERSION >= 3 #define PyBoolObject PyLongObject #endif #if PY_VERSION_HEX < 0x03020000 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) || (PY_VERSION_HEX >= 0x03010300) #define __Pyx_PySequence_GetSlice(obj, a, b) PySequence_GetSlice(obj, a, b) #define __Pyx_PySequence_SetSlice(obj, a, b, value) PySequence_SetSlice(obj, a, b, value) #define __Pyx_PySequence_DelSlice(obj, a, b) PySequence_DelSlice(obj, a, b) #else #define __Pyx_PySequence_GetSlice(obj, a, b) (unlikely(!(obj)) ? \ (PyErr_SetString(PyExc_SystemError, "null argument to internal routine"), (PyObject*)0) : \ (likely((obj)->ob_type->tp_as_mapping) ? (PySequence_GetSlice(obj, a, b)) : \ (PyErr_Format(PyExc_TypeError, "'%.200s' object is unsliceable", (obj)->ob_type->tp_name), (PyObject*)0))) #define __Pyx_PySequence_SetSlice(obj, a, b, value) (unlikely(!(obj)) ? \ (PyErr_SetString(PyExc_SystemError, "null argument to internal routine"), -1) : \ (likely((obj)->ob_type->tp_as_mapping) ? (PySequence_SetSlice(obj, a, b, value)) : \ (PyErr_Format(PyExc_TypeError, "'%.200s' object doesn't support slice assignment", (obj)->ob_type->tp_name), -1))) #define __Pyx_PySequence_DelSlice(obj, a, b) (unlikely(!(obj)) ? \ (PyErr_SetString(PyExc_SystemError, "null argument to internal routine"), -1) : \ (likely((obj)->ob_type->tp_as_mapping) ? (PySequence_DelSlice(obj, a, b)) : \ (PyErr_Format(PyExc_TypeError, "'%.200s' object doesn't support slice deletion", (obj)->ob_type->tp_name), -1))) #endif #if PY_MAJOR_VERSION >= 3 #define PyMethod_New(func, self, klass) ((self) ? PyMethod_New(func, self) : PyInstanceMethod_New(func)) #endif #if PY_VERSION_HEX < 0x02050000 #define __Pyx_GetAttrString(o,n) PyObject_GetAttrString((o),((char *)(n))) #define __Pyx_SetAttrString(o,n,a) PyObject_SetAttrString((o),((char *)(n)),(a)) #define __Pyx_DelAttrString(o,n) PyObject_DelAttrString((o),((char *)(n))) #else #define __Pyx_GetAttrString(o,n) PyObject_GetAttrString((o),(n)) #define __Pyx_SetAttrString(o,n,a) PyObject_SetAttrString((o),(n),(a)) #define __Pyx_DelAttrString(o,n) PyObject_DelAttrString((o),(n)) #endif #if PY_VERSION_HEX < 0x02050000 #define __Pyx_NAMESTR(n) ((char *)(n)) #define __Pyx_DOCSTR(n) ((char *)(n)) #else #define __Pyx_NAMESTR(n) (n) #define __Pyx_DOCSTR(n) (n) #endif #ifndef CYTHON_INLINE #if defined(__GNUC__) #define CYTHON_INLINE __inline__ #elif defined(_MSC_VER) #define CYTHON_INLINE __inline #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L #define CYTHON_INLINE inline #else #define CYTHON_INLINE #endif #endif #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 #ifdef NAN #define __PYX_NAN() ((float) NAN) #else static CYTHON_INLINE float __PYX_NAN() { /* Initialize NaN. The sign is irrelevant, an exponent with all bits 1 and a nonzero mantissa means NaN. If the first bit in the mantissa is 1, it is a quiet NaN. */ float value; memset(&value, 0xFF, sizeof(value)); return value; } #endif #if PY_MAJOR_VERSION >= 3 #define __Pyx_PyNumber_Divide(x,y) PyNumber_TrueDivide(x,y) #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceTrueDivide(x,y) #else #define __Pyx_PyNumber_Divide(x,y) PyNumber_Divide(x,y) #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceDivide(x,y) #endif #ifndef __PYX_EXTERN_C #ifdef __cplusplus #define __PYX_EXTERN_C extern "C" #else #define __PYX_EXTERN_C extern #endif #endif #if defined(WIN32) || defined(MS_WINDOWS) #define _USE_MATH_DEFINES #endif #include #define __PYX_HAVE__pandas__index #define __PYX_HAVE_API__pandas__index #include "string.h" #include "stdio.h" #include "stdlib.h" #include "numpy/arrayobject.h" #include "numpy/ufuncobject.h" #include "pythread.h" #include "numpy_helper.h" #include "khash_python.h" #include "headers/stdint.h" #include "datetime.h" #include "datetime_helper.h" #include "numpy/ndarrayobject.h" #include "numpy/npy_common.h" #include "datetime/np_datetime.h" #include "datetime/np_datetime_strings.h" #ifdef _OPENMP #include #endif /* _OPENMP */ #ifdef PYREX_WITHOUT_ASSERTIONS #define CYTHON_WITHOUT_ASSERTIONS #endif #ifndef CYTHON_UNUSED # if defined(__GNUC__) # if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)) # define CYTHON_UNUSED __attribute__ ((__unused__)) # else # define CYTHON_UNUSED # endif # elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER)) # define CYTHON_UNUSED __attribute__ ((__unused__)) # else # define CYTHON_UNUSED # endif #endif typedef struct {PyObject **p; char *s; const Py_ssize_t n; const char* encoding; const char is_unicode; const char is_str; const char intern; } __Pyx_StringTabEntry; /*proto*/ #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 static CYTHON_INLINE char* __Pyx_PyObject_AsString(PyObject*); static CYTHON_INLINE char* __Pyx_PyObject_AsStringAndSize(PyObject*, Py_ssize_t* length); #define __Pyx_PyBytes_FromString PyBytes_FromString #define __Pyx_PyBytes_FromStringAndSize PyBytes_FromStringAndSize static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(char*); #if PY_MAJOR_VERSION < 3 #define __Pyx_PyStr_FromString __Pyx_PyBytes_FromString #define __Pyx_PyStr_FromStringAndSize __Pyx_PyBytes_FromStringAndSize #else #define __Pyx_PyStr_FromString __Pyx_PyUnicode_FromString #define __Pyx_PyStr_FromStringAndSize __Pyx_PyUnicode_FromStringAndSize #endif #define __Pyx_PyObject_AsUString(s) ((unsigned char*) __Pyx_PyObject_AsString(s)) #define __Pyx_PyObject_FromUString(s) __Pyx_PyObject_FromString((char*)s) #define __Pyx_PyBytes_FromUString(s) __Pyx_PyBytes_FromString((char*)s) #define __Pyx_PyStr_FromUString(s) __Pyx_PyStr_FromString((char*)s) #define __Pyx_PyUnicode_FromUString(s) __Pyx_PyUnicode_FromString((char*)s) #if PY_MAJOR_VERSION < 3 static CYTHON_INLINE size_t __Pyx_Py_UNICODE_strlen(const Py_UNICODE *u) { const Py_UNICODE *u_end = u; while (*u_end++) ; return u_end - u - 1; } #else #define __Pyx_Py_UNICODE_strlen Py_UNICODE_strlen #endif #define __Pyx_PyUnicode_FromUnicode(u) PyUnicode_FromUnicode(u, __Pyx_Py_UNICODE_strlen(u)) #define __Pyx_PyUnicode_FromUnicodeAndLength PyUnicode_FromUnicode #define __Pyx_PyUnicode_AsUnicode PyUnicode_AsUnicode #define __Pyx_Owned_Py_None(b) (Py_INCREF(Py_None), Py_None) #define __Pyx_PyBool_FromLong(b) ((b) ? (Py_INCREF(Py_True), Py_True) : (Py_INCREF(Py_False), Py_False)) static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*); static CYTHON_INLINE PyObject* __Pyx_PyNumber_Int(PyObject* x); static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*); static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t); static CYTHON_INLINE size_t __Pyx_PyInt_AsSize_t(PyObject*); #if CYTHON_COMPILING_IN_CPYTHON #define __pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x)) #else #define __pyx_PyFloat_AsDouble(x) PyFloat_AsDouble(x) #endif #define __pyx_PyFloat_AsFloat(x) ((float) __pyx_PyFloat_AsDouble(x)) #if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII static int __Pyx_sys_getdefaultencoding_not_ascii; static int __Pyx_init_sys_getdefaultencoding_params() { PyObject* sys = NULL; PyObject* default_encoding = NULL; PyObject* ascii_chars_u = NULL; PyObject* ascii_chars_b = NULL; sys = PyImport_ImportModule("sys"); if (sys == NULL) goto bad; default_encoding = PyObject_CallMethod(sys, (char*) (const char*) "getdefaultencoding", NULL); if (default_encoding == NULL) goto bad; if (strcmp(PyBytes_AsString(default_encoding), "ascii") == 0) { __Pyx_sys_getdefaultencoding_not_ascii = 0; } else { const char* default_encoding_c = PyBytes_AS_STRING(default_encoding); 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 == NULL) goto bad; ascii_chars_b = PyUnicode_AsEncodedString(ascii_chars_u, default_encoding_c, NULL); if (ascii_chars_b == NULL || strncmp(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 '%s' is not a superset of ascii.", default_encoding_c); goto bad; } } Py_XDECREF(sys); Py_XDECREF(default_encoding); Py_XDECREF(ascii_chars_u); Py_XDECREF(ascii_chars_b); return 0; bad: Py_XDECREF(sys); 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() { PyObject* sys = NULL; PyObject* default_encoding = NULL; char* default_encoding_c; sys = PyImport_ImportModule("sys"); if (sys == NULL) goto bad; default_encoding = PyObject_CallMethod(sys, (char*) (const char*) "getdefaultencoding", NULL); if (default_encoding == NULL) goto bad; default_encoding_c = PyBytes_AS_STRING(default_encoding); __PYX_DEFAULT_STRING_ENCODING = (char*) malloc(strlen(default_encoding_c)); strcpy(__PYX_DEFAULT_STRING_ENCODING, default_encoding_c); Py_DECREF(sys); Py_DECREF(default_encoding); return 0; bad: Py_XDECREF(sys); Py_XDECREF(default_encoding); return -1; } #endif #endif #ifdef __GNUC__ /* Test for GCC > 2.95 */ #if __GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95)) #define likely(x) __builtin_expect(!!(x), 1) #define unlikely(x) __builtin_expect(!!(x), 0) #else /* __GNUC__ > 2 ... */ #define likely(x) (x) #define unlikely(x) (x) #endif /* __GNUC__ > 2 ... */ #else /* __GNUC__ */ #define likely(x) (x) #define unlikely(x) (x) #endif /* __GNUC__ */ static PyObject *__pyx_m; static PyObject *__pyx_d; static PyObject *__pyx_b; static PyObject *__pyx_empty_tuple; static PyObject *__pyx_empty_bytes; static int __pyx_lineno; static int __pyx_clineno = 0; static const char * __pyx_cfilenm= __FILE__; static const char *__pyx_filename; #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[] = { "index.pyx", "util.pxd", "datetime.pxd", "numpy.pxd", "type.pxd", "bool.pxd", "complex.pxd", "hashtable.pxd", }; #define IS_UNSIGNED(type) (((type) -1) > 0) struct __Pyx_StructField_; #define __PYX_BUF_FLAGS_PACKED_STRUCT (1 << 0) typedef struct { const char* name; /* for error messages only */ struct __Pyx_StructField_* fields; size_t size; /* sizeof(type) */ size_t arraysize[8]; /* length of array in each dimension */ int ndim; char typegroup; /* _R_eal, _C_omplex, Signed _I_nt, _U_nsigned int, _S_truct, _P_ointer, _O_bject, c_H_ar */ 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; /* "numpy.pxd":726 * # 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; /* "numpy.pxd":727 * * 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; /* "numpy.pxd":728 * 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; /* "numpy.pxd":729 * 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; /* "numpy.pxd":733 * #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; /* "numpy.pxd":734 * * 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; /* "numpy.pxd":735 * 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; /* "numpy.pxd":736 * 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; /* "numpy.pxd":740 * #ctypedef npy_uint128 uint128_t * * ctypedef npy_float16 float16_t # <<<<<<<<<<<<<< * ctypedef npy_float32 float32_t * ctypedef npy_float64 float64_t */ typedef npy_float16 __pyx_t_5numpy_float16_t; /* "numpy.pxd":741 * * ctypedef npy_float16 float16_t * ctypedef npy_float32 float32_t # <<<<<<<<<<<<<< * ctypedef npy_float64 float64_t * #ctypedef npy_float80 float80_t */ typedef npy_float32 __pyx_t_5numpy_float32_t; /* "numpy.pxd":742 * ctypedef npy_float16 float16_t * 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; /* "numpy.pxd":751 * # 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; /* "numpy.pxd":752 * # 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; /* "numpy.pxd":753 * 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; /* "numpy.pxd":755 * 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; /* "numpy.pxd":756 * * ctypedef npy_ulong uint_t * ctypedef npy_ulonglong ulong_t # <<<<<<<<<<<<<< * ctypedef npy_ulonglong ulonglong_t * */ typedef npy_ulonglong __pyx_t_5numpy_ulong_t; /* "numpy.pxd":757 * 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; /* "numpy.pxd":759 * ctypedef npy_ulonglong ulonglong_t * * ctypedef npy_intp intp_t # <<<<<<<<<<<<<< * ctypedef npy_uintp uintp_t * */ typedef npy_intp __pyx_t_5numpy_intp_t; /* "numpy.pxd":760 * * ctypedef npy_intp intp_t * ctypedef npy_uintp uintp_t # <<<<<<<<<<<<<< * * ctypedef npy_double float_t */ typedef npy_uintp __pyx_t_5numpy_uintp_t; /* "numpy.pxd":762 * 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; /* "numpy.pxd":763 * * ctypedef npy_double float_t * ctypedef npy_double double_t # <<<<<<<<<<<<<< * ctypedef npy_longdouble longdouble_t * */ typedef npy_double __pyx_t_5numpy_double_t; /* "numpy.pxd":764 * 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; #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 #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 /*--- Type declarations ---*/ struct __pyx_obj_6pandas_9hashtable_HashTable; struct __pyx_obj_6pandas_9hashtable_Float64HashTable; struct __pyx_obj_6pandas_9hashtable_Int64HashTable; struct __pyx_obj_6pandas_5index_IndexEngine; struct __pyx_obj_6pandas_5index_Int64Engine; struct __pyx_obj_6pandas_5index_DatetimeEngine; struct __pyx_obj_6pandas_5index_ObjectEngine; struct __pyx_obj_6pandas_5index_Float64Engine; struct __pyx_obj_6pandas_9hashtable_PyObjectHashTable; /* "numpy.pxd":766 * 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; /* "numpy.pxd":767 * * ctypedef npy_cfloat cfloat_t * ctypedef npy_cdouble cdouble_t # <<<<<<<<<<<<<< * ctypedef npy_clongdouble clongdouble_t * */ typedef npy_cdouble __pyx_t_5numpy_cdouble_t; /* "numpy.pxd":768 * 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; /* "numpy.pxd":770 * ctypedef npy_clongdouble clongdouble_t * * ctypedef npy_cdouble complex_t # <<<<<<<<<<<<<< * * cdef inline object PyArray_MultiIterNew1(a): */ typedef npy_cdouble __pyx_t_5numpy_complex_t; /* "hashtable.pxd":5 * # prototypes for sharing * * cdef class HashTable: # <<<<<<<<<<<<<< * pass * */ struct __pyx_obj_6pandas_9hashtable_HashTable { PyObject_HEAD }; /* "hashtable.pxd":15 * * * cdef class Float64HashTable(HashTable): # <<<<<<<<<<<<<< * cdef kh_float64_t *table * */ struct __pyx_obj_6pandas_9hashtable_Float64HashTable { struct __pyx_obj_6pandas_9hashtable_HashTable __pyx_base; kh_float64_t *table; }; /* "hashtable.pxd":8 * pass * * cdef class Int64HashTable(HashTable): # <<<<<<<<<<<<<< * cdef kh_int64_t *table * */ struct __pyx_obj_6pandas_9hashtable_Int64HashTable { struct __pyx_obj_6pandas_9hashtable_HashTable __pyx_base; struct __pyx_vtabstruct_6pandas_9hashtable_Int64HashTable *__pyx_vtab; kh_int64_t *table; }; /* "pandas/index.pyx":70 * * * cdef class IndexEngine: # <<<<<<<<<<<<<< * * cdef readonly: */ struct __pyx_obj_6pandas_5index_IndexEngine { PyObject_HEAD struct __pyx_vtabstruct_6pandas_5index_IndexEngine *__pyx_vtab; PyObject *vgetter; struct __pyx_obj_6pandas_9hashtable_HashTable *mapping; int over_size_threshold; int unique; int monotonic; int initialized; int monotonic_check; int unique_check; }; /* "pandas/index.pyx":335 * return result[0:count], missing[0:count_missing] * * cdef class Int64Engine(IndexEngine): # <<<<<<<<<<<<<< * * cdef _get_index_values(self): */ struct __pyx_obj_6pandas_5index_Int64Engine { struct __pyx_obj_6pandas_5index_IndexEngine __pyx_base; }; /* "pandas/index.pyx":465 * * * cdef class DatetimeEngine(Int64Engine): # <<<<<<<<<<<<<< * * def __contains__(self, object val): */ struct __pyx_obj_6pandas_5index_DatetimeEngine { struct __pyx_obj_6pandas_5index_Int64Engine __pyx_base; }; /* "pandas/index.pyx":448 * } * * cdef class ObjectEngine(IndexEngine): # <<<<<<<<<<<<<< * * cdef _make_hash_table(self, n): */ struct __pyx_obj_6pandas_5index_ObjectEngine { struct __pyx_obj_6pandas_5index_IndexEngine __pyx_base; }; /* "pandas/index.pyx":394 * return result * * cdef class Float64Engine(IndexEngine): # <<<<<<<<<<<<<< * * cdef _make_hash_table(self, n): */ struct __pyx_obj_6pandas_5index_Float64Engine { struct __pyx_obj_6pandas_5index_IndexEngine __pyx_base; }; /* "hashtable.pxd":21 * # cpdef set_item(self, float64_t key, Py_ssize_t val) * * cdef class PyObjectHashTable(HashTable): # <<<<<<<<<<<<<< * cdef kh_pymap_t *table * */ struct __pyx_obj_6pandas_9hashtable_PyObjectHashTable { struct __pyx_obj_6pandas_9hashtable_HashTable __pyx_base; struct __pyx_vtabstruct_6pandas_9hashtable_PyObjectHashTable *__pyx_vtab; kh_pymap_t *table; }; /* "pandas/index.pyx":70 * * * cdef class IndexEngine: # <<<<<<<<<<<<<< * * cdef readonly: */ struct __pyx_vtabstruct_6pandas_5index_IndexEngine { PyObject *(*get_value)(struct __pyx_obj_6pandas_5index_IndexEngine *, PyArrayObject *, PyObject *, int __pyx_skip_dispatch); PyObject *(*set_value)(struct __pyx_obj_6pandas_5index_IndexEngine *, PyArrayObject *, PyObject *, PyObject *, int __pyx_skip_dispatch); PyObject *(*get_loc)(struct __pyx_obj_6pandas_5index_IndexEngine *, PyObject *, int __pyx_skip_dispatch); PyObject *(*_get_loc_duplicates)(struct __pyx_obj_6pandas_5index_IndexEngine *, PyObject *); PyObject *(*_maybe_get_bool_indexer)(struct __pyx_obj_6pandas_5index_IndexEngine *, PyObject *); PyObject *(*_do_monotonic_check)(struct __pyx_obj_6pandas_5index_IndexEngine *); PyObject *(*_get_index_values)(struct __pyx_obj_6pandas_5index_IndexEngine *); PyObject *(*_do_unique_check)(struct __pyx_obj_6pandas_5index_IndexEngine *); PyObject *(*_make_hash_table)(struct __pyx_obj_6pandas_5index_IndexEngine *, PyObject *); PyObject *(*_check_type)(struct __pyx_obj_6pandas_5index_IndexEngine *, PyObject *); PyObject *(*_ensure_mapping_populated)(struct __pyx_obj_6pandas_5index_IndexEngine *); PyObject *(*initialize)(struct __pyx_obj_6pandas_5index_IndexEngine *); }; static struct __pyx_vtabstruct_6pandas_5index_IndexEngine *__pyx_vtabptr_6pandas_5index_IndexEngine; static CYTHON_INLINE PyObject *__pyx_f_6pandas_5index_11IndexEngine__get_loc_duplicates(struct __pyx_obj_6pandas_5index_IndexEngine *, PyObject *); static CYTHON_INLINE PyObject *__pyx_f_6pandas_5index_11IndexEngine__do_monotonic_check(struct __pyx_obj_6pandas_5index_IndexEngine *); static CYTHON_INLINE PyObject *__pyx_f_6pandas_5index_11IndexEngine__do_unique_check(struct __pyx_obj_6pandas_5index_IndexEngine *); static CYTHON_INLINE PyObject *__pyx_f_6pandas_5index_11IndexEngine__ensure_mapping_populated(struct __pyx_obj_6pandas_5index_IndexEngine *); /* "pandas/index.pyx":394 * return result * * cdef class Float64Engine(IndexEngine): # <<<<<<<<<<<<<< * * cdef _make_hash_table(self, n): */ struct __pyx_vtabstruct_6pandas_5index_Float64Engine { struct __pyx_vtabstruct_6pandas_5index_IndexEngine __pyx_base; }; static struct __pyx_vtabstruct_6pandas_5index_Float64Engine *__pyx_vtabptr_6pandas_5index_Float64Engine; /* "hashtable.pxd":21 * # cpdef set_item(self, float64_t key, Py_ssize_t val) * * cdef class PyObjectHashTable(HashTable): # <<<<<<<<<<<<<< * cdef kh_pymap_t *table * */ struct __pyx_vtabstruct_6pandas_9hashtable_PyObjectHashTable { PyObject *(*get_item)(struct __pyx_obj_6pandas_9hashtable_PyObjectHashTable *, PyObject *, int __pyx_skip_dispatch); PyObject *(*set_item)(struct __pyx_obj_6pandas_9hashtable_PyObjectHashTable *, PyObject *, Py_ssize_t, int __pyx_skip_dispatch); }; static struct __pyx_vtabstruct_6pandas_9hashtable_PyObjectHashTable *__pyx_vtabptr_6pandas_9hashtable_PyObjectHashTable; /* "pandas/index.pyx":335 * return result[0:count], missing[0:count_missing] * * cdef class Int64Engine(IndexEngine): # <<<<<<<<<<<<<< * * cdef _get_index_values(self): */ struct __pyx_vtabstruct_6pandas_5index_Int64Engine { struct __pyx_vtabstruct_6pandas_5index_IndexEngine __pyx_base; }; static struct __pyx_vtabstruct_6pandas_5index_Int64Engine *__pyx_vtabptr_6pandas_5index_Int64Engine; /* "pandas/index.pyx":465 * * * cdef class DatetimeEngine(Int64Engine): # <<<<<<<<<<<<<< * * def __contains__(self, object val): */ struct __pyx_vtabstruct_6pandas_5index_DatetimeEngine { struct __pyx_vtabstruct_6pandas_5index_Int64Engine __pyx_base; PyObject *(*_date_check_type)(struct __pyx_obj_6pandas_5index_DatetimeEngine *, PyObject *); }; static struct __pyx_vtabstruct_6pandas_5index_DatetimeEngine *__pyx_vtabptr_6pandas_5index_DatetimeEngine; static CYTHON_INLINE PyObject *__pyx_f_6pandas_5index_14DatetimeEngine__date_check_type(struct __pyx_obj_6pandas_5index_DatetimeEngine *, PyObject *); /* "hashtable.pxd":8 * pass * * cdef class Int64HashTable(HashTable): # <<<<<<<<<<<<<< * cdef kh_int64_t *table * */ struct __pyx_vtabstruct_6pandas_9hashtable_Int64HashTable { PyObject *(*get_item)(struct __pyx_obj_6pandas_9hashtable_Int64HashTable *, __pyx_t_5numpy_int64_t, int __pyx_skip_dispatch); PyObject *(*set_item)(struct __pyx_obj_6pandas_9hashtable_Int64HashTable *, __pyx_t_5numpy_int64_t, Py_ssize_t, int __pyx_skip_dispatch); }; static struct __pyx_vtabstruct_6pandas_9hashtable_Int64HashTable *__pyx_vtabptr_6pandas_9hashtable_Int64HashTable; /* "pandas/index.pyx":448 * } * * cdef class ObjectEngine(IndexEngine): # <<<<<<<<<<<<<< * * cdef _make_hash_table(self, n): */ struct __pyx_vtabstruct_6pandas_5index_ObjectEngine { struct __pyx_vtabstruct_6pandas_5index_IndexEngine __pyx_base; }; static struct __pyx_vtabstruct_6pandas_5index_ObjectEngine *__pyx_vtabptr_6pandas_5index_ObjectEngine; #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); /*proto*/ #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 /* CYTHON_REFNANNY */ #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) #if CYTHON_COMPILING_IN_CPYTHON static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name) { PyTypeObject* tp = Py_TYPE(obj); if (likely(tp->tp_getattro)) return tp->tp_getattro(obj, attr_name); #if PY_MAJOR_VERSION < 3 if (likely(tp->tp_getattr)) return tp->tp_getattr(obj, PyString_AS_STRING(attr_name)); #endif return PyObject_GetAttr(obj, attr_name); } #else #define __Pyx_PyObject_GetAttrStr(o,n) PyObject_GetAttr(o,n) #endif static PyObject *__Pyx_GetBuiltinName(PyObject *name); /*proto*/ static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb); /*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); /*proto*/ static void __Pyx_RaiseDoubleKeywordsError(const char* func_name, PyObject* kw_name); /*proto*/ static int __Pyx_ParseOptionalKeywords(PyObject *kwds, PyObject **argnames[], \ PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args, \ const char* function_name); /*proto*/ static int __Pyx_ArgTypeTest(PyObject *obj, PyTypeObject *type, int none_allowed, const char *name, int exact); /*proto*/ static CYTHON_INLINE PyObject *__Pyx_GetModuleGlobalName(PyObject *name); /*proto*/ static CYTHON_INLINE int __Pyx_PySequence_Contains(PyObject* item, PyObject* seq, int eq) { int result = PySequence_Contains(seq, item); return unlikely(result < 0) ? result : (result == (eq == Py_EQ)); } static CYTHON_INLINE void __Pyx_ErrRestore(PyObject *type, PyObject *value, PyObject *tb); /*proto*/ static CYTHON_INLINE void __Pyx_ErrFetch(PyObject **type, PyObject **value, PyObject **tb); /*proto*/ static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause); /*proto*/ static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type); /*proto*/ static CYTHON_INLINE int __Pyx_GetBufferAndValidate(Py_buffer* buf, PyObject* obj, __Pyx_TypeInfo* dtype, int flags, int nd, int cast, __Pyx_BufFmt_StackElem* stack); static CYTHON_INLINE void __Pyx_SafeReleaseBuffer(Py_buffer* info); static void __Pyx_RaiseBufferFallbackError(void); /*proto*/ static void __Pyx_RaiseBufferIndexError(int axis); /*proto*/ #define __Pyx_BufPtrStrided1d(type, buf, i0, s0) (type)((char*)buf + i0 * s0) static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected); static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index); static CYTHON_INLINE int __Pyx_IterFinish(void); /*proto*/ static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected); /*proto*/ #if PY_VERSION_HEX < 0x02050000 #ifndef PyAnySet_CheckExact #define PyAnySet_CheckExact(ob) \ ((ob)->ob_type == &PySet_Type || \ (ob)->ob_type == &PyFrozenSet_Type) #define PySet_New(iterable) \ PyObject_CallFunctionObjArgs((PyObject *)&PySet_Type, (iterable), NULL) #define Pyx_PyFrozenSet_New(iterable) \ PyObject_CallFunctionObjArgs((PyObject *)&PyFrozenSet_Type, (iterable), NULL) #define PySet_Size(anyset) \ PyObject_Size((anyset)) #define PySet_Contains(anyset, key) \ PySequence_Contains((anyset), (key)) #define PySet_Pop(set) \ PyObject_CallMethod(set, (char *)"pop", NULL) static CYTHON_INLINE int PySet_Clear(PyObject *set) { PyObject *ret = PyObject_CallMethod(set, (char *)"clear", NULL); if (!ret) return -1; Py_DECREF(ret); return 0; } static CYTHON_INLINE int PySet_Discard(PyObject *set, PyObject *key) { PyObject *ret = PyObject_CallMethod(set, (char *)"discard", (char *)"O", key); if (!ret) return -1; Py_DECREF(ret); return 0; } static CYTHON_INLINE int PySet_Add(PyObject *set, PyObject *key) { PyObject *ret = PyObject_CallMethod(set, (char *)"add", (char *)"O", key); if (!ret) return -1; Py_DECREF(ret); return 0; } #endif /* PyAnySet_CheckExact (<= Py2.4) */ #endif /* < Py2.5 */ static CYTHON_INLINE int __Pyx_PyDict_Contains(PyObject* item, PyObject* dict, int eq) { int result = PyDict_Contains(dict, item); return unlikely(result < 0) ? result : (result == (eq == Py_EQ)); } static PyObject* __Pyx_PyObject_CallMethodTuple(PyObject* obj, PyObject* method_name, PyObject* args) { PyObject *method, *result = NULL; if (unlikely(!args)) return NULL; method = __Pyx_PyObject_GetAttrStr(obj, method_name); if (unlikely(!method)) goto bad; result = PyObject_Call(method, args, NULL); Py_DECREF(method); bad: Py_DECREF(args); return result; } #define __Pyx_PyObject_CallMethod3(obj, name, arg1, arg2, arg3) \ __Pyx_PyObject_CallMethodTuple(obj, name, PyTuple_Pack(3, arg1, arg2, arg3)) #define __Pyx_PyObject_CallMethod2(obj, name, arg1, arg2) \ __Pyx_PyObject_CallMethodTuple(obj, name, PyTuple_Pack(2, arg1, arg2)) #define __Pyx_PyObject_CallMethod1(obj, name, arg1) \ __Pyx_PyObject_CallMethodTuple(obj, name, PyTuple_Pack(1, arg1)) #define __Pyx_PyObject_CallMethod0(obj, name) \ __Pyx_PyObject_CallMethodTuple(obj, name, (Py_INCREF(__pyx_empty_tuple), __pyx_empty_tuple)) #if CYTHON_COMPILING_IN_CPYTHON static CYTHON_INLINE int __Pyx_PyList_Append(PyObject* list, PyObject* x) { PyListObject* L = (PyListObject*) list; Py_ssize_t len = Py_SIZE(list); if (likely(L->allocated > len) & likely(len > (L->allocated >> 1))) { Py_INCREF(x); PyList_SET_ITEM(list, len, x); Py_SIZE(list) = len+1; return 0; } return PyList_Append(list, x); } #else #define __Pyx_PyList_Append(L,x) PyList_Append(L,x) #endif static CYTHON_INLINE PyObject* __Pyx_PyObject_Append(PyObject* L, PyObject* x); /*proto*/ #if PY_MAJOR_VERSION >= 3 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; } #else #define __Pyx_PyDict_GetItem(d, key) PyObject_GetItem(d, key) #endif static CYTHON_INLINE PyObject* __Pyx_PyObject_GetSlice( PyObject* obj, Py_ssize_t cstart, Py_ssize_t cstop, PyObject** py_start, PyObject** py_stop, PyObject** py_slice, int has_cstart, int has_cstop, int wraparound); static CYTHON_INLINE Py_ssize_t __Pyx_div_Py_ssize_t(Py_ssize_t, Py_ssize_t); /* proto */ static CYTHON_INLINE PyObject *__Pyx_GetAttr(PyObject *, PyObject *); /*proto*/ static CYTHON_INLINE PyObject *__Pyx_GetAttr3(PyObject *, PyObject *, PyObject *); /*proto*/ static void __Pyx_WriteUnraisable(const char *name, int clineno, int lineno, const char *filename); /*proto*/ static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void); static int __Pyx_SetVtable(PyObject *dict, void *vtable); /*proto*/ static void* __Pyx_GetVtable(PyObject *dict); /*proto*/ static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name); /*proto*/ static CYTHON_INLINE void __Pyx_ExceptionSave(PyObject **type, PyObject **value, PyObject **tb); /*proto*/ static void __Pyx_ExceptionReset(PyObject *type, PyObject *value, PyObject *tb); /*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 static Py_ssize_t __Pyx_zeros[] = {0, 0, 0, 0, 0, 0, 0, 0}; static Py_ssize_t __Pyx_minusones[] = {-1, -1, -1, -1, -1, -1, -1, -1}; static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level); /*proto*/ static CYTHON_INLINE npy_int64 __Pyx_PyInt_from_py_npy_int64(PyObject *); static CYTHON_INLINE PyObject *__Pyx_PyInt_to_py_npy_int64(npy_int64); static CYTHON_INLINE npy_int32 __Pyx_PyInt_from_py_npy_int32(PyObject *); #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(_WIN32) && defined(__cplusplus) && CYTHON_CCOMPLEX #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 static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float, float); #if CYTHON_CCOMPLEX #define __Pyx_c_eqf(a, b) ((a)==(b)) #define __Pyx_c_sumf(a, b) ((a)+(b)) #define __Pyx_c_difff(a, b) ((a)-(b)) #define __Pyx_c_prodf(a, b) ((a)*(b)) #define __Pyx_c_quotf(a, b) ((a)/(b)) #define __Pyx_c_negf(a) (-(a)) #ifdef __cplusplus #define __Pyx_c_is_zerof(z) ((z)==(float)0) #define __Pyx_c_conjf(z) (::std::conj(z)) #if 1 #define __Pyx_c_absf(z) (::std::abs(z)) #define __Pyx_c_powf(a, b) (::std::pow(a, b)) #endif #else #define __Pyx_c_is_zerof(z) ((z)==0) #define __Pyx_c_conjf(z) (conjf(z)) #if 1 #define __Pyx_c_absf(z) (cabsf(z)) #define __Pyx_c_powf(a, b) (cpowf(a, b)) #endif #endif #else static CYTHON_INLINE int __Pyx_c_eqf(__pyx_t_float_complex, __pyx_t_float_complex); static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_sumf(__pyx_t_float_complex, __pyx_t_float_complex); static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_difff(__pyx_t_float_complex, __pyx_t_float_complex); static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_prodf(__pyx_t_float_complex, __pyx_t_float_complex); static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_quotf(__pyx_t_float_complex, __pyx_t_float_complex); static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_negf(__pyx_t_float_complex); static CYTHON_INLINE int __Pyx_c_is_zerof(__pyx_t_float_complex); static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_conjf(__pyx_t_float_complex); #if 1 static CYTHON_INLINE float __Pyx_c_absf(__pyx_t_float_complex); static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_powf(__pyx_t_float_complex, __pyx_t_float_complex); #endif #endif static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double, double); #if CYTHON_CCOMPLEX #define __Pyx_c_eq(a, b) ((a)==(b)) #define __Pyx_c_sum(a, b) ((a)+(b)) #define __Pyx_c_diff(a, b) ((a)-(b)) #define __Pyx_c_prod(a, b) ((a)*(b)) #define __Pyx_c_quot(a, b) ((a)/(b)) #define __Pyx_c_neg(a) (-(a)) #ifdef __cplusplus #define __Pyx_c_is_zero(z) ((z)==(double)0) #define __Pyx_c_conj(z) (::std::conj(z)) #if 1 #define __Pyx_c_abs(z) (::std::abs(z)) #define __Pyx_c_pow(a, b) (::std::pow(a, b)) #endif #else #define __Pyx_c_is_zero(z) ((z)==0) #define __Pyx_c_conj(z) (conj(z)) #if 1 #define __Pyx_c_abs(z) (cabs(z)) #define __Pyx_c_pow(a, b) (cpow(a, b)) #endif #endif #else static CYTHON_INLINE int __Pyx_c_eq(__pyx_t_double_complex, __pyx_t_double_complex); static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_sum(__pyx_t_double_complex, __pyx_t_double_complex); static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_diff(__pyx_t_double_complex, __pyx_t_double_complex); static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_prod(__pyx_t_double_complex, __pyx_t_double_complex); static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_quot(__pyx_t_double_complex, __pyx_t_double_complex); static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_neg(__pyx_t_double_complex); static CYTHON_INLINE int __Pyx_c_is_zero(__pyx_t_double_complex); static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_conj(__pyx_t_double_complex); #if 1 static CYTHON_INLINE double __Pyx_c_abs(__pyx_t_double_complex); static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_pow(__pyx_t_double_complex, __pyx_t_double_complex); #endif #endif static CYTHON_INLINE unsigned char __Pyx_PyInt_AsUnsignedChar(PyObject *); static CYTHON_INLINE unsigned short __Pyx_PyInt_AsUnsignedShort(PyObject *); static CYTHON_INLINE unsigned int __Pyx_PyInt_AsUnsignedInt(PyObject *); static CYTHON_INLINE char __Pyx_PyInt_AsChar(PyObject *); static CYTHON_INLINE short __Pyx_PyInt_AsShort(PyObject *); static CYTHON_INLINE int __Pyx_PyInt_AsInt(PyObject *); static CYTHON_INLINE signed char __Pyx_PyInt_AsSignedChar(PyObject *); static CYTHON_INLINE signed short __Pyx_PyInt_AsSignedShort(PyObject *); static CYTHON_INLINE signed int __Pyx_PyInt_AsSignedInt(PyObject *); static CYTHON_INLINE int __Pyx_PyInt_AsLongDouble(PyObject *); static CYTHON_INLINE unsigned long __Pyx_PyInt_AsUnsignedLong(PyObject *); static CYTHON_INLINE unsigned PY_LONG_LONG __Pyx_PyInt_AsUnsignedLongLong(PyObject *); static CYTHON_INLINE long __Pyx_PyInt_AsLong(PyObject *); static CYTHON_INLINE PY_LONG_LONG __Pyx_PyInt_AsLongLong(PyObject *); static CYTHON_INLINE signed long __Pyx_PyInt_AsSignedLong(PyObject *); static CYTHON_INLINE signed PY_LONG_LONG __Pyx_PyInt_AsSignedLongLong(PyObject *); static int __Pyx_check_binary_version(void); #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 static PyObject *__Pyx_ImportModule(const char *name); /*proto*/ static PyTypeObject *__Pyx_ImportType(const char *module_name, const char *class_name, size_t size, int strict); /*proto*/ typedef struct { int code_line; PyCodeObject* code_object; } __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); static void __Pyx_AddTraceback(const char *funcname, int c_line, int py_line, const char *filename); /*proto*/ static int __Pyx_InitStrings(__Pyx_StringTabEntry *t); /*proto*/ /* Module declarations from 'cpython.buffer' */ /* Module declarations from 'cpython.ref' */ /* Module declarations from 'libc.string' */ /* Module declarations from 'libc.stdio' */ /* Module declarations from 'cpython.object' */ /* Module declarations from 'libc.stdlib' */ /* 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*/ /* Module declarations from 'cython' */ /* Module declarations from 'cpython.version' */ /* Module declarations from 'cpython.exc' */ /* Module declarations from 'cpython.module' */ /* Module declarations from 'cpython.mem' */ /* Module declarations from 'cpython.tuple' */ /* Module declarations from 'cpython.list' */ /* Module declarations from 'cpython.sequence' */ /* Module declarations from 'cpython.mapping' */ /* Module declarations from 'cpython.iterator' */ /* Module declarations from '__builtin__' */ /* Module declarations from 'cpython.type' */ static PyTypeObject *__pyx_ptype_7cpython_4type_type = 0; /* Module declarations from 'cpython.number' */ /* Module declarations from 'cpython.int' */ /* Module declarations from '__builtin__' */ /* Module declarations from 'cpython.bool' */ static PyTypeObject *__pyx_ptype_7cpython_4bool_bool = 0; /* Module declarations from 'cpython.long' */ /* Module declarations from 'cpython.float' */ /* Module declarations from '__builtin__' */ /* Module declarations from 'cpython.complex' */ static PyTypeObject *__pyx_ptype_7cpython_7complex_complex = 0; /* Module declarations from 'cpython.string' */ /* Module declarations from 'cpython.unicode' */ /* Module declarations from 'cpython.dict' */ /* Module declarations from 'cpython.instance' */ /* Module declarations from 'cpython.function' */ /* Module declarations from 'cpython.method' */ /* Module declarations from 'cpython.weakref' */ /* Module declarations from 'cpython.getargs' */ /* Module declarations from 'cpython.pythread' */ /* Module declarations from 'cpython.pystate' */ /* Module declarations from 'cpython.cobject' */ /* Module declarations from 'cpython.oldbuffer' */ /* Module declarations from 'cpython.set' */ /* Module declarations from 'cpython.bytes' */ /* Module declarations from 'cpython.pycapsule' */ /* Module declarations from 'cpython' */ /* Module declarations from 'util' */ static CYTHON_INLINE PyObject *__pyx_f_4util_get_value_at(PyArrayObject *, PyObject *); /*proto*/ static CYTHON_INLINE PyObject *__pyx_f_4util_set_value_at(PyArrayObject *, PyObject *, PyObject *); /*proto*/ /* Module declarations from 'pandas.tslib' */ /* Module declarations from 'khash' */ /* Module declarations from 'pandas.hashtable' */ static PyTypeObject *__pyx_ptype_6pandas_9hashtable_HashTable = 0; static PyTypeObject *__pyx_ptype_6pandas_9hashtable_Int64HashTable = 0; static PyTypeObject *__pyx_ptype_6pandas_9hashtable_Float64HashTable = 0; static PyTypeObject *__pyx_ptype_6pandas_9hashtable_PyObjectHashTable = 0; /* Module declarations from 'datetime' */ /* Module declarations from 'datetime' */ static PyTypeObject *__pyx_ptype_8datetime_date = 0; static PyTypeObject *__pyx_ptype_8datetime_datetime = 0; static PyTypeObject *__pyx_ptype_8datetime_timedelta = 0; static CYTHON_INLINE int __pyx_f_8datetime__cstring_to_dts(char *, int, pandas_datetimestruct *); /*proto*/ static CYTHON_INLINE PyObject *__pyx_f_8datetime__dts_to_pydatetime(pandas_datetimestruct *); /*proto*/ static CYTHON_INLINE __pyx_t_5numpy_int64_t __pyx_f_8datetime__pydatetime_to_dts(PyObject *, pandas_datetimestruct *); /*proto*/ /* Module declarations from 'pandas.index' */ static PyTypeObject *__pyx_ptype_6pandas_5index_IndexEngine = 0; static PyTypeObject *__pyx_ptype_6pandas_5index_Int64Engine = 0; static PyTypeObject *__pyx_ptype_6pandas_5index_DatetimeEngine = 0; static PyTypeObject *__pyx_ptype_6pandas_5index_ObjectEngine = 0; static PyTypeObject *__pyx_ptype_6pandas_5index_Float64Engine = 0; static __pyx_t_5numpy_int64_t __pyx_v_6pandas_5index_iNaT; static CYTHON_INLINE PyObject *__pyx_f_6pandas_5index_is_definitely_invalid_key(PyObject *); /*proto*/ static Py_ssize_t __pyx_f_6pandas_5index__bin_search(PyArrayObject *, PyObject *); /*proto*/ static PyObject *__pyx_f_6pandas_5index_convert_scalar(PyArrayObject *, PyObject *, int __pyx_skip_dispatch); /*proto*/ static CYTHON_INLINE PyObject *__pyx_f_6pandas_5index__to_i8(PyObject *); /*proto*/ static CYTHON_INLINE int __pyx_f_6pandas_5index__is_utc(PyObject *); /*proto*/ 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_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_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 }; #define __Pyx_MODULE_NAME "pandas.index" int __pyx_module_is_main_pandas__index = 0; /* Implementation of 'pandas.index' */ static PyObject *__pyx_builtin_ImportError; static PyObject *__pyx_builtin_TypeError; static PyObject *__pyx_builtin_KeyError; static PyObject *__pyx_builtin_range; static PyObject *__pyx_builtin_NotImplementedError; static PyObject *__pyx_builtin_AttributeError; static PyObject *__pyx_builtin_ValueError; static PyObject *__pyx_builtin_IndexError; static PyObject *__pyx_builtin_RuntimeError; static PyObject *__pyx_pf_6pandas_5index_get_value_at(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_arr, PyObject *__pyx_v_loc); /* proto */ static PyObject *__pyx_pf_6pandas_5index_2set_value_at(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_arr, PyObject *__pyx_v_loc, PyObject *__pyx_v_val); /* proto */ static int __pyx_pf_6pandas_5index_11IndexEngine___init__(struct __pyx_obj_6pandas_5index_IndexEngine *__pyx_v_self, PyObject *__pyx_v_vgetter, PyObject *__pyx_v_n); /* proto */ static int __pyx_pf_6pandas_5index_11IndexEngine_2__contains__(struct __pyx_obj_6pandas_5index_IndexEngine *__pyx_v_self, PyObject *__pyx_v_val); /* proto */ static PyObject *__pyx_pf_6pandas_5index_11IndexEngine_4get_value(struct __pyx_obj_6pandas_5index_IndexEngine *__pyx_v_self, PyArrayObject *__pyx_v_arr, PyObject *__pyx_v_key); /* proto */ static PyObject *__pyx_pf_6pandas_5index_11IndexEngine_6set_value(struct __pyx_obj_6pandas_5index_IndexEngine *__pyx_v_self, PyArrayObject *__pyx_v_arr, PyObject *__pyx_v_key, PyObject *__pyx_v_value); /* proto */ static PyObject *__pyx_pf_6pandas_5index_11IndexEngine_8get_loc(struct __pyx_obj_6pandas_5index_IndexEngine *__pyx_v_self, PyObject *__pyx_v_val); /* proto */ static PyObject *__pyx_pf_6pandas_5index_11IndexEngine_9is_unique___get__(struct __pyx_obj_6pandas_5index_IndexEngine *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_5index_11IndexEngine_12is_monotonic___get__(struct __pyx_obj_6pandas_5index_IndexEngine *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_5index_11IndexEngine_10_call_monotonic(CYTHON_UNUSED struct __pyx_obj_6pandas_5index_IndexEngine *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_values); /* proto */ static PyObject *__pyx_pf_6pandas_5index_11IndexEngine_12clear_mapping(struct __pyx_obj_6pandas_5index_IndexEngine *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_5index_11IndexEngine_14get_indexer(struct __pyx_obj_6pandas_5index_IndexEngine *__pyx_v_self, PyObject *__pyx_v_values); /* proto */ static PyObject *__pyx_pf_6pandas_5index_11IndexEngine_16get_indexer_non_unique(struct __pyx_obj_6pandas_5index_IndexEngine *__pyx_v_self, PyObject *__pyx_v_targets); /* proto */ static PyObject *__pyx_pf_6pandas_5index_11IndexEngine_7vgetter___get__(struct __pyx_obj_6pandas_5index_IndexEngine *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_5index_11IndexEngine_7mapping___get__(struct __pyx_obj_6pandas_5index_IndexEngine *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_5index_11IndexEngine_19over_size_threshold___get__(struct __pyx_obj_6pandas_5index_IndexEngine *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_5index_11Int64Engine__call_monotonic(CYTHON_UNUSED struct __pyx_obj_6pandas_5index_Int64Engine *__pyx_v_self, PyObject *__pyx_v_values); /* proto */ static PyObject *__pyx_pf_6pandas_5index_11Int64Engine_2get_pad_indexer(struct __pyx_obj_6pandas_5index_Int64Engine *__pyx_v_self, PyObject *__pyx_v_other, PyObject *__pyx_v_limit); /* proto */ static PyObject *__pyx_pf_6pandas_5index_11Int64Engine_4get_backfill_indexer(struct __pyx_obj_6pandas_5index_Int64Engine *__pyx_v_self, PyObject *__pyx_v_other, PyObject *__pyx_v_limit); /* proto */ static PyObject *__pyx_pf_6pandas_5index_13Float64Engine__call_monotonic(CYTHON_UNUSED struct __pyx_obj_6pandas_5index_Float64Engine *__pyx_v_self, PyObject *__pyx_v_values); /* proto */ static PyObject *__pyx_pf_6pandas_5index_13Float64Engine_2get_pad_indexer(struct __pyx_obj_6pandas_5index_Float64Engine *__pyx_v_self, PyObject *__pyx_v_other, PyObject *__pyx_v_limit); /* proto */ static PyObject *__pyx_pf_6pandas_5index_13Float64Engine_4get_backfill_indexer(struct __pyx_obj_6pandas_5index_Float64Engine *__pyx_v_self, PyObject *__pyx_v_other, PyObject *__pyx_v_limit); /* proto */ static PyObject *__pyx_pf_6pandas_5index_12ObjectEngine__call_monotonic(CYTHON_UNUSED struct __pyx_obj_6pandas_5index_ObjectEngine *__pyx_v_self, PyObject *__pyx_v_values); /* proto */ static PyObject *__pyx_pf_6pandas_5index_12ObjectEngine_2get_pad_indexer(struct __pyx_obj_6pandas_5index_ObjectEngine *__pyx_v_self, PyObject *__pyx_v_other, PyObject *__pyx_v_limit); /* proto */ static PyObject *__pyx_pf_6pandas_5index_12ObjectEngine_4get_backfill_indexer(struct __pyx_obj_6pandas_5index_ObjectEngine *__pyx_v_self, PyObject *__pyx_v_other, PyObject *__pyx_v_limit); /* proto */ static int __pyx_pf_6pandas_5index_14DatetimeEngine___contains__(struct __pyx_obj_6pandas_5index_DatetimeEngine *__pyx_v_self, PyObject *__pyx_v_val); /* proto */ static PyObject *__pyx_pf_6pandas_5index_14DatetimeEngine_2_call_monotonic(CYTHON_UNUSED struct __pyx_obj_6pandas_5index_DatetimeEngine *__pyx_v_self, PyObject *__pyx_v_values); /* proto */ static PyObject *__pyx_pf_6pandas_5index_14DatetimeEngine_4get_loc(struct __pyx_obj_6pandas_5index_DatetimeEngine *__pyx_v_self, PyObject *__pyx_v_val); /* proto */ static PyObject *__pyx_pf_6pandas_5index_14DatetimeEngine_6get_indexer(struct __pyx_obj_6pandas_5index_DatetimeEngine *__pyx_v_self, PyObject *__pyx_v_values); /* proto */ static PyObject *__pyx_pf_6pandas_5index_14DatetimeEngine_8get_pad_indexer(struct __pyx_obj_6pandas_5index_DatetimeEngine *__pyx_v_self, PyObject *__pyx_v_other, PyObject *__pyx_v_limit); /* proto */ static PyObject *__pyx_pf_6pandas_5index_14DatetimeEngine_10get_backfill_indexer(struct __pyx_obj_6pandas_5index_DatetimeEngine *__pyx_v_self, PyObject *__pyx_v_other, PyObject *__pyx_v_limit); /* proto */ static PyObject *__pyx_pf_6pandas_5index_4convert_scalar(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_arr, PyObject *__pyx_v_value); /* 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_5index_IndexEngine(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_6pandas_5index_Int64Engine(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_6pandas_5index_DatetimeEngine(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_6pandas_5index_ObjectEngine(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_6pandas_5index_Float64Engine(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static char __pyx_k_1[] = "is_monotonic_float64"; static char __pyx_k_3[] = "M8[ns]"; static char __pyx_k_10[] = "Cannot assign nan to integer series"; static char __pyx_k_12[] = "_delta_to_nanoseconds"; static char __pyx_k_13[] = "index out of bounds"; static char __pyx_k_16[] = "Unable to parse %s"; static char __pyx_k_17[] = "ndarray is not C contiguous"; static char __pyx_k_19[] = "ndarray is not Fortran contiguous"; static char __pyx_k_21[] = "Non-native byte order not supported"; static char __pyx_k_23[] = "unknown dtype code in numpy.pxd (%d)"; static char __pyx_k_24[] = "Format string allocated too short, see comment in numpy.pxd"; static char __pyx_k_27[] = "Format string allocated too short."; static char __pyx_k_29[] = "pandas.tslib"; static char __pyx_k_30[] = "dateutil.tz"; static char __pyx_k_33[] = "/home/yoh/deb/gits/pkg-exppsy/pandas/pandas/index.pyx"; static char __pyx_k_34[] = "pandas.index"; static char __pyx_k__B[] = "B"; static char __pyx_k__H[] = "H"; static char __pyx_k__I[] = "I"; static char __pyx_k__L[] = "L"; static char __pyx_k__O[] = "O"; static char __pyx_k__Q[] = "Q"; static char __pyx_k__b[] = "b"; static char __pyx_k__d[] = "d"; static char __pyx_k__f[] = "f"; static char __pyx_k__g[] = "g"; static char __pyx_k__h[] = "h"; static char __pyx_k__i[] = "i"; static char __pyx_k__l[] = "l"; static char __pyx_k__n[] = "n"; static char __pyx_k__q[] = "q"; static char __pyx_k__Zd[] = "Zd"; static char __pyx_k__Zf[] = "Zf"; static char __pyx_k__Zg[] = "Zg"; static char __pyx_k__i4[] = "i4"; static char __pyx_k__i8[] = "i8"; static char __pyx_k__np[] = "np"; static char __pyx_k__UTC[] = "UTC"; static char __pyx_k__arr[] = "arr"; static char __pyx_k__day[] = "day"; static char __pyx_k__inf[] = "inf"; static char __pyx_k__key[] = "key"; static char __pyx_k__loc[] = "loc"; static char __pyx_k__utc[] = "utc"; static char __pyx_k__val[] = "val"; static char __pyx_k__hour[] = "hour"; static char __pyx_k__left[] = "left"; static char __pyx_k__pytz[] = "pytz"; static char __pyx_k__side[] = "side"; static char __pyx_k__type[] = "type"; static char __pyx_k__view[] = "view"; static char __pyx_k__year[] = "year"; static char __pyx_k___data[] = "_data"; static char __pyx_k___hash[] = "_hash"; static char __pyx_k__algos[] = "algos"; static char __pyx_k__bool_[] = "bool_"; static char __pyx_k__dtype[] = "dtype"; static char __pyx_k__empty[] = "empty"; static char __pyx_k__int64[] = "int64"; static char __pyx_k__limit[] = "limit"; static char __pyx_k__month[] = "month"; static char __pyx_k__numpy[] = "numpy"; static char __pyx_k__other[] = "other"; static char __pyx_k__range[] = "range"; static char __pyx_k__right[] = "right"; static char __pyx_k__tslib[] = "tslib"; static char __pyx_k__tzutc[] = "tzutc"; static char __pyx_k__uint8[] = "uint8"; static char __pyx_k__value[] = "value"; static char __pyx_k__append[] = "append"; static char __pyx_k__astype[] = "astype"; static char __pyx_k__lookup[] = "lookup"; static char __pyx_k__minute[] = "minute"; static char __pyx_k__object[] = "object"; static char __pyx_k__pandas[] = "pandas"; static char __pyx_k__repeat[] = "repeat"; static char __pyx_k__resize[] = "resize"; static char __pyx_k__second[] = "second"; static char __pyx_k__tzinfo[] = "tzinfo"; static char __pyx_k___du_utc[] = "_du_utc"; static char __pyx_k__asarray[] = "asarray"; static char __pyx_k__float64[] = "float64"; static char __pyx_k__get_loc[] = "get_loc"; static char __pyx_k__integer[] = "integer"; static char __pyx_k__ndarray[] = "ndarray"; static char __pyx_k__vgetter[] = "vgetter"; static char __pyx_k__KeyError[] = "KeyError"; static char __pyx_k____main__[] = "__main__"; static char __pyx_k____test__[] = "__test__"; static char __pyx_k__get_item[] = "get_item"; static char __pyx_k__Timestamp[] = "Timestamp"; static char __pyx_k__TypeError[] = "TypeError"; static char __pyx_k__get_value[] = "get_value"; static char __pyx_k__hashtable[] = "hashtable"; static char __pyx_k__have_pytz[] = "have_pytz"; static char __pyx_k__is_unique[] = "is_unique"; static char __pyx_k__pad_int64[] = "pad_int64"; static char __pyx_k__set_value[] = "set_value"; static char __pyx_k__IndexError[] = "IndexError"; static char __pyx_k__ValueError[] = "ValueError"; static char __pyx_k____import__[] = "__import__"; static char __pyx_k__pad_object[] = "pad_object"; static char __pyx_k__ImportError[] = "ImportError"; static char __pyx_k__microsecond[] = "microsecond"; static char __pyx_k__pad_float64[] = "pad_float64"; static char __pyx_k__RuntimeError[] = "RuntimeError"; static char __pyx_k___SIZE_CUTOFF[] = "_SIZE_CUTOFF"; static char __pyx_k__ensure_int64[] = "ensure_int64"; static char __pyx_k__get_value_at[] = "get_value_at"; static char __pyx_k__is_monotonic[] = "is_monotonic"; static char __pyx_k__searchsorted[] = "searchsorted"; static char __pyx_k__set_value_at[] = "set_value_at"; static char __pyx_k__map_locations[] = "map_locations"; static char __pyx_k__AttributeError[] = "AttributeError"; static char __pyx_k__Int64HashTable[] = "Int64HashTable"; static char __pyx_k____pyx_vtable__[] = "__pyx_vtable__"; static char __pyx_k___get_utcoffset[] = "_get_utcoffset"; static char __pyx_k___pad_functions[] = "_pad_functions"; static char __pyx_k__backfill_int64[] = "backfill_int64"; static char __pyx_k____pyx_getbuffer[] = "__pyx_getbuffer"; static char __pyx_k___call_monotonic[] = "_call_monotonic"; static char __pyx_k__backfill_object[] = "backfill_object"; static char __pyx_k__Float64HashTable[] = "Float64HashTable"; static char __pyx_k__backfill_float64[] = "backfill_float64"; static char __pyx_k__PyObjectHashTable[] = "PyObjectHashTable"; static char __pyx_k__is_monotonic_int64[] = "is_monotonic_int64"; static char __pyx_k__NotImplementedError[] = "NotImplementedError"; static char __pyx_k____pyx_releasebuffer[] = "__pyx_releasebuffer"; static char __pyx_k___backfill_functions[] = "_backfill_functions"; static char __pyx_k__is_monotonic_object[] = "is_monotonic_object"; static PyObject *__pyx_n_s_1; static PyObject *__pyx_kp_s_10; static PyObject *__pyx_n_s_12; static PyObject *__pyx_kp_s_13; static PyObject *__pyx_kp_s_16; static PyObject *__pyx_kp_u_17; static PyObject *__pyx_kp_u_19; static PyObject *__pyx_kp_u_21; static PyObject *__pyx_kp_u_23; static PyObject *__pyx_kp_u_24; static PyObject *__pyx_kp_u_27; static PyObject *__pyx_n_s_29; static PyObject *__pyx_kp_s_3; static PyObject *__pyx_n_s_30; static PyObject *__pyx_kp_s_33; static PyObject *__pyx_n_s_34; static PyObject *__pyx_n_s__AttributeError; static PyObject *__pyx_n_s__Float64HashTable; static PyObject *__pyx_n_s__ImportError; static PyObject *__pyx_n_s__IndexError; static PyObject *__pyx_n_s__Int64HashTable; static PyObject *__pyx_n_s__KeyError; static PyObject *__pyx_n_s__NotImplementedError; static PyObject *__pyx_n_s__PyObjectHashTable; static PyObject *__pyx_n_s__RuntimeError; static PyObject *__pyx_n_s__Timestamp; static PyObject *__pyx_n_s__TypeError; static PyObject *__pyx_n_s__UTC; static PyObject *__pyx_n_s__ValueError; static PyObject *__pyx_n_s___SIZE_CUTOFF; static PyObject *__pyx_n_s____import__; static PyObject *__pyx_n_s____main__; static PyObject *__pyx_n_s____pyx_getbuffer; static PyObject *__pyx_n_s____pyx_releasebuffer; static PyObject *__pyx_n_s____pyx_vtable__; static PyObject *__pyx_n_s____test__; static PyObject *__pyx_n_s___backfill_functions; static PyObject *__pyx_n_s___call_monotonic; static PyObject *__pyx_n_s___data; static PyObject *__pyx_n_s___du_utc; static PyObject *__pyx_n_s___get_utcoffset; static PyObject *__pyx_n_s___hash; static PyObject *__pyx_n_s___pad_functions; static PyObject *__pyx_n_s__algos; static PyObject *__pyx_n_s__append; static PyObject *__pyx_n_s__arr; static PyObject *__pyx_n_s__asarray; static PyObject *__pyx_n_s__astype; static PyObject *__pyx_n_s__backfill_float64; static PyObject *__pyx_n_s__backfill_int64; static PyObject *__pyx_n_s__backfill_object; static PyObject *__pyx_n_s__bool_; static PyObject *__pyx_n_s__day; static PyObject *__pyx_n_s__dtype; static PyObject *__pyx_n_s__empty; static PyObject *__pyx_n_s__ensure_int64; static PyObject *__pyx_n_s__float64; static PyObject *__pyx_n_s__get_item; static PyObject *__pyx_n_s__get_loc; static PyObject *__pyx_n_s__get_value; static PyObject *__pyx_n_s__get_value_at; static PyObject *__pyx_n_s__hashtable; static PyObject *__pyx_n_s__have_pytz; static PyObject *__pyx_n_s__hour; static PyObject *__pyx_n_s__i4; static PyObject *__pyx_n_s__i8; static PyObject *__pyx_n_s__inf; static PyObject *__pyx_n_s__int64; static PyObject *__pyx_n_s__integer; static PyObject *__pyx_n_s__is_monotonic; static PyObject *__pyx_n_s__is_monotonic_int64; static PyObject *__pyx_n_s__is_monotonic_object; static PyObject *__pyx_n_s__is_unique; static PyObject *__pyx_n_s__key; static PyObject *__pyx_n_s__left; static PyObject *__pyx_n_s__limit; static PyObject *__pyx_n_s__loc; static PyObject *__pyx_n_s__lookup; static PyObject *__pyx_n_s__map_locations; static PyObject *__pyx_n_s__microsecond; static PyObject *__pyx_n_s__minute; static PyObject *__pyx_n_s__month; static PyObject *__pyx_n_s__n; static PyObject *__pyx_n_s__ndarray; static PyObject *__pyx_n_s__np; static PyObject *__pyx_n_s__numpy; static PyObject *__pyx_n_s__object; static PyObject *__pyx_n_s__other; static PyObject *__pyx_n_s__pad_float64; static PyObject *__pyx_n_s__pad_int64; static PyObject *__pyx_n_s__pad_object; static PyObject *__pyx_n_s__pandas; static PyObject *__pyx_n_s__pytz; static PyObject *__pyx_n_s__range; static PyObject *__pyx_n_s__repeat; static PyObject *__pyx_n_s__resize; static PyObject *__pyx_n_s__right; static PyObject *__pyx_n_s__searchsorted; static PyObject *__pyx_n_s__second; static PyObject *__pyx_n_s__set_value; static PyObject *__pyx_n_s__set_value_at; static PyObject *__pyx_n_s__side; static PyObject *__pyx_n_s__tslib; static PyObject *__pyx_n_s__type; static PyObject *__pyx_n_s__tzinfo; static PyObject *__pyx_n_s__tzutc; static PyObject *__pyx_n_s__uint8; static PyObject *__pyx_n_s__utc; static PyObject *__pyx_n_s__val; static PyObject *__pyx_n_s__value; static PyObject *__pyx_n_s__vgetter; static PyObject *__pyx_n_s__view; static PyObject *__pyx_n_s__year; static PyObject *__pyx_int_neg_1; static PyObject *__pyx_int_15; static PyObject *__pyx_int_1000000; static PyObject *__pyx_k_tuple_2; static PyObject *__pyx_k_tuple_4; static PyObject *__pyx_k_tuple_5; static PyObject *__pyx_k_tuple_6; static PyObject *__pyx_k_tuple_7; static PyObject *__pyx_k_tuple_8; static PyObject *__pyx_k_tuple_9; static PyObject *__pyx_k_tuple_11; static PyObject *__pyx_k_tuple_14; static PyObject *__pyx_k_tuple_15; static PyObject *__pyx_k_tuple_18; static PyObject *__pyx_k_tuple_20; static PyObject *__pyx_k_tuple_22; static PyObject *__pyx_k_tuple_25; static PyObject *__pyx_k_tuple_26; static PyObject *__pyx_k_tuple_28; static PyObject *__pyx_k_tuple_31; static PyObject *__pyx_k_tuple_35; static PyObject *__pyx_k_codeobj_32; static PyObject *__pyx_k_codeobj_36; /* "pandas/index.pyx":46 * * * cdef inline is_definitely_invalid_key(object val): # <<<<<<<<<<<<<< * if PyTuple_Check(val): * try: */ static CYTHON_INLINE PyObject *__pyx_f_6pandas_5index_is_definitely_invalid_key(PyObject *__pyx_v_val) { 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_hash_t __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; int __pyx_t_11; int __pyx_t_12; int __pyx_t_13; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("is_definitely_invalid_key", 0); /* "pandas/index.pyx":47 * * cdef inline is_definitely_invalid_key(object val): * if PyTuple_Check(val): # <<<<<<<<<<<<<< * try: * hash(val) */ __pyx_t_1 = (PyTuple_Check(__pyx_v_val) != 0); if (__pyx_t_1) { /* "pandas/index.pyx":48 * cdef inline is_definitely_invalid_key(object val): * if PyTuple_Check(val): * try: # <<<<<<<<<<<<<< * hash(val) * except TypeError: */ { __Pyx_ExceptionSave(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4); __Pyx_XGOTREF(__pyx_t_2); __Pyx_XGOTREF(__pyx_t_3); __Pyx_XGOTREF(__pyx_t_4); /*try:*/ { /* "pandas/index.pyx":49 * if PyTuple_Check(val): * try: * hash(val) # <<<<<<<<<<<<<< * except TypeError: * return True */ __pyx_t_5 = PyObject_Hash(__pyx_v_val); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __pyx_L4_error;} } __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; goto __pyx_L11_try_end; __pyx_L4_error:; /* "pandas/index.pyx":50 * try: * hash(val) * except TypeError: # <<<<<<<<<<<<<< * return True * */ __pyx_t_6 = PyErr_ExceptionMatches(__pyx_builtin_TypeError); if (__pyx_t_6) { __Pyx_AddTraceback("pandas.index.is_definitely_invalid_key", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 50; __pyx_clineno = __LINE__; goto __pyx_L6_except_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_GOTREF(__pyx_t_8); __Pyx_GOTREF(__pyx_t_9); /* "pandas/index.pyx":51 * hash(val) * except TypeError: * return True # <<<<<<<<<<<<<< * * # we have a _data, means we are a NDFrame */ __Pyx_XDECREF(__pyx_r); __pyx_t_10 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L6_except_error;} __Pyx_GOTREF(__pyx_t_10); __pyx_r = __pyx_t_10; __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; goto __pyx_L7_except_return; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; goto __pyx_L5_exception_handled; } __pyx_L6_except_error:; __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_XGIVEREF(__pyx_t_4); __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4); goto __pyx_L1_error; __pyx_L7_except_return:; __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_XGIVEREF(__pyx_t_4); __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4); goto __pyx_L0; __pyx_L5_exception_handled:; __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_XGIVEREF(__pyx_t_4); __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4); __pyx_L11_try_end:; } goto __pyx_L3; } __pyx_L3:; /* "pandas/index.pyx":54 * * # we have a _data, means we are a NDFrame * return (PySlice_Check(val) or cnp.PyArray_Check(val) # <<<<<<<<<<<<<< * or PyList_Check(val) or hasattr(val,'_data')) * */ __Pyx_XDECREF(__pyx_r); __pyx_t_9 = PyInt_FromLong(PySlice_Check(__pyx_v_val)); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 54; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 54; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (!__pyx_t_1) { __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; /* "pandas/index.pyx":55 * # we have a _data, means we are a NDFrame * return (PySlice_Check(val) or cnp.PyArray_Check(val) * or PyList_Check(val) or hasattr(val,'_data')) # <<<<<<<<<<<<<< * * def get_value_at(ndarray arr, object loc): */ __pyx_t_1 = PyArray_Check(__pyx_v_val); if (!__pyx_t_1) { __pyx_t_11 = PyList_Check(__pyx_v_val); if (!__pyx_t_11) { __pyx_t_12 = PyObject_HasAttr(__pyx_v_val, ((PyObject *)__pyx_n_s___data)); if (unlikely(__pyx_t_12 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 55; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_13 = __pyx_t_12; } else { __pyx_t_13 = __pyx_t_11; } __pyx_t_11 = __pyx_t_13; } else { __pyx_t_11 = __pyx_t_1; } __pyx_t_8 = __Pyx_PyBool_FromLong(__pyx_t_11); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 55; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_7 = __pyx_t_8; __pyx_t_8 = 0; } else { __pyx_t_7 = __pyx_t_9; __pyx_t_9 = 0; } __pyx_r = __pyx_t_7; __pyx_t_7 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); __Pyx_XDECREF(__pyx_t_10); __Pyx_AddTraceback("pandas.index.is_definitely_invalid_key", __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_5index_1get_value_at(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5index_1get_value_at = {__Pyx_NAMESTR("get_value_at"), (PyCFunction)__pyx_pw_6pandas_5index_1get_value_at, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5index_1get_value_at(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_arr = 0; PyObject *__pyx_v_loc = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("get_value_at (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__arr,&__pyx_n_s__loc,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__arr)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__loc)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("get_value_at", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 57; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "get_value_at") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 57; __pyx_clineno = __LINE__; goto __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_loc = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("get_value_at", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 57; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.index.get_value_at", __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_filename = __pyx_f[0]; __pyx_lineno = 57; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5index_get_value_at(__pyx_self, __pyx_v_arr, __pyx_v_loc); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/index.pyx":57 * or PyList_Check(val) or hasattr(val,'_data')) * * def get_value_at(ndarray arr, object loc): # <<<<<<<<<<<<<< * if arr.descr.type_num == NPY_DATETIME: * return Timestamp(util.get_value_at(arr, loc)) */ static PyObject *__pyx_pf_6pandas_5index_get_value_at(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_arr, PyObject *__pyx_v_loc) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_value_at", 0); /* "pandas/index.pyx":58 * * def get_value_at(ndarray arr, object loc): * if arr.descr.type_num == NPY_DATETIME: # <<<<<<<<<<<<<< * return Timestamp(util.get_value_at(arr, loc)) * return util.get_value_at(arr, loc) */ __pyx_t_1 = ((__pyx_v_arr->descr->type_num == NPY_DATETIME) != 0); if (__pyx_t_1) { /* "pandas/index.pyx":59 * def get_value_at(ndarray arr, object loc): * if arr.descr.type_num == NPY_DATETIME: * return Timestamp(util.get_value_at(arr, loc)) # <<<<<<<<<<<<<< * return util.get_value_at(arr, loc) * */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__Timestamp); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 59; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __pyx_f_4util_get_value_at(__pyx_v_arr, __pyx_v_loc); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 59; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 59; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 59; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; goto __pyx_L3; } __pyx_L3:; /* "pandas/index.pyx":60 * if arr.descr.type_num == NPY_DATETIME: * return Timestamp(util.get_value_at(arr, loc)) * return util.get_value_at(arr, loc) # <<<<<<<<<<<<<< * * def set_value_at(ndarray arr, object loc, object val): */ __Pyx_XDECREF(__pyx_r); __pyx_t_3 = __pyx_f_4util_get_value_at(__pyx_v_arr, __pyx_v_loc); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 60; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; __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.index.get_value_at", __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_5index_3set_value_at(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5index_3set_value_at = {__Pyx_NAMESTR("set_value_at"), (PyCFunction)__pyx_pw_6pandas_5index_3set_value_at, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; static PyObject *__pyx_pw_6pandas_5index_3set_value_at(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_arr = 0; PyObject *__pyx_v_loc = 0; PyObject *__pyx_v_val = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("set_value_at (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__arr,&__pyx_n_s__loc,&__pyx_n_s__val,0}; PyObject* values[3] = {0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__arr)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__loc)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("set_value_at", 1, 3, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__val)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("set_value_at", 1, 3, 3, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "set_value_at") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __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_arr = ((PyArrayObject *)values[0]); __pyx_v_loc = values[1]; __pyx_v_val = values[2]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("set_value_at", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.index.set_value_at", __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_filename = __pyx_f[0]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5index_2set_value_at(__pyx_self, __pyx_v_arr, __pyx_v_loc, __pyx_v_val); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/index.pyx":62 * return util.get_value_at(arr, loc) * * def set_value_at(ndarray arr, object loc, object val): # <<<<<<<<<<<<<< * return util.set_value_at(arr, loc, val) * */ static PyObject *__pyx_pf_6pandas_5index_2set_value_at(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_arr, PyObject *__pyx_v_loc, PyObject *__pyx_v_val) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("set_value_at", 0); /* "pandas/index.pyx":63 * * def set_value_at(ndarray arr, object loc, object val): * return util.set_value_at(arr, loc, val) # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_4util_set_value_at(__pyx_v_arr, __pyx_v_loc, __pyx_v_val); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas.index.set_value_at", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pandas_5index_11IndexEngine_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_pw_6pandas_5index_11IndexEngine_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_vgetter = 0; PyObject *__pyx_v_n = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__vgetter,&__pyx_n_s__n,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__vgetter)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__n)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __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_vgetter = values[0]; __pyx_v_n = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.index.IndexEngine.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return -1; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pandas_5index_11IndexEngine___init__(((struct __pyx_obj_6pandas_5index_IndexEngine *)__pyx_v_self), __pyx_v_vgetter, __pyx_v_n); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/index.pyx":81 * bint initialized, monotonic_check, unique_check * * def __init__(self, vgetter, n): # <<<<<<<<<<<<<< * self.vgetter = vgetter * */ static int __pyx_pf_6pandas_5index_11IndexEngine___init__(struct __pyx_obj_6pandas_5index_IndexEngine *__pyx_v_self, PyObject *__pyx_v_vgetter, PyObject *__pyx_v_n) { int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_t_3; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__init__", 0); /* "pandas/index.pyx":82 * * def __init__(self, vgetter, n): * self.vgetter = vgetter # <<<<<<<<<<<<<< * * self.over_size_threshold = n >= _SIZE_CUTOFF */ __Pyx_INCREF(__pyx_v_vgetter); __Pyx_GIVEREF(__pyx_v_vgetter); __Pyx_GOTREF(__pyx_v_self->vgetter); __Pyx_DECREF(__pyx_v_self->vgetter); __pyx_v_self->vgetter = __pyx_v_vgetter; /* "pandas/index.pyx":84 * self.vgetter = vgetter * * self.over_size_threshold = n >= _SIZE_CUTOFF # <<<<<<<<<<<<<< * * self.initialized = 0 */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s___SIZE_CUTOFF); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 84; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyObject_RichCompare(__pyx_v_n, __pyx_t_1, Py_GE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 84; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 84; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_self->over_size_threshold = __pyx_t_3; /* "pandas/index.pyx":86 * self.over_size_threshold = n >= _SIZE_CUTOFF * * self.initialized = 0 # <<<<<<<<<<<<<< * self.monotonic_check = 0 * */ __pyx_v_self->initialized = 0; /* "pandas/index.pyx":87 * * self.initialized = 0 * self.monotonic_check = 0 # <<<<<<<<<<<<<< * * self.unique = 0 */ __pyx_v_self->monotonic_check = 0; /* "pandas/index.pyx":89 * self.monotonic_check = 0 * * self.unique = 0 # <<<<<<<<<<<<<< * self.monotonic = 0 * */ __pyx_v_self->unique = 0; /* "pandas/index.pyx":90 * * self.unique = 0 * self.monotonic = 0 # <<<<<<<<<<<<<< * * def __contains__(self, object val): */ __pyx_v_self->monotonic = 0; __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("pandas.index.IndexEngine.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pandas_5index_11IndexEngine_3__contains__(PyObject *__pyx_v_self, PyObject *__pyx_v_val); /*proto*/ static int __pyx_pw_6pandas_5index_11IndexEngine_3__contains__(PyObject *__pyx_v_self, PyObject *__pyx_v_val) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__contains__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_5index_11IndexEngine_2__contains__(((struct __pyx_obj_6pandas_5index_IndexEngine *)__pyx_v_self), ((PyObject *)__pyx_v_val)); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/index.pyx":92 * self.monotonic = 0 * * def __contains__(self, object val): # <<<<<<<<<<<<<< * self._ensure_mapping_populated() * hash(val) */ static int __pyx_pf_6pandas_5index_11IndexEngine_2__contains__(struct __pyx_obj_6pandas_5index_IndexEngine *__pyx_v_self, PyObject *__pyx_v_val) { int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; Py_hash_t __pyx_t_2; int __pyx_t_3; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__contains__", 0); /* "pandas/index.pyx":93 * * def __contains__(self, object val): * self._ensure_mapping_populated() # <<<<<<<<<<<<<< * hash(val) * return val in self.mapping */ __pyx_t_1 = __pyx_f_6pandas_5index_11IndexEngine__ensure_mapping_populated(__pyx_v_self); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 93; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pandas/index.pyx":94 * def __contains__(self, object val): * self._ensure_mapping_populated() * hash(val) # <<<<<<<<<<<<<< * return val in self.mapping * */ __pyx_t_2 = PyObject_Hash(__pyx_v_val); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 94; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/index.pyx":95 * self._ensure_mapping_populated() * hash(val) * return val in self.mapping # <<<<<<<<<<<<<< * * cpdef get_value(self, ndarray arr, object key): */ __pyx_t_3 = (__Pyx_PySequence_Contains(__pyx_v_val, ((PyObject *)__pyx_v_self->mapping), Py_EQ)); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 95; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_t_3; goto __pyx_L0; __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas.index.IndexEngine.__contains__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/index.pyx":97 * return val in self.mapping * * cpdef get_value(self, ndarray arr, object key): # <<<<<<<<<<<<<< * ''' * arr : 1-dimensional ndarray */ static PyObject *__pyx_pw_6pandas_5index_11IndexEngine_5get_value(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_6pandas_5index_11IndexEngine_get_value(struct __pyx_obj_6pandas_5index_IndexEngine *__pyx_v_self, PyArrayObject *__pyx_v_arr, PyObject *__pyx_v_key, int __pyx_skip_dispatch) { PyObject *__pyx_v_loc = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_t_4; int __pyx_t_5; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_value", 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__get_value); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 97; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_6pandas_5index_11IndexEngine_5get_value)) { __Pyx_XDECREF(__pyx_r); __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 97; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(((PyObject *)__pyx_v_arr)); PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_arr)); __Pyx_GIVEREF(((PyObject *)__pyx_v_arr)); __Pyx_INCREF(__pyx_v_key); PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_key); __Pyx_GIVEREF(__pyx_v_key); __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 97; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __pyx_r = __pyx_t_3; __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } /* "pandas/index.pyx":105 * void* data_ptr * * loc = self.get_loc(key) # <<<<<<<<<<<<<< * if PySlice_Check(loc) or cnp.PyArray_Check(loc): * return arr[loc] */ __pyx_t_1 = ((struct __pyx_vtabstruct_6pandas_5index_IndexEngine *)__pyx_v_self->__pyx_vtab)->get_loc(__pyx_v_self, __pyx_v_key, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 105; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_v_loc = __pyx_t_1; __pyx_t_1 = 0; /* "pandas/index.pyx":106 * * loc = self.get_loc(key) * if PySlice_Check(loc) or cnp.PyArray_Check(loc): # <<<<<<<<<<<<<< * return arr[loc] * else: */ if (!(PySlice_Check(__pyx_v_loc) != 0)) { __pyx_t_4 = PyArray_Check(__pyx_v_loc); __pyx_t_5 = __pyx_t_4; } else { __pyx_t_5 = (PySlice_Check(__pyx_v_loc) != 0); } if (__pyx_t_5) { /* "pandas/index.pyx":107 * loc = self.get_loc(key) * if PySlice_Check(loc) or cnp.PyArray_Check(loc): * return arr[loc] # <<<<<<<<<<<<<< * else: * if arr.descr.type_num == NPY_DATETIME: */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyObject_GetItem(((PyObject *)__pyx_v_arr), __pyx_v_loc); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; goto __pyx_L3; } /*else*/ { /* "pandas/index.pyx":109 * return arr[loc] * else: * if arr.descr.type_num == NPY_DATETIME: # <<<<<<<<<<<<<< * return Timestamp(util.get_value_at(arr, loc)) * return util.get_value_at(arr, loc) */ __pyx_t_5 = ((__pyx_v_arr->descr->type_num == NPY_DATETIME) != 0); if (__pyx_t_5) { /* "pandas/index.pyx":110 * else: * if arr.descr.type_num == NPY_DATETIME: * return Timestamp(util.get_value_at(arr, loc)) # <<<<<<<<<<<<<< * return util.get_value_at(arr, loc) * */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__Timestamp); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 110; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __pyx_f_4util_get_value_at(__pyx_v_arr, __pyx_v_loc); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 110; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 110; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 110; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; goto __pyx_L4; } __pyx_L4:; /* "pandas/index.pyx":111 * if arr.descr.type_num == NPY_DATETIME: * return Timestamp(util.get_value_at(arr, loc)) * return util.get_value_at(arr, loc) # <<<<<<<<<<<<<< * * cpdef set_value(self, ndarray arr, object key, object value): */ __Pyx_XDECREF(__pyx_r); __pyx_t_3 = __pyx_f_4util_get_value_at(__pyx_v_arr, __pyx_v_loc); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 111; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; } __pyx_L3:; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("pandas.index.IndexEngine.get_value", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_loc); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5index_11IndexEngine_5get_value(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6pandas_5index_11IndexEngine_4get_value[] = "\n arr : 1-dimensional ndarray\n "; static PyObject *__pyx_pw_6pandas_5index_11IndexEngine_5get_value(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_arr = 0; PyObject *__pyx_v_key = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("get_value (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__arr,&__pyx_n_s__key,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__arr)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__key)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("get_value", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 97; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "get_value") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 97; __pyx_clineno = __LINE__; goto __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_key = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("get_value", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 97; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.index.IndexEngine.get_value", __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_filename = __pyx_f[0]; __pyx_lineno = 97; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5index_11IndexEngine_4get_value(((struct __pyx_obj_6pandas_5index_IndexEngine *)__pyx_v_self), __pyx_v_arr, __pyx_v_key); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/index.pyx":97 * return val in self.mapping * * cpdef get_value(self, ndarray arr, object key): # <<<<<<<<<<<<<< * ''' * arr : 1-dimensional ndarray */ static PyObject *__pyx_pf_6pandas_5index_11IndexEngine_4get_value(struct __pyx_obj_6pandas_5index_IndexEngine *__pyx_v_self, PyArrayObject *__pyx_v_arr, PyObject *__pyx_v_key) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_value", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = ((struct __pyx_vtabstruct_6pandas_5index_IndexEngine *)__pyx_v_self->__pyx_vtab)->get_value(__pyx_v_self, __pyx_v_arr, __pyx_v_key, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 97; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas.index.IndexEngine.get_value", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/index.pyx":113 * return util.get_value_at(arr, loc) * * cpdef set_value(self, ndarray arr, object key, object value): # <<<<<<<<<<<<<< * ''' * arr : 1-dimensional ndarray */ static PyObject *__pyx_pw_6pandas_5index_11IndexEngine_7set_value(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_6pandas_5index_11IndexEngine_set_value(struct __pyx_obj_6pandas_5index_IndexEngine *__pyx_v_self, PyArrayObject *__pyx_v_arr, PyObject *__pyx_v_key, PyObject *__pyx_v_value, int __pyx_skip_dispatch) { PyObject *__pyx_v_loc = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_t_4; int __pyx_t_5; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("set_value", 0); __Pyx_INCREF(__pyx_v_value); /* 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__set_value); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 113; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_6pandas_5index_11IndexEngine_7set_value)) { __Pyx_XDECREF(__pyx_r); __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 113; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(((PyObject *)__pyx_v_arr)); PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_arr)); __Pyx_GIVEREF(((PyObject *)__pyx_v_arr)); __Pyx_INCREF(__pyx_v_key); PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_key); __Pyx_GIVEREF(__pyx_v_key); __Pyx_INCREF(__pyx_v_value); PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_value); __Pyx_GIVEREF(__pyx_v_value); __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 113; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __pyx_r = __pyx_t_3; __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } /* "pandas/index.pyx":121 * void* data_ptr * * loc = self.get_loc(key) # <<<<<<<<<<<<<< * value = convert_scalar(arr, value) * */ __pyx_t_1 = ((struct __pyx_vtabstruct_6pandas_5index_IndexEngine *)__pyx_v_self->__pyx_vtab)->get_loc(__pyx_v_self, __pyx_v_key, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 121; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_v_loc = __pyx_t_1; __pyx_t_1 = 0; /* "pandas/index.pyx":122 * * loc = self.get_loc(key) * value = convert_scalar(arr, value) # <<<<<<<<<<<<<< * * if PySlice_Check(loc) or cnp.PyArray_Check(loc): */ __pyx_t_1 = __pyx_f_6pandas_5index_convert_scalar(__pyx_v_arr, __pyx_v_value, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 122; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF_SET(__pyx_v_value, __pyx_t_1); __pyx_t_1 = 0; /* "pandas/index.pyx":124 * value = convert_scalar(arr, value) * * if PySlice_Check(loc) or cnp.PyArray_Check(loc): # <<<<<<<<<<<<<< * arr[loc] = value * else: */ if (!(PySlice_Check(__pyx_v_loc) != 0)) { __pyx_t_4 = PyArray_Check(__pyx_v_loc); __pyx_t_5 = __pyx_t_4; } else { __pyx_t_5 = (PySlice_Check(__pyx_v_loc) != 0); } if (__pyx_t_5) { /* "pandas/index.pyx":125 * * if PySlice_Check(loc) or cnp.PyArray_Check(loc): * arr[loc] = value # <<<<<<<<<<<<<< * else: * util.set_value_at(arr, loc, value) */ if (PyObject_SetItem(((PyObject *)__pyx_v_arr), __pyx_v_loc, __pyx_v_value) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 125; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L3; } /*else*/ { /* "pandas/index.pyx":127 * arr[loc] = value * else: * util.set_value_at(arr, loc, value) # <<<<<<<<<<<<<< * * cpdef get_loc(self, object val): */ __pyx_t_1 = __pyx_f_4util_set_value_at(__pyx_v_arr, __pyx_v_loc, __pyx_v_value); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 127; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } __pyx_L3:; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("pandas.index.IndexEngine.set_value", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_loc); __Pyx_XDECREF(__pyx_v_value); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5index_11IndexEngine_7set_value(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6pandas_5index_11IndexEngine_6set_value[] = "\n arr : 1-dimensional ndarray\n "; static PyObject *__pyx_pw_6pandas_5index_11IndexEngine_7set_value(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_arr = 0; PyObject *__pyx_v_key = 0; PyObject *__pyx_v_value = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("set_value (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__arr,&__pyx_n_s__key,&__pyx_n_s__value,0}; PyObject* values[3] = {0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__arr)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__key)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("set_value", 1, 3, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 113; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__value)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("set_value", 1, 3, 3, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 113; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "set_value") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 113; __pyx_clineno = __LINE__; goto __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_arr = ((PyArrayObject *)values[0]); __pyx_v_key = values[1]; __pyx_v_value = values[2]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("set_value", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 113; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.index.IndexEngine.set_value", __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_filename = __pyx_f[0]; __pyx_lineno = 113; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5index_11IndexEngine_6set_value(((struct __pyx_obj_6pandas_5index_IndexEngine *)__pyx_v_self), __pyx_v_arr, __pyx_v_key, __pyx_v_value); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/index.pyx":113 * return util.get_value_at(arr, loc) * * cpdef set_value(self, ndarray arr, object key, object value): # <<<<<<<<<<<<<< * ''' * arr : 1-dimensional ndarray */ static PyObject *__pyx_pf_6pandas_5index_11IndexEngine_6set_value(struct __pyx_obj_6pandas_5index_IndexEngine *__pyx_v_self, PyArrayObject *__pyx_v_arr, PyObject *__pyx_v_key, PyObject *__pyx_v_value) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("set_value", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = ((struct __pyx_vtabstruct_6pandas_5index_IndexEngine *)__pyx_v_self->__pyx_vtab)->set_value(__pyx_v_self, __pyx_v_arr, __pyx_v_key, __pyx_v_value, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 113; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas.index.IndexEngine.set_value", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/index.pyx":129 * util.set_value_at(arr, loc, value) * * cpdef get_loc(self, object val): # <<<<<<<<<<<<<< * if is_definitely_invalid_key(val): * raise TypeError */ static PyObject *__pyx_pw_6pandas_5index_11IndexEngine_9get_loc(PyObject *__pyx_v_self, PyObject *__pyx_v_val); /*proto*/ static PyObject *__pyx_f_6pandas_5index_11IndexEngine_get_loc(struct __pyx_obj_6pandas_5index_IndexEngine *__pyx_v_self, PyObject *__pyx_v_val, int __pyx_skip_dispatch) { PyObject *__pyx_v_values = NULL; Py_ssize_t __pyx_v_loc; 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; Py_ssize_t __pyx_t_7; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; int __pyx_t_11; PyObject *__pyx_t_12 = NULL; PyObject *__pyx_t_13 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_loc", 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__get_loc); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 129; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_6pandas_5index_11IndexEngine_9get_loc)) { __Pyx_XDECREF(__pyx_r); __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 129; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_val); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_val); __Pyx_GIVEREF(__pyx_v_val); __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 129; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __pyx_r = __pyx_t_3; __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } /* "pandas/index.pyx":130 * * cpdef get_loc(self, object val): * if is_definitely_invalid_key(val): # <<<<<<<<<<<<<< * raise TypeError * */ __pyx_t_1 = __pyx_f_6pandas_5index_is_definitely_invalid_key(__pyx_v_val); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 130; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 130; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_4) { /* "pandas/index.pyx":131 * cpdef get_loc(self, object val): * if is_definitely_invalid_key(val): * raise TypeError # <<<<<<<<<<<<<< * * if self.over_size_threshold and self.is_monotonic: */ __Pyx_Raise(__pyx_builtin_TypeError, 0, 0, 0); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 131; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L3; } __pyx_L3:; /* "pandas/index.pyx":133 * raise TypeError * * if self.over_size_threshold and self.is_monotonic: # <<<<<<<<<<<<<< * if not self.is_unique: * return self._get_loc_duplicates(val) */ __pyx_t_4 = __pyx_v_self->over_size_threshold; if (__pyx_t_4) { __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s__is_monotonic); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 133; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 133; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_6 = __pyx_t_5; } else { __pyx_t_6 = __pyx_t_4; } if (__pyx_t_6) { /* "pandas/index.pyx":134 * * if self.over_size_threshold and self.is_monotonic: * if not self.is_unique: # <<<<<<<<<<<<<< * return self._get_loc_duplicates(val) * values = self._get_index_values() */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s__is_unique); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 134; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 134; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_4 = ((!__pyx_t_6) != 0); if (__pyx_t_4) { /* "pandas/index.pyx":135 * if self.over_size_threshold and self.is_monotonic: * if not self.is_unique: * return self._get_loc_duplicates(val) # <<<<<<<<<<<<<< * values = self._get_index_values() * loc = _bin_search(values, val) # .searchsorted(val, side='left') */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_6pandas_5index_11IndexEngine__get_loc_duplicates(__pyx_v_self, __pyx_v_val); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 135; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; goto __pyx_L5; } __pyx_L5:; /* "pandas/index.pyx":136 * if not self.is_unique: * return self._get_loc_duplicates(val) * values = self._get_index_values() # <<<<<<<<<<<<<< * loc = _bin_search(values, val) # .searchsorted(val, side='left') * if util.get_value_at(values, loc) != val: */ __pyx_t_1 = ((struct __pyx_vtabstruct_6pandas_5index_IndexEngine *)__pyx_v_self->__pyx_vtab)->_get_index_values(__pyx_v_self); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 136; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_v_values = __pyx_t_1; __pyx_t_1 = 0; /* "pandas/index.pyx":137 * return self._get_loc_duplicates(val) * values = self._get_index_values() * loc = _bin_search(values, val) # .searchsorted(val, side='left') # <<<<<<<<<<<<<< * if util.get_value_at(values, loc) != val: * raise KeyError(val) */ if (!(likely(((__pyx_v_values) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_values, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 137; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_7 = __pyx_f_6pandas_5index__bin_search(((PyArrayObject *)__pyx_v_values), __pyx_v_val); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 137; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_loc = __pyx_t_7; /* "pandas/index.pyx":138 * values = self._get_index_values() * loc = _bin_search(values, val) # .searchsorted(val, side='left') * if util.get_value_at(values, loc) != val: # <<<<<<<<<<<<<< * raise KeyError(val) * return loc */ if (!(likely(((__pyx_v_values) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_values, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 138; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_loc); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 138; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __pyx_f_4util_get_value_at(((PyArrayObject *)__pyx_v_values), __pyx_t_1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 138; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyObject_RichCompare(__pyx_t_3, __pyx_v_val, Py_NE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 138; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 138; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_4) { /* "pandas/index.pyx":139 * loc = _bin_search(values, val) # .searchsorted(val, side='left') * if util.get_value_at(values, loc) != val: * raise KeyError(val) # <<<<<<<<<<<<<< * return loc * */ __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 139; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_val); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_val); __Pyx_GIVEREF(__pyx_v_val); __pyx_t_3 = PyObject_Call(__pyx_builtin_KeyError, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 139; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 139; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L6; } __pyx_L6:; /* "pandas/index.pyx":140 * if util.get_value_at(values, loc) != val: * raise KeyError(val) * return loc # <<<<<<<<<<<<<< * * self._ensure_mapping_populated() */ __Pyx_XDECREF(__pyx_r); __pyx_t_3 = PyInt_FromSsize_t(__pyx_v_loc); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 140; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; goto __pyx_L4; } __pyx_L4:; /* "pandas/index.pyx":142 * return loc * * self._ensure_mapping_populated() # <<<<<<<<<<<<<< * if not self.unique: * return self._get_loc_duplicates(val) */ __pyx_t_3 = __pyx_f_6pandas_5index_11IndexEngine__ensure_mapping_populated(__pyx_v_self); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 142; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/index.pyx":143 * * self._ensure_mapping_populated() * if not self.unique: # <<<<<<<<<<<<<< * return self._get_loc_duplicates(val) * */ __pyx_t_4 = ((!(__pyx_v_self->unique != 0)) != 0); if (__pyx_t_4) { /* "pandas/index.pyx":144 * self._ensure_mapping_populated() * if not self.unique: * return self._get_loc_duplicates(val) # <<<<<<<<<<<<<< * * self._check_type(val) */ __Pyx_XDECREF(__pyx_r); __pyx_t_3 = __pyx_f_6pandas_5index_11IndexEngine__get_loc_duplicates(__pyx_v_self, __pyx_v_val); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 144; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; goto __pyx_L7; } __pyx_L7:; /* "pandas/index.pyx":146 * return self._get_loc_duplicates(val) * * self._check_type(val) # <<<<<<<<<<<<<< * * try: */ __pyx_t_3 = ((struct __pyx_vtabstruct_6pandas_5index_IndexEngine *)__pyx_v_self->__pyx_vtab)->_check_type(__pyx_v_self, __pyx_v_val); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 146; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/index.pyx":148 * self._check_type(val) * * try: # <<<<<<<<<<<<<< * return self.mapping.get_item(val) * except TypeError: */ { __Pyx_ExceptionSave(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10); __Pyx_XGOTREF(__pyx_t_8); __Pyx_XGOTREF(__pyx_t_9); __Pyx_XGOTREF(__pyx_t_10); /*try:*/ { /* "pandas/index.pyx":149 * * try: * return self.mapping.get_item(val) # <<<<<<<<<<<<<< * except TypeError: * raise KeyError(val) */ __Pyx_XDECREF(__pyx_r); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->mapping), __pyx_n_s__get_item); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 149; __pyx_clineno = __LINE__; goto __pyx_L8_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 149; __pyx_clineno = __LINE__; goto __pyx_L8_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_val); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_val); __Pyx_GIVEREF(__pyx_v_val); __pyx_t_2 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 149; __pyx_clineno = __LINE__; goto __pyx_L8_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L12_try_return; } __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; goto __pyx_L15_try_end; __pyx_L12_try_return:; __Pyx_XGIVEREF(__pyx_t_8); __Pyx_XGIVEREF(__pyx_t_9); __Pyx_XGIVEREF(__pyx_t_10); __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_9, __pyx_t_10); goto __pyx_L0; __pyx_L8_error:; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/index.pyx":150 * try: * return self.mapping.get_item(val) * except TypeError: # <<<<<<<<<<<<<< * raise KeyError(val) * */ __pyx_t_11 = PyErr_ExceptionMatches(__pyx_builtin_TypeError); if (__pyx_t_11) { __Pyx_AddTraceback("pandas.index.IndexEngine.get_loc", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_1, &__pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 150; __pyx_clineno = __LINE__; goto __pyx_L10_except_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_GOTREF(__pyx_t_1); __Pyx_GOTREF(__pyx_t_3); /* "pandas/index.pyx":151 * return self.mapping.get_item(val) * except TypeError: * raise KeyError(val) # <<<<<<<<<<<<<< * * cdef inline _get_loc_duplicates(self, object val): */ __pyx_t_12 = PyTuple_New(1); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 151; __pyx_clineno = __LINE__; goto __pyx_L10_except_error;} __Pyx_GOTREF(__pyx_t_12); __Pyx_INCREF(__pyx_v_val); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_v_val); __Pyx_GIVEREF(__pyx_v_val); __pyx_t_13 = PyObject_Call(__pyx_builtin_KeyError, ((PyObject *)__pyx_t_12), NULL); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 151; __pyx_clineno = __LINE__; goto __pyx_L10_except_error;} __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(((PyObject *)__pyx_t_12)); __pyx_t_12 = 0; __Pyx_Raise(__pyx_t_13, 0, 0, 0); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 151; __pyx_clineno = __LINE__; goto __pyx_L10_except_error;} __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; goto __pyx_L9_exception_handled; } __pyx_L10_except_error:; __Pyx_XGIVEREF(__pyx_t_8); __Pyx_XGIVEREF(__pyx_t_9); __Pyx_XGIVEREF(__pyx_t_10); __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_9, __pyx_t_10); goto __pyx_L1_error; __pyx_L9_exception_handled:; __Pyx_XGIVEREF(__pyx_t_8); __Pyx_XGIVEREF(__pyx_t_9); __Pyx_XGIVEREF(__pyx_t_10); __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_9, __pyx_t_10); __pyx_L15_try_end:; } __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_12); __Pyx_XDECREF(__pyx_t_13); __Pyx_AddTraceback("pandas.index.IndexEngine.get_loc", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_values); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5index_11IndexEngine_9get_loc(PyObject *__pyx_v_self, PyObject *__pyx_v_val); /*proto*/ static PyObject *__pyx_pw_6pandas_5index_11IndexEngine_9get_loc(PyObject *__pyx_v_self, PyObject *__pyx_v_val) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("get_loc (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_5index_11IndexEngine_8get_loc(((struct __pyx_obj_6pandas_5index_IndexEngine *)__pyx_v_self), ((PyObject *)__pyx_v_val)); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/index.pyx":129 * util.set_value_at(arr, loc, value) * * cpdef get_loc(self, object val): # <<<<<<<<<<<<<< * if is_definitely_invalid_key(val): * raise TypeError */ static PyObject *__pyx_pf_6pandas_5index_11IndexEngine_8get_loc(struct __pyx_obj_6pandas_5index_IndexEngine *__pyx_v_self, PyObject *__pyx_v_val) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_loc", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = ((struct __pyx_vtabstruct_6pandas_5index_IndexEngine *)__pyx_v_self->__pyx_vtab)->get_loc(__pyx_v_self, __pyx_v_val, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 129; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas.index.IndexEngine.get_loc", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/index.pyx":153 * raise KeyError(val) * * cdef inline _get_loc_duplicates(self, object val): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t diff */ static CYTHON_INLINE PyObject *__pyx_f_6pandas_5index_11IndexEngine__get_loc_duplicates(struct __pyx_obj_6pandas_5index_IndexEngine *__pyx_v_self, PyObject *__pyx_v_val) { Py_ssize_t __pyx_v_diff; PyObject *__pyx_v_values = NULL; PyObject *__pyx_v_left = NULL; PyObject *__pyx_v_right = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; Py_ssize_t __pyx_t_6; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_get_loc_duplicates", 0); /* "pandas/index.pyx":157 * Py_ssize_t diff * * if self.is_monotonic: # <<<<<<<<<<<<<< * values = self._get_index_values() * left = values.searchsorted(val, side='left') */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s__is_monotonic); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_2) { /* "pandas/index.pyx":158 * * if self.is_monotonic: * values = self._get_index_values() # <<<<<<<<<<<<<< * left = values.searchsorted(val, side='left') * right = values.searchsorted(val, side='right') */ __pyx_t_1 = ((struct __pyx_vtabstruct_6pandas_5index_IndexEngine *)__pyx_v_self->__pyx_vtab)->_get_index_values(__pyx_v_self); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 158; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_v_values = __pyx_t_1; __pyx_t_1 = 0; /* "pandas/index.pyx":159 * if self.is_monotonic: * values = self._get_index_values() * left = values.searchsorted(val, side='left') # <<<<<<<<<<<<<< * right = values.searchsorted(val, side='right') * */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_values, __pyx_n_s__searchsorted); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 159; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 159; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_v_val); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_val); __Pyx_GIVEREF(__pyx_v_val); __pyx_t_4 = PyDict_New(); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 159; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_4)); if (PyDict_SetItem(__pyx_t_4, ((PyObject *)__pyx_n_s__side), ((PyObject *)__pyx_n_s__left)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 159; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_5 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_3), ((PyObject *)__pyx_t_4)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 159; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __pyx_v_left = __pyx_t_5; __pyx_t_5 = 0; /* "pandas/index.pyx":160 * values = self._get_index_values() * left = values.searchsorted(val, side='left') * right = values.searchsorted(val, side='right') # <<<<<<<<<<<<<< * * diff = right - left */ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_values, __pyx_n_s__searchsorted); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 160; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 160; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_v_val); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_val); __Pyx_GIVEREF(__pyx_v_val); __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 160; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_3)); if (PyDict_SetItem(__pyx_t_3, ((PyObject *)__pyx_n_s__side), ((PyObject *)__pyx_n_s__right)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 160; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_1 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_3)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 160; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; __pyx_v_right = __pyx_t_1; __pyx_t_1 = 0; /* "pandas/index.pyx":162 * right = values.searchsorted(val, side='right') * * diff = right - left # <<<<<<<<<<<<<< * if diff == 0: * raise KeyError(val) */ __pyx_t_1 = PyNumber_Subtract(__pyx_v_right, __pyx_v_left); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 162; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_6 = __Pyx_PyIndex_AsSsize_t(__pyx_t_1); if (unlikely((__pyx_t_6 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 162; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_diff = __pyx_t_6; /* "pandas/index.pyx":165 * if diff == 0: * raise KeyError(val) * elif diff == 1: # <<<<<<<<<<<<<< * return left * else: */ switch (__pyx_v_diff) { /* "pandas/index.pyx":163 * * diff = right - left * if diff == 0: # <<<<<<<<<<<<<< * raise KeyError(val) * elif diff == 1: */ case 0: /* "pandas/index.pyx":164 * diff = right - left * if diff == 0: * raise KeyError(val) # <<<<<<<<<<<<<< * elif diff == 1: * return left */ __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 164; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_val); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_val); __Pyx_GIVEREF(__pyx_v_val); __pyx_t_3 = PyObject_Call(__pyx_builtin_KeyError, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 164; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 164; __pyx_clineno = __LINE__; goto __pyx_L1_error;} break; /* "pandas/index.pyx":165 * if diff == 0: * raise KeyError(val) * elif diff == 1: # <<<<<<<<<<<<<< * return left * else: */ case 1: /* "pandas/index.pyx":166 * raise KeyError(val) * elif diff == 1: * return left # <<<<<<<<<<<<<< * else: * return slice(left, right) */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_left); __pyx_r = __pyx_v_left; goto __pyx_L0; break; default: /* "pandas/index.pyx":168 * return left * else: * return slice(left, right) # <<<<<<<<<<<<<< * else: * return self._maybe_get_bool_indexer(val) */ __Pyx_XDECREF(__pyx_r); __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_v_left); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_left); __Pyx_GIVEREF(__pyx_v_left); __Pyx_INCREF(__pyx_v_right); PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_right); __Pyx_GIVEREF(__pyx_v_right); __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)(&PySlice_Type))), ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; break; } goto __pyx_L3; } /*else*/ { /* "pandas/index.pyx":170 * return slice(left, right) * else: * return self._maybe_get_bool_indexer(val) # <<<<<<<<<<<<<< * * cdef _maybe_get_bool_indexer(self, object val): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = ((struct __pyx_vtabstruct_6pandas_5index_IndexEngine *)__pyx_v_self->__pyx_vtab)->_maybe_get_bool_indexer(__pyx_v_self, __pyx_v_val); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 170; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; } __pyx_L3:; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("pandas.index.IndexEngine._get_loc_duplicates", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_values); __Pyx_XDECREF(__pyx_v_left); __Pyx_XDECREF(__pyx_v_right); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/index.pyx":172 * return self._maybe_get_bool_indexer(val) * * cdef _maybe_get_bool_indexer(self, object val): # <<<<<<<<<<<<<< * cdef: * ndarray[uint8_t] indexer */ static PyObject *__pyx_f_6pandas_5index_11IndexEngine__maybe_get_bool_indexer(struct __pyx_obj_6pandas_5index_IndexEngine *__pyx_v_self, PyObject *__pyx_v_val) { PyArrayObject *__pyx_v_indexer = 0; PyArrayObject *__pyx_v_values = 0; int __pyx_v_count; Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_n; int __pyx_v_last_true; PyObject *__pyx_v_result = NULL; __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 PyObject *__pyx_t_1 = NULL; PyArrayObject *__pyx_t_2 = NULL; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; Py_ssize_t __pyx_t_7; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; PyArrayObject *__pyx_t_11 = NULL; Py_ssize_t __pyx_t_12; Py_ssize_t __pyx_t_13; int __pyx_t_14; Py_ssize_t __pyx_t_15; Py_ssize_t __pyx_t_16; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_maybe_get_bool_indexer", 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; /* "pandas/index.pyx":176 * ndarray[uint8_t] indexer * ndarray[object] values * int count = 0 # <<<<<<<<<<<<<< * Py_ssize_t i, n * int last_true */ __pyx_v_count = 0; /* "pandas/index.pyx":180 * int last_true * * values = self._get_index_values() # <<<<<<<<<<<<<< * n = len(values) * */ __pyx_t_1 = ((struct __pyx_vtabstruct_6pandas_5index_IndexEngine *)__pyx_v_self->__pyx_vtab)->_get_index_values(__pyx_v_self); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_2 = ((PyArrayObject *)__pyx_t_1); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_t_3 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_values.rcbuffer->pybuffer, (PyObject*)__pyx_t_2, &__Pyx_TypeInfo_object, 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_values.rcbuffer->pybuffer, (PyObject*)__pyx_v_values, &__Pyx_TypeInfo_object, 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_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]; if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_2 = 0; __pyx_v_values = ((PyArrayObject *)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/index.pyx":181 * * values = self._get_index_values() * n = len(values) # <<<<<<<<<<<<<< * * result = np.empty(n, dtype=bool) */ __pyx_t_7 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 181; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_7; /* "pandas/index.pyx":183 * n = len(values) * * result = np.empty(n, dtype=bool) # <<<<<<<<<<<<<< * indexer = result.view(np.uint8) * */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 183; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s__empty); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 183; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_n); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 183; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 183; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 183; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_1)); if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__dtype), ((PyObject*)&PyBool_Type)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 183; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_10 = PyObject_Call(__pyx_t_8, ((PyObject *)__pyx_t_9), ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 183; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_9)); __pyx_t_9 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_v_result = __pyx_t_10; __pyx_t_10 = 0; /* "pandas/index.pyx":184 * * result = np.empty(n, dtype=bool) * indexer = result.view(np.uint8) # <<<<<<<<<<<<<< * * for i in range(n): */ __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_result, __pyx_n_s__view); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 184; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 184; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s__uint8); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 184; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 184; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_9); __Pyx_GIVEREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_9 = PyObject_Call(__pyx_t_10, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 184; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; if (!(likely(((__pyx_t_9) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_9, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 184; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_11 = ((PyArrayObject *)__pyx_t_9); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer); __pyx_t_3 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer, (PyObject*)__pyx_t_11, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 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_indexer.rcbuffer->pybuffer, (PyObject*)__pyx_v_indexer, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 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_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_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 184; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_11 = 0; __pyx_v_indexer = ((PyArrayObject *)__pyx_t_9); __pyx_t_9 = 0; /* "pandas/index.pyx":186 * indexer = result.view(np.uint8) * * for i in range(n): # <<<<<<<<<<<<<< * if values[i] == val: * count += 1 */ __pyx_t_7 = __pyx_v_n; for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_7; __pyx_t_12+=1) { __pyx_v_i = __pyx_t_12; /* "pandas/index.pyx":187 * * for i in range(n): * if values[i] == val: # <<<<<<<<<<<<<< * count += 1 * indexer[i] = 1 */ __pyx_t_13 = __pyx_v_i; __pyx_t_3 = -1; if (__pyx_t_13 < 0) { __pyx_t_13 += __pyx_pybuffernd_values.diminfo[0].shape; if (unlikely(__pyx_t_13 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_13 >= __pyx_pybuffernd_values.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 187; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_9 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_values.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_9); __pyx_t_1 = PyObject_RichCompare(__pyx_t_9, __pyx_v_val, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 187; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_14 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_14 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 187; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_14) { /* "pandas/index.pyx":188 * for i in range(n): * if values[i] == val: * count += 1 # <<<<<<<<<<<<<< * indexer[i] = 1 * last_true = i */ __pyx_v_count = (__pyx_v_count + 1); /* "pandas/index.pyx":189 * if values[i] == val: * count += 1 * indexer[i] = 1 # <<<<<<<<<<<<<< * last_true = i * else: */ __pyx_t_15 = __pyx_v_i; __pyx_t_3 = -1; if (__pyx_t_15 < 0) { __pyx_t_15 += __pyx_pybuffernd_indexer.diminfo[0].shape; if (unlikely(__pyx_t_15 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_15 >= __pyx_pybuffernd_indexer.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 189; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_indexer.diminfo[0].strides) = 1; /* "pandas/index.pyx":190 * count += 1 * indexer[i] = 1 * last_true = i # <<<<<<<<<<<<<< * else: * indexer[i] = 0 */ __pyx_v_last_true = __pyx_v_i; goto __pyx_L5; } /*else*/ { /* "pandas/index.pyx":192 * last_true = i * else: * indexer[i] = 0 # <<<<<<<<<<<<<< * * if count == 0: */ __pyx_t_16 = __pyx_v_i; __pyx_t_3 = -1; if (__pyx_t_16 < 0) { __pyx_t_16 += __pyx_pybuffernd_indexer.diminfo[0].shape; if (unlikely(__pyx_t_16 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_16 >= __pyx_pybuffernd_indexer.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 192; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_indexer.diminfo[0].strides) = 0; } __pyx_L5:; } /* "pandas/index.pyx":194 * indexer[i] = 0 * * if count == 0: # <<<<<<<<<<<<<< * raise KeyError(val) * if count == 1: */ __pyx_t_14 = ((__pyx_v_count == 0) != 0); if (__pyx_t_14) { /* "pandas/index.pyx":195 * * if count == 0: * raise KeyError(val) # <<<<<<<<<<<<<< * if count == 1: * return last_true */ __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 195; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_val); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_val); __Pyx_GIVEREF(__pyx_v_val); __pyx_t_9 = PyObject_Call(__pyx_builtin_KeyError, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 195; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __Pyx_Raise(__pyx_t_9, 0, 0, 0); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 195; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L6; } __pyx_L6:; /* "pandas/index.pyx":196 * if count == 0: * raise KeyError(val) * if count == 1: # <<<<<<<<<<<<<< * return last_true * */ __pyx_t_14 = ((__pyx_v_count == 1) != 0); if (__pyx_t_14) { /* "pandas/index.pyx":197 * raise KeyError(val) * if count == 1: * return last_true # <<<<<<<<<<<<<< * * return result */ __Pyx_XDECREF(__pyx_r); __pyx_t_9 = PyInt_FromLong(__pyx_v_last_true); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 197; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_r = __pyx_t_9; __pyx_t_9 = 0; goto __pyx_L0; goto __pyx_L7; } __pyx_L7:; /* "pandas/index.pyx":199 * return last_true * * return result # <<<<<<<<<<<<<< * * property is_unique: */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_result); __pyx_r = __pyx_v_result; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); __Pyx_XDECREF(__pyx_t_10); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __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.index.IndexEngine._maybe_get_bool_indexer", __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_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_indexer); __Pyx_XDECREF((PyObject *)__pyx_v_values); __Pyx_XDECREF(__pyx_v_result); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5index_11IndexEngine_9is_unique_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6pandas_5index_11IndexEngine_9is_unique_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_5index_11IndexEngine_9is_unique___get__(((struct __pyx_obj_6pandas_5index_IndexEngine *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/index.pyx":203 * property is_unique: * * def __get__(self): # <<<<<<<<<<<<<< * if not self.unique_check: * self._do_unique_check() */ static PyObject *__pyx_pf_6pandas_5index_11IndexEngine_9is_unique___get__(struct __pyx_obj_6pandas_5index_IndexEngine *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); /* "pandas/index.pyx":204 * * def __get__(self): * if not self.unique_check: # <<<<<<<<<<<<<< * self._do_unique_check() * */ __pyx_t_1 = ((!(__pyx_v_self->unique_check != 0)) != 0); if (__pyx_t_1) { /* "pandas/index.pyx":205 * def __get__(self): * if not self.unique_check: * self._do_unique_check() # <<<<<<<<<<<<<< * * return self.unique == 1 */ __pyx_t_2 = __pyx_f_6pandas_5index_11IndexEngine__do_unique_check(__pyx_v_self); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 205; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; goto __pyx_L3; } __pyx_L3:; /* "pandas/index.pyx":207 * self._do_unique_check() * * return self.unique == 1 # <<<<<<<<<<<<<< * * property is_monotonic: */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyBool_FromLong((__pyx_v_self->unique == 1)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 207; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("pandas.index.IndexEngine.is_unique.__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_5index_11IndexEngine_12is_monotonic_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6pandas_5index_11IndexEngine_12is_monotonic_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_5index_11IndexEngine_12is_monotonic___get__(((struct __pyx_obj_6pandas_5index_IndexEngine *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/index.pyx":211 * property is_monotonic: * * def __get__(self): # <<<<<<<<<<<<<< * if not self.monotonic_check: * self._do_monotonic_check() */ static PyObject *__pyx_pf_6pandas_5index_11IndexEngine_12is_monotonic___get__(struct __pyx_obj_6pandas_5index_IndexEngine *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); /* "pandas/index.pyx":212 * * def __get__(self): * if not self.monotonic_check: # <<<<<<<<<<<<<< * self._do_monotonic_check() * */ __pyx_t_1 = ((!(__pyx_v_self->monotonic_check != 0)) != 0); if (__pyx_t_1) { /* "pandas/index.pyx":213 * def __get__(self): * if not self.monotonic_check: * self._do_monotonic_check() # <<<<<<<<<<<<<< * * return self.monotonic == 1 */ __pyx_t_2 = __pyx_f_6pandas_5index_11IndexEngine__do_monotonic_check(__pyx_v_self); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 213; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; goto __pyx_L3; } __pyx_L3:; /* "pandas/index.pyx":215 * self._do_monotonic_check() * * return self.monotonic == 1 # <<<<<<<<<<<<<< * * cdef inline _do_monotonic_check(self): */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyBool_FromLong((__pyx_v_self->monotonic == 1)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 215; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("pandas.index.IndexEngine.is_monotonic.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/index.pyx":217 * return self.monotonic == 1 * * cdef inline _do_monotonic_check(self): # <<<<<<<<<<<<<< * try: * values = self._get_index_values() */ static CYTHON_INLINE PyObject *__pyx_f_6pandas_5index_11IndexEngine__do_monotonic_check(struct __pyx_obj_6pandas_5index_IndexEngine *__pyx_v_self) { PyObject *__pyx_v_values = NULL; PyObject *__pyx_v_unique = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *(*__pyx_t_8)(PyObject *); int __pyx_t_9; int __pyx_t_10; int __pyx_t_11; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_do_monotonic_check", 0); /* "pandas/index.pyx":218 * * cdef inline _do_monotonic_check(self): * try: # <<<<<<<<<<<<<< * values = self._get_index_values() * self.monotonic, unique = self._call_monotonic(values) */ { __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:*/ { /* "pandas/index.pyx":219 * cdef inline _do_monotonic_check(self): * try: * values = self._get_index_values() # <<<<<<<<<<<<<< * self.monotonic, unique = self._call_monotonic(values) * */ __pyx_t_4 = ((struct __pyx_vtabstruct_6pandas_5index_IndexEngine *)__pyx_v_self->__pyx_vtab)->_get_index_values(__pyx_v_self); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 219; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_v_values = __pyx_t_4; __pyx_t_4 = 0; /* "pandas/index.pyx":220 * try: * values = self._get_index_values() * self.monotonic, unique = self._call_monotonic(values) # <<<<<<<<<<<<<< * * if unique is not None: */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s___call_monotonic); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 220; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 220; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_v_values); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_values); __Pyx_GIVEREF(__pyx_v_values); __pyx_t_6 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 220; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; if ((likely(PyTuple_CheckExact(__pyx_t_6))) || (PyList_CheckExact(__pyx_t_6))) { PyObject* sequence = __pyx_t_6; #if CYTHON_COMPILING_IN_CPYTHON Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 220; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_5 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_4 = PyTuple_GET_ITEM(sequence, 1); } else { __pyx_t_5 = PyList_GET_ITEM(sequence, 0); __pyx_t_4 = PyList_GET_ITEM(sequence, 1); } __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(__pyx_t_4); #else __pyx_t_5 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 220; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 220; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_4); #endif __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } else { Py_ssize_t index = -1; __pyx_t_7 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 220; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_8 = Py_TYPE(__pyx_t_7)->tp_iternext; index = 0; __pyx_t_5 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_5)) goto __pyx_L11_unpacking_failed; __Pyx_GOTREF(__pyx_t_5); index = 1; __pyx_t_4 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_4)) goto __pyx_L11_unpacking_failed; __Pyx_GOTREF(__pyx_t_4); if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_7), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 220; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_t_8 = NULL; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; goto __pyx_L12_unpacking_done; __pyx_L11_unpacking_failed:; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_8 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 220; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L12_unpacking_done:; } __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_9 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 220; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_v_self->monotonic = __pyx_t_9; __pyx_v_unique = __pyx_t_4; __pyx_t_4 = 0; /* "pandas/index.pyx":222 * self.monotonic, unique = self._call_monotonic(values) * * if unique is not None: # <<<<<<<<<<<<<< * self.unique = unique * self.unique_check = 1 */ __pyx_t_9 = (__pyx_v_unique != Py_None); __pyx_t_10 = (__pyx_t_9 != 0); if (__pyx_t_10) { /* "pandas/index.pyx":223 * * if unique is not None: * self.unique = unique # <<<<<<<<<<<<<< * self.unique_check = 1 * */ __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_v_unique); if (unlikely((__pyx_t_10 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 223; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_self->unique = __pyx_t_10; /* "pandas/index.pyx":224 * if unique is not None: * self.unique = unique * self.unique_check = 1 # <<<<<<<<<<<<<< * * except TypeError: */ __pyx_v_self->unique_check = 1; goto __pyx_L13; } __pyx_L13:; } __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L10_try_end; __pyx_L3_error:; __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; /* "pandas/index.pyx":226 * self.unique_check = 1 * * except TypeError: # <<<<<<<<<<<<<< * self.monotonic = 0 * self.monotonic_check = 1 */ __pyx_t_11 = PyErr_ExceptionMatches(__pyx_builtin_TypeError); if (__pyx_t_11) { __Pyx_AddTraceback("pandas.index.IndexEngine._do_monotonic_check", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_4, &__pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 226; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_GOTREF(__pyx_t_4); __Pyx_GOTREF(__pyx_t_5); /* "pandas/index.pyx":227 * * except TypeError: * self.monotonic = 0 # <<<<<<<<<<<<<< * self.monotonic_check = 1 * */ __pyx_v_self->monotonic = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; goto __pyx_L4_exception_handled; } __pyx_L5_except_error:; __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); goto __pyx_L1_error; __pyx_L4_exception_handled:; __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); __pyx_L10_try_end:; } /* "pandas/index.pyx":228 * except TypeError: * self.monotonic = 0 * self.monotonic_check = 1 # <<<<<<<<<<<<<< * * cdef _get_index_values(self): */ __pyx_v_self->monotonic_check = 1; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_AddTraceback("pandas.index.IndexEngine._do_monotonic_check", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_values); __Pyx_XDECREF(__pyx_v_unique); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/index.pyx":230 * self.monotonic_check = 1 * * cdef _get_index_values(self): # <<<<<<<<<<<<<< * return self.vgetter() * */ static PyObject *__pyx_f_6pandas_5index_11IndexEngine__get_index_values(struct __pyx_obj_6pandas_5index_IndexEngine *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_get_index_values", 0); /* "pandas/index.pyx":231 * * cdef _get_index_values(self): * return self.vgetter() # <<<<<<<<<<<<<< * * cdef inline _do_unique_check(self): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyObject_Call(__pyx_v_self->vgetter, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 231; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas.index.IndexEngine._get_index_values", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/index.pyx":233 * return self.vgetter() * * cdef inline _do_unique_check(self): # <<<<<<<<<<<<<< * self._ensure_mapping_populated() * */ static CYTHON_INLINE PyObject *__pyx_f_6pandas_5index_11IndexEngine__do_unique_check(struct __pyx_obj_6pandas_5index_IndexEngine *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_do_unique_check", 0); /* "pandas/index.pyx":234 * * cdef inline _do_unique_check(self): * self._ensure_mapping_populated() # <<<<<<<<<<<<<< * * def _call_monotonic(self, values): */ __pyx_t_1 = __pyx_f_6pandas_5index_11IndexEngine__ensure_mapping_populated(__pyx_v_self); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 234; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas.index.IndexEngine._do_unique_check", __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_5index_11IndexEngine_11_call_monotonic(PyObject *__pyx_v_self, PyObject *__pyx_v_values); /*proto*/ static PyObject *__pyx_pw_6pandas_5index_11IndexEngine_11_call_monotonic(PyObject *__pyx_v_self, PyObject *__pyx_v_values) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_call_monotonic (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_5index_11IndexEngine_10_call_monotonic(((struct __pyx_obj_6pandas_5index_IndexEngine *)__pyx_v_self), ((PyObject *)__pyx_v_values)); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/index.pyx":236 * self._ensure_mapping_populated() * * def _call_monotonic(self, values): # <<<<<<<<<<<<<< * raise NotImplementedError * */ static PyObject *__pyx_pf_6pandas_5index_11IndexEngine_10_call_monotonic(CYTHON_UNUSED struct __pyx_obj_6pandas_5index_IndexEngine *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_values) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_call_monotonic", 0); /* "pandas/index.pyx":237 * * def _call_monotonic(self, values): * raise NotImplementedError # <<<<<<<<<<<<<< * * cdef _make_hash_table(self, n): */ __Pyx_Raise(__pyx_builtin_NotImplementedError, 0, 0, 0); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 237; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("pandas.index.IndexEngine._call_monotonic", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/index.pyx":239 * raise NotImplementedError * * cdef _make_hash_table(self, n): # <<<<<<<<<<<<<< * raise NotImplementedError * */ static PyObject *__pyx_f_6pandas_5index_11IndexEngine__make_hash_table(CYTHON_UNUSED struct __pyx_obj_6pandas_5index_IndexEngine *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_n) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_make_hash_table", 0); /* "pandas/index.pyx":240 * * cdef _make_hash_table(self, n): * raise NotImplementedError # <<<<<<<<<<<<<< * * cdef _check_type(self, object val): */ __Pyx_Raise(__pyx_builtin_NotImplementedError, 0, 0, 0); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 240; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("pandas.index.IndexEngine._make_hash_table", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/index.pyx":242 * raise NotImplementedError * * cdef _check_type(self, object val): # <<<<<<<<<<<<<< * hash(val) * */ static PyObject *__pyx_f_6pandas_5index_11IndexEngine__check_type(CYTHON_UNUSED struct __pyx_obj_6pandas_5index_IndexEngine *__pyx_v_self, PyObject *__pyx_v_val) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_hash_t __pyx_t_1; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_check_type", 0); /* "pandas/index.pyx":243 * * cdef _check_type(self, object val): * hash(val) # <<<<<<<<<<<<<< * * cdef inline _ensure_mapping_populated(self): */ __pyx_t_1 = PyObject_Hash(__pyx_v_val); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("pandas.index.IndexEngine._check_type", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/index.pyx":245 * hash(val) * * cdef inline _ensure_mapping_populated(self): # <<<<<<<<<<<<<< * if not self.initialized: * self.initialize() */ static CYTHON_INLINE PyObject *__pyx_f_6pandas_5index_11IndexEngine__ensure_mapping_populated(struct __pyx_obj_6pandas_5index_IndexEngine *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_ensure_mapping_populated", 0); /* "pandas/index.pyx":246 * * cdef inline _ensure_mapping_populated(self): * if not self.initialized: # <<<<<<<<<<<<<< * self.initialize() * */ __pyx_t_1 = ((!(__pyx_v_self->initialized != 0)) != 0); if (__pyx_t_1) { /* "pandas/index.pyx":247 * cdef inline _ensure_mapping_populated(self): * if not self.initialized: * self.initialize() # <<<<<<<<<<<<<< * * cdef initialize(self): */ __pyx_t_2 = ((struct __pyx_vtabstruct_6pandas_5index_IndexEngine *)__pyx_v_self->__pyx_vtab)->initialize(__pyx_v_self); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 247; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; goto __pyx_L3; } __pyx_L3:; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("pandas.index.IndexEngine._ensure_mapping_populated", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/index.pyx":249 * self.initialize() * * cdef initialize(self): # <<<<<<<<<<<<<< * values = self._get_index_values() * */ static PyObject *__pyx_f_6pandas_5index_11IndexEngine_initialize(struct __pyx_obj_6pandas_5index_IndexEngine *__pyx_v_self) { PyObject *__pyx_v_values = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; Py_ssize_t __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; Py_ssize_t __pyx_t_5; int __pyx_t_6; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("initialize", 0); /* "pandas/index.pyx":250 * * cdef initialize(self): * values = self._get_index_values() # <<<<<<<<<<<<<< * * self.mapping = self._make_hash_table(len(values)) */ __pyx_t_1 = ((struct __pyx_vtabstruct_6pandas_5index_IndexEngine *)__pyx_v_self->__pyx_vtab)->_get_index_values(__pyx_v_self); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 250; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_v_values = __pyx_t_1; __pyx_t_1 = 0; /* "pandas/index.pyx":252 * values = self._get_index_values() * * self.mapping = self._make_hash_table(len(values)) # <<<<<<<<<<<<<< * self.mapping.map_locations(values) * */ __pyx_t_2 = PyObject_Length(__pyx_v_values); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 252; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 252; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = ((struct __pyx_vtabstruct_6pandas_5index_IndexEngine *)__pyx_v_self->__pyx_vtab)->_make_hash_table(__pyx_v_self, __pyx_t_1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 252; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_6pandas_9hashtable_HashTable))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 252; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GIVEREF(__pyx_t_3); __Pyx_GOTREF(__pyx_v_self->mapping); __Pyx_DECREF(((PyObject *)__pyx_v_self->mapping)); __pyx_v_self->mapping = ((struct __pyx_obj_6pandas_9hashtable_HashTable *)__pyx_t_3); __pyx_t_3 = 0; /* "pandas/index.pyx":253 * * self.mapping = self._make_hash_table(len(values)) * self.mapping.map_locations(values) # <<<<<<<<<<<<<< * * if len(self.mapping) == len(values): */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->mapping), __pyx_n_s__map_locations); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 253; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 253; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_values); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_values); __Pyx_GIVEREF(__pyx_v_values); __pyx_t_4 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 253; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "pandas/index.pyx":255 * self.mapping.map_locations(values) * * if len(self.mapping) == len(values): # <<<<<<<<<<<<<< * self.unique = 1 * self.unique_check = 1 */ __pyx_t_4 = ((PyObject *)__pyx_v_self->mapping); __Pyx_INCREF(__pyx_t_4); __pyx_t_2 = PyObject_Length(__pyx_t_4); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 255; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_5 = PyObject_Length(__pyx_v_values); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 255; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_6 = ((__pyx_t_2 == __pyx_t_5) != 0); if (__pyx_t_6) { /* "pandas/index.pyx":256 * * if len(self.mapping) == len(values): * self.unique = 1 # <<<<<<<<<<<<<< * self.unique_check = 1 * */ __pyx_v_self->unique = 1; /* "pandas/index.pyx":257 * if len(self.mapping) == len(values): * self.unique = 1 * self.unique_check = 1 # <<<<<<<<<<<<<< * * self.initialized = 1 */ __pyx_v_self->unique_check = 1; goto __pyx_L3; } __pyx_L3:; /* "pandas/index.pyx":259 * self.unique_check = 1 * * self.initialized = 1 # <<<<<<<<<<<<<< * * def clear_mapping(self): */ __pyx_v_self->initialized = 1; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("pandas.index.IndexEngine.initialize", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_values); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5index_11IndexEngine_13clear_mapping(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static PyObject *__pyx_pw_6pandas_5index_11IndexEngine_13clear_mapping(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("clear_mapping (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_5index_11IndexEngine_12clear_mapping(((struct __pyx_obj_6pandas_5index_IndexEngine *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/index.pyx":261 * self.initialized = 1 * * def clear_mapping(self): # <<<<<<<<<<<<<< * self.mapping = None * self.initialized = 0 */ static PyObject *__pyx_pf_6pandas_5index_11IndexEngine_12clear_mapping(struct __pyx_obj_6pandas_5index_IndexEngine *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("clear_mapping", 0); /* "pandas/index.pyx":262 * * def clear_mapping(self): * self.mapping = None # <<<<<<<<<<<<<< * self.initialized = 0 * */ __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->mapping); __Pyx_DECREF(((PyObject *)__pyx_v_self->mapping)); __pyx_v_self->mapping = ((struct __pyx_obj_6pandas_9hashtable_HashTable *)Py_None); /* "pandas/index.pyx":263 * def clear_mapping(self): * self.mapping = None * self.initialized = 0 # <<<<<<<<<<<<<< * * def get_indexer(self, values): */ __pyx_v_self->initialized = 0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5index_11IndexEngine_15get_indexer(PyObject *__pyx_v_self, PyObject *__pyx_v_values); /*proto*/ static PyObject *__pyx_pw_6pandas_5index_11IndexEngine_15get_indexer(PyObject *__pyx_v_self, PyObject *__pyx_v_values) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("get_indexer (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_5index_11IndexEngine_14get_indexer(((struct __pyx_obj_6pandas_5index_IndexEngine *)__pyx_v_self), ((PyObject *)__pyx_v_values)); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/index.pyx":265 * self.initialized = 0 * * def get_indexer(self, values): # <<<<<<<<<<<<<< * self._ensure_mapping_populated() * return self.mapping.lookup(values) */ static PyObject *__pyx_pf_6pandas_5index_11IndexEngine_14get_indexer(struct __pyx_obj_6pandas_5index_IndexEngine *__pyx_v_self, PyObject *__pyx_v_values) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_indexer", 0); /* "pandas/index.pyx":266 * * def get_indexer(self, values): * self._ensure_mapping_populated() # <<<<<<<<<<<<<< * return self.mapping.lookup(values) * */ __pyx_t_1 = __pyx_f_6pandas_5index_11IndexEngine__ensure_mapping_populated(__pyx_v_self); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 266; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pandas/index.pyx":267 * def get_indexer(self, values): * self._ensure_mapping_populated() * return self.mapping.lookup(values) # <<<<<<<<<<<<<< * * def get_indexer_non_unique(self, targets): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->mapping), __pyx_n_s__lookup); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 267; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 267; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_values); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_values); __Pyx_GIVEREF(__pyx_v_values); __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 267; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("pandas.index.IndexEngine.get_indexer", __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_5index_11IndexEngine_17get_indexer_non_unique(PyObject *__pyx_v_self, PyObject *__pyx_v_targets); /*proto*/ static char __pyx_doc_6pandas_5index_11IndexEngine_16get_indexer_non_unique[] = " return an indexer suitable for takng from a non unique index\n return the labels in the same order ast the target\n and a missing indexer into the targets (which correspond\n to the -1 indicies in the results "; static PyObject *__pyx_pw_6pandas_5index_11IndexEngine_17get_indexer_non_unique(PyObject *__pyx_v_self, PyObject *__pyx_v_targets) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("get_indexer_non_unique (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_5index_11IndexEngine_16get_indexer_non_unique(((struct __pyx_obj_6pandas_5index_IndexEngine *)__pyx_v_self), ((PyObject *)__pyx_v_targets)); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/index.pyx":269 * return self.mapping.lookup(values) * * def get_indexer_non_unique(self, targets): # <<<<<<<<<<<<<< * """ return an indexer suitable for takng from a non unique index * return the labels in the same order ast the target */ static PyObject *__pyx_pf_6pandas_5index_11IndexEngine_16get_indexer_non_unique(struct __pyx_obj_6pandas_5index_IndexEngine *__pyx_v_self, PyObject *__pyx_v_targets) { PyArrayObject *__pyx_v_values = 0; PyArrayObject *__pyx_v_result = 0; PyArrayObject *__pyx_v_missing = 0; PyObject *__pyx_v_stargets = 0; PyObject *__pyx_v_d = 0; PyObject *__pyx_v_val = 0; int __pyx_v_count; int __pyx_v_count_missing; Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_n; Py_ssize_t __pyx_v_n_t; Py_ssize_t __pyx_v_n_alloc; CYTHON_UNUSED PyObject *__pyx_v_members = NULL; __Pyx_LocalBuf_ND __pyx_pybuffernd_missing; __Pyx_Buffer __pyx_pybuffer_missing; __Pyx_LocalBuf_ND __pyx_pybuffernd_result; __Pyx_Buffer __pyx_pybuffer_result; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; Py_ssize_t __pyx_t_3; int __pyx_t_4; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyArrayObject *__pyx_t_8 = NULL; int __pyx_t_9; PyObject *__pyx_t_10 = NULL; PyObject *__pyx_t_11 = NULL; PyObject *__pyx_t_12 = NULL; Py_ssize_t __pyx_t_13; int __pyx_t_14; Py_ssize_t __pyx_t_15; PyObject *(*__pyx_t_16)(PyObject *); Py_ssize_t __pyx_t_17; int __pyx_t_18; int __pyx_t_19; int __pyx_t_20; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_indexer_non_unique", 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_missing.pybuffer.buf = NULL; __pyx_pybuffer_missing.refcount = 0; __pyx_pybuffernd_missing.data = NULL; __pyx_pybuffernd_missing.rcbuffer = &__pyx_pybuffer_missing; /* "pandas/index.pyx":279 * ndarray[int64_t] result, missing * set stargets * dict d = {} # <<<<<<<<<<<<<< * object val * int count = 0, count_missing = 0 */ __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 279; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_v_d = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/index.pyx":281 * dict d = {} * object val * int count = 0, count_missing = 0 # <<<<<<<<<<<<<< * Py_ssize_t i, j, n, n_t, n_alloc * */ __pyx_v_count = 0; __pyx_v_count_missing = 0; /* "pandas/index.pyx":284 * Py_ssize_t i, j, n, n_t, n_alloc * * self._ensure_mapping_populated() # <<<<<<<<<<<<<< * values = self._get_index_values() * stargets = set(targets) */ __pyx_t_1 = __pyx_f_6pandas_5index_11IndexEngine__ensure_mapping_populated(__pyx_v_self); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 284; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pandas/index.pyx":285 * * self._ensure_mapping_populated() * values = self._get_index_values() # <<<<<<<<<<<<<< * stargets = set(targets) * n = len(values) */ __pyx_t_1 = ((struct __pyx_vtabstruct_6pandas_5index_IndexEngine *)__pyx_v_self->__pyx_vtab)->_get_index_values(__pyx_v_self); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 285; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 285; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_values = ((PyArrayObject *)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/index.pyx":286 * self._ensure_mapping_populated() * values = self._get_index_values() * stargets = set(targets) # <<<<<<<<<<<<<< * n = len(values) * n_t = len(targets) */ __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 286; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_targets); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_targets); __Pyx_GIVEREF(__pyx_v_targets); __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)(&PySet_Type))), ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 286; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_v_stargets = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; /* "pandas/index.pyx":287 * values = self._get_index_values() * stargets = set(targets) * n = len(values) # <<<<<<<<<<<<<< * n_t = len(targets) * if n > 10000: */ __pyx_t_3 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 287; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_3; /* "pandas/index.pyx":288 * stargets = set(targets) * n = len(values) * n_t = len(targets) # <<<<<<<<<<<<<< * if n > 10000: * n_alloc = 10000 */ __pyx_t_3 = PyObject_Length(__pyx_v_targets); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 288; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n_t = __pyx_t_3; /* "pandas/index.pyx":289 * n = len(values) * n_t = len(targets) * if n > 10000: # <<<<<<<<<<<<<< * n_alloc = 10000 * else: */ __pyx_t_4 = ((__pyx_v_n > 10000) != 0); if (__pyx_t_4) { /* "pandas/index.pyx":290 * n_t = len(targets) * if n > 10000: * n_alloc = 10000 # <<<<<<<<<<<<<< * else: * n_alloc = n */ __pyx_v_n_alloc = 10000; goto __pyx_L3; } /*else*/ { /* "pandas/index.pyx":292 * n_alloc = 10000 * else: * n_alloc = n # <<<<<<<<<<<<<< * * result = np.empty(n_alloc, dtype=np.int64) */ __pyx_v_n_alloc = __pyx_v_n; } __pyx_L3:; /* "pandas/index.pyx":294 * n_alloc = n * * result = np.empty(n_alloc, dtype=np.int64) # <<<<<<<<<<<<<< * missing = np.empty(n_t, dtype=np.int64) * */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 294; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__empty); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 294; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_n_alloc); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 294; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 294; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 294; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_2)); __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 294; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s__int64); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 294; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__dtype), __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 294; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_7 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_5), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 294; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; if (!(likely(((__pyx_t_7) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_7, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 294; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_8 = ((PyArrayObject *)__pyx_t_7); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __pyx_t_9 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_t_8, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_9 < 0)) { PyErr_Fetch(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_v_result, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_11); Py_XDECREF(__pyx_t_12); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_10, __pyx_t_11, __pyx_t_12); } } __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_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 294; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_8 = 0; __pyx_v_result = ((PyArrayObject *)__pyx_t_7); __pyx_t_7 = 0; /* "pandas/index.pyx":295 * * result = np.empty(n_alloc, dtype=np.int64) * missing = np.empty(n_t, dtype=np.int64) # <<<<<<<<<<<<<< * * # form the set of the results (like ismember) */ __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 295; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s__empty); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 295; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_7 = PyInt_FromSsize_t(__pyx_v_n_t); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 295; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 295; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_7); __Pyx_GIVEREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_7 = PyDict_New(); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 295; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_7)); __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 295; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s__int64); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 295; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (PyDict_SetItem(__pyx_t_7, ((PyObject *)__pyx_n_s__dtype), __pyx_t_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 295; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_5), ((PyObject *)__pyx_t_7)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 295; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0; if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 295; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_8 = ((PyArrayObject *)__pyx_t_6); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_missing.rcbuffer->pybuffer); __pyx_t_9 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_missing.rcbuffer->pybuffer, (PyObject*)__pyx_t_8, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_9 < 0)) { PyErr_Fetch(&__pyx_t_12, &__pyx_t_11, &__pyx_t_10); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_missing.rcbuffer->pybuffer, (PyObject*)__pyx_v_missing, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_12); Py_XDECREF(__pyx_t_11); Py_XDECREF(__pyx_t_10); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_12, __pyx_t_11, __pyx_t_10); } } __pyx_pybuffernd_missing.diminfo[0].strides = __pyx_pybuffernd_missing.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_missing.diminfo[0].shape = __pyx_pybuffernd_missing.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 295; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_8 = 0; __pyx_v_missing = ((PyArrayObject *)__pyx_t_6); __pyx_t_6 = 0; /* "pandas/index.pyx":298 * * # form the set of the results (like ismember) * members = np.empty(n, dtype=np.uint8) # <<<<<<<<<<<<<< * for i in range(n): * val = util.get_value_1d(values, i) */ __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 298; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s__empty); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 298; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyInt_FromSsize_t(__pyx_v_n); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 298; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 298; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyDict_New(); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 298; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_6)); __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 298; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__uint8); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 298; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (PyDict_SetItem(__pyx_t_6, ((PyObject *)__pyx_n_s__dtype), __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 298; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyObject_Call(__pyx_t_7, ((PyObject *)__pyx_t_5), ((PyObject *)__pyx_t_6)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 298; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0; __pyx_v_members = __pyx_t_1; __pyx_t_1 = 0; /* "pandas/index.pyx":299 * # form the set of the results (like ismember) * members = np.empty(n, dtype=np.uint8) * for i in range(n): # <<<<<<<<<<<<<< * val = util.get_value_1d(values, i) * if val in stargets: */ __pyx_t_3 = __pyx_v_n; for (__pyx_t_13 = 0; __pyx_t_13 < __pyx_t_3; __pyx_t_13+=1) { __pyx_v_i = __pyx_t_13; /* "pandas/index.pyx":300 * members = np.empty(n, dtype=np.uint8) * for i in range(n): * val = util.get_value_1d(values, i) # <<<<<<<<<<<<<< * if val in stargets: * if val not in d: */ __pyx_t_1 = get_value_1d(__pyx_v_values, __pyx_v_i); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 300; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_XDECREF_SET(__pyx_v_val, __pyx_t_1); __pyx_t_1 = 0; /* "pandas/index.pyx":301 * for i in range(n): * val = util.get_value_1d(values, i) * if val in stargets: # <<<<<<<<<<<<<< * if val not in d: * d[val] = [] */ __pyx_t_4 = (__Pyx_PySequence_Contains(__pyx_v_val, ((PyObject *)__pyx_v_stargets), Py_EQ)); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 301; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_14 = (__pyx_t_4 != 0); if (__pyx_t_14) { /* "pandas/index.pyx":302 * val = util.get_value_1d(values, i) * if val in stargets: * if val not in d: # <<<<<<<<<<<<<< * d[val] = [] * d[val].append(i) */ __pyx_t_14 = (__Pyx_PyDict_Contains(__pyx_v_val, ((PyObject *)__pyx_v_d), Py_NE)); if (unlikely(__pyx_t_14 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 302; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_4 = (__pyx_t_14 != 0); if (__pyx_t_4) { /* "pandas/index.pyx":303 * if val in stargets: * if val not in d: * d[val] = [] # <<<<<<<<<<<<<< * d[val].append(i) * */ __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 303; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(((PyObject *)__pyx_v_d), __pyx_v_val, ((PyObject *)__pyx_t_1)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 303; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; goto __pyx_L7; } __pyx_L7:; /* "pandas/index.pyx":304 * if val not in d: * d[val] = [] * d[val].append(i) # <<<<<<<<<<<<<< * * for i in range(n_t): */ __pyx_t_1 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_d), __pyx_v_val); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 304; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_6 = PyInt_FromSsize_t(__pyx_v_i); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 304; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_5 = __Pyx_PyObject_Append(__pyx_t_1, __pyx_t_6); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 304; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; goto __pyx_L6; } __pyx_L6:; } /* "pandas/index.pyx":306 * d[val].append(i) * * for i in range(n_t): # <<<<<<<<<<<<<< * * val = util.get_value_1d(targets, i) */ __pyx_t_3 = __pyx_v_n_t; for (__pyx_t_13 = 0; __pyx_t_13 < __pyx_t_3; __pyx_t_13+=1) { __pyx_v_i = __pyx_t_13; /* "pandas/index.pyx":308 * for i in range(n_t): * * val = util.get_value_1d(targets, i) # <<<<<<<<<<<<<< * * # found */ if (!(likely(((__pyx_v_targets) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_targets, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 308; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_5 = get_value_1d(((PyArrayObject *)__pyx_v_targets), __pyx_v_i); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 308; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_XDECREF_SET(__pyx_v_val, __pyx_t_5); __pyx_t_5 = 0; /* "pandas/index.pyx":311 * * # found * if val in d: # <<<<<<<<<<<<<< * for j in d[val]: * */ __pyx_t_4 = (__Pyx_PyDict_Contains(__pyx_v_val, ((PyObject *)__pyx_v_d), Py_EQ)); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 311; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_14 = (__pyx_t_4 != 0); if (__pyx_t_14) { /* "pandas/index.pyx":312 * # found * if val in d: * for j in d[val]: # <<<<<<<<<<<<<< * * # realloc if needed */ __pyx_t_5 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_d), __pyx_v_val); if (!__pyx_t_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 312; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); if (PyList_CheckExact(__pyx_t_5) || PyTuple_CheckExact(__pyx_t_5)) { __pyx_t_6 = __pyx_t_5; __Pyx_INCREF(__pyx_t_6); __pyx_t_15 = 0; __pyx_t_16 = NULL; } else { __pyx_t_15 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 312; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_16 = Py_TYPE(__pyx_t_6)->tp_iternext; } __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; for (;;) { if (!__pyx_t_16 && PyList_CheckExact(__pyx_t_6)) { if (__pyx_t_15 >= PyList_GET_SIZE(__pyx_t_6)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_5 = PyList_GET_ITEM(__pyx_t_6, __pyx_t_15); __Pyx_INCREF(__pyx_t_5); __pyx_t_15++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 312; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_5 = PySequence_ITEM(__pyx_t_6, __pyx_t_15); __pyx_t_15++; if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 312; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif } else if (!__pyx_t_16 && PyTuple_CheckExact(__pyx_t_6)) { if (__pyx_t_15 >= PyTuple_GET_SIZE(__pyx_t_6)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_6, __pyx_t_15); __Pyx_INCREF(__pyx_t_5); __pyx_t_15++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 312; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_5 = PySequence_ITEM(__pyx_t_6, __pyx_t_15); __pyx_t_15++; if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 312; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif } else { __pyx_t_5 = __pyx_t_16(__pyx_t_6); if (unlikely(!__pyx_t_5)) { if (PyErr_Occurred()) { if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear(); else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 312; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } break; } __Pyx_GOTREF(__pyx_t_5); } __pyx_t_17 = __Pyx_PyIndex_AsSsize_t(__pyx_t_5); if (unlikely((__pyx_t_17 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 312; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_v_j = __pyx_t_17; /* "pandas/index.pyx":315 * * # realloc if needed * if count >= n_alloc: # <<<<<<<<<<<<<< * n_alloc += 10000 * result = np.resize(result, n_alloc) */ __pyx_t_14 = ((__pyx_v_count >= __pyx_v_n_alloc) != 0); if (__pyx_t_14) { /* "pandas/index.pyx":316 * # realloc if needed * if count >= n_alloc: * n_alloc += 10000 # <<<<<<<<<<<<<< * result = np.resize(result, n_alloc) * */ __pyx_v_n_alloc = (__pyx_v_n_alloc + 10000); /* "pandas/index.pyx":317 * if count >= n_alloc: * n_alloc += 10000 * result = np.resize(result, n_alloc) # <<<<<<<<<<<<<< * * result[count] = j */ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 317; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s__resize); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 317; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyInt_FromSsize_t(__pyx_v_n_alloc); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 317; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 317; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_INCREF(((PyObject *)__pyx_v_result)); PyTuple_SET_ITEM(__pyx_t_7, 0, ((PyObject *)__pyx_v_result)); __Pyx_GIVEREF(((PyObject *)__pyx_v_result)); PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_7), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 317; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0; if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 317; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_8 = ((PyArrayObject *)__pyx_t_5); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __pyx_t_9 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_t_8, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_9 < 0)) { PyErr_Fetch(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_v_result, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_11); Py_XDECREF(__pyx_t_12); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_10, __pyx_t_11, __pyx_t_12); } } __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_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 317; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_8 = 0; __Pyx_DECREF_SET(__pyx_v_result, ((PyArrayObject *)__pyx_t_5)); __pyx_t_5 = 0; goto __pyx_L13; } __pyx_L13:; /* "pandas/index.pyx":319 * result = np.resize(result, n_alloc) * * result[count] = j # <<<<<<<<<<<<<< * count += 1 * */ __pyx_t_9 = __pyx_v_count; __pyx_t_18 = -1; if (__pyx_t_9 < 0) { __pyx_t_9 += __pyx_pybuffernd_result.diminfo[0].shape; if (unlikely(__pyx_t_9 < 0)) __pyx_t_18 = 0; } else if (unlikely(__pyx_t_9 >= __pyx_pybuffernd_result.diminfo[0].shape)) __pyx_t_18 = 0; if (unlikely(__pyx_t_18 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_18); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 319; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_9, __pyx_pybuffernd_result.diminfo[0].strides) = __pyx_v_j; /* "pandas/index.pyx":320 * * result[count] = j * count += 1 # <<<<<<<<<<<<<< * * # value not found */ __pyx_v_count = (__pyx_v_count + 1); } __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; goto __pyx_L10; } /*else*/ { /* "pandas/index.pyx":325 * else: * * if count >= n_alloc: # <<<<<<<<<<<<<< * n_alloc += 10000 * result = np.resize(result, n_alloc) */ __pyx_t_14 = ((__pyx_v_count >= __pyx_v_n_alloc) != 0); if (__pyx_t_14) { /* "pandas/index.pyx":326 * * if count >= n_alloc: * n_alloc += 10000 # <<<<<<<<<<<<<< * result = np.resize(result, n_alloc) * result[count] = -1 */ __pyx_v_n_alloc = (__pyx_v_n_alloc + 10000); /* "pandas/index.pyx":327 * if count >= n_alloc: * n_alloc += 10000 * result = np.resize(result, n_alloc) # <<<<<<<<<<<<<< * result[count] = -1 * count += 1 */ __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 327; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s__resize); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 327; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyInt_FromSsize_t(__pyx_v_n_alloc); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 327; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 327; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_INCREF(((PyObject *)__pyx_v_result)); PyTuple_SET_ITEM(__pyx_t_7, 0, ((PyObject *)__pyx_v_result)); __Pyx_GIVEREF(((PyObject *)__pyx_v_result)); PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_7), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 327; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0; if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 327; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_8 = ((PyArrayObject *)__pyx_t_6); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __pyx_t_18 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_t_8, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_18 < 0)) { PyErr_Fetch(&__pyx_t_12, &__pyx_t_11, &__pyx_t_10); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_v_result, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_12); Py_XDECREF(__pyx_t_11); Py_XDECREF(__pyx_t_10); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_12, __pyx_t_11, __pyx_t_10); } } __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_18 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 327; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_8 = 0; __Pyx_DECREF_SET(__pyx_v_result, ((PyArrayObject *)__pyx_t_6)); __pyx_t_6 = 0; goto __pyx_L14; } __pyx_L14:; /* "pandas/index.pyx":328 * n_alloc += 10000 * result = np.resize(result, n_alloc) * result[count] = -1 # <<<<<<<<<<<<<< * count += 1 * missing[count_missing] = i */ __pyx_t_18 = __pyx_v_count; __pyx_t_19 = -1; if (__pyx_t_18 < 0) { __pyx_t_18 += __pyx_pybuffernd_result.diminfo[0].shape; if (unlikely(__pyx_t_18 < 0)) __pyx_t_19 = 0; } else if (unlikely(__pyx_t_18 >= __pyx_pybuffernd_result.diminfo[0].shape)) __pyx_t_19 = 0; if (unlikely(__pyx_t_19 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_19); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 328; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_result.diminfo[0].strides) = -1; /* "pandas/index.pyx":329 * result = np.resize(result, n_alloc) * result[count] = -1 * count += 1 # <<<<<<<<<<<<<< * missing[count_missing] = i * count_missing += 1 */ __pyx_v_count = (__pyx_v_count + 1); /* "pandas/index.pyx":330 * result[count] = -1 * count += 1 * missing[count_missing] = i # <<<<<<<<<<<<<< * count_missing += 1 * */ __pyx_t_19 = __pyx_v_count_missing; __pyx_t_20 = -1; if (__pyx_t_19 < 0) { __pyx_t_19 += __pyx_pybuffernd_missing.diminfo[0].shape; if (unlikely(__pyx_t_19 < 0)) __pyx_t_20 = 0; } else if (unlikely(__pyx_t_19 >= __pyx_pybuffernd_missing.diminfo[0].shape)) __pyx_t_20 = 0; if (unlikely(__pyx_t_20 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_20); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 330; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_missing.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_missing.diminfo[0].strides) = __pyx_v_i; /* "pandas/index.pyx":331 * count += 1 * missing[count_missing] = i * count_missing += 1 # <<<<<<<<<<<<<< * * return result[0:count], missing[0:count_missing] */ __pyx_v_count_missing = (__pyx_v_count_missing + 1); } __pyx_L10:; } /* "pandas/index.pyx":333 * count_missing += 1 * * return result[0:count], missing[0:count_missing] # <<<<<<<<<<<<<< * * cdef class Int64Engine(IndexEngine): */ __Pyx_XDECREF(__pyx_r); __pyx_t_6 = __Pyx_PyObject_GetSlice(((PyObject *)__pyx_v_result), 0, __pyx_v_count, NULL, NULL, NULL, 1, 1, 1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 333; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = __Pyx_PyObject_GetSlice(((PyObject *)__pyx_v_missing), 0, __pyx_v_count_missing, NULL, NULL, NULL, 1, 1, 1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 333; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 333; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_7); __Pyx_GIVEREF(__pyx_t_7); __pyx_t_6 = 0; __pyx_t_7 = 0; __pyx_r = ((PyObject *)__pyx_t_5); __pyx_t_5 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_missing.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas.index.IndexEngine.get_indexer_non_unique", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_missing.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_values); __Pyx_XDECREF((PyObject *)__pyx_v_result); __Pyx_XDECREF((PyObject *)__pyx_v_missing); __Pyx_XDECREF(__pyx_v_stargets); __Pyx_XDECREF(__pyx_v_d); __Pyx_XDECREF(__pyx_v_val); __Pyx_XDECREF(__pyx_v_members); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5index_11IndexEngine_7vgetter_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6pandas_5index_11IndexEngine_7vgetter_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_5index_11IndexEngine_7vgetter___get__(((struct __pyx_obj_6pandas_5index_IndexEngine *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/index.pyx":73 * * cdef readonly: * object vgetter # <<<<<<<<<<<<<< * HashTable mapping * bint over_size_threshold */ static PyObject *__pyx_pf_6pandas_5index_11IndexEngine_7vgetter___get__(struct __pyx_obj_6pandas_5index_IndexEngine *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_self->vgetter); __pyx_r = __pyx_v_self->vgetter; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5index_11IndexEngine_7mapping_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6pandas_5index_11IndexEngine_7mapping_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_5index_11IndexEngine_7mapping___get__(((struct __pyx_obj_6pandas_5index_IndexEngine *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/index.pyx":74 * cdef readonly: * object vgetter * HashTable mapping # <<<<<<<<<<<<<< * bint over_size_threshold * */ static PyObject *__pyx_pf_6pandas_5index_11IndexEngine_7mapping___get__(struct __pyx_obj_6pandas_5index_IndexEngine *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_self->mapping)); __pyx_r = ((PyObject *)__pyx_v_self->mapping); goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5index_11IndexEngine_19over_size_threshold_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6pandas_5index_11IndexEngine_19over_size_threshold_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_5index_11IndexEngine_19over_size_threshold___get__(((struct __pyx_obj_6pandas_5index_IndexEngine *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/index.pyx":75 * object vgetter * HashTable mapping * bint over_size_threshold # <<<<<<<<<<<<<< * * cdef: */ static PyObject *__pyx_pf_6pandas_5index_11IndexEngine_19over_size_threshold___get__(struct __pyx_obj_6pandas_5index_IndexEngine *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->over_size_threshold); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 75; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas.index.IndexEngine.over_size_threshold.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/index.pyx":337 * cdef class Int64Engine(IndexEngine): * * cdef _get_index_values(self): # <<<<<<<<<<<<<< * return algos.ensure_int64(self.vgetter()) * */ static PyObject *__pyx_f_6pandas_5index_11Int64Engine__get_index_values(struct __pyx_obj_6pandas_5index_Int64Engine *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_get_index_values", 0); /* "pandas/index.pyx":338 * * cdef _get_index_values(self): * return algos.ensure_int64(self.vgetter()) # <<<<<<<<<<<<<< * * cdef _make_hash_table(self, n): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__algos); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 338; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s__ensure_int64); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 338; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyObject_Call(__pyx_v_self->__pyx_base.vgetter, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 338; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 338; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 338; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("pandas.index.Int64Engine._get_index_values", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/index.pyx":340 * return algos.ensure_int64(self.vgetter()) * * cdef _make_hash_table(self, n): # <<<<<<<<<<<<<< * return _hash.Int64HashTable(n) * */ static PyObject *__pyx_f_6pandas_5index_11Int64Engine__make_hash_table(CYTHON_UNUSED struct __pyx_obj_6pandas_5index_Int64Engine *__pyx_v_self, PyObject *__pyx_v_n) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_make_hash_table", 0); /* "pandas/index.pyx":341 * * cdef _make_hash_table(self, n): * return _hash.Int64HashTable(n) # <<<<<<<<<<<<<< * * def _call_monotonic(self, values): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s___hash); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 341; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s__Int64HashTable); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 341; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 341; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_n); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_n); __Pyx_GIVEREF(__pyx_v_n); __pyx_t_3 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 341; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("pandas.index.Int64Engine._make_hash_table", __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_5index_11Int64Engine_1_call_monotonic(PyObject *__pyx_v_self, PyObject *__pyx_v_values); /*proto*/ static PyObject *__pyx_pw_6pandas_5index_11Int64Engine_1_call_monotonic(PyObject *__pyx_v_self, PyObject *__pyx_v_values) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_call_monotonic (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_5index_11Int64Engine__call_monotonic(((struct __pyx_obj_6pandas_5index_Int64Engine *)__pyx_v_self), ((PyObject *)__pyx_v_values)); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/index.pyx":343 * return _hash.Int64HashTable(n) * * def _call_monotonic(self, values): # <<<<<<<<<<<<<< * return algos.is_monotonic_int64(values) * */ static PyObject *__pyx_pf_6pandas_5index_11Int64Engine__call_monotonic(CYTHON_UNUSED struct __pyx_obj_6pandas_5index_Int64Engine *__pyx_v_self, PyObject *__pyx_v_values) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_call_monotonic", 0); /* "pandas/index.pyx":344 * * def _call_monotonic(self, values): * return algos.is_monotonic_int64(values) # <<<<<<<<<<<<<< * * def get_pad_indexer(self, other, limit=None): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__algos); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 344; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s__is_monotonic_int64); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 344; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 344; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_values); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_values); __Pyx_GIVEREF(__pyx_v_values); __pyx_t_3 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 344; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("pandas.index.Int64Engine._call_monotonic", __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_5index_11Int64Engine_3get_pad_indexer(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_6pandas_5index_11Int64Engine_3get_pad_indexer(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_other = 0; PyObject *__pyx_v_limit = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("get_pad_indexer (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__other,&__pyx_n_s__limit,0}; PyObject* values[2] = {0,0}; /* "pandas/index.pyx":346 * return algos.is_monotonic_int64(values) * * def get_pad_indexer(self, other, limit=None): # <<<<<<<<<<<<<< * return algos.pad_int64(self._get_index_values(), other, * limit=limit) */ values[1] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__other)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__limit); if (value) { values[1] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "get_pad_indexer") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 346; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_other = values[0]; __pyx_v_limit = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("get_pad_indexer", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 346; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.index.Int64Engine.get_pad_indexer", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pandas_5index_11Int64Engine_2get_pad_indexer(((struct __pyx_obj_6pandas_5index_Int64Engine *)__pyx_v_self), __pyx_v_other, __pyx_v_limit); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5index_11Int64Engine_2get_pad_indexer(struct __pyx_obj_6pandas_5index_Int64Engine *__pyx_v_self, PyObject *__pyx_v_other, PyObject *__pyx_v_limit) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_pad_indexer", 0); /* "pandas/index.pyx":347 * * def get_pad_indexer(self, other, limit=None): * return algos.pad_int64(self._get_index_values(), other, # <<<<<<<<<<<<<< * limit=limit) * */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__algos); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 347; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s__pad_int64); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 347; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = ((struct __pyx_vtabstruct_6pandas_5index_Int64Engine *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base._get_index_values(((struct __pyx_obj_6pandas_5index_IndexEngine *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 347; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 347; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_other); PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_other); __Pyx_GIVEREF(__pyx_v_other); __pyx_t_1 = 0; __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 347; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_1)); /* "pandas/index.pyx":348 * def get_pad_indexer(self, other, limit=None): * return algos.pad_int64(self._get_index_values(), other, * limit=limit) # <<<<<<<<<<<<<< * * def get_backfill_indexer(self, other, limit=None): */ if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__limit), __pyx_v_limit) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 347; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_4 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_3), ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 347; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("pandas.index.Int64Engine.get_pad_indexer", __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_5index_11Int64Engine_5get_backfill_indexer(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_6pandas_5index_11Int64Engine_5get_backfill_indexer(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_other = 0; PyObject *__pyx_v_limit = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("get_backfill_indexer (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__other,&__pyx_n_s__limit,0}; PyObject* values[2] = {0,0}; /* "pandas/index.pyx":350 * limit=limit) * * def get_backfill_indexer(self, other, limit=None): # <<<<<<<<<<<<<< * return algos.backfill_int64(self._get_index_values(), other, * limit=limit) */ values[1] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__other)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__limit); if (value) { values[1] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "get_backfill_indexer") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 350; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_other = values[0]; __pyx_v_limit = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("get_backfill_indexer", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 350; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.index.Int64Engine.get_backfill_indexer", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pandas_5index_11Int64Engine_4get_backfill_indexer(((struct __pyx_obj_6pandas_5index_Int64Engine *)__pyx_v_self), __pyx_v_other, __pyx_v_limit); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5index_11Int64Engine_4get_backfill_indexer(struct __pyx_obj_6pandas_5index_Int64Engine *__pyx_v_self, PyObject *__pyx_v_other, PyObject *__pyx_v_limit) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_backfill_indexer", 0); /* "pandas/index.pyx":351 * * def get_backfill_indexer(self, other, limit=None): * return algos.backfill_int64(self._get_index_values(), other, # <<<<<<<<<<<<<< * limit=limit) * */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__algos); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 351; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s__backfill_int64); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 351; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = ((struct __pyx_vtabstruct_6pandas_5index_Int64Engine *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base._get_index_values(((struct __pyx_obj_6pandas_5index_IndexEngine *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 351; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 351; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_other); PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_other); __Pyx_GIVEREF(__pyx_v_other); __pyx_t_1 = 0; __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 351; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_1)); /* "pandas/index.pyx":352 * def get_backfill_indexer(self, other, limit=None): * return algos.backfill_int64(self._get_index_values(), other, * limit=limit) # <<<<<<<<<<<<<< * * cdef _check_type(self, object val): */ if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__limit), __pyx_v_limit) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 351; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_4 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_3), ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 351; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("pandas.index.Int64Engine.get_backfill_indexer", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/index.pyx":354 * limit=limit) * * cdef _check_type(self, object val): # <<<<<<<<<<<<<< * hash(val) * if util.is_bool_object(val): */ static PyObject *__pyx_f_6pandas_5index_11Int64Engine__check_type(CYTHON_UNUSED struct __pyx_obj_6pandas_5index_Int64Engine *__pyx_v_self, PyObject *__pyx_v_val) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_hash_t __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_check_type", 0); /* "pandas/index.pyx":355 * * cdef _check_type(self, object val): * hash(val) # <<<<<<<<<<<<<< * if util.is_bool_object(val): * raise KeyError(val) */ __pyx_t_1 = PyObject_Hash(__pyx_v_val); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 355; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/index.pyx":356 * cdef _check_type(self, object val): * hash(val) * if util.is_bool_object(val): # <<<<<<<<<<<<<< * raise KeyError(val) * */ __pyx_t_2 = (is_bool_object(__pyx_v_val) != 0); if (__pyx_t_2) { /* "pandas/index.pyx":357 * hash(val) * if util.is_bool_object(val): * raise KeyError(val) # <<<<<<<<<<<<<< * * cdef _maybe_get_bool_indexer(self, object val): */ __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 357; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_v_val); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_val); __Pyx_GIVEREF(__pyx_v_val); __pyx_t_4 = PyObject_Call(__pyx_builtin_KeyError, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 357; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(((PyObject *)__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_filename = __pyx_f[0]; __pyx_lineno = 357; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L3; } __pyx_L3:; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("pandas.index.Int64Engine._check_type", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/index.pyx":359 * raise KeyError(val) * * cdef _maybe_get_bool_indexer(self, object val): # <<<<<<<<<<<<<< * cdef: * ndarray[uint8_t, cast=True] indexer */ static PyObject *__pyx_f_6pandas_5index_11Int64Engine__maybe_get_bool_indexer(struct __pyx_obj_6pandas_5index_Int64Engine *__pyx_v_self, PyObject *__pyx_v_val) { PyArrayObject *__pyx_v_indexer = 0; PyArrayObject *__pyx_v_values = 0; int __pyx_v_count; Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_n; CYTHON_UNUSED __pyx_t_5numpy_int64_t __pyx_v_ival; int __pyx_v_last_true; PyObject *__pyx_v_result = NULL; __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 int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; __pyx_t_5numpy_int64_t __pyx_t_4; PyArrayObject *__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; PyObject *__pyx_t_11 = NULL; PyObject *__pyx_t_12 = NULL; PyArrayObject *__pyx_t_13 = NULL; Py_ssize_t __pyx_t_14; Py_ssize_t __pyx_t_15; Py_ssize_t __pyx_t_16; Py_ssize_t __pyx_t_17; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_maybe_get_bool_indexer", 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; /* "pandas/index.pyx":363 * ndarray[uint8_t, cast=True] indexer * ndarray[int64_t] values * int count = 0 # <<<<<<<<<<<<<< * Py_ssize_t i, n * int64_t ival */ __pyx_v_count = 0; /* "pandas/index.pyx":368 * int last_true * * if not util.is_integer_object(val): # <<<<<<<<<<<<<< * raise KeyError(val) * */ __pyx_t_1 = ((!(is_integer_object(__pyx_v_val) != 0)) != 0); if (__pyx_t_1) { /* "pandas/index.pyx":369 * * if not util.is_integer_object(val): * raise KeyError(val) # <<<<<<<<<<<<<< * * ival = val */ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 369; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_val); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_val); __Pyx_GIVEREF(__pyx_v_val); __pyx_t_3 = PyObject_Call(__pyx_builtin_KeyError, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 369; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(((PyObject *)__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_filename = __pyx_f[0]; __pyx_lineno = 369; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L3; } __pyx_L3:; /* "pandas/index.pyx":371 * raise KeyError(val) * * ival = val # <<<<<<<<<<<<<< * * values = self._get_index_values() */ __pyx_t_4 = __Pyx_PyInt_from_py_npy_int64(__pyx_v_val); if (unlikely((__pyx_t_4 == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 371; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_ival = __pyx_t_4; /* "pandas/index.pyx":373 * ival = val * * values = self._get_index_values() # <<<<<<<<<<<<<< * n = len(values) * */ __pyx_t_3 = ((struct __pyx_vtabstruct_6pandas_5index_Int64Engine *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base._get_index_values(((struct __pyx_obj_6pandas_5index_IndexEngine *)__pyx_v_self)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 373; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 373; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_5 = ((PyArrayObject *)__pyx_t_3); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_t_6 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_values.rcbuffer->pybuffer, (PyObject*)__pyx_t_5, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_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_values.rcbuffer->pybuffer, (PyObject*)__pyx_v_values, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_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_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]; if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 373; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_5 = 0; __pyx_v_values = ((PyArrayObject *)__pyx_t_3); __pyx_t_3 = 0; /* "pandas/index.pyx":374 * * values = self._get_index_values() * n = len(values) # <<<<<<<<<<<<<< * * result = np.empty(n, dtype=bool) */ __pyx_t_10 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_10 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 374; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_10; /* "pandas/index.pyx":376 * n = len(values) * * result = np.empty(n, dtype=bool) # <<<<<<<<<<<<<< * indexer = result.view(np.uint8) * */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 376; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s__empty); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 376; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyInt_FromSsize_t(__pyx_v_n); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 376; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_11 = PyTuple_New(1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 376; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 376; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_3)); if (PyDict_SetItem(__pyx_t_3, ((PyObject *)__pyx_n_s__dtype), ((PyObject*)&PyBool_Type)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 376; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_12 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_11), ((PyObject *)__pyx_t_3)); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 376; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_11)); __pyx_t_11 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; __pyx_v_result = __pyx_t_12; __pyx_t_12 = 0; /* "pandas/index.pyx":377 * * result = np.empty(n, dtype=bool) * indexer = result.view(np.uint8) # <<<<<<<<<<<<<< * * for i in range(n): */ __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_result, __pyx_n_s__view); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 377; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 377; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s__uint8); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 377; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 377; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_11); __Pyx_GIVEREF(__pyx_t_11); __pyx_t_11 = 0; __pyx_t_11 = PyObject_Call(__pyx_t_12, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 377; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; if (!(likely(((__pyx_t_11) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_11, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 377; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_13 = ((PyArrayObject *)__pyx_t_11); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer); __pyx_t_6 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer, (PyObject*)__pyx_t_13, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 1, __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_indexer.rcbuffer->pybuffer, (PyObject*)__pyx_v_indexer, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 1, __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_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_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 377; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_13 = 0; __pyx_v_indexer = ((PyArrayObject *)__pyx_t_11); __pyx_t_11 = 0; /* "pandas/index.pyx":379 * indexer = result.view(np.uint8) * * for i in range(n): # <<<<<<<<<<<<<< * if values[i] == val: * count += 1 */ __pyx_t_10 = __pyx_v_n; for (__pyx_t_14 = 0; __pyx_t_14 < __pyx_t_10; __pyx_t_14+=1) { __pyx_v_i = __pyx_t_14; /* "pandas/index.pyx":380 * * for i in range(n): * if values[i] == val: # <<<<<<<<<<<<<< * count += 1 * indexer[i] = 1 */ __pyx_t_15 = __pyx_v_i; __pyx_t_6 = -1; if (__pyx_t_15 < 0) { __pyx_t_15 += __pyx_pybuffernd_values.diminfo[0].shape; if (unlikely(__pyx_t_15 < 0)) __pyx_t_6 = 0; } else if (unlikely(__pyx_t_15 >= __pyx_pybuffernd_values.diminfo[0].shape)) __pyx_t_6 = 0; if (unlikely(__pyx_t_6 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_6); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 380; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_11 = __Pyx_PyInt_to_py_npy_int64((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_values.diminfo[0].strides))); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 380; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __pyx_t_3 = PyObject_RichCompare(__pyx_t_11, __pyx_v_val, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 380; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 380; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_1) { /* "pandas/index.pyx":381 * for i in range(n): * if values[i] == val: * count += 1 # <<<<<<<<<<<<<< * indexer[i] = 1 * last_true = i */ __pyx_v_count = (__pyx_v_count + 1); /* "pandas/index.pyx":382 * if values[i] == val: * count += 1 * indexer[i] = 1 # <<<<<<<<<<<<<< * last_true = i * else: */ __pyx_t_16 = __pyx_v_i; __pyx_t_6 = -1; if (__pyx_t_16 < 0) { __pyx_t_16 += __pyx_pybuffernd_indexer.diminfo[0].shape; if (unlikely(__pyx_t_16 < 0)) __pyx_t_6 = 0; } else if (unlikely(__pyx_t_16 >= __pyx_pybuffernd_indexer.diminfo[0].shape)) __pyx_t_6 = 0; if (unlikely(__pyx_t_6 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_6); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 382; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_indexer.diminfo[0].strides) = 1; /* "pandas/index.pyx":383 * count += 1 * indexer[i] = 1 * last_true = i # <<<<<<<<<<<<<< * else: * indexer[i] = 0 */ __pyx_v_last_true = __pyx_v_i; goto __pyx_L6; } /*else*/ { /* "pandas/index.pyx":385 * last_true = i * else: * indexer[i] = 0 # <<<<<<<<<<<<<< * * if count == 0: */ __pyx_t_17 = __pyx_v_i; __pyx_t_6 = -1; if (__pyx_t_17 < 0) { __pyx_t_17 += __pyx_pybuffernd_indexer.diminfo[0].shape; if (unlikely(__pyx_t_17 < 0)) __pyx_t_6 = 0; } else if (unlikely(__pyx_t_17 >= __pyx_pybuffernd_indexer.diminfo[0].shape)) __pyx_t_6 = 0; if (unlikely(__pyx_t_6 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_6); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 385; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_indexer.diminfo[0].strides) = 0; } __pyx_L6:; } /* "pandas/index.pyx":387 * indexer[i] = 0 * * if count == 0: # <<<<<<<<<<<<<< * raise KeyError(val) * if count == 1: */ __pyx_t_1 = ((__pyx_v_count == 0) != 0); if (__pyx_t_1) { /* "pandas/index.pyx":388 * * if count == 0: * raise KeyError(val) # <<<<<<<<<<<<<< * if count == 1: * return last_true */ __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 388; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_v_val); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_val); __Pyx_GIVEREF(__pyx_v_val); __pyx_t_11 = PyObject_Call(__pyx_builtin_KeyError, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 388; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; __Pyx_Raise(__pyx_t_11, 0, 0, 0); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 388; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L7; } __pyx_L7:; /* "pandas/index.pyx":389 * if count == 0: * raise KeyError(val) * if count == 1: # <<<<<<<<<<<<<< * return last_true * */ __pyx_t_1 = ((__pyx_v_count == 1) != 0); if (__pyx_t_1) { /* "pandas/index.pyx":390 * raise KeyError(val) * if count == 1: * return last_true # <<<<<<<<<<<<<< * * return result */ __Pyx_XDECREF(__pyx_r); __pyx_t_11 = PyInt_FromLong(__pyx_v_last_true); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 390; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __pyx_r = __pyx_t_11; __pyx_t_11 = 0; goto __pyx_L0; goto __pyx_L8; } __pyx_L8:; /* "pandas/index.pyx":392 * return last_true * * return result # <<<<<<<<<<<<<< * * cdef class Float64Engine(IndexEngine): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_result); __pyx_r = __pyx_v_result; goto __pyx_L0; __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_11); __Pyx_XDECREF(__pyx_t_12); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __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.index.Int64Engine._maybe_get_bool_indexer", __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_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_indexer); __Pyx_XDECREF((PyObject *)__pyx_v_values); __Pyx_XDECREF(__pyx_v_result); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/index.pyx":396 * cdef class Float64Engine(IndexEngine): * * cdef _make_hash_table(self, n): # <<<<<<<<<<<<<< * return _hash.Float64HashTable(n) * */ static PyObject *__pyx_f_6pandas_5index_13Float64Engine__make_hash_table(CYTHON_UNUSED struct __pyx_obj_6pandas_5index_Float64Engine *__pyx_v_self, PyObject *__pyx_v_n) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_make_hash_table", 0); /* "pandas/index.pyx":397 * * cdef _make_hash_table(self, n): * return _hash.Float64HashTable(n) # <<<<<<<<<<<<<< * * def _call_monotonic(self, values): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s___hash); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 397; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s__Float64HashTable); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 397; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 397; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_n); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_n); __Pyx_GIVEREF(__pyx_v_n); __pyx_t_3 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 397; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("pandas.index.Float64Engine._make_hash_table", __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_5index_13Float64Engine_1_call_monotonic(PyObject *__pyx_v_self, PyObject *__pyx_v_values); /*proto*/ static PyObject *__pyx_pw_6pandas_5index_13Float64Engine_1_call_monotonic(PyObject *__pyx_v_self, PyObject *__pyx_v_values) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_call_monotonic (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_5index_13Float64Engine__call_monotonic(((struct __pyx_obj_6pandas_5index_Float64Engine *)__pyx_v_self), ((PyObject *)__pyx_v_values)); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/index.pyx":399 * return _hash.Float64HashTable(n) * * def _call_monotonic(self, values): # <<<<<<<<<<<<<< * return algos.is_monotonic_float64(values) * */ static PyObject *__pyx_pf_6pandas_5index_13Float64Engine__call_monotonic(CYTHON_UNUSED struct __pyx_obj_6pandas_5index_Float64Engine *__pyx_v_self, PyObject *__pyx_v_values) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_call_monotonic", 0); /* "pandas/index.pyx":400 * * def _call_monotonic(self, values): * return algos.is_monotonic_float64(values) # <<<<<<<<<<<<<< * * def get_pad_indexer(self, other, limit=None): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__algos); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 400; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 400; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 400; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_values); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_values); __Pyx_GIVEREF(__pyx_v_values); __pyx_t_3 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 400; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("pandas.index.Float64Engine._call_monotonic", __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_5index_13Float64Engine_3get_pad_indexer(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_6pandas_5index_13Float64Engine_3get_pad_indexer(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_other = 0; PyObject *__pyx_v_limit = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("get_pad_indexer (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__other,&__pyx_n_s__limit,0}; PyObject* values[2] = {0,0}; /* "pandas/index.pyx":402 * return algos.is_monotonic_float64(values) * * def get_pad_indexer(self, other, limit=None): # <<<<<<<<<<<<<< * return algos.pad_float64(self._get_index_values(), other, * limit=limit) */ values[1] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__other)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__limit); if (value) { values[1] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "get_pad_indexer") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 402; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_other = values[0]; __pyx_v_limit = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("get_pad_indexer", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 402; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.index.Float64Engine.get_pad_indexer", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pandas_5index_13Float64Engine_2get_pad_indexer(((struct __pyx_obj_6pandas_5index_Float64Engine *)__pyx_v_self), __pyx_v_other, __pyx_v_limit); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5index_13Float64Engine_2get_pad_indexer(struct __pyx_obj_6pandas_5index_Float64Engine *__pyx_v_self, PyObject *__pyx_v_other, PyObject *__pyx_v_limit) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_pad_indexer", 0); /* "pandas/index.pyx":403 * * def get_pad_indexer(self, other, limit=None): * return algos.pad_float64(self._get_index_values(), other, # <<<<<<<<<<<<<< * limit=limit) * */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__algos); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 403; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s__pad_float64); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 403; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = ((struct __pyx_vtabstruct_6pandas_5index_Float64Engine *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base._get_index_values(((struct __pyx_obj_6pandas_5index_IndexEngine *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 403; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 403; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_other); PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_other); __Pyx_GIVEREF(__pyx_v_other); __pyx_t_1 = 0; __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 403; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_1)); /* "pandas/index.pyx":404 * def get_pad_indexer(self, other, limit=None): * return algos.pad_float64(self._get_index_values(), other, * limit=limit) # <<<<<<<<<<<<<< * * def get_backfill_indexer(self, other, limit=None): */ if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__limit), __pyx_v_limit) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 403; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_4 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_3), ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 403; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("pandas.index.Float64Engine.get_pad_indexer", __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_5index_13Float64Engine_5get_backfill_indexer(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_6pandas_5index_13Float64Engine_5get_backfill_indexer(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_other = 0; PyObject *__pyx_v_limit = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("get_backfill_indexer (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__other,&__pyx_n_s__limit,0}; PyObject* values[2] = {0,0}; /* "pandas/index.pyx":406 * limit=limit) * * def get_backfill_indexer(self, other, limit=None): # <<<<<<<<<<<<<< * return algos.backfill_float64(self._get_index_values(), other, * limit=limit) */ values[1] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__other)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__limit); if (value) { values[1] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "get_backfill_indexer") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 406; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_other = values[0]; __pyx_v_limit = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("get_backfill_indexer", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 406; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.index.Float64Engine.get_backfill_indexer", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pandas_5index_13Float64Engine_4get_backfill_indexer(((struct __pyx_obj_6pandas_5index_Float64Engine *)__pyx_v_self), __pyx_v_other, __pyx_v_limit); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5index_13Float64Engine_4get_backfill_indexer(struct __pyx_obj_6pandas_5index_Float64Engine *__pyx_v_self, PyObject *__pyx_v_other, PyObject *__pyx_v_limit) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_backfill_indexer", 0); /* "pandas/index.pyx":407 * * def get_backfill_indexer(self, other, limit=None): * return algos.backfill_float64(self._get_index_values(), other, # <<<<<<<<<<<<<< * limit=limit) * */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__algos); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 407; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s__backfill_float64); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 407; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = ((struct __pyx_vtabstruct_6pandas_5index_Float64Engine *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base._get_index_values(((struct __pyx_obj_6pandas_5index_IndexEngine *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 407; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 407; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_other); PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_other); __Pyx_GIVEREF(__pyx_v_other); __pyx_t_1 = 0; __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 407; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_1)); /* "pandas/index.pyx":408 * def get_backfill_indexer(self, other, limit=None): * return algos.backfill_float64(self._get_index_values(), other, * limit=limit) # <<<<<<<<<<<<<< * * */ if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__limit), __pyx_v_limit) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 407; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_4 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_3), ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 407; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("pandas.index.Float64Engine.get_backfill_indexer", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/index.pyx":411 * * * cdef Py_ssize_t _bin_search(ndarray values, object val) except -1: # <<<<<<<<<<<<<< * cdef: * Py_ssize_t mid, lo = 0, hi = len(values) - 1 */ static Py_ssize_t __pyx_f_6pandas_5index__bin_search(PyArrayObject *__pyx_v_values, PyObject *__pyx_v_val) { Py_ssize_t __pyx_v_mid; Py_ssize_t __pyx_v_lo; Py_ssize_t __pyx_v_hi; PyObject *__pyx_v_pval = 0; Py_ssize_t __pyx_r; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; int __pyx_t_5; int __pyx_t_6; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_bin_search", 0); /* "pandas/index.pyx":413 * cdef Py_ssize_t _bin_search(ndarray values, object val) except -1: * cdef: * Py_ssize_t mid, lo = 0, hi = len(values) - 1 # <<<<<<<<<<<<<< * object pval * */ __pyx_v_lo = 0; __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 413; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_hi = (__pyx_t_1 - 1); /* "pandas/index.pyx":416 * object pval * * if hi >= 0 and val > util.get_value_at(values, hi): # <<<<<<<<<<<<<< * return len(values) * */ __pyx_t_2 = (__pyx_v_hi >= 0); if (__pyx_t_2) { __pyx_t_3 = PyInt_FromSsize_t(__pyx_v_hi); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 416; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __pyx_f_4util_get_value_at(__pyx_v_values, __pyx_t_3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 416; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyObject_RichCompare(__pyx_v_val, __pyx_t_4, Py_GT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 416; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 416; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_6 = __pyx_t_5; } else { __pyx_t_6 = __pyx_t_2; } if (__pyx_t_6) { /* "pandas/index.pyx":417 * * if hi >= 0 and val > util.get_value_at(values, hi): * return len(values) # <<<<<<<<<<<<<< * * while lo < hi: */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 417; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_t_1; goto __pyx_L0; goto __pyx_L3; } __pyx_L3:; /* "pandas/index.pyx":419 * return len(values) * * while lo < hi: # <<<<<<<<<<<<<< * mid = (lo + hi) // 2 * pval = util.get_value_at(values, mid) */ while (1) { __pyx_t_6 = ((__pyx_v_lo < __pyx_v_hi) != 0); if (!__pyx_t_6) break; /* "pandas/index.pyx":420 * * while lo < hi: * mid = (lo + hi) // 2 # <<<<<<<<<<<<<< * pval = util.get_value_at(values, mid) * if val < pval: */ __pyx_v_mid = __Pyx_div_Py_ssize_t((__pyx_v_lo + __pyx_v_hi), 2); /* "pandas/index.pyx":421 * while lo < hi: * mid = (lo + hi) // 2 * pval = util.get_value_at(values, mid) # <<<<<<<<<<<<<< * if val < pval: * hi = mid */ __pyx_t_3 = PyInt_FromSsize_t(__pyx_v_mid); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 421; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __pyx_f_4util_get_value_at(__pyx_v_values, __pyx_t_3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 421; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF_SET(__pyx_v_pval, __pyx_t_4); __pyx_t_4 = 0; /* "pandas/index.pyx":422 * mid = (lo + hi) // 2 * pval = util.get_value_at(values, mid) * if val < pval: # <<<<<<<<<<<<<< * hi = mid * elif val > pval: */ __pyx_t_4 = PyObject_RichCompare(__pyx_v_val, __pyx_v_pval, Py_LT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 422; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 422; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_6) { /* "pandas/index.pyx":423 * pval = util.get_value_at(values, mid) * if val < pval: * hi = mid # <<<<<<<<<<<<<< * elif val > pval: * lo = mid + 1 */ __pyx_v_hi = __pyx_v_mid; goto __pyx_L6; } /* "pandas/index.pyx":424 * if val < pval: * hi = mid * elif val > pval: # <<<<<<<<<<<<<< * lo = mid + 1 * else: */ __pyx_t_4 = PyObject_RichCompare(__pyx_v_val, __pyx_v_pval, Py_GT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 424; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 424; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_6) { /* "pandas/index.pyx":425 * hi = mid * elif val > pval: * lo = mid + 1 # <<<<<<<<<<<<<< * else: * while mid > 0 and val == util.get_value_at(values, mid - 1): */ __pyx_v_lo = (__pyx_v_mid + 1); goto __pyx_L6; } /*else*/ { /* "pandas/index.pyx":427 * lo = mid + 1 * else: * while mid > 0 and val == util.get_value_at(values, mid - 1): # <<<<<<<<<<<<<< * mid -= 1 * return mid */ while (1) { __pyx_t_6 = (__pyx_v_mid > 0); if (__pyx_t_6) { __pyx_t_4 = PyInt_FromSsize_t((__pyx_v_mid - 1)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 427; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = __pyx_f_4util_get_value_at(__pyx_v_values, __pyx_t_4); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 427; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyObject_RichCompare(__pyx_v_val, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 427; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 427; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_5 = __pyx_t_2; } else { __pyx_t_5 = __pyx_t_6; } if (!__pyx_t_5) break; /* "pandas/index.pyx":428 * else: * while mid > 0 and val == util.get_value_at(values, mid - 1): * mid -= 1 # <<<<<<<<<<<<<< * return mid * */ __pyx_v_mid = (__pyx_v_mid - 1); } /* "pandas/index.pyx":429 * while mid > 0 and val == util.get_value_at(values, mid - 1): * mid -= 1 * return mid # <<<<<<<<<<<<<< * * if val <= util.get_value_at(values, mid): */ __pyx_r = __pyx_v_mid; goto __pyx_L0; } __pyx_L6:; } /* "pandas/index.pyx":431 * return mid * * if val <= util.get_value_at(values, mid): # <<<<<<<<<<<<<< * return mid * else: */ __pyx_t_4 = PyInt_FromSsize_t(__pyx_v_mid); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 431; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = __pyx_f_4util_get_value_at(__pyx_v_values, __pyx_t_4); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 431; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyObject_RichCompare(__pyx_v_val, __pyx_t_3, Py_LE); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 431; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 431; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_5) { /* "pandas/index.pyx":432 * * if val <= util.get_value_at(values, mid): * return mid # <<<<<<<<<<<<<< * else: * return mid + 1 */ __pyx_r = __pyx_v_mid; goto __pyx_L0; goto __pyx_L9; } /*else*/ { /* "pandas/index.pyx":434 * return mid * else: * return mid + 1 # <<<<<<<<<<<<<< * * _pad_functions = { */ __pyx_r = (__pyx_v_mid + 1); goto __pyx_L0; } __pyx_L9:; __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("pandas.index._bin_search", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_XDECREF(__pyx_v_pval); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/index.pyx":450 * cdef class ObjectEngine(IndexEngine): * * cdef _make_hash_table(self, n): # <<<<<<<<<<<<<< * return _hash.PyObjectHashTable(n) * */ static PyObject *__pyx_f_6pandas_5index_12ObjectEngine__make_hash_table(CYTHON_UNUSED struct __pyx_obj_6pandas_5index_ObjectEngine *__pyx_v_self, PyObject *__pyx_v_n) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_make_hash_table", 0); /* "pandas/index.pyx":451 * * cdef _make_hash_table(self, n): * return _hash.PyObjectHashTable(n) # <<<<<<<<<<<<<< * * def _call_monotonic(self, values): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s___hash); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 451; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s__PyObjectHashTable); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 451; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 451; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_n); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_n); __Pyx_GIVEREF(__pyx_v_n); __pyx_t_3 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 451; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("pandas.index.ObjectEngine._make_hash_table", __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_5index_12ObjectEngine_1_call_monotonic(PyObject *__pyx_v_self, PyObject *__pyx_v_values); /*proto*/ static PyObject *__pyx_pw_6pandas_5index_12ObjectEngine_1_call_monotonic(PyObject *__pyx_v_self, PyObject *__pyx_v_values) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_call_monotonic (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_5index_12ObjectEngine__call_monotonic(((struct __pyx_obj_6pandas_5index_ObjectEngine *)__pyx_v_self), ((PyObject *)__pyx_v_values)); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/index.pyx":453 * return _hash.PyObjectHashTable(n) * * def _call_monotonic(self, values): # <<<<<<<<<<<<<< * return algos.is_monotonic_object(values) * */ static PyObject *__pyx_pf_6pandas_5index_12ObjectEngine__call_monotonic(CYTHON_UNUSED struct __pyx_obj_6pandas_5index_ObjectEngine *__pyx_v_self, PyObject *__pyx_v_values) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_call_monotonic", 0); /* "pandas/index.pyx":454 * * def _call_monotonic(self, values): * return algos.is_monotonic_object(values) # <<<<<<<<<<<<<< * * def get_pad_indexer(self, other, limit=None): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__algos); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 454; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s__is_monotonic_object); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 454; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 454; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_values); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_values); __Pyx_GIVEREF(__pyx_v_values); __pyx_t_3 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 454; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("pandas.index.ObjectEngine._call_monotonic", __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_5index_12ObjectEngine_3get_pad_indexer(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_6pandas_5index_12ObjectEngine_3get_pad_indexer(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_other = 0; PyObject *__pyx_v_limit = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("get_pad_indexer (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__other,&__pyx_n_s__limit,0}; PyObject* values[2] = {0,0}; /* "pandas/index.pyx":456 * return algos.is_monotonic_object(values) * * def get_pad_indexer(self, other, limit=None): # <<<<<<<<<<<<<< * return algos.pad_object(self._get_index_values(), other, * limit=limit) */ values[1] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__other)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__limit); if (value) { values[1] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "get_pad_indexer") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 456; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_other = values[0]; __pyx_v_limit = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("get_pad_indexer", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 456; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.index.ObjectEngine.get_pad_indexer", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pandas_5index_12ObjectEngine_2get_pad_indexer(((struct __pyx_obj_6pandas_5index_ObjectEngine *)__pyx_v_self), __pyx_v_other, __pyx_v_limit); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5index_12ObjectEngine_2get_pad_indexer(struct __pyx_obj_6pandas_5index_ObjectEngine *__pyx_v_self, PyObject *__pyx_v_other, PyObject *__pyx_v_limit) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_pad_indexer", 0); /* "pandas/index.pyx":457 * * def get_pad_indexer(self, other, limit=None): * return algos.pad_object(self._get_index_values(), other, # <<<<<<<<<<<<<< * limit=limit) * */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__algos); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 457; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s__pad_object); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 457; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = ((struct __pyx_vtabstruct_6pandas_5index_ObjectEngine *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base._get_index_values(((struct __pyx_obj_6pandas_5index_IndexEngine *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 457; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 457; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_other); PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_other); __Pyx_GIVEREF(__pyx_v_other); __pyx_t_1 = 0; __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 457; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_1)); /* "pandas/index.pyx":458 * def get_pad_indexer(self, other, limit=None): * return algos.pad_object(self._get_index_values(), other, * limit=limit) # <<<<<<<<<<<<<< * * def get_backfill_indexer(self, other, limit=None): */ if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__limit), __pyx_v_limit) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 457; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_4 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_3), ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 457; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("pandas.index.ObjectEngine.get_pad_indexer", __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_5index_12ObjectEngine_5get_backfill_indexer(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_6pandas_5index_12ObjectEngine_5get_backfill_indexer(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_other = 0; PyObject *__pyx_v_limit = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("get_backfill_indexer (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__other,&__pyx_n_s__limit,0}; PyObject* values[2] = {0,0}; /* "pandas/index.pyx":460 * limit=limit) * * def get_backfill_indexer(self, other, limit=None): # <<<<<<<<<<<<<< * return algos.backfill_object(self._get_index_values(), other, * limit=limit) */ values[1] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__other)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__limit); if (value) { values[1] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "get_backfill_indexer") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 460; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_other = values[0]; __pyx_v_limit = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("get_backfill_indexer", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 460; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.index.ObjectEngine.get_backfill_indexer", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pandas_5index_12ObjectEngine_4get_backfill_indexer(((struct __pyx_obj_6pandas_5index_ObjectEngine *)__pyx_v_self), __pyx_v_other, __pyx_v_limit); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5index_12ObjectEngine_4get_backfill_indexer(struct __pyx_obj_6pandas_5index_ObjectEngine *__pyx_v_self, PyObject *__pyx_v_other, PyObject *__pyx_v_limit) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_backfill_indexer", 0); /* "pandas/index.pyx":461 * * def get_backfill_indexer(self, other, limit=None): * return algos.backfill_object(self._get_index_values(), other, # <<<<<<<<<<<<<< * limit=limit) * */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__algos); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 461; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s__backfill_object); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 461; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = ((struct __pyx_vtabstruct_6pandas_5index_ObjectEngine *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base._get_index_values(((struct __pyx_obj_6pandas_5index_IndexEngine *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 461; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 461; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_other); PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_other); __Pyx_GIVEREF(__pyx_v_other); __pyx_t_1 = 0; __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 461; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_1)); /* "pandas/index.pyx":462 * def get_backfill_indexer(self, other, limit=None): * return algos.backfill_object(self._get_index_values(), other, * limit=limit) # <<<<<<<<<<<<<< * * */ if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__limit), __pyx_v_limit) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 461; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_4 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_3), ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 461; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("pandas.index.ObjectEngine.get_backfill_indexer", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6pandas_5index_14DatetimeEngine_1__contains__(PyObject *__pyx_v_self, PyObject *__pyx_v_val); /*proto*/ static int __pyx_pw_6pandas_5index_14DatetimeEngine_1__contains__(PyObject *__pyx_v_self, PyObject *__pyx_v_val) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__contains__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_5index_14DatetimeEngine___contains__(((struct __pyx_obj_6pandas_5index_DatetimeEngine *)__pyx_v_self), ((PyObject *)__pyx_v_val)); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/index.pyx":467 * cdef class DatetimeEngine(Int64Engine): * * def __contains__(self, object val): # <<<<<<<<<<<<<< * if self.over_size_threshold and self.is_monotonic: * if not self.is_unique: */ static int __pyx_pf_6pandas_5index_14DatetimeEngine___contains__(struct __pyx_obj_6pandas_5index_DatetimeEngine *__pyx_v_self, PyObject *__pyx_v_val) { PyObject *__pyx_v_values = NULL; PyObject *__pyx_v_conv = NULL; PyObject *__pyx_v_loc = NULL; int __pyx_r; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; int __pyx_t_3; int __pyx_t_4; int __pyx_t_5; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__contains__", 0); /* "pandas/index.pyx":468 * * def __contains__(self, object val): * if self.over_size_threshold and self.is_monotonic: # <<<<<<<<<<<<<< * if not self.is_unique: * return self._get_loc_duplicates(val) */ __pyx_t_1 = __pyx_v_self->__pyx_base.__pyx_base.over_size_threshold; if (__pyx_t_1) { __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s__is_monotonic); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 468; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 468; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_4 = __pyx_t_3; } else { __pyx_t_4 = __pyx_t_1; } if (__pyx_t_4) { /* "pandas/index.pyx":469 * def __contains__(self, object val): * if self.over_size_threshold and self.is_monotonic: * if not self.is_unique: # <<<<<<<<<<<<<< * return self._get_loc_duplicates(val) * values = self._get_index_values() */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s__is_unique); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 469; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 469; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_1 = ((!__pyx_t_4) != 0); if (__pyx_t_1) { /* "pandas/index.pyx":470 * if self.over_size_threshold and self.is_monotonic: * if not self.is_unique: * return self._get_loc_duplicates(val) # <<<<<<<<<<<<<< * values = self._get_index_values() * conv = _to_i8(val) */ __pyx_t_2 = __pyx_f_6pandas_5index_11IndexEngine__get_loc_duplicates(((struct __pyx_obj_6pandas_5index_IndexEngine *)__pyx_v_self), __pyx_v_val); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 470; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = __Pyx_PyInt_AsInt(__pyx_t_2); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 470; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_5; goto __pyx_L0; goto __pyx_L4; } __pyx_L4:; /* "pandas/index.pyx":471 * if not self.is_unique: * return self._get_loc_duplicates(val) * values = self._get_index_values() # <<<<<<<<<<<<<< * conv = _to_i8(val) * loc = values.searchsorted(conv, side='left') */ __pyx_t_2 = ((struct __pyx_vtabstruct_6pandas_5index_DatetimeEngine *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base._get_index_values(((struct __pyx_obj_6pandas_5index_IndexEngine *)__pyx_v_self)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 471; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_v_values = __pyx_t_2; __pyx_t_2 = 0; /* "pandas/index.pyx":472 * return self._get_loc_duplicates(val) * values = self._get_index_values() * conv = _to_i8(val) # <<<<<<<<<<<<<< * loc = values.searchsorted(conv, side='left') * return util.get_value_at(values, loc) == conv */ __pyx_t_2 = __pyx_f_6pandas_5index__to_i8(__pyx_v_val); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 472; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_v_conv = __pyx_t_2; __pyx_t_2 = 0; /* "pandas/index.pyx":473 * values = self._get_index_values() * conv = _to_i8(val) * loc = values.searchsorted(conv, side='left') # <<<<<<<<<<<<<< * return util.get_value_at(values, loc) == conv * */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_values, __pyx_n_s__searchsorted); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 473; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 473; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(__pyx_v_conv); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_conv); __Pyx_GIVEREF(__pyx_v_conv); __pyx_t_7 = PyDict_New(); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 473; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_7)); if (PyDict_SetItem(__pyx_t_7, ((PyObject *)__pyx_n_s__side), ((PyObject *)__pyx_n_s__left)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 473; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_8 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_6), ((PyObject *)__pyx_t_7)); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 473; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0; __pyx_v_loc = __pyx_t_8; __pyx_t_8 = 0; /* "pandas/index.pyx":474 * conv = _to_i8(val) * loc = values.searchsorted(conv, side='left') * return util.get_value_at(values, loc) == conv # <<<<<<<<<<<<<< * * self._ensure_mapping_populated() */ if (!(likely(((__pyx_v_values) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_values, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 474; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_8 = __pyx_f_4util_get_value_at(((PyArrayObject *)__pyx_v_values), __pyx_v_loc); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 474; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_7 = PyObject_RichCompare(__pyx_t_8, __pyx_v_conv, Py_EQ); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 474; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_5 = __Pyx_PyInt_AsInt(__pyx_t_7); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 474; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_r = __pyx_t_5; goto __pyx_L0; goto __pyx_L3; } __pyx_L3:; /* "pandas/index.pyx":476 * return util.get_value_at(values, loc) == conv * * self._ensure_mapping_populated() # <<<<<<<<<<<<<< * return _to_i8(val) in self.mapping * */ __pyx_t_7 = __pyx_f_6pandas_5index_11IndexEngine__ensure_mapping_populated(((struct __pyx_obj_6pandas_5index_IndexEngine *)__pyx_v_self)); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 476; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; /* "pandas/index.pyx":477 * * self._ensure_mapping_populated() * return _to_i8(val) in self.mapping # <<<<<<<<<<<<<< * * cdef _get_index_values(self): */ __pyx_t_7 = __pyx_f_6pandas_5index__to_i8(__pyx_v_val); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 477; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_t_1 = (__Pyx_PySequence_Contains(__pyx_t_7, ((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.mapping), Py_EQ)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 477; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_r = __pyx_t_1; goto __pyx_L0; __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_AddTraceback("pandas.index.DatetimeEngine.__contains__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_XDECREF(__pyx_v_values); __Pyx_XDECREF(__pyx_v_conv); __Pyx_XDECREF(__pyx_v_loc); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/index.pyx":479 * return _to_i8(val) in self.mapping * * cdef _get_index_values(self): # <<<<<<<<<<<<<< * return self.vgetter().view('i8') * */ static PyObject *__pyx_f_6pandas_5index_14DatetimeEngine__get_index_values(struct __pyx_obj_6pandas_5index_DatetimeEngine *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_get_index_values", 0); /* "pandas/index.pyx":480 * * cdef _get_index_values(self): * return self.vgetter().view('i8') # <<<<<<<<<<<<<< * * def _call_monotonic(self, values): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyObject_Call(__pyx_v_self->__pyx_base.__pyx_base.vgetter, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 480; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s__view); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 480; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_k_tuple_2), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 480; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("pandas.index.DatetimeEngine._get_index_values", __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_5index_14DatetimeEngine_3_call_monotonic(PyObject *__pyx_v_self, PyObject *__pyx_v_values); /*proto*/ static PyObject *__pyx_pw_6pandas_5index_14DatetimeEngine_3_call_monotonic(PyObject *__pyx_v_self, PyObject *__pyx_v_values) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_call_monotonic (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_5index_14DatetimeEngine_2_call_monotonic(((struct __pyx_obj_6pandas_5index_DatetimeEngine *)__pyx_v_self), ((PyObject *)__pyx_v_values)); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/index.pyx":482 * return self.vgetter().view('i8') * * def _call_monotonic(self, values): # <<<<<<<<<<<<<< * return algos.is_monotonic_int64(values) * */ static PyObject *__pyx_pf_6pandas_5index_14DatetimeEngine_2_call_monotonic(CYTHON_UNUSED struct __pyx_obj_6pandas_5index_DatetimeEngine *__pyx_v_self, PyObject *__pyx_v_values) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_call_monotonic", 0); /* "pandas/index.pyx":483 * * def _call_monotonic(self, values): * return algos.is_monotonic_int64(values) # <<<<<<<<<<<<<< * * cpdef get_loc(self, object val): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__algos); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 483; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s__is_monotonic_int64); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 483; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 483; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_values); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_values); __Pyx_GIVEREF(__pyx_v_values); __pyx_t_3 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 483; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("pandas.index.DatetimeEngine._call_monotonic", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/index.pyx":485 * return algos.is_monotonic_int64(values) * * cpdef get_loc(self, object val): # <<<<<<<<<<<<<< * if is_definitely_invalid_key(val): * raise TypeError */ static PyObject *__pyx_pw_6pandas_5index_14DatetimeEngine_5get_loc(PyObject *__pyx_v_self, PyObject *__pyx_v_val); /*proto*/ static PyObject *__pyx_f_6pandas_5index_14DatetimeEngine_get_loc(struct __pyx_obj_6pandas_5index_DatetimeEngine *__pyx_v_self, PyObject *__pyx_v_val, int __pyx_skip_dispatch) { PyObject *__pyx_v_values = NULL; PyObject *__pyx_v_conv = NULL; PyObject *__pyx_v_loc = 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; PyObject *__pyx_t_7 = NULL; Py_ssize_t __pyx_t_8; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; PyObject *__pyx_t_11 = NULL; int __pyx_t_12; PyObject *__pyx_t_13 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_loc", 0); __Pyx_INCREF(__pyx_v_val); /* 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__get_loc); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 485; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_6pandas_5index_14DatetimeEngine_5get_loc)) { __Pyx_XDECREF(__pyx_r); __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 485; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_val); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_val); __Pyx_GIVEREF(__pyx_v_val); __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 485; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __pyx_r = __pyx_t_3; __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } /* "pandas/index.pyx":486 * * cpdef get_loc(self, object val): * if is_definitely_invalid_key(val): # <<<<<<<<<<<<<< * raise TypeError * */ __pyx_t_1 = __pyx_f_6pandas_5index_is_definitely_invalid_key(__pyx_v_val); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 486; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 486; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_4) { /* "pandas/index.pyx":487 * cpdef get_loc(self, object val): * if is_definitely_invalid_key(val): * raise TypeError # <<<<<<<<<<<<<< * * # Welcome to the spaghetti factory */ __Pyx_Raise(__pyx_builtin_TypeError, 0, 0, 0); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 487; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L3; } __pyx_L3:; /* "pandas/index.pyx":491 * # Welcome to the spaghetti factory * * if self.over_size_threshold and self.is_monotonic: # <<<<<<<<<<<<<< * if not self.is_unique: * val = _to_i8(val) */ __pyx_t_4 = __pyx_v_self->__pyx_base.__pyx_base.over_size_threshold; if (__pyx_t_4) { __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s__is_monotonic); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 491; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 491; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_6 = __pyx_t_5; } else { __pyx_t_6 = __pyx_t_4; } if (__pyx_t_6) { /* "pandas/index.pyx":492 * * if self.over_size_threshold and self.is_monotonic: * if not self.is_unique: # <<<<<<<<<<<<<< * val = _to_i8(val) * return self._get_loc_duplicates(val) */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s__is_unique); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 492; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 492; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_4 = ((!__pyx_t_6) != 0); if (__pyx_t_4) { /* "pandas/index.pyx":493 * if self.over_size_threshold and self.is_monotonic: * if not self.is_unique: * val = _to_i8(val) # <<<<<<<<<<<<<< * return self._get_loc_duplicates(val) * values = self._get_index_values() */ __pyx_t_1 = __pyx_f_6pandas_5index__to_i8(__pyx_v_val); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 493; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF_SET(__pyx_v_val, __pyx_t_1); __pyx_t_1 = 0; /* "pandas/index.pyx":494 * if not self.is_unique: * val = _to_i8(val) * return self._get_loc_duplicates(val) # <<<<<<<<<<<<<< * values = self._get_index_values() * conv = _to_i8(val) */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_6pandas_5index_11IndexEngine__get_loc_duplicates(((struct __pyx_obj_6pandas_5index_IndexEngine *)__pyx_v_self), __pyx_v_val); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 494; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; goto __pyx_L5; } __pyx_L5:; /* "pandas/index.pyx":495 * val = _to_i8(val) * return self._get_loc_duplicates(val) * values = self._get_index_values() # <<<<<<<<<<<<<< * conv = _to_i8(val) * loc = values.searchsorted(conv, side='left') */ __pyx_t_1 = ((struct __pyx_vtabstruct_6pandas_5index_DatetimeEngine *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base._get_index_values(((struct __pyx_obj_6pandas_5index_IndexEngine *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 495; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_v_values = __pyx_t_1; __pyx_t_1 = 0; /* "pandas/index.pyx":496 * return self._get_loc_duplicates(val) * values = self._get_index_values() * conv = _to_i8(val) # <<<<<<<<<<<<<< * loc = values.searchsorted(conv, side='left') * if loc == len(values) or util.get_value_at(values, loc) != conv: */ __pyx_t_1 = __pyx_f_6pandas_5index__to_i8(__pyx_v_val); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 496; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_v_conv = __pyx_t_1; __pyx_t_1 = 0; /* "pandas/index.pyx":497 * values = self._get_index_values() * conv = _to_i8(val) * loc = values.searchsorted(conv, side='left') # <<<<<<<<<<<<<< * if loc == len(values) or util.get_value_at(values, loc) != conv: * raise KeyError(val) */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_values, __pyx_n_s__searchsorted); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 497; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 497; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_v_conv); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_conv); __Pyx_GIVEREF(__pyx_v_conv); __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 497; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_2)); if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__side), ((PyObject *)__pyx_n_s__left)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 497; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_7 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_3), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 497; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __pyx_v_loc = __pyx_t_7; __pyx_t_7 = 0; /* "pandas/index.pyx":498 * conv = _to_i8(val) * loc = values.searchsorted(conv, side='left') * if loc == len(values) or util.get_value_at(values, loc) != conv: # <<<<<<<<<<<<<< * raise KeyError(val) * return loc */ __pyx_t_8 = PyObject_Length(__pyx_v_values); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 498; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_7 = PyInt_FromSsize_t(__pyx_t_8); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 498; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_t_2 = PyObject_RichCompare(__pyx_v_loc, __pyx_t_7, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 498; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 498; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (!__pyx_t_4) { if (!(likely(((__pyx_v_values) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_values, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 498; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_2 = __pyx_f_4util_get_value_at(((PyArrayObject *)__pyx_v_values), __pyx_v_loc); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 498; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_7 = PyObject_RichCompare(__pyx_t_2, __pyx_v_conv, Py_NE); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 498; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 498; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_5 = __pyx_t_6; } else { __pyx_t_5 = __pyx_t_4; } if (__pyx_t_5) { /* "pandas/index.pyx":499 * loc = values.searchsorted(conv, side='left') * if loc == len(values) or util.get_value_at(values, loc) != conv: * raise KeyError(val) # <<<<<<<<<<<<<< * return loc * */ __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 499; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_INCREF(__pyx_v_val); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_v_val); __Pyx_GIVEREF(__pyx_v_val); __pyx_t_2 = PyObject_Call(__pyx_builtin_KeyError, ((PyObject *)__pyx_t_7), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 499; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0; __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 499; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L6; } __pyx_L6:; /* "pandas/index.pyx":500 * if loc == len(values) or util.get_value_at(values, loc) != conv: * raise KeyError(val) * return loc # <<<<<<<<<<<<<< * * self._ensure_mapping_populated() */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_loc); __pyx_r = __pyx_v_loc; goto __pyx_L0; goto __pyx_L4; } __pyx_L4:; /* "pandas/index.pyx":502 * return loc * * self._ensure_mapping_populated() # <<<<<<<<<<<<<< * if not self.unique: * val = _to_i8(val) */ __pyx_t_2 = __pyx_f_6pandas_5index_11IndexEngine__ensure_mapping_populated(((struct __pyx_obj_6pandas_5index_IndexEngine *)__pyx_v_self)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 502; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/index.pyx":503 * * self._ensure_mapping_populated() * if not self.unique: # <<<<<<<<<<<<<< * val = _to_i8(val) * return self._get_loc_duplicates(val) */ __pyx_t_5 = ((!(__pyx_v_self->__pyx_base.__pyx_base.unique != 0)) != 0); if (__pyx_t_5) { /* "pandas/index.pyx":504 * self._ensure_mapping_populated() * if not self.unique: * val = _to_i8(val) # <<<<<<<<<<<<<< * return self._get_loc_duplicates(val) * */ __pyx_t_2 = __pyx_f_6pandas_5index__to_i8(__pyx_v_val); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 504; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF_SET(__pyx_v_val, __pyx_t_2); __pyx_t_2 = 0; /* "pandas/index.pyx":505 * if not self.unique: * val = _to_i8(val) * return self._get_loc_duplicates(val) # <<<<<<<<<<<<<< * * try: */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __pyx_f_6pandas_5index_11IndexEngine__get_loc_duplicates(((struct __pyx_obj_6pandas_5index_IndexEngine *)__pyx_v_self), __pyx_v_val); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 505; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; goto __pyx_L7; } __pyx_L7:; /* "pandas/index.pyx":507 * return self._get_loc_duplicates(val) * * try: # <<<<<<<<<<<<<< * return self.mapping.get_item(val.value) * except KeyError: */ { __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11); __Pyx_XGOTREF(__pyx_t_9); __Pyx_XGOTREF(__pyx_t_10); __Pyx_XGOTREF(__pyx_t_11); /*try:*/ { /* "pandas/index.pyx":508 * * try: * return self.mapping.get_item(val.value) # <<<<<<<<<<<<<< * except KeyError: * raise KeyError(val) */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.mapping), __pyx_n_s__get_item); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 508; __pyx_clineno = __LINE__; goto __pyx_L8_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_val, __pyx_n_s__value); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 508; __pyx_clineno = __LINE__; goto __pyx_L8_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 508; __pyx_clineno = __LINE__; goto __pyx_L8_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_7); __Pyx_GIVEREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_7 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 508; __pyx_clineno = __LINE__; goto __pyx_L8_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; __pyx_r = __pyx_t_7; __pyx_t_7 = 0; goto __pyx_L12_try_return; } __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; goto __pyx_L15_try_end; __pyx_L12_try_return:; __Pyx_XGIVEREF(__pyx_t_9); __Pyx_XGIVEREF(__pyx_t_10); __Pyx_XGIVEREF(__pyx_t_11); __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_10, __pyx_t_11); goto __pyx_L0; __pyx_L8_error:; __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; __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; /* "pandas/index.pyx":509 * try: * return self.mapping.get_item(val.value) * except KeyError: # <<<<<<<<<<<<<< * raise KeyError(val) * except AttributeError: */ __pyx_t_12 = PyErr_ExceptionMatches(__pyx_builtin_KeyError); if (__pyx_t_12) { __Pyx_AddTraceback("pandas.index.DatetimeEngine.get_loc", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_7, &__pyx_t_3, &__pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 509; __pyx_clineno = __LINE__; goto __pyx_L10_except_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_GOTREF(__pyx_t_3); __Pyx_GOTREF(__pyx_t_2); /* "pandas/index.pyx":510 * return self.mapping.get_item(val.value) * except KeyError: * raise KeyError(val) # <<<<<<<<<<<<<< * except AttributeError: * pass */ __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 510; __pyx_clineno = __LINE__; goto __pyx_L10_except_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_val); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_val); __Pyx_GIVEREF(__pyx_v_val); __pyx_t_13 = PyObject_Call(__pyx_builtin_KeyError, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 510; __pyx_clineno = __LINE__; goto __pyx_L10_except_error;} __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __Pyx_Raise(__pyx_t_13, 0, 0, 0); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 510; __pyx_clineno = __LINE__; goto __pyx_L10_except_error;} __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; goto __pyx_L9_exception_handled; } /* "pandas/index.pyx":511 * except KeyError: * raise KeyError(val) * except AttributeError: # <<<<<<<<<<<<<< * pass * */ __pyx_t_12 = PyErr_ExceptionMatches(__pyx_builtin_AttributeError); if (__pyx_t_12) { PyErr_Restore(0,0,0); goto __pyx_L9_exception_handled; } __pyx_L10_except_error:; __Pyx_XGIVEREF(__pyx_t_9); __Pyx_XGIVEREF(__pyx_t_10); __Pyx_XGIVEREF(__pyx_t_11); __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_10, __pyx_t_11); goto __pyx_L1_error; __pyx_L9_exception_handled:; __Pyx_XGIVEREF(__pyx_t_9); __Pyx_XGIVEREF(__pyx_t_10); __Pyx_XGIVEREF(__pyx_t_11); __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_10, __pyx_t_11); __pyx_L15_try_end:; } /* "pandas/index.pyx":514 * pass * * try: # <<<<<<<<<<<<<< * val = _to_i8(val) * return self.mapping.get_item(val) */ { __Pyx_ExceptionSave(&__pyx_t_11, &__pyx_t_10, &__pyx_t_9); __Pyx_XGOTREF(__pyx_t_11); __Pyx_XGOTREF(__pyx_t_10); __Pyx_XGOTREF(__pyx_t_9); /*try:*/ { /* "pandas/index.pyx":515 * * try: * val = _to_i8(val) # <<<<<<<<<<<<<< * return self.mapping.get_item(val) * except TypeError: */ __pyx_t_2 = __pyx_f_6pandas_5index__to_i8(__pyx_v_val); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 515; __pyx_clineno = __LINE__; goto __pyx_L18_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF_SET(__pyx_v_val, __pyx_t_2); __pyx_t_2 = 0; /* "pandas/index.pyx":516 * try: * val = _to_i8(val) * return self.mapping.get_item(val) # <<<<<<<<<<<<<< * except TypeError: * self._date_check_type(val) */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.mapping), __pyx_n_s__get_item); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 516; __pyx_clineno = __LINE__; goto __pyx_L18_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 516; __pyx_clineno = __LINE__; goto __pyx_L18_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_v_val); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_val); __Pyx_GIVEREF(__pyx_v_val); __pyx_t_7 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 516; __pyx_clineno = __LINE__; goto __pyx_L18_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; __pyx_r = __pyx_t_7; __pyx_t_7 = 0; goto __pyx_L22_try_return; } __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; goto __pyx_L25_try_end; __pyx_L22_try_return:; __Pyx_XGIVEREF(__pyx_t_11); __Pyx_XGIVEREF(__pyx_t_10); __Pyx_XGIVEREF(__pyx_t_9); __Pyx_ExceptionReset(__pyx_t_11, __pyx_t_10, __pyx_t_9); goto __pyx_L0; __pyx_L18_error:; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; /* "pandas/index.pyx":517 * val = _to_i8(val) * return self.mapping.get_item(val) * except TypeError: # <<<<<<<<<<<<<< * self._date_check_type(val) * raise KeyError(val) */ __pyx_t_12 = PyErr_ExceptionMatches(__pyx_builtin_TypeError); if (__pyx_t_12) { __Pyx_AddTraceback("pandas.index.DatetimeEngine.get_loc", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_7, &__pyx_t_3, &__pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 517; __pyx_clineno = __LINE__; goto __pyx_L20_except_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_GOTREF(__pyx_t_3); __Pyx_GOTREF(__pyx_t_2); /* "pandas/index.pyx":518 * return self.mapping.get_item(val) * except TypeError: * self._date_check_type(val) # <<<<<<<<<<<<<< * raise KeyError(val) * */ __pyx_t_13 = __pyx_f_6pandas_5index_14DatetimeEngine__date_check_type(__pyx_v_self, __pyx_v_val); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 518; __pyx_clineno = __LINE__; goto __pyx_L20_except_error;} __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; /* "pandas/index.pyx":519 * except TypeError: * self._date_check_type(val) * raise KeyError(val) # <<<<<<<<<<<<<< * * cdef inline _date_check_type(self, object val): */ __pyx_t_13 = PyTuple_New(1); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 519; __pyx_clineno = __LINE__; goto __pyx_L20_except_error;} __Pyx_GOTREF(__pyx_t_13); __Pyx_INCREF(__pyx_v_val); PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_v_val); __Pyx_GIVEREF(__pyx_v_val); __pyx_t_1 = PyObject_Call(__pyx_builtin_KeyError, ((PyObject *)__pyx_t_13), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 519; __pyx_clineno = __LINE__; goto __pyx_L20_except_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(((PyObject *)__pyx_t_13)); __pyx_t_13 = 0; __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 519; __pyx_clineno = __LINE__; goto __pyx_L20_except_error;} __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; goto __pyx_L19_exception_handled; } __pyx_L20_except_error:; __Pyx_XGIVEREF(__pyx_t_11); __Pyx_XGIVEREF(__pyx_t_10); __Pyx_XGIVEREF(__pyx_t_9); __Pyx_ExceptionReset(__pyx_t_11, __pyx_t_10, __pyx_t_9); goto __pyx_L1_error; __pyx_L19_exception_handled:; __Pyx_XGIVEREF(__pyx_t_11); __Pyx_XGIVEREF(__pyx_t_10); __Pyx_XGIVEREF(__pyx_t_9); __Pyx_ExceptionReset(__pyx_t_11, __pyx_t_10, __pyx_t_9); __pyx_L25_try_end:; } __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_13); __Pyx_AddTraceback("pandas.index.DatetimeEngine.get_loc", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_values); __Pyx_XDECREF(__pyx_v_conv); __Pyx_XDECREF(__pyx_v_loc); __Pyx_XDECREF(__pyx_v_val); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5index_14DatetimeEngine_5get_loc(PyObject *__pyx_v_self, PyObject *__pyx_v_val); /*proto*/ static PyObject *__pyx_pw_6pandas_5index_14DatetimeEngine_5get_loc(PyObject *__pyx_v_self, PyObject *__pyx_v_val) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("get_loc (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_5index_14DatetimeEngine_4get_loc(((struct __pyx_obj_6pandas_5index_DatetimeEngine *)__pyx_v_self), ((PyObject *)__pyx_v_val)); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/index.pyx":485 * return algos.is_monotonic_int64(values) * * cpdef get_loc(self, object val): # <<<<<<<<<<<<<< * if is_definitely_invalid_key(val): * raise TypeError */ static PyObject *__pyx_pf_6pandas_5index_14DatetimeEngine_4get_loc(struct __pyx_obj_6pandas_5index_DatetimeEngine *__pyx_v_self, PyObject *__pyx_v_val) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_loc", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = ((struct __pyx_vtabstruct_6pandas_5index_DatetimeEngine *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.get_loc(((struct __pyx_obj_6pandas_5index_IndexEngine *)__pyx_v_self), __pyx_v_val, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 485; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas.index.DatetimeEngine.get_loc", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/index.pyx":521 * raise KeyError(val) * * cdef inline _date_check_type(self, object val): # <<<<<<<<<<<<<< * hash(val) * if not util.is_integer_object(val): */ static CYTHON_INLINE PyObject *__pyx_f_6pandas_5index_14DatetimeEngine__date_check_type(CYTHON_UNUSED struct __pyx_obj_6pandas_5index_DatetimeEngine *__pyx_v_self, PyObject *__pyx_v_val) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_hash_t __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_date_check_type", 0); /* "pandas/index.pyx":522 * * cdef inline _date_check_type(self, object val): * hash(val) # <<<<<<<<<<<<<< * if not util.is_integer_object(val): * raise KeyError(val) */ __pyx_t_1 = PyObject_Hash(__pyx_v_val); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 522; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/index.pyx":523 * cdef inline _date_check_type(self, object val): * hash(val) * if not util.is_integer_object(val): # <<<<<<<<<<<<<< * raise KeyError(val) * */ __pyx_t_2 = ((!(is_integer_object(__pyx_v_val) != 0)) != 0); if (__pyx_t_2) { /* "pandas/index.pyx":524 * hash(val) * if not util.is_integer_object(val): * raise KeyError(val) # <<<<<<<<<<<<<< * * def get_indexer(self, values): */ __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 524; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_v_val); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_val); __Pyx_GIVEREF(__pyx_v_val); __pyx_t_4 = PyObject_Call(__pyx_builtin_KeyError, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 524; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(((PyObject *)__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_filename = __pyx_f[0]; __pyx_lineno = 524; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L3; } __pyx_L3:; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("pandas.index.DatetimeEngine._date_check_type", __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_5index_14DatetimeEngine_7get_indexer(PyObject *__pyx_v_self, PyObject *__pyx_v_values); /*proto*/ static PyObject *__pyx_pw_6pandas_5index_14DatetimeEngine_7get_indexer(PyObject *__pyx_v_self, PyObject *__pyx_v_values) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("get_indexer (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_5index_14DatetimeEngine_6get_indexer(((struct __pyx_obj_6pandas_5index_DatetimeEngine *)__pyx_v_self), ((PyObject *)__pyx_v_values)); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/index.pyx":526 * raise KeyError(val) * * def get_indexer(self, values): # <<<<<<<<<<<<<< * self._ensure_mapping_populated() * if values.dtype != 'M8[ns]': */ static PyObject *__pyx_pf_6pandas_5index_14DatetimeEngine_6get_indexer(struct __pyx_obj_6pandas_5index_DatetimeEngine *__pyx_v_self, PyObject *__pyx_v_values) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_t_3; Py_ssize_t __pyx_t_4; PyObject *__pyx_t_5 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_indexer", 0); __Pyx_INCREF(__pyx_v_values); /* "pandas/index.pyx":527 * * def get_indexer(self, values): * self._ensure_mapping_populated() # <<<<<<<<<<<<<< * if values.dtype != 'M8[ns]': * return np.repeat(-1, len(values)).astype('i4') */ __pyx_t_1 = __pyx_f_6pandas_5index_11IndexEngine__ensure_mapping_populated(((struct __pyx_obj_6pandas_5index_IndexEngine *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 527; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pandas/index.pyx":528 * def get_indexer(self, values): * self._ensure_mapping_populated() * if values.dtype != 'M8[ns]': # <<<<<<<<<<<<<< * return np.repeat(-1, len(values)).astype('i4') * values = np.asarray(values).view('i8') */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_values, __pyx_n_s__dtype); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 528; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyObject_RichCompare(__pyx_t_1, ((PyObject *)__pyx_kp_s_3), Py_NE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 528; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 528; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_3) { /* "pandas/index.pyx":529 * self._ensure_mapping_populated() * if values.dtype != 'M8[ns]': * return np.repeat(-1, len(values)).astype('i4') # <<<<<<<<<<<<<< * values = np.asarray(values).view('i8') * return self.mapping.lookup(values) */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 529; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__repeat); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 529; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_4 = PyObject_Length(__pyx_v_values); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 529; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_2 = PyInt_FromSsize_t(__pyx_t_4); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 529; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 529; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_int_neg_1); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_int_neg_1); __Pyx_GIVEREF(__pyx_int_neg_1); PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 529; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__astype); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 529; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_k_tuple_4), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 529; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; goto __pyx_L3; } __pyx_L3:; /* "pandas/index.pyx":530 * if values.dtype != 'M8[ns]': * return np.repeat(-1, len(values)).astype('i4') * values = np.asarray(values).view('i8') # <<<<<<<<<<<<<< * return self.mapping.lookup(values) * */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 530; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__asarray); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 530; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 530; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_values); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_values); __Pyx_GIVEREF(__pyx_v_values); __pyx_t_1 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 530; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s__view); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 530; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_k_tuple_5), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 530; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF_SET(__pyx_v_values, __pyx_t_1); __pyx_t_1 = 0; /* "pandas/index.pyx":531 * return np.repeat(-1, len(values)).astype('i4') * values = np.asarray(values).view('i8') * return self.mapping.lookup(values) # <<<<<<<<<<<<<< * * def get_pad_indexer(self, other, limit=None): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.mapping), __pyx_n_s__lookup); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 531; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 531; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_values); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_values); __Pyx_GIVEREF(__pyx_v_values); __pyx_t_5 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 531; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __pyx_r = __pyx_t_5; __pyx_t_5 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("pandas.index.DatetimeEngine.get_indexer", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_values); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5index_14DatetimeEngine_9get_pad_indexer(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_6pandas_5index_14DatetimeEngine_9get_pad_indexer(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_other = 0; PyObject *__pyx_v_limit = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("get_pad_indexer (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__other,&__pyx_n_s__limit,0}; PyObject* values[2] = {0,0}; /* "pandas/index.pyx":533 * return self.mapping.lookup(values) * * def get_pad_indexer(self, other, limit=None): # <<<<<<<<<<<<<< * if other.dtype != 'M8[ns]': * return np.repeat(-1, len(other)).astype('i4') */ values[1] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__other)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__limit); if (value) { values[1] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "get_pad_indexer") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 533; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_other = values[0]; __pyx_v_limit = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("get_pad_indexer", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 533; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.index.DatetimeEngine.get_pad_indexer", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pandas_5index_14DatetimeEngine_8get_pad_indexer(((struct __pyx_obj_6pandas_5index_DatetimeEngine *)__pyx_v_self), __pyx_v_other, __pyx_v_limit); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5index_14DatetimeEngine_8get_pad_indexer(struct __pyx_obj_6pandas_5index_DatetimeEngine *__pyx_v_self, PyObject *__pyx_v_other, PyObject *__pyx_v_limit) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_t_3; Py_ssize_t __pyx_t_4; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_pad_indexer", 0); __Pyx_INCREF(__pyx_v_other); /* "pandas/index.pyx":534 * * def get_pad_indexer(self, other, limit=None): * if other.dtype != 'M8[ns]': # <<<<<<<<<<<<<< * return np.repeat(-1, len(other)).astype('i4') * other = np.asarray(other).view('i8') */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_other, __pyx_n_s__dtype); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 534; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyObject_RichCompare(__pyx_t_1, ((PyObject *)__pyx_kp_s_3), Py_NE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 534; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 534; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_3) { /* "pandas/index.pyx":535 * def get_pad_indexer(self, other, limit=None): * if other.dtype != 'M8[ns]': * return np.repeat(-1, len(other)).astype('i4') # <<<<<<<<<<<<<< * other = np.asarray(other).view('i8') * return algos.pad_int64(self._get_index_values(), other, */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 535; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__repeat); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 535; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_4 = PyObject_Length(__pyx_v_other); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 535; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_2 = PyInt_FromSsize_t(__pyx_t_4); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 535; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 535; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_int_neg_1); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_int_neg_1); __Pyx_GIVEREF(__pyx_int_neg_1); PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 535; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__astype); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 535; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_k_tuple_6), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 535; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; goto __pyx_L3; } __pyx_L3:; /* "pandas/index.pyx":536 * if other.dtype != 'M8[ns]': * return np.repeat(-1, len(other)).astype('i4') * other = np.asarray(other).view('i8') # <<<<<<<<<<<<<< * return algos.pad_int64(self._get_index_values(), other, * limit=limit) */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 536; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__asarray); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 536; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 536; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_other); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_other); __Pyx_GIVEREF(__pyx_v_other); __pyx_t_1 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 536; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s__view); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 536; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_k_tuple_7), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 536; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF_SET(__pyx_v_other, __pyx_t_1); __pyx_t_1 = 0; /* "pandas/index.pyx":537 * return np.repeat(-1, len(other)).astype('i4') * other = np.asarray(other).view('i8') * return algos.pad_int64(self._get_index_values(), other, # <<<<<<<<<<<<<< * limit=limit) * */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__algos); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 537; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s__pad_int64); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 537; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = ((struct __pyx_vtabstruct_6pandas_5index_DatetimeEngine *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base._get_index_values(((struct __pyx_obj_6pandas_5index_IndexEngine *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 537; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 537; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_other); PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_v_other); __Pyx_GIVEREF(__pyx_v_other); __pyx_t_1 = 0; __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 537; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_1)); /* "pandas/index.pyx":538 * other = np.asarray(other).view('i8') * return algos.pad_int64(self._get_index_values(), other, * limit=limit) # <<<<<<<<<<<<<< * * def get_backfill_indexer(self, other, limit=None): */ if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__limit), __pyx_v_limit) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 537; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_6 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_5), ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 537; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_r = __pyx_t_6; __pyx_t_6 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("pandas.index.DatetimeEngine.get_pad_indexer", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_other); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5index_14DatetimeEngine_11get_backfill_indexer(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_6pandas_5index_14DatetimeEngine_11get_backfill_indexer(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_other = 0; PyObject *__pyx_v_limit = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("get_backfill_indexer (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__other,&__pyx_n_s__limit,0}; PyObject* values[2] = {0,0}; /* "pandas/index.pyx":540 * limit=limit) * * def get_backfill_indexer(self, other, limit=None): # <<<<<<<<<<<<<< * if other.dtype != 'M8[ns]': * return np.repeat(-1, len(other)).astype('i4') */ values[1] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__other)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__limit); if (value) { values[1] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "get_backfill_indexer") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 540; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_other = values[0]; __pyx_v_limit = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("get_backfill_indexer", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 540; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.index.DatetimeEngine.get_backfill_indexer", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pandas_5index_14DatetimeEngine_10get_backfill_indexer(((struct __pyx_obj_6pandas_5index_DatetimeEngine *)__pyx_v_self), __pyx_v_other, __pyx_v_limit); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5index_14DatetimeEngine_10get_backfill_indexer(struct __pyx_obj_6pandas_5index_DatetimeEngine *__pyx_v_self, PyObject *__pyx_v_other, PyObject *__pyx_v_limit) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_t_3; Py_ssize_t __pyx_t_4; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_backfill_indexer", 0); __Pyx_INCREF(__pyx_v_other); /* "pandas/index.pyx":541 * * def get_backfill_indexer(self, other, limit=None): * if other.dtype != 'M8[ns]': # <<<<<<<<<<<<<< * return np.repeat(-1, len(other)).astype('i4') * other = np.asarray(other).view('i8') */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_other, __pyx_n_s__dtype); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 541; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyObject_RichCompare(__pyx_t_1, ((PyObject *)__pyx_kp_s_3), Py_NE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 541; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 541; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_3) { /* "pandas/index.pyx":542 * def get_backfill_indexer(self, other, limit=None): * if other.dtype != 'M8[ns]': * return np.repeat(-1, len(other)).astype('i4') # <<<<<<<<<<<<<< * other = np.asarray(other).view('i8') * return algos.backfill_int64(self._get_index_values(), other, */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 542; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__repeat); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 542; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_4 = PyObject_Length(__pyx_v_other); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 542; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_2 = PyInt_FromSsize_t(__pyx_t_4); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 542; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 542; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_int_neg_1); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_int_neg_1); __Pyx_GIVEREF(__pyx_int_neg_1); PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 542; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__astype); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 542; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_k_tuple_8), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 542; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; goto __pyx_L3; } __pyx_L3:; /* "pandas/index.pyx":543 * if other.dtype != 'M8[ns]': * return np.repeat(-1, len(other)).astype('i4') * other = np.asarray(other).view('i8') # <<<<<<<<<<<<<< * return algos.backfill_int64(self._get_index_values(), other, * limit=limit) */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 543; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__asarray); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 543; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 543; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_other); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_other); __Pyx_GIVEREF(__pyx_v_other); __pyx_t_1 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 543; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s__view); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 543; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_k_tuple_9), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 543; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF_SET(__pyx_v_other, __pyx_t_1); __pyx_t_1 = 0; /* "pandas/index.pyx":544 * return np.repeat(-1, len(other)).astype('i4') * other = np.asarray(other).view('i8') * return algos.backfill_int64(self._get_index_values(), other, # <<<<<<<<<<<<<< * limit=limit) * */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__algos); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 544; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s__backfill_int64); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 544; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = ((struct __pyx_vtabstruct_6pandas_5index_DatetimeEngine *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base._get_index_values(((struct __pyx_obj_6pandas_5index_IndexEngine *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 544; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 544; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_other); PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_v_other); __Pyx_GIVEREF(__pyx_v_other); __pyx_t_1 = 0; __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 544; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_1)); /* "pandas/index.pyx":545 * other = np.asarray(other).view('i8') * return algos.backfill_int64(self._get_index_values(), other, * limit=limit) # <<<<<<<<<<<<<< * * */ if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__limit), __pyx_v_limit) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 544; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_6 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_5), ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 544; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_r = __pyx_t_6; __pyx_t_6 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("pandas.index.DatetimeEngine.get_backfill_indexer", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_other); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/index.pyx":548 * * * cpdef convert_scalar(ndarray arr, object value): # <<<<<<<<<<<<<< * if arr.descr.type_num == NPY_DATETIME: * if isinstance(value,np.ndarray): */ static PyObject *__pyx_pw_6pandas_5index_5convert_scalar(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_6pandas_5index_convert_scalar(PyArrayObject *__pyx_v_arr, PyObject *__pyx_v_value, CYTHON_UNUSED int __pyx_skip_dispatch) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_t_4; int __pyx_t_5; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("convert_scalar", 0); /* "pandas/index.pyx":549 * * cpdef convert_scalar(ndarray arr, object value): * if arr.descr.type_num == NPY_DATETIME: # <<<<<<<<<<<<<< * if isinstance(value,np.ndarray): * pass */ __pyx_t_1 = ((__pyx_v_arr->descr->type_num == NPY_DATETIME) != 0); if (__pyx_t_1) { /* "pandas/index.pyx":550 * cpdef convert_scalar(ndarray arr, object value): * if arr.descr.type_num == NPY_DATETIME: * if isinstance(value,np.ndarray): # <<<<<<<<<<<<<< * pass * elif isinstance(value, Timestamp): */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 550; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__ndarray); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 550; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_1 = PyObject_IsInstance(__pyx_v_value, __pyx_t_3); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 550; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_4 = (__pyx_t_1 != 0); if (__pyx_t_4) { goto __pyx_L4; } /* "pandas/index.pyx":552 * if isinstance(value,np.ndarray): * pass * elif isinstance(value, Timestamp): # <<<<<<<<<<<<<< * return value.value * elif value is None or value != value: */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s__Timestamp); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 552; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PyObject_IsInstance(__pyx_v_value, __pyx_t_3); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 552; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_1 = (__pyx_t_4 != 0); if (__pyx_t_1) { /* "pandas/index.pyx":553 * pass * elif isinstance(value, Timestamp): * return value.value # <<<<<<<<<<<<<< * elif value is None or value != value: * return iNaT */ __Pyx_XDECREF(__pyx_r); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_value, __pyx_n_s__value); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 553; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; goto __pyx_L4; } /* "pandas/index.pyx":554 * elif isinstance(value, Timestamp): * return value.value * elif value is None or value != value: # <<<<<<<<<<<<<< * return iNaT * else: */ __pyx_t_1 = (__pyx_v_value == Py_None); if (!__pyx_t_1) { __pyx_t_3 = PyObject_RichCompare(__pyx_v_value, __pyx_v_value, Py_NE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 554; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 554; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_5 = __pyx_t_4; } else { __pyx_t_5 = __pyx_t_1; } if (__pyx_t_5) { /* "pandas/index.pyx":555 * return value.value * elif value is None or value != value: * return iNaT # <<<<<<<<<<<<<< * else: * return Timestamp(value).value */ __Pyx_XDECREF(__pyx_r); __pyx_t_3 = __Pyx_PyInt_to_py_npy_int64(__pyx_v_6pandas_5index_iNaT); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 555; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; goto __pyx_L4; } /*else*/ { /* "pandas/index.pyx":557 * return iNaT * else: * return Timestamp(value).value # <<<<<<<<<<<<<< * * if issubclass(arr.dtype.type, (np.integer, np.bool_)): */ __Pyx_XDECREF(__pyx_r); __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s__Timestamp); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 557; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 557; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_value); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_value); __Pyx_GIVEREF(__pyx_v_value); __pyx_t_6 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 557; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s__value); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 557; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; } __pyx_L4:; goto __pyx_L3; } __pyx_L3:; /* "pandas/index.pyx":559 * return Timestamp(value).value * * if issubclass(arr.dtype.type, (np.integer, np.bool_)): # <<<<<<<<<<<<<< * if util.is_float_object(value) and value != value: * raise ValueError('Cannot assign nan to integer series') */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_arr), __pyx_n_s__dtype); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 559; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__type); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 559; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 559; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__integer); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 559; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 559; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__bool_); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 559; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 559; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_7); __Pyx_GIVEREF(__pyx_t_7); __pyx_t_3 = 0; __pyx_t_7 = 0; __pyx_t_5 = PyObject_IsSubclass(__pyx_t_6, ((PyObject *)__pyx_t_2)); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 559; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __pyx_t_1 = (__pyx_t_5 != 0); if (__pyx_t_1) { /* "pandas/index.pyx":560 * * if issubclass(arr.dtype.type, (np.integer, np.bool_)): * if util.is_float_object(value) and value != value: # <<<<<<<<<<<<<< * raise ValueError('Cannot assign nan to integer series') * */ if ((is_float_object(__pyx_v_value) != 0)) { __pyx_t_2 = PyObject_RichCompare(__pyx_v_value, __pyx_v_value, Py_NE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 560; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 560; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_5 = __pyx_t_1; } else { __pyx_t_5 = (is_float_object(__pyx_v_value) != 0); } if (__pyx_t_5) { /* "pandas/index.pyx":561 * if issubclass(arr.dtype.type, (np.integer, np.bool_)): * if util.is_float_object(value) and value != value: * raise ValueError('Cannot assign nan to integer series') # <<<<<<<<<<<<<< * * return value */ __pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_11), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 561; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 561; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L6; } __pyx_L6:; goto __pyx_L5; } __pyx_L5:; /* "pandas/index.pyx":563 * raise ValueError('Cannot assign nan to integer series') * * return value # <<<<<<<<<<<<<< * * cdef inline _to_i8(object val): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_value); __pyx_r = __pyx_v_value; goto __pyx_L0; __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_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_AddTraceback("pandas.index.convert_scalar", __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_5index_5convert_scalar(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_6pandas_5index_5convert_scalar(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_arr = 0; PyObject *__pyx_v_value = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("convert_scalar (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__arr,&__pyx_n_s__value,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__arr)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__value)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("convert_scalar", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 548; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "convert_scalar") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 548; __pyx_clineno = __LINE__; goto __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_value = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("convert_scalar", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 548; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pandas.index.convert_scalar", __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_filename = __pyx_f[0]; __pyx_lineno = 548; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6pandas_5index_4convert_scalar(__pyx_self, __pyx_v_arr, __pyx_v_value); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/index.pyx":548 * * * cpdef convert_scalar(ndarray arr, object value): # <<<<<<<<<<<<<< * if arr.descr.type_num == NPY_DATETIME: * if isinstance(value,np.ndarray): */ static PyObject *__pyx_pf_6pandas_5index_4convert_scalar(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_arr, PyObject *__pyx_v_value) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("convert_scalar", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_6pandas_5index_convert_scalar(__pyx_v_arr, __pyx_v_value, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 548; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas.index.convert_scalar", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/index.pyx":565 * return value * * cdef inline _to_i8(object val): # <<<<<<<<<<<<<< * cdef pandas_datetimestruct dts * try: */ static CYTHON_INLINE PyObject *__pyx_f_6pandas_5index__to_i8(PyObject *__pyx_v_val) { pandas_datetimestruct __pyx_v_dts; PyObject *__pyx_v_tzinfo = NULL; PyObject *__pyx_v_offset = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; int __pyx_t_5; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; int __pyx_t_8; PyObject *__pyx_t_9 = NULL; int __pyx_t_10; int __pyx_t_11; PyObject *__pyx_t_12 = NULL; PyObject *__pyx_t_13 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_to_i8", 0); __Pyx_INCREF(__pyx_v_val); /* "pandas/index.pyx":567 * cdef inline _to_i8(object val): * cdef pandas_datetimestruct dts * try: # <<<<<<<<<<<<<< * return val.value * except AttributeError: */ { __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:*/ { /* "pandas/index.pyx":568 * cdef pandas_datetimestruct dts * try: * return val.value # <<<<<<<<<<<<<< * except AttributeError: * if util.is_datetime64_object(val): */ __Pyx_XDECREF(__pyx_r); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_val, __pyx_n_s__value); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 568; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L7_try_return; } __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L10_try_end; __pyx_L7_try_return:; __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); goto __pyx_L0; __pyx_L3_error:; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; /* "pandas/index.pyx":569 * try: * return val.value * except AttributeError: # <<<<<<<<<<<<<< * if util.is_datetime64_object(val): * return get_datetime64_value(val) */ __pyx_t_5 = PyErr_ExceptionMatches(__pyx_builtin_AttributeError); if (__pyx_t_5) { __Pyx_AddTraceback("pandas.index._to_i8", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_6, &__pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 569; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_GOTREF(__pyx_t_6); __Pyx_GOTREF(__pyx_t_7); /* "pandas/index.pyx":570 * return val.value * except AttributeError: * if util.is_datetime64_object(val): # <<<<<<<<<<<<<< * return get_datetime64_value(val) * elif PyDateTime_Check(val): */ __pyx_t_8 = (is_datetime64_object(__pyx_v_val) != 0); if (__pyx_t_8) { /* "pandas/index.pyx":571 * except AttributeError: * if util.is_datetime64_object(val): * return get_datetime64_value(val) # <<<<<<<<<<<<<< * elif PyDateTime_Check(val): * tzinfo = getattr(val, 'tzinfo', None) */ __Pyx_XDECREF(__pyx_r); __pyx_t_9 = __Pyx_PyInt_to_py_npy_int64(get_datetime64_value(__pyx_v_val)); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 571; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_r = __pyx_t_9; __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; goto __pyx_L6_except_return; goto __pyx_L13; } /* "pandas/index.pyx":572 * if util.is_datetime64_object(val): * return get_datetime64_value(val) * elif PyDateTime_Check(val): # <<<<<<<<<<<<<< * tzinfo = getattr(val, 'tzinfo', None) * val = _pydatetime_to_dts(val, &dts) */ __pyx_t_8 = (PyDateTime_Check(__pyx_v_val) != 0); if (__pyx_t_8) { /* "pandas/index.pyx":573 * return get_datetime64_value(val) * elif PyDateTime_Check(val): * tzinfo = getattr(val, 'tzinfo', None) # <<<<<<<<<<<<<< * val = _pydatetime_to_dts(val, &dts) * if tzinfo is not None and not _is_utc(tzinfo): */ __pyx_t_9 = __Pyx_GetAttr3(__pyx_v_val, ((PyObject *)__pyx_n_s__tzinfo), Py_None); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 573; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_v_tzinfo = __pyx_t_9; __pyx_t_9 = 0; /* "pandas/index.pyx":574 * elif PyDateTime_Check(val): * tzinfo = getattr(val, 'tzinfo', None) * val = _pydatetime_to_dts(val, &dts) # <<<<<<<<<<<<<< * if tzinfo is not None and not _is_utc(tzinfo): * offset = tslib._get_utcoffset(tzinfo, val) */ __pyx_t_9 = __Pyx_PyInt_to_py_npy_int64(__pyx_f_8datetime__pydatetime_to_dts(__pyx_v_val, (&__pyx_v_dts))); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 574; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF_SET(__pyx_v_val, __pyx_t_9); __pyx_t_9 = 0; /* "pandas/index.pyx":575 * tzinfo = getattr(val, 'tzinfo', None) * val = _pydatetime_to_dts(val, &dts) * if tzinfo is not None and not _is_utc(tzinfo): # <<<<<<<<<<<<<< * offset = tslib._get_utcoffset(tzinfo, val) * val -= tslib._delta_to_nanoseconds(offset) */ __pyx_t_8 = (__pyx_v_tzinfo != Py_None); if ((__pyx_t_8 != 0)) { __pyx_t_10 = ((!(__pyx_f_6pandas_5index__is_utc(__pyx_v_tzinfo) != 0)) != 0); __pyx_t_11 = __pyx_t_10; } else { __pyx_t_11 = (__pyx_t_8 != 0); } if (__pyx_t_11) { /* "pandas/index.pyx":576 * val = _pydatetime_to_dts(val, &dts) * if tzinfo is not None and not _is_utc(tzinfo): * offset = tslib._get_utcoffset(tzinfo, val) # <<<<<<<<<<<<<< * val -= tslib._delta_to_nanoseconds(offset) * */ __pyx_t_9 = __Pyx_GetModuleGlobalName(__pyx_n_s__tslib); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 576; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s___get_utcoffset); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 576; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_9 = PyTuple_New(2); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 576; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_INCREF(__pyx_v_tzinfo); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_v_tzinfo); __Pyx_GIVEREF(__pyx_v_tzinfo); __Pyx_INCREF(__pyx_v_val); PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_v_val); __Pyx_GIVEREF(__pyx_v_val); __pyx_t_13 = PyObject_Call(__pyx_t_12, ((PyObject *)__pyx_t_9), NULL); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 576; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_9)); __pyx_t_9 = 0; __pyx_v_offset = __pyx_t_13; __pyx_t_13 = 0; /* "pandas/index.pyx":577 * if tzinfo is not None and not _is_utc(tzinfo): * offset = tslib._get_utcoffset(tzinfo, val) * val -= tslib._delta_to_nanoseconds(offset) # <<<<<<<<<<<<<< * * return val */ __pyx_t_13 = __Pyx_GetModuleGlobalName(__pyx_n_s__tslib); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 577; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} __Pyx_GOTREF(__pyx_t_13); __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_13, __pyx_n_s_12); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 577; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_13 = PyTuple_New(1); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 577; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} __Pyx_GOTREF(__pyx_t_13); __Pyx_INCREF(__pyx_v_offset); PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_v_offset); __Pyx_GIVEREF(__pyx_v_offset); __pyx_t_12 = PyObject_Call(__pyx_t_9, ((PyObject *)__pyx_t_13), NULL); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 577; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_13)); __pyx_t_13 = 0; __pyx_t_13 = PyNumber_InPlaceSubtract(__pyx_v_val, __pyx_t_12); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 577; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_DECREF_SET(__pyx_v_val, __pyx_t_13); __pyx_t_13 = 0; goto __pyx_L14; } __pyx_L14:; goto __pyx_L13; } __pyx_L13:; /* "pandas/index.pyx":579 * val -= tslib._delta_to_nanoseconds(offset) * * return val # <<<<<<<<<<<<<< * * cdef inline bint _is_utc(object tz): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_val); __pyx_r = __pyx_v_val; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; goto __pyx_L6_except_return; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; goto __pyx_L4_exception_handled; } __pyx_L5_except_error:; __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); goto __pyx_L1_error; __pyx_L6_except_return:; __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); goto __pyx_L0; __pyx_L4_exception_handled:; __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); __pyx_L10_try_end:; } __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_9); __Pyx_XDECREF(__pyx_t_12); __Pyx_XDECREF(__pyx_t_13); __Pyx_AddTraceback("pandas.index._to_i8", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_tzinfo); __Pyx_XDECREF(__pyx_v_offset); __Pyx_XDECREF(__pyx_v_val); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/index.pyx":581 * return val * * cdef inline bint _is_utc(object tz): # <<<<<<<<<<<<<< * return tz is UTC or isinstance(tz, _du_utc) */ static CYTHON_INLINE int __pyx_f_6pandas_5index__is_utc(PyObject *__pyx_v_tz) { int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; int __pyx_t_3; int __pyx_t_4; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_is_utc", 0); /* "pandas/index.pyx":582 * * cdef inline bint _is_utc(object tz): * return tz is UTC or isinstance(tz, _du_utc) # <<<<<<<<<<<<<< */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__UTC); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 582; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = (__pyx_v_tz == __pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (!__pyx_t_2) { __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s___du_utc); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 582; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = PyObject_IsInstance(__pyx_v_tz, __pyx_t_1); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 582; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_4 = __pyx_t_3; } else { __pyx_t_4 = __pyx_t_2; } __pyx_r = __pyx_t_4; goto __pyx_L0; __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_WriteUnraisable("pandas.index._is_utc", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "util.pxd":26 * object sarr_from_data(cnp.dtype, int length, void* data) * * cdef inline object get_value_at(ndarray arr, object loc): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, sz */ static CYTHON_INLINE PyObject *__pyx_f_4util_get_value_at(PyArrayObject *__pyx_v_arr, PyObject *__pyx_v_loc) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_sz; PyObject *__pyx_v_casted = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; Py_ssize_t __pyx_t_4; int __pyx_t_5; int __pyx_t_6; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_value_at", 0); __Pyx_INCREF(__pyx_v_loc); /* "util.pxd":30 * Py_ssize_t i, sz * void* data_ptr * if is_float_object(loc): # <<<<<<<<<<<<<< * casted = int(loc) * if casted == loc: */ __pyx_t_1 = (is_float_object(__pyx_v_loc) != 0); if (__pyx_t_1) { /* "util.pxd":31 * void* data_ptr * if is_float_object(loc): * casted = int(loc) # <<<<<<<<<<<<<< * if casted == loc: * loc = casted */ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 31; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_loc); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_loc); __Pyx_GIVEREF(__pyx_v_loc); __pyx_t_3 = PyObject_Call(((PyObject *)((PyObject*)(&PyInt_Type))), ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 31; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __pyx_v_casted = __pyx_t_3; __pyx_t_3 = 0; /* "util.pxd":32 * if is_float_object(loc): * casted = int(loc) * if casted == loc: # <<<<<<<<<<<<<< * loc = casted * i = loc */ __pyx_t_3 = PyObject_RichCompare(__pyx_v_casted, __pyx_v_loc, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 32; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 32; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_1) { /* "util.pxd":33 * casted = int(loc) * if casted == loc: * loc = casted # <<<<<<<<<<<<<< * i = loc * sz = cnp.PyArray_SIZE(arr) */ __Pyx_INCREF(__pyx_v_casted); __Pyx_DECREF_SET(__pyx_v_loc, __pyx_v_casted); goto __pyx_L4; } __pyx_L4:; goto __pyx_L3; } __pyx_L3:; /* "util.pxd":34 * if casted == loc: * loc = casted * i = loc # <<<<<<<<<<<<<< * sz = cnp.PyArray_SIZE(arr) * */ __pyx_t_4 = __Pyx_PyIndex_AsSsize_t(__pyx_v_loc); if (unlikely((__pyx_t_4 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 34; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_i = ((Py_ssize_t)__pyx_t_4); /* "util.pxd":35 * loc = casted * i = loc * sz = cnp.PyArray_SIZE(arr) # <<<<<<<<<<<<<< * * if i < 0 and sz > 0: */ __pyx_v_sz = PyArray_SIZE(__pyx_v_arr); /* "util.pxd":37 * sz = cnp.PyArray_SIZE(arr) * * if i < 0 and sz > 0: # <<<<<<<<<<<<<< * i += sz * elif i >= sz or sz == 0: */ __pyx_t_1 = ((__pyx_v_i < 0) != 0); if (__pyx_t_1) { __pyx_t_5 = ((__pyx_v_sz > 0) != 0); __pyx_t_6 = __pyx_t_5; } else { __pyx_t_6 = __pyx_t_1; } if (__pyx_t_6) { /* "util.pxd":38 * * if i < 0 and sz > 0: * i += sz # <<<<<<<<<<<<<< * elif i >= sz or sz == 0: * raise IndexError('index out of bounds') */ __pyx_v_i = (__pyx_v_i + __pyx_v_sz); goto __pyx_L5; } /* "util.pxd":39 * if i < 0 and sz > 0: * i += sz * elif i >= sz or sz == 0: # <<<<<<<<<<<<<< * raise IndexError('index out of bounds') * */ __pyx_t_6 = ((__pyx_v_i >= __pyx_v_sz) != 0); if (!__pyx_t_6) { __pyx_t_1 = ((__pyx_v_sz == 0) != 0); __pyx_t_5 = __pyx_t_1; } else { __pyx_t_5 = __pyx_t_6; } if (__pyx_t_5) { /* "util.pxd":40 * i += sz * elif i >= sz or sz == 0: * raise IndexError('index out of bounds') # <<<<<<<<<<<<<< * * return get_value_1d(arr, i) */ __pyx_t_3 = PyObject_Call(__pyx_builtin_IndexError, ((PyObject *)__pyx_k_tuple_14), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 40; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 40; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L5; } __pyx_L5:; /* "util.pxd":42 * raise IndexError('index out of bounds') * * return get_value_1d(arr, i) # <<<<<<<<<<<<<< * * cdef inline set_value_at(ndarray arr, object loc, object value): */ __Pyx_XDECREF(__pyx_r); __pyx_t_3 = get_value_1d(__pyx_v_arr, __pyx_v_i); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 42; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("util.get_value_at", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_casted); __Pyx_XDECREF(__pyx_v_loc); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "util.pxd":44 * return get_value_1d(arr, i) * * cdef inline set_value_at(ndarray arr, object loc, object value): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, sz */ static CYTHON_INLINE PyObject *__pyx_f_4util_set_value_at(PyArrayObject *__pyx_v_arr, PyObject *__pyx_v_loc, PyObject *__pyx_v_value) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_sz; PyObject *__pyx_v_casted = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; Py_ssize_t __pyx_t_4; int __pyx_t_5; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("set_value_at", 0); __Pyx_INCREF(__pyx_v_loc); /* "util.pxd":47 * cdef: * Py_ssize_t i, sz * if is_float_object(loc): # <<<<<<<<<<<<<< * casted = int(loc) * if casted == loc: */ __pyx_t_1 = (is_float_object(__pyx_v_loc) != 0); if (__pyx_t_1) { /* "util.pxd":48 * Py_ssize_t i, sz * if is_float_object(loc): * casted = int(loc) # <<<<<<<<<<<<<< * if casted == loc: * loc = casted */ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_loc); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_loc); __Pyx_GIVEREF(__pyx_v_loc); __pyx_t_3 = PyObject_Call(((PyObject *)((PyObject*)(&PyInt_Type))), ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __pyx_v_casted = __pyx_t_3; __pyx_t_3 = 0; /* "util.pxd":49 * if is_float_object(loc): * casted = int(loc) * if casted == loc: # <<<<<<<<<<<<<< * loc = casted * i = loc */ __pyx_t_3 = PyObject_RichCompare(__pyx_v_casted, __pyx_v_loc, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_1) { /* "util.pxd":50 * casted = int(loc) * if casted == loc: * loc = casted # <<<<<<<<<<<<<< * i = loc * sz = cnp.PyArray_SIZE(arr) */ __Pyx_INCREF(__pyx_v_casted); __Pyx_DECREF_SET(__pyx_v_loc, __pyx_v_casted); goto __pyx_L4; } __pyx_L4:; goto __pyx_L3; } __pyx_L3:; /* "util.pxd":51 * if casted == loc: * loc = casted * i = loc # <<<<<<<<<<<<<< * sz = cnp.PyArray_SIZE(arr) * */ __pyx_t_4 = __Pyx_PyIndex_AsSsize_t(__pyx_v_loc); if (unlikely((__pyx_t_4 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_i = ((Py_ssize_t)__pyx_t_4); /* "util.pxd":52 * loc = casted * i = loc * sz = cnp.PyArray_SIZE(arr) # <<<<<<<<<<<<<< * * if i < 0: */ __pyx_v_sz = PyArray_SIZE(__pyx_v_arr); /* "util.pxd":54 * sz = cnp.PyArray_SIZE(arr) * * if i < 0: # <<<<<<<<<<<<<< * i += sz * elif i >= sz: */ __pyx_t_1 = ((__pyx_v_i < 0) != 0); if (__pyx_t_1) { /* "util.pxd":55 * * if i < 0: * i += sz # <<<<<<<<<<<<<< * elif i >= sz: * raise IndexError('index out of bounds') */ __pyx_v_i = (__pyx_v_i + __pyx_v_sz); goto __pyx_L5; } /* "util.pxd":56 * if i < 0: * i += sz * elif i >= sz: # <<<<<<<<<<<<<< * raise IndexError('index out of bounds') * */ __pyx_t_1 = ((__pyx_v_i >= __pyx_v_sz) != 0); if (__pyx_t_1) { /* "util.pxd":57 * i += sz * elif i >= sz: * raise IndexError('index out of bounds') # <<<<<<<<<<<<<< * * assign_value_1d(arr, i, value) */ __pyx_t_3 = PyObject_Call(__pyx_builtin_IndexError, ((PyObject *)__pyx_k_tuple_15), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 57; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 57; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L5; } __pyx_L5:; /* "util.pxd":59 * raise IndexError('index out of bounds') * * assign_value_1d(arr, i, value) # <<<<<<<<<<<<<< * * cdef inline int is_contiguous(ndarray arr): */ __pyx_t_5 = assign_value_1d(__pyx_v_arr, __pyx_v_i, __pyx_v_value); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 59; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("util.set_value_at", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_casted); __Pyx_XDECREF(__pyx_v_loc); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "util.pxd":61 * assign_value_1d(arr, i, value) * * cdef inline int is_contiguous(ndarray arr): # <<<<<<<<<<<<<< * return cnp.PyArray_CHKFLAGS(arr, cnp.NPY_C_CONTIGUOUS) * */ static CYTHON_INLINE int __pyx_f_4util_is_contiguous(PyArrayObject *__pyx_v_arr) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("is_contiguous", 0); /* "util.pxd":62 * * cdef inline int is_contiguous(ndarray arr): * return cnp.PyArray_CHKFLAGS(arr, cnp.NPY_C_CONTIGUOUS) # <<<<<<<<<<<<<< * * cdef inline is_array(object o): */ __pyx_r = PyArray_CHKFLAGS(__pyx_v_arr, NPY_C_CONTIGUOUS); goto __pyx_L0; __pyx_r = 0; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "util.pxd":64 * return cnp.PyArray_CHKFLAGS(arr, cnp.NPY_C_CONTIGUOUS) * * cdef inline is_array(object o): # <<<<<<<<<<<<<< * return cnp.PyArray_Check(o) * */ static CYTHON_INLINE PyObject *__pyx_f_4util_is_array(PyObject *__pyx_v_o) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("is_array", 0); /* "util.pxd":65 * * cdef inline is_array(object o): * return cnp.PyArray_Check(o) # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyBool_FromLong(PyArray_Check(__pyx_v_o)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 65; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("util.is_array", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "util.pxd":68 * * * cdef inline bint _checknull(object val): # <<<<<<<<<<<<<< * try: * return val is None or (cpython.PyFloat_Check(val) and val != val) */ static CYTHON_INLINE int __pyx_f_4util__checknull(PyObject *__pyx_v_val) { 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; int __pyx_t_9; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_checknull", 0); /* "util.pxd":69 * * cdef inline bint _checknull(object val): * try: # <<<<<<<<<<<<<< * return val is None or (cpython.PyFloat_Check(val) and val != val) * except ValueError: */ { __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:*/ { /* "util.pxd":70 * cdef inline bint _checknull(object val): * try: * return val is None or (cpython.PyFloat_Check(val) and val != val) # <<<<<<<<<<<<<< * except ValueError: * return False */ __pyx_t_4 = (__pyx_v_val == Py_None); __pyx_t_5 = __Pyx_PyBool_FromLong(__pyx_t_4); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L3_error;} if (!__pyx_t_4) { __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_6 = __Pyx_PyBool_FromLong(PyFloat_Check(__pyx_v_val)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L3_error;} if (__pyx_t_4) { __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_7 = PyObject_RichCompare(__pyx_v_val, __pyx_v_val, Py_NE); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_t_8 = __pyx_t_7; __pyx_t_7 = 0; } else { __pyx_t_8 = __pyx_t_6; __pyx_t_6 = 0; } __pyx_t_6 = __pyx_t_8; __pyx_t_8 = 0; } else { __pyx_t_6 = __pyx_t_5; __pyx_t_5 = 0; } __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_r = __pyx_t_4; goto __pyx_L7_try_return; } __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L10_try_end; __pyx_L7_try_return:; __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); goto __pyx_L0; __pyx_L3_error:; __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; /* "util.pxd":71 * try: * return val is None or (cpython.PyFloat_Check(val) and val != val) * except ValueError: # <<<<<<<<<<<<<< * return False * */ __pyx_t_9 = PyErr_ExceptionMatches(__pyx_builtin_ValueError); if (__pyx_t_9) { __Pyx_AddTraceback("util._checknull", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_5, &__pyx_t_8) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 71; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_GOTREF(__pyx_t_5); __Pyx_GOTREF(__pyx_t_8); /* "util.pxd":72 * return val is None or (cpython.PyFloat_Check(val) and val != val) * except ValueError: * return False # <<<<<<<<<<<<<< * * cdef inline bint _checknull_old(object val): */ __pyx_r = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; goto __pyx_L6_except_return; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; goto __pyx_L4_exception_handled; } __pyx_L5_except_error:; __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); goto __pyx_L1_error; __pyx_L6_except_return:; __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); goto __pyx_L0; __pyx_L4_exception_handled:; __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); __pyx_L10_try_end:; } __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_WriteUnraisable("util._checknull", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "util.pxd":74 * return False * * cdef inline bint _checknull_old(object val): # <<<<<<<<<<<<<< * import numpy as np * cdef double INF = np.inf */ static CYTHON_INLINE int __pyx_f_4util__checknull_old(PyObject *__pyx_v_val) { PyObject *__pyx_v_np = NULL; double __pyx_v_INF; double __pyx_v_NEGINF; int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; double __pyx_t_2; 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; int __pyx_t_9; int __pyx_t_10; int __pyx_t_11; int __pyx_t_12; PyObject *__pyx_t_13 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_checknull_old", 0); /* "util.pxd":75 * * cdef inline bint _checknull_old(object val): * import numpy as np # <<<<<<<<<<<<<< * cdef double INF = np.inf * cdef double NEGINF = -INF */ __pyx_t_1 = __Pyx_Import(((PyObject *)__pyx_n_s__numpy), 0, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 75; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_v_np = __pyx_t_1; __pyx_t_1 = 0; /* "util.pxd":76 * cdef inline bint _checknull_old(object val): * import numpy as np * cdef double INF = np.inf # <<<<<<<<<<<<<< * cdef double NEGINF = -INF * try: */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_np, __pyx_n_s__inf); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 76; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __pyx_PyFloat_AsDouble(__pyx_t_1); if (unlikely((__pyx_t_2 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 76; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_INF = ((double)__pyx_t_2); /* "util.pxd":77 * import numpy as np * cdef double INF = np.inf * cdef double NEGINF = -INF # <<<<<<<<<<<<<< * try: * return bool(val is None or val != val and val != INF */ __pyx_v_NEGINF = (-__pyx_v_INF); /* "util.pxd":78 * cdef double INF = np.inf * cdef double NEGINF = -INF * try: # <<<<<<<<<<<<<< * return bool(val is None or val != val and val != INF * and val != NEGINF) */ { __Pyx_ExceptionSave(&__pyx_t_3, &__pyx_t_4, &__pyx_t_5); __Pyx_XGOTREF(__pyx_t_3); __Pyx_XGOTREF(__pyx_t_4); __Pyx_XGOTREF(__pyx_t_5); /*try:*/ { /* "util.pxd":79 * cdef double NEGINF = -INF * try: * return bool(val is None or val != val and val != INF # <<<<<<<<<<<<<< * and val != NEGINF) * except ValueError: */ __pyx_t_6 = (__pyx_v_val == Py_None); if (!__pyx_t_6) { __pyx_t_1 = PyObject_RichCompare(__pyx_v_val, __pyx_v_val, Py_NE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_7) { /* "util.pxd":80 * try: * return bool(val is None or val != val and val != INF * and val != NEGINF) # <<<<<<<<<<<<<< * except ValueError: * return False */ __pyx_t_1 = PyFloat_FromDouble(__pyx_v_INF); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 80; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_8 = PyObject_RichCompare(__pyx_v_val, __pyx_t_1, Py_NE); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (__pyx_t_9) { __pyx_t_8 = PyFloat_FromDouble(__pyx_v_NEGINF); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 80; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_1 = PyObject_RichCompare(__pyx_v_val, __pyx_t_8, Py_NE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 80; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 80; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_11 = __pyx_t_10; } else { __pyx_t_11 = __pyx_t_9; } __pyx_t_9 = __pyx_t_11; } else { __pyx_t_9 = __pyx_t_7; } __pyx_t_7 = __pyx_t_9; } else { __pyx_t_7 = __pyx_t_6; } __pyx_r = (!(!__pyx_t_7)); goto __pyx_L7_try_return; } __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; goto __pyx_L10_try_end; __pyx_L7_try_return:; __Pyx_XGIVEREF(__pyx_t_3); __Pyx_XGIVEREF(__pyx_t_4); __Pyx_XGIVEREF(__pyx_t_5); __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5); goto __pyx_L0; __pyx_L3_error:; __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; /* "util.pxd":81 * return bool(val is None or val != val and val != INF * and val != NEGINF) * except ValueError: # <<<<<<<<<<<<<< * return False * */ __pyx_t_12 = PyErr_ExceptionMatches(__pyx_builtin_ValueError); if (__pyx_t_12) { __Pyx_AddTraceback("util._checknull_old", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_8, &__pyx_t_13) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_GOTREF(__pyx_t_8); __Pyx_GOTREF(__pyx_t_13); /* "util.pxd":82 * and val != NEGINF) * except ValueError: * return False # <<<<<<<<<<<<<< * * cdef inline bint _checknan(object val): */ __pyx_r = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; goto __pyx_L6_except_return; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; goto __pyx_L4_exception_handled; } __pyx_L5_except_error:; __Pyx_XGIVEREF(__pyx_t_3); __Pyx_XGIVEREF(__pyx_t_4); __Pyx_XGIVEREF(__pyx_t_5); __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5); goto __pyx_L1_error; __pyx_L6_except_return:; __Pyx_XGIVEREF(__pyx_t_3); __Pyx_XGIVEREF(__pyx_t_4); __Pyx_XGIVEREF(__pyx_t_5); __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5); goto __pyx_L0; __pyx_L4_exception_handled:; __Pyx_XGIVEREF(__pyx_t_3); __Pyx_XGIVEREF(__pyx_t_4); __Pyx_XGIVEREF(__pyx_t_5); __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5); __pyx_L10_try_end:; } __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_13); __Pyx_WriteUnraisable("util._checknull_old", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_np); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "util.pxd":84 * return False * * cdef inline bint _checknan(object val): # <<<<<<<<<<<<<< * return not cnp.PyArray_Check(val) and val != val */ static CYTHON_INLINE int __pyx_f_4util__checknan(PyObject *__pyx_v_val) { int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_checknan", 0); /* "util.pxd":85 * * cdef inline bint _checknan(object val): * return not cnp.PyArray_Check(val) and val != val # <<<<<<<<<<<<<< */ __pyx_t_1 = __Pyx_PyBool_FromLong((!(PyArray_Check(__pyx_v_val) != 0))); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__pyx_t_2) { __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_3 = PyObject_RichCompare(__pyx_v_val, __pyx_v_val, Py_NE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_4 = __pyx_t_3; __pyx_t_3 = 0; } else { __pyx_t_4 = __pyx_t_1; __pyx_t_1 = 0; } __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_r = __pyx_t_2; goto __pyx_L0; __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_WriteUnraisable("util._checknan", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "datetime.pxd":126 * * * cdef inline _string_to_dts(object val, pandas_datetimestruct* dts): # <<<<<<<<<<<<<< * cdef int result * cdef char *tmp */ static CYTHON_INLINE PyObject *__pyx_f_8datetime__string_to_dts(PyObject *__pyx_v_val, pandas_datetimestruct *__pyx_v_dts) { int __pyx_v_result; char *__pyx_v_tmp; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; char *__pyx_t_3; Py_ssize_t __pyx_t_4; PyObject *__pyx_t_5 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_string_to_dts", 0); __Pyx_INCREF(__pyx_v_val); /* "datetime.pxd":130 * cdef char *tmp * * if PyUnicode_Check(val): # <<<<<<<<<<<<<< * val = PyUnicode_AsASCIIString(val); * */ __pyx_t_1 = (PyUnicode_Check(__pyx_v_val) != 0); if (__pyx_t_1) { /* "datetime.pxd":131 * * if PyUnicode_Check(val): * val = PyUnicode_AsASCIIString(val); # <<<<<<<<<<<<<< * * tmp = val */ __pyx_t_2 = PyUnicode_AsASCIIString(__pyx_v_val); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 131; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF_SET(__pyx_v_val, __pyx_t_2); __pyx_t_2 = 0; goto __pyx_L3; } __pyx_L3:; /* "datetime.pxd":133 * val = PyUnicode_AsASCIIString(val); * * tmp = val # <<<<<<<<<<<<<< * result = _cstring_to_dts(tmp, len(val), dts) * */ __pyx_t_3 = __Pyx_PyObject_AsString(__pyx_v_val); if (unlikely((!__pyx_t_3) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 133; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_tmp = __pyx_t_3; /* "datetime.pxd":134 * * tmp = val * result = _cstring_to_dts(tmp, len(val), dts) # <<<<<<<<<<<<<< * * if result == -1: */ __pyx_t_4 = PyObject_Length(__pyx_v_val); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 134; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_result = __pyx_f_8datetime__cstring_to_dts(__pyx_v_tmp, __pyx_t_4, __pyx_v_dts); /* "datetime.pxd":136 * result = _cstring_to_dts(tmp, len(val), dts) * * if result == -1: # <<<<<<<<<<<<<< * raise ValueError('Unable to parse %s' % str(val)) * */ __pyx_t_1 = ((__pyx_v_result == -1) != 0); if (__pyx_t_1) { /* "datetime.pxd":137 * * if result == -1: * raise ValueError('Unable to parse %s' % str(val)) # <<<<<<<<<<<<<< * * cdef inline int _cstring_to_dts(char *val, int length, */ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 137; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_val); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_val); __Pyx_GIVEREF(__pyx_v_val); __pyx_t_5 = PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 137; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __pyx_t_2 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_16), __pyx_t_5); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 137; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_2)); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 137; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_t_2)); __Pyx_GIVEREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 137; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; {__pyx_filename = __pyx_f[2]; __pyx_lineno = 137; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L4; } __pyx_L4:; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("datetime._string_to_dts", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_val); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "datetime.pxd":139 * raise ValueError('Unable to parse %s' % str(val)) * * cdef inline int _cstring_to_dts(char *val, int length, # <<<<<<<<<<<<<< * pandas_datetimestruct* dts): * cdef: */ static CYTHON_INLINE int __pyx_f_8datetime__cstring_to_dts(char *__pyx_v_val, int __pyx_v_length, pandas_datetimestruct *__pyx_v_dts) { npy_bool __pyx_v_islocal; npy_bool __pyx_v_special; PANDAS_DATETIMEUNIT __pyx_v_out_bestunit; int __pyx_v_result; int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_cstring_to_dts", 0); /* "datetime.pxd":148 * result = parse_iso_8601_datetime(val, length, PANDAS_FR_ns, * NPY_UNSAFE_CASTING, * dts, &islocal, &out_bestunit, &special) # <<<<<<<<<<<<<< * return result * */ __pyx_v_result = parse_iso_8601_datetime(__pyx_v_val, __pyx_v_length, PANDAS_FR_ns, NPY_UNSAFE_CASTING, __pyx_v_dts, (&__pyx_v_islocal), (&__pyx_v_out_bestunit), (&__pyx_v_special)); /* "datetime.pxd":149 * NPY_UNSAFE_CASTING, * dts, &islocal, &out_bestunit, &special) * return result # <<<<<<<<<<<<<< * * */ __pyx_r = __pyx_v_result; goto __pyx_L0; __pyx_r = 0; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "datetime.pxd":152 * * * cdef inline object _datetime64_to_datetime(int64_t val): # <<<<<<<<<<<<<< * cdef pandas_datetimestruct dts * pandas_datetime_to_datetimestruct(val, PANDAS_FR_ns, &dts) */ static CYTHON_INLINE PyObject *__pyx_f_8datetime__datetime64_to_datetime(__pyx_t_5numpy_int64_t __pyx_v_val) { pandas_datetimestruct __pyx_v_dts; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_datetime64_to_datetime", 0); /* "datetime.pxd":154 * cdef inline object _datetime64_to_datetime(int64_t val): * cdef pandas_datetimestruct dts * pandas_datetime_to_datetimestruct(val, PANDAS_FR_ns, &dts) # <<<<<<<<<<<<<< * return _dts_to_pydatetime(&dts) * */ pandas_datetime_to_datetimestruct(__pyx_v_val, PANDAS_FR_ns, (&__pyx_v_dts)); /* "datetime.pxd":155 * cdef pandas_datetimestruct dts * pandas_datetime_to_datetimestruct(val, PANDAS_FR_ns, &dts) * return _dts_to_pydatetime(&dts) # <<<<<<<<<<<<<< * * cdef inline object _dts_to_pydatetime(pandas_datetimestruct *dts): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_8datetime__dts_to_pydatetime((&__pyx_v_dts)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 155; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("datetime._datetime64_to_datetime", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "datetime.pxd":157 * return _dts_to_pydatetime(&dts) * * cdef inline object _dts_to_pydatetime(pandas_datetimestruct *dts): # <<<<<<<<<<<<<< * return PyDateTime_FromDateAndTime(dts.year, dts.month, * dts.day, dts.hour, */ static CYTHON_INLINE PyObject *__pyx_f_8datetime__dts_to_pydatetime(pandas_datetimestruct *__pyx_v_dts) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_dts_to_pydatetime", 0); /* "datetime.pxd":158 * * cdef inline object _dts_to_pydatetime(pandas_datetimestruct *dts): * return PyDateTime_FromDateAndTime(dts.year, dts.month, # <<<<<<<<<<<<<< * dts.day, dts.hour, * dts.min, dts.sec, dts.us) */ __Pyx_XDECREF(__pyx_r); /* "datetime.pxd":160 * return PyDateTime_FromDateAndTime(dts.year, dts.month, * dts.day, dts.hour, * dts.min, dts.sec, dts.us) # <<<<<<<<<<<<<< * * cdef inline int64_t _pydatetime_to_dts(object val, pandas_datetimestruct *dts): */ __pyx_t_1 = PyDateTime_FromDateAndTime(__pyx_v_dts->year, __pyx_v_dts->month, __pyx_v_dts->day, __pyx_v_dts->hour, __pyx_v_dts->min, __pyx_v_dts->sec, __pyx_v_dts->us); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 158; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)__pyx_t_1)); __pyx_r = __pyx_t_1; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("datetime._dts_to_pydatetime", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "datetime.pxd":162 * dts.min, dts.sec, dts.us) * * cdef inline int64_t _pydatetime_to_dts(object val, pandas_datetimestruct *dts): # <<<<<<<<<<<<<< * dts.year = PyDateTime_GET_YEAR(val) * dts.month = PyDateTime_GET_MONTH(val) */ static CYTHON_INLINE __pyx_t_5numpy_int64_t __pyx_f_8datetime__pydatetime_to_dts(PyObject *__pyx_v_val, pandas_datetimestruct *__pyx_v_dts) { __pyx_t_5numpy_int64_t __pyx_r; __Pyx_RefNannyDeclarations int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_pydatetime_to_dts", 0); /* "datetime.pxd":163 * * cdef inline int64_t _pydatetime_to_dts(object val, pandas_datetimestruct *dts): * dts.year = PyDateTime_GET_YEAR(val) # <<<<<<<<<<<<<< * dts.month = PyDateTime_GET_MONTH(val) * dts.day = PyDateTime_GET_DAY(val) */ if (!(likely(((__pyx_v_val) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_val, __pyx_ptype_8datetime_date))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 163; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_dts->year = PyDateTime_GET_YEAR(((PyDateTime_Date *)__pyx_v_val)); /* "datetime.pxd":164 * cdef inline int64_t _pydatetime_to_dts(object val, pandas_datetimestruct *dts): * dts.year = PyDateTime_GET_YEAR(val) * dts.month = PyDateTime_GET_MONTH(val) # <<<<<<<<<<<<<< * dts.day = PyDateTime_GET_DAY(val) * dts.hour = PyDateTime_DATE_GET_HOUR(val) */ if (!(likely(((__pyx_v_val) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_val, __pyx_ptype_8datetime_date))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 164; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_dts->month = PyDateTime_GET_MONTH(((PyDateTime_Date *)__pyx_v_val)); /* "datetime.pxd":165 * dts.year = PyDateTime_GET_YEAR(val) * dts.month = PyDateTime_GET_MONTH(val) * dts.day = PyDateTime_GET_DAY(val) # <<<<<<<<<<<<<< * dts.hour = PyDateTime_DATE_GET_HOUR(val) * dts.min = PyDateTime_DATE_GET_MINUTE(val) */ if (!(likely(((__pyx_v_val) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_val, __pyx_ptype_8datetime_date))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 165; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_dts->day = PyDateTime_GET_DAY(((PyDateTime_Date *)__pyx_v_val)); /* "datetime.pxd":166 * dts.month = PyDateTime_GET_MONTH(val) * dts.day = PyDateTime_GET_DAY(val) * dts.hour = PyDateTime_DATE_GET_HOUR(val) # <<<<<<<<<<<<<< * dts.min = PyDateTime_DATE_GET_MINUTE(val) * dts.sec = PyDateTime_DATE_GET_SECOND(val) */ __pyx_v_dts->hour = PyDateTime_DATE_GET_HOUR(__pyx_v_val); /* "datetime.pxd":167 * dts.day = PyDateTime_GET_DAY(val) * dts.hour = PyDateTime_DATE_GET_HOUR(val) * dts.min = PyDateTime_DATE_GET_MINUTE(val) # <<<<<<<<<<<<<< * dts.sec = PyDateTime_DATE_GET_SECOND(val) * dts.us = PyDateTime_DATE_GET_MICROSECOND(val) */ __pyx_v_dts->min = PyDateTime_DATE_GET_MINUTE(__pyx_v_val); /* "datetime.pxd":168 * dts.hour = PyDateTime_DATE_GET_HOUR(val) * dts.min = PyDateTime_DATE_GET_MINUTE(val) * dts.sec = PyDateTime_DATE_GET_SECOND(val) # <<<<<<<<<<<<<< * dts.us = PyDateTime_DATE_GET_MICROSECOND(val) * dts.ps = dts.as = 0 */ __pyx_v_dts->sec = PyDateTime_DATE_GET_SECOND(__pyx_v_val); /* "datetime.pxd":169 * dts.min = PyDateTime_DATE_GET_MINUTE(val) * dts.sec = PyDateTime_DATE_GET_SECOND(val) * dts.us = PyDateTime_DATE_GET_MICROSECOND(val) # <<<<<<<<<<<<<< * dts.ps = dts.as = 0 * return pandas_datetimestruct_to_datetime(PANDAS_FR_ns, dts) */ __pyx_v_dts->us = PyDateTime_DATE_GET_MICROSECOND(__pyx_v_val); /* "datetime.pxd":170 * dts.sec = PyDateTime_DATE_GET_SECOND(val) * dts.us = PyDateTime_DATE_GET_MICROSECOND(val) * dts.ps = dts.as = 0 # <<<<<<<<<<<<<< * return pandas_datetimestruct_to_datetime(PANDAS_FR_ns, dts) * */ __pyx_v_dts->ps = 0; __pyx_v_dts->as = 0; /* "datetime.pxd":171 * dts.us = PyDateTime_DATE_GET_MICROSECOND(val) * dts.ps = dts.as = 0 * return pandas_datetimestruct_to_datetime(PANDAS_FR_ns, dts) # <<<<<<<<<<<<<< * * cdef inline int64_t _dtlike_to_datetime64(object val, */ __pyx_r = pandas_datetimestruct_to_datetime(PANDAS_FR_ns, __pyx_v_dts); goto __pyx_L0; __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_WriteUnraisable("datetime._pydatetime_to_dts", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "datetime.pxd":173 * return pandas_datetimestruct_to_datetime(PANDAS_FR_ns, dts) * * cdef inline int64_t _dtlike_to_datetime64(object val, # <<<<<<<<<<<<<< * pandas_datetimestruct *dts): * dts.year = val.year */ static CYTHON_INLINE __pyx_t_5numpy_int64_t __pyx_f_8datetime__dtlike_to_datetime64(PyObject *__pyx_v_val, pandas_datetimestruct *__pyx_v_dts) { __pyx_t_5numpy_int64_t __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; npy_int64 __pyx_t_2; npy_int32 __pyx_t_3; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_dtlike_to_datetime64", 0); /* "datetime.pxd":175 * cdef inline int64_t _dtlike_to_datetime64(object val, * pandas_datetimestruct *dts): * dts.year = val.year # <<<<<<<<<<<<<< * dts.month = val.month * dts.day = val.day */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_val, __pyx_n_s__year); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 175; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyInt_from_py_npy_int64(__pyx_t_1); if (unlikely((__pyx_t_2 == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 175; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_dts->year = __pyx_t_2; /* "datetime.pxd":176 * pandas_datetimestruct *dts): * dts.year = val.year * dts.month = val.month # <<<<<<<<<<<<<< * dts.day = val.day * dts.hour = val.hour */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_val, __pyx_n_s__month); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 176; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __Pyx_PyInt_from_py_npy_int32(__pyx_t_1); if (unlikely((__pyx_t_3 == (npy_int32)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 176; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_dts->month = __pyx_t_3; /* "datetime.pxd":177 * dts.year = val.year * dts.month = val.month * dts.day = val.day # <<<<<<<<<<<<<< * dts.hour = val.hour * dts.min = val.minute */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_val, __pyx_n_s__day); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 177; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __Pyx_PyInt_from_py_npy_int32(__pyx_t_1); if (unlikely((__pyx_t_3 == (npy_int32)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 177; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_dts->day = __pyx_t_3; /* "datetime.pxd":178 * dts.month = val.month * dts.day = val.day * dts.hour = val.hour # <<<<<<<<<<<<<< * dts.min = val.minute * dts.sec = val.second */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_val, __pyx_n_s__hour); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 178; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __Pyx_PyInt_from_py_npy_int32(__pyx_t_1); if (unlikely((__pyx_t_3 == (npy_int32)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 178; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_dts->hour = __pyx_t_3; /* "datetime.pxd":179 * dts.day = val.day * dts.hour = val.hour * dts.min = val.minute # <<<<<<<<<<<<<< * dts.sec = val.second * dts.us = val.microsecond */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_val, __pyx_n_s__minute); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 179; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __Pyx_PyInt_from_py_npy_int32(__pyx_t_1); if (unlikely((__pyx_t_3 == (npy_int32)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 179; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_dts->min = __pyx_t_3; /* "datetime.pxd":180 * dts.hour = val.hour * dts.min = val.minute * dts.sec = val.second # <<<<<<<<<<<<<< * dts.us = val.microsecond * dts.ps = dts.as = 0 */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_val, __pyx_n_s__second); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __Pyx_PyInt_from_py_npy_int32(__pyx_t_1); if (unlikely((__pyx_t_3 == (npy_int32)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_dts->sec = __pyx_t_3; /* "datetime.pxd":181 * dts.min = val.minute * dts.sec = val.second * dts.us = val.microsecond # <<<<<<<<<<<<<< * dts.ps = dts.as = 0 * return pandas_datetimestruct_to_datetime(PANDAS_FR_ns, dts) */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_val, __pyx_n_s__microsecond); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 181; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __Pyx_PyInt_from_py_npy_int32(__pyx_t_1); if (unlikely((__pyx_t_3 == (npy_int32)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 181; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_dts->us = __pyx_t_3; /* "datetime.pxd":182 * dts.sec = val.second * dts.us = val.microsecond * dts.ps = dts.as = 0 # <<<<<<<<<<<<<< * return pandas_datetimestruct_to_datetime(PANDAS_FR_ns, dts) * */ __pyx_v_dts->ps = 0; __pyx_v_dts->as = 0; /* "datetime.pxd":183 * dts.us = val.microsecond * dts.ps = dts.as = 0 * return pandas_datetimestruct_to_datetime(PANDAS_FR_ns, dts) # <<<<<<<<<<<<<< * * cdef inline int64_t _date_to_datetime64(object val, */ __pyx_r = pandas_datetimestruct_to_datetime(PANDAS_FR_ns, __pyx_v_dts); goto __pyx_L0; __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_WriteUnraisable("datetime._dtlike_to_datetime64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "datetime.pxd":185 * return pandas_datetimestruct_to_datetime(PANDAS_FR_ns, dts) * * cdef inline int64_t _date_to_datetime64(object val, # <<<<<<<<<<<<<< * pandas_datetimestruct *dts): * dts.year = PyDateTime_GET_YEAR(val) */ static CYTHON_INLINE __pyx_t_5numpy_int64_t __pyx_f_8datetime__date_to_datetime64(PyObject *__pyx_v_val, pandas_datetimestruct *__pyx_v_dts) { __pyx_t_5numpy_int64_t __pyx_r; __Pyx_RefNannyDeclarations int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_date_to_datetime64", 0); /* "datetime.pxd":187 * cdef inline int64_t _date_to_datetime64(object val, * pandas_datetimestruct *dts): * dts.year = PyDateTime_GET_YEAR(val) # <<<<<<<<<<<<<< * dts.month = PyDateTime_GET_MONTH(val) * dts.day = PyDateTime_GET_DAY(val) */ if (!(likely(((__pyx_v_val) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_val, __pyx_ptype_8datetime_date))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 187; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_dts->year = PyDateTime_GET_YEAR(((PyDateTime_Date *)__pyx_v_val)); /* "datetime.pxd":188 * pandas_datetimestruct *dts): * dts.year = PyDateTime_GET_YEAR(val) * dts.month = PyDateTime_GET_MONTH(val) # <<<<<<<<<<<<<< * dts.day = PyDateTime_GET_DAY(val) * dts.hour = dts.min = dts.sec = dts.us = 0 */ if (!(likely(((__pyx_v_val) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_val, __pyx_ptype_8datetime_date))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 188; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_dts->month = PyDateTime_GET_MONTH(((PyDateTime_Date *)__pyx_v_val)); /* "datetime.pxd":189 * dts.year = PyDateTime_GET_YEAR(val) * dts.month = PyDateTime_GET_MONTH(val) * dts.day = PyDateTime_GET_DAY(val) # <<<<<<<<<<<<<< * dts.hour = dts.min = dts.sec = dts.us = 0 * dts.ps = dts.as = 0 */ if (!(likely(((__pyx_v_val) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_val, __pyx_ptype_8datetime_date))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 189; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_dts->day = PyDateTime_GET_DAY(((PyDateTime_Date *)__pyx_v_val)); /* "datetime.pxd":190 * dts.month = PyDateTime_GET_MONTH(val) * dts.day = PyDateTime_GET_DAY(val) * dts.hour = dts.min = dts.sec = dts.us = 0 # <<<<<<<<<<<<<< * dts.ps = dts.as = 0 * return pandas_datetimestruct_to_datetime(PANDAS_FR_ns, dts) */ __pyx_v_dts->hour = 0; __pyx_v_dts->min = 0; __pyx_v_dts->sec = 0; __pyx_v_dts->us = 0; /* "datetime.pxd":191 * dts.day = PyDateTime_GET_DAY(val) * dts.hour = dts.min = dts.sec = dts.us = 0 * dts.ps = dts.as = 0 # <<<<<<<<<<<<<< * return pandas_datetimestruct_to_datetime(PANDAS_FR_ns, dts) * */ __pyx_v_dts->ps = 0; __pyx_v_dts->as = 0; /* "datetime.pxd":192 * dts.hour = dts.min = dts.sec = dts.us = 0 * dts.ps = dts.as = 0 * return pandas_datetimestruct_to_datetime(PANDAS_FR_ns, dts) # <<<<<<<<<<<<<< * */ __pyx_r = pandas_datetimestruct_to_datetime(PANDAS_FR_ns, __pyx_v_dts); goto __pyx_L0; __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_WriteUnraisable("datetime._date_to_datetime64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* 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)); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "numpy.pxd":196 * # 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 fullfill the PEP. */ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags) { int __pyx_v_copy_shape; 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_v_hasfields; int __pyx_r; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; int __pyx_t_5; int __pyx_t_6; int __pyx_t_7; PyObject *__pyx_t_8 = NULL; char *__pyx_t_9; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__getbuffer__", 0); if (__pyx_v_info != NULL) { __pyx_v_info->obj = Py_None; __Pyx_INCREF(Py_None); __Pyx_GIVEREF(__pyx_v_info->obj); } /* "numpy.pxd":202 * # of flags * * if info == NULL: return # <<<<<<<<<<<<<< * * cdef int copy_shape, i, ndim */ __pyx_t_1 = ((__pyx_v_info == NULL) != 0); if (__pyx_t_1) { __pyx_r = 0; goto __pyx_L0; goto __pyx_L3; } __pyx_L3:; /* "numpy.pxd":205 * * cdef int copy_shape, i, ndim * cdef int endian_detector = 1 # <<<<<<<<<<<<<< * cdef bint little_endian = ((&endian_detector)[0] != 0) * */ __pyx_v_endian_detector = 1; /* "numpy.pxd":206 * cdef int copy_shape, 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); /* "numpy.pxd":208 * cdef bint little_endian = ((&endian_detector)[0] != 0) * * ndim = PyArray_NDIM(self) # <<<<<<<<<<<<<< * * if sizeof(npy_intp) != sizeof(Py_ssize_t): */ __pyx_v_ndim = PyArray_NDIM(__pyx_v_self); /* "numpy.pxd":210 * ndim = PyArray_NDIM(self) * * if sizeof(npy_intp) != sizeof(Py_ssize_t): # <<<<<<<<<<<<<< * copy_shape = 1 * else: */ __pyx_t_1 = (((sizeof(npy_intp)) != (sizeof(Py_ssize_t))) != 0); if (__pyx_t_1) { /* "numpy.pxd":211 * * if sizeof(npy_intp) != sizeof(Py_ssize_t): * copy_shape = 1 # <<<<<<<<<<<<<< * else: * copy_shape = 0 */ __pyx_v_copy_shape = 1; goto __pyx_L4; } /*else*/ { /* "numpy.pxd":213 * copy_shape = 1 * else: * copy_shape = 0 # <<<<<<<<<<<<<< * * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) */ __pyx_v_copy_shape = 0; } __pyx_L4:; /* "numpy.pxd":215 * copy_shape = 0 * * 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_1 = (((__pyx_v_flags & PyBUF_C_CONTIGUOUS) == PyBUF_C_CONTIGUOUS) != 0); if (__pyx_t_1) { /* "numpy.pxd":216 * * 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_3 = __pyx_t_2; } else { __pyx_t_3 = __pyx_t_1; } if (__pyx_t_3) { /* "numpy.pxd":217 * 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_4 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_18), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 217; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[3]; __pyx_lineno = 217; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L5; } __pyx_L5:; /* "numpy.pxd":219 * 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_3 = (((__pyx_v_flags & PyBUF_F_CONTIGUOUS) == PyBUF_F_CONTIGUOUS) != 0); if (__pyx_t_3) { /* "numpy.pxd":220 * * 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_1 = ((!(PyArray_CHKFLAGS(__pyx_v_self, NPY_F_CONTIGUOUS) != 0)) != 0); __pyx_t_2 = __pyx_t_1; } else { __pyx_t_2 = __pyx_t_3; } if (__pyx_t_2) { /* "numpy.pxd":221 * 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_4 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_20), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 221; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[3]; __pyx_lineno = 221; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L6; } __pyx_L6:; /* "numpy.pxd":223 * raise ValueError(u"ndarray is not Fortran contiguous") * * info.buf = PyArray_DATA(self) # <<<<<<<<<<<<<< * info.ndim = ndim * if copy_shape: */ __pyx_v_info->buf = PyArray_DATA(__pyx_v_self); /* "numpy.pxd":224 * * info.buf = PyArray_DATA(self) * info.ndim = ndim # <<<<<<<<<<<<<< * if copy_shape: * # Allocate new buffer for strides and shape info. */ __pyx_v_info->ndim = __pyx_v_ndim; /* "numpy.pxd":225 * info.buf = PyArray_DATA(self) * info.ndim = ndim * if copy_shape: # <<<<<<<<<<<<<< * # Allocate new buffer for strides and shape info. * # This is allocated as one block, strides first. */ __pyx_t_2 = (__pyx_v_copy_shape != 0); if (__pyx_t_2) { /* "numpy.pxd":228 * # Allocate new buffer for strides and shape info. * # This is allocated as one block, strides first. * info.strides = stdlib.malloc(sizeof(Py_ssize_t) * ndim * 2) # <<<<<<<<<<<<<< * info.shape = info.strides + ndim * for i in range(ndim): */ __pyx_v_info->strides = ((Py_ssize_t *)malloc((((sizeof(Py_ssize_t)) * ((size_t)__pyx_v_ndim)) * 2))); /* "numpy.pxd":229 * # This is allocated as one block, strides first. * info.strides = stdlib.malloc(sizeof(Py_ssize_t) * ndim * 2) * 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); /* "numpy.pxd":230 * info.strides = stdlib.malloc(sizeof(Py_ssize_t) * ndim * 2) * 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_5 = __pyx_v_ndim; for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) { __pyx_v_i = __pyx_t_6; /* "numpy.pxd":231 * 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]); /* "numpy.pxd":232 * 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]); } goto __pyx_L7; } /*else*/ { /* "numpy.pxd":234 * info.shape[i] = PyArray_DIMS(self)[i] * else: * info.strides = PyArray_STRIDES(self) # <<<<<<<<<<<<<< * info.shape = PyArray_DIMS(self) * info.suboffsets = NULL */ __pyx_v_info->strides = ((Py_ssize_t *)PyArray_STRIDES(__pyx_v_self)); /* "numpy.pxd":235 * 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_L7:; /* "numpy.pxd":236 * 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; /* "numpy.pxd":237 * 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); /* "numpy.pxd":238 * 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)); /* "numpy.pxd":241 * * cdef int t * cdef char* f = NULL # <<<<<<<<<<<<<< * cdef dtype descr = self.descr * cdef list stack */ __pyx_v_f = NULL; /* "numpy.pxd":242 * cdef int t * cdef char* f = NULL * cdef dtype descr = self.descr # <<<<<<<<<<<<<< * cdef list stack * cdef int offset */ __pyx_t_4 = ((PyObject *)__pyx_v_self->descr); __Pyx_INCREF(__pyx_t_4); __pyx_v_descr = ((PyArray_Descr *)__pyx_t_4); __pyx_t_4 = 0; /* "numpy.pxd":246 * cdef int offset * * cdef bint hasfields = PyDataType_HASFIELDS(descr) # <<<<<<<<<<<<<< * * if not hasfields and not copy_shape: */ __pyx_v_hasfields = PyDataType_HASFIELDS(__pyx_v_descr); /* "numpy.pxd":248 * cdef bint hasfields = PyDataType_HASFIELDS(descr) * * if not hasfields and not copy_shape: # <<<<<<<<<<<<<< * # do not call releasebuffer * info.obj = None */ __pyx_t_2 = ((!(__pyx_v_hasfields != 0)) != 0); if (__pyx_t_2) { __pyx_t_3 = ((!(__pyx_v_copy_shape != 0)) != 0); __pyx_t_1 = __pyx_t_3; } else { __pyx_t_1 = __pyx_t_2; } if (__pyx_t_1) { /* "numpy.pxd":250 * if not hasfields and not copy_shape: * # do not call releasebuffer * info.obj = None # <<<<<<<<<<<<<< * else: * # need to call releasebuffer */ __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_info->obj); __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = Py_None; goto __pyx_L10; } /*else*/ { /* "numpy.pxd":253 * else: * # need to call releasebuffer * info.obj = self # <<<<<<<<<<<<<< * * if not hasfields: */ __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); } __pyx_L10:; /* "numpy.pxd":255 * info.obj = self * * if not hasfields: # <<<<<<<<<<<<<< * t = descr.type_num * if ((descr.byteorder == '>' and little_endian) or */ __pyx_t_1 = ((!(__pyx_v_hasfields != 0)) != 0); if (__pyx_t_1) { /* "numpy.pxd":256 * * if not hasfields: * t = descr.type_num # <<<<<<<<<<<<<< * if ((descr.byteorder == '>' and little_endian) or * (descr.byteorder == '<' and not little_endian)): */ __pyx_t_5 = __pyx_v_descr->type_num; __pyx_v_t = __pyx_t_5; /* "numpy.pxd":257 * if not hasfields: * t = descr.type_num * if ((descr.byteorder == '>' and little_endian) or # <<<<<<<<<<<<<< * (descr.byteorder == '<' and not little_endian)): * raise ValueError(u"Non-native byte order not supported") */ __pyx_t_1 = ((__pyx_v_descr->byteorder == '>') != 0); if (__pyx_t_1) { __pyx_t_2 = (__pyx_v_little_endian != 0); } else { __pyx_t_2 = __pyx_t_1; } if (!__pyx_t_2) { /* "numpy.pxd":258 * t = descr.type_num * if ((descr.byteorder == '>' and little_endian) or * (descr.byteorder == '<' and not little_endian)): # <<<<<<<<<<<<<< * raise ValueError(u"Non-native byte order not supported") * if t == NPY_BYTE: f = "b" */ __pyx_t_1 = ((__pyx_v_descr->byteorder == '<') != 0); if (__pyx_t_1) { __pyx_t_3 = ((!(__pyx_v_little_endian != 0)) != 0); __pyx_t_7 = __pyx_t_3; } else { __pyx_t_7 = __pyx_t_1; } __pyx_t_1 = __pyx_t_7; } else { __pyx_t_1 = __pyx_t_2; } if (__pyx_t_1) { /* "numpy.pxd":259 * if ((descr.byteorder == '>' and little_endian) or * (descr.byteorder == '<' 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_4 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_22), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 259; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[3]; __pyx_lineno = 259; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L12; } __pyx_L12:; /* "numpy.pxd":276 * 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) */ switch (__pyx_v_t) { /* "numpy.pxd":260 * (descr.byteorder == '<' 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" */ case NPY_BYTE: __pyx_v_f = __pyx_k__b; break; /* "numpy.pxd":261 * 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 = __pyx_k__B; break; /* "numpy.pxd":262 * 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 = __pyx_k__h; break; /* "numpy.pxd":263 * 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 = __pyx_k__H; break; /* "numpy.pxd":264 * 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 = __pyx_k__i; break; /* "numpy.pxd":265 * 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 = __pyx_k__I; break; /* "numpy.pxd":266 * 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 = __pyx_k__l; break; /* "numpy.pxd":267 * 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 = __pyx_k__L; break; /* "numpy.pxd":268 * 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 = __pyx_k__q; break; /* "numpy.pxd":269 * 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 = __pyx_k__Q; break; /* "numpy.pxd":270 * 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 = __pyx_k__f; break; /* "numpy.pxd":271 * 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 = __pyx_k__d; break; /* "numpy.pxd":272 * 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 = __pyx_k__g; break; /* "numpy.pxd":273 * 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 = __pyx_k__Zf; break; /* "numpy.pxd":274 * 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 = __pyx_k__Zd; break; /* "numpy.pxd":275 * 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 = __pyx_k__Zg; break; /* "numpy.pxd":276 * 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 = __pyx_k__O; break; default: /* "numpy.pxd":278 * elif t == NPY_OBJECT: f = "O" * else: * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) # <<<<<<<<<<<<<< * info.format = f * return */ __pyx_t_4 = PyInt_FromLong(__pyx_v_t); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 278; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_8 = PyNumber_Remainder(((PyObject *)__pyx_kp_u_23), __pyx_t_4); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 278; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_8)); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 278; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_t_8)); __Pyx_GIVEREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0; __pyx_t_8 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 278; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __Pyx_Raise(__pyx_t_8, 0, 0, 0); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; {__pyx_filename = __pyx_f[3]; __pyx_lineno = 278; __pyx_clineno = __LINE__; goto __pyx_L1_error;} break; } /* "numpy.pxd":279 * else: * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) * info.format = f # <<<<<<<<<<<<<< * return * else: */ __pyx_v_info->format = __pyx_v_f; /* "numpy.pxd":280 * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) * info.format = f * return # <<<<<<<<<<<<<< * else: * info.format = stdlib.malloc(_buffer_format_string_len) */ __pyx_r = 0; goto __pyx_L0; goto __pyx_L11; } /*else*/ { /* "numpy.pxd":282 * return * else: * info.format = stdlib.malloc(_buffer_format_string_len) # <<<<<<<<<<<<<< * info.format[0] = '^' # Native data types, manual alignment * offset = 0 */ __pyx_v_info->format = ((char *)malloc(255)); /* "numpy.pxd":283 * else: * info.format = stdlib.malloc(_buffer_format_string_len) * info.format[0] = '^' # Native data types, manual alignment # <<<<<<<<<<<<<< * offset = 0 * f = _util_dtypestring(descr, info.format + 1, */ (__pyx_v_info->format[0]) = '^'; /* "numpy.pxd":284 * info.format = stdlib.malloc(_buffer_format_string_len) * info.format[0] = '^' # Native data types, manual alignment * offset = 0 # <<<<<<<<<<<<<< * f = _util_dtypestring(descr, info.format + 1, * info.format + _buffer_format_string_len, */ __pyx_v_offset = 0; /* "numpy.pxd":287 * f = _util_dtypestring(descr, info.format + 1, * info.format + _buffer_format_string_len, * &offset) # <<<<<<<<<<<<<< * f[0] = 0 # Terminate format string * */ __pyx_t_9 = __pyx_f_5numpy__util_dtypestring(__pyx_v_descr, (__pyx_v_info->format + 1), (__pyx_v_info->format + 255), (&__pyx_v_offset)); if (unlikely(__pyx_t_9 == NULL)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 285; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_f = __pyx_t_9; /* "numpy.pxd":288 * info.format + _buffer_format_string_len, * &offset) * f[0] = 0 # Terminate format string # <<<<<<<<<<<<<< * * def __releasebuffer__(ndarray self, Py_buffer* info): */ (__pyx_v_f[0]) = 0; } __pyx_L11:; __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_8); __Pyx_AddTraceback("numpy.ndarray.__getbuffer__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; if (__pyx_v_info != NULL && __pyx_v_info->obj != NULL) { __Pyx_GOTREF(__pyx_v_info->obj); __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = NULL; } goto __pyx_L2; __pyx_L0:; if (__pyx_v_info != NULL && __pyx_v_info->obj == Py_None) { __Pyx_GOTREF(Py_None); __Pyx_DECREF(Py_None); __pyx_v_info->obj = NULL; } __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_descr); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* 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)); __Pyx_RefNannyFinishContext(); } /* "numpy.pxd":290 * f[0] = 0 # Terminate format string * * def __releasebuffer__(ndarray self, Py_buffer* info): # <<<<<<<<<<<<<< * if PyArray_HASFIELDS(self): * stdlib.free(info.format) */ 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); /* "numpy.pxd":291 * * def __releasebuffer__(ndarray self, Py_buffer* info): * if PyArray_HASFIELDS(self): # <<<<<<<<<<<<<< * stdlib.free(info.format) * if sizeof(npy_intp) != sizeof(Py_ssize_t): */ __pyx_t_1 = (PyArray_HASFIELDS(__pyx_v_self) != 0); if (__pyx_t_1) { /* "numpy.pxd":292 * def __releasebuffer__(ndarray self, Py_buffer* info): * if PyArray_HASFIELDS(self): * stdlib.free(info.format) # <<<<<<<<<<<<<< * if sizeof(npy_intp) != sizeof(Py_ssize_t): * stdlib.free(info.strides) */ free(__pyx_v_info->format); goto __pyx_L3; } __pyx_L3:; /* "numpy.pxd":293 * if PyArray_HASFIELDS(self): * stdlib.free(info.format) * if sizeof(npy_intp) != sizeof(Py_ssize_t): # <<<<<<<<<<<<<< * stdlib.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) { /* "numpy.pxd":294 * stdlib.free(info.format) * if sizeof(npy_intp) != sizeof(Py_ssize_t): * stdlib.free(info.strides) # <<<<<<<<<<<<<< * # info.shape was stored after info.strides in the same block * */ free(__pyx_v_info->strides); goto __pyx_L4; } __pyx_L4:; __Pyx_RefNannyFinishContext(); } /* "numpy.pxd":772 * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PyArray_MultiIterNew1", 0); /* "numpy.pxd":773 * * 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_filename = __pyx_f[3]; __pyx_lineno = 773; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __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; } /* "numpy.pxd":775 * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PyArray_MultiIterNew2", 0); /* "numpy.pxd":776 * * 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_filename = __pyx_f[3]; __pyx_lineno = 776; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __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; } /* "numpy.pxd":778 * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PyArray_MultiIterNew3", 0); /* "numpy.pxd":779 * * 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_filename = __pyx_f[3]; __pyx_lineno = 779; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __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; } /* "numpy.pxd":781 * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PyArray_MultiIterNew4", 0); /* "numpy.pxd":782 * * 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_filename = __pyx_f[3]; __pyx_lineno = 782; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __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; } /* "numpy.pxd":784 * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PyArray_MultiIterNew5", 0); /* "numpy.pxd":785 * * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): * return PyArray_MultiIterNew(5, a, b, c, d, e) # <<<<<<<<<<<<<< * * cdef inline char* _util_dtypestring(dtype descr, char* f, char* end, int* offset) except NULL: */ __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_filename = __pyx_f[3]; __pyx_lineno = 785; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __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; } /* "numpy.pxd":787 * return PyArray_MultiIterNew(5, a, b, c, d, e) * * 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; PyObject *__pyx_t_5 = NULL; PyObject *(*__pyx_t_6)(PyObject *); int __pyx_t_7; int __pyx_t_8; int __pyx_t_9; int __pyx_t_10; long __pyx_t_11; char *__pyx_t_12; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_util_dtypestring", 0); /* "numpy.pxd":794 * cdef int delta_offset * cdef tuple i * cdef int endian_detector = 1 # <<<<<<<<<<<<<< * cdef bint little_endian = ((&endian_detector)[0] != 0) * cdef tuple fields */ __pyx_v_endian_detector = 1; /* "numpy.pxd":795 * cdef tuple i * 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); /* "numpy.pxd":798 * cdef tuple fields * * for childname in descr.names: # <<<<<<<<<<<<<< * fields = descr.fields[childname] * child, new_offset = fields */ if (unlikely(((PyObject *)__pyx_v_descr->names) == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); {__pyx_filename = __pyx_f[3]; __pyx_lineno = 798; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_1 = ((PyObject *)__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_COMPILING_IN_CPYTHON __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_filename = __pyx_f[3]; __pyx_lineno = 798; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 798; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif __Pyx_XDECREF_SET(__pyx_v_childname, __pyx_t_3); __pyx_t_3 = 0; /* "numpy.pxd":799 * * for childname in descr.names: * fields = descr.fields[childname] # <<<<<<<<<<<<<< * child, new_offset = fields * */ __pyx_t_3 = PyObject_GetItem(__pyx_v_descr->fields, __pyx_v_childname); if (!__pyx_t_3) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 799; __pyx_clineno = __LINE__; goto __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 tuple, got %.200s", Py_TYPE(__pyx_t_3)->tp_name), 0))) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 799; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_XDECREF_SET(__pyx_v_fields, ((PyObject*)__pyx_t_3)); __pyx_t_3 = 0; /* "numpy.pxd":800 * for childname in descr.names: * fields = descr.fields[childname] * child, new_offset = fields # <<<<<<<<<<<<<< * * if (end - f) - (new_offset - offset[0]) < 15: */ if (likely(PyTuple_CheckExact(((PyObject *)__pyx_v_fields)))) { PyObject* sequence = ((PyObject *)__pyx_v_fields); #if CYTHON_COMPILING_IN_CPYTHON Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); {__pyx_filename = __pyx_f[3]; __pyx_lineno = 800; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON __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_filename = __pyx_f[3]; __pyx_lineno = 800; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 800; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); #endif } else if (1) { __Pyx_RaiseNoneNotIterableError(); {__pyx_filename = __pyx_f[3]; __pyx_lineno = 800; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } else { Py_ssize_t index = -1; __pyx_t_5 = PyObject_GetIter(((PyObject *)__pyx_v_fields)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 800; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = Py_TYPE(__pyx_t_5)->tp_iternext; index = 0; __pyx_t_3 = __pyx_t_6(__pyx_t_5); if (unlikely(!__pyx_t_3)) goto __pyx_L5_unpacking_failed; __Pyx_GOTREF(__pyx_t_3); index = 1; __pyx_t_4 = __pyx_t_6(__pyx_t_5); if (unlikely(!__pyx_t_4)) goto __pyx_L5_unpacking_failed; __Pyx_GOTREF(__pyx_t_4); if (__Pyx_IternextUnpackEndCheck(__pyx_t_6(__pyx_t_5), 2) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 800; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_6 = NULL; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; goto __pyx_L6_unpacking_done; __pyx_L5_unpacking_failed:; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_6 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); {__pyx_filename = __pyx_f[3]; __pyx_lineno = 800; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_L6_unpacking_done:; } if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_dtype))))) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 800; __pyx_clineno = __LINE__; goto __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; /* "numpy.pxd":802 * 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 = PyInt_FromLong((__pyx_v_end - __pyx_v_f)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 802; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = PyInt_FromLong((__pyx_v_offset[0])); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 802; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = PyNumber_Subtract(__pyx_v_new_offset, __pyx_t_3); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 802; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyNumber_Subtract(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 802; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyObject_RichCompare(__pyx_t_3, __pyx_int_15, Py_LT); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 802; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 802; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_7) { /* "numpy.pxd":803 * * if (end - f) - (new_offset - offset[0]) < 15: * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") # <<<<<<<<<<<<<< * * if ((child.byteorder == '>' and little_endian) or */ __pyx_t_5 = PyObject_Call(__pyx_builtin_RuntimeError, ((PyObject *)__pyx_k_tuple_25), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 803; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_Raise(__pyx_t_5, 0, 0, 0); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; {__pyx_filename = __pyx_f[3]; __pyx_lineno = 803; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L7; } __pyx_L7:; /* "numpy.pxd":805 * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") * * if ((child.byteorder == '>' and little_endian) or # <<<<<<<<<<<<<< * (child.byteorder == '<' 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) { __pyx_t_8 = (__pyx_v_little_endian != 0); } else { __pyx_t_8 = __pyx_t_7; } if (!__pyx_t_8) { /* "numpy.pxd":806 * * if ((child.byteorder == '>' and little_endian) or * (child.byteorder == '<' 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) { __pyx_t_9 = ((!(__pyx_v_little_endian != 0)) != 0); __pyx_t_10 = __pyx_t_9; } else { __pyx_t_10 = __pyx_t_7; } __pyx_t_7 = __pyx_t_10; } else { __pyx_t_7 = __pyx_t_8; } if (__pyx_t_7) { /* "numpy.pxd":807 * if ((child.byteorder == '>' and little_endian) or * (child.byteorder == '<' 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_5 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_26), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 807; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_Raise(__pyx_t_5, 0, 0, 0); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; {__pyx_filename = __pyx_f[3]; __pyx_lineno = 807; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L8; } __pyx_L8:; /* "numpy.pxd":817 * * # Output padding bytes * while offset[0] < new_offset: # <<<<<<<<<<<<<< * f[0] = 120 # "x"; pad byte * f += 1 */ while (1) { __pyx_t_5 = PyInt_FromLong((__pyx_v_offset[0])); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 817; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = PyObject_RichCompare(__pyx_t_5, __pyx_v_new_offset, Py_LT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 817; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 817; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (!__pyx_t_7) break; /* "numpy.pxd":818 * # Output padding bytes * while offset[0] < new_offset: * f[0] = 120 # "x"; pad byte # <<<<<<<<<<<<<< * f += 1 * offset[0] += 1 */ (__pyx_v_f[0]) = 120; /* "numpy.pxd":819 * while offset[0] < new_offset: * f[0] = 120 # "x"; pad byte * f += 1 # <<<<<<<<<<<<<< * offset[0] += 1 * */ __pyx_v_f = (__pyx_v_f + 1); /* "numpy.pxd":820 * f[0] = 120 # "x"; pad byte * f += 1 * offset[0] += 1 # <<<<<<<<<<<<<< * * offset[0] += child.itemsize */ __pyx_t_11 = 0; (__pyx_v_offset[__pyx_t_11]) = ((__pyx_v_offset[__pyx_t_11]) + 1); } /* "numpy.pxd":822 * offset[0] += 1 * * offset[0] += child.itemsize # <<<<<<<<<<<<<< * * if not PyDataType_HASFIELDS(child): */ __pyx_t_11 = 0; (__pyx_v_offset[__pyx_t_11]) = ((__pyx_v_offset[__pyx_t_11]) + __pyx_v_child->elsize); /* "numpy.pxd":824 * offset[0] += child.itemsize * * if not PyDataType_HASFIELDS(child): # <<<<<<<<<<<<<< * t = child.type_num * if end - f < 5: */ __pyx_t_7 = ((!(PyDataType_HASFIELDS(__pyx_v_child) != 0)) != 0); if (__pyx_t_7) { /* "numpy.pxd":825 * * if not PyDataType_HASFIELDS(child): * t = child.type_num # <<<<<<<<<<<<<< * if end - f < 5: * raise RuntimeError(u"Format string allocated too short.") */ __pyx_t_3 = PyInt_FromLong(__pyx_v_child->type_num); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 825; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_XDECREF_SET(__pyx_v_t, __pyx_t_3); __pyx_t_3 = 0; /* "numpy.pxd":826 * if not PyDataType_HASFIELDS(child): * t = child.type_num * if end - f < 5: # <<<<<<<<<<<<<< * raise RuntimeError(u"Format string allocated too short.") * */ __pyx_t_7 = (((__pyx_v_end - __pyx_v_f) < 5) != 0); if (__pyx_t_7) { /* "numpy.pxd":827 * 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_3 = PyObject_Call(__pyx_builtin_RuntimeError, ((PyObject *)__pyx_k_tuple_28), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 827; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[3]; __pyx_lineno = 827; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L12; } __pyx_L12:; /* "numpy.pxd":830 * * # 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_3 = PyInt_FromLong(NPY_BYTE); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 830; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 830; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 830; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_7) { (__pyx_v_f[0]) = 98; goto __pyx_L13; } /* "numpy.pxd":831 * # 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_5 = PyInt_FromLong(NPY_UBYTE); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 831; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 831; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 831; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_7) { (__pyx_v_f[0]) = 66; goto __pyx_L13; } /* "numpy.pxd":832 * 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_3 = PyInt_FromLong(NPY_SHORT); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 832; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 832; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 832; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_7) { (__pyx_v_f[0]) = 104; goto __pyx_L13; } /* "numpy.pxd":833 * 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_5 = PyInt_FromLong(NPY_USHORT); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 833; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 833; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 833; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_7) { (__pyx_v_f[0]) = 72; goto __pyx_L13; } /* "numpy.pxd":834 * 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_3 = PyInt_FromLong(NPY_INT); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 834; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 834; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 834; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_7) { (__pyx_v_f[0]) = 105; goto __pyx_L13; } /* "numpy.pxd":835 * 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_5 = PyInt_FromLong(NPY_UINT); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 835; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 835; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 835; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_7) { (__pyx_v_f[0]) = 73; goto __pyx_L13; } /* "numpy.pxd":836 * 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_3 = PyInt_FromLong(NPY_LONG); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 836; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 836; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 836; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_7) { (__pyx_v_f[0]) = 108; goto __pyx_L13; } /* "numpy.pxd":837 * 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_5 = PyInt_FromLong(NPY_ULONG); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 837; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 837; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 837; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_7) { (__pyx_v_f[0]) = 76; goto __pyx_L13; } /* "numpy.pxd":838 * 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_3 = PyInt_FromLong(NPY_LONGLONG); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 838; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 838; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 838; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_7) { (__pyx_v_f[0]) = 113; goto __pyx_L13; } /* "numpy.pxd":839 * 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_5 = PyInt_FromLong(NPY_ULONGLONG); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 839; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 839; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 839; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_7) { (__pyx_v_f[0]) = 81; goto __pyx_L13; } /* "numpy.pxd":840 * 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_3 = PyInt_FromLong(NPY_FLOAT); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 840; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 840; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 840; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_7) { (__pyx_v_f[0]) = 102; goto __pyx_L13; } /* "numpy.pxd":841 * 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_5 = PyInt_FromLong(NPY_DOUBLE); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 841; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 841; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 841; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_7) { (__pyx_v_f[0]) = 100; goto __pyx_L13; } /* "numpy.pxd":842 * 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_3 = PyInt_FromLong(NPY_LONGDOUBLE); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 842; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 842; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 842; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_7) { (__pyx_v_f[0]) = 103; goto __pyx_L13; } /* "numpy.pxd":843 * 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_5 = PyInt_FromLong(NPY_CFLOAT); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 843; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 843; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 843; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_7) { (__pyx_v_f[0]) = 90; (__pyx_v_f[1]) = 102; __pyx_v_f = (__pyx_v_f + 1); goto __pyx_L13; } /* "numpy.pxd":844 * 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_3 = PyInt_FromLong(NPY_CDOUBLE); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 844; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 844; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 844; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_7) { (__pyx_v_f[0]) = 90; (__pyx_v_f[1]) = 100; __pyx_v_f = (__pyx_v_f + 1); goto __pyx_L13; } /* "numpy.pxd":845 * 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_5 = PyInt_FromLong(NPY_CLONGDOUBLE); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 845; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 845; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 845; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_7) { (__pyx_v_f[0]) = 90; (__pyx_v_f[1]) = 103; __pyx_v_f = (__pyx_v_f + 1); goto __pyx_L13; } /* "numpy.pxd":846 * 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_3 = PyInt_FromLong(NPY_OBJECT); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 846; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 846; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 846; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_7) { (__pyx_v_f[0]) = 79; goto __pyx_L13; } /*else*/ { /* "numpy.pxd":848 * elif t == NPY_OBJECT: f[0] = 79 #"O" * else: * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) # <<<<<<<<<<<<<< * f += 1 * else: */ __pyx_t_5 = PyNumber_Remainder(((PyObject *)__pyx_kp_u_23), __pyx_v_t); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 848; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_5)); __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 848; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_t_5)); __Pyx_GIVEREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; __pyx_t_5 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 848; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; __Pyx_Raise(__pyx_t_5, 0, 0, 0); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; {__pyx_filename = __pyx_f[3]; __pyx_lineno = 848; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_L13:; /* "numpy.pxd":849 * 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); goto __pyx_L11; } /*else*/ { /* "numpy.pxd":853 * # Cython ignores struct boundary information ("T{...}"), * # so don't output it * f = _util_dtypestring(child, f, end, offset) # <<<<<<<<<<<<<< * return f * */ __pyx_t_12 = __pyx_f_5numpy__util_dtypestring(__pyx_v_child, __pyx_v_f, __pyx_v_end, __pyx_v_offset); if (unlikely(__pyx_t_12 == NULL)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 853; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_f = __pyx_t_12; } __pyx_L11:; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "numpy.pxd":854 * # so don't output it * f = _util_dtypestring(child, f, end, offset) * return f # <<<<<<<<<<<<<< * * */ __pyx_r = __pyx_v_f; goto __pyx_L0; __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("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; } /* "numpy.pxd":969 * * * 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); /* "numpy.pxd":971 * 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) { /* "numpy.pxd":972 * cdef PyObject* baseptr * if base is None: * baseptr = NULL # <<<<<<<<<<<<<< * else: * Py_INCREF(base) # important to do this before decref below! */ __pyx_v_baseptr = NULL; goto __pyx_L3; } /*else*/ { /* "numpy.pxd":974 * baseptr = NULL * else: * Py_INCREF(base) # important to do this before decref below! # <<<<<<<<<<<<<< * baseptr = base * Py_XDECREF(arr.base) */ Py_INCREF(__pyx_v_base); /* "numpy.pxd":975 * 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:; /* "numpy.pxd":976 * 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); /* "numpy.pxd":977 * baseptr = base * Py_XDECREF(arr.base) * arr.base = baseptr # <<<<<<<<<<<<<< * * cdef inline object get_array_base(ndarray arr): */ __pyx_v_arr->base = __pyx_v_baseptr; __Pyx_RefNannyFinishContext(); } /* "numpy.pxd":979 * 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); /* "numpy.pxd":980 * * 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) { /* "numpy.pxd":981 * cdef inline object get_array_base(ndarray arr): * if arr.base is NULL: * return None # <<<<<<<<<<<<<< * else: * return arr.base */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(Py_None); __pyx_r = Py_None; goto __pyx_L0; goto __pyx_L3; } /*else*/ { /* "numpy.pxd":983 * return None * else: * return arr.base # <<<<<<<<<<<<<< */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_arr->base)); __pyx_r = ((PyObject *)__pyx_v_arr->base); goto __pyx_L0; } __pyx_L3:; __pyx_r = Py_None; __Pyx_INCREF(Py_None); __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } static struct __pyx_vtabstruct_6pandas_5index_IndexEngine __pyx_vtable_6pandas_5index_IndexEngine; static PyObject *__pyx_tp_new_6pandas_5index_IndexEngine(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { struct __pyx_obj_6pandas_5index_IndexEngine *p; PyObject *o; o = (*t->tp_alloc)(t, 0); if (unlikely(!o)) return 0; p = ((struct __pyx_obj_6pandas_5index_IndexEngine *)o); p->__pyx_vtab = __pyx_vtabptr_6pandas_5index_IndexEngine; p->vgetter = Py_None; Py_INCREF(Py_None); p->mapping = ((struct __pyx_obj_6pandas_9hashtable_HashTable *)Py_None); Py_INCREF(Py_None); return o; } static void __pyx_tp_dealloc_6pandas_5index_IndexEngine(PyObject *o) { struct __pyx_obj_6pandas_5index_IndexEngine *p = (struct __pyx_obj_6pandas_5index_IndexEngine *)o; PyObject_GC_UnTrack(o); Py_CLEAR(p->vgetter); Py_CLEAR(p->mapping); (*Py_TYPE(o)->tp_free)(o); } static int __pyx_tp_traverse_6pandas_5index_IndexEngine(PyObject *o, visitproc v, void *a) { int e; struct __pyx_obj_6pandas_5index_IndexEngine *p = (struct __pyx_obj_6pandas_5index_IndexEngine *)o; if (p->vgetter) { e = (*v)(p->vgetter, a); if (e) return e; } if (p->mapping) { e = (*v)(((PyObject*)p->mapping), a); if (e) return e; } return 0; } static int __pyx_tp_clear_6pandas_5index_IndexEngine(PyObject *o) { struct __pyx_obj_6pandas_5index_IndexEngine *p = (struct __pyx_obj_6pandas_5index_IndexEngine *)o; PyObject* tmp; tmp = ((PyObject*)p->vgetter); p->vgetter = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->mapping); p->mapping = ((struct __pyx_obj_6pandas_9hashtable_HashTable *)Py_None); Py_INCREF(Py_None); Py_XDECREF(tmp); return 0; } static PyObject *__pyx_getprop_6pandas_5index_11IndexEngine_is_unique(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6pandas_5index_11IndexEngine_9is_unique_1__get__(o); } static PyObject *__pyx_getprop_6pandas_5index_11IndexEngine_is_monotonic(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6pandas_5index_11IndexEngine_12is_monotonic_1__get__(o); } static PyObject *__pyx_getprop_6pandas_5index_11IndexEngine_vgetter(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6pandas_5index_11IndexEngine_7vgetter_1__get__(o); } static PyObject *__pyx_getprop_6pandas_5index_11IndexEngine_mapping(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6pandas_5index_11IndexEngine_7mapping_1__get__(o); } static PyObject *__pyx_getprop_6pandas_5index_11IndexEngine_over_size_threshold(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6pandas_5index_11IndexEngine_19over_size_threshold_1__get__(o); } static PyMethodDef __pyx_methods_6pandas_5index_IndexEngine[] = { {__Pyx_NAMESTR("get_value"), (PyCFunction)__pyx_pw_6pandas_5index_11IndexEngine_5get_value, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_5index_11IndexEngine_4get_value)}, {__Pyx_NAMESTR("set_value"), (PyCFunction)__pyx_pw_6pandas_5index_11IndexEngine_7set_value, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_5index_11IndexEngine_6set_value)}, {__Pyx_NAMESTR("get_loc"), (PyCFunction)__pyx_pw_6pandas_5index_11IndexEngine_9get_loc, METH_O, __Pyx_DOCSTR(0)}, {__Pyx_NAMESTR("_call_monotonic"), (PyCFunction)__pyx_pw_6pandas_5index_11IndexEngine_11_call_monotonic, METH_O, __Pyx_DOCSTR(0)}, {__Pyx_NAMESTR("clear_mapping"), (PyCFunction)__pyx_pw_6pandas_5index_11IndexEngine_13clear_mapping, METH_NOARGS, __Pyx_DOCSTR(0)}, {__Pyx_NAMESTR("get_indexer"), (PyCFunction)__pyx_pw_6pandas_5index_11IndexEngine_15get_indexer, METH_O, __Pyx_DOCSTR(0)}, {__Pyx_NAMESTR("get_indexer_non_unique"), (PyCFunction)__pyx_pw_6pandas_5index_11IndexEngine_17get_indexer_non_unique, METH_O, __Pyx_DOCSTR(__pyx_doc_6pandas_5index_11IndexEngine_16get_indexer_non_unique)}, {0, 0, 0, 0} }; static struct PyGetSetDef __pyx_getsets_6pandas_5index_IndexEngine[] = { {(char *)"is_unique", __pyx_getprop_6pandas_5index_11IndexEngine_is_unique, 0, 0, 0}, {(char *)"is_monotonic", __pyx_getprop_6pandas_5index_11IndexEngine_is_monotonic, 0, 0, 0}, {(char *)"vgetter", __pyx_getprop_6pandas_5index_11IndexEngine_vgetter, 0, 0, 0}, {(char *)"mapping", __pyx_getprop_6pandas_5index_11IndexEngine_mapping, 0, 0, 0}, {(char *)"over_size_threshold", __pyx_getprop_6pandas_5index_11IndexEngine_over_size_threshold, 0, 0, 0}, {0, 0, 0, 0, 0} }; static PySequenceMethods __pyx_tp_as_sequence_IndexEngine = { 0, /*sq_length*/ 0, /*sq_concat*/ 0, /*sq_repeat*/ 0, /*sq_item*/ 0, /*sq_slice*/ 0, /*sq_ass_item*/ 0, /*sq_ass_slice*/ __pyx_pw_6pandas_5index_11IndexEngine_3__contains__, /*sq_contains*/ 0, /*sq_inplace_concat*/ 0, /*sq_inplace_repeat*/ }; static PyTypeObject __pyx_type_6pandas_5index_IndexEngine = { PyVarObject_HEAD_INIT(0, 0) __Pyx_NAMESTR("pandas.index.IndexEngine"), /*tp_name*/ sizeof(struct __pyx_obj_6pandas_5index_IndexEngine), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_6pandas_5index_IndexEngine, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #else 0, /*reserved*/ #endif 0, /*tp_repr*/ 0, /*tp_as_number*/ &__pyx_tp_as_sequence_IndexEngine, /*tp_as_sequence*/ 0, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ 0, /*tp_doc*/ __pyx_tp_traverse_6pandas_5index_IndexEngine, /*tp_traverse*/ __pyx_tp_clear_6pandas_5index_IndexEngine, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_6pandas_5index_IndexEngine, /*tp_methods*/ 0, /*tp_members*/ __pyx_getsets_6pandas_5index_IndexEngine, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ __pyx_pw_6pandas_5index_11IndexEngine_1__init__, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_6pandas_5index_IndexEngine, /*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*/ #if PY_VERSION_HEX >= 0x02060000 0, /*tp_version_tag*/ #endif #if PY_VERSION_HEX >= 0x030400a1 && defined(Py_TPFLAGS_HAVE_FINALIZE) 0, /*tp_finalize*/ #endif }; static struct __pyx_vtabstruct_6pandas_5index_Int64Engine __pyx_vtable_6pandas_5index_Int64Engine; static PyObject *__pyx_tp_new_6pandas_5index_Int64Engine(PyTypeObject *t, PyObject *a, PyObject *k) { struct __pyx_obj_6pandas_5index_Int64Engine *p; PyObject *o = __pyx_tp_new_6pandas_5index_IndexEngine(t, a, k); if (unlikely(!o)) return 0; p = ((struct __pyx_obj_6pandas_5index_Int64Engine *)o); p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_6pandas_5index_IndexEngine*)__pyx_vtabptr_6pandas_5index_Int64Engine; return o; } static PyMethodDef __pyx_methods_6pandas_5index_Int64Engine[] = { {__Pyx_NAMESTR("_call_monotonic"), (PyCFunction)__pyx_pw_6pandas_5index_11Int64Engine_1_call_monotonic, METH_O, __Pyx_DOCSTR(0)}, {__Pyx_NAMESTR("get_pad_indexer"), (PyCFunction)__pyx_pw_6pandas_5index_11Int64Engine_3get_pad_indexer, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}, {__Pyx_NAMESTR("get_backfill_indexer"), (PyCFunction)__pyx_pw_6pandas_5index_11Int64Engine_5get_backfill_indexer, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}, {0, 0, 0, 0} }; static PyTypeObject __pyx_type_6pandas_5index_Int64Engine = { PyVarObject_HEAD_INIT(0, 0) __Pyx_NAMESTR("pandas.index.Int64Engine"), /*tp_name*/ sizeof(struct __pyx_obj_6pandas_5index_Int64Engine), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_6pandas_5index_IndexEngine, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #else 0, /*reserved*/ #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*/ 0, /*tp_doc*/ __pyx_tp_traverse_6pandas_5index_IndexEngine, /*tp_traverse*/ __pyx_tp_clear_6pandas_5index_IndexEngine, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_6pandas_5index_Int64Engine, /*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_5index_11IndexEngine_1__init__, /*tp_init*/ #else 0, /*tp_init*/ #endif 0, /*tp_alloc*/ __pyx_tp_new_6pandas_5index_Int64Engine, /*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*/ #if PY_VERSION_HEX >= 0x02060000 0, /*tp_version_tag*/ #endif #if PY_VERSION_HEX >= 0x030400a1 && defined(Py_TPFLAGS_HAVE_FINALIZE) 0, /*tp_finalize*/ #endif }; static struct __pyx_vtabstruct_6pandas_5index_DatetimeEngine __pyx_vtable_6pandas_5index_DatetimeEngine; static PyObject *__pyx_tp_new_6pandas_5index_DatetimeEngine(PyTypeObject *t, PyObject *a, PyObject *k) { struct __pyx_obj_6pandas_5index_DatetimeEngine *p; PyObject *o = __pyx_tp_new_6pandas_5index_Int64Engine(t, a, k); if (unlikely(!o)) return 0; p = ((struct __pyx_obj_6pandas_5index_DatetimeEngine *)o); p->__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_6pandas_5index_IndexEngine*)__pyx_vtabptr_6pandas_5index_DatetimeEngine; return o; } static PyMethodDef __pyx_methods_6pandas_5index_DatetimeEngine[] = { {__Pyx_NAMESTR("_call_monotonic"), (PyCFunction)__pyx_pw_6pandas_5index_14DatetimeEngine_3_call_monotonic, METH_O, __Pyx_DOCSTR(0)}, {__Pyx_NAMESTR("get_loc"), (PyCFunction)__pyx_pw_6pandas_5index_14DatetimeEngine_5get_loc, METH_O, __Pyx_DOCSTR(0)}, {__Pyx_NAMESTR("get_indexer"), (PyCFunction)__pyx_pw_6pandas_5index_14DatetimeEngine_7get_indexer, METH_O, __Pyx_DOCSTR(0)}, {__Pyx_NAMESTR("get_pad_indexer"), (PyCFunction)__pyx_pw_6pandas_5index_14DatetimeEngine_9get_pad_indexer, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}, {__Pyx_NAMESTR("get_backfill_indexer"), (PyCFunction)__pyx_pw_6pandas_5index_14DatetimeEngine_11get_backfill_indexer, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}, {0, 0, 0, 0} }; static PySequenceMethods __pyx_tp_as_sequence_DatetimeEngine = { 0, /*sq_length*/ 0, /*sq_concat*/ 0, /*sq_repeat*/ 0, /*sq_item*/ 0, /*sq_slice*/ 0, /*sq_ass_item*/ 0, /*sq_ass_slice*/ __pyx_pw_6pandas_5index_14DatetimeEngine_1__contains__, /*sq_contains*/ 0, /*sq_inplace_concat*/ 0, /*sq_inplace_repeat*/ }; static PyTypeObject __pyx_type_6pandas_5index_DatetimeEngine = { PyVarObject_HEAD_INIT(0, 0) __Pyx_NAMESTR("pandas.index.DatetimeEngine"), /*tp_name*/ sizeof(struct __pyx_obj_6pandas_5index_DatetimeEngine), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_6pandas_5index_IndexEngine, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #else 0, /*reserved*/ #endif 0, /*tp_repr*/ 0, /*tp_as_number*/ &__pyx_tp_as_sequence_DatetimeEngine, /*tp_as_sequence*/ 0, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ 0, /*tp_doc*/ __pyx_tp_traverse_6pandas_5index_IndexEngine, /*tp_traverse*/ __pyx_tp_clear_6pandas_5index_IndexEngine, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_6pandas_5index_DatetimeEngine, /*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_5index_11IndexEngine_1__init__, /*tp_init*/ #else 0, /*tp_init*/ #endif 0, /*tp_alloc*/ __pyx_tp_new_6pandas_5index_DatetimeEngine, /*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*/ #if PY_VERSION_HEX >= 0x02060000 0, /*tp_version_tag*/ #endif #if PY_VERSION_HEX >= 0x030400a1 && defined(Py_TPFLAGS_HAVE_FINALIZE) 0, /*tp_finalize*/ #endif }; static struct __pyx_vtabstruct_6pandas_5index_ObjectEngine __pyx_vtable_6pandas_5index_ObjectEngine; static PyObject *__pyx_tp_new_6pandas_5index_ObjectEngine(PyTypeObject *t, PyObject *a, PyObject *k) { struct __pyx_obj_6pandas_5index_ObjectEngine *p; PyObject *o = __pyx_tp_new_6pandas_5index_IndexEngine(t, a, k); if (unlikely(!o)) return 0; p = ((struct __pyx_obj_6pandas_5index_ObjectEngine *)o); p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_6pandas_5index_IndexEngine*)__pyx_vtabptr_6pandas_5index_ObjectEngine; return o; } static PyMethodDef __pyx_methods_6pandas_5index_ObjectEngine[] = { {__Pyx_NAMESTR("_call_monotonic"), (PyCFunction)__pyx_pw_6pandas_5index_12ObjectEngine_1_call_monotonic, METH_O, __Pyx_DOCSTR(0)}, {__Pyx_NAMESTR("get_pad_indexer"), (PyCFunction)__pyx_pw_6pandas_5index_12ObjectEngine_3get_pad_indexer, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}, {__Pyx_NAMESTR("get_backfill_indexer"), (PyCFunction)__pyx_pw_6pandas_5index_12ObjectEngine_5get_backfill_indexer, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}, {0, 0, 0, 0} }; static PyTypeObject __pyx_type_6pandas_5index_ObjectEngine = { PyVarObject_HEAD_INIT(0, 0) __Pyx_NAMESTR("pandas.index.ObjectEngine"), /*tp_name*/ sizeof(struct __pyx_obj_6pandas_5index_ObjectEngine), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_6pandas_5index_IndexEngine, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #else 0, /*reserved*/ #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*/ 0, /*tp_doc*/ __pyx_tp_traverse_6pandas_5index_IndexEngine, /*tp_traverse*/ __pyx_tp_clear_6pandas_5index_IndexEngine, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_6pandas_5index_ObjectEngine, /*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_5index_11IndexEngine_1__init__, /*tp_init*/ #else 0, /*tp_init*/ #endif 0, /*tp_alloc*/ __pyx_tp_new_6pandas_5index_ObjectEngine, /*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*/ #if PY_VERSION_HEX >= 0x02060000 0, /*tp_version_tag*/ #endif #if PY_VERSION_HEX >= 0x030400a1 && defined(Py_TPFLAGS_HAVE_FINALIZE) 0, /*tp_finalize*/ #endif }; static struct __pyx_vtabstruct_6pandas_5index_Float64Engine __pyx_vtable_6pandas_5index_Float64Engine; static PyObject *__pyx_tp_new_6pandas_5index_Float64Engine(PyTypeObject *t, PyObject *a, PyObject *k) { struct __pyx_obj_6pandas_5index_Float64Engine *p; PyObject *o = __pyx_tp_new_6pandas_5index_IndexEngine(t, a, k); if (unlikely(!o)) return 0; p = ((struct __pyx_obj_6pandas_5index_Float64Engine *)o); p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_6pandas_5index_IndexEngine*)__pyx_vtabptr_6pandas_5index_Float64Engine; return o; } static PyMethodDef __pyx_methods_6pandas_5index_Float64Engine[] = { {__Pyx_NAMESTR("_call_monotonic"), (PyCFunction)__pyx_pw_6pandas_5index_13Float64Engine_1_call_monotonic, METH_O, __Pyx_DOCSTR(0)}, {__Pyx_NAMESTR("get_pad_indexer"), (PyCFunction)__pyx_pw_6pandas_5index_13Float64Engine_3get_pad_indexer, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}, {__Pyx_NAMESTR("get_backfill_indexer"), (PyCFunction)__pyx_pw_6pandas_5index_13Float64Engine_5get_backfill_indexer, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}, {0, 0, 0, 0} }; static PyTypeObject __pyx_type_6pandas_5index_Float64Engine = { PyVarObject_HEAD_INIT(0, 0) __Pyx_NAMESTR("pandas.index.Float64Engine"), /*tp_name*/ sizeof(struct __pyx_obj_6pandas_5index_Float64Engine), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_6pandas_5index_IndexEngine, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #else 0, /*reserved*/ #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*/ 0, /*tp_doc*/ __pyx_tp_traverse_6pandas_5index_IndexEngine, /*tp_traverse*/ __pyx_tp_clear_6pandas_5index_IndexEngine, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_6pandas_5index_Float64Engine, /*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_5index_11IndexEngine_1__init__, /*tp_init*/ #else 0, /*tp_init*/ #endif 0, /*tp_alloc*/ __pyx_tp_new_6pandas_5index_Float64Engine, /*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*/ #if PY_VERSION_HEX >= 0x02060000 0, /*tp_version_tag*/ #endif #if PY_VERSION_HEX >= 0x030400a1 && defined(Py_TPFLAGS_HAVE_FINALIZE) 0, /*tp_finalize*/ #endif }; static PyMethodDef __pyx_methods[] = { {__Pyx_NAMESTR("convert_scalar"), (PyCFunction)__pyx_pw_6pandas_5index_5convert_scalar, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}, {0, 0, 0, 0} }; #if PY_MAJOR_VERSION >= 3 static struct PyModuleDef __pyx_moduledef = { #if PY_VERSION_HEX < 0x03020000 { PyObject_HEAD_INIT(NULL) NULL, 0, NULL }, #else PyModuleDef_HEAD_INIT, #endif __Pyx_NAMESTR("index"), 0, /* m_doc */ -1, /* m_size */ __pyx_methods /* m_methods */, NULL, /* m_reload */ NULL, /* m_traverse */ NULL, /* m_clear */ NULL /* m_free */ }; #endif static __Pyx_StringTabEntry __pyx_string_tab[] = { {&__pyx_n_s_1, __pyx_k_1, sizeof(__pyx_k_1), 0, 0, 1, 1}, {&__pyx_kp_s_10, __pyx_k_10, sizeof(__pyx_k_10), 0, 0, 1, 0}, {&__pyx_n_s_12, __pyx_k_12, sizeof(__pyx_k_12), 0, 0, 1, 1}, {&__pyx_kp_s_13, __pyx_k_13, sizeof(__pyx_k_13), 0, 0, 1, 0}, {&__pyx_kp_s_16, __pyx_k_16, sizeof(__pyx_k_16), 0, 0, 1, 0}, {&__pyx_kp_u_17, __pyx_k_17, sizeof(__pyx_k_17), 0, 1, 0, 0}, {&__pyx_kp_u_19, __pyx_k_19, sizeof(__pyx_k_19), 0, 1, 0, 0}, {&__pyx_kp_u_21, __pyx_k_21, sizeof(__pyx_k_21), 0, 1, 0, 0}, {&__pyx_kp_u_23, __pyx_k_23, sizeof(__pyx_k_23), 0, 1, 0, 0}, {&__pyx_kp_u_24, __pyx_k_24, sizeof(__pyx_k_24), 0, 1, 0, 0}, {&__pyx_kp_u_27, __pyx_k_27, sizeof(__pyx_k_27), 0, 1, 0, 0}, {&__pyx_n_s_29, __pyx_k_29, sizeof(__pyx_k_29), 0, 0, 1, 1}, {&__pyx_kp_s_3, __pyx_k_3, sizeof(__pyx_k_3), 0, 0, 1, 0}, {&__pyx_n_s_30, __pyx_k_30, sizeof(__pyx_k_30), 0, 0, 1, 1}, {&__pyx_kp_s_33, __pyx_k_33, sizeof(__pyx_k_33), 0, 0, 1, 0}, {&__pyx_n_s_34, __pyx_k_34, sizeof(__pyx_k_34), 0, 0, 1, 1}, {&__pyx_n_s__AttributeError, __pyx_k__AttributeError, sizeof(__pyx_k__AttributeError), 0, 0, 1, 1}, {&__pyx_n_s__Float64HashTable, __pyx_k__Float64HashTable, sizeof(__pyx_k__Float64HashTable), 0, 0, 1, 1}, {&__pyx_n_s__ImportError, __pyx_k__ImportError, sizeof(__pyx_k__ImportError), 0, 0, 1, 1}, {&__pyx_n_s__IndexError, __pyx_k__IndexError, sizeof(__pyx_k__IndexError), 0, 0, 1, 1}, {&__pyx_n_s__Int64HashTable, __pyx_k__Int64HashTable, sizeof(__pyx_k__Int64HashTable), 0, 0, 1, 1}, {&__pyx_n_s__KeyError, __pyx_k__KeyError, sizeof(__pyx_k__KeyError), 0, 0, 1, 1}, {&__pyx_n_s__NotImplementedError, __pyx_k__NotImplementedError, sizeof(__pyx_k__NotImplementedError), 0, 0, 1, 1}, {&__pyx_n_s__PyObjectHashTable, __pyx_k__PyObjectHashTable, sizeof(__pyx_k__PyObjectHashTable), 0, 0, 1, 1}, {&__pyx_n_s__RuntimeError, __pyx_k__RuntimeError, sizeof(__pyx_k__RuntimeError), 0, 0, 1, 1}, {&__pyx_n_s__Timestamp, __pyx_k__Timestamp, sizeof(__pyx_k__Timestamp), 0, 0, 1, 1}, {&__pyx_n_s__TypeError, __pyx_k__TypeError, sizeof(__pyx_k__TypeError), 0, 0, 1, 1}, {&__pyx_n_s__UTC, __pyx_k__UTC, sizeof(__pyx_k__UTC), 0, 0, 1, 1}, {&__pyx_n_s__ValueError, __pyx_k__ValueError, sizeof(__pyx_k__ValueError), 0, 0, 1, 1}, {&__pyx_n_s___SIZE_CUTOFF, __pyx_k___SIZE_CUTOFF, sizeof(__pyx_k___SIZE_CUTOFF), 0, 0, 1, 1}, {&__pyx_n_s____import__, __pyx_k____import__, sizeof(__pyx_k____import__), 0, 0, 1, 1}, {&__pyx_n_s____main__, __pyx_k____main__, sizeof(__pyx_k____main__), 0, 0, 1, 1}, {&__pyx_n_s____pyx_getbuffer, __pyx_k____pyx_getbuffer, sizeof(__pyx_k____pyx_getbuffer), 0, 0, 1, 1}, {&__pyx_n_s____pyx_releasebuffer, __pyx_k____pyx_releasebuffer, sizeof(__pyx_k____pyx_releasebuffer), 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____test__, __pyx_k____test__, sizeof(__pyx_k____test__), 0, 0, 1, 1}, {&__pyx_n_s___backfill_functions, __pyx_k___backfill_functions, sizeof(__pyx_k___backfill_functions), 0, 0, 1, 1}, {&__pyx_n_s___call_monotonic, __pyx_k___call_monotonic, sizeof(__pyx_k___call_monotonic), 0, 0, 1, 1}, {&__pyx_n_s___data, __pyx_k___data, sizeof(__pyx_k___data), 0, 0, 1, 1}, {&__pyx_n_s___du_utc, __pyx_k___du_utc, sizeof(__pyx_k___du_utc), 0, 0, 1, 1}, {&__pyx_n_s___get_utcoffset, __pyx_k___get_utcoffset, sizeof(__pyx_k___get_utcoffset), 0, 0, 1, 1}, {&__pyx_n_s___hash, __pyx_k___hash, sizeof(__pyx_k___hash), 0, 0, 1, 1}, {&__pyx_n_s___pad_functions, __pyx_k___pad_functions, sizeof(__pyx_k___pad_functions), 0, 0, 1, 1}, {&__pyx_n_s__algos, __pyx_k__algos, sizeof(__pyx_k__algos), 0, 0, 1, 1}, {&__pyx_n_s__append, __pyx_k__append, sizeof(__pyx_k__append), 0, 0, 1, 1}, {&__pyx_n_s__arr, __pyx_k__arr, sizeof(__pyx_k__arr), 0, 0, 1, 1}, {&__pyx_n_s__asarray, __pyx_k__asarray, sizeof(__pyx_k__asarray), 0, 0, 1, 1}, {&__pyx_n_s__astype, __pyx_k__astype, sizeof(__pyx_k__astype), 0, 0, 1, 1}, {&__pyx_n_s__backfill_float64, __pyx_k__backfill_float64, sizeof(__pyx_k__backfill_float64), 0, 0, 1, 1}, {&__pyx_n_s__backfill_int64, __pyx_k__backfill_int64, sizeof(__pyx_k__backfill_int64), 0, 0, 1, 1}, {&__pyx_n_s__backfill_object, __pyx_k__backfill_object, sizeof(__pyx_k__backfill_object), 0, 0, 1, 1}, {&__pyx_n_s__bool_, __pyx_k__bool_, sizeof(__pyx_k__bool_), 0, 0, 1, 1}, {&__pyx_n_s__day, __pyx_k__day, sizeof(__pyx_k__day), 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__ensure_int64, __pyx_k__ensure_int64, sizeof(__pyx_k__ensure_int64), 0, 0, 1, 1}, {&__pyx_n_s__float64, __pyx_k__float64, sizeof(__pyx_k__float64), 0, 0, 1, 1}, {&__pyx_n_s__get_item, __pyx_k__get_item, sizeof(__pyx_k__get_item), 0, 0, 1, 1}, {&__pyx_n_s__get_loc, __pyx_k__get_loc, sizeof(__pyx_k__get_loc), 0, 0, 1, 1}, {&__pyx_n_s__get_value, __pyx_k__get_value, sizeof(__pyx_k__get_value), 0, 0, 1, 1}, {&__pyx_n_s__get_value_at, __pyx_k__get_value_at, sizeof(__pyx_k__get_value_at), 0, 0, 1, 1}, {&__pyx_n_s__hashtable, __pyx_k__hashtable, sizeof(__pyx_k__hashtable), 0, 0, 1, 1}, {&__pyx_n_s__have_pytz, __pyx_k__have_pytz, sizeof(__pyx_k__have_pytz), 0, 0, 1, 1}, {&__pyx_n_s__hour, __pyx_k__hour, sizeof(__pyx_k__hour), 0, 0, 1, 1}, {&__pyx_n_s__i4, __pyx_k__i4, sizeof(__pyx_k__i4), 0, 0, 1, 1}, {&__pyx_n_s__i8, __pyx_k__i8, sizeof(__pyx_k__i8), 0, 0, 1, 1}, {&__pyx_n_s__inf, __pyx_k__inf, sizeof(__pyx_k__inf), 0, 0, 1, 1}, {&__pyx_n_s__int64, __pyx_k__int64, sizeof(__pyx_k__int64), 0, 0, 1, 1}, {&__pyx_n_s__integer, __pyx_k__integer, sizeof(__pyx_k__integer), 0, 0, 1, 1}, {&__pyx_n_s__is_monotonic, __pyx_k__is_monotonic, sizeof(__pyx_k__is_monotonic), 0, 0, 1, 1}, {&__pyx_n_s__is_monotonic_int64, __pyx_k__is_monotonic_int64, sizeof(__pyx_k__is_monotonic_int64), 0, 0, 1, 1}, {&__pyx_n_s__is_monotonic_object, __pyx_k__is_monotonic_object, sizeof(__pyx_k__is_monotonic_object), 0, 0, 1, 1}, {&__pyx_n_s__is_unique, __pyx_k__is_unique, sizeof(__pyx_k__is_unique), 0, 0, 1, 1}, {&__pyx_n_s__key, __pyx_k__key, sizeof(__pyx_k__key), 0, 0, 1, 1}, {&__pyx_n_s__left, __pyx_k__left, sizeof(__pyx_k__left), 0, 0, 1, 1}, {&__pyx_n_s__limit, __pyx_k__limit, sizeof(__pyx_k__limit), 0, 0, 1, 1}, {&__pyx_n_s__loc, __pyx_k__loc, sizeof(__pyx_k__loc), 0, 0, 1, 1}, {&__pyx_n_s__lookup, __pyx_k__lookup, sizeof(__pyx_k__lookup), 0, 0, 1, 1}, {&__pyx_n_s__map_locations, __pyx_k__map_locations, sizeof(__pyx_k__map_locations), 0, 0, 1, 1}, {&__pyx_n_s__microsecond, __pyx_k__microsecond, sizeof(__pyx_k__microsecond), 0, 0, 1, 1}, {&__pyx_n_s__minute, __pyx_k__minute, sizeof(__pyx_k__minute), 0, 0, 1, 1}, {&__pyx_n_s__month, __pyx_k__month, sizeof(__pyx_k__month), 0, 0, 1, 1}, {&__pyx_n_s__n, __pyx_k__n, sizeof(__pyx_k__n), 0, 0, 1, 1}, {&__pyx_n_s__ndarray, __pyx_k__ndarray, sizeof(__pyx_k__ndarray), 0, 0, 1, 1}, {&__pyx_n_s__np, __pyx_k__np, sizeof(__pyx_k__np), 0, 0, 1, 1}, {&__pyx_n_s__numpy, __pyx_k__numpy, sizeof(__pyx_k__numpy), 0, 0, 1, 1}, {&__pyx_n_s__object, __pyx_k__object, sizeof(__pyx_k__object), 0, 0, 1, 1}, {&__pyx_n_s__other, __pyx_k__other, sizeof(__pyx_k__other), 0, 0, 1, 1}, {&__pyx_n_s__pad_float64, __pyx_k__pad_float64, sizeof(__pyx_k__pad_float64), 0, 0, 1, 1}, {&__pyx_n_s__pad_int64, __pyx_k__pad_int64, sizeof(__pyx_k__pad_int64), 0, 0, 1, 1}, {&__pyx_n_s__pad_object, __pyx_k__pad_object, sizeof(__pyx_k__pad_object), 0, 0, 1, 1}, {&__pyx_n_s__pandas, __pyx_k__pandas, sizeof(__pyx_k__pandas), 0, 0, 1, 1}, {&__pyx_n_s__pytz, __pyx_k__pytz, sizeof(__pyx_k__pytz), 0, 0, 1, 1}, {&__pyx_n_s__range, __pyx_k__range, sizeof(__pyx_k__range), 0, 0, 1, 1}, {&__pyx_n_s__repeat, __pyx_k__repeat, sizeof(__pyx_k__repeat), 0, 0, 1, 1}, {&__pyx_n_s__resize, __pyx_k__resize, sizeof(__pyx_k__resize), 0, 0, 1, 1}, {&__pyx_n_s__right, __pyx_k__right, sizeof(__pyx_k__right), 0, 0, 1, 1}, {&__pyx_n_s__searchsorted, __pyx_k__searchsorted, sizeof(__pyx_k__searchsorted), 0, 0, 1, 1}, {&__pyx_n_s__second, __pyx_k__second, sizeof(__pyx_k__second), 0, 0, 1, 1}, {&__pyx_n_s__set_value, __pyx_k__set_value, sizeof(__pyx_k__set_value), 0, 0, 1, 1}, {&__pyx_n_s__set_value_at, __pyx_k__set_value_at, sizeof(__pyx_k__set_value_at), 0, 0, 1, 1}, {&__pyx_n_s__side, __pyx_k__side, sizeof(__pyx_k__side), 0, 0, 1, 1}, {&__pyx_n_s__tslib, __pyx_k__tslib, sizeof(__pyx_k__tslib), 0, 0, 1, 1}, {&__pyx_n_s__type, __pyx_k__type, sizeof(__pyx_k__type), 0, 0, 1, 1}, {&__pyx_n_s__tzinfo, __pyx_k__tzinfo, sizeof(__pyx_k__tzinfo), 0, 0, 1, 1}, {&__pyx_n_s__tzutc, __pyx_k__tzutc, sizeof(__pyx_k__tzutc), 0, 0, 1, 1}, {&__pyx_n_s__uint8, __pyx_k__uint8, sizeof(__pyx_k__uint8), 0, 0, 1, 1}, {&__pyx_n_s__utc, __pyx_k__utc, sizeof(__pyx_k__utc), 0, 0, 1, 1}, {&__pyx_n_s__val, __pyx_k__val, sizeof(__pyx_k__val), 0, 0, 1, 1}, {&__pyx_n_s__value, __pyx_k__value, sizeof(__pyx_k__value), 0, 0, 1, 1}, {&__pyx_n_s__vgetter, __pyx_k__vgetter, sizeof(__pyx_k__vgetter), 0, 0, 1, 1}, {&__pyx_n_s__view, __pyx_k__view, sizeof(__pyx_k__view), 0, 0, 1, 1}, {&__pyx_n_s__year, __pyx_k__year, sizeof(__pyx_k__year), 0, 0, 1, 1}, {0, 0, 0, 0, 0, 0, 0} }; static int __Pyx_InitCachedBuiltins(void) { __pyx_builtin_ImportError = __Pyx_GetBuiltinName(__pyx_n_s__ImportError); if (!__pyx_builtin_ImportError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 37; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_builtin_TypeError = __Pyx_GetBuiltinName(__pyx_n_s__TypeError); if (!__pyx_builtin_TypeError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 50; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_builtin_KeyError = __Pyx_GetBuiltinName(__pyx_n_s__KeyError); if (!__pyx_builtin_KeyError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 139; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_n_s__range); if (!__pyx_builtin_range) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 186; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_builtin_NotImplementedError = __Pyx_GetBuiltinName(__pyx_n_s__NotImplementedError); if (!__pyx_builtin_NotImplementedError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 237; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_builtin_AttributeError = __Pyx_GetBuiltinName(__pyx_n_s__AttributeError); if (!__pyx_builtin_AttributeError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 511; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_builtin_ValueError = __Pyx_GetBuiltinName(__pyx_n_s__ValueError); if (!__pyx_builtin_ValueError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 561; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_builtin_IndexError = __Pyx_GetBuiltinName(__pyx_n_s__IndexError); if (!__pyx_builtin_IndexError) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 40; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_builtin_RuntimeError = __Pyx_GetBuiltinName(__pyx_n_s__RuntimeError); if (!__pyx_builtin_RuntimeError) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 803; __pyx_clineno = __LINE__; goto __pyx_L1_error;} return 0; __pyx_L1_error:; return -1; } static int __Pyx_InitCachedConstants(void) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0); /* "pandas/index.pyx":480 * * cdef _get_index_values(self): * return self.vgetter().view('i8') # <<<<<<<<<<<<<< * * def _call_monotonic(self, values): */ __pyx_k_tuple_2 = PyTuple_Pack(1, ((PyObject *)__pyx_n_s__i8)); if (unlikely(!__pyx_k_tuple_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 480; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_2); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_2)); /* "pandas/index.pyx":529 * self._ensure_mapping_populated() * if values.dtype != 'M8[ns]': * return np.repeat(-1, len(values)).astype('i4') # <<<<<<<<<<<<<< * values = np.asarray(values).view('i8') * return self.mapping.lookup(values) */ __pyx_k_tuple_4 = PyTuple_Pack(1, ((PyObject *)__pyx_n_s__i4)); if (unlikely(!__pyx_k_tuple_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 529; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_4); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_4)); /* "pandas/index.pyx":530 * if values.dtype != 'M8[ns]': * return np.repeat(-1, len(values)).astype('i4') * values = np.asarray(values).view('i8') # <<<<<<<<<<<<<< * return self.mapping.lookup(values) * */ __pyx_k_tuple_5 = PyTuple_Pack(1, ((PyObject *)__pyx_n_s__i8)); if (unlikely(!__pyx_k_tuple_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 530; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_5); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_5)); /* "pandas/index.pyx":535 * def get_pad_indexer(self, other, limit=None): * if other.dtype != 'M8[ns]': * return np.repeat(-1, len(other)).astype('i4') # <<<<<<<<<<<<<< * other = np.asarray(other).view('i8') * return algos.pad_int64(self._get_index_values(), other, */ __pyx_k_tuple_6 = PyTuple_Pack(1, ((PyObject *)__pyx_n_s__i4)); if (unlikely(!__pyx_k_tuple_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 535; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_6); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_6)); /* "pandas/index.pyx":536 * if other.dtype != 'M8[ns]': * return np.repeat(-1, len(other)).astype('i4') * other = np.asarray(other).view('i8') # <<<<<<<<<<<<<< * return algos.pad_int64(self._get_index_values(), other, * limit=limit) */ __pyx_k_tuple_7 = PyTuple_Pack(1, ((PyObject *)__pyx_n_s__i8)); if (unlikely(!__pyx_k_tuple_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 536; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_7); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_7)); /* "pandas/index.pyx":542 * def get_backfill_indexer(self, other, limit=None): * if other.dtype != 'M8[ns]': * return np.repeat(-1, len(other)).astype('i4') # <<<<<<<<<<<<<< * other = np.asarray(other).view('i8') * return algos.backfill_int64(self._get_index_values(), other, */ __pyx_k_tuple_8 = PyTuple_Pack(1, ((PyObject *)__pyx_n_s__i4)); if (unlikely(!__pyx_k_tuple_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 542; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_8); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_8)); /* "pandas/index.pyx":543 * if other.dtype != 'M8[ns]': * return np.repeat(-1, len(other)).astype('i4') * other = np.asarray(other).view('i8') # <<<<<<<<<<<<<< * return algos.backfill_int64(self._get_index_values(), other, * limit=limit) */ __pyx_k_tuple_9 = PyTuple_Pack(1, ((PyObject *)__pyx_n_s__i8)); if (unlikely(!__pyx_k_tuple_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 543; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_9); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_9)); /* "pandas/index.pyx":561 * if issubclass(arr.dtype.type, (np.integer, np.bool_)): * if util.is_float_object(value) and value != value: * raise ValueError('Cannot assign nan to integer series') # <<<<<<<<<<<<<< * * return value */ __pyx_k_tuple_11 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_10)); if (unlikely(!__pyx_k_tuple_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 561; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_11); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_11)); /* "util.pxd":40 * i += sz * elif i >= sz or sz == 0: * raise IndexError('index out of bounds') # <<<<<<<<<<<<<< * * return get_value_1d(arr, i) */ __pyx_k_tuple_14 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_13)); if (unlikely(!__pyx_k_tuple_14)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 40; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_14); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_14)); /* "util.pxd":57 * i += sz * elif i >= sz: * raise IndexError('index out of bounds') # <<<<<<<<<<<<<< * * assign_value_1d(arr, i, value) */ __pyx_k_tuple_15 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_13)); if (unlikely(!__pyx_k_tuple_15)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 57; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_15); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_15)); /* "numpy.pxd":217 * 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_k_tuple_18 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_u_17)); if (unlikely(!__pyx_k_tuple_18)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 217; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_18); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_18)); /* "numpy.pxd":221 * 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_k_tuple_20 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_u_19)); if (unlikely(!__pyx_k_tuple_20)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 221; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_20); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_20)); /* "numpy.pxd":259 * if ((descr.byteorder == '>' and little_endian) or * (descr.byteorder == '<' 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_k_tuple_22 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_u_21)); if (unlikely(!__pyx_k_tuple_22)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 259; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_22); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_22)); /* "numpy.pxd":803 * * if (end - f) - (new_offset - offset[0]) < 15: * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") # <<<<<<<<<<<<<< * * if ((child.byteorder == '>' and little_endian) or */ __pyx_k_tuple_25 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_u_24)); if (unlikely(!__pyx_k_tuple_25)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 803; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_25); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_25)); /* "numpy.pxd":807 * if ((child.byteorder == '>' and little_endian) or * (child.byteorder == '<' 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_k_tuple_26 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_u_21)); if (unlikely(!__pyx_k_tuple_26)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 807; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_26); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_26)); /* "numpy.pxd":827 * 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_k_tuple_28 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_u_27)); if (unlikely(!__pyx_k_tuple_28)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 827; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_28); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_28)); /* "pandas/index.pyx":57 * or PyList_Check(val) or hasattr(val,'_data')) * * def get_value_at(ndarray arr, object loc): # <<<<<<<<<<<<<< * if arr.descr.type_num == NPY_DATETIME: * return Timestamp(util.get_value_at(arr, loc)) */ __pyx_k_tuple_31 = PyTuple_Pack(2, ((PyObject *)__pyx_n_s__arr), ((PyObject *)__pyx_n_s__loc)); if (unlikely(!__pyx_k_tuple_31)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 57; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_31); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_31)); __pyx_k_codeobj_32 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_31, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_33, __pyx_n_s__get_value_at, 57, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_32)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 57; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/index.pyx":62 * return util.get_value_at(arr, loc) * * def set_value_at(ndarray arr, object loc, object val): # <<<<<<<<<<<<<< * return util.set_value_at(arr, loc, val) * */ __pyx_k_tuple_35 = PyTuple_Pack(3, ((PyObject *)__pyx_n_s__arr), ((PyObject *)__pyx_n_s__loc), ((PyObject *)__pyx_n_s__val)); if (unlikely(!__pyx_k_tuple_35)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_35); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_35)); __pyx_k_codeobj_36 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_35, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_33, __pyx_n_s__set_value_at, 62, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_36)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __pyx_int_neg_1 = PyInt_FromLong(-1); if (unlikely(!__pyx_int_neg_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __pyx_int_15 = PyInt_FromLong(15); if (unlikely(!__pyx_int_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __pyx_int_1000000 = PyInt_FromLong(1000000); if (unlikely(!__pyx_int_1000000)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; return 0; __pyx_L1_error:; return -1; } #if PY_MAJOR_VERSION < 3 PyMODINIT_FUNC initindex(void); /*proto*/ PyMODINIT_FUNC initindex(void) #else PyMODINIT_FUNC PyInit_index(void); /*proto*/ PyMODINIT_FUNC PyInit_index(void) #endif { PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; int __pyx_t_6; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannyDeclarations #if CYTHON_REFNANNY __Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny"); if (!__Pyx_RefNanny) { PyErr_Clear(); __Pyx_RefNanny = __Pyx_RefNannyImportAPI("Cython.Runtime.refnanny"); if (!__Pyx_RefNanny) Py_FatalError("failed to import 'refnanny' module"); } #endif __Pyx_RefNannySetupContext("PyMODINIT_FUNC PyInit_index(void)", 0); if ( __Pyx_check_binary_version() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_empty_tuple)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_bytes)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #ifdef __Pyx_CyFunction_USED if (__Pyx_CyFunction_init() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif #ifdef __Pyx_FusedFunction_USED if (__pyx_FusedFunction_init() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif #ifdef __Pyx_Generator_USED if (__pyx_Generator_init() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif /*--- Library function declarations ---*/ /*--- Threads initialization code ---*/ #if defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS #ifdef WITH_THREAD /* Python build with threading support? */ PyEval_InitThreads(); #endif #endif /*--- Module creation code ---*/ #if PY_MAJOR_VERSION < 3 __pyx_m = Py_InitModule4(__Pyx_NAMESTR("index"), __pyx_methods, 0, 0, PYTHON_API_VERSION); Py_XINCREF(__pyx_m); #else __pyx_m = PyModule_Create(&__pyx_moduledef); #endif if (unlikely(!__pyx_m)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_d)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} Py_INCREF(__pyx_d); #if PY_MAJOR_VERSION >= 3 { PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (!PyDict_GetItemString(modules, "pandas.index")) { if (unlikely(PyDict_SetItemString(modules, "pandas.index", __pyx_m) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } } #endif __pyx_b = PyImport_AddModule(__Pyx_NAMESTR(__Pyx_BUILTIN_MODULE_NAME)); if (unlikely(!__pyx_b)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #if CYTHON_COMPILING_IN_PYPY Py_INCREF(__pyx_b); #endif if (__Pyx_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; /*--- Initialize various global constants etc. ---*/ if (unlikely(__Pyx_InitGlobals() < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif if (__pyx_module_is_main_pandas__index) { if (__Pyx_SetAttrString(__pyx_m, "__name__", __pyx_n_s____main__) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; } /*--- Builtin init code ---*/ if (unlikely(__Pyx_InitCachedBuiltins() < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /*--- Constants init code ---*/ if (unlikely(__Pyx_InitCachedConstants() < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /*--- Global init code ---*/ /*--- Variable export code ---*/ /*--- Function export code ---*/ /*--- Type init code ---*/ __pyx_vtabptr_6pandas_5index_IndexEngine = &__pyx_vtable_6pandas_5index_IndexEngine; __pyx_vtable_6pandas_5index_IndexEngine.get_value = (PyObject *(*)(struct __pyx_obj_6pandas_5index_IndexEngine *, PyArrayObject *, PyObject *, int __pyx_skip_dispatch))__pyx_f_6pandas_5index_11IndexEngine_get_value; __pyx_vtable_6pandas_5index_IndexEngine.set_value = (PyObject *(*)(struct __pyx_obj_6pandas_5index_IndexEngine *, PyArrayObject *, PyObject *, PyObject *, int __pyx_skip_dispatch))__pyx_f_6pandas_5index_11IndexEngine_set_value; __pyx_vtable_6pandas_5index_IndexEngine.get_loc = (PyObject *(*)(struct __pyx_obj_6pandas_5index_IndexEngine *, PyObject *, int __pyx_skip_dispatch))__pyx_f_6pandas_5index_11IndexEngine_get_loc; __pyx_vtable_6pandas_5index_IndexEngine._get_loc_duplicates = (PyObject *(*)(struct __pyx_obj_6pandas_5index_IndexEngine *, PyObject *))__pyx_f_6pandas_5index_11IndexEngine__get_loc_duplicates; __pyx_vtable_6pandas_5index_IndexEngine._maybe_get_bool_indexer = (PyObject *(*)(struct __pyx_obj_6pandas_5index_IndexEngine *, PyObject *))__pyx_f_6pandas_5index_11IndexEngine__maybe_get_bool_indexer; __pyx_vtable_6pandas_5index_IndexEngine._do_monotonic_check = (PyObject *(*)(struct __pyx_obj_6pandas_5index_IndexEngine *))__pyx_f_6pandas_5index_11IndexEngine__do_monotonic_check; __pyx_vtable_6pandas_5index_IndexEngine._get_index_values = (PyObject *(*)(struct __pyx_obj_6pandas_5index_IndexEngine *))__pyx_f_6pandas_5index_11IndexEngine__get_index_values; __pyx_vtable_6pandas_5index_IndexEngine._do_unique_check = (PyObject *(*)(struct __pyx_obj_6pandas_5index_IndexEngine *))__pyx_f_6pandas_5index_11IndexEngine__do_unique_check; __pyx_vtable_6pandas_5index_IndexEngine._make_hash_table = (PyObject *(*)(struct __pyx_obj_6pandas_5index_IndexEngine *, PyObject *))__pyx_f_6pandas_5index_11IndexEngine__make_hash_table; __pyx_vtable_6pandas_5index_IndexEngine._check_type = (PyObject *(*)(struct __pyx_obj_6pandas_5index_IndexEngine *, PyObject *))__pyx_f_6pandas_5index_11IndexEngine__check_type; __pyx_vtable_6pandas_5index_IndexEngine._ensure_mapping_populated = (PyObject *(*)(struct __pyx_obj_6pandas_5index_IndexEngine *))__pyx_f_6pandas_5index_11IndexEngine__ensure_mapping_populated; __pyx_vtable_6pandas_5index_IndexEngine.initialize = (PyObject *(*)(struct __pyx_obj_6pandas_5index_IndexEngine *))__pyx_f_6pandas_5index_11IndexEngine_initialize; if (PyType_Ready(&__pyx_type_6pandas_5index_IndexEngine) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__Pyx_SetVtable(__pyx_type_6pandas_5index_IndexEngine.tp_dict, __pyx_vtabptr_6pandas_5index_IndexEngine) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__Pyx_SetAttrString(__pyx_m, "IndexEngine", (PyObject *)&__pyx_type_6pandas_5index_IndexEngine) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_6pandas_5index_IndexEngine = &__pyx_type_6pandas_5index_IndexEngine; __pyx_vtabptr_6pandas_5index_Int64Engine = &__pyx_vtable_6pandas_5index_Int64Engine; __pyx_vtable_6pandas_5index_Int64Engine.__pyx_base = *__pyx_vtabptr_6pandas_5index_IndexEngine; __pyx_vtable_6pandas_5index_Int64Engine.__pyx_base._maybe_get_bool_indexer = (PyObject *(*)(struct __pyx_obj_6pandas_5index_IndexEngine *, PyObject *))__pyx_f_6pandas_5index_11Int64Engine__maybe_get_bool_indexer; __pyx_vtable_6pandas_5index_Int64Engine.__pyx_base._get_index_values = (PyObject *(*)(struct __pyx_obj_6pandas_5index_IndexEngine *))__pyx_f_6pandas_5index_11Int64Engine__get_index_values; __pyx_vtable_6pandas_5index_Int64Engine.__pyx_base._make_hash_table = (PyObject *(*)(struct __pyx_obj_6pandas_5index_IndexEngine *, PyObject *))__pyx_f_6pandas_5index_11Int64Engine__make_hash_table; __pyx_vtable_6pandas_5index_Int64Engine.__pyx_base._check_type = (PyObject *(*)(struct __pyx_obj_6pandas_5index_IndexEngine *, PyObject *))__pyx_f_6pandas_5index_11Int64Engine__check_type; __pyx_type_6pandas_5index_Int64Engine.tp_base = __pyx_ptype_6pandas_5index_IndexEngine; if (PyType_Ready(&__pyx_type_6pandas_5index_Int64Engine) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 335; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__Pyx_SetVtable(__pyx_type_6pandas_5index_Int64Engine.tp_dict, __pyx_vtabptr_6pandas_5index_Int64Engine) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 335; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__Pyx_SetAttrString(__pyx_m, "Int64Engine", (PyObject *)&__pyx_type_6pandas_5index_Int64Engine) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 335; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_6pandas_5index_Int64Engine = &__pyx_type_6pandas_5index_Int64Engine; __pyx_vtabptr_6pandas_5index_DatetimeEngine = &__pyx_vtable_6pandas_5index_DatetimeEngine; __pyx_vtable_6pandas_5index_DatetimeEngine.__pyx_base = *__pyx_vtabptr_6pandas_5index_Int64Engine; __pyx_vtable_6pandas_5index_DatetimeEngine.__pyx_base.__pyx_base.get_loc = (PyObject *(*)(struct __pyx_obj_6pandas_5index_IndexEngine *, PyObject *, int __pyx_skip_dispatch))__pyx_f_6pandas_5index_14DatetimeEngine_get_loc; __pyx_vtable_6pandas_5index_DatetimeEngine.__pyx_base.__pyx_base._get_index_values = (PyObject *(*)(struct __pyx_obj_6pandas_5index_IndexEngine *))__pyx_f_6pandas_5index_14DatetimeEngine__get_index_values; __pyx_vtable_6pandas_5index_DatetimeEngine._date_check_type = (PyObject *(*)(struct __pyx_obj_6pandas_5index_DatetimeEngine *, PyObject *))__pyx_f_6pandas_5index_14DatetimeEngine__date_check_type; __pyx_type_6pandas_5index_DatetimeEngine.tp_base = __pyx_ptype_6pandas_5index_Int64Engine; if (PyType_Ready(&__pyx_type_6pandas_5index_DatetimeEngine) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 465; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__Pyx_SetVtable(__pyx_type_6pandas_5index_DatetimeEngine.tp_dict, __pyx_vtabptr_6pandas_5index_DatetimeEngine) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 465; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__Pyx_SetAttrString(__pyx_m, "DatetimeEngine", (PyObject *)&__pyx_type_6pandas_5index_DatetimeEngine) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 465; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_6pandas_5index_DatetimeEngine = &__pyx_type_6pandas_5index_DatetimeEngine; __pyx_vtabptr_6pandas_5index_ObjectEngine = &__pyx_vtable_6pandas_5index_ObjectEngine; __pyx_vtable_6pandas_5index_ObjectEngine.__pyx_base = *__pyx_vtabptr_6pandas_5index_IndexEngine; __pyx_vtable_6pandas_5index_ObjectEngine.__pyx_base._make_hash_table = (PyObject *(*)(struct __pyx_obj_6pandas_5index_IndexEngine *, PyObject *))__pyx_f_6pandas_5index_12ObjectEngine__make_hash_table; __pyx_type_6pandas_5index_ObjectEngine.tp_base = __pyx_ptype_6pandas_5index_IndexEngine; if (PyType_Ready(&__pyx_type_6pandas_5index_ObjectEngine) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 448; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__Pyx_SetVtable(__pyx_type_6pandas_5index_ObjectEngine.tp_dict, __pyx_vtabptr_6pandas_5index_ObjectEngine) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 448; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__Pyx_SetAttrString(__pyx_m, "ObjectEngine", (PyObject *)&__pyx_type_6pandas_5index_ObjectEngine) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 448; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_6pandas_5index_ObjectEngine = &__pyx_type_6pandas_5index_ObjectEngine; __pyx_vtabptr_6pandas_5index_Float64Engine = &__pyx_vtable_6pandas_5index_Float64Engine; __pyx_vtable_6pandas_5index_Float64Engine.__pyx_base = *__pyx_vtabptr_6pandas_5index_IndexEngine; __pyx_vtable_6pandas_5index_Float64Engine.__pyx_base._make_hash_table = (PyObject *(*)(struct __pyx_obj_6pandas_5index_IndexEngine *, PyObject *))__pyx_f_6pandas_5index_13Float64Engine__make_hash_table; __pyx_type_6pandas_5index_Float64Engine.tp_base = __pyx_ptype_6pandas_5index_IndexEngine; if (PyType_Ready(&__pyx_type_6pandas_5index_Float64Engine) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 394; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__Pyx_SetVtable(__pyx_type_6pandas_5index_Float64Engine.tp_dict, __pyx_vtabptr_6pandas_5index_Float64Engine) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 394; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__Pyx_SetAttrString(__pyx_m, "Float64Engine", (PyObject *)&__pyx_type_6pandas_5index_Float64Engine) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 394; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_6pandas_5index_Float64Engine = &__pyx_type_6pandas_5index_Float64Engine; /*--- Type import code ---*/ __pyx_ptype_5numpy_dtype = __Pyx_ImportType("numpy", "dtype", sizeof(PyArray_Descr), 0); if (unlikely(!__pyx_ptype_5numpy_dtype)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_5numpy_flatiter = __Pyx_ImportType("numpy", "flatiter", sizeof(PyArrayIterObject), 0); if (unlikely(!__pyx_ptype_5numpy_flatiter)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 167; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_5numpy_broadcast = __Pyx_ImportType("numpy", "broadcast", sizeof(PyArrayMultiIterObject), 0); if (unlikely(!__pyx_ptype_5numpy_broadcast)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 171; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_5numpy_ndarray = __Pyx_ImportType("numpy", "ndarray", sizeof(PyArrayObject), 0); if (unlikely(!__pyx_ptype_5numpy_ndarray)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_5numpy_ufunc = __Pyx_ImportType("numpy", "ufunc", sizeof(PyUFuncObject), 0); if (unlikely(!__pyx_ptype_5numpy_ufunc)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 865; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_7cpython_4type_type = __Pyx_ImportType(__Pyx_BUILTIN_MODULE_NAME, "type", #if CYTHON_COMPILING_IN_PYPY sizeof(PyTypeObject), #else sizeof(PyHeapTypeObject), #endif 0); if (unlikely(!__pyx_ptype_7cpython_4type_type)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 9; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_7cpython_4bool_bool = __Pyx_ImportType(__Pyx_BUILTIN_MODULE_NAME, "bool", sizeof(PyBoolObject), 0); if (unlikely(!__pyx_ptype_7cpython_4bool_bool)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 8; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_7cpython_7complex_complex = __Pyx_ImportType(__Pyx_BUILTIN_MODULE_NAME, "complex", sizeof(PyComplexObject), 0); if (unlikely(!__pyx_ptype_7cpython_7complex_complex)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 15; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_6pandas_9hashtable_HashTable = __Pyx_ImportType("pandas.hashtable", "HashTable", sizeof(struct __pyx_obj_6pandas_9hashtable_HashTable), 1); if (unlikely(!__pyx_ptype_6pandas_9hashtable_HashTable)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 5; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_6pandas_9hashtable_Int64HashTable = __Pyx_ImportType("pandas.hashtable", "Int64HashTable", sizeof(struct __pyx_obj_6pandas_9hashtable_Int64HashTable), 1); if (unlikely(!__pyx_ptype_6pandas_9hashtable_Int64HashTable)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 8; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_vtabptr_6pandas_9hashtable_Int64HashTable = (struct __pyx_vtabstruct_6pandas_9hashtable_Int64HashTable*)__Pyx_GetVtable(__pyx_ptype_6pandas_9hashtable_Int64HashTable->tp_dict); if (unlikely(!__pyx_vtabptr_6pandas_9hashtable_Int64HashTable)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 8; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_6pandas_9hashtable_Float64HashTable = __Pyx_ImportType("pandas.hashtable", "Float64HashTable", sizeof(struct __pyx_obj_6pandas_9hashtable_Float64HashTable), 1); if (unlikely(!__pyx_ptype_6pandas_9hashtable_Float64HashTable)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 15; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_6pandas_9hashtable_PyObjectHashTable = __Pyx_ImportType("pandas.hashtable", "PyObjectHashTable", sizeof(struct __pyx_obj_6pandas_9hashtable_PyObjectHashTable), 1); if (unlikely(!__pyx_ptype_6pandas_9hashtable_PyObjectHashTable)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 21; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_vtabptr_6pandas_9hashtable_PyObjectHashTable = (struct __pyx_vtabstruct_6pandas_9hashtable_PyObjectHashTable*)__Pyx_GetVtable(__pyx_ptype_6pandas_9hashtable_PyObjectHashTable->tp_dict); if (unlikely(!__pyx_vtabptr_6pandas_9hashtable_PyObjectHashTable)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 21; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_8datetime_date = __Pyx_ImportType("datetime", "date", sizeof(PyDateTime_Date), 0); if (unlikely(!__pyx_ptype_8datetime_date)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 15; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_8datetime_datetime = __Pyx_ImportType("datetime", "datetime", sizeof(PyDateTime_DateTime), 0); if (unlikely(!__pyx_ptype_8datetime_datetime)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 18; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_8datetime_timedelta = __Pyx_ImportType("datetime", "timedelta", sizeof(PyDateTime_Delta), 0); if (unlikely(!__pyx_ptype_8datetime_timedelta)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 21; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /*--- Variable import code ---*/ /*--- Function import code ---*/ /*--- Execution code ---*/ /* "pandas/index.pyx":9 * cimport numpy as cnp * * cnp.import_array() # <<<<<<<<<<<<<< * cnp.import_ufunc() * */ import_array(); /* "pandas/index.pyx":10 * * cnp.import_array() * cnp.import_ufunc() # <<<<<<<<<<<<<< * * cimport util */ import_ufunc(); /* "pandas/index.pyx":14 * cimport util * * import numpy as np # <<<<<<<<<<<<<< * * cimport tslib */ __pyx_t_1 = __Pyx_Import(((PyObject *)__pyx_n_s__numpy), 0, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 14; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s__np, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 14; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pandas/index.pyx":18 * cimport tslib * from hashtable cimport * * from pandas import algos, tslib, hashtable as _hash # <<<<<<<<<<<<<< * from pandas.tslib import Timestamp * */ __pyx_t_1 = PyList_New(3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 18; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)__pyx_n_s__algos)); PyList_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_n_s__algos)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__algos)); __Pyx_INCREF(((PyObject *)__pyx_n_s__tslib)); PyList_SET_ITEM(__pyx_t_1, 1, ((PyObject *)__pyx_n_s__tslib)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__tslib)); __Pyx_INCREF(((PyObject *)__pyx_n_s__hashtable)); PyList_SET_ITEM(__pyx_t_1, 2, ((PyObject *)__pyx_n_s__hashtable)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__hashtable)); __pyx_t_2 = __Pyx_Import(((PyObject *)__pyx_n_s__pandas), ((PyObject *)__pyx_t_1), -1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 18; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s__algos); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 18; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s__algos, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 18; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s__tslib); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 18; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s__tslib, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 18; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s__hashtable); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 18; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s___hash, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 18; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/index.pyx":19 * from hashtable cimport * * from pandas import algos, tslib, hashtable as _hash * from pandas.tslib import Timestamp # <<<<<<<<<<<<<< * * from datetime cimport (get_datetime64_value, _pydatetime_to_dts, */ __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 19; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(((PyObject *)__pyx_n_s__Timestamp)); PyList_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_n_s__Timestamp)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__Timestamp)); __pyx_t_1 = __Pyx_Import(((PyObject *)__pyx_n_s_29), ((PyObject *)__pyx_t_2), -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 19; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s__Timestamp); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 19; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s__Timestamp, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 19; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pandas/index.pyx":30 * void PyDateTime_IMPORT() * * cdef int64_t iNaT = util.get_nat() # <<<<<<<<<<<<<< * * try: */ __pyx_v_6pandas_5index_iNaT = get_nat(); /* "pandas/index.pyx":32 * cdef int64_t iNaT = util.get_nat() * * try: # <<<<<<<<<<<<<< * from dateutil.tz import tzutc as _du_utc * import pytz */ { __Pyx_ExceptionSave(&__pyx_t_3, &__pyx_t_4, &__pyx_t_5); __Pyx_XGOTREF(__pyx_t_3); __Pyx_XGOTREF(__pyx_t_4); __Pyx_XGOTREF(__pyx_t_5); /*try:*/ { /* "pandas/index.pyx":33 * * try: * from dateutil.tz import tzutc as _du_utc # <<<<<<<<<<<<<< * import pytz * UTC = pytz.utc */ __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 33; __pyx_clineno = __LINE__; goto __pyx_L2_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)__pyx_n_s__tzutc)); PyList_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_n_s__tzutc)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__tzutc)); __pyx_t_2 = __Pyx_Import(((PyObject *)__pyx_n_s_30), ((PyObject *)__pyx_t_1), -1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 33; __pyx_clineno = __LINE__; goto __pyx_L2_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s__tzutc); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 33; __pyx_clineno = __LINE__; goto __pyx_L2_error;} __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s___du_utc, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 33; __pyx_clineno = __LINE__; goto __pyx_L2_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/index.pyx":34 * try: * from dateutil.tz import tzutc as _du_utc * import pytz # <<<<<<<<<<<<<< * UTC = pytz.utc * have_pytz = True */ __pyx_t_2 = __Pyx_Import(((PyObject *)__pyx_n_s__pytz), 0, -1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 34; __pyx_clineno = __LINE__; goto __pyx_L2_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s__pytz, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 34; __pyx_clineno = __LINE__; goto __pyx_L2_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/index.pyx":35 * from dateutil.tz import tzutc as _du_utc * import pytz * UTC = pytz.utc # <<<<<<<<<<<<<< * have_pytz = True * except ImportError: */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__pytz); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L2_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__utc); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L2_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (PyDict_SetItem(__pyx_d, __pyx_n_s__UTC, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L2_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pandas/index.pyx":36 * import pytz * UTC = pytz.utc * have_pytz = True # <<<<<<<<<<<<<< * except ImportError: * have_pytz = False */ __pyx_t_1 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 36; __pyx_clineno = __LINE__; goto __pyx_L2_error;} __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s__have_pytz, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 36; __pyx_clineno = __LINE__; goto __pyx_L2_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; goto __pyx_L9_try_end; __pyx_L2_error:; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pandas/index.pyx":37 * UTC = pytz.utc * have_pytz = True * except ImportError: # <<<<<<<<<<<<<< * have_pytz = False * */ __pyx_t_6 = PyErr_ExceptionMatches(__pyx_builtin_ImportError); if (__pyx_t_6) { __Pyx_AddTraceback("pandas.index", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_2, &__pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 37; __pyx_clineno = __LINE__; goto __pyx_L4_except_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_GOTREF(__pyx_t_2); __Pyx_GOTREF(__pyx_t_7); /* "pandas/index.pyx":38 * have_pytz = True * except ImportError: * have_pytz = False # <<<<<<<<<<<<<< * * PyDateTime_IMPORT */ __pyx_t_8 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 38; __pyx_clineno = __LINE__; goto __pyx_L4_except_error;} __Pyx_GOTREF(__pyx_t_8); if (PyDict_SetItem(__pyx_d, __pyx_n_s__have_pytz, __pyx_t_8) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 38; __pyx_clineno = __LINE__; goto __pyx_L4_except_error;} __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; goto __pyx_L3_exception_handled; } __pyx_L4_except_error:; __Pyx_XGIVEREF(__pyx_t_3); __Pyx_XGIVEREF(__pyx_t_4); __Pyx_XGIVEREF(__pyx_t_5); __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5); goto __pyx_L1_error; __pyx_L3_exception_handled:; __Pyx_XGIVEREF(__pyx_t_3); __Pyx_XGIVEREF(__pyx_t_4); __Pyx_XGIVEREF(__pyx_t_5); __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5); __pyx_L9_try_end:; } /* "pandas/index.pyx":40 * have_pytz = False * * PyDateTime_IMPORT # <<<<<<<<<<<<<< * * cdef extern from "Python.h": */ PyDateTime_IMPORT; /* "pandas/index.pyx":57 * or PyList_Check(val) or hasattr(val,'_data')) * * def get_value_at(ndarray arr, object loc): # <<<<<<<<<<<<<< * if arr.descr.type_num == NPY_DATETIME: * return Timestamp(util.get_value_at(arr, loc)) */ __pyx_t_7 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5index_1get_value_at, NULL, __pyx_n_s_34); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 57; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); if (PyDict_SetItem(__pyx_d, __pyx_n_s__get_value_at, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 57; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; /* "pandas/index.pyx":62 * return util.get_value_at(arr, loc) * * def set_value_at(ndarray arr, object loc, object val): # <<<<<<<<<<<<<< * return util.set_value_at(arr, loc, val) * */ __pyx_t_7 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5index_3set_value_at, NULL, __pyx_n_s_34); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); if (PyDict_SetItem(__pyx_d, __pyx_n_s__set_value_at, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; /* "pandas/index.pyx":67 * * # Don't populate hash tables in monotonic indexes larger than this * _SIZE_CUTOFF = 1000000 # <<<<<<<<<<<<<< * * */ if (PyDict_SetItem(__pyx_d, __pyx_n_s___SIZE_CUTOFF, __pyx_int_1000000) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 67; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "pandas/index.pyx":436 * return mid + 1 * * _pad_functions = { # <<<<<<<<<<<<<< * 'object' : algos.pad_object, * 'int64' : algos.pad_int64, */ __pyx_t_7 = PyDict_New(); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 436; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_7)); /* "pandas/index.pyx":437 * * _pad_functions = { * 'object' : algos.pad_object, # <<<<<<<<<<<<<< * 'int64' : algos.pad_int64, * 'float64' : algos.pad_float64 */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__algos); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 437; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__pad_object); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 437; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (PyDict_SetItem(__pyx_t_7, ((PyObject *)__pyx_n_s__object), __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 436; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pandas/index.pyx":438 * _pad_functions = { * 'object' : algos.pad_object, * 'int64' : algos.pad_int64, # <<<<<<<<<<<<<< * 'float64' : algos.pad_float64 * } */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__algos); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 438; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s__pad_int64); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 438; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (PyDict_SetItem(__pyx_t_7, ((PyObject *)__pyx_n_s__int64), __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 436; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/index.pyx":439 * 'object' : algos.pad_object, * 'int64' : algos.pad_int64, * 'float64' : algos.pad_float64 # <<<<<<<<<<<<<< * } * */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__algos); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 439; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__pad_float64); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 439; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (PyDict_SetItem(__pyx_t_7, ((PyObject *)__pyx_n_s__float64), __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 436; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (PyDict_SetItem(__pyx_d, __pyx_n_s___pad_functions, ((PyObject *)__pyx_t_7)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 436; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0; /* "pandas/index.pyx":442 * } * * _backfill_functions = { # <<<<<<<<<<<<<< * 'object': algos.backfill_object, * 'int64': algos.backfill_int64, */ __pyx_t_7 = PyDict_New(); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 442; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_7)); /* "pandas/index.pyx":443 * * _backfill_functions = { * 'object': algos.backfill_object, # <<<<<<<<<<<<<< * 'int64': algos.backfill_int64, * 'float64': algos.backfill_float64 */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__algos); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 443; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s__backfill_object); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 443; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (PyDict_SetItem(__pyx_t_7, ((PyObject *)__pyx_n_s__object), __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 442; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/index.pyx":444 * _backfill_functions = { * 'object': algos.backfill_object, * 'int64': algos.backfill_int64, # <<<<<<<<<<<<<< * 'float64': algos.backfill_float64 * } */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__algos); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 444; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__backfill_int64); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 444; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (PyDict_SetItem(__pyx_t_7, ((PyObject *)__pyx_n_s__int64), __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 442; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pandas/index.pyx":445 * 'object': algos.backfill_object, * 'int64': algos.backfill_int64, * 'float64': algos.backfill_float64 # <<<<<<<<<<<<<< * } * */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__algos); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 445; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s__backfill_float64); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 445; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (PyDict_SetItem(__pyx_t_7, ((PyObject *)__pyx_n_s__float64), __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 442; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (PyDict_SetItem(__pyx_d, __pyx_n_s___backfill_functions, ((PyObject *)__pyx_t_7)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 442; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0; /* "pandas/index.pyx":1 * from numpy cimport ndarray # <<<<<<<<<<<<<< * * from numpy cimport (float64_t, int32_t, int64_t, uint8_t, */ __pyx_t_7 = PyDict_New(); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_7)); if (PyDict_SetItem(__pyx_d, __pyx_n_s____test__, ((PyObject *)__pyx_t_7)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0; /* "numpy.pxd":979 * arr.base = baseptr * * cdef inline object get_array_base(ndarray arr): # <<<<<<<<<<<<<< * if arr.base is NULL: * return None */ goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); if (__pyx_m) { __Pyx_AddTraceback("init pandas.index", __pyx_clineno, __pyx_lineno, __pyx_filename); Py_DECREF(__pyx_m); __pyx_m = 0; } else if (!PyErr_Occurred()) { PyErr_SetString(PyExc_ImportError, "init pandas.index"); } __pyx_L0:; __Pyx_RefNannyFinishContext(); #if PY_MAJOR_VERSION < 3 return; #else return __pyx_m; #endif } /* Runtime support code */ #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 /* CYTHON_REFNANNY */ 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 '%s' is not defined", PyString_AS_STRING(name)); #endif } return result; } static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb) { PyObject *local_type, *local_value, *local_tb; #if CYTHON_COMPILING_IN_CPYTHON PyObject *tmp_type, *tmp_value, *tmp_tb; PyThreadState *tstate = PyThreadState_GET(); local_type = tstate->curexc_type; local_value = tstate->curexc_value; local_tb = tstate->curexc_traceback; tstate->curexc_type = 0; tstate->curexc_value = 0; tstate->curexc_traceback = 0; #else PyErr_Fetch(&local_type, &local_value, &local_tb); #endif PyErr_NormalizeException(&local_type, &local_value, &local_tb); #if CYTHON_COMPILING_IN_CPYTHON if (unlikely(tstate->curexc_type)) #else if (unlikely(PyErr_Occurred())) #endif goto bad; #if PY_MAJOR_VERSION >= 3 if (unlikely(PyException_SetTraceback(local_value, local_tb) < 0)) goto bad; #endif Py_INCREF(local_type); Py_INCREF(local_value); Py_INCREF(local_tb); *type = local_type; *value = local_value; *tb = local_tb; #if CYTHON_COMPILING_IN_CPYTHON tmp_type = tstate->exc_type; tmp_value = tstate->exc_value; tmp_tb = tstate->exc_traceback; tstate->exc_type = local_type; tstate->exc_value = local_value; tstate->exc_traceback = local_tb; /* Make sure tstate is in a consistent state when we XDECREF these objects (DECREF may run arbitrary code). */ 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; } 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, "%s() takes %s %" CYTHON_FORMAT_SSIZE_T "d positional argument%s (%" CYTHON_FORMAT_SSIZE_T "d given)", func_name, more_or_less, num_expected, (num_expected == 1) ? "" : "s", num_found); } 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 } 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, "%s() keywords must be strings", function_name); goto bad; invalid_keyword: PyErr_Format(PyExc_TypeError, #if PY_MAJOR_VERSION < 3 "%s() got an unexpected keyword argument '%s'", function_name, PyString_AsString(key)); #else "%s() got an unexpected keyword argument '%U'", function_name, key); #endif bad: return -1; } static int __Pyx_ArgTypeTest(PyObject *obj, PyTypeObject *type, int none_allowed, const char *name, int exact) { if (!type) { PyErr_Format(PyExc_SystemError, "Missing type object"); return 0; } if (none_allowed && obj == Py_None) return 1; else if (exact) { if (Py_TYPE(obj) == type) return 1; } else { if (PyObject_TypeCheck(obj, type)) return 1; } PyErr_Format(PyExc_TypeError, "Argument '%s' has incorrect type (expected %s, got %s)", name, type->tp_name, Py_TYPE(obj)->tp_name); return 0; } static CYTHON_INLINE PyObject *__Pyx_GetModuleGlobalName(PyObject *name) { PyObject *result; #if CYTHON_COMPILING_IN_CPYTHON result = PyDict_GetItem(__pyx_d, name); if (result) { Py_INCREF(result); } else { #else result = PyObject_GetItem(__pyx_d, name); if (!result) { PyErr_Clear(); #endif result = __Pyx_GetBuiltinName(name); } return result; } static CYTHON_INLINE void __Pyx_ErrRestore(PyObject *type, PyObject *value, PyObject *tb) { #if CYTHON_COMPILING_IN_CPYTHON PyObject *tmp_type, *tmp_value, *tmp_tb; PyThreadState *tstate = PyThreadState_GET(); 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); #else PyErr_Restore(type, value, tb); #endif } static CYTHON_INLINE void __Pyx_ErrFetch(PyObject **type, PyObject **value, PyObject **tb) { #if CYTHON_COMPILING_IN_CPYTHON PyThreadState *tstate = PyThreadState_GET(); *type = tstate->curexc_type; *value = tstate->curexc_value; *tb = tstate->curexc_traceback; tstate->curexc_type = 0; tstate->curexc_value = 0; tstate->curexc_traceback = 0; #else PyErr_Fetch(type, value, tb); #endif } #if PY_MAJOR_VERSION < 3 static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, CYTHON_UNUSED PyObject *cause) { 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 PY_VERSION_HEX < 0x02050000 if (PyClass_Check(type)) { #else if (PyType_Check(type)) { #endif #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; #if PY_VERSION_HEX < 0x02050000 if (PyInstance_Check(type)) { type = (PyObject*) ((PyInstanceObject*)type)->in_class; Py_INCREF(type); } else { type = 0; PyErr_SetString(PyExc_TypeError, "raise: exception must be an old-style class or instance"); goto raise_error; } #else 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; } #endif } __Pyx_ErrRestore(type, value, tb); return; raise_error: Py_XDECREF(value); Py_XDECREF(type); Py_XDECREF(tb); return; } #else /* Python 3+ */ 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 *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 = PyEval_CallObject(type, args); Py_DECREF(args); if (!owned_instance) goto bad; value = owned_instance; if (!PyExceptionInstance_Check(value)) { PyErr_Format(PyExc_TypeError, "calling %R should have returned an instance of " "BaseException, not %R", type, Py_TYPE(value)); goto bad; } } else { PyErr_SetString(PyExc_TypeError, "raise: exception class must be a subclass of BaseException"); goto bad; } #if PY_VERSION_HEX >= 0x03030000 if (cause) { #else if (cause && cause != Py_None) { #endif PyObject *fixed_cause; if (cause == Py_None) { fixed_cause = NULL; } else if (PyExceptionClass_Check(cause)) { fixed_cause = PyObject_CallObject(cause, NULL); if (fixed_cause == NULL) goto bad; } else if (PyExceptionInstance_Check(cause)) { fixed_cause = cause; Py_INCREF(fixed_cause); } else { PyErr_SetString(PyExc_TypeError, "exception causes must derive from " "BaseException"); goto bad; } PyException_SetCause(value, fixed_cause); } PyErr_SetObject(type, value); if (tb) { PyThreadState *tstate = PyThreadState_GET(); PyObject* tmp_tb = tstate->curexc_traceback; if (tb != tmp_tb) { Py_INCREF(tb); tstate->curexc_traceback = tb; Py_XDECREF(tmp_tb); } } bad: Py_XDECREF(owned_instance); return; } #endif static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type) { if (unlikely(!type)) { PyErr_Format(PyExc_SystemError, "Missing type object"); return 0; } if (likely(PyObject_TypeCheck(obj, type))) return 1; PyErr_Format(PyExc_TypeError, "Cannot convert %.200s to %.200s", Py_TYPE(obj)->tp_name, type->tp_name); return 0; } static CYTHON_INLINE int __Pyx_IsLittleEndian(void) { unsigned int n = 1; return *(unsigned char*)(&n) != 0; } 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) /* First char was not a digit */ 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; /* Consume from buffer string */ while (1) { if (field == &ctx->root) { ctx->head = NULL; if (ctx->enc_count != 0) { __Pyx_BufFmt_RaiseExpected(ctx); return -1; } break; /* breaks both loops as ctx->enc_count == 0 */ } 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; /* empty struct */ 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 CYTHON_INLINE 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 != ')') { if (isspace(*ts)) continue; 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 10: case 13: ++ts; break; case '<': if (!__Pyx_IsLittleEndian()) { PyErr_SetString(PyExc_ValueError, "Little-endian buffer not supported on big-endian compiler"); return NULL; } ctx->new_packmode = '='; ++ts; break; case '>': case '!': if (__Pyx_IsLittleEndian()) { 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': /* substruct */ { 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; /* Erase processed last struct element */ 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 '}': /* end of substruct; either repeat or move on */ { size_t alignment = ctx->struct_alignment; ++ts; if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL; ctx->enc_type = 0; /* Erase processed last struct element */ 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; } /* fall through */ 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 's': case 'p': if (ctx->enc_type == *ts && got_Z == ctx->is_complex && ctx->enc_packmode == ctx->new_packmode) { ctx->enc_count += ctx->new_count; } else { 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; } } } } static CYTHON_INLINE 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 CYTHON_INLINE int __Pyx_GetBufferAndValidate( Py_buffer* buf, PyObject* obj, __Pyx_TypeInfo* dtype, int flags, int nd, int cast, __Pyx_BufFmt_StackElem* stack) { if (obj == Py_None || obj == NULL) { __Pyx_ZeroBuffer(buf); return 0; } buf->buf = NULL; if (__Pyx_GetBuffer(obj, buf, flags) == -1) goto fail; if (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 ((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_ZeroBuffer(buf); return -1; } static CYTHON_INLINE void __Pyx_SafeReleaseBuffer(Py_buffer* info) { if (info->buf == NULL) return; if (info->suboffsets == __Pyx_minusones) info->suboffsets = NULL; __Pyx_ReleaseBuffer(info); } static void __Pyx_RaiseBufferFallbackError(void) { PyErr_Format(PyExc_ValueError, "Buffer acquisition failed on assignment; and then reacquiring the old buffer failed too!"); } static void __Pyx_RaiseBufferIndexError(int axis) { PyErr_Format(PyExc_IndexError, "Out of bounds on buffer access (axis %d)", axis); } 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); } static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index) { PyErr_Format(PyExc_ValueError, "need more than %" CYTHON_FORMAT_SSIZE_T "d value%s to unpack", index, (index == 1) ? "" : "s"); } static CYTHON_INLINE int __Pyx_IterFinish(void) { #if CYTHON_COMPILING_IN_CPYTHON PyThreadState *tstate = PyThreadState_GET(); PyObject* exc_type = tstate->curexc_type; if (unlikely(exc_type)) { if (likely(exc_type == PyExc_StopIteration) || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration)) { PyObject *exc_value, *exc_tb; exc_value = tstate->curexc_value; exc_tb = tstate->curexc_traceback; tstate->curexc_type = 0; tstate->curexc_value = 0; tstate->curexc_traceback = 0; Py_DECREF(exc_type); Py_XDECREF(exc_value); Py_XDECREF(exc_tb); return 0; } else { return -1; } } return 0; #else if (unlikely(PyErr_Occurred())) { if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) { PyErr_Clear(); return 0; } else { return -1; } } return 0; #endif } 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; } static CYTHON_INLINE PyObject* __Pyx_PyObject_Append(PyObject* L, PyObject* x) { if (likely(PyList_CheckExact(L))) { if (unlikely(__Pyx_PyList_Append(L, x) < 0)) return NULL; Py_INCREF(Py_None); return Py_None; /* this is just to have an accurate signature */ } else { return __Pyx_PyObject_CallMethod1(L, __pyx_n_s__append, x); } } static CYTHON_INLINE PyObject* __Pyx_PyObject_GetSlice( PyObject* obj, Py_ssize_t cstart, Py_ssize_t cstop, PyObject** _py_start, PyObject** _py_stop, PyObject** _py_slice, int has_cstart, int has_cstop, CYTHON_UNUSED int wraparound) { #if CYTHON_COMPILING_IN_CPYTHON PyMappingMethods* mp; #if PY_MAJOR_VERSION < 3 PySequenceMethods* ms = Py_TYPE(obj)->tp_as_sequence; if (likely(ms && ms->sq_slice)) { if (!has_cstart) { if (_py_start && (*_py_start != Py_None)) { cstart = __Pyx_PyIndex_AsSsize_t(*_py_start); if ((cstart == (Py_ssize_t)-1) && PyErr_Occurred()) goto bad; } else cstart = 0; } if (!has_cstop) { if (_py_stop && (*_py_stop != Py_None)) { cstop = __Pyx_PyIndex_AsSsize_t(*_py_stop); if ((cstop == (Py_ssize_t)-1) && PyErr_Occurred()) goto bad; } else cstop = PY_SSIZE_T_MAX; } if (wraparound && unlikely((cstart < 0) | (cstop < 0)) && likely(ms->sq_length)) { Py_ssize_t l = ms->sq_length(obj); if (likely(l >= 0)) { if (cstop < 0) { cstop += l; if (cstop < 0) cstop = 0; } if (cstart < 0) { cstart += l; if (cstart < 0) cstart = 0; } } else { if (PyErr_ExceptionMatches(PyExc_OverflowError)) PyErr_Clear(); else goto bad; } } return ms->sq_slice(obj, cstart, cstop); } #endif mp = Py_TYPE(obj)->tp_as_mapping; if (likely(mp && mp->mp_subscript)) #endif { PyObject* result; PyObject *py_slice, *py_start, *py_stop; if (_py_slice) { py_slice = *_py_slice; } else { PyObject* owned_start = NULL; PyObject* owned_stop = NULL; if (_py_start) { py_start = *_py_start; } else { if (has_cstart) { owned_start = py_start = PyInt_FromSsize_t(cstart); if (unlikely(!py_start)) goto bad; } else py_start = Py_None; } if (_py_stop) { py_stop = *_py_stop; } else { if (has_cstop) { owned_stop = py_stop = PyInt_FromSsize_t(cstop); if (unlikely(!py_stop)) { Py_XDECREF(owned_start); goto bad; } } else py_stop = Py_None; } py_slice = PySlice_New(py_start, py_stop, Py_None); Py_XDECREF(owned_start); Py_XDECREF(owned_stop); if (unlikely(!py_slice)) goto bad; } #if CYTHON_COMPILING_IN_CPYTHON result = mp->mp_subscript(obj, py_slice); #else result = PyObject_GetItem(obj, py_slice); #endif if (!_py_slice) { Py_DECREF(py_slice); } return result; } PyErr_Format(PyExc_TypeError, "'%.200s' object is unsliceable", Py_TYPE(obj)->tp_name); bad: return NULL; } static CYTHON_INLINE Py_ssize_t __Pyx_div_Py_ssize_t(Py_ssize_t a, Py_ssize_t b) { Py_ssize_t q = a / b; Py_ssize_t r = a - q*b; q -= ((r != 0) & ((r ^ b) < 0)); return q; } static CYTHON_INLINE PyObject *__Pyx_GetAttr(PyObject *o, PyObject *n) { #if CYTHON_COMPILING_IN_CPYTHON #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); } static CYTHON_INLINE PyObject *__Pyx_GetAttr3(PyObject *o, PyObject *n, PyObject *d) { PyObject *r = __Pyx_GetAttr(o, n); if (!r) { if (!PyErr_ExceptionMatches(PyExc_AttributeError)) goto bad; PyErr_Clear(); r = d; Py_INCREF(d); } return r; bad: return NULL; } static void __Pyx_WriteUnraisable(const char *name, CYTHON_UNUSED int clineno, CYTHON_UNUSED int lineno, CYTHON_UNUSED const char *filename) { PyObject *old_exc, *old_val, *old_tb; PyObject *ctx; __Pyx_ErrFetch(&old_exc, &old_val, &old_tb); #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); } } static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); } static int __Pyx_SetVtable(PyObject *dict, void *vtable) { #if PY_VERSION_HEX >= 0x02070000 && !(PY_MAJOR_VERSION==3&&PY_MINOR_VERSION==0) 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; } static void* __Pyx_GetVtable(PyObject *dict) { void* ptr; PyObject *ob = PyObject_GetItem(dict, __pyx_n_s____pyx_vtable__); if (!ob) goto bad; #if PY_VERSION_HEX >= 0x02070000 && !(PY_MAJOR_VERSION==3&&PY_MINOR_VERSION==0) ptr = PyCapsule_GetPointer(ob, 0); #else ptr = PyCObject_AsVoidPtr(ob); #endif if (!ptr && !PyErr_Occurred()) PyErr_SetString(PyExc_RuntimeError, "invalid vtable found for imported type"); Py_DECREF(ob); return ptr; bad: Py_XDECREF(ob); return NULL; } 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; } static CYTHON_INLINE void __Pyx_ExceptionSave(PyObject **type, PyObject **value, PyObject **tb) { #if CYTHON_COMPILING_IN_CPYTHON PyThreadState *tstate = PyThreadState_GET(); *type = tstate->exc_type; *value = tstate->exc_value; *tb = tstate->exc_traceback; Py_XINCREF(*type); Py_XINCREF(*value); Py_XINCREF(*tb); #else PyErr_GetExcInfo(type, value, tb); #endif } static void __Pyx_ExceptionReset(PyObject *type, PyObject *value, PyObject *tb) { #if CYTHON_COMPILING_IN_CPYTHON PyObject *tmp_type, *tmp_value, *tmp_tb; PyThreadState *tstate = PyThreadState_GET(); tmp_type = tstate->exc_type; tmp_value = tstate->exc_value; tmp_tb = tstate->exc_traceback; tstate->exc_type = type; tstate->exc_value = value; tstate->exc_traceback = tb; Py_XDECREF(tmp_type); Py_XDECREF(tmp_value); Py_XDECREF(tmp_tb); #else PyErr_SetExcInfo(type, value, tb); #endif } #if PY_MAJOR_VERSION < 3 static int __Pyx_GetBuffer(PyObject *obj, Py_buffer *view, int flags) { #if PY_VERSION_HEX >= 0x02060000 if (PyObject_CheckBuffer(obj)) return PyObject_GetBuffer(obj, view, flags); #endif if (PyObject_TypeCheck(obj, __pyx_ptype_5numpy_ndarray)) return __pyx_pw_5numpy_7ndarray_1__getbuffer__(obj, view, flags); #if PY_VERSION_HEX < 0x02060000 if (obj->ob_type->tp_dict) { PyObject *getbuffer_cobj = PyObject_GetItem( obj->ob_type->tp_dict, __pyx_n_s____pyx_getbuffer); if (getbuffer_cobj) { getbufferproc func = (getbufferproc) PyCObject_AsVoidPtr(getbuffer_cobj); Py_DECREF(getbuffer_cobj); if (!func) goto fail; return func(obj, view, flags); } else { PyErr_Clear(); } } #endif PyErr_Format(PyExc_TypeError, "'%100s' does not have the buffer interface", Py_TYPE(obj)->tp_name); #if PY_VERSION_HEX < 0x02060000 fail: #endif return -1; } static void __Pyx_ReleaseBuffer(Py_buffer *view) { PyObject *obj = view->obj; if (!obj) return; #if PY_VERSION_HEX >= 0x02060000 if (PyObject_CheckBuffer(obj)) { PyBuffer_Release(view); return; } #endif if (PyObject_TypeCheck(obj, __pyx_ptype_5numpy_ndarray)) { __pyx_pw_5numpy_7ndarray_3__releasebuffer__(obj, view); return; } #if PY_VERSION_HEX < 0x02060000 if (obj->ob_type->tp_dict) { PyObject *releasebuffer_cobj = PyObject_GetItem( obj->ob_type->tp_dict, __pyx_n_s____pyx_releasebuffer); if (releasebuffer_cobj) { releasebufferproc func = (releasebufferproc) PyCObject_AsVoidPtr(releasebuffer_cobj); Py_DECREF(releasebuffer_cobj); if (!func) goto fail; func(obj, view); return; } else { PyErr_Clear(); } } #endif goto nofail; #if PY_VERSION_HEX < 0x02060000 fail: #endif PyErr_WriteUnraisable(obj); nofail: Py_DECREF(obj); view->obj = NULL; } #endif /* PY_MAJOR_VERSION < 3 */ static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level) { PyObject *empty_list = 0; PyObject *module = 0; PyObject *global_dict = 0; PyObject *empty_dict = 0; PyObject *list; #if PY_VERSION_HEX < 0x03030000 PyObject *py_import; py_import = __Pyx_PyObject_GetAttrStr(__pyx_b, __pyx_n_s____import__); if (!py_import) goto bad; #endif if (from_list) list = from_list; else { empty_list = PyList_New(0); if (!empty_list) goto bad; list = empty_list; } global_dict = PyModule_GetDict(__pyx_m); if (!global_dict) goto bad; empty_dict = PyDict_New(); if (!empty_dict) goto bad; #if PY_VERSION_HEX >= 0x02050000 { #if PY_MAJOR_VERSION >= 3 if (level == -1) { if (strchr(__Pyx_MODULE_NAME, '.')) { #if PY_VERSION_HEX < 0x03030000 PyObject *py_level = PyInt_FromLong(1); if (!py_level) goto bad; module = PyObject_CallFunctionObjArgs(py_import, name, global_dict, empty_dict, list, py_level, NULL); Py_DECREF(py_level); #else module = PyImport_ImportModuleLevelObject( name, global_dict, empty_dict, list, 1); #endif if (!module) { if (!PyErr_ExceptionMatches(PyExc_ImportError)) goto bad; PyErr_Clear(); } } level = 0; /* try absolute import on failure */ } #endif if (!module) { #if PY_VERSION_HEX < 0x03030000 PyObject *py_level = PyInt_FromLong(level); if (!py_level) goto bad; module = PyObject_CallFunctionObjArgs(py_import, name, global_dict, empty_dict, list, py_level, NULL); Py_DECREF(py_level); #else module = PyImport_ImportModuleLevelObject( name, global_dict, empty_dict, list, level); #endif } } #else if (level>0) { PyErr_SetString(PyExc_RuntimeError, "Relative import is not supported for Python <=2.4."); goto bad; } module = PyObject_CallFunctionObjArgs(py_import, name, global_dict, empty_dict, list, NULL); #endif bad: #if PY_VERSION_HEX < 0x03030000 Py_XDECREF(py_import); #endif Py_XDECREF(empty_list); Py_XDECREF(empty_dict); return module; } static CYTHON_INLINE npy_int64 __Pyx_PyInt_from_py_npy_int64(PyObject* x) { const npy_int64 neg_one = (npy_int64)-1, const_zero = (npy_int64)0; const int is_unsigned = const_zero < neg_one; if (sizeof(npy_int64) == sizeof(char)) { if (is_unsigned) return (npy_int64)__Pyx_PyInt_AsUnsignedChar(x); else return (npy_int64)__Pyx_PyInt_AsSignedChar(x); } else if (sizeof(npy_int64) == sizeof(short)) { if (is_unsigned) return (npy_int64)__Pyx_PyInt_AsUnsignedShort(x); else return (npy_int64)__Pyx_PyInt_AsSignedShort(x); } else if (sizeof(npy_int64) == sizeof(int)) { if (is_unsigned) return (npy_int64)__Pyx_PyInt_AsUnsignedInt(x); else return (npy_int64)__Pyx_PyInt_AsSignedInt(x); } else if (sizeof(npy_int64) == sizeof(long)) { if (is_unsigned) return (npy_int64)__Pyx_PyInt_AsUnsignedLong(x); else return (npy_int64)__Pyx_PyInt_AsSignedLong(x); } else if (sizeof(npy_int64) == sizeof(PY_LONG_LONG)) { if (is_unsigned) return (npy_int64)__Pyx_PyInt_AsUnsignedLongLong(x); else return (npy_int64)__Pyx_PyInt_AsSignedLongLong(x); } else { #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_Int(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; } } static CYTHON_INLINE PyObject *__Pyx_PyInt_to_py_npy_int64(npy_int64 val) { const npy_int64 neg_one = (npy_int64)-1, const_zero = (npy_int64)0; const int is_unsigned = const_zero < neg_one; if ((sizeof(npy_int64) == sizeof(char)) || (sizeof(npy_int64) == sizeof(short))) { return PyInt_FromLong((long)val); } else if ((sizeof(npy_int64) == sizeof(int)) || (sizeof(npy_int64) == sizeof(long))) { if (is_unsigned) return PyLong_FromUnsignedLong((unsigned long)val); else return PyInt_FromLong((long)val); } else if (sizeof(npy_int64) == sizeof(PY_LONG_LONG)) { if (is_unsigned) return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG)val); else return PyLong_FromLongLong((PY_LONG_LONG)val); } else { int one = 1; int little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&val; return _PyLong_FromByteArray(bytes, sizeof(npy_int64), little, !is_unsigned); } } static CYTHON_INLINE npy_int32 __Pyx_PyInt_from_py_npy_int32(PyObject* x) { const npy_int32 neg_one = (npy_int32)-1, const_zero = (npy_int32)0; const int is_unsigned = const_zero < neg_one; if (sizeof(npy_int32) == sizeof(char)) { if (is_unsigned) return (npy_int32)__Pyx_PyInt_AsUnsignedChar(x); else return (npy_int32)__Pyx_PyInt_AsSignedChar(x); } else if (sizeof(npy_int32) == sizeof(short)) { if (is_unsigned) return (npy_int32)__Pyx_PyInt_AsUnsignedShort(x); else return (npy_int32)__Pyx_PyInt_AsSignedShort(x); } else if (sizeof(npy_int32) == sizeof(int)) { if (is_unsigned) return (npy_int32)__Pyx_PyInt_AsUnsignedInt(x); else return (npy_int32)__Pyx_PyInt_AsSignedInt(x); } else if (sizeof(npy_int32) == sizeof(long)) { if (is_unsigned) return (npy_int32)__Pyx_PyInt_AsUnsignedLong(x); else return (npy_int32)__Pyx_PyInt_AsSignedLong(x); } else if (sizeof(npy_int32) == sizeof(PY_LONG_LONG)) { if (is_unsigned) return (npy_int32)__Pyx_PyInt_AsUnsignedLongLong(x); else return (npy_int32)__Pyx_PyInt_AsSignedLongLong(x); } else { #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_Int(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; } } #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 #if CYTHON_CCOMPLEX #else static CYTHON_INLINE int __Pyx_c_eqf(__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_sumf(__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_difff(__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_prodf(__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; } static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_quotf(__pyx_t_float_complex a, __pyx_t_float_complex b) { __pyx_t_float_complex z; float denom = b.real * b.real + b.imag * b.imag; z.real = (a.real * b.real + a.imag * b.imag) / denom; z.imag = (a.imag * b.real - a.real * b.imag) / denom; return z; } static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_negf(__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_zerof(__pyx_t_float_complex a) { return (a.real == 0) && (a.imag == 0); } static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_conjf(__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_absf(__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_powf(__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_prodf(a, a); return __Pyx_c_prodf(a, a); case 3: z = __Pyx_c_prodf(a, a); return __Pyx_c_prodf(z, a); case 4: z = __Pyx_c_prodf(a, a); return __Pyx_c_prodf(z, z); } } if (a.imag == 0) { if (a.real == 0) { return a; } r = a.real; theta = 0; } else { r = __Pyx_c_absf(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 #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 #if CYTHON_CCOMPLEX #else static CYTHON_INLINE int __Pyx_c_eq(__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(__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(__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(__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; } static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_quot(__pyx_t_double_complex a, __pyx_t_double_complex b) { __pyx_t_double_complex z; double denom = b.real * b.real + b.imag * b.imag; z.real = (a.real * b.real + a.imag * b.imag) / denom; z.imag = (a.imag * b.real - a.real * b.imag) / denom; return z; } static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_neg(__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(__pyx_t_double_complex a) { return (a.real == 0) && (a.imag == 0); } static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_conj(__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(__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(__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(a, a); return __Pyx_c_prod(a, a); case 3: z = __Pyx_c_prod(a, a); return __Pyx_c_prod(z, a); case 4: z = __Pyx_c_prod(a, a); return __Pyx_c_prod(z, z); } } if (a.imag == 0) { if (a.real == 0) { return a; } r = a.real; theta = 0; } else { r = __Pyx_c_abs(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 static CYTHON_INLINE unsigned char __Pyx_PyInt_AsUnsignedChar(PyObject* x) { const unsigned char neg_one = (unsigned char)-1, const_zero = 0; const int is_unsigned = neg_one > const_zero; if (sizeof(unsigned char) < sizeof(long)) { long val = __Pyx_PyInt_AsLong(x); if (unlikely(val != (long)(unsigned char)val)) { if (!unlikely(val == -1 && PyErr_Occurred())) { PyErr_SetString(PyExc_OverflowError, (is_unsigned && unlikely(val < 0)) ? "can't convert negative value to unsigned char" : "value too large to convert to unsigned char"); } return (unsigned char)-1; } return (unsigned char)val; } return (unsigned char)__Pyx_PyInt_AsUnsignedLong(x); } static CYTHON_INLINE unsigned short __Pyx_PyInt_AsUnsignedShort(PyObject* x) { const unsigned short neg_one = (unsigned short)-1, const_zero = 0; const int is_unsigned = neg_one > const_zero; if (sizeof(unsigned short) < sizeof(long)) { long val = __Pyx_PyInt_AsLong(x); if (unlikely(val != (long)(unsigned short)val)) { if (!unlikely(val == -1 && PyErr_Occurred())) { PyErr_SetString(PyExc_OverflowError, (is_unsigned && unlikely(val < 0)) ? "can't convert negative value to unsigned short" : "value too large to convert to unsigned short"); } return (unsigned short)-1; } return (unsigned short)val; } return (unsigned short)__Pyx_PyInt_AsUnsignedLong(x); } static CYTHON_INLINE unsigned int __Pyx_PyInt_AsUnsignedInt(PyObject* x) { const unsigned int neg_one = (unsigned int)-1, const_zero = 0; const int is_unsigned = neg_one > const_zero; if (sizeof(unsigned int) < sizeof(long)) { long val = __Pyx_PyInt_AsLong(x); if (unlikely(val != (long)(unsigned int)val)) { if (!unlikely(val == -1 && PyErr_Occurred())) { PyErr_SetString(PyExc_OverflowError, (is_unsigned && unlikely(val < 0)) ? "can't convert negative value to unsigned int" : "value too large to convert to unsigned int"); } return (unsigned int)-1; } return (unsigned int)val; } return (unsigned int)__Pyx_PyInt_AsUnsignedLong(x); } static CYTHON_INLINE char __Pyx_PyInt_AsChar(PyObject* x) { const char neg_one = (char)-1, const_zero = 0; const int is_unsigned = neg_one > const_zero; if (sizeof(char) < sizeof(long)) { long val = __Pyx_PyInt_AsLong(x); if (unlikely(val != (long)(char)val)) { if (!unlikely(val == -1 && PyErr_Occurred())) { PyErr_SetString(PyExc_OverflowError, (is_unsigned && unlikely(val < 0)) ? "can't convert negative value to char" : "value too large to convert to char"); } return (char)-1; } return (char)val; } return (char)__Pyx_PyInt_AsLong(x); } static CYTHON_INLINE short __Pyx_PyInt_AsShort(PyObject* x) { const short neg_one = (short)-1, const_zero = 0; const int is_unsigned = neg_one > const_zero; if (sizeof(short) < sizeof(long)) { long val = __Pyx_PyInt_AsLong(x); if (unlikely(val != (long)(short)val)) { if (!unlikely(val == -1 && PyErr_Occurred())) { PyErr_SetString(PyExc_OverflowError, (is_unsigned && unlikely(val < 0)) ? "can't convert negative value to short" : "value too large to convert to short"); } return (short)-1; } return (short)val; } return (short)__Pyx_PyInt_AsLong(x); } static CYTHON_INLINE int __Pyx_PyInt_AsInt(PyObject* x) { const int neg_one = (int)-1, const_zero = 0; const int is_unsigned = neg_one > const_zero; if (sizeof(int) < sizeof(long)) { long val = __Pyx_PyInt_AsLong(x); if (unlikely(val != (long)(int)val)) { if (!unlikely(val == -1 && PyErr_Occurred())) { PyErr_SetString(PyExc_OverflowError, (is_unsigned && unlikely(val < 0)) ? "can't convert negative value to int" : "value too large to convert to int"); } return (int)-1; } return (int)val; } return (int)__Pyx_PyInt_AsLong(x); } static CYTHON_INLINE signed char __Pyx_PyInt_AsSignedChar(PyObject* x) { const signed char neg_one = (signed char)-1, const_zero = 0; const int is_unsigned = neg_one > const_zero; if (sizeof(signed char) < sizeof(long)) { long val = __Pyx_PyInt_AsLong(x); if (unlikely(val != (long)(signed char)val)) { if (!unlikely(val == -1 && PyErr_Occurred())) { PyErr_SetString(PyExc_OverflowError, (is_unsigned && unlikely(val < 0)) ? "can't convert negative value to signed char" : "value too large to convert to signed char"); } return (signed char)-1; } return (signed char)val; } return (signed char)__Pyx_PyInt_AsSignedLong(x); } static CYTHON_INLINE signed short __Pyx_PyInt_AsSignedShort(PyObject* x) { const signed short neg_one = (signed short)-1, const_zero = 0; const int is_unsigned = neg_one > const_zero; if (sizeof(signed short) < sizeof(long)) { long val = __Pyx_PyInt_AsLong(x); if (unlikely(val != (long)(signed short)val)) { if (!unlikely(val == -1 && PyErr_Occurred())) { PyErr_SetString(PyExc_OverflowError, (is_unsigned && unlikely(val < 0)) ? "can't convert negative value to signed short" : "value too large to convert to signed short"); } return (signed short)-1; } return (signed short)val; } return (signed short)__Pyx_PyInt_AsSignedLong(x); } static CYTHON_INLINE signed int __Pyx_PyInt_AsSignedInt(PyObject* x) { const signed int neg_one = (signed int)-1, const_zero = 0; const int is_unsigned = neg_one > const_zero; if (sizeof(signed int) < sizeof(long)) { long val = __Pyx_PyInt_AsLong(x); if (unlikely(val != (long)(signed int)val)) { if (!unlikely(val == -1 && PyErr_Occurred())) { PyErr_SetString(PyExc_OverflowError, (is_unsigned && unlikely(val < 0)) ? "can't convert negative value to signed int" : "value too large to convert to signed int"); } return (signed int)-1; } return (signed int)val; } return (signed int)__Pyx_PyInt_AsSignedLong(x); } static CYTHON_INLINE int __Pyx_PyInt_AsLongDouble(PyObject* x) { const int neg_one = (int)-1, const_zero = 0; const int is_unsigned = neg_one > const_zero; if (sizeof(int) < sizeof(long)) { long val = __Pyx_PyInt_AsLong(x); if (unlikely(val != (long)(int)val)) { if (!unlikely(val == -1 && PyErr_Occurred())) { PyErr_SetString(PyExc_OverflowError, (is_unsigned && unlikely(val < 0)) ? "can't convert negative value to int" : "value too large to convert to int"); } return (int)-1; } return (int)val; } return (int)__Pyx_PyInt_AsLong(x); } #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS #include "longintrepr.h" #endif #endif static CYTHON_INLINE unsigned long __Pyx_PyInt_AsUnsignedLong(PyObject* x) { const unsigned long neg_one = (unsigned long)-1, const_zero = 0; const int is_unsigned = neg_one > const_zero; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_Check(x))) { long val = PyInt_AS_LONG(x); if (is_unsigned && unlikely(val < 0)) { PyErr_SetString(PyExc_OverflowError, "can't convert negative value to unsigned long"); return (unsigned long)-1; } return (unsigned long)val; } else #endif if (likely(PyLong_Check(x))) { if (is_unsigned) { #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS if (sizeof(digit) <= sizeof(unsigned long)) { switch (Py_SIZE(x)) { case 0: return 0; case 1: return (unsigned long) ((PyLongObject*)x)->ob_digit[0]; } } #endif #endif if (unlikely(Py_SIZE(x) < 0)) { PyErr_SetString(PyExc_OverflowError, "can't convert negative value to unsigned long"); return (unsigned long)-1; } return (unsigned long)PyLong_AsUnsignedLong(x); } else { #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS if (sizeof(digit) <= sizeof(unsigned long)) { switch (Py_SIZE(x)) { case 0: return 0; case 1: return +(unsigned long) ((PyLongObject*)x)->ob_digit[0]; case -1: return -(unsigned long) ((PyLongObject*)x)->ob_digit[0]; } } #endif #endif return (unsigned long)PyLong_AsLong(x); } } else { unsigned long val; PyObject *tmp = __Pyx_PyNumber_Int(x); if (!tmp) return (unsigned long)-1; val = __Pyx_PyInt_AsUnsignedLong(tmp); Py_DECREF(tmp); return val; } } #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS #include "longintrepr.h" #endif #endif static CYTHON_INLINE unsigned PY_LONG_LONG __Pyx_PyInt_AsUnsignedLongLong(PyObject* x) { const unsigned PY_LONG_LONG neg_one = (unsigned PY_LONG_LONG)-1, const_zero = 0; const int is_unsigned = neg_one > const_zero; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_Check(x))) { long val = PyInt_AS_LONG(x); if (is_unsigned && unlikely(val < 0)) { PyErr_SetString(PyExc_OverflowError, "can't convert negative value to unsigned PY_LONG_LONG"); return (unsigned PY_LONG_LONG)-1; } return (unsigned PY_LONG_LONG)val; } else #endif if (likely(PyLong_Check(x))) { if (is_unsigned) { #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS if (sizeof(digit) <= sizeof(unsigned PY_LONG_LONG)) { switch (Py_SIZE(x)) { case 0: return 0; case 1: return (unsigned PY_LONG_LONG) ((PyLongObject*)x)->ob_digit[0]; } } #endif #endif if (unlikely(Py_SIZE(x) < 0)) { PyErr_SetString(PyExc_OverflowError, "can't convert negative value to unsigned PY_LONG_LONG"); return (unsigned PY_LONG_LONG)-1; } return (unsigned PY_LONG_LONG)PyLong_AsUnsignedLongLong(x); } else { #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS if (sizeof(digit) <= sizeof(unsigned PY_LONG_LONG)) { switch (Py_SIZE(x)) { case 0: return 0; case 1: return +(unsigned PY_LONG_LONG) ((PyLongObject*)x)->ob_digit[0]; case -1: return -(unsigned PY_LONG_LONG) ((PyLongObject*)x)->ob_digit[0]; } } #endif #endif return (unsigned PY_LONG_LONG)PyLong_AsLongLong(x); } } else { unsigned PY_LONG_LONG val; PyObject *tmp = __Pyx_PyNumber_Int(x); if (!tmp) return (unsigned PY_LONG_LONG)-1; val = __Pyx_PyInt_AsUnsignedLongLong(tmp); Py_DECREF(tmp); return val; } } #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS #include "longintrepr.h" #endif #endif static CYTHON_INLINE long __Pyx_PyInt_AsLong(PyObject* x) { const long neg_one = (long)-1, const_zero = 0; const int is_unsigned = neg_one > const_zero; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_Check(x))) { long val = PyInt_AS_LONG(x); if (is_unsigned && unlikely(val < 0)) { PyErr_SetString(PyExc_OverflowError, "can't convert negative value to long"); return (long)-1; } return (long)val; } else #endif if (likely(PyLong_Check(x))) { if (is_unsigned) { #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS if (sizeof(digit) <= sizeof(long)) { switch (Py_SIZE(x)) { case 0: return 0; case 1: return (long) ((PyLongObject*)x)->ob_digit[0]; } } #endif #endif if (unlikely(Py_SIZE(x) < 0)) { PyErr_SetString(PyExc_OverflowError, "can't convert negative value to long"); return (long)-1; } return (long)PyLong_AsUnsignedLong(x); } else { #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS if (sizeof(digit) <= sizeof(long)) { switch (Py_SIZE(x)) { case 0: return 0; case 1: return +(long) ((PyLongObject*)x)->ob_digit[0]; case -1: return -(long) ((PyLongObject*)x)->ob_digit[0]; } } #endif #endif return (long)PyLong_AsLong(x); } } else { long val; PyObject *tmp = __Pyx_PyNumber_Int(x); if (!tmp) return (long)-1; val = __Pyx_PyInt_AsLong(tmp); Py_DECREF(tmp); return val; } } #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS #include "longintrepr.h" #endif #endif static CYTHON_INLINE PY_LONG_LONG __Pyx_PyInt_AsLongLong(PyObject* x) { const PY_LONG_LONG neg_one = (PY_LONG_LONG)-1, const_zero = 0; const int is_unsigned = neg_one > const_zero; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_Check(x))) { long val = PyInt_AS_LONG(x); if (is_unsigned && unlikely(val < 0)) { PyErr_SetString(PyExc_OverflowError, "can't convert negative value to PY_LONG_LONG"); return (PY_LONG_LONG)-1; } return (PY_LONG_LONG)val; } else #endif if (likely(PyLong_Check(x))) { if (is_unsigned) { #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS if (sizeof(digit) <= sizeof(PY_LONG_LONG)) { switch (Py_SIZE(x)) { case 0: return 0; case 1: return (PY_LONG_LONG) ((PyLongObject*)x)->ob_digit[0]; } } #endif #endif if (unlikely(Py_SIZE(x) < 0)) { PyErr_SetString(PyExc_OverflowError, "can't convert negative value to PY_LONG_LONG"); return (PY_LONG_LONG)-1; } return (PY_LONG_LONG)PyLong_AsUnsignedLongLong(x); } else { #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS if (sizeof(digit) <= sizeof(PY_LONG_LONG)) { switch (Py_SIZE(x)) { case 0: return 0; case 1: return +(PY_LONG_LONG) ((PyLongObject*)x)->ob_digit[0]; case -1: return -(PY_LONG_LONG) ((PyLongObject*)x)->ob_digit[0]; } } #endif #endif return (PY_LONG_LONG)PyLong_AsLongLong(x); } } else { PY_LONG_LONG val; PyObject *tmp = __Pyx_PyNumber_Int(x); if (!tmp) return (PY_LONG_LONG)-1; val = __Pyx_PyInt_AsLongLong(tmp); Py_DECREF(tmp); return val; } } #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS #include "longintrepr.h" #endif #endif static CYTHON_INLINE signed long __Pyx_PyInt_AsSignedLong(PyObject* x) { const signed long neg_one = (signed long)-1, const_zero = 0; const int is_unsigned = neg_one > const_zero; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_Check(x))) { long val = PyInt_AS_LONG(x); if (is_unsigned && unlikely(val < 0)) { PyErr_SetString(PyExc_OverflowError, "can't convert negative value to signed long"); return (signed long)-1; } return (signed long)val; } else #endif if (likely(PyLong_Check(x))) { if (is_unsigned) { #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS if (sizeof(digit) <= sizeof(signed long)) { switch (Py_SIZE(x)) { case 0: return 0; case 1: return (signed long) ((PyLongObject*)x)->ob_digit[0]; } } #endif #endif if (unlikely(Py_SIZE(x) < 0)) { PyErr_SetString(PyExc_OverflowError, "can't convert negative value to signed long"); return (signed long)-1; } return (signed long)PyLong_AsUnsignedLong(x); } else { #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS if (sizeof(digit) <= sizeof(signed long)) { switch (Py_SIZE(x)) { case 0: return 0; case 1: return +(signed long) ((PyLongObject*)x)->ob_digit[0]; case -1: return -(signed long) ((PyLongObject*)x)->ob_digit[0]; } } #endif #endif return (signed long)PyLong_AsLong(x); } } else { signed long val; PyObject *tmp = __Pyx_PyNumber_Int(x); if (!tmp) return (signed long)-1; val = __Pyx_PyInt_AsSignedLong(tmp); Py_DECREF(tmp); return val; } } #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS #include "longintrepr.h" #endif #endif static CYTHON_INLINE signed PY_LONG_LONG __Pyx_PyInt_AsSignedLongLong(PyObject* x) { const signed PY_LONG_LONG neg_one = (signed PY_LONG_LONG)-1, const_zero = 0; const int is_unsigned = neg_one > const_zero; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_Check(x))) { long val = PyInt_AS_LONG(x); if (is_unsigned && unlikely(val < 0)) { PyErr_SetString(PyExc_OverflowError, "can't convert negative value to signed PY_LONG_LONG"); return (signed PY_LONG_LONG)-1; } return (signed PY_LONG_LONG)val; } else #endif if (likely(PyLong_Check(x))) { if (is_unsigned) { #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS if (sizeof(digit) <= sizeof(signed PY_LONG_LONG)) { switch (Py_SIZE(x)) { case 0: return 0; case 1: return (signed PY_LONG_LONG) ((PyLongObject*)x)->ob_digit[0]; } } #endif #endif if (unlikely(Py_SIZE(x) < 0)) { PyErr_SetString(PyExc_OverflowError, "can't convert negative value to signed PY_LONG_LONG"); return (signed PY_LONG_LONG)-1; } return (signed PY_LONG_LONG)PyLong_AsUnsignedLongLong(x); } else { #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS if (sizeof(digit) <= sizeof(signed PY_LONG_LONG)) { switch (Py_SIZE(x)) { case 0: return 0; case 1: return +(signed PY_LONG_LONG) ((PyLongObject*)x)->ob_digit[0]; case -1: return -(signed PY_LONG_LONG) ((PyLongObject*)x)->ob_digit[0]; } } #endif #endif return (signed PY_LONG_LONG)PyLong_AsLongLong(x); } } else { signed PY_LONG_LONG val; PyObject *tmp = __Pyx_PyNumber_Int(x); if (!tmp) return (signed PY_LONG_LONG)-1; val = __Pyx_PyInt_AsSignedLongLong(tmp); Py_DECREF(tmp); return val; } } 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); #if PY_VERSION_HEX < 0x02050000 return PyErr_Warn(NULL, message); #else return PyErr_WarnEx(NULL, message, 1); #endif } return 0; } #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 #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, "%s.%s 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", module_name, class_name); #if PY_VERSION_HEX < 0x02050000 if (PyErr_Warn(NULL, warning) < 0) goto bad; #else if (PyErr_WarnEx(NULL, warning, 0) < 0) goto bad; #endif } else if ((size_t)basicsize != size) { PyErr_Format(PyExc_ValueError, "%s.%s has the wrong size, try recompiling", module_name, class_name); goto bad; } return (PyTypeObject *)result; bad: Py_XDECREF(py_module); Py_XDECREF(result); return NULL; } #endif 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) / 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, 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); } #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, /*int argcount,*/ 0, /*int kwonlyargcount,*/ 0, /*int nlocals,*/ 0, /*int stacksize,*/ 0, /*int flags,*/ __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, /*int firstlineno,*/ __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; PyObject *py_globals = 0; PyFrameObject *py_frame = 0; py_code = __pyx_find_code_object(c_line ? c_line : py_line); if (!py_code) { py_code = __Pyx_CreateCodeObjectForTraceback( funcname, c_line, py_line, filename); if (!py_code) goto bad; __pyx_insert_code_object(c_line ? c_line : py_line, py_code); } py_globals = PyModule_GetDict(__pyx_m); if (!py_globals) goto bad; py_frame = PyFrame_New( PyThreadState_GET(), /*PyThreadState *tstate,*/ py_code, /*PyCodeObject *code,*/ py_globals, /*PyObject *globals,*/ 0 /*PyObject *locals*/ ); if (!py_frame) goto bad; py_frame->f_lineno = py_line; PyTraceBack_Here(py_frame); bad: Py_XDECREF(py_code); Py_XDECREF(py_frame); } 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 /* Python 3+ has unicode identifiers */ if (t->is_unicode | t->is_str) { if (t->intern) { *t->p = PyUnicode_InternFromString(t->s); } else if (t->encoding) { *t->p = PyUnicode_Decode(t->s, t->n - 1, t->encoding, NULL); } else { *t->p = PyUnicode_FromStringAndSize(t->s, t->n - 1); } } else { *t->p = PyBytes_FromStringAndSize(t->s, t->n - 1); } #endif if (!*t->p) return -1; ++t; } return 0; } static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(char* c_str) { return __Pyx_PyUnicode_FromStringAndSize(c_str, strlen(c_str)); } static CYTHON_INLINE char* __Pyx_PyObject_AsString(PyObject* o) { Py_ssize_t ignore; return __Pyx_PyObject_AsStringAndSize(o, &ignore); } static CYTHON_INLINE char* __Pyx_PyObject_AsStringAndSize(PyObject* o, Py_ssize_t *length) { #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT if ( #if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII __Pyx_sys_getdefaultencoding_not_ascii && #endif PyUnicode_Check(o)) { #if PY_VERSION_HEX < 0x03030000 char* defenc_c; PyObject* defenc = _PyUnicode_AsDefaultEncodedString(o, NULL); if (!defenc) return NULL; defenc_c = PyBytes_AS_STRING(defenc); #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII { char* end = defenc_c + PyBytes_GET_SIZE(defenc); char* c; for (c = defenc_c; c < end; c++) { if ((unsigned char) (*c) >= 128) { PyUnicode_AsASCIIString(o); return NULL; } } } #endif /*__PYX_DEFAULT_STRING_ENCODING_IS_ASCII*/ *length = PyBytes_GET_SIZE(defenc); return defenc_c; #else /* PY_VERSION_HEX < 0x03030000 */ if (PyUnicode_READY(o) == -1) return NULL; #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII if (PyUnicode_IS_ASCII(o)) { *length = PyUnicode_GET_DATA_SIZE(o); return PyUnicode_AsUTF8(o); } else { PyUnicode_AsASCIIString(o); return NULL; } #else /* __PYX_DEFAULT_STRING_ENCODING_IS_ASCII */ return PyUnicode_AsUTF8AndSize(o, length); #endif /* __PYX_DEFAULT_STRING_ENCODING_IS_ASCII */ #endif /* PY_VERSION_HEX < 0x03030000 */ } else #endif /* __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT */ { char* result; int r = PyBytes_AsStringAndSize(o, &result, length); if (r < 0) { return NULL; } else { return result; } } } static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject* x) { int is_true = x == Py_True; if (is_true | (x == Py_False) | (x == Py_None)) return is_true; else return PyObject_IsTrue(x); } static CYTHON_INLINE PyObject* __Pyx_PyNumber_Int(PyObject* x) { PyNumberMethods *m; const char *name = NULL; PyObject *res = NULL; #if PY_MAJOR_VERSION < 3 if (PyInt_Check(x) || PyLong_Check(x)) #else if (PyLong_Check(x)) #endif return Py_INCREF(x), x; m = Py_TYPE(x)->tp_as_number; #if PY_MAJOR_VERSION < 3 if (m && m->nb_int) { name = "int"; res = PyNumber_Int(x); } else if (m && m->nb_long) { name = "long"; res = PyNumber_Long(x); } #else if (m && m->nb_int) { name = "int"; res = PyNumber_Long(x); } #endif if (res) { #if PY_MAJOR_VERSION < 3 if (!PyInt_Check(res) && !PyLong_Check(res)) { #else if (!PyLong_Check(res)) { #endif PyErr_Format(PyExc_TypeError, "__%s__ returned non-%s (type %.200s)", name, name, Py_TYPE(res)->tp_name); Py_DECREF(res); return NULL; } } else if (!PyErr_Occurred()) { PyErr_SetString(PyExc_TypeError, "an integer is required"); } return res; } static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) { Py_ssize_t ival; PyObject* x = 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) { #if PY_VERSION_HEX < 0x02050000 if (ival <= LONG_MAX) return PyInt_FromLong((long)ival); else { unsigned char *bytes = (unsigned char *) &ival; int one = 1; int little = (int)*(unsigned char*)&one; return _PyLong_FromByteArray(bytes, sizeof(size_t), little, 0); } #else return PyInt_FromSize_t(ival); #endif } static CYTHON_INLINE size_t __Pyx_PyInt_AsSize_t(PyObject* x) { unsigned PY_LONG_LONG val = __Pyx_PyInt_AsUnsignedLongLong(x); if (unlikely(val != (unsigned PY_LONG_LONG)(size_t)val)) { if ((val != (unsigned PY_LONG_LONG)-1) || !PyErr_Occurred()) PyErr_SetString(PyExc_OverflowError, "value too large to convert to size_t"); return (size_t)-1; } return (size_t)val; } #endif /* Py_PYTHON_H */ debian/patches/0000775000000000000000000000000012275603610010621 5ustar debian/patches/jessie-dsc-patch0000777000000000000000000000000012275603610017400 2nocython3-dsc-patchustar debian/patches/sid-dsc-patch0000777000000000000000000000000012275603610016675 2nocython3-dsc-patchustar debian/patches/precise-dsc-patch0000777000000000000000000000000012275603610017550 2nocython3-dsc-patchustar debian/patches/nocython3-dsc-patch0000664000000000000000000000134512275603610014337 0ustar From: Yaroslav Halchenko Subject: For backports to older suites/releases -- allow to have no cython3 achieved through removing versioning on cython itself at all and allowing older cythons than when cython3 was introduced while requiring cython3 Origin: NeuroDebian Last-Update: 2012-12-14 --- a/debian/control 2012-12-13 22:48:33.000000000 -0500 +++ b/debian/control 2012-12-13 22:54:11.000000000 -0500 @@ -6,7 +6,7 @@ Build-Depends: debhelper (>= 7.0.50), python-all-dev (>= 2.5), python-setuptools, - cython (>= 0.17.1~), + cython, python-numpy (>= 1:1.6.1~), python-dateutil, python-scipy, python-tz, debian/patches/quantal-dsc-patch0000777000000000000000000000000012275603610017563 2nocython3-dsc-patchustar debian/patches/deb_skip_test_pytables_failure0000664000000000000000000000226612275603610017003 0ustar From: Yaroslav Halchenko Subject: swallow the error from pytables happens on wheezy and ubuntu 12.04, only in amd64, only if the entire test battery is run -- difficult to troubleshoot, and definetly resolved on later releases of Debian/Ubuntu. Thus skipping for now -- must be some glitch in pytables Origin: NeuroDebian Last-Update: 2014-02-04 --- a/pandas/io/tests/test_pytables.py +++ b/pandas/io/tests/test_pytables.py @@ -3026,7 +3026,12 @@ class TestHDFStore(tm.TestCase): # big selector along the columns selector = [ 'a','b','c' ] + [ 'a%03d' % i for i in range(60) ] - result = store.select('df', [Term("ts>=Timestamp('2012-02-01')"),Term('users=selector')]) + try: + result = store.select('df', [Term("ts>=Timestamp('2012-02-01')"),Term('users=selector')]) + except KeyError as e: + if "No object named df in" in str(e): + raise nose.SkipTest("Skipping the test due to catching known %s" % e) + expected = df[ (df.ts >= Timestamp('2012-02-01')) & df.users.isin(selector) ] tm.assert_frame_equal(expected, result) debian/patches/changeset_da82915116afaeb9dc9a7c5afefa951e1339f6f1.diff0000664000000000000000000000165412275603610021451 0ustar From: jreback Subject: TST: dtype fixes for #6256 --- a/pandas/tests/test_indexing.py +++ b/pandas/tests/test_indexing.py @@ -649,17 +649,17 @@ class TestIndexing(tm.TestCase): # GH 6254 # setting issue df = DataFrame(index=[3, 5, 4], columns=['A']) - df.loc[[4, 3, 5], 'A'] = [1, 2, 3] + df.loc[[4, 3, 5], 'A'] = np.array([1, 2, 3],dtype='int64') expected = DataFrame(dict(A = Series([1,2,3],index=[4, 3, 5]))).reindex(index=[3,5,4]) assert_frame_equal(df, expected) # GH 6252 # setting with an empty frame keys1 = ['@' + str(i) for i in range(5)] - val1 = np.arange(5) + val1 = np.arange(5,dtype='int64') keys2 = ['@' + str(i) for i in range(4)] - val2 = np.arange(4) + val2 = np.arange(4,dtype='int64') index = list(set(keys1).union(keys2)) df = DataFrame(index = index) debian/patches/deb_skip_sequencelike_on_armel0000664000000000000000000000116012275603610016733 0ustar --- a/pandas/tests/test_frame.py +++ b/pandas/tests/test_frame.py @@ -3953,6 +3953,9 @@ class TestDataFrame(tm.TestCase, CheckIn self.assert_(len(tst.columns) == 3) def test_from_records_sequencelike(self): + import platform + if platform.uname()[4].startswith('armv'): + raise nose.SkipTest("Fails on Debian arm boxes due to locales or whatelse") df = DataFrame({'A' : np.array(np.random.randn(6), dtype = np.float64), 'A1': np.array(np.random.randn(6), dtype = np.float64), 'B' : np.array(np.arange(6), dtype = np.int64), debian/patches/changeset_6d56e7300d66d3ba76684334bbb44b6cd0ea9f61.diff0000664000000000000000000000407712275603610021143 0ustar From: jreback Subject: BUG: Indexing bugs with reordered indexes (GH6252, GH6254) commit 6d56e7300d66d3ba76684334bbb44b6cd0ea9f61 BUG: Indexing bugs with reordered indexes (GH6252, GH6254) diff --git a/pandas/core/internals.py b/pandas/core/internals.py index 2c58dd3..e88f197 100644 --- a/pandas/core/internals.py +++ b/pandas/core/internals.py @@ -633,7 +633,8 @@ class Block(PandasObject): # if we are an exact match (ex-broadcasting), # then use the resultant dtype elif len(arr_value.shape) and arr_value.shape[0] == values.shape[0] and np.prod(arr_value.shape) == np.prod(values.shape): - values = arr_value.reshape(values.shape) + values[indexer] = value + values = values.astype(arr_value.dtype) # set else: diff --git a/pandas/tests/test_indexing.py b/pandas/tests/test_indexing.py index 435b0ca..4a641ca 100644 --- a/pandas/tests/test_indexing.py +++ b/pandas/tests/test_indexing.py @@ -646,6 +646,32 @@ class TestIndexing(tm.TestCase): result = df.ix[:,1:] assert_frame_equal(result, expected) + # GH 6254 + # setting issue + df = DataFrame(index=[3, 5, 4], columns=['A']) + df.loc[[4, 3, 5], 'A'] = [1, 2, 3] + expected = DataFrame(dict(A = Series([1,2,3],index=[4, 3, 5]))).reindex(index=[3,5,4]) + assert_frame_equal(df, expected) + + # GH 6252 + # setting with an empty frame + keys1 = ['@' + str(i) for i in range(5)] + val1 = np.arange(5) + + keys2 = ['@' + str(i) for i in range(4)] + val2 = np.arange(4) + + index = list(set(keys1).union(keys2)) + df = DataFrame(index = index) + df['A'] = nan + df.loc[keys1, 'A'] = val1 + + df['B'] = nan + df.loc[keys2, 'B'] = val2 + + expected = DataFrame(dict(A = Series(val1,index=keys1), B = Series(val2,index=keys2))).reindex(index=index) + assert_frame_equal(df, expected) + def test_loc_setitem_frame_multiples(self): # multiple setting debian/patches/series0000664000000000000000000000025612275603610012041 0ustar changeset_6d56e7300d66d3ba76684334bbb44b6cd0ea9f61.diff changeset_da82915116afaeb9dc9a7c5afefa951e1339f6f1.diff deb_skip_sequencelike_on_armel deb_skip_test_pytables_failure debian/patches/wheezy-dsc-patch0000777000000000000000000000000012275603610017431 2nocython3-dsc-patchustar debian/README.source0000664000000000000000000000041612275603610011352 0ustar pandas for Debian ----------------- For flexibility and easier interaction with upstream, packaging VCS is done on top of upstream's GIT hosted on github: git://github.com/wesm/pandas.git -- Yaroslav Halchenko , Tue, 13 Sep 2011 12:25:02 -0400 debian/compat0000664000000000000000000000000212275603610010370 0ustar 7 debian/python-pandas-doc.examples0000664000000000000000000000001312275603610014254 0ustar examples/* debian/tests/0000775000000000000000000000000012275603610010334 5ustar debian/tests/unittests0000775000000000000000000000034512275603610012326 0ustar #!/bin/sh set -efu pys="$(pyversions -rv 2>/dev/null)" cd "$ADTTMP" for py in $pys; do echo "=== python$py ===" xvfb-run --auto-servernum --server-args="-screen 0 1024x768x24" nosetests-$py -a '!network' -v pandas 2>&1 done debian/tests/control0000664000000000000000000000130712275603610011740 0ustar Tests: unittests Depends: python-all, python-dateutil, python-matplotlib, python-nose, python-numpy, python-openpyxl, python-pandas, python-scipy, python-statsmodels, python-tables, python-tk, python-tz, python-xlrd, python-xlwt, python-bs4, python-html5lib, xauth, xvfb Tests: unittests3 Depends: python3-all, python3-dateutil, python3-matplotlib, python3-nose, python3-numpy, python3-pandas, python3-scipy, python3-tk, python3-tz, python3-bs4, xauth, xvfb debian/tests/unittests30000775000000000000000000000035112275603610012406 0ustar #!/bin/sh set -efu pys="$(py3versions -r 2>/dev/null)" cd "$ADTTMP" for py in $pys; do echo "=== $py ===" xvfb-run --auto-servernum --server-args="-screen 0 1024x768x24" $py /usr/bin/nosetests3 -a '!network' -v pandas 2>&1 done debian/TODO0000664000000000000000000000042312275603610007661 0ustar * Check if dateutil is indeed (>= 1.5) -- absent on Ubuntus * IPython 0.11 seems to be required to build docs - there was a bug report requesting -doc iirc * adjust copyright to mention code in setup.py borrowed from pyzmq * gather more of copyright/license added in 0.8. debian/python-pandas-doc.docs0000664000000000000000000000002012275603610013364 0ustar doc/_build/html debian/python3-pandas.install0000664000000000000000000000002112275603610013423 0ustar usr/lib/python3/ debian/pycompat0000664000000000000000000000000212275603610010741 0ustar 2